@nebula.js/sn-histogram 0.31.0 → 0.31.1

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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * @nebula.js/sn-histogram v0.31.0
2
+ * @nebula.js/sn-histogram v0.31.1
3
3
  * Copyright (c) 2022 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
@@ -17,9 +17,9 @@
17
17
  */
18
18
  function(e){var t,n,r,i,o,a,s,u,l,c,f,h,d,p,m,g,y,v,b,x="sizzle"+1*new Date,w=e.document,k=0,M=0,_=ue(),S=ue(),q=ue(),D=ue(),C=function(e,t){return e===t&&(f=!0),0},E={}.hasOwnProperty,A=[],T=A.pop,N=A.push,R=A.push,O=A.slice,I=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},P="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",j="(?:\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",z="\\[[\\x20\\t\\r\\n\\f]*("+j+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+j+"))|)"+L+"*\\]",F=":("+j+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+z+")*)|.*)\\)|)",H=new RegExp(L+"+","g"),B=new RegExp("^[\\x20\\t\\r\\n\\f]+|((?:^|[^\\\\])(?:\\\\.)*)[\\x20\\t\\r\\n\\f]+$","g"),V=new RegExp("^[\\x20\\t\\r\\n\\f]*,[\\x20\\t\\r\\n\\f]*"),W=new RegExp("^[\\x20\\t\\r\\n\\f]*([>+~]|[\\x20\\t\\r\\n\\f])[\\x20\\t\\r\\n\\f]*"),U=new RegExp(L+"|>"),$=new RegExp(F),Y=new RegExp("^"+j+"$"),K={ID:new RegExp("^#("+j+")"),CLASS:new RegExp("^\\.("+j+")"),TAG:new RegExp("^("+j+"|[*])"),ATTR:new RegExp("^"+z),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\([\\x20\\t\\r\\n\\f]*(even|odd|(([+-]|)(\\d*)n|)[\\x20\\t\\r\\n\\f]*(?:([+-]|)[\\x20\\t\\r\\n\\f]*(\\d+)|))[\\x20\\t\\r\\n\\f]*\\)|)","i"),bool:new RegExp("^(?:"+P+")$","i"),needsContext:new RegExp("^[\\x20\\t\\r\\n\\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\([\\x20\\t\\r\\n\\f]*((?:-\\d)?\\d*)[\\x20\\t\\r\\n\\f]*\\)|)(?=[^-]|$)","i")},X=/HTML$/i,G=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,Q=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\([^\\r\\n\\f])","g"),ne=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))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){h()},ae=xe((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{R.apply(A=O.call(w.childNodes),w.childNodes),A[w.childNodes.length].nodeType}catch(e){R={apply:A.length?function(e,t){N.apply(e,O.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function se(e,t,r,i){var o,s,l,c,f,p,y,v=t&&t.ownerDocument,w=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==w&&9!==w&&11!==w)return r;if(!i&&(h(t),t=t||d,m)){if(11!==w&&(f=Q.exec(e)))if(o=f[1]){if(9===w){if(!(l=t.getElementById(o)))return r;if(l.id===o)return r.push(l),r}else if(v&&(l=v.getElementById(o))&&b(t,l)&&l.id===o)return r.push(l),r}else{if(f[2])return R.apply(r,t.getElementsByTagName(e)),r;if((o=f[3])&&n.getElementsByClassName&&t.getElementsByClassName)return R.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!D[e+" "]&&(!g||!g.test(e))&&(1!==w||"object"!==t.nodeName.toLowerCase())){if(y=e,v=t,1===w&&(U.test(e)||W.test(e))){for((v=ee.test(e)&&ye(t.parentNode)||t)===t&&n.scope||((c=t.getAttribute("id"))?c=c.replace(re,ie):t.setAttribute("id",c=x)),s=(p=a(e)).length;s--;)p[s]=(c?"#"+c:":scope")+" "+be(p[s]);y=p.join(",")}try{return R.apply(r,v.querySelectorAll(y)),r}catch(t){D(e,!0)}finally{c===x&&t.removeAttribute("id")}}}return u(e.replace(B,"$1"),t,r,i)}function ue(){var e=[];return function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function le(e){return e[x]=!0,e}function ce(e){var t=d.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){for(var n=e.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=t}function he(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function de(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function pe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function me(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&&ae(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function ge(e){return le((function(t){return t=+t,le((function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))}))}))}function ye(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=se.support={},o=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!X.test(t||n&&n.nodeName||"HTML")},h=se.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:w;return a!=d&&9===a.nodeType&&a.documentElement?(p=(d=a).documentElement,m=!o(d),w!=d&&(i=d.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",oe,!1):i.attachEvent&&i.attachEvent("onunload",oe)),n.scope=ce((function(e){return p.appendChild(e).appendChild(d.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length})),n.attributes=ce((function(e){return e.className="i",!e.getAttribute("className")})),n.getElementsByTagName=ce((function(e){return e.appendChild(d.createComment("")),!e.getElementsByTagName("*").length})),n.getElementsByClassName=Z.test(d.getElementsByClassName),n.getById=ce((function(e){return p.appendChild(e).id=x,!d.getElementsByName||!d.getElementsByName(x).length})),n.getById?(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&m){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&m){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&m)return t.getElementsByClassName(e)},y=[],g=[],(n.qsa=Z.test(d.querySelectorAll))&&(ce((function(e){var t;p.appendChild(e).innerHTML="<a id='"+x+"'></a><select id='"+x+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),e.querySelectorAll("[selected]").length||g.push("\\[[\\x20\\t\\r\\n\\f]*(?:value|"+P+")"),e.querySelectorAll("[id~="+x+"-]").length||g.push("~="),(t=d.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||g.push("\\[[\\x20\\t\\r\\n\\f]*name[\\x20\\t\\r\\n\\f]*=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),e.querySelectorAll(":checked").length||g.push(":checked"),e.querySelectorAll("a#"+x+"+*").length||g.push(".#.+[+~]"),e.querySelectorAll("\\\f"),g.push("[\\r\\n\\f]")})),ce((function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=d.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&g.push("name[\\x20\\t\\r\\n\\f]*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),p.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")}))),(n.matchesSelector=Z.test(v=p.matches||p.webkitMatchesSelector||p.mozMatchesSelector||p.oMatchesSelector||p.msMatchesSelector))&&ce((function(e){n.disconnectedMatch=v.call(e,"*"),v.call(e,"[s!='']:x"),y.push("!=",F)})),g=g.length&&new RegExp(g.join("|")),y=y.length&&new RegExp(y.join("|")),t=Z.test(p.compareDocumentPosition),b=t||Z.test(p.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},C=t?function(e,t){if(e===t)return f=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e==d||e.ownerDocument==w&&b(w,e)?-1:t==d||t.ownerDocument==w&&b(w,t)?1:c?I(c,e)-I(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return f=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==d?-1:t==d?1:i?-1:o?1:c?I(c,e)-I(c,t):0;if(i===o)return he(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?he(a[r],s[r]):a[r]==w?-1:s[r]==w?1:0},d):d},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(h(e),n.matchesSelector&&m&&!D[t+" "]&&(!y||!y.test(t))&&(!g||!g.test(t)))try{var r=v.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){D(t,!0)}return se(t,d,null,[e]).length>0},se.contains=function(e,t){return(e.ownerDocument||e)!=d&&h(e),b(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=d&&h(e);var i=r.attrHandle[t.toLowerCase()],o=i&&E.call(r.attrHandle,t.toLowerCase())?i(e,t,!m):void 0;return void 0!==o?o:n.attributes||!m?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},se.escape=function(e){return(e+"").replace(re,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,r=[],i=0,o=0;if(f=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(C),f){for(;t=e[o++];)t===e[o]&&(i=r.push(o));for(;i--;)e.splice(r[i],1)}return c=null,e},i=se.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=i(t);return n},(r=se.selectors={cacheLength:50,createPseudo:le,match:K,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(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===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]||se.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]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return K.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&$.test(n)&&(t=a(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(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=_[e+" "];return t||(t=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+e+"("+L+"|$)"))&&_(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(r){var i=se.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(H," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,h,d,p,m=o!==a?"nextSibling":"previousSibling",g=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s,b=!1;if(g){if(o){for(;m;){for(h=t;h=h[m];)if(s?h.nodeName.toLowerCase()===y:1===h.nodeType)return!1;p=m="only"===e&&!p&&"nextSibling"}return!0}if(p=[a?g.firstChild:g.lastChild],a&&v){for(b=(d=(l=(c=(f=(h=g)[x]||(h[x]={}))[h.uniqueID]||(f[h.uniqueID]={}))[e]||[])[0]===k&&l[1])&&l[2],h=d&&g.childNodes[d];h=++d&&h&&h[m]||(b=d=0)||p.pop();)if(1===h.nodeType&&++b&&h===t){c[e]=[k,d,b];break}}else if(v&&(b=d=(l=(c=(f=(h=t)[x]||(h[x]={}))[h.uniqueID]||(f[h.uniqueID]={}))[e]||[])[0]===k&&l[1]),!1===b)for(;(h=++d&&h&&h[m]||(b=d=0)||p.pop())&&((s?h.nodeName.toLowerCase()!==y:1!==h.nodeType)||!++b||(v&&((c=(f=h[x]||(h[x]={}))[h.uniqueID]||(f[h.uniqueID]={}))[e]=[k,b]),h!==t)););return(b-=i)===r||b%r==0&&b/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return i[x]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?le((function(e,n){for(var r,o=i(e,t),a=o.length;a--;)e[r=I(e,o[a])]=!(n[r]=o[a])})):function(e){return i(e,0,n)}):i}},pseudos:{not:le((function(e){var t=[],n=[],r=s(e.replace(B,"$1"));return r[x]?le((function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))})):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}})),has:le((function(e){return function(t){return se(e,t).length>0}})),contains:le((function(e){return e=e.replace(te,ne),function(t){return(t.textContent||i(t)).indexOf(e)>-1}})),lang:le((function(e){return Y.test(e||"")||se.error("unsupported lang: "+e),e=e.replace(te,ne).toLowerCase(),function(t){var n;do{if(n=m?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===p},focus:function(e){return e===d.activeElement&&(!d.hasFocus||d.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:me(!1),disabled:me(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!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!r.pseudos.empty(e)},header:function(e){return J.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ge((function(){return[0]})),last:ge((function(e,t){return[t-1]})),eq:ge((function(e,t,n){return[n<0?n+t:n]})),even:ge((function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e})),odd:ge((function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e})),lt:ge((function(e,t,n){for(var r=n<0?n+t:n>t?t:n;--r>=0;)e.push(r);return e})),gt:ge((function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e}))}}).pseudos.nth=r.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[t]=de(t);for(t in{submit:!0,reset:!0})r.pseudos[t]=pe(t);function ve(){}function be(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function xe(e,t,n){var r=t.dir,i=t.next,o=i||r,a=n&&"parentNode"===o,s=M++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||a)return e(t,n,i);return!1}:function(t,n,u){var l,c,f,h=[k,s];if(u){for(;t=t[r];)if((1===t.nodeType||a)&&e(t,n,u))return!0}else for(;t=t[r];)if(1===t.nodeType||a)if(c=(f=t[x]||(t[x]={}))[t.uniqueID]||(f[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((l=c[o])&&l[0]===k&&l[1]===s)return h[2]=l[2];if(c[o]=h,h[2]=e(t,n,u))return!0}return!1}}function we(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function ke(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function Me(e,t,n,r,i,o){return r&&!r[x]&&(r=Me(r)),i&&!i[x]&&(i=Me(i,o)),le((function(o,a,s,u){var l,c,f,h=[],d=[],p=a.length,m=o||function(e,t,n){for(var r=0,i=t.length;r<i;r++)se(e,t[r],n);return n}(t||"*",s.nodeType?[s]:s,[]),g=!e||!o&&t?m:ke(m,h,e,s,u),y=n?i||(o?e:p||r)?[]:a:g;if(n&&n(g,y,s,u),r)for(l=ke(y,d),r(l,[],s,u),c=l.length;c--;)(f=l[c])&&(y[d[c]]=!(g[d[c]]=f));if(o){if(i||e){if(i){for(l=[],c=y.length;c--;)(f=y[c])&&l.push(g[c]=f);i(null,y=[],l,u)}for(c=y.length;c--;)(f=y[c])&&(l=i?I(o,f):h[c])>-1&&(o[l]=!(a[l]=f))}}else y=ke(y===a?y.splice(p,y.length):y),i?i(null,a,y,u):R.apply(a,y)}))}function _e(e){for(var t,n,i,o=e.length,a=r.relative[e[0].type],s=a||r.relative[" "],u=a?1:0,c=xe((function(e){return e===t}),s,!0),f=xe((function(e){return I(t,e)>-1}),s,!0),h=[function(e,n,r){var i=!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):f(e,n,r));return t=null,i}];u<o;u++)if(n=r.relative[e[u].type])h=[xe(we(h),n)];else{if((n=r.filter[e[u].type].apply(null,e[u].matches))[x]){for(i=++u;i<o&&!r.relative[e[i].type];i++);return Me(u>1&&we(h),u>1&&be(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(B,"$1"),n,u<i&&_e(e.slice(u,i)),i<o&&_e(e=e.slice(i)),i<o&&be(e))}h.push(n)}return we(h)}return ve.prototype=r.filters=r.pseudos,r.setFilters=new ve,a=se.tokenize=function(e,t){var n,i,o,a,s,u,l,c=S[e+" "];if(c)return t?0:c.slice(0);for(s=e,u=[],l=r.preFilter;s;){for(a in n&&!(i=V.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(o=[])),n=!1,(i=W.exec(s))&&(n=i.shift(),o.push({value:n,type:i[0].replace(B," ")}),s=s.slice(n.length)),r.filter)!(i=K[a].exec(s))||l[a]&&!(i=l[a](i))||(n=i.shift(),o.push({value:n,type:a,matches:i}),s=s.slice(n.length));if(!n)break}return t?s.length:s?se.error(e):S(e,u).slice(0)},s=se.compile=function(e,t){var n,i=[],o=[],s=q[e+" "];if(!s){for(t||(t=a(e)),n=t.length;n--;)(s=_e(t[n]))[x]?i.push(s):o.push(s);(s=q(e,function(e,t){var n=t.length>0,i=e.length>0,o=function(o,a,s,u,c){var f,p,g,y=0,v="0",b=o&&[],x=[],w=l,M=o||i&&r.find.TAG("*",c),_=k+=null==w?1:Math.random()||.1,S=M.length;for(c&&(l=a==d||a||c);v!==S&&null!=(f=M[v]);v++){if(i&&f){for(p=0,a||f.ownerDocument==d||(h(f),s=!m);g=e[p++];)if(g(f,a||d,s)){u.push(f);break}c&&(k=_)}n&&((f=!g&&f)&&y--,o&&b.push(f))}if(y+=v,n&&v!==y){for(p=0;g=t[p++];)g(b,x,a,s);if(o){if(y>0)for(;v--;)b[v]||x[v]||(x[v]=T.call(u));x=ke(x)}R.apply(u,x),c&&!o&&x.length>0&&y+t.length>1&&se.uniqueSort(u)}return c&&(k=_,l=w),b};return n?le(o):o}(o,i))).selector=e}return s},u=se.select=function(e,t,n,i){var o,u,l,c,f,h="function"==typeof e&&e,d=!i&&a(e=h.selector||e);if(n=n||[],1===d.length){if((u=d[0]=d[0].slice(0)).length>2&&"ID"===(l=u[0]).type&&9===t.nodeType&&m&&r.relative[u[1].type]){if(!(t=(r.find.ID(l.matches[0].replace(te,ne),t)||[])[0]))return n;h&&(t=t.parentNode),e=e.slice(u.shift().value.length)}for(o=K.needsContext.test(e)?0:u.length;o--&&(l=u[o],!r.relative[c=l.type]);)if((f=r.find[c])&&(i=f(l.matches[0].replace(te,ne),ee.test(u[0].type)&&ye(t.parentNode)||t))){if(u.splice(o,1),!(e=i.length&&be(u)))return R.apply(n,i),n;break}}return(h||s(e,d))(i,t,!m,n,!t||ee.test(e)&&ye(t.parentNode)||t),n},n.sortStable=x.split("").sort(C).join("")===x,n.detectDuplicates=!!f,h(),n.sortDetached=ce((function(e){return 1&e.compareDocumentPosition(d.createElement("fieldset"))})),ce((function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")}))||fe("type|href|height|width",(function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),n.attributes&&ce((function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||fe("value",(function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),ce((function(e){return null==e.getAttribute("disabled")}))||fe(P,(function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null})),se}(e);k.find=_,(k.expr=_.selectors)[":"]=k.expr.pseudos,k.uniqueSort=k.unique=_.uniqueSort,k.text=_.getText,k.isXMLDoc=_.isXML,k.contains=_.contains,k.escapeSelector=_.escape;var S=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&k(e).is(n))break;r.push(e)}return r},q=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},D=k.expr.match.needsContext;function C(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var E=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function A(e,t,n){return m(t)?k.grep(e,(function(e,r){return!!t.call(e,r,e)!==n})):t.nodeType?k.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?k.grep(e,(function(e){return u.call(t,e)>-1!==n})):k.filter(t,e,n)}k.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?k.find.matchesSelector(r,e)?[r]:[]:k.find.matches(e,k.grep(t,(function(e){return 1===e.nodeType})))},k.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(k(e).filter((function(){for(t=0;t<r;t++)if(k.contains(i[t],this))return!0})));for(n=this.pushStack([]),t=0;t<r;t++)k.find(e,i[t],n);return r>1?k.uniqueSort(n):n},filter:function(e){return this.pushStack(A(this,e||[],!1))},not:function(e){return this.pushStack(A(this,e||[],!0))},is:function(e){return!!A(this,"string"==typeof e&&D.test(e)?k(e):e||[],!1).length}});var T,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(k.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||T,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:N.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:y,!0)),E.test(r[1])&&k.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=y.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(k):k.makeArray(e,this)}).prototype=k.fn,T=k(y);var R=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function I(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,r=0,i=this.length,o=[],a="string"!=typeof e&&k(e);if(!D.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.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?u.call(k(e),this[0]):u.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 S(e,"parentNode")},parentsUntil:function(e,t,n){return S(e,"parentNode",n)},next:function(e){return I(e,"nextSibling")},prev:function(e){return I(e,"previousSibling")},nextAll:function(e){return S(e,"nextSibling")},prevAll:function(e){return S(e,"previousSibling")},nextUntil:function(e,t,n){return S(e,"nextSibling",n)},prevUntil:function(e,t,n){return S(e,"previousSibling",n)},siblings:function(e){return q((e.parentNode||{}).firstChild,e)},children:function(e){return q(e.firstChild)},contents:function(e){return null!=e.contentDocument&&i(e.contentDocument)?e.contentDocument:(C(e,"template")&&(e=e.content||e),k.merge([],e.childNodes))}},(function(e,t){k.fn[e]=function(n,r){var i=k.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=k.filter(r,i)),this.length>1&&(O[e]||k.uniqueSort(i),R.test(e)&&i.reverse()),this.pushStack(i)}}));var P=/[^\x20\t\r\n\f]+/g;function L(e){return e}function j(e){throw e}function z(e,t,n,r){var i;try{e&&m(i=e.promise)?i.call(e).done(t).fail(n):e&&m(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}k.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return k.each(e.match(P)||[],(function(e,n){t[n]=!0})),t}(e):k.extend({},e);var t,n,r,i,o=[],a=[],s=-1,u=function(){for(i=i||e.once,r=t=!0;a.length;s=-1)for(n=a.shift();++s<o.length;)!1===o[s].apply(n[0],n[1])&&e.stopOnFalse&&(s=o.length,n=!1);e.memory||(n=!1),t=!1,i&&(o=n?[]:"")},l={add:function(){return o&&(n&&!t&&(s=o.length-1,a.push(n)),function t(n){k.each(n,(function(n,r){m(r)?e.unique&&l.has(r)||o.push(r):r&&r.length&&"string"!==x(r)&&t(r)}))}(arguments),n&&!t&&u()),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<=s&&s--})),this},has:function(e){return e?k.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l},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",o={state:function(){return i},always:function(){return a.done(arguments).fail(arguments),this},catch:function(e){return o.then(null,e)},pipe:function(){var e=arguments;return k.Deferred((function(t){k.each(n,(function(n,r){var i=m(e[r[4]])&&e[r[4]];a[r[1]]((function(){var e=i&&i.apply(this,arguments);e&&m(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+"With"](this,i?[e]:arguments)}))})),e=null})).promise()},then:function(t,i,o){var a=0;function s(t,n,i,o){return function(){var u=this,l=arguments,c=function(){var e,c;if(!(t<a)){if((e=i.apply(u,l))===n.promise())throw new TypeError("Thenable self-resolution");c=e&&("object"===r(e)||"function"==typeof e)&&e.then,m(c)?o?c.call(e,s(a,n,L,o),s(a,n,j,o)):(a++,c.call(e,s(a,n,L,o),s(a,n,j,o),s(a,n,L,n.notifyWith))):(i!==L&&(u=void 0,l=[e]),(o||n.resolveWith)(u,l))}},f=o?c:function(){try{c()}catch(e){k.Deferred.exceptionHook&&k.Deferred.exceptionHook(e,f.stackTrace),t+1>=a&&(i!==j&&(u=void 0,l=[e]),n.rejectWith(u,l))}};t?f():(k.Deferred.getStackHook&&(f.stackTrace=k.Deferred.getStackHook()),e.setTimeout(f))}}return k.Deferred((function(e){n[0][3].add(s(0,e,m(o)?o:L,e.notifyWith)),n[1][3].add(s(0,e,m(t)?t:L)),n[2][3].add(s(0,e,m(i)?i:j))})).promise()},promise:function(e){return null!=e?k.extend(e,o):o}},a={};return k.each(n,(function(e,t){var r=t[2],s=t[5];o[t[1]]=r.add,s&&r.add((function(){i=s}),n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),r.add(t[3].fire),a[t[0]]=function(){return a[t[0]+"With"](this===a?void 0:this,arguments),this},a[t[0]+"With"]=r.fireWith})),o.promise(a),t&&t.call(a,a),a},when:function(e){var t=arguments.length,n=t,r=Array(n),i=o.call(arguments),a=k.Deferred(),s=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?o.call(arguments):n,--t||a.resolveWith(r,i)}};if(t<=1&&(z(e,a.done(s(n)).resolve,a.reject,!t),"pending"===a.state()||m(i[n]&&i[n].then)))return a.then();for(;n--;)z(i[n],s(n),a.reject);return a.promise()}});var F=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;k.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&F.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},k.readyException=function(t){e.setTimeout((function(){throw t}))};var H=k.Deferred();function B(){y.removeEventListener("DOMContentLoaded",B),e.removeEventListener("load",B),k.ready()}k.fn.ready=function(e){return H.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||H.resolveWith(y,[k]))}}),k.ready.then=H.then,"complete"===y.readyState||"loading"!==y.readyState&&!y.documentElement.doScroll?e.setTimeout(k.ready):(y.addEventListener("DOMContentLoaded",B),e.addEventListener("load",B));var V=function e(t,n,r,i,o,a,s){var u=0,l=t.length,c=null==r;if("object"===x(r))for(u in o=!0,r)e(t,n,u,r[u],!0,a,s);else if(void 0!==i&&(o=!0,m(i)||(s=!0),c&&(s?(n.call(t,i),n=null):(c=n,n=function(e,t,n){return c.call(k(e),n)})),n))for(;u<l;u++)n(t[u],r,s?i:i.call(t[u],u,n(t[u],r)));return o?t:c?n.call(t):l?n(t[0],r):a},W=/^-ms-/,U=/-([a-z])/g;function $(e,t){return t.toUpperCase()}function Y(e){return e.replace(W,"ms-").replace(U,$)}var K=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function X(){this.expando=k.expando+X.uid++}X.uid=1,X.prototype={cache:function(e){var t=e[this.expando];return t||(t={},K(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[Y(t)]=n;else for(r in t)i[Y(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][Y(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,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(Y):(t=Y(t))in r?[t]:t.match(P)||[]).length;for(;n--;)delete r[t[n]]}(void 0===t||k.isEmptyObject(r))&&(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 G=new X,J=new X,Z=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Q=/[A-Z]/g;function ee(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(Q,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:Z.test(e)?JSON.parse(e):e)}(n)}catch(e){}J.set(e,t,n)}else n=void 0;return n}k.extend({hasData:function(e){return J.hasData(e)||G.hasData(e)},data:function(e,t,n){return J.access(e,t,n)},removeData:function(e,t){J.remove(e,t)},_data:function(e,t,n){return G.access(e,t,n)},_removeData:function(e,t){G.remove(e,t)}}),k.fn.extend({data:function(e,t){var n,i,o,a=this[0],s=a&&a.attributes;if(void 0===e){if(this.length&&(o=J.get(a),1===a.nodeType&&!G.get(a,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&0===(i=s[n].name).indexOf("data-")&&(i=Y(i.slice(5)),ee(a,i,o[i]));G.set(a,"hasDataAttrs",!0)}return o}return"object"===r(e)?this.each((function(){J.set(this,e)})):V(this,(function(t){var n;if(a&&void 0===t)return void 0!==(n=J.get(a,e))||void 0!==(n=ee(a,e))?n:void 0;this.each((function(){J.set(this,e,t)}))}),null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each((function(){J.remove(this,e)}))}}),k.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=G.get(e,t),n&&(!r||Array.isArray(n)?r=G.access(e,t,k.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){var n=k.queue(e,t=t||"fx"),r=n.length,i=n.shift(),o=k._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,(function(){k.dequeue(e,t)}),o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return G.get(e,n)||G.access(e,n,{empty:k.Callbacks("once memory").add((function(){G.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,r=1,i=k.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(n=G.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var te=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ne=new RegExp("^(?:([+-])=|)("+te+")([a-z%]*)$","i"),re=["Top","Right","Bottom","Left"],ie=y.documentElement,oe=function(e){return k.contains(e.ownerDocument,e)},ae={composed:!0};ie.getRootNode&&(oe=function(e){return k.contains(e.ownerDocument,e)||e.getRootNode(ae)===e.ownerDocument});var se=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&oe(e)&&"none"===k.css(e,"display")};function ue(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return k.css(e,t,"")},u=s(),l=n&&n[3]||(k.cssNumber[t]?"":"px"),c=e.nodeType&&(k.cssNumber[t]||"px"!==l&&+u)&&ne.exec(k.css(e,t));if(c&&c[3]!==l){for(u/=2,l=l||c[3],c=+u||1;a--;)k.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;k.style(e,t,(c*=2)+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var le={};function ce(e){var t,n=e.ownerDocument,r=e.nodeName,i=le[r];return i||(t=n.body.appendChild(n.createElement(r)),i=k.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),le[r]=i,i)}function fe(e,t){for(var n,r,i=[],o=0,a=e.length;o<a;o++)(r=e[o]).style&&(n=r.style.display,t?("none"===n&&(i[o]=G.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&se(r)&&(i[o]=ce(r))):"none"!==n&&(i[o]="none",G.set(r,"display",n)));for(o=0;o<a;o++)null!=i[o]&&(e[o].style.display=i[o]);return e}k.fn.extend({show:function(){return fe(this,!0)},hide:function(){return fe(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each((function(){se(this)?k(this).show():k(this).hide()}))}});var he,de,pe=/^(?:checkbox|radio)$/i,me=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,ge=/^$|^module$|\/(?:java|ecma)script/i;he=y.createDocumentFragment().appendChild(y.createElement("div")),(de=y.createElement("input")).setAttribute("type","radio"),de.setAttribute("checked","checked"),de.setAttribute("name","t"),he.appendChild(de),p.checkClone=he.cloneNode(!0).cloneNode(!0).lastChild.checked,he.innerHTML="<textarea>x</textarea>",p.noCloneChecked=!!he.cloneNode(!0).lastChild.defaultValue,he.innerHTML="<option></option>",p.option=!!he.lastChild;var ye={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 ve(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&C(e,t)?k.merge([e],n):n}function be(e,t){for(var n=0,r=e.length;n<r;n++)G.set(e[n],"globalEval",!t||G.get(t[n],"globalEval"))}ye.tbody=ye.tfoot=ye.colgroup=ye.caption=ye.thead,ye.th=ye.td,p.option||(ye.optgroup=ye.option=[1,"<select multiple='multiple'>","</select>"]);var xe=/<|&#?\w+;/;function we(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),h=[],d=0,p=e.length;d<p;d++)if((o=e[d])||0===o)if("object"===x(o))k.merge(h,o.nodeType?[o]:o);else if(xe.test(o)){for(a=a||f.appendChild(t.createElement("div")),s=(me.exec(o)||["",""])[1].toLowerCase(),u=ye[s]||ye._default,a.innerHTML=u[1]+k.htmlPrefilter(o)+u[2],c=u[0];c--;)a=a.lastChild;k.merge(h,a.childNodes),(a=f.firstChild).textContent=""}else h.push(t.createTextNode(o));for(f.textContent="",d=0;o=h[d++];)if(r&&k.inArray(o,r)>-1)i&&i.push(o);else if(l=oe(o),a=ve(f.appendChild(o),"script"),l&&be(a),n)for(c=0;o=a[c++];)ge.test(o.type||"")&&n.push(o);return f}var ke=/^([^.]*)(?:\.(.+)|)/;function Me(){return!0}function _e(){return!1}function Se(e,t){return e===function(){try{return y.activeElement}catch(e){}}()==("focus"===t)}function qe(e,t,n,i,o,a){var s,u;if("object"===r(t)){for(u in"string"!=typeof n&&(i=i||n,n=void 0),t)qe(e,u,n,i,t[u],a);return e}if(null==i&&null==o?(o=n,i=n=void 0):null==o&&("string"==typeof n?(o=i,i=void 0):(o=i,i=n,n=void 0)),!1===o)o=_e;else if(!o)return e;return 1===a&&(s=o,(o=function(e){return k().off(e),s.apply(this,arguments)}).guid=s.guid||(s.guid=k.guid++)),e.each((function(){k.event.add(this,t,o,i,n)}))}function De(e,t,n){n?(G.set(e,t,!1),k.event.add(e,t,{namespace:!1,handler:function(e){var r,i,a=G.get(this,t);if(1&e.isTrigger&&this[t]){if(a.length)(k.event.special[t]||{}).delegateType&&e.stopPropagation();else if(a=o.call(arguments),G.set(this,t,a),r=n(this,t),this[t](),a!==(i=G.get(this,t))||r?G.set(this,t,!1):i={},a!==i)return e.stopImmediatePropagation(),e.preventDefault(),i&&i.value}else a.length&&(G.set(this,t,{value:k.event.trigger(k.extend(a[0],k.Event.prototype),a.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===G.get(e,t)&&k.event.add(e,t,Me)}k.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,h,d,p,m,g=G.get(e);if(K(e))for(n.handler&&(n=(o=n).handler,i=o.selector),i&&k.find.matchesSelector(ie,i),n.guid||(n.guid=k.guid++),(u=g.events)||(u=g.events=Object.create(null)),(a=g.handle)||(a=g.handle=function(t){return k.event.triggered!==t.type?k.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(P)||[""]).length;l--;)d=m=(s=ke.exec(t[l])||[])[1],p=(s[2]||"").split(".").sort(),d&&(f=k.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=k.event.special[d]||{},c=k.extend({type:d,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&k.expr.match.needsContext.test(i),namespace:p.join(".")},o),(h=u[d])||((h=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,p,a)||e.addEventListener&&e.addEventListener(d,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?h.splice(h.delegateCount++,0,c):h.push(c),k.event.global[d]=!0)},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,h,d,p,m,g=G.hasData(e)&&G.get(e);if(g&&(u=g.events)){for(l=(t=(t||"").match(P)||[""]).length;l--;)if(d=m=(s=ke.exec(t[l])||[])[1],p=(s[2]||"").split(".").sort(),d){for(f=k.event.special[d]||{},h=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=h.length;o--;)c=h[o],!i&&m!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(h.splice(o,1),c.selector&&h.delegateCount--,f.remove&&f.remove.call(e,c));a&&!h.length&&(f.teardown&&!1!==f.teardown.call(e,p,g.handle)||k.removeEvent(e,d,g.handle),delete u[d])}else for(d in u)k.event.remove(e,d+t[l],n,r,!0);k.isEmptyObject(u)&&G.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=k.event.fix(e),l=(G.get(this,"events")||Object.create(null))[u.type]||[],c=k.event.special[u.type]||{};for(s[0]=u,t=1;t<arguments.length;t++)s[t]=arguments[t];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){for(a=k.event.handlers.call(this,u,l),t=0;(i=a[t++])&&!u.isPropagationStopped();)for(u.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!u.isImmediatePropagationStopped();)u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((k.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&e.button>=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?k(i,this).index(l)>-1:k.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(e,t){Object.defineProperty(k.Event.prototype,e,{enumerable:!0,configurable:!0,get:m(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 pe.test(t.type)&&t.click&&C(t,"input")&&De(t,"click",Me),!1},trigger:function(e){var t=this||e;return pe.test(t.type)&&t.click&&C(t,"input")&&De(t,"click"),!0},_default:function(e){var t=e.target;return pe.test(t.type)&&t.click&&C(t,"input")&&G.get(t,"click")||C(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?Me:_e,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}).prototype={constructor:k.Event,isDefaultPrevented:_e,isPropagationStopped:_e,isImmediatePropagationStopped:_e,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Me,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Me,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Me,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){k.event.special[e]={setup:function(){return De(this,e,Se),!1},trigger:function(){return De(this,e),!0},_default:function(){return!0},delegateType: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,r=this,i=e.relatedTarget,o=e.handleObj;return i&&(i===r||k.contains(r,i))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}})),k.fn.extend({on:function(e,t,n,r){return qe(this,e,t,n,r)},one:function(e,t,n,r){return qe(this,e,t,n,r,1)},off:function(e,t,n){var i,o;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"===r(e)){for(o in e)this.off(o,t,e[o]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=_e),this.each((function(){k.event.remove(this,e,n,t)}))}});var Ce=/<script|<style|<link/i,Ee=/checked\s*(?:[^=]|=\s*.checked.)/i,Ae=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Te(e,t){return C(e,"table")&&C(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function Ne(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Re(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(G.hasData(e)&&(s=G.get(e).events))for(i in G.remove(t,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)k.event.add(t,i,s[i][n]);J.hasData(e)&&(o=J.access(e),a=k.extend({},o),J.set(t,a))}}function Ie(e,t){var n=t.nodeName.toLowerCase();"input"===n&&pe.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function Pe(e,t,n,r){t=a(t);var i,o,s,u,l,c,f=0,h=e.length,d=h-1,g=t[0],y=m(g);if(y||h>1&&"string"==typeof g&&!p.checkClone&&Ee.test(g))return e.each((function(i){var o=e.eq(i);y&&(t[0]=g.call(this,i,o.html())),Pe(o,t,n,r)}));if(h&&(o=(i=we(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(u=(s=k.map(ve(i,"script"),Ne)).length;f<h;f++)l=i,f!==d&&(l=k.clone(l,!0,!0),u&&k.merge(s,ve(l,"script"))),n.call(e[f],l,f);if(u)for(c=s[s.length-1].ownerDocument,k.map(s,Re),f=0;f<u;f++)l=s[f],ge.test(l.type||"")&&!G.access(l,"globalEval")&&k.contains(c,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?k._evalUrl&&!l.noModule&&k._evalUrl(l.src,{nonce:l.nonce||l.getAttribute("nonce")},c):b(l.textContent.replace(Ae,""),l,c))}return e}function Le(e,t,n){for(var r,i=t?k.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||k.cleanData(ve(r)),r.parentNode&&(n&&oe(r)&&be(ve(r,"script")),r.parentNode.removeChild(r));return e}k.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),u=oe(e);if(!(p.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(a=ve(s),r=0,i=(o=ve(e)).length;r<i;r++)Ie(o[r],a[r]);if(t)if(n)for(o=o||ve(e),a=a||ve(s),r=0,i=o.length;r<i;r++)Oe(o[r],a[r]);else Oe(e,s);return(a=ve(s,"script")).length>0&&be(a,!u&&ve(e,"script")),s},cleanData:function(e){for(var t,n,r,i=k.event.special,o=0;void 0!==(n=e[o]);o++)if(K(n)){if(t=n[G.expando]){if(t.events)for(r in t.events)i[r]?k.event.remove(n,r):k.removeEvent(n,r,t.handle);n[G.expando]=void 0}n[J.expando]&&(n[J.expando]=void 0)}}}),k.fn.extend({detach:function(e){return Le(this,e,!0)},remove:function(e){return Le(this,e)},text:function(e){return V(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 Pe(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Te(this,e).appendChild(e)}))},prepend:function(){return Pe(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Te(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return Pe(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return Pe(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(ve(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 V(this,(function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ce.test(e)&&!ye[(me.exec(e)||["",""])[1].toLowerCase()]){e=k.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(k.cleanData(ve(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(){var e=[];return Pe(this,arguments,(function(t){var n=this.parentNode;k.inArray(this,e)<0&&(k.cleanData(ve(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,r=[],i=k(e),o=i.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),k(i[a])[t](n),s.apply(r,n.get());return this.pushStack(r)}}));var je=new RegExp("^("+te+")(?!px)[a-z%]+$","i"),ze=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},Fe=function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r},He=new RegExp(re.join("|"),"i");function Be(e,t,n){var r,i,o,a,s=e.style;return(n=n||ze(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||oe(e)||(a=k.style(e,t)),!p.pixelBoxStyles()&&je.test(a)&&He.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function Ve(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function t(){if(c){l.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",c.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",ie.appendChild(l).appendChild(c);var t=e.getComputedStyle(c);r="1%"!==t.top,u=12===n(t.marginLeft),c.style.right="60%",a=36===n(t.right),i=36===n(t.width),c.style.position="absolute",o=12===n(c.offsetWidth/3),ie.removeChild(l),c=null}}function n(e){return Math.round(parseFloat(e))}var r,i,o,a,s,u,l=y.createElement("div"),c=y.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",p.clearCloneStyle="content-box"===c.style.backgroundClip,k.extend(p,{boxSizingReliable:function(){return t(),i},pixelBoxStyles:function(){return t(),a},pixelPosition:function(){return t(),r},reliableMarginLeft:function(){return t(),u},scrollboxSize:function(){return t(),o},reliableTrDimensions:function(){var t,n,r,i;return null==s&&(t=y.createElement("table"),n=y.createElement("tr"),r=y.createElement("div"),t.style.cssText="position:absolute;left:-11111px;border-collapse:separate",n.style.cssText="border:1px solid",n.style.height="1px",r.style.height="9px",r.style.display="block",ie.appendChild(t).appendChild(n).appendChild(r),i=e.getComputedStyle(n),s=parseInt(i.height,10)+parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10)===n.offsetHeight,ie.removeChild(t)),s}}))}();var We=["Webkit","Moz","ms"],Ue=y.createElement("div").style,$e={};function Ye(e){var t=k.cssProps[e]||$e[e];return t||(e in Ue?e:$e[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=We.length;n--;)if((e=We[n]+t)in Ue)return e}(e)||e)}var Ke=/^(none|table(?!-c[ea]).+)/,Xe=/^--/,Ge={position:"absolute",visibility:"hidden",display:"block"},Je={letterSpacing:"0",fontWeight:"400"};function Ze(e,t,n){var r=ne.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Qe(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=k.css(e,n+re[a],!0,i)),r?("content"===n&&(u-=k.css(e,"padding"+re[a],!0,i)),"margin"!==n&&(u-=k.css(e,"border"+re[a]+"Width",!0,i))):(u+=k.css(e,"padding"+re[a],!0,i),"padding"!==n?u+=k.css(e,"border"+re[a]+"Width",!0,i):s+=k.css(e,"border"+re[a]+"Width",!0,i));return!r&&o>=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function et(e,t,n){var r=ze(e),i=(!p.boxSizingReliable()||n)&&"border-box"===k.css(e,"boxSizing",!1,r),o=i,a=Be(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(je.test(a)){if(!n)return a;a="auto"}return(!p.boxSizingReliable()&&i||!p.reliableTrDimensions()&&C(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===k.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===k.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+Qe(e,t,n||(i?"border":"content"),o,r,a)+"px"}function tt(e,t,n,r,i){return new tt.prototype.init(e,t,n,r,i)}k.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Be(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!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,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,u=Y(t),l=Xe.test(t),c=e.style;if(l||(t=Ye(u)),s=k.cssHooks[t]||k.cssHooks[u],void 0===n)return s&&"get"in s&&void 0!==(o=s.get(e,!1,i))?o:c[t];"string"===(a=r(n))&&(o=ne.exec(n))&&o[1]&&(n=ue(e,t,o),a="number"),null!=n&&n==n&&("number"!==a||l||(n+=o&&o[3]||(k.cssNumber[u]?"":"px")),p.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,r){var i,o,a,s=Y(t);return Xe.test(t)||(t=Ye(s)),(a=k.cssHooks[t]||k.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Be(e,t,r)),"normal"===i&&t in Je&&(i=Je[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),k.each(["height","width"],(function(e,t){k.cssHooks[t]={get:function(e,n,r){if(n)return!Ke.test(k.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?et(e,t,r):Fe(e,Ge,(function(){return et(e,t,r)}))},set:function(e,n,r){var i,o=ze(e),a=!p.scrollboxSize()&&"absolute"===o.position,s=(a||r)&&"border-box"===k.css(e,"boxSizing",!1,o),u=r?Qe(e,t,r,s,o):0;return s&&a&&(u-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-Qe(e,t,"border",!1,o)-.5)),u&&(i=ne.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=k.css(e,t)),Ze(0,n,u)}}})),k.cssHooks.marginLeft=Ve(p.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(Be(e,"marginLeft"))||e.getBoundingClientRect().left-Fe(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 r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+re[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(k.cssHooks[e+t].set=Ze)})),k.fn.extend({css:function(e,t){return V(this,(function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=ze(e),i=t.length;a<i;a++)o[t[a]]=k.css(e,t[a],!1,r);return o}return void 0!==n?k.style(e,t,n):k.css(e,t)}),e,t,arguments.length>1)}}),k.Tween=tt,tt.prototype={constructor:tt,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||k.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(k.cssNumber[n]?"":"px")},cur:function(){var e=tt.propHooks[this.prop];return e&&e.get?e.get(this):tt.propHooks._default.get(this)},run:function(e){var t,n=tt.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):tt.propHooks._default.set(this),this}},tt.prototype.init.prototype=tt.prototype,tt.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[Ye(e.prop)]?e.elem[e.prop]=e.now:k.style(e.elem,e.prop,e.now+e.unit)}}},tt.propHooks.scrollTop=tt.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=tt.prototype.init).step={};var nt,rt,it=/^(?:toggle|show|hide)$/,ot=/queueHooks$/;function at(){rt&&(!1===y.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(at):e.setTimeout(at,k.fx.interval),k.fx.tick())}function st(){return e.setTimeout((function(){nt=void 0})),nt=Date.now()}function ut(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=re[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function lt(e,t,n){for(var r,i=(ct.tweeners[t]||[]).concat(ct.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function ct(e,t,n){var r,i,o=0,a=ct.prefilters.length,s=k.Deferred().always((function(){delete u.elem})),u=function(){if(i)return!1;for(var t=nt||st(),n=Math.max(0,l.startTime+l.duration-t),r=1-(n/l.duration||0),o=0,a=l.tweens.length;o<a;o++)l.tweens[o].run(r);return s.notifyWith(e,[l,r,n]),r<1&&a?n:(a||s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:k.extend({},t),opts:k.extend(!0,{specialEasing:{},easing:k.easing._default},n),originalProperties:t,originalOptions:n,startTime:nt||st(),duration:n.duration,tweens:[],createTween:function(t,n){var r=k.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)l.tweens[n].run(1);return t?(s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l,t])):s.rejectWith(e,[l,t]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=Y(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=k.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);o<a;o++)if(r=ct.prefilters[o].call(l,e,c,l.opts))return m(r.stop)&&(k._queueHooks(l.elem,l.opts.queue).stop=r.stop.bind(r)),r;return k.map(c,lt,l),m(l.opts.start)&&l.opts.start.call(e,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),k.fx.timer(k.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l}k.Animation=k.extend(ct,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return ue(n.elem,e,ne.exec(t),n),n}]},tweener:function(e,t){m(e)?(t=e,e=["*"]):e=e.match(P);for(var n,r=0,i=e.length;r<i;r++)n=e[r],ct.tweeners[n]=ct.tweeners[n]||[],ct.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,h=this,d={},p=e.style,m=e.nodeType&&se(e),g=G.get(e,"fxshow");for(r in n.queue||(null==(a=k._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,h.always((function(){h.always((function(){a.unqueued--,k.queue(e,"fx").length||a.empty.fire()}))}))),t)if(i=t[r],it.test(i)){if(delete t[r],o=o||"toggle"===i,i===(m?"hide":"show")){if("show"!==i||!g||void 0===g[r])continue;m=!0}d[r]=g&&g[r]||k.style(e,r)}if((u=!k.isEmptyObject(t))||!k.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],null==(l=g&&g.display)&&(l=G.get(e,"display")),"none"===(c=k.css(e,"display"))&&(l?c=l:(fe([e],!0),l=e.style.display||l,c=k.css(e,"display"),fe([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===k.css(e,"float")&&(u||(h.done((function(){p.display=l})),null==l&&(c=p.display,l="none"===c?"":c)),p.display="inline-block")),n.overflow&&(p.overflow="hidden",h.always((function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}))),u=!1,d)u||(g?"hidden"in g&&(m=g.hidden):g=G.access(e,"fxshow",{display:l}),o&&(g.hidden=!m),m&&fe([e],!0),h.done((function(){for(r in m||fe([e]),G.remove(e,"fxshow"),d)k.style(e,r,d[r])}))),u=lt(m?g[r]:0,r,h),r in g||(g[r]=u.start,m&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?ct.prefilters.unshift(e):ct.prefilters.push(e)}}),k.speed=function(e,t,n){var i=e&&"object"===r(e)?k.extend({},e):{complete:n||!n&&t||m(e)&&e,duration:e,easing:n&&t||t&&!m(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(){m(i.old)&&i.old.call(this),i.queue&&k.dequeue(this,i.queue)},i},k.fn.extend({fadeTo:function(e,t,n,r){return this.filter(se).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=k.isEmptyObject(e),o=k.speed(t,n,r),a=function(){var t=ct(this,k.extend({},e),o);(i||G.get(this,"finish"))&&t.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=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,i=null!=e&&e+"queueHooks",o=k.timers,a=G.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&ot.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||k.dequeue(this,e)}))},finish:function(e){return!1!==e&&(e=e||"fx"),this.each((function(){var t,n=G.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=k.timers,a=r?r.length:0;for(n.finish=!0,k.queue(this,e,[]),i&&i.stop&&i.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<a;t++)r[t]&&r[t].finish&&r[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,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ut(t,!0),e,r,i)}})),k.each({slideDown:ut("show"),slideUp:ut("hide"),slideToggle:ut("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(e,t){k.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}})),k.timers=[],k.fx.tick=function(){var e,t=0,n=k.timers;for(nt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||k.fx.stop(),nt=void 0},k.fx.timer=function(e){k.timers.push(e),k.fx.start()},k.fx.interval=13,k.fx.start=function(){rt||(rt=!0,at())},k.fx.stop=function(){rt=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,r){var i=e.setTimeout(n,t);r.stop=function(){e.clearTimeout(i)}}))},function(){var e=y.createElement("input"),t=y.createElement("select").appendChild(y.createElement("option"));e.type="checkbox",p.checkOn=""!==e.value,p.optSelected=t.selected,(e=y.createElement("input")).value="t",e.type="radio",p.radioValue="t"===e.value}();var ft,ht=k.expr.attrHandle;k.fn.extend({attr:function(e,t){return V(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 r,i,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)||(i=k.attrHooks[t.toLowerCase()]||(k.expr.match.bool.test(t)?ft:void 0)),void 0!==n?null===n?void k.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=k.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!p.radioValue&&"radio"===t&&C(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(P);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),ft={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=ht[t]||k.find.attr;ht[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=ht[a],ht[a]=i,i=null!=n(e,t,r)?a:null,ht[a]=o),i}}));var dt=/^(?:input|select|textarea|button)$/i,pt=/^(?:a|area)$/i;function mt(e){return(e.match(P)||[]).join(" ")}function gt(e){return e.getAttribute&&e.getAttribute("class")||""}function yt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(P)||[]}k.fn.extend({prop:function(e,t){return V(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 r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&k.isXMLDoc(e)||(t=k.propFix[t]||t,i=k.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=k.find.attr(e,"tabindex");return t?parseInt(t,10):dt.test(e.nodeName)||pt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),p.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,r,i,o,a,s,u=0;if(m(e))return this.each((function(t){k(this).addClass(e.call(this,t,gt(this)))}));if((t=yt(e)).length)for(;n=this[u++];)if(i=gt(n),r=1===n.nodeType&&" "+mt(i)+" "){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=mt(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(m(e))return this.each((function(t){k(this).removeClass(e.call(this,t,gt(this)))}));if(!arguments.length)return this.attr("class","");if((t=yt(e)).length)for(;n=this[u++];)if(i=gt(n),r=1===n.nodeType&&" "+mt(i)+" "){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");i!==(s=mt(r))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=r(e),i="string"===n||Array.isArray(e);return"boolean"==typeof t&&i?t?this.addClass(e):this.removeClass(e):m(e)?this.each((function(n){k(this).toggleClass(e.call(this,n,gt(this),t),t)})):this.each((function(){var t,r,o,a;if(i)for(r=0,o=k(this),a=yt(e);t=a[r++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&"boolean"!==n||((t=gt(this))&&G.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":G.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+mt(gt(n))+" ").indexOf(t)>-1)return!0;return!1}});var vt=/\r/g;k.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=m(e),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,k(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=k.map(i,(function(e){return null==e?"":e+""}))),(t=k.valHooks[this.type]||k.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))}))):i?(t=k.valHooks[i.type]||k.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(vt,""):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,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!C(n.parentNode,"optgroup"))){if(t=k(n).val(),a)return t;s.push(t)}return s},set:function(e,t){for(var n,r,i=e.options,o=k.makeArray(t),a=i.length;a--;)((r=i[a]).selected=k.inArray(k.valHooks.option.get(r),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}},p.checkOn||(k.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})})),p.focusin="onfocusin"in e;var bt=/^(?:focusinfocus|focusoutblur)$/,xt=function(e){e.stopPropagation()};k.extend(k.event,{trigger:function(t,n,i,o){var a,s,u,l,c,h,d,p,v=[i||y],b=f.call(t,"type")?t.type:t,x=f.call(t,"namespace")?t.namespace.split("."):[];if(s=p=u=i=i||y,3!==i.nodeType&&8!==i.nodeType&&!bt.test(b+k.event.triggered)&&(b.indexOf(".")>-1&&(x=b.split("."),b=x.shift(),x.sort()),c=b.indexOf(":")<0&&"on"+b,(t=t[k.expando]?t:new k.Event(b,"object"===r(t)&&t)).isTrigger=o?2:3,t.namespace=x.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+x.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:k.makeArray(n,[t]),d=k.event.special[b]||{},o||!d.trigger||!1!==d.trigger.apply(i,n))){if(!o&&!d.noBubble&&!g(i)){for(l=d.delegateType||b,bt.test(l+b)||(s=s.parentNode);s;s=s.parentNode)v.push(s),u=s;u===(i.ownerDocument||y)&&v.push(u.defaultView||u.parentWindow||e)}for(a=0;(s=v[a++])&&!t.isPropagationStopped();)p=s,t.type=a>1?l:d.bindType||b,(h=(G.get(s,"events")||Object.create(null))[t.type]&&G.get(s,"handle"))&&h.apply(s,n),(h=c&&s[c])&&h.apply&&K(s)&&(t.result=h.apply(s,n),!1===t.result&&t.preventDefault());return t.type=b,o||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(v.pop(),n)||!K(i)||c&&m(i[b])&&!g(i)&&((u=i[c])&&(i[c]=null),k.event.triggered=b,t.isPropagationStopped()&&p.addEventListener(b,xt),i[b](),t.isPropagationStopped()&&p.removeEventListener(b,xt),k.event.triggered=void 0,u&&(i[c]=u)),t.result}},simulate:function(e,t,n){var r=k.extend(new k.Event,n,{type:e,isSimulated:!0});k.event.trigger(r,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)}}),p.focusin||k.each({focus:"focusin",blur:"focusout"},(function(e,t){var n=function(e){k.event.simulate(t,e.target,k.event.fix(e))};k.event.special[t]={setup:function(){var r=this.ownerDocument||this.document||this,i=G.access(r,t);i||r.addEventListener(e,n,!0),G.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,i=G.access(r,t)-1;i?G.access(r,t,i):(r.removeEventListener(e,n,!0),G.remove(r,t))}}}));var wt=e.location,kt={guid:Date.now()},Mt=/\?/;k.parseXML=function(t){var n,r;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){}return r=n&&n.getElementsByTagName("parsererror")[0],n&&!r||k.error("Invalid XML: "+(r?k.map(r.childNodes,(function(e){return e.textContent})).join("\n"):t)),n};var _t=/\[\]$/,St=/\r?\n/g,qt=/^(?:submit|button|image|reset|file)$/i,Dt=/^(?:input|select|textarea|keygen)/i;function Ct(e,t,n,i){var o;if(Array.isArray(t))k.each(t,(function(t,o){n||_t.test(e)?i(e,o):Ct(e+"["+("object"===r(o)&&null!=o?t:"")+"]",o,n,i)}));else if(n||"object"!==x(t))i(e,t);else for(o in t)Ct(e+"["+o+"]",t[o],n,i)}k.param=function(e,t){var n,r=[],i=function(e,t){var n=m(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!k.isPlainObject(e))k.each(e,(function(){i(this.name,this.value)}));else for(n in e)Ct(n,e[n],t,i);return r.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")&&Dt.test(this.nodeName)&&!qt.test(e)&&(this.checked||!pe.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(St,"\r\n")}})):{name:t.name,value:n.replace(St,"\r\n")}})).get()}});var Et=/%20/g,At=/#.*$/,Tt=/([?&])_=[^&]*/,Nt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Rt=/^(?:GET|HEAD)$/,Ot=/^\/\//,It={},Pt={},Lt="*/".concat("*"),jt=y.createElement("a");function zt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(P)||[];if(m(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Ft(e,t,n,r){var i={},o=e===Pt;function a(s){var u;return i[s]=!0,k.each(e[s]||[],(function(e,s){var l=s(t,n,r);return"string"!=typeof l||o||i[l]?o?!(u=l):void 0:(t.dataTypes.unshift(l),a(l),!1)})),u}return a(t.dataTypes[0])||!i["*"]&&a("*")}function Ht(e,t){var n,r,i=k.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&k.extend(!0,e,r),e}jt.href=wt.href,k.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:wt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(wt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Lt,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?Ht(Ht(e,k.ajaxSettings),t):Ht(k.ajaxSettings,e)},ajaxPrefilter:zt(It),ajaxTransport:zt(Pt),ajax:function(t,n){"object"===r(t)&&(n=t,t=void 0);var i,o,a,s,u,l,c,f,h,d,p=k.ajaxSetup({},n=n||{}),m=p.context||p,g=p.context&&(m.nodeType||m.jquery)?k(m):k.event,v=k.Deferred(),b=k.Callbacks("once memory"),x=p.statusCode||{},w={},M={},_="canceled",S={readyState:0,getResponseHeader:function(e){var t;if(c){if(!s)for(s={};t=Nt.exec(a);)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?a:null},setRequestHeader:function(e,t){return null==c&&(e=M[e.toLowerCase()]=M[e.toLowerCase()]||e,w[e]=t),this},overrideMimeType:function(e){return null==c&&(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)S.always(e[S.status]);else for(t in e)x[t]=[x[t],e[t]];return this},abort:function(e){var t=e||_;return i&&i.abort(t),q(0,t),this}};if(v.promise(S),p.url=((t||p.url||wt.href)+"").replace(Ot,wt.protocol+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(P)||[""],null==p.crossDomain){l=y.createElement("a");try{l.href=p.url,l.href=l.href,p.crossDomain=jt.protocol+"//"+jt.host!=l.protocol+"//"+l.host}catch(e){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=k.param(p.data,p.traditional)),Ft(It,p,n,S),c)return S;for(h in(f=k.event&&p.global)&&0==k.active++&&k.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Rt.test(p.type),o=p.url.replace(At,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Et,"+")):(d=p.url.slice(o.length),p.data&&(p.processData||"string"==typeof p.data)&&(o+=(Mt.test(o)?"&":"?")+p.data,delete p.data),!1===p.cache&&(o=o.replace(Tt,"$1"),d=(Mt.test(o)?"&":"?")+"_="+kt.guid+++d),p.url=o+d),p.ifModified&&(k.lastModified[o]&&S.setRequestHeader("If-Modified-Since",k.lastModified[o]),k.etag[o]&&S.setRequestHeader("If-None-Match",k.etag[o])),(p.data&&p.hasContent&&!1!==p.contentType||n.contentType)&&S.setRequestHeader("Content-Type",p.contentType),S.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Lt+"; q=0.01":""):p.accepts["*"]),p.headers)S.setRequestHeader(h,p.headers[h]);if(p.beforeSend&&(!1===p.beforeSend.call(m,S,p)||c))return S.abort();if(_="abort",b.add(p.complete),S.done(p.success),S.fail(p.error),i=Ft(Pt,p,n,S)){if(S.readyState=1,f&&g.trigger("ajaxSend",[S,p]),c)return S;p.async&&p.timeout>0&&(u=e.setTimeout((function(){S.abort("timeout")}),p.timeout));try{c=!1,i.send(w,q)}catch(e){if(c)throw e;q(-1,e)}}else q(-1,"No Transport");function q(t,n,r,s){var l,h,d,y,w,M=n;c||(c=!0,u&&e.clearTimeout(u),i=void 0,a=s||"",S.readyState=t>0?4:0,l=t>=200&&t<300||304===t,r&&(y=function(e,t,n){for(var r,i,o,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(p,S,r)),!l&&k.inArray("script",p.dataTypes)>-1&&k.inArray("json",p.dataTypes)<0&&(p.converters["text script"]=function(){}),y=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(p,y,S,l),l?(p.ifModified&&((w=S.getResponseHeader("Last-Modified"))&&(k.lastModified[o]=w),(w=S.getResponseHeader("etag"))&&(k.etag[o]=w)),204===t||"HEAD"===p.type?M="nocontent":304===t?M="notmodified":(M=y.state,h=y.data,l=!(d=y.error))):(d=M,!t&&M||(M="error",t<0&&(t=0))),S.status=t,S.statusText=(n||M)+"",l?v.resolveWith(m,[h,M,S]):v.rejectWith(m,[S,M,d]),S.statusCode(x),x=void 0,f&&g.trigger(l?"ajaxSuccess":"ajaxError",[S,p,l?h:d]),b.fireWith(m,[S,M]),f&&(g.trigger("ajaxComplete",[S,p]),--k.active||k.event.trigger("ajaxStop")))}return S},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,r,i){return m(n)&&(i=i||r,r=n,n=void 0),k.ajax(k.extend({url:e,type:t,dataType:i,data:n,success:r},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]&&(m(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 m(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=m(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 Bt={0:200,1223:204},Vt=k.ajaxSettings.xhr();p.cors=!!Vt&&"withCredentials"in Vt,p.ajax=Vt=!!Vt,k.ajaxTransport((function(t){var n,r;if(p.cors||Vt&&!t.crossDomain)return{send:function(i,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];for(a in t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(a,i[a]);n=function(e){return function(){n&&(n=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Bt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),r=s.onerror=s.ontimeout=n("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&e.setTimeout((function(){n&&r()}))},n=n("abort");try{s.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(r,i){t=k("<script>").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),y.head.appendChild(t[0])},abort:function(){n&&n()}}}));var Wt,Ut=[],$t=/(=)\?(?=&|$)|\?\?/;k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Ut.pop()||k.expando+"_"+kt.guid++;return this[e]=!0,e}}),k.ajaxPrefilter("json jsonp",(function(t,n,r){var i,o,a,s=!1!==t.jsonp&&($t.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&$t.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=m(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace($t,"$1"+i):!1!==t.jsonp&&(t.url+=(Mt.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||k.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){a=arguments},r.always((function(){void 0===o?k(e).removeProp(i):e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,Ut.push(i)),a&&m(o)&&o(a[0]),a=o=void 0})),"script"})),p.createHTMLDocument=((Wt=y.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Wt.childNodes.length),k.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(p.createHTMLDocument?((r=(t=y.implementation.createHTMLDocument("")).createElement("base")).href=y.location.href,t.head.appendChild(r)):t=y),o=!n&&[],(i=E.exec(e))?[t.createElement(i[1])]:(i=we([e],t,o),o&&o.length&&k(o).remove(),k.merge([],i.childNodes)));var r,i,o},k.fn.load=function(e,t,n){var i,o,a,s=this,u=e.indexOf(" ");return u>-1&&(i=mt(e.slice(u)),e=e.slice(0,u)),m(t)?(n=t,t=void 0):t&&"object"===r(t)&&(o="POST"),s.length>0&&k.ajax({url:e,type:o||"GET",dataType:"html",data:t}).done((function(e){a=arguments,s.html(i?k("<div>").append(k.parseHTML(e)).find(i):e)})).always(n&&function(e,t){s.each((function(){n.apply(this,a||[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 r,i,o,a,s,u,l=k.css(e,"position"),c=k(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=k.css(e,"top"),u=k.css(e,"left"),("absolute"===l||"fixed"===l)&&(o+u).indexOf("auto")>-1?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,k.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},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,r=this[0];return r?r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.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,r=this[0],i={top:0,left:0};if("fixed"===k.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===k.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=k(e).offset()).top+=k.css(e,"borderTopWidth",!0),i.left+=k.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-k.css(r,"marginTop",!0),left:t.left-i.left-k.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===k.css(e,"position");)e=e.offsetParent;return e||ie}))}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var n="pageYOffset"===t;k.fn[e]=function(r){return V(this,(function(e,r,i){var o;if(g(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i}),e,r,arguments.length)}})),k.each(["top","left"],(function(e,t){k.cssHooks[t]=Ve(p.pixelPosition,(function(e,n){if(n)return n=Be(e,t),je.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,r){k.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return V(this,(function(t,n,i){var o;return g(t)?0===r.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===i?k.css(t,n,s):k.style(t,n,i,s)}),t,a?i:void 0,a)}}))})),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,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).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 Yt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;k.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),m(e))return r=o.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(o.call(arguments)))}).guid=e.guid=e.guid||k.guid++,i},k.holdReady=function(e){e?k.readyWait++:k.ready(!0)},k.isArray=Array.isArray,k.parseJSON=JSON.parse,k.nodeName=C,k.isFunction=m,k.isWindow=g,k.camelCase=Y,k.type=x,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(Yt,"")};var Kt=e.jQuery,Xt=e.$;return k.noConflict=function(t){return e.$===k&&(e.$=Xt),t&&e.jQuery===k&&(e.jQuery=Kt),k},void 0===t&&(e.jQuery=e.$=k),k}))}(g);var y=g.exports,v={"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 b={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},x=/([astvzqmhlc])([^astvzqmhlc]*)/gi,w=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;var k=function(e){var t=[],n=String(e).trim();return"M"!==n[0]&&"m"!==n[0]||n.replace(x,(function(e,n,r){var i=n.toLowerCase(),o=function(e){var t=e.match(w);return t?t.map(Number):[]}(r),a=n;if("m"===i&&o.length>2&&(t.push([a].concat(o.splice(0,2))),i="l",a="m"===a?"l":"L"),o.length<b[i])return"";for(t.push([a].concat(o.splice(0,b[i])));o.length>=b[i]&&o.length&&b[i];)t.push([a].concat(o.splice(0,b[i])));return""})),t};function M(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _(e){return function(e){if(Array.isArray(e))return S(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)return;if("string"==typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return S(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var q=k;function D(e,t){var n=e.x*Math.cos(t)-e.y*Math.sin(t),r=e.y*Math.cos(t)+e.x*Math.sin(t);e.x=n,e.y=r}function C(e,t){e.x*=t,e.y*=t}var E=k,A=function(e){if(void 0!==e&&e.CanvasRenderingContext2D&&(!e.Path2D||!function(e){var t=e.document.createElement("canvas").getContext("2d"),n=new e.Path2D("M0 0 L1 1");return t.strokeStyle="red",t.lineWidth=1,t.stroke(n),255===t.getImageData(0,0,1,1).data[0]}(e))){var t=function(){function e(t){var n;(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.segments=[],t&&t instanceof e)?(n=this.segments).push.apply(n,_(t.segments)):t&&(this.segments=q(t))}var t,n,r;return t=e,(n=[{key:"addPath",value:function(t){var n;t&&t instanceof e&&(n=this.segments).push.apply(n,_(t.segments))}},{key:"moveTo",value:function(e,t){this.segments.push(["M",e,t])}},{key:"lineTo",value:function(e,t){this.segments.push(["L",e,t])}},{key:"arc",value:function(e,t,n,r,i,o){this.segments.push(["AC",e,t,n,r,i,!!o])}},{key:"arcTo",value:function(e,t,n,r,i){this.segments.push(["AT",e,t,n,r,i])}},{key:"ellipse",value:function(e,t,n,r,i,o,a,s){this.segments.push(["E",e,t,n,r,i,o,a,!!s])}},{key:"closePath",value:function(){this.segments.push(["Z"])}},{key:"bezierCurveTo",value:function(e,t,n,r,i,o){this.segments.push(["C",e,t,n,r,i,o])}},{key:"quadraticCurveTo",value:function(e,t,n,r){this.segments.push(["Q",e,t,n,r])}},{key:"rect",value:function(e,t,n,r){this.segments.push(["R",e,t,n,r])}}])&&M(t.prototype,n),r&&M(t,r),e}(),n=e.CanvasRenderingContext2D.prototype.fill,r=e.CanvasRenderingContext2D.prototype.stroke;e.CanvasRenderingContext2D.prototype.fill=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var i="nonzero";if(0===t.length||1===t.length&&"string"==typeof t[0])n.apply(this,t);else{2===arguments.length&&(i=t[1]);var a=t[0];o(this,a.segments),n.call(this,i)}},e.CanvasRenderingContext2D.prototype.stroke=function(e){e?(o(this,e.segments),r.call(this)):r.call(this)};var i=e.CanvasRenderingContext2D.prototype.isPointInPath;e.CanvasRenderingContext2D.prototype.isPointInPath=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if("Path2D"===t[0].constructor.name){var r=t[1],a=t[2],s=t[3]||"nonzero",u=t[0];return o(this,u.segments),i.apply(this,[r,a,s])}return i.apply(this,t)},e.Path2D=t}function o(e,t){var n,r,i,o,a,s,u,l,c,f,h,d,p,m,g,y,v,b,x,w,k,M,_,S,q,E,A,T,N,R={x:0,y:0},O={x:0,y:0};e.beginPath();for(var I=0;I<t.length;++I){var P=t[I];switch("S"!==(w=P[0])&&"s"!==w&&"C"!==w&&"c"!==w&&(M=null,_=null),"T"!==w&&"t"!==w&&"Q"!==w&&"q"!==w&&(S=null,q=null),w){case"m":case"M":"m"===w?(h+=P[1],p+=P[2]):(h=P[1],p=P[2]),"M"!==w&&R||(R={x:h,y:p}),e.moveTo(h,p);break;case"l":h+=P[1],p+=P[2],e.lineTo(h,p);break;case"L":h=P[1],p=P[2],e.lineTo(h,p);break;case"H":h=P[1],e.lineTo(h,p);break;case"h":h+=P[1],e.lineTo(h,p);break;case"V":p=P[1],e.lineTo(h,p);break;case"v":p+=P[1],e.lineTo(h,p);break;case"a":case"A":"a"===w?(h+=P[6],p+=P[7]):(h=P[6],p=P[7]),y=P[1],v=P[2],u=P[3]*Math.PI/180,i=!!P[4],o=!!P[5],a={x:h,y:p},D(s={x:(O.x-a.x)/2,y:(O.y-a.y)/2},-u),(l=s.x*s.x/(y*y)+s.y*s.y/(v*v))>1&&(y*=l=Math.sqrt(l),v*=l),c=y*y*v*v,f=y*y*s.y*s.y+v*v*s.x*s.x,C(k={x:y*s.y/v,y:-v*s.x/y},o!==i?Math.sqrt((c-f)/f)||0:-Math.sqrt((c-f)/f)||0),r=Math.atan2((s.y-k.y)/v,(s.x-k.x)/y),n=Math.atan2(-(s.y+k.y)/v,-(s.x+k.x)/y),D(k,u),A=k,T=(a.x+O.x)/2,N=(a.y+O.y)/2,A.x+=T,A.y+=N,e.save(),e.translate(k.x,k.y),e.rotate(u),e.scale(y,v),e.arc(0,0,1,r,n,!o),e.restore();break;case"C":M=P[3],_=P[4],h=P[5],p=P[6],e.bezierCurveTo(P[1],P[2],M,_,h,p);break;case"c":e.bezierCurveTo(P[1]+h,P[2]+p,P[3]+h,P[4]+p,P[5]+h,P[6]+p),M=P[3]+h,_=P[4]+p,h+=P[5],p+=P[6];break;case"S":null!==M&&null!==_||(M=h,_=p),e.bezierCurveTo(2*h-M,2*p-_,P[1],P[2],P[3],P[4]),M=P[1],_=P[2],h=P[3],p=P[4];break;case"s":null!==M&&null!==_||(M=h,_=p),e.bezierCurveTo(2*h-M,2*p-_,P[1]+h,P[2]+p,P[3]+h,P[4]+p),M=P[1]+h,_=P[2]+p,h+=P[3],p+=P[4];break;case"Q":S=P[1],q=P[2],h=P[3],p=P[4],e.quadraticCurveTo(S,q,h,p);break;case"q":S=P[1]+h,q=P[2]+p,h+=P[3],p+=P[4],e.quadraticCurveTo(S,q,h,p);break;case"T":null!==S&&null!==q||(S=h,q=p),S=2*h-S,q=2*p-q,h=P[1],p=P[2],e.quadraticCurveTo(S,q,h,p);break;case"t":null!==S&&null!==q||(S=h,q=p),S=2*h-S,q=2*p-q,h+=P[1],p+=P[2],e.quadraticCurveTo(S,q,h,p);break;case"z":case"Z":h=R.x,p=R.y,R=void 0,e.closePath();break;case"AC":h=P[1],p=P[2],g=P[3],r=P[4],n=P[5],E=P[6],e.arc(h,p,g,r,n,E);break;case"AT":d=P[1],m=P[2],h=P[3],p=P[4],g=P[5],e.arcTo(d,m,h,p,g);break;case"E":h=P[1],p=P[2],y=P[3],v=P[4],u=P[5],r=P[6],n=P[7],E=P[8],e.save(),e.translate(h,p),e.rotate(u),e.scale(y,v),e.arc(0,0,1,r,n,E),e.restore();break;case"R":h=P[1],p=P[2],b=P[3],x=P[4],R={x:h,y:p},e.rect(h,p,b,x)}O.x=h,O.y=p}}};"undefined"!=typeof window&&A(window);var T={path2dPolyfill:A,parsePath:E},N=Object.prototype.hasOwnProperty,R=Object.prototype.toString,O=Object.defineProperty,I=Object.getOwnPropertyDescriptor,P=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===R.call(e)},L=function(e){if(!e||"[object Object]"!==R.call(e))return!1;var t,n=N.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&N.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||N.call(e,t)},j=function(e,t){O&&"__proto__"===t.name?O(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},z=function(e,t){if("__proto__"===t){if(!N.call(e,t))return;if(I)return I(e,t).value}return e[t]},F=function e(){var t,n,i,o,a,s,u=arguments[0],l=1,c=arguments.length,f=!1;for("boolean"==typeof u&&(f=u,u=arguments[1]||{},l=2),(null==u||"object"!==r(u)&&"function"!=typeof u)&&(u={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)i=z(u,n),u!==(o=z(t,n))&&(f&&o&&(L(o)||(a=P(o)))?(a?(a=!1,s=i&&P(i)?i:[]):s=i&&L(i)?i:{},j(u,{name:n,newValue:e(f,s,o)})):void 0!==o&&j(u,{name:n,newValue:o}));return u},H="1.4.2";function B(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function V(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){K(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(W="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function U(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Y(e,t,n){return t&&$(e.prototype,t),n&&$(e,n),e}function K(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function X(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&J(e,t)}function G(e){return(G=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function J(e,t){return(J=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Z(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function Q(e,t,n){return(Q=Z()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&J(i,n.prototype),i}).apply(null,arguments)}function ee(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function te(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ee(e)}function ne(e){var t=Z();return function(){var n,r=G(e);if(t){var i=G(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return te(this,n)}}function re(e,t,n){return(re="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=G(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function ie(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||ae(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 oe(e){return function(e){if(Array.isArray(e))return se(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||ae(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 ae(e,t){if(e){if("string"==typeof e)return se(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)?se(e,t):void 0}}function se(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ue(e){return!!e.changedTouches}function le(e){return"number"==typeof e&&!isNaN(e)}function ce(e){return"number"!=typeof e||isNaN(e)}function fe(e){for(var t=e.length,n=NaN,r=NaN,i=NaN,o=NaN,a=0;a<t;a++)n=isNaN(n)?e[a].x:Math.min(n,e[a].x),r=isNaN(r)?e[a].x:Math.max(r,e[a].x),i=isNaN(i)?e[a].y:Math.min(i,e[a].y),o=isNaN(o)?e[a].y:Math.max(o,e[a].y);return[n,i,r,o]}function he(e){return[{x:e.x1||0,y:e.y1||0},{x:e.x2||0,y:e.y2||0}]}function de(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 pe(e){var t=ie(fe(e),4),n=t[0],r=t[1];return{x:n,y:r,width:t[2]-n,height:t[3]-r}}function me(e){return{x1:e[0].x,y1:e[0].y,x2:e[1].x,y2:e[1].y}}function ge(e){var t=e||{},n=t.x,r=t.y,i=t.width,o=t.height,a=t.x1,s=t.x2,u=t.y1,l=t.y2,c=t.cx,f=t.cy,h=t.r,d=t.vertices;return le(c)&&le(f)&&le(h)?"circle":le(a)&&le(s)&&le(u)&&le(l)?"line":le(n)&&le(r)&&le(i)&&le(o)?"rect":le(n)&&le(r)?"point":Array.isArray(d)?d.every((function(e){return Array.isArray(e)}))?"geopolygon":"polygon":null}function ye(e,t){return{x:t.x-e,y:t.y-e,width:t.width+e,height:t.height+e}}function ve(e,t){var n=t.types,r=t.logger,i={},o=[];Array.isArray(e)?o.push.apply(o,oe(e)):(r.warn('Deprecated: "data-source" configuration"'),o.push(e)),o.forEach((function(e,t){var o=n(e.type);if(o){var a=e.key;void 0===e.key&&(r.warn("Missing key for dataset. Using index '".concat(t,"' as key.")),a=t);var s=o({key:a,data:e.data,config:e.config});i[a]=s}}));return function(e){return e?i[e]:i[Object.keys(i)[0]]}}var be=Math.PI,xe=2*be,we=1e-6,ke=xe-we;function Me(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function _e(){return new Me}function Se(e){return function(){return e}}Me.prototype=_e.prototype={constructor:Me,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,o){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var o=this._x1,a=this._y1,s=n-e,u=r-t,l=o-e,c=a-t,f=l*l+c*c;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(f>we)if(Math.abs(c*s-u*l)>we&&i){var h=n-o,d=r-a,p=s*s+u*u,m=h*h+d*d,g=Math.sqrt(p),y=Math.sqrt(f),v=i*Math.tan((be-Math.acos((p+f-m)/(2*g*y)))/2),b=v/y,x=v/g;Math.abs(b-1)>we&&(this._+="L"+(e+b*l)+","+(t+b*c)),this._+="A"+i+","+i+",0,0,"+ +(c*h>l*d)+","+(this._x1=e+x*s)+","+(this._y1=t+x*u)}else this._+="L"+(this._x1=e)+","+(this._y1=t);else;},arc:function(e,t,n,r,i,o){e=+e,t=+t,o=!!o;var a=(n=+n)*Math.cos(r),s=n*Math.sin(r),u=e+a,l=t+s,c=1^o,f=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+u+","+l:(Math.abs(this._x1-u)>we||Math.abs(this._y1-l)>we)&&(this._+="L"+u+","+l),n&&(f<0&&(f=f%xe+xe),f>ke?this._+="A"+n+","+n+",0,1,"+c+","+(e-a)+","+(t-s)+"A"+n+","+n+",0,1,"+c+","+(this._x1=u)+","+(this._y1=l):f>we&&(this._+="A"+n+","+n+",0,"+ +(f>=be)+","+c+","+(this._x1=e+n*Math.cos(i))+","+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var qe=Math.abs,De=Math.atan2,Ce=Math.cos,Ee=Math.max,Ae=Math.min,Te=Math.sin,Ne=Math.sqrt,Re=1e-12,Oe=Math.PI,Ie=Oe/2,Pe=2*Oe;function Le(e){return e>1?0:e<-1?Oe:Math.acos(e)}function je(e){return e>=1?Ie:e<=-1?-Ie:Math.asin(e)}function ze(e){return e.innerRadius}function Fe(e){return e.outerRadius}function He(e){return e.startAngle}function Be(e){return e.endAngle}function Ve(e){return e&&e.padAngle}function We(e,t,n,r,i,o,a,s){var u=n-e,l=r-t,c=a-i,f=s-o,h=f*u-c*l;if(!(h*h<Re))return[e+(h=(c*(t-o)-f*(e-i))/h)*u,t+h*l]}function Ue(e,t,n,r,i,o,a){var s=e-n,u=t-r,l=(a?o:-o)/Ne(s*s+u*u),c=l*u,f=-l*s,h=e+c,d=t+f,p=n+c,m=r+f,g=(h+p)/2,y=(d+m)/2,v=p-h,b=m-d,x=v*v+b*b,w=i-o,k=h*m-p*d,M=(b<0?-1:1)*Ne(Ee(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,C=_-g,E=S-y,A=q-g,T=D-y;return C*C+E*E>A*A+T*T&&(_=q,S=D),{cx:_,cy:S,x01:-c,y01:-f,x11:_*(i/w-1),y11:S*(i/w-1)}}function $e(e){this._context=e}function Ye(e){return new $e(e)}function Ke(e){return e[0]}function Xe(e){return e[1]}function Ge(){var e=Ke,t=null,n=Se(0),r=Xe,i=Se(!0),o=null,a=Ye,s=null;function u(u){var l,c,f,h,d,p=u.length,m=!1,g=new Array(p),y=new Array(p);for(null==o&&(s=a(d=_e())),l=0;l<=p;++l){if(!(l<p&&i(h=u[l],l,u))===m)if(m=!m)c=l,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=l-1;f>=c;--f)s.point(g[f],y[f]);s.lineEnd(),s.areaEnd()}m&&(g[l]=+e(h,l,u),y[l]=+n(h,l,u),s.point(t?+t(h,l,u):g[l],r?+r(h,l,u):y[l]))}if(d)return s=null,d+""||null}function l(){return function(){var e=Ke,t=Xe,n=Se(!0),r=null,i=Ye,o=null;function a(a){var s,u,l,c=a.length,f=!1;for(null==r&&(o=i(l=_e())),s=0;s<=c;++s)!(s<c&&n(u=a[s],s,a))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+e(u,s,a),+t(u,s,a));if(l)return o=null,l+""||null}return a.x=function(t){return arguments.length?(e="function"==typeof t?t:Se(+t),a):e},a.y=function(e){return arguments.length?(t="function"==typeof e?e:Se(+e),a):t},a.defined=function(e){return arguments.length?(n="function"==typeof e?e:Se(!!e),a):n},a.curve=function(e){return arguments.length?(i=e,null!=r&&(o=i(r)),a):i},a.context=function(e){return arguments.length?(null==e?r=o=null:o=i(r=e),a):r},a}().defined(i).curve(a).context(o)}return u.x=function(n){return arguments.length?(e="function"==typeof n?n:Se(+n),t=null,u):e},u.x0=function(t){return arguments.length?(e="function"==typeof t?t:Se(+t),u):e},u.x1=function(e){return arguments.length?(t=null==e?null:"function"==typeof e?e:Se(+e),u):t},u.y=function(e){return arguments.length?(n="function"==typeof e?e:Se(+e),r=null,u):n},u.y0=function(e){return arguments.length?(n="function"==typeof e?e:Se(+e),u):n},u.y1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:Se(+e),u):r},u.lineX0=u.lineY0=function(){return l().x(e).y(n)},u.lineY1=function(){return l().x(e).y(r)},u.lineX1=function(){return l().x(t).y(n)},u.defined=function(e){return arguments.length?(i="function"==typeof e?e:Se(!!e),u):i},u.curve=function(e){return arguments.length?(a=e,null!=o&&(s=a(o)),u):a},u.context=function(e){return arguments.length?(null==e?o=s=null:s=a(o=e),u):o},u}function Je(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function Ze(e){return e}$e.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 Qe=Array.prototype.slice;function et(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 tt(e){this._context=e}function nt(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 rt(e,t){this._context=e,this._k=(1-t)/6}tt.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:et(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:et(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},rt.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:nt(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:nt(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 it=function e(t){function n(e){return new rt(e,t)}return n.tension=function(t){return e(+t)},n}(0);function ot(e,t){this._context=e,this._alpha=t}ot.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:!function(e,t,n){var r=e._x1,i=e._y1,o=e._x2,a=e._y2;if(e._l01_a>Re){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,u=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/u,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/u}if(e._l23_a>Re){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,c=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*l+e._x1*e._l23_2a-t*e._l12_2a)/c,a=(a*l+e._y1*e._l23_2a-n*e._l12_2a)/c}e._context.bezierCurveTo(r,i,o,a,e._x2,e._y2)}(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var at=function e(t){function n(e){return t?new ot(e,t):new rt(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function st(e){return e<0?-1:1}function ut(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(st(o)+st(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function lt(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function ct(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function ft(e){this._context=e}function ht(e){this._context=new dt(e)}function dt(e){this._context=e}function pt(e){this._context=e}function mt(e){var t,n,r=e.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/o[t-1],o[t]-=n,a[t]-=n*a[t-1];for(i[r-1]=a[r-1]/o[r-1],t=r-2;t>=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function gt(e,t){this._context=e,this._t=t}function yt(e,t){if((i=e.length)>1)for(var n,r,i,o=1,a=e[t[0]],s=a.length;o<i;++o)for(r=a,a=e[t[o]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function vt(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function bt(e,t){return e[t]}function xt(e){for(var t,n=-1,r=0,i=e.length,o=-1/0;++n<i;)(t=+e[n][1])>o&&(o=t,r=n);return r}function wt(e){for(var t,n=0,r=-1,i=e.length;++r<i;)(t=+e[r][1])&&(n+=t);return n}function kt(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"unspecified",r=arguments.length>2?arguments[2]:void 0,i={},o=e||{get:function(){},has:function(){return!1},default:function(){}};function a(e,t){if(!e||"string"!=typeof e)throw new TypeError("Invalid argument: key must be a non-empty string");return!(e in i)&&(i[e]=t,!0)}function s(e){return i[e]||o.get(e)}function u(e){return!!i[e]||o.has(e)}function l(e){var t=i[e];return delete i[e],t}function c(){return Object.keys(i)}function f(){return Object.keys(i).map((function(e){return i[e]}))}function h(e){return void 0!==e&&(t=e),t}function d(e,i){if(void 0!==i)return a(e,i);var o=s(e);return r&&void 0===o&&r.warn("".concat(e," does not exist in ").concat(n," registry")),o||s(t)}return t=o.default(),d.add=a,d.get=s,d.has=u,d.remove=l,d.getKeys=c,d.getValues=f,d.default=h,d.register=a,d}function Mt(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function _t(e){return(e=Mt(Math.abs(e)))?e[1]:NaN}ft.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:ct(this,this._t0,lt(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,ct(this,lt(this,n=ut(this,e,t)),n);break;default:ct(this,this._t0,n=ut(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(ht.prototype=Object.create(ft.prototype)).point=function(e,t){ft.prototype.point.call(this,t,e)},dt.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}},pt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=mt(e),i=mt(t),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],e[a],t[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},gt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};var St,qt=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Dt(e){if(!(t=qt.exec(e)))throw new Error("invalid format: "+e);var t;return new Ct({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 Ct(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 Et(e,t){var n=Mt(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}Dt.prototype=Ct.prototype,Ct.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 At={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return Et(100*e,t)},r:Et,s:function(e,t){var n=Mt(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(St=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Mt(e,Math.max(0,t+o-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function Tt(e){return e}var Nt,Rt,Ot,It=Array.prototype.map,Pt=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Lt(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?Tt:(t=It.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var i=e.length,o=[],a=0,s=t[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(e.substring(i-=s,i+s)),!((u+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(n)}),i=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",a=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?Tt:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(It.call(e.numerals,String)),u=void 0===e.percent?"%":e.percent+"",l=void 0===e.minus?"-":e.minus+"",c=void 0===e.nan?"NaN":e.nan+"";function f(e){var t=(e=Dt(e)).fill,n=e.align,f=e.sign,h=e.symbol,d=e.zero,p=e.width,m=e.comma,g=e.precision,y=e.trim,v=e.type;"n"===v?(m=!0,v="g"):At[v]||(void 0===g&&(g=12),y=!0,v="g"),(d||"0"===t&&"="===n)&&(d=!0,t="0",n="=");var b="$"===h?i:"#"===h&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",x="$"===h?o:/[%p]/.test(v)?u:"",w=At[v],k=/[defgprs%]/.test(v);function M(e){var i,o,u,h=b,M=x;if("c"===v)M=w(e)+M,e="";else{var _=(e=+e)<0||1/e<0;if(e=isNaN(e)?c:w(Math.abs(e),g),y&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r<n;++r)switch(e[r]){case".":i=t=r;break;case"0":0===i&&(i=r),t=r;break;default:if(!+e[r])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),_&&0==+e&&"+"!==f&&(_=!1),h=(_?"("===f?f:l:"-"===f||"("===f?"":f)+h,M=("s"===v?Pt[8+St/3]:"")+M+(_&&"("===f?")":""),k)for(i=-1,o=e.length;++i<o;)if(48>(u=e.charCodeAt(i))||u>57){M=(46===u?a+e.slice(i+1):e.slice(i))+M,e=e.slice(0,i);break}}m&&!d&&(e=r(e,1/0));var S=h.length+e.length+M.length,q=S<p?new Array(p-S+1).join(t):"";switch(m&&d&&(e=r(q+e,q.length?p-M.length:1/0),q=""),n){case"<":e=h+e+M+q;break;case"=":e=h+q+e+M;break;case"^":e=q.slice(0,S=q.length>>1)+h+e+M+q.slice(S);break;default:e=q+h+e+M}return s(e)}return g=void 0===g?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),M.toString=function(){return e+""},M}return{format:f,formatPrefix:function(e,t){var n=f(((e=Dt(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(_t(t)/3))),i=Math.pow(10,-r),o=Pt[8+r/3];return function(e){return n(i*e)+o}}}}!function(e){Nt=Lt(e),Rt=Nt.format,Ot=Nt.formatPrefix}({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});var jt=new Date,zt=new Date;function Ft(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=function(t){return e(t=new Date(+t)),t},i.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},i.round=function(e){var t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},i.range=function(n,r,o){var a,s=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return s;do{s.push(a=new Date(+n)),t(n,o),e(n)}while(a<n&&n<r);return s},i.filter=function(n){return Ft((function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}))},n&&(i.count=function(t,r){return jt.setTime(+t),zt.setTime(+r),e(jt),e(zt),Math.floor(n(jt,zt))},i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?function(t){return r(t)%e==0}:function(t){return i.count(0,t)%e==0}):i:null}),i}var Ht=864e5,Bt=6048e5,Vt=Ft((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/Ht}),(function(e){return e.getDate()-1}));function Wt(e){return Ft((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/Bt}))}var Ut=Wt(0),$t=Wt(1);Wt(2),Wt(3);var Yt=Wt(4);Wt(5),Wt(6);var Kt=Ft((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()}));Kt.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Ft((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n*e)})):null};var Xt=Kt,Gt=Ft((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/Ht}),(function(e){return e.getUTCDate()-1}));function Jt(e){return Ft((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/Bt}))}var Zt=Jt(0),Qt=Jt(1);Jt(2),Jt(3);var en=Jt(4);Jt(5),Jt(6);var tn=Ft((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));tn.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Ft((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null};var nn=tn;function rn(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 on(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 an(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function sn(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,u=e.shortMonths,l=pn(i),c=mn(i),f=pn(o),h=mn(o),d=pn(a),p=mn(a),m=pn(s),g=mn(s),y=pn(u),v=mn(u),b={a:function(e){return a[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return u[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:Pn,e:Pn,f:Hn,g:Zn,G:er,H:Ln,I:jn,j:zn,L:Fn,m:Bn,M:Vn,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:Mr,s:_r,S:Wn,u:Un,U:$n,V:Kn,w:Xn,W:Gn,x:null,X:null,y:Jn,Y:Qn,Z:tr,"%":kr},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return u[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:nr,e:nr,f:sr,g:vr,G:xr,H:rr,I:ir,j:or,L:ar,m:ur,M:lr,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:Mr,s:_r,S:cr,u:fr,U:hr,V:pr,w:mr,W:gr,x:null,X:null,y:yr,Y:br,Z:wr,"%":kr},w={a:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=p[r[0].toLowerCase()],n+r[0].length):-1},A:function(e,t,n){var r=f.exec(t.slice(n));return r?(e.w=h[r[0].toLowerCase()],n+r[0].length):-1},b:function(e,t,n){var r=y.exec(t.slice(n));return r?(e.m=v[r[0].toLowerCase()],n+r[0].length):-1},B:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.m=g[r[0].toLowerCase()],n+r[0].length):-1},c:function(e,n,r){return _(e,t,n,r)},d:qn,e:qn,f:Nn,g:kn,G:wn,H:Cn,I:Cn,j:Dn,L:Tn,m:Sn,M:En,p:function(e,t,n){var r=l.exec(t.slice(n));return r?(e.p=c[r[0].toLowerCase()],n+r[0].length):-1},q:_n,Q:On,s:In,S:An,u:yn,U:vn,V:bn,w:gn,W:xn,x:function(e,t,r){return _(e,n,t,r)},X:function(e,t,n){return _(e,r,t,n)},y:kn,Y:wn,Z:Mn,"%":Rn};function k(e,t){return function(n){var r,i,o,a=[],s=-1,u=0,l=e.length;for(n instanceof Date||(n=new Date(+n));++s<l;)37===e.charCodeAt(s)&&(a.push(e.slice(u,s)),null!=(i=un[r=e.charAt(++s)])?r=e.charAt(++s):i="e"===r?" ":"0",(o=t[r])&&(r=o(n,i)),a.push(r),u=s+1);return a.push(e.slice(u,s)),a.join("")}}function M(e,t){return function(n){var r,i,o=an(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?(i=(r=on(an(o.y,0,1))).getUTCDay(),r=i>4||0===i?Qt.ceil(r):Qt(r),r=Gt.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=rn(an(o.y,0,1))).getDay(),r=i>4||0===i?$t.ceil(r):$t(r),r=Vt.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?on(an(o.y,0,1)).getUTCDay():rn(an(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,on(o)):rn(o)}}function _(e,t,n,r){for(var i,o,a=0,s=t.length,u=n.length;a<s;){if(r>=u)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=w[i in un?t.charAt(a++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=k(n,b),b.X=k(r,b),b.c=k(t,b),x.x=k(n,x),x.X=k(r,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 un={"-":"",_:" ",0:"0"},ln=/^\s*\d+/,cn=/^%/,fn=/[\\^$*+?|[\]().{}]/g;function hn(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function dn(e){return e.replace(fn,"\\$&")}function pn(e){return new RegExp("^(?:"+e.map(dn).join("|")+")","i")}function mn(e){for(var t={},n=-1,r=e.length;++n<r;)t[e[n].toLowerCase()]=n;return t}function gn(e,t,n){var r=ln.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function yn(e,t,n){var r=ln.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function vn(e,t,n){var r=ln.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function bn(e,t,n){var r=ln.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function xn(e,t,n){var r=ln.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function wn(e,t,n){var r=ln.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function kn(e,t,n){var r=ln.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Mn(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function _n(e,t,n){var r=ln.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function Sn(e,t,n){var r=ln.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function qn(e,t,n){var r=ln.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Dn(e,t,n){var r=ln.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Cn(e,t,n){var r=ln.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function En(e,t,n){var r=ln.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function An(e,t,n){var r=ln.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Tn(e,t,n){var r=ln.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Nn(e,t,n){var r=ln.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Rn(e,t,n){var r=cn.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function On(e,t,n){var r=ln.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function In(e,t,n){var r=ln.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Pn(e,t){return hn(e.getDate(),t,2)}function Ln(e,t){return hn(e.getHours(),t,2)}function jn(e,t){return hn(e.getHours()%12||12,t,2)}function zn(e,t){return hn(1+Vt.count(Xt(e),e),t,3)}function Fn(e,t){return hn(e.getMilliseconds(),t,3)}function Hn(e,t){return Fn(e,t)+"000"}function Bn(e,t){return hn(e.getMonth()+1,t,2)}function Vn(e,t){return hn(e.getMinutes(),t,2)}function Wn(e,t){return hn(e.getSeconds(),t,2)}function Un(e){var t=e.getDay();return 0===t?7:t}function $n(e,t){return hn(Ut.count(Xt(e)-1,e),t,2)}function Yn(e){var t=e.getDay();return t>=4||0===t?Yt(e):Yt.ceil(e)}function Kn(e,t){return e=Yn(e),hn(Yt.count(Xt(e),e)+(4===Xt(e).getDay()),t,2)}function Xn(e){return e.getDay()}function Gn(e,t){return hn($t.count(Xt(e)-1,e),t,2)}function Jn(e,t){return hn(e.getFullYear()%100,t,2)}function Zn(e,t){return hn((e=Yn(e)).getFullYear()%100,t,2)}function Qn(e,t){return hn(e.getFullYear()%1e4,t,4)}function er(e,t){var n=e.getDay();return hn((e=n>=4||0===n?Yt(e):Yt.ceil(e)).getFullYear()%1e4,t,4)}function tr(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+hn(t/60|0,"0",2)+hn(t%60,"0",2)}function nr(e,t){return hn(e.getUTCDate(),t,2)}function rr(e,t){return hn(e.getUTCHours(),t,2)}function ir(e,t){return hn(e.getUTCHours()%12||12,t,2)}function or(e,t){return hn(1+Gt.count(nn(e),e),t,3)}function ar(e,t){return hn(e.getUTCMilliseconds(),t,3)}function sr(e,t){return ar(e,t)+"000"}function ur(e,t){return hn(e.getUTCMonth()+1,t,2)}function lr(e,t){return hn(e.getUTCMinutes(),t,2)}function cr(e,t){return hn(e.getUTCSeconds(),t,2)}function fr(e){var t=e.getUTCDay();return 0===t?7:t}function hr(e,t){return hn(Zt.count(nn(e)-1,e),t,2)}function dr(e){var t=e.getUTCDay();return t>=4||0===t?en(e):en.ceil(e)}function pr(e,t){return e=dr(e),hn(en.count(nn(e),e)+(4===nn(e).getUTCDay()),t,2)}function mr(e){return e.getUTCDay()}function gr(e,t){return hn(Qt.count(nn(e)-1,e),t,2)}function yr(e,t){return hn(e.getUTCFullYear()%100,t,2)}function vr(e,t){return hn((e=dr(e)).getUTCFullYear()%100,t,2)}function br(e,t){return hn(e.getUTCFullYear()%1e4,t,4)}function xr(e,t){var n=e.getUTCDay();return hn((e=n>=4||0===n?en(e):en.ceil(e)).getUTCFullYear()%1e4,t,4)}function wr(){return"+0000"}function kr(){return"%"}function Mr(e){return+e}function _r(e){return Math.floor(+e/1e3)}var Sr=kt();Sr("d3-number",(function(e,t,n){var r,i;function o(e){return i(e)}function a(){o.locale({decimal:n||".",thousands:t||",",grouping:[3],currency:["$",""]})}return o.locale=function(t){return r=Lt(t),i=r.format(e),this},a(),o.format=function(e,i,o,s){return(o||s)&&(t=o,n=s,a()),r.format(e)(i)},o.pattern=function(t){return t&&(e=t,i=r.format(t)),e},o})),Sr("d3-time",(function(e){var t=sn({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),n=t.format(e);function r(e){return n(e)}return r.format=function(e,n){return t.format(e)(n)},r.locale=function(){return t=sn.apply(void 0,arguments),n=t.format(e),this},r.parse=function(e,n){return t.parse(e)(n)},r.parsePattern=function(e){return t.parse(e)},r}));var qr={id:function(e){return"".concat(e.source,"/").concat(e.key||e.title)},key:function(e){return String(e.key||e.title)},tags:function(e){return e.tags},min:function(e){return e.min},max:function(e){return e.max},type:function(e){return e.type},title:function(e){return String(e.title)},values:function(e){return e.values},value:function(e){return e},label:function(e){return e},formatter:function(e){return function(e){if("function"==typeof e.formatter)return e.formatter();var t=e.formatter||{};return Sr(t.type||"d3-number")(t.format||"")}(e)}};function Dr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.id,r=void 0===n?qr.id:n,i=t.key,o=void 0===i?qr.key:i,a=t.min,s=void 0===a?qr.min:a,u=t.max,l=void 0===u?qr.max:u,c=t.type,f=void 0===c?qr.type:c,h=t.tags,d=void 0===h?qr.tags:h,p=t.title,m=void 0===p?qr.title:p,g=t.values,y=void 0===g?qr.values:g,v=t.value,b=void 0===v?qr.value:v,x=t.label,w=void 0===x?qr.label:x,k=t.formatter,M=void 0===k?qr.formatter:k,_={id:function(){return r(e)},key:function(){return o(e)},raw:function(){return e},tags:function(){return d(e)},type:function(){return f(e)},min:function(){return s(e)},max:function(){return l(e)},title:function(){return m(e)},items:function(){return y(e)},formatter:function(){return M(e)},value:b,label:w};return _}var Cr={diverging:function(e,t){if((s=e.length)>0)for(var n,r,i,o,a,s,u=0,l=e[t[0]].length;u<l;++u)for(o=a=0,n=0;n<s;++n)(i=(r=e[t[n]][u])[1]-r[0])>=0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=a,r[0]=a+=i):r[0]=o},none:yt,silhouette:function(e,t){if((n=e.length)>0){for(var n,r=0,i=e[t[0]],o=i.length;r<o;++r){for(var a=0,s=0;a<n;++a)s+=e[a][r][1]||0;i[r][1]+=i[r][0]=-s/2}yt(e,t)}},expand:function(e,t){if((r=e.length)>0){for(var n,r,i,o=0,a=e[0].length;o<a;++o){for(i=n=0;n<r;++n)i+=e[n][o][1]||0;if(i)for(n=0;n<r;++n)e[n][o][1]/=i}yt(e,t)}},wiggle:function(e,t){if((i=e.length)>0&&(r=(n=e[t[0]]).length)>0){for(var n,r,i,o=0,a=1;a<r;++a){for(var s=0,u=0,l=0;s<i;++s){for(var c=e[t[s]],f=c[a][1]||0,h=(f-(c[a-1][1]||0))/2,d=0;d<s;++d){var p=e[t[d]];h+=(p[a][1]||0)-(p[a-1][1]||0)}u+=f,l+=h*f}n[a-1][1]+=n[a-1][0]=o,u&&(o-=l/u)}n[a-1][1]+=n[a-1][0]=o,yt(e,t)}}},Er={ascending:function(e){var t=e.map(wt);return vt(e).sort((function(e,n){return t[e]-t[n]}))},insideout:function(e){var t,n,r=e.length,i=e.map(wt),o=function(e){var t=e.map(xt);return vt(e).sort((function(e,n){return t[e]-t[n]}))}(e),a=0,s=0,u=[],l=[];for(t=0;t<r;++t)n=o[t],a<s?(a+=i[n],u.push(n)):(s+=i[n],l.push(n));return l.reverse().concat(u)},none:vt,reverse:function(e){return vt(e).reverse()}};function Ar(e,t,n){for(var r={},i=t.stackKey,o=t.value,a=t.startProp||"start",s=t.endProp||"end",u=t.offset||"none",l=t.order||"none",c=t.valueRef||"",f=0,h={},d=0;d<e.items.length;d++){var p=e.items[d],m=c?p[c]:null;if(m&&m.source){var g="".concat(m.source.key||"","/").concat(m.source.field);h[g]||(h[g]=m.source)}var y=i(p);r[y]=r[y]||{items:[]},r[y].items.push(p),f=Math.max(f,r[y].items.length)}for(var v=Array.apply(null,{length:f}).map(Number.call,Number),b=Object.keys(r).map((function(e){return r[e].items})),x=function(){var e=Se([]),t=vt,n=yt,r=bt;function i(i){var o,a,s=e.apply(this,arguments),u=i.length,l=s.length,c=new Array(l);for(o=0;o<l;++o){for(var f,h=s[o],d=c[o]=new Array(u),p=0;p<u;++p)d[p]=f=[0,+r(i[p],h,p,i)],f.data=i[p];d.key=h}for(o=0,a=t(c);o<l;++o)c[a[o]].index=o;return n(c,a),c}return i.keys=function(t){return arguments.length?(e="function"==typeof t?t:Se(Qe.call(t)),i):e},i.value=function(e){return arguments.length?(r="function"==typeof e?e:Se(+e),i):r},i.order=function(e){return arguments.length?(t=null==e?vt:"function"==typeof e?e:Se(Qe.call(e)),i):t},i.offset=function(e){return arguments.length?(n=null==e?yt:e,i):n},i}().keys(v).value((function(e,t){return e[t]?o(e[t]):0})).order(Er[l]).offset(Cr[u])(b),w=[],k=0;k<x.length;k++)for(var M=x[k],_=0;_<M.length;_++){var S=M[_],q=M[_].data[M.key];q&&(q[a]={value:S[0]},q[s]={value:S[1]},w.push(S[0],S[1]))}var D=Object.keys(h).map((function(e){var t=n(h[e].key);return t?t.field(h[e].field):null})).filter((function(e){return!!e})),C=Dr({title:D.map((function(e){return e.title()})).join(", "),min:Math.min.apply(Math,w),max:Math.max.apply(Math,w),type:"measure",formatter:D[0]?D[0].formatter:void 0});e.fields.push(C)}function Tr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={},i=n.logger;if(Array.isArray(e))r.items=e.map((function(e){return{value:e,label:String(e)}}));else if(e){if("collection"in e)r=V({},t.collection(e.collection));else{var o=t.dataset?t.dataset(e.source):null,a=e.value||function(e){return e},s=e.label||function(e){return e};if(e.groupBy||e.mapTo)i.warn('Deprecated "data" configuration',e),r.items=[];else if(e.hierarchy)r.root=o.hierarchy?o.hierarchy(e.hierarchy):null,r.fields=o.fields();else if(e.items)r.items=e.items.map((function(e){return{value:a(e),label:String(s(e))}}));else if(e.extract){var u=Array.isArray(e.extract)?e.extract:[e.extract];r.items=[];var l,c=[];if(u.forEach((function(e){var n,i=e.source?t.dataset(e.source):o;i&&((n=r.items).push.apply(n,oe(i.extract(e))),void 0!==e.field&&c.push(i.field(e.field)))})),c.length&&(r.fields=c),e.amend&&Array.isArray(e.amend))(l=r.items).push.apply(l,oe(e.amend))}else if(void 0!==e.field&&o){var f=o.field(e.field);f&&(r.fields||(r.fields=[]),r.fields.push(f),"value"in e||(a=f.value||function(e){return e},s=f.label||function(e){return e},r.value=a),r.items=f.items().map((function(t){return{value:a(t),label:String(s(t)),source:{field:e.field}}})))}else e.fields&&e.fields.forEach((function(e){var n,i="object"===W(e)&&e.source?t.dataset(e.source):o;i&&((n="object"===W(e)&&void 0!==e.field?i.field(e.field):i.field(e))&&(r.fields||(r.fields=[]),r.fields.push(n)))}));r.items&&e.map&&(r.items=r.items.map(e.map))}e&&e.stack&&Ar(r,e.stack,t.dataset)}return e&&!Array.isArray(e)&&"function"==typeof e.filter&&r.items&&(r.items=r.items.filter(e.filter)),e&&!Array.isArray(e)&&"function"==typeof e.sort&&r.items&&(r.items=r.items.sort(e.sort)),r}function Nr(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Tr,i={};(e||[]).forEach((function(e){if(!e.key)throw new Error('Data collection is missing "key" property');if("object"===W(e.data)&&"collection"in e.data)throw new Error("Data config for collections may not reference other collections");i[e.key]=function(){return r(e.data,t,n)}}));var o=function(e){var t,n;if("string"==typeof e?t=e:"object"===W(e)&&(t=e.key,n=e),!(t in i))throw new Error("Unknown data collection: ".concat(t));"function"==typeof i[t]&&(i[t]=i[t]());var r=i[t];if(n&&n.fields&&n.fields.filter){var o=r.fields.filter(n.fields.filter);r.fields.length!==o.length&&(r=F(r,{fields:o}))}return r};return o}function Rr(e,t,n){var r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Tr;if(e.data){var o=i(e.data,t,n);if(o&&o.fields&&o.fields[0])return o.fields[0].formatter()}if(r=e.formatter?"".concat(e.formatter,"-").concat(e.type||"number"):e.type||"d3-number",n.formatter.has(r)){var a=n.formatter.get(r)(e.format||"");return a}throw new Error("Formatter of type '".concat(r,"' was not found"))}function Or(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Rr,i={};return{get:function(o){var a;return"string"==typeof o&&e[o]?a=o:"object"===W(o)&&"formatter"in o&&e[o.formatter]?a=o.formatter:"object"===W(o)&&"type"in o&&e[o.type]&&(a=o.type),a?(i[a]=i[a]||r(e[a],t,n),i[a]):r(o||{},t,n)},all:function(){return Object.keys(e).forEach(this.get),i}}}function Ir(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}var Pr=function(e){var t;return 1===e.length&&(t=e,e=function(e,n){return Ir(t(e),n)}),{left:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)<0?r=o+1:i=o}return r},right:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)>0?i=o:r=o+1}return r}}}(Ir).right;function Lr(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),o=new Array(i);++r<i;)o[r]=e+r*n;return o}var jr=Math.sqrt(50),zr=Math.sqrt(10),Fr=Math.sqrt(2);function Hr(e,t,n){var r=(t-e)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=jr?10:o>=zr?5:o>=Fr?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=jr?10:o>=zr?5:o>=Fr?2:1)}function Br(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var Vr="$";function Wr(){}function Ur(e,t){var n=new Wr;if(e instanceof Wr)e.each((function(e,t){n.set(t,e)}));else if(Array.isArray(e)){var r,i=-1,o=e.length;if(null==t)for(;++i<o;)n.set(i,e[i]);else for(;++i<o;)n.set(t(r=e[i],i,e),r)}else if(e)for(var a in e)n.set(a,e[a]);return n}function $r(){}Wr.prototype=Ur.prototype={constructor:Wr,has:function(e){return Vr+e in this},get:function(e){return this[Vr+e]},set:function(e,t){return this[Vr+e]=t,this},remove:function(e){var t=Vr+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===Vr&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===Vr&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===Vr&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===Vr&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===Vr&&++e;return e},empty:function(){for(var e in this)if(e[0]===Vr)return!1;return!0},each:function(e){for(var t in this)t[0]===Vr&&e(this[t],t.slice(1),this)}};var Yr=Ur.prototype;$r.prototype={constructor:$r,has:Yr.has,add:function(e){return this[Vr+(e+="")]=e,this},remove:Yr.remove,clear:Yr.clear,values:Yr.keys,size:Yr.size,empty:Yr.empty,each:Yr.each};var Kr=Array.prototype,Xr=Kr.map,Gr=Kr.slice,Jr={name:"implicit"};function Zr(){var e=Ur(),t=[],n=[],r=Jr;function i(i){var o=i+"",a=e.get(o);if(!a){if(r!==Jr)return r;e.set(o,a=t.push(i))}return n[(a-1)%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=Ur();for(var r,o,a=-1,s=n.length;++a<s;)e.has(o=(r=n[a])+"")||e.set(o,t.push(r));return i},i.range=function(e){return arguments.length?(n=Gr.call(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return Zr(t,n).unknown(r)},Br.apply(i,arguments),i}function Qr(){var e,t,n=Zr().unknown(void 0),r=n.domain,i=n.range,o=[0,1],a=!1,s=0,u=0,l=.5;function c(){var n=r().length,c=o[1]<o[0],f=o[c-0],h=o[1-c];e=(h-f)/Math.max(1,n-s+2*u),a&&(e=Math.floor(e)),f+=(h-f-e*(n-s))*l,t=e*(1-s),a&&(f=Math.round(f),t=Math.round(t));var d=Lr(n).map((function(t){return f+e*t}));return i(c?d.reverse():d)}return delete n.unknown,n.domain=function(e){return arguments.length?(r(e),c()):r()},n.range=function(e){return arguments.length?(o=[+e[0],+e[1]],c()):o.slice()},n.rangeRound=function(e){return o=[+e[0],+e[1]],a=!0,c()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(a=!!e,c()):a},n.padding=function(e){return arguments.length?(s=Math.min(1,u=+e),c()):s},n.paddingInner=function(e){return arguments.length?(s=Math.min(1,e),c()):s},n.paddingOuter=function(e){return arguments.length?(u=+e,c()):u},n.align=function(e){return arguments.length?(l=Math.max(0,Math.min(1,e)),c()):l},n.copy=function(){return Qr(r(),o).round(a).paddingInner(s).paddingOuter(u).align(l)},Br.apply(c(),arguments)}function ei(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function ti(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function ni(){}var ri=.7,ii=1/ri,oi="\\s*([+-]?\\d+)\\s*",ai="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",si="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ui=/^#([0-9a-f]{3,8})$/,li=new RegExp("^rgb\\("+[oi,oi,oi]+"\\)$"),ci=new RegExp("^rgb\\("+[si,si,si]+"\\)$"),fi=new RegExp("^rgba\\("+[oi,oi,oi,ai]+"\\)$"),hi=new RegExp("^rgba\\("+[si,si,si,ai]+"\\)$"),di=new RegExp("^hsl\\("+[ai,si,si]+"\\)$"),pi=new RegExp("^hsla\\("+[ai,si,si,ai]+"\\)$"),mi={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 gi(){return this.rgb().formatHex()}function yi(){return this.rgb().formatRgb()}function vi(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=ui.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?bi(t):3===n?new Mi(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?xi(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?xi(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=li.exec(e))?new Mi(t[1],t[2],t[3],1):(t=ci.exec(e))?new Mi(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=fi.exec(e))?xi(t[1],t[2],t[3],t[4]):(t=hi.exec(e))?xi(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=di.exec(e))?Di(t[1],t[2]/100,t[3]/100,1):(t=pi.exec(e))?Di(t[1],t[2]/100,t[3]/100,t[4]):mi.hasOwnProperty(e)?bi(mi[e]):"transparent"===e?new Mi(NaN,NaN,NaN,0):null}function bi(e){return new Mi(e>>16&255,e>>8&255,255&e,1)}function xi(e,t,n,r){return r<=0&&(e=t=n=NaN),new Mi(e,t,n,r)}function wi(e){return e instanceof ni||(e=vi(e)),e?new Mi((e=e.rgb()).r,e.g,e.b,e.opacity):new Mi}function ki(e,t,n,r){return 1===arguments.length?wi(e):new Mi(e,t,n,null==r?1:r)}function Mi(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function _i(){return"#"+qi(this.r)+qi(this.g)+qi(this.b)}function Si(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function qi(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Di(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ei(e,t,n,r)}function Ci(e){if(e instanceof Ei)return new Ei(e.h,e.s,e.l,e.opacity);if(e instanceof ni||(e=vi(e)),!e)return new Ei;if(e instanceof Ei)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new Ei(a,s,u,e.opacity)}function Ei(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Ai(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function Ti(e){return function(){return e}}function Ni(e){return 1==(e=+e)?Ri:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):Ti(isNaN(t)?n:t)}}function Ri(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Ti(isNaN(e)?t:e)}ei(ni,vi,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:gi,formatHex:gi,formatHsl:function(){return Ci(this).formatHsl()},formatRgb:yi,toString:yi}),ei(Mi,ki,ti(ni,{brighter:function(e){return e=null==e?ii:Math.pow(ii,e),new Mi(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?ri:Math.pow(ri,e),new Mi(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:_i,formatHex:_i,formatRgb:Si,toString:Si})),ei(Ei,(function(e,t,n,r){return 1===arguments.length?Ci(e):new Ei(e,t,n,null==r?1:r)}),ti(ni,{brighter:function(e){return e=null==e?ii:Math.pow(ii,e),new Ei(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?ri:Math.pow(ri,e),new Ei(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Mi(Ai(e>=240?e-240:e+120,i,r),Ai(e,i,r),Ai(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var Oi=function e(t){var n=Ni(t);function r(e,t){var r=n((e=ki(e)).r,(t=ki(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=Ri(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function Ii(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,i=t.slice();return function(o){for(n=0;n<r;++n)i[n]=e[n]*(1-o)+t[n]*o;return i}}function Pi(e,t){var n,r=t?t.length:0,i=e?Math.min(r,e.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=Vi(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<i;++n)a[n]=o[n](e);return a}}function Li(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function ji(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function zi(e,t){var n,i={},o={};for(n in null!==e&&"object"===r(e)||(e={}),null!==t&&"object"===r(t)||(t={}),t)n in e?i[n]=Vi(e[n],t[n]):o[n]=t[n];return function(e){for(n in i)o[n]=i[n](e);return o}}var Fi=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Hi=new RegExp(Fi.source,"g");function Bi(e,t){var n,r,i,o=Fi.lastIndex=Hi.lastIndex=0,a=-1,s=[],u=[];for(e+="",t+="";(n=Fi.exec(e))&&(r=Hi.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,u.push({i:a,x:ji(n,r)})),o=Hi.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?u[0]?function(e){return function(t){return e(t)+""}}(u[0].x):function(e){return function(){return e}}(t):(t=u.length,function(e){for(var n,r=0;r<t;++r)s[(n=u[r]).i]=n.x(e);return s.join("")})}function Vi(e,t){var n,i=r(t);return null==t||"boolean"===i?Ti(t):("number"===i?ji:"string"===i?(n=vi(t))?(t=n,Oi):Bi:t instanceof vi?Oi:t instanceof Date?Li:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?Ii:Array.isArray(t)?Pi:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?zi:ji)(e,t)}function Wi(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function Ui(e){return+e}var $i=[0,1];function Yi(e){return e}function Ki(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function Xi(e){var t,n=e[0],r=e[e.length-1];return n>r&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function Gi(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=Ki(i,r),o=n(a,o)):(r=Ki(r,i),o=n(o,a)),function(e){return o(r(e))}}function Ji(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=Ki(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(t){var n=Pr(e,t,1,r)-1;return o[n](i[n](t))}}function Zi(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Qi(e,t){return function(){var e,t,n,r,i,o,a=$i,s=$i,u=Vi,l=Yi;function c(){return r=Math.min(a.length,s.length)>2?Ji:Gi,i=o=null,f}function f(t){return isNaN(t=+t)?n:(i||(i=r(a.map(e),s,u)))(e(l(t)))}return f.invert=function(n){return l(t((o||(o=r(s,a.map(e),ji)))(n)))},f.domain=function(e){return arguments.length?(a=Xr.call(e,Ui),l===Yi||(l=Xi(a)),c()):a.slice()},f.range=function(e){return arguments.length?(s=Gr.call(e),c()):s.slice()},f.rangeRound=function(e){return s=Gr.call(e),u=Wi,c()},f.clamp=function(e){return arguments.length?(l=e?Xi(a):Yi,f):l!==Yi},f.interpolate=function(e){return arguments.length?(u=e,c()):u},f.unknown=function(e){return arguments.length?(n=e,f):n},function(n,r){return e=n,t=r,c()}}()(e,t)}function eo(e,t,n,r){var i,o=function(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=jr?i*=10:o>=zr?i*=5:o>=Fr&&(i*=2),t<e?-i:i}(e,t,n);switch((r=Dt(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(_t(t)/3)))-_t(Math.abs(e)))}(o,a))||(r.precision=i),Ot(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,_t(t)-_t(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(e){return Math.max(0,-_t(Math.abs(e)))}(o))||(r.precision=i-2*("%"===r.type))}return Rt(r)}function to(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){var r,i,o,a,s=-1;if(n=+n,(e=+e)==(t=+t)&&n>0)return[e];if((r=t<e)&&(i=e,e=t,t=i),0===(a=Hr(e,t,n))||!isFinite(a))return[];if(a>0)for(e=Math.ceil(e/a),t=Math.floor(t/a),o=new Array(i=Math.ceil(t-e+1));++s<i;)o[s]=(e+s)*a;else for(e=Math.floor(e*a),t=Math.ceil(t*a),o=new Array(i=Math.ceil(e-t+1));++s<i;)o[s]=(e-s)/a;return r&&o.reverse(),o}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return eo(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,i=t(),o=0,a=i.length-1,s=i[o],u=i[a];return u<s&&(r=s,s=u,u=r,r=o,o=a,a=r),(r=Hr(s,u,n))>0?r=Hr(s=Math.floor(s/r)*r,u=Math.ceil(u/r)*r,n):r<0&&(r=Hr(s=Math.ceil(s*r)/r,u=Math.floor(u*r)/r,n)),r>0?(i[o]=Math.floor(s/r)*r,i[a]=Math.ceil(u/r)*r,t(i)):r<0&&(i[o]=Math.ceil(s*r)/r,i[a]=Math.floor(u*r)/r,t(i)),e},e}function no(){var e=Qi(Yi,Yi);return e.copy=function(){return Zi(e,no())},Br.apply(e,arguments),to(e)}function ro(){var e,t=[.5],n=[0,1],r=1;function i(i){return i<=i?n[Pr(t,i,0,r)]:e}return i.domain=function(e){return arguments.length?(t=Gr.call(e),r=Math.min(t.length,n.length-1),i):t.slice()},i.range=function(e){return arguments.length?(n=Gr.call(e),r=Math.min(t.length,n.length-1),i):n.slice()},i.invertExtent=function(e){var r=n.indexOf(e);return[t[r-1],t[r]]},i.unknown=function(t){return arguments.length?(e=t,i):e},i.copy=function(){return ro().domain(t).range(n).unknown(e)},Br.apply(i,arguments)}function io(e){return void 0===e?function(e){return e}:function(t){return e(t)}}function oo(e){return Math.max(0,Math.min(1,e))}function ao(e){return"object"===W(e)}function so(e,t,n){for(var r=Math.abs(t-n)/(e+1),i=[],o=1;o<=e;o++){var a=o*r;i.push(t<n?t+a:t-a)}return i}function uo(e,t,n){if(1===e.length)return e;for(var r=e.concat([]),i=0;i<e.length;i++){var o=e[i],a=e[i+1];0===i&&o!==n.start()?(r.push.apply(r,oe(so(t,o,a))),o-=a-o,a=e[i],r.push.apply(r,oe(so(t,o,a)))):i===e.length-1&&a!==n.end()?(a=o+(o-e[i-1]),r.push.apply(r,oe(so(t,o,a)))):r.push.apply(r,oe(so(t,o,a)))}return r.filter((function(e){return e>=n.min()&&e<=n.max()}))}function lo(e){var t=e.distance,n=e.scale,r=e.minorCount,i=void 0===r?0:r,o=e.unitDivider,a=void 0===o?100:o,s=e.formatter,u=void 0===s?void 0:s,l=ce(a)||ce(t)?2:Math.max(t/a,2),c=Math.min(1e3,Math.round(l)),f=n.ticks(c);f.length<=1&&(f=n.ticks(c+1));var h=i>0?uo(f,i,n):f;h.sort((function(e,t){return e-t}));var d=h.map(io(u));return h.map((function(e,t){var r=n(e);return{position:r,start:r,end:r,label:d[t],value:e,isMinor:-1===f.indexOf(e)}}))}function co(e){var t=e.distance,n=e.scale,r=e.minorCount,i=void 0===r?0:r,o=e.unitDivider,a=void 0===o?100:o,s=e.formatter,u=void 0===s?void 0:s,l=ce(a)||ce(t)?2:Math.max(t/a,2),c=Math.min(1e3,Math.round(l)),f=c>10?10:c;n.nice(f);var h=n.ticks(c),d=i>0?uo(h,i,n):h;d.sort((function(e,t){return e-t}));var p=d.map(io(u));return d.map((function(e,t){var r=n(e);return{position:r,start:r,end:r,label:p[t],value:e,isMinor:-1===h.indexOf(e)}}))}function fo(e){var t,n=e.settings,r=e.scale,i=e.distance,o=e.formatter,a=void 0===o?function(e){return e}:o,s=n.minorTicks&&!ce(n.minorTicks.count)?Math.min(100,n.minorTicks.count):0;if(Array.isArray(n.ticks.values))t=function(e){var t=e.values,n=e.scale,r=e.formatter,i=void 0===r?function(e){return e}:r;return t.sort((function(e,t){return(ao(e)?e.value:e)-(ao(t)?t.value:t)})).filter((function(e,t,r){var i=ao(e)?e.value:e;return i<=n.max()&&i>=n.min()&&r.indexOf(e)===t})).map((function(e){var t=ao(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)?oo(n(e.start)):o,end:t&&!isNaN(e.end)?oo(n(e.end)):o}}))}({values:n.ticks.values.filter((function(e){return"object"===W(e)?!ce(e.value):!ce(e)})),scale:r.copy(),formatter:a});else if(ce(n.ticks.count)){t=(n.ticks.tight?co:lo)({distance:i,minorCount:s,unitDivider:n.ticks.distance,scale:r,formatter:a}),n.ticks.forceBounds&&function(e,t,n){var r=e.map((function(e){return e.position})),i=t.range();-1===r.indexOf(i[0])?e.splice(0,0,{position:i[0],start:i[0],end:i[0],label:n(t.start()),isMinor:!1,value:t.start()}):e[0]&&e[0].isMinor&&(e[0].isMinor=!1);var o=e[e.length-1];-1===r.indexOf(i[1])?e.push({position:i[1],start:i[1],end:i[1],label:n(t.end()),isMinor:!1,value:t.end()}):o&&o.isMinor&&(o.isMinor=!1)}(t,r,a)}else{t=function(e){var t=e.count,n=e.minorCount,r=e.scale,i=e.formatter;return r.ticks((t-1)*n+t).map((function(e,t){var o=r(e);return{position:o,start:o,end:o,label:i(e),isMinor:t%(n+1)!=0,value:e}}))}({count:Math.min(1e3,n.ticks.count),minorCount:s,scale:r.copy(),formatter:a})}return t}function ho(e){var t=e.scale,n=t.domain(),r=t.data().items,i=t.labels?t.labels():n,o=t.bandwidth();return n.map((function(e,n){var a=t(e);return{position:a+o/2,label:"".concat(i[n]),data:r?r[n]:void 0,start:a,end:a+o}}))}function po(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={};return Object.keys(t).forEach((function(i){var o=W(e[i]);r[i]="function"===o?e[i](n):"undefined"===o?t[i]:e[i]})),r}var mo={min:NaN,max:NaN,expand:NaN,include:[],invert:!1},go={tight:!1,forceBounds:!1,values:void 0,count:NaN,distance:100},yo={count:NaN};function vo(e,t){var n=+e.min,r=+e.max,i=0,o=1;if(t&&t[0]){var a=t.map((function(e){return e.min()})).filter((function(e){return!isNaN(e)})),s=t.map((function(e){return e.max()})).filter((function(e){return!isNaN(e)}));if(i=a.length?Math.min.apply(Math,oe(a)):Number.NaN,o=s.length?Math.max.apply(Math,oe(s)):Number.NaN,isNaN(i)||isNaN(o))i=-1,o=1;else if(i===o&&0===i)i=-1,o=1;else if(i===o&&i)i-=Math.abs(.1*i),o+=Math.abs(.1*o);else if(!isNaN(e.expand)){var u=o-i;i-=u*e.expand,o+=u*e.expand}if(Array.isArray(e.include)){var l=e.include.filter((function(e){return!isNaN(e)}));i=Math.min.apply(Math,oe(l).concat([i])),o=Math.max.apply(Math,oe(l).concat([o]))}}return{mini:isNaN(n)?i:n,maxi:isNaN(r)?o:r}}function bo(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 xo(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=no(),o={instance:null,invert:!1},a={data:n,resources:r},s=po(t,mo,a);function u(e){return ce(e)?NaN:i(e)}s.ticks=po(t.ticks,go,a),s.minorTicks=po(t.minorTicks,yo,a),u.data=function(){return n},u.invert=function(e){return i.invert(e)},u.rangeRound=function(e){return i.rangeRound(e),u},u.clamp=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return i.clamp(e),u},u.cachedTicks=function(){return e},u.clearTicksCache=function(){return e=void 0,this},u.ticks=function(t){return null!==t&&"object"===W(t)?(t.settings=t.settings||{},t.settings=F(!0,{},s,t.settings),t.scale=u,e=fo(t)):e=i.ticks(t)},u.nice=function(e){return i.nice(e),u},u.tickFormat=function(e,t){return i.tickFormat(e,t)},u.interpolate=function(e){return i.interpolate(e),u},u.domain=function(e){return arguments.length?(i.domain(e),o.instance&&o.instance.domain([u.start(),u.end()]),u):i.domain()},u.range=function(e){return arguments.length?(i.range(e),u):i.range()},u.start=function(){return u.domain()[0]},u.end=function(){return u.domain()[this.domain().length-1]},u.min=function(){return Math.min(this.start(),this.end())},u.max=function(){return Math.max(this.start(),this.end())},u.classify=function(e){for(var t=(u.start()-u.end())/e,n=[u.end()],r=[],i=t/2,o=0;o<e;o++){var a=n[n.length-1]||0,s=a+t,l=u(a+i);n.push.apply(n,[s,s]),r.push.apply(r,[l,l])}return n.pop(),u.domain(n),u.range(r),u},u.copy=function(){var e=xo(t,n,r);return e.domain(u.domain()),e.range(u.range()),e.clamp(i.clamp()),e},u.norm=function(e){return bo(o,u),o.instance(e)},u.normInvert=function(e){return bo(o,u),o.instance.invert(e)};var l=vo(s,n?n.fields:[]),c=l.mini,f=l.maxi;return u.domain([c,f]),u.range(s.invert?[1,0]:[0,1]),o.invert=s.invert,u}var wo={padding:0,paddingInner:NaN,paddingOuter:NaN,align:.5,invert:!1,maxPxStep:NaN,range:[0,1]};function ko(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={data:t,resources:n},i=po(e,wo,r),o=t.items||[],a={},s=[],u=[];function l(e,n){e.data=function(){return t},e.datum=function(e){return o[a[e]]},e.start=function(){return e.domain()[0]},e.end=function(){return e.domain()[e.domain().length-1]},e.labels=function(){return u},e.ticks=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.scale=e,ho(t,n.trackBy)}}var c=Qr();l(c,e),c.pxScale=function(t){var n=i.maxPxStep;if(isNaN(n))return c;var r=c.domain().length,o=Math.max(1,r-c.paddingInner()+2*c.paddingOuter());if(o*n>=t)return c;var a=c.copy();a.type=c.type,l(a,e);var s=o*n/t,u=(1-s)*c.align();return a.range(i.invert?[s+u,u]:[u,s+u]),a};for(var f="function"==typeof e.value?e.value:function(e){return e.datum.value},h="function"==typeof e.label?e.label:function(e){return e.datum.label},d=0;d<o.length;d++){var p=F({datum:o[d]},r),m=f(p,d);-1===s.indexOf(m)&&(s.push(m),u.push(h(p,d)),a[m]=d)}return c.domain(s),c.range(i.invert?i.range.slice().reverse():i.range),c.padding(isNaN(i.padding)?0:i.padding),isNaN(i.paddingInner)||c.paddingInner(i.paddingInner),isNaN(i.paddingOuter)||c.paddingOuter(i.paddingOuter),c.align(isNaN(i.align)?.5:i.align),c}var Mo={depth:0};function _o(e,t,n){return e.ancestors().map((function(e){return t(F({datum:e.data},n))})).reverse().slice(1).toString()}function So(e,t,n){var r=t.ticks.depth,i=t.value,o=t.label,a=[],s=[],u={},l=[],c=0;if(!e)return{values:a,labels:s,items:u,ticks:l};e.eachAfter((function(e){if(e.depth>0){var t=_o(e,i,n),f=e.leaves()||[e],h=i(F({datum:e.data},n)),d=o(F({datum:e.data},n)),p=Array.isArray(e.children),m={key:t,count:f.length,value:h,label:d,leftEdge:_o(f[0],i,n),rightEdge:_o(f[Math.max(f.length-1,0)],i,n),node:e};p?(a.push("SPACER_".concat(c,"_SPACER")),c++):(a.push(t),s.push(d)),(r<=0&&!p||e.depth===r)&&l.push(m),u[t]=m}}));var f=e.height-1;return f>0&&a.splice(-f),{values:a,labels:s,items:u,ticks:l}}var qo=function(e){return e.min()},Do=function(e){return e.max()};function Co(e,t){var n=e&&!isNaN(e.min),r=e&&!isNaN(e.max),i=n?+e.min:0,o=r?+e.max:1;if(t&&t.length){if(!n){var a=t.map(qo).filter(le);i=a.length?Math.min.apply(Math,oe(a)):i}if(!r){var s=t.map(Do).filter(le);o=s.length?Math.max.apply(Math,oe(s)):o}}return[i,o]}var Eo={domain:[],range:[],invert:!1,min:NaN,max:NaN};function Ao(e,t,n){var r=e.length;if(2===r)return[t,n];var i=[],o=(n-t)/(r-1);i.push(t);for(var a=1;a<r-1;a++)i.push(t+o*a);return i.push(n),i}function To(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=xo(e,t,n).clamp(!0).interpolate(Oi),i=po(e,Eo,{data:t,resources:n}),o=Array.isArray(i.domain)&&i.domain.length,a=Array.isArray(i.range)&&i.range.length,s=r;F(!0,s,r);var u=Co(i,t?t.fields:[]),l=ie(u,2),c=l[0],f=l[1],h=o?i.domain.length:-1,d=n.theme?n.theme.palette("sequential",h>0?h:2):[],p=a?i.range:d;return s.range(i.invert?p.slice().reverse():p.slice()),s.domain(o?i.domain:Ao(s.range(),c,f)),s}var No={domain:[],range:[],invert:!1,min:NaN,max:NaN,nice:!1};function Ro(e,t,n){var r=e.length;if(2===r)return[t+(n-t)/2];for(var i=[],o=(n-t)/r,a=1;a<r;a++)i.push(t+o*a);return i}function Oo(e,t,n,r){n=e[0],r=e&&e.length>=2?e[e.length-1]:r;var i=To().domain([n,r]).range(t);return[n].concat(oe(function(e){for(var t=[],n=0;n<e.length-1;n++)t.push((e[n]+e[n+1])/2);return t}(e)),[r]).map((function(e){return i(e)}))}function Io(e,t,n){var r=2===e.length?10:Math.max(1,e.length),i=no().domain([t,n]).nice(r).ticks(r);if(!e||!e.length)return i;for(var o=Math.max(0,e.length-1);i.length>o;)i[0]-t<=n-i[i.length-1]?i.shift():i.pop();return i}var Po={domain:[],range:[]};function Lo(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Zr(),i={data:t,resources:n},o=po(e,Po,i),a="function"==typeof e.value?e.value:function(e){return e.datum.value},s="function"==typeof e.label?e.label:function(e){return e.datum.label},u=t.items||[],l={},c=[],f=[],h=0;h<u.length;h++){var d=F({datum:u[h]},i),p=a(d,h);-1===c.indexOf(p)&&(c.push(p),f.push(s(d,h)),l[p]=h)}return r.data=function(){return t},r.labels=function(){return f},r.label=function(e){return f[c.indexOf(e)]},r.datum=function(e){return u[l[e]]},r.range(o.range),Array.isArray(o.domain)&&o.domain.length?r.domain(o.domain):r.domain(c),r}var jo={domain:[],range:[],unknown:void 0},zo={domain:[],range:[],override:!1};var Fo=kt();function Ho(e,t,n){var r=e.data;e.source&&(n.logger.warn("Deprecated: Scale data source configuration"),r={extract:[]},(Array.isArray(e.source)?e.source:[e.source]).forEach((function(e){r.extract.push({field:e})})));var i,o=Tr(r,t,n),a=e.type||function(e){return e.root?"h-band":e.fields&&e.fields[0]?-1!==e.fields.map((function(e){return"dimension"===e.type()?"band":"linear"})).indexOf("linear")?"linear":"band":"linear"}(o);return"color"===a&&(a=o.fields&&o.fields[0]&&"dimension"===o.fields[0].type()?"categorical-color":"sequential-color"),n.scale.has(a)&&((i=(i=n.scale.get(a))(e,o,{theme:n.theme,logger:n.logger})).type=a),i}function Bo(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Ho,i={};return{get:function(o){var a;return"string"==typeof o&&e[o]?a=o:"object"===W(o)&&"scale"in o&&e[o.scale]&&(a=o.scale),a?(i[a]=i[a]||r(e[a],t,n),i[a]):r(o,t,n)},all:function(){return Object.keys(e).forEach(this.get),i}}}Fo("linear",xo),Fo("band",ko),Fo("h-band",(function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i={data:n,resources:r},o=po(t,wo,i);o.ticks=po(t.ticks,Mo,i),o.value="function"==typeof t.value?t.value:function(e){return e.datum.value},o.label="function"==typeof t.label?t.label:function(e){return e.datum.value};var a=ko(o),s=So(n.root,o,i),u=s.values,l=s.labels,c=s.items,f=s.ticks,h=function(e){var t=String(e),n=c[t];return a(n?o.invert?n.rightEdge:n.leftEdge:t)};F(!0,h,a),h.bandwidth=function(e){var t=c[String(e)],n=a.bandwidth();if(t&&!t.isLeaf){var r=h(t.leftEdge),i=h(t.rightEdge);return Math.abs(r-i)+n}return n},h.step=function(e){var t=c[String(e)],n=t?t.count:1,r=a.step();return r*=n},h.data=function(){return n},h.datum=function(e){var t=c[String(e)];return t?t.node.data:null},h.copy=function(){return e(t,n,r)},h.labels=function(){return l},h.ticks=function(){return f.map((function(e){var 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}}))};var d=a.pxScale;return h.pxScale=function(e){return a=d(e),h},h.domain(u),h})),Fo("sequential-color",To),Fo("threshold-color",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=ro(),i=po(e,No,{data:t,resources:n}),o=Array.isArray(i.domain)&&i.domain.length,a=Array.isArray(i.range)&&i.range.length;function s(e){return ce(e)?NaN:r(e)}Object.keys(r).forEach((function(e){return s[e]=r[e]}));var u=t.fields,l=Co(i,u),c=ie(l,2),f=c[0],h=c[1],d=o?i.domain.length:-1,p=n.theme?n.theme.palette("sequential",d>0?d:2):[],m=a?i.range:p,g=[];return g=o?i.domain:i.nice?Io(m,f,h):[f+(h-f)/2],m.length>g.length+1?g=Ro(m,f,h):m.length<g.length+1&&(m=Oo(g,m,f,h)),s.data=function(){return t},s.range(i.invert?m.slice().reverse():m),s.domain(g),s})),Fo("categorical-color",(function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=Lo(t,n,r),o=r.theme,a=po(t,jo,{data:n,resources:r});if(a.explicit=po(t.explicit,zo,{data:n,resources:r}),e=Array.isArray(a.range)&&0!==a.range.length?a.range.slice():o?o.palette("categorical",i.domain().length).slice():[],a.unknown)i.unknown(a.unknown);else if(o&&o.palette("unknown")){var s=o.palette("unknown");i.unknown(s[0])}if(Array.isArray(a.explicit.domain)&&a.explicit.domain.length){for(var u=i.domain().slice(),l=a.explicit.domain,c=Array.isArray(a.explicit.range)?a.explicit.range:[],f=Math.floor(u.length/e.length),h=1;h<f+1;h*=2)e=e.concat(e);if(a.explicit.override)for(var d=0;d<l.length;d++){var p=u.indexOf(l[d]);p>-1&&(e[p]=c[d])}else{var m=l.map((function(e,t){return[u.indexOf(e),e,c[t]]})).sort((function(e,t){return e[0]-t[0]}));m.forEach((function(t){var n=u.indexOf(t[1]);-1!==n&&e.splice(n,0,t[2])}))}e.length=u.length}return i.range(e),i}));var Vo={};function Wo(){Wo.init.call(this)}Vo.isObject=function(e){return"object"===r(e)&&null!==e},Vo.isNumber=function(e){return"number"==typeof e},Vo.isUndefined=function(e){return void 0===e},Vo.isFunction=function(e){return"function"==typeof e};var Uo=Wo;Wo.EventEmitter=Wo,Wo.prototype._events=void 0,Wo.prototype._maxListeners=void 0,Wo.defaultMaxListeners=10,Wo.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},Wo.prototype.setMaxListeners=function(e){if(!Vo.isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},Wo.prototype.emit=function(e){var t,n,r,i,o,a;if(this._events||(this._events={}),"error"===e&&!this._events.error)throw(t=arguments[1])instanceof Error?t:Error('Uncaught, unspecified "error" event.');if(n=this._events[e],Vo.isUndefined(n))return!1;if(Vo.isFunction(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(r=arguments.length,i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];n.apply(this,i)}else if(Vo.isObject(n)){for(r=arguments.length,i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];for(r=(a=n.slice()).length,o=0;o<r;o++)a[o].apply(this,i)}return!0},Wo.prototype.addListener=function(e,t){var n;if(!Vo.isFunction(t))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,Vo.isFunction(t.listener)?t.listener:t),this._events[e]?Vo.isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,Vo.isObject(this._events[e])&&!this._events[e].warned)&&((n=Vo.isUndefined(this._maxListeners)?Wo.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,Vo.isFunction(console.error)&&console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),Vo.isFunction(console.trace)&&console.trace()));return this},Wo.prototype.on=Wo.prototype.addListener,Wo.prototype.once=function(e,t){if(!Vo.isFunction(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},Wo.prototype.removeListener=function(e,t){var n,r,i,o;if(!Vo.isFunction(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(i=(n=this._events[e]).length,r=-1,n===t||Vo.isFunction(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(Vo.isObject(n)){for(o=i;o-- >0;)if(n[o]===t||n[o].listener&&n[o].listener===t){r=o;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},Wo.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],Vo.isFunction(n))this.removeListener(e,n);else if(Array.isArray(n))for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},Wo.prototype.listeners=function(e){return this._events&&this._events[e]?Vo.isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},Wo.listenerCount=function(e,t){return e._events&&e._events[t]?Vo.isFunction(e._events[t])?1:e._events[t].length:0};var $o=function(e){return Object.keys(Uo.prototype).forEach((function(t){e[t]=Uo.prototype[t]})),Uo.init(e),e};function Yo(){var e=0,t=0,n=0,r=0;n=n||e;var i={move:function(e){this.moveTo(n+e)},moveTo:function(o){var a=Math.max(e,Math.min(t-r,o));n!==a&&(n=a,i.emit("update"))},update:function(o){var a=!1,s=o.min;e=void 0===s?e:s;var u=o.max;t=void 0===u?t:u,void 0!==o.viewSize&&o.viewSize!==r&&(r=o.viewSize,a=!0);var l=Math.max(e,Math.min(t-r,n));n!==l&&(n=l,a=!0),a&&i.emit("update")},getState:function(){return{min:e,max:t,start:n,viewSize:r}}};return $o(i),i}function Ko(e,t){var n=e.min||0,r=e.max||0,i=e.viewSize||0,o=t||Yo();return o.update({min:n,max:r,viewSize:i}),o}function Xo(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=Ko(e[r],t?t[r]:null));return n}function Go(e,t){return t[e]||(t[e]=Yo()),t[e]}function Jo(e,t){return e<=t}function Zo(e,t){return e<t}function Qo(e,t,n){for(var r=0;r<e.length&&t>e[r];)++r;return e[r]===t&&n&&++r,r}function ea(e,t,n,r){for(var i=e.length,o=1;o<i;o+=2)if(n(e[o-1],t)&&r(t,e[o]))return!0;return!1}function ta(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=[];function i(){}return i.configure=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.includeMax,i=void 0===r||r,o=n.includeMin,a=void 0===o||o;e=i?Jo:Zo,t=a?Jo:Zo},i.add=function(e){var t,n=e.min,i=e.max,o=Qo(r,n),a=Qo(r,i,!0),s=[o,a-o];o%2==0&&s.push(n),a%2==0&&s.push(i);var u=r.join(",");return(t=r).splice.apply(t,s),u!==r.join(",")},i.remove=function(e){var t,n=e.min,i=e.max,o=Qo(r,n),a=Qo(r,i,!0),s=[o,a-o];o%2==1&&s.push(n),a%2==1&&s.push(i);var u=r.join(",");return(t=r).splice.apply(t,s),u!==r.join(",")},i.set=function(e){var t=r.join(",");return r=[],Array.isArray(e)?e.forEach(i.add):i.add(e),t!==r.join(",")},i.clear=function(){var e=r.length>0;return r=[],e},i.containsValue=function(n){return ea(r,n,t,e)},i.containsRange=function(e){var t=e.min,n=e.max,i=Qo(r,t,!0),o=Qo(r,n);return i===o&&o%2==1},i.toggle=function(e){return i.containsRange(e)?i.remove(e):i.add(e)},i.ranges=function(){for(var e=[],t=1;t<r.length;t+=2)e.push({min:r[t-1],max:r[t]});return e},i.configure(n),i}function na(){var e=[];function t(){}return t.add=function(t){return-1===e.indexOf(t)&&(e.push(t),!0)},t.remove=function(t){var n=e.indexOf(t);return-1!==n&&(e.splice(n,1),!0)},t.contains=function(t){return-1!==e.indexOf(t)},t.values=function(){return e.slice()},t.clear=function(){return e=[]},t.toString=function(){return e.join(";")},t}var ra={key:void 0,includeMin:!0,includeMax:!0};function ia(e){for(var t,n,r=e.items,i=e.collection,o=e.vc,a={},s=[],u=0,l=r.length;u<l;u++){i[t=r[u].key]||(i[t]=o()),n=r[u].values||[r[u].value];for(var c=0;c<n.length;c++)i[t].add(n[c])&&(a[t]=a[t]||[],a[t].push(n[c]))}for(var f=Object.keys(a),h=0,d=f.length;h<d;h++)t=f[h],s.push({id:t,values:a[t]});return s}function oa(e){for(var t,n,r=e.items,i=e.collection,o={},a=[],s=0,u=r.length;s<u;s++)if(i[t=r[s].key]){n=r[s].values||[r[s].value];for(var l=0;l<n.length;l++)i[t].remove(n[l])&&(o[t]=o[t]||[],o[t].push(n[l]))}for(var c=Object.keys(o),f=0,h=c.length;f<h;f++)t=c[f],a.push({id:t,values:o[t]});return a}function aa(e){for(var t,n,r={},i=0,o=e.length;i<o;i++){t=e[i].key,n=e[i].values||[e[i].value],r[t]||(r[t]=[]);for(var a=0;a<n.length;a++){-1===r[t].indexOf(n[a])&&r[t].push(n[a])}}return r}function sa(e){var t=e.key,n=e.collection,r=e.obj,i=e.fn,o=e.value;n[t]||(n[t]=i()),r[t]=r[t]||[],r[t].push(o),n[t].add(o)}function ua(e){for(var t,n,r,i=e.items,o=e.values,a=e.vc,s={},u={},l=[],c=[],f=aa(i),h=Object.keys(f),d=0,p=h.length;d<p;d++)for(var m=0,g=(r=f[t=h[d]]).length;m<g;m++)n=r[m],o[t]&&o[t].contains(n)?o[t]&&o[t].contains(n)&&(u[t]=u[t]||[],u[t].push(n),o[t].remove(n)):sa({key:t,value:n,collection:o,obj:s,fn:a});for(var y=Object.keys(s),v=0,b=y.length;v<b;v++)t=y[v],l.push({id:t,values:s[t]});for(var x=Object.keys(u),w=0,k=x.length;w<k;w++)t=x[w],c.push({id:t,values:u[t]});return[l,c]}function la(e,t){for(var n,r,i=[],o=Object.keys(e),a=function(e){return-1===t[n].indexOf(e)},s=0,u=o.length;s<u;s++)n=o[s],t[n]?(r=e[n].filter(a)).length&&i.push({id:n,values:r}):i.push({id:n,values:e[n]});return i}function ca(e){for(var t,n,r=e.items,i=e.vCollection,o=e.vc,a={},s=aa(r),u={},l=Object.keys(i),c=0,f=l.length;c<f;c++)u[n=l[c]]=i[n].values().slice(),delete i[n];for(var h=function(e){i[n]&&i[n].contains(e)||sa({key:n,value:e,collection:i,obj:a,fn:o})},d=Object.keys(s),p=0,m=d.length;p<m;p++)s[n=d[p]].forEach(h);return t=la(u,a),[la(a,u),t]}function fa(e,t,n){var r=function(e,t){if(!Object.keys(t).length)return e;for(var n=e.length,r=Array(n),i=0;i<n;i++)r[i]=e[i].key in t?F({},e[i],{key:t[e[i].key]}):e[i];return r}(t,n);return e&&e.length?e.reduce((function(e,t){return t(e)}),r):r}function ha(e){return e.replace(/(-[a-z])/g,(function(e){return e.toUpperCase().replace("-","")}))}function da(e){return e.replace(/([A-Z])/g,(function(e){return"-".concat(e.toLowerCase())}))}function pa(e,t,n){var r=n.ranges,i=n.interceptors,o=n.rc,a=n.aliases,s=n.rangeConfig,u=fa(i["".concat(t,"Ranges")],e,a),l=!1;return u.forEach((function(e){var n=e.key;if(r[n]||(r[n]=o(s.sources[n]||s.default)),"set"===t)l=r[n][t](e.ranges||e.range)||l;else for(var i=e.ranges||[e.range],a=0;a<i.length;a++)l=r[n][t](i[a])||l})),l}function ma(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.vc,n=void 0===t?na:t,r=e.rc,i=void 0===r?ta:r,o=!1,a={},s={},u={},l={sources:{},default:F({},ra)},c={addValues:[],removeValues:[],toggleValues:[],setValues:[],addRanges:[],setRanges:[],removeRanges:[],toggleRanges:[]},f=function(){var e={values:{},ranges:{}};return Object.keys(s).forEach((function(t){e.values[t]=s[t].values()})),Object.keys(a).forEach((function(t){e.ranges[t]=a[t].ranges()})),e},h={ls:[],clear:function(){this.ls.forEach((function(e){return e.clear()}))},start:function(){this.ls.forEach((function(e){return e.start()}))},end:function(){this.ls.forEach((function(e){return e.end()}))},update:function(){var e=f();this.ls.forEach((function(t){return t._state(e)}))},updateValues:function(){var e=f();this.ls.forEach((function(t){return t._state({values:e.values})}))},updateRanges:function(){var e=f();this.ls.forEach((function(t){return t._state({ranges:e.ranges})}))}},d={configure:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Array.isArray(e.ranges)&&e.ranges.length&&(l={sources:{},default:F({},ra)},e.ranges.forEach((function(e){var t={};Object.keys(ra).filter((function(e){return"key"!==e})).forEach((function(n){t[n]=void 0!==e[n]?e[n]:ra[n]})),void 0!==e.key?l.sources[e.key]=t:l.default=t})),Object.keys(a).forEach((function(e){return a[e].configure(l.sources[e]||l.default)})),d.emit("update",[],[]))},link:function(e){if(d===e)throw new Error("Can't link to self");h.ls.push(e),e._state(f())},_state:function(e){if(!e)return f();if(e.values){var t=[];Object.keys(e.values).forEach((function(n){s[n]&&e.values[n].join(";")===s[n].toString()||t.push({key:n,values:e.values[n]})})),Object.keys(s).forEach((function(n){e.values[n]||t.push({key:n,values:[]})})),t.length&&d.setValues(t)}if(e.ranges){var n=[];Object.keys(e.ranges).forEach((function(t){a[t]&&e.ranges[t].join(";")===a[t].toString()||n.push({key:t,ranges:e.ranges[t]})})),Object.keys(a).forEach((function(t){e.ranges[t]||n.push({key:t,ranges:[]})})),n.length&&d.setRanges(n)}},start:function(){if(!o){o=!0;for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];d.emit.apply(d,["start"].concat(t)),h.start()}},end:function(){if(o){o=!1,a={},s={};for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];d.emit.apply(d,["end"].concat(t)),h.end()}},isActive:function(){return o},clear:function(){var e=d.brushes().filter((function(e){return"value"===e.type&&e.brush.values().length})).map((function(e){return{id:e.id,values:e.brush.values()}})),t=Object.keys(a).length>0||e.length;a={},s={},t&&(d.emit("update",[],e),h.clear())},brushes:function(){var e=[];return e=(e=e.concat(Object.keys(a).map((function(e){return{type:"range",id:e,brush:a[e]}})))).concat(Object.keys(s).map((function(e){return{type:"value",id:e,brush:s[e]}})))},addValue:function(e,t){d.addValues([{key:e,value:t}])},addValues:function(e){var t=fa(c.addValues,e,u),r=ia({vc:n,collection:s,items:t});d.emit("add-values",t),r.length&&(o||(o=!0,d.emit("start")),d.emit("update",r,[]),h.updateValues())},setValues:function(e){var t=fa(c.setValues,e,u),r=ca({items:t,vCollection:s,vc:n});d.emit("set-values",t),(r[0].length>0||r[1].length>0)&&(o||(o=!0,d.emit("start")),d.emit("update",r[0],r[1]),h.updateValues())},removeValue:function(e,t){d.removeValues([{key:e,value:t}])},removeValues:function(e){var t=fa(c.removeValues,e,u),n=oa({collection:s,items:t});d.emit("remove-values",t),n.length&&(d.emit("update",[],n),h.updateValues())},addAndRemoveValues:function(e,t){var r=fa(c.addValues,e,u),i=fa(c.removeValues,t,u),a=ia({vc:n,collection:s,items:r}),l=oa({collection:s,items:i});d.emit("add-values",r),d.emit("remove-values",i),(a.length||l.length)&&(o||(o=!0,d.emit("start")),d.emit("update",a,l),h.updateValues())},toggleValue:function(e,t){d.toggleValues([{key:e,value:t}])},toggleValues:function(e){var t=fa(c.toggleValues,e,u),r=ua({items:t,values:s,vc:n});d.emit("toggle-values",t),(r[0].length>0||r[1].length>0)&&(o||(o=!0,d.emit("start")),d.emit("update",r[0],r[1]),h.updateValues())},containsValue:function(e,t){var n=u[e]||e;return!!s[n]&&s[n].contains(t)},addRange:function(e,t){d.addRanges([{key:e,range:t}])},addRanges:function(e){pa(e,"add",{ranges:a,rc:i,interceptors:c,aliases:u,rangeConfig:l})&&(o||(o=!0,d.emit("start")),d.emit("update",[],[]),h.updateRanges())},removeRange:function(e,t){d.removeRanges([{key:e,range:t}])},removeRanges:function(e){pa(e,"remove",{ranges:a,rc:i,interceptors:c,aliases:u,rangeConfig:l})&&(o||(o=!0,d.emit("start")),d.emit("update",[],[]),h.updateRanges())},setRange:function(e,t){d.setRanges([{key:e,range:t}])},setRanges:function(e){pa(e,"set",{ranges:a,rc:i,interceptors:c,aliases:u,rangeConfig:l})&&(o||(o=!0,d.emit("start")),d.emit("update",[],[]),h.updateRanges())},toggleRange:function(e,t){d.toggleRanges([{key:e,range:t}])},toggleRanges:function(e){pa(e,"toggle",{ranges:a,rc:i,interceptors:c,aliases:u,rangeConfig:l})&&(o||(o=!0,d.emit("start")),d.emit("update",[],[]),h.updateRanges())},containsRangeValue:function(e,t){var n=u[e]||e;return!!a[n]&&a[n].containsValue(t)},containsRange:function(e,t){var n=u[e]||e;return!!a[n]&&a[n].containsRange(t)},containsMappedData:function(e,t,n){for(var r,i,o,l,c=[],f=Object.keys(e),h=0,d=f.length;h<d;h++){if("value"===(r=f[h]))i=e,c[h]={key:"",i:h,bool:!1};else{if("source"===r)continue;i=e[r],c[h]={key:r,i:h,bool:!1}}void 0!==(o=i.source&&i.source.field)&&(void 0!==i.source.key&&(o="".concat(i.source.key,"/").concat(o)),o in u&&(o=u[o]),l=i.value,a[o]?c[h].bool=Array.isArray(l)?a[o].containsRange({min:l[0],max:l[1]}):a[o].containsValue(l):s[o]&&s[o].contains(l)&&(c[h].bool=!0))}return t?(c=c.filter((function(e){return-1!==t.indexOf(e.key)})),"and"===n?!!c.length&&!c.some((function(e){return!1===e.bool})):"xor"===n?!!c.length&&c.some((function(e){return e.bool}))&&c.some((function(e){return!1===e.bool})):c.some((function(e){return e.bool}))):c.some((function(e){return e.bool}))},intercept:function(e,t){var n=ha(e);c[n]&&c[n].push(t)},removeInterceptor:function(e,t){var n=ha(e);if(c[n]){var r=c[n].indexOf(t);-1!==r&&c[n].splice(r,1)}},removeAllInterceptors:function(e){var t=[];if(e){var n=ha(e);c[n]&&c[n].length&&t.push({name:e,handlers:c[n]})}else Object.keys(c).forEach((function(e){c[e].length&&t.push({name:da(e),handlers:c[e]})}));t.forEach((function(e){e.handlers.slice().forEach((function(t){return d.removeInterceptor(e.name,t)}))}))},addKeyAlias:function(e,t){u[e]=t},removeKeyAlias:function(e){delete u[e]}};return $o(d),d}function ga(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}function ya(e,t){return e.data?e.data.value:"text"===e.type?e.text:t}function va(e,t,n){var r,i=e.old,o=e.current,a=t.renderer,s=[],u={nodes:[],ips:[]},l={nodes:[],ips:[]},c={nodes:[],ips:[]},f=[],h=null,d=n.trackBy||ya,p={start:function(){var e={};i.forEach((function(t,n){var r=d(t,n);e[r]=t})),o.forEach((function(t,n){var r=d(t,n);e[r]?(c.ips.push(zi(e[r],t)),c.nodes.push(t),s.push(e[r]),e[r]=!1):(u.nodes.push(t),u.ips.push(zi({r:.001,opacity:0},t)))})),Object.keys(e).forEach((function(t){e[t]&&(l.nodes.push(e[t]),l.ips.push(zi(e[t],F({},e[t],{r:1e-4,opacity:0}))))})),f.push({easing:ga,duration:200,tweens:l.ips,nodes:[].concat(s)}),f.push({easing:ga,duration:400,tweens:c.ips,nodes:[]}),f.push({easing:ga,duration:200,tweens:u.ips,nodes:oe(c.nodes)}),f.length&&(h=a.getScene(o),f[0].started=Date.now(),"undefined"!=typeof window&&(r=window.requestAnimationFrame(p.tick)))},tick:function(){var e=f[0];e||p.stop(),e.started||(e.started=Date.now());var t=(Date.now()-e.started)/e.duration,n=[],i=e.tweens.map((function(n){return n(e.easing(Math.min(1,t)))}));n.push.apply(n,oe(i)),n.push.apply(n,oe(e.nodes)),a.render(n),t>=1&&(f.shift(),f.length||p.stop()),r&&(r=window.requestAnimationFrame(p.tick))},stop:function(){r&&(window.cancelAnimationFrame(r),r=!1)},inProgress:function(){return!!r},get targetScene(){return h}};return p}kt();var ba={fontFamily:"Arial",fontSize:"13px",color:"#595959",backgroundColor:"#ffffff",stroke:"#000000",strokeWidth:0,$fill:"#333333"},xa=/^\$/;function wa(e){var t=W(e);return"object"!==t&&"function"!==t&&"undefined"!==t}function ka(e,t,n){var r=e[t];r&&r.scale&&r.scale.pxScale?r.scale=r.scale.pxScale(n):r&&r.pxScale&&(e[t]=r.pxScale(n))}function Ma(e,t){return e.pxScale?e.pxScale(t):e}var _a={normalizeSettings:function(e,t,n){var r=F({},e),i=F({},t);return Object.keys(r).forEach((function(e){i[e]={};var o=r[e],a=W(o);if("function"==typeof o)i[e].fn=o;else if(wa(o)){var s=t[e];"string"==typeof s&&xa.test(s)&&(s=ba[s]);var u=W(s);i[e]="undefined"===u||u===a?o:s}else o&&"object"===W(o)&&("function"==typeof o.fn&&(i[e].fn=o.fn),void 0!==o.scale&&(i[e].scale=n.scale(o.scale)),"string"==typeof o.ref&&(i[e].ref=o.ref))})),Object.keys(t).forEach((function(e){if(!(e in r)){var n=t[e];"string"===W(n)&&xa.test(n)?i[e]=ba[n]:i[e]=n}})),i},resolveForItem:function(e,t,n){for(var r={},i=Object.keys(t),o=i.length,a=e.datum,s=e.datum,u=0;u<o;u++){var l=i[u],c=t[l],f="object"===W(s)&&void 0!==c,h=f&&"string"==typeof c.ref,d=f&&l in s,p=h?s[c.ref]:d?s[l]:a;wa(c)?r[l]=c:f&&c.fn?(c.scale&&(e.scale=c.scale),r[l]=c.fn.call(null,e,n)):f&&c.scale&&p?(r[l]=c.scale(p.value),c.scale.bandwidth&&(r[l]+=c.scale.bandwidth()/2)):h&&p?r[l]=p.value:c.fn?r[l]=c.fn.call(null,e,n):r[l]=c}return r},updateScaleSize:ka};function Sa(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_a,n={};function r(r){var i=r.data,o=r.settings,a=r.defaults,s=void 0===a?{}:a,u=r.scaled,l=n.norm=t.normalizeSettings(o,s,e.chart),c={scale:e.chart.scale,formatter:e.chart.formatter};u&&Object.keys(u).forEach((function(e){l[e]&&t.updateScaleSize(l,e,u[e])}));var f=[];if(!i||!Array.isArray(i.items)){var h={data:i,resources:c},d=t.resolveForItem(h,n.norm,-1);return{settings:n.norm,item:d}}for(var p,m=0,g=i.items.length;m<g;m++){p={datum:i.items[m],data:i,resources:c};var y=t.resolveForItem(p,n.norm,m);y.data=i.items[m],f.push(y)}return{settings:n.norm,items:f}}return{resolve:r}}function qa(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.reduce((function(e,t){return Array.isArray(t.children)?(e.push.apply(e,oe(qa(t.children))),e):(e.push(t),e)}),[])}function Da(e,t){var n=t.context,r=t.data,i=t.style,o=t.filter,a=t.mode,s=e.chart.brush(n),u=r,l=i.active||{},c=i.inactive||{},f=[];Object.keys(l).forEach((function(e){f.push(e)})),Object.keys(c).forEach((function(e){-1===f.indexOf(e)&&f.push(e)}));var h=[],d=!1,p=function(){var t=qa(e.nodes);return"function"==typeof o&&(t=t.filter(o)),t},m=function(){for(var e,t=p(),n=t.length,r=!1,i="function"==typeof u?u({brush:s}):u,o=function(n){if(!(e=t[n].data))return"continue";t[n].__style||(t[n].__style={},f.forEach((function(e){t[n].__style[e]=t[n][e]})));var o=s.containsMappedData(e,i,a),u=h.indexOf(t[n]),p=!1;if(o&&-1===u?(h.push(t[n]),p=!0):o||-1===u||(h.splice(u,1),p=!0),p||d){var m=F({},t[n],t[n].__style);f.forEach((function(e){t[n][e]=o&&e in l?"function"==typeof l[e]?l[e].call(null,m):l[e]:!o&&e in c?"function"==typeof c[e]?c[e].call(null,m):c[e]:t[n].__style[e]})),r=!0}},m=0;m<n;m++)o(m);return d=!1,r},g=function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{suppressRender:!1},n=t.suppressRender,r=p(),i=r.length,o=function(e){if(!r[e].data)return"continue";r[e].__style=r[e].__style||{},f.forEach((function(t){r[e].__style[t]=r[e][t],t in c&&(r[e][t]="function"==typeof c[t]?c[t].call(null,r[e]):c[t])}))},a=0;a<i;a++)o(a);d=!0,h.length=0,n||e.renderer.render(e.nodes)},y=function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{suppressRender:!1},n=t.suppressRender,r=p(),i=r.length,o=function(e){r[e].__style&&(Object.keys(r[e].__style).forEach((function(t){r[e][t]=r[e].__style[t]})),r[e].__style=void 0)},a=0;a<i;a++)o(a);h.length=0,n||e.renderer.render(e.nodes)},v=function(){m()&&e.renderer.render(e.nodes)};return s.on("start",g),s.on("end",y),s.on("update",v),{isActive:function(){return s.isActive()},update:function(){h.length=0,d=!0,m()},cleanUp:function(){s.removeListener("start",g),s.removeListener("end",y),s.removeListener("update",v)}}}function Ca(e){for(var t=e.nodes,n=e.action,r=e.chart,i=e.trigger,o=[],a=0;a<t.length;a++){var s=t[a].data;null!==s&&o.push(s)}!function(e){var t=e.dataPoints,n=e.action,r=e.chart,i=e.trigger;if(i){var o=i.data||[""],a={items:[],actionFn:"toggleRanges"},s={items:[],actionFn:"toggleValues"};-1!==["add","remove","set","toggle"].indexOf(n)&&(a.actionFn="".concat(n,"Ranges"),s.actionFn="".concat(n,"Values"));for(var u=function(e){var n=t[e];if(!n)return"continue";o.forEach((function(e){var t=n&&!e?n:n[e];if(t){var r={key:t.source.field};void 0!==t.source.key&&(r.key="".concat(t.source.key,"/").concat(t.source.field)),Array.isArray(t.value)?(r.range={min:t.value[0],max:t.value[1]},a.items.push(r)):(r.value=t.value,s.items.push(r))}}))},l=0;l<t.length;l++)u(l);i.contexts.forEach((function(e){a.items.length?r.brush(e)[a.actionFn](a.items):r.brush(e)[s.actionFn](s.items)}))}}({dataPoints:o,action:n,chart:r,trigger:i})}function Ea(e){var t=e.collisions,n=e.t,r=e.config,i=e.action,o=[],a=!1;return t.length>0&&(o=t,a=!0,"stop"===n.propagation&&(o=[t[t.length-1]])),Ca({nodes:o.map((function(e){return e.node})),action:i,chart:r.chart,data:r.data,trigger:n}),a}function Aa(e,t,n){var r=n.element().getBoundingClientRect(),i=ue(e)?function(e,t){return 1!==e.changedTouches.length?null:{x:e.changedTouches[0].clientX-t.left,y:e.changedTouches[0].clientY-t.top}}(e,r):function(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}(e,r);return null===i||i.x<0||i.y<0||i.x>r.width||i.y>r.height?[]:(t.touchRadius>0&&ue(e)?i={cx:i.x,cy:i.y,r:t.touchRadius}:t.mouseRadius>0&&!ue(e)&&(i={cx:i.x,cy:i.y,r:t.mouseRadius}),n.itemsAt(i))}function Ta(e,t,n){return e?"function"==typeof e?e(t):e:n}function Na(e){var t=e.e,n=e.t,r=e.config;return Ea({collisions:Aa(t,n,r.renderer),t:n,config:r,action:Ta(n.action,t,"toggle")})}function Ra(e){var t=e.e,n=e.t,r=e.config;return Ea({collisions:Aa(t,n,r.renderer),t:n,config:r,action:Ta(n.action,t,"set")})}var Oa={fill:"fill",stroke:"stroke",opacity:"opacity",strokeWidth:"stroke-width",strokeLinejoin:"stroke-linejoin",fontFamily:"font-family",fontSize:"font-size",baseline:"dominant-baseline",dominantBaseline:"dominant-baseline",anchor:"text-anchor",textAnchor:"text-anchor",maxWidth:"maxWidth",transform:"transform",strokeDasharray:"stroke-dasharray",id:"id"};function Ia(e,t){Object.keys(Oa).forEach((function(n){var r=t[n];void 0!==r&&(e[Oa[n]]=r)}))}function Pa(e){for(var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n="",r=0;r<e.length;r++){var i=e[r];n+=0===r?"M".concat(i.x," ").concat(i.y):"L".concat(i.x," ").concat(i.y),n+=" "}return t&&(n+="Z"),n}function La(e,t,n,r){var i=n/2,o=e-r/2,a=t-r/2,s=e-i,u=t-i;return[{x:o,y:a},{x:o,y:u},{x:o+r,y:u},{x:o+r,y:a},{x:s+n,y:a},{x:s+n,y:a+r},{x:o+r,y:a+r},{x:o+r,y:u+n},{x:o,y:u+n},{x:o,y:a+r},{x:s,y:a+r},{x:s,y:a}]}function ja(e){return-e/180*Math.PI}function za(e){return function(e){var t=(.5*(Math.floor(e/Math.PI*2)+2)+.25)*Math.PI,n=Math.cos(Math.abs(t-e))*Math.sqrt(2),r=n*Math.cos(e),i=n*Math.sin(e);return{x1:r<0?1:0,y1:i<0?1:0,x2:r>=0?r:r+1,y2:i>=0?i:i+1}}(ja(e))}function Fa(e,t){return{x:e.x+t.x,y:e.y+t.y}}function Ha(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ba(e,t){return{x:e.x*t,y:e.y*t}}function Va(e,t){return e.x-t.x}function Wa(e,t){return e.y-t.y}function Ua(e,t){return Math.pow(Va(e,t),2)+Math.pow(Wa(e,t),2)}function $a(e,t){return Math.sqrt(Ua(e,t))}function Ya(e,t){return e.x*t.x+e.y*t.y}function Ka(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{x:0,y:0},r=Math.cos(t),i=Math.sin(t),o=Ha(e,n),a={x:r*o.x-i*o.y,y:i*o.x+r*o.y};return Fa(a,n)}var Xa={up:0,down:180,left:90,right:-90};function Ga(e){var t=e.x,n=e.y,r=e.size,i=r/2;return{type:"rect",x:t-i,y:n-i,width:r,height:r}}var Ja=kt();function Za(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object.keys(t).forEach((function(n){void 0!==Oa[n]&&"transform"!==n&&(e[n]=t[n])}))}Ja.add("circle",(function(e){return{type:"circle",fill:"black",cx:e.x,cy:e.y,r:e.size/2}})),Ja.add("diamond",(function(e){var t=e.size,n=e.x-t/2,r=e.y-t/2;return{type:"path",fill:"black",d:Pa([{x:n,y:r+t/2},{x:n+t/2,y:r},{x:n+t,y:r+t/2},{x:n+t/2,y:r+t},{x:n,y:r+t/2}])}})),Ja.add("saltire",(function(e){var t=ja(45),n=e.size/2,r=isNaN(e.width)?n/2:e.width,i=Math.min(r,n),o=e.size,a=Math.sin(Math.asin(-t))*(i/2);o+=2*(n/Math.sin(-t)-n),o-=2*a;var s={x:e.x,y:e.y};return{type:"path",fill:"black",d:Pa(La(e.x,e.y,o,i).map((function(e){return Ka(e,t,s)})))}})),Ja.add("square",(function(e){var t=e.size;return{type:"rect",fill:"black",x:e.x-t/2,y:e.y-t/2,width:t,height:t}})),Ja.add("triangle",(function(e){var t=e.size,n={x:e.x,y:e.y},r=Xa[e.direction]||0,i=t/2,o=e.x-i,a=e.y-i,s=[{x:o,y:a+t},{x:o+i,y:a},{x:o+t,y:a+t},{x:o,y:a+t}],u=ja(r);return{type:"path",fill:"black",d:Pa(s=s.map((function(e){return Ka(e,u,n)})))}})),Ja.add("line",(function(e){var t="vertical"===e.direction,n=e.size/2,r=e.x,i=e.y;return{type:"line",stroke:"black",strokeWidth:1,x1:r-(t?0:n),y1:i-(t?n:0),x2:r+(t?0:n),y2:i+(t?n:0),collider:Ga(e)}})),Ja.add("star",(function(e){for(var t=e.size,n=[],r=t/2,i=e.points||5,o=Math.min(e.innerRadius||t/2,t)/2,a=isNaN(e.startAngle)?90:e.startAngle,s=360/i,u=1;u<=i;u++){var l=s*u+a,c=ja(l),f=ja(l+s/2),h=Math.sin(c),d=Math.cos(c),p=Math.sin(f),m=Math.cos(f);n.push({x:e.x+d*r,y:e.y+h*r}),n.push({x:e.x+m*o,y:e.y+p*o})}return{type:"path",fill:"black",d:Pa(n)}})),Ja.add("n-polygon",(function(e){for(var t=[],n=e.size/2,r=Math.max(isNaN(e.sides)?6:e.sides,3),i=360/r,o=isNaN(e.startAngle)?0:e.startAngle,a=1;a<=r;a++){var s=ja(i*a+o),u=Math.sin(s),l=Math.cos(s);t.push({x:e.x+l*n,y:e.y+u*n})}return{type:"path",fill:"black",d:Pa(t)}})),Ja.add("cross",(function(e){var t=e.x,n=e.y,r=e.size/2,i=isNaN(e.width)?r/2:e.width,o=Math.min(i,r);return{type:"path",fill:"black",d:Pa(La(t,n,e.size,o))}})),Ja.add("bar",(function(e){var t={x:e.x,y:e.y},n="vertical"===e.direction,r=e.size/2,i=r/2/2,o=[{x:t.x-r,y:t.y+i},{x:t.x-r,y:t.y-i},{x:t.x+r,y:t.y-i},{x:t.x+r,y:t.y+i}];if(n){var a=ja(90);o=o.map((function(e){return Ka(e,a,t)}))}var s=pe(o);return s.type="rect",s.fill="black",s})),Ja.add("rect",(function(e){var t=e.x,n=e.y,r=e.size,i=void 0===e.width?r:e.width,o=void 0===e.height?r:e.height;return{type:"rect",fill:"black",x:t-i/2,y:n-o/2,width:i,height:o}}));var Qa=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ja;return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.get(t.type);if(n){var r=n(t);return Za(r,t),void 0!==t.data&&(r.data=t.data),r}return n}};function es(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.dock,r=void 0===n?"center":n,i=e.displayOrder,o=void 0===i?0:i,a=e.prioOrder,s=void 0===a?0:a,u=e.preferredSize,l=void 0===u?0:u,c=e.minimumLayoutMode,f=e.show,h=void 0===f||f;r=r||"center";var d={computePreferredSize:function(e){var n=e.inner,r=e.outer,i=e.children;return"function"==typeof l?l({inner:n,outer:r,children:i,dock:this.dock()},t):l},dock:function(e){return void 0!==e?(r=e,this):"function"==typeof r?r(t):r},displayOrder:function(e){return void 0!==e?(o=e,this):"function"==typeof o?o(t):o},prioOrder:function(e){return void 0!==e?(s=e,this):"function"==typeof s?s(t):s},minimumLayoutMode:function(e){return void 0!==e?(c=e,this):"function"==typeof c?c(t):c},show:function(e){return void 0!==e?(h=e,this):"function"==typeof h?h(t):h}};return d}function ts(e,t,n){var r=t.require,i=void 0===r?[]:r,o=t.mediator||{},a=n.settings,s=n.formatter,u=n.scale,l=n.data,c=n.renderer,f=n.chart,h=n.dockConfig,d=n.mediator,p=n.instance,m=n.rect,g=n.style,y=n.registries,v=n.resolver,b=n.update,x=n._DO_NOT_USE_getInfo,w=n.symbol,k=n.isVisible;e.emit=function(){},k&&(e.isVisible=k),Object.defineProperty(e,"settings",{get:a}),Object.defineProperty(e,"data",{get:l}),Object.defineProperty(e,"formatter",{get:s}),Object.defineProperty(e,"scale",{get:u}),Object.defineProperty(e,"mediator",{get:d}),Object.defineProperty(e,"style",{get:g}),Object.defineProperty(e,"registries",{get:y}),m&&Object.defineProperty(e,"rect",{get:m}),x&&(e._DO_NOT_USE_getInfo=x),Object.keys(t).forEach((function(n){var r;r=n,["on","preferredSize","created","beforeMount","mounted","resize","beforeUpdate","updated","beforeRender","render","beforeUnmount","beforeDestroy","destroyed","defaultSettings","data","settings","formatter","scale","chart","dockConfig","mediator","style","resolver","registries","_DO_NOT_USE_getInfo","symbol","isVisible"].some((function(e){return e===r}))||("function"==typeof t[n]?e[n]=t[n].bind(e):e[n]=t[n])})),i.forEach((function(t){"renderer"===t?Object.defineProperty(e,"renderer",{get:c}):"chart"===t?Object.defineProperty(e,"chart",{get:f}):"dockConfig"===t?Object.defineProperty(e,"dockConfig",{get:h}):"instance"===t?Object.defineProperty(e,"instance",{get:p}):"update"===t&&b?Object.defineProperty(e,"update",{get:b}):"resolver"===t?Object.defineProperty(e,"resolver",{get:v}):"symbol"===t&&Object.defineProperty(e,"symbol",{get:w})})),Object.keys(o).forEach((function(t){e.mediator.on(t,o[t].bind(e))}))}function ns(e,t,n){var r=function(t){return e[t]?(n.warn("Deprecation Warning the ".concat(t," property should be moved into layout: {} property")),e[t]):e.layout?e.layout[t]:void 0},i={};return i.displayOrder=r("displayOrder"),i.dock=r("dock"),i.prioOrder=r("prioOrder"),i.minimumLayoutMode=r("minimumLayoutMode"),e.layout=e.layout||{},e.layout.displayOrder=void 0!==i.displayOrder?i.displayOrder:e.layout.displayOrder,e.layout.prioOrder=void 0!==i.prioOrder?i.prioOrder:e.layout.prioOrder,e.layout.dock=i.dock||e.layout.dock,e.layout.minimumLayoutMode=i.minimumLayoutMode||e.layout.minimumLayoutMode,i.show=e.show,i.preferredSize=t,i}function rs(e,t,n){Object.keys(n.on||{}).forEach((function(r){e.eventListeners=e.eventListeners||[];var i=n.on[r].bind(e);e.eventListeners.push({event:r,listener:i}),t.on(r,i)})),e.emit=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return t.emit.apply(t,[e].concat(r))}}function is(e,t){e.eventListeners&&(e.eventListeners.forEach((function(e){var n=e.event,r=e.listener;t.removeListener(n,r)})),e.eventListeners.length=0),e.emit=function(){}}function os(e,t,n){return Fa(function(e,t){var n=Ya(e,t)/Ya(t,t)||1;return{x:t.x*n,y:t.y*n}}(Ha(n,e),Ha(t,e)),e)}function as(e,t,n){return $a(e,n)+$a(t,n)-$a(e,t)<1e-12}function ss(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 us(e){return e.x1===e.x2&&e.y1===e.y2}function ls(e){return e.width<=0||e.height<=0}function cs(e){return e.r<=0}function fs(e){return e.edges.length<=2}function hs(e,t){for(var n=0,r=t.edges.length;n<r;n++)if(!0===bs(e,me(t.edges[n])))return!0;return!1}function ds(e,t){for(var n=t.numPolygons,r=t.polygons,i=0;i<n;i++){if(!0===Cs(e,r[i]))return!0}return!1}function ps(e,t){return!cs(e)&&Ua({x:e.cx,y:e.cy},t)<=Math.pow(e.r,2)}function ms(e,t){if(ls(t)||cs(e))return!1;var n=t.width/2,r=t.height/2,i=t.x+n,o=t.y+r,a=e.r,s=e.cx,u=e.cy,l=Math.abs(s-i),c=Math.abs(u-o);return!(l>n+a||c>r+a)&&(l<=n||c<=r||Math.pow(l-n,2)+Math.pow(c-r,2)<=Math.pow(a,2))}function gs(e,t){if(cs(e)||us(t))return!1;var n=ie(he(t),2),r=n[0],i=n[1];if(ps(e,r)||ps(e,i))return!0;var o={x:e.cx,y:e.cy},a=os(r,i,o);return Ua(a,o)<=Math.pow(e.r,2)&&as(r,i,a)}function ys(e,t){if(fs(t)||cs(e))return!1;if(vs(t,{x:e.cx,y:e.cy}))return!0;for(var n=t.edges.length,r=0;r<n;r++){if(gs(e,me(t.edges[r])))return!0}return!1}function vs(e,t){if(fs(e)||!Ms(e.boundingRect(),t))return!1;var n,r,i,o,a,s=t.x,u=t.y,l=e.vertices;for(n=!1,o=-1,i=(r=l.length)-1;++o<r;i=o){if(l[o].x===s&&l[o].y===u)return!0;if(l[o].y===l[i].y&&l[o].y===u&&(s-l[o].x)*(s-l[i].x)<=0)return!0;if(l[o].y<u&&u<=l[i].y||l[i].y<u&&u<=l[o].y){if(s===(a=(l[i].x-l[o].x)*(u-l[o].y)/(l[i].y-l[o].y)+l[o].x))return!0;s<a&&(n=!n)}}return n}function bs(e,t){if(fs(e))return!1;for(var n=0,r=e.edges.length;n<r;n++){if(Ss(t,me(e.edges[n])))return!0}var i=ie(he(t),2),o=i[0],a=i[1];return vs(e,o)||vs(e,a)}function xs(e,t){if(fs(e))return!1;for(var n=0,r=e.edges.length;n<r;n++){if(_s(t,me(e.edges[n])))return!0}var i=ie(de(t),4),o=i[0],a=i[1],s=i[2],u=i[3];return vs(e,o)||vs(e,a)||vs(e,s)||vs(e,u)}function ws(e,t){return!ls(e)&&!ls(t)&&(e.x<=t.x+t.width&&t.x<=e.x+e.width&&e.y<=t.y+t.height&&t.y<=e.y+e.height)}function ks(e,t){return!ls(e)&&!ls(t)&&[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}].every((function(t){return Ms(e,t)}))}function Ms(e,t){return!ls(e)&&(t.x>=e.x&&t.x<=e.x+e.width&&t.y>=e.y&&t.y<=e.y+e.height)}function _s(e,t){if(us(t)||ls(e))return!1;var n=ie(he(t),2),r=n[0],i=n[1];if(Ms(e,r)||Ms(e,i))return!0;for(var o=de(e),a=o.length,s=0;s<a;s++){if(Ss(me([o[s],o[3!==s?s+1:0]]),t))return!0}return!1}function Ss(e,t){var n,r,i=ie(he(e),2),o=i[0],a=i[1],s=ie(he(t),2),u=s[0],l=s[1],c=Va(a,o),f=Wa(a,o),h=Va(l,u),d=Wa(l,u),p=Va(o,u),m=Wa(o,u),g=d*c-h*f,y=h*m-d*p,v=c*m-f*p;if(0===c&&0===f)return!1;if(0===h&&0===d)return!1;if(0===g){if(0===y&&0===v){if(0===c){if(0===f)return o.x===a.x&&o.y===a.y;n=Wa(u,o)/f,r=Wa(l,o)/f}else n=(u.x-o.x)/c,r=(l.x-o.x)/c;return!(n<0&&r<0||n>1&&r>1)}return!1}var b=y/g;return g=v/g,b>=0&&b<=1&&g>=0&&g<=1}function qs(e,t){if(us(e))return!1;var n=ie(he(e),2);return as(n[0],n[1],t)}function Ds(e,t){var n=e.boundingRect(),r=t.boundingRect();return!!ws(n,r)&&(ks(n,r)?hs(e,t):hs(t,e))}function Cs(e,t){var n=e.boundingRect(),r=t.boundingRect();return!!ws(n,r)&&(ks(r,n)?function(e,t){for(var n=e.numPolygons,r=e.polygons,i=0;i<n;i++)if(!0===Ds(t,r[i]))return!0;return!1}(e,t):function(e,t){for(var n=0,r=t.edges.length;n<r;n++)if(!0===Ts(e,me(t.edges[n])))return!0;return!1}(e,t))}function Es(e,t){if(cs(e))return!1;if(As(t,{x:e.cx,y:e.cy}))return!0;for(var n=t.numPolygons,r=t.polygons,i=0;i<n;i++)for(var o=r[i],a=o.edges.length,s=0;s<a;s++){if(gs(e,me(o.edges[s])))return!0}return!1}function As(e,t){if(!Ms(e.boundingRect(),t))return!1;var n,r,i,o,a,s,u=t.x,l=t.y,c=e.numPolygons,f=!1;for(r=0;r<c;r++)for(a=-1,o=(i=(n=e.vertices[r]).length)-1;++a<i;o=a){if(n[a].x===u&&n[a].y===l)return!0;if(n[a].y===n[o].y&&n[a].y===l&&(u-n[a].x)*(u-n[o].x)<=0)return!0;if(n[a].y<l&&l<=n[o].y||n[o].y<l&&l<=n[a].y){if(u===(s=(n[o].x-n[a].x)*(l-n[a].y)/(n[o].y-n[a].y)+n[a].x))return!0;u<s&&(f=!f)}}return f}function Ts(e,t){var n=ie(he(t),2),r=n[0],i=n[1];if(As(e,r)||As(e,i))return!0;for(var o=e.numPolygons,a=e.polygons,s=0;s<o;s++)for(var u=a[s],l=0,c=u.edges.length;l<c;l++){if(Ss(t,me(u.edges[l])))return!0}return!1}function Ns(e,t){var n=ie(de(t),4),r=n[0],i=n[1],o=n[2],a=n[3];if(As(e,r)||As(e,i)||As(e,o)||As(e,a))return!0;for(var s=e.numPolygons,u=e.polygons,l=0;l<s;l++)for(var c=u[l],f=0,h=c.edges.length;f<h;f++){if(_s(t,me(c.edges[f])))return!0}return!1}var Rs=/^\$/,Os="@extend";function Is(e){throw new Error('Cyclical reference for "'.concat(e,'"'))}function Ps(e,t,n){if("string"==typeof e){var r=t[e];return-1!==n.indexOf(e)&&Is(e),Rs.test(r)?(n.push(e),Ps(r,t,n)):r}var i=e,o=F(!0,{},t,e),a={};if(e[Os]){var s=e[Os];-1!==n.indexOf(s)&&Is(s);var u=n.slice();u.push(s),i=F(!0,{},Ps(o[s],t,u),e)}return Object.keys(i).forEach((function(e){var t=n.slice();if(e!==Os&&!Rs.test(e)){a[e]=i[e];var r=a[e];Rs.test(r)&&r in o?(-1!==n.indexOf(r)&&Is(r),t.push(r),"object"===W(r=o[r])||Rs.test(r)&&r in o?a[e]=Ps(r,o,t):a[e]=r):"object"===W(r)&&(a[e]=Ps(r,o,t))}})),a}function Ls(e,t){return Ps(e,t,[])}function js(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 zs(e,t){var n={x:0,y:0,width:0,height:0},r={x:0,y:0,width:0,height:0};return n.width=e.width||0,n.height=e.height||0,void 0!==t.size&&(n.width=isNaN(t.size.width)?n.width:t.size.width,n.height=isNaN(t.size.height)?n.height:t.size.height),void 0!==t.logicalSize?(r.width=isNaN(t.logicalSize.width)?n.width:t.logicalSize.width,r.height=isNaN(t.logicalSize.height)?n.height:t.logicalSize.height,r.align=isNaN(t.logicalSize.align)?.5:Math.min(Math.max(t.logicalSize.align,0),1),r.preserveAspectRatio=t.logicalSize.preserveAspectRatio):(r.width=n.width,r.height=n.height,r.preserveAspectRatio=!1),js(r),js(n),{logicalContainerRect:r,containerRect:n}}function Fs(e){var t={center:{minWidthRatio:.5,minHeightRatio:.5,minWidth:0,minHeight:0}};return F(!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 Hs(e,t,n,r,i){return{x:isNaN(e)?0:e,y:isNaN(e)?0:t,width:isNaN(e)?0:n,height:isNaN(e)?0:r,margin:isNaN(i)?0:i}}function Bs(e,t,n){if(void 0===e.cachedSize){var r,i=e.config.dock(),o=e.comp.preferredSize({inner:t,outer:n,dock:i});isNaN(o)?o&&!isNaN(o.size)&&(o.width=o.size,o.height=o.size):o={width:o,height:o},r="top"===i||"bottom"===i?o.height:"right"===i||"left"===i?o.width:Math.max(o.width,o.height),e.cachedSize=Math.ceil(r),e.edgeBleed=o.edgeBleed||0}return e.cachedSize}function Vs(e,t){switch(t.config.dock()){case"top":e.y+=t.cachedSize,e.height-=t.cachedSize;break;case"bottom":e.height-=t.cachedSize;break;case"left":e.x+=t.cachedSize,e.width-=t.cachedSize;break;case"right":e.width-=t.cachedSize}}function Ws(e,t){var n=t.edgeBleed;n&&(e.left=Math.max(e.left,n.left||0),e.right=Math.max(e.right,n.right||0),e.top=Math.max(e.top,n.top||0),e.bottom=Math.max(e.bottom,n.bottom||0))}function Us(e,t,n){t.x<n.left&&(t.width-=n.left-t.x,t.x=n.left);var r=e.width-(t.x+t.width);r<n.right&&(t.width-=n.right-r),t.y<n.top&&(t.height-=n.top-t.y,t.y=n.top);var i=e.height-(t.y+t.height);i<n.bottom&&(t.height-=n.bottom-i)}function $s(e,t,n,r,i){var o=F({},t),a=F({},n);return Vs(o,r),Ws(a,r),Us(e,o,a),!!function(e,t,n){var r=Math.min(n.center.minWidth,e.width)||Math.max(e.width*n.center.minWidthRatio,1),i=Math.min(n.center.minHeight,e.height)||Math.max(e.height*n.center.minHeightRatio,1);return t.width>=r&&t.height>=i}(e,o,i)&&(Vs(t,r),Ws(n,r),!0)}function Ys(e){var t=e.layoutRect,n=e.visible,r=e.hidden,i=e.settings,o=Hs(t.x,t.y,t.width,t.height),a={left:0,right:0,top:0,bottom:0},s=n.slice();s.sort((function(e,t){return e.config.prioOrder()-t.config.prioOrder()}));for(var u=0;u<s.length;++u){var l=s[u];Bs(l,o,t),$s(t,o,a,l,i)||(r.push(s.splice(u,1)[0]),--u)}!function(e,t){if(0!==t.length)for(var n=0;n<e.length;++n){var r=e[n];r.referencedDocks.length&&r.referencedDocks.every((function(e){return t.some((function(t){return t.key===e}))}))&&t.push(e.splice(n,1)[0])}}(n,r);var c=n.filter((function(e){return-1!==s.indexOf(e)}));return n.length=0,n.push.apply(n,oe(c)),Us(t,o,a),o}function Ks(e){return{x:e.margin.left+e.x*e.scaleRatio.x,y:e.margin.top+e.y*e.scaleRatio.y,width:e.width*e.scaleRatio.x,height:e.height*e.scaleRatio.y}}function Xs(e){var t;return pe((t=[]).concat.apply(t,oe(e.map(de))))}function Gs(e){var t=e.visible,n=e.layoutRect,r=e.reducedRect,i=e.containerRect,o=e.translation,a=Hs(r.x,r.y,r.width,r.height),s=Hs(r.x,r.y,r.width,r.height),u={},l=t.slice(),c=l.slice().sort((function(e,t){return e.config.displayOrder()-t.config.displayOrder()}));return t.sort((function(e,t){if(e.referencedDocks.length>0&&t.referencedDocks.length>0)return 0;if(t.referencedDocks.length>0)return-1;if(e.referencedDocks.length>0)return 1;var n=e.config.displayOrder()-t.config.displayOrder();return 0===n?l.indexOf(e)-l.indexOf(t):n})).forEach((function(e){var t={},l={};switch(e.config.dock()){case"top":t.height=l.height=e.cachedSize,t.width=n.width,l.width=a.width,t.x=n.x,l.x=a.x,t.y=l.y=a.y-e.cachedSize,a.y-=e.cachedSize,a.height+=e.cachedSize;break;case"bottom":t.x=n.x,l.x=a.x,t.y=l.y=a.y+a.height,t.width=n.width,l.width=a.width,t.height=l.height=e.cachedSize,a.height+=e.cachedSize;break;case"left":t.x=l.x=s.x-e.cachedSize,t.y=n.y,l.y=s.y,t.width=l.width=e.cachedSize,t.height=n.height,l.height=s.height,s.x-=e.cachedSize,s.width+=e.cachedSize;break;case"right":t.x=l.x=s.x+s.width,t.y=n.y,l.y=s.y,t.width=l.width=e.cachedSize,t.height=n.height,l.height=s.height,s.width+=e.cachedSize;break;case"center":t.x=l.x=r.x,t.y=l.y=r.y,t.width=l.width=r.width,t.height=l.height=r.height;break;default:if(e.referencedDocks.length>0){var c=e.referencedDocks.map((function(e){return u[e]})).filter((function(e){return!!e}));c.length>0&&(t=Xs(c.map((function(e){return e.outerRect}))),l=Xs(c.map((function(e){return e.r}))))}}e.key&&(u[e.key]={r:l,outerRect:t}),function(e,t,n,r){var i={x:r.width/n.width,y:r.height/n.height},o={left:0,top:0};if(n.preserveAspectRatio){var a=i.x<i.y,s=Math.min(i.x,i.y);i.x=s,i.y=s;var u=a?"height":"width",l=(r[u]-n[u]*i.x)*n.align;o.left=a?0:l,o.top=a?l:0}e.scaleRatio=i,e.margin=o,t.scaleRatio=i,t.margin=o,n.scaleRatio=i,n.margin=o}(l,t,n,i),l.edgeBleed=e.edgeBleed,l.computed=Ks(l),t.edgeBleed=e.edgeBleed,t.computed=Ks(t),l.x+=o.x,l.y+=o.y,t.x+=o.x,t.y+=o.y,e.comp.resize(l,t),e.cachedSize=void 0,e.edgeBleed=void 0})),c}function Js(e,t,n){var r=e.layoutModes||{},i=t.minimumLayoutMode(),o=t.show();return o&&"object"===W(i)?o=r[i.width]&&r[i.height]&&n.width>=r[i.width].width&&n.height>=r[i.height].height:o&&void 0!==i&&(o=r[i]&&n.width>=r[i].width&&n.height>=r[i].height),o}function Zs(e){if(!e.resize||"function"!=typeof e.resize)throw new Error("Component is missing resize function");if(!e.dockConfig&&!e.preferredSize)throw new Error("Component is missing preferredSize function")}function Qs(e,t,n){for(var r=[],i=[],o=0;o<e.length;++o){var a=e[o];Zs(a);var s=a.dockConfig,u=a.key,l=s.dock(),c=/@/.test(l)?l.split(",").map((function(e){return e.replace(/^\s*@/,"")})):[];Js(t,s,n)?r.push({comp:a,key:u,config:s,referencedDocks:c}):i.push({comp:a,key:u,config:s,referencedDocks:c})}return[r,i]}var eu=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.hasKey&&r.key===t)return e[n]}return null},tu=function e(t){return null==t?void 0:t.map((function(t){var n=t.instance.dockConfig();return{preferredSize:function(r){return n.computePreferredSize(V(V({},r),{},{children:e(t.children)}))}}}))},nu=function(e,t){return{visible:[],hidden:t,ordered:[]}},ru=function(e){return function(t,n){var r,i=n.map((function(e,t){var n=e.instance.dockConfig();return{index:t,key:e.key,dockConfig:n,resize:e.instance.resize,preferredSize:function(t){return n.computePreferredSize(V(V({},t),{},{children:tu(e.children)}))}}})),o=function(e){return n[e.index]},a=null!==(r=e(t,i))&&void 0!==r?r:{},s=a.visible,u=void 0===s?i:s,l=a.hidden,c=void 0===l?[]:l,f=a.ordered,h=void 0===f?u:f;return{visible:u.map(o),hidden:c.map(o),ordered:h.map(o)}}},iu=function(e){var t,n=(t=Fs(e),{layout:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!e||isNaN(e.x)||isNaN(e.y)||isNaN(e.width)||isNaN(e.height))throw new Error("Invalid rect");if(!n.length)return{visible:[],hidden:[],ordered:[]};var r=zs(e,t),i=r.logicalContainerRect,o=r.containerRect,a=ie(Qs(n,t,i),2),s=a[0],u=a[1],l=Gs({visible:s,layoutRect:i,reducedRect:Ys({layoutRect:i,visible:s,hidden:u,settings:t}),containerRect:o,translation:{x:e.x,y:e.y}});return u.forEach((function(e){e.comp.visible=!1;var t=Hs();e.comp.resize(t,t)})),{visible:s.map((function(e){return e.comp})),hidden:u.map((function(e){return e.comp})),ordered:l.map((function(e){return e.comp}))}},settings:function(e){t=Fs(e)}});return ru((function(e,t){return n.layout(e,t)}))},ou=function(e){return"function"==typeof e?ru(e):iu(e)};function au(e){var t=e.createComponent,n={},r=[],i=[],o=function e(n){var i=t(n);return i&&(r.push(i),n.components&&(i.children=n.components.map((function(t){return e(t)})).filter((function(e){return!!e})))),i},a=function e(t,n){for(var i=function(i){var o=t[i],a=n.find((function(e){return o.hasKey&&o.key===e.key}));a?o.children&&a.components&&e(o.children,a.components):(t.splice(i,1),function(e){var t=r.indexOf(e);-1!==t&&r.splice(t,1)}(o),o.children&&e(o.children,[]),o.instance.destroy())},o=t.length-1;o>=0;o--)i(o)},s=function e(t){var n=t.compList,r=t.data,i=t.excludeFromUpdate,a=t.formatters,s=t.scales;return t.settingsList.map((function(t){var u=eu(n,t.key);return i.indexOf(t.key)>-1?u:u?t.rendererSettings&&"function"==typeof t.rendererSettings.transform&&t.rendererSettings.transform()?(u.applyTransform=!0,u.instance.renderer().settings(t.rendererSettings),u):(u.updateWith={formatters:a,scales:s,data:r,settings:t},t.components&&(u.children=e({compList:u.children||[],data:r,excludeFromUpdate:i,formatters:a,scales:s,settingsList:t.components})),u):o(t)})).filter((function(e){return!!e}))},u=function e(t){var n=t.components,r=t.hidden,i=t.layoutFn,o=t.ordered,a=t.rect,s=t.visible,u=i(a,n),l=u.visible,c=u.hidden,f=u.ordered;s.push.apply(s,oe(l)),r.push.apply(r,oe(c)),o.push.apply(o,oe(f)),l.forEach((function(t){if(t.children){var n,i,a=ou(null!==(n=null===(i=t.settings)||void 0===i?void 0:i.strategy)&&void 0!==n?n:{});e({components:t.children,hidden:r,layoutFn:a,ordered:o,rect:t.instance.getRect(),visible:s})}})),c.forEach((function(t){t.children&&e({components:t.children,hidden:r,layoutFn:nu,ordered:o,rect:null,visible:s})}))};return n.destroy=function(){r.forEach((function(e){return e.instance.destroy()})),r=[],i=[]},n.findComponentByKey=function(e){return eu(r,e)},n.forEach=function(e){r.forEach(e)},n.layout=function(e){var t=e.layoutSettings,n=e.rect,r=[],o=[],a=[],s=ou(t);return u({components:i,hidden:o,layoutFn:s,ordered:a,rect:n,visible:r}),{visible:r,hidden:o,ordered:a}},n.set=function(e){var t=e.components;i=t.map((function(e){return o(e)})).filter((function(e){return!!e}))},n.update=function(e){var t=e.components,n=e.data,r=e.excludeFromUpdate,o=e.formatters,u=e.scales;a(i,t),i=s({compList:i,data:n,excludeFromUpdate:r,formatters:o,scales:u,settingsList:t})},n}function su(e,t,n){var r=t.left-n.left,i=t.top-n.top,o=ge(e),a=F(!0,{},e);switch(o){case"circle":a.cx+=r,a.cy+=i;break;case"polygon":for(var s=0,u=a.vertices.length;s<u;s++){var l=a.vertices[s];l.x+=r,l.y+=i}break;case"geopolygon":for(var c=0;c<a.vertices.length;c++)for(var f=a.vertices[c],h=0,d=f.length;h<d;h++){var p=f[h];p.x+=r,p.y+=i}break;case"line":a.x1+=r,a.y1+=i,a.x2+=r,a.y2+=i;break;case"point":case"rect":a.x+=r,a.y+=i}return a}function uu(e,t){var n=[],r=0;t.forEach((function(e){n.push(r),r++;var t=e.instance.def.additionalElements&&e.instance.def.additionalElements();t&&(r+=t.length)})),t.forEach((function(t,r){return function(e,t,n){var r=t.instance.renderer().element();if(!isNaN(n)&&r&&e&&e.children){var i=e.children[Math.max(0,n)];if(r!==i){var o=t.instance.def.additionalElements&&t.instance.def.additionalElements().filter(Boolean);e.insertBefore&&void 0!==i?(e.insertBefore(r,i),o&&o.forEach((function(t){e.insertBefore(t,r)}))):(o&&o.forEach((function(t){e.appendChild(t,r)})),e.appendChild(r))}}}(e,t,n[r])}))}function lu(e,t){var n=e.element,r=e.data,i=void 0===r?[]:r,o=e.settings,a=void 0===o?{}:o,s=e.on,u=void 0===s?{}:s,l=t.registries,c=t.logger,f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={},n=e,r=function(e){e.forEach((function(e){var n=Array.isArray(e.colors[0])?e.colors:[e.colors];t[e.key]={colors:n,sizes:n.map((function(e){return e?e.length:0}))}}))},i=function(e,n){var r=t[e];if(!r)return[];for(var i=r.sizes,o=0;o<i.length;o++)if(n<=i[o])return r.colors[o];return r.colors[i.length-1]},o={palette:function(e,t){return i(e,t)},setPalettes:r,style:function(e){return Ls(e,n)},setStyle:function(t){n=F({},e,t)}};return r(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]),o}(t.style,t.palettes),h=[],d=F({},e),p=function(){var e={};return $o(e),e}(),m=[],g=null,y=null,v=null,b=[],x=function(){},w=function(){},k={},M=!1,_=au({createComponent:function(e){return l.component.has(e.type)?{instance:function(e){var t,n,r,i,o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=e.defaultSettings,u=void 0===s?{}:s,l=e._DO_NOT_USE_getInfo,c=void 0===l?function(){return{}}:l,f=a.chart,h=a.container,d=a.mediator,p=a.registries,m=a.theme,g=a.renderer,y=$o({}),v=a.settings||{},b=F(!0,{},u,v),x=[],w=Sa({chart:f}),k=!1,M={nodes:[],chart:f,config:b.brush||{},renderer:null},_={tap:[],over:[]},S=[],q={},D=F({},v);function C(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(){for(var i,o,a,s=void 0!==e[t],u=void 0!==v[t],l=arguments.length,c=new Array(l),f=0;f<l;f++)c[f]=arguments[f];return s&&("function"==typeof e[t]?i=(o=e[t]).call.apply(o,[q].concat(c)):r&&(i=e[t])),u&&("function"==typeof v[t]?i=(a=v[t]).call.apply(a,[D].concat(c)):r&&(i=v[t])),s||u||(i=n.call.apply(n,[q].concat(c))),i}}var E=C("preferredSize",(function(){return 0}),!0),A=C("resize",(function(e){return e.inner})),T=C("created"),N=C("beforeMount"),R=C("mounted"),O=C("beforeUnmount"),I=C("beforeUpdate"),P=C("updated"),L=C("beforeRender"),j=C("beforeDestroy"),z=C("destroyed"),H=e.render,B=function(){b.brush&&(b.brush.consume||[]).forEach((function(e){e.context&&e.style&&S.push(Da(M,e))}))},V=function(){b.brush&&(b.brush.trigger||[]).forEach((function(e){"over"===e.on?_.over.push(e):_.tap.push(e)}))};Object.defineProperty(M,"data",{get:function(){return x}});var U=b.renderer||e.renderer,$=U?g||p.renderer(U)():g||p.renderer()();"function"==typeof $.settings&&$.settings(b.rendererSettings),M.renderer=$;var Y={resources:f.logger?{logger:f.logger()}:{}},K=es(ns(b,E,f.logger()),Y),X=function(e){e.key=b.key,e.element=$.element()},G=function(){};G.dockConfig=function(){return K},G.set=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.settings&&(v=e.settings,b=F(!0,{},u,e.settings),K=es(ns(b,E,f.logger()),Y)),b.scale&&(t=f.scale(b.scale)),x=b.data?Tr(b.data,{dataset:f.dataset,collection:f.dataCollection},{logger:f.logger()},f.dataCollection):t?t.data():[],"string"==typeof b.formatter||"object"===W(b.formatter)?n=f.formatter(b.formatter):t&&t.data().fields&&(n=t.data().fields[0].formatter()),o=m.style(b.style||{})},G.resize=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=A({inner:e,outer:t});i=n?$.size(n):$.size(e),D.rect=F(!0,{computedPhysical:i.computedPhysical,computedOuter:t.computed||t,computedInner:e.computed||e},e),i=F(!0,{computedOuter:t.computed||t,computedInner:e.computed||e},i)},G.getRect=function(){return D.rect};var J,Z,Q,ee=function(){var e=$.renderArgs?$.renderArgs.slice(0):[];return e.push({data:x}),e};G.beforeMount=N,G.beforeRender=function(){L({size:i})},G.render=function(){var e=M.nodes=H.call.apply(H,[q].concat(oe(ee())));$.render(e),J=e,Z=D.rect.computed},G.hide=function(){G.unmount(),$.size({x:0,y:0,width:0,height:0}),$.clear()},G.beforeUpdate=function(){I({settings:b,data:x})},G.update=function(){Q&&Q.stop();var e=b,t=e.rendererSettings,n=e.brush,r=e.animations;if("function"==typeof(null==t?void 0:t.transform)&&t.transform())return $.render(),void(J=null);var i=M.nodes=H.call.apply(H,[q].concat(oe(ee())));S.forEach((function(e){return e.cleanUp()})),S.length=0,_.tap=[],_.over=[],n&&(B(),V()),S.forEach((function(e){e.isActive()&&e.update()})),J&&r&&("function"==typeof r.enabled?r.enabled():r.enabled)?(r.compensateForLayoutChanges&&r.compensateForLayoutChanges({currentNodes:J,currentRect:D.rect.computed,previousRect:Z}),(Q=va({old:J,current:i},{renderer:$},r)).start()):$.render(i),J=i,Z=D.rect.computed,$.setKey&&"string"==typeof v.key&&$.setKey(v.key)},G.updated=P,G.destroy=function(){G.unmount(),j(r),$.destroy(),z(),r=null};var te=function(e){M.nodes=e,S.forEach((function(e){e.isActive()&&e.update()})),$.render(e)};return ts(q,e,{settings:function(){return b},data:function(){return x},scale:function(){return t},formatter:function(){return n},renderer:function(){return $},chart:function(){return f},dockConfig:function(){return K},mediator:function(){return d},instance:function(){return D},rect:function(){return D.rect},style:function(){return o},update:function(){return te},registries:function(){return p},resolver:function(){return w},symbol:function(){return Qa(p.symbol)}}),ts(D,v,{settings:function(){return b},data:function(){return x},scale:function(){return t},formatter:function(){return n},renderer:function(){return $},chart:function(){return f},dockConfig:function(){return K},mediator:function(){return d},style:function(){return o},_DO_NOT_USE_getInfo:c.bind(q),isVisible:function(){return k}}),G.getBrushedShapes=function(e,t,n){var r=[];if(b.brush&&b.brush.consume){var i=f.brush(e),o=$.findShapes("*");b.brush.consume.filter((function(t){return t.context===e})).forEach((function(e){for(var a=0;a<o.length;a++){var s=o[a];s.data&&i.containsMappedData(s.data,n||e.data,t)&&(X(s),r.push(s),o.splice(a,1),a--)}}))}return r},G.findShapes=function(e){for(var t,n=(null!==(t=Q)&&void 0!==t&&t.inProgress()?Q.targetScene:$).findShapes(e),r=0,i=n.length;r<i;r++)X(n[r]);return n},G.shapesAt=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=$.itemsAt(e);t=n&&"stop"===n.propagation&&r.length>0?[r.pop().node]:r.map((function(e){return e.node}));for(var i=0,o=t.length;i<o;i++)X(t[i]);return t},G.brushFromShapes=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.contexts=Array.isArray(t.contexts)?t.contexts:[],Ca({nodes:e,action:t.action||"toggle",trigger:t,chart:f,data:M.data})},G.mount=function(){r=$.element&&$.element()?r:$.appendTo(h),$.setKey&&"string"==typeof v.key&&$.setKey(v.key),b.brush&&(B(),V()),rs(D,y,v),rs(q,y,e),k=!0},G.mounted=function(){return R(r)},G.unmount=function(){[D,q].forEach((function(e){is(e,y)})),_.tap=[],_.over=[],S.forEach((function(e){e.cleanUp()})),S.length=0,O(),k=!1},G.onBrushTap=function(e){_.tap.forEach((function(t){Na({e:e,t:t,config:M})&&"stop"===t.globalPropagation&&f.toggleBrushing(!0)}))},G.onBrushOver=function(e){_.over.forEach((function(t){Ra({e:e,t:t,config:M})&&"stop"===t.globalPropagation&&f.toggleBrushing(!0)}))},G.def=q,G.ctx=D,G.renderer=function(){return $},G.set({settings:v}),T(),G}(l.component(e.type),{settings:e,chart:d,mediator:p,registries:l,theme:f,container:n}),settings:F(!0,{},e),key:e.key,hasKey:void 0!==e.key}:(c.warn("Unknown component: ".concat(e.type)),!1)}});function S(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};return function(){for(var r,i,o="function"==typeof e[t],a=arguments.length,s=new Array(a),u=0;u<a;u++)s[u]=arguments[u];o?r=(i=e[t]).call.apply(i,[d].concat(s)):r=n.call.apply(n,[d].concat(s));return r}}var q=function(){var e;a.dockLayout?(c.warn('Deprecation Warning: "dockLayout" property should be renamed to "strategy"'),e=a.dockLayout):e=a.strategy;var t=function(e){if("function"==typeof e.getBoundingClientRect){var t=e.getBoundingClientRect();return{x:0,y:0,width:t.width,height:t.height}}return{x:0,y:0,width:0,height:0}}(n);return _.layout({layoutSettings:e,rect:t})},D=S("created"),C=S("beforeMount"),E=S("mounted"),A=S("beforeUpdate"),T=S("updated"),N=S("beforeRender"),R=S("beforeDestroy"),O=S("destroyed"),I=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.partialData,i=t.formatters,o=void 0===i?{}:i,a=t.scales,s=void 0===a?{}:a,u=t.scroll,h=void 0===u?{}:u;x=ve(e,{logger:c,types:l.data}),r||Object.keys(k).forEach((function(e){return k[e].clear()})),t.palettes&&f.setPalettes(t.palettes),t.style&&f.setStyle(t.style),w=Nr(t.collections,{dataset:x},{logger:c});var d={theme:f,logger:c};g=Bo(s,{dataset:x,collection:w},V(V({},d),{},{scale:l.scale})),y=Or(o,{dataset:x,collection:w},V(V({},d),{},{formatter:l.formatter})),v=Xo(h,v)};function P(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t={},r=e.filter((function(e){return!!e.key})).map((function(e){return e.key}));b.forEach((function(e){e.key&&-1!==r.indexOf(e.key)?t[e.key]=e:e.destroy()})),b=e.map((function(e){var r=e.key&&t[e.key]?t[e.key]:l.interaction(e.type)(d,p,n);return r.set(e),r}))}var L=function(e){var t=n.getBoundingClientRect(),r="clientX"in e?e.clientX:e.x,i="clientY"in e?e.clientY:e.y,o={x:r-t.left,y:i-t.top},a=[];return m.forEach((function(e){var t=e.instance.getRect();Ms(t.computedPhysical?t.computedPhysical:{x:t.margin.left+t.x*t.scaleRatio.x,y:t.margin.top+t.y*t.scaleRatio.y,width:t.width*t.scaleRatio.x,height:t.height*t.scaleRatio.y},o)&&a.push(e)})),a},j=function(){if(!h.length&&n){Object.keys(u).forEach((function(e){var t=u[e].bind(d);n.addEventListener(e,t),h.push({key:e,listener:t})}));var e={},t=function(t){t.touches?(e.x=t.touches[0].clientX,e.y=t.touches[0].clientY,e.multiTouch=t.touches.length>1):(e.x=t.clientX,e.y=t.clientY,e.multiTouch=!1),e.time=Date.now(),e.comps=L(e)},r=function(t){var n=e.comps||L(t);if(!n.every((function(e){return e.instance.def.disableTriggers}))&&("touchend"===t.type&&t.preventDefault(),function(e,t){var n=ue(e),r=n?e.changedTouches[0]:e,i=Date.now()-t.time,o=isNaN(t.x)?0:Math.abs(r.clientX-t.x),a=isNaN(t.y)?0:Math.abs(r.clientY-t.y);return(0===e.button||n)&&!t.multiTouch&&o<=12&&a<=12&&i<=300}(t,e)))for(var r=n.length-1;r>=0;r--){if(n[r].instance.onBrushTap(t),M){M=!1;break}}},i=[];i.push({key:"mousedown",listener:t}),i.push({key:"mouseup",listener:r}),function(e){return"ontouchstart"in e&&"ontouchend"in e||navigator.maxTouchPoints>1}(n)&&(i.push({key:"touchstart",listener:t}),i.push({key:"touchend",listener:r})),i.push({key:"mousemove",listener:function(e){for(var t=L(e),n=t.length-1;n>=0;n--){if(t[n].instance.onBrushOver(e),M){M=!1;break}}}}),i.forEach((function(e){n.addEventListener(e.key,e.listener),h.push(e)}))}},z=function(){h.forEach((function(e){var t=e.key,r=e.listener;return n.removeEventListener(t,r)})),h.length=0};return d.layoutComponents=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.excludeFromUpdate,n=void 0===t?[]:t;e.data&&(i=e.data),e.settings&&(a=e.settings,P(e.settings.interactions)),A(),I(i,a);var r=a,o=r.formatters,s=r.scales,u=r.components,l=void 0===u?[]:u;_.update({components:l,data:i,excludeFromUpdate:n,formatters:o,scales:s}),_.forEach((function(e){e.updateWith&&e.instance.set(e.updateWith)})),_.forEach((function(e){e.updateWith&&e.instance.beforeUpdate()})),q()},d.update=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.partialData,o=t.excludeFromUpdate,s=void 0===o?[]:o;t.data&&(i=t.data),t.settings&&(a=t.settings,P(t.settings.interactions)),A(),I(i,a,{partialData:r});var u=a,l=u.formatters,c=u.scales,f=u.components,h=void 0===f?[]:f;_.update({components:h,data:i,excludeFromUpdate:s,formatters:l,scales:c}),_.forEach((function(e){e.updateWith&&e.instance.set(e.updateWith)})),_.forEach((function(e){e.updateWith&&e.instance.beforeUpdate()}));var d,p=[],g=[];if(r)_.forEach((function(e){(e.updateWith||e.applyTransform)&&e.visible&&p.push(e)})),d=p;else{var y=q(),v=y.visible,b=y.hidden,x=y.ordered;m=v,d=v,e=x,v.forEach((function(e){e.updateWith&&e.visible?p.push(e):g.push(e)})),b.forEach((function(e){e.instance.hide(),e.visible=!1,delete e.updateWith,e.applyTransform=!1}))}g.forEach((function(e){return e.instance.beforeMount()})),g.forEach((function(e){return e.instance.mount()})),d.forEach((function(e){return e.instance.beforeRender()})),d.forEach((function(e){(e.updateWith||e.applyTransform)&&e.visible?e.instance.update():e.instance.render()})),r||uu(n,e),g.forEach((function(e){return e.instance.mounted()})),p.forEach((function(e){return e.instance.updated()})),m.forEach((function(e){delete e.updateWith,e.visible=!0,e.applyTransform=!1})),T()},d.destroy=function(){R(),_.destroy(),z(),P(),delete d.update,delete d.destroy,O()},d.getAffectedShapes=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"and",n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=[];return m.filter((function(e){return null==r||e.key===r})).forEach((function(r){i.push.apply(i,oe(r.instance.getBrushedShapes(e,t,n)))})),i},d.findShapes=function(e){var t=[];return m.forEach((function(n){t.push.apply(t,oe(n.instance.findShapes(e)))})),t},d.componentsFromPoint=function(e){return L(e).map((function(e){return e.instance.ctx}))},d.shapesAt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=[],i=n.getBoundingClientRect(),o=m;if(Array.isArray(t.components)&&t.components.length>0){var a=t.components.map((function(e){return e.key}));o=m.filter((function(e){return-1!==a.indexOf(e.key)})).map((function(e){return{instance:e.instance,opts:t.components[a.indexOf(e.key)]}}))}for(var s=o.length-1;s>=0;s--){var u=o[s],l=u.instance.renderer().element().getBoundingClientRect(),c=su(e,i,l),f=u.instance.shapesAt(c,u.opts),h=f.length>0&&"stop"===t.propagation;if(r.push.apply(r,oe(f)),r.length>0&&h)return r}return r},d.brushFromShapes=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{components:[]},n=function(n){var r=t.components[n].key;m.filter((function(e){return r===e.key})).forEach((function(r){var i=e.filter((function(e){return e.key===r.key}));r.instance.brushFromShapes(i,t.components[n])}))},r=0;r<t.components.length;r++)n(r)},d.scroll=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return Go(e,v)},d.dataset=function(e){return x(e)},d.dataCollection=function(e){return w(e)},d.scales=function(){return g.all()},d.formatters=function(){return y.all()},d.brush=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return k[e]||(k[e]=ma()),k[e]},d.scale=function(e){return g.get(e)},d.formatter=function(e){return y.get(e)},d.toggleBrushing=function(e){M=void 0!==e?e:!M},d.component=function(e){var t=_.findComponentByKey(e);return null==t?void 0:t.instance.ctx},d.logger=function(){return c},d.theme=function(){return f},Object.defineProperty(d,"interactions",{get:function(){return{instances:b,on:function(){j(),b.forEach((function(e){return e.on()}))},off:function(){z(),b.forEach((function(e){return e.off()}))}}}}),D(),n&&(C(),n.innerHTML="",function(){var e=a.components,t=void 0===e?[]:e;N(),I(i,a),_.set({components:t});var r=q(),o=r.visible,s=r.hidden,u=r.ordered;m=o,s.forEach((function(e){e.instance.hide(),e.visible=!1})),o.forEach((function(e){return e.instance.beforeMount()})),o.forEach((function(e){return e.instance.mount()})),o.forEach((function(e){return e.instance.beforeRender()})),o.forEach((function(e){return e.instance.render()})),o.forEach((function(e){return e.instance.mounted()})),o.forEach((function(e){e.visible=!0})),uu(n,u)}(),j(),P(a.interactions),E(n),d.element=n),d}var cu=function(e){var t=kt(e);return t.prio=function(e){return e?t.default(e[0]):[t.default()]},t.types=function(){return t.getKeys()},t},fu=kt();function hu(e,t){var n=t.cache;if("number"==typeof e)return n.fields[e];for(var r=0;r<n.fields.length;r++)if(n.fields[r].key()===e)return n.fields[r];for(var i=0;i<n.fields.length;i++)if(n.fields[i].title()===e)return n.fields[i];return null}var du=function(e){return e.filter((function(e){return"number"==typeof e&&!isNaN(e)}))},pu=function(e){return e.reduce((function(e,t){return e+t}),0)},mu={first:function(e){return e[0]},last:function(e){return e[e.length-1]},min:function(e){var t=du(e);return t.length?Math.min.apply(null,t):NaN},max:function(e){var t=du(e);return t.length?Math.max.apply(null,t):NaN},sum:function(e){var t=du(e);return t.length?t.reduce((function(e,t){return e+t}),0):NaN},avg:function(e){var t=du(e),n=t.length;return n?pu(t)/n:NaN}};function gu(e,t,n,r){var i={},o=r.field||(void 0!==e.field?t.field(e.field):null);return Object.keys(n).forEach((function(a){var s=n[a],u=i[a]={};-1!==["number","string","boolean"].indexOf(W(s))?(u.type="primitive",u.value=s):"function"==typeof s?(u.type="function",u.value=s,u.label=s,u.field=o):"object"===W(s)&&(s.fields?u.fields=s.fields.map((function(n){return gu(e,t,{main:n},r).main})):void 0!==s.field?(u.type="field",u.field=t.field(s.field),u.value=u.field.value,u.label=u.field.label):o&&(u.value=o.value,u.label=o.label,u.field=o),"function"==typeof s.filter&&(u.filter=s.filter),void 0!==s.value&&(u.value=s.value),void 0!==s.label&&(u.label=s.label),"function"==typeof s.reduce?u.reduce=s.reduce:s.reduce?u.reduce=mu[s.reduce]:u.field&&u.field.reduce&&(u.reduce="string"==typeof u.field.reduce?mu[u.field.reduce]:u.field.reduce),"function"==typeof s.reduceLabel?u.reduceLabel=s.reduceLabel:s.reduceLabel?u.reduceLabel=mu[s.reduceLabel]:u.field&&u.field.reduceLabel&&(u.reduceLabel="string"==typeof u.field.reduceLabel?mu[u.field.reduceLabel]:u.field.reduceLabel))})),i}function yu(e,t){var n=gu(e,t,{main:{value:e.value,label:e.label,reduce:e.reduce,filter:e.filter}},{}).main;return{props:gu(e,t,e.props||{},n),main:n}}function vu(e,t,n,r){for(var i,o=Array(e.length),a=Array(e.length),s=0;s<e.length;s++)i=r?e[s][r]:e[s],o[s]=i.value,a[s]=i.label;var u=t.reduce,l=t.reduceLabel,c=u?u(o):o,f={value:c,label:l?l(a,c):n?n(c):String(c)};return r&&e[0][r].source?(f.source=e[0][r].source,f):!r&&e[0].source?(f.source=e[0].source,f):f}function bu(e,t){var n=t.main,r=t.propsArr,i=t.props,o=[],a=n.field.formatter(),s={};return r.forEach((function(e){s[e]=i[e].field?i[e].field.formatter():function(e){return e}})),o.push.apply(o,oe(e.map((function(e){var t=vu(e.items,n,a);return r.forEach((function(n){t[n]=vu(e.items,i[n],s[n],n)})),t})))),o}function xu(e){var t=e.cfg,n=e.itemData,r=e.obj,i=e.target,o=e.tracker,a="function"===e.trackType?t.trackBy(n):n[t.trackBy],s=o[a];s||(s=o[a]={items:[],id:a},i.push(s)),s.items.push(r)}function wu(e,t,n){var r=n.key,i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function ku(e,t){var n=Array.isArray(e)?e:[e],r=[];return n.forEach((function(e){void 0!==e.field&&function(){var n=t.field(e.field),i=t.key();if(!n)throw Error("Field '".concat(e.field,"' not found"));for(var o=yu(e,t),a=o.props,s=o.main,u=Object.keys(a),l=!!e.trackBy,c=W(e.trackBy),f={},h=[],d=n.items(),p=[],m=function(t){var n=d[t];if(s.filter&&!s.filter(n))return"continue";var r=wu(s,n,{key:i});u.forEach((function(e){var o=a[e],s=o.field?o.field.items()[t]:n;r[e]=wu(o,s,{key:i})})),l&&xu({cfg:e,itemData:n,obj:r,target:h,tracker:f,trackType:c}),p.push(r)},g=0;g<d.length;g++)m(g);l?r.push.apply(r,oe(bu(h,{main:s,propsArr:u,props:a}))):r.push.apply(r,p)}()})),r}var Mu=function(e){return e.filter((function(e){return"number"==typeof e&&!isNaN(e)}))};var _u=function(e){var t=e.key,n=e.data,r=e.cache,i=e.config;if(n){var o=n;"string"==typeof o&&(o=function(e){var t=e.data,n=e.config,r=t.split("\n"),i=r[0],o=r[1],a=",";if(n&&n.parse&&n.parse.delimiter)a=n.parse.delimiter;else if(i)for(var s=[/,/,/\t/,/;/],u=0;u<s.length;u++){var l=s[u];if(i&&o){if(l.test(i)&&l.test(o)&&i.split(l).length===o.split(l).length){a=l;break}}else l.test(i)&&(a=l)}return r.map((function(e){return e.split(a)}))}({data:n,config:i})),Array.isArray(o)&&function(e){var t,n=e.source,r=e.data,i=e.cache,o=e.config,a=r,s=o&&o.parse;Array.isArray(r[0])?s&&!1===s.headers?t=r[0].map((function(e,t){return t})):(t=r[0],a=r.slice(1)):t=Object.keys(r[0]);var u,l=!!s&&"function"==typeof s.row&&s.row,c=t;c=s&&"function"==typeof s.fields?s.fields(c.slice()):t.map((function(e){return{key:e,title:e}})),Array.isArray(r[0])?u=c.map((function(){return[]})):(u={},c.forEach((function(e){u[e.key]=[]})));for(var f=0;f<a.length;f++){var h=l?l(a[f],f,c):a[f];if(h)if(Array.isArray(h))for(var d=0;d<c.length;d++)u[d].push(h[d]);else for(var p=0;p<c.length;p++)u[c[p].key].push(h[c[p].key])}for(var m=Array.isArray(u)?function(e){return u[e]}:function(e){return u[c[e].key]},g=0;g<c.length;g++){var y=m(g),v=Mu(y),b=v.length>0,x=b?"measure":"dimension",w=b?Math.min.apply(Math,oe(v)):NaN,k=b?Math.max.apply(Math,oe(v)):NaN;i.fields.push(Dr(F({source:n,key:g,title:c[g].title,values:y,min:w,max:k,type:x},c[g]),{value:c[g].value,label:c[g].label}))}}({data:o,cache:r,source:t,config:i})}};function Su(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.key,n=e.data,r=e.config,i={fields:[]},o={key:function(){return t},raw:function(){return n},field:function(e){return hu(e,{cache:i,matrix:n})},fields:function(){return i.fields.slice()},extract:function(e){return ku(e,o)},hierarchy:function(){return null}};return _u({key:t,data:n,config:r,cache:i}),o}Su.util={normalizeConfig:yu,collect:bu,track:xu};var qu=kt();qu.default("matrix"),qu("matrix",Su),qu("default",Su);var Du=kt();function Cu(e,t,n){return Math.max(e,Math.min(t,n))}function Eu(e){var t,n=e.item,r=e.value,i=e.boxCenter,o=e.rendWidth,a=e.rendHeight,s="x",u="y",l=o,c=a,f=r<.5?90:-90;return e.flipXY&&(s="y",u="x",l=a,c=o,f=r<.5?180:0),(0,e.symbol)(F({},n.oob,(K(t={},s,i*l),K(t,u,Math.max(n.oob.size/2,Math.min(r*c,c-n.oob.size/2))),K(t,"startAngle",f),t)))}function Au(e){var t,n=e.item,r=e.boxWidth,i=e.boxPadding,o=e.rendWidth,a=e.rendHeight,s="x",u="y",l="width",c="height",f=o,h=a;e.flipXY&&(s="y",u="x",l="height",c="width",f=a,h=o);var d=function(e){var t=e.start,n=e.end,r=e.minPx,i=void 0===r?.1:r,o=e.maxPx,a=void 0===o?1:o,s=Math.max(t,n),u=Math.min(t,n),l=Cu(-.1,1.2,s),c=Cu(-.1,1.2,u),f=l*a-c*a,h=Math.max(i,f),d=(h-f)/2;return{actualDiff:h,startModifier:d,actualLow:c*a-d}}({start:n.start,end:n.end,minPx:n.box.minHeightPx,maxPx:h}),p=d.actualDiff,m=d.actualLow;return F({},n.box,(K(t={type:"rect"},s,(i+n.major)*f),K(t,u,m),K(t,c,p),K(t,l,r*f),K(t,"data",n.data||{}),K(t,"collider",{type:null}),t))}function Tu(e){var t,n=e.item,r=e.from,i=e.to,o=e.boxCenter,a=e.rendWidth,s=e.rendHeight,u="x1",l="y1",c="x2",f="y2",h=a,d=s;return e.flipXY&&(u="y1",l="x1",c="y2",f="x2",h=s,d=a),F({},n.line,(K(t={type:"line"},f,Math.floor(r*d)),K(t,u,o*h),K(t,l,Math.floor(i*d)),K(t,c,o*h),K(t,"data",n.data||{}),K(t,"collider",{type:null}),t))}function Nu(e){var t,n=e.item,r=e.key,i=e.position,o=e.width,a=e.boxCenter,s=e.rendWidth,u=e.rendHeight,l="x1",c="y1",f="x2",h="y2",d=s,p=u;e.flipXY&&(l="y1",c="x1",f="y2",h="x2",d=u,p=s);var m=o/2;return F({type:"line"},n[r],(K(t={},c,Math.floor(i*p)),K(t,l,(a-m)*d),K(t,h,Math.floor(i*p)),K(t,f,(a+m)*d),K(t,"r",m*d),K(t,"cx",a*d),K(t,"cy",i*p),K(t,"width",o*d),K(t,"data",n.data||{}),K(t,"collider",{type:null}),t))}function Ru(e,t,n){var r=t.box,i=r.width,o=r.maxWidthPx,a=r.minWidthPx,s=e>=0?1:-1,u=Math.min(s*e*i,isNaN(o)?n:o/n);return(u=isNaN(a)?u:Math.max(a/n,u))*s}Du("native",(function(e,t,n){var r,i,o={chart:e,mediator:t,element:n},a=[],s=!0;function u(){"function"==typeof r.enable&&(r.enable=r.enable.bind(o)()),r.enable&&Object.keys(r.events).forEach((function(e){var t=r.events[e].bind(o);n.addEventListener(e,t),a.push({key:e,listener:t})}))}function l(){a.forEach((function(e){var t=e.key,r=e.listener;n.removeEventListener(t,r)})),a=[]}return{get key(){return i},set:function(e){!function(e){i=e.key,(r=e).events=r.events||[],void 0===r.enable&&(r.enable=!0)}(e),l(),s&&u()},off:function(){s=!1,l()},on:function(){s=!0,0===a.length&&u()},destroy:function(){l(),o=null,r=null}}}));var Ou={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}},Iu=Object.keys(Ou),Pu={require:["chart","resolver","symbol"],defaultSettings:{settings:{},data:{},style:{box:"$shape",line:"$shape-guide",whisker:"$shape-guide",median:"$shape-guide--inverted"}},created:function(){this.state={}},render:function(e){var t=this,n=e.data,r=this.rect,i=r.width,o=r.height,a="horizontal"===this.settings.settings.orientation,s=this.style,u=this.resolver,l=this.symbol,c=Iu.filter((function(e){return!t.settings.settings[e]||!1!==t.settings.settings[e].show})),f={};c.forEach((function(e){return f[e]=Ou[e]}));var h=function(e){var t,n=e.keys,r=e.data,i=e.defaultSettings,o=e.style,a=e.settings,s=e.width,u=e.height,l=e.resolver,c=F(!0,{},i||{},o||{}),f={major:"horizontal"===a.orientation?u:s,minor:"horizontal"===a.orientation?s:u},h=a.major;t="object"===W(h)&&"object"===W(h.ref)&&void 0!==h.ref.start&&void 0!==h.ref.end?l.resolve({data:r,defaults:{start:0,end:1},scaled:f,settings:F(!0,{},{binStart:{scale:a.major.scale,ref:a.major.ref.start},binEnd:{scale:a.major.scale,ref:a.major.ref.end}})}):"object"===W(h)&&void 0!==h.binStart&&void 0!==h.binEnd?l.resolve({data:r,defaults:{start:0,end:1},scaled:f,settings:F(!0,{},{binStart:{scale:a.major.scale,ref:"binStart"},binEnd:{scale:a.major.scale,ref:"binEnd"}},a.major)}):l.resolve({data:r,scaled:f,defaults:{major:.5},settings:{major:a.major}});var d=a.minor||{},p={};["start","end","min","max","med"].forEach((function(e){(d[e]||r.items&&r.items.length&&r.items[0][e])&&(p[e]={scale:d.scale,ref:e})}));for(var m,g={major:t,minor:l.resolve({data:r,defaults:{start:0,end:1},scaled:f,settings:F(!0,{},p,d)})},y=0,v=n.length;y<v;y++)a[m]&&!1===a[m].show||(g[m=n[y]]=l.resolve({data:r,defaults:c[m],settings:a[m],scaled:f}));return g}({keys:c,data:n,defaultSettings:f,style:s,settings:this.settings.settings,width:i,height:o,resolver:u}),d=h.settings;return function(e){var t=e.width,n=e.height,r=e.flipXY,i=e.resolved,o=e.keys,a=e.symbol,s=[],u=i.major.items;if(!u.length)return s;var l,c,f,h,d,p,m,g,y,v=t,b=n,x=r?n:t,w=i.major.settings,k=["start","end","min","max","med"].filter((function(e){return void 0!==i.minor.settings[e]})),M=k.length,_=o.filter((function(e){return"oob"!==e})),S=o?o.length:0,q=_?_.length:0,D={box:function(){f.box&&le(f.start)&&le(f.end)&&l.push(Au({item:f,boxWidth:h,boxPadding:d,rendWidth:v,rendHeight:b,flipXY:r}))},line:function(){le(f.min)&&le(f.start)&&l.push(Tu({item:f,from:f.min,to:f.start,boxCenter:p,rendWidth:v,rendHeight:b,flipXY:r})),le(f.max)&&le(f.end)&&l.push(Tu({item:f,from:f.max,to:f.end,boxCenter:p,rendWidth:v,rendHeight:b,flipXY:r}))},median:function(){f.median&&le(f.med)&&l.push(Nu({item:f,key:"median",position:f.med,width:h,boxCenter:p,rendWidth:v,rendHeight:b,flipXY:r}))},whisker:function(){if(f.whisker){var e=h*f.whisker.width;le(f.min)&&l.push(Nu({item:f,key:"whisker",position:f.min,width:e,boxCenter:p,rendWidth:v,rendHeight:b,flipXY:r})),le(f.max)&&l.push(Nu({item:f,key:"whisker",position:f.max,width:e,boxCenter:p,rendWidth:v,rendHeight:b,flipXY:r}))}}};function C(){for(var e,t=-Number.MAX_VALUE,n=Number.MAX_VALUE,r=0;r<M;r++)le(e=f[k[r]])&&(t<e&&(t=e),n>e&&(n=e));m=t<0&&t!==-Number.MAX_VALUE,g=n>1&&n!==Number.MAX_VALUE,y=m||g}for(var E=0,A=u.length;E<A;E++){l=[],c=null;var T=u[E],N=T.data,R=null,O=null;void 0!==w.binStart?(R=T.binStart,O=T.binEnd,c=w.binStart.scale):R=(c=w.major.scale)?T.major:0;var I=0;c?c.bandwidth?R-=(I=c.bandwidth())/2:I=O-R:I=1,f=F({},{major:R,majorEnd:O},i.minor.items[E]);for(var P=0;P<S;P++)f[o[P]]=i[o[P]].items[E];if(h=Ru(I,f,x),p=(d=(I-h)/2)+f.major+h/2,C(),y)f.oob&&(m?l.push(Eu({item:f,value:0,boxCenter:p,rendWidth:v,rendHeight:b,flipXY:r,symbol:a})):g&&l.push(Eu({item:f,value:1,boxCenter:p,rendWidth:v,rendHeight:b,flipXY:r,symbol:a})));else for(var L=0;L<q;L++)f[_[L]]&&!1===f[_[L]].show||D[_[L]]();var j={type:"container",data:N,collider:{type:"bounds"},children:l};s.push(j)}return s}({items:h.items,settings:d,width:i,height:o,flipXY:a,resolved:h,keys:c,symbol:l})}};var Lu={shape:"saltire",width:2,size:.5,fill:"#333",stroke:"#333",strokeWidth:0},ju=/px$/,zu={shape:"circle",label:"",fill:"#333",stroke:"#ccc",strokeDasharray:"",strokeWidth:0,strokeLinejoin:"miter",opacity:1,x:.5,y:.5,size:1,show:!0},Fu={maxPx:1e4,minPx:1,maxRelExtent:.1,minRelExtent:.01,maxRelDiscrete:1,minRelDiscrete:.1};function Hu(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 Bu(e,t,n,r){var i=t.width,o=t.height;return e.filter((function(e){return!1!==e.show&&!isNaN(e.x+e.y)})).map((function(e){var t=e,a=ju.test(e.size)?parseInt(e.size,10):n.min+t.size*(n.max-n.min);ce(a)&&(t=Lu,a=n.min+t.size*(n.max-n.min));var s=ie(function(e){var t=zu.shape,n={};return"object"===W(e.shape)&&"string"==typeof e.shape.type?(t=e.shape.type,n=e.shape):"string"==typeof e.shape&&(t=e.shape),[t,n]}(t),2),u=s[0],l=V(V({},s[1]),{},{type:u,label:e.label,x:e.x*i,y:e.y*o,fill:t.fill,size:Math.min(n.maxGlobal,Math.max(n.minGlobal,a)),stroke:t.stroke,strokeWidth:t.strokeWidth,strokeDasharray:t.strokeDasharray,opacity:t.opacity});t===e.errorShape&&(l.width=t.width);var c=r(l);return c.data=e.data,c}))}var Vu={require:["chart","resolver","symbol"],defaultSettings:{settings:{},data:{},animations:{enabled:!1,trackBy:function(e){return e.data.value}},style:{item:"$shape"}},render:function(e){var t=e.data,n=this.resolver.resolve({data:t,defaults:F({},zu,this.style.item),settings:this.settings.settings,scaled:{x:this.rect.width,y:this.rect.height}}),r=this.rect,i=r.width,o=r.height,a=F({},Fu,this.settings.settings.sizeLimits),s=n.items,u=function(e,t,n,r,i){var o=Hu(e?e.scale:void 0,n),a=Hu(t?t.scale:void 0,r),s=Math.min(o.value*i[o.isBandwidth?"maxRelDiscrete":"maxRelExtent"],a.value*i[a.isBandwidth?"maxRelDiscrete":"maxRelExtent"]),u=Math.min(o.value*i[o.isBandwidth?"minRelDiscrete":"minRelExtent"],a.value*i[a.isBandwidth?"minRelDiscrete":"minRelExtent"]);return{min:Math.max(1,Math.floor(u)),max:Math.max(1,Math.floor(s)),maxGlobal:i.maxPx,minGlobal:i.minPx}}(n.settings.x,n.settings.y,i,o,a);return Bu(s,this.rect,u,this.settings.shapeFn||this.symbol)}};Math.PI;var Wu={label:"",arc:1,show:!0,fill:"#333",stroke:"#ccc",strokeWidth:1,strokeLinejoin:"round",opacity:1,innerRadius:0,outerRadius:.8,cornerRadius:0,offset:0};function Uu(e,t,n,r){var i=t.x,o=t.y,a=t.width,s=t.height,u=function(){var e=ze,t=Fe,n=Se(0),r=null,i=He,o=Be,a=Ve,s=null;function u(){var u,l,c=+e.apply(this,arguments),f=+t.apply(this,arguments),h=i.apply(this,arguments)-Ie,d=o.apply(this,arguments)-Ie,p=qe(d-h),m=d>h;if(s||(s=u=_e()),f<c&&(l=f,f=c,c=l),f>Re)if(p>Pe-Re)s.moveTo(f*Ce(h),f*Te(h)),s.arc(0,0,f,h,d,!m),c>Re&&(s.moveTo(c*Ce(d),c*Te(d)),s.arc(0,0,c,d,h,m));else{var g,y,v=h,b=d,x=h,w=d,k=p,M=p,_=a.apply(this,arguments)/2,S=_>Re&&(r?+r.apply(this,arguments):Ne(c*c+f*f)),q=Ae(qe(f-c)/2,+n.apply(this,arguments)),D=q,C=q;if(S>Re){var E=je(S/c*Te(_)),A=je(S/f*Te(_));(k-=2*E)>Re?(x+=E*=m?1:-1,w-=E):(k=0,x=w=(h+d)/2),(M-=2*A)>Re?(v+=A*=m?1:-1,b-=A):(M=0,v=b=(h+d)/2)}var T=f*Ce(v),N=f*Te(v),R=c*Ce(w),O=c*Te(w);if(q>Re){var I,P=f*Ce(b),L=f*Te(b),j=c*Ce(x),z=c*Te(x);if(p<Oe&&(I=We(T,N,j,z,P,L,R,O))){var F=T-I[0],H=N-I[1],B=P-I[0],V=L-I[1],W=1/Te(Le((F*B+H*V)/(Ne(F*F+H*H)*Ne(B*B+V*V)))/2),U=Ne(I[0]*I[0]+I[1]*I[1]);D=Ae(q,(c-U)/(W-1)),C=Ae(q,(f-U)/(W+1))}}M>Re?C>Re?(g=Ue(j,z,T,N,f,C,m),y=Ue(P,L,R,O,f,C,m),s.moveTo(g.cx+g.x01,g.cy+g.y01),C<q?s.arc(g.cx,g.cy,C,De(g.y01,g.x01),De(y.y01,y.x01),!m):(s.arc(g.cx,g.cy,C,De(g.y01,g.x01),De(g.y11,g.x11),!m),s.arc(0,0,f,De(g.cy+g.y11,g.cx+g.x11),De(y.cy+y.y11,y.cx+y.x11),!m),s.arc(y.cx,y.cy,C,De(y.y11,y.x11),De(y.y01,y.x01),!m))):(s.moveTo(T,N),s.arc(0,0,f,v,b,!m)):s.moveTo(T,N),c>Re&&k>Re?D>Re?(g=Ue(R,O,P,L,c,-D,m),y=Ue(T,N,j,z,c,-D,m),s.lineTo(g.cx+g.x01,g.cy+g.y01),D<q?s.arc(g.cx,g.cy,D,De(g.y01,g.x01),De(y.y01,y.x01),!m):(s.arc(g.cx,g.cy,D,De(g.y01,g.x01),De(g.y11,g.x11),!m),s.arc(0,0,c,De(g.cy+g.y11,g.cx+g.x11),De(y.cy+y.y11,y.cx+y.x11),m),s.arc(y.cx,y.cy,D,De(y.y11,y.x11),De(y.y01,y.x01),!m))):s.arc(0,0,c,w,x,m):s.lineTo(R,O)}else s.moveTo(0,0);if(s.closePath(),u)return s=null,u+""||null}return u.centroid=function(){var n=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-Oe/2;return[Ce(r)*n,Te(r)*n]},u.innerRadius=function(t){return arguments.length?(e="function"==typeof t?t:Se(+t),u):e},u.outerRadius=function(e){return arguments.length?(t="function"==typeof e?e:Se(+e),u):t},u.cornerRadius=function(e){return arguments.length?(n="function"==typeof e?e:Se(+e),u):n},u.padRadius=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:Se(+e),u):r},u.startAngle=function(e){return arguments.length?(i="function"==typeof e?e:Se(+e),u):i},u.endAngle=function(e){return arguments.length?(o="function"==typeof e?e:Se(+e),u):o},u.padAngle=function(e){return arguments.length?(a="function"==typeof e?e:Se(+e),u):a},u.context=function(e){return arguments.length?(s=null==e?null:e,u):s},u}(),l={x:i+a/2,y:o+s/2},c=Math.min(a,s)/2,f=Math.min(a,s)/2,h=f/100;return e.map((function(e,t){var i=n[t];i.type="path";var o=f*i.outerRadius,a=c*i.innerRadius;u.innerRadius(a),u.outerRadius(o),u.cornerRadius(h*i.cornerRadius),i.d=u(e);var s=u.centroid(e),d=i.offset?function(e,t,n,r){var i=ie(e,2),o=i[0],a=i[1],s=Math.sqrt(o*o+a*a),u=n-r;return{x:(o/=s)*t*u,y:(a/=s)*t*u}}(s,i.offset,o,a):{x:0,y:0};return i.transform="translate(".concat(d.x,", ").concat(d.y,") translate(").concat(l.x,", ").concat(l.y,")"),i.desc={share:e.value/r,slice:{start:e.startAngle,end:e.endAngle,innerRadius:a,outerRadius:o,offset:{x:l.x+d.x,y:l.y+d.y}}},i}))}function $u(e,t){return e.slice&&"arc"in e.slice?t.arc:t.data.value}var Yu={require:["chart","resolver"],defaultSettings:{settings:{startAngle:0,endAngle:2*Math.PI,padAngle:0,slice:{}},style:{slice:"$shape"},data:{}},render:function(e){for(var t=e.data,n=[],r=[],i=this.settings.settings,o=this.resolver.resolve({data:t,defaults:F({},Wu,this.style.slice),settings:i.slice}).items,a=0,s=0,u=o.length;s<u;s++){var l=$u(i,o[s]);l>0&&o[s].outerRadius>=o[s].innerRadius&&(n.push(l),r.push(o[s]),a+=l)}var c=function(){var e=Ze,t=Je,n=null,r=Se(0),i=Se(Pe),o=Se(0);function a(a){var s,u,l,c,f,h=a.length,d=0,p=new Array(h),m=new Array(h),g=+r.apply(this,arguments),y=Math.min(Pe,Math.max(-Pe,i.apply(this,arguments)-g)),v=Math.min(Math.abs(y)/h,o.apply(this,arguments)),b=v*(y<0?-1:1);for(s=0;s<h;++s)(f=m[p[s]=s]=+e(a[s],s,a))>0&&(d+=f);for(null!=t?p.sort((function(e,n){return t(m[e],m[n])})):null!=n&&p.sort((function(e,t){return n(a[e],a[t])})),s=0,l=d?(y-h*b)/d:0;s<h;++s,g=c)u=p[s],c=g+((f=m[u])>0?f*l:0)+b,m[u]={data:a[u],index:s,value:f,startAngle:g,endAngle:c,padAngle:v};return m}return a.value=function(t){return arguments.length?(e="function"==typeof t?t:Se(+t),a):e},a.sortValues=function(e){return arguments.length?(t=e,n=null,a):t},a.sort=function(e){return arguments.length?(n=e,t=null,a):n},a.startAngle=function(e){return arguments.length?(r="function"==typeof e?e:Se(+e),a):r},a.endAngle=function(e){return arguments.length?(i="function"==typeof e?e:Se(+e),a):i},a.padAngle=function(e){return arguments.length?(o="function"==typeof e?e:Se(+e),a):o},a}().sortValues(null);return c.startAngle(i.startAngle),c.endAngle(i.endAngle),c.padAngle(i.padAngle),Uu(c(n),F({},this.rect,{x:0,y:0}),r,a)}};var Ku=function(e){function t(t){if(e[t.type]&&e[t.type].condition(t)){var n=e[t.type],r=void 0===n.conditionAppend||n.conditionAppend(t);n.items.forEach((function(e){var n=Math.round(t[e.key]),i=t[e.key]-n;t[e.key]=n,r&&"append"===e.type&&(i>0?t[e.key]+=.5:t[e.key]-=.5)}))}}return void 0===e&&((e={}).line={append:["x1","x2","y1","y2"],round:[],condition:function(e){return e.x1===e.x2||e.y1===e.y2},conditionAppend:function(e){return e.strokeWidth%2!=0}},e.rect={append:["x","y"],round:["width","height"],condition:function(){return!0},conditionAppend:function(e){return e.strokeWidth%2!=0}}),Object.keys(e).forEach((function(t){var n=e[t];n.items=[],n.append.forEach((function(e){n.items.push({key:e,type:"append"})})),n.round.forEach((function(e){n.items.push({key:e,type:"round"})}))})),t.multiple=function(e){return e.forEach((function(e){return t(e)}))},t}(),Xu=function(){function e(){U(this,e),this.reset(),this.push.apply(this,arguments)}return Y(e,[{key:"transposeCoordinate",value:function(e,t,n){if("number"==typeof t&&isFinite(t)){var r=e.substring(0,1);if("x"===r||"cx"===e)return t*this.width;if("width"===e)return t*this.width;if("r"===e)return t*(n?this.height:this.width);if("y"===r||"cy"===e)return t*this.height;if("height"===e)return t*this.height}return t}},{key:"push",value:function(){var e;return(e=this.storage).push.apply(e,arguments),this}},{key:"processItem",value:function(t){var n={},r=void 0!==t.flipXY?t.flipXY:this.flipXY,i=void 0!==t.crisp?t.crisp:this.crisp;if(t.fn&&"function"==typeof t.fn){var o=r?this.height:this.width,a=r?this.width:this.height;t=t.fn({width:o,height:a,flipXY:r});for(var s=Object.keys(t),u=0,l=s.length;u<l;u++){var c=s[u];n[e.evaluateKey(c,r)]=t[c]}}else for(var f=Object.keys(t),h=0,d=f.length;h<d;h++){var p=f[h],m=e.evaluateKey(p,r),g=this.transposeCoordinate(m,t[p],r);n[m]=g}return i&&Ku(n),n}},{key:"output",value:function(){for(var e=[],t=0,n=this.storage.length;t<n;t++){var r=this.processItem(this.storage[t]);e.push(r)}return e}},{key:"reset",value:function(){this.storage=[],this.flipXY=!1,this.crisp=!1,this.width=0,this.height=0}}],[{key:"evaluateKey",value:function(e,t){if(t){var n=e.substring(0,1),r=e.substring(1);if("x"===n)return"y".concat(r);if("y"===n)return"x".concat(r);if("cx"===e)return"cy";if("cy"===e)return"cx";if("width"===e)return"height";if("height"===e)return"width"}return e}}]),e}();function Gu(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Q(Xu,t)}function Ju(e,t){return e&&t?e.cachedTicks&&e.cachedTicks()||e.ticks({distance:t}):[]}var Zu={created:function(){},require:["chart","renderer","resolver"],defaultSettings:{layout:{displayOrder:0},style:{ticks:"$guide-line",minorTicks:"$guide-line--minor"}},beforeRender:function(){this.blueprint=Gu(),this.blueprint.width=this.rect.width,this.blueprint.height=this.rect.height,this.blueprint.x=this.rect.x,this.blueprint.y=this.rect.y,this.blueprint.crisp=!0},render:function(){var e=this;if(this.x=this.settings.x?this.chart.scale(this.settings.x):null,this.y=this.settings.y?this.chart.scale(this.settings.y):null,ka(this,"x",this.rect.width),ka(this,"y",this.rect.height),!this.x&&!this.y)return[];this.settings.ticks=F({show:!0},this.style.ticks,this.settings.ticks||{}),this.settings.minorTicks=F({show:!1},this.style.minorTicks,this.settings.minorTicks||{}),this.lines={x:[],y:[]},this.lines.x=Ju(this.x,this.rect.width),this.lines.y=Ju(this.y,this.rect.height),this.lines.y=this.lines.y.map((function(e){return F(e,{flipXY:!0})}));var t=function(t){var n=t.dir,r=t.isMinor,i=e.lines[n].filter((function(e){return!!e.isMinor===r})),o=r?e.settings.minorTicks:e.settings.ticks;e.resolver.resolve({settings:o,data:{items:i,dir:n}}).items.forEach((function(t){var r=t.data;t.show&&e.blueprint.push({type:"line",x1:r.position,y1:0,x2:r.position,y2:1,stroke:t.stroke||"black",strokeWidth:void 0!==t.strokeWidth?t.strokeWidth:1,strokeDasharray:void 0!==t.strokeDasharray?t.strokeDasharray:void 0,flipXY:r.flipXY||!1,value:r.value,dir:n})}))};return t({dir:"x",isMinor:!1}),t({dir:"x",isMinor:!0}),t({dir:"y",isMinor:!1}),t({dir:"y",isMinor:!0}),this.blueprint.output()}};function Qu(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"bottom";if(n*=.8,"left"===r||"right"===r){var i="right"===r;return"\n M ".concat(e," ").concat(t-n,"\n A ").concat(1.25*n," ").concat(1.25*n,", 0, 1, ").concat(i?0:1,", ").concat(e," ").concat(t+n,"\n L ").concat(i?e+n:e-n," ").concat(t," Z\n ")}var o="bottom"===r;return"\n M ".concat(e-n," ").concat(t,"\n A ").concat(1.25*n," ").concat(1.25*n,", 0, 1, ").concat(o?1:0,", ").concat(e+n," ").concat(t,"\n L ").concat(e," ").concat(o?t+n:t-n," Z\n ")}function el(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"bottom";if(n*=.75,"left"===r||"right"===r){var i="right"===r;return"\n M ".concat(e+=i?1.5*n:-1.5*n," ").concat(t-n,"\n L ").concat(e," ").concat(t+n,"\n L ").concat(i?e+n:e-n," ").concat(t," Z\n ")}var o="bottom"===r;return t+=o?1.5*n:-1.5*n,"\n M ".concat(e-n," ").concat(t,"\n L ").concat(e+n," ").concat(t,"\n L ").concat(e," ").concat(o?t+n:t-n," Z\n ")}function tl(e){if(void 0===e)return 0;if("number"==typeof e&&isFinite(e))return e;if("string"==typeof e)switch(e){case"center":case"middle":return.5;case"bottom":case"right":return 1;case"top":case"left":default:return 0}return 0}function nl(e){var t={value:e.value};return e.label&&(t.label=e.label.text),t}function rl(e){return void 0!==("function"==typeof e.value?e.value():e.value)}function il(e,t){var n=e.min();if(n===e.max()){var r=function(e){var t=e.range();return 2===(null==t?void 0:t.length)&&t[0]>t[1]}(e);if(t<n)return r?2:-1;if(t>n)return r?-1:2}return e(t)}var ol={require:["chart","renderer"],defaultSettings:{layout:{displayOrder:0},style:{oob:{show:!0,width:10,fill:"#1A1A1A",stroke:"transparent",strokeWidth:0,opacity:1,text:{fontFamily:"Arial",stroke:"transparent",fill:"#fff",strokeWidth:0,opacity:1},triangle:{fill:"#4D4D4D",stroke:"transparent",strokeWidth:0,opacity:1},padding:{x:28,y:5}},line:{stroke:"#000"},label:{strokeWidth:0}}},preferredSize:function(){return 30},beforeRender:function(){this.blueprint=Gu(),this.blueprint.width=this.rect.width,this.blueprint.height=this.rect.height,this.blueprint.x=this.rect.x,this.blueprint.y=this.rect.y,this.blueprint.crisp=!0},render:function(){var e=this,t=this.settings;if(this.lines={x:[],y:[]},this.lines.x=t.lines&&t.lines.x||[],this.lines.y=t.lines&&t.lines.y||[],0===this.lines.x.length&&0===this.lines.y.length)return[];var n={x0:[],x1:[],y0:[],y1:[]};this.lines.x=this.lines.x.filter(rl).map((function(t){if("function"==typeof t.value&&(t.value=t.value()),t.scale){var n=e.chart.scale(t.scale),r=il(n,t.value);return F(t,{scale:n,position:r})}return F(t,{position:t.value})})),this.lines.y=this.lines.y.filter(rl).map((function(t){if("function"==typeof t.value&&(t.value=t.value()),t.scale){var n=e.chart.scale(t.scale),r=il(n,t.value);return F(t,{scale:n,position:r,flipXY:!0})}return F(t,{position:t.value,flipXY:!0})})),this.lines.x=this.lines.x.filter((function(e){return!(e.position<0||e.position>1)||(n["x".concat(e.position>1?1:0)].push(nl(e)),!1)})),this.lines.y=this.lines.y.filter((function(e){return!(e.position<0||e.position>1)||(n["y".concat(e.position>1?1:0)].push(nl(e)),!1)}));var r=[];return[].concat(oe(this.lines.x),oe(this.lines.y)).forEach((function(n){(!0===n.show||void 0===n.show)&&function(e){var t,n=e.chart,r=e.blueprint,i=e.renderer,o=e.p,a=e.settings,s=e.items,u=!0,l=!1,c=!1,f=!1,h=F(!0,{},a.style.line,o.line||{});if(t=r.processItem({type:"line",x1:o.position,y1:0,x2:o.position,y2:1,stroke:h.stroke||"black",strokeWidth:h.strokeWidth||1,strokeDasharray:h.strokeDasharray,flipXY:o.flipXY||!1}),o.label){var d,p=F(!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:h.stroke},o.label),m={width:0,height:0},g="";if("string"==typeof o.formatter)d=n.formatter(o.formatter);else if("object"===W(o.formatter))d=n.formatter(o.formatter);else if(void 0!==o.scale&&o.scale.data){var y=o.scale.data()&&o.scale.data().fields;d=y&&y[0]?y[0].formatter():null}!1!==o.label.showValue&&(d?g=" (".concat(d(o.value),")"):o.scale&&(g=" (".concat(o.value,")"))),g&&(m=i.measureText({text:g,fontFamily:p.fontFamily,fontSize:p.fontSize}));var v=i.measureText({text:p.text||"",fontFamily:p.fontFamily,fontSize:p.fontSize}),b={width:v.width+m.width,height:Math.max(v.height,m.height)},x=p.padding,w=tl(o.flipXY?p.vAlign:p.align),k=tl(o.flipXY?p.align:p.vAlign),M=Math.min(1+b.width+2*x,p.maxWidth*r.width,p.maxWidthPx),_=b.height+2*x,S=o.flipXY?_:M,q=o.flipXY?M:_;if((l=r.processItem({fn:function(e){var t=e.width,n=e.height,i=o.position*t-(o.flipXY?_:M)*(1-w);return{type:"rect",x:i=o.flipXY?i:Math.max(i,0),y:Math.max(Math.abs(k*n-q*k),0),width:o.flipXY?S:Math.min(S,r.width-i),height:q,stroke:p.background.stroke,strokeWidth:p.background.strokeWidth,fill:p.background.fill,opacity:p.background.opacity}},flipXY:o.flipXY||!1})).x<-1||l.x+l.width>r.width+1||l.y<-1||l.y+l.height>r.height+1)l=void 0;else{c={type:"text",text:p.text||"",fill:p.fill,opacity:p.opacity,fontFamily:p.fontFamily,fontSize:p.fontSize,x:l.x+x,y:l.y+l.height/2+b.height/3,maxWidth:l.width-2*x-m.width,anchor:"start"},g&&(f={type:"text",text:g||"",fill:p.fill,opacity:p.opacity,fontFamily:p.fontFamily,fontSize:p.fontSize,x:c.x+3+(l.width-(m.width+2*x)),y:c.y});for(var D=0,C=s.length;D<C;D++){var E=s[D];"rect"===E.type?ws(l,E)&&(u=!1):"line"===E.type&&o.flipXY===E.flipXY&&_s(l,E)&&(u=!1)}}}s.push(t),u&&l&&c&&(s.push(l,c),f&&s.push(f))}({chart:e.chart,blueprint:e.blueprint,renderer:e.renderer,p:n,settings:t,items:r})})),t.style.oob.show&&function(e){for(var t=e.blueprint,n=e.oob,r=e.settings,i=e.items,o=Object.keys(n),a=r.style.oob||{},s=function(e,r){var s=o[e],u=n[s];if(u.length>0){var l=s.charAt(1),c="y"===s.charAt(0),f=a.padding.x+a.width,h=a.padding.y+a.width,d="bottom";d=c?"1"===l?"bottom":"top":"1"===l?"right":"left";var p=t.processItem({fn:function(e){var t=e.width,n=e.height,r=l*t+("1"===l?-f:f),i=c?h:n-h;return"arc"===a.type?{type:"path",d:Qu(c?i:r,c?r:i,a.width,d),x:r,y:i,stroke:a.stroke,fill:a.fill,strokeWidth:a.strokeWidth||0}:{type:"circle",cx:r,cy:i,r:a.width,stroke:a.stroke,fill:a.fill,strokeWidth:a.strokeWidth||0,opacity:a.opacity,data:u}},flipXY:c}),m=p.cx||p.x,g=p.cy||p.y,y={type:"text",text:u.length||"",x:m-.4*a.width,y:g+.4*a.width,fontFamily:a.text.fontFamily,fontSize:"".concat(1.3*a.width,"px"),stroke:a.text.stroke,fill:a.text.fill,strokeWidth:a.text.strokeWidth||0,opacity:a.text.opacity},v={type:"path",d:el(m,g,a.width,d),x:m,y:g,stroke:a.triangle.stroke,fill:a.triangle.fill,strokeWidth:a.triangle.strokeWidth||0,opacity:a.triangle.opacity};i.push(p,y,v)}},u=0,l=o.length;u<l;u++)s(u)}({blueprint:this.blueprint,oob:n,settings:t,items:r}),r}};function al(e){var t={type:"line",x1:0,x2:0,y1:0,y2:0,collider:{type:null}};return"top"===e.align||"bottom"===e.align?(t.x1=e.innerRect.x-e.outerRect.x,t.x2=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){F(e,t.style)}(t,e),t}function sl(e){return"string"==typeof e||"number"==typeof e?e:"-"}function ul(e,t,n){n.layered||!n.stepSize?function(e,t){t.collider={type:"polygon",vertices:[{x:t.boundingRect.x,y:t.boundingRect.y},{x:t.boundingRect.x+t.boundingRect.width,y:t.boundingRect.y},{x:t.boundingRect.x+t.boundingRect.width,y:t.boundingRect.y+t.boundingRect.height},{x:t.boundingRect.x,y:t.boundingRect.y+t.boundingRect.height}]}}(0,t):n.tilted?function(e,t,n){var r=n.angle*(Math.PI/180),i=Math.max(n.stepSize/2,t.boundingRect.height/2),o="start"===t.anchor,a="end"===t.anchor&&r<0,s="start"===t.anchor&&r>=0,u=t.boundingRect.y+(s||a?t.boundingRect.height:0),l=[{x:t.x-i,y:u},{x:t.x+i,y:u}].map((function(e){return Ka(e,r,{x:t.x,y:t.y})})),c={x:o?t.boundingRect.x+t.boundingRect.width+10:t.boundingRect.x-10,y:t.boundingRect.y+t.boundingRect.height},f={x:o?t.boundingRect.x+t.boundingRect.width+10:t.boundingRect.x-10,y:t.boundingRect.y},h=r>=0?[c,f]:[f,c];l.push.apply(l,h),t.collider={type:"polygon",vertices:l}}(0,t,n):function(e,t,n){if("bottom"===n.align||"top"===n.align){var r=e.position*n.innerRect.width+(n.innerRect.x-n.outerRect.x-n.stepSize/2);t.collider={type:"rect",x:r,y:0,width:r<0?n.stepSize+r:n.stepSize,height:n.innerRect.height}}else{var i=e.position*n.innerRect.height+(n.innerRect.y-n.outerRect.y-n.stepSize/2);t.collider={type:"rect",x:0,y:i,width:n.innerRect.width,height:i<0?n.stepSize+i:n.stepSize}}var o=t.collider;o.x=Math.max(o.x,0),o.y=Math.max(o.y,0);var a=o.x+o.width-(n.outerRect.x+n.outerRect.width);o.width=a>0?o.width-a:o.width;var s=o.y+o.height-(n.outerRect.y+n.outerRect.height);o.height=s>0?o.height-s:o.height}(e,t,n)}function ll(e,t){var n=isNaN(e.style.align)?.5:Math.min(Math.max(e.style.align,0),1),r=0;if(e.tilted)r=e.stepSize*n;else{var i=t?e.textRect.height:e.textRect.width;r=Math.max(0,e.stepSize-i)*n}return r}function cl(e,t){var n={type:"text",text:sl(e.label),x:0,y:0,maxWidth:t.maxWidth,maxHeight:t.maxHeight,tickValue:e.value};return"top"===t.align||"bottom"===t.align?(n.x=e.start*t.innerRect.width+(t.innerRect.x-t.outerRect.x)+ll(t,!1),n.y="top"===t.align?t.innerRect.height:0,n.anchor=t.stepSize?"start":"middle",n.x+=isNaN(t.style.offset)?0:+t.style.offset):(n.y=e.start*t.innerRect.height+(t.innerRect.y-t.outerRect.y)+ll(t,!0),n.x="left"===t.align?t.innerRect.width:0,n.anchor="left"===t.align?"end":"start",n.baseline=t.stepSize?"text-before-edge":"central",n.y+=isNaN(t.style.offset)?0:+t.style.offset),function(e,t){["fill","fontSize","fontFamily"].forEach((function(n){e[n]=t.style[n]}))}(n,t),function(e,t){if(!t.tilted&&!t.stepSize)if("top"===t.align||"bottom"===t.align){var n=t.outerRect.width,r=Math.min(t.maxWidth/2,t.textRect.width/2),i=e.x-r,o=e.x+r;i<0?(e.anchor="start",e.x=t.innerRect.x-t.outerRect.x):o>n&&(e.anchor="end",e.x=t.innerRect.width+t.innerRect.x)}else{var a=t.outerRect.height,s=t.maxHeight/2,u=e.y-s,l=e.y+s;u<0?(e.y=t.innerRect.y-t.outerRect.y,e.baseline="text-before-edge"):l>a&&(e.y=t.innerRect.height+(t.innerRect.y-t.outerRect.y),e.baseline="text-after-edge")}}(n,t),function(e,t){"top"===t.align?e.y-=t.padding:"bottom"===t.align?e.y+=t.padding+t.maxHeight:"left"===t.align?e.x-=t.padding:"right"===t.align&&(e.x+=t.padding)}(n,t),function(e,t){if(t.tilted){var n=-t.angle,r=n*(Math.PI/180);"bottom"===t.align?(e.x-=t.maxHeight*Math.sin(r)/2,e.y-=t.maxHeight,e.y+=t.maxHeight*Math.cos(r)/2):e.x-=t.maxHeight*Math.sin(r)/3,e.transform="rotate(".concat(n,", ").concat(e.x,", ").concat(e.y,")"),e.anchor="bottom"===t.align==t.angle<0?"start":"end";var i=Math.cos(r)*t.maxWidth;if("bottom"===t.align==t.angle<0){var o=t.outerRect.width-t.paddingEnd;e.x+i>o&&(e.maxWidth=(o-e.x-10)/Math.cos(r))}else{var a=t.paddingEnd;e.x-i<a&&(e.maxWidth=(e.x-a-10)/Math.cos(r))}}}(n,t),function(e,t){e.boundingRect=t.textBounds(e)}(n,t),ul(e,n,t),n}function fl(e,t){var 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){F(e,t.style)}(n,t),function(e,t){"top"===t.align?(e.y1-=t.padding,e.y2-=t.padding):"bottom"===t.align?(e.y1+=t.padding,e.y2+=t.padding):"left"===t.align?(e.x1-=t.padding,e.x2-=t.padding):"right"===t.align&&(e.x1+=t.padding,e.x2+=t.padding)}(n,t),function(e,t){var n=e.strokeWidth/2;e.x1===t.innerRect.width?(e.x1-=n,e.x2-=n):0===e.x1?(e.x1+=n,e.x2+=n):e.y1===t.innerRect.height?(e.y1-=n,e.y2-=n):0===e.y1&&(e.y1+=n,e.y2+=n)}(n,t),n}function hl(e){return!e.isMinor&&e.position>=0&&e.position<=1}function dl(e){var t=e.rect,n=e.state,r=e.majorTicks,i=e.measure;return e.horizontal?function(e){for(var t=e.majorTicks,n=e.measureText,r=e.rect,i="layered"===e.state.labels.activeMode?2:1,o=r.width,a=t.map((function(e){return e.label})).map((function(e){return"".concat(e.slice(0,1)).concat(e.length>1?"…":"")})).map(n).map((function(e){return e.width})),s=0;s<t.length;++s){var u=t[s];if(i*o*Math.abs(u.start-u.end)<a[s])return!0}return!1}({majorTicks:r,measureText:i,rect:t,state:n}):function(e){var t=e.majorTicks,n=e.measureText,r=e.rect.height,i=n("M").height;return!(t.length<2)&&r*Math.abs(t[0].position-t[1].position)<i}({majorTicks:r,measureText:i,rect:t,state:n})}function pl(e){var t=e.value,n=e.maxValue,r=e.minValue,i=e.range,o=e.modifier;return isNaN(i)||isNaN(o)||(t=i*o),t>n&&(t=n),t<r&&(t=r),t}function ml(e){var t=e.isDiscrete,n=e.rect,r=e.formatter,i=e.measureText,o=e.scale,a=e.settings,s=e.state,u=0,l={left:0,top:0,right:0,bottom:0},c=a.labels,f=c.maxLengthPx,h=c.minLengthPx;if(a.labels.show){var d,p,m=a.align,g="top"===m||"bottom"===m,y=g?n.inner.width:n.inner.height,v=o.ticks({settings:a,distance:y,formatter:r}).filter(hl),b=function(e){var t=i({text:e,fontSize:a.labels.fontSize,fontFamily:a.labels.fontFamily});return t.width=pl({value:t.width,maxValue:f,minValue:h}),t};if(t&&g&&"auto"===a.labels.mode&&(!function(e){var t=e.majorTicks,n=e.measure,r=e.rect,i=e.state,o=e.settings,a=o.labels.maxGlyphCount,s="layered"===i.labels.activeMode?2:1,u=o.labels.tiltThreshold?o.labels.tiltThreshold:.7,l=n("…").width,c=r.width,f=0;if(isNaN(a))for(var h=0;h<t.length;h++){var d=t[h],p=d.label;if(n(p).width*(p.length>1?u:1)+l>(f=s*c*Math.abs(d.start-d.end)))return!0}else if(f=s*c*t.reduce((function(e,t){return Math.min(Math.abs(t.start-t.end),e)}),1/0),n("M").width*u*a+l>f)return!0;return!1}({majorTicks:v,measure:b,rect:n.inner,state:s,settings:a})?s.labels.activeMode="horizontal":s.labels.activeMode="tilted"),!a.labels.filterOverlapping&&"tilted"!==s.labels.activeMode&&dl({rect:n.inner,state:s,majorTicks:v,measure:b,horizontal:g}))return{size:Math.max(n.outer.width,n.outer.height),isToLarge:!0};if("tilted"===s.labels.activeMode){var x=Math.abs(a.labels.tiltAngle)*(Math.PI/180);d=function(e){return pl({value:e.width,maxValue:f,minValue:h})*Math.sin(x)+e.height*Math.cos(x)}}else d=g?function(e){return e.height}:function(e){return pl({value:e.width,maxValue:f,minValue:h})};if(g&&"tilted"!==s.labels.activeMode)p=["M"];else if(isNaN(a.labels.maxGlyphCount))p=v.map((function(e){return e.label}));else{for(var w="",k=0;k<a.labels.maxGlyphCount;k++)w+="M";p=[w]}var M=p.map(b),_=M.map(d),S=Math.max.apply(Math,oe(_).concat([0]));if(u+=S,u+=a.labels.margin,"layered"===s.labels.activeMode&&(u*=2),"tilted"===s.labels.activeMode){var q="bottom"===a.align==a.labels.tiltAngle>=0,D=Math.abs(a.labels.tiltAngle)*(Math.PI/180),C=(S-i("M").height*Math.cos(D))/Math.sin(D),E=Math.min(a.labels.maxEdgeBleed,Math.max.apply(Math,oe(M.map((function(e){return Math.min(C,e.width)*Math.cos(D)+e.height})).map((function(e,t){var r=v[t]?v[t].position:0;return q?e-r*n.inner.width:e-(1-r)*n.inner.width}))).concat([0])))+a.paddingEnd;if(l[q?"left":"right"]=E,!a.labels.filterOverlapping&&function(e){var t=e.majorTicks,n=e.measureText,r=e.rect,i=e.bleedSize,o=e.angle;if(t.length<2)return!1;if(0===o)return!0;var a=Math.abs(o),s=1/(Math.min(r.outer.width-i,r.inner.width)*Math.abs(t[0].position-t[1].position));return n("M").height>Math.sin(a*(Math.PI/180))/s}({majorTicks:v,measureText:i,rect:n,bleedSize:E,angle:a.labels.tiltAngle}))return{size:Math.max(n.outer.width,n.outer.height),isToLarge:!0}}}return{size:u,edgeBleed:l}}var gl=function(e,t,n){return e.width*Math.abs(t.position-n.position)};function yl(e){var t=e.layered,n=e.major,r=e.innerRect,i=e.outerRect,o=e.tick,a=e.index,s=t?2:1,u=n[a-s],l=n[a+s],c=u?gl(r,o,u)/2-2:1/0,f=l?gl(r,o,l)/2-2:1/0;return n.length<2?r.width:u?l?2*Math.min(c,f):function(e){var t=e.innerRect,n=e.outerRect,r=e.tick,i=e.prevWidth,o=t.x-n.x,a=n.width-t.width-o,s=t.width-t.width*r.position+a,u=2*Math.min(i,s),l=1===r.position?t.width/2-2:0;return Math.max(i,u,l)}({innerRect:r,outerRect:i,tick:o,prevWidth:c}):function(e){var t=e.innerRect,n=e.outerRect,r=e.tick,i=e.nextWidth,o=t.x-n.x,a=t.width*r.position+o,s=2*Math.min(i,a),u=0===r.position?t.width/2-2:0;return Math.max(i,s,u)}({innerRect:r,outerRect:i,tick:o,nextWidth:f})}function vl(e){var t=0;return t+=e.paddingStart,t+=e.line.show?e.line.strokeWidth/2:0,t+=e.ticks.show?e.ticks.margin:0}function bl(e){var t=0;return t+=e.ticks.show?e.ticks.tickSize:0,t+=vl(e)+e.labels.margin}function xl(e,t){return e.map((function(e){return fl(e,t)}))}function wl(e,t){return t?Math.abs(t.end-t.start):e.bandwidth()}function kl(e){var t=e.textMetrics,n=e.settings,r=e.innerRect,i=e.scale,o=e.tilted,a=e.layered,s=e.tick,u=t.height,l=wl(i,s),c={width:0,height:u};if("left"===n.align||"right"===n.align)c.width=r.width-bl(n)-n.paddingEnd;else if(a)c.width=l*r.width*2;else if(o){var f=Math.abs(n.labels.tiltAngle)*(Math.PI/180);c.width=(r.height-bl(n)-n.paddingEnd-u*Math.cos(f))/Math.sin(f)}else c.width=l*r.width;return c.width=pl({value:c.width,maxValue:n.labels.maxLengthPx,minValue:n.labels.minLengthPx}),c}function Ml(e){var t=e.textMetrics,n=e.settings,r=e.innerRect,i=e.outerRect,o=e.tilted,a=e.layered,s=e.tick,u=e.index,l=e.major,c=t.height,f={width:0,height:c};if("left"===n.align||"right"===n.align)f.width=r.width-bl(n)-n.paddingEnd;else if(o){var h=Math.abs(n.labels.tiltAngle)*(Math.PI/180);f.width=(r.height-bl(n)-n.paddingEnd-c*Math.cos(h))/Math.sin(h)}else f.width=yl({layered:a,major:l,innerRect:r,outerRect:i,tick:s,index:u});return f.width=pl({value:f.width,maxValue:n.labels.maxLengthPx,minValue:n.labels.minLengthPx}),f}function _l(e){var t;function n(){return t=Ml,n}function r(){return t=kl,r}function i(e){var n,r=e.settings,i=e.scale,o=e.innerRect,a=e.outerRect,s=e.measureText,u=e.ticks,l=e.state,c=e.textBounds,f=[],h=function(e){return e.filter((function(e){return!e.isMinor}))}(u),d=function(e){return e.filter((function(e){return e.isMinor}))}(u),p={innerRect:o,align:r.align,outerRect:a},m="tilted"===l.labels.activeMode,g="layered"===l.labels.activeMode;if(r.line.show&&(p.style=r.line,p.padding=r.paddingStart,f.push(al(p))),r.ticks.show&&(p.style=r.ticks,p.tickSize=r.ticks.tickSize,p.padding=vl(r),n=xl(h,p)),r.labels.show){var y=bl(r);p.style=r.labels,p.padding=y,p.tilted=m,p.layered=g,p.angle=r.labels.tiltAngle,p.paddingEnd=r.paddingEnd,p.textBounds=c;var v=function(e,n){p.textRect=function(e){var t=e.style;return(0,e.measureText)({text:e.tick.label,fontSize:t.fontSize,fontFamily:t.fontFamily})}({tick:e,measureText:s,style:p.style});var l=t({textMetrics:p.textRect,settings:r,innerRect:o,outerRect:a,scale:i,tilted:m,layered:g,tick:e,major:h,index:n});p.maxWidth=l.width,p.maxHeight=l.height,p.stepSize=function(e){var t=e.innerRect,n=e.scale,r=e.settings,i=e.tick;return("top"===r.align||"bottom"===r.align?t.width:t.height)*wl(n,i)}({innerRect:o,scale:i,ticks:u,settings:r,tick:e})},b=[];b=!g||"top"!==r.align&&"bottom"!==r.align?function(e,t,n){return e.map((function(e,r){n(e,r);var i=cl(e,t);return i.data=e.data,i}))}(h,p,v):function(e,t,n,r){var i=t.padding,o=bl(n);return e.map((function(e,a){r(e,a);var s=o+t.maxHeight+n.labels.margin;t.layer=a%2,t.padding=a%2==0?i:s;var u=cl(e,t);return u.data=e.data,u}))}(h,p,r,v),r.labels.filterOverlapping&&function(e,t,n){var r=function(t,n){return ws(ye(1,e[t].boundingRect),ye(1,e[n].boundingRect))};if(n&&n.tilted){var i=Math.abs(n.angle);r=function(t,n){var r=1/Math.abs(e[t].x-e[n].x),o=Math.sin(i*(Math.PI/180))/r;return e[t].boundingRect.height>o}}for(var o=0;o<=e.length-1;o++)for(var a=o+1;a<=Math.min(o+5,o+(e.length-1));a++)e[o]&&e[a]&&r(o,a)&&(a===e.length-1?(e.splice(o,1),t&&t.splice(o,1)):(e.splice(a,1),t&&t.splice(a,1)),a--,o--)}(b,n,p),f.push.apply(f,oe(b))}return r.minorTicks&&r.minorTicks.show&&d.length>0&&(p.style=r.minorTicks,p.tickSize=r.minorTicks.tickSize,p.padding=function(e){return e.line.strokeWidth+e.minorTicks.margin}(r),f.push.apply(f,oe(xl(d,p)))),n&&f.push.apply(f,oe(n)),f}return n.build=i,r.build=i,e?r():n()}var Sl={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"},ql={labels:{show:!0,margin:4,maxLengthPx:150,minLengthPx:0,align:.5,offset:0,filterOverlapping:!0},ticks:{show:!0,margin:0,tickSize:8},minorTicks:{show:!1,tickSize:3,margin:0},line:{show:!0},paddingStart:0,paddingEnd:10,align:"auto"};var Dl={require:["chart","renderer","dockConfig"],defaultSettings:{layout:{displayOrder:0,prioOrder:0},settings:{},style:{labels:"$label",ticks:"$guide-line",minorTicks:"$guide-line--minor",line:"$guide-line"}},created:function(){this.state={isDiscrete:!!this.scale.bandwidth,isHorizontal:!1,labels:{activeMode:"horizontal"},ticks:[],innerRect:{width:0,height:0,x:0,y:0},outerRect:{width:0,height:0,x:0,y:0},defaultDock:void 0,concreteNodeBuilder:void 0,settings:void 0},this.state.isDiscrete?this.state.defaultDock="bottom":this.state.defaultDock="left",this.setState(this.settings)},setState:function(){var e,t,n,r;this.state.isDiscrete=!!this.scale.bandwidth,this.state.settings=function(e){var t=e.state,n=e.style,r=e.settings,i=F(!0,{},t.isDiscrete?Sl:ql,n),o=F(!0,{},i,r.settings),a=r.layout.dock||t.defaultDock;o.dock=a,o.align=function(e,t){var n=["top","bottom"],r=["left","right"];return-1!==n.indexOf(e)&&-1===r.indexOf(t)||-1!==r.indexOf(e)&&-1===n.indexOf(t)?e:t}(r.settings.align,a),o.labels.tiltAngle=Math.max(-90,Math.min(o.labels.tiltAngle,90));var s=o.paddingStart,u=o.paddingEnd;return o.paddingStart="function"==typeof s?s.call(null):s,o.paddingEnd="function"==typeof u?u.call(null):u,o}(this),this.state.concreteNodeBuilder=_l(this.state.isDiscrete),this.dockConfig.dock(this.state.settings.dock),this.state.isHorizontal="top"===this.state.settings.align||"bottom"===this.state.settings.align,this.state.labels.activeMode=(e=this.state,t=this.state.settings,n=this.state.isDiscrete,r=t.labels.mode,n&&e.isHorizontal?"auto"===r?e.labels.activeMode:-1!==["layered","tilted"].indexOf(t.labels.mode)&&-1!==["top","bottom"].indexOf(t.dock)?r:"horizontal":"horizontal")},preferredSize:function(e){var t=this.formatter,n=this.state,r=this.scale,i=this.state.isHorizontal?e.inner.width:e.inner.height;return this.state.pxScale=Ma(r,i),function(e){var t=e.isDiscrete,n=e.rect,r=e.formatter,i=e.measureText,o=e.scale,a=e.settings,s=0,u=ml({isDiscrete:t,rect:n,formatter:r,measureText:i,scale:o,settings:a,state:e.state}),l=u.size,c=u.edgeBleed;if(s+=l,u.isToLarge)return{size:s};if(a.ticks.show&&(s+=a.ticks.margin,s+=a.ticks.tickSize),a.minorTicks&&a.minorTicks.show){var f=a.minorTicks.margin+a.minorTicks.tickSize;f>s&&(s=f)}if(a.line.show){var h=a.line.strokeWidth/2;s+=h,c[function(e){switch(e){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left";default:return e}}(a.align)]=Math.ceil(h)}return s+=a.paddingStart,{size:s+=a.paddingEnd,edgeBleed:c}}({isDiscrete:this.state.isDiscrete,rect:{inner:e.inner,outer:e.outer},formatter:t,measureText:this.renderer.measureText,scale:this.state.pxScale,settings:this.state.settings,state:n})},beforeUpdate:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.settings;this.setState(t)},resize:function(e){var t=e.inner,n=e.outer,r=F({},t,function(e){var t=e.align,n=e.inner;return"left"===t?{x:n.width+n.x}:"right"===t||"bottom"===t?n:{y:n.y+n.height}}({align:this.state.settings.align,inner:t})),i=n||r;return F(this.state.innerRect,r),F(this.state.outerRect,i),n},beforeRender:function(){var e=this.scale,t=this.formatter,n=this.state.isHorizontal?this.state.innerRect.width:this.state.innerRect.height;this.state.pxScale=Ma(e,n),this.state.ticks=this.state.pxScale.ticks({distance:n,formatter:t}).filter((function(e){return e.position>=0&&e.position<=1}))},render:function(){var e=this.state,t=[];return t.push.apply(t,oe(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}))),Ku.multiple(t),t}};var Cl={render:function(){return[]}};function El(e,t,n){var r="";if("function"==typeof e)r=e();else if("string"==typeof e)r=e;else if(n){r=(n.data().fields||[]).map((function(e){return e.title()})).join(t)}return r}function Al(e,t){var n="middle";return"left"===e?"top"===t?n="end":"bottom"===t&&(n="start"):"right"===e?"top"===t?n="start":"bottom"===t&&(n="end"):"left"===t?n="start":"right"===t&&(n="end"),n}var Tl={require:["renderer","chart"],defaultSettings:{layout:{dock:"bottom",displayOrder:0,prioOrder:0},settings:{paddingStart:5,paddingEnd:5,paddingLeft:0,paddingRight:0,anchor:"center",join:", ",maxLengthPx:NaN},style:{text:"$title"}},created:function(){this.definitionSettings=this.settings.settings;var e=this.settings.text,t=this.definitionSettings.join;this.title=El(e,t,this.scale)},preferredSize:function(){return this.renderer.measureText({text:this.title,fontSize:this.style.text.fontSize,fontFamily:this.style.text.fontFamily}).height+this.definitionSettings.paddingStart+this.definitionSettings.paddingEnd},render:function(){var e=this.title,t=this.definitionSettings,n=this.rect,r=[];return r.push(function(e){var t=e.title,n=e.definitionSettings,r=e.dock,i=e.rect,o=e.measureText,a=e.style,s={type:"text",text:t,x:0,y:0,dx:0,dy:0,anchor:Al(r,n.anchor),baseline:"alphabetical"};F(s,a.text);var u=o(s);if("top"===r||"bottom"===r){var l=i.width/2;"left"===n.anchor?l=n.paddingLeft||0:"right"===n.anchor&&(l=i.width-(n.paddingRight||0)),s.x=l,s.y="top"===r?i.height-n.paddingStart:n.paddingStart+u.height,s.dy="top"===r?-u.height/6:-u.height/3,s.maxWidth=.8*i.width}else{var c=i.height/2;"top"===n.anchor?c=n.paddingStart:"bottom"===n.anchor&&(c=i.height-n.paddingStart),s.y=c,s.x="left"===r?i.width-n.paddingStart:n.paddingStart,s.dx="left"===r?-u.height/3:u.height/3;var f="left"===r?270:90;s.transform="rotate(".concat(f,", ").concat(s.x+s.dx,", ").concat(s.y+s.dy,")"),s.maxWidth=.8*i.height}return isNaN(n.maxLengthPx)||(s.maxWidth=Math.min(s.maxWidth,n.maxLengthPx)),s}({title:e,dock:this.settings.layout.dock,definitionSettings:t,rect:n,measureText:this.renderer.measureText,style:this.style})),r},beforeUpdate:function(e){e.settings&&(F(this.settings,e.settings),this.definitionSettings=e.settings.settings);var t=this.settings.text,n=this.definitionSettings.join;this.title=El(t,n,this.scale)}};function Nl(e,t){var n,r=e.settings.layout.dock,i=e.settings.settings.invert,o="top"===r||"bottom"===r,a=o?"width":"height",s=e.rect[a],u=e.chart.scroll(e.settings.scroll),l=t[o?"x":"y"];i&&(l=s-l);var c=u.getState();n={startOffset:l,startScroll:c.start,swipe:!1};var f=l/s*(c.max-c.min)+c.min;f<c.start?n.startScroll=f:f>c.start+c.viewSize&&(n.startScroll=f-c.viewSize);return{update:function(e){var t=e[o?"x":"y"];if(i&&(t=s-t),!n.swipe){if(Math.abs(n.startOffset-t)<=1)return;n.swipe=!0}var r=u.getState(),a=(t-n.startOffset)/s*(r.max-r.min),l=n.startScroll+a;u.moveTo(l)},end:function(e){var t=e[o?"x":"y"];i&&(t=s-t);var r=u.getState();if(n.swipe){var a=(t-n.startOffset)/s*(r.max-r.min),l=n.startScroll+a;u.moveTo(l)}else{var c=t/s*(r.max-r.min)+r.min-r.viewSize/2;u.moveTo(c)}}}}function Rl(e,t){var n=t.element().getBoundingClientRect();return{x:e.center.x-n.left,y:e.center.y-n.top}}var Ol={require:["chart","renderer"],on:{panStart:function(e){var t=Rl(e,this.renderer),n={x:t.x-e.deltaX,y:t.y-e.deltaY};this.currentMove=Nl(this,n),this.currentMove.update(t)},panMove:function(e){if(this.currentMove){var t=Rl(e,this.renderer);this.currentMove.update(t)}},panEnd:function(e){if(this.currentMove){var t=Rl(e,this.renderer);this.currentMove.end(t),this.currentMove=null}},panCancel:function(){this.currentMove=null},tap:function(e){var t=Rl(e,this.renderer);Nl(this,t).end(t)}},defaultSettings:{settings:{backgroundColor:"#eee",thumbColor:"#ccc",width:16}},preferredSize:function(e){var t=this.chart.scroll(this.settings.scroll).getState();return t.viewSize>=t.max-t.min?Math.max(e.width,e.height):this.settings.settings.width},render:function(e){var t,n=this.settings.layout.dock,r=this.settings.settings.invert,i="top"===n||"bottom"===n,o=i?"width":"height",a=this.rect[o],s=this.chart.scroll(this.settings.scroll).getState(),u=a*(s.start-s.min)/(s.max-s.min),l=a*s.viewSize/(s.max-s.min);return r&&(u=a-u-l),e("div",{style:{position:"relative",width:"100%",height:"100%",background:this.settings.settings.backgroundColor,pointerEvents:"auto"}},[].concat(e("div",{class:"scroller",style:(t={position:"absolute"},K(t,i?"left":"top","".concat(u,"px")),K(t,i?"top":"left","25%"),K(t,i?"height":"width","50%"),K(t,o,"".concat(Math.max(1,l),"px")),K(t,"background",this.settings.settings.thumbColor),t)})))},renderer:"dom"};function Il(e){var t=e.h,n=e.isVertical,r=e.value,i=e.pos,o=e.align,a=e.borderHit,s=e.state,u=e.idx,l="end"!==o,c=l?{left:"0",top:"0"}:{right:"0",bottom:"0"},f=0,h="100%",d="100%";return s.targetRect&&"start"===s.settings.bubbles.align?(h="".concat(s.targetRect.x+s.targetRect.width,"px"),d="".concat(s.targetRect.y+s.targetRect.height,"px")):s.targetRect&&"end"===s.settings.bubbles.align&&(f=n?s.targetRect.x:s.targetRect.y,h="".concat(s.rect.width-f,"px"),d="".concat(s.rect.height-f,"px")),l||(i-=a),t("div",{onmouseover:function(e){e.srcElement.children[0].style.backgroundColor="#000",e.srcElement.children[0].style[n?"height":"width"]="2px"},onmouseout:function(e){e.srcElement.children[0].style.backgroundColor=s.style.line.stroke,e.srcElement.children[0].style[n?"height":"width"]="1px"},"data-value":r,"data-key":[s.key,"edge",u].join("-"),style:{cursor:n?"ns-resize":"ew-resize",position:"absolute",left:"".concat(n?f:i,"px"),top:"".concat(n?i:f,"px"),height:n?"".concat(a,"px"):d,width:n?h:"".concat(a,"px"),pointerEvents:"auto"}},[t("div",{style:F({backgroundColor:s.style.line.stroke,position:"absolute",height:n?"".concat(1,"px"):"100%",width:n?"100%":"".concat(1,"px"),pointerEvents:"none"},c)})])}function Pl(e){var t,n,r=e.h,i=e.isVertical,o=e.label,a=e.otherValue,s=e.rangeIdx,u=e.idx,l=e.pos,c=e.align,f=e.state,h=e.value,d="end"!==c,p="outside"===f.settings.bubbles.placement,m="none";i?(n=d?"left":"right",p&&(m=d?"translate(-100%, 0px)":"translate(100%, 0px)")):(n=d?"top":"bottom",p&&(m=d?"translate(0px, -100%)":"translate(0px, 100%)"));var g=f.edit&&f.edit.rangeIdx===s&&f.edit.bubbleIdx===u,y={position:"relative",borderRadius:"".concat(f.style.bubble.borderRadius,"px"),border:"".concat(f.style.bubble.strokeWidth,"px solid ").concat(f.style.bubble.stroke),backgroundColor:f.style.bubble.fill,color:f.style.bubble.color,fontFamily:f.style.bubble.fontFamily,fontSize:f.style.bubble.fontSize,padding:"4px 8px",textAlign:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"150px",minWidth:"50px",minHeight:"1em",pointerEvents:"auto",transform:i?"translate(0,-50%)":"translate(-50%,0)",cursor:i?"ns-resize":"ew-resize"},v=f.style.bubble.stroke,b=g?r("input",{type:"text",value:h,style:V(V({},y),{},{textAlign:"start",textOverflow:"",fontSize:"13px"}),onkeyup:function(e){if("Enter"===e.key){e.preventDefault(),e.stopPropagation();var t=parseFloat(e.target.value);isNaN(t)?(v="rgba(230, 78, 78, 0.6)",e.target.style.border="".concat(f.style.bubble.strokeWidth,"px solid ").concat(v)):f.onEditConfirmed(s,t,a)}else"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),f.onEditCanceled())}}):r("div",{"data-key":[f.key,"bubble",s].join("-"),"data-other-value":a,"data-idx":s,"data-bidx":u,style:y},[o]);return r("div",{style:(t={position:"absolute"},K(t,n,"0"),K(t,i?"top":"left","".concat(l,"px")),K(t,"transform",m),t)},[b])}function Ll(e){var t=e.h,n=e.isVertical,r=e.top,i=e.height,o=e.color,a=e.on,s=e.opacity;return t("div",F({style:{backgroundColor:o,opacity:s,position:"absolute",left:n?0:"".concat(r,"px"),top:n?"".concat(r,"px"):0,height:n?"".concat(i,"px"):"100%",width:n?"100%":"".concat(i,"px"),pointerEvents:"auto"}},a),[])}function jl(e){var t=e.borderHit,n=e.els,r=e.isVertical,i=e.state,o=e.vStart,a=e.vEnd,s=e.idx,u=0;i.targetRect&&(u=r?i.targetRect.y:i.targetRect.x);var l=!!i.scale,c=l?i.scale.norm(o)*i.size:o,f=l?i.scale.norm(a)*i.size:a,h=Math.abs(c-f),d=Math.min(c,f)+u,p=d+h;if(i.targetRect){var m=i.targetFillRect||i.targetRect,g=r?m.height:m.width,y=l?i.scale.norm(o)*g:o,v=l?i.scale.norm(a)*g:a,b=Math.abs(y-v),x=Math.min(y,v),w={h:i.h,isVertical:r,top:x,height:b,color:i.style.target.fill,opacity:i.style.target.opacity};i.style.target.opacity<.8&&(w.on={onmouseover:function(e){e.srcElement.style.opacity=i.style.target.opacity+.1},onmouseout:function(e){e.srcElement.style.opacity=i.style.target.opacity}}),n.push(i.h("div",{style:{position:"absolute",left:"".concat(m.x,"px"),top:"".concat(m.y,"px"),height:"".concat(m.height,"px"),width:"".concat(m.width,"px")}},[Ll(w)]))}var k=c<f?o:a,M=c<f?a:o,_=ie(l?i.scale.domain():[Math.min(o,a),Math.max(o,a)],2),S=_[0],q=_[1],D=k+1e-5>=S&&k-1e-5<=q,C=M-1e-5<=q&&M+1e-5>=S;D&&n.push(Il({h:i.h,isVertical:r,borderHit:t,value:k,pos:d,align:"start",state:i,idx:s})),C&&n.push(Il({h:i.h,isVertical:r,borderHit:t,value:M,pos:p,align:"end",state:i,idx:s}));var E=i.settings.bubbles;if(E&&E.show){var A={fontSize:E.fontSize,fontFamily:E.fontFamily,color:E.fill},T=[o,a];D&&n.push(Pl({h:i.h,isVertical:r,align:E.align,style:A,rangeIdx:s,idx:0,otherValue:M,value:k,label:"".concat(i.format(k,T)),pos:d,state:i})),C&&n.push(Pl({h:i.h,isVertical:r,align:E.align,style:A,rangeIdx:s,idx:1,otherValue:k,value:M,label:"".concat(i.format(M,T)),pos:p,state:i}))}}function zl(e){var t=e.active.limitHigh-e.active.end,n=e.active.limitLow-e.active.start,r=e.current-e.start;return r=r<0?Math.max(r,n):Math.min(r,t)}function Fl(e){var t=[],n=0===e.direction;if(Array.isArray(e.ranges)&&e.ranges.forEach((function(r,i){e.active&&i===e.active.idx||jl({borderHit:5,els:t,isVertical:n,state:e,vStart:Math.min(r.min,r.max),vEnd:Math.max(r.min,r.max),idx:i})})),e.active){var r=e.start,i=e.current;if(-1!==e.active.idx)if("foo"===e.active.mode)r=Math.min(e.active.start,e.active.end),i=Math.max(e.active.start,e.active.end);else if("modify"===e.active.mode)r=Math.min(e.start,e.current),i=Math.max(e.start,e.current);else{var o=zl(e);r=e.active.start+o,i=e.active.end+o}jl({borderHit:5,els:t,isVertical:n,state:e,vStart:r,vEnd:i,idx:e.active.idx})}return t}function Hl(e){return{min:e.scale.min(),max:e.scale.max()}}function Bl(e){return{min:0,max:e.direction?e.rect.width:e.rect.height}}function Vl(e,t,n){var r,i,o=e.ranges,a=-1;for(r=0;r<o.length;r++){if(o[r].min<=t&&t<=o[r].max){a=r,n.min=r?o[r-1].max:n.min,n.max=r+1<o.length?o[r+1].min:n.max;break}if(t<o[r].min){n.max=o[r].min,n.min=r?o[r-1].max:n.min;break}}-1===a&&o.length&&r>=o.length&&(n.min=o[o.length-1].max),-1!==a&&(i={idx:a,start:o[a].min,end:o[a].max,limitLow:n.min,limitHigh:n.max,mode:"foo"}),e.active=i}function Wl(e){e.renderer.render(Fl(e))}function Ul(e,t){if(!t||!t.isActive())return[];var n=e.scale.data(),r=(n&&n.fields||[]).map((function(e){return e.id()})),i=t.brushes().filter((function(e){return"range"===e.type&&-1!==r.indexOf(e.id)}))[0];return i?i.brush.ranges():[]}function $l(e,t){for(var n,r=1/0,i=t.domain(),o=t.bandwidth()/2,a=0;a<i.length;++a){var s=Math.abs(e-o-t(i[a]));s<r&&(r=s,n=i[a])}return n}function Yl(e,t){return Math.min.apply(Math,oe(e))<=Math.max.apply(Math,oe(t))&&Math.max.apply(Math,oe(e))>=Math.min.apply(Math,oe(t))}function Kl(e){return pe(e.reduce((function(e,t){return e.push.apply(e,oe(de(t.bounds))),e}),[]))}var Xl={require:["chart","settings","renderer"],defaultSettings:{settings:{bubbles:{show:!0,align:"start"}},style:{bubble:"$label-overlay",line:"$shape-guide--inverted",target:"$selection-area-target"}},renderer:"dom",on:{rangeStart:function(e){this.start(e)},rangeMove:function(e){this.move(e)},rangeEnd:function(e){this.end(e)},rangeClear:function(e){this.clear(e)},bubbleStart:function(e){this.bubbleStart(e)}},created:function(){this.state={key:this.settings.key||"brush-range"}},beforeRender:function(e){this.state.rect=e.size.computedInner},renderRanges:function(){this.state.started||(this.state.ranges=Ul(this.state,this.state.brushInstance),this.state.active=null,Wl(this.state))},render:function(e){var t=this,n=this.settings.settings;this.state.direction="vertical"===n.direction?0:1;var r=this.renderer.element().getBoundingClientRect(),i=this.state.rect[0===this.state.direction?"height":"width"],o=Ma(this.chart.scale(n.scale),i),a=function(e){var t={targetRect:null,targetFillRect:null,scale:null,size:null},n=e.settings.settings,r=n.target&&(n.target.components||(n.target.component?[n.target.component]:[])).map((function(t){return e.chart.component(t)})).filter((function(e){return!!e&&!!e.rect})),i=n.target&&n.target.selector?e.chart.findShapes(n.target.selector):[],o=n.target&&n.target.fillSelector?e.chart.findShapes(n.target.fillSelector):[];if(i.length>0){var a=Kl(i);if(t.size=a[0===e.state.direction?"height":"width"],t.scale=Ma(e.chart.scale(n.scale),t.size),t.targetRect=a,o.length>0){var s=Kl(o);t.targetFillRect=s}}else if(r&&r.length>0){var u=r.slice(1).reduce((function(e,t){return{x0:Math.min(e.x0,t.rect.computedInner.x),y0:Math.min(e.y0,t.rect.computedInner.y),x1:Math.max(e.x1,t.rect.computedInner.x+t.rect.computedInner.width),y1:Math.max(e.y1,t.rect.computedInner.y+t.rect.computedInner.height)}}),{x0:r[0].rect.computedInner.x,y0:r[0].rect.computedInner.y,x1:r[0].rect.computedInner.x+r[0].rect.computedInner.width,y1:r[0].rect.computedInner.y+r[0].rect.computedInner.height});t.targetRect={x:u.x0-e.state.rect.x,y:u.y0-e.state.rect.y,width:u.x1-u.x0,height:u.y1-u.y0}}return t}(this);if(o=a.scale?a.scale:o,this.state.targetRect=a.targetRect,this.state.targetFillRect=a.targetFillRect,this.state.size=null===a.size?i:a.size,this.state.settings=n,this.state.style=this.style,this.state.offset=r,this.state.brush="object"===W(n.brush)?n.brush.context:n.brush,this.state.brushInstance=this.chart.brush(this.state.brush),this.state.renderer=this.renderer,this.state.multi=!!n.multiple,this.state.h=e,this.state.onEditConfirmed=function(e,n,r){t.state.edit=null,function(e,t,n,r){var i=e.ranges.map((function(e){return{min:e.min,max:e.max}})),o=e.scale.min(),a=e.scale.max();i[t]={min:Math.max(o,Math.min(n,r)),max:Math.min(a,Math.max(n,r))},e.ranges[t]=V({},i[t]);var s=e.scale.data();s&&s.fields&&s.fields.forEach((function(t){e.fauxBrushInstance||e.brushInstance.setRange(t.id(),i)}))}(t.state,e,n,r),t.emit("bubbleEnd"),Wl(t.state)},this.state.onEditCanceled=function(){t.state.edit=null,Wl(t.state)},this.state.cssCoord={offset:0===this.state.direction?"top":"left",coord:0===this.state.direction?"y":"x",pos:0===this.state.direction?"deltaY":"deltaX"},this.state.format="function"==typeof n.bubbles.label&&function(e,r){return n.bubbles.label.call(void 0,{datum:e,data:r,scale:o,resources:{scale:t.chart.scale,formatter:t.chart.formatter}})},{}.hasOwnProperty.call(o,"norm")){this.state.editable=!0,this.state.observeBrush="object"===W(n.brush)&&n.brush.observe,this.state.fauxBrushInstance=null,this.state.findValues=null,this.state.scale=o;var s=this.state.scale.data();!this.state.format&&s&&s.fields&&s.fields[0]&&(this.state.format=s.fields[0].formatter())}else this.state.editable=!1,this.state.scale=xo(),this.state.scale.data=o.data,this.state.format||(this.state.format=function(e,t){return Yl(o.range(),t)?function(e,t){var n=t.ticks(),r=t.domain().indexOf($l(e,t));return-1!==r?n[r].label:"-"}(e,o):"-"}),this.state.fauxBrushInstance=ma(),this.state.findValues=function(e){return function(e,t){var n=t.domain(),r=t.range(),i=[];return e.forEach((function(e){if(Yl(r,[e.min,e.max])){var o=n.indexOf($l(e.min,t)),a=n.indexOf($l(e.max,t));i.push.apply(i,n.slice(Math.min(o,a),Math.max(o,a)+1))}})),i}(e,o)};return this.state.ranges=Ul(this.state,this.state.brushInstance),this.state.observeBrush||this.state.sourcedFromThisComponent?[Fl(this.state)]:[]},mounted:function(){this.state.observeBrush&&this.state.brushInstance&&this.state.brushInstance.on("update",this.renderRanges)},beforeDestroy:function(){this.state.observeBrush&&this.state.brushInstance&&this.state.brushInstance.removeListener("update",this.renderRanges)},start:function(e){!function(e){var t=e.state,n=e.e,r=e.renderer,i=e.ranges,o=e.targetSize;if(!t.started){t.edit=null;var a=n.center.x-n.deltaX,s=n.center.y-n.deltaY,u=document.elementFromPoint(a,s);r.element().contains(u)||(u=null);var l={started:!0};t.offset=F({},r.element().getBoundingClientRect());var c=a-t.offset.left,f=s-t.offset.top;t.offset.left+=t.targetRect?t.targetRect.x:0,t.offset.top+=t.targetRect?t.targetRect.y:0,t.ranges=i(t,t.fauxBrushInstance||t.brushInstance);var h=n.center[t.cssCoord.coord]-n[t.cssCoord.pos]-t.offset[t.cssCoord.offset],d=n.center[t.cssCoord.coord]-t.offset[t.cssCoord.offset];l.current=t.scale.normInvert(d/t.size),l.start=t.scale.normInvert(h/t.size);var p,m,g=t.ranges,y=Hl(t),v=-1;if(u&&u.hasAttribute("data-idx"))v=parseInt(u.getAttribute("data-idx"),10),y.min=v>0?g[v-1].max:y.min,y.max=v+1<g.length?g[v+1].min:y.max;else{for(p=0;p<g.length;p++){if(g[p].min<=l.start&&l.start<=g[p].max){v=p,y.min=p?g[p-1].max:y.min,y.max=p+1<g.length?g[p+1].min:y.max;break}if(l.start<g[p].min){y.max=g[p].min,y.min=p?g[p-1].max:y.min;break}}-1===v&&g.length&&p>=g.length&&(y.min=g[g.length-1].max)}if(-1!==v||t.multi||(l.ranges=[],y.min=t.scale.min(),y.max=t.scale.max()),-1!==v)if(m={idx:v,start:g[v].min,end:g[v].max,limitLow:y.min,limitHigh:y.max,mode:"move"},u&&u.hasAttribute("data-other-value"))l.start=parseFloat(u.getAttribute("data-other-value")),m.mode="modify";else{var b=t.scale.norm(m.start)*t.size,x=t.scale.norm(m.end)*t.size;Math.abs(h-b)<=o?(l.start=m.end,m.mode="modify"):Math.abs(h-x)<=o&&(l.start=m.start,m.mode="modify")}else m={idx:-1,start:l.start,end:l.current,limitLow:y.min,limitHigh:y.max,mode:"current"};l.active=m,"modify"!==m.mode&&t.targetRect&&!Ms(t.targetRect,{x:c,y:f})||Object.keys(l).forEach((function(e){return t[e]=l[e]}))}}({e:e,state:this.state,renderer:this.renderer,ranges:Ul,targetSize:5})},end:function(){this.state.started&&(!function(e,t){e.started=!1,e.ranges=t(e,e.fauxBrushInstance||e.brushInstance);var n=Hl(e);Vl(e,e.current,n)}(this.state,Ul),Wl(this.state),this.state.sourcedFromThisComponent=!0,this.state.active=null)},move:function(e){this.state.started&&(!function(e,t){var n=(t.center[e.cssCoord.coord]-e.offset[e.cssCoord.offset])/e.size,r=e.scale.normInvert(n);e.current=Math.max(Math.min(r,e.active.limitHigh),e.active.limitLow)}(this.state,e),function(e){var t=e.ranges.map((function(e){return{min:e.min,max:e.max}}));if(-1!==e.active.idx)if("modify"===e.active.mode)t[e.active.idx].min=Math.min(e.start,e.current),t[e.active.idx].max=Math.max(e.start,e.current);else{var n=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)});var r=e.scale.data();r&&r.fields&&r.fields.forEach((function(n){if(e.fauxBrushInstance){var r=Ul(e,e.fauxBrushInstance),i=e.findValues(r),o=e.findValues(t),a=o.filter((function(e){return-1===i.indexOf(e)})),s=i.filter((function(e){return-1===o.indexOf(e)})),u=a.map((function(e){return{key:n.id(),value:e}})),l=s.map((function(e){return{key:n.id(),value:e}}));e.brushInstance.addAndRemoveValues(u,l),e.fauxBrushInstance.setRange(n.id(),t)}else e.brushInstance.setRange(n.id(),t)}))}(this.state),Wl(this.state))},clear:function(){this.state.fauxBrushInstance&&this.state.fauxBrushInstance.clear(),this.state.renderer.render([]),this.state.started=!1,this.state.active=null,this.state.sourcedFromThisComponent=!1},bubbleStart:function(e){if(this.state.editable){var t=e.srcEvent||e,n=t.target,r={rangeIdx:parseInt(n.getAttribute("data-idx"),10),bubbleIdx:parseInt(n.getAttribute("data-bidx"),10)};if(!isNaN(r.rangeIdx)&&JSON.stringify(r)!==JSON.stringify(this.state.edit)){this.state.edit=r,t.stopPropagation(),t.stopImmediatePropagation(),t.preventDefault();var i=n.parentNode;Wl(this.state);var o=i.querySelector("input");o.focus(),o.select()}}}};function Gl(e){e.renderer.render(Fl(e))}function Jl(e){return e.rc.ranges()}var Zl={require:["chart","settings","renderer"],defaultSettings:{settings:{bubbles:{show:!0,align:"start"}},style:{bubble:"$label-overlay",line:"$shape-guide--inverted",target:"$selection-area-target"}},renderer:"dom",on:{areaStart:function(e){this.start(e)},areaMove:function(e){this.move(e)},areaEnd:function(e){this.end(e)},areaClear:function(e){this.clear(e)}},created:function(){this.state={key:this.settings.key||"brush-area-dir"}},render:function(e){var t=this;this.state.rect=this.rect;var n=this.settings.settings,r="vertical"===n.direction?0:1,i=this.state.rect[0===r?"height":"width"],o=this.renderer.element().getBoundingClientRect(),a=(n.target?n.target.components||[n.target.component]:[]).map((function(e){return t.chart.component(e)})).filter((function(e){return!!e&&!!e.rect})),s=a[0]?a.slice(1).reduce((function(e,t){return{x0:Math.min(e.x0,t.rect.x),y0:Math.min(e.y0,t.rect.y),x1:Math.max(e.x1,t.rect.x+t.rect.width),y1:Math.max(e.y1,t.rect.y+t.rect.height)}}),{x0:a[0].rect.x,y0:a[0].rect.y,x1:a[0].rect.x+a[0].rect.width,y1:a[0].rect.y+a[0].rect.height}):null;return this.state.targetRect=s?{x:s.x0-this.rect.x,y:s.y0-this.rect.y,width:s.x1-s.x0,height:s.y1-s.y0}:null,this.state.style=this.style,this.state.chart=this.chart,this.state.direction=r,this.state.settings=n,this.state.offset=o,this.state.rc=ta(),this.state.renderer=this.renderer,this.state.multi=!!n.multiple,this.state.h=e,this.state.size=i,this.state.cssCoord={offset:0===this.state.direction?"top":"left",coord:0===this.state.direction?"y":"x",pos:0===this.state.direction?"deltaY":"deltaX",area:0===this.state.direction?"height":"width"},this.state.format=function(e,t){return function(e,t,n){var r=Math.min.apply(Math,oe(n)),i=Math.max.apply(Math,oe(n)),o={x:e.direction?r+e.rect.x:e.rect.x,y:e.direction?e.rect.y:r+e.rect.y,width:e.direction?i-r:e.rect.width+e.rect.x,height:e.direction?e.rect.height+e.rect.y:i-r},a=e.chart.shapesAt(o,e.settings.brush);if(0===a.length)return"-";var s=a.reduce((function(n,i){var o=n.bounds,a=i.bounds;return t===r?o[e.cssCoord.coord]<=a[e.cssCoord.coord]?n:i:o[e.cssCoord.coord]+o[e.cssCoord.area]>=a[e.cssCoord.coord]+a[e.cssCoord.area]?n:i})),u=e.settings.brush.components.reduce((function(e,t){return e.key===s.key?e:t}));return"function"==typeof e.settings.bubbles.label?e.settings.bubbles.label(s.data):Array.isArray(u.data)&&u.data.length?s.data[u.data[0]].label:s.data&&s.data.label?s.data.label:"-"}(this,e,t)},[]},start:function(e){!function(e){var t=e.state,n=e.e,r=e.renderer,i=e.ranges,o=e.targetSize;if(!t.started){var a=n.center.x-n.deltaX,s=n.center.y-n.deltaY,u=document.elementFromPoint(a,s);r.element().contains(u)||(u=null);var l={started:!0};t.offset=r.element().getBoundingClientRect(),t.ranges=i(t);var c=a-t.offset.left,f=s-t.offset.top,h=n.center[t.cssCoord.coord]-n[t.cssCoord.pos]-t.offset[t.cssCoord.offset],d=n.center[t.cssCoord.coord]-t.offset[t.cssCoord.offset],p=d,m=h;l.start=h,l.current=d;var g,y,v=t.ranges,b=Bl(t),x=-1;if(u&&u.hasAttribute("data-idx"))x=parseInt(u.getAttribute("data-idx"),10),b.min=x>0?v[x-1].max:b.min,b.max=x+1<v.length?v[x+1].min:b.max;else{for(g=0;g<v.length;g++){if(v[g].min<=m&&m<=v[g].max){x=g,b.min=g?v[g-1].max:b.min,b.max=g+1<v.length?v[g+1].min:b.max;break}if(m<v[g].min){b.max=v[g].min,b.min=g?v[g-1].max:b.min;break}}-1===x&&v.length&&g>=v.length&&(b.min=v[v.length-1].max)}if(-1!==x||t.multi||(l.ranges=[],b.min=0,b.max=t.direction?t.rect.width:t.rect.height),-1!==x)if(y={idx:x,start:v[x].min,end:v[x].max,limitLow:b.min,limitHigh:b.max,mode:"move"},u&&u.hasAttribute("data-other-value"))l.start=parseFloat(u.getAttribute("data-other-value")),y.mode="modify";else{var w=y.start,k=y.end;Math.abs(h-w)<=o?(l.start=y.end,y.mode="modify"):Math.abs(h-k)<=o&&(l.start=y.start,y.mode="modify")}else y={idx:-1,start:m,end:p,limitLow:b.min,limitHigh:b.max,mode:"current"};l.active=y,"modify"!==y.mode&&t.targetRect&&!Ms(t.targetRect,{x:c,y:f})||Object.keys(l).forEach((function(e){return t[e]=l[e]}))}}({e:e,state:this.state,renderer:this.renderer,ranges:Jl,targetSize:5})},end:function(){this.state.started&&(!function(e,t){e.started=!1,e.ranges=t(e);var n=Bl(e);Vl(e,e.current,n)}(this.state,Jl),Gl(this.state))},move:function(e){this.state.started&&(!function(e,t){var n=t.center[e.cssCoord.coord]-e.offset[e.cssCoord.offset];e.current=Math.max(Math.min(n,e.active.limitHigh),e.active.limitLow)}(this.state,e),function(e){var t=e.ranges.map((function(e){return{min:e.min,max:e.max}}));if(-1!==e.active.idx)if("modify"===e.active.mode)t[e.active.idx].min=Math.min(e.start,e.current),t[e.active.idx].max=Math.max(e.start,e.current);else{var n=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);var r=[];t.forEach((function(t){r.push.apply(r,oe(function(e,t){var n={x:e.direction?t.min+e.rect.x:e.rect.x,y:e.direction?e.rect.y:t.min+e.rect.y,width:e.direction?t.max-t.min:e.rect.width+e.rect.x,height:e.direction?e.rect.height+e.rect.y:t.max-t.min};return e.chart.shapesAt(n,e.settings.brush)}(e,t)))})),function(e,t){e.chart.brushFromShapes(t,e.settings.brush)}(e,r)}(this.state),Gl(this.state))},clear:function(){this.state.rc&&this.state.rc.clear(),this.state.renderer.render([])}};function Ql(e){var t="vertical"===e.direction,n=e.rect[t?"height":"width"],r=e.rect[t?"width":"height"];return function(e){var t=e.brush;if(!t||!t.isActive())return[];var n=e.scale.data(),r=(n&&n.fields||[]).map((function(e){return e.id()})),i=t.brushes().filter((function(e){return"range"===e.type&&-1!==r.indexOf(e.id)}))[0];return i?i.brush.ranges():[]}(e).map((function(i){var o=e.scale(i.min)*n,a=e.scale(i.max)*n,s=Math.min(o,a),u=Math.abs(o-a);return{type:"rect",fill:e.fill,opacity:e.opacity,x:t?0:s,width:t?r:u,y:t?s:0,height:t?u:r}}))}function ec(e,t,n,r){function i(){!function(e){e.renderer.render(Ql(e))}(e)}function o(){!function(e){e.renderer.render(Ql(e))}(e)}function a(){!function(e){e.renderer.render(Ql(e))}(e)}e.brush=t,t&&(t.on("start",i),t.on("update",o),t.on("end",a),e.start=i,e.update=o,e.end=a,e.brush=t,e.scale=n,e.renderer=r)}function tc(e){e.brush&&(e.brush.removeListener("start",e.start),e.brush.removeListener("update",e.update),e.brush.removeListener("end",e.end)),e.start=void 0,e.update=void 0,e.end=void 0,e.brush=void 0,e.scale=void 0,e.renderer=void 0}var nc={require:["chart","settings","renderer"],defaultSettings:{settings:{}},preferredSize:function(){return 50},created:function(){this.state={}},render:function(){var e=this.settings.settings,t=this.chart.brush(e.brush),n=e.direction||"horizontal",r="horizontal"===n?this.rect.width:this.rect.height,i=Ma(this.chart.scale(e.scale),r);return tc(this.state),ec(this.state,t,i,this.renderer),this.state.rect=this.rect,this.state.fill=e.fill||"#ccc",this.state.opacity=void 0!==e.opacity?e.opacity:1,this.state.direction=n,Ql(this.state)},beforeDestroy:function(){tc(this.state)}};function rc(e,t){var n=t.center.x,r=t.center.y;return{x:n-e.left,y:r-e.top}}function ic(e,t,n){return Ua(e,t.points[0])<Math.pow(n.settings.snapIndicator.threshold,2)}function oc(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 ac(e){var t=e.state,n=e.start,r=void 0===n?null:n,i=e.end,o=void 0===i?null:i;null!==r&&(t.snapIndicator.x1=r.x,t.snapIndicator.y1=r.y),null!==o&&(t.snapIndicator.x2=o.x,t.snapIndicator.y2=o.y)}function sc(e,t){e.snapIndicator.visible=t}var uc={require:["chart","renderer","settings"],defaultSettings:{layout:{displayOrder:0},settings:{brush:{components:[]},snapIndicator:{threshold:75,strokeDasharray:"5, 5",stroke:"black",strokeWidth:2,opacity:.5},lasso:{fill:"transparent",stroke:"black",strokeWidth:2,opacity:.7,strokeDasharray:"20, 10"},startPoint:{r:10,fill:"green",stroke:"black",strokeWidth:1,opacity:1}}},on:{lassoStart:function(e){this.start(e)},lassoEnd:function(e){this.end(e)},lassoMove:function(e){this.move(e)},lassoCancel:function(){this.cancel()}},created:function(){this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}}},start:function(e){var t,n,r,i;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=(n=this.chart,r=this.state.rendererBounds,i=n.element.getBoundingClientRect(),{x:r.left-i.left,y:r.top-i.top}),this.state.brushConfig=this.settings.settings.brush.components.map((function(e){return{key:e.key,contexts:e.contexts||["lassoBrush"],data:e.data||[""],action:e.action||"add"}}));var o=rc(this.state.rendererBounds,e);oc(this.state,o),ac({state:this.state,start:o}),function(e,t){e.startPoint.cx=t.x,e.startPoint.cy=t.y}(this.state,o)},move:function(e){if(this.state.active){var t=rc(this.state.rendererBounds,e);ic(t,this.state,this.settings)?sc(this.state,!0):sc(this.state,!1),oc(this.state,t),ac({state:this.state,end:t}),function(e,t){var n=[e.startPoint,e.path,e.snapIndicator].filter((function(e){return e.visible}));t.render(n)}(this.state,this.renderer),function(e,t){if(e.active){var n=e.points[e.points.length-2],r=e.points[e.points.length-1];e.lineBrushShape.x1=n.x+e.componentDelta.x,e.lineBrushShape.y1=n.y+e.componentDelta.y,e.lineBrushShape.x2=r.x+e.componentDelta.x,e.lineBrushShape.y2=r.y+e.componentDelta.y;var i=t.shapesAt(e.lineBrushShape,{components:e.brushConfig});t.brushFromShapes(i,{components:e.brushConfig})}}(this.state,this.chart)}},end:function(e){this.state.active&&(sc(this.state,!1),ic(rc(this.state.rendererBounds,e),this.state,this.settings)&&function(e,t){if(e.active){var n=e.componentDelta.x,r=e.componentDelta.y,i=e.points.map((function(e){return{x:e.x+n,y:e.y+r}})),o=t.shapesAt({vertices:i},{components:e.brushConfig});t.brushFromShapes(o,{components:e.brushConfig})}}(this.state,this.chart),this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}},this.renderer.render([]))},cancel:function(){var e,t;this.state.active&&(e=this.state,t=this.chart,e.brushConfig.forEach((function(e){e.contexts.forEach((function(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(){}};function lc(e,t,n,r,i){for(var o,a=0,s=t.length-1;a<s;){var u=Math.floor((a+s)/2);(o=i(t[u]))[n]+o[r]<e[n]?a=u+1:s=u}return a}function cc(e){var t=e.orientation,n=e.targetNodes,r=e.labels,i=e.container,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:lc,a=[],s="v"===t?"x":"y",u="v"===t?"width":"height",l=function(e){return e.textBounds},c=function(e){return e.node.localBounds};return function(e,t){var f=r[t],h=f.textBounds,d=f.node;if(h[s]<i[s]||h[s]+h[u]>i[s]+i[u])return!1;for(var p=o(h,a,s,u,l);p<a.length;p++)if(ws(h,a[p].textBounds))return!1;for(var m=o(h,n,s,u,c),g=h[s]+h[u],y=m;y<n.length;y++){var v=n[y].node;if(g<v.localBounds[s])break;if(ws(h,v.localBounds)&&d!==v)return!1}return a.push(r[t]),!0}}function fc(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function hc(e){var t=W(e);return("string"===t||"number"===t)&&""!==e}function dc(e){return V({type:"rect",rx:2,ry:2,fill:e.backgroundColor},e.backgroundBounds)}function pc(e,t,n){return n?e.width>=t.height:e.width>=t.width}function mc(e,t,n){return n?e.height>=t.width:e.height>=t.height}function gc(e,t,n,r,i){var o,a;return"v"===e?(o=r||i||pc(t,n,!0),a=mc(t,n,!r)):(o=pc(t,n),a=i||mc(t,n,!1)),o&&a}function yc(e,t,n,r){return e+.5*t+(r-.5)*(t-n)-.5*n}function vc(e,t,n){var r={type:"text",text:t,maxWidth:n.rotate?e.height:e.width,x:0,y:e.y,dx:0,dy:0,fill:n.fill,anchor:n.rotate?"end":"start",baseline:"central",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily},i=n.textMetrics;if(!n.overflow&&!function(e,t,n){return pc(e,t,n.rotate)&&mc(e,t,n.rotate)}(e,i,n))return!1;var o=.5*i.height;return n.rotate?(r.x=yc(e.x,e.width,i.height,n.align)+o,r.y=yc(e.y,e.height,i.width,n.justify),r.transform="rotate(-90, ".concat(r.x+r.dx,", ").concat(r.y+r.dy,")")):(r.x=yc(e.x,e.width,i.width,n.align),r.y=yc(e.y,e.height,i.height,n.justify)+o),r}function bc(e){var t=e.bar,n=e.view,r=e.direction,i=e.position,o=e.padding,a=void 0===o?4:o,s={};if(F(s,t),i&&"inside"!==i)if("up"===r||"down"===r){var u=Math.max(0,Math.min(t.y,n.height)),l=Math.max(0,Math.min(t.y+t.height,n.height));"outside"===i&&"up"===r||"opposite"===i&&"down"===r?(s.y=0,s.height=u):("outside"===i&&"down"===r||"opposite"===i&&"up"===r)&&(s.y=l,s.height=n.height-l)}else{var c=Math.max(0,Math.min(t.x,n.width)),f=Math.max(0,Math.min(t.x+t.width,n.width));"outside"===i&&"left"===r||"opposite"===i&&"right"===r?(s.x=0,s.width=c):("outside"===i&&"right"===r||"opposite"===i&&"left"===r)&&(s.x=f,s.width=n.width-f)}else;return function(e,t){var n=Math.max(0,Math.min(e.y,t.height)),r=Math.max(0,Math.min(e.y+e.height,t.height)),i=Math.max(0,Math.min(e.x,t.width)),o=Math.max(0,Math.min(e.x+e.width,t.width));e.x=i,e.width=o-i,e.y=n,e.height=r-n}(s,n),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.top,r=void 0===n?4:n,i=t.bottom,o=void 0===i?4:i,a=t.left,s=void 0===a?4:a,u=t.right,l=void 0===u?4:u;e.x+=s,e.width-=s+l,e.y+=r,e.height-=r+o}(s,a),s}function xc(e){var t,n,r,i,o,a=e.direction,s=e.fitsHorizontally,u=e.measured,l=e.node,c=e.orientation,f=e.placementSettings,h=e.rect,d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:bc,p=[],m="h"===c?"width":"height";for(o=0;o<f.length;o++)if(r=f[o],i=d({bar:l.localBounds,view:h,direction:a,position:r.position,padding:r.padding}),p.push(i),t=!o||i[m]>t[m]?i:t,gc(c,i,u,s,r.overflow)){n=i;break}return n||(n=t,o=p.indexOf(n)),{bounds:n,placement:r=f[o]}}function wc(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=i.top,a=void 0===o?4:o,s=i.bottom,u=void 0===s?4:s,l=i.left,c=void 0===l?4:l,f=i.right,h=void 0===f?4:f,d=e.x+e.dx,p=e.y+e.dy,m=n?Math.min(t.width,r.height):Math.min(t.height,r.width),g=n?Math.min(t.height,r.height):Math.min(t.width,r.width),y=.5*t.height,v=1e-9,b=n?d-y:d,x=n?p:p-y,w={x:b-c-v,y:x-a-v,width:g+(c+h)-v,height:m+(a+u)-v};return w}function kc(e){for(var t,n,r,i,o,a,s,u,l,c,f,h,d,p=e.chart,m=e.targetNodes,g=e.rect,y=e.fitsHorizontally,v=e.collectiveOrientation,b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:xc,x=arguments.length>2&&void 0!==arguments[2]?arguments[2]:vc,w=arguments.length>3&&void 0!==arguments[3]?arguments[3]:cc,k=[],M={container:g,targetNodes:m,labels:[],orientation:v},_=0,S=m.length;_<S;_++){a=null,h=fc(r=(n=m[_]).node,p),d="left"===(l=n.direction)||"right"===l?"h":"v";for(var q=0;q<n.texts.length;q++)if(hc(i=n.texts[q])){var D=b({direction:l,fitsHorizontally:y,lblStngs:c=n.labelSettings[q],measured:u=n.measurements[q],node:r,orientation:d,placements:c.placements,placementSettings:n.placementSettings[q],rect:g});if(a=D.bounds,f=D.placement,a&&f){o=f.justify;var C="function"==typeof c.linkData?c.linkData(h,_):void 0,E="function"==typeof f.overflow?f.overflow(h,_):f.overflow;"up"===l&&(o=1-o),"opposite"===f.position&&(o=1-o),"left"===l&&(o=1-o);var A=!("h"===v||y);if(t=x(a,i,{justify:"h"===d?f.align:o,align:"h"===d?o:f.align,fontSize:c.fontSize,fontFamily:c.fontFamily,textMetrics:u,rotate:A,overflow:!!E})){var T=wc(t,u,A,a,f.padding);s="function"==typeof f.fill?f.fill(V(V({},h),{},{textBounds:T}),_):f.fill,t.fill=s,void 0!==C&&(t.data=C),"object"===W(f.background)&&(t.backgroundColor="function"==typeof f.background.fill?f.background.fill(V(V({},h),{},{textBounds:T}),_):f.background.fill,void 0!==t.backgroundColor&&(t.backgroundBounds=wc(t,u,A,a,f.background.padding))),k.push(t),M.labels.push({node:r,textBounds:T})}}}}var N=k.filter(w(M)),R=N.filter((function(e){return void 0!==e.backgroundBounds})).map(dc);return[].concat(oe(R),oe(N))}function Mc(e){for(var t,n,r,i,o,a,s,u=e.nodes,l=e.rect,c=e.chart,f=e.labelSettings,h=e.placementSettings,d=e.settings,p=e.renderer,m={},g=[],y=!0,v=!1,b=0;b<u.length;b++)if(ws(i=(n=u[b]).localBounds,l)){var x=fc(n,c);t={node:n,texts:[],measurements:[],labelSettings:[],placementSettings:[]};for(var w=0;w<f.length;w++)hc(r="function"==typeof(a=f[w]).label?a.label(x,b):void 0)&&(s="function"==typeof d.direction?d.direction(x,b):d.direction||"up",v=v||"left"===s||"right"===s,m.fontFamily=a.fontFamily,m.fontSize="".concat(a.fontSize,"px"),m.text=r,o=p.measureText(m),t.measurements.push(o),t.texts.push(r),t.labelSettings.push(a),t.placementSettings.push(h[w]),t.direction=s,y=y&&o.width<=i.width-8);g.push(t)}return{targetNodes:g,fitsHorizontally:y,hasHorizontalDirection:v}}function _c(e){var t=e.orientation,n=void 0===t?"auto":t,r=e.defaultOrientation,i=void 0===r?"h":r;switch(n.toLocaleLowerCase()){case"vertical":return"v";case"horizontal":return"h";default:return i}}function Sc(e){var t=2*Math.PI;return(e%t+t)%t}function qc(e,t){e.x+=t,e.width-=2*t,e.y+=t,e.height-=2*t}function Dc(e){return{x:e.x,y:e.y-e.height/2,width:e.width,height:e.height}}function Cc(e,t,n){var r=t.x,i=t.y;if(r*r+i*i>e*e)return null;var o=Math.sin(n),a=Math.cos(n),s=r*a-i*o,u=e*e-s*s;if(u<0)return null;var l=Math.sqrt(u);return{x:s*a+o*l,y:-s*o+a*l}}function Ec(e){var t,n,r=e.radius,i=e.size,o=e.angle,a=i.width,s=i.height,u={x:a/2,y:s/2};switch(Math.floor(o/(Math.PI/2))){case 0:if(!(t=Cc(r,u,o)))return null;t.y*=-1,n={x:-a,y:0};break;case 1:if(!(t=Cc(r,u,Math.PI-o)))return null;n={x:-a,y:-s};break;case 2:if(!(t=Cc(r,u,o-Math.PI)))return null;t.x*=-1,n={x:0,y:-s};break;case 3:if(!(t=Cc(r,u,2*Math.PI-o)))return null;t.x*=-1,t.y*=-1,n={x:0,y:0};break;default:throw new Error("invalid angle")}return{x:t.x+n.x,y:t.y+n.y,width:a,height:s}}function Ac(e){var t=e.slice,n=e.measured,r=e.padding,i=t.start,o=t.end,a=t.innerRadius,s=t.outerRadius,u=s-a-2*r,l=o-i;if(l<Math.PI){var c=(n.height/2+r)/Math.tan(l/2);c>a&&(u=s-c-2*r)}if(u<0||u<n.minReqWidth)return null;var f=Sc((i+o)/2),h=s-r,d={x:Math.sin(f)*h,y:-Math.cos(f)*h,width:u,height:n.height};return f<Math.PI?(d.angle=f-Math.PI/2,d.anchor="end"):(d.angle=f+Math.PI/2,d.anchor="start"),d}function Tc(e){var t=e.context,n=e.node,r=e.bounds,i=n.desc.slice,o=Sc((i.start+i.end)/2);switch(Math.floor(o/(Math.PI/2))){case 0:t.q1maxY=r.y-2,void 0===t.q2minY&&(t.q2minY=r.y+r.height+2);break;case 1:t.q2minY=r.y+r.height+2;break;case 2:t.q3minY=r.y+r.height+2;break;case 3:t.q4maxY=r.y-2,void 0===t.q3minY&&(t.q3minY=r.y+r.height+2)}}function Nc(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function Rc(e,t,n){var r={type:"text",text:t,maxWidth:e.width,x:e.x,y:e.y+("top"===e.baseline?e.height/2:0),fill:n.fill,anchor:e.anchor||"start",baseline:"middle",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily};if(!isNaN(e.angle)){var i=e.angle*(360/(2*Math.PI));r.transform="rotate(".concat(i,", ").concat(r.x,", ").concat(r.y,")")}return r}function Oc(e){var t,n,r=e.slice,i=e.direction,o=e.position,a=e.padding,s=e.measured,u=e.view,l=e.context,c=e.store,f=r.start,h=r.end,d=r.innerRadius,p=r.offset;switch(o){case"into":t="rotate"===i?Ac({slice:r,measured:s,padding:a}):function(e){var t=e.slice,n=e.padding,r=e.measured,i=t.start,o=t.end,a=t.innerRadius,s=t.outerRadius,u=Sc((i+o)/2),l=Ec({radius:s,size:{width:r.width+2*n,height:r.height+2*n},angle:u});return l?(l.baseline="top",_s(l,{x1:0,y1:0,x2:Math.sin(i)*s,y2:-Math.cos(i)*s})||_s(l,{x1:0,y1:0,x2:Math.sin(o)*s,y2:-Math.cos(o)*s})||ms({cx:0,cy:0,r:a},l)?null:(qc(l,n),l)):null}({slice:r,measured:s,padding:a});break;case"inside":n={start:f,end:h,innerRadius:0,outerRadius:d},t="rotate"===i?Ac({slice:n,measured:s,padding:a}):function(e){var t=e.slice,n=e.padding,r=e.measured,i=e.store,o=t.start,a=t.end,s=t.outerRadius,u=Sc((o+a)/2),l=Ec({radius:s,size:{width:r.width+2*n,height:r.height+2*n},angle:u});return l?(l.baseline="top",qc(l,n),i.insideLabelBounds.some((function(e){return ws(e,l)}))?null:(i.insideLabelBounds.push({x:l.x-4,y:l.y,width:l.width+8,height:l.height}),l)):null}({slice:n,measured:s,padding:a,store:c});break;case"outside":t="rotate"===i?function(e){var t=e.slice,n=e.measured,r=e.padding,i=e.view,o=t.start,a=t.end,s=t.outerRadius,u=t.offset,l=s+r,c=a-o;if(c<Math.PI&&(n.height/2+r)/Math.tan(c/2)>l)return null;var f=Sc((o+a)/2),h=Math.sin(f)*l,d=-Math.cos(f)*l,p=n.width,m=f%Math.PI;if(m>Math.PI/2&&(m=Math.PI-m),Math.cos(m)>.001){var g=d<0?i.y:i.y+i.height,y=Math.abs(g-u.y)/Math.cos(m)-Math.tan(m)*(n.height/2)-2*r-s;y<p&&(p=y)}if(Math.sin(m)>.001){var v=h<0?i.x:i.x+i.width,b=Math.abs(v-u.x)/Math.sin(m)-n.height/2/Math.tan(m)-2*r-s;b<p&&(p=b)}if(p<=0||p<n.minReqWidth)return null;var x={x:h,y:d,width:p,height:n.height};return f<Math.PI?(x.angle=f-Math.PI/2,x.anchor="start"):(x.angle=f+Math.PI/2,x.anchor="end"),x}({slice:r,measured:s,padding:a,view:u}):function(e){var t=e.slice,n=e.measured,r=e.padding,i=e.view,o=e.context,a=t.start,s=t.end,u=t.outerRadius,l=t.offset,c=Sc((a+s)/2);if(function(e,t,n){switch(t){case 0:return e.q1maxY<0;case 1:return e.q2minY>n.height;case 2:return e.q3minY>n.height;case 3:return e.q4maxY<0;default:return!0}}(o,Math.floor(c/(Math.PI/2)),i))return null;var f=u+r+n.height/2,h=Math.sin(c)*f,d=-Math.cos(c)*f,p=n.width;if(c<Math.PI){var m=Math.abs(i.x+i.width-(h+l.x));m<p&&(p=m)}else{var g=Math.abs(i.x-(h+l.x));g<p&&(p=g)}if(p<n.minReqWidth)return null;var y={x:h,y:d,width:p,height:n.height};return c<Math.PI?y.anchor="start":y.anchor="end",y}({slice:r,measured:s,padding:a,view:u,context:l});break;default:throw new Error("not implemented")}return t&&(t.x+=p.x,t.y+=p.y,"outside"===o&&"rotate"!==i&&function(e,t,n){var r=n.start,i=n.end,o=n.offset,a=n.outerRadius,s=Sc((r+i)/2);switch(Math.floor(s/(Math.PI/2))){case 0:if(void 0!==t.q1maxY){var u=Math.min(e.y,t.q1maxY-e.height),l=e.y-u;if(e.y=u,l>1){var c=a+2;e.line={type:"line",x1:e.x-2,y1:e.y+2,x2:o.x+Math.sin(s)*c,y2:o.y-Math.cos(s)*c,strokeWidth:1}}}break;case 1:if(void 0!==t.q2minY){var f=Math.max(e.y,t.q2minY),h=f-e.y;if(e.y=f,h>1){var d=a+2;e.line={type:"line",x1:e.x-2,y1:e.y-2,x2:o.x+Math.sin(s)*d,y2:o.y-Math.cos(s)*d,strokeWidth:1}}}break;case 2:if(void 0!==t.q3minY){var p=Math.max(e.y,t.q3minY),m=p-e.y;if(e.y=p,m>1){var g=a+2;e.line={type:"line",x1:e.x+2,y1:e.y-2,x2:o.x+Math.sin(s)*g,y2:o.y-Math.cos(s)*g,strokeWidth:1}}}break;case 3:if(void 0!==t.q4maxY){var y=Math.min(e.y,t.q4maxY-e.height),v=e.y-y;if(e.y=y,v>1){var b=a+2;e.line={type:"line",x1:e.x+2,y1:e.y+2,x2:o.x+Math.sin(s)*b,y2:o.y-Math.cos(s)*b,strokeWidth:1}}}}}(t,l,r)),t}function Ic(e){for(var t=e.context,n=e.direction,r=e.measured,i=e.node,o=e.placementSettings,a=e.rect,s=e.store,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Oc,l=0;l<o.length;l++){var c=o[l],f=u({context:t,slice:i.desc.slice,view:a,direction:n,position:c.position,measured:r,padding:c.padding,store:s});if(f)return{bounds:f,placement:c}}return{bounds:null,placement:null}}function Pc(e){for(var t=[],n=[],r=[],i=[],o=0;o<e.length;++o){var a=e[o].desc.slice,s=Sc((a.start+a.end)/2);switch(Math.floor(s/(Math.PI/2))){case 0:t.push(e[o]);break;case 1:n.push(e[o]);break;case 2:r.push(e[o]);break;case 3:i.push(e[o])}}var u=function(e,t){return Sc((e.desc.slice.start+e.desc.slice.end)/2)-Sc((t.desc.slice.start+t.desc.slice.end)/2)},l=function(e,t){return u(t,e)};return t.sort(l),n.sort(u),r.sort(l),i.sort(u),t.concat(n,i,r)}function Lc(e,t,n){var r=t.fontFamily,i="".concat(t.fontSize,"px"),o=n.measureText({text:e,fontFamily:r,fontSize:i});return o.minReqWidth=Math.min(o.width,n.measureText({text:"".concat(e[0],"…"),fontFamily:r,fontSize:i}).width),o}var jc=/\n+|\r+|\r\n/,zc=/\s/,Fc=/[a-zA-Z\u00C0-\u00F6\u00F8-\u00FF\u00AD]/;function Hc(e){return"string"==typeof e?-1!==e.search(jc):-1!==String(e).search(jc)}function Bc(e){return-1!==e.search(zc)}function Vc(e){return-1!==e.search(Fc)}function Wc(e,t,n,r,i){return r.some((function(r){return r(e,t,n)}))?1:i.some((function(r){return r(e,t,n)}))?0:2}function Uc(e){""===e[0]&&e.shift(),""===e[e.length-1]&&e.pop()}function $c(e,t,n){return Math.max(t,Math.min(n,e))}function Yc(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.string,n=e.separator,r=void 0===n?"":n,i=e.reverse,o=void 0!==i&&i,a=e.measureText,s=void 0===a?function(e){return{width:e.length,height:1}}:a,u=e.mandatoryBreakIdentifiers,l=void 0===u?[Hc]:u,c=e.noBreakAllowedIdentifiers,f=void 0===c?[]:c,h=e.suppressIdentifier,d=void 0===h?[Bc,Hc,function(e){return""===e}]:h,p=e.hyphenationIdentifiers,m=void 0===p?[Vc]:p,g=String(t).split(r);Uc(g);var y=g.length,v=o?function(e){return e>=0}:function(e){return e<y},b=o?y:-1;function x(e){var t=$c(e,0,y-1),n=g[t],r=s(n),i=Wc(n,t,g,l,f);return{index:t,value:n,breakOpportunity:i,suppress:d.some((function(e){return e(n,t,g)})),hyphenation:m.some((function(e){return e(n,t,g)})),width:r.width,height:r.height,done:!1}}function w(e){return isNaN(e)?o?b--:b++:b=$c(e,0,y-1),v(b)?x(b):{done:!0}}return{next:w,peek:x,length:y}}var Kc="…",Xc=/^\s*\d+(\.\d+)?px\s*$/i;function Gc(e){return"string"===W(e)&&Xc.test(e)}function Jc(e){var t=e["font-size"]||e.fontSize;return Gc(t)?parseFloat(t)*Math.max(isNaN(e.lineHeight)?1.2:e.lineHeight,0):19.2}function Zc(e){var t=e.maxHeight,n=Math.max(e.maxLines,1)||1/0;if(isNaN(t))return n;var r=Jc(e);return Math.max(1,Math.min(Math.floor(t/r),n))}function Qc(e,t){return{lines:[],line:"",width:0,maxLines:Zc(e),maxWidth:e.maxWidth,hyphens:{enabled:"auto"===e.hyphens,char:"‐",metrics:t("‐")}}}function ef(e){e.lines.push(e.line),e.line="",e.width=0}function tf(e,t){e.line+=t.value,e.width+=t.width}function nf(e,t,n){if(t.width>e.maxWidth)return t;for(var r=t.index,i=1;i<5;i++){var o=n.peek(t.index-1);if(!t.hyphenation||!o.hyphenation||0===t.index)return t;if(e.width+e.hyphens.metrics.width<=e.maxWidth)return e.line+=e.hyphens.char,t;if(1===e.line.length)return t;t=n.next(r-i),e.line=e.line.slice(0,-1),e.width-=t.width}return t}function rf(e,t,n){for(var r=Yc({string:t.value,measureText:n});e.lines.length<e.maxLines;){var i=r.next();if(i.done)break;e.width+i.width>e.maxWidth&&2===i.breakOpportunity&&e.line.length>0?(i=e.hyphens.enabled?nf(e,i,r):i,ef(e),tf(e,i)):tf(e,i)}}function of(e,t){for(var n=Yc({string:e.text,separator:"",measureText:t,noBreakAllowedIdentifiers:[function(e,t){return 0===t}]}),r=Qc(e,t),i=!0;r.lines.length<r.maxLines;){var o=n.next();if(o.done){ef(r),i=!1;break}1===o.breakOpportunity?ef(r):r.width+o.width>r.maxWidth&&2===o.breakOpportunity?o.suppress?r.width+=o.width:(o=r.hyphens.enabled?nf(r,o,n):o,ef(r),tf(r,o)):tf(r,o)}return{lines:r.lines,reduced:i}}function af(e,t){for(var n=Yc({string:e.text,separator:/(\s|-|\u2010)/,measureText:t}),r=Qc(e,t),i=!0;r.lines.length<r.maxLines;){var o=n.next();if(o.done){ef(r),i=!1;break}1===o.breakOpportunity?ef(r):r.width+o.width>r.maxWidth&&2===o.breakOpportunity?o.suppress?ef(r):o.width>r.maxWidth?rf(r,o,t):(ef(r),tf(r,o)):tf(r,o)}return{lines:r.lines,reduced:i}}function sf(e){return{"break-all":of,"break-word":af}[e.wordBreak]}function uf(e){return function(t){var n=t.node;if(function(e){return"text"===e.type&&!e._lineBreak}(n)){var r=sf(n);if(!r)return;var i=e(n);if(i.width>n.maxWidth||Hc(n.text)){var o=(Jc(n)-i.height)/2,a=r(n,function(e,t){return function(n){return t({text:n,fontSize:e.fontSize,fontFamily:e.fontFamily})}}(n,e));t.node=function(e,t,n,r){var i={type:"container",children:[]};void 0!==t.id&&(i.id=t.id);var o=0;return e.lines.forEach((function(a,s){var u=F({},t);u.text=a,u._lineBreak=!0,o+=n,e.reduced&&s===e.lines.length-1?u.text+=Kc:delete u.maxWidth,u.dy=isNaN(u.dy)?o:u.dy+o,o+=r,o+=n,i.children.push(u)})),i}(a,n,o,i.height)}}}}function lf(e,t){var n=e.text,r=e["font-size"],i=e["font-family"],o=e.maxWidth;if(n="string"==typeof n?n:"".concat(n),void 0===o)return n;var a=t({text:n,fontSize:r,fontFamily:i}).width;if(a<=o)return n;for(var s=0,u=n.length-1;s<=u;){var l=Math.floor((s+u)/2);(a=t({text:n.substr(0,l)+Kc,fontSize:r,fontFamily:i}).width)<=o?s=l+1:u=l-1}return n.substr(0,u)+Kc}function cf(e){var t=e.baseline||e["dominant-baseline"],n=0,r=parseInt(e.fontSize||e["font-size"],10)||0;switch(t){case"hanging":n=.75*r;break;case"text-before-edge":n=.85*r;break;case"middle":n=.25*r;break;case"central":n=.35*r;break;case"mathemetical":n=r/2;break;case"text-after-edge":case"ideographic":n=.2*-r;break;default:n=0}return n}var ff,hf={},df={},pf={fontSize:void 0,fontFamily:void 0};function mf(e,t,n){var r=e+t+n;return"number"!=typeof df[r]&&(ff=ff||document.createElement("canvas").getContext("2d"),function(e,t){pf.fontSize===e&&pf.fontFamily===t||(ff.font=e+" "+t,pf.fontSize=e,pf.fontFamily=t)}(t,n),df[r]=ff.measureText(e).width),df[r]}function gf(e){return"number"!=typeof hf[e]&&(hf[e]=function(e){if(Gc(e)){var t=parseFloat(e);return t+4*Math.ceil((t+1e-12)/24)}return 16}(e)),hf[e]}function yf(e){var t=e.text,n=e.fontSize;return{width:mf(t,n,e.fontFamily),height:gf(n)}}function vf(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yf,n=e["font-size"]||e.fontSize,r=e["font-family"]||e.fontFamily,i=t({text:e.text,fontFamily:r,fontSize:n}),o=Math.min(e.maxWidth||i.width,i.width),a=e.x||0,s=e.y||0,u=e.dx||0,l=(e.dy||0)+cf(e),c={x:0,y:s+l-.75*i.height,width:o,height:i.height},f=e["text-anchor"]||e.anchor;return c.x="middle"===f?a+u-o/2:"end"===f?a+u-o:a+u,c}function bf(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yf,n=sf(e),r=e["font-size"]||e.fontSize,i=e["font-family"]||e.fontFamily,o=t({text:e.text,fontFamily:i,fontSize:r});if(n&&(o.width>e.maxWidth||Hc(e.text))){for(var a=n(e,(function(e){return t({text:e,fontFamily:i,fontSize:r})})),s=F({},e),u=0,l="",c=0,f=a.lines.length;c<f;c++){var h=a.lines[c];h+=c===f-1&&a.reduced?Kc:"";var d=t({text:h,fontSize:r,fontFamily:i}).width;d>=u&&(u=d,l=h)}s.text=l;var p=vf(s,t);return p.height=Jc(e)*a.lines.length,p}return vf(e,t)}var xf=.9;function wf(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function kf(e,t,n){var r={type:"text",text:t,maxWidth:e.width,x:0,y:e.y,dx:0,dy:0,fill:n.fill,anchor:"start",baseline:"alphabetical",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily},i=n.textMetrics;if(e.width<n.fontSize)return!1;var o=Math.max(0,e.width-i.width);return r.x=e.x+n.align*o,r.y=e.y+i.height/1.2,r}function Mf(e){return{type:"circle",bounds:{cx:e.cx,cy:e.cy,r:e.r}}}function _f(e){return e.desc&&e.desc.slice?function(e){var t=e.start,n=e.end,r=e.innerRadius,i=e.outerRadius,o=e.offset;if(Math.abs(t+2*Math.PI-n)>1e-12)return{type:null,bounds:null};var a=0!==r?r:i;return Mf({cx:o.x,cy:o.y,r:a})}(e.desc.slice):"circle"===e.type?Mf(e.attrs):"rect"===e.type?{type:"rect",bounds:e.bounds}:{type:null,bounds:null}}var Sf={bar:function(e){var t=e.settings,n=e.chart,r=e.nodes,i=e.rect,o=e.renderer,a=e.style,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:kc,u=F({fontSize:12,fontFamily:"Arial",align:.5,justify:0,fill:"#333"},a.label);u.fontSize=parseInt(u.fontSize,10);var l=t.labels.map((function(e){return F({},u,t,e)})),c=t.labels.map((function(e){return e.placements.map((function(n){return F({},u,t,e,n)}))})),f=Mc({nodes:r,chart:n,renderer:o,settings:t,rect:i,labelSettings:l,placementSettings:c}),h=f.fitsHorizontally,d=f.hasHorizontalDirection,p=f.targetNodes,m=_c({orientation:t.orientation,defaultOrientation:d?"h":"v"}),g="h"===m?"y":"x",y="h"===m?"height":"width";return p.sort((function(e,t){return e.node.localBounds[g]+e.node.localBounds[y]-(t.node.localBounds[g]+t.node.localBounds[y])})),s({chart:n,targetNodes:p,stngs:t,rect:i,fitsHorizontally:h,collectiveOrientation:m})},slice:function(e){var t=e.settings,n=e.chart,r=e.nodes,i=e.rect,o=e.renderer,a=e.style,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ic,u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Rc,l=F({fontSize:12,fontFamily:"Arial",fill:"#333",padding:4,position:"into"},a.label);l.fontSize=parseInt(l.fontSize,10);for(var c=t.labels.map((function(e){return F({},l,t,e)})),f=t.labels.map((function(e){return e.placements.map((function(n){return F({},l,t,e,n)}))})),h=[],d={insideLabelBounds:[]},p={},m=0,g=(r=Pc(r)).length;m<g;m++)for(var y=r[m],v=Nc(y,n),b=0;b<c.length;b++){var x=c[b],w="function"==typeof x.label?x.label(v,m):"";if(w){var k="function"==typeof x.direction?x.direction(v,m):x.direction||"horizontal",M="function"==typeof x.linkData?x.linkData(v,m):void 0,_=Lc(w,x,o),S=s({context:p,direction:k,lblStngs:x,measured:_,node:y,placementSettings:f[b],rect:i,store:d}),q=S.bounds,D=S.placement;if(q&&D){if("outside"===D.position&&"rotate"!==k){Tc({context:p,node:y,bounds:q});var C=Dc(q);if(!ss(C,i))continue}var E="function"==typeof D.fill?D.fill(v,m):D.fill,A=u(q,w,{fill:E,fontSize:x.fontSize,fontFamily:x.fontFamily,textMetrics:_});A&&(void 0!==M&&(A.data=M),h.push(A),q.line&&(q.line.stroke=E,h.push(q.line)))}}}return h},rows:function(e){var t=e.settings,n=e.chart,r=e.nodes,i=e.renderer,o=e.style,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:kf,s=F({fontSize:12,fontFamily:"Arial",fill:"#333",padding:4,align:.5,justify:.5},o.label);s.fontSize=parseInt(s.fontSize,10);for(var u=F({},s,t),l=t.labels.map((function(e){return F({},u,e)})),c={},f=[],h=0,d=r.length;h<d;h++){var p=r[h],m=wf(p,n),g=_f(p),y=g.type,v=g.bounds;if(v){var b=0,x=[],w=[],k="circle"===y?2*v.r*xf:v.height;b+=u.padding;var M=void 0;for(M=0;M<l.length;M++){var _=l[M],S="function"==typeof _.label?_.label(m,h):"";c.fontFamily=_.fontFamily,c.fontSize="".concat(_.fontSize,"px"),c.text=S;var q=i.measureText(c);if((b+=q.height+_.padding)>k)break;w.push(S),x.push(q)}var D=M,C=Math.max(0,k-b),E=void 0;for(E="circle"===y?v.cy-v.r*xf:v.y,E+=u.justify*C+u.padding,M=0;M<D;M++){var A=l[M],T=void 0;if("circle"===y){var N=Math.max(Math.abs(E-v.cy),Math.abs(E+x[M].height-v.cy)),R=Math.sqrt(v.r*v.r-N*N);T={x:v.cx-R+u.padding,y:E,width:2*R-2*u.padding,height:x[M].height}}else T={x:v.x+u.padding,y:E,width:v.width-2*u.padding,height:x[M].height};E+=x[M].height+u.padding;var O="function"==typeof A.fill?A.fill(m,h):A.fill,I="function"==typeof A.linkData?A.linkData(m,h):void 0,P=a(T,w[M],{fill:O,align:A.align,fontSize:A.fontSize,fontFamily:A.fontFamily,textMetrics:x[M]});if(P){if(P.text&&P.text!==Kc){var L=lf(P,i.measureText);if(Kc===L)continue;P.ellipsed=L}void 0!==I&&(P.data=I),f.push(P)}}}}return f}};var qf={require:["chart","renderer","settings"],defaultSettings:{settings:{},style:{label:"$label"}},render:function(){var e=this,t=this.settings.settings,n=[];return(t.sources||[]).forEach((function(t){t.strategy&&Sf[t.strategy.type]&&t.component&&n.push.apply(n,oe(function(e,t){var n=e.chart,r=e.source,i=e.rect,o=e.renderer,a=e.style;if(!n.component(r.component))return[];var s=n.findShapes(r.selector).filter((function(e){return e.key===r.component}));return t({chart:n,settings:r.strategy.settings,nodes:s,rect:{x:0,y:0,width:i.width,height:i.height},renderer:o,style:a})}({chart:e.chart,rect:e.rect,renderer:e.renderer,source:t,style:e.style},Sf[t.strategy.type])))})),n}};var Df={layout:{size:1,direction:"ltr",scrollOffset:0},item:{show:!0,justify:.5,align:.5,label:{fontSize:"12px",fontFamily:"Arial",fill:"#595959",wordBreak:"none",maxLines:2,maxWidth:136,lineHeight:1.2},shape:{type:"square",size:12}},title:{show:!0,text:void 0,anchor:"start",fontSize:"16px",fontFamily:"Arial",fill:"#595959",wordBreak:"none",maxLines:2,maxWidth:156,lineHeight:1.25},navigation:{button:{class:void 0,content:void 0,tabIndex:void 0},disabled:!1}};function Cf(e){var t=e.x,n=void 0===t?0:t,r=e.y,i=e.item,o=e.globalMetrics,a=e.createSymbol,s=e.direction,u=void 0===s?"ltr":s,l=i.label.displayObject,c=i.label.bounds,f=i.symbol.meta,h="rtl"===u,d={x:h?n+o.maxLabelBounds.width:n+o.maxSymbolSize+o.spacing,y:r,width:o.maxLabelBounds.width,height:Math.max(o.maxSymbolSize,o.maxLabelBounds.height)},p=function(e,t,n){var r=Math.max(0,e.width-t),i=Math.max(0,e.height-t);return{x:e.x+t/2+n.align*r,y:e.y+t/2+n.justify*i}}({x:h?n+o.maxLabelBounds.width+o.spacing:n,y:r,width:o.maxSymbolSize,height:d.height},f.size,{align:void 0===f.align?.5:f.align,justify:void 0===f.justify?.5:f.justify}),m=a(F({},f,p));return delete m.collider,l.anchor=h?"end":"start",function(e,t,n){var r=n.textMetrics;if(e.height<r.height)return!1;var i=Math.max(0,e.width-r.width);t.baseline="text-before-edge";var o=Math.max(0,e.height-r.height);t.x=e.x+n.align*i,t.y=e.y+n.justify*o+.175*parseInt(t.fontSize,10)}(d,l,{textMetrics:c,fontSize:parseInt(l.fontSize,10),align:0,justify:.5}),{item:{type:"container",data:i.label.displayObject.data,children:[m,l],collider:{type:"rect",x:n,y:r,width:o.maxItemBounds.width,height:o.maxItemBounds.height}},metrics:d}}function Ef(e,t){var n=e.items.length,r=Math.ceil(n/t),i="horizontal"===e.layout.orientation?"width":"height",o="width"===i?"horizontal":"vertical";return e.globalMetrics.maxItemBounds[i]*r+(r-1)*e.layout.margin[o]}function Af(e,t){var n,r,i,o,a=t.onScroll,s=void 0===a?function(){}:a,u=null,l=0,c={itemize:function(t){n=function(e,t){for(var n,r,i=e.resolved,o=e.dock,a=[],s=i.items.items,u=i.symbols.items,l=i.labels.items,c=0,f=0,h=0,d=0;d<s.length;d++)if(!1!==s[d].show){var p=void 0!==l[d].text?l[d].text:l[d].data.label||"";n=F({},l[d],{type:"text",fontSize:"".concat(parseInt(l[d].fontSize,10),"px"),text:p,title:p}),r={symbol:{meta:u[d]},label:{displayObject:n,bounds:t.textBounds(n)}},a.push(r),c=Math.max(u[d].size,c),f=Math.max(r.label.bounds.width,f),h=Math.max(r.label.bounds.height,h)}return{items:a,globalMetrics:{spacing:8,maxSymbolSize:c,maxItemBounds:{height:Math.max(c,h),width:c+8+f},maxLabelBounds:{width:f,height:h}},layout:{margin:{vertical:void 0!==i.layout.item.vertical?i.layout.item.vertical:4,horizontal:void 0!==i.layout.item.horizontal?i.layout.item.horizontal:4},mode:i.layout.item.mode,size:i.layout.item.size,orientation:"top"===o||"bottom"===o?"horizontal":"vertical",direction:i.layout.item.direction,scrollOffset:i.layout.item.scrollOffset}}}(t,e.renderer),u=isNaN(n.layout.scrollOffset)?u:n.layout.scrollOffset},getItemsToRender:function(t){i=t.viewRect,l=c.getContentOverflow(i);var a=c.extent();u=Math.max(0,Math.min(u,l)),o=F({},i);var s="horizontal"===c.orientation()?"x":"y";return o[s]-=u,o["x"===s?"width":"height"]=a,function(e,t,n){for(var r=e.viewRect,i=n.itemized,o=n.create,a=void 0===o?Cf:o,s=n.parallels,u=n.createSymbol,l=i.layout.direction,c=i.globalMetrics,f=i.items,h="horizontal"===i.layout.orientation,d=0,p=[],m=c.maxItemBounds.height,g=c.maxItemBounds.width,y=i.layout.margin.vertical+m,v=i.layout.margin.horizontal+g,b=t.x,x=t.y,w=r.x-t.x,k=0;k<f.length;k++){var M=a({y:x,x:"rtl"===l?r.x+w+r.width-g-(b-t.x):b,item:f[k],globalMetrics:c,direction:l,createSymbol:u});if((h&&b>=r.x-g||!h&&x>=r.y-m)&&p.push(M.item),++d>=s?(d=0,h?(b+=v,x=t.y):(x+=y,b=t.x)):h?x+=y:b+=v,!h&&x>r.y+r.height)break;if(h&&b>r.x+r.width)break}return p}(t,o,{itemized:n,parallels:r,createSymbol:e.symbol})},parallelize:function(e,t){return r=function(e,t,n){var r=n.items.length,i="horizontal"===n.layout.orientation?"width":"height",o="width"===i?"horizontal":"vertical",a=n.globalMetrics.maxItemBounds[i]*r+(r-1)*n.layout.margin[o],s=Math.ceil(a/e);if(null!=t){var u="horizontal"===n.layout.orientation?"height":"width",l="width"===u?"horizontal":"vertical",c=n.layout.margin[l]||4,f=Math.floor((t+c)/(c+n.globalMetrics.maxItemBounds[u]));s=Math.min(s,f)}var h=isNaN(n.layout.size)?1:n.layout.size;return Math.max(1,Math.min(s,h))}(e,t,n)},hasContentOverflow:function(){var e="horizontal"===n.layout.orientation?"width":"height";return Ef(n,r)>i[e]},getContentOverflow:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i,t="horizontal"===n.layout.orientation?"width":"height";return Math.max(0,Ef(n,r)-e[t])},getNextSize:function(){var e="horizontal"===n.layout.orientation?"width":"height",t="width"===e?"horizontal":"vertical";return n.globalMetrics.maxItemBounds[e]+n.layout.margin[t]},getPrevSize:function(){var e="horizontal"===n.layout.orientation?"width":"height",t="width"===e?"horizontal":"vertical";return n.globalMetrics.maxItemBounds[e]+n.layout.margin[t]},hasNext:function(){return"horizontal"===c.orientation()?i.x+i.width<o.x+o.width:i.y+i.height<o.y+o.height},hasPrev:function(){return"horizontal"===c.orientation()?o.x<i.x:o.y<i.y},next:function(){c.scroll(-c.getNextSize())},prev:function(){c.scroll(c.getPrevSize())},scroll:function(e){var t=Math.max(0,Math.min(l,u-e));t!==u&&(u=t,s())},offset:function(){return u},orientation:function(){return n.layout.orientation},direction:function(){return n.layout.direction},extent:function(){return Ef(n,r)},spread:function(){return function(e,t){var n=t,r="horizontal"===e.layout.orientation?"height":"width",i="width"===r?"horizontal":"vertical";return e.globalMetrics.maxItemBounds[r]*n+(n-1)*e.layout.margin[i]}(n,r)}};return c}function Tf(e){return Object.keys(e).filter((function(t){return e[t]})).join(" ")}var Nf={up:"▲",right:"▶",down:"▼",left:"◀"};function Rf(e,t){var n=t.size,r=t.isActive,i=t.direction,o=t.nav,a={},s="",u=t.attrs;o&&o.button&&("function"==typeof o.button.class?a=o.button.class({direction:i}):o.button.class&&(a=o.button.class),"function"==typeof o.button.content&&(s=o.button.content(e,{direction:i})),void 0!==o.button.tabIndex&&(u.tabindex=o.button.tabIndex));var l={width:"".concat(n,"px"),minWidth:"".concat(n,"px"),height:"".concat(n,"px")};return Object.keys(a).length||(l.border="0",l.background="none"),(!r||o&&o.disabled)&&(u.disabled="disabled"),e("button",F({class:Tf(a),style:l},u),[s||e("span",{style:{pointerEvents:"none"}},[Nf[i]])])}function Of(e){var t,n={itemize:function(e){var n,r;r=(n=e).dock,t={layout:{orientation:"top"===r||"bottom"===r?"vertical":"horizontal"},navigation:n.navigation}},render:function(r){return function(e,t,n,r){var i=t.rect,o=t.itemRenderer;if(e&&e.renderArgs){e.size(i);var a=e.renderArgs[0],s="vertical"===n.layout.orientation,u="rtl"===o.direction(),l=o.hasNext(),c=o.hasPrev();if(c||l){var f=s?["right","left"]:["down","up"];u&&s&&f.reverse();var h=[a("div",{style:{position:"relative",display:"flex","flex-direction":s?"column":"row","justify-content":"center",height:"100%",pointerEvents:"auto"},dir:u&&!s?"rtl":"ltr"},[Rf(a,{size:32,isActive:l,direction:f[0],attrs:{"data-action":"next","data-component-key":r.settings.key},nav:n.navigation}),Rf(a,{size:32,isActive:c,direction:f[1],attrs:{"data-action":"prev","data-component-key":r.settings.key},nav:n.navigation})])];e.render(h)}else e.render([])}}(n.renderer,r,t,e)},extent:function(){return 32},spread:function(){return 64}};return n}function If(e){var t,n={itemize:function(n){t=function(e,t){var n=e.resolved;if(!1===n.title.item.show)return null;var r=F({},n.title.item,{type:"text"});if("rtl"===n.layout.item.direction&&(r.anchor&&"start"!==r.anchor?"end"===r.anchor&&(r.anchor="start"):r.anchor="end"),void 0===n.title.settings.text){var i=t.scale.data().fields;r.text=i&&i[0]?i[0].title():""}return{displayObject:r,bounds:t.renderer.textBounds(r)}}(n,e)},render:function(e){!function(e,t,n){var r=e.rect;if(t){var i=[];if(t.size(r),n){var o={start:0,end:r.width,middle:r.width/2};i.push(F({},n.displayObject,{x:o[n.displayObject.anchor]||0,y:0,baseline:"text-before-edge",title:n.displayObject.text}))}t.render(i)}}(e,n.renderer,t)},spread:function(){return t?t.bounds.height:0},extent:function(){return t?t.bounds.width:0}};return n}function Pf(e,t,n,r){var i,o,a,s=r.itemRenderer,u=r.navigationRenderer,l=r.titleRenderer,c=r.isPreliminary,f=void 0!==c&&c,h=0,d={x:t.spacing,y:t.spacing,width:e.width-2*t.spacing,height:e.height-2*t.spacing};if(i={x:d.x,y:d.y,width:d.width,height:l.spread()},"horizontal"===n){i={x:d.x,y:d.y,width:l.extent(),height:l.spread()};var p=d.width-i.width-(i.width?t.spacing:0),m=d.height;s.parallelize(p,f?void 0:m);var g=s.extent()>p?u.extent():0,y=s.spread(),v=g?u.spread():0;a={x:(o={x:i.x+i.width+(i.width?t.spacing:0),y:d.y+Math.max(0,(v-y)/2),width:d.width-g-i.width-(g?t.spacing:0)-(i.width?t.spacing:0),height:m}).x+o.width+(g?t.spacing:0),y:d.y,width:g,height:d.height},i.y=o.y,"rtl"===s.direction()&&(a.x=d.x,o.x=a.x+a.width+(a.width?t.spacing:0),i.x=o.x+o.width+(i.width?t.spacing:0)),h=Math.max(i.height,v,s.spread())}else{var b=d.height-i.height-(i.height?t.spacing:0),x=d.width;s.parallelize(b,f?void 0:x);var w=s.extent()>b?u.extent():0;a={x:d.x,y:d.y+d.height-w,width:d.width,height:w},o={x:d.x,y:i.y+i.height+(i.height?t.spacing:0),width:d.width,height:d.height-i.height-(i.height?t.spacing:0)-a.height-(a.height?t.spacing:0)},h=Math.max(l.extent(),w?u.spread():0,s.spread())}return o=F({},e,{x:e.x+o.x,y:e.y+o.y,width:o.width,height:o.height}),a.x+=e.x,a.y+=e.y,i.x+=e.x,i.y+=e.y,{title:F({},e,i),content:F({},e,o),navigation:F({},e,a),orientation:n,preferredSize:h}}function Lf(e){e.state.resolved=function(e){var t=e.scale.domain(),n={items:[]},r=e.settings.layout.dock;if("threshold-color"===e.scale.type){var i=e.scale.data().fields[0],o=function(e){return String(e)};e.settings.formatter?o=e.chart.formatter(e.settings.formatter):i&&(o=i.formatter());for(var a=0;a<t.length-1;a++){var s={value:t[a],label:"".concat(o(t[a])," - < ").concat(o(t[a+1]))};i&&(s.source={field:i.id()}),n.items.push(s)}"vertical"==("top"===r||"bottom"===r?"horizontal":"vertical")&&n.items.reverse()}else{var u=e.scale.labels?e.scale.labels():null;n.items=t.map((function(t,n){var r=e.scale.datum?F({},e.scale.datum(t)):{value:t};return r.value=t,e.scale.label?r.label=e.scale.label(t):u&&(r.label=u[n]),r}))}var l=e.resolver.resolve({data:{fields:e.scale.data().fields},defaults:F(!0,{},Df.title,e.style.title),settings:e.settings.settings.title}),c=e.resolver.resolve({data:{fields:e.scale.data().fields},defaults:Df.layout,settings:e.settings.settings.layout}),f=e.resolver.resolve({data:n,defaults:F(!0,{},Df.item.label,e.style.item.label),settings:(e.settings.settings.item||{}).label}),h=F(!0,{},(e.settings.settings.item||{}).shape);void 0===h.fill&&e.settings.scale&&(h.fill={scale:e.settings.scale});var d=e.resolver.resolve({data:n,defaults:F(!0,{},Df.item.shape,e.style.item.shape),settings:h}),p=e.resolver.resolve({data:n,defaults:F(!0,{},{show:Df.item.show}),settings:{show:(e.settings.settings.item||{}).show}});function m(e,n){var r=e.data.value,i=t[n+1];e.data.value=[r,i]}return"threshold-color"===e.scale.type&&("vertical"==("top"===r||"bottom"===r?"horizontal":"vertical")?(p.items.reverse().forEach(m),p.items.reverse()):p.items.forEach(m)),{title:l,labels:f,symbols:d,items:p,layout:c}}(e),e.titleRenderer.itemize({resolved:e.state.resolved,dock:e.settings.layout.dock||"center"}),e.itemRenderer.itemize({resolved:e.state.resolved,dock:e.settings.layout.dock||"center"}),e.navigationRenderer.itemize({resolved:e.state.resolved,dock:e.settings.layout.dock||"center",navigation:e.settings.settings.navigation}),e.state.display={spacing:8}}function jf(e){var t=e.rect,n=e.settings,r=e.state,i=e.itemRenderer,o=e.navigationRenderer,a=e.titleRenderer,s=n.layout.dock,u="top"===s||"bottom"===s?"horizontal":"vertical",l=Pf(t,r.display,u,{itemRenderer:i,navigationRenderer:o,titleRenderer:a});e.renderer.size(l.content);var c=i.getItemsToRender({viewRect:F({},l.content,{x:0,y:0})});return o.render({rect:l.navigation,itemRenderer:i}),a.render({rect:l.title}),e.state.views={layout:l},c}var zf={require:["chart","settings","renderer","update","resolver","registries","symbol"],defaultSettings:{settings:{},style:{item:{label:"$label",shape:"$shape"},title:"$title"}},mounted:function(e){e&&e.parentNode&&(this.navigationRenderer.renderer.appendTo(e.parentNode),this.titleRenderer.renderer.appendTo(e.parentNode),e.parentNode.insertBefore(this.navigationRenderer.renderer.element(),e),e.parentNode.insertBefore(this.titleRenderer.renderer.element(),e)),this.navigationRenderer.render({rect:this.state.views.layout.navigation,itemRenderer:this.itemRenderer}),this.titleRenderer.render({rect:this.state.views.layout.title})},beforeUnmount:function(){this.navigationRenderer.renderer.clear(),this.titleRenderer.renderer.clear()},on:{panstart:function(){this.state.interaction.started||this.itemRenderer.getContentOverflow()&&(this.state.interaction.started=!0,this.state.interaction.delta=0)},panmove:function(e){if(this.state.interaction.started){var t="horizontal"===this.itemRenderer.orientation()?("rtl"===this.itemRenderer.direction()?-1:1)*e.deltaX:e.deltaY;this.itemRenderer.scroll(t-this.state.interaction.delta),this.state.interaction.delta=t}},panend:function(){this.state.interaction.started=!1},scroll:function(e){this.itemRenderer.scroll(-e)},next:function(){this.itemRenderer.next()},prev:function(){this.itemRenderer.prev()}},created:function(){var e=this;this.state={interaction:{}},this.onScroll=function(){var t=jf(e);e.update(t)},this.itemRenderer=Af(this,{onScroll:this.onScroll}),this.navigationRenderer=Of(this),this.titleRenderer=If(this),this.navigationRenderer.renderer=this.registries.renderer("dom")(),this.titleRenderer.renderer=this.registries.renderer(this.settings.renderer)(),Lf(this)},preferredSize:function(e){return function(e,t){var n=0,r=e.settings.layout.dock||"center",i="top"===r||"bottom"===r?"horizontal":"vertical",o=e.state.display,a=Pf(t.inner,o,i,{itemRenderer:e.itemRenderer,navigationRenderer:e.navigationRenderer,titleRenderer:e.titleRenderer,isPreliminary:!0});return n+=o.spacing,n+=a.preferredSize,n+o.spacing}(this,e)},beforeUpdate:function(){Lf(this)},render:function(){return jf(this)},beforeDestroy:function(){this.navigationRenderer.renderer.destroy(),this.titleRenderer.renderer.destroy()},additionalElements:function(){return[this.titleRenderer.renderer.element(),this.navigationRenderer.renderer.element()]},_DO_NOT_USE_getInfo:function(){return{offset:this.itemRenderer.offset()}}};function Ff(e,t){var n=0,r=e.state.isVertical?"justify":"align",i=e.state.isVertical?"y":"x",o=e.state.isVertical?"height":"width",a=e.state.isVertical?"requiredHeight":"requiredWidth";n=e.state.rect[o]-e.state.legend.length()-e.state.title[a](),n*=Math.min(1,Math.max(e.stgns[r],0)),t[i]+=n}function Hf(e,t,n){var r=n[e];return"object"===W(r)?-1!==r.valid.indexOf(t)?t:r.default:n.default}function Bf(e){return Hf(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 Vf(e,t){var n={x:0,y:0,width:0,height:0},r=e.stgns.padding;return n.x=r.left,n.y=r.top,n.width=t.width-r.left-r.right,n.height=t.height-r.top-r.bottom,n}function Wf(e){var t,n="top"!==e.settings.layout.dock&&"bottom"!==e.settings.layout.dock,r=e.stgns.title,i=e.chart.scale(e.stgns.fill),o=e.chart.scale(e.stgns.major),a=function(e,t){var n=t.domain(),r=n,i=e.stgns.tick.label;return!i&&e.formatter?i=e.formatter:!i&&t.data().fields&&(i=t.data().fields[0].formatter()),"function"==typeof i&&(r=n.map(i).map(String)),n.map((function(n,i){var o=r[i];return{value:n,label:o,pos:t.norm(parseFloat(n,10)),textMetrics:e.renderer.measureText({text:o,fontSize:e.stgns.tick.fontSize,fontFamily:e.stgns.tick.fontFamily})}}))}(e,o),s=Hf((t=e.settings).layout.dock,t.settings.tick.anchor,{left:{valid:["left","right"],default:"left"},right:{valid:["left","right"],default:"right"},top:{valid:["top","bottom"],default:"top"},bottom:{valid:["top","bottom"],default:"bottom"},default:"right"});if(void 0===r.text){var u=o.data().fields;r.text=u&&u[0]?u[0].title():""}var l=e.renderer.measureText({text:r.text,fontSize:r.fontSize,fontFamily:r.fontFamily}),c=e.renderer.textBounds({text:r.text,fontSize:r.fontSize,fontFamily:r.fontFamily,maxLines:r.maxLines,maxWidth:r.maxLengthPx,wordBreak:r.wordBreak,hyphens:r.hyphens,lineHeight:r.lineHeight}),f={isVertical:n,nodes:[],title:{anchor:Bf(e.settings),textMetrics:l,textBounds:c,requiredWidth:function(){if(!r.show)return 0;var e=c.width,t=r.maxLengthPx;return n||(e+=r.padding,t+=r.padding),Math.min(e,t,f.rect.width)},requiredHeight:function(){if(!r.show)return 0;var e=c.height;return n&&(e+=r.padding),Math.min(e,f.rect.height)}},ticks:{values:a,anchor:s,length:Math.min(Math.max.apply(Math,oe(a.map((function(e){return e.textMetrics.width})))),e.stgns.tick.maxLengthPx),requiredHeight:function(){return"top"===s?Math.max.apply(Math,oe(f.ticks.values.map((function(e){return e.textMetrics.height}))))+e.stgns.tick.padding:0},height:Math.max.apply(Math,oe(a.map((function(e){return e.textMetrics.height}))))},legend:{fillScale:i,majorScale:o,length:function(){var t=n?"height":"width",r=n?"requiredHeight":"requiredWidth",i=Math.min(f.rect[t],f.rect[t]*e.stgns.length)-f.title[r]();return Math.max(0,Math.min(i,e.stgns.maxLengthPx))}}};return f}var Uf={require:["chart","settings","renderer"],defaultSettings:{layout:{displayOrder:0,dock:"right"},settings:{size:15,length:.5,maxLengthPx:250,align:.5,justify:0,padding:{left:5,right:5,top:5,bottom:5},tick:{label:null,fill:"#595959",fontSize:"12px",fontFamily:"Arial",maxLengthPx:100,anchor:null,padding:5},title:{show:!0,text:void 0,fill:"#595959",fontSize:"12px",fontFamily:"Arial",maxLengthPx:100,padding:5,maxLines:2,wordBreak:"none",lineHeight:1.2,hyphens:"auto",anchor:null}}},preferredSize:function(e){var t=this.state;t.rect=Vf(this,e.inner);var n=this.stgns.size,r=t.isVertical?this.stgns.padding.left+this.stgns.padding.right:this.stgns.padding.top+this.stgns.padding.bottom;n+=r;var i=Math.max(e.inner.width,e.inner.height);if("left"===t.ticks.anchor||"right"===t.ticks.anchor){if(t.ticks.values.reduce((function(e,t){return e+t.textMetrics.height}),0)>this.state.legend.length())return i;n+=t.ticks.length}else{if(t.ticks.length>this.state.legend.length())return i;n+=Math.max.apply(Math,oe(t.ticks.values.map((function(e){return e.textMetrics.height}))))}return n+=this.stgns.tick.padding,this.stgns.title.show&&(n="left"===t.title.anchor||"right"===t.title.anchor?Math.max(t.title.textBounds.height+r,n):Math.max(n,t.title.requiredWidth()+r)),this.state.preferredSize=n,n},created:function(){this.stgns=this.settings.settings,this.state=Wf(this)},beforeUpdate:function(e){this.stgns=e.settings.settings,this.state=Wf(this)},beforeRender:function(e){if(this.state.nodes=[],this.state.rect=Vf(this,e.size),this.stgns.title.show){var t=function(e){var t=e.state,n=e.stgns,r="left"===t.ticks.anchor,i="top"===t.ticks.anchor,o=t.rect.x,a=t.rect.y,s="start";"left"===t.title.anchor?(o+=t.title.requiredWidth()-n.title.padding,a+=t.title.textMetrics.height,a+=i?t.rect.height-t.title.textBounds.height:0,s="end"):"right"===t.title.anchor?(o+=t.legend.length(),o+=n.title.padding,a+=t.title.textMetrics.height,a+=i?t.rect.height-t.title.textBounds.height:0):"top"===t.title.anchor&&(o+=r?t.rect.width:0,a+=t.title.textMetrics.height,s=r?"end":"start");var u={tag:"legend-title",type:"text",x:o,y:Math.min(a,t.rect.y+t.rect.height),text:n.title.text,fill:n.title.fill,fontSize:n.title.fontSize,fontFamily:n.title.fontFamily,maxWidth:n.title.maxLengthPx,maxLines:n.title.maxLines,wordBreak:n.title.wordBreak,hyphens:n.title.hyphens,lineHeight:n.title.lineHeight,anchor:s,title:n.title.text};return Ff(e,u),u}(this);this.state.nodes.push(t)}var n,r,i,o=function(e,t){var n=e.state,r=e.stgns,i=n.rect,o=i.x,a=i.y,s=n.isVertical?r.size:n.legend.length(),u=n.isVertical?n.legend.length():r.size;"left"===n.ticks.anchor?o+=n.rect.width-r.size:"top"===n.ticks.anchor&&(a+=n.rect.height-r.size),"top"===n.title.anchor?a+=n.title.requiredHeight():"left"===n.title.anchor&&(o+=n.title.requiredWidth());var l={type:"rect",x:o,y:a,width:s,height:u,fill:{type:"gradient",stops:t,degree:n.isVertical?90:180}};return Ff(e,l),l}(this,(r=(n=this).state.legend.fillScale,i=n.state.legend.majorScale,r.domain().map((function(e){return{type:"stop",color:r(e),offset:Math.min(1,Math.max(0,i.norm(e)))}})).sort((function(e,t){return e.offset-t.offset})))),a={id:"legend-seq-target",type:"container",children:[o,function(e,t){var n=e.state,r=e.stgns,i="start",o={type:"rect",x:t.x,y:t.y,width:n.isVertical?0:t.width,height:n.isVertical?t.height:0,fill:"transparent"},a=n.ticks.values.map((function(a){var s=0,u=0,l=0,c="alphabetical";return n.isVertical?(u=t.y+t.height*a.pos,c=0===a.pos?"text-before-edge":"text-after-edge"):s=t.x+t.width*a.pos,"right"===n.ticks.anchor?(s=t.x+r.size+r.tick.padding,o.x=t.x+t.width):"left"===n.ticks.anchor?(s=t.x-r.tick.padding,i="end"):"top"===n.ticks.anchor?(u=t.y-r.tick.padding,l-=.25*a.textMetrics.height,i=0===a.pos?"start":"end"):"bottom"===n.ticks.anchor&&(u=t.y+t.height+r.tick.padding,l=.8*a.textMetrics.height,i=0===a.pos?"start":"end",o.y=t.y+t.height),{type:"text",x:s,y:u,dx:0,dy:l,text:a.label,fontSize:r.tick.fontSize,fontFamily:r.tick.fontFamily,fill:r.tick.fill,maxWidth:n.isVertical?r.tick.maxLengthPx:Math.min(r.tick.maxLengthPx,n.legend.length()/2),anchor:i,textBoundsFn:e.renderer.textBounds,title:a.label,baseline:c}}));return{type:"container",id:"legend-seq-ticks",children:[].concat(oe(a),[o])}}(this,o)]};this.state.nodes.push(a)},render:function(){return this.state.nodes}};var $f={step:function(e){return new gt(e,.5)},stepAfter:function(e){return new gt(e,1)},stepBefore:function(e){return new gt(e,0)},linear:Ye,basis:function(e){return new tt(e)},cardinal:it.tension(0),catmullRom:at,monotonex:function(e){return new ft(e)},monotoney:function(e){return new ht(e)},natural:function(e){return new pt(e)}},Yf={coordinates:{minor:.5,major:.5,layerId:0,defined:!0},connect:!1,orientation:"horizontal",layers:{curve:"linear",show:!0,sort:void 0,line:{stroke:"#ccc",strokeWidth:1,strokeLinejoin:"miter",strokeDasharray:void 0,opacity:1,show:!0,showMinor0:!0},area:{fill:"#ccc",opacity:.8,show:!0}}};function Kf(e,t){var n=t.generator,r=t.item,i=t.data,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",a=n(e),s={type:"path",d:a,opacity:r.opacity,stroke:r.stroke,strokeWidth:r.strokeWidth,strokeLinejoin:r.strokeLinejoin,fill:o||r.fill,data:i};return r.strokeDasharray&&(s.strokeDasharray=r.strokeDasharray),s}function Xf(e){var t=function(e){for(var t=e.data,n=e.stngs,r=e.rect,i=e.resolver,o=e.style,a=e.domain,s=r.width,u=r.height,l=i.resolve({data:t,defaults:Yf.coordinates,settings:n.coordinates||{},scaled:{major:"vertical"===n.orientation?u:s,minor:"vertical"===n.orientation?s:u}}),c=!n.connect&&a.length>2&&("function"==typeof n.coordinates.layerId||"object"===W(n.coordinates.layerId)),f={},h=0,d=0;d<l.items.length;d++){var p=l.items[d],m=p.layerId;if(c){var g=f[m]?f[m].items[f[m].items.length-1]:null,y=g?a.indexOf(g.data.major?g.data.major.value:g.data.value):null;g&&a.indexOf(p.data.major?p.data.major.value:p.data.value)-1!==y&&f[m].items.push({dummy:!0})}f[m]=f[m]||{order:h++,id:m,items:[],dataItems:[],consumableData:{}},f[m].dataItems.push(p.data),f[m].items.push(p)}var v=Object.keys(f).map((function(e){return f[e].consumableData=V({points:f[e].dataItems},f[e].dataItems[0]),f[e]})),b={items:v.map((function(e){return e.consumableData}))},x=n.layers||{};return{coordinates:l,metaLayers:v,layers:i.resolve({data:b,defaults:{curve:Yf.layers.curve,show:Yf.layers.show},settings:{curve:x.curve,show:x.show}}),lines:i.resolve({data:b,defaults:F({},Yf.layers.line,o.line),settings:x.line}),areas:i.resolve({data:b,defaults:F({},Yf.layers.area,o.area),settings:x.area})}}(e),n=t.metaLayers,r=t.coordinates,i=t.layers,o=t.lines,a=t.areas,s=[];return n.forEach((function(t,n){var u=i.items[n];if(!1!==u.show){u.datum=u.data,u.data=[],u.id=t.id;for(var l,c,f=[],h=[],d=0;d<t.items.length;d++){if(c=(l=t.items[d]).data,!l.dummy){if(isNaN(l.major))continue;e.missingMinor0&&(l.minor0=r.settings.minor.scale?r.settings.minor.scale(c.minor0?c.minor0.value:0):0),isNaN(l.minor)||f.push(l.minor),u.data.push(l.data)}h.push(l)}var p=f.sort((function(e,t){return e-t}))[Math.floor((f.length-1)/2)];s.push({layerObj:u,lineObj:o.items[n],areaObj:a.items[n],median:p,points:h,consumableData:t.consumableData})}})),s}var Gf={require:["chart","resolver"],defaultSettings:{style:{area:"$shape",line:"$shape-outline"}},created:function(){},render:function(e){var t=e.data,n=this.rect,r=n.width,i=n.height;this.stngs=this.settings.settings||{};var o=!this.stngs.coordinates||void 0===this.stngs.coordinates.minor0,a=Xf({data:t,stngs:this.stngs,rect:this.rect,resolver:this.resolver,style:this.style,missingMinor0:o,domain:this.stngs.coordinates&&this.stngs.coordinates.major&&this.stngs.coordinates.major.scale?this.chart.scale(this.stngs.coordinates.major.scale).domain():[]});if(this.stngs.layers&&this.stngs.layers.sort){var s=a.map((function(e){return{id:e.layerObj.id,data:e.layerObj.data}})).sort(this.stngs.layers.sort).map((function(e){return e.id}));a.sort((function(e,t){return s.indexOf(e.layerObj.id)-s.indexOf(t.layerObj.id)}))}else a.sort((function(e,t){return e.median-t.median}));return function(e,t){var n=t.width,r=t.height,i=t.missingMinor0,o=t.stngs,a=[],s=o.layers||{};return e.forEach((function(e){var t,u,l=e.lineObj,c=e.layerObj,f=e.areaObj,h=e.points,d=Ge(),p=o.coordinates?o.coordinates.defined:null,m={size:r,p:"y"},g={size:n,p:"x"};if("vertical"===o.orientation){var y=F(!0,{},g);g=F(!0,{},m),m=F(!0,{},y)}d[g.p]((function(e){return e.major*g.size}))["".concat(m.p,"1")]((function(e){return e.minor*m.size}))["".concat(m.p,"0")]((function(e){return e.minor0*m.size})).curve($f["monotone"===c.curve?"monotone".concat(g.p):c.curve]),p?d.defined((function(e){return!e.dummy&&"number"==typeof e.minor&&!isNaN(e.minor)&&e.defined})):d.defined((function(e){return!e.dummy&&"number"==typeof e.minor&&!isNaN(e.minor)}));var v=o.connect?h.filter(d.defined()):h;t=d["line".concat(m.p.toUpperCase(),"1")](),u=d["line".concat(m.p.toUpperCase(),"0")](),s.area&&!1!==f.show&&a.push(Kf(v,{data:e.consumableData,item:f,generator:d})),l&&!1!==l.show&&(a.push(Kf(v,{data:e.consumableData,item:l,generator:t},"none")),!i&&s.area&&!1!==f.show&&!1!==l.showMinor0&&a.push(Kf(v,{data:e.consumableData,item:l,generator:u},"none")))})),a}(a,{width:r,height:i,missingMinor0:o,stngs:this.stngs})}};function Jf(e,t){var n,r,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];"object"===W(t.center)?(n=t.center.x,r=t.center.y):(n=t.clientX,r=t.clientY);var o=n-e.state.boundingRect.left,a=r-e.state.boundingRect.top;return{x:i?Math.max(0,Math.min(o,e.rect.width)):o,y:i?Math.max(0,Math.min(a,e.rect.height)):a}}function Zf(e,t){return{x:t.x+e.rect.x,y:t.y+e.rect.y}}function Qf(e,t){var n=Math.min(e.x,t.x),r=Math.min(e.y,t.y);return{x:n,y:r,width:Math.max(e.x,t.x)-n,height:Math.max(e.y,t.y)-r}}var eh={require:["chart","renderer"],defaultSettings:{layout:{displayOrder:99},settings:{brush:{components:[]}},style:{area:"$selection-area-target"}},on:{areaStart:function(e){this.start(e)},areaMove:function(e){this.move(e)},areaEnd:function(e){this.end(e)},areaCancel:function(){this.cancel()}},created:function(){this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1}},preferredSize:function(){return 0},render:function(){},start:function(e){this.state.boundingRect=this.renderer.element().getBoundingClientRect();var t=Jf(this,e,!1);Ms({x:0,y:0,width:this.rect.width,height:this.rect.height},t)&&(this.state.brushConfig=this.settings.settings.brush.components.map((function(e){return{key:e.key,contexts:e.contexts,data:e.data,action:e.action||"set"}})),this.state.start=Jf(this,e),this.state.active=!0)},move:function(e){var t;this.state.active&&(this.state.end=Jf(this,e),function(e){if(e.state.active){var t=Zf(e,e.state.start),n=Zf(e,e.state.end),r=e.chart.shapesAt(Qf(t,n),{components:e.state.brushConfig});e.chart.brushFromShapes(r,{components:e.state.brushConfig})}}(this),(t=this).renderer.render([F({type:"rect"},Qf(t.state.start,t.state.end),t.style.area)]))},end:function(){this.state.active&&(this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1},this.renderer.render([]))},cancel:function(){var e,t;this.state.active&&(e=this.state,t=this.chart,e.brushConfig.forEach((function(e){Array.isArray(e.contexts)&&e.contexts.forEach((function(e){t.brush(e).end()}))})),this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1},this.renderer.render([]))}};function th(e,t,n){var r=n.renderer,i=n.style,o=n.props,a=n.h,s=function(e,t){return{tooltip:"function"==typeof e.tooltipClass?e.tooltipClass({dock:t.dock}):e.tooltipClass,content:"function"==typeof e.contentClass?e.contentClass({dock:t.dock}):e.contentClass,arrow:"function"==typeof e.arrowClass?e.arrowClass({dock:t.dock}):e.arrowClass}}(o,t),u=function(e,t,n,r){return r.content({h:e,style:n,data:t})}(a,e,i,o),l=a("div",{dir:o.direction,class:Tf(F({"pic-tooltip":!0},s.tooltip)),style:F({position:"relative",display:"inline-block"},t.computedTooltipStyle)},a("div",{style:i.content,class:Tf(F({"pic-tooltip-content":!0},s.content))},u),a("div",{class:Tf(F({"pic-tooltip-arrow":!0},s.arrow)),style:F({},i.arrow,i["arrow-".concat(t.dock)],t.computedArrowStyle)}));return r.render(l),r.element().children[0]}function nh(e){var t=e.defaultDuration,n=e.defaultDelay,r=null,i=null,o=!1,a=function(){var e=function(){},t={pending:[],debounced:[],active:[],cancelled:[],rejected:[],fulfilled:[]};return e.set=function(e){t[e].forEach((function(t){return t(e)}))},e.on=function(e,n){Array.isArray(e)?e.forEach((function(e){return t[e].push(n)})):t[e].push(n)},e.destroy=function(){Object.keys(t).forEach((function(e){t[e].length=0}))},e}(),s=function(){},u=function(){r=null,i=null,o=!1,a.set("fulfilled")};return s.invoke=function(e){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n;r&&(clearTimeout(r),a.set("debounced")),a.set("pending"),r=setTimeout((function(){e(),o=!0,r=null,a.set("active")}),l),s>0&&(i&&clearTimeout(i),i=setTimeout(u,s+Math.max(l,0)))},s.clear=function(){o?a.set("cancelled"):r&&(clearTimeout(r),a.set("rejected")),i&&clearTimeout(i),r=null,i=null,o=!1},s.on=function(e,t){a.on(e,t)},s.destroy=function(){s.clear(),a.destroy()},s}function rh(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return{left:"translate(-100%,-50%) translateX(".concat(-e,"px)"),right:"translate(".concat(e,"px, -50%)"),top:"translate(-50%, -100%) translateY(".concat(-e,"px)"),bottom:"translate(-50%, ".concat(e,"px)")}}function ih(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return{left:{x:-e-n,y:-t/2},right:{x:n,y:-t/2},top:{x:-e/2,y:-t-n},bottom:{x:-e/2,y:n}}}function oh(e){return{left:{left:"100%",top:"calc(50% - ".concat(e,"px)"),borderWidth:"".concat(e,"px")},right:{left:"".concat(2*-e,"px"),top:"calc(50% - ".concat(e,"px)"),borderWidth:"".concat(e,"px")},top:{left:"calc(50% - ".concat(e,"px)"),top:"100%",borderWidth:"".concat(e,"px")},bottom:{left:"calc(50% - ".concat(e,"px)"),top:"".concat(2*-e,"px"),borderWidth:"".concat(e,"px")}}}function ah(e,t,n,r,i,o){var a=t+o.x,s=n+o.y,u=i;return!(a<0||s<0)&&!(a+r>e.width||s+u>e.height)}function sh(e){var t=e.area,n=e.vx,r=e.vy,i=e.width,o=e.height,a=e.offset,s=n+a.x,u=r+a.y,l=i,c=o,f=s<0?-s:0,h=u<0?-u:0;return{x:f+=s+l>t.width?-(s+l-t.width):0,y:h+=u+c>t.height?-(u+c-t.height):0}}function uh(e){var t=e.options,n=e.pointer,r=e.width,i=e.height,o=e.dockOrder,a=e.x,s=e.y,u=n.targetBounds,l=rh(t.offset),c=l[t.dock];if(c)return{computedTooltipStyle:{left:"".concat(a,"px"),top:"".concat(s,"px"),transform:c},computedArrowStyle:oh(t.offset)[t.dock],dock:t.dock};for(var f={width:"target"===t.area?u.width:window.innerWidth,height:"target"===t.area?u.height:window.innerHeight},h=ih(r,i,t.offset),d=[],p="target"===t.area?a:u.left+a,m="target"===t.area?s:u.top+s,g=0;g<o.length;g+=1){var y=o[g],v=sh({area:f,vx:p,vy:m,width:r,height:i,offset:h[y]}),b={left:"".concat(a,"px"),top:"".concat(s,"px"),transform:l[y]},x=oh(t.offset)[y];0!==v.x&&(b.width="".concat(r-20-Math.abs(v.x),"px"),"top"!==y&&"bottom"!==y||(b.left="".concat(a+v.x,"px"),x.left="calc(50% ".concat(v.x>0?"-":"+"," ").concat(Math.abs(v.x),"px)")));var w={computedTooltipStyle:b,computedArrowStyle:x,dock:y,rect:{width:r,height:i}};if(0===v.x&&0===v.y)return w;w.offset=v,d.push(w)}return d.sort((function(e,t){return Math.abs(e.offset.x)-Math.abs(t.offset.x)})),d[0]}function lh(e,t,n){var r=e.key?n.component(e.key):n.componentsFromPoint({x:t.clientX,y:t.clientY})[0];if(!r)return{x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1}};var i=r.rect;return F({scaleRatio:i.scaleRatio},i.computedInner)}var ch,fh={bounds:function(e){var t=e.resources,n=e.nodes,r=e.pointer,i=e.width,o=e.height,a=e.options,s=r.targetBounds,u=t.getNodeBoundsRelativeToTarget(n[0]),l=u.x,c=u.y,f=u.width,h=u.height,d={left:{x:l,y:c+h/2},right:{x:l+f,y:c+h/2},top:{x:l+f/2,y:c},bottom:{x:l+f/2,y:c+h}},p=rh(a.offset),m=p[a.dock];if(m)return{computedTooltipStyle:{left:"".concat(d[a.dock].x,"px"),top:"".concat(d[a.dock].y,"px"),transform:m},computedArrowStyle:oh(a.offset)[a.dock],dock:a.dock};for(var g={width:"target"===a.area?s.width:window.innerWidth,height:"target"===a.area?s.height:window.innerHeight},y=ih(i,o,a.offset),v=["top","left","right","bottom"],b=0;b<v.length;b+=1){var x=v[b];if(ah(g,"target"===a.area?d[x].x:s.left+d[x].x,"target"===a.area?d[x].y:s.top+d[x].y,i,o,y[x]))return{computedTooltipStyle:{left:"".concat(d[x].x,"px"),top:"".concat(d[x].y,"px"),transform:p[x]},computedArrowStyle:oh(a.offset)[x],dock:x}}return{computedTooltipStyle:{left:"".concat(d.top.x,"px"),top:"".concat(d.top.y,"px"),transform:p.top},computedArrowStyle:oh(a.offset).top,dock:"top"}},pointer:function(e){var t=e.options,n=e.pointer,r=e.width,i=e.height;return uh({x:n.x,y:n.y,pointer:n,width:r,height:i,options:t,dockOrder:["top","left","right","bottom"]})},slice:function(e){var t=e.options,n=e.pointer,r=e.width,i=e.height,o=e.nodes,a=e.resources,s=o[0],u=n.dx,l=n.dy,c=a.getComponentBoundsFromNode(s),f=u+c.x+c.width/2,h=l+c.y+c.height/2,d=s.desc.slice,p=d.start,m=d.end,g=d.outerRadius,y=(p+m)/2-Math.PI/2,v=2*Math.PI,b=(y%v+v)%v,x=["top","left","right","bottom"];return"auto"===t.dock&&(x=b<=Math.PI/4||b>=7*Math.PI/4?["right","top","bottom","left"]:b<=3*Math.PI/4?["bottom","left","right","top"]:b<=5*Math.PI/4?["left","top","bottom","right"]:["top","left","right","bottom"]),uh({x:f+g*c.scaleRatio.x*Math.cos(b),y:h+g*c.scaleRatio.y*Math.sin(b),pointer:n,width:r,height:i,options:t,dockOrder:x})}};function hh(e,t){var n=e.width,r=e.height,i=t.chart,o=t.state,a=t.props,s={resources:{formatter:i.formatter,scale:i.scale,component:i.component,getComponentBoundsFromNode:function(e){return lh(e,o.pointer,i)},getNodeBoundsRelativeToTarget:function(e){return function(e,t,n){var r=lh(e,t,n),i=e.bounds;return{x:r.x+t.dx+i.x,y:r.y+t.dy+i.y,width:i.width,height:i.height}}(e,o.pointer,i)}},nodes:o.activeNodes,pointer:o.pointer,width:n,height:r},u=W(a.placement);if("object"===u&&"function"==typeof a.placement.fn)return a.placement.fn(s);var l={type:"pointer",offset:8,dock:"auto",area:"viewport"};"function"===u&&(l=F(l,a.placement(s))),"object"===u&&fh[a.placement.type]?l=F(l,a.placement):"string"===u&&fh[a.placement]&&(l=F(l,{type:a.placement})),s.options=l;var c=fh[l.type](s),f=s.resources.getComponentBoundsFromNode(s.nodes[0]),h=f.x,d=f.y,p=f.width,m=f.height;return p+=h+=s.pointer.dx,m+=d+=s.pointer.dy,c.computedTooltipStyle.left="".concat(Math.min(Math.max(0,h,parseFloat(c.computedTooltipStyle.left)),p),"px"),c.computedTooltipStyle.top="".concat(Math.min(Math.max(0,d,parseFloat(c.computedTooltipStyle.top)),m),"px"),c}function dh(){ch=null}function ph(e,t){var n=t.chart,r=t.state,i=0,o=0;e.center?(i+=e.center.x,o+=e.center.y):(i+=e.clientX,o+=e.clientY);var a=n.element.getBoundingClientRect(),s=r.targetElement.getBoundingClientRect(),u=i,l=o,c=a.left-s.left,f=a.top-s.top,h=i-a.left,d=o-a.top;return{x:i-=s.left,y:o-=s.top,dx:c,dy:f,cx:h,cy:d,clientX:u,clientY:l,targetBounds:s,chartBounds:a}}var mh={require:["chart","renderer"],defaultSettings:{settings:{duration:8e3,delay:500,filter:function(e){return e.filter((function(e){return e.data&&void 0!==e.data.value}))},extract:function(e){return e.node.data.value},content:function(e){var t=e.h;return e.data.map((function(e){return t("div",{},e)}))},isEqual:function(e,t){return e.length&&e.length===t.length&&e.every((function(e,n){return t[n]&&JSON.stringify(e.data)===JSON.stringify(t[n].data)}))},placement:{type:"pointer",dock:"auto",offset:8,area:"viewport"},tooltipClass:{},contentClass:{},arrowClass:{},direction:"ltr",appendTo:void 0,beforeShow:void 0,afterShow:void 0,beforeHide:void 0,onHide:void 0,afterHide:void 0},style:{tooltip:{},content:{backgroundColor:"$gray-25",color:"$font-color--inverted",fontFamily:"$font-family",fontSize:"$font-size",lineHeight:"$line-height",borderRadius:"4px",padding:"8px",opacity:.9},arrow:{position:"absolute",width:"0px",height:"0px",borderStyle:"solid",color:"$gray-25",opacity:.9},"arrow-bottom":{borderTopColor:"transparent",borderLeftColor:"transparent",borderRightColor:"transparent"},"arrow-top":{borderBottomColor:"transparent",borderLeftColor:"transparent",borderRightColor:"transparent"},"arrow-right":{borderTopColor:"transparent",borderLeftColor:"transparent",borderBottomColor:"transparent"},"arrow-left":{borderTopColor:"transparent",borderBottomColor:"transparent",borderRightColor:"transparent"}}},renderer:"dom",on:{hide:function(){this.hide()},show:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.show(e,t)},prevent:function(e){this.prevent(e)}},hide:function(){this.dispatcher.clear(),this.state.activeNodes=[],this.state.pointer={}},show:function(e){var t,n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.nodes,o=r.duration,a=r.delay;!this.state.prevent&&this.state.targetElement&&(this.state.pointer=ph(e,this),t=Array.isArray(i)?this.props.filter(i):this.props.filter(this.chart.shapesAt({x:this.state.pointer.cx,y:this.state.pointer.cy})),this.props.isEqual(this.state.activeNodes,t)||(this.dispatcher.clear(),this.state.activeNodes=t,this.state.activeNodes.length&&this.dispatcher.invoke((function(){return n.invokeRenderer(n.state.activeNodes)}),o,a)))},prevent:function(e){this.state.prevent=!!e},init:function(e){var t=this;this.state={activeNodes:[],pointer:{},targetElement:null,prevent:!1},this.props=e.settings,this.dispatcher=nh({defaultDuration:this.props.duration,defaultDelay:this.props.delay});var n=this.dispatcher.clear;this.dispatcher.on("pending",(function(){!function(e){ch&&ch!==e&&ch()}(n),ch=n,"function"==typeof t.props.beforeShow&&t.props.beforeShow.call(void 0,{resources:{formatter:t.chart.formatter,scale:t.chart.scale}})})),this.dispatcher.on(["cancelled","fulfilled"],(function(){var e={resources:{formatter:t.chart.formatter,scale:t.chart.scale}};"function"==typeof t.props.beforeHide&&t.props.beforeHide.call(void 0,F({element:t.state.tooltipElm},e)),"function"==typeof t.props.onHide?t.props.onHide.call(void 0,F({element:t.state.tooltipElm},e)):t.renderer.clear([]),"function"==typeof t.props.afterHide&&t.props.afterHide.call(void 0,e),ch===n&&(ch=null),t.state.tooltipElm=void 0})),this.dispatcher.on("active",(function(){"function"==typeof t.props.afterShow&&t.props.afterShow.call(void 0,{element:t.state.tooltipElm,resources:{formatter:t.chart.formatter,scale:t.chart.scale}})}))},created:function(){this.init(this.settings)},beforeUpdate:function(e){var t=e.settings;this.dispatcher&&(this.dispatcher.destroy(),dh()),this.init(t)},render:function(e){return this.h=e,[]},beforeDestroy:function(){this.dispatcher.destroy(),dh()},appendTo:function(){if(this.props.appendTo){this.state.targetElement="function"==typeof this.props.appendTo?this.props.appendTo({resources:{formatter:this.chart.formatter,scale:this.chart.scale}}):this.props.appendTo;var e=this.state.targetElement.getBoundingClientRect(),t=e.width,n=e.height;this.renderer.destroy(),this.renderer.size({width:t,height:n}),this.renderer.appendTo(this.state.targetElement)}else this.state.targetElement=this.renderer.element()},mounted:function(){this.appendTo()},updated:function(){this.appendTo()},invokeRenderer:function(e){var t=function(e,t){var n=t.chart,r=t.scale,i=t.props,o=t.h,a={resources:{dataset:n.dataset,scale:n.scale,formatter:n.formatter},scale:r,h:o},s=[];return e.forEach((function(e){if("function"==typeof i.extract){var t=F({node:e},a);s.push(i.extract(t))}})),s}(e,this),n=hh(th(t,{style:{left:"0px",top:"0px",visibility:"hidden"}},this).getBoundingClientRect(),this);this.state.tooltipElm=th(t,n,this)}};var gh={require:["renderer","chart"],defaultSettings:{settings:{target:"",selector:"*",fill:"rgba(0, 255, 0, 0.1)",stroke:"lime",opacity:1,useOuterRect:!1}},on:{update:function(){this.draw()}},draw:function(){var e=this,t=this.chart.findShapes(this.props.selector).filter((function(t){return t.key===e.props.target})).filter((function(e){return e.collider})).map((function(e){return e.collider}));t.forEach((function(t){t.fill=e.props.fill,t.stroke=e.props.stroke,t.opacity=e.props.opacity,t.collider={type:null}})),this.renderer.render(t)},created:function(){this.props=this.settings.settings},resize:function(e){var t=e.outer,n=e.inner;return this.props.useOuterRect?t:n},render:function(){},mounted:function(){this.draw()},updated:function(){this.props=this.settings.settings,this.draw()}},yh=2*Math.PI;function vh(e,t,n,r){return Math.abs(e.x+n.x-(t.x+t.x))+Math.abs(e.y+n.y-(t.y+t.y))+Math.abs(t.x+r.x-(n.x+n.x))+Math.abs(t.y+r.y-(n.y+n.y))}function bh(e,t){return{x:.5*(e.x+t.x),y:.5*(e.y+t.y)}}function xh(e,t,n,r,i){var o=1-e;return Math.pow(o,3)*t+3*Math.pow(o,2)*e*n+3*o*Math.pow(e,2)*r+Math.pow(e,3)*i}function wh(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:8;if(o<1||vh(e,t,n,r)<=10)return i[i.length-1]!==e&&i.push(e),i.push(r),i;var a=.5,s=bh(e,t),u=bh(t,n),l=bh(n,r),c={x:xh(a,e.x,t.x,n.x,r.x),y:xh(a,e.y,t.y,n.y,r.y)},f=bh(s,u),h=bh(u,l);return wh(e,s,f,c,i,o-1),wh(c,h,l,r,i,o-1),i}function kh(e,t,n){var r=function(e,t,n){return{cp1:{x:e.x+2/3*(t.x-e.x),y:e.y+2/3*(t.y-e.y)},cp2:{x:n.x+2/3*(t.x-n.x),y:n.y+2/3*(t.y-n.y)}}}(e,t,n);return wh(e,r.cp1,r.cp2,n)}function Mh(e,t,n){var r,i,o,a,s=[],u=!!e[4],l=!!e[5],c=e[3],f=e[6],h=e[7],d=e[1],p=e[2];if("a"===e[0]&&(f+=t,h+=n),t===h&&n===h)return s;if(!d||!p)return s.push({x:f,y:h}),s;var m=function(e,t,n,r,i,o,a,s,u){var l,c,f,h,d,p,m=ja(n%360),g=Math.cos(m),y=Math.sin(m),v=(s-o)/2,b=(u-a)/2,x=g*v+y*b,w=g*b-y*v;e=Math.abs(e),t=Math.abs(t),(p=Math.pow(x,2)/Math.pow(e,2)+Math.pow(w,2)/Math.pow(t,2))>1&&(e*=p=Math.sqrt(p),t*=p);var k=e*t,M=e*w,_=t*x,S=Math.pow(M,2)+Math.pow(_,2),q=Math.pow(k,2)-S,D=Math.sqrt(Math.max(q/S,0));r===i&&(D=-D);var C=D*(M/t),E=D*(-_/e);h=g*C-y*E+(s+o)/2,d=y*C+g*E+(u+a)/2;var A=(x-C)/e,T=(w-E)/t,N=(-x-C)/e,R=(-w-E)/t;return l=Math.atan2(T,A),l+=l<0?yh:0,c=Math.atan2(R,N),f=(c+=c<0?yh:0)-l,!i&&l<c?f-=yh:i&&c<l&&(f+=yh),{startAngle:l,sweepAngle:f%=yh,cx:h,cy:d,rx:e,ry:t}}(d,p,c,u,l,f,h,t,n);r=m.cx,i=m.cy,d=m.rx,p=m.ry,o=m.sweepAngle,a=m.startAngle;for(var g=Math.abs(o*Math.sqrt((Math.pow(d,2)+Math.pow(p,2))/2)),y=Math.ceil(g/10),v=o/y,b=1;b<=y;b++){var x=(a+v*b)%yh,w=Math.cos(x),k=Math.sin(x);s.push({x:r+w*d+-k*w,y:i+k*p+w*k})}return s}function _h(e){for(var t=T.parsePath(e),n=[],r=[],i=0,o=0,a=null,s=null,u=null,l=null,c=0;c<t.length;++c){var f=t[c],h=f[0];switch("S"!==h&&"s"!==h&&"C"!==h&&"c"!==h&&(a=null,s=null),"T"!==h&&"t"!==h&&"Q"!==h&&"q"!==h&&(u=null,l=null),h){case"m":r.length&&n.push(r.splice(0));case"l":i+=f[1],o+=f[2],r.push({x:i,y:o});break;case"M":r.length&&n.push(r.splice(0));case"L":i=f[1],o=f[2],r.push({x:i,y:o});break;case"H":i=f[1],r.push({x:i,y:o});break;case"h":i+=f[1],r.push({x:i,y:o});break;case"V":o=f[1],r.push({x:i,y:o});break;case"v":o+=f[1],r.push({x:i,y:o});break;case"a":r.push.apply(r,oe(Mh(f,i,o))),i+=f[6],o+=f[7];break;case"A":r.push.apply(r,oe(Mh(f,i,o))),i=f[6],o=f[7];break;case"c":r.push.apply(r,oe(wh({x:i,y:o},{x:f[1]+i,y:f[2]+o},{x:f[3]+i,y:f[4]+o},{x:f[5]+i,y:f[6]+o}))),a=f[3]+i,s=f[4]+o,i+=f[5],o+=f[6];break;case"C":r.push.apply(r,oe(wh({x:i,y:o},{x:f[1],y:f[2]},{x:f[3],y:f[4]},{x:f[5],y:f[6]}))),a=f[3],s=f[4],i=f[5],o=f[6];break;case"s":null!==a&&null!==a||(a=i,s=o),r.push.apply(r,oe(wh({x:i,y:o},{x:2*i-a,y:2*o-s},{x:f[1]+i,y:f[2]+o},{x:f[3]+i,y:f[4]+o}))),a=f[1]+i,s=f[2]+o,i+=f[3],o+=f[4];break;case"S":null!==a&&null!==a||(a=i,s=o),r.push.apply(r,oe(wh({x:i,y:o},{x:2*i-a,y:2*o-s},{x:f[1],y:f[2]},{x:f[3],y:f[4]}))),a=f[1],s=f[2],i=f[3],o=f[4];break;case"Q":r.push.apply(r,oe(kh({x:i,y:o},{x:f[1],y:f[2]},{x:f[3],y:f[4]}))),u=f[1],l=f[2],i=f[3],o=f[4];break;case"q":r.push.apply(r,oe(kh({x:i,y:o},{x:f[1]+i,y:f[2]+o},{x:f[3]+i,y:f[4]+o}))),u=f[1]+i,l=f[2]+o,i+=f[3],o+=f[4];break;case"T":null!==u&&null!==u||(u=i,l=o),u=2*i-u,l=2*o-l,r.push.apply(r,oe(kh({x:i,y:o},{x:u,y:l},{x:f[1],y:f[2]}))),i=f[1],o=f[2];break;case"t":null!==u&&null!==u||(u=i,l=o),u=2*i-u,l=2*o-l,r.push.apply(r,oe(kh({x:i,y:o},{x:u,y:l},{x:f[1]+i,y:f[2]+o}))),i+=f[1],o+=f[2];break;case"z":case"Z":r.length&&r.push({x:r[0].x,y:r[0].y})}}return function(e){for(var t=0;t<e.length-1;t++){var n=e[t],r=e[t+1];Math.abs(n.x-r.x)<1e-12&&Math.abs(n.y-r.y)<1e-12&&(e.splice(t,1),t--)}}(r),n.push(r.splice(0)),n}var Sh={require:["renderer","chart"],defaultSettings:{settings:{target:"",fill:"transparent",stroke:"lime",opacity:1,radius:2,useOuterRect:!1}},on:{update:function(){this.draw()}},draw:function(){var e=this,t=this.chart.findShapes("path").filter((function(t){return t.key===e.props.target})),n=[];t.forEach((function(t){_h(t.attrs.d).forEach((function(t){t.forEach((function(t){n.push({type:"circle",cx:t.x,cy:t.y,r:e.props.radius,fill:e.props.fill,stroke:e.props.stroke,opacity:e.props.opacity,collider:{type:null}})}))}))})),this.renderer.render(n)},created:function(){this.props=this.settings.settings},resize:function(e){var t=e.outer,n=e.inner;return this.props.useOuterRect?t:n},render:function(){},mounted:function(){this.draw()},updated:function(){this.props=this.settings.settings,this.draw()}};var qh=[function(e){e.component("box",Pu),e.component("box-marker",Pu)},function(e){e.component("point",Vu),e.component("point-marker",Vu)},function(e){e.component("pie",Yu)},function(e){e.component("grid-line",Zu)},function(e){e.component("ref-line",ol)},function(e){e.component("axis",Dl)},function(e){e.component("container",Cl)},function(e){e.component("text",Tl)},function(e){e.component("scrollbar",Ol)},function(e){e.component("brush-range",Xl),e.component("brush-area-dir",Zl)},function(e){e.component("range",nc)},function(e){e.component("brush-lasso",uc)},function(e){e.component("labels",qf)},function(e){e.component("legend-cat",zf)},function(e){e.component("legend-seq",Uf)},function(e){e.component("line",Gf)},function(e){e.component("brush-area",eh)},function(e){e.component("tooltip",mh)},function(e){e.component("debug-collider",gh)},function(e){e.component("debug-path-to-points",Sh)}],Dh=function(){function e(t){U(this,e),this._parent=null,this._children=[],this._ancestors=null,this.type=t,this.data=null}return Y(e,[{key:"detach",value:function(){return this._parent&&this._parent.removeChild(this),this}},{key:"parent",get:function(){return this._parent}},{key:"isBranch",get:function(){return this._children&&this._children.length}},{key:"children",get:function(){return this._children}},{key:"ancestors",get:function(){var e;this._ancestors||(this._ancestors=[],this.parent&&(e=this._ancestors).push.apply(e,[this.parent].concat(oe(this.parent.ancestors))));return this._ancestors}},{key:"descendants",get:function(){var e,t,n=[],r=this.children.length;for(e=0;e<r;e++)t=this.children[e],n.push(t),t.children.length&&n.push.apply(n,oe(t.descendants));return n}},{key:"equals",value:function(e){var t=this.children,n=e.children;if(t.length!==n.length)return!1;for(var r=0;r<t.length;r++)if(!t[r].equals(n[r]))return!1;return!0}},{key:"toJSON",value:function(){return{type:this.type,children:this.children.map((function(e){return e.toJSON()}))}}}]),e}(),Ch=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.x,r=void 0===n?0:n,i=t.y,o=void 0===i?0:i,a=t.width,s=void 0===a?0:a,u=t.height,l=void 0===u?0:u,c=t.minWidth,f=void 0===c?0:c,h=t.minHeight,d=void 0===h?0:h;U(this,e),this.set({x:r,y:o,width:s,height:l,minWidth:f,minHeight:d})}return Y(e,[{key:"set",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.x,n=void 0===t?0:t,r=e.y,i=void 0===r?0:r,o=e.width,a=void 0===o?0:o,s=e.height,u=void 0===s?0:s,l=e.minWidth,c=void 0===l?0:l,f=e.minHeight,h=void 0===f?0:f;this.type="rect",a>=0?(this.x=n,this.width=Math.max(a,c)):(this.x=n+Math.min(a,-c),this.width=-Math.min(a,-c)),u>=0?(this.y=i,this.height=Math.max(u,h)):(this.y=i+Math.min(u,-h),this.height=-Math.min(u,-h))}},{key:"containsPoint",value:function(e){return Ms(this,e)}},{key:"intersectsLine",value:function(e){return _s(this,me(e))}},{key:"intersectsRect",value:function(e){return ws(this,pe(e))}},{key:"intersectsCircle",value:function(e){return ms(e,this)}},{key:"intersectsPolygon",value:function(e){return xs(e,this)}},{key:"intersectsGeoPolygon",value:function(e){return Ns(e,this)}},{key:"points",value:function(){return[{x:this.x,y:this.y},{x:this.x+this.width,y:this.y},{x:this.x+this.width,y:this.y+this.height},{x:this.x,y:this.y+this.height}]}}]),e}();var Eh=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.cx,r=void 0===n?0:n,i=t.cy,o=void 0===i?0:i,a=t.r,s=void 0===a?0:a,u=t.minRadius,l=void 0===u?0:u;U(this,e),this.set({cx:r,cy:o,r:s,minRadius:l})}return Y(e,[{key:"set",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.cx,n=void 0===t?0:t,r=e.cy,i=void 0===r?0:r,o=e.r,a=void 0===o?0:o,s=e.minRadius,u=void 0===s?0:s;this.type="circle",this.cx=n,this.cy=i,this.r=Math.max(a,u),this.vector={x:this.cx,y:this.cy}}},{key:"containsPoint",value:function(e){return ps(this,e)}},{key:"intersectsLine",value:function(e){return gs(this,me(e))}},{key:"intersectsRect",value:function(e){return ms(this,pe(e))}},{key:"intersectsCircle",value:function(e){return function(e,t){if(cs(e)||cs(t))return!1;var n=e.cx-t.cx,r=e.cy-t.cy;return Math.pow(n,2)+Math.pow(r,2)<=Math.pow(e.r+t.r,2)}(this,e)}},{key:"intersectsPolygon",value:function(e){return ys(this,e)}},{key:"intersectsGeoPolygon",value:function(e){return Es(this,e)}},{key:"points",value:function(){return[{x:this.cx,y:this.cy}]}}]),e}();var Ah=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.x1,r=void 0===n?0:n,i=t.y1,o=void 0===i?0:i,a=t.x2,s=void 0===a?0:a,u=t.y2,l=void 0===u?0:u,c=t.tolerance,f=void 0===c?0:c;U(this,e),this.set({x1:r,y1:o,x2:s,y2:l,tolerance:f})}return Y(e,[{key:"set",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.x1,n=void 0===t?0:t,r=e.y1,i=void 0===r?0:r,o=e.x2,a=void 0===o?0:o,s=e.y2,u=void 0===s?0:s,l=e.tolerance,c=void 0===l?0:l;this.type="line",this.x1=n,this.y1=i,this.x2=a,this.y2=u,this.tolerance=Math.max(0,Math.round(c)),this.vectors=this.points(),this.zeroSize=n===a&&i===u}},{key:"containsPoint",value:function(e){return this.tolerance>0?gs({cx:e.x,cy:e.y,r:this.tolerance},this):qs(this,e)}},{key:"intersectsLine",value:function(e){return Ss(this,me(e))}},{key:"intersectsRect",value:function(e){return _s(pe(e),this)}},{key:"intersectsCircle",value:function(e){return gs(e,this)}},{key:"intersectsPolygon",value:function(e){return bs(e,this)}},{key:"intersectsGeoPolygon",value:function(e){return Ts(e,this)}},{key:"points",value:function(){return[{x:this.x1,y:this.y1},{x:this.x2,y:this.y2}]}}]),e}();function Th(e){var t=e[0],n=e[e.length-1];t.x===n.x&&t.y===n.y||e.push(t)}function Nh(e){for(var t=0;t<e.length-1;t++){var n=e[t],r=e[t+1];n.x===r.x&&n.y===r.y&&(e.splice(t,1),t--)}}var Rh=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.vertices,r=void 0===n?[]:n;U(this,e),this.set({vertices:r})}return Y(e,[{key:"set",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.vertices,n=void 0===t?[]:t;if(this.type="polygon",this.vertices=n.slice(),this.edges=[],Nh(this.vertices),!(this.vertices.length<=2)){Th(this.vertices),this.xMin=NaN,this.yMin=NaN,this.xMax=NaN,this.yMax=NaN;for(var r=0;r<this.vertices.length;r++)r<this.vertices.length-1&&this.edges.push([this.vertices[r],this.vertices[r+1]]),this.xMin=isNaN(this.xMin)?this.vertices[r].x:Math.min(this.xMin,this.vertices[r].x),this.xMax=isNaN(this.xMax)?this.vertices[r].x:Math.max(this.xMax,this.vertices[r].x),this.yMin=isNaN(this.yMin)?this.vertices[r].y:Math.min(this.yMin,this.vertices[r].y),this.yMax=isNaN(this.yMax)?this.vertices[r].y:Math.max(this.yMax,this.vertices[r].y);this._bounds=null,this._boundingRect=null}}},{key:"containsPoint",value:function(e){return vs(this,e)}},{key:"intersectsCircle",value:function(e){return ys(e,this)}},{key:"intersectsLine",value:function(e){return bs(this,me(e))}},{key:"intersectsRect",value:function(e){return xs(this,pe(e))}},{key:"intersectsPolygon",value:function(e){return Ds(this,e)}},{key:"intersectsGeoPolygon",value:function(e){return Cs(e,this)}},{key:"points",value:function(){return this.vertices}},{key:"bounds",value:function(){return this._bounds||(this._bounds=[{x:this.xMin,y:this.yMin},{x:this.xMax,y:this.yMin},{x:this.xMax,y:this.yMax},{x:this.xMin,y:this.yMax}]),this._bounds}},{key:"boundingRect",value:function(){return this._boundingRect||(this._boundingRect={x:this.xMin,y:this.yMin,width:this.xMax-this.xMin,height:this.yMax-this.yMin}),this._boundingRect}}]),e}();function Oh(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Q(Rh,t)}function Ih(e){var t=e[0],n=e[e.length-1];t.x===n.x&&t.y===n.y||e.push(t)}function Ph(e){for(var t=0;t<e.length-1;t++){var n=e[t],r=e[t+1];n.x===r.x&&n.y===r.y&&(e.splice(t,1),t--)}}var Lh=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.vertices,r=void 0===n?[[]]:n;U(this,e),this.set({vertices:r})}return Y(e,[{key:"set",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.vertices,n=void 0===t?[]:t;this.type="geopolygon",this.vertices=n.slice(),this.numPolygons=this.vertices.length,this.polygons=[],this.xMin=NaN,this.yMin=NaN,this.xMax=NaN,this.yMax=NaN;for(var r=0;r<this.numPolygons;r++)Ph(this.vertices[r]),this.vertices[r].length>2&&Ih(this.vertices[r]),this.polygons[r]=Oh({vertices:this.vertices[r]}),this.xMin=isNaN(this.xMin)?this.polygons[r].xMin:Math.min(this.xMin,this.polygons[r].xMin),this.xMax=isNaN(this.xMax)?this.polygons[r].xMax:Math.max(this.xMax,this.polygons[r].xMax),this.yMin=isNaN(this.yMin)?this.polygons[r].yMin:Math.min(this.yMin,this.polygons[r].yMin),this.yMax=isNaN(this.yMax)?this.polygons[r].yMax:Math.max(this.yMax,this.polygons[r].yMax);this._bounds=null,this._boundingRect=null}},{key:"containsPoint",value:function(e){return As(this,e)}},{key:"intersectsCircle",value:function(e){return Es(e,this)}},{key:"intersectsLine",value:function(e){return Ts(this,me(e))}},{key:"intersectsRect",value:function(e){return Ns(this,pe(e))}},{key:"intersectsPolygon",value:function(e){return Cs(this,e)}},{key:"intersectsGeoPolygon",value:function(e){return n=e,r=(t=this).boundingRect(),i=n.boundingRect(),!!ws(r,i)&&(ks(i,r)?ds(n,t):ds(t,n));var t,n,r,i}},{key:"points",value:function(){return this.vertices}},{key:"bounds",value:function(){return this._bounds||(this._bounds=[{x:this.xMin,y:this.yMin},{x:this.xMax,y:this.yMin},{x:this.xMax,y:this.yMax},{x:this.xMin,y:this.yMax}]),this._bounds}},{key:"boundingRect",value:function(){return this._boundingRect||(this._boundingRect={x:this.xMin,y:this.yMin,width:this.xMax-this.xMin,height:this.yMax-this.yMin}),this._boundingRect}}]),e}();function jh(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Q(Lh,t)}function zh(e,t){return e.x!==t.x||e.y!==t.y}var Fh=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.points,r=void 0===n?[]:n;U(this,e),this.set({points:r})}return Y(e,[{key:"set",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.points,n=void 0===t?[]:t;if(this.type="polyline",this.segments=[],this._points=n.slice(),this._points.length>1)for(var r=0,i=this._points.length-1;r<i;r++)zh(this._points[r],this._points[r+1])&&this.segments.push({x1:this._points[r].x,y1:this._points[r].y,x2:this._points[r+1].x,y2:this._points[r+1].y})}},{key:"containsPoint",value:function(e){return this.segments.some((function(t){return qs(t,e)}))}},{key:"intersectsCircle",value:function(e){return this.segments.some((function(t){return gs(e,t)}))}},{key:"intersectsLine",value:function(e){var t=me(e);return this.segments.some((function(e){return Ss(e,t)}))}},{key:"intersectsRect",value:function(e){var t=pe(e);return this.segments.some((function(e){return _s(t,e)}))}},{key:"intersectsPolygon",value:function(e){return this.segments.some((function(t){return bs(e,t)}))}},{key:"intersectsGeoPolygon",value:function(e){return this.segments.some((function(t){return Ts(e,t)}))}},{key:"points",value:function(){return this._points}}]),e}();var Hh=kt();function Bh(e,t){return Hh.get(e)(t)}Hh.add("rect",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Q(Ch,t)})),Hh.add("circle",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Q(Eh,t)})),Hh.add("line",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Q(Ah,t)})),Hh.add("polygon",Oh),Hh.add("geopolygon",jh),Hh.add("polyline",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Q(Fh,t)}));var Vh=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];U(this,e),this.set(t)}return Y(e,[{key:"set",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.geometries=[],t.forEach((function(t){var n=Bh(t.type,t);n&&e.geometries.push(n)}))}},{key:"containsPoint",value:function(e){return this.geometries.some((function(t){return t.containsPoint(e)}))}},{key:"intersectsLine",value:function(e){return this.geometries.some((function(t){return t.intersectsLine(e)}))}},{key:"intersectsRect",value:function(e){return this.geometries.some((function(t){return t.intersectsRect(e)}))}},{key:"intersectsCircle",value:function(e){return this.geometries.some((function(t){return t.intersectsCircle(e)}))}},{key:"intersectsPolygon",value:function(e){return this.geometries.some((function(t){return t.intersectsPolygon(e)}))}},{key:"intersectsGeoPolygon",value:function(e){return this.geometries.some((function(t){return t.intersectsGeoPolygon(e)}))}}]),e}();var Wh=function(){function e(){U(this,e),this._elements=[[1,0,0],[0,1,0],[0,0,1]],this._stack=[]}return Y(e,[{key:"clone",value:function(){return(new e).multiply(this)}},{key:"set",value:function(e){return this._elements=e,this}},{key:"save",value:function(){return this._stack.push(this.elements),this}},{key:"restore",value:function(){return this._stack.length&&(this._elements=this._stack.pop()),this}},{key:"add",value:function(e){var t,n;for(t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)this._elements[t][n]+=e;return this}},{key:"translate",value:function(e,t){return this.multiply([[1,0,e],[0,1,t],[0,0,1]]),this}},{key:"rotate",value:function(e){var t=Math.cos(-e),n=Math.sin(-e);return this.multiply([[t,n,0],[-n,t,0],[0,0,1]]),this}},{key:"multiply",value:function(t){var n,r,i,o;if(t instanceof e&&(t=t._elements),Array.isArray(t)){for(i=[[0,0,0],[0,0,0],[0,0,0]],n=0;n<this._elements.length;n++)for(r=0;r<this._elements[n].length;r++)for(o=0;o<3;o++)i[n][r]+=this._elements[n][o]*t[o][r];this._elements=i}else for(n=0;n<this._elements.length;n++)for(r=0;r<this._elements[n].length;r++)this._elements[n][r]*=t;return this}},{key:"scale",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return this.multiply([[e,0,0],[0,t,0],[0,0,1]]),this}},{key:"transform",value:function(e,t,n,r,i,o){return this.multiply([[e,n,i],[t,r,o],[0,0,1]]),this}},{key:"determinant",value:function(){var e=this._elements[0][0],t=this._elements[0][1],n=this._elements[0][2],r=this._elements[1][0],i=this._elements[1][1],o=this._elements[1][2],a=this._elements[2][0],s=this._elements[2][1],u=this._elements[2][2];return e*i*u+t*o*a+n*r*s-n*i*a-t*r*u-e*o*s}},{key:"invert",value:function(){var e=this.determinant(),t=this._elements[0][0],n=this._elements[0][1],r=this._elements[0][2],i=this._elements[1][0],o=this._elements[1][1],a=this._elements[1][2],s=this._elements[2][0],u=this._elements[2][1],l=this._elements[2][2];return this._elements=[[o*l-a*u,r*u-n*l,n*a-r*o],[a*s-i*l,t*l-r*s,r*i-t*a],[i*u-o*s,s*n-t*u,t*o-n*i]],this.multiply(1/e),this}},{key:"transpose",value:function(){var e=Object.create(this._elements);return this._elements=[[e[0][0],e[1][0],e[2][0]],[e[0][1],e[1][1],e[2][1]],[e[0][2],e[1][2],e[2][2]]],this}},{key:"identity",value:function(){return this._elements=[[1,0,0],[0,1,0],[0,0,1]],this}},{key:"toString",value:function(){return"".concat(this._elements.map((function(e){return e.join("\t")})).join("\n"))}},{key:"isIdentity",value:function(){var e=this._elements;return 1===e[0][0]&&0===e[0][1]&&0===e[0][2]&&0===e[1][0]&&1===e[1][1]&&0===e[1][2]&&0===e[2][0]&&0===e[2][1]&&1===e[2][2]}},{key:"transformPoint",value:function(e){var t,n,r=[e.x,e.y,1],i=this._elements,o=[0,0,0];for(t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)o[t]+=r[n]*i[t][n];return{x:o[0],y:o[1]}}},{key:"transformPoints",value:function(e){var t,n,r,i,o,a=this._elements,s=[];for(i=0;i<e.length;i++){for(t=[e[i].x,e[i].y,1],o=[0,0,0],n=0;n<this._elements.length;n++)for(r=0;r<this._elements[n].length;r++)o[n]+=t[r]*a[n][r];s.push({x:o[0],y:o[1]})}return s}},{key:"elements",get:function(){var e=this._elements;return[[e[0][0],e[0][1],e[0][2]],[e[1][0],e[1][1],e[1][2]],[e[2][0],e[2][1],e[2][2]]]}}]),e}(),Uh=/(translate|scale|rotate|matrix)\(([0-9,.eE+-\s]+)(?:,|\s?)+\)/g;function $h(e,t){var n=t.args[0]*(Math.PI/180);if(t.args.length>2){var r=t.args[1],i=t.args[2];e.translate(r,i),e.rotate(n),e.translate(-r,-i)}else 1===t.args.length&&e.rotate(n)}function Yh(e,t){var n=t.args[0],r=isNaN(t.args[1])?t.args[0]:t.args[1];e.scale(n,r)}function Kh(e,t){var n=t.args[0],r=isNaN(t.args[1])?0:t.args[1];e.translate(n,r)}function Xh(e,t){t.args.length>=6&&e.transform.apply(e,oe(t.args))}function Gh(e,t){for(var n,r=function(e){for(var t,n=[];null!==(t=Uh.exec(e));){var r=t[2].trim(),i=-1===r.indexOf(",")?r.split(" "):r.split(",");n.push({cmd:t[1],args:i.filter((function(e){return e.trim().length>0})).map((function(e){return Number(e)}))})}return n}(e),i=0,o=r.length;i<o;i++)"rotate"===(n=r[i]).cmd?$h(t,n):"scale"===n.cmd?Yh(t,n):"matrix"===n.cmd?Xh(t,n):"translate"===n.cmd&&Kh(t,n)}var Jh={type:/^\w[\w-]+/,attr:/^\[\w(?:[\w\._-]+)?(?:[!]?=['\"][\w\s*#_-]*['\"])?\]/,universal:/^(\*)/,tag:/^\.(\w+)/},Zh={type:function(e,t){return t.filter((function(t){var n=t.type;return!!n&&n.toLowerCase()===e.toLowerCase()}))},attr:function(e,t,n,r){return r.filter((function(r){var i=r.attrs[e];if(!t)return void 0!==i;if(void 0===i)return!1;switch(t){case"=":return n===String(i);case"!=":return n!==String(i);default:return!1}}))},universal:function(e){return e},tag:function(e,t){return t.filter((function(t){var n=t.tag;return!!n&&-1!==n.trim().split(/\s+/).indexOf(e.replace(".",""))}))}};var Qh={find:function(e,t){var n,r,i=[],o=[];if(t.isBranch){var a;n=function(e){var t,n,r,i,o=[];return e.split(/\s*,\s*/).forEach((function(e){e=e.trim(),t=[];for(var a=function(o){(r=e.match(Jh[o]))&&(i=!0,e=e.slice(r[0].length),n={type:o,value:r[0]},"attr"===o&&(r=r[0].match(/\[(\w[\w\._-]+)?(?:([!]?=)['\"]([\w\s#_-]*)['\"])?\]/),n.attribute=r[1],n.operator=r[2],n.attributeValue=r[3]),t.push(n))};e&&(i=!1,(r=e.match(/^\s*([>+~]|\s)\s*/))&&(i=!0,t.push({type:" ",value:r[0]}),e=e.slice(r[0].length)),Object.keys(Jh).forEach(a),t&&t.length&&o.indexOf(t)<0&&o.push(t),i););})),o}(e),r=t.descendants;for(var s=function(e,t){a=n[e];var i=[],s=r.slice(),u=!1;a.reverse().forEach((function(e){if(" "===e.type)return i.push(s),s=r.slice(),void(u=!1);s=function(e,t){if(!t||!t.length||!e||"function"!=typeof Zh[e.type])return[];switch(e.type){case"type":return Zh[e.type](e.value,t);case"attr":return Zh[e.type](e.attribute,e.operator,e.attributeValue,t);case"universal":return Zh[e.type](t);case"tag":return Zh[e.type](e.value,t);default:return[]}}(e,s),u=!0})),u&&i.push(s);var l=i[0].filter((function(e){for(var t,n=e.parent,r=1;r<i.length;r++){for(t=i[r].indexOf(n);n&&t<0;)n=n.parent,t=i[r].indexOf(n);if(t<0)return!1}return!0}));o.push(l)},u=0,l=n.length;u<l;u++)s(u);for(var c=0,f=o.length;c<f;c++)for(var h=0,d=o[c].length;h<d;h++)i.indexOf(o[c][h])<0&&i.push(o[c][h])}return i||[]}};function ed(e,t,n){var r=e.type,i=e.points();n&&(i=i.every((function(e){return Array.isArray(e)}))?i.map((function(e){return n.transformPoints(e)})):n.transformPoints(i)),function(e,t){for(var n=0,r=e.length;n<r;n++)e[n].x/=t,e[n].y/=t}(i,t);var o=null;if("rect"===r||"bounds"===r)(o=pe(i)).type=r;else if("circle"===r)(o=function(e,t){return{cx:e[0].x,cy:e[0].y,r:t}}(i,e.r)).type=r;else if("line"===r)(o=me(i)).type=r;else if("polygon"===r||"polyline"===r){o={type:"path",d:Pa(i,"polygon"===r)}}else if("geopolygon"===r){for(var a="",s=0;s<i.length;s++)a+=Pa(i[s],!0);o={type:"path",d:a}}return o}var td=function(){function e(t){var n=this;U(this,e),this._bounds=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=t.boundingRect?t.boundingRect(e):{x:0,y:0,width:0,height:0},r=n.x,i=n.y,o=n.width,a=n.height;return{x:r,y:i,width:o,height:a}},this._attrs=t.attrs,this._type=t.type,this._data=t.data,this._dpi=t.stage?t.stage.dpi:1,this._collider=function(){return function(e,t){if(e.collider){var n=e.modelViewMatrix;return"collection"===e.colliderType?{type:"container",children:e.collider.geometries.map((function(e){return ed(e,t,n)}))}:ed(e.collider,t,n)}return null}(t,n._dpi)},this._desc=t.desc,this._tag=t.tag,this._children=function(){return t.children.map((function(t){return new e(t)}))},this._parent=function(){return t.parent?new e(t.parent):null},this._cache={elementBoundingRect:null},this._getElementBoundingRect=function(){return!n._cache.elementBoundingRect&&n.element&&(n._cache.elementBoundingRect=n.element.getBoundingClientRect()),n._cache.elementBoundingRect||{left:0,top:0}}}return Y(e,[{key:"children",get:function(){return this._children()}},{key:"parent",get:function(){return this._parent()}},{key:"type",get:function(){return this._type}},{key:"data",get:function(){return this._data}},{key:"attrs",get:function(){return this._attrs}},{key:"element",get:function(){return this._element},set:function(e){this._cache.elementBoundingRect=null,this._element=e}},{key:"key",get:function(){return this._key},set:function(e){this._key=e}},{key:"bounds",get:function(){var e=this._bounds();return e.x/=this._dpi,e.y/=this._dpi,e.width/=this._dpi,e.height/=this._dpi,e}},{key:"localBounds",get:function(){return this._bounds(!1)}},{key:"boundsRelativeTo",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=W(e),r=t?this.bounds:this.localBounds,i=this._getElementBoundingRect(),o=i.left,a=i.top;if("object"===n&&null!==e&&"function"==typeof e.getBoundingClientRect){var s=e.getBoundingClientRect(),u=s.left,l=void 0===u?0:u,c=s.top,f=void 0===c?0:c;o-=l,a-=f}return r.x+=o,r.y+=a,r}},{key:"collider",get:function(){return this._collider()}},{key:"desc",get:function(){return this._desc}},{key:"tag",get:function(){return this._tag}}]),e}();function nd(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Q(td,t)}var rd=function(){function e(t){U(this,e),this._node=nd(t),this._parent=null,this._input=null}return Y(e,[{key:"node",get:function(){return this._node}},{key:"parent",get:function(){return this._parent},set:function(e){this._parent=e}},{key:"input",get:function(){return this._input},set:function(e){this._input=e}}]),e}();function id(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Q(rd,t)}function od(e,t){var n=e.parent;if(n&&"stage"!==n.type){t.parent=id(n);var r=n.parent;r&&"stage"!==r.type&&od(r,t.parent)}}function ad(e,t,n){if(null===e.colliderType)return null;var r=function(e,t){var n={};if(e.modelViewMatrix)if(Array.isArray(t))n=e.inverseModelViewMatrix.transformPoints(t);else if(isNaN(t.r))Array.isArray(t.vertices)?n.vertices=e.inverseModelViewMatrix.transformPoints(t.vertices):n=e.inverseModelViewMatrix.transformPoint(t);else{var r={x:t.cx,y:t.cy},i=e.inverseModelViewMatrix.transformPoint(r);n.cx=i.x,n.cy=i.y,n.r=t.r}else n=t;return Array.isArray(n.vertices)&&(n=n.vertices.every((function(e){return Array.isArray(e)}))?jh(n):Oh(n)),n}(e,n);return"frontChild"===e.colliderType?function(e,t,n){for(var r=e.descendants.length-1;r>=0;r--){var i=e.descendants[r];if(null!==i.collider&&i.collider[t](n)){var o=id(i);return od(i,o),o}}return null}(e,t,r):function(e,t,n){if(e.collider[t](n)){var r=id(e);return od(e,r),r}return null}(e,t,r)}function sd(e,t,n,r){for(var i=e.length,o=0;o<i;o++){var a=e[o],s=ad(a,t,r);s&&n.push(s),!a.children||s||a.collider||sd(a.children,t,n,r)}}function ud(e,t,n){for(var r=e.length,i=0;i<r;i++){var o=e[i];if(null!==ad(o,t,n))return!0;if(o.children&&!o.collider)return ud(o.children,t,n)}return!1}function ld(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=ge(e),r={};switch(n){case"circle":return r.cx=e.cx*t,r.cy=e.cy*t,r.r=e.r,["intersectsCircle",r];case"rect":return["intersectsRect",r=de(e).map((function(e){return Ba(e,t)}))];case"line":return["intersectsLine",r=he(e).map((function(e){return Ba(e,t)}))];case"point":return["containsPoint",r=Ba(e,t)];case"polygon":return r.vertices=e.vertices.map((function(e){return Ba(e,t)})),["intersectsPolygon",r];case"geopolygon":return r.vertices=e.vertices.map((function(e){return e.map((function(e){return Ba(e,t)}))})),["intersectsGeoPolygon",r];default:return[]}}function cd(e,t){var n=ie(ld(t,e.dpi),2),r=n[0],i=n[1],o=[];return r&&(sd([e],r,o,i),function(e,t){for(var n=0,r=t.length;n<r;n++)t[n].input=e}(t,o)),o}function fd(e,t){var n=ie(ld(t,e.dpi),2);return ud([e],n[0],n[1])}var hd=function(e){X(n,e);var t=ne(n);function n(e){var r;return U(this,n),(r=t.call(this,e))._stage=null,r._collider={type:null,definition:null,fn:null},r._attrs={},r._node=null,r}return Y(n,[{key:"set",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.node=e;var t=e.data,n=e.desc,r=e.tag,i=e.strokeReference,o=e.fillReference;Ia(this.attrs,e),void 0!==t&&(this.data=t),"object"===W(n)&&(this.desc=F(!0,{},n)),"string"==typeof r&&(this.tag=r),"string"==typeof i&&(this.strokeReference=i),"string"==typeof o&&(this.fillReference=o)}},{key:"findShapes",value:function(e){return Qh.find(e,this).map((function(e){return nd(e)}))}},{key:"getItemsFrom",value:function(e){return cd(this,e)}},{key:"containsPoint",value:function(e){return fd(this,e)}},{key:"intersectsLine",value:function(e){return fd(this,e)}},{key:"intersectsRect",value:function(e){return fd(this,e)}},{key:"intersectsCircle",value:function(e){return fd(this,e)}},{key:"intersectsPolygon",value:function(e){return fd(this,e)}},{key:"intersectsGeoPolygon",value:function(e){return fd(this,e)}},{key:"resolveLocalTransform",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Wh;void 0!==this.attrs.transform&&Gh(this.attrs.transform,e),this.modelViewMatrix=e.clone()}},{key:"resolveGlobalTransform",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Wh,t=this.ancestors;if(t.length>0)for(var n=t.length-1;n>=0;n--)t[n].resolveLocalTransform(e),e=t[n].modelViewMatrix;this.resolveLocalTransform(e)}},{key:"attr",value:function(e){return this.attrs[e]}},{key:"equals",value:function(e){var t=this.attrs,r=Object.keys(t),i=e.attrs,o=Object.keys(i);if(r.length!==o.length)return!1;for(var a=0;a<r.length;a++){var s=r[a];if(!Object.hasOwnProperty.call(i,s))return!1;if(t[s]!==i[s])return!1}return re(G(n.prototype),"equals",this).call(this,e)}},{key:"toJSON",value:function(){var e=re(G(n.prototype),"toJSON",this).call(this);return e.attrs=this.attrs,e}},{key:"attrs",get:function(){return this._attrs}},{key:"stage",get:function(){return this._parent&&!this._stage?this._stage=this._parent.stage:this._parent||this._stage===this||(this._stage=null),this._stage}},{key:"modelViewMatrix",get:function(){return this._mvm},set:function(e){this._mvm=e,this._imvm=null}},{key:"inverseModelViewMatrix",get:function(){return this._imvm=this._imvm?this._imvm:this._mvm.clone().invert(),this._imvm}},{key:"node",get:function(){return this._node},set:function(e){this._node=e}},{key:"collider",get:function(){if(null!==this._collider.fn)return this._collider.fn;switch(this._collider.type){case"collection":this._collider.fn=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Q(Vh,t)}(this._collider.definition);break;case"frontChild":return!0;case"bounds":this._collider.fn=Bh("rect",this.boundingRect());break;case"line":case"rect":case"circle":case"polygon":case"geopolygon":case"polyline":this._collider.fn=Bh(this._collider.type,this._collider.definition);break;default:return null}return this._collider.fn},set:function(e){var t=Array.isArray(e)?"collection":e&&e.type;return"string"!=typeof t?(this._collider.type=null,this._collider.definition=null,void(this._collider.fn=null)):null!==this._collider&&this._collider.type===t&&null!==this._collider.fn?(this._collider.fn.set(e),void(this._collider.definition=e)):(this._collider.type=t,void(this._collider.definition=e))}},{key:"colliderType",get:function(){return this._collider.type}}]),n}(Dh),dd=function(e){X(n,e);var t=ne(n);function n(){return U(this,n),t.apply(this,arguments)}return Y(n,[{key:"addChild",value:function(e){if(!(e&&e instanceof Dh))throw new TypeError("Expecting a Node as argument, but got ".concat(e));if(e===this)throw new Error("Can not add itself as child!");if(e._children&&e._children.length&&this.ancestors.indexOf(e)>=0)throw new Error("Can not add an ancestor as child!");return e._parent&&e._parent!==this&&e._parent.removeChild(e),this._children.push(e),e._parent=this,e._ancestors=null,this}},{key:"addChildren",value:function(e){var t,n=e?e.length:0;for(t=0;t<n;t++)this.addChild(e[t]);return this}},{key:"removeChild",value:function(e){var t=this._children.indexOf(e);return t>=0&&(this._children.splice(t,1),e._parent=null,e._ancestors=null),this}},{key:"removeChildren",value:function(e){var t,n;if(!this._children)return this;if(e)for(n=e.length,t=0;t<n;t++)this.removeChild(e[t]);else for(;this._children.length;)this.removeChild(this._children[0]);return this}}]),n}(Dh),pd=dd.prototype,md=function(e){X(n,e);var t=ne(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};U(this,n);var i=r.type,o=void 0===i?"container":i;return(e=t.call(this,o)).set(r),e}return Y(n,[{key:"set",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};re(G(n.prototype),"set",this).call(this,e);var t=e.collider,r=F({type:null},t);this.collider=r,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}},{key:"appendChildRect",value:function(e,t){if(void 0!==e.bounds){var n=this.__boundingRect[t]||{},r=ie(e.bounds(t),3),i=r[0],o=r[2],a=i.x,s=i.y,u=o.x,l=o.y,c=isNaN(n.width)?u:Math.max(u,n.width+n.x),f=isNaN(n.height)?l:Math.max(l,n.height+n.y);n.x=isNaN(n.x)?a:Math.min(a,n.x),n.y=isNaN(n.y)?s:Math.min(s,n.y),n.width=c-n.x,n.height=f-n.y,this.__boundingRect[t]=n}}},{key:"boundingRect",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];for(var t=this.children.length,n=0;n<t;n++)this.appendChildRect(this.children[n],e);return this.__boundingRect[e]=F({x:0,y:0,width:0,height:0},this.__boundingRect[e]),this.__boundingRect[e]}},{key:"bounds",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];var t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}},{key:"addChild",value:function(e){var t=pd.addChild.call(this,e);if(this._collider&&"bounds"===this._collider.type){this.appendChildRect(e,!0);var n=F({type:"bounds",x:0,y:0,width:0,height:0},this.__boundingRect.true);this.collider=n}return t}},{key:"addChildren",value:function(e){var t=pd.addChildren.call(this,e),n=e.length;if(this._collider&&"bounds"===this._collider.type&&n>0){for(var r=0;r<n;r++)this.appendChildRect(e[r],!0);var i=F({type:"bounds",x:0,y:0,width:0,height:0},this.__boundingRect.true);this.collider=i}return t}},{key:"removeChild",value:function(e){e._stage=null;var t,n=e.descendants,r=n?n.length:0;for(t=0;t<r;t++)n[t]._stage=null;if(pd.removeChild.call(this,e),this._collider&&"bounds"===this._collider.type){this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null};var i=F(this.boundingRect(!0),{type:"bounds"});this.collider=i}return this}},{key:"removeChildren",value:function(e){if(pd.removeChildren.call(this,e),this._collider&&"bounds"===this._collider.type){this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null};var t=F(this.boundingRect(!0),{type:"bounds"});this.collider=t}return this}}]),n}(hd);function gd(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Q(md,t)}var yd=function(e){X(n,e);var t=ne(n);function n(e){var r;return U(this,n),(r=t.call(this,"stage"))._stage=ee(r),r._dpiRatio=e||1,r}return Y(n,[{key:"dpi",get:function(){return this._dpiRatio}}]),n}(md);var vd=dd.prototype,bd=["x1","x2","y1","y2","id","offset","style"],xd=function(e){X(n,e);var t=ne(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};U(this,n);var i=r.type,o=void 0===i?"container":i;return(e=t.call(this,o)).set(r),e._boundingRect={},e}return Y(n,[{key:"set",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};re(G(n.prototype),"set",this).call(this,e);for(var t=this.attrs,r="",i=0,o=bd.length;i!==o;i++)void 0!==e[r=bd[i]]&&(t[r]=e[r])}},{key:"addChild",value:function(e){return vd.addChild.call(this,e)}},{key:"addChildren",value:function(e){return vd.addChildren.call(this,e)}},{key:"removeChild",value:function(e){e._stage=null;var t,n=e.descendants,r=n?n.length:0;for(t=0;t<r;t++)n[t]._stage=null;return vd.removeChild.call(this,e),this}},{key:"removeChildren",value:function(e){return vd.removeChildren.call(this,e),this}}]),n}(hd);function wd(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Q(xd,t)}var kd=dd.prototype,Md=["patternUnits","x","y","width","height","id"],_d=function(e){X(n,e);var t=ne(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};U(this,n);var i=r.type,o=void 0===i?"container":i;return(e=t.call(this,o)).set(r),e._boundingRect={},e}return Y(n,[{key:"set",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};re(G(n.prototype),"set",this).call(this,e);for(var t=this.attrs,r="",i=0,o=Md.length;i!==o;i++)void 0!==e[r=Md[i]]&&(t[r]=e[r])}},{key:"addChild",value:function(e){return kd.addChild.call(this,e)}},{key:"addChildren",value:function(e){return kd.addChildren.call(this,e)}},{key:"removeChild",value:function(e){e._stage=null;var t,n=e.descendants,r=n?n.length:0;for(t=0;t<r;t++)n[t]._stage=null;return kd.removeChild.call(this,e),this}},{key:"removeChildren",value:function(e){return kd.removeChildren.call(this,e),this}}]),n}(hd);var Sd=function(e){X(n,e);var t=ne(n);function n(){var e,r;return U(this,n),(e=r=t.call(this,"rect")).set.apply(e,arguments),r}return Y(n,[{key:"set",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.x,r=void 0===t?0:t,i=e.y,o=void 0===i?0:i,a=e.width,s=void 0===a?0:a,u=e.height,l=void 0===u?0:u,c=e.rx,f=void 0===c?0:c,h=e.ry,d=void 0===h?0:h,p=e.collider,m=F({type:"rect",x:r,y:o,width:s,height:l},p);re(G(n.prototype),"set",this).call(this,e),s>=0?(this.attrs.x=r,this.attrs.width=s):(this.attrs.x=r+s,this.attrs.width=-s),l>=0?(this.attrs.y=o,this.attrs.height=l):(this.attrs.y=o+l,this.attrs.height=-l),f>0&&(this.attrs.rx=f),d>0&&(this.attrs.ry=d),this.collider=m,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}},{key:"boundingRect",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];var t=de(this.attrs),n=e&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(t):t,r=fe(n),i=ie(r,4),o=i[0],a=i[1],s=i[2],u=i[3];return this.__boundingRect[e]={x:o,y:a,width:s-o,height:u-a},this.__boundingRect[e]}},{key:"bounds",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];var t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}]),n}(hd);var qd=function(e){X(n,e);var t=ne(n);function n(){var e,r;return U(this,n),(e=r=t.call(this,"circle")).set.apply(e,arguments),r}return Y(n,[{key:"set",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.cx,r=void 0===t?0:t,i=e.cy,o=void 0===i?0:i,a=e.r,s=void 0===a?0:a,u=e.collider,l=F({type:"circle",cx:r,cy:o,r:s},u);re(G(n.prototype),"set",this).call(this,e),this.attrs.cx=r,this.attrs.cy=o,this.attrs.r=s,this.collider=l,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}},{key:"boundingRect",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];var t=this.bounds(e);return this.__boundingRect[e]={x:t[0].x,y:t[0].y,width:t[2].x-t[0].x,height:t[2].y-t[0].y},this.__boundingRect[e]}},{key:"bounds",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];var t=this.attrs,n=t.cx,r=t.cy,i=t.r,o=t.r,a=n-i,s=r-o,u=2*i,l=2*o,c=[{x:a,y:s},{x:a+u,y:s},{x:a+u,y:s+l},{x:a,y:s+l}];if(e&&this.modelViewMatrix){var f=fe(c=this.modelViewMatrix.transformPoints(c)),h=ie(f,4),d=h[0],p=h[1],m=h[2],g=h[3];u=m-d,l=g-p,this.__bounds[e]=[{x:d,y:p},{x:d+u,y:p},{x:d+u,y:p+l},{x:d,y:p+l}]}else this.__bounds[e]=c;return this.__bounds[e]}}]),n}(hd);var Dd=function(e){X(n,e);var t=ne(n);function n(){var e,r;return U(this,n),(e=r=t.call(this,"line")).set.apply(e,arguments),r}return Y(n,[{key:"set",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.x1,r=void 0===t?0:t,i=e.y1,o=void 0===i?0:i,a=e.x2,s=void 0===a?0:a,u=e.y2,l=void 0===u?0:u,c=e.collider;re(G(n.prototype),"set",this).call(this,e),this.attrs.x1=r,this.attrs.y1=o,this.attrs.x2=s,this.attrs.y2=l;var f={type:"line",x1:r,y1:o,x2:s,y2:l};this.collider=F(f,c),this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}},{key:"boundingRect",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];var t=he(this.attrs);e&&this.modelViewMatrix&&(t=this.modelViewMatrix.transformPoints(t));var n=fe(t),r=ie(n,4),i=r[0],o=r[1],a=r[2],s=r[3],u=i!==a||o!==s;return this.__boundingRect[e]={x:i,y:o,width:u?Math.max(1,a-i):0,height:u?Math.max(1,s-o):0},this.__boundingRect[e]}},{key:"bounds",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];var t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}]),n}(hd);var Cd=Math.PI/2;function Ed(e,t){var n=Math.atan2(t.y-e.y,t.x-e.x);return n<0?n+2*Math.PI:n}function Ad(e,t,n){return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}}function Td(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=[],i=[];if("h"===n.forceOrientation){var o=e[0].x<e[1].x?-1:1,a=e[e.length-1].x>e[e.length-2].x?1:-1;e.unshift({x:e[0].x+o,y:e[0].y}),e.push({x:e[e.length-1].x+a,y:e[e.length-1].y})}else if("v"===n.forceOrientation){var s=e[0].y<e[1].y?-1:1,u=e[e.length-1].y>e[e.length-2].y?1:-1;e.unshift({x:e[0].x,y:e[0].y+s}),e.push({x:e[e.length-1].x,y:e[e.length-1].y+u})}for(var l=e.length-1,c=1;c<l;c++){var f=e[c-1],h=e[c],d=e[c+1],p=Ed(h,f),m=Ed(h,d),g=(p+m)/2,y=g+Math.PI,v=Math.max(g,y),b=Math.min(g,y),x=p>m;if(1===c){var w=Ed(f,h);r.push(Ad(f,w-Cd,t)),i.unshift(Ad(f,w+Cd,t))}var k=x?v:b,M=x?b:v;if(r.push(Ad(h,k,t)),i.unshift(Ad(h,M,t)),c===l-1){var _=Ed(d,h);r.push(Ad(d,_+Cd,t)),i.unshift(Ad(d,_-Cd,t))}}return{type:"polygon",vertices:[].concat(r,i)}}function Nd(e){for(var t,n=[],r=e.length,i=0;i<r;i++){t=e[i];for(var o=0;o<t.length;o++)n.push(t[o])}return n}function Rd(e){if(e.length<2)return!1;var t=e[0],n=e[e.length-1];return Math.abs(t.x-n.x)<1e-12&&Math.abs(t.y-n.y)<1e-12}var Od=function(e){X(n,e);var t=ne(n);function n(){var e,r;return U(this,n),(e=r=t.call(this,"path")).set.apply(e,arguments),r}return Y(n,[{key:"set",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(re(G(n.prototype),"set",this).call(this,t),this.segments=[],this.points=[],this.attrs.d=t.d,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null},Array.isArray(t.collider)||"object"===W(t.collider)&&void 0!==t.collider.type)this.collider=t.collider;else if(t.d){if(this.segments=_h(t.d),this.segments.length>1&&this.segments.every((function(e){return Rd(e)})))return void(this.collider=F({type:"geopolygon",vertices:this.segments},t.collider));this.segments.forEach((function(n){if(n.length<=1);else if(Rd(n))e.collider=F({type:"polygon",vertices:n},t.collider);else if("object"===W(t.collider)&&t.collider.visual){var r=e.attrs["stroke-width"]/2;e.collider=Td(n,r,t.collider)}else e.collider=F({type:"polyline",points:n},t.collider)}))}}},{key:"boundingRect",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];this.points.length||(this.segments=this.segments.length?this.segments:_h(this.attrs.d),this.points=Nd(this.segments));var t=e&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(this.points):this.points,n=fe(t),r=ie(n,4),i=r[0],o=r[1],a=r[2],s=r[3];return this.__boundingRect[e]={x:i||0,y:o||0,width:a-i||0,height:s-o||0},this.__boundingRect[e]}},{key:"bounds",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];var t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}]),n}(hd);function Id(e){var t=e.data,n=e._boundingRect,r=e._textBoundsFn;return null!=t&&(n||r)}var Pd=function(e){X(n,e);var t=ne(n);function n(){var e,r;return U(this,n),(e=r=t.call(this,"text")).set.apply(e,arguments),r}return Y(n,[{key:"set",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.x,r=void 0===t?0:t,i=e.y,o=void 0===i?0:i,a=e.dx,s=void 0===a?0:a,u=e.dy,l=void 0===u?0:u,c=e.textBoundsFn,f=e.text,h=e.title,d=e.collider,p=e.boundingRect,m=e.ellipsed;re(G(n.prototype),"set",this).call(this,e),this.attrs.x=r,this.attrs.y=o,this.attrs.dx=s,this.attrs.dy=l,this.attrs.text=f,void 0!==h&&(this.attrs.title=String(h)),"object"===W(p)?this._textBoundsFn=function(){return p}:"function"==typeof c&&(this._textBoundsFn=c),"string"==typeof m&&(this.ellipsed=m),this.collider=F({type:Id(this)?"bounds":null},d),this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}},{key:"boundingRect",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];if("function"!=typeof this._textBoundsFn)return{x:0,y:0,width:0,height:0};var t=de(this._textBoundsFn(this.attrs)),n=e&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(t):t,r=fe(n),i=ie(r,4),o=i[0],a=i[1],s=i[2],u=i[3];return this.__boundingRect[e]={x:o,y:a,width:s-o,height:u-a},this.__boundingRect[e]}},{key:"bounds",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];var t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}]),n}(hd);var Ld=kt();function jd(e,t){return Ld.get(e)(t)}Ld.add("rect",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Q(Sd,t)})),Ld.add("circle",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Q(qd,t)})),Ld.add("text",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Q(Pd,t)})),Ld.add("line",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Q(Dd,t)})),Ld.add("path",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Q(Od,t)})),Ld.add("stage",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Q(yd,t)})),Ld.add("container",gd),Ld.add("defs",gd),Ld.add("linearGradient",wd),Ld.add("radialGradient",wd),Ld.add("stop",wd),Ld.add("pattern",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Q(_d,t)}));var zd=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[{}];function n(){return t[t.length-1]}return n.save=function(){for(var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n(),o={},a="",s=0;s<e.length;s++)void 0!==i[a=e[s]]&&(o[a]=i[a]);return F(o,r),t.push(o),n()},n.restore=function(){t.splice(t.length-1,1)},n}(["stroke","fill","strokeWidth","opacity","fontFamily","fontSize","baseline"]);function Fd(e,t){if(Array.isArray(t))for(var n=0,r=t.length;n<r;n++)t[n](e)}function Hd(e,t,n){e.node=n[t],e.index=t}function Bd(e,t,n,r){for(var i={siblings:e,node:null,index:0},o=0,a=e.length;o<a;o++)if(Hd(i,o,e),Fd(i,r.create),!("function"==typeof i.node.disabled?i.node.disabled():i.node.disabled)){i.node=zd.save(i.node);var s=jd(i.node.type,i.node);s&&(i.node.transform&&(n.save(),Gh(i.node.transform,n)),n.isIdentity()||(s.modelViewMatrix=n.clone()),t.addChild(s),i.node.children&&Bd(i.node.children,s,n,r),i.node.transform&&n.restore()),zd.restore()}}function Vd(e){var t=e.items,n=e.stage,r=e.dpi,i=e.on,o=void 0===i?{}:i;return n||(n=jd("stage",r)),Bd(t,n,new Wh,o),n}function Wd(e,t,n){var r=n.orientation,i=n.degree,o=n.stops,a=void 0===o?[]:o,s=null;if("radial"===r){var u=t.boundingRect();s=e.createRadialGradient(u.x+u.width/2,u.y+u.height/2,1e-5,u.x+u.width/2,u.y+u.height/2,Math.max(u.width,u.height)/2)}else{var l=za(i);["x1","x2","y1","y2"].forEach((function(e){e in n&&(l[e]=n[e])}));var c=t.boundingRect();s=e.createLinearGradient(c.x+l.x1*c.width,c.y+l.y1*c.height,c.x+l.x2*c.width,c.y+l.y2*c.height)}for(var f=0,h=a.length;f<h;f++){var d=a[f];s.addColorStop(d.offset,d.color)}return s}function Ud(e,t,n){return t.width=e.width,t.height=e.height,n.save(),n.fillStyle=e.fill,e.shapes.forEach((function(e){switch(e.type){case"rect":n.rect(e.x,e.y,e.width,e.height)}})),n.fill(),n.restore(),n.createPattern(t,"repeat")}function $d(e){var t=e.createElement("canvas"),n=t.getContext("2d"),r={};return{create:function(e){var i=e.key;return i?(r[i]=r[i]||Ud(e,t,n),r[i]):Ud(e,t,n)},clear:function(){r={}}}}function Yd(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.x,n=e.y,r=e.width,i=e.height,o=e.scaleRatio,a=e.margin,s=e.edgeBleed,u={x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1},margin:{left:0,top:0},edgeBleed:{left:0,right:0,top:0,bottom:0,bool:!1}};return u.x=isNaN(t)?u.x:t,u.y=isNaN(n)?u.y:n,u.width=isNaN(r)?u.width:r,u.height=isNaN(i)?u.height:i,void 0!==o&&(u.scaleRatio.x=isNaN(o.x)?u.scaleRatio.x:o.x,u.scaleRatio.y=isNaN(o.y)?u.scaleRatio.y:o.y),void 0!==a&&(u.margin.left=isNaN(a.left)?0:a.left,u.margin.top=isNaN(a.top)?0:a.top),"object"===W(s)&&["left","right","top","bottom"].forEach((function(e){!isNaN(s[e])&&s[e]>0&&(u.edgeBleed[e]=s[e],u.edgeBleed.bool=!0)})),u.computedPhysical={x:Math.round(u.margin.left+(u.x-u.edgeBleed.left)*u.scaleRatio.x),y:Math.round(u.margin.top+(u.y-u.edgeBleed.top)*u.scaleRatio.y),width:Math.round((u.width+u.edgeBleed.left+u.edgeBleed.right)*u.scaleRatio.x),height:Math.round((u.height+u.edgeBleed.top+u.edgeBleed.bottom)*u.scaleRatio.y)},u}function Kd(){var e={element:function(){},root:function(){},settings:function(){},appendTo:function(){},getScene:function(){return[]},render:function(){return!1},itemsAt:function(){return[]},findShapes:function(){return[]},clear:function(){},destory:function(){},size:function(){},measureText:yf,textBounds:bf,setKey:function(t){e.element().setAttribute("data-key",t)}};return e}function Xd(e){return function(t){var n=t.node;"text"===n.type&&function(e){return null!=e}(n.data)&&!n.textBoundsFn&&(n.textBoundsFn=e.textBounds)}}var Gd=200,Jd=200,Zd=function(){function e(t){U(this,e),this.targetCanvas=t,this.bufferCanvas=t.cloneNode()}return Y(e,[{key:"updateSize",value:function(e){var t,n=e.rect,r=e.dpiRatio,i=e.canvasBufferSize;t=i?"function"==typeof i?i(n):i:{width:n.computedPhysical.width+2*Gd,height:n.computedPhysical.height+2*Jd},this.bufferCanvas.style.width="".concat(t.width,"px"),this.bufferCanvas.style.height="".concat(t.height,"px"),this.bufferCanvas.width=Math.round(t.width*r),this.bufferCanvas.height=Math.round(t.height*r)}},{key:"apply",value:function(){this.targetCanvas.getContext("2d").drawImage(this.bufferCanvas,0,0)}},{key:"clear",value:function(){this.bufferCanvas.width=this.bufferCanvas.width}},{key:"getContext",value:function(){return this.bufferCanvas.getContext("2d")}}]),e}(),Qd=kt();function ep(e){return Array.isArray(e)?e:"string"==typeof e?-1!==e.indexOf(",")?e.split(","):e.split(" "):[]}function tp(e){return("undefined"==typeof window?1:window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)}function np(e,t){t.setTransform(e[0][0],e[1][0],e[0][1],e[1][1],e[0][2],e[1][2])}function rp(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=Object.keys(r),o=0,a=n.length;o<a;o++){var s=n[o],u=s[0],l=s[1],c=s[2];if(u in t.attrs&&!(l in r)&&e[l]!==t.attrs[u]){var f=c?c(t.attrs[u]):t.attrs[u];"function"==typeof e[l]?e[l](f):e[l]=f}}for(var h=0,d=i.length;h<d;h++){var p=i[h];e[p]=r[p]}}function ip(e,t,n,r){for(var i=0,o=e.length;i<o;i++){var a=e[i],s={};t.save(),a.attrs&&(a.attrs.fill||a.attrs.stroke)&&(a.attrs.fill&&"object"===W(a.attrs.fill)&&"gradient"===a.attrs.fill.type?s.fillStyle=Wd(t,a,a.attrs.fill):a.attrs.fill&&"object"===W(a.attrs.fill)&&"pattern"===a.attrs.fill.type&&(s.fillStyle=r.patterns.create(a.attrs.fill)),a.attrs.stroke&&"object"===W(a.attrs.stroke)&&"gradient"===a.attrs.stroke.type?s.strokeStyle=Wd(t,a,a.attrs.stroke):a.attrs.stroke&&"object"===W(a.attrs.stroke)&&"pattern"===a.attrs.stroke.type&&(s.strokeStyle=r.patterns.create(a.attrs.stroke))),rp(t,a,n,s),a.modelViewMatrix&&np(a.modelViewMatrix.elements,t),Qd.has(a.type)&&Qd.get(a.type)(a.attrs,{g:t,doFill:"fill"in a.attrs&&"none"!==a.attrs.fill,doStroke:"stroke"in a.attrs&&0!==a.attrs["stroke-width"],ellipsed:a.ellipsed}),a.children&&ip(a.children,t,n,r),t.restore()}}function op(e){var t=e.el,n=e.dpiRatio,r=e.transform;if("object"===W(r)){var i=[r.horizontalScaling,r.horizontalSkewing,r.verticalSkewing,r.verticalScaling,r.horizontalMoving*n,r.verticalMoving*n],o=t.getContext("2d");o.setTransform.apply(o,i)}}function ap(){var e,t,n,r,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Vd,o={transform:void 0,canvasBufferSize:void 0},a=!1,s=Yd(),u=[["fill","fillStyle"],["stroke","strokeStyle"],["opacity","globalAlpha"],["globalAlpha","globalAlpha"],["stroke-width","lineWidth"],["stroke-linejoin","lineJoin"],["stroke-dasharray","setLineDash",ep]],l=Kd();return l.element=function(){return e},l.root=function(){return e},l.settings=function(e){return e&&Object.keys(o).forEach((function(t){void 0!==e[t]&&(o[t]=e[t])})),o},l.appendTo=function(n){return e||((e=n.ownerDocument.createElement("canvas")).style.position="absolute",e.style["-webkit-font-smoothing"]="antialiased",e.style["-moz-osx-font-smoothing"]="antialiased",e.style.pointerEvents="none"),"function"!=typeof o.transform||t||(t=new Zd(e)),n.appendChild(e),e},l.getScene=function(n){var r=tp(t&&t.getContext()||e.getContext("2d")),o=s.scaleRatio.x,a=s.scaleRatio.y,u={type:"container",children:n,transform:s.edgeBleed.bool?"translate(".concat(s.edgeBleed.left*r*o,", ").concat(s.edgeBleed.top*r*a,")"):""};return 1===r&&1===o&&1===a||(u.transform+="scale(".concat(r*o,", ").concat(r*a,")")),i({items:[u],dpi:r,on:{create:[uf(l.measureText),Xd(l)]}})},l.render=function(i){if(!e)return!1;r||(r=$d(e.ownerDocument));var c=t&&t.getContext()||e.getContext("2d"),f=tp(c),h=t&&o.transform();if(h)return e.width=e.width,op({el:e,dpiRatio:f,transform:h}),t.apply(),!0;a&&(e.style.left="".concat(s.computedPhysical.x,"px"),e.style.top="".concat(s.computedPhysical.y,"px"),e.style.width="".concat(s.computedPhysical.width,"px"),e.style.height="".concat(s.computedPhysical.height,"px"),e.width=Math.round(s.computedPhysical.width*f),e.height=Math.round(s.computedPhysical.height*f),t&&t.updateSize({rect:s,dpiRatio:f,canvasBufferSize:o.canvasBufferSize}));var d=l.getScene(i),p=!n||!d.equals(n);r.clear();var m=a||p;return m&&(l.clear(),ip(d.children,c,u,{patterns:r})),t&&(e.width=e.width,t.apply()),a=!1,n=d,m},l.itemsAt=function(e){return n?n.getItemsFrom(e):[]},l.findShapes=function(e){return n?n.findShapes(e):[]},l.clear=function(){return e&&(e.width=e.width),t&&t.clear(),n=null,l},l.size=function(e){if(e){var t=Yd(e);JSON.stringify(s)!==JSON.stringify(t)&&(a=!0,s=t)}return s},l.destroy=function(){e&&(e.parentElement&&e.parentElement.removeChild(e),e=null),t&&(t=null),n=null},l}function sp(e,t){Qd.add(e,t)}function up(e,t){return Math.max(0,Math.min(e,t))}var lp=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),cp=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),fp=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]");function hp(e){return lp.test(e)}function dp(e){return cp.test(e)||fp.test(e)}function pp(e){var t,n,r=e?e.length:0;for(t=0;t<r;t++){if(hp(n=e[t]))return"ltr";if(dp(n))return"rtl"}return"ltr"}var mp={start:"end",end:"start",center:"center",middle:"middle"};function gp(e,t){return"rtl"===t?mp[e]:e}function yp(e,t){var n,r,i,o=[],a=[],s=[],u=[],l=function(e){return e.id},c=function(e,t){var n;return n="object"===W(e)?"id"in e?e.id:t:e,{content:e,id:"".concat(n,"__").concat(e.type||"")}};e.isTree||(e=e.map(c)),t=t.map(c),r=e.map(l),i=t.map(l);for(var f=0,h=t.length;f<h;f++){-1===r.indexOf(t[f].id)?o.push(t[f]):s.push(t[f])}for(var d=0,p=e.length;d<p;d++){-1===i.indexOf(e[d].id)?a.push(e[d]):u.push(e[d])}for(var m=0,g=o.length;m<g;m++)o[m].content.children&&(o[m].diff=yp([],o[m].content.children),o[m].children=o[m].diff.updatedNew.concat(o[m].diff.added),o[m].children.isTree=!0);for(var y=0,v=s.length;y<v;y++)s[y].diff=yp(u[y].children||[],s[y].content.children||[]),s[y].object=u[y].object,s[y].children=s[y].diff.items;return n=s.concat(o),o.isTree=!0,a.isTree=!0,s.isTree=!0,u.isTree=!0,n.isTree=!0,{added:o,updatedNew:s,updatedOld:u,removed:a,items:n}}function vp(e,t,n){for(var r=0,i=e.length;r<i;r++)e[r].object=n(e[r].content.type,t)}function bp(e,t){for(var n=0,r=e.length;n<r;n++)null!==e[n].object&&void 0!==e[n].object&&(t(e[n].object),e[n].object=null)}function xp(e,t,n,r){for(var i,o=0,a=e.length;o<a;o++)null!==(i=e[o]).object&&void 0!==i.object&&(n(i.object,i.content),i.diff&&(vp(i.diff.added,i.object,t),bp(i.diff.removed,r),xp(i.diff.items,t,n,r)))}function wp(e,t,n,r,i,o){var a=yp(e,t);return vp(a.added,n,r),bp(a.removed,o),xp(a.items,r,i,o),a.items}sp("rect",(function(e,t){var n=t.g,r=t.doFill,i=t.doStroke;n.beginPath(),e.rx>0||e.ry>0?function(e,t,n,r,i,o,a){o=up(r/2,o>0?o:a),a=up(i/2,a>0?a:o),e.moveTo(t,n+a),e.lineTo(t,n+i-a),e.quadraticCurveTo(t,n+i,t+o,n+i),e.lineTo(t+r-o,n+i),e.quadraticCurveTo(t+r,n+i,t+r,n+i-a),e.lineTo(t+r,n+a),e.quadraticCurveTo(t+r,n,t+r-o,n),e.lineTo(t+o,n),e.quadraticCurveTo(t,n,t,n+a)}(n,e.x,e.y,e.width,e.height,e.rx,e.ry):n.rect(e.x,e.y,e.width,e.height),r&&n.fill(),i&&n.stroke()})),sp("circle",(function(e,t){var n=t.g,r=t.doFill,i=t.doStroke;n.beginPath(),n.moveTo(e.cx+e.r,e.cy),n.arc(e.cx,e.cy,e.r,0,2*Math.PI,!1),r&&n.fill(),i&&n.stroke()})),sp("line",(function(e,t){var n=t.g,r=t.doStroke;n.beginPath(),n.moveTo(e.x1,e.y1),n.lineTo(e.x2,e.y2),r&&n.stroke()})),sp("path",(function(e,t){var n=t.g,r=t.doStroke,i=t.doFill,o=new Path2D(e.d);i&&n.fill(o),r&&n.stroke(o)})),sp("text",(function(e,t){var n=t.g,r=t.ellipsed||lf(e,yf);n.font="".concat(e["font-size"]," ").concat(e["font-family"]);var i=pp(e.text);n.canvas.dir!==i&&(n.canvas.dir=i);var o=gp("middle"===e["text-anchor"]?"center":e["text-anchor"],n.canvas.dir);o&&n.textAlign!==o&&(n.textAlign=o);var a=cf(e);n.fillText(r,e.x+e.dx,e.y+e.dy+a)}));var kp="http://www.w3.org/2000/svg",Mp=function(e,t){if(!e||"string"!=typeof e)throw new Error("Invalid type: ".concat(e));var n=t.ownerDocument.createElementNS(kp,"container"===e?"g":e);return t.appendChild(n),n},_p=function(e){e.parentNode&&e.parentNode.removeChild(e)},Sp=function(e,t){if(function(e){switch(e.type){case"circle":return!isNaN(e.attrs.cx)&&!isNaN(e.attrs.cy)&&!isNaN(e.attrs.r);case"line":return!(isNaN(e.attrs.x1)||isNaN(e.attrs.y1)||isNaN(e.attrs.x2)||isNaN(e.attrs.y2));case"rect":return!(isNaN(e.attrs.x)||isNaN(e.attrs.y)||isNaN(e.attrs.width)||isNaN(e.attrs.height));case"text":return!isNaN(e.attrs.x)&&!isNaN(e.attrs.y);default:return!0}}(t)){for(var n in t.attrs)if("stroke"===n&&t.strokeReference)e.setAttribute("stroke",t.strokeReference);else if("fill"===n&&t.fillReference)e.setAttribute("fill",t.fillReference);else if("text"===n){e.setAttribute("style","white-space: pre"),e.textContent=t.ellipsed||lf(t.attrs,yf);var r=pp(t.attrs.text);"rtl"===r&&(e.setAttribute("direction","rtl"),e.setAttribute("dir","rtl"),e.setAttribute("text-anchor",gp(e.getAttribute("text-anchor"),r)))}else if("text"!==t.type||"dy"!==n&&"dominant-baseline"!==n)if("text"===t.type&&"title"===n&&t.attrs.title){var i=e.ownerDocument.createElementNS(kp,"title");i.textContent=t.attrs.title,e.appendChild(i)}else e.setAttribute(n,t.attrs[n]);else{var o=+e.getAttribute(n)||0,a=0;a="dominant-baseline"===n?cf(t.attrs):t.attrs[n],e.setAttribute("dy",a+o)}if("string"==typeof t.data||"number"==typeof t.data||"boolean"==typeof t.data)e.setAttribute("data",t.data);else if("object"===W(t.data)&&null!==t.data)for(var s in t.data)"string"!=typeof t.data[s]&&"number"!=typeof t.data[s]&&"boolean"!=typeof t.data[s]||e.setAttribute("data-".concat(s),t.data[s])}},qp=function(){function e(t,n,r,i){U(this,e),this.create=t,this.nodeCreator=n,this.nodeMaintainer=r,this.nodeDestroyer=i}return Y(e,[{key:"render",value:function(e,t){return this.create([],e,t,this.nodeCreator,this.nodeMaintainer,this.nodeDestroyer)}}]),e}();function Dp(){return new qp(wp,Mp,Sp,_p)}function Cp(e){var t,n,r=0;if(0===(e=JSON.stringify(e)).length)return r;for(t=0,n=e.length;t<n;t++)r=(r<<5)-r+e.charCodeAt(t),r&=r;return r}function Ep(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Cp,n={},r=Date.now(),i={getOrCreateGradient:function(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"fill",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",s=t(i[o]),u="picasso-gradient-".concat(r,"-").concat(s);if(!n[s]){var l=i[o],c=l.orientation,f=l.degree,h=l.stops,d=void 0===h?[]:h,p={};void 0===f&&(f=90),"radial"===c?p.type="radialGradient":(p=za(f),["x1","x2","y1","y2"].forEach((function(e){e in i[o]&&(p[e]=i[o][e])})),p.type="linearGradient"),p.id=u,p.children=d.map((function(e){var t=e.offset,n=e.color,r=e.opacity;return{type:"stop",offset:"".concat(100*t,"%"),style:"stop-color:".concat(n,";stop-opacity:").concat(void 0!==r?r:1)}})),e.push(p),n[s]=u}return"url('".concat(a,"#").concat(u,"')")},onCreate:function(e){var t="";"undefined"!=typeof window&&(t=window.location.href.split("#")[0]);var n=e.node;n.fill&&"object"===W(n.fill)&&"gradient"===n.fill.type&&(n.fillReference=i.getOrCreateGradient(n,"fill",t)),n.stroke&&"object"===W(n.stroke)&&"gradient"===n.stroke.type&&(n.strokeReference=i.getOrCreateGradient(n,"stroke",t))},clear:function(){n={}}};return i}function Ap(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Cp,n={},r=Date.now(),i={onCreate:function(i){var o={};i.node&&"object"===W(i.node.fill)&&"pattern"===i.node.fill.type&&i.node.fill.shapes&&(o.fill=i.node.fill),i.node&&"object"===W(i.node.stroke)&&"pattern"===i.node.stroke.type&&i.node.stroke.shapes&&(o.stroke=i.node.stroke),Object.keys(o).forEach((function(a){var s="",u=o[a],l=t(u),c="picasso-pattern-".concat(r,"-").concat(l);if("undefined"!=typeof window&&(s=window.location.href.split("#")[0]),!n[l]){var f={patternUnits:"userSpaceOnUse",x:0,y:0,width:u.width,height:u.height,type:"pattern",id:c,children:[],fill:u.fill};u.shapes.forEach((function(e){f.children.push(e)})),e.push(f),n[l]=!0}i.node["".concat(a,"Reference")]="url('".concat(s,"#").concat(c,"')")}))},clear:function(){n={}}};return i}function Tp(){var e,t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Dp,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:kp,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Vd,a=r(),s=!1,u=Yd(),l={transform:void 0},c=Kd(),f={type:"defs",children:[]},h=Ap(f.children),d=Ep(f.children);return c.element=function(){return e},c.root=function(){return t},c.settings=function(e){return e&&Object.keys(l).forEach((function(t){void 0!==e[t]&&(l[t]=e[t])})),l},c.appendTo=function(n){return e||((e=n.ownerDocument.createElementNS(i,"svg")).style.position="absolute",e.style["-webkit-font-smoothing"]="antialiased",e.style["-moz-osx-font-smoothing"]="antialiased",e.style.pointerEvents="none",e.setAttribute("xmlns",i),(t=n.ownerDocument.createElementNS(i,"g")).style.pointerEvents="auto",e.appendChild(t)),n.appendChild(e),e},c.getScene=function(e){var t=u.scaleRatio.x,n=u.scaleRatio.y,r={type:"container",children:Array.isArray(e)?[].concat(oe(e),[f]):e,transform:u.edgeBleed.bool?"translate(".concat(u.edgeBleed.left*t,", ").concat(u.edgeBleed.top*n,")"):""};return 1===t&&1===n||(r.transform+="scale(".concat(t,", ").concat(n,")")),o({items:[r],on:{create:[function(e){e.node.fillReference=void 0,e.node.strokeReference=void 0},d.onCreate,h.onCreate,uf(c.measureText),Xd(c)]}})},c.render=function(r){if(!e)return!1;var i="function"==typeof l.transform&&l.transform();if(i){var o=i.a,p=i.b,m=i.c,g=i.d,y=i.e,v=i.f;return t.style.transform="matrix(".concat(o,", ").concat(p,", ").concat(m,", ").concat(g,", ").concat(y,", ").concat(v,")"),!0}t.style.transform="",s&&(e.style.left="".concat(u.computedPhysical.x,"px"),e.style.top="".concat(u.computedPhysical.y,"px"),e.setAttribute("width",u.computedPhysical.width),e.setAttribute("height",u.computedPhysical.height)),d.clear(),h.clear(),f.children.length=0;var b=c.getScene(r),x=!n||!b.equals(n),w=s||x;return w&&(c.clear(),a.render(b.children,t)),s=!1,n=b,w},c.itemsAt=function(e){return n?n.getItemsFrom(e):[]},c.findShapes=function(e){return n?n.findShapes(e):[]},c.clear=function(){if(!t)return c;n=null;var r=t.cloneNode(!1);return e.replaceChild(r,t),t=r,c},c.destroy=function(){e&&e.parentNode&&e.parentNode.removeChild(e),e=null,t=null},c.size=function(e){if(e){var t=Yd(e);JSON.stringify(u)!==JSON.stringify(t)&&(s=!0,u=t)}return u},c}var Np,Rp,Op,Ip,Pp,Lp,jp={},zp=[],Fp=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Hp(e,t){for(var n in t)e[n]=t[n];return e}function Bp(e){var t=e.parentNode;t&&t.removeChild(e)}function Vp(e,t,n){var r,i,o,a={};for(o in t)"key"==o?r=t[o]:"ref"==o?i=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?Np.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===a[o]&&(a[o]=e.defaultProps[o]);return Wp(e,a,r,i,null)}function Wp(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++Op:i};return null==i&&null!=Rp.vnode&&Rp.vnode(o),o}function Up(e){return e.children}function $p(e,t){this.props=e,this.context=t}function Yp(e,t){if(null==t)return e.__?Yp(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?Yp(e):null}function Kp(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return Kp(e)}}function Xp(e){(!e.__d&&(e.__d=!0)&&Ip.push(e)&&!Gp.__r++||Lp!==Rp.debounceRendering)&&((Lp=Rp.debounceRendering)||Pp)(Gp)}function Gp(){for(var e;Gp.__r=Ip.length;)e=Ip.sort((function(e,t){return e.__v.__b-t.__v.__b})),Ip=[],e.some((function(e){var t,n,r,i,o,a;e.__d&&(o=(i=(t=e).__v).__e,(a=t.__P)&&(n=[],(r=Hp({},i)).__v=i.__v+1,im(a,i,r,t.__n,void 0!==a.ownerSVGElement,null!=i.__h?[o]:null,n,null==o?Yp(i):o,i.__h),om(n,i),i.__e!=o&&Kp(i)))}))}function Jp(e,t,n,r,i,o,a,s,u,l){var c,f,h,d,p,m,g,y=r&&r.__k||zp,v=y.length;for(n.__k=[],c=0;c<t.length;c++)if(null!=(d=n.__k[c]=null==(d=t[c])||"boolean"==typeof d?null:"string"==typeof d||"number"==typeof d||"bigint"==typeof d?Wp(null,d,null,null,d):Array.isArray(d)?Wp(Up,{children:d},null,null,null):d.__b>0?Wp(d.type,d.props,d.key,null,d.__v):d)){if(d.__=n,d.__b=n.__b+1,null===(h=y[c])||h&&d.key==h.key&&d.type===h.type)y[c]=void 0;else for(f=0;f<v;f++){if((h=y[f])&&d.key==h.key&&d.type===h.type){y[f]=void 0;break}h=null}im(e,d,h=h||jp,i,o,a,s,u,l),p=d.__e,(f=d.ref)&&h.ref!=f&&(g||(g=[]),h.ref&&g.push(h.ref,null,d),g.push(f,d.__c||p,d)),null!=p?(null==m&&(m=p),"function"==typeof d.type&&d.__k===h.__k?d.__d=u=Zp(d,u,e):u=Qp(e,d,h,y,p,u),"function"==typeof n.type&&(n.__d=u)):u&&h.__e==u&&u.parentNode!=e&&(u=Yp(h))}for(n.__e=m,c=v;c--;)null!=y[c]&&("function"==typeof n.type&&null!=y[c].__e&&y[c].__e==n.__d&&(n.__d=Yp(r,c+1)),um(y[c],y[c]));if(g)for(c=0;c<g.length;c++)sm(g[c],g[++c],g[++c])}function Zp(e,t,n){for(var r,i=e.__k,o=0;i&&o<i.length;o++)(r=i[o])&&(r.__=e,t="function"==typeof r.type?Zp(r,t,n):Qp(n,r,r,i,r.__e,t));return t}function Qp(e,t,n,r,i,o){var a,s,u;if(void 0!==t.__d)a=t.__d,t.__d=void 0;else if(null==n||i!=o||null==i.parentNode)e:if(null==o||o.parentNode!==e)e.appendChild(i),a=null;else{for(s=o,u=0;(s=s.nextSibling)&&u<r.length;u+=2)if(s==i)break e;e.insertBefore(i,o),a=o}return void 0!==a?a:i.nextSibling}function em(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]=null==n?"":"number"!=typeof n||Fp.test(t)?n:n+"px"}function tm(e,t,n,r,i){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||em(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||em(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r||e.addEventListener(t,o?rm:nm,o):e.removeEventListener(t,o?rm:nm,o);else if("dangerouslySetInnerHTML"!==t){if(i)t=t.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null!=n&&(!1!==n||"a"===t[0]&&"r"===t[1])?e.setAttribute(t,n):e.removeAttribute(t))}}function nm(e){this.l[e.type+!1](Rp.event?Rp.event(e):e)}function rm(e){this.l[e.type+!0](Rp.event?Rp.event(e):e)}function im(e,t,n,r,i,o,a,s,u){var l,c,f,h,d,p,m,g,y,v,b,x=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(u=n.__h,s=t.__e=n.__e,t.__h=null,o=[s]),(l=Rp.__b)&&l(t);try{e:if("function"==typeof x){if(g=t.props,y=(l=x.contextType)&&r[l.__c],v=l?y?y.props.value:l.__:r,n.__c?m=(c=t.__c=n.__c).__=c.__E:("prototype"in x&&x.prototype.render?t.__c=c=new x(g,v):(t.__c=c=new $p(g,v),c.constructor=x,c.render=lm),y&&y.sub(c),c.props=g,c.state||(c.state={}),c.context=v,c.__n=r,f=c.__d=!0,c.__h=[]),null==c.__s&&(c.__s=c.state),null!=x.getDerivedStateFromProps&&(c.__s==c.state&&(c.__s=Hp({},c.__s)),Hp(c.__s,x.getDerivedStateFromProps(g,c.__s))),h=c.props,d=c.state,f)null==x.getDerivedStateFromProps&&null!=c.componentWillMount&&c.componentWillMount(),null!=c.componentDidMount&&c.__h.push(c.componentDidMount);else{if(null==x.getDerivedStateFromProps&&g!==h&&null!=c.componentWillReceiveProps&&c.componentWillReceiveProps(g,v),!c.__e&&null!=c.shouldComponentUpdate&&!1===c.shouldComponentUpdate(g,c.__s,v)||t.__v===n.__v){c.props=g,c.state=c.__s,t.__v!==n.__v&&(c.__d=!1),c.__v=t,t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),c.__h.length&&a.push(c);break e}null!=c.componentWillUpdate&&c.componentWillUpdate(g,c.__s,v),null!=c.componentDidUpdate&&c.__h.push((function(){c.componentDidUpdate(h,d,p)}))}c.context=v,c.props=g,c.state=c.__s,(l=Rp.__r)&&l(t),c.__d=!1,c.__v=t,c.__P=e,l=c.render(c.props,c.state,c.context),c.state=c.__s,null!=c.getChildContext&&(r=Hp(Hp({},r),c.getChildContext())),f||null==c.getSnapshotBeforeUpdate||(p=c.getSnapshotBeforeUpdate(h,d)),b=null!=l&&l.type===Up&&null==l.key?l.props.children:l,Jp(e,Array.isArray(b)?b:[b],t,n,r,i,o,a,s,u),c.base=t.__e,t.__h=null,c.__h.length&&a.push(c),m&&(c.__E=c.__=null),c.__e=!1}else null==o&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=am(n.__e,t,n,r,i,o,a,u);(l=Rp.diffed)&&l(t)}catch(e){t.__v=null,(u||null!=o)&&(t.__e=s,t.__h=!!u,o[o.indexOf(s)]=null),Rp.__e(e,t,n)}}function om(e,t){Rp.__c&&Rp.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){Rp.__e(e,t.__v)}}))}function am(e,t,n,r,i,o,a,s){var u,l,c,f=n.props,h=t.props,d=t.type,p=0;if("svg"===d&&(i=!0),null!=o)for(;p<o.length;p++)if((u=o[p])&&(u===e||(d?u.localName==d:3==u.nodeType))){e=u,o[p]=null;break}if(null==e){if(null===d)return document.createTextNode(h);e=i?document.createElementNS("http://www.w3.org/2000/svg",d):document.createElement(d,h.is&&h),o=null,s=!1}if(null===d)f===h||s&&e.data===h||(e.data=h);else{if(o=o&&Np.call(e.childNodes),l=(f=n.props||jp).dangerouslySetInnerHTML,c=h.dangerouslySetInnerHTML,!s){if(null!=o)for(f={},p=0;p<e.attributes.length;p++)f[e.attributes[p].name]=e.attributes[p].value;(c||l)&&(c&&(l&&c.__html==l.__html||c.__html===e.innerHTML)||(e.innerHTML=c&&c.__html||""))}if(function(e,t,n,r,i){var o;for(o in n)"children"===o||"key"===o||o in t||tm(e,o,null,n[o],r);for(o in t)i&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||n[o]===t[o]||tm(e,o,t[o],n[o],r)}(e,h,f,i,s),c)t.__k=[];else if(p=t.props.children,Jp(e,Array.isArray(p)?p:[p],t,n,r,i&&"foreignObject"!==d,o,a,o?o[0]:n.__k&&Yp(n,0),s),null!=o)for(p=o.length;p--;)null!=o[p]&&Bp(o[p]);s||("value"in h&&void 0!==(p=h.value)&&(p!==e.value||"progress"===d&&!p)&&tm(e,"value",p,f.value,!1),"checked"in h&&void 0!==(p=h.checked)&&p!==e.checked&&tm(e,"checked",p,f.checked,!1))}return e}function sm(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){Rp.__e(e,n)}}function um(e,t,n){var r,i;if(Rp.unmount&&Rp.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||sm(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){Rp.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&um(r[i],t,"function"!=typeof e.type);n||null==e.__e||Bp(e.__e),e.__e=e.__d=void 0}function lm(e,t,n){return this.constructor(e,n)}function cm(e,t,n){var r,i,o;Rp.__&&Rp.__(e,t),i=(r="function"==typeof n)?null:n&&n.__k||t.__k,o=[],im(t,e=(!r&&n||t).__k=Vp(Up,null,[e]),i||jp,jp,void 0!==t.ownerSVGElement,!r&&n?[n]:i?null:t.firstChild?Np.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r),om(o,e)}function fm(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.createElement,i=void 0===r?document.createElement.bind(document):r,o=Yd(),a={transform:void 0},s=Kd();return s.element=function(){return e},s.root=function(){return e},s.settings=function(e){return e&&Object.keys(a).forEach((function(t){void 0!==e[t]&&(a[t]=e[t])})),a},s.appendTo=function(t){return e||((e=i("div")).style.position="absolute",e.style["-webkit-font-smoothing"]="antialiased",e.style["-moz-osx-font-smoothing"]="antialiased",e.style.pointerEvents="none"),t.appendChild(e),e},s.render=function(n){if(!e)return!1;var r,i="function"==typeof a.transform&&a.transform();if(i){var s=i.a,u=i.b,l=i.c,c=i.d,f=i.e,h=i.f;return e.style.transform="matrix(".concat(s,", ").concat(u,", ").concat(l,", ").concat(c,", ").concat(f,", ").concat(h,")"),!0}return e.style.transform="",e.style.left="".concat(o.computedPhysical.x,"px"),e.style.top="".concat(o.computedPhysical.y,"px"),e.style.width="".concat(o.computedPhysical.width,"px"),e.style.height="".concat(o.computedPhysical.height,"px"),r=Array.isArray(n)?Vp("div",null,n):n,t=cm(r,e,t),!0},s.renderArgs=[Vp],s.clear=function(){if(e){for(var n=e.firstChild;n;)e.removeChild(n),n=e.firstChild;t=null}return s},s.destroy=function(){e&&e.parentElement&&e.parentElement.removeChild(e),e=null,t=null},s.size=function(e){return e&&(o=Yd(e)),o},s}Np=zp.slice,Rp={__e:function(e,t){for(var n,r,i;t=t.__;)if((n=t.__c)&&!n.__)try{if((r=n.constructor)&&null!=r.getDerivedStateFromError&&(n.setState(r.getDerivedStateFromError(e)),i=n.__d),null!=n.componentDidCatch&&(n.componentDidCatch(e),i=n.__d),i)return n.__E=n}catch(t){e=t}throw e}},Op=0,$p.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=Hp({},this.state),"function"==typeof e&&(e=e(Hp({},n),this.props)),e&&Hp(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),Xp(this))},$p.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Xp(this))},$p.prototype.render=Up,Ip=[],Pp="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Gp.__r=0;var hm=[function(e){e.renderer("svg",Tp)},function(e){e.renderer("canvas",ap)},function(e){e.renderer("dom",fm)}],dm={OFF:0,ERROR:1,WARN:2,INFO:3,DEBUG:4},pm=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.level,r=void 0===n?dm.OFF:n,i=t.pipe,o=void 0===i?console:i,a=r,s=(K(e={},dm.OFF,(function(){})),K(e,dm.ERROR,(function(){return o.error.apply(o,arguments)})),K(e,dm.WARN,(function(){return o.warn.apply(o,arguments)})),K(e,dm.INFO,(function(){return o.info.apply(o,arguments)})),K(e,dm.DEBUG,(function(){return o.log.apply(o,arguments)})),e),u=function(e){if(e&&!(a<e)){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];(s[e]||s[dm.DEBUG]).apply(void 0,n)}};return{log:u,error:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return u.apply(void 0,[dm.ERROR].concat(t))},warn:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return u.apply(void 0,[dm.WARN].concat(t))},info:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return u.apply(void 0,[dm.INFO].concat(t))},debug:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return u.apply(void 0,[dm.DEBUG].concat(t))},level:function(e){return"number"==typeof e&&(a=e),a},LOG_LEVEL:dm}};function mm(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;e(n,t)}var gm=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=pm(t.logger),i={component:kt(n.component,"component",r),data:kt(n.data,"data",r),formatter:kt(n.formatter,"formatter",r),interaction:kt(n.interaction,"interaction",r),renderer:cu(n.renderer),scale:kt(n.scale,"scale",r),symbol:kt(n.symbol,"symbol",r),logger:r};function o(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r={palettes:t.palettes.concat(n.palettes||[]),style:F({},t.style,n.style),logger:n.logger||t.logger,renderer:n.renderer||t.renderer};return e(r,i)}return t.renderer&&t.renderer.prio&&i.renderer.default(t.renderer.prio[0]),o.use=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return mm(e,t,i)},o.chart=function(e){return lu(e,{registries:i,logger:r,style:t.style,palettes:t.palettes})},o.config=function(){return t},Object.keys(i).forEach((function(e){o[e]=i[e]})),o.version=H,o}({renderer:{prio:["svg","canvas"]},logger:{level:0},style:{"$font-family":"'Source Sans Pro', Arial, sans-serif","$font-size":"12px","$line-height":"16px","$font-size--l":"16px","$gray-100":"#ffffff","$gray-98":"#f9f9f9","$gray-95":"#f2f2f2","$gray-90":"#e6e6e6","$gray-35":"#595959","$gray-30":"#4d4d4d","$gray-25":"#404040","$gray-20":"#333333","$border-95":"rgba(255, 255, 255, 0.05)","$border-90":"rgba(255, 255, 255, 0.1)","$border-80":"rgba(255, 255, 255, 0.2)","$border-20":"rgba(0, 0, 0, 0.2)","$border-10":"rgba(0, 0, 0, 0.1)","$border-5":"rgba(0, 0, 0, 0.05)","$primary-blue":"#3F8AB3","$primary-green":"#6CB33F","$primary-red":"#DC423F","$primary-orange":"#EF960F","$spacing--s":4,$spacing:8,"$spacing--l":12,"$font-color":"$gray-35","$font-color--inverted":"$gray-90","$guide-color":"$gray-90","$guide-color--inverted":"$gray-35",$border:"$border-80","$border--inverted":"$border-10",$shape:{fill:"$primary-blue",strokeWidth:1,stroke:"$border"},"$shape-outline":{stroke:"$primary-blue",strokeWidth:2},"$shape-guide":{stroke:"$guide-color",strokeWidth:1},"$shape-guide--inverted":{"@extend":"$shape-guide",stroke:"$guide-color--inverted"},$label:{fontSize:"$font-size",fontFamily:"$font-family",fill:"$font-color"},"$label--inverted":{$extend:"$label",fill:"$font-color--inverted"},"$label-overlay":{fontSize:"$font-size--l",fontFamily:"$font-family",fill:"$gray-100",color:"$font-color",stroke:"$guide-color--inverted",strokeWidth:1,borderRadius:4},$title:{"@extend":"$label",fontSize:"$font-size--l"},"$guide-line":{strokeWidth:1,stroke:"$guide-color"},"$guide-line--minor":{strokeWidth:1,stroke:"$gray-95"},"$padding--s":{left:"$spacing--s",right:"$spacing--s",top:"$spacing--s",bottom:"$spacing--s"},$padding:{left:"$spacing",right:"$spacing",top:"$spacing",bottom:"$spacing"},"$selection-area-target":{fill:"$primary-green",strokeWidth:0,opacity:.2}},palettes:[{key:"categorical",colors:[["#a54343","#d76c6c","#ec983d","#ecc43d","#f9ec86","#cbe989","#70ba6e","#578b60","#79d69f","#26a0a7","#138185","#65d3da"]]},{key:"diverging",colors:[["#3d52a1","#3a89c9","#77b7e5","#b4ddf7","#e6f5fe","#ffe3aa","#f9bd7e","#ed875e","#d24d3e","#ae1c3e"]]},{key:"sequential",colors:[["rgb(180,221,212)","rgb(34, 83, 90)"]]}]},{component:fu,data:qu,formatter:Sr,interaction:Du,renderer:cu(),scale:Fo,symbol:Ja});function ym(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function vm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ym(Object(n),!0).forEach((function(t){Mm(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ym(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function bm(e){return(bm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function xm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function km(e,t,n){return t&&wm(e.prototype,t),n&&wm(e,n),e}function Mm(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _m(e,t){return(_m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Sm(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function qm(e,t,n){return(qm=Sm()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&_m(i,n.prototype),i}).apply(null,arguments)}function Dm(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)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||Em(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Cm(e){return function(e){if(Array.isArray(e))return Am(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Em(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Em(e,t){if(e){if("string"==typeof e)return Am(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)?Am(e,t):void 0}}function Am(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}qh.forEach(gm.use),hm.forEach(gm.use),[].forEach(gm.use);var Tm=Object.prototype.hasOwnProperty,Nm=Object.prototype.toString,Rm=Object.defineProperty,Om=Object.getOwnPropertyDescriptor,Im=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Nm.call(e)},Pm=function(e){if(!e||"[object Object]"!==Nm.call(e))return!1;var t,n=Tm.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Tm.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||Tm.call(e,t)},Lm=function(e,t){Rm&&"__proto__"===t.name?Rm(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},jm=function(e,t){if("__proto__"===t){if(!Tm.call(e,t))return;if(Om)return Om(e,t).value}return e[t]},zm=function e(){var t,n,i,o,a,s,u=arguments[0],l=1,c=arguments.length,f=!1;for("boolean"==typeof u&&(f=u,u=arguments[1]||{},l=2),(null==u||"object"!==r(u)&&"function"!=typeof u)&&(u={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)i=jm(u,n),u!==(o=jm(t,n))&&(f&&o&&(Pm(o)||(a=Im(o)))?(a?(a=!1,s=i&&Im(i)?i:[]):s=i&&Pm(i)?i:{},Lm(u,{name:n,newValue:e(f,s,o)})):void 0!==o&&Lm(u,{name:n,newValue:o}));return u};function Fm(e,t,n){if(!e)return-1;var r=n.cache,i=e.origin?e.origin():null;i&&(e=i);var o=r.fields.indexOf(e),a=-1,s=-1;if(-1===o)for(var u=0;u<r.wrappedFields.length;u++)if(s=r.wrappedFields[u].attrDims.map((function(e){return e.instance})).indexOf(e),a=r.wrappedFields[u].attrExps.map((function(e){return e.instance})).indexOf(e),-1!==s||-1!==a){o=u;break}return(o-=t.qArea.qLeft)<0||o>=t.qArea.qWidth?-1:s>=0?function(e){return e[o].qAttrDims.qValues[s]}:a>=0?function(e){return e[o].qAttrExps.qValues[a]}:function(e){return e[o]}}function Hm(e,t,n){var r=n.key,i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function Bm(e){var t=e.cache,n=e.f,r=e.mainCell,i=e.p;e.prop;var o=e.page,a=e.rowIdx,s=e.row,u=e.sourceKey,l=e.target,c=e.targetProp,f=r;if(i.field&&i.field!==n){var h=Fm(i.field,o,{cache:t});if(-1===h)return;f=zm({qRow:a},h(s))}l[c]=Hm(i,f,{key:u})}function Vm(e,t,n,r){for(var i=Array.isArray(e)?e:[e],o=[],a=0;a<i.length;a++)if(void 0!==i[a].field){for(var s=t.raw(),u=t.key(),l="object"===bm(i[a].field)?i[a].field:t.field(i[a].field),c=r.normalizeConfig(i[a],t),f=c.props,h=c.main,d=Object.keys(f),p=!!i[a].trackBy,m=bm(i[a].trackBy),g={},y=[],v=[],b=0;b<s.qDataPages.length;b++){var x=Fm(l,s.qDataPages[b],{cache:n});if(-1!==x)for(var w=0;w<s.qDataPages[b].qMatrix.length;w++){var k=s.qDataPages[b].qArea.qTop+w,M=zm({qRow:k},x(s.qDataPages[b].qMatrix[w])),_=Hm(h,M,{key:u});if(!(h.filter&&!h.filter(M))){for(var S=0;S<d.length;S++){var q=f[d[S]],D=q.fields||[q];q.fields&&(_[d[S]]=[]);for(var C=0;C<D.length;C++)Bm({cache:n,f:l,mainCell:M,p:D[C],prop:d[S],props:f,page:s.qDataPages[b],rowIdx:k,row:s.qDataPages[b].qMatrix[w],sourceKey:u,target:q.fields?_[d[S]]:_,targetProp:q.fields?C:d[S]});if(q.fields){var E=_[d[S]].map((function(e){return e.value})),A=_[d[S]].map((function(e){return e.label}));_[d[S]]={value:"function"==typeof q.value?q.value(E):void 0!==q.value?q.value:E,label:"function"==typeof q.label?q.label(A):void 0!==q.label?String(q.label):String(_[d[S]].value)}}}p&&r.track({cfg:i[a],itemData:M,obj:_,target:y,tracker:g,trackType:m}),v.push(_)}}}p?o.push.apply(o,Cm(r.collect(y,{main:h,propsArr:d,props:f}))):o.push.apply(o,v)}return o}function Wm(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function Um(e,t){var n,r,i,o,a,s=new Xm(e),u=+e.value&&(s.value=e.value),l=[s];for(null==t&&(t=$m);n=l.pop();)if(u&&(n.value=+n.data.value),(i=t(n.data))&&(a=i.length))for(n.children=new Array(a),o=a-1;o>=0;--o)l.push(r=n.children[o]=new Xm(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Km)}function $m(e){return e.children}function Ym(e){e.data=e.data.data}function Km(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function Xm(e){this.data=e,this.depth=this.height=0,this.parent=null}function Gm(e){if("function"!=typeof e)throw new Error;return e}Xm.prototype=Um.prototype={constructor:Xm,count:function(){return this.eachAfter(Wm)},each:function(e){var t,n,r,i,o=this,a=[o];do{for(t=a.reverse(),a=[];o=t.pop();)if(e(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r])}while(a.length);return this},eachAfter:function(e){for(var t,n,r,i=this,o=[i],a=[];i=o.pop();)if(a.push(i),t=i.children)for(n=0,r=t.length;n<r;++n)o.push(t[n]);for(;i=a.pop();)e(i);return this},eachBefore:function(e){for(var t,n,r=this,i=[r];r=i.pop();)if(e(r),t=r.children)for(n=t.length-1;n>=0;--n)i.push(t[n]);return this},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;e=n.pop(),t=r.pop();for(;e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){var e=[];return this.each((function(t){e.push(t)})),e},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return Um(this).eachBefore(Ym)}};var Jm={depth:-1},Zm={};function Qm(e){return e.id}function eg(e){return e.parentId}function tg(e,t){"/"===e.charAt(0)&&(e=e.substring(1));for(var n,r=e.split("/"),i=t,o=0;o<r.length;o++){if("*"===r[o]&&Array.isArray(i)){var a=[];n=r.slice(o+1).join("/");for(var s=0;s<i.length;s++){var u=tg(n,i[s]);Array.isArray(u)?a.push.apply(a,Cm(u)):a.push(u)}return a}if(!r[o]&&Array.isArray(i)){var l=new Array(i.length);n=r.slice(o+1).join("/");for(var c=0;c<i.length;c++)l[c]=tg(n,i[c]);return l}r[o]in i&&(i=i[r[o]])}return i}function ng(e,t,n){var r=[];if(!e||!e.length)return r;if(t<=0){var i=n>=0?[e[n]]:e;r.push.apply(r,Cm(i))}else for(var o=0;o<e.length;o++)e[o].children&&e[o].children.length&&r.push.apply(r,Cm(ng(e[o].children,t-1,n)));return r}function rg(e,t,n){if(e===t)return function(e){return e};if(e>t){var r=Math.max(0,Math.min(100,e-t));return function(e){for(var t=e,n=0;n<r;++n)t=t.parent;return t}}if(t>e){var i=Math.max(0,Math.min(100,t-e));return function(e){return ng(e.children,i-1,n)}}return!1}function ig(e,t){var n=t.cache;if("number"==typeof e)return n.fields[e];var r=n.allFields;if("function"==typeof e){for(var i=0;i<r.length;i++)if(e(r[i]))return r[i];return!1}if("string"==typeof e){for(var o=0;o<r.length;o++)if(r[o].key()===e||r[o].title()===e)return r[o]}else if(e&&-1!==r.indexOf(e))return e;throw Error("Field not found: ".concat(e))}var og=/^qDimensionInfo(?:\/(\d+))?/,ag=/^\/?qMeasureInfo\/(\d+)/,sg=/\/qAttrExprInfo\/(\d+)/,ug=/\/qAttrDimInfo\/(\d+)/;function lg(e){return(e.qColumnOrder&&e.qColumnOrder.length?e.qColumnOrder:e.qDimensionInfo.map((function(e,t){return t}))).filter((function(t){return t<e.qDimensionInfo.length}))}function cg(e,t){var n=t.cube;if(!e)return-1;var r=e.origin&&e.origin()?e.origin().key():e.key(),i=!1,o=-1,a=-1,s=-1,u=-1,l=-1,c=r,f=n.qEffectiveInterColumnSortOrder,h=lg(n);return og.test(c)&&(i=!0,o=+og.exec(c)[1],c=r.replace(og,"")),ag.test(c)&&("K"===n.qMode?u=+ag.exec(c)[1]:f&&-1!==f.indexOf(-1)?(u=+ag.exec(c)[1],l=0):l=+ag.exec(c)[1],c=c.replace(ag,"")),c&&(ug.exec(c)?s=+ug.exec(c)[1]:sg.exec(c)&&(a=+sg.exec(c)[1])),{fieldDepth:(i?"S"===n.qMode?h[o]:f?f.indexOf(o):o:f&&-1!==f.indexOf(-1)?f.indexOf(-1):n.qDimensionInfo.length-("K"===n.qMode?0:1))+1,pseudoMeasureIndex:u,measureIdx:l,attrDimIdx:s,attrIdx:a}}function fg(e,t){var n,r,i=rg(e.fieldDepth,t.fieldDepth,t.pseudoMeasureIndex);return n=t.measureIdx>=0?function(e){return e.data.qValues[t.measureIdx]}:function(e){return e.data},t.attrDimIdx>=0?r=function(e){var n;return null==e||null===(n=e.qAttrDims)||void 0===n?void 0:n.qValues[t.attrDimIdx]}:t.attrIdx>=0&&(r=function(e){var n;return null==e||null===(n=e.qAttrExps)||void 0===n?void 0:n.qValues[t.attrIdx]}),{nodeFn:i,attrFn:r,valueFn:n}}function hg(e,t,n){var r=n.key,i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function dg(e){for(var t=e.propsArr,n=e.props,r=e.item,i=e.itemData,o=e.ret,a=e.sourceKey,s=0;s<t.length;s++){var u=n[t[s]],l=u.fields||[u],c=void 0,f=void 0;u.fields&&(c=[],f=[]);for(var h=function(e){var n=l[e],h=void 0,d=void 0,p=void 0,m=void 0,g=void 0,y=void 0;if("primitive"===n.type?(p=n.value,y=String(n.value)):("function"==typeof n.value&&(h=function(e){return n.value(e,r)}),"function"==typeof n.label&&(d=function(e){return n.label(e,r)}),n.accessor?(m=n.accessor(r),Array.isArray(m)?(g=m.map(n.valueAccessor),n.attrAccessor&&(g=g.map(n.attrAccessor)),h&&(p=g.map(h),h=null),d&&(y=g.map(d),d=null),p=n.reduce?n.reduce(p):p,y=n.reduceLabel?n.reduceLabel(y,p):String(p)):y=p=n.attrAccessor?n.attrAccessor(n.valueAccessor(m)):n.valueAccessor(m)):(p=i,y=i)),u.fields){var v=h?h(p):p;c.push(v),f.push(d&&null!=y?d(y):null!=y?y:String(v))}else{var b=h?h(p):p;o[t[s]]={value:b,label:d?d(y):null!=y?y:String(b)},n.field&&(o[t[s]].source={field:n.field.key(),key:a})}},d=0;d<l.length;d++)h(d);c&&(o[t[s]]={value:"function"==typeof u.value?u.value(c,r):c,label:"function"==typeof u.label?u.label(f,r):f})}}var pg=function(e,t,n){var r="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",i="K"===e.qMode?"qSubNodes":"qNodes",o=tg(r,e);return o&&o[0]?(t.tree=Um(o[0],n.children||function(e){return e[i]}),t.tree):null};function mg(e){for(var t=e.raw().qDataPages.length?e.raw().qDataPages[0].qMatrix:[],n=function(e){var t=e.raw().qColumnOrder,n=e.fields();return t&&t.length===n.length?t:n.map((function(e,t){return t}))}(e),r=e.fields(),i=e.fields().filter((function(e){return"dimension"===e.type()})).map((function(e){return n.indexOf(r.indexOf(e))})),o=e.fields().filter((function(e){return"measure"===e.type()})).map((function(e){return n.indexOf(r.indexOf(e))})),a={__root:{__id:"__root",qValues:[]}},s=0;s<t.length;s++){for(var u=t[s],l="__root",c=!1,f=0;f<i.length;f++){var h=u[i[f]],d="".concat(l,"__").concat(h.qText);a[d]||(a[d]=vm({__id:d,__parent:l,qValues:[]},h),c=!0),l=d}if(c)for(var p=0;p<o.length;p++){var m=u[o[p]];a[l].qValues.push(m)}}var g=Object.keys(a).map((function(e){return a[e]}));return function(){var e=Qm,t=eg;function n(n){var r,i,o,a,s,u,l,c=n.length,f=new Array(c),h={};for(i=0;i<c;++i)r=n[i],s=f[i]=new Xm(r),null!=(u=e(r,i,n))&&(u+="")&&(h[l="$"+(s.id=u)]=l in h?Zm:s);for(i=0;i<c;++i)if(s=f[i],null!=(u=t(n[i],i,n))&&(u+="")){if(!(a=h["$"+u]))throw new Error("missing: "+u);if(a===Zm)throw new Error("ambiguous: "+u);a.children?a.children.push(s):a.children=[s],s.parent=a}else{if(o)throw new Error("multiple roots");o=s}if(!o)throw new Error("no root");if(o.parent=Jm,o.eachBefore((function(e){e.depth=e.parent.depth+1,--c})).eachBefore(Km),o.parent=null,c>0)throw new Error("cycle");return o}return n.id=function(t){return arguments.length?(e=Gm(t),n):e},n.parentId=function(e){return arguments.length?(t=Gm(e),n):t},n}().id((function(e){return e.__id})).parentId((function(e){return e.__parent}))(g)}var gg=function(e){for(var t=e.propsArr,n=e.props,r=e.cube,i=e.cache,o=e.itemDepthObject,a=e.f,s=0;s<t.length;s++)for(var u=n[t[s]],l=u.fields?u.fields:[u],c=0;c<l.length;c++){var f=l[c];if(f.field!==a){var h=fg(o,cg(f.field,{cube:r,cache:i}));f.accessor=h.nodeFn,f.valueAccessor=h.valueFn,f.attrAccessor=h.attrFn}}};function yg(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=t.raw(),o=t.key(),a="S"===i.qMode?mg(t):pg(i,n,e);if(!a)return null;for(var s=a.height,u=[],l=0;l<=s;l++){var c=null;if(l>0)if("S"===i.qMode){var f=lg(i),h=f[l-1];c=n.fields[h]}else{var d=i.qEffectiveInterColumnSortOrder[l-1];l>i.qEffectiveInterColumnSortOrder.length&&(d=i.qDimensionInfo.length),c=n.fields[d]}var p=r.normalizeConfig(vm(vm({},e),{},{field:c?c.key():void 0}),t),m=p.props,g=p.main,y=Object.keys(m);u[l]={propsArr:y,props:m,main:g};var v=c?cg(c,{cube:i,cache:n}):{fieldDepth:0};gg({propsArr:y,props:m,cube:i,cache:n,itemDepthObject:v,f:c})}for(var b=a.copy(),x=b.descendants(),w=a.descendants(),k=0;k<w.length;k++){var M=u[w[k].depth].propsArr,_=u[w[k].depth].props,S=u[w[k].depth].main,q=x[k],D=q.data,C=hg(S,D,{key:o});dg({propsArr:M,props:_,item:q,itemData:D,ret:C,sourceKey:o,isTree:!0}),w[k].data=C}return a}function vg(e,t,n,r){for(var i=Array.isArray(e)?e:[e],o=[],a=0;a<i.length;a++)if(void 0!==i[a].field){var s=t.raw(),u=t.key();if(!pg(s,n,e))continue;var l="object"===bm(i[a].field)?i[a].field:t.field(i[a].field),c=r.normalizeConfig(i[a],t),f=c.props,h=c.main,d=Object.keys(f),p=cg(l,{cube:s,cache:n}),m=fg({fieldDepth:0},p),g=m.nodeFn,y=m.attrFn,v=m.valueFn;gg({propsArr:d,props:f,cube:s,cache:n,itemDepthObject:p,f:l});for(var b=!!i[a].trackBy,x=bm(i[a].trackBy),w={},k=[],M=g(n.tree),_=[],S=0;S<M.length;S++){var q=M[S],D=y?y(v(q)):v(q);if(!(h.filter&&!h.filter(D))){var C=hg(h,D,{key:u});dg({propsArr:d,props:f,item:q,itemData:D,ret:C,sourceKey:u}),b&&r.track({cfg:i[a],itemData:D,obj:C,target:k,tracker:w,trackType:x}),_.push(C)}}b?o.push.apply(o,Cm(r.collect(k,{main:h,propsArr:d,props:f}))):o.push.apply(o,_)}return o}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var bg=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){
19
19
  /*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
20
- e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,i,o,a,s,u,l,c,f,h=e.length,d=e.search(/[0-9\-\+#]/),p=d>0?e.substring(0,d):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),y=h-g,v=e.substring(y,y+1),b=y+("."===v||","===v?1:0),x=g>0?e.substring(b,h):"";if(n=(t="-"===(e=e.substring(d,b)).charAt(0)?-t:+t)<0?t=-t:0,i=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",o=r&&r[1]&&r[0]||",",e=e.split(i),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(l=t.split("."))[1]||l[1]&&l[1].length<=s)&&(t=(+t).toFixed(s+1)),c=e[0].split(o),e[0]=c.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;l[0].length<e[0].length-a;)l[0]="0"+l[0];else 0==+l[0]&&(l[0]="");if((t=t.split("."))[0]=l[0],u=c[1]&&c[c.length-1].length){for(m="",y=(f=t[0]).length%u,h=f.length,b=0;b<h;b++)m+=f.charAt(b),!((b-y+1)%u)&&b<h-u&&(m+=o);t[0]=m}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),p+(n?"-":"")+r+x}}));function xg(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}var wg={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"},kg=/%$/,Mg=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,_g=/^\(oct\)/i,Sg=/^\(dec\)/i,qg=/^\(hex\)/i,Dg=/^\(bin\)/i,Cg=/^\(rom\)/i,Eg=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,Ag=/#|0/g;function Tg(e,t,n,r){return e=e.toString(t),n[1]===n[1].toUpperCase()&&(e=e.toUpperCase()),e.length-e.indexOf(".")>10&&(e=e.slice(0,e.indexOf(".")+11)),e.replace(".",r||".")}function Ng(e,t,n){var r;return Mg.test(t)?e=Tg(e,Number(/\d{2}/.exec(t)[0]),t,n):_g.test(t)?e=Tg(e,8,t,n):Sg.test(t)?e=Tg(e,10,t,n):qg.test(t)?e=Tg(e,16,t,n):Dg.test(t)?e=Tg(e,2,t,n):Cg.test(t)&&(r="",e<0&&(r="-",e=-e),e=0===(e=Math.floor(e))?"0":e<=5e5?r+(e=function(e,t){for(var n,r="",i=Number(String(e).slice(-3)),o=(e-i)/1e3,a=[0,1,4,5,9,10,40,50,90,100,400,500,900].reverse(),s=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();i>0;)for(n=0;n<a.length;n++)if(a[n]<=i){r+=s[n],i-=a[n];break}for(n=0;n<o;n++)r="M".concat(r);return t[1]!==t[1].toUpperCase()&&(r=r.toLowerCase()),r}(e,t)):t+r+e.toExponential(0)),e}function Rg(e,t,n){var r=xg(e);return n?r:new RegExp(r||"",t)}function Og(e,t,n){var r,i,o,a,s,u,l,c,f,h,d,p=e.pattern;p.indexOf("A")>=0&&(p=p.replace("A",""),e.abbreviate=!0),h=t,(d=n)&&(d=xg(d)),h&&(h=xg(h)),f=new RegExp("(?:[#0]+".concat(h,")?[#0]+(?:").concat(d,"[#0]+)?")),a=(o=(o=p.match(f))?o[0]:"")?p.substr(0,p.indexOf(o)):p,s=o?p.substring(p.indexOf(o)+o.length):"",o||(o=p?"#":"##########"),t&&t===n&&(i=(r=o.split(n)).pop(),o=r.join("")+n+i,t=""),u=t,t=/,/.test(n)?"¤":",",u&&(o=o.replace(Rg(u,"g"),t)),l=n,n=".",l&&(o=o.replace(Rg(l,"g"),n)),c=(c=o.match(/#/g))?c.length:0;var m,g=p.split(l);g[1]&&(m=g[1].match(Ag)),e.prefix=a||"",e.postfix=s||"",e.pattern=p,e.maxPrecision=m?m.length:2,e.percentage=kg.test(p),e.numericPattern=o||"",e.numericRegex=new RegExp("".concat(Rg(t,null,!0),"|").concat(Rg(n,null,!0)),"g"),e.groupTemp=u,e.decTemp=l,e.t=t,e.d=n,e.temp=c}var Ig=function(){function e(t,n,r,i,o){xm(this,e),this.localeInfo=t,this.pattern=n,this.thousandDelimiter=r||",",this.decimalDelimiter=i||".",this.type=o||"numeric",this.patternSeparator=";",this.abbreviations=function(e,t){if(!e||!e.qNumericalAbbreviation)return wg;var n={};return e.qNumericalAbbreviation.split(t).forEach((function(e){var t=e.split(":");2===t.length&&(n[t[0]]=t[1])})),n}(t,this.patternSeparator),this.prepare()}return km(e,[{key:"clone",value:function(){var t=new e(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return t.subtype=this.subtype,t}},{key:"format",value:function(e,t,n,r){return this.prepare(t,n,r),this.formatValue(e)}},{key:"prepare",value:function(e,t,n){var r;void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===n&&(n=this.decimalDelimiter),e?(this._prepared={positive:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},negative:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},zero:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""}},r=this._prepared,e=e.split(this.patternSeparator),r.positive.pattern=e[0],r.negative.pattern=e[1],r.zero.pattern=e[2],Eg.test(e[0])&&(r.positive.isFunctional=!0),e[1]?Eg.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?Eg.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1,r.positive.isFunctional||Og(r.positive,t,n),r.negative&&!r.negative.isFunctional&&Og(r.negative,t,n),r.zero&&!r.zero.isFunctional&&Og(r.zero,t,n)):this._prepared={pattern:!1}}},{key:"formatValue",value:function(e){var t,n,r,i,o,a,s,u,l,c=this._prepared,f="",h="",d=e;if(isNaN(e))return"".concat(d);if(e=+e,!1===c.pattern)return e.toString();if(0===e&&c.zero)return(c=c.zero).pattern;if(e<0&&c.negative?(c=c.negative,e=-e):c=c.positive,o=c.d,a=c.t,c.isFunctional)e=Ng(e,c.pattern,o);else{if(c.percentage&&(e*=100),c.abbreviate){var p,m,g=Object.keys(this.abbreviations).map((function(e){return parseInt(e,10)})).sort((function(e,t){return e-t})),y=g[0];for(s=0,n=Number(Number(e).toExponential().split("e")[1]);y<=n&&s<g.length;)y=g[++s];s>0&&(p=g[s-1]),p&&n>0&&p>0?m=p:(n<0&&p<0||!p)&&(y<0&&y-n<=c.maxPrecision?m=y:p<=n&&!(y>0&&-n<=c.maxPrecision)&&(m=p)),m&&(f=this.abbreviations[m],e/=Math.pow(10,m))}if(r=Math.abs(e),t=c.temp,l=(u=c.numericPattern).split(o)[1],"I"===this.type&&(e=Math.round(e)),i=e,l||"#"!==u.slice(-1)[0])if(r>=1e15||r>0&&r<=1e-14)e=r?r.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{var v=Number(e.toFixed(Math.min(20,l?l.length:0)).split(".")[0]),b=u.split(o)[0];if(e=bg(b+=o,v)||"0",l){var x=Math.max(0,Math.min(14,l.length)),w=l.replace(/#+$/,"").length,k=("I"===this.type?0:r%1).toFixed(x).slice(2).replace(/0+$/,"");for(s=k.length;s<w;s++)k+="0";k&&(e+=o+k)}else 0===v&&(i=0)}else if(r>=Math.pow(10,t)||r<1||r<1e-4)0===e?e="0":r<1e-4||r>=1e20?(e=(e=i.toExponential(Math.max(1,Math.min(14,t))-1)).replace(/\.?0+(?=e)/,""),h=""):(e=e.toPrecision(Math.max(1,Math.min(14,t)))).indexOf(".")>=0&&(e=(e=e.replace(e.indexOf("e")<0?/0+$/:/\.?0+(?=e)/,"")).replace(".",o));else{for(u+=o,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(r)/Math.log(10)))),s=0;s<t;s++)u+="#";e=bg(u,e)}e=e.replace(c.numericRegex,(function(e){return e===a?c.groupTemp:e===o?c.decTemp:""})),i<0&&!/^-/.test(e)&&(e="-".concat(e))}return c.prefix+e+h+f+c.postfix}}],[{key:"getStaticFormatter",value:function(){return{prepare:function(){},formatValue:function(e){return"".concat(e)}}}}]),e}();function Pg(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.size,o=void 0===i?5e3:i,a=r.multipleArguments,s=void 0!==a&&a,u=r.toKey,l=void 0===u?function(e){return e}:u,c=Object.create(null),f=Object.create(null),h=0,d=0;return(t=s?function(){return n=l.apply(void 0,arguments),t.has(n)?t.get(n):t.set(n,e.apply(void 0,arguments))}:function(r){return n=l(r),t.has(n)?t.get(n):t.set(n,e(r))}).set=function(e,t){return h>=o&&(delete c[f[d]],delete f[d],h--,d++),c[e]=t,f[h]=e,h++,t},t.get=function(e){return c[e]},t.has=function(e){return e in c},t.clear=function(){c=Object.create(null),f=Object.create(null),h=0,d=0},t.size=function(){return h},t}function Lg(e,t,n,r,i){var o=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return qm(Ig,t)}(i,e,t,n,r),a=Pg(o.formatValue.bind(o),{toKey:function(e){return isNaN(e)?e:+e}});function s(e){return a(e)}return s.format=function(e,t,n,r){return a.clear(),o.format(t,e,n,r)},s.pattern=function(e){return e&&(a.clear(),o.pattern=e,o.prepare()),o.pattern},s}var jg="D",zg="T",Fg="TS",Hg="IV",Bg=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Vg=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Wg=["January","February","March","April","May","June","July","August","September","October","November","December"],Ug=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function $g(e,t){for(var n=e.length;n<t;n++)e="0".concat(e);return e}function Yg(e){var t=e.toString().split(".");return t[1]?t=Number("0.".concat(t[1])):0}function Kg(e,t){var n,r=function(e){var t=e,n=24*Yg(t),r=60*Yg(n),i=60*Yg(r),o=1e3*Yg(i);return{d:Math.floor(t),h:Math.floor(n),m:Math.floor(r),s:Math.floor(i),f:Math.round(o)}}(e),i=r.d,o=r.h,a=r.m,s=r.s,u=r.f,l=0;/w+|t+/gi.test(t)&&(n=new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,Math.round(86400*(e-Math.floor(e))))),isNaN(n.getTime())&&(n=null)),/D+/gi.test(t)||(o+=24*i),/h+/gi.test(t)||(a+=60*o),/m+/gi.test(t)||(s+=60*a),/w+/gi.test(t)&&(l=n?n.getDay()-1:0)<0&&(l=6);var c="";return n&&(c=n.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:l,date:i,h:o,m:a,s:s,f:u,t:c}}var Xg=function(){function e(t,n,r){xm(this,e);var i,o=t||{};(o.qCalendarStrings||(o.qCalendarStrings={qLongDayNames:Bg,qDayNames:Vg,qLongMonthNames:Wg,qMonthNames:Ug}),this.localeInfo=o,this.locale_days=o.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=o.qCalendarStrings.qDayNames.slice(),this.locale_months=o.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=o.qCalendarStrings.qMonthNames.slice(),n)||(n=(Mm(i={},zg,o.qTimeFmt||"hh:mm:ss"),Mm(i,jg,o.qDateFmt||"YYYY-MM-DD"),Mm(i,Fg,o.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"),i)[r]);this.pattern=n}return km(e,[{key:"clone",value:function(){var t=new e(this.localeInfo,this.pattern);return t.subtype=this.subtype,t}},{key:"format",value:function(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+]|\[|]/g,"");var n,r=/t+/gi.test(t);e instanceof Date?n=function(e,t){var n=e.getUTCHours(),r=e.getUTCDay()-1;return t&&((n%=12)||(n=12)),r<0&&(r=6),{year:e.getUTCFullYear(),month:e.getUTCMonth(),day:r,date:e.getUTCDate(),h:n,m:e.getUTCMinutes(),s:e.getUTCSeconds(),f:e.getUTCMilliseconds(),t:e.getUTCHours()>=12?"pm":"am"}}(e,r):(e<0&&(e=-e,t="-".concat(t)),n=Kg(e,t));var i=function(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:$g("".concat(t.year).slice(-2),2),YYY:$g("".concat(t.year).slice(-3),3),def:function(e){return $g("".concat(t.year),e.length)}},"M+":{M:t.month+1,MM:$g("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:$g("".concat(t.day),2),WWW:e.locale_days_abbr[t.day],def:e.locale_days[t.day]},"D+|d+":{D:t.date,def:function(e){return $g("".concat(t.date),e.length)}},"h+|H+":{h:t.h,def:function(e){return $g("".concat(t.h),e.length)}},"m+":{m:t.m,def:function(e){return $g("".concat(t.m),e.length)}},"s+|S+":{s:t.s,def:function(e){return $g("".concat(t.s),e.length)}},"f+|F+":{def:function(e){var n="".concat(t.f),r=e.length-n.length;if(r>0)for(var i=0;i<r;i++)n+="0";else r<0&&(n=n.slice(0,e.length));return n}},"t{1,2}|T{1,2}":{def:function(e){var n=t.t;return e[0].toUpperCase()===e[0]&&(n=n.toUpperCase()),n.slice(0,e.length)}}}}(this,n),o=[];for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&o.push(a);var s=new RegExp(o.join("|"),"g");return t.replace(s,(function(e){var t,n,r;for(n in i)if(Object.prototype.hasOwnProperty.call(i,n)&&(t=new RegExp(n)).test(e))break;if(!t)return"";for(var o in i[n])if(o===e||o.toLowerCase()===e){void 0===(r=i[n][o])&&(r=i[n][o.toLowerCase()]);break}return void 0===r&&(r=i[n].def),"function"==typeof r&&(r=r(e)),r}))}}]),e}();function Gg(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return qm(Xg,t)}function Jg(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}function Zg(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=Gg(n,e,t),i=Pg(r.format.bind(r),{toKey:function(e){return"object"===bm(e)&&"function"==typeof e.getTime?e.getTime():e}});function o(e){return t!==Hg?Jg(e):e}function a(e){return e=o(e),i(e)}return a.format=function(e,t){return i.clear(),t=o(t),r.format(t,e)},a.locale=function(n){return r=Gg(n,e,t),i=Pg(r.format.bind(r),{toKey:function(e){return"object"===bm(e)?e.getTime():e}}),this},a.qtype=function(e){return void 0!==e&&(t=e,i.clear()),t},a}function Qg(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return Zg(e.qNumFormat.qFmt,e.qNumFormat.qType,t);var n="#",r=t&&void 0!==t.qThousandSep?t.qThousandSep:",",i=t&&void 0!==t.qDecimalSep?t.qDecimalSep:".",o="U",a=e&&!!e.qIsAutoFormat;return e&&e.qNumFormat?(n=e.qNumFormat.qFmt||n,r=e.qNumFormat.qThou||r,i=e.qNumFormat.qDec||i,o=e.qNumFormat.qType||o,a=a&&-1===["M"].indexOf(e.qNumFormat.qType)):a=!0,(a||"U"===o)&&(n="#".concat(i,"##A"),o="U"),Lg(n,r,i,o,t)}function ey(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.meta,r=t.id,i=t.key,o=t.localeInfo,a=t.fieldExtractor,s=t.value,u=t.type,l=t.sourceField,c=s||("dimension"===u?function(e){return e.qElemNo}:function(e){return e.qValue}),f=function(e){return e.qText||""},h="dimension"===u?"first":"avg",d=Qg(n,o),p="dimension"===u?"first":function(e,t){return d(t)},m={id:function(){return r},key:function(){return i},raw:function(){return n},title:function(){return n.qFallbackTitle||n.label},type:function(){return u},origin:function(){return l},items:function(){return e||(e=a(m)),e},min:function(){return n.qMin},max:function(){return n.qMax},value:c,label:f,reduce:h,reduceLabel:p,formatter:function(){return d},tags:function(){return n.qTags}};return m}function ty(e,t,n,r,i){return(t[e]||[]).map((function(t,o){var a="".concat(r?"".concat(r,"/"):"").concat(e,"/").concat(o),s={instance:ey(zm({id:"".concat(n?"".concat(n,"/"):"").concat(a),key:a,meta:t},i))};return s.attrDims=ty("qAttrDimInfo",t,n,a,zm({},i,{value:function(e){return e.qElemNo},type:"dimension"})),s.attrExps=ty("qAttrExprInfo",t,n,a,zm({},i,{value:function(e){return e.qNum},type:"measure"})),s.measures=ty("qMeasureInfo",t,n,a,zm({},i,{value:function(e){return e.qValue},type:"measure"})),s}))}function ny(){var e,t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=r.key,o=r.data,a=r.config,s=void 0===a?{}:a,u={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},l=o;if(!l)throw new Error('Missing "data" input');if(!l.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');var c=ny.util,f={cache:u,cube:l,localeInfo:s.localeInfo,fieldExtractor:null,pages:null,hierarchy:function(){return null},virtualFields:s.virtualFields},h={key:function(){return i},raw:function(){return l},field:function(e){return ig(e,f)},fields:function(){return u.fields.slice()},extract:function(e){return f.extractor(e,h,u,c)},hierarchy:function(e){return f.hierarchy(e,h,u,c)},_cache:function(){return u}};"K"===l.qMode||"T"===l.qMode||!l.qMode&&l.qNodesOnDim?(f.extractor=vg,f.hierarchy=yg,f.pages="K"===l.qMode?l.qStackedDataPages:l.qTreeDataPages):"S"===l.qMode?(f.extractor=Vm,f.pages=l.qDataPages,f.hierarchy=yg):f.extractor=function(){return[]},f.fieldExtractor=function(e){return f.extractor({field:e},h,u,c)};var d="S"===l.qMode?function(e){return e.qElemNumber}:void 0,p="S"===l.qMode?function(e){return e.qNum}:void 0;(e=u.wrappedFields).push.apply(e,Cm(ty("qDimensionInfo",l,i,"",zm({},f,{value:d,type:"dimension"})))),(t=u.wrappedFields).push.apply(t,Cm(ty("qMeasureInfo",l,i,"",zm({},f,{value:p,type:"measure"})))),u.fields=u.wrappedFields.map((function(e){return e.instance}));var m=function e(t){t.forEach((function(t){u.allFields.push(t.instance),e(t.measures),e(t.attrDims),e(t.attrExps)}))};return m(u.wrappedFields),(s.virtualFields||[]).forEach((function(e){var t=h.field(e.from),n=ey(vm({meta:t.raw(),id:"".concat(i,"/").concat(e.key),sourceField:t,fieldExtractor:function(e){return f.extractor({field:e},h,u,c)},key:e.key,type:t.type(),localeInfo:f.localeInfo,value:t.value},e.override||{}));u.virtualFields.push(n)})),(n=u.allFields).push.apply(n,Cm(u.virtualFields)),h}var ry=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],iy=/\/qDimensionInfo(?:\/(\d+))?/,oy=/\/qMeasureInfo\/(\d+)/,ay=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,sy=/\/qAttrExprInfo\/(\d+)/,uy=/\/?qHyperCube/,ly=/\/?qTreeData/,cy=function(e){return"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14))},fy=function(e){return"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13))};function hy(e,t){var n=e,r=-1,i=-1,o="",a=function(e){return e};uy.test(e)?(o="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),a=cy):ly.test(e)&&(o="".concat(n.substr(0,n.indexOf("qTreeData")+9)),a=fy);var s=!0;if(iy.test(e)&&(r=+iy.exec(e)[1]),oy.test(e)&&(i=+oy.exec(e)[1]),ay.test(e)){i=-1,r=0;var u=+ay.exec(n)[2];isNaN(u)||(r=u,n=n.replace(/\/\d+$/,"")),s=!1}if(sy.test(e)){var l=i;if(t){i=0;var c=tg(o,t);i+=(c.qMeasureInfo||[]).length,r>-1?(i=c.qDimensionInfo.slice(0,r).reduce((function(e,t){return e+t.qAttrExprInfo.length}),i),r=-1):(i=c.qDimensionInfo.reduce((function(e,t){return e+t.qAttrExprInfo.length}),i),i=c.qMeasureInfo.slice(0,l).reduce((function(e,t){return e+t.qAttrExprInfo.length}),i)),i+=+sy.exec(n)[1]}else r>-1?(r=-1,i=+sy.exec(n)[1]):i+=+sy.exec(n)[1]+1}return ry.forEach((function(e){var t=Dm(e,2),r=t[0],i=t[1];n=n.replace(r,i)})),s&&(n=a(n)),n&&"/"!==n[0]&&(n="/".concat(n)),{measureIdx:i,dimensionIdx:r,path:n}}function dy(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,i=n.byCells,o=n.primarySource,a=[],s={},u=e.isActive(),l=!1;if(e.brushes().forEach((function(e){var t=hy(e.id,r);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){var n=e.brush.ranges();n.length&&(l=!0,s.multiRangeSelectTreeDataValues||(s.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),n.forEach((function(e){return s.multiRangeSelectTreeDataValues.ranges.push({qMeasureIx:t.measureIdx,qDimensionIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})})))}else{if("range"===e.type&&t.measureIdx>-1){var u=e.brush.ranges();u.length&&(l=!0,s.rangeSelectHyperCubeValues||(s.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),u.forEach((function(e){return s.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:t.measureIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})})))}if("range"===e.type&&t.dimensionIdx>-1){var c=e.brush.ranges();c.length&&(l=!0,s.selectHyperCubeContinuousRange||(s.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),c.forEach((function(e){return s.selectHyperCubeContinuousRange.ranges.push({qDimIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!1}})})))}if("value"===e.type&&t.dimensionIdx>-1)if(i)if(r&&r.qHyperCube&&("P"===r.qHyperCube.qMode||"T"===r.qHyperCube.qMode||"K"===r.qHyperCube.qMode)){var f=r.qHyperCube,h=f.qNoOfLeftDims,d=f.qEffectiveInterColumnSortOrder.indexOf(t.dimensionIdx);if(s.selectPivotCells||(s.selectPivotCells={path:t.path,cells:[]}),e.id===o||!o){var p=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)}));(0===h||d>=h)&&h>-1?p.forEach((function(e){s.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:d-h})})):p.forEach((function(e){s.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})})),l=!!s.selectPivotCells.cells.length}}else s.selectHyperCubeCells||(s.selectHyperCubeCells={path:t.path,cols:[]}),s.selectHyperCubeCells.cols.push(t.dimensionIdx),e.id!==o&&(o||s.selectHyperCubeCells.values)||(s.selectHyperCubeCells.values=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)})),l=!!s.selectHyperCubeCells.values.length);else{var m=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)}));l=!!m.length,a.push({params:[t.path,t.dimensionIdx,m,!1],method:"selectHyperCubeValues"})}}})),!l&&u)return[{method:"resetMadeSelections",params:[]}];s.rangeSelectHyperCubeValues&&a.push({method:"rangeSelectHyperCubeValues",params:[s.rangeSelectHyperCubeValues.path,s.rangeSelectHyperCubeValues.ranges,[],null===(t=n.orMode)||void 0===t||t]});return s.selectHyperCubeContinuousRange&&a.push({method:"selectHyperCubeContinuousRange",params:[s.selectHyperCubeContinuousRange.path,s.selectHyperCubeContinuousRange.ranges]}),s.selectHyperCubeCells&&a.push({method:"selectHyperCubeCells",params:[s.selectHyperCubeCells.path,s.selectHyperCubeCells.values,s.selectHyperCubeCells.cols]}),s.selectPivotCells&&a.push({method:"selectPivotCells",params:[s.selectPivotCells.path,s.selectPivotCells.cells]}),s.multiRangeSelectTreeDataValues&&a.push({method:"multiRangeSelectTreeDataValues",params:[s.multiRangeSelectTreeDataValues.path,s.multiRangeSelectTreeDataValues.ranges]}),a}function py(e){ny.util=e.data("matrix").util,e.data("q",ny),e.formatter("q-number",Lg),e.formatter("q-time",Zg)}py.qBrushHelper=dy,py.selections=dy;var my={click:"Tap",Click:"Tap",tap:"Tap",pan:"Pan",swipe:"Swipe",rotate:"Rotate",press:"Press",pinch:"Pinch"};function gy(e){return my[e]||e}function yy(e){return function(t,n,r){var i,o,a,s,u=[],l=!0;function c(){"function"==typeof i.enable&&(i.enable=i.enable.bind(o)()),i.enable&&(i.gestures.forEach((function(t){t.options=t.options||{},void 0===t.options.enable&&(t.options.enable=!0),"function"==typeof t.options.enable&&(t.options.enable=t.options.enable.bind(o));var n=gy(t.type);e&&e[n]&&(t.options.event=t.options.event||t.type.toLowerCase(),(a=a||new e.Manager(r)).add(new e[n](t.options)),Object.keys(t.events).forEach((function(e){t.events[e]=t.events[e].bind(o),a.on(e,t.events[e])})),u.push(t))})),i.gestures.forEach((function(t){var n=gy(t.type);e&&e[n]&&(t.recognizeWith&&a.get(t.options.event).recognizeWith(t.recognizeWith.split(" ").filter((function(e){return""!==e}))),t.requireFailure&&a.get(t.options.event).requireFailure(t.requireFailure.split(" ").filter((function(e){return""!==e}))))})))}function f(){u.forEach((function(e){Object.keys(e.events).forEach((function(t){a.off(t,e.events[t])})),a.remove(e.options.event)})),u=[]}return{get key(){return s},set:function(e){!function(e){s=e.key,o={chart:t,mediator:n,settings:i=e},i.gestures=i.gestures||[],void 0===i.enable&&(i.enable=!0)}(e),f(),l&&c()},off:function(){l=!1,f()},on:function(){l=!0,0===u.length&&c()},destroy:function(){f(),a&&a.destroy(),a=null,o=null,i=null}}}}var vy={exports:{}};!function(e){!function(t,n,i,o){var a,s=["","webkit","Moz","MS","ms","o"],u=n.createElement("div"),l=Math.round,c=Math.abs,f=Date.now;function h(e,t,n){return setTimeout(b(e,n),t)}function d(e,t,n){return!!Array.isArray(e)&&(p(e,n[t],n),!0)}function p(e,t,n){var r;if(e)if(e.forEach)e.forEach(t,n);else if(e.length!==o)for(r=0;r<e.length;)t.call(n,e[r],r,e),r++;else for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e)}function m(e,n,r){var i="DEPRECATED METHOD: "+n+"\n"+r+" AT \n";return function(){var n=new Error("get-stack-trace"),r=n&&n.stack?n.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=t.console&&(t.console.warn||t.console.log);return o&&o.call(t.console,i,r),e.apply(this,arguments)}}a="function"!=typeof Object.assign?function(e){if(e===o||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(r!==o&&null!==r)for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])}return t}:Object.assign;var g=m((function(e,t,n){for(var r=Object.keys(t),i=0;i<r.length;)(!n||n&&e[r[i]]===o)&&(e[r[i]]=t[r[i]]),i++;return e}),"extend","Use `assign`."),y=m((function(e,t){return g(e,t,!0)}),"merge","Use `assign`.");function v(e,t,n){var r,i=t.prototype;(r=e.prototype=Object.create(i)).constructor=e,r._super=i,n&&a(r,n)}function b(e,t){return function(){return e.apply(t,arguments)}}function x(e,t){return"function"==r(e)?e.apply(t&&t[0]||o,t):e}function w(e,t){return e===o?t:e}function k(e,t,n){p(q(t),(function(t){e.addEventListener(t,n,!1)}))}function M(e,t,n){p(q(t),(function(t){e.removeEventListener(t,n,!1)}))}function _(e,t){for(;e;){if(e==t)return!0;e=e.parentNode}return!1}function S(e,t){return e.indexOf(t)>-1}function q(e){return e.trim().split(/\s+/g)}function D(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var r=0;r<e.length;){if(n&&e[r][n]==t||!n&&e[r]===t)return r;r++}return-1}function C(e){return Array.prototype.slice.call(e,0)}function E(e,t,n){for(var r=[],i=[],o=0;o<e.length;){var a=t?e[o][t]:e[o];D(i,a)<0&&r.push(e[o]),i[o]=a,o++}return n&&(r=t?r.sort((function(e,n){return e[t]>n[t]})):r.sort()),r}function A(e,t){for(var n,r,i=t[0].toUpperCase()+t.slice(1),a=0;a<s.length;){if((r=(n=s[a])?n+i:t)in e)return r;a++}return o}var T=1;function N(e){var n=e.ownerDocument||e;return n.defaultView||n.parentWindow||t}var R="ontouchstart"in t,O=A(t,"PointerEvent")!==o,I=R&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),P="touch",L="mouse",j=24,z=["x","y"],F=["clientX","clientY"];function H(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){x(e.options.enable,[e])&&n.handler(t)},this.init()}function B(e,t,n){var r=n.pointers.length,i=n.changedPointers.length,a=1&t&&r-i==0,s=12&t&&r-i==0;n.isFirst=!!a,n.isFinal=!!s,a&&(e.session={}),n.eventType=t,function(e,t){var n=e.session,r=t.pointers,i=r.length;n.firstInput||(n.firstInput=V(t));i>1&&!n.firstMultiple?n.firstMultiple=V(t):1===i&&(n.firstMultiple=!1);var a=n.firstInput,s=n.firstMultiple,u=s?s.center:a.center,l=t.center=W(r);t.timeStamp=f(),t.deltaTime=t.timeStamp-a.timeStamp,t.angle=K(u,l),t.distance=Y(u,l),function(e,t){var n=t.center,r=e.offsetDelta||{},i=e.prevDelta||{},o=e.prevInput||{};1!==t.eventType&&4!==o.eventType||(i=e.prevDelta={x:o.deltaX||0,y:o.deltaY||0},r=e.offsetDelta={x:n.x,y:n.y});t.deltaX=i.x+(n.x-r.x),t.deltaY=i.y+(n.y-r.y)}(n,t),t.offsetDirection=$(t.deltaX,t.deltaY);var h=U(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=h.x,t.overallVelocityY=h.y,t.overallVelocity=c(h.x)>c(h.y)?h.x:h.y,t.scale=s?function(e,t){return Y(t[0],t[1],F)/Y(e[0],e[1],F)}(s.pointers,r):1,t.rotation=s?function(e,t){return K(t[1],t[0],F)+K(e[1],e[0],F)}(s.pointers,r):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,function(e,t){var n,r,i,a,s=e.lastInterval||t,u=t.timeStamp-s.timeStamp;if(8!=t.eventType&&(u>25||s.velocity===o)){var l=t.deltaX-s.deltaX,f=t.deltaY-s.deltaY,h=U(u,l,f);r=h.x,i=h.y,n=c(h.x)>c(h.y)?h.x:h.y,a=$(l,f),e.lastInterval=t}else n=s.velocity,r=s.velocityX,i=s.velocityY,a=s.direction;t.velocity=n,t.velocityX=r,t.velocityY=i,t.direction=a}(n,t);var d=e.element;_(t.srcEvent.target,d)&&(d=t.srcEvent.target);t.target=d}(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:f(),pointers:t,center:W(t),deltaX:e.deltaX,deltaY:e.deltaY}}function W(e){var t=e.length;if(1===t)return{x:l(e[0].clientX),y:l(e[0].clientY)};for(var n=0,r=0,i=0;i<t;)n+=e[i].clientX,r+=e[i].clientY,i++;return{x:l(n/t),y:l(r/t)}}function U(e,t,n){return{x:t/e||0,y:n/e||0}}function $(e,t){return e===t?1:c(e)>=c(t)?e<0?2:4:t<0?8:16}function Y(e,t,n){n||(n=z);var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.sqrt(r*r+i*i)}function K(e,t,n){n||(n=z);var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return 180*Math.atan2(i,r)/Math.PI}H.prototype={handler:function(){},init:function(){this.evEl&&k(this.element,this.evEl,this.domHandler),this.evTarget&&k(this.target,this.evTarget,this.domHandler),this.evWin&&k(N(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&M(this.element,this.evEl,this.domHandler),this.evTarget&&M(this.target,this.evTarget,this.domHandler),this.evWin&&M(N(this.element),this.evWin,this.domHandler)}};var X={mousedown:1,mousemove:2,mouseup:4},G="mousedown",J="mousemove mouseup";function Z(){this.evEl=G,this.evWin=J,this.pressed=!1,H.apply(this,arguments)}v(Z,H,{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 Q={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},ee={2:P,3:"pen",4:L,5:"kinect"},te="pointerdown",ne="pointermove pointerup pointercancel";function re(){this.evEl=te,this.evWin=ne,H.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}t.MSPointerEvent&&!t.PointerEvent&&(te="MSPointerDown",ne="MSPointerMove MSPointerUp MSPointerCancel"),v(re,H,{handler:function(e){var t=this.store,n=!1,r=e.type.toLowerCase().replace("ms",""),i=Q[r],o=ee[e.pointerType]||e.pointerType,a=o==P,s=D(t,e.pointerId,"pointerId");1&i&&(0===e.button||a)?s<0&&(t.push(e),s=t.length-1):12&i&&(n=!0),s<0||(t[s]=e,this.callback(this.manager,i,{pointers:t,changedPointers:[e],pointerType:o,srcEvent:e}),n&&t.splice(s,1))}});var ie={touchstart:1,touchmove:2,touchend:4,touchcancel:8},oe="touchstart",ae="touchstart touchmove touchend touchcancel";function se(){this.evTarget=oe,this.evWin=ae,this.started=!1,H.apply(this,arguments)}function ue(e,t){var n=C(e.touches),r=C(e.changedTouches);return 12&t&&(n=E(n.concat(r),"identifier",!0)),[n,r]}v(se,H,{handler:function(e){var t=ie[e.type];if(1===t&&(this.started=!0),this.started){var n=ue.call(this,e,t);12&t&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:P,srcEvent:e})}}});var le={touchstart:1,touchmove:2,touchend:4,touchcancel:8},ce="touchstart touchmove touchend touchcancel";function fe(){this.evTarget=ce,this.targetIds={},H.apply(this,arguments)}function he(e,t){var n=C(e.touches),r=this.targetIds;if(3&t&&1===n.length)return r[n[0].identifier]=!0,[n,n];var i,o,a=C(e.changedTouches),s=[],u=this.target;if(o=n.filter((function(e){return _(e.target,u)})),1===t)for(i=0;i<o.length;)r[o[i].identifier]=!0,i++;for(i=0;i<a.length;)r[a[i].identifier]&&s.push(a[i]),12&t&&delete r[a[i].identifier],i++;return s.length?[E(o.concat(s),"identifier",!0),s]:void 0}v(fe,H,{handler:function(e){var t=le[e.type],n=he.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:P,srcEvent:e})}});function de(){H.apply(this,arguments);var e=b(this.handler,this);this.touch=new fe(this.manager,e),this.mouse=new Z(this.manager,e),this.primaryTouch=null,this.lastTouches=[]}function pe(e,t){1&e?(this.primaryTouch=t.changedPointers[0].identifier,me.call(this,t)):12&e&&me.call(this,t)}function me(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY};this.lastTouches.push(n);var r=this.lastTouches;setTimeout((function(){var e=r.indexOf(n);e>-1&&r.splice(e,1)}),2500)}}function ge(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],o=Math.abs(t-i.x),a=Math.abs(n-i.y);if(o<=25&&a<=25)return!0}return!1}v(de,H,{handler:function(e,t,n){var r=n.pointerType==P,i=n.pointerType==L;if(!(i&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(r)pe.call(this,t,n);else if(i&&ge.call(this,n))return;this.callback(e,t,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var ye=A(u.style,"touchAction"),ve=ye!==o,be="compute",xe="auto",we="manipulation",ke="none",Me="pan-x",_e="pan-y",Se=function(){if(!ve)return!1;var e={},n=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(r){e[r]=!n||t.CSS.supports("touch-action",r)})),e}();function qe(e,t){this.manager=e,this.set(t)}qe.prototype={set:function(e){e==be&&(e=this.compute()),ve&&this.manager.element.style&&Se[e]&&(this.manager.element.style[ye]=e),this.actions=e.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var e=[];return p(this.manager.recognizers,(function(t){x(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))})),function(e){if(S(e,ke))return ke;var t=S(e,Me),n=S(e,_e);if(t&&n)return ke;if(t||n)return t?Me:_e;if(S(e,we))return we;return xe}(e.join(" "))},preventDefaults:function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented)t.preventDefault();else{var r=this.actions,i=S(r,ke)&&!Se.none,o=S(r,_e)&&!Se["pan-y"],a=S(r,Me)&&!Se["pan-x"];if(i){var s=1===e.pointers.length,u=e.distance<2,l=e.deltaTime<250;if(s&&u&&l)return}if(!a||!o)return i||o&&6&n||a&&n&j?this.preventSrc(t):void 0}},preventSrc:function(e){this.manager.session.prevented=!0,e.preventDefault()}};var De=32;function Ce(e){this.options=a({},this.defaults,e||{}),this.id=T++,this.manager=null,this.options.enable=w(this.options.enable,!0),this.state=1,this.simultaneous={},this.requireFail=[]}function Ee(e){return 16&e?"cancel":8&e?"end":4&e?"move":2&e?"start":""}function Ae(e){return 16==e?"down":8==e?"up":2==e?"left":4==e?"right":""}function Te(e,t){var n=t.manager;return n?n.get(e):e}function Ne(){Ce.apply(this,arguments)}function Re(){Ne.apply(this,arguments),this.pX=null,this.pY=null}function Oe(){Ne.apply(this,arguments)}function Ie(){Ce.apply(this,arguments),this._timer=null,this._input=null}function Pe(){Ne.apply(this,arguments)}function Le(){Ne.apply(this,arguments)}function je(){Ce.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function ze(e,t){return(t=t||{}).recognizers=w(t.recognizers,ze.defaults.preset),new Fe(e,t)}Ce.prototype={defaults:{},set:function(e){return a(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=Te(e,this)).id]||(t[e.id]=e,e.recognizeWith(this)),this},dropRecognizeWith:function(e){return d(e,"dropRecognizeWith",this)||(e=Te(e,this),delete this.simultaneous[e.id]),this},requireFailure:function(e){if(d(e,"requireFailure",this))return this;var t=this.requireFail;return-1===D(t,e=Te(e,this))&&(t.push(e),e.requireFailure(this)),this},dropRequireFailure:function(e){if(d(e,"dropRequireFailure",this))return this;e=Te(e,this);var t=D(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(e){return!!this.simultaneous[e.id]},emit:function(e){var t=this,n=this.state;function r(n){t.manager.emit(n,e)}n<8&&r(t.options.event+Ee(n)),r(t.options.event),e.additionalEvent&&r(e.additionalEvent),n>=8&&r(t.options.event+Ee(n))},tryEmit:function(e){if(this.canEmit())return this.emit(e);this.state=De},canEmit:function(){for(var e=0;e<this.requireFail.length;){if(!(33&this.requireFail[e].state))return!1;e++}return!0},recognize:function(e){var t=a({},e);if(!x(this.options.enable,[this,t]))return this.reset(),void(this.state=De);56&this.state&&(this.state=1),this.state=this.process(t),30&this.state&&this.tryEmit(t)},process:function(e){},getTouchAction:function(){},reset:function(){}},v(Ne,Ce,{defaults:{pointers:1},attrTest:function(e){var t=this.options.pointers;return 0===t||e.pointers.length===t},process:function(e){var t=this.state,n=e.eventType,r=6&t,i=this.attrTest(e);return r&&(8&n||!i)?16|t:r||i?4&n?8|t:2&t?4|t:2:De}}),v(Re,Ne,{defaults:{event:"pan",threshold:10,pointers:1,direction:30},getTouchAction:function(){var e=this.options.direction,t=[];return 6&e&&t.push(_e),e&j&&t.push(Me),t},directionTest:function(e){var t=this.options,n=!0,r=e.distance,i=e.direction,o=e.deltaX,a=e.deltaY;return i&t.direction||(6&t.direction?(i=0===o?1:o<0?2:4,n=o!=this.pX,r=Math.abs(e.deltaX)):(i=0===a?1:a<0?8:16,n=a!=this.pY,r=Math.abs(e.deltaY))),e.direction=i,n&&r>t.threshold&&i&t.direction},attrTest:function(e){return Ne.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=Ae(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),v(Oe,Ne,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[ke]},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)}}),v(Ie,Ce,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[xe]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,r=e.distance<t.threshold,i=e.deltaTime>t.time;if(this._input=e,!r||!n||12&e.eventType&&!i)this.reset();else if(1&e.eventType)this.reset(),this._timer=h((function(){this.state=8,this.tryEmit()}),t.time,this);else if(4&e.eventType)return 8;return De},reset:function(){clearTimeout(this._timer)},emit:function(e){8===this.state&&(e&&4&e.eventType?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=f(),this.manager.emit(this.options.event,this._input)))}}),v(Pe,Ne,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[ke]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)}}),v(Le,Ne,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return Re.prototype.getTouchAction.call(this)},attrTest:function(e){var t,n=this.options.direction;return 30&n?t=e.overallVelocity:6&n?t=e.overallVelocityX:n&j&&(t=e.overallVelocityY),this._super.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&c(t)>this.options.velocity&&4&e.eventType},emit:function(e){var t=Ae(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),v(je,Ce,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[we]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,r=e.distance<t.threshold,i=e.deltaTime<t.time;if(this.reset(),1&e.eventType&&0===this.count)return this.failTimeout();if(r&&i&&n){if(4!=e.eventType)return this.failTimeout();var o=!this.pTime||e.timeStamp-this.pTime<t.interval,a=!this.pCenter||Y(this.pCenter,e.center)<t.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,a&&o?this.count+=1:this.count=1,this._input=e,0===this.count%t.taps)return this.hasRequireFailures()?(this._timer=h((function(){this.state=8,this.tryEmit()}),t.interval,this),2):8}return De},failTimeout:function(){return this._timer=h((function(){this.state=De}),this.options.interval,this),De},reset:function(){clearTimeout(this._timer)},emit:function(){8==this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),ze.VERSION="2.0.7",ze.defaults={domEvents:!1,touchAction:be,enable:!0,inputTarget:null,inputClass:null,preset:[[Pe,{enable:!1}],[Oe,{enable:!1},["rotate"]],[Le,{direction:6}],[Re,{direction:6},["swipe"]],[je],[je,{event:"doubletap",taps:2},["tap"]],[Ie]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};function Fe(e,t){var n;this.options=a({},ze.defaults,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=new((n=this).options.inputClass||(O?re:I?fe:R?de:Z))(n,B),this.touchAction=new qe(this,this.options.touchAction),He(this,!0),p(this.options.recognizers,(function(e){var t=this.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])}),this)}function He(e,t){var n,r=e.element;r.style&&(p(e.options.cssProps,(function(i,o){n=A(r.style,o),t?(e.oldCssProps[n]=r.style[n],r.style[n]=i):r.style[n]=e.oldCssProps[n]||""})),t||(e.oldCssProps={}))}Fe.prototype={set:function(e){return a(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},stop:function(e){this.session.stopped=e?2:1},recognize:function(e){var t=this.session;if(!t.stopped){var n;this.touchAction.preventDefaults(e);var r=this.recognizers,i=t.curRecognizer;(!i||i&&8&i.state)&&(i=t.curRecognizer=null);for(var o=0;o<r.length;)n=r[o],2===t.stopped||i&&n!=i&&!n.canRecognizeWith(i)?n.reset():n.recognize(e),!i&&14&n.state&&(i=t.curRecognizer=n),o++}},get:function(e){if(e instanceof Ce)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=D(t,e);-1!==n&&(t.splice(n,1),this.touchAction.update())}return this},on:function(e,t){if(e!==o&&t!==o){var n=this.handlers;return p(q(e),(function(e){n[e]=n[e]||[],n[e].push(t)})),this}},off:function(e,t){if(e!==o){var n=this.handlers;return p(q(e),(function(e){t?n[e]&&n[e].splice(D(n[e],t),1):delete n[e]})),this}},emit:function(e,t){this.options.domEvents&&function(e,t){var r=n.createEvent("Event");r.initEvent(e,!0,!0),r.gesture=t,t.target.dispatchEvent(r)}(e,t);var r=this.handlers[e]&&this.handlers[e].slice();if(r&&r.length){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var i=0;i<r.length;)r[i](t),i++}},destroy:function(){this.element&&He(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},a(ze,{INPUT_START:1,INPUT_MOVE:2,INPUT_END:4,INPUT_CANCEL:8,STATE_POSSIBLE:1,STATE_BEGAN:2,STATE_CHANGED:4,STATE_ENDED:8,STATE_RECOGNIZED:8,STATE_CANCELLED:16,STATE_FAILED:De,DIRECTION_NONE:1,DIRECTION_LEFT:2,DIRECTION_RIGHT:4,DIRECTION_UP:8,DIRECTION_DOWN:16,DIRECTION_HORIZONTAL:6,DIRECTION_VERTICAL:j,DIRECTION_ALL:30,Manager:Fe,Input:H,TouchAction:qe,TouchInput:fe,MouseInput:Z,PointerEventInput:re,TouchMouseInput:de,SingleTouchInput:se,Recognizer:Ce,AttrRecognizer:Ne,Tap:je,Pan:Re,Swipe:Le,Pinch:Oe,Rotate:Pe,Press:Ie,on:k,off:M,each:p,merge:y,extend:g,assign:a,inherit:v,bindFn:b,prefixed:A}),(void 0!==t?t:"undefined"!=typeof self?self:{}).Hammer=ze,e.exports?e.exports=ze:t.Hammer=ze}(window,document)}(vy);var by=vy.exports;function xy(e){e.component("event-area",{mounted:function(e){e.classList.add("event-area"),e.style.pointerEvents="auto",e.style.zIndex=1},render:function(){return[]}})}var wy={renderer:"dom",disableTriggers:!0,preferredSize:function(){return 22},render:function(e){var t=this.settings,n=t.settings,r=n.label,i=n.rtl,o=t.layout.dock,a="top"!==o&&"bottom"!==o||!i?"ltr":"rtl",s=function(e,t){var n={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",color:"#7b7a78",fontStyle:"italic",fontSize:"13px"};switch(e){case"left":n.width="".concat(t.height,"px"),n.transform="rotate(-90deg) translate(-".concat(t.height,"px, 0)"),n.transformOrigin="top left";break;case"right":n.width="".concat(t.height,"px"),n.transform="rotate(90deg) translate(0, -".concat(t.width,"px)"),n.transformOrigin="top left";break;case"center":n.width="".concat(t.width,"px"),n.height="".concat(t.height,"px"),n.color="#595959",n.fontStyle="normal",n.fontSize="1.2em",n.textAlign="center";break;default:case"top":case"bottom":n.justifyContent="flex-start",n.alignItems="flex-start"}return n}(o,this.rect),u="center"===o?r:"* ".concat(r),l="center"!==o?{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}:{};return e("div",{style:s,dir:a},e("span",{ref:this.alignToRef,style:l,title:u},u))}};function ky(){var e=gm();return e.renderer.prio(["canvas"]),e.use(py),e.use(function(e){if("function"!=typeof e.interaction)return function(t){t.interaction("hammer",yy(e))};e.interaction("hammer",yy(Hammer))}(by)),e.use(xy),e.component("disclaimer",wy),e}var My={shapes:[{type:"path",attrs:{d:"M15.9488039,5.20769129 C16.0487326,6.70662306 15.3492311,8.30548361 14.050157,9.30477145 C12.651154,10.5039169 10.8524359,10.8037032 8.85386017,10.4039881 L7.3549284,10.0042729 L5.75606786,9.70448659 C5.75606786,9.90434416 5.65613907,10.0042729 5.4562815,10.2041305 C5.05656637,10.6038456 4.55692244,10.8037032 4.05727852,10.8037032 C3.75749217,10.8037032 3.45770582,10.7037744 3.15791946,10.6038456 C3.05799068,10.903632 3.15791946,11.2034184 3.45770582,11.7030623 C5.05656637,14.0014243 3.85742095,15.9000712 3.75749217,16 L2.2585604,15.3004985 C2.2585604,15.2005697 2.95806189,14.0014243 1.95877405,12.6024213 C1.6589877,12.0028486 1.15934378,11.0035608 1.55905891,10.0042729 C1.6589877,9.80441537 1.75891648,9.6045578 1.95877405,9.40470024 C1.6589877,8.90505631 1.55905891,8.30548361 1.85884527,7.7059109 C1.55905891,7.40612455 1.25927256,7.1063382 1.15934378,6.70662306 C0.859557424,5.90719279 0.959486209,4.5081898 1.6589877,3.30904439 C1.95877405,2.6095429 2.55834676,2.0099702 3.15791946,1.51032628 C3.95734974,0.91075357 4.95663758,0.610967217 6.15578299,0.311180864 C9.05371774,-0.388320626 11.9516525,0.111323295 13.9502282,1.61025506 C15.1493736,2.50961412 15.8488751,3.80868831 15.9488039,5.20769129 Z M13.0508691,8.10562604 C13.8502994,7.40612455 14.3499433,6.40683671 14.3499433,5.30762008 C14.2500145,4.20840345 13.550513,3.40897318 12.9509403,2.90932926 C12.1515101,2.40968533 11.252151,2.0099702 10.1529344,1.81011263 C8.95378895,1.61025506 7.75464354,1.71018384 6.45556935,1.91004141 C4.75678001,2.30975655 3.65756338,3.00925804 3.05799068,4.10847467 C2.55834676,5.00783373 2.65827554,5.90719279 2.75820433,6.20697914 C2.75820433,6.30690792 2.85813311,6.40683671 3.05799068,6.40683671 C3.15791946,6.40683671 3.25784825,6.40683671 3.35777703,6.40683671 C3.45770582,6.40683671 3.45770582,6.40683671 3.45770582,6.40683671 L3.5576346,6.40683671 L3.65756338,6.40683671 C4.65685123,6.40683671 5.4562815,6.90648063 5.85599664,7.80583969 L5.85599664,8.00569726 C6.35564056,8.10562604 7.05514205,8.30548361 7.75464354,8.50534118 L9.25357531,8.90505631 C10.0530056,9.0049851 10.7525071,9.0049851 11.4520086,8.80512753 C12.0515813,8.70519875 12.5512252,8.40541239 13.0508691,8.10562604 Z"}}]};var _y={AUTO:!0,BIN_COUNT:10,BIN_SIZE:10,LABEL:"x",OFFSET:0,COUNT_DISTINCT:!1,BIN_MODE:"maxCount"};Object.freeze(_y);var Sy={version:"0.31.0",qHyperCubeDef:{qDimensions:[],qMeasures:[],qMode:"S",qAlwaysFullyExpanded:!0,qSuppressZero:!1,qSuppressMissing:!0},bins:{auto:_y.AUTO,binCount:"",binSize:_y.BIN_SIZE,offset:_y.OFFSET,countDistinct:_y.COUNT_DISTINCT,binMode:_y.BIN_MODE},color:{bar:{paletteColor:{index:6,color:"#4477aa"}}},dataPoint:{showLabels:!1},dimensionAxis:{dock:"near",label:"auto",show:"all"},measureAxis:{autoMinMax:!0,dock:"near",label:"",max:10,min:0,minMax:"min",show:"all",spacing:1},gridlines:{auto:!0,spacing:2},refLine:{refLines:[]},sorting:{autoSort:!0},showTitles:!0,subtitle:"",title:"",footnote:""};function qy(e){var t=e.translator;return{path:"/qHyperCubeDef",dimensions:{min:1,max:1,description:function(){return t.get("Visualization.Histogram.Binning")}},measures:{min:0,max:0}}}function Dy(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Cy(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Ey(){}var Ay=1/.7,Ty="\\s*([+-]?\\d+)\\s*",Ny="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ry="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Oy=/^#([0-9a-f]{3,8})$/,Iy=new RegExp("^rgb\\("+[Ty,Ty,Ty]+"\\)$"),Py=new RegExp("^rgb\\("+[Ry,Ry,Ry]+"\\)$"),Ly=new RegExp("^rgba\\("+[Ty,Ty,Ty,Ny]+"\\)$"),jy=new RegExp("^rgba\\("+[Ry,Ry,Ry,Ny]+"\\)$"),zy=new RegExp("^hsl\\("+[Ny,Ry,Ry]+"\\)$"),Fy=new RegExp("^hsla\\("+[Ny,Ry,Ry,Ny]+"\\)$"),Hy={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 By(){return this.rgb().formatHex()}function Vy(){return this.rgb().formatRgb()}function Wy(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Oy.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Uy(t):3===n?new Ky(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?$y(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?$y(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=Iy.exec(e))?new Ky(t[1],t[2],t[3],1):(t=Py.exec(e))?new Ky(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Ly.exec(e))?$y(t[1],t[2],t[3],t[4]):(t=jy.exec(e))?$y(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=zy.exec(e))?Zy(t[1],t[2]/100,t[3]/100,1):(t=Fy.exec(e))?Zy(t[1],t[2]/100,t[3]/100,t[4]):Hy.hasOwnProperty(e)?Uy(Hy[e]):"transparent"===e?new Ky(NaN,NaN,NaN,0):null}function Uy(e){return new Ky(e>>16&255,e>>8&255,255&e,1)}function $y(e,t,n,r){return r<=0&&(e=t=n=NaN),new Ky(e,t,n,r)}function Yy(e){return e instanceof Ey||(e=Wy(e)),e?new Ky((e=e.rgb()).r,e.g,e.b,e.opacity):new Ky}function Ky(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Xy(){return"#"+Jy(this.r)+Jy(this.g)+Jy(this.b)}function Gy(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function Jy(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Zy(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new ev(e,t,n,r)}function Qy(e){if(e instanceof ev)return new ev(e.h,e.s,e.l,e.opacity);if(e instanceof Ey||(e=Wy(e)),!e)return new ev;if(e instanceof ev)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new ev(a,s,u,e.opacity)}function ev(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function tv(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function nv(e,t,n){if(void 0===e||void 0===t)return n;for(var r=t.split("."),i=e,o=0;o<r.length;++o){var a=r[o];if(void 0===i[a])return n;i=i[a]}return i}function rv(e,t,n){if(void 0!==e&&void 0!==t){for(var r=t.split("."),i=r[r.length-1],o=e,a=0;a<r.length-1;++a){var s=r[a];void 0===o[s]&&(o[s]=Number.isNaN(+r[a+1])?{}:[]),o=o[s]}void 0!==n?o[i]=n:delete o[i]}}function iv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ov(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function av(e,t,n){return t&&ov(e.prototype,t),n&&ov(e,n),e}function sv(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Dy(Ey,Wy,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:By,formatHex:By,formatHsl:function(){return Qy(this).formatHsl()},formatRgb:Vy,toString:Vy}),Dy(Ky,(function(e,t,n,r){return 1===arguments.length?Yy(e):new Ky(e,t,n,null==r?1:r)}),Cy(Ey,{brighter:function(e){return e=null==e?Ay:Math.pow(Ay,e),new Ky(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Ky(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Xy,formatHex:Xy,formatRgb:Gy,toString:Gy})),Dy(ev,(function(e,t,n,r){return 1===arguments.length?Qy(e):new ev(e,t,n,null==r?1:r)}),Cy(Ey,{brighter:function(e){return e=null==e?Ay:Math.pow(Ay,e),new ev(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new ev(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Ky(tv(e>=240?e-240:e+120,i,r),tv(e,i,r),tv(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var uv,lv=(function(e){
20
+ e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,i,o,a,s,u,l,c,f,h=e.length,d=e.search(/[0-9\-\+#]/),p=d>0?e.substring(0,d):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),y=h-g,v=e.substring(y,y+1),b=y+("."===v||","===v?1:0),x=g>0?e.substring(b,h):"";if(n=(t="-"===(e=e.substring(d,b)).charAt(0)?-t:+t)<0?t=-t:0,i=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",o=r&&r[1]&&r[0]||",",e=e.split(i),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(l=t.split("."))[1]||l[1]&&l[1].length<=s)&&(t=(+t).toFixed(s+1)),c=e[0].split(o),e[0]=c.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;l[0].length<e[0].length-a;)l[0]="0"+l[0];else 0==+l[0]&&(l[0]="");if((t=t.split("."))[0]=l[0],u=c[1]&&c[c.length-1].length){for(m="",y=(f=t[0]).length%u,h=f.length,b=0;b<h;b++)m+=f.charAt(b),!((b-y+1)%u)&&b<h-u&&(m+=o);t[0]=m}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),p+(n?"-":"")+r+x}}));function xg(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}var wg={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"},kg=/%$/,Mg=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,_g=/^\(oct\)/i,Sg=/^\(dec\)/i,qg=/^\(hex\)/i,Dg=/^\(bin\)/i,Cg=/^\(rom\)/i,Eg=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,Ag=/#|0/g;function Tg(e,t,n,r){return e=e.toString(t),n[1]===n[1].toUpperCase()&&(e=e.toUpperCase()),e.length-e.indexOf(".")>10&&(e=e.slice(0,e.indexOf(".")+11)),e.replace(".",r||".")}function Ng(e,t,n){var r;return Mg.test(t)?e=Tg(e,Number(/\d{2}/.exec(t)[0]),t,n):_g.test(t)?e=Tg(e,8,t,n):Sg.test(t)?e=Tg(e,10,t,n):qg.test(t)?e=Tg(e,16,t,n):Dg.test(t)?e=Tg(e,2,t,n):Cg.test(t)&&(r="",e<0&&(r="-",e=-e),e=0===(e=Math.floor(e))?"0":e<=5e5?r+(e=function(e,t){for(var n,r="",i=Number(String(e).slice(-3)),o=(e-i)/1e3,a=[0,1,4,5,9,10,40,50,90,100,400,500,900].reverse(),s=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();i>0;)for(n=0;n<a.length;n++)if(a[n]<=i){r+=s[n],i-=a[n];break}for(n=0;n<o;n++)r="M".concat(r);return t[1]!==t[1].toUpperCase()&&(r=r.toLowerCase()),r}(e,t)):t+r+e.toExponential(0)),e}function Rg(e,t,n){var r=xg(e);return n?r:new RegExp(r||"",t)}function Og(e,t,n){var r,i,o,a,s,u,l,c,f,h,d,p=e.pattern;p.indexOf("A")>=0&&(p=p.replace("A",""),e.abbreviate=!0),h=t,(d=n)&&(d=xg(d)),h&&(h=xg(h)),f=new RegExp("(?:[#0]+".concat(h,")?[#0]+(?:").concat(d,"[#0]+)?")),a=(o=(o=p.match(f))?o[0]:"")?p.substr(0,p.indexOf(o)):p,s=o?p.substring(p.indexOf(o)+o.length):"",o||(o=p?"#":"##########"),t&&t===n&&(i=(r=o.split(n)).pop(),o=r.join("")+n+i,t=""),u=t,t=/,/.test(n)?"¤":",",u&&(o=o.replace(Rg(u,"g"),t)),l=n,n=".",l&&(o=o.replace(Rg(l,"g"),n)),c=(c=o.match(/#/g))?c.length:0;var m,g=p.split(l);g[1]&&(m=g[1].match(Ag)),e.prefix=a||"",e.postfix=s||"",e.pattern=p,e.maxPrecision=m?m.length:2,e.percentage=kg.test(p),e.numericPattern=o||"",e.numericRegex=new RegExp("".concat(Rg(t,null,!0),"|").concat(Rg(n,null,!0)),"g"),e.groupTemp=u,e.decTemp=l,e.t=t,e.d=n,e.temp=c}var Ig=function(){function e(t,n,r,i,o){xm(this,e),this.localeInfo=t,this.pattern=n,this.thousandDelimiter=r||",",this.decimalDelimiter=i||".",this.type=o||"numeric",this.patternSeparator=";",this.abbreviations=function(e,t){if(!e||!e.qNumericalAbbreviation)return wg;var n={};return e.qNumericalAbbreviation.split(t).forEach((function(e){var t=e.split(":");2===t.length&&(n[t[0]]=t[1])})),n}(t,this.patternSeparator),this.prepare()}return km(e,[{key:"clone",value:function(){var t=new e(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return t.subtype=this.subtype,t}},{key:"format",value:function(e,t,n,r){return this.prepare(t,n,r),this.formatValue(e)}},{key:"prepare",value:function(e,t,n){var r;void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===n&&(n=this.decimalDelimiter),e?(this._prepared={positive:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},negative:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},zero:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""}},r=this._prepared,e=e.split(this.patternSeparator),r.positive.pattern=e[0],r.negative.pattern=e[1],r.zero.pattern=e[2],Eg.test(e[0])&&(r.positive.isFunctional=!0),e[1]?Eg.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?Eg.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1,r.positive.isFunctional||Og(r.positive,t,n),r.negative&&!r.negative.isFunctional&&Og(r.negative,t,n),r.zero&&!r.zero.isFunctional&&Og(r.zero,t,n)):this._prepared={pattern:!1}}},{key:"formatValue",value:function(e){var t,n,r,i,o,a,s,u,l,c=this._prepared,f="",h="",d=e;if(isNaN(e))return"".concat(d);if(e=+e,!1===c.pattern)return e.toString();if(0===e&&c.zero)return(c=c.zero).pattern;if(e<0&&c.negative?(c=c.negative,e=-e):c=c.positive,o=c.d,a=c.t,c.isFunctional)e=Ng(e,c.pattern,o);else{if(c.percentage&&(e*=100),c.abbreviate){var p,m,g=Object.keys(this.abbreviations).map((function(e){return parseInt(e,10)})).sort((function(e,t){return e-t})),y=g[0];for(s=0,n=Number(Number(e).toExponential().split("e")[1]);y<=n&&s<g.length;)y=g[++s];s>0&&(p=g[s-1]),p&&n>0&&p>0?m=p:(n<0&&p<0||!p)&&(y<0&&y-n<=c.maxPrecision?m=y:p<=n&&!(y>0&&-n<=c.maxPrecision)&&(m=p)),m&&(f=this.abbreviations[m],e/=Math.pow(10,m))}if(r=Math.abs(e),t=c.temp,l=(u=c.numericPattern).split(o)[1],"I"===this.type&&(e=Math.round(e)),i=e,l||"#"!==u.slice(-1)[0])if(r>=1e15||r>0&&r<=1e-14)e=r?r.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{var v=Number(e.toFixed(Math.min(20,l?l.length:0)).split(".")[0]),b=u.split(o)[0];if(e=bg(b+=o,v)||"0",l){var x=Math.max(0,Math.min(14,l.length)),w=l.replace(/#+$/,"").length,k=("I"===this.type?0:r%1).toFixed(x).slice(2).replace(/0+$/,"");for(s=k.length;s<w;s++)k+="0";k&&(e+=o+k)}else 0===v&&(i=0)}else if(r>=Math.pow(10,t)||r<1||r<1e-4)0===e?e="0":r<1e-4||r>=1e20?(e=(e=i.toExponential(Math.max(1,Math.min(14,t))-1)).replace(/\.?0+(?=e)/,""),h=""):(e=e.toPrecision(Math.max(1,Math.min(14,t)))).indexOf(".")>=0&&(e=(e=e.replace(e.indexOf("e")<0?/0+$/:/\.?0+(?=e)/,"")).replace(".",o));else{for(u+=o,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(r)/Math.log(10)))),s=0;s<t;s++)u+="#";e=bg(u,e)}e=e.replace(c.numericRegex,(function(e){return e===a?c.groupTemp:e===o?c.decTemp:""})),i<0&&!/^-/.test(e)&&(e="-".concat(e))}return c.prefix+e+h+f+c.postfix}}],[{key:"getStaticFormatter",value:function(){return{prepare:function(){},formatValue:function(e){return"".concat(e)}}}}]),e}();function Pg(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.size,o=void 0===i?5e3:i,a=r.multipleArguments,s=void 0!==a&&a,u=r.toKey,l=void 0===u?function(e){return e}:u,c=Object.create(null),f=Object.create(null),h=0,d=0;return(t=s?function(){return n=l.apply(void 0,arguments),t.has(n)?t.get(n):t.set(n,e.apply(void 0,arguments))}:function(r){return n=l(r),t.has(n)?t.get(n):t.set(n,e(r))}).set=function(e,t){return h>=o&&(delete c[f[d]],delete f[d],h--,d++),c[e]=t,f[h]=e,h++,t},t.get=function(e){return c[e]},t.has=function(e){return e in c},t.clear=function(){c=Object.create(null),f=Object.create(null),h=0,d=0},t.size=function(){return h},t}function Lg(e,t,n,r,i){var o=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return qm(Ig,t)}(i,e,t,n,r),a=Pg(o.formatValue.bind(o),{toKey:function(e){return isNaN(e)?e:+e}});function s(e){return a(e)}return s.format=function(e,t,n,r){return a.clear(),o.format(t,e,n,r)},s.pattern=function(e){return e&&(a.clear(),o.pattern=e,o.prepare()),o.pattern},s}var jg="D",zg="T",Fg="TS",Hg="IV",Bg=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Vg=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Wg=["January","February","March","April","May","June","July","August","September","October","November","December"],Ug=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function $g(e,t){for(var n=e.length;n<t;n++)e="0".concat(e);return e}function Yg(e){var t=e.toString().split(".");return t[1]?t=Number("0.".concat(t[1])):0}function Kg(e,t){var n,r=function(e){var t=e,n=24*Yg(t),r=60*Yg(n),i=60*Yg(r),o=1e3*Yg(i);return{d:Math.floor(t),h:Math.floor(n),m:Math.floor(r),s:Math.floor(i),f:Math.round(o)}}(e),i=r.d,o=r.h,a=r.m,s=r.s,u=r.f,l=0;/w+|t+/gi.test(t)&&(n=new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,Math.round(86400*(e-Math.floor(e))))),isNaN(n.getTime())&&(n=null)),/D+/gi.test(t)||(o+=24*i),/h+/gi.test(t)||(a+=60*o),/m+/gi.test(t)||(s+=60*a),/w+/gi.test(t)&&(l=n?n.getDay()-1:0)<0&&(l=6);var c="";return n&&(c=n.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:l,date:i,h:o,m:a,s:s,f:u,t:c}}var Xg=function(){function e(t,n,r){xm(this,e);var i,o=t||{};(o.qCalendarStrings||(o.qCalendarStrings={qLongDayNames:Bg,qDayNames:Vg,qLongMonthNames:Wg,qMonthNames:Ug}),this.localeInfo=o,this.locale_days=o.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=o.qCalendarStrings.qDayNames.slice(),this.locale_months=o.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=o.qCalendarStrings.qMonthNames.slice(),n)||(n=(Mm(i={},zg,o.qTimeFmt||"hh:mm:ss"),Mm(i,jg,o.qDateFmt||"YYYY-MM-DD"),Mm(i,Fg,o.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"),i)[r]);this.pattern=n}return km(e,[{key:"clone",value:function(){var t=new e(this.localeInfo,this.pattern);return t.subtype=this.subtype,t}},{key:"format",value:function(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+]|\[|]/g,"");var n,r=/t+/gi.test(t);e instanceof Date?n=function(e,t){var n=e.getUTCHours(),r=e.getUTCDay()-1;return t&&((n%=12)||(n=12)),r<0&&(r=6),{year:e.getUTCFullYear(),month:e.getUTCMonth(),day:r,date:e.getUTCDate(),h:n,m:e.getUTCMinutes(),s:e.getUTCSeconds(),f:e.getUTCMilliseconds(),t:e.getUTCHours()>=12?"pm":"am"}}(e,r):(e<0&&(e=-e,t="-".concat(t)),n=Kg(e,t));var i=function(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:$g("".concat(t.year).slice(-2),2),YYY:$g("".concat(t.year).slice(-3),3),def:function(e){return $g("".concat(t.year),e.length)}},"M+":{M:t.month+1,MM:$g("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:$g("".concat(t.day),2),WWW:e.locale_days_abbr[t.day],def:e.locale_days[t.day]},"D+|d+":{D:t.date,def:function(e){return $g("".concat(t.date),e.length)}},"h+|H+":{h:t.h,def:function(e){return $g("".concat(t.h),e.length)}},"m+":{m:t.m,def:function(e){return $g("".concat(t.m),e.length)}},"s+|S+":{s:t.s,def:function(e){return $g("".concat(t.s),e.length)}},"f+|F+":{def:function(e){var n="".concat(t.f),r=e.length-n.length;if(r>0)for(var i=0;i<r;i++)n+="0";else r<0&&(n=n.slice(0,e.length));return n}},"t{1,2}|T{1,2}":{def:function(e){var n=t.t;return e[0].toUpperCase()===e[0]&&(n=n.toUpperCase()),n.slice(0,e.length)}}}}(this,n),o=[];for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&o.push(a);var s=new RegExp(o.join("|"),"g");return t.replace(s,(function(e){var t,n,r;for(n in i)if(Object.prototype.hasOwnProperty.call(i,n)&&(t=new RegExp(n)).test(e))break;if(!t)return"";for(var o in i[n])if(o===e||o.toLowerCase()===e){void 0===(r=i[n][o])&&(r=i[n][o.toLowerCase()]);break}return void 0===r&&(r=i[n].def),"function"==typeof r&&(r=r(e)),r}))}}]),e}();function Gg(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return qm(Xg,t)}function Jg(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}function Zg(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=Gg(n,e,t),i=Pg(r.format.bind(r),{toKey:function(e){return"object"===bm(e)&&"function"==typeof e.getTime?e.getTime():e}});function o(e){return t!==Hg?Jg(e):e}function a(e){return e=o(e),i(e)}return a.format=function(e,t){return i.clear(),t=o(t),r.format(t,e)},a.locale=function(n){return r=Gg(n,e,t),i=Pg(r.format.bind(r),{toKey:function(e){return"object"===bm(e)?e.getTime():e}}),this},a.qtype=function(e){return void 0!==e&&(t=e,i.clear()),t},a}function Qg(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return Zg(e.qNumFormat.qFmt,e.qNumFormat.qType,t);var n="#",r=t&&void 0!==t.qThousandSep?t.qThousandSep:",",i=t&&void 0!==t.qDecimalSep?t.qDecimalSep:".",o="U",a=e&&!!e.qIsAutoFormat;return e&&e.qNumFormat?(n=e.qNumFormat.qFmt||n,r=e.qNumFormat.qThou||r,i=e.qNumFormat.qDec||i,o=e.qNumFormat.qType||o,a=a&&-1===["M"].indexOf(e.qNumFormat.qType)):a=!0,(a||"U"===o)&&(n="#".concat(i,"##A"),o="U"),Lg(n,r,i,o,t)}function ey(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.meta,r=t.id,i=t.key,o=t.localeInfo,a=t.fieldExtractor,s=t.value,u=t.type,l=t.sourceField,c=s||("dimension"===u?function(e){return e.qElemNo}:function(e){return e.qValue}),f=function(e){return e.qText||""},h="dimension"===u?"first":"avg",d=Qg(n,o),p="dimension"===u?"first":function(e,t){return d(t)},m={id:function(){return r},key:function(){return i},raw:function(){return n},title:function(){return n.qFallbackTitle||n.label},type:function(){return u},origin:function(){return l},items:function(){return e||(e=a(m)),e},min:function(){return n.qMin},max:function(){return n.qMax},value:c,label:f,reduce:h,reduceLabel:p,formatter:function(){return d},tags:function(){return n.qTags}};return m}function ty(e,t,n,r,i){return(t[e]||[]).map((function(t,o){var a="".concat(r?"".concat(r,"/"):"").concat(e,"/").concat(o),s={instance:ey(zm({id:"".concat(n?"".concat(n,"/"):"").concat(a),key:a,meta:t},i))};return s.attrDims=ty("qAttrDimInfo",t,n,a,zm({},i,{value:function(e){return e.qElemNo},type:"dimension"})),s.attrExps=ty("qAttrExprInfo",t,n,a,zm({},i,{value:function(e){return e.qNum},type:"measure"})),s.measures=ty("qMeasureInfo",t,n,a,zm({},i,{value:function(e){return e.qValue},type:"measure"})),s}))}function ny(){var e,t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=r.key,o=r.data,a=r.config,s=void 0===a?{}:a,u={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},l=o;if(!l)throw new Error('Missing "data" input');if(!l.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');var c=ny.util,f={cache:u,cube:l,localeInfo:s.localeInfo,fieldExtractor:null,pages:null,hierarchy:function(){return null},virtualFields:s.virtualFields},h={key:function(){return i},raw:function(){return l},field:function(e){return ig(e,f)},fields:function(){return u.fields.slice()},extract:function(e){return f.extractor(e,h,u,c)},hierarchy:function(e){return f.hierarchy(e,h,u,c)},_cache:function(){return u}};"K"===l.qMode||"T"===l.qMode||!l.qMode&&l.qNodesOnDim?(f.extractor=vg,f.hierarchy=yg,f.pages="K"===l.qMode?l.qStackedDataPages:l.qTreeDataPages):"S"===l.qMode?(f.extractor=Vm,f.pages=l.qDataPages,f.hierarchy=yg):f.extractor=function(){return[]},f.fieldExtractor=function(e){return f.extractor({field:e},h,u,c)};var d="S"===l.qMode?function(e){return e.qElemNumber}:void 0,p="S"===l.qMode?function(e){return e.qNum}:void 0;(e=u.wrappedFields).push.apply(e,Cm(ty("qDimensionInfo",l,i,"",zm({},f,{value:d,type:"dimension"})))),(t=u.wrappedFields).push.apply(t,Cm(ty("qMeasureInfo",l,i,"",zm({},f,{value:p,type:"measure"})))),u.fields=u.wrappedFields.map((function(e){return e.instance}));var m=function e(t){t.forEach((function(t){u.allFields.push(t.instance),e(t.measures),e(t.attrDims),e(t.attrExps)}))};return m(u.wrappedFields),(s.virtualFields||[]).forEach((function(e){var t=h.field(e.from),n=ey(vm({meta:t.raw(),id:"".concat(i,"/").concat(e.key),sourceField:t,fieldExtractor:function(e){return f.extractor({field:e},h,u,c)},key:e.key,type:t.type(),localeInfo:f.localeInfo,value:t.value},e.override||{}));u.virtualFields.push(n)})),(n=u.allFields).push.apply(n,Cm(u.virtualFields)),h}var ry=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],iy=/\/qDimensionInfo(?:\/(\d+))?/,oy=/\/qMeasureInfo\/(\d+)/,ay=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,sy=/\/qAttrExprInfo\/(\d+)/,uy=/\/?qHyperCube/,ly=/\/?qTreeData/,cy=function(e){return"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14))},fy=function(e){return"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13))};function hy(e,t){var n=e,r=-1,i=-1,o="",a=function(e){return e};uy.test(e)?(o="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),a=cy):ly.test(e)&&(o="".concat(n.substr(0,n.indexOf("qTreeData")+9)),a=fy);var s=!0;if(iy.test(e)&&(r=+iy.exec(e)[1]),oy.test(e)&&(i=+oy.exec(e)[1]),ay.test(e)){i=-1,r=0;var u=+ay.exec(n)[2];isNaN(u)||(r=u,n=n.replace(/\/\d+$/,"")),s=!1}if(sy.test(e)){var l=i;if(t){i=0;var c=tg(o,t);i+=(c.qMeasureInfo||[]).length,r>-1?(i=c.qDimensionInfo.slice(0,r).reduce((function(e,t){return e+t.qAttrExprInfo.length}),i),r=-1):(i=c.qDimensionInfo.reduce((function(e,t){return e+t.qAttrExprInfo.length}),i),i=c.qMeasureInfo.slice(0,l).reduce((function(e,t){return e+t.qAttrExprInfo.length}),i)),i+=+sy.exec(n)[1]}else r>-1?(r=-1,i=+sy.exec(n)[1]):i+=+sy.exec(n)[1]+1}return ry.forEach((function(e){var t=Dm(e,2),r=t[0],i=t[1];n=n.replace(r,i)})),s&&(n=a(n)),n&&"/"!==n[0]&&(n="/".concat(n)),{measureIdx:i,dimensionIdx:r,path:n}}function dy(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,i=n.byCells,o=n.primarySource,a=[],s={},u=e.isActive(),l=!1;if(e.brushes().forEach((function(e){var t=hy(e.id,r);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){var n=e.brush.ranges();n.length&&(l=!0,s.multiRangeSelectTreeDataValues||(s.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),n.forEach((function(e){return s.multiRangeSelectTreeDataValues.ranges.push({qMeasureIx:t.measureIdx,qDimensionIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})})))}else{if("range"===e.type&&t.measureIdx>-1){var u=e.brush.ranges();u.length&&(l=!0,s.rangeSelectHyperCubeValues||(s.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),u.forEach((function(e){return s.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:t.measureIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})})))}if("range"===e.type&&t.dimensionIdx>-1){var c=e.brush.ranges();c.length&&(l=!0,s.selectHyperCubeContinuousRange||(s.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),c.forEach((function(e){return s.selectHyperCubeContinuousRange.ranges.push({qDimIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!1}})})))}if("value"===e.type&&t.dimensionIdx>-1)if(i)if(r&&r.qHyperCube&&("P"===r.qHyperCube.qMode||"T"===r.qHyperCube.qMode||"K"===r.qHyperCube.qMode)){var f=r.qHyperCube,h=f.qNoOfLeftDims,d=f.qEffectiveInterColumnSortOrder.indexOf(t.dimensionIdx);if(s.selectPivotCells||(s.selectPivotCells={path:t.path,cells:[]}),e.id===o||!o){var p=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)}));(0===h||d>=h)&&h>-1?p.forEach((function(e){s.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:d-h})})):p.forEach((function(e){s.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})})),l=!!s.selectPivotCells.cells.length}}else s.selectHyperCubeCells||(s.selectHyperCubeCells={path:t.path,cols:[]}),s.selectHyperCubeCells.cols.push(t.dimensionIdx),e.id!==o&&(o||s.selectHyperCubeCells.values)||(s.selectHyperCubeCells.values=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)})),l=!!s.selectHyperCubeCells.values.length);else{var m=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)}));l=!!m.length,a.push({params:[t.path,t.dimensionIdx,m,!1],method:"selectHyperCubeValues"})}}})),!l&&u)return[{method:"resetMadeSelections",params:[]}];s.rangeSelectHyperCubeValues&&a.push({method:"rangeSelectHyperCubeValues",params:[s.rangeSelectHyperCubeValues.path,s.rangeSelectHyperCubeValues.ranges,[],null===(t=n.orMode)||void 0===t||t]});return s.selectHyperCubeContinuousRange&&a.push({method:"selectHyperCubeContinuousRange",params:[s.selectHyperCubeContinuousRange.path,s.selectHyperCubeContinuousRange.ranges]}),s.selectHyperCubeCells&&a.push({method:"selectHyperCubeCells",params:[s.selectHyperCubeCells.path,s.selectHyperCubeCells.values,s.selectHyperCubeCells.cols]}),s.selectPivotCells&&a.push({method:"selectPivotCells",params:[s.selectPivotCells.path,s.selectPivotCells.cells]}),s.multiRangeSelectTreeDataValues&&a.push({method:"multiRangeSelectTreeDataValues",params:[s.multiRangeSelectTreeDataValues.path,s.multiRangeSelectTreeDataValues.ranges]}),a}function py(e){ny.util=e.data("matrix").util,e.data("q",ny),e.formatter("q-number",Lg),e.formatter("q-time",Zg)}py.qBrushHelper=dy,py.selections=dy;var my={click:"Tap",Click:"Tap",tap:"Tap",pan:"Pan",swipe:"Swipe",rotate:"Rotate",press:"Press",pinch:"Pinch"};function gy(e){return my[e]||e}function yy(e){return function(t,n,r){var i,o,a,s,u=[],l=!0;function c(){"function"==typeof i.enable&&(i.enable=i.enable.bind(o)()),i.enable&&(i.gestures.forEach((function(t){t.options=t.options||{},void 0===t.options.enable&&(t.options.enable=!0),"function"==typeof t.options.enable&&(t.options.enable=t.options.enable.bind(o));var n=gy(t.type);e&&e[n]&&(t.options.event=t.options.event||t.type.toLowerCase(),(a=a||new e.Manager(r)).add(new e[n](t.options)),Object.keys(t.events).forEach((function(e){t.events[e]=t.events[e].bind(o),a.on(e,t.events[e])})),u.push(t))})),i.gestures.forEach((function(t){var n=gy(t.type);e&&e[n]&&(t.recognizeWith&&a.get(t.options.event).recognizeWith(t.recognizeWith.split(" ").filter((function(e){return""!==e}))),t.requireFailure&&a.get(t.options.event).requireFailure(t.requireFailure.split(" ").filter((function(e){return""!==e}))))})))}function f(){u.forEach((function(e){Object.keys(e.events).forEach((function(t){a.off(t,e.events[t])})),a.remove(e.options.event)})),u=[]}return{get key(){return s},set:function(e){!function(e){s=e.key,o={chart:t,mediator:n,settings:i=e},i.gestures=i.gestures||[],void 0===i.enable&&(i.enable=!0)}(e),f(),l&&c()},off:function(){l=!1,f()},on:function(){l=!0,0===u.length&&c()},destroy:function(){f(),a&&a.destroy(),a=null,o=null,i=null}}}}var vy={exports:{}};!function(e){!function(t,n,i,o){var a,s=["","webkit","Moz","MS","ms","o"],u=n.createElement("div"),l=Math.round,c=Math.abs,f=Date.now;function h(e,t,n){return setTimeout(b(e,n),t)}function d(e,t,n){return!!Array.isArray(e)&&(p(e,n[t],n),!0)}function p(e,t,n){var r;if(e)if(e.forEach)e.forEach(t,n);else if(e.length!==o)for(r=0;r<e.length;)t.call(n,e[r],r,e),r++;else for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e)}function m(e,n,r){var i="DEPRECATED METHOD: "+n+"\n"+r+" AT \n";return function(){var n=new Error("get-stack-trace"),r=n&&n.stack?n.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=t.console&&(t.console.warn||t.console.log);return o&&o.call(t.console,i,r),e.apply(this,arguments)}}a="function"!=typeof Object.assign?function(e){if(e===o||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(r!==o&&null!==r)for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])}return t}:Object.assign;var g=m((function(e,t,n){for(var r=Object.keys(t),i=0;i<r.length;)(!n||n&&e[r[i]]===o)&&(e[r[i]]=t[r[i]]),i++;return e}),"extend","Use `assign`."),y=m((function(e,t){return g(e,t,!0)}),"merge","Use `assign`.");function v(e,t,n){var r,i=t.prototype;(r=e.prototype=Object.create(i)).constructor=e,r._super=i,n&&a(r,n)}function b(e,t){return function(){return e.apply(t,arguments)}}function x(e,t){return"function"==r(e)?e.apply(t&&t[0]||o,t):e}function w(e,t){return e===o?t:e}function k(e,t,n){p(q(t),(function(t){e.addEventListener(t,n,!1)}))}function M(e,t,n){p(q(t),(function(t){e.removeEventListener(t,n,!1)}))}function _(e,t){for(;e;){if(e==t)return!0;e=e.parentNode}return!1}function S(e,t){return e.indexOf(t)>-1}function q(e){return e.trim().split(/\s+/g)}function D(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var r=0;r<e.length;){if(n&&e[r][n]==t||!n&&e[r]===t)return r;r++}return-1}function C(e){return Array.prototype.slice.call(e,0)}function E(e,t,n){for(var r=[],i=[],o=0;o<e.length;){var a=t?e[o][t]:e[o];D(i,a)<0&&r.push(e[o]),i[o]=a,o++}return n&&(r=t?r.sort((function(e,n){return e[t]>n[t]})):r.sort()),r}function A(e,t){for(var n,r,i=t[0].toUpperCase()+t.slice(1),a=0;a<s.length;){if((r=(n=s[a])?n+i:t)in e)return r;a++}return o}var T=1;function N(e){var n=e.ownerDocument||e;return n.defaultView||n.parentWindow||t}var R="ontouchstart"in t,O=A(t,"PointerEvent")!==o,I=R&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),P="touch",L="mouse",j=24,z=["x","y"],F=["clientX","clientY"];function H(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){x(e.options.enable,[e])&&n.handler(t)},this.init()}function B(e,t,n){var r=n.pointers.length,i=n.changedPointers.length,a=1&t&&r-i==0,s=12&t&&r-i==0;n.isFirst=!!a,n.isFinal=!!s,a&&(e.session={}),n.eventType=t,function(e,t){var n=e.session,r=t.pointers,i=r.length;n.firstInput||(n.firstInput=V(t));i>1&&!n.firstMultiple?n.firstMultiple=V(t):1===i&&(n.firstMultiple=!1);var a=n.firstInput,s=n.firstMultiple,u=s?s.center:a.center,l=t.center=W(r);t.timeStamp=f(),t.deltaTime=t.timeStamp-a.timeStamp,t.angle=K(u,l),t.distance=Y(u,l),function(e,t){var n=t.center,r=e.offsetDelta||{},i=e.prevDelta||{},o=e.prevInput||{};1!==t.eventType&&4!==o.eventType||(i=e.prevDelta={x:o.deltaX||0,y:o.deltaY||0},r=e.offsetDelta={x:n.x,y:n.y});t.deltaX=i.x+(n.x-r.x),t.deltaY=i.y+(n.y-r.y)}(n,t),t.offsetDirection=$(t.deltaX,t.deltaY);var h=U(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=h.x,t.overallVelocityY=h.y,t.overallVelocity=c(h.x)>c(h.y)?h.x:h.y,t.scale=s?function(e,t){return Y(t[0],t[1],F)/Y(e[0],e[1],F)}(s.pointers,r):1,t.rotation=s?function(e,t){return K(t[1],t[0],F)+K(e[1],e[0],F)}(s.pointers,r):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,function(e,t){var n,r,i,a,s=e.lastInterval||t,u=t.timeStamp-s.timeStamp;if(8!=t.eventType&&(u>25||s.velocity===o)){var l=t.deltaX-s.deltaX,f=t.deltaY-s.deltaY,h=U(u,l,f);r=h.x,i=h.y,n=c(h.x)>c(h.y)?h.x:h.y,a=$(l,f),e.lastInterval=t}else n=s.velocity,r=s.velocityX,i=s.velocityY,a=s.direction;t.velocity=n,t.velocityX=r,t.velocityY=i,t.direction=a}(n,t);var d=e.element;_(t.srcEvent.target,d)&&(d=t.srcEvent.target);t.target=d}(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:f(),pointers:t,center:W(t),deltaX:e.deltaX,deltaY:e.deltaY}}function W(e){var t=e.length;if(1===t)return{x:l(e[0].clientX),y:l(e[0].clientY)};for(var n=0,r=0,i=0;i<t;)n+=e[i].clientX,r+=e[i].clientY,i++;return{x:l(n/t),y:l(r/t)}}function U(e,t,n){return{x:t/e||0,y:n/e||0}}function $(e,t){return e===t?1:c(e)>=c(t)?e<0?2:4:t<0?8:16}function Y(e,t,n){n||(n=z);var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.sqrt(r*r+i*i)}function K(e,t,n){n||(n=z);var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return 180*Math.atan2(i,r)/Math.PI}H.prototype={handler:function(){},init:function(){this.evEl&&k(this.element,this.evEl,this.domHandler),this.evTarget&&k(this.target,this.evTarget,this.domHandler),this.evWin&&k(N(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&M(this.element,this.evEl,this.domHandler),this.evTarget&&M(this.target,this.evTarget,this.domHandler),this.evWin&&M(N(this.element),this.evWin,this.domHandler)}};var X={mousedown:1,mousemove:2,mouseup:4},G="mousedown",J="mousemove mouseup";function Z(){this.evEl=G,this.evWin=J,this.pressed=!1,H.apply(this,arguments)}v(Z,H,{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 Q={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},ee={2:P,3:"pen",4:L,5:"kinect"},te="pointerdown",ne="pointermove pointerup pointercancel";function re(){this.evEl=te,this.evWin=ne,H.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}t.MSPointerEvent&&!t.PointerEvent&&(te="MSPointerDown",ne="MSPointerMove MSPointerUp MSPointerCancel"),v(re,H,{handler:function(e){var t=this.store,n=!1,r=e.type.toLowerCase().replace("ms",""),i=Q[r],o=ee[e.pointerType]||e.pointerType,a=o==P,s=D(t,e.pointerId,"pointerId");1&i&&(0===e.button||a)?s<0&&(t.push(e),s=t.length-1):12&i&&(n=!0),s<0||(t[s]=e,this.callback(this.manager,i,{pointers:t,changedPointers:[e],pointerType:o,srcEvent:e}),n&&t.splice(s,1))}});var ie={touchstart:1,touchmove:2,touchend:4,touchcancel:8},oe="touchstart",ae="touchstart touchmove touchend touchcancel";function se(){this.evTarget=oe,this.evWin=ae,this.started=!1,H.apply(this,arguments)}function ue(e,t){var n=C(e.touches),r=C(e.changedTouches);return 12&t&&(n=E(n.concat(r),"identifier",!0)),[n,r]}v(se,H,{handler:function(e){var t=ie[e.type];if(1===t&&(this.started=!0),this.started){var n=ue.call(this,e,t);12&t&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:P,srcEvent:e})}}});var le={touchstart:1,touchmove:2,touchend:4,touchcancel:8},ce="touchstart touchmove touchend touchcancel";function fe(){this.evTarget=ce,this.targetIds={},H.apply(this,arguments)}function he(e,t){var n=C(e.touches),r=this.targetIds;if(3&t&&1===n.length)return r[n[0].identifier]=!0,[n,n];var i,o,a=C(e.changedTouches),s=[],u=this.target;if(o=n.filter((function(e){return _(e.target,u)})),1===t)for(i=0;i<o.length;)r[o[i].identifier]=!0,i++;for(i=0;i<a.length;)r[a[i].identifier]&&s.push(a[i]),12&t&&delete r[a[i].identifier],i++;return s.length?[E(o.concat(s),"identifier",!0),s]:void 0}v(fe,H,{handler:function(e){var t=le[e.type],n=he.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:P,srcEvent:e})}});function de(){H.apply(this,arguments);var e=b(this.handler,this);this.touch=new fe(this.manager,e),this.mouse=new Z(this.manager,e),this.primaryTouch=null,this.lastTouches=[]}function pe(e,t){1&e?(this.primaryTouch=t.changedPointers[0].identifier,me.call(this,t)):12&e&&me.call(this,t)}function me(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY};this.lastTouches.push(n);var r=this.lastTouches;setTimeout((function(){var e=r.indexOf(n);e>-1&&r.splice(e,1)}),2500)}}function ge(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],o=Math.abs(t-i.x),a=Math.abs(n-i.y);if(o<=25&&a<=25)return!0}return!1}v(de,H,{handler:function(e,t,n){var r=n.pointerType==P,i=n.pointerType==L;if(!(i&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(r)pe.call(this,t,n);else if(i&&ge.call(this,n))return;this.callback(e,t,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var ye=A(u.style,"touchAction"),ve=ye!==o,be="compute",xe="auto",we="manipulation",ke="none",Me="pan-x",_e="pan-y",Se=function(){if(!ve)return!1;var e={},n=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(r){e[r]=!n||t.CSS.supports("touch-action",r)})),e}();function qe(e,t){this.manager=e,this.set(t)}qe.prototype={set:function(e){e==be&&(e=this.compute()),ve&&this.manager.element.style&&Se[e]&&(this.manager.element.style[ye]=e),this.actions=e.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var e=[];return p(this.manager.recognizers,(function(t){x(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))})),function(e){if(S(e,ke))return ke;var t=S(e,Me),n=S(e,_e);if(t&&n)return ke;if(t||n)return t?Me:_e;if(S(e,we))return we;return xe}(e.join(" "))},preventDefaults:function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented)t.preventDefault();else{var r=this.actions,i=S(r,ke)&&!Se.none,o=S(r,_e)&&!Se["pan-y"],a=S(r,Me)&&!Se["pan-x"];if(i){var s=1===e.pointers.length,u=e.distance<2,l=e.deltaTime<250;if(s&&u&&l)return}if(!a||!o)return i||o&&6&n||a&&n&j?this.preventSrc(t):void 0}},preventSrc:function(e){this.manager.session.prevented=!0,e.preventDefault()}};var De=32;function Ce(e){this.options=a({},this.defaults,e||{}),this.id=T++,this.manager=null,this.options.enable=w(this.options.enable,!0),this.state=1,this.simultaneous={},this.requireFail=[]}function Ee(e){return 16&e?"cancel":8&e?"end":4&e?"move":2&e?"start":""}function Ae(e){return 16==e?"down":8==e?"up":2==e?"left":4==e?"right":""}function Te(e,t){var n=t.manager;return n?n.get(e):e}function Ne(){Ce.apply(this,arguments)}function Re(){Ne.apply(this,arguments),this.pX=null,this.pY=null}function Oe(){Ne.apply(this,arguments)}function Ie(){Ce.apply(this,arguments),this._timer=null,this._input=null}function Pe(){Ne.apply(this,arguments)}function Le(){Ne.apply(this,arguments)}function je(){Ce.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function ze(e,t){return(t=t||{}).recognizers=w(t.recognizers,ze.defaults.preset),new Fe(e,t)}Ce.prototype={defaults:{},set:function(e){return a(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=Te(e,this)).id]||(t[e.id]=e,e.recognizeWith(this)),this},dropRecognizeWith:function(e){return d(e,"dropRecognizeWith",this)||(e=Te(e,this),delete this.simultaneous[e.id]),this},requireFailure:function(e){if(d(e,"requireFailure",this))return this;var t=this.requireFail;return-1===D(t,e=Te(e,this))&&(t.push(e),e.requireFailure(this)),this},dropRequireFailure:function(e){if(d(e,"dropRequireFailure",this))return this;e=Te(e,this);var t=D(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(e){return!!this.simultaneous[e.id]},emit:function(e){var t=this,n=this.state;function r(n){t.manager.emit(n,e)}n<8&&r(t.options.event+Ee(n)),r(t.options.event),e.additionalEvent&&r(e.additionalEvent),n>=8&&r(t.options.event+Ee(n))},tryEmit:function(e){if(this.canEmit())return this.emit(e);this.state=De},canEmit:function(){for(var e=0;e<this.requireFail.length;){if(!(33&this.requireFail[e].state))return!1;e++}return!0},recognize:function(e){var t=a({},e);if(!x(this.options.enable,[this,t]))return this.reset(),void(this.state=De);56&this.state&&(this.state=1),this.state=this.process(t),30&this.state&&this.tryEmit(t)},process:function(e){},getTouchAction:function(){},reset:function(){}},v(Ne,Ce,{defaults:{pointers:1},attrTest:function(e){var t=this.options.pointers;return 0===t||e.pointers.length===t},process:function(e){var t=this.state,n=e.eventType,r=6&t,i=this.attrTest(e);return r&&(8&n||!i)?16|t:r||i?4&n?8|t:2&t?4|t:2:De}}),v(Re,Ne,{defaults:{event:"pan",threshold:10,pointers:1,direction:30},getTouchAction:function(){var e=this.options.direction,t=[];return 6&e&&t.push(_e),e&j&&t.push(Me),t},directionTest:function(e){var t=this.options,n=!0,r=e.distance,i=e.direction,o=e.deltaX,a=e.deltaY;return i&t.direction||(6&t.direction?(i=0===o?1:o<0?2:4,n=o!=this.pX,r=Math.abs(e.deltaX)):(i=0===a?1:a<0?8:16,n=a!=this.pY,r=Math.abs(e.deltaY))),e.direction=i,n&&r>t.threshold&&i&t.direction},attrTest:function(e){return Ne.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=Ae(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),v(Oe,Ne,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[ke]},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)}}),v(Ie,Ce,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[xe]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,r=e.distance<t.threshold,i=e.deltaTime>t.time;if(this._input=e,!r||!n||12&e.eventType&&!i)this.reset();else if(1&e.eventType)this.reset(),this._timer=h((function(){this.state=8,this.tryEmit()}),t.time,this);else if(4&e.eventType)return 8;return De},reset:function(){clearTimeout(this._timer)},emit:function(e){8===this.state&&(e&&4&e.eventType?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=f(),this.manager.emit(this.options.event,this._input)))}}),v(Pe,Ne,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[ke]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)}}),v(Le,Ne,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return Re.prototype.getTouchAction.call(this)},attrTest:function(e){var t,n=this.options.direction;return 30&n?t=e.overallVelocity:6&n?t=e.overallVelocityX:n&j&&(t=e.overallVelocityY),this._super.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&c(t)>this.options.velocity&&4&e.eventType},emit:function(e){var t=Ae(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),v(je,Ce,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[we]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,r=e.distance<t.threshold,i=e.deltaTime<t.time;if(this.reset(),1&e.eventType&&0===this.count)return this.failTimeout();if(r&&i&&n){if(4!=e.eventType)return this.failTimeout();var o=!this.pTime||e.timeStamp-this.pTime<t.interval,a=!this.pCenter||Y(this.pCenter,e.center)<t.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,a&&o?this.count+=1:this.count=1,this._input=e,0===this.count%t.taps)return this.hasRequireFailures()?(this._timer=h((function(){this.state=8,this.tryEmit()}),t.interval,this),2):8}return De},failTimeout:function(){return this._timer=h((function(){this.state=De}),this.options.interval,this),De},reset:function(){clearTimeout(this._timer)},emit:function(){8==this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),ze.VERSION="2.0.7",ze.defaults={domEvents:!1,touchAction:be,enable:!0,inputTarget:null,inputClass:null,preset:[[Pe,{enable:!1}],[Oe,{enable:!1},["rotate"]],[Le,{direction:6}],[Re,{direction:6},["swipe"]],[je],[je,{event:"doubletap",taps:2},["tap"]],[Ie]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};function Fe(e,t){var n;this.options=a({},ze.defaults,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=new((n=this).options.inputClass||(O?re:I?fe:R?de:Z))(n,B),this.touchAction=new qe(this,this.options.touchAction),He(this,!0),p(this.options.recognizers,(function(e){var t=this.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])}),this)}function He(e,t){var n,r=e.element;r.style&&(p(e.options.cssProps,(function(i,o){n=A(r.style,o),t?(e.oldCssProps[n]=r.style[n],r.style[n]=i):r.style[n]=e.oldCssProps[n]||""})),t||(e.oldCssProps={}))}Fe.prototype={set:function(e){return a(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},stop:function(e){this.session.stopped=e?2:1},recognize:function(e){var t=this.session;if(!t.stopped){var n;this.touchAction.preventDefaults(e);var r=this.recognizers,i=t.curRecognizer;(!i||i&&8&i.state)&&(i=t.curRecognizer=null);for(var o=0;o<r.length;)n=r[o],2===t.stopped||i&&n!=i&&!n.canRecognizeWith(i)?n.reset():n.recognize(e),!i&&14&n.state&&(i=t.curRecognizer=n),o++}},get:function(e){if(e instanceof Ce)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=D(t,e);-1!==n&&(t.splice(n,1),this.touchAction.update())}return this},on:function(e,t){if(e!==o&&t!==o){var n=this.handlers;return p(q(e),(function(e){n[e]=n[e]||[],n[e].push(t)})),this}},off:function(e,t){if(e!==o){var n=this.handlers;return p(q(e),(function(e){t?n[e]&&n[e].splice(D(n[e],t),1):delete n[e]})),this}},emit:function(e,t){this.options.domEvents&&function(e,t){var r=n.createEvent("Event");r.initEvent(e,!0,!0),r.gesture=t,t.target.dispatchEvent(r)}(e,t);var r=this.handlers[e]&&this.handlers[e].slice();if(r&&r.length){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var i=0;i<r.length;)r[i](t),i++}},destroy:function(){this.element&&He(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},a(ze,{INPUT_START:1,INPUT_MOVE:2,INPUT_END:4,INPUT_CANCEL:8,STATE_POSSIBLE:1,STATE_BEGAN:2,STATE_CHANGED:4,STATE_ENDED:8,STATE_RECOGNIZED:8,STATE_CANCELLED:16,STATE_FAILED:De,DIRECTION_NONE:1,DIRECTION_LEFT:2,DIRECTION_RIGHT:4,DIRECTION_UP:8,DIRECTION_DOWN:16,DIRECTION_HORIZONTAL:6,DIRECTION_VERTICAL:j,DIRECTION_ALL:30,Manager:Fe,Input:H,TouchAction:qe,TouchInput:fe,MouseInput:Z,PointerEventInput:re,TouchMouseInput:de,SingleTouchInput:se,Recognizer:Ce,AttrRecognizer:Ne,Tap:je,Pan:Re,Swipe:Le,Pinch:Oe,Rotate:Pe,Press:Ie,on:k,off:M,each:p,merge:y,extend:g,assign:a,inherit:v,bindFn:b,prefixed:A}),(void 0!==t?t:"undefined"!=typeof self?self:{}).Hammer=ze,e.exports?e.exports=ze:t.Hammer=ze}(window,document)}(vy);var by=vy.exports;function xy(e){e.component("event-area",{mounted:function(e){e.classList.add("event-area"),e.style.pointerEvents="auto",e.style.zIndex=1},render:function(){return[]}})}var wy={renderer:"dom",disableTriggers:!0,preferredSize:function(){return 22},render:function(e){var t=this.settings,n=t.settings,r=n.label,i=n.rtl,o=t.layout.dock,a="top"!==o&&"bottom"!==o||!i?"ltr":"rtl",s=function(e,t){var n={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",color:"#7b7a78",fontStyle:"italic",fontSize:"13px"};switch(e){case"left":n.width="".concat(t.height,"px"),n.transform="rotate(-90deg) translate(-".concat(t.height,"px, 0)"),n.transformOrigin="top left";break;case"right":n.width="".concat(t.height,"px"),n.transform="rotate(90deg) translate(0, -".concat(t.width,"px)"),n.transformOrigin="top left";break;case"center":n.width="".concat(t.width,"px"),n.height="".concat(t.height,"px"),n.color="#595959",n.fontStyle="normal",n.fontSize="1.2em",n.textAlign="center";break;default:case"top":case"bottom":n.justifyContent="flex-start",n.alignItems="flex-start"}return n}(o,this.rect),u="center"===o?r:"* ".concat(r),l="center"!==o?{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}:{};return e("div",{style:s,dir:a},e("span",{ref:this.alignToRef,style:l,title:u},u))}};function ky(){var e=gm();return e.renderer.prio(["canvas"]),e.use(py),e.use(function(e){if("function"!=typeof e.interaction)return function(t){t.interaction("hammer",yy(e))};e.interaction("hammer",yy(Hammer))}(by)),e.use(xy),e.component("disclaimer",wy),e}var My={shapes:[{type:"path",attrs:{d:"M15.9488039,5.20769129 C16.0487326,6.70662306 15.3492311,8.30548361 14.050157,9.30477145 C12.651154,10.5039169 10.8524359,10.8037032 8.85386017,10.4039881 L7.3549284,10.0042729 L5.75606786,9.70448659 C5.75606786,9.90434416 5.65613907,10.0042729 5.4562815,10.2041305 C5.05656637,10.6038456 4.55692244,10.8037032 4.05727852,10.8037032 C3.75749217,10.8037032 3.45770582,10.7037744 3.15791946,10.6038456 C3.05799068,10.903632 3.15791946,11.2034184 3.45770582,11.7030623 C5.05656637,14.0014243 3.85742095,15.9000712 3.75749217,16 L2.2585604,15.3004985 C2.2585604,15.2005697 2.95806189,14.0014243 1.95877405,12.6024213 C1.6589877,12.0028486 1.15934378,11.0035608 1.55905891,10.0042729 C1.6589877,9.80441537 1.75891648,9.6045578 1.95877405,9.40470024 C1.6589877,8.90505631 1.55905891,8.30548361 1.85884527,7.7059109 C1.55905891,7.40612455 1.25927256,7.1063382 1.15934378,6.70662306 C0.859557424,5.90719279 0.959486209,4.5081898 1.6589877,3.30904439 C1.95877405,2.6095429 2.55834676,2.0099702 3.15791946,1.51032628 C3.95734974,0.91075357 4.95663758,0.610967217 6.15578299,0.311180864 C9.05371774,-0.388320626 11.9516525,0.111323295 13.9502282,1.61025506 C15.1493736,2.50961412 15.8488751,3.80868831 15.9488039,5.20769129 Z M13.0508691,8.10562604 C13.8502994,7.40612455 14.3499433,6.40683671 14.3499433,5.30762008 C14.2500145,4.20840345 13.550513,3.40897318 12.9509403,2.90932926 C12.1515101,2.40968533 11.252151,2.0099702 10.1529344,1.81011263 C8.95378895,1.61025506 7.75464354,1.71018384 6.45556935,1.91004141 C4.75678001,2.30975655 3.65756338,3.00925804 3.05799068,4.10847467 C2.55834676,5.00783373 2.65827554,5.90719279 2.75820433,6.20697914 C2.75820433,6.30690792 2.85813311,6.40683671 3.05799068,6.40683671 C3.15791946,6.40683671 3.25784825,6.40683671 3.35777703,6.40683671 C3.45770582,6.40683671 3.45770582,6.40683671 3.45770582,6.40683671 L3.5576346,6.40683671 L3.65756338,6.40683671 C4.65685123,6.40683671 5.4562815,6.90648063 5.85599664,7.80583969 L5.85599664,8.00569726 C6.35564056,8.10562604 7.05514205,8.30548361 7.75464354,8.50534118 L9.25357531,8.90505631 C10.0530056,9.0049851 10.7525071,9.0049851 11.4520086,8.80512753 C12.0515813,8.70519875 12.5512252,8.40541239 13.0508691,8.10562604 Z"}}]};var _y={AUTO:!0,BIN_COUNT:10,BIN_SIZE:10,LABEL:"x",OFFSET:0,COUNT_DISTINCT:!1,BIN_MODE:"maxCount"};Object.freeze(_y);var Sy={version:"0.31.1",qHyperCubeDef:{qDimensions:[],qMeasures:[],qMode:"S",qAlwaysFullyExpanded:!0,qSuppressZero:!1,qSuppressMissing:!0},bins:{auto:_y.AUTO,binCount:"",binSize:_y.BIN_SIZE,offset:_y.OFFSET,countDistinct:_y.COUNT_DISTINCT,binMode:_y.BIN_MODE},color:{bar:{paletteColor:{index:6,color:"#4477aa"}}},dataPoint:{showLabels:!1},dimensionAxis:{dock:"near",label:"auto",show:"all"},measureAxis:{autoMinMax:!0,dock:"near",label:"",max:10,min:0,minMax:"min",show:"all",spacing:1},gridlines:{auto:!0,spacing:2},refLine:{refLines:[]},sorting:{autoSort:!0},showTitles:!0,subtitle:"",title:"",footnote:""};function qy(e){var t=e.translator;return{path:"/qHyperCubeDef",dimensions:{min:1,max:1,description:function(){return t.get("Visualization.Histogram.Binning")}},measures:{min:0,max:0}}}function Dy(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Cy(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Ey(){}var Ay=1/.7,Ty="\\s*([+-]?\\d+)\\s*",Ny="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ry="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Oy=/^#([0-9a-f]{3,8})$/,Iy=new RegExp("^rgb\\("+[Ty,Ty,Ty]+"\\)$"),Py=new RegExp("^rgb\\("+[Ry,Ry,Ry]+"\\)$"),Ly=new RegExp("^rgba\\("+[Ty,Ty,Ty,Ny]+"\\)$"),jy=new RegExp("^rgba\\("+[Ry,Ry,Ry,Ny]+"\\)$"),zy=new RegExp("^hsl\\("+[Ny,Ry,Ry]+"\\)$"),Fy=new RegExp("^hsla\\("+[Ny,Ry,Ry,Ny]+"\\)$"),Hy={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 By(){return this.rgb().formatHex()}function Vy(){return this.rgb().formatRgb()}function Wy(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Oy.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Uy(t):3===n?new Ky(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?$y(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?$y(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=Iy.exec(e))?new Ky(t[1],t[2],t[3],1):(t=Py.exec(e))?new Ky(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Ly.exec(e))?$y(t[1],t[2],t[3],t[4]):(t=jy.exec(e))?$y(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=zy.exec(e))?Zy(t[1],t[2]/100,t[3]/100,1):(t=Fy.exec(e))?Zy(t[1],t[2]/100,t[3]/100,t[4]):Hy.hasOwnProperty(e)?Uy(Hy[e]):"transparent"===e?new Ky(NaN,NaN,NaN,0):null}function Uy(e){return new Ky(e>>16&255,e>>8&255,255&e,1)}function $y(e,t,n,r){return r<=0&&(e=t=n=NaN),new Ky(e,t,n,r)}function Yy(e){return e instanceof Ey||(e=Wy(e)),e?new Ky((e=e.rgb()).r,e.g,e.b,e.opacity):new Ky}function Ky(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Xy(){return"#"+Jy(this.r)+Jy(this.g)+Jy(this.b)}function Gy(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function Jy(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Zy(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new ev(e,t,n,r)}function Qy(e){if(e instanceof ev)return new ev(e.h,e.s,e.l,e.opacity);if(e instanceof Ey||(e=Wy(e)),!e)return new ev;if(e instanceof ev)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new ev(a,s,u,e.opacity)}function ev(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function tv(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function nv(e,t,n){if(void 0===e||void 0===t)return n;for(var r=t.split("."),i=e,o=0;o<r.length;++o){var a=r[o];if(void 0===i[a])return n;i=i[a]}return i}function rv(e,t,n){if(void 0!==e&&void 0!==t){for(var r=t.split("."),i=r[r.length-1],o=e,a=0;a<r.length-1;++a){var s=r[a];void 0===o[s]&&(o[s]=Number.isNaN(+r[a+1])?{}:[]),o=o[s]}void 0!==n?o[i]=n:delete o[i]}}function iv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ov(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function av(e,t,n){return t&&ov(e.prototype,t),n&&ov(e,n),e}function sv(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Dy(Ey,Wy,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:By,formatHex:By,formatHsl:function(){return Qy(this).formatHsl()},formatRgb:Vy,toString:Vy}),Dy(Ky,(function(e,t,n,r){return 1===arguments.length?Yy(e):new Ky(e,t,n,null==r?1:r)}),Cy(Ey,{brighter:function(e){return e=null==e?Ay:Math.pow(Ay,e),new Ky(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Ky(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Xy,formatHex:Xy,formatRgb:Gy,toString:Gy})),Dy(ev,(function(e,t,n,r){return 1===arguments.length?Qy(e):new ev(e,t,n,null==r?1:r)}),Cy(Ey,{brighter:function(e){return e=null==e?Ay:Math.pow(Ay,e),new ev(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new ev(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Ky(tv(e>=240?e-240:e+120,i,r),tv(e,i,r),tv(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var uv,lv=(function(e){
21
21
  /*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
22
22
  e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,i,o,a,s,u,l,c,f,h=e.length,d=e.search(/[0-9\-\+#]/),p=d>0?e.substring(0,d):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),y=h-g,v=e.substring(y,y+1),b=y+("."===v||","===v?1:0),x=g>0?e.substring(b,h):"";if(n=(t="-"===(e=e.substring(d,b)).charAt(0)?-t:+t)<0?t=-t:0,i=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",o=r&&r[1]&&r[0]||",",e=e.split(i),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(l=t.split("."))[1]||l[1]&&l[1].length<=s)&&(t=(+t).toFixed(s+1)),c=e[0].split(o),e[0]=c.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;l[0].length<e[0].length-a;)l[0]="0"+l[0];else 0==+l[0]&&(l[0]="");if((t=t.split("."))[0]=l[0],u=c[1]&&c[c.length-1].length){for(m="",y=(f=t[0]).length%u,h=f.length,b=0;b<h;b++)m+=f.charAt(b),!((b-y+1)%u)&&b<h-u&&(m+=o);t[0]=m}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),p+(n?"-":"")+r+x}}(uv={exports:{}}),uv.exports);function cv(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}var fv={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"},hv=/%$/,dv=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,pv=/^\(oct\)/i,mv=/^\(dec\)/i,gv=/^\(hex\)/i,yv=/^\(bin\)/i,vv=/^\(rom\)/i,bv=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,xv=/#|0/g;function wv(e,t,n,r){return e=e.toString(t),n[1]===n[1].toUpperCase()&&(e=e.toUpperCase()),e.length-e.indexOf(".")>10&&(e=e.slice(0,e.indexOf(".")+11)),e.replace(".",r||".")}function kv(e,t,n){var r=cv(e);return n?r:new RegExp(r||"",t)}function Mv(e,t,n){var r,i,o,a,s,u,l,c,f,h,d,p=e.pattern;p.indexOf("A")>=0&&(p=p.replace("A",""),e.abbreviate=!0),h=t,(d=n)&&(d=cv(d)),h&&(h=cv(h)),f=new RegExp("(?:[#0]+".concat(h,")?[#0]+(?:").concat(d,"[#0]+)?")),a=(o=(o=p.match(f))?o[0]:"")?p.substr(0,p.indexOf(o)):p,s=o?p.substring(p.indexOf(o)+o.length):"",o||(o=p?"#":"##########"),t&&t===n&&(i=(r=o.split(n)).pop(),o=r.join("")+n+i,t=""),u=t,t=/,/.test(n)?"¤":",",u&&(o=o.replace(kv(u,"g"),t)),l=n,n=".",l&&(o=o.replace(kv(l,"g"),n)),c=(c=o.match(/#/g))?c.length:0;var m,g=p.split(l);g[1]&&(m=g[1].match(xv)),e.prefix=a||"",e.postfix=s||"",e.pattern=p,e.maxPrecision=m?m.length:2,e.percentage=hv.test(p),e.numericPattern=o||"",e.numericRegex=new RegExp("".concat(kv(t,null,!0),"|").concat(kv(n,null,!0)),"g"),e.groupTemp=u,e.decTemp=l,e.t=t,e.d=n,e.temp=c}!function(){function e(t,n,r,i,o){iv(this,e),this.localeInfo=t,this.pattern=n,this.thousandDelimiter=r||",",this.decimalDelimiter=i||".",this.type=o||"numeric",this.patternSeparator=";",this.abbreviations=function(e,t){if(!e||!e.qNumericalAbbreviation)return fv;var n={};return e.qNumericalAbbreviation.split(t).forEach((function(e){var t=e.split(":");2===t.length&&(n[t[0]]=t[1])})),n}(t,this.patternSeparator),this.prepare()}av(e,[{key:"clone",value:function(){var t=new e(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return t.subtype=this.subtype,t}},{key:"format",value:function(e,t,n,r){return this.prepare(t,n,r),this.formatValue(e)}},{key:"prepare",value:function(e,t,n){var r;void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===n&&(n=this.decimalDelimiter),e?(this._prepared={positive:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},negative:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},zero:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""}},r=this._prepared,e=e.split(this.patternSeparator),r.positive.pattern=e[0],r.negative.pattern=e[1],r.zero.pattern=e[2],bv.test(e[0])&&(r.positive.isFunctional=!0),e[1]?bv.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?bv.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1,r.positive.isFunctional||Mv(r.positive,t,n),r.negative&&!r.negative.isFunctional&&Mv(r.negative,t,n),r.zero&&!r.zero.isFunctional&&Mv(r.zero,t,n)):this._prepared={pattern:!1}}},{key:"formatValue",value:function(e){var t,n,r,i,o,a,s,u,l,c=this._prepared,f="",h="",d=e;if(isNaN(e))return"".concat(d);if(e=+e,!1===c.pattern)return e.toString();if(0===e&&c.zero)return(c=c.zero).pattern;if(e<0&&c.negative?(c=c.negative,e=-e):c=c.positive,o=c.d,a=c.t,c.isFunctional)e=function(e,t,n){var r;return dv.test(t)?e=wv(e,Number(/\d{2}/.exec(t)[0]),t,n):pv.test(t)?e=wv(e,8,t,n):mv.test(t)?e=wv(e,10,t,n):gv.test(t)?e=wv(e,16,t,n):yv.test(t)?e=wv(e,2,t,n):vv.test(t)&&(r="",e<0&&(r="-",e=-e),e=0===(e=Math.floor(e))?"0":e<=5e5?r+(e=function(e,t){for(var n,r="",i=Number(String(e).slice(-3)),o=(e-i)/1e3,a=[0,1,4,5,9,10,40,50,90,100,400,500,900].reverse(),s=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();i>0;)for(n=0;n<a.length;n++)if(a[n]<=i){r+=s[n],i-=a[n];break}for(n=0;n<o;n++)r="M".concat(r);return t[1]!==t[1].toUpperCase()&&(r=r.toLowerCase()),r}(e,t)):t+r+e.toExponential(0)),e}(e,c.pattern,o);else{if(c.percentage&&(e*=100),c.abbreviate){var p,m,g=Object.keys(this.abbreviations).map((function(e){return parseInt(e,10)})).sort((function(e,t){return e-t})),y=g[0];for(s=0,n=Number(Number(e).toExponential().split("e")[1]);y<=n&&s<g.length;)y=g[++s];s>0&&(p=g[s-1]),p&&n>0&&p>0?m=p:(n<0&&p<0||!p)&&(y<0&&y-n<=c.maxPrecision?m=y:p<=n&&!(y>0&&-n<=c.maxPrecision)&&(m=p)),m&&(f=this.abbreviations[m],e/=Math.pow(10,m))}if(r=Math.abs(e),t=c.temp,l=(u=c.numericPattern).split(o)[1],"I"===this.type&&(e=Math.round(e)),i=e,l||"#"!==u.slice(-1)[0])if(r>=1e15||r>0&&r<=1e-14)e=r?r.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{var v=Number(e.toFixed(Math.min(20,l?l.length:0)).split(".")[0]),b=u.split(o)[0];if(e=lv(b+=o,v)||"0",l){var x=Math.max(0,Math.min(14,l.length)),w=l.replace(/#+$/,"").length,k=("I"===this.type?0:r%1).toFixed(x).slice(2).replace(/0+$/,"");for(s=k.length;s<w;s++)k+="0";k&&(e+=o+k)}else 0===v&&(i=0)}else if(r>=Math.pow(10,t)||r<1||r<1e-4)0===e?e="0":r<1e-4||r>=1e20?(e=(e=i.toExponential(Math.max(1,Math.min(14,t))-1)).replace(/\.?0+(?=e)/,""),h=""):(e=e.toPrecision(Math.max(1,Math.min(14,t)))).indexOf(".")>=0&&(e=(e=e.replace(e.indexOf("e")<0?/0+$/:/\.?0+(?=e)/,"")).replace(".",o));else{for(u+=o,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(r)/Math.log(10)))),s=0;s<t;s++)u+="#";e=lv(u,e)}e=e.replace(c.numericRegex,(function(e){return e===a?c.groupTemp:e===o?c.decTemp:""})),i<0&&!/^-/.test(e)&&(e="-".concat(e))}return c.prefix+e+h+f+c.postfix}}],[{key:"getStaticFormatter",value:function(){return{prepare:function(){},formatValue:function(e){return"".concat(e)}}}}])}();var _v=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Sv=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],qv=["January","February","March","April","May","June","July","August","September","October","November","December"],Dv=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Cv(e,t){for(var n=e.length;n<t;n++)e="0".concat(e);return e}function Ev(e){var t=e.toString().split(".");return t[1]?t=Number("0.".concat(t[1])):0}!function(){function e(t,n,r){iv(this,e);var i,o=t||{};o.qCalendarStrings||(o.qCalendarStrings={qLongDayNames:_v,qDayNames:Sv,qLongMonthNames:qv,qMonthNames:Dv}),this.localeInfo=o,this.locale_days=o.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=o.qCalendarStrings.qDayNames.slice(),this.locale_months=o.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=o.qCalendarStrings.qMonthNames.slice(),n||(n=(sv(i={},"T",o.qTimeFmt||"hh:mm:ss"),sv(i,"D",o.qDateFmt||"YYYY-MM-DD"),sv(i,"TS",o.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"),i)[r]),this.pattern=n}av(e,[{key:"clone",value:function(){var t=new e(this.localeInfo,this.pattern);return t.subtype=this.subtype,t}},{key:"format",value:function(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+]|\[|]/g,"");var n,r,i,o,a,s=/t+/gi.test(t);e instanceof Date?(i=s,o=(r=e).getUTCHours(),i&&((o%=12)||(o=12)),(a=r.getUTCDay()-1)<0&&(a=6),n={year:r.getUTCFullYear(),month:r.getUTCMonth(),day:a,date:r.getUTCDate(),h:o,m:r.getUTCMinutes(),s:r.getUTCSeconds(),f:r.getUTCMilliseconds(),t:r.getUTCHours()>=12?"pm":"am"}):(e<0&&(e=-e,t="-".concat(t)),n=function(e,t){var n,r=function(e){var t=e,n=24*Ev(t),r=60*Ev(n),i=60*Ev(r),o=1e3*Ev(i);return{d:Math.floor(t),h:Math.floor(n),m:Math.floor(r),s:Math.floor(i),f:Math.round(o)}}(e),i=r.d,o=r.h,a=r.m,s=r.s,u=r.f,l=0;/w+|t+/gi.test(t)&&(n=new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,Math.round(86400*(e-Math.floor(e))))),isNaN(n.getTime())&&(n=null)),/D+/gi.test(t)||(o+=24*i),/h+/gi.test(t)||(a+=60*o),/m+/gi.test(t)||(s+=60*a),/w+/gi.test(t)&&(l=n?n.getDay()-1:0)<0&&(l=6);var c="";return n&&(c=n.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:l,date:i,h:o,m:a,s:s,f:u,t:c}}(e,t));var u=function(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:Cv("".concat(t.year).slice(-2),2),YYY:Cv("".concat(t.year).slice(-3),3),def:function(e){return Cv("".concat(t.year),e.length)}},"M+":{M:t.month+1,MM:Cv("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:Cv("".concat(t.day),2),WWW:e.locale_days_abbr[t.day],def:e.locale_days[t.day]},"D+|d+":{D:t.date,def:function(e){return Cv("".concat(t.date),e.length)}},"h+|H+":{h:t.h,def:function(e){return Cv("".concat(t.h),e.length)}},"m+":{m:t.m,def:function(e){return Cv("".concat(t.m),e.length)}},"s+|S+":{s:t.s,def:function(e){return Cv("".concat(t.s),e.length)}},"f+|F+":{def:function(e){var n="".concat(t.f),r=e.length-n.length;if(r>0)for(var i=0;i<r;i++)n+="0";else r<0&&(n=n.slice(0,e.length));return n}},"t{1,2}|T{1,2}":{def:function(e){var n=t.t;return e[0].toUpperCase()===e[0]&&(n=n.toUpperCase()),n.slice(0,e.length)}}}}(this,n),l=[];for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&l.push(c);var f=new RegExp(l.join("|"),"g");return t.replace(f,(function(e){var t,n,r;for(n in u)if(Object.prototype.hasOwnProperty.call(u,n)&&(t=new RegExp(n)).test(e))break;if(!t)return"";for(var i in u[n])if(i===e||i.toLowerCase()===e){void 0===(r=u[n][i])&&(r=u[n][i.toLowerCase()]);break}return void 0===r&&(r=u[n].def),"function"==typeof r&&(r=r(e)),r}))}}])}();var Av=Object.prototype.hasOwnProperty,Tv=Object.prototype.toString,Nv=Object.defineProperty,Rv=Object.getOwnPropertyDescriptor,Ov=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Tv.call(e)},Iv=function(e){if(!e||"[object Object]"!==Tv.call(e))return!1;var t,n=Av.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Av.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||Av.call(e,t)},Pv=function(e,t){Nv&&"__proto__"===t.name?Nv(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Lv=function(e,t){if("__proto__"===t){if(!Av.call(e,t))return;if(Rv)return Rv(e,t).value}return e[t]},jv=function e(){var t,n,i,o,a,s,u=arguments[0],l=1,c=arguments.length,f=!1;for("boolean"==typeof u&&(f=u,u=arguments[1]||{},l=2),(null==u||"object"!==r(u)&&"function"!=typeof u)&&(u={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)i=Lv(u,n),u!==(o=Lv(t,n))&&(f&&o&&(Iv(o)||(a=Ov(o)))?(a?(a=!1,s=i&&Ov(i)?i:[]):s=i&&Iv(i)?i:{},Pv(u,{name:n,newValue:e(f,s,o)})):void 0!==o&&Pv(u,{name:n,newValue:o}));return u},zv=/xyz/.test((function(){}))?/\b_super\b/:/.*/,Fv=function(){};Fv.extend=function e(t,n){var r=this.prototype;"string"!=typeof t&&(n=t,t="Class");var i=Object.create(this.prototype);for(var o in n)i[o]="function"==typeof n[o]&&"function"==typeof r[o]&&zv.test(n[o])?function(e,t){return function(){var n=this._super;this._super=r[e];var i=t.apply(this,arguments);return this._super=n,i}}(o,n[o]):n[o];if(!/^[_a-z][_a-z\d]*$/i.test(t))throw new Error("Invalid subclass name. Alphanumericals only.");var a=new Function("return (function ".concat(t,"(){ typeof this.init === 'function' && this.init.apply(this, [].slice.call(arguments)) });"))();return a.prototype=i,a.prototype.constructor=a,a.extend=e,a};var Hv={getChar:function(e){var t,n=e;return n>9?(t=65+n-10)>90&&(t+=6):n="".concat(n).charCodeAt(0),[48,111,79,105,73,108].indexOf(t)>-1?this.getChar(n+1):String.fromCharCode(t)},base62:function(e){var t=this.getChar(e%62),n=Math.floor(e/62);return n>0?this.base62(n)+t:t},id:function(){return this.base62(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};function Bv(){return Hv.id()}var Vv="scrollbar";function Wv(e,t,n){return"y"===e?Uv(t,n):function(e){return"far"===e?"top":"bottom"}(t)}function Uv(e,t){var n=e||"near";return t&&"near"===n||!t&&"far"===n?"right":"left"}var $v={getAxisDock:Wv,getOppositeAxisDock:function(e,t,n){return Wv(e,"far"===t?"near":"far",n)},getYAxisDock:Uv},Yv=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),Kv=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),Xv=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]");function Gv(e){return Yv.test(e)}function Jv(e){return Kv.test(e)||Xv.test(e)}var Zv={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),detectTextDirection:function(e){var t,n,r=e?e.length:0;for(t=0;t<r;t++){if(Gv(n=e[t]))return"ltr";if(Jv(n))return"rtl"}return"ltr"}};var Qv={lineSettings:function(e,t){var n,r={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 jv(!0,r,e||{})},lineLabelSettings:function(e,t){var n=t&&t.chartID,r=t.theme.getStyle(n,"referenceLine.label.name","color"),i=t.theme.getStyle(n,"referenceLine.label.name","fontSize"),o=t.theme.getStyle(n,"referenceLine.label.name","fontFamily");return t.paletteColor?r=t.theme.getColorPickerColor(t.paletteColor):r||(r="transparent"),jv(!0,{value:0,line:{stroke:"transparent"},label:{align:"center",vAlign:"middle",text:"",fill:r,fontFamily:o,fontSize:i,maxWidthPx:135}},e||{})},isVisible:function(e){return e&&!1!==e.show&&0!==e.show&&"0"!==e.show&&void 0!==e.refLineExpr},getRefLineTitle:function(e){var t=e.refLine,n=e.label,r=e.valueString;return!1!==t.showValue?!1!==t.showLabel?"".concat(n," ").concat(Zv.lrm,"(").concat(r,")").concat(Zv.lrm):"".concat(Zv.lrm,"(").concat(r,")").concat(Zv.lrm):!1!==t.showLabel?n:""}},eb={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:{minimumLayoutMode:"SPARK",prioOrder:60,displayOrder:-10},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}}};eb.DEFAULT_CHART_ORIENTATION=eb.HORIZONTAL;function tb(e,t){var n=t||{},r=n.measureAxisProperties||{},i=n.dimensionAxisProperties||{},o=n.orientation||eb.DEFAULT_CHART_ORIENTATION,a=o===eb.HORIZONTAL,s=a?"x":"y",u=a?"y":"x",l=eb.SHOW_AXIS_LABELS_OPTIONS,c=eb.SHOW_TITLE_OPTIONS,f=l.includes(r.show),h=!!n.measureTitleText&&c.includes(r.show),d=n.includeDimensionAxis&&l.includes(i.show),p=n.includeDimensionAxis&&!!n.dimensionTitleText&&c.includes(i.show),m=n.gridlines&&!(!n.gridlines.auto&&0===n.gridlines.spacing),g=n.refLines&&n.refLines.some((function(e){return e.show})),y=[];(f&&function(e,t,n,r){var i={scale:"measure",forceBounds:r&&!r.autoMinMax&&r.showBounds};i=jv(i,eb.LAYOUTSETTINGS.measureAxis);var o=rb(t,n);e.addComponent("".concat(n,"-axis"),i,o)}(e,n,s,r),h&&function(e,t,n){var r={text:t.measureTitleText};r=jv(r,eb.LAYOUTSETTINGS.measureAxisTitle);var i=function(e,t){return rb(e,t)}(t,n);e.addComponent("".concat(n,"-axis-title"),r,i)}(e,n,s),function(e,t,n,r){var i=t.measureScaleSettings,o={isRtl:t.isRtl,source:t.measureSource,orientation:n,measureAxisProperties:r};r&&r.spacing>0&&(i=jv(!0,i||{},{component:{ticks:{distance:100*r.spacing}}}));e.addScale("measure-scale",i,o)}(e,n,o,r),d&&function(e,t,n){var r={scale:"dimension"};r=jv(r,eb.LAYOUTSETTINGS.dimensionAxis);var i=ib(t,n);jv(!0,r,t.dimensionAxisSettings||{}),e.addComponent("".concat(n,"-axis"),r,i)}(e,n,u),p&&function(e,t,n){var r={text:t.dimensionTitleText};r=jv(r,eb.LAYOUTSETTINGS.dimensionAxisTitle);var i=function(e,t){return ib(e,t)}(t,n);e.addComponent("".concat(n,"-axis-title"),r,i)}(e,n,u),n.includeDimensionAxis&&function(e,t,n){var r={isRtl:t.isRtl,source:t.dimensionSource,orientation:n===eb.HORIZONTAL?eb.VERTICAL:eb.HORIZONTAL};e.addScale("dimension-scale",t.dimensionScaleSettings,r)}(e,n,o),m&&function(e,t,n){var r={ticks:{show:!0},minorTicks:{show:!t.auto&&!t.auto&&3===t.spacing}};(r=jv(r,eb.LAYOUTSETTINGS.gridLines))[n]={scale:"measure"},e.addComponent("grid-line",r)}(e,n.gridlines,s),n.hasNavigation&&function(e,t,n,r){e.getSettings().scroll={dimension:{viewSize:n.scrollSettings&&n.scrollSettings.viewSize||0,max:n.scrollSettings&&n.scrollSettings.max||0}};var i={isRtl:n.isRtl,chartID:n.chartID,isHorizontal:!r},o=jv({},eb.LAYOUTSETTINGS.scrollBar);e.addComponent("scrollbar",o,i),nb(t,function(e){function t(t,n){if(!n||!e())return!1;var r={x:n.center.x-n.deltaX,y:n.center.y-n.deltaY};return this.chart.componentsFromPoint(r).some((function(e){return e.settings.key===Vv}))}return[{type:"Tap",options:{enable:t},events:{tap:function(e){this.chart.component(Vv).emit("tap",e)}}},{type:"Pan",options:{enable:t},events:{panstart:function(e){this.chart.component(Vv).emit("panStart",e)},pan:function(e){this.chart.component(Vv).emit("panMove",e)},panend:function(e){this.chart.component(Vv).emit("panEnd",e)},pancancel:function(e){this.chart.component(Vv).emit("panCancel",e)}}}]}(n.isNavigationEnabledFn))}(e,y,n,a),g&&function(e,t,n,r){var i=$v.getAxisDock(n,r.dock,t.isRtl),o={key:"ref-line",style:{oob:{show:!1}},lines:{x:[],y:[]}};o=jv(o,eb.LAYOUTSETTINGS.refLines);var a={key:"ref-line-labels-".concat(Bv()),require:["renderer","chart"],dock:$v.getOppositeAxisDock(n,r.dock,t.isRtl),preferredSize:function(){if("x"===n)return 26;for(var t=this.renderer.measureText,r=this.chart.formatter({data:e.settings.scales.measure.data}),i=a.lines.y.map((function(e){var n=!1!==e.label.showValue?"(".concat(r(e.value),")"):"",i="".concat(e.label.text," ").concat(n),o=e.label.text&&n?" ".concat(n):n;return{wanted:t({text:i,fontSize:e.fontSize,fontFamily:e.fontFamily}).width,required:t({text:o,fontSize:e.fontSize,fontFamily:e.fontFamily}).width}})),o=i[0],s=1;s<i.length;s++)i[s].wanted>o.wanted&&(o.wanted=i[s].wanted),i[s].required>o.required&&(o.required=i[s].required);var u=12;return o.required+u>100?o.required+u:Math.min(o.wanted+u,100)},lines:{x:[],y:[]}};a=jv(a,eb.LAYOUTSETTINGS.refLinesLabels),t.refLines.forEach((function(r){if(r.show){var s=r.refLineExpr&&r.refLineExpr.value,u=jv(!0,{},t,{paletteColor:r.paletteColor,style:r.style,chartID:e.options.chartID}),l=Qv.lineSettings({scale:"measure",dir:n,value:s},u);o.lines[n].push(l);var c=Qv.lineLabelSettings({scale:"measure",value:s,label:{text:!1!==r.showLabel?r.label:"",showValue:!1!==r.showValue}},u);"x"===n?c.label.vAlign="near"===i?1:0:c.label.align="near"===i?0:1,a.lines[n].push(c)}})),e.addComponent("ref-line",o,{}),e.addComponent("ref-line",a,{})}(e,n,s,r),n.enableLasso&&n.selectionsEnabled)&&function(e,t){var n={brushKey:t.brushKey,brushComponents:t.brushComponents,brushData:t.brushData};e.addComponent("lasso",eb.LAYOUTSETTINGS.lasso,n)}(e,n.lasso||{});n.enableDimRange&&n.includeDimensionAxis&&n.selectionsEnabled&&function(e,t,n,r,i){var o={key:"rangeDim"};o=jv(o,eb.LAYOUTSETTINGS.rangeDim);var a={brushKey:t.brushKey,brushAxis:t.brushAxis,brushArea:t.brushArea,brushScale:t.brushScale,isHorizontal:!n,dock:r,isRtl:i};e.addComponent("range",o,a)}(e,n.dimRange||{},a,ib(n,u).dock,n.isRtl);n.enableMeasureRange&&n.selectionsEnabled&&function(e,t,n,r,i){var o={key:"rangeMeasure"};o=jv(o,eb.LAYOUTSETTINGS.rangeMeasure);var a={brushKey:t.brushKey,brushAxis:t.brushAxis,brushArea:t.brushArea,brushScale:t.brushScale,multiple:t.multiple,isHorizontal:n,dock:r,isRtl:i};e.addComponent("range",o,a)}(e,n.measureRange||{},a,rb(n,s).dock,n.isRtl);n.enableAreaRange&&n.selectionsEnabled&&function(e,t,n,r,i){var o={key:"rangeMinor"};o=jv(o,eb.LAYOUTSETTINGS.rangeMinor);var a={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:r,isRtl:i,chartInstance:t.chartInstance};e.addComponent("range-area",o,a)}(e,n.areaRange||{},a,ib(n,u).dock,n.isRtl);n.brushActions&&nb(y,n.brushActions),y.length&&function(e,t){e.addInteraction({},{gestures:t})}(e,y)}function nb(e,t){t.forEach((function(t){e.push(t)}))}function rb(e,t){return{dock:e.measureAxisProperties&&e.measureAxisProperties.dock,direction:t,isRtl:e.isRtl}}function ib(e,t){return{dock:e.dimensionAxisProperties&&e.dimensionAxisProperties.dock,direction:t,isRtl:e.isRtl}}function ob(e,t){var n=t||{},r=!n.orientation||"horizontal"===n.orientation,i=!!n.isRtl,o={name:n.name||"scale",component:{invert:r&&i,minorTicks:{count:1},range:n.range||void 0,domain:n.domain||void 0,trackBy:n.trackBy||"id"}};return jv(!0,{},o,e||{})}function ab(e,t){var n=t&&t.chartID,r=t&&t.dock,i=t&&t.direction,o=t&&t.isRtl,a=t.theme.getStyle(n,"axis.line.major","color"),s=t.theme.getStyle(n,"axis.title","fontSize"),u=t.theme.getStyle(n,"axis.title","color"),l=t.theme.getStyle(n,"axis.label.name","color"),c=t.theme.getStyle(n,"axis.label.name","fontSize"),f=t.theme.getStyle(n,"axis.title","fontFamily"),h=t.theme.getStyle(n,"axis.label.name","fontFamily"),d={key:"axis",type:"axis",dock:$v.getAxisDock(i,r,o),brush:{trigger:[],consume:[]},settings:{title:{fontSize:s,fontFamily:f,fill:u},line:{show:!0,strokeWidth:1,stroke:a},labels:{fill:l,fontSize:c,fontFamily:h,tiltAngle:o?-40:40,maxEdgeBleed:75,maxSize:150,mode:"auto"},ticks:{stroke:a},minorTicks:{stroke:a}}};return jv(!0,{},d,e||{})}function sb(e,t){var n=t&&t.chartID,r=t&&t.dock,i=t&&t.direction,o=t&&t.isRtl,a=t.theme.getStyle(n,"axis.title","fontSize"),s=t.theme.getStyle(n,"axis.title","color"),u=t.theme.getStyle(n,"axis.title","fontFamily"),l={key:"text",type:"text",dock:$v.getAxisDock(i,r,o)||"bottom",displayOrder:0,style:{text:{fontSize:a,fontFamily:u,fill:s}}};return jv(!0,{},l,e||{})}ob.measureScale=function(e,t){var n=(t||{}).source||[];"string"==typeof n&&(n=[n]);var r={name:"measure",component:{expand:.1,data:{fields:n.map((function(e){return{field:e}}))}}},i=t&&t.measureAxisProperties;i&&!i.autoMinMax&&(["min","minMax"].includes(i.minMax)&&(r.component.min=i.min),["max","minMax"].includes(i.minMax)&&(r.component.max=i.max));var o=ob(jv(!0,r,e||{}),t);return!(e&&e.component&&void 0!==e.component.invert)&&t&&"vertical"===t.orientation&&(o.component.invert=!o.component.invert),o},ob.dimensionScale=function(e,t){var n={name:"dimension",component:{trackBy:"id",type:"band",data:{extract:{field:t&&t.source||"",props:{label:function(e){return e.qText||""}}}},label:function(e){return e.datum.label.value}}};return ob(jv(!0,n,e||{}),t)},ab.xAxis=function(e,t){return ab(jv(!0,{key:"x-axis",scale:"x"},e||{}),t)},ab.yAxis=function(e,t){var n=t&&t.dock,r=t&&t.isRtl,i={key:"y-axis",scale:"y",dock:$v.getYAxisDock(n,r)};return ab(jv(!0,i,e||{}),t)},sb.xAxisTitle=function(e,t){return sb(jv(!0,{key:"x-axis-title"},e||{}),t)},sb.yAxisTitle=function(e,t){var n=t&&t.dock,r=t&&t.isRtl,i={key:"y-axis-title",dock:$v.getYAxisDock(n,r)||"left"};return sb(jv(!0,i,e||{}),t)};var ub={getBublesAlign:function(e,t,n){var r=e&&"far"!==t||!e&&"far"===t;return!e&&n&&(r=!r),r?"start":"end"},getDock:function(e,t){var n,r=[];return e&&r.push("@".concat(e)),t&&r.push("@".concat(t)),r.length&&(n=r.join(",")),n}};var lb={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 cb(){return lb}function fb(e){var t=e.data.end;return e.dataset(t.source.key).field(t.source.field).formatter()(t.value)}cb.getLayoutModeKeys=function(){var e,t=[];for(e in lb)t.push(e);return t};var hb={left:"left",right:"right",up:"top",down:"bottom"};function db(e,t,n){switch(e){case"scale":return ob(t,n);case"measure-scale":return ob.measureScale(t,n);case"dimension-scale":return ob.dimensionScale(t,n);case"axis":return ab(t,n);case"box-marker":return function(e){return jv(!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 jv(!0,{},{key:"point-marker",type:"point-marker",settings:{},brush:{trigger:[],consume:[]}},e||{})}(t);case"scrollbar":return function(e,t){var n=t&&t.isRtl,r=t&&t.chartID,i=t&&t.isHorizontal,o={key:"scrollbar",type:"scrollbar",scroll:"dimension",dock:i?"bottom":n?"left":"right",settings:{backgroundColor:t.theme.getStyle(r,"","backgroundColor"),invert:n&&i}};return jv(!0,{},o,e||{})}(t,n);case"text":return sb(t,n);case"lasso":return function(e,t){var n=t&&t.brushKey,r=t&&t.brushComponents?t.brushComponents:[],i=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 r.forEach((function(e){o.settings.brush.components.push({contexts:n?[n]:void 0,key:e,data:i})})),jv(!0,{},o,e||{})}(t,n);case"range":return function(e,t){var n=t&&t.brushKey,r=t&&t.brushAxis,i=t&&t.brushArea,o=t&&t.brushScale,a=t&&t.isHorizontal,s=t&&t.dock,u=t&&t.isRtl,l={type:"brush-range",key:"range",displayOrder:99,dock:ub.getDock(r,i),settings:{brush:n,fill:"rgba(0, 0, 0, 0)",scale:o,multiple:!t||!1!==t.multiple||t.multiple,direction:a?"horizontal":"vertical",target:{component:r,fill:"rgba( 82, 204, 82, 0.2 )",fillActive:"rgba(82, 204, 82, 0.4)"},bubbles:{align:ub.getBublesAlign(a,s,u)}}};return jv(!0,{},l,e||{})}(t,n);case"range-area":return function(e,t){var n=t&&t.brushKey,r=t&&t.brushAxis,i=t&&t.brushComponents?t.brushComponents:[],o=t&&t.brushData?t.brushData:["elemNo"],a=t&&t.brushArea,s=t&&t.isHorizontal,u=t&&t.dock,l=t&&t.isRtl,c=t&&t.chartInstance,f=!0,h={type:"brush-area-dir",key:"area",displayOrder:99,dock:ub.getDock(r,a),settings:{brush:{components:[]},direction:s?"horizontal":"vertical",target:{component:r,fill:"rgba( 82, 204, 82, 0.2 )",fillActive:"rgba(82, 204, 82, 0.4)"},bubbles:{align:ub.getBublesAlign(s,u,l),label:function(e){return f?(f=!1,c.dataset(e.binStart.source.key).field(e.binStart.source.field).formatter()(e.binStart.value)):(f=!0,c.dataset(e.binEnd.source.key).field(e.binEnd.source.field).formatter()(e.binEnd.value))}},multiple:!t||!1!==t.multiple||t.multiple}};return i.forEach((function(e){h.settings.brush.components.push({contexts:n?[n]:void 0,key:e,data:o,action:"add"})})),jv(!0,{},h,e||{})}(t,n);case"categorical-legend":return function(e,t){var n=t&&t.chartID,r=t&&t.isRtl,i=t&&t.dock||"auto",o=t&&t.show;"auto"===i&&(i=t.chartHeight/t.chartWidth<1?r?"left":"right":"bottom");var a=t.theme.getStyle(n,"legend.title","color"),s=t.theme.getStyle(n,"legend.title","fontSize"),u=t.theme.getStyle(n,"legend.label","color"),l=t.theme.getStyle(n,"legend.label","fontSize"),c=t.theme.getStyle(n,"legend.title","fontFamily"),f={key:"legend",type:"legend-cat",dock:i,show:o,scale:{type:"color"},settings:{title:{anchor:"middle"},layout:{direction:r?"rtl":"ltr",size:"top"===i||"bottom"===i?2:1,vertical:"top"===i||"bottom"===i?16:8},navigation:{button:{class:{"lui-fade-button":!0},content:function(e,t){return e("span",{style:{pointerEvents:"none"},class:["lui-button__icon","lui-icon","lui-icon--triangle-".concat(hb[t.direction])].join(" ")})}}}},style:{item:{label:{fontSize:l,fontFamily:t.theme.getStyle(n,"legend.label","fontFamily"),fill:u,lineHeight:1,wordBreak:"break-word"},margin:{top:5,left:10,right:10,bottom:10},shape:{type:t.type?t.type:"square",size:3*parseInt(l,10)/4}},title:{show:t.showTitle,fontSize:s,fontFamily:c,fill:a}}};return jv(!0,{},f,e)}(t,n);case"sequential-legend":return function(e,t){var n=t&&t.chartID,r=t&&t.isRtl,i=t.dock||"auto";"auto"===i&&(i=t.chartHeight<t.chartWidth?r?"left":"right":"bottom");var o=t.theme.getStyle(n,"legend.title","color"),a=t.theme.getStyle(n,"legend.title","fontSize"),s=t.theme.getStyle(n,"legend.title","fontFamily"),u=t.theme.getStyle(n,"legend.label","color"),l=t.theme.getStyle(n,"legend.label","fontSize"),c=t.theme.getStyle(n,"legend.label","fontFamily");function f(e){switch(e){case"left":return 0;case"right":return 1;case"middle":default:return.5}}var h={key:"seqlegend",type:"legend-seq",dock:i,displayOrder:200,minimumLayoutMode:"MEDIUM",prioOrder:0,settings:{align:f(r?"right":"left"),major:{invert:"left"===i||"right"===i||r},title:{show:t.showTitle,fontSize:a,fontFamily:s,fill:o},tick:{fill:u,fontSize:l,fontFamily:c}}};return jv(!0,{},h,e)}(t,n);case"x-axis":return ab.xAxis(t,n);case"y-axis":return ab.yAxis(t,n);case"x-axis-title":return sb.xAxisTitle(t,n);case"y-axis-title":return sb.yAxisTitle(t,n);case"grid-line":return function(e,t){var n=t&&t.chartID,r=t.theme.getStyle(n,"grid.line.major","color");return jv(!0,{},{displayOrder:-1,key:"grid-line",type:"grid-line",x:null,y:null,ticks:{stroke:r},minorTicks:{stroke:r}},e||{})}(t,n);case"interaction":return function(e,t){var n=t&&t.gestures||[];return jv(!0,{},{type:"hammer",key:"hammered",gestures:n},e||{})}(t,n);case"ref-line":return function(e,t){var n=t&&t.chartID,r=t.theme.getStyle(n,"referenceLine.outOfBounds","color"),i=t.theme.getStyle(n,"referenceLine.outOfBounds","backgroundColor");return jv(!0,{},{key:"ref-line",type:"ref-line",dock:"center",prioOrder:-1,lines:{x:[],y:[]},style:{oob:{width:7,fill:i,text:{fill:r},padding:{x:7,y:5}}}},e||{})}(t,n);case"event-area":return function(e){return jv(!0,{},{type:"event-area",key:"event-area"},e||{})}(t);case"labels":return function(e,t){var n=t&&t.chartID,r=t.theme.getStyle(n,"label.value","color"),i=t.theme.getStyle(n,"label.value","fontSize"),o={key:"labels",type:"labels",displayOrder:1,settings:{sources:[{component:"box-marker",selector:"rect",strategy:{type:"bar",settings:{direction:"up",fontFamily:t.theme.getStyle(n,"label.value","fontFamily"),fontSize:parseFloat(i),align:.5,labels:[{placements:[{position:"outside",fill:r,justify:0},{position:"inside",fill:e&&e.settings.sources[0].strategy.settings.labels[0].placements[1].fill,justify:1}],label:fb}]}}}]}};return jv(!0,{},o,e||{})}(t,n);default:return}}function pb(e){this.options=e||{},this.settings={dockLayout:{layoutModes:cb()},components:[],scales:{}}}pb.prototype.addComponent=function(e,t,n){var r=db(e,t,jv(!0,{},this.options,n||{}));return this.settings.components.push(r),r},pb.prototype.addInteraction=function(e,t){var n=db("interaction",e,jv(!0,{},this.options,t||{}));return this.settings.interactions||(this.settings.interactions=[]),this.settings.interactions.push(n),n},pb.prototype.addScale=function(e,t,n){var r=db(e,t,jv(!0,{},this.options,n||{}));this.settings.scales[r.name]=r.component},pb.prototype.getSettings=function(){return this.settings},pb.prototype.getComponent=function(e){return this.settings.components.filter((function(t){return t.key===e}))[0]},pb.prototype.addPreset=function(e,t){!function(e,t,n){switch(e){case"dimension-measure-chart":tb(t,n);break;default:throw Error("There is no chart preset with that type")}}(e,this,t)},pb.validateComponentKeys=function(e){var t={};return e.map((function(e){var n=e.key;return n?t[n]?"Duplicate key for component ".concat(e.type):(t[n]=!0,null):"Missing key for component ".concat(e.type)})).filter((function(e){return!!e}))},pb.create=function(e){return new pb(e)},pb.createComponent=db;var mb={CENTER:0,BOTTOM:1},gb={DISCLAIMERS:[{label:"NoDataExist",alignment:mb.CENTER,default:!0},{label:"RequireNumericDimension",alignment:mb.CENTER,default:!1},{label:"OnlyNanData",alignment:mb.CENTER,default:!0},{label:"OnlyNegativeOrZeroValues",alignment:mb.CENTER,default:!1},{label:"LimitedData",alignment:mb.BOTTOM,default:!1},{label:"OnlyNanColor",alignment:mb.BOTTOM,default:!1},{label:"NegativeOrZeroValues",alignment:mb.BOTTOM,default:!1},{label:"DataRangeIncludingZero",alignment:mb.BOTTOM,default:!1}],ALIGNMENT:mb};var yb={getNoDataExistAttribute:function(e){return e.qSize.qcy*e.qSize.qcx==0},getLimitedDataAttribute:function(e,t){var n,r,i=!1;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((function(e){return e.qDown>0})):e.qStackedDataPages[0].qData[0].qSubNodes.length<e.qStackedDataPages[0].qArea.qHeight):i=!0===t.explicitLimitedData,i},getNegativeOrZeroValuesAttribute:function(e,t){return!t.supportNegative&&e.qMeasureInfo.some((function(e){return e.qMin<=0}))},getOnlyNegativeOrZeroValuesAttribute:function(e,t){return!t.supportNegative&&e.qMeasureInfo.every((function(e){return e.qMax<=0&&e.qMax>=e.qMin}))||0===e.qSize.qcy},getOnlyNanDataAttribute:function(e,t){return void 0!==t.explicitOnlyNanData?t.explicitOnlyNanData:e.qMeasureInfo.every((function(e){return e.qMax<e.qMin||"NaN"===e.qMax}))},getDataRangeIncludingZeroAttribute:function(e,t){return!t.supportRangeOverZero&&function(e,t){var n,r,i,o,a,s=t.length;for(e&&(r=!(e.autoMinMax||"min"!==e.minMax&&"minMax"!==e.minMax||null===e.min||Number.isNaN(+e.min)),i=!(e.autoMinMax||"max"!==e.minMax&&"minMax"!==e.minMax||null===e.max||Number.isNaN(+e.max))),o=Number.MAX_VALUE,a=-Number.MAX_VALUE,n=0;n<s;n++)if(o=Math.min(o,t[n].qMin),a=Math.max(a,t[n].qMax),o<=0&&a>=0)return!0;return o=r?e.min:o,a=i?e.max:a,o<=0&&a>=0}(e.measureAxis,e.qHyperCube.qMeasureInfo)},applyAttributes:function(e,t){var n=e||{},r={};return n.supportNegative=void 0===n.supportNegative||n.supportNegative,n.supportRangeOverZero=void 0===n.supportRangeOverZero||n.supportRangeOverZero,gb.DISCLAIMERS.forEach((function(e){r[e.label]=!1})),t&&t.qHyperCube?(r.NoDataExist=this.getNoDataExistAttribute(t.qHyperCube),r.NoDataExist?r:(r.RequireNumericDimension=n.explicitRequireNumericDimension,r.RequireNumericDimension||(r.LimitedData=this.getLimitedDataAttribute(t.qHyperCube,n),r.NegativeOrZeroValues=this.getNegativeOrZeroValuesAttribute(t.qHyperCube,n),r.OnlyNegativeOrZeroValues=this.getOnlyNegativeOrZeroValuesAttribute(t.qHyperCube,n),r.OnlyNanData=this.getOnlyNanDataAttribute(t.qHyperCube,n),r.DataRangeIncludingZero=this.getDataRangeIncludingZeroAttribute(t,n)),r)):r}};function vb(e,t,n){this.disclaimersConfig=e,this.dataAttributes=t,this.supportedDisclaimers=n}function bb(e,t){return e&&t&&t[e]}function xb(e){this.environment=e,this.clear()}vb.prototype.isValidAndSupported=function(e,t){return bb(e.label,this.dataAttributes)&&(e.default||bb(e.label,this.supportedDisclaimers))&&void 0!==t&&e.alignment===t},vb.prototype.isAnyValidDisclaimer=function(e){var t=!1,n=this;return this.disclaimersConfig.forEach((function(r){n.isValidAndSupported(r,e)&&(t=!0)})),t},vb.prototype.getMessage=function(e,t){var n="",r=this;return t&&this.disclaimersConfig.forEach((function(i){r.isValidAndSupported(i,e)&&(n+="".concat(t.get("Object.Disclaimer.".concat(i.label))," "))})),n},xb.ERRORS={SET:"Calling Disclaimer.set() without attributes",DISPLAY:"Calling Disclaimer.display() before attributes are applied"},xb._applyDefaultSupport=function(e,t){var n=e;return n||(n={}),t.forEach((function(e){void 0===n[e.label]&&(n[e.label]=e.default)})),n},xb.prototype.getComponentSettings=function(){var e,t,n,r,i=this.environment.translator,o=jv(!0,{},this.vizAttributes.supportedDisclaimers),a=new vb(gb.DISCLAIMERS,this.dataAttributes,o);if(a.isAnyValidDisclaimer(gb.ALIGNMENT.CENTER))n=a.getMessage(gb.ALIGNMENT.CENTER,i),r="center";else{if(!a.isAnyValidDisclaimer(gb.ALIGNMENT.BOTTOM))return;n=a.getMessage(gb.ALIGNMENT.BOTTOM,i),r="bottom"}return{key:"disclaimer",type:"disclaimer",layout:{displayOrder:1e3,dock:r},settings:{label:n,rtl:"rtl"===(null===(e=this.environment)||void 0===e||null===(t=e.options)||void 0===t?void 0:t.direction)}}},xb.prototype.set=function(e){if(this.clear(),!e)throw new Error(xb.ERRORS.SET);this.vizAttributes=e,this.dataAttributes=yb.applyAttributes(this.vizAttributes.options,this.vizAttributes.data)},xb.prototype.clear=function(){this.vizAttributes=null,this.dataAttributes=null};var wb=Fv.extend({init:function(e,t,n,r,i){this.$element=t,this.environment=n,this.backendApi=r,this._selectionsApi=i,this._on=!1,this._disclaimer=new xb(n),this._dataPaths=["qHyperCube"];var o=this;this.picassoElement=t[0],this.picassoElement.className+=" picasso-chart",this.chartInstance=e.chart({element:this.picassoElement,settings:{components:[pb.createComponent("event-area",{mounted:function(e){o.dataAreaElem=e}})]}})},updateEnvironment:function(e){this.environment=e},isRtl:function(){var e;return"rtl"===(null===(e=this.environment.options)||void 0===e?void 0:e.direction)},setDataPaths:function(e){this._dataPaths=e},getData:function(e,t,n){return function(e,t,n){var r,i={qTop:0,qLeft:0,qWidth:t.qSize.qcx,qHeight:1e4/t.qSize.qcx};if(n){var o=n.width||t.qSize.qcx,a=Math.floor(1e4/o);i={qTop:n.top||0,qLeft:n.left||0,qWidth:o,qHeight:n.height?Math.min(n.height,a):a}}else i={qTop:0,qLeft:0,qWidth:t.qSize.qcx,qHeight:1e4/t.qSize.qcx};switch(t.qMode){case"K":r="qStackedDataPages";break;case"S":default:r="qDataPages"}return e.getData([i],null,t).then((function(e){t[r]=e}))}(e,t,n)},hasValidData:function(){return!0},paint:function(){if(this.hasValidData()){var e;this._disclaimer.set(this.getDisclaimerAttributes(this.layout));var t=this._disclaimer.getComponentSettings(),n="center"===(null==t||null===(e=t.layout)||void 0===e?void 0:e.dock),r=this.createChartSettings(this.layout);n?r.components=[t]:t&&r.components.push(t),pb.validateComponentKeys(r.components).forEach((function(e){console.error(e)})),this.updateChart(this.layout,r),this._painted=!0}return Promise.resolve()},resize:function(){if(this.layout)return this.paint()},createChartSettings:function(){throw new Error('Subclass must implement "createChartSettings" function')},addSnapshotChartSettings:function(e,t){!this.environment.options.freeResize&&t.snapshotData&&(e.dockLayout.logicalSize={width:t.snapshotData.content.size.w,height:t.snapshotData.content.size.h,preserveAspectRatio:!0})},updateData:function(e){return this._destroyed?Promise.reject():(this.layout=jv(!0,{},e),this.layout.permissions=e.permissions,Promise.resolve())},updateChart:function(e,t,n){var r,i,o=null!==(r=null===(i=this.environment.appLayout)||void 0===i?void 0:i.qLocaleInfo)&&void 0!==r?r:{},a=this._dataPaths.map((function(t){return{type:"q",key:t,config:{localeInfo:o},data:nv(e,t.replace(/\//g,"."))}}));this.colorService&&a.push.apply(a,f(this.colorService.getData())),this.chartInstance.update({data:a,settings:t,partialData:n});this.picassoElement.setAttribute("data-state",2)},destroy:function(){this._destroyed=!0,this.off(),this.chartInstance.destroy()},getViewState:function(){return{}},isLassoDisabled:function(){return!0},setSnapshotData:function(e){e.snapshotData||(e.snapshotData={}),e.snapshotData.content={chartData:{},size:{w:this.$element.width(),h:this.$element.height()}}},getDisclaimerAttributes:function(e){return{data:e}}}),kb={exports:{}};!function(e,t){e.exports=function(){function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?e(Object(r),!0).forEach((function(e){s(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):e(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function c(e,t,n){return(c=l()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&u(i,n.prototype),i}).apply(null,arguments)}function f(e,t){return m(e)||y(e,t)||v(e,t)||w()}function h(e){return d(e)||g(e)||v(e)||x()}function d(e){if(Array.isArray(e))return b(e)}function m(e){if(Array.isArray(e))return e}function g(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function y(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}function v(e,t){if(e){if("string"==typeof e)return b(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)?b(e,t):void 0}}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function x(){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 w(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var k=Object.prototype.hasOwnProperty,M=Object.prototype.toString,_=Object.defineProperty,S=Object.getOwnPropertyDescriptor,q=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===M.call(e)},D=function(e){if(!e||"[object Object]"!==M.call(e))return!1;var t,n=k.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&k.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||k.call(e,t)},C=function(e,t){_&&"__proto__"===t.name?_(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},E=function(e,t){if("__proto__"===t){if(!k.call(e,t))return;if(S)return S(e,t).value}return e[t]},A=function e(){var t,n,i,o,a,s,u=arguments[0],l=1,c=arguments.length,f=!1;for("boolean"==typeof u&&(f=u,u=arguments[1]||{},l=2),(null==u||"object"!==r(u)&&"function"!=typeof u)&&(u={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)i=E(u,n),u!==(o=E(t,n))&&(f&&o&&(D(o)||(a=q(o)))?(a?(a=!1,s=i&&q(i)?i:[]):s=i&&D(i)?i:{},C(u,{name:n,newValue:e(f,s,o)})):void 0!==o&&C(u,{name:n,newValue:o}));return u};function T(e,t,n){if(!e)return-1;var r=n.cache,i=e.origin?e.origin():null;i&&(e=i);var o=r.fields.indexOf(e),a=-1,s=-1;if(-1===o)for(var u=0;u<r.wrappedFields.length;u++)if(s=r.wrappedFields[u].attrDims.map((function(e){return e.instance})).indexOf(e),a=r.wrappedFields[u].attrExps.map((function(e){return e.instance})).indexOf(e),-1!==s||-1!==a){o=u;break}return(o-=t.qArea.qLeft)<0||o>=t.qArea.qWidth?-1:s>=0?function(e){return e[o].qAttrDims.qValues[s]}:a>=0?function(e){return e[o].qAttrExps.qValues[a]}:function(e){return e[o]}}function N(e,t,n){var r=n.key,i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function R(e){var t=e.cache,n=e.f,r=e.mainCell,i=e.p;e.prop;var o=e.page,a=e.rowIdx,s=e.row,u=e.sourceKey,l=e.target,c=e.targetProp,f=r;if(i.field&&i.field!==n){var h=T(i.field,o,{cache:t});if(-1===h)return;f=A({qRow:a},h(s))}l[c]=N(i,f,{key:u})}function O(e,t,r,i){for(var o=Array.isArray(e)?e:[e],a=[],s=0;s<o.length;s++)if(void 0!==o[s].field){for(var u=t.raw(),l=t.key(),c="object"===n(o[s].field)?o[s].field:t.field(o[s].field),f=i.normalizeConfig(o[s],t),d=f.props,p=f.main,m=Object.keys(d),g=!!o[s].trackBy,y=n(o[s].trackBy),v={},b=[],x=[],w=0;w<u.qDataPages.length;w++){var k=T(c,u.qDataPages[w],{cache:r});if(-1!==k)for(var M=0;M<u.qDataPages[w].qMatrix.length;M++){var _=u.qDataPages[w].qArea.qTop+M,S=A({qRow:_},k(u.qDataPages[w].qMatrix[M])),q=N(p,S,{key:l});if(!p.filter||p.filter(S)){for(var D=0;D<m.length;D++){var C=d[m[D]],E=C.fields||[C];C.fields&&(q[m[D]]=[]);for(var O=0;O<E.length;O++)R({cache:r,f:c,mainCell:S,p:E[O],prop:m[D],props:d,page:u.qDataPages[w],rowIdx:_,row:u.qDataPages[w].qMatrix[M],sourceKey:l,target:C.fields?q[m[D]]:q,targetProp:C.fields?O:m[D]});if(C.fields){var I=q[m[D]].map((function(e){return e.value})),P=q[m[D]].map((function(e){return e.label}));q[m[D]]={value:"function"==typeof C.value?C.value(I):void 0!==C.value?C.value:I,label:"function"==typeof C.label?C.label(P):void 0!==C.label?String(C.label):String(q[m[D]].value)}}}g&&i.track({cfg:o[s],itemData:S,obj:q,target:b,tracker:v,trackType:y}),x.push(q)}}}g?a.push.apply(a,h(i.collect(b,{main:p,propsArr:m,props:d}))):a.push.apply(a,x)}return a}function I(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function P(){return this.eachAfter(I)}function L(e){var t,n,r,i,o=this,a=[o];do{for(t=a.reverse(),a=[];o=t.pop();)if(e(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r])}while(a.length);return this}function j(e){for(var t,n,r=this,i=[r];r=i.pop();)if(e(r),t=r.children)for(n=t.length-1;n>=0;--n)i.push(t[n]);return this}function z(e){for(var t,n,r,i=this,o=[i],a=[];i=o.pop();)if(a.push(i),t=i.children)for(n=0,r=t.length;n<r;++n)o.push(t[n]);for(;i=a.pop();)e(i);return this}function F(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n}))}function H(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))}function B(e){for(var t=this,n=V(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function V(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function W(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function U(){var e=[];return this.each((function(t){e.push(t)})),e}function $(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e}function Y(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t}function K(e,t){var n,r,i,o,a,s=new Q(e),u=+e.value&&(s.value=e.value),l=[s];for(null==t&&(t=G);n=l.pop();)if(u&&(n.value=+n.data.value),(i=t(n.data))&&(a=i.length))for(n.children=new Array(a),o=a-1;o>=0;--o)l.push(r=n.children[o]=new Q(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Z)}function X(){return K(this).eachBefore(J)}function G(e){return e.children}function J(e){e.data=e.data.data}function Z(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function Q(e){this.data=e,this.depth=this.height=0,this.parent=null}function ee(e){if("function"!=typeof e)throw new Error;return e}Q.prototype=K.prototype={constructor:Q,count:P,each:L,eachAfter:z,eachBefore:j,sum:F,sort:H,path:B,ancestors:W,descendants:U,leaves:$,links:Y,copy:X};var te="$",ne={depth:-1},re={};function ie(e){return e.id}function oe(e){return e.parentId}function ae(){var e=ie,t=oe;function n(n){var r,i,o,a,s,u,l,c=n.length,f=new Array(c),h={};for(i=0;i<c;++i)r=n[i],s=f[i]=new Q(r),null!=(u=e(r,i,n))&&(u+="")&&(h[l=te+(s.id=u)]=l in h?re:s);for(i=0;i<c;++i)if(s=f[i],null!=(u=t(n[i],i,n))&&(u+="")){if(!(a=h[te+u]))throw new Error("missing: "+u);if(a===re)throw new Error("ambiguous: "+u);a.children?a.children.push(s):a.children=[s],s.parent=a}else{if(o)throw new Error("multiple roots");o=s}if(!o)throw new Error("no root");if(o.parent=ne,o.eachBefore((function(e){e.depth=e.parent.depth+1,--c})).eachBefore(Z),o.parent=null,c>0)throw new Error("cycle");return o}return n.id=function(t){return arguments.length?(e=ee(t),n):e},n.parentId=function(e){return arguments.length?(t=ee(e),n):t},n}function se(e,t){"/"===e.charAt(0)&&(e=e.substring(1));for(var n,r=e.split("/"),i=t,o=0;o<r.length;o++){if("*"===r[o]&&Array.isArray(i)){var a=[];n=r.slice(o+1).join("/");for(var s=0;s<i.length;s++){var u=se(n,i[s]);Array.isArray(u)?a.push.apply(a,h(u)):a.push(u)}return a}if(!r[o]&&Array.isArray(i)){var l=new Array(i.length);n=r.slice(o+1).join("/");for(var c=0;c<i.length;c++)l[c]=se(n,i[c]);return l}r[o]in i&&(i=i[r[o]])}return i}function ue(e,t,n){var r=[];if(!e||!e.length)return r;if(t<=0){var i=n>=0?[e[n]]:e;r.push.apply(r,h(i))}else for(var o=0;o<e.length;o++)e[o].children&&e[o].children.length&&r.push.apply(r,h(ue(e[o].children,t-1,n)));return r}function le(e,t,n){if(e===t)return function(e){return e};if(e>t){var r=Math.max(0,Math.min(100,e-t));return function(e){for(var t=e,n=0;n<r;++n)t=t.parent;return t}}if(t>e){var i=Math.max(0,Math.min(100,t-e));return function(e){return ue(e.children,i-1,n)}}return!1}function ce(e,t){var n=t.cache;if("number"==typeof e)return n.fields[e];var r=n.allFields;if("function"==typeof e){for(var i=0;i<r.length;i++)if(e(r[i]))return r[i];return!1}if("string"==typeof e){for(var o=0;o<r.length;o++)if(r[o].key()===e||r[o].title()===e)return r[o]}else if(e&&-1!==r.indexOf(e))return e;throw Error("Field not found: ".concat(e))}var fe=/^qDimensionInfo(?:\/(\d+))?/,he=/^\/?qMeasureInfo\/(\d+)/,de=/\/qAttrExprInfo\/(\d+)/,pe=/\/qAttrDimInfo\/(\d+)/;function me(e){var t=e.raw().qColumnOrder,n=e.fields();return t&&t.length===n.length?t:n.map((function(e,t){return t}))}function ge(e){return(e.qColumnOrder&&e.qColumnOrder.length?e.qColumnOrder:e.qDimensionInfo.map((function(e,t){return t}))).filter((function(t){return t<e.qDimensionInfo.length}))}function ye(e,t){var n=t.cube;if(!e)return-1;var r=e.origin&&e.origin()?e.origin().key():e.key(),i=!1,o=-1,a=-1,s=-1,u=-1,l=-1,c=r,f=n.qEffectiveInterColumnSortOrder,h=ge(n);return fe.test(c)&&(i=!0,o=+fe.exec(c)[1],c=r.replace(fe,"")),he.test(c)&&("K"===n.qMode?u=+he.exec(c)[1]:f&&-1!==f.indexOf(-1)?(u=+he.exec(c)[1],l=0):l=+he.exec(c)[1],c=c.replace(he,"")),c&&(pe.exec(c)?s=+pe.exec(c)[1]:de.exec(c)&&(a=+de.exec(c)[1])),{fieldDepth:(i?"S"===n.qMode?h[o]:f?f.indexOf(o):o:f&&-1!==f.indexOf(-1)?f.indexOf(-1):n.qDimensionInfo.length-("K"===n.qMode?0:1))+1,pseudoMeasureIndex:u,measureIdx:l,attrDimIdx:s,attrIdx:a}}function ve(e,t){var n,r,i=le(e.fieldDepth,t.fieldDepth,t.pseudoMeasureIndex);return n=t.measureIdx>=0?function(e){return e.data.qValues[t.measureIdx]}:function(e){return e.data},t.attrDimIdx>=0?r=function(e){var n;return null==e||null===(n=e.qAttrDims)||void 0===n?void 0:n.qValues[t.attrDimIdx]}:t.attrIdx>=0&&(r=function(e){var n;return null==e||null===(n=e.qAttrExps)||void 0===n?void 0:n.qValues[t.attrIdx]}),{nodeFn:i,attrFn:r,valueFn:n}}function be(e,t,n){var r=n.key,i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function xe(e){for(var t=e.propsArr,n=e.props,r=e.item,i=e.itemData,o=e.ret,a=e.sourceKey,s=0;s<t.length;s++){var u=n[t[s]],l=u.fields||[u],c=void 0,f=void 0;u.fields&&(c=[],f=[]);for(var h=function(e){var n=l[e],h=void 0,d=void 0,p=void 0,m=void 0,g=void 0,y=void 0;if("primitive"===n.type?(p=n.value,y=String(n.value)):("function"==typeof n.value&&(h=function(e){return n.value(e,r)}),"function"==typeof n.label&&(d=function(e){return n.label(e,r)}),n.accessor?(m=n.accessor(r),Array.isArray(m)?(g=m.map(n.valueAccessor),n.attrAccessor&&(g=g.map(n.attrAccessor)),h&&(p=g.map(h),h=null),d&&(y=g.map(d),d=null),p=n.reduce?n.reduce(p):p,y=n.reduceLabel?n.reduceLabel(y,p):String(p)):y=p=n.attrAccessor?n.attrAccessor(n.valueAccessor(m)):n.valueAccessor(m)):(p=i,y=i)),u.fields){var v=h?h(p):p;c.push(v),f.push(d&&null!=y?d(y):null!=y?y:String(v))}else{var b=h?h(p):p;o[t[s]]={value:b,label:d?d(y):null!=y?y:String(b)},n.field&&(o[t[s]].source={field:n.field.key(),key:a})}},d=0;d<l.length;d++)h(d);c&&(o[t[s]]={value:"function"==typeof u.value?u.value(c,r):c,label:"function"==typeof u.label?u.label(f,r):f})}}var we=function(e,t,n){var r="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",i="K"===e.qMode?"qSubNodes":"qNodes",o=se(r,e);return o&&o[0]?(t.tree=K(o[0],n.children||function(e){return e[i]}),t.tree):null};function ke(e){for(var n=e.raw().qDataPages.length?e.raw().qDataPages[0].qMatrix:[],r=me(e),i=e.fields(),o=e.fields().filter((function(e){return"dimension"===e.type()})).map((function(e){return r.indexOf(i.indexOf(e))})),a=e.fields().filter((function(e){return"measure"===e.type()})).map((function(e){return r.indexOf(i.indexOf(e))})),s={__root:{__id:"__root",qValues:[]}},u=0;u<n.length;u++){for(var l=n[u],c="__root",f=!1,h=0;h<o.length;h++){var d=l[o[h]],p="".concat(c,"__").concat(d.qText);s[p]||(s[p]=t({__id:p,__parent:c,qValues:[]},d),f=!0),c=p}if(f)for(var m=0;m<a.length;m++){var g=l[a[m]];s[c].qValues.push(g)}}var y=Object.keys(s).map((function(e){return s[e]}));return ae().id((function(e){return e.__id})).parentId((function(e){return e.__parent}))(y)}var Me=function(e){for(var t=e.propsArr,n=e.props,r=e.cube,i=e.cache,o=e.itemDepthObject,a=e.f,s=0;s<t.length;s++)for(var u=n[t[s]],l=u.fields?u.fields:[u],c=0;c<l.length;c++){var f=l[c];if(f.field!==a){var h=ve(o,ye(f.field,{cube:r,cache:i}));f.accessor=h.nodeFn,f.valueAccessor=h.valueFn,f.attrAccessor=h.attrFn}}};function _e(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=n.raw(),a=n.key(),s="S"===o.qMode?ke(n):we(o,r,e);if(!s)return null;for(var u=s.height,l=[],c=0;c<=u;c++){var f=null;if(c>0)if("S"===o.qMode){var h=ge(o)[c-1];f=r.fields[h]}else{var d=o.qEffectiveInterColumnSortOrder[c-1];c>o.qEffectiveInterColumnSortOrder.length&&(d=o.qDimensionInfo.length),f=r.fields[d]}var p=i.normalizeConfig(t(t({},e),{},{field:f?f.key():void 0}),n),m=p.props,g=p.main,y=Object.keys(m);l[c]={propsArr:y,props:m,main:g};var v=f?ye(f,{cube:o,cache:r}):{fieldDepth:0};Me({propsArr:y,props:m,cube:o,cache:r,itemDepthObject:v,f:f})}for(var b=s.copy().descendants(),x=s.descendants(),w=0;w<x.length;w++){var k=l[x[w].depth].propsArr,M=l[x[w].depth].props,_=l[x[w].depth].main,S=b[w],q=S.data,D=be(_,q,{key:a});xe({propsArr:k,props:M,item:S,itemData:q,ret:D,sourceKey:a,isTree:!0}),x[w].data=D}return s}function Se(e,t,r,i){for(var o=Array.isArray(e)?e:[e],a=[],s=0;s<o.length;s++)if(void 0!==o[s].field){var u=t.raw(),l=t.key();if(!we(u,r,e))continue;var c="object"===n(o[s].field)?o[s].field:t.field(o[s].field),f=i.normalizeConfig(o[s],t),d=f.props,p=f.main,m=Object.keys(d),g=ye(c,{cube:u,cache:r}),y=ve({fieldDepth:0},g),v=y.nodeFn,b=y.attrFn,x=y.valueFn;Me({propsArr:m,props:d,cube:u,cache:r,itemDepthObject:g,f:c});for(var w=!!o[s].trackBy,k=n(o[s].trackBy),M={},_=[],S=v(r.tree),q=[],D=0;D<S.length;D++){var C=S[D],E=b?b(x(C)):x(C);if(!p.filter||p.filter(E)){var A=be(p,E,{key:l});xe({propsArr:m,props:d,item:C,itemData:E,ret:A,sourceKey:l}),w&&i.track({cfg:o[s],itemData:E,obj:A,target:_,tracker:M,trackType:k}),q.push(A)}}w?a.push.apply(a,h(i.collect(_,{main:p,propsArr:m,props:d}))):a.push.apply(a,q)}return a}function qe(e,t){return e(t={exports:{}},t.exports),t.exports}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==p||"undefined"!=typeof self&&self;var De=qe((function(e){
23
23
  /*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
24
- !function(t,n){e.exports=n()}(0,(function(){return function(e,t){if(!e||isNaN(+t))return t;var n,r,i,o,a,s,u,l,c,f,h=e.length,d=e.search(/[0-9\-\+#]/),p=d>0?e.substring(0,d):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),y=h-g,v=e.substring(y,y+1),b=y+("."===v||","===v?1:0),x=g>0?e.substring(b,h):"";if(n=(t="-"===(e=e.substring(d,b)).charAt(0)?-t:+t)<0?t=-t:0,i=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",o=r&&r[1]&&r[0]||",",e=e.split(i),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(l=t.split("."))[1]||l[1]&&l[1].length<=s)&&(t=(+t).toFixed(s+1)),c=e[0].split(o),e[0]=c.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;l[0].length<e[0].length-a;)l[0]="0"+l[0];else 0==+l[0]&&(l[0]="");if((t=t.split("."))[0]=l[0],u=c[1]&&c[c.length-1].length){for(m="",y=(f=t[0]).length%u,h=f.length,b=0;b<h;b++)m+=f.charAt(b),!((b-y+1)%u)&&b<h-u&&(m+=o);t[0]=m}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),p+(n?"-":"")+r+x}}))}));function Ce(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}var Ee={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"},Ae=/%$/,Te=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,Ne=/^\(oct\)/i,Re=/^\(dec\)/i,Oe=/^\(hex\)/i,Ie=/^\(bin\)/i,Pe=/^\(rom\)/i,Le=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,je=/#|0/g;function ze(e,t,n,r){return e=e.toString(t),n[1]===n[1].toUpperCase()&&(e=e.toUpperCase()),e.length-e.indexOf(".")>10&&(e=e.slice(0,e.indexOf(".")+11)),e.replace(".",r||".")}function Fe(e,t){for(var n,r="",i=Number(String(e).slice(-3)),o=(e-i)/1e3,a=[0,1,4,5,9,10,40,50,90,100,400,500,900].reverse(),s=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();i>0;)for(n=0;n<a.length;n++)if(a[n]<=i){r+=s[n],i-=a[n];break}for(n=0;n<o;n++)r="M".concat(r);return t[1]!==t[1].toUpperCase()&&(r=r.toLowerCase()),r}function He(e,t,n){var r;return Te.test(t)?e=ze(e,Number(/\d{2}/.exec(t)[0]),t,n):Ne.test(t)?e=ze(e,8,t,n):Re.test(t)?e=ze(e,10,t,n):Oe.test(t)?e=ze(e,16,t,n):Ie.test(t)?e=ze(e,2,t,n):Pe.test(t)&&(r="",e<0&&(r="-",e=-e),e=0===(e=Math.floor(e))?"0":e<=5e5?r+(e=Fe(e,t)):t+r+e.toExponential(0)),e}function Be(e,t,n){var r=Ce(e);return n?r:new RegExp(r||"",t)}function Ve(e,t){return t&&(t=Ce(t)),e&&(e=Ce(e)),new RegExp("(?:[#0]+".concat(e,")?[#0]+(?:").concat(t,"[#0]+)?"))}function We(e,t){if(!e||!e.qNumericalAbbreviation)return Ee;var n={};return e.qNumericalAbbreviation.split(t).forEach((function(e){var t=e.split(":");2===t.length&&(n[t[0]]=t[1])})),n}function Ue(e,t,n){var r,i,o,a,s,u,l,c,f,h=e.pattern;h.indexOf("A")>=0&&(h=h.replace("A",""),e.abbreviate=!0),f=Ve(t,n),a=(o=(o=h.match(f))?o[0]:"")?h.substr(0,h.indexOf(o)):h,s=o?h.substring(h.indexOf(o)+o.length):"",o||(o=h?"#":"##########"),t&&t===n&&(i=(r=o.split(n)).pop(),o=r.join("")+n+i,t=""),u=t,t=/,/.test(n)?"¤":",",u&&(o=o.replace(Be(u,"g"),t)),l=n,n=".",l&&(o=o.replace(Be(l,"g"),n)),c=(c=o.match(/#/g))?c.length:0;var d,p=h.split(l);p[1]&&(d=p[1].match(je)),e.prefix=a||"",e.postfix=s||"",e.pattern=h,e.maxPrecision=d?d.length:2,e.percentage=Ae.test(h),e.numericPattern=o||"",e.numericRegex=new RegExp("".concat(Be(t,null,!0),"|").concat(Be(n,null,!0)),"g"),e.groupTemp=u,e.decTemp=l,e.t=t,e.d=n,e.temp=c}var $e=function(){function e(t,n,r,o,a){i(this,e),this.localeInfo=t,this.pattern=n,this.thousandDelimiter=r||",",this.decimalDelimiter=o||".",this.type=a||"numeric",this.patternSeparator=";",this.abbreviations=We(t,this.patternSeparator),this.prepare()}return a(e,[{key:"clone",value:function(){var t=new e(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return t.subtype=this.subtype,t}},{key:"format",value:function(e,t,n,r){return this.prepare(t,n,r),this.formatValue(e)}},{key:"prepare",value:function(e,t,n){var r;void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===n&&(n=this.decimalDelimiter),e?(this._prepared={positive:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},negative:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},zero:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""}},r=this._prepared,e=e.split(this.patternSeparator),r.positive.pattern=e[0],r.negative.pattern=e[1],r.zero.pattern=e[2],Le.test(e[0])&&(r.positive.isFunctional=!0),e[1]?Le.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?Le.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1,r.positive.isFunctional||Ue(r.positive,t,n),r.negative&&!r.negative.isFunctional&&Ue(r.negative,t,n),r.zero&&!r.zero.isFunctional&&Ue(r.zero,t,n)):this._prepared={pattern:!1}}},{key:"formatValue",value:function(e){var t,n,r,i,o,a,s,u,l,c=this._prepared,f="",h="",d=e;if(isNaN(e))return"".concat(d);if(e=+e,!1===c.pattern)return e.toString();if(0===e&&c.zero)return(c=c.zero).pattern;if(e<0&&c.negative?(c=c.negative,e=-e):c=c.positive,o=c.d,a=c.t,c.isFunctional)e=He(e,c.pattern,o);else{if(c.percentage&&(e*=100),c.abbreviate){var p,m,g=Object.keys(this.abbreviations).map((function(e){return parseInt(e,10)})).sort((function(e,t){return e-t})),y=g[0];for(s=0,n=Number(Number(e).toExponential().split("e")[1]);y<=n&&s<g.length;)y=g[++s];s>0&&(p=g[s-1]),p&&n>0&&p>0?m=p:(n<0&&p<0||!p)&&(y<0&&y-n<=c.maxPrecision?m=y:p<=n&&!(y>0&&-n<=c.maxPrecision)&&(m=p)),m&&(f=this.abbreviations[m],e/=Math.pow(10,m))}if(r=Math.abs(e),t=c.temp,l=(u=c.numericPattern).split(o)[1],"I"===this.type&&(e=Math.round(e)),i=e,l||"#"!==u.slice(-1)[0])if(r>=1e15||r>0&&r<=1e-14)e=r?r.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{var v=Number(e.toFixed(Math.min(20,l?l.length:0)).split(".")[0]),b=u.split(o)[0];if(e=De(b+=o,v)||"0",l){var x=Math.max(0,Math.min(14,l.length)),w=l.replace(/#+$/,"").length,k=("I"===this.type?0:r%1).toFixed(x).slice(2).replace(/0+$/,"");for(s=k.length;s<w;s++)k+="0";k&&(e+=o+k)}else 0===v&&(i=0)}else if(r>=Math.pow(10,t)||r<1||r<1e-4)0===e?e="0":r<1e-4||r>=1e20?(e=(e=i.toExponential(Math.max(1,Math.min(14,t))-1)).replace(/\.?0+(?=e)/,""),h=""):(e=e.toPrecision(Math.max(1,Math.min(14,t)))).indexOf(".")>=0&&(e=(e=e.replace(e.indexOf("e")<0?/0+$/:/\.?0+(?=e)/,"")).replace(".",o));else{for(u+=o,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(r)/Math.log(10)))),s=0;s<t;s++)u+="#";e=De(u,e)}e=e.replace(c.numericRegex,(function(e){return e===a?c.groupTemp:e===o?c.decTemp:""})),i<0&&!/^-/.test(e)&&(e="-".concat(e))}return c.prefix+e+h+f+c.postfix}}],[{key:"getStaticFormatter",value:function(){return{prepare:function(){},formatValue:function(e){return"".concat(e)}}}}]),e}();function Ye(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return c($e,t)}function Ke(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.size,o=void 0===i?5e3:i,a=r.multipleArguments,s=void 0!==a&&a,u=r.toKey,l=void 0===u?function(e){return e}:u,c=Object.create(null),f=Object.create(null),h=0,d=0;return(t=s?function(){return n=l.apply(void 0,arguments),t.has(n)?t.get(n):t.set(n,e.apply(void 0,arguments))}:function(r){return n=l(r),t.has(n)?t.get(n):t.set(n,e(r))}).set=function(e,t){return h>=o&&(delete c[f[d]],delete f[d],h--,d++),c[e]=t,f[h]=e,h++,t},t.get=function(e){return c[e]},t.has=function(e){return e in c},t.clear=function(){c=Object.create(null),f=Object.create(null),h=0,d=0},t.size=function(){return h},t}function Xe(e,t,n,r,i){var o=Ye(i,e,t,n,r),a=Ke(o.formatValue.bind(o),{toKey:function(e){return isNaN(e)?e:+e}});function s(e){return a(e)}return s.format=function(e,t,n,r){return a.clear(),o.format(t,e,n,r)},s.pattern=function(e){return e&&(a.clear(),o.pattern=e,o.prepare()),o.pattern},s}var Ge={AUTO:"U",INTEGER:"I",NUMBER:"R",FIXED_TO:"F",MONEY:"M",DATE:"D",TIME:"T",DATE_TIME:"TS",INTERVAL:"IV"},Je=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Ze=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Qe=["January","February","March","April","May","June","July","August","September","October","November","December"],et=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],tt=86400;function nt(e,t){for(var n=e.length;n<t;n++)e="0".concat(e);return e}function rt(e,t){var n=e.getUTCHours(),r=e.getUTCDay()-1;return t&&((n%=12)||(n=12)),r<0&&(r=6),{year:e.getUTCFullYear(),month:e.getUTCMonth(),day:r,date:e.getUTCDate(),h:n,m:e.getUTCMinutes(),s:e.getUTCSeconds(),f:e.getUTCMilliseconds(),t:e.getUTCHours()>=12?"pm":"am"}}function it(e){var t=e.toString().split(".");return t[1]?t=Number("0.".concat(t[1])):0}function ot(e){var t=e,n=24*it(t),r=60*it(n),i=60*it(r),o=1e3*it(i);return{d:Math.floor(t),h:Math.floor(n),m:Math.floor(r),s:Math.floor(i),f:Math.round(o)}}function at(e,t){var n,r=ot(e),i=r.d,o=r.h,a=r.m,s=r.s,u=r.f,l=0;/w+|t+/gi.test(t)&&(n=new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,Math.round(tt*(e-Math.floor(e))))),isNaN(n.getTime())&&(n=null)),/D+/gi.test(t)||(o+=24*i),/h+/gi.test(t)||(a+=60*o),/m+/gi.test(t)||(s+=60*a),/w+/gi.test(t)&&(l=n?n.getDay()-1:0)<0&&(l=6);var c="";return n&&(c=n.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:l,date:i,h:o,m:a,s:s,f:u,t:c}}function st(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:nt("".concat(t.year).slice(-2),2),YYY:nt("".concat(t.year).slice(-3),3),def:function(e){return nt("".concat(t.year),e.length)}},"M+":{M:t.month+1,MM:nt("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:nt("".concat(t.day),2),WWW:e.locale_days_abbr[t.day],def:e.locale_days[t.day]},"D+|d+":{D:t.date,def:function(e){return nt("".concat(t.date),e.length)}},"h+|H+":{h:t.h,def:function(e){return nt("".concat(t.h),e.length)}},"m+":{m:t.m,def:function(e){return nt("".concat(t.m),e.length)}},"s+|S+":{s:t.s,def:function(e){return nt("".concat(t.s),e.length)}},"f+|F+":{def:function(e){var n="".concat(t.f),r=e.length-n.length;if(r>0)for(var i=0;i<r;i++)n+="0";else r<0&&(n=n.slice(0,e.length));return n}},"t{1,2}|T{1,2}":{def:function(e){var n=t.t;return e[0].toUpperCase()===e[0]&&(n=n.toUpperCase()),n=n.slice(0,e.length)}}}}var ut=function(){function e(t,n,r){i(this,e);var o,a=t||{};a.qCalendarStrings||(a.qCalendarStrings={qLongDayNames:Je,qDayNames:Ze,qLongMonthNames:Qe,qMonthNames:et}),this.localeInfo=a,this.locale_days=a.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=a.qCalendarStrings.qDayNames.slice(),this.locale_months=a.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=a.qCalendarStrings.qMonthNames.slice(),n||(n=(s(o={},Ge.TIME,a.qTimeFmt||"hh:mm:ss"),s(o,Ge.DATE,a.qDateFmt||"YYYY-MM-DD"),s(o,Ge.DATE_TIME,a.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"),o)[r]),this.pattern=n}return a(e,[{key:"clone",value:function(){var t=new e(this.localeInfo,this.pattern);return t.subtype=this.subtype,t}},{key:"format",value:function(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+]|\[|]/g,"");var n,r=/t+/gi.test(t);e instanceof Date?n=rt(e,r):(e<0&&(e=-e,t="-".concat(t)),n=at(e,t));var i=st(this,n),o=[];for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&o.push(a);var s=new RegExp(o.join("|"),"g");return t.replace(s,(function(e){var t,n,r;for(n in i)if(Object.prototype.hasOwnProperty.call(i,n)&&(t=new RegExp(n)).test(e))break;if(!t)return"";for(var o in i[n])if(o===e||o.toLowerCase()===e){void 0===(r=i[n][o])&&(r=i[n][o.toLowerCase()]);break}return void 0===r&&(r=i[n].def),"function"==typeof r&&(r=r(e)),r}))}}]),e}();function lt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return c(ut,t)}var ct=864e5;function ft(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(ct*(e-Math.floor(e)))))}function ht(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",r=lt(arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,e,t),i=Ke(r.format.bind(r),{toKey:function(e){return"object"===n(e)&&"function"==typeof e.getTime?e.getTime():e}});function o(e){return t!==Ge.INTERVAL?ft(e):e}function a(e){return e=o(e),i(e)}return a.format=function(e,t){return i.clear(),t=o(t),r.format(t,e)},a.locale=function(o){return r=lt(o,e,t),i=Ke(r.format.bind(r),{toKey:function(e){return"object"===n(e)?e.getTime():e}}),this},a.qtype=function(e){return void 0!==e&&(t=e,i.clear()),t},a}function dt(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return ht(e.qNumFormat.qFmt,e.qNumFormat.qType,t);var n="#",r=t&&void 0!==t.qThousandSep?t.qThousandSep:",",i=t&&void 0!==t.qDecimalSep?t.qDecimalSep:".",o="U",a=e&&!!e.qIsAutoFormat;return e&&e.qNumFormat?(n=e.qNumFormat.qFmt||n,r=e.qNumFormat.qThou||r,i=e.qNumFormat.qDec||i,o=e.qNumFormat.qType||o,a=a&&-1===["M"].indexOf(e.qNumFormat.qType)):a=!0,(a||"U"===o)&&(n="#".concat(i,"##A"),o="U"),Xe(n,r,i,o,t)}function pt(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.meta,r=t.id,i=t.key,o=t.localeInfo,a=t.fieldExtractor,s=t.value,u=t.type,l=t.sourceField,c=s||("dimension"===u?function(e){return e.qElemNo}:function(e){return e.qValue}),f=function(e){return e.qText||""},h="dimension"===u?"first":"avg",d=dt(n,o),p={id:function(){return r},key:function(){return i},raw:function(){return n},title:function(){return n.qFallbackTitle||n.label},type:function(){return u},origin:function(){return l},items:function(){return e||(e=a(p)),e},min:function(){return n.qMin},max:function(){return n.qMax},value:c,label:f,reduce:h,reduceLabel:"dimension"===u?"first":function(e,t){return d(t)},formatter:function(){return d},tags:function(){return n.qTags}};return p}function mt(e,t,n,r,i){return(t[e]||[]).map((function(t,o){var a="".concat(r?"".concat(r,"/"):"").concat(e,"/").concat(o),s={instance:pt(A({id:"".concat(n?"".concat(n,"/"):"").concat(a),key:a,meta:t},i))};return s.attrDims=mt("qAttrDimInfo",t,n,a,A({},i,{value:function(e){return e.qElemNo},type:"dimension"})),s.attrExps=mt("qAttrExprInfo",t,n,a,A({},i,{value:function(e){return e.qNum},type:"measure"})),s.measures=mt("qMeasureInfo",t,n,a,A({},i,{value:function(e){return e.qValue},type:"measure"})),s}))}function gt(){var e,n,r,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=i.key,a=i.data,s=i.config,u=void 0===s?{}:s,l={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},c=a;if(!c)throw new Error('Missing "data" input');if(!c.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');var f=gt.util,d={cache:l,cube:c,localeInfo:u.localeInfo,fieldExtractor:null,pages:null,hierarchy:function(){return null},virtualFields:u.virtualFields},p={key:function(){return o},raw:function(){return c},field:function(e){return ce(e,d)},fields:function(){return l.fields.slice()},extract:function(e){return d.extractor(e,p,l,f)},hierarchy:function(e){return d.hierarchy(e,p,l,f)},_cache:function(){return l}};"K"===c.qMode||"T"===c.qMode||!c.qMode&&c.qNodesOnDim?(d.extractor=Se,d.hierarchy=_e,d.pages="K"===c.qMode?c.qStackedDataPages:c.qTreeDataPages):"S"===c.qMode?(d.extractor=O,d.pages=c.qDataPages,d.hierarchy=_e):d.extractor=function(){return[]},d.fieldExtractor=function(e){return d.extractor({field:e},p,l,f)};var m="S"===c.qMode?function(e){return e.qElemNumber}:void 0,g="S"===c.qMode?function(e){return e.qNum}:void 0;return(e=l.wrappedFields).push.apply(e,h(mt("qDimensionInfo",c,o,"",A({},d,{value:m,type:"dimension"})))),(n=l.wrappedFields).push.apply(n,h(mt("qMeasureInfo",c,o,"",A({},d,{value:g,type:"measure"})))),l.fields=l.wrappedFields.map((function(e){return e.instance})),function e(t){t.forEach((function(t){l.allFields.push(t.instance),e(t.measures),e(t.attrDims),e(t.attrExps)}))}(l.wrappedFields),(u.virtualFields||[]).forEach((function(e){var n=p.field(e.from),r=pt(t({meta:n.raw(),id:"".concat(o,"/").concat(e.key),sourceField:n,fieldExtractor:function(e){return d.extractor({field:e},p,l,f)},key:e.key,type:n.type(),localeInfo:d.localeInfo,value:n.value},e.override||{}));l.virtualFields.push(r)})),(r=l.allFields).push.apply(r,h(l.virtualFields)),p}var yt=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],vt=/\/qDimensionInfo(?:\/(\d+))?/,bt=/\/qMeasureInfo\/(\d+)/,xt=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,wt=/\/qAttrExprInfo\/(\d+)/,kt=/\/?qHyperCube/,Mt=/\/?qTreeData/,_t=function(e){return"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14))},St=function(e){return"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13))};function qt(e,t){var n=e,r=-1,i=-1,o="",a=function(e){return e};kt.test(e)?(o="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),a=_t):Mt.test(e)&&(o="".concat(n.substr(0,n.indexOf("qTreeData")+9)),a=St);var s=!0;if(vt.test(e)&&(r=+vt.exec(e)[1]),bt.test(e)&&(i=+bt.exec(e)[1]),xt.test(e)){i=-1,r=0;var u=+xt.exec(n)[2];isNaN(u)||(r=u,n=n.replace(/\/\d+$/,"")),s=!1}if(wt.test(e)){var l=i;if(t){i=0;var c=se(o,t);i+=(c.qMeasureInfo||[]).length,r>-1?(i=c.qDimensionInfo.slice(0,r).reduce((function(e,t){return e+t.qAttrExprInfo.length}),i),r=-1):(i=c.qDimensionInfo.reduce((function(e,t){return e+t.qAttrExprInfo.length}),i),i=c.qMeasureInfo.slice(0,l).reduce((function(e,t){return e+t.qAttrExprInfo.length}),i)),i+=+wt.exec(n)[1]}else r>-1?(r=-1,i=+wt.exec(n)[1]):i+=+wt.exec(n)[1]+1}return yt.forEach((function(e){var t=f(e,2),r=t[0],i=t[1];n=n.replace(r,i)})),s&&(n=a(n)),n&&"/"!==n[0]&&(n="/".concat(n)),{measureIdx:i,dimensionIdx:r,path:n}}function Dt(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,i=n.byCells,o=n.primarySource,a=[],s={},u=e.isActive(),l=!1;return e.brushes().forEach((function(e){var t=qt(e.id,r);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){var n=e.brush.ranges();n.length&&(l=!0,s.multiRangeSelectTreeDataValues||(s.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),n.forEach((function(e){return s.multiRangeSelectTreeDataValues.ranges.push({qMeasureIx:t.measureIdx,qDimensionIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})})))}else{if("range"===e.type&&t.measureIdx>-1){var u=e.brush.ranges();u.length&&(l=!0,s.rangeSelectHyperCubeValues||(s.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),u.forEach((function(e){return s.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:t.measureIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})})))}if("range"===e.type&&t.dimensionIdx>-1){var c=e.brush.ranges();c.length&&(l=!0,s.selectHyperCubeContinuousRange||(s.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),c.forEach((function(e){return s.selectHyperCubeContinuousRange.ranges.push({qDimIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!1}})})))}if("value"===e.type&&t.dimensionIdx>-1)if(i)if(r&&r.qHyperCube&&("P"===r.qHyperCube.qMode||"T"===r.qHyperCube.qMode||"K"===r.qHyperCube.qMode)){var f=r.qHyperCube,h=f.qNoOfLeftDims,d=f.qEffectiveInterColumnSortOrder.indexOf(t.dimensionIdx);if(s.selectPivotCells||(s.selectPivotCells={path:t.path,cells:[]}),e.id===o||!o){var p=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)}));(0===h||d>=h)&&h>-1?p.forEach((function(e){s.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:d-h})})):p.forEach((function(e){s.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})})),l=!!s.selectPivotCells.cells.length}}else s.selectHyperCubeCells||(s.selectHyperCubeCells={path:t.path,cols:[]}),s.selectHyperCubeCells.cols.push(t.dimensionIdx),e.id!==o&&(o||s.selectHyperCubeCells.values)||(s.selectHyperCubeCells.values=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)})),l=!!s.selectHyperCubeCells.values.length);else{var m=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)}));l=!!m.length,a.push({params:[t.path,t.dimensionIdx,m,!1],method:"selectHyperCubeValues"})}}})),!l&&u?[{method:"resetMadeSelections",params:[]}]:(s.rangeSelectHyperCubeValues&&a.push({method:"rangeSelectHyperCubeValues",params:[s.rangeSelectHyperCubeValues.path,s.rangeSelectHyperCubeValues.ranges,[],null===(t=n.orMode)||void 0===t||t]}),s.selectHyperCubeContinuousRange&&a.push({method:"selectHyperCubeContinuousRange",params:[s.selectHyperCubeContinuousRange.path,s.selectHyperCubeContinuousRange.ranges]}),s.selectHyperCubeCells&&a.push({method:"selectHyperCubeCells",params:[s.selectHyperCubeCells.path,s.selectHyperCubeCells.values,s.selectHyperCubeCells.cols]}),s.selectPivotCells&&a.push({method:"selectPivotCells",params:[s.selectPivotCells.path,s.selectPivotCells.cells]}),s.multiRangeSelectTreeDataValues&&a.push({method:"multiRangeSelectTreeDataValues",params:[s.multiRangeSelectTreeDataValues.path,s.multiRangeSelectTreeDataValues.ranges]}),a)}function Ct(e){gt.util=e.data("matrix").util,e.data("q",gt),e.formatter("q-number",Xe),e.formatter("q-time",ht)}return Ct.qBrushHelper=Dt,Ct.selections=Dt,Ct}()}(kb);var Mb=kb.exports,_b={brushInterceptors:{DIM_VALUE_NULL:-2,DIM_VALUE_TOTAL:-3,brushOnlyOne:function(e,t){var n=e.brushes().filter((function(e){return"value"===e.type})),r=[];n.length&&n.forEach((function(e){r=r.concat(e.brush.values().map((function(t){return{key:e.id,value:t}})))}));return r.concat(t)},filterValues:function(e,t){var n,r,i=this,o=[],a=0,s=[];return t.forEach((function(t){t.value!==i.DIM_VALUE_NULL&&t.value!==i.DIM_VALUE_TOTAL&&(r=function(e,t){var n=t.key.indexOf("qHyperCube")+"qHyperCube".length,r=t.key.substr(0,n),i=t.key.substr(n+1);return e.dataset(r).field(i)}(e,t),(n=r&&r.raw()).qLocked?(o.push(n),a++):s.push({key:t.key,value:t.value}))})),{items:s,itemsAreLocked:a>0&&a===t.length,lockedFields:o}}}};var Sb={data:["elemNo"],contexts:["select"],startOnEmptySelection:!0,style:{active:{strokeWidth:2,stroke:"#333"},inactive:{opacity:.3}}};function qb(e){if(!e||!e.chartInstance||!e.selectionsApi)throw Error("Selections-handler: Missing input");var t=e.chartInstance,n=e.selectionsApi,r=e.dataPaths||[""],i=e.selectPaths,o=e.lasso,a=[],s={propertiesToRestore:{}},u=!1,l=function(e,t,n){function r(){}return r.update=function(e,r,i){t.isActive()||t.begin(n),Mb.qBrushHelper(i).forEach((function(e){t.select(e)}))},r.toggleValues=function(r,i,o){var a=_b.brushInterceptors.filterValues(e,r),s=a.items;return t.isActive()||a.itemsAreLocked||!(o||s.length>0)||(t.begin(n),i.start(),i.emit("update",[],[])),s},r}(t,n,i),c={},f=!1;function h(e){16===e.keyCode&&e.shiftKey!==f&&(f=e.shiftKey,o.toggle())}function d(e){var t=e.keyCode;27===t?n.cancel():13===t&&n.confirm()}function p(){a.forEach((function(e){e.listeners.update=function(t,n){e.sleep||l.update(t,n,e.brush)},e.brush.on("update",e.listeners.update),e.brush.on("start",e.listeners.start)}))}function m(){a.forEach((function(e){e.brush.removeListener("update",e.listeners.update),e.brush.removeListener("start",e.listeners.start)}))}return n.on("cleared",(function(){a.forEach((function(e){e.brush.clear(),e.dependentComponents.forEach((function(e){var n=t.component(e.id);n&&n.emit(e.clear)}))}))})),c.setUp=function(e){c.tearDown();var t=this.setUpBrush(e);return u&&p(),t},c.setUpBrush=function(e){var n=jv(!0,{},Sb,e),i={on:"tap",action:function(t){return t.ctrlKey||e.isSingleSelect?"set":"toggle"},contexts:n.contexts,data:n.data,globalPropagation:"stop"},o={context:n.contexts[0],data:n.data,style:n.style},s=function(e,t){return{brush:t.brush(e.contexts[0]),listeners:{},dependentComponents:[],id:e.contexts[0]}}(n,t);return s.listeners.toggle=function(e){if(!u)return[];var i=function(){var e=[],n=r.map((function(e){return t.dataset(e).fields().filter((function(e){return"dimension"===e.type()}))}));n=[].concat.apply([],n);for(var i=0;i<n.length;i++)n[i].raw().qLocked&&e.push(n[i].raw());return{fields:e,areAllFieldsLocked:e.length&&e.length===n.length}}();return n.startOnEmptySelection&&0===e.length&&i.areAllFieldsLocked?[]:l.toggleValues(e,s.brush,n.startOnEmptySelection)},s.brush.intercept("toggle-values",s.listeners.toggle),s.brush.intercept("add-values",s.listeners.toggle),s.brush.intercept("remove-values",s.listeners.toggle),s.brush.intercept("set-values",s.listeners.toggle),s.listeners.start=function(){a.length>1&&a.forEach((function(e){e!==s&&e.brush.end()}))},a.push(s),{trigger:i,consume:o}},c.setUpStart=function(){c.tearDown()},c.setUpDone=function(){u&&p()},c.tearDown=function(){u&&m(),a.forEach((function(e){e.brush.removeInterceptor("toggle-values",e.listeners.toggle),e.brush.removeInterceptor("add-values",e.listeners.toggle),e.brush.removeInterceptor("remove-values",e.listeners.toggle),e.brush.removeInterceptor("set-values",e.listeners.toggle)})),a=[]},c.pauseEngineCalls=function(e){a.forEach((function(t){t.id===e&&(t.sleep=!0)}))},c.resumeEngineCalls=function(e,t){a.forEach((function(n){n.id===e&&(n.sleep=!1,t&&n.listeners.update([],[]))}))},c.addComponent=function(e,t){a.forEach((function(n){n.id===e&&n.dependentComponents.push(t)}))},c.on=function(){if(!u){u=!0,p(),document.addEventListener("keydown",h),document.addEventListener("keyup",h);var e=function(){a.forEach((function(e){e.brush.end()})),document.removeEventListener("keyup",d),o.active()&&o.toggle()};n.on("deactivated",e),s.unbindDeactivated=function(){n.removeListener("deactivated",e)};var t=function(){document.addEventListener("keyup",d)};n.on("activated",t),s.unbindActivated=function(){n.removeListener("activated",t)}}},c.isOn=function(){return u},c.off=function(){u&&(u=!1,m(),document.removeEventListener("keydown",h),document.removeEventListener("keyup",h),document.removeEventListener("keyup",d),s.unbindActivated(),s.unbindDeactivated())},c.lassoState=function(){return o.active()&&!(e.isLassoDisabled&&e.isLassoDisabled())},c.allFieldsLocked=function(){return e=r.map((function(e){return t.dataset(e).fields().filter((function(e){return"dimension"===e.type()}))})),(e=[].concat.apply([],e)).length&&e.every((function(e){return e.raw().qLocked}));var e},c}var Db=function(){function e(){a(this,e)}return u(e,[{key:"isOn",value:function(){return!1}},{key:"on",value:function(){console.warn("Can not turn on selections on this object")}},{key:"off",value:function(){}}]),e}(),Cb=function(e){return e.selectionsApi?qb(e):new Db};function Eb(e,t,n,r,i){var o=!1;r=r||"tooltip",n=n||["self"];var a=e.brush(r),s={};function u(){o&&e.component(i).emit("hide");o=!1}return s.isOpen=function(){return o},s.closeTooltip=u,s.update=function(){var s=a.brushes(),l=e.getAffectedShapes(r,"and",n,t);s.length>=1?(o=!0,function(t){o=!0;var n={nodes:t};e.component(i).emit("show",{},n)}(l)):u()},s.toggleInterceptor=function(e){if(n.length>1){var t={},r=[];return e.forEach((function(e){t[e.key]||(t[e.key]={}),t[e.key][e.value]||(t[e.key][e.value]=!0,r.push(e))})),r}return e},s}var Ab=function(){return Eb.apply(void 0,arguments)},Tb={formatMeasureValue:function(e,t){if(e.raw().isCustomFormatted)return e.formatter()(t.value.qText);var n=void 0!==t.value.qNum?t.value.qNum:t.value.qValue;return e.formatter()(n)}};var Nb=function(e){return function(t){var n=t.h,i=t.data,o=t.style,a=function(e,t){for(var n=e.chartInstance.dataset(e.dataPath),i=[],o=t.length-5,a=Math.min(5,t.length),s=function(r){var o=t[r],a={rows:[]};if(e.labelData){for(var s=[],u=e.labelData,l=!1,c=0;c<u.length;c++){var f=o.data[u[c]].value;if(-2===f.qElemNo||-2===f.qElemNumber){l=!0;break}s.push(o.data[u[c]].value.qText)}if(l)return{v:void 0};a.header=e.headerResolver(s),a.rows=e.measureRows.map((function(t){var r=o.data;return e.rowResolver(n.field(r[t].source.field),r[t],r)})).filter((function(e){return!!e}));var h=function(e,t){var n,r,i,o=t.data.color,a=null===(n=e.colorService)||void 0===n||null===(r=n.getSettings)||void 0===r?void 0:r.call(n);if(!a||"color"===a.type||!o||!a.fieldType)return;var s=[];e.data.forEach((function(e){var n=t.data[e];n&&s.push(n.value)}));var u=function(e){for(var t=-1,n=0;n<e.length;n++)-3===e[n]&&(t=n);return t}(s),l=e.translator,c=a.label,f=null===(i=t.attrs)||void 0===i?void 0:i.fill,h=-1!==u?l.get("properties.dimensionLimits.others"):o.label;return{color:f,label:c,value:h}}(e,o);h&&a.rows.unshift(h),i.push(a)}},u=0;u<a;u++){var l=s(u);if("object"===r(l))return l.v}o>0&&(i.numberInExcess=o);return i.rowCount=i[0]?i.length*i[0].rows.length:0,i}(e,i),s={h:n,style:o,rtl:"rtl"===e.direction,translator:e.translator};return e.renderer(s,a)}};var Rb="dist-flow-tooltip",Ob="#".concat(Rb);function Ib(){if(!document.querySelector(Ob)){var e=document.createElement("div");e.id=Rb,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 Pb(e){var t=e.key,n=void 0===t?"tooltip":t,r=e.rtl,i=e.fontFamily,o=e.filter;return{show:!0,key:n,type:"tooltip",layout:{displayOrder:3},beforeMount:function(){Ib()},beforeUpdate:function(){Ib()},destroyed:function(){var e;(e=document.querySelector(Ob))&&e.parentElement&&e.childElementCount<1&&e.parentElement.removeChild(e)},settings:{appendTo:function(){return document.querySelector(Ob)},content:e.content,filter:o,extract:function(e){return e.node},direction:r?"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:i,"empty-cells":"show"},cell:{"max-width":"180px","word-break":"break-word","word-wrap":"break-word","overflow-wrap":"break-word",hyphens:"auto"}}}}var Lb=Zv.detectTextDirection;var jb={tooltipKey:"tooltip",data:[""],contexts:["tooltip"],headerResolver:function(e){return e.join(", ")},rowResolver:function(e,t){return{value:Tb.formatMeasureValue(e,t),label:e.title()}},direction:"ltr",renderer:function(e,t){var r=e.h,i=e.style,o=e.translator,a=e.rtl,s=[],u=a?"right":"left";if(t.forEach((function(e){if(e.header){var t=n(n({},i.cell),{},{textAlign:u,fontWeight:"bold",direction:Lb(e.header)});s.push(r("tr",null,r("td",{style:t,colSpan:2},e.header)))}e.rows.forEach((function(e){var t=e.value;if(e.color){var o={display:"inline-block",width:10,height:10,"background-color":e.color,margin:"0 8px"},l=r("div",{style:o});t=a?[e.value,l]:[l,e.value]}var c=a?[":",e.label]:[e.label,":"],f=n(n({},i.cell),{},{textAlign:u,direction:Lb(e.label)}),h=n(n({},i.cell),{},{textAlign:a?"left":"right",direction:Lb(e.value)});s.push(r("tr",null,r("td",{style:f},c),r("td",{style:h},t)))}))})),t.numberInExcess){var l=o.get("Object.ChartTooltip.NMore",t.numberInExcess),c=n(n({},i.cell),{},{textAlign:u,direction:Lb(l)});s.push(r("tr",null,r("td",{style:c,colSpan:2},l)))}return s}};function zb(e,t,n){if(!e)throw Error("Tooltips-handler: Missing input");var r={},i=!1,o={};function a(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 s(){Object.keys(r).forEach((function(e){u(r[e])}))}function u(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 l(){Object.keys(r).forEach((function(e){r[e].action.closeTooltip()}))}function c(){for(var e in l(),r)r[e].brush.clear()}return o.setUp=function(t){var o=jv(!0,{},jb,t);if(!o.componentKey)throw Error("Tooltips-handler.setUp: Missing required input");r[o.contexts[0]]&&i&&u(r[o.contexts[0]]);var s=function(e,t){return{brush:t.brush(e.contexts[0]),action:Ab(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);r[o.contexts[0]]=s,i&&a(s);var l,c=Pb({key:o.tooltipKey,rtl:"rtl"===s.direction,fontFamily:s.theme.getStyle(n,"tooltip","fontFamily"),filter:(l=s.filterShapes,function(e){return l?l(e):function(e){var t=[];return e.forEach((function(e){-1===t.indexOf(e)&&"container"!==e.type&&t.push(e)})),t}(e)}),content:Nb(s,o.dataPath)});return o.chartBuilder.getSettings().components.push(c),{trigger:{on:s.treatAsDesktop?"over":"tap",action:"set",contexts:o.contexts,data:o.data,globalPropagation:"stop"},consume:o.contexts.map((function(e){return{context:e}})),component:c}},o.tearDown=function(){i&&s(),r=[]},o.closeTooltip=l,o.isOn=function(){return i},o.on=function(){i||(i=!0,Object.keys(r).forEach((function(e){a(r[e])})),t&&t.on("mouseleave",c))},o.off=function(){i&&(i=!1,s(),t&&t.off("mouseleave",c),l())},o}var Fb=function(e,t,n){return zb(e,t,n)};var Hb={generateHash:function(e){return function(e){var t=0;if(!e||!e.length)return t;for(var n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t&=t;return t}(JSON.stringify(e))},updateHash:function(e,t){e.qUndoExclude||(e.qUndoExclude={});e.qUndoExclude.hashCode=Hb.generateHash(t)}};var Bb={getDefaultHashDataForHyperCube:function(e,t,n){return function(e,t){var n=[];if(!e.qMeasures)return Promise.resolve(n);return e.qMeasures.forEach((function(e){e.qLibraryId?n.push(function(e,t){return t.getMeasure(e).then((function(e){return e.getProperties().then((function(e){return e.qMeasure.qDef}))}))}(e.qLibraryId,t)):n.push(Promise.resolve())})),Promise.all(n)}(e,n).then((function(e){return{drillLevel:Wb(t),dimensionExpressions:Vb(t),measureExpressions:e}}))}};function Vb(e){return e.qDimensionInfo.map((function(e){return e.qGroupFieldDefs}))}function Wb(e){return function(e){return nv(e,"qDimensionInfo",[])}(e).map((function(e){return e.qGroupPos}))}var Ub={},$b=jv.bind(null,!0);function Yb(e){return null!=e&&!Array.isArray(e)&&"object"===r(e)}var Kb=Array.isArray,Xb=function(e){return void 0===e};function Gb(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function Jb(e,t){var n,r=t.substring(1).split("/").slice(0,-1);return r.forEach((function(t,i){i!==r.length&&(e[(n=+t)||t]=Xb(e[n||t])?Number.isNaN(+n)?{}:[]:e[t],e=e[n||t])})),e}function Zb(e,t){if(Yb(e)&&Yb(t)){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];if(!Zb(e[i],t[i]))return!1}return!0}if(Kb(e)&&Kb(t)){if(e.length!==t.length)return!1;for(var o=0,a=e.length;o<a;o++)if(!Zb(e[o],t[o]))return!1;return!0}return e===t}Ub.generate=function(e,t,n){n=n||"";var r=[];return Object.keys(t).forEach((function(i){var o=function(e){return e&&(e=$b({},{val:e}).val),e}(t[i]),a=e[i],s="".concat(n,"/").concat(i);Zb(o,a)||Gb(t,i)||(Xb(a)?r.push({op:"add",path:s,value:o}):Yb(o)&&Yb(a)?r=r.concat(Ub.generate(a,o,s)):Kb(o)&&Kb(a)?r=r.concat(function(e,t,n){var r,i,o=[],a=e.slice(),s=-1;function u(e,t,n){if(e[n]&&Xb(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(var r=0,i=e.length;r<i;r++)if(e[r]&&e[r].qInfo.qId===t)return r;return-1}if(Zb(t,a))return o;if(null===t[0]||!Xb(t[0])&&Xb(t[0].qInfo))return o.push({op:"replace",path:n,value:t}),o;for(r=a.length-1;r>=0;--r)-1===(s=u(t,a[r]&&a[r].qInfo&&a[r].qInfo.qId,r))?(o.push({op:"remove",path:"".concat(n,"/").concat(r)}),a.splice(r,1)):o=o.concat(Ub.generate(a[r],t[s],"".concat(n,"/").concat(r)));for(r=0,i=t.length;r<i;++r)-1===(s=u(a,t[r]&&t[r].qInfo&&t[r].qInfo.qId))?(o.push({op:"add",path:"".concat(n,"/").concat(r),value:t[r]}),a.splice(r,0,t[r])):s!==r&&(o.push({op:"move",path:"".concat(n,"/").concat(r),from:"".concat(n,"/").concat(s)}),a.splice(r,0,a.splice(s,1)[0]));return o}(a,o,s)):r.push({op:"replace",path:"".concat(n,"/").concat(i),value:o}))})),Object.keys(e).forEach((function(i){Xb(t[i])&&!Gb(e,i)&&r.push({op:"remove",path:"".concat(n,"/").concat(i)})})),r},Ub.apply=function(e,t){t.forEach((function(t){var n,r=Jb(e,t.path),i=t.path.split("/").splice(-1)[0],o=i&&Number.isNaN(+i)?r[i]:r[+i]||r,a=t.from?t.from.split("/").splice(-1)[0]:null;if("add"===t.op||"replace"===t.op)if(Kb(r))"-"===i&&(i=r.length),r.splice(+i,"add"===t.op?0:1,t.value);else if(Kb(o)&&Kb(t.value)){var s=t.value.slice();o.length=0,o.push.apply(o,s)}else Yb(o)&&Yb(t.value)?(n=o,Object.keys(n).forEach((function(e){Object.getOwnPropertyDescriptor(n,e).configurable&&!Gb(n,e)&&delete n[e]})),$b(o,t.value)):r[i]=t.value;else if("move"===t.op){var u=Jb(e,t.from);Kb(r)?r.splice(+i,0,u.splice(+a,1)[0]):(r[i]=u[a],delete u[a])}else"remove"===t.op&&(Kb(r)?r.splice(+i,1):delete r[i])}))},Ub.clone=function(e){return $b({},e)},Ub.createPatch=function(e,t,n){var r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},Ub.updateObject=function(e,t){Object.keys(e).length?Ub.apply(e,Ub.generate(e,t)):$b(e,t)};var Qb=function(){function e(t){a(this,e),this._model=t}var t;return u(e,[{key:"setModel",value:function(e){this._model=e}},{key:"saveSoftProperties",value:function(e,t){if(!this._model)return Promise.resolve(!1);var n=Ub.generate(e,t);return jv(!0,e,t),n&&n.length?(n=n.map((function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}})),this._model.applyPatches(n,!0).then((function(){return!0}))):Promise.resolve(!1)}},{key:"mergeSoftPatches",value:(t=o(regeneratorRuntime.mark((function e(){var t,n,r,i,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._model){e.next=2;break}return e.abrupt("return");case 2:return t=this._model.getProperties(),n=this._model.getEffectiveProperties(),e.next=6,t;case 6:return r=e.sent,e.next=9,n;case 9:if(i=e.sent,!r.qExtendsId){e.next=12;break}return e.abrupt("return");case 12:o=Ub.generate(r,i),Ub.apply(r,o),(a=this)._model.setProperties(r).then((function(){a._model.clearSoftPatches()}));case 16:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}(),ex={canModifyHardProperties:function(e){if(e.qHasSoftPatches||e.qExtendsId)return!1;if(e.permissions)return e.permissions.update;return-1!==e.qMeta.privileges.indexOf("update")}};var tx={saveDerivedProperties:function(e,t,n,r){if(ex.canModifyHardProperties(t))return e.setProperties(n);return new Qb(e).saveSoftProperties(r,n)}};var nx={validate:function(e){if(!(e&&e.layout&&e.properties&&e.model&&e.hashData&&e.generateDerivedProperties))throw Error("Derived-properties: Missing input")}};function rx(){this._generationInProgress=!1}function ix(e){nx.validate(e);var t=e.properties,n=Hb.generateHash(e.hashData);return!(!t.qUndoExclude||t.qUndoExclude.hashCode!==n)}rx.prototype.isDerivedUpToDate=ix,rx.prototype.updateDerivedProperties=function(e){if(nx.validate(e),this._generationInProgress)return Promise.resolve(!0);if(ix(e)){var t=e.layout.qUndoExclude&&e.layout.qUndoExclude.hashCode===e.properties.qUndoExclude.hashCode;return Promise.resolve(!t)}var n=this,r=e.model,i=e.layout,o=jv(!0,{},e.properties),a=jv(!0,{},o);return this._generationInProgress=!0,Hb.updateHash(o,e.hashData),e.generateDerivedProperties(i,o).then((function(){return tx.saveDerivedProperties(r,i,o,a).then((function(){return n._generationInProgress=!1,Promise.resolve(!0)}))}))},rx.prototype.addDefaultHyperCubeHash=function(e,t,n,r){return Bb.getDefaultHashDataForHyperCube(e,t,n).then((function(e){return jv(!0,r,e)}))};var ox={wrapExpression:function(e){var t=e.replace(/\]/g,"]]");return t?"[".concat(t,"]"):""}};var ax={replaceExpressionTokens:function(e,t,n){var r,i,o={start:n&&n.start||"{{",end:n&&n.end||"}}"},a=e;for(var s in t)r=t[s],i=o.start+s+o.end,a=a.replace(sx(i,!0),r);return a},createRegExp:sx};function sx(e,t,n){var r=e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&"),i=n?"(".concat(r,")"):r;return t?new RegExp(i,"g"):new RegExp(i)}var ux={generateExpression:function(e,t){var n={};if(t){var r=function(e){var r=t[e],i=r.wrap?ox.wrapExpression(r.value):r.value;n[e]=i,(r.variations||[]).forEach((function(t){var r=function(e,t,n){if(""===t)return"";var r=ax.createRegExp(n,!0,!0),i=e.split(r),o="";return i.forEach((function(e){o+=e!==n?e:t})),o}(t,i,e);n[t]=r}))};for(var i in t)r(i)}return ax.replaceExpressionTokens(e,n)}};var lx={generateHyperCubeDef:function(e,t,n,r,i){return function(e,t,n,r){var i,o={},a=[];e.forEach((function(e){mx(e.match(px("Dim"))).forEach((function(e){a.push(fx(t.qDimensions[e],r,e,n).then((function(t){o["Dim[".concat(e,"]")]={value:t,wrap:!0}})))})),mx(e.match(px("Mea"))).forEach((function(e){a.push(hx(t.qMeasures[e],r).then((function(t){o["Mea[".concat(e,"]")]={value:t}})))}))})),i=a.length?Promise.all(a).then((function(){return Promise.resolve(o)})):Promise.resolve(o);return i}(e.dimensions.concat(e.measures),t,n,r).then((function(n){var r=jv({},n,i),o=jv(!0,{},t);return o.qDimensions=[],o.qMeasures=[],e.dimensions.forEach((function(e){o.qDimensions.push({qDef:{qFieldDefs:["=".concat(ux.generateExpression(e,r))]}})})),e.measures.forEach((function(e){o.qMeasures.push({qDef:{qDef:ux.generateExpression(e,r)}})})),o}))},getAllHyperCubeExpressions:function(e,t,n){return cx.apply(this,arguments)}};function cx(){return(cx=o(regeneratorRuntime.mark((function e(t,n,r){var i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.qDimensions.map((function(e,t){return fx(e,r,t,n)})),o=t.qMeasures.map((function(e){return hx(e,r)})),e.next=4,Promise.all(i);case 4:return e.t0=e.sent,e.next=7,Promise.all(o);case 7:return e.t1=e.sent,e.abrupt("return",{dimensions:e.t0,measures:e.t1});case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function fx(e,t,n,r){if(e.qLibraryId)return dx(e.qLibraryId,"dimension",t,n,r);var i=r.qDimensionInfo[n].qGroupPos;return Promise.resolve(e.qDef.qFieldDefs[i])}function hx(e,t){return e.qLibraryId?dx(e.qLibraryId,"measure",t):Promise.resolve(e.qDef.qDef)}function dx(e,t,n,r,i){return n?n["dimension"===t?"getDimension":"getMeasure"](e).then((function(e){return e.getProperties().then((function(e){return"dimension"===t?e.qDim.qFieldDefs[i.qDimensionInfo[r].qGroupPos]:e.qMeasure.qDef}))})):(console.warn("No app provided, returning library id"),e)}function px(e){return new RegExp("\\{\\{".concat(e,"\\[\\d\\]\\}\\}"),"g")}function mx(e){return e?e.map((function(e){return e.substr(6,1)})):[]}function gx(e){return!Number.isNaN(parseFloat(e))&&Number.isFinite(+e)}function yx(e){return!Number.isNaN(parseInt(e,10))&&parseFloat(e,10)===parseInt(e,10)}var vx={getBinSize:function(e){return nv(e,"bins.binSize",_y.BIN_SIZE)},getDerivedBinSize:function(e){return nv(e,"qUndoExclude.bins.binSize",_y.BIN_SIZE)},getDerivedBinOffset:function(e){return nv(e,"qUndoExclude.bins.offset",_y.OFFSET)},getDerivedBinCount:function(e){var t=nv(e,"qUndoExclude.bins.binCount",_y.BIN_COUNT);return gx(t)?t<1?1:yx(t)?t:Math.ceil(t):_y.BIN_COUNT},getBinCount:function(e){return nv(e,"bins.binCount",void 0)},getBinOffset:function(e){return nv(e,"bins.offset",_y.OFFSET)},isAutoBin:function(e){return nv(e,"bins.auto",_y.AUTO)},isCountDistinct:function(e){return nv(e,"bins.countDistinct",_y.COUNT_DISTINCT)},getBinMode:function(e){return nv(e,"bins.binMode",_y.BIN_MODE)},isEmpty:function(e){return null==e||""===e}},bx=Math.log(10),xx=[1,1.5,2,3,4,5,6,10],wx=[1,2,4,5,6,8,10],kx=[2,4,5,10];function Mx(e,t){if(0===e)return 0;for(var n,r=Math.floor(Math.log(Math.abs(e))/bx),i=e/Math.pow(10,r),o=0;o<t.length;o++)if(i<=t[o]){n=t[o];break}return(r>=0?n*Math.pow(10,r):n/Math.pow(10,-r))*(e<0?-1:1)}function _x(e,t,n,r,i,o){return Math.floor(Math.abs(e-i)/r)+Math.floor(Math.abs(o-t)/r)}var Sx={calculateBinSize:function(e,t,n){return function(e,t,n){if(!gx(e)||!gx(t)||!gx(n))throw Error("binSizeCalculator: One of the inputs is NOT numeric");if(e>t)throw Error("binSizeCalculator: The 'min' parameter is bigger than the 'max' parameter")}(e,t,n),function(e,t,n){var r,i,o,a,s,u,l,c,f,h,d,p,m=-1,g=xx;if(n=Math.max(1,n),t===e)if(0===t){if(a=1,1===n)return{min:e,max:t,nbrOfBins:n,rawBinSize:o/n,offset:-.5,newMax:.5,binSize:1,numEmptyBins:0}}else 1===n?(a=t+1e-9,g=wx):a=Math.abs(t/n);else a=(o=(t+=1e-9)-e)/n;do{if(c=1,d=0,m>=0)for(f=1/kx[m],h=1,g=[];h<=10;)g.push(Math.round(1e3*h)/1e3),h+=f;s=a;do{s=Mx(s*c,g),u=Math.floor(Math.log(s)/bx),l=Math.pow(10,u),r=(i=t===e?(Math.ceil(t/s)+Math.floor(n/2))*s:Math.ceil(t/s)*s)-n*s;var y=0;for(p=l;(r>e||i<t)&&y<kx.length;)i=(r=Math.floor(e/p)*p)+n*s,p=l/kx[y++];u<1&&(l=Math.pow(10,Math.abs(u)+1),i=Math.round(i*l)/l,r=Math.round(r*l)/l),c=1.1,d++}while((r>e||i<t)&&d<10);m++}while(_x(e,t,0,a,r,i)>0&&m<kx.length);return{binCount:n,offset:r,binSize:s}}(e,t,n=function(e){return e<1?1:yx(e)?e:Math.ceil(e)}(n))}};var qx={getMappingValues:function(e){var t,n,r,i,o=vx.isAutoBin(e),a=vx.getBinMode(e),s=vx.isCountDistinct(e);return o||"maxCount"===a?(t=(i=function(e){var t=nv(e,"qHyperCube.qDimensionInfo.0",{}),n=t.qMin,r=t.qMax;n=gx(n)?n:1,r=gx(r)?r:1;var i=vx.getDerivedBinCount(e);return Sx.calculateBinSize(n,r,i)}(e)).binSize,n=i.offset,r=i.binCount):(t=vx.getBinSize(e),n=vx.getBinOffset(e)),{binSize:t,binOffset:n,binCount:r,distinct:s}},getMappings:function(e){var t={};return t.BinSize={value:",".concat(e.binSize)},t.Label={value:0===e.binOffset?"":",'x'"},t.Offset={value:0===e.binOffset?"":",".concat(e.binOffset)},t.Distinct={value:e.distinct?"Distinct ":""},t}};function Dx(){return(Dx=o(regeneratorRuntime.mark((function e(t,n,r){var i,o,a,s,u,l,c,f,h,d,p;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=r.app,o=r.translator,a=qx.getMappingValues(t),s=qx.getMappings(a),u={dimensions:["Class(aggr({{Dim[0]}},{{Dim[0]}}){{BinSize}}{{Label}}{{Offset}})"],measures:["Count({{Distinct}}{{Dim[0]}})"]},l="=Ceil(Log10(Count({{Dim[0]}})) / Log10(2)) + 1",c=lx.getAllHyperCubeExpressions(n.qHyperCubeDef,t.qHyperCube,i),f=lx.generateHyperCubeDef(u,n.qHyperCubeDef,t.qHyperCube,i,s),e.next=9,c;case 9:return h=e.sent,e.next=12,f;case 12:d=e.sent,p=vx.isAutoBin(t)?{qValueExpression:{qExpr:ux.generateExpression(l,{"Dim[0]":{value:h.dimensions[0],wrap:!0}})}}:"maxCount"===vx.getBinMode(t)&&vx.isEmpty(n.bins.binCount)?vx.getDerivedBinCount(t):n.bins.binCount,rv(d,"qDimensions.0.qDef.qSortCriterias",[{qSortByNumeric:1}]),rv(d,"qDimensions.0.qDef.qFieldLabels",[t.qHyperCube.qDimensionInfo[0].qFallbackTitle]),rv(d,"qMeasures.0.qDef.qLabel",t.measureAxis.label||o.get("Visualization.Histogram.MeasureAxisLabel")),rv(n,"qUndoExclude.box.qHyperCubeDef",d),rv(n,"qUndoExclude.bins.binSize",a.binSize),rv(n,"qUndoExclude.bins.offset",a.binOffset),rv(n,"qUndoExclude.bins.binCount",p);case 21:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Cx={generateHyperCubes:function(e,t,n){return Dx.apply(this,arguments)}};var Ex={isOnComponentForRange:function(e,t,n){return!!e&&!!n.chart.componentsFromPoint({x:e.center.x,y:e.center.y}).filter((function(e){return-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((function(e){return e.settings.key===t.keys.componentKey}))[0]},isOnComponentForNavBtn:function(e,t,n){return n.chart.componentsFromPoint(e.center).some((function(e){return e.settings.key===t}))}};var Ax={callLassoGesture:function(e,t,n){return{type:"Pan",options:{direction:by.DIRECTION_ALL,threshold:1,enable:function(r,i){if(e.lassoing)return t.isSelectionEnabled();var o,a=Ex.isOnComponentForLasso(i,n,this);return t.isSelectionEnabled()&&i&&((o=n.handlers).selectionHandler.lassoState()&&!o.selectionHandler.allFieldsLocked()||e.lassoing)&&a},event:"lasso"},recognizeWith:n.handlers.scrollHandler?"drag":null,events:{lassostart:function(r){Ex.isOnComponentForLasso(r,n,this)&&(t.switchTo("lasso",this.chart,r),e.lassoing=!0,n.handlers.selectionHandler.pauseEngineCalls(n.keys.lassoBrushKey),r.clientX=r.pointers[0].clientX,r.clientY=r.pointers[0].clientY,t.doEmit(this.chart,"lasso","lassoStart",r))},lassomove:function(n){e.lassoing&&(n.clientX=n.pointers[0].clientX,n.clientY=n.pointers[0].clientY,t.doEmit(this.chart,"lasso","lassoMove",n))},lassoend:function(r){e.lassoing&&(r.clientX=r.pointers[0].clientX,r.clientY=r.pointers[0].clientY,t.doEmit(this.chart,"lasso","lassoEnd",r),n.handlers.selectionHandler.resumeEngineCalls(n.keys.lassoBrushKey,!0),e.lassoing=!1)},lassocancel:function(r){e.lassoing=!1,t.doEmit(this.chart,"lasso","lassoCancel",r),n.handlers.selectionHandler.resumeEngineCalls(n.keys.lassoBrushKey,!1)}}}}};var Tx={callMeasureRangeGesture:function(e,t,n,r){var i=n.keys.dimRangeBrushKey?"majorrange":"arearange";return{type:"Pan",options:{direction:n.isHorizontal?by.DIRECTION_HORIZONTAL:by.DIRECTION_VERTICAL,event:"measurerange",enable:function(i,o){if(!n.rangeSelStatus.isOpenMea)return!1;if(e.measureSelecting)return t.isSelectionEnabled();var a="measurerange"===n.active.gesture?[r,n.keys.componentKey]:[r],s=Ex.isOnComponentForRange(o,a,this);return e.measureSelecting=t.isSelectionEnabled()&&!!o&&!!s,e.measureSelecting&&!!n.keys.measureRangeBrushKey}},requireFailure:"lasso ".concat(i),recognizeWith:n.handlers.scrollHandler?"drag":null,events:{measurerangestart:function(i){var o="measurerange"===n.active.gesture?[r,n.keys.componentKey]:[r];Ex.isOnComponentForRange(i,o,this)&&(e.measureSelecting=!0,t.switchTo("measurerange",this.chart,i),t.doEmit(this.chart,"rangeMeasure","rangeStart",i),n.handlers.selectionHandler.pauseEngineCalls(n.keys.measureRangeBrushKey))},measurerangemove:function(n){e.measureSelecting&&t.doEmit(this.chart,"rangeMeasure","rangeMove",n)},measurerangeend:function(r){e.measureSelecting&&(n.handlers.selectionHandler.resumeEngineCalls(n.keys.measureRangeBrushKey,!0),t.doEmit(this.chart,"rangeMeasure","rangeEnd",r),e.measureSelecting=!1)},measurerangecancel:function(){n.handlers.selectionHandler.resumeEngineCalls(n.keys.measureRangeBrushKey,!1),e.measureSelecting=!1}}}}};function Nx(e,t){return"x-axis"===e?"horizontal"===t?by.DIRECTION_VERTICAL:by.DIRECTION_HORIZONTAL:"horizontal"===t?by.DIRECTION_HORIZONTAL:by.DIRECTION_VERTICAL}var Rx={callAreaRangeGesture:function(e,t,n,r){var i=n.keys.dimRangeBrushKey?"majorrange":"measurerange";return{type:"Pan",options:{direction:Nx(r,n.isHorizontal),event:"arearange",enable:function(i,o){if(!n.rangeSelStatus.isOpenDim)return!1;if(e.minoring)return t.isSelectionEnabled();var a="arearange"===n.active.gesture?[r,n.keys.componentKey]:[r],s=Ex.isOnComponentForRange(o,a,this);return e.minoring=t.isSelectionEnabled()&&!!o&&!!s,e.minoring}},requireFailure:"lasso ".concat(i),recognizeWith:n.handlers.scrollHandler?"drag":null,events:{arearangestart:function(i){var o="arearange"===n.active.gesture?[r,n.keys.componentKey]:[r];Ex.isOnComponentForRange(i,o,this)&&(e.minoring=!0,t.switchTo("arearange",this.chart,i),t.doEmit(this.chart,"rangeMinor","areaStart",i),n.handlers.selectionHandler.pauseEngineCalls(n.keys.areaBrushKey))},arearangemove:function(r){e.minoring&&(this.chart.brush(n.keys.areaBrushKey).clear(),t.doEmit(this.chart,"rangeMinor","areaMove",r))},arearangeend:function(r){e.minoring&&(n.handlers.selectionHandler.resumeEngineCalls(n.keys.areaBrushKey,!0),t.doEmit(this.chart,"rangeMinor","areaEnd",r),e.minoring=!1)},arearangecancel:function(){n.handlers.selectionHandler.resumeEngineCalls(n.keys.areaBrushKey,!1),e.minoring=!1}}}}};var Ox={callDimensionRangeGesture:function(e,t,n,r){var i=n.keys.measureRangeBrushKey?"measurerange":"arearange";return{type:"Pan",options:{direction:n.isHorizontal?by.DIRECTION_VERTICAL:by.DIRECTION_HORIZONTAL,event:"majorrange",enable:function(i,o){if(!n.rangeSelStatus.isOpenDim)return!1;if(e.majoring)return t.isSelectionEnabled();var a="majorrange"===n.active.gesture?[r,n.keys.componentKey]:[r],s=Ex.isOnComponentForRange(o,a,this);return e.majoring=t.isSelectionEnabled()&&!!o&&!!s,e.majoring&&!!n.keys.dimRangeBrushKey}},requireFailure:"lasso ".concat(i),recognizeWith:n.handlers.scrollHandler?"drag":null,events:{majorrangestart:function(i){var o="majorrange"===n.active.gesture?[r,n.keys.componentKey]:[r];Ex.isOnComponentForRange(i,o,this)&&(e.majoring=!0,t.switchTo("majorrange",this.chart,i),t.doEmit(this.chart,"rangeDim","rangeStart",i),n.handlers.selectionHandler.pauseEngineCalls(n.keys.dimRangeBrushKey))},majorrangemove:function(n){e.majoring&&t.doEmit(this.chart,"rangeDim","rangeMove",n)},majorrangeend:function(r){e.majoring&&(n.handlers.selectionHandler.resumeEngineCalls(n.keys.dimRangeBrushKey,!0),t.doEmit(this.chart,"rangeDim","rangeEnd",r),e.majoring=!1)},majorrangecancel:function(){n.handlers.selectionHandler.resumeEngineCalls(n.keys.dimRangeBrushKey,!1),e.majoring=!1}}}}};var Ix={callDragGesture:function(e,t,n,r,i){var o={};return{type:"Pan",options:{direction:n.isHorizontal?by.DIRECTION_VERTICAL:by.DIRECTION_HORIZONTAL,event:"drag",enable:function(r,i){return e.dragging?t.isNavigationEnabled():(e.dragging=t.isNavigationEnabled()&&!!i&&!!this.chart.componentsFromPoint({x:i.center.x,y:i.center.y}).filter((function(e){return e.settings.key===n.keys.componentKey}))[0],e.dragging)}},requireFailure:r?"lasso ".concat(t.getBrushConfig()):"",events:{dragstart:function(e){o={x:e.deltaX,y:e.deltaY};var t=-(n.isHorizontal?e.deltaY:e.deltaX)/n.handlers.scrollHandler.getItemSize();!n.isHorizontal&&i&&(t=-t),n.handlers.scrollHandler.getScrollApi().move(t)},dragmove:function(t){if(e.dragging){var r=-(n.isHorizontal?t.deltaY-o.y:t.deltaX-o.x)/n.handlers.scrollHandler.getItemSize();!n.isHorizontal&&i&&(r=-r),n.handlers.scrollHandler.getScrollApi().move(r),o={x:t.deltaX,y:t.deltaY}}},dragend:function(){e.dragging&&(e.dragging=!1)},dragcancel:function(){e.dragging=!1}}}}};var Px={callNavBtnGesture:function(e,t){return{type:"Tap",options:{event:"navBtnTap",enable:function(n,r){return!(!r||!e())&&Ex.isOnComponentForNavBtn(r,t,this)}},events:{navBtnTap:function(e){this.chart.componentsFromPoint(e.center).forEach((function(t){var n=e.target,r=n?n.getAttribute("data-action"):"";if(r)return t.emit(r)}))}}}}};var Lx={create:function(e,t,n,r,i){var o={};t=t||"vertical";var a=r.lassoBrushKey||"select",s=r.dimRangeBrushKey||null,u=r.measureRangeBrushKey||null,l=r.areaBrushKey||null,c=r.legendBrushKey||null,f=!!e.selectionHandler&&e.selectionHandler.isOn(),h={dragging:!1,lassoing:!1,majoring:!1,minoring:!1,measureSelecting:!1},d={gesture:"",type:""},p="horizontal"===t,m=p?"y-axis":"x-axis",g=p?"x-axis":"y-axis";function y(e,t,n){if(d.gesture!==e){var r=a,i=t||d.chart;switch(d.gesture){case"majorrange":v(i,"rangeDim","rangeClear",n),r=s;break;case"measurerange":v(i,"rangeMeasure","rangeClear",n),r=u;break;case"arearange":v(i,"rangeMinor","areaClear",n),r=l}d.gesture=e;var o="range"===e?"range":"item";d.type&&d.type!==o&&i.brush(r).clear(),d.chart=t,d.type=o}}function v(e,t,n,r){if(e){var i=e.component(t);i&&i.emit(n,r)}}var b=[],x={isSelectionEnabled:function(){return e.selectionHandler&&e.selectionHandler.isOn()},isNavigationEnabled:function(){return e.scrollHandler&&e.scrollHandler.isOn()},doEmit:v,switchTo:y,getBrushConfig:function(){return s?u?"majorrange measurerange":"majorrange arearange":"measurerange arearange"}},w={handlers:e,keys:r,isHorizontal:p,active:d,rangeSelStatus:i};function k(){y("none"),h.majoring=!1,h.measureSelecting=!1,h.minoring=!1}return f&&((b=[{type:"Tap",options:{event:"rangeClearTap"},events:{rangeClearTap:function(e){y("none",this.chart,e),h.majoring=!1,h.measureSelecting=!1,h.minoring=!1}}}]).unshift(Px.callNavBtnGesture(x.isNavigationEnabled,c)),b.push(Ax.callLassoGesture(h,x,w)),s?u?(b.push(Ox.callDimensionRangeGesture(h,x,w,m)),e.selectionHandler.addComponent(s,{id:"rangeDim",clear:"rangeClear"}),b.push(Tx.callMeasureRangeGesture(h,x,w,g)),e.selectionHandler.addComponent(u,{id:"rangeMeasure",clear:"rangeClear"})):(b.push(Ox.callDimensionRangeGesture(h,x,w,m)),e.selectionHandler.addComponent(s,{id:"rangeDim",clear:"rangeClear"}),b.push(Rx.callAreaRangeGesture(h,x,w,g)),e.selectionHandler.addComponent(l,{id:"rangeMinor",clear:"areaClear"})):(b.push(Tx.callMeasureRangeGesture(h,x,w,g)),e.selectionHandler.addComponent(u,{id:"rangeMeasure",clear:"rangeClear"}),b.push(Rx.callAreaRangeGesture(h,x,w,m)),e.selectionHandler.addComponent(l,{id:"rangeMinor",clear:"areaClear"}))),e.scrollHandler&&(b.push(Ix.callDragGesture(h,x,w,f,n)),e.scrollHandler.getScrollApi().on("update",k)),o.gestures=b,o.destroy=function(){e.scrollHandler&&e.scrollHandler.getScrollApi().removeListener("update",k)},o}};function jx(e){var t=nv(e,"qUndoExclude.box.qHyperCube.qDimensionInfo.0.qApprMaxGlyphCount",0);return Math.min(20,t)}var zx={createSettings:function(e){return{settings:{labels:{maxGlyphCount:jx(e)}}}}};var Fx={createSettings:function(e){var t,n,r=vx.isAutoBin(e),i=vx.getBinMode(e),o=vx.getDerivedBinSize(e);if(r||"maxCount"===i){var a=vx.getDerivedBinOffset(e);t=a,n=a+vx.getDerivedBinCount(e)*o}else{var s=nv(e,"qUndoExclude.box.qHyperCube.qDimensionInfo.0",{});t=s.qMin||0,n=(s.qMax||0)+o}return{component:{type:"linear",min:t,max:n}}}},Hx={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}},Bx=/^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/i,Vx=/^rgba\((\d{1,3}),(\d{1,3}),(\d{1,3}),(\d(\.\d+)?)\)$/i,Wx=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i,Ux=/^#([A-f0-9])([A-f0-9])([A-f0-9])$/i,$x=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i,Yx=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i,Kx=Math.floor,Xx=Math.round,Gx=Fv.extend({init:function(){var e,t,n,r,i,o,a,s,u,l,c,f,h=0,d=0,p=0,m=1;if(this._invalid=!1,arguments[0]instanceof Gx)h=arguments[0]._r,d=arguments[0]._g,p=arguments[0]._b,m=arguments[0]._a,this._invalid=arguments[0]._invalid;else if(arguments.length<3)if("string"==typeof arguments[0])if(c=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(f=arguments[0]))h=parseInt(c[1],10),d=parseInt(c[2],10),p=parseInt(c[3],10);else if(c=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(f))h=parseInt(c[1],10),d=parseInt(c[2],10),p=parseInt(c[3],10),m=parseFloat(c[4]);else if(c=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i.exec(f))h=parseInt(c[1],16),d=parseInt(c[2],16),p=parseInt(c[3],16),m=1;else if(c=/^#([A-f0-9])([A-f0-9])([A-f0-9])$/i.exec(f))h=parseInt(c[1]+c[1],16),d=parseInt(c[2]+c[2],16),p=parseInt(c[3]+c[3],16),m=1;else if(c=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(f)){switch(e=parseFloat(c[1]),t=parseFloat(c[3]),r=parseFloat(c[5]),t=(t/=100)<0?0:t>1?1:t,a=(e=(e%=360)<0?0:e>360?360:e)/60,s=(o=(r=(r/=100)<0?0:r>1?1:r)<=.5?2*r*t:(2-2*r)*t)*(1-Math.abs(a%2-1)),u=[],a=Math.floor(a)){case 0:u=[o,s,0];break;case 1:u=[s,o,0];break;case 2:u=[0,o,s];break;case 3:u=[0,s,o];break;case 4:u=[s,0,o];break;case 5:u=[o,0,s];break;default:u=[0,0,0]}l=r-.5*o,h=u[0]+l,d=u[1]+l,p=u[2]+l,h=Xx(255*h),d=Xx(255*d),p=Xx(255*p),m=1}else if(c=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i.exec(f)){switch(e=parseFloat(c[1]),t=parseFloat(c[3]),r=parseFloat(c[5]),m=parseFloat(c[7]),t=(t/=100)<0?0:t>1?1:t,a=(e=(e%=360)<0?0:e>360?360:e)/60,s=(o=(r=(r/=100)<0?0:r>1?1:r)<=.5?2*r*t:(2-2*r)*t)*(1-Math.abs(a%2-1)),u=[],a=Math.floor(a)){case 0:u=[o,s,0];break;case 1:u=[s,o,0];break;case 2:u=[0,o,s];break;case 3:u=[0,s,o];break;case 4:u=[s,0,o];break;case 5:u=[o,0,s];break;default:u=[0,0,0]}l=r-.5*o,h=u[0]+l,d=u[1]+l,p=u[2]+l,h=Xx(255*h),d=Xx(255*d),p=Xx(255*p)}else if(c=/^hsv\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(f)){switch(e=parseFloat(c[1]),t=parseFloat(c[3]),i=parseFloat(c[5]),a=(e=(e%=360)<0?0:e>360?360:e)/60,s=(o=(i=(i/=100)<0?0:i>1?1:i)*(t=(t/=100)<0?0:t>1?1:t))*(1-Math.abs(a%2-1)),u=[],a=Math.floor(a)){case 0:u=[o,s,0];break;case 1:u=[s,o,0];break;case 2:u=[0,o,s];break;case 3:u=[0,s,o];break;case 4:u=[s,0,o];break;case 5:u=[o,0,s];break;default:u=[0,0,0]}l=i-o,h=u[0]+l,d=u[1]+l,p=u[2]+l,h=Xx(255*h),d=Xx(255*d),p=Xx(255*p),m=1}else Hx[f.toLowerCase()]?(n=f.toLowerCase(),h=Hx[n].r,d=Hx[n].g,p=Hx[n].b,m="number"==typeof Hx[n].a?Hx[n].a:1):this._invalid=!0;else"number"==typeof arguments[0]&&arguments[0]>=0&&"argb"===arguments[1]?(m=(4278190080&arguments[0])>>>24,m/=255,h=(16711680&arguments[0])>>16,d=(65280&arguments[0])>>8,p=255&arguments[0]):"number"==typeof arguments[0]&&arguments[0]>=0?(h=(16711680&arguments[0])>>16,d=(65280&arguments[0])>>8,p=255&arguments[0]):this._invalid=!0;else arguments.length>=3?(h=arguments[0],d=arguments[1],p=arguments[2],m=arguments.length>=4?arguments[3]:1):this._invalid=!0;Number.isNaN(+h+d+p+m)&&(this._invalid=!0),this._r=Kx(h),this._g=Kx(d),this._b=Kx(p),this._a=m,this._spaces={}},isInvalid:function(){return this._invalid},setAlpha:function(e){this._a=e,this._spaces={}},getAlpha:function(){return this._a},toRGB:function(){return this._spaces.rgb||(this._spaces.rgb=Gx.toRGB(this)),this._spaces.rgb},toRGBA:function(){return this._spaces.rgba||(this._spaces.rgba=Gx.toRGBA(this)),this._spaces.rgba},toString:function(){return this._spaces.rgb||(this._spaces.rgb=Gx.toRGB(this)),this._spaces.rgb},toHex:function(){return this._spaces.hex||(this._spaces.hex=Gx.toHex(this)),this._spaces.hex},toHSL:function(e){return this._spaces.hsl||(this._spaces.hsl=Gx.toHSL(this,e)),this._spaces.hsl},toHSLA:function(e){return this._spaces.hsla||(this._spaces.hsla=Gx.toHSLA(this,e)),this._spaces.hsla},toHSV:function(){var e=this.toHSVComponents();return"hsv(".concat(e.h,",").concat(e.s,",").concat(e.v,")")},toHSVComponents:function(){return this._spaces.hsvComp||(this._spaces.hsvComp=Gx.toHSVComponents(this)),this._spaces.hsvComp},toNumber:function(){return this._spaces.num||(this._spaces.num=Gx.toNumber(this)),this._spaces.num},isDark:function(){return this.isInvalid()||this.getLuminance()<125},getLuminance:function(){return void 0===this._lumi&&(this._lumi=.299*this._r+.587*this._g+.114*this._b),this._lumi},shiftLuminance:function(e){var t=this.toHSLA(),n=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i.exec(t),r=parseFloat(n[1]),i=parseFloat(n[3]),o=parseFloat(n[5]),a=parseFloat(n[7]);return o+=e,o=Math.max(0,Math.min(o,100)),"hsla(".concat(r,",").concat(i,",").concat(o,",").concat(a,")")},isEqual:function(e){return e instanceof Gx||(e=new Gx(e)),this._r===e._r&&this._g===e._g&&this._b===e._b},blend:function(e,t){var n=Kx(this._r+(e._r-this._r)*t),r=Kx(this._g+(e._g-this._g)*t),i=Kx(this._b+(e._b-this._b)*t),o=Kx(this._a+(e._a-this._a)*t);return"rgba(".concat([n,r,i,o].join(","),")")},createShiftedColor:function(e){(void 0===e||Number.isNaN(+e))&&(e=1);var t=this.getLuminance(),n=this._g<126?1:1+this._g/512,r=this.shiftLuminance(20*(t*n<220?.8+1/(t+1)*4:-(.8+t/255*1))*e);return new Gx(r)}});Gx.toRGB=function(e){if(e instanceof Gx)return"rgb(".concat([e._r,e._g,e._b].join(","),")");"string"==typeof e&&(e=Gx.toNumber(e));var t=(65280&e)>>8,n=255&e;return"rgb(".concat((16711680&e)>>16,",").concat(t,",").concat(n,")")},Gx.toRGBA=function(e,t){if(e instanceof Gx)return"rgba(".concat([e._r,e._g,e._b,void 0!==t?t:e._a].join(","),")");"string"==typeof e&&(e=Gx.toNumber(e));var n=(65280&e)>>8,r=255&e;return"rgba(".concat((16711680&e)>>16,",").concat(n,",").concat(r,",").concat(void 0!==t?t:e._a,")")},Gx.toHex=function(e){var t,n,r;return e instanceof Gx?(t=e._r.toString(16),n=e._g.toString(16),r=e._b.toString(16),1===t.length&&(t="0".concat(t)),1===n.length&&(n="0".concat(n)),1===r.length&&(r="0".concat(r)),"#".concat([t,n,r].join(""))):("string"==typeof e&&(e=Gx.toNumber(e)),t=((16711680&e)>>16).toString(16),n=((65280&e)>>8).toString(16),r=(255&e).toString(16),1===t.length&&(t="0".concat(t)),1===n.length&&(n="0".concat(n)),1===r.length&&(r="0".concat(r)),"#".concat(t).concat(n).concat(r))},Gx.toHSL=function(e,t){var n,r,i,o=0;"string"==typeof e&&(e=new Gx(e));var a=e._r/255,s=e._g/255,u=e._b/255,l=Math.max(a,s,u),c=Math.min(a,s,u);if(r=t?.21*a+.72*s+.07*u:(l+c)/2,l===c)n=0,o=0;else{switch(i=l-c,n=r>.5?i/(2-l-c):i/(l+c),l){case a:o=(s-u)/i+(s<u?6:0);break;case s:o=(u-a)/i+2;break;case u:o=(a-s)/i+4}o/=6}return"hsl(".concat(360*o,",").concat(100*n,",").concat(100*r,")")},Gx.toHSLA=function(e,t){var n,r,i,o=0;"string"==typeof e&&(e=new Gx(e));var a=e._r/255,s=e._g/255,u=e._b/255,l=e._a,c=Math.max(a,s,u),f=Math.min(a,s,u);if(r=t?.21*a+.72*s+.07*u:(c+f)/2,c===f)n=0,o=0;else{switch(i=c-f,n=r>.5?i/(2-c-f):i/(c+f),c){case a:o=(s-u)/i+(s<u?6:0);break;case s:o=(u-a)/i+2;break;case u:o=(a-s)/i+4}o/=6}return"hsla(".concat(360*o,",").concat(100*n,",").concat(100*r,",").concat(l,")")},Gx.toHSVComponents=function(e){var t,n,r=0;"string"==typeof e&&(e=new Gx(e));var i=e._r/255,o=e._g/255,a=e._b/255,s=Math.max(i,o,a),u=Math.min(i,o,a),l=s;if(s===u)t=0,r=0;else{switch(t=0===(n=s-u)?0:n/l,s){case i:r=(o-a)/n+(o<a?6:0);break;case o:r=(a-i)/n+2;break;case a:r=(i-o)/n+4}r/=6}return{h:360*r%360,s:100*t,v:100*l}},Gx.toNumber=function(){if(1===arguments.length&&arguments[0]instanceof Gx)return(arguments[0]._r<<16)+(arguments[0]._g<<8)+arguments[0]._b;var e,t,n=0,r=0,i=0;return 1===arguments.length&&"string"==typeof arguments[0]&&((e=/^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/i.exec(t=arguments[0]))?(n=parseInt(e[1],10),r=parseInt(e[2],10),i=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),r=parseInt(e[2],16),i=parseInt(e[3],16)):(e=/^#([A-f0-9])([A-f0-9])([A-f0-9])$/i.exec(t))&&(n=parseInt(e[1]+e[1],16),r=parseInt(e[2]+e[2],16),i=parseInt(e[3]+e[3],16))),(n<<16)+(r<<8)+i},Gx.blend=function(e,t,n){var r=(16711680&(e=Gx.toNumber(e)))>>16,i=(65280&e)>>8,o=255&e;return(r+(((16711680&(t=Gx.toNumber(t)))>>16)-r)*n<<16)+(i+(((65280&t)>>8)-i)*n<<8)+(o+((255&t)-o)*n)},Gx.getBlend=function(e,t,n){var r=e._r+(t._r-e._r)*n,i=e._g+(t._g-e._g)*n,o=e._b+(t._b-e._b)*n,a=e._a+(t._a-e._a)*n;return new Gx(r,i,o,a)},Gx.isCSSColor=function(e){return!(arguments.length>1||"string"!=typeof e)&&(Bx.test(e)||Vx.test(e)||Wx.test(e)||Ux.test(e)||$x.test(e)||Yx.test(e)||Hx[e.toLowerCase()])},Gx.getBestContrast=function(e,t,n){var r=e.getLuminance();return Math.abs(r-t.getLuminance())>Math.abs(r-n.getLuminance())?t:n},Gx.getContrast=function(e,t){if(e&&t){var n=e.getLuminance()/100,r=t.getLuminance()/100;return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)}},Gx.isDark=function(){var e={getLuminance:Gx.prototype.getLuminance,isInvalid:Gx.prototype.isInvalid};return Gx.prototype.init.apply(e,[].slice.call(arguments)),Gx.prototype.isDark.call(e)},Gx.useDarkLabel=function(e,t){return e._a>.5?!e.isDark():!t};var Jx={TRANSPARENT_BLACK:"rgba( 0,0,0,0.2 )",TRANSPARENT_WHITE:"rgba( 255,255,255,0.7 )",LIGHT_GREY:"#ccc",DARK_GREY:"#666",BLACK:"#000",WHITE:"#fff",getInverse:function(e){var t=new Gx(e);return 0===t.getAlpha()?this.BLACK:t.isDark()?this.WHITE:this.BLACK},getContrastingGrey:function(e){var t=new Gx(e);return 0===t.getAlpha()?this.DARK_GREY:Gx.getBestContrast(t,new Gx(Jx.LIGHT_GREY),new Gx(Jx.DARK_GREY))},getBestContrast:function(e,t,n){return Gx.getBestContrast(new Gx(e),new Gx(t),new Gx(n))},getContrastingTransparent:function(e){var t=new Gx(e);return 0===t.getAlpha()||"none"===e?this.TRANSPARENT_BLACK:t.isDark()?this.TRANSPARENT_WHITE:this.TRANSPARENT_BLACK}};var Zx={createSettings:function(e,t,n,r,i,o){var a=e.environment.theme.getColorPickerColor(t.color.bar.paletteColor),s=vx.getDerivedBinSize(t),u=[],l=[n.consume,r.consume,i.consume];return e._tooltipHandler.isOn()&&(u.push(o.box.trigger),l.push.apply(l,o.box.consume)),u.push(n.trigger),{key:"box-marker",settings:{box:{fill:a,stroke:Jx.getContrastingGrey(a).toHex(),strokeWidth:1,maxWidthPx:1/0,minWidthPx:NaN,minWidth:0},major:{scale:"dimension",ref:{start:"binStart",end:"binEnd"}},minor:{scale:"measure"},whiskers:!1,orientation:"vertical"},brush:{trigger:u,consume:l},data:{extract:{field:"qDimensionInfo/0",props:{start:0,end:{field:"qMeasureInfo/0"},measure:{field:"qMeasureInfo/0",reduce:"first",value:function(e){return e},reduceLabel:"none"},binStart:{field:"qDimensionInfo/0",value:function(e){return e.qNum}},binEnd:{field:"qDimensionInfo/0",value:function(e){return e.qNum+s}},elemNo:{field:"qDimensionInfo/0"},bin:{field:"qDimensionInfo/0",value:function(e){return e}}}}}}}};var Qx={createSettings:function(e,t){var n=t.getColorPickerColor(e.color.bar.paletteColor);return{settings:{sources:[{strategy:{settings:{labels:[{placements:[{},{fill:Jx.getInverse(n)}]}]}}}]}}}};function ew(e){return nv(e,"qHyperCube.qDimensionInfo.0.qIsOneAndOnlyOne",!1)}var tw={createChartSettings:function(e,t){var n=e.isRtl(),r=nv(t,"qHyperCube.qDimensionInfo.0",{}).qFallbackTitle||"",i=e.environment,o=i.theme,a=i.translator,s=pb.create({chartID:"object.histogram",theme:o,isRtl:n}),u={},l={},c={};e._selectionHandler.isOn()&&(e._selectionHandler.setUpStart(),u=e._selectionHandler.setUpBrush({contexts:["select"],data:["elemNo"],dataPath:"qUndoExclude/box"}),l=e._selectionHandler.setUpBrush({contexts:["select-dimension"],data:["elemNo"],dataPath:"qUndoExclude/box",isSingleSelect:ew(t)}),c=e._selectionHandler.setUpBrush({dataPath:"qUndoExclude/box",contexts:["select-measure"],data:["end"]}),e._selectionHandler.setUpDone());var f={box:{}};e._tooltipHandler.isOn()&&(f.box=e._tooltipHandler.setUp({chartBuilder:s,environment:e.environment,data:[""],contexts:["boxTip"],componentKey:"box-marker",measureRows:["measure"],labelData:["bin"]}));var h=function(e){var t={};return e?(t.isOpenDim=!1,t.isOpenMea=!1):(t.isOpenDim=!0,t.isOpenMea=!0),t}(function(e){var t=e.qUndoExclude&&e.qUndoExclude.box&&e.qUndoExclude.box.qHyperCube&&e.qUndoExclude.box.qHyperCube.qDimensionInfo?e.qUndoExclude.box.qHyperCube.qDimensionInfo:void 0;return!!t&&!!t[0].qLocked}(t)),d={scrollHandler:null,selectionHandler:e._selectionHandler};this._dependentActions&&this._dependentActions.destroy(),this._dependentActions=Lx.create(d,"vertical",n,{componentKey:"box-marker",lassoBrushKey:"select",dimRangeBrushKey:null,measureRangeBrushKey:"select-measure",areaBrushKey:"select-dimension"},h),s.addPreset("dimension-measure-chart",{isRtl:n,includeDimensionAxis:!0,orientation:"vertical",selectionsEnabled:e._selectionHandler.isOn(),theme:o,measureSource:"qMeasureInfo/0",measureScaleSettings:{component:{expand:0,include:[0]}},enableLasso:!0,lasso:{brushKey:"select",brushComponents:["box-marker"]},enableMeasureRange:!0,measureRange:{brushKey:"select-measure",brushAxis:"y-axis",brushArea:"box-marker",brushScale:"measure"},enableAreaRange:!0,areaRange:{brushKey:"select-dimension",brushAxis:"x-axis",brushData:["elemNo"],brushArea:"box-marker",brushScale:"rangeSelSettings",brushComponents:["box-marker"],multiple:!0,chartInstance:e.chartInstance},brushActions:this._dependentActions.gestures,dimensionSource:"qDimensionInfo/0",dimensionScaleSettings:Fx.createSettings(t),measureAxisProperties:t.measureAxis,measureTitleText:t.measureAxis.label||a.get("Visualization.Histogram.MeasureAxisLabel"),dimensionAxisProperties:t.dimensionAxis,dimensionAxisSettings:zx.createSettings(t),dimensionTitleText:r,gridlines:t.gridlines,hasNavigation:!1,isNavigationEnabledFn:function(){return!1},refLines:t.refLine&&t.refLine.refLines});var p=s.getSettings(),m=Zx.createSettings(e,t,u,l,c,f);if(s.addComponent("box-marker",m),t.dataPoint&&t.dataPoint.showLabels){var g=Qx.createSettings(t,o);s.addComponent("labels",g)}return e.addSnapshotChartSettings(p,t),p.scales.rangeSelSettings={type:"linear",min:p.scales.dimension.min,max:p.scales.dimension.max,source:"qDimensionInfo/0"},p}};var nw=wb.extend("Histogram",{namespace:".histogram",init:function(e){var t=e.environment,n=e.lasso,r=e.picasso,i=e.$element,o=e.backendApi,a=e.selectionsApi,s=e.renderState;this._super(r,i,t,o,a),this.renderState=s,this.picassoElement.__do_not_use_findShapes=this.chartInstance.findShapes.bind(this.chartInstance),this._derivedProperties=new rx,this._selectionHandler=Cb({model:o.model,chartInstance:this.chartInstance,selectionsApi:a,selectPaths:["/qUndoExclude/box/qHyperCubeDef"],lasso:n}),this._tooltipHandler=Fb(this.chartInstance,i,"object.histogram"),this.setDataPaths(["qUndoExclude/box/qHyperCube"])},updateConstraints:function(e){var t=!e.passive,n=!e.select&&!e.active;this._tooltipHandler[t?"on":"off"](),this._selectionHandler[n?"on":"off"]()},off:function(){this._tooltipHandler.off(),this._selectionHandler.off()},createChartSettings:function(e){return tw.createChartSettings(this,e)},setSnapshotData:function(e){return this._super(e),e.qUndoExclude.box.qHyperCube.qDataPages=this.layout.qUndoExclude.box.qHyperCube.qDataPages,Promise.resolve(e)},getDisclaimerAttributes:function(e){var t,n=function(){var t=nv(e,"qUndoExclude.box.qHyperCube.qDataPages.0.qMatrix",[]);return 1===t.length&&t[0][0]&&t[0][0].qIsNull}();return{data:e.qUndoExclude&&e.qUndoExclude.box,supportedDisclaimers:{LimitedData:!0,OnlyNanData:!0,OnlyNegativeOrZeroValues:!n,RequireNumericDimension:!0},options:{bottom:!0,supportNegative:!1,explicitOnlyNanData:n,explicitRequireNumericDimension:(t=e.qHyperCube,t.qDimensionInfo.length>0&&-1===t.qDimensionInfo[0].qTags.indexOf("$numeric"))}}},updateChart:function(e,t){if(!e.qUndoExclude)return Promise.resolve();this._super(e,t)},updateData:function(e){var t=this,n=this;return n._super(e).then((function(){if(n._destroyed)return Promise.reject();e=n.layout;var r={height:Math.min(e.qHyperCube.qSize.qcy,1e3),width:2},i=n.backendApi.model;return!!t.layout.snapshotData?Promise.resolve():i.getEffectiveProperties().then((function(t){return n._destroyed?Promise.reject():n._derivedProperties.addDefaultHyperCubeHash(t.qHyperCubeDef,e.qHyperCube,n.environment.app,function(e,t){return{box:t.qHyperCubeDef,binMappings:qx.getMappingValues(e),binProperties:t.bins,measureAxis:t.measureAxis,version:"2.0"}}(e,t)).then((function(o){if(n._destroyed)return Promise.reject();var a={layout:e,properties:t,model:i,hashData:o,generateDerivedProperties:function(e,t){return Cx.generateHyperCubes(e,t,n.environment)}};return n._derivedProperties.isDerivedUpToDate(a)?e.qUndoExclude?(n.renderState.restore(),n.backendApi.updateCache(e.qUndoExclude.box),n.getData(n.backendApi,e.qUndoExclude.box.qHyperCube,r)):Promise.resolve():(n.renderState.pending(),n._derivedProperties.updateDerivedProperties(a))}))}))}))},paint:function(){var e=this.layout.qUndoExclude;return e&&e.box&&e.box.qHyperCube.qDataPages.length?this._super():Promise.resolve(!1)},isLassoDisabled:function(){return!1}}),rw=function(){function e(t){a(this,e),this.model=t,this.path="/qUndoExclude/box/qHyperCubeDef"}return u(e,[{key:"setCacheOptions",value:function(e){e.maxStackedValues}},{key:"updateCache",value:function(e){}},{key:"getData",value:function(e){return this.model.getHyperCubeData(this.path,e)}}]),e}(),iw={exports:{}};!function(e,t){window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==r(e)&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/conversion/",n(n.s=2)}([function(e,t,n){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,u=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===o.call(e)},l=function(e){if(!e||"[object Object]"!==o.call(e))return!1;var t,n=i.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&i.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||i.call(e,t)},c=function(e,t){a&&"__proto__"===t.name?a(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},f=function(e,t){if("__proto__"===t){if(!i.call(e,t))return;if(s)return s(e,t).value}return e[t]};e.exports=function e(){var t,n,i,o,a,s,h=arguments[0],d=1,p=arguments.length,m=!1;for("boolean"==typeof h&&(m=h,h=arguments[1]||{},d=2),(null==h||"object"!=r(h)&&"function"!=typeof h)&&(h={});d<p;++d)if(null!=(t=arguments[d]))for(n in t)i=f(h,n),h!==(o=f(t,n))&&(m&&o&&(l(o)||(a=u(o)))?(a?(a=!1,s=i&&u(i)?i:[]):s=i&&l(i)?i:{},c(h,{name:n,newValue:e(m,s,o)})):void 0!==o&&c(h,{name:n,newValue:o}));return h}},function(e,t,n){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==r(e)&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/qlik-modifiers/",n(n.s=1)}([function(e,t,n){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,u=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===o.call(e)},l=function(e){if(!e||"[object Object]"!==o.call(e))return!1;var t,n=i.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&i.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||i.call(e,t)},c=function(e,t){a&&"__proto__"===t.name?a(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},f=function(e,t){if("__proto__"===t){if(!i.call(e,t))return;if(s)return s(e,t).value}return e[t]};e.exports=function e(){var t,n,i,o,a,s,h=arguments[0],d=1,p=arguments.length,m=!1;for("boolean"==typeof h&&(m=h,h=arguments[1]||{},d=2),(null==h||"object"!=r(h)&&"function"!=typeof h)&&(h={});d<p;++d)if(null!=(t=arguments[d]))for(n in t)i=f(h,n),h!==(o=f(t,n))&&(m&&o&&(l(o)||(a=u(o)))?(a?(a=!1,s=i&&u(i)?i:[]):s=i&&l(i)?i:{},c(h,{name:n,newValue:e(m,s,o)})):void 0!==o&&c(h,{name:n,newValue:o}));return h}},function(e,t,n){n.r(t);var i=n(0),o=n.n(i),a=function(e,t,n){if(!t)return!1;var r,i=t.split("."),o=i[i.length-1],a=e;for(r=0;r<i.length-1;++r)void 0===a[i[r]]&&(a[i[r]]=Number.isNaN(+i[r+1])?{}:[]),a=a[i[r]];if(void 0!==n){var s=a[o];return a[o]=n,{updated:n,previous:s}}return delete a[o],!1},s=function(e,t,n){var r,i=t.split("."),o=e;if(void 0===o)return n;for(r=0;r<i.length;++r){if(void 0===o[i[r]])return n;o=o[i[r]]}return o},u="".concat(" ","(").concat(" "),l="".concat(" ",")").concat(" ");function c(e){return u+e+l}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var n=function(e,t){if(!t)return null;var n,r;for(n=0;n<t.length;n++)if((r=t[n]).qInfo.qId===e)return r;return null}(e.qLibraryId,t.dimensionList);return n&&n.qData.info[0].qTags.indexOf("$numeric")>-1}var r=function(e,t){if(!t)return null;var n,r,i=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var n=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(n)&&(t=(t=t.substring(1,n)).trim()),t}(e);for(n=0;n<t.length;n++){if((r=t[n]).qName===i)return r;if(r.qDerivedFieldData)for(var o=0;o<r.qDerivedFieldData.qDerivedFieldLists.length;++o)for(var a=r.qDerivedFieldData.qDerivedFieldLists[o],s=0;s<a.qFieldDefs.length;++s){var u=a.qFieldDefs[s];if(u.qName===i)return u}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return r&&r.qTags.indexOf("$numeric")>-1}function h(e){return!(!e.fullAccumulation&&!e.fullRange)}function d(e,t){var n=e.crossAllDimensions;return 2===t&&n?"RowNo(Total)":"RowNo()"}function p(e){var t=function(e){return e?(e=function(e){return e.replace(/\/\*[^]*?\*\//g,"")}(e=function(e){return e.replace(/\/\/(.*)$/gm,"")}(e))).trim():""}(e).trim();return"="===t.substring(0,1)?t.substring(1).trim():t}function m(){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 y(e){return void 0===e?")":", 0, ".concat(e,")")}function v(e,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=MinString(").concat(t,"))' and Only({1}").concat(t,")<='$(=MaxString(").concat(t,"))'\"}")}function b(e){var t=e.modifier,n=void 0===t?{}:t,r=e.dimensions,i=e.dimensionAndFieldList,o=e.funcComp,a=void 0===o?"Sum":o,s=e.valueComp,u=void 0===s?"0":s;if(!n.showExcludedValues)return"";if(r&&1===r.length){var l=v(f(r[0],i),m(0));return"".concat(a,"({1<").concat(l,">}").concat(u,")")}if(r&&2===r.length){var c=f(r[0],i),h=f(r[1],i),d=m(0),p=m(1),g=v(c,d),y=v(h,p);return"".concat(a,"({1<").concat(g,",").concat(y,">}").concat(u,")")}return"".concat(a,"({1}").concat(u,")")}function x(e){return"".concat(e,"(")}function w(e){var t=e.properties,n=e.layout;return s(t,"qHyperCubeDef.qDimensions",s(n,"qHyperCube.qDimensionInfo",[])).length}var k={isFullRange:h,getNumDimensions:w,getExpressionWithExcludedComp:function(e){var t=e.expression,n=e.modifier,r=e.dimensions,i=e.dimensionAndFieldList,o=e.treatMissingAsNull,a=c(p(t));if(!n.showExcludedValues)return a;var s=b({modifier:n,dimensions:r,dimensionAndFieldList:i}),u=o?"":", 0";if(r&&1===r.length){var l=m(0);return"If(Count(".concat(l,") > 0, ").concat(a," + ").concat(s).concat(u,")")}if(r&&2===r.length){var f=m(0),h=m(1);return"If(Count(".concat(f,") * Count(").concat(h,") > 0, ").concat(a," + ").concat(s).concat(u,")")}return a},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:y,getAboveComp:function(e,t,n,r){return g(e,t)+n+y(r)},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,r=e.layout;return 0===function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t)&&2===w({properties:n,layout:r})},getDimComp:function(e,t){var n=function(e){return e[arguments.length>1&&void 0!==arguments[1]?arguments[1]:0].qDef.qSortCriterias[0]}(e,t),r=m(t);if(!n.qSortByExpression&&!n.qSortByNumeric&&!n.qSortByAscii)return r;var i=["Descending","Ascending"],o=n.qSortByNumeric?"(Numeric, ".concat(i[(n.qSortByNumeric+1)/2],")"):"",a=n.qSortByAscii?"(Text, ".concat(i[(n.qSortByAscii+1)/2],")"):"";return n.qSortByNumeric&&n.qSortByAscii?"(".concat(r,", ").concat(o,", ").concat(a,")"):n.qSortByNumeric?"(".concat(r,", ").concat(o,")"):n.qSortByAscii?"(".concat(r,", ").concat(a,")"):r},simplifyExpression:p,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var n=t.indexOf(u);if(-1!==n){var r=t.indexOf(l);if(-1!==r)return t.substring(n+u.length,r)}}},initModifier:function(e,t){Object.keys(t).forEach((function(n){void 0===e[n]&&(e[n]=t[n])}))},isNumeric:f,isApplicable:function(e){var t=e.properties,n=e.layout,r=e.minDimensions,i=void 0===r?1:r,o=e.maxDimensions,a=void 0===o?2:o;if(!t&&!n)return!0;var s=w({properties:t,layout:n});return s>=i&&s<=a},getExpressionWithMarkers:c,canExtract:function(e){var t=e.indexOf(u),n=e.indexOf(l);return t>-1&&n>-1&&t<n},getDimDefWithWrapper:m,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")}};function M(e){return(M="function"==typeof Symbol&&"symbol"==r(Symbol.iterator)?function(e){return r(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":r(e)})(e)}var _=o.a.bind(null,!0),S={},q=Array.isArray;function D(e){return null!=e&&!Array.isArray(e)&&"object"===M(e)}function C(e){return void 0===e}function E(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function A(e,t){var n,r=t.substring(1).split("/").slice(0,-1);return r.forEach((function(t,i){if(i!==r.length){n=+t;var o=Number.isNaN(n)?{}:[];e[n||t]=C(e[n||t])?o:e[t],e=e[n||t]}})),e}function T(e,t){var n=!0;if(D(e)&&D(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((function(r){T(e[r],t[r])||(n=!1)})),n);if(q(e)&&q(t)){if(e.length!==t.length)return!1;for(var r=0,i=e.length;r<i;r+=1)if(!T(e[r],t[r]))return!1;return!0}return e===t}S.generate=function(e,t,n){n=n||"";var r=[];return Object.keys(t).forEach((function(i){var o=function(e){return e?_({},{val:e}).val:e}(t[i]),a=e[i],s="".concat(n,"/").concat(i);T(o,a)||E(t,i)||(C(a)?r.push({op:"add",path:s,value:o}):D(o)&&D(a)?r=r.concat(S.generate(a,o,s)):q(o)&&q(a)?r=r.concat(function(e,t,n){var r=[],i=e.slice(),o=-1;function a(e,t,n){if(e[n]&&C(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(var r=0,i=e.length;r<i;r+=1)if(e[r]&&e[r].qInfo.qId===t)return r;return-1}if(T(t,i))return r;if(!C(t[0])&&C(t[0].qInfo))return r.push({op:"replace",path:n,value:t}),r;for(var s=i.length-1;s>=0;s-=1)-1===(o=a(t,i[s].qInfo&&i[s].qInfo.qId,s))?(r.push({op:"remove",path:"".concat(n,"/").concat(s)}),i.splice(s,1)):r=r.concat(S.generate(i[s],t[o],"".concat(n,"/").concat(s)));for(var u=0,l=t.length;u<l;u+=1)-1===(o=a(i,t[u].qInfo&&t[u].qInfo.qId))?(r.push({op:"add",path:"".concat(n,"/").concat(u),value:t[u]}),i.splice(u,0,t[u])):o!==u&&(r.push({op:"move",path:"".concat(n,"/").concat(u),from:"".concat(n,"/").concat(o)}),i.splice(u,0,i.splice(o,1)[0]));return r}(a,o,s)):r.push({op:"replace",path:"".concat(n,"/").concat(i),value:o}))})),Object.keys(e).forEach((function(i){C(t[i])&&!E(e,i)&&r.push({op:"remove",path:"".concat(n,"/").concat(i)})})),r},S.apply=function(e,t){t.forEach((function(t){var n,r=A(e,t.path),i=t.path.split("/").splice(-1)[0],o=i&&Number.isNaN(+i)?r[i]:r[+i]||r,a=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(r=null,o=e),"add"===t.op||"replace"===t.op)if(q(r))"-"===i&&(i=r.length),r.splice(+i,"add"===t.op?0:1,t.value);else if(q(o)&&q(t.value)){var s,u=t.value.slice();o.length=0,(s=o).push.apply(s,function(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}(u))}else if(D(o)&&D(t.value))n=o,Object.keys(n).forEach((function(e){Object.getOwnPropertyDescriptor(n,e).configurable&&!E(n,e)&&delete n[e]})),_(o,t.value);else{if(!r)throw new Error("Patchee is not an object we can patch");r[i]=t.value}else if("move"===t.op){var l=A(e,t.from);q(r)?r.splice(+i,0,l.splice(+a,1)[0]):(r[i]=l[a],delete l[a])}else"remove"===t.op&&(q(r)?r.splice(+i,1):delete r[i])}))},S.clone=function(e){return _({},e)},S.createPatch=function(e,t,n){var r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},S.updateObject=function(e,t){Object.keys(e).length?S.apply(e,S.generate(e,t)):_(e,t)};var N=S,R=function(e,t,n){if(!e)return Promise.resolve();var r=N.generate(t,n);return o()(!0,t,n),r&&r.length?(r=r.map((function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}})),e.applyPatches(r,!0)):Promise.resolve()},O="accumulation";function I(e,t){var n=s(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===O)return n[r]}function P(e,t){var n=function(e,t){var n=s(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===O)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var L={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""},j={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,r=e.properties,i=e.layout,o=e.numDimensions,a=e.dimensionAndFieldList;if(!n)return t;var u=o;void 0===u&&(u=k.getNumDimensions({properties:r,layout:i}));var l=s(r,"qHyperCubeDef.qDimensions",[]),c=k.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:l,dimensionAndFieldList:a}),f=k.getNumStepComp(n,u),h=k.getAboveComp(n,u,c,f),d=k.getRangeComp("RangeSum",h);if(k.needDimension({modifier:n,properties:r,layout:i})){var p=k.getDimComp(l,1),m=k.getDimComp(l,0),g=k.getAggrComp(d,p,m);d=n.showExcludedValues?k.getExcludedComp({modifier:n,dimensions:l,dimensionAndFieldList:a,valueComp:g}):g}return d},extractInputExpression:k.extractInputExpression,initModifier:function(e){k.initModifier(e,L)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:function(e,t){return!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=I(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=I(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,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(O))return!1;var o=I(t,e);return o&&!o.disabled}}}},z="movingAverage";function F(e,t){var n=s(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===z)return n[r]}function H(e,t){var n=function(e,t){var n=s(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===z)return r;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},V={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,r=e.modifier,i=e.properties,o=e.layout,a=e.numDimensions,u=e.dimensionAndFieldList;if(!r)return n;var l=a;void 0===l&&(l=k.getNumDimensions({properties:i,layout:o}));var c=s(i,"qHyperCubeDef.qDimensions",[]),f=r.showExcludedValues&&r.nullSuppression,h=k.getExpressionWithExcludedComp({expression:n,modifier:r,dimensions:c,dimensionAndFieldList:u,treatMissingAsNull:f}),d=k.getNumStepComp(r,l),p=k.getAboveComp(r,l,h,d);if(r.nullSuppression)t=k.getRangeComp("RangeAvg",p);else{var m=k.getRangeComp("RangeSum",p),g=function(e,t){var n=k.getRowNoComp(e,t);if(!k.isFullRange(e)){var r=e.steps,i="number"!=typeof r||Number.isNaN(r)?6:r;return"RangeMin(".concat(i,", ").concat(n,")")}return n}(r,l);t="".concat(m," / ").concat(g)}var y=t;if(k.needDimension({modifier:r,properties:i,layout:o})){var v=k.getDimComp(c,1),b=k.getDimComp(c,0),x=k.getAggrComp(y,v,b);y=r.showExcludedValues?k.getExcludedComp({modifier:r,dimensions:c,dimensionAndFieldList:u,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]:{};return{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(H(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(H(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(H(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(H(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=F(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=F(t,e);return n&&!n.fullRange}},showExcludedValues:{refFn:function(t){return"".concat(H(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat(H(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,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(z))return!1;var o=F(t,e);return o&&!o.disabled}}}},W="difference";function U(e,t){var n=s(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===W)return n[r]}function $(e,t){var n=function(e,t){var n=s(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===W)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var Y={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""},K={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,r=e.properties,i=e.layout,o=e.numDimensions,a=e.dimensionAndFieldList;if(!n)return t;var u=o;void 0===u&&(u=k.getNumDimensions({properties:r,layout:i}));var l=s(r,"qHyperCubeDef.qDimensions",[]),c=k.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:l,dimensionAndFieldList:a}),f=k.getAboveComp(n,u,c),h="".concat(c," - ").concat(f);if(k.needDimension({modifier:n,properties:r,layout:i})){var d=k.getDimComp(l,1),p=k.getDimComp(l,0),m=k.getAggrComp(h,d,p);h=n.showExcludedValues?k.getExcludedComp({modifier:n,dimensions:l,dimensionAndFieldList:a,funcComp:"Only",valueComp:m}):m}return h},initModifier:function(e){Object.keys(Y).forEach((function(t){void 0===e[t]&&(e[t]=Y[t])}))},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:function(e,t){return!k.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat($(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($(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($(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,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(W))return!1;var o=U(t,e);return o&&!o.disabled}}}},X={CURRENT_SELECTION:0,SELECT_FIELD_VALUE:1,DISREGARD_SELECTION:2},G={ONE_DIMENSION:0,ALL_DIMENSIOANS:1,DISREGARD_ALL_DIMENSIONS:2},J="normalization";function Z(e,t){var n=s(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===J)return n[r]}function Q(e,t){var n=function(e,t){var n=s(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===J)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}function ee(e,t){for(var n=0;n<e.length;n++)if(e[n].value===t)return n;return-1}function te(e,t,n,r){var i=t.layout.qHyperCube.qDimensionInfo.length,o=[{value:G.ONE_DIMENSION,translation:n.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:n.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:G.ALL_DIMENSIOANS,translation:n.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension"),tooltipTranslation:n.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension",".tooltip")},{value:G.DISREGARD_ALL_DIMENSIONS,translation:n.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:n.dimensionalScopeDisregardAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension",".tooltip")}];return o=function(e,t,n){if(e<2){var r=ee(t,0);t.splice(r,1)}return t}(i,o),function(e,t,n){if(0===e){var r=ee(t,1);t.splice(r,1)}return t}(Z(e,r).selectionScope,o)}function ne(e,t,n){var r=[{value:X.CURRENT_SELECTION,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:X.SELECT_FIELD_VALUE,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:X.DISREGARD_SELECTION,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return function(e,t,n){if(1===e){var r=ee(t,0);t.splice(r,1)}return t}(Z(e,n).dimensionalScope,r)}var re={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:G.DISREGARD_ALL_DIMENSIONS,selectionScope:X.DISREGARD_SELECTION};function ie(e){return 2===e?"{1}":""}function oe(e,t,n){return 1===e?"{$<".concat(k.getFieldWithWrapper(t),"={'").concat(n,"'}>}"):""}function ae(e,t){return 0===e&&t>1||2===e?"Total":""}function se(e,t,n){return 0===e&&t>1?"<".concat(k.getDimDefWithWrapper(n),">"):""}var 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,r=e.properties,i=e.layout,o=e.numDimensions,a=e.dimensionAndFieldList;if(!n)return t;var u=o;void 0===u&&(u=k.getNumDimensions({properties:r,layout:i}));var l=s(r,"qHyperCubeDef.qDimensions",[]),c=k.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:l,dimensionAndFieldList:a}),f=n.selectionScope,h=n.dimensionalScope;return function(e,t,n,r,i,o,a){var s=ie(t),u=oe(t,n,r),l=""===s&&""===u?"":s||u,c=ae(i,o),f=se(i,o,a),h=function(e){for(var t=[],n=0;n<e;n++)t[n]=k.getDimDefWithWrapper(n);return t.join(", ")}(o);return"".concat(e,"/ Sum(").concat(l," ").concat(c).concat(f," Aggr(").concat(l," ").concat(e,", ").concat(h,"))")}(c,f,n.field,n.value,h,u,n.primaryDimension)},initModifier:function(e){Object.keys(re).forEach((function(t){void 0===e[t]&&(e[t]=re[t])}))},updateModifier:function(e,t){1===(t.qDimensions?t.qDimensions.length:0)&&0===e.dimensionalScope&&(e.dimensionalScope=2)},enableTotalsFunction:function(){return!0},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:function(e,t){return!k.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(Q(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:X.DISREGARD_SELECTION,options:function(n){return ne(n,t,e)}},field:{refFn:function(t){return"".concat(Q(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 Z(t,e).selectionScope===X.SELECT_FIELD_VALUE}},value:{refFn:function(t){return"".concat(Q(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return Z(t,e).selectionScope===X.SELECT_FIELD_VALUE}},dimensionalScope:{refFn:function(t){return"".concat(Q(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:G.DISREGARD_ALL_DIMENSIONS,supportTooltip:!0,options:function(n,r){return te(n,r,t,e)}},primaryDimension:{refFn:function(t){return"".concat(Q(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(Z(t,e).dimensionalScope||0)===G.ONE_DIMENSION&&n.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return k.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(J))return!1;var o=Z(t,e);return o&&!o.disabled}}},getDisregardSelectionComp:ie,getFieldSelectionComp:oe,getTotalComp:ae,getSelectedDimComp:se},le={getExpression:function(e){return s(e,"qDef.base.qDef")||s(e,"qDef.qDef")},getExpressionRef:function(e){return s(e,"qDef.base.qDef")?"qDef.base.qDef":"qDef.qDef"},getLibraryIdRef:function(e){return s(e,"qDef.base.qLibraryId")?"qDef.base.qLibraryId":"qLibraryId"},getLibraryId:function(e){return s(e,"qDef.base.qLibraryId")||s(e,"qLibraryId")},getLabelRef:function(e){return s(e,"qDef.base")?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return s(e,"qDef.base")?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}},ce={initBase:function(e,t){(t||ce.isValid(e))&&(a(e,"qDef.base.qDef",s(e,"qDef.qDef")),a(e,"qDef.base.qLibraryId",s(e,"qLibraryId")),a(e,"qDef.base.qLabel",s(e,"qDef.qLabel")),a(e,"qDef.base.qLabelExpression",s(e,"qDef.qLabelExpression")))},restoreBase:function(e){ce.isValid(e)&&(a(e,"qDef.qDef",s(e,"qDef.base.qDef")),a(e,"qLibraryId",s(e,"qDef.base.qLibraryId")),a(e,"qDef.qLabel",s(e,"qDef.base.qLabel")),a(e,"qDef.qLabelExpression",s(e,"qDef.base.qLabelExpression")),s(e,"qDef.qAggrFunc")&&s(e,"qDef.base.qAggrFunc")&&a(e,"qDef.qAggrFunc",s(e,"qDef.base.qAggrFunc")),delete e.qDef.base)},isValid:function(e){var t=s(e,"qDef.base.qDef"),n=s(e,"qDef.base.qLibraryId");return void 0!==t||void 0!==n}},fe=ce;function he(e){return(he="function"==typeof Symbol&&"symbol"==r(Symbol.iterator)?function(e){return r(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":r(e)})(e)}var de={accumulation:j,movingAverage:V,difference:K,normalization:ue},pe=(t.default={modifiers:de,apply:me,applyModifiers:ge,cleanUpMeasure:ye,destroy:function(e){e&&pe[e.id]&&pe[e.id].masterItemSubscriber&&(pe[e.id].masterItemSubscriber&&pe[e.id].masterItemSubscriber.unsubscribe(),delete pe[e.id])},hasActiveModifiers:ve,getActiveModifier:be,initBase:fe.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some((function(e){return de[e]}))},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some((function(e){return de[e]&&de[e].isApplicable({properties:n,layout:r})}))},measureBase:le,limitedSorting:function(e){var t=e.measures,n=e.properties,r=e.layout,i=!1,o=!1;return t.forEach((function(e){var t=ke(e);Ee({modifiers:t,properties:n,layout:r})&&(i=!0,o=o||Oe({modifiers:t,properties:n,layout:r}))})),i&&!o},ifEnableTotalsFunction:xe},{});function me(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.model,n=e.properties,r=e.isSnapshot,i=void 0!==r&&r,a=e.masterItem;pe[t.id]=pe[t.id]||{isFirstTime:!0};var u=pe[t.id].isFirstTime;if(pe[t.id].isFirstTime=!1,n&&"object"===he(n))return ge({model:t,properties:n});var l=t?t.layout:void 0,c=s(l,"qSelectionInfo.qInSelections");if(i||c)return Promise.resolve(!1);var f=s(l,"qHyperCube.qMeasureInfo"),h=pe[t.id].lastReloadTime;if(pe[t.id].lastReloadTime=s(t,"app.layout.qLastReloadTime"),ve({measures:f,layout:l})){var d=function(e){var t=e.measures,n=e.layout,r=e.lastReloadTime;return s(e.model,"app.layout.qLastReloadTime")!==r&&function(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ce({measure:e,properties:n,layout:r})}))}({measures:t,layout:n})}({measures:f,layout:l,model:t,lastReloadTime:h});return d||function(e){var t=e.measures,n=e.layout,r=e.masterItem,i=e.isFirstTime;return!!Array.isArray(t)&&(i||r||t.some((function(e){return function(e){var t=e.measure,n=e.layout;return Ee({modifiers:ke(t),layout:n})?!t.base:!!t.base}({measure:e,layout:n})})))}({measures:f,layout:l,masterItem:a,isFirstTime:u})?t.getEffectiveProperties().then((function(e){var n=o()(!0,{},e);_e(n);var r=Ie(n);return Ae({model:t}).then((function(i){return Te({libraryIds:r,model:t}).then((function(r){return d&&function(e){var t=e.properties;we(t).forEach((function(e){return function(e){var t=e.measure;if(Ce({measure:t,properties:e.properties})){var n=0,r=t.qDef.modifiers;Array.isArray(r)&&r.forEach((function(e){if("object"===he(e)&&!e.disabled){if(n++,"object"!==he(de[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 r=de[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==r&&qe(t)&&k.simplifyExpression(t.qDef.base.qDef)!==k.simplifyExpression(r)&&(t.qDef.base.qDef=r)}}))}}({measure:e,properties:t})}))}({properties:n}),ge({model:t,oldProperties:e,properties:n,runUpdateIfChange:!0,masterItem:a,libraryItemsProps:r,dimensionAndFieldList:i})}))}))})):Promise.resolve(!1)}return function(e){return!!Array.isArray(e)&&e.some((function(e){return"object"===he(e.base)}))}(f)?t.getEffectiveProperties().then((function(e){return function(e){var t=e.model,n=e.properties,r=Ie(n);return Pe({model:t,libraryIds:r}).then((function(){var e=o()(!0,{},n);return we(n).forEach((function(e){return ye(e)})),Re({oldProperties:e,newProperties:n,model:t})}))}({model:t,properties:e})})):Promise.resolve(!1)}function ge(e){var t=e.model,n=e.oldProperties,r=e.properties,i=e.measures,a=e.runUpdateIfChange,u=void 0!==a&&a,l=e.masterItem,c=e.libraryItemsProps,f=e.dimensionAndFieldList;void 0===n&&(n=u?o()(!0,{},r):r),_e(r);var h=Ie(r);return Pe({model:t,libraryIds:h,masterItem:l}).then((function(){return function(e){var t=e.measures,n=e.properties,r=e.model,i=e.libraryItemsProps,a=e.dimensionAndFieldList;if(t||(t=we(n)),!t.length)return Promise.resolve();if(!ve({measures:t,properties:n}))return t.forEach((function(e){return ye(e)})),Promise.resolve();var u=i?void 0:Ie(n);return Ae({model:r,dimensionAndFieldList:a}).then((function(e){return Te({libraryIds:u,model:r,libraryItemsProps:i}).then((function(r){t.forEach((function(t){Ee({modifiers:t.qDef.modifiers,properties:n})?(function(e){var t=e.measure,n=e.properties,r=e.libraryItemsProps,i=e.dimensionAndFieldList,a=0;fe.isValid(t)||fe.initBase(t,!0);var u=t.qDef,l=u.modifiers,c=u.base;Array.isArray(l)&&l.forEach((function(e){if("object"===he(e)&&!e.disabled){if(a++,"object"!==he(de[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)");de[e.type].initModifier(e);var u=t.qLibraryId||c&&c.qLibraryId;u?function(e){var t=e.measure,n=e.modifier,r=e.properties,i=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],s=a.qMeasure.qDef,u=de[n.type].generateExpression({expression:s,modifier:n,properties:r,dimensionAndFieldList:i});n.outputExpression=u,t.qDef.qDef=n.outputExpression,(t.qDef.qLabel||a.qMeasure.qLabel)&&(t.qDef.qLabel=a.qMeasure.qLabel),(t.qDef.qLabelExpression||a.qMeasure.qLabelExpression)&&(t.qDef.qLabelExpression=a.qMeasure.qLabelExpression),t.qDef.quarantine&&t.qDef.quarantine.qNumFormat&&a.qMeasure.qNumFormat&&(t.qDef.qNumFormat=a.qMeasure.qNumFormat,t.qDef.isCustomFormatted=a.qMeasure.isCustomFormatted),delete t.qLibraryId,t.qDef.coloring=a.qMeasure.coloring,n.base=o()(!0,{},t.qDef.base)}({measure:t,modifier:e,libraryId:u,properties:n,libraryItemsProps:r,dimensionAndFieldList:i}):function(e){var t=e.measure,n=e.modifier,r=e.properties,i=e.dimensionAndFieldList;"function"==typeof de[n.type].updateModifier&&de[n.type].updateModifier(n,r.qHyperCubeDef);var a=le.getExpression(t),s=de[n.type].generateExpression({expression:a,modifier:n,properties:r,dimensionAndFieldList:i});n.outputExpression=s,t.qDef.qDef=n.outputExpression,t.qDef.base.qLabelExpression?t.qDef.qLabelExpression=t.qDef.base.qLabelExpression:t.qDef.qLabel=t.qDef.base.qLabel||a,n.base=o()(!0,{},t.qDef.base)}({measure:t,modifier:e,properties:n,dimensionAndFieldList:i}),function(e){var t=s(e,"qDef.qAggrFunc");"Expr"!==t||xe(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&xe(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(t)}}))}({measure:t,properties:n,libraryItemsProps:r,dimensionAndFieldList:e}),Se(t)):ye(t)}))}))}))}({measures:i,properties:r,model:t,libraryItemsProps:c,dimensionAndFieldList:f}).then((function(){return u?Re({oldProperties:n,newProperties:r,model:t}):Promise.resolve(!1)}))}))}function ye(e){!function(e){var t=ke(e);return Array.isArray(t)&&t.some((function(e){return"object"===he(e)&&!e.disabled&&!de[e.type]}))}(e)?fe.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,Se(e)}function ve(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ee({modifiers:ke(e),properties:n,layout:r})}))}function be(e){var t=ke(e);if(Array.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];if(de[r.type]&&!r.disabled)return r}}function xe(e){var t=be(e);return!t||de[t.type].enableTotalsFunction(e)}function we(e){return s(e,"qHyperCubeDef.qMeasures",[]).concat(s(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function ke(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function Me(e){return s(e,"outputExpression.qValueExpression.qExpr")||s(e,"outputExpression")}function _e(e){we(e).forEach((function(e){return function(e){var t=be(e);t&&(void 0!==t.outputExpression&&Me(t)!==e.qDef.qDef?delete e.qDef.base:!fe.isValid(e)&&t.base&&(e.qDef.base=o()(!0,{},t.base)))}(e)}))}function Se(e){var t=ke(e);Array.isArray(t)&&t.forEach((function(t){"object"===he(t)&&(t.disabled||!de[t.type]&&Me(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)}))}function qe(e){return e.base||e.qDef&&e.qDef.base}function De(e){var t=qe(e);return e.qLibraryId||t&&t.qLibraryId}function Ce(e){var t=e.measure,n=e.properties,r=e.layout;return!De(t)&&Ee({modifiers:ke(t),properties:n,layout:r})}function Ee(e){var t=e.modifiers,n=e.properties,r=e.layout,i={};return Array.isArray(t)&&t.some((function(e){return!("object"!==he(e)||e.disabled||!de[e.type])&&(void 0===i[e.type]&&(i[e.type]=de[e.type].isApplicable({properties:n,layout:r})),i[e.type])}))}function Ae(e){var t=e.model,n=e.dimensionAndFieldList;if(n)return Promise.resolve(n);var r=[],i={},o=t.app.getDimensionList().then((function(e){i.dimensionList=e}));r.push(o);var a=t.app.getFieldList().then((function(e){i.fieldList=e}));return r.push(a),Promise.all(r).then((function(){return i}))}function Te(e){var t=e.libraryIds,n=e.model,r=e.libraryItemsProps;if(r)return Promise.resolve(r);var i=t.measureLibraryIds,o=t.dimensionLibraryIds,a={},s=[];return i.forEach((function(e){var t=n.app.getMeasure(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));s.push(t)})),o.forEach((function(e){var t=n.app.getDimension(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));s.push(t)})),Promise.all(s).then((function(){return a}))}function Ne(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Re(e){var t=e.oldProperties,n=e.newProperties,r=e.model,i=JSON.stringify(s(t,"qHyperCubeDef.qMeasures"),Ne)!==JSON.stringify(s(n,"qHyperCubeDef.qMeasures"),Ne)||JSON.stringify(s(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ne)!==JSON.stringify(s(n,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ne);return i?function(e){var t=e.model,n=e.oldProperties,r=e.newProperties,i=t.layout;return i&&!i.qHasSoftPatches&&!i.qExtendsId&&s(i,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(r):R(t,n,r)}({model:r,oldProperties:t,newProperties:n}).then((function(){return i})):Promise.resolve(i)}function Oe(e){var t=e.modifiers,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some((function(e){return"object"===he(e)&&!e.disabled&&de[e.type]&&de[e.type].needDimension({modifier:e,properties:n,layout:r})}))}function Ie(e){var t=we(e),n=[],r=[],i=!1;return t.forEach((function(t){var r=ke(t);if(Ee({modifiers:r,properties:e})){var o=De(t);o&&n.push(o),i=i||Oe({modifiers:r,properties:e})}})),s(e,"qHyperCubeDef.qDimensions",[]).forEach((function(e){var t=e.qLibraryId;t&&r.push(t)})),{measureLibraryIds:n,dimensionLibraryIds:r}}function Pe(e){var t=e.model,n=e.libraryIds;return!e.masterItem&&n&&(n.measureLibraryIds.length||n.dimensionLibraryIds.length)?(pe[t.id].masterItemSubscriber=pe[t.id].masterItemSubscriber||function(e){var t=e.model,n=e.callback,r={},i={},o={},a={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function u(e){var t={},n=s(e,"qInfo.qType");return n&&a[n]&&a[n].forEach((function(n){t[n]=s(e,n)})),JSON.stringify(t)}function l(e){var t=e.qInfo.qId;if(r[t]){var i=u(e);r[t].properties!==i&&(r[t].properties=i,"function"==typeof n&&r[t].enabled&&n(e)),r[t].enabled=!0}}function c(e,n){return t.app[n](e).then((function(t){r[e]={listener:t.layoutSubscribe(l),enabled:!1,properties:u(t.layout)}}))}return{subscribe:function(e){var n=e.measureLibraryIds,a=e.dimensionLibraryIds,s=[];return function(e){var t=e.dimensionLibraryIds;i={},e.measureLibraryIds.forEach((function(e){i[e]=!0})),o={},t.forEach((function(e){o[e]=!0}))}({measureLibraryIds:n,dimensionLibraryIds:a}),Object.keys(r).forEach((function(e){i[e]||o[e]||(r[e].listener.dispose(),delete r[e])})),t.app&&(Object.keys(i).forEach((function(e){i[e]&&!r[e]&&s.push(c(e,"getMeasure"))})),Object.keys(o).forEach((function(e){o[e]&&!r[e]&&s.push(c(e,"getDimension"))}))),Promise.all(s)},unsubscribe:function(){Object.keys(r).forEach((function(e){r[e].listener.dispose()})),r={}}}}({model:t,callback:function(e){return me({model:t,masterItem:e}).then((function(){return t.app.clearUndoBuffer()}))}}),pe[t.id].masterItemSubscriber.subscribe(n)):Promise.resolve()}}])},function(e,t,n){function i(e){var t=function e(t){var n,r=t;return r>9?(n=65+r-10)>90&&(n+=6):r="".concat(r).charCodeAt(0),[48,111,79,105,73,108].indexOf(n)>-1?e(r+1):String.fromCharCode(n)}(e%62),n=Math.floor(e/62);return n>0?i(n)+t:t}function o(e){return(o="function"==typeof Symbol&&"symbol"==r(Symbol.iterator)?function(e){return r(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":r(e)})(e)}n.r(t);var a={getValue:function(e,t,n){if(null==e||null==t)return n;for(var r=t.split("."),i=e,o=0;o<r.length;++o){var a=r[o];if(""!==a){if(void 0===i[a]||null===i[a])return n;i=i[a]}}return i},setValue:function(e,t,n){if(null!=e&&null!=t){for(var r=t.split("."),i=r[r.length-1],o=e,a=0;a<r.length-1;++a){var s=r[a];void 0!==o[s]&&null!==o[s]||(o[s]=Number.isNaN(+r[a+1])?{}:[]),o=o[s]}void 0!==n?o[i]=n:delete o[i]}},isEmpty:function(e){return 0===Object.keys(e).length&&e.constructor===Object},isAtomicValue:function(e){return/boolean|number|string/.test(o(e))},generateId:function(){return i(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};function s(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return u(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)?u(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 u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))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,r=new Array(t);n<t;n++)r[n]=e[n];return r}function f(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return r;return-1}return-1}var 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 r=0;r<t.length;r++){var i=e.indexOf(t[r]);if(n>i)return!1;n=i}return!0}return!1},indexAdded:function(e,t){var n;for(n=0;n<e.length;++n)e[n]>=0&&e[n]>=t&&++e[n];e.push(t)},indexRemoved:function(e,t){var n,r=0;for(n=0;n<e.length;++n)e[n]>t?--e[n]:e[n]===t&&(r=n);return e.splice(r,1),r},findItemByPropertyValue:function(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return e[r];return null}return null},findIndexByPropertyValue:f},d=n(1),p=n.n(d),m={addDimensions:function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,i=n.data[0];(t=i.dimensions).push.apply(t,s(r.qDimensions));var o,u=a.getValue(r,"qLayoutExclude.qHyperCubeDef.qDimensions");u&&(o=i.excludedDimensions).push.apply(o,s(u))},addMeasures:function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,i=n.data[0];(t=i.measures).push.apply(t,l(r.qMeasures));var o,s=a.getValue(r,"qLayoutExclude.qHyperCubeDef.qMeasures");s&&(o=i.excludedMeasures).push.apply(o,l(s))},setInterColumnSortOrder:function(e){var t=e.exportFormat,n=e.qHyperCubeDef,r=t.data[0];n.qInterColumnSortOrder||(n.qInterColumnSortOrder=[]),r.interColumnSortOrder=n.qInterColumnSortOrder.concat();var i=a.getValue(n,"qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder");i&&h.isOrderedSubset(i,r.interColumnSortOrder)&&(r.interColumnSortOrder=i.concat())},copyProperties:function(e){var t=e.exportFormat,n=e.properties;Object.keys(n).forEach((function(e){t.properties[e]=n[e]}))},updateLayoutExclude: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===a.getValue(e,t)&&a.setValue(e,t,e.qLayoutExclude.changed[t].from)}))}(n),delete n.qLayoutExclude.changed),n.qLayoutExclude.quarantine&&!a.isEmpty(n.qLayoutExclude.quarantine)||delete n.qLayoutExclude},storeMeasuresModifiers:function(e){e.forEach((function(e){p.a.cleanUpMeasure(e),e.qDef.modifiers&&(e.store={modifiers:e.qDef.modifiers},delete e.qDef.modifiers)}))}};function g(e,t,n){var r,i,o=a.getValue(e,t);if(!a.isAtomicValue(o))try{if((i=(i=(r=JSON.stringify(o)).match(/:\{/g))?i.length:0)>2)return;o=JSON.parse(r)}catch(e){return}a.getValue(e,"qLayoutExclude.quarantine")||a.setValue(e,"qLayoutExclude.quarantine",{});var s=a.getValue(e,"qLayoutExclude.quarantine");s[n]||(s[n]={}),s[n][t]=o}var y=n(0),v=n.n(y);function b(e,t){var n=v()(!0,{},t,e);return a.getValue(n,"qOtherTotalSpec.qOtherCounted")||a.setValue(n,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),a.getValue(n,"qOtherTotalSpec.qOtherLimit")||a.setValue(n,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),n.hasOwnProperty("othersLabel")||(n.othersLabel="Others"),n}function x(e,t){return v()(!0,{},t,e)}function w(e,t,n){return"function"==typeof e?e(t):Number.isNaN(+e)?n:e}var k=Math.pow(2,53)-1;function M(e){return function(e){if(Array.isArray(e))return _(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return _(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)?_(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 _(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function S(e){return function(e){if(Array.isArray(e))return q(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return q(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)?q(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 q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var D={importCommonProperties:function(e,t,n){var r="masterobject"===a.getValue(t,"properties.qInfo.qType")?"masterobject":a.getValue(n,"qInfo.qType");a.setValue(e,"qInfo.qType",r),e.visualization=n.visualization},copyPropertyIfExist:function(e,t,n){t.hasOwnProperty(e)&&(n[e]=t[e])},copyPropertyOrSetDefault:function(e,t,n,r){t.hasOwnProperty(e)?n[e]=t[e]:n[e]=r},getDefaultDimension: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}}},getDefaultMeasure:function(){return{qDef:{autoSort:!0,cId:"",numFormatFromTemplate:!0},qLibraryId:"",qTrendLines:[]}},addDimensions:function(e){var t,n=e.exportFormat,r=e.maxDimensions,i=e.minDimensions,o=e.newHyperCubeDef,a=e.defaultDimension,s=n.data[0];for(t=0;t<s.dimensions.length;++t){var u=b(s.dimensions[t],a);o.qDimensions.length<r?o.qDimensions.push(u):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(u)}for(t=0;t<s.excludedDimensions.length;++t){var l=b(s.excludedDimensions[t],a);o.qDimensions.length<i?o.qDimensions.push(l):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(l)}},addMeasures:function(e){var t,n=e.exportFormat,r=e.maxMeasures,i=e.minMeasures,o=e.newHyperCubeDef,a=e.defaultMeasure,s=n.data[0];for(t=0;t<s.measures.length;++t){var u=x(s.measures[t],a);o.qMeasures.length<r?o.qMeasures.push(u):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(u)}for(t=0;t<s.excludedMeasures.length;++t){var l=x(s.excludedMeasures[t],a);o.qMeasures.length<i?o.qMeasures.push(l):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(l)}},getMaxMinDimensionMeasure:function(e){var t=e.exportFormat,n=e.dataDefinition,r=void 0===n?{}:n,i=t.data[0],o=r.dimensions||{max:0},a=r.measures||{max:0},s=w(a.max,i.dimensions.length,k),u=w(a.min,i.dimensions.length,0);return{maxDimensions:w(o.max,s,k),minDimensions:w(o.min,u,0),maxMeasures:s,minMeasures:u}},setInterColumnSortOrder:function(e){var t=e.exportFormat,n=e.newHyperCubeDef,r=t.data[0],i=n.qDimensions.length+n.qMeasures.length;n.qInterColumnSortOrder=r.interColumnSortOrder.concat();var o=n.qInterColumnSortOrder.length;if(o!==i)for(n.qLayoutExclude&&(n.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=r.interColumnSortOrder.concat());o!==i;)o<i?(h.indexAdded(n.qInterColumnSortOrder,o),++o):(--o,h.indexRemoved(n.qInterColumnSortOrder,o))},createNewProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.hypercubePath,i={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(t.properties).forEach((function(e){"qLayoutExclude"===e?t.properties[e].quarantine&&(i.qLayoutExclude.quarantine=v()(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&r?a.setValue(i,"".concat(r,".qHyperCubeDef"),t.properties.qHyperCubeDef):n.hasOwnProperty(e)||-1!==["qMetaDef","descriptionExpression","labelExpression"].indexOf(e)?i[e]=t.properties[e]:i.qLayoutExclude.disabled[e]=t.properties[e]})),null===(i=v()(!0,{},n,i)).components&&(i.components=[]),i},shouldInitLayoutExclude:function(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,i=e.maxMeasures,o=e.minMeasures,a=t.data[0];return a.dimensions.length>n&&n>0||a.measures.length>i&&i>0||a.excludedDimensions.length>0&&a.dimensions.length+a.excludedDimensions.length>r||a.excludedMeasures.length>0&&a.measures.length+a.excludedMeasures.length>o||!i&&a.measures.length>0||!n&&a.dimensions.length>0},initLayoutExclude:function(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,i=e.maxMeasures,o=e.minMeasures,a=e.newHyperCubeDef,s=t.data[0];a.qLayoutExclude||(a.qLayoutExclude={}),a.qLayoutExclude.qHyperCubeDef||(a.qLayoutExclude.qHyperCubeDef={}),(s.dimensions.length>n&&n>0||s.excludedDimensions&&s.excludedDimensions.length&&s.dimensions.length+s.excludedDimensions.length>r)&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[])),(s.measures.length>i&&i>0||s.excludedMeasures&&s.excludedMeasures.length&&s.measures.length+s.excludedMeasures.length>o)&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!i&&s.measures.length&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!n&&s.dimensions.length&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[]))},updateDimensionsOnAdded:function(e){var t=e.newProperties,n=e.dataDefinition,r=e.hypercubePath;if(n.dimensions&&"function"==typeof n.dimensions.added){var i=a.getValue(t,r||"").qHyperCubeDef,o=M(i.qDimensions);i.qDimensions=[],o.forEach((function(e){i.qDimensions.push(e),n.dimensions.added(e,t)}))}},updateMeasuresOnAdded:function(e){var t=e.newProperties,n=e.dataDefinition,r=e.hypercubePath;if(n.measures&&"function"==typeof n.measures.added){var i=a.getValue(t,r||"").qHyperCubeDef,o=S(i.qMeasures);i.qMeasures=[],o.forEach((function(e){i.qMeasures.push(e),n.measures.added(e,t)}))}},restoreMeasuresModifiers:function(e){var t=e.measures,n=e.modifierTypes;t&&n&&p.a.isSupportedModifiers(n)&&t.forEach((function(e){e.store&&e.store.modifiers&&(e.qDef.modifiers=e.store.modifiers),delete e.store}))}};function C(e,t){var n=a.getValue(e,"qLayoutExclude.quarantine",{})[t];return!!n&&(Object.keys(n).forEach((function(t){a.setValue(e,t,n[t])})),delete e.qLayoutExclude.quarantine[t],!0)}var E={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,i=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}(),o=t.qProperty,s=a.getValue(o,n||""),u=s.qHyperCubeDef;return u.qInterColumnSortOrder||(u.qInterColumnSortOrder=[]),m.addDimensions({exportFormat:i,qHyperCubeDef:u}),m.addMeasures({exportFormat:i,qHyperCubeDef:u}),m.setInterColumnSortOrder({exportFormat:i,qHyperCubeDef:u}),delete u.qLayoutExclude,m.copyProperties({exportFormat:i,properties:o}),n&&(i.properties.qHyperCubeDef=u,delete s.qHyperCubeDef),m.updateLayoutExclude({exportFormat:i,properties:o}),r||m.storeMeasuresModifiers(i.properties.qHyperCubeDef.qMeasures),Array.isArray(i.properties.filters)&&(g(i.properties,"filters","storedFilters"),delete i.properties.filters),i.properties.qHyperCubeDef.qContextSetExpression&&(g(i.properties,"qHyperCubeDef.qContextSetExpression","storedFilters"),i.properties.qHyperCubeDef.qContextSetExpression=""),i.properties.qHyperCubeDef.qDynamicScript&&i.properties.qHyperCubeDef.qDynamicScript.length&&(g(i.properties,"qHyperCubeDef.qDynamicScript","dynamicScript"),i.properties.qHyperCubeDef.qDynamicScript=[]),i},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=void 0===n?{}:n,i=e.dataDefinition,o=void 0===i?{}:i,s=e.defaultPropertyValues,u=void 0===s?{}:s,l=e.hypercubePath,c=e.extension,f=e.supportedFilters,h=void 0===f||f,d={qChildren:[]},p=D.createNewProperties({exportFormat:t,initialProperties:r,hypercubePath:l}),m=a.getValue(r,l||"").qHyperCubeDef,g=a.getValue(p,l||"").qHyperCubeDef,y=D.getMaxMinDimensionMeasure({exportFormat:t,dataDefinition:o}),v=y.maxDimensions,b=y.minDimensions,x=y.maxMeasures,w=y.minMeasures,k=u.defaultDimension,M=void 0===k?D.getDefaultDimension():k,_=u.defaultMeasure,S=void 0===_?D.getDefaultMeasure():_;g.qDimensions.length=0,g.qMeasures.length=0,D.shouldInitLayoutExclude({exportFormat:t,maxDimensions:v,minDimensions:b,maxMeasures:x,minMeasures:w})&&D.initLayoutExclude({exportFormat:t,maxDimensions:v,minDimensions:b,maxMeasures:x,minMeasures:w,newHyperCubeDef:g}),D.addDimensions({exportFormat:t,maxDimensions:v,minDimensions:b,newHyperCubeDef:g,defaultDimension:M}),D.addMeasures({exportFormat:t,maxMeasures:x,minMeasures:w,newHyperCubeDef:g,defaultMeasure:S}),D.updateDimensionsOnAdded({newProperties:p,dataDefinition:o,hypercubePath:l}),D.updateMeasuresOnAdded({newProperties:p,dataDefinition:o,hypercubePath:l}),D.setInterColumnSortOrder({exportFormat:t,newHyperCubeDef:g}),D.copyPropertyIfExist("qMaxStackedCells",m,g),D.copyPropertyIfExist("qNoOfLeftDims",m,g),D.copyPropertyOrSetDefault("qInitialDataFetch",m,g,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),D.copyPropertyOrSetDefault("qMode",m,g,"S"),D.copyPropertyOrSetDefault("qReductionMode",m,g,"N"),D.copyPropertyOrSetDefault("qSortbyYValue",m,g),D.copyPropertyOrSetDefault("qIndentMode",m,g),D.copyPropertyOrSetDefault("qShowTotalsAbove",m,g),D.importCommonProperties(p,t,r),d.qProperty=p;var q=a.getValue(c||{},"support.modifiers");return D.restoreMeasuresModifiers({measures:g.qMeasures,modifierTypes:q}),h&&C(d.qProperty,"storedFilters"),"S"===g.qMode&&C(d.qProperty,"dynamicScript"),d}},A={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function T(e,t,n,r){t=t||[];var i=f(e,r,n),o=f(t,r,n);if(-1!==i&&-1===o){var a=e.splice(i,1);t.push(a[0])}return t}function N(e,t){return e.length!==t}var R={create:function(e,t){if(!e||!A[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,r,i){n=n||"qAttributeExpressions",i=i||"id";for(var o=0;o<e.length;o++){var a=e[o][n],s=t.length;if(T(a,t,r,i),N(t,s))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"}},O={getNumDimensions:function(e){return a.getValue(e,"qHyperCubeDef.qDimensions.length",0)},getNumMeasures:function(e){return a.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}},I={colorModeOptions:{primary:function(){return!0},dimension:function(e){return O.getNumDimensions(e)>0&&O.getNumMeasures(e)<=1},multiColor:function(e){return O.getNumMeasures(e)>1},measure:function(e){return O.getNumDimensions(e)>0},expression:function(e){return O.getNumMeasures(e)>=1}}},P={colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return O.getNumMeasures(e)>=1}}},L={scatterplot:P,"sn-scatter-plot":P,piechart:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return O.getNumMeasures(e)>=1}}},linechart:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return O.getNumDimensions(e)>1},multiColor:function(e){return O.getNumMeasures(e)>1},measure:function(e){return O.getNumDimensions(e)<=1},expression:function(e){return O.getNumMeasures(e)>=1}}},map:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return O.getNumDimensions(e)>=1},multiColor:function(e){return O.getNumMeasures(e)>1},measure:function(e){return O.getNumDimensions(e)>=1},expression:function(e){return O.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 O.getNumDimensions(e)>=1}}}};function j(e,t,n){if(Array.isArray(e[t])){var r=h.findIndexByPropertyValue(e[t],"id",n);r>=0&&e[t].splice(r,1)}else e[t]=[]}function z(e,t){var n=R.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach((function(e){j(e,"qAttributeDimensions",n),j(e,"qAttributeExpressions",n)})),t.forEach((function(e){j(e,"qAttributeDimensions",n),j(e,"qAttributeExpressions",n)}))}function F(e,t){if(t){var n="="===t.charAt(0);e.color.altLabel=n?{qStringExpression:{qExpr:t.substr(1)}}:t}}function H(e){var t=e.properties,n=e.isDimension,r=e.dimensions,i=e.excludedDimensions,o=e.measures,s=e.label;z(r,i);var u=r[r.length-1];if(u){var l=n?a.getValue(t,"color.byDimDef"):a.getValue(t,"color.byMeasureDef"),c=a.getValue(t,"color.formatting.qNumFormat"),f=a.getValue(t,"color.formatting.isCustomFormatted");if(l){var d=R.create(R.IDMAP.COLOR_BY_ALTERNATIVE);switch(l.type){case"expression":!function(e){var t=e.attributeExpression,n=e.label,r=e.item,i=e.isDimension,o=e.qNumFormat,a=e.isCustomFormatted;t.label=n||r.label,i?t.qDef=r.key:(t.qExpression=r.key,o&&(t.qNumFormat=o,t.isCustomFormatted=a)),t.matchMeasure=r.activeMeasureIndex,t.label&&"="===t.label.charAt(0)&&(t.labelExpRef="color.altLabel")}({attributeExpression:d,label:s,item:l,isDimension:n,qNumFormat:c,isCustomFormatted:f});break;case"libraryItem":!function(e){var t=e.attributeExpression,n=e.measures,r=e.item,i=e.isDimension,o=e.qNumFormat,a=e.isCustomFormatted;i||(t.matchMeasure=h.findIndexByPropertyValue(n,"qLibraryId",r.key),o&&(t.qNumFormat=o,t.isCustomFormatted=a)),void 0!==r.expression?t.qExpression=r.expression:t.qLibraryId=r.key,t.colorMapRef=r.key}({attributeExpression:d,measures:o,item:l,isDimension:n,qNumFormat:c,isCustomFormatted:f})}n?(d.qSortBy={qSortByAscii:1},u.qAttributeDimensions.push(d)):u.qAttributeExpressions.push(d)}}}function B(e,t,n,r){var i,o,a,s={};switch(e){case"dimension":n.qLibraryId?(s.type="dimension",s.name=n.qLibraryId,s.id=n.qLibraryId):(s.type="field",t?(s.name=n.label||n.qDef,s.id=n.qDef):(s.name=n.qDef.qFieldDefs[0],s.label=(a=n.qDef).qLabelExpression?a.qLabelExpression:a.qFieldLabels&&a.qFieldLabels[0]?a.qFieldLabels[0]:a.qFieldDefs[0]));break;case"measure":(i=function(e,t){return t?e.qLibraryId:p.a.measureBase.getLibraryId(e)}(n,t))?(s.type="measure",s.name=i,s.id=i,(o=function(e,t){return p.a.hasActiveModifiers({measures:[e]})&&t?e.qDef.qDef:void 0}(n,r))&&(s.expression=o)):(s.type="expression",t?(s.name=n.label||n.qExpression,s.id=n.qExpression):(s.name=n.qDef.qDef,s.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 s}var V={useMasterNumberFormat:function(e){e.quarantine={qNumFormat:e.qNumFormat||{},isCustomFormatted:e.isCustomFormatted||!1},e.qNumFormat=null,e.isCustomFormatted=void 0}};function W(e,t,n,r){var i=n?"expression":t.type,o=e.color,a=o.mode,s=O.getItemLabel(t);switch(F(e,s||""),i){case"field":a="byDimension",o.byDimDef={label:t.label||O.wrapFieldName(t.name),key:O.wrapFieldName(t.name),type:"expression",activeDimensionIndex:t.activeDimensionIndex};break;case"expression":a="byMeasure",o.byMeasureDef={label:n||s,key:n||t.name,type:"expression",activeMeasureIndex:t.activeMeasureIndex};break;case"dimension":a="byDimension",o.byDimDef={label:t.name,key:t.id,type:"libraryItem",activeDimensionIndex:t.activeDimensionIndex};break;case"measure":a="byMeasure",o.byMeasureDef={label:t.name,key:t.id,expression:t.expression,type:"libraryItem",activeMeasureIndex:t.activeMeasureIndex},o.formatting&&V.useMasterNumberFormat(o.formatting)}r||(o.auto=!1,o.mode=a)}function U(e,t){var n=a.getValue(e,"".concat(t,"qDimensions"),[]),r=n[function(e,t,n){var r=a.getValue(t,"visualization"),i=n.split("."),o=Number(i[1]),s=a.getValue(t,"layers.".concat(o,".type"));return 2===e.length&&"map"===r&&"point"===s}(n,e,t)?0:n.length-1],i=R.IDMAP.COLOR_BY_ALTERNATIVE,o=h.findItemByPropertyValue(r.qAttributeDimensions,"id",i);return W(e,B("dimension",!!o,o||r)),!!o}function $(e,t){var n=a.getValue(e,"".concat(t,"qDimensions"),[]),r=a.getValue(e,"".concat(t,"qMeasures"),[]),i=a.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),o=a.getValue(e,"color.byDimDef");if(o&&F(e,o.label),function(e){return!!(e&&e.activeDimensionIndex>-1)}(o))!function(e,t){var n=a.getValue(e,"".concat(t,"qDimensions"),[]),r=a.getValue(e,"color.byDimDef");r.activeDimensionIndex=Math.min(r.activeDimensionIndex,n.length-1);var i=B("dimension",!1,n[r.activeDimensionIndex]);i.activeDimensionIndex=r.activeDimensionIndex,W(e,i)}(e,t);else if(function(e){return!e||!e.key}(o)&&U(e,t))return;H({properties:e,isDimension:!0,dimensions:n,excludedDimensions:i,measures:r,label:a.getValue(e,"color.byDimDef.label")})}function Y(e,t){var n=a.getValue(e,"".concat(t,"qDimensions"),[]),r=a.getValue(e,"".concat(t,"qMeasures"),[]),i=a.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),o=a.getValue(e,"color.byMeasureDef");if(o&&F(e,o.label),function(e){return!!(e&&e.activeMeasureIndex>-1)}(o))!function(e,t){var n=a.getValue(e,"".concat(t,"qMeasures"),[]),r=a.getValue(e,"color.byMeasureDef");if(r.activeMeasureIndex=Math.min(r.activeMeasureIndex,n.length-1),r.activeMeasureIndex>-1){var i=B("measure",!1,n[r.activeMeasureIndex],!0);i.activeMeasureIndex=r.activeMeasureIndex,W(e,i)}}(e,t);else if(function(e,t){return(!e||!e.key)&&t.length>0}(o,r)&&function(e,t){var n=a.getValue(e,"".concat(t,"qDimensions"),[]),r=a.getValue(e,"".concat(t,"qMeasures"),[]),i=n[n.length-1],o=R.IDMAP.COLOR_BY_ALTERNATIVE,s=h.findItemByPropertyValue(i.qAttributeExpressions,"id",o);return W(e,B("measure",!!s,s||r[0])),!!s}(e,t))return;H({properties:e,isDimension:!1,dimensions:n,excludedDimensions:i,measures:r,label:a.getValue(e,"color.byMeasureDef.label")})}var K={changeProperty:function(e,t,n){a.setValue(e,t,n),a.isAtomicValue(n)&&function(e,t,n){var r=e.qLayoutExclude;r&&(r.changed||(r.changed={}),r.changed[t]={from:a.getValue(e,t),to:n})}(e,t,n)},getCanColorBy:function(e,t){var n={primary:!0};if(e){var r=(L[t]||I).colorModeOptions||I.colorModeOptions;n.byDimension=r.dimension(e),n.byMeasure=r.measure(e),n.byMultiple=r.multiColor(e),n.byExpression=r.expression(e)}return n},shouldUpdateColorBy:function(e){var t=e.canColorBy,n=e.autoColor,r=e.colorMode,i=e.dimensions;return!(t[r]&&!n&&("byDimension"!==r&&"byMeasure"!==r||!i.length))},updateColorBy:function(e,t){var n=a.getValue(e,"color.mode"),r=a.getValue(e,"color.auto"),i=a.getValue(e,"".concat(t,"qDimensions"),[]),o=a.getValue(e,"".concat(t,"qMeasures"),[]),s=a.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);r?z(i,s):function(e){var t=e.auto,n=e.colorMode,r=e.dimensions;return!t&&"byDimension"===n&&r.length>0}({auto:r,colorMode:n,dimensions:i})?$(e,t):function(e){var t=e.auto,n=e.colorMode,r=e.dimensions,i=e.measures,o=e.properties,s=a.getValue(o,"visualization");return!(t||"byMeasure"!==n||!r.length||"map"!==s&&!i.length)}({auto:r,colorMode:n,dimensions:i,measures:o,properties:e})?Y(e,t):function(e,t){var n=a.getValue(e,"color.mode"),r=a.getValue(e,"".concat(t,"qDimensions"),[]),i=a.getValue(e,"".concat(t,"qMeasures"),[]),o=a.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);"byMultiple"===n&&i.length<2&&a.setValue(e,"color.mode","primary"),z(r,o)}(e,t)},deleteTotalMode:function(e){e.forEach((function(e){e.qOtherTotalSpec&&"qTotalMode"in e.qOtherTotalSpec&&delete e.qOtherTotalSpec.qTotalMode}))},shouldAddColorByExpression:function(e){var t=e.shouldUpdateColorBy,n=e.properties,r=a.getValue(n,"qHyperCubeDef.qMeasures",[]),i=a.getValue(n,"color.mode","");return!t&&"byExpression"===i&&r.length>0},addColorByExpression:function(e){var t=a.getValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",[]),n=a.getValue(e,"color.colorExpression","");t.splice(0,0,{qExpression:n,id:"colorByExpression"}),a.setValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",t)},switchToAutoColor:function(e){a.setValue(e,"color.mode","primary"),a.setValue(e,"color.auto",!0)},shouldSwitchToColorPersistent:function(e){var t=a.getValue(e,"qHyperCubeDef.qDimensions",[]),n=a.getValue(e,"color.persistent",!1);return t.length>1&&!n}},X={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,i=E.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),o=i.data[0],a=o.dimensions.concat(o.excludedDimensions),s=o.measures.concat(o.excludedMeasures),u=R.IDMAP,l=u.COLOR_BY_ALTERNATIVE,c=u.COLOR_BY_EXPRESSION;return R.moveByIdFromGroup(a,[],"qAttributeDimensions",l),R.moveByIdFromGroup(a,[],"qAttributeExpressions",l),R.moveByIdFromGroup(s,[],"qAttributeExpressions",c),i},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,i=e.defaultPropertyValues,o=e.hypercubePath,s=e.extension,u=e.supportedFilters,l=E.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:i,hypercubePath:o,extension:s,supportedFilters:u}),c=l.qProperty,f=a.getValue(c,"visualization"),h=a.getValue(c,"qHyperCubeDef.qDimensions",[]),d=a.getValue(c,"color.mode",""),p=a.getValue(c,"color.auto",""),m=K.getCanColorBy(c,f),g=K.shouldUpdateColorBy({canColorBy:m,autoColor:p,colorMode:d,dimensions:h});return m[d]?K.shouldAddColorByExpression({shouldUpdateColorBy:g,properties:c})&&K.addColorByExpression(c):K.switchToAutoColor(c),g&&K.updateColorBy(c,"qHyperCubeDef."),K.shouldSwitchToColorPersistent(c)&&K.changeProperty(c,"color.persistent",!0),K.deleteTotalMode(h),l}},G=["bar","marker","line"],J={handleAutoMinMax:function(e){var t=e.initialProperties,n=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?C(n,"unsupportedAutoMinMax")||v()(n.measureAxis,t.measureAxis):C(n,"supportedAutoMinMax")||v()(n.measureAxis,t.measureAxis)},handleMeasuresAxis:function(e){var t,n=e.exportFormat,r=e.initialProperties,i=e.properties,o=e.measureType,a=i.qHyperCubeDef,s=i.measureAxis;if(function(e){var t=e.exportFormat,n=e.initialProperties;return!(!t.properties.measureAxes||n.measureAxes||!n.measureAxis||void 0===n.measureAxis.autoMinMax)}({exportFormat:n,initialProperties:r})){var u=function(e){var t=[];return e.qMeasures.length>0&&e.qMeasures.forEach((function(e){if(e.qDef.series){var n=e.qDef.series,r=n.type,i=n.axis;t[i]||(t[i]={axis:i,type:{line:0,marker:0,bar:0,total:0}}),G.includes(r)&&t[i].type[r]++,t[i].type.total++}})),t}(a);u.length?(o&&(t=u.filter((function(e){return e.type[o]>0})).sort((function(e,t){return t.type[o]-e.type[o]}))),t&&t.length||(t=u.sort((function(e,t){return t.type.total-e.type.total}))),t&&t[0]&&v()(s,n.properties.measureAxes[t[0].axis])):v()(s,n.properties.measureAxes[0])}},setInterColumnSortOrder: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}}}},Z={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,i=e.supportedAutoMinMax,o=void 0===i||i,a=X.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),s=a.properties;return o?(g(s,"measureAxis.min","supportedAutoMinMax"),g(s,"measureAxis.max","supportedAutoMinMax")):(g(s,"measureAxis.min","unsupportedAutoMinMax"),g(s,"measureAxis.max","unsupportedAutoMinMax")),a},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,i=e.defaultPropertyValues,o=e.hypercubePath,a=e.measureType,s=e.extension,u=e.supportedFilters,l=X.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:i,hypercubePath:o,extension:s,supportedFilters:u}),c=l.qProperty;return J.handleAutoMinMax({initialProperties:n,properties:c}),J.handleMeasuresAxis({exportFormat:t,initialProperties:n,properties:c,measureType:a}),J.setInterColumnSortOrder(c.qHyperCubeDef),l}};function Q(e,t,n){return"qLayoutExclude.quarantine.".concat(e,".").concat(t,".").concat(n)}function ee(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,i=e.arrayName,o=e.itemPath;a.getValue(t,n,[]).forEach((function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,i=e.item,o=e.itemPath,s=a.getValue(i,o);if(void 0!==s){var u=a.getValue(i,"qDef.cId");u||(u=a.generateId(),a.setValue(i,"qDef.cId",u));var l=Q(n,r,u);a.setValue(t,l,s),a.setValue(i,o,void 0)}}({properties:t,quarantineName:r,arrayName:i,item:e,itemPath:o})}))}function te(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,i=e.arrayName,o=e.itemPath;a.getValue(t,n,[]).forEach((function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,i=e.item,o=e.itemPath,s=a.getValue(i,"qDef.cId");if(s){var u=Q(n,r,s),l=a.getValue(t,u);void 0!==l&&(a.setValue(i,o,l),a.setValue(t,u,void 0))}}({properties:t,quarantineName:r,arrayName:i,item:e,itemPath:o})}))}var ne={quarantine:function(e){ee({properties:e,arrayPath:"qHyperCubeDef.qMeasures",quarantineName:"conditionalColoring",arrayName:"measures",itemPath:"qDef.conditionalColoring"})},unquarantine:function(e){te({properties:e,arrayPath:"qHyperCubeDef.qMeasures",itemPath:"qDef.conditionalColoring",arrayName:"measures",quarantineName:"conditionalColoring"})}},re={quarantine:function(e){ee({properties:e,arrayPath:"qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"measures",itemPath:"qCalcCondition"}),ee({properties:e,arrayPath:"qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"dimensions",itemPath:"qCalcCondition"})},unquarantine:function(e){te({properties:e,arrayPath:"qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"measures",itemPath:"qCalcCondition"}),te({properties:e,arrayPath:"qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"dimensions",itemPath:"qCalcCondition"})}};t.default={hypercube:E,colorChart:X,axisChart:Z,quarantineProperty:g,unquarantineProperty:C,quarantineArrayProp:ee,unquarantineArrayProp:te,conditionalColoring:ne,conditionalShow:re}}])}(iw);var ow=m(iw.exports);var aw={onChangeCalcCond:function(e){var t,n,r=null==e?void 0:e.qHyperCubeDef,i=null==e||null===(t=e.qUndoExclude)||void 0===t||null===(n=t.box)||void 0===n?void 0:n.qHyperCubeDef;r&&i&&(i.qCalcCond=r.qCalcCond,i.qCalcCondition=r.qCalcCondition)}},sw="maxCount",uw="size";function lw(e){return!(e.bins&&e.bins.auto)}function cw(e){return lw(e)&&e.bins.binMode===sw}function fw(e){var t=e.translator,n=e.anything.sense.theme;return{type:"items",component:"accordion",items:{data:{uses:"data",items:{dimensions:{translation:"Common.Fields",alternativeTranslation:"properties.alternative.fields",items:{dimensionLimits:{show:!1,items:{otherMode:{readOnly:!1},otherSortMode:{show:function(e){return"OTHER_COUNTED"===nv(e,"qOtherTotalSpec.qOtherMode")}},otherCounted:{show:function(e){return"OTHER_COUNTED"===nv(e,"qOtherTotalSpec.qOtherMode")}},otherLimitMode:{show:function(e){var t=nv(e,"qOtherTotalSpec.qOtherMode");return"OTHER_ABS_LIMITED"===t||"OTHER_REL_LIMITED"===t}},otherLimit:{show:function(e){var t=nv(e,"qOtherTotalSpec.qOtherMode");return"OTHER_ABS_LIMITED"===t||"OTHER_REL_LIMITED"===t}},calculatedAgainstMessage:{show:!0,label:function(){var e=t.get("properties.histogram.staticMeasureName");return t.get("Properties.DimensionLimits.CalculatedAgainst",e)}}}},others:{show:!1,items:{suppressOther:{defaultValue:!0}}}}}}},bins:{translation:"Visualization.Histogram.Bins",type:"items",component:"items",items:{auto:{ref:"bins.auto",translation:"Visualization.Histogram.Binning",component:"switch",type:"boolean",defaultValue:!0,undefinedValue:!1,options:[{value:!0,translation:"Visualization.Histogram.Binning.Auto"},{value:!1,translation:"Visualization.Histogram.Binning.Custom"}]},autoMessage:{component:"text",translation:"Visualization.Histogram.Binning.AutoDescription",show:function(e){return!lw(e)}},mode:{ref:"bins.binMode",type:"string",component:"dropdown",options:[{value:sw,translation:"Visualization.Histogram.Binning.NumberOfBinsOption"},{value:uw,translation:"Visualization.Histogram.Binning.BarWidthOption"}],defaultValue:sw,show:function(e){return lw(e)}},binCount:{ref:"bins.binCount",type:"number",expression:"optional",expressionType:"ValueExpression",translation:"Visualization.Histogram.Binning.BinCount",defaultValue:"",convertFunctions:{get:function(e,t,n){var r=n.properties.bins.binCount;return vx.isEmpty(r)?vx.getDerivedBinCount(n.layout):e(null)||""},set:function(e,t,n){t(n.type,e,void 0)}},show:cw},binMessage:{component:"text",translation:"Visualization.Histogram.Binning.BinCountRounding",show:function(e){var t=nv(e,"bins.binCount"),n="object"===r(t);return cw(e)&&!vx.isEmpty(t)&&!n&&!yx(t)&&t>0}},minBinMessage:{component:"text",translation:"Visualization.Histogram.Binning.BinCountMin",show:function(e){var t=nv(e,"bins.binCount");return!!(cw(e)&&!vx.isEmpty(t)&&t<=0)}},binSize:{ref:"bins.binSize",type:"number",expression:"optional",expressionType:"ValueExpression",defaultValue:10,show:function(e){return lw(e)&&e.bins.binMode===uw},translation:"Visualization.Histogram.Binning.BinSize"},offset:{ref:"bins.offset",type:"number",expression:"optional",expressionType:"ValueExpression",show:function(e){return lw(e)&&e.bins.binMode===uw},translation:"Visualization.Histogram.Binning.Offset"},distinct:{ref:"bins.countDistinct",type:"boolean",defaultValue:!1,component:"checkbox",translation:"Visualization.Histogram.CountDistinct"}}},addons:{type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond",change:aw.onChangeCalcCond}}},refLines:{uses:"reflines",items:{colorBackground:{show:!1}}}}},settings:{uses:"settings",items:{simpleLabels:{items:{labels:{items:{header:{show:function(e,t,n){var r;return null===(r=n.properties.qHyperCubeDef.qDimensions)||void 0===r?void 0:r.length}},pointLabels:{component:"checkbox",ref:"dataPoint.showLabels",type:"boolean",translation:"Simple.Label.Value",show:function(e,t,n){var r;return null===(r=n.properties.qHyperCubeDef.qDimensions)||void 0===r?void 0:r.length}},dimensionTitle:{component:"checkbox",ref:"dimensionAxis.show",type:"string",translation:"Simple.Label.Dimension.Hide",defaultValue:"all",show:function(e,t,n){var r;return null===(r=n.properties.qHyperCubeDef.qDimensions)||void 0===r?void 0:r.length},convertFunctions:{get:function(e,t,n){return"labels"===n.properties.dimensionAxis.show||"none"===n.properties.dimensionAxis.show},set:function(e,t,n,r){r.properties.dimensionAxis.show=e?"labels":"all"}}},measureTitle:{component:"checkbox",ref:"measureAxis.show",type:"string",translation:"Simple.Label.Measure.Hide",defaultValue:"all",show:function(e,t,n){var r;return null===(r=n.properties.qHyperCubeDef.qDimensions)||void 0===r?void 0:r.length},convertFunctions:{get:function(e,t,n){return"labels"===n.properties.measureAxis.show||"none"===n.properties.measureAxis.show},set:function(e,t,n,r){r.properties.measureAxis.show=e?"labels":"all"}}}}}}},presentation:{type:"items",translation:"properties.presentation",items:{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:function(e){return e.gridlines&&!e.gridlines.auto}}}},showLabels:{ref:"dataPoint.showLabels",type:"boolean",translation:"properties.dataPoints.labelmode",component:"switch",defaultValue:!1,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],snapshot:{tid:"property-dataPoints"}}}},colors:{translation:"properties.colors",type:"items",items:{colors:{classification:{section:"color",tags:["simple"]},type:"items",items:{barColor:{ref:"color.bar.paletteColor",translation:"properties.histogram.barColor",type:"object",component:"color-picker",dualOutput:!0,defaultValue:function(){var e=n.getDataColorSpecials().primary,t=n.getDataColorPickerPalettes()[0].colors,r=t.indexOf(e);return{index:-1===r?Math.min(6,t.length-1):r}}}}}}},measureAxis:{uses:"axis.picasso.measureAxis",items:{label:{type:"string",expression:"optional",expressionType:"StringExpression",ref:"measureAxis.label",defaultValue:"",translation:"Common.Label",placeholderTranslation:"Visualization.Histogram.MeasureAxisLabel"}}},dimensionAxis:{uses:"axis.picasso.dimensionAxis",items:{othersGroup:{items:{label:{show:!1}}}}}}}}}}var hw={type:"items",component:"accordion",items:{data:{uses:"data",items:{dimensions:{translation:"Common.Fields"}}}}};var dw={getExportRawDataOptions:function(e,t,n){return e.addItem({translation:"contextMenu.export",tid:"export",select:function(){n.show(t.model,"/qUndoExclude/box/qHyperCubeDef")}}),Promise.resolve()}};function pw(e){var t;if(null!==(t=e.anything)&&void 0!==t&&t.sense)return{definition:fw(e),softDefinition:hw,support:{cssScaling:!1,snapshot:!0,export:!0,exportData:!0,sharing:!0,viewData:!0},importProperties:function(t,n,r,i){var o=qy(e);r.mapProperties();var a={defaultDimension:r.getDefaultDimensionProperties(),defaultMeasure:r.getDefaultMeasureProperties()};return ow.hypercube.importProperties({exportFormat:t,initialProperties:n,dataDefinition:o,defaultPropertyValues:a,hypercubePath:i})},exportProperties:function(e,t,n){return ow.hypercube.exportProperties({propertyTree:e,hyperCubePath:t,viewDataMode:n})},requireNumericDimension:!0,exportTableProperties:function(e){return ow.hypercube.exportProperties({propertyTree:e,hypercubePath:"qUndoExclude.box"})},getExportRawDataOptions:dw.getExportRawDataOptions}}return function(t){!function(e){if(e&&e.get&&e.add){var t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(v).forEach((function(t){e.add(v[t])}))}}(t.translator);var n=ky(),r=qy(t);return{qae:{properties:Sy,data:{targets:[r]}},ext:pw(t),component:function(){var t,r,i,a,s,u,l=e.useConstraints(),f=e.useElement(),h=(t=e.useApp(),r=e.useAppLayout(),i=e.useDeviceType(),a=e.useOptions(),s=e.useTheme(),u=e.useTranslator(),e.useMemo((function(){return{app:t,appLayout:r,deviceType:i,options:a,theme:s,translator:u}}),[t,r,a.direction,a.freeResize,u.language(),s.name(),i])),d=function(){var t=e.useConstraints(),n=c(e.useState(!1),2),r=n[0],i=n[1],o=c(e.useState(!1),2),a=o[0],s=o[1],u=!!e.useLayout().qSelectionInfo.qInSelections,l=c(e.useState((function(){return{toggle:function(){s((function(e){return!e}))}}})),1)[0];return e.useEffect((function(){t&&i(!t.select&&!t.active)}),[t]),e.useAction((function(){return{key:"lasso",label:"Lasso",icon:My,hidden:!r||!u,active:a,action:function(){s((function(e){return!e}))}}}),[u,a,r]),l.enabled=function(){return r},l.active=function(){return a},l}(),p=e.useModel(),m=e.useSelections(),g=e.useStaleLayout(),v=e.useRenderState(),b=c(e.useState(),2),x=b[0],w=b[1];e.useEffect((function(){var e=y(f),t=new rw(p),r=new nw({$element:e,backendApi:t,environment:h,lasso:d,picasso:n,selectionsApi:m,renderState:v});return w(r),function(){r.destroy()}}),[]);var k,M=c(e.usePromise(o(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(x){e.next=2;break}return e.abrupt("return");case 2:return x.updateEnvironment(h),x.updateConstraints(l),e.next=6,x.updateData(g);case 6:return e.next=8,x.paint();case 8:case"end":return e.stop()}}),e)}))),[g,x,h]),2)[1];if(M)throw M;!function(t){var n=e.useRect(),r=e.useOptions(),i=e.useConstraints(),a=c(e.usePromise(o(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:return t.updateConstraints(i),t.options=r,e.next=6,t.resize();case 6:case"end":return e.stop()}}),e)}))),[n.width,n.height]),2)[1];if(a)throw a}(x),k=x,e.onTakeSnapshot((function(e){if(k)return k.setSnapshotData(e)})),e.useImperativeHandle((function(){return{getViewState:function(){if(k)return k.getViewState()}}}),[k])}}}}));
24
+ !function(t,n){e.exports=n()}(0,(function(){return function(e,t){if(!e||isNaN(+t))return t;var n,r,i,o,a,s,u,l,c,f,h=e.length,d=e.search(/[0-9\-\+#]/),p=d>0?e.substring(0,d):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),y=h-g,v=e.substring(y,y+1),b=y+("."===v||","===v?1:0),x=g>0?e.substring(b,h):"";if(n=(t="-"===(e=e.substring(d,b)).charAt(0)?-t:+t)<0?t=-t:0,i=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",o=r&&r[1]&&r[0]||",",e=e.split(i),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(l=t.split("."))[1]||l[1]&&l[1].length<=s)&&(t=(+t).toFixed(s+1)),c=e[0].split(o),e[0]=c.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;l[0].length<e[0].length-a;)l[0]="0"+l[0];else 0==+l[0]&&(l[0]="");if((t=t.split("."))[0]=l[0],u=c[1]&&c[c.length-1].length){for(m="",y=(f=t[0]).length%u,h=f.length,b=0;b<h;b++)m+=f.charAt(b),!((b-y+1)%u)&&b<h-u&&(m+=o);t[0]=m}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),p+(n?"-":"")+r+x}}))}));function Ce(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}var Ee={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"},Ae=/%$/,Te=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,Ne=/^\(oct\)/i,Re=/^\(dec\)/i,Oe=/^\(hex\)/i,Ie=/^\(bin\)/i,Pe=/^\(rom\)/i,Le=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,je=/#|0/g;function ze(e,t,n,r){return e=e.toString(t),n[1]===n[1].toUpperCase()&&(e=e.toUpperCase()),e.length-e.indexOf(".")>10&&(e=e.slice(0,e.indexOf(".")+11)),e.replace(".",r||".")}function Fe(e,t){for(var n,r="",i=Number(String(e).slice(-3)),o=(e-i)/1e3,a=[0,1,4,5,9,10,40,50,90,100,400,500,900].reverse(),s=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();i>0;)for(n=0;n<a.length;n++)if(a[n]<=i){r+=s[n],i-=a[n];break}for(n=0;n<o;n++)r="M".concat(r);return t[1]!==t[1].toUpperCase()&&(r=r.toLowerCase()),r}function He(e,t,n){var r;return Te.test(t)?e=ze(e,Number(/\d{2}/.exec(t)[0]),t,n):Ne.test(t)?e=ze(e,8,t,n):Re.test(t)?e=ze(e,10,t,n):Oe.test(t)?e=ze(e,16,t,n):Ie.test(t)?e=ze(e,2,t,n):Pe.test(t)&&(r="",e<0&&(r="-",e=-e),e=0===(e=Math.floor(e))?"0":e<=5e5?r+(e=Fe(e,t)):t+r+e.toExponential(0)),e}function Be(e,t,n){var r=Ce(e);return n?r:new RegExp(r||"",t)}function Ve(e,t){return t&&(t=Ce(t)),e&&(e=Ce(e)),new RegExp("(?:[#0]+".concat(e,")?[#0]+(?:").concat(t,"[#0]+)?"))}function We(e,t){if(!e||!e.qNumericalAbbreviation)return Ee;var n={};return e.qNumericalAbbreviation.split(t).forEach((function(e){var t=e.split(":");2===t.length&&(n[t[0]]=t[1])})),n}function Ue(e,t,n){var r,i,o,a,s,u,l,c,f,h=e.pattern;h.indexOf("A")>=0&&(h=h.replace("A",""),e.abbreviate=!0),f=Ve(t,n),a=(o=(o=h.match(f))?o[0]:"")?h.substr(0,h.indexOf(o)):h,s=o?h.substring(h.indexOf(o)+o.length):"",o||(o=h?"#":"##########"),t&&t===n&&(i=(r=o.split(n)).pop(),o=r.join("")+n+i,t=""),u=t,t=/,/.test(n)?"¤":",",u&&(o=o.replace(Be(u,"g"),t)),l=n,n=".",l&&(o=o.replace(Be(l,"g"),n)),c=(c=o.match(/#/g))?c.length:0;var d,p=h.split(l);p[1]&&(d=p[1].match(je)),e.prefix=a||"",e.postfix=s||"",e.pattern=h,e.maxPrecision=d?d.length:2,e.percentage=Ae.test(h),e.numericPattern=o||"",e.numericRegex=new RegExp("".concat(Be(t,null,!0),"|").concat(Be(n,null,!0)),"g"),e.groupTemp=u,e.decTemp=l,e.t=t,e.d=n,e.temp=c}var $e=function(){function e(t,n,r,o,a){i(this,e),this.localeInfo=t,this.pattern=n,this.thousandDelimiter=r||",",this.decimalDelimiter=o||".",this.type=a||"numeric",this.patternSeparator=";",this.abbreviations=We(t,this.patternSeparator),this.prepare()}return a(e,[{key:"clone",value:function(){var t=new e(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return t.subtype=this.subtype,t}},{key:"format",value:function(e,t,n,r){return this.prepare(t,n,r),this.formatValue(e)}},{key:"prepare",value:function(e,t,n){var r;void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===n&&(n=this.decimalDelimiter),e?(this._prepared={positive:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},negative:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},zero:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""}},r=this._prepared,e=e.split(this.patternSeparator),r.positive.pattern=e[0],r.negative.pattern=e[1],r.zero.pattern=e[2],Le.test(e[0])&&(r.positive.isFunctional=!0),e[1]?Le.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?Le.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1,r.positive.isFunctional||Ue(r.positive,t,n),r.negative&&!r.negative.isFunctional&&Ue(r.negative,t,n),r.zero&&!r.zero.isFunctional&&Ue(r.zero,t,n)):this._prepared={pattern:!1}}},{key:"formatValue",value:function(e){var t,n,r,i,o,a,s,u,l,c=this._prepared,f="",h="",d=e;if(isNaN(e))return"".concat(d);if(e=+e,!1===c.pattern)return e.toString();if(0===e&&c.zero)return(c=c.zero).pattern;if(e<0&&c.negative?(c=c.negative,e=-e):c=c.positive,o=c.d,a=c.t,c.isFunctional)e=He(e,c.pattern,o);else{if(c.percentage&&(e*=100),c.abbreviate){var p,m,g=Object.keys(this.abbreviations).map((function(e){return parseInt(e,10)})).sort((function(e,t){return e-t})),y=g[0];for(s=0,n=Number(Number(e).toExponential().split("e")[1]);y<=n&&s<g.length;)y=g[++s];s>0&&(p=g[s-1]),p&&n>0&&p>0?m=p:(n<0&&p<0||!p)&&(y<0&&y-n<=c.maxPrecision?m=y:p<=n&&!(y>0&&-n<=c.maxPrecision)&&(m=p)),m&&(f=this.abbreviations[m],e/=Math.pow(10,m))}if(r=Math.abs(e),t=c.temp,l=(u=c.numericPattern).split(o)[1],"I"===this.type&&(e=Math.round(e)),i=e,l||"#"!==u.slice(-1)[0])if(r>=1e15||r>0&&r<=1e-14)e=r?r.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{var v=Number(e.toFixed(Math.min(20,l?l.length:0)).split(".")[0]),b=u.split(o)[0];if(e=De(b+=o,v)||"0",l){var x=Math.max(0,Math.min(14,l.length)),w=l.replace(/#+$/,"").length,k=("I"===this.type?0:r%1).toFixed(x).slice(2).replace(/0+$/,"");for(s=k.length;s<w;s++)k+="0";k&&(e+=o+k)}else 0===v&&(i=0)}else if(r>=Math.pow(10,t)||r<1||r<1e-4)0===e?e="0":r<1e-4||r>=1e20?(e=(e=i.toExponential(Math.max(1,Math.min(14,t))-1)).replace(/\.?0+(?=e)/,""),h=""):(e=e.toPrecision(Math.max(1,Math.min(14,t)))).indexOf(".")>=0&&(e=(e=e.replace(e.indexOf("e")<0?/0+$/:/\.?0+(?=e)/,"")).replace(".",o));else{for(u+=o,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(r)/Math.log(10)))),s=0;s<t;s++)u+="#";e=De(u,e)}e=e.replace(c.numericRegex,(function(e){return e===a?c.groupTemp:e===o?c.decTemp:""})),i<0&&!/^-/.test(e)&&(e="-".concat(e))}return c.prefix+e+h+f+c.postfix}}],[{key:"getStaticFormatter",value:function(){return{prepare:function(){},formatValue:function(e){return"".concat(e)}}}}]),e}();function Ye(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return c($e,t)}function Ke(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.size,o=void 0===i?5e3:i,a=r.multipleArguments,s=void 0!==a&&a,u=r.toKey,l=void 0===u?function(e){return e}:u,c=Object.create(null),f=Object.create(null),h=0,d=0;return(t=s?function(){return n=l.apply(void 0,arguments),t.has(n)?t.get(n):t.set(n,e.apply(void 0,arguments))}:function(r){return n=l(r),t.has(n)?t.get(n):t.set(n,e(r))}).set=function(e,t){return h>=o&&(delete c[f[d]],delete f[d],h--,d++),c[e]=t,f[h]=e,h++,t},t.get=function(e){return c[e]},t.has=function(e){return e in c},t.clear=function(){c=Object.create(null),f=Object.create(null),h=0,d=0},t.size=function(){return h},t}function Xe(e,t,n,r,i){var o=Ye(i,e,t,n,r),a=Ke(o.formatValue.bind(o),{toKey:function(e){return isNaN(e)?e:+e}});function s(e){return a(e)}return s.format=function(e,t,n,r){return a.clear(),o.format(t,e,n,r)},s.pattern=function(e){return e&&(a.clear(),o.pattern=e,o.prepare()),o.pattern},s}var Ge={AUTO:"U",INTEGER:"I",NUMBER:"R",FIXED_TO:"F",MONEY:"M",DATE:"D",TIME:"T",DATE_TIME:"TS",INTERVAL:"IV"},Je=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Ze=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Qe=["January","February","March","April","May","June","July","August","September","October","November","December"],et=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],tt=86400;function nt(e,t){for(var n=e.length;n<t;n++)e="0".concat(e);return e}function rt(e,t){var n=e.getUTCHours(),r=e.getUTCDay()-1;return t&&((n%=12)||(n=12)),r<0&&(r=6),{year:e.getUTCFullYear(),month:e.getUTCMonth(),day:r,date:e.getUTCDate(),h:n,m:e.getUTCMinutes(),s:e.getUTCSeconds(),f:e.getUTCMilliseconds(),t:e.getUTCHours()>=12?"pm":"am"}}function it(e){var t=e.toString().split(".");return t[1]?t=Number("0.".concat(t[1])):0}function ot(e){var t=e,n=24*it(t),r=60*it(n),i=60*it(r),o=1e3*it(i);return{d:Math.floor(t),h:Math.floor(n),m:Math.floor(r),s:Math.floor(i),f:Math.round(o)}}function at(e,t){var n,r=ot(e),i=r.d,o=r.h,a=r.m,s=r.s,u=r.f,l=0;/w+|t+/gi.test(t)&&(n=new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,Math.round(tt*(e-Math.floor(e))))),isNaN(n.getTime())&&(n=null)),/D+/gi.test(t)||(o+=24*i),/h+/gi.test(t)||(a+=60*o),/m+/gi.test(t)||(s+=60*a),/w+/gi.test(t)&&(l=n?n.getDay()-1:0)<0&&(l=6);var c="";return n&&(c=n.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:l,date:i,h:o,m:a,s:s,f:u,t:c}}function st(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:nt("".concat(t.year).slice(-2),2),YYY:nt("".concat(t.year).slice(-3),3),def:function(e){return nt("".concat(t.year),e.length)}},"M+":{M:t.month+1,MM:nt("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:nt("".concat(t.day),2),WWW:e.locale_days_abbr[t.day],def:e.locale_days[t.day]},"D+|d+":{D:t.date,def:function(e){return nt("".concat(t.date),e.length)}},"h+|H+":{h:t.h,def:function(e){return nt("".concat(t.h),e.length)}},"m+":{m:t.m,def:function(e){return nt("".concat(t.m),e.length)}},"s+|S+":{s:t.s,def:function(e){return nt("".concat(t.s),e.length)}},"f+|F+":{def:function(e){var n="".concat(t.f),r=e.length-n.length;if(r>0)for(var i=0;i<r;i++)n+="0";else r<0&&(n=n.slice(0,e.length));return n}},"t{1,2}|T{1,2}":{def:function(e){var n=t.t;return e[0].toUpperCase()===e[0]&&(n=n.toUpperCase()),n=n.slice(0,e.length)}}}}var ut=function(){function e(t,n,r){i(this,e);var o,a=t||{};a.qCalendarStrings||(a.qCalendarStrings={qLongDayNames:Je,qDayNames:Ze,qLongMonthNames:Qe,qMonthNames:et}),this.localeInfo=a,this.locale_days=a.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=a.qCalendarStrings.qDayNames.slice(),this.locale_months=a.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=a.qCalendarStrings.qMonthNames.slice(),n||(n=(s(o={},Ge.TIME,a.qTimeFmt||"hh:mm:ss"),s(o,Ge.DATE,a.qDateFmt||"YYYY-MM-DD"),s(o,Ge.DATE_TIME,a.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"),o)[r]),this.pattern=n}return a(e,[{key:"clone",value:function(){var t=new e(this.localeInfo,this.pattern);return t.subtype=this.subtype,t}},{key:"format",value:function(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+]|\[|]/g,"");var n,r=/t+/gi.test(t);e instanceof Date?n=rt(e,r):(e<0&&(e=-e,t="-".concat(t)),n=at(e,t));var i=st(this,n),o=[];for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&o.push(a);var s=new RegExp(o.join("|"),"g");return t.replace(s,(function(e){var t,n,r;for(n in i)if(Object.prototype.hasOwnProperty.call(i,n)&&(t=new RegExp(n)).test(e))break;if(!t)return"";for(var o in i[n])if(o===e||o.toLowerCase()===e){void 0===(r=i[n][o])&&(r=i[n][o.toLowerCase()]);break}return void 0===r&&(r=i[n].def),"function"==typeof r&&(r=r(e)),r}))}}]),e}();function lt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return c(ut,t)}var ct=864e5;function ft(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(ct*(e-Math.floor(e)))))}function ht(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",r=lt(arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,e,t),i=Ke(r.format.bind(r),{toKey:function(e){return"object"===n(e)&&"function"==typeof e.getTime?e.getTime():e}});function o(e){return t!==Ge.INTERVAL?ft(e):e}function a(e){return e=o(e),i(e)}return a.format=function(e,t){return i.clear(),t=o(t),r.format(t,e)},a.locale=function(o){return r=lt(o,e,t),i=Ke(r.format.bind(r),{toKey:function(e){return"object"===n(e)?e.getTime():e}}),this},a.qtype=function(e){return void 0!==e&&(t=e,i.clear()),t},a}function dt(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return ht(e.qNumFormat.qFmt,e.qNumFormat.qType,t);var n="#",r=t&&void 0!==t.qThousandSep?t.qThousandSep:",",i=t&&void 0!==t.qDecimalSep?t.qDecimalSep:".",o="U",a=e&&!!e.qIsAutoFormat;return e&&e.qNumFormat?(n=e.qNumFormat.qFmt||n,r=e.qNumFormat.qThou||r,i=e.qNumFormat.qDec||i,o=e.qNumFormat.qType||o,a=a&&-1===["M"].indexOf(e.qNumFormat.qType)):a=!0,(a||"U"===o)&&(n="#".concat(i,"##A"),o="U"),Xe(n,r,i,o,t)}function pt(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.meta,r=t.id,i=t.key,o=t.localeInfo,a=t.fieldExtractor,s=t.value,u=t.type,l=t.sourceField,c=s||("dimension"===u?function(e){return e.qElemNo}:function(e){return e.qValue}),f=function(e){return e.qText||""},h="dimension"===u?"first":"avg",d=dt(n,o),p={id:function(){return r},key:function(){return i},raw:function(){return n},title:function(){return n.qFallbackTitle||n.label},type:function(){return u},origin:function(){return l},items:function(){return e||(e=a(p)),e},min:function(){return n.qMin},max:function(){return n.qMax},value:c,label:f,reduce:h,reduceLabel:"dimension"===u?"first":function(e,t){return d(t)},formatter:function(){return d},tags:function(){return n.qTags}};return p}function mt(e,t,n,r,i){return(t[e]||[]).map((function(t,o){var a="".concat(r?"".concat(r,"/"):"").concat(e,"/").concat(o),s={instance:pt(A({id:"".concat(n?"".concat(n,"/"):"").concat(a),key:a,meta:t},i))};return s.attrDims=mt("qAttrDimInfo",t,n,a,A({},i,{value:function(e){return e.qElemNo},type:"dimension"})),s.attrExps=mt("qAttrExprInfo",t,n,a,A({},i,{value:function(e){return e.qNum},type:"measure"})),s.measures=mt("qMeasureInfo",t,n,a,A({},i,{value:function(e){return e.qValue},type:"measure"})),s}))}function gt(){var e,n,r,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=i.key,a=i.data,s=i.config,u=void 0===s?{}:s,l={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},c=a;if(!c)throw new Error('Missing "data" input');if(!c.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');var f=gt.util,d={cache:l,cube:c,localeInfo:u.localeInfo,fieldExtractor:null,pages:null,hierarchy:function(){return null},virtualFields:u.virtualFields},p={key:function(){return o},raw:function(){return c},field:function(e){return ce(e,d)},fields:function(){return l.fields.slice()},extract:function(e){return d.extractor(e,p,l,f)},hierarchy:function(e){return d.hierarchy(e,p,l,f)},_cache:function(){return l}};"K"===c.qMode||"T"===c.qMode||!c.qMode&&c.qNodesOnDim?(d.extractor=Se,d.hierarchy=_e,d.pages="K"===c.qMode?c.qStackedDataPages:c.qTreeDataPages):"S"===c.qMode?(d.extractor=O,d.pages=c.qDataPages,d.hierarchy=_e):d.extractor=function(){return[]},d.fieldExtractor=function(e){return d.extractor({field:e},p,l,f)};var m="S"===c.qMode?function(e){return e.qElemNumber}:void 0,g="S"===c.qMode?function(e){return e.qNum}:void 0;return(e=l.wrappedFields).push.apply(e,h(mt("qDimensionInfo",c,o,"",A({},d,{value:m,type:"dimension"})))),(n=l.wrappedFields).push.apply(n,h(mt("qMeasureInfo",c,o,"",A({},d,{value:g,type:"measure"})))),l.fields=l.wrappedFields.map((function(e){return e.instance})),function e(t){t.forEach((function(t){l.allFields.push(t.instance),e(t.measures),e(t.attrDims),e(t.attrExps)}))}(l.wrappedFields),(u.virtualFields||[]).forEach((function(e){var n=p.field(e.from),r=pt(t({meta:n.raw(),id:"".concat(o,"/").concat(e.key),sourceField:n,fieldExtractor:function(e){return d.extractor({field:e},p,l,f)},key:e.key,type:n.type(),localeInfo:d.localeInfo,value:n.value},e.override||{}));l.virtualFields.push(r)})),(r=l.allFields).push.apply(r,h(l.virtualFields)),p}var yt=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],vt=/\/qDimensionInfo(?:\/(\d+))?/,bt=/\/qMeasureInfo\/(\d+)/,xt=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,wt=/\/qAttrExprInfo\/(\d+)/,kt=/\/?qHyperCube/,Mt=/\/?qTreeData/,_t=function(e){return"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14))},St=function(e){return"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13))};function qt(e,t){var n=e,r=-1,i=-1,o="",a=function(e){return e};kt.test(e)?(o="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),a=_t):Mt.test(e)&&(o="".concat(n.substr(0,n.indexOf("qTreeData")+9)),a=St);var s=!0;if(vt.test(e)&&(r=+vt.exec(e)[1]),bt.test(e)&&(i=+bt.exec(e)[1]),xt.test(e)){i=-1,r=0;var u=+xt.exec(n)[2];isNaN(u)||(r=u,n=n.replace(/\/\d+$/,"")),s=!1}if(wt.test(e)){var l=i;if(t){i=0;var c=se(o,t);i+=(c.qMeasureInfo||[]).length,r>-1?(i=c.qDimensionInfo.slice(0,r).reduce((function(e,t){return e+t.qAttrExprInfo.length}),i),r=-1):(i=c.qDimensionInfo.reduce((function(e,t){return e+t.qAttrExprInfo.length}),i),i=c.qMeasureInfo.slice(0,l).reduce((function(e,t){return e+t.qAttrExprInfo.length}),i)),i+=+wt.exec(n)[1]}else r>-1?(r=-1,i=+wt.exec(n)[1]):i+=+wt.exec(n)[1]+1}return yt.forEach((function(e){var t=f(e,2),r=t[0],i=t[1];n=n.replace(r,i)})),s&&(n=a(n)),n&&"/"!==n[0]&&(n="/".concat(n)),{measureIdx:i,dimensionIdx:r,path:n}}function Dt(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,i=n.byCells,o=n.primarySource,a=[],s={},u=e.isActive(),l=!1;return e.brushes().forEach((function(e){var t=qt(e.id,r);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){var n=e.brush.ranges();n.length&&(l=!0,s.multiRangeSelectTreeDataValues||(s.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),n.forEach((function(e){return s.multiRangeSelectTreeDataValues.ranges.push({qMeasureIx:t.measureIdx,qDimensionIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})})))}else{if("range"===e.type&&t.measureIdx>-1){var u=e.brush.ranges();u.length&&(l=!0,s.rangeSelectHyperCubeValues||(s.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),u.forEach((function(e){return s.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:t.measureIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})})))}if("range"===e.type&&t.dimensionIdx>-1){var c=e.brush.ranges();c.length&&(l=!0,s.selectHyperCubeContinuousRange||(s.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),c.forEach((function(e){return s.selectHyperCubeContinuousRange.ranges.push({qDimIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!1}})})))}if("value"===e.type&&t.dimensionIdx>-1)if(i)if(r&&r.qHyperCube&&("P"===r.qHyperCube.qMode||"T"===r.qHyperCube.qMode||"K"===r.qHyperCube.qMode)){var f=r.qHyperCube,h=f.qNoOfLeftDims,d=f.qEffectiveInterColumnSortOrder.indexOf(t.dimensionIdx);if(s.selectPivotCells||(s.selectPivotCells={path:t.path,cells:[]}),e.id===o||!o){var p=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)}));(0===h||d>=h)&&h>-1?p.forEach((function(e){s.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:d-h})})):p.forEach((function(e){s.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})})),l=!!s.selectPivotCells.cells.length}}else s.selectHyperCubeCells||(s.selectHyperCubeCells={path:t.path,cols:[]}),s.selectHyperCubeCells.cols.push(t.dimensionIdx),e.id!==o&&(o||s.selectHyperCubeCells.values)||(s.selectHyperCubeCells.values=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)})),l=!!s.selectHyperCubeCells.values.length);else{var m=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)}));l=!!m.length,a.push({params:[t.path,t.dimensionIdx,m,!1],method:"selectHyperCubeValues"})}}})),!l&&u?[{method:"resetMadeSelections",params:[]}]:(s.rangeSelectHyperCubeValues&&a.push({method:"rangeSelectHyperCubeValues",params:[s.rangeSelectHyperCubeValues.path,s.rangeSelectHyperCubeValues.ranges,[],null===(t=n.orMode)||void 0===t||t]}),s.selectHyperCubeContinuousRange&&a.push({method:"selectHyperCubeContinuousRange",params:[s.selectHyperCubeContinuousRange.path,s.selectHyperCubeContinuousRange.ranges]}),s.selectHyperCubeCells&&a.push({method:"selectHyperCubeCells",params:[s.selectHyperCubeCells.path,s.selectHyperCubeCells.values,s.selectHyperCubeCells.cols]}),s.selectPivotCells&&a.push({method:"selectPivotCells",params:[s.selectPivotCells.path,s.selectPivotCells.cells]}),s.multiRangeSelectTreeDataValues&&a.push({method:"multiRangeSelectTreeDataValues",params:[s.multiRangeSelectTreeDataValues.path,s.multiRangeSelectTreeDataValues.ranges]}),a)}function Ct(e){gt.util=e.data("matrix").util,e.data("q",gt),e.formatter("q-number",Xe),e.formatter("q-time",ht)}return Ct.qBrushHelper=Dt,Ct.selections=Dt,Ct}()}(kb);var Mb=kb.exports,_b={brushInterceptors:{DIM_VALUE_NULL:-2,DIM_VALUE_TOTAL:-3,brushOnlyOne:function(e,t){var n=e.brushes().filter((function(e){return"value"===e.type})),r=[];n.length&&n.forEach((function(e){r=r.concat(e.brush.values().map((function(t){return{key:e.id,value:t}})))}));return r.concat(t)},filterValues:function(e,t){var n,r,i=this,o=[],a=0,s=[];return t.forEach((function(t){t.value!==i.DIM_VALUE_NULL&&t.value!==i.DIM_VALUE_TOTAL&&(r=function(e,t){var n=t.key.indexOf("qHyperCube")+"qHyperCube".length,r=t.key.substr(0,n),i=t.key.substr(n+1);return e.dataset(r).field(i)}(e,t),(n=r&&r.raw()).qLocked?(o.push(n),a++):s.push({key:t.key,value:t.value}))})),{items:s,itemsAreLocked:a>0&&a===t.length,lockedFields:o}}}};var Sb={data:["elemNo"],contexts:["select"],startOnEmptySelection:!0,style:{active:{strokeWidth:2,stroke:"#333"},inactive:{opacity:.3}}};function qb(e){if(!e||!e.chartInstance||!e.selectionsApi)throw Error("Selections-handler: Missing input");var t=e.chartInstance,n=e.selectionsApi,r=e.dataPaths||[""],i=e.selectPaths,o=e.lasso,a=[],s={propertiesToRestore:{}},u=!1,l=function(e,t,n){function r(){}return r.update=function(e,r,i){t.isActive()||t.begin(n),Mb.qBrushHelper(i).forEach((function(e){t.select(e)}))},r.toggleValues=function(r,i,o){var a=_b.brushInterceptors.filterValues(e,r),s=a.items;return t.isActive()||a.itemsAreLocked||!(o||s.length>0)||(t.begin(n),i.start(),i.emit("update",[],[])),s},r}(t,n,i),c={},f=!1;function h(e){16===e.keyCode&&e.shiftKey!==f&&(f=e.shiftKey,o.toggle())}function d(e){var t=e.keyCode;27===t?n.cancel():13===t&&n.confirm()}function p(){a.forEach((function(e){e.listeners.update=function(t,n){e.sleep||l.update(t,n,e.brush)},e.brush.on("update",e.listeners.update),e.brush.on("start",e.listeners.start)}))}function m(){a.forEach((function(e){e.brush.removeListener("update",e.listeners.update),e.brush.removeListener("start",e.listeners.start)}))}return n.on("cleared",(function(){a.forEach((function(e){e.brush.clear(),e.dependentComponents.forEach((function(e){var n=t.component(e.id);n&&n.emit(e.clear)}))}))})),c.setUp=function(e){c.tearDown();var t=this.setUpBrush(e);return u&&p(),t},c.setUpBrush=function(e){var n=jv(!0,{},Sb,e),i={on:"tap",action:function(t){return t.ctrlKey||e.isSingleSelect?"set":"toggle"},contexts:n.contexts,data:n.data,globalPropagation:"stop"},o={context:n.contexts[0],data:n.data,style:n.style},s=function(e,t){return{brush:t.brush(e.contexts[0]),listeners:{},dependentComponents:[],id:e.contexts[0]}}(n,t);return s.listeners.toggle=function(e){if(!u)return[];var i=function(){var e=[],n=r.map((function(e){return t.dataset(e).fields().filter((function(e){return"dimension"===e.type()}))}));n=[].concat.apply([],n);for(var i=0;i<n.length;i++)n[i].raw().qLocked&&e.push(n[i].raw());return{fields:e,areAllFieldsLocked:e.length&&e.length===n.length}}();return n.startOnEmptySelection&&0===e.length&&i.areAllFieldsLocked?[]:l.toggleValues(e,s.brush,n.startOnEmptySelection)},s.brush.intercept("toggle-values",s.listeners.toggle),s.brush.intercept("add-values",s.listeners.toggle),s.brush.intercept("remove-values",s.listeners.toggle),s.brush.intercept("set-values",s.listeners.toggle),s.listeners.start=function(){a.length>1&&a.forEach((function(e){e!==s&&e.brush.end()}))},a.push(s),{trigger:i,consume:o}},c.setUpStart=function(){c.tearDown()},c.setUpDone=function(){u&&p()},c.tearDown=function(){u&&m(),a.forEach((function(e){e.brush.removeInterceptor("toggle-values",e.listeners.toggle),e.brush.removeInterceptor("add-values",e.listeners.toggle),e.brush.removeInterceptor("remove-values",e.listeners.toggle),e.brush.removeInterceptor("set-values",e.listeners.toggle)})),a=[]},c.pauseEngineCalls=function(e){a.forEach((function(t){t.id===e&&(t.sleep=!0)}))},c.resumeEngineCalls=function(e,t){a.forEach((function(n){n.id===e&&(n.sleep=!1,t&&n.listeners.update([],[]))}))},c.addComponent=function(e,t){a.forEach((function(n){n.id===e&&n.dependentComponents.push(t)}))},c.on=function(){if(!u){u=!0,p(),document.addEventListener("keydown",h),document.addEventListener("keyup",h);var e=function(){a.forEach((function(e){e.brush.end()})),document.removeEventListener("keyup",d),o.active()&&o.toggle()};n.on("deactivated",e),s.unbindDeactivated=function(){n.removeListener("deactivated",e)};var t=function(){document.addEventListener("keyup",d)};n.on("activated",t),s.unbindActivated=function(){n.removeListener("activated",t)}}},c.isOn=function(){return u},c.off=function(){u&&(u=!1,m(),document.removeEventListener("keydown",h),document.removeEventListener("keyup",h),document.removeEventListener("keyup",d),s.unbindActivated(),s.unbindDeactivated())},c.lassoState=function(){return o.active()&&!(e.isLassoDisabled&&e.isLassoDisabled())},c.allFieldsLocked=function(){return e=r.map((function(e){return t.dataset(e).fields().filter((function(e){return"dimension"===e.type()}))})),(e=[].concat.apply([],e)).length&&e.every((function(e){return e.raw().qLocked}));var e},c}var Db=function(){function e(){a(this,e)}return u(e,[{key:"isOn",value:function(){return!1}},{key:"on",value:function(){console.warn("Can not turn on selections on this object")}},{key:"off",value:function(){}}]),e}(),Cb=function(e){return e.selectionsApi?qb(e):new Db};function Eb(e,t,n,r,i){var o=!1;r=r||"tooltip",n=n||["self"];var a=e.brush(r),s={};function u(){o&&e.component(i).emit("hide");o=!1}return s.isOpen=function(){return o},s.closeTooltip=u,s.update=function(){var s=a.brushes(),l=e.getAffectedShapes(r,"and",n,t);s.length>=1?(o=!0,function(t){o=!0;var n={nodes:t};e.component(i).emit("show",{},n)}(l)):u()},s.toggleInterceptor=function(e){if(n.length>1){var t={},r=[];return e.forEach((function(e){t[e.key]||(t[e.key]={}),t[e.key][e.value]||(t[e.key][e.value]=!0,r.push(e))})),r}return e},s}var Ab=function(){return Eb.apply(void 0,arguments)},Tb={formatMeasureValue:function(e,t){if(e.raw().isCustomFormatted)return e.formatter()(t.value.qText);var n=void 0!==t.value.qNum?t.value.qNum:t.value.qValue;return e.formatter()(n)}};var Nb=function(e){return function(t){var n=t.h,i=t.data,o=t.style,a=function(e,t){for(var n=e.chartInstance.dataset(e.dataPath),i=[],o=t.length-5,a=Math.min(5,t.length),s=function(r){var o=t[r],a={rows:[]};if(e.labelData){for(var s=[],u=e.labelData,l=!1,c=0;c<u.length;c++){var f=o.data[u[c]].value;if(-2===f.qElemNo||-2===f.qElemNumber){l=!0;break}s.push(o.data[u[c]].value.qText)}if(l)return{v:void 0};a.header=e.headerResolver(s),a.rows=e.measureRows.map((function(t){var r=o.data;return e.rowResolver(n.field(r[t].source.field),r[t],r)})).filter((function(e){return!!e}));var h=function(e,t){var n,r,i,o=t.data.color,a=null===(n=e.colorService)||void 0===n||null===(r=n.getSettings)||void 0===r?void 0:r.call(n);if(!a||"color"===a.type||!o||!a.fieldType)return;var s=[];e.data.forEach((function(e){var n=t.data[e];n&&s.push(n.value)}));var u=function(e){for(var t=-1,n=0;n<e.length;n++)-3===e[n]&&(t=n);return t}(s),l=e.translator,c=a.label,f=null===(i=t.attrs)||void 0===i?void 0:i.fill,h=-1!==u?l.get("properties.dimensionLimits.others"):o.label;return{color:f,label:c,value:h}}(e,o);h&&a.rows.unshift(h),i.push(a)}},u=0;u<a;u++){var l=s(u);if("object"===r(l))return l.v}o>0&&(i.numberInExcess=o);return i.rowCount=i[0]?i.length*i[0].rows.length:0,i}(e,i),s={h:n,style:o,rtl:"rtl"===e.direction,translator:e.translator};return e.renderer(s,a)}};var Rb="dist-flow-tooltip",Ob="#".concat(Rb);function Ib(){if(!document.querySelector(Ob)){var e=document.createElement("div");e.id=Rb,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 Pb(e){var t=e.key,n=void 0===t?"tooltip":t,r=e.rtl,i=e.fontFamily,o=e.filter;return{show:!0,key:n,type:"tooltip",layout:{displayOrder:3},beforeMount:function(){Ib()},beforeUpdate:function(){Ib()},destroyed:function(){var e;(e=document.querySelector(Ob))&&e.parentElement&&e.childElementCount<1&&e.parentElement.removeChild(e)},settings:{appendTo:function(){return document.querySelector(Ob)},content:e.content,filter:o,extract:function(e){return e.node},direction:r?"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:i,"empty-cells":"show"},cell:{"max-width":"180px","word-break":"break-word","word-wrap":"break-word","overflow-wrap":"break-word",hyphens:"auto"}}}}var Lb=Zv.detectTextDirection;var jb={tooltipKey:"tooltip",data:[""],contexts:["tooltip"],headerResolver:function(e){return e.join(", ")},rowResolver:function(e,t){return{value:Tb.formatMeasureValue(e,t),label:e.title()}},direction:"ltr",renderer:function(e,t){var r=e.h,i=e.style,o=e.translator,a=e.rtl,s=[],u=a?"right":"left";if(t.forEach((function(e){if(e.header){var t=n(n({},i.cell),{},{textAlign:u,fontWeight:"bold",direction:Lb(e.header)});s.push(r("tr",null,r("td",{style:t,colSpan:2},e.header)))}e.rows.forEach((function(e){var t=e.value;if(e.color){var o={display:"inline-block",width:10,height:10,"background-color":e.color,margin:"0 8px"},l=r("div",{style:o});t=a?[e.value,l]:[l,e.value]}var c=a?[":",e.label]:[e.label,":"],f=n(n({},i.cell),{},{textAlign:u,direction:Lb(e.label)}),h=n(n({},i.cell),{},{textAlign:a?"left":"right",direction:Lb(e.value)});s.push(r("tr",null,r("td",{style:f},c),r("td",{style:h},t)))}))})),t.numberInExcess){var l=o.get("Object.ChartTooltip.NMore",t.numberInExcess),c=n(n({},i.cell),{},{textAlign:u,direction:Lb(l)});s.push(r("tr",null,r("td",{style:c,colSpan:2},l)))}return s}};function zb(e,t,n){if(!e)throw Error("Tooltips-handler: Missing input");var r={},i=!1,o={};function a(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 s(){Object.keys(r).forEach((function(e){u(r[e])}))}function u(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 l(){Object.keys(r).forEach((function(e){r[e].action.closeTooltip()}))}function c(){for(var e in l(),r)r[e].brush.clear()}return o.setUp=function(t){var o=jv(!0,{},jb,t);if(!o.componentKey)throw Error("Tooltips-handler.setUp: Missing required input");r[o.contexts[0]]&&i&&u(r[o.contexts[0]]);var s=function(e,t){return{brush:t.brush(e.contexts[0]),action:Ab(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);r[o.contexts[0]]=s,i&&a(s);var l,c=Pb({key:o.tooltipKey,rtl:"rtl"===s.direction,fontFamily:s.theme.getStyle(n,"tooltip","fontFamily"),filter:(l=s.filterShapes,function(e){return l?l(e):function(e){var t=[];return e.forEach((function(e){-1===t.indexOf(e)&&"container"!==e.type&&t.push(e)})),t}(e)}),content:Nb(s,o.dataPath)});return o.chartBuilder.getSettings().components.push(c),{trigger:{on:s.treatAsDesktop?"over":"tap",action:"set",contexts:o.contexts,data:o.data,globalPropagation:"stop"},consume:o.contexts.map((function(e){return{context:e}})),component:c}},o.tearDown=function(){i&&s(),r=[]},o.closeTooltip=l,o.isOn=function(){return i},o.on=function(){i||(i=!0,Object.keys(r).forEach((function(e){a(r[e])})),t&&t.on("mouseleave",c))},o.off=function(){i&&(i=!1,s(),t&&t.off("mouseleave",c),l())},o}var Fb=function(e,t,n){return zb(e,t,n)};var Hb={generateHash:function(e){return function(e){var t=0;if(!e||!e.length)return t;for(var n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t&=t;return t}(JSON.stringify(e))},updateHash:function(e,t){e.qUndoExclude||(e.qUndoExclude={});e.qUndoExclude.hashCode=Hb.generateHash(t)}};var Bb={getDefaultHashDataForHyperCube:function(e,t,n){return function(e,t){var n=[];if(!e.qMeasures)return Promise.resolve(n);return e.qMeasures.forEach((function(e){e.qLibraryId?n.push(function(e,t){return t.getMeasure(e).then((function(e){return e.getProperties().then((function(e){return e.qMeasure.qDef}))}))}(e.qLibraryId,t)):n.push(Promise.resolve())})),Promise.all(n)}(e,n).then((function(e){return{drillLevel:Wb(t),dimensionExpressions:Vb(t),measureExpressions:e}}))}};function Vb(e){return e.qDimensionInfo.map((function(e){return e.qGroupFieldDefs}))}function Wb(e){return function(e){return nv(e,"qDimensionInfo",[])}(e).map((function(e){return e.qGroupPos}))}var Ub={},$b=jv.bind(null,!0);function Yb(e){return null!=e&&!Array.isArray(e)&&"object"===r(e)}var Kb=Array.isArray,Xb=function(e){return void 0===e};function Gb(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function Jb(e,t){var n,r=t.substring(1).split("/").slice(0,-1);return r.forEach((function(t,i){i!==r.length&&(e[(n=+t)||t]=Xb(e[n||t])?Number.isNaN(+n)?{}:[]:e[t],e=e[n||t])})),e}function Zb(e,t){if(Yb(e)&&Yb(t)){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];if(!Zb(e[i],t[i]))return!1}return!0}if(Kb(e)&&Kb(t)){if(e.length!==t.length)return!1;for(var o=0,a=e.length;o<a;o++)if(!Zb(e[o],t[o]))return!1;return!0}return e===t}Ub.generate=function(e,t,n){n=n||"";var r=[];return Object.keys(t).forEach((function(i){var o=function(e){return e&&(e=$b({},{val:e}).val),e}(t[i]),a=e[i],s="".concat(n,"/").concat(i);Zb(o,a)||Gb(t,i)||(Xb(a)?r.push({op:"add",path:s,value:o}):Yb(o)&&Yb(a)?r=r.concat(Ub.generate(a,o,s)):Kb(o)&&Kb(a)?r=r.concat(function(e,t,n){var r,i,o=[],a=e.slice(),s=-1;function u(e,t,n){if(e[n]&&Xb(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(var r=0,i=e.length;r<i;r++)if(e[r]&&e[r].qInfo.qId===t)return r;return-1}if(Zb(t,a))return o;if(null===t[0]||!Xb(t[0])&&Xb(t[0].qInfo))return o.push({op:"replace",path:n,value:t}),o;for(r=a.length-1;r>=0;--r)-1===(s=u(t,a[r]&&a[r].qInfo&&a[r].qInfo.qId,r))?(o.push({op:"remove",path:"".concat(n,"/").concat(r)}),a.splice(r,1)):o=o.concat(Ub.generate(a[r],t[s],"".concat(n,"/").concat(r)));for(r=0,i=t.length;r<i;++r)-1===(s=u(a,t[r]&&t[r].qInfo&&t[r].qInfo.qId))?(o.push({op:"add",path:"".concat(n,"/").concat(r),value:t[r]}),a.splice(r,0,t[r])):s!==r&&(o.push({op:"move",path:"".concat(n,"/").concat(r),from:"".concat(n,"/").concat(s)}),a.splice(r,0,a.splice(s,1)[0]));return o}(a,o,s)):r.push({op:"replace",path:"".concat(n,"/").concat(i),value:o}))})),Object.keys(e).forEach((function(i){Xb(t[i])&&!Gb(e,i)&&r.push({op:"remove",path:"".concat(n,"/").concat(i)})})),r},Ub.apply=function(e,t){t.forEach((function(t){var n,r=Jb(e,t.path),i=t.path.split("/").splice(-1)[0],o=i&&Number.isNaN(+i)?r[i]:r[+i]||r,a=t.from?t.from.split("/").splice(-1)[0]:null;if("add"===t.op||"replace"===t.op)if(Kb(r))"-"===i&&(i=r.length),r.splice(+i,"add"===t.op?0:1,t.value);else if(Kb(o)&&Kb(t.value)){var s=t.value.slice();o.length=0,o.push.apply(o,s)}else Yb(o)&&Yb(t.value)?(n=o,Object.keys(n).forEach((function(e){Object.getOwnPropertyDescriptor(n,e).configurable&&!Gb(n,e)&&delete n[e]})),$b(o,t.value)):r[i]=t.value;else if("move"===t.op){var u=Jb(e,t.from);Kb(r)?r.splice(+i,0,u.splice(+a,1)[0]):(r[i]=u[a],delete u[a])}else"remove"===t.op&&(Kb(r)?r.splice(+i,1):delete r[i])}))},Ub.clone=function(e){return $b({},e)},Ub.createPatch=function(e,t,n){var r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},Ub.updateObject=function(e,t){Object.keys(e).length?Ub.apply(e,Ub.generate(e,t)):$b(e,t)};var Qb=function(){function e(t){a(this,e),this._model=t}var t;return u(e,[{key:"setModel",value:function(e){this._model=e}},{key:"saveSoftProperties",value:function(e,t){if(!this._model)return Promise.resolve(!1);var n=Ub.generate(e,t);return jv(!0,e,t),n&&n.length?(n=n.map((function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}})),this._model.applyPatches(n,!0).then((function(){return!0}))):Promise.resolve(!1)}},{key:"mergeSoftPatches",value:(t=o(regeneratorRuntime.mark((function e(){var t,n,r,i,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._model){e.next=2;break}return e.abrupt("return");case 2:return t=this._model.getProperties(),n=this._model.getEffectiveProperties(),e.next=6,t;case 6:return r=e.sent,e.next=9,n;case 9:if(i=e.sent,!r.qExtendsId){e.next=12;break}return e.abrupt("return");case 12:o=Ub.generate(r,i),Ub.apply(r,o),(a=this)._model.setProperties(r).then((function(){a._model.clearSoftPatches()}));case 16:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}(),ex={canModifyHardProperties:function(e){if(e.qHasSoftPatches||e.qExtendsId)return!1;if(e.permissions)return e.permissions.update;return-1!==e.qMeta.privileges.indexOf("update")}};var tx={saveDerivedProperties:function(e,t,n,r){if(ex.canModifyHardProperties(t))return e.setProperties(n);return new Qb(e).saveSoftProperties(r,n)}};var nx={validate:function(e){if(!(e&&e.layout&&e.properties&&e.model&&e.hashData&&e.generateDerivedProperties))throw Error("Derived-properties: Missing input")}};function rx(){this._generationInProgress=!1}function ix(e){nx.validate(e);var t=e.properties,n=Hb.generateHash(e.hashData);return!(!t.qUndoExclude||t.qUndoExclude.hashCode!==n)}rx.prototype.isDerivedUpToDate=ix,rx.prototype.updateDerivedProperties=function(e){if(nx.validate(e),this._generationInProgress)return Promise.resolve(!0);if(ix(e)){var t=e.layout.qUndoExclude&&e.layout.qUndoExclude.hashCode===e.properties.qUndoExclude.hashCode;return Promise.resolve(!t)}var n=this,r=e.model,i=e.layout,o=jv(!0,{},e.properties),a=jv(!0,{},o);return this._generationInProgress=!0,Hb.updateHash(o,e.hashData),e.generateDerivedProperties(i,o).then((function(){return tx.saveDerivedProperties(r,i,o,a).then((function(){return n._generationInProgress=!1,Promise.resolve(!0)}))}))},rx.prototype.addDefaultHyperCubeHash=function(e,t,n,r){return Bb.getDefaultHashDataForHyperCube(e,t,n).then((function(e){return jv(!0,r,e)}))};var ox={wrapExpression:function(e){var t=e.replace(/\]/g,"]]");return t?"[".concat(t,"]"):""}};var ax={replaceExpressionTokens:function(e,t,n){var r,i,o={start:n&&n.start||"{{",end:n&&n.end||"}}"},a=e;for(var s in t)r=t[s],i=o.start+s+o.end,a=a.replace(sx(i,!0),r);return a},createRegExp:sx};function sx(e,t,n){var r=e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&"),i=n?"(".concat(r,")"):r;return t?new RegExp(i,"g"):new RegExp(i)}var ux={generateExpression:function(e,t){var n={};if(t){var r=function(e){var r=t[e],i=r.wrap?ox.wrapExpression(r.value):r.value;n[e]=i,(r.variations||[]).forEach((function(t){var r=function(e,t,n){if(""===t)return"";var r=ax.createRegExp(n,!0,!0),i=e.split(r),o="";return i.forEach((function(e){o+=e!==n?e:t})),o}(t,i,e);n[t]=r}))};for(var i in t)r(i)}return ax.replaceExpressionTokens(e,n)}};var lx={generateHyperCubeDef:function(e,t,n,r,i){return function(e,t,n,r){var i,o={},a=[];e.forEach((function(e){mx(e.match(px("Dim"))).forEach((function(e){a.push(fx(t.qDimensions[e],r,e,n).then((function(t){o["Dim[".concat(e,"]")]={value:t,wrap:!0}})))})),mx(e.match(px("Mea"))).forEach((function(e){a.push(hx(t.qMeasures[e],r).then((function(t){o["Mea[".concat(e,"]")]={value:t}})))}))})),i=a.length?Promise.all(a).then((function(){return Promise.resolve(o)})):Promise.resolve(o);return i}(e.dimensions.concat(e.measures),t,n,r).then((function(n){var r=jv({},n,i),o=jv(!0,{},t);return o.qDimensions=[],o.qMeasures=[],e.dimensions.forEach((function(e){o.qDimensions.push({qDef:{qFieldDefs:["=".concat(ux.generateExpression(e,r))]}})})),e.measures.forEach((function(e){o.qMeasures.push({qDef:{qDef:ux.generateExpression(e,r)}})})),o}))},getAllHyperCubeExpressions:function(e,t,n){return cx.apply(this,arguments)}};function cx(){return(cx=o(regeneratorRuntime.mark((function e(t,n,r){var i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.qDimensions.map((function(e,t){return fx(e,r,t,n)})),o=t.qMeasures.map((function(e){return hx(e,r)})),e.next=4,Promise.all(i);case 4:return e.t0=e.sent,e.next=7,Promise.all(o);case 7:return e.t1=e.sent,e.abrupt("return",{dimensions:e.t0,measures:e.t1});case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function fx(e,t,n,r){if(e.qLibraryId)return dx(e.qLibraryId,"dimension",t,n,r);var i=r.qDimensionInfo[n].qGroupPos;return Promise.resolve(e.qDef.qFieldDefs[i])}function hx(e,t){return e.qLibraryId?dx(e.qLibraryId,"measure",t):Promise.resolve(e.qDef.qDef)}function dx(e,t,n,r,i){return n?n["dimension"===t?"getDimension":"getMeasure"](e).then((function(e){return e.getProperties().then((function(e){return"dimension"===t?e.qDim.qFieldDefs[i.qDimensionInfo[r].qGroupPos]:e.qMeasure.qDef}))})):(console.warn("No app provided, returning library id"),e)}function px(e){return new RegExp("\\{\\{".concat(e,"\\[\\d\\]\\}\\}"),"g")}function mx(e){return e?e.map((function(e){return e.substr(6,1)})):[]}function gx(e){return!Number.isNaN(parseFloat(e))&&Number.isFinite(+e)}function yx(e){return!Number.isNaN(parseInt(e,10))&&parseFloat(e,10)===parseInt(e,10)}var vx={getBinSize:function(e){return nv(e,"bins.binSize",_y.BIN_SIZE)},getDerivedBinSize:function(e){return nv(e,"qUndoExclude.bins.binSize",_y.BIN_SIZE)},getDerivedBinOffset:function(e){return nv(e,"qUndoExclude.bins.offset",_y.OFFSET)},getDerivedBinCount:function(e){var t=nv(e,"qUndoExclude.bins.binCount",_y.BIN_COUNT);return gx(t)?t<1?1:yx(t)?t:Math.ceil(t):_y.BIN_COUNT},getBinCount:function(e){return nv(e,"bins.binCount",void 0)},getBinOffset:function(e){return nv(e,"bins.offset",_y.OFFSET)},isAutoBin:function(e){return nv(e,"bins.auto",_y.AUTO)},isCountDistinct:function(e){return nv(e,"bins.countDistinct",_y.COUNT_DISTINCT)},getBinMode:function(e){return nv(e,"bins.binMode",_y.BIN_MODE)},isEmpty:function(e){return null==e||""===e}},bx=Math.log(10),xx=[1,1.5,2,3,4,5,6,10],wx=[1,2,4,5,6,8,10],kx=[2,4,5,10];function Mx(e,t){if(0===e)return 0;for(var n,r=Math.floor(Math.log(Math.abs(e))/bx),i=e/Math.pow(10,r),o=0;o<t.length;o++)if(i<=t[o]){n=t[o];break}return(r>=0?n*Math.pow(10,r):n/Math.pow(10,-r))*(e<0?-1:1)}function _x(e,t,n,r,i,o){return Math.floor(Math.abs(e-i)/r)+Math.floor(Math.abs(o-t)/r)}var Sx={calculateBinSize:function(e,t,n){return function(e,t,n){if(!gx(e)||!gx(t)||!gx(n))throw Error("binSizeCalculator: One of the inputs is NOT numeric");if(e>t)throw Error("binSizeCalculator: The 'min' parameter is bigger than the 'max' parameter")}(e,t,n),function(e,t,n){var r,i,o,a,s,u,l,c,f,h,d,p,m=-1,g=xx;if(n=Math.max(1,n),t===e)if(0===t){if(a=1,1===n)return{min:e,max:t,nbrOfBins:n,rawBinSize:o/n,offset:-.5,newMax:.5,binSize:1,numEmptyBins:0}}else 1===n?(a=t+1e-9,g=wx):a=Math.abs(t/n);else a=(o=(t+=1e-9)-e)/n;do{if(c=1,d=0,m>=0)for(f=1/kx[m],h=1,g=[];h<=10;)g.push(Math.round(1e3*h)/1e3),h+=f;s=a;do{s=Mx(s*c,g),u=Math.floor(Math.log(s)/bx),l=Math.pow(10,u),r=(i=t===e?(Math.ceil(t/s)+Math.floor(n/2))*s:Math.ceil(t/s)*s)-n*s;var y=0;for(p=l;(r>e||i<t)&&y<kx.length;)i=(r=Math.floor(e/p)*p)+n*s,p=l/kx[y++];u<1&&(l=Math.pow(10,Math.abs(u)+1),i=Math.round(i*l)/l,r=Math.round(r*l)/l),c=1.1,d++}while((r>e||i<t)&&d<10);m++}while(_x(e,t,0,a,r,i)>0&&m<kx.length);return{binCount:n,offset:r,binSize:s}}(e,t,n=function(e){return e<1?1:yx(e)?e:Math.ceil(e)}(n))}};var qx={getMappingValues:function(e){var t,n,r,i,o=vx.isAutoBin(e),a=vx.getBinMode(e),s=vx.isCountDistinct(e);return o||"maxCount"===a?(t=(i=function(e){var t=nv(e,"qHyperCube.qDimensionInfo.0",{}),n=t.qMin,r=t.qMax;n=gx(n)?n:1,r=gx(r)?r:1;var i=vx.getDerivedBinCount(e);return Sx.calculateBinSize(n,r,i)}(e)).binSize,n=i.offset,r=i.binCount):(t=vx.getBinSize(e),n=vx.getBinOffset(e)),{binSize:t,binOffset:n,binCount:r,distinct:s}},getMappings:function(e){var t={};return t.BinSize={value:",".concat(e.binSize)},t.Label={value:0===e.binOffset?"":",'x'"},t.Offset={value:0===e.binOffset?"":",".concat(e.binOffset)},t.Distinct={value:e.distinct?"Distinct ":""},t}};function Dx(){return(Dx=o(regeneratorRuntime.mark((function e(t,n,r){var i,o,a,s,u,l,c,f,h,d,p;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=r.app,o=r.translator,a=qx.getMappingValues(t),s=qx.getMappings(a),u={dimensions:["Class(aggr({{Dim[0]}},{{Dim[0]}}){{BinSize}}{{Label}}{{Offset}})"],measures:["Count({{Distinct}}{{Dim[0]}})"]},l="=Ceil(Log10(Count({{Dim[0]}})) / Log10(2)) + 1",c=lx.getAllHyperCubeExpressions(n.qHyperCubeDef,t.qHyperCube,i),f=lx.generateHyperCubeDef(u,n.qHyperCubeDef,t.qHyperCube,i,s),e.next=9,c;case 9:return h=e.sent,e.next=12,f;case 12:d=e.sent,p=vx.isAutoBin(t)?{qValueExpression:{qExpr:ux.generateExpression(l,{"Dim[0]":{value:h.dimensions[0],wrap:!0}})}}:"maxCount"===vx.getBinMode(t)&&vx.isEmpty(n.bins.binCount)?vx.getDerivedBinCount(t):n.bins.binCount,rv(d,"qDimensions.0.qDef.qSortCriterias",[{qSortByNumeric:1}]),rv(d,"qDimensions.0.qDef.qFieldLabels",[t.qHyperCube.qDimensionInfo[0].qFallbackTitle]),rv(d,"qMeasures.0.qDef.qLabel",t.measureAxis.label||o.get("Visualization.Histogram.MeasureAxisLabel")),rv(n,"qUndoExclude.box.qHyperCubeDef",d),rv(n,"qUndoExclude.bins.binSize",a.binSize),rv(n,"qUndoExclude.bins.offset",a.binOffset),rv(n,"qUndoExclude.bins.binCount",p);case 21:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Cx={generateHyperCubes:function(e,t,n){return Dx.apply(this,arguments)}};var Ex={isOnComponentForRange:function(e,t,n){return!!e&&!!n.chart.componentsFromPoint({x:e.center.x,y:e.center.y}).filter((function(e){return-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((function(e){return e.settings.key===t.keys.componentKey}))[0]},isOnComponentForNavBtn:function(e,t,n){return n.chart.componentsFromPoint(e.center).some((function(e){return e.settings.key===t}))}};var Ax={callLassoGesture:function(e,t,n){return{type:"Pan",options:{direction:by.DIRECTION_ALL,threshold:1,enable:function(r,i){if(e.lassoing)return t.isSelectionEnabled();var o,a=Ex.isOnComponentForLasso(i,n,this);return t.isSelectionEnabled()&&i&&((o=n.handlers).selectionHandler.lassoState()&&!o.selectionHandler.allFieldsLocked()||e.lassoing)&&a},event:"lasso"},recognizeWith:n.handlers.scrollHandler?"drag":null,events:{lassostart:function(r){Ex.isOnComponentForLasso(r,n,this)&&(t.switchTo("lasso",this.chart,r),e.lassoing=!0,n.handlers.selectionHandler.pauseEngineCalls(n.keys.lassoBrushKey),r.clientX=r.pointers[0].clientX,r.clientY=r.pointers[0].clientY,t.doEmit(this.chart,"lasso","lassoStart",r))},lassomove:function(n){e.lassoing&&(n.clientX=n.pointers[0].clientX,n.clientY=n.pointers[0].clientY,t.doEmit(this.chart,"lasso","lassoMove",n))},lassoend:function(r){e.lassoing&&(r.clientX=r.pointers[0].clientX,r.clientY=r.pointers[0].clientY,t.doEmit(this.chart,"lasso","lassoEnd",r),n.handlers.selectionHandler.resumeEngineCalls(n.keys.lassoBrushKey,!0),e.lassoing=!1)},lassocancel:function(r){e.lassoing=!1,t.doEmit(this.chart,"lasso","lassoCancel",r),n.handlers.selectionHandler.resumeEngineCalls(n.keys.lassoBrushKey,!1)}}}}};var Tx={callMeasureRangeGesture:function(e,t,n,r){var i=n.keys.dimRangeBrushKey?"majorrange":"arearange";return{type:"Pan",options:{direction:n.isHorizontal?by.DIRECTION_HORIZONTAL:by.DIRECTION_VERTICAL,event:"measurerange",enable:function(i,o){if(!n.rangeSelStatus.isOpenMea)return!1;if(e.measureSelecting)return t.isSelectionEnabled();var a="measurerange"===n.active.gesture?[r,n.keys.componentKey]:[r],s=Ex.isOnComponentForRange(o,a,this);return e.measureSelecting=t.isSelectionEnabled()&&!!o&&!!s,e.measureSelecting&&!!n.keys.measureRangeBrushKey}},requireFailure:"lasso ".concat(i),recognizeWith:n.handlers.scrollHandler?"drag":null,events:{measurerangestart:function(i){var o="measurerange"===n.active.gesture?[r,n.keys.componentKey]:[r];Ex.isOnComponentForRange(i,o,this)&&(e.measureSelecting=!0,t.switchTo("measurerange",this.chart,i),t.doEmit(this.chart,"rangeMeasure","rangeStart",i),n.handlers.selectionHandler.pauseEngineCalls(n.keys.measureRangeBrushKey))},measurerangemove:function(n){e.measureSelecting&&t.doEmit(this.chart,"rangeMeasure","rangeMove",n)},measurerangeend:function(r){e.measureSelecting&&(n.handlers.selectionHandler.resumeEngineCalls(n.keys.measureRangeBrushKey,!0),t.doEmit(this.chart,"rangeMeasure","rangeEnd",r),e.measureSelecting=!1)},measurerangecancel:function(){n.handlers.selectionHandler.resumeEngineCalls(n.keys.measureRangeBrushKey,!1),e.measureSelecting=!1}}}}};function Nx(e,t){return"x-axis"===e?"horizontal"===t?by.DIRECTION_VERTICAL:by.DIRECTION_HORIZONTAL:"horizontal"===t?by.DIRECTION_HORIZONTAL:by.DIRECTION_VERTICAL}var Rx={callAreaRangeGesture:function(e,t,n,r){var i=n.keys.dimRangeBrushKey?"majorrange":"measurerange";return{type:"Pan",options:{direction:Nx(r,n.isHorizontal),event:"arearange",enable:function(i,o){if(!n.rangeSelStatus.isOpenDim)return!1;if(e.minoring)return t.isSelectionEnabled();var a="arearange"===n.active.gesture?[r,n.keys.componentKey]:[r],s=Ex.isOnComponentForRange(o,a,this);return e.minoring=t.isSelectionEnabled()&&!!o&&!!s,e.minoring}},requireFailure:"lasso ".concat(i),recognizeWith:n.handlers.scrollHandler?"drag":null,events:{arearangestart:function(i){var o="arearange"===n.active.gesture?[r,n.keys.componentKey]:[r];Ex.isOnComponentForRange(i,o,this)&&(e.minoring=!0,t.switchTo("arearange",this.chart,i),t.doEmit(this.chart,"rangeMinor","areaStart",i),n.handlers.selectionHandler.pauseEngineCalls(n.keys.areaBrushKey))},arearangemove:function(r){e.minoring&&(this.chart.brush(n.keys.areaBrushKey).clear(),t.doEmit(this.chart,"rangeMinor","areaMove",r))},arearangeend:function(r){e.minoring&&(n.handlers.selectionHandler.resumeEngineCalls(n.keys.areaBrushKey,!0),t.doEmit(this.chart,"rangeMinor","areaEnd",r),e.minoring=!1)},arearangecancel:function(){n.handlers.selectionHandler.resumeEngineCalls(n.keys.areaBrushKey,!1),e.minoring=!1}}}}};var Ox={callDimensionRangeGesture:function(e,t,n,r){var i=n.keys.measureRangeBrushKey?"measurerange":"arearange";return{type:"Pan",options:{direction:n.isHorizontal?by.DIRECTION_VERTICAL:by.DIRECTION_HORIZONTAL,event:"majorrange",enable:function(i,o){if(!n.rangeSelStatus.isOpenDim)return!1;if(e.majoring)return t.isSelectionEnabled();var a="majorrange"===n.active.gesture?[r,n.keys.componentKey]:[r],s=Ex.isOnComponentForRange(o,a,this);return e.majoring=t.isSelectionEnabled()&&!!o&&!!s,e.majoring&&!!n.keys.dimRangeBrushKey}},requireFailure:"lasso ".concat(i),recognizeWith:n.handlers.scrollHandler?"drag":null,events:{majorrangestart:function(i){var o="majorrange"===n.active.gesture?[r,n.keys.componentKey]:[r];Ex.isOnComponentForRange(i,o,this)&&(e.majoring=!0,t.switchTo("majorrange",this.chart,i),t.doEmit(this.chart,"rangeDim","rangeStart",i),n.handlers.selectionHandler.pauseEngineCalls(n.keys.dimRangeBrushKey))},majorrangemove:function(n){e.majoring&&t.doEmit(this.chart,"rangeDim","rangeMove",n)},majorrangeend:function(r){e.majoring&&(n.handlers.selectionHandler.resumeEngineCalls(n.keys.dimRangeBrushKey,!0),t.doEmit(this.chart,"rangeDim","rangeEnd",r),e.majoring=!1)},majorrangecancel:function(){n.handlers.selectionHandler.resumeEngineCalls(n.keys.dimRangeBrushKey,!1),e.majoring=!1}}}}};var Ix={callDragGesture:function(e,t,n,r,i){var o={};return{type:"Pan",options:{direction:n.isHorizontal?by.DIRECTION_VERTICAL:by.DIRECTION_HORIZONTAL,event:"drag",enable:function(r,i){return e.dragging?t.isNavigationEnabled():(e.dragging=t.isNavigationEnabled()&&!!i&&!!this.chart.componentsFromPoint({x:i.center.x,y:i.center.y}).filter((function(e){return e.settings.key===n.keys.componentKey}))[0],e.dragging)}},requireFailure:r?"lasso ".concat(t.getBrushConfig()):"",events:{dragstart:function(e){o={x:e.deltaX,y:e.deltaY};var t=-(n.isHorizontal?e.deltaY:e.deltaX)/n.handlers.scrollHandler.getItemSize();!n.isHorizontal&&i&&(t=-t),n.handlers.scrollHandler.getScrollApi().move(t)},dragmove:function(t){if(e.dragging){var r=-(n.isHorizontal?t.deltaY-o.y:t.deltaX-o.x)/n.handlers.scrollHandler.getItemSize();!n.isHorizontal&&i&&(r=-r),n.handlers.scrollHandler.getScrollApi().move(r),o={x:t.deltaX,y:t.deltaY}}},dragend:function(){e.dragging&&(e.dragging=!1)},dragcancel:function(){e.dragging=!1}}}}};var Px={callNavBtnGesture:function(e,t){return{type:"Tap",options:{event:"navBtnTap",enable:function(n,r){return!(!r||!e())&&Ex.isOnComponentForNavBtn(r,t,this)}},events:{navBtnTap:function(e){this.chart.componentsFromPoint(e.center).forEach((function(t){var n=e.target,r=n?n.getAttribute("data-action"):"";if(r)return t.emit(r)}))}}}}};var Lx={create:function(e,t,n,r,i){var o={};t=t||"vertical";var a=r.lassoBrushKey||"select",s=r.dimRangeBrushKey||null,u=r.measureRangeBrushKey||null,l=r.areaBrushKey||null,c=r.legendBrushKey||null,f=!!e.selectionHandler&&e.selectionHandler.isOn(),h={dragging:!1,lassoing:!1,majoring:!1,minoring:!1,measureSelecting:!1},d={gesture:"",type:""},p="horizontal"===t,m=p?"y-axis":"x-axis",g=p?"x-axis":"y-axis";function y(e,t,n){if(d.gesture!==e){var r=a,i=t||d.chart;switch(d.gesture){case"majorrange":v(i,"rangeDim","rangeClear",n),r=s;break;case"measurerange":v(i,"rangeMeasure","rangeClear",n),r=u;break;case"arearange":v(i,"rangeMinor","areaClear",n),r=l}d.gesture=e;var o="range"===e?"range":"item";d.type&&d.type!==o&&i.brush(r).clear(),d.chart=t,d.type=o}}function v(e,t,n,r){if(e){var i=e.component(t);i&&i.emit(n,r)}}var b=[],x={isSelectionEnabled:function(){return e.selectionHandler&&e.selectionHandler.isOn()},isNavigationEnabled:function(){return e.scrollHandler&&e.scrollHandler.isOn()},doEmit:v,switchTo:y,getBrushConfig:function(){return s?u?"majorrange measurerange":"majorrange arearange":"measurerange arearange"}},w={handlers:e,keys:r,isHorizontal:p,active:d,rangeSelStatus:i};function k(){y("none"),h.majoring=!1,h.measureSelecting=!1,h.minoring=!1}return f&&((b=[{type:"Tap",options:{event:"rangeClearTap"},events:{rangeClearTap:function(e){y("none",this.chart,e),h.majoring=!1,h.measureSelecting=!1,h.minoring=!1}}}]).unshift(Px.callNavBtnGesture(x.isNavigationEnabled,c)),b.push(Ax.callLassoGesture(h,x,w)),s?u?(b.push(Ox.callDimensionRangeGesture(h,x,w,m)),e.selectionHandler.addComponent(s,{id:"rangeDim",clear:"rangeClear"}),b.push(Tx.callMeasureRangeGesture(h,x,w,g)),e.selectionHandler.addComponent(u,{id:"rangeMeasure",clear:"rangeClear"})):(b.push(Ox.callDimensionRangeGesture(h,x,w,m)),e.selectionHandler.addComponent(s,{id:"rangeDim",clear:"rangeClear"}),b.push(Rx.callAreaRangeGesture(h,x,w,g)),e.selectionHandler.addComponent(l,{id:"rangeMinor",clear:"areaClear"})):(b.push(Tx.callMeasureRangeGesture(h,x,w,g)),e.selectionHandler.addComponent(u,{id:"rangeMeasure",clear:"rangeClear"}),b.push(Rx.callAreaRangeGesture(h,x,w,m)),e.selectionHandler.addComponent(l,{id:"rangeMinor",clear:"areaClear"}))),e.scrollHandler&&(b.push(Ix.callDragGesture(h,x,w,f,n)),e.scrollHandler.getScrollApi().on("update",k)),o.gestures=b,o.destroy=function(){e.scrollHandler&&e.scrollHandler.getScrollApi().removeListener("update",k)},o}};function jx(e){var t=nv(e,"qUndoExclude.box.qHyperCube.qDimensionInfo.0.qApprMaxGlyphCount",0);return Math.min(20,t)}var zx={createSettings:function(e){return{settings:{labels:{maxGlyphCount:jx(e)}}}}};var Fx={createSettings:function(e){var t,n,r=vx.isAutoBin(e),i=vx.getBinMode(e),o=vx.getDerivedBinSize(e);if(r||"maxCount"===i){var a=vx.getDerivedBinOffset(e);t=a,n=a+vx.getDerivedBinCount(e)*o}else{var s=nv(e,"qUndoExclude.box.qHyperCube.qDimensionInfo.0",{});t=s.qMin||0,n=(s.qMax||0)+o}return{component:{type:"linear",min:t,max:n}}}},Hx={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}},Bx=/^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/i,Vx=/^rgba\((\d{1,3}),(\d{1,3}),(\d{1,3}),(\d(\.\d+)?)\)$/i,Wx=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i,Ux=/^#([A-f0-9])([A-f0-9])([A-f0-9])$/i,$x=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i,Yx=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i,Kx=Math.floor,Xx=Math.round,Gx=Fv.extend({init:function(){var e,t,n,r,i,o,a,s,u,l,c,f,h=0,d=0,p=0,m=1;if(this._invalid=!1,arguments[0]instanceof Gx)h=arguments[0]._r,d=arguments[0]._g,p=arguments[0]._b,m=arguments[0]._a,this._invalid=arguments[0]._invalid;else if(arguments.length<3)if("string"==typeof arguments[0])if(c=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(f=arguments[0]))h=parseInt(c[1],10),d=parseInt(c[2],10),p=parseInt(c[3],10);else if(c=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(f))h=parseInt(c[1],10),d=parseInt(c[2],10),p=parseInt(c[3],10),m=parseFloat(c[4]);else if(c=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i.exec(f))h=parseInt(c[1],16),d=parseInt(c[2],16),p=parseInt(c[3],16),m=1;else if(c=/^#([A-f0-9])([A-f0-9])([A-f0-9])$/i.exec(f))h=parseInt(c[1]+c[1],16),d=parseInt(c[2]+c[2],16),p=parseInt(c[3]+c[3],16),m=1;else if(c=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(f)){switch(e=parseFloat(c[1]),t=parseFloat(c[3]),r=parseFloat(c[5]),t=(t/=100)<0?0:t>1?1:t,a=(e=(e%=360)<0?0:e>360?360:e)/60,s=(o=(r=(r/=100)<0?0:r>1?1:r)<=.5?2*r*t:(2-2*r)*t)*(1-Math.abs(a%2-1)),u=[],a=Math.floor(a)){case 0:u=[o,s,0];break;case 1:u=[s,o,0];break;case 2:u=[0,o,s];break;case 3:u=[0,s,o];break;case 4:u=[s,0,o];break;case 5:u=[o,0,s];break;default:u=[0,0,0]}l=r-.5*o,h=u[0]+l,d=u[1]+l,p=u[2]+l,h=Xx(255*h),d=Xx(255*d),p=Xx(255*p),m=1}else if(c=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i.exec(f)){switch(e=parseFloat(c[1]),t=parseFloat(c[3]),r=parseFloat(c[5]),m=parseFloat(c[7]),t=(t/=100)<0?0:t>1?1:t,a=(e=(e%=360)<0?0:e>360?360:e)/60,s=(o=(r=(r/=100)<0?0:r>1?1:r)<=.5?2*r*t:(2-2*r)*t)*(1-Math.abs(a%2-1)),u=[],a=Math.floor(a)){case 0:u=[o,s,0];break;case 1:u=[s,o,0];break;case 2:u=[0,o,s];break;case 3:u=[0,s,o];break;case 4:u=[s,0,o];break;case 5:u=[o,0,s];break;default:u=[0,0,0]}l=r-.5*o,h=u[0]+l,d=u[1]+l,p=u[2]+l,h=Xx(255*h),d=Xx(255*d),p=Xx(255*p)}else if(c=/^hsv\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(f)){switch(e=parseFloat(c[1]),t=parseFloat(c[3]),i=parseFloat(c[5]),a=(e=(e%=360)<0?0:e>360?360:e)/60,s=(o=(i=(i/=100)<0?0:i>1?1:i)*(t=(t/=100)<0?0:t>1?1:t))*(1-Math.abs(a%2-1)),u=[],a=Math.floor(a)){case 0:u=[o,s,0];break;case 1:u=[s,o,0];break;case 2:u=[0,o,s];break;case 3:u=[0,s,o];break;case 4:u=[s,0,o];break;case 5:u=[o,0,s];break;default:u=[0,0,0]}l=i-o,h=u[0]+l,d=u[1]+l,p=u[2]+l,h=Xx(255*h),d=Xx(255*d),p=Xx(255*p),m=1}else Hx[f.toLowerCase()]?(n=f.toLowerCase(),h=Hx[n].r,d=Hx[n].g,p=Hx[n].b,m="number"==typeof Hx[n].a?Hx[n].a:1):this._invalid=!0;else"number"==typeof arguments[0]&&arguments[0]>=0&&"argb"===arguments[1]?(m=(4278190080&arguments[0])>>>24,m/=255,h=(16711680&arguments[0])>>16,d=(65280&arguments[0])>>8,p=255&arguments[0]):"number"==typeof arguments[0]&&arguments[0]>=0?(h=(16711680&arguments[0])>>16,d=(65280&arguments[0])>>8,p=255&arguments[0]):this._invalid=!0;else arguments.length>=3?(h=arguments[0],d=arguments[1],p=arguments[2],m=arguments.length>=4?arguments[3]:1):this._invalid=!0;Number.isNaN(+h+d+p+m)&&(this._invalid=!0),this._r=Kx(h),this._g=Kx(d),this._b=Kx(p),this._a=m,this._spaces={}},isInvalid:function(){return this._invalid},setAlpha:function(e){this._a=e,this._spaces={}},getAlpha:function(){return this._a},toRGB:function(){return this._spaces.rgb||(this._spaces.rgb=Gx.toRGB(this)),this._spaces.rgb},toRGBA:function(){return this._spaces.rgba||(this._spaces.rgba=Gx.toRGBA(this)),this._spaces.rgba},toString:function(){return this._spaces.rgb||(this._spaces.rgb=Gx.toRGB(this)),this._spaces.rgb},toHex:function(){return this._spaces.hex||(this._spaces.hex=Gx.toHex(this)),this._spaces.hex},toHSL:function(e){return this._spaces.hsl||(this._spaces.hsl=Gx.toHSL(this,e)),this._spaces.hsl},toHSLA:function(e){return this._spaces.hsla||(this._spaces.hsla=Gx.toHSLA(this,e)),this._spaces.hsla},toHSV:function(){var e=this.toHSVComponents();return"hsv(".concat(e.h,",").concat(e.s,",").concat(e.v,")")},toHSVComponents:function(){return this._spaces.hsvComp||(this._spaces.hsvComp=Gx.toHSVComponents(this)),this._spaces.hsvComp},toNumber:function(){return this._spaces.num||(this._spaces.num=Gx.toNumber(this)),this._spaces.num},isDark:function(){return this.isInvalid()||this.getLuminance()<125},getLuminance:function(){return void 0===this._lumi&&(this._lumi=.299*this._r+.587*this._g+.114*this._b),this._lumi},shiftLuminance:function(e){var t=this.toHSLA(),n=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i.exec(t),r=parseFloat(n[1]),i=parseFloat(n[3]),o=parseFloat(n[5]),a=parseFloat(n[7]);return o+=e,o=Math.max(0,Math.min(o,100)),"hsla(".concat(r,",").concat(i,",").concat(o,",").concat(a,")")},isEqual:function(e){return e instanceof Gx||(e=new Gx(e)),this._r===e._r&&this._g===e._g&&this._b===e._b},blend:function(e,t){var n=Kx(this._r+(e._r-this._r)*t),r=Kx(this._g+(e._g-this._g)*t),i=Kx(this._b+(e._b-this._b)*t),o=Kx(this._a+(e._a-this._a)*t);return"rgba(".concat([n,r,i,o].join(","),")")},createShiftedColor:function(e){(void 0===e||Number.isNaN(+e))&&(e=1);var t=this.getLuminance(),n=this._g<126?1:1+this._g/512,r=this.shiftLuminance(20*(t*n<220?.8+1/(t+1)*4:-(.8+t/255*1))*e);return new Gx(r)}});Gx.toRGB=function(e){if(e instanceof Gx)return"rgb(".concat([e._r,e._g,e._b].join(","),")");"string"==typeof e&&(e=Gx.toNumber(e));var t=(65280&e)>>8,n=255&e;return"rgb(".concat((16711680&e)>>16,",").concat(t,",").concat(n,")")},Gx.toRGBA=function(e,t){if(e instanceof Gx)return"rgba(".concat([e._r,e._g,e._b,void 0!==t?t:e._a].join(","),")");"string"==typeof e&&(e=Gx.toNumber(e));var n=(65280&e)>>8,r=255&e;return"rgba(".concat((16711680&e)>>16,",").concat(n,",").concat(r,",").concat(void 0!==t?t:e._a,")")},Gx.toHex=function(e){var t,n,r;return e instanceof Gx?(t=e._r.toString(16),n=e._g.toString(16),r=e._b.toString(16),1===t.length&&(t="0".concat(t)),1===n.length&&(n="0".concat(n)),1===r.length&&(r="0".concat(r)),"#".concat([t,n,r].join(""))):("string"==typeof e&&(e=Gx.toNumber(e)),t=((16711680&e)>>16).toString(16),n=((65280&e)>>8).toString(16),r=(255&e).toString(16),1===t.length&&(t="0".concat(t)),1===n.length&&(n="0".concat(n)),1===r.length&&(r="0".concat(r)),"#".concat(t).concat(n).concat(r))},Gx.toHSL=function(e,t){var n,r,i,o=0;"string"==typeof e&&(e=new Gx(e));var a=e._r/255,s=e._g/255,u=e._b/255,l=Math.max(a,s,u),c=Math.min(a,s,u);if(r=t?.21*a+.72*s+.07*u:(l+c)/2,l===c)n=0,o=0;else{switch(i=l-c,n=r>.5?i/(2-l-c):i/(l+c),l){case a:o=(s-u)/i+(s<u?6:0);break;case s:o=(u-a)/i+2;break;case u:o=(a-s)/i+4}o/=6}return"hsl(".concat(360*o,",").concat(100*n,",").concat(100*r,")")},Gx.toHSLA=function(e,t){var n,r,i,o=0;"string"==typeof e&&(e=new Gx(e));var a=e._r/255,s=e._g/255,u=e._b/255,l=e._a,c=Math.max(a,s,u),f=Math.min(a,s,u);if(r=t?.21*a+.72*s+.07*u:(c+f)/2,c===f)n=0,o=0;else{switch(i=c-f,n=r>.5?i/(2-c-f):i/(c+f),c){case a:o=(s-u)/i+(s<u?6:0);break;case s:o=(u-a)/i+2;break;case u:o=(a-s)/i+4}o/=6}return"hsla(".concat(360*o,",").concat(100*n,",").concat(100*r,",").concat(l,")")},Gx.toHSVComponents=function(e){var t,n,r=0;"string"==typeof e&&(e=new Gx(e));var i=e._r/255,o=e._g/255,a=e._b/255,s=Math.max(i,o,a),u=Math.min(i,o,a),l=s;if(s===u)t=0,r=0;else{switch(t=0===(n=s-u)?0:n/l,s){case i:r=(o-a)/n+(o<a?6:0);break;case o:r=(a-i)/n+2;break;case a:r=(i-o)/n+4}r/=6}return{h:360*r%360,s:100*t,v:100*l}},Gx.toNumber=function(){if(1===arguments.length&&arguments[0]instanceof Gx)return(arguments[0]._r<<16)+(arguments[0]._g<<8)+arguments[0]._b;var e,t,n=0,r=0,i=0;return 1===arguments.length&&"string"==typeof arguments[0]&&((e=/^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/i.exec(t=arguments[0]))?(n=parseInt(e[1],10),r=parseInt(e[2],10),i=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),r=parseInt(e[2],16),i=parseInt(e[3],16)):(e=/^#([A-f0-9])([A-f0-9])([A-f0-9])$/i.exec(t))&&(n=parseInt(e[1]+e[1],16),r=parseInt(e[2]+e[2],16),i=parseInt(e[3]+e[3],16))),(n<<16)+(r<<8)+i},Gx.blend=function(e,t,n){var r=(16711680&(e=Gx.toNumber(e)))>>16,i=(65280&e)>>8,o=255&e;return(r+(((16711680&(t=Gx.toNumber(t)))>>16)-r)*n<<16)+(i+(((65280&t)>>8)-i)*n<<8)+(o+((255&t)-o)*n)},Gx.getBlend=function(e,t,n){var r=e._r+(t._r-e._r)*n,i=e._g+(t._g-e._g)*n,o=e._b+(t._b-e._b)*n,a=e._a+(t._a-e._a)*n;return new Gx(r,i,o,a)},Gx.isCSSColor=function(e){return!(arguments.length>1||"string"!=typeof e)&&(Bx.test(e)||Vx.test(e)||Wx.test(e)||Ux.test(e)||$x.test(e)||Yx.test(e)||Hx[e.toLowerCase()])},Gx.getBestContrast=function(e,t,n){var r=e.getLuminance();return Math.abs(r-t.getLuminance())>Math.abs(r-n.getLuminance())?t:n},Gx.getContrast=function(e,t){if(e&&t){var n=e.getLuminance()/100,r=t.getLuminance()/100;return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)}},Gx.isDark=function(){var e={getLuminance:Gx.prototype.getLuminance,isInvalid:Gx.prototype.isInvalid};return Gx.prototype.init.apply(e,[].slice.call(arguments)),Gx.prototype.isDark.call(e)},Gx.useDarkLabel=function(e,t){return e._a>.5?!e.isDark():!t};var Jx={TRANSPARENT_BLACK:"rgba( 0,0,0,0.2 )",TRANSPARENT_WHITE:"rgba( 255,255,255,0.7 )",LIGHT_GREY:"#ccc",DARK_GREY:"#666",BLACK:"#000",WHITE:"#fff",getInverse:function(e){var t=new Gx(e);return 0===t.getAlpha()?this.BLACK:t.isDark()?this.WHITE:this.BLACK},getContrastingGrey:function(e){var t=new Gx(e);return 0===t.getAlpha()?this.DARK_GREY:Gx.getBestContrast(t,new Gx(Jx.LIGHT_GREY),new Gx(Jx.DARK_GREY))},getBestContrast:function(e,t,n){return Gx.getBestContrast(new Gx(e),new Gx(t),new Gx(n))},getContrastingTransparent:function(e){var t=new Gx(e);return 0===t.getAlpha()||"none"===e?this.TRANSPARENT_BLACK:t.isDark()?this.TRANSPARENT_WHITE:this.TRANSPARENT_BLACK}};var Zx={createSettings:function(e,t,n,r,i,o){var a=e.environment.theme.getColorPickerColor(t.color.bar.paletteColor),s=vx.getDerivedBinSize(t),u=[],l=[n.consume,r.consume,i.consume];return e._tooltipHandler.isOn()&&(u.push(o.box.trigger),l.push.apply(l,o.box.consume)),u.push(n.trigger),{key:"box-marker",settings:{box:{fill:a,stroke:Jx.getContrastingGrey(a).toHex(),strokeWidth:1,maxWidthPx:1/0,minWidthPx:NaN,minWidth:0},major:{scale:"dimension",ref:{start:"binStart",end:"binEnd"}},minor:{scale:"measure"},whiskers:!1,orientation:"vertical"},brush:{trigger:u,consume:l},data:{extract:{field:"qDimensionInfo/0",props:{start:0,end:{field:"qMeasureInfo/0"},measure:{field:"qMeasureInfo/0",reduce:"first",value:function(e){return e},reduceLabel:"none"},binStart:{field:"qDimensionInfo/0",value:function(e){return e.qNum}},binEnd:{field:"qDimensionInfo/0",value:function(e){return e.qNum+s}},elemNo:{field:"qDimensionInfo/0"},bin:{field:"qDimensionInfo/0",value:function(e){return e}}}}}}}};var Qx={createSettings:function(e,t){var n=t.getColorPickerColor(e.color.bar.paletteColor);return{settings:{sources:[{strategy:{settings:{labels:[{placements:[{},{fill:Jx.getInverse(n)}]}]}}}]}}}};function ew(e){return nv(e,"qHyperCube.qDimensionInfo.0.qIsOneAndOnlyOne",!1)}var tw={createChartSettings:function(e,t){var n=e.isRtl(),r=nv(t,"qHyperCube.qDimensionInfo.0",{}).qFallbackTitle||"",i=e.environment,o=i.theme,a=i.translator,s=pb.create({chartID:"object.histogram",theme:o,isRtl:n}),u={},l={},c={};e._selectionHandler.isOn()&&(e._selectionHandler.setUpStart(),u=e._selectionHandler.setUpBrush({contexts:["select"],data:["elemNo"],dataPath:"qUndoExclude/box"}),l=e._selectionHandler.setUpBrush({contexts:["select-dimension"],data:["elemNo"],dataPath:"qUndoExclude/box",isSingleSelect:ew(t)}),c=e._selectionHandler.setUpBrush({dataPath:"qUndoExclude/box",contexts:["select-measure"],data:["end"]}),e._selectionHandler.setUpDone());var f={box:{}};e._tooltipHandler.isOn()&&(f.box=e._tooltipHandler.setUp({chartBuilder:s,environment:e.environment,data:[""],contexts:["boxTip"],componentKey:"box-marker",measureRows:["measure"],labelData:["bin"]}));var h=function(e){var t={};return e?(t.isOpenDim=!1,t.isOpenMea=!1):(t.isOpenDim=!0,t.isOpenMea=!0),t}(function(e){var t=e.qUndoExclude&&e.qUndoExclude.box&&e.qUndoExclude.box.qHyperCube&&e.qUndoExclude.box.qHyperCube.qDimensionInfo?e.qUndoExclude.box.qHyperCube.qDimensionInfo:void 0;return!!t&&!!t[0].qLocked}(t)),d={scrollHandler:null,selectionHandler:e._selectionHandler};this._dependentActions&&this._dependentActions.destroy(),this._dependentActions=Lx.create(d,"vertical",n,{componentKey:"box-marker",lassoBrushKey:"select",dimRangeBrushKey:null,measureRangeBrushKey:"select-measure",areaBrushKey:"select-dimension"},h),s.addPreset("dimension-measure-chart",{isRtl:n,includeDimensionAxis:!0,orientation:"vertical",selectionsEnabled:e._selectionHandler.isOn(),theme:o,measureSource:"qMeasureInfo/0",measureScaleSettings:{component:{expand:0,include:[0]}},enableLasso:!0,lasso:{brushKey:"select",brushComponents:["box-marker"]},enableMeasureRange:!0,measureRange:{brushKey:"select-measure",brushAxis:"y-axis",brushArea:"box-marker",brushScale:"measure"},enableAreaRange:!0,areaRange:{brushKey:"select-dimension",brushAxis:"x-axis",brushData:["elemNo"],brushArea:"box-marker",brushScale:"rangeSelSettings",brushComponents:["box-marker"],multiple:!0,chartInstance:e.chartInstance},brushActions:this._dependentActions.gestures,dimensionSource:"qDimensionInfo/0",dimensionScaleSettings:Fx.createSettings(t),measureAxisProperties:t.measureAxis,measureTitleText:t.measureAxis.label||a.get("Visualization.Histogram.MeasureAxisLabel"),dimensionAxisProperties:t.dimensionAxis,dimensionAxisSettings:zx.createSettings(t),dimensionTitleText:r,gridlines:t.gridlines,hasNavigation:!1,isNavigationEnabledFn:function(){return!1},refLines:t.refLine&&t.refLine.refLines});var p=s.getSettings(),m=Zx.createSettings(e,t,u,l,c,f);if(s.addComponent("box-marker",m),t.dataPoint&&t.dataPoint.showLabels){var g=Qx.createSettings(t,o);s.addComponent("labels",g)}return e.addSnapshotChartSettings(p,t),p.scales.rangeSelSettings={type:"linear",min:p.scales.dimension.min,max:p.scales.dimension.max,source:"qDimensionInfo/0"},p}};var nw=wb.extend("Histogram",{namespace:".histogram",init:function(e){var t=e.environment,n=e.lasso,r=e.picasso,i=e.$element,o=e.backendApi,a=e.selectionsApi,s=e.renderState;this._super(r,i,t,o,a),this.renderState=s,this.picassoElement.__do_not_use_findShapes=this.chartInstance.findShapes.bind(this.chartInstance),this._derivedProperties=new rx,this._selectionHandler=Cb({model:o.model,chartInstance:this.chartInstance,selectionsApi:a,selectPaths:["/qUndoExclude/box/qHyperCubeDef"],lasso:n}),this._tooltipHandler=Fb(this.chartInstance,i,"object.histogram"),this.setDataPaths(["qUndoExclude/box/qHyperCube"])},updateConstraints:function(e){var t=!e.passive,n=!e.select&&!e.active;this._tooltipHandler[t?"on":"off"](),this._selectionHandler[n?"on":"off"]()},off:function(){this._tooltipHandler.off(),this._selectionHandler.off()},createChartSettings:function(e){return tw.createChartSettings(this,e)},setSnapshotData:function(e){return this._super(e),e.qUndoExclude.box.qHyperCube.qDataPages=this.layout.qUndoExclude.box.qHyperCube.qDataPages,Promise.resolve(e)},getDisclaimerAttributes:function(e){var t,n=function(){var t=nv(e,"qUndoExclude.box.qHyperCube.qDataPages.0.qMatrix",[]);return 1===t.length&&t[0][0]&&t[0][0].qIsNull}();return{data:e.qUndoExclude&&e.qUndoExclude.box,supportedDisclaimers:{LimitedData:!0,OnlyNanData:!0,OnlyNegativeOrZeroValues:!n,RequireNumericDimension:!0},options:{bottom:!0,supportNegative:!1,explicitOnlyNanData:n,explicitRequireNumericDimension:(t=e.qHyperCube,t.qDimensionInfo.length>0&&-1===t.qDimensionInfo[0].qTags.indexOf("$numeric"))}}},updateChart:function(e,t){if(!e.qUndoExclude)return Promise.resolve();this._super(e,t)},updateData:function(e){var t=this,n=this;return n._super(e).then((function(){if(n._destroyed)return Promise.reject();e=n.layout;var r={height:Math.min(e.qHyperCube.qSize.qcy,1e3),width:2},i=n.backendApi.model;return!!t.layout.snapshotData?Promise.resolve():i.getEffectiveProperties().then((function(t){return n._destroyed?Promise.reject():n._derivedProperties.addDefaultHyperCubeHash(t.qHyperCubeDef,e.qHyperCube,n.environment.app,function(e,t){return{box:t.qHyperCubeDef,binMappings:qx.getMappingValues(e),binProperties:t.bins,measureAxis:t.measureAxis,version:"2.0"}}(e,t)).then((function(o){if(n._destroyed)return Promise.reject();var a={layout:e,properties:t,model:i,hashData:o,generateDerivedProperties:function(e,t){return Cx.generateHyperCubes(e,t,n.environment)}};return n._derivedProperties.isDerivedUpToDate(a)?e.qUndoExclude?(n.renderState.restore(),n.backendApi.updateCache(e.qUndoExclude.box),n.getData(n.backendApi,e.qUndoExclude.box.qHyperCube,r)):Promise.resolve():(n.renderState.pending(),n._derivedProperties.updateDerivedProperties(a))}))}))}))},paint:function(){var e=this.layout.qUndoExclude;return e&&e.box&&e.box.qHyperCube.qDataPages.length?this._super():Promise.resolve(!1)},isLassoDisabled:function(){return!1}}),rw=function(){function e(t){a(this,e),this.model=t,this.path="/qUndoExclude/box/qHyperCubeDef"}return u(e,[{key:"setCacheOptions",value:function(e){e.maxStackedValues}},{key:"updateCache",value:function(e){}},{key:"getData",value:function(e){return this.model.getHyperCubeData(this.path,e)}}]),e}(),iw={exports:{}};!function(e,t){window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==r(e)&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/conversion/",n(n.s=2)}([function(e,t,n){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,u=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===o.call(e)},l=function(e){if(!e||"[object Object]"!==o.call(e))return!1;var t,n=i.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&i.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||i.call(e,t)},c=function(e,t){a&&"__proto__"===t.name?a(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},f=function(e,t){if("__proto__"===t){if(!i.call(e,t))return;if(s)return s(e,t).value}return e[t]};e.exports=function e(){var t,n,i,o,a,s,h=arguments[0],d=1,p=arguments.length,m=!1;for("boolean"==typeof h&&(m=h,h=arguments[1]||{},d=2),(null==h||"object"!=r(h)&&"function"!=typeof h)&&(h={});d<p;++d)if(null!=(t=arguments[d]))for(n in t)i=f(h,n),h!==(o=f(t,n))&&(m&&o&&(l(o)||(a=u(o)))?(a?(a=!1,s=i&&u(i)?i:[]):s=i&&l(i)?i:{},c(h,{name:n,newValue:e(m,s,o)})):void 0!==o&&c(h,{name:n,newValue:o}));return h}},function(e,t,n){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==r(e)&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/qlik-modifiers/",n(n.s=1)}([function(e,t,n){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,u=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===o.call(e)},l=function(e){if(!e||"[object Object]"!==o.call(e))return!1;var t,n=i.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&i.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||i.call(e,t)},c=function(e,t){a&&"__proto__"===t.name?a(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},f=function(e,t){if("__proto__"===t){if(!i.call(e,t))return;if(s)return s(e,t).value}return e[t]};e.exports=function e(){var t,n,i,o,a,s,h=arguments[0],d=1,p=arguments.length,m=!1;for("boolean"==typeof h&&(m=h,h=arguments[1]||{},d=2),(null==h||"object"!=r(h)&&"function"!=typeof h)&&(h={});d<p;++d)if(null!=(t=arguments[d]))for(n in t)i=f(h,n),h!==(o=f(t,n))&&(m&&o&&(l(o)||(a=u(o)))?(a?(a=!1,s=i&&u(i)?i:[]):s=i&&l(i)?i:{},c(h,{name:n,newValue:e(m,s,o)})):void 0!==o&&c(h,{name:n,newValue:o}));return h}},function(e,t,n){n.r(t);var i=n(0),o=n.n(i),a=function(e,t,n){if(!t)return!1;var r,i=t.split("."),o=i[i.length-1],a=e;for(r=0;r<i.length-1;++r)void 0===a[i[r]]&&(a[i[r]]=Number.isNaN(+i[r+1])?{}:[]),a=a[i[r]];if(void 0!==n){var s=a[o];return a[o]=n,{updated:n,previous:s}}return delete a[o],!1},s=function(e,t,n){var r,i=t.split("."),o=e;if(void 0===o)return n;for(r=0;r<i.length;++r){if(void 0===o[i[r]])return n;o=o[i[r]]}return o},u="".concat(" ","(").concat(" "),l="".concat(" ",")").concat(" ");function c(e){return u+e+l}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var n=function(e,t){if(!t)return null;var n,r;for(n=0;n<t.length;n++)if((r=t[n]).qInfo.qId===e)return r;return null}(e.qLibraryId,t.dimensionList);return n&&n.qData.info[0].qTags.indexOf("$numeric")>-1}var r=function(e,t){if(!t)return null;var n,r,i=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var n=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(n)&&(t=(t=t.substring(1,n)).trim()),t}(e);for(n=0;n<t.length;n++){if((r=t[n]).qName===i)return r;if(r.qDerivedFieldData)for(var o=0;o<r.qDerivedFieldData.qDerivedFieldLists.length;++o)for(var a=r.qDerivedFieldData.qDerivedFieldLists[o],s=0;s<a.qFieldDefs.length;++s){var u=a.qFieldDefs[s];if(u.qName===i)return u}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return r&&r.qTags.indexOf("$numeric")>-1}function h(e){return!(!e.fullAccumulation&&!e.fullRange)}function d(e,t){var n=e.crossAllDimensions;return 2===t&&n?"RowNo(Total)":"RowNo()"}function p(e){var t=function(e){return e?(e=function(e){return e.replace(/\/\*[^]*?\*\//g,"")}(e=function(e){return e.replace(/\/\/(.*)$/gm,"")}(e))).trim():""}(e).trim();return"="===t.substring(0,1)?t.substring(1).trim():t}function m(){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 y(e){return void 0===e?")":", 0, ".concat(e,")")}function v(e,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=MinString(").concat(t,"))' and Only({1}").concat(t,")<='$(=MaxString(").concat(t,"))'\"}")}function b(e){var t=e.modifier,n=void 0===t?{}:t,r=e.dimensions,i=e.dimensionAndFieldList,o=e.funcComp,a=void 0===o?"Sum":o,s=e.valueComp,u=void 0===s?"0":s;if(!n.showExcludedValues)return"";if(r&&1===r.length){var l=v(f(r[0],i),m(0));return"".concat(a,"({1<").concat(l,">}").concat(u,")")}if(r&&2===r.length){var c=f(r[0],i),h=f(r[1],i),d=m(0),p=m(1),g=v(c,d),y=v(h,p);return"".concat(a,"({1<").concat(g,",").concat(y,">}").concat(u,")")}return"".concat(a,"({1}").concat(u,")")}function x(e){return"".concat(e,"(")}function w(e){var t=e.properties,n=e.layout;return s(t,"qHyperCubeDef.qDimensions",s(n,"qHyperCube.qDimensionInfo",[])).length}var k={isFullRange:h,getNumDimensions:w,getExpressionWithExcludedComp:function(e){var t=e.expression,n=e.modifier,r=e.dimensions,i=e.dimensionAndFieldList,o=e.treatMissingAsNull,a=c(p(t));if(!n.showExcludedValues)return a;var s=b({modifier:n,dimensions:r,dimensionAndFieldList:i}),u=o?"":", 0";if(r&&1===r.length){var l=m(0);return"If(Count(".concat(l,") > 0, ").concat(a," + ").concat(s).concat(u,")")}if(r&&2===r.length){var f=m(0),h=m(1);return"If(Count(".concat(f,") * Count(").concat(h,") > 0, ").concat(a," + ").concat(s).concat(u,")")}return a},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:y,getAboveComp:function(e,t,n,r){return g(e,t)+n+y(r)},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,r=e.layout;return 0===function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t)&&2===w({properties:n,layout:r})},getDimComp:function(e,t){var n=function(e){return e[arguments.length>1&&void 0!==arguments[1]?arguments[1]:0].qDef.qSortCriterias[0]}(e,t),r=m(t);if(!n.qSortByExpression&&!n.qSortByNumeric&&!n.qSortByAscii)return r;var i=["Descending","Ascending"],o=n.qSortByNumeric?"(Numeric, ".concat(i[(n.qSortByNumeric+1)/2],")"):"",a=n.qSortByAscii?"(Text, ".concat(i[(n.qSortByAscii+1)/2],")"):"";return n.qSortByNumeric&&n.qSortByAscii?"(".concat(r,", ").concat(o,", ").concat(a,")"):n.qSortByNumeric?"(".concat(r,", ").concat(o,")"):n.qSortByAscii?"(".concat(r,", ").concat(a,")"):r},simplifyExpression:p,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var n=t.indexOf(u);if(-1!==n){var r=t.indexOf(l);if(-1!==r)return t.substring(n+u.length,r)}}},initModifier:function(e,t){Object.keys(t).forEach((function(n){void 0===e[n]&&(e[n]=t[n])}))},isNumeric:f,isApplicable:function(e){var t=e.properties,n=e.layout,r=e.minDimensions,i=void 0===r?1:r,o=e.maxDimensions,a=void 0===o?2:o;if(!t&&!n)return!0;var s=w({properties:t,layout:n});return s>=i&&s<=a},getExpressionWithMarkers:c,canExtract:function(e){var t=e.indexOf(u),n=e.indexOf(l);return t>-1&&n>-1&&t<n},getDimDefWithWrapper:m,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")}};function M(e){return(M="function"==typeof Symbol&&"symbol"==r(Symbol.iterator)?function(e){return r(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":r(e)})(e)}var _=o.a.bind(null,!0),S={},q=Array.isArray;function D(e){return null!=e&&!Array.isArray(e)&&"object"===M(e)}function C(e){return void 0===e}function E(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function A(e,t){var n,r=t.substring(1).split("/").slice(0,-1);return r.forEach((function(t,i){if(i!==r.length){n=+t;var o=Number.isNaN(n)?{}:[];e[n||t]=C(e[n||t])?o:e[t],e=e[n||t]}})),e}function T(e,t){var n=!0;if(D(e)&&D(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((function(r){T(e[r],t[r])||(n=!1)})),n);if(q(e)&&q(t)){if(e.length!==t.length)return!1;for(var r=0,i=e.length;r<i;r+=1)if(!T(e[r],t[r]))return!1;return!0}return e===t}S.generate=function(e,t,n){n=n||"";var r=[];return Object.keys(t).forEach((function(i){var o=function(e){return e?_({},{val:e}).val:e}(t[i]),a=e[i],s="".concat(n,"/").concat(i);T(o,a)||E(t,i)||(C(a)?r.push({op:"add",path:s,value:o}):D(o)&&D(a)?r=r.concat(S.generate(a,o,s)):q(o)&&q(a)?r=r.concat(function(e,t,n){var r=[],i=e.slice(),o=-1;function a(e,t,n){if(e[n]&&C(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(var r=0,i=e.length;r<i;r+=1)if(e[r]&&e[r].qInfo.qId===t)return r;return-1}if(T(t,i))return r;if(!C(t[0])&&C(t[0].qInfo))return r.push({op:"replace",path:n,value:t}),r;for(var s=i.length-1;s>=0;s-=1)-1===(o=a(t,i[s].qInfo&&i[s].qInfo.qId,s))?(r.push({op:"remove",path:"".concat(n,"/").concat(s)}),i.splice(s,1)):r=r.concat(S.generate(i[s],t[o],"".concat(n,"/").concat(s)));for(var u=0,l=t.length;u<l;u+=1)-1===(o=a(i,t[u].qInfo&&t[u].qInfo.qId))?(r.push({op:"add",path:"".concat(n,"/").concat(u),value:t[u]}),i.splice(u,0,t[u])):o!==u&&(r.push({op:"move",path:"".concat(n,"/").concat(u),from:"".concat(n,"/").concat(o)}),i.splice(u,0,i.splice(o,1)[0]));return r}(a,o,s)):r.push({op:"replace",path:"".concat(n,"/").concat(i),value:o}))})),Object.keys(e).forEach((function(i){C(t[i])&&!E(e,i)&&r.push({op:"remove",path:"".concat(n,"/").concat(i)})})),r},S.apply=function(e,t){t.forEach((function(t){var n,r=A(e,t.path),i=t.path.split("/").splice(-1)[0],o=i&&Number.isNaN(+i)?r[i]:r[+i]||r,a=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(r=null,o=e),"add"===t.op||"replace"===t.op)if(q(r))"-"===i&&(i=r.length),r.splice(+i,"add"===t.op?0:1,t.value);else if(q(o)&&q(t.value)){var s,u=t.value.slice();o.length=0,(s=o).push.apply(s,function(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}(u))}else if(D(o)&&D(t.value))n=o,Object.keys(n).forEach((function(e){Object.getOwnPropertyDescriptor(n,e).configurable&&!E(n,e)&&delete n[e]})),_(o,t.value);else{if(!r)throw new Error("Patchee is not an object we can patch");r[i]=t.value}else if("move"===t.op){var l=A(e,t.from);q(r)?r.splice(+i,0,l.splice(+a,1)[0]):(r[i]=l[a],delete l[a])}else"remove"===t.op&&(q(r)?r.splice(+i,1):delete r[i])}))},S.clone=function(e){return _({},e)},S.createPatch=function(e,t,n){var r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},S.updateObject=function(e,t){Object.keys(e).length?S.apply(e,S.generate(e,t)):_(e,t)};var N=S,R=function(e,t,n){if(!e)return Promise.resolve();var r=N.generate(t,n);return o()(!0,t,n),r&&r.length?(r=r.map((function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}})),e.applyPatches(r,!0)):Promise.resolve()},O="accumulation";function I(e,t){var n=s(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===O)return n[r]}function P(e,t){var n=function(e,t){var n=s(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===O)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var L={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""},j={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,r=e.properties,i=e.layout,o=e.numDimensions,a=e.dimensionAndFieldList;if(!n)return t;var u=o;void 0===u&&(u=k.getNumDimensions({properties:r,layout:i}));var l=s(r,"qHyperCubeDef.qDimensions",[]),c=k.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:l,dimensionAndFieldList:a}),f=k.getNumStepComp(n,u),h=k.getAboveComp(n,u,c,f),d=k.getRangeComp("RangeSum",h);if(k.needDimension({modifier:n,properties:r,layout:i})){var p=k.getDimComp(l,1),m=k.getDimComp(l,0),g=k.getAggrComp(d,p,m);d=n.showExcludedValues?k.getExcludedComp({modifier:n,dimensions:l,dimensionAndFieldList:a,valueComp:g}):g}return d},extractInputExpression:k.extractInputExpression,initModifier:function(e){k.initModifier(e,L)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:function(e,t){return!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=I(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=I(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,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(O))return!1;var o=I(t,e);return o&&!o.disabled}}}},z="movingAverage";function F(e,t){var n=s(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===z)return n[r]}function H(e,t){var n=function(e,t){var n=s(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===z)return r;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},V={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,r=e.modifier,i=e.properties,o=e.layout,a=e.numDimensions,u=e.dimensionAndFieldList;if(!r)return n;var l=a;void 0===l&&(l=k.getNumDimensions({properties:i,layout:o}));var c=s(i,"qHyperCubeDef.qDimensions",[]),f=r.showExcludedValues&&r.nullSuppression,h=k.getExpressionWithExcludedComp({expression:n,modifier:r,dimensions:c,dimensionAndFieldList:u,treatMissingAsNull:f}),d=k.getNumStepComp(r,l),p=k.getAboveComp(r,l,h,d);if(r.nullSuppression)t=k.getRangeComp("RangeAvg",p);else{var m=k.getRangeComp("RangeSum",p),g=function(e,t){var n=k.getRowNoComp(e,t);if(!k.isFullRange(e)){var r=e.steps,i="number"!=typeof r||Number.isNaN(r)?6:r;return"RangeMin(".concat(i,", ").concat(n,")")}return n}(r,l);t="".concat(m," / ").concat(g)}var y=t;if(k.needDimension({modifier:r,properties:i,layout:o})){var v=k.getDimComp(c,1),b=k.getDimComp(c,0),x=k.getAggrComp(y,v,b);y=r.showExcludedValues?k.getExcludedComp({modifier:r,dimensions:c,dimensionAndFieldList:u,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]:{};return{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(H(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(H(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(H(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(H(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=F(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=F(t,e);return n&&!n.fullRange}},showExcludedValues:{refFn:function(t){return"".concat(H(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat(H(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,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(z))return!1;var o=F(t,e);return o&&!o.disabled}}}},W="difference";function U(e,t){var n=s(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===W)return n[r]}function $(e,t){var n=function(e,t){var n=s(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===W)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var Y={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""},K={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,r=e.properties,i=e.layout,o=e.numDimensions,a=e.dimensionAndFieldList;if(!n)return t;var u=o;void 0===u&&(u=k.getNumDimensions({properties:r,layout:i}));var l=s(r,"qHyperCubeDef.qDimensions",[]),c=k.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:l,dimensionAndFieldList:a}),f=k.getAboveComp(n,u,c),h="".concat(c," - ").concat(f);if(k.needDimension({modifier:n,properties:r,layout:i})){var d=k.getDimComp(l,1),p=k.getDimComp(l,0),m=k.getAggrComp(h,d,p);h=n.showExcludedValues?k.getExcludedComp({modifier:n,dimensions:l,dimensionAndFieldList:a,funcComp:"Only",valueComp:m}):m}return h},initModifier:function(e){Object.keys(Y).forEach((function(t){void 0===e[t]&&(e[t]=Y[t])}))},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:function(e,t){return!k.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat($(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($(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($(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,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(W))return!1;var o=U(t,e);return o&&!o.disabled}}}},X={CURRENT_SELECTION:0,SELECT_FIELD_VALUE:1,DISREGARD_SELECTION:2},G={ONE_DIMENSION:0,ALL_DIMENSIOANS:1,DISREGARD_ALL_DIMENSIONS:2},J="normalization";function Z(e,t){var n=s(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===J)return n[r]}function Q(e,t){var n=function(e,t){var n=s(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===J)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}function ee(e,t){for(var n=0;n<e.length;n++)if(e[n].value===t)return n;return-1}function te(e,t,n,r){var i=t.layout.qHyperCube.qDimensionInfo.length,o=[{value:G.ONE_DIMENSION,translation:n.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:n.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:G.ALL_DIMENSIOANS,translation:n.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension"),tooltipTranslation:n.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension",".tooltip")},{value:G.DISREGARD_ALL_DIMENSIONS,translation:n.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:n.dimensionalScopeDisregardAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension",".tooltip")}];return o=function(e,t,n){if(e<2){var r=ee(t,0);t.splice(r,1)}return t}(i,o),function(e,t,n){if(0===e){var r=ee(t,1);t.splice(r,1)}return t}(Z(e,r).selectionScope,o)}function ne(e,t,n){var r=[{value:X.CURRENT_SELECTION,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:X.SELECT_FIELD_VALUE,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:X.DISREGARD_SELECTION,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return function(e,t,n){if(1===e){var r=ee(t,0);t.splice(r,1)}return t}(Z(e,n).dimensionalScope,r)}var re={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:G.DISREGARD_ALL_DIMENSIONS,selectionScope:X.DISREGARD_SELECTION};function ie(e){return 2===e?"{1}":""}function oe(e,t,n){return 1===e?"{$<".concat(k.getFieldWithWrapper(t),"={'").concat(n,"'}>}"):""}function ae(e,t){return 0===e&&t>1||2===e?"Total":""}function se(e,t,n){return 0===e&&t>1?"<".concat(k.getDimDefWithWrapper(n),">"):""}var 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,r=e.properties,i=e.layout,o=e.numDimensions,a=e.dimensionAndFieldList;if(!n)return t;var u=o;void 0===u&&(u=k.getNumDimensions({properties:r,layout:i}));var l=s(r,"qHyperCubeDef.qDimensions",[]),c=k.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:l,dimensionAndFieldList:a}),f=n.selectionScope,h=n.dimensionalScope;return function(e,t,n,r,i,o,a){var s=ie(t),u=oe(t,n,r),l=""===s&&""===u?"":s||u,c=ae(i,o),f=se(i,o,a),h=function(e){for(var t=[],n=0;n<e;n++)t[n]=k.getDimDefWithWrapper(n);return t.join(", ")}(o);return"".concat(e,"/ Sum(").concat(l," ").concat(c).concat(f," Aggr(").concat(l," ").concat(e,", ").concat(h,"))")}(c,f,n.field,n.value,h,u,n.primaryDimension)},initModifier:function(e){Object.keys(re).forEach((function(t){void 0===e[t]&&(e[t]=re[t])}))},updateModifier:function(e,t){1===(t.qDimensions?t.qDimensions.length:0)&&0===e.dimensionalScope&&(e.dimensionalScope=2)},enableTotalsFunction:function(){return!0},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:function(e,t){return!k.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(Q(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:X.DISREGARD_SELECTION,options:function(n){return ne(n,t,e)}},field:{refFn:function(t){return"".concat(Q(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 Z(t,e).selectionScope===X.SELECT_FIELD_VALUE}},value:{refFn:function(t){return"".concat(Q(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return Z(t,e).selectionScope===X.SELECT_FIELD_VALUE}},dimensionalScope:{refFn:function(t){return"".concat(Q(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:G.DISREGARD_ALL_DIMENSIONS,supportTooltip:!0,options:function(n,r){return te(n,r,t,e)}},primaryDimension:{refFn:function(t){return"".concat(Q(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(Z(t,e).dimensionalScope||0)===G.ONE_DIMENSION&&n.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return k.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(J))return!1;var o=Z(t,e);return o&&!o.disabled}}},getDisregardSelectionComp:ie,getFieldSelectionComp:oe,getTotalComp:ae,getSelectedDimComp:se},le={getExpression:function(e){return s(e,"qDef.base.qDef")||s(e,"qDef.qDef")},getExpressionRef:function(e){return s(e,"qDef.base.qDef")?"qDef.base.qDef":"qDef.qDef"},getLibraryIdRef:function(e){return s(e,"qDef.base.qLibraryId")?"qDef.base.qLibraryId":"qLibraryId"},getLibraryId:function(e){return s(e,"qDef.base.qLibraryId")||s(e,"qLibraryId")},getLabelRef:function(e){return s(e,"qDef.base")?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return s(e,"qDef.base")?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}},ce={initBase:function(e,t){(t||ce.isValid(e))&&(a(e,"qDef.base.qDef",s(e,"qDef.qDef")),a(e,"qDef.base.qLibraryId",s(e,"qLibraryId")),a(e,"qDef.base.qLabel",s(e,"qDef.qLabel")),a(e,"qDef.base.qLabelExpression",s(e,"qDef.qLabelExpression")))},restoreBase:function(e){ce.isValid(e)&&(a(e,"qDef.qDef",s(e,"qDef.base.qDef")),a(e,"qLibraryId",s(e,"qDef.base.qLibraryId")),a(e,"qDef.qLabel",s(e,"qDef.base.qLabel")),a(e,"qDef.qLabelExpression",s(e,"qDef.base.qLabelExpression")),s(e,"qDef.qAggrFunc")&&s(e,"qDef.base.qAggrFunc")&&a(e,"qDef.qAggrFunc",s(e,"qDef.base.qAggrFunc")),delete e.qDef.base)},isValid:function(e){var t=s(e,"qDef.base.qDef"),n=s(e,"qDef.base.qLibraryId");return void 0!==t||void 0!==n}},fe=ce;function he(e){return(he="function"==typeof Symbol&&"symbol"==r(Symbol.iterator)?function(e){return r(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":r(e)})(e)}var de={accumulation:j,movingAverage:V,difference:K,normalization:ue},pe=(t.default={modifiers:de,apply:me,applyModifiers:ge,cleanUpMeasure:ye,destroy:function(e){e&&pe[e.id]&&pe[e.id].masterItemSubscriber&&(pe[e.id].masterItemSubscriber&&pe[e.id].masterItemSubscriber.unsubscribe(),delete pe[e.id])},hasActiveModifiers:ve,getActiveModifier:be,initBase:fe.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some((function(e){return de[e]}))},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some((function(e){return de[e]&&de[e].isApplicable({properties:n,layout:r})}))},measureBase:le,limitedSorting:function(e){var t=e.measures,n=e.properties,r=e.layout,i=!1,o=!1;return t.forEach((function(e){var t=ke(e);Ee({modifiers:t,properties:n,layout:r})&&(i=!0,o=o||Oe({modifiers:t,properties:n,layout:r}))})),i&&!o},ifEnableTotalsFunction:xe},{});function me(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.model,n=e.properties,r=e.isSnapshot,i=void 0!==r&&r,a=e.masterItem;pe[t.id]=pe[t.id]||{isFirstTime:!0};var u=pe[t.id].isFirstTime;if(pe[t.id].isFirstTime=!1,n&&"object"===he(n))return ge({model:t,properties:n});var l=t?t.layout:void 0,c=s(l,"qSelectionInfo.qInSelections");if(i||c)return Promise.resolve(!1);var f=s(l,"qHyperCube.qMeasureInfo"),h=pe[t.id].lastReloadTime;if(pe[t.id].lastReloadTime=s(t,"app.layout.qLastReloadTime"),ve({measures:f,layout:l})){var d=function(e){var t=e.measures,n=e.layout,r=e.lastReloadTime;return s(e.model,"app.layout.qLastReloadTime")!==r&&function(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ce({measure:e,properties:n,layout:r})}))}({measures:t,layout:n})}({measures:f,layout:l,model:t,lastReloadTime:h});return d||function(e){var t=e.measures,n=e.layout,r=e.masterItem,i=e.isFirstTime;return!!Array.isArray(t)&&(i||r||t.some((function(e){return function(e){var t=e.measure,n=e.layout;return Ee({modifiers:ke(t),layout:n})?!t.base:!!t.base}({measure:e,layout:n})})))}({measures:f,layout:l,masterItem:a,isFirstTime:u})?t.getEffectiveProperties().then((function(e){var n=o()(!0,{},e);_e(n);var r=Ie(n);return Ae({model:t}).then((function(i){return Te({libraryIds:r,model:t}).then((function(r){return d&&function(e){var t=e.properties;we(t).forEach((function(e){return function(e){var t=e.measure;if(Ce({measure:t,properties:e.properties})){var n=0,r=t.qDef.modifiers;Array.isArray(r)&&r.forEach((function(e){if("object"===he(e)&&!e.disabled){if(n++,"object"!==he(de[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 r=de[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==r&&qe(t)&&k.simplifyExpression(t.qDef.base.qDef)!==k.simplifyExpression(r)&&(t.qDef.base.qDef=r)}}))}}({measure:e,properties:t})}))}({properties:n}),ge({model:t,oldProperties:e,properties:n,runUpdateIfChange:!0,masterItem:a,libraryItemsProps:r,dimensionAndFieldList:i})}))}))})):Promise.resolve(!1)}return function(e){return!!Array.isArray(e)&&e.some((function(e){return"object"===he(e.base)}))}(f)?t.getEffectiveProperties().then((function(e){return function(e){var t=e.model,n=e.properties,r=Ie(n);return Pe({model:t,libraryIds:r}).then((function(){var e=o()(!0,{},n);return we(n).forEach((function(e){return ye(e)})),Re({oldProperties:e,newProperties:n,model:t})}))}({model:t,properties:e})})):Promise.resolve(!1)}function ge(e){var t=e.model,n=e.oldProperties,r=e.properties,i=e.measures,a=e.runUpdateIfChange,u=void 0!==a&&a,l=e.masterItem,c=e.libraryItemsProps,f=e.dimensionAndFieldList;void 0===n&&(n=u?o()(!0,{},r):r),_e(r);var h=Ie(r);return Pe({model:t,libraryIds:h,masterItem:l}).then((function(){return function(e){var t=e.measures,n=e.properties,r=e.model,i=e.libraryItemsProps,a=e.dimensionAndFieldList;if(t||(t=we(n)),!t.length)return Promise.resolve();if(!ve({measures:t,properties:n}))return t.forEach((function(e){return ye(e)})),Promise.resolve();var u=i?void 0:Ie(n);return Ae({model:r,dimensionAndFieldList:a}).then((function(e){return Te({libraryIds:u,model:r,libraryItemsProps:i}).then((function(r){t.forEach((function(t){Ee({modifiers:t.qDef.modifiers,properties:n})?(function(e){var t=e.measure,n=e.properties,r=e.libraryItemsProps,i=e.dimensionAndFieldList,a=0;fe.isValid(t)||fe.initBase(t,!0);var u=t.qDef,l=u.modifiers,c=u.base;Array.isArray(l)&&l.forEach((function(e){if("object"===he(e)&&!e.disabled){if(a++,"object"!==he(de[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)");de[e.type].initModifier(e);var u=t.qLibraryId||c&&c.qLibraryId;u?function(e){var t=e.measure,n=e.modifier,r=e.properties,i=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],s=a.qMeasure.qDef,u=de[n.type].generateExpression({expression:s,modifier:n,properties:r,dimensionAndFieldList:i});n.outputExpression=u,t.qDef.qDef=n.outputExpression,(t.qDef.qLabel||a.qMeasure.qLabel)&&(t.qDef.qLabel=a.qMeasure.qLabel),(t.qDef.qLabelExpression||a.qMeasure.qLabelExpression)&&(t.qDef.qLabelExpression=a.qMeasure.qLabelExpression),t.qDef.quarantine&&t.qDef.quarantine.qNumFormat&&a.qMeasure.qNumFormat&&(t.qDef.qNumFormat=a.qMeasure.qNumFormat,t.qDef.isCustomFormatted=a.qMeasure.isCustomFormatted),delete t.qLibraryId,t.qDef.coloring=a.qMeasure.coloring,n.base=o()(!0,{},t.qDef.base)}({measure:t,modifier:e,libraryId:u,properties:n,libraryItemsProps:r,dimensionAndFieldList:i}):function(e){var t=e.measure,n=e.modifier,r=e.properties,i=e.dimensionAndFieldList;"function"==typeof de[n.type].updateModifier&&de[n.type].updateModifier(n,r.qHyperCubeDef);var a=le.getExpression(t),s=de[n.type].generateExpression({expression:a,modifier:n,properties:r,dimensionAndFieldList:i});n.outputExpression=s,t.qDef.qDef=n.outputExpression,t.qDef.base.qLabelExpression?t.qDef.qLabelExpression=t.qDef.base.qLabelExpression:t.qDef.qLabel=t.qDef.base.qLabel||a,n.base=o()(!0,{},t.qDef.base)}({measure:t,modifier:e,properties:n,dimensionAndFieldList:i}),function(e){var t=s(e,"qDef.qAggrFunc");"Expr"!==t||xe(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&xe(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(t)}}))}({measure:t,properties:n,libraryItemsProps:r,dimensionAndFieldList:e}),Se(t)):ye(t)}))}))}))}({measures:i,properties:r,model:t,libraryItemsProps:c,dimensionAndFieldList:f}).then((function(){return u?Re({oldProperties:n,newProperties:r,model:t}):Promise.resolve(!1)}))}))}function ye(e){!function(e){var t=ke(e);return Array.isArray(t)&&t.some((function(e){return"object"===he(e)&&!e.disabled&&!de[e.type]}))}(e)?fe.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,Se(e)}function ve(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ee({modifiers:ke(e),properties:n,layout:r})}))}function be(e){var t=ke(e);if(Array.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];if(de[r.type]&&!r.disabled)return r}}function xe(e){var t=be(e);return!t||de[t.type].enableTotalsFunction(e)}function we(e){return s(e,"qHyperCubeDef.qMeasures",[]).concat(s(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function ke(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function Me(e){return s(e,"outputExpression.qValueExpression.qExpr")||s(e,"outputExpression")}function _e(e){we(e).forEach((function(e){return function(e){var t=be(e);t&&(void 0!==t.outputExpression&&Me(t)!==e.qDef.qDef?delete e.qDef.base:!fe.isValid(e)&&t.base&&(e.qDef.base=o()(!0,{},t.base)))}(e)}))}function Se(e){var t=ke(e);Array.isArray(t)&&t.forEach((function(t){"object"===he(t)&&(t.disabled||!de[t.type]&&Me(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)}))}function qe(e){return e.base||e.qDef&&e.qDef.base}function De(e){var t=qe(e);return e.qLibraryId||t&&t.qLibraryId}function Ce(e){var t=e.measure,n=e.properties,r=e.layout;return!De(t)&&Ee({modifiers:ke(t),properties:n,layout:r})}function Ee(e){var t=e.modifiers,n=e.properties,r=e.layout,i={};return Array.isArray(t)&&t.some((function(e){return!("object"!==he(e)||e.disabled||!de[e.type])&&(void 0===i[e.type]&&(i[e.type]=de[e.type].isApplicable({properties:n,layout:r})),i[e.type])}))}function Ae(e){var t=e.model,n=e.dimensionAndFieldList;if(n)return Promise.resolve(n);var r=[],i={},o=t.app.getDimensionList().then((function(e){i.dimensionList=e}));r.push(o);var a=t.app.getFieldList().then((function(e){i.fieldList=e}));return r.push(a),Promise.all(r).then((function(){return i}))}function Te(e){var t=e.libraryIds,n=e.model,r=e.libraryItemsProps;if(r)return Promise.resolve(r);var i=t.measureLibraryIds,o=t.dimensionLibraryIds,a={},s=[];return i.forEach((function(e){var t=n.app.getMeasure(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));s.push(t)})),o.forEach((function(e){var t=n.app.getDimension(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));s.push(t)})),Promise.all(s).then((function(){return a}))}function Ne(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Re(e){var t=e.oldProperties,n=e.newProperties,r=e.model,i=JSON.stringify(s(t,"qHyperCubeDef.qMeasures"),Ne)!==JSON.stringify(s(n,"qHyperCubeDef.qMeasures"),Ne)||JSON.stringify(s(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ne)!==JSON.stringify(s(n,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ne);return i?function(e){var t=e.model,n=e.oldProperties,r=e.newProperties,i=t.layout;return i&&!i.qHasSoftPatches&&!i.qExtendsId&&s(i,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(r):R(t,n,r)}({model:r,oldProperties:t,newProperties:n}).then((function(){return i})):Promise.resolve(i)}function Oe(e){var t=e.modifiers,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some((function(e){return"object"===he(e)&&!e.disabled&&de[e.type]&&de[e.type].needDimension({modifier:e,properties:n,layout:r})}))}function Ie(e){var t=we(e),n=[],r=[],i=!1;return t.forEach((function(t){var r=ke(t);if(Ee({modifiers:r,properties:e})){var o=De(t);o&&n.push(o),i=i||Oe({modifiers:r,properties:e})}})),s(e,"qHyperCubeDef.qDimensions",[]).forEach((function(e){var t=e.qLibraryId;t&&r.push(t)})),{measureLibraryIds:n,dimensionLibraryIds:r}}function Pe(e){var t=e.model,n=e.libraryIds;return!e.masterItem&&n&&(n.measureLibraryIds.length||n.dimensionLibraryIds.length)?(pe[t.id].masterItemSubscriber=pe[t.id].masterItemSubscriber||function(e){var t=e.model,n=e.callback,r={},i={},o={},a={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function u(e){var t={},n=s(e,"qInfo.qType");return n&&a[n]&&a[n].forEach((function(n){t[n]=s(e,n)})),JSON.stringify(t)}function l(e){var t=e.qInfo.qId;if(r[t]){var i=u(e);r[t].properties!==i&&(r[t].properties=i,"function"==typeof n&&r[t].enabled&&n(e)),r[t].enabled=!0}}function c(e,n){return t.app[n](e).then((function(t){r[e]={listener:t.layoutSubscribe(l),enabled:!1,properties:u(t.layout)}}))}return{subscribe:function(e){var n=e.measureLibraryIds,a=e.dimensionLibraryIds,s=[];return function(e){var t=e.dimensionLibraryIds;i={},e.measureLibraryIds.forEach((function(e){i[e]=!0})),o={},t.forEach((function(e){o[e]=!0}))}({measureLibraryIds:n,dimensionLibraryIds:a}),Object.keys(r).forEach((function(e){i[e]||o[e]||(r[e].listener.dispose(),delete r[e])})),t.app&&(Object.keys(i).forEach((function(e){i[e]&&!r[e]&&s.push(c(e,"getMeasure"))})),Object.keys(o).forEach((function(e){o[e]&&!r[e]&&s.push(c(e,"getDimension"))}))),Promise.all(s)},unsubscribe:function(){Object.keys(r).forEach((function(e){r[e].listener.dispose()})),r={}}}}({model:t,callback:function(e){return me({model:t,masterItem:e}).then((function(){return t.app.clearUndoBuffer()}))}}),pe[t.id].masterItemSubscriber.subscribe(n)):Promise.resolve()}}])},function(e,t,n){function i(e){var t=function e(t){var n,r=t;return r>9?(n=65+r-10)>90&&(n+=6):r="".concat(r).charCodeAt(0),[48,111,79,105,73,108].indexOf(n)>-1?e(r+1):String.fromCharCode(n)}(e%62),n=Math.floor(e/62);return n>0?i(n)+t:t}function o(e){return(o="function"==typeof Symbol&&"symbol"==r(Symbol.iterator)?function(e){return r(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":r(e)})(e)}n.r(t);var a={getValue:function(e,t,n){if(null==e||null==t)return n;for(var r=t.split("."),i=e,o=0;o<r.length;++o){var a=r[o];if(""!==a){if(void 0===i[a]||null===i[a])return n;i=i[a]}}return i},setValue:function(e,t,n){if(null!=e&&null!=t){for(var r=t.split("."),i=r[r.length-1],o=e,a=0;a<r.length-1;++a){var s=r[a];void 0!==o[s]&&null!==o[s]||(o[s]=Number.isNaN(+r[a+1])?{}:[]),o=o[s]}void 0!==n?o[i]=n:delete o[i]}},isEmpty:function(e){return 0===Object.keys(e).length&&e.constructor===Object},isAtomicValue:function(e){return/boolean|number|string/.test(o(e))},generateId:function(){return i(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};function s(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return u(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)?u(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 u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))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,r=new Array(t);n<t;n++)r[n]=e[n];return r}function f(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return r;return-1}return-1}var 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 r=0;r<t.length;r++){var i=e.indexOf(t[r]);if(n>i)return!1;n=i}return!0}return!1},indexAdded:function(e,t){var n;for(n=0;n<e.length;++n)e[n]>=0&&e[n]>=t&&++e[n];e.push(t)},indexRemoved:function(e,t){var n,r=0;for(n=0;n<e.length;++n)e[n]>t?--e[n]:e[n]===t&&(r=n);return e.splice(r,1),r},findItemByPropertyValue:function(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return e[r];return null}return null},findIndexByPropertyValue:f},d=n(1),p=n.n(d),m={addDimensions:function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,i=n.data[0];(t=i.dimensions).push.apply(t,s(r.qDimensions));var o,u=a.getValue(r,"qLayoutExclude.qHyperCubeDef.qDimensions");u&&(o=i.excludedDimensions).push.apply(o,s(u))},addMeasures:function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,i=n.data[0];(t=i.measures).push.apply(t,l(r.qMeasures));var o,s=a.getValue(r,"qLayoutExclude.qHyperCubeDef.qMeasures");s&&(o=i.excludedMeasures).push.apply(o,l(s))},setInterColumnSortOrder:function(e){var t=e.exportFormat,n=e.qHyperCubeDef,r=t.data[0];n.qInterColumnSortOrder||(n.qInterColumnSortOrder=[]),r.interColumnSortOrder=n.qInterColumnSortOrder.concat();var i=a.getValue(n,"qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder");i&&h.isOrderedSubset(i,r.interColumnSortOrder)&&(r.interColumnSortOrder=i.concat())},copyProperties:function(e){var t=e.exportFormat,n=e.properties;Object.keys(n).forEach((function(e){t.properties[e]=n[e]}))},updateLayoutExclude: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===a.getValue(e,t)&&a.setValue(e,t,e.qLayoutExclude.changed[t].from)}))}(n),delete n.qLayoutExclude.changed),n.qLayoutExclude.quarantine&&!a.isEmpty(n.qLayoutExclude.quarantine)||delete n.qLayoutExclude},storeMeasuresModifiers:function(e){e.forEach((function(e){p.a.cleanUpMeasure(e),e.qDef.modifiers&&(e.store={modifiers:e.qDef.modifiers},delete e.qDef.modifiers)}))}};function g(e,t,n){var r,i,o=a.getValue(e,t);if(!a.isAtomicValue(o))try{if((i=(i=(r=JSON.stringify(o)).match(/:\{/g))?i.length:0)>2)return;o=JSON.parse(r)}catch(e){return}a.getValue(e,"qLayoutExclude.quarantine")||a.setValue(e,"qLayoutExclude.quarantine",{});var s=a.getValue(e,"qLayoutExclude.quarantine");s[n]||(s[n]={}),s[n][t]=o}var y=n(0),v=n.n(y);function b(e,t){var n=v()(!0,{},t,e);return a.getValue(n,"qOtherTotalSpec.qOtherCounted")||a.setValue(n,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),a.getValue(n,"qOtherTotalSpec.qOtherLimit")||a.setValue(n,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),n.hasOwnProperty("othersLabel")||(n.othersLabel="Others"),n}function x(e,t){return v()(!0,{},t,e)}function w(e,t,n){return"function"==typeof e?e(t):Number.isNaN(+e)?n:e}var k=Math.pow(2,53)-1;function M(e){return function(e){if(Array.isArray(e))return _(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return _(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)?_(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 _(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function S(e){return function(e){if(Array.isArray(e))return q(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return q(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)?q(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 q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var D={importCommonProperties:function(e,t,n){var r="masterobject"===a.getValue(t,"properties.qInfo.qType")?"masterobject":a.getValue(n,"qInfo.qType");a.setValue(e,"qInfo.qType",r),e.visualization=n.visualization},copyPropertyIfExist:function(e,t,n){t.hasOwnProperty(e)&&(n[e]=t[e])},copyPropertyOrSetDefault:function(e,t,n,r){t.hasOwnProperty(e)?n[e]=t[e]:n[e]=r},getDefaultDimension: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}}},getDefaultMeasure:function(){return{qDef:{autoSort:!0,cId:"",numFormatFromTemplate:!0},qLibraryId:"",qTrendLines:[]}},addDimensions:function(e){var t,n=e.exportFormat,r=e.maxDimensions,i=e.minDimensions,o=e.newHyperCubeDef,a=e.defaultDimension,s=n.data[0];for(t=0;t<s.dimensions.length;++t){var u=b(s.dimensions[t],a);o.qDimensions.length<r?o.qDimensions.push(u):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(u)}for(t=0;t<s.excludedDimensions.length;++t){var l=b(s.excludedDimensions[t],a);o.qDimensions.length<i?o.qDimensions.push(l):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(l)}},addMeasures:function(e){var t,n=e.exportFormat,r=e.maxMeasures,i=e.minMeasures,o=e.newHyperCubeDef,a=e.defaultMeasure,s=n.data[0];for(t=0;t<s.measures.length;++t){var u=x(s.measures[t],a);o.qMeasures.length<r?o.qMeasures.push(u):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(u)}for(t=0;t<s.excludedMeasures.length;++t){var l=x(s.excludedMeasures[t],a);o.qMeasures.length<i?o.qMeasures.push(l):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(l)}},getMaxMinDimensionMeasure:function(e){var t=e.exportFormat,n=e.dataDefinition,r=void 0===n?{}:n,i=t.data[0],o=r.dimensions||{max:0},a=r.measures||{max:0},s=w(a.max,i.dimensions.length,k),u=w(a.min,i.dimensions.length,0);return{maxDimensions:w(o.max,s,k),minDimensions:w(o.min,u,0),maxMeasures:s,minMeasures:u}},setInterColumnSortOrder:function(e){var t=e.exportFormat,n=e.newHyperCubeDef,r=t.data[0],i=n.qDimensions.length+n.qMeasures.length;n.qInterColumnSortOrder=r.interColumnSortOrder.concat();var o=n.qInterColumnSortOrder.length;if(o!==i)for(n.qLayoutExclude&&(n.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=r.interColumnSortOrder.concat());o!==i;)o<i?(h.indexAdded(n.qInterColumnSortOrder,o),++o):(--o,h.indexRemoved(n.qInterColumnSortOrder,o))},createNewProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.hypercubePath,i={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(t.properties).forEach((function(e){"qLayoutExclude"===e?t.properties[e].quarantine&&(i.qLayoutExclude.quarantine=v()(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&r?a.setValue(i,"".concat(r,".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)?i[e]=t.properties[e]:i.qLayoutExclude.disabled[e]=t.properties[e]})),null===(i=v()(!0,{},n,i)).components&&(i.components=[]),i},shouldInitLayoutExclude:function(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,i=e.maxMeasures,o=e.minMeasures,a=t.data[0];return a.dimensions.length>n&&n>0||a.measures.length>i&&i>0||a.excludedDimensions.length>0&&a.dimensions.length+a.excludedDimensions.length>r||a.excludedMeasures.length>0&&a.measures.length+a.excludedMeasures.length>o||!i&&a.measures.length>0||!n&&a.dimensions.length>0},initLayoutExclude:function(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,i=e.maxMeasures,o=e.minMeasures,a=e.newHyperCubeDef,s=t.data[0];a.qLayoutExclude||(a.qLayoutExclude={}),a.qLayoutExclude.qHyperCubeDef||(a.qLayoutExclude.qHyperCubeDef={}),(s.dimensions.length>n&&n>0||s.excludedDimensions&&s.excludedDimensions.length&&s.dimensions.length+s.excludedDimensions.length>r)&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[])),(s.measures.length>i&&i>0||s.excludedMeasures&&s.excludedMeasures.length&&s.measures.length+s.excludedMeasures.length>o)&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!i&&s.measures.length&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!n&&s.dimensions.length&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[]))},updateDimensionsOnAdded:function(e){var t=e.newProperties,n=e.dataDefinition,r=e.hypercubePath;if(n.dimensions&&"function"==typeof n.dimensions.added){var i=a.getValue(t,r||"").qHyperCubeDef,o=M(i.qDimensions);i.qDimensions=[],o.forEach((function(e){i.qDimensions.push(e),n.dimensions.added(e,t)}))}},updateMeasuresOnAdded:function(e){var t=e.newProperties,n=e.dataDefinition,r=e.hypercubePath;if(n.measures&&"function"==typeof n.measures.added){var i=a.getValue(t,r||"").qHyperCubeDef,o=S(i.qMeasures);i.qMeasures=[],o.forEach((function(e){i.qMeasures.push(e),n.measures.added(e,t)}))}},restoreMeasuresModifiers:function(e){var t=e.measures,n=e.modifierTypes;t&&n&&p.a.isSupportedModifiers(n)&&t.forEach((function(e){e.store&&e.store.modifiers&&(e.qDef.modifiers=e.store.modifiers),delete e.store}))}};function C(e,t){var n=a.getValue(e,"qLayoutExclude.quarantine",{})[t];return!!n&&(Object.keys(n).forEach((function(t){a.setValue(e,t,n[t])})),delete e.qLayoutExclude.quarantine[t],!0)}var E={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,i=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}(),o=t.qProperty,s=a.getValue(o,n||""),u=s.qHyperCubeDef;return u.qInterColumnSortOrder||(u.qInterColumnSortOrder=[]),m.addDimensions({exportFormat:i,qHyperCubeDef:u}),m.addMeasures({exportFormat:i,qHyperCubeDef:u}),m.setInterColumnSortOrder({exportFormat:i,qHyperCubeDef:u}),delete u.qLayoutExclude,m.copyProperties({exportFormat:i,properties:o}),n&&(i.properties.qHyperCubeDef=u,delete s.qHyperCubeDef),m.updateLayoutExclude({exportFormat:i,properties:o}),r||m.storeMeasuresModifiers(i.properties.qHyperCubeDef.qMeasures),Array.isArray(i.properties.filters)&&(g(i.properties,"filters","storedFilters"),delete i.properties.filters),i.properties.qHyperCubeDef.qContextSetExpression&&(g(i.properties,"qHyperCubeDef.qContextSetExpression","storedFilters"),i.properties.qHyperCubeDef.qContextSetExpression=""),i.properties.qHyperCubeDef.qDynamicScript&&i.properties.qHyperCubeDef.qDynamicScript.length&&(g(i.properties,"qHyperCubeDef.qDynamicScript","dynamicScript"),i.properties.qHyperCubeDef.qDynamicScript=[]),i},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=void 0===n?{}:n,i=e.dataDefinition,o=void 0===i?{}:i,s=e.defaultPropertyValues,u=void 0===s?{}:s,l=e.hypercubePath,c=e.extension,f=e.supportedFilters,h=void 0===f||f,d=e.isHCModifierSupported,p=void 0===d||d,m={qChildren:[]},g=D.createNewProperties({exportFormat:t,initialProperties:r,hypercubePath:l}),y=a.getValue(r,l||"").qHyperCubeDef,v=a.getValue(g,l||"").qHyperCubeDef,b=D.getMaxMinDimensionMeasure({exportFormat:t,dataDefinition:o}),x=b.maxDimensions,w=b.minDimensions,k=b.maxMeasures,M=b.minMeasures,_=u.defaultDimension,S=void 0===_?D.getDefaultDimension():_,q=u.defaultMeasure,E=void 0===q?D.getDefaultMeasure():q;v.qDimensions.length=0,v.qMeasures.length=0,D.shouldInitLayoutExclude({exportFormat:t,maxDimensions:x,minDimensions:w,maxMeasures:k,minMeasures:M})&&D.initLayoutExclude({exportFormat:t,maxDimensions:x,minDimensions:w,maxMeasures:k,minMeasures:M,newHyperCubeDef:v}),D.addDimensions({exportFormat:t,maxDimensions:x,minDimensions:w,newHyperCubeDef:v,defaultDimension:S}),D.addMeasures({exportFormat:t,maxMeasures:k,minMeasures:M,newHyperCubeDef:v,defaultMeasure:E}),D.updateDimensionsOnAdded({newProperties:g,dataDefinition:o,hypercubePath:l}),D.updateMeasuresOnAdded({newProperties:g,dataDefinition:o,hypercubePath:l}),D.setInterColumnSortOrder({exportFormat:t,newHyperCubeDef:v}),D.copyPropertyIfExist("qMaxStackedCells",y,v),D.copyPropertyIfExist("qNoOfLeftDims",y,v),D.copyPropertyOrSetDefault("qInitialDataFetch",y,v,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),D.copyPropertyOrSetDefault("qMode",y,v,"S"),D.copyPropertyOrSetDefault("qReductionMode",y,v,"N"),D.copyPropertyOrSetDefault("qSortbyYValue",y,v),D.copyPropertyOrSetDefault("qIndentMode",y,v),D.copyPropertyOrSetDefault("qShowTotalsAbove",y,v),D.importCommonProperties(g,t,r),m.qProperty=g;var A=a.getValue(c||{},"support.modifiers");return D.restoreMeasuresModifiers({measures:v.qMeasures,modifierTypes:A}),h&&C(m.qProperty,"storedFilters"),"S"===v.qMode&&p&&C(m.qProperty,"dynamicScript"),m}},A={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function T(e,t,n,r){t=t||[];var i=f(e,r,n),o=f(t,r,n);if(-1!==i&&-1===o){var a=e.splice(i,1);t.push(a[0])}return t}function N(e,t){return e.length!==t}var R={create:function(e,t){if(!e||!A[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,r,i){n=n||"qAttributeExpressions",i=i||"id";for(var o=0;o<e.length;o++){var a=e[o][n],s=t.length;if(T(a,t,r,i),N(t,s))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"}},O={getNumDimensions:function(e){return a.getValue(e,"qHyperCubeDef.qDimensions.length",0)},getNumMeasures:function(e){return a.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}},I={colorModeOptions:{primary:function(){return!0},dimension:function(e){return O.getNumDimensions(e)>0&&O.getNumMeasures(e)<=1},multiColor:function(e){return O.getNumMeasures(e)>1},measure:function(e){return O.getNumDimensions(e)>0},expression:function(e){return O.getNumMeasures(e)>=1}}},P={colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return O.getNumMeasures(e)>=1}}},L={scatterplot:P,"sn-scatter-plot":P,piechart:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return O.getNumMeasures(e)>=1}}},linechart:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return O.getNumDimensions(e)>1},multiColor:function(e){return O.getNumMeasures(e)>1},measure:function(e){return O.getNumDimensions(e)<=1},expression:function(e){return O.getNumMeasures(e)>=1}}},map:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return O.getNumDimensions(e)>=1},multiColor:function(e){return O.getNumMeasures(e)>1},measure:function(e){return O.getNumDimensions(e)>=1},expression:function(e){return O.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 O.getNumDimensions(e)>=1}}}};function j(e,t,n){if(Array.isArray(e[t])){var r=h.findIndexByPropertyValue(e[t],"id",n);r>=0&&e[t].splice(r,1)}else e[t]=[]}function z(e,t){var n=R.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach((function(e){j(e,"qAttributeDimensions",n),j(e,"qAttributeExpressions",n)})),t.forEach((function(e){j(e,"qAttributeDimensions",n),j(e,"qAttributeExpressions",n)}))}function F(e,t){if(t){var n="="===t.charAt(0);e.color.altLabel=n?{qStringExpression:{qExpr:t.substr(1)}}:t}}function H(e){var t=e.properties,n=e.isDimension,r=e.dimensions,i=e.excludedDimensions,o=e.measures,s=e.label;z(r,i);var u=r[r.length-1];if(u){var l=n?a.getValue(t,"color.byDimDef"):a.getValue(t,"color.byMeasureDef"),c=a.getValue(t,"color.formatting.qNumFormat"),f=a.getValue(t,"color.formatting.isCustomFormatted");if(l){var d=R.create(R.IDMAP.COLOR_BY_ALTERNATIVE);switch(l.type){case"expression":!function(e){var t=e.attributeExpression,n=e.label,r=e.item,i=e.isDimension,o=e.qNumFormat,a=e.isCustomFormatted;t.label=n||r.label,i?t.qDef=r.key:(t.qExpression=r.key,o&&(t.qNumFormat=o,t.isCustomFormatted=a)),t.matchMeasure=r.activeMeasureIndex,t.label&&"="===t.label.charAt(0)&&(t.labelExpRef="color.altLabel")}({attributeExpression:d,label:s,item:l,isDimension:n,qNumFormat:c,isCustomFormatted:f});break;case"libraryItem":!function(e){var t=e.attributeExpression,n=e.measures,r=e.item,i=e.isDimension,o=e.qNumFormat,a=e.isCustomFormatted;i||(t.matchMeasure=h.findIndexByPropertyValue(n,"qLibraryId",r.key),o&&(t.qNumFormat=o,t.isCustomFormatted=a)),void 0!==r.expression?t.qExpression=r.expression:t.qLibraryId=r.key,t.colorMapRef=r.key}({attributeExpression:d,measures:o,item:l,isDimension:n,qNumFormat:c,isCustomFormatted:f})}n?(d.qSortBy={qSortByAscii:1},u.qAttributeDimensions.push(d)):u.qAttributeExpressions.push(d)}}}function B(e,t,n,r){var i,o,a,s={};switch(e){case"dimension":n.qLibraryId?(s.type="dimension",s.name=n.qLibraryId,s.id=n.qLibraryId):(s.type="field",t?(s.name=n.label||n.qDef,s.id=n.qDef):(s.name=n.qDef.qFieldDefs[0],s.label=(a=n.qDef).qLabelExpression?a.qLabelExpression:a.qFieldLabels&&a.qFieldLabels[0]?a.qFieldLabels[0]:a.qFieldDefs[0]));break;case"measure":(i=function(e,t){return t?e.qLibraryId:p.a.measureBase.getLibraryId(e)}(n,t))?(s.type="measure",s.name=i,s.id=i,(o=function(e,t){return p.a.hasActiveModifiers({measures:[e]})&&t?e.qDef.qDef:void 0}(n,r))&&(s.expression=o)):(s.type="expression",t?(s.name=n.label||n.qExpression,s.id=n.qExpression):(s.name=n.qDef.qDef,s.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 s}var V={useMasterNumberFormat:function(e){e.quarantine={qNumFormat:e.qNumFormat||{},isCustomFormatted:e.isCustomFormatted||!1},e.qNumFormat=null,e.isCustomFormatted=void 0}};function W(e,t,n,r){var i=n?"expression":t.type,o=e.color,a=o.mode,s=O.getItemLabel(t);switch(F(e,s||""),i){case"field":a="byDimension",o.byDimDef={label:t.label||O.wrapFieldName(t.name),key:O.wrapFieldName(t.name),type:"expression",activeDimensionIndex:t.activeDimensionIndex};break;case"expression":a="byMeasure",o.byMeasureDef={label:n||s,key:n||t.name,type:"expression",activeMeasureIndex:t.activeMeasureIndex};break;case"dimension":a="byDimension",o.byDimDef={label:t.name,key:t.id,type:"libraryItem",activeDimensionIndex:t.activeDimensionIndex};break;case"measure":a="byMeasure",o.byMeasureDef={label:t.name,key:t.id,expression:t.expression,type:"libraryItem",activeMeasureIndex:t.activeMeasureIndex},o.formatting&&V.useMasterNumberFormat(o.formatting)}r||(o.auto=!1,o.mode=a)}function U(e,t){var n=a.getValue(e,"".concat(t,"qDimensions"),[]),r=n[function(e,t,n){var r=a.getValue(t,"visualization"),i=n.split("."),o=Number(i[1]),s=a.getValue(t,"layers.".concat(o,".type"));return 2===e.length&&"map"===r&&"point"===s}(n,e,t)?0:n.length-1],i=R.IDMAP.COLOR_BY_ALTERNATIVE,o=h.findItemByPropertyValue(r.qAttributeDimensions,"id",i);return W(e,B("dimension",!!o,o||r)),!!o}function $(e,t){var n=a.getValue(e,"".concat(t,"qDimensions"),[]),r=a.getValue(e,"".concat(t,"qMeasures"),[]),i=a.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),o=a.getValue(e,"color.byDimDef");if(o&&F(e,o.label),function(e){return!!(e&&e.activeDimensionIndex>-1)}(o))!function(e,t){var n=a.getValue(e,"".concat(t,"qDimensions"),[]),r=a.getValue(e,"color.byDimDef");r.activeDimensionIndex=Math.min(r.activeDimensionIndex,n.length-1);var i=B("dimension",!1,n[r.activeDimensionIndex]);i.activeDimensionIndex=r.activeDimensionIndex,W(e,i)}(e,t);else if(function(e){return!e||!e.key}(o)&&U(e,t))return;H({properties:e,isDimension:!0,dimensions:n,excludedDimensions:i,measures:r,label:a.getValue(e,"color.byDimDef.label")})}function Y(e,t){var n=a.getValue(e,"".concat(t,"qDimensions"),[]),r=a.getValue(e,"".concat(t,"qMeasures"),[]),i=a.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),o=a.getValue(e,"color.byMeasureDef");if(o&&F(e,o.label),function(e){return!!(e&&e.activeMeasureIndex>-1)}(o))!function(e,t){var n=a.getValue(e,"".concat(t,"qMeasures"),[]),r=a.getValue(e,"color.byMeasureDef");if(r.activeMeasureIndex=Math.min(r.activeMeasureIndex,n.length-1),r.activeMeasureIndex>-1){var i=B("measure",!1,n[r.activeMeasureIndex],!0);i.activeMeasureIndex=r.activeMeasureIndex,W(e,i)}}(e,t);else if(function(e,t){return(!e||!e.key)&&t.length>0}(o,r)&&function(e,t){var n=a.getValue(e,"".concat(t,"qDimensions"),[]),r=a.getValue(e,"".concat(t,"qMeasures"),[]),i=n[n.length-1],o=R.IDMAP.COLOR_BY_ALTERNATIVE,s=h.findItemByPropertyValue(i.qAttributeExpressions,"id",o);return W(e,B("measure",!!s,s||r[0])),!!s}(e,t))return;H({properties:e,isDimension:!1,dimensions:n,excludedDimensions:i,measures:r,label:a.getValue(e,"color.byMeasureDef.label")})}var K={changeProperty:function(e,t,n){a.setValue(e,t,n),a.isAtomicValue(n)&&function(e,t,n){var r=e.qLayoutExclude;r&&(r.changed||(r.changed={}),r.changed[t]={from:a.getValue(e,t),to:n})}(e,t,n)},getCanColorBy:function(e,t){var n={primary:!0};if(e){var r=(L[t]||I).colorModeOptions||I.colorModeOptions;n.byDimension=r.dimension(e),n.byMeasure=r.measure(e),n.byMultiple=r.multiColor(e),n.byExpression=r.expression(e)}return n},shouldUpdateColorBy:function(e){var t=e.canColorBy,n=e.autoColor,r=e.colorMode,i=e.dimensions;return!(t[r]&&!n&&("byDimension"!==r&&"byMeasure"!==r||!i.length))},updateColorBy:function(e,t){var n=a.getValue(e,"color.mode"),r=a.getValue(e,"color.auto"),i=a.getValue(e,"".concat(t,"qDimensions"),[]),o=a.getValue(e,"".concat(t,"qMeasures"),[]),s=a.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);r?z(i,s):function(e){var t=e.auto,n=e.colorMode,r=e.dimensions;return!t&&"byDimension"===n&&r.length>0}({auto:r,colorMode:n,dimensions:i})?$(e,t):function(e){var t=e.auto,n=e.colorMode,r=e.dimensions,i=e.measures,o=e.properties,s=a.getValue(o,"visualization");return!(t||"byMeasure"!==n||!r.length||"map"!==s&&!i.length)}({auto:r,colorMode:n,dimensions:i,measures:o,properties:e})?Y(e,t):function(e,t){var n=a.getValue(e,"color.mode"),r=a.getValue(e,"".concat(t,"qDimensions"),[]),i=a.getValue(e,"".concat(t,"qMeasures"),[]),o=a.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);"byMultiple"===n&&i.length<2&&a.setValue(e,"color.mode","primary"),z(r,o)}(e,t)},deleteTotalMode:function(e){e.forEach((function(e){e.qOtherTotalSpec&&"qTotalMode"in e.qOtherTotalSpec&&delete e.qOtherTotalSpec.qTotalMode}))},shouldAddColorByExpression:function(e){var t=e.shouldUpdateColorBy,n=e.properties,r=a.getValue(n,"qHyperCubeDef.qMeasures",[]),i=a.getValue(n,"color.mode","");return!t&&"byExpression"===i&&r.length>0},addColorByExpression:function(e){var t=a.getValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",[]),n=a.getValue(e,"color.colorExpression","");t.splice(0,0,{qExpression:n,id:"colorByExpression"}),a.setValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",t)},switchToAutoColor:function(e){a.setValue(e,"color.mode","primary"),a.setValue(e,"color.auto",!0)},shouldSwitchToColorPersistent:function(e){var t=a.getValue(e,"qHyperCubeDef.qDimensions",[]),n=a.getValue(e,"color.persistent",!1);return t.length>1&&!n}},X={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,i=E.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),o=i.data[0],a=o.dimensions.concat(o.excludedDimensions),s=o.measures.concat(o.excludedMeasures),u=R.IDMAP,l=u.COLOR_BY_ALTERNATIVE,c=u.COLOR_BY_EXPRESSION;return R.moveByIdFromGroup(a,[],"qAttributeDimensions",l),R.moveByIdFromGroup(a,[],"qAttributeExpressions",l),R.moveByIdFromGroup(s,[],"qAttributeExpressions",c),i},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,i=e.defaultPropertyValues,o=e.hypercubePath,s=e.extension,u=e.supportedFilters,l=e.isHCModifierSupported,c=E.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:i,hypercubePath:o,extension:s,supportedFilters:u,isHCModifierSupported:l}),f=c.qProperty,h=a.getValue(f,"visualization"),d=a.getValue(f,"qHyperCubeDef.qDimensions",[]),p=a.getValue(f,"color.mode",""),m=a.getValue(f,"color.auto",""),g=K.getCanColorBy(f,h),y=K.shouldUpdateColorBy({canColorBy:g,autoColor:m,colorMode:p,dimensions:d});return g[p]?K.shouldAddColorByExpression({shouldUpdateColorBy:y,properties:f})&&K.addColorByExpression(f):K.switchToAutoColor(f),y&&K.updateColorBy(f,"qHyperCubeDef."),K.shouldSwitchToColorPersistent(f)&&K.changeProperty(f,"color.persistent",!0),K.deleteTotalMode(d),c}},G=["bar","marker","line"],J={handleAutoMinMax:function(e){var t=e.initialProperties,n=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?C(n,"unsupportedAutoMinMax")||v()(n.measureAxis,t.measureAxis):C(n,"supportedAutoMinMax")||v()(n.measureAxis,t.measureAxis)},handleMeasuresAxis:function(e){var t,n=e.exportFormat,r=e.initialProperties,i=e.properties,o=e.measureType,a=i.qHyperCubeDef,s=i.measureAxis;if(function(e){var t=e.exportFormat,n=e.initialProperties;return!(!t.properties.measureAxes||n.measureAxes||!n.measureAxis||void 0===n.measureAxis.autoMinMax)}({exportFormat:n,initialProperties:r})){var u=function(e){var t=[];return e.qMeasures.length>0&&e.qMeasures.forEach((function(e){if(e.qDef.series){var n=e.qDef.series,r=n.type,i=n.axis;t[i]||(t[i]={axis:i,type:{line:0,marker:0,bar:0,total:0}}),G.includes(r)&&t[i].type[r]++,t[i].type.total++}})),t}(a);u.length?(o&&(t=u.filter((function(e){return e.type[o]>0})).sort((function(e,t){return t.type[o]-e.type[o]}))),t&&t.length||(t=u.sort((function(e,t){return t.type.total-e.type.total}))),t&&t[0]&&v()(s,n.properties.measureAxes[t[0].axis])):v()(s,n.properties.measureAxes[0])}},setInterColumnSortOrder: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}}}},Z={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,i=e.supportedAutoMinMax,o=void 0===i||i,a=X.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),s=a.properties;return o?(g(s,"measureAxis.min","supportedAutoMinMax"),g(s,"measureAxis.max","supportedAutoMinMax")):(g(s,"measureAxis.min","unsupportedAutoMinMax"),g(s,"measureAxis.max","unsupportedAutoMinMax")),a},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,i=e.defaultPropertyValues,o=e.hypercubePath,a=e.measureType,s=e.extension,u=e.supportedFilters,l=e.isHCModifierSupported,c=X.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:i,hypercubePath:o,extension:s,supportedFilters:u,isHCModifierSupported:l}),f=c.qProperty;return J.handleAutoMinMax({initialProperties:n,properties:f}),J.handleMeasuresAxis({exportFormat:t,initialProperties:n,properties:f,measureType:a}),J.setInterColumnSortOrder(f.qHyperCubeDef),c}};function Q(e,t,n){return"qLayoutExclude.quarantine.".concat(e,".").concat(t,".").concat(n)}function ee(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,i=e.arrayName,o=e.itemPath;a.getValue(t,n,[]).forEach((function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,i=e.item,o=e.itemPath,s=a.getValue(i,o);if(void 0!==s){var u=a.getValue(i,"qDef.cId");u||(u=a.generateId(),a.setValue(i,"qDef.cId",u));var l=Q(n,r,u);a.setValue(t,l,s),a.setValue(i,o,void 0)}}({properties:t,quarantineName:r,arrayName:i,item:e,itemPath:o})}))}function te(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,i=e.arrayName,o=e.itemPath;a.getValue(t,n,[]).forEach((function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,i=e.item,o=e.itemPath,s=a.getValue(i,"qDef.cId");if(s){var u=Q(n,r,s),l=a.getValue(t,u);void 0!==l&&(a.setValue(i,o,l),a.setValue(t,u,void 0))}}({properties:t,quarantineName:r,arrayName:i,item:e,itemPath:o})}))}var ne={quarantine:function(e){ee({properties:e,arrayPath:"qHyperCubeDef.qMeasures",quarantineName:"conditionalColoring",arrayName:"measures",itemPath:"qDef.conditionalColoring"})},unquarantine:function(e){te({properties:e,arrayPath:"qHyperCubeDef.qMeasures",itemPath:"qDef.conditionalColoring",arrayName:"measures",quarantineName:"conditionalColoring"})}},re={quarantine:function(e){ee({properties:e,arrayPath:"qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"measures",itemPath:"qCalcCondition"}),ee({properties:e,arrayPath:"qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"dimensions",itemPath:"qCalcCondition"})},unquarantine:function(e){te({properties:e,arrayPath:"qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"measures",itemPath:"qCalcCondition"}),te({properties:e,arrayPath:"qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"dimensions",itemPath:"qCalcCondition"})}};t.default={hypercube:E,colorChart:X,axisChart:Z,quarantineProperty:g,unquarantineProperty:C,quarantineArrayProp:ee,unquarantineArrayProp:te,conditionalColoring:ne,conditionalShow:re}}])}(iw);var ow=m(iw.exports);var aw={onChangeCalcCond:function(e){var t,n,r=null==e?void 0:e.qHyperCubeDef,i=null==e||null===(t=e.qUndoExclude)||void 0===t||null===(n=t.box)||void 0===n?void 0:n.qHyperCubeDef;r&&i&&(i.qCalcCond=r.qCalcCond,i.qCalcCondition=r.qCalcCondition)}},sw="maxCount",uw="size";function lw(e){return!(e.bins&&e.bins.auto)}function cw(e){return lw(e)&&e.bins.binMode===sw}function fw(e){var t=e.translator,n=e.anything.sense.theme;return{type:"items",component:"accordion",items:{data:{uses:"data",items:{dimensions:{translation:"Common.Fields",alternativeTranslation:"properties.alternative.fields",items:{dimensionLimits:{show:!1,items:{otherMode:{readOnly:!1},otherSortMode:{show:function(e){return"OTHER_COUNTED"===nv(e,"qOtherTotalSpec.qOtherMode")}},otherCounted:{show:function(e){return"OTHER_COUNTED"===nv(e,"qOtherTotalSpec.qOtherMode")}},otherLimitMode:{show:function(e){var t=nv(e,"qOtherTotalSpec.qOtherMode");return"OTHER_ABS_LIMITED"===t||"OTHER_REL_LIMITED"===t}},otherLimit:{show:function(e){var t=nv(e,"qOtherTotalSpec.qOtherMode");return"OTHER_ABS_LIMITED"===t||"OTHER_REL_LIMITED"===t}},calculatedAgainstMessage:{show:!0,label:function(){var e=t.get("properties.histogram.staticMeasureName");return t.get("Properties.DimensionLimits.CalculatedAgainst",e)}}}},others:{show:!1,items:{suppressOther:{defaultValue:!0}}}}}}},bins:{translation:"Visualization.Histogram.Bins",type:"items",component:"items",items:{auto:{ref:"bins.auto",translation:"Visualization.Histogram.Binning",component:"switch",type:"boolean",defaultValue:!0,undefinedValue:!1,options:[{value:!0,translation:"Visualization.Histogram.Binning.Auto"},{value:!1,translation:"Visualization.Histogram.Binning.Custom"}]},autoMessage:{component:"text",translation:"Visualization.Histogram.Binning.AutoDescription",show:function(e){return!lw(e)}},mode:{ref:"bins.binMode",type:"string",component:"dropdown",options:[{value:sw,translation:"Visualization.Histogram.Binning.NumberOfBinsOption"},{value:uw,translation:"Visualization.Histogram.Binning.BarWidthOption"}],defaultValue:sw,show:function(e){return lw(e)}},binCount:{ref:"bins.binCount",type:"number",expression:"optional",expressionType:"ValueExpression",translation:"Visualization.Histogram.Binning.BinCount",defaultValue:"",convertFunctions:{get:function(e,t,n){var r=n.properties.bins.binCount;return vx.isEmpty(r)?vx.getDerivedBinCount(n.layout):e(null)||""},set:function(e,t,n){t(n.type,e,void 0)}},show:cw},binMessage:{component:"text",translation:"Visualization.Histogram.Binning.BinCountRounding",show:function(e){var t=nv(e,"bins.binCount"),n="object"===r(t);return cw(e)&&!vx.isEmpty(t)&&!n&&!yx(t)&&t>0}},minBinMessage:{component:"text",translation:"Visualization.Histogram.Binning.BinCountMin",show:function(e){var t=nv(e,"bins.binCount");return!!(cw(e)&&!vx.isEmpty(t)&&t<=0)}},binSize:{ref:"bins.binSize",type:"number",expression:"optional",expressionType:"ValueExpression",defaultValue:10,show:function(e){return lw(e)&&e.bins.binMode===uw},translation:"Visualization.Histogram.Binning.BinSize"},offset:{ref:"bins.offset",type:"number",expression:"optional",expressionType:"ValueExpression",show:function(e){return lw(e)&&e.bins.binMode===uw},translation:"Visualization.Histogram.Binning.Offset"},distinct:{ref:"bins.countDistinct",type:"boolean",defaultValue:!1,component:"checkbox",translation:"Visualization.Histogram.CountDistinct"}}},addons:{type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond",change:aw.onChangeCalcCond}}},refLines:{uses:"reflines",items:{colorBackground:{show:!1}}}}},settings:{uses:"settings",items:{simpleLabels:{items:{labels:{items:{header:{show:function(e,t,n){var r;return null===(r=n.properties.qHyperCubeDef.qDimensions)||void 0===r?void 0:r.length}},pointLabels:{component:"checkbox",ref:"dataPoint.showLabels",type:"boolean",translation:"Simple.Label.Value",show:function(e,t,n){var r;return null===(r=n.properties.qHyperCubeDef.qDimensions)||void 0===r?void 0:r.length}},dimensionTitle:{component:"checkbox",ref:"dimensionAxis.show",type:"string",translation:"Simple.Label.XAxis.Hide",defaultValue:"all",show:function(e,t,n){var r;return null===(r=n.properties.qHyperCubeDef.qDimensions)||void 0===r?void 0:r.length},convertFunctions:{get:function(e,t,n){return"labels"===n.properties.dimensionAxis.show||"none"===n.properties.dimensionAxis.show},set:function(e,t,n,r){r.properties.dimensionAxis.show=e?"labels":"all"}}},measureTitle:{component:"checkbox",ref:"measureAxis.show",type:"string",translation:"Simple.Label.YAxis.Hide",defaultValue:"all",show:function(e,t,n){var r;return null===(r=n.properties.qHyperCubeDef.qDimensions)||void 0===r?void 0:r.length},convertFunctions:{get:function(e,t,n){return"labels"===n.properties.measureAxis.show||"none"===n.properties.measureAxis.show},set:function(e,t,n,r){r.properties.measureAxis.show=e?"labels":"all"}}}}}}},presentation:{type:"items",translation:"properties.presentation",items:{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:function(e){return e.gridlines&&!e.gridlines.auto}}}},showLabels:{ref:"dataPoint.showLabels",type:"boolean",translation:"properties.dataPoints.labelmode",component:"switch",defaultValue:!1,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],snapshot:{tid:"property-dataPoints"}}}},colors:{translation:"properties.colors",type:"items",items:{colors:{classification:{section:"color",tags:["simple"]},type:"items",items:{barColor:{ref:"color.bar.paletteColor",translation:"properties.histogram.barColor",type:"object",component:"color-picker",dualOutput:!0,defaultValue:function(){var e=n.getDataColorSpecials().primary,t=n.getDataColorPickerPalettes()[0].colors,r=t.indexOf(e);return{index:-1===r?Math.min(6,t.length-1):r}}}}}}},measureAxis:{uses:"axis.picasso.measureAxis",items:{label:{type:"string",expression:"optional",expressionType:"StringExpression",ref:"measureAxis.label",defaultValue:"",translation:"Common.Label",placeholderTranslation:"Visualization.Histogram.MeasureAxisLabel"}}},dimensionAxis:{uses:"axis.picasso.dimensionAxis",items:{othersGroup:{items:{label:{show:!1}}}}}}}}}}var hw={type:"items",component:"accordion",items:{data:{uses:"data",items:{dimensions:{translation:"Common.Fields"}}}}};var dw={getExportRawDataOptions:function(e,t,n){return e.addItem({translation:"contextMenu.export",tid:"export",select:function(){n.show(t.model,"/qUndoExclude/box/qHyperCubeDef")}}),Promise.resolve()}};function pw(e){var t;if(null!==(t=e.anything)&&void 0!==t&&t.sense)return{definition:fw(e),softDefinition:hw,support:{cssScaling:!1,snapshot:!0,export:!0,exportData:!0,sharing:!0,viewData:!0},importProperties:function(t,n,r,i){var o=qy(e);r.mapProperties();var a={defaultDimension:r.getDefaultDimensionProperties(),defaultMeasure:r.getDefaultMeasureProperties()};return ow.hypercube.importProperties({exportFormat:t,initialProperties:n,dataDefinition:o,defaultPropertyValues:a,hypercubePath:i})},exportProperties:function(e,t,n){return ow.hypercube.exportProperties({propertyTree:e,hyperCubePath:t,viewDataMode:n})},requireNumericDimension:!0,exportTableProperties:function(e){return ow.hypercube.exportProperties({propertyTree:e,hypercubePath:"qUndoExclude.box"})},getExportRawDataOptions:dw.getExportRawDataOptions}}return function(t){!function(e){if(e&&e.get&&e.add){var t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(v).forEach((function(t){e.add(v[t])}))}}(t.translator);var n=ky(),r=qy(t);return{qae:{properties:Sy,data:{targets:[r]}},ext:pw(t),component:function(){var t,r,i,a,s,u,l=e.useConstraints(),f=e.useElement(),h=(t=e.useApp(),r=e.useAppLayout(),i=e.useDeviceType(),a=e.useOptions(),s=e.useTheme(),u=e.useTranslator(),e.useMemo((function(){return{app:t,appLayout:r,deviceType:i,options:a,theme:s,translator:u}}),[t,r,a.direction,a.freeResize,u.language(),s.name(),i])),d=function(){var t=e.useConstraints(),n=c(e.useState(!1),2),r=n[0],i=n[1],o=c(e.useState(!1),2),a=o[0],s=o[1],u=!!e.useLayout().qSelectionInfo.qInSelections,l=c(e.useState((function(){return{toggle:function(){s((function(e){return!e}))}}})),1)[0];return e.useEffect((function(){t&&i(!t.select&&!t.active)}),[t]),e.useAction((function(){return{key:"lasso",label:"Lasso",icon:My,hidden:!r||!u,active:a,action:function(){s((function(e){return!e}))}}}),[u,a,r]),l.enabled=function(){return r},l.active=function(){return a},l}(),p=e.useModel(),m=e.useSelections(),g=e.useStaleLayout(),v=e.useRenderState(),b=c(e.useState(),2),x=b[0],w=b[1];e.useEffect((function(){var e=y(f),t=new rw(p),r=new nw({$element:e,backendApi:t,environment:h,lasso:d,picasso:n,selectionsApi:m,renderState:v});return w(r),function(){r.destroy()}}),[]);var k,M=c(e.usePromise(o(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(x){e.next=2;break}return e.abrupt("return");case 2:return x.updateEnvironment(h),x.updateConstraints(l),e.next=6,x.updateData(g);case 6:return e.next=8,x.paint();case 8:case"end":return e.stop()}}),e)}))),[g,x,h]),2)[1];if(M)throw M;!function(t){var n=e.useRect(),r=e.useOptions(),i=e.useConstraints(),a=c(e.usePromise(o(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:return t.updateConstraints(i),t.options=r,e.next=6,t.resize();case 6:case"end":return e.stop()}}),e)}))),[n.width,n.height]),2)[1];if(a)throw a}(x),k=x,e.onTakeSnapshot((function(e){if(k)return k.setSnapshotData(e)})),e.useImperativeHandle((function(){return{getViewState:function(){if(k)return k.getViewState()}}}),[k])}}}}));
25
25
  //# sourceMappingURL=sn-histogram.js.map