@nebula.js/sn-histogram 0.35.0 → 0.35.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/api-specifications/properties.json +1 -1
- package/core/esm/index.js +6 -4
- package/core/esm/index.js.map +1 -1
- package/dist/sn-histogram.js +10 -8
- package/dist/sn-histogram.js.map +1 -1
- package/dist/sn-histogram.systemjs.js +10 -8
- package/dist/sn-histogram.systemjs.js.map +1 -1
- package/package.json +15 -15
|
@@ -1,27 +1,29 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @nebula.js/sn-histogram v0.35.
|
|
2
|
+
* @nebula.js/sn-histogram v0.35.2
|
|
3
3
|
* Copyright (c) 2024 QlikTech International AB
|
|
4
4
|
* Released under the MIT license.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
System.register(["@nebula.js/stardust","picasso.js","picasso-plugin-q"],(function(e){"use strict";var t,n,r,i,o,a,s,l,u,c,p,d,
|
|
7
|
+
System.register(["@nebula.js/stardust","picasso.js","picasso-plugin-q"],(function(e){"use strict";var t,n,r,i,o,a,s,l,u,c,p,f,d,h,m,g,y,b,v,x,q,D,S;return{setters:[function(e){t=e.useConstraints,n=e.useState,r=e.useLayout,i=e.useEffect,o=e.useAction,a=e.useRect,s=e.useOptions,l=e.usePromise,u=e.useApp,c=e.useAppLayout,p=e.useDeviceType,f=e.useTheme,d=e.useTranslator,h=e.useMemo,m=e.onTakeSnapshot,g=e.useImperativeHandle,y=e.useElement,b=e.useModel,v=e.useSelections,x=e.useStaleLayout,q=e.useRenderState},function(e){D=e.default},function(e){S=e.default}],execute:function(){e("default",(function(e){!function(e){if(e&&e.get&&e.add){const t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(M).forEach((t=>{e.add(M[t])}))}}(e.translator);const m=B(e);return{qae:{properties:V,data:{targets:[m]},exportProperties:({propertyTree:e,hypercubePath:t,viewDataMode:n})=>j.hypercube.exportProperties({propertyTree:e,hypercubePath:n?"qUndoExclude.box":t})},ext:_o(e),component(){const m=t(),g=y(),E=function(){const e=u(),t=c(),n=p(),r=s(),i=f(),o=d(),a=h((()=>({app:e,appLayout:t,deviceType:n,options:r,theme:i,translator:o})),[e,t,r.direction,r.freeResize,o.language(),i.name(),n]);return a}(),w=E.options.renderer,C=h((()=>function(e){const t=D();return t.renderer.prio([e||"canvas"]),t.use(S),t.use(function(e){if("function"!=typeof e.interaction)return t=>{t.interaction("hammer",O(e))};return void e.interaction("hammer",O(Hammer))}(L)),t.use(P),t.component("disclaimer",R),t}(w)),[w]),A=function(){const e=t(),[a,s]=n(!1),[l,u]=n(!1),c=!!r().qSelectionInfo.qInSelections,[p]=n((()=>({toggle(){u((e=>!e))}})));return i((()=>{e&&s(!e.select&&!e.active)}),[e]),o((()=>({key:"lasso",label:"Lasso",icon:H,hidden:!a||!c,active:l,action(){u((e=>!e))}})),[c,l,a]),p.enabled=()=>a,p.active=()=>l,p}(),M=b(),k=v(),I=x(),N=q(),[_,j]=n();i((()=>{const t=T(g),n=new To(M),r=k,i=new Ao({$element:t,backendApi:n,environment:E,flags:e.flags,lasso:A,picasso:C,selectionsApi:r,renderState:N});return j(i),()=>{i.destroy()}}),[]);const[,z]=l((async()=>{_&&(_.updateEnvironment(E),_.updateConstraints(m),await _.updateData(I),await _.paint())}),[I,_,E]);if(z)throw z;!function(e){const n=a(),r=s(),i=t(),[,o]=l((async()=>{e&&(e.updateConstraints(i),e.options=r,await e.resize())}),[n.width,n.height]);if(o)throw o}(_),F(_)}}}));var E="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function w(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var C,A={exports:{}};
|
|
8
8
|
/*!
|
|
9
|
-
* jQuery JavaScript Library v3.7.
|
|
9
|
+
* jQuery JavaScript Library v3.7.1
|
|
10
10
|
* https://jquery.com/
|
|
11
11
|
*
|
|
12
12
|
* Copyright OpenJS Foundation and other contributors
|
|
13
13
|
* Released under the MIT license
|
|
14
14
|
* https://jquery.org/license
|
|
15
15
|
*
|
|
16
|
-
* Date: 2023-
|
|
17
|
-
*/w=A,function(e,t){w.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}}("undefined"!=typeof window?window:S,(function(e,t){var n=[],r=Object.getPrototypeOf,i=n.slice,o=n.flat?function(e){return n.flat.call(e)}:function(e){return n.concat.apply([],e)},a=n.push,s=n.indexOf,l={},u=l.toString,c=l.hasOwnProperty,p=c.toString,d=p.call(Object),f={},h=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},m=function(e){return null!=e&&e===e.window},g=e.document,y={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||g).createElement("script");if(o.text=e,t)for(r in y)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function v(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[u.call(e)]||"object":typeof e}var x="3.7.0",q=/HTML$/i,D=function(e,t){return new D.fn.init(e,t)};function E(e){var t=!!e&&"length"in e&&e.length,n=v(e);return!h(e)&&!m(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function S(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}D.fn=D.prototype={jquery:x,constructor:D,length:0,toArray:function(){return i.call(this)},get:function(e){return null==e?i.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=D.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return D.each(this,e)},map:function(e){return this.pushStack(D.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(i.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(D.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(D.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:a,sort:n.sort,splice:n.splice},D.extend=D.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,l=arguments.length,u=!1;for("boolean"==typeof a&&(u=a,a=arguments[s]||{},s++),"object"==typeof a||h(a)||(a={}),s===l&&(a=this,s--);s<l;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(u&&r&&(D.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||D.isPlainObject(n)?n:{},i=!1,a[t]=D.extend(u,o,r)):void 0!==r&&(a[t]=r));return a},D.extend({expando:"jQuery"+(x+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==u.call(e)||(t=r(e))&&("function"!=typeof(n=c.call(t,"constructor")&&t.constructor)||p.call(n)!==d))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){b(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(E(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},text:function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i)return e.textContent;if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=D.text(t);return n},makeArray:function(e,t){var n=t||[];return null!=e&&(E(Object(e))?D.merge(n,"string"==typeof e?[e]:e):a.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:s.call(t,e,n)},isXMLDoc:function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!q.test(t||n&&n.nodeName||"HTML")},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,a=0,s=[];if(E(e))for(r=e.length;a<r;a++)null!=(i=t(e[a],a,n))&&s.push(i);else for(a in e)null!=(i=t(e[a],a,n))&&s.push(i);return o(s)},guid:1,support:f}),"function"==typeof Symbol&&(D.fn[Symbol.iterator]=n[Symbol.iterator]),D.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(e,t){l["[object "+t+"]"]=t.toLowerCase()}));var C=n.pop,w=n.sort,A=n.splice,T="[\\x20\\t\\r\\n\\f]",M=new RegExp("^"+T+"+|((?:^|[^\\\\])(?:\\\\.)*)"+T+"+$","g");D.contains=function(e,t){var n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(e.contains?e.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))};var I=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function k(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e}D.escapeSelector=function(e){return(e+"").replace(I,k)};var O=g,L=a;!function(){var t,r,o,a,l,u,p,d,h,m,g=L,y=D.expando,b=0,v=0,x=ee(),q=ee(),E=ee(),I=ee(),k=function(e,t){return e===t&&(l=!0),0},N="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="(?:\\\\[\\da-fA-F]{1,6}"+T+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",R="\\["+T+"*("+P+")(?:"+T+"*([*^$|!~]?=)"+T+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+P+"))|)"+T+"*\\]",H=":("+P+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+R+")*)|.*)\\)|)",F=new RegExp(T+"+","g"),_=new RegExp("^"+T+"*,"+T+"*"),j=new RegExp("^"+T+"*([>+~]|"+T+")"+T+"*"),z=new RegExp(T+"|>"),V=new RegExp(H),B=new RegExp("^"+P+"$"),$={ID:new RegExp("^#("+P+")"),CLASS:new RegExp("^\\.("+P+")"),TAG:new RegExp("^("+P+"|[*])"),ATTR:new RegExp("^"+R),PSEUDO:new RegExp("^"+H),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+T+"*(even|odd|(([+-]|)(\\d*)n|)"+T+"*(?:([+-]|)"+T+"*(\\d+)|))"+T+"*\\)|)","i"),bool:new RegExp("^(?:"+N+")$","i"),needsContext:new RegExp("^"+T+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+T+"*((?:-\\d)?\\d*)"+T+"*\\)|)(?=[^-]|$)","i")},U=/^(?:input|select|textarea|button)$/i,W=/^h\d$/i,K=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,G=/[+~]/,Y=new RegExp("\\\\[\\da-fA-F]{1,6}"+T+"?|\\\\([^\\r\\n\\f])","g"),X=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},J=function(){le()},Q=de((function(e){return!0===e.disabled&&S(e,"fieldset")}),{dir:"parentNode",next:"legend"});try{g.apply(n=i.call(O.childNodes),O.childNodes),n[O.childNodes.length].nodeType}catch(e){g={apply:function(e,t){L.apply(e,i.call(t))},call:function(e){L.apply(e,i.call(arguments,1))}}}function Z(e,t,n,r){var i,o,a,s,l,c,p,m=t&&t.ownerDocument,b=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==b&&9!==b&&11!==b)return n;if(!r&&(le(t),t=t||u,d)){if(11!==b&&(l=K.exec(e)))if(i=l[1]){if(9===b){if(!(a=t.getElementById(i)))return n;if(a.id===i)return g.call(n,a),n}else if(m&&(a=m.getElementById(i))&&Z.contains(t,a)&&a.id===i)return g.call(n,a),n}else{if(l[2])return g.apply(n,t.getElementsByTagName(e)),n;if((i=l[3])&&t.getElementsByClassName)return g.apply(n,t.getElementsByClassName(i)),n}if(!(I[e+" "]||h&&h.test(e))){if(p=e,m=t,1===b&&(z.test(e)||j.test(e))){for((m=G.test(e)&&se(t.parentNode)||t)==t&&f.scope||((s=t.getAttribute("id"))?s=D.escapeSelector(s):t.setAttribute("id",s=y)),o=(c=ce(e)).length;o--;)c[o]=(s?"#"+s:":scope")+" "+pe(c[o]);p=c.join(",")}try{return g.apply(n,m.querySelectorAll(p)),n}catch(t){I(e,!0)}finally{s===y&&t.removeAttribute("id")}}}return be(e.replace(M,"$1"),t,n,r)}function ee(){var e=[];return function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function te(e){return e[y]=!0,e}function ne(e){var t=u.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function re(e){return function(t){return S(t,"input")&&t.type===e}}function ie(e){return function(t){return(S(t,"input")||S(t,"button"))&&t.type===e}}function oe(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&Q(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function ae(e){return te((function(t){return t=+t,te((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 se(e){return e&&void 0!==e.getElementsByTagName&&e}function le(e){var t,n=e?e.ownerDocument||e:O;return n!=u&&9===n.nodeType&&n.documentElement?(p=(u=n).documentElement,d=!D.isXMLDoc(u),m=p.matches||p.webkitMatchesSelector||p.msMatchesSelector,O!=u&&(t=u.defaultView)&&t.top!==t&&t.addEventListener("unload",J),f.getById=ne((function(e){return p.appendChild(e).id=D.expando,!u.getElementsByName||!u.getElementsByName(D.expando).length})),f.disconnectedMatch=ne((function(e){return m.call(e,"*")})),f.scope=ne((function(){return u.querySelectorAll(":scope")})),f.cssHas=ne((function(){try{return u.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}})),f.getById?(r.filter.ID=function(e){var t=e.replace(Y,X);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&d){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(Y,X);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&&d){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=function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},r.find.CLASS=function(e,t){if(void 0!==t.getElementsByClassName&&d)return t.getElementsByClassName(e)},h=[],ne((function(e){var t;p.appendChild(e).innerHTML="<a id='"+y+"' href='' disabled='disabled'></a><select id='"+y+"-\r\\' disabled='disabled'><option selected=''></option></select>",e.querySelectorAll("[selected]").length||h.push("\\["+T+"*(?:value|"+N+")"),e.querySelectorAll("[id~="+y+"-]").length||h.push("~="),e.querySelectorAll("a#"+y+"+*").length||h.push(".#.+[+~]"),e.querySelectorAll(":checked").length||h.push(":checked"),(t=u.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),p.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&h.push(":enabled",":disabled"),(t=u.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||h.push("\\["+T+"*name"+T+"*="+T+"*(?:''|\"\")")})),f.cssHas||h.push(":has"),h=h.length&&new RegExp(h.join("|")),k=function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!f.sortDetached&&t.compareDocumentPosition(e)===n?e===u||e.ownerDocument==O&&Z.contains(O,e)?-1:t===u||t.ownerDocument==O&&Z.contains(O,t)?1:a?s.call(a,e)-s.call(a,t):0:4&n?-1:1)},u):u}for(t in Z.matches=function(e,t){return Z(e,null,null,t)},Z.matchesSelector=function(e,t){if(le(e),d&&!I[t+" "]&&(!h||!h.test(t)))try{var n=m.call(e,t);if(n||f.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){I(t,!0)}return Z(t,u,null,[e]).length>0},Z.contains=function(e,t){return(e.ownerDocument||e)!=u&&le(e),D.contains(e,t)},Z.attr=function(e,t){(e.ownerDocument||e)!=u&&le(e);var n=r.attrHandle[t.toLowerCase()],i=n&&c.call(r.attrHandle,t.toLowerCase())?n(e,t,!d):void 0;return void 0!==i?i:e.getAttribute(t)},Z.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},D.uniqueSort=function(e){var t,n=[],r=0,o=0;if(l=!f.sortStable,a=!f.sortStable&&i.call(e,0),w.call(e,k),l){for(;t=e[o++];)t===e[o]&&(r=n.push(o));for(;r--;)A.call(e,n[r],1)}return a=null,e},D.fn.uniqueSort=function(){return this.pushStack(D.uniqueSort(i.apply(this)))},r=D.expr={cacheLength:50,createPseudo:te,match:$,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Y,X),e[3]=(e[3]||e[4]||e[5]||"").replace(Y,X),"~="===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]||Z.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]&&Z.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return $.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&V.test(n)&&(t=ce(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(Y,X).toLowerCase();return"*"===e?function(){return!0}:function(e){return S(e,t)}},CLASS:function(e){var t=x[e+" "];return t||(t=new RegExp("(^|"+T+")"+e+"("+T+"|$)"))&&x(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(r){var i=Z.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(F," ")+" ").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,l){var u,c,p,d,f,h=o!==a?"nextSibling":"previousSibling",m=t.parentNode,g=s&&t.nodeName.toLowerCase(),v=!l&&!s,x=!1;if(m){if(o){for(;h;){for(p=t;p=p[h];)if(s?S(p,g):1===p.nodeType)return!1;f=h="only"===e&&!f&&"nextSibling"}return!0}if(f=[a?m.firstChild:m.lastChild],a&&v){for(x=(d=(u=(c=m[y]||(m[y]={}))[e]||[])[0]===b&&u[1])&&u[2],p=d&&m.childNodes[d];p=++d&&p&&p[h]||(x=d=0)||f.pop();)if(1===p.nodeType&&++x&&p===t){c[e]=[b,d,x];break}}else if(v&&(x=d=(u=(c=t[y]||(t[y]={}))[e]||[])[0]===b&&u[1]),!1===x)for(;(p=++d&&p&&p[h]||(x=d=0)||f.pop())&&(!(s?S(p,g):1===p.nodeType)||!++x||(v&&((c=p[y]||(p[y]={}))[e]=[b,x]),p!==t)););return(x-=i)===r||x%r==0&&x/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||Z.error("unsupported pseudo: "+e);return i[y]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?te((function(e,n){for(var r,o=i(e,t),a=o.length;a--;)e[r=s.call(e,o[a])]=!(n[r]=o[a])})):function(e){return i(e,0,n)}):i}},pseudos:{not:te((function(e){var t=[],n=[],r=ye(e.replace(M,"$1"));return r[y]?te((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:te((function(e){return function(t){return Z(e,t).length>0}})),contains:te((function(e){return e=e.replace(Y,X),function(t){return(t.textContent||D.text(t)).indexOf(e)>-1}})),lang:te((function(e){return B.test(e||"")||Z.error("unsupported lang: "+e),e=e.replace(Y,X).toLowerCase(),function(t){var n;do{if(n=d?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===p},focus:function(e){return e===function(){try{return u.activeElement}catch(e){}}()&&u.hasFocus()&&!!(e.type||e.href||~e.tabIndex)},enabled:oe(!1),disabled:oe(!0),checked:function(e){return S(e,"input")&&!!e.checked||S(e,"option")&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return W.test(e.nodeName)},input:function(e){return U.test(e.nodeName)},button:function(e){return S(e,"input")&&"button"===e.type||S(e,"button")},text:function(e){var t;return S(e,"input")&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ae((function(){return[0]})),last:ae((function(e,t){return[t-1]})),eq:ae((function(e,t,n){return[n<0?n+t:n]})),even:ae((function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e})),odd:ae((function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e})),lt:ae((function(e,t,n){var r;for(r=n<0?n+t:n>t?t:n;--r>=0;)e.push(r);return e})),gt:ae((function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e}))}},r.pseudos.nth=r.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[t]=re(t);for(t in{submit:!0,reset:!0})r.pseudos[t]=ie(t);function ue(){}function ce(e,t){var n,i,o,a,s,l,u,c=q[e+" "];if(c)return t?0:c.slice(0);for(s=e,l=[],u=r.preFilter;s;){for(a in n&&!(i=_.exec(s))||(i&&(s=s.slice(i[0].length)||s),l.push(o=[])),n=!1,(i=j.exec(s))&&(n=i.shift(),o.push({value:n,type:i[0].replace(M," ")}),s=s.slice(n.length)),r.filter)!(i=$[a].exec(s))||u[a]&&!(i=u[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?Z.error(e):q(e,l).slice(0)}function pe(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function de(e,t,n){var r=t.dir,i=t.next,o=i||r,a=n&&"parentNode"===o,s=v++;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,l){var u,c,p=[b,s];if(l){for(;t=t[r];)if((1===t.nodeType||a)&&e(t,n,l))return!0}else for(;t=t[r];)if(1===t.nodeType||a)if(c=t[y]||(t[y]={}),i&&S(t,i))t=t[r]||t;else{if((u=c[o])&&u[0]===b&&u[1]===s)return p[2]=u[2];if(c[o]=p,p[2]=e(t,n,l))return!0}return!1}}function fe(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 he(e,t,n,r,i){for(var o,a=[],s=0,l=e.length,u=null!=t;s<l;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),u&&t.push(s)));return a}function me(e,t,n,r,i,o){return r&&!r[y]&&(r=me(r)),i&&!i[y]&&(i=me(i,o)),te((function(o,a,l,u){var c,p,d,f,h=[],m=[],y=a.length,b=o||function(e,t,n){for(var r=0,i=t.length;r<i;r++)Z(e,t[r],n);return n}(t||"*",l.nodeType?[l]:l,[]),v=!e||!o&&t?b:he(b,h,e,l,u);if(n?n(v,f=i||(o?e:y||r)?[]:a,l,u):f=v,r)for(c=he(f,m),r(c,[],l,u),p=c.length;p--;)(d=c[p])&&(f[m[p]]=!(v[m[p]]=d));if(o){if(i||e){if(i){for(c=[],p=f.length;p--;)(d=f[p])&&c.push(v[p]=d);i(null,f=[],c,u)}for(p=f.length;p--;)(d=f[p])&&(c=i?s.call(o,d):h[p])>-1&&(o[c]=!(a[c]=d))}}else f=he(f===a?f.splice(y,f.length):f),i?i(null,a,f,u):g.apply(a,f)}))}function ge(e){for(var t,n,i,a=e.length,l=r.relative[e[0].type],u=l||r.relative[" "],c=l?1:0,p=de((function(e){return e===t}),u,!0),d=de((function(e){return s.call(t,e)>-1}),u,!0),f=[function(e,n,r){var i=!l&&(r||n!=o)||((t=n).nodeType?p(e,n,r):d(e,n,r));return t=null,i}];c<a;c++)if(n=r.relative[e[c].type])f=[de(fe(f),n)];else{if((n=r.filter[e[c].type].apply(null,e[c].matches))[y]){for(i=++c;i<a&&!r.relative[e[i].type];i++);return me(c>1&&fe(f),c>1&&pe(e.slice(0,c-1).concat({value:" "===e[c-2].type?"*":""})).replace(M,"$1"),n,c<i&&ge(e.slice(c,i)),i<a&&ge(e=e.slice(i)),i<a&&pe(e))}f.push(n)}return fe(f)}function ye(e,t){var n,i=[],a=[],s=E[e+" "];if(!s){for(t||(t=ce(e)),n=t.length;n--;)(s=ge(t[n]))[y]?i.push(s):a.push(s);s=E(e,function(e,t){var n=t.length>0,i=e.length>0,a=function(a,s,l,c,p){var f,h,m,y=0,v="0",x=a&&[],q=[],E=o,S=a||i&&r.find.TAG("*",p),w=b+=null==E?1:Math.random()||.1,A=S.length;for(p&&(o=s==u||s||p);v!==A&&null!=(f=S[v]);v++){if(i&&f){for(h=0,s||f.ownerDocument==u||(le(f),l=!d);m=e[h++];)if(m(f,s||u,l)){g.call(c,f);break}p&&(b=w)}n&&((f=!m&&f)&&y--,a&&x.push(f))}if(y+=v,n&&v!==y){for(h=0;m=t[h++];)m(x,q,s,l);if(a){if(y>0)for(;v--;)x[v]||q[v]||(q[v]=C.call(c));q=he(q)}g.apply(c,q),p&&!a&&q.length>0&&y+t.length>1&&D.uniqueSort(c)}return p&&(b=w,o=E),x};return n?te(a):a}(a,i)),s.selector=e}return s}function be(e,t,n,i){var o,a,s,l,u,c="function"==typeof e&&e,p=!i&&ce(e=c.selector||e);if(n=n||[],1===p.length){if((a=p[0]=p[0].slice(0)).length>2&&"ID"===(s=a[0]).type&&9===t.nodeType&&d&&r.relative[a[1].type]){if(!(t=(r.find.ID(s.matches[0].replace(Y,X),t)||[])[0]))return n;c&&(t=t.parentNode),e=e.slice(a.shift().value.length)}for(o=$.needsContext.test(e)?0:a.length;o--&&(s=a[o],!r.relative[l=s.type]);)if((u=r.find[l])&&(i=u(s.matches[0].replace(Y,X),G.test(a[0].type)&&se(t.parentNode)||t))){if(a.splice(o,1),!(e=i.length&&pe(a)))return g.apply(n,i),n;break}}return(c||ye(e,p))(i,t,!d,n,!t||G.test(e)&&se(t.parentNode)||t),n}ue.prototype=r.filters=r.pseudos,r.setFilters=new ue,f.sortStable=y.split("").sort(k).join("")===y,le(),f.sortDetached=ne((function(e){return 1&e.compareDocumentPosition(u.createElement("fieldset"))})),D.find=Z,D.expr[":"]=D.expr.pseudos,D.unique=D.uniqueSort,Z.compile=ye,Z.select=be,Z.setDocument=le,Z.escape=D.escapeSelector,Z.getText=D.text,Z.isXML=D.isXMLDoc,Z.selectors=D.expr,Z.support=D.support,Z.uniqueSort=D.uniqueSort}();var N=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&D(e).is(n))break;r.push(e)}return r},P=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},R=D.expr.match.needsContext,H=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function F(e,t,n){return h(t)?D.grep(e,(function(e,r){return!!t.call(e,r,e)!==n})):t.nodeType?D.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?D.grep(e,(function(e){return s.call(t,e)>-1!==n})):D.filter(t,e,n)}D.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?D.find.matchesSelector(r,e)?[r]:[]:D.find.matches(e,D.grep(t,(function(e){return 1===e.nodeType})))},D.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(D(e).filter((function(){for(t=0;t<r;t++)if(D.contains(i[t],this))return!0})));for(n=this.pushStack([]),t=0;t<r;t++)D.find(e,i[t],n);return r>1?D.uniqueSort(n):n},filter:function(e){return this.pushStack(F(this,e||[],!1))},not:function(e){return this.pushStack(F(this,e||[],!0))},is:function(e){return!!F(this,"string"==typeof e&&R.test(e)?D(e):e||[],!1).length}});var _,j=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(D.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||_,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:j.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 D?t[0]:t,D.merge(this,D.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:g,!0)),H.test(r[1])&&D.isPlainObject(t))for(r in t)h(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=g.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):h(e)?void 0!==n.ready?n.ready(e):e(D):D.makeArray(e,this)}).prototype=D.fn,_=D(g);var z=/^(?:parents|prev(?:Until|All))/,V={children:!0,contents:!0,next:!0,prev:!0};function B(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}D.fn.extend({has:function(e){var t=D(e,this),n=t.length;return this.filter((function(){for(var e=0;e<n;e++)if(D.contains(this,t[e]))return!0}))},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&D(e);if(!R.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&&D.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?D.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?s.call(D(e),this[0]):s.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(D.uniqueSort(D.merge(this.get(),D(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),D.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return N(e,"parentNode")},parentsUntil:function(e,t,n){return N(e,"parentNode",n)},next:function(e){return B(e,"nextSibling")},prev:function(e){return B(e,"previousSibling")},nextAll:function(e){return N(e,"nextSibling")},prevAll:function(e){return N(e,"previousSibling")},nextUntil:function(e,t,n){return N(e,"nextSibling",n)},prevUntil:function(e,t,n){return N(e,"previousSibling",n)},siblings:function(e){return P((e.parentNode||{}).firstChild,e)},children:function(e){return P(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(S(e,"template")&&(e=e.content||e),D.merge([],e.childNodes))}},(function(e,t){D.fn[e]=function(n,r){var i=D.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=D.filter(r,i)),this.length>1&&(V[e]||D.uniqueSort(i),z.test(e)&&i.reverse()),this.pushStack(i)}}));var $=/[^\x20\t\r\n\f]+/g;function U(e){return e}function W(e){throw e}function K(e,t,n,r){var i;try{e&&h(i=e.promise)?i.call(e).done(t).fail(n):e&&h(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}D.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return D.each(e.match($)||[],(function(e,n){t[n]=!0})),t}(e):D.extend({},e);var t,n,r,i,o=[],a=[],s=-1,l=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?[]:"")},u={add:function(){return o&&(n&&!t&&(s=o.length-1,a.push(n)),function t(n){D.each(n,(function(n,r){h(r)?e.unique&&u.has(r)||o.push(r):r&&r.length&&"string"!==v(r)&&t(r)}))}(arguments),n&&!t&&l()),this},remove:function(){return D.each(arguments,(function(e,t){for(var n;(n=D.inArray(t,o,n))>-1;)o.splice(n,1),n<=s&&s--})),this},has:function(e){return e?D.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||l()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!r}};return u},D.extend({Deferred:function(t){var n=[["notify","progress",D.Callbacks("memory"),D.Callbacks("memory"),2],["resolve","done",D.Callbacks("once memory"),D.Callbacks("once memory"),0,"resolved"],["reject","fail",D.Callbacks("once memory"),D.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return D.Deferred((function(t){D.each(n,(function(n,r){var i=h(e[r[4]])&&e[r[4]];o[r[1]]((function(){var e=i&&i.apply(this,arguments);e&&h(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,r,i){var o=0;function a(t,n,r,i){return function(){var s=this,l=arguments,u=function(){var e,u;if(!(t<o)){if((e=r.apply(s,l))===n.promise())throw new TypeError("Thenable self-resolution");u=e&&("object"==typeof e||"function"==typeof e)&&e.then,h(u)?i?u.call(e,a(o,n,U,i),a(o,n,W,i)):(o++,u.call(e,a(o,n,U,i),a(o,n,W,i),a(o,n,U,n.notifyWith))):(r!==U&&(s=void 0,l=[e]),(i||n.resolveWith)(s,l))}},c=i?u:function(){try{u()}catch(e){D.Deferred.exceptionHook&&D.Deferred.exceptionHook(e,c.error),t+1>=o&&(r!==W&&(s=void 0,l=[e]),n.rejectWith(s,l))}};t?c():(D.Deferred.getErrorHook?c.error=D.Deferred.getErrorHook():D.Deferred.getStackHook&&(c.error=D.Deferred.getStackHook()),e.setTimeout(c))}}return D.Deferred((function(e){n[0][3].add(a(0,e,h(i)?i:U,e.notifyWith)),n[1][3].add(a(0,e,h(t)?t:U)),n[2][3].add(a(0,e,h(r)?r:W))})).promise()},promise:function(e){return null!=e?D.extend(e,i):i}},o={};return D.each(n,(function(e,t){var a=t[2],s=t[5];i[t[1]]=a.add,s&&a.add((function(){r=s}),n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),a.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=a.fireWith})),i.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),o=i.call(arguments),a=D.Deferred(),s=function(e){return function(n){r[e]=this,o[e]=arguments.length>1?i.call(arguments):n,--t||a.resolveWith(r,o)}};if(t<=1&&(K(e,a.done(s(n)).resolve,a.reject,!t),"pending"===a.state()||h(o[n]&&o[n].then)))return a.then();for(;n--;)K(o[n],s(n),a.reject);return a.promise()}});var G=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;D.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&G.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},D.readyException=function(t){e.setTimeout((function(){throw t}))};var Y=D.Deferred();function X(){g.removeEventListener("DOMContentLoaded",X),e.removeEventListener("load",X),D.ready()}D.fn.ready=function(e){return Y.then(e).catch((function(e){D.readyException(e)})),this},D.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--D.readyWait:D.isReady)||(D.isReady=!0,!0!==e&&--D.readyWait>0||Y.resolveWith(g,[D]))}}),D.ready.then=Y.then,"complete"===g.readyState||"loading"!==g.readyState&&!g.documentElement.doScroll?e.setTimeout(D.ready):(g.addEventListener("DOMContentLoaded",X),e.addEventListener("load",X));var J=function(e,t,n,r,i,o,a){var s=0,l=e.length,u=null==n;if("object"===v(n))for(s in i=!0,n)J(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,h(r)||(a=!0),u&&(a?(t.call(e,r),t=null):(u=t,t=function(e,t,n){return u.call(D(e),n)})),t))for(;s<l;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:u?t.call(e):l?t(e[0],n):o},Q=/^-ms-/,Z=/-([a-z])/g;function ee(e,t){return t.toUpperCase()}function te(e){return e.replace(Q,"ms-").replace(Z,ee)}var ne=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function re(){this.expando=D.expando+re.uid++}re.uid=1,re.prototype={cache:function(e){var t=e[this.expando];return t||(t={},ne(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[te(t)]=n;else for(r in t)i[te(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][te(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(te):(t=te(t))in r?[t]:t.match($)||[]).length;for(;n--;)delete r[t[n]]}(void 0===t||D.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&&!D.isEmptyObject(t)}};var ie=new re,oe=new re,ae=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,se=/[A-Z]/g;function le(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(se,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:ae.test(e)?JSON.parse(e):e)}(n)}catch(e){}oe.set(e,t,n)}else n=void 0;return n}D.extend({hasData:function(e){return oe.hasData(e)||ie.hasData(e)},data:function(e,t,n){return oe.access(e,t,n)},removeData:function(e,t){oe.remove(e,t)},_data:function(e,t,n){return ie.access(e,t,n)},_removeData:function(e,t){ie.remove(e,t)}}),D.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=oe.get(o),1===o.nodeType&&!ie.get(o,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&0===(r=a[n].name).indexOf("data-")&&(r=te(r.slice(5)),le(o,r,i[r]));ie.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each((function(){oe.set(this,e)})):J(this,(function(t){var n;if(o&&void 0===t)return void 0!==(n=oe.get(o,e))||void 0!==(n=le(o,e))?n:void 0;this.each((function(){oe.set(this,e,t)}))}),null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each((function(){oe.remove(this,e)}))}}),D.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=ie.get(e,t),n&&(!r||Array.isArray(n)?r=ie.access(e,t,D.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=D.queue(e,t),r=n.length,i=n.shift(),o=D._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,(function(){D.dequeue(e,t)}),o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return ie.get(e,n)||ie.access(e,n,{empty:D.Callbacks("once memory").add((function(){ie.remove(e,[t+"queue",n])}))})}}),D.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?D.queue(this[0],e):void 0===t?this:this.each((function(){var n=D.queue(this,e,t);D._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&D.dequeue(this,e)}))},dequeue:function(e){return this.each((function(){D.dequeue(this,e)}))},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=D.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=ie.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var ue=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ce=new RegExp("^(?:([+-])=|)("+ue+")([a-z%]*)$","i"),pe=["Top","Right","Bottom","Left"],de=g.documentElement,fe=function(e){return D.contains(e.ownerDocument,e)},he={composed:!0};de.getRootNode&&(fe=function(e){return D.contains(e.ownerDocument,e)||e.getRootNode(he)===e.ownerDocument});var me=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&fe(e)&&"none"===D.css(e,"display")};function ge(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return D.css(e,t,"")},l=s(),u=n&&n[3]||(D.cssNumber[t]?"":"px"),c=e.nodeType&&(D.cssNumber[t]||"px"!==u&&+l)&&ce.exec(D.css(e,t));if(c&&c[3]!==u){for(l/=2,u=u||c[3],c=+l||1;a--;)D.style(e,t,c+u),(1-o)*(1-(o=s()/l||.5))<=0&&(a=0),c/=o;c*=2,D.style(e,t,c+u),n=n||[]}return n&&(c=+c||+l||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=u,r.start=c,r.end=i)),i}var ye={};function be(e){var t,n=e.ownerDocument,r=e.nodeName,i=ye[r];return i||(t=n.body.appendChild(n.createElement(r)),i=D.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),ye[r]=i,i)}function ve(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]=ie.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&me(r)&&(i[o]=be(r))):"none"!==n&&(i[o]="none",ie.set(r,"display",n)));for(o=0;o<a;o++)null!=i[o]&&(e[o].style.display=i[o]);return e}D.fn.extend({show:function(){return ve(this,!0)},hide:function(){return ve(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each((function(){me(this)?D(this).show():D(this).hide()}))}});var xe,qe,De=/^(?:checkbox|radio)$/i,Ee=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Se=/^$|^module$|\/(?:java|ecma)script/i;xe=g.createDocumentFragment().appendChild(g.createElement("div")),(qe=g.createElement("input")).setAttribute("type","radio"),qe.setAttribute("checked","checked"),qe.setAttribute("name","t"),xe.appendChild(qe),f.checkClone=xe.cloneNode(!0).cloneNode(!0).lastChild.checked,xe.innerHTML="<textarea>x</textarea>",f.noCloneChecked=!!xe.cloneNode(!0).lastChild.defaultValue,xe.innerHTML="<option></option>",f.option=!!xe.lastChild;var Ce={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 we(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&S(e,t)?D.merge([e],n):n}function Ae(e,t){for(var n=0,r=e.length;n<r;n++)ie.set(e[n],"globalEval",!t||ie.get(t[n],"globalEval"))}Ce.tbody=Ce.tfoot=Ce.colgroup=Ce.caption=Ce.thead,Ce.th=Ce.td,f.option||(Ce.optgroup=Ce.option=[1,"<select multiple='multiple'>","</select>"]);var Te=/<|&#?\w+;/;function Me(e,t,n,r,i){for(var o,a,s,l,u,c,p=t.createDocumentFragment(),d=[],f=0,h=e.length;f<h;f++)if((o=e[f])||0===o)if("object"===v(o))D.merge(d,o.nodeType?[o]:o);else if(Te.test(o)){for(a=a||p.appendChild(t.createElement("div")),s=(Ee.exec(o)||["",""])[1].toLowerCase(),l=Ce[s]||Ce._default,a.innerHTML=l[1]+D.htmlPrefilter(o)+l[2],c=l[0];c--;)a=a.lastChild;D.merge(d,a.childNodes),(a=p.firstChild).textContent=""}else d.push(t.createTextNode(o));for(p.textContent="",f=0;o=d[f++];)if(r&&D.inArray(o,r)>-1)i&&i.push(o);else if(u=fe(o),a=we(p.appendChild(o),"script"),u&&Ae(a),n)for(c=0;o=a[c++];)Se.test(o.type||"")&&n.push(o);return p}var Ie=/^([^.]*)(?:\.(.+)|)/;function ke(){return!0}function Oe(){return!1}function Le(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Le(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Oe;else if(!i)return e;return 1===o&&(a=i,i=function(e){return D().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=D.guid++)),e.each((function(){D.event.add(this,t,i,r,n)}))}function Ne(e,t,n){n?(ie.set(e,t,!1),D.event.add(e,t,{namespace:!1,handler:function(e){var n,r=ie.get(this,t);if(1&e.isTrigger&&this[t]){if(r)(D.event.special[t]||{}).delegateType&&e.stopPropagation();else if(r=i.call(arguments),ie.set(this,t,r),this[t](),n=ie.get(this,t),ie.set(this,t,!1),r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n}else r&&(ie.set(this,t,D.event.trigger(r[0],r.slice(1),this)),e.stopPropagation(),e.isImmediatePropagationStopped=ke)}})):void 0===ie.get(e,t)&&D.event.add(e,t,ke)}D.event={global:{},add:function(e,t,n,r,i){var o,a,s,l,u,c,p,d,f,h,m,g=ie.get(e);if(ne(e))for(n.handler&&(n=(o=n).handler,i=o.selector),i&&D.find.matchesSelector(de,i),n.guid||(n.guid=D.guid++),(l=g.events)||(l=g.events=Object.create(null)),(a=g.handle)||(a=g.handle=function(t){return void 0!==D&&D.event.triggered!==t.type?D.event.dispatch.apply(e,arguments):void 0}),u=(t=(t||"").match($)||[""]).length;u--;)f=m=(s=Ie.exec(t[u])||[])[1],h=(s[2]||"").split(".").sort(),f&&(p=D.event.special[f]||{},f=(i?p.delegateType:p.bindType)||f,p=D.event.special[f]||{},c=D.extend({type:f,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&D.expr.match.needsContext.test(i),namespace:h.join(".")},o),(d=l[f])||((d=l[f]=[]).delegateCount=0,p.setup&&!1!==p.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(f,a)),p.add&&(p.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,c):d.push(c),D.event.global[f]=!0)},remove:function(e,t,n,r,i){var o,a,s,l,u,c,p,d,f,h,m,g=ie.hasData(e)&&ie.get(e);if(g&&(l=g.events)){for(u=(t=(t||"").match($)||[""]).length;u--;)if(f=m=(s=Ie.exec(t[u])||[])[1],h=(s[2]||"").split(".").sort(),f){for(p=D.event.special[f]||{},d=l[f=(r?p.delegateType:p.bindType)||f]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=d.length;o--;)c=d[o],!i&&m!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(d.splice(o,1),c.selector&&d.delegateCount--,p.remove&&p.remove.call(e,c));a&&!d.length&&(p.teardown&&!1!==p.teardown.call(e,h,g.handle)||D.removeEvent(e,f,g.handle),delete l[f])}else for(f in l)D.event.remove(e,f+t[u],n,r,!0);D.isEmptyObject(l)&&ie.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),l=D.event.fix(e),u=(ie.get(this,"events")||Object.create(null))[l.type]||[],c=D.event.special[l.type]||{};for(s[0]=l,t=1;t<arguments.length;t++)s[t]=arguments[t];if(l.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,l)){for(a=D.event.handlers.call(this,l,u),t=0;(i=a[t++])&&!l.isPropagationStopped();)for(l.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!l.isImmediatePropagationStopped();)l.rnamespace&&!1!==o.namespace&&!l.rnamespace.test(o.namespace)||(l.handleObj=o,l.data=o.data,void 0!==(r=((D.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(l.result=r)&&(l.preventDefault(),l.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,l),l.result}},handlers:function(e,t){var n,r,i,o,a,s=[],l=t.delegateCount,u=e.target;if(l&&u.nodeType&&!("click"===e.type&&e.button>=1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==e.type||!0!==u.disabled)){for(o=[],a={},n=0;n<l;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?D(i,this).index(u)>-1:D.find(i,this,null,[u]).length),a[i]&&o.push(r);o.length&&s.push({elem:u,handlers:o})}return u=this,l<t.length&&s.push({elem:u,handlers:t.slice(l)}),s},addProp:function(e,t){Object.defineProperty(D.Event.prototype,e,{enumerable:!0,configurable:!0,get:h(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[D.expando]?e:new D.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return De.test(t.type)&&t.click&&S(t,"input")&&Ne(t,"click",!0),!1},trigger:function(e){var t=this||e;return De.test(t.type)&&t.click&&S(t,"input")&&Ne(t,"click"),!0},_default:function(e){var t=e.target;return De.test(t.type)&&t.click&&S(t,"input")&&ie.get(t,"click")||S(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},D.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},D.Event=function(e,t){if(!(this instanceof D.Event))return new D.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?ke:Oe,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&&D.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[D.expando]=!0},D.Event.prototype={constructor:D.Event,isDefaultPrevented:Oe,isPropagationStopped:Oe,isImmediatePropagationStopped:Oe,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=ke,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=ke,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=ke,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},D.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},D.event.addProp),D.each({focus:"focusin",blur:"focusout"},(function(e,t){function n(e){if(g.documentMode){var n=ie.get(this,"handle"),r=D.event.fix(e);r.type="focusin"===e.type?"focus":"blur",r.isSimulated=!0,n(e),r.target===r.currentTarget&&n(r)}else D.event.simulate(t,e.target,D.event.fix(e))}D.event.special[e]={setup:function(){var r;if(Ne(this,e,!0),!g.documentMode)return!1;(r=ie.get(this,t))||this.addEventListener(t,n),ie.set(this,t,(r||0)+1)},trigger:function(){return Ne(this,e),!0},teardown:function(){var e;if(!g.documentMode)return!1;(e=ie.get(this,t)-1)?ie.set(this,t,e):(this.removeEventListener(t,n),ie.remove(this,t))},_default:function(t){return ie.get(t.target,e)},delegateType:t},D.event.special[t]={setup:function(){var r=this.ownerDocument||this.document||this,i=g.documentMode?this:r,o=ie.get(i,t);o||(g.documentMode?this.addEventListener(t,n):r.addEventListener(e,n,!0)),ie.set(i,t,(o||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,i=g.documentMode?this:r,o=ie.get(i,t)-1;o?ie.set(i,t,o):(g.documentMode?this.removeEventListener(t,n):r.removeEventListener(e,n,!0),ie.remove(i,t))}}})),D.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(e,t){D.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=e.relatedTarget,i=e.handleObj;return r&&(r===this||D.contains(this,r))||(e.type=i.origType,n=i.handler.apply(this,arguments),e.type=t),n}}})),D.fn.extend({on:function(e,t,n,r){return Le(this,e,t,n,r)},one:function(e,t,n,r){return Le(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,D(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Oe),this.each((function(){D.event.remove(this,e,n,t)}))}});var Pe=/<script|<style|<link/i,Re=/checked\s*(?:[^=]|=\s*.checked.)/i,He=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Fe(e,t){return S(e,"table")&&S(11!==t.nodeType?t:t.firstChild,"tr")&&D(e).children("tbody")[0]||e}function _e(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function je(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function ze(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(ie.hasData(e)&&(s=ie.get(e).events))for(i in ie.remove(t,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)D.event.add(t,i,s[i][n]);oe.hasData(e)&&(o=oe.access(e),a=D.extend({},o),oe.set(t,a))}}function Ve(e,t){var n=t.nodeName.toLowerCase();"input"===n&&De.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function Be(e,t,n,r){t=o(t);var i,a,s,l,u,c,p=0,d=e.length,m=d-1,g=t[0],y=h(g);if(y||d>1&&"string"==typeof g&&!f.checkClone&&Re.test(g))return e.each((function(i){var o=e.eq(i);y&&(t[0]=g.call(this,i,o.html())),Be(o,t,n,r)}));if(d&&(a=(i=Me(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=a),a||r)){for(l=(s=D.map(we(i,"script"),_e)).length;p<d;p++)u=i,p!==m&&(u=D.clone(u,!0,!0),l&&D.merge(s,we(u,"script"))),n.call(e[p],u,p);if(l)for(c=s[s.length-1].ownerDocument,D.map(s,je),p=0;p<l;p++)u=s[p],Se.test(u.type||"")&&!ie.access(u,"globalEval")&&D.contains(c,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?D._evalUrl&&!u.noModule&&D._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},c):b(u.textContent.replace(He,""),u,c))}return e}function $e(e,t,n){for(var r,i=t?D.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||D.cleanData(we(r)),r.parentNode&&(n&&fe(r)&&Ae(we(r,"script")),r.parentNode.removeChild(r));return e}D.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),l=fe(e);if(!(f.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||D.isXMLDoc(e)))for(a=we(s),r=0,i=(o=we(e)).length;r<i;r++)Ve(o[r],a[r]);if(t)if(n)for(o=o||we(e),a=a||we(s),r=0,i=o.length;r<i;r++)ze(o[r],a[r]);else ze(e,s);return(a=we(s,"script")).length>0&&Ae(a,!l&&we(e,"script")),s},cleanData:function(e){for(var t,n,r,i=D.event.special,o=0;void 0!==(n=e[o]);o++)if(ne(n)){if(t=n[ie.expando]){if(t.events)for(r in t.events)i[r]?D.event.remove(n,r):D.removeEvent(n,r,t.handle);n[ie.expando]=void 0}n[oe.expando]&&(n[oe.expando]=void 0)}}}),D.fn.extend({detach:function(e){return $e(this,e,!0)},remove:function(e){return $e(this,e)},text:function(e){return J(this,(function(e){return void 0===e?D.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 Be(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Fe(this,e).appendChild(e)}))},prepend:function(){return Be(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Fe(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return Be(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return Be(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&&(D.cleanData(we(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return D.clone(this,e,t)}))},html:function(e){return J(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&&!Pe.test(e)&&!Ce[(Ee.exec(e)||["",""])[1].toLowerCase()]){e=D.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(D.cleanData(we(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(){var e=[];return Be(this,arguments,(function(t){var n=this.parentNode;D.inArray(this,e)<0&&(D.cleanData(we(this)),n&&n.replaceChild(t,this))}),e)}}),D.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(e,t){D.fn[e]=function(e){for(var n,r=[],i=D(e),o=i.length-1,s=0;s<=o;s++)n=s===o?this:this.clone(!0),D(i[s])[t](n),a.apply(r,n.get());return this.pushStack(r)}}));var Ue=new RegExp("^("+ue+")(?!px)[a-z%]+$","i"),We=/^--/,Ke=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},Ge=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},Ye=new RegExp(pe.join("|"),"i");function Xe(e,t,n){var r,i,o,a,s=We.test(t),l=e.style;return(n=n||Ke(e))&&(a=n.getPropertyValue(t)||n[t],s&&a&&(a=a.replace(M,"$1")||void 0),""!==a||fe(e)||(a=D.style(e,t)),!f.pixelBoxStyles()&&Ue.test(a)&&Ye.test(t)&&(r=l.width,i=l.minWidth,o=l.maxWidth,l.minWidth=l.maxWidth=l.width=a,a=n.width,l.width=r,l.minWidth=i,l.maxWidth=o)),void 0!==a?a+"":a}function Je(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function t(){if(c){u.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%",de.appendChild(u).appendChild(c);var t=e.getComputedStyle(c);r="1%"!==t.top,l=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),de.removeChild(u),c=null}}function n(e){return Math.round(parseFloat(e))}var r,i,o,a,s,l,u=g.createElement("div"),c=g.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",f.clearCloneStyle="content-box"===c.style.backgroundClip,D.extend(f,{boxSizingReliable:function(){return t(),i},pixelBoxStyles:function(){return t(),a},pixelPosition:function(){return t(),r},reliableMarginLeft:function(){return t(),l},scrollboxSize:function(){return t(),o},reliableTrDimensions:function(){var t,n,r,i;return null==s&&(t=g.createElement("table"),n=g.createElement("tr"),r=g.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",de.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,de.removeChild(t)),s}}))}();var Qe=["Webkit","Moz","ms"],Ze=g.createElement("div").style,et={};function tt(e){var t=D.cssProps[e]||et[e];return t||(e in Ze?e:et[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=Qe.length;n--;)if((e=Qe[n]+t)in Ze)return e}(e)||e)}var nt=/^(none|table(?!-c[ea]).+)/,rt={position:"absolute",visibility:"hidden",display:"block"},it={letterSpacing:"0",fontWeight:"400"};function ot(e,t,n){var r=ce.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function at(e,t,n,r,i,o){var a="width"===t?1:0,s=0,l=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=D.css(e,n+pe[a],!0,i)),r?("content"===n&&(l-=D.css(e,"padding"+pe[a],!0,i)),"margin"!==n&&(l-=D.css(e,"border"+pe[a]+"Width",!0,i))):(l+=D.css(e,"padding"+pe[a],!0,i),"padding"!==n?l+=D.css(e,"border"+pe[a]+"Width",!0,i):s+=D.css(e,"border"+pe[a]+"Width",!0,i));return!r&&o>=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-l-s-.5))||0),l+u}function st(e,t,n){var r=Ke(e),i=(!f.boxSizingReliable()||n)&&"border-box"===D.css(e,"boxSizing",!1,r),o=i,a=Xe(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Ue.test(a)){if(!n)return a;a="auto"}return(!f.boxSizingReliable()&&i||!f.reliableTrDimensions()&&S(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===D.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===D.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+at(e,t,n||(i?"border":"content"),o,r,a)+"px"}function lt(e,t,n,r,i){return new lt.prototype.init(e,t,n,r,i)}D.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Xe(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=te(t),l=We.test(t),u=e.style;if(l||(t=tt(s)),a=D.cssHooks[t]||D.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:u[t];"string"==(o=typeof n)&&(i=ce.exec(n))&&i[1]&&(n=ge(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||l||(n+=i&&i[3]||(D.cssNumber[s]?"":"px")),f.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(l?u.setProperty(t,n):u[t]=n))}},css:function(e,t,n,r){var i,o,a,s=te(t);return We.test(t)||(t=tt(s)),(a=D.cssHooks[t]||D.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Xe(e,t,r)),"normal"===i&&t in it&&(i=it[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),D.each(["height","width"],(function(e,t){D.cssHooks[t]={get:function(e,n,r){if(n)return!nt.test(D.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?st(e,t,r):Ge(e,rt,(function(){return st(e,t,r)}))},set:function(e,n,r){var i,o=Ke(e),a=!f.scrollboxSize()&&"absolute"===o.position,s=(a||r)&&"border-box"===D.css(e,"boxSizing",!1,o),l=r?at(e,t,r,s,o):0;return s&&a&&(l-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-at(e,t,"border",!1,o)-.5)),l&&(i=ce.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=D.css(e,t)),ot(0,n,l)}}})),D.cssHooks.marginLeft=Je(f.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(Xe(e,"marginLeft"))||e.getBoundingClientRect().left-Ge(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),D.each({margin:"",padding:"",border:"Width"},(function(e,t){D.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+pe[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(D.cssHooks[e+t].set=ot)})),D.fn.extend({css:function(e,t){return J(this,(function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Ke(e),i=t.length;a<i;a++)o[t[a]]=D.css(e,t[a],!1,r);return o}return void 0!==n?D.style(e,t,n):D.css(e,t)}),e,t,arguments.length>1)}}),D.Tween=lt,lt.prototype={constructor:lt,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||D.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(D.cssNumber[n]?"":"px")},cur:function(){var e=lt.propHooks[this.prop];return e&&e.get?e.get(this):lt.propHooks._default.get(this)},run:function(e){var t,n=lt.propHooks[this.prop];return this.options.duration?this.pos=t=D.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):lt.propHooks._default.set(this),this}},lt.prototype.init.prototype=lt.prototype,lt.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=D.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){D.fx.step[e.prop]?D.fx.step[e.prop](e):1!==e.elem.nodeType||!D.cssHooks[e.prop]&&null==e.elem.style[tt(e.prop)]?e.elem[e.prop]=e.now:D.style(e.elem,e.prop,e.now+e.unit)}}},lt.propHooks.scrollTop=lt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},D.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},D.fx=lt.prototype.init,D.fx.step={};var ut,ct,pt=/^(?:toggle|show|hide)$/,dt=/queueHooks$/;function ft(){ct&&(!1===g.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(ft):e.setTimeout(ft,D.fx.interval),D.fx.tick())}function ht(){return e.setTimeout((function(){ut=void 0})),ut=Date.now()}function mt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=pe[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function gt(e,t,n){for(var r,i=(yt.tweeners[t]||[]).concat(yt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function yt(e,t,n){var r,i,o=0,a=yt.prefilters.length,s=D.Deferred().always((function(){delete l.elem})),l=function(){if(i)return!1;for(var t=ut||ht(),n=Math.max(0,u.startTime+u.duration-t),r=1-(n/u.duration||0),o=0,a=u.tweens.length;o<a;o++)u.tweens[o].run(r);return s.notifyWith(e,[u,r,n]),r<1&&a?n:(a||s.notifyWith(e,[u,1,0]),s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:D.extend({},t),opts:D.extend(!0,{specialEasing:{},easing:D.easing._default},n),originalProperties:t,originalOptions:n,startTime:ut||ht(),duration:n.duration,tweens:[],createTween:function(t,n){var r=D.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(r),r},stop:function(t){var n=0,r=t?u.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)u.tweens[n].run(1);return t?(s.notifyWith(e,[u,1,0]),s.resolveWith(e,[u,t])):s.rejectWith(e,[u,t]),this}}),c=u.props;for(function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=te(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=D.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,u.opts.specialEasing);o<a;o++)if(r=yt.prefilters[o].call(u,e,c,u.opts))return h(r.stop)&&(D._queueHooks(u.elem,u.opts.queue).stop=r.stop.bind(r)),r;return D.map(c,gt,u),h(u.opts.start)&&u.opts.start.call(e,u),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always),D.fx.timer(D.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u}D.Animation=D.extend(yt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return ge(n.elem,e,ce.exec(t),n),n}]},tweener:function(e,t){h(e)?(t=e,e=["*"]):e=e.match($);for(var n,r=0,i=e.length;r<i;r++)n=e[r],yt.tweeners[n]=yt.tweeners[n]||[],yt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,l,u,c,p="width"in t||"height"in t,d=this,f={},h=e.style,m=e.nodeType&&me(e),g=ie.get(e,"fxshow");for(r in n.queue||(null==(a=D._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,d.always((function(){d.always((function(){a.unqueued--,D.queue(e,"fx").length||a.empty.fire()}))}))),t)if(i=t[r],pt.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}f[r]=g&&g[r]||D.style(e,r)}if((l=!D.isEmptyObject(t))||!D.isEmptyObject(f))for(r in p&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(u=g&&g.display)&&(u=ie.get(e,"display")),"none"===(c=D.css(e,"display"))&&(u?c=u:(ve([e],!0),u=e.style.display||u,c=D.css(e,"display"),ve([e]))),("inline"===c||"inline-block"===c&&null!=u)&&"none"===D.css(e,"float")&&(l||(d.done((function(){h.display=u})),null==u&&(c=h.display,u="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",d.always((function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]}))),l=!1,f)l||(g?"hidden"in g&&(m=g.hidden):g=ie.access(e,"fxshow",{display:u}),o&&(g.hidden=!m),m&&ve([e],!0),d.done((function(){for(r in m||ve([e]),ie.remove(e,"fxshow"),f)D.style(e,r,f[r])}))),l=gt(m?g[r]:0,r,d),r in g||(g[r]=l.start,m&&(l.end=l.start,l.start=0))}],prefilter:function(e,t){t?yt.prefilters.unshift(e):yt.prefilters.push(e)}}),D.speed=function(e,t,n){var r=e&&"object"==typeof e?D.extend({},e):{complete:n||!n&&t||h(e)&&e,duration:e,easing:n&&t||t&&!h(t)&&t};return D.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in D.fx.speeds?r.duration=D.fx.speeds[r.duration]:r.duration=D.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){h(r.old)&&r.old.call(this),r.queue&&D.dequeue(this,r.queue)},r},D.fn.extend({fadeTo:function(e,t,n,r){return this.filter(me).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=D.isEmptyObject(e),o=D.speed(t,n,r),a=function(){var t=yt(this,D.extend({},e),o);(i||ie.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=D.timers,a=ie.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&dt.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||D.dequeue(this,e)}))},finish:function(e){return!1!==e&&(e=e||"fx"),this.each((function(){var t,n=ie.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=D.timers,a=r?r.length:0;for(n.finish=!0,D.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}))}}),D.each(["toggle","show","hide"],(function(e,t){var n=D.fn[t];D.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(mt(t,!0),e,r,i)}})),D.each({slideDown:mt("show"),slideUp:mt("hide"),slideToggle:mt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(e,t){D.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}})),D.timers=[],D.fx.tick=function(){var e,t=0,n=D.timers;for(ut=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||D.fx.stop(),ut=void 0},D.fx.timer=function(e){D.timers.push(e),D.fx.start()},D.fx.interval=13,D.fx.start=function(){ct||(ct=!0,ft())},D.fx.stop=function(){ct=null},D.fx.speeds={slow:600,fast:200,_default:400},D.fn.delay=function(t,n){return t=D.fx&&D.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=g.createElement("input"),t=g.createElement("select").appendChild(g.createElement("option"));e.type="checkbox",f.checkOn=""!==e.value,f.optSelected=t.selected,(e=g.createElement("input")).value="t",e.type="radio",f.radioValue="t"===e.value}();var bt,vt=D.expr.attrHandle;D.fn.extend({attr:function(e,t){return J(this,D.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each((function(){D.removeAttr(this,e)}))}}),D.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?D.prop(e,t,n):(1===o&&D.isXMLDoc(e)||(i=D.attrHooks[t.toLowerCase()]||(D.expr.match.bool.test(t)?bt:void 0)),void 0!==n?null===n?void D.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=D.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!f.radioValue&&"radio"===t&&S(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($);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),bt={set:function(e,t,n){return!1===t?D.removeAttr(e,n):e.setAttribute(n,n),n}},D.each(D.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=vt[t]||D.find.attr;vt[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=vt[a],vt[a]=i,i=null!=n(e,t,r)?a:null,vt[a]=o),i}}));var xt=/^(?:input|select|textarea|button)$/i,qt=/^(?:a|area)$/i;function Dt(e){return(e.match($)||[]).join(" ")}function Et(e){return e.getAttribute&&e.getAttribute("class")||""}function St(e){return Array.isArray(e)?e:"string"==typeof e&&e.match($)||[]}D.fn.extend({prop:function(e,t){return J(this,D.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[D.propFix[e]||e]}))}}),D.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&D.isXMLDoc(e)||(t=D.propFix[t]||t,i=D.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=D.find.attr(e,"tabindex");return t?parseInt(t,10):xt.test(e.nodeName)||qt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),f.optSelected||(D.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)}}),D.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){D.propFix[this.toLowerCase()]=this})),D.fn.extend({addClass:function(e){var t,n,r,i,o,a;return h(e)?this.each((function(t){D(this).addClass(e.call(this,t,Et(this)))})):(t=St(e)).length?this.each((function(){if(r=Et(this),n=1===this.nodeType&&" "+Dt(r)+" "){for(o=0;o<t.length;o++)i=t[o],n.indexOf(" "+i+" ")<0&&(n+=i+" ");a=Dt(n),r!==a&&this.setAttribute("class",a)}})):this},removeClass:function(e){var t,n,r,i,o,a;return h(e)?this.each((function(t){D(this).removeClass(e.call(this,t,Et(this)))})):arguments.length?(t=St(e)).length?this.each((function(){if(r=Et(this),n=1===this.nodeType&&" "+Dt(r)+" "){for(o=0;o<t.length;o++)for(i=t[o];n.indexOf(" "+i+" ")>-1;)n=n.replace(" "+i+" "," ");a=Dt(n),r!==a&&this.setAttribute("class",a)}})):this:this.attr("class","")},toggleClass:function(e,t){var n,r,i,o,a=typeof e,s="string"===a||Array.isArray(e);return h(e)?this.each((function(n){D(this).toggleClass(e.call(this,n,Et(this),t),t)})):"boolean"==typeof t&&s?t?this.addClass(e):this.removeClass(e):(n=St(e),this.each((function(){if(s)for(o=D(this),i=0;i<n.length;i++)r=n[i],o.hasClass(r)?o.removeClass(r):o.addClass(r);else void 0!==e&&"boolean"!==a||((r=Et(this))&&ie.set(this,"__className__",r),this.setAttribute&&this.setAttribute("class",r||!1===e?"":ie.get(this,"__className__")||""))})))},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+Dt(Et(n))+" ").indexOf(t)>-1)return!0;return!1}});var Ct=/\r/g;D.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=h(e),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,D(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=D.map(i,(function(e){return null==e?"":e+""}))),(t=D.valHooks[this.type]||D.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))}))):i?(t=D.valHooks[i.type]||D.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(Ct,""):null==n?"":n:void 0}}),D.extend({valHooks:{option:{get:function(e){var t=D.find.attr(e,"value");return null!=t?t:Dt(D.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],l=a?o+1:i.length;for(r=o<0?l:a?o:0;r<l;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!S(n.parentNode,"optgroup"))){if(t=D(n).val(),a)return t;s.push(t)}return s},set:function(e,t){for(var n,r,i=e.options,o=D.makeArray(t),a=i.length;a--;)((r=i[a]).selected=D.inArray(D.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),D.each(["radio","checkbox"],(function(){D.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=D.inArray(D(e).val(),t)>-1}},f.checkOn||(D.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}));var wt=e.location,At={guid:Date.now()},Tt=/\?/;D.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||D.error("Invalid XML: "+(r?D.map(r.childNodes,(function(e){return e.textContent})).join("\n"):t)),n};var Mt=/^(?:focusinfocus|focusoutblur)$/,It=function(e){e.stopPropagation()};D.extend(D.event,{trigger:function(t,n,r,i){var o,a,s,l,u,p,d,f,y=[r||g],b=c.call(t,"type")?t.type:t,v=c.call(t,"namespace")?t.namespace.split("."):[];if(a=f=s=r=r||g,3!==r.nodeType&&8!==r.nodeType&&!Mt.test(b+D.event.triggered)&&(b.indexOf(".")>-1&&(v=b.split("."),b=v.shift(),v.sort()),u=b.indexOf(":")<0&&"on"+b,(t=t[D.expando]?t:new D.Event(b,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=v.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:D.makeArray(n,[t]),d=D.event.special[b]||{},i||!d.trigger||!1!==d.trigger.apply(r,n))){if(!i&&!d.noBubble&&!m(r)){for(l=d.delegateType||b,Mt.test(l+b)||(a=a.parentNode);a;a=a.parentNode)y.push(a),s=a;s===(r.ownerDocument||g)&&y.push(s.defaultView||s.parentWindow||e)}for(o=0;(a=y[o++])&&!t.isPropagationStopped();)f=a,t.type=o>1?l:d.bindType||b,(p=(ie.get(a,"events")||Object.create(null))[t.type]&&ie.get(a,"handle"))&&p.apply(a,n),(p=u&&a[u])&&p.apply&&ne(a)&&(t.result=p.apply(a,n),!1===t.result&&t.preventDefault());return t.type=b,i||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(y.pop(),n)||!ne(r)||u&&h(r[b])&&!m(r)&&((s=r[u])&&(r[u]=null),D.event.triggered=b,t.isPropagationStopped()&&f.addEventListener(b,It),r[b](),t.isPropagationStopped()&&f.removeEventListener(b,It),D.event.triggered=void 0,s&&(r[u]=s)),t.result}},simulate:function(e,t,n){var r=D.extend(new D.Event,n,{type:e,isSimulated:!0});D.event.trigger(r,null,t)}}),D.fn.extend({trigger:function(e,t){return this.each((function(){D.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return D.event.trigger(e,t,n,!0)}});var kt=/\[\]$/,Ot=/\r?\n/g,Lt=/^(?:submit|button|image|reset|file)$/i,Nt=/^(?:input|select|textarea|keygen)/i;function Pt(e,t,n,r){var i;if(Array.isArray(t))D.each(t,(function(t,i){n||kt.test(e)?r(e,i):Pt(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)}));else if(n||"object"!==v(t))r(e,t);else for(i in t)Pt(e+"["+i+"]",t[i],n,r)}D.param=function(e,t){var n,r=[],i=function(e,t){var n=h(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!D.isPlainObject(e))D.each(e,(function(){i(this.name,this.value)}));else for(n in e)Pt(n,e[n],t,i);return r.join("&")},D.fn.extend({serialize:function(){return D.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=D.prop(this,"elements");return e?D.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!D(this).is(":disabled")&&Nt.test(this.nodeName)&&!Lt.test(e)&&(this.checked||!De.test(e))})).map((function(e,t){var n=D(this).val();return null==n?null:Array.isArray(n)?D.map(n,(function(e){return{name:t.name,value:e.replace(Ot,"\r\n")}})):{name:t.name,value:n.replace(Ot,"\r\n")}})).get()}});var Rt=/%20/g,Ht=/#.*$/,Ft=/([?&])_=[^&]*/,_t=/^(.*?):[ \t]*([^\r\n]*)$/gm,jt=/^(?:GET|HEAD)$/,zt=/^\/\//,Vt={},Bt={},$t="*/".concat("*"),Ut=g.createElement("a");function Wt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match($)||[];if(h(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Kt(e,t,n,r){var i={},o=e===Bt;function a(s){var l;return i[s]=!0,D.each(e[s]||[],(function(e,s){var u=s(t,n,r);return"string"!=typeof u||o||i[u]?o?!(l=u):void 0:(t.dataTypes.unshift(u),a(u),!1)})),l}return a(t.dataTypes[0])||!i["*"]&&a("*")}function Gt(e,t){var n,r,i=D.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&D.extend(!0,e,r),e}Ut.href=wt.href,D.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:{"*":$t,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":D.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Gt(Gt(e,D.ajaxSettings),t):Gt(D.ajaxSettings,e)},ajaxPrefilter:Wt(Vt),ajaxTransport:Wt(Bt),ajax:function(t,n){"object"==typeof t&&(n=t,t=void 0),n=n||{};var r,i,o,a,s,l,u,c,p,d,f=D.ajaxSetup({},n),h=f.context||f,m=f.context&&(h.nodeType||h.jquery)?D(h):D.event,y=D.Deferred(),b=D.Callbacks("once memory"),v=f.statusCode||{},x={},q={},E="canceled",S={readyState:0,getResponseHeader:function(e){var t;if(u){if(!a)for(a={};t=_t.exec(o);)a[t[1].toLowerCase()+" "]=(a[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=a[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return u?o:null},setRequestHeader:function(e,t){return null==u&&(e=q[e.toLowerCase()]=q[e.toLowerCase()]||e,x[e]=t),this},overrideMimeType:function(e){return null==u&&(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(u)S.always(e[S.status]);else for(t in e)v[t]=[v[t],e[t]];return this},abort:function(e){var t=e||E;return r&&r.abort(t),C(0,t),this}};if(y.promise(S),f.url=((t||f.url||wt.href)+"").replace(zt,wt.protocol+"//"),f.type=n.method||n.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match($)||[""],null==f.crossDomain){l=g.createElement("a");try{l.href=f.url,l.href=l.href,f.crossDomain=Ut.protocol+"//"+Ut.host!=l.protocol+"//"+l.host}catch(e){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=D.param(f.data,f.traditional)),Kt(Vt,f,n,S),u)return S;for(p in(c=D.event&&f.global)&&0==D.active++&&D.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!jt.test(f.type),i=f.url.replace(Ht,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(Rt,"+")):(d=f.url.slice(i.length),f.data&&(f.processData||"string"==typeof f.data)&&(i+=(Tt.test(i)?"&":"?")+f.data,delete f.data),!1===f.cache&&(i=i.replace(Ft,"$1"),d=(Tt.test(i)?"&":"?")+"_="+At.guid+++d),f.url=i+d),f.ifModified&&(D.lastModified[i]&&S.setRequestHeader("If-Modified-Since",D.lastModified[i]),D.etag[i]&&S.setRequestHeader("If-None-Match",D.etag[i])),(f.data&&f.hasContent&&!1!==f.contentType||n.contentType)&&S.setRequestHeader("Content-Type",f.contentType),S.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+$t+"; q=0.01":""):f.accepts["*"]),f.headers)S.setRequestHeader(p,f.headers[p]);if(f.beforeSend&&(!1===f.beforeSend.call(h,S,f)||u))return S.abort();if(E="abort",b.add(f.complete),S.done(f.success),S.fail(f.error),r=Kt(Bt,f,n,S)){if(S.readyState=1,c&&m.trigger("ajaxSend",[S,f]),u)return S;f.async&&f.timeout>0&&(s=e.setTimeout((function(){S.abort("timeout")}),f.timeout));try{u=!1,r.send(x,C)}catch(e){if(u)throw e;C(-1,e)}}else C(-1,"No Transport");function C(t,n,a,l){var p,d,g,x,q,E=n;u||(u=!0,s&&e.clearTimeout(s),r=void 0,o=l||"",S.readyState=t>0?4:0,p=t>=200&&t<300||304===t,a&&(x=function(e,t,n){for(var r,i,o,a,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){l.unshift(i);break}if(l[0]in n)o=l[0];else{for(i in n){if(!l[0]||e.converters[i+" "+l[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==l[0]&&l.unshift(o),n[o]}(f,S,a)),!p&&D.inArray("script",f.dataTypes)>-1&&D.inArray("json",f.dataTypes)<0&&(f.converters["text script"]=function(){}),x=function(e,t,n,r){var i,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(a=u[l+" "+o]||u["* "+o]))for(i in u)if((s=i.split(" "))[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){!0===a?a=u[i]:!0!==u[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 "+l+" to "+o}}}return{state:"success",data:t}}(f,x,S,p),p?(f.ifModified&&((q=S.getResponseHeader("Last-Modified"))&&(D.lastModified[i]=q),(q=S.getResponseHeader("etag"))&&(D.etag[i]=q)),204===t||"HEAD"===f.type?E="nocontent":304===t?E="notmodified":(E=x.state,d=x.data,p=!(g=x.error))):(g=E,!t&&E||(E="error",t<0&&(t=0))),S.status=t,S.statusText=(n||E)+"",p?y.resolveWith(h,[d,E,S]):y.rejectWith(h,[S,E,g]),S.statusCode(v),v=void 0,c&&m.trigger(p?"ajaxSuccess":"ajaxError",[S,f,p?d:g]),b.fireWith(h,[S,E]),c&&(m.trigger("ajaxComplete",[S,f]),--D.active||D.event.trigger("ajaxStop")))}return S},getJSON:function(e,t,n){return D.get(e,t,n,"json")},getScript:function(e,t){return D.get(e,void 0,t,"script")}}),D.each(["get","post"],(function(e,t){D[t]=function(e,n,r,i){return h(n)&&(i=i||r,r=n,n=void 0),D.ajax(D.extend({url:e,type:t,dataType:i,data:n,success:r},D.isPlainObject(e)&&e))}})),D.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),D._evalUrl=function(e,t,n){return D.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){D.globalEval(e,t,n)}})},D.fn.extend({wrapAll:function(e){var t;return this[0]&&(h(e)&&(e=e.call(this[0])),t=D(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 h(e)?this.each((function(t){D(this).wrapInner(e.call(this,t))})):this.each((function(){var t=D(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=h(e);return this.each((function(n){D(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){D(this).replaceWith(this.childNodes)})),this}}),D.expr.pseudos.hidden=function(e){return!D.expr.pseudos.visible(e)},D.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},D.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var Yt={0:200,1223:204},Xt=D.ajaxSettings.xhr();f.cors=!!Xt&&"withCredentials"in Xt,f.ajax=Xt=!!Xt,D.ajaxTransport((function(t){var n,r;if(f.cors||Xt&&!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(Yt[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()}}})),D.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),D.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 D.globalEval(e),e}}}),D.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),D.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,i){t=D("<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)}),g.head.appendChild(t[0])},abort:function(){n&&n()}}}));var Jt,Qt=[],Zt=/(=)\?(?=&|$)|\?\?/;D.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Qt.pop()||D.expando+"_"+At.guid++;return this[e]=!0,e}}),D.ajaxPrefilter("json jsonp",(function(t,n,r){var i,o,a,s=!1!==t.jsonp&&(Zt.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Zt.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=h(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(Zt,"$1"+i):!1!==t.jsonp&&(t.url+=(Tt.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||D.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?D(e).removeProp(i):e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,Qt.push(i)),a&&h(o)&&o(a[0]),a=o=void 0})),"script"})),f.createHTMLDocument=((Jt=g.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Jt.childNodes.length),D.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(f.createHTMLDocument?((r=(t=g.implementation.createHTMLDocument("")).createElement("base")).href=g.location.href,t.head.appendChild(r)):t=g),o=!n&&[],(i=H.exec(e))?[t.createElement(i[1])]:(i=Me([e],t,o),o&&o.length&&D(o).remove(),D.merge([],i.childNodes)));var r,i,o},D.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return s>-1&&(r=Dt(e.slice(s)),e=e.slice(0,s)),h(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),a.length>0&&D.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done((function(e){o=arguments,a.html(r?D("<div>").append(D.parseHTML(e)).find(r):e)})).always(n&&function(e,t){a.each((function(){n.apply(this,o||[e.responseText,t,e])}))}),this},D.expr.pseudos.animated=function(e){return D.grep(D.timers,(function(t){return e===t.elem})).length},D.offset={setOffset:function(e,t,n){var r,i,o,a,s,l,u=D.css(e,"position"),c=D(e),p={};"static"===u&&(e.style.position="relative"),s=c.offset(),o=D.css(e,"top"),l=D.css(e,"left"),("absolute"===u||"fixed"===u)&&(o+l).indexOf("auto")>-1?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(l)||0),h(t)&&(t=t.call(e,n,D.extend({},s))),null!=t.top&&(p.top=t.top-s.top+a),null!=t.left&&(p.left=t.left-s.left+i),"using"in t?t.using.call(e,p):c.css(p)}},D.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){D.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"===D.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"===D.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=D(e).offset()).top+=D.css(e,"borderTopWidth",!0),i.left+=D.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-D.css(r,"marginTop",!0),left:t.left-i.left-D.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===D.css(e,"position");)e=e.offsetParent;return e||de}))}}),D.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var n="pageYOffset"===t;D.fn[e]=function(r){return J(this,(function(e,r,i){var o;if(m(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)}})),D.each(["top","left"],(function(e,t){D.cssHooks[t]=Je(f.pixelPosition,(function(e,n){if(n)return n=Xe(e,t),Ue.test(n)?D(e).position()[t]+"px":n}))})),D.each({Height:"height",Width:"width"},(function(e,t){D.each({padding:"inner"+e,content:t,"":"outer"+e},(function(n,r){D.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return J(this,(function(t,n,i){var o;return m(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?D.css(t,n,s):D.style(t,n,i,s)}),t,a?i:void 0,a)}}))})),D.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){D.fn[t]=function(e){return this.on(t,e)}})),D.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)}}),D.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){D.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}));var en=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;D.proxy=function(e,t){var n,r,o;if("string"==typeof t&&(n=e[t],t=e,e=n),h(e))return r=i.call(arguments,2),o=function(){return e.apply(t||this,r.concat(i.call(arguments)))},o.guid=e.guid=e.guid||D.guid++,o},D.holdReady=function(e){e?D.readyWait++:D.ready(!0)},D.isArray=Array.isArray,D.parseJSON=JSON.parse,D.nodeName=S,D.isFunction=h,D.isWindow=m,D.camelCase=te,D.type=v,D.now=Date.now,D.isNumeric=function(e){var t=D.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},D.trim=function(e){return null==e?"":(e+"").replace(en,"$1")};var tn=e.jQuery,nn=e.$;return D.noConflict=function(t){return e.$===D&&(e.$=nn),t&&e.jQuery===D&&(e.jQuery=tn),D},void 0===t&&(e.jQuery=e.$=D),D}));var T=C(A.exports),M={"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-й процентиль"}}};const I={click:"Tap",Click:"Tap",tap:"Tap",pan:"Pan",swipe:"Swipe",rotate:"Rotate",press:"Press",pinch:"Pinch"};function k(e){return I[e]||e}function O(e){return function(t,n,r){let i,o,a,s,l=[],u=!0;function c(){"function"==typeof i.enable&&(i.enable=i.enable.bind(o)()),i.enable&&(i.gestures.forEach((t=>{t.options=t.options||{},void 0===t.options.enable&&(t.options.enable=!0),"function"==typeof t.options.enable&&(t.options.enable=t.options.enable.bind(o));const n=k(t.type);e&&e[n]&&(t.options.event=t.options.event||t.type.toLowerCase(),a=a||new e.Manager(r),a.add(new e[n](t.options)),Object.keys(t.events).forEach((e=>{t.events[e]=t.events[e].bind(o),a.on(e,t.events[e])})),l.push(t))})),i.gestures.forEach((t=>{const n=k(t.type);e&&e[n]&&(t.recognizeWith&&a.get(t.options.event).recognizeWith(t.recognizeWith.split(" ").filter((e=>""!==e))),t.requireFailure&&a.get(t.options.event).requireFailure(t.requireFailure.split(" ").filter((e=>""!==e))))})))}function p(){l.forEach((e=>{Object.keys(e.events).forEach((t=>{a.off(t,e.events[t])})),a.remove(e.options.event)})),l=[]}return{get key(){return s},set(e){!function(e){s=e.key,i=e,o={chart:t,mediator:n,settings:i},i.gestures=i.gestures||[],void 0===i.enable&&(i.enable=!0)}(e),p(),u&&c()},off(){u=!1,p()},on(){u=!0,0===l.length&&c()},destroy(){p(),a&&a.destroy(),a=null,o=null,i=null}}}}var L={exports:{}};
|
|
16
|
+
* Date: 2023-08-28T13:37Z
|
|
17
|
+
*/C=A,function(e,t){C.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}}("undefined"!=typeof window?window:E,(function(e,t){var n=[],r=Object.getPrototypeOf,i=n.slice,o=n.flat?function(e){return n.flat.call(e)}:function(e){return n.concat.apply([],e)},a=n.push,s=n.indexOf,l={},u=l.toString,c=l.hasOwnProperty,p=c.toString,f=p.call(Object),d={},h=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},m=function(e){return null!=e&&e===e.window},g=e.document,y={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||g).createElement("script");if(o.text=e,t)for(r in y)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function v(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[u.call(e)]||"object":typeof e}var x="3.7.1",q=/HTML$/i,D=function(e,t){return new D.fn.init(e,t)};function S(e){var t=!!e&&"length"in e&&e.length,n=v(e);return!h(e)&&!m(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function E(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}D.fn=D.prototype={jquery:x,constructor:D,length:0,toArray:function(){return i.call(this)},get:function(e){return null==e?i.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=D.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return D.each(this,e)},map:function(e){return this.pushStack(D.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(i.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(D.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(D.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:a,sort:n.sort,splice:n.splice},D.extend=D.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,l=arguments.length,u=!1;for("boolean"==typeof a&&(u=a,a=arguments[s]||{},s++),"object"==typeof a||h(a)||(a={}),s===l&&(a=this,s--);s<l;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(u&&r&&(D.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||D.isPlainObject(n)?n:{},i=!1,a[t]=D.extend(u,o,r)):void 0!==r&&(a[t]=r));return a},D.extend({expando:"jQuery"+(x+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==u.call(e)||(t=r(e))&&("function"!=typeof(n=c.call(t,"constructor")&&t.constructor)||p.call(n)!==f))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){b(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(S(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},text:function(e){var t,n="",r=0,i=e.nodeType;if(!i)for(;t=e[r++];)n+=D.text(t);return 1===i||11===i?e.textContent:9===i?e.documentElement.textContent:3===i||4===i?e.nodeValue:n},makeArray:function(e,t){var n=t||[];return null!=e&&(S(Object(e))?D.merge(n,"string"==typeof e?[e]:e):a.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:s.call(t,e,n)},isXMLDoc:function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!q.test(t||n&&n.nodeName||"HTML")},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,a=0,s=[];if(S(e))for(r=e.length;a<r;a++)null!=(i=t(e[a],a,n))&&s.push(i);else for(a in e)null!=(i=t(e[a],a,n))&&s.push(i);return o(s)},guid:1,support:d}),"function"==typeof Symbol&&(D.fn[Symbol.iterator]=n[Symbol.iterator]),D.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(e,t){l["[object "+t+"]"]=t.toLowerCase()}));var w=n.pop,C=n.sort,A=n.splice,T="[\\x20\\t\\r\\n\\f]",M=new RegExp("^"+T+"+|((?:^|[^\\\\])(?:\\\\.)*)"+T+"+$","g");D.contains=function(e,t){var n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(e.contains?e.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))};var k=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function I(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e}D.escapeSelector=function(e){return(e+"").replace(k,I)};var O=g,N=a;!function(){var t,r,o,a,l,u,p,f,h,m,g=N,y=D.expando,b=0,v=0,x=ee(),q=ee(),S=ee(),k=ee(),I=function(e,t){return e===t&&(l=!0),0},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="(?:\\\\[\\da-fA-F]{1,6}"+T+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",R="\\["+T+"*("+P+")(?:"+T+"*([*^$|!~]?=)"+T+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+P+"))|)"+T+"*\\]",H=":("+P+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+R+")*)|.*)\\)|)",F=new RegExp(T+"+","g"),_=new RegExp("^"+T+"*,"+T+"*"),j=new RegExp("^"+T+"*([>+~]|"+T+")"+T+"*"),z=new RegExp(T+"|>"),V=new RegExp(H),B=new RegExp("^"+P+"$"),$={ID:new RegExp("^#("+P+")"),CLASS:new RegExp("^\\.("+P+")"),TAG:new RegExp("^("+P+"|[*])"),ATTR:new RegExp("^"+R),PSEUDO:new RegExp("^"+H),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+T+"*(even|odd|(([+-]|)(\\d*)n|)"+T+"*(?:([+-]|)"+T+"*(\\d+)|))"+T+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+T+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+T+"*((?:-\\d)?\\d*)"+T+"*\\)|)(?=[^-]|$)","i")},U=/^(?:input|select|textarea|button)$/i,W=/^h\d$/i,K=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Y=/[+~]/,G=new RegExp("\\\\[\\da-fA-F]{1,6}"+T+"?|\\\\([^\\r\\n\\f])","g"),X=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},J=function(){le()},Q=fe((function(e){return!0===e.disabled&&E(e,"fieldset")}),{dir:"parentNode",next:"legend"});try{g.apply(n=i.call(O.childNodes),O.childNodes),n[O.childNodes.length].nodeType}catch(e){g={apply:function(e,t){N.apply(e,i.call(t))},call:function(e){N.apply(e,i.call(arguments,1))}}}function Z(e,t,n,r){var i,o,a,s,l,c,p,m=t&&t.ownerDocument,b=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==b&&9!==b&&11!==b)return n;if(!r&&(le(t),t=t||u,f)){if(11!==b&&(l=K.exec(e)))if(i=l[1]){if(9===b){if(!(a=t.getElementById(i)))return n;if(a.id===i)return g.call(n,a),n}else if(m&&(a=m.getElementById(i))&&Z.contains(t,a)&&a.id===i)return g.call(n,a),n}else{if(l[2])return g.apply(n,t.getElementsByTagName(e)),n;if((i=l[3])&&t.getElementsByClassName)return g.apply(n,t.getElementsByClassName(i)),n}if(!(k[e+" "]||h&&h.test(e))){if(p=e,m=t,1===b&&(z.test(e)||j.test(e))){for((m=Y.test(e)&&se(t.parentNode)||t)==t&&d.scope||((s=t.getAttribute("id"))?s=D.escapeSelector(s):t.setAttribute("id",s=y)),o=(c=ce(e)).length;o--;)c[o]=(s?"#"+s:":scope")+" "+pe(c[o]);p=c.join(",")}try{return g.apply(n,m.querySelectorAll(p)),n}catch(t){k(e,!0)}finally{s===y&&t.removeAttribute("id")}}}return be(e.replace(M,"$1"),t,n,r)}function ee(){var e=[];return function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function te(e){return e[y]=!0,e}function ne(e){var t=u.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function re(e){return function(t){return E(t,"input")&&t.type===e}}function ie(e){return function(t){return(E(t,"input")||E(t,"button"))&&t.type===e}}function oe(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&Q(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function ae(e){return te((function(t){return t=+t,te((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 se(e){return e&&void 0!==e.getElementsByTagName&&e}function le(e){var t,n=e?e.ownerDocument||e:O;return n!=u&&9===n.nodeType&&n.documentElement?(p=(u=n).documentElement,f=!D.isXMLDoc(u),m=p.matches||p.webkitMatchesSelector||p.msMatchesSelector,p.msMatchesSelector&&O!=u&&(t=u.defaultView)&&t.top!==t&&t.addEventListener("unload",J),d.getById=ne((function(e){return p.appendChild(e).id=D.expando,!u.getElementsByName||!u.getElementsByName(D.expando).length})),d.disconnectedMatch=ne((function(e){return m.call(e,"*")})),d.scope=ne((function(){return u.querySelectorAll(":scope")})),d.cssHas=ne((function(){try{return u.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}})),d.getById?(r.filter.ID=function(e){var t=e.replace(G,X);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&f){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(G,X);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&&f){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=function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},r.find.CLASS=function(e,t){if(void 0!==t.getElementsByClassName&&f)return t.getElementsByClassName(e)},h=[],ne((function(e){var t;p.appendChild(e).innerHTML="<a id='"+y+"' href='' disabled='disabled'></a><select id='"+y+"-\r\\' disabled='disabled'><option selected=''></option></select>",e.querySelectorAll("[selected]").length||h.push("\\["+T+"*(?:value|"+L+")"),e.querySelectorAll("[id~="+y+"-]").length||h.push("~="),e.querySelectorAll("a#"+y+"+*").length||h.push(".#.+[+~]"),e.querySelectorAll(":checked").length||h.push(":checked"),(t=u.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),p.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&h.push(":enabled",":disabled"),(t=u.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||h.push("\\["+T+"*name"+T+"*="+T+"*(?:''|\"\")")})),d.cssHas||h.push(":has"),h=h.length&&new RegExp(h.join("|")),I=function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e===u||e.ownerDocument==O&&Z.contains(O,e)?-1:t===u||t.ownerDocument==O&&Z.contains(O,t)?1:a?s.call(a,e)-s.call(a,t):0:4&n?-1:1)},u):u}for(t in Z.matches=function(e,t){return Z(e,null,null,t)},Z.matchesSelector=function(e,t){if(le(e),f&&!k[t+" "]&&(!h||!h.test(t)))try{var n=m.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){k(t,!0)}return Z(t,u,null,[e]).length>0},Z.contains=function(e,t){return(e.ownerDocument||e)!=u&&le(e),D.contains(e,t)},Z.attr=function(e,t){(e.ownerDocument||e)!=u&&le(e);var n=r.attrHandle[t.toLowerCase()],i=n&&c.call(r.attrHandle,t.toLowerCase())?n(e,t,!f):void 0;return void 0!==i?i:e.getAttribute(t)},Z.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},D.uniqueSort=function(e){var t,n=[],r=0,o=0;if(l=!d.sortStable,a=!d.sortStable&&i.call(e,0),C.call(e,I),l){for(;t=e[o++];)t===e[o]&&(r=n.push(o));for(;r--;)A.call(e,n[r],1)}return a=null,e},D.fn.uniqueSort=function(){return this.pushStack(D.uniqueSort(i.apply(this)))},r=D.expr={cacheLength:50,createPseudo:te,match:$,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(G,X),e[3]=(e[3]||e[4]||e[5]||"").replace(G,X),"~="===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]||Z.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]&&Z.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return $.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&V.test(n)&&(t=ce(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(G,X).toLowerCase();return"*"===e?function(){return!0}:function(e){return E(e,t)}},CLASS:function(e){var t=x[e+" "];return t||(t=new RegExp("(^|"+T+")"+e+"("+T+"|$)"))&&x(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(r){var i=Z.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(F," ")+" ").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,l){var u,c,p,f,d,h=o!==a?"nextSibling":"previousSibling",m=t.parentNode,g=s&&t.nodeName.toLowerCase(),v=!l&&!s,x=!1;if(m){if(o){for(;h;){for(p=t;p=p[h];)if(s?E(p,g):1===p.nodeType)return!1;d=h="only"===e&&!d&&"nextSibling"}return!0}if(d=[a?m.firstChild:m.lastChild],a&&v){for(x=(f=(u=(c=m[y]||(m[y]={}))[e]||[])[0]===b&&u[1])&&u[2],p=f&&m.childNodes[f];p=++f&&p&&p[h]||(x=f=0)||d.pop();)if(1===p.nodeType&&++x&&p===t){c[e]=[b,f,x];break}}else if(v&&(x=f=(u=(c=t[y]||(t[y]={}))[e]||[])[0]===b&&u[1]),!1===x)for(;(p=++f&&p&&p[h]||(x=f=0)||d.pop())&&(!(s?E(p,g):1===p.nodeType)||!++x||(v&&((c=p[y]||(p[y]={}))[e]=[b,x]),p!==t)););return(x-=i)===r||x%r==0&&x/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||Z.error("unsupported pseudo: "+e);return i[y]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?te((function(e,n){for(var r,o=i(e,t),a=o.length;a--;)e[r=s.call(e,o[a])]=!(n[r]=o[a])})):function(e){return i(e,0,n)}):i}},pseudos:{not:te((function(e){var t=[],n=[],r=ye(e.replace(M,"$1"));return r[y]?te((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:te((function(e){return function(t){return Z(e,t).length>0}})),contains:te((function(e){return e=e.replace(G,X),function(t){return(t.textContent||D.text(t)).indexOf(e)>-1}})),lang:te((function(e){return B.test(e||"")||Z.error("unsupported lang: "+e),e=e.replace(G,X).toLowerCase(),function(t){var n;do{if(n=f?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===function(){try{return u.activeElement}catch(e){}}()&&u.hasFocus()&&!!(e.type||e.href||~e.tabIndex)},enabled:oe(!1),disabled:oe(!0),checked:function(e){return E(e,"input")&&!!e.checked||E(e,"option")&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return W.test(e.nodeName)},input:function(e){return U.test(e.nodeName)},button:function(e){return E(e,"input")&&"button"===e.type||E(e,"button")},text:function(e){var t;return E(e,"input")&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ae((function(){return[0]})),last:ae((function(e,t){return[t-1]})),eq:ae((function(e,t,n){return[n<0?n+t:n]})),even:ae((function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e})),odd:ae((function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e})),lt:ae((function(e,t,n){var r;for(r=n<0?n+t:n>t?t:n;--r>=0;)e.push(r);return e})),gt:ae((function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e}))}},r.pseudos.nth=r.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[t]=re(t);for(t in{submit:!0,reset:!0})r.pseudos[t]=ie(t);function ue(){}function ce(e,t){var n,i,o,a,s,l,u,c=q[e+" "];if(c)return t?0:c.slice(0);for(s=e,l=[],u=r.preFilter;s;){for(a in n&&!(i=_.exec(s))||(i&&(s=s.slice(i[0].length)||s),l.push(o=[])),n=!1,(i=j.exec(s))&&(n=i.shift(),o.push({value:n,type:i[0].replace(M," ")}),s=s.slice(n.length)),r.filter)!(i=$[a].exec(s))||u[a]&&!(i=u[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?Z.error(e):q(e,l).slice(0)}function pe(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function fe(e,t,n){var r=t.dir,i=t.next,o=i||r,a=n&&"parentNode"===o,s=v++;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,l){var u,c,p=[b,s];if(l){for(;t=t[r];)if((1===t.nodeType||a)&&e(t,n,l))return!0}else for(;t=t[r];)if(1===t.nodeType||a)if(c=t[y]||(t[y]={}),i&&E(t,i))t=t[r]||t;else{if((u=c[o])&&u[0]===b&&u[1]===s)return p[2]=u[2];if(c[o]=p,p[2]=e(t,n,l))return!0}return!1}}function de(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 he(e,t,n,r,i){for(var o,a=[],s=0,l=e.length,u=null!=t;s<l;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),u&&t.push(s)));return a}function me(e,t,n,r,i,o){return r&&!r[y]&&(r=me(r)),i&&!i[y]&&(i=me(i,o)),te((function(o,a,l,u){var c,p,f,d,h=[],m=[],y=a.length,b=o||function(e,t,n){for(var r=0,i=t.length;r<i;r++)Z(e,t[r],n);return n}(t||"*",l.nodeType?[l]:l,[]),v=!e||!o&&t?b:he(b,h,e,l,u);if(n?n(v,d=i||(o?e:y||r)?[]:a,l,u):d=v,r)for(c=he(d,m),r(c,[],l,u),p=c.length;p--;)(f=c[p])&&(d[m[p]]=!(v[m[p]]=f));if(o){if(i||e){if(i){for(c=[],p=d.length;p--;)(f=d[p])&&c.push(v[p]=f);i(null,d=[],c,u)}for(p=d.length;p--;)(f=d[p])&&(c=i?s.call(o,f):h[p])>-1&&(o[c]=!(a[c]=f))}}else d=he(d===a?d.splice(y,d.length):d),i?i(null,a,d,u):g.apply(a,d)}))}function ge(e){for(var t,n,i,a=e.length,l=r.relative[e[0].type],u=l||r.relative[" "],c=l?1:0,p=fe((function(e){return e===t}),u,!0),f=fe((function(e){return s.call(t,e)>-1}),u,!0),d=[function(e,n,r){var i=!l&&(r||n!=o)||((t=n).nodeType?p(e,n,r):f(e,n,r));return t=null,i}];c<a;c++)if(n=r.relative[e[c].type])d=[fe(de(d),n)];else{if((n=r.filter[e[c].type].apply(null,e[c].matches))[y]){for(i=++c;i<a&&!r.relative[e[i].type];i++);return me(c>1&&de(d),c>1&&pe(e.slice(0,c-1).concat({value:" "===e[c-2].type?"*":""})).replace(M,"$1"),n,c<i&&ge(e.slice(c,i)),i<a&&ge(e=e.slice(i)),i<a&&pe(e))}d.push(n)}return de(d)}function ye(e,t){var n,i=[],a=[],s=S[e+" "];if(!s){for(t||(t=ce(e)),n=t.length;n--;)(s=ge(t[n]))[y]?i.push(s):a.push(s);s=S(e,function(e,t){var n=t.length>0,i=e.length>0,a=function(a,s,l,c,p){var d,h,m,y=0,v="0",x=a&&[],q=[],S=o,E=a||i&&r.find.TAG("*",p),C=b+=null==S?1:Math.random()||.1,A=E.length;for(p&&(o=s==u||s||p);v!==A&&null!=(d=E[v]);v++){if(i&&d){for(h=0,s||d.ownerDocument==u||(le(d),l=!f);m=e[h++];)if(m(d,s||u,l)){g.call(c,d);break}p&&(b=C)}n&&((d=!m&&d)&&y--,a&&x.push(d))}if(y+=v,n&&v!==y){for(h=0;m=t[h++];)m(x,q,s,l);if(a){if(y>0)for(;v--;)x[v]||q[v]||(q[v]=w.call(c));q=he(q)}g.apply(c,q),p&&!a&&q.length>0&&y+t.length>1&&D.uniqueSort(c)}return p&&(b=C,o=S),x};return n?te(a):a}(a,i)),s.selector=e}return s}function be(e,t,n,i){var o,a,s,l,u,c="function"==typeof e&&e,p=!i&&ce(e=c.selector||e);if(n=n||[],1===p.length){if((a=p[0]=p[0].slice(0)).length>2&&"ID"===(s=a[0]).type&&9===t.nodeType&&f&&r.relative[a[1].type]){if(!(t=(r.find.ID(s.matches[0].replace(G,X),t)||[])[0]))return n;c&&(t=t.parentNode),e=e.slice(a.shift().value.length)}for(o=$.needsContext.test(e)?0:a.length;o--&&(s=a[o],!r.relative[l=s.type]);)if((u=r.find[l])&&(i=u(s.matches[0].replace(G,X),Y.test(a[0].type)&&se(t.parentNode)||t))){if(a.splice(o,1),!(e=i.length&&pe(a)))return g.apply(n,i),n;break}}return(c||ye(e,p))(i,t,!f,n,!t||Y.test(e)&&se(t.parentNode)||t),n}ue.prototype=r.filters=r.pseudos,r.setFilters=new ue,d.sortStable=y.split("").sort(I).join("")===y,le(),d.sortDetached=ne((function(e){return 1&e.compareDocumentPosition(u.createElement("fieldset"))})),D.find=Z,D.expr[":"]=D.expr.pseudos,D.unique=D.uniqueSort,Z.compile=ye,Z.select=be,Z.setDocument=le,Z.tokenize=ce,Z.escape=D.escapeSelector,Z.getText=D.text,Z.isXML=D.isXMLDoc,Z.selectors=D.expr,Z.support=D.support,Z.uniqueSort=D.uniqueSort}();var L=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&D(e).is(n))break;r.push(e)}return r},P=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},R=D.expr.match.needsContext,H=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function F(e,t,n){return h(t)?D.grep(e,(function(e,r){return!!t.call(e,r,e)!==n})):t.nodeType?D.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?D.grep(e,(function(e){return s.call(t,e)>-1!==n})):D.filter(t,e,n)}D.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?D.find.matchesSelector(r,e)?[r]:[]:D.find.matches(e,D.grep(t,(function(e){return 1===e.nodeType})))},D.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(D(e).filter((function(){for(t=0;t<r;t++)if(D.contains(i[t],this))return!0})));for(n=this.pushStack([]),t=0;t<r;t++)D.find(e,i[t],n);return r>1?D.uniqueSort(n):n},filter:function(e){return this.pushStack(F(this,e||[],!1))},not:function(e){return this.pushStack(F(this,e||[],!0))},is:function(e){return!!F(this,"string"==typeof e&&R.test(e)?D(e):e||[],!1).length}});var _,j=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(D.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||_,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:j.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 D?t[0]:t,D.merge(this,D.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:g,!0)),H.test(r[1])&&D.isPlainObject(t))for(r in t)h(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=g.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):h(e)?void 0!==n.ready?n.ready(e):e(D):D.makeArray(e,this)}).prototype=D.fn,_=D(g);var z=/^(?:parents|prev(?:Until|All))/,V={children:!0,contents:!0,next:!0,prev:!0};function B(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}D.fn.extend({has:function(e){var t=D(e,this),n=t.length;return this.filter((function(){for(var e=0;e<n;e++)if(D.contains(this,t[e]))return!0}))},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&D(e);if(!R.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&&D.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?D.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?s.call(D(e),this[0]):s.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(D.uniqueSort(D.merge(this.get(),D(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),D.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return L(e,"parentNode")},parentsUntil:function(e,t,n){return L(e,"parentNode",n)},next:function(e){return B(e,"nextSibling")},prev:function(e){return B(e,"previousSibling")},nextAll:function(e){return L(e,"nextSibling")},prevAll:function(e){return L(e,"previousSibling")},nextUntil:function(e,t,n){return L(e,"nextSibling",n)},prevUntil:function(e,t,n){return L(e,"previousSibling",n)},siblings:function(e){return P((e.parentNode||{}).firstChild,e)},children:function(e){return P(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(E(e,"template")&&(e=e.content||e),D.merge([],e.childNodes))}},(function(e,t){D.fn[e]=function(n,r){var i=D.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=D.filter(r,i)),this.length>1&&(V[e]||D.uniqueSort(i),z.test(e)&&i.reverse()),this.pushStack(i)}}));var $=/[^\x20\t\r\n\f]+/g;function U(e){return e}function W(e){throw e}function K(e,t,n,r){var i;try{e&&h(i=e.promise)?i.call(e).done(t).fail(n):e&&h(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}D.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return D.each(e.match($)||[],(function(e,n){t[n]=!0})),t}(e):D.extend({},e);var t,n,r,i,o=[],a=[],s=-1,l=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?[]:"")},u={add:function(){return o&&(n&&!t&&(s=o.length-1,a.push(n)),function t(n){D.each(n,(function(n,r){h(r)?e.unique&&u.has(r)||o.push(r):r&&r.length&&"string"!==v(r)&&t(r)}))}(arguments),n&&!t&&l()),this},remove:function(){return D.each(arguments,(function(e,t){for(var n;(n=D.inArray(t,o,n))>-1;)o.splice(n,1),n<=s&&s--})),this},has:function(e){return e?D.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||l()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!r}};return u},D.extend({Deferred:function(t){var n=[["notify","progress",D.Callbacks("memory"),D.Callbacks("memory"),2],["resolve","done",D.Callbacks("once memory"),D.Callbacks("once memory"),0,"resolved"],["reject","fail",D.Callbacks("once memory"),D.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return D.Deferred((function(t){D.each(n,(function(n,r){var i=h(e[r[4]])&&e[r[4]];o[r[1]]((function(){var e=i&&i.apply(this,arguments);e&&h(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,r,i){var o=0;function a(t,n,r,i){return function(){var s=this,l=arguments,u=function(){var e,u;if(!(t<o)){if((e=r.apply(s,l))===n.promise())throw new TypeError("Thenable self-resolution");u=e&&("object"==typeof e||"function"==typeof e)&&e.then,h(u)?i?u.call(e,a(o,n,U,i),a(o,n,W,i)):(o++,u.call(e,a(o,n,U,i),a(o,n,W,i),a(o,n,U,n.notifyWith))):(r!==U&&(s=void 0,l=[e]),(i||n.resolveWith)(s,l))}},c=i?u:function(){try{u()}catch(e){D.Deferred.exceptionHook&&D.Deferred.exceptionHook(e,c.error),t+1>=o&&(r!==W&&(s=void 0,l=[e]),n.rejectWith(s,l))}};t?c():(D.Deferred.getErrorHook?c.error=D.Deferred.getErrorHook():D.Deferred.getStackHook&&(c.error=D.Deferred.getStackHook()),e.setTimeout(c))}}return D.Deferred((function(e){n[0][3].add(a(0,e,h(i)?i:U,e.notifyWith)),n[1][3].add(a(0,e,h(t)?t:U)),n[2][3].add(a(0,e,h(r)?r:W))})).promise()},promise:function(e){return null!=e?D.extend(e,i):i}},o={};return D.each(n,(function(e,t){var a=t[2],s=t[5];i[t[1]]=a.add,s&&a.add((function(){r=s}),n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),a.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=a.fireWith})),i.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),o=i.call(arguments),a=D.Deferred(),s=function(e){return function(n){r[e]=this,o[e]=arguments.length>1?i.call(arguments):n,--t||a.resolveWith(r,o)}};if(t<=1&&(K(e,a.done(s(n)).resolve,a.reject,!t),"pending"===a.state()||h(o[n]&&o[n].then)))return a.then();for(;n--;)K(o[n],s(n),a.reject);return a.promise()}});var Y=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;D.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&Y.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},D.readyException=function(t){e.setTimeout((function(){throw t}))};var G=D.Deferred();function X(){g.removeEventListener("DOMContentLoaded",X),e.removeEventListener("load",X),D.ready()}D.fn.ready=function(e){return G.then(e).catch((function(e){D.readyException(e)})),this},D.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--D.readyWait:D.isReady)||(D.isReady=!0,!0!==e&&--D.readyWait>0||G.resolveWith(g,[D]))}}),D.ready.then=G.then,"complete"===g.readyState||"loading"!==g.readyState&&!g.documentElement.doScroll?e.setTimeout(D.ready):(g.addEventListener("DOMContentLoaded",X),e.addEventListener("load",X));var J=function(e,t,n,r,i,o,a){var s=0,l=e.length,u=null==n;if("object"===v(n))for(s in i=!0,n)J(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,h(r)||(a=!0),u&&(a?(t.call(e,r),t=null):(u=t,t=function(e,t,n){return u.call(D(e),n)})),t))for(;s<l;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:u?t.call(e):l?t(e[0],n):o},Q=/^-ms-/,Z=/-([a-z])/g;function ee(e,t){return t.toUpperCase()}function te(e){return e.replace(Q,"ms-").replace(Z,ee)}var ne=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function re(){this.expando=D.expando+re.uid++}re.uid=1,re.prototype={cache:function(e){var t=e[this.expando];return t||(t={},ne(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[te(t)]=n;else for(r in t)i[te(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][te(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(te):(t=te(t))in r?[t]:t.match($)||[]).length;for(;n--;)delete r[t[n]]}(void 0===t||D.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&&!D.isEmptyObject(t)}};var ie=new re,oe=new re,ae=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,se=/[A-Z]/g;function le(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(se,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:ae.test(e)?JSON.parse(e):e)}(n)}catch(e){}oe.set(e,t,n)}else n=void 0;return n}D.extend({hasData:function(e){return oe.hasData(e)||ie.hasData(e)},data:function(e,t,n){return oe.access(e,t,n)},removeData:function(e,t){oe.remove(e,t)},_data:function(e,t,n){return ie.access(e,t,n)},_removeData:function(e,t){ie.remove(e,t)}}),D.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=oe.get(o),1===o.nodeType&&!ie.get(o,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&0===(r=a[n].name).indexOf("data-")&&(r=te(r.slice(5)),le(o,r,i[r]));ie.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each((function(){oe.set(this,e)})):J(this,(function(t){var n;if(o&&void 0===t)return void 0!==(n=oe.get(o,e))||void 0!==(n=le(o,e))?n:void 0;this.each((function(){oe.set(this,e,t)}))}),null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each((function(){oe.remove(this,e)}))}}),D.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=ie.get(e,t),n&&(!r||Array.isArray(n)?r=ie.access(e,t,D.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=D.queue(e,t),r=n.length,i=n.shift(),o=D._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,(function(){D.dequeue(e,t)}),o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return ie.get(e,n)||ie.access(e,n,{empty:D.Callbacks("once memory").add((function(){ie.remove(e,[t+"queue",n])}))})}}),D.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?D.queue(this[0],e):void 0===t?this:this.each((function(){var n=D.queue(this,e,t);D._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&D.dequeue(this,e)}))},dequeue:function(e){return this.each((function(){D.dequeue(this,e)}))},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=D.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=ie.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var ue=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ce=new RegExp("^(?:([+-])=|)("+ue+")([a-z%]*)$","i"),pe=["Top","Right","Bottom","Left"],fe=g.documentElement,de=function(e){return D.contains(e.ownerDocument,e)},he={composed:!0};fe.getRootNode&&(de=function(e){return D.contains(e.ownerDocument,e)||e.getRootNode(he)===e.ownerDocument});var me=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&de(e)&&"none"===D.css(e,"display")};function ge(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return D.css(e,t,"")},l=s(),u=n&&n[3]||(D.cssNumber[t]?"":"px"),c=e.nodeType&&(D.cssNumber[t]||"px"!==u&&+l)&&ce.exec(D.css(e,t));if(c&&c[3]!==u){for(l/=2,u=u||c[3],c=+l||1;a--;)D.style(e,t,c+u),(1-o)*(1-(o=s()/l||.5))<=0&&(a=0),c/=o;c*=2,D.style(e,t,c+u),n=n||[]}return n&&(c=+c||+l||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=u,r.start=c,r.end=i)),i}var ye={};function be(e){var t,n=e.ownerDocument,r=e.nodeName,i=ye[r];return i||(t=n.body.appendChild(n.createElement(r)),i=D.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),ye[r]=i,i)}function ve(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]=ie.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&me(r)&&(i[o]=be(r))):"none"!==n&&(i[o]="none",ie.set(r,"display",n)));for(o=0;o<a;o++)null!=i[o]&&(e[o].style.display=i[o]);return e}D.fn.extend({show:function(){return ve(this,!0)},hide:function(){return ve(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each((function(){me(this)?D(this).show():D(this).hide()}))}});var xe,qe,De=/^(?:checkbox|radio)$/i,Se=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Ee=/^$|^module$|\/(?:java|ecma)script/i;xe=g.createDocumentFragment().appendChild(g.createElement("div")),(qe=g.createElement("input")).setAttribute("type","radio"),qe.setAttribute("checked","checked"),qe.setAttribute("name","t"),xe.appendChild(qe),d.checkClone=xe.cloneNode(!0).cloneNode(!0).lastChild.checked,xe.innerHTML="<textarea>x</textarea>",d.noCloneChecked=!!xe.cloneNode(!0).lastChild.defaultValue,xe.innerHTML="<option></option>",d.option=!!xe.lastChild;var we={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 Ce(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&E(e,t)?D.merge([e],n):n}function Ae(e,t){for(var n=0,r=e.length;n<r;n++)ie.set(e[n],"globalEval",!t||ie.get(t[n],"globalEval"))}we.tbody=we.tfoot=we.colgroup=we.caption=we.thead,we.th=we.td,d.option||(we.optgroup=we.option=[1,"<select multiple='multiple'>","</select>"]);var Te=/<|&#?\w+;/;function Me(e,t,n,r,i){for(var o,a,s,l,u,c,p=t.createDocumentFragment(),f=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===v(o))D.merge(f,o.nodeType?[o]:o);else if(Te.test(o)){for(a=a||p.appendChild(t.createElement("div")),s=(Se.exec(o)||["",""])[1].toLowerCase(),l=we[s]||we._default,a.innerHTML=l[1]+D.htmlPrefilter(o)+l[2],c=l[0];c--;)a=a.lastChild;D.merge(f,a.childNodes),(a=p.firstChild).textContent=""}else f.push(t.createTextNode(o));for(p.textContent="",d=0;o=f[d++];)if(r&&D.inArray(o,r)>-1)i&&i.push(o);else if(u=de(o),a=Ce(p.appendChild(o),"script"),u&&Ae(a),n)for(c=0;o=a[c++];)Ee.test(o.type||"")&&n.push(o);return p}var ke=/^([^.]*)(?:\.(.+)|)/;function Ie(){return!0}function Oe(){return!1}function Ne(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ne(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Oe;else if(!i)return e;return 1===o&&(a=i,i=function(e){return D().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=D.guid++)),e.each((function(){D.event.add(this,t,i,r,n)}))}function Le(e,t,n){n?(ie.set(e,t,!1),D.event.add(e,t,{namespace:!1,handler:function(e){var n,r=ie.get(this,t);if(1&e.isTrigger&&this[t]){if(r)(D.event.special[t]||{}).delegateType&&e.stopPropagation();else if(r=i.call(arguments),ie.set(this,t,r),this[t](),n=ie.get(this,t),ie.set(this,t,!1),r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n}else r&&(ie.set(this,t,D.event.trigger(r[0],r.slice(1),this)),e.stopPropagation(),e.isImmediatePropagationStopped=Ie)}})):void 0===ie.get(e,t)&&D.event.add(e,t,Ie)}D.event={global:{},add:function(e,t,n,r,i){var o,a,s,l,u,c,p,f,d,h,m,g=ie.get(e);if(ne(e))for(n.handler&&(n=(o=n).handler,i=o.selector),i&&D.find.matchesSelector(fe,i),n.guid||(n.guid=D.guid++),(l=g.events)||(l=g.events=Object.create(null)),(a=g.handle)||(a=g.handle=function(t){return void 0!==D&&D.event.triggered!==t.type?D.event.dispatch.apply(e,arguments):void 0}),u=(t=(t||"").match($)||[""]).length;u--;)d=m=(s=ke.exec(t[u])||[])[1],h=(s[2]||"").split(".").sort(),d&&(p=D.event.special[d]||{},d=(i?p.delegateType:p.bindType)||d,p=D.event.special[d]||{},c=D.extend({type:d,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&D.expr.match.needsContext.test(i),namespace:h.join(".")},o),(f=l[d])||((f=l[d]=[]).delegateCount=0,p.setup&&!1!==p.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(d,a)),p.add&&(p.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?f.splice(f.delegateCount++,0,c):f.push(c),D.event.global[d]=!0)},remove:function(e,t,n,r,i){var o,a,s,l,u,c,p,f,d,h,m,g=ie.hasData(e)&&ie.get(e);if(g&&(l=g.events)){for(u=(t=(t||"").match($)||[""]).length;u--;)if(d=m=(s=ke.exec(t[u])||[])[1],h=(s[2]||"").split(".").sort(),d){for(p=D.event.special[d]||{},f=l[d=(r?p.delegateType:p.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=f.length;o--;)c=f[o],!i&&m!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(f.splice(o,1),c.selector&&f.delegateCount--,p.remove&&p.remove.call(e,c));a&&!f.length&&(p.teardown&&!1!==p.teardown.call(e,h,g.handle)||D.removeEvent(e,d,g.handle),delete l[d])}else for(d in l)D.event.remove(e,d+t[u],n,r,!0);D.isEmptyObject(l)&&ie.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),l=D.event.fix(e),u=(ie.get(this,"events")||Object.create(null))[l.type]||[],c=D.event.special[l.type]||{};for(s[0]=l,t=1;t<arguments.length;t++)s[t]=arguments[t];if(l.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,l)){for(a=D.event.handlers.call(this,l,u),t=0;(i=a[t++])&&!l.isPropagationStopped();)for(l.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!l.isImmediatePropagationStopped();)l.rnamespace&&!1!==o.namespace&&!l.rnamespace.test(o.namespace)||(l.handleObj=o,l.data=o.data,void 0!==(r=((D.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(l.result=r)&&(l.preventDefault(),l.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,l),l.result}},handlers:function(e,t){var n,r,i,o,a,s=[],l=t.delegateCount,u=e.target;if(l&&u.nodeType&&!("click"===e.type&&e.button>=1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==e.type||!0!==u.disabled)){for(o=[],a={},n=0;n<l;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?D(i,this).index(u)>-1:D.find(i,this,null,[u]).length),a[i]&&o.push(r);o.length&&s.push({elem:u,handlers:o})}return u=this,l<t.length&&s.push({elem:u,handlers:t.slice(l)}),s},addProp:function(e,t){Object.defineProperty(D.Event.prototype,e,{enumerable:!0,configurable:!0,get:h(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[D.expando]?e:new D.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return De.test(t.type)&&t.click&&E(t,"input")&&Le(t,"click",!0),!1},trigger:function(e){var t=this||e;return De.test(t.type)&&t.click&&E(t,"input")&&Le(t,"click"),!0},_default:function(e){var t=e.target;return De.test(t.type)&&t.click&&E(t,"input")&&ie.get(t,"click")||E(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},D.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},D.Event=function(e,t){if(!(this instanceof D.Event))return new D.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ie:Oe,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&&D.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[D.expando]=!0},D.Event.prototype={constructor:D.Event,isDefaultPrevented:Oe,isPropagationStopped:Oe,isImmediatePropagationStopped:Oe,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ie,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ie,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ie,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},D.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},D.event.addProp),D.each({focus:"focusin",blur:"focusout"},(function(e,t){function n(e){if(g.documentMode){var n=ie.get(this,"handle"),r=D.event.fix(e);r.type="focusin"===e.type?"focus":"blur",r.isSimulated=!0,n(e),r.target===r.currentTarget&&n(r)}else D.event.simulate(t,e.target,D.event.fix(e))}D.event.special[e]={setup:function(){var r;if(Le(this,e,!0),!g.documentMode)return!1;(r=ie.get(this,t))||this.addEventListener(t,n),ie.set(this,t,(r||0)+1)},trigger:function(){return Le(this,e),!0},teardown:function(){var e;if(!g.documentMode)return!1;(e=ie.get(this,t)-1)?ie.set(this,t,e):(this.removeEventListener(t,n),ie.remove(this,t))},_default:function(t){return ie.get(t.target,e)},delegateType:t},D.event.special[t]={setup:function(){var r=this.ownerDocument||this.document||this,i=g.documentMode?this:r,o=ie.get(i,t);o||(g.documentMode?this.addEventListener(t,n):r.addEventListener(e,n,!0)),ie.set(i,t,(o||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,i=g.documentMode?this:r,o=ie.get(i,t)-1;o?ie.set(i,t,o):(g.documentMode?this.removeEventListener(t,n):r.removeEventListener(e,n,!0),ie.remove(i,t))}}})),D.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(e,t){D.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=e.relatedTarget,i=e.handleObj;return r&&(r===this||D.contains(this,r))||(e.type=i.origType,n=i.handler.apply(this,arguments),e.type=t),n}}})),D.fn.extend({on:function(e,t,n,r){return Ne(this,e,t,n,r)},one:function(e,t,n,r){return Ne(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,D(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Oe),this.each((function(){D.event.remove(this,e,n,t)}))}});var Pe=/<script|<style|<link/i,Re=/checked\s*(?:[^=]|=\s*.checked.)/i,He=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Fe(e,t){return E(e,"table")&&E(11!==t.nodeType?t:t.firstChild,"tr")&&D(e).children("tbody")[0]||e}function _e(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function je(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function ze(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(ie.hasData(e)&&(s=ie.get(e).events))for(i in ie.remove(t,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)D.event.add(t,i,s[i][n]);oe.hasData(e)&&(o=oe.access(e),a=D.extend({},o),oe.set(t,a))}}function Ve(e,t){var n=t.nodeName.toLowerCase();"input"===n&&De.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function Be(e,t,n,r){t=o(t);var i,a,s,l,u,c,p=0,f=e.length,m=f-1,g=t[0],y=h(g);if(y||f>1&&"string"==typeof g&&!d.checkClone&&Re.test(g))return e.each((function(i){var o=e.eq(i);y&&(t[0]=g.call(this,i,o.html())),Be(o,t,n,r)}));if(f&&(a=(i=Me(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=a),a||r)){for(l=(s=D.map(Ce(i,"script"),_e)).length;p<f;p++)u=i,p!==m&&(u=D.clone(u,!0,!0),l&&D.merge(s,Ce(u,"script"))),n.call(e[p],u,p);if(l)for(c=s[s.length-1].ownerDocument,D.map(s,je),p=0;p<l;p++)u=s[p],Ee.test(u.type||"")&&!ie.access(u,"globalEval")&&D.contains(c,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?D._evalUrl&&!u.noModule&&D._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},c):b(u.textContent.replace(He,""),u,c))}return e}function $e(e,t,n){for(var r,i=t?D.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||D.cleanData(Ce(r)),r.parentNode&&(n&&de(r)&&Ae(Ce(r,"script")),r.parentNode.removeChild(r));return e}D.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),l=de(e);if(!(d.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||D.isXMLDoc(e)))for(a=Ce(s),r=0,i=(o=Ce(e)).length;r<i;r++)Ve(o[r],a[r]);if(t)if(n)for(o=o||Ce(e),a=a||Ce(s),r=0,i=o.length;r<i;r++)ze(o[r],a[r]);else ze(e,s);return(a=Ce(s,"script")).length>0&&Ae(a,!l&&Ce(e,"script")),s},cleanData:function(e){for(var t,n,r,i=D.event.special,o=0;void 0!==(n=e[o]);o++)if(ne(n)){if(t=n[ie.expando]){if(t.events)for(r in t.events)i[r]?D.event.remove(n,r):D.removeEvent(n,r,t.handle);n[ie.expando]=void 0}n[oe.expando]&&(n[oe.expando]=void 0)}}}),D.fn.extend({detach:function(e){return $e(this,e,!0)},remove:function(e){return $e(this,e)},text:function(e){return J(this,(function(e){return void 0===e?D.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 Be(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Fe(this,e).appendChild(e)}))},prepend:function(){return Be(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Fe(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return Be(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return Be(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&&(D.cleanData(Ce(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return D.clone(this,e,t)}))},html:function(e){return J(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&&!Pe.test(e)&&!we[(Se.exec(e)||["",""])[1].toLowerCase()]){e=D.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(D.cleanData(Ce(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(){var e=[];return Be(this,arguments,(function(t){var n=this.parentNode;D.inArray(this,e)<0&&(D.cleanData(Ce(this)),n&&n.replaceChild(t,this))}),e)}}),D.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(e,t){D.fn[e]=function(e){for(var n,r=[],i=D(e),o=i.length-1,s=0;s<=o;s++)n=s===o?this:this.clone(!0),D(i[s])[t](n),a.apply(r,n.get());return this.pushStack(r)}}));var Ue=new RegExp("^("+ue+")(?!px)[a-z%]+$","i"),We=/^--/,Ke=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},Ye=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},Ge=new RegExp(pe.join("|"),"i");function Xe(e,t,n){var r,i,o,a,s=We.test(t),l=e.style;return(n=n||Ke(e))&&(a=n.getPropertyValue(t)||n[t],s&&a&&(a=a.replace(M,"$1")||void 0),""!==a||de(e)||(a=D.style(e,t)),!d.pixelBoxStyles()&&Ue.test(a)&&Ge.test(t)&&(r=l.width,i=l.minWidth,o=l.maxWidth,l.minWidth=l.maxWidth=l.width=a,a=n.width,l.width=r,l.minWidth=i,l.maxWidth=o)),void 0!==a?a+"":a}function Je(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function t(){if(c){u.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%",fe.appendChild(u).appendChild(c);var t=e.getComputedStyle(c);r="1%"!==t.top,l=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),fe.removeChild(u),c=null}}function n(e){return Math.round(parseFloat(e))}var r,i,o,a,s,l,u=g.createElement("div"),c=g.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",d.clearCloneStyle="content-box"===c.style.backgroundClip,D.extend(d,{boxSizingReliable:function(){return t(),i},pixelBoxStyles:function(){return t(),a},pixelPosition:function(){return t(),r},reliableMarginLeft:function(){return t(),l},scrollboxSize:function(){return t(),o},reliableTrDimensions:function(){var t,n,r,i;return null==s&&(t=g.createElement("table"),n=g.createElement("tr"),r=g.createElement("div"),t.style.cssText="position:absolute;left:-11111px;border-collapse:separate",n.style.cssText="box-sizing:content-box;border:1px solid",n.style.height="1px",r.style.height="9px",r.style.display="block",fe.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,fe.removeChild(t)),s}}))}();var Qe=["Webkit","Moz","ms"],Ze=g.createElement("div").style,et={};function tt(e){var t=D.cssProps[e]||et[e];return t||(e in Ze?e:et[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=Qe.length;n--;)if((e=Qe[n]+t)in Ze)return e}(e)||e)}var nt=/^(none|table(?!-c[ea]).+)/,rt={position:"absolute",visibility:"hidden",display:"block"},it={letterSpacing:"0",fontWeight:"400"};function ot(e,t,n){var r=ce.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function at(e,t,n,r,i,o){var a="width"===t?1:0,s=0,l=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=D.css(e,n+pe[a],!0,i)),r?("content"===n&&(l-=D.css(e,"padding"+pe[a],!0,i)),"margin"!==n&&(l-=D.css(e,"border"+pe[a]+"Width",!0,i))):(l+=D.css(e,"padding"+pe[a],!0,i),"padding"!==n?l+=D.css(e,"border"+pe[a]+"Width",!0,i):s+=D.css(e,"border"+pe[a]+"Width",!0,i));return!r&&o>=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-l-s-.5))||0),l+u}function st(e,t,n){var r=Ke(e),i=(!d.boxSizingReliable()||n)&&"border-box"===D.css(e,"boxSizing",!1,r),o=i,a=Xe(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Ue.test(a)){if(!n)return a;a="auto"}return(!d.boxSizingReliable()&&i||!d.reliableTrDimensions()&&E(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===D.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===D.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+at(e,t,n||(i?"border":"content"),o,r,a)+"px"}function lt(e,t,n,r,i){return new lt.prototype.init(e,t,n,r,i)}D.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Xe(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=te(t),l=We.test(t),u=e.style;if(l||(t=tt(s)),a=D.cssHooks[t]||D.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:u[t];"string"==(o=typeof n)&&(i=ce.exec(n))&&i[1]&&(n=ge(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||l||(n+=i&&i[3]||(D.cssNumber[s]?"":"px")),d.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(l?u.setProperty(t,n):u[t]=n))}},css:function(e,t,n,r){var i,o,a,s=te(t);return We.test(t)||(t=tt(s)),(a=D.cssHooks[t]||D.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Xe(e,t,r)),"normal"===i&&t in it&&(i=it[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),D.each(["height","width"],(function(e,t){D.cssHooks[t]={get:function(e,n,r){if(n)return!nt.test(D.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?st(e,t,r):Ye(e,rt,(function(){return st(e,t,r)}))},set:function(e,n,r){var i,o=Ke(e),a=!d.scrollboxSize()&&"absolute"===o.position,s=(a||r)&&"border-box"===D.css(e,"boxSizing",!1,o),l=r?at(e,t,r,s,o):0;return s&&a&&(l-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-at(e,t,"border",!1,o)-.5)),l&&(i=ce.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=D.css(e,t)),ot(0,n,l)}}})),D.cssHooks.marginLeft=Je(d.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(Xe(e,"marginLeft"))||e.getBoundingClientRect().left-Ye(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),D.each({margin:"",padding:"",border:"Width"},(function(e,t){D.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+pe[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(D.cssHooks[e+t].set=ot)})),D.fn.extend({css:function(e,t){return J(this,(function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Ke(e),i=t.length;a<i;a++)o[t[a]]=D.css(e,t[a],!1,r);return o}return void 0!==n?D.style(e,t,n):D.css(e,t)}),e,t,arguments.length>1)}}),D.Tween=lt,lt.prototype={constructor:lt,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||D.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(D.cssNumber[n]?"":"px")},cur:function(){var e=lt.propHooks[this.prop];return e&&e.get?e.get(this):lt.propHooks._default.get(this)},run:function(e){var t,n=lt.propHooks[this.prop];return this.options.duration?this.pos=t=D.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):lt.propHooks._default.set(this),this}},lt.prototype.init.prototype=lt.prototype,lt.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=D.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){D.fx.step[e.prop]?D.fx.step[e.prop](e):1!==e.elem.nodeType||!D.cssHooks[e.prop]&&null==e.elem.style[tt(e.prop)]?e.elem[e.prop]=e.now:D.style(e.elem,e.prop,e.now+e.unit)}}},lt.propHooks.scrollTop=lt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},D.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},D.fx=lt.prototype.init,D.fx.step={};var ut,ct,pt=/^(?:toggle|show|hide)$/,ft=/queueHooks$/;function dt(){ct&&(!1===g.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(dt):e.setTimeout(dt,D.fx.interval),D.fx.tick())}function ht(){return e.setTimeout((function(){ut=void 0})),ut=Date.now()}function mt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=pe[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function gt(e,t,n){for(var r,i=(yt.tweeners[t]||[]).concat(yt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function yt(e,t,n){var r,i,o=0,a=yt.prefilters.length,s=D.Deferred().always((function(){delete l.elem})),l=function(){if(i)return!1;for(var t=ut||ht(),n=Math.max(0,u.startTime+u.duration-t),r=1-(n/u.duration||0),o=0,a=u.tweens.length;o<a;o++)u.tweens[o].run(r);return s.notifyWith(e,[u,r,n]),r<1&&a?n:(a||s.notifyWith(e,[u,1,0]),s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:D.extend({},t),opts:D.extend(!0,{specialEasing:{},easing:D.easing._default},n),originalProperties:t,originalOptions:n,startTime:ut||ht(),duration:n.duration,tweens:[],createTween:function(t,n){var r=D.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(r),r},stop:function(t){var n=0,r=t?u.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)u.tweens[n].run(1);return t?(s.notifyWith(e,[u,1,0]),s.resolveWith(e,[u,t])):s.rejectWith(e,[u,t]),this}}),c=u.props;for(function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=te(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=D.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,u.opts.specialEasing);o<a;o++)if(r=yt.prefilters[o].call(u,e,c,u.opts))return h(r.stop)&&(D._queueHooks(u.elem,u.opts.queue).stop=r.stop.bind(r)),r;return D.map(c,gt,u),h(u.opts.start)&&u.opts.start.call(e,u),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always),D.fx.timer(D.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u}D.Animation=D.extend(yt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return ge(n.elem,e,ce.exec(t),n),n}]},tweener:function(e,t){h(e)?(t=e,e=["*"]):e=e.match($);for(var n,r=0,i=e.length;r<i;r++)n=e[r],yt.tweeners[n]=yt.tweeners[n]||[],yt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,l,u,c,p="width"in t||"height"in t,f=this,d={},h=e.style,m=e.nodeType&&me(e),g=ie.get(e,"fxshow");for(r in n.queue||(null==(a=D._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,f.always((function(){f.always((function(){a.unqueued--,D.queue(e,"fx").length||a.empty.fire()}))}))),t)if(i=t[r],pt.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]||D.style(e,r)}if((l=!D.isEmptyObject(t))||!D.isEmptyObject(d))for(r in p&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(u=g&&g.display)&&(u=ie.get(e,"display")),"none"===(c=D.css(e,"display"))&&(u?c=u:(ve([e],!0),u=e.style.display||u,c=D.css(e,"display"),ve([e]))),("inline"===c||"inline-block"===c&&null!=u)&&"none"===D.css(e,"float")&&(l||(f.done((function(){h.display=u})),null==u&&(c=h.display,u="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",f.always((function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]}))),l=!1,d)l||(g?"hidden"in g&&(m=g.hidden):g=ie.access(e,"fxshow",{display:u}),o&&(g.hidden=!m),m&&ve([e],!0),f.done((function(){for(r in m||ve([e]),ie.remove(e,"fxshow"),d)D.style(e,r,d[r])}))),l=gt(m?g[r]:0,r,f),r in g||(g[r]=l.start,m&&(l.end=l.start,l.start=0))}],prefilter:function(e,t){t?yt.prefilters.unshift(e):yt.prefilters.push(e)}}),D.speed=function(e,t,n){var r=e&&"object"==typeof e?D.extend({},e):{complete:n||!n&&t||h(e)&&e,duration:e,easing:n&&t||t&&!h(t)&&t};return D.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in D.fx.speeds?r.duration=D.fx.speeds[r.duration]:r.duration=D.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){h(r.old)&&r.old.call(this),r.queue&&D.dequeue(this,r.queue)},r},D.fn.extend({fadeTo:function(e,t,n,r){return this.filter(me).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=D.isEmptyObject(e),o=D.speed(t,n,r),a=function(){var t=yt(this,D.extend({},e),o);(i||ie.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=D.timers,a=ie.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&ft.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||D.dequeue(this,e)}))},finish:function(e){return!1!==e&&(e=e||"fx"),this.each((function(){var t,n=ie.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=D.timers,a=r?r.length:0;for(n.finish=!0,D.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}))}}),D.each(["toggle","show","hide"],(function(e,t){var n=D.fn[t];D.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(mt(t,!0),e,r,i)}})),D.each({slideDown:mt("show"),slideUp:mt("hide"),slideToggle:mt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(e,t){D.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}})),D.timers=[],D.fx.tick=function(){var e,t=0,n=D.timers;for(ut=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||D.fx.stop(),ut=void 0},D.fx.timer=function(e){D.timers.push(e),D.fx.start()},D.fx.interval=13,D.fx.start=function(){ct||(ct=!0,dt())},D.fx.stop=function(){ct=null},D.fx.speeds={slow:600,fast:200,_default:400},D.fn.delay=function(t,n){return t=D.fx&&D.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=g.createElement("input"),t=g.createElement("select").appendChild(g.createElement("option"));e.type="checkbox",d.checkOn=""!==e.value,d.optSelected=t.selected,(e=g.createElement("input")).value="t",e.type="radio",d.radioValue="t"===e.value}();var bt,vt=D.expr.attrHandle;D.fn.extend({attr:function(e,t){return J(this,D.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each((function(){D.removeAttr(this,e)}))}}),D.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?D.prop(e,t,n):(1===o&&D.isXMLDoc(e)||(i=D.attrHooks[t.toLowerCase()]||(D.expr.match.bool.test(t)?bt:void 0)),void 0!==n?null===n?void D.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=D.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!d.radioValue&&"radio"===t&&E(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($);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),bt={set:function(e,t,n){return!1===t?D.removeAttr(e,n):e.setAttribute(n,n),n}},D.each(D.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=vt[t]||D.find.attr;vt[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=vt[a],vt[a]=i,i=null!=n(e,t,r)?a:null,vt[a]=o),i}}));var xt=/^(?:input|select|textarea|button)$/i,qt=/^(?:a|area)$/i;function Dt(e){return(e.match($)||[]).join(" ")}function St(e){return e.getAttribute&&e.getAttribute("class")||""}function Et(e){return Array.isArray(e)?e:"string"==typeof e&&e.match($)||[]}D.fn.extend({prop:function(e,t){return J(this,D.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[D.propFix[e]||e]}))}}),D.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&D.isXMLDoc(e)||(t=D.propFix[t]||t,i=D.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=D.find.attr(e,"tabindex");return t?parseInt(t,10):xt.test(e.nodeName)||qt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),d.optSelected||(D.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)}}),D.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){D.propFix[this.toLowerCase()]=this})),D.fn.extend({addClass:function(e){var t,n,r,i,o,a;return h(e)?this.each((function(t){D(this).addClass(e.call(this,t,St(this)))})):(t=Et(e)).length?this.each((function(){if(r=St(this),n=1===this.nodeType&&" "+Dt(r)+" "){for(o=0;o<t.length;o++)i=t[o],n.indexOf(" "+i+" ")<0&&(n+=i+" ");a=Dt(n),r!==a&&this.setAttribute("class",a)}})):this},removeClass:function(e){var t,n,r,i,o,a;return h(e)?this.each((function(t){D(this).removeClass(e.call(this,t,St(this)))})):arguments.length?(t=Et(e)).length?this.each((function(){if(r=St(this),n=1===this.nodeType&&" "+Dt(r)+" "){for(o=0;o<t.length;o++)for(i=t[o];n.indexOf(" "+i+" ")>-1;)n=n.replace(" "+i+" "," ");a=Dt(n),r!==a&&this.setAttribute("class",a)}})):this:this.attr("class","")},toggleClass:function(e,t){var n,r,i,o,a=typeof e,s="string"===a||Array.isArray(e);return h(e)?this.each((function(n){D(this).toggleClass(e.call(this,n,St(this),t),t)})):"boolean"==typeof t&&s?t?this.addClass(e):this.removeClass(e):(n=Et(e),this.each((function(){if(s)for(o=D(this),i=0;i<n.length;i++)r=n[i],o.hasClass(r)?o.removeClass(r):o.addClass(r);else void 0!==e&&"boolean"!==a||((r=St(this))&&ie.set(this,"__className__",r),this.setAttribute&&this.setAttribute("class",r||!1===e?"":ie.get(this,"__className__")||""))})))},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+Dt(St(n))+" ").indexOf(t)>-1)return!0;return!1}});var wt=/\r/g;D.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=h(e),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,D(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=D.map(i,(function(e){return null==e?"":e+""}))),(t=D.valHooks[this.type]||D.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))}))):i?(t=D.valHooks[i.type]||D.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(wt,""):null==n?"":n:void 0}}),D.extend({valHooks:{option:{get:function(e){var t=D.find.attr(e,"value");return null!=t?t:Dt(D.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],l=a?o+1:i.length;for(r=o<0?l:a?o:0;r<l;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!E(n.parentNode,"optgroup"))){if(t=D(n).val(),a)return t;s.push(t)}return s},set:function(e,t){for(var n,r,i=e.options,o=D.makeArray(t),a=i.length;a--;)((r=i[a]).selected=D.inArray(D.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),D.each(["radio","checkbox"],(function(){D.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=D.inArray(D(e).val(),t)>-1}},d.checkOn||(D.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}));var Ct=e.location,At={guid:Date.now()},Tt=/\?/;D.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||D.error("Invalid XML: "+(r?D.map(r.childNodes,(function(e){return e.textContent})).join("\n"):t)),n};var Mt=/^(?:focusinfocus|focusoutblur)$/,kt=function(e){e.stopPropagation()};D.extend(D.event,{trigger:function(t,n,r,i){var o,a,s,l,u,p,f,d,y=[r||g],b=c.call(t,"type")?t.type:t,v=c.call(t,"namespace")?t.namespace.split("."):[];if(a=d=s=r=r||g,3!==r.nodeType&&8!==r.nodeType&&!Mt.test(b+D.event.triggered)&&(b.indexOf(".")>-1&&(v=b.split("."),b=v.shift(),v.sort()),u=b.indexOf(":")<0&&"on"+b,(t=t[D.expando]?t:new D.Event(b,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=v.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:D.makeArray(n,[t]),f=D.event.special[b]||{},i||!f.trigger||!1!==f.trigger.apply(r,n))){if(!i&&!f.noBubble&&!m(r)){for(l=f.delegateType||b,Mt.test(l+b)||(a=a.parentNode);a;a=a.parentNode)y.push(a),s=a;s===(r.ownerDocument||g)&&y.push(s.defaultView||s.parentWindow||e)}for(o=0;(a=y[o++])&&!t.isPropagationStopped();)d=a,t.type=o>1?l:f.bindType||b,(p=(ie.get(a,"events")||Object.create(null))[t.type]&&ie.get(a,"handle"))&&p.apply(a,n),(p=u&&a[u])&&p.apply&&ne(a)&&(t.result=p.apply(a,n),!1===t.result&&t.preventDefault());return t.type=b,i||t.isDefaultPrevented()||f._default&&!1!==f._default.apply(y.pop(),n)||!ne(r)||u&&h(r[b])&&!m(r)&&((s=r[u])&&(r[u]=null),D.event.triggered=b,t.isPropagationStopped()&&d.addEventListener(b,kt),r[b](),t.isPropagationStopped()&&d.removeEventListener(b,kt),D.event.triggered=void 0,s&&(r[u]=s)),t.result}},simulate:function(e,t,n){var r=D.extend(new D.Event,n,{type:e,isSimulated:!0});D.event.trigger(r,null,t)}}),D.fn.extend({trigger:function(e,t){return this.each((function(){D.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return D.event.trigger(e,t,n,!0)}});var It=/\[\]$/,Ot=/\r?\n/g,Nt=/^(?:submit|button|image|reset|file)$/i,Lt=/^(?:input|select|textarea|keygen)/i;function Pt(e,t,n,r){var i;if(Array.isArray(t))D.each(t,(function(t,i){n||It.test(e)?r(e,i):Pt(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)}));else if(n||"object"!==v(t))r(e,t);else for(i in t)Pt(e+"["+i+"]",t[i],n,r)}D.param=function(e,t){var n,r=[],i=function(e,t){var n=h(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!D.isPlainObject(e))D.each(e,(function(){i(this.name,this.value)}));else for(n in e)Pt(n,e[n],t,i);return r.join("&")},D.fn.extend({serialize:function(){return D.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=D.prop(this,"elements");return e?D.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!D(this).is(":disabled")&&Lt.test(this.nodeName)&&!Nt.test(e)&&(this.checked||!De.test(e))})).map((function(e,t){var n=D(this).val();return null==n?null:Array.isArray(n)?D.map(n,(function(e){return{name:t.name,value:e.replace(Ot,"\r\n")}})):{name:t.name,value:n.replace(Ot,"\r\n")}})).get()}});var Rt=/%20/g,Ht=/#.*$/,Ft=/([?&])_=[^&]*/,_t=/^(.*?):[ \t]*([^\r\n]*)$/gm,jt=/^(?:GET|HEAD)$/,zt=/^\/\//,Vt={},Bt={},$t="*/".concat("*"),Ut=g.createElement("a");function Wt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match($)||[];if(h(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Kt(e,t,n,r){var i={},o=e===Bt;function a(s){var l;return i[s]=!0,D.each(e[s]||[],(function(e,s){var u=s(t,n,r);return"string"!=typeof u||o||i[u]?o?!(l=u):void 0:(t.dataTypes.unshift(u),a(u),!1)})),l}return a(t.dataTypes[0])||!i["*"]&&a("*")}function Yt(e,t){var n,r,i=D.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&D.extend(!0,e,r),e}Ut.href=Ct.href,D.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ct.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Ct.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":$t,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":D.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Yt(Yt(e,D.ajaxSettings),t):Yt(D.ajaxSettings,e)},ajaxPrefilter:Wt(Vt),ajaxTransport:Wt(Bt),ajax:function(t,n){"object"==typeof t&&(n=t,t=void 0),n=n||{};var r,i,o,a,s,l,u,c,p,f,d=D.ajaxSetup({},n),h=d.context||d,m=d.context&&(h.nodeType||h.jquery)?D(h):D.event,y=D.Deferred(),b=D.Callbacks("once memory"),v=d.statusCode||{},x={},q={},S="canceled",E={readyState:0,getResponseHeader:function(e){var t;if(u){if(!a)for(a={};t=_t.exec(o);)a[t[1].toLowerCase()+" "]=(a[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=a[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return u?o:null},setRequestHeader:function(e,t){return null==u&&(e=q[e.toLowerCase()]=q[e.toLowerCase()]||e,x[e]=t),this},overrideMimeType:function(e){return null==u&&(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(u)E.always(e[E.status]);else for(t in e)v[t]=[v[t],e[t]];return this},abort:function(e){var t=e||S;return r&&r.abort(t),w(0,t),this}};if(y.promise(E),d.url=((t||d.url||Ct.href)+"").replace(zt,Ct.protocol+"//"),d.type=n.method||n.type||d.method||d.type,d.dataTypes=(d.dataType||"*").toLowerCase().match($)||[""],null==d.crossDomain){l=g.createElement("a");try{l.href=d.url,l.href=l.href,d.crossDomain=Ut.protocol+"//"+Ut.host!=l.protocol+"//"+l.host}catch(e){d.crossDomain=!0}}if(d.data&&d.processData&&"string"!=typeof d.data&&(d.data=D.param(d.data,d.traditional)),Kt(Vt,d,n,E),u)return E;for(p in(c=D.event&&d.global)&&0==D.active++&&D.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!jt.test(d.type),i=d.url.replace(Ht,""),d.hasContent?d.data&&d.processData&&0===(d.contentType||"").indexOf("application/x-www-form-urlencoded")&&(d.data=d.data.replace(Rt,"+")):(f=d.url.slice(i.length),d.data&&(d.processData||"string"==typeof d.data)&&(i+=(Tt.test(i)?"&":"?")+d.data,delete d.data),!1===d.cache&&(i=i.replace(Ft,"$1"),f=(Tt.test(i)?"&":"?")+"_="+At.guid+++f),d.url=i+f),d.ifModified&&(D.lastModified[i]&&E.setRequestHeader("If-Modified-Since",D.lastModified[i]),D.etag[i]&&E.setRequestHeader("If-None-Match",D.etag[i])),(d.data&&d.hasContent&&!1!==d.contentType||n.contentType)&&E.setRequestHeader("Content-Type",d.contentType),E.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+$t+"; q=0.01":""):d.accepts["*"]),d.headers)E.setRequestHeader(p,d.headers[p]);if(d.beforeSend&&(!1===d.beforeSend.call(h,E,d)||u))return E.abort();if(S="abort",b.add(d.complete),E.done(d.success),E.fail(d.error),r=Kt(Bt,d,n,E)){if(E.readyState=1,c&&m.trigger("ajaxSend",[E,d]),u)return E;d.async&&d.timeout>0&&(s=e.setTimeout((function(){E.abort("timeout")}),d.timeout));try{u=!1,r.send(x,w)}catch(e){if(u)throw e;w(-1,e)}}else w(-1,"No Transport");function w(t,n,a,l){var p,f,g,x,q,S=n;u||(u=!0,s&&e.clearTimeout(s),r=void 0,o=l||"",E.readyState=t>0?4:0,p=t>=200&&t<300||304===t,a&&(x=function(e,t,n){for(var r,i,o,a,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){l.unshift(i);break}if(l[0]in n)o=l[0];else{for(i in n){if(!l[0]||e.converters[i+" "+l[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==l[0]&&l.unshift(o),n[o]}(d,E,a)),!p&&D.inArray("script",d.dataTypes)>-1&&D.inArray("json",d.dataTypes)<0&&(d.converters["text script"]=function(){}),x=function(e,t,n,r){var i,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(a=u[l+" "+o]||u["* "+o]))for(i in u)if((s=i.split(" "))[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){!0===a?a=u[i]:!0!==u[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 "+l+" to "+o}}}return{state:"success",data:t}}(d,x,E,p),p?(d.ifModified&&((q=E.getResponseHeader("Last-Modified"))&&(D.lastModified[i]=q),(q=E.getResponseHeader("etag"))&&(D.etag[i]=q)),204===t||"HEAD"===d.type?S="nocontent":304===t?S="notmodified":(S=x.state,f=x.data,p=!(g=x.error))):(g=S,!t&&S||(S="error",t<0&&(t=0))),E.status=t,E.statusText=(n||S)+"",p?y.resolveWith(h,[f,S,E]):y.rejectWith(h,[E,S,g]),E.statusCode(v),v=void 0,c&&m.trigger(p?"ajaxSuccess":"ajaxError",[E,d,p?f:g]),b.fireWith(h,[E,S]),c&&(m.trigger("ajaxComplete",[E,d]),--D.active||D.event.trigger("ajaxStop")))}return E},getJSON:function(e,t,n){return D.get(e,t,n,"json")},getScript:function(e,t){return D.get(e,void 0,t,"script")}}),D.each(["get","post"],(function(e,t){D[t]=function(e,n,r,i){return h(n)&&(i=i||r,r=n,n=void 0),D.ajax(D.extend({url:e,type:t,dataType:i,data:n,success:r},D.isPlainObject(e)&&e))}})),D.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),D._evalUrl=function(e,t,n){return D.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){D.globalEval(e,t,n)}})},D.fn.extend({wrapAll:function(e){var t;return this[0]&&(h(e)&&(e=e.call(this[0])),t=D(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 h(e)?this.each((function(t){D(this).wrapInner(e.call(this,t))})):this.each((function(){var t=D(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=h(e);return this.each((function(n){D(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){D(this).replaceWith(this.childNodes)})),this}}),D.expr.pseudos.hidden=function(e){return!D.expr.pseudos.visible(e)},D.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},D.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var Gt={0:200,1223:204},Xt=D.ajaxSettings.xhr();d.cors=!!Xt&&"withCredentials"in Xt,d.ajax=Xt=!!Xt,D.ajaxTransport((function(t){var n,r;if(d.cors||Xt&&!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(Gt[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()}}})),D.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),D.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 D.globalEval(e),e}}}),D.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),D.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,i){t=D("<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)}),g.head.appendChild(t[0])},abort:function(){n&&n()}}}));var Jt,Qt=[],Zt=/(=)\?(?=&|$)|\?\?/;D.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Qt.pop()||D.expando+"_"+At.guid++;return this[e]=!0,e}}),D.ajaxPrefilter("json jsonp",(function(t,n,r){var i,o,a,s=!1!==t.jsonp&&(Zt.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Zt.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=h(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(Zt,"$1"+i):!1!==t.jsonp&&(t.url+=(Tt.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||D.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?D(e).removeProp(i):e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,Qt.push(i)),a&&h(o)&&o(a[0]),a=o=void 0})),"script"})),d.createHTMLDocument=((Jt=g.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Jt.childNodes.length),D.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(d.createHTMLDocument?((r=(t=g.implementation.createHTMLDocument("")).createElement("base")).href=g.location.href,t.head.appendChild(r)):t=g),o=!n&&[],(i=H.exec(e))?[t.createElement(i[1])]:(i=Me([e],t,o),o&&o.length&&D(o).remove(),D.merge([],i.childNodes)));var r,i,o},D.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return s>-1&&(r=Dt(e.slice(s)),e=e.slice(0,s)),h(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),a.length>0&&D.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done((function(e){o=arguments,a.html(r?D("<div>").append(D.parseHTML(e)).find(r):e)})).always(n&&function(e,t){a.each((function(){n.apply(this,o||[e.responseText,t,e])}))}),this},D.expr.pseudos.animated=function(e){return D.grep(D.timers,(function(t){return e===t.elem})).length},D.offset={setOffset:function(e,t,n){var r,i,o,a,s,l,u=D.css(e,"position"),c=D(e),p={};"static"===u&&(e.style.position="relative"),s=c.offset(),o=D.css(e,"top"),l=D.css(e,"left"),("absolute"===u||"fixed"===u)&&(o+l).indexOf("auto")>-1?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(l)||0),h(t)&&(t=t.call(e,n,D.extend({},s))),null!=t.top&&(p.top=t.top-s.top+a),null!=t.left&&(p.left=t.left-s.left+i),"using"in t?t.using.call(e,p):c.css(p)}},D.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){D.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"===D.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"===D.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=D(e).offset()).top+=D.css(e,"borderTopWidth",!0),i.left+=D.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-D.css(r,"marginTop",!0),left:t.left-i.left-D.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===D.css(e,"position");)e=e.offsetParent;return e||fe}))}}),D.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var n="pageYOffset"===t;D.fn[e]=function(r){return J(this,(function(e,r,i){var o;if(m(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)}})),D.each(["top","left"],(function(e,t){D.cssHooks[t]=Je(d.pixelPosition,(function(e,n){if(n)return n=Xe(e,t),Ue.test(n)?D(e).position()[t]+"px":n}))})),D.each({Height:"height",Width:"width"},(function(e,t){D.each({padding:"inner"+e,content:t,"":"outer"+e},(function(n,r){D.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return J(this,(function(t,n,i){var o;return m(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?D.css(t,n,s):D.style(t,n,i,s)}),t,a?i:void 0,a)}}))})),D.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){D.fn[t]=function(e){return this.on(t,e)}})),D.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.on("mouseenter",e).on("mouseleave",t||e)}}),D.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){D.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}));var en=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;D.proxy=function(e,t){var n,r,o;if("string"==typeof t&&(n=e[t],t=e,e=n),h(e))return r=i.call(arguments,2),o=function(){return e.apply(t||this,r.concat(i.call(arguments)))},o.guid=e.guid=e.guid||D.guid++,o},D.holdReady=function(e){e?D.readyWait++:D.ready(!0)},D.isArray=Array.isArray,D.parseJSON=JSON.parse,D.nodeName=E,D.isFunction=h,D.isWindow=m,D.camelCase=te,D.type=v,D.now=Date.now,D.isNumeric=function(e){var t=D.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},D.trim=function(e){return null==e?"":(e+"").replace(en,"$1")};var tn=e.jQuery,nn=e.$;return D.noConflict=function(t){return e.$===D&&(e.$=nn),t&&e.jQuery===D&&(e.jQuery=tn),D},void 0===t&&(e.jQuery=e.$=D),D}));var T=w(A.exports),M={"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-й процентиль"}}};const k={click:"Tap",Click:"Tap",tap:"Tap",pan:"Pan",swipe:"Swipe",rotate:"Rotate",press:"Press",pinch:"Pinch"};function I(e){return k[e]||e}function O(e){return function(t,n,r){let i,o,a,s,l=[],u=!0;function c(){"function"==typeof i.enable&&(i.enable=i.enable.bind(o)()),i.enable&&(i.gestures.forEach((t=>{t.options=t.options||{},void 0===t.options.enable&&(t.options.enable=!0),"function"==typeof t.options.enable&&(t.options.enable=t.options.enable.bind(o));const n=I(t.type);e&&e[n]&&(t.options.event=t.options.event||t.type.toLowerCase(),a=a||new e.Manager(r),a.add(new e[n](t.options)),Object.keys(t.events).forEach((e=>{t.events[e]=t.events[e].bind(o),a.on(e,t.events[e])})),l.push(t))})),i.gestures.forEach((t=>{const n=I(t.type);e&&e[n]&&(t.recognizeWith&&a.get(t.options.event).recognizeWith(t.recognizeWith.split(" ").filter((e=>""!==e))),t.requireFailure&&a.get(t.options.event).requireFailure(t.requireFailure.split(" ").filter((e=>""!==e))))})))}function p(){l.forEach((e=>{Object.keys(e.events).forEach((t=>{a.off(t,e.events[t])})),a.remove(e.options.event)})),l=[]}return{get key(){return s},set(e){!function(e){s=e.key,i=e,o={chart:t,mediator:n,settings:i},i.gestures=i.gestures||[],void 0===i.enable&&(i.enable=!0)}(e),p(),u&&c()},off(){u=!1,p()},on(){u=!0,0===l.length&&c()},destroy(){p(),a&&a.destroy(),a=null,o=null,i=null}}}}var N={exports:{}};
|
|
18
18
|
/*! Hammer.JS - v2.0.7 - 2016-04-22
|
|
19
19
|
* http://hammerjs.github.io/
|
|
20
20
|
*
|
|
21
21
|
* Copyright (c) 2016 Jorik Tangelder;
|
|
22
|
-
* Licensed under the MIT license */!function(e){!function(t,n,r,i){var o,a=["","webkit","Moz","MS","ms","o"],s=n.createElement("div"),l="function",u=Math.round,c=Math.abs,p=Date.now;function d(e,t,n){return setTimeout(v(e,n),t)}function f(e,t,n){return!!Array.isArray(e)&&(h(e,n[t],n),!0)}function h(e,t,n){var r;if(e)if(e.forEach)e.forEach(t,n);else if(e.length!==i)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)}}o="function"!=typeof Object.assign?function(e){if(e===i||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!==i&&null!==r)for(var o in r)r.hasOwnProperty(o)&&(t[o]=r[o])}return t}:Object.assign;var g=m((function(e,t,n){for(var r=Object.keys(t),o=0;o<r.length;)(!n||n&&e[r[o]]===i)&&(e[r[o]]=t[r[o]]),o++;return e}),"extend","Use `assign`."),y=m((function(e,t){return g(e,t,!0)}),"merge","Use `assign`.");function b(e,t,n){var r,i=t.prototype;(r=e.prototype=Object.create(i)).constructor=e,r._super=i,n&&o(r,n)}function v(e,t){return function(){return e.apply(t,arguments)}}function x(e,t){return typeof e==l?e.apply(t&&t[0]||i,t):e}function q(e,t){return e===i?t:e}function D(e,t,n){h(w(t),(function(t){e.addEventListener(t,n,!1)}))}function E(e,t,n){h(w(t),(function(t){e.removeEventListener(t,n,!1)}))}function S(e,t){for(;e;){if(e==t)return!0;e=e.parentNode}return!1}function C(e,t){return e.indexOf(t)>-1}function w(e){return e.trim().split(/\s+/g)}function A(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var r=0;r<e.length;){if(n&&e[r][n]==t||!n&&e[r]===t)return r;r++}return-1}function T(e){return Array.prototype.slice.call(e,0)}function M(e,t,n){for(var r=[],i=[],o=0;o<e.length;){var a=t?e[o][t]:e[o];A(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 I(e,t){for(var n,r,o=t[0].toUpperCase()+t.slice(1),s=0;s<a.length;){if((r=(n=a[s])?n+o:t)in e)return r;s++}return i}var k=1;function O(e){var n=e.ownerDocument||e;return n.defaultView||n.parentWindow||t}var L="ontouchstart"in t,N=I(t,"PointerEvent")!==i,P=L&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),R="touch",H="mouse",F=25,_=1,j=4,z=8,V=1,B=2,$=4,U=8,W=16,K=B|$,G=U|W,Y=K|G,X=["x","y"],J=["clientX","clientY"];function Q(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 Z(e,t,n){var r=n.pointers.length,o=n.changedPointers.length,a=t&_&&r-o==0,s=t&(j|z)&&r-o==0;n.isFirst=!!a,n.isFinal=!!s,a&&(e.session={}),n.eventType=t,function(e,t){var n=e.session,r=t.pointers,o=r.length;n.firstInput||(n.firstInput=ee(t));o>1&&!n.firstMultiple?n.firstMultiple=ee(t):1===o&&(n.firstMultiple=!1);var a=n.firstInput,s=n.firstMultiple,l=s?s.center:a.center,u=t.center=te(r);t.timeStamp=p(),t.deltaTime=t.timeStamp-a.timeStamp,t.angle=oe(l,u),t.distance=ie(l,u),function(e,t){var n=t.center,r=e.offsetDelta||{},i=e.prevDelta||{},o=e.prevInput||{};t.eventType!==_&&o.eventType!==j||(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=re(t.deltaX,t.deltaY);var d=ne(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=d.x,t.overallVelocityY=d.y,t.overallVelocity=c(d.x)>c(d.y)?d.x:d.y,t.scale=s?(f=s.pointers,h=r,ie(h[0],h[1],J)/ie(f[0],f[1],J)):1,t.rotation=s?function(e,t){return oe(t[1],t[0],J)+oe(e[1],e[0],J)}(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,o,a,s=e.lastInterval||t,l=t.timeStamp-s.timeStamp;if(t.eventType!=z&&(l>F||s.velocity===i)){var u=t.deltaX-s.deltaX,p=t.deltaY-s.deltaY,d=ne(l,u,p);r=d.x,o=d.y,n=c(d.x)>c(d.y)?d.x:d.y,a=re(u,p),e.lastInterval=t}else n=s.velocity,r=s.velocityX,o=s.velocityY,a=s.direction;t.velocity=n,t.velocityX=r,t.velocityY=o,t.direction=a}(n,t);var f,h;var m=e.element;S(t.srcEvent.target,m)&&(m=t.srcEvent.target);t.target=m}(e,n),e.emit("hammer.input",n),e.recognize(n),e.session.prevInput=n}function ee(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:u(e.pointers[n].clientX),clientY:u(e.pointers[n].clientY)},n++;return{timeStamp:p(),pointers:t,center:te(t),deltaX:e.deltaX,deltaY:e.deltaY}}function te(e){var t=e.length;if(1===t)return{x:u(e[0].clientX),y:u(e[0].clientY)};for(var n=0,r=0,i=0;i<t;)n+=e[i].clientX,r+=e[i].clientY,i++;return{x:u(n/t),y:u(r/t)}}function ne(e,t,n){return{x:t/e||0,y:n/e||0}}function re(e,t){return e===t?V:c(e)>=c(t)?e<0?B:$:t<0?U:W}function ie(e,t,n){n||(n=X);var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.sqrt(r*r+i*i)}function oe(e,t,n){n||(n=X);var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return 180*Math.atan2(i,r)/Math.PI}Q.prototype={handler:function(){},init:function(){this.evEl&&D(this.element,this.evEl,this.domHandler),this.evTarget&&D(this.target,this.evTarget,this.domHandler),this.evWin&&D(O(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&E(this.element,this.evEl,this.domHandler),this.evTarget&&E(this.target,this.evTarget,this.domHandler),this.evWin&&E(O(this.element),this.evWin,this.domHandler)}};var ae={mousedown:_,mousemove:2,mouseup:j},se="mousedown",le="mousemove mouseup";function ue(){this.evEl=se,this.evWin=le,this.pressed=!1,Q.apply(this,arguments)}b(ue,Q,{handler:function(e){var t=ae[e.type];t&_&&0===e.button&&(this.pressed=!0),2&t&&1!==e.which&&(t=j),this.pressed&&(t&j&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:H,srcEvent:e}))}});var ce={pointerdown:_,pointermove:2,pointerup:j,pointercancel:z,pointerout:z},pe={2:R,3:"pen",4:H,5:"kinect"},de="pointerdown",fe="pointermove pointerup pointercancel";function he(){this.evEl=de,this.evWin=fe,Q.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}t.MSPointerEvent&&!t.PointerEvent&&(de="MSPointerDown",fe="MSPointerMove MSPointerUp MSPointerCancel"),b(he,Q,{handler:function(e){var t=this.store,n=!1,r=e.type.toLowerCase().replace("ms",""),i=ce[r],o=pe[e.pointerType]||e.pointerType,a=o==R,s=A(t,e.pointerId,"pointerId");i&_&&(0===e.button||a)?s<0&&(t.push(e),s=t.length-1):i&(j|z)&&(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 me={touchstart:_,touchmove:2,touchend:j,touchcancel:z};function ge(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,Q.apply(this,arguments)}function ye(e,t){var n=T(e.touches),r=T(e.changedTouches);return t&(j|z)&&(n=M(n.concat(r),"identifier",!0)),[n,r]}b(ge,Q,{handler:function(e){var t=me[e.type];if(t===_&&(this.started=!0),this.started){var n=ye.call(this,e,t);t&(j|z)&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:R,srcEvent:e})}}});var be={touchstart:_,touchmove:2,touchend:j,touchcancel:z},ve="touchstart touchmove touchend touchcancel";function xe(){this.evTarget=ve,this.targetIds={},Q.apply(this,arguments)}function qe(e,t){var n=T(e.touches),r=this.targetIds;if(t&(2|_)&&1===n.length)return r[n[0].identifier]=!0,[n,n];var i,o,a=T(e.changedTouches),s=[],l=this.target;if(o=n.filter((function(e){return S(e.target,l)})),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]),t&(j|z)&&delete r[a[i].identifier],i++;return s.length?[M(o.concat(s),"identifier",!0),s]:void 0}b(xe,Q,{handler:function(e){var t=be[e.type],n=qe.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:R,srcEvent:e})}});var De=2500;function Ee(){Q.apply(this,arguments);var e=v(this.handler,this);this.touch=new xe(this.manager,e),this.mouse=new ue(this.manager,e),this.primaryTouch=null,this.lastTouches=[]}function Se(e,t){e&_?(this.primaryTouch=t.changedPointers[0].identifier,Ce.call(this,t)):e&(j|z)&&Ce.call(this,t)}function Ce(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)}),De)}}function we(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}b(Ee,Q,{handler:function(e,t,n){var r=n.pointerType==R,i=n.pointerType==H;if(!(i&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(r)Se.call(this,t,n);else if(i&&we.call(this,n))return;this.callback(e,t,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var Ae=I(s.style,"touchAction"),Te=Ae!==i,Me="compute",Ie="auto",ke="manipulation",Oe="none",Le="pan-x",Ne="pan-y",Pe=function(){if(!Te)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 Re(e,t){this.manager=e,this.set(t)}Re.prototype={set:function(e){e==Me&&(e=this.compute()),Te&&this.manager.element.style&&Pe[e]&&(this.manager.element.style[Ae]=e),this.actions=e.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var e=[];return h(this.manager.recognizers,(function(t){x(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))})),function(e){if(C(e,Oe))return Oe;var t=C(e,Le),n=C(e,Ne);if(t&&n)return Oe;if(t||n)return t?Le:Ne;if(C(e,ke))return ke;return Ie}(e.join(" "))},preventDefaults:function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented)t.preventDefault();else{var r=this.actions,i=C(r,Oe)&&!Pe[Oe],o=C(r,Ne)&&!Pe[Ne],a=C(r,Le)&&!Pe[Le];if(i){var s=1===e.pointers.length,l=e.distance<2,u=e.deltaTime<250;if(s&&l&&u)return}if(!a||!o)return i||o&&n&K||a&&n&G?this.preventSrc(t):void 0}},preventSrc:function(e){this.manager.session.prevented=!0,e.preventDefault()}};var He=1,Fe=32;function _e(e){this.options=o({},this.defaults,e||{}),this.id=k++,this.manager=null,this.options.enable=q(this.options.enable,!0),this.state=He,this.simultaneous={},this.requireFail=[]}function je(e){return 16&e?"cancel":8&e?"end":4&e?"move":2&e?"start":""}function ze(e){return e==W?"down":e==U?"up":e==B?"left":e==$?"right":""}function Ve(e,t){var n=t.manager;return n?n.get(e):e}function Be(){_e.apply(this,arguments)}function $e(){Be.apply(this,arguments),this.pX=null,this.pY=null}function Ue(){Be.apply(this,arguments)}function We(){_e.apply(this,arguments),this._timer=null,this._input=null}function Ke(){Be.apply(this,arguments)}function Ge(){Be.apply(this,arguments)}function Ye(){_e.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function Xe(e,t){return(t=t||{}).recognizers=q(t.recognizers,Xe.defaults.preset),new Je(e,t)}_e.prototype={defaults:{},set:function(e){return o(this.options,e),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(e){if(f(e,"recognizeWith",this))return this;var t=this.simultaneous;return t[(e=Ve(e,this)).id]||(t[e.id]=e,e.recognizeWith(this)),this},dropRecognizeWith:function(e){return f(e,"dropRecognizeWith",this)||(e=Ve(e,this),delete this.simultaneous[e.id]),this},requireFailure:function(e){if(f(e,"requireFailure",this))return this;var t=this.requireFail;return-1===A(t,e=Ve(e,this))&&(t.push(e),e.requireFailure(this)),this},dropRequireFailure:function(e){if(f(e,"dropRequireFailure",this))return this;e=Ve(e,this);var t=A(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+je(n)),r(t.options.event),e.additionalEvent&&r(e.additionalEvent),n>=8&&r(t.options.event+je(n))},tryEmit:function(e){if(this.canEmit())return this.emit(e);this.state=Fe},canEmit:function(){for(var e=0;e<this.requireFail.length;){if(!(this.requireFail[e].state&(Fe|He)))return!1;e++}return!0},recognize:function(e){var t=o({},e);if(!x(this.options.enable,[this,t]))return this.reset(),void(this.state=Fe);56&this.state&&(this.state=He),this.state=this.process(t),30&this.state&&this.tryEmit(t)},process:function(e){},getTouchAction:function(){},reset:function(){}},b(Be,_e,{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&&(n&z||!i)?16|t:r||i?n&j?8|t:2&t?4|t:2:Fe}}),b($e,Be,{defaults:{event:"pan",threshold:10,pointers:1,direction:Y},getTouchAction:function(){var e=this.options.direction,t=[];return e&K&&t.push(Ne),e&G&&t.push(Le),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||(t.direction&K?(i=0===o?V:o<0?B:$,n=o!=this.pX,r=Math.abs(e.deltaX)):(i=0===a?V:a<0?U:W,n=a!=this.pY,r=Math.abs(e.deltaY))),e.direction=i,n&&r>t.threshold&&i&t.direction},attrTest:function(e){return Be.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=ze(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),b(Ue,Be,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Oe]},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)}}),b(We,_e,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Ie]},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||e.eventType&(j|z)&&!i)this.reset();else if(e.eventType&_)this.reset(),this._timer=d((function(){this.state=8,this.tryEmit()}),t.time,this);else if(e.eventType&j)return 8;return Fe},reset:function(){clearTimeout(this._timer)},emit:function(e){8===this.state&&(e&&e.eventType&j?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=p(),this.manager.emit(this.options.event,this._input)))}}),b(Ke,Be,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Oe]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)}}),b(Ge,Be,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:K|G,pointers:1},getTouchAction:function(){return $e.prototype.getTouchAction.call(this)},attrTest:function(e){var t,n=this.options.direction;return n&(K|G)?t=e.overallVelocity:n&K?t=e.overallVelocityX:n&G&&(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&&e.eventType&j},emit:function(e){var t=ze(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),b(Ye,_e,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[ke]},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(),e.eventType&_&&0===this.count)return this.failTimeout();if(r&&i&&n){if(e.eventType!=j)return this.failTimeout();var o=!this.pTime||e.timeStamp-this.pTime<t.interval,a=!this.pCenter||ie(this.pCenter,e.center)<t.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,a&&o?this.count+=1:this.count=1,this._input=e,0===this.count%t.taps)return this.hasRequireFailures()?(this._timer=d((function(){this.state=8,this.tryEmit()}),t.interval,this),2):8}return Fe},failTimeout:function(){return this._timer=d((function(){this.state=Fe}),this.options.interval,this),Fe},reset:function(){clearTimeout(this._timer)},emit:function(){8==this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),Xe.VERSION="2.0.7",Xe.defaults={domEvents:!1,touchAction:Me,enable:!0,inputTarget:null,inputClass:null,preset:[[Ke,{enable:!1}],[Ue,{enable:!1},["rotate"]],[Ge,{direction:K}],[$e,{direction:K},["swipe"]],[Ye],[Ye,{event:"doubletap",taps:2},["tap"]],[We]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};function Je(e,t){var n;this.options=o({},Xe.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||(N?he:P?xe:L?Ee:ue))(n,Z),this.touchAction=new Re(this,this.options.touchAction),Qe(this,!0),h(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 Qe(e,t){var n,r=e.element;r.style&&(h(e.options.cssProps,(function(i,o){n=I(r.style,o),t?(e.oldCssProps[n]=r.style[n],r.style[n]=i):r.style[n]=e.oldCssProps[n]||""})),t||(e.oldCssProps={}))}Je.prototype={set:function(e){return o(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},stop:function(e){this.session.stopped=e?2:1},recognize:function(e){var t=this.session;if(!t.stopped){var n;this.touchAction.preventDefaults(e);var 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 _e)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(f(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(f(e,"remove",this))return this;if(e=this.get(e)){var t=this.recognizers,n=A(t,e);-1!==n&&(t.splice(n,1),this.touchAction.update())}return this},on:function(e,t){if(e!==i&&t!==i){var n=this.handlers;return h(w(e),(function(e){n[e]=n[e]||[],n[e].push(t)})),this}},off:function(e,t){if(e!==i){var n=this.handlers;return h(w(e),(function(e){t?n[e]&&n[e].splice(A(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&&Qe(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},o(Xe,{INPUT_START:_,INPUT_MOVE:2,INPUT_END:j,INPUT_CANCEL:z,STATE_POSSIBLE:He,STATE_BEGAN:2,STATE_CHANGED:4,STATE_ENDED:8,STATE_RECOGNIZED:8,STATE_CANCELLED:16,STATE_FAILED:Fe,DIRECTION_NONE:V,DIRECTION_LEFT:B,DIRECTION_RIGHT:$,DIRECTION_UP:U,DIRECTION_DOWN:W,DIRECTION_HORIZONTAL:K,DIRECTION_VERTICAL:G,DIRECTION_ALL:Y,Manager:Je,Input:Q,TouchAction:Re,TouchInput:xe,MouseInput:ue,PointerEventInput:he,TouchMouseInput:Ee,SingleTouchInput:ge,Recognizer:_e,AttrRecognizer:Be,Tap:Ye,Pan:$e,Swipe:Ge,Pinch:Ue,Rotate:Ke,Press:We,on:D,off:E,each:h,merge:y,extend:g,assign:o,inherit:b,bindFn:v,prefixed:I}),(void 0!==t?t:"undefined"!=typeof self?self:{}).Hammer=Xe,"function"==typeof i&&i.amd?i((function(){return Xe})):e.exports?e.exports=Xe:t.Hammer=Xe}(window,document)}(L);var N=C(L.exports);function P(e){e.component("event-area",{mounted(e){e.classList.add("event-area"),e.style.pointerEvents="auto",e.style.zIndex=1},render:()=>[]})}var R={renderer:"dom",disableTriggers:!0,preferredSize:function(){return 22},render(e){const{settings:{label:t,rtl:n},layout:{dock:r}}=this.settings,i="top"!==r&&"bottom"!==r||!n?"ltr":"rtl",o=function(e,t){const n={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",color:"#7b7a78",fontStyle:"italic",fontSize:"13px"};switch(e){case"left":n.width=`${t.height}px`,n.transform=`rotate(-90deg) translate(-${t.height}px, 0)`,n.transformOrigin="top left";break;case"right":n.width=`${t.height}px`,n.transform=`rotate(90deg) translate(0, -${t.width}px)`,n.transformOrigin="top left";break;case"center":n.width=`${t.width}px`,n.height=`${t.height}px`,n.color="#595959",n.fontStyle="normal",n.fontSize="1.2em",n.textAlign="center";break;default:n.justifyContent="flex-start",n.alignItems="flex-start"}return n}(r,this.rect),a="center"===r?t:`* ${t}`,s="center"!==r?{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}:{};return e("div",{style:o,dir:i},e("span",{ref:this.alignToRef,style:s,title:a},a))}};const H={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"}}]};const F=e=>{m((t=>{if(e)return e.setSnapshotData(t)})),g((()=>({getViewState(){if(e)return e.getViewState()}})),[e])};var _={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"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},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 r=Object.prototype.hasOwnProperty,i=Object.prototype.toString,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===i.call(e)},l=function(e){if(!e||"[object Object]"!==i.call(e))return!1;var t,n=r.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&r.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!o)return!1;for(t in e);return void 0===t||r.call(e,t)},u=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},c=function(e,t){if("__proto__"===t){if(!r.call(e,t))return;if(a)return a(e,t).value}return e[t]};e.exports=function e(){var t,n,r,i,o,a,p=arguments[0],d=1,f=arguments.length,h=!1;for("boolean"==typeof p&&(h=p,p=arguments[1]||{},d=2),(null==p||"object"!=typeof p&&"function"!=typeof p)&&(p={});d<f;++d)if(null!=(t=arguments[d]))for(n in t)r=c(p,n),p!==(i=c(t,n))&&(h&&i&&(l(i)||(o=s(i)))?(o?(o=!1,a=r&&s(r)?r:[]):a=r&&l(r)?r:{},u(p,{name:n,newValue:e(h,a,i)})):void 0!==i&&u(p,{name:n,newValue:i}));return p}},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"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},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 r=Object.prototype.hasOwnProperty,i=Object.prototype.toString,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===i.call(e)},l=function(e){if(!e||"[object Object]"!==i.call(e))return!1;var t,n=r.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&r.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!o)return!1;for(t in e);return void 0===t||r.call(e,t)},u=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},c=function(e,t){if("__proto__"===t){if(!r.call(e,t))return;if(a)return a(e,t).value}return e[t]};e.exports=function e(){var t,n,r,i,o,a,p=arguments[0],d=1,f=arguments.length,h=!1;for("boolean"==typeof p&&(h=p,p=arguments[1]||{},d=2),(null==p||"object"!=typeof p&&"function"!=typeof p)&&(p={});d<f;++d)if(null!=(t=arguments[d]))for(n in t)r=c(p,n),p!==(i=c(t,n))&&(h&&i&&(l(i)||(o=s(i)))?(o?(o=!1,a=r&&s(r)?r:[]):a=r&&l(r)?r:{},u(p,{name:n,newValue:e(h,a,i)})):void 0!==i&&u(p,{name:n,newValue:i}));return p}},function(e,t,n){n.r(t);var r=n(0),i=n.n(r),o=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},a=function(e,t,n){var r,i=t.split("."),o=e;if(void 0===o)return n;for(r=0;r<i.length;++r){if(void 0===o[i[r]])return n;o=o[i[r]]}return o},s="".concat(" ","(").concat(" "),l="".concat(" ",")").concat(" ");function u(e){return s+e+l}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var n=function(e,t){if(!t)return null;var n,r;for(n=0;n<t.length;n++)if((r=t[n]).qInfo.qId===e)return r;return null}(e.qLibraryId,t.dimensionList);return n&&n.qData.info[0].qTags.indexOf("$numeric")>-1}var r=function(e,t){if(!t)return null;var n,r,i=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var n=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(n)&&(t=(t=t.substring(1,n)).trim()),t}(e);for(n=0;n<t.length;n++){if((r=t[n]).qName===i)return r;if(r.qDerivedFieldData)for(var o=0;o<r.qDerivedFieldData.qDerivedFieldLists.length;++o)for(var a=r.qDerivedFieldData.qDerivedFieldLists[o],s=0;s<a.qFieldDefs.length;++s){var l=a.qFieldDefs[s];if(l.qName===i)return l}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return r&&r.qTags.indexOf("$numeric")>-1}function p(e){return!(!e.fullAccumulation&&!e.fullRange)}function d(e,t){var n=e.crossAllDimensions;return 2===t&&n?"RowNo(Total)":"RowNo()"}function f(e){var t=function(e){return e?(e=function(e){return e.replace(/\/\*[^]*?\*\//g,"")}(e=function(e){return e.replace(/\/\/(.*)$/gm,"")}(e))).trim():""}(e).trim();return"="===t.substring(0,1)?t.substring(1).trim():t}function h(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function m(e,t){var n=e.crossAllDimensions;return 2===t&&n?"Above(Total ":"Above("}function g(e){return void 0===e?")":", 0, ".concat(e,")")}function y(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,l=void 0===s?"0":s;if(!n.showExcludedValues)return"";if(r&&1===r.length){var u=y(c(r[0],i),h(0));return"".concat(a,"({1<").concat(u,">}").concat(l,")")}if(r&&2===r.length){var p=c(r[0],i),d=c(r[1],i),f=h(0),m=h(1),g=y(p,f),b=y(d,m);return"".concat(a,"({1<").concat(g,",").concat(b,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function v(e){return"".concat(e,"(")}function x(e){var t=e.properties,n=e.layout;return a(t,"qHyperCubeDef.qDimensions",a(n,"qHyperCube.qDimensionInfo",[])).length}var q={isFullRange:p,getNumDimensions:x,getExpressionWithExcludedComp:function(e){var t=e.expression,n=e.modifier,r=e.dimensions,i=e.dimensionAndFieldList,o=e.treatMissingAsNull,a=u(f(t));if(!n.showExcludedValues)return a;var s=b({modifier:n,dimensions:r,dimensionAndFieldList:i}),l=o?"":", 0";if(r&&1===r.length){var c=h(0);return"If(Count(".concat(c,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(r&&2===r.length){var p=h(0),d=h(1);return"If(Count(".concat(p,") * Count(").concat(d,") > 0, ").concat(a," + ").concat(s).concat(l,")")}return a},getRowNoComp:d,getNumStepComp:function(e,t){if(!p(e)){var n=e.steps;return"number"!=typeof n||Number.isNaN(n)?6:n}return d(e,t)},getAboveCompPrefix:m,getAboveCompSuffix:g,getAboveComp:function(e,t,n,r){return m(e,t)+n+g(r)},getFunctionPrefix:v,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return v(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===x({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=h(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:f,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var n=t.indexOf(s);if(-1!==n){var r=t.indexOf(l);if(-1!==r)return t.substring(n+s.length,r)}}},initModifier:function(e,t){Object.keys(t).forEach((function(n){void 0===e[n]&&(e[n]=t[n])}))},isNumeric:c,isApplicable:function(e){var t=e.properties,n=e.layout,r=e.minDimensions,i=void 0===r?1:r,o=e.maxDimensions,a=void 0===o?2:o;if(!t&&!n)return!0;var s=x({properties:t,layout:n});return s>=i&&s<=a},getExpressionWithMarkers:u,canExtract:function(e){var t=e.indexOf(s),n=e.indexOf(l);return t>-1&&n>-1&&t<n},getDimDefWithWrapper:h,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")}};function D(e){return(D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var E=i.a.bind(null,!0),S={},C=Array.isArray;function w(e){return null!=e&&!Array.isArray(e)&&"object"===D(e)}function A(e){return void 0===e}function T(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function M(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]=A(e[n||t])?o:e[t],e=e[n||t]}})),e}function I(e,t){var n=!0;if(w(e)&&w(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((function(r){I(e[r],t[r])||(n=!1)})),n);if(C(e)&&C(t)){if(e.length!==t.length)return!1;for(var r=0,i=e.length;r<i;r+=1)if(!I(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?E({},{val:e}).val:e}(t[i]),a=e[i],s="".concat(n,"/").concat(i);I(o,a)||T(t,i)||(A(a)?r.push({op:"add",path:s,value:o}):w(o)&&w(a)?r=r.concat(S.generate(a,o,s)):C(o)&&C(a)?r=r.concat(function(e,t,n){var r=[],i=e.slice(),o=-1;function a(e,t,n){if(e[n]&&A(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(I(t,i))return r;if(!A(t[0])&&A(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 l=0,u=t.length;l<u;l+=1)-1===(o=a(i,t[l].qInfo&&t[l].qInfo.qId))?(r.push({op:"add",path:"".concat(n,"/").concat(l),value:t[l]}),i.splice(l,0,t[l])):o!==l&&(r.push({op:"move",path:"".concat(n,"/").concat(l),from:"".concat(n,"/").concat(o)}),i.splice(l,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){A(t[i])&&!T(e,i)&&r.push({op:"remove",path:"".concat(n,"/").concat(i)})})),r},S.apply=function(e,t){t.forEach((function(t){var n,r=M(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(C(r))"-"===i&&(i=r.length),r.splice(+i,"add"===t.op?0:1,t.value);else if(C(o)&&C(t.value)){var s,l=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")}()}(l))}else if(w(o)&&w(t.value))n=o,Object.keys(n).forEach((function(e){Object.getOwnPropertyDescriptor(n,e).configurable&&!T(n,e)&&delete n[e]})),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 u=M(e,t.from);C(r)?r.splice(+i,0,u.splice(+a,1)[0]):(r[i]=u[a],delete u[a])}else"remove"===t.op&&(C(r)?r.splice(+i,1):delete r[i])}))},S.clone=function(e){return E({},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(e,t)};var k=S,O=function(e,t,n){if(!e)return Promise.resolve();var r=k.generate(t,n);return i()(!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()},L="accumulation";function N(e,t){var n=a(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===L)return n[r]}function P(e,t){var n=function(e,t){var n=a(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===L)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var R={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""},H={translationKey:"properties.modifier.accumulation",needDimension:q.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return q.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,o=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=o;void 0===l&&(l=q.getNumDimensions({properties:r,layout:i}));var u=a(r,"qHyperCubeDef.qDimensions",[]),c=q.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:u,dimensionAndFieldList:s}),p=q.getNumStepComp(n,l),d=q.getAboveComp(n,l,c,p),f=q.getRangeComp("RangeSum",d);if(q.needDimension({modifier:n,properties:r,layout:i})){var h=q.getDimComp(u,1),m=q.getDimComp(u,0),g=q.getAggrComp(f,h,m);f=n.showExcludedValues?q.getExcludedComp({modifier:n,dimensions:u,dimensionAndFieldList:s,valueComp:g}):g}return f},extractInputExpression:q.extractInputExpression,initModifier:function(e){q.initModifier(e,R)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:function(e,t){return!q.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=N(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=N(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 q.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(L))return!1;var o=N(t,e);return o&&!o.disabled}};return n}},F="movingAverage";function _(e,t){var n=a(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===F)return n[r]}function j(e,t){var n=function(e,t){var n=a(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===F)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var z={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1},V={translationKey:"properties.modifier.movingAverage",needDimension:q.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return q.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,n=e.expression,r=e.modifier,i=e.properties,o=e.layout,s=e.numDimensions,l=e.dimensionAndFieldList;if(!r)return n;var u=s;void 0===u&&(u=q.getNumDimensions({properties:i,layout:o}));var c=a(i,"qHyperCubeDef.qDimensions",[]),p=r.showExcludedValues&&r.nullSuppression,d=q.getExpressionWithExcludedComp({expression:n,modifier:r,dimensions:c,dimensionAndFieldList:l,treatMissingAsNull:p}),f=q.getNumStepComp(r,u),h=q.getAboveComp(r,u,d,f);if(r.nullSuppression)t=q.getRangeComp("RangeAvg",h);else{var m=q.getRangeComp("RangeSum",h),g=function(e,t){var n=q.getRowNoComp(e,t);if(!q.isFullRange(e)){var r=e.steps,i="number"!=typeof r||Number.isNaN(r)?6:r;return"RangeMin(".concat(i,", ").concat(n,")")}return n}(r,u);t="".concat(m," / ").concat(g)}var y=t;if(q.needDimension({modifier:r,properties:i,layout:o})){var b=q.getDimComp(c,1),v=q.getDimComp(c,0),x=q.getAggrComp(y,b,v);y=r.showExcludedValues?q.getExcludedComp({modifier:r,dimensions:c,dimensionAndFieldList:l,funcComp:"Only",valueComp:x}):x}return y},extractInputExpression:q.extractInputExpression,initModifier:function(e){q.initModifier(e,z)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.movingAverage.disclaimer",show:function(e,t){return!q.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(j(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(j(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(j(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(j(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=_(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=_(t,e);return n&&!n.fullRange}},showExcludedValues:{refFn:function(t){return"".concat(j(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat(j(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return q.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(F))return!1;var o=_(t,e);return o&&!o.disabled}};return n}},B="difference";function $(e,t){var n=a(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===B)return n[r]}function U(e,t){var n=function(e,t){var n=a(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===B)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var W={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""},K={translationKey:"properties.modifier.difference",needDimension:q.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return q.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:q.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,o=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=o;void 0===l&&(l=q.getNumDimensions({properties:r,layout:i}));var u=a(r,"qHyperCubeDef.qDimensions",[]),c=q.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:u,dimensionAndFieldList:s}),p=q.getAboveComp(n,l,c),d="".concat(c," - ").concat(p);if(q.needDimension({modifier:n,properties:r,layout:i})){var f=q.getDimComp(u,1),h=q.getDimComp(u,0),m=q.getAggrComp(d,f,h);d=n.showExcludedValues?q.getExcludedComp({modifier:n,dimensions:u,dimensionAndFieldList:s,funcComp:"Only",valueComp:m}):m}return d},initModifier:function(e){Object.keys(W).forEach((function(t){void 0===e[t]&&(e[t]=W[t])}))},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:function(e,t){return!q.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(U(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(U(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(U(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return q.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(B))return!1;var o=$(t,e);return o&&!o.disabled}};return n}},G={CURRENT_SELECTION:0,SELECT_FIELD_VALUE:1,DISREGARD_SELECTION:2},Y={ONE_DIMENSION:0,ALL_DIMENSIOANS:1,DISREGARD_ALL_DIMENSIONS:2},X="normalization";function J(e,t){var n=a(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===X)return n[r]}function Q(e,t){var n=function(e,t){var n=a(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===X)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}function Z(e,t){for(var n=0;n<e.length;n++)if(e[n].value===t)return n;return-1}function ee(e,t,n,r){var i=t.layout.qHyperCube.qDimensionInfo.length,o=[{value:Y.ONE_DIMENSION,translation:n.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:n.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:Y.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:Y.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=Z(t,0);t.splice(r,1)}return t}(i,o),function(e,t,n){if(0===e){var r=Z(t,1);t.splice(r,1)}return t}(J(e,r).selectionScope,o)}function te(e,t,n){var r=[{value:G.CURRENT_SELECTION,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:G.SELECT_FIELD_VALUE,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:G.DISREGARD_SELECTION,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return function(e,t,n){if(1===e){var r=Z(t,0);t.splice(r,1)}return t}(J(e,n).dimensionalScope,r)}var ne={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:Y.DISREGARD_ALL_DIMENSIONS,selectionScope:G.DISREGARD_SELECTION};function re(e){return 2===e?"{1}":""}function ie(e,t,n){return 1===e?"{$<".concat(q.getFieldWithWrapper(t),"={'").concat(n,"'}>}"):""}function oe(e,t){return 0===e&&t>1||2===e?"Total":""}function ae(e,t,n){return 0===e&&t>1?"<".concat(q.getDimDefWithWrapper(n),">"):""}var se={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,n=e.layout;return q.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:q.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,o=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=o;void 0===l&&(l=q.getNumDimensions({properties:r,layout:i}));var u=a(r,"qHyperCubeDef.qDimensions",[]),c=q.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:u,dimensionAndFieldList:s}),p=n.selectionScope,d=n.dimensionalScope;return function(e,t,n,r,i,o,a){var s=re(t),l=ie(t,n,r),u=""===s&&""===l?"":s||l,c=oe(i,o),p=ae(i,o,a),d=function(e){for(var t=[],n=0;n<e;n++)t[n]=q.getDimDefWithWrapper(n);return t.join(", ")}(o);return"".concat(e,"/ Sum(").concat(u," ").concat(c).concat(p," Aggr(").concat(u," ").concat(e,", ").concat(d,"))")}(c,p,n.field,n.value,d,l,n.primaryDimension)},initModifier:function(e){Object.keys(ne).forEach((function(t){void 0===e[t]&&(e[t]=ne[t])}))},updateModifier:function(e,t){1===(t.qDimensions?t.qDimensions.length:0)&&0===e.dimensionalScope&&(e.dimensionalScope=2)},enableTotalsFunction:function(){return!0},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:function(e,t){return!q.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:G.DISREGARD_SELECTION,options:function(n){return te(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 J(t,e).selectionScope===G.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 J(t,e).selectionScope===G.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:Y.DISREGARD_ALL_DIMENSIONS,supportTooltip:!0,options:function(n,r){return ee(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(J(t,e).dimensionalScope||0)===Y.ONE_DIMENSION&&n.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return q.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(X))return!1;var o=J(t,e);return o&&!o.disabled}};return n},getDisregardSelectionComp:re,getFieldSelectionComp:ie,getTotalComp:oe,getSelectedDimComp:ae},le={getExpression:function(e){return a(e,"qDef.base.qDef")||a(e,"qDef.qDef")},getExpressionRef:function(e){return a(e,"qDef.base.qDef")?"qDef.base.qDef":"qDef.qDef"},getLibraryIdRef:function(e){return a(e,"qDef.base.qLibraryId")?"qDef.base.qLibraryId":"qLibraryId"},getLibraryId:function(e){return a(e,"qDef.base.qLibraryId")||a(e,"qLibraryId")},getLabelRef:function(e){return a(e,"qDef.base")?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return a(e,"qDef.base")?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}},ue={initBase:function(e,t){(t||ue.isValid(e))&&(o(e,"qDef.base.qDef",a(e,"qDef.qDef")),o(e,"qDef.base.qLibraryId",a(e,"qLibraryId")),o(e,"qDef.base.qLabel",a(e,"qDef.qLabel")),o(e,"qDef.base.qLabelExpression",a(e,"qDef.qLabelExpression")))},restoreBase:function(e){ue.isValid(e)&&(o(e,"qDef.qDef",a(e,"qDef.base.qDef")),o(e,"qLibraryId",a(e,"qDef.base.qLibraryId")),o(e,"qDef.qLabel",a(e,"qDef.base.qLabel")),o(e,"qDef.qLabelExpression",a(e,"qDef.base.qLabelExpression")),a(e,"qDef.qAggrFunc")&&a(e,"qDef.base.qAggrFunc")&&o(e,"qDef.qAggrFunc",a(e,"qDef.base.qAggrFunc")),delete e.qDef.base)},isValid:function(e){var t=a(e,"qDef.base.qDef"),n=a(e,"qDef.base.qLibraryId");return void 0!==t||void 0!==n}},ce=ue;function pe(e){return(pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var de={accumulation:H,movingAverage:V,difference:K,normalization:se},fe=(t.default={modifiers:de,apply:he,applyModifiers:me,cleanUpMeasure:ge,destroy:function(e){e&&fe[e.id]&&fe[e.id].masterItemSubscriber&&(fe[e.id].masterItemSubscriber&&fe[e.id].masterItemSubscriber.unsubscribe(),delete fe[e.id])},hasActiveModifiers:ye,getActiveModifier:be,initBase:ce.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=qe(e);Te({modifiers:t,properties:n,layout:r})&&(i=!0,o=o||Le({modifiers:t,properties:n,layout:r}))})),i&&!o},ifEnableTotalsFunction:ve},{});function he(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.model,n=e.properties,r=e.isSnapshot,o=void 0!==r&&r,s=e.masterItem;fe[t.id]=fe[t.id]||{isFirstTime:!0};var l=fe[t.id].isFirstTime;if(fe[t.id].isFirstTime=!1,n&&"object"===pe(n))return me({model:t,properties:n});var u=t?t.layout:void 0,c=a(u,"qSelectionInfo.qInSelections");if(o||c)return Promise.resolve(!1);var p=a(u,"qHyperCube.qMeasureInfo"),d=fe[t.id].lastReloadTime;if(fe[t.id].lastReloadTime=a(t,"app.layout.qLastReloadTime"),ye({measures:p,layout:u})){var f=function(e){var t=e.measures,n=e.layout,r=e.lastReloadTime;return a(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 Ae({measure:e,properties:n,layout:r})}))}({measures:t,layout:n})}({measures:p,layout:u,model:t,lastReloadTime:d});return f||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 Te({modifiers:qe(t),layout:n})?!t.base:!!t.base}({measure:e,layout:n})})))}({measures:p,layout:u,masterItem:s,isFirstTime:l})?t.getEffectiveProperties().then((function(e){var n=i()(!0,{},e);Ee(n);var r=Ne(n);return Me({model:t}).then((function(i){return Ie({libraryIds:r,model:t}).then((function(r){return f&&function(e){var t=e.properties;xe(t).forEach((function(e){return function(e){var t=e.measure;if(Ae({measure:t,properties:e.properties})){var n=0,r=t.qDef.modifiers;Array.isArray(r)&&r.forEach((function(e){if("object"===pe(e)&&!e.disabled){if(n++,"object"!==pe(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&&Ce(t)&&q.simplifyExpression(t.qDef.base.qDef)!==q.simplifyExpression(r)&&(t.qDef.base.qDef=r)}}))}}({measure:e,properties:t})}))}({properties:n}),me({model:t,oldProperties:e,properties:n,runUpdateIfChange:!0,masterItem:s,libraryItemsProps:r,dimensionAndFieldList:i})}))}))})):Promise.resolve(!1)}return function(e){return!!Array.isArray(e)&&e.some((function(e){return"object"===pe(e.base)}))}(p)?t.getEffectiveProperties().then((function(e){return function(e){var t=e.model,n=e.properties,r=Ne(n);return Pe({model:t,libraryIds:r}).then((function(){var e=i()(!0,{},n);return xe(n).forEach((function(e){return ge(e)})),Oe({oldProperties:e,newProperties:n,model:t})}))}({model:t,properties:e})})):Promise.resolve(!1)}function me(e){var t=e.model,n=e.oldProperties,r=e.properties,o=e.measures,s=e.runUpdateIfChange,l=void 0!==s&&s,u=e.masterItem,c=e.libraryItemsProps,p=e.dimensionAndFieldList;void 0===n&&(n=l?i()(!0,{},r):r),Ee(r);var d=Ne(r);return Pe({model:t,libraryIds:d,masterItem:u}).then((function(){return function(e){var t=e.measures,n=e.properties,r=e.model,o=e.libraryItemsProps,s=e.dimensionAndFieldList;if(t||(t=xe(n)),!t.length)return Promise.resolve();if(!ye({measures:t,properties:n}))return t.forEach((function(e){return ge(e)})),Promise.resolve();var l=o?void 0:Ne(n);return Me({model:r,dimensionAndFieldList:s}).then((function(e){return Ie({libraryIds:l,model:r,libraryItemsProps:o}).then((function(r){t.forEach((function(t){Te({modifiers:t.qDef.modifiers,properties:n})?(function(e){var t=e.measure,n=e.properties,r=e.libraryItemsProps,o=e.dimensionAndFieldList,s=0;ce.isValid(t)||ce.initBase(t,!0);var l=t.qDef,u=l.modifiers,c=l.base;Array.isArray(u)&&u.forEach((function(e){if("object"===pe(e)&&!e.disabled){if(s++,"object"!==pe(de[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(s>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");de[e.type].initModifier(e);var l=t.qLibraryId||c&&c.qLibraryId;l?function(e){var t=e.measure,n=e.modifier,r=e.properties,o=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],s=a.qMeasure.qDef,l=de[n.type].generateExpression({expression:s,modifier:n,properties:r,dimensionAndFieldList:o});n.outputExpression=l,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=i()(!0,{},t.qDef.base)}({measure:t,modifier:e,libraryId:l,properties:n,libraryItemsProps:r,dimensionAndFieldList:o}):function(e){var t=e.measure,n=e.modifier,r=e.properties,o=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:o});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=i()(!0,{},t.qDef.base)}({measure:t,modifier:e,properties:n,dimensionAndFieldList:o}),function(e){var t=a(e,"qDef.qAggrFunc");"Expr"!==t||ve(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&ve(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)):ge(t)}))}))}))}({measures:o,properties:r,model:t,libraryItemsProps:c,dimensionAndFieldList:p}).then((function(){return l?Oe({oldProperties:n,newProperties:r,model:t}):Promise.resolve(!1)}))}))}function ge(e){!function(e){var t=qe(e);return Array.isArray(t)&&t.some((function(e){return"object"===pe(e)&&!e.disabled&&!de[e.type]}))}(e)?ce.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,Se(e)}function ye(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Te({modifiers:qe(e),properties:n,layout:r})}))}function be(e){var t=qe(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 ve(e){var t=be(e);return!t||de[t.type].enableTotalsFunction(e)}function xe(e){return a(e,"qHyperCubeDef.qMeasures",[]).concat(a(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function qe(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function De(e){return a(e,"outputExpression.qValueExpression.qExpr")||a(e,"outputExpression")}function Ee(e){xe(e).forEach((function(e){return function(e){var t=be(e);t&&(void 0!==t.outputExpression&&De(t)!==e.qDef.qDef?delete e.qDef.base:!ce.isValid(e)&&t.base&&(e.qDef.base=i()(!0,{},t.base)))}(e)}))}function Se(e){var t=qe(e);Array.isArray(t)&&t.forEach((function(t){"object"===pe(t)&&(t.disabled||!de[t.type]&&De(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)}))}function Ce(e){return e.base||e.qDef&&e.qDef.base}function we(e){var t=Ce(e);return e.qLibraryId||t&&t.qLibraryId}function Ae(e){var t=e.measure,n=e.properties,r=e.layout;return!we(t)&&Te({modifiers:qe(t),properties:n,layout:r})}function Te(e){var t=e.modifiers,n=e.properties,r=e.layout,i={};return Array.isArray(t)&&t.some((function(e){return!("object"!==pe(e)||e.disabled||!de[e.type])&&(void 0===i[e.type]&&(i[e.type]=de[e.type].isApplicable({properties:n,layout:r})),i[e.type])}))}function Me(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 Ie(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 ke(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Oe(e){var t=e.oldProperties,n=e.newProperties,r=e.model,i=JSON.stringify(a(t,"qHyperCubeDef.qMeasures"),ke)!==JSON.stringify(a(n,"qHyperCubeDef.qMeasures"),ke)||JSON.stringify(a(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),ke)!==JSON.stringify(a(n,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),ke);return i?function(e){var t=e.model,n=e.oldProperties,r=e.newProperties,i=t.layout;return i&&!i.qHasSoftPatches&&!i.qExtendsId&&a(i,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(r):O(t,n,r)}({model:r,oldProperties:t,newProperties:n}).then((function(){return i})):Promise.resolve(i)}function Le(e){var t=e.modifiers,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some((function(e){return"object"===pe(e)&&!e.disabled&&de[e.type]&&de[e.type].needDimension({modifier:e,properties:n,layout:r})}))}function Ne(e){var t=xe(e),n=[],r=[],i=!1;return t.forEach((function(t){var r=qe(t);if(Te({modifiers:r,properties:e})){var o=we(t);o&&n.push(o),i=i||Le({modifiers:r,properties:e})}})),a(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)?(fe[t.id].masterItemSubscriber=fe[t.id].masterItemSubscriber||function(e){var t=e.model,n=e.callback,r={},i={},o={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},n=a(e,"qInfo.qType");return n&&s[n]&&s[n].forEach((function(n){t[n]=a(e,n)})),JSON.stringify(t)}function u(e){var t=e.qInfo.qId;if(r[t]){var i=l(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(u),enabled:!1,properties:l(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 he({model:t,masterItem:e}).then((function(){return t.app.clearUndoBuffer()}))}}),fe[t.id].masterItemSubscriber.subscribe(n)):Promise.resolve()}}])},function(e,t,n){function r(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?r(n)+t:t}function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.r(t);var o={getValue:function(e,t,n){if(null==e||null==t)return n;for(var r=t.split("."),i=e,o=0;o<r.length;++o){var a=r[o];if(""!==a){if(void 0===i[a]||null===i[a])return n;i=i[a]}}return i},setValue:function(e,t,n){if(null!=e&&null!=t){for(var r=t.split("."),i=r[r.length-1],o=e,a=0;a<r.length-1;++a){var s=r[a];void 0!==o[s]&&null!==o[s]||(o[s]=Number.isNaN(+r[a+1])?{}:[]),o=o[s]}void 0!==n?o[i]=n:delete o[i]}},isEmpty:function(e){return 0===Object.keys(e).length&&e.constructor===Object},isAtomicValue:function(e){return/boolean|number|string/.test(i(e))},generateId:function(){return r(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};function a(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){if("string"==typeof e)return s(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)?s(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 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}function l(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return 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 c(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 p={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:c},d=n(1),f=n.n(d),h={addDimensions:function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,i=n.data[0];(t=i.dimensions).push.apply(t,a(r.qDimensions));var s,l=o.getValue(r,"qLayoutExclude.qHyperCubeDef.qDimensions");l&&(s=i.excludedDimensions).push.apply(s,a(l))},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 a,s=o.getValue(r,"qLayoutExclude.qHyperCubeDef.qMeasures");s&&(a=i.excludedMeasures).push.apply(a,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=o.getValue(n,"qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder");i&&p.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===o.getValue(e,t)&&o.setValue(e,t,e.qLayoutExclude.changed[t].from)}))}(n),delete n.qLayoutExclude.changed),n.qLayoutExclude.quarantine&&!o.isEmpty(n.qLayoutExclude.quarantine)||delete n.qLayoutExclude},storeMeasuresModifiers:function(e){e.forEach((function(e){f.a.cleanUpMeasure(e),e.qDef.modifiers&&(e.store={modifiers:e.qDef.modifiers},delete e.qDef.modifiers)}))}};function m(e,t,n){var r,i,a=o.getValue(e,t);if(!o.isAtomicValue(a))try{if((i=(i=(r=JSON.stringify(a)).match(/:\{/g))?i.length:0)>2)return;a=JSON.parse(r)}catch(e){return}o.getValue(e,"qLayoutExclude.quarantine")||o.setValue(e,"qLayoutExclude.quarantine",{});var s=o.getValue(e,"qLayoutExclude.quarantine");s[n]||(s[n]={}),s[n][t]=a}var g=n(0),y=n.n(g);function b(e,t){var n=y()(!0,{},t,e);return o.getValue(n,"qOtherTotalSpec.qOtherCounted")||o.setValue(n,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),o.getValue(n,"qOtherTotalSpec.qOtherLimit")||o.setValue(n,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),n.hasOwnProperty("othersLabel")||(n.othersLabel="Others"),n}function v(e,t){return y()(!0,{},t,e)}function x(e,t,n){return"function"==typeof e?e(t):Number.isNaN(+e)?n:e}var q=Math.pow(2,53)-1;function D(e){return function(e){if(Array.isArray(e))return E(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return E(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(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(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 C(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?C(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var w={importCommonProperties:function(e,t,n){var r="masterobject"===o.getValue(t,"properties.qInfo.qType")?"masterobject":o.getValue(n,"qInfo.qType");o.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 l=b(s.dimensions[t],a);o.qDimensions.length<r?o.qDimensions.push(l):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(l)}for(t=0;t<s.excludedDimensions.length;++t){var u=b(s.excludedDimensions[t],a);o.qDimensions.length<i?o.qDimensions.push(u):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(u)}},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 l=v(s.measures[t],a);o.qMeasures.length<r?o.qMeasures.push(l):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(l)}for(t=0;t<s.excludedMeasures.length;++t){var u=v(s.excludedMeasures[t],a);o.qMeasures.length<i?o.qMeasures.push(u):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(u)}},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=x(a.max,i.dimensions.length,q),l=x(a.min,i.dimensions.length,0);return{maxDimensions:x(o.max,s,q),minDimensions:x(o.min,l,0),maxMeasures:s,minMeasures:l}},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?(p.indexAdded(n.qInterColumnSortOrder,o),++o):(--o,p.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=y()(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&r?o.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=y()(!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=o.getValue(t,r||"").qHyperCubeDef,a=D(i.qDimensions);i.qDimensions=[],a.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=o.getValue(t,r||"").qHyperCubeDef,a=S(i.qMeasures);i.qMeasures=[],a.forEach((function(e){i.qMeasures.push(e),n.measures.added(e,t)}))}},restoreMeasuresModifiers:function(e){var t=e.measures,n=e.modifierTypes;t&&n&&f.a.isSupportedModifiers(n)&&t.forEach((function(e){e.store&&e.store.modifiers&&(e.qDef.modifiers=e.store.modifiers),delete e.store}))}};function A(e,t){var n=o.getValue(e,"qLayoutExclude.quarantine",{})[t];return!!n&&(Object.keys(n).forEach((function(t){o.setValue(e,t,n[t])})),delete e.qLayoutExclude.quarantine[t],!0)}var T={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}(),a=t.qProperty,s=o.getValue(a,n||""),l=s.qHyperCubeDef;return l.qInterColumnSortOrder||(l.qInterColumnSortOrder=[]),h.addDimensions({exportFormat:i,qHyperCubeDef:l}),h.addMeasures({exportFormat:i,qHyperCubeDef:l}),h.setInterColumnSortOrder({exportFormat:i,qHyperCubeDef:l}),delete l.qLayoutExclude,h.copyProperties({exportFormat:i,properties:a}),n&&(i.properties.qHyperCubeDef=l,delete s.qHyperCubeDef),h.updateLayoutExclude({exportFormat:i,properties:a}),r||h.storeMeasuresModifiers(i.properties.qHyperCubeDef.qMeasures),Array.isArray(i.properties.filters)&&(m(i.properties,"filters","storedFilters"),delete i.properties.filters),i.properties.qHyperCubeDef.qContextSetExpression&&(m(i.properties,"qHyperCubeDef.qContextSetExpression","storedFilters"),i.properties.qHyperCubeDef.qContextSetExpression=""),i.properties.qHyperCubeDef.qDynamicScript&&i.properties.qHyperCubeDef.qDynamicScript.length&&(m(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,a=void 0===i?{}:i,s=e.defaultPropertyValues,l=void 0===s?{}:s,u=e.hypercubePath,c=e.extension,p=e.supportedFilters,d=void 0===p||p,f=e.isHCModifierSupported,h=void 0===f||f,m={qChildren:[]},g=w.createNewProperties({exportFormat:t,initialProperties:r,hypercubePath:u}),y=o.getValue(r,u||"").qHyperCubeDef,b=o.getValue(g,u||"").qHyperCubeDef,v=w.getMaxMinDimensionMeasure({exportFormat:t,dataDefinition:a}),x=v.maxDimensions,q=v.minDimensions,D=v.maxMeasures,E=v.minMeasures,S=l.defaultDimension,C=void 0===S?w.getDefaultDimension():S,T=l.defaultMeasure,M=void 0===T?w.getDefaultMeasure():T;b.qDimensions.length=0,b.qMeasures.length=0,w.shouldInitLayoutExclude({exportFormat:t,maxDimensions:x,minDimensions:q,maxMeasures:D,minMeasures:E})&&w.initLayoutExclude({exportFormat:t,maxDimensions:x,minDimensions:q,maxMeasures:D,minMeasures:E,newHyperCubeDef:b}),w.addDimensions({exportFormat:t,maxDimensions:x,minDimensions:q,newHyperCubeDef:b,defaultDimension:C}),w.addMeasures({exportFormat:t,maxMeasures:D,minMeasures:E,newHyperCubeDef:b,defaultMeasure:M}),w.updateDimensionsOnAdded({newProperties:g,dataDefinition:a,hypercubePath:u}),w.updateMeasuresOnAdded({newProperties:g,dataDefinition:a,hypercubePath:u}),w.setInterColumnSortOrder({exportFormat:t,newHyperCubeDef:b}),w.copyPropertyIfExist("qMaxStackedCells",y,b),w.copyPropertyIfExist("qNoOfLeftDims",y,b),w.copyPropertyOrSetDefault("qInitialDataFetch",y,b,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),w.copyPropertyOrSetDefault("qMode",y,b,"S"),w.copyPropertyOrSetDefault("qReductionMode",y,b,"N"),w.copyPropertyOrSetDefault("qSortbyYValue",y,b),w.copyPropertyOrSetDefault("qIndentMode",y,b),w.copyPropertyOrSetDefault("qShowTotalsAbove",y,b),w.importCommonProperties(g,t,r),m.qProperty=g;var I=o.getValue(c||{},"support.modifiers");return w.restoreMeasuresModifiers({measures:b.qMeasures,modifierTypes:I}),d&&A(m.qProperty,"storedFilters"),"S"===b.qMode&&h&&A(m.qProperty,"dynamicScript"),m}},M={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function I(e,t,n,r){t=t||[];var i=c(e,r,n),o=c(t,r,n);if(-1!==i&&-1===o){var a=e.splice(i,1);t.push(a[0])}return t}function k(e,t){return e.length!==t}var O={create:function(e,t){if(!e||!M[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(I(a,t,r,i),k(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"}},L={getNumDimensions:function(e){return o.getValue(e,"qHyperCubeDef.qDimensions.length",0)},getNumMeasures:function(e){return o.getValue(e,"qHyperCubeDef.qMeasures.length",0)},wrapFieldName:function(e){return e.split(" ").length>1&&"="!==e[0]&&"["!==e[0]?"[".concat(e,"]"):e},getItemLabel:function(e){return e.label||e.name}},N={colorModeOptions:{primary:function(){return!0},dimension:function(e){return L.getNumDimensions(e)>0&&L.getNumMeasures(e)<=1},multiColor:function(e){return L.getNumMeasures(e)>1},measure:function(e){return L.getNumDimensions(e)>0},expression:function(e){return L.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 L.getNumMeasures(e)>=1}}},R={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 L.getNumMeasures(e)>=1}}},linechart:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return L.getNumDimensions(e)>1},multiColor:function(e){return L.getNumMeasures(e)>1},measure:function(e){return L.getNumDimensions(e)<=1},expression:function(e){return L.getNumMeasures(e)>=1}}},map:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return L.getNumDimensions(e)>=1},multiColor:function(e){return L.getNumMeasures(e)>1},measure:function(e){return L.getNumDimensions(e)>=1},expression:function(e){return L.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 L.getNumDimensions(e)>=1}}}};function H(e,t,n){if(Array.isArray(e[t])){var r=p.findIndexByPropertyValue(e[t],"id",n);r>=0&&e[t].splice(r,1)}else e[t]=[]}function F(e,t){var n=O.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach((function(e){H(e,"qAttributeDimensions",n),H(e,"qAttributeExpressions",n)})),t.forEach((function(e){H(e,"qAttributeDimensions",n),H(e,"qAttributeExpressions",n)}))}function _(e,t){if(t){var n="="===t.charAt(0);e.color.altLabel=n?{qStringExpression:{qExpr:t.substr(1)}}:t}}function j(e){var t=e.properties,n=e.isDimension,r=e.dimensions,i=e.excludedDimensions,a=e.measures,s=e.label;F(r,i);var l=r[r.length-1];if(l){var u=n?o.getValue(t,"color.byDimDef"):o.getValue(t,"color.byMeasureDef"),c=o.getValue(t,"color.formatting.qNumFormat"),d=o.getValue(t,"color.formatting.isCustomFormatted");if(u){var f=O.create(O.IDMAP.COLOR_BY_ALTERNATIVE);switch(u.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:f,label:s,item:u,isDimension:n,qNumFormat:c,isCustomFormatted:d});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=p.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:f,measures:a,item:u,isDimension:n,qNumFormat:c,isCustomFormatted:d})}n?(f.qSortBy={qSortByAscii:1},l.qAttributeDimensions.push(f)):l.qAttributeExpressions.push(f)}}}function z(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:f.a.measureBase.getLibraryId(e)}(n,t))?(s.type="measure",s.name=i,s.id=i,(o=function(e,t){return f.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 B(e,t,n,r){var i=n?"expression":t.type,o=e.color,a=o.mode,s=L.getItemLabel(t);switch(_(e,s||""),i){case"field":a="byDimension",o.byDimDef={label:t.label||L.wrapFieldName(t.name),key:L.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 $(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=n[function(e,t,n){var r=o.getValue(t,"visualization"),i=n.split("."),a=Number(i[1]),s=o.getValue(t,"layers.".concat(a,".type"));return 2===e.length&&"map"===r&&"point"===s}(n,e,t)?0:n.length-1],i=O.IDMAP.COLOR_BY_ALTERNATIVE,a=p.findItemByPropertyValue(r.qAttributeDimensions,"id",i);return B(e,z("dimension",!!a,a||r)),!!a}function U(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"".concat(t,"qMeasures"),[]),i=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=o.getValue(e,"color.byDimDef");if(a&&_(e,a.label),function(e){return!!(e&&e.activeDimensionIndex>-1)}(a))!function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"color.byDimDef");r.activeDimensionIndex=Math.min(r.activeDimensionIndex,n.length-1);var i=z("dimension",!1,n[r.activeDimensionIndex]);i.activeDimensionIndex=r.activeDimensionIndex,B(e,i)}(e,t);else if(function(e){return!e||!e.key}(a)&&$(e,t))return;j({properties:e,isDimension:!0,dimensions:n,excludedDimensions:i,measures:r,label:o.getValue(e,"color.byDimDef.label")})}function W(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"".concat(t,"qMeasures"),[]),i=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=o.getValue(e,"color.byMeasureDef");if(a&&_(e,a.label),function(e){return!!(e&&e.activeMeasureIndex>-1)}(a))!function(e,t){var n=o.getValue(e,"".concat(t,"qMeasures"),[]),r=o.getValue(e,"color.byMeasureDef");if(r.activeMeasureIndex=Math.min(r.activeMeasureIndex,n.length-1),r.activeMeasureIndex>-1){var i=z("measure",!1,n[r.activeMeasureIndex],!0);i.activeMeasureIndex=r.activeMeasureIndex,B(e,i)}}(e,t);else if(function(e,t){return(!e||!e.key)&&t.length>0}(a,r)&&function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"".concat(t,"qMeasures"),[]),i=n[n.length-1],a=O.IDMAP.COLOR_BY_ALTERNATIVE,s=p.findItemByPropertyValue(i.qAttributeExpressions,"id",a);return B(e,z("measure",!!s,s||r[0])),!!s}(e,t))return;j({properties:e,isDimension:!1,dimensions:n,excludedDimensions:i,measures:r,label:o.getValue(e,"color.byMeasureDef.label")})}var K={changeProperty:function(e,t,n){o.setValue(e,t,n),o.isAtomicValue(n)&&function(e,t,n){var r=e.qLayoutExclude;r&&(r.changed||(r.changed={}),r.changed[t]={from:o.getValue(e,t),to:n})}(e,t,n)},getCanColorBy:function(e,t){var n={primary:!0};if(e){var r=(R[t]||N).colorModeOptions||N.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=o.getValue(e,"color.mode"),r=o.getValue(e,"color.auto"),i=o.getValue(e,"".concat(t,"qDimensions"),[]),a=o.getValue(e,"".concat(t,"qMeasures"),[]),s=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);r?F(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})?U(e,t):function(e){var t=e.auto,n=e.colorMode,r=e.dimensions,i=e.measures,a=e.properties,s=o.getValue(a,"visualization");return!(t||"byMeasure"!==n||!r.length||"map"!==s&&!i.length)}({auto:r,colorMode:n,dimensions:i,measures:a,properties:e})?W(e,t):function(e,t){var n=o.getValue(e,"color.mode"),r=o.getValue(e,"".concat(t,"qDimensions"),[]),i=o.getValue(e,"".concat(t,"qMeasures"),[]),a=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);"byMultiple"===n&&i.length<2&&o.setValue(e,"color.mode","primary"),F(r,a)}(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=o.getValue(n,"qHyperCubeDef.qMeasures",[]),i=o.getValue(n,"color.mode","");return!t&&"byExpression"===i&&r.length>0},addColorByExpression:function(e){var t=o.getValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",[]),n=o.getValue(e,"color.colorExpression","");t.splice(0,0,{qExpression:n,id:"colorByExpression"}),o.setValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",t)},switchToAutoColor:function(e){o.setValue(e,"color.mode","primary"),o.setValue(e,"color.auto",!0)},shouldSwitchToColorPersistent:function(e){var t=o.getValue(e,"qHyperCubeDef.qDimensions",[]),n=o.getValue(e,"color.persistent",!1);return t.length>1&&!n}},G={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,i=T.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),o=i.data[0],a=o.dimensions.concat(o.excludedDimensions),s=o.measures.concat(o.excludedMeasures),l=O.IDMAP,u=l.COLOR_BY_ALTERNATIVE,c=l.COLOR_BY_EXPRESSION;return O.moveByIdFromGroup(a,[],"qAttributeDimensions",u),O.moveByIdFromGroup(a,[],"qAttributeExpressions",u),O.moveByIdFromGroup(s,[],"qAttributeExpressions",c),i},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,i=e.defaultPropertyValues,a=e.hypercubePath,s=e.extension,l=e.supportedFilters,u=e.isHCModifierSupported,c=T.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:i,hypercubePath:a,extension:s,supportedFilters:l,isHCModifierSupported:u}),p=c.qProperty,d=o.getValue(p,"visualization"),f=o.getValue(p,"qHyperCubeDef.qDimensions",[]),h=o.getValue(p,"color.mode",""),m=o.getValue(p,"color.auto",""),g=K.getCanColorBy(p,d),y=K.shouldUpdateColorBy({canColorBy:g,autoColor:m,colorMode:h,dimensions:f});return g[h]?K.shouldAddColorByExpression({shouldUpdateColorBy:y,properties:p})&&K.addColorByExpression(p):K.switchToAutoColor(p),y&&K.updateColorBy(p,"qHyperCubeDef."),K.shouldSwitchToColorPersistent(p)&&K.changeProperty(p,"color.persistent",!0),K.deleteTotalMode(f),c}},Y=["bar","marker","line"],X={handleAutoMinMax:function(e){var t=e.initialProperties,n=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?A(n,"unsupportedAutoMinMax")||y()(n.measureAxis,t.measureAxis):A(n,"supportedAutoMinMax")||y()(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 l=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}}),Y.includes(r)&&t[i].type[r]++,t[i].type.total++}})),t}(a);l.length?(o&&(t=l.filter((function(e){return e.type[o]>0})).sort((function(e,t){return t.type[o]-e.type[o]}))),t&&t.length||(t=l.sort((function(e,t){return t.type.total-e.type.total}))),t&&t[0]&&y()(s,n.properties.measureAxes[t[0].axis])):y()(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}}}},J={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,i=e.supportedAutoMinMax,o=void 0===i||i,a=G.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),s=a.properties;return o?(m(s,"measureAxis.min","supportedAutoMinMax"),m(s,"measureAxis.max","supportedAutoMinMax")):(m(s,"measureAxis.min","unsupportedAutoMinMax"),m(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,l=e.supportedFilters,u=e.isHCModifierSupported,c=G.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:i,hypercubePath:o,extension:s,supportedFilters:l,isHCModifierSupported:u}),p=c.qProperty;return X.handleAutoMinMax({initialProperties:n,properties:p}),X.handleMeasuresAxis({exportFormat:t,initialProperties:n,properties:p,measureType:a}),X.setInterColumnSortOrder(p.qHyperCubeDef),p.qHyperCubeDef.qColumnOrder=[],p.qHyperCubeDef.columnOrder=[],c}};function Q(e,t,n){return"qLayoutExclude.quarantine.".concat(e,".").concat(t,".").concat(n)}function Z(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,i=e.arrayName,a=e.itemPath;o.getValue(t,n,[]).forEach((function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,i=e.item,a=e.itemPath,s=o.getValue(i,a);if(void 0!==s){var l=o.getValue(i,"qDef.cId");l||(l=o.generateId(),o.setValue(i,"qDef.cId",l));var u=Q(n,r,l);o.setValue(t,u,s),o.setValue(i,a,void 0)}}({properties:t,quarantineName:r,arrayName:i,item:e,itemPath:a})}))}function ee(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,i=e.arrayName,a=e.itemPath;o.getValue(t,n,[]).forEach((function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,i=e.item,a=e.itemPath,s=o.getValue(i,"qDef.cId");if(s){var l=Q(n,r,s),u=o.getValue(t,l);void 0!==u&&(o.setValue(i,a,u),o.setValue(t,l,void 0))}}({properties:t,quarantineName:r,arrayName:i,item:e,itemPath:a})}))}var te={quarantine:function(e){Z({properties:e,arrayPath:"qHyperCubeDef.qMeasures",quarantineName:"conditionalColoring",arrayName:"measures",itemPath:"qDef.conditionalColoring"})},unquarantine:function(e){ee({properties:e,arrayPath:"qHyperCubeDef.qMeasures",itemPath:"qDef.conditionalColoring",arrayName:"measures",quarantineName:"conditionalColoring"})}},ne={quarantine:function(e){Z({properties:e,arrayPath:"qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"measures",itemPath:"qCalcCondition"}),Z({properties:e,arrayPath:"qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"dimensions",itemPath:"qCalcCondition"})},unquarantine: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"})},quarantineAlternative:function(e){Z({properties:e,arrayPath:"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"alternativeMeasures",itemPath:"qCalcCondition"}),Z({properties:e,arrayPath:"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"alternativeDimensions",itemPath:"qCalcCondition"})},unquarantineAlternative:function(e){ee({properties:e,arrayPath:"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"alternativeMeasures",itemPath:"qCalcCondition"}),ee({properties:e,arrayPath:"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"alternativeDimensions",itemPath:"qCalcCondition"})}};t.default={hypercube:T,colorChart:G,axisChart:J,quarantineProperty:m,unquarantineProperty:A,quarantineArrayProp:Z,unquarantineArrayProp:ee,conditionalColoring:te,conditionalShow:ne}}])}(_);var j=C(_.exports);const z={AUTO:!0,BIN_COUNT:10,BIN_SIZE:10,LABEL:"x",OFFSET:0,COUNT_DISTINCT:!1,BIN_MODE:"maxCount"};Object.freeze(z);const V={version:"0.35.0",qHyperCubeDef:{qDimensions:[],qMeasures:[],qMode:"S",qAlwaysFullyExpanded:!0,qSuppressZero:!1,qSuppressMissing:!0},bins:{auto:z.AUTO,binCount:"",binSize:z.BIN_SIZE,offset:z.OFFSET,countDistinct:z.COUNT_DISTINCT,binMode:z.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 B(e){const{translator:t}=e;return{path:"/qHyperCubeDef",dimensions:{min:1,max:1,description:()=>t.get("Visualization.Histogram.Binning")},measures:{min:0,max:0}}}function $(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||W(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 U(e){return function(e){if(Array.isArray(e))return K(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||W(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 W(e,t){if(e){if("string"==typeof e)return K(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)?K(e,t):void 0}}function K(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 G,Y=Object.prototype.hasOwnProperty,X=Object.prototype.toString,J=Object.defineProperty,Q=Object.getOwnPropertyDescriptor,Z=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===X.call(e)},ee=function(e){if(!e||"[object Object]"!==X.call(e))return!1;var t,n=Y.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Y.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||Y.call(e,t)},te=function(e,t){J&&"__proto__"===t.name?J(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},ne=function(e,t){if("__proto__"===t){if(!Y.call(e,t))return;if(Q)return Q(e,t).value}return e[t]};function re(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function ie(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function oe(){}G=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<u;++l)if(null!=(t=arguments[l]))for(n in t)r=ne(s,n),s!==(i=ne(t,n))&&(c&&i&&(ee(i)||(o=Z(i)))?(o?(o=!1,a=r&&Z(r)?r:[]):a=r&&ee(r)?r:{},te(s,{name:n,newValue:e(c,a,i)})):void 0!==i&&te(s,{name:n,newValue:i}));return s},G&&G.__esModule&&Object.prototype.hasOwnProperty.call(G,"default")&&G.default;var ae=1/.7,se="\\s*([+-]?\\d+)\\s*",le="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ue="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ce=/^#([0-9a-f]{3,8})$/,pe=new RegExp(`^rgb\\(${se},${se},${se}\\)$`),de=new RegExp(`^rgb\\(${ue},${ue},${ue}\\)$`),fe=new RegExp(`^rgba\\(${se},${se},${se},${le}\\)$`),he=new RegExp(`^rgba\\(${ue},${ue},${ue},${le}\\)$`),me=new RegExp(`^hsl\\(${le},${ue},${ue}\\)$`),ge=new RegExp(`^hsla\\(${le},${ue},${ue},${le}\\)$`),ye={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 be(){return this.rgb().formatHex()}function ve(){return this.rgb().formatRgb()}function xe(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=ce.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?qe(t):3===n?new Ce(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?De(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?De(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=pe.exec(e))?new Ce(t[1],t[2],t[3],1):(t=de.exec(e))?new Ce(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=fe.exec(e))?De(t[1],t[2],t[3],t[4]):(t=he.exec(e))?De(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=me.exec(e))?ke(t[1],t[2]/100,t[3]/100,1):(t=ge.exec(e))?ke(t[1],t[2]/100,t[3]/100,t[4]):ye.hasOwnProperty(e)?qe(ye[e]):"transparent"===e?new Ce(NaN,NaN,NaN,0):null}function qe(e){return new Ce(e>>16&255,e>>8&255,255&e,1)}function De(e,t,n,r){return r<=0&&(e=t=n=NaN),new Ce(e,t,n,r)}function Ee(e){return e instanceof oe||(e=xe(e)),e?new Ce((e=e.rgb()).r,e.g,e.b,e.opacity):new Ce}function Se(e,t,n,r){return 1===arguments.length?Ee(e):new Ce(e,t,n,null==r?1:r)}function Ce(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function we(){return`#${Ie(this.r)}${Ie(this.g)}${Ie(this.b)}`}function Ae(){const e=Te(this.opacity);return`${1===e?"rgb(":"rgba("}${Me(this.r)}, ${Me(this.g)}, ${Me(this.b)}${1===e?")":`, ${e})`}`}function Te(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Me(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ie(e){return((e=Me(e))<16?"0":"")+e.toString(16)}function ke(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Le(e,t,n,r)}function Oe(e){if(e instanceof Le)return new Le(e.h,e.s,e.l,e.opacity);if(e instanceof oe||(e=xe(e)),!e)return new Le;if(e instanceof Le)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,l=(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/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Le(a,s,l,e.opacity)}function Le(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Ne(e){return(e=(e||0)%360)<0?e+360:e}function Pe(e){return Math.max(0,Math.min(1,e||0))}function Re(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}re(oe,xe,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:be,formatHex:be,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Oe(this).formatHsl()},formatRgb:ve,toString:ve}),re(Ce,Se,ie(oe,{brighter(e){return e=null==e?ae:Math.pow(ae,e),new Ce(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new Ce(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ce(Me(this.r),Me(this.g),Me(this.b),Te(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:we,formatHex:we,formatHex8:function(){return`#${Ie(this.r)}${Ie(this.g)}${Ie(this.b)}${Ie(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Ae,toString:Ae})),re(Le,(function(e,t,n,r){return 1===arguments.length?Oe(e):new Le(e,t,n,null==r?1:r)}),ie(oe,{brighter(e){return e=null==e?ae:Math.pow(ae,e),new Le(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new Le(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Ce(Re(e>=240?e-240:e+120,i,r),Re(e,i,r),Re(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Le(Ne(this.h),Pe(this.s),Pe(this.l),Te(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Te(this.opacity);return`${1===e?"hsl(":"hsla("}${Ne(this.h)}, ${100*Pe(this.s)}%, ${100*Pe(this.l)}%${1===e?")":`, ${e})`}`}}));const He=Math.PI/180,Fe=180/Math.PI,_e=4/29,je=6/29,ze=3*je*je;function Ve(e){if(e instanceof Be)return new Be(e.l,e.a,e.b,e.opacity);if(e instanceof Ge)return Ye(e);e instanceof Ce||(e=Ee(e));var t,n,r=Ke(e.r),i=Ke(e.g),o=Ke(e.b),a=$e((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?t=n=a:(t=$e((.4360747*r+.3850649*i+.1430804*o)/.96422),n=$e((.0139322*r+.0971045*i+.7141733*o)/.82521)),new Be(116*a-16,500*(t-a),200*(a-n),e.opacity)}function Be(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function $e(e){return e>.008856451679035631?Math.pow(e,1/3):e/ze+_e}function Ue(e){return e>je?e*e*e:ze*(e-_e)}function We(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Ke(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Ge(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function Ye(e){if(isNaN(e.h))return new Be(e.l,0,0,e.opacity);var t=e.h*He;return new Be(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}re(Be,(function(e,t,n,r){return 1===arguments.length?Ve(e):new Be(e,t,n,null==r?1:r)}),ie(oe,{brighter(e){return new Be(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new Be(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new Ce(We(3.1338561*(t=.96422*Ue(t))-1.6168667*(e=1*Ue(e))-.4906146*(n=.82521*Ue(n))),We(-.9787684*t+1.9161415*e+.033454*n),We(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),re(Ge,(function(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof Ge)return new Ge(e.h,e.c,e.l,e.opacity);if(e instanceof Be||(e=Ve(e)),0===e.a&&0===e.b)return new Ge(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Fe;return new Ge(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new Ge(e,t,n,null==r?1:r)}),ie(oe,{brighter(e){return new Ge(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new Ge(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return Ye(this).rgb()}}));var Xe=e=>()=>e;function Je(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Xe(isNaN(e)?t:e)}function Qe(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 e(t){var n=function(e){return 1==(e=+e)?Je: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):Xe(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=Se(e)).r,(t=Se(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=Je(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);var Ze,et=["__proto__","constructor"];function tt(e,t,n){if(void 0!==e&&void 0!==t){var r=t.split("."),i=r[r.length-1];if(!et.some((function(e){return r.includes(e)}))){for(var 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 nt(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 rt(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=ot)):void 0===t&&(t=it);for(var n,r,i,o,a,s=new lt(e),l=[s];n=l.pop();)if((i=t(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;o>=0;--o)l.push(r=i[o]=new lt(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(st)}function it(e){return e.children}function ot(e){return Array.isArray(e)?e[1]:null}function at(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function st(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function lt(e){this.data=e,this.depth=this.height=0,this.parent=null}lt.prototype=rt.prototype={constructor:lt,count:function(){return this.eachAfter(nt)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,i,o=this,a=[o],s=[],l=-1;o=a.pop();)if(s.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r]);for(;o=s.pop();)e.call(t,o,++l,this);return this},eachBefore:function(e,t){for(var n,r,i=this,o=[i],a=-1;i=o.pop();)if(e.call(t,i,++a,this),n=i.children)for(r=n.length-1;r>=0;--r)o.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return rt(this).eachBefore(at)},[Symbol.iterator]:function*(){var e,t,n,r,i=this,o=[i];do{for(e=o.reverse(),o=[];i=e.pop();)if(yield i,t=i.children)for(n=0,r=t.length;n<r;++n)o.push(t[n])}while(o.length)}},Ze=function(e){
|
|
22
|
+
* Licensed under the MIT license */!function(e){!function(t,n,r,i){var o,a=["","webkit","Moz","MS","ms","o"],s=n.createElement("div"),l="function",u=Math.round,c=Math.abs,p=Date.now;function f(e,t,n){return setTimeout(v(e,n),t)}function d(e,t,n){return!!Array.isArray(e)&&(h(e,n[t],n),!0)}function h(e,t,n){var r;if(e)if(e.forEach)e.forEach(t,n);else if(e.length!==i)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)}}o="function"!=typeof Object.assign?function(e){if(e===i||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!==i&&null!==r)for(var o in r)r.hasOwnProperty(o)&&(t[o]=r[o])}return t}:Object.assign;var g=m((function(e,t,n){for(var r=Object.keys(t),o=0;o<r.length;)(!n||n&&e[r[o]]===i)&&(e[r[o]]=t[r[o]]),o++;return e}),"extend","Use `assign`."),y=m((function(e,t){return g(e,t,!0)}),"merge","Use `assign`.");function b(e,t,n){var r,i=t.prototype;(r=e.prototype=Object.create(i)).constructor=e,r._super=i,n&&o(r,n)}function v(e,t){return function(){return e.apply(t,arguments)}}function x(e,t){return typeof e==l?e.apply(t&&t[0]||i,t):e}function q(e,t){return e===i?t:e}function D(e,t,n){h(C(t),(function(t){e.addEventListener(t,n,!1)}))}function S(e,t,n){h(C(t),(function(t){e.removeEventListener(t,n,!1)}))}function E(e,t){for(;e;){if(e==t)return!0;e=e.parentNode}return!1}function w(e,t){return e.indexOf(t)>-1}function C(e){return e.trim().split(/\s+/g)}function A(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var r=0;r<e.length;){if(n&&e[r][n]==t||!n&&e[r]===t)return r;r++}return-1}function T(e){return Array.prototype.slice.call(e,0)}function M(e,t,n){for(var r=[],i=[],o=0;o<e.length;){var a=t?e[o][t]:e[o];A(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 k(e,t){for(var n,r,o=t[0].toUpperCase()+t.slice(1),s=0;s<a.length;){if((r=(n=a[s])?n+o:t)in e)return r;s++}return i}var I=1;function O(e){var n=e.ownerDocument||e;return n.defaultView||n.parentWindow||t}var N="ontouchstart"in t,L=k(t,"PointerEvent")!==i,P=N&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),R="touch",H="mouse",F=25,_=1,j=4,z=8,V=1,B=2,$=4,U=8,W=16,K=B|$,Y=U|W,G=K|Y,X=["x","y"],J=["clientX","clientY"];function Q(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 Z(e,t,n){var r=n.pointers.length,o=n.changedPointers.length,a=t&_&&r-o==0,s=t&(j|z)&&r-o==0;n.isFirst=!!a,n.isFinal=!!s,a&&(e.session={}),n.eventType=t,function(e,t){var n=e.session,r=t.pointers,o=r.length;n.firstInput||(n.firstInput=ee(t));o>1&&!n.firstMultiple?n.firstMultiple=ee(t):1===o&&(n.firstMultiple=!1);var a=n.firstInput,s=n.firstMultiple,l=s?s.center:a.center,u=t.center=te(r);t.timeStamp=p(),t.deltaTime=t.timeStamp-a.timeStamp,t.angle=oe(l,u),t.distance=ie(l,u),function(e,t){var n=t.center,r=e.offsetDelta||{},i=e.prevDelta||{},o=e.prevInput||{};t.eventType!==_&&o.eventType!==j||(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=re(t.deltaX,t.deltaY);var f=ne(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=f.x,t.overallVelocityY=f.y,t.overallVelocity=c(f.x)>c(f.y)?f.x:f.y,t.scale=s?(d=s.pointers,h=r,ie(h[0],h[1],J)/ie(d[0],d[1],J)):1,t.rotation=s?function(e,t){return oe(t[1],t[0],J)+oe(e[1],e[0],J)}(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,o,a,s=e.lastInterval||t,l=t.timeStamp-s.timeStamp;if(t.eventType!=z&&(l>F||s.velocity===i)){var u=t.deltaX-s.deltaX,p=t.deltaY-s.deltaY,f=ne(l,u,p);r=f.x,o=f.y,n=c(f.x)>c(f.y)?f.x:f.y,a=re(u,p),e.lastInterval=t}else n=s.velocity,r=s.velocityX,o=s.velocityY,a=s.direction;t.velocity=n,t.velocityX=r,t.velocityY=o,t.direction=a}(n,t);var d,h;var m=e.element;E(t.srcEvent.target,m)&&(m=t.srcEvent.target);t.target=m}(e,n),e.emit("hammer.input",n),e.recognize(n),e.session.prevInput=n}function ee(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:u(e.pointers[n].clientX),clientY:u(e.pointers[n].clientY)},n++;return{timeStamp:p(),pointers:t,center:te(t),deltaX:e.deltaX,deltaY:e.deltaY}}function te(e){var t=e.length;if(1===t)return{x:u(e[0].clientX),y:u(e[0].clientY)};for(var n=0,r=0,i=0;i<t;)n+=e[i].clientX,r+=e[i].clientY,i++;return{x:u(n/t),y:u(r/t)}}function ne(e,t,n){return{x:t/e||0,y:n/e||0}}function re(e,t){return e===t?V:c(e)>=c(t)?e<0?B:$:t<0?U:W}function ie(e,t,n){n||(n=X);var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.sqrt(r*r+i*i)}function oe(e,t,n){n||(n=X);var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return 180*Math.atan2(i,r)/Math.PI}Q.prototype={handler:function(){},init:function(){this.evEl&&D(this.element,this.evEl,this.domHandler),this.evTarget&&D(this.target,this.evTarget,this.domHandler),this.evWin&&D(O(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&S(this.element,this.evEl,this.domHandler),this.evTarget&&S(this.target,this.evTarget,this.domHandler),this.evWin&&S(O(this.element),this.evWin,this.domHandler)}};var ae={mousedown:_,mousemove:2,mouseup:j},se="mousedown",le="mousemove mouseup";function ue(){this.evEl=se,this.evWin=le,this.pressed=!1,Q.apply(this,arguments)}b(ue,Q,{handler:function(e){var t=ae[e.type];t&_&&0===e.button&&(this.pressed=!0),2&t&&1!==e.which&&(t=j),this.pressed&&(t&j&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:H,srcEvent:e}))}});var ce={pointerdown:_,pointermove:2,pointerup:j,pointercancel:z,pointerout:z},pe={2:R,3:"pen",4:H,5:"kinect"},fe="pointerdown",de="pointermove pointerup pointercancel";function he(){this.evEl=fe,this.evWin=de,Q.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}t.MSPointerEvent&&!t.PointerEvent&&(fe="MSPointerDown",de="MSPointerMove MSPointerUp MSPointerCancel"),b(he,Q,{handler:function(e){var t=this.store,n=!1,r=e.type.toLowerCase().replace("ms",""),i=ce[r],o=pe[e.pointerType]||e.pointerType,a=o==R,s=A(t,e.pointerId,"pointerId");i&_&&(0===e.button||a)?s<0&&(t.push(e),s=t.length-1):i&(j|z)&&(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 me={touchstart:_,touchmove:2,touchend:j,touchcancel:z};function ge(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,Q.apply(this,arguments)}function ye(e,t){var n=T(e.touches),r=T(e.changedTouches);return t&(j|z)&&(n=M(n.concat(r),"identifier",!0)),[n,r]}b(ge,Q,{handler:function(e){var t=me[e.type];if(t===_&&(this.started=!0),this.started){var n=ye.call(this,e,t);t&(j|z)&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:R,srcEvent:e})}}});var be={touchstart:_,touchmove:2,touchend:j,touchcancel:z},ve="touchstart touchmove touchend touchcancel";function xe(){this.evTarget=ve,this.targetIds={},Q.apply(this,arguments)}function qe(e,t){var n=T(e.touches),r=this.targetIds;if(t&(2|_)&&1===n.length)return r[n[0].identifier]=!0,[n,n];var i,o,a=T(e.changedTouches),s=[],l=this.target;if(o=n.filter((function(e){return E(e.target,l)})),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]),t&(j|z)&&delete r[a[i].identifier],i++;return s.length?[M(o.concat(s),"identifier",!0),s]:void 0}b(xe,Q,{handler:function(e){var t=be[e.type],n=qe.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:R,srcEvent:e})}});var De=2500;function Se(){Q.apply(this,arguments);var e=v(this.handler,this);this.touch=new xe(this.manager,e),this.mouse=new ue(this.manager,e),this.primaryTouch=null,this.lastTouches=[]}function Ee(e,t){e&_?(this.primaryTouch=t.changedPointers[0].identifier,we.call(this,t)):e&(j|z)&&we.call(this,t)}function we(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)}),De)}}function Ce(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}b(Se,Q,{handler:function(e,t,n){var r=n.pointerType==R,i=n.pointerType==H;if(!(i&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(r)Ee.call(this,t,n);else if(i&&Ce.call(this,n))return;this.callback(e,t,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var Ae=k(s.style,"touchAction"),Te=Ae!==i,Me="compute",ke="auto",Ie="manipulation",Oe="none",Ne="pan-x",Le="pan-y",Pe=function(){if(!Te)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 Re(e,t){this.manager=e,this.set(t)}Re.prototype={set:function(e){e==Me&&(e=this.compute()),Te&&this.manager.element.style&&Pe[e]&&(this.manager.element.style[Ae]=e),this.actions=e.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var e=[];return h(this.manager.recognizers,(function(t){x(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))})),function(e){if(w(e,Oe))return Oe;var t=w(e,Ne),n=w(e,Le);if(t&&n)return Oe;if(t||n)return t?Ne:Le;if(w(e,Ie))return Ie;return ke}(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=w(r,Oe)&&!Pe[Oe],o=w(r,Le)&&!Pe[Le],a=w(r,Ne)&&!Pe[Ne];if(i){var s=1===e.pointers.length,l=e.distance<2,u=e.deltaTime<250;if(s&&l&&u)return}if(!a||!o)return i||o&&n&K||a&&n&Y?this.preventSrc(t):void 0}},preventSrc:function(e){this.manager.session.prevented=!0,e.preventDefault()}};var He=1,Fe=32;function _e(e){this.options=o({},this.defaults,e||{}),this.id=I++,this.manager=null,this.options.enable=q(this.options.enable,!0),this.state=He,this.simultaneous={},this.requireFail=[]}function je(e){return 16&e?"cancel":8&e?"end":4&e?"move":2&e?"start":""}function ze(e){return e==W?"down":e==U?"up":e==B?"left":e==$?"right":""}function Ve(e,t){var n=t.manager;return n?n.get(e):e}function Be(){_e.apply(this,arguments)}function $e(){Be.apply(this,arguments),this.pX=null,this.pY=null}function Ue(){Be.apply(this,arguments)}function We(){_e.apply(this,arguments),this._timer=null,this._input=null}function Ke(){Be.apply(this,arguments)}function Ye(){Be.apply(this,arguments)}function Ge(){_e.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function Xe(e,t){return(t=t||{}).recognizers=q(t.recognizers,Xe.defaults.preset),new Je(e,t)}_e.prototype={defaults:{},set:function(e){return o(this.options,e),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(e){if(d(e,"recognizeWith",this))return this;var t=this.simultaneous;return t[(e=Ve(e,this)).id]||(t[e.id]=e,e.recognizeWith(this)),this},dropRecognizeWith:function(e){return d(e,"dropRecognizeWith",this)||(e=Ve(e,this),delete this.simultaneous[e.id]),this},requireFailure:function(e){if(d(e,"requireFailure",this))return this;var t=this.requireFail;return-1===A(t,e=Ve(e,this))&&(t.push(e),e.requireFailure(this)),this},dropRequireFailure:function(e){if(d(e,"dropRequireFailure",this))return this;e=Ve(e,this);var t=A(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+je(n)),r(t.options.event),e.additionalEvent&&r(e.additionalEvent),n>=8&&r(t.options.event+je(n))},tryEmit:function(e){if(this.canEmit())return this.emit(e);this.state=Fe},canEmit:function(){for(var e=0;e<this.requireFail.length;){if(!(this.requireFail[e].state&(Fe|He)))return!1;e++}return!0},recognize:function(e){var t=o({},e);if(!x(this.options.enable,[this,t]))return this.reset(),void(this.state=Fe);56&this.state&&(this.state=He),this.state=this.process(t),30&this.state&&this.tryEmit(t)},process:function(e){},getTouchAction:function(){},reset:function(){}},b(Be,_e,{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&&(n&z||!i)?16|t:r||i?n&j?8|t:2&t?4|t:2:Fe}}),b($e,Be,{defaults:{event:"pan",threshold:10,pointers:1,direction:G},getTouchAction:function(){var e=this.options.direction,t=[];return e&K&&t.push(Le),e&Y&&t.push(Ne),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||(t.direction&K?(i=0===o?V:o<0?B:$,n=o!=this.pX,r=Math.abs(e.deltaX)):(i=0===a?V:a<0?U:W,n=a!=this.pY,r=Math.abs(e.deltaY))),e.direction=i,n&&r>t.threshold&&i&t.direction},attrTest:function(e){return Be.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=ze(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),b(Ue,Be,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Oe]},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)}}),b(We,_e,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[ke]},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||e.eventType&(j|z)&&!i)this.reset();else if(e.eventType&_)this.reset(),this._timer=f((function(){this.state=8,this.tryEmit()}),t.time,this);else if(e.eventType&j)return 8;return Fe},reset:function(){clearTimeout(this._timer)},emit:function(e){8===this.state&&(e&&e.eventType&j?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=p(),this.manager.emit(this.options.event,this._input)))}}),b(Ke,Be,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Oe]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)}}),b(Ye,Be,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:K|Y,pointers:1},getTouchAction:function(){return $e.prototype.getTouchAction.call(this)},attrTest:function(e){var t,n=this.options.direction;return n&(K|Y)?t=e.overallVelocity:n&K?t=e.overallVelocityX:n&Y&&(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&&e.eventType&j},emit:function(e){var t=ze(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),b(Ge,_e,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Ie]},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(),e.eventType&_&&0===this.count)return this.failTimeout();if(r&&i&&n){if(e.eventType!=j)return this.failTimeout();var o=!this.pTime||e.timeStamp-this.pTime<t.interval,a=!this.pCenter||ie(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=f((function(){this.state=8,this.tryEmit()}),t.interval,this),2):8}return Fe},failTimeout:function(){return this._timer=f((function(){this.state=Fe}),this.options.interval,this),Fe},reset:function(){clearTimeout(this._timer)},emit:function(){8==this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),Xe.VERSION="2.0.7",Xe.defaults={domEvents:!1,touchAction:Me,enable:!0,inputTarget:null,inputClass:null,preset:[[Ke,{enable:!1}],[Ue,{enable:!1},["rotate"]],[Ye,{direction:K}],[$e,{direction:K},["swipe"]],[Ge],[Ge,{event:"doubletap",taps:2},["tap"]],[We]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};function Je(e,t){var n;this.options=o({},Xe.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||(L?he:P?xe:N?Se:ue))(n,Z),this.touchAction=new Re(this,this.options.touchAction),Qe(this,!0),h(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 Qe(e,t){var n,r=e.element;r.style&&(h(e.options.cssProps,(function(i,o){n=k(r.style,o),t?(e.oldCssProps[n]=r.style[n],r.style[n]=i):r.style[n]=e.oldCssProps[n]||""})),t||(e.oldCssProps={}))}Je.prototype={set:function(e){return o(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},stop:function(e){this.session.stopped=e?2:1},recognize:function(e){var t=this.session;if(!t.stopped){var n;this.touchAction.preventDefaults(e);var 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 _e)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=A(t,e);-1!==n&&(t.splice(n,1),this.touchAction.update())}return this},on:function(e,t){if(e!==i&&t!==i){var n=this.handlers;return h(C(e),(function(e){n[e]=n[e]||[],n[e].push(t)})),this}},off:function(e,t){if(e!==i){var n=this.handlers;return h(C(e),(function(e){t?n[e]&&n[e].splice(A(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&&Qe(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},o(Xe,{INPUT_START:_,INPUT_MOVE:2,INPUT_END:j,INPUT_CANCEL:z,STATE_POSSIBLE:He,STATE_BEGAN:2,STATE_CHANGED:4,STATE_ENDED:8,STATE_RECOGNIZED:8,STATE_CANCELLED:16,STATE_FAILED:Fe,DIRECTION_NONE:V,DIRECTION_LEFT:B,DIRECTION_RIGHT:$,DIRECTION_UP:U,DIRECTION_DOWN:W,DIRECTION_HORIZONTAL:K,DIRECTION_VERTICAL:Y,DIRECTION_ALL:G,Manager:Je,Input:Q,TouchAction:Re,TouchInput:xe,MouseInput:ue,PointerEventInput:he,TouchMouseInput:Se,SingleTouchInput:ge,Recognizer:_e,AttrRecognizer:Be,Tap:Ge,Pan:$e,Swipe:Ye,Pinch:Ue,Rotate:Ke,Press:We,on:D,off:S,each:h,merge:y,extend:g,assign:o,inherit:b,bindFn:v,prefixed:k}),(void 0!==t?t:"undefined"!=typeof self?self:{}).Hammer=Xe,"function"==typeof i&&i.amd?i((function(){return Xe})):e.exports?e.exports=Xe:t.Hammer=Xe}(window,document)}(N);var L=w(N.exports);function P(e){e.component("event-area",{mounted(e){e.classList.add("event-area"),e.style.pointerEvents="auto",e.style.zIndex=1},render:()=>[]})}var R={renderer:"dom",disableTriggers:!0,preferredSize:function(){return 22},render(e){const{settings:{label:t,rtl:n},layout:{dock:r}}=this.settings,i="top"!==r&&"bottom"!==r||!n?"ltr":"rtl",o=function(e,t){const n={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",color:"#7b7a78",fontStyle:"italic",fontSize:"13px"};switch(e){case"left":n.width=`${t.height}px`,n.transform=`rotate(-90deg) translate(-${t.height}px, 0)`,n.transformOrigin="top left";break;case"right":n.width=`${t.height}px`,n.transform=`rotate(90deg) translate(0, -${t.width}px)`,n.transformOrigin="top left";break;case"center":n.width=`${t.width}px`,n.height=`${t.height}px`,n.color="#595959",n.fontStyle="normal",n.fontSize="1.2em",n.textAlign="center";break;default:n.justifyContent="flex-start",n.alignItems="flex-start"}return n}(r,this.rect),a="center"===r?t:`* ${t}`,s="center"!==r?{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}:{};return e("div",{style:o,dir:i},e("span",{ref:this.alignToRef,style:s,title:a},a))}};const H={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"}}]};const F=e=>{m((t=>{if(e)return e.setSnapshotData(t)})),g((()=>({getViewState(){if(e)return e.getViewState()}})),[e])};var _={exports:{}};!function(e,t){self,e.exports=(()=>{var e={229:e=>{var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},a=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,i=t.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!o)return!1;for(r in e);return void 0===r||t.call(e,r)},s=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(i)return i(e,n).value}return e[n]};e.exports=function e(){var t,n,r,i,u,c,p=arguments[0],f=1,d=arguments.length,h=!1;for("boolean"==typeof p&&(h=p,p=arguments[1]||{},f=2),(null==p||"object"!=typeof p&&"function"!=typeof p)&&(p={});f<d;++f)if(null!=(t=arguments[f]))for(n in t)r=l(p,n),p!==(i=l(t,n))&&(h&&i&&(a(i)||(u=o(i)))?(u?(u=!1,c=r&&o(r)?r:[]):c=r&&a(r)?r:{},s(p,{name:n,newValue:e(h,c,i)})):void 0!==i&&s(p,{name:n,newValue:i}));return p}},645:(e,t)=>{(()=>{var e={229:e=>{var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},a=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,i=t.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!o)return!1;for(r in e);return void 0===r||t.call(e,r)},s=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(i)return i(e,n).value}return e[n]};e.exports=function e(){var t,n,r,i,u,c,p=arguments[0],f=1,d=arguments.length,h=!1;for("boolean"==typeof p&&(h=p,p=arguments[1]||{},f=2),(null==p||"object"!=typeof p&&"function"!=typeof p)&&(p={});f<d;++f)if(null!=(t=arguments[f]))for(n in t)r=l(p,n),p!==(i=l(t,n))&&(h&&i&&(a(i)||(u=o(i)))?(u?(u=!1,c=r&&o(r)?r:[]):c=r&&a(r)?r:{},s(p,{name:n,newValue:e(h,c,i)})):void 0!==i&&s(p,{name:n,newValue:i}));return p}}},n={};function r(t){var i=n[t];if(void 0!==i)return i.exports;var o=n[t]={exports:{}};return e[t](o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};(()=>{r.r(i),r.d(i,{default:()=>Ie});var e=r(229),t=r.n(e);const n=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},o=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},a={EXPRESSIONS:{observed:"",trend:"STL_Trend",seasonal:"STL_Seasonal",residual:"STL_Residual"},OPTIONS:[{value:"observed",translation:"cao.trendDecomposition.parameters.decomposition.observed"},{value:"trend",translation:"cao.trendDecomposition.parameters.decomposition.trend"},{value:"seasonal",translation:"cao.trendDecomposition.parameters.decomposition.seasonal"},{value:"residual",translation:"cao.trendDecomposition.parameters.decomposition.residual"}]};var s="".concat(" ","(").concat(" "),l="".concat(" ",")").concat(" ");function u(e){return s+e+l}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var n=function(e,t){if(!t)return null;var n,r;for(n=0;n<t.length;n++)if((r=t[n]).qInfo.qId===e)return r;return null}(e.qLibraryId,t.dimensionList);return n&&n.qData.info[0].qTags.indexOf("$numeric")>-1}var r=function(e,t){if(!t)return null;var n,r,i=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var n=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(n)&&(t=(t=t.substring(1,n)).trim()),t}(e);for(n=0;n<t.length;n++){if((r=t[n]).qName===i)return r;if(r.qDerivedFieldData)for(var o=0;o<r.qDerivedFieldData.qDerivedFieldLists.length;++o)for(var a=r.qDerivedFieldData.qDerivedFieldLists[o],s=0;s<a.qFieldDefs.length;++s){var l=a.qFieldDefs[s];if(l.qName===i)return l}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return r&&r.qTags.indexOf("$numeric")>-1}function p(e){return!(!e.fullAccumulation&&!e.fullRange)}function f(e,t){var n=e.crossAllDimensions;return 2===t&&n?"RowNo(Total)":"RowNo()"}function d(e){var t=function(e){return e?(e=function(e){return e.replace(/\/\*[^]*?\*\//g,"")}(e=function(e){return e.replace(/\/\/(.*)$/gm,"")}(e))).trim():""}(e),n=t.trim();return"="===n.substring(0,1)?n.substring(1).trim():n}function h(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function m(e,t){var n=e.crossAllDimensions;return 2===t&&n?"Above(Total ":"Above("}function g(e){return void 0===e?")":", 0, ".concat(e,")")}function y(e){return"Replace(Replace(".concat(e,",'''',''''''),'$','$''&''')")}function b(e,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=").concat(y("MinString(".concat(t,")")),")' and Only({1}").concat(t,")<='$(=").concat(y("MaxString(".concat(t,")")),")'\"}")}function v(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,l=void 0===s?"0":s;if(!n.showExcludedValues)return"";if(r&&1===r.length){var u=b(c(r[0],i),h(0));return"".concat(a,"({1<").concat(u,">}").concat(l,")")}if(r&&2===r.length){var p=c(r[0],i),f=c(r[1],i),d=h(0),m=h(1),g=b(p,d),y=b(f,m);return"".concat(a,"({1<").concat(g,",").concat(y,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function x(e){return"".concat(e,"(")}function q(e){var t=e.properties,n=e.layout;return o(t,"qHyperCubeDef.qDimensions",o(n,"qHyperCube.qDimensionInfo",[])).length}const D={isFullRange:p,getNumDimensions:q,getExpressionWithExcludedComp:function(e){var t=e.expression,n=e.modifier,r=e.dimensions,i=e.dimensionAndFieldList,o=e.treatMissingAsNull,a=u(d(t));if(!n.showExcludedValues)return a;var s=v({modifier:n,dimensions:r,dimensionAndFieldList:i}),l=o?"":", 0";if(r&&1===r.length){var c=h(0);return"If(Count(".concat(c,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(r&&2===r.length){var p=h(0),f=h(1);return"If(Count(".concat(p,") * Count(").concat(f,") > 0, ").concat(a," + ").concat(s).concat(l,")")}return a},getRowNoComp:f,getNumStepComp:function(e,t){if(!p(e)){var n=e.steps;return"number"!=typeof n||Number.isNaN(n)?6:n}return f(e,t)},getAboveCompPrefix:m,getAboveCompSuffix:g,getAboveComp:function(e,t,n,r){return m(e,t)+n+g(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:v,needDimension:function(e){var t=e.modifier,n=e.properties,r=e.layout,i=function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t);return 0===i&&2===q({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=h(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:d,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var n=t.indexOf(s);if(-1!==n){var r=t.indexOf(l);if(-1!==r)return t.substring(n+s.length,r)}}},initModifier:function(e,t){Object.keys(t).forEach((function(n){void 0===e[n]&&(e[n]=t[n])}))},isNumeric:c,isApplicable:function(e){var t=e.properties,n=e.layout,r=e.minDimensions,i=void 0===r?1:r,o=e.maxDimensions,a=void 0===o?2:o;if(!t&&!n)return!0;var s=q({properties:t,layout:n});return s>=i&&s<=a},getExpressionWithMarkers:u,canExtract:function(e){var t=e.indexOf(s),n=e.indexOf(l);return t>-1&&n>-1&&t<n},getDimDefWithWrapper:h,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")},generateTSDExpression:function(e,t,n){var r=t||e.outputExpression;if(e.base&&e.base.qDef&&(r=t!==e.base.qDef?t:e.base.qDef),"observed"!==e.decomposition){var i=n.qHyperCubeDef.qMeasures.find((function(t){return t.qDef.base&&t.qDef.base.qLibraryId&&e.base&&e.base.qLibraryId?t.qDef.base.qLibraryId===e.base.qLibraryId:null}));i&&t!==i.qDef.qLabel&&(r=i.qLibraryId||i.qDef.base.qLibraryId?"[".concat(i.qDef.qLabel,"]"):i.qDef.base.qDef);var o=function(e){var t=a.OPTIONS.find((function(t){return t.value===e.decomposition}));return t?a.EXPRESSIONS[t.value]:""}(e);r=r.startsWith("=")?r.substr(1):r,r="".concat(o,"(").concat(r,", ").concat(e.steps,")")}return r},getDecomposition:function(e){var t="observed";return Object.values(a.EXPRESSIONS).find((function(n){var r=e.qDef.base.qDef.toLowerCase()||e.qDef.qDef.toLowerCase();return a.EXPRESSIONS[n]&&r.includes(a.EXPRESSIONS[n].toLowerCase())&&(t=n),n})),t}};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}function E(e){return E="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(e)}var w=t().bind(null,!0),C={},A=Array.isArray;function T(e){return null!=e&&!Array.isArray(e)&&"object"===E(e)}function M(e){return void 0===e}function k(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function I(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]=M(e[n||t])?o:e[t],e=e[n||t]}})),e}function O(e,t){var n=!0;if(T(e)&&T(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((function(r){O(e[r],t[r])||(n=!1)})),n);if(A(e)&&A(t)){if(e.length!==t.length)return!1;for(var r=0,i=e.length;r<i;r+=1)if(!O(e[r],t[r]))return!1;return!0}return e===t}C.generate=function(e,t,n){n=n||"";var r=[];return Object.keys(t).forEach((function(i){var o=function(e){return e?w({},{val:e}).val:e}(t[i]),a=e[i],s="".concat(n,"/").concat(i);O(o,a)||k(t,i)||(M(a)?r.push({op:"add",path:s,value:o}):T(o)&&T(a)?r=r.concat(C.generate(a,o,s)):A(o)&&A(a)?r=r.concat(function(e,t,n){var r=[],i=e.slice(),o=-1;function a(e,t,n){if(e[n]&&M(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(O(t,i))return r;if(!M(t[0])&&M(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(C.generate(i[s],t[o],"".concat(n,"/").concat(s)));for(var l=0,u=t.length;l<u;l+=1)-1===(o=a(i,t[l].qInfo&&t[l].qInfo.qId))?(r.push({op:"add",path:"".concat(n,"/").concat(l),value:t[l]}),i.splice(l,0,t[l])):o!==l&&(r.push({op:"move",path:"".concat(n,"/").concat(l),from:"".concat(n,"/").concat(o)}),i.splice(l,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){M(t[i])&&!k(e,i)&&r.push({op:"remove",path:"".concat(n,"/").concat(i)})})),r},C.apply=function(e,t){t.forEach((function(t){var n,r,i=I(e,t.path),o=t.path.split("/").splice(-1)[0],a=o&&Number.isNaN(+o)?i[o]:i[+o]||i,s=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(i=null,a=e),"add"===t.op||"replace"===t.op)if(A(i))"-"===o&&(o=i.length),i.splice(+o,"add"===t.op?0:1,t.value);else if(A(a)&&A(t.value)){var l,u=t.value.slice();a.length=0,(l=a).push.apply(l,function(e){if(Array.isArray(e))return S(e)}(r=u)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return S(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)?S(e,t):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}else if(T(a)&&T(t.value))n=a,Object.keys(n).forEach((function(e){Object.getOwnPropertyDescriptor(n,e).configurable&&!k(n,e)&&delete n[e]})),w(a,t.value);else{if(!i)throw new Error("Patchee is not an object we can patch");i[o]=t.value}else if("move"===t.op){var c=I(e,t.from);A(i)?i.splice(+o,0,c.splice(+s,1)[0]):(i[o]=c[s],delete c[s])}else"remove"===t.op&&(A(i)?i.splice(+o,1):delete i[o])}))},C.clone=function(e){return w({},e)},C.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},C.updateObject=function(e,t){Object.keys(e).length?C.apply(e,C.generate(e,t)):w(e,t)};const N=C,L=function(e,n,r){if(!e)return Promise.resolve();var i=N.generate(n,r);return t()(!0,n,r),i&&i.length?(i=i.map((function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}})),e.applyPatches(i,!0)):Promise.resolve()};var P="accumulation";function R(e,t){var n=o(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===P)return n[r]}function H(e,t){var n=function(e,t){var n=o(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===P)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var F={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""};const _={translationKey:"properties.modifier.accumulation",needDimension:D.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return D.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,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=a;void 0===l&&(l=D.getNumDimensions({properties:r,layout:i}));var u=o(r,"qHyperCubeDef.qDimensions",[]),c=D.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:u,dimensionAndFieldList:s}),p=D.getNumStepComp(n,l),f=D.getAboveComp(n,l,c,p),d=D.getRangeComp("RangeSum",f);if(D.needDimension({modifier:n,properties:r,layout:i})){var h=D.getDimComp(u,1),m=D.getDimComp(u,0),g=D.getAggrComp(d,h,m);d=n.showExcludedValues?D.getExcludedComp({modifier:n,dimensions:u,dimensionAndFieldList:s,valueComp:g}):g}return d},extractInputExpression:D.extractInputExpression,initModifier:function(e){D.initModifier(e,F)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:function(e,t){return!D.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(H(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(H(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(H(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(H(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=R(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=R(t,e);return n&&!n.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(H(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return D.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(P))return!1;var o=R(t,e);return o&&!o.disabled}};return n}};var j="movingAverage";function z(e,t){var n=o(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===j)return n[r]}function V(e,t){var n=function(e,t){var n=o(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}var B={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1};const $={translationKey:"properties.modifier.movingAverage",needDimension:D.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return D.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,n=e.expression,r=e.modifier,i=e.properties,a=e.layout,s=e.numDimensions,l=e.dimensionAndFieldList;if(!r)return n;var u=s;void 0===u&&(u=D.getNumDimensions({properties:i,layout:a}));var c=o(i,"qHyperCubeDef.qDimensions",[]),p=r.showExcludedValues&&r.nullSuppression,f=D.getExpressionWithExcludedComp({expression:n,modifier:r,dimensions:c,dimensionAndFieldList:l,treatMissingAsNull:p}),d=D.getNumStepComp(r,u),h=D.getAboveComp(r,u,f,d);if(r.nullSuppression)t=D.getRangeComp("RangeAvg",h);else{var m=D.getRangeComp("RangeSum",h),g=function(e,t){var n=D.getRowNoComp(e,t);if(!D.isFullRange(e)){var r=e.steps,i="number"!=typeof r||Number.isNaN(r)?6:r;return"RangeMin(".concat(i,", ").concat(n,")")}return n}(r,u);t="".concat(m," / ").concat(g)}var y=t;if(D.needDimension({modifier:r,properties:i,layout:a})){var b=D.getDimComp(c,1),v=D.getDimComp(c,0),x=D.getAggrComp(y,b,v);y=r.showExcludedValues?D.getExcludedComp({modifier:r,dimensions:c,dimensionAndFieldList:l,funcComp:"Only",valueComp:x}):x}return y},extractInputExpression:D.extractInputExpression,initModifier:function(e){D.initModifier(e,B)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.movingAverage.disclaimer",show:function(e,t){return!D.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(V(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.movingAverage.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(V(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.movingAverage.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(V(t,e),".fullRange")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(V(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=z(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=z(t,e);return n&&!n.fullRange}},showExcludedValues:{refFn:function(t){return"".concat(V(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat(V(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return D.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}};return n}};var U="timeSeriesDecomposition";function W(e,t){var n=o(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===U)return n[r]}function K(e,t){var n=function(e,t){var n=o(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===U)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var Y={type:"timeSeriesDecomposition",disabled:!1,decomposition:"",steps:2,outputExpression:""};const G={translationKey:"properties.modifier.timeSeriesDecomposition",needDimension:D.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return D.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties;return n?D.generateTSDExpression(n,t,r):t},extractInputExpression:D.extractInputExpression,initModifier:function(e,t){D.initModifier(e,Y),""===e.decomposition&&t&&(e.decomposition=D.getDecomposition(t))},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.timeSeriesDecomposition||"properties.modifier.timeSeriesDecomposition",show:function(e,t){return!D.isApplicable({properties:t.properties})}},settings:{type:"items",items:{decomposition:{refFn:function(t){return"".concat(K(t,e),".decomposition")},type:"string",translation:t.modifierTrendDecompositionDecomposition||"properties.modifier.trendDecomposition.decomposition",component:"dropdown",schemaIgnore:!0,defaultValue:t.trendDecompositionParametersDecompositionObserved||"cao.trendDecomposition.parameters.decomposition.observed",options:a.OPTIONS},steps:{refFn:function(t){return"".concat(K(t,e),".steps")},type:"integer",translation:t.modifierTimeSeriesDecompositionPeriods||"properties.modifier.timeSeriesDecomposition.periods",schemaIgnore:!0,defaultValue:2,change:function(t,n){var r=W(t,e);if(r){var i=r.steps;r.steps="number"!=typeof i||Number.isNaN(i)?2:Math.abs(i),n.properties.qHyperCubeDef.qMeasures=n.properties.qHyperCubeDef.qMeasures.map((function(e){return e.qDef.modifiers.map((function(e){return"timeSeriesDecomposition"===e.type?e.steps=i:e.steps=e.steps,e})),e}))}},show:function(t){var n=W(t,e);return n&&!n.fullRange}}},show:function(e,t){return D.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(U))return!1;var o=W(t,e);return o&&!o.disabled}};return n}};var X="difference";function J(e,t){var n=o(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===X)return n[r]}function Q(e,t){var n=function(e,t){var n=o(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===X)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var Z={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""};const ee={translationKey:"properties.modifier.difference",needDimension:D.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return D.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:D.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=a;void 0===l&&(l=D.getNumDimensions({properties:r,layout:i}));var u=o(r,"qHyperCubeDef.qDimensions",[]),c=D.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:u,dimensionAndFieldList:s}),p=D.getAboveComp(n,l,c),f="".concat(c," - ").concat(p);if(D.needDimension({modifier:n,properties:r,layout:i})){var d=D.getDimComp(u,1),h=D.getDimComp(u,0),m=D.getAggrComp(f,d,h);f=n.showExcludedValues?D.getExcludedComp({modifier:n,dimensions:u,dimensionAndFieldList:s,funcComp:"Only",valueComp:m}):m}return f},initModifier:function(e){Object.keys(Z).forEach((function(t){void 0===e[t]&&(e[t]=Z[t])}))},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:function(e,t){return!D.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(Q(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(Q(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(Q(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return D.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(X))return!1;var o=J(t,e);return o&&!o.disabled}};return n}};var te="normalization";function ne(e,t){var n=o(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===te)return n[r]}function re(e,t){var n=function(e,t){var n=o(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===te)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}function ie(e,t){for(var n=0;n<e.length;n++)if(e[n].value===t)return n;return-1}var oe={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:2,selectionScope:2};function ae(e){return 2===e?"{1}":""}function se(e,t,n){return 1===e?"{$<".concat(D.getFieldWithWrapper(t),"={'").concat(n,"'}>}"):""}function le(e,t){return 0===e&&t>1||2===e?"Total":""}function ue(e,t,n){return 0===e&&t>1?"<".concat(D.getDimDefWithWrapper(n),">"):""}const ce={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,n=e.layout;return D.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:D.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=a;void 0===l&&(l=D.getNumDimensions({properties:r,layout:i}));var u=o(r,"qHyperCubeDef.qDimensions",[]),c=D.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:u,dimensionAndFieldList:s}),p=n.selectionScope,f=n.dimensionalScope;return function(e,t,n,r,i,o,a){var s=ae(t),l=se(t,n,r),u=""===s&&""===l?"":s||l,c=le(i,o),p=ue(i,o,a),f=function(e){for(var t=[],n=0;n<e;n++)t[n]=D.getDimDefWithWrapper(n);return t.join(", ")}(o);return"".concat(e,"/ Sum(").concat(u," ").concat(c).concat(p," Aggr(").concat(u," ").concat(e,", ").concat(f,"))")}(c,p,n.field,n.value,f,l,n.primaryDimension)},initModifier:function(e){Object.keys(oe).forEach((function(t){void 0===e[t]&&(e[t]=oe[t])}))},updateModifier:function(e,t){1===(t.qDimensions?t.qDimensions.length:0)&&0===e.dimensionalScope&&(e.dimensionalScope=2)},enableTotalsFunction:function(){return!0},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:function(e,t){return!D.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(re(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,options:function(n){return function(e,t,n){var r=[{value:0,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:1,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:2,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return r=function(e,t,n){if(1===e){var r=ie(t,0);t.splice(r,1)}return t}(ne(e,n).dimensionalScope,r),r}(n,t,e)}},field:{refFn:function(t){return"".concat(re(t,e),".field")},type:"string",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:function(e,t,n){return n.app.getFieldList().then((function(e){return e.map((function(e){return{label:e.qName,value:e.qName}}))}))},show:function(t){return 1===ne(t,e).selectionScope}},value:{refFn:function(t){return"".concat(re(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return 1===ne(t,e).selectionScope}},dimensionalScope:{refFn:function(t){return"".concat(re(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,supportTooltip:!0,options:function(n,r){return function(e,t,n,r){var i=t.layout.qHyperCube.qDimensionInfo.length,o=[{value:0,translation:n.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:n.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:1,translation:n.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension"),tooltipTranslation:n.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension",".tooltip")},{value:2,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=ie(t,0);t.splice(r,1)}return t}(i,o),o=function(e,t,n){if(0===e){var r=ie(t,1);t.splice(r,1)}return t}(ne(e,r).selectionScope,o),o}(n,r,t,e)}},primaryDimension:{refFn:function(t){return"".concat(re(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.normalization.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(t,n){return 0===(ne(t,e).dimensionalScope||0)&&n.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return D.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(te))return!1;var o=ne(t,e);return o&&!o.disabled}};return n},getDisregardSelectionComp:ae,getFieldSelectionComp:se,getTotalComp:le,getSelectedDimComp:ue};var pe="qDef.base",fe="qDef.qDef",de="qDef.base.qDef",he="qLibraryId",me="qDef.base.qLibraryId";const ge={getExpression:function(e){var t=o(e,de);return void 0!==t?t:o(e,fe)},getExpressionRef:function(e){return void 0!==o(e,de)?de:fe},getLibraryIdRef:function(e){return o(e,me)?me:he},getLibraryId:function(e){return o(e,me)||o(e,he)},getLabelRef:function(e){return o(e,pe)?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return o(e,pe)?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}};var ye="qDef.qDef",be="qDef.base.qDef",ve="qLibraryId",xe="qDef.base.qLibraryId",qe="qDef.qLabel",De="qDef.qLabelExpression",Se="qDef.base.qLabel",Ee="qDef.base.qLabelExpression",we="qDef.qAggrFunc",Ce="qDef.base.qAggrFunc",Ae={initBase:function(e,t){(t||Ae.isValid(e))&&(n(e,be,o(e,ye)),n(e,xe,o(e,ve)),n(e,Se,o(e,qe)),n(e,Ee,o(e,De)))},restoreBase:function(e){Ae.isValid(e)&&(n(e,ye,o(e,be)),n(e,ve,o(e,xe)),n(e,qe,o(e,Se)),n(e,De,o(e,Ee)),o(e,we)&&o(e,Ce)&&n(e,we,o(e,Ce)),delete e.qDef.base)},isValid:function(e){var t=o(e,be),n=o(e,xe);return void 0!==t||void 0!==n}};const Te=Ae;function Me(e){return Me="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},Me(e)}var ke={accumulation:_,movingAverage:$,difference:ee,normalization:ce,timeSeriesDecomposition:G};const Ie={modifiers:ke,apply:Ne,applyModifiers:Le,cleanUpMeasure:Pe,destroy:function(e){e&&Oe[e.id]&&Oe[e.id].masterItemSubscriber&&(Oe[e.id].masterItemSubscriber&&Oe[e.id].masterItemSubscriber.unsubscribe(),delete Oe[e.id])},hasActiveModifiers:Re,getActiveModifier:He,initBase:Te.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some((function(e){return ke[e]}))},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some((function(e){return ke[e]&&ke[e].isApplicable({properties:n,layout:r})}))},measureBase:ge,limitedSorting:function(e){var t=e.measures,n=e.properties,r=e.layout,i=!1,o=!1;return t.forEach((function(e){var t=je(e);Ke({modifiers:t,properties:n,layout:r})&&(i=!0,o=o||Qe({modifiers:t,properties:n,layout:r}))})),i&&!o},ifEnableTotalsFunction:Fe};var Oe={};function Ne(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.model,r=e.properties,i=e.isSnapshot,a=void 0!==i&&i,s=e.masterItem,l=!1;Oe[n.id]=Oe[n.id]||{isFirstTime:!0};var u=Oe[n.id].isFirstTime;if(Oe[n.id].isFirstTime=!1,r&&"object"===Me(r))return Le({model:n,properties:r});var c=n?n.layout:void 0,p=o(c,"qSelectionInfo.qInSelections");if(a||p)return Promise.resolve(l);var f=o(c,"qHyperCube.qMeasureInfo"),d=Oe[n.id].lastReloadTime;if(Oe[n.id].lastReloadTime=o(n,"app.layout.qLastReloadTime"),Re({measures:f,layout:c})){var h=function(e){var t=e.measures,n=e.layout,r=e.lastReloadTime;return o(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 We({measure:e,properties:n,layout:r})}))}({measures:t,layout:n})}({measures:f,layout:c,model:n,lastReloadTime:d});return h||function(e){var t=e.measures,n=e.layout,r=e.masterItem,i=e.isFirstTime;return!!Array.isArray(t)&&(i||r||t.some((function(e){return function(e){var t=e.measure,n=e.layout;return Ke({modifiers:je(t),layout:n})?!t.base:!!t.base}({measure:e,layout:n})})))}({measures:f,layout:c,masterItem:s,isFirstTime:u})?n.getEffectiveProperties().then((function(e){var r=t()(!0,{},e);Ve(r);var i=Ze(r);return Ye({model:n}).then((function(t){return Ge({libraryIds:i,model:n}).then((function(i){return h&&function(e){var t=e.properties;_e(t).forEach((function(e){return function(e){var t=e.measure;if(We({measure:t,properties:e.properties})){var n=0,r=t.qDef.modifiers;Array.isArray(r)&&r.forEach((function(e){if("object"===Me(e)&&!e.disabled){if(n++,"object"!==Me(ke[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=ke[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==r&&$e(t)&&D.simplifyExpression(t.qDef.base.qDef)!==D.simplifyExpression(r)&&(t.qDef.base.qDef=r)}}))}}({measure:e,properties:t})}))}({properties:r}),Le({model:n,oldProperties:e,properties:r,runUpdateIfChange:!0,masterItem:s,libraryItemsProps:i,dimensionAndFieldList:t})}))}))})):Promise.resolve(l)}return function(e){return!!Array.isArray(e)&&e.some((function(e){return"object"===Me(e.base)}))}(f)?n.getEffectiveProperties().then((function(e){return function(e){var n=e.model,r=e.properties,i=Ze(r);return et({model:n,libraryIds:i}).then((function(){var e=t()(!0,{},r);return _e(r).forEach((function(e){return Pe(e)})),Je({oldProperties:e,newProperties:r,model:n})}))}({model:n,properties:e})})):Promise.resolve(l)}function Le(e){var n=e.model,r=e.oldProperties,i=e.properties,a=e.measures,s=e.runUpdateIfChange,l=void 0!==s&&s,u=e.masterItem,c=e.libraryItemsProps,p=e.dimensionAndFieldList;void 0===r&&(r=l?t()(!0,{},i):i),Ve(i);var f=Ze(i);return et({model:n,libraryIds:f,masterItem:u}).then((function(){return function(e){var n=e.measures,r=e.properties,i=e.model,a=e.libraryItemsProps,s=e.dimensionAndFieldList;if(n||(n=_e(r)),!n.length)return Promise.resolve();if(!Re({measures:n,properties:r}))return n.forEach((function(e){return Pe(e)})),Promise.resolve();var l=a?void 0:Ze(r);return Ye({model:i,dimensionAndFieldList:s}).then((function(e){return Ge({libraryIds:l,model:i,libraryItemsProps:a}).then((function(i){n.forEach((function(n){Ke({modifiers:n.qDef.modifiers,properties:r})?(function(e){var n=e.measure,r=e.properties,i=e.libraryItemsProps,a=e.dimensionAndFieldList,s=0;Te.isValid(n)||Te.initBase(n,!0);var l=n.qDef,u=l.modifiers,c=l.base;Array.isArray(u)&&u.forEach((function(e){if("object"===Me(e)&&!e.disabled){if(s++,"object"!==Me(ke[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(s>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");ke[e.type].initModifier(e,n);var l=n.qLibraryId||c&&c.qLibraryId;l?function(e){var n=e.measure,r=e.modifier,i=e.properties,o=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],s=a.qMeasure.qDef,l=""===s?s:ke[r.type].generateExpression({expression:s,modifier:r,properties:i,dimensionAndFieldList:o});r.outputExpression=l,n.qDef.qDef=r.outputExpression,(n.qDef.qLabel||a.qMeasure.qLabel)&&(n.qDef.qLabel=a.qMeasure.qLabel),(n.qDef.qLabelExpression||a.qMeasure.qLabelExpression)&&(n.qDef.qLabelExpression=a.qMeasure.qLabelExpression),n.qDef.quarantine&&n.qDef.quarantine.qNumFormat&&a.qMeasure.qNumFormat&&(n.qDef.qNumFormat=a.qMeasure.qNumFormat,n.qDef.isCustomFormatted=a.qMeasure.isCustomFormatted),delete n.qLibraryId,n.qDef.coloring=a.qMeasure.coloring,r.base=t()(!0,{},n.qDef.base)}({measure:n,modifier:e,libraryId:l,properties:r,libraryItemsProps:i,dimensionAndFieldList:a}):function(e){var n=e.measure,r=e.modifier,i=e.properties,o=e.dimensionAndFieldList;"function"==typeof ke[r.type].updateModifier&&ke[r.type].updateModifier(r,i.qHyperCubeDef);var a=ge.getExpression(n),s=""===a?a:ke[r.type].generateExpression({expression:a,modifier:r,properties:i,dimensionAndFieldList:o});r.outputExpression=s,n.qDef.qDef=r.outputExpression,n.qDef.base.qLabelExpression?n.qDef.qLabelExpression=n.qDef.base.qLabelExpression:n.qDef.qLabel=n.qDef.base.qLabel||a,r.base=t()(!0,{},n.qDef.base)}({measure:n,modifier:e,properties:r,dimensionAndFieldList:a}),function(e){var t=o(e,"qDef.qAggrFunc");"Expr"!==t||Fe(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&Fe(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(n)}}))}({measure:n,properties:r,libraryItemsProps:i,dimensionAndFieldList:e}),Be(n)):Pe(n)}))}))}))}({measures:a,properties:i,model:n,libraryItemsProps:c,dimensionAndFieldList:p}).then((function(){return l?Je({oldProperties:r,newProperties:i,model:n}):Promise.resolve(!1)}))}))}function Pe(e){!function(e){var t=je(e);return Array.isArray(t)&&t.some((function(e){return"object"===Me(e)&&!e.disabled&&!ke[e.type]}))}(e)?Te.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,Be(e)}function Re(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ke({modifiers:je(e),properties:n,layout:r})}))}function He(e){var t=je(e);if(Array.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];if(ke[r.type]&&!r.disabled)return r}}function Fe(e){var t=He(e);return!t||ke[t.type].enableTotalsFunction(e)}function _e(e){return o(e,"qHyperCubeDef.qMeasures",[]).concat(o(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function je(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function ze(e){return o(e,"outputExpression.qValueExpression.qExpr")||o(e,"outputExpression")}function Ve(e){_e(e).forEach((function(e){return function(e){var n=He(e);n&&(void 0!==n.outputExpression&&ze(n)!==e.qDef.qDef?delete e.qDef.base:!Te.isValid(e)&&n.base&&(e.qDef.base=t()(!0,{},n.base)))}(e)}))}function Be(e){var t=je(e);Array.isArray(t)&&t.forEach((function(t){"object"===Me(t)&&(t.disabled||!ke[t.type]&&ze(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)}))}function $e(e){return e.base||e.qDef&&e.qDef.base}function Ue(e){var t=$e(e);return e.qLibraryId||t&&t.qLibraryId}function We(e){var t=e.measure,n=e.properties,r=e.layout;return!Ue(t)&&Ke({modifiers:je(t),properties:n,layout:r})}function Ke(e){var t=e.modifiers,n=e.properties,r=e.layout,i={};return Array.isArray(t)&&t.some((function(e){return!("object"!==Me(e)||e.disabled||!ke[e.type])&&(void 0===i[e.type]&&(i[e.type]=ke[e.type].isApplicable({properties:n,layout:r})),i[e.type])}))}function Ye(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 Ge(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 Xe(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Je(e){var t=e.oldProperties,n=e.newProperties,r=e.model,i=JSON.stringify(o(t,"qHyperCubeDef.qMeasures"),Xe)!==JSON.stringify(o(n,"qHyperCubeDef.qMeasures"),Xe)||JSON.stringify(o(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Xe)!==JSON.stringify(o(n,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Xe);return i?function(e){var t=e.model,n=e.oldProperties,r=e.newProperties,i=t.layout;return i&&!i.qHasSoftPatches&&!i.qExtendsId&&o(i,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(r):L(t,n,r)}({model:r,oldProperties:t,newProperties:n}).then((function(){return i})):Promise.resolve(i)}function Qe(e){var t=e.modifiers,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some((function(e){return"object"===Me(e)&&!e.disabled&&ke[e.type]&&ke[e.type].needDimension({modifier:e,properties:n,layout:r})}))}function Ze(e){var t=_e(e),n=[],r=[],i=!1;return t.forEach((function(t){var r=je(t);if(Ke({modifiers:r,properties:e})){var o=Ue(t);o&&n.push(o),i=i||Qe({modifiers:r,properties:e})}})),o(e,"qHyperCubeDef.qDimensions",[]).forEach((function(e){var t=e.qLibraryId;t&&r.push(t)})),{measureLibraryIds:n,dimensionLibraryIds:r}}function et(e){var t=e.model,n=e.libraryIds;return!e.masterItem&&n&&(n.measureLibraryIds.length||n.dimensionLibraryIds.length)?(Oe[t.id].masterItemSubscriber=Oe[t.id].masterItemSubscriber||function(e){var t=e.model,n=e.callback,r={},i={},a={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},n=o(e,"qInfo.qType");return n&&s[n]&&s[n].forEach((function(n){t[n]=o(e,n)})),JSON.stringify(t)}function u(e){var t=e.qInfo.qId;if(r[t]){var i=l(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(u),enabled:!1,properties:l(t.layout)}}))}return{subscribe:function(e){var n=e.measureLibraryIds,o=e.dimensionLibraryIds,s=[];return function(e){var t=e.dimensionLibraryIds;i={},e.measureLibraryIds.forEach((function(e){i[e]=!0})),a={},t.forEach((function(e){a[e]=!0}))}({measureLibraryIds:n,dimensionLibraryIds:o}),Object.keys(r).forEach((function(e){i[e]||a[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(a).forEach((function(e){a[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 Ne({model:t,masterItem:e}).then((function(){return t.app.clearUndoBuffer()}))}}),Oe[t.id].masterItemSubscriber.subscribe(n)):Promise.resolve()}})(),t.default=i.default,Object.defineProperty(t,"__esModule",{value:!0})})()}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var r={};return(()=>{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)}function t(n){var r=e(n%62),i=Math.floor(n/62);return i>0?t(i)+r:r}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}n.d(r,{default:()=>Ve});const o={getValue:function(e,t,n){if(null==e||null==t)return n;for(var r=t.split("."),i=e,o=0;o<r.length;++o){var a=r[o];if(""!==a){if(void 0===i[a]||null===i[a])return n;i=i[a]}}return i},setValue:function(e,t,n){if(null!=e&&null!=t){for(var r=t.split("."),i=r[r.length-1],o=e,a=0;a<r.length-1;++a){var s=r[a];void 0!==o[s]&&null!==o[s]||(o[s]=Number.isNaN(+r[a+1])?{}:[]),o=o[s]}void 0!==n?o[i]=n:delete o[i]}},isEmpty:function(e){return 0===Object.keys(e).length&&e.constructor===Object},isAtomicValue:function(e){return/boolean|number|string/.test(i(e))},generateId:function(){return t(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};function a(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){if("string"==typeof e)return s(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)?s(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 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}function l(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return 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 c(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return r;return-1}return-1}const p={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:c};var f=n(645),d=n.n(f);const h=function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,i=n.data[0];(t=i.dimensions).push.apply(t,a(r.qDimensions));var s,l=o.getValue(r,"qLayoutExclude.qHyperCubeDef.qDimensions");l&&(s=i.excludedDimensions).push.apply(s,a(l))},m=function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,i=n.data[0];(t=i.measures).push.apply(t,l(r.qMeasures));var a,s=o.getValue(r,"qLayoutExclude.qHyperCubeDef.qMeasures");s&&(a=i.excludedMeasures).push.apply(a,l(s))},g=function(e){var t=e.exportFormat,n=e.qHyperCubeDef,r=t.data[0];n.qInterColumnSortOrder||(n.qInterColumnSortOrder=[]),r.interColumnSortOrder=n.qInterColumnSortOrder.concat();var i=o.getValue(n,"qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder");i&&p.isOrderedSubset(i,r.interColumnSortOrder)&&(r.interColumnSortOrder=i.concat())},y=function(e){var t=e.exportFormat,n=e.properties;Object.keys(n).forEach((function(e){t.properties[e]=n[e]}))},b=function(e){var t=e.exportFormat,n=e.properties;n.qLayoutExclude||(n.qLayoutExclude={}),n.qLayoutExclude.disabled&&(Object.keys(n.qLayoutExclude.disabled).forEach((function(e){t.properties.hasOwnProperty(e)||(t.properties[e]=n.qLayoutExclude.disabled[e])})),delete n.qLayoutExclude.disabled),n.qLayoutExclude.changed&&(function(e){Object.keys(e.qLayoutExclude.changed).forEach((function(t){e.qLayoutExclude.changed[t].to===o.getValue(e,t)&&o.setValue(e,t,e.qLayoutExclude.changed[t].from)}))}(n),delete n.qLayoutExclude.changed),n.qLayoutExclude.quarantine&&!o.isEmpty(n.qLayoutExclude.quarantine)||delete n.qLayoutExclude},v=function(e){e.forEach((function(e){d().cleanUpMeasure(e),e.qDef.modifiers&&(e.store={modifiers:e.qDef.modifiers},delete e.qDef.modifiers)}))};function x(e,t,n){var r,i,a=o.getValue(e,t);if(!o.isAtomicValue(a))try{if((i=(i=(r=JSON.stringify(a)).match(/:\{/g))?i.length:0)>2)return;a=JSON.parse(r)}catch(e){return}o.getValue(e,"qLayoutExclude.quarantine")||o.setValue(e,"qLayoutExclude.quarantine",{});var s=o.getValue(e,"qLayoutExclude.quarantine");s[n]||(s[n]={}),s[n][t]=a}var q=n(229),D=n.n(q);function S(e,t){var n=D()(!0,{},t,e);return o.getValue(n,"qOtherTotalSpec.qOtherCounted")||o.setValue(n,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),o.getValue(n,"qOtherTotalSpec.qOtherLimit")||o.setValue(n,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),n.hasOwnProperty("othersLabel")||(n.othersLabel="Others"),n}function E(e,t){return D()(!0,{},t,e)}function w(e,t,n){return"function"==typeof e?e(t):Number.isNaN(+e)?n:e}var C=Math.pow(2,53)-1;function A(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 T(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const M=function(e,t,n){var r="masterobject"===o.getValue(t,"properties.qInfo.qType")?"masterobject":o.getValue(n,"qInfo.qType");o.setValue(e,"qInfo.qType",r),e.visualization=n.visualization},k=function(e,t,n){t.hasOwnProperty(e)&&(n[e]=t[e])},I=function(e,t,n,r){t.hasOwnProperty(e)?n[e]=t[e]:n[e]=r},O=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}}},N=function(){return{qDef:{autoSort:!0,cId:"",numFormatFromTemplate:!0},qLibraryId:"",qTrendLines:[]}},L=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 l=S(s.dimensions[t],a);o.qDimensions.length<r?o.qDimensions.push(l):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(l)}for(t=0;t<s.excludedDimensions.length;++t){var u=S(s.excludedDimensions[t],a);o.qDimensions.length<i?o.qDimensions.push(u):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(u)}},P=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 l=E(s.measures[t],a);o.qMeasures.length<r?o.qMeasures.push(l):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(l)}for(t=0;t<s.excludedMeasures.length;++t){var u=E(s.excludedMeasures[t],a);o.qMeasures.length<i?o.qMeasures.push(u):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(u)}},R=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,C),l=w(a.min,i.dimensions.length,0);return{maxDimensions:w(o.max,s,C),minDimensions:w(o.min,l,0),maxMeasures:s,minMeasures:l}},H=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?(p.indexAdded(n.qInterColumnSortOrder,o),++o):(--o,p.indexRemoved(n.qInterColumnSortOrder,o))},F=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=D()(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&r?o.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=D()(!0,{},n,i)).components&&(i.components=[]),i},_=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},j=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=[]))},z=function(e){var t,n=e.newProperties,r=e.dataDefinition,i=e.hypercubePath;if(r.dimensions&&"function"==typeof r.dimensions.added){var a=o.getValue(n,i||"").qHyperCubeDef,s=function(e){if(Array.isArray(e))return A(e)}(t=a.qDimensions)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return A(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();a.qDimensions=[],s.forEach((function(e){a.qDimensions.push(e),r.dimensions.added(e,n)}))}},V=function(e){var t,n=e.newProperties,r=e.dataDefinition,i=e.hypercubePath;if(r.measures&&"function"==typeof r.measures.added){var a=o.getValue(n,i||"").qHyperCubeDef,s=function(e){if(Array.isArray(e))return T(e)}(t=a.qMeasures)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return T(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)?T(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();a.qMeasures=[],s.forEach((function(e){a.qMeasures.push(e),r.measures.added(e,n)}))}},B=function(e){var t=e.measures,n=e.modifierTypes;t&&n&&d().isSupportedModifiers(n)&&t.forEach((function(e){e.store&&e.store.modifiers&&(e.qDef.modifiers=e.store.modifiers),delete e.store}))};function $(e,t){var n=o.getValue(e,"qLayoutExclude.quarantine",{})[t];return!!n&&(Object.keys(n).forEach((function(t){o.setValue(e,t,n[t])})),delete e.qLayoutExclude.quarantine[t],!0)}const U={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}(),a=t.qProperty,s=o.getValue(a,n||""),l=s.qHyperCubeDef;return l.qInterColumnSortOrder||(l.qInterColumnSortOrder=[]),h({exportFormat:i,qHyperCubeDef:l}),m({exportFormat:i,qHyperCubeDef:l}),g({exportFormat:i,qHyperCubeDef:l}),delete l.qLayoutExclude,y({exportFormat:i,properties:a}),n&&(i.properties.qHyperCubeDef=l,delete s.qHyperCubeDef),b({exportFormat:i,properties:a}),r||v(i.properties.qHyperCubeDef.qMeasures),Array.isArray(i.properties.filters)&&(x(i.properties,"filters","storedFilters"),delete i.properties.filters),i.properties.qHyperCubeDef.qContextSetExpression&&(x(i.properties,"qHyperCubeDef.qContextSetExpression","storedFilters"),i.properties.qHyperCubeDef.qContextSetExpression=""),i.properties.qHyperCubeDef.qDynamicScript&&i.properties.qHyperCubeDef.qDynamicScript.length&&(x(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,a=void 0===i?{}:i,s=e.defaultPropertyValues,l=void 0===s?{}:s,u=e.hypercubePath,c=e.extension,p=e.supportedFilters,f=void 0===p||p,d=e.isHCModifierSupported,h=void 0===d||d,m={qChildren:[]},g=F({exportFormat:t,initialProperties:r,hypercubePath:u}),y=o.getValue(r,u||"").qHyperCubeDef,b=o.getValue(g,u||"").qHyperCubeDef,v=R({exportFormat:t,dataDefinition:a}),x=v.maxDimensions,q=v.minDimensions,D=v.maxMeasures,S=v.minMeasures,E=l.defaultDimension,w=void 0===E?O():E,C=l.defaultMeasure,A=void 0===C?N():C;b.qDimensions.length=0,b.qMeasures.length=0,_({exportFormat:t,maxDimensions:x,minDimensions:q,maxMeasures:D,minMeasures:S})&&j({exportFormat:t,maxDimensions:x,minDimensions:q,maxMeasures:D,minMeasures:S,newHyperCubeDef:b}),L({exportFormat:t,maxDimensions:x,minDimensions:q,newHyperCubeDef:b,defaultDimension:w}),P({exportFormat:t,maxMeasures:D,minMeasures:S,newHyperCubeDef:b,defaultMeasure:A}),z({newProperties:g,dataDefinition:a,hypercubePath:u}),V({newProperties:g,dataDefinition:a,hypercubePath:u}),H({exportFormat:t,newHyperCubeDef:b}),k("qMaxStackedCells",y,b),k("qNoOfLeftDims",y,b),I("qInitialDataFetch",y,b,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),I("qMode",y,b,"S"),I("qReductionMode",y,b,"N"),I("qSortbyYValue",y,b),I("qIndentMode",y,b),I("qShowTotalsAbove",y,b),M(g,t,r),m.qProperty=g;var T=o.getValue(c||{},"support.modifiers");return B({measures:b.qMeasures,modifierTypes:T}),f&&$(m.qProperty,"storedFilters"),"S"===b.qMode&&h&&$(m.qProperty,"dynamicScript"),m}};var W={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function K(e,t,n,r){t=t||[];var i=c(e,r,n),o=c(t,r,n);if(-1!==i&&-1===o){var a=e.splice(i,1);t.push(a[0])}return t}function Y(e,t){return e.length!==t}const G={create:function(e,t){if(!e||!W[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(K(a,t,r,i),Y(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"}},X={getNumDimensions:function(e){return o.getValue(e,"qHyperCubeDef.qDimensions.length",0)},getNumMeasures:function(e){return o.getValue(e,"qHyperCubeDef.qMeasures.length",0)},wrapFieldName:function(e){return e.split(" ").length>1&&"="!==e[0]&&"["!==e[0]?"[".concat(e,"]"):e},getItemLabel:function(e){return e.label||e.name}},J={colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>0&&X.getNumMeasures(e)<=1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)>0},expression:function(e){return X.getNumMeasures(e)>=1}}},Q={colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumMeasures(e)>=1}}};var Z={scatterplot:Q,"sn-scatter-plot":Q,piechart:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumMeasures(e)>=1}}},linechart:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)<=1},expression:function(e){return X.getNumMeasures(e)>=1}}},map:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>=1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)>=1},expression:function(e){return X.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 X.getNumDimensions(e)>=1}}}};function ee(e,t,n){if(Array.isArray(e[t])){var r=p.findIndexByPropertyValue(e[t],"id",n);r>=0&&e[t].splice(r,1)}else e[t]=[]}function te(e,t){var n=G.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach((function(e){ee(e,"qAttributeDimensions",n),ee(e,"qAttributeExpressions",n)})),t.forEach((function(e){ee(e,"qAttributeDimensions",n),ee(e,"qAttributeExpressions",n)}))}function ne(e,t){if(t){var n="="===t.charAt(0);e.color.altLabel=n?{qStringExpression:{qExpr:t.substr(1)}}:t}}function re(e){var t=e.properties,n=e.isDimension,r=e.dimensions,i=e.excludedDimensions,a=e.measures,s=e.label;te(r,i);var l=r[r.length-1];if(l){var u=n?o.getValue(t,"color.byDimDef"):o.getValue(t,"color.byMeasureDef"),c=o.getValue(t,"color.formatting.qNumFormat"),f=o.getValue(t,"color.formatting.isCustomFormatted");if(u){var d=G.create(G.IDMAP.COLOR_BY_ALTERNATIVE);switch(u.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:u,isDimension:n,qNumFormat:c,isCustomFormatted:f});break;case"libraryItem":!function(e){var t=e.attributeExpression,n=e.measures,r=e.item,i=e.qNumFormat,o=e.isCustomFormatted;e.isDimension||(t.matchMeasure=p.findIndexByPropertyValue(n,"qLibraryId",r.key),i&&(t.qNumFormat=i,t.isCustomFormatted=o)),void 0!==r.expression?t.qExpression=r.expression:t.qLibraryId=r.key,t.colorMapRef=r.key}({attributeExpression:d,measures:a,item:u,isDimension:n,qNumFormat:c,isCustomFormatted:f})}n?(d.qSortBy={qSortByAscii:1},l.qAttributeDimensions.push(d)):l.qAttributeExpressions.push(d)}}}function ie(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:d().measureBase.getLibraryId(e)}(n,t),i?(s.type="measure",s.name=i,s.id=i,o=function(e,t){return d().hasActiveModifiers({measures:[e]})&&t?e.qDef.qDef:void 0}(n,r),o&&(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}const oe={useMasterNumberFormat:function(e){e.quarantine={qNumFormat:e.qNumFormat||{},isCustomFormatted:e.isCustomFormatted||!1},e.qNumFormat=null,e.isCustomFormatted=void 0}};function ae(e,t,n,r){var i=n?"expression":t.type,o=e.color,a=o.mode,s=X.getItemLabel(t);switch(ne(e,s||""),i){case"field":a="byDimension",o.byDimDef={label:t.label||X.wrapFieldName(t.name),key:X.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&&oe.useMasterNumberFormat(o.formatting)}r||(o.auto=!1,o.mode=a)}function se(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"".concat(t,"qMeasures"),[]),i=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=o.getValue(e,"color.byDimDef");if(a&&ne(e,a.label),function(e){return!!(e&&e.activeDimensionIndex>-1)}(a))!function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"color.byDimDef");r.activeDimensionIndex=Math.min(r.activeDimensionIndex,n.length-1);var i=ie("dimension",!1,n[r.activeDimensionIndex]);i.activeDimensionIndex=r.activeDimensionIndex,ae(e,i)}(e,t);else if(function(e){return!e||!e.key}(a)&&function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=n[function(e,t,n){var r=o.getValue(t,"visualization"),i=n.split("."),a=Number(i[1]),s=o.getValue(t,"layers.".concat(a,".type"));return 2===e.length&&"map"===r&&"point"===s}(n,e,t)?0:n.length-1],i=G.IDMAP.COLOR_BY_ALTERNATIVE,a=p.findItemByPropertyValue(r.qAttributeDimensions,"id",i);return ae(e,ie("dimension",!!a,a||r)),!!a}(e,t))return;re({properties:e,isDimension:!0,dimensions:n,excludedDimensions:i,measures:r,label:o.getValue(e,"color.byDimDef.label")})}const le=function(e,t,n){o.setValue(e,t,n),o.isAtomicValue(n)&&function(e,t,n){var r=e.qLayoutExclude;r&&(r.changed||(r.changed={}),r.changed[t]={from:o.getValue(e,t),to:n})}(e,t,n)},ue=function(e,t){var n={primary:!0};if(e){var r=(Z[t]||J).colorModeOptions||J.colorModeOptions;n.byDimension=r.dimension(e),n.byMeasure=r.measure(e),n.byMultiple=r.multiColor(e),n.byExpression=r.expression(e)}return n},ce=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))},pe=function(e,t){var n,r=o.getValue(e,"color.mode"),i=o.getValue(e,"color.auto"),a=o.getValue(e,"".concat(t,"qDimensions"),[]),s=o.getValue(e,"".concat(t,"qMeasures"),[]),l=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);i?te(a,l):!(n={auto:i,colorMode:r,dimensions:a}).auto&&"byDimension"===n.colorMode&&n.dimensions.length>0?se(e,t):function(e){var t=e.auto,n=e.colorMode,r=e.dimensions,i=e.measures,a=e.properties,s=o.getValue(a,"visualization");return!(t||"byMeasure"!==n||!r.length||"map"!==s&&!i.length)}({auto:i,colorMode:r,dimensions:a,measures:s,properties:e})?function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"".concat(t,"qMeasures"),[]),i=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=o.getValue(e,"color.byMeasureDef");if(a&&ne(e,a.label),function(e){return!!(e&&e.activeMeasureIndex>-1)}(a))!function(e,t){var n=o.getValue(e,"".concat(t,"qMeasures"),[]),r=o.getValue(e,"color.byMeasureDef");if(r.activeMeasureIndex=Math.min(r.activeMeasureIndex,n.length-1),r.activeMeasureIndex>-1){var i=ie("measure",!1,n[r.activeMeasureIndex],!0);i.activeMeasureIndex=r.activeMeasureIndex,ae(e,i)}}(e,t);else if(function(e,t){return(!e||!e.key)&&t.length>0}(a,r)&&function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"".concat(t,"qMeasures"),[]),i=n[n.length-1],a=G.IDMAP.COLOR_BY_ALTERNATIVE,s=p.findItemByPropertyValue(i.qAttributeExpressions,"id",a);return ae(e,ie("measure",!!s,s||r[0])),!!s}(e,t))return;re({properties:e,isDimension:!1,dimensions:n,excludedDimensions:i,measures:r,label:o.getValue(e,"color.byMeasureDef.label")})}(e,t):function(e,t){var n=o.getValue(e,"color.mode"),r=o.getValue(e,"".concat(t,"qDimensions"),[]),i=o.getValue(e,"".concat(t,"qMeasures"),[]),a=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);"byMultiple"===n&&i.length<2&&o.setValue(e,"color.mode","primary"),te(r,a)}(e,t)},fe=function(e){e.forEach((function(e){e.qOtherTotalSpec&&"qTotalMode"in e.qOtherTotalSpec&&delete e.qOtherTotalSpec.qTotalMode}))},de=function(e){var t=e.shouldUpdateColorBy,n=e.properties,r=o.getValue(n,"qHyperCubeDef.qMeasures",[]),i=o.getValue(n,"color.mode","");return!t&&"byExpression"===i&&r.length>0},he=function(e){var t=o.getValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",[]),n=o.getValue(e,"color.colorExpression","");t.splice(0,0,{qExpression:n,id:"colorByExpression"}),o.setValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",t)},me=function(e){o.setValue(e,"color.mode","primary"),o.setValue(e,"color.auto",!0)},ge=function(e){var t=o.getValue(e,"qHyperCubeDef.qDimensions",[]),n=o.getValue(e,"color.persistent",!1);return t.length>1&&!n},ye={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,i=U.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),o=i.data[0],a=o.dimensions.concat(o.excludedDimensions),s=o.measures.concat(o.excludedMeasures),l=G.IDMAP,u=l.COLOR_BY_ALTERNATIVE,c=l.COLOR_BY_EXPRESSION;return G.moveByIdFromGroup(a,[],"qAttributeDimensions",u),G.moveByIdFromGroup(a,[],"qAttributeExpressions",u),G.moveByIdFromGroup(s,[],"qAttributeExpressions",c),i},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,i=e.defaultPropertyValues,a=e.hypercubePath,s=e.extension,l=e.supportedFilters,u=e.isHCModifierSupported,c=U.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:i,hypercubePath:a,extension:s,supportedFilters:l,isHCModifierSupported:u}),p=c.qProperty,f=o.getValue(p,"visualization"),d=o.getValue(p,"qHyperCubeDef.qDimensions",[]),h=o.getValue(p,"color.mode",""),m=o.getValue(p,"color.auto",""),g=ue(p,f),y=ce({canColorBy:g,autoColor:m,colorMode:h,dimensions:d});return g[h]?de({shouldUpdateColorBy:y,properties:p})&&he(p):me(p),y&&pe(p,"qHyperCubeDef."),ge(p)&&le(p,"color.persistent",!0),fe(d),c}};var be=["bar","marker","line"];const ve=function(e){var t=e.initialProperties,n=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?$(n,"unsupportedAutoMinMax")||D()(n.measureAxis,t.measureAxis):$(n,"supportedAutoMinMax")||D()(n.measureAxis,t.measureAxis)},xe=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.initialProperties;return!(!e.exportFormat.properties.measureAxes||t.measureAxes||!t.measureAxis||void 0===t.measureAxis.autoMinMax)}({exportFormat:n,initialProperties:r})){var l=function(e){var t=[];return e.qMeasures.length>0&&e.qMeasures.forEach((function(e){if(e.qDef.series){var n=e.qDef.series,r=n.type,i=n.axis;t[i]||(t[i]={axis:i,type:{line:0,marker:0,bar:0,total:0}}),be.includes(r)&&t[i].type[r]++,t[i].type.total++}})),t}(a);l.length?(o&&(t=l.filter((function(e){return e.type[o]>0})).sort((function(e,t){return t.type[o]-e.type[o]}))),t&&t.length||(t=l.sort((function(e,t){return t.type.total-e.type.total}))),t&&t[0]&&D()(s,n.properties.measureAxes[t[0].axis])):D()(s,n.properties.measureAxes[0])}},qe=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}}},De={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,i=e.supportedAutoMinMax,o=void 0===i||i,a=ye.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),s=a.properties;return o?(x(s,"measureAxis.min","supportedAutoMinMax"),x(s,"measureAxis.max","supportedAutoMinMax")):(x(s,"measureAxis.min","unsupportedAutoMinMax"),x(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,l=e.supportedFilters,u=e.isHCModifierSupported,c=ye.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:i,hypercubePath:o,extension:s,supportedFilters:l,isHCModifierSupported:u}),p=c.qProperty;return ve({initialProperties:n,properties:p}),xe({exportFormat:t,initialProperties:n,properties:p,measureType:a}),qe(p.qHyperCubeDef),p.qHyperCubeDef.qColumnOrder=[],p.qHyperCubeDef.columnOrder=[],c}};function Se(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,a=e.itemPath;o.getValue(t,n,[]).forEach((function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,i=e.item,a=e.itemPath,s=o.getValue(i,a);if(void 0!==s){var l=o.getValue(i,"qDef.cId");l||(l=o.generateId(),o.setValue(i,"qDef.cId",l));var u=Se(n,r,l);o.setValue(t,u,s),o.setValue(i,a,void 0)}}({properties:t,quarantineName:r,arrayName:i,item:e,itemPath:a})}))}function we(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,i=e.arrayName,a=e.itemPath;o.getValue(t,n,[]).forEach((function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,i=e.item,a=e.itemPath,s=o.getValue(i,"qDef.cId");if(s){var l=Se(n,r,s),u=o.getValue(t,l);void 0!==u&&(o.setValue(i,a,u),o.setValue(t,l,void 0))}}({properties:t,quarantineName:r,arrayName:i,item:e,itemPath:a})}))}var Ce="qHyperCubeDef.qMeasures",Ae="conditionalColoring",Te="measures",Me="qDef.conditionalColoring";const ke={quarantine:function(e){Ee({properties:e,arrayPath:Ce,quarantineName:Ae,arrayName:Te,itemPath:Me})},unquarantine:function(e){we({properties:e,arrayPath:Ce,itemPath:Me,arrayName:Te,quarantineName:Ae})}};var Ie="qHyperCubeDef.qMeasures",Oe="measures",Ne="qHyperCubeDef.qDimensions",Le="dimensions",Pe="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",Re="alternativeMeasures",He="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",Fe="alternativeDimensions",_e="qCalcCondition",je="conditionalShowHide";const ze={quarantine:function(e){Ee({properties:e,arrayPath:Ie,quarantineName:je,arrayName:Oe,itemPath:_e}),Ee({properties:e,arrayPath:Ne,quarantineName:je,arrayName:Le,itemPath:_e})},unquarantine:function(e){we({properties:e,arrayPath:Ie,quarantineName:je,arrayName:Oe,itemPath:_e}),we({properties:e,arrayPath:Ne,quarantineName:je,arrayName:Le,itemPath:_e})},quarantineAlternative:function(e){Ee({properties:e,arrayPath:Pe,quarantineName:je,arrayName:Re,itemPath:_e}),Ee({properties:e,arrayPath:He,quarantineName:je,arrayName:Fe,itemPath:_e})},unquarantineAlternative:function(e){we({properties:e,arrayPath:Pe,quarantineName:je,arrayName:Re,itemPath:_e}),we({properties:e,arrayPath:He,quarantineName:je,arrayName:Fe,itemPath:_e})}},Ve={hypercube:U,colorChart:ye,axisChart:De,quarantineProperty:x,unquarantineProperty:$,quarantineArrayProp:Ee,unquarantineArrayProp:we,conditionalColoring:ke,conditionalShow:ze}})(),r.default})()}(_);var j=w(_.exports);const z={AUTO:!0,BIN_COUNT:10,BIN_SIZE:10,LABEL:"x",OFFSET:0,COUNT_DISTINCT:!1,BIN_MODE:"maxCount"};Object.freeze(z);const V={version:"0.35.2",qHyperCubeDef:{qDimensions:[],qMeasures:[],qMode:"S",qAlwaysFullyExpanded:!0,qSuppressZero:!1,qSuppressMissing:!0},bins:{auto:z.AUTO,binCount:"",binSize:z.BIN_SIZE,offset:z.OFFSET,countDistinct:z.COUNT_DISTINCT,binMode:z.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 B(e){const{translator:t}=e;return{path:"/qHyperCubeDef",dimensions:{min:1,max:1,description:()=>t.get("Visualization.Histogram.Binning")},measures:{min:0,max:0}}}function $(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||W(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 U(e){return function(e){if(Array.isArray(e))return K(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||W(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 W(e,t){if(e){if("string"==typeof e)return K(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)?K(e,t):void 0}}function K(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 Y=["American Typewriter, serif","Andalé Mono, monospace","Arial Black, sans-serif","Arial, sans-serif","Bradley Hand, cursive","Brush Script MT, cursive","Comic Sans MS, cursive","Courier, monospace","Didot, serif","Georgia, serif","Impact, sans-serif","Lucida Console, monospace","Luminari, fantasy","Monaco, monospace","QlikView Sans, sans-serif","Source Sans Pro, sans-serif","Tahoma, sans-serif","Times New Roman, serif","Trebuchet MS, sans-serif","Verdana, sans-serif"],G=["Abril Fatface, serif","Bangers, fantasy","Bebas Neue, sans serif","EB Garamond, serif","Fredoka One, fantasy","Graduate, fantasy","Gravitas One, serif","Indie Flower, fantasy","Inter, sans-serif","Lobster, fantasy","Montserrat, sans-serif","Nixie One, sans-serif","Noto Sans, sans-serif","Open Sans, sans-serif","PT Serif, serif","Pacifico, cursive","Permanent Marker, fantasy","QlikView Sans, sans-serif","Raleway, sans-serif","Rammetto One, fantasy","Roboto, sans-serif","Source Sans Pro, sans-serif","Titan One, fantasy","Yanone Kaffeesatz, sans-serif"];var X=function(e){return{value:e,label:e.charAt(0).toUpperCase()+e.slice(1),groupHeader:!1,disabled:!1,styles:{fontFamily:e}}};function J(e){var t=e.theme,n=e.translator,r=e.defaultValue,i=e.flags,o=[],a=t.getStyle("","","fontFamilies");return Array.isArray(a)&&a.length?o.push.apply(o,U(new Set([r].concat(U(a.map((function(e){return e.split(",").map((function(e){return e.trim()})).map((function(e){return e.replace(/\s+/g," ").trim()})).filter(Boolean).join(", ")}))))))):o.push(r),[{value:"ThemeHeader",label:n.get("properties.themeFonts"),metaText:n.get("properties.theme"),groupHeader:!0}].concat(U(o.map((function(e){return X(e)}))),[{value:"DefaultHeader",label:n.get("properties.allFonts"),metaText:n.get("properties.default"),groupHeader:!0}],U(function(e){return null!=e&&e.isEnabled("PS_20852_WYSIWYG_FONT_SUPPORT")?G:Y}(i).map((function(e){return X(e)}))))}function Q(e){var t=e.theme,n=e.translator,r=e.id,i=e.path,o=e.flags,a=function(){return t.getStyle(r,i,"fontFamily")};return{getDefaultValue:function(){return a()},getOptions:function(){return J({theme:t,translator:n,defaultValue:a(),flags:o})}}}var Z=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],ee=function(e){return{value:e,label:e,groupHeader:!1,disabled:!1}};function te(e){var t=e.theme,n=e.translator,r=e.id,i=e.path,o=function(){return t.getStyle(r,i,"fontSize")};return{getDefaultValue:function(){return o()},getOptions:function(){return function(e){var t=e.translator,n=e.defaultValue,r=[],i=e.theme.getStyle("","","fontSizes");return Array.isArray(i)&&i.length?r.push.apply(r,U(new Set([n].concat(U(i))))):r.push(n),[{value:"ThemeHeader",label:t.get("properties.themeFontSizes"),metaText:t.get("properties.theme"),groupHeader:!0}].concat(U(r.map((function(e){return ee(e)}))),[{value:"DefaultHeader",label:t.get("properties.allFontSizes"),metaText:t.get("properties.default"),groupHeader:!0}],U(Z.map((function(e){return ee(e)}))))}({theme:t,translator:n,defaultValue:o()})}}}function ne(e){var t=e.theme,n=e.translator,r=e.id,i=e.path;return{fontFamily:Q({theme:t,translator:n,id:r,path:i,flags:e.flags}),fontSize:te({theme:t,translator:n,id:r,path:i})}}function re(e){var t=e.theme,n=e.translator,r=e.config,i=void 0===r?{}:r,o=e.flags,a=function(e){var t=e.config,n=void 0===t?{}:t,r=n.id,i=n.paths;return{id:void 0===r?"object":"".concat("object",".").concat(r),paths:Array.isArray(i)?i:[]}}({config:i}),s=a.id,l=a.paths,u={};l.forEach((function(e){for(var r=e.split("."),i=u,a=0;a<r.length;a++){var l=r[a];a===r.length-1?i[l]=ne({theme:t,translator:n,id:s,path:e,flags:o}):void 0===i[l]&&(i[l]={}),i=i[l]}}));var c=function(e){for(var t=e.split("."),n=u,r=0;r<t.length;r++){var i=t[r];if(void 0===n[i])throw new Error("font-resolver: Path '".concat(e,"' could not be resolved."));n=n[i]}return n};return u.getDefaultValue=function(e){return c(e).getDefaultValue()},u.getOptions=function(e){return c(e).getOptions()},u}var ie,oe=Object.prototype.hasOwnProperty,ae=Object.prototype.toString,se=Object.defineProperty,le=Object.getOwnPropertyDescriptor,ue=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===ae.call(e)},ce=function(e){if(!e||"[object Object]"!==ae.call(e))return!1;var t,n=oe.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&oe.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||oe.call(e,t)},pe=function(e,t){se&&"__proto__"===t.name?se(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},fe=function(e,t){if("__proto__"===t){if(!oe.call(e,t))return;if(le)return le(e,t).value}return e[t]};function de(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function he(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function me(){}ie=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<u;++l)if(null!=(t=arguments[l]))for(n in t)r=fe(s,n),s!==(i=fe(t,n))&&(c&&i&&(ce(i)||(o=ue(i)))?(o?(o=!1,a=r&&ue(r)?r:[]):a=r&&ce(r)?r:{},pe(s,{name:n,newValue:e(c,a,i)})):void 0!==i&&pe(s,{name:n,newValue:i}));return s},ie&&ie.__esModule&&Object.prototype.hasOwnProperty.call(ie,"default")&&ie.default;var ge=1/.7,ye="\\s*([+-]?\\d+)\\s*",be="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ve="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",xe=/^#([0-9a-f]{3,8})$/,qe=new RegExp(`^rgb\\(${ye},${ye},${ye}\\)$`),De=new RegExp(`^rgb\\(${ve},${ve},${ve}\\)$`),Se=new RegExp(`^rgba\\(${ye},${ye},${ye},${be}\\)$`),Ee=new RegExp(`^rgba\\(${ve},${ve},${ve},${be}\\)$`),we=new RegExp(`^hsl\\(${be},${ve},${ve}\\)$`),Ce=new RegExp(`^hsla\\(${be},${ve},${ve},${be}\\)$`),Ae={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 Te(){return this.rgb().formatHex()}function Me(){return this.rgb().formatRgb()}function ke(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=xe.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Ie(t):3===n?new Pe(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Oe(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Oe(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=qe.exec(e))?new Pe(t[1],t[2],t[3],1):(t=De.exec(e))?new Pe(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Se.exec(e))?Oe(t[1],t[2],t[3],t[4]):(t=Ee.exec(e))?Oe(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=we.exec(e))?ze(t[1],t[2]/100,t[3]/100,1):(t=Ce.exec(e))?ze(t[1],t[2]/100,t[3]/100,t[4]):Ae.hasOwnProperty(e)?Ie(Ae[e]):"transparent"===e?new Pe(NaN,NaN,NaN,0):null}function Ie(e){return new Pe(e>>16&255,e>>8&255,255&e,1)}function Oe(e,t,n,r){return r<=0&&(e=t=n=NaN),new Pe(e,t,n,r)}function Ne(e){return e instanceof me||(e=ke(e)),e?new Pe((e=e.rgb()).r,e.g,e.b,e.opacity):new Pe}function Le(e,t,n,r){return 1===arguments.length?Ne(e):new Pe(e,t,n,null==r?1:r)}function Pe(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Re(){return`#${je(this.r)}${je(this.g)}${je(this.b)}`}function He(){const e=Fe(this.opacity);return`${1===e?"rgb(":"rgba("}${_e(this.r)}, ${_e(this.g)}, ${_e(this.b)}${1===e?")":`, ${e})`}`}function Fe(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function _e(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function je(e){return((e=_e(e))<16?"0":"")+e.toString(16)}function ze(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Be(e,t,n,r)}function Ve(e){if(e instanceof Be)return new Be(e.h,e.s,e.l,e.opacity);if(e instanceof me||(e=ke(e)),!e)return new Be;if(e instanceof Be)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,l=(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/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Be(a,s,l,e.opacity)}function Be(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function $e(e){return(e=(e||0)%360)<0?e+360:e}function Ue(e){return Math.max(0,Math.min(1,e||0))}function We(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}de(me,ke,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Te,formatHex:Te,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Ve(this).formatHsl()},formatRgb:Me,toString:Me}),de(Pe,Le,he(me,{brighter(e){return e=null==e?ge:Math.pow(ge,e),new Pe(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new Pe(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Pe(_e(this.r),_e(this.g),_e(this.b),Fe(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Re,formatHex:Re,formatHex8:function(){return`#${je(this.r)}${je(this.g)}${je(this.b)}${je(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:He,toString:He})),de(Be,(function(e,t,n,r){return 1===arguments.length?Ve(e):new Be(e,t,n,null==r?1:r)}),he(me,{brighter(e){return e=null==e?ge:Math.pow(ge,e),new Be(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new Be(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Pe(We(e>=240?e-240:e+120,i,r),We(e,i,r),We(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Be($e(this.h),Ue(this.s),Ue(this.l),Fe(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Fe(this.opacity);return`${1===e?"hsl(":"hsla("}${$e(this.h)}, ${100*Ue(this.s)}%, ${100*Ue(this.l)}%${1===e?")":`, ${e})`}`}}));const Ke=Math.PI/180,Ye=180/Math.PI,Ge=4/29,Xe=6/29,Je=3*Xe*Xe;function Qe(e){if(e instanceof Ze)return new Ze(e.l,e.a,e.b,e.opacity);if(e instanceof it)return ot(e);e instanceof Pe||(e=Ne(e));var t,n,r=rt(e.r),i=rt(e.g),o=rt(e.b),a=et((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?t=n=a:(t=et((.4360747*r+.3850649*i+.1430804*o)/.96422),n=et((.0139322*r+.0971045*i+.7141733*o)/.82521)),new Ze(116*a-16,500*(t-a),200*(a-n),e.opacity)}function Ze(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function et(e){return e>.008856451679035631?Math.pow(e,1/3):e/Je+Ge}function tt(e){return e>Xe?e*e*e:Je*(e-Ge)}function nt(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function rt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function it(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function ot(e){if(isNaN(e.h))return new Ze(e.l,0,0,e.opacity);var t=e.h*Ke;return new Ze(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}de(Ze,(function(e,t,n,r){return 1===arguments.length?Qe(e):new Ze(e,t,n,null==r?1:r)}),he(me,{brighter(e){return new Ze(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new Ze(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new Pe(nt(3.1338561*(t=.96422*tt(t))-1.6168667*(e=1*tt(e))-.4906146*(n=.82521*tt(n))),nt(-.9787684*t+1.9161415*e+.033454*n),nt(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),de(it,(function(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof it)return new it(e.h,e.c,e.l,e.opacity);if(e instanceof Ze||(e=Qe(e)),0===e.a&&0===e.b)return new it(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Ye;return new it(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new it(e,t,n,null==r?1:r)}),he(me,{brighter(e){return new it(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new it(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return ot(this).rgb()}}));var at=e=>()=>e;function st(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):at(isNaN(e)?t:e)}function lt(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 e(t){var n=function(e){return 1==(e=+e)?st: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):at(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=Le(e)).r,(t=Le(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=st(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);var ut,ct=["__proto__","constructor"];function pt(e,t,n){if(void 0!==e&&void 0!==t){var r=t.split("."),i=r[r.length-1];if(!ct.some((function(e){return r.includes(e)}))){for(var 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 ft(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 dt(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=mt)):void 0===t&&(t=ht);for(var n,r,i,o,a,s=new bt(e),l=[s];n=l.pop();)if((i=t(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;o>=0;--o)l.push(r=i[o]=new bt(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(yt)}function ht(e){return e.children}function mt(e){return Array.isArray(e)?e[1]:null}function gt(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function yt(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function bt(e){this.data=e,this.depth=this.height=0,this.parent=null}bt.prototype=dt.prototype={constructor:bt,count:function(){return this.eachAfter(ft)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,i,o=this,a=[o],s=[],l=-1;o=a.pop();)if(s.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r]);for(;o=s.pop();)e.call(t,o,++l,this);return this},eachBefore:function(e,t){for(var n,r,i=this,o=[i],a=-1;i=o.pop();)if(e.call(t,i,++a,this),n=i.children)for(r=n.length-1;r>=0;--r)o.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return dt(this).eachBefore(gt)},[Symbol.iterator]:function*(){var e,t,n,r,i=this,o=[i];do{for(e=o.reverse(),o=[];i=e.pop();)if(yield i,t=i.children)for(n=0,r=t.length;n<r;++n)o.push(t[n])}while(o.length)}},ut=function(e){
|
|
23
23
|
/*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
|
|
24
|
-
e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,i,o,a,s,l,u,c,p,d=e.length,f=e.search(/[0-9\-\+#]/),h=f>0?e.substring(0,f):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),y=d-g,b=e.substring(y,y+1),v=y+("."===b||","===b?1:0),x=g>0?e.substring(v,d):"";if(n=(t="-"===(e=e.substring(f,v)).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"),(!(u=t.split("."))[1]||u[1]&&u[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(;u[0].length<e[0].length-a;)u[0]="0"+u[0];else 0==+u[0]&&(u[0]="");if((t=t.split("."))[0]=u[0],l=c[1]&&c[c.length-1].length){for(m="",y=(p=t[0]).length%l,d=p.length,v=0;v<d;v++)m+=p.charAt(v),!((v-y+1)%l)&&v<d-l&&(m+=o);t[0]=m}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),h+(n?"-":"")+r+x}},Ze({exports:{}});var ut="'Source Sans Pro', 'Arial', 'sans-serif'",ct="#333333",pt="#595959",dt="#737373",ft="#cccccc",ht="#e6e6e6";function mt(e){var t={};return[].concat(U(e),U([["","","color"],["object","","fontFamily"],["object","axis.label.name","color",pt],["object","axis.label.name","fontFamily",ut],["object","axis.label.name","fontSize","12px"],["object","axis.line.major","color",ft],["object","axis.line.minor","color",ht],["object","axis.title","color"],["object","axis.title","fontFamily",ut],["object","axis.title","fontSize","13px"],["object","grid.line.highContrast","color",ht],["object","grid.line.major","color",ft],["object","grid.line.minor","color",ht],["object","label.value","color",pt],["object","label.value","fontFamily",ut],["object","label.value","fontSize","12px"],[!1,"label.value","darkColor",pt],[!1,"label.value","lightColor",ht],["object","outOfRange","color","#999"],["object","legend.title","color",ct],["object","legend.title","fontFamily",ut],["object","legend.title","fontSize","15px"],["object","legend.label","color",pt],["object","legend.label","fontFamily",ut],["object","legend.label","fontSize","13px"],["object","referenceLine.label.name","color",ct],["object","referenceLine.label.name","fontFamily",ut],["object","referenceLine.label.name","fontSize","12px"],["object","referenceLine.outOfBounds","color",ht],["object","referenceLine.outOfBounds","fontFamily",ut],["object","referenceLine.outOfBounds","fontSize","12px"],["object","referenceLine.outOfBounds","backgroundColor",dt,function(e){return"transparent"===e?dt:e}]])).reduce((function(e,n){var r="".concat(n[0],"-").concat(n[1],"-").concat(n[2],"}");return t[r]||(t[r]=!0,e.push(n)),e}),[]).sort((function(e,t){return(e[0].split?e[0].split(".").length:0)-(t[0].split?t[0].split(".").length:0)}))}var gt=function(e){return e};function yt(e){var t=e.theme,n=e.id,r=e.transform,i=e.extend,o=e.matrix,a={},s=r.reduce((function(e,t){var n=$(t,2),r=n[0],i=n[1];return e[r]=i,e}),{});return o.forEach((function(e){var r=$(e,5),i=r[0],o=r[1],l=r[2],u=r[3],c=r[4],p=void 0===c?function(e){return e}:c,d=function(e){var t=e.theme,n=e.base,r=e.path,i=e.attribute,o=e.defaultValue,a=void 0===o?void 0:o;if(!t||!1===n)return a;var s=t.getStyle(n,r,i);return void 0===s?a:s}({theme:t,base:"object"===i&&n?"".concat("object",".").concat(n):i,path:o,attribute:l,defaultValue:u}),f=(s["".concat(o,".").concat(l)]||gt)(p(d));tt(a,[o,l].filter(Boolean).join("."),f)})),i.forEach((function(e){var t=$(e,2),n=t[0],r=t[1];tt(a,n,r)})),a}var bt=["American Typewriter, serif","Andalé Mono, monospace","Arial Black, sans-serif","Arial, sans-serif","Bradley Hand, cursive","Brush Script MT, cursive","Comic Sans MS, cursive","Courier, monospace","Didot, serif","Georgia, serif","Impact, sans-serif","Lucida Console, monospace","Luminari, fantasy","Monaco, monospace","QlikView Sans, sans-serif","Source Sans Pro, sans-serif","Tahoma, sans-serif","Times New Roman, serif","Trebuchet MS, sans-serif","Verdana, sans-serif"],vt=["Abril Fatface, serif","Bangers, fantasy","Bebas Neue, sans serif","EB Garamond, serif","Fredoka One, fantasy","Graduate, fantasy","Gravitas One, serif","Indie Flower, fantasy","Inter, sans-serif","Lobster, fantasy","Montserrat, sans-serif","Nixie One, sans-serif","Noto Sans, sans-serif","Open Sans, sans-serif","PT Serif, serif","Pacifico, cursive","Permanent Marker, fantasy","QlikView Sans, sans-serif","Raleway, sans-serif","Rammetto One, fantasy","Roboto, sans-serif","Source Sans Pro, sans-serif","Titan One, fantasy","Yanone Kaffeesatz, sans-serif"];var xt=function(e){return{value:e,label:e.charAt(0).toUpperCase()+e.slice(1),groupHeader:!1,disabled:!1,styles:{fontFamily:e}}};function qt(e){var t=e.theme,n=e.translator,r=e.defaultValue,i=e.flags,o=[],a=t.getStyle("","","fontFamilies");return Array.isArray(a)&&a.length?o.push.apply(o,U(new Set([r].concat(U(a.map((function(e){return e.split(",").map((function(e){return e.trim()})).map((function(e){return e.replace(/\s+/g," ").trim()})).filter(Boolean).join(", ")}))))))):o.push(r),[{value:"ThemeHeader",label:n.get("properties.themeFonts"),metaText:n.get("properties.theme"),groupHeader:!0}].concat(U(o.map((function(e){return xt(e)}))),[{value:"DefaultHeader",label:n.get("properties.allFonts"),metaText:n.get("properties.default"),groupHeader:!0}],U(function(e){return null!=e&&e.isEnabled("PS_20852_WYSIWYG_FONT_SUPPORT")?vt:bt}(i).map((function(e){return xt(e)}))))}function Dt(e){var t=e.theme,n=e.translator,r=e.id,i=e.path,o=e.flags,a=function(){return t.getStyle(r,i,"fontFamily")};return{getDefaultValue:function(){return a()},getOptions:function(){return qt({theme:t,translator:n,defaultValue:a(),flags:o})}}}var Et=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],St=function(e){return{value:e,label:e,groupHeader:!1,disabled:!1}};function Ct(e){var t=e.theme,n=e.translator,r=e.id,i=e.path,o=function(){return t.getStyle(r,i,"fontSize")};return{getDefaultValue:function(){return o()},getOptions:function(){return function(e){var t=e.translator,n=e.defaultValue,r=[],i=e.theme.getStyle("","","fontSizes");return Array.isArray(i)&&i.length?r.push.apply(r,U(new Set([n].concat(U(i))))):r.push(n),[{value:"ThemeHeader",label:t.get("properties.themeFontSizes"),metaText:t.get("properties.theme"),groupHeader:!0}].concat(U(r.map((function(e){return St(e)}))),[{value:"DefaultHeader",label:t.get("properties.allFontSizes"),metaText:t.get("properties.default"),groupHeader:!0}],U(Et.map((function(e){return St(e)}))))}({theme:t,translator:n,defaultValue:o()})}}}function wt(e){var t=e.theme,n=e.translator,r=e.id,i=e.path;return{fontFamily:Dt({theme:t,translator:n,id:r,path:i,flags:e.flags}),fontSize:Ct({theme:t,translator:n,id:r,path:i})}}function At(e){var t=e.theme,n=e.translator,r=e.config,i=void 0===r?{}:r,o=e.flags,a=function(e){var t=e.config,n=void 0===t?{}:t,r=n.id,i=n.paths;return{id:void 0===r?"object":"".concat("object",".").concat(r),paths:Array.isArray(i)?i:[]}}({config:i}),s=a.id,l=a.paths,u={};l.forEach((function(e){for(var r=e.split("."),i=u,a=0;a<r.length;a++){var l=r[a];a===r.length-1?i[l]=wt({theme:t,translator:n,id:s,path:e,flags:o}):void 0===i[l]&&(i[l]={}),i=i[l]}}));var c=function(e){for(var t=e.split("."),n=u,r=0;r<t.length;r++){var i=t[r];if(void 0===n[i])throw new Error("font-resolver: Path '".concat(e,"' could not be resolved."));n=n[i]}return n};return u.getDefaultValue=function(e){return c(e).getDefaultValue()},u.getOptions=function(e){return c(e).getOptions()},u}var Tt=Object.prototype.hasOwnProperty,Mt=Object.prototype.toString,It=Object.defineProperty,kt=Object.getOwnPropertyDescriptor,Ot=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Mt.call(e)},Lt=function(e){if(!e||"[object Object]"!==Mt.call(e))return!1;var t,n=Tt.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Tt.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||Tt.call(e,t)},Nt=function(e,t){It&&"__proto__"===t.name?It(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Pt=function(e,t){if("__proto__"===t){if(!Tt.call(e,t))return;if(kt)return kt(e,t).value}return e[t]},Rt=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<u;++l)if(null!=(t=arguments[l]))for(n in t)r=Pt(s,n),s!==(i=Pt(t,n))&&(c&&i&&(Lt(i)||(o=Ot(i)))?(o?(o=!1,a=r&&Ot(r)?r:[]):a=r&&Lt(r)?r:{},Nt(s,{name:n,newValue:e(c,a,i)})):void 0!==i&&Nt(s,{name:n,newValue:i}));return s},Ht=C(Rt);const Ft=/xyz/.test((()=>{}))?/\b_super\b/:/.*/,_t=function(){};_t.extend=function e(t,n){const r=this.prototype;"string"!=typeof t&&(n=t,t="Class");const i=Object.create(this.prototype);for(const e in n)i[e]="function"==typeof n[e]&&"function"==typeof r[e]&&Ft.test(n[e])?function(e,t){return function(){const n=this._super;this._super=r[e];const i=t.apply(this,arguments);return this._super=n,i}}(e,n[e]):n[e];if(!/^[_a-z][_a-z\d]*$/i.test(t))throw new Error("Invalid subclass name. Alphanumericals only.");const o=new Function(`return (function ${t}(){ typeof this.init === 'function' && this.init.apply(this, [].slice.call(arguments)) });`)();return o.prototype=i,o.prototype.constructor=o,o.extend=e,o};const jt={getChar(e){let t,n=e;return n>9?(t=65+n-10,t>90&&(t+=6)):n=`${n}`.charCodeAt(0),[48,111,79,105,73,108].indexOf(t)>-1?this.getChar(n+1):String.fromCharCode(t)},base62(e){const t=this.getChar(e%62),n=Math.floor(e/62);return n>0?this.base62(n)+t:t},id(){return this.base62(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};function zt(){return jt.id()}const Vt="scrollbar";function Bt(e,t,n){return"y"===e?$t(t,n):function(e){return"far"===e?"top":"bottom"}(t)}function $t(e,t){const n=e||"near";return t&&"near"===n||!t&&"far"===n?"right":"left"}var Ut={getAxisDock:Bt,getOppositeAxisDock:function(e,t,n){return Bt(e,"far"===t?"near":"far",n)},getYAxisDock:$t};const Wt=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),Kt=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞יִײַ-ﬨשׁ-ﭏ]"),Gt=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]");function Yt(e){return Wt.test(e)}function Xt(e){return Kt.test(e)||Gt.test(e)}var Jt={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),detectTextDirection:function(e){const t=e?e.length:0;let n,r;for(n=0;n<t;n++){if(r=e[n],Yt(r))return"ltr";if(Xt(r))return"rtl"}return"ltr"}};var Qt={lineSettings:function(e,t){var n;const 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 Ht(!0,r,e||{})},lineLabelSettings:function(e,t){const n=t&&t.chartID;let r=t.theme.getStyle(n,"referenceLine.label.name","color");const 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"),Ht(!0,{value:0,line:{stroke:"transparent"},label:{align:"center",vAlign:"middle",text:"",fill:r,fontFamily:o,fontSize:i,maxWidthPx:135}},e||{})},isVisible:e=>e&&!1!==e.show&&0!==e.show&&"0"!==e.show&&void 0!==e.refLineExpr,getRefLineTitle:function({refLine:e,label:t,valueString:n}){return!1!==e.showValue?!1!==e.showLabel?`${t} ${Jt.lrm}(${n})${Jt.lrm}`:`${Jt.lrm}(${n})${Jt.lrm}`:!1!==e.showLabel?t:""}};const Zt={SHOW_AXIS_LABELS_OPTIONS:["all","labels"],SHOW_TITLE_OPTIONS:["all","title"],HORIZONTAL:"horizontal",VERTICAL:"vertical",LAYOUTSETTINGS:{lasso:{displayOrder:1e4},rangeDim:{displayOrder:1e4},rangeMeasure:{displayOrder:1e4},rangeMinor:{displayOrder:1e4},scrollBar:{minimumLayoutMode:"SPARK",prioOrder:-1,displayOrder:100},refLines:{layout:{minimumLayoutMode:"SPARK",prioOrder:60,displayOrder:1110}},measureAxisTitle:{minimumLayoutMode:"XSMALL",prioOrder:30,displayOrder:90},dimensionAxisTitle:{minimumLayoutMode:"XSMALL",prioOrder:30,displayOrder:90},measureAxis:{minimumLayoutMode:"XSMALL",prioOrder:10,displayOrder:80},dimensionAxis:{minimumLayoutMode:"XSMALL",prioOrder:10,displayOrder:80},gridLines:{minimumLayoutMode:"XSMALL",displayOrder:-100},refLinesLabels:{minimumLayoutMode:"SMALL",prioOrder:60,displayOrder:0}}};Zt.DEFAULT_CHART_ORIENTATION=Zt.HORIZONTAL;const en=100;function tn(e,t){const n=t||{},r=n.measureAxisProperties||{},i=n.dimensionAxisProperties||{},o=n.orientation||Zt.DEFAULT_CHART_ORIENTATION,a=o===Zt.HORIZONTAL,s=a?"x":"y",l=a?"y":"x",u=Zt.SHOW_AXIS_LABELS_OPTIONS,c=Zt.SHOW_TITLE_OPTIONS,p=u.includes(r.show),d=!!n.measureTitleText&&c.includes(r.show),f=n.includeDimensionAxis&&u.includes(i.show),h=n.includeDimensionAxis&&!!n.dimensionTitleText&&c.includes(i.show),m=n.gridlines&&!(!n.gridlines.auto&&0===n.gridlines.spacing),g=n.refLines&&n.refLines.some((e=>e.show)),y=[];if(p&&function(e,t,n,r){let i={scale:"measure",settings:t.axisLabelStyle||{},forceBounds:r&&!r.autoMinMax&&r.showBounds};i=Ht(i,Zt.LAYOUTSETTINGS.measureAxis);const o=rn(t,n);e.addComponent(`${n}-axis`,i,o)}(e,n,s,r),d&&function(e,t,n){let r={text:t.measureTitleText,style:t.axisTitleStyle||{}};r=Ht(r,Zt.LAYOUTSETTINGS.measureAxisTitle);const i=function(e,t){return rn(e,t)}(t,n);e.addComponent(`${n}-axis-title`,r,i)}(e,n,s),function(e,t,n,r){let i=t.measureScaleSettings;const o={isRtl:t.isRtl,source:t.measureSource,orientation:n,measureAxisProperties:r};r&&r.spacing>0&&(i=Ht(!0,i||{},{component:{ticks:{distance:r.spacing*en}}}));e.addScale("measure-scale",i,o)}(e,n,o,r),f&&function(e,t,n){let r={scale:"dimension",settings:t.axisLabelStyle||{}};r=Ht(r,Zt.LAYOUTSETTINGS.dimensionAxis);const i=on(t,n);Ht(!0,r,t.dimensionAxisSettings||{}),e.addComponent(`${n}-axis`,r,i)}(e,n,l),h&&function(e,t,n){let r={text:t.dimensionTitleText,style:t.axisTitleStyle||{}};r=Ht(r,Zt.LAYOUTSETTINGS.dimensionAxisTitle);const i=function(e,t){return on(e,t)}(t,n);e.addComponent(`${n}-axis-title`,r,i)}(e,n,l),n.includeDimensionAxis&&function(e,t,n){const r={isRtl:t.isRtl,source:t.dimensionSource,orientation:n===Zt.HORIZONTAL?Zt.VERTICAL:Zt.HORIZONTAL};e.addScale("dimension-scale",t.dimensionScaleSettings,r)}(e,n,o),m&&function(e,t,n){let r={ticks:{show:!0},minorTicks:{show:!t.auto&&!t.auto&&3===t.spacing}};r=Ht(r,Zt.LAYOUTSETTINGS.gridLines),r[n]={scale:"measure"},e.addComponent("grid-line",r)}(e,n.gridlines,s),n.hasNavigation&&function(e,t,n,r){const i=e.getSettings();i.scroll={dimension:{viewSize:n.scrollSettings&&n.scrollSettings.viewSize||0,max:n.scrollSettings&&n.scrollSettings.max||0}};const o={isRtl:n.isRtl,chartID:n.chartID,isHorizontal:!r},a=Ht({},Zt.LAYOUTSETTINGS.scrollBar);e.addComponent("scrollbar",a,o),nn(t,function(e){function t(t,n){if(!n||!e())return!1;const r={x:n.center.x-n.deltaX,y:n.center.y-n.deltaY};return this.chart.componentsFromPoint(r).some((e=>e.settings.key===Vt))}const n={type:"Tap",options:{enable:t},events:{tap(e){this.chart.component(Vt).emit("tap",e)}}},r={type:"Pan",options:{enable:t},events:{panstart(e){this.chart.component(Vt).emit("panStart",e)},pan(e){this.chart.component(Vt).emit("panMove",e)},panend(e){this.chart.component(Vt).emit("panEnd",e)},pancancel(e){this.chart.component(Vt).emit("panCancel",e)}}};return[n,r]}(n.isNavigationEnabledFn))}(e,y,n,a),g&&function(e,t,n,r){const i=Ut.getAxisDock(n,r.dock,t.isRtl);let o={key:"ref-line",style:{oob:{show:!1}},lines:{x:[],y:[]}};o=Ht(o,Zt.LAYOUTSETTINGS.refLines);let a={key:`ref-line-labels-${zt()}`,require:["renderer","chart"],dock:Ut.getOppositeAxisDock(n,r.dock,t.isRtl),preferredSize(){if("x"===n)return 26;const t=this.renderer.measureText,r=this.chart.formatter({data:e.settings.scales.measure.data}),i=a.lines.y.map((e=>{const n=!1!==e.label.showValue?`(${r(e.value)})`:"",i=`${e.label.text} ${n}`,o=e.label.text&&n?` ${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];for(let e=1;e<i.length;e++)i[e].wanted>o.wanted&&(o.wanted=i[e].wanted),i[e].required>o.required&&(o.required=i[e].required);const s=12;return o.required+s>100?o.required+s:Math.min(o.wanted+s,100)},lines:{x:[],y:[]}};a=Ht(a,Zt.LAYOUTSETTINGS.refLinesLabels),t.refLines.forEach((r=>{if(!r.show)return;const s=r.refLineExpr&&r.refLineExpr.value,l=Ht(!0,{},t,{paletteColor:r.paletteColor,style:r.style,chartID:e.options.chartID}),u=Qt.lineSettings({scale:"measure",dir:n,value:s},l);o.lines[n].push(u);const c=Qt.lineLabelSettings({scale:"measure",value:s,label:{text:!1!==r.showLabel?r.label:"",showValue:!1!==r.showValue}},l);"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){const n={brushKey:t.brushKey,brushComponents:t.brushComponents,brushData:t.brushData};e.addComponent("lasso",Zt.LAYOUTSETTINGS.lasso,n)}(e,n.lasso||{})}if(n.enableDimRange&&n.includeDimensionAxis&&n.selectionsEnabled){!function(e,t,n,r,i){let o={key:"rangeDim"};o=Ht(o,Zt.LAYOUTSETTINGS.rangeDim);const 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,on(n,l).dock,n.isRtl)}if(n.enableMeasureRange&&n.selectionsEnabled){!function(e,t,n,r,i){let o={key:"rangeMeasure"};o=Ht(o,Zt.LAYOUTSETTINGS.rangeMeasure);const 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,rn(n,s).dock,n.isRtl)}if(n.enableAreaRange&&n.selectionsEnabled){!function(e,t,n,r,i){let o={key:"rangeMinor"};o=Ht(o,Zt.LAYOUTSETTINGS.rangeMinor);const 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,on(n,l).dock,n.isRtl)}n.brushActions&&nn(y,n.brushActions),y.length&&function(e,t){e.addInteraction({},{gestures:t})}(e,y)}function nn(e,t){t.forEach((t=>{e.push(t)}))}function rn(e,t){return{dock:e.measureAxisProperties&&e.measureAxisProperties.dock,direction:t,isRtl:e.isRtl}}function on(e,t){return{dock:e.dimensionAxisProperties&&e.dimensionAxisProperties.dock,direction:t,isRtl:e.isRtl}}function an(e,t){const 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 Ht(!0,{},o,e||{})}function sn(e){var t;if(null!=e&&null!==(t=e.isEnabled)&&void 0!==t&&t.call(e,"IM_5791_SVG_LABEL_RENDERING"))return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?void 0:"svg"}function ln(e,t){const 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"),l=t.theme.getStyle(n,"axis.title","color"),u=t.theme.getStyle(n,"axis.label.name","color"),c=t.theme.getStyle(n,"axis.label.name","fontSize"),p=t.theme.getStyle(n,"axis.title","fontFamily"),d=t.theme.getStyle(n,"axis.label.name","fontFamily"),f={key:"axis",type:"axis",renderer:sn(t.flags),dock:Ut.getAxisDock(i,r,o),brush:{trigger:[],consume:[]},settings:{title:{fontSize:s,fontFamily:p,fill:l},line:{show:!0,strokeWidth:1,stroke:a},labels:{fill:u,fontSize:c,fontFamily:d,tiltAngle:o?-40:40,maxEdgeBleed:75,maxSize:150,mode:"auto"},ticks:{stroke:a},minorTicks:{stroke:a}}},h=Ht(!0,{},f,e||{});return h.brush.consume.forEach((e=>{e.style.active.strokeWidth=0})),h}function un(e,t){const 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"),l=t.theme.getStyle(n,"axis.title","fontFamily"),u={key:"text",type:"text",dock:Ut.getAxisDock(i,r,o)||"bottom",displayOrder:0,style:{text:{fontSize:a,fontFamily:l,fill:s}}};return Ht(!0,{},u,e||{})}an.measureScale=function(e,t){let n=(t||{}).source||[];"string"==typeof n&&(n=[n]);const r={name:"measure",component:{expand:.1,data:{fields:n.map((e=>({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));const o=an(Ht(!0,r,e||{}),t);return!(e&&e.component&&void 0!==e.component.invert)&&t&&"vertical"===t.orientation&&(o.component.invert=!o.component.invert),o},an.dimensionScale=function(e,t){const n={name:"dimension",component:{trackBy:"id",type:"band",data:{extract:{field:t&&t.source||"",props:{label:e=>e.qText||""}}},label:e=>e.datum.label.value}};return an(Ht(!0,n,e||{}),t)},ln.xAxis=function(e,t){return ln(Ht(!0,{key:"x-axis",scale:"x"},e||{}),t)},ln.yAxis=function(e,t){const n=t&&t.dock,r=t&&t.isRtl,i={key:"y-axis",scale:"y",dock:Ut.getYAxisDock(n,r)};return ln(Ht(!0,i,e||{}),t)},un.xAxisTitle=function(e,t){return un(Ht(!0,{key:"x-axis-title"},e||{}),t)},un.yAxisTitle=function(e,t){const n=t&&t.dock,r=t&&t.isRtl,i={key:"y-axis-title",dock:Ut.getYAxisDock(n,r)||"left"};return un(Ht(!0,i,e||{}),t)};var cn={getBublesAlign:function(e,t,n){let r=e&&"far"!==t||!e&&"far"===t;return!e&&n&&(r=!r),r?"start":"end"},getDock:function(e,t){const n=[];let r;return e&&n.push(`@${e}`),t&&n.push(`@${t}`),n.length&&(r=n.join(",")),r}};const pn={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 dn(){return pn}function fn(e){const t=e.data.end;return e.dataset(t.source.key).field(t.source.field).formatter()(t.value)}dn.getLayoutModeKeys=function(){const e=[];let t;for(t in pn)e.push(t);return e};const hn={left:"left",right:"right",up:"top",down:"bottom"};function mn(e,t,n){switch(e){case"scale":return an(t,n);case"measure-scale":return an.measureScale(t,n);case"dimension-scale":return an.dimensionScale(t,n);case"axis":return ln(t,n);case"box-marker":return function(e){return Ht(!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 Ht(!0,{},{key:"point-marker",type:"point-marker",settings:{},brush:{trigger:[],consume:[]}},e||{})}(t);case"scrollbar":return function(e,t){const 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 Ht(!0,{},o,e||{})}(t,n);case"text":return un(t,n);case"lasso":return function(e,t){const 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((e=>{o.settings.brush.components.push({contexts:n?[n]:void 0,key:e,data:i})})),Ht(!0,{},o,e||{})}(t,n);case"range":return function(e,t){const n=t&&t.brushKey,r=t&&t.brushAxis,i=t&&t.brushArea,o=t&&t.brushScale,a=t&&t.isHorizontal,s=t&&t.dock,l=t&&t.isRtl,u={type:"brush-range",key:"range",displayOrder:99,dock:cn.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:cn.getBublesAlign(a,s,l)}}};return Ht(!0,{},u,e||{})}(t,n);case"range-area":return function(e,t){const 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,l=t&&t.dock,u=t&&t.isRtl,c=t&&t.chartInstance;let p=!0;const d={type:"brush-area-dir",key:"area",displayOrder:99,dock:cn.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:cn.getBublesAlign(s,l,u),label:e=>p?(p=!1,c.dataset(e.binStart.source.key).field(e.binStart.source.field).formatter()(e.binStart.value)):(p=!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((e=>{d.settings.brush.components.push({contexts:n?[n]:void 0,key:e,data:o,action:"add"})})),Ht(!0,{},d,e||{})}(t,n);case"categorical-legend":return function(e,t){const n=t&&t.chartID,r=t&&t.isRtl;let i=t&&t.dock||"auto";const o=t&&t.show;"auto"===i&&(i=t.chartHeight/t.chartWidth<1?r?"left":"right":"bottom");const a=t.theme.getStyle(n,"legend.title","color"),s=t.theme.getStyle(n,"legend.title","fontSize"),l=t.theme.getStyle(n,"legend.label","color"),u=t.theme.getStyle(n,"legend.label","fontSize"),c=t.theme.getStyle(n,"legend.title","fontFamily"),p=t.theme.getStyle(n,"legend.label","fontFamily"),d={key:"legend",type:"legend-cat",renderer:sn(t.flags),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:(e,t)=>e("span",{style:{pointerEvents:"none"},class:["lui-button__icon","lui-icon",`lui-icon--triangle-${hn[t.direction]}`].join(" ")})}}},style:{item:{label:{fontSize:u,fontFamily:p,fill:l,lineHeight:1,wordBreak:"break-word"},margin:{top:5,left:10,right:10,bottom:10},shape:{type:t.type?t.type:"square",size:3*parseInt(u,10)/4}},title:{show:t.showTitle,fontSize:s,fontFamily:c,fill:a}}};return Ht(!0,{},d,e)}(t,n);case"sequential-legend":return function(e,t){const n=t&&t.chartID,r=t&&t.isRtl;let i=t.dock||"auto";"auto"===i&&(i=t.chartHeight<t.chartWidth?r?"left":"right":"bottom");const o=t.theme.getStyle(n,"legend.title","color"),a=t.theme.getStyle(n,"legend.title","fontSize"),s=t.theme.getStyle(n,"legend.title","fontFamily"),l=t.theme.getStyle(n,"legend.label","color"),u=t.theme.getStyle(n,"legend.label","fontSize"),c=t.theme.getStyle(n,"legend.label","fontFamily");function p(e){switch(e){case"left":return 0;case"right":return 1;default:return.5}}const d={key:"seqlegend",type:"legend-seq",dock:i,displayOrder:200,minimumLayoutMode:"MEDIUM",prioOrder:0,settings:{align:p(r?"right":"left"),major:{invert:"left"===i||"right"===i||r},title:{show:t.showTitle,fontSize:a,fontFamily:s,fill:o},tick:{fill:l,fontSize:u,fontFamily:c}}};return Ht(!0,{},d,e)}(t,n);case"x-axis":return ln.xAxis(t,n);case"y-axis":return ln.yAxis(t,n);case"x-axis-title":return un.xAxisTitle(t,n);case"y-axis-title":return un.yAxisTitle(t,n);case"grid-line":return function(e,t){const n=t&&t.chartID,r=t.theme.getStyle(n,"grid.line.major","color");return Ht(!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){const n=t&&t.gestures||[];return Ht(!0,{},{type:"hammer",key:"hammered",gestures:n},e||{})}(t,n);case"ref-line":return function(e,t){const n=t&&t.chartID,r=t.theme.getStyle(n,"referenceLine.outOfBounds","color"),i=t.theme.getStyle(n,"referenceLine.outOfBounds","backgroundColor");return Ht(!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 Ht(!0,{},{type:"event-area",key:"event-area"},e||{})}(t);case"labels":return function(e,t){const n=t&&t.chartID,r=t.theme.getStyle(n,"label.value","color"),i=t.theme.getStyle(n,"label.value","fontSize"),o=t.theme.getStyle(n,"label.value","fontFamily"),a={key:"labels",type:"labels",renderer:sn(t.flags),displayOrder:1,settings:{sources:[{component:"box-marker",selector:"rect",strategy:{type:"bar",settings:{direction:"up",fontFamily:o,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:fn}]}}}]}};return Ht(!0,{},a,e||{})}(t,n);default:return}}function gn(e){this.options=e||{},this.settings={dockLayout:{layoutModes:dn()},components:[],scales:{}}}gn.prototype.addComponent=function(e,t,n){const r=mn(e,t,Ht(!0,{},this.options,n||{}));return this.settings.components.push(r),r},gn.prototype.addInteraction=function(e,t){const n=mn("interaction",e,Ht(!0,{},this.options,t||{}));return this.settings.interactions||(this.settings.interactions=[]),this.settings.interactions.push(n),n},gn.prototype.addScale=function(e,t,n){const r=mn(e,t,Ht(!0,{},this.options,n||{}));this.settings.scales[r.name]=r.component},gn.prototype.getSettings=function(){return this.settings},gn.prototype.getComponent=function(e){return this.settings.components.filter((t=>t.key===e))[0]},gn.prototype.addPreset=function(e,t){!function(e,t,n){if("dimension-measure-chart"!==e)throw Error("There is no chart preset with that type");tn(t,n)}(e,this,t)},gn.validateComponentKeys=function(e){const t={};return e.map((e=>{const n=e.key;return n?t[n]?`Duplicate key for component ${e.type}`:(t[n]=!0,null):`Missing key for component ${e.type}`})).filter((e=>!!e))},gn.create=function(e){return new gn(e)},gn.createComponent=mn;const yn={CENTER:0,BOTTOM:1};var bn={DISCLAIMERS:[{label:"NoDataExist",alignment:yn.CENTER,default:!0},{label:"RequireNumericDimension",alignment:yn.CENTER,default:!1},{label:"OnlyNanData",alignment:yn.CENTER,default:!0},{label:"OnlyNegativeOrZeroValues",alignment:yn.CENTER,default:!1},{label:"LimitedData",alignment:yn.BOTTOM,default:!1},{label:"OnlyNanColor",alignment:yn.BOTTOM,default:!1},{label:"NegativeOrZeroValues",alignment:yn.BOTTOM,default:!1},{label:"DataRangeIncludingZero",alignment:yn.BOTTOM,default:!1}],ALIGNMENT:yn};const vn={getNoDataExistAttribute:e=>e.qSize.qcy*e.qSize.qcx==0,getLimitedDataAttribute(e,t){let n,r=!1;var i;return e?void 0!==t.explicitLimitedData?r=!0===t.explicitLimitedData:e.qDataPages&&e.qDataPages[0]?r=!t.paging&&e.qSize.qcy>e.qDataPages[0].qMatrix.length:(i=e.qStackedDataPages)&&i[0]&&i[0].qData[0]&&i[0].qData[0].qSubNodes&&(n=t.maxNbrOfDimensions?t.maxNbrOfDimensions:2,r=e.qDimensionInfo.length>=n?e.qStackedDataPages[0].qData[0].qSubNodes.some((e=>e.qDown>0)):e.qStackedDataPages[0].qData[0].qSubNodes.length<e.qStackedDataPages[0].qArea.qHeight):r=!0===t.explicitLimitedData,r},getNegativeOrZeroValuesAttribute:(e,t)=>!t.supportNegative&&e.qMeasureInfo.some((e=>e.qMin<=0)),getOnlyNegativeOrZeroValuesAttribute:(e,t)=>!t.supportNegative&&e.qMeasureInfo.every((e=>e.qMax<=0&&e.qMax>=e.qMin))||0===e.qSize.qcy,getOnlyNanDataAttribute:(e,t)=>void 0!==t.explicitOnlyNanData?t.explicitOnlyNanData:e.qMeasureInfo.every((e=>e.qMax<e.qMin||"NaN"===e.qMax)),getDataRangeIncludingZeroAttribute:(e,t)=>!t.supportRangeOverZero&&function(e,t){const n=t.length;let r,i,o,a,s;for(e&&(i=!(e.autoMinMax||"min"!==e.minMax&&"minMax"!==e.minMax||null===e.min||Number.isNaN(+e.min)),o=!(e.autoMinMax||"max"!==e.minMax&&"minMax"!==e.minMax||null===e.max||Number.isNaN(+e.max))),a=Number.MAX_VALUE,s=-Number.MAX_VALUE,r=0;r<n;r++)if(a=Math.min(a,t[r].qMin),s=Math.max(s,t[r].qMax),a<=0&&s>=0)return!0;return a=i?e.min:a,s=o?e.max:s,a<=0&&s>=0}(e.measureAxis,e.qHyperCube.qMeasureInfo),applyAttributes(e,t){const n=e||{},r={};return n.supportNegative=void 0===n.supportNegative||n.supportNegative,n.supportRangeOverZero=void 0===n.supportRangeOverZero||n.supportRangeOverZero,bn.DISCLAIMERS.forEach((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 xn(e,t,n){this.disclaimersConfig=e,this.dataAttributes=t,this.supportedDisclaimers=n}function qn(e,t){return e&&t&&t[e]}function Dn(e){this.environment=e,this.clear()}xn.prototype.isValidAndSupported=function(e,t){return qn(e.label,this.dataAttributes)&&(e.default||qn(e.label,this.supportedDisclaimers))&&void 0!==t&&e.alignment===t},xn.prototype.isAnyValidDisclaimer=function(e){let t=!1;const n=this;return this.disclaimersConfig.forEach((r=>{n.isValidAndSupported(r,e)&&(t=!0)})),t},xn.prototype.getMessage=function(e,t){let n="";const r=this;return t&&this.disclaimersConfig.forEach((i=>{r.isValidAndSupported(i,e)&&(n+=`${t.get(`Object.Disclaimer.${i.label}`)} `)})),n},Dn.ERRORS={SET:"Calling Disclaimer.set() without attributes",DISPLAY:"Calling Disclaimer.display() before attributes are applied"},Dn._applyDefaultSupport=function(e,t){let n=e;return n||(n={}),t.forEach((e=>{void 0===n[e.label]&&(n[e.label]=e.default)})),n},Dn.prototype.getComponentSettings=function(){var e,t;const{translator:n}=this.environment,r=Ht(!0,{},this.vizAttributes.supportedDisclaimers),i=new xn(bn.DISCLAIMERS,this.dataAttributes,r);let o,a;if(i.isAnyValidDisclaimer(bn.ALIGNMENT.CENTER))o=i.getMessage(bn.ALIGNMENT.CENTER,n),a="center";else{if(!i.isAnyValidDisclaimer(bn.ALIGNMENT.BOTTOM))return;o=i.getMessage(bn.ALIGNMENT.BOTTOM,n),a="bottom"}return{key:"disclaimer",type:"disclaimer",layout:{displayOrder:1e3,dock:a},settings:{label:o,rtl:"rtl"===(null===(e=this.environment)||void 0===e||null===(t=e.options)||void 0===t?void 0:t.direction)}}},Dn.prototype.set=function(e){if(this.clear(),!e)throw new Error(Dn.ERRORS.SET);this.vizAttributes=e,this.dataAttributes=vn.applyAttributes(this.vizAttributes.options,this.vizAttributes.data)},Dn.prototype.clear=function(){this.vizAttributes=null,this.dataAttributes=null};const En=_t.extend({init(e,t,n,r,i){this.$element=t,this.environment=n,this.backendApi=r,this._selectionsApi=i,this._on=!1,this._disclaimer=new Dn(n),this._dataPaths=["qHyperCube"];const o=this;this.picassoElement=t[0],this.picassoElement.className+=" picasso-chart",this.chartInstance=e.chart({element:this.picassoElement,settings:{components:[gn.createComponent("event-area",{mounted(e){o.dataAreaElem=e}})]}})},updateEnvironment(e){this.environment=e},isRtl(){var e;return"rtl"===(null===(e=this.environment.options)||void 0===e?void 0:e.direction)},setDataPaths(e){this._dataPaths=e},getData:(e,t,n)=>function(e,t,n){let r,i={qTop:0,qLeft:0,qWidth:t.qSize.qcx,qHeight:1e4/t.qSize.qcx};if(n){const e=n.width||t.qSize.qcx,r=Math.floor(1e4/e);i={qTop:n.top||0,qLeft:n.left||0,qWidth:e,qHeight:n.height?Math.min(n.height,r):r}}else i={qTop:0,qLeft:0,qWidth:t.qSize.qcx,qHeight:1e4/t.qSize.qcx};r="K"===t.qMode?"qStackedDataPages":"qDataPages";return e.getData([i],null,t).then((e=>{t[r]=e}))}(e,t,n),hasValidData:()=>!0,paint(){if(this.hasValidData()){var e;this._disclaimer.set(this.getDisclaimerAttributes(this.layout));const t=this._disclaimer.getComponentSettings(),n="center"===(null==t||null===(e=t.layout)||void 0===e?void 0:e.dock),r=this.createChartSettings(this.layout);n?r.components=[t]:t&&r.components.push(t),gn.validateComponentKeys(r.components).forEach((e=>{console.error(e)})),this.updateChart(this.layout,r),this._painted=!0}return Promise.resolve()},resize(){if(this.layout)return this.paint()},createChartSettings(){throw new Error('Subclass must implement "createChartSettings" function')},addSnapshotChartSettings(e,t){const{freeResize:n}=this.environment.options;!n&&t.snapshotData&&(e.dockLayout.logicalSize={width:t.snapshotData.content.size.w,height:t.snapshotData.content.size.h,preserveAspectRatio:!0})},updateData(e){return this._destroyed?Promise.reject():(this.layout=Ht(!0,{},e),this.layout.permissions=e.permissions,Promise.resolve())},updateChart(e,t,n){var r,i;const o=null!==(r=null===(i=this.environment.appLayout)||void 0===i?void 0:i.qLocaleInfo)&&void 0!==r?r:{},a=this._dataPaths.map((t=>({type:"q",key:t,config:{localeInfo:o},data:Qe(e,t.replace(/\//g,"."))})));this.colorService&&a.push(...this.colorService.getData()),this.chartInstance.update({data:a,settings:t,partialData:n});this.picassoElement.setAttribute("data-state",2)},destroy(){this._destroyed=!0,this.off(),this.chartInstance.destroy()},getViewState:()=>({}),isLassoDisabled:()=>!0,setSnapshotData(e){e.snapshotData||(e.snapshotData={}),e.snapshotData.content={chartData:{},size:{w:this.$element.width(),h:this.$element.height()}}},getDisclaimerAttributes:e=>({data:e})});var Sn={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 r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?e(Object(i),!0).forEach((function(e){n(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function n(e,t,n){return(t=i(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function i(e){var t=r(e,"string");return"symbol"==typeof t?t:String(t)}var o=Object.prototype.hasOwnProperty,a=Object.prototype.toString,s=Object.defineProperty,l=Object.getOwnPropertyDescriptor,u=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===a.call(e)},c=function(e){if(!e||"[object Object]"!==a.call(e))return!1;var t,n=o.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&o.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||o.call(e,t)},p=function(e,t){s&&"__proto__"===t.name?s(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},d=function(e,t){if("__proto__"===t){if(!o.call(e,t))return;if(l)return l(e,t).value}return e[t]},f=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,f=arguments.length,h=!1;for("boolean"==typeof s&&(h=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<f;++l)if(null!=(t=arguments[l]))for(n in t)r=d(s,n),s!==(i=d(t,n))&&(h&&i&&(c(i)||(o=u(i)))?(o?(o=!1,a=r&&u(r)?r:[]):a=r&&c(r)?r:{},p(s,{name:n,newValue:e(h,a,i)})):void 0!==i&&p(s,{name:n,newValue:i}));return s};function h(e,t,n,r){if(!e)return-1;const i=n.cache,o=e.origin?e.origin():null;o&&(e=o);let a=i.fields.indexOf(e),s=-1,l=-1;if(-1===a)for(let t=0;t<i.wrappedFields.length;t++)if(l=i.wrappedFields[t].attrDims.map((e=>e.instance)).indexOf(e),s=i.wrappedFields[t].attrExps.map((e=>e.instance)).indexOf(e),-1!==l||-1!==s){a=t;break}if(Array.isArray(r)&&r.some(((e,t)=>e!==t))){const e=r.indexOf(a);-1!==e&&(a=e)}return a-=t.qArea.qLeft,a<0||a>=t.qArea.qWidth?-1:l>=0?e=>e[a].qAttrDims.qValues[l]:s>=0?e=>e[a].qAttrExps.qValues[s]:e=>e[a]}function m(e,t,n){let{key:r}=n;const 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 g(e){let{cache:t,f:n,mainCell:r,p:i,prop:o,page:a,rowIdx:s,row:l,sourceKey:u,target:c,targetProp:p,columnOrder:d}=e,g=r;if(i.field&&i.field!==n){const e=h(i.field,a,{cache:t},d);if(-1===e)return;g=f({qRow:s},e(l))}c[p]=m(i,g,{key:u})}function y(e,t,n,r){const i=Array.isArray(e)?e:[e];let o=[];for(let e=0;e<i.length;e++)if(void 0!==i[e].field){const a=t.raw(),s=t.key(),l="object"==typeof i[e].field?i[e].field:t.field(i[e].field),{props:u,main:c}=r.normalizeConfig(i[e],t),p=Object.keys(u),d=!!i[e].trackBy,y=typeof i[e].trackBy,b={},v=[],x=[];for(let t=0;t<a.qDataPages.length;t++){const o=h(l,a.qDataPages[t],{cache:n},a.qColumnOrder);if(-1!==o)for(let h=0;h<a.qDataPages[t].qMatrix.length;h++){const q=a.qDataPages[t].qArea.qTop+h,D=f({qRow:q},o(a.qDataPages[t].qMatrix[h])),E=m(c,D,{key:s});if(!c.filter||c.filter(D)){for(let e=0;e<p.length;e++){const r=u[p[e]];let i=r.fields||[r];r.fields&&(E[p[e]]=[]);for(let o=0;o<i.length;o++)g({cache:n,f:l,mainCell:D,p:i[o],prop:p[e],props:u,page:a.qDataPages[t],rowIdx:q,row:a.qDataPages[t].qMatrix[h],sourceKey:s,target:r.fields?E[p[e]]:E,targetProp:r.fields?o:p[e],columnOrder:a.qColumnOrder});if(r.fields){const t=E[p[e]].map((e=>e.value)),n=E[p[e]].map((e=>e.label));E[p[e]]={value:"function"==typeof r.value?r.value(t):void 0!==r.value?r.value:t,label:"function"==typeof r.label?r.label(n):void 0!==r.label?String(r.label):String(E[p[e]].value)}}}d&&r.track({cfg:i[e],itemData:D,obj:E,target:v,tracker:b,trackType:y}),x.push(E)}}}const q=d?r.collect(v,{main:c,propsArr:p,props:u}):x;o=[...o,...q]}return o}function b(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 v(){return this.eachAfter(b)}function x(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this}function q(e,t){for(var n,r,i=this,o=[i],a=-1;i=o.pop();)if(e.call(t,i,++a,this),n=i.children)for(r=n.length-1;r>=0;--r)o.push(n[r]);return this}function D(e,t){for(var n,r,i,o=this,a=[o],s=[],l=-1;o=a.pop();)if(s.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r]);for(;o=s.pop();)e.call(t,o,++l,this);return this}function E(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r}function C(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 w(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))}function A(e){for(var t=this,n=T(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 T(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 M(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function I(){return Array.from(this)}function k(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e}function O(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t}function*L(){var e,t,n,r,i=this,o=[i];do{for(e=o.reverse(),o=[];i=e.pop();)if(yield i,t=i.children)for(n=0,r=t.length;n<r;++n)o.push(t[n])}while(o.length)}function N(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=H)):void 0===t&&(t=R);for(var n,r,i,o,a,s=new j(e),l=[s];n=l.pop();)if((i=t(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;o>=0;--o)l.push(r=i[o]=new j(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(_)}function P(){return N(this).eachBefore(F)}function R(e){return e.children}function H(e){return Array.isArray(e)?e[1]:null}function F(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function _(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function j(e){this.data=e,this.depth=this.height=0,this.parent=null}function z(e){return null==e?null:V(e)}function V(e){if("function"!=typeof e)throw new Error;return e}j.prototype=N.prototype={constructor:j,count:v,each:x,eachAfter:D,eachBefore:q,find:E,sum:C,sort:w,path:A,ancestors:M,descendants:I,leaves:k,links:O,copy:P,[Symbol.iterator]:L};var B={depth:-1},$={},U={};function W(e){return e.id}function K(e){return e.parentId}function G(){var e,t=W,n=K;function r(r){var i,o,a,s,l,u,c,p,d=Array.from(r),f=t,h=n,m=new Map;if(null!=e){const t=d.map(((t,n)=>Y(e(t,n,r)))),n=t.map(X),i=new Set(t).add("");for(const e of n)i.has(e)||(i.add(e),t.push(e),n.push(X(e)),d.push(U));f=(e,n)=>t[n],h=(e,t)=>n[t]}for(a=0,i=d.length;a<i;++a)o=d[a],u=d[a]=new j(o),null!=(c=f(o,a,r))&&(c+="")&&(p=u.id=c,m.set(p,m.has(p)?$:u)),null!=(c=h(o,a,r))&&(c+="")&&(u.parent=c);for(a=0;a<i;++a)if(c=(u=d[a]).parent){if(!(l=m.get(c)))throw new Error("missing: "+c);if(l===$)throw new Error("ambiguous: "+c);l.children?l.children.push(u):l.children=[u],u.parent=l}else{if(s)throw new Error("multiple roots");s=u}if(!s)throw new Error("no root");if(null!=e){for(;s.data===U&&1===s.children.length;)s=s.children[0],--i;for(let e=d.length-1;e>=0&&(u=d[e]).data===U;--e)u.data=null}if(s.parent=B,s.eachBefore((function(e){e.depth=e.parent.depth+1,--i})).eachBefore(_),s.parent=null,i>0)throw new Error("cycle");return s}return r.id=function(e){return arguments.length?(t=z(e),r):t},r.parentId=function(e){return arguments.length?(n=z(e),r):n},r.path=function(t){return arguments.length?(e=z(t),r):e},r}function Y(e){let t=(e=`${e}`).length;return J(e,t-1)&&!J(e,t-2)&&(e=e.slice(0,-1)),"/"===e[0]?e:`/${e}`}function X(e){let t=e.length;if(t<2)return"";for(;--t>1&&!J(e,t););return e.slice(0,t)}function J(e,t){if("/"===e[t]){let n=0;for(;t>0&&"\\"===e[--t];)++n;if(0==(1&n))return!0}return!1}function Q(e,t){"/"===e.charAt(0)&&(e=e.substring(1));const n=e.split("/");let r,i=t;for(let e=0;e<n.length;e++){if("*"===n[e]&&Array.isArray(i)){const t=[];r=n.slice(e+1).join("/");for(let e=0;e<i.length;e++){let n=Q(r,i[e]);Array.isArray(n)?t.push(...n):t.push(n)}return t}if(!n[e]&&Array.isArray(i)){const t=new Array(i.length);r=n.slice(e+1).join("/");for(let e=0;e<i.length;e++)t[e]=Q(r,i[e]);return t}n[e]in i&&(i=i[n[e]])}return i}function Z(e,t,n){let r=[];if(!e||!e.length)return r;if(t<=0){const t=n>=0?[e[n]]:e;r=[...r,...t]}else for(let i=0;i<e.length;i++)e[i].children&&e[i].children.length&&(r=[...r,...Z(e[i].children,t-1,n)]);return r}function ee(e,t,n){if(e===t)return e=>e;if(e>t){const n=Math.max(0,Math.min(100,e-t));return e=>{let t=e;for(let e=0;e<n;++e)t=t.parent;return t}}if(t>e){const r=Math.max(0,Math.min(100,t-e));return e=>Z(e.children,r-1,n)}return!1}function te(e,t){let{cache:n}=t;if("number"==typeof e)return n.fields[e];const r=n.allFields;if("function"==typeof e){for(let t=0;t<r.length;t++)if(e(r[t]))return r[t];return!1}if("string"==typeof e){for(let t=0;t<r.length;t++)if(r[t].key()===e||r[t].title()===e)return r[t]}else if(e&&-1!==r.indexOf(e))return e;throw Error("Field not found: ".concat(e))}const ne=/^qDimensionInfo(?:\/(\d+))?/,re=/^\/?qMeasureInfo\/(\d+)/,ie=/\/qAttrExprInfo\/(\d+)/,oe=/\/qAttrDimInfo\/(\d+)/;function ae(e){const t=e.raw().qColumnOrder,n=e.fields();return t&&t.length===n.length?t:n.map(((e,t)=>t))}function se(e){return(e.qColumnOrder&&e.qColumnOrder.length?e.qColumnOrder:e.qDimensionInfo.map(((e,t)=>t))).filter((t=>t<e.qDimensionInfo.length))}function le(e,t){let{cube:n}=t;if(!e)return-1;let r=e.origin&&e.origin()?e.origin().key():e.key(),i=!1,o=-1,a=-1,s=-1,l=-1,u=-1,c=-1,p=r;const d=n.qEffectiveInterColumnSortOrder,f=se(n);return ne.test(p)&&(i=!0,o=+ne.exec(p)[1],p=r.replace(ne,"")),re.test(p)&&("K"===n.qMode?u=+re.exec(p)[1]:d&&-1!==d.indexOf(-1)?(u=+re.exec(p)[1],c=0):c=+re.exec(p)[1],p=p.replace(re,"")),p&&(oe.exec(p)?s=+oe.exec(p)[1]:ie.exec(p)&&(a=+ie.exec(p)[1])),l=i?"S"===n.qMode?f[o]:d?d.indexOf(o):o:d&&-1!==d.indexOf(-1)?d.indexOf(-1):n.qDimensionInfo.length-("K"===n.qMode?0:1),{fieldDepth:l+1,pseudoMeasureIndex:u,measureIdx:c,attrDimIdx:s,attrIdx:a}}function ue(e,t){let n,r,i=ee(e.fieldDepth,t.fieldDepth,t.pseudoMeasureIndex);return n=t.measureIdx>=0?e=>e.data.qValues[t.measureIdx]:e=>e.data,t.attrDimIdx>=0?r=e=>{var n;return null==e||null===(n=e.qAttrDims)||void 0===n?void 0:n.qValues[t.attrDimIdx]}:t.attrIdx>=0&&(r=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 ce(e,t,n){let{key:r}=n;const 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 pe(e){let{propsArr:t,props:n,item:r,itemData:i,ret:o,sourceKey:a}=e;for(let e=0;e<t.length;e++){const s=n[t[e]],l=s.fields||[s];let u,c;s.fields&&(u=[],c=[]);for(let n=0;n<l.length;n++){const p=l[n];let d,f,h,m,g,y;if("primitive"===p.type?(h=p.value,y=String(p.value)):("function"==typeof p.value&&(d=e=>p.value(e,r)),"function"==typeof p.label&&(f=e=>p.label(e,r)),p.accessor?(m=p.accessor(r),Array.isArray(m)?(g=m.map(p.valueAccessor),p.attrAccessor&&(g=g.map(p.attrAccessor)),d&&(h=g.map(d),d=null),f&&(y=g.map(f),f=null),h=p.reduce?p.reduce(h):h,y=p.reduceLabel?p.reduceLabel(y,h):String(h)):(h=p.attrAccessor?p.attrAccessor(p.valueAccessor(m)):p.valueAccessor(m),y=h)):(h=i,y=i)),s.fields){const e=d?d(h):h;u.push(e),c.push(f&&null!=y?f(y):null!=y?y:String(e))}else{const n=d?d(h):h;o[t[e]]={value:n,label:f?f(y):null!=y?y:String(n)},p.field&&(o[t[e]].source={field:p.field.key(),key:a})}}u&&(o[t[e]]={value:"function"==typeof s.value?s.value(u,r):u,label:"function"==typeof s.label?s.label(c,r):c})}}const de=(e,t,n)=>{const r="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",i="K"===e.qMode?"qSubNodes":"qNodes",o=Q(r,e);return o&&o[0]?(t.tree=N(o[0],n.children||(e=>e[i])),t.tree):null};function fe(e){const n=e.raw().qDataPages.length?e.raw().qDataPages[0].qMatrix:[],r=ae(e),i=e.fields(),o=e.fields().filter((e=>"dimension"===e.type())).map((e=>r.indexOf(i.indexOf(e)))),a=e.fields().filter((e=>"measure"===e.type())).map((e=>r.indexOf(i.indexOf(e)))),s={__root:{__id:"__root",qValues:[]}};for(let e=0;e<n.length;e++){const r=n[e];let i="__root",u=!1;for(let e=0;e<o.length;e++){var l;const n=r[o[e]],a="".concat(i,"__").concat(null!==(l=n.qElemNumber)&&void 0!==l?l:n.qElemNo);s[a]||(s[a]=t({__id:a,__parent:i,qValues:[]},n),u=!0),i=a}if(u)for(let e=0;e<a.length;e++){const t=r[a[e]];s[i].qValues.push(t)}}const u=Object.keys(s).map((e=>s[e])),c=G().id((e=>e.__id)).parentId((e=>e.__parent))(u);return c}const he=e=>{let{propsArr:t,props:n,cube:r,cache:i,itemDepthObject:o,f:a}=e;for(let e=0;e<t.length;e++){const s=n[t[e]],l=s.fields?s.fields:[s];for(let e=0;e<l.length;e++){const t=l[e];if(t.field!==a){const e=ue(o,le(t.field,{cube:r,cache:i}));t.accessor=e.nodeFn,t.valueAccessor=e.valueFn,t.attrAccessor=e.attrFn}}}};function me(){let 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;const o=n.raw(),a=n.key(),s="S"===o.qMode?fe(n):de(o,r,e);if(!s)return null;const l=s.height,u=[];for(let a=0;a<=l;a++){let s=null;if(a>0)if("S"===o.qMode){let e=se(o)[a-1];s=r.fields[e]}else{let e=o.qEffectiveInterColumnSortOrder[a-1];a>o.qEffectiveInterColumnSortOrder.length&&(e=o.qDimensionInfo.length),s=r.fields[e]}const{props:l,main:c}=i.normalizeConfig(t(t({},e),{},{field:s?s.key():void 0}),n),p=Object.keys(l);u[a]={propsArr:p,props:l,main:c};const d=s?le(s,{cube:o,cache:r}):{fieldDepth:0};he({propsArr:p,props:l,cube:o,cache:r,itemDepthObject:d,f:s})}const c=s.copy().descendants(),p=s.descendants();for(let e=0;e<p.length;e++){const t=u[p[e].depth].propsArr,n=u[p[e].depth].props,r=u[p[e].depth].main,i=c[e],o=i.data,s=ce(r,o,{key:a});pe({propsArr:t,props:n,item:i,itemData:o,ret:s,sourceKey:a,isTree:!0}),p[e].data=s}return s}function ge(e,t,n,r){const i=Array.isArray(e)?e:[e];let o=[];for(let a=0;a<i.length;a++)if(void 0!==i[a].field){const s=t.raw(),l=t.key();if(!de(s,n,e))continue;const u="object"==typeof i[a].field?i[a].field:t.field(i[a].field),{props:c,main:p}=r.normalizeConfig(i[a],t),d=Object.keys(c),f=le(u,{cube:s,cache:n}),{nodeFn:h,attrFn:m,valueFn:g}=ue({fieldDepth:0},f);he({propsArr:d,props:c,cube:s,cache:n,itemDepthObject:f,f:u});const y=!!i[a].trackBy,b=typeof i[a].trackBy,v={},x=[],q=h(n.tree),D=[];for(let e=0;e<q.length;e++){const t=q[e],n=m?m(g(t)):g(t);if(p.filter&&!p.filter(n))continue;const o=ce(p,n,{key:l});pe({propsArr:d,props:c,item:t,itemData:n,ret:o,sourceKey:l}),y&&r.track({cfg:i[a],itemData:n,obj:o,target:x,tracker:v,trackType:b}),D.push(o)}const E=y?r.collect(x,{main:p,propsArr:d,props:c}):D;o=[...o,...E]}return o}function ye(e,t){return e(t={exports:{}},t.exports),t.exports}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==S||"undefined"!=typeof self&&self;var be=ye((function(e){
|
|
24
|
+
e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,i,o,a,s,l,u,c,p,f=e.length,d=e.search(/[0-9\-\+#]/),h=d>0?e.substring(0,d):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),y=f-g,b=e.substring(y,y+1),v=y+("."===b||","===b?1:0),x=g>0?e.substring(v,f):"";if(n=(t="-"===(e=e.substring(d,v)).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"),(!(u=t.split("."))[1]||u[1]&&u[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(;u[0].length<e[0].length-a;)u[0]="0"+u[0];else 0==+u[0]&&(u[0]="");if((t=t.split("."))[0]=u[0],l=c[1]&&c[c.length-1].length){for(m="",y=(p=t[0]).length%l,f=p.length,v=0;v<f;v++)m+=p.charAt(v),!((v-y+1)%l)&&v<f-l&&(m+=o);t[0]=m}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),h+(n?"-":"")+r+x}},ut({exports:{}});var vt="'Source Sans Pro', 'Arial', 'sans-serif'",xt="#333333",qt="#595959",Dt="#737373",St="#cccccc",Et="#e6e6e6";function wt(e){var t={};return[].concat(U(e),U([["","","color"],["object","","fontFamily"],["object","axis.label.name","color",qt],["object","axis.label.name","fontFamily",vt],["object","axis.label.name","fontSize","12px"],["object","axis.line.major","color",St],["object","axis.line.minor","color",Et],["object","axis.title","color"],["object","axis.title","fontFamily",vt],["object","axis.title","fontSize","13px"],["object","grid.line.highContrast","color",Et],["object","grid.line.major","color",St],["object","grid.line.minor","color",Et],["object","label.value","color",qt],["object","label.value","fontFamily",vt],["object","label.value","fontSize","12px"],[!1,"label.value","darkColor",qt],[!1,"label.value","lightColor",Et],["object","outOfRange","color","#999"],["object","legend.title","color",xt],["object","legend.title","fontFamily",vt],["object","legend.title","fontSize","15px"],["object","legend.label","color",qt],["object","legend.label","fontFamily",vt],["object","legend.label","fontSize","13px"],["object","referenceLine.label.name","color",xt],["object","referenceLine.label.name","fontFamily",vt],["object","referenceLine.label.name","fontSize","12px"],["object","referenceLine.outOfBounds","color",Et],["object","referenceLine.outOfBounds","fontFamily",vt],["object","referenceLine.outOfBounds","fontSize","12px"],["object","referenceLine.outOfBounds","backgroundColor",Dt,function(e){return"transparent"===e?Dt:e}]])).reduce((function(e,n){var r="".concat(n[0],"-").concat(n[1],"-").concat(n[2],"}");return t[r]||(t[r]=!0,e.push(n)),e}),[]).sort((function(e,t){return(e[0].split?e[0].split(".").length:0)-(t[0].split?t[0].split(".").length:0)}))}var Ct=function(e){return e};function At(e){var t=e.theme,n=e.id,r=e.transform,i=e.extend,o=e.matrix,a={},s=r.reduce((function(e,t){var n=$(t,2),r=n[0],i=n[1];return e[r]=i,e}),{});return o.forEach((function(e){var r=$(e,5),i=r[0],o=r[1],l=r[2],u=r[3],c=r[4],p=void 0===c?function(e){return e}:c,f=function(e){var t=e.theme,n=e.base,r=e.path,i=e.attribute,o=e.defaultValue,a=void 0===o?void 0:o;if(!t||!1===n)return a;var s=t.getStyle(n,r,i);return void 0===s?a:s}({theme:t,base:"object"===i&&n?"".concat("object",".").concat(n):i,path:o,attribute:l,defaultValue:u}),d=(s["".concat(o,".").concat(l)]||Ct)(p(f));pt(a,[o,l].filter(Boolean).join("."),d)})),i.forEach((function(e){var t=$(e,2),n=t[0],r=t[1];pt(a,n,r)})),a}var Tt=Object.prototype.hasOwnProperty,Mt=Object.prototype.toString,kt=Object.defineProperty,It=Object.getOwnPropertyDescriptor,Ot=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Mt.call(e)},Nt=function(e){if(!e||"[object Object]"!==Mt.call(e))return!1;var t,n=Tt.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Tt.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||Tt.call(e,t)},Lt=function(e,t){kt&&"__proto__"===t.name?kt(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Pt=function(e,t){if("__proto__"===t){if(!Tt.call(e,t))return;if(It)return It(e,t).value}return e[t]},Rt=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<u;++l)if(null!=(t=arguments[l]))for(n in t)r=Pt(s,n),s!==(i=Pt(t,n))&&(c&&i&&(Nt(i)||(o=Ot(i)))?(o?(o=!1,a=r&&Ot(r)?r:[]):a=r&&Nt(r)?r:{},Lt(s,{name:n,newValue:e(c,a,i)})):void 0!==i&&Lt(s,{name:n,newValue:i}));return s},Ht=w(Rt);var Ft=Object.prototype.hasOwnProperty,_t=Object.prototype.toString,jt=Object.defineProperty,zt=Object.getOwnPropertyDescriptor,Vt=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===_t.call(e)},Bt=function(e){if(!e||"[object Object]"!==_t.call(e))return!1;var t,n=Ft.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Ft.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||Ft.call(e,t)},$t=function(e,t){jt&&"__proto__"===t.name?jt(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Ut=function(e,t){if("__proto__"===t){if(!Ft.call(e,t))return;if(zt)return zt(e,t).value}return e[t]};function Wt(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Kt(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Yt(){}!function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")&&e.default}((function e(){var t,n,r,i,o,a,s=arguments[0],l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<u;++l)if(null!=(t=arguments[l]))for(n in t)r=Ut(s,n),s!==(i=Ut(t,n))&&(c&&i&&(Bt(i)||(o=Vt(i)))?(o?(o=!1,a=r&&Vt(r)?r:[]):a=r&&Bt(r)?r:{},$t(s,{name:n,newValue:e(c,a,i)})):void 0!==i&&$t(s,{name:n,newValue:i}));return s}));var Gt=1/.7,Xt="\\s*([+-]?\\d+)\\s*",Jt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Qt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Zt=/^#([0-9a-f]{3,8})$/,en=new RegExp(`^rgb\\(${Xt},${Xt},${Xt}\\)$`),tn=new RegExp(`^rgb\\(${Qt},${Qt},${Qt}\\)$`),nn=new RegExp(`^rgba\\(${Xt},${Xt},${Xt},${Jt}\\)$`),rn=new RegExp(`^rgba\\(${Qt},${Qt},${Qt},${Jt}\\)$`),on=new RegExp(`^hsl\\(${Jt},${Qt},${Qt}\\)$`),an=new RegExp(`^hsla\\(${Jt},${Qt},${Qt},${Jt}\\)$`),sn={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 ln(){return this.rgb().formatHex()}function un(){return this.rgb().formatRgb()}function cn(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Zt.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?pn(t):3===n?new mn(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?fn(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?fn(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=en.exec(e))?new mn(t[1],t[2],t[3],1):(t=tn.exec(e))?new mn(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=nn.exec(e))?fn(t[1],t[2],t[3],t[4]):(t=rn.exec(e))?fn(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=on.exec(e))?qn(t[1],t[2]/100,t[3]/100,1):(t=an.exec(e))?qn(t[1],t[2]/100,t[3]/100,t[4]):sn.hasOwnProperty(e)?pn(sn[e]):"transparent"===e?new mn(NaN,NaN,NaN,0):null}function pn(e){return new mn(e>>16&255,e>>8&255,255&e,1)}function fn(e,t,n,r){return r<=0&&(e=t=n=NaN),new mn(e,t,n,r)}function dn(e){return e instanceof Yt||(e=cn(e)),e?new mn((e=e.rgb()).r,e.g,e.b,e.opacity):new mn}function hn(e,t,n,r){return 1===arguments.length?dn(e):new mn(e,t,n,null==r?1:r)}function mn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function gn(){return`#${xn(this.r)}${xn(this.g)}${xn(this.b)}`}function yn(){const e=bn(this.opacity);return`${1===e?"rgb(":"rgba("}${vn(this.r)}, ${vn(this.g)}, ${vn(this.b)}${1===e?")":`, ${e})`}`}function bn(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function vn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function xn(e){return((e=vn(e))<16?"0":"")+e.toString(16)}function qn(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Sn(e,t,n,r)}function Dn(e){if(e instanceof Sn)return new Sn(e.h,e.s,e.l,e.opacity);if(e instanceof Yt||(e=cn(e)),!e)return new Sn;if(e instanceof Sn)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,l=(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/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Sn(a,s,l,e.opacity)}function Sn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function En(e){return(e=(e||0)%360)<0?e+360:e}function wn(e){return Math.max(0,Math.min(1,e||0))}function Cn(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Wt(Yt,cn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ln,formatHex:ln,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Dn(this).formatHsl()},formatRgb:un,toString:un}),Wt(mn,hn,Kt(Yt,{brighter(e){return e=null==e?Gt:Math.pow(Gt,e),new mn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new mn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new mn(vn(this.r),vn(this.g),vn(this.b),bn(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:gn,formatHex:gn,formatHex8:function(){return`#${xn(this.r)}${xn(this.g)}${xn(this.b)}${xn(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:yn,toString:yn})),Wt(Sn,(function(e,t,n,r){return 1===arguments.length?Dn(e):new Sn(e,t,n,null==r?1:r)}),Kt(Yt,{brighter(e){return e=null==e?Gt:Math.pow(Gt,e),new Sn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new Sn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new mn(Cn(e>=240?e-240:e+120,i,r),Cn(e,i,r),Cn(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Sn(En(this.h),wn(this.s),wn(this.l),bn(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=bn(this.opacity);return`${1===e?"hsl(":"hsla("}${En(this.h)}, ${100*wn(this.s)}%, ${100*wn(this.l)}%${1===e?")":`, ${e})`}`}}));const An=Math.PI/180,Tn=180/Math.PI,Mn=4/29,kn=6/29,In=3*kn*kn;function On(e){if(e instanceof Nn)return new Nn(e.l,e.a,e.b,e.opacity);if(e instanceof Fn)return _n(e);e instanceof mn||(e=dn(e));var t,n,r=Hn(e.r),i=Hn(e.g),o=Hn(e.b),a=Ln((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?t=n=a:(t=Ln((.4360747*r+.3850649*i+.1430804*o)/.96422),n=Ln((.0139322*r+.0971045*i+.7141733*o)/.82521)),new Nn(116*a-16,500*(t-a),200*(a-n),e.opacity)}function Nn(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function Ln(e){return e>.008856451679035631?Math.pow(e,1/3):e/In+Mn}function Pn(e){return e>kn?e*e*e:In*(e-Mn)}function Rn(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Hn(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Fn(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function _n(e){if(isNaN(e.h))return new Nn(e.l,0,0,e.opacity);var t=e.h*An;return new Nn(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}Wt(Nn,(function(e,t,n,r){return 1===arguments.length?On(e):new Nn(e,t,n,null==r?1:r)}),Kt(Yt,{brighter(e){return new Nn(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new Nn(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new mn(Rn(3.1338561*(t=.96422*Pn(t))-1.6168667*(e=1*Pn(e))-.4906146*(n=.82521*Pn(n))),Rn(-.9787684*t+1.9161415*e+.033454*n),Rn(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),Wt(Fn,(function(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof Fn)return new Fn(e.h,e.c,e.l,e.opacity);if(e instanceof Nn||(e=On(e)),0===e.a&&0===e.b)return new Fn(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Tn;return new Fn(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new Fn(e,t,n,null==r?1:r)}),Kt(Yt,{brighter(e){return new Fn(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new Fn(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return _n(this).rgb()}}));var jn,zn=e=>()=>e;function Vn(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):zn(isNaN(e)?t:e)}function Bn(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 $n(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 Un(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=Kn)):void 0===t&&(t=Wn);for(var n,r,i,o,a,s=new Xn(e),l=[s];n=l.pop();)if((i=t(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;o>=0;--o)l.push(r=i[o]=new Xn(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Gn)}function Wn(e){return e.children}function Kn(e){return Array.isArray(e)?e[1]:null}function Yn(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function Gn(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function Xn(e){this.data=e,this.depth=this.height=0,this.parent=null}!function e(t){var n=function(e){return 1==(e=+e)?Vn: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):zn(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=hn(e)).r,(t=hn(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=Vn(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),Xn.prototype=Un.prototype={constructor:Xn,count:function(){return this.eachAfter($n)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,i,o=this,a=[o],s=[],l=-1;o=a.pop();)if(s.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r]);for(;o=s.pop();)e.call(t,o,++l,this);return this},eachBefore:function(e,t){for(var n,r,i=this,o=[i],a=-1;i=o.pop();)if(e.call(t,i,++a,this),n=i.children)for(r=n.length-1;r>=0;--r)o.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return Un(this).eachBefore(Yn)},[Symbol.iterator]:function*(){var e,t,n,r,i=this,o=[i];do{for(e=o.reverse(),o=[];i=e.pop();)if(yield i,t=i.children)for(n=0,r=t.length;n<r;++n)o.push(t[n])}while(o.length)}},jn=function(e){
|
|
25
25
|
/*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
|
|
26
|
-
!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,l,u,c,p,d=e.length,f=e.search(/[0-9\-\+#]/),h=f>0?e.substring(0,f):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),y=d-g,b=e.substring(y,y+1),v=y+("."===b||","===b?1:0),x=g>0?e.substring(v,d):"";if(n=(t="-"===(e=e.substring(f,v)).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"),(!(u=t.split("."))[1]||u[1]&&u[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(;u[0].length<e[0].length-a;)u[0]="0"+u[0];else 0==+u[0]&&(u[0]="");if((t=t.split("."))[0]=u[0],l=c[1]&&c[c.length-1].length){for(m="",y=(p=t[0]).length%l,d=p.length,v=0;v<d;v++)m+=p.charAt(v),!((v-y+1)%l)&&v<d-l&&(m+=o);t[0]=m}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),h+(n?"-":"")+r+x}}))}));const ve=1e-15;function xe(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}const qe={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"},De=/%\)?$/,Ee=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,Se=/^\(oct\)/i,Ce=/^\(dec\)/i,we=/^\(hex\)/i,Ae=/^\(bin\)/i,Te=/^\(rom\)/i,Me=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,Ie=/#|0/g;function ke(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 Oe(e,t){let 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();for(;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 Le(e,t,n){let r;return Ee.test(t)?e=ke(e,Number(/\d{2}/.exec(t)[0]),t,n):Se.test(t)?e=ke(e,8,t,n):Ce.test(t)?e=ke(e,10,t,n):we.test(t)?e=ke(e,16,t,n):Ae.test(t)?e=ke(e,2,t,n):Te.test(t)&&(r="",e<0&&(r="-",e=-e),e=0===(e=Math.floor(e))?"0":e<=5e5?r+(e=Oe(e,t)):t+r+e.toExponential(0)),e}function Ne(e,t,n){const r=xe(e);return n?r:new RegExp(r||"",t)}function Pe(e,t){return t&&(t=xe(t)),e&&(e=xe(e)),new RegExp("(?:[#0]+".concat(e,")?[#0]+(?:").concat(t,"[#0]+)?"))}function Re(e,t){if(!e||!e.qNumericalAbbreviation)return qe;const n={};return e.qNumericalAbbreviation.split(t).forEach((e=>{let t=e.split(":");2===t.length&&(n[t[0]]=t[1])})),n}function He(e,t,n,r){let i,o,a,s,l,u,c,p,d,f=e.pattern;r&&(e.abbreviate=!0),d=Pe(t,n),a=f.match(d),a=a?a[0]:"",s=a?f.substr(0,f.indexOf(a)):f,l=a?f.substring(f.indexOf(a)+a.length):"",a||(a=f?"#":"##########"),t&&t===n&&(i=a.split(n),o=i.pop(),a=i.join("")+n+o,t=""),u=t,t=/,/.test(n)?"¤":",",u&&(a=a.replace(Ne(u,"g"),t)),c=n,n=".",c&&(a=a.replace(Ne(c,"g"),n)),p=a.match(/#/g),p=p?p.length:0;const h=f.split(c);let m;h[1]&&(m=h[1].match(Ie)),e.prefix=s||"",e.postfix=l||"",e.pattern=f,e.maxPrecision=m?m.length:2,e.percentage=De.test(f),e.numericPattern=a||"",e.numericRegex=new RegExp("".concat(Ne(t,null,!0),"|").concat(Ne(n,null,!0)),"g"),e.groupTemp=u,e.decTemp=c,e.t=t,e.d=n,e.temp=p}class Fe{constructor(e,t,n,r,i){this.localeInfo=e,this.pattern=t,this.thousandDelimiter=n||",",this.decimalDelimiter=r||".",this.type=i||"numeric",this.patternSeparator=";",this.abbreviations=Re(e,this.patternSeparator),this.prepare()}clone(){const e=new Fe(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return e.subtype=this.subtype,e}format(e,t,n,r){return this.prepare(t,n,r),this.formatValue(e)}prepare(e,t,n){let r;if(void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===n&&(n=this.decimalDelimiter),!e)return void(this._prepared={pattern:!1});this._prepared={positive:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},negative:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},zero:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""}},r=this._prepared,e=e.split(this.patternSeparator),r.positive.pattern=e[0],r.negative.pattern=e[1],r.zero.pattern=e[2],Me.test(e[0])&&(r.positive.isFunctional=!0),e[1]?Me.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?Me.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1;const i="U"===this.type;r.positive.isFunctional||He(r.positive,t,n,i),r.negative&&!r.negative.isFunctional&&He(r.negative,t,n,i),r.zero&&!r.zero.isFunctional&&He(r.zero,t,n,i)}formatValue(e){let t,n,r,i,o,a,s,l,u,c=this._prepared,p="",d="",f=e;if(isNaN(e))return"".concat(f);if(e=+e,!1===c.pattern)return e.toString();if(0===e&&c.zero)return c=c.zero,c.pattern;if(e<0&&c.negative?(c=c.negative,e=-e):c=c.positive,o=c.d,a=c.t,c.isFunctional)e=Le(e,c.pattern,o);else{if(c.percentage&&(e*=100),c.abbreviate){const t=Object.keys(this.abbreviations).map((e=>parseInt(e,10))).sort(((e,t)=>e-t));let r,i,o=t[0];for(s=0,n=Number(Number(e).toExponential().split("e")[1]);o<=n&&s<t.length;)s++,o=t[s];s>0&&(r=t[s-1]),r&&n>0&&r>0?i=r:(n<0&&r<0||!r)&&(o<0&&o-n<=c.maxPrecision?i=o:r<=n&&!(o>0&&-n<=c.maxPrecision)&&(i=r)),i&&(p=this.abbreviations[i],e/=10**i)}if(r=Math.abs(e),t=c.temp,l=c.numericPattern,u=l.split(o)[1],"I"===this.type&&(e=Math.round(e)),i=e,u||"#"!==l.slice(-1)[0])if(r>=1e15||r>0&&r<=1e-14)e=r?r.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{const t=Number(e.toFixed(Math.min(20,u?u.length:0)).split(".")[0]);let n=l.split(o)[0];if(n+=o,e=be(n,t)||"0",u){const t=Math.max(0,Math.min(14,u.length)),n=u.replace(/#+$/,"").length;let i=("I"===this.type?0:r%1+ve).toFixed(t).slice(2).replace(/0+$/,"");for(s=i.length;s<n;s++)i+="0";i&&(e+=o+i)}else 0===t&&(i=0)}else if(r>=10**t||r<1||r<1e-4)0===e?e="0":r<1e-4||r>=1e20?(e=(e=i.toExponential(Math.max(1,Math.min(14,t))-1)).replace(/\.?0+(?=e)/,""),d=""):(e=e.toPrecision(Math.max(1,Math.min(14,t)))).indexOf(".")>=0&&(e=(e=e.replace(e.indexOf("e")<0?/0+$/:/\.?0+(?=e)/,"")).replace(".",o));else{for(l+=o,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(r)/Math.log(10)))),s=0;s<t;s++)l+="#";e=be(l,e)}e=e.replace(c.numericRegex,(e=>e===a?c.groupTemp:e===o?c.decTemp:"")),i<0&&!/^-/.test(e)&&(e="-".concat(e))}return c.prefix+e+d+p+c.postfix}static getStaticFormatter(){return{prepare(){},formatValue:e=>"".concat(e)}}}function _e(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Fe(...t)}function je(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{size:n=5e3,multipleArguments:r=!1,toKey:i=(e=>e)}=t;let o,a,s=Object.create(null),l=Object.create(null),u=0,c=0;return o=r?function(){return a=i(...arguments),o.has(a)?o.get(a):o.set(a,e(...arguments))}:t=>(a=i(t),o.has(a)?o.get(a):o.set(a,e(t))),o.set=(e,t)=>(u>=n&&(delete s[l[c]],delete l[c],u--,c++),s[e]=t,l[u]=e,u++,t),o.get=e=>s[e],o.has=e=>e in s,o.clear=()=>{s=Object.create(null),l=Object.create(null),u=0,c=0},o.size=()=>u,o}function ze(e,t,n,r,i){const o=_e(i,e,t,n,r),a=je(o.formatValue.bind(o),{toKey:e=>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}const Ve={AUTO:"U",INTEGER:"I",NUMBER:"R",FIXED_TO:"F",MONEY:"M",DATE:"D",TIME:"T",DATE_TIME:"TS",INTERVAL:"IV"},Be=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],$e=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Ue=["January","February","March","April","May","June","July","August","September","October","November","December"],We=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Ke=86400;function Ge(e,t){for(let n=e.length;n<t;n++)e="0".concat(e);return e}function Ye(e,t){let n=e.getUTCHours(),r=e.getUTCDay()-1;return t&&(n%=12,n||(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 Xe(e){let t=e.toString().split(".");return t[1]?(t=Number("0.".concat(t[1])),t):0}function Je(e){const t=e,n=24*Xe(t),r=60*Xe(n),i=60*Xe(r),o=1e3*Xe(i);return{d:Math.floor(t),h:Math.floor(n),m:Math.floor(r),s:Math.floor(i),f:Math.round(o)}}function Qe(e,t){let n,r=Je(e),i=r.d,o=r.h,a=r.m,s=r.s,l=r.f,u=0;/w+|t+/gi.test(t)&&(n=new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,Math.round(Ke*(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)&&(u=n?n.getDay()-1:0,u<0&&(u=6));let c="";return n&&(c=n.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:u,date:i,h:o,m:a,s:s,f:l,t:c}}function Ze(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:Ge("".concat(t.year).slice(-2),2),YYY:Ge("".concat(t.year).slice(-3),3),def:e=>Ge("".concat(t.year),e.length)},"M+":{M:t.month+1,MM:Ge("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:Ge("".concat(t.day),2),WWW:e.locale_days_abbr[t.day],def:e.locale_days[t.day]},"D+|d+":{D:t.date,def:e=>Ge("".concat(t.date),e.length)},"h+|H+":{h:t.h,def:e=>Ge("".concat(t.h),e.length)},"m+":{m:t.m,def:e=>Ge("".concat(t.m),e.length)},"s+|S+":{s:t.s,def:e=>Ge("".concat(t.s),e.length)},"f+|F+":{def(e){let n="".concat(t.f),r=e.length-n.length;if(r>0)for(let e=0;e<r;e++)n+="0";else r<0&&(n=n.slice(0,e.length));return n}},"t{1,2}|T{1,2}":{def(e){let n=t.t;return e[0].toUpperCase()===e[0]&&(n=n.toUpperCase()),n=n.slice(0,e.length),n}}}}class et{constructor(e,t,n){const r=e||{};r.qCalendarStrings||(r.qCalendarStrings={qLongDayNames:Be,qDayNames:$e,qLongMonthNames:Ue,qMonthNames:We}),this.localeInfo=r,this.locale_days=r.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=r.qCalendarStrings.qDayNames.slice(),this.locale_months=r.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=r.qCalendarStrings.qMonthNames.slice(),t||(t={[Ve.TIME]:r.qTimeFmt||"hh:mm:ss",[Ve.DATE]:r.qDateFmt||"YYYY-MM-DD",[Ve.DATE_TIME]:r.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"}[n]),this.pattern=t}clone(){const e=new et(this.localeInfo,this.pattern);return e.subtype=this.subtype,e}format(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+]|\[|]/g,"");const n=/t+/gi.test(t);let r;e instanceof Date?r=Ye(e,n):(e<0&&(e=-e,t="-".concat(t)),r=Qe(e,t));const i=Ze(this,r),o=[];for(const e in i)Object.prototype.hasOwnProperty.call(i,e)&&o.push(e);const a=new RegExp(o.join("|"),"g"),s=t.replace(a,(e=>{let t,n,r;for(n in i)if(Object.prototype.hasOwnProperty.call(i,n)&&(t=new RegExp(n),t.test(e)))break;if(!t)return"";for(const t in i[n])if(t===e||t.toLowerCase()===e){r=i[n][t],void 0===r&&(r=i[n][t.toLowerCase()]);break}return void 0===r&&(r=i[n].def),"function"==typeof r&&(r=r(e)),r}));return s}}function tt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new et(...t)}const nt=864e5;function rt(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(nt*(e-Math.floor(e)))))}function it(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=tt(arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,e,t),r=je(n.format.bind(n),{toKey:e=>"object"==typeof e&&"function"==typeof e.getTime?e.getTime():e});function i(e){return t!==Ve.INTERVAL?rt(e):e}function o(e){return e=i(e),r(e)}return o.format=function(e,t){return r.clear(),t=i(t),n.format(t,e)},o.locale=function(i){return n=tt(i,e,t),r=je(n.format.bind(n),{toKey:e=>"object"==typeof e?e.getTime():e}),this},o.qtype=function(e){return void 0!==e&&(t=e,r.clear()),t},o}function ot(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return it(e.qNumFormat.qFmt,e.qNumFormat.qType,t);let 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,"##"),o="U"),ze(n,r,i,o,t)}function at(){let e,{meta:t,id:n,key:r,localeInfo:i,fieldExtractor:o,value:a,type:s,sourceField:l}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const u=a||("dimension"===s?e=>null==e?void 0:e.qElemNo:e=>null==e?void 0:e.qValue),c=e=>(null==e?void 0:e.qText)||"",p="dimension"===s?"first":"avg",d=ot(t,i),f="dimension"===s?"first":(e,t)=>d(t),h={id:()=>n,key:()=>r,raw:()=>t,title:()=>t.qFallbackTitle||t.label,type:()=>s,origin:()=>l,items:()=>(e||(e=o(h)),e),min:()=>t.qMin,max:()=>t.qMax,value:u,label:c,reduce:p,reduceLabel:f,formatter:()=>d,tags:()=>t.qTags};return h}function st(e,t,n,r,i){return(t[e]||[]).map(((t,o)=>{const a="".concat(r?"".concat(r,"/"):"").concat(e,"/").concat(o),s={instance:at(f({id:"".concat(n?"".concat(n,"/"):"").concat(a),key:a,meta:t},i))};return s.attrDims=st("qAttrDimInfo",t,n,a,f({},i,{value:e=>null==e?void 0:e.qElemNo,type:"dimension"})),s.attrExps=st("qAttrExprInfo",t,n,a,f({},i,{value:e=>null==e?void 0:e.qNum,type:"measure"})),s.measures=st("qMeasureInfo",t,n,a,f({},i,{value:e=>null==e?void 0:e.qValue,type:"measure"})),s}))}function lt(){let{key:e,data:n,config:r={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const i={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},o=n;if(!o)throw new Error('Missing "data" input');if(!o.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');const a=lt.util,s={cache:i,cube:o,localeInfo:r.localeInfo,fieldExtractor:null,pages:null,hierarchy:()=>null,virtualFields:r.virtualFields},l={key:()=>e,raw:()=>o,field:e=>te(e,s),fields:()=>i.fields.slice(),extract:e=>s.extractor(e,l,i,a),hierarchy:e=>s.hierarchy(e,l,i,a),_cache:()=>i};"K"===o.qMode||"T"===o.qMode||!o.qMode&&o.qNodesOnDim?(s.extractor=ge,s.hierarchy=me,s.pages="K"===o.qMode?o.qStackedDataPages:o.qTreeDataPages):"S"===o.qMode?(s.extractor=y,s.pages=o.qDataPages,s.hierarchy=me):s.extractor=()=>[],s.fieldExtractor=e=>s.extractor({field:e},l,i,a);const u="S"===o.qMode?e=>e.qElemNumber:void 0,c="S"===o.qMode?e=>e.qNum:void 0;i.wrappedFields.push(...st("qDimensionInfo",o,e,"",f({},s,{value:u,type:"dimension"}))),i.wrappedFields.push(...st("qMeasureInfo",o,e,"",f({},s,{value:c,type:"measure"}))),i.fields=i.wrappedFields.map((e=>e.instance));const p=e=>{e.forEach((e=>{i.allFields.push(e.instance),p(e.measures),p(e.attrDims),p(e.attrExps)}))};return p(i.wrappedFields),(r.virtualFields||[]).forEach((n=>{const r=l.field(n.from),o=at(t({meta:r.raw(),id:"".concat(e,"/").concat(n.key),sourceField:r,fieldExtractor:e=>s.extractor({field:e},l,i,a),key:n.key,type:r.type(),localeInfo:s.localeInfo,value:r.value},n.override||{}));i.virtualFields.push(o)})),i.allFields.push(...i.virtualFields),l}const ut=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],ct=/\/qDimensionInfo(?:\/(\d+))?/,pt=/\/qMeasureInfo\/(\d+)/,dt=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,ft=/\/qAttrExprInfo\/(\d+)/,ht=/\/?qHyperCube/,mt=/\/?qTreeData/,gt=e=>"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14)),yt=e=>"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13));function bt(e,t){let n=e,r=-1,i=-1,o="",a=e=>e;ht.test(e)?(o="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),a=gt):mt.test(e)&&(o="".concat(n.substr(0,n.indexOf("qTreeData")+9)),a=yt);let s=!0;if(ct.test(e)&&(r=+ct.exec(e)[1]),pt.test(e)&&(i=+pt.exec(e)[1]),dt.test(e)){i=-1,r=0;const e=+dt.exec(n)[2];isNaN(e)||(r=e,n=n.replace(/\/\d+$/,"")),s=!1}if(ft.test(e)){const e=i;if(t){i=0;const a=Q(o,t);i+=(a.qMeasureInfo||[]).length,r>-1?(i=a.qDimensionInfo.slice(0,r).reduce(((e,t)=>e+t.qAttrExprInfo.length),i),r=-1):(i=a.qDimensionInfo.reduce(((e,t)=>e+t.qAttrExprInfo.length),i),i=a.qMeasureInfo.slice(0,e).reduce(((e,t)=>e+t.qAttrExprInfo.length),i)),i+=+ft.exec(n)[1]}else r>-1?(r=-1,i=+ft.exec(n)[1]):i+=+ft.exec(n)[1]+1}return ut.forEach((e=>{let[t,r]=e;n=n.replace(t,r)})),s&&(n=a(n)),n&&"/"!==n[0]&&(n="/".concat(n)),{measureIdx:i,dimensionIdx:r,path:n}}function vt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r=t.byCells,i=t.primarySource,o=[],a={},s=e.isActive();let l=!1;return e.brushes().forEach((e=>{const t=bt(e.id,n);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.multiRangeSelectTreeDataValues||(a.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),n.forEach((e=>a.multiRangeSelectTreeDataValues.ranges.push({qMeasureIx:t.measureIdx,qDimensionIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}}))))}else{if("range"===e.type&&t.measureIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.rangeSelectHyperCubeValues||(a.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),n.forEach((e=>a.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:t.measureIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}}))))}if("range"===e.type&&t.dimensionIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.selectHyperCubeContinuousRange||(a.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),n.forEach((e=>a.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(r)if(n&&n.qHyperCube&&("P"===n.qHyperCube.qMode||"T"===n.qHyperCube.qMode||"K"===n.qHyperCube.qMode)){const r=n.qHyperCube,o=r.qNoOfLeftDims,s=r.qEffectiveInterColumnSortOrder.indexOf(t.dimensionIdx);if(a.selectPivotCells||(a.selectPivotCells={path:t.path,cells:[]}),e.id===i||!i){const n=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e)));(0===o||s>=o)&&o>-1?n.forEach((e=>{a.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:s-o})})):n.forEach((e=>{a.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})})),l=!!a.selectPivotCells.cells.length}}else a.selectHyperCubeCells||(a.selectHyperCubeCells={path:t.path,cols:[]}),a.selectHyperCubeCells.cols.push(t.dimensionIdx),e.id!==i&&(i||a.selectHyperCubeCells.values)||(a.selectHyperCubeCells.values=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e))),l=!!a.selectHyperCubeCells.values.length);else{const n=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e)));l=!!n.length,o.push({params:[t.path,t.dimensionIdx,n,!1],method:"selectHyperCubeValues"})}}})),!l&&s?[{method:"resetMadeSelections",params:[]}]:(a.rangeSelectHyperCubeValues&&o.push({method:"rangeSelectHyperCubeValues",params:[a.rangeSelectHyperCubeValues.path,a.rangeSelectHyperCubeValues.ranges,[],null===(u=t.orMode)||void 0===u||u]}),a.selectHyperCubeContinuousRange&&o.push({method:"selectHyperCubeContinuousRange",params:[a.selectHyperCubeContinuousRange.path,a.selectHyperCubeContinuousRange.ranges]}),a.selectHyperCubeCells&&o.push({method:"selectHyperCubeCells",params:[a.selectHyperCubeCells.path,a.selectHyperCubeCells.values,a.selectHyperCubeCells.cols]}),a.selectPivotCells&&o.push({method:"selectPivotCells",params:[a.selectPivotCells.path,a.selectPivotCells.cells]}),a.multiRangeSelectTreeDataValues&&o.push({method:"multiRangeSelectTreeDataValues",params:[a.multiRangeSelectTreeDataValues.path,a.multiRangeSelectTreeDataValues.ranges]}),o);var u}function xt(e){lt.util=e.data("matrix").util,e.data("q",lt),e.formatter("q-number",ze),e.formatter("q-time",it)}return xt.qBrushHelper=vt,xt.selections=vt,xt}()}(Sn);var Cn=C(Sn.exports);const wn={brushInterceptors:{DIM_VALUE_NULL:-2,DIM_VALUE_TOTAL:-3,brushOnlyOne:function(e,t){const n=e.brushes().filter((e=>"value"===e.type));let r=[];n.length&&n.forEach((e=>{r=r.concat(e.brush.values().map((t=>({key:e.id,value:t}))))}));return r.concat(t)},filterValues:function(e,t){const n=this;let r,i;const o=[];let a=0;const s=[];return t.forEach((t=>{t.value!==n.DIM_VALUE_NULL&&t.value!==n.DIM_VALUE_TOTAL&&(i=function(e,t){const n=t.key.indexOf("qHyperCube")+10,r=t.key.substr(0,n),i=t.key.substr(n+1);return e.dataset(r).field(i)}(e,t),r=i&&i.raw(),r.qLocked?(o.push(r),a++):s.push({key:t.key,value:t.value}))})),{items:s,itemsAreLocked:a>0&&a===t.length,lockedFields:o}}}};const An={data:["elemNo"],contexts:["select"],startOnEmptySelection:!0,style:{active:{strokeWidth:2,stroke:"#333"},inactive:{opacity:.3}}};function Tn(e){if(!e||!e.chartInstance||!e.selectionsApi)throw Error("Selections-handler: Missing input");const t=e.chartInstance,n=e.selectionsApi,r=e.dataPaths||[""],i=e.selectPaths,o=e.lasso;let a=[];const s={propertiesToRestore:{}};let l=!1;const u=function(e,t,n){function r(){}return r.update=function(e,r,i){t.isActive()||t.begin(n),Cn.qBrushHelper(i).forEach((e=>{t.select(e)}))},r.toggleValues=function(r,i,o){const a=wn.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={};let p=!1;function d(e){16===e.keyCode&&e.shiftKey!==p&&(p=e.shiftKey,o.toggle())}function f(e){const t=e.keyCode;27===t?n.cancel():13===t&&n.confirm()}function h(){a.forEach((e=>{e.listeners.update=function(t,n){e.sleep||u.update(t,n,e.brush)},e.brush.on("update",e.listeners.update),e.brush.on("start",e.listeners.start)}))}function m(){a.forEach((e=>{e.brush.removeListener("update",e.listeners.update),e.brush.removeListener("start",e.listeners.start)}))}return n.on("cleared",(()=>{a.forEach((e=>{e.brush.clear(),e.dependentComponents.forEach((e=>{const n=t.component(e.id);n&&n.emit(e.clear)}))}))})),c.setUp=function(e){c.tearDown();const t=this.setUpBrush(e);return l&&h(),t},c.setUpBrush=function(e){const n=Ht(!0,{},An,e),i={on:"tap",action:t=>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(!l)return[];const i=function(){const e=[];let n=r.map((e=>t.dataset(e).fields().filter((e=>"dimension"===e.type()))));n=[].concat.apply([],n);for(let t=0;t<n.length;t++)n[t].raw().qLocked&&e.push(n[t].raw());return{fields:e,areAllFieldsLocked:e.length&&e.length===n.length}}();return n.startOnEmptySelection&&0===e.length&&i.areAllFieldsLocked?[]:u.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((e=>{e!==s&&e.brush.end()}))},a.push(s),{trigger:i,consume:o}},c.setUpStart=function(){c.tearDown()},c.setUpDone=function(){l&&h()},c.tearDown=function(){l&&m(),a.forEach((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((t=>{t.id===e&&(t.sleep=!0)}))},c.resumeEngineCalls=function(e,t){a.forEach((n=>{n.id===e&&(n.sleep=!1,t&&n.listeners.update([],[]))}))},c.addComponent=function(e,t){a.forEach((n=>{n.id===e&&n.dependentComponents.push(t)}))},c.on=function(){if(l)return;l=!0,h(),document.addEventListener("keydown",d),document.addEventListener("keyup",d);const e=()=>{a.forEach((e=>{e.brush.end()})),document.removeEventListener("keyup",f),o.active()&&o.toggle()};n.on("deactivated",e),s.unbindDeactivated=()=>{n.removeListener("deactivated",e)};const t=()=>{document.addEventListener("keyup",f)};n.on("activated",t),s.unbindActivated=()=>{n.removeListener("activated",t)}},c.isOn=()=>l,c.off=function(){l&&(l=!1,m(),document.removeEventListener("keydown",d),document.removeEventListener("keyup",d),document.removeEventListener("keyup",f),s.unbindActivated(),s.unbindDeactivated())},c.lassoState=function(){return o.active()&&!(e.isLassoDisabled&&e.isLassoDisabled())},c.allFieldsLocked=function(){return function(){let e=r.map((e=>t.dataset(e).fields().filter((e=>"dimension"===e.type()))));return e=[].concat.apply([],e),e.length&&e.every((e=>e.raw().qLocked))}()},c}class Mn{isOn(){return!1}on(){console.warn("Can not turn on selections on this object")}off(){}}var In={create:e=>e.selectionsApi?Tn(e):new Mn};function kn(e,t,n,r,i){let o=!1;r=r||"tooltip",n=n||["self"];const a=e.brush(r),s={};function l(){if(o){e.component(i).emit("hide")}o=!1}return s.isOpen=function(){return o},s.closeTooltip=l,s.update=function(){const s=a.brushes(),u=e.getAffectedShapes(r,"and",n,t);s.length>=1?(o=!0,function(t){o=!0;const n={nodes:t};e.component(i).emit("show",{},n)}(u)):l()},s.toggleInterceptor=function(e){if(n.length>1){const t={},n=[];return e.forEach((e=>{t[e.key]||(t[e.key]={}),t[e.key][e.value]||(t[e.key][e.value]=!0,n.push(e))})),n}return e},s}var On={create:(...e)=>kn(...e)},Ln={formatMeasureValue:function(e,t){if(e.raw().isCustomFormatted)return e.formatter()(t.value.qText);const n=void 0!==t.value.qNum?t.value.qNum:t.value.qValue;return e.formatter()(n)}};const Nn=-3;const Pn=e=>({h:t,data:n,style:r})=>{const i=function(e,t){const n=e.chartInstance.dataset(e.dataPath),r=[],i=t.length-5,o=Math.min(5,t.length);for(let i=0;i<o;i++){const o=t[i],a={rows:[]};if(e.labelData){const t=[],i=e.labelData;let s=!1;for(let e=0;e<i.length;e++){const n=o.data[i[e]].value;if(-2===n.qElemNo||-2===n.qElemNumber){s=!0;break}t.push(o.data[i[e]].value.qText)}if(s)return;a.header=e.headerResolver(t),a.rows=e.measureRows.map((t=>{const r=o.data;return e.rowResolver(n.field(r[t].source.field),r[t],r)})).filter((e=>!!e));const l=Rn(e,o);l&&a.rows.unshift(l),r.push(a)}}i>0&&(r.numberInExcess=i);return r.rowCount=r[0]?r.length*r[0].rows.length:0,r}(e,n),o={h:t,style:r,rtl:"rtl"===e.direction,translator:e.translator};return e.renderer(o,i)};function Rn(e,t){var n,r,i;const 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;const s=[];e.data.forEach((e=>{const n=t.data[e];n&&s.push(n.value)}));const l=function(e){let t=-1;for(let n=0;n<e.length;n++)e[n]===Nn&&(t=n);return t}(s),{translator:u}=e,c=a.label;return{color:null===(i=t.attrs)||void 0===i?void 0:i.fill,label:c,value:-1!==l?u.get("properties.dimensionLimits.others"):o.label}}const Hn="dist-flow-tooltip",Fn=`#${Hn}`;function _n(){if(!document.querySelector(Fn)){const e=document.createElement("div");e.id=Hn,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 jn({key:e="tooltip",rtl:t,fontFamily:n,filter:r,content:i}){return{show:!0,key:e,type:"tooltip",layout:{displayOrder:3},beforeMount(){_n()},beforeUpdate(){_n()},destroyed(){!function(){const e=document.querySelector(Fn);e&&e.parentElement&&e.childElementCount<1&&e.parentElement.removeChild(e)}()},settings:{appendTo:()=>document.querySelector(Fn),content:i,filter:r,extract:e=>e.node,direction:t?"rtl":"ltr",placement:"bounds"},style:{arrow:{color:"#404040"},content:{display:"table","border-spacing":"4px",background:"rgba(64, 64, 64, 0.9)",opacity:"1",fontSize:"13px",fontFamily:n,"empty-cells":"show"},cell:{"max-width":"180px","word-break":"break-word","word-wrap":"break-word","overflow-wrap":"break-word",hyphens:"auto"}}}}const{detectTextDirection:zn}=Jt;const Vn={tooltipKey:"tooltip",data:[""],contexts:["tooltip"],headerResolver:e=>e.join(", "),rowResolver:(e,t)=>({value:Ln.formatMeasureValue(e,t),label:e.title()}),direction:"ltr",renderer:function(e,t){const{h:n,style:r,translator:i,rtl:o}=e,a=[],s=o?"right":"left";if(t.forEach((e=>{if(e.header){const t={...r.cell,textAlign:s,fontWeight:"bold",direction:zn(e.header)};a.push(n("tr",null,n("td",{style:t,colSpan:2},e.header)))}e.rows.forEach((e=>{let t=e.value;if(e.color){const r={display:"inline-block",width:10,height:10,"background-color":e.color,margin:"0 8px"},i=n("div",{style:r});t=o?[e.value,i]:[i,e.value]}const i=o?[":",e.label]:[e.label,":"],l={...r.cell,textAlign:s,direction:zn(e.label)},u={...r.cell,textAlign:o?"left":"right",direction:zn(e.value)};a.push(n("tr",null,n("td",{style:l},i),n("td",{style:u},t)))}))})),t.numberInExcess){const e=i.get("Object.ChartTooltip.NMore",t.numberInExcess),o={...r.cell,textAlign:s,direction:zn(e)};a.push(n("tr",null,n("td",{style:o,colSpan:2},e)))}return a}};function Bn(e,t,n){if(!e)throw Error("Tooltips-handler: Missing input");let r={},i=!1;const 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((e=>{l(r[e])}))}function l(e){e.brush.removeListener(e.treatAsDesktop?"update":"set-values",e.listeners.update),e.brush.removeListener("end",e.listeners.end),e.brush.removeInterceptor("set-values",e.action.toggleInterceptor)}function u(){Object.keys(r).forEach((e=>{r[e].action.closeTooltip()}))}function c(){u();for(const e in r)r[e].brush.clear()}return o.setUp=function(t){const o=Ht(!0,{},Vn,t);if(!o.componentKey)throw Error("Tooltips-handler.setUp: Missing required input");r[o.contexts[0]]&&i&&l(r[o.contexts[0]]);const s=function(e,t){return{brush:t.brush(e.contexts[0]),action:On.create(t,e.componentKey,e.data,e.contexts[0],e.tooltipKey),listeners:{},chartInstance:t,dataPath:e.dataPath,renderer:e.renderer,data:e.data,headerResolver:e.headerResolver,rowResolver:e.rowResolver,colorService:e.colorService,attrDimPath:e.attrDimPath,measureRows:e.measureRows,labelData:e.labelData,filterShapes:e.filterShapes,direction:e.environment.options.direction,theme:e.environment.theme,translator:e.environment.translator,treatAsDesktop:"touch"!==e.environment.deviceType}}(o,e);r[o.contexts[0]]=s,i&&a(s);const u=jn({key:o.tooltipKey,rtl:"rtl"===s.direction,fontFamily:s.theme.getStyle(n,"tooltip","fontFamily"),filter:(c=s.filterShapes,e=>c?c(e):function(e){const t=[];return e.forEach((e=>{-1===t.indexOf(e)&&"container"!==e.type&&t.push(e)})),t}(e)),content:Pn(s,o.dataPath)});var c;return o.chartBuilder.getSettings().components.push(u),{trigger:{on:s.treatAsDesktop?"over":"tap",action:"set",contexts:o.contexts,data:o.data,globalPropagation:"stop"},consume:o.contexts.map((e=>({context:e}))),component:u}},o.tearDown=function(){i&&s(),r=[]},o.closeTooltip=u,o.isOn=()=>i,o.on=function(){i||(i=!0,Object.keys(r).forEach((e=>{a(r[e])})),t&&t.on("mouseleave",c))},o.off=function(){i&&(i=!1,s(),t&&t.off("mouseleave",c),u())},o}var $n={create:(e,t,n)=>Bn(e,t,n)};const Un={generateHash:function(e){return function(e){let t=0;if(!e||!e.length)return t;for(let 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=Un.generateHash(t)}};const Wn={getDefaultHashDataForHyperCube:function(e,t,n){return function(e,t){const n=[];if(!e.qMeasures)return Promise.resolve(n);return e.qMeasures.forEach((e=>{e.qLibraryId?n.push(function(e,t){return t.getMeasure(e).then((e=>e.getProperties().then((e=>e.qMeasure.qDef))))}(e.qLibraryId,t)):n.push(Promise.resolve())})),Promise.all(n)}(e,n).then((e=>({drillLevel:Gn(t),dimensionExpressions:Kn(t),measureExpressions:e})))}};function Kn(e){return e.qDimensionInfo.map((e=>e.qGroupFieldDefs))}function Gn(e){const t=function(e){return Qe(e,"qDimensionInfo",[])}(e);return t.map((e=>e.qGroupPos))}const Yn={},Xn=Ht.bind(null,!0);function Jn(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}const Qn=Array.isArray,Zn=function(e){return void 0===e},er=function(e){return"function"==typeof e};function tr(e,t){return er(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function nr(e,t){const n=t.substring(1).split("/").slice(0,-1);let r;return n.forEach(((t,i)=>{i!==n.length&&(r=+t,e[r||t]=Zn(e[r||t])?Number.isNaN(+r)?{}:[]:e[t],e=e[r||t])})),e}function rr(e,t){if(Jn(e)&&Jn(t)){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n of Object.keys(e))if(!rr(e[n],t[n]))return!1;return!0}if(Qn(e)&&Qn(t)){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n++)if(!rr(e[n],t[n]))return!1;return!0}return e===t}Yn.generate=function(e,t,n){n=n||"";let r=[];return Object.keys(t).forEach((i=>{const o=function(e){return e&&(e=Xn({},{val:e}).val),e}(t[i]),a=e[i],s=`${n}/${i}`;rr(o,a)||tr(t,i)||(Zn(a)?r.push({op:"add",path:s,value:o}):Jn(o)&&Jn(a)?r=r.concat(Yn.generate(a,o,s)):Qn(o)&&Qn(a)?r=r.concat(function(e,t,n){let r=[];const i=e.slice();let o,a,s=-1;function l(e,t,n){if(e[n]&&Zn(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(let n=0,r=e.length;n<r;n++)if(e[n]&&e[n].qInfo.qId===t)return n;return-1}if(rr(t,i))return r;if(null===t[0]||!Zn(t[0])&&Zn(t[0].qInfo))return r.push({op:"replace",path:n,value:t}),r;for(o=i.length-1;o>=0;--o)s=l(t,i[o]&&i[o].qInfo&&i[o].qInfo.qId,o),-1===s?(r.push({op:"remove",path:`${n}/${o}`}),i.splice(o,1)):r=r.concat(Yn.generate(i[o],t[s],`${n}/${o}`));for(o=0,a=t.length;o<a;++o)s=l(i,t[o]&&t[o].qInfo&&t[o].qInfo.qId),-1===s?(r.push({op:"add",path:`${n}/${o}`,value:t[o]}),i.splice(o,0,t[o])):s!==o&&(r.push({op:"move",path:`${n}/${o}`,from:`${n}/${s}`}),i.splice(o,0,i.splice(s,1)[0]));return r}(a,o,s)):r.push({op:"replace",path:`${n}/${i}`,value:o}))})),Object.keys(e).forEach((i=>{Zn(t[i])&&!tr(e,i)&&r.push({op:"remove",path:`${n}/${i}`})})),r},Yn.apply=function(e,t){t.forEach((t=>{const n=nr(e,t.path);let r=t.path.split("/").splice(-1)[0];const i=r&&Number.isNaN(+r)?n[r]:n[+r]||n,o=t.from?t.from.split("/").splice(-1)[0]:null;if("add"===t.op||"replace"===t.op)if(Qn(n))"-"===r&&(r=n.length),n.splice(+r,"add"===t.op?0:1,t.value);else if(Qn(i)&&Qn(t.value)){const e=t.value.slice();i.length=0,i.push.apply(i,e)}else Jn(i)&&Jn(t.value)?(a=i,Object.keys(a).forEach((e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!tr(a,e)&&delete a[e]})),Xn(i,t.value)):n[r]=t.value;else if("move"===t.op){const i=nr(e,t.from);Qn(n)?n.splice(+r,0,i.splice(+o,1)[0]):(n[r]=i[o],delete i[o])}else"remove"===t.op&&(Qn(n)?n.splice(+r,1):delete n[r]);var a}))},Yn.clone=function(e){return Xn({},e)},Yn.createPatch=function(e,t,n){const r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},Yn.updateObject=function(e,t){Object.keys(e).length?Yn.apply(e,Yn.generate(e,t)):Xn(e,t)};class ir{constructor(e){this._model=e}setModel(e){this._model=e}saveSoftProperties(e,t){if(!this._model)return Promise.resolve(!1);let n=Yn.generate(e,t);return Ht(!0,e,t),n&&n.length?(n=n.map((e=>({qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}))),this._model.applyPatches(n,!0).then((()=>!0))):Promise.resolve(!1)}async mergeSoftPatches(){if(!this._model)return;const e=this._model.getProperties(),t=this._model.getEffectiveProperties(),n=await e,r=await t;if(n.qExtendsId)return;const i=Yn.generate(n,r);Yn.apply(n,i);const o=this;o._model.setProperties(n).then((()=>{o._model.clearSoftPatches()}))}}var or={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 ar={saveDerivedProperties:function(e,t,n,r){if(or.canModifyHardProperties(t))return e.setProperties(n);return new ir(e).saveSoftProperties(r,n)}};var sr={validate:function(e){if(!(e&&e.layout&&e.properties&&e.model&&e.hashData&&e.generateDerivedProperties))throw Error("Derived-properties: Missing input")}};function lr(){this._generationInProgress=!1}function ur(e){sr.validate(e);const t=e.properties,n=Un.generateHash(e.hashData);return!(!t.qUndoExclude||t.qUndoExclude.hashCode!==n)}lr.prototype.isDerivedUpToDate=ur,lr.prototype.updateDerivedProperties=function(e){if(sr.validate(e),this._generationInProgress)return Promise.resolve(!0);if(ur(e)){const t=e.layout.qUndoExclude&&e.layout.qUndoExclude.hashCode===e.properties.qUndoExclude.hashCode;return Promise.resolve(!t)}const t=this,n=e.model,r=e.layout,i=Ht(!0,{},e.properties),o=Ht(!0,{},i);return this._generationInProgress=!0,Un.updateHash(i,e.hashData),e.generateDerivedProperties(r,i).then((()=>ar.saveDerivedProperties(n,r,i,o).then((()=>(t._generationInProgress=!1,Promise.resolve(!0))))))},lr.prototype.addDefaultHyperCubeHash=function(e,t,n,r){return Wn.getDefaultHashDataForHyperCube(e,t,n).then((e=>Ht(!0,r,e)))};const cr={wrapExpression:function(e){const t=e.replace(/\]/g,"]]");return t?`[${t}]`:""}};const pr={replaceExpressionTokens:function(e,t,n){const r={start:n&&n.start||"{{",end:n&&n.end||"}}"};let i,o,a=e;for(const e in t)i=t[e],o=r.start+e+r.end,a=a.replace(dr(o,!0),i);return a},createRegExp:dr};function dr(e,t,n){const r=e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&");const i=n?`(${r})`:r;return t?new RegExp(i,"g"):new RegExp(i)}const fr={generateExpression:function(e,t){const n={};if(t)for(const e in t){const r=t[e],i=r.wrap?cr.wrapExpression(r.value):r.value;n[e]=i;(r.variations||[]).forEach((t=>{const r=hr(t,i,e);n[t]=r}))}return pr.replaceExpressionTokens(e,n)}};function hr(e,t,n){if(""===t)return"";const r=pr.createRegExp(n,!0,!0),i=e.split(r);let o="";return i.forEach((e=>{o+=e!==n?e:t})),o}const mr={generateHyperCubeDef:function(e,t,n,r,i){return function(e,t,n,r){const i={};let o,a;const s=[];let l;e.forEach((e=>{o=xr(e.match(vr("Dim"))),o.forEach((e=>{s.push(gr(t.qDimensions[e],r,e,n).then((t=>{i[`Dim[${e}]`]={value:t,wrap:!0}})))})),a=xr(e.match(vr("Mea"))),a.forEach((e=>{s.push(yr(t.qMeasures[e],r).then((t=>{i[`Mea[${e}]`]={value:t}})))}))})),l=s.length?Promise.all(s).then((()=>Promise.resolve(i))):Promise.resolve(i);return l}(e.dimensions.concat(e.measures),t,n,r).then((n=>{const r=Ht({},n,i),o=Ht(!0,{},t);return o.qDimensions=[],o.qMeasures=[],e.dimensions.forEach((e=>{o.qDimensions.push({qDef:{qFieldDefs:[`=${fr.generateExpression(e,r)}`]}})})),e.measures.forEach((e=>{o.qMeasures.push({qDef:{qDef:fr.generateExpression(e,r)}})})),o}))},getAllHyperCubeExpressions:async function(e,t,n){const r=e.qDimensions.map(((e,r)=>gr(e,n,r,t))),i=e.qMeasures.map((e=>yr(e,n)));return{dimensions:await Promise.all(r),measures:await Promise.all(i)}}};function gr(e,t,n,r){if(e.qLibraryId)return br(e.qLibraryId,"dimension",t,n,r);const i=r.qDimensionInfo[n].qGroupPos;return Promise.resolve(e.qDef.qFieldDefs[i])}function yr(e,t){return e.qLibraryId?br(e.qLibraryId,"measure",t):Promise.resolve(e.qDef.qDef)}function br(e,t,n,r,i){if(!n)return console.warn("No app provided, returning library id"),e;return n["dimension"===t?"getDimension":"getMeasure"](e).then((e=>e.getProperties().then((e=>"dimension"===t?e.qDim.qFieldDefs[i.qDimensionInfo[r].qGroupPos]:e.qMeasure.qDef))))}function vr(e){return new RegExp(`\\{\\{${e}\\[\\d\\]\\}\\}`,"g")}function xr(e){return e?e.map((e=>e.substr(6,1))):[]}function qr(e){return!Number.isNaN(parseFloat(e))&&Number.isFinite(+e)}function Dr(e){return!Number.isNaN(parseInt(e,10))&&parseFloat(e,10)===parseInt(e,10)}const Er={getBinSize:function(e){return Qe(e,"bins.binSize",z.BIN_SIZE)},getDerivedBinSize:function(e){return Qe(e,"qUndoExclude.bins.binSize",z.BIN_SIZE)},getDerivedBinOffset:function(e){return Qe(e,"qUndoExclude.bins.offset",z.OFFSET)},getDerivedBinCount:function(e){const t=Qe(e,"qUndoExclude.bins.binCount",z.BIN_COUNT);return qr(t)?t<1?1:Dr(t)?t:Math.ceil(t):z.BIN_COUNT},getBinCount:function(e){return Qe(e,"bins.binCount",void 0)},getBinOffset:function(e){return Qe(e,"bins.offset",z.OFFSET)},isAutoBin:function(e){return Qe(e,"bins.auto",z.AUTO)},isCountDistinct:function(e){return Qe(e,"bins.countDistinct",z.COUNT_DISTINCT)},getBinMode:function(e){return Qe(e,"bins.binMode",z.BIN_MODE)},isEmpty:function(e){return null==e||""===e}},Sr=Math.log(10),Cr=1e-9,wr=[1,1.5,2,3,4,5,6,10],Ar=[1,2,4,5,6,8,10],Tr=[2,4,5,10];function Mr(e,t){if(0===e)return 0;let n;const r=Math.floor(Math.log(Math.abs(e))/Sr),i=e/10**r;for(let e=0;e<t.length;e++)if(i<=t[e]){n=t[e];break}return(r>=0?n*10**r:n/10**-r)*(e<0?-1:1)}function Ir(e,t,n,r,i,o){return Math.floor(Math.abs(e-i)/r)+Math.floor(Math.abs(o-t)/r)}const kr={calculateBinSize:function(e,t,n){return function(e,t,n){if(!qr(e)||!qr(t)||!qr(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){let r,i,o,a,s,l,u,c,p,d,f,h,m=-1,g=wr;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+Cr,g=Ar):a=Math.abs(t/n);else o=(t+=Cr)-e,a=o/n;do{if(c=1,f=0,m>=0)for(p=1/Tr[m],d=1,g=[];d<=10;)g.push(Math.round(1e3*d)/1e3),d+=p;s=a;do{s=Mr(s*c,g),l=Math.floor(Math.log(s)/Sr),u=10**l,i=t===e?(Math.ceil(t/s)+Math.floor(n/2))*s:Math.ceil(t/s)*s,r=i-n*s;let o=0;for(h=u;(r>e||i<t)&&o<Tr.length;)r=Math.floor(e/h)*h,i=r+n*s,h=u/Tr[o++];l<1&&(u=10**(Math.abs(l)+1),i=Math.round(i*u)/u,r=Math.round(r*u)/u),c=1.1,f++}while((r>e||i<t)&&f<10);m++}while(Ir(e,t,0,a,r,i)>0&&m<Tr.length);return{binCount:n,offset:r,binSize:s}}(e,t,n=function(e){return e<1?1:Dr(e)?e:Math.ceil(e)}(n))}};const Or={getMappingValues:function(e){const t=Er.isAutoBin(e),n=Er.getBinMode(e);let r,i,o,a;const s=Er.isCountDistinct(e);return t||"maxCount"===n?(a=function(e){const t=Qe(e,"qHyperCube.qDimensionInfo.0",{});let n=t.qMin,r=t.qMax;n=qr(n)?n:1,r=qr(r)?r:1;const i=Er.getDerivedBinCount(e);return kr.calculateBinSize(n,r,i)}(e),r=a.binSize,i=a.offset,o=a.binCount):(r=Er.getBinSize(e),i=Er.getBinOffset(e)),{binSize:r,binOffset:i,binCount:o,distinct:s}},getMappings:function(e){const t={};return t.BinSize={value:`,${e.binSize}`},t.Label={value:0===e.binOffset?"":",'x'"},t.Offset={value:0===e.binOffset?"":`,${e.binOffset}`},t.Distinct={value:e.distinct?"Distinct ":""},t}};const Lr={generateHyperCubes:async function(e,t,n){const{app:r,translator:i}=n,o=Or.getMappingValues(e),a=Or.getMappings(o),s=mr.getAllHyperCubeExpressions(t.qHyperCubeDef,e.qHyperCube,r),l=mr.generateHyperCubeDef({dimensions:["Class(aggr({{Dim[0]}},{{Dim[0]}}){{BinSize}}{{Label}}{{Offset}})"],measures:["Count({{Distinct}}{{Dim[0]}})"]},t.qHyperCubeDef,e.qHyperCube,r,a),u=await s,c=await l;let p;p=Er.isAutoBin(e)?{qValueExpression:{qExpr:fr.generateExpression("=Ceil(Log10(Count({{Dim[0]}})) / Log10(2)) + 1",{"Dim[0]":{value:u.dimensions[0],wrap:!0}})}}:"maxCount"===Er.getBinMode(e)&&Er.isEmpty(t.bins.binCount)?Er.getDerivedBinCount(e):t.bins.binCount,tt(c,"qDimensions.0.qDef.qSortCriterias",[{qSortByNumeric:1}]),tt(c,"qDimensions.0.qDef.qFieldLabels",[e.qHyperCube.qDimensionInfo[0].qFallbackTitle]),tt(c,"qMeasures.0.qDef.qLabel",e.measureAxis.label||i.get("Visualization.Histogram.MeasureAxisLabel")),tt(t,"qUndoExclude.box.qHyperCubeDef",c),tt(t,"qUndoExclude.bins.binSize",o.binSize),tt(t,"qUndoExclude.bins.offset",o.binOffset),tt(t,"qUndoExclude.bins.binCount",p)}};var Nr={isOnComponentForRange:function(e,t,n){return!!e&&!!n.chart.componentsFromPoint({x:e.center.x,y:e.center.y}).filter((e=>-1!==t.indexOf(e.settings.key)))[0]},isOnComponentForLasso:function(e,t,n){return e&&n.chart.componentsFromPoint({x:e.center.x,y:e.center.y}).filter((e=>e.settings.key===t.keys.componentKey))[0]},isOnComponentForNavBtn:function(e,t,n){return n.chart.componentsFromPoint(e.center).some((e=>e.settings.key===t))}};var Pr={callLassoGesture:function(e,t,n){return{type:"Pan",options:{direction:N.DIRECTION_ALL,threshold:1,enable(r,i){if(e.lassoing)return t.isSelectionEnabled();const o=Nr.isOnComponentForLasso(i,n,this);return t.isSelectionEnabled()&&i&&((a=n.handlers).selectionHandler.lassoState()&&!a.selectionHandler.allFieldsLocked()||e.lassoing)&&o;var a},event:"lasso"},recognizeWith:n.handlers.scrollHandler?"drag":null,events:{lassostart(r){Nr.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(n){e.lassoing&&(n.clientX=n.pointers[0].clientX,n.clientY=n.pointers[0].clientY,t.doEmit(this.chart,"lasso","lassoMove",n))},lassoend(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(r){e.lassoing=!1,t.doEmit(this.chart,"lasso","lassoCancel",r),n.handlers.selectionHandler.resumeEngineCalls(n.keys.lassoBrushKey,!1)}}}}};var Rr={callMeasureRangeGesture:function(e,t,n,r){const i=n.keys.dimRangeBrushKey?"majorrange":"arearange";return{type:"Pan",options:{direction:n.isHorizontal?N.DIRECTION_HORIZONTAL:N.DIRECTION_VERTICAL,event:"measurerange",enable(i,o){if(!n.rangeSelStatus.isOpenMea)return!1;if(e.measureSelecting)return t.isSelectionEnabled();const a="measurerange"===n.active.gesture?[r,n.keys.componentKey]:[r],s=Nr.isOnComponentForRange(o,a,this);return e.measureSelecting=t.isSelectionEnabled()&&!!o&&!!s,e.measureSelecting&&!!n.keys.measureRangeBrushKey}},requireFailure:`lasso ${i}`,recognizeWith:n.handlers.scrollHandler?"drag":null,events:{measurerangestart(i){const o="measurerange"===n.active.gesture?[r,n.keys.componentKey]:[r];Nr.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(n){e.measureSelecting&&t.doEmit(this.chart,"rangeMeasure","rangeMove",n)},measurerangeend(r){e.measureSelecting&&(n.handlers.selectionHandler.resumeEngineCalls(n.keys.measureRangeBrushKey,!0),t.doEmit(this.chart,"rangeMeasure","rangeEnd",r),e.measureSelecting=!1)},measurerangecancel(){n.handlers.selectionHandler.resumeEngineCalls(n.keys.measureRangeBrushKey,!1),e.measureSelecting=!1}}}}};function Hr(e,t){let n;return n="x-axis"===e?"horizontal"===t?N.DIRECTION_VERTICAL:N.DIRECTION_HORIZONTAL:"horizontal"===t?N.DIRECTION_HORIZONTAL:N.DIRECTION_VERTICAL,n}var Fr={callAreaRangeGesture:function(e,t,n,r){const i=n.keys.dimRangeBrushKey?"majorrange":"measurerange";return{type:"Pan",options:{direction:Hr(r,n.isHorizontal),event:"arearange",enable(i,o){if(!n.rangeSelStatus.isOpenDim)return!1;if(e.minoring)return t.isSelectionEnabled();const a="arearange"===n.active.gesture?[r,n.keys.componentKey]:[r],s=Nr.isOnComponentForRange(o,a,this);return e.minoring=t.isSelectionEnabled()&&!!o&&!!s,e.minoring}},requireFailure:`lasso ${i}`,recognizeWith:n.handlers.scrollHandler?"drag":null,events:{arearangestart(i){const o="arearange"===n.active.gesture?[r,n.keys.componentKey]:[r];Nr.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(r){e.minoring&&(this.chart.brush(n.keys.areaBrushKey).clear(),t.doEmit(this.chart,"rangeMinor","areaMove",r))},arearangeend(r){e.minoring&&(n.handlers.selectionHandler.resumeEngineCalls(n.keys.areaBrushKey,!0),t.doEmit(this.chart,"rangeMinor","areaEnd",r),e.minoring=!1)},arearangecancel(){n.handlers.selectionHandler.resumeEngineCalls(n.keys.areaBrushKey,!1),e.minoring=!1}}}}};var _r={callDimensionRangeGesture:function(e,t,n,r){const i=n.keys.measureRangeBrushKey?"measurerange":"arearange";return{type:"Pan",options:{direction:n.isHorizontal?N.DIRECTION_VERTICAL:N.DIRECTION_HORIZONTAL,event:"majorrange",enable(i,o){if(!n.rangeSelStatus.isOpenDim)return!1;if(e.majoring)return t.isSelectionEnabled();const a="majorrange"===n.active.gesture?[r,n.keys.componentKey]:[r],s=Nr.isOnComponentForRange(o,a,this);return e.majoring=t.isSelectionEnabled()&&!!o&&!!s,e.majoring&&!!n.keys.dimRangeBrushKey}},requireFailure:`lasso ${i}`,recognizeWith:n.handlers.scrollHandler?"drag":null,events:{majorrangestart(i){const o="majorrange"===n.active.gesture?[r,n.keys.componentKey]:[r];Nr.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(n){e.majoring&&t.doEmit(this.chart,"rangeDim","rangeMove",n)},majorrangeend(r){e.majoring&&(n.handlers.selectionHandler.resumeEngineCalls(n.keys.dimRangeBrushKey,!0),t.doEmit(this.chart,"rangeDim","rangeEnd",r),e.majoring=!1)},majorrangecancel(){n.handlers.selectionHandler.resumeEngineCalls(n.keys.dimRangeBrushKey,!1),e.majoring=!1}}}}};var jr={callDragGesture:function(e,t,n,r,i){let o={};return{type:"Pan",options:{direction:n.isHorizontal?N.DIRECTION_VERTICAL:N.DIRECTION_HORIZONTAL,event:"drag",enable(r,i){return e.dragging?t.isNavigationEnabled():(e.dragging=t.isNavigationEnabled()&&!!i&&!!this.chart.componentsFromPoint({x:i.center.x,y:i.center.y}).filter((e=>e.settings.key===n.keys.componentKey))[0],e.dragging)}},requireFailure:r?`lasso ${t.getBrushConfig()}`:"",events:{dragstart(e){o={x:e.deltaX,y:e.deltaY};let t=-(n.isHorizontal?e.deltaY:e.deltaX)/n.handlers.scrollHandler.getItemSize();!n.isHorizontal&&i&&(t=-t),n.handlers.scrollHandler.getScrollApi().move(t)},dragmove(t){if(!e.dragging)return;let 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(){e.dragging&&(e.dragging=!1)},dragcancel(){e.dragging=!1}}}}};var zr={callNavBtnGesture:function(e,t){return{type:"Tap",options:{event:"navBtnTap",enable(n,r){return!(!r||!e())&&Nr.isOnComponentForNavBtn(r,t,this)}},events:{navBtnTap(e){this.chart.componentsFromPoint(e.center).forEach((t=>{const n=e.target,r=n?n.getAttribute("data-action"):"";if(r)return t.emit(r)}))}}}}};var Vr={create:function(e,t,n,r,i){const o={};t=t||"vertical";const a=r.lassoBrushKey||"select",s=r.dimRangeBrushKey||null,l=r.measureRangeBrushKey||null,u=r.areaBrushKey||null,c=r.legendBrushKey||null,p=!!e.selectionHandler&&e.selectionHandler.isOn(),d={dragging:!1,lassoing:!1,majoring:!1,minoring:!1,measureSelecting:!1},f={gesture:"",type:""},h="horizontal"===t,m=h?"y-axis":"x-axis",g=h?"x-axis":"y-axis";function y(e,t,n){if(f.gesture===e)return;let r=a;const i=t||f.chart;switch(f.gesture){case"majorrange":b(i,"rangeDim","rangeClear",n),r=s;break;case"measurerange":b(i,"rangeMeasure","rangeClear",n),r=l;break;case"arearange":b(i,"rangeMinor","areaClear",n),r=u}f.gesture=e;const o="range"===e?"range":"item";f.type&&f.type!==o&&i.brush(r).clear(),f.chart=t,f.type=o}function b(e,t,n,r){if(e){const i=e.component(t);i&&i.emit(n,r)}}let v=[];const x={isSelectionEnabled:()=>e.selectionHandler&&e.selectionHandler.isOn(),isNavigationEnabled:()=>e.scrollHandler&&e.scrollHandler.isOn(),doEmit:b,switchTo:y,getBrushConfig:function(){return s?l?"majorrange measurerange":"majorrange arearange":"measurerange arearange"}},q={handlers:e,keys:r,isHorizontal:h,active:f,rangeSelStatus:i};function D(){y("none"),d.majoring=!1,d.measureSelecting=!1,d.minoring=!1}return p&&(v=[{type:"Tap",options:{event:"rangeClearTap"},events:{rangeClearTap(e){y("none",this.chart,e),d.majoring=!1,d.measureSelecting=!1,d.minoring=!1}}}],v.unshift(zr.callNavBtnGesture(x.isNavigationEnabled,c)),v.push(Pr.callLassoGesture(d,x,q)),s?l?(v.push(_r.callDimensionRangeGesture(d,x,q,m)),e.selectionHandler.addComponent(s,{id:"rangeDim",clear:"rangeClear"}),v.push(Rr.callMeasureRangeGesture(d,x,q,g)),e.selectionHandler.addComponent(l,{id:"rangeMeasure",clear:"rangeClear"})):(v.push(_r.callDimensionRangeGesture(d,x,q,m)),e.selectionHandler.addComponent(s,{id:"rangeDim",clear:"rangeClear"}),v.push(Fr.callAreaRangeGesture(d,x,q,g)),e.selectionHandler.addComponent(u,{id:"rangeMinor",clear:"areaClear"})):(v.push(Rr.callMeasureRangeGesture(d,x,q,g)),e.selectionHandler.addComponent(l,{id:"rangeMeasure",clear:"rangeClear"}),v.push(Fr.callAreaRangeGesture(d,x,q,m)),e.selectionHandler.addComponent(u,{id:"rangeMinor",clear:"areaClear"}))),e.scrollHandler&&(v.push(jr.callDragGesture(d,x,q,p,n)),e.scrollHandler.getScrollApi().on("update",D)),o.gestures=v,o.destroy=function(){e.scrollHandler&&e.scrollHandler.getScrollApi().removeListener("update",D)},o}};const Br=(e,t,n)=>{const r={getOptions:(r,i)=>{const o=(e,t)=>({ref:`${i}.fontColor`,component:"color-picker",width:!1,defaultValue:()=>{const n=e.getStyle(t,`${i}.color`,"color");return{color:n,index:e.getDataColorPickerPalettes()[0].colors.indexOf(n)}}});return{labelSection:{component:"items",ref:"components",key:r,items:{fontFamily:{ref:`${i}.fontFamily`,component:"dropdown",options:()=>e.getOptions(`${i}.fontFamily`),defaultValue:()=>e.getDefaultValue(`${i}.fontFamily`)},...((t,n)=>({fontWrapper:{component:"inline-wrapper",items:{fontSize:{ref:`${i}.fontSize`,component:"dropdown",width:!0,options:()=>e.getOptions(`${i}.fontSize`),defaultValue:()=>e.getDefaultValue(`${i}.fontSize`)},fontColor:{...o(t,n)}}}}))(t,n)}}}}};return r},$r=(e,t,n,r,i)=>r({theme:e,translator:t,flags:i,config:{id:n,paths:["axis.title","axis.label.name","label.value","legend.title","legend.label"]}}),Ur=(e,t)=>(t.components||[]).find((t=>t.key===e)),Wr=(e,t,n,r)=>{var i,o,a,s,l;const u=r.isEnabled("CLIENT_IM_3364")?null===(i=Ur("axis",n))||void 0===i?void 0:i.axis:{};return{text:{fontFamily:(null==u||null===(o=u.title)||void 0===o?void 0:o.fontFamily)||t.getStyle(e,"axis.title","fontFamily"),fontSize:(null==u||null===(a=u.title)||void 0===a?void 0:a.fontSize)||t.getStyle(e,"axis.title","fontSize"),fill:(null==u||null===(s=u.title)||void 0===s||null===(l=s.fontColor)||void 0===l?void 0:l.color)||t.getStyle(e,"axis.title","color")}}},Kr=(e,t,n,r)=>{var i,o,a,s,l,u,c,p;const d=r.isEnabled("CLIENT_IM_3364")?null===(i=Ur("axis",n))||void 0===i?void 0:i.axis:{};return{labels:{fontFamily:(null==d||null===(o=d.label)||void 0===o||null===(a=o.name)||void 0===a?void 0:a.fontFamily)||t.getStyle(e,"axis.label.name","fontFamily"),fontSize:(null==d||null===(s=d.label)||void 0===s||null===(l=s.name)||void 0===l?void 0:l.fontSize)||t.getStyle(e,"axis.label.name","fontSize"),fill:(null==d||null===(u=d.label)||void 0===u||null===(c=u.name)||void 0===c||null===(p=c.fontColor)||void 0===p?void 0:p.color)||t.getStyle(e,"axis.label.name","color")}}},Gr=20;function Yr(e){const t=Qe(e,"qUndoExclude.box.qHyperCube.qDimensionInfo.0.qApprMaxGlyphCount",0);return Math.min(Gr,t)}const Xr={createSettings:function(e){return{settings:{labels:{maxGlyphCount:Yr(e)}}}}};const Jr={createSettings:function(e){const t=Er.isAutoBin(e),n=Er.getBinMode(e),r=Er.getDerivedBinSize(e);let i,o;if(t||"maxCount"===n){const t=Er.getDerivedBinOffset(e);i=t,o=t+Er.getDerivedBinCount(e)*r}else{const t=Qe(e,"qUndoExclude.box.qHyperCube.qDimensionInfo.0",{});i=t.qMin||0,o=(t.qMax||0)+r}return{component:{type:"linear",min:i,max:o}}}},Qr={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}},Zr=/^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/i,ei=/^rgba\((\d{1,3}),(\d{1,3}),(\d{1,3}),(\d(\.\d+)?)\)$/i,ti=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i,ni=/^#([A-f0-9])([A-f0-9])([A-f0-9])$/i,ri=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i,ii=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i,oi=Math.floor,ai=Math.round,si=_t.extend({init(){let e,t,n,r,i,o,a,s,l,u,c,p,d=0,f=0,h=0,m=1;if(this._invalid=!1,arguments[0]instanceof si)d=arguments[0]._r,f=arguments[0]._g,h=arguments[0]._b,m=arguments[0]._a,this._invalid=arguments[0]._invalid;else if(arguments.length<3)if("string"==typeof arguments[0])if(p=arguments[0],c=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(p))d=parseInt(c[1],10),f=parseInt(c[2],10),h=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(p))d=parseInt(c[1],10),f=parseInt(c[2],10),h=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(p))d=parseInt(c[1],16),f=parseInt(c[2],16),h=parseInt(c[3],16),m=1;else if(c=/^#([A-f0-9])([A-f0-9])([A-f0-9])$/i.exec(p))d=parseInt(c[1]+c[1],16),f=parseInt(c[2]+c[2],16),h=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(p)){switch(e=parseFloat(c[1]),t=parseFloat(c[3]),r=parseFloat(c[5]),e%=360,t/=100,r/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,r=r<0?0:r>1?1:r,o=r<=.5?2*r*t:(2-2*r)*t,a=e/60,s=o*(1-Math.abs(a%2-1)),l=[],a=Math.floor(a),a){case 0:l=[o,s,0];break;case 1:l=[s,o,0];break;case 2:l=[0,o,s];break;case 3:l=[0,s,o];break;case 4:l=[s,0,o];break;case 5:l=[o,0,s];break;default:l=[0,0,0]}u=r-.5*o,d=l[0]+u,f=l[1]+u,h=l[2]+u,d=ai(255*d),f=ai(255*f),h=ai(255*h),m=1}else if(c=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i.exec(p)){switch(e=parseFloat(c[1]),t=parseFloat(c[3]),r=parseFloat(c[5]),m=parseFloat(c[7]),e%=360,t/=100,r/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,r=r<0?0:r>1?1:r,o=r<=.5?2*r*t:(2-2*r)*t,a=e/60,s=o*(1-Math.abs(a%2-1)),l=[],a=Math.floor(a),a){case 0:l=[o,s,0];break;case 1:l=[s,o,0];break;case 2:l=[0,o,s];break;case 3:l=[0,s,o];break;case 4:l=[s,0,o];break;case 5:l=[o,0,s];break;default:l=[0,0,0]}u=r-.5*o,d=l[0]+u,f=l[1]+u,h=l[2]+u,d=ai(255*d),f=ai(255*f),h=ai(255*h)}else if(c=/^hsv\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(p)){switch(e=parseFloat(c[1]),t=parseFloat(c[3]),i=parseFloat(c[5]),e%=360,t/=100,i/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,i=i<0?0:i>1?1:i,o=i*t,a=e/60,s=o*(1-Math.abs(a%2-1)),l=[],a=Math.floor(a),a){case 0:l=[o,s,0];break;case 1:l=[s,o,0];break;case 2:l=[0,o,s];break;case 3:l=[0,s,o];break;case 4:l=[s,0,o];break;case 5:l=[o,0,s];break;default:l=[0,0,0]}u=i-o,d=l[0]+u,f=l[1]+u,h=l[2]+u,d=ai(255*d),f=ai(255*f),h=ai(255*h),m=1}else Qr[p.toLowerCase()]?(n=p.toLowerCase(),d=Qr[n].r,f=Qr[n].g,h=Qr[n].b,m="number"==typeof Qr[n].a?Qr[n].a:1):this._invalid=!0;else"number"==typeof arguments[0]&&arguments[0]>=0&&"argb"===arguments[1]?(m=(4278190080&arguments[0])>>>24,m/=255,d=(16711680&arguments[0])>>16,f=(65280&arguments[0])>>8,h=255&arguments[0]):"number"==typeof arguments[0]&&arguments[0]>=0?(d=(16711680&arguments[0])>>16,f=(65280&arguments[0])>>8,h=255&arguments[0]):this._invalid=!0;else arguments.length>=3?(d=arguments[0],f=arguments[1],h=arguments[2],m=arguments.length>=4?arguments[3]:1):this._invalid=!0;Number.isNaN(+d+f+h+m)&&(this._invalid=!0),this._r=oi(d),this._g=oi(f),this._b=oi(h),this._a=m,this._spaces={}},isInvalid(){return this._invalid},setAlpha(e){this._a=e,this._spaces={}},getAlpha(){return this._a},toRGB:function(){return this._spaces.rgb||(this._spaces.rgb=si.toRGB(this)),this._spaces.rgb},toRGBA:function(){return this._spaces.rgba||(this._spaces.rgba=si.toRGBA(this)),this._spaces.rgba},toString(){return this._spaces.rgb||(this._spaces.rgb=si.toRGB(this)),this._spaces.rgb},toHex:function(){return this._spaces.hex||(this._spaces.hex=si.toHex(this)),this._spaces.hex},toHSL:function(e){return this._spaces.hsl||(this._spaces.hsl=si.toHSL(this,e)),this._spaces.hsl},toHSLA:function(e){return this._spaces.hsla||(this._spaces.hsla=si.toHSLA(this,e)),this._spaces.hsla},toHSV(){const e=this.toHSVComponents();return`hsv(${e.h},${e.s},${e.v})`},toHSVComponents:function(){return this._spaces.hsvComp||(this._spaces.hsvComp=si.toHSVComponents(this)),this._spaces.hsvComp},toNumber:function(){return this._spaces.num||(this._spaces.num=si.toNumber(this)),this._spaces.num},isDark(){return this.isInvalid()||this.getLuminance()<125},getLuminance(){return void 0===this._lumi&&(this._lumi=.299*this._r+.587*this._g+.114*this._b),this._lumi},shiftLuminance(e){const t=this.toHSLA(),n=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i.exec(t),r=parseFloat(n[1]),i=parseFloat(n[3]);let o=parseFloat(n[5]);const a=parseFloat(n[7]);return o+=e,o=Math.max(0,Math.min(o,100)),`hsla(${r},${i},${o},${a})`},isEqual(e){return e instanceof si||(e=new si(e)),this._r===e._r&&this._g===e._g&&this._b===e._b},blend(e,t){return`rgba(${[oi(this._r+(e._r-this._r)*t),oi(this._g+(e._g-this._g)*t),oi(this._b+(e._b-this._b)*t),oi(this._a+(e._a-this._a)*t)].join(",")})`},createShiftedColor(e){(void 0===e||Number.isNaN(+e))&&(e=1);const t=this.getLuminance(),n=this._g<126?1:1+this._g/512,r=this.shiftLuminance(20*(t*n<220?.8+1/(t+1)*4:-(.8+t/255*1))*e);return new si(r)}});si.toRGB=function(e){if(e instanceof si)return`rgb(${[e._r,e._g,e._b].join(",")})`;"string"==typeof e&&(e=si.toNumber(e));return`rgb(${(16711680&e)>>16},${(65280&e)>>8},${255&e})`},si.toRGBA=function(e,t){if(e instanceof si)return`rgba(${[e._r,e._g,e._b,void 0!==t?t:e._a].join(",")})`;"string"==typeof e&&(e=si.toNumber(e));return`rgba(${(16711680&e)>>16},${(65280&e)>>8},${255&e},${void 0!==t?t:e._a})`},si.toHex=function(e){let t,n,r;return e instanceof si?(t=e._r.toString(16),n=e._g.toString(16),r=e._b.toString(16),1===t.length&&(t=`0${t}`),1===n.length&&(n=`0${n}`),1===r.length&&(r=`0${r}`),`#${[t,n,r].join("")}`):("string"==typeof e&&(e=si.toNumber(e)),t=((16711680&e)>>16).toString(16),n=((65280&e)>>8).toString(16),r=(255&e).toString(16),1===t.length&&(t=`0${t}`),1===n.length&&(n=`0${n}`),1===r.length&&(r=`0${r}`),`#${t}${n}${r}`)},si.toHSL=function(e,t){let n,r,i,o=0;"string"==typeof e&&(e=new si(e));const a=e._r/255,s=e._g/255,l=e._b/255,u=Math.max(a,s,l),c=Math.min(a,s,l);if(r=t?.21*a+.72*s+.07*l:(u+c)/2,u===c)n=0,o=0;else{switch(i=u-c,n=r>.5?i/(2-u-c):i/(u+c),u){case a:o=(s-l)/i+(s<l?6:0);break;case s:o=(l-a)/i+2;break;case l:o=(a-s)/i+4}o/=6}return`hsl(${360*o},${100*n},${100*r})`},si.toHSLA=function(e,t){let n,r,i,o=0;"string"==typeof e&&(e=new si(e));const a=e._r/255,s=e._g/255,l=e._b/255,u=e._a,c=Math.max(a,s,l),p=Math.min(a,s,l);if(r=t?.21*a+.72*s+.07*l:(c+p)/2,c===p)n=0,o=0;else{switch(i=c-p,n=r>.5?i/(2-c-p):i/(c+p),c){case a:o=(s-l)/i+(s<l?6:0);break;case s:o=(l-a)/i+2;break;case l:o=(a-s)/i+4}o/=6}return`hsla(${360*o},${100*n},${100*r},${u})`},si.toHSVComponents=function(e){let t,n,r=0;"string"==typeof e&&(e=new si(e));const i=e._r/255,o=e._g/255,a=e._b/255,s=Math.max(i,o,a),l=Math.min(i,o,a),u=s;if(s===l)t=0,r=0;else{switch(n=s-l,t=0===n?0:n/u,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*u}},si.toNumber=function(){if(1===arguments.length&&arguments[0]instanceof si)return(arguments[0]._r<<16)+(arguments[0]._g<<8)+arguments[0]._b;let e,t,n=0,r=0,i=0;return 1===arguments.length&&"string"==typeof arguments[0]&&(t=arguments[0],(e=/^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/i.exec(t))?(n=parseInt(e[1],10),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},si.blend=function(e,t,n){const r=(16711680&(e=si.toNumber(e)))>>16,i=(65280&e)>>8,o=255&e;return(r+(((16711680&(t=si.toNumber(t)))>>16)-r)*n<<16)+(i+(((65280&t)>>8)-i)*n<<8)+(o+((255&t)-o)*n)},si.getBlend=function(e,t,n){const 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 si(r,i,o,a)},si.isCSSColor=function(e){return!(arguments.length>1||"string"!=typeof e)&&(Zr.test(e)||ei.test(e)||ti.test(e)||ni.test(e)||ri.test(e)||ii.test(e)||Qr[e.toLowerCase()])},si.getBestContrast=function(e,t,n){const r=e.getLuminance();return Math.abs(r-t.getLuminance())>Math.abs(r-n.getLuminance())?t:n},si.getContrast=function(e,t){if(!e||!t)return;const n=e.getLuminance()/100,r=t.getLuminance()/100;return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)},si.isDark=function(){const e={getLuminance:si.prototype.getLuminance,isInvalid:si.prototype.isInvalid};return si.prototype.init.apply(e,[].slice.call(arguments)),si.prototype.isDark.call(e)},si.useDarkLabel=function(e,t){return e._a>.5?!e.isDark():!t};const li={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(e){const t=new si(e);return 0===t.getAlpha()?this.BLACK:t.isDark()?this.WHITE:this.BLACK},getContrastingGrey(e){const t=new si(e);return 0===t.getAlpha()?this.DARK_GREY:si.getBestContrast(t,new si(li.LIGHT_GREY),new si(li.DARK_GREY))},getBestContrast:(e,t,n)=>si.getBestContrast(new si(e),new si(t),new si(n)),getContrastingTransparent(e){const t=new si(e);return 0===t.getAlpha()||"none"===e?this.TRANSPARENT_BLACK:t.isDark()?this.TRANSPARENT_WHITE:this.TRANSPARENT_BLACK}};const ui={createSettings:function(e,t,n,r,i,o){const{theme:a}=e.environment,s=a.getColorPickerColor(t.color.bar.paletteColor),l=Er.getDerivedBinSize(t),u=[],c=[n.consume,r.consume,i.consume];return e._tooltipHandler.isOn()&&(u.push(o.box.trigger),c.push.apply(c,o.box.consume)),u.push(n.trigger),{key:"box-marker",settings:{box:{fill:s,stroke:li.getContrastingGrey(s).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:c},data:{extract:{field:"qDimensionInfo/0",props:{start:0,end:{field:"qMeasureInfo/0"},measure:{field:"qMeasureInfo/0",reduce:"first",value:e=>e,reduceLabel:"none"},binStart:{field:"qDimensionInfo/0",value:e=>e.qNum},binEnd:{field:"qDimensionInfo/0",value:e=>e.qNum+l},elemNo:{field:"qDimensionInfo/0"},bin:{field:"qDimensionInfo/0",value:e=>e}}}}}}};const ci={createSettings:function(e,t,n,r){const i=t.getStyles(),o=((e,t,n,r)=>{var i,o,a,s,l;const u=r.isEnabled("CLIENT_IM_3364")?null===(i=Ur("value",n))||void 0===i?void 0:i.label:{},c=(null==u||null===(o=u.value)||void 0===o?void 0:o.fontFamily)||t.label.value.fontFamily;let p=(null==u||null===(a=u.value)||void 0===a?void 0:a.fontSize)||t.label.value.fontSize;return p=parseFloat(p),{fontFamily:c,fontSize:p,fill:null==u||null===(s=u.value)||void 0===s||null===(l=s.fontColor)||void 0===l?void 0:l.color}})(0,i,e,r),a=o.fill||i.label.value.color;return{settings:{sources:[{strategy:{settings:{...o,labels:[{placements:[{fill:a},{fill:r.isEnabled("CLIENT_IM_3364")&&o.fill?a:e=>si.isDark(e.node.attrs.fill)?i.label.value.lightColor:i.label.value.darkColor}]}]}}}]}}}},pi="object.histogram";function di(e){return Qe(e,"qHyperCube.qDimensionInfo.0.qIsOneAndOnlyOne",!1)}const fi={createChartSettings:function(e,t){const n=e.isRtl(),r=Qe(t,"qHyperCube.qDimensionInfo.0",{}).qFallbackTitle||"",{theme:i,translator:o}=e.environment,a=gn.create({chartID:pi,theme:i,isRtl:n,flags:e.flags}),s=function(e){var t=e.theme,n=e.config,r=void 0===n?{}:n,i=r.id,o=r.resolve,a=void 0===o?[]:o,s=r.transform,l=void 0===s?[]:s,u=r.extend,c=void 0===u?[]:u,p={theme:t,matrix:mt(a),styles:void 0};return p.styles=yt({theme:t,id:i,transform:l,extend:c,matrix:p.matrix}),{getStyles:function(){return p.styles},getTheme:function(){return p.theme},setTheme:function(e){p.theme=e,p.styles=yt({theme:e,id:i,transform:l,extend:c,matrix:p.matrix})}}}({theme:i,config:{id:"histogram"}});let l={},u={},c={};e._selectionHandler.isOn()&&(e._selectionHandler.setUpStart(),l=e._selectionHandler.setUpBrush({contexts:["select"],data:["elemNo"],dataPath:"qUndoExclude/box"}),u=e._selectionHandler.setUpBrush({contexts:["select-dimension"],data:["elemNo"],dataPath:"qUndoExclude/box",isSingleSelect:di(t)}),c=e._selectionHandler.setUpBrush({dataPath:"qUndoExclude/box",contexts:["select-measure"],data:["end"]}),e._selectionHandler.setUpDone());const p={box:{}};e._tooltipHandler.isOn()&&(p.box=e._tooltipHandler.setUp({chartBuilder:a,environment:e.environment,data:[""],contexts:["boxTip"],componentKey:"box-marker",measureRows:["measure"],labelData:["bin"]}));const d=function(e){const t={};return e?(t.isOpenDim=!1,t.isOpenMea=!1):(t.isOpenDim=!0,t.isOpenMea=!0),t}(function(e){const 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)),f={scrollHandler:null,selectionHandler:e._selectionHandler};this._dependentActions&&this._dependentActions.destroy(),this._dependentActions=Vr.create(f,"vertical",n,{componentKey:"box-marker",lassoBrushKey:"select",dimRangeBrushKey:null,measureRangeBrushKey:"select-measure",areaBrushKey:"select-dimension"},d),a.addPreset("dimension-measure-chart",{isRtl:n,includeDimensionAxis:!0,orientation:"vertical",selectionsEnabled:e._selectionHandler.isOn(),theme:i,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:Jr.createSettings(t),measureAxisProperties:t.measureAxis,measureTitleText:t.measureAxis.label||o.get("Visualization.Histogram.MeasureAxisLabel"),dimensionAxisProperties:t.dimensionAxis,dimensionAxisSettings:Xr.createSettings(t),dimensionTitleText:r,gridlines:t.gridlines,hasNavigation:!1,isNavigationEnabledFn:()=>!1,refLines:t.refLine&&t.refLine.refLines,axisTitleStyle:Wr(pi,i,t,e.flags),axisLabelStyle:Kr(pi,i,t,e.flags)});const h=a.getSettings(),m=ui.createSettings(e,t,l,u,c,p);if(a.addComponent("box-marker",m),t.dataPoint&&t.dataPoint.showLabels){const n=ci.createSettings(t,s,pi,e.flags);a.addComponent("labels",n)}return e.addSnapshotChartSettings(h,t),h.scales.rangeSelSettings={type:"linear",min:h.scales.dimension.min,max:h.scales.dimension.max,source:"qDimensionInfo/0"},h}};const hi=En.extend("Histogram",{namespace:".histogram",init:function({environment:e,flags:t,lasso:n,picasso:r,$element:i,backendApi:o,selectionsApi:a,renderState:s}){this._super(r,i,e,o,a),this.flags=t,this.renderState=s,this.picassoElement.__do_not_use_findShapes=this.chartInstance.findShapes.bind(this.chartInstance),this._derivedProperties=new lr,this._selectionHandler=In.create({model:o.model,chartInstance:this.chartInstance,selectionsApi:a,selectPaths:["/qUndoExclude/box/qHyperCubeDef"],lasso:n}),this._tooltipHandler=$n.create(this.chartInstance,i,"object.histogram"),this.setDataPaths(["qUndoExclude/box/qHyperCube"])},updateConstraints:function(e){const 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 fi.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){const t=function(){const t=Qe(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:!t,RequireNumericDimension:!0},options:{bottom:!0,supportNegative:!1,explicitOnlyNanData:t,explicitRequireNumericDimension:(n=e.qHyperCube,n.qDimensionInfo.length>0&&-1===n.qDimensionInfo[0].qTags.indexOf("$numeric"))}};var n},updateChart:function(e,t){if(!e.qUndoExclude)return Promise.resolve();this._super(e,t)},updateData:function(e){const t=this;return t._super(e).then((()=>{if(t._destroyed)return Promise.reject();e=t.layout;const n={height:Math.min(e.qHyperCube.qSize.qcy,1e3),width:2},r=t.backendApi.model;return!!this.layout.snapshotData?Promise.resolve():r.getEffectiveProperties().then((i=>t._destroyed?Promise.reject():t._derivedProperties.addDefaultHyperCubeHash(i.qHyperCubeDef,e.qHyperCube,t.environment.app,function(e,t){return{box:t.qHyperCubeDef,binMappings:Or.getMappingValues(e),binProperties:t.bins,measureAxis:t.measureAxis,version:"2.0"}}(e,i)).then((o=>{if(t._destroyed)return Promise.reject();const a={layout:e,properties:i,model:r,hashData:o,generateDerivedProperties:(e,n)=>Lr.generateHyperCubes(e,n,t.environment)};return t._derivedProperties.isDerivedUpToDate(a)?e.qUndoExclude?(t.renderState.restore(),t.backendApi.updateCache(e.qUndoExclude.box),t.getData(t.backendApi,e.qUndoExclude.box.qHyperCube,n)):Promise.resolve():(t.renderState.pending(),t._derivedProperties.updateDerivedProperties(a))}))))}))},paint:function(){const e=this.layout.qUndoExclude;return e&&e.box&&e.box.qHyperCube.qDataPages.length?this._super():Promise.resolve(!1)},isLassoDisabled:function(){return!1}});class mi{constructor(e){this.model=e,this.path="/qUndoExclude/box/qHyperCubeDef"}setCacheOptions({maxStackedValues:e}){}updateCache(e){}getData(e){return this.model.getHyperCubeData(this.path,e)}}var gi={onChangeCalcCond:function(e){var t,n;const 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)}};const yi=(e,t,n)=>({component:"styling-panel",chartTitle:"Object.Histogram",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",ref:"components",useGeneral:!0,useBackground:e,items:n&&null!=n&&n.isEnabled("CLIENT_IM_3364")?{axisTitleSection:{translation:"properties.axis.title",component:"panel-section",items:t.getOptions("axis","axis.title")},axisLabelSection:{translation:"properties.axis.label",component:"panel-section",items:t.getOptions("axis","axis.label.name")},valueLabelSection:{translation:"properties.value.label",component:"panel-section",items:t.getOptions("value","label.value")}}:void 0}),bi="maxCount",vi="size";function xi(e){return!(e.bins&&e.bins.auto)}function qi(e){return xi(e)&&e.bins.binMode===bi}function Di(e){var t,n;const{translator:r,flags:i}=e,o=null==e||null===(t=e.flags)||void 0===t?void 0:t.isEnabled("SENSECLIENT_IM_2021_STYLINGPANEL_HISTOGRAM"),a=null==e||null===(n=e.flags)||void 0===n?void 0:n.isEnabled("SENSECLIENT_IM_2021_HISTOGRAM_BG"),s=e.anything.sense.theme,l={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:()=>{const{primary:e}=s.getDataColorSpecials(),t=s.getDataColorPickerPalettes()[0].colors,n=t.indexOf(e);return{index:-1===n?Math.min(6,t.length-1):n}}}}}}},u="object.histogram",c=$r(s,r,u,At,i),p=Br(c,s,u),d={type:"items",translation:"properties.presentation",items:{styleEditor:o&&yi(a,p,null==e?void 0:e.flags),gridLines:{type:"items",snapshot:{tid:"property-gridLines"},items:{showGridLines:{ref:"gridlines.auto",type:"boolean",translation:"properties.gridLine.spacing",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},gridSpacing:{ref:"gridlines.spacing",type:"number",component:"dropdown",defaultValue:2,options:[{value:0,translation:"properties.gridLine.noLines"},{value:2,translation:"properties.gridLine.medium"},{value:3,translation:"properties.gridLine.narrow"}],show:e=>e.gridlines&&!e.gridlines.auto}}},showLabels:{ref:"dataPoint.showLabels",type:"boolean",translation:"properties.dataPoints.labelmode",component:"switch",defaultValue:!1,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],snapshot:{tid:"property-dataPoints"}}}},f={items:{labels:{items:{header:{show(e){var t;return null===(t=e.qHyperCubeDef.qDimensions)||void 0===t?void 0:t.length}},pointLabels:{component:"checkbox",ref:"dataPoint.showLabels",type:"boolean",translation:"Simple.Label.Value",show(e){var t;return null===(t=e.qHyperCubeDef.qDimensions)||void 0===t?void 0:t.length}},dimensionTitle:{component:"checkbox",ref:"dimensionAxis.show",type:"string",translation:"Simple.Label.XAxis.Hide",defaultValue:"all",show(e){var t;return null===(t=e.qHyperCubeDef.qDimensions)||void 0===t?void 0:t.length},convertFunctions:{get:(e,t,n,r)=>"labels"===r.dimensionAxis.show||"none"===r.dimensionAxis.show,set(e,t,n,r,i){i.dimensionAxis.show=e?"labels":"all"}}},measureTitle:{component:"checkbox",ref:"measureAxis.show",type:"string",translation:"Simple.Label.YAxis.Hide",defaultValue:"all",show(e){var t;return null===(t=e.qHyperCubeDef.qDimensions)||void 0===t?void 0:t.length},convertFunctions:{get:(e,t,n,r)=>"labels"===r.measureAxis.show||"none"===r.measureAxis.show,set(e,t,n,r,i){i.measureAxis.show=e?"labels":"all"}}}}}}},h={uses:"settings",items:{simpleLabels:f,presentation:d,colors:l,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}}}}}}},m={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond",change:gi.onChangeCalcCond}}},refLines:{uses:"reflines",items:{colorBackground:{show:!1}}}}},g={ref:"bins.binMode",type:"string",component:"dropdown",options:[{value:bi,translation:"Visualization.Histogram.Binning.NumberOfBinsOption"},{value:vi,translation:"Visualization.Histogram.Binning.BarWidthOption"}],defaultValue:bi,show:e=>xi(e)},y={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:e=>!xi(e)},mode:g,binCount:{ref:"bins.binCount",type:"number",expression:"optional",expressionType:"ValueExpression",translation:"Visualization.Histogram.Binning.BinCount",defaultValue:"",convertFunctions:{get(e,t,n){const r=n.properties.bins.binCount;return Er.isEmpty(r)?Er.getDerivedBinCount(n.layout):e(null)||""},set(e,t,n){t(n.type,e,void 0)}},show:qi},binMessage:{component:"text",translation:"Visualization.Histogram.Binning.BinCountRounding",show(e){const t=Qe(e,"bins.binCount"),n="object"==typeof t;return qi(e)&&!Er.isEmpty(t)&&!n&&!Dr(t)&&t>0}},minBinMessage:{component:"text",translation:"Visualization.Histogram.Binning.BinCountMin",show(e){const t=Qe(e,"bins.binCount");return!!(qi(e)&&!Er.isEmpty(t)&&t<=0)}},binSize:{ref:"bins.binSize",type:"number",expression:"optional",expressionType:"ValueExpression",defaultValue:10,show:e=>xi(e)&&e.bins.binMode===vi,translation:"Visualization.Histogram.Binning.BinSize"},offset:{ref:"bins.offset",type:"number",expression:"optional",expressionType:"ValueExpression",show:e=>xi(e)&&e.bins.binMode===vi,translation:"Visualization.Histogram.Binning.Offset"},distinct:{ref:"bins.countDistinct",type:"boolean",defaultValue:!1,component:"checkbox",translation:"Visualization.Histogram.CountDistinct"}}};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:e=>"OTHER_COUNTED"===Qe(e,"qOtherTotalSpec.qOtherMode")},otherCounted:{show:e=>"OTHER_COUNTED"===Qe(e,"qOtherTotalSpec.qOtherMode")},otherLimitMode:{show(e){const t=Qe(e,"qOtherTotalSpec.qOtherMode");return"OTHER_ABS_LIMITED"===t||"OTHER_REL_LIMITED"===t}},otherLimit:{show(e){const t=Qe(e,"qOtherTotalSpec.qOtherMode");return"OTHER_ABS_LIMITED"===t||"OTHER_REL_LIMITED"===t}},calculatedAgainstMessage:{show:!0,label(){const e=r.get("properties.histogram.staticMeasureName");return r.get("Properties.DimensionLimits.CalculatedAgainst",e)}}}},others:{show:!1,items:{suppressOther:{defaultValue:!0}}}}}}},bins:y,addons:m,settings:h}}}var Ei={type:"items",component:"accordion",items:{data:{uses:"data",items:{dimensions:{translation:"Common.Fields"}}}}};var Si={getExportRawDataOptions:function(e,t,n){return e.addItem({translation:"contextMenu.export",tid:"export",select(){n.show(t.model,"/qUndoExclude/box/qHyperCubeDef")}}),Promise.resolve()}};const Ci="qUndoExclude.box";function wi(e){var t;if(null!==(t=e.anything)&&void 0!==t&&t.sense)return{definition:Di(e),softDefinition:Ei,support:{cssScaling:!1,snapshot:!0,export:!0,exportData:!0,sharing:!0,viewData:!0},importProperties:(t,n,r,i)=>{const o=B(e);r.mapProperties();const a={defaultDimension:r.getDefaultDimensionProperties(),defaultMeasure:r.getDefaultMeasureProperties()};return j.hypercube.importProperties({exportFormat:t,initialProperties:n,dataDefinition:o,defaultPropertyValues:a,hypercubePath:i})},exportProperties:(e,t,n)=>j.hypercube.exportProperties({propertyTree:e,hyperCubePath:n?Ci:t,viewDataMode:n}),requireNumericDimension:!0,exportTableProperties(e){const t=Ci;return j.hypercube.exportProperties({propertyTree:e,hypercubePath:t,viewData:!0})},getExportRawDataOptions:Si.getExportRawDataOptions}}}}}));
|
|
26
|
+
e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,i,o,a,s,l,u,c,p,f=e.length,d=e.search(/[0-9\-\+#]/),h=d>0?e.substring(0,d):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),y=f-g,b=e.substring(y,y+1),v=y+("."===b||","===b?1:0),x=g>0?e.substring(v,f):"";if(n=(t="-"===(e=e.substring(d,v)).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"),(!(u=t.split("."))[1]||u[1]&&u[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(;u[0].length<e[0].length-a;)u[0]="0"+u[0];else 0==+u[0]&&(u[0]="");if((t=t.split("."))[0]=u[0],l=c[1]&&c[c.length-1].length){for(m="",y=(p=t[0]).length%l,f=p.length,v=0;v<f;v++)m+=p.charAt(v),!((v-y+1)%l)&&v<f-l&&(m+=o);t[0]=m}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),h+(n?"-":"")+r+x}},jn({exports:{}});const Jn=/xyz/.test((()=>{}))?/\b_super\b/:/.*/,Qn=function(){};Qn.extend=function e(t,n){const r=this.prototype;"string"!=typeof t&&(n=t,t="Class");const i=Object.create(this.prototype);for(const e in n)i[e]="function"==typeof n[e]&&"function"==typeof r[e]&&Jn.test(n[e])?function(e,t){return function(){const n=this._super;this._super=r[e];const i=t.apply(this,arguments);return this._super=n,i}}(e,n[e]):n[e];if(!/^[_a-z][_a-z\d]*$/i.test(t))throw new Error("Invalid subclass name. Alphanumericals only.");const o=new Function(`return (function ${t}(){ typeof this.init === 'function' && this.init.apply(this, [].slice.call(arguments)) });`)();return o.prototype=i,o.prototype.constructor=o,o.extend=e,o};const Zn={getChar(e){let t,n=e;return n>9?(t=65+n-10,t>90&&(t+=6)):n=`${n}`.charCodeAt(0),[48,111,79,105,73,108].indexOf(t)>-1?this.getChar(n+1):String.fromCharCode(t)},base62(e){const t=this.getChar(e%62),n=Math.floor(e/62);return n>0?this.base62(n)+t:t},id(){return this.base62(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};function er(){return Zn.id()}const tr="scrollbar";function nr(e,t,n){return"y"===e?rr(t,n):function(e){return"far"===e?"top":"bottom"}(t)}function rr(e,t){const n=e||"near";return t&&"near"===n||!t&&"far"===n?"right":"left"}var ir={getAxisDock:nr,getOppositeAxisDock:function(e,t,n){return nr(e,"far"===t?"near":"far",n)},getYAxisDock:rr};const or=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),ar=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞יִײַ-ﬨשׁ-ﭏ]"),sr=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]");function lr(e){return or.test(e)}function ur(e){return ar.test(e)||sr.test(e)}var cr={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),detectTextDirection:function(e){const t=e?e.length:0;let n,r;for(n=0;n<t;n++){if(r=e[n],lr(r))return"ltr";if(ur(r))return"rtl"}return"ltr"}};var pr={lineSettings:function(e,t){var n;const 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 Ht(!0,r,e||{})},lineLabelSettings:function(e,t){const n=t&&t.chartID;let r=t.theme.getStyle(n,"referenceLine.label.name","color");const 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"),Ht(!0,{value:0,line:{stroke:"transparent"},label:{align:"center",vAlign:"middle",text:"",fill:r,fontFamily:o,fontSize:i,maxWidthPx:135}},e||{})},isVisible:e=>e&&!1!==e.show&&0!==e.show&&"0"!==e.show&&void 0!==e.refLineExpr,getRefLineTitle:function({refLine:e,label:t,valueString:n}){return!1!==e.showValue?!1!==e.showLabel?`${t} ${cr.lrm}(${n})${cr.lrm}`:`${cr.lrm}(${n})${cr.lrm}`:!1!==e.showLabel?t:""}};const fr={SHOW_AXIS_LABELS_OPTIONS:["all","labels"],SHOW_TITLE_OPTIONS:["all","title"],HORIZONTAL:"horizontal",VERTICAL:"vertical",LAYOUTSETTINGS:{lasso:{displayOrder:1e4},rangeDim:{displayOrder:1e4},rangeMeasure:{displayOrder:1e4},rangeMinor:{displayOrder:1e4},scrollBar:{minimumLayoutMode:"SPARK",prioOrder:-1,displayOrder:100},refLines:{layout:{minimumLayoutMode:"SPARK",prioOrder:60,displayOrder:1110}},measureAxisTitle:{minimumLayoutMode:"XSMALL",prioOrder:30,displayOrder:90},dimensionAxisTitle:{minimumLayoutMode:"XSMALL",prioOrder:30,displayOrder:90},measureAxis:{minimumLayoutMode:"XSMALL",prioOrder:10,displayOrder:80},dimensionAxis:{minimumLayoutMode:"XSMALL",prioOrder:10,displayOrder:80},gridLines:{minimumLayoutMode:"XSMALL",displayOrder:-100},refLinesLabels:{minimumLayoutMode:"SMALL",prioOrder:60,displayOrder:0}}};fr.DEFAULT_CHART_ORIENTATION=fr.HORIZONTAL;const dr=100;function hr(e,t){const n=t||{},r=n.measureAxisProperties||{},i=n.dimensionAxisProperties||{},o=n.orientation||fr.DEFAULT_CHART_ORIENTATION,a=o===fr.HORIZONTAL,s=a?"x":"y",l=a?"y":"x",u=fr.SHOW_AXIS_LABELS_OPTIONS,c=fr.SHOW_TITLE_OPTIONS,p=u.includes(r.show),f=!!n.measureTitleText&&c.includes(r.show),d=n.includeDimensionAxis&&u.includes(i.show),h=n.includeDimensionAxis&&!!n.dimensionTitleText&&c.includes(i.show),m=n.gridlines&&!(!n.gridlines.auto&&0===n.gridlines.spacing),g=n.refLines&&n.refLines.some((e=>e.show)),y=[];if(p&&function(e,t,n,r){let i={scale:"measure",settings:t.axisLabelStyle||{},forceBounds:r&&!r.autoMinMax&&r.showBounds};i=Ht(i,fr.LAYOUTSETTINGS.measureAxis);const o=gr(t,n);e.addComponent(`${n}-axis`,i,o)}(e,n,s,r),f&&function(e,t,n){let r={text:t.measureTitleText,style:t.axisTitleStyle||{}};r=Ht(r,fr.LAYOUTSETTINGS.measureAxisTitle);const i=function(e,t){return gr(e,t)}(t,n);e.addComponent(`${n}-axis-title`,r,i)}(e,n,s),function(e,t,n,r){let i=t.measureScaleSettings;const o={isRtl:t.isRtl,source:t.measureSource,orientation:n,measureAxisProperties:r};r&&r.spacing>0&&(i=Ht(!0,i||{},{component:{ticks:{distance:r.spacing*dr}}}));e.addScale("measure-scale",i,o)}(e,n,o,r),d&&function(e,t,n){let r={scale:"dimension",settings:t.axisLabelStyle||{}};r=Ht(r,fr.LAYOUTSETTINGS.dimensionAxis);const i=yr(t,n);Ht(!0,r,t.dimensionAxisSettings||{}),e.addComponent(`${n}-axis`,r,i)}(e,n,l),h&&function(e,t,n){let r={text:t.dimensionTitleText,style:t.axisTitleStyle||{}};r=Ht(r,fr.LAYOUTSETTINGS.dimensionAxisTitle);const i=function(e,t){return yr(e,t)}(t,n);e.addComponent(`${n}-axis-title`,r,i)}(e,n,l),n.includeDimensionAxis&&function(e,t,n){const r={isRtl:t.isRtl,source:t.dimensionSource,orientation:n===fr.HORIZONTAL?fr.VERTICAL:fr.HORIZONTAL};e.addScale("dimension-scale",t.dimensionScaleSettings,r)}(e,n,o),m&&function(e,t,n){let r={ticks:{show:!0},minorTicks:{show:!t.auto&&!t.auto&&3===t.spacing}};r=Ht(r,fr.LAYOUTSETTINGS.gridLines),r[n]={scale:"measure"},e.addComponent("grid-line",r)}(e,n.gridlines,s),n.hasNavigation&&function(e,t,n,r){const i=e.getSettings();i.scroll={dimension:{viewSize:n.scrollSettings&&n.scrollSettings.viewSize||0,max:n.scrollSettings&&n.scrollSettings.max||0}};const o={isRtl:n.isRtl,chartID:n.chartID,isHorizontal:!r},a=Ht({},fr.LAYOUTSETTINGS.scrollBar);e.addComponent("scrollbar",a,o),mr(t,function(e){function t(t,n){if(!n||!e())return!1;const r={x:n.center.x-n.deltaX,y:n.center.y-n.deltaY};return this.chart.componentsFromPoint(r).some((e=>e.settings.key===tr))}const n={type:"Tap",options:{enable:t},events:{tap(e){this.chart.component(tr).emit("tap",e)}}},r={type:"Pan",options:{enable:t},events:{panstart(e){this.chart.component(tr).emit("panStart",e)},pan(e){this.chart.component(tr).emit("panMove",e)},panend(e){this.chart.component(tr).emit("panEnd",e)},pancancel(e){this.chart.component(tr).emit("panCancel",e)}}};return[n,r]}(n.isNavigationEnabledFn))}(e,y,n,a),g&&function(e,t,n,r){const i=ir.getAxisDock(n,r.dock,t.isRtl);let o={key:"ref-line",style:{oob:{show:!1}},lines:{x:[],y:[]}};o=Ht(o,fr.LAYOUTSETTINGS.refLines);let a={key:`ref-line-labels-${er()}`,require:["renderer","chart"],dock:ir.getOppositeAxisDock(n,r.dock,t.isRtl),preferredSize(){if("x"===n)return 26;const t=this.renderer.measureText,r=this.chart.formatter({data:e.settings.scales.measure.data}),i=a.lines.y.map((e=>{const n=!1!==e.label.showValue?`(${r(e.value)})`:"",i=`${e.label.text} ${n}`,o=e.label.text&&n?` ${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];for(let e=1;e<i.length;e++)i[e].wanted>o.wanted&&(o.wanted=i[e].wanted),i[e].required>o.required&&(o.required=i[e].required);const s=12;return o.required+s>100?o.required+s:Math.min(o.wanted+s,100)},lines:{x:[],y:[]}};a=Ht(a,fr.LAYOUTSETTINGS.refLinesLabels),t.refLines.forEach((r=>{if(!r.show)return;const s=r.refLineExpr&&r.refLineExpr.value,l=Ht(!0,{},t,{paletteColor:r.paletteColor,style:r.style,chartID:e.options.chartID}),u=pr.lineSettings({scale:"measure",dir:n,value:s},l);o.lines[n].push(u);const c=pr.lineLabelSettings({scale:"measure",value:s,label:{text:!1!==r.showLabel?r.label:"",showValue:!1!==r.showValue}},l);"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){const n={brushKey:t.brushKey,brushComponents:t.brushComponents,brushData:t.brushData};e.addComponent("lasso",fr.LAYOUTSETTINGS.lasso,n)}(e,n.lasso||{})}if(n.enableDimRange&&n.includeDimensionAxis&&n.selectionsEnabled){!function(e,t,n,r,i){let o={key:"rangeDim"};o=Ht(o,fr.LAYOUTSETTINGS.rangeDim);const 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,yr(n,l).dock,n.isRtl)}if(n.enableMeasureRange&&n.selectionsEnabled){!function(e,t,n,r,i){let o={key:"rangeMeasure"};o=Ht(o,fr.LAYOUTSETTINGS.rangeMeasure);const 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,gr(n,s).dock,n.isRtl)}if(n.enableAreaRange&&n.selectionsEnabled){!function(e,t,n,r,i){let o={key:"rangeMinor"};o=Ht(o,fr.LAYOUTSETTINGS.rangeMinor);const 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,yr(n,l).dock,n.isRtl)}n.brushActions&&mr(y,n.brushActions),y.length&&function(e,t){e.addInteraction({},{gestures:t})}(e,y)}function mr(e,t){t.forEach((t=>{e.push(t)}))}function gr(e,t){return{dock:e.measureAxisProperties&&e.measureAxisProperties.dock,direction:t,isRtl:e.isRtl}}function yr(e,t){return{dock:e.dimensionAxisProperties&&e.dimensionAxisProperties.dock,direction:t,isRtl:e.isRtl}}function br(e,t){const 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 Ht(!0,{},o,e||{})}function vr(e){var t;if(null!=e&&null!==(t=e.isEnabled)&&void 0!==t&&t.call(e,"IM_5791_SVG_LABEL_RENDERING"))return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?void 0:"svg"}function xr(e,t){const 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"),l=t.theme.getStyle(n,"axis.title","color"),u=t.theme.getStyle(n,"axis.label.name","color"),c=t.theme.getStyle(n,"axis.label.name","fontSize"),p=t.theme.getStyle(n,"axis.title","fontFamily"),f=t.theme.getStyle(n,"axis.label.name","fontFamily"),d={key:"axis",type:"axis",renderer:vr(t.flags),dock:ir.getAxisDock(i,r,o),brush:{trigger:[],consume:[]},settings:{title:{fontSize:s,fontFamily:p,fill:l},line:{show:!0,strokeWidth:1,stroke:a},labels:{fill:u,fontSize:c,fontFamily:f,tiltAngle:o?-40:40,maxEdgeBleed:75,maxSize:150,mode:"auto"},ticks:{stroke:a},minorTicks:{stroke:a}}},h=Ht(!0,{},d,e||{});return h.brush.consume.forEach((e=>{e.style.active.strokeWidth=0})),h}function qr(e,t){const 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"),l=t.theme.getStyle(n,"axis.title","fontFamily"),u={key:"text",type:"text",dock:ir.getAxisDock(i,r,o)||"bottom",displayOrder:0,style:{text:{fontSize:a,fontFamily:l,fill:s}}};return Ht(!0,{},u,e||{})}br.measureScale=function(e,t){let n=(t||{}).source||[];"string"==typeof n&&(n=[n]);const r={name:"measure",component:{expand:.1,data:{fields:n.map((e=>({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));const o=br(Ht(!0,r,e||{}),t);return!(e&&e.component&&void 0!==e.component.invert)&&t&&"vertical"===t.orientation&&(o.component.invert=!o.component.invert),o},br.dimensionScale=function(e,t){const n={name:"dimension",component:{trackBy:"id",type:"band",data:{extract:{field:t&&t.source||"",props:{label:e=>e.qText||""}}},label:e=>e.datum.label.value}};return br(Ht(!0,n,e||{}),t)},xr.xAxis=function(e,t){return xr(Ht(!0,{key:"x-axis",scale:"x"},e||{}),t)},xr.yAxis=function(e,t){const n=t&&t.dock,r=t&&t.isRtl,i={key:"y-axis",scale:"y",dock:ir.getYAxisDock(n,r)};return xr(Ht(!0,i,e||{}),t)},qr.xAxisTitle=function(e,t){return qr(Ht(!0,{key:"x-axis-title"},e||{}),t)},qr.yAxisTitle=function(e,t){const n=t&&t.dock,r=t&&t.isRtl,i={key:"y-axis-title",dock:ir.getYAxisDock(n,r)||"left"};return qr(Ht(!0,i,e||{}),t)};var Dr={getBublesAlign:function(e,t,n){let r=e&&"far"!==t||!e&&"far"===t;return!e&&n&&(r=!r),r?"start":"end"},getDock:function(e,t){const n=[];let r;return e&&n.push(`@${e}`),t&&n.push(`@${t}`),n.length&&(r=n.join(",")),r}};const Sr={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 Er(){return Sr}function wr(e){const t=e.data.end;return e.dataset(t.source.key).field(t.source.field).formatter()(t.value)}Er.getLayoutModeKeys=function(){const e=[];let t;for(t in Sr)e.push(t);return e};const Cr={left:"left",right:"right",up:"top",down:"bottom"};function Ar(e,t,n){switch(e){case"scale":return br(t,n);case"measure-scale":return br.measureScale(t,n);case"dimension-scale":return br.dimensionScale(t,n);case"axis":return xr(t,n);case"box-marker":return function(e){return Ht(!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 Ht(!0,{},{key:"point-marker",type:"point-marker",settings:{},brush:{trigger:[],consume:[]}},e||{})}(t);case"scrollbar":return function(e,t){const 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 Ht(!0,{},o,e||{})}(t,n);case"text":return qr(t,n);case"lasso":return function(e,t){const 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((e=>{o.settings.brush.components.push({contexts:n?[n]:void 0,key:e,data:i})})),Ht(!0,{},o,e||{})}(t,n);case"range":return function(e,t){const n=t&&t.brushKey,r=t&&t.brushAxis,i=t&&t.brushArea,o=t&&t.brushScale,a=t&&t.isHorizontal,s=t&&t.dock,l=t&&t.isRtl,u={type:"brush-range",key:"range",displayOrder:99,dock:Dr.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:Dr.getBublesAlign(a,s,l)}}};return Ht(!0,{},u,e||{})}(t,n);case"range-area":return function(e,t){const 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,l=t&&t.dock,u=t&&t.isRtl,c=t&&t.chartInstance;let p=!0;const f={type:"brush-area-dir",key:"area",displayOrder:99,dock:Dr.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:Dr.getBublesAlign(s,l,u),label:e=>p?(p=!1,c.dataset(e.binStart.source.key).field(e.binStart.source.field).formatter()(e.binStart.value)):(p=!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((e=>{f.settings.brush.components.push({contexts:n?[n]:void 0,key:e,data:o,action:"add"})})),Ht(!0,{},f,e||{})}(t,n);case"categorical-legend":return function(e,t){const n=t&&t.chartID,r=t&&t.isRtl;let i=t&&t.dock||"auto";const o=t&&t.show;"auto"===i&&(i=t.chartHeight/t.chartWidth<1?r?"left":"right":"bottom");const a=t.theme.getStyle(n,"legend.title","color"),s=t.theme.getStyle(n,"legend.title","fontSize"),l=t.theme.getStyle(n,"legend.label","color"),u=t.theme.getStyle(n,"legend.label","fontSize"),c=t.theme.getStyle(n,"legend.title","fontFamily"),p=t.theme.getStyle(n,"legend.label","fontFamily"),f={key:"legend",type:"legend-cat",renderer:vr(t.flags),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:(e,t)=>e("span",{style:{pointerEvents:"none"},class:["lui-button__icon","lui-icon",`lui-icon--triangle-${Cr[t.direction]}`].join(" ")})}}},style:{item:{label:{fontSize:u,fontFamily:p,fill:l,lineHeight:1,wordBreak:"break-word"},margin:{top:5,left:10,right:10,bottom:10},shape:{type:t.type?t.type:"square",size:3*parseInt(u,10)/4}},title:{show:t.showTitle,fontSize:s,fontFamily:c,fill:a}}};return Ht(!0,{},f,e)}(t,n);case"sequential-legend":return function(e,t){const n=t&&t.chartID,r=t&&t.isRtl;let i=t.dock||"auto";"auto"===i&&(i=t.chartHeight<t.chartWidth?r?"left":"right":"bottom");const o=t.theme.getStyle(n,"legend.title","color"),a=t.theme.getStyle(n,"legend.title","fontSize"),s=t.theme.getStyle(n,"legend.title","fontFamily"),l=t.theme.getStyle(n,"legend.label","color"),u=t.theme.getStyle(n,"legend.label","fontSize"),c=t.theme.getStyle(n,"legend.label","fontFamily");function p(e){switch(e){case"left":return 0;case"right":return 1;default:return.5}}const f={key:"seqlegend",type:"legend-seq",dock:i,displayOrder:200,minimumLayoutMode:"MEDIUM",prioOrder:0,settings:{align:p(r?"right":"left"),major:{invert:"left"===i||"right"===i||r},title:{show:t.showTitle,fontSize:a,fontFamily:s,fill:o},tick:{fill:l,fontSize:u,fontFamily:c}}};return Ht(!0,{},f,e)}(t,n);case"x-axis":return xr.xAxis(t,n);case"y-axis":return xr.yAxis(t,n);case"x-axis-title":return qr.xAxisTitle(t,n);case"y-axis-title":return qr.yAxisTitle(t,n);case"grid-line":return function(e,t){const n=t&&t.chartID,r=t.theme.getStyle(n,"grid.line.major","color");return Ht(!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){const n=t&&t.gestures||[];return Ht(!0,{},{type:"hammer",key:"hammered",gestures:n},e||{})}(t,n);case"ref-line":return function(e,t){const n=t&&t.chartID,r=t.theme.getStyle(n,"referenceLine.outOfBounds","color"),i=t.theme.getStyle(n,"referenceLine.outOfBounds","backgroundColor");return Ht(!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 Ht(!0,{},{type:"event-area",key:"event-area"},e||{})}(t);case"labels":return function(e,t){const n=t&&t.chartID,r=t.theme.getStyle(n,"label.value","color"),i=t.theme.getStyle(n,"label.value","fontSize"),o=t.theme.getStyle(n,"label.value","fontFamily"),a={key:"labels",type:"labels",renderer:vr(t.flags),displayOrder:1,settings:{sources:[{component:"box-marker",selector:"rect",strategy:{type:"bar",settings:{direction:"up",fontFamily:o,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:wr}]}}}]}};return Ht(!0,{},a,e||{})}(t,n);default:return}}function Tr(e){this.options=e||{},this.settings={dockLayout:{layoutModes:Er()},components:[],scales:{}}}Tr.prototype.addComponent=function(e,t,n){const r=Ar(e,t,Ht(!0,{},this.options,n||{}));return this.settings.components.push(r),r},Tr.prototype.addInteraction=function(e,t){const n=Ar("interaction",e,Ht(!0,{},this.options,t||{}));return this.settings.interactions||(this.settings.interactions=[]),this.settings.interactions.push(n),n},Tr.prototype.addScale=function(e,t,n){const r=Ar(e,t,Ht(!0,{},this.options,n||{}));this.settings.scales[r.name]=r.component},Tr.prototype.getSettings=function(){return this.settings},Tr.prototype.getComponent=function(e){return this.settings.components.filter((t=>t.key===e))[0]},Tr.prototype.addPreset=function(e,t){!function(e,t,n){if("dimension-measure-chart"!==e)throw Error("There is no chart preset with that type");hr(t,n)}(e,this,t)},Tr.validateComponentKeys=function(e){const t={};return e.map((e=>{const n=e.key;return n?t[n]?`Duplicate key for component ${e.type}`:(t[n]=!0,null):`Missing key for component ${e.type}`})).filter((e=>!!e))},Tr.create=function(e){return new Tr(e)},Tr.createComponent=Ar;const Mr={CENTER:0,BOTTOM:1};var kr={DISCLAIMERS:[{label:"NoDataExist",alignment:Mr.CENTER,default:!0},{label:"RequireNumericDimension",alignment:Mr.CENTER,default:!1},{label:"OnlyNanData",alignment:Mr.CENTER,default:!0},{label:"OnlyNegativeOrZeroValues",alignment:Mr.CENTER,default:!1},{label:"LimitedData",alignment:Mr.BOTTOM,default:!1},{label:"OnlyNanColor",alignment:Mr.BOTTOM,default:!1},{label:"NegativeOrZeroValues",alignment:Mr.BOTTOM,default:!1},{label:"DataRangeIncludingZero",alignment:Mr.BOTTOM,default:!1}],ALIGNMENT:Mr};const Ir={getNoDataExistAttribute:e=>e.qSize.qcy*e.qSize.qcx==0,getLimitedDataAttribute(e,t){let n,r=!1;var i;return e?void 0!==t.explicitLimitedData?r=!0===t.explicitLimitedData:e.qDataPages&&e.qDataPages[0]?r=!t.paging&&e.qSize.qcy>e.qDataPages[0].qMatrix.length:(i=e.qStackedDataPages)&&i[0]&&i[0].qData[0]&&i[0].qData[0].qSubNodes&&(n=t.maxNbrOfDimensions?t.maxNbrOfDimensions:2,r=e.qDimensionInfo.length>=n?e.qStackedDataPages[0].qData[0].qSubNodes.some((e=>e.qDown>0)):e.qStackedDataPages[0].qData[0].qSubNodes.length<e.qStackedDataPages[0].qArea.qHeight):r=!0===t.explicitLimitedData,r},getNegativeOrZeroValuesAttribute:(e,t)=>!t.supportNegative&&e.qMeasureInfo.some((e=>e.qMin<=0)),getOnlyNegativeOrZeroValuesAttribute:(e,t)=>!t.supportNegative&&e.qMeasureInfo.every((e=>e.qMax<=0&&e.qMax>=e.qMin))||0===e.qSize.qcy,getOnlyNanDataAttribute:(e,t)=>void 0!==t.explicitOnlyNanData?t.explicitOnlyNanData:e.qMeasureInfo.every((e=>e.qMax<e.qMin||"NaN"===e.qMax)),getDataRangeIncludingZeroAttribute:(e,t)=>!t.supportRangeOverZero&&function(e,t){const n=t.length;let r,i,o,a,s;for(e&&(i=!(e.autoMinMax||"min"!==e.minMax&&"minMax"!==e.minMax||null===e.min||Number.isNaN(+e.min)),o=!(e.autoMinMax||"max"!==e.minMax&&"minMax"!==e.minMax||null===e.max||Number.isNaN(+e.max))),a=Number.MAX_VALUE,s=-Number.MAX_VALUE,r=0;r<n;r++)if(a=Math.min(a,t[r].qMin),s=Math.max(s,t[r].qMax),a<=0&&s>=0)return!0;return a=i?e.min:a,s=o?e.max:s,a<=0&&s>=0}(e.measureAxis,e.qHyperCube.qMeasureInfo),applyAttributes(e,t){const n=e||{},r={};return n.supportNegative=void 0===n.supportNegative||n.supportNegative,n.supportRangeOverZero=void 0===n.supportRangeOverZero||n.supportRangeOverZero,kr.DISCLAIMERS.forEach((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 Or(e,t,n){this.disclaimersConfig=e,this.dataAttributes=t,this.supportedDisclaimers=n}function Nr(e,t){return e&&t&&t[e]}function Lr(e){this.environment=e,this.clear()}Or.prototype.isValidAndSupported=function(e,t){return Nr(e.label,this.dataAttributes)&&(e.default||Nr(e.label,this.supportedDisclaimers))&&void 0!==t&&e.alignment===t},Or.prototype.isAnyValidDisclaimer=function(e){let t=!1;const n=this;return this.disclaimersConfig.forEach((r=>{n.isValidAndSupported(r,e)&&(t=!0)})),t},Or.prototype.getMessage=function(e,t){let n="";const r=this;return t&&this.disclaimersConfig.forEach((i=>{r.isValidAndSupported(i,e)&&(n+=`${t.get(`Object.Disclaimer.${i.label}`)} `)})),n},Lr.ERRORS={SET:"Calling Disclaimer.set() without attributes",DISPLAY:"Calling Disclaimer.display() before attributes are applied"},Lr._applyDefaultSupport=function(e,t){let n=e;return n||(n={}),t.forEach((e=>{void 0===n[e.label]&&(n[e.label]=e.default)})),n},Lr.prototype.getComponentSettings=function(){var e;const{translator:t}=this.environment,n=Ht(!0,{},this.vizAttributes.supportedDisclaimers),r=new Or(kr.DISCLAIMERS,this.dataAttributes,n);let i,o;if(r.isAnyValidDisclaimer(kr.ALIGNMENT.CENTER))i=r.getMessage(kr.ALIGNMENT.CENTER,t),o="center";else{if(!r.isAnyValidDisclaimer(kr.ALIGNMENT.BOTTOM))return;i=r.getMessage(kr.ALIGNMENT.BOTTOM,t),o="bottom"}return{key:"disclaimer",type:"disclaimer",layout:{displayOrder:1e3,dock:o},settings:{label:i,rtl:"rtl"===(null===(e=this.environment)||void 0===e||null===(e=e.options)||void 0===e?void 0:e.direction)}}},Lr.prototype.set=function(e){if(this.clear(),!e)throw new Error(Lr.ERRORS.SET);this.vizAttributes=e,this.dataAttributes=Ir.applyAttributes(this.vizAttributes.options,this.vizAttributes.data)},Lr.prototype.clear=function(){this.vizAttributes=null,this.dataAttributes=null};const Pr=Qn.extend({init(e,t,n,r,i){this.$element=t,this.environment=n,this.backendApi=r,this._selectionsApi=i,this._on=!1,this._disclaimer=new Lr(n),this._dataPaths=["qHyperCube"];const o=this;this.picassoElement=t[0],this.picassoElement.className+=" picasso-chart",this.chartInstance=e.chart({element:this.picassoElement,settings:{components:[Tr.createComponent("event-area",{mounted(e){o.dataAreaElem=e}})]}})},updateEnvironment(e){this.environment=e},isRtl(){var e;return"rtl"===(null===(e=this.environment.options)||void 0===e?void 0:e.direction)},setDataPaths(e){this._dataPaths=e},getData:(e,t,n)=>function(e,t,n){let r,i={qTop:0,qLeft:0,qWidth:t.qSize.qcx,qHeight:1e4/t.qSize.qcx};if(n){const e=n.width||t.qSize.qcx,r=Math.floor(1e4/e);i={qTop:n.top||0,qLeft:n.left||0,qWidth:e,qHeight:n.height?Math.min(n.height,r):r}}else i={qTop:0,qLeft:0,qWidth:t.qSize.qcx,qHeight:1e4/t.qSize.qcx};r="K"===t.qMode?"qStackedDataPages":"qDataPages";return e.getData([i],null,t).then((e=>{t[r]=e}))}(e,t,n),hasValidData:()=>!0,paint(){if(this.hasValidData()){var e;this._disclaimer.set(this.getDisclaimerAttributes(this.layout));const t=this._disclaimer.getComponentSettings(),n="center"===(null==t||null===(e=t.layout)||void 0===e?void 0:e.dock),r=this.createChartSettings(this.layout);n?r.components=[t]:t&&r.components.push(t),Tr.validateComponentKeys(r.components).forEach((e=>{console.error(e)})),this.updateChart(this.layout,r),this._painted=!0}return Promise.resolve()},resize(){if(this.layout)return this.paint()},createChartSettings(){throw new Error('Subclass must implement "createChartSettings" function')},addSnapshotChartSettings(e,t){const{freeResize:n}=this.environment.options;!n&&t.snapshotData&&(e.dockLayout.logicalSize={width:t.snapshotData.content.size.w,height:t.snapshotData.content.size.h,preserveAspectRatio:!0})},updateData(e){return this._destroyed?Promise.reject():(this.layout=Ht(!0,{},e),this.layout.permissions=e.permissions,Promise.resolve())},updateChart(e,t,n){var r,i;const o=null!==(r=null===(i=this.environment.appLayout)||void 0===i?void 0:i.qLocaleInfo)&&void 0!==r?r:{},a=this._dataPaths.map((t=>({type:"q",key:t,config:{localeInfo:o},data:Bn(e,t.replace(/\//g,"."))})));this.colorService&&a.push(...this.colorService.getData()),this.chartInstance.update({data:a,settings:t,partialData:n});this.picassoElement.setAttribute("data-state",2)},destroy(){this._destroyed=!0,this.off(),this.chartInstance.destroy()},getViewState:()=>({}),isLassoDisabled:()=>!0,setSnapshotData(e){e.snapshotData||(e.snapshotData={}),e.snapshotData.content={chartData:{},size:{w:this.$element.width(),h:this.$element.height()}}},getDisclaimerAttributes:e=>({data:e})});var Rr={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 r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?e(Object(i),!0).forEach((function(e){n(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function n(e,t,n){return(t=i(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function i(e){var t=r(e,"string");return"symbol"==typeof t?t:String(t)}var o=Object.prototype.hasOwnProperty,a=Object.prototype.toString,s=Object.defineProperty,l=Object.getOwnPropertyDescriptor,u=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===a.call(e)},c=function(e){if(!e||"[object Object]"!==a.call(e))return!1;var t,n=o.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&o.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||o.call(e,t)},p=function(e,t){s&&"__proto__"===t.name?s(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(!o.call(e,t))return;if(l)return l(e,t).value}return e[t]},d=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,d=arguments.length,h=!1;for("boolean"==typeof s&&(h=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<d;++l)if(null!=(t=arguments[l]))for(n in t)r=f(s,n),s!==(i=f(t,n))&&(h&&i&&(c(i)||(o=u(i)))?(o?(o=!1,a=r&&u(r)?r:[]):a=r&&c(r)?r:{},p(s,{name:n,newValue:e(h,a,i)})):void 0!==i&&p(s,{name:n,newValue:i}));return s};function h(e,t,n,r){if(!e)return-1;const i=n.cache,o=e.origin?e.origin():null;o&&(e=o);let a=i.fields.indexOf(e),s=-1,l=-1;if(-1===a)for(let t=0;t<i.wrappedFields.length;t++)if(l=i.wrappedFields[t].attrDims.map((e=>e.instance)).indexOf(e),s=i.wrappedFields[t].attrExps.map((e=>e.instance)).indexOf(e),-1!==l||-1!==s){a=t;break}if(Array.isArray(r)&&r.some(((e,t)=>e!==t))){const e=r.indexOf(a);-1!==e&&(a=e)}return a-=t.qArea.qLeft,a<0||a>=t.qArea.qWidth?-1:l>=0?e=>e[a].qAttrDims.qValues[l]:s>=0?e=>e[a].qAttrExps.qValues[s]:e=>e[a]}function m(e,t,n){let{key:r}=n;const 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 g(e){let{cache:t,f:n,mainCell:r,p:i,prop:o,page:a,rowIdx:s,row:l,sourceKey:u,target:c,targetProp:p,columnOrder:f}=e,g=r;if(i.field&&i.field!==n){const e=h(i.field,a,{cache:t},f);if(-1===e)return;g=d({qRow:s},e(l))}c[p]=m(i,g,{key:u})}function y(e,t,n,r){const i=Array.isArray(e)?e:[e];let o=[];for(let e=0;e<i.length;e++)if(void 0!==i[e].field){const a=t.raw(),s=t.key(),l="object"==typeof i[e].field?i[e].field:t.field(i[e].field),{props:u,main:c}=r.normalizeConfig(i[e],t),p=Object.keys(u),f=!!i[e].trackBy,y=typeof i[e].trackBy,b={},v=[],x=[];for(let t=0;t<a.qDataPages.length;t++){const o=h(l,a.qDataPages[t],{cache:n},a.qColumnOrder);if(-1!==o)for(let h=0;h<a.qDataPages[t].qMatrix.length;h++){const q=a.qDataPages[t].qArea.qTop+h,D=d({qRow:q},o(a.qDataPages[t].qMatrix[h])),S=m(c,D,{key:s});if(!c.filter||c.filter(D)){for(let e=0;e<p.length;e++){const r=u[p[e]];let i=r.fields||[r];r.fields&&(S[p[e]]=[]);for(let o=0;o<i.length;o++)g({cache:n,f:l,mainCell:D,p:i[o],prop:p[e],props:u,page:a.qDataPages[t],rowIdx:q,row:a.qDataPages[t].qMatrix[h],sourceKey:s,target:r.fields?S[p[e]]:S,targetProp:r.fields?o:p[e],columnOrder:a.qColumnOrder});if(r.fields){const t=S[p[e]].map((e=>e.value)),n=S[p[e]].map((e=>e.label));S[p[e]]={value:"function"==typeof r.value?r.value(t):void 0!==r.value?r.value:t,label:"function"==typeof r.label?r.label(n):void 0!==r.label?String(r.label):String(S[p[e]].value)}}}f&&r.track({cfg:i[e],itemData:D,obj:S,target:v,tracker:b,trackType:y}),x.push(S)}}}const q=f?r.collect(v,{main:c,propsArr:p,props:u}):x;o=[...o,...q]}return o}function b(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 v(){return this.eachAfter(b)}function x(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this}function q(e,t){for(var n,r,i=this,o=[i],a=-1;i=o.pop();)if(e.call(t,i,++a,this),n=i.children)for(r=n.length-1;r>=0;--r)o.push(n[r]);return this}function D(e,t){for(var n,r,i,o=this,a=[o],s=[],l=-1;o=a.pop();)if(s.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r]);for(;o=s.pop();)e.call(t,o,++l,this);return this}function S(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r}function w(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 C(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))}function A(e){for(var t=this,n=T(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 T(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 M(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function k(){return Array.from(this)}function I(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e}function O(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t}function*N(){var e,t,n,r,i=this,o=[i];do{for(e=o.reverse(),o=[];i=e.pop();)if(yield i,t=i.children)for(n=0,r=t.length;n<r;++n)o.push(t[n])}while(o.length)}function L(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=H)):void 0===t&&(t=R);for(var n,r,i,o,a,s=new j(e),l=[s];n=l.pop();)if((i=t(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;o>=0;--o)l.push(r=i[o]=new j(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(_)}function P(){return L(this).eachBefore(F)}function R(e){return e.children}function H(e){return Array.isArray(e)?e[1]:null}function F(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function _(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function j(e){this.data=e,this.depth=this.height=0,this.parent=null}function z(e){return null==e?null:V(e)}function V(e){if("function"!=typeof e)throw new Error;return e}j.prototype=L.prototype={constructor:j,count:v,each:x,eachAfter:D,eachBefore:q,find:S,sum:w,sort:C,path:A,ancestors:M,descendants:k,leaves:I,links:O,copy:P,[Symbol.iterator]:N};var B={depth:-1},$={},U={};function W(e){return e.id}function K(e){return e.parentId}function Y(){var e,t=W,n=K;function r(r){var i,o,a,s,l,u,c,p,f=Array.from(r),d=t,h=n,m=new Map;if(null!=e){const t=f.map(((t,n)=>G(e(t,n,r)))),n=t.map(X),i=new Set(t).add("");for(const e of n)i.has(e)||(i.add(e),t.push(e),n.push(X(e)),f.push(U));d=(e,n)=>t[n],h=(e,t)=>n[t]}for(a=0,i=f.length;a<i;++a)o=f[a],u=f[a]=new j(o),null!=(c=d(o,a,r))&&(c+="")&&(p=u.id=c,m.set(p,m.has(p)?$:u)),null!=(c=h(o,a,r))&&(c+="")&&(u.parent=c);for(a=0;a<i;++a)if(c=(u=f[a]).parent){if(!(l=m.get(c)))throw new Error("missing: "+c);if(l===$)throw new Error("ambiguous: "+c);l.children?l.children.push(u):l.children=[u],u.parent=l}else{if(s)throw new Error("multiple roots");s=u}if(!s)throw new Error("no root");if(null!=e){for(;s.data===U&&1===s.children.length;)s=s.children[0],--i;for(let e=f.length-1;e>=0&&(u=f[e]).data===U;--e)u.data=null}if(s.parent=B,s.eachBefore((function(e){e.depth=e.parent.depth+1,--i})).eachBefore(_),s.parent=null,i>0)throw new Error("cycle");return s}return r.id=function(e){return arguments.length?(t=z(e),r):t},r.parentId=function(e){return arguments.length?(n=z(e),r):n},r.path=function(t){return arguments.length?(e=z(t),r):e},r}function G(e){let t=(e=`${e}`).length;return J(e,t-1)&&!J(e,t-2)&&(e=e.slice(0,-1)),"/"===e[0]?e:`/${e}`}function X(e){let t=e.length;if(t<2)return"";for(;--t>1&&!J(e,t););return e.slice(0,t)}function J(e,t){if("/"===e[t]){let n=0;for(;t>0&&"\\"===e[--t];)++n;if(0==(1&n))return!0}return!1}function Q(e,t){"/"===e.charAt(0)&&(e=e.substring(1));const n=e.split("/");let r,i=t;for(let e=0;e<n.length;e++){if("*"===n[e]&&Array.isArray(i)){const t=[];r=n.slice(e+1).join("/");for(let e=0;e<i.length;e++){let n=Q(r,i[e]);Array.isArray(n)?t.push(...n):t.push(n)}return t}if(!n[e]&&Array.isArray(i)){const t=new Array(i.length);r=n.slice(e+1).join("/");for(let e=0;e<i.length;e++)t[e]=Q(r,i[e]);return t}n[e]in i&&(i=i[n[e]])}return i}function Z(e,t,n){let r=[];if(!e||!e.length)return r;if(t<=0){const t=n>=0?[e[n]]:e;r=[...r,...t]}else for(let i=0;i<e.length;i++)e[i].children&&e[i].children.length&&(r=[...r,...Z(e[i].children,t-1,n)]);return r}function ee(e,t,n){if(e===t)return e=>e;if(e>t){const n=Math.max(0,Math.min(100,e-t));return e=>{let t=e;for(let e=0;e<n;++e)t=t.parent;return t}}if(t>e){const r=Math.max(0,Math.min(100,t-e));return e=>Z(e.children,r-1,n)}return!1}function te(e,t){let{cache:n}=t;if("number"==typeof e)return n.fields[e];const r=n.allFields;if("function"==typeof e){for(let t=0;t<r.length;t++)if(e(r[t]))return r[t];return!1}if("string"==typeof e){for(let t=0;t<r.length;t++)if(r[t].key()===e||r[t].title()===e)return r[t]}else if(e&&-1!==r.indexOf(e))return e;throw Error("Field not found: ".concat(e))}const ne=/^qDimensionInfo(?:\/(\d+))?/,re=/^\/?qMeasureInfo\/(\d+)/,ie=/\/qAttrExprInfo\/(\d+)/,oe=/\/qAttrDimInfo\/(\d+)/;function ae(e){const t=e.raw().qColumnOrder,n=e.fields();return t&&t.length===n.length?t:n.map(((e,t)=>t))}function se(e){return(e.qColumnOrder&&e.qColumnOrder.length?e.qColumnOrder:e.qDimensionInfo.map(((e,t)=>t))).filter((t=>t<e.qDimensionInfo.length))}function le(e,t){let{cube:n}=t;if(!e)return-1;let r=e.origin&&e.origin()?e.origin().key():e.key(),i=!1,o=-1,a=-1,s=-1,l=-1,u=-1,c=-1,p=r;const f=n.qEffectiveInterColumnSortOrder,d=se(n);return ne.test(p)&&(i=!0,o=+ne.exec(p)[1],p=r.replace(ne,"")),re.test(p)&&("K"===n.qMode?u=+re.exec(p)[1]:f&&-1!==f.indexOf(-1)?(u=+re.exec(p)[1],c=0):c=+re.exec(p)[1],p=p.replace(re,"")),p&&(oe.exec(p)?s=+oe.exec(p)[1]:ie.exec(p)&&(a=+ie.exec(p)[1])),l=i?"S"===n.qMode?d[o]:f?f.indexOf(o):o:f&&-1!==f.indexOf(-1)?f.indexOf(-1):n.qDimensionInfo.length-("K"===n.qMode?0:1),{fieldDepth:l+1,pseudoMeasureIndex:u,measureIdx:c,attrDimIdx:s,attrIdx:a}}function ue(e,t){let n,r,i=ee(e.fieldDepth,t.fieldDepth,t.pseudoMeasureIndex);return n=t.measureIdx>=0?e=>e.data.qValues[t.measureIdx]:e=>e.data,t.attrDimIdx>=0?r=e=>{var n;return null==e||null===(n=e.qAttrDims)||void 0===n?void 0:n.qValues[t.attrDimIdx]}:t.attrIdx>=0&&(r=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 ce(e,t,n){let{key:r}=n;const 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 pe(e){let{propsArr:t,props:n,item:r,itemData:i,ret:o,sourceKey:a}=e;for(let e=0;e<t.length;e++){const s=n[t[e]],l=s.fields||[s];let u,c;s.fields&&(u=[],c=[]);for(let n=0;n<l.length;n++){const p=l[n];let f,d,h,m,g,y;if("primitive"===p.type?(h=p.value,y=String(p.value)):("function"==typeof p.value&&(f=e=>p.value(e,r)),"function"==typeof p.label&&(d=e=>p.label(e,r)),p.accessor?(m=p.accessor(r),Array.isArray(m)?(g=m.map(p.valueAccessor),p.attrAccessor&&(g=g.map(p.attrAccessor)),f&&(h=g.map(f),f=null),d&&(y=g.map(d),d=null),h=p.reduce?p.reduce(h):h,y=p.reduceLabel?p.reduceLabel(y,h):String(h)):(h=p.attrAccessor?p.attrAccessor(p.valueAccessor(m)):p.valueAccessor(m),y=h)):(h=i,y=i)),s.fields){const e=f?f(h):h;u.push(e),c.push(d&&null!=y?d(y):null!=y?y:String(e))}else{const n=f?f(h):h;o[t[e]]={value:n,label:d?d(y):null!=y?y:String(n)},p.field&&(o[t[e]].source={field:p.field.key(),key:a})}}u&&(o[t[e]]={value:"function"==typeof s.value?s.value(u,r):u,label:"function"==typeof s.label?s.label(c,r):c})}}const fe=(e,t,n)=>{const r="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",i="K"===e.qMode?"qSubNodes":"qNodes",o=Q(r,e);return o&&o[0]?(t.tree=L(o[0],n.children||(e=>e[i])),t.tree):null};function de(e){const n=e.raw().qDataPages.length?e.raw().qDataPages[0].qMatrix:[],r=ae(e),i=e.fields(),o=e.fields().filter((e=>"dimension"===e.type())).map((e=>r.indexOf(i.indexOf(e)))),a=e.fields().filter((e=>"measure"===e.type())).map((e=>r.indexOf(i.indexOf(e)))),s={__root:{__id:"__root",qValues:[]}};for(let e=0;e<n.length;e++){const r=n[e];let i="__root",u=!1;for(let e=0;e<o.length;e++){var l;const n=r[o[e]],a="".concat(i,"__").concat(null!==(l=n.qElemNumber)&&void 0!==l?l:n.qElemNo);s[a]||(s[a]=t({__id:a,__parent:i,qValues:[]},n),u=!0),i=a}if(u)for(let e=0;e<a.length;e++){const t=r[a[e]];s[i].qValues.push(t)}}const u=Object.keys(s).map((e=>s[e])),c=Y().id((e=>e.__id)).parentId((e=>e.__parent))(u);return c}const he=e=>{let{propsArr:t,props:n,cube:r,cache:i,itemDepthObject:o,f:a}=e;for(let e=0;e<t.length;e++){const s=n[t[e]],l=s.fields?s.fields:[s];for(let e=0;e<l.length;e++){const t=l[e];if(t.field!==a){const e=ue(o,le(t.field,{cube:r,cache:i}));t.accessor=e.nodeFn,t.valueAccessor=e.valueFn,t.attrAccessor=e.attrFn}}}};function me(){let 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;const o=n.raw(),a=n.key(),s="S"===o.qMode?de(n):fe(o,r,e);if(!s)return null;const l=s.height,u=[];for(let a=0;a<=l;a++){let s=null;if(a>0)if("S"===o.qMode){let e=se(o)[a-1];s=r.fields[e]}else{let e=o.qEffectiveInterColumnSortOrder[a-1];a>o.qEffectiveInterColumnSortOrder.length&&(e=o.qDimensionInfo.length),s=r.fields[e]}const{props:l,main:c}=i.normalizeConfig(t(t({},e),{},{field:s?s.key():void 0}),n),p=Object.keys(l);u[a]={propsArr:p,props:l,main:c};const f=s?le(s,{cube:o,cache:r}):{fieldDepth:0};he({propsArr:p,props:l,cube:o,cache:r,itemDepthObject:f,f:s})}const c=s.copy().descendants(),p=s.descendants();for(let e=0;e<p.length;e++){const t=u[p[e].depth].propsArr,n=u[p[e].depth].props,r=u[p[e].depth].main,i=c[e],o=i.data,s=ce(r,o,{key:a});pe({propsArr:t,props:n,item:i,itemData:o,ret:s,sourceKey:a,isTree:!0}),p[e].data=s}return s}function ge(e,t,n,r){const i=Array.isArray(e)?e:[e];let o=[];for(let a=0;a<i.length;a++)if(void 0!==i[a].field){const s=t.raw(),l=t.key();if(!fe(s,n,e))continue;const u="object"==typeof i[a].field?i[a].field:t.field(i[a].field),{props:c,main:p}=r.normalizeConfig(i[a],t),f=Object.keys(c),d=le(u,{cube:s,cache:n}),{nodeFn:h,attrFn:m,valueFn:g}=ue({fieldDepth:0},d);he({propsArr:f,props:c,cube:s,cache:n,itemDepthObject:d,f:u});const y=!!i[a].trackBy,b=typeof i[a].trackBy,v={},x=[],q=h(n.tree),D=[];for(let e=0;e<q.length;e++){const t=q[e],n=m?m(g(t)):g(t);if(p.filter&&!p.filter(n))continue;const o=ce(p,n,{key:l});pe({propsArr:f,props:c,item:t,itemData:n,ret:o,sourceKey:l}),y&&r.track({cfg:i[a],itemData:n,obj:o,target:x,tracker:v,trackType:b}),D.push(o)}const S=y?r.collect(x,{main:p,propsArr:f,props:c}):D;o=[...o,...S]}return o}function ye(e,t){return e(t={exports:{}},t.exports),t.exports}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==E||"undefined"!=typeof self&&self;var be=ye((function(e){
|
|
27
|
+
/*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
|
|
28
|
+
!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,l,u,c,p,f=e.length,d=e.search(/[0-9\-\+#]/),h=d>0?e.substring(0,d):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),y=f-g,b=e.substring(y,y+1),v=y+("."===b||","===b?1:0),x=g>0?e.substring(v,f):"";if(n=(t="-"===(e=e.substring(d,v)).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"),(!(u=t.split("."))[1]||u[1]&&u[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(;u[0].length<e[0].length-a;)u[0]="0"+u[0];else 0==+u[0]&&(u[0]="");if((t=t.split("."))[0]=u[0],l=c[1]&&c[c.length-1].length){for(m="",y=(p=t[0]).length%l,f=p.length,v=0;v<f;v++)m+=p.charAt(v),!((v-y+1)%l)&&v<f-l&&(m+=o);t[0]=m}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),h+(n?"-":"")+r+x}}))}));const ve=1e-15;function xe(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}const qe={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"},De=/%\)?$/,Se=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,Ee=/^\(oct\)/i,we=/^\(dec\)/i,Ce=/^\(hex\)/i,Ae=/^\(bin\)/i,Te=/^\(rom\)/i,Me=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,ke=/#|0/g;function Ie(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 Oe(e,t){let 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();for(;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 Ne(e,t,n){let r;return Se.test(t)?e=Ie(e,Number(/\d{2}/.exec(t)[0]),t,n):Ee.test(t)?e=Ie(e,8,t,n):we.test(t)?e=Ie(e,10,t,n):Ce.test(t)?e=Ie(e,16,t,n):Ae.test(t)?e=Ie(e,2,t,n):Te.test(t)&&(r="",e<0&&(r="-",e=-e),e=0===(e=Math.floor(e))?"0":e<=5e5?r+(e=Oe(e,t)):t+r+e.toExponential(0)),e}function Le(e,t,n){const r=xe(e);return n?r:new RegExp(r||"",t)}function Pe(e,t){return t&&(t=xe(t)),e&&(e=xe(e)),new RegExp("(?:[#0]+".concat(e,")?[#0]+(?:").concat(t,"[#0]+)?"))}function Re(e,t){if(!e||!e.qNumericalAbbreviation)return qe;const n={};return e.qNumericalAbbreviation.split(t).forEach((e=>{let t=e.split(":");2===t.length&&(n[t[0]]=t[1])})),n}function He(e,t,n,r){let i,o,a,s,l,u,c,p,f,d=e.pattern;r&&(e.abbreviate=!0),f=Pe(t,n),a=d.match(f),a=a?a[0]:"",s=a?d.substr(0,d.indexOf(a)):d,l=a?d.substring(d.indexOf(a)+a.length):"",a||(a=d?"#":"##########"),t&&t===n&&(i=a.split(n),o=i.pop(),a=i.join("")+n+o,t=""),u=t,t=/,/.test(n)?"¤":",",u&&(a=a.replace(Le(u,"g"),t)),c=n,n=".",c&&(a=a.replace(Le(c,"g"),n)),p=a.match(/#/g),p=p?p.length:0;const h=d.split(c);let m;h[1]&&(m=h[1].match(ke)),e.prefix=s||"",e.postfix=l||"",e.pattern=d,e.maxPrecision=m?m.length:2,e.percentage=De.test(d),e.numericPattern=a||"",e.numericRegex=new RegExp("".concat(Le(t,null,!0),"|").concat(Le(n,null,!0)),"g"),e.groupTemp=u,e.decTemp=c,e.t=t,e.d=n,e.temp=p}class Fe{constructor(e,t,n,r,i){this.localeInfo=e,this.pattern=t,this.thousandDelimiter=n||",",this.decimalDelimiter=r||".",this.type=i||"numeric",this.patternSeparator=";",this.abbreviations=Re(e,this.patternSeparator),this.prepare()}clone(){const e=new Fe(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return e.subtype=this.subtype,e}format(e,t,n,r){return this.prepare(t,n,r),this.formatValue(e)}prepare(e,t,n){let r;if(void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===n&&(n=this.decimalDelimiter),!e)return void(this._prepared={pattern:!1});this._prepared={positive:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},negative:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},zero:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""}},r=this._prepared,e=e.split(this.patternSeparator),r.positive.pattern=e[0],r.negative.pattern=e[1],r.zero.pattern=e[2],Me.test(e[0])&&(r.positive.isFunctional=!0),e[1]?Me.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?Me.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1;const i="U"===this.type;r.positive.isFunctional||He(r.positive,t,n,i),r.negative&&!r.negative.isFunctional&&He(r.negative,t,n,i),r.zero&&!r.zero.isFunctional&&He(r.zero,t,n,i)}formatValue(e){let t,n,r,i,o,a,s,l,u,c=this._prepared,p="",f="",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,c.pattern;if(e<0&&c.negative?(c=c.negative,e=-e):c=c.positive,o=c.d,a=c.t,c.isFunctional)e=Ne(e,c.pattern,o);else{if(c.percentage&&(e*=100),c.abbreviate){const t=Object.keys(this.abbreviations).map((e=>parseInt(e,10))).sort(((e,t)=>e-t));let r,i,o=t[0];for(s=0,n=Number(Number(e).toExponential().split("e")[1]);o<=n&&s<t.length;)s++,o=t[s];s>0&&(r=t[s-1]),r&&n>0&&r>0?i=r:(n<0&&r<0||!r)&&(o<0&&o-n<=c.maxPrecision?i=o:r<=n&&!(o>0&&-n<=c.maxPrecision)&&(i=r)),i&&(p=this.abbreviations[i],e/=10**i)}if(r=Math.abs(e),t=c.temp,l=c.numericPattern,u=l.split(o)[1],"I"===this.type&&(e=Math.round(e)),i=e,u||"#"!==l.slice(-1)[0])if(r>=1e15||r>0&&r<=1e-14)e=r?r.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{const t=Number(e.toFixed(Math.min(20,u?u.length:0)).split(".")[0]);let n=l.split(o)[0];if(n+=o,e=be(n,t)||"0",u){const t=Math.max(0,Math.min(14,u.length)),n=u.replace(/#+$/,"").length;let i=("I"===this.type?0:r%1+ve).toFixed(t).slice(2).replace(/0+$/,"");for(s=i.length;s<n;s++)i+="0";i&&(e+=o+i)}else 0===t&&(i=0)}else if(r>=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)/,""),f=""):(e=e.toPrecision(Math.max(1,Math.min(14,t)))).indexOf(".")>=0&&(e=(e=e.replace(e.indexOf("e")<0?/0+$/:/\.?0+(?=e)/,"")).replace(".",o));else{for(l+=o,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(r)/Math.log(10)))),s=0;s<t;s++)l+="#";e=be(l,e)}e=e.replace(c.numericRegex,(e=>e===a?c.groupTemp:e===o?c.decTemp:"")),i<0&&!/^-/.test(e)&&(e="-".concat(e))}return c.prefix+e+f+p+c.postfix}static getStaticFormatter(){return{prepare(){},formatValue:e=>"".concat(e)}}}function _e(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Fe(...t)}function je(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{size:n=5e3,multipleArguments:r=!1,toKey:i=(e=>e)}=t;let o,a,s=Object.create(null),l=Object.create(null),u=0,c=0;return o=r?function(){return a=i(...arguments),o.has(a)?o.get(a):o.set(a,e(...arguments))}:t=>(a=i(t),o.has(a)?o.get(a):o.set(a,e(t))),o.set=(e,t)=>(u>=n&&(delete s[l[c]],delete l[c],u--,c++),s[e]=t,l[u]=e,u++,t),o.get=e=>s[e],o.has=e=>e in s,o.clear=()=>{s=Object.create(null),l=Object.create(null),u=0,c=0},o.size=()=>u,o}function ze(e,t,n,r,i){const o=_e(i,e,t,n,r),a=je(o.formatValue.bind(o),{toKey:e=>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}const Ve={AUTO:"U",INTEGER:"I",NUMBER:"R",FIXED_TO:"F",MONEY:"M",DATE:"D",TIME:"T",DATE_TIME:"TS",INTERVAL:"IV"},Be=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],$e=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Ue=["January","February","March","April","May","June","July","August","September","October","November","December"],We=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Ke=86400;function Ye(e,t){for(let n=e.length;n<t;n++)e="0".concat(e);return e}function Ge(e,t){let n=e.getUTCHours(),r=e.getUTCDay()-1;return t&&(n%=12,n||(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 Xe(e){let t=e.toString().split(".");return t[1]?(t=Number("0.".concat(t[1])),t):0}function Je(e){const t=e,n=24*Xe(t),r=60*Xe(n),i=60*Xe(r),o=1e3*Xe(i);return{d:Math.floor(t),h:Math.floor(n),m:Math.floor(r),s:Math.floor(i),f:Math.round(o)}}function Qe(e,t){let n,r=Je(e),i=r.d,o=r.h,a=r.m,s=r.s,l=r.f,u=0;/w+|t+/gi.test(t)&&(n=new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,Math.round(Ke*(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)&&(u=n?n.getDay()-1:0,u<0&&(u=6));let c="";return n&&(c=n.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:u,date:i,h:o,m:a,s:s,f:l,t:c}}function Ze(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:Ye("".concat(t.year).slice(-2),2),YYY:Ye("".concat(t.year).slice(-3),3),def:e=>Ye("".concat(t.year),e.length)},"M+":{M:t.month+1,MM:Ye("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:Ye("".concat(t.day),2),WWW:e.locale_days_abbr[t.day],def:e.locale_days[t.day]},"D+|d+":{D:t.date,def:e=>Ye("".concat(t.date),e.length)},"h+|H+":{h:t.h,def:e=>Ye("".concat(t.h),e.length)},"m+":{m:t.m,def:e=>Ye("".concat(t.m),e.length)},"s+|S+":{s:t.s,def:e=>Ye("".concat(t.s),e.length)},"f+|F+":{def(e){let n="".concat(t.f),r=e.length-n.length;if(r>0)for(let e=0;e<r;e++)n+="0";else r<0&&(n=n.slice(0,e.length));return n}},"t{1,2}|T{1,2}":{def(e){let n=t.t;return e[0].toUpperCase()===e[0]&&(n=n.toUpperCase()),n=n.slice(0,e.length),n}}}}class et{constructor(e,t,n){const r=e||{};r.qCalendarStrings||(r.qCalendarStrings={qLongDayNames:Be,qDayNames:$e,qLongMonthNames:Ue,qMonthNames:We}),this.localeInfo=r,this.locale_days=r.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=r.qCalendarStrings.qDayNames.slice(),this.locale_months=r.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=r.qCalendarStrings.qMonthNames.slice(),t||(t={[Ve.TIME]:r.qTimeFmt||"hh:mm:ss",[Ve.DATE]:r.qDateFmt||"YYYY-MM-DD",[Ve.DATE_TIME]:r.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"}[n]),this.pattern=t}clone(){const e=new et(this.localeInfo,this.pattern);return e.subtype=this.subtype,e}format(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+]|\[|]/g,"");const n=/t+/gi.test(t);let r;e instanceof Date?r=Ge(e,n):(e<0&&(e=-e,t="-".concat(t)),r=Qe(e,t));const i=Ze(this,r),o=[];for(const e in i)Object.prototype.hasOwnProperty.call(i,e)&&o.push(e);const a=new RegExp(o.join("|"),"g"),s=t.replace(a,(e=>{let t,n,r;for(n in i)if(Object.prototype.hasOwnProperty.call(i,n)&&(t=new RegExp(n),t.test(e)))break;if(!t)return"";for(const t in i[n])if(t===e||t.toLowerCase()===e){r=i[n][t],void 0===r&&(r=i[n][t.toLowerCase()]);break}return void 0===r&&(r=i[n].def),"function"==typeof r&&(r=r(e)),r}));return s}}function tt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new et(...t)}const nt=864e5;function rt(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(nt*(e-Math.floor(e)))))}function it(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=tt(arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,e,t),r=je(n.format.bind(n),{toKey:e=>"object"==typeof e&&"function"==typeof e.getTime?e.getTime():e});function i(e){return t!==Ve.INTERVAL?rt(e):e}function o(e){return e=i(e),r(e)}return o.format=function(e,t){return r.clear(),t=i(t),n.format(t,e)},o.locale=function(i){return n=tt(i,e,t),r=je(n.format.bind(n),{toKey:e=>"object"==typeof e?e.getTime():e}),this},o.qtype=function(e){return void 0!==e&&(t=e,r.clear()),t},o}function ot(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return it(e.qNumFormat.qFmt,e.qNumFormat.qType,t);let 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,"##"),o="U"),ze(n,r,i,o,t)}function at(){let e,{meta:t,id:n,key:r,localeInfo:i,fieldExtractor:o,value:a,type:s,sourceField:l}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const u=a||("dimension"===s?e=>null==e?void 0:e.qElemNo:e=>null==e?void 0:e.qValue),c=e=>(null==e?void 0:e.qText)||"",p="dimension"===s?"first":"avg",f=ot(t,i),d="dimension"===s?"first":(e,t)=>f(t),h={id:()=>n,key:()=>r,raw:()=>t,title:()=>t.qFallbackTitle||t.label,type:()=>s,origin:()=>l,items:()=>(e||(e=o(h)),e),min:()=>t.qMin,max:()=>t.qMax,value:u,label:c,reduce:p,reduceLabel:d,formatter:()=>f,tags:()=>t.qTags};return h}function st(e,t,n,r,i){return(t[e]||[]).map(((t,o)=>{const a="".concat(r?"".concat(r,"/"):"").concat(e,"/").concat(o),s={instance:at(d({id:"".concat(n?"".concat(n,"/"):"").concat(a),key:a,meta:t},i))};return s.attrDims=st("qAttrDimInfo",t,n,a,d({},i,{value:e=>null==e?void 0:e.qElemNo,type:"dimension"})),s.attrExps=st("qAttrExprInfo",t,n,a,d({},i,{value:e=>null==e?void 0:e.qNum,type:"measure"})),s.measures=st("qMeasureInfo",t,n,a,d({},i,{value:e=>null==e?void 0:e.qValue,type:"measure"})),s}))}function lt(){let{key:e,data:n,config:r={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const i={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},o=n;if(!o)throw new Error('Missing "data" input');if(!o.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');const a=lt.util,s={cache:i,cube:o,localeInfo:r.localeInfo,fieldExtractor:null,pages:null,hierarchy:()=>null,virtualFields:r.virtualFields},l={key:()=>e,raw:()=>o,field:e=>te(e,s),fields:()=>i.fields.slice(),extract:e=>s.extractor(e,l,i,a),hierarchy:e=>s.hierarchy(e,l,i,a),_cache:()=>i};"K"===o.qMode||"T"===o.qMode||!o.qMode&&o.qNodesOnDim?(s.extractor=ge,s.hierarchy=me,s.pages="K"===o.qMode?o.qStackedDataPages:o.qTreeDataPages):"S"===o.qMode?(s.extractor=y,s.pages=o.qDataPages,s.hierarchy=me):s.extractor=()=>[],s.fieldExtractor=e=>s.extractor({field:e},l,i,a);const u="S"===o.qMode?e=>e.qElemNumber:void 0,c="S"===o.qMode?e=>e.qNum:void 0;i.wrappedFields.push(...st("qDimensionInfo",o,e,"",d({},s,{value:u,type:"dimension"}))),i.wrappedFields.push(...st("qMeasureInfo",o,e,"",d({},s,{value:c,type:"measure"}))),i.fields=i.wrappedFields.map((e=>e.instance));const p=e=>{e.forEach((e=>{i.allFields.push(e.instance),p(e.measures),p(e.attrDims),p(e.attrExps)}))};return p(i.wrappedFields),(r.virtualFields||[]).forEach((n=>{const r=l.field(n.from),o=at(t({meta:r.raw(),id:"".concat(e,"/").concat(n.key),sourceField:r,fieldExtractor:e=>s.extractor({field:e},l,i,a),key:n.key,type:r.type(),localeInfo:s.localeInfo,value:r.value},n.override||{}));i.virtualFields.push(o)})),i.allFields.push(...i.virtualFields),l}const ut=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],ct=/\/qDimensionInfo(?:\/(\d+))?/,pt=/\/qMeasureInfo\/(\d+)/,ft=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,dt=/\/qAttrExprInfo\/(\d+)/,ht=/\/?qHyperCube/,mt=/\/?qTreeData/,gt=e=>"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14)),yt=e=>"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13));function bt(e,t){let n=e,r=-1,i=-1,o="",a=e=>e;ht.test(e)?(o="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),a=gt):mt.test(e)&&(o="".concat(n.substr(0,n.indexOf("qTreeData")+9)),a=yt);let s=!0;if(ct.test(e)&&(r=+ct.exec(e)[1]),pt.test(e)&&(i=+pt.exec(e)[1]),ft.test(e)){i=-1,r=0;const e=+ft.exec(n)[2];isNaN(e)||(r=e,n=n.replace(/\/\d+$/,"")),s=!1}if(dt.test(e)){const e=i;if(t){i=0;const a=Q(o,t);i+=(a.qMeasureInfo||[]).length,r>-1?(i=a.qDimensionInfo.slice(0,r).reduce(((e,t)=>e+t.qAttrExprInfo.length),i),r=-1):(i=a.qDimensionInfo.reduce(((e,t)=>e+t.qAttrExprInfo.length),i),i=a.qMeasureInfo.slice(0,e).reduce(((e,t)=>e+t.qAttrExprInfo.length),i)),i+=+dt.exec(n)[1]}else r>-1?(r=-1,i=+dt.exec(n)[1]):i+=+dt.exec(n)[1]+1}return ut.forEach((e=>{let[t,r]=e;n=n.replace(t,r)})),s&&(n=a(n)),n&&"/"!==n[0]&&(n="/".concat(n)),{measureIdx:i,dimensionIdx:r,path:n}}function vt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r=t.byCells,i=t.primarySource,o=[],a={},s=e.isActive();let l=!1;return e.brushes().forEach((e=>{const t=bt(e.id,n);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.multiRangeSelectTreeDataValues||(a.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),n.forEach((e=>a.multiRangeSelectTreeDataValues.ranges.push({qMeasureIx:t.measureIdx,qDimensionIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}}))))}else{if("range"===e.type&&t.measureIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.rangeSelectHyperCubeValues||(a.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),n.forEach((e=>a.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:t.measureIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}}))))}if("range"===e.type&&t.dimensionIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.selectHyperCubeContinuousRange||(a.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),n.forEach((e=>a.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(r)if(n&&n.qHyperCube&&("P"===n.qHyperCube.qMode||"T"===n.qHyperCube.qMode||"K"===n.qHyperCube.qMode)){const r=n.qHyperCube,o=r.qNoOfLeftDims,s=r.qEffectiveInterColumnSortOrder.indexOf(t.dimensionIdx);if(a.selectPivotCells||(a.selectPivotCells={path:t.path,cells:[]}),e.id===i||!i){const n=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e)));(0===o||s>=o)&&o>-1?n.forEach((e=>{a.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:s-o})})):n.forEach((e=>{a.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})})),l=!!a.selectPivotCells.cells.length}}else a.selectHyperCubeCells||(a.selectHyperCubeCells={path:t.path,cols:[]}),a.selectHyperCubeCells.cols.push(t.dimensionIdx),e.id!==i&&(i||a.selectHyperCubeCells.values)||(a.selectHyperCubeCells.values=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e))),l=!!a.selectHyperCubeCells.values.length);else{const n=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e)));l=!!n.length,o.push({params:[t.path,t.dimensionIdx,n,!1],method:"selectHyperCubeValues"})}}})),!l&&s?[{method:"resetMadeSelections",params:[]}]:(a.rangeSelectHyperCubeValues&&o.push({method:"rangeSelectHyperCubeValues",params:[a.rangeSelectHyperCubeValues.path,a.rangeSelectHyperCubeValues.ranges,[],null===(u=t.orMode)||void 0===u||u]}),a.selectHyperCubeContinuousRange&&o.push({method:"selectHyperCubeContinuousRange",params:[a.selectHyperCubeContinuousRange.path,a.selectHyperCubeContinuousRange.ranges]}),a.selectHyperCubeCells&&o.push({method:"selectHyperCubeCells",params:[a.selectHyperCubeCells.path,a.selectHyperCubeCells.values,a.selectHyperCubeCells.cols]}),a.selectPivotCells&&o.push({method:"selectPivotCells",params:[a.selectPivotCells.path,a.selectPivotCells.cells]}),a.multiRangeSelectTreeDataValues&&o.push({method:"multiRangeSelectTreeDataValues",params:[a.multiRangeSelectTreeDataValues.path,a.multiRangeSelectTreeDataValues.ranges]}),o);var u}function xt(e){lt.util=e.data("matrix").util,e.data("q",lt),e.formatter("q-number",ze),e.formatter("q-time",it)}return xt.qBrushHelper=vt,xt.selections=vt,xt}()}(Rr);var Hr=w(Rr.exports);const Fr={brushInterceptors:{DIM_VALUE_NULL:-2,DIM_VALUE_TOTAL:-3,brushOnlyOne:function(e,t){const n=e.brushes().filter((e=>"value"===e.type));let r=[];n.length&&n.forEach((e=>{r=r.concat(e.brush.values().map((t=>({key:e.id,value:t}))))}));return r.concat(t)},filterValues:function(e,t){const n=this;let r,i;const o=[];let a=0;const s=[];return t.forEach((t=>{t.value!==n.DIM_VALUE_NULL&&t.value!==n.DIM_VALUE_TOTAL&&(i=function(e,t){const n=t.key.indexOf("qHyperCube")+10,r=t.key.substr(0,n),i=t.key.substr(n+1);return e.dataset(r).field(i)}(e,t),r=i&&i.raw(),r.qLocked?(o.push(r),a++):s.push({key:t.key,value:t.value}))})),{items:s,itemsAreLocked:a>0&&a===t.length,lockedFields:o}}}};const _r={data:["elemNo"],contexts:["select"],startOnEmptySelection:!0,style:{active:{strokeWidth:2,stroke:"#333"},inactive:{opacity:.3}}};function jr(e){if(!e||!e.chartInstance||!e.selectionsApi)throw Error("Selections-handler: Missing input");const t=e.chartInstance,n=e.selectionsApi,r=e.dataPaths||[""],i=e.selectPaths,o=e.lasso;let a=[];const s={propertiesToRestore:{}};let l=!1;const u=function(e,t,n){function r(){}return r.update=function(e,r,i){t.isActive()||t.begin(n),Hr.qBrushHelper(i).forEach((e=>{t.select(e)}))},r.toggleValues=function(r,i,o){const a=Fr.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={};let p=!1;function f(e){16===e.keyCode&&e.shiftKey!==p&&(p=e.shiftKey,o.toggle())}function d(e){const t=e.keyCode;27===t?n.cancel():13===t&&n.confirm()}function h(){a.forEach((e=>{e.listeners.update=function(t,n){e.sleep||u.update(t,n,e.brush)},e.brush.on("update",e.listeners.update),e.brush.on("start",e.listeners.start)}))}function m(){a.forEach((e=>{e.brush.removeListener("update",e.listeners.update),e.brush.removeListener("start",e.listeners.start)}))}return n.on("cleared",(()=>{a.forEach((e=>{e.brush.clear(),e.dependentComponents.forEach((e=>{const n=t.component(e.id);n&&n.emit(e.clear)}))}))})),c.setUp=function(e){c.tearDown();const t=this.setUpBrush(e);return l&&h(),t},c.setUpBrush=function(e){const n=Ht(!0,{},_r,e),i={on:"tap",action:t=>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(!l)return[];const i=function(){const e=[];let n=r.map((e=>t.dataset(e).fields().filter((e=>"dimension"===e.type()))));n=[].concat.apply([],n);for(let t=0;t<n.length;t++)n[t].raw().qLocked&&e.push(n[t].raw());return{fields:e,areAllFieldsLocked:e.length&&e.length===n.length}}();return n.startOnEmptySelection&&0===e.length&&i.areAllFieldsLocked?[]:u.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((e=>{e!==s&&e.brush.end()}))},a.push(s),{trigger:i,consume:o}},c.setUpStart=function(){c.tearDown()},c.setUpDone=function(){l&&h()},c.tearDown=function(){l&&m(),a.forEach((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((t=>{t.id===e&&(t.sleep=!0)}))},c.resumeEngineCalls=function(e,t){a.forEach((n=>{n.id===e&&(n.sleep=!1,t&&n.listeners.update([],[]))}))},c.addComponent=function(e,t){a.forEach((n=>{n.id===e&&n.dependentComponents.push(t)}))},c.on=function(){if(l)return;l=!0,h(),document.addEventListener("keydown",f),document.addEventListener("keyup",f);const e=()=>{a.forEach((e=>{e.brush.end()})),document.removeEventListener("keyup",d),o.active()&&o.toggle()};n.on("deactivated",e),s.unbindDeactivated=()=>{n.removeListener("deactivated",e)};const t=()=>{document.addEventListener("keyup",d)};n.on("activated",t),s.unbindActivated=()=>{n.removeListener("activated",t)}},c.isOn=()=>l,c.off=function(){l&&(l=!1,m(),document.removeEventListener("keydown",f),document.removeEventListener("keyup",f),document.removeEventListener("keyup",d),s.unbindActivated(),s.unbindDeactivated())},c.lassoState=function(){return o.active()&&!(e.isLassoDisabled&&e.isLassoDisabled())},c.allFieldsLocked=function(){return function(){let e=r.map((e=>t.dataset(e).fields().filter((e=>"dimension"===e.type()))));return e=[].concat.apply([],e),e.length&&e.every((e=>e.raw().qLocked))}()},c}class zr{isOn(){return!1}on(){console.warn("Can not turn on selections on this object")}off(){}}var Vr={create:e=>e.selectionsApi?jr(e):new zr};function Br(e,t,n,r,i){let o=!1;r=r||"tooltip",n=n||["self"];const a=e.brush(r),s={};function l(){if(o){e.component(i).emit("hide")}o=!1}return s.isOpen=function(){return o},s.closeTooltip=l,s.update=function(){const s=a.brushes(),u=e.getAffectedShapes(r,"and",n,t);s.length>=1?(o=!0,function(t){o=!0;const n={nodes:t};e.component(i).emit("show",{},n)}(u)):l()},s.toggleInterceptor=function(e){if(n.length>1){const t={},n=[];return e.forEach((e=>{t[e.key]||(t[e.key]={}),t[e.key][e.value]||(t[e.key][e.value]=!0,n.push(e))})),n}return e},s}var $r={create:(...e)=>Br(...e)},Ur={formatMeasureValue:function(e,t){if(e.raw().isCustomFormatted)return e.formatter()(t.value.qText);const n=void 0!==t.value.qNum?t.value.qNum:t.value.qValue;return e.formatter()(n)}};const Wr=-3;const Kr=e=>({h:t,data:n,style:r})=>{const i=function(e,t){const n=e.chartInstance.dataset(e.dataPath),r=[],i=t.length-5,o=Math.min(5,t.length);for(let i=0;i<o;i++){const o=t[i],a={rows:[]};if(e.labelData){const t=[],i=e.labelData;let s=!1;for(let e=0;e<i.length;e++){const n=o.data[i[e]].value;if(-2===n.qElemNo||-2===n.qElemNumber){s=!0;break}t.push(o.data[i[e]].value.qText)}if(s)return;a.header=e.headerResolver(t),a.rows=e.measureRows.map((t=>{const r=o.data;return e.rowResolver(n.field(r[t].source.field),r[t],r)})).filter((e=>!!e));const l=Yr(e,o);l&&a.rows.unshift(l),r.push(a)}}i>0&&(r.numberInExcess=i);return r.rowCount=r[0]?r.length*r[0].rows.length:0,r}(e,n),o={h:t,style:r,rtl:"rtl"===e.direction,translator:e.translator};return e.renderer(o,i)};function Yr(e,t){var n,r,i;const 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;const s=[];e.data.forEach((e=>{const n=t.data[e];n&&s.push(n.value)}));const l=function(e){let t=-1;for(let n=0;n<e.length;n++)e[n]===Wr&&(t=n);return t}(s),{translator:u}=e,c=a.label;return{color:null===(i=t.attrs)||void 0===i?void 0:i.fill,label:c,value:-1!==l?u.get("properties.dimensionLimits.others"):o.label}}const Gr="dist-flow-tooltip",Xr=`#${Gr}`;function Jr(){if(!document.querySelector(Xr)){const e=document.createElement("div");e.id=Gr,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 Qr({key:e="tooltip",rtl:t,fontFamily:n,filter:r,content:i}){return{show:!0,key:e,type:"tooltip",layout:{displayOrder:3},beforeMount(){Jr()},beforeUpdate(){Jr()},destroyed(){!function(){const e=document.querySelector(Xr);e&&e.parentElement&&e.childElementCount<1&&e.parentElement.removeChild(e)}()},settings:{appendTo:()=>document.querySelector(Xr),content:i,filter:r,extract:e=>e.node,direction:t?"rtl":"ltr",placement:"bounds"},style:{arrow:{color:"#404040"},content:{display:"table","border-spacing":"4px",background:"rgba(64, 64, 64, 0.9)",opacity:"1",fontSize:"13px",fontFamily:n,"empty-cells":"show"},cell:{"max-width":"180px","word-break":"break-word","word-wrap":"break-word","overflow-wrap":"break-word",hyphens:"auto"}}}}const{detectTextDirection:Zr}=cr;const ei={tooltipKey:"tooltip",data:[""],contexts:["tooltip"],headerResolver:e=>e.join(", "),rowResolver:(e,t)=>({value:Ur.formatMeasureValue(e,t),label:e.title()}),direction:"ltr",renderer:function(e,t){const{h:n,style:r,translator:i,rtl:o}=e,a=[],s=o?"right":"left";if(t.forEach((e=>{if(e.header){const t={...r.cell,textAlign:s,fontWeight:"bold",direction:Zr(e.header)};a.push(n("tr",null,n("td",{style:t,colSpan:2},e.header)))}e.rows.forEach((e=>{let t=e.value;if(e.color){const r={display:"inline-block",width:10,height:10,"background-color":e.color,margin:"0 8px"},i=n("div",{style:r});t=o?[e.value,i]:[i,e.value]}const i=o?[":",e.label]:[e.label,":"],l={...r.cell,textAlign:s,direction:Zr(e.label)},u={...r.cell,textAlign:o?"left":"right",direction:Zr(e.value)};a.push(n("tr",null,n("td",{style:l},i),n("td",{style:u},t)))}))})),t.numberInExcess){const e=i.get("Object.ChartTooltip.NMore",t.numberInExcess),o={...r.cell,textAlign:s,direction:Zr(e)};a.push(n("tr",null,n("td",{style:o,colSpan:2},e)))}return a}};function ti(e,t,n){if(!e)throw Error("Tooltips-handler: Missing input");let r={},i=!1;const 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((e=>{l(r[e])}))}function l(e){e.brush.removeListener(e.treatAsDesktop?"update":"set-values",e.listeners.update),e.brush.removeListener("end",e.listeners.end),e.brush.removeInterceptor("set-values",e.action.toggleInterceptor)}function u(){Object.keys(r).forEach((e=>{r[e].action.closeTooltip()}))}function c(){u();for(const e in r)r[e].brush.clear()}return o.setUp=function(t){const o=Ht(!0,{},ei,t);if(!o.componentKey)throw Error("Tooltips-handler.setUp: Missing required input");r[o.contexts[0]]&&i&&l(r[o.contexts[0]]);const s=function(e,t){return{brush:t.brush(e.contexts[0]),action:$r.create(t,e.componentKey,e.data,e.contexts[0],e.tooltipKey),listeners:{},chartInstance:t,dataPath:e.dataPath,renderer:e.renderer,data:e.data,headerResolver:e.headerResolver,rowResolver:e.rowResolver,colorService:e.colorService,attrDimPath:e.attrDimPath,measureRows:e.measureRows,labelData:e.labelData,filterShapes:e.filterShapes,direction:e.environment.options.direction,theme:e.environment.theme,translator:e.environment.translator,treatAsDesktop:"touch"!==e.environment.deviceType}}(o,e);r[o.contexts[0]]=s,i&&a(s);const u=Qr({key:o.tooltipKey,rtl:"rtl"===s.direction,fontFamily:s.theme.getStyle(n,"tooltip","fontFamily"),filter:(c=s.filterShapes,e=>c?c(e):function(e){const t=[];return e.forEach((e=>{-1===t.indexOf(e)&&"container"!==e.type&&t.push(e)})),t}(e)),content:Kr(s,o.dataPath)});var c;return o.chartBuilder.getSettings().components.push(u),{trigger:{on:s.treatAsDesktop?"over":"tap",action:"set",contexts:o.contexts,data:o.data,globalPropagation:"stop"},consume:o.contexts.map((e=>({context:e}))),component:u}},o.tearDown=function(){i&&s(),r=[]},o.closeTooltip=u,o.isOn=()=>i,o.on=function(){i||(i=!0,Object.keys(r).forEach((e=>{a(r[e])})),t&&t.on("mouseleave",c))},o.off=function(){i&&(i=!1,s(),t&&t.off("mouseleave",c),u())},o}var ni={create:(e,t,n)=>ti(e,t,n)};const ri={generateHash:function(e){return function(e){let t=0;if(!e||!e.length)return t;for(let 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=ri.generateHash(t)}};const ii={getDefaultHashDataForHyperCube:function(e,t,n){return function(e,t){const n=[];if(!e.qMeasures)return Promise.resolve(n);return e.qMeasures.forEach((e=>{e.qLibraryId?n.push(function(e,t){return t.getMeasure(e).then((e=>e.getProperties().then((e=>e.qMeasure.qDef))))}(e.qLibraryId,t)):n.push(Promise.resolve())})),Promise.all(n)}(e,n).then((e=>({drillLevel:ai(t),dimensionExpressions:oi(t),measureExpressions:e})))}};function oi(e){return e.qDimensionInfo.map((e=>e.qGroupFieldDefs))}function ai(e){const t=function(e){return Bn(e,"qDimensionInfo",[])}(e);return t.map((e=>e.qGroupPos))}const si={},li=Ht.bind(null,!0);function ui(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}const ci=Array.isArray,pi=function(e){return void 0===e},fi=function(e){return"function"==typeof e};function di(e,t){return fi(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function hi(e,t){const n=t.substring(1).split("/").slice(0,-1);let r;return n.forEach(((t,i)=>{i!==n.length&&(r=+t,e[r||t]=pi(e[r||t])?Number.isNaN(+r)?{}:[]:e[t],e=e[r||t])})),e}function mi(e,t){if(ui(e)&&ui(t)){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n of Object.keys(e))if(!mi(e[n],t[n]))return!1;return!0}if(ci(e)&&ci(t)){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n++)if(!mi(e[n],t[n]))return!1;return!0}return e===t}si.generate=function(e,t,n){n=n||"";let r=[];return Object.keys(t).forEach((i=>{const o=function(e){return e&&(e=li({},{val:e}).val),e}(t[i]),a=e[i],s=`${n}/${i}`;mi(o,a)||di(t,i)||(pi(a)?r.push({op:"add",path:s,value:o}):ui(o)&&ui(a)?r=r.concat(si.generate(a,o,s)):ci(o)&&ci(a)?r=r.concat(function(e,t,n){let r=[];const i=e.slice();let o,a,s=-1;function l(e,t,n){if(e[n]&&pi(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(let n=0,r=e.length;n<r;n++)if(e[n]&&e[n].qInfo.qId===t)return n;return-1}if(mi(t,i))return r;if(null===t[0]||!pi(t[0])&&pi(t[0].qInfo))return r.push({op:"replace",path:n,value:t}),r;for(o=i.length-1;o>=0;--o)s=l(t,i[o]&&i[o].qInfo&&i[o].qInfo.qId,o),-1===s?(r.push({op:"remove",path:`${n}/${o}`}),i.splice(o,1)):r=r.concat(si.generate(i[o],t[s],`${n}/${o}`));for(o=0,a=t.length;o<a;++o)s=l(i,t[o]&&t[o].qInfo&&t[o].qInfo.qId),-1===s?(r.push({op:"add",path:`${n}/${o}`,value:t[o]}),i.splice(o,0,t[o])):s!==o&&(r.push({op:"move",path:`${n}/${o}`,from:`${n}/${s}`}),i.splice(o,0,i.splice(s,1)[0]));return r}(a,o,s)):r.push({op:"replace",path:`${n}/${i}`,value:o}))})),Object.keys(e).forEach((i=>{pi(t[i])&&!di(e,i)&&r.push({op:"remove",path:`${n}/${i}`})})),r},si.apply=function(e,t){t.forEach((t=>{const n=hi(e,t.path);let r=t.path.split("/").splice(-1)[0];const i=r&&Number.isNaN(+r)?n[r]:n[+r]||n,o=t.from?t.from.split("/").splice(-1)[0]:null;if("add"===t.op||"replace"===t.op)if(ci(n))"-"===r&&(r=n.length),n.splice(+r,"add"===t.op?0:1,t.value);else if(ci(i)&&ci(t.value)){const e=t.value.slice();i.length=0,i.push.apply(i,e)}else ui(i)&&ui(t.value)?(a=i,Object.keys(a).forEach((e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!di(a,e)&&delete a[e]})),li(i,t.value)):n[r]=t.value;else if("move"===t.op){const i=hi(e,t.from);ci(n)?n.splice(+r,0,i.splice(+o,1)[0]):(n[r]=i[o],delete i[o])}else"remove"===t.op&&(ci(n)?n.splice(+r,1):delete n[r]);var a}))},si.clone=function(e){return li({},e)},si.createPatch=function(e,t,n){const r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},si.updateObject=function(e,t){Object.keys(e).length?si.apply(e,si.generate(e,t)):li(e,t)};class gi{constructor(e){this._model=e}setModel(e){this._model=e}saveSoftProperties(e,t){if(!this._model)return Promise.resolve(!1);let n=si.generate(e,t);return Ht(!0,e,t),n&&n.length?(n=n.map((e=>({qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}))),this._model.applyPatches(n,!0).then((()=>!0))):Promise.resolve(!1)}async mergeSoftPatches(){if(!this._model)return;const e=this._model.getProperties(),t=this._model.getEffectiveProperties(),n=await e,r=await t;if(n.qExtendsId)return;const i=si.generate(n,r);si.apply(n,i);const o=this;o._model.setProperties(n).then((()=>{o._model.clearSoftPatches()}))}}var yi={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 bi={saveDerivedProperties:function(e,t,n,r){if(yi.canModifyHardProperties(t))return e.setProperties(n);return new gi(e).saveSoftProperties(r,n)}};var vi={validate:function(e){if(!(e&&e.layout&&e.properties&&e.model&&e.hashData&&e.generateDerivedProperties))throw Error("Derived-properties: Missing input")}};function xi(){this._generationInProgress=!1}function qi(e){vi.validate(e);const t=e.properties,n=ri.generateHash(e.hashData);return!(!t.qUndoExclude||t.qUndoExclude.hashCode!==n)}xi.prototype.isDerivedUpToDate=qi,xi.prototype.updateDerivedProperties=function(e){if(vi.validate(e),this._generationInProgress)return Promise.resolve(!0);if(qi(e)){const t=e.layout.qUndoExclude&&e.layout.qUndoExclude.hashCode===e.properties.qUndoExclude.hashCode;return Promise.resolve(!t)}const t=this,n=e.model,r=e.layout,i=Ht(!0,{},e.properties),o=Ht(!0,{},i);return this._generationInProgress=!0,ri.updateHash(i,e.hashData),e.generateDerivedProperties(r,i).then((()=>bi.saveDerivedProperties(n,r,i,o).then((()=>(t._generationInProgress=!1,Promise.resolve(!0))))))},xi.prototype.addDefaultHyperCubeHash=function(e,t,n,r){return ii.getDefaultHashDataForHyperCube(e,t,n).then((e=>Ht(!0,r,e)))};const Di={wrapExpression:function(e){const t=e.replace(/\]/g,"]]");return t?`[${t}]`:""}};const Si={replaceExpressionTokens:function(e,t,n){const r={start:n&&n.start||"{{",end:n&&n.end||"}}"};let i,o,a=e;for(const e in t)i=t[e],o=r.start+e+r.end,a=a.replace(Ei(o,!0),i);return a},createRegExp:Ei};function Ei(e,t,n){const r=e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&");const i=n?`(${r})`:r;return t?new RegExp(i,"g"):new RegExp(i)}const wi={generateExpression:function(e,t){const n={};if(t)for(const e in t){const r=t[e],i=r.wrap?Di.wrapExpression(r.value):r.value;n[e]=i;(r.variations||[]).forEach((t=>{const r=Ci(t,i,e);n[t]=r}))}return Si.replaceExpressionTokens(e,n)}};function Ci(e,t,n){if(""===t)return"";const r=Si.createRegExp(n,!0,!0),i=e.split(r);let o="";return i.forEach((e=>{o+=e!==n?e:t})),o}const Ai={generateHyperCubeDef:function(e,t,n,r,i){return function(e,t,n,r){const i={};let o,a;const s=[];let l;e.forEach((e=>{o=Oi(e.match(Ii("Dim"))),o.forEach((e=>{s.push(Ti(t.qDimensions[e],r,e,n).then((t=>{i[`Dim[${e}]`]={value:t,wrap:!0}})))})),a=Oi(e.match(Ii("Mea"))),a.forEach((e=>{s.push(Mi(t.qMeasures[e],r).then((t=>{i[`Mea[${e}]`]={value:t}})))}))})),l=s.length?Promise.all(s).then((()=>Promise.resolve(i))):Promise.resolve(i);return l}(e.dimensions.concat(e.measures),t,n,r).then((n=>{const r=Ht({},n,i),o=Ht(!0,{},t);return o.qDimensions=[],o.qMeasures=[],e.dimensions.forEach((e=>{o.qDimensions.push({qDef:{qFieldDefs:[`=${wi.generateExpression(e,r)}`]}})})),e.measures.forEach((e=>{o.qMeasures.push({qDef:{qDef:wi.generateExpression(e,r)}})})),o}))},getAllHyperCubeExpressions:async function(e,t,n){const r=e.qDimensions.map(((e,r)=>Ti(e,n,r,t))),i=e.qMeasures.map((e=>Mi(e,n)));return{dimensions:await Promise.all(r),measures:await Promise.all(i)}}};function Ti(e,t,n,r){if(e.qLibraryId)return ki(e.qLibraryId,"dimension",t,n,r);const i=r.qDimensionInfo[n].qGroupPos;return Promise.resolve(e.qDef.qFieldDefs[i])}function Mi(e,t){return e.qLibraryId?ki(e.qLibraryId,"measure",t):Promise.resolve(e.qDef.qDef)}function ki(e,t,n,r,i){if(!n)return console.warn("No app provided, returning library id"),e;return n["dimension"===t?"getDimension":"getMeasure"](e).then((e=>e.getProperties().then((e=>"dimension"===t?e.qDim.qFieldDefs[i.qDimensionInfo[r].qGroupPos]:e.qMeasure.qDef))))}function Ii(e){return new RegExp(`\\{\\{${e}\\[\\d\\]\\}\\}`,"g")}function Oi(e){return e?e.map((e=>e.substr(6,1))):[]}function Ni(e){return!Number.isNaN(parseFloat(e))&&Number.isFinite(+e)}function Li(e){return!Number.isNaN(parseInt(e,10))&&parseFloat(e,10)===parseInt(e,10)}const Pi={getBinSize:function(e){return lt(e,"bins.binSize",z.BIN_SIZE)},getDerivedBinSize:function(e){return lt(e,"qUndoExclude.bins.binSize",z.BIN_SIZE)},getDerivedBinOffset:function(e){return lt(e,"qUndoExclude.bins.offset",z.OFFSET)},getDerivedBinCount:function(e){const t=lt(e,"qUndoExclude.bins.binCount",z.BIN_COUNT);return Ni(t)?t<1?1:Li(t)?t:Math.ceil(t):z.BIN_COUNT},getBinCount:function(e){return lt(e,"bins.binCount",void 0)},getBinOffset:function(e){return lt(e,"bins.offset",z.OFFSET)},isAutoBin:function(e){return lt(e,"bins.auto",z.AUTO)},isCountDistinct:function(e){return lt(e,"bins.countDistinct",z.COUNT_DISTINCT)},getBinMode:function(e){return lt(e,"bins.binMode",z.BIN_MODE)},isEmpty:function(e){return null==e||""===e}},Ri=Math.log(10),Hi=1e-9,Fi=[1,1.5,2,3,4,5,6,10],_i=[1,2,4,5,6,8,10],ji=[2,4,5,10];function zi(e,t){if(0===e)return 0;let n;const r=Math.floor(Math.log(Math.abs(e))/Ri),i=e/10**r;for(let e=0;e<t.length;e++)if(i<=t[e]){n=t[e];break}return(r>=0?n*10**r:n/10**-r)*(e<0?-1:1)}function Vi(e,t,n,r,i,o){return Math.floor(Math.abs(e-i)/r)+Math.floor(Math.abs(o-t)/r)}const Bi={calculateBinSize:function(e,t,n){return function(e,t,n){if(!Ni(e)||!Ni(t)||!Ni(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){let r,i,o,a,s,l,u,c,p,f,d,h,m=-1,g=Fi;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+Hi,g=_i):a=Math.abs(t/n);else o=(t+=Hi)-e,a=o/n;do{if(c=1,d=0,m>=0)for(p=1/ji[m],f=1,g=[];f<=10;)g.push(Math.round(1e3*f)/1e3),f+=p;s=a;do{s=zi(s*c,g),l=Math.floor(Math.log(s)/Ri),u=10**l,i=t===e?(Math.ceil(t/s)+Math.floor(n/2))*s:Math.ceil(t/s)*s,r=i-n*s;let o=0;for(h=u;(r>e||i<t)&&o<ji.length;)r=Math.floor(e/h)*h,i=r+n*s,h=u/ji[o++];l<1&&(u=10**(Math.abs(l)+1),i=Math.round(i*u)/u,r=Math.round(r*u)/u),c=1.1,d++}while((r>e||i<t)&&d<10);m++}while(Vi(e,t,0,a,r,i)>0&&m<ji.length);return{binCount:n,offset:r,binSize:s}}(e,t,n=function(e){return e<1?1:Li(e)?e:Math.ceil(e)}(n))}};const $i={getMappingValues:function(e){const t=Pi.isAutoBin(e),n=Pi.getBinMode(e);let r,i,o,a;const s=Pi.isCountDistinct(e);return t||"maxCount"===n?(a=function(e){const t=lt(e,"qHyperCube.qDimensionInfo.0",{});let n=t.qMin,r=t.qMax;n=Ni(n)?n:1,r=Ni(r)?r:1;const i=Pi.getDerivedBinCount(e);return Bi.calculateBinSize(n,r,i)}(e),r=a.binSize,i=a.offset,o=a.binCount):(r=Pi.getBinSize(e),i=Pi.getBinOffset(e)),{binSize:r,binOffset:i,binCount:o,distinct:s}},getMappings:function(e){const t={};return t.BinSize={value:`,${e.binSize}`},t.Label={value:0===e.binOffset?"":",'x'"},t.Offset={value:0===e.binOffset?"":`,${e.binOffset}`},t.Distinct={value:e.distinct?"Distinct ":""},t}};const Ui={generateHyperCubes:async function(e,t,n){const{app:r,translator:i}=n,o=$i.getMappingValues(e),a=$i.getMappings(o),s=Ai.getAllHyperCubeExpressions(t.qHyperCubeDef,e.qHyperCube,r),l=Ai.generateHyperCubeDef({dimensions:["Class(aggr({{Dim[0]}},{{Dim[0]}}){{BinSize}}{{Label}}{{Offset}})"],measures:["Count({{Distinct}}{{Dim[0]}})"]},t.qHyperCubeDef,e.qHyperCube,r,a),u=await s,c=await l;let p;p=Pi.isAutoBin(e)?{qValueExpression:{qExpr:wi.generateExpression("=Ceil(Log10(Count({{Dim[0]}})) / Log10(2)) + 1",{"Dim[0]":{value:u.dimensions[0],wrap:!0}})}}:"maxCount"===Pi.getBinMode(e)&&Pi.isEmpty(t.bins.binCount)?Pi.getDerivedBinCount(e):t.bins.binCount,pt(c,"qDimensions.0.qDef.qSortCriterias",[{qSortByNumeric:1}]),pt(c,"qDimensions.0.qDef.qFieldLabels",[e.qHyperCube.qDimensionInfo[0].qFallbackTitle]),pt(c,"qMeasures.0.qDef.qLabel",e.measureAxis.label||i.get("Visualization.Histogram.MeasureAxisLabel")),pt(t,"qUndoExclude.box.qHyperCubeDef",c),pt(t,"qUndoExclude.bins.binSize",o.binSize),pt(t,"qUndoExclude.bins.offset",o.binOffset),pt(t,"qUndoExclude.bins.binCount",p)}};var Wi={isOnComponentForRange:function(e,t,n){return!!e&&!!n.chart.componentsFromPoint({x:e.center.x,y:e.center.y}).filter((e=>-1!==t.indexOf(e.settings.key)))[0]},isOnComponentForLasso:function(e,t,n){return e&&n.chart.componentsFromPoint({x:e.center.x,y:e.center.y}).filter((e=>e.settings.key===t.keys.componentKey))[0]},isOnComponentForNavBtn:function(e,t,n){return n.chart.componentsFromPoint(e.center).some((e=>e.settings.key===t))}};var Ki={callLassoGesture:function(e,t,n){return{type:"Pan",options:{direction:L.DIRECTION_ALL,threshold:1,enable(r,i){if(e.lassoing)return t.isSelectionEnabled();const o=Wi.isOnComponentForLasso(i,n,this);return t.isSelectionEnabled()&&i&&((a=n.handlers).selectionHandler.lassoState()&&!a.selectionHandler.allFieldsLocked()||e.lassoing)&&o;var a},event:"lasso"},recognizeWith:n.handlers.scrollHandler?"drag":null,events:{lassostart(r){Wi.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(n){e.lassoing&&(n.clientX=n.pointers[0].clientX,n.clientY=n.pointers[0].clientY,t.doEmit(this.chart,"lasso","lassoMove",n))},lassoend(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(r){e.lassoing=!1,t.doEmit(this.chart,"lasso","lassoCancel",r),n.handlers.selectionHandler.resumeEngineCalls(n.keys.lassoBrushKey,!1)}}}}};var Yi={callMeasureRangeGesture:function(e,t,n,r){const i=n.keys.dimRangeBrushKey?"majorrange":"arearange";return{type:"Pan",options:{direction:n.isHorizontal?L.DIRECTION_HORIZONTAL:L.DIRECTION_VERTICAL,event:"measurerange",enable(i,o){if(!n.rangeSelStatus.isOpenMea)return!1;if(e.measureSelecting)return t.isSelectionEnabled();const a="measurerange"===n.active.gesture?[r,n.keys.componentKey]:[r],s=Wi.isOnComponentForRange(o,a,this);return e.measureSelecting=t.isSelectionEnabled()&&!!o&&!!s,e.measureSelecting&&!!n.keys.measureRangeBrushKey}},requireFailure:`lasso ${i}`,recognizeWith:n.handlers.scrollHandler?"drag":null,events:{measurerangestart(i){const o="measurerange"===n.active.gesture?[r,n.keys.componentKey]:[r];Wi.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(n){e.measureSelecting&&t.doEmit(this.chart,"rangeMeasure","rangeMove",n)},measurerangeend(r){e.measureSelecting&&(n.handlers.selectionHandler.resumeEngineCalls(n.keys.measureRangeBrushKey,!0),t.doEmit(this.chart,"rangeMeasure","rangeEnd",r),e.measureSelecting=!1)},measurerangecancel(){n.handlers.selectionHandler.resumeEngineCalls(n.keys.measureRangeBrushKey,!1),e.measureSelecting=!1}}}}};function Gi(e,t){let n;return n="x-axis"===e?"horizontal"===t?L.DIRECTION_VERTICAL:L.DIRECTION_HORIZONTAL:"horizontal"===t?L.DIRECTION_HORIZONTAL:L.DIRECTION_VERTICAL,n}var Xi={callAreaRangeGesture:function(e,t,n,r){const i=n.keys.dimRangeBrushKey?"majorrange":"measurerange";return{type:"Pan",options:{direction:Gi(r,n.isHorizontal),event:"arearange",enable(i,o){if(!n.rangeSelStatus.isOpenDim)return!1;if(e.minoring)return t.isSelectionEnabled();const a="arearange"===n.active.gesture?[r,n.keys.componentKey]:[r],s=Wi.isOnComponentForRange(o,a,this);return e.minoring=t.isSelectionEnabled()&&!!o&&!!s,e.minoring}},requireFailure:`lasso ${i}`,recognizeWith:n.handlers.scrollHandler?"drag":null,events:{arearangestart(i){const o="arearange"===n.active.gesture?[r,n.keys.componentKey]:[r];Wi.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(r){e.minoring&&(this.chart.brush(n.keys.areaBrushKey).clear(),t.doEmit(this.chart,"rangeMinor","areaMove",r))},arearangeend(r){e.minoring&&(n.handlers.selectionHandler.resumeEngineCalls(n.keys.areaBrushKey,!0),t.doEmit(this.chart,"rangeMinor","areaEnd",r),e.minoring=!1)},arearangecancel(){n.handlers.selectionHandler.resumeEngineCalls(n.keys.areaBrushKey,!1),e.minoring=!1}}}}};var Ji={callDimensionRangeGesture:function(e,t,n,r){const i=n.keys.measureRangeBrushKey?"measurerange":"arearange";return{type:"Pan",options:{direction:n.isHorizontal?L.DIRECTION_VERTICAL:L.DIRECTION_HORIZONTAL,event:"majorrange",enable(i,o){if(!n.rangeSelStatus.isOpenDim)return!1;if(e.majoring)return t.isSelectionEnabled();const a="majorrange"===n.active.gesture?[r,n.keys.componentKey]:[r],s=Wi.isOnComponentForRange(o,a,this);return e.majoring=t.isSelectionEnabled()&&!!o&&!!s,e.majoring&&!!n.keys.dimRangeBrushKey}},requireFailure:`lasso ${i}`,recognizeWith:n.handlers.scrollHandler?"drag":null,events:{majorrangestart(i){const o="majorrange"===n.active.gesture?[r,n.keys.componentKey]:[r];Wi.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(n){e.majoring&&t.doEmit(this.chart,"rangeDim","rangeMove",n)},majorrangeend(r){e.majoring&&(n.handlers.selectionHandler.resumeEngineCalls(n.keys.dimRangeBrushKey,!0),t.doEmit(this.chart,"rangeDim","rangeEnd",r),e.majoring=!1)},majorrangecancel(){n.handlers.selectionHandler.resumeEngineCalls(n.keys.dimRangeBrushKey,!1),e.majoring=!1}}}}};var Qi={callDragGesture:function(e,t,n,r,i){let o={};return{type:"Pan",options:{direction:n.isHorizontal?L.DIRECTION_VERTICAL:L.DIRECTION_HORIZONTAL,event:"drag",enable(r,i){return e.dragging?t.isNavigationEnabled():(e.dragging=t.isNavigationEnabled()&&!!i&&!!this.chart.componentsFromPoint({x:i.center.x,y:i.center.y}).filter((e=>e.settings.key===n.keys.componentKey))[0],e.dragging)}},requireFailure:r?`lasso ${t.getBrushConfig()}`:"",events:{dragstart(e){o={x:e.deltaX,y:e.deltaY};let t=-(n.isHorizontal?e.deltaY:e.deltaX)/n.handlers.scrollHandler.getItemSize();!n.isHorizontal&&i&&(t=-t),n.handlers.scrollHandler.getScrollApi().move(t)},dragmove(t){if(!e.dragging)return;let 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(){e.dragging&&(e.dragging=!1)},dragcancel(){e.dragging=!1}}}}};var Zi={callNavBtnGesture:function(e,t){return{type:"Tap",options:{event:"navBtnTap",enable(n,r){return!(!r||!e())&&Wi.isOnComponentForNavBtn(r,t,this)}},events:{navBtnTap(e){this.chart.componentsFromPoint(e.center).forEach((t=>{const n=e.target,r=n?n.getAttribute("data-action"):"";if(r)return t.emit(r)}))}}}}};var eo={create:function(e,t,n,r,i){const o={};t=t||"vertical";const a=r.lassoBrushKey||"select",s=r.dimRangeBrushKey||null,l=r.measureRangeBrushKey||null,u=r.areaBrushKey||null,c=r.legendBrushKey||null,p=!!e.selectionHandler&&e.selectionHandler.isOn(),f={dragging:!1,lassoing:!1,majoring:!1,minoring:!1,measureSelecting:!1},d={gesture:"",type:""},h="horizontal"===t,m=h?"y-axis":"x-axis",g=h?"x-axis":"y-axis";function y(e,t,n){if(d.gesture===e)return;let r=a;const i=t||d.chart;switch(d.gesture){case"majorrange":b(i,"rangeDim","rangeClear",n),r=s;break;case"measurerange":b(i,"rangeMeasure","rangeClear",n),r=l;break;case"arearange":b(i,"rangeMinor","areaClear",n),r=u}d.gesture=e;const o="range"===e?"range":"item";d.type&&d.type!==o&&i.brush(r).clear(),d.chart=t,d.type=o}function b(e,t,n,r){if(e){const i=e.component(t);i&&i.emit(n,r)}}let v=[];const x={isSelectionEnabled:()=>e.selectionHandler&&e.selectionHandler.isOn(),isNavigationEnabled:()=>e.scrollHandler&&e.scrollHandler.isOn(),doEmit:b,switchTo:y,getBrushConfig:function(){return s?l?"majorrange measurerange":"majorrange arearange":"measurerange arearange"}},q={handlers:e,keys:r,isHorizontal:h,active:d,rangeSelStatus:i};function D(){y("none"),f.majoring=!1,f.measureSelecting=!1,f.minoring=!1}return p&&(v=[{type:"Tap",options:{event:"rangeClearTap"},events:{rangeClearTap(e){y("none",this.chart,e),f.majoring=!1,f.measureSelecting=!1,f.minoring=!1}}}],v.unshift(Zi.callNavBtnGesture(x.isNavigationEnabled,c)),v.push(Ki.callLassoGesture(f,x,q)),s?l?(v.push(Ji.callDimensionRangeGesture(f,x,q,m)),e.selectionHandler.addComponent(s,{id:"rangeDim",clear:"rangeClear"}),v.push(Yi.callMeasureRangeGesture(f,x,q,g)),e.selectionHandler.addComponent(l,{id:"rangeMeasure",clear:"rangeClear"})):(v.push(Ji.callDimensionRangeGesture(f,x,q,m)),e.selectionHandler.addComponent(s,{id:"rangeDim",clear:"rangeClear"}),v.push(Xi.callAreaRangeGesture(f,x,q,g)),e.selectionHandler.addComponent(u,{id:"rangeMinor",clear:"areaClear"})):(v.push(Yi.callMeasureRangeGesture(f,x,q,g)),e.selectionHandler.addComponent(l,{id:"rangeMeasure",clear:"rangeClear"}),v.push(Xi.callAreaRangeGesture(f,x,q,m)),e.selectionHandler.addComponent(u,{id:"rangeMinor",clear:"areaClear"}))),e.scrollHandler&&(v.push(Qi.callDragGesture(f,x,q,p,n)),e.scrollHandler.getScrollApi().on("update",D)),o.gestures=v,o.destroy=function(){e.scrollHandler&&e.scrollHandler.getScrollApi().removeListener("update",D)},o}};const to=(e,t,n)=>{const r={getOptions:(r,i)=>{const o=(e,t)=>({ref:`${i}.fontColor`,component:"color-picker",width:!1,defaultValue:()=>{const n=e.getStyle(t,`${i}.color`,"color");return{color:n,index:e.getDataColorPickerPalettes()[0].colors.indexOf(n)}}});return{labelSection:{component:"items",ref:"components",key:r,items:{fontFamily:{ref:`${i}.fontFamily`,component:"dropdown",options:()=>e.getOptions(`${i}.fontFamily`),defaultValue:()=>e.getDefaultValue(`${i}.fontFamily`)},...((t,n)=>({fontWrapper:{component:"inline-wrapper",items:{fontSize:{ref:`${i}.fontSize`,component:"dropdown",width:!0,options:()=>e.getOptions(`${i}.fontSize`),defaultValue:()=>e.getDefaultValue(`${i}.fontSize`)},fontColor:{...o(t,n)}}}}))(t,n)}}}}};return r},no=(e,t,n,r,i)=>r({theme:e,translator:t,flags:i,config:{id:n,paths:["axis.title","axis.label.name","label.value","legend.title","legend.label"]}}),ro=(e,t)=>(t.components||[]).find((t=>t.key===e)),io=(e,t,n,r)=>{var i,o,a,s;const l=r.isEnabled("CLIENT_IM_3364")?null===(i=ro("axis",n))||void 0===i?void 0:i.axis:{};return{text:{fontFamily:(null==l||null===(o=l.title)||void 0===o?void 0:o.fontFamily)||t.getStyle(e,"axis.title","fontFamily"),fontSize:(null==l||null===(a=l.title)||void 0===a?void 0:a.fontSize)||t.getStyle(e,"axis.title","fontSize"),fill:(null==l||null===(s=l.title)||void 0===s||null===(s=s.fontColor)||void 0===s?void 0:s.color)||t.getStyle(e,"axis.title","color")}}},oo=(e,t,n,r)=>{var i,o,a,s;const l=r.isEnabled("CLIENT_IM_3364")?null===(i=ro("axis",n))||void 0===i?void 0:i.axis:{};return{labels:{fontFamily:(null==l||null===(o=l.label)||void 0===o||null===(o=o.name)||void 0===o?void 0:o.fontFamily)||t.getStyle(e,"axis.label.name","fontFamily"),fontSize:(null==l||null===(a=l.label)||void 0===a||null===(a=a.name)||void 0===a?void 0:a.fontSize)||t.getStyle(e,"axis.label.name","fontSize"),fill:(null==l||null===(s=l.label)||void 0===s||null===(s=s.name)||void 0===s||null===(s=s.fontColor)||void 0===s?void 0:s.color)||t.getStyle(e,"axis.label.name","color")}}},ao=20;function so(e){const t=lt(e,"qUndoExclude.box.qHyperCube.qDimensionInfo.0.qApprMaxGlyphCount",0);return Math.min(ao,t)}const lo={createSettings:function(e){return{settings:{labels:{maxGlyphCount:so(e)}}}}};const uo={createSettings:function(e){const t=Pi.isAutoBin(e),n=Pi.getBinMode(e),r=Pi.getDerivedBinSize(e);let i,o;if(t||"maxCount"===n){const t=Pi.getDerivedBinOffset(e);i=t,o=t+Pi.getDerivedBinCount(e)*r}else{const t=lt(e,"qUndoExclude.box.qHyperCube.qDimensionInfo.0",{});i=t.qMin||0,o=(t.qMax||0)+r}return{component:{type:"linear",min:i,max:o}}}},co={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}},po=/^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/i,fo=/^rgba\((\d{1,3}),(\d{1,3}),(\d{1,3}),(\d(\.\d+)?)\)$/i,ho=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i,mo=/^#([A-f0-9])([A-f0-9])([A-f0-9])$/i,go=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i,yo=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i,bo=Math.floor,vo=Math.round,xo=Qn.extend({init(){let e,t,n,r,i,o,a,s,l,u,c,p,f=0,d=0,h=0,m=1;if(this._invalid=!1,arguments[0]instanceof xo)f=arguments[0]._r,d=arguments[0]._g,h=arguments[0]._b,m=arguments[0]._a,this._invalid=arguments[0]._invalid;else if(arguments.length<3)if("string"==typeof arguments[0])if(p=arguments[0],c=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(p))f=parseInt(c[1],10),d=parseInt(c[2],10),h=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(p))f=parseInt(c[1],10),d=parseInt(c[2],10),h=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(p))f=parseInt(c[1],16),d=parseInt(c[2],16),h=parseInt(c[3],16),m=1;else if(c=/^#([A-f0-9])([A-f0-9])([A-f0-9])$/i.exec(p))f=parseInt(c[1]+c[1],16),d=parseInt(c[2]+c[2],16),h=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(p)){switch(e=parseFloat(c[1]),t=parseFloat(c[3]),r=parseFloat(c[5]),e%=360,t/=100,r/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,r=r<0?0:r>1?1:r,o=r<=.5?2*r*t:(2-2*r)*t,a=e/60,s=o*(1-Math.abs(a%2-1)),l=[],a=Math.floor(a),a){case 0:l=[o,s,0];break;case 1:l=[s,o,0];break;case 2:l=[0,o,s];break;case 3:l=[0,s,o];break;case 4:l=[s,0,o];break;case 5:l=[o,0,s];break;default:l=[0,0,0]}u=r-.5*o,f=l[0]+u,d=l[1]+u,h=l[2]+u,f=vo(255*f),d=vo(255*d),h=vo(255*h),m=1}else if(c=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i.exec(p)){switch(e=parseFloat(c[1]),t=parseFloat(c[3]),r=parseFloat(c[5]),m=parseFloat(c[7]),e%=360,t/=100,r/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,r=r<0?0:r>1?1:r,o=r<=.5?2*r*t:(2-2*r)*t,a=e/60,s=o*(1-Math.abs(a%2-1)),l=[],a=Math.floor(a),a){case 0:l=[o,s,0];break;case 1:l=[s,o,0];break;case 2:l=[0,o,s];break;case 3:l=[0,s,o];break;case 4:l=[s,0,o];break;case 5:l=[o,0,s];break;default:l=[0,0,0]}u=r-.5*o,f=l[0]+u,d=l[1]+u,h=l[2]+u,f=vo(255*f),d=vo(255*d),h=vo(255*h)}else if(c=/^hsv\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(p)){switch(e=parseFloat(c[1]),t=parseFloat(c[3]),i=parseFloat(c[5]),e%=360,t/=100,i/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,i=i<0?0:i>1?1:i,o=i*t,a=e/60,s=o*(1-Math.abs(a%2-1)),l=[],a=Math.floor(a),a){case 0:l=[o,s,0];break;case 1:l=[s,o,0];break;case 2:l=[0,o,s];break;case 3:l=[0,s,o];break;case 4:l=[s,0,o];break;case 5:l=[o,0,s];break;default:l=[0,0,0]}u=i-o,f=l[0]+u,d=l[1]+u,h=l[2]+u,f=vo(255*f),d=vo(255*d),h=vo(255*h),m=1}else co[p.toLowerCase()]?(n=p.toLowerCase(),f=co[n].r,d=co[n].g,h=co[n].b,m="number"==typeof co[n].a?co[n].a:1):this._invalid=!0;else"number"==typeof arguments[0]&&arguments[0]>=0&&"argb"===arguments[1]?(m=(4278190080&arguments[0])>>>24,m/=255,f=(16711680&arguments[0])>>16,d=(65280&arguments[0])>>8,h=255&arguments[0]):"number"==typeof arguments[0]&&arguments[0]>=0?(f=(16711680&arguments[0])>>16,d=(65280&arguments[0])>>8,h=255&arguments[0]):this._invalid=!0;else arguments.length>=3?(f=arguments[0],d=arguments[1],h=arguments[2],m=arguments.length>=4?arguments[3]:1):this._invalid=!0;Number.isNaN(+f+d+h+m)&&(this._invalid=!0),this._r=bo(f),this._g=bo(d),this._b=bo(h),this._a=m,this._spaces={}},isInvalid(){return this._invalid},setAlpha(e){this._a=e,this._spaces={}},getAlpha(){return this._a},toRGB:function(){return this._spaces.rgb||(this._spaces.rgb=xo.toRGB(this)),this._spaces.rgb},toRGBA:function(){return this._spaces.rgba||(this._spaces.rgba=xo.toRGBA(this)),this._spaces.rgba},toString(){return this._spaces.rgb||(this._spaces.rgb=xo.toRGB(this)),this._spaces.rgb},toHex:function(){return this._spaces.hex||(this._spaces.hex=xo.toHex(this)),this._spaces.hex},toHSL:function(e){return this._spaces.hsl||(this._spaces.hsl=xo.toHSL(this,e)),this._spaces.hsl},toHSLA:function(e){return this._spaces.hsla||(this._spaces.hsla=xo.toHSLA(this,e)),this._spaces.hsla},toHSV(){const e=this.toHSVComponents();return`hsv(${e.h},${e.s},${e.v})`},toHSVComponents:function(){return this._spaces.hsvComp||(this._spaces.hsvComp=xo.toHSVComponents(this)),this._spaces.hsvComp},toNumber:function(){return this._spaces.num||(this._spaces.num=xo.toNumber(this)),this._spaces.num},isDark(){return this.isInvalid()||this.getLuminance()<125},getLuminance(){return void 0===this._lumi&&(this._lumi=.299*this._r+.587*this._g+.114*this._b),this._lumi},shiftLuminance(e){const t=this.toHSLA(),n=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i.exec(t),r=parseFloat(n[1]),i=parseFloat(n[3]);let o=parseFloat(n[5]);const a=parseFloat(n[7]);return o+=e,o=Math.max(0,Math.min(o,100)),`hsla(${r},${i},${o},${a})`},isEqual(e){return e instanceof xo||(e=new xo(e)),this._r===e._r&&this._g===e._g&&this._b===e._b},blend(e,t){return`rgba(${[bo(this._r+(e._r-this._r)*t),bo(this._g+(e._g-this._g)*t),bo(this._b+(e._b-this._b)*t),bo(this._a+(e._a-this._a)*t)].join(",")})`},createShiftedColor(e){(void 0===e||Number.isNaN(+e))&&(e=1);const t=this.getLuminance(),n=this._g<126?1:1+this._g/512,r=this.shiftLuminance(20*(t*n<220?.8+1/(t+1)*4:-(.8+t/255*1))*e);return new xo(r)}});xo.toRGB=function(e){if(e instanceof xo)return`rgb(${[e._r,e._g,e._b].join(",")})`;"string"==typeof e&&(e=xo.toNumber(e));return`rgb(${(16711680&e)>>16},${(65280&e)>>8},${255&e})`},xo.toRGBA=function(e,t){if(e instanceof xo)return`rgba(${[e._r,e._g,e._b,void 0!==t?t:e._a].join(",")})`;"string"==typeof e&&(e=xo.toNumber(e));return`rgba(${(16711680&e)>>16},${(65280&e)>>8},${255&e},${void 0!==t?t:e._a})`},xo.toHex=function(e){let t,n,r;return e instanceof xo?(t=e._r.toString(16),n=e._g.toString(16),r=e._b.toString(16),1===t.length&&(t=`0${t}`),1===n.length&&(n=`0${n}`),1===r.length&&(r=`0${r}`),`#${[t,n,r].join("")}`):("string"==typeof e&&(e=xo.toNumber(e)),t=((16711680&e)>>16).toString(16),n=((65280&e)>>8).toString(16),r=(255&e).toString(16),1===t.length&&(t=`0${t}`),1===n.length&&(n=`0${n}`),1===r.length&&(r=`0${r}`),`#${t}${n}${r}`)},xo.toHSL=function(e,t){let n,r,i,o=0;"string"==typeof e&&(e=new xo(e));const a=e._r/255,s=e._g/255,l=e._b/255,u=Math.max(a,s,l),c=Math.min(a,s,l);if(r=t?.21*a+.72*s+.07*l:(u+c)/2,u===c)n=0,o=0;else{switch(i=u-c,n=r>.5?i/(2-u-c):i/(u+c),u){case a:o=(s-l)/i+(s<l?6:0);break;case s:o=(l-a)/i+2;break;case l:o=(a-s)/i+4}o/=6}return`hsl(${360*o},${100*n},${100*r})`},xo.toHSLA=function(e,t){let n,r,i,o=0;"string"==typeof e&&(e=new xo(e));const a=e._r/255,s=e._g/255,l=e._b/255,u=e._a,c=Math.max(a,s,l),p=Math.min(a,s,l);if(r=t?.21*a+.72*s+.07*l:(c+p)/2,c===p)n=0,o=0;else{switch(i=c-p,n=r>.5?i/(2-c-p):i/(c+p),c){case a:o=(s-l)/i+(s<l?6:0);break;case s:o=(l-a)/i+2;break;case l:o=(a-s)/i+4}o/=6}return`hsla(${360*o},${100*n},${100*r},${u})`},xo.toHSVComponents=function(e){let t,n,r=0;"string"==typeof e&&(e=new xo(e));const i=e._r/255,o=e._g/255,a=e._b/255,s=Math.max(i,o,a),l=Math.min(i,o,a),u=s;if(s===l)t=0,r=0;else{switch(n=s-l,t=0===n?0:n/u,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*u}},xo.toNumber=function(){if(1===arguments.length&&arguments[0]instanceof xo)return(arguments[0]._r<<16)+(arguments[0]._g<<8)+arguments[0]._b;let e,t,n=0,r=0,i=0;return 1===arguments.length&&"string"==typeof arguments[0]&&(t=arguments[0],(e=/^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/i.exec(t))?(n=parseInt(e[1],10),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},xo.blend=function(e,t,n){const r=(16711680&(e=xo.toNumber(e)))>>16,i=(65280&e)>>8,o=255&e;return(r+(((16711680&(t=xo.toNumber(t)))>>16)-r)*n<<16)+(i+(((65280&t)>>8)-i)*n<<8)+(o+((255&t)-o)*n)},xo.getBlend=function(e,t,n){const 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 xo(r,i,o,a)},xo.isCSSColor=function(e){return!(arguments.length>1||"string"!=typeof e)&&(po.test(e)||fo.test(e)||ho.test(e)||mo.test(e)||go.test(e)||yo.test(e)||co[e.toLowerCase()])},xo.getBestContrast=function(e,t,n){const r=e.getLuminance();return Math.abs(r-t.getLuminance())>Math.abs(r-n.getLuminance())?t:n},xo.getContrast=function(e,t){if(!e||!t)return;const n=e.getLuminance()/100,r=t.getLuminance()/100;return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)},xo.isDark=function(){const e={getLuminance:xo.prototype.getLuminance,isInvalid:xo.prototype.isInvalid};return xo.prototype.init.apply(e,[].slice.call(arguments)),xo.prototype.isDark.call(e)},xo.useDarkLabel=function(e,t){return e._a>.5?!e.isDark():!t};const qo={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(e){const t=new xo(e);return 0===t.getAlpha()?this.BLACK:t.isDark()?this.WHITE:this.BLACK},getContrastingGrey(e){const t=new xo(e);return 0===t.getAlpha()?this.DARK_GREY:xo.getBestContrast(t,new xo(qo.LIGHT_GREY),new xo(qo.DARK_GREY))},getBestContrast:(e,t,n)=>xo.getBestContrast(new xo(e),new xo(t),new xo(n)),getContrastingTransparent(e){const t=new xo(e);return 0===t.getAlpha()||"none"===e?this.TRANSPARENT_BLACK:t.isDark()?this.TRANSPARENT_WHITE:this.TRANSPARENT_BLACK}};const Do={createSettings:function(e,t,n,r,i,o){const{theme:a}=e.environment,s=a.getColorPickerColor(t.color.bar.paletteColor),l=Pi.getDerivedBinSize(t),u=[],c=[n.consume,r.consume,i.consume];return e._tooltipHandler.isOn()&&(u.push(o.box.trigger),c.push.apply(c,o.box.consume)),u.push(n.trigger),{key:"box-marker",settings:{box:{fill:s,stroke:qo.getContrastingGrey(s).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:c},data:{extract:{field:"qDimensionInfo/0",props:{start:0,end:{field:"qMeasureInfo/0"},measure:{field:"qMeasureInfo/0",reduce:"first",value:e=>e,reduceLabel:"none"},binStart:{field:"qDimensionInfo/0",value:e=>e.qNum},binEnd:{field:"qDimensionInfo/0",value:e=>e.qNum+l},elemNo:{field:"qDimensionInfo/0"},bin:{field:"qDimensionInfo/0",value:e=>e}}}}}}};const So={createSettings:function(e,t,n,r){const i=t.getStyles(),o=((e,t,n,r)=>{var i,o,a,s;const l=r.isEnabled("CLIENT_IM_3364")?null===(i=ro("value",n))||void 0===i?void 0:i.label:{},u=(null==l||null===(o=l.value)||void 0===o?void 0:o.fontFamily)||t.label.value.fontFamily;let c=(null==l||null===(a=l.value)||void 0===a?void 0:a.fontSize)||t.label.value.fontSize;return c=parseFloat(c),{fontFamily:u,fontSize:c,fill:null==l||null===(s=l.value)||void 0===s||null===(s=s.fontColor)||void 0===s?void 0:s.color}})(0,i,e,r),a=o.fill||i.label.value.color;return{settings:{sources:[{strategy:{settings:{...o,labels:[{placements:[{fill:a},{fill:r.isEnabled("CLIENT_IM_3364")&&o.fill?a:e=>xo.isDark(e.node.attrs.fill)?i.label.value.lightColor:i.label.value.darkColor}]}]}}}]}}}},Eo="object.histogram";function wo(e){return lt(e,"qHyperCube.qDimensionInfo.0.qIsOneAndOnlyOne",!1)}const Co={createChartSettings:function(e,t){const n=e.isRtl(),r=lt(t,"qHyperCube.qDimensionInfo.0",{}).qFallbackTitle||"",{theme:i,translator:o}=e.environment,a=Tr.create({chartID:Eo,theme:i,isRtl:n,flags:e.flags}),s=function(e){var t=e.theme,n=e.config,r=void 0===n?{}:n,i=r.id,o=r.resolve,a=void 0===o?[]:o,s=r.transform,l=void 0===s?[]:s,u=r.extend,c=void 0===u?[]:u,p={theme:t,matrix:wt(a),styles:void 0};return p.styles=At({theme:t,id:i,transform:l,extend:c,matrix:p.matrix}),{getStyles:function(){return p.styles},getTheme:function(){return p.theme},setTheme:function(e){p.theme=e,p.styles=At({theme:e,id:i,transform:l,extend:c,matrix:p.matrix})}}}({theme:i,config:{id:"histogram"}});let l={},u={},c={};e._selectionHandler.isOn()&&(e._selectionHandler.setUpStart(),l=e._selectionHandler.setUpBrush({contexts:["select"],data:["elemNo"],dataPath:"qUndoExclude/box"}),u=e._selectionHandler.setUpBrush({contexts:["select-dimension"],data:["elemNo"],dataPath:"qUndoExclude/box",isSingleSelect:wo(t)}),c=e._selectionHandler.setUpBrush({dataPath:"qUndoExclude/box",contexts:["select-measure"],data:["end"]}),e._selectionHandler.setUpDone());const p={box:{}};e._tooltipHandler.isOn()&&(p.box=e._tooltipHandler.setUp({chartBuilder:a,environment:e.environment,data:[""],contexts:["boxTip"],componentKey:"box-marker",measureRows:["measure"],labelData:["bin"]}));const f=function(e){const t={};return e?(t.isOpenDim=!1,t.isOpenMea=!1):(t.isOpenDim=!0,t.isOpenMea=!0),t}(function(e){const 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=eo.create(d,"vertical",n,{componentKey:"box-marker",lassoBrushKey:"select",dimRangeBrushKey:null,measureRangeBrushKey:"select-measure",areaBrushKey:"select-dimension"},f),a.addPreset("dimension-measure-chart",{isRtl:n,includeDimensionAxis:!0,orientation:"vertical",selectionsEnabled:e._selectionHandler.isOn(),theme:i,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:uo.createSettings(t),measureAxisProperties:t.measureAxis,measureTitleText:t.measureAxis.label||o.get("Visualization.Histogram.MeasureAxisLabel"),dimensionAxisProperties:t.dimensionAxis,dimensionAxisSettings:lo.createSettings(t),dimensionTitleText:r,gridlines:t.gridlines,hasNavigation:!1,isNavigationEnabledFn:()=>!1,refLines:t.refLine&&t.refLine.refLines,axisTitleStyle:io(Eo,i,t,e.flags),axisLabelStyle:oo(Eo,i,t,e.flags)});const h=a.getSettings(),m=Do.createSettings(e,t,l,u,c,p);if(a.addComponent("box-marker",m),t.dataPoint&&t.dataPoint.showLabels){const n=So.createSettings(t,s,Eo,e.flags);a.addComponent("labels",n)}return e.addSnapshotChartSettings(h,t),h.scales.rangeSelSettings={type:"linear",min:h.scales.dimension.min,max:h.scales.dimension.max,source:"qDimensionInfo/0"},h}};const Ao=Pr.extend("Histogram",{namespace:".histogram",init:function({environment:e,flags:t,lasso:n,picasso:r,$element:i,backendApi:o,selectionsApi:a,renderState:s}){this._super(r,i,e,o,a),this.flags=t,this.renderState=s,this.picassoElement.__do_not_use_findShapes=this.chartInstance.findShapes.bind(this.chartInstance),this._derivedProperties=new xi,this._selectionHandler=Vr.create({model:o.model,chartInstance:this.chartInstance,selectionsApi:a,selectPaths:["/qUndoExclude/box/qHyperCubeDef"],lasso:n}),this._tooltipHandler=ni.create(this.chartInstance,i,"object.histogram"),this.setDataPaths(["qUndoExclude/box/qHyperCube"])},updateConstraints:function(e){const 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 Co.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){const t=function(){const t=lt(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:!t,RequireNumericDimension:!0},options:{bottom:!0,supportNegative:!1,explicitOnlyNanData:t,explicitRequireNumericDimension:(n=e.qHyperCube,n.qDimensionInfo.length>0&&-1===n.qDimensionInfo[0].qTags.indexOf("$numeric"))}};var n},updateChart:function(e,t){if(!e.qUndoExclude)return Promise.resolve();this._super(e,t)},updateData:function(e){const t=this;return t._super(e).then((()=>{if(t._destroyed)return Promise.reject();e=t.layout;const n={height:Math.min(e.qHyperCube.qSize.qcy,1e3),width:2},r=t.backendApi.model;return!!this.layout.snapshotData?Promise.resolve():r.getEffectiveProperties().then((i=>t._destroyed?Promise.reject():t._derivedProperties.addDefaultHyperCubeHash(i.qHyperCubeDef,e.qHyperCube,t.environment.app,function(e,t){return{box:t.qHyperCubeDef,binMappings:$i.getMappingValues(e),binProperties:t.bins,measureAxis:t.measureAxis,version:"2.0"}}(e,i)).then((o=>{if(t._destroyed)return Promise.reject();const a={layout:e,properties:i,model:r,hashData:o,generateDerivedProperties:(e,n)=>Ui.generateHyperCubes(e,n,t.environment)};return t._derivedProperties.isDerivedUpToDate(a)?e.qUndoExclude?(t.renderState.restore(),t.backendApi.updateCache(e.qUndoExclude.box),t.getData(t.backendApi,e.qUndoExclude.box.qHyperCube,n)):Promise.resolve():(t.renderState.pending(),t._derivedProperties.updateDerivedProperties(a))}))))}))},paint:function(){const e=this.layout.qUndoExclude;return e&&e.box&&e.box.qHyperCube.qDataPages.length?this._super():Promise.resolve(!1)},isLassoDisabled:function(){return!1}});class To{constructor(e){this.model=e,this.path="/qUndoExclude/box/qHyperCubeDef"}setCacheOptions({maxStackedValues:e}){}updateCache(e){}getData(e){return this.model.getHyperCubeData(this.path,e)}}var Mo={onChangeCalcCond:function(e){var t;const n=null==e?void 0:e.qHyperCubeDef,r=null==e||null===(t=e.qUndoExclude)||void 0===t||null===(t=t.box)||void 0===t?void 0:t.qHyperCubeDef;n&&r&&(r.qCalcCond=n.qCalcCond,r.qCalcCondition=n.qCalcCondition)}};const ko=(e,t,n)=>({component:"styling-panel",chartTitle:"Object.Histogram",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",ref:"components",useGeneral:!0,useBackground:e,items:n&&null!=n&&n.isEnabled("CLIENT_IM_3364")?{axisTitleSection:{translation:"properties.axis.title",component:"panel-section",items:t.getOptions("axis","axis.title")},axisLabelSection:{translation:"properties.axis.label",component:"panel-section",items:t.getOptions("axis","axis.label.name")},valueLabelSection:{translation:"properties.value.label",component:"panel-section",items:t.getOptions("value","label.value")}}:void 0}),Io="maxCount",Oo="size";function No(e){return!(e.bins&&e.bins.auto)}function Lo(e){return No(e)&&e.bins.binMode===Io}function Po(e){var t,n;const{translator:r,flags:i}=e,o=null==e||null===(t=e.flags)||void 0===t?void 0:t.isEnabled("SENSECLIENT_IM_2021_STYLINGPANEL_HISTOGRAM"),a=null==e||null===(n=e.flags)||void 0===n?void 0:n.isEnabled("SENSECLIENT_IM_2021_HISTOGRAM_BG"),s=e.anything.sense.theme,l={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:()=>{const{primary:e}=s.getDataColorSpecials(),t=s.getDataColorPickerPalettes()[0].colors,n=t.indexOf(e);return{index:-1===n?Math.min(6,t.length-1):n}}}}}}},u="object.histogram",c=no(s,r,u,re,i),p=to(c,s,u),f={type:"items",translation:"properties.presentation",items:{styleEditor:o&&ko(a,p,null==e?void 0:e.flags),gridLines:{type:"items",snapshot:{tid:"property-gridLines"},items:{showGridLines:{ref:"gridlines.auto",type:"boolean",translation:"properties.gridLine.spacing",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},gridSpacing:{ref:"gridlines.spacing",type:"number",component:"dropdown",defaultValue:2,options:[{value:0,translation:"properties.gridLine.noLines"},{value:2,translation:"properties.gridLine.medium"},{value:3,translation:"properties.gridLine.narrow"}],show:e=>e.gridlines&&!e.gridlines.auto}}},showLabels:{ref:"dataPoint.showLabels",type:"boolean",translation:"properties.dataPoints.labelmode",component:"switch",defaultValue:!1,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],snapshot:{tid:"property-dataPoints"}}}},d={items:{labels:{items:{header:{show(e){var t;return null===(t=e.qHyperCubeDef.qDimensions)||void 0===t?void 0:t.length}},pointLabels:{component:"checkbox",ref:"dataPoint.showLabels",type:"boolean",translation:"Simple.Label.Value",show(e){var t;return null===(t=e.qHyperCubeDef.qDimensions)||void 0===t?void 0:t.length}},dimensionTitle:{component:"checkbox",ref:"dimensionAxis.show",type:"string",translation:"Simple.Label.XAxis.Hide",defaultValue:"all",show(e){var t;return null===(t=e.qHyperCubeDef.qDimensions)||void 0===t?void 0:t.length},convertFunctions:{get:(e,t,n,r)=>"labels"===r.dimensionAxis.show||"none"===r.dimensionAxis.show,set(e,t,n,r,i){i.dimensionAxis.show=e?"labels":"all"}}},measureTitle:{component:"checkbox",ref:"measureAxis.show",type:"string",translation:"Simple.Label.YAxis.Hide",defaultValue:"all",show(e){var t;return null===(t=e.qHyperCubeDef.qDimensions)||void 0===t?void 0:t.length},convertFunctions:{get:(e,t,n,r)=>"labels"===r.measureAxis.show||"none"===r.measureAxis.show,set(e,t,n,r,i){i.measureAxis.show=e?"labels":"all"}}}}}}},h={uses:"settings",items:{simpleLabels:d,presentation:f,colors:l,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}}}}}}},m={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond",change:Mo.onChangeCalcCond}}},refLines:{uses:"reflines",items:{colorBackground:{show:!1}}}}},g={ref:"bins.binMode",type:"string",component:"dropdown",options:[{value:Io,translation:"Visualization.Histogram.Binning.NumberOfBinsOption"},{value:Oo,translation:"Visualization.Histogram.Binning.BarWidthOption"}],defaultValue:Io,show:e=>No(e)},y={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:e=>!No(e)},mode:g,binCount:{ref:"bins.binCount",type:"number",expression:"optional",expressionType:"ValueExpression",translation:"Visualization.Histogram.Binning.BinCount",defaultValue:"",convertFunctions:{get(e,t,n){const r=n.properties.bins.binCount;return Pi.isEmpty(r)?Pi.getDerivedBinCount(n.layout):e(null)||""},set(e,t,n){t(n.type,e,void 0)}},show:Lo},binMessage:{component:"text",translation:"Visualization.Histogram.Binning.BinCountRounding",show(e){const t=lt(e,"bins.binCount"),n="object"==typeof t;return Lo(e)&&!Pi.isEmpty(t)&&!n&&!Li(t)&&t>0}},minBinMessage:{component:"text",translation:"Visualization.Histogram.Binning.BinCountMin",show(e){const t=lt(e,"bins.binCount");return!!(Lo(e)&&!Pi.isEmpty(t)&&t<=0)}},binSize:{ref:"bins.binSize",type:"number",expression:"optional",expressionType:"ValueExpression",defaultValue:10,show:e=>No(e)&&e.bins.binMode===Oo,translation:"Visualization.Histogram.Binning.BinSize"},offset:{ref:"bins.offset",type:"number",expression:"optional",expressionType:"ValueExpression",show:e=>No(e)&&e.bins.binMode===Oo,translation:"Visualization.Histogram.Binning.Offset"},distinct:{ref:"bins.countDistinct",type:"boolean",defaultValue:!1,component:"checkbox",translation:"Visualization.Histogram.CountDistinct"}}};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:e=>"OTHER_COUNTED"===lt(e,"qOtherTotalSpec.qOtherMode")},otherCounted:{show:e=>"OTHER_COUNTED"===lt(e,"qOtherTotalSpec.qOtherMode")},otherLimitMode:{show(e){const t=lt(e,"qOtherTotalSpec.qOtherMode");return"OTHER_ABS_LIMITED"===t||"OTHER_REL_LIMITED"===t}},otherLimit:{show(e){const t=lt(e,"qOtherTotalSpec.qOtherMode");return"OTHER_ABS_LIMITED"===t||"OTHER_REL_LIMITED"===t}},calculatedAgainstMessage:{show:!0,label(){const e=r.get("properties.histogram.staticMeasureName");return r.get("Properties.DimensionLimits.CalculatedAgainst",e)}}}},others:{show:!1,items:{suppressOther:{defaultValue:!0}}}}}}},bins:y,addons:m,settings:h}}}var Ro={type:"items",component:"accordion",items:{data:{uses:"data",items:{dimensions:{translation:"Common.Fields"}}}}};var Ho={getExportRawDataOptions:function(e,t,n){return e.addItem({translation:"contextMenu.export",tid:"export",select(){n.show(t.model,"/qUndoExclude/box/qHyperCubeDef")}}),Promise.resolve()}};const Fo="qUndoExclude.box";function _o(e){var t;if(null!==(t=e.anything)&&void 0!==t&&t.sense)return{definition:Po(e),softDefinition:Ro,support:{cssScaling:!1,snapshot:!0,export:!0,exportData:!0,sharing:!0,viewData:!0},importProperties:(t,n,r,i)=>{const o=B(e);r.mapProperties();const a={defaultDimension:r.getDefaultDimensionProperties(),defaultMeasure:r.getDefaultMeasureProperties()};return j.hypercube.importProperties({exportFormat:t,initialProperties:n,dataDefinition:o,defaultPropertyValues:a,hypercubePath:i})},exportProperties:(e,t,n)=>j.hypercube.exportProperties({propertyTree:e,hyperCubePath:n?Fo:t,viewDataMode:n}),requireNumericDimension:!0,exportTableProperties(e){const t=Fo;return j.hypercube.exportProperties({propertyTree:e,hypercubePath:t,viewData:!0})},getExportRawDataOptions:Ho.getExportRawDataOptions}}}}}));
|
|
27
29
|
//# sourceMappingURL=sn-histogram.systemjs.js.map
|