@nebula.js/sn-bar-chart 2.0.2 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api-specifications/properties.json +80 -2
- package/core/esm/index.js +5 -5
- package/dist/sn-bar-chart.js +3 -3
- package/dist/sn-bar-chart.systemjs.js +2 -2
- package/package.json +1 -1
- package/sn-bar-chart-ext/dist/sn-bar-chart.js +3 -3
- package/sn-bar-chart-ext/sn-bar-chart.qext +1 -1
- package/api-specifications/api.md +0 -849
- package/api-specifications/plugins.md +0 -157
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @nebula.js/sn-bar-chart v2.0.
|
|
2
|
+
* @nebula.js/sn-bar-chart v2.0.4
|
|
3
3
|
* Copyright (c) 2025 QlikTech International AB
|
|
4
4
|
* Released under the MIT license.
|
|
5
5
|
*/
|
|
@@ -15,7 +15,7 @@ e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,i,o,a,s,l,c,u,d,f=e.le
|
|
|
15
15
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
|
|
16
16
|
var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof s?r:s,c=Object.create(l.prototype);return dy(c,"_invoke",function(n,r,i){var o,s,l,c=0,u=i||[],d=!1,f={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return o=t,s=0,l=e,f.n=n,a}};function h(n,r){for(s=n,l=r,t=0;!d&&c&&!i&&t<u.length;t++){var i,o=u[t],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=h&&((i=n<2&&h<o[1])?(s=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,u,p){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&h(u,p),s=u,l=p;(t=s<2?e:l)||!d;){o||(s?s<3?(s>1&&(f.n=-1),h(s,l)):f.n=l:f.v=l);try{if(c=2,o){if(s||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=e}else if((t=(d=f.n<0)?l:n.call(r,f))!==a)break}catch(t){o=e,s=1,l=t}finally{c=1}}return{value:t,done:d}}}(n,i,o),!0),c}var a={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][r]?t(t([][r]())):(dy(t={},r,function(){return this}),t),d=c.prototype=s.prototype=Object.create(u);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,dy(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=c,dy(d,"constructor",c),dy(c,"constructor",l),l.displayName="GeneratorFunction",dy(c,i,"GeneratorFunction"),dy(d),dy(d,i,"Generator"),dy(d,r,function(){return this}),dy(d,"toString",function(){return"[object Generator]"}),(uy=function(){return{w:o,m:f}})()}function dy(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}dy=function(e,t,n,r){function o(t,n){dy(e,t,function(e){return this._invoke(t,n,e)})}t?i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(o("next",0),o("throw",1),o("return",2))},dy(e,t,n,r)}function fy(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,c=!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){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||my(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 hy(e){return function(e){if(Array.isArray(e))return ry(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||my(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 py(e){return py="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},py(e)}function my(e,t){if(e){if("string"==typeof e)return ry(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ry(e,t):void 0}}var gy="point-label-cross-placement",yy="unclassified",vy="equal-equal",by="equal-higher",xy="equal-lower",Sy="equal-void",wy="higher-equal",My="higher-higher-acute",ky="higher-higher-obtuse",Cy="higher-lower-negative",qy="higher-lower-positive",Ey="higher-void",Dy="lower-equal",Ty="lower-higher-negative",Oy="lower-higher-positive",Ny="lower-lower-acute",Ay="lower-lower-obtuse",_y="lower-void",Iy="void-equal",Ly="void-higher",Py="void-lower",Ry="void-void";function zy(e,t){return Math.atan2(t.y-e.y,t.x-e.x)*(180/Math.PI)}function Fy(e,t,n){var r=Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)),i=Math.sqrt(Math.pow(t.x-n.x,2)+Math.pow(t.y-n.y,2)),o=Math.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2));return Math.acos((i*i+r*r-o*o)/(2*i*r))*(180/Math.PI)}function jy(e){var t=e.previous,n=e.current,r=e.next,i=t&&t.value,o=n&&n.value,a=r&&r.value;return t||r?t?r?i===o?o===a?vy:o<a?by:xy:o===a?i>o?wy:Dy:i>o?o<a?Fy(t,n,r)>90?ky:My:zy(t,n)>zy(t,r)?qy:Cy:o>a?Fy(t,n,r)>90?Ay:Ny:zy(t,n)>zy(t,r)?Oy:Ty:i===o?Sy:i>o?Ey:_y:o===a?Iy:o<a?Ly:Py:Ry}var By,Hy={TOP:"top",TOP_RIGHT:"top-right",RIGHT:"right",BOTTOM_RIGHT:"bottom-right",BOTTOM:"bottom",BOTTOM_LEFT:"bottom-left",LEFT:"left",TOP_LEFT:"top-left"};function Vy(e){var t=e.bounds,n=e.size,r=t.x,i=t.y,o=t.width,a=t.height;return"center"===n.insideStrategy?Math.floor(r+o/2)>=0&&Math.ceil(r+o/2)<=n.width&&Math.floor(i+a/2)>=0&&Math.ceil(i+a/2)<=n.height:Math.floor(r+o)>0&&Math.ceil(r)<n.width&&Math.floor(i+a/2)>=0&&Math.ceil(i+a/2)<=n.height}function $y(){By=By||document.createElement("canvas").getContext("2d")}var Wy,Uy={measureTextWidth:function(e){return $y(),By.measureText(e).width},lineWrap:function(e,t,n,r){var i,o;$y();var a,s,l=e?e.split(/\n+|\r+|\r\n/):[],c=[],u=e?e.split(/\s+/):[],d=l[0];if("number"!=typeof t||t<=0)return[e];if("number"==typeof r&&l.length>=r)return l.slice(0,r);for(n&&(By.font=n),o=0;o<l.length;o++){for(d=fy(u=(l[o]||"").split(/\s+/),1)[0],s="",i=1;i<u.length;i++)if(a="".concat(d," ").concat(u[i]),Uy.measureTextWidth(a)>t&&("number"!=typeof r||r>c.length)?(c.push(d),d=u[i]):d=a,"number"==typeof r&&c.length>=r){s=u.slice(i+1).join(" ");break}"number"!=typeof r||c.length<r?c.push(d):c[Math.max(0,c.length-1)]="".concat(c[Math.max(0,c.length-1)]||""," ").concat(d," ").concat(s)}return c},wordWrap:function(e,t,n,r,i){if($y(),!e||!e.length)return[];n&&(By.font=n);var o,a,s,l,c=[],u=e.slice();if(u.filter(function(e){return!!e}),"number"!=typeof t||t<0)return e.slice();for(l=0;l<u.length;l++)a=null,(s=u[l])&&(s.length<=1||Uy.measureTextWidth(s)<=t?c.push(s):(o=Uy.splitWord(s,t,void 0,r-c.length)).length<=1?c.push(o[0]):(a=o.pop(),c=c.concat(o),u[l+1]?Uy.measureTextWidth("".concat(a," ").concat(u[l+1]))>t&&c.length+u.length-l<=r?u.splice(l+1,0,a):u[l+1]="".concat(a," ").concat(u[l+1]):u.push(a)));return c.forEach(function(e,t,n){n[t]=e?e.trim():e}),c.length>r?(c=c.splice(0,r))[c.length-1]=Uy.truncate(c[c.length-1],t,n,i).text:(s=c[c.length-1])&&s.length>1&&Uy.measureTextWidth(s)>t&&(c[c.length-1]=Uy.truncate(s,t,n,i).text),c},truncate:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…";$y();var i,o,a,s=e,l=Uy.measureTextWidth("i"),c=Math.ceil(t/l);if(n&&(By.font=n),e&&t){if(Uy.measureTextWidth(s)>t){for(i=Math.min(c,s.length);i>0;i--)if(o=s.substring(0,i-1).trim()+r,Uy.measureTextWidth(o)<=t){a=s.substring(i-1),s=o;break}i||(a=s,s="…")}}else a=void 0;return{text:s,rest:a}},isNumber:function(e){return"number"==typeof e&&Number.isFinite(e)},explodeWord:function(e,t,n,r){var i;$y();var o=e,a="",s=[];if(Uy.isNumber(n)&&n<=1)return[e];var l=Math.ceil(t/r);for(i=Math.min(e.length,l);i>0&&(o=e.substring(0,i)," "===e.substring(i-1,i)?o=e.substring(0,i-1):o+="-",a=e.substring(i),!(Uy.measureTextWidth(o)<=t));i--);return(!i&&!o||Uy.measureTextWidth(o)>t)&&(o=e.substring(0,1),a=e.substring(1)),s.push(o),a?(Uy.measureTextWidth(a)>t?(a=Uy.explodeWord(a,t,n-1,r),s=s.concat(a)):s.push(a),s.filter(function(e){return""!==e.trim()})):s},splitWord:function(e,t,n,r){return $y(),e&&t?(n&&(By.font=n),Uy.explodeWord(e,t,r,Math.max(1,Uy.measureTextWidth("i")))):[]},wrapText:function(e,t,n,r,i){var o;return Number.isNaN(t)?[e]:(o=r>1?Uy.lineWrap(e,t,n,r):[e],o=Uy.wordWrap(o,t,n,r,i))},getFontHeight:function(e){return $y(),e&&(By.font=e),1.5*Uy.measureTextWidth("m")},tokenize:function(e,t,n,r,i,o){var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1;$y(),t&&(By.font=t);var s=Uy.getFontHeight(),l=a*s,c=[],u=0,d=[];if(o<s)return[];var f=o?Math.max(1,Math.floor(o/l)):r||1;return Array.isArray(r)?(r.forEach(function(e){u+=Number.isNaN(e)||e<=0?0:e}),r.forEach(function(e){c.push(Number.isNaN(e)||e<=0?f-u:e)})):c=[Number.isNaN(r)||r<=0?f:Math.min(f,r)],Array.isArray(e)?e.forEach(function(e,n){d.length<f&&(d=d.concat(Uy.wrapText(e,i,t,c[n])))}):d=Uy.wrapText(e,i,t,c[0],n),d}};function Yy(e){var t,n,r=e.config,i=e.crossPlacements,o=e.node,a=e.line,s=e.groupIndex,l=e.extract,c=e.style,u=e.measureText,d=e.size,f=e.horizontal,h=e.rtl,p=e.meta,m=e.showLabel,g=l.label(o.data);if("string"!=typeof g&&"number"!=typeof g||""===g)return!1;var y=function(){var e,t,n=u({fontFamily:c.fontFamily,fontSize:c.fontSize,text:g});if(null===(e=o.data)||void 0===e||null===(e=e.value)||void 0===e||!e.maxLabelWidth||n.width<=(null===(t=o.data)||void 0===t||null===(t=t.value)||void 0===t?void 0:t.maxLabelWidth))return n;var r="".concat(c.fontSize," ").concat(c.fontFamily),i=Uy.tokenize(g,r,"…",3,o.data.value.maxLabelWidth);return n.lines=i.map(function(e){return{text:e,size:u({fontFamily:c.fontFamily,fontSize:c.fontSize,text:e})}}),n.width=Math.max.apply(Math,hy(n.lines.map(function(e){return e.size.width}))),n.height*=i.length,n}(),v=o.localBounds,b=o.attrs["stroke-width"],x=l.pointValue(o.data),S=!(null===(t=o.data)||void 0===t||null===(t=t.value)||void 0===t||!t.hasBackground),w=S?{X:3,Y:2}:{X:1,Y:0},M=S?{X:2,Y:2}:{X:0,Y:0},k={x:v.x+v.width/2,y:v.y+v.height/2,width:y.width+2*w.X+2*M.X,height:y.height+2*w.Y+2*M.Y},C="".concat(k.x,"-").concat(k.y),q=!f&&!h,E=f?d.height:d.width,D=(f?k.y:k.x)/E,T=(q?1-D:D)<=(E<=200?.25:.1),O=null===(n=o.data)||void 0===n||null===(n=n.value)||void 0===n||null===(n=n.label)||void 0===n?void 0:n.placement,N=Object.keys(Hy).map(function(e){return Hy[e]}),A={key:C,config:r,node:o,line:a,group:s,value:x,labelMeasurements:y,bounds:k,inside:Vy({bounds:v,size:d}),border:b?b/2:0,classification:yy,setClassification:function(e){A.classification=e},preferences:[],setPreferences:function(e){var t;(t=A.preferences).push.apply(t,hy(e))},fixedPlacement:N.includes(O)?O:void 0,placement:void 0,setPlacement:function(e){A.placement=e,i.setPlacement(e)},duplicate:!1,setDuplicate:function(){A.duplicate=!0},extreme:p.getExtreme(C),elite:T,show:r.labels&&m(o)};return A}var Ky=(ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(Wy={},vy,[Hy.TOP,Hy.BOTTOM]),by,[Hy.BOTTOM,Hy.BOTTOM_RIGHT]),xy,[Hy.TOP,Hy.TOP_RIGHT]),Sy,[Hy.TOP,Hy.BOTTOM]),wy,[Hy.LEFT,Hy.BOTTOM_LEFT,Hy.TOP,Hy.TOP_RIGHT]),My,[Hy.BOTTOM,Hy.BOTTOM_LEFT,Hy.LEFT,Hy.TOP_RIGHT]),ky,[Hy.BOTTOM,Hy.TOP]),Cy,[Hy.TOP,Hy.TOP_RIGHT,Hy.RIGHT]),qy,[Hy.BOTTOM,Hy.BOTTOM_LEFT,Hy.LEFT]),Ey,[Hy.TOP]),ay(ay(ay(ay(ay(ay(ay(ay(ay(ay(Wy,Dy,[Hy.TOP]),Ty,[Hy.TOP,Hy.TOP_LEFT]),Oy,[Hy.BOTTOM_RIGHT]),Ny,[Hy.TOP,Hy.TOP_LEFT,Hy.LEFT,Hy.TOP_RIGHT,Hy.RIGHT]),Ay,[Hy.TOP,Hy.BOTTOM]),_y,[Hy.TOP]),Iy,[Hy.TOP]),Ly,[Hy.TOP,Hy.BOTTOM]),Py,[Hy.TOP,Hy.BOTTOM,Hy.LEFT]),Ry,[Hy.TOP]),ay(Wy,yy,[Hy.TOP,Hy.BOTTOM,Hy.RIGHT,Hy.LEFT,Hy.TOP_RIGHT,Hy.BOTTOM_RIGHT,Hy.BOTTOM_LEFT,Hy.TOP_LEFT]));function Gy(e){var t=function(e){var t=e.configs,n=e.crossPlacements,r=e.nodes,i=e.extract,o=e.style,a=e.measureText,s=e.size,l=e.horizontal,c=e.rtl,u=e.showLabel,d=function(e){var t={top:[],right:[],bottom:[],left:[]},n=e.nodes.map(function(e){var t=e.localBounds,n={x:t.x+t.width/2,y:t.y+t.height/2};return{key:"".concat(n.x,"-").concat(n.y),center:n}}),r=n.reduce(function(e,t){return(!e.top||t.center.y<e.top.center.y)&&(e.top=t),(!e.right||t.center.x>e.right.center.x)&&(e.right=t),(!e.bottom||t.center.y>e.bottom.center.y)&&(e.bottom=t),(!e.left||t.center.x<e.left.center.x)&&(e.left=t),e},{});return t.top=n.filter(function(e){return e.center.y===r.top.center.y}).map(function(e){return e.key}),t.right=n.filter(function(e){return e.center.x===r.right.center.x}).map(function(e){return e.key}),t.bottom=n.filter(function(e){return e.center.y===r.bottom.center.y}).map(function(e){return e.key}),t.left=n.filter(function(e){return e.center.x===r.left.center.x}).map(function(e){return e.key}),{getExtrema:function(e){return{top:-1!==t.top.indexOf(e),right:-1!==t.right.indexOf(e),bottom:-1!==t.bottom.indexOf(e),left:-1!==t.left.indexOf(e)}},getExtreme:function(e){return[t.top,t.right,t.bottom,t.left].some(function(t){return-1!==t.indexOf(e)})}}}({nodes:r}),f=function(e){var t=e.by,n=e.lineId,r=e.nodes.reduce(function(e,r,i){var o=t(r.data);return e[o]||(e[o]={items:[],index:i}),e[o].items.push({node:r,line:n(r)}),e},{});return Object.keys(r).map(function(e){return r[e]}).sort(function(e,t){return e.index-t.index}).map(function(e){return e.items})}({nodes:r,by:i.majorValue,lineId:i.lineId}).map(function(e,r){return e.map(function(e){return{line:e.line,item:Yy({config:t.get(e.node.key),crossPlacements:n,node:e.node,line:e.line,groupIndex:r,extract:i,style:o,measureText:a,size:s,horizontal:l,rtl:c,meta:d,showLabel:u})}}).filter(function(e){return e.item}).reduce(function(e,t){return e[t.line]=t.item,e},{})});return f.filter(function(e){return Object.keys(e).length})}({configs:e.configs,crossPlacements:e.crossPlacements,nodes:e.nodes,extract:e.extract,style:e.style,measureText:e.measureText,size:e.size,horizontal:e.horizontal,rtl:e.rtl,showLabel:e.showLabel}),n=hy(t.reduce(function(e,t){return e.push.apply(e,hy(Object.keys(t).map(function(e){return t[e]}))),e},[])),r=fy(n,1)[0],i=function(e){for(var t=e.threshold,n=e.groups.map(function(e){return Object.keys(e).map(function(t){return e[t]})}),r={},i=0;i<=n.length;i++){var o=n[i];if(o)for(var a=0;a<o.length;a++){var s=o[a];if(s.config.lines){var l=s.line;r[l]||(r[l]=[]),r[l].push(s.bounds)}}}for(var c=Object.keys(r).map(function(e){return r[e]}),u=[],d=0;d<c.length;d++)for(var f=0;f<c[d].length-1;f++){var h=c[d][f],p=c[d][f+1],m={x1:h.x,y1:h.y,x2:p.x,y2:p.y},g=m.x1-m.x2,y=m.y1-m.y2;Math.sqrt(g*g+y*y)>t&&u.push(m)}return u}({groups:t,threshold:null==r?void 0:r.node.localBounds.height}),o={getItems:function(){return n},getLines:function(){return i}};return function(e){for(var t=e.groups,n=function(e){for(var n=Object.keys(t[e]).map(function(n){return t[e][n]}),r=0;r<n.length;r++){var i=n[r];if(!i.config.fixed){var o=jy({previous:t[e-1]&&t[e-1][i.line],current:i,next:t[e+1]&&t[e+1][i.line]});i.setClassification(o)}}},r=0;r<t.length;r++)n(r)}({groups:t}),o.getItems().forEach(function(e){e.setPreferences(Ky[e.classification])}),o}function Xy(e){var t=e.item,n=e.placement,r=e.size;return n.x>=0-r.edgeBleed.left&&n.x<=r.width-t.bounds.width+r.edgeBleed.right&&n.y>=0-r.edgeBleed.top&&n.y<=r.height-t.bounds.height}function Jy(e){var t=e.line1,n=e.line2,r=(n.y2-n.y1)*(t.x2-t.x1)-(n.x2-n.x1)*(t.y2-t.y1);if(0===r)return!1;var i=((n.x2-n.x1)*(t.y1-n.y1)-(n.y2-n.y1)*(t.x1-n.x1))/r,o=((t.x2-t.x1)*(t.y1-n.y1)-(t.y2-t.y1)*(t.x1-n.x1))/r;return i>=0&&i<=1&&o>=0&&o<=1}var Zy={x:0,width:0,y:0,height:0},Qy=function(e){var t=e.item;return{x:t.bounds.x-t.bounds.width/2,y:t.bounds.y-t.bounds.height-t.node.localBounds.height/2-t.border}},ev=function(e){var t=e.item;return{x:t.bounds.x,y:t.bounds.y-t.bounds.height-t.node.localBounds.height/2-t.border}},tv=function(e){var t=e.item;return{x:t.bounds.x+t.node.localBounds.width/2+t.border,y:t.bounds.y-t.bounds.height/2}},nv=function(e){var t=e.item;return{x:t.bounds.x,y:t.bounds.y+t.node.localBounds.height/2+t.border}},rv=function(e){var t=e.item;return{x:t.bounds.x-t.bounds.width/2,y:t.bounds.y+t.node.localBounds.height/2+t.border}},iv=function(e){var t=e.item;return{x:t.bounds.x-t.bounds.width,y:t.bounds.y+t.node.localBounds.height/2+t.border}},ov=function(e){var t=e.item;return{x:t.bounds.x-t.bounds.width-t.node.localBounds.width/2-t.border,y:t.bounds.y-t.bounds.height/2}},av=function(e){var t=e.item;return{x:t.bounds.x-t.bounds.width,y:t.bounds.y-t.bounds.height-t.node.localBounds.height/2-t.border}},sv=[Hy.TOP,Hy.TOP_LEFT,Hy.TOP_RIGHT],lv=[Hy.BOTTOM,Hy.BOTTOM_LEFT,Hy.BOTTOM_RIGHT];function cv(e){var t=e.position,n={x:2.5,width:-5,y:0,height:0},r=sv.indexOf(t)>-1,i=lv.indexOf(t)>-1;return r&&(n.y=4,n.height=-4),i&&(n.height=-4),n}function uv(e){var t=e.cx,n=e.cy,r=e.r,i=e.degrees*(Math.PI/180);return{x:Math.round(t+r*Math.sin(i)),y:Math.round(n+r*-Math.cos(i))}}function dv(e){var t=e.coordinates,n=e.degrees,r=e.item,i={x:t.x,y:t.y};return n<=90?i.y-=r.bounds.height:n>180&&n<=270?i.x-=r.bounds.width:n>270&&(i.y-=r.bounds.height,i.x-=r.bounds.width),i}function fv(e){var t=e.item,n=e.validator,r=e.force,i=void 0!==r&&r,o=ay(ay(ay(ay(ay(ay(ay(ay({},Hy.TOP,Qy),Hy.TOP_RIGHT,ev),Hy.RIGHT,tv),Hy.BOTTOM_RIGHT,nv),Hy.BOTTOM,rv),Hy.BOTTOM_LEFT,iv),Hy.LEFT,ov),Hy.TOP_LEFT,av);if(t.fixedPlacement)return o[t.fixedPlacement]({item:t});for(var a=[].concat(hy(t.preferences),hy(Object.keys(Hy).map(function(e){return Hy[e]}).filter(function(e){return-1===t.preferences.indexOf(e)}))),s=[],l=0;l<a.length;l++){var c=a[l],u=o[c]({item:t}),d=cv({position:c}),f=n({item:t,placement:u,adjustment:d,ignoreLines:i});if(i&&f.inside&&s.push(u),f.valid)return u}var h=function(){return function(e){for(var t=e.item,n=e.validator,r=e.force,i=void 0!==r&&r,o=function(e){return[e.item.node.localBounds.height/2*Math.sqrt(2)]}({item:t}),a=t.bounds.x,s=t.bounds.y,l=0;l<o.length;l++){for(var c=o[l],u=40;u<=180;u+=15){var d=dv({coordinates:uv({cx:a,cy:s,r:c,degrees:u}),degrees:u,item:t});if(n({item:t,placement:d,ignoreLines:i}).valid)return d}for(var f=320;f>180;f-=15){var h=dv({coordinates:uv({cx:a,cy:s,r:c,degrees:f}),degrees:f,item:t});if(n({item:t,placement:h,ignoreLines:i}).valid)return h}}return!1}({item:t,validator:n,force:i})};return i?h()||s[0]||void 0:(t.extreme||t.elite)&&h()||void 0}function hv(e){var t=e.configs,n=e.crossPlacements,r=e.model,i=e.size,o=e.all,a={},s=r.getItems(),l=[].concat(hy(s.map(function(e){return{x:e.node.localBounds.x-e.border+1,y:e.node.localBounds.y-e.border+1,height:e.node.localBounds.height+2*e.border-2,width:e.node.localBounds.width+2*e.border-2}})),hy(n.getPlacements({configs:t}))),c=[],u=r.getLines();s.forEach(function(e){var t=e.node.data;if(!(!e.show||!e.inside||t.null&&t.null.value||t.interpolated&&t.interpolated.value)){var n=e.key;if(!a[n]||e.config.duplicates){a[n]=!0;var r=function(e){var t=e.size,n=e.lines,r=e.placements;return function(e){var i=e.item,o=e.placement,a=e.adjustment,s=void 0===a?Zy:a,l=e.ignoreLines,c=void 0!==l&&l,u={inside:Xy({item:i,placement:o,size:t}),collides:!0,valid:!1};return u.inside?(u.collides=function(e){var t=e.candidate,n=e.lines;return!!e.rects.some(function(e){return function(e){var t=e.rect1,n=e.rect2;return!(n.x>t.x+t.width||n.x+n.width<t.x||n.y>t.y+t.height||n.y+n.height<t.y)}({rect1:e,rect2:t})})||n.some(function(e){return function(e){var t=e.line,n=e.rect,r={x:n.x,y:n.y},i={x:n.x+n.width,y:n.y},o={x:n.x+n.width,y:n.y+n.height},a={x:n.x,y:n.y+n.height},s={x1:i.x,y1:i.y,x2:o.x,y2:o.y},l={x1:o.x,y1:o.y,x2:a.x,y2:a.y},c={x1:a.x,y1:a.y,x2:r.x,y2:r.y};return Jy({line1:t,line2:{x1:r.x,y1:r.y,x2:i.x,y2:i.y}})||Jy({line1:t,line2:s})||Jy({line1:t,line2:l})||Jy({line1:t,line2:c})}({line:e,rect:t})})}({candidate:{x:o.x+s.x,y:o.y+s.y,width:i.bounds.width+s.width,height:i.bounds.height+s.height},lines:c?[]:n,rects:r}),u.valid=!u.collides,u):u}}({size:i,lines:u,placements:l}),s=fv({item:e,validator:r});s?(s.height=e.bounds.height,s.width=e.bounds.width,l.push(s),e.setPlacement(s)):o&&c.push({item:e,validator:r})}else e.setDuplicate()}}),c.forEach(function(e){var t=e.item,n=fv({item:t,validator:e.validator,force:!0});n&&(n.height=t.bounds.height,n.width=t.bounds.width,l.push(n),t.setPlacement(n))})}var pv={require:["chart","renderer"],defaultSettings:{settings:{orientation:"horizontal",rtl:!1,all:!1,label:function(){},showLabel:function(){return!0},pointValue:function(){},majorValue:function(){},lineId:function(){},enabled:function(){return!0},configs:[],insideStrategy:"edge",labelSpace:{use:function(){return!1},size:10},cache:void 0},style:{fontFamily:'"Source Sans Pro", "Arial", "sans-serif"',fontSize:"12px",fill:"#333"}},created:function(){var e,t,n,r,i,o;this.crossPlacements=(e={cache:this.settings.settings.cache,key:this.settings.key},i=e.key,o={isPrimary:!1},null!=(r=e.cache)&&null!==(t=r.has)&&void 0!==t&&t.call(r,gy)||(o.isPrimary=!0,null==r||null===(n=r.set)||void 0===n||n.call(r,gy,{})),{reset:function(){var e,t=null==r||null===(e=r.get)||void 0===e?void 0:e.call(r,gy);t&&(o.isPrimary&&Object.keys(t).forEach(function(e){return delete t[e]}),t[i]=[])},setPlacement:function(e){var t,n=null==r||null===(t=r.get)||void 0===t?void 0:t.call(r,gy);n&&n[i].push(e)},getPlacements:function(e){var t,n=e.configs,o=null==r||null===(t=r.get)||void 0===t?void 0:t.call(r,gy);if(!o)return[];var a=[],s=n.getCollection().filter(function(e){return!e.labels&&!!e.labelKeys.length}).reduce(function(e,t){return e.push.apply(e,hy(t.labelKeys)),e},[]);return Object.keys(o).forEach(function(e){e!==i&&s.some(function(t){return t===e})&&a.push.apply(a,hy(o[e]))}),a}})},preferredSize:function(){var e={edgeBleed:{top:0,right:0,left:0}},t=this.settings.settings,n=t.orientation,r=t.rtl,i=t.labelSpace,o=i.use,a=i.size;if(o()){var s="horizontal"===n;e.edgeBleed.top=s?a:0,e.edgeBleed[r?"left":"right"]=s?0:a}return e},render:function(){this.crossPlacements.reset();var e=this.settings.settings;if(!(0,e.enabled)())return[];var t=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).configs,t=void 0===e?[]:e,n={},r=[];return t.forEach(function(e){var t=e.key;n[t]={labels:void 0===e.labels||e.labels,labelKeys:Array.isArray(e.labelKeys)?e.labelKeys:[],lines:void 0===e.lines||e.lines,fixed:void 0!==e.fixed&&e.fixed,duplicates:void 0!==e.duplicates&&e.duplicates},r.push(n[t])}),{meta:{allKeys:t.map(function(e){return e.key})},getCollection:function(){return r},get:function(e){return n[e]},getFirstLabelKey:function(){var e;return null===(e=t.find(function(e){return e.labels}))||void 0===e?void 0:e.key}}}({configs:e.configs}),n=t.getFirstLabelKey();if(!n)return[];if(!this.chart.component(n))return[];var r=this.chart.findShapes("circle, path, rect").filter(function(e){return t.meta.allKeys.includes(e.key)});if(!r.length)return[];var i="horizontal"===e.orientation,o=i?"x":"y";r.sort(function(e,t){return e.localBounds[o]-t.localBounds[o]});var a={label:e.label,pointValue:e.pointValue,majorValue:e.majorValue,lineId:e.lineId},s=this.rect,l={height:s.height,width:s.width,edgeBleed:s.edgeBleed,insideStrategy:e.insideStrategy},c=this.crossPlacements,u=this.style,d=Gy({configs:t,crossPlacements:c,nodes:r,extract:a,style:u,measureText:this.renderer.measureText,size:l,horizontal:i,rtl:e.rtl,showLabel:e.showLabel});({model:d}).model.getItems().sort(function(e,t){return e.extreme===t.extreme?0:e.extreme&&!t.extreme?-1:1}),hv({configs:t,crossPlacements:c,model:d,size:l,all:e.all});var f=d.getItems(),h=[];f.filter(function(e){return e.placement}).forEach(function(e){var t,n,r,i,o,s=null!==(t=e.node.data.value)&&void 0!==t&&t.hasBackground?2:0,l=null!==(n=e.node.data.value)&&void 0!==n&&n.hasBackground?2:0,c=(null===(r=e.node.data.value)||void 0===r||null===(r=r.style)||void 0===r||null===(r=r.label)||void 0===r?void 0:r.fontSize)||u.fontSize,d=(null===(i=e.node.data.value)||void 0===i||null===(i=i.style)||void 0===i||null===(i=i.label)||void 0===i?void 0:i.fontFamily)||u.fontFamily,f=(null===(o=e.node.data.value)||void 0===o?void 0:o.labelColor)||u.fill;e.labelMeasurements.lines?e.labelMeasurements.lines.forEach(function(t,n){h.push({type:"text",x:e.placement.x+e.placement.width/2,y:e.placement.y+(n+.5)*t.size.height+s+l,fontSize:c,fontFamily:d,fill:f,text:t.text,data:e.node.data.value,baseline:"central",anchor:"middle"})}):h.push({type:"text",x:e.placement.x+e.placement.width/2,y:e.placement.y+e.labelMeasurements.height/2+s+l,fontSize:c,fontFamily:d,fill:f,text:a.label(e.node.data),data:e.node.data.value,baseline:"central",anchor:"middle"})});var p=f.filter(function(e){var t;return e.placement&&(null===(t=e.node.data.value)||void 0===t?void 0:t.hasBackground)}).map(function(e){var t;return{type:"rect",x:e.placement.x+2,y:e.placement.y+2,rx:3,ry:3,fill:null===(t=e.node.data.value)||void 0===t?void 0:t.labelBackgroundColor,width:e.placement.width-4,height:e.placement.height-4,data:e.node.data.value}});return[].concat(hy(p),h)}},mv=["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"],gv=["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 yv=function(e){return{value:e,label:e.charAt(0).toUpperCase()+e.slice(1),groupHeader:!1,disabled:!1,styles:{fontFamily:e}}};function vv(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,hy(new Set([r].concat(hy(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(hy(o.map(function(e){return yv(e)})),[{value:"DefaultHeader",label:n.get("properties.allFonts"),metaText:n.get("properties.default"),groupHeader:!0}],hy(function(e){return null!=e&&e.isEnabled("PS_20852_WYSIWYG_FONT_SUPPORT")?gv:mv}(i).map(function(e){return yv(e)})))}function bv(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 vv({theme:t,translator:n,defaultValue:a(),flags:o})}}}var xv,Sv,wv=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],Mv=function(e){return{value:e,label:e,groupHeader:!1,disabled:!1}};function kv(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,hy(new Set([n].concat(hy(i))))):r.push(n),[{value:"ThemeHeader",label:t.get("properties.themeFontSizes"),metaText:t.get("properties.theme"),groupHeader:!0}].concat(hy(r.map(function(e){return Mv(e)})),[{value:"DefaultHeader",label:t.get("properties.allFontSizes"),metaText:t.get("properties.default"),groupHeader:!0}],hy(wv.map(function(e){return Mv(e)})))}({theme:t,translator:n,defaultValue:o()})}}}function Cv(e){var t=e.theme,n=e.translator,r=e.id,i=e.path;return{fontFamily:bv({theme:t,translator:n,id:r,path:i,flags:e.flags}),fontSize:kv({theme:t,translator:n,id:r,path:i})}}function qv(e){return Ev.apply(this,arguments)}function Ev(){return(Ev=oy(uy().m(function e(t){var n,r,i,o;return uy().w(function(e){for(;;)switch(e.n){case 0:if(n=t.app,r=t.items,n.evaluate){e.n=1;break}return e.a(2,r);case 1:return e.n=2,Promise.all(r.filter(function(e){var t;return!(null===(t=e.qCalcCondition)||void 0===t||null===(t=t.qCond)||void 0===t||!t.qv)}).map(function(e){var t=e.qCalcCondition.qCond.qv;return n.evaluate(t).then(function(t){return"0"===t?e.qDef.cId:void 0}).catch(function(){return e.qDef.cId})}));case 2:return i=e.v,o=i.filter(Boolean),e.a(2,r.filter(function(e){return!o.includes(e.qDef.cId)}))}},e)}))).apply(this,arguments)}function Dv(e){var t=e.app,n=e.translator,r=e.dimension,i={id:r.qDef.cId,text:n.get("Object.ErrorMessage.MissingDimension"),meta:{}},o=r.qLibraryId;if(o)return t.getDimension?t.getDimension(o).then(function(e){return e.getLayout()}).catch(function(){}).then(function(e){if(!e)return i;var t=e.qDim,n=t.qGrouping,o=t.qLabelExpression,a="C"===n,s="H"===n,l="N"===n;return{id:r.qDef.cId,text:o&&l?o:e.qDim.title,meta:{isCyclic:a,isDrillDown:s,isNormal:l}}}):i;var a=r.qDef,s=a.cId,l=a.qLabelExpression,c=a.qFieldLabels,u=a.qFieldDefs,d={isCyclic:!1,isDrillDown:!1,isNormal:!0};return l?t.evaluate?t.evaluate(l).then(function(e){return{id:s,text:e,meta:d}}):i:{id:s,text:c[0]||u[0],meta:d}}function Tv(e){return Ov.apply(this,arguments)}function Ov(){return(Ov=oy(uy().m(function e(t){var n,r,i,o,a,s,l,c;return uy().w(function(e){for(;;)switch(e.n){case 0:if(r=t.app,i=t.translator,o=t.properties,a=(null==o||null===(n=o.qHyperCubeDef)||void 0===n||null===(n=n.qLayoutExclude)||void 0===n?void 0:n.qHyperCubeDef)||{},s=a.qDimensions,(l=void 0===s?[]:s).length){e.n=1;break}return e.a(2,Promise.resolve([]));case 1:return e.n=2,qv({app:r,items:l});case 2:return c=e.v,e.a(2,Promise.all(c.map(function(e){return Dv({app:r,translator:i,dimension:e})})))}},e)}))).apply(this,arguments)}function Nv(e){var t=e.app,n=e.translator,r=e.measure,i={id:r.qDef.cId,text:n.get("Object.ErrorMessage.MissingMeasure")},o=r.qLibraryId;if(o)return t.getMeasure?t.getMeasure(o).then(function(e){return e.getLayout()}).catch(function(){}).then(function(e){if(!e)return i;var t=e.qMeasure.qLabelExpression;return{id:r.qDef.cId,text:t||e.qMeasure.qLabel||e.qMeasure.qDef}}):i;var a=r.qDef,s=a.cId,l=a.qLabelExpression,c=a.qLabel,u=a.qDef;return l?t.evaluate?t.evaluate(l).then(function(e){return{id:s,text:e}}):i:{id:s,text:c||u}}function Av(e){return _v.apply(this,arguments)}function _v(){return(_v=oy(uy().m(function e(t){var n,r,i,o,a,s,l,c;return uy().w(function(e){for(;;)switch(e.n){case 0:if(r=t.app,i=t.translator,o=t.properties,a=(null==o||null===(n=o.qHyperCubeDef)||void 0===n||null===(n=n.qLayoutExclude)||void 0===n?void 0:n.qHyperCubeDef)||{},s=a.qMeasures,(l=void 0===s?[]:s).length){e.n=1;break}return e.a(2,Promise.resolve([]));case 1:return e.n=2,qv({app:r,items:l});case 2:return c=e.v,e.a(2,Promise.all(c.map(function(e){return Nv({app:r,translator:i,measure:e})})))}},e)}))).apply(this,arguments)}var Iv=function(){if(Sv)return xv;Sv=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},o=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,i=e.call(n,"constructor"),o=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!i&&!o)return!1;for(r in n);return void 0===r||e.call(n,r)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return xv=function e(){var t,n,r,l,c,u,d=arguments[0],f=1,h=arguments.length,p=!1;for("boolean"==typeof d&&(p=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<h;++f)if(null!=(t=arguments[f]))for(n in t)r=s(d,n),d!==(l=s(t,n))&&(p&&l&&(o(l)||(c=i(l)))?(c?(c=!1,u=r&&i(r)?r:[]):u=r&&o(r)?r:{},a(d,{name:n,newValue:e(p,u,l)})):void 0!==l&&a(d,{name:n,newValue:l}));return d},xv}(),Lv=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(Iv);function Pv(e,t){return{range:function(e){var n=e.resources,r=e.data,i=n.theme.palette("categorical",0===t?r.items.length:t);return r.items.map(function(e){return i[e.value%i.length]})},valueAccessor:e.value}}function Rv(e,t){return{range:function(e){var n=e.resources,r=e.data,i=n.theme.palette("categorical",0===t?r.items.length:t);return r.items.map(function(e){return i[e.row.value%i.length]})},valueAccessor:e.value}}function zv(e,t,n,r,i){var o,a,s=i.byRow,l=i.byElemNo;if(r&&(t.input.persistent||e.hc.qDimensionInfo.length>1||void 0===n.activeDimensionIndex&&e.hc.qSize.qcy>((null===(a=(o=e.hc).qDataPages[0]||o.qStackedDataPages[0])||void 0===a?void 0:a.qArea.qHeight)||0)))return l(r,r.raw().qCardinal);if(r){var c=t.pic.extract({field:r.key(),trackBy:r.value}).length;return s(r,c)}return{}}function Fv(e,t){var n=e.hc.qDimensionInfo,r=t.input.byDimDef||{activeDimensionIndex:n.length-1};if(r.activeDimensionIndex>=0){var i=n[r.activeDimensionIndex];r=i.coloring&&i.coloring.colorMapRef?{type:"libraryItem",key:i.coloring.colorMapRef,activeDimensionIndex:r.activeDimensionIndex}:{activeDimensionIndex:r.activeDimensionIndex}}return r}function jv(e,t){var n;return t.activeDimensionIndex>=0?n=e.pic.fields().filter(function(e){return"dimension"===e.type()})[t.activeDimensionIndex]:"libraryItem"===t.type?!1===(n=t.key?e.pic.field(function(e){return e.raw().colorMapRef===t.key}):void 0)&&(n=e.pic.field(function(e){return"colorByAlternative"===e.raw().id})):"expression"===t.type&&(n=e.pic.field(function(e){return"colorByAlternative"===e.raw().id})),n}function Bv(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Hv(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Vv(){}var $v=1/.7,Wv="\\s*([+-]?\\d+)\\s*",Uv="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Yv="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Kv=/^#([0-9a-f]{3,8})$/,Gv=new RegExp(`^rgb\\(${Wv},${Wv},${Wv}\\)$`),Xv=new RegExp(`^rgb\\(${Yv},${Yv},${Yv}\\)$`),Jv=new RegExp(`^rgba\\(${Wv},${Wv},${Wv},${Uv}\\)$`),Zv=new RegExp(`^rgba\\(${Yv},${Yv},${Yv},${Uv}\\)$`),Qv=new RegExp(`^hsl\\(${Uv},${Yv},${Yv}\\)$`),eb=new RegExp(`^hsla\\(${Uv},${Yv},${Yv},${Uv}\\)$`),tb={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 nb(){return this.rgb().formatHex()}function rb(){return this.rgb().formatRgb()}function ib(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Kv.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?ob(t):3===n?new cb(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?ab(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?ab(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=Gv.exec(e))?new cb(t[1],t[2],t[3],1):(t=Xv.exec(e))?new cb(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Jv.exec(e))?ab(t[1],t[2],t[3],t[4]):(t=Zv.exec(e))?ab(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Qv.exec(e))?mb(t[1],t[2]/100,t[3]/100,1):(t=eb.exec(e))?mb(t[1],t[2]/100,t[3]/100,t[4]):tb.hasOwnProperty(e)?ob(tb[e]):"transparent"===e?new cb(NaN,NaN,NaN,0):null}function ob(e){return new cb(e>>16&255,e>>8&255,255&e,1)}function ab(e,t,n,r){return r<=0&&(e=t=n=NaN),new cb(e,t,n,r)}function sb(e){return e instanceof Vv||(e=ib(e)),e?new cb((e=e.rgb()).r,e.g,e.b,e.opacity):new cb}function lb(e,t,n,r){return 1===arguments.length?sb(e):new cb(e,t,n,null==r?1:r)}function cb(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function ub(){return`#${pb(this.r)}${pb(this.g)}${pb(this.b)}`}function db(){const e=fb(this.opacity);return`${1===e?"rgb(":"rgba("}${hb(this.r)}, ${hb(this.g)}, ${hb(this.b)}${1===e?")":`, ${e})`}`}function fb(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function hb(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function pb(e){return((e=hb(e))<16?"0":"")+e.toString(16)}function mb(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new yb(e,t,n,r)}function gb(e){if(e instanceof yb)return new yb(e.h,e.s,e.l,e.opacity);if(e instanceof Vv||(e=ib(e)),!e)return new yb;if(e instanceof yb)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,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 yb(a,s,l,e.opacity)}function yb(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function vb(e){return(e=(e||0)%360)<0?e+360:e}function bb(e){return Math.max(0,Math.min(1,e||0))}function xb(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Bv(Vv,ib,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:nb,formatHex:nb,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return gb(this).formatHsl()},formatRgb:rb,toString:rb}),Bv(cb,lb,Hv(Vv,{brighter(e){return e=null==e?$v:Math.pow($v,e),new cb(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new cb(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new cb(hb(this.r),hb(this.g),hb(this.b),fb(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:ub,formatHex:ub,formatHex8:function(){return`#${pb(this.r)}${pb(this.g)}${pb(this.b)}${pb(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:db,toString:db})),Bv(yb,function(e,t,n,r){return 1===arguments.length?gb(e):new yb(e,t,n,null==r?1:r)},Hv(Vv,{brighter(e){return e=null==e?$v:Math.pow($v,e),new yb(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new yb(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 cb(xb(e>=240?e-240:e+120,i,r),xb(e,i,r),xb(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new yb(vb(this.h),bb(this.s),bb(this.l),fb(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=fb(this.opacity);return`${1===e?"hsl(":"hsla("}${vb(this.h)}, ${100*bb(this.s)}%, ${100*bb(this.l)}%${1===e?")":`, ${e})`}`}}));const Sb=Math.PI/180,wb=180/Math.PI,Mb=4/29,kb=6/29,Cb=3*kb*kb;function qb(e){if(e instanceof Eb)return new Eb(e.l,e.a,e.b,e.opacity);if(e instanceof Ab)return _b(e);e instanceof cb||(e=sb(e));var t,n,r=Nb(e.r),i=Nb(e.g),o=Nb(e.b),a=Db((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?t=n=a:(t=Db((.4360747*r+.3850649*i+.1430804*o)/.96422),n=Db((.0139322*r+.0971045*i+.7141733*o)/.82521)),new Eb(116*a-16,500*(t-a),200*(a-n),e.opacity)}function Eb(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function Db(e){return e>.008856451679035631?Math.pow(e,1/3):e/Cb+Mb}function Tb(e){return e>kb?e*e*e:Cb*(e-Mb)}function Ob(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Nb(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Ab(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function _b(e){if(isNaN(e.h))return new Eb(e.l,0,0,e.opacity);var t=e.h*Sb;return new Eb(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}Bv(Eb,function(e,t,n,r){return 1===arguments.length?qb(e):new Eb(e,t,n,null==r?1:r)},Hv(Vv,{brighter(e){return new Eb(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new Eb(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 cb(Ob(3.1338561*(t=.96422*Tb(t))-1.6168667*(e=1*Tb(e))-.4906146*(n=.82521*Tb(n))),Ob(-.9787684*t+1.9161415*e+.033454*n),Ob(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),Bv(Ab,function(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof Ab)return new Ab(e.h,e.c,e.l,e.opacity);if(e instanceof Eb||(e=qb(e)),0===e.a&&0===e.b)return new Ab(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*wb;return new Ab(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new Ab(e,t,n,null==r?1:r)},Hv(Vv,{brighter(e){return new Ab(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new Ab(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return _b(this).rgb()}}));var Ib=e=>()=>e;function Lb(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Ib(isNaN(e)?t:e)}var Pb=function e(t){var n=function(e){return 1==(e=+e)?Lb: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):Ib(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=lb(e)).r,(t=lb(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=Lb(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),Rb=/^class(-pyramid)?/,zb=function(e,t,n,r){var i=void 0!==n.min?n.min:r.min(),o=void 0!==n.max?n.max:r.max(),a=i,s=o,l=t.limits,c={},u="percent"===t.limitType?l.map(function(e){return i+(o-i)*e}):l,d=t.colors.map(function(t){return e.resolveUIColor(t)});if(i=Math.min.apply(Math,[i].concat(hy(u))),o=Math.max.apply(Math,[o].concat(hy(u))),c.min=i,c.max=o,t.breakTypes&&-1===t.breakTypes.indexOf(!0))c.type="categorical",Object.assign(c,function(e){var t=e.min,n=e.max,r=e.limits,i=e.range,o=[],a=[];if(r.length)if(r[r.length-1]<t)a.push(t,n),o.push(i[i.length-1],i[i.length-1],i[i.length-1]);else if(r[0]>n)a.push(t,n),o.push(i[0],i[0],i[0]);else{if(r[0]>t)a.push(t),o.push(i[0]);else{a.push(t);for(var s=0;s<r.length;s++)if(t<r[s]){o.push(i[s]);break}}for(var l=0;l<r.length;l++)t<r[l]&&r[l]<n&&(a.push(r[l]),o.push(i[l]));if(r[r.length-1]<n)a.push(n),o.push(i[r.length]),o.push(i[r.length]);else{a.push(n);for(var c=0;c<r.length;c++)if(r[c]>n){o.push(i[c]),o.push(i[c]);break}}}else o.push(i[0]);return{min:t,max:n,range:o,domain:a}}({min:"percent"===t.limitType?i:a,max:"percent"===t.limitType?o:s,range:d,limits:"percent"===t.limitType?u:l}));else if(t.breakTypes){var f=t.breakTypes;c.type="continuous",c.domain=[i],c.range=[d[0]];for(var h=0;h<u.length;h+=1)if(f[h]){var p=d[h],m=d[h+1],g=Pb(p,m)(.5);c.range.push(g),c.domain.push(u[h]),h<u.length-1&&f[h+1]&&(c.range.push(d[h+1]),c.domain.push((u[h]+u[h+1])/2))}else c.range.push(d[h]),c.range.push(d[h+1]),c.domain.push(u[h]),c.domain.push(u[h]+Math.min(1e-6,(o-i)/1e6));c.range.push(d[d.length-1]),c.domain.push(o)}else c.domain=u,c.range=d;return c};function Fb(e,t,n,r,i){var o,a,s,l=0,c=[],u=(e-t)/(r+1);if(0===u)return 1;for(o=0;o<n.length;o+=1)a=.99*(n[o]-t),s=n[o]>e?Math.floor(e/u):n[o]<t?0:Math.floor(a/u),Number.isNaN(s)||(c[s]?c[s]+=1:c[s]=1);for(o=0;o<c.length;o+=1)c[o]&&(l+=1);return l<=r||l>=i?Math.max(l,r):Fb(e,t,n,r+1,i)}var jb=function(e,t,n,r){var i,o,a=t.theme,s=t.hc,l=r.f,c={mode:"field",fieldType:"measure",field:l?l.key():void 0,reverse:n.input.reverseScheme||!1,type:"continuous",range:function(e){return e.resources.theme.palette("quant")}},u=[],d=!0;if(l){if(Number.isNaN(+l.min())||Number.isNaN(+l.max()))return{invalid:!0};(d=!("S"===(i=n.pic.raw()).qMode&&(i.qDataPages[0]&&i.qSize.qcy>i.qDataPages[0].qArea.qHeight||!i.qDataPages.length&&i.qSize.qcy>0)||"K"===i.qMode&&i.qStackedDataPages[0]&&i.qSize.qcy>i.qStackedDataPages[0].qArea.qHeight||"T"===i.qMode&&i.qSize.qcy>i.qTreeDataPages[0].qGroupSize))&&(u=n.pic.extract({field:0,props:{num:{field:l.key()},exclude:{fields:s.qDimensionInfo.map(function(e,t){return{field:"qDimensionInfo/".concat(t)}}),value:function(e){return Math.min.apply(Math,hy(e))<0}}}}).filter(function(e){return e.value>=0&&!e.exclude.value}).map(function(e){return e.num.value}).filter(function(e){return"number"==typeof e}))}if(!1===n.input.autoMinMax){if(c.min=n.input.measureMin,c.max=n.input.measureMax,c.max<c.min)return{invalid:!0}}else if(l&&!d)c.min=l.min(),c.max=l.max();else if(l){if(!u.length)return{invalid:!0};c.min=Math.min.apply(Math,hy(u)),c.max=Math.max.apply(Math,hy(u))}if(n.input.measureScheme&&(c.palettes={quant:n.input.measureScheme}),a){var f=a.getDataColorScales().filter(function(e){return e.key===n.input.measureScheme})[0];c.type=f&&Rb.test(f.type)?"categorical":"continuous","categorical"===c.type&&(o=f.colors.some(function(e){return Array.isArray(e)})?Math.max.apply(Math,hy(f.colors.map(function(e){return e?e.length:0}))):f.colors.length)}if("categorical"===c.type){for(var h=d?Fb(c.max,c.min,u,1,o):o,p=(c.max-c.min)/h,m=[],g=0;g<h+1;g+=1)m.push(c.min+p*g);c.domain=m,c.range=function(e){for(var t=e.resources.theme.palette("quant",h),n=Math.max(1,Math.floor(t.length/h)),r=[],i=0;i<h;i+=1)r.push(t[i*n]);return[r[0]].concat(r,[r[r.length-1]])}}return c};function Bb(e,t){var n;return t.activeMeasureIndex>=0?n=e.pic.fields().filter(function(e){return"measure"===e.type()})[t.activeMeasureIndex]:"libraryItem"===t.type?n=e.pic.field(function(e){return e.raw().colorMapRef===t.key&&void 0!==t.key}):"expression"===t.type&&(n=e.pic.field(function(e){return"colorByAlternative"===e.raw().id})),n||(n=e.pic.field(function(e){return void 0!==e.raw().matchMeasure}))&&(n=e.pic.fields().filter(function(e){return"measure"===e.type()})[n.raw().matchMeasure]),n}function Hb(e){e.measureOverrides.every(function(e){return!e})&&(e.measureOverrides=null)}function Vb(e,t){for(var n=(null==t?void 0:t.domain)||[],r=(null==t?void 0:t.range)||[],i=[],o=0;o<e.length;++o){var a=e[o];if("constant"===(null==a?void 0:a.mode)){var s=n.indexOf(o);-1===s?(n.push(o),r.push(a.primary)):r[s]=a.primary,e[o]=null}else if(a){i.push(o);var l=n.indexOf(o);-1!==l&&(n.splice(l,1),r.splice(l,1))}}return{domain:n,range:r,exclude:i}}function $b(e,t,n,r){var i,o=function(e,t,n,r){if(t.input&&!t.input.auto){if("byMeasure"===t.input.mode)return function(e,t,n){var r=t.theme,i=t.hc,o=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).getCField,a=void 0===o?Bb:o,s=n.input.byMeasureDef||{activeMeasureIndex:0},l=a(n,s),c=jb(0,{theme:r,hc:i},n,{f:l});if(c.invalid)return c;"expression"===s.type&&(s.activeMeasureIndex<0||void 0===s.activeMeasureIndex)&&(c.label=s.label,l&&"color.altLabel"===l.raw().labelExpRef&&(c.label=n.input.altLabel)),!c.label&&l&&(c.label=l.title());var u=s.activeMeasureIndex>=0?l:null;if(!u&&l&&void 0!==l.raw().matchMeasure&&l.raw().matchMeasure>-1&&(u=n.pic.fields().filter(function(e){return"measure"===e.type()})[l.raw().matchMeasure]),n.input.useMeasureGradient&&"libraryItem"===s.type)if(u){var d=u.raw().coloring;d&&d.gradient&&Lv(c,zb(e,d.gradient,c,u))}else c.auxiliary=s;return c}(e,n,t);if("byDimension"===t.input.mode)return function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.getCDef,o=void 0===i?Fv:i,a=r.getCByField,s=void 0===a?jv:a,l=r.getPersistence,c=void 0===l?zv:l,u=o(t,n),d=s(n,u),f=d?d.raw():{},h=n&&n.pic?n.pic.raw():{};if(f.qError||f.qSize&&0===f.qSize.qcy&&!h.qHasOtherValues)return{invalid:!0};var p={mode:"field",fieldType:"dimension",type:"categorical",field:d?d.key():void 0,isFieldLocked:f.qLocked};return("expression"===u.type||u.activeDimensionIndex<0)&&(p.label=u.label,"color.altLabel"===f.labelExpRef&&(p.label=n.input.altLabel)),!p.label&&d&&(p.label=d.title()),n.input.dimensionScheme&&(p.palettes={categorical:n.input.dimensionScheme}),n.input.useDimColVal&&"libraryItem"===u.type&&(p.auxiliary=u),Lv(p,c(t,n,u,d,{byRow:Rv,byElemNo:Pv})),p}(e,n,t);if("byExpression"===t.input.mode)return function(e,t,n,r){var i=t.hc,o=t.theme,a=t.translator,s=n.pic.field(function(e){return"colorByExpression"===e.raw().id});if(!s||!s.raw().qFallbackTitle&&!n.input.colorExpression||!(Number.isFinite(s.raw().qMin)&&Number.isFinite(s.raw().qMax)||n.input.expressionIsColor))return{mode:"constant",type:"constant",primary:r.nil};if(n.input.expressionIsColor)return{mode:"field",fieldType:"expression",field:s?s.key():void 0,type:"color"};var l=jb(0,{hc:i,theme:o},n,{f:s});return l.invalid||(l.label=n.input.expressionLabel||a.get("Object.ChartTooltip.ColorExpression")),l}(0,n,t,r);if("byMultiple"===t.input.mode||"primary"===t.input.mode)return function(e,t,n,r){var i=t.hc,o=t.theme,a=t.translator,s=n.input.useBaseColors;if(("byMultiple"===n.input.mode||"primary"===n.input.mode&&"measure"===n.input.useBaseColors)&&i.qMeasureInfo.length>1&&(s="measure"),"measure"===s){var l=[],c=[];"measure"===n.input.useBaseColors&&i.qMeasureInfo.forEach(function(t,n){if(t.baseColor||t.coloring&&t.coloring.baseColor){l.push(n);var i=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===i?c.push(r.primary):c.push(i)}});var u=n.input.dimensionScheme?{categorical:n.input.dimensionScheme}:void 0,d=o?o.getDataColorPalettes()[0]:void 0;return"measure"===n.input.useBaseColors&&d&&(u={categorical:d.key}),{mode:"measure",type:"categorical",palettes:u,label:a?a.get("Common.Measures"):void 0,explicit:l.length?{domain:l,range:c}:void 0}}if("dimension"===s){var f=[],h=[];return i.qDimensionInfo.forEach(function(t,n){if(t.baseColor||t.coloring&&t.coloring.baseColor){f.push(n);var i=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===i?h.push(r.primary):h.push(i)}}),{mode:"dimension",type:"categorical",field:f.length?f[0]:void 0,explicit:f.length?{domain:f,range:h}:void 0}}var p=r.primary;if(void 0!==n.input.paletteColor)n.input.paletteColor&&(p=e.resolveUIColor(n.input.paletteColor));else{var m=n.input.singleColor;"number"!=typeof m||Number.isNaN(m)||(p=["#b0afae","#7b7a78","#545352","#4477aa","#7db8da","#b6d7ea","#46c646","#f93f17","#ffcf02","#276e27","#ffffff","#000000"][m])}return{mode:"constant",type:"constant",primary:p}}(e,n,t,r)}return{}}(e,t,n,r);return null!==(i=t.input)&&void 0!==i&&i.measureOverrides?(o.measureOverrides=t.input.measureOverrides.map(function(n,i){return function(e){var t,n=e.cm,r=e.defaults,i=e.index,o=e.input,a=e.pic;if(!o||!o.on)return null;var s=null!==(t=o.mode)&&void 0!==t?t:"primary";return"primary"===s?function(e,t,n){var r=n.primary;return void 0!==t.paletteColor&&t.paletteColor&&(r=e.resolveUIColor(t.paletteColor)),ly(ly({},n),{},{mode:"constant",type:"constant",primary:r})}(n,o,r):"byExpression"===s?function(e,t,n){var r="qMeasureInfo/".concat(e,"/"),i=t.field(function(e){return e.id().startsWith(r)&&"colorByMeasureExpression"===e.raw().id}),o=i;return ly(ly({},n),{},o?{mode:"field",fieldType:"expression",field:i?i.key():void 0,type:"color"}:{mode:"constant",type:"constant",primary:n.nil})}(i,a,r):null}({cm:e,input:n,defaults:r,index:i,pic:t.pic})}),function(e,t){var n,r,i,o=t.translator;if(Hb(e),1===(null===(n=e.measureOverrides)||void 0===n?void 0:n.length))return e.measureOverrides[0];if("measure"===e.mode&&e.measureOverrides&&(e.explicit=Vb(e.measureOverrides,e.explicit),Hb(e)),null!==(r=e.measureOverrides)&&void 0!==r&&r.every(function(e){return"constant"===(null==e?void 0:e.mode)})){var a={mode:"measure",type:"categorical",label:null==o?void 0:o.get("Common.Measures")};return a.explicit=Vb(e.measureOverrides),a}return null!==(i=e.measureOverrides)&&void 0!==i&&i.every(function(e){return e})?{invalid:!0,measureOverrides:e.measureOverrides}:e}(o,n)):o}var Wb=function(e,t){var n=e.fieldType,r={};if(t)if("measure"===n){var i=t.coloring;i&&(r.measureGradient=i.gradient)}else if("dimension"===n){var o=t[0],a=t[1];o&&(r.legendDataPage=o),a&&(r.dimValsData=a.colorMap)}return r},Ub=function(e){throw e.isHandled=!0,e};function Yb(e){return function(t){return"object"===py(t.datum[e])?t.datum[e].value:void 0}}function Kb(e){return"object"===py(e.datum.isNull)?e.datum.isNull.value:-2===e.datum.value}function Gb(e){return-3===e.datum.value}var Xb={COLOR:void 0,FONT_SIZE:"16px",FONT_FAMILY:"'Source Sans Pro', 'Arial', 'sans-serif'"},Jb={COLOR:void 0,FONT_SIZE:void 0,FONT_FAMILY:"'Source Sans Pro', 'Arial', 'sans-serif'"};function Zb(e){var t=e.theme,n=e.key,r=e.styleOverrides,i={title:{color:Xb.COLOR,fontSize:Xb.FONT_SIZE,fontFamily:Xb.FONT_FAMILY},label:{color:Jb.COLOR,fontSize:Jb.FONT_SIZE,fontFamily:Jb.FONT_FAMILY}};if(!t&&!r)return i;var o=r||{},a=o.title,s=o.label,l=function(e){var t=e.theme,n=e.key;return function(e,r,i,o){return void 0!==e?e:t?t.getStyle(n,r,i):o}}({theme:t,key:n});return i.title.color=l(null==a?void 0:a.color,"legend.title","color",Xb.COLOR),i.title.fontSize=l(null==a?void 0:a.fontSize,"legend.title","fontSize",Xb.FONT_SIZE),i.title.fontFamily=l(null==a?void 0:a.fontFamily,"legend.title","fontFamily",Xb.FONT_FAMILY),i.label.color=l(null==s?void 0:s.color,"legend.label","color",Jb.COLOR),i.label.fontSize=l(null==s?void 0:s.fontSize,"legend.label","fontSize",Jb.FONT_SIZE),i.label.fontFamily=l(null==s?void 0:s.fontFamily,"legend.label","fontFamily",Jb.FONT_FAMILY),i}var Qb=function(e,t,n){var r=e&&e.dock||void 0;if("auto"!==r)return r||"right";if(t){var i=t.element.getBoundingClientRect();if(i.height>i.width)return"bottom"}return n?"left":"right"},ex=function(e,t,n){return!(n.invalid||"color"===n.type||"measure"===n.mode&&t.qMeasureInfo.length<=1||"dimension"===n.mode)&&("function"==typeof e.show?e.show():!1!==e.show)};function tx(e,t){var n=e.styleReference,r=e.styleOverrides,i=e.chart,o=e.rtl,a=t.legendProps,s=t.coloring,l=t.theme,c=t.hc,u=Zb({theme:l,key:n,styleOverrides:r});return{layout:{minimumLayoutMode:"MEDIUM",dock:Qb(a,i,o)},show:"function"==typeof a.show?function(){return ex(a,c,s)}:ex(a,c,s),renderer:"svg",mounted:function(e){e.childNodes[0].style.pointerEvents="none",e.style.overflow="hidden"},settings:{title:{show:!1!==a.showTitle,wordBreak:"break-word",maxLines:2,lineHeight:1.2,text:s.label||"",fill:u.title.color,fontSize:u.title.fontSize,fontFamily:u.title.fontFamily}}}}function nx(e,t,n){var r=[],i=[],o=function(e,t,n){return"categorical"===t.coloring.type?function(e,t,n){var r=tx(e,t);if(!r.show)return!1;var i,o=e.key,a=e.styleReference,s=e.styleOverrides,l=e.viewState,c=e.rtl,u=e.settings,d=e.style,f=t.scaleKey,h=t.theme,p=t.scales,m=Zb({theme:h,key:a,styleOverrides:s}),g=r.layout.dock,y="left"===g||"right"===g?{maxLines:2,wordBreak:"break-word"}:{},v={up:"M13.6,11 L2.4,11 C2.28954305,11 2.2,10.9104569 2.2,10.8 C2.2,10.756726 2.21403557,10.7146192 2.24,10.68 L7.84,3.21333333 C7.90627417,3.12496777 8.03163444,3.10705916 8.12,3.17333333 C8.13516113,3.18470418 8.14862915,3.1981722 8.16,3.21333333 L13.76,10.68 C13.8262742,10.7683656 13.8083656,10.8937258 13.72,10.96 C13.6853808,10.9859644 13.643274,11 13.6,11 Z",down:"M2.4,4 L13.6,4 C13.7104569,4 13.8,4.08954305 13.8,4.2 C13.8,4.24327404 13.7859644,4.28538077 13.76,4.32 L8.16,11.7866667 C8.09372583,11.8750322 7.96836556,11.8929408 7.88,11.8266667 C7.86483887,11.8152958 7.85137085,11.8018278 7.84,11.7866667 L2.24,4.32 C2.17372583,4.23163444 2.19163444,4.10627417 2.28,4.04 C2.31461923,4.01403557 2.35672596,4 2.4,4 Z",left:"M11,2.4 L11,13.6 C11,13.7104569 10.9104569,13.8 10.8,13.8 C10.756726,13.8 10.7146192,13.7859644 10.68,13.76 L3.21333333,8.16 C3.12496777,8.09372583 3.10705916,7.96836556 3.17333333,7.88 C3.18470418,7.86483887 3.1981722,7.85137085 3.21333333,7.84 L10.68,2.24 C10.7683656,2.17372583 10.8937258,2.19163444 10.96,2.28 C10.9859644,2.31461923 11,2.35672596 11,2.4 Z",right:"M4,13.6 L4,2.4 C4,2.28954305 4.08954305,2.2 4.2,2.2 C4.24327404,2.2 4.28538077,2.21403557 4.32,2.24 L11.7866667,7.84 C11.8750322,7.90627417 11.8929408,8.03163444 11.8266667,8.12 C11.8152958,8.13516113 11.8018278,8.14862915 11.7866667,8.16 L4.32,13.76 C4.23163444,13.8262742 4.10627417,13.8083656 4.04,13.72 C4.01403557,13.6853808 4,13.643274 4,13.6 Z"};"dimension"===t.coloring.fieldType&&(i=function(e){return e.datum.value>=0||-3===e.datum.value});var b="".concat(f,"Legend");return Lv(!0,r,{type:"legend-cat",key:"".concat(o,"-cat"),scale:b in p?b:f,settings:{layout:{scrollOffset:function(){return l?l.get("legendScrollOffset"):void 0},size:-1!==["top","bottom"].indexOf(r.layout.dock)?2:1,direction:c?"rtl":"ltr",horizontal:20},item:{show:i,label:ly({fill:m.label.color,fontSize:m.label.fontSize,fontFamily:m.label.fontFamily},y)},navigation:{disabled:n,button:{content:function(e,t){var n=t.direction;return e("i",{style:{"pointer-events":"none",fontSize:"12px",display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizelegibility",margin:"0px"}},[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor"},[e("path",{d:v[n]})])])}}}},brush:{consume:[{context:"selection",data:["",o],style:{inactive:{opacity:.3}}}]}},{settings:u,style:d})}(e,t,n):"continuous"===t.coloring.type&&function(e,t){var n,r=e.key,i=e.styleReference,o=e.styleOverrides,a=e.rtl,s=e.settings,l=e.style,c=t.scaleKey,u=t.theme,d="".concat(c,"Range"),f=tx(e,t);if(!f.show)return!1;var h=Zb({theme:u,key:i,styleOverrides:o}),p=f.layout.dock,m="right"===p||"left"===p,g=null===(n=t.scales)||void 0===n?void 0:n[d];return m&&g&&(g.invert=!0),Lv(!0,f,{type:"legend-seq",key:"".concat(r,"-seq"),settings:{fill:c,major:d,length:1,tick:{fill:h.label.color,fontSize:h.label.fontSize,fontFamily:h.label.fontFamily},title:{anchor:!a||"top"!==f.layout.dock&&"bottom"!==f.layout.dock?void 0:"right",padding:parseFloat(f.settings.title.fontSize)||16}}},{settings:s,style:l})}(e,t)}(e,t,n&&n.navigationDisabled);return r.push(o),o&&"legend-cat"===o.type&&(i.push(function(e){var t=e.key,n=e.requireFailure,r=e.recognizeWith,i=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:tap-".concat(t),type:"Tap",requireFailure:n,recognizeWith:r,options:{event:"legendtap",interval:10,pointers:1,enable:function(e,n){var r;if(!n)return!0;if(null!=i&&null!==(r=i.interact)&&void 0!==r&&r.enabled&&!i.interact.enabled())return!1;if(!this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some(function(e){return e.key==="".concat(t,"-cat")}))return!1;var o=n.srcEvent.target;return!!(o&&o.hasAttribute("data-action")&&o.hasAttribute("data-component-key"))||!(!o||!o.childNodes[0]||"BUTTON"!==o.childNodes[0].nodeName)}},events:{legendtap:function(e){e.preventDefault();var t=e.srcEvent.target;t&&t.hasAttribute("data-action")&&t.hasAttribute("data-component-key")&&this.chart.component(t.getAttribute("data-component-key")).emit(t.getAttribute("data-action"))}}}}(e,n)),i.push(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.eventName,n=e.key,r=e.requireFailure,i=e.recognizeWith,o=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:pan-".concat(n),type:"Pan",requireFailure:r,recognizeWith:i,options:{event:t,pointers:1,threshold:10,enable:function(e,r){var i;return this.started===t||!r||!(null!=o&&null!==(i=o.interact)&&void 0!==i&&i.enabled&&!o.interact.enabled())&&this.chart.componentsFromPoint({x:r.center.x,y:r.center.y}).some(function(e){return e.key==="".concat(n,"-cat")})}},events:ay(ay(ay({},"".concat(t,"start"),function(e){e.preventDefault(),this.started!==t&&(this.started=t,this.chart.component("".concat(n,"-cat")).emit("panstart",e))}),"".concat(t,"move"),function(e){e.preventDefault(),this.chart.component("".concat(n,"-cat")).emit("panmove",e)}),"".concat(t,"end"),function(e){e.preventDefault(),this.chart.component("".concat(n,"-cat")).emit("panend",e),this.started=!1})}}(e,n))),{interactions:i,components:r}}function rx(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.auto,n=function(e){var t=ly({hc:null,colorProps:null,layout:null,theme:null},e),n={},r={auto:function(){return{mode:"primary"}},getDimensionColorMap:function(){return Promise.reject()},getMeasure:function(){return Promise.reject()},getAttributeDimension:function(){return Promise.reject()}},i={auto:function(e){return e?(r.auto=e,i):r.auto},getDimensionColorMap:function(e){return e?(r.getDimensionColorMap=e,i):r.getDimensionColorMap},getAttributeDimension:function(e){return e?(r.getAttributeDimension=e,i):r.getAttributeDimension},getMeasure:function(e){return e?(r.getMeasure=e,i):r.getMeasure},set:function(e){var i;if(!e.colorProps)throw new Error('Missing "colorProps"');if(Lv(t,e),(n={pic:t.picasso.data("q")({data:t.hc,config:{localeInfo:t.localeInfo}}),input:t.colorProps}).input.auto){var o=r.auto(e.layout);n.input=Lv(!0,{},n.input,o,{auto:!1});var a=t.theme?t.theme.getDataColorPalettes():[];a[0]&&(n.input.dimensionScheme=a[0].key);var s=0;n.input.byDimDef&&+n.input.byDimDef.activeDimensionIndex>=0&&(s=+n.input.byDimDef.activeDimensionIndex),t.hc&&t.hc.qDimensionInfo[s]&&t.hc.qDimensionInfo[s].coloring&&t.hc.qDimensionInfo[s].coloring.colorMapRef&&n.input.byDimDef&&(n.input.byDimDef.type="libraryItem",n.input.byDimDef.key=t.hc.qDimensionInfo[s].coloring.colorMapRef)}null!==(i=n.input.measureOverrides)&&void 0!==i&&i.every(function(e){return!e||!e.on})&&(n.input=Lv(!1,{},n.input,{measureOverrides:null}))},palettes:function(){if(!n.palettes){var e=t.theme,r=[];(e&&e.getDataColorPickerPalettes()||[]).forEach(function(e){r.push({key:"ui",colors:e.colors})}),n.palettes=r}return n.palettes},getAuxiliaryData:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/qHyperCubeDef";if(!e.auxiliary&&!/qAttrDimInfo/.test(e.field))return Promise.resolve();var i=(e.auxiliary||{}).key;if("measure"===e.fieldType)return r.getMeasure(i,t).catch(function(){});if("dimension"===e.fieldType){var o="".concat(n,"/").concat(e.field).replace("qDimensionInfo","qDimensions").replace("qAttrDimInfo","qAttributeDimensions");return Promise.all([/qAttrDimInfo/.test(e.field)?r.getAttributeDimension(o,t).catch(function(){}):Promise.resolve(),i?r.getDimensionColorMap(i,t).catch(function(){}):Promise.resolve()])}return Promise.resolve()},getAuxiliarySettings:function(e,r){var i=this;return e.auxiliary||/qAttrDimInfo/.test(e.field)?(this.palettes(),this.getAuxiliaryData(e,r).then(function(r){if(!r)return{};if("measure"===e.fieldType){if(r.coloring&&r.coloring.gradient){var o=n.pic.field(e.field);return zb(i,r.coloring.gradient,e,o)}return{}}if("dimension"===e.fieldType){var a={nil:e.nil,others:e.others},s=r[0],l=r[1]?r[1].colorMap:null;if(s){var c=t.picasso.data("q")({data:{qDimensionInfo:[n.pic.field(e.field).raw(),n.pic.field(e.field).raw()],qMeasureInfo:[],qDataPages:s,qInterColumnSortOrder:[0,1],qMode:"S"}});a.legendDataset=c}return l?function(e,t,n,r){var i=r.external,o=r.field,a=ly({},e);Lv(a,Pv(o,o.raw().qCardinal));var s=i.theme?i.theme.getDataColorPalettes()[0]:null;return t.nul&&(a.nil=n.resolveUIColor(t.nul)),t.oth&&(a.others=n.resolveUIColor(t.oth)),t.usePal?(a.palettes={categorical:t.pal},s&&!t.pal&&(a.palettes.categorical=s.key,Lv(a,Pv(o)))):!1===t.autoFill&&t.single?a.range=[n.resolveUIColor(t.single)]:t.autoFill&&(s&&(a.palettes={categorical:s.key}),Lv(a,Pv(o))),t.colors&&t.colors.length&&(a.explicit=function(e,t,n){for(var r={},i=0;i<e.length;i+=1)r[e[i].value]=e[i].baseColor;var o=[];return{domain:function(e){var i=e.data,a=[];o=[];for(var s=0;s<i.items.length;s++){var l=i.items[s],c=(l.text||l).label;r[c]&&-1===a.indexOf(l.value)&&(a.push(l.value),o.push(t.resolveUIColor(r[c])))}return a.push(-3,-2),o.push(n.others),o.push(n.nil),a},range:function(){return o}}}(t.colors,n,a)),a}(a,l,i,{external:t,field:n.pic.field(e.field)}):a}return{}})):Promise.resolve()},resolveUIColor:function(e){if(e.index<0||void 0===e.index)return e.color;if(void 0===n.uiPalette&&(n.uiPalette=this.palettes().filter(function(e){return"ui"===e.key})[0]||!1),!n.uiPalette)return e.color;var t="none"===n.uiPalette.colors[0]?e.index:e.index-1;return void 0===n.uiPalette.colors[t]?e.color:n.uiPalette.colors[t]},settings:function(){if(this.palettes(),!n.settings){var e={primary:"steelblue",others:"#aaa",nil:"#ddd"},r=t.theme;r&&(e=ly(ly({},e),r.getDataColorSpecials())),n.settings=Lv(e,$b(this,n,t,e))}return n.settings}};return i}(e.resources).auto(t||function(){return{mode:"byDimension",persistent:!1,useDimColVal:!0,byDimDef:{activeDimensionIndex:0,type:"expression",label:""}}}).getDimensionColorMap(function(e,t){return function(e,t){var n=t.layout,r=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.dimValsData?Promise.resolve({colorMap:n.snapshotData.content.chartData.dimValsData}):Promise.reject():r&&r.getObject?r.getObject("ColorMapModel_".concat(e)).then(function(e){return e.getLayout()}):Promise.reject()}(e,{layout:t.layout,app:t.app})}).getMeasure(function(e,t){return function(e,t){var n=t.layout,r=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.measureGradient?Promise.resolve({coloring:{gradient:n.snapshotData.content.chartData.measureGradient}}):Promise.reject():r&&r.getMeasure?r.getMeasure(e).then(function(e){return e.getMeasure()}):Promise.reject()}(e,{layout:t.layout,app:t.app})}).getAttributeDimension(function(e,t){return function(e,t){var n=t.layout,r=t.model,i=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.legendDataPage?Promise.resolve(n.snapshotData.content.chartData.legendDataPage):Promise.reject():r&&r.session&&i?r.getHyperCubeData(e,[{qHeight:100,qLeft:0,qTop:0,qWidth:2}]).catch(Ub):Promise.reject()}(e,{layout:t.layout,model:t.model,app:t.app})});return n.getSnapshotData=Wb,n}({resources:e}),n={},r={},i=function(e){return r.settings||(e||console.warn("settings() called before auxiliarySettings()"),r.settings=t.settings()),r.settings},o={config:function(i){if(n=ly({},i),r={},!n.key)throw new Error("Missing key");t.set(ly(ly({},e),n))},auto:function(e){return e?(t.auto(e),o):t.auto()},getAuxiliarySettings:function(e){return r.auxiliarySettings?Promise.resolve(r.auxiliarySettings):t.getAuxiliarySettings(i(!0),e).then(function(e){return r.auxiliarySettings=e||{},r.settings=ly(ly({},r.settings),r.auxiliarySettings),r.scales=void 0,r.color=void 0,r.auxiliarySettings})},getAuxiliaryData:function(){return t.getAuxiliaryData(i())},getSnapshotData:function(e){var n=i();return t.getAuxiliaryData(n,e).then(function(e){return t.getSnapshotData(n,e)})},resolveUIColor:function(e){return t.resolveUIColor(e)},settings:function(){var e=i();return{mode:e.mode,type:e.type,label:e.label,field:e.field,fieldType:e.fieldType,nil:e.nil,others:e.others,primary:e.primary}},settingsForMeasure:function(e){var t;return(null===(t=i().measureOverrides)||void 0===t?void 0:t[e])||this.settings()},isSelectionLocked:function(e){var t=e.isMeasureSelectionLocked;return function(e,t){var n=t.isMeasureSelectionLocked;return"field"!==e.mode||("dimension"===e.fieldType?e.isFieldLocked:"measure"!==e.fieldType||n)}(i(),{isMeasureSelectionLocked:t})},palettes:function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.colorProps,n=e.coloring,r=e.theme,i=[];if(n&&n.palettes&&r){var o=n.palettes.categorical||t.dimensionScheme,a=r.getDataColorPalettes().filter(function(e){return e.key===o})[0]||r.getDataColorPalettes()[0];o&&a&&i.push({key:"categorical",colors:a.colors});var s=n.palettes.metric||t.measureScheme,l=r.getDataColorScales().filter(function(e){return e.key===s})[0]||r.getDataColorScales()[0];if(l){var c=l.colors[0]?l.colors:[[]].concat(hy(l.colors.slice(1)));c=Array.isArray(c[0])?c.map(function(e){return e.slice().reverse()}):c.slice().reverse(),i.push({key:"quant",colors:c})}}return i}({coloring:i(),colorProps:n.colorProps,theme:n.theme})},scales:function(){return r.scales=r.scales||function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.hc,n=e.coloring,r=e.rtl,i=e.key,o=e.source,a=e.picasso,s={},l=i;if(n){var c={override:!0,domain:n.explicit&&"function"==typeof n.explicit.domain?n.explicit.domain:[].concat(hy((n.explicit||{}).domain||[]),[-3,-2]),range:n.explicit&&"function"==typeof n.explicit.range?n.explicit.range:[].concat(hy((n.explicit||{}).range||[]),[n.others,n.nil])};if("field"===n.mode){if("dimension"===n.fieldType){var u,d=function(e){var t=e.hc,n=e.source,r=e.coloring,i={data:{extract:[{source:"dummy",field:0,filter:function(){return i.expando=t.qDataPages[0]?t.qDataPages[0].qArea.qTop:0,!1}},{source:n,field:r.field,trackBy:r.valueAccessor,reduce:"first",props:{row:{reduce:function(){return i.expando++}},text:{value:function(e){return e.qText},reduce:"first"}}}]},expando:0};return i}({hc:t,source:o,coloring:n}).data;if(n.legendDataset){var f=0,h={};a.data("q")({data:t}).extract({field:n.field,trackBy:n.valueAccessor,reduce:function(e){var t=e[0];return h[t]=f++,e[0]}}),u={source:"attrDim",extract:{field:"qDimensionInfo/0",filter:function(e){return e.qElemNumber>=0},props:{row:{value:function(e){return h[e.qElemNumber]}}}}}}var p={data:d,range:n.range,domain:n.domain,explicit:c,type:"categorical-color",label:function(e){return e.datum.text&&e.datum.text.value?e.datum.text.value:e.datum.label}};s[l]=p,u&&(s["".concat(l,"Legend")]=ly(ly({},p),{},{data:u})),t&&t.qHasOtherValues&&u&&((u||p.data).amend=[{label:t.qDimensionInfo[0].othersLabel,source:{key:"qHyperCube",field:"qDimensionInfo/0"},row:{value:-3},value:-3}])}else if("measure"===n.fieldType){var m={data:{field:n.field},min:n.min,max:n.max};s[l]=Lv({},m,{type:"categorical"===n.type?"threshold-color":"sequential-color",range:n.range,domain:n.domain,invert:n.reverse}),"sequential-color"===s[l].type&&(s["".concat(l,"Range")]=Lv({},m,{invert:!!r}))}else if("color"!==n.type)throw new Error("UNUSED FIELD")}else if("dimension"===n.mode){var g={data:t.qDimensionInfo.map(function(e,t){return t}),label:function(e){return t.qDimensionInfo[e.datum.value].qFallbackTitle},explicit:c,type:"categorical-color"};s[l]=g}else if("measure"===n.mode){var y={data:t.qMeasureInfo.map(function(e,t){return t}).filter(function(e){var t;return!(null!==(t=n.explicit)&&void 0!==t&&null!==(t=t.exclude)&&void 0!==t&&t.includes(e))}),label:function(e){return t.qMeasureInfo[e.datum.value].qFallbackTitle},explicit:c,type:"categorical-color"};s[l]=y}}return s}({hc:n.hc,coloring:i(),key:n.key,source:n.source,picasso:e.picasso}),r.scales},color:function(){return r.color=r.color||function(e){var t=e.coloring,n=e.scales,r=e.key,i=Yb(r),o=Yb("".concat(r,"IsAnOther")),a=function(e,t){var r=e.fieldType,a=e.invalid,s=e.mode,l=e.nil,c=e.others,u=e.primary,d=e.type;return a?function(e){return Gb(e)||o(e)?c:l}:n[t]?function(e){return Gb(e)?c:Kb(e)||-2===i(e)&&"dimension"===r||"NaN"===i(e)?l:o(e)?c:e.resources.scale(t)(i(e))||c}:"constant"===s?function(e){return Gb(e)||o(e)?c:Kb(e)?l:u}:"color"===d?function(e){return Gb(e)||o(e)?c:Kb(e)?l:i(e)||c}:null},s=a(t,r);if(t.measureOverrides){var l=Yb("".concat(r,"MeasureIdx")),c=t.measureOverrides.map(function(e){return e&&a(e)});return function(e){var t=l(e);return c[t]?c[t](e):s(e)}}return s}({coloring:i(),scales:this.scales(),key:n.key}),r.color},datumProps:function(e){return function(e){var t,n,r=e.hc,i=e.coloring,o=e.scales,a=e.key,s=e.addMeasureIx,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,c=a,u=i.nil;"field"===i.mode&&i.field?t=i.field:o[a]&&"field"===i.mode&&(t=o[a].data.field||i.field),t?(n={field:t,reduce:"first"},"color"===i.type&&(n.value=function(e){return"NaN"!==e.qNum?function(e){return"rgba(".concat([(16711680&e)>>16,(65280&e)>>8,255&e,((4278190080&e)>>>24)/255].join(","),")")}(e.qNum):e.qText&&ib(e.qText)?e.qText:u})):"dimension"===i.mode?n=void 0!==i.field?i.field:r.qDimensionInfo.length-1:"measure"===i.mode&&(n=l);var d=ay({},c,n);return r.qDimensionInfo.length>1&&(d["".concat(c,"IsAnOther")]={fields:r.qDimensionInfo.map(function(e,t){return{field:"qDimensionInfo/".concat(t)}}),value:function(e){return-1!==e.indexOf(-3)}}),s&&(d["".concat(c,"MeasureIdx")]=l),d}({coloring:this.settingsForMeasure(e),scales:this.scales(),key:n.key,hc:n.hc,addMeasureIx:i().measureOverrides},e)},data:function(){var e=i(),t={key:"dummy",data:[["field"],["a"]]};return e.legendDataset?[t,{type:"q",key:"attrDim",data:e.legendDataset.raw(),config:{localeInfo:n.localeInfo}}]:[t]},legend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.eventName,r=e.key,o=e.viewState,a=e.chart,s=e.rtl,l=e.styleReference,c=void 0===l?"object.legend":l,u=e.styleOverrides,d=e.settings,f=void 0===d?{}:d,h=e.style,p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return nx({eventName:t,key:r,rtl:s,viewState:o,chart:a,styleReference:c,styleOverrides:u,settings:f,style:void 0===h?{}:h},{legendProps:n.legendProps,scaleKey:n.key,coloring:i(),theme:n.theme,hc:n.hc,scales:this.scales()},p)}};return o}var ix=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function ox(e){var t=e.qHyperCube,n=t.qDimensionInfo,r=t.qMeasureInfo,i=n.some(ix),o=r.some(ix),a=e.color.useBaseColors;return"measure"===a&&!o||"dimension"===a&&!i?"off":a}var ax=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function sx(e){var t,n=e.qHyperCube.qDimensionInfo.some(ax),r=e.qHyperCube.qMeasureInfo.some(ax),i=n?"dimension":void 0;return{mode:"primary",useBaseColors:null!==(t=null!=i?i:r?"measure":void 0)&&void 0!==t?t:"off",paletteColor:null}}var lx=function(){};function cx(e){var t,n,r,i,o=e.picasso,a=e.model,s=e.app,l=e.translator,c=e.layoutService,u=void 0===c?void 0:c,d=e.createConfig,f=void 0===d?lx:d,h=e.config,p=void 0===h?{}:h,m=e.custom,g=void 0===m?{}:m,y=p.localeInfo,v=p.key,b=p.theme,x=void 0===b?void 0:b,S=p.auto,w=void 0===S?void 0:S,M=p.definitionPath,k=null==u||null===(t=u.getLayout)||void 0===t?void 0:t.call(u),C={theme:x,key:v,localeInfo:y,layout:k,hc:null==u||null===(n=u.getHyperCube)||void 0===n?void 0:n.call(u),legendProps:null==u||null===(r=u.getLayoutValue)||void 0===r?void 0:r.call(u,"legend"),colorProps:ly(ly({},null==u||null===(i=u.getLayoutValue)||void 0===i?void 0:i.call(u,"color")),{},{useBaseColors:k?ox(k):void 0})},q=rx({picasso:o,model:a,app:s,translator:l,auto:w});!1!==w&&q.auto(function(e){return w?w({layout:e,defaultAuto:sx}):sx(e)});var E=!1,D={getColor:function(){return q.color()},getPaletteColor:function(e){var t=e.index,n=e.color;return q.resolveUIColor({index:t,color:n})},getData:function(){return q.data()},getDatumProps:function(e){return q.datumProps(e)},getSnapshotData:function(){return q.getSnapshotData(M)},getSettingsForMeasure:function(e){return q.settingsForMeasure(e)},getSettings:function(){return q.settings()},getLegend:function(e,t){return q.legend(e,t)},getScales:function(){return q.scales()},getPalettes:function(){return q.palettes()},isSelectionLocked:function(e){var t=e.isMeasureSelectionLocked;return q.isSelectionLocked({isMeasureSelectionLocked:t})},isInitialized:function(){return E},custom:ly({},g),initialize:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).createConfig,t=(void 0===e?f:e)({getUseBaseColors:ox}),n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return ly(ly(ly({},e),t),{},{colorProps:ly(ly({},e.colorProps),t.colorProps||{})})}(C,t);return q.config(n),q.getAuxiliarySettings(M).then(function(){E=!0})}};return D}var ux="center",dx="bottom",fx=[{key:"NoDataExist",alignment:ux,condition:function(e){var t=e.layoutService;if(!t)return!1;var n=t.meta.size;return n.x*n.y==0}},{key:"OnlyNanDataMeasure",translationKey:"OnlyNanData",alignment:ux,condition:function(e){var t=e.layoutService;return!!t&&t.getHyperCubeValue("qMeasureInfo").every(function(e){return"NaN"===e.qMin&&"NaN"===e.qMax})}},{key:"OnlyNanDataDimensionContinuous",translationKey:"OnlyNanData",alignment:ux,condition:function(e){var t=e.layoutService;if(!t)return!1;if(!t.meta.isContinuous)return!1;var n=t.getHyperCubeValue("qDimensionInfo.0");return n&&(n.qMax<n.qMin||"NaN"===n.qMax)}},{key:"OnlyNegativeOrZeroValues",alignment:ux},{key:"DataRangeIncludingZero",alignment:dx},{key:"LimitedData",alignment:dx},{key:"NegativeOrZeroValues",alignment:dx}].reduce(function(e,t){return e[t.key]=t,e},{}),hx=function(){return!1};function px(e){var t,n=e.layout,r=e.config,i=void 0===r?{}:r,o={disclaimer:void 0,isSuppressing:!1,showDisclaimer:null!==(t=i.args)&&void 0!==t&&t.layoutService?i.args.layoutService.getLayoutValue("showDisclaimer"):null==n?void 0:n.showDisclaimer};return{initialize:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).args;o.disclaimer=function(e){var t=e.args,n=e.disclaimers,r=[];return Object.keys(n).forEach(function(e){var i=fx[e],o=n[e];o&&(o.condition||(null==i?void 0:i.condition)||hx)(t)&&r.push({key:(null==i?void 0:i.translationKey)||(null==i?void 0:i.key)||e,alignment:o.alignment||(null==i?void 0:i.alignment)||dx})}),r.find(function(e){return e.alignment===ux})||r[0]}({args:ly(ly({layout:n},i.args),e),disclaimers:i.disclaimers||{}}),o.isSuppressing=!(!o.disclaimer||o.disclaimer.alignment!==ux)},getDisclaimer:function(){return o.isSuppressing?o.disclaimer:!1===o.showDisclaimer?void 0:o.disclaimer},getHasSuppressingDisclaimer:function(){return o.isSuppressing}}}function mx(e){var t=e.chart,n=e.logicalSize;if(n)return n;var r=t?t.element.getBoundingClientRect():{};return{width:r.width,height:r.height}}var gx=[{key:"FULL",size:{width:550,height:450}},{key:"MEDIUM",size:{width:400,height:220}},{key:"SMALL",size:{width:300,height:150}},{key:"XSMALL",size:{width:150,height:75}}];function yx(e){var t=e.width,n=e.height,r=gx.filter(function(e){return t>=e.size.width&&n>=e.size.height}).shift();return r?r.key:"SPARK"}var vx={left:"right",right:"left",top:"bottom",bottom:"top",near:"far",far:"near"};function bx(e){var t=e.orientation,n=e.dock,r=e.btt,i=e.rtl,o="horizontal"===t?function(e){return"bottom"===e||"near"===e?"bottom":"top"}(n):function(e,t){var n="left"===e||"near"===e?"left":"right";return t?vx[n]:n}(n,i),a=function(e,t,n){return"vertical"===e?t?"bottom":"top":n?"right":"left"}(t,r,i);return{current:o,opposite:vx[o],start:a,end:vx[a]}}function xx(e){var t=e.chart,n=e.layoutService,r=e.config,i=void 0===r?{}:r,o=i.logicalSize,a=void 0!==o&&o,s=i.rtl,l=void 0!==s&&s,c={chart:{size:void 0,mode:void 0},x:{dock:void 0,opposite:void 0,size:void 0},y:{dock:void 0,opposite:void 0,size:void 0}},u={type:"x-y",config:ly({},i),meta:c,update:function(e){c.chart.size={width:e.width,height:e.height},c.chart.mode=yx(e);var t=bx({orientation:"horizontal",dock:n.getLayoutValue("xAxis.dock"),btt:!1,rtl:l}),r=t.current,i=t.opposite;c.x.dock=r,c.x.opposite=i,c.x.size=e.width;var o=bx({orientation:"vertical",dock:n.getLayoutValue("yAxis.dock"),btt:!0,rtl:l}),a=o.current,s=o.opposite;c.y.dock=a,c.y.opposite=s,c.y.size=e.height}};return u.update(mx({chart:t,logicalSize:a})),u}var Sx="vertical",wx="horizontal";function Mx(e){var t=e.chart,n=e.layoutService,r=e.config,i=void 0===r?{}:r,o=e.typeConfig,a=void 0===o?{}:o,s=i.logicalSize,l=void 0!==s&&s,c=i.rtl,u=void 0!==c&&c,d=a.fallback===Sx?Sx:wx,f=!!a.invert,h=a.measureAxes||[{ref:"measureAxis",name:"minor"}],p={chart:{orientation:void 0,size:void 0,mode:void 0},major:{orientation:void 0,dock:void 0,opposite:void 0,size:void 0}},m={type:"major-minor",config:ly({},i),meta:p,update:function(e){p.chart.orientation=n.getLayoutValue("orientation",d),p.chart.size={width:e.width,height:e.height},p.chart.mode=yx(e),p.major.orientation=function(e){var t=e.chartOrientation,n=e.invert;return e.layoutService.meta.isContinuous?wx:n?t===Sx?wx:Sx:t}({layoutService:n,chartOrientation:p.chart.orientation,invert:f});var t=bx({orientation:p.major.orientation,dock:n.getLayoutValue("dimensionAxis.dock"),btt:!1,rtl:u}),r=t.current,i=t.opposite;p.major.dock=r,p.major.opposite=i,p.major.size=p.major.orientation===Sx?e.height:e.width,h.forEach(function(t){var r={};r.orientation=p.major.orientation===Sx?wx:Sx;var i=bx({orientation:r.orientation,dock:n.getLayoutValue("".concat(t.ref,".dock")),btt:!0,rtl:u}),o=i.current,a=i.opposite,s=i.start,l=i.end;r.dock=o,r.opposite=a,r.start=s,r.end=l,r.size=r.orientation===Sx?e.height:e.width,p[t.name]=r})}};return m.update(mx({chart:t,logicalSize:l})),m}function kx(e){var t=e.chart,n=e.layoutService,r=e.config,i=void 0===r?{}:r,o=e.typeConfig,a=void 0===o?{}:o;return("x-y"===a.type?xx:Mx)({chart:t,layoutService:n,config:i,typeConfig:a})}function Cx(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}var qx=["__proto__","constructor"];function Ex(e,t,n){if(void 0!==e&&void 0!==t){var r=t.split("."),i=r[r.length-1];if(!qx.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 Dx(){var e={};return{get:function(t){return e[t]},set:function(t,n){return e[t]=n,n},has:function(t){return t in e},remove:function(t){delete e[t]},empty:function(){e={}}}}function Tx(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return e},n=Dx();return function(r){var i=t(r);return n.has(i)?n.get(i):n.set(i,e(r))}}function Ox(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return function(){for(var r=this,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];clearTimeout(t),t=setTimeout(function(){return e.apply(r,o)},n)}}function Nx(e){var t,n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50,o=0;return function(){t=this;for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];n=s;var c=Date.now()-o,u=function(){o=Date.now(),r=0,e.apply(t,n)};r||(c>=i?u():r=setTimeout(u,i-c))}}var Ax={ERROR_CODES:[7005],DIMENSION:"qDimensionInfo",MEASURE:"qMeasureInfo"},_x=function(e,t){return e[t].reduce(function(e,t,n){var r;return r=t,Ax.ERROR_CODES.some(function(e){var t;return e===(null===(t=r.qError)||void 0===t?void 0:t.qErrorCode)})?e.filtered.push(n):e.reduced.push(t),e},{reduced:[],filtered:[]})};function Ix(e){var t;return((null==e||null===(t=e.qHyperCube)||void 0===t?void 0:t.qDimensionInfo)||[]).map(function(e){var t,n=null===(t=e.qCardinalities)||void 0===t?void 0:t.qHypercubeCardinal;if(n)return n;var r=e.qStateCounts||{},i=r.qLocked,o=void 0===i?0:i,a=r.qOption,s=void 0===a?0:a,l=r.qSelected;return o+s+(void 0===l?0:l)})}function Lx(e){switch(e.qHyperCube.qMode){case"S":return function(e){var t=e.qHyperCube.qSize;return{refs:{dataPages:"qHyperCube.qDataPages"},size:{x:t.qcx,y:t.qcy,dimensions:Ix(e)}}}(e);case"K":return function(e){var t=Ix(e);return{refs:{dataPages:"qHyperCube.qStackedDataPages"},size:{x:e.qHyperCube.qSize.qcx,y:t[0],dimensions:t}}}(e);case"T":return function(e){var t=Ix(e);return{refs:{dataPages:"qHyperCube.qTreeDataPages"},size:{x:e.qHyperCube.qSize.qcx,y:t[0],dimensions:t}}}(e);default:throw new Error("Mode not supported")}}function Px(e){var t=e.source,n=e.metaAdditionsFn,r=e.experimental,i=void 0===r?{filter:!1}:r,o=Lv(!0,{},t),a=i.filter?function(e){var t=e.qHyperCube,n=_x(t,Ax.DIMENSION),r=n.reduced,i=n.filtered;t[Ax.DIMENSION]=r;var o=_x(t,Ax.MEASURE),a=o.reduced,s=o.filtered;return t[Ax.MEASURE]=a,{dimensions:i,measures:s}}(o):{dimensions:[],measures:[]},s=Lx(o),l=function(){var e=function(e){var t=e.layout,n=e.additionsFn,r=void 0===n?function(){return{}}:n,i=e.additionsProps,o=void 0===i?{}:i,a=t.qHyperCube,s=a.qDimensionInfo,l=a.qMeasureInfo,c=a.qMode,u=s.length,d=l.length,f=ly({mode:{S:"S"===c,P:"P"===c,K:"K"===c,T:"T"===c},dimensionCount:u,measureCount:d,hasMultipleDimensions:u>1,hasMultipleMeasures:d>1,isOneDimensional:1===u,isTwoDimensional:2===u},o);return ly(ly({},f),r({layout:t,meta:f}))}({layout:o,additionsFn:n,additionsProps:{size:s.size}});return e.filteredFields=a,e},c={refs:ly({},s.refs),meta:l(),getLayout:function(){return o},getLayoutValue:function(e,t){return Cx(o,e,t)},setLayoutValue:function(e,t){Ex(o,e,t),s=Lx(o),c.meta=l()},getHyperCube:function(){return o.qHyperCube},getHyperCubeValue:function(e,t){return Cx(o.qHyperCube,e,t)},setHyperCubeValue:function(e,t){Ex(o.qHyperCube,e,t),s=Lx(o),c.meta=l()},getDataPages:function(){return Cx(o,s.refs.dataPages)},setDataPages:function(e){Ex(o,s.refs.dataPages,e),c.meta=l()}};return c}function Rx(e){var t=e.originalArray,n=e.newArray,r=e.matchKey;return Array.isArray(t)&&t.length?(n.forEach(function(e){var n=-1;t.some(function(t,i){return t[r]&&t[r]===e[r]&&(n=i),n}),n>-1?t[n]=e:t.push(e)}),t):n}function zx(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fx(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 jx(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fx(Object(n),!0).forEach(function(t){zx(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fx(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Bx=Object.prototype.hasOwnProperty,Hx=Object.prototype.toString,Vx=Object.defineProperty,$x=Object.getOwnPropertyDescriptor,Wx=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Hx.call(e)},Ux=function(e){if(!e||"[object Object]"!==Hx.call(e))return!1;var t,n=Bx.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Bx.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||Bx.call(e,t)},Yx=function(e,t){Vx&&"__proto__"===t.name?Vx(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Kx=function(e,t){if("__proto__"===t){if(!Bx.call(e,t))return;if($x)return $x(e,t).value}return e[t]},Gx=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)r=Kx(s,n),s!==(i=Kx(t,n))&&(u&&i&&(Ux(i)||(o=Wx(i)))?(o?(o=!1,a=r&&Wx(r)?r:[]):a=r&&Ux(r)?r:{},Yx(s,{name:n,newValue:e(u,a,i)})):void 0!==i&&Yx(s,{name:n,newValue:i}));return s};function Xx(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 Jx(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 Zx(e){let{cache:t,f:n,mainCell:r,p:i,page:o,rowIdx:a,row:s,sourceKey:l,target:c,targetProp:u,columnOrder:d}=e,f=r;if(i.field&&i.field!==n){const e=Xx(i.field,o,{cache:t},d);if(-1===e)return;f=Gx({qRow:a},e(s))}c[u]=Jx(i,f,{key:l})}function Qx(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:c,main:u}=r.normalizeConfig(i[e],t),d=Object.keys(c),f=!!i[e].trackBy,h=typeof i[e].trackBy,p={},m=[],g=[];for(let t=0;t<a.qDataPages.length;t++){const o=Xx(l,a.qDataPages[t],{cache:n},a.qColumnOrder);if(-1!==o)for(let y=0;y<a.qDataPages[t].qMatrix.length;y++){const v=a.qDataPages[t].qArea.qTop+y,b=Gx({qRow:v},o(a.qDataPages[t].qMatrix[y])),x=Jx(u,b,{key:s});if(!u.filter||u.filter(b)){for(let e=0;e<d.length;e++){const r=c[d[e]];let i=r.fields||[r];r.fields&&(x[d[e]]=[]);for(let o=0;o<i.length;o++)Zx({cache:n,f:l,mainCell:b,p:i[o],prop:d[e],page:a.qDataPages[t],rowIdx:v,row:a.qDataPages[t].qMatrix[y],sourceKey:s,target:r.fields?x[d[e]]:x,targetProp:r.fields?o:d[e],columnOrder:a.qColumnOrder});if(r.fields){const t=x[d[e]].map(e=>e.value),n=x[d[e]].map(e=>e.label);x[d[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(x[d[e]].value)}}}f&&r.track({cfg:i[e],itemData:b,obj:x,target:m,tracker:p,trackType:h}),g.push(x)}}}const y=f?r.collect(m,{main:u,propsArr:d,props:c}):g;o=[...o,...y]}return o}function eS(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 tS(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=rS)):void 0===t&&(t=nS);for(var n,r,i,o,a,s=new aS(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 aS(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(oS)}function nS(e){return e.children}function rS(e){return Array.isArray(e)?e[1]:null}function iS(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function oS(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function aS(e){this.data=e,this.depth=this.height=0,this.parent=null}function sS(e){return null==e?null:function(e){if("function"!=typeof e)throw new Error;return e}(e)}aS.prototype=tS.prototype={constructor:aS,count:function(){return this.eachAfter(eS)},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 tS(this).eachBefore(iS)},[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)}};var lS={depth:-1},cS={},uS={};function dS(e){return e.id}function fS(e){return e.parentId}function hS(e){let t=e.length;if(t<2)return"";for(;--t>1&&!pS(e,t););return e.slice(0,t)}function pS(e,t){if("/"===e[t]){let n=0;for(;t>0&&"\\"===e[--t];)++n;if(!(1&n))return!0}return!1}function mS(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=mS(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]=mS(r,i[e]);return t}n[e]in i&&(i=i[n[e]])}return i}function gS(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,...gS(e[i].children,t-1,n)]);return r}function yS(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=>gS(e.children,r-1,n)}return!1}const vS=/^qDimensionInfo(?:\/(\d+))?/,bS=/^\/?qMeasureInfo\/(\d+)/,xS=/\/qAttrExprInfo\/(\d+)/,SS=/\/qAttrDimInfo\/(\d+)/;function wS(e){return(e.qColumnOrder&&e.qColumnOrder.length?e.qColumnOrder:e.qDimensionInfo.map((e,t)=>t)).filter(t=>t<e.qDimensionInfo.length)}function MS(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,c=-1,u=-1,d=r;const f=n.qEffectiveInterColumnSortOrder,h=wS(n);return vS.test(d)&&(i=!0,o=+vS.exec(d)[1],d=r.replace(vS,"")),bS.test(d)&&("K"===n.qMode?c=+bS.exec(d)[1]:f&&-1!==f.indexOf(-1)?(c=+bS.exec(d)[1],u=0):u=+bS.exec(d)[1],d=d.replace(bS,"")),d&&(SS.exec(d)?s=+SS.exec(d)[1]:xS.exec(d)&&(a=+xS.exec(d)[1])),l=i?"S"===n.qMode?h[o]:f?f.indexOf(o):o:f&&-1!==f.indexOf(-1)?f.indexOf(-1):n.qDimensionInfo.length-("K"===n.qMode?0:1),{fieldDepth:l+1,pseudoMeasureIndex:c,measureIdx:u,attrDimIdx:s,attrIdx:a}}function kS(e,t){let n,r,i=yS(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 CS(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 qS(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 c,u;s.fields&&(c=[],u=[]);for(let n=0;n<l.length;n++){const d=l[n];let f,h,p,m,g,y;if("primitive"===d.type?(p=d.value,y=String(d.value)):("function"==typeof d.value&&(f=e=>d.value(e,r)),"function"==typeof d.label&&(h=e=>d.label(e,r)),d.accessor?(m=d.accessor(r),Array.isArray(m)?(g=m.map(d.valueAccessor),d.attrAccessor&&(g=g.map(d.attrAccessor)),f&&(p=g.map(f),f=null),h&&(y=g.map(h),h=null),p=d.reduce?d.reduce(p):p,y=d.reduceLabel?d.reduceLabel(y,p):String(p)):(p=d.attrAccessor?d.attrAccessor(d.valueAccessor(m)):d.valueAccessor(m),y=p)):(p=i,y=i)),s.fields){const e=f?f(p):p;c.push(e),u.push(h&&null!=y?h(y):null!=y?y:String(e))}else{const n=f?f(p):p;o[t[e]]={value:n,label:h?h(y):null!=y?y:String(n)},d.field&&(o[t[e]].source={field:d.field.key(),key:a})}}c&&(o[t[e]]={value:"function"==typeof s.value?s.value(c,r):c,label:"function"==typeof s.label?s.label(u,r):u})}}const ES=(e,t,n)=>{const r="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",i="K"===e.qMode?"qSubNodes":"qNodes",o=mS(r,e);return o&&o[0]?(t.tree=tS(o[0],n.children||(e=>e[i])),t.tree):null};function DS(e){const t=e.raw().qDataPages.length?e.raw().qDataPages[0].qMatrix:[],n=function(e){const t=e.raw().qColumnOrder,n=e.fields();return t&&t.length===n.length?t:n.map((e,t)=>t)}(e),r=e.fields(),i=e.fields().filter(e=>"dimension"===e.type()).map(e=>n.indexOf(r.indexOf(e))),o=e.fields().filter(e=>"measure"===e.type()).map(e=>n.indexOf(r.indexOf(e))),a={__root:{__id:"__root",qValues:[]}};for(let e=0;e<t.length;e++){const n=t[e];let r="__root",l=!1;for(let e=0;e<i.length;e++){var s;const t=n[i[e]],o="".concat(r,"__").concat(null!==(s=t.qElemNumber)&&void 0!==s?s:t.qElemNo);a[o]||(a[o]=jx({__id:o,__parent:r,qValues:[]},t),l=!0),r=o}if(l)for(let e=0;e<o.length;e++){const t=n[o[e]];a[r].qValues.push(t)}}const l=Object.keys(a).map(e=>a[e]);return function(){var e,t=dS,n=fS;function r(r){var i,o,a,s,l,c,u,d,f=Array.from(r),h=t,p=n,m=new Map;if(null!=e){const t=f.map((t,n)=>function(e){let t=(e=`${e}`).length;return pS(e,t-1)&&!pS(e,t-2)&&(e=e.slice(0,-1)),"/"===e[0]?e:`/${e}`}(e(t,n,r))),n=t.map(hS),i=new Set(t).add("");for(const e of n)i.has(e)||(i.add(e),t.push(e),n.push(hS(e)),f.push(uS));h=(e,n)=>t[n],p=(e,t)=>n[t]}for(a=0,i=f.length;a<i;++a)o=f[a],c=f[a]=new aS(o),null!=(u=h(o,a,r))&&(u+="")&&(d=c.id=u,m.set(d,m.has(d)?cS:c)),null!=(u=p(o,a,r))&&(u+="")&&(c.parent=u);for(a=0;a<i;++a)if(u=(c=f[a]).parent){if(!(l=m.get(u)))throw new Error("missing: "+u);if(l===cS)throw new Error("ambiguous: "+u);l.children?l.children.push(c):l.children=[c],c.parent=l}else{if(s)throw new Error("multiple roots");s=c}if(!s)throw new Error("no root");if(null!=e){for(;s.data===uS&&1===s.children.length;)s=s.children[0],--i;for(let e=f.length-1;e>=0&&(c=f[e]).data===uS;--e)c.data=null}if(s.parent=lS,s.eachBefore(function(e){e.depth=e.parent.depth+1,--i}).eachBefore(oS),s.parent=null,i>0)throw new Error("cycle");return s}return r.id=function(e){return arguments.length?(t=sS(e),r):t},r.parentId=function(e){return arguments.length?(n=sS(e),r):n},r.path=function(t){return arguments.length?(e=sS(t),r):e},r}().id(e=>e.__id).parentId(e=>e.__parent)(l)}const TS=e=>{let{propsArr:t,props:n,cube:r,cache:i,itemDepthObject:o,f:a}=e;for(let e=0;e<t.length;e++){const i=n[t[e]],s=i.fields?i.fields:[i];for(let e=0;e<s.length;e++){const t=s[e];if(t.field!==a){const e=kS(o,MS(t.field,{cube:r}));t.accessor=e.nodeFn,t.valueAccessor=e.valueFn,t.attrAccessor=e.attrFn}}}};function OS(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;const i=t.raw(),o=t.key(),a="S"===i.qMode?DS(t):ES(i,n,e);if(!a)return null;const s=a.height,l=[];for(let o=0;o<=s;o++){let a=null;if(o>0)if("S"===i.qMode){let e=wS(i)[o-1];a=n.fields[e]}else{let e=i.qEffectiveInterColumnSortOrder[o-1];o>i.qEffectiveInterColumnSortOrder.length&&(e=i.qDimensionInfo.length),a=n.fields[e]}const{props:s,main:c}=r.normalizeConfig(jx(jx({},e),{},{field:a?a.key():void 0}),t),u=Object.keys(s);l[o]={propsArr:u,props:s,main:c};const d=a?MS(a,{cube:i}):{fieldDepth:0};TS({propsArr:u,props:s,cube:i,cache:n,itemDepthObject:d,f:a})}const c=a.copy().descendants(),u=a.descendants();for(let e=0;e<u.length;e++){const t=l[u[e].depth].propsArr,n=l[u[e].depth].props,r=l[u[e].depth].main,i=c[e],a=i.data,s=CS(r,a,{key:o});qS({propsArr:t,props:n,item:i,itemData:a,ret:s,sourceKey:o}),u[e].data=s}return a}function NS(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(!ES(s,n,e))continue;const c="object"==typeof i[a].field?i[a].field:t.field(i[a].field),{props:u,main:d}=r.normalizeConfig(i[a],t),f=Object.keys(u),h=MS(c,{cube:s}),{nodeFn:p,attrFn:m,valueFn:g}=kS({fieldDepth:0},h);TS({propsArr:f,props:u,cube:s,cache:n,itemDepthObject:h,f:c});const y=!!i[a].trackBy,v=typeof i[a].trackBy,b={},x=[],S=p(n.tree),w=[];for(let e=0;e<S.length;e++){const t=S[e],n=m?m(g(t)):g(t);if(d.filter&&!d.filter(n))continue;const o=CS(d,n,{key:l});qS({propsArr:f,props:u,item:t,itemData:n,ret:o,sourceKey:l}),y&&r.track({cfg:i[a],itemData:n,obj:o,target:x,tracker:b,trackType:v}),w.push(o)}const M=y?r.collect(x,{main:d,propsArr:f,props:u}):w;o=[...o,...M]}return o}var AS,_S,IS=(AS=function(e){
|
|
17
17
|
/*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
|
|
18
|
-
e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,i,o,a,s,l,c,u,d,f=e.length,h=e.search(/[0-9\-\+#]/),p=h>0?e.substring(0,h):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),y=f-g,v=e.substring(y,y+1),b=y+("."===v||","===v?1:0),x=g>0?e.substring(b,f):"";if(n=(t="-"===(e=e.substring(h,b)).charAt(0)?-t:+t)<0?t=-t:0,i=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",o=r&&r[1]&&r[0]||",",e=e.split(i),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(c=t.split("."))[1]||c[1]&&c[1].length<=s)&&(t=(+t).toFixed(s+1)),u=e[0].split(o),e[0]=u.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;c[0].length<e[0].length-a;)c[0]="0"+c[0];else 0==+c[0]&&(c[0]="");if((t=t.split("."))[0]=c[0],l=u[1]&&u[u.length-1].length){for(m="",y=(d=t[0]).length%l,f=d.length,b=0;b<f;b++)m+=d.charAt(b),!((b-y+1)%l)&&b<f-l&&(m+=o);t[0]=m}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),p+(n?"-":"")+r+x}},AS(_S={exports:{}}),_S.exports);function LS(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}const PS={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"},RS=/%\)?$/,zS=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,FS=/^\(oct\)/i,jS=/^\(dec\)/i,BS=/^\(hex\)/i,HS=/^\(bin\)/i,VS=/^\(rom\)/i,$S=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,WS=/#|0/g;function US(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 YS(e,t,n){const r=LS(e);return n?r:new RegExp(r||"",t)}function KS(e,t,n,r){let i,o,a,s,l,c,u,d,f,h=e.pattern;var p,m;r&&(e.abbreviate=!0),p=t,(m=n)&&(m=LS(m)),p&&(p=LS(p)),f=new RegExp("(?:[#0]+".concat(p,")?[#0]+(?:").concat(m,"[#0]+)?")),a=h.match(f),a=a?a[0]:"",s=a?h.substr(0,h.indexOf(a)):h,l=a?h.substring(h.indexOf(a)+a.length):"",a||(a=h?"#":"##########"),t&&t===n&&(i=a.split(n),o=i.pop(),a=i.join("")+n+o,t=""),c=t,t=/,/.test(n)?"¤":",",c&&(a=a.replace(YS(c,"g"),t)),u=n,n=".",u&&(a=a.replace(YS(u,"g"),n)),d=a.match(/#/g),d=d?d.length:0;const g=h.split(u);let y;g[1]&&(y=g[1].match(WS)),e.prefix=s||"",e.postfix=l||"",e.pattern=h,e.maxPrecision=y?y.length:2,e.percentage=RS.test(h),e.numericPattern=a||"",e.numericRegex=new RegExp("".concat(YS(t,null,!0),"|").concat(YS(n,null,!0)),"g"),e.groupTemp=c,e.decTemp=u,e.t=t,e.d=n,e.temp=d}class GS{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=function(e,t){if(!e||!e.qNumericalAbbreviation)return PS;const n={};return e.qNumericalAbbreviation.split(t).forEach(e=>{let t=e.split(":");2===t.length&&(n[t[0]]=t[1])}),n}(e,this.patternSeparator),this.prepare()}clone(){const e=new GS(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],$S.test(e[0])&&(r.positive.isFunctional=!0),e[1]?$S.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?$S.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1;const i="U"===this.type;r.positive.isFunctional||KS(r.positive,t,n,i),r.negative&&!r.negative.isFunctional&&KS(r.negative,t,n,i),r.zero&&!r.zero.isFunctional&&KS(r.zero,t,n,i)}formatValue(e){let t,n,r,i,o,a,s,l,c,u=this._prepared,d="",f="",h=e;if(isNaN(e))return"".concat(h);if(e=+e,!1===u.pattern)return e.toString();if(0===e&&u.zero)return u=u.zero,u.pattern;if(e<0&&u.negative?(u=u.negative,e=-e):u=u.positive,o=u.d,a=u.t,u.isFunctional)e=function(e,t,n){let r;return zS.test(t)?e=US(e,Number(/\d{2}/.exec(t)[0]),t,n):FS.test(t)?e=US(e,8,t,n):jS.test(t)?e=US(e,10,t,n):BS.test(t)?e=US(e,16,t,n):HS.test(t)?e=US(e,2,t,n):VS.test(t)&&(r="",e<0&&(r="-",e=-e),0===(e=Math.floor(e))?e="0":e<=5e5?(e=function(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}(e,t),e=r+e):e=t+r+e.toExponential(0)),e}(e,u.pattern,o);else{if(u.percentage&&(e*=100),u.abbreviate){const t=Object.keys(this.abbreviations).map(e=>parseInt(e,10)).sort((e,t)=>e-t);let 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<=u.maxPrecision?i=o:r<=n&&!(o>0&&-n<=u.maxPrecision)&&(i=r)),i&&(d=this.abbreviations[i],e/=10**i)}if(r=Math.abs(e),t=u.temp,l=u.numericPattern,c=l.split(o)[1],"I"===this.type&&(e=Math.round(e)),i=e,c||"#"!==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+1e-15*(e<0?-1:1)).toFixed(Math.min(20,c?c.length:0)).split(".")[0]);let n=l.split(o)[0];if(n+=o,e=IS(n,t)||"0",c){const t=Math.max(0,Math.min(14,c.length)),n=c.replace(/#+$/,"").length;let i=("I"===this.type?0:r%1+1e-15).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=IS(l,e)}e=e.replace(u.numericRegex,e=>e===a?u.groupTemp:e===o?u.decTemp:""),i<0&&!/^-/.test(e)&&(e="-".concat(e))}return u.prefix+e+f+d+u.postfix}static getStaticFormatter(){return{prepare(){},formatValue:e=>"".concat(e)}}}function XS(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),c=0,u=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)=>(c>=n&&(delete s[l[u]],delete l[u],c--,u++),s[e]=t,l[c]=e,c++,t),o.get=e=>s[e],o.has=e=>e in s,o.clear=()=>{s=Object.create(null),l=Object.create(null),c=0,u=0},o.size=()=>c,o}function JS(e,t,n,r,i){const o=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new GS(...t)}(i,e,t,n,r),a=XS(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 ZS="D",QS="T",ew="TS",tw=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],nw=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],rw=["January","February","March","April","May","June","July","August","September","October","November","December"],iw=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ow(e,t){for(let n=e.length;n<t;n++)e="0".concat(e);return e}function aw(e){let t=e.toString().split(".");return t[1]?(t=Number("0.".concat(t[1])),t):0}class sw{constructor(e,t,n){const r=e||{};r.qCalendarStrings||(r.qCalendarStrings={qLongDayNames:tw,qDayNames:nw,qLongMonthNames:rw,qMonthNames:iw}),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={[QS]:r.qTimeFmt||"hh:mm:ss",[ZS]:r.qDateFmt||"YYYY-MM-DD",[ew]:r.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"}[n]),this.pattern=t}clone(){const e=new sw(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=function(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"}}(e,n):(e<0&&(e=-e,t="-".concat(t)),r=function(e,t){let n,r=function(e){const t=e,n=24*aw(t),r=60*aw(n),i=60*aw(r),o=1e3*aw(i);return{d:Math.floor(t),h:Math.floor(n),m:Math.floor(r),s:Math.floor(i),f:Math.round(o)}}(e),i=r.d,o=r.h,a=r.m,s=r.s,l=r.f,c=0;/w+|t+/gi.test(t)&&(n=new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,Math.round(86400*(e-Math.floor(e))))),isNaN(n.getTime())&&(n=null)),/D+/gi.test(t)||(o+=24*i),/h+/gi.test(t)||(a+=60*o),/m+/gi.test(t)||(s+=60*a),/w+/gi.test(t)&&(c=n?n.getDay()-1:0,c<0&&(c=6));let u="";return n&&(u=n.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:c,date:i,h:o,m:a,s:s,f:l,t:u}}(e,t));const i=(o=this,a=r,{"Y+|y+":{Y:"".concat(Number("".concat(a.year).slice(-2))),YY:ow("".concat(a.year).slice(-2),2),YYY:ow("".concat(a.year).slice(-3),3),def:e=>ow("".concat(a.year),e.length)},"M+":{M:a.month+1,MM:ow("".concat(a.month+1),2),MMM:o.locale_months_abbr[a.month],def:o.locale_months[a.month]},"W+|w+":{W:a.day,WW:ow("".concat(a.day),2),WWW:o.locale_days_abbr[a.day],def:o.locale_days[a.day]},"D+|d+":{D:a.date,def:e=>ow("".concat(a.date),e.length)},"h+|H+":{h:a.h,def:e=>ow("".concat(a.h),e.length)},"m+":{m:a.m,def:e=>ow("".concat(a.m),e.length)},"s+|S+":{s:a.s,def:e=>ow("".concat(a.s),e.length)},"f+|F+":{def(e){let t="".concat(a.f),n=e.length-t.length;if(n>0)for(let e=0;e<n;e++)t+="0";else n<0&&(t=t.slice(0,e.length));return t}},"t{1,2}|T{1,2}":{def(e){let t=a.t;return e[0].toUpperCase()===e[0]&&(t=t.toUpperCase()),t=t.slice(0,e.length),t}}});var o,a;const s=[];for(const e in i)Object.prototype.hasOwnProperty.call(i,e)&&s.push(e);const l=new RegExp(s.join("|"),"g");return t.replace(l,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})}}function lw(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new sw(...t)}function cw(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=lw(arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,e,t),r=XS(n.format.bind(n),{toKey:e=>"object"==typeof e&&"function"==typeof e.getTime?e.getTime():e});function i(e){return"IV"!==t?function(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}(e):e}function o(e){return e=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=lw(i,e,t),r=XS(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 uw(){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 c=a||("dimension"===s?e=>null==e?void 0:e.qElemNo:e=>null==e?void 0:e.qValue),u="dimension"===s?"first":"avg",d=function(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return cw(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"),JS(n,r,i,o,t)}(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:c,label:e=>(null==e?void 0:e.qText)||"",reduce:u,reduceLabel:f,formatter:()=>d,tags:()=>t.qTags};return h}function dw(e,t,n,r,i){return(t[e]||[]).map((t,o)=>{const a="".concat(r?"".concat(r,"/"):"").concat(e,"/").concat(o),s={instance:uw(Gx({id:"".concat(n?"".concat(n,"/"):"").concat(a),key:a,meta:t},i))};return s.attrDims=dw("qAttrDimInfo",t,n,a,Gx({},i,{value:e=>null==e?void 0:e.qElemNo,type:"dimension"})),s.attrExps=dw("qAttrExprInfo",t,n,a,Gx({},i,{value:e=>null==e?void 0:e.qNum,type:"measure"})),s.measures=dw("qMeasureInfo",t,n,a,Gx({},i,{value:e=>null==e?void 0:e.qValue,type:"measure"})),s})}function fw(){let{key:e,data:t,config:n={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},i=t;if(!i)throw new Error('Missing "data" input');if(!i.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');const o=fw.util,a={cache:r,cube:i,localeInfo:n.localeInfo,fieldExtractor:null,pages:null,hierarchy:()=>null,virtualFields:n.virtualFields},s={key:()=>e,raw:()=>i,field:e=>function(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))}(e,a),fields:()=>r.fields.slice(),extract:e=>a.extractor(e,s,r,o),hierarchy:e=>a.hierarchy(e,s,r,o),_cache:()=>r};"K"===i.qMode||"T"===i.qMode||!i.qMode&&i.qNodesOnDim?(a.extractor=NS,a.hierarchy=OS,a.pages="K"===i.qMode?i.qStackedDataPages:i.qTreeDataPages):"S"===i.qMode?(a.extractor=Qx,a.pages=i.qDataPages,a.hierarchy=OS):a.extractor=()=>[],a.fieldExtractor=e=>a.extractor({field:e},s,r,o);const l="S"===i.qMode?e=>e.qElemNumber:void 0,c="S"===i.qMode?e=>e.qNum:void 0;r.wrappedFields.push(...dw("qDimensionInfo",i,e,"",Gx({},a,{value:l,type:"dimension"}))),r.wrappedFields.push(...dw("qMeasureInfo",i,e,"",Gx({},a,{value:c,type:"measure"}))),r.fields=r.wrappedFields.map(e=>e.instance);const u=e=>{e.forEach(e=>{r.allFields.push(e.instance),u(e.measures),u(e.attrDims),u(e.attrExps)})};return u(r.wrappedFields),(n.virtualFields||[]).forEach(t=>{const n=s.field(t.from),i=uw(jx({meta:n.raw(),id:"".concat(e,"/").concat(t.key),sourceField:n,fieldExtractor:e=>a.extractor({field:e},s,r,o),key:t.key,type:n.type(),localeInfo:a.localeInfo,value:n.value},t.override||{}));r.virtualFields.push(i)}),r.allFields.push(...r.virtualFields),s}const hw=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],pw=/\/qDimensionInfo(?:\/(\d+))?/,mw=/\/qMeasureInfo\/(\d+)/,gw=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,yw=/\/qAttrExprInfo\/(\d+)/,vw=/\/?qHyperCube/,bw=/\/?qTreeData/,xw=e=>"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14)),Sw=e=>"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13));function ww(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=function(e,t){let n=e,r=-1,i=-1,o="",a=e=>e;vw.test(e)?(o="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),a=xw):bw.test(e)&&(o="".concat(n.substr(0,n.indexOf("qTreeData")+9)),a=Sw);let s=!0;if(pw.test(e)&&(r=+pw.exec(e)[1]),mw.test(e)&&(i=+mw.exec(e)[1]),gw.test(e)){i=-1,r=0;const e=+gw.exec(n)[2];isNaN(e)||(r=e,n=n.replace(/\/\d+$/,"")),s=!1}if(yw.test(e)){const e=i;if(t){i=0;const a=mS(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+=+yw.exec(n)[1]}else r>-1?(r=-1,i=+yw.exec(n)[1]):i+=+yw.exec(n)[1]+1}return hw.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}}(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===(c=t.orMode)||void 0===c||c]}),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 c}function Mw(e){fw.util=e.data("matrix").util,e.data("q",fw),e.formatter("q-number",JS),e.formatter("q-time",cw)}function kw(e){var t=Cx(e.layout||{},e.path.split("/").join("."));if(!t)return!1;var n=t.qIsOneAndOnlyOne;return void 0!==n&&n}function Cw(e){var t=e.brush,n=e.colorField,r=e.legendAlias,i=e.useLegendCube,o=void 0!==i&&i;!n||/qAttrDimInfo/.test(n)?(t.removeKeyAlias("attrDim/qDimensionInfo/0"),r&&t.removeKeyAlias(r),t.addKeyAlias("attrDim/qDimensionInfo/0","qHyperCube/".concat(n))):o&&t.addKeyAlias(r,"qHyperCube/".concat(n))}Mw.qBrushHelper=ww,Mw.selections=ww;var qw="Shift";var Ew=function(e,t){return t[e]?Ew(e+1,t):e},Dw=function(e,t){var n=t.reduce(function(e,t){return e[t]=!0,e},{});return e.reduce(function(e,t,r){var i=Ew(r,n);return n[i]=!0,e[r]=i,e},{})};function Tw(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.layout,n=e.filtered,r=void 0===n?{}:n,i=(null==t?void 0:t.qHyperCube)||{},o=i.qDimensionInfo,a=void 0===o?[]:o,s=i.qMeasureInfo,l=void 0===s?[]:s;return{dimensions:Dw(a,r.dimensions||[]),measures:Dw(l,r.measures||[])}}function Ow(e){var t=e.selection,n=e.fieldMap,r=t.method,i=t.params;if("selectHyperCubeValues"===r){var o=n.dimensions[i[1]];void 0!==o&&(i[1]=o)}return"selectHyperCubeContinuousRange"===r&&i[1].forEach(function(e){var t=n.dimensions[e.qDimIx];void 0!==t&&(e.qDimIx=t)}),t}var Nw=[],Aw=0,_w=function(e){var t=Nw.filter(function(e){var t;return null===(t=e.selections)||void 0===t?void 0:t.isActive()});t.length&&("Enter"===e.key?t.forEach(function(e){return e.selections.confirm()}):"Escape"!==e.key&&"Esc"!==e.key||t.forEach(function(e){return e.selections.cancel()}))};function Iw(e){var t=e.chart,n=e.document,r=e.selectionInfo,i=e.eventName,o=e.componentName,a=e.brushName,s=void 0===a?"selection":a,l=e.emit,c=void 0===l?"rangeClear":l,u=r.event===i,d=n.querySelector("[data-key='".concat(o,"-edge-0']"));if(u||!d)return!1;var f=t.component(o);return!!f&&(f.emit(c),"string"==typeof s&&t.brush(s).clear(),f)}var Lw=["chart","document","selections","selectionInfo"],Pw=function(e){e.chart,e.document,e.selections,e.selectionInfo;var t=cy(e,Lw);t.clearDiscrete(),t.clearContinuous(),t.clearMinor(),t.clearRange(),t.clearTap(),t.clearLegend()};function Rw(e){var t,n=e.lasso;null!=n&&null!==(t=n.active)&&void 0!==t&&t.call(n)&&(null==n||n.action(!1))}function zw(e){var t,n=e.chart,r=e.selectionInfo,i=e.selectionActions,o=e.actions,a=void 0===o?{}:o,s=e.selections,l=e.selectionEvents;if(!1===i||!1===l)return function(){};var c=i.reset,u=void 0===c?Rw:c,d=i.clear,f=!1!==d&&function(e){var t=e.clear,n=void 0===t?Pw:t,r=e.selections,i=e.selectionInfo,o=e.chart;return function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).cleared,t={selections:r,selectionInfo:i,chart:o,document:document,cleared:e};return n(ly({clearDiscrete:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.eventName,o=void 0===i?"discreteRange":i,a=e.componentName,s=void 0===a?"discrete-range-brush":a,l=e.cleared;return Iw({selectionInfo:t,chart:n,document:r,eventName:void 0!==l&&l?void 0:o,componentName:s,emit:"areaClear",brushName:e.brushName})}(ly(ly({},t),e))},clearContinuous:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.eventName,o=void 0===i?"continuousRange":i,a=e.componentName,s=void 0===a?"continuous-range-brush":a,l=e.cleared;return Iw({selectionInfo:t,chart:n,document:r,eventName:void 0!==l&&l?void 0:o,componentName:s,brushName:e.brushName})}(ly(ly({},t),e))},clearMinor:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.componentName,o=void 0===i?"minor-range-brush":i,a=e.eventName,s=void 0===a?"minorRange":a,l=e.cleared,c=void 0!==l&&l,u=e.brushName,d=Iw({selectionInfo:t,chart:n,document:r,eventName:c?void 0:s,componentName:o,brushName:void 0!==u&&u});if(d){var f=d.settings.settings,h=f.scale,p=f.brush,m=n.scale(h).data().fields.map(function(e){return e.id()}),g=n.brush(p),y=g.brushes().filter(function(e){return"range"===e.type&&m.some(function(t){return t===e.id})});g&&y.length&&y.forEach(function(e){g.removeRanges(e.brush.ranges().map(function(t){return{key:e.id,range:t}}))})}}(ly(ly({},t),e))},clearRange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.selections,o=e.eventName,a=void 0===o?"xAxis":o,s=e.cleared;Iw({selectionInfo:t,chart:n,document:r,eventName:void 0!==s&&s?void 0:a,componentName:"".concat(a,"-range-brush"),emit:"areaClear",brushName:!1})&&i.clear()}(ly(ly({},t),e))},clearTap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.chart,n=e.selectionInfo,r=e.selections,i=e.events,o=void 0===i?["tap"]:i,a=e.brushNames,s=void 0===a?[]:a;if(n&&o.includes(n.event)){var l=n.currentComponent;n.previousComponent!==l&&(r.clear(),s.forEach(function(e){return t.brush(e).end()}))}}(ly(ly({},t),e))},clearLegend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.selections,o=e.eventName,a=void 0===o?"legendRange":o,s=e.componentName,l=void 0===s?"legend-range-brush":s,c=e.cleared,u=void 0!==c&&c,d=e.brushName;Iw({selectionInfo:t,chart:n,document:r,eventName:u?void 0:a,componentName:l,brushName:void 0!==d&&d})&&i.clear()}(ly(ly({},t),e))}},t))}}({clear:d,selections:s,selectionInfo:r,chart:n}),h=function(e){var t=e.chart,n=e.actions,r=e.reset,i=e.clear,o=!1,a={deactivated:function(e){var t=(n||{}).lasso;r({e:e,lasso:void 0!==t&&t})},canceled:function(e){var o=(n||{}).lasso;r({e:e,lasso:void 0!==o&&o}),i({e:e,chart:t,document:document})},cleared:function(e){o||(o=!0,i({e:e,chart:t,document:document,cleared:!0}),o=!1)}};return!1===r&&delete a.deactivated,!1===i&&delete a.cleared,!1===r&&!1===i&&delete a.canceled,a}({chart:n,clear:f,reset:u,actions:a}),p={};Object.entries(h).forEach(function(e){var t=fy(e,2),n=t[0],r=t[1];p[n]=function(e,t){return t?function(n){return t({event:n,defaultFunc:e})}:e}(r,l[n])});var m=function(e){var t=e.selectionEvents,n=e.selections,r=e.selectionInfo,i=e.clear,o=e.chart,a=e.document,s=t.start,l={selections:n,selectionInfo:r,chart:o,document:a},c=function(e){return Object.assign(r,e||{})},u=function(e){var t=e.event,n=e.components;return function(){return function(e){var t=e.selectionInfo,n=e.clear,r=e.event,i=e.components,o=void 0===i?[]:i;(0,e.setSelectionInfo)(ly(ly({},void 0===t?{}:t),{},{event:r,components:o.map(function(e){return e.key}).filter(Boolean)})),n()}({event:t,components:n,clear:i,selectionInfo:r,setSelectionInfo:c})}};return"function"==typeof s?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];s(ly(ly({defaultFunc:u({event:e,components:t}),setSelectionInfo:c,clear:i},l),{},{event:e,components:t}))}:function(e){u({event:e,components:arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]})()}}({selectionEvents:l,selections:s,selectionInfo:r,clear:f,chart:n,document:document});return null==a||null===(t=a.select)||void 0===t||t.on("start",m),Object.entries(p).forEach(function(e){var t=fy(e,2),n=t[0],r=t[1];null==s||s.on(n,r)}),function(){var e;null==a||null===(e=a.select)||void 0===e||e.removeListener("start",m),Object.entries(p).forEach(function(e){var t=fy(e,2),n=t[0],r=t[1];null==s||s.removeListener(n,r)})}}var Fw=[{key:"qHyperCube/qDimensionInfo/0:numeric",includeMax:!1}];function jw(e){var t=e.chart,n=e.actions,r=e.selections,i=e.picassoQ,o=e.config,a=o.allowSimultaneous,s=void 0!==a&&a,l=o.majorScale,c=void 0===l?void 0:l,u=o.selectionActions,d=void 0===u?{}:u,f=d.clear,h=d.reset,p=o.selectionEvents,m=void 0===p?{deactivated:void 0,canceled:void 0,cleared:void 0,start:void 0}:p,g=o.brushEvents,y=void 0===g?{}:g,v=o.brushName,b=void 0===v?"selection":v,x=o.brushMaxListeners,S=void 0===x?20:x,w=o.brushRanges,M=void 0!==w&&w,k=o.interceptors,C=void 0===k?{}:k,q=o.selectionsFn,E=void 0===q?i.selections:q,D=t.brush(b);if("number"==typeof S&&D.setMaxListeners(S),M){var T=!0===M?Fw:M;D.configure({ranges:T})}var O={canSelect:!0,getIsSelectionLocked:!1,isInnerDimensionLocked:!1,lockedDimensions:[],singleSelectIndex:0,selectionInfo:{colorField:void 0,components:[],event:void 0,currentComponent:void 0,previousComponent:void 0}},N=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.selections,r=t.brush,i=t.majorScale,o=t.actions,a=t.selectionsFn,s=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).path,l=void 0===s?"/qHyperCubeDef":s;if(!n)return{layout:function(){},filteredFields:function(){},allowSimultaneous:function(){},release:function(){}};var c=++Aw,u=null,d={dimensions:[],measures:[]},f=[],h={};n.on=n.on.bind(n),n.isActive=n.isActive.bind(n),n.addListener=n.addListener.bind(n),n.removeListener=n.removeListener.bind(n);var p=function(e){var t=e.brush,n=e.getConfig;return{interceptor:function(e){var r=t.brushes(),i=n(),o=i.allowSimultaneous,a=i.layout,s=void 0===a?{}:a;r.forEach(function(n){var r,i,a;("range"===n.type||null!==(r=e[0])&&void 0!==r&&r.key&&(null===(i=e[0])||void 0===i?void 0:i.key)!==n.id&&0!==o.indexOf(null===(a=e[0])||void 0===a?void 0:a.key))&&t.clear([])});var l=e.filter(function(e){return-2!==e.value});if(l.length>1){var c=function(e){var t=e.layout,n=void 0===t?{}:t,r=e.values,i=void 0===r?[]:r;if(null==i||!i.length)return[];var o=Array.from(new Set(i.map(function(e){return e.key}))),a=[];return o.forEach(function(e){var t=kw({layout:n,path:e}),r=i.filter(function(t){return t.key===e}),o=t?[r.pop()]:r;a.push.apply(a,hy(o))}),a.filter(Boolean)}({layout:s,values:l});return c}return l},rangeInterceptor:function(e){var r=t.brushes(),i=n().allowSimultaneous;return r.filter(function(e){return"value"===e.type}).length?(t.clear([]),e):(r.forEach(function(n){var r=n.id===e[0].key||i.includes(n.id)&&i.includes(e[0].key);"range"!==n.type||r||t.clear([])}),e)}}}({brush:r,getConfig:function(){return{layout:u,allowSimultaneous:f}}}),m=p.rangeInterceptor,g=p.interceptor;r.intercept("set-ranges",m),r.intercept("toggle-ranges",m),r.intercept("toggle-values",g),r.intercept("set-values",g),r.intercept("add-values",g),r.on("start",function(){return n.begin(l)});var y={activate:function(){},deactivated:function(){return r.end()},cleared:function(){return r.clear()},canceled:function(){return r.end()}};!function(e,t){Object.keys(t).forEach(function(n){e.on(n,t[n])})}(n,y);var v=null==i||null===(e=i.max)||void 0===e?void 0:e.call(i);return null!=o&&o.select?(o.select.on("start",function(){var e;r.start(),"function"==typeof o.select.getBrushOptions&&(h=(e=o.select).getBrushOptions.apply(e,arguments))}),o.select.on("end",function(){var e=a(r,h,u),t=Tw({layout:u,filtered:d});e.forEach(function(e){var r=Ow({selection:e,fieldMap:t});(function(e,t,n){if(t&&void 0!==n&&"selectHyperCubeContinuousRange"===e.method){var r=e.params;if(r&&r[1]&&r[1][0]){var i=r[1][0],o=i.qDimIx,a=i.qRange;"undefined"!==o&&a&&!1===a.qMaxInclEq&&a.qMax>=n&&(a.qMaxInclEq=!0)}}})(r,o.select.brushSelectionIncludeMax,v),n.select(r)})})):r.on("update",function(){var e=a(r,h,u),t=Tw({layout:u,filtered:d});e.forEach(function(e){n.select(Ow({selection:e,fieldMap:t}))})}),0===Nw.length&&document.addEventListener("keyup",_w),Nw.push({key:c,selections:n}),{layout:function(e){u=e},filteredFields:function(e){d=e},allowSimultaneous:function(e){f=e},release:function(){u=null;var e=Nw.indexOf(Nw.filter(function(e){return e.key===c})[0]);-1!==e&&Nw.splice(e,1),Nw.length||document.removeEventListener("keyup",_w),function(e,t){Object.keys(t).forEach(function(n){e.removeListener(n,t[n])})}(n,y)}}}({brush:D,majorScale:c,actions:n,selections:r,picassoQ:i,selectionsFn:E});!function(e){var t=e.brush,n=e.interceptors,r=void 0===n?{}:n;Object.entries(r).forEach(function(e){var n=fy(e,2),r=n[0],i=n[1];(Array.isArray(i)?i:[i]).forEach(function(e){t.intercept(r,e)})})}({brush:D,interceptors:C});var A=function(e){var t=e.chart,n=e.selectionActions,r=e.brush,i=e.actions,o=e.selectionInfo,a=e.selections,s=e.selectionEvents,l=function(e){var t=e.brush,n=e.chart,r=e.selectionInfo,i=e.brushEvents,o=void 0===i?{}:i,a=Object.entries(o).map(function(e){var i=fy(e,2),o=i[0],a=i[1],s=function(){return a({chart:n,selectionInfo:r})};return t.on(o,s),[o,s]});return function(){a.forEach(function(e){var n=fy(e,2),r=n[0],i=n[1];t.removeListener(r,i)})}}({brush:r,chart:t,selectionInfo:o,brushEvents:e.brushEvents}),c=zw({chart:t,selectionInfo:o,selectionActions:n,actions:i,selections:a,selectionEvents:s}),u=function(e){var t=e.actions;if(null==t||!t.lasso)return function(){};var n=!1,r=function(e){n||e.key!==qw||(t.lasso.action(!0),n=!0)},i=function(e){e.key===qw&&(t.lasso.action(!1),n=!1)};return document.addEventListener("keydown",r),document.addEventListener("keyup",i),function(){document.removeEventListener("keydown",r),document.removeEventListener("keyup",i)}}({actions:i});return function(){l(),c(),u()}}({chart:t,brush:D,actions:n,selections:r,selectionInfo:O.selectionInfo,selectionActions:{clear:f,reset:h},selectionEvents:m,brushEvents:y});if(s){var _=!0===s?hy(Array(15)).map(function(e,t){return"qHyperCube/qMeasureInfo/".concat(t)}):s;N.allowSimultaneous(_)}return{unbindEvents:A,state:O,picassoSelections:N,brush:D}}var Bw=["colorField","useLegendCube"];function Hw(e){var t=e.chart,n=e.selections,r=e.actions,i=void 0!==r&&r,o=e.config,a=void 0===o?{}:o,s=jw({chart:t,actions:i,selections:n,picassoQ:Mw,config:a}),l=s.unbindEvents,c=s.state,u=s.picassoSelections,d=s.brush,f=a.custom,h=void 0===f?{}:f,p=a.legendAlias,m=void 0===p?void 0:p,g=a.setBrushAliases,y=void 0===g?Cw:g;return{getIsDimensionLocked:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return c.lockedDimensions[e]},getIsSelectionLocked:function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return null!==(e=null==n||null===(t=n.isLocked)||void 0===t?void 0:t.call(n))&&void 0!==e?e:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(null==e||!e.length)return!1;var t=e.filter(function(e){return"object"===py(e.data)&&Array.isArray(e.data.fields)}).every(function(e){return e.data.fields.every(function(e){var t=e.raw();return!(!t.qLocked&&t.qCardinal)})});return t}(r)},getIsSingleSelect:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c.singleSelectIndex;return c.singleSelectDimensions[e]},getCanSelect:function(){return c.canSelect},getSelectionsObject:function(){return n},getSelectionInfo:function(){return c.selectionInfo},setLayout:function(e){var t=function(e){var t,n,r,i=e.selections,o=e.picassoSelections,a=e.layout,s={lockedDimensions:[],singleSelectDimensions:[]};null!=i&&null!==(t=i.isModal)&&void 0!==t&&t.call(i)&&i.confirm(),o.layout(a);var l=(null!==(n=null==a?void 0:a.qHyperCube)&&void 0!==n?n:{}).qDimensionInfo,c=void 0===l?[]:l;return s.lockedDimensions=c.map(function(e){return!!e.qLocked}),s.singleSelectDimensions=c.map(function(e,t){return kw({layout:a,path:"qHyperCube/qDimensionInfo/".concat(t)})}),s.singleSelectIndex=function(e){var t,n=((null==e?void 0:e.qHyperCube)||{}).qDimensionInfo,r=void 0===n?[]:n,i=r.map(function(e,t){var n;return!(e.qLocked||(null===(n=e.qCardinalities)||void 0===n?void 0:n.qHypercubeCardinal)<=1)&&t}).filter(function(e){return"number"==typeof e});return null!==(t=i[0])&&void 0!==t?t:Math.max(r.length-1,0)}(a),s.canSelect=0===c.length||c.some(function(e){return!e.qLocked}),s.dimensionLocked=!(null===(r=c[0])||void 0===r||!r.qLocked),s}({selections:n,picassoSelections:u,layout:e});Object.assign(c,t)},setFilteredFields:function(e){u.filteredFields(e)},setBrushAliases:function(e){var t=e.colorField,n=e.useLegendCube,r=void 0!==n&&n,i=cy(e,Bw),o=ly({useLegendCube:r,colorField:t,brush:d,legendAlias:m},i);y(ly(ly({},o),{},{defaultFunc:function(){return Cw(o)}}))},destroy:function(){l(),u.release()},custom:ly({},h)}}var Vw="'Source Sans Pro', 'Arial', 'sans-serif'",$w="#333333",Ww="#595959",Uw="#737373",Yw="#cccccc",Kw="#e6e6e6";function Gw(e){var t={};return[].concat(hy(e),hy([["","","color"],["object","","fontFamily"],["object","axis.label.name","color",Ww],["object","axis.label.name","fontFamily",Vw],["object","axis.label.name","fontSize","12px"],["object","axis.line.major","color",Yw],["object","axis.line.minor","color",Kw],["object","axis.title","color"],["object","axis.title","fontFamily",Vw],["object","axis.title","fontSize","13px"],["object","grid.line.highContrast","color",Kw],["object","grid.line.major","color",Yw],["object","grid.line.minor","color",Kw],["object","label.value","color",Ww],["object","label.value","fontFamily",Vw],["object","label.value","fontSize","12px"],[!1,"label.value","darkColor",Ww],[!1,"label.value","lightColor",Kw],["object","outOfRange","color","#999"],["object","legend.title","color",$w],["object","legend.title","fontFamily",Vw],["object","legend.title","fontSize","15px"],["object","legend.label","color",Ww],["object","legend.label","fontFamily",Vw],["object","legend.label","fontSize","13px"],["object","referenceLine.label.name","color",$w],["object","referenceLine.label.name","fontFamily",Vw],["object","referenceLine.label.name","fontSize","12px"],["object","referenceLine.outOfBounds","color",Kw],["object","referenceLine.outOfBounds","fontFamily",Vw],["object","referenceLine.outOfBounds","fontSize","12px"],["object","referenceLine.outOfBounds","backgroundColor",Uw,function(e){return"transparent"===e?Uw: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 Xw=function(e){return e};function Jw(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=fy(t,2),r=n[0],i=n[1];return e[r]=i,e},{});return o.forEach(function(e){var r=fy(e,5),i=r[0],o=r[1],l=r[2],c=r[3],u=r[4],d=void 0===u?function(e){return e}:u,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:c}),h=(s["".concat(o,".").concat(l)]||Xw)(d(f));Ex(a,[o,l].filter(Boolean).join("."),h)}),i.forEach(function(e){var t=fy(e,2),n=t[0],r=t[1];Ex(a,n,r)}),a}var Zw={NOOP:function(){},FALSE:function(){return!1},ARRAY:function(){return[]},OBJECT:function(){return{}}},Qw="chart-modules-tooltip",eM="#".concat(Qw);function tM(){if(!document.querySelector(eM)){var e=document.createElement("div");e.id=Qw,e.setAttribute("data-qs-css",""),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 nM(e){return{show:!0,key:e.key,type:"tooltip",layout:{displayOrder:3},beforeMount:function(){tM()},beforeUpdate:function(){tM()},destroyed:function(){var e;null!=(e=document.querySelector(eM))&&e.parentElement&&e.childElementCount<1&&e.parentElement.removeChild(e)},settings:{appendTo:function(){return document.querySelector(eM)},direction:e.rtl?"rtl":"ltr",duration:e.duration},style:{arrow:{color:"#404040"},content:{display:"table","border-spacing":"4px",background:"rgba(64, 64, 64, 0.9)",opacity:"1",fontSize:"13px",fontFamily:"'Source Sans Pro', 'Arial', 'sans-serif'","empty-cells":"show"},cell:{"max-width":"180px","word-break":"break-word","word-wrap":"break-word","overflow-wrap":"break-word",hyphens:"auto"}}}}var rM="position",iM={bar:"rect",diamond:"path",point:"circle",square:"rect",triangle:"path","n-polygon":"path",slice:"path"},oM=function(e){return e.data.value},aM=function(e){var t,n=e.data;return null==n||null===(t=n.major)||void 0===t?void 0:t.value};function sM(e){var t=e.chart,n=e.expando,r=e.nodes,i=e.collectConfig,o=e.collectibles,a=e.meta,s=i.from,l={chart:t,expando:n,nodes:r,collectConfig:i,collectibles:o,meta:a};switch("function"==typeof s?"custom":s){case"single":return function(e){var t=fy(e.nodes,1)[0];if("container"===t.type&&t.children[0]){var n=fy(t.children,1)[0];return n.key=t.key,[n]}return[t]}(l);case"position":return function(e){var t=e.collectibles,n=e.meta;return e.chart.shapesAt(n.position.absolute,{components:t.map(function(e){return{key:e.key}})})}(l);case"dimension":return function(e){var t=e.chart,n=e.nodes,r=e.collectConfig,i=e.collectibles,o=e.meta,a=fy(n,1)[0],s=r.filter,l=r.after,c="function"==typeof s?s:function(){return!0},u="function"==typeof l?l:function(){},d=i.reduce(function(e,n){var i=iM[n.type]||n.type;return e.push.apply(e,hy(t.findShapes(i).filter(function(e){return e.key===n.key&&e.data&&function(e){var t=e.meta,n=e.collectible,r=e.nodes,i=e.collectConfig.by,o=void 0===i?oM:i,a=n.major,s=void 0===a?aM:a,l=o({data:r.triggerer.data}),c=s({data:r.candidate.data,meta:t}),u=Array.isArray(l),d=Array.isArray(c);return u&&d?l.length===c.length&&l.every(function(e,t){return e===c[t]}):!u&&!d&&l===c}({collectConfig:r,meta:o,collectible:n,nodes:{triggerer:a,candidate:e}})}))),e},[]).filter(c);return u({collected:d,triggerer:a}),d}(l);case"radius":return function(e){var t=e.chart,n=e.collectConfig,r=e.collectibles,i=e.meta,o=fy(e.nodes,1)[0].localBounds,a=n.distance,s=n.filter,l="function"==typeof s?s:function(){return!0},c=r.map(function(e){return e.key});return t.shapesAt({cx:i.position.absolute.x,cy:i.position.absolute.y,r:a||Math.max(o.width,o.height)},{components:c.map(function(e){return{key:e}})}).filter(l)}(l);case"custom":return function(e){var t=e.chart,n=e.expando,r=e.nodes,i=e.meta;return e.collectConfig.from({chart:t,expando:n,nodes:r,meta:i})}(l);default:return[]}}var lM=Number.MAX_VALUE;function cM(e){var t=e.nodes.filter(function(e){return e.bounds.height+e.bounds.width!==0}).reduce(function(e,t){var n=t.bounds;return e.xMin=Math.min(e.xMin,n.x,n.x+n.width),e.yMin=Math.min(e.yMin,n.y,n.y+n.height),e.xMax=Math.max(e.xMax,n.x,n.x+n.width),e.yMax=Math.max(e.yMax,n.y,n.y+n.height),e},{xMin:lM,xMax:-lM,yMin:lM,yMax:-lM}),n=t.xMin,r=t.xMax,i=t.yMin;return{x:n,y:i,width:r-n,height:t.yMax-i}}function uM(e){var t=e.chart,n=e.config,r=e.expando,i=e.internal,o=e.nodes;if(!o.length)return[];var a=fy(o,1)[0].key,s=n.main.collectibles.filter(function(e){return!e.if||e.if()});if(!s.length)return[];var l=n.main.triggers.find(function(e){return-1!==e.keys.indexOf(a)})||{},c=l.collect,u=l.placement;if(!c||!c.from||!u)return[];var d={triggerer:a,position:i.get(rM)},f=(sM({chart:t,expando:r,nodes:o,collectConfig:c,collectibles:s,meta:d})||[]).map(function(e){return e.children.length?e.children[0]:e});return f.length?function(e){var t=e.chart,n=e.config,r=e.expando,i=e.placementConfig,o=e.hovered,a=e.collected,s=e.meta,l=function(e){for(var t=e.chart,n=e.config,r=e.expando,i=e.placementConfig,o=e.hovered,a=e.collected,s=e.meta,l=fy(o,1)[0],c=Array.isArray(i)?i:[i],u={bounds:l.bounds,key:l.key},d=cM({nodes:a}),f=0;f<c.length;f++){var h=c[f];if("function"==typeof h){var p=h({chart:t,expando:r,hovered:o,collected:hy(a),meta:s,collectedBounds:d,combineBounds:cM});if(p)return p}if("trigger"===h)return u;if("collectible"===h){var m=n.main.placements.collectible;return{bounds:"function"==typeof m?m({collected:hy(a)}):d,key:a[0].key}}}return u}({chart:t,config:n,expando:r,placementConfig:i,hovered:o,collected:a,meta:s}),c=l.bounds,u=l.key,d=fy(a,1)[0].desc;return[{bounds:c,nodes:a,data:a.map(function(e){return e.data}),key:u,meta:s,desc:d}]}({chart:t,config:n,expando:r,placementConfig:u,hovered:o,collected:f,meta:d}):[]}var dM=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),fM=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞יִײַ-ﬨשׁ-ﭏ]"),hM=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),pM=function(e){return dM.test(e)},mM=function(e){return fM.test(e)||hM.test(e)};function gM(e){for(var t=e?e.length:0,n=0;n<t;n++){var r=e[n];if(pM(r))return"ltr";if(mM(r))return"rtl"}return"ltr"}function yM(e){var t=e.config,n=e.h,r=e.context,i={section:function(e){return function(e){return{type:"section",content:e.content}}({content:e.content})},text:function(e){var n=e.value,r=e.style,i=e.visibility;return function(e){var t=e.config,n=e.value,r=e.style,i=void 0===r?{}:r,o=i.bold,a=void 0!==o&&o,s=i.italic,l=e.visibility;return{type:"text",content:[{content:n,style:{"font-weight":a?"bold":"normal","font-style":void 0!==s&&s?"italic":"normal","text-align":t.rtl?"right":"left",direction:gM(n),"white-space":"pre-wrap"},colspan:2}],visibility:ly(ly({},{count:!0}),l)}}({config:t,value:n,style:r,visibility:i})},measure:function(e){var r=e.label,i=e.value,o=e.color,a=e.style,s=e.survive,l=e.visibility;return function(e){var t,n,r,i,o=e.h,a=e.label,s=e.value,l=e.color,c=e.style,u=e.survive,d=e.visibility,f=e.config.rtl,h=o("div",{style:{display:"inline-block",width:10,height:10,"background-color":l,margin:"0 8px"}});return{type:"measure",label:a,value:s,content:[{content:f?[":",a]:[a,":"],style:{"text-align":f?"right":"left","font-weight":null!=c&&null!==(t=c.label)&&void 0!==t&&t.bold?"bold":"normal","font-style":null!=c&&null!==(n=c.label)&&void 0!==n&&n.italic?"italic":"normal",direction:gM(a)}},{content:l?f?[s,h]:[h,s]:s,style:{"text-align":f?"left":"right","vertical-align":"middle","font-weight":null!=c&&null!==(r=c.value)&&void 0!==r&&r.bold?"bold":"normal","font-style":null!=c&&null!==(i=c.value)&&void 0!==i&&i.italic?"italic":"normal",direction:gM(s)}}],survive:ly(ly({},{color:!1,duplicate:!1}),u),visibility:ly(ly({},{count:!0}),d)}}({config:t,h:n,label:r,value:i,color:o,style:a,survive:s,visibility:l})},divider:function(){return function(e){var t=e.visibility;return{type:"divider",content:[{content:"",style:{"background-image":"linear-gradient(transparent 8px, rgba(255, 255, 255, 0.4) 8px, rgba(255, 255, 255, 0.4) 9.2px, transparent 9.2px)",height:"17px"},colspan:2}],visibility:ly(ly({},{count:!1}),t)}}({visibility:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).visibility})},row:function(e){return function(e){var t=e.visibility;return{type:"row",content:[{content:e.content,style:e.style,colspan:e.colspan}],visibility:ly(ly({},{count:!0}),t)}}({content:e.content,style:e.style,colspan:e.colspan,visibility:e.visibility})},raw:function(e){return function(e){var t=e.visibility;return{type:"raw",content:e.value,visibility:ly(ly({},{count:!0}),t)}}({value:e.value,visibility:e.visibility})},color:function(e){var i=e.nodes,o=e.property,a=e.filter,s=void 0===a||a,l=e.visibility,c=e.fillColor;return function(e){var t=e.config,n=e.h,r=e.context,i=e.nodes,o=e.property,a=e.filter,s=e.visibility,l=e.fillColor,c=t.rtl,u={type:"color",label:void 0,value:void 0,content:[],filter:a,visibility:ly(ly({},{count:!0}),s)},d=t.getColorSettings();if("color"===d.type||!d.fieldType)return u;var f=fy(i,1)[0];if(u.value=function(e){var t=e.config,n=e.context,r=e.property,i=e.node,o=i.data[r];if(o){if(-3===i.data.value)return i.data.label;var a=n.resources.dataset(o.source.key).field(o.source.field).formatter(),s=o.value,l=o.label,c=t.getColorSettings();if(a&&"measure"===c.fieldType)return Number.isNaN(+s)?"-":a(o.value);var u=l||s;return void 0===u||Number.isNaN(u)||"NaN"===u?"-":u}}({config:t,context:r,property:o,node:f}),void 0===u.value)return u;u.label=function(e){var t=e.context,n=e.property,r=e.node,i=e.config.getColorSettings();if(i.label)return i.label;var o=r.data[n];if(o&&"color"!==i.type){var a=t.resources.dataset,s=o.source,l=s.key,c=s.field;return a(l).field(c).title()}}({config:t,context:r,property:o,node:f});var h=null!=l?l:function(e){var t=e.node.attrs;return(null==t?void 0:t.fill)||"#ddd"}({node:f}),p=n("div",{style:{display:"inline-block",width:10,height:10,"background-color":h,margin:"0 8px"}});return u.content.push({content:c?[":",u.label]:[u.label,":"],style:{"text-align":c?"right":"left",direction:gM(u.label)}},{content:c?[u.value,p]:[p,u.value],style:{"text-align":c?"left":"right","vertical-align":"middle",direction:gM(u.value)}}),u}({config:t,h:n,context:r,nodes:i,property:o,filter:s,visibility:l,fillColor:c})}};return i}function vM(e){var t=e.chart,n=e.translator,r=e.config,i=e.expando,o=e.h,a=e.data,s=e.style,l=fy(a,1)[0],c=function(e){var t=e.config,n=e.nodes.reduce(function(e,n){var r=t.main.getGroupByValue({data:n.data});return e[r]||(e[r]={sorting:Object.keys(e).length,items:[]}),e[r].items.push(n),e},{});return Object.keys(n).map(function(e){return n[e]}).sort(function(e,t){return e.sorting-t.sorting}).map(function(e){return e.items})}({config:r,nodes:l.node.nodes}),u=function(e){var t=e.chart,n=e.config,r=e.expando,i=e.h,o=e.context,a=e.groups,s=o.node.meta,l=o.resources,c=l.dataset,u=l.formatter,d=yM({config:n,h:i,context:o}),f=function(e){var t=e.dataset;return{dataset:{title:function(e,n){return t(e).field(n).title()}}}}({dataset:c}),h=a.map(function(e){var t=d.section({content:hy((n.main.section({expando:r,h:i,nodes:e,dataset:c,formatter:u,meta:s,create:d,util:f})||[]).filter(function(e){var t;return null===(t=e.content)||void 0===t?void 0:t.length})).filter(Boolean)});return t.content=function(e){var t=e.config,n=e.content,r=n.find(function(e){return"color"===e.type&&e.filter}),i=r?n.filter(function(e){return"measure"!==e.type||e.survive.color||e.label!==r.label||e.value!==r.value}):n;return t.main.showDuplicateMeasures?i:i.reduce(function(e,t){var n=t.type,r=t.survive;if("measure"!==n||r.duplicate)return e.filtered.push(t),e;var i="".concat(t.label,"-").concat(t.value);return e.memory[i]||(e.memory[i]=!0,e.filtered.push(t)),e},{memory:{},filtered:[]}).filtered}({config:n,content:t.content}),t});return n.main.sections({chart:t,expando:r,h:i,nodes:o.node.nodes,dataset:c,formatter:u,meta:s,create:d,util:f,sections:h}),h.filter(Boolean)}({chart:t,config:r,expando:i,h:o,context:l,groups:c}),d=function(e){var t=e.translator,n=e.config,r=e.context,i=e.templates,o=n.main.layout,a=o.rows,s=o.grouping,l=o.single,c=function(e){var t=e.limit,n=e.grouping,r=e.single,i={count:0,overflow:0,index:{started:void 0,group:void 0}};return{process:function(e){var o=e.visibility,a=e.index;if(r&&0!==a)return n?(i.index.started!==a&&i.index.group!==a&&(i.overflow++,i.index.group=a),!1):(i.overflow++,!1);if(i.count>=t){if(!n)return i.overflow++,!1;if(i.index.started!==a)return i.index.group!==a&&(i.overflow++,i.index.group=a),!1}return o.count&&i.count++,n&&(i.index.started=a),!0},overflow:function(){return i.overflow}}}({limit:a,grouping:s,single:"function"==typeof l?l({meta:r.node.meta,sections:i}):l}),u=i.reduce(function(e,t,n){var r=t.type,o=t.content;"section"===r&&(void 0===o?[]:o).forEach(function(t){c.process({visibility:t.visibility,index:n})&&e.push(t.content)});var a=n===i.length-1;return"divider"!==r||a||c.process({visibility:t.visibility,index:n})&&e.push(t.content),e},[]).filter(function(e){return e.length}),d=c.overflow();return d&&u.push(function(e){var t=e.translator,n=e.config,r=e.count,i=t?t.get("Object.ChartTooltip.NMore",r):"+".concat(r," more"),o=gM(i);return[{content:i,style:{"font-weight":"bold","text-align":n.rtl?"right":"left",direction:o},colspan:2}]}({translator:t,config:n,count:d})),u}({translator:n,config:r,context:l,templates:u});return d.length?function(e){var t=e.h,n=e.style;return e.rows.map(function(e){return t("tr",{},e.map(function(e){var r={style:ly(ly({},n.cell||{}),e.style||{}),class:e.class};return e.colspan&&(r.colspan=e.colspan),t("td",r,e.content)}))})}({h:o,style:s,rows:d}):function(e){var t=e.h;return t("tr",{},t("td",{style:{fontStyle:"italic",opacity:.75}},"Empty"))}({h:o})}function bM(e){var t=e.chart,n=e.translator,r=e.config,i=e.expando,o=e.internal;if(!r.main.key)return!1;var a=Dx(),s=nM({key:r.main.key,rtl:r.rtl,duration:r.duration}),l=r.main.events.tooltip,c=l.afterShow,u=l.afterHide,d=function(){var e=a.get("collected");return{expando:i,nodes:e.nodes,meta:e.meta}};return Lv(!0,s,{settings:{filter:function(e){return uM({chart:t,config:r,expando:i,internal:o,nodes:e})},extract:function(e){return a.set("collected",e.node),e},content:function(e){var o=e.h,a=e.data,s=e.style;return vM({chart:t,translator:n,config:r,expando:i,h:o,data:a,style:s})},placement:function(e){var t=e.nodes;return r.main.placement({meta:t[0].meta})},afterShow:function(){return c(d())},afterHide:function(){return u(d())}},style:{arrow:{color:r.style.background},content:r.style}})}function xM(e){var t=e.config,n=t.legend.keys;if(!n.tooltip||!n.component)return!1;if("categorical"!==t.getColorSettings().type)return!1;var r=nM({key:n.tooltip,rtl:t.rtl,duration:t.duration});return Lv(!0,r,{settings:{filter:function(e){return e.filter(function(e){return e.data&&e.key===n.component})},extract:function(e){return e},content:function(e){var t=e.h,n=e.data;return[t("tr",{},[t("td",{style:ly(ly({},e.style.cell||{}),{"font-weight":"bold","text-align":"left"}),colspan:2},n[0].node.data.label)])]},placement:"pointer"},style:{arrow:{color:t.style.background},content:t.style}})}function SM(e){var t=e.config.main.triggers.reduce(function(e,t){return t.keys.forEach(function(n){var r=t.distance||0;e.distance[n]=r,e.distances.includes(r)||e.distances.push(r),e.key[n]=!0,e.keys[r]||(e.keys[r]=[]),e.keys[r].push(n)}),e},{distance:{},distances:[],key:{},keys:{}});return function(e){return e.components.filter(function(e){return t.key[e.key]}).reduce(function(e,n){e.any=!0,e.components.push(n.key);var r=t.distance[n.key];return 0===r?e.position.push(n.key):(e.distances.includes(r)||(e.distances.push(r),e.distanceKeys[r]=[]),e.distanceKeys[r].push(n.key)),e},{any:!1,components:[],position:[],distances:[],distanceKeys:{}})}}var wM=function(){return!0};function MM(e){var t=e.config.main.triggers.reduce(function(e,t){var n=t.filter;return t.keys.forEach(function(t){e[t]="function"==typeof n?n:wM}),e},{});return function(e){var n=t[e.key];return!n||n(e)}}function kM(e){var t=e.chart,n=e.event,r=e.component,i={absolute:{x:0,y:0},relative:{x:0,y:0}},o=t.element.getBoundingClientRect(),a=o.left,s=o.top;i.absolute.x=(void 0===n.clientX?Math.floor(n.srcEvent.clientX):n.clientX)-a,i.absolute.y=(void 0===n.clientY?Math.floor(n.srcEvent.clientY):n.clientY)-s;var l=t.component(r);if(l){var c=l.rect.computedInner;i.relative.x=i.absolute.x-c.x,i.relative.y=i.absolute.y-c.y}return i}function CM(e){var t=e.chart,n=e.filter,r=e.hits,i=e.position,o=[];if(r.position.length&&o.push.apply(o,hy(t.shapesAt(i.absolute,{components:r.position.map(function(e){return{key:e}})}).filter(n))),!o.length&&r.distances.length){var a=[];r.distances.forEach(function(e){a.push.apply(a,hy(t.shapesAt({cx:i.absolute.x,cy:i.absolute.y,r:e},{components:r.distanceKeys[e].map(function(e){return{key:e}})}).filter(n)))}),a.length&&o.push(function(e){var t=e.nodes,n=e.origin,r=t.find(function(e){return"path"===e.type});if(r)return r;var i=function(e){var t=Math.abs(n.x-(e.localBounds.x+e.localBounds.width/2)),r=Math.abs(n.y-(e.localBounds.y+e.localBounds.height/2));return Math.sqrt(t*t+r*r)};return t.slice(1).reduce(function(e,t){var n=i(t);return n<e.distance&&(e.distance=n,e.node=t),e},{node:t[0],distance:i(t[0])}).node}({nodes:a,origin:i.relative}))}return o}function qM(e){var t=e.chart,n=e.config,r=e.expando,i=e.internal,o=e.facade,a=n.delay.tap,s=SM({config:n}),l=MM({config:n}),c=n.main.triggers.reduce(function(e,t){return e.push.apply(e,hy(t.keys)),e},[]);return{key:"event:".concat("tooltipTap"),type:"Tap",options:{event:"tooltipTap",enable:function(e,r){return!r||!!n.enable({event:r})&&t.componentsFromPoint({x:r.center.x,y:r.center.y}).filter(function(e){return-1!==c.indexOf(e.key)}).length>0}},recognizeWith:"tap",events:ay({},"tooltipTap",function(e){if(e.preventDefault(),"mouse"!==e.pointerType&&!n.main.suppress({event:e})){var c=t.component(n.main.key);if(c&&c.show){var u=t.componentsFromPoint({x:e.center.x,y:e.center.y}),d=s({components:u});if(d.any){var f=fy(d.components,1)[0],h=kM({chart:t,event:e,component:f});i.set(rM,h);var p=CM({chart:t,filter:l,hits:d,position:h});if(p.length){var m=p[0].key;n.main.events.tooltip.beforeShow({expando:r,event:e,collectNodes:function(){return o.collectNodes({nodes:p})},meta:{triggerer:m,position:h}}).then(function(){c.emit("show",e,{nodes:p,delay:a})}).catch(function(){})}else c.emit("hide")}else c.emit("hide")}}})}}function EM(e){var t=e.chart,n=e.config,r=e.expando,i=e.internal,o=e.facade,a=SM({config:n}),s=MM({config:n}),l=function(e){var t=e.config,n=e.expando,r=e.internal,i=e.facade,o=t.main.events.tooltip.beforeShow,a=t.delay.hover,s={ongoing:{},latest:void 0};return function(e){var t=e.event,l=e.tooltip,c=e.nodes,u=function(e){var t=e.nodes;return JSON.stringify(t.map(function(e){var t;return{key:e.key,bounds:e.bounds,value:null===(t=e.data)||void 0===t?void 0:t.value}}))}({nodes:c});if(!s.ongoing[u]){s.ongoing[u]=!0,s.latest=u;var d=c[0].key;o({expando:n,event:t,collectNodes:function(){return i.collectNodes({nodes:c})},meta:{triggerer:d,position:r.get(rM)}}).then(function(){u===s.latest&&l.emit("show",t,{nodes:c,delay:a})}).catch(function(){l.emit("show")}).finally(function(){delete s.ongoing[u],u===s.latest&&(s.latest=void 0)})}}}({config:n,expando:r,internal:i,facade:o}),c=[n.main.key,n.legend.keys.tooltip].filter(Boolean),u=function(){c.forEach(function(e){var n=t.component(e);null!=n&&n.show&&n.emit("hide")})};return{type:"native",events:{mousemove:function(e){if(n.enable({event:e})&&!n.main.suppress({event:e})){var r=t.componentsFromPoint({x:e.clientX,y:e.clientY}),o=t.component(n.main.key);if(o&&o.show){var c=a({components:r});if(c.any){var u=fy(c.components,1)[0],d=kM({chart:t,event:e,component:u});i.set(rM,d);var f=CM({chart:t,filter:s,hits:c,position:d});if(!f.length)return void o.emit("hide");l({event:e,tooltip:o,nodes:f})}else o.emit("hide")}var h=n.legend;if(h.keys.tooltip&&h.keys.component){var p=t.component(h.keys.tooltip);p&&p.show&&(r.some(function(e){return e.key===h.keys.component})?p.emit("show",e):p.emit("hide"))}}},mouseup:function(e){2===e.button&&u()},mouseleave:function(){n.main.events.interaction.mouseleave({expando:r}),u()},wheel:function(){u()}}}}function DM(e){var t=e.chart,n=e.translator,r=function(e){var t=e.config;return Lv(!0,{},{rtl:!1,enable:Zw.FALSE,getColorSettings:Zw.OBJECT,style:{fontSize:void 0,fontFamily:void 0,color:void 0,background:void 0},delay:{hover:500,tap:0},duration:8e3,main:{key:void 0,suppress:Zw.FALSE,getGroupByValue:Zw.NOOP,collectibles:[],triggers:[],placement:function(){return{type:"bounds"}},placements:{collectible:"combine"},showDuplicateMeasures:!1,layout:{rows:7,grouping:!1,single:!1},section:Zw.ARRAY,sections:Zw.NOOP,events:{tooltip:{beforeShow:function(){return Promise.resolve()},afterShow:Zw.NOOP,afterHide:Zw.NOOP},interaction:{mouseleave:Zw.NOOP}}},legend:{keys:{tooltip:void 0,component:void 0}}},void 0===t?{}:t)}({config:e.config}),i=Dx(),o=Dx(),a={components:void 0,interactions:void 0};return{getComponents:function(){return a.components||(a.components=function(e){var t=e.config;return[bM({chart:e.chart,translator:e.translator,config:t,expando:e.expando,internal:e.internal}),xM({config:t})].filter(Boolean)}({chart:t,translator:n,config:r,expando:i,internal:o})),a.components},getInteractions:function(){return a.interactions||(a.interactions=function(e){var t=e.chart,n=e.config,r=e.expando,i=e.internal,o=function(e){var t=e.chart,n=e.config,r=e.expando,i=e.internal;return{collectNodes:function(e){var o=e.nodes,a=fy(uM({chart:t,config:n,expando:r,internal:i,nodes:o}),1)[0];return(void 0===a?{nodes:[]}:a).nodes}}}({chart:t,config:n,expando:r,internal:i});return{gestures:[qM({chart:t,config:n,expando:r,internal:i,facade:o})],native:EM({chart:t,config:n,expando:r,internal:i,facade:o})}}({chart:t,config:r,expando:i,internal:o})),a.interactions},expando:i}}var TM={created(){this.state={}},beforeUpdate(){this.state={}},beforeRender({size:e}){this.state.ticks=this.scale.ticks({distance:e.width}).filter(e=>!e.isMinor),"linear"===this.scale.type&&function(e,t){const[,n]=e.domain();for(let e=0;e<t.length;e++){const r=t[e],i=t[e+1];r.data={},i||1===r.end?i?(r.data.start=r.value,r.data.end=i.value,r.end=i.position):(r.data.start=r.value,r.data.end=r.value):(r.data.start=r.value,r.data.end=n,r.end=1)}}(this.scale,this.state.ticks)},render(){const e=this.scale.data().fields.length?this.scale.data().fields[0].id():"",{ticks:t}=this.state,n=t.map(t=>({type:"rect",fill:"none",data:{source:{field:e},value:[t.data.start,t.data.end]},x:t.start*this.rect.width,y:0,width:(t.end-t.start)*this.rect.width,height:this.rect.height}));if(t.length&&t[0].start>0){const r=t[0];n.unshift({type:"rect",fill:"none",data:{source:{field:e},value:[this.scale.domain()[0],r.data.start]},x:0,y:0,width:r.start*this.rect.width,height:this.rect.height})}return n}};function OM(e,t=1){if(t%2==0)return e;let n=Math.round(e);return e-n>0?n+=.5:n-=.5,n}function NM(e,t){return e.x<t.x?e.x+e.width>=t.x:t.x+t.width>=e.x}function AM(e,t){const{localProps:{size:n},props:{anchor:r}}=t,i=function({props:e,localProps:{size:t},style:n,renderer:r}){const i=e.label.padding,o=Math.max(0,Math.min(e.label.justify,1)),a=Math.max(0,Math.min(e.label.align,1)),s=e=>r.measureText({text:e,fontSize:n.label.fontSize,fontFamily:n.label.fontFamily});return{resolve:(e,r)=>{const l="string"==typeof e.label?e.label:"",c=s(l);let{x:u,width:d}=r;e.start===e.end&&(d=c.width+2*i,1===e.end&&(u-=d));const f={x:u+i,y:i,width:d-2*i,height:t.height-2*i},h=s(`${l[0]}…`).width,p=Math.max(0,f.width-c.width),m=Math.max(0,f.height-c.height),g=o*p,y=a*m;return{show:f.width>=Math.min(h,c.width),text:l,dx:g,dy:y,rect:f,style:n.label,segment:{x:u+g,width:c.width+2*i},tickValue:e.value}}}}(t),o=function({localProps:{size:e},style:t,scale:n,props:r}){const[i,o]=n.domain(),a=Math.max(0,Math.min(1,r.guideLine.major.justify));return{resolve:(n,r)=>{const s=a*r.width,l=OM(r.x+s,t.majorGuideLine.strokeWidth);return{show:n.value>=i&&n.value<=o,x1:l,y1:0,x2:l,y2:OM(e.height,t.majorGuideLine.strokeWidth),style:t.majorGuideLine,tickValue:n.value}}}}(t),a=e.map(e=>{const t=function(e,t,n){const r=Math.abs(Math.max(e.start,0)-Math.min(e.end,1))*t.width;return{x:Math.max(e[n],0)*t.width,y:0,width:r,height:t.height}}(e,n,r);return{rect:t,label:i.resolve(e,t),guideLine:o.resolve(e,t)}});return function(e,t){const n=e.length;if(n<2)return;const r=e[n-1],i=t[n-1].label;if(r&&r.start===r.end)for(let e=n-2;e>-1;e--){const n=t[e].label;n.show=n.show&&!NM(n.segment,i.segment)}}(e,a),a}function _M(e,t){const n=function({localProps:{size:e},props:t,style:n}){return{resolve:r=>{const i=Math.max(e.height-t.guideLine.minor.size,0)*Math.max(0,Math.min(t.guideLine.minor.align,1)),o=OM(r.position*e.width,n.minorGuideLine.strokeWidth);return{guideLine:{show:!0,x1:o,y1:OM(i,n.minorGuideLine.strokeWidth),x2:o,y2:OM(t.guideLine.minor.size+i,n.minorGuideLine.strokeWidth),style:n.minorGuideLine}}}}}(t);return t.props.guideLine.minor.show?e.map(n.resolve):[]}function IM(e){return e.filter(e=>e.show).map(e=>bg({strokeWidth:1},e.style,{type:"line",x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,tickValue:e.tickValue}))}var LM={require:["renderer"],defaultSettings:{layout:{displayOrder:0,prioOrder:0},settings:{anchor:"start",label:{show:!0,padding:4,align:0,justify:0},line:{show:!0},guideLine:{major:{justify:0},minor:{show:!0,size:4,align:0}}},style:{label:"$label",line:"$guide-line",majorGuideLine:"$guide-line",minorGuideLine:"$guide-line"}},preferredSize:()=>({size:30,edgeBleed:{left:1,right:1}}),init(){this.props=this.settings.settings,this.localProps={},this.state={major:[],minor:[]}},created(){this.init()},beforeUpdate(){this.init()},beforeRender({size:e}){this.localProps.size=e;const t=this.scale.ticks({distance:e.width}),n=t.filter(e=>!e.isMinor),r=t.filter(e=>e.isMinor);this.state.line=function({localProps:{size:e},style:t,props:n}){const r=OM(1,t.line.strokeWidth);return{show:n.line.show,x1:OM(0,t.line.strokeWidth),y1:r,x2:OM(e.width,t.line.strokeWidth),y2:r,style:t.line}}(this),this.state.major=AM(n,this),this.state.minor=_M(r,this)},render(){return[...IM([this.state.line]),...(e=this.state.major.map(e=>e.label),e.filter(e=>e.show).map(e=>bg({},e.style,{type:"text",x:e.rect.x,y:e.rect.y,dx:e.dx,dy:e.dy,maxWidth:e.rect.width,text:e.text,title:e.text,baseline:"text-before-edge",tickValue:e.tickValue}))),...IM(this.state.major.map(e=>e.guideLine)),...IM(this.state.minor.map(e=>e.guideLine))];var e}};function PM(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function RM(e){return 1===e.length&&(e=function(e){return function(t,n){return PM(e(t),n)}}(e)),{left:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)<0?r=o+1:i=o}return r},right:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)>0?i=o:r=o+1}return r}}}var zM=RM(PM).right,FM=Math.sqrt(50),jM=Math.sqrt(10),BM=Math.sqrt(2);function HM(e,t,n){var r=(t-e)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=FM?10:o>=jM?5:o>=BM?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=FM?10:o>=jM?5:o>=BM?2:1)}function VM(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=FM?i*=10:o>=jM?i*=5:o>=BM&&(i*=2),t<e?-i:i}function $M(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var WM="$";function UM(){}function YM(e,t){var n=new UM;if(e instanceof UM)e.each(function(e,t){n.set(t,e)});else if(Array.isArray(e)){var r,i=-1,o=e.length;if(null==t)for(;++i<o;)n.set(i,e[i]);else for(;++i<o;)n.set(t(r=e[i],i,e),r)}else if(e)for(var a in e)n.set(a,e[a]);return n}function KM(){}UM.prototype=YM.prototype={constructor:UM,has:function(e){return WM+e in this},get:function(e){return this[WM+e]},set:function(e,t){return this[WM+e]=t,this},remove:function(e){var t=WM+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===WM&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===WM&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===WM&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===WM&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===WM&&++e;return e},empty:function(){for(var e in this)if(e[0]===WM)return!1;return!0},each:function(e){for(var t in this)t[0]===WM&&e(this[t],t.slice(1),this)}};var GM=YM.prototype;KM.prototype={constructor:KM,has:GM.has,add:function(e){return this[WM+(e+="")]=e,this},remove:GM.remove,clear:GM.clear,values:GM.keys,size:GM.size,empty:GM.empty,each:GM.each};var XM=Array.prototype,JM=XM.map,ZM=XM.slice;function QM(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function ek(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function tk(){}var nk=.7,rk=1/nk,ik="\\s*([+-]?\\d+)\\s*",ok="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",ak="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",sk=/^#([0-9a-f]{3,8})$/,lk=new RegExp("^rgb\\("+[ik,ik,ik]+"\\)$"),ck=new RegExp("^rgb\\("+[ak,ak,ak]+"\\)$"),uk=new RegExp("^rgba\\("+[ik,ik,ik,ok]+"\\)$"),dk=new RegExp("^rgba\\("+[ak,ak,ak,ok]+"\\)$"),fk=new RegExp("^hsl\\("+[ok,ak,ak]+"\\)$"),hk=new RegExp("^hsla\\("+[ok,ak,ak,ok]+"\\)$"),pk={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 mk(){return this.rgb().formatHex()}function gk(){return this.rgb().formatRgb()}function yk(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=sk.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?vk(t):3===n?new Sk(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?bk(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?bk(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=lk.exec(e))?new Sk(t[1],t[2],t[3],1):(t=ck.exec(e))?new Sk(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=uk.exec(e))?bk(t[1],t[2],t[3],t[4]):(t=dk.exec(e))?bk(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=fk.exec(e))?Ck(t[1],t[2]/100,t[3]/100,1):(t=hk.exec(e))?Ck(t[1],t[2]/100,t[3]/100,t[4]):pk.hasOwnProperty(e)?vk(pk[e]):"transparent"===e?new Sk(NaN,NaN,NaN,0):null}function vk(e){return new Sk(e>>16&255,e>>8&255,255&e,1)}function bk(e,t,n,r){return r<=0&&(e=t=n=NaN),new Sk(e,t,n,r)}function xk(e,t,n,r){return 1===arguments.length?function(e){return e instanceof tk||(e=yk(e)),e?new Sk((e=e.rgb()).r,e.g,e.b,e.opacity):new Sk}(e):new Sk(e,t,n,null==r?1:r)}function Sk(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function wk(){return"#"+kk(this.r)+kk(this.g)+kk(this.b)}function Mk(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function kk(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Ck(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ek(e,t,n,r)}function qk(e){if(e instanceof Ek)return new Ek(e.h,e.s,e.l,e.opacity);if(e instanceof tk||(e=yk(e)),!e)return new Ek;if(e instanceof Ek)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 Ek(a,s,l,e.opacity)}function Ek(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Dk(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function Tk(e){return function(){return e}}function Ok(e){return 1===(e=+e)?Nk: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):Tk(isNaN(t)?n:t)}}function Nk(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Tk(isNaN(e)?t:e)}QM(tk,yk,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:mk,formatHex:mk,formatHsl:function(){return qk(this).formatHsl()},formatRgb:gk,toString:gk}),QM(Sk,xk,ek(tk,{brighter:function(e){return e=null==e?rk:Math.pow(rk,e),new Sk(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?nk:Math.pow(nk,e),new Sk(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:wk,formatHex:wk,formatRgb:Mk,toString:Mk})),QM(Ek,function(e,t,n,r){return 1===arguments.length?qk(e):new Ek(e,t,n,null==r?1:r)},ek(tk,{brighter:function(e){return e=null==e?rk:Math.pow(rk,e),new Ek(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?nk:Math.pow(nk,e),new Ek(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Sk(Dk(e>=240?e-240:e+120,i,r),Dk(e,i,r),Dk(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var Ak=function e(t){var n=Ok(t);function r(e,t){var r=n((e=xk(e)).r,(t=xk(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=Nk(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function _k(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,i=t.slice();return function(o){for(n=0;n<r;++n)i[n]=e[n]*(1-o)+t[n]*o;return i}}function Ik(e,t){var n,r=t?t.length:0,i=e?Math.min(r,e.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=Bk(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<i;++n)a[n]=o[n](e);return a}}function Lk(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Pk(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Rk(e,t){var n,r={},i={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=Bk(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}var zk=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Fk=new RegExp(zk.source,"g");function jk(e,t){var n,r,i,o=zk.lastIndex=Fk.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=zk.exec(e))&&(r=Fk.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:Pk(n,r)})),o=Fk.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}function Bk(e,t){var n,r=typeof t;return null==t||"boolean"===r?Tk(t):("number"===r?Pk:"string"===r?(n=yk(t))?(t=n,Ak):jk:t instanceof yk?Ak:t instanceof Date?Lk:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?_k:Array.isArray(t)?Ik:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?Rk:Pk)(e,t)}function Hk(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function Vk(e){return+e}var $k=[0,1];function Wk(e){return e}function Uk(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function Yk(e){var t,n=e[0],r=e[e.length-1];return n>r&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function Kk(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=Uk(i,r),o=n(a,o)):(r=Uk(r,i),o=n(o,a)),function(e){return o(r(e))}}function Gk(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=Uk(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(t){var n=zM(e,t,1,r)-1;return o[n](i[n](t))}}function Xk(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Jk(e,t){return function(){var e,t,n,r,i,o,a=$k,s=$k,l=Bk,c=Wk;function u(){return r=Math.min(a.length,s.length)>2?Gk:Kk,i=o=null,d}function d(t){return isNaN(t=+t)?n:(i||(i=r(a.map(e),s,l)))(e(c(t)))}return d.invert=function(n){return c(t((o||(o=r(s,a.map(e),Pk)))(n)))},d.domain=function(e){return arguments.length?(a=JM.call(e,Vk),c===Wk||(c=Yk(a)),u()):a.slice()},d.range=function(e){return arguments.length?(s=ZM.call(e),u()):s.slice()},d.rangeRound=function(e){return s=ZM.call(e),l=Hk,u()},d.clamp=function(e){return arguments.length?(c=e?Yk(a):Wk,d):c!==Wk},d.interpolate=function(e){return arguments.length?(l=e,u()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,u()}}()(e,t)}function Zk(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Qk(e){return(e=Zk(Math.abs(e)))?e[1]:NaN}var eC,tC=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function nC(e){if(!(t=tC.exec(e)))throw new Error("invalid format: "+e);var t;return new rC({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function rC(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function iC(e,t){var n=Zk(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}nC.prototype=rC.prototype,rC.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var oC={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return iC(100*e,t)},r:iC,s:function(e,t){var n=Zk(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(eC=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Zk(e,Math.max(0,t+o-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function aC(e){return e}var sC,lC,cC,uC=Array.prototype.map,dC=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function fC(e){var t=void 0===e.grouping||void 0===e.thousands?aC:function(e,t){return function(n,r){for(var i=n.length,o=[],a=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}(uC.call(e.grouping,Number),e.thousands+""),n=void 0===e.currency?"":e.currency[0]+"",r=void 0===e.currency?"":e.currency[1]+"",i=e.decimal+"",o=void 0===e.numerals?aC:function(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}(uC.call(e.numerals,String)),a=void 0===e.percent?"%":e.percent+"",s=e.minus+"",l=void 0===e.nan?"NaN":e.nan+"";function c(e){var c=(e=nC(e)).fill,u=e.align,d=e.sign,f=e.symbol,h=e.zero,p=e.width,m=e.comma,g=e.precision,y=e.trim,v=e.type;"n"===v?(m=!0,v="g"):oC[v]||(void 0===g&&(g=12),y=!0,v="g"),(h||"0"===c&&"="===u)&&(h=!0,c="0",u="=");var b="$"===f?n:"#"===f&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",x="$"===f?r:/[%p]/.test(v)?a:"",S=oC[v],w=/[defgprs%]/.test(v);function M(e){var n,r,a,f=b,M=x;if("c"===v)M=S(e)+M,e="";else{var k=(e=+e)<0||1/e<0;if(e=isNaN(e)?l:S(Math.abs(e),g),y&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r<n;++r)switch(e[r]){case".":i=t=r;break;case"0":0===i&&(i=r),t=r;break;default:if(!+e[r])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),k&&0===+e&&"+"!==d&&(k=!1),f=(k?"("===d?d:s:"-"===d||"("===d?"":d)+f,M=("s"===v?dC[8+eC/3]:"")+M+(k&&"("===d?")":""),w)for(n=-1,r=e.length;++n<r;)if(48>(a=e.charCodeAt(n))||a>57){M=(46===a?i+e.slice(n+1):e.slice(n))+M,e=e.slice(0,n);break}}m&&!h&&(e=t(e,1/0));var C=f.length+e.length+M.length,q=C<p?new Array(p-C+1).join(c):"";switch(m&&h&&(e=t(q+e,q.length?p-M.length:1/0),q=""),u){case"<":e=f+e+M+q;break;case"=":e=f+q+e+M;break;case"^":e=q.slice(0,C=q.length>>1)+f+e+M+q.slice(C);break;default:e=q+f+e+M}return o(e)}return g=void 0===g?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),M.toString=function(){return e+""},M}return{format:c,formatPrefix:function(e,t){var n=c(((e=nC(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(Qk(t)/3))),i=Math.pow(10,-r),o=dC[8+r/3];return function(e){return n(i*e)+o}}}}function hC(e,t,n,r){var i,o=VM(e,t,n);switch((r=nC(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Qk(t)/3)))-Qk(Math.abs(e)))}(o,a))||(r.precision=i),cC(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Qk(t)-Qk(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(e){return Math.max(0,-Qk(Math.abs(e)))}(o))||(r.precision=i-2*("%"===r.type))}return lC(r)}function pC(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){var r,i,o,a,s=-1;if(n=+n,(e=+e)===(t=+t)&&n>0)return[e];if((r=t<e)&&(i=e,e=t,t=i),0===(a=HM(e,t,n))||!isFinite(a))return[];if(a>0)for(e=Math.ceil(e/a),t=Math.floor(t/a),o=new Array(i=Math.ceil(t-e+1));++s<i;)o[s]=(e+s)*a;else for(e=Math.floor(e*a),t=Math.ceil(t*a),o=new Array(i=Math.ceil(e-t+1));++s<i;)o[s]=(e-s)/a;return r&&o.reverse(),o}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return hC(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,i=t(),o=0,a=i.length-1,s=i[o],l=i[a];return l<s&&(r=s,s=l,l=r,r=o,o=a,a=r),(r=HM(s,l,n))>0?r=HM(s=Math.floor(s/r)*r,l=Math.ceil(l/r)*r,n):r<0&&(r=HM(s=Math.ceil(s*r)/r,l=Math.floor(l*r)/r,n)),r>0?(i[o]=Math.floor(s/r)*r,i[a]=Math.ceil(l/r)*r,t(i)):r<0&&(i[o]=Math.ceil(s*r)/r,i[a]=Math.floor(l*r)/r,t(i)),e},e}function mC(){var e=Jk(Wk,Wk);return e.copy=function(){return Xk(e,mC())},$M.apply(e,arguments),pC(e)}!function(e){sC=fC(e),lC=sC.format,cC=sC.formatPrefix}({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});var gC=new Date,yC=new Date;function vC(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=function(t){return e(t=new Date(+t)),t},i.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},i.round=function(e){var t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},i.range=function(n,r,o){var a,s=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return s;do{s.push(a=new Date(+n)),t(n,o),e(n)}while(a<n&&n<r);return s},i.filter=function(n){return vC(function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););})},n&&(i.count=function(t,r){return gC.setTime(+t),yC.setTime(+r),e(gC),e(yC),Math.floor(n(gC,yC))},i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?function(t){return r(t)%e===0}:function(t){return i.count(0,t)%e===0}):i:null}),i}var bC=vC(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});bC.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?vC(function(t){t.setTime(Math.floor(t/e)*e)},function(t,n){t.setTime(+t+n*e)},function(t,n){return(n-t)/e}):bC:null},bC.range;var xC=6e4,SC=36e5,wC=864e5,MC=6048e5,kC=vC(function(e){e.setTime(e-e.getMilliseconds())},function(e,t){e.setTime(+e+1e3*t)},function(e,t){return(t-e)/1e3},function(e){return e.getUTCSeconds()});kC.range;var CC=vC(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*xC)/wC},function(e){return e.getDate()-1});function qC(e){return vC(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+7*t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*xC)/MC})}CC.range;var EC=qC(0),DC=qC(1),TC=qC(2),OC=qC(3),NC=qC(4),AC=qC(5),_C=qC(6);EC.range,DC.range,TC.range,OC.range,NC.range,AC.range,_C.range;var IC=vC(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});IC.every=function(e){return isFinite(e=Math.floor(e))&&e>0?vC(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n*e)}):null},IC.range;var LC=vC(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+t*xC)},function(e,t){return(t-e)/xC},function(e){return e.getUTCMinutes()});LC.range;var PC=vC(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+t*SC)},function(e,t){return(t-e)/SC},function(e){return e.getUTCHours()});PC.range;var RC=vC(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/wC},function(e){return e.getUTCDate()-1});function zC(e){return vC(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+7*t)},function(e,t){return(t-e)/MC})}RC.range;var FC=zC(0),jC=zC(1),BC=zC(2),HC=zC(3),VC=zC(4),$C=zC(5),WC=zC(6);FC.range,jC.range,BC.range,HC.range,VC.range,$C.range,WC.range;var UC=vC(function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCMonth(e.getUTCMonth()+t)},function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())},function(e){return e.getUTCMonth()});UC.range;var YC=vC(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});function KC(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function GC(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function XC(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}YC.every=function(e){return isFinite(e=Math.floor(e))&&e>0?vC(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null},YC.range;var JC,ZC,QC={"-":"",_:" ",0:"0"},eq=/^\s*\d+/,tq=/^%/,nq=/[\\^$*+?|[\]().{}]/g;function rq(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function iq(e){return e.replace(nq,"\\$&")}function oq(e){return new RegExp("^(?:"+e.map(iq).join("|")+")","i")}function aq(e){for(var t={},n=-1,r=e.length;++n<r;)t[e[n].toLowerCase()]=n;return t}function sq(e,t,n){var r=eq.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function lq(e,t,n){var r=eq.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function cq(e,t,n){var r=eq.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function uq(e,t,n){var r=eq.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function dq(e,t,n){var r=eq.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function fq(e,t,n){var r=eq.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function hq(e,t,n){var r=eq.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function pq(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function mq(e,t,n){var r=eq.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function gq(e,t,n){var r=eq.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function yq(e,t,n){var r=eq.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function vq(e,t,n){var r=eq.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function bq(e,t,n){var r=eq.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function xq(e,t,n){var r=eq.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Sq(e,t,n){var r=eq.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function wq(e,t,n){var r=eq.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Mq(e,t,n){var r=eq.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function kq(e,t,n){var r=tq.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Cq(e,t,n){var r=eq.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function qq(e,t,n){var r=eq.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Eq(e,t){return rq(e.getDate(),t,2)}function Dq(e,t){return rq(e.getHours(),t,2)}function Tq(e,t){return rq(e.getHours()%12||12,t,2)}function Oq(e,t){return rq(1+CC.count(IC(e),e),t,3)}function Nq(e,t){return rq(e.getMilliseconds(),t,3)}function Aq(e,t){return Nq(e,t)+"000"}function _q(e,t){return rq(e.getMonth()+1,t,2)}function Iq(e,t){return rq(e.getMinutes(),t,2)}function Lq(e,t){return rq(e.getSeconds(),t,2)}function Pq(e){var t=e.getDay();return 0===t?7:t}function Rq(e,t){return rq(EC.count(IC(e)-1,e),t,2)}function zq(e){var t=e.getDay();return t>=4||0===t?NC(e):NC.ceil(e)}function Fq(e,t){return e=zq(e),rq(NC.count(IC(e),e)+(4===IC(e).getDay()),t,2)}function jq(e){return e.getDay()}function Bq(e,t){return rq(DC.count(IC(e)-1,e),t,2)}function Hq(e,t){return rq(e.getFullYear()%100,t,2)}function Vq(e,t){return rq((e=zq(e)).getFullYear()%100,t,2)}function $q(e,t){return rq(e.getFullYear()%1e4,t,4)}function Wq(e,t){var n=e.getDay();return rq((e=n>=4||0===n?NC(e):NC.ceil(e)).getFullYear()%1e4,t,4)}function Uq(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+rq(t/60|0,"0",2)+rq(t%60,"0",2)}function Yq(e,t){return rq(e.getUTCDate(),t,2)}function Kq(e,t){return rq(e.getUTCHours(),t,2)}function Gq(e,t){return rq(e.getUTCHours()%12||12,t,2)}function Xq(e,t){return rq(1+RC.count(YC(e),e),t,3)}function Jq(e,t){return rq(e.getUTCMilliseconds(),t,3)}function Zq(e,t){return Jq(e,t)+"000"}function Qq(e,t){return rq(e.getUTCMonth()+1,t,2)}function eE(e,t){return rq(e.getUTCMinutes(),t,2)}function tE(e,t){return rq(e.getUTCSeconds(),t,2)}function nE(e){var t=e.getUTCDay();return 0===t?7:t}function rE(e,t){return rq(FC.count(YC(e)-1,e),t,2)}function iE(e){var t=e.getUTCDay();return t>=4||0===t?VC(e):VC.ceil(e)}function oE(e,t){return e=iE(e),rq(VC.count(YC(e),e)+(4===YC(e).getUTCDay()),t,2)}function aE(e){return e.getUTCDay()}function sE(e,t){return rq(jC.count(YC(e)-1,e),t,2)}function lE(e,t){return rq(e.getUTCFullYear()%100,t,2)}function cE(e,t){return rq((e=iE(e)).getUTCFullYear()%100,t,2)}function uE(e,t){return rq(e.getUTCFullYear()%1e4,t,4)}function dE(e,t){var n=e.getUTCDay();return rq((e=n>=4||0===n?VC(e):VC.ceil(e)).getUTCFullYear()%1e4,t,4)}function fE(){return"+0000"}function hE(){return"%"}function pE(e){return+e}function mE(e){return Math.floor(+e/1e3)}!function(e){JC=function(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=oq(i),u=aq(i),d=oq(o),f=aq(o),h=oq(a),p=aq(a),m=oq(s),g=aq(s),y=oq(l),v=aq(l),b={a:function(e){return a[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:Eq,e:Eq,f:Aq,g:Vq,G:Wq,H:Dq,I:Tq,j:Oq,L:Nq,m:_q,M:Iq,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:pE,s:mE,S:Lq,u:Pq,U:Rq,V:Fq,w:jq,W:Bq,x:null,X:null,y:Hq,Y:$q,Z:Uq,"%":hE},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:Yq,e:Yq,f:Zq,g:cE,G:dE,H:Kq,I:Gq,j:Xq,L:Jq,m:Qq,M:eE,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:pE,s:mE,S:tE,u:nE,U:rE,V:oE,w:aE,W:sE,x:null,X:null,y:lE,Y:uE,Z:fE,"%":hE},S={a:function(e,t,n){var r=h.exec(t.slice(n));return r?(e.w=p[r[0].toLowerCase()],n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f[r[0].toLowerCase()],n+r[0].length):-1},b:function(e,t,n){var r=y.exec(t.slice(n));return r?(e.m=v[r[0].toLowerCase()],n+r[0].length):-1},B:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.m=g[r[0].toLowerCase()],n+r[0].length):-1},c:function(e,n,r){return k(e,t,n,r)},d:yq,e:yq,f:Mq,g:hq,G:fq,H:bq,I:bq,j:vq,L:wq,m:gq,M:xq,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=u[r[0].toLowerCase()],n+r[0].length):-1},q:mq,Q:Cq,s:qq,S:Sq,u:lq,U:cq,V:uq,w:sq,W:dq,x:function(e,t,r){return k(e,n,t,r)},X:function(e,t,n){return k(e,r,t,n)},y:hq,Y:fq,Z:pq,"%":kq};function w(e,t){return function(n){var r,i,o,a=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(i=QC[r=e.charAt(++s)])?r=e.charAt(++s):i="e"===r?" ":"0",(o=t[r])&&(r=o(n,i)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function M(e,t){return function(n){var r,i,o=XC(1900,void 0,1);if(k(o,e,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(t&&!("Z"in o)&&(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=GC(XC(o.y,0,1))).getUTCDay(),r=i>4||0===i?jC.ceil(r):jC(r),r=RC.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=KC(XC(o.y,0,1))).getDay(),r=i>4||0===i?DC.ceil(r):DC(r),r=CC.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?GC(XC(o.y,0,1)).getUTCDay():KC(XC(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,GC(o)):KC(o)}}function k(e,t,n,r){for(var i,o,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=S[i in QC?t.charAt(a++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=w(n,b),b.X=w(r,b),b.c=w(t,b),x.x=w(n,x),x.X=w(r,x),x.c=w(t,x),{format:function(e){var t=w(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=M(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=w(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=M(e+="",!0);return t.toString=function(){return e},t}}}(e),JC.format,JC.parse,ZC=JC.utcFormat,JC.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var gE=1e3,yE=6e4,vE=36e5,bE=864e5,xE=2592e6,SE=31536e6;function wE(e){return new Date(e)}function ME(e){return e instanceof Date?+e:+new Date(+e)}function kE(e,t,n,r,i,o,a,s,l){var c=Jk(Wk,Wk),u=c.invert,d=c.domain,f=l(".%L"),h=l(":%S"),p=l("%I:%M"),m=l("%I %p"),g=l("%a %d"),y=l("%b %d"),v=l("%B"),b=l("%Y"),x=[[a,1,gE],[a,5,5e3],[a,15,15e3],[a,30,3e4],[o,1,yE],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,vE],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,bE],[r,2,1728e5],[n,1,6048e5],[t,1,xE],[t,3,7776e6],[e,1,SE]];function S(s){return(a(s)<s?f:o(s)<s?h:i(s)<s?p:r(s)<s?m:t(s)<s?n(s)<s?g:y:e(s)<s?v:b)(s)}function w(t,n,r,i){if(null==t&&(t=10),"number"==typeof t){var o=Math.abs(r-n)/t,a=RM(function(e){return e[2]}).right(x,o);a===x.length?(i=VM(n/SE,r/SE,t),t=e):a?(i=(a=x[o/x[a-1][2]<x[a][2]/o?a-1:a])[1],t=a[0]):(i=Math.max(VM(n,r,t),1),t=s)}return null==i?t:t.every(i)}return c.invert=function(e){return new Date(u(e))},c.domain=function(e){return arguments.length?d(JM.call(e,ME)):d().map(wE)},c.ticks=function(e,t){var n,r=d(),i=r[0],o=r[r.length-1],a=o<i;return a&&(n=i,i=o,o=n),n=(n=w(e,i,o,t))?n.range(i,o+1):[],a?n.reverse():n},c.tickFormat=function(e,t){return null==t?S:l(t)},c.nice=function(e,t){var n=d();return(e=w(e,n[0],n[n.length-1],t))?d(function(e,t){var n,r=0,i=(e=e.slice()).length-1,o=e[r],a=e[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),e[r]=t.floor(o),e[i]=t.ceil(a),e}(n,e)):c},c.copy=function(){return Xk(c,kE(e,t,n,r,i,o,a,s,l))},c}function CE(){return $M.apply(kE(YC,UC,FC,RC,PC,LC,kC,bC,ZC).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function qE(e,t){return e&&t&&e.qTicks.length===t.qTicks.length&&e.qTicks.every((e,n)=>e.qStart===t.qTicks[n].qStart&&e.qEnd===t.qTicks[n].qEnd)}function EE(e){return e.qTags.indexOf("$qualified")>-1}function DE({qAxis:e}){const t=[],n=[];for(let r=0;r<e.length;r++){const i=r+1,o=e[r],a=e[i];qE(o,a)?(EE(a)?(t.push(i),n.push(r)):(t.push(r),n.push(i)),r++):(t.push(r),n.push(r))}return{qualified:t,nonQualified:n}}function TE({qualifiedMeta:e,nonQualifiedMeta:t}){return{resolve(n){let r,i=NaN,o=NaN,a=NaN,s=!1;for(let l=e.length-1;l>=0;l--){const c=e[l];if(c.queries.outer(n)){const e=t[l+1];if(i=c.index,r=l,c.attrs.isDayOrShorter()&&c.queries.canFitHalfDayTicks(n)){o="auto",s=!0;break}if(e&&e.queries.inner(n)){o=e.index;const r=t[l+2];r&&r.queries.minor(n)&&(a=r.index);break}}}if(!Number.isNaN(i)&&Number.isNaN(o)&&"auto"!==o){o=i,i=NaN;const e=t[r+1];e&&e.queries.minor(n)&&(a=e.index)}else Number.isNaN(i)&&(i="auto",o="auto");return{outer:i,inner:o,minor:a,isDayOrShorter:s}}}}function OE({qTicks:e,measureText:t=()=>({width:0}),cache:n={},scale:r}){const i=n;return{isDayOrShorter:()=>(i.isDayOrShorter=e.length>0&&Math.abs(e[0].qStart-e[0].qEnd)<=1,i.isDayOrShorter),count:()=>e.length,maxRange:()=>(i.maxRange=e.length?Math.max(...e.map(e=>Math.abs(r(e.qStart)-r(e.qEnd)))):0,i.maxRange),rangeAndWidth(){const n=r.clamp();return r.clamp(!1),i.rangeAndWidth=e.map(e=>({range:Math.abs(r(e.qStart)-r(e.qEnd)),width:t(`${e.qText}`).width+16})),r.clamp(n),i.rangeAndWidth}}}function NE({attrs:e,reqAutoFitWidth:t}){return{outer:t=>!e.rangeAndWidth().some(({width:e,range:n})=>e>n*t),inner:t=>!e.rangeAndWidth().some(({width:e,range:n})=>e>n*t),minor:t=>e.maxRange()*t>=6,canFitHalfDayTicks:n=>n>=t*e.count()}}function AE({qualified:e,nonQualified:t,qAxis:n,measureText:r,reqAutoFitWidth:i,scale:o},{attributesFactory:a=OE,queryFactory:s=NE}={attributesFactory:OE,queryFactory:NE}){const l=n.map((e,t)=>function(e,t){const{qTicks:n}=e,l=a({qTicks:n,measureText:r,scale:o});return{data:e,index:t,attrs:l,queries:s({attrs:l,reqAutoFitWidth:i})}}(e,t)),c=e.map(e=>l[e]),u=t.map(e=>l[e]);return{qAxisMeta:l,qualifiedMeta:c,nonQualifiedMeta:u}}function _E({qAxis:e=[],measureText:t=()=>({width:0}),cache:n={},reqAutoFitWidth:r=0,scale:i},{metaFactory:o=AE,mapper:a=DE,resolver:s=TE}={metaFactory:AE,mapper:DE,resolver:TE}){const{qualified:l,nonQualified:c}=a({qAxis:e}),{qualifiedMeta:u,nonQualifiedMeta:d}=o({qAxis:e,qualified:l,nonQualified:c,measureText:t,reqAutoFitWidth:r,scale:i}),f=s({qualifiedMeta:u,nonQualifiedMeta:d});return{resolve:t=>{const r=n.key({distance:t});if(n.get(r))return n.get(r);if(function(e){return!Array.isArray(e)||0===e.length||e.every(e=>0===e.qTicks.length)}(e))return{outer:"auto",inner:"auto",minor:NaN,isDayOrShorter:!1};const i=f.resolve(t);return n.set(r,i),i}}}function IE(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}const LE=IE(0).getTime();function PE(e){return(e.getTime()-LE)/86400/1e3}const RE=new Date,zE=new Date;function FE(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{const t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),i.range=(n,r,o)=>{const a=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return a;let s;do{a.push(s=new Date(+n)),t(n,o),e(n)}while(s<n&&n<r);return a},i.filter=n=>FE(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(i.count=(t,r)=>(RE.setTime(+t),zE.setTime(+r),e(RE),e(zE),Math.floor(n(RE,zE))),i.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i:null)),i}const jE=1e3,BE=6e4,HE=36e5,VE=864e5,$E=6048e5,WE=FE(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*jE)},(e,t)=>(t-e)/jE,e=>e.getUTCSeconds());WE.range;const UE=FE(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*jE)},(e,t)=>{e.setTime(+e+t*BE)},(e,t)=>(t-e)/BE,e=>e.getMinutes());UE.range;const YE=FE(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*BE)},(e,t)=>(t-e)/BE,e=>e.getUTCMinutes());YE.range;const KE=FE(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*jE-e.getMinutes()*BE)},(e,t)=>{e.setTime(+e+t*HE)},(e,t)=>(t-e)/HE,e=>e.getHours());KE.range;const GE=FE(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*HE)},(e,t)=>(t-e)/HE,e=>e.getUTCHours());GE.range;const XE=FE(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*BE)/VE,e=>e.getDate()-1);XE.range;const JE=FE(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/VE,e=>e.getUTCDate()-1);JE.range;const ZE=FE(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/VE,e=>Math.floor(e/VE));function QE(e){return FE(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+7*t)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*BE)/$E)}ZE.range;const eD=QE(0),tD=QE(1),nD=QE(2),rD=QE(3),iD=QE(4),oD=QE(5),aD=QE(6);function sD(e){return FE(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)},(e,t)=>(t-e)/$E)}eD.range,tD.range,nD.range,rD.range,iD.range,oD.range,aD.range;const lD=sD(0),cD=sD(1),uD=sD(2),dD=sD(3),fD=sD(4),hD=sD(5),pD=sD(6);lD.range,cD.range,uD.range,dD.range,fD.range,hD.range,pD.range;const mD=FE(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear()),e=>e.getMonth());mD.range;const gD=FE(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear()),e=>e.getUTCMonth());gD.range;const yD=FE(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());yD.every=e=>isFinite(e=Math.floor(e))&&e>0?FE(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}):null,yD.range;const vD=FE(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());vD.every=e=>isFinite(e=Math.floor(e))&&e>0?FE(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null,vD.range;const bD=1,xD=2,SD=3,wD=4,MD=5,kD=6;function CD({timeScale:e,labels:t,distance:n,isDayOrShorter:r,cache:i,timeOnly:o,initialMin:a}){const[s,l]=e.domain(),c=i.key({distance:n});let u;i.get(c,1)?u=i.get(c,1):(u=function(e,t,n,r,i,o){function a(e){return vD.filter(t=>(t.getUTCFullYear()-o.getUTCFullYear())%e===0)}const s=WE.count(e,t),l=YE.count(e,t),c=GE.count(e,t),u=JE.count(e,t),d=lD.count(e,t),f=gD.count(e,t),h=vD.count(e,t),p=n/r.second.width-1,m=n/r.minute.width-1,g=n/r.date.width-1,y=n/r.year.width-1,v={type:"year",desc:"year",count:h,interval:vD.every(1),formatter:r.year.formatter,offset:e=>vD.offset(e,-1),floor:vD.floor};if(s<=p)v.type=bD,v.desc="second",v.count=s,v.interval=WE.every(1),v.formatter=r.second.formatter,v.offset=e=>WE.offset(e,-1),v.floor=WE.floor;else if(s/2<=p)v.type=bD,v.desc="every other second",v.count=s/2,v.interval=WE.every(2),v.formatter=r.second.formatter,v.offset=e=>WE.offset(e,-2),v.floor=WE.floor;else if(s/5<=p)v.type=bD,v.desc="every 5 second",v.count=s/5,v.interval=WE.every(5),v.formatter=r.second.formatter,v.offset=e=>WE.offset(e,-5),v.floor=WE.floor;else if(s/15<=p)v.type=bD,v.desc="every 15 second",v.count=s/15,v.interval=WE.every(15),v.formatter=r.second.formatter,v.offset=e=>WE.offset(e,-15),v.floor=WE.floor;else if(s/30<=p)v.type=bD,v.desc="every 30 second",v.count=s/30,v.interval=WE.every(30),v.formatter=r.second.formatter,v.offset=e=>WE.offset(e,-30),v.floor=WE.floor;else if(l<=m)v.type=xD,v.desc="minute",v.count=l,v.interval=YE.every(1),v.formatter=r.minute.formatter,v.offset=e=>YE.offset(e,-1),v.floor=YE.floor;else if(l/2<=m)v.type=xD,v.desc="every 2 minute",v.count=l/2,v.interval=YE.every(2),v.formatter=r.minute.formatter,v.offset=e=>YE.offset(e,-2),v.floor=YE.floor;else if(l/5<=m)v.type=xD,v.desc="every 5 minute",v.count=l/5,v.interval=YE.every(5),v.formatter=r.minute.formatter,v.offset=e=>YE.offset(e,-5),v.floor=YE.floor;else if(l/10<=m)v.type=xD,v.desc="every 10 minute",v.count=l/10,v.interval=YE.every(10),v.formatter=r.minute.formatter,v.offset=e=>YE.offset(e,-10),v.floor=YE.floor;else if(l/15<=m)v.type=xD,v.desc="every 15 minute",v.count=l/15,v.interval=YE.every(15),v.formatter=r.minute.formatter,v.offset=e=>YE.offset(e,-15),v.floor=YE.floor;else if(l/30<=m)v.type=xD,v.desc="every 30 minute",v.count=l/30,v.interval=YE.every(30),v.formatter=r.minute.formatter,v.offset=e=>YE.offset(e,-30),v.floor=YE.floor;else if(c<=m)v.type=SD,v.desc="hour",v.count=c,v.interval=GE.every(1),v.formatter=r.minute.formatter,v.offset=e=>GE.offset(e,-1),v.floor=GE.floor;else if(c/2<=m)v.type=SD,v.desc="every 2 hour",v.count=c/2,v.interval=GE.every(2),v.formatter=r.minute.formatter,v.offset=e=>GE.offset(e,-2),v.floor=GE.floor;else if(c/3<=m)v.type=SD,v.desc="every 3 hour",v.count=c/3,v.interval=GE.every(3),v.formatter=r.minute.formatter,v.offset=e=>GE.offset(e,-3),v.floor=GE.floor;else if(c/6<=m)v.type=SD,v.desc="every 6 hour",v.count=c/6,v.interval=GE.every(6),v.formatter=r.minute.formatter,v.offset=e=>GE.offset(e,-6),v.floor=GE.floor;else if(c/12<=m||i)v.type=SD,v.desc="every 12 hour",v.count=c/12,v.interval=GE.every(12),v.formatter=r.minute.formatter,v.offset=e=>GE.offset(e,-12),v.floor=GE.floor;else if(u<=g)v.type=wD,v.desc="day",v.count=u,v.interval=JE.every(1),v.formatter=r.date.formatter,v.offset=e=>JE.offset(e,-1),v.floor=JE.floor;else if(u/2<=g)v.type=wD,v.desc="every 2 day",v.count=u/2,v.interval=JE.every(2),v.formatter=r.date.formatter,v.offset=e=>JE.offset(e,-2),v.floor=JE.floor;else if(u/3<=g)v.type=wD,v.desc="every 3 day",v.count=u/3,v.interval=JE.every(3),v.formatter=r.date.formatter,v.offset=e=>JE.offset(e,-3),v.floor=JE.floor;else if(d<=g)v.type=wD,v.desc="week",v.count=d,v.interval=lD.every(1),v.formatter=r.date.formatter,v.offset=e=>lD.offset(e,-1),v.floor=JE.floor;else if(d/2<=g)v.type=wD,v.desc="every 2 week",v.count=d/2,v.interval=lD.every(2),v.formatter=r.date.formatter,v.offset=e=>lD.offset(e,-2),v.floor=JE.floor;else if(f<=g)v.type=MD,v.desc="month",v.count=f,v.interval=gD.every(1),v.formatter=r.date.formatter,v.offset=e=>gD.offset(e,-1),v.floor=JE.floor;else if(f/3<=g)v.type=MD,v.desc="quarter",v.count=f/3,v.interval=gD.every(3),v.formatter=r.date.formatter,v.offset=e=>gD.offset(e,-3),v.floor=JE.floor;else if(f/6<=g)v.type=MD,v.desc="half year",v.count=f/6,v.interval=gD.every(6),v.formatter=r.date.formatter,v.offset=e=>gD.offset(e,-6),v.floor=JE.floor;else if(h<=y)v.type=kD,v.desc="year",v.count=h,v.interval=vD.every(1),v.formatter=r.year.formatter,v.offset=e=>vD.offset(e,-1),v.floor=vD.floor;else if(h/2<=y)v.type=kD,v.desc="every 2 year",v.count=h/2,v.interval=a(2),v.formatter=r.year.formatter,v.offset=e=>vD.offset(e,-2),v.floor=vD.floor;else if(h/5<=y)v.type=kD,v.desc="every 5 year",v.count=h/5,v.interval=a(5),v.formatter=r.year.formatter,v.offset=e=>vD.offset(e,-5),v.floor=vD.floor;else if(h/10<=y)v.type=kD,v.desc="every 10 year",v.count=h/10,v.interval=a(10),v.formatter=r.year.formatter,v.offset=e=>vD.offset(e,-10),v.floor=vD.floor;else{const e=Math.max(1,Math.floor(h/y));v.type=kD,v.desc="every nth year",v.count=e,v.interval=a(e),v.formatter=r.year.formatter,v.offset=t=>vD.offset(t,-e),v.floor=vD.floor}return v}(s,l,n,t.all(),r,a),i.set(c,u,1));const d=e.ticks(u.interval);d.length?s.getTime()!==d[0].getTime()&&d.unshift(u.offset(d[0])):d.push(u.floor(s));const f=d.map((e,t,n)=>{const r=n[t+1]?n[t+1]-e:l-e;return{start:e,end:new Date(e.getTime()+r),formatter:u.formatter}});let h=[];if(!o&&u.type<=SD){const n=t.getFormat("date"),r=e.ticks(JE.every(1));r.length&&s.getUTCDate()!==r[0].getUTCDate()&&r.unshift(JE.offset(r[0],-1)),h=(r.length?r:[JE.floor(s)]).map((e,t,r)=>{const i=r[t+1]?r[t+1]-e:l-e;return{start:e,end:new Date(e.getTime()+i),formatter:n.formatter}})}return{inner:f,outer:h}}const qD=86400,ED=1440,DD={};function TD(e,t,n,r){return{type:e,start:new Date(Date.UTC(...t)),end:new Date(Date.UTC(...n)),formatter:r}}function OD(e,t,n){const{generator:r,anchor:i,clamp:o,level:a}=t.ticks,{qNumFormat:s}=t.formatter;e.clamp(o);const[l,c]=e.domain(),u=CE().domain([IE(l),IE(c)]);u.clamp(o),u.range(t.invert?[1,0]:[0,1]);const d="object"==typeof r?r:{type:r};let f;f="d3"===d.type?(e,i)=>CD({timeScale:u,labels:n,distance:e,isDayOrShorter:i,cache:t.cache,timeOnly:"T"===s.qType,initialMin:void 0===d.initialMin?u.domain()[0]:IE(r.initialMin)}):e=>function(e,t,n,r,i,o=!1){if(DD[[t,n,r,r,o]])return DD[[t,n,r,r,o]];const a={year:e.getFormat("year"),date:e.getFormat("date"),minute:e.getFormat("minute"),second:e.getFormat("second")},s=IE(n),l=s.getFullYear(),c=s.getMonth(),u=s.getDate(),d=r-n,f=t/(i-r),h=f/1440,p=f/qD,m=366*f,g=3*f*30,y=a.second.width/p,v=a.minute.width/h,b=a.date.width/g,x=a.year.width/m;let S,w,M,k=0,C=0,q=null,E=null,D=null,T=null,O=null,N=null;const A={outer:[],inner:[]};for(y<1?(q=1,C=1/qD):y<2?(q=2,C=1/qD*2):y<5?(q=5,C=1/qD*5):y<10?(q=10,C=1/qD*10):y<30?(q=30,C=1/qD*30):v<1?(E=1,C=1/ED):v<2?(E=2,C=1/ED*2):v<5?(E=5,C=1/ED*5):v<10?(E=10,C=.006944444444444445):v<30?(E=30,C=.020833333333333336):v<60?(D=1,C=1/24):v<120?(D=2,C=2/24):v<360?(D=6,C=.25):v<720?(D=12,C=.5):b<1/90?(C=1,T=1):b<2/90?(C=2,T=2):b<7/90?(C=7,T=7):b<31/90?(O=1,C=31):b<1?(O=3,C=90):x<1?(N=1,C=366):x<2?(N=2,C=732):x<5?(N=5,C=1826.25):(N=10,C=3652.5),w=Math.floor((d+n%1)/C);k<i;){M=w+1,S=N?TD("year",[l+w*N,0,1],[l+M*N,0,1],a.year.formatter):O?TD("month",[l,c+w*O,1],[l,c+M*O,1],a.date.formatter):T?TD("day",[l,c,u+w*T],[l,c,u+M*T],a.date.formatter):D?TD("hour",[l,c,u,0+w*D],[l,c,u,0+M*D],a.minute.formatter):E?TD("minute",[l,c,u,0,0+w*E],[l,c,u,0,0+M*E],a.minute.formatter):TD("second",[l,c,u,0,0,0+w*q],[l,c,u,0,0,0+M*q],a.second.formatter),k=PE(S.start),A.inner.push(S);const e=Math.floor(k);if(!(o||N||O||T)){const t={type:"day",start:IE(e),end:IE(e+1),formatter:a.date.formatter,qStart:e};A.outer[A.outer.length-1]&&A.outer[A.outer.length-1].qStart===t.qStart||A.outer.push(t)}w++}return A.min=r,A.max=i,DD[[t,n,r,r,o]]=A,A}(n,e,d.min,l,c,"T"===s.qType);const h={transform:(t=[],{isMinor:n=!1}={})=>t.map(t=>{let r;r="start"===i?t.qStart:"end"===i?t.qEnd:(t.qStart+t.qEnd)/2;const o=e.clamp();n&&e.clamp(!1);const a=e(r),s=e(t.qStart),l=e(t.qEnd);return e.clamp(o),{value:r,position:a,start:s,end:l,label:t.qText,isMinor:n,data:n?void 0:{start:t.qStart,end:t.qEnd,scaleStart:e.domain()[0]}}}).filter(e=>e.position>=0&&e.position<=1),generate:(t=100,n)=>f(t,n)[a].map(t=>{let n;return n="start"===i?PE(t.start):"end"===i?PE(t.end):(PE(t.start)+PE(t.end))/2,{position:u(t.start),start:u(t.start),end:u(t.end),value:n,label:t.formatter(n),isMinor:!1,data:{start:PE(t.start),end:PE(t.end),scaleStart:e.domain()[0]}}}).filter(e=>e.position>=0&&e.position<=1)};return h}const ND=/t+/i;const AD={min:NaN,max:NaN,invert:!1,qAxis:[],field:void 0,formatter:{fn:()=>e=>e,measureText:()=>({width:0,height:0}),localeInfo:{},qNumFormat:{}},ticks:{generator:"d3",level:"outer",anchor:void 0,clamp:!1},cache:{get:()=>!1,set:()=>{},key:()=>""}};function _D(e,t){e.instance||(e.instance=t.copy(),e.instance.domain(t.domain()),e.instance.clamp(!0),e.instance.range(e.invert?[1,0]:[0,1]))}const ID="continuousPan";var LD={model:function({model:e,layoutService:t,largeDataService:n,dataProcessorModel:r=Vg,viewCache:i,viewState:o,definitionPath:a},s={}){const{engineFetcherFactory:l=Ng,snapshotFetcherFactory:c=_g,cacheFetcherFactory:u=Ag,cache:d={initial:{},merged:{}}}=s,f=l({model:e,layoutService:t,largeDataService:n,definitionPath:a}),h=c({layoutService:t,viewCache:i}),p=u({cache:d}),m=e=>{throw e.isHandled=!0,e};let g,y,v;return{update(e){({initialMin:y,initialMax:v}=function(e={}){let{qMin:t,qMax:n}=e;return t=Number.isNaN(+t)?0:t,n=Number.isNaN(+n)?0:n,{initialMin:t,initialMax:n}}(e.qHyperCube.qDimensionInfo[0])),i.set("continuousMin",y),i.set("continuousMax",v),i.set("minimiumZoomSpan",function(e,t){return Math.max(1e-6,(t-e)*jg)}(y,v)),g=t.meta.isSnapshot?h:f,t.meta.isSnapshot&&({zoom:{min:y,max:v}}=h.getSnapshotData()),o.preventSet("zoom",{min:y,max:v})},updateLayout(e){const{qDataPages:n,qAxisData:r}=e;return t.setHyperCubeValue("qDataPages",n),t.setHyperCubeValue("qAxisData",r),t.setHyperCubeValue("qMode","S"),t.setHyperCubeValue("qColumnOrder",[]),e},initialFetch(){return g.fetch(y,v).then(e=>{const t=function(e){return{qDataPages:e.qDataPages.map(e=>{const t=Pg(e.qArea,e.qMatrix);return{...e,qArea:t}}),qAxisData:e.qAxisData}}(e);return r.command.processDataPage({dataPage:t.qDataPages.length?t.qDataPages[0]:[]}),d.initial=t,d.merged=t,e}).then(e=>Rg(y,v,e)).then(e=>this.updateLayout(e)).catch(m)},fetch:(e,t)=>g.fetch(e,t).then(e=>function(e,t){const n={};return n.qDataPages=(e.qDataPages||[]).map((e,n)=>{const r=function(e,t){if(!t||!t.length||!t[0].length)return e;const n=t[0][0].qNum,r=t[t.length-1][0].qNum,i=[],o=[];for(let t=0,a=e.length;t<a;t++){const a=e[t][0];a.qNum<n?i.push(e[t]):a.qNum>r&&o.push(e[t])}return[...i,...t,...o]}(e.qMatrix,t.qDataPages[n].qMatrix),i=Pg(e.qArea,r);return{...e,qArea:i,qMatrix:r}}),e.qAxisData&&e.qAxisData.qAxis&&(n.qAxisData=function(e,t){if(!t||!t.qAxis.length||t.qAxis.every(e=>!e.qTicks.length))return e;const n=t.qAxis.map(e=>e.qName),r=t.qAxis.map(e=>({start:e.qTicks[0].qStart,end:e.qTicks[e.qTicks.length-1].qStart})),i=t.qAxis.map(e=>({qName:e.qName,qTags:[...e.qTags],qTicks:[...e.qTicks]}));for(let t=0,o=e.qAxis.length;t<o;t++){const o=e.qAxis[t],a=n.indexOf(o.qName),s=[],l=[];if(a>-1){const{start:e,end:t}=r[a];for(let n=0,r=o.qTicks.length;n<r;n++){const r=o.qTicks[n];r.qStart<e?s.push(r):r.qStart>t&&l.push(r)}i[a].qTicks=[...s,...i[a].qTicks,...l]}}return{qAxis:i}}(e.qAxisData,t.qAxisData)),n}(d.initial,e)).then(e=>(r.command.processDataPage({dataPage:e.qDataPages.length?e.qDataPages[0]:[]}),d.merged=e,e)).then(n=>Rg(e,t,n)).catch(m),fetchFromCache:(e,t)=>p.fetch(e,t).then(n=>Rg(e,t,n)),fetchMinMaxData:()=>Promise.resolve(d.initial.qDataPages||[]),getInitialCube(){const e=t.getHyperCube();return bg({},e,{...d.initial})},getInitialLayout(){const e=this.getInitialCube();return bg({},t.getLayout(),{qHyperCube:e})},getDimensionCardinality:()=>Hg(d.initial,t.meta),setSnapshotData(e){const{qHyperCube:t}=e,n=r.query.getShouldProcess()?[r.query.getFilteredDataPage({dataPage:d.merged.qDataPages[0]})]:d.merged.qDataPages;t.qDataPages=n,t.qAxisData=d.merged.qAxisData}}},event:{onZoomChange:function(e,t){const{layoutService:n,continuousDataModel:r}=e;function i(e,n,i){return r[e](n,i).then(e=>(r.updateLayout(e),t(),e))}const o=Ox((e,t)=>i("fetch",e,t),50);return({min:e,max:t},{min:r,max:a})=>!n.meta.isContinuous||e===r&&t===a?Promise.resolve(null):i("fetchFromCache",e,t).then(n=>(o(e,t),n))},onZoomIntercept:function({viewCache:e}){let t=NaN,n=NaN,r=NaN;return(i,o)=>(t=e.get("continuousMin"),n=e.get("continuousMax"),r=e.get("minimiumZoomSpan"),Math.abs(i.max-i.min)<r?o:{min:Math.min(i.max,Math.max(t,i.min)),max:Math.max(i.min,Math.min(n,i.max))})},onZoom:function({viewCache:e,viewState:t,chart:n},{threshold:r=50,rtl:i=!1,targetKey:o}){const a=e.get("continuousMin"),s=e.get("continuousMax");return Nx((e,r)=>{const l=(e=>n.componentsFromPoint(e).filter(e=>e.key===o)[0])(e);if(l){const o=function(e,t,n){let{x:r}=e;return r-=t.element.getBoundingClientRect().left,r-=n.rect.x,Math.max(0,Math.min(1,r/n.rect.width))}(e,n,l),c=i?1-o:o,{min:u,max:d}=t.get("zoom"),f=Math.abs(d-u),h=f-(r>0?Fg:zg)*f,p=u+h*c,m=d-h*(1-c),g=p<a?a-p:0,y=m>s?m-s:0;t.set("zoom",{min:Math.max(p-y,a),max:Math.min(m+g,s)})}},r)}},interactions:{areaPan:function({targetKey:e,chart:t,actions:n,viewState:r,viewCache:i}){return{type:"Pan",key:"continuous:pan",options:{event:ID,pointers:1,threshold:10,enable(r,i){return this.started===ID||!i||!!n.scroll.enabled()&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some(t=>t.key===e)}},events:{[`${ID}start`](n){n.preventDefault(),this.started=ID;const{min:i,max:o}=r.get("zoom");this[ID]={min:i,max:o,size:t.component(e).rect.computedInner.width,span:o-i}},[`${ID}move`](e){e.preventDefault();const{span:t,min:n,max:o,size:a}=this[ID],s=-e.deltaX/a;r.set("zoom",{min:Math.min(n+s*t,i.get("continuousMax")-t),max:Math.max(o+s*t,i.get("continuousMin")+t)})},[`${ID}end`](e){e.preventDefault(),this.started=!1},[`${ID}cancel`](e){e.preventDefault(),this.started=!1}}}}},picassoComponents:{axisOverlay:TM,timeAxis:LM},picassoScales:{time:function e(t,n={}){const r=function(e,t,n){const r={};return Object.keys(t).forEach(i=>{const o=e[i],a=typeof o;"function"===a?r[i]=o(n):"object"!==a||Array.isArray(o)?r[i]="undefined"===a?t[i]:o:r[i]=bg(!0,{},t[i],o)}),r}(t,AD,n),{qAxis:i}=r,o=mC(),a={instance:null,invert:!1},{min:s,max:l}=function(e,t){let n=+e.min,r=+e.max;return Number.isNaN(n)&&Number.isNaN(r)&&Array.isArray(t)&&t.length&&(n=Math.min(...t[t.length-1].qTicks.map(e=>e.qStart)),r=Math.max(...t[t.length-1].qTicks.map(e=>e.qEnd))),n===r&&(n-=.5,r+=.5),{min:Number.isNaN(+n)?0:n,max:Number.isNaN(+r)?1:r}}(r,i);let c,u,d=[];const f=function(e){return Number.isNaN(+e)?NaN:o(e)};f.ticks=({distance:e,resolve:t=c.resolve}={})=>{const n=t(e),o=n[r.ticks.level];if(Number.isNaN(+o)||(d=u.transform(i[o].qTicks,{isMinor:!1})),!Number.isNaN(+n.minor)){const e=u.transform(i[n.minor].qTicks,{isMinor:!0});d=d.concat(e)}return"auto"===o&&(d=u.generate(e,n.isDayOrShorter)),d},f.invert=e=>o.invert(e),f.domain=e=>Array.isArray(e)?o.domain(e):o.domain(),f.range=e=>Array.isArray(e)?o.range(e):o.range(),f.norm=e=>(_D(a,f),a.instance(e)),f.normInvert=e=>(_D(a,f),a.instance.invert(e)),f.copy=()=>e(t,n),f.clamp=(e=!0)=>(o.clamp(e),o.clamp()),f.min=()=>Math.min(s,l),f.max=()=>Math.max(s,l),o.range(r.invert?[1,0]:[0,1]),o.domain([s,l]),a.invert=r.invert;const h=function(e){const t={},{measureText:n,fn:r,localeInfo:i}=e.formatter,o={second:{type:"second",pattern:"hh:mm:ss",width:60,formatter:void 0},minute:{type:"minute",pattern:"hh:mm",width:60,formatter:void 0},date:{type:"date",pattern:"YYYY-MM-DD",width:60,formatter:void 0},year:{type:"year",pattern:"YYYY",width:60,formatter:void 0}};return i&&ND.test(i.qTimestampFmt)&&(o.minute.pattern+=" tt",o.second.pattern+=" tt"),o.date.pattern=i&&i.qDateFmt?i.qDateFmt:o.date.pattern,Object.keys(o).forEach(e=>{o[e].formatter=r(o[e].pattern),o[e].width=Math.max(o[e].width,n(o[e].formatter(41000.2343433)).width+16)}),t.getFormat=e=>o[e],t.all=()=>o,t.getFormatFromTicks=e=>{const t=e.filter(e=>!e.isMinor),{length:n}=t;if(!n)return o.date;const r=IE(t[0].data.start),i=IE(t[n-1].data.start);return JE.count(r,i)/n>=1?o.date:GE.count(r,i)/n>0?o.minute:YE.count(r,i)/n>0?o.second:o.date},t}(r);return u=OD(o.copy(),r,h),c=_E({qAxis:i,measureText:r.formatter.measureText,reqAutoFitWidth:2*h.getFormat("minute").width,cache:r.cache,scale:f}),f.data=()=>({fields:[{formatter:f.formatter,id:()=>`qHyperCube/${r.field}`,key:()=>r.field,raw:Cx(n,"fields.0.raw",()=>({}))}]}),f.formatter=()=>h.getFormatFromTicks(d).formatter,f}}};const PD=[["FULL",{width:550,height:450}],["MEDIUM",{width:400,height:220}],["SMALL",{width:300,height:150}],["XSMALL",{width:150,height:75}],["SPARK",{width:0,height:0}]],RD={};PD.forEach(([e,{width:t,height:n}])=>{RD[e]={width:t,height:n}});const zD={getLayoutModes:()=>RD,getLayoutMode(e,t){let n;for(n=0;n<PD.length;++n)if(e>=PD[n][1].width&&t>=PD[n][1].height)return PD[n][0];return"SPARK"}};function FD(e,t){return{layoutModes:zD.getLayoutModes(),center:void 0!==t.minCenterRatio?{minWidthRatio:t.minCenterRatio,minHeightRatio:t.minCenterRatio}:void 0,logicalSize:t.logicalSize?{align:.5,preserveAspectRatio:!0,...t.logicalSize}:void 0}}const jD=["$date","$timestamp","$time"],BD=["D","TS","T"],HD={hasTimeTag:e=>!!(e&&e.qTags&&e.qTags.some(e=>jD.some(t=>t===e))),hasUnknownFormat:e=>!(!e||!e.qNumFormat||"U"!==e.qNumFormat.qType),hasTimeFormat:e=>!!(e&&e.qNumFormat&&BD.some(t=>t===e.qNumFormat.qType)),isTimeDimension:(e,t)=>!!(e&&t&&(HD.hasTimeTag(t)&&HD.hasUnknownFormat(t)||HD.hasTimeFormat(t))),isTime:(e,t)=>!!(t&&t.qHyperCube.qDimensionInfo&&t.qHyperCube.qDimensionInfo.length)&&(e&&HD.isTimeDimension(e,t.qHyperCube.qDimensionInfo.filter(e=>7005!==e.qError?.qErrorCode)[0])),canBeContinuousDimension(e){if(!e)return!1;const t=e.qTags||[];return!(!e.qContinuousAxes||!t.some(e=>"$numeric"===e))},canBeContinuous(e){const t=e?.qHyperCube?.qDimensionInfo?.filter(e=>7005!==e.qError?.qErrorCode);return!((t?.length??0)<1)&&HD.canBeContinuousDimension(t[0])},maxNumberOfLines:12},VD=/^[A-Z][A-z0-9_]*$/i,$D={getChar(e){let t=e,n=-1;return t>9?(n=65+t-10,n>90&&(n+=6)):t=`${t}`.charCodeAt(0),[48,111,79,105,73,108].indexOf(n)>-1?this.getChar(t+1):String.fromCharCode(n)},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,"")}},WD={setValue:(e,t,n)=>{if(!t)return!1;const r=t.split("."),i=r[r.length-1];let o,a=e;for(o=0;o<r.length-1;++o)void 0===a[r[o]]&&(a[r[o]]=Number.isNaN(+r[o+1])?{}:[]),a=a[r[o]];if(void 0!==n){const e=a[i];return a[i]=n,{updated:n,previous:e}}return delete a[i],!1},getValue:(e,t,n)=>{const r=t.split(".");let i,o=e;if(void 0===o)return n;for(i=0;i<r.length;++i){if(void 0===o[r[i]])return n;o=o[r[i]]}return o},moveArrayElement:(e,t,n)=>{if(n>=e.length){let t=n-e.length;for(;1+t--;)e.push(void 0)}e.splice(n,0,e.splice(t,1)[0])},escapeField:e=>{let t;return t=!e||"]"===e||VD.test(e)?e:`[${e.replace(/\]/g,"]]")}]`,t},deleteUndefinedProperties:e=>{Object.keys(e).forEach(t=>{void 0===e[t]&&delete e[t]})},generateId:()=>$D.id(),shouldUseFormat:e=>!e.isCustomFormatted&&(e.qIsAutoFormat||"U"===e.qNumFormat.qType)},UD=e=>WD.getValue(e,"qHyperCube.qDimensionInfo",[]),YD=e=>WD.getValue(e,"qHyperCube.qMeasureInfo",[]),KD=e=>WD.getValue(e,"barGrouping.grouping"),GD={continuous({layout:e,properties:t,auto:n}){if(!HD.canBeContinuous(e))return!1;const r=t||e;return WD.getValue(r,"dimensionAxis.continuousAuto")?"function"==typeof n?n():!!n:!!r?.preferContinuousAxis},dimensionless:e=>!UD(e).length,grouped(e){return!this.dimensionless(e)&&"grouped"===KD(e)&&(UD(e).length>1||YD(e).length>1)&&!this.continuous({layout:e})},groupedByDimension(e){return this.grouped(e)&&UD(e).length>1&&1===YD(e).length},groupedByMeasure(e){return this.grouped(e)&&1===UD(e).length&&YD(e).length>1},stacked(e){return(!this.dimensionless(e)&&"grouped"!==KD(e)&&"butterfly"!==KD(e)||this.continuous({layout:e}))&&(UD(e).length>1||YD(e).length>1)},stackedByDimension(e){return this.stacked(e)&&UD(e).length>1&&1===YD(e).length},stackedByMeasure(e){return this.stacked(e)&&1===UD(e).length&&YD(e).length>1},simple:e=>0===UD(e).length||1===UD(e).length&&1===YD(e).length,snapshot:e=>!!WD.getValue(e,"snapshotData")};function XD(e,t){const n=e.component(t);return n&&n._DO_NOT_USE_getInfo&&n._DO_NOT_USE_getInfo().offset}const JD=e=>{throw e.isHandled=!0,e};const ZD={getDockValue:e=>"near"===e||"left"===e||"top"===e?0:1,getOppositeDock(e){switch(e){case"left":return"right";case"right":return"left";case"top":return"bottom";case"bottom":return"top";case"near":default:return"far";case"far":return"near"}},getHorizontalDock:e=>"near"===e||"left"===e?"left":"right",getVerticalDock:e=>"near"===e||"bottom"===e?"bottom":"top",getDock:(e,t,n)=>"vertical"===e||"y"===e?ZD.getVerticalDock(t):n?ZD.getOppositeDock(ZD.getHorizontalDock(t)):ZD.getHorizontalDock(t),getInvertedOrientation:e=>"vertical"===e?"horizontal":"vertical",getMinorScaleAxis:e=>"vertical"===e?"y":"x",getMajorScaleAxis:e=>"vertical"===e?"x":"y",getAlignment:(e,t)=>"vertical"===e?"near"===t||"bottom"===t?1:0:"near"===t||"left"===t?0:1,getMeasureScaleInvert:(e,t)=>"vertical"===e||t,getDimensionScaleInvert:(e,t)=>"horizontal"===e&&t,getSize:(e,{width:t,height:n})=>"vertical"===e?t:n};var QD=(e,t)=>{if("function"==typeof t.defaultValue)return t.defaultValue();if(void 0!==t.defaultValue)return t.defaultValue;if(Array.isArray(t.options))return t.options[0].value;switch(e){case"array":return[];case"string":return"";case"integer":case"number":return 0;case"boolean":return!1;default:return null}};const eT=166/26,tT=12/11,nT={stringWidthOverMWidth:e=>(12*Math.min(e,3)+Math.max(e-3,0)*eT)/11,getCharacterRatios(e){if(!e)return{latin:0,cjk:0};let t=e.match(/[\u4E00-\u9FFF]/g),n=e.match(/[\u3040-\u309F]/g),r=e.match(/[\u30A0-\u30FF]/g);t=t?t.length:0,n=n?n.length:0,r=r?r.length:0;const i=t+n+r;return{latin:e.length-i,cjk:i}},getTotalCharacterRatios(e,t,n="qText"){if(!e)return{latinRatio:1,cjkRatio:0};const r={latin:0,cjk:0};let i;void 0===t?e.forEach(e=>{i=nT.getCharacterRatios(e[n]),r.latin+=i.latin,r.cjk+=i.cjk}):e.forEach(e=>{i=nT.getCharacterRatios(e[t][n]),r.latin+=i.latin,r.cjk+=i.cjk});const o=Math.max(1,r.latin+r.cjk);return r.latinRatio=r.latin/o,r.cjkRatio=r.cjk/o,r},getAdjustedMaxGlyphCount(e,t,n,r="qText"){const i=nT.getTotalCharacterRatios(t,n,r),o=i.latinRatio*e,a=i.cjkRatio*e;return Math.ceil(nT.stringWidthOverMWidth(o)+a*tT)}},rT="#la-vie-tooltip";function iT(){if(!document.querySelector(rT)){const e=document.createElement("div");e.id="la-vie-tooltip",e.setAttribute("data-qs-css",""),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 oT({key:e="tooltip",rtl:t}){return{show:!0,key:e,type:"tooltip",layout:{displayOrder:3},beforeMount(){iT()},beforeUpdate(){iT()},destroyed(){!function(){const e=document.querySelector(rT);e&&e.parentElement&&e.childElementCount<1&&e.parentElement.removeChild(e)}()},settings:{appendTo:()=>document.querySelector(rT),content:({h:e,data:t,style:n})=>t[0].map(t=>e("tr",{},function(e,{h:t,style:n}){return e.map(e=>{const r={style:{...n.cell||{},...e.style||{}},class:e.class};return e.colspan&&(r.colspan=e.colspan),t("td",r,e.content)})}(t,{h:e,style:n}))),direction:t?"rtl":"ltr"},style:{arrow:{color:"#404040"},content:{display:"table","border-spacing":"4px",background:"rgba(64, 64, 64, 0.9)",opacity:"1",fontSize:"13px",fontFamily:'"Source Sans Pro", "Arial", "sans-serif"',"empty-cells":"show"},cell:{"max-width":"180px","word-break":"break-word","word-wrap":"break-word","overflow-wrap":"break-word",hyphens:"auto"}}}}const aT=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),sT=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞יִײַ-ﬨשׁ-ﭏ]"),lT=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),cT={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),isLtrChar:e=>aT.test(e),isRtlChar:e=>sT.test(e)||lT.test(e),detectTextDirection(e){const t=e?e.length:0;let n,r;for(n=0;n<t;n++){if(r=e[n],cT.isLtrChar(r))return"ltr";if(cT.isRtlChar(r))return"rtl"}return"ltr"}},uT={getColorSymbol:(e,t)=>e.h("div",{style:{display:"inline-block",width:"10px",height:"10px","background-color":t.color.fill,margin:"0 8px"}}),getNodeFillColor:e=>e.attrs&&void 0!==e.attrs.fill?e.attrs.fill:e.children&&e.children[0]&&e.children[0].attrs&&void 0!==e.children[0].attrs.fill?e.children[0].attrs.fill:void 0,getColor(e,t,n){const r=t.data,i=e.resources.formatter,o=e.resources.dataset,a={};if(n.coloring.label&&(a.label=`${n.coloring.label}`),"color"!==n.coloring.type&&r.fillTooltip){const e=i("fill"),t="measure"===n.coloring.fieldType;if(a.value=t&&e?e(r.fillTooltip.value):r.fillTooltip.label?r.fillTooltip.label:r.fillTooltip.value,!n.coloring.label){const e=o(r.fillTooltip.source.key).field(r.fillTooltip.source.field).title();a.label=`${e}`}}return a.fill=void 0===r._fillColor?uT.getNodeFillColor(t):r._fillColor,a},getMeasure:(e,t)=>({label:`${e(t.source.key).field(t.source.field).title()}`,value:""===t.label||"NaN"===t.label?"-":t.label,field:t.source.field}),hideColorRow:(e,t)=>void 0===e.color.value||e.measures.some(e=>e.field===t.coloring.field),getTitleRow(e,t){const n=cT.detectTextDirection(e.title);return[{content:e.title,style:{"font-weight":"bold","text-align":t?"right":"left",direction:n,"white-space":"pre-wrap"},colspan:2},{}]},getDescriptionRow(e,t){const n=cT.detectTextDirection(e.value);return[{content:e.value,style:{"text-align":t?"right":"left",direction:n,"white-space":"pre-wrap"},colspan:2},{}]},getNMoreRow(e,t,n){const r=t?t.get("Object.ChartTooltip.NMore",e):`+${e} more`;return[{content:r,style:{"font-weight":"bold","text-align":n?"right":"left",direction:cT.detectTextDirection(r)},colspan:2},{}]},getSeparatorRow:()=>[{content:"",style:{"background-image":"linear-gradient(transparent 8px, rgba(255, 255, 255, 0.4) 8px, rgba(255, 255, 255, 0.4) 9.2px, transparent 9.2px)",height:"17px"},colspan:2},{}],getColorRow(e,t,n){const r=cT.detectTextDirection(t.color.label),i=n?[":",t.color.label]:[t.color.label,":"],o=cT.detectTextDirection(t.color.value);return[{content:i,style:{"text-align":n?"right":"left",direction:r}},{content:n?[t.color.value,uT.getColorSymbol(e,t)]:[uT.getColorSymbol(e,t),t.color.value],style:{"text-align":n?"left":"right",direction:o,"vertical-align":"middle"}}]},getMeasureRow(e,t,n,r,i=!1){const o=cT.detectTextDirection(e.label),a=r?[":",e.label]:[e.label,":"],s=cT.detectTextDirection(e.value);let l;return l=i?r?[e.value,uT.getColorSymbol(t,n)]:[uT.getColorSymbol(t,n),e.value]:[e.value],[{content:a,style:{"text-align":r?"right":"left",direction:o}},{content:l,style:{"text-align":r?"left":"right",direction:s,"vertical-align":"middle"}}]}};function dT(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function fT(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function hT(){}var pT=.7,mT=1/pT,gT="\\s*([+-]?\\d+)\\s*",yT="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",vT="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",bT=/^#([0-9a-f]{3,8})$/,xT=new RegExp(`^rgb\\(${gT},${gT},${gT}\\)$`),ST=new RegExp(`^rgb\\(${vT},${vT},${vT}\\)$`),wT=new RegExp(`^rgba\\(${gT},${gT},${gT},${yT}\\)$`),MT=new RegExp(`^rgba\\(${vT},${vT},${vT},${yT}\\)$`),kT=new RegExp(`^hsl\\(${yT},${vT},${vT}\\)$`),CT=new RegExp(`^hsla\\(${yT},${vT},${vT},${yT}\\)$`),qT={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 ET(){return this.rgb().formatHex()}function DT(){return this.rgb().formatRgb()}function TT(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=bT.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?OT(t):3===n?new _T(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?NT(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?NT(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=xT.exec(e))?new _T(t[1],t[2],t[3],1):(t=ST.exec(e))?new _T(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=wT.exec(e))?NT(t[1],t[2],t[3],t[4]):(t=MT.exec(e))?NT(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=kT.exec(e))?FT(t[1],t[2]/100,t[3]/100,1):(t=CT.exec(e))?FT(t[1],t[2]/100,t[3]/100,t[4]):qT.hasOwnProperty(e)?OT(qT[e]):"transparent"===e?new _T(NaN,NaN,NaN,0):null}function OT(e){return new _T(e>>16&255,e>>8&255,255&e,1)}function NT(e,t,n,r){return r<=0&&(e=t=n=NaN),new _T(e,t,n,r)}function AT(e){return e instanceof hT||(e=TT(e)),e?new _T((e=e.rgb()).r,e.g,e.b,e.opacity):new _T}function _T(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function IT(){return`#${zT(this.r)}${zT(this.g)}${zT(this.b)}`}function LT(){const e=PT(this.opacity);return`${1===e?"rgb(":"rgba("}${RT(this.r)}, ${RT(this.g)}, ${RT(this.b)}${1===e?")":`, ${e})`}`}function PT(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function RT(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function zT(e){return((e=RT(e))<16?"0":"")+e.toString(16)}function FT(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new BT(e,t,n,r)}function jT(e){if(e instanceof BT)return new BT(e.h,e.s,e.l,e.opacity);if(e instanceof hT||(e=TT(e)),!e)return new BT;if(e instanceof BT)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 BT(a,s,l,e.opacity)}function BT(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function HT(e){return(e=(e||0)%360)<0?e+360:e}function VT(e){return Math.max(0,Math.min(1,e||0))}function $T(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}dT(hT,TT,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ET,formatHex:ET,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return jT(this).formatHsl()},formatRgb:DT,toString:DT}),dT(_T,function(e,t,n,r){return 1===arguments.length?AT(e):new _T(e,t,n,null==r?1:r)},fT(hT,{brighter(e){return e=null==e?mT:Math.pow(mT,e),new _T(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?pT:Math.pow(pT,e),new _T(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new _T(RT(this.r),RT(this.g),RT(this.b),PT(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:IT,formatHex:IT,formatHex8:function(){return`#${zT(this.r)}${zT(this.g)}${zT(this.b)}${zT(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:LT,toString:LT})),dT(BT,function(e,t,n,r){return 1===arguments.length?jT(e):new BT(e,t,n,null==r?1:r)},fT(hT,{brighter(e){return e=null==e?mT:Math.pow(mT,e),new BT(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?pT:Math.pow(pT,e),new BT(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 _T($T(e>=240?e-240:e+120,i,r),$T(e,i,r),$T(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new BT(HT(this.h),VT(this.s),VT(this.l),PT(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=PT(this.opacity);return`${1===e?"hsl(":"hsla("}${HT(this.h)}, ${100*VT(this.s)}%, ${100*VT(this.l)}%${1===e?")":`, ${e})`}`}}));const WT=Math.PI/180,UT=180/Math.PI,YT=.96422,KT=.82521,GT=4/29,XT=6/29,JT=3*XT*XT,ZT=XT*XT*XT;function QT(e){if(e instanceof eO)return new eO(e.l,e.a,e.b,e.opacity);if(e instanceof aO)return sO(e);e instanceof _T||(e=AT(e));var t,n,r=iO(e.r),i=iO(e.g),o=iO(e.b),a=tO((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?t=n=a:(t=tO((.4360747*r+.3850649*i+.1430804*o)/YT),n=tO((.0139322*r+.0971045*i+.7141733*o)/KT)),new eO(116*a-16,500*(t-a),200*(a-n),e.opacity)}function eO(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function tO(e){return e>ZT?Math.pow(e,1/3):e/JT+GT}function nO(e){return e>XT?e*e*e:JT*(e-GT)}function rO(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function iO(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function oO(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof aO)return new aO(e.h,e.c,e.l,e.opacity);if(e instanceof eO||(e=QT(e)),0===e.a&&0===e.b)return new aO(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*UT;return new aO(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new aO(e,t,n,null==r?1:r)}function aO(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function sO(e){if(isNaN(e.h))return new eO(e.l,0,0,e.opacity);var t=e.h*WT;return new eO(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}dT(eO,function(e,t,n,r){return 1===arguments.length?QT(e):new eO(e,t,n,null==r?1:r)},fT(hT,{brighter(e){return new eO(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new eO(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 _T(rO(3.1338561*(t=YT*nO(t))-1.6168667*(e=1*nO(e))-.4906146*(n=KT*nO(n))),rO(-.9787684*t+1.9161415*e+.033454*n),rO(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),dT(aO,oO,fT(hT,{brighter(e){return new aO(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new aO(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return sO(this).rgb()}}));var lO={isDark:function(e){return oO(e).l<70}};function cO(e){const t=e.qDef;!0===t.autoSort&&t.qSortCriterias.forEach(e=>{e.qSortByNumeric=1,e.qSortByAscii=1})}const uO={horizontal:{major:"width",minor:"height",start:"left",end:"right",shadow:{startOffset:"12px 0",endOffset:"-12px 0"}},vertical:{major:"height",minor:"width",start:"top",end:"bottom",shadow:{startOffset:"0 12px",endOffset:"0 -12px"}}},dO=e=>`${e} 12px -12px inset rgba(0, 0, 0, 0.0625)`;var fO={defaultSettings:{settings:{orientation:"horizontal",rtl:!1,range:()=>[0,1]}},renderer:"dom",render(e){const{range:t,orientation:n,rtl:r}=this.settings.settings,[i,o]=t(),a=Math.abs(i)<1e-15,s=Math.abs(o-1)<1e-15,l=(e=>{const t=uO[e];return{base:{position:"absolute",[t.major]:12,[t.minor]:"100%"},towardsStart:{[t.start]:0,[t.end]:"auto",boxShadow:dO(t.shadow.startOffset)},towardsEnd:{[t.start]:"auto",[t.end]:0,boxShadow:dO(t.shadow.endOffset)}}})(n),c="horizontal"===n&&r,u=[];return a||u.push(e("div",{style:{...l.base,...c?l.towardsEnd:l.towardsStart},class:"scroll-hint--towards-start"})),s||u.push(e("div",{style:{...l.base,...c?l.towardsStart:l.towardsEnd},class:"scroll-hint--towards-end"})),u}};function hO({viewState:e,viewCache:t,layoutService:n,dockService:r,rtl:i}){return!n.meta.isSnapshot&&{key:"scroll-hint",type:"scroll-hint",settings:{orientation:r.meta.major.orientation,rtl:i,range:()=>function({layoutService:e,viewState:t,viewCache:n}){return e.meta.isContinuous?function(e,t){const n=e.get("zoom"),r=t.get("continuousMin"),i=t.get("continuousMax");return[(n.min-r)/(i-r),(n.max-r)/(i-r)]}(t,n):function(e){return e.get("viewRange")}(t)}({layoutService:n,viewState:e,viewCache:t})}}}let pO;function mO(){pO=pO||document.createElement("canvas").getContext("2d")}const gO={measureTextWidth(e){mO();const{width:t}=pO.measureText(e);return t},lineWrap(e,t,n,r){let i,o;mO();const a=e?e.split(/\n+|\r+|\r\n/):[],s=[];let l,c,u,d,f=e?e.split(/\s+/):[],h=a[0];if("number"!=typeof t||t<=0)return[e];if("number"==typeof r&&a.length>=r)return a.slice(0,r);for(n&&(pO.font=n),o=0;o<a.length;o++){for(d=a[o]||"",f=d.split(/\s+/),[h]=f,u="",i=1;i<f.length;i++)if(l=`${h} ${f[i]}`,c=gO.measureTextWidth(l),c>t&&("number"!=typeof r||r>s.length)?(s.push(h),h=f[i]):h=l,"number"==typeof r&&s.length>=r){u=f.slice(i+1).join(" ");break}"number"!=typeof r||s.length<r?s.push(h):s[Math.max(0,s.length-1)]=`${s[Math.max(0,s.length-1)]||""} ${h} ${u}`}return s},wordWrap(e,t,n,r,i){if(mO(),!e||!e.length)return[];n&&(pO.font=n);let o=[];const a=e.slice();let s,l,c,u;if(a.filter(e=>!!e),"number"!=typeof t||t<0)return e.slice();for(u=0;u<a.length;u++)c=a[u],l=null,c&&(c.length<=1||gO.measureTextWidth(c)<=t?o.push(c):(s=gO.splitWord(c,t,void 0,r-o.length),s.length<=1?o.push(s[0]):(l=s.pop(),o=o.concat(s),a[u+1]?gO.measureTextWidth(`${l} ${a[u+1]}`)>t&&o.length+a.length-u<=r?a.splice(u+1,0,l):a[u+1]=`${l} ${a[u+1]}`:a.push(l))));return o.forEach((e,t,n)=>{n[t]=e?e.trim():e}),o.length>r?(o=o.splice(0,r),o[o.length-1]=gO.truncate(o[o.length-1],t,n,i).text):(c=o[o.length-1],c&&c.length>1&&gO.measureTextWidth(c)>t&&(o[o.length-1]=gO.truncate(c,t,n,i).text)),o},truncate(e,t,n,r="…"){mO();let i,o,a,s,l=e;const c=gO.measureTextWidth("i"),u=Math.ceil(t/c);if(n&&(pO.font=n),e&&t){if(gO.measureTextWidth(l)>t){for(i=Math.min(u,l.length);i>0;i--)if(o=l.substring(0,i-1),a=o.trim()+r,gO.measureTextWidth(a)<=t){s=l.substring(i-1),l=a;break}i||(s=l,l="…")}}else s=void 0;return{text:l,rest:s}},isNumber:e=>"number"==typeof e&&Number.isFinite(e),explodeWord(e,t,n,r){let i;mO();let o,a=e,s="",l=[];if(gO.isNumber(n)&&n<=1)return[e];const c=Math.ceil(t/r);for(i=Math.min(e.length,c);i>0&&(a=e.substring(0,i),o=e.substring(i-1,i)," "===o?a=e.substring(0,i-1):a+="-",s=e.substring(i),!(gO.measureTextWidth(a)<=t));i--);return(!i&&!a||gO.measureTextWidth(a)>t)&&(a=e.substring(0,1),s=e.substring(1)),l.push(a),s?(gO.measureTextWidth(s)>t?(s=gO.explodeWord(s,t,n-1,r),l=l.concat(s)):l.push(s),l.filter(e=>""!==e.trim())):l},splitWord:(e,t,n,r)=>(mO(),e&&t?(n&&(pO.font=n),gO.explodeWord(e,t,r,Math.max(1,gO.measureTextWidth("i")))):[]),wrapText(e,t,n,r,i){let o;return Number.isNaN(t)?[e]:(o=r>1?gO.lineWrap(e,t,n,r):[e],o=gO.wordWrap(o,t,n,r,i),o)},getFontHeight:e=>(mO(),e&&(pO.font=e),1.5*gO.measureTextWidth("m")),tokenize(e,t,n,r,i,o,a=1){mO(),t&&(pO.font=t);const s=gO.getFontHeight(),l=a*s;let c=[],u=0,d=[];if(o<s)return[];const f=o?Math.max(1,Math.floor(o/l)):r||1;return Array.isArray(r)?(r.forEach(e=>{u+=Number.isNaN(e)||e<=0?0:e}),r.forEach(e=>{c.push(Number.isNaN(e)||e<=0?f-u:e)})):c=[Number.isNaN(r)||r<=0?f:Math.min(f,r)],Array.isArray(e)?e.forEach((e,n)=>{d.length<f&&(d=d.concat(gO.wrapText(e,i,t,c[n])))}):d=gO.wrapText(e,i,t,c[0],n),d}},yO={getDefaultSettings:({size:e=10,fill:t="#999",alignment:n}={})=>({show:!0,type:"n-polygon",fill:t,stroke:"#000",strokeWidth:0,size:e,sides:3,startAngle:-90,alignment:n}),createOob({oob:e,dockValue:t,boxCenter:n,rendWidth:r,rendHeight:i,flipXY:o,symbol:a}){let s="x",l="y",c=r,u=i,d=t<.5?90:-90;return o&&(s="y",l="x",c=i,u=r,d=t<.5?180:0),a(bg({},e,{[s]:n*c,[l]:Math.max(e.size/2,Math.min(t*u,u-e.size/2)),startAngle:d}))}},vO=bg.bind(null,!0),bO={},{isArray:xO}=Array;function SO(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function wO(e){return void 0===e}function MO(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function kO(e,t){const n=t.substring(1).split("/").slice(0,-1);let r;return n.forEach((t,i)=>{if(i===n.length)return;r=+t;const o=isNaN(r)?{}:[];e[r||t]=wO(e[r||t])?o:e[t],e=e[r||t]}),e}function CO(e,t){return t?Object.keys(e).filter(t=>void 0!==e[t]).length:Object.keys(e).length}function qO(e,t,n){let r=!0;if(SO(e)&&SO(t))return CO(e,n)===CO(t,n)&&(Object.keys(e).forEach(i=>{qO(e[i],t[i],n)||(r=!1)}),r);if(xO(e)&&xO(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r+=1)if(!qO(e[r],t[r],n))return!1;return!0}return e===t}bO.compare=qO,bO.generate=function(e,t,n){n=n||"";let r=[];return Object.keys(t).forEach(i=>{const o=function(e){return e?vO({},{val:e}).val:e}(t[i]),a=e[i],s=`${n}/${i}`;qO(o,a)||MO(t,i)||(wO(a)?r.push({op:"add",path:s,value:o}):SO(o)&&SO(a)?r=r.concat(bO.generate(a,o,s)):xO(o)&&xO(a)?r=r.concat(function(e,t,n){let r=[];const i=e.slice();let o=-1;function a(e,t,n){if(e[n]&&wO(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+=1)if(e[n]&&e[n].qInfo.qId===t)return n;return-1}if(qO(t,i))return r;if(!wO(t[0])&&wO(t[0].qInfo)||0===t.length)return r.push({op:"replace",path:n,value:t}),r;for(let e=i.length-1;e>=0;e-=1)o=a(t,i[e].qInfo&&i[e].qInfo.qId,e),-1===o?(r.push({op:"remove",path:`${n}/${e}`}),i.splice(e,1)):r=r.concat(bO.generate(i[e],t[o],`${n}/${e}`));for(let e=0,s=t.length;e<s;e+=1)o=a(i,t[e].qInfo&&t[e].qInfo.qId),-1===o?(r.push({op:"add",path:`${n}/${e}`,value:t[e]}),i.splice(e,0,t[e])):o!==e&&(r.push({op:"move",path:`${n}/${e}`,from:`${n}/${o}`}),i.splice(e,0,i.splice(o,1)[0]));return r}(a,o,s)):r.push({op:"replace",path:`${n}/${i}`,value:o}))}),Object.keys(e).forEach(i=>{wO(t[i])&&!MO(e,i)&&r.push({op:"remove",path:`${n}/${i}`})}),r},bO.apply=function(e,t){t.forEach(t=>{let n=kO(e,t.path),r=t.path.split("/").splice(-1)[0],i=r&&isNaN(+r)?n[r]:n[+r]||n;const o=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(n=null,i=e),"add"===t.op||"replace"===t.op)if(xO(n))"-"===r&&(r=n.length),n.splice(+r,"add"===t.op?0:1,t.value);else if(xO(i)&&xO(t.value)){const e=t.value.slice();i.length=0,i.push(...e)}else if(SO(i)&&SO(t.value))a=i,Object.keys(a).forEach(e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!MO(a,e)&&delete a[e]}),vO(i,t.value);else{if(!n)throw new Error("Patchee is not an object we can patch");n[r]=t.value}else if("move"===t.op){const i=kO(e,t.from);xO(n)?n.splice(+r,0,i.splice(+o,1)[0]):(n[r]=i[o],delete i[o])}else"remove"===t.op&&(xO(n)?n.splice(+r,1):delete n[r]);var a})},bO.clone=function(e){return vO({},e)},bO.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},bO.updateObject=function(e,t){Object.keys(e).length?bO.apply(e,bO.generate(e,t)):vO(e,t)};const EO=Math.log(10);function DO(e){return 10**e}const TO={pow10:DO,log:(e,t)=>e<=0||t<=0?NaN:Math.log(e)/Math.log(t),log10:e=>e<=0?NaN:Math.log(e)/EO,eliminateFloatingError(e){const t=Math.round(e);return Math.abs(e-t)<1e-12?t:e},getNiceNumber(e){let t;if(0===e)return 0;const n=Math.floor(Math.log(Math.abs(e))/EO),r=e/DO(n);return t=r<=1?1:r<=2?2:r<=5?5:10,t*DO(n)*(e<0?-1:1)},getSmallNiceNumber(e){let t,n;if(0===e)return 0;t=Math.floor(Math.log(Math.abs(e))/EO);const r=e/DO(t);return r<1?(n=5,t--):n=r<2?1:r<5?2:5,n*DO(t)*(e<0?-1:1)},getMagnitude(e){if(0===e)return 0;return DO(Math.floor(Math.log(Math.abs(e))/EO))},getFraction(e){if(0===e)return 0;return e/DO(Math.floor(Math.log(Math.abs(e))/EO))},getGoodNumber(e){let t;if(0===e)return 0;const n=Math.floor(Math.log(Math.abs(e))/EO),r=e/DO(n);return t=Math.ceil(r),7!==t&&9!==t||t++,r>1&&r<=1.5?t=1.5:r>2&&r<=2.5&&(t=2.5),t*DO(n)*(e<0?-1:1)},getValueWithOffset:(e,t=0)=>e+Math.abs(e)*t,isNumber:e=>"number"==typeof e&&!Number.isNaN(e)};const OO={findMinPositiveDistance:function(e){if(e.length<2)return 0;e.sort((e,t)=>e-t);let t=1/0;for(let n=1;n<e.length;n++){const r=e[n]-e[n-1];r>0&&r<t&&(t=r)}return t===1/0?0:t}},NO=[[2,4,6],[2,4],[3]],AO=[,[,,[[1,2]],[[1,2,3],[1,3]],[[1,2,4],[1,4]],[[1,2,4],[1,5]],[[1,2,4,6],[2,4,6],[1,3,6],[1,6]],[[1,2,4,6],[2,4,6],[1,3,6],[1,7]],[[1,2,4,8],[2,4,8],[1,8]],[[1,2,4,8],[2,4,8],[1,3,9],[1,9]],[[1,2,4,6,10],[1,2,4,10],[1,3,10],[3,10],[1,10]]],[,,,[[2,3]],[[2,3,4],[2,4]],[[2,3,4],[2,4],[2,5]],[[2,4,6],[2,6]],[[2,4,6],[2,6],[2,7]],[[2,4,8],[2,8]],[[2,4,8],[2,8],[2,9]],[[2,4,6,10],[2,4,10],[5,10],[3,10]]],[,,,,[[3,4]],[[3,4,5],[3,5]],[[3,4,5,6],[3,6]],[[3,4,5,6],[3,5,7],[3,7]],[[3,4,5,6,8],[3,5,7],[4,8],[3,8]],[[3,4,5,6,8],[3,4,6,9],[3,4,6,8],[3,6,9],[4,8],[3,9]],[[4,6,10],[5,10],[3,10]]],[,,,,,[[4,5]],[[4,5,6],[4,6]],[[4,5,6,7],[4,5,6],[4,6]],[[4,5,6,7,8],[4,5,6,7],[4,6,8],[4,8]],[[4,5,6,7,8],[4,6,9],[4,6,8],[4,8]],[[4,6,10],[5,7,9],[5,10],[4,10]]],[,,,,,,[[5,6]],[[5,6,7],[5,7]],[[5,6,7,8],[5,6,7],[6,8]],[[5,6,7,8,9],[5,6,7,8],[5,7,9],[5,9]],[[6,8,10],[5,10]]],[,,,,,,,[[6,7]],[[6,7,8],[6,8]],[[6,7,8,9],[6,7,8],[6,9]],[[6,7,8,9,10],[6,8,10],[6,10]]],[,,,,,,,,[[7,8]],[[7,8,9],[7,9]],[[7,8,9,10],[8,10],[7,10],[7,9]]],[,,,,,,,,,[[8,9]],[[8,9,10],[8,10]]],[,,,,,,,,,,[[9,10]]]];function _O(e,t,n){const r=e?e.length:0;let i,o=void 0===t?Number.MAX_VALUE:e[0]/t;for(i=1;i<r;i++)o=Math.min(o,e[i]/e[i-1]);void 0!==n&&(o=Math.min(o,n/e[r-1])),e.splice(0,0,o)}function IO(e,t,n){let r;const i=e?e.length:0;for(r=0;r<i;r++)_O(e[r],t,n)}!function(){let e,t;for(IO(NO,1,10),e=0;e<AO.length;e++)if(AO[e])for(t=0;t<AO[e].length;t++)Array.isArray(AO[e][t])&&IO(AO[e][t])}();const LO={isInside(e,t,n,r){if(!r)return!0;const i=e.position-e.radius,o=e.position+e.radius;return i>=t&&o<=n},getCenterDistance:(e,t)=>Math.abs(e.center-t.center),getGap(e,t){const n=e.position<t.position?e:t,r=e.position<t.position?t:e;return r.position-r.radius-(n.position+n.radius)},findSegmentPositionMeetMax(e,t){const n=Math.max(0,e.max-t);return e.center-n},findSegmentPositionMeetMin(e,t){const n=Math.max(0,t-e.min);return e.center+n},findSegmentPositionMeetMinThenMax(e,t,n){const r=LO.findSegmentPositionMeetMin(e,t);return LO.findSegmentPositionMeetMax({center:r,max:r+e.radius},n)},findSegmentPositionMeetMaxThenMin(e,t,n){const r=LO.findSegmentPositionMeetMax(e,n);return LO.findSegmentPositionMeetMin({center:r,min:r-e.radius},t)},layoutPositionFromMin(e,t,n,r=0){const i=e.length-1;let o,a,s=t;for(let t=0;t<i;t++)o=e[t],a=e[t+1],o.position=LO.findSegmentPositionMeetMaxThenMin(o,s,(o.center+a.center-r)/2),s=o.position+o.radius+r/2;a.position=LO.findSegmentPositionMeetMaxThenMin(a,s,n)},adjustPositionFromMax(e,t,n,r=0){const i=e.length-1;let o,a,s;const l=Math.max(0,e[i].position+e[i].radius-n);if(0===l)return;let c,u=0;for(o=i;o>0&&(a=e[o],s=e[o-1],c=Math.max(0,LO.getGap(s,a)-r),c-=Math.max(0,u+c-l),u+=c,a.move=c,!(u>=l));o--);for(u<l&&(c=Math.max(0,s.position-s.radius-t),c-=Math.max(0,u+c-l),u+=c,s.move=c),u=0,o=0;o<=i;o++)a=e[o],u+=a.move||0,a.move=u,a.position-=u},layout(e,t,n,r=0){const i=e.length-1;if(!(i<0)){if(0===i){const r=e[0];return void(r.position=LO.findSegmentPositionMeetMaxThenMin(r,t,n))}LO.layoutPositionFromMin(e,t,n,r),LO.adjustPositionFromMax(e,t,n,r)}}},PO=(e,t,n,r=1)=>{const i=e.bandwidth();return n?"start"===t?i:"end"===t?i*(1-r):i*(2-r)/2:"start"===t?0:"end"===t?i*r:i*r/2},RO=e=>!1!==e.show&&0!==e.show&&"0"!==e.show,zO=e=>e.filter(RO),FO=(e,t)=>zO(WD.getValue(e,t,[])),jO=e=>RO(e)&&(!1!==e.showValue||!1!==e.showLabel),BO=e=>e.filter(jO),HO=(e,t)=>BO(WD.getValue(e,t,[])),VO=({refLineLayout:e,layoutService:t})=>t.meta.canBeContinuous?e.refLineExpr.value:e.refLineExpr.stringValue,$O=(e,t,n)=>{const{dimensionRefLineInfo:r}=t;if(r[e])return r[e][n]},WO=({label:e,dataPages:t})=>{const{qArea:n={}}=t||{},{qTop:r,qHeight:i}=n;return void 0!==r&&void 0!==i&&void 0!==e.valueInfo&&e.valueInfo.maxOrder<r},UO=({label:e,dataPages:t})=>{const{qArea:n={}}=t||{},{qTop:r,qHeight:i}=n;return void 0!==r&&void 0!==i&&void 0!==e.valueInfo&&e.valueInfo.minOrder>=r+i},YO=({value:e,qMin:t})=>"NaN"!==t&&e<t,KO=({value:e,qMax:t})=>"NaN"!==t&&e>t,GO={isRefLineVisible:RO,getVisibleRefLines:zO,getRefLines:FO,getMeasureRefLines:e=>FO(e,"refLine.refLines"),getDimensionRefLines:(e,t)=>t?[]:FO(e,"refLine.dimRefLines"),isRefLineLabelVisible:jO,getVisibleRefLineLabels:BO,getRefLineLabels:HO,getMeasureRefLineLabels:e=>HO(e,"refLine.refLines"),getDimensionRefLineLabels:(e,t)=>t?[]:HO(e,"refLine.dimRefLines"),getScaledPosition:({scale:e,size:t,value:n,valueInfo:r,align:i,invert:o=!1,layoutService:a,isContinuous:s})=>{if(!s){const s=e.pxScale(t);let l;if(a.meta.isGroupedByMeasure)return l=PO(s,i,o,a.meta.groupSize??a.meta.measureCount),s([n,0])+l;if(a.meta.isGroupedByDimension){if(!r)return NaN;const{innerValues:e,numInnerValues:t,minOrder:a}=r;let c;return l=PO(s,i,o,t),e&&e.length&&(c=(({pxScale:e,value:t,innerValues:n,invert:r,minOrder:i})=>{const o=(({pxScale:e,invert:t})=>e.bandwidth()*(t?-1:1))({pxScale:e,invert:r});for(let r=0;r<n.length;r++){const{id:a,order:s}=n[r],l=e([t,a]);if(void 0!==l)return l-o*(s-i)}})({pxScale:s,value:n,innerValues:e,invert:o,minOrder:a})),(void 0===c?s(n):c)+l}return l=PO(s,i,o),s(n)+l}return e(n)},getDimensionValuesInfo:({layout:e,canBeContinuous:t,discreteModel:n,layoutService:r})=>{const{isGroupedByDimension:i}=r.meta,o={},a=WD.getValue(e,"qHyperCube"),s="K"===a.qMode,l=n?n.query.getCurrentDataPage():WD.getValue(a,"S"===a.qMode?"qDataPages.0":"qStackedDataPages.0",[]);if(void 0===l?.qArea?.qTop)return o;const c=s?"qData.0.qSubNodes":"qMatrix",u=WD.getValue(l,c,[]),d=((e,t)=>e?t?"qValue":"qNum":"qText")(t,s),f=(e=>e.qArea.qTop)(l);return s?(()=>{for(let e=0;e<u.length;e++){const t=u[e],n=e+f,r=t[d];o[r]||(o[r]={id:t.qElemNo,qText:t.qText,minOrder:n,maxOrder:n,dataNode:u[e]})}})():i?(()=>{let e;for(let t=0;t<u.length;t++){const n=u[t][0],r=u[t][1],i=t+f,a=n[d];o[a]?(o[a].minOrder=Math.min(o[a].minOrder,i),o[a].maxOrder=Math.max(o[a].maxOrder,i),o[a].innerValues[o[a].innerValues.length]={id:r.qElemNumber,order:i}):o[a]={id:n.qElemNumber,qText:n.qText,minOrder:i,maxOrder:i,innerValues:[{id:r.qElemNumber,order:i}],dataNode:u[t]},0===t?0===i&&(o[a].isMinOrderOk=!0):a!==e&&(o[a].isMinOrderOk=!0,o[e].isMaxOrderOk=!0),e=a}})():(()=>{for(let e=0;e<u.length;e++){const t=u[e][0],n=e+f,r=t[d];o[r]||(o[r]={id:t.qElemNumber,qText:t.qText,minOrder:n,maxOrder:n,dataNode:u[e]})}})(),o},getInputValue:VO,extractInfoFromInputValue:$O,resolveValue:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const r=VO({refLineLayout:e,layoutService:n});return $O(r,t,"id")},isDiscreteMinOutOfBounds:WO,isDiscreteMaxOutOfBounds:UO,isContinuousMinOutOfBounds:YO,isContinuousMaxOutOfBounds:KO,isOutOfRange:({value:e,qMin:t,qMax:n})=>YO({value:e,qMin:t})||KO({value:e,qMax:n}),isOutOfDataPages:({label:e,dataPages:t})=>e.valueInfo.isMinOrderOk&&UO({label:e,dataPages:t})||e.valueInfo.isMaxOrderOk&&WO({label:e,dataPages:t}),getInvert:({orientation:e,rtl:t,isContinuous:n})=>"horizontal"===e?t:n},XO=({label:e,labelStyle:t})=>[e?.fontStyle||t?.fontStyle,e?.fontWeight||t?.fontWeight,e?.fontSize||t?.fontSize,e?.fontFamily||t?.fontFamily].filter(e=>!!e).join(" ");function JO(e){return e.showValue?`… ${e.valueString}`:"…"}function ZO(e,t,n=70){for(let r=0;r<e.length;r++){const i=e[r],o=XO({label:i,labelStyle:t});i.lines=gO.tokenize(i.title,o,JO(i),3,n),i.maxNumLines=i.lines.length}}function QO({title:e,font:t,ellipsis:n,maxNumLines:r=5,maxWidth:i=200}){const o=gO.tokenize(e,t,n,r,i),a=o.length;let s="";if(a){[s]=o;for(let e=1;e<a;e++)s=`${s}\n${o[e]}`}return s}function eN({oobs:e,font:t,ellipsis:n,maxNumLines:r=5,maxWidth:i=200}){const o=e.map(e=>QO({title:e.title,font:t,ellipsis:`${n} ${e.valueString}`,maxNumLines:r,maxWidth:i})),a=o.length;let s="";if(a){[s]=o;for(let e=1;e<a;e++)s=`${s}\n\n${o[e]}`}return s}function tN(e,t="value"){e.sort((e,n)=>e[t]-n[t])}const nN=3,rN=2;function iN({inputValue:e,inputValueLabel:t,localeInfo:n}){if(void 0===e||void 0===t||e.toString()===t)return!1;if(!n)return!0;const r=`+-${n.qDecimalSep||""}${n.qThousandSep||""}`.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&");return t.replace(new RegExp(`[0-9e${r}]`,"g"),"").length>0||function(e){if(e.indexOf("e")>-1)return!1;const t=e.indexOf("-");return-1!==t&&(e.lastIndexOf("-")!==t||0!==t)}(t)}const oN=({label:e,dataPages:t,qMin:n,qMax:r})=>{if(void 0!==n&&void 0!==r){const{inputValue:t}=e;if(GO.isContinuousMaxOutOfBounds({value:t,qMax:r}))return 1;if(GO.isContinuousMinOutOfBounds({value:t,qMin:n}))return-1}return GO.isDiscreteMaxOutOfBounds({label:e,dataPages:t})?1:GO.isDiscreteMinOutOfBounds({label:e,dataPages:t})?-1:0},aN={hasEngineFormat:iN,calculateLabelPositions({labels:e,scale:t,size:n,layoutService:r,orientation:i,rtl:o,isContinuous:a,isDimension:s}){const l=GO.getInvert({orientation:i,rtl:o,isContinuous:a}),c="S"===r.getHyperCubeValue("qMode")?"qDataPages.0":"qStackedDataPages.0",u=r.getHyperCubeValue(c),{canBeContinuous:d}=r.meta;let f,h;if(s&&d){const e=r.getLayoutValue("qHyperCube.qDimensionInfo.0");f=e.qMin,h=e.qMax}for(let i=0;i<e.length;i++){const o=e[i],{value:s,align:c,valueInfo:d}=o,p=oN({label:o,dataPages:u,qMin:f,qMax:h});o.scaledValue=1===p?l?-.1:1.1:-1===p?l?1.1:-.1:GO.getScaledPosition({scale:t,size:n,value:s,valueInfo:d,align:c,invert:l,layoutService:r,isContinuous:a}),o.center=o.scaledValue*n}},getTitle:e=>!1!==e.showValue?!1!==e.showLabel?`${e.text} ${e.valueString}`:e.valueString:!1!==e.showLabel?e.text:"",addLabelTitles({labels:e,formatter:t,isContinuous:n,canBeContinuous:r,localeInfo:i}){let o;if(n)for(let n=0;n<e.length;n++){const r=e[n],{value:a,inputValue:s,inputValueLabel:l}=r;o=iN({inputValue:s,inputValueLabel:l,localeInfo:i})?l:t?t(a):a,r.valueString=`${cT.lrm}(${o})${cT.lrm}`,r.title=aN.getTitle(r)}else if(r)for(let t=0;t<e.length;t++){const n=e[t],{valueText:r,inputValue:a,inputValueLabel:s}=n;o=iN({inputValue:a,inputValueLabel:s,localeInfo:i})?s:r,n.valueString=`${cT.lrm}(${o})${cT.lrm}`,n.title=aN.getTitle(n)}else for(let t=0;t<e.length;t++){const n=e[t];o=n.valueText,n.valueString=`${cT.lrm}(${o})${cT.lrm}`,n.title=aN.getTitle(n)}},measureLabelsWidth(e,t){for(let n=0;n<e.length;n++){const r=e[n];r.totalWidth=t(r.title,r).width}},measureLabelMaxLineWidth(e,t){const n=Math.max(...e.lines.map(n=>t(n,e).width));return n},getMaxTextWidth(e){const t=e.map(e=>e.totalWidth);return Math.max(...t)},addLabelsNeighborInfo(e,t,n,r=0){const i=e.length-1;if(i<0)return;let o,a;if([o]=e,o.cMin=t,0!==i){for(let t=0;t<i;t++)o=e[t],a=e[t+1],o.cMax=(o.center+a.center-r)/2,a.cMin=o.cMax+r;a.cMax=n}else o.cMax=n},getTotalNumLines(e){let t=0;return e.forEach(e=>{t+=e.maxNumLines}),t},reduceLabelsHavingMaxNumLines(e,t,n){const r=t-1,i=e.filter(e=>e.maxNumLines===t),o=Math.min(n,i.length);for(let e=i.length-1;e>=i.length-o;e--)i[e].maxNumLines=r},reduceTotalMaxNumLines(e,t,n){const r=Math.floor(n/t);let i=3;do{const t=aN.getTotalNumLines(e)-r;if(t<=0)return;aN.reduceLabelsHavingMaxNumLines(e,i,t),i--}while(i>1)},reduceMaxNumLines(e,t,n=0){for(let r=0;r<e.length;r++){const i=e[r];i.maxNumLines=Math.max(1,Math.min(i.maxNumLines,Math.floor((Math.max(0,i.cMax-i.cMin)+n)/t)))}},addLabelsSize(e,t,n=15,r){for(let i=0;i<e.length;i++){const o=e[i];o.width=Math.min(t,aN.measureLabelMaxLineWidth(o,r)),o.height=o.lines.length*n}},addLabelSegments(e,t){for(let n=0;n<e.length;n++){const r=e[n],{center:i}=r,o=r[t],a=o/2;r.segment={center:i,range:o,min:i-a,max:i+a,radius:a}}},addLabelsInfo({labels:e,scale:t,majorSize:n,lowerLimit:r,upperLimit:i,gap:o,labelStyle:a,maxLabelWidth:s,lineHeight:l,majorDimension:c,orientation:u,measureText:d,rtl:f,layoutService:h,isContinuous:p,isDimension:m}){const g=e.map(e=>e),y=n;aN.calculateLabelPositions({labels:e,scale:t,size:y,layoutService:h,orientation:u,rtl:f,isContinuous:p,isDimension:m}),tN(e,"center"),aN.addLabelsNeighborInfo(e,r,i,o),ZO(e,a,s),aN.reduceTotalMaxNumLines(g,l,i-(g.length-1)*o),"vertical"===u&&(aN.reduceMaxNumLines(e,l,.05*o),function(e,t,n=70){for(let r=0;r<e.length;r++){const i=e[r],o=XO({label:i,labelStyle:t});i.lines.length>i.maxNumLines&&(i.lines=gO.tokenize(i.title,o,JO(i),i.maxNumLines,n))}}(e,a,s)),aN.addLabelsSize(e,s,l,d),aN.addLabelSegments(e,c)},createLabels({labels:e,style:t,maxLabelWidth:n,areaProps:r,area:i,lineHeight:o=15,font:a}){const{majorAxis:s,minorAxis:l,dock:c}=r,{minorCenter:u}=i,{fontSize:d,fontFamily:f,fontStyle:h,fontWeight:p,textDecoration:m,background:g}=t;let y=[];return e.forEach(e=>{const{lines:t}=e,r=t.length,i=t.map((t,i)=>{const g={type:"text",text:t,title:QO({title:e.title,font:a,ellipsis:JO(e)}),dx:0,dy:0,maxWidth:n,width:n,fontSize:e.fontSize||d,fontFamily:e.fontFamily||f,fontStyle:e.fontStyle||h,fontWeight:e.fontWeight||p,textDecoration:e.textDecoration||m,fill:e.fill,baseline:"central",anchor:"middle",value:e.value,dock:c};return g[l]=u,g[s]=e.segment.position,g.y+=(i-(r-1)/2)*o,g});e.background&&y.push(function({minorCenter:e,majorAxis:t,minorAxis:n,dock:r,label:i,lineHeight:o,background:a}){const{lines:s}=i,{borderRadius:l=nN,padding:c={}}=a,{top:u=rN,bottom:d=rN,left:f=rN,right:h=rN}=c,p=s.length,m={type:"rect",rx:l,ry:l,fill:i.background.fill,width:i.width+(f+h),height:i.height+(u+d),value:i.value,dock:r};return m[n]=e,m[t]=i.segment.position,m.x-=i.width/2+f,m.y-=p*o/2+u,m}({minorCenter:u,majorAxis:s,minorAxis:l,dock:c,label:e,lineHeight:o,background:g})),y=y.concat(i)}),y}};function sN(e,t,n){let r;const i=typeof t;if("string"===i||"object"===i)r=e.formatter(t);else if(void 0!==n&&n.data){const e=n.data()&&n.data().fields;r=e&&e[0]?e[0].formatter():null}return r}function lN(e,t,n){return"top"===e||"bottom"===e?function(e,t){const{lineHeight:n,top:r,bottom:i,maxLabelWidth:o}=t;let a=1;return aN.getMaxTextWidth(e)>o&&(ZO(e,t,o),a=Math.max(...e.map(e=>e.lines.length))),a*n+r+i}(t,n):function(e,t){const{left:n,right:r,maxLabelWidth:i}=t;return Math.min(i,aN.getMaxTextWidth(e))+n+r}(t,n)}function cN(e,t){return t?e.domain():[0,1]}function uN(e,t,n,r="value"){let i=e.filter(e=>e[r]>=t);i=i.filter(e=>e[r]<=n);const o=e.filter(e=>e[r]<t),a=e.filter(e=>e[r]>n);return{filteredLabels:i,minOobs:o,maxOobs:a,numMinOobs:o.length,numMaxOobs:a.length}}function dN(e){let t,n=0;for(let r=1;r<10;r++)t=e(r),n=Math.max(n,Math.sqrt(t.width*t.width+t.height*t.height));return t=e("9+"),[n,Math.max(n,Math.sqrt(t.width*t.width+t.height*t.height))]}function fN(e,t){return e>9?t[1]:t[0]}function hN({alignment:e,dockValue:t,oobs:n,style:r,rect:i,symbol:o,position:a,areaProps:s,radius:l,font:c}){const u=n?n.length:0;if(u<1)return[];const{flipXY:d,majorAxis:f,minorAxis:h,minorDimension:p,dock:m}=s,g=i[p],y=yO.createOob({oob:yO.getDefaultSettings({size:r.size,fill:r.fill,alignment:e}),dockValue:t,boxCenter:.5,rendWidth:i.width,rendHeight:i.height,flipXY:d,symbol:o});y.dock=m;const v=`c${f}`,b=`c${h}`,x={type:"circle",r:l,stroke:"transparent",fill:r.text.background.fill,strokeWidth:0,dock:m};x[b]=g/2,x[v]=a;const S={type:"text",text:u>9?"9+":u,title:eN({oobs:n,font:c,ellipsis:"…"}),dx:0,dy:0,maxWidth:g,width:g,fontSize:r.text.fontSize,fontFamily:r.text.fontFamily,fill:r.text.fill,baseline:"central",anchor:"middle",dock:m};return S[h]=g/2,S[f]=a,[y,x,S]}const pN=e=>{const t=XO({labelStyle:e}),n=gO.getFontHeight(t)*(e.lineHeightMultiplicator||1),r=e.gap||12,i=e.maxWidth||75,o=e.padding.top||0,a=e.padding.bottom||0,s=e.padding.left||0,l=e.padding.right||0;return{...e,font:t,lineHeight:n,gap:r,maxLabelWidth:i,top:o,bottom:a,left:s,right:l}},mN=e=>e.map(e=>({...e,value:"function"==typeof e.value?e.value():e.value,valueText:"function"==typeof e.valueText?e.valueText():e.valueText,valueInfo:"function"==typeof e.valueInfo?e.valueInfo():e.valueInfo}));var gN={require:["renderer","chart","symbol"],defaultSettings:{layout:{displayOrder:0,prioOrder:0}},preferredSize(){const{scale:e}=this,{style:t,layoutService:n,isContinuous:r,localeInfo:i}=this.settings,o=!!r||n.meta.canBeContinuous,a=mN(this.settings.labels),s=sN(this.chart,this.settings.formatter,e);aN.addLabelTitles({labels:a,formatter:s,isContinuous:r,canBeContinuous:o,localeInfo:i});const{numMaxOobs:l,numMinOobs:c,filteredLabels:u}=(({labels:e,scale:t,isContinuous:n,canBeContinuous:r,layoutService:i})=>{if(n){const[r,i]=cN(t,n);return uN(e,r,i)}if(r){const t=i.getLayoutValue("qHyperCube.qDimensionInfo.0"),{qMin:n,qMax:r}=t;if("NaN"!==n&&"NaN"!==r)return uN(e,n,r,"inputValue")}return{filteredLabels:e}})({labels:a,scale:e,isContinuous:r,canBeContinuous:o,layoutService:n});let d;if(this.measureText=(e,n)=>{const{fontSize:r,fontFamily:i,fontWeight:o}=n||{};return this.renderer.measureText({text:e,fontWeight:o||t.label.fontWeight,fontSize:r||t.label.fontSize,fontFamily:i||t.label.fontFamily})},u&&u.length){const e=pN(t.label),{dock:n}=this.settings.layout;return aN.measureLabelsWidth(u,this.measureText),d=lN(n,u,e),d}const f=dN(this.measureText),h=l?fN(l,f):0,p=c?fN(c,f):0;return d=Math.max(h,p),d},render(){const{scale:e}=this;if(!e.domain().length)return;const{symbol:t}=this,{style:n,layoutService:r,theme:i,isContinuous:o,isDimension:a,localeInfo:s}=this.settings,l=!!o||r.meta.canBeContinuous,c=mN(this.settings.labels),{dock:u,rtl:d}=this.settings.layout,{padding:f}=n.label,h=function(e){return"left"===e||"right"===e?(e=>({dock:e,orientation:"vertical",majorAxis:"y",minorAxis:"x",majorDimension:"height",minorDimension:"width",flipXY:!1}))(e):(e=>({dock:e,orientation:"horizontal",majorAxis:"x",minorAxis:"y",majorDimension:"width",minorDimension:"height",flipXY:!0}))(e)}(u),p=function(e,t,n){const r=e[t.minorDimension];return{minorSize:r,majorSize:e[t.majorDimension],minorCenter:"vertical"===t.orientation?(r-n.right-n.left)/2+n.left:(r-n.top-n.bottom)/2+n.top}}(this.rect,h,f),{orientation:m,majorDimension:g}=h,{majorSize:y}=p,v=pN(n.label),{font:b,lineHeight:x,gap:S,maxLabelWidth:w}=v,M=sN(this.chart,this.settings.formatter,e),k=y;aN.addLabelTitles({labels:c,formatter:M,isContinuous:o,canBeContinuous:l,localeInfo:s}),aN.calculateLabelPositions({labels:c,scale:e,size:k,layoutService:r,orientation:m,rtl:d,isContinuous:o,isDimension:a});const[C,q]=cN(e,o),{filteredLabels:E,lowerOobs:D,upperOobs:T,lowerCircleSize:O,upperCircleSize:N,lowerOobSpace:A,upperOobSpace:_}=function({labels:e,minValue:t,maxValue:n,orientation:r,rtl:i,isContinuous:o,style:a,padding:s,measureText:l,prop:c="value"}){const{maxOobs:u,minOobs:d,filteredLabels:f}=uN(e,t,n,c),h="scaledValue"!==c&&GO.getInvert({orientation:r,rtl:i,isContinuous:o}),p=function(e,t,n){return n?t:e}(d,u,h),m=function(e,t,n){return n?e:t}(d,u,h),g=p.length,y=m.length,v=dN(l),b=fN(g,v),x=fN(y,v),S=function(e,t,n,r,i){return("vertical"===r?i.top:i.left)+(e>0?t+n:0)}(g,a.oob.size,b,r,s),w=function(e,t,n,r,i){return("vertical"===r?i.bottom:i.right)+(e>0?t+n:0)}(y,a.oob.size,x,r,s);return{filteredLabels:f,lowerOobs:p,upperOobs:m,lowerCircleSize:b,upperCircleSize:x,lowerOobSpace:S,upperOobSpace:w}}({labels:c,minValue:C,maxValue:q,orientation:m,rtl:d,isContinuous:o,style:n,padding:f,measureText:this.measureText,prop:o?"value":"scaledValue"}),I=A,L=y-_;tN(D),tN(T);const P=hN({alignment:0,dockValue:0,oobs:D,style:n.oob,rect:this.rect,symbol:t,position:n.oob.size+O/2,areaProps:h,radius:O/2,font:b}),R=hN({alignment:1,dockValue:1,oobs:T,style:n.oob,rect:this.rect,symbol:t,position:y-(n.oob.size+N/2),areaProps:h,radius:N/2,font:b});aN.addLabelsInfo({labels:E,scale:e,majorSize:y,lowerLimit:I,upperLimit:L,labelStyle:v,lineHeight:x,gap:S,maxLabelWidth:w,majorDimension:g,orientation:m,measureText:this.measureText,rtl:d,layoutService:r,isContinuous:o,isDimension:a}),LO.layout(E.map(e=>e.segment),I,L,n.label.gap);const z=E.filter(e=>LO.isInside(e.segment,I,L,o));return aN.createLabels({labels:z,style:n.label,maxLabelWidth:w,areaProps:h,area:p,lineHeight:x,font:b,theme:i}).concat([...P,...R])}};var yN={dataRelatedPropertiesPaths:["qHyperCube.qGrandTotalRow","qHyperCube.qHasOtherValues","qHyperCube.qSize","qHyperCube.qDimensionInfo[].qAttrDimInfo","qHyperCube.qDimensionInfo[].qAttrExprInfo","qHyperCube.qDimensionInfo[].qCardinalities","qHyperCube.qDimensionInfo[].qMax","qHyperCube.qDimensionInfo[].qMin","qHyperCube.qDimensionInfo[].qStateCounts","qHyperCube.qMeasureInfo[].qApprMaxGlyphCount","qHyperCube.qMeasureInfo[].qAttrExprInfo","qHyperCube.qMeasureInfo[].qMax","qHyperCube.qMeasureInfo[].qMin","qHyperCube.qMeasureInfo[].qTrendLines","qHyperCube.qTreeNodesOnDim","qSelectionInfo","plugins[].validMeasureValue","plugins[].labelBackgroundColor","plugins[].labelColor","plugins[].hasBackground","plugins[].maxLabelWidth","plugins[].points[].validMeasureValue","plugins[].points[].labelBackgroundColor","plugins[].points[].labelColor","plugins[].points[].hasBackground","plugins[].points[].maxLabelWidth"]};function vN(e){const{qHyperCube:t,...n}=e,{qAxisData:r,qDataPages:i,qStackedDataPages:o,qTreeDataPages:a,...s}=t,l=bg(!0,{},{...n,qHyperCube:{...s}}),{dataRelatedPropertiesPaths:c}=yN;function u(e,t){const n=t.indexOf("[]");if(-1===n)return void(void 0!==Cx(e,t)&&Ex(e,t,void 0));const r=t.substring(0,n),i=t.substring(n+2),o=i.startsWith(".")?i.substring(1):i;Cx(e,r,[]).forEach(e=>{o&&u(e,o)})}return c.forEach(e=>{u(l,e)}),l}var bN={axes:{trackBy:function({isTime:e,isContinuous:t,isMeasure:n,isMajor:r}){return i=>{if(e||t||n){if("line"===i.type)return i.tickValue??"axis";if("text"===i.type)return`${i.tickValue} ${i.text}`;if("container"===i.type){const e=i.children.filter(e=>"text"===e.type).map(e=>e.text);return`${i.data.value} ${e.join("")}`}return Math.random()}if(r){if("line"===i.type&&void 0===i.tickValue)return"axis";const e=i.transform&&i.transform.match(/rotate/gi)?"rotated":"horizontal";return`${i.data.group?`${i.data.group.value} `:""}${i.data.value} ${i.text} ${e}`}return Math.random()}},compensateForLayoutChanges:function({isMeasure:e,isTime:t,isContinuous:n,isHorizontal:r,dock:i}){return({currentNodes:o,currentRect:a,previousRect:s})=>{const l=a.x-s.x,c=a.y-s.y,u=a.width-s.width,d=a.height-s.height;e?("left"===i&&o.forEach(e=>{"line"===e.type?(e.x1+=u,e.x2+=u):"text"===e.type&&(e.x+=u)}),"left"!==i&&"right"!==i||o.forEach(e=>{"line"===e.type&&(e.x1===e.x2?(e.y1=a.y,e.y2=e.y1+a.height):(Math.round(e.y1)<a.y||e.y1>a.y+a.height)&&(e.strokeWidth=0)),"text"===e.type&&(e.y<a.y||e.y>a.y+a.height)&&(e.fontSize="1px","#"===e.fill?.[0]&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`))}),"top"!==i&&"bottom"!==i||o.forEach(e=>{"line"===e.type&&(e.y1===e.y2?(e.x1=a.x,e.x2=e.x1+a.width):(Math.round(e.x1)<a.x||e.x1>a.x+a.width)&&(e.strokeWidth=0)),"text"===e.type&&(e.x<a.x||e.x>a.x+a.width)&&(e.fontSize="1px","#"===e.fill?.[0]&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`))})):t?o.forEach(e=>{"line"===e.type?e.y1===e.y2?e.x2+=u:e.x1===e.x2&&(e.x1-=l,e.x2-=l):"text"===e.type&&(e.x-=l)}):n||r?o.forEach(e=>{"line"===e.type&&e.y1===e.y2&&(e.x1+=l,e.x2+=l+u)}):o.forEach(e=>{"line"===e.type&&e.x1===e.x2&&(e.y1+=c,e.y2+=c+d)})}}},bars:{trackBy:function(e){return e.data.typeIndex?`${e.data.value} ${e.data.typeIndex.value}`:e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:`${e.data.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach(e=>{e.children&&e.children.length>0&&e.children.forEach(e=>{void 0!==e.x&&void 0!==e.y?(e.x-=r,e.y-=i):e.transform=`translate(${-r}, ${-i})`})})}},barOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x;0===t.y-n.y&&0===r||e.forEach(e=>{e.children&&e.children.length>0&&e.children.forEach(e=>{e.opacity=0})})}},labels:{trackBy:function(e){if("rect"===e.type)return"-3"===e.data?Math.random():`${e.type} ${e.data} ${e.rotation}`;const t=e.transform&&e.transform.match(/rotate/gi)?"rotated":"horizontal";return`${e.type} ${e.data} ${e.text} ${t}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach(e=>{e.transform&&e.transform.match(/rotate\(-90/gi)?(e.x+=i,e.y-=r):(e.x-=r,e.y-=i)})},linkData:function(e){return e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:`${e.data.value}`}},lines:{trackBy:function(e){return"line"===e.type?e.value??Math.random():"path"===e.type?`${e.generatorType} ${e.layerObj.id} ${e.data.source.key}`:Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;e.forEach(e=>{if(void 0!==e.x1&&void 0!==e.y1)e.y1===e.y2?(e.x2=e.x1+t.width,e.y1-=i,e.y2-=i):e.x1===e.x2&&(e.y2=e.y1+t.height,e.x1-=r,e.x2-=r);else{const t="x"===e.major.p?r/e.major.size:i/e.major.size,n="y"===e.minor.p?i/e.minor.size:r/e.minor.size;e.points.forEach(e=>{e.modified||(e.major-=t,e.minor-=n,e.minor0-=n,e.modified=!0)})}})}},lineOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x;0===t.y-n.y&&0===r||e.forEach(e=>{e.opacity=0})}},markers:{trackBy:function(e){return e.data.line?`${e.data.line.value} ${e.data.major.value}`:`${e.data.major.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach(e=>{switch(e.type){case"circle":e.cx-=r,e.cy-=i;break;case"rect":e.x-=r,e.y-=i;break;case"path":e.transform=`translate(${-r}, ${-i})`}})}},points:{trackBy:function(e){return e.data.line?`${e.data.line.value} ${e.data.major.value}`:`${e.data.major.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach(e=>{"image"===e.type?(e.x-=r,e.y-=i):(e.cx-=r,e.cy-=i)})}},refLineLabels:{trackBy:function(e){if(void 0!==e.value){if("rect"===e.type)return`${e.value}`;if("text"===e.type)return`${e.value} ${e.text}`}return Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y,o=t.width-n.width,a=t.height-n.height;let s=-r,l=-i;e.forEach(e=>{switch(e.dock){case"right":r>0&&(s=t.width);break;case"left":o<0&&(s=-n.width);break;case"top":a<0&&(l=-n.height);break;case"bottom":i>0&&(l=t.height)}switch(e.type){case"text":case"rect":e.x+=s,e.y+=l;break;case"circle":e.cx+=s,e.cy+=l;break;case"path":e.transform=`translate(${s}, ${l})`}})}},shadowBars:{trackBy:function(){return Math.random()}},cacheProperties:function({viewCache:e,layout:t}){const n=vN(t);e.set("dataIndependentProperties",JSON.stringify(n))},propertiesHaveChanged:function({viewCache:e,layout:t}){const n=vN(t);return e.get("dataIndependentProperties")!==JSON.stringify(n)},nonUpdatingNode:{trackBy:function(){return Math.random()}}};const{getInputValue:xN,extractInfoFromInputValue:SN,resolveValue:wN}=GO;var MN={resolveValue:wN,resolveInnerValues:({refLineLayout:e,refLineModel:t,layoutService:n})=>{if(n.meta.isGroupedByDimension){const r=xN({refLineLayout:e,layoutService:n});return SN(r,t,"innerValues")}},resolveNumInnerValues:({refLineLayout:e,refLineModel:t,layoutService:n})=>{if(n.meta.mode.K)return 0;const r=xN({refLineLayout:e,layoutService:n});return SN(r,t,"numInnerValues")||0},resolveValueText:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const{dimensionValuesInfo:r}=t,{canBeContinuous:i}=n.meta,o=xN({refLineLayout:e,layoutService:n});return r[o]&&i?r[o].qText:o},resolveValueInfo:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const r=xN({refLineLayout:e,layoutService:n}),{dimensionRefLineInfo:i}=t;return i[r]}};function kN({isDimension:e,refLineModel:t={},layoutService:n,colorModel:r,dockService:i,animationsEnabled:o,chart:a,scale:s,axis:l,rtl:c,key:u,mainComponentKey:d,path:f,minimumLayoutMode:h}){const p=e?t.dimensionRefLines:f?t.query.getRefLines(f):t.measureRefLines;if(!p.length)return!1;const m={key:u,type:"ref-line",layout:{minimumLayoutMode:h},lines:{y:[],x:[]},style:{oob:{show:!1}},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}),animations:{enabled:o,trackBy:bN.lines.trackBy,compensateForLayoutChanges:bN.lines.compensateForLayoutChanges}},g=!(!e||"horizontal"!==i.meta.major.orientation||!c),y=!e||n.meta.isContinuous;return p.forEach(o=>{m.lines[l].push((({isDimension:e,refLineLayout:t,refLineModel:n,layoutService:r,colorModel:i,dockService:o,chart:a,scale:s,axis:l,invert:c,component:u,isContinuous:d})=>{const f={dir:l,line:{strokeWidth:t?.style?.lineThickness||2,strokeDasharray:t?.style?.lineType,stroke:i.resolveUIColor(t.paletteColor||{index:t.color})}};return!e||r.meta.isContinuous?(f.scale=s,f.value=t.refLineExpr.value):(f.valueInfo=MN.resolveValueInfo({refLineLayout:t,refLineModel:n,layoutService:r}),f.value=()=>{const e=GO.getScaledPosition({scale:a.scale(s),value:MN.resolveValue({refLineLayout:t,refLineModel:n,layoutService:r}),valueInfo:f.valueInfo,size:a.component(u)?.rect["horizontal"===o.meta.major.orientation?"width":"height"],align:t.align,invert:c,layoutService:r,isContinuous:d});return Number.isNaN(e)?void 0:e}),f})({isDimension:e,refLineLayout:o,refLineModel:t,layoutService:n,colorModel:r,dockService:i,chart:a,scale:s,axis:l,invert:g,component:d,isContinuous:y}))}),m}function CN({isDimension:e,refLineModel:t={},layoutService:n,colorModel:r,animationsEnabled:i,dock:o,scale:a,style:s,formatter:l,theme:c,localeInfo:u,rtl:d,key:f,path:h}){const p=e?t.dimensionRefLineLabels:h?t.query.getRefLineLabels(h):t.measureRefLineLabels;if(!p.length)return[];const m=[],g=!e||n.meta.isContinuous,y=p.map(e=>(({refLineLayout:e,refLineModel:t,layoutService:n,colorModel:r,scale:i,theme:o,isContinuous:a})=>{const s=r.resolveUIColor(e.paletteColor||{index:e.color}),{align:l,style:c}=e,{fontSize:u,fontFamily:d,fontStyle:f,fontWeight:h,textDecoration:p}=c||{},m={align:l,text:e.label,fill:e.coloredBackground?o.getContrastingColorTo(s):s,fontSize:u,fontFamily:d,fontStyle:f,fontWeight:h,textDecoration:p,showValue:!1!==e.showValue,showLabel:!1!==e.showLabel,inputValue:e.refLineExpr.value,inputValueLabel:e.refLineExpr.label};return e.coloredBackground&&(m.background={fill:s}),a?(m.scale=i,m.value=e.refLineExpr.value):(m.value=()=>MN.resolveValue({refLineLayout:e,refLineModel:t,layoutService:n}),m.valueText=()=>MN.resolveValueText({refLineLayout:e,refLineModel:t,layoutService:n}),m.valueInfo=()=>MN.resolveValueInfo({refLineLayout:e,refLineModel:t,layoutService:n})),m})({refLineLayout:e,refLineModel:t,layoutService:n,colorModel:r,scale:a,theme:c,isContinuous:g}));return m.push((({isDimension:e,layoutService:t,animationsEnabled:n,style:r,labels:i,scale:o,formatter:a,dock:s,key:l,rtl:c,theme:u,isContinuous:d,localeInfo:f})=>({key:l,type:"reference-line-labels",renderer:"svg",labels:i,formatter:a,scale:o,layoutService:t,layout:{dock:s,rtl:c},theme:u,isContinuous:d,isDimension:e,localeInfo:f,style:{label:{fontFamily:r.referenceLine.label.name.fontFamily,fontSize:r.referenceLine.label.name.fontSize,fontStyle:r.referenceLine.label.name.fontStyle,fontWeight:r.referenceLine.label.name.fontWeight,textDecoration:r.referenceLine.label.name.textDecoration,padding:{top:2,bottom:2,left:c?2:4,right:c?4:2},background:{padding:{top:1,bottom:1,left:2,right:2}},maxWidth:100,gap:"left"===s||"right"===s?10:16},oob:{size:8,fill:r.referenceLine.outOfBounds.backgroundColor,text:{fontFamily:r.referenceLine.outOfBounds.fontFamily,fontSize:r.referenceLine.outOfBounds.fontSize,fill:r.referenceLine.outOfBounds.color,background:{fill:r.referenceLine.outOfBounds.backgroundColor}}}},animations:{enabled:n,trackBy:bN.refLineLabels.trackBy,compensateForLayoutChanges:bN.refLineLabels.compensateForLayoutChanges}}))({isDimension:e,rtl:d,style:s,dock:o,key:f,labels:y,scale:a,formatter:l,layoutService:n,animationsEnabled:i,theme:c,isContinuous:g,localeInfo:u})),m}function qN({layoutService:e,discreteModel:t}){const{isContinuous:n,canBeContinuous:r,isGroupedByDimension:i}=e.meta,o=e.getLayout(),a="K"===o.qHyperCube.qMode,s=GD.dimensionless(o),l=GO.getMeasureRefLines(o),c=GO.getDimensionRefLines(o,s),u=GO.getMeasureRefLineLabels(o),d=GO.getDimensionRefLineLabels(o,s);let f={},h={};const p=()=>!(!c||!c.length)&&!c.every(t=>{const o=GO.getInputValue({refLineLayout:t,layoutService:e});return(t=>{if(r){const n=e.getLayoutValue("qHyperCube.qDimensionInfo.0"),{qMin:r,qMax:i}=n;return GO.isOutOfRange({value:t,qMin:r,qMax:i})}return!1})(o)||(t=>{if(!h[t])return!1;if(!n&&i){const n={valueInfo:h[t]},r="S"===e.getHyperCubeValue("qMode")?"qDataPages.0":"qStackedDataPages.0",i=e.getHyperCubeValue(r);return GO.isOutOfDataPages({label:n,dataPages:i})}return!0})(o)}),m={isKMode:a,canBeContinuous:r,measureRefLines:l,dimensionRefLines:c,measureRefLineLabels:u,dimensionRefLineLabels:d,dimensionRefLineInfo:h,dimensionValuesInfo:f,query:{getRefLines:e=>GO.getRefLines(o,e),getRefLineLabels:e=>GO.getRefLineLabels(o,e)},update:()=>{h=m.dimensionRefLineInfo,p()&&(f=GO.getDimensionValuesInfo({layout:o,canBeContinuous:r,discreteModel:t,layoutService:e}),m.dimensionValuesInfo=f,c.forEach(t=>{const n=GO.getInputValue({refLineLayout:t,layoutService:e});f[n]&&(h[n]?(h[n].innerValues=f[n].innerValues,h[n].minOrder=Math.min(h[n].minOrder,f[n].minOrder),h[n].maxOrder=Math.max(h[n].maxOrder,f[n].maxOrder),h[n].isMinOrderOk=h[n].isMinOrderOk||f[n].isMinOrderOk,h[n].isMaxOrderOk=h[n].isMaxOrderOk||f[n].isMaxOrderOk):h[n]={id:f[n].id,qText:f[n].qText,innerValues:f[n].innerValues,minOrder:f[n].minOrder,maxOrder:f[n].maxOrder,isMinOrderOk:f[n].isMinOrderOk,isMaxOrderOk:f[n].isMaxOrderOk},h[n].numInnerValues=(h[n].maxOrder||0)-(h[n].minOrder||0)+1)}))}};return m.update(),m}const EN={combineBounds(e){let t=Number.MAX_VALUE,n=-Number.MAX_VALUE,r=Number.MAX_VALUE,i=-Number.MAX_VALUE;return e.forEach(e=>{e&&(t=Math.min(t,e.x,e.x+e.width),n=Math.max(n,e.x,e.x+e.width),r=Math.min(r,e.y,e.y+e.height),i=Math.max(i,e.y,e.y+e.height))}),{x:t,y:r,width:n-t,height:i-r}}};function DN(e,t=!1){const n=t?"IM_5791_SVG_LABEL_RENDERING":"IM_4962_SVG_CHART_LABELS";if(e?.isEnabled(n))return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?void 0:"svg"}const TN={ref:null,refFn:e=>{const t=e.qHyperCubeDef.qMeasures?.findIndex(e=>"colorByExpression"===e.qAttributeExpressions?.[0]?.id);return`qHyperCubeDef.qMeasures.${-1===t?0:t}.qAttributeExpressions.0.qExpression`},change(e){const t=e.qHyperCubeDef?.qMeasures?.findIndex(e=>"colorByExpression"===e.qAttributeExpressions?.[0]?.id),n=WD.getValue(e,`qHyperCubeDef.qMeasures.${-1===t?0:t}.qAttributeExpressions.0`),r=WD.getValue(e,"color");n&&(n.id="colorByExpression",r&&(r.colorExpression=n.qExpression))}};function ON({color:e,colorModel:t}){if(!e)return;const n=t.resolveUIColor(e);if("none"===n)return"transparent";const r=ny(n);return r.setAlpha(e?.alpha>=0?e.alpha:1),r.isInvalid()?void 0:r.getRGBA()}function NN({point:e,dimensionValueInfo:t,layoutService:n}){const{dimensionValue:r}=e,i=""===e.measureValue?void 0:+e.measureValue;if(TO.isNumber(i))return i;const{dimensionCount:o,measureCount:a}=n.meta;if(2===o)return 0;const s=e.measureIndex?+e.measureIndex:0;return TO.isNumber(s)&&!(s>=a||0===o)&&1===o?t[r]?.dataNode[s+1]?.qNum:void 0}const AN={index:-1,color:"#595959"};function _N({chart:e,chartModel:t,discreteModel:n,colorService:r,themeService:i,layoutService:o,dockService:a,rtl:s,majorScale:l,minorScale:c,mainComponentKey:u,data:d,key:f}){if(!Array.isArray(d)||0===d.length)return!1;const h={resolveUIColor:r.getMain().getPaletteColor},p=i.getTheme(),m="horizontal"===a.meta.major.orientation,g=!(!m||!s),{canBeContinuous:y,isContinuous:v,isButterfly:b}=o.meta,x=o.getLayout(),S=function({layout:e,colorModel:t}){const n=e?.components?.find(e=>"general"===e.key);if(n?.bgColor?.useColorExpression){const e=ny(n?.bgColor?.colorExpression);return e.isInvalid()?void 0:e.getRGBA()}const r=n?.bgColor?.color;return ON({color:r,colorModel:t})}({layout:x,colorModel:h})??p.getStyle("object","","backgroundColor"),w=GO.getDimensionValuesInfo({layout:x,canBeContinuous:y,discreteModel:n,layoutService:o}),M=v?d:d.filter(e=>!!w[e.dimensionValue]),k={},C=M.map(e=>e.dimensionValue);C.forEach(e=>{w[e]&&(k[e]?(k[e].innerValues=w[e].innerValues,k[e].minOrder=Math.min(k[e].minOrder,w[e].minOrder),k[e].maxOrder=Math.max(k[e].maxOrder,w[e].maxOrder),k[e].isMinOrderOk=k[e].isMinOrderOk||w[e].isMinOrderOk,k[e].isMaxOrderOk=k[e].isMaxOrderOk||w[e].isMaxOrderOk):k[e]={id:w[e].id,dataNode:w[e].dataNode,qText:w[e].qText,innerValues:w[e].innerValues,minOrder:w[e].minOrder,maxOrder:w[e].maxOrder,isMinOrderOk:w[e].isMinOrderOk,isMaxOrderOk:w[e].isMaxOrderOk},k[e].numInnerValues=(k[e].maxOrder||0)-(k[e].minOrder||0)+1)}),M.forEach(e=>{const t=NN({point:e,dimensionValueInfo:k,layoutService:o});if(e.validMeasureValue=b&&1===e.measureIndex?-t:t,o?.meta?.isStacked){const t=k[e.dimensionValue]?.dataNode;if(Array.isArray(t)&&void 0!==e.measureIndex){const n=t.slice(0,e.measureIndex+2),r=t[e.measureIndex+1]?.qNum;if("number"==typeof r&&0!==r){const t=Math.sign(r);e.validMeasureValue=n.reduce((e,n)=>{const r=n.qNum;return"number"==typeof r&&Math.sign(r)===t?e+r:e},0)}}}const n=ON({colorModel:h,color:e.style?.label?.color||AN}),r=!!e.style?.label?.coloredBackground;e.labelBackgroundColor=r?n:void 0,e.labelColor=r?i.getTheme().getContrastingColorTo(n):n,e.hasBackground=r,e.maxLabelWidth=100});const q={scale:l,fn:({datum:t})=>{const n=e.scale(l),r=t.value.dimensionValue;if(v)return n("string"==typeof r?""===r?void 0:+r:r);if(void 0===k[r])return;return GO.getScaledPosition({scale:n,value:k[r].id,valueInfo:k[r],size:e.component(u)?.rect[m?"width":"height"],align:"center",invert:g,layoutService:o,isContinuous:v})}},E={scale:c,fn:({datum:e,scale:t})=>t(e.value.validMeasureValue)},D={key:f,type:"point",data:M,settings:{x:m?q:E,y:m?E:q,strokeWidth:({datum:e})=>e.value.style?.lineThickness??3,stroke:({datum:e})=>ON({colorModel:h,color:e.value.style?.lineColor?.color?e.value.style?.lineColor:{index:-1,color:"#000"}}),fill:({datum:e})=>e.value.style?.fill?.color?ON({colorModel:h,color:e.value.style?.fill}):S,size:({datum:e})=>`${e.value.style?.dataPointSize??10}px`,shape:({datum:e})=>e.value.style?.symbol||"circle"},animations:{enabled:t.query.animationsEnabled,trackBy:e=>e.data.value.cId,compensateForLayoutChanges:bN.points.compensateForLayoutChanges}};return D}const IN=e=>e?.qHyperCube?.qDimensionInfo?.filter(e=>7005!==e.qError?.qErrorCode).length||0,LN=!0,PN=!1,RN={index:0,color:"none"},zN={index:-1,color:"#595959"},FN={index:-1,color:"#595959"},jN=e=>{!e.dimensionValue?.qValueExpression&&e.dimensionValue?.qStringExpression&&(e.dimensionValue.qValueExpression=e.dimensionValue.qStringExpression,delete e.dimensionValue.qStringExpression)},BN=e=>{e.dimensionValue?.qValueExpression&&!e.dimensionValue?.qStringExpression&&(e.dimensionValue.qStringExpression=e.dimensionValue.qValueExpression,delete e.dimensionValue.qValueExpression)},HN=e=>{switch(e.type){case"image":break;case"point":delete e.points,delete e.style?.lineType,delete e.showPoints,delete e.style?.lineCurve;break;case"line":delete e.dimensionValue,delete e.measureValue,delete e.measureIndex,delete e.style?.dataPointSize,delete e.style?.fill,delete e.style?.symbol,delete e.style?.label;break;default:delete e.points,delete e.dimensionValue,delete e.measureValue,delete e.measureIndex,delete e.style?.lineType,delete e.style?.lineThickness,delete e.style?.lineColor,delete e.style?.dataPointSize,delete e.style?.fill}},VN=({translator:e})=>({label:{ref:"label.value",translation:"Common.Label",component:"string",expression:"optional",defaultValue:""},dimensionNumberValue:{ref:"dimensionValue",translation:"properties.dimensionReferenceLines.dimensionValue",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:0,show:(e,t,n)=>HD.canBeContinuous(n.layout)},dimensionStringValue:{ref:"dimensionValue",translation:"properties.dimensionReferenceLines.dimensionValue",component:"string",expression:"optional",defaultValue:"",show:(e,t,n)=>!HD.canBeContinuous(n.layout)},measureInputType:{type:"number",component:"dropdown",translation:"properties.plugins.measureInputType",show:(e,t,n)=>1===IN(n.layout),convertFunctions:{get:(e,t,n,r)=>void 0===r.measureValue?1:0,set(e,t,n,r,i){0===e?(i.measureValue=0,delete i.measureIndex):(i.measureIndex=0,delete i.measureValue)}},options:[{value:0,translation:e.get("properties.plugins.measureInputType.measureValue")},{value:1,translation:e.get("properties.plugins.measureInputType.measureIndex")}]},measureValue:{ref:"measureValue",translation:"properties.plugins.measureInputType.measureValue",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:0,schemaIgnore:!0,show:(e,t,n)=>void 0!==e.measureValue||2===IN(n.layout)},measureIndex:{ref:"measureIndex",translation:"properties.plugins.measureInputType.measureIndex",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:0,show:(e,t,n)=>void 0===e.measureValue&&1===IN(n.layout),invalid:(e,t,n)=>e.measureIndex<0||e.measureIndex>=(e=>e?.qHyperCube?.qMeasureInfo?.filter(e=>7005!==e.qError?.qErrorCode).length||0)(n.layout)}}),$N=()=>({symbol:{type:"string",component:"dropdown",ref:"style.symbol",translation:"Object.GridChart.Symbol",options:[{value:"circle",translation:"Object.GridChart.Symbol.Circle"},{value:"cross",translation:"Object.GridChart.Symbol.Cross"},{value:"diamond",translation:"Object.GridChart.Symbol.Diamond"},{value:"saltire",translation:"Object.GridChart.Symbol.Saltire"},{value:"square",translation:"Object.GridChart.Symbol.Square"},{value:"star",translation:"Object.GridChart.Symbol.Star"},{value:"triangle",translation:"Object.GridChart.Symbol.Triangle"}]},labelPlacement:{type:"string",component:"dropdown",ref:"label.placement",translation:"geo.properties.labelPosition",options:[{value:"auto",translation:"properties.axis.displaymode.auto"},{value:"top",translation:"geo.properties.labelPosition.above"},{value:"bottom",translation:"geo.properties.labelPosition.below"}]},fillColor:{ref:"style.fill",translation:"properties.distributionPlot.pointColor",type:"object",component:"color-picker",disableNone:PN,showAlpha:LN,defaultValue:RN},lineColor:{ref:"style.lineColor",translation:"LayerStyleEditor.style.strokeColor",type:"object",component:"color-picker",disableNone:PN,showAlpha:LN,defaultValue:zN},labelColor:{ref:"style.label.color",translation:"properties.plugins.label.color",type:"object",component:"color-picker",disableNone:PN,showAlpha:LN,defaultValue:FN},colorBackground:{ref:"style.label.coloredBackground",translation:"properties.referenceLines.coloredBackground",type:"boolean",defaultValue:!1,show:!0},lineThickness:{component:"slider",type:"number",expression:"optional",ref:"style.lineThickness",translation:"LayerStyleEditor.style.strokeWidth",show:!0,defaultValue:3,min:1,max:6,step:1},dataPointSize:{component:"slider",type:"number",expression:"optional",ref:"style.dataPointSize",translation:"LayerStyleEditor.style.dataPointSize",show:!0,defaultValue:10,min:3,max:30,step:1}}),WN=({translator:e,pluginOptions:t})=>{const n={type:"array",ref:"plugins",filter:e=>e.filter(e=>["point","line"].includes(e.type)),translation:"properties.shapes",show:e=>(e?.qHyperCubeDef?.qDimensions||[]).length>0,itemTitleRef:e=>t.filter(t=>t.value===e.type)[0].translation+(e.label?.value?`: ${e.label.value}`:""),allowAdd:!0,allowRemove:!0,allowMove:!0,allowDuplicate:!0,dialog:{ref:"type",options:t},add(e,t){void 0===t.plugins&&(t.plugins=[]),HN(e)},addTranslation:"properties.shapes.addShape",globalChange:(e,t,n)=>{e.plugins&&(e.plugins.forEach(HN),HD.canBeContinuous(n.layout)?e.plugins.forEach(e=>{switch(e.type){case"point":jN(e);break;case"line":(e=>{e.points?.forEach(jN)})(e)}}):e.plugins.forEach(e=>{switch(e.type){case"point":BN(e);break;case"line":(e=>{e.points?.forEach(BN)})(e)}}))},items:{point:{component:"items",show:e=>"point"===e.type,items:{dataSection:{component:"items",items:VN({translator:e})},styleSection:{component:"items",items:$N()}}},line:{type:"items",show:e=>"line"===e.type,items:{dataSection:{component:"items",items:{label:{ref:"label.value",translation:"Common.Label",component:"string",expression:"optional",defaultValue:""},points:{type:"array",ref:"points",titleTranslation:"properties.plugins.Points",itemTitleRef:(t,n)=>e.get("properties.plugins.Points.Point",n+1)+(t.label?.value?`: ${t.label.value}`:""),allowAdd:!0,allowRemove:!0,allowMove:!0,allowDuplicate:!0,addTranslation:"properties.plugins.Points.addPoint",items:{dataSection:{component:"items",items:VN({translator:e})},styleSection:{component:"items",items:$N(),show:(e,t,n)=>{const r=((e,t)=>{if(!t)return null;for(let n=0;n<t.length;n+=1)if("line"===t[n].type&&t[n].points.includes(e))return t[n];return null})(e,n.properties.plugins);return r?.showPoints}}}}}},styleSection:{component:"items",items:{lineColor:{ref:"style.lineColor",translation:"Object.Table.Representation.MiniChart.Colors.Line",type:"object",component:"color-picker",disableNone:PN,showAlpha:LN,defaultValue:zN},lineThickness:{component:"slider",type:"number",expression:"optional",ref:"style.lineThickness",translation:"LayerStyleEditor.style.lineThickness",show:!0,defaultValue:2,min:1,max:6,step:1},lineType:{component:"dropdown",type:"string",expression:"optional",ref:"style.lineType",translation:"LayerStyleEditor.style.lineType",show:!0,defaultValue:"",options:[{value:"",translation:"LayerStyleEditor.style.solid"},{value:"8 4",translation:"LayerStyleEditor.style.dashed"}],convertFunctions:{get(e,t){const n=e(t.type);return void 0===n||""===n?"":"8 4"}}},lineCurve:{translation:"LayerStyleEditor.style.lineCurve",type:"string",ref:"style.lineCurve",component:"dropdown",defaultValue:"linear",expression:"optional",options:[{value:"linear",translation:"LayerStyleEditor.style.linear"},{value:"monotone",translation:"LayerStyleEditor.style.monotone"}]}}},showPoints:{ref:"showPoints",translation:"properties.dataPoints.showDataPoints",type:"boolean",defaultValue:!1}}}}};return n};var UN=class e{constructor(e,t){this._key=e,this._value=t}getKey(){return this._key}getValue(){return this._value}equals(t){return t instanceof e&&(this._key===t._key&&this._value===t._value)}static newInstanceIfNeeded(){let t,n,r=arguments[0];return"string"==typeof arguments[1]?(t=arguments[1],n=r.length):(n=arguments[1],t=arguments[2]),t&&r?(r.length>n&&(r=r.substr(0,n)),new e(r,t)):null}},YN=class e{setValue(e){this._nextMap=null,this._value=e}getNextNode(e){return this._nextMap?this._nextMap[e]:null}put(t,n,r){let i,o;if(t.length===n)return o=this._value,this.setValue(r),o;const a=t.charAt(n);return this._nextMap?(i=this._nextMap[a],i||(i=new e,this._nextMap[a]=i)):(this._nextMap={},i=new e,this._nextMap[a]=i),i.put(t,n+1,r)}get(e,t){if(e.length<=t)return this._value;const n=this.getNextNode(e.charAt(t));return n?n.get(e,t+1):null}getLongestMatch(e,t){if(e.length<=t)return UN.newInstanceIfNeeded(e,this._value);const n=this.getNextNode(e.charAt(t));if(!n)return UN.newInstanceIfNeeded(e,t,this._value);const r=n.getLongestMatch(e,t+1);return r||UN.newInstanceIfNeeded(e,t,this._value)}},KN=class{constructor(){this.clear()}getLongestMatch(e){return this.root&&e?this.root.getLongestMatch(e,0):null}getMaxKeyLength(){return this.maxKeyLen}clear(){this.root=null,this.maxKeyLen=0,this.size=0}put(e,t){this.root||(this.root=new YN);const n=this.root.put(e,0,t);return n||(e.length>this.maxKeyLen&&(this.maxKeyLen=e.length),this.size++,null)}};(()=>{const e=[],t=[],n=new KN;let r,i,o;for(r in e["""]="34",e["&"]="38",e["<"]="60",e[">"]="62",e[" "]="160",e["¡"]="161",e["¢"]="162",e["£"]="163",e["¤"]="164",e["¥"]="165",e["¦"]="166",e["§"]="167",e["¨"]="168",e["©"]="169",e["ª"]="170",e["«"]="171",e["¬"]="172",e["­"]="173",e["®"]="174",e["¯"]="175",e["°"]="176",e["±"]="177",e["²"]="178",e["³"]="179",e["´"]="180",e["µ"]="181",e["¶"]="182",e["·"]="183",e["¸"]="184",e["¹"]="185",e["º"]="186",e["»"]="187",e["¼"]="188",e["½"]="189",e["¾"]="190",e["¿"]="191",e["À"]="192",e["Á"]="193",e["Â"]="194",e["Ã"]="195",e["Ä"]="196",e["Å"]="197",e["Æ"]="198",e["Ç"]="199",e["È"]="200",e["É"]="201",e["Ê"]="202",e["Ë"]="203",e["Ì"]="204",e["Í"]="205",e["Î"]="206",e["Ï"]="207",e["Ð"]="208",e["Ñ"]="209",e["Ò"]="210",e["Ó"]="211",e["Ô"]="212",e["Õ"]="213",e["Ö"]="214",e["×"]="215",e["Ø"]="216",e["Ù"]="217",e["Ú"]="218",e["Û"]="219",e["Ü"]="220",e["Ý"]="221",e["Þ"]="222",e["ß"]="223",e["à"]="224",e["á"]="225",e["â"]="226",e["ã"]="227",e["ä"]="228",e["å"]="229",e["æ"]="230",e["ç"]="231",e["è"]="232",e["é"]="233",e["ê"]="234",e["ë"]="235",e["ì"]="236",e["í"]="237",e["î"]="238",e["ï"]="239",e["ð"]="240",e["ñ"]="241",e["ò"]="242",e["ó"]="243",e["ô"]="244",e["õ"]="245",e["ö"]="246",e["÷"]="247",e["ø"]="248",e["ù"]="249",e["ú"]="250",e["û"]="251",e["ü"]="252",e["ý"]="253",e["þ"]="254",e["ÿ"]="255",e["&OElig"]="338",e["&oelig"]="339",e["&Scaron"]="352",e["&scaron"]="353",e["&Yuml"]="376",e["&fnof"]="402",e["&circ"]="710",e["&tilde"]="732",e["&Alpha"]="913",e["&Beta"]="914",e["&Gamma"]="915",e["&Delta"]="916",e["&Epsilon"]="917",e["&Zeta"]="918",e["&Eta"]="919",e["&Theta"]="920",e["&Iota"]="921",e["&Kappa"]="922",e["&Lambda"]="923",e["&Mu"]="924",e["&Nu"]="925",e["&Xi"]="926",e["&Omicron"]="927",e["&Pi"]="928",e["&Rho"]="929",e["&Sigma"]="931",e["&Tau"]="932",e["&Upsilon"]="933",e["&Phi"]="934",e["&Chi"]="935",e["&Psi"]="936",e["&Omega"]="937",e["&alpha"]="945",e["&beta"]="946",e["&gamma"]="947",e["&delta"]="948",e["&epsilon"]="949",e["&zeta"]="950",e["&eta"]="951",e["&theta"]="952",e["&iota"]="953",e["&kappa"]="954",e["&lambda"]="955",e["&mu"]="956",e["&nu"]="957",e["&xi"]="958",e["&omicron"]="959",e["&pi"]="960",e["&rho"]="961",e["&sigmaf"]="962",e["&sigma"]="963",e["&tau"]="964",e["&upsilon"]="965",e["&phi"]="966",e["&chi"]="967",e["&psi"]="968",e["&omega"]="969",e["&thetasym"]="977",e["&upsih"]="978",e["&piv"]="982",e["&ensp"]="8194",e["&emsp"]="8195",e["&thinsp"]="8201",e["&zwnj"]="8204",e["&zwj"]="8205",e["&lrm"]="8206",e["&rlm"]="8207",e["&ndash"]="8211",e["&mdash"]="8212",e["&lsquo"]="8216",e["&rsquo"]="8217",e["&sbquo"]="8218",e["&ldquo"]="8220",e["&rdquo"]="8221",e["&bdquo"]="8222",e["&dagger"]="8224",e["&Dagger"]="8225",e["&bull"]="8226",e["&hellip"]="8230",e["&permil"]="8240",e["&prime"]="8242",e["&Prime"]="8243",e["&lsaquo"]="8249",e["&rsaquo"]="8250",e["&oline"]="8254",e["&frasl"]="8260",e["&euro"]="8364",e["&image"]="8365",e["&weierp"]="8472",e["&real"]="8476",e["&trade"]="8482",e["&alefsym"]="8501",e["&larr"]="8592",e["&uarr"]="8593",e["&rarr"]="8594",e["&darr"]="8595",e["&harr"]="8596",e["&crarr"]="8629",e["&lArr"]="8656",e["&uArr"]="8657",e["&rArr"]="8658",e["&dArr"]="8659",e["&hArr"]="8660",e["&forall"]="8704",e["&part"]="8706",e["&exist"]="8707",e["&empty"]="8709",e["&nabla"]="8711",e["&isin"]="8712",e["¬in"]="8713",e["&ni"]="8715",e["&prod"]="8719",e["&sum"]="8721",e["&minus"]="8722",e["&lowast"]="8727",e["&radic"]="8730",e["&prop"]="8733",e["&infin"]="8734",e["&ang"]="8736",e["&and"]="8743",e["&or"]="8744",e["&cap"]="8745",e["&cup"]="8746",e["&int"]="8747",e["&there4"]="8756",e["&sim"]="8764",e["&cong"]="8773",e["&asymp"]="8776",e["&ne"]="8800",e["&equiv"]="8801",e["&le"]="8804",e["&ge"]="8805",e["&sub"]="8834",e["&sup"]="8835",e["&nsub"]="8836",e["&sube"]="8838",e["&supe"]="8839",e["&oplus"]="8853",e["&otimes"]="8855",e["&perp"]="8869",e["&sdot"]="8901",e["&lceil"]="8968",e["&rceil"]="8969",e["&lfloor"]="8970",e["&rfloor"]="8971",e["&lang"]="9001",e["&rang"]="9002",e["&loz"]="9674",e["&spades"]="9824",e["&clubs"]="9827",e["&hearts"]="9829",e["&diams"]="9830",e)"function"!=typeof e[r]&&e.hasOwnProperty(r)&&(t[e[r]]=r);for(i in t)"function"!=typeof t[i]&&t.hasOwnProperty(i)&&(o=t[i].toLowerCase().substr(1),n.put(o,String.fromCharCode(i)))})(),"undefined"!=typeof document&&document.createElement("div");for(let e=0;e<255;e++)e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e.toString(16);var GN={ATTRIBUTE:{FIRST_DIMENSION_DIFF:"firstDimensionDiff"},UNIT_MULTIPLIER:1,UNIT:{AUTO:"auto",SECONDS:"seconds",MINUTES:"minutes",HOURS:"hours",DAYS:"days",WEEKS:"weeks",MONTHS:"months",YEARS:"years",NUMBER:"number",NONE:"none"}};const XN="cao.fieldPicker.tab.period",JN={TITLE:"properties.forecast.stepSize.label",AUTO:"properties.axis.displaymode.auto",SECONDS:"properties.forecast.stepUnit.seconds",MINUTES:"properties.forecast.stepUnit.minutes",HOURS:"properties.forecast.stepUnit.hours",DAYS:"properties.forecast.stepUnit.days",WEEKS:"properties.forecast.stepUnit.weeks",MONTHS:"properties.forecast.stepUnit.months",YEARS:"properties.forecast.stepUnit.years",NUMBER:"properties.forecast.stepUnit.number",NONE:"properties.scrollbar.none"},ZN=(e,t,n)=>GD.continuous({layout:n.layout,properties:n.properties}),QN=(e,t,n)=>{const r=e?.qHyperCubeDef?.qDimensions?.[0]?.qDef?.unit;return ZN(0,0,n)&&r&&"none"!==r},{FIRST_DIMENSION_DIFF:eA}=GN.ATTRIBUTE,tA=(e,t,n)=>{const r=e?.qHyperCubeDef?.qDimensions?.[0];if(r)if(GD.continuous({layout:n.layout,properties:n.properties})&&"auto"===r.unit){const e=r.qAttributeExpressions||[],t=e.find(e=>e.id===eA),n="Min(Aggr(If(RowNo() > 1, [$(=GetObjectField(0))] - Above([$(=GetObjectField(0))]), Null()),([$(=GetObjectField(0))], (Numeric, Ascending))))";t?(t.qExpression="",t.qLabelExpression=n,r.qAttribute=!0):(e.push({id:eA,qExpression:"",qLabelExpression:n,qAttribute:!0}),r.qAttributeExpressions=e)}else{const e=r.qAttributeExpressions||[],t=e.findIndex(e=>e.id===eA);-1!==t&&(e.splice(t,1),r.qAttributeExpressions=e)}},{UNIT:nA,UNIT_MULTIPLIER:rA}=GN;const iA={MINI_CHART:{value:"miniChart",translation:"properties.scrollbar.miniChart"},BAR:{value:"bar",translation:"properties.scrollbar.bar"},NONE:{value:"none",translation:"properties.scrollbar.none"}};var oA={OPTIONS:iA,DEFAULT:iA.MINI_CHART};function aA({layoutService:e,discrete:t}){return({h:n,rect:r,orientation:i,minThumbSize:o})=>{const a=t.query.getCurrentDataPage(),s=e.meta.size.y,l="horizontal"===i,c=r[l?"width":"height"];let u=a.qArea.qTop/s*c,d=a.qArea.qHeight/s*c;if(d<o){const e=(o-d)/2;u=u-e+(Math.max(0,0-(u-e))-Math.max(0,u+d+e-c)),d=o}return n("div",{style:{position:"absolute",right:0,bottom:0,background:"red",opacity:.2,...l?{top:0,left:u,width:d}:{top:u,left:0,height:d}}})}}function sA({layoutService:e,viewState:t,viewCache:n}){return e.meta.isContinuous?function(e,t){const n=e.get("zoom"),r=t.get("continuousMin"),i=t.get("continuousMax");return[(n.min-r)/(i-r),(n.max-r)/(i-r)]}(t,n):function(e){return e.get("viewRange")}(t)}const lA=e=>({miniChart:e===oA.OPTIONS.MINI_CHART.value,bar:e===oA.OPTIONS.BAR.value,none:e===oA.OPTIONS.NONE.value});function cA({layoutService:e,override:t}){const n=(({layoutService:e})=>{const t=e.getLayoutValue("scrollbar");if(t)return lA(t);const n=e.getLayoutValue("showMiniChartForContinuousAxis");if(void 0===n)return lA(oA.DEFAULT.value);const r=e.getLayoutValue("dimensionAxis.continuousAuto"),i=e.getLayoutValue("preferContinuousAxis");return lA(!n&&(r||!r&&i)?oA.OPTIONS.NONE.value:oA.OPTIONS.MINI_CHART.value)})({layoutService:e});return t&&t.predicate({layoutService:e,scrollbar:n})&&(n.miniChart=t.value===oA.OPTIONS.MINI_CHART.value,n.bar=t.value===oA.OPTIONS.BAR.value,n.none=t.value===oA.OPTIONS.NONE.value),n}function uA({layoutService:e,dockService:t,discrete:n,continuousDataModel:r,viewState:i,viewCache:o,themeService:a,rtl:s,scrollbarOverride:l,visualizeCache:c=!1,deviceType:u}){const d=cA({layoutService:e,override:l});if(d.none)return!1;const{orientation:f}=t.meta.major,h={key:"scrollbar",type:"scrollbar",layout:{dock:"horizontal"===f?t.meta.minor.start:t.meta.minor.end,minimumLayoutMode:"XSMALL"},show:()=>e.meta.isContinuous?r.getDimensionCardinality()>1:n.query.getCanScroll(),settings:{orientation:f,rtl:s,isContinuous:e.meta.isContinuous,range:()=>sA({layoutService:e,viewState:i,viewCache:o})}};d.bar&&(h.settings.style="slim",h.settings.size={area:"touch"===u?{max:16,min:16}:{max:8,min:8}},e.meta.isContinuous||(h.settings.size.thumb={min:4}));const p=a.getStyles();return p.color&&(h.style={standard:{thumb:{"border-color":p.color,opacity:.4},before:{background:p.color,opacity:.1},after:{background:p.color,opacity:.1}}}),e.meta.isDiscrete&&c&&(h.settings.injections=()=>[aA({layoutService:e,discrete:n})]),h}function dA({componentKey:e,chart:t,viewState:n,viewCache:r,layoutService:i,dockService:o,rtl:a}){return s=>{const{x:l,y:c}=s.center,u=t.element.getBoundingClientRect(),d=t.component(e),f="horizontal"===o.meta.major.orientation,h=f?l-u.left-d.rect.computedInner.x:c-u.top-d.rect.computedInner.y,p=f?d.rect.computedInner.width:d.rect.computedInner.height,m=f&&a?p-h:h,g=Math.max(0,Math.min(m/p,1)),[y,v]=sA({layoutService:i,viewState:n,viewCache:r}),b=g<y,x=g>v,S=!b&&!x;return{pixel:m,relative:g,thumb:S?m-y*p:0,beforeThumb:b,afterThumb:x,onThumb:S}}}function fA({componentKey:e,chart:t,viewState:n,viewCache:r,layoutService:i,dockService:o}){return()=>{const a=t.component(e),{orientation:s}=o.meta.major,{width:l,height:c}=a.rect.computedInner,u="horizontal"===s?l:c,[d,f]=sA({layoutService:i,viewState:n,viewCache:r});return{size:u,thumbSize:(f-d)*u}}}function hA({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){const c=dA({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:l}),u=fA({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a});return{type:"Tap",options:{event:"scrollbarTap",enable:(r,i)=>!i||!!n.scroll.enabled()&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some(t=>t.key===e)},events:{scrollbarTap(n){n.preventDefault();const a=c(n);if(o.meta.isContinuous){const e=r.get("zoom"),t=e.max-e.min,n=i.get("continuousMin"),o=i.get("continuousMax"),s=n+(o-n)*a.relative;r.set("zoom",{min:Math.min(s-t/2,o-t),max:Math.max(s+t/2,n+t)})}else{const e=u(),t=a.pixel-e.thumbSize/2,n=Math.max(0,t/e.size);s.command.scrollTo(n)}t.component(e).emit("render")}}}}const pA="data-scrollbar-handle";function mA({e:e}){return(e.srcEvent||e).srcElement.getAttribute(pA)||""}const gA="scrollbarResize";function yA({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:s}){const l=dA({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:s});return{type:"Pan",key:`event:${gA}`,options:{event:gA,threshold:0,enable(e,t){return!(!o.meta.isContinuous||!n.scroll.enabled())&&(!t||(this[gA]=this[gA]||{},(e=>{const[t]=e.changedPointers;return t&&("pointerdown"===t.type||"mousedown"===t.type)})(t)&&mA({e:t})&&(this[gA].panningEvent=t.srcEvent),!!this[gA].panningEvent))}},events:{[`${gA}start`](n){n.preventDefault(),this[gA]=this[gA]||{},this[gA].panningEvent&&t.component(e).emit("dragStart",this[gA].panningEvent)},[`${gA}move`](n){if(n.preventDefault(),this[gA]=this[gA]||{},!this[gA].panningEvent)return;const o=r.get("zoom"),a=i.get("continuousMin"),s=i.get("continuousMax"),c=i.get("minimiumZoomSpan"),u=(s-a)*l(n).relative+a,d=mA({e:this[gA].panningEvent});let f="start"===d?Math.min(u,o.max):o.min,h="end"===d?Math.max(u,o.min):o.max;f===h&&(f-="start"===d?c:0,h+="end"===d?c:0),r.set("zoom",{min:f,max:h}),t.component(e).emit("render")},[`${gA}end`](n){n.preventDefault(),this[gA]=this[gA]||{},delete this[gA].panningEvent,t.component(e).emit("dragEnd")},[`${gA}cancel`](n){n.preventDefault(),this[gA]=this[gA]||{},delete this[gA].panningEvent,t.component(e).emit("dragEnd")}}}}const vA="scrollbarPan";function bA({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){const c=dA({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:l}),u=fA({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a});return{type:"Pan",key:`event:${vA}`,options:{event:vA,threshold:0,enable(r,i){return this[vA]=this[vA]||{},!(i&&!this[vA].isPanning)||!!n.scroll.enabled()&&((!i||i.target===t.element)&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some(t=>t.key===e))}},events:{[`${vA}start`](n){n.preventDefault();const a=c(n);if(this[vA]=this[vA]||{},this[vA].isPanning=!0,t.component(e).emit("lockState"),o.meta.isContinuous){const e=r.get("zoom"),t=e.max-e.min,n=i.get("continuousMin"),o=i.get("continuousMax"),s=n+(o-n)*a.relative;s<e.min?r.set("zoom",{min:Math.min(s,o-t),max:Math.max(s+t,n+t)}):s>e.max&&r.set("zoom",{min:Math.min(s-t,o-t),max:Math.max(s,n+t)}),this[vA].relative=a.relative,this[vA].zoom=r.get("zoom"),this[vA].zoom.span=this[vA].zoom.max-this[vA].zoom.min,this[vA].zoom.fullSpan=o-n}else if(a.onThumb)this[vA].offset=a.thumb;else{const e=u();this[vA].offset=a.beforeThumb?0:e.thumbSize}},[`${vA}move`](n){n.preventDefault();const a=c(n);if(this[vA]=this[vA]||{},o.meta.isContinuous){const e=a.relative-this[vA].relative,{fullSpan:t,span:n,min:o,max:s}=this[vA].zoom,l=i.get("continuousMin"),c=i.get("continuousMax");r.set("zoom",{min:Math.min(o+e*t,c-n),max:Math.max(s+e*t,l+n)})}else{const e=a.pixel-(this[vA].offset||0),t=u(),n=Math.max(0,e/t.size);s.command.scrollTo(n)}t.component(e).emit("render")},[`${vA}end`](n){n.preventDefault(),this[vA]=this[vA]||{},this[vA].isPanning=!1,t.component(e).emit("unlockState")},[`${vA}cancel`](n){n.preventDefault(),this[vA]=this[vA]||{},this[vA].isPanning=!1,t.component(e).emit("unlockState")}}}}function xA({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){return[hA({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}),yA({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:l}),bA({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l})]}function SA({componentKey:e,chart:t,actions:n,layoutService:r}){const i=(i,o)=>{if(!r.meta.isContinuous)return;const a=t.component(e);a&&a.emit&&n.scroll.enabled()&&a.emit(i,o)};return{type:"native",events:{mousemove:e=>i("hover",e),mouseleave:()=>i("leave")}}}function wA({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){return{gestures:[...xA({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l})],native:SA({componentKey:e,chart:t,actions:n,layoutService:o})}}const MA={background:"rgba(0, 0, 0, 0.1)"},kA={top:-1,bottom:-1,width:6},CA={width:2,background:"#595959"};var qA={before:MA,after:MA,thumb:{background:"transparent",border:"1px solid rgba(68, 68, 68, 0.4)"},startHandle:kA,endHandle:kA,startHandleBorder:CA,endHandleBorder:CA};const EA={background:"rgba(0, 0, 0, 0.1)"},DA={top:-1,bottom:-1,width:6},TA={width:2,background:"#595959"};var OA={before:EA,after:EA,thumb:{background:"#B0AFAE",border:"transparent"},startHandle:DA,endHandle:DA,startHandleBorder:TA,endHandleBorder:TA};const NA={position:"absolute",top:0,right:0,bottom:0,left:0,boxSizing:"border-box"},AA={pointerEvents:"initial"},_A={pointerEvents:"none"};const IA="ew-resize",LA="default";function PA(){const{rect:e}=this,{settings:t}=this.settings,n="horizontal"===t.orientation,r=n?e.computedInner.width:e.computedInner.height,i=t.range(),o=n&&t.rtl;return{size:r,start:(o?1-i[1]:i[0])*r,end:(o?1-i[0]:i[1])*r}}function RA(){const e=this.state.hover.start||this.state.hover.end||this.state.drag.start||this.state.drag.end;this.renderer.element().ownerDocument.body.style.cursor=e?IA:LA}function zA(e,t,n){const{min:r}=this.settings.settings.size.thumb;if(n-t<r){const i=(r-(n-t))/2,o=Math.max(0,0-(t-i))-Math.max(0,n+i-e);return{size:e,start:t-i+o,end:n+i+o}}return{size:e,start:t,end:n}}function FA(e){const t=(e.srcEvent||e).srcElement;return this.renderer.element().contains(t)}function jA(){const{size:e,start:t,end:n}=PA.call(this);this.renderer.render(this.elements(this.h,zA.call(this,e,t,n)))}function BA(){const{state:e,settings:t,style:n}=this,r=t.settings.style;return e.style[r]||(e.style[r]=function({id:e,style:t}){const n="slim"===e?OA:qA;return{container:{...NA},before:{...NA,...n.before,...t.before},after:{...NA,...n.after,...t.after},thumb:{...NA,...n.thumb,...t.thumb},startHandle:{...NA,...AA,...n.startHandle},endHandle:{...NA,...AA,...n.endHandle},startHandleBorder:{...NA,..._A,...n.startHandleBorder},endHandleBorder:{...NA,..._A,...n.endHandleBorder}}}({id:t.settings.style,style:n[r]})),e.style[r]}var HA,VA,$A={require:["renderer"],defaultSettings:{settings:{style:"standard",size:{area:{min:30,max:40,ratio:1/8},thumb:{min:4}},orientation:"horizontal",rtl:!1,isContinuous:!1,range:()=>[0,1],injections:()=>[]},style:{standard:{before:{},thumb:{},after:{}},slim:{before:{},thumb:{},after:{}}}},renderer:"dom",on:{render(){jA.call(this)},lockState(){this.state.locked=!0},unlockState(){this.state.locked=!1},hover(e){if(this.state.locked||this.state.drag.start||this.state.drag.end||!FA.call(this,e)&&this.state.hover.isPristine())return;this.state.hover.reset();const t=mA({e:e});t&&(this.state.hover[t]=!0),RA.call(this),jA.call(this)},leave(){this.state.locked||(this.state.hover.reset(),RA.call(this),jA.call(this))},dragStart(e){if(this.state.locked)return;this.state.drag.reset();const t=mA({e:e});t&&(this.state.drag[t]=!0),RA.call(this)},dragEnd(){this.state.locked||(this.state.drag.reset(),RA.call(this),jA.call(this))}},preferredSize({outer:e}){const{min:t,max:n,ratio:r}=this.settings.settings.size.area,i="horizontal"===this.settings.settings.orientation?"height":"width";return Math.max(t,Math.min(n,e[i]*r))},created(){this.state={style:{},locked:!1,hover:{start:!1,end:!1,reset(){this.start=!1,this.end=!1},isPristine(){return!this.start&&!this.end}},drag:{start:!1,end:!1,reset(){this.start=!1,this.end=!1}}}},render(e){this.h=e;const{size:t,start:n,end:r}=PA.call(this);return this.elements(e,zA.call(this,t,n,r))},properties(){return"horizontal"===this.settings.settings.orientation?{start:"left",end:"right"}:{start:"top",end:"bottom"}},elements(e,{size:t,start:n,end:r}){const{settings:i}=this.settings,o=i.injections().map(t=>t({h:e,rect:this.rect,orientation:i.orientation,minThumbSize:i.size.thumb.min}));return function({h:e,size:t,start:n,end:r,properties:i,startHandleActive:o,endHandleActive:a,style:s,continuous:l,invert:c,injections:u}){const d={[i.end]:t-n},f={[i.start]:r},h={left:-3},p={left:1},m={right:-3,left:"auto"},g={left:3},y=e("div",{style:{...s.before,...c?f:d},class:"scrollbar--before"}),v=e("div",{style:{...s.after,...c?d:f},class:"scrollbar--after"}),b=[];if(l){const t=e("div",{style:{...s.startHandle,...c?m:h},class:"scrollbar--start-handle",[pA]:"start"},o?e("div",{style:{...s.startHandleBorder,...c?g:p}}):void 0);b.push(t);const n=e("div",{style:{...s.endHandle,...c?h:m},class:"scrollbar--end-handle",[pA]:"end"},a?e("div",{style:{...s.endHandleBorder,...c?p:g}}):void 0);b.push(n)}const x=e("div",{style:{...s.thumb,[i.start]:n,[i.end]:t-r},class:"scrollbar--thumb"},b);return e("div",{style:{...s.container}},[y,x,v,...u])}({h:e,size:t,start:n,end:r,properties:this.properties(),startHandleActive:this.state.hover.start||this.state.drag.start,endHandleActive:this.state.hover.end||this.state.drag.end,style:BA.call(this),continuous:i.isContinuous,invert:"horizontal"===i.orientation&&i.rtl,injections:o})}},WA={exports:{}},UA={};function YA(){if(HA)return UA;HA=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),a=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),d=Symbol.iterator;var f={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h=Object.assign,p={};function m(e,t,n){this.props=e,this.context=t,this.refs=p,this.updater=n||f}function g(){}function y(e,t,n){this.props=e,this.context=t,this.refs=p,this.updater=n||f}m.prototype.isReactComponent={},m.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},m.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},g.prototype=m.prototype;var v=y.prototype=new g;v.constructor=y,h(v,m.prototype),v.isPureReactComponent=!0;var b=Array.isArray,x=Object.prototype.hasOwnProperty,S={current:null},w={key:!0,ref:!0,__self:!0,__source:!0};function M(t,n,r){var i,o={},a=null,s=null;if(null!=n)for(i in void 0!==n.ref&&(s=n.ref),void 0!==n.key&&(a=""+n.key),n)x.call(n,i)&&!w.hasOwnProperty(i)&&(o[i]=n[i]);var l=arguments.length-2;if(1===l)o.children=r;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];o.children=c}if(t&&t.defaultProps)for(i in l=t.defaultProps)void 0===o[i]&&(o[i]=l[i]);return{$$typeof:e,type:t,key:a,ref:s,props:o,_owner:S.current}}function k(t){return"object"==typeof t&&null!==t&&t.$$typeof===e}var C=/\/+/g;function q(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function E(n,r,i,o,a){var s=typeof n;"undefined"!==s&&"boolean"!==s||(n=null);var l=!1;if(null===n)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(n.$$typeof){case e:case t:l=!0}}if(l)return a=a(l=n),n=""===o?"."+q(l,0):o,b(a)?(i="",null!=n&&(i=n.replace(C,"$&/")+"/"),E(a,r,i,"",function(e){return e})):null!=a&&(k(a)&&(a=function(t,n){return{$$typeof:e,type:t.type,key:n,ref:t.ref,props:t.props,_owner:t._owner}}(a,i+(!a.key||l&&l.key===a.key?"":(""+a.key).replace(C,"$&/")+"/")+n)),r.push(a)),1;if(l=0,o=""===o?".":o+":",b(n))for(var c=0;c<n.length;c++){var u=o+q(s=n[c],c);l+=E(s,r,i,u,a)}else if(u=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=d&&e[d]||e["@@iterator"])?e:null}(n),"function"==typeof u)for(n=u.call(n),c=0;!(s=n.next()).done;)l+=E(s=s.value,r,i,u=o+q(s,c++),a);else if("object"===s)throw r=String(n),Error("Objects are not valid as a React child (found: "+("[object Object]"===r?"object with keys {"+Object.keys(n).join(", ")+"}":r)+"). If you meant to render a collection of children, use an array instead.");return l}function D(e,t,n){if(null==e)return e;var r=[],i=0;return E(e,r,"","",function(e){return t.call(n,e,i++)}),r}function T(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var O={current:null},N={transition:null},A={ReactCurrentDispatcher:O,ReactCurrentBatchConfig:N,ReactCurrentOwner:S};function _(){throw Error("act(...) is not supported in production builds of React.")}return UA.Children={map:D,forEach:function(e,t,n){D(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return D(e,function(){t++}),t},toArray:function(e){return D(e,function(e){return e})||[]},only:function(e){if(!k(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},UA.Component=m,UA.Fragment=n,UA.Profiler=i,UA.PureComponent=y,UA.StrictMode=r,UA.Suspense=l,UA.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=A,UA.act=_,UA.cloneElement=function(t,n,r){if(null==t)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var i=h({},t.props),o=t.key,a=t.ref,s=t._owner;if(null!=n){if(void 0!==n.ref&&(a=n.ref,s=S.current),void 0!==n.key&&(o=""+n.key),t.type&&t.type.defaultProps)var l=t.type.defaultProps;for(c in n)x.call(n,c)&&!w.hasOwnProperty(c)&&(i[c]=void 0===n[c]&&void 0!==l?l[c]:n[c])}var c=arguments.length-2;if(1===c)i.children=r;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];i.children=l}return{$$typeof:e,type:t.type,key:o,ref:a,props:i,_owner:s}},UA.createContext=function(e){return(e={$$typeof:a,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:o,_context:e},e.Consumer=e},UA.createElement=M,UA.createFactory=function(e){var t=M.bind(null,e);return t.type=e,t},UA.createRef=function(){return{current:null}},UA.forwardRef=function(e){return{$$typeof:s,render:e}},UA.isValidElement=k,UA.lazy=function(e){return{$$typeof:u,_payload:{_status:-1,_result:e},_init:T}},UA.memo=function(e,t){return{$$typeof:c,type:e,compare:void 0===t?null:t}},UA.startTransition=function(e){var t=N.transition;N.transition={};try{e()}finally{N.transition=t}},UA.unstable_act=_,UA.useCallback=function(e,t){return O.current.useCallback(e,t)},UA.useContext=function(e){return O.current.useContext(e)},UA.useDebugValue=function(){},UA.useDeferredValue=function(e){return O.current.useDeferredValue(e)},UA.useEffect=function(e,t){return O.current.useEffect(e,t)},UA.useId=function(){return O.current.useId()},UA.useImperativeHandle=function(e,t,n){return O.current.useImperativeHandle(e,t,n)},UA.useInsertionEffect=function(e,t){return O.current.useInsertionEffect(e,t)},UA.useLayoutEffect=function(e,t){return O.current.useLayoutEffect(e,t)},UA.useMemo=function(e,t){return O.current.useMemo(e,t)},UA.useReducer=function(e,t,n){return O.current.useReducer(e,t,n)},UA.useRef=function(e){return O.current.useRef(e)},UA.useState=function(e){return O.current.useState(e)},UA.useSyncExternalStore=function(e,t,n){return O.current.useSyncExternalStore(e,t,n)},UA.useTransition=function(){return O.current.useTransition()},UA.version="18.3.1",UA}function KA(){return VA||(VA=1,WA.exports=YA()),WA.exports}var GA=KA(),XA=ug(GA),JA=t({__proto__:null,default:XA},[GA]);const ZA={black:"#000",white:"#fff"},QA="#e57373",e_="#ef5350",t_="#f44336",n_="#d32f2f",r_="#c62828",i_="#f3e5f5",o_="#ce93d8",a_="#ba68c8",s_="#ab47bc",l_="#9c27b0",c_="#7b1fa2",u_="#e3f2fd",d_="#90caf9",f_="#42a5f5",h_="#1976d2",p_="#1565c0",m_="#4fc3f7",g_="#29b6f6",y_="#03a9f4",v_="#0288d1",b_="#01579b",x_="#81c784",S_="#66bb6a",w_="#4caf50",M_="#388e3c",k_="#2e7d32",C_="#1b5e20",q_="#ffb74d",E_="#ffa726",D_="#ff9800",T_="#f57c00",O_="#e65100",N_={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};function A_(e){let t="https://mui.com/production-error/?code="+e;for(let e=1;e<arguments.length;e+=1)t+="&args[]="+encodeURIComponent(arguments[e]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}var __=Object.freeze({__proto__:null,default:A_}),I_="$$material";function L_(){return L_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},L_.apply(null,arguments)}function P_(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}var R_=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),this.tags=[],this.ctr=0},e}(),z_="-ms-",F_="-moz-",j_="-webkit-",B_="comm",H_="rule",V_="decl",$_="@keyframes",W_=Math.abs,U_=String.fromCharCode,Y_=Object.assign;function K_(e){return e.trim()}function G_(e,t,n){return e.replace(t,n)}function X_(e,t){return e.indexOf(t)}function J_(e,t){return 0|e.charCodeAt(t)}function Z_(e,t,n){return e.slice(t,n)}function Q_(e){return e.length}function eI(e){return e.length}function tI(e,t){return t.push(e),e}var nI=1,rI=1,iI=0,oI=0,aI=0,sI="";function lI(e,t,n,r,i,o,a){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:nI,column:rI,length:a,return:""}}function cI(e,t){return Y_(lI("",null,null,"",null,null,0),e,{length:-e.length},t)}function uI(){return aI=oI>0?J_(sI,--oI):0,rI--,10===aI&&(rI=1,nI--),aI}function dI(){return aI=oI<iI?J_(sI,oI++):0,rI++,10===aI&&(rI=1,nI++),aI}function fI(){return J_(sI,oI)}function hI(){return oI}function pI(e,t){return Z_(sI,e,t)}function mI(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function gI(e){return nI=rI=1,iI=Q_(sI=e),oI=0,[]}function yI(e){return sI="",e}function vI(e){return K_(pI(oI-1,SI(91===e?e+2:40===e?e+1:e)))}function bI(e){for(;(aI=fI())&&aI<33;)dI();return mI(e)>2||mI(aI)>3?"":" "}function xI(e,t){for(;--t&&dI()&&!(aI<48||aI>102||aI>57&&aI<65||aI>70&&aI<97););return pI(e,hI()+(t<6&&32==fI()&&32==dI()))}function SI(e){for(;dI();)switch(aI){case e:return oI;case 34:case 39:34!==e&&39!==e&&SI(aI);break;case 40:41===e&&SI(e);break;case 92:dI()}return oI}function wI(e,t){for(;dI()&&e+aI!==57&&(e+aI!==84||47!==fI()););return"/*"+pI(t,oI-1)+"*"+U_(47===e?e:dI())}function MI(e){for(;!mI(fI());)dI();return pI(e,oI)}function kI(e){return yI(CI("",null,null,null,[""],e=gI(e),0,[0],e))}function CI(e,t,n,r,i,o,a,s,l){for(var c=0,u=0,d=a,f=0,h=0,p=0,m=1,g=1,y=1,v=0,b="",x=i,S=o,w=r,M=b;g;)switch(p=v,v=dI()){case 40:if(108!=p&&58==J_(M,d-1)){-1!=X_(M+=G_(vI(v),"&","&\f"),"&\f")&&(y=-1);break}case 34:case 39:case 91:M+=vI(v);break;case 9:case 10:case 13:case 32:M+=bI(p);break;case 92:M+=xI(hI()-1,7);continue;case 47:switch(fI()){case 42:case 47:tI(EI(wI(dI(),hI()),t,n),l);break;default:M+="/"}break;case 123*m:s[c++]=Q_(M)*y;case 125*m:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:-1==y&&(M=G_(M,/\f/g,"")),h>0&&Q_(M)-d&&tI(h>32?DI(M+";",r,n,d-1):DI(G_(M," ","")+";",r,n,d-2),l);break;case 59:M+=";";default:if(tI(w=qI(M,t,n,c,u,i,s,b,x=[],S=[],d),o),123===v)if(0===u)CI(M,t,w,w,x,o,d,s,S);else switch(99===f&&110===J_(M,3)?100:f){case 100:case 108:case 109:case 115:CI(e,w,w,r&&tI(qI(e,w,w,0,0,i,s,b,i,x=[],d),S),i,S,d,s,r?x:S);break;default:CI(M,w,w,w,[""],S,0,s,S)}}c=u=h=0,m=y=1,b=M="",d=a;break;case 58:d=1+Q_(M),h=p;default:if(m<1)if(123==v)--m;else if(125==v&&0==m++&&125==uI())continue;switch(M+=U_(v),v*m){case 38:y=u>0?1:(M+="\f",-1);break;case 44:s[c++]=(Q_(M)-1)*y,y=1;break;case 64:45===fI()&&(M+=vI(dI())),f=fI(),u=d=Q_(b=M+=MI(hI())),v++;break;case 45:45===p&&2==Q_(M)&&(m=0)}}return o}function qI(e,t,n,r,i,o,a,s,l,c,u){for(var d=i-1,f=0===i?o:[""],h=eI(f),p=0,m=0,g=0;p<r;++p)for(var y=0,v=Z_(e,d+1,d=W_(m=a[p])),b=e;y<h;++y)(b=K_(m>0?f[y]+" "+v:G_(v,/&\f/g,f[y])))&&(l[g++]=b);return lI(e,t,n,0===i?H_:s,l,c,u)}function EI(e,t,n){return lI(e,t,n,B_,U_(aI),Z_(e,2,-2),0)}function DI(e,t,n,r){return lI(e,t,n,V_,Z_(e,0,r),Z_(e,r+1,-1),r)}function TI(e,t){for(var n="",r=eI(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function OI(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case V_:return e.return=e.return||e.value;case B_:return"";case $_:return e.return=e.value+"{"+TI(e.children,r)+"}";case H_:e.value=e.props.join(",")}return Q_(n=TI(e.children,r))?e.return=e.value+"{"+n+"}":""}function NI(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var AI=function(e,t,n){for(var r=0,i=0;r=i,i=fI(),38===r&&12===i&&(t[n]=1),!mI(i);)dI();return pI(e,oI)},_I=function(e,t){return yI(function(e,t){var n=-1,r=44;do{switch(mI(r)){case 0:38===r&&12===fI()&&(t[n]=1),e[n]+=AI(oI-1,t,n);break;case 2:e[n]+=vI(r);break;case 4:if(44===r){e[++n]=58===fI()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=U_(r)}}while(r=dI());return e}(gI(e),t))},II=new WeakMap,LI=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||II.get(n))&&!r){II.set(e,!0);for(var i=[],o=_I(t,i),a=n.props,s=0,l=0;s<o.length;s++)for(var c=0;c<a.length;c++,l++)e.props[l]=i[s]?o[s].replace(/&\f/g,a[c]):a[c]+" "+o[s]}}},PI=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function RI(e,t){switch(function(e,t){return 45^J_(e,0)?(((t<<2^J_(e,0))<<2^J_(e,1))<<2^J_(e,2))<<2^J_(e,3):0}(e,t)){case 5103:return j_+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return j_+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return j_+e+F_+e+z_+e+e;case 6828:case 4268:return j_+e+z_+e+e;case 6165:return j_+e+z_+"flex-"+e+e;case 5187:return j_+e+G_(e,/(\w+).+(:[^]+)/,j_+"box-$1$2"+z_+"flex-$1$2")+e;case 5443:return j_+e+z_+"flex-item-"+G_(e,/flex-|-self/,"")+e;case 4675:return j_+e+z_+"flex-line-pack"+G_(e,/align-content|flex-|-self/,"")+e;case 5548:return j_+e+z_+G_(e,"shrink","negative")+e;case 5292:return j_+e+z_+G_(e,"basis","preferred-size")+e;case 6060:return j_+"box-"+G_(e,"-grow","")+j_+e+z_+G_(e,"grow","positive")+e;case 4554:return j_+G_(e,/([^-])(transform)/g,"$1"+j_+"$2")+e;case 6187:return G_(G_(G_(e,/(zoom-|grab)/,j_+"$1"),/(image-set)/,j_+"$1"),e,"")+e;case 5495:case 3959:return G_(e,/(image-set\([^]*)/,j_+"$1$`$1");case 4968:return G_(G_(e,/(.+:)(flex-)?(.*)/,j_+"box-pack:$3"+z_+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+j_+e+e;case 4095:case 3583:case 4068:case 2532:return G_(e,/(.+)-inline(.+)/,j_+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Q_(e)-1-t>6)switch(J_(e,t+1)){case 109:if(45!==J_(e,t+4))break;case 102:return G_(e,/(.+:)(.+)-([^]+)/,"$1"+j_+"$2-$3$1"+F_+(108==J_(e,t+3)?"$3":"$2-$3"))+e;case 115:return~X_(e,"stretch")?RI(G_(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==J_(e,t+1))break;case 6444:switch(J_(e,Q_(e)-3-(~X_(e,"!important")&&10))){case 107:return G_(e,":",":"+j_)+e;case 101:return G_(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+j_+(45===J_(e,14)?"inline-":"")+"box$3$1"+j_+"$2$3$1"+z_+"$2box$3")+e}break;case 5936:switch(J_(e,t+11)){case 114:return j_+e+z_+G_(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return j_+e+z_+G_(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return j_+e+z_+G_(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return j_+e+z_+e+e}return e}var zI,FI,jI,BI,HI=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case V_:e.return=RI(e.value,e.length);break;case $_:return TI([cI(e,{value:G_(e.value,"@","@"+j_)})],r);case H_:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return TI([cI(e,{props:[G_(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return TI([cI(e,{props:[G_(t,/:(plac\w+)/,":"+j_+"input-$1")]}),cI(e,{props:[G_(t,/:(plac\w+)/,":-moz-$1")]}),cI(e,{props:[G_(t,/:(plac\w+)/,z_+"input-$1")]})],r)}return""})}}],VI=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var r,i,o=e.stylisPlugins||HI,a={},s=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)a[t[n]]=!0;s.push(e)});var l,c,u=[OI,(c=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&c(e)})],d=function(e){var t=eI(e);return function(n,r,i,o){for(var a="",s=0;s<t;s++)a+=e[s](n,r,i,o)||"";return a}}([LI,PI].concat(o,u));i=function(e,t,n,r){l=n,function(e){TI(kI(e),d)}(e?e+"{"+t.styles+"}":t.styles),r&&(f.inserted[t.name]=!0)};var f={key:t,sheet:new R_({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:i};return f.sheet.hydrate(s),f},$I={exports:{}},WI={};function UI(){return FI||(FI=1,$I.exports=function(){if(zI)return WI;zI=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var f=e.$$typeof;switch(f){case t:switch(e=e.type){case l:case c:case r:case o:case i:case d:return e;default:switch(e=e&&e.$$typeof){case s:case u:case p:case h:case a:return e;default:return f}}case n:return f}}}function x(e){return b(e)===c}return WI.AsyncMode=l,WI.ConcurrentMode=c,WI.ContextConsumer=s,WI.ContextProvider=a,WI.Element=t,WI.ForwardRef=u,WI.Fragment=r,WI.Lazy=p,WI.Memo=h,WI.Portal=n,WI.Profiler=o,WI.StrictMode=i,WI.Suspense=d,WI.isAsyncMode=function(e){return x(e)||b(e)===l},WI.isConcurrentMode=x,WI.isContextConsumer=function(e){return b(e)===s},WI.isContextProvider=function(e){return b(e)===a},WI.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},WI.isForwardRef=function(e){return b(e)===u},WI.isFragment=function(e){return b(e)===r},WI.isLazy=function(e){return b(e)===p},WI.isMemo=function(e){return b(e)===h},WI.isPortal=function(e){return b(e)===n},WI.isProfiler=function(e){return b(e)===o},WI.isStrictMode=function(e){return b(e)===i},WI.isSuspense=function(e){return b(e)===d},WI.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===o||e===i||e===d||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===h||e.$$typeof===a||e.$$typeof===s||e.$$typeof===u||e.$$typeof===g||e.$$typeof===y||e.$$typeof===v||e.$$typeof===m)},WI.typeOf=b,WI}()),$I.exports}!function(){if(BI)return jI;BI=1;var e=UI(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},i={};function o(n){return e.isMemo(n)?r:i[n.$$typeof]||t}i[e.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i[e.Memo]=r;var a=Object.defineProperty,s=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,c=Object.getOwnPropertyDescriptor,u=Object.getPrototypeOf,d=Object.prototype;jI=function e(t,r,i){if("string"!=typeof r){if(d){var f=u(r);f&&f!==d&&e(t,f,i)}var h=s(r);l&&(h=h.concat(l(r)));for(var p=o(t),m=o(r),g=0;g<h.length;++g){var y=h[g];if(!(n[y]||i&&i[y]||m&&m[y]||p&&p[y])){var v=c(r,y);try{a(t,y,v)}catch(e){}}}}return t}}();function YI(e,t,n){var r="";return n.split(" ").forEach(function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")}),r}var KI=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},GI=function(e,t,n){KI(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i=t;do{e.insert(t===i?"."+r:"",i,e.sheet,!0),i=i.next}while(void 0!==i)}};var XI={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},JI=/[A-Z]|^ms/g,ZI=/_EMO_([^_]+?)_([^]*?)_EMO_/g,QI=function(e){return 45===e.charCodeAt(1)},eL=function(e){return null!=e&&"boolean"!=typeof e},tL=NI(function(e){return QI(e)?e:e.replace(JI,"-$&").toLowerCase()}),nL=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(ZI,function(e,t,n){return iL={name:t,styles:n,next:iL},t})}return 1===XI[e]||QI(e)||"number"!=typeof t||0===t?t:t+"px"};function rL(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var i=n;if(1===i.anim)return iL={name:i.name,styles:i.styles,next:iL},i.name;var o=n;if(void 0!==o.styles){var a=o.next;if(void 0!==a)for(;void 0!==a;)iL={name:a.name,styles:a.styles,next:iL},a=a.next;return o.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=rL(e,t,n[i])+";";else for(var o in n){var a=n[o];if("object"!=typeof a){var s=a;null!=t&&void 0!==t[s]?r+=o+"{"+t[s]+"}":eL(s)&&(r+=tL(o)+":"+nL(o,s)+";")}else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var l=rL(e,t,a);switch(o){case"animation":case"animationName":r+=tL(o)+":"+l+";";break;default:r+=o+"{"+l+"}"}}else for(var c=0;c<a.length;c++)eL(a[c])&&(r+=tL(o)+":"+nL(o,a[c])+";")}return r}(e,t,n);case"function":if(void 0!==e){var s=iL,l=n(e);return iL=s,rL(e,t,l)}}var c=n;if(null==t)return c;var u=t[c];return void 0!==u?u:c}var iL,oL=/label:\s*([^\s;{]+)\s*(;|$)/g;function aL(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,i="";iL=void 0;var o=e[0];null==o||void 0===o.raw?(r=!1,i+=rL(n,t,o)):i+=o[0];for(var a=1;a<e.length;a++){if(i+=rL(n,t,e[a]),r)i+=o[a]}oL.lastIndex=0;for(var s,l="";null!==(s=oL.exec(i));)l+="-"+s[1];var c=function(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(i)+l;return{name:c,styles:i,next:iL}}var sL,lL,cL=!!JA.useInsertionEffect&&JA.useInsertionEffect,uL=cL||function(e){return e()},dL=cL||GA.useLayoutEffect,fL=GA.createContext("undefined"!=typeof HTMLElement?VI({key:"css"}):null),hL=fL.Provider,pL=function(e){return GA.forwardRef(function(t,n){var r=GA.useContext(fL);return e(t,r,n)})},mL=GA.createContext({}),gL={}.hasOwnProperty,yL="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",vL=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return KI(t,n,r),uL(function(){return GI(t,n,r)}),null},bL=pL(function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var i=e[yL],o=[r],a="";"string"==typeof e.className?a=YI(t.registered,o,e.className):null!=e.className&&(a=e.className+" ");var s=aL(o,void 0,GA.useContext(mL));a+=t.key+"-"+s.name;var l={};for(var c in e)gL.call(e,c)&&"css"!==c&&c!==yL&&(l[c]=e[c]);return l.className=a,n&&(l.ref=n),GA.createElement(GA.Fragment,null,GA.createElement(vL,{cache:t,serialized:s,isStringTag:"string"==typeof i}),GA.createElement(i,l))}),xL=function(e,t){var n=arguments;if(null==t||!gL.call(t,"css"))return GA.createElement.apply(void 0,n);var r=n.length,i=new Array(r);i[0]=bL,i[1]=function(e,t){var n={};for(var r in t)gL.call(t,r)&&(n[r]=t[r]);return n[yL]=e,n}(e,t);for(var o=2;o<r;o++)i[o]=n[o];return GA.createElement.apply(null,i)};sL=xL||(xL={}),lL||(lL=sL.JSX||(sL.JSX={}));var SL=pL(function(e,t){var n=aL([e.styles],void 0,GA.useContext(mL)),r=GA.useRef();return dL(function(){var e=t.key+"-global",i=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),o=!1,a=document.querySelector('style[data-emotion="'+e+" "+n.name+'"]');return t.sheet.tags.length&&(i.before=t.sheet.tags[0]),null!==a&&(o=!0,a.setAttribute("data-emotion",e),i.hydrate([a])),r.current=[i,o],function(){i.flush()}},[t]),dL(function(){var e=r.current,i=e[0];if(e[1])e[1]=!1;else{if(void 0!==n.next&&GI(t,n.next,!0),i.tags.length){var o=i.tags[i.tags.length-1].nextElementSibling;i.before=o,i.flush()}t.insert("",n,i,!1)}},[t,n.name]),null});function wL(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return aL(t)}function ML(){var e=wL.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}var kL=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,CL=NI(function(e){return kL.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}),qL=function(e){return"theme"!==e},EL=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?CL:qL},DL=function(e,t,n){var r;if(t){var i=t.shouldForwardProp;r=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},TL=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return KI(t,n,r),uL(function(){return GI(t,n,r)}),null},OL=function e(t,n){var r,i,o=t.__emotion_real===t,a=o&&t.__emotion_base||t;void 0!==n&&(r=n.label,i=n.target);var s=DL(t,n,o),l=s||EL(a),c=!l("as");return function(){var u=arguments,d=o&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&d.push("label:"+r+";"),null==u[0]||void 0===u[0].raw)d.push.apply(d,u);else{var f=u[0];d.push(f[0]);for(var h=u.length,p=1;p<h;p++)d.push(u[p],f[p])}var m=pL(function(e,t,n){var r=c&&e.as||a,o="",u=[],f=e;if(null==e.theme){for(var h in f={},e)f[h]=e[h];f.theme=GA.useContext(mL)}"string"==typeof e.className?o=YI(t.registered,u,e.className):null!=e.className&&(o=e.className+" ");var p=aL(d.concat(u),t.registered,f);o+=t.key+"-"+p.name,void 0!==i&&(o+=" "+i);var m=c&&void 0===s?EL(r):l,g={};for(var y in e)c&&"as"===y||m(y)&&(g[y]=e[y]);return g.className=o,n&&(g.ref=n),GA.createElement(GA.Fragment,null,GA.createElement(TL,{cache:t,serialized:p,isStringTag:"string"==typeof r}),GA.createElement(r,g))});return m.displayName=void 0!==r?r:"Styled("+("string"==typeof a?a:a.displayName||a.name||"Component")+")",m.defaultProps=t.defaultProps,m.__emotion_real=m,m.__emotion_base=a,m.__emotion_styles=d,m.__emotion_forwardProp=s,Object.defineProperty(m,"toString",{value:function(){return"."+i}}),m.withComponent=function(t,r){return e(t,L_({},n,r,{shouldForwardProp:DL(m,r,!0)})).apply(void 0,d)},m}}.bind(null);["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach(function(e){OL[e]=OL(e)});var NL,AL,_L={exports:{}},IL={};var LL=(AL||(AL=1,_L.exports=function(){if(NL)return IL;NL=1;var e=KA(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function a(e,n,a){var s,l={},c=null,u=null;for(s in void 0!==a&&(c=""+a),void 0!==n.key&&(c=""+n.key),void 0!==n.ref&&(u=n.ref),n)r.call(n,s)&&!o.hasOwnProperty(s)&&(l[s]=n[s]);if(e&&e.defaultProps)for(s in n=e.defaultProps)void 0===l[s]&&(l[s]=n[s]);return{$$typeof:t,type:e,key:c,ref:u,props:l,_owner:i.current}}return IL.Fragment=n,IL.jsx=a,IL.jsxs=a,IL}()),_L.exports);const PL=new Map;function RL(e){const{styles:t,defaultTheme:n={}}=e,r="function"==typeof t?e=>{return t(null==(r=e)||0===Object.keys(r).length?n:e);var r}:t;return LL.jsx(SL,{styles:r})}
|
|
18
|
+
e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,i,o,a,s,l,c,u,d,f=e.length,h=e.search(/[0-9\-\+#]/),p=h>0?e.substring(0,h):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),y=f-g,v=e.substring(y,y+1),b=y+("."===v||","===v?1:0),x=g>0?e.substring(b,f):"";if(n=(t="-"===(e=e.substring(h,b)).charAt(0)?-t:+t)<0?t=-t:0,i=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",o=r&&r[1]&&r[0]||",",e=e.split(i),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(c=t.split("."))[1]||c[1]&&c[1].length<=s)&&(t=(+t).toFixed(s+1)),u=e[0].split(o),e[0]=u.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;c[0].length<e[0].length-a;)c[0]="0"+c[0];else 0==+c[0]&&(c[0]="");if((t=t.split("."))[0]=c[0],l=u[1]&&u[u.length-1].length){for(m="",y=(d=t[0]).length%l,f=d.length,b=0;b<f;b++)m+=d.charAt(b),!((b-y+1)%l)&&b<f-l&&(m+=o);t[0]=m}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),p+(n?"-":"")+r+x}},AS(_S={exports:{}}),_S.exports);function LS(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}const PS={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"},RS=/%\)?$/,zS=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,FS=/^\(oct\)/i,jS=/^\(dec\)/i,BS=/^\(hex\)/i,HS=/^\(bin\)/i,VS=/^\(rom\)/i,$S=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,WS=/#|0/g;function US(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 YS(e,t,n){const r=LS(e);return n?r:new RegExp(r||"",t)}function KS(e,t,n,r){let i,o,a,s,l,c,u,d,f,h=e.pattern;var p,m;r&&(e.abbreviate=!0),p=t,(m=n)&&(m=LS(m)),p&&(p=LS(p)),f=new RegExp("(?:[#0]+".concat(p,")?[#0]+(?:").concat(m,"[#0]+)?")),a=h.match(f),a=a?a[0]:"",s=a?h.substr(0,h.indexOf(a)):h,l=a?h.substring(h.indexOf(a)+a.length):"",a||(a=h?"#":"##########"),t&&t===n&&(i=a.split(n),o=i.pop(),a=i.join("")+n+o,t=""),c=t,t=/,/.test(n)?"¤":",",c&&(a=a.replace(YS(c,"g"),t)),u=n,n=".",u&&(a=a.replace(YS(u,"g"),n)),d=a.match(/#/g),d=d?d.length:0;const g=h.split(u);let y;g[1]&&(y=g[1].match(WS)),e.prefix=s||"",e.postfix=l||"",e.pattern=h,e.maxPrecision=y?y.length:2,e.percentage=RS.test(h),e.numericPattern=a||"",e.numericRegex=new RegExp("".concat(YS(t,null,!0),"|").concat(YS(n,null,!0)),"g"),e.groupTemp=c,e.decTemp=u,e.t=t,e.d=n,e.temp=d}class GS{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=function(e,t){if(!e||!e.qNumericalAbbreviation)return PS;const n={};return e.qNumericalAbbreviation.split(t).forEach(e=>{let t=e.split(":");2===t.length&&(n[t[0]]=t[1])}),n}(e,this.patternSeparator),this.prepare()}clone(){const e=new GS(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],$S.test(e[0])&&(r.positive.isFunctional=!0),e[1]?$S.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?$S.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1;const i="U"===this.type;r.positive.isFunctional||KS(r.positive,t,n,i),r.negative&&!r.negative.isFunctional&&KS(r.negative,t,n,i),r.zero&&!r.zero.isFunctional&&KS(r.zero,t,n,i)}formatValue(e){let t,n,r,i,o,a,s,l,c,u=this._prepared,d="",f="",h=e;if(isNaN(e))return"".concat(h);if(e=+e,!1===u.pattern)return e.toString();if(0===e&&u.zero)return u=u.zero,u.pattern;if(e<0&&u.negative?(u=u.negative,e=-e):u=u.positive,o=u.d,a=u.t,u.isFunctional)e=function(e,t,n){let r;return zS.test(t)?e=US(e,Number(/\d{2}/.exec(t)[0]),t,n):FS.test(t)?e=US(e,8,t,n):jS.test(t)?e=US(e,10,t,n):BS.test(t)?e=US(e,16,t,n):HS.test(t)?e=US(e,2,t,n):VS.test(t)&&(r="",e<0&&(r="-",e=-e),0===(e=Math.floor(e))?e="0":e<=5e5?(e=function(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}(e,t),e=r+e):e=t+r+e.toExponential(0)),e}(e,u.pattern,o);else{if(u.percentage&&(e*=100),u.abbreviate){const t=Object.keys(this.abbreviations).map(e=>parseInt(e,10)).sort((e,t)=>e-t);let 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<=u.maxPrecision?i=o:r<=n&&!(o>0&&-n<=u.maxPrecision)&&(i=r)),i&&(d=this.abbreviations[i],e/=10**i)}if(r=Math.abs(e),t=u.temp,l=u.numericPattern,c=l.split(o)[1],"I"===this.type&&(e=Math.round(e)),i=e,c||"#"!==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+1e-15*(e<0?-1:1)).toFixed(Math.min(20,c?c.length:0)).split(".")[0]);let n=l.split(o)[0];if(n+=o,e=IS(n,t)||"0",c){const t=Math.max(0,Math.min(14,c.length)),n=c.replace(/#+$/,"").length;let i=("I"===this.type?0:r%1+1e-15).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=IS(l,e)}e=e.replace(u.numericRegex,e=>e===a?u.groupTemp:e===o?u.decTemp:""),i<0&&!/^-/.test(e)&&(e="-".concat(e))}return u.prefix+e+f+d+u.postfix}static getStaticFormatter(){return{prepare(){},formatValue:e=>"".concat(e)}}}function XS(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),c=0,u=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)=>(c>=n&&(delete s[l[u]],delete l[u],c--,u++),s[e]=t,l[c]=e,c++,t),o.get=e=>s[e],o.has=e=>e in s,o.clear=()=>{s=Object.create(null),l=Object.create(null),c=0,u=0},o.size=()=>c,o}function JS(e,t,n,r,i){const o=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new GS(...t)}(i,e,t,n,r),a=XS(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 ZS="D",QS="T",ew="TS",tw=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],nw=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],rw=["January","February","March","April","May","June","July","August","September","October","November","December"],iw=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ow(e,t){for(let n=e.length;n<t;n++)e="0".concat(e);return e}function aw(e){let t=e.toString().split(".");return t[1]?(t=Number("0.".concat(t[1])),t):0}class sw{constructor(e,t,n){const r=e||{};r.qCalendarStrings||(r.qCalendarStrings={qLongDayNames:tw,qDayNames:nw,qLongMonthNames:rw,qMonthNames:iw}),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={[QS]:r.qTimeFmt||"hh:mm:ss",[ZS]:r.qDateFmt||"YYYY-MM-DD",[ew]:r.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"}[n]),this.pattern=t}clone(){const e=new sw(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=function(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"}}(e,n):(e<0&&(e=-e,t="-".concat(t)),r=function(e,t){let n,r=function(e){const t=e,n=24*aw(t),r=60*aw(n),i=60*aw(r),o=1e3*aw(i);return{d:Math.floor(t),h:Math.floor(n),m:Math.floor(r),s:Math.floor(i),f:Math.round(o)}}(e),i=r.d,o=r.h,a=r.m,s=r.s,l=r.f,c=0;/w+|t+/gi.test(t)&&(n=new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,Math.round(86400*(e-Math.floor(e))))),isNaN(n.getTime())&&(n=null)),/D+/gi.test(t)||(o+=24*i),/h+/gi.test(t)||(a+=60*o),/m+/gi.test(t)||(s+=60*a),/w+/gi.test(t)&&(c=n?n.getDay()-1:0,c<0&&(c=6));let u="";return n&&(u=n.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:c,date:i,h:o,m:a,s:s,f:l,t:u}}(e,t));const i=(o=this,a=r,{"Y+|y+":{Y:"".concat(Number("".concat(a.year).slice(-2))),YY:ow("".concat(a.year).slice(-2),2),YYY:ow("".concat(a.year).slice(-3),3),def:e=>ow("".concat(a.year),e.length)},"M+":{M:a.month+1,MM:ow("".concat(a.month+1),2),MMM:o.locale_months_abbr[a.month],def:o.locale_months[a.month]},"W+|w+":{W:a.day,WW:ow("".concat(a.day),2),WWW:o.locale_days_abbr[a.day],def:o.locale_days[a.day]},"D+|d+":{D:a.date,def:e=>ow("".concat(a.date),e.length)},"h+|H+":{h:a.h,def:e=>ow("".concat(a.h),e.length)},"m+":{m:a.m,def:e=>ow("".concat(a.m),e.length)},"s+|S+":{s:a.s,def:e=>ow("".concat(a.s),e.length)},"f+|F+":{def(e){let t="".concat(a.f),n=e.length-t.length;if(n>0)for(let e=0;e<n;e++)t+="0";else n<0&&(t=t.slice(0,e.length));return t}},"t{1,2}|T{1,2}":{def(e){let t=a.t;return e[0].toUpperCase()===e[0]&&(t=t.toUpperCase()),t=t.slice(0,e.length),t}}});var o,a;const s=[];for(const e in i)Object.prototype.hasOwnProperty.call(i,e)&&s.push(e);const l=new RegExp(s.join("|"),"g");return t.replace(l,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})}}function lw(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new sw(...t)}function cw(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=lw(arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,e,t),r=XS(n.format.bind(n),{toKey:e=>"object"==typeof e&&"function"==typeof e.getTime?e.getTime():e});function i(e){return"IV"!==t?function(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}(e):e}function o(e){return e=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=lw(i,e,t),r=XS(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 uw(){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 c=a||("dimension"===s?e=>null==e?void 0:e.qElemNo:e=>null==e?void 0:e.qValue),u="dimension"===s?"first":"avg",d=function(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return cw(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"),JS(n,r,i,o,t)}(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:c,label:e=>(null==e?void 0:e.qText)||"",reduce:u,reduceLabel:f,formatter:()=>d,tags:()=>t.qTags};return h}function dw(e,t,n,r,i){return(t[e]||[]).map((t,o)=>{const a="".concat(r?"".concat(r,"/"):"").concat(e,"/").concat(o),s={instance:uw(Gx({id:"".concat(n?"".concat(n,"/"):"").concat(a),key:a,meta:t},i))};return s.attrDims=dw("qAttrDimInfo",t,n,a,Gx({},i,{value:e=>null==e?void 0:e.qElemNo,type:"dimension"})),s.attrExps=dw("qAttrExprInfo",t,n,a,Gx({},i,{value:e=>null==e?void 0:e.qNum,type:"measure"})),s.measures=dw("qMeasureInfo",t,n,a,Gx({},i,{value:e=>null==e?void 0:e.qValue,type:"measure"})),s})}function fw(){let{key:e,data:t,config:n={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},i=t;if(!i)throw new Error('Missing "data" input');if(!i.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');const o=fw.util,a={cache:r,cube:i,localeInfo:n.localeInfo,fieldExtractor:null,pages:null,hierarchy:()=>null,virtualFields:n.virtualFields},s={key:()=>e,raw:()=>i,field:e=>function(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))}(e,a),fields:()=>r.fields.slice(),extract:e=>a.extractor(e,s,r,o),hierarchy:e=>a.hierarchy(e,s,r,o),_cache:()=>r};"K"===i.qMode||"T"===i.qMode||!i.qMode&&i.qNodesOnDim?(a.extractor=NS,a.hierarchy=OS,a.pages="K"===i.qMode?i.qStackedDataPages:i.qTreeDataPages):"S"===i.qMode?(a.extractor=Qx,a.pages=i.qDataPages,a.hierarchy=OS):a.extractor=()=>[],a.fieldExtractor=e=>a.extractor({field:e},s,r,o);const l="S"===i.qMode?e=>e.qElemNumber:void 0,c="S"===i.qMode?e=>e.qNum:void 0;r.wrappedFields.push(...dw("qDimensionInfo",i,e,"",Gx({},a,{value:l,type:"dimension"}))),r.wrappedFields.push(...dw("qMeasureInfo",i,e,"",Gx({},a,{value:c,type:"measure"}))),r.fields=r.wrappedFields.map(e=>e.instance);const u=e=>{e.forEach(e=>{r.allFields.push(e.instance),u(e.measures),u(e.attrDims),u(e.attrExps)})};return u(r.wrappedFields),(n.virtualFields||[]).forEach(t=>{const n=s.field(t.from),i=uw(jx({meta:n.raw(),id:"".concat(e,"/").concat(t.key),sourceField:n,fieldExtractor:e=>a.extractor({field:e},s,r,o),key:t.key,type:n.type(),localeInfo:a.localeInfo,value:n.value},t.override||{}));r.virtualFields.push(i)}),r.allFields.push(...r.virtualFields),s}const hw=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],pw=/\/qDimensionInfo(?:\/(\d+))?/,mw=/\/qMeasureInfo\/(\d+)/,gw=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,yw=/\/qAttrExprInfo\/(\d+)/,vw=/\/?qHyperCube/,bw=/\/?qTreeData/,xw=e=>"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14)),Sw=e=>"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13));function ww(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=function(e,t){let n=e,r=-1,i=-1,o="",a=e=>e;vw.test(e)?(o="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),a=xw):bw.test(e)&&(o="".concat(n.substr(0,n.indexOf("qTreeData")+9)),a=Sw);let s=!0;if(pw.test(e)&&(r=+pw.exec(e)[1]),mw.test(e)&&(i=+mw.exec(e)[1]),gw.test(e)){i=-1,r=0;const e=+gw.exec(n)[2];isNaN(e)||(r=e,n=n.replace(/\/\d+$/,"")),s=!1}if(yw.test(e)){const e=i;if(t){i=0;const a=mS(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+=+yw.exec(n)[1]}else r>-1?(r=-1,i=+yw.exec(n)[1]):i+=+yw.exec(n)[1]+1}return hw.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}}(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===(c=t.orMode)||void 0===c||c]}),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 c}function Mw(e){fw.util=e.data("matrix").util,e.data("q",fw),e.formatter("q-number",JS),e.formatter("q-time",cw)}function kw(e){var t=Cx(e.layout||{},e.path.split("/").join("."));if(!t)return!1;var n=t.qIsOneAndOnlyOne;return void 0!==n&&n}function Cw(e){var t=e.brush,n=e.colorField,r=e.legendAlias,i=e.useLegendCube,o=void 0!==i&&i;!n||/qAttrDimInfo/.test(n)?(t.removeKeyAlias("attrDim/qDimensionInfo/0"),r&&t.removeKeyAlias(r),t.addKeyAlias("attrDim/qDimensionInfo/0","qHyperCube/".concat(n))):o&&t.addKeyAlias(r,"qHyperCube/".concat(n))}Mw.qBrushHelper=ww,Mw.selections=ww;var qw="Shift";var Ew=function(e,t){return t[e]?Ew(e+1,t):e},Dw=function(e,t){var n=t.reduce(function(e,t){return e[t]=!0,e},{});return e.reduce(function(e,t,r){var i=Ew(r,n);return n[i]=!0,e[r]=i,e},{})};function Tw(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.layout,n=e.filtered,r=void 0===n?{}:n,i=(null==t?void 0:t.qHyperCube)||{},o=i.qDimensionInfo,a=void 0===o?[]:o,s=i.qMeasureInfo,l=void 0===s?[]:s;return{dimensions:Dw(a,r.dimensions||[]),measures:Dw(l,r.measures||[])}}function Ow(e){var t=e.selection,n=e.fieldMap,r=t.method,i=t.params;if("selectHyperCubeValues"===r){var o=n.dimensions[i[1]];void 0!==o&&(i[1]=o)}return"selectHyperCubeContinuousRange"===r&&i[1].forEach(function(e){var t=n.dimensions[e.qDimIx];void 0!==t&&(e.qDimIx=t)}),t}var Nw=[],Aw=0,_w=function(e){var t=Nw.filter(function(e){var t;return null===(t=e.selections)||void 0===t?void 0:t.isActive()});t.length&&("Enter"===e.key?t.forEach(function(e){return e.selections.confirm()}):"Escape"!==e.key&&"Esc"!==e.key||t.forEach(function(e){return e.selections.cancel()}))};function Iw(e){var t=e.chart,n=e.document,r=e.selectionInfo,i=e.eventName,o=e.componentName,a=e.brushName,s=void 0===a?"selection":a,l=e.emit,c=void 0===l?"rangeClear":l,u=r.event===i,d=n.querySelector("[data-key='".concat(o,"-edge-0']"));if(u||!d)return!1;var f=t.component(o);return!!f&&(f.emit(c),"string"==typeof s&&t.brush(s).clear(),f)}var Lw=["chart","document","selections","selectionInfo"],Pw=function(e){e.chart,e.document,e.selections,e.selectionInfo;var t=cy(e,Lw);t.clearDiscrete(),t.clearContinuous(),t.clearMinor(),t.clearRange(),t.clearTap(),t.clearLegend()};function Rw(e){var t,n=e.lasso;null!=n&&null!==(t=n.active)&&void 0!==t&&t.call(n)&&(null==n||n.action(!1))}function zw(e){var t,n=e.chart,r=e.selectionInfo,i=e.selectionActions,o=e.actions,a=void 0===o?{}:o,s=e.selections,l=e.selectionEvents;if(!1===i||!1===l)return function(){};var c=i.reset,u=void 0===c?Rw:c,d=i.clear,f=!1!==d&&function(e){var t=e.clear,n=void 0===t?Pw:t,r=e.selections,i=e.selectionInfo,o=e.chart;return function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).cleared,t={selections:r,selectionInfo:i,chart:o,document:document,cleared:e};return n(ly({clearDiscrete:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.eventName,o=void 0===i?"discreteRange":i,a=e.componentName,s=void 0===a?"discrete-range-brush":a,l=e.cleared;return Iw({selectionInfo:t,chart:n,document:r,eventName:void 0!==l&&l?void 0:o,componentName:s,emit:"areaClear",brushName:e.brushName})}(ly(ly({},t),e))},clearContinuous:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.eventName,o=void 0===i?"continuousRange":i,a=e.componentName,s=void 0===a?"continuous-range-brush":a,l=e.cleared;return Iw({selectionInfo:t,chart:n,document:r,eventName:void 0!==l&&l?void 0:o,componentName:s,brushName:e.brushName})}(ly(ly({},t),e))},clearMinor:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.componentName,o=void 0===i?"minor-range-brush":i,a=e.eventName,s=void 0===a?"minorRange":a,l=e.cleared,c=void 0!==l&&l,u=e.brushName,d=Iw({selectionInfo:t,chart:n,document:r,eventName:c?void 0:s,componentName:o,brushName:void 0!==u&&u});if(d){var f=d.settings.settings,h=f.scale,p=f.brush,m=n.scale(h).data().fields.map(function(e){return e.id()}),g=n.brush(p),y=g.brushes().filter(function(e){return"range"===e.type&&m.some(function(t){return t===e.id})});g&&y.length&&y.forEach(function(e){g.removeRanges(e.brush.ranges().map(function(t){return{key:e.id,range:t}}))})}}(ly(ly({},t),e))},clearRange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.selections,o=e.eventName,a=void 0===o?"xAxis":o,s=e.cleared;Iw({selectionInfo:t,chart:n,document:r,eventName:void 0!==s&&s?void 0:a,componentName:"".concat(a,"-range-brush"),emit:"areaClear",brushName:!1})&&i.clear()}(ly(ly({},t),e))},clearTap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.chart,n=e.selectionInfo,r=e.selections,i=e.events,o=void 0===i?["tap"]:i,a=e.brushNames,s=void 0===a?[]:a;if(n&&o.includes(n.event)){var l=n.currentComponent;n.previousComponent!==l&&(r.clear(),s.forEach(function(e){return t.brush(e).end()}))}}(ly(ly({},t),e))},clearLegend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.selections,o=e.eventName,a=void 0===o?"legendRange":o,s=e.componentName,l=void 0===s?"legend-range-brush":s,c=e.cleared,u=void 0!==c&&c,d=e.brushName;Iw({selectionInfo:t,chart:n,document:r,eventName:u?void 0:a,componentName:l,brushName:void 0!==d&&d})&&i.clear()}(ly(ly({},t),e))}},t))}}({clear:d,selections:s,selectionInfo:r,chart:n}),h=function(e){var t=e.chart,n=e.actions,r=e.reset,i=e.clear,o=!1,a={deactivated:function(e){var t=(n||{}).lasso;r({e:e,lasso:void 0!==t&&t})},canceled:function(e){var o=(n||{}).lasso;r({e:e,lasso:void 0!==o&&o}),i({e:e,chart:t,document:document})},cleared:function(e){o||(o=!0,i({e:e,chart:t,document:document,cleared:!0}),o=!1)}};return!1===r&&delete a.deactivated,!1===i&&delete a.cleared,!1===r&&!1===i&&delete a.canceled,a}({chart:n,clear:f,reset:u,actions:a}),p={};Object.entries(h).forEach(function(e){var t=fy(e,2),n=t[0],r=t[1];p[n]=function(e,t){return t?function(n){return t({event:n,defaultFunc:e})}:e}(r,l[n])});var m=function(e){var t=e.selectionEvents,n=e.selections,r=e.selectionInfo,i=e.clear,o=e.chart,a=e.document,s=t.start,l={selections:n,selectionInfo:r,chart:o,document:a},c=function(e){return Object.assign(r,e||{})},u=function(e){var t=e.event,n=e.components;return function(){return function(e){var t=e.selectionInfo,n=e.clear,r=e.event,i=e.components,o=void 0===i?[]:i;(0,e.setSelectionInfo)(ly(ly({},void 0===t?{}:t),{},{event:r,components:o.map(function(e){return e.key}).filter(Boolean)})),n()}({event:t,components:n,clear:i,selectionInfo:r,setSelectionInfo:c})}};return"function"==typeof s?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];s(ly(ly({defaultFunc:u({event:e,components:t}),setSelectionInfo:c,clear:i},l),{},{event:e,components:t}))}:function(e){u({event:e,components:arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]})()}}({selectionEvents:l,selections:s,selectionInfo:r,clear:f,chart:n,document:document});return null==a||null===(t=a.select)||void 0===t||t.on("start",m),Object.entries(p).forEach(function(e){var t=fy(e,2),n=t[0],r=t[1];null==s||s.on(n,r)}),function(){var e;null==a||null===(e=a.select)||void 0===e||e.removeListener("start",m),Object.entries(p).forEach(function(e){var t=fy(e,2),n=t[0],r=t[1];null==s||s.removeListener(n,r)})}}var Fw=[{key:"qHyperCube/qDimensionInfo/0:numeric",includeMax:!1}];function jw(e){var t=e.chart,n=e.actions,r=e.selections,i=e.picassoQ,o=e.config,a=o.allowSimultaneous,s=void 0!==a&&a,l=o.majorScale,c=void 0===l?void 0:l,u=o.selectionActions,d=void 0===u?{}:u,f=d.clear,h=d.reset,p=o.selectionEvents,m=void 0===p?{deactivated:void 0,canceled:void 0,cleared:void 0,start:void 0}:p,g=o.brushEvents,y=void 0===g?{}:g,v=o.brushName,b=void 0===v?"selection":v,x=o.brushMaxListeners,S=void 0===x?20:x,w=o.brushRanges,M=void 0!==w&&w,k=o.interceptors,C=void 0===k?{}:k,q=o.selectionsFn,E=void 0===q?i.selections:q,D=t.brush(b);if("number"==typeof S&&D.setMaxListeners(S),M){var T=!0===M?Fw:M;D.configure({ranges:T})}var O={canSelect:!0,getIsSelectionLocked:!1,isInnerDimensionLocked:!1,lockedDimensions:[],singleSelectIndex:0,selectionInfo:{colorField:void 0,components:[],event:void 0,currentComponent:void 0,previousComponent:void 0}},N=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.selections,r=t.brush,i=t.majorScale,o=t.actions,a=t.selectionsFn,s=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).path,l=void 0===s?"/qHyperCubeDef":s;if(!n)return{layout:function(){},filteredFields:function(){},allowSimultaneous:function(){},release:function(){}};var c=++Aw,u=null,d={dimensions:[],measures:[]},f=[],h={};n.on=n.on.bind(n),n.isActive=n.isActive.bind(n),n.addListener=n.addListener.bind(n),n.removeListener=n.removeListener.bind(n);var p=function(e){var t=e.brush,n=e.getConfig;return{interceptor:function(e){var r=t.brushes(),i=n(),o=i.allowSimultaneous,a=i.layout,s=void 0===a?{}:a;r.forEach(function(n){var r,i,a;("range"===n.type||null!==(r=e[0])&&void 0!==r&&r.key&&(null===(i=e[0])||void 0===i?void 0:i.key)!==n.id&&0!==o.indexOf(null===(a=e[0])||void 0===a?void 0:a.key))&&t.clear([])});var l=e.filter(function(e){return-2!==e.value});if(l.length>1){var c=function(e){var t=e.layout,n=void 0===t?{}:t,r=e.values,i=void 0===r?[]:r;if(null==i||!i.length)return[];var o=Array.from(new Set(i.map(function(e){return e.key}))),a=[];return o.forEach(function(e){var t=kw({layout:n,path:e}),r=i.filter(function(t){return t.key===e}),o=t?[r.pop()]:r;a.push.apply(a,hy(o))}),a.filter(Boolean)}({layout:s,values:l});return c}return l},rangeInterceptor:function(e){var r=t.brushes(),i=n().allowSimultaneous;return r.filter(function(e){return"value"===e.type}).length?(t.clear([]),e):(r.forEach(function(n){var r=n.id===e[0].key||i.includes(n.id)&&i.includes(e[0].key);"range"!==n.type||r||t.clear([])}),e)}}}({brush:r,getConfig:function(){return{layout:u,allowSimultaneous:f}}}),m=p.rangeInterceptor,g=p.interceptor;r.intercept("set-ranges",m),r.intercept("toggle-ranges",m),r.intercept("toggle-values",g),r.intercept("set-values",g),r.intercept("add-values",g),r.on("start",function(){return n.begin(l)});var y={activate:function(){},deactivated:function(){return r.end()},cleared:function(){return r.clear()},canceled:function(){return r.end()}};!function(e,t){Object.keys(t).forEach(function(n){e.on(n,t[n])})}(n,y);var v=null==i||null===(e=i.max)||void 0===e?void 0:e.call(i);return null!=o&&o.select?(o.select.on("start",function(){var e;r.start(),"function"==typeof o.select.getBrushOptions&&(h=(e=o.select).getBrushOptions.apply(e,arguments))}),o.select.on("end",function(){var e=a(r,h,u),t=Tw({layout:u,filtered:d});e.forEach(function(e){var r=Ow({selection:e,fieldMap:t});(function(e,t,n){if(t&&void 0!==n&&"selectHyperCubeContinuousRange"===e.method){var r=e.params;if(r&&r[1]&&r[1][0]){var i=r[1][0],o=i.qDimIx,a=i.qRange;"undefined"!==o&&a&&!1===a.qMaxInclEq&&a.qMax>=n&&(a.qMaxInclEq=!0)}}})(r,o.select.brushSelectionIncludeMax,v),n.select(r)})})):r.on("update",function(){var e=a(r,h,u),t=Tw({layout:u,filtered:d});e.forEach(function(e){n.select(Ow({selection:e,fieldMap:t}))})}),0===Nw.length&&document.addEventListener("keyup",_w),Nw.push({key:c,selections:n}),{layout:function(e){u=e},filteredFields:function(e){d=e},allowSimultaneous:function(e){f=e},release:function(){u=null;var e=Nw.indexOf(Nw.filter(function(e){return e.key===c})[0]);-1!==e&&Nw.splice(e,1),Nw.length||document.removeEventListener("keyup",_w),function(e,t){Object.keys(t).forEach(function(n){e.removeListener(n,t[n])})}(n,y)}}}({brush:D,majorScale:c,actions:n,selections:r,picassoQ:i,selectionsFn:E});!function(e){var t=e.brush,n=e.interceptors,r=void 0===n?{}:n;Object.entries(r).forEach(function(e){var n=fy(e,2),r=n[0],i=n[1];(Array.isArray(i)?i:[i]).forEach(function(e){t.intercept(r,e)})})}({brush:D,interceptors:C});var A=function(e){var t=e.chart,n=e.selectionActions,r=e.brush,i=e.actions,o=e.selectionInfo,a=e.selections,s=e.selectionEvents,l=function(e){var t=e.brush,n=e.chart,r=e.selectionInfo,i=e.brushEvents,o=void 0===i?{}:i,a=Object.entries(o).map(function(e){var i=fy(e,2),o=i[0],a=i[1],s=function(){return a({chart:n,selectionInfo:r})};return t.on(o,s),[o,s]});return function(){a.forEach(function(e){var n=fy(e,2),r=n[0],i=n[1];t.removeListener(r,i)})}}({brush:r,chart:t,selectionInfo:o,brushEvents:e.brushEvents}),c=zw({chart:t,selectionInfo:o,selectionActions:n,actions:i,selections:a,selectionEvents:s}),u=function(e){var t=e.actions;if(null==t||!t.lasso)return function(){};var n=!1,r=function(e){n||e.key!==qw||(t.lasso.action(!0),n=!0)},i=function(e){e.key===qw&&(t.lasso.action(!1),n=!1)};return document.addEventListener("keydown",r),document.addEventListener("keyup",i),function(){document.removeEventListener("keydown",r),document.removeEventListener("keyup",i)}}({actions:i});return function(){l(),c(),u()}}({chart:t,brush:D,actions:n,selections:r,selectionInfo:O.selectionInfo,selectionActions:{clear:f,reset:h},selectionEvents:m,brushEvents:y});if(s){var _=!0===s?hy(Array(15)).map(function(e,t){return"qHyperCube/qMeasureInfo/".concat(t)}):s;N.allowSimultaneous(_)}return{unbindEvents:A,state:O,picassoSelections:N,brush:D}}var Bw=["colorField","useLegendCube"];function Hw(e){var t=e.chart,n=e.selections,r=e.actions,i=void 0!==r&&r,o=e.config,a=void 0===o?{}:o,s=jw({chart:t,actions:i,selections:n,picassoQ:Mw,config:a}),l=s.unbindEvents,c=s.state,u=s.picassoSelections,d=s.brush,f=a.custom,h=void 0===f?{}:f,p=a.legendAlias,m=void 0===p?void 0:p,g=a.setBrushAliases,y=void 0===g?Cw:g;return{getIsDimensionLocked:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return c.lockedDimensions[e]},getIsSelectionLocked:function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return null!==(e=null==n||null===(t=n.isLocked)||void 0===t?void 0:t.call(n))&&void 0!==e?e:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(null==e||!e.length)return!1;var t=e.filter(function(e){return"object"===py(e.data)&&Array.isArray(e.data.fields)}).every(function(e){return e.data.fields.every(function(e){var t=e.raw();return!(!t.qLocked&&t.qCardinal)})});return t}(r)},getIsSingleSelect:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c.singleSelectIndex;return c.singleSelectDimensions[e]},getCanSelect:function(){return c.canSelect},getSelectionsObject:function(){return n},getSelectionInfo:function(){return c.selectionInfo},setLayout:function(e){var t=function(e){var t,n,r,i=e.selections,o=e.picassoSelections,a=e.layout,s={lockedDimensions:[],singleSelectDimensions:[]};null!=i&&null!==(t=i.isModal)&&void 0!==t&&t.call(i)&&i.confirm(),o.layout(a);var l=(null!==(n=null==a?void 0:a.qHyperCube)&&void 0!==n?n:{}).qDimensionInfo,c=void 0===l?[]:l;return s.lockedDimensions=c.map(function(e){return!!e.qLocked}),s.singleSelectDimensions=c.map(function(e,t){return kw({layout:a,path:"qHyperCube/qDimensionInfo/".concat(t)})}),s.singleSelectIndex=function(e){var t,n=((null==e?void 0:e.qHyperCube)||{}).qDimensionInfo,r=void 0===n?[]:n,i=r.map(function(e,t){var n;return!(e.qLocked||(null===(n=e.qCardinalities)||void 0===n?void 0:n.qHypercubeCardinal)<=1)&&t}).filter(function(e){return"number"==typeof e});return null!==(t=i[0])&&void 0!==t?t:Math.max(r.length-1,0)}(a),s.canSelect=0===c.length||c.some(function(e){return!e.qLocked}),s.dimensionLocked=!(null===(r=c[0])||void 0===r||!r.qLocked),s}({selections:n,picassoSelections:u,layout:e});Object.assign(c,t)},setFilteredFields:function(e){u.filteredFields(e)},setBrushAliases:function(e){var t=e.colorField,n=e.useLegendCube,r=void 0!==n&&n,i=cy(e,Bw),o=ly({useLegendCube:r,colorField:t,brush:d,legendAlias:m},i);y(ly(ly({},o),{},{defaultFunc:function(){return Cw(o)}}))},destroy:function(){l(),u.release()},custom:ly({},h)}}var Vw="'Source Sans Pro', 'Arial', 'sans-serif'",$w="#333333",Ww="#595959",Uw="#737373",Yw="#cccccc",Kw="#e6e6e6";function Gw(e){var t={};return[].concat(hy(e),hy([["","","color"],["object","","fontFamily"],["object","axis.label.name","color",Ww],["object","axis.label.name","fontFamily",Vw],["object","axis.label.name","fontSize","12px"],["object","axis.line.major","color",Yw],["object","axis.line.minor","color",Kw],["object","axis.title","color"],["object","axis.title","fontFamily",Vw],["object","axis.title","fontSize","13px"],["object","grid.line.highContrast","color",Kw],["object","grid.line.major","color",Yw],["object","grid.line.minor","color",Kw],["object","label.value","color",Ww],["object","label.value","fontFamily",Vw],["object","label.value","fontSize","12px"],[!1,"label.value","darkColor",Ww],[!1,"label.value","lightColor",Kw],["object","outOfRange","color","#999"],["object","legend.title","color",$w],["object","legend.title","fontFamily",Vw],["object","legend.title","fontSize","15px"],["object","legend.label","color",Ww],["object","legend.label","fontFamily",Vw],["object","legend.label","fontSize","13px"],["object","referenceLine.label.name","color",$w],["object","referenceLine.label.name","fontFamily",Vw],["object","referenceLine.label.name","fontSize","12px"],["object","referenceLine.outOfBounds","color",Kw],["object","referenceLine.outOfBounds","fontFamily",Vw],["object","referenceLine.outOfBounds","fontSize","12px"],["object","referenceLine.outOfBounds","backgroundColor",Uw,function(e){return"transparent"===e?Uw: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 Xw=function(e){return e};function Jw(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=fy(t,2),r=n[0],i=n[1];return e[r]=i,e},{});return o.forEach(function(e){var r=fy(e,5),i=r[0],o=r[1],l=r[2],c=r[3],u=r[4],d=void 0===u?function(e){return e}:u,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:c}),h=(s["".concat(o,".").concat(l)]||Xw)(d(f));Ex(a,[o,l].filter(Boolean).join("."),h)}),i.forEach(function(e){var t=fy(e,2),n=t[0],r=t[1];Ex(a,n,r)}),a}var Zw={NOOP:function(){},FALSE:function(){return!1},ARRAY:function(){return[]},OBJECT:function(){return{}}},Qw="chart-modules-tooltip",eM="#".concat(Qw);function tM(){if(!document.querySelector(eM)){var e=document.createElement("div");e.id=Qw,e.setAttribute("data-qs-css",""),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 nM(e){return{show:!0,key:e.key,type:"tooltip",layout:{displayOrder:3},beforeMount:function(){tM()},beforeUpdate:function(){tM()},destroyed:function(){var e;null!=(e=document.querySelector(eM))&&e.parentElement&&e.childElementCount<1&&e.parentElement.removeChild(e)},settings:{appendTo:function(){return document.querySelector(eM)},direction:e.rtl?"rtl":"ltr",duration:e.duration},style:{arrow:{color:"#404040"},content:{display:"table","border-spacing":"4px",background:"rgba(64, 64, 64, 0.9)",opacity:"1",fontSize:"13px",fontFamily:"'Source Sans Pro', 'Arial', 'sans-serif'","empty-cells":"show"},cell:{"max-width":"180px","word-break":"break-word","word-wrap":"break-word","overflow-wrap":"break-word",hyphens:"auto"}}}}var rM="position",iM={bar:"rect",diamond:"path",point:"circle",square:"rect",triangle:"path","n-polygon":"path",slice:"path"},oM=function(e){return e.data.value},aM=function(e){var t,n=e.data;return null==n||null===(t=n.major)||void 0===t?void 0:t.value};function sM(e){var t=e.chart,n=e.expando,r=e.nodes,i=e.collectConfig,o=e.collectibles,a=e.meta,s=i.from,l={chart:t,expando:n,nodes:r,collectConfig:i,collectibles:o,meta:a};switch("function"==typeof s?"custom":s){case"single":return function(e){var t=fy(e.nodes,1)[0];if("container"===t.type&&t.children[0]){var n=fy(t.children,1)[0];return n.key=t.key,[n]}return[t]}(l);case"position":return function(e){var t=e.collectibles,n=e.meta;return e.chart.shapesAt(n.position.absolute,{components:t.map(function(e){return{key:e.key}})})}(l);case"dimension":return function(e){var t=e.chart,n=e.nodes,r=e.collectConfig,i=e.collectibles,o=e.meta,a=fy(n,1)[0],s=r.filter,l=r.after,c="function"==typeof s?s:function(){return!0},u="function"==typeof l?l:function(){},d=i.reduce(function(e,n){var i=iM[n.type]||n.type;return e.push.apply(e,hy(t.findShapes(i).filter(function(e){return e.key===n.key&&e.data&&function(e){var t=e.meta,n=e.collectible,r=e.nodes,i=e.collectConfig.by,o=void 0===i?oM:i,a=n.major,s=void 0===a?aM:a,l=o({data:r.triggerer.data}),c=s({data:r.candidate.data,meta:t}),u=Array.isArray(l),d=Array.isArray(c);return u&&d?l.length===c.length&&l.every(function(e,t){return e===c[t]}):!u&&!d&&l===c}({collectConfig:r,meta:o,collectible:n,nodes:{triggerer:a,candidate:e}})}))),e},[]).filter(c);return u({collected:d,triggerer:a}),d}(l);case"radius":return function(e){var t=e.chart,n=e.collectConfig,r=e.collectibles,i=e.meta,o=fy(e.nodes,1)[0].localBounds,a=n.distance,s=n.filter,l="function"==typeof s?s:function(){return!0},c=r.map(function(e){return e.key});return t.shapesAt({cx:i.position.absolute.x,cy:i.position.absolute.y,r:a||Math.max(o.width,o.height)},{components:c.map(function(e){return{key:e}})}).filter(l)}(l);case"custom":return function(e){var t=e.chart,n=e.expando,r=e.nodes,i=e.meta;return e.collectConfig.from({chart:t,expando:n,nodes:r,meta:i})}(l);default:return[]}}var lM=Number.MAX_VALUE;function cM(e){var t=e.nodes.filter(function(e){return e.bounds.height+e.bounds.width!==0}).reduce(function(e,t){var n=t.bounds;return e.xMin=Math.min(e.xMin,n.x,n.x+n.width),e.yMin=Math.min(e.yMin,n.y,n.y+n.height),e.xMax=Math.max(e.xMax,n.x,n.x+n.width),e.yMax=Math.max(e.yMax,n.y,n.y+n.height),e},{xMin:lM,xMax:-lM,yMin:lM,yMax:-lM}),n=t.xMin,r=t.xMax,i=t.yMin;return{x:n,y:i,width:r-n,height:t.yMax-i}}function uM(e){var t=e.chart,n=e.config,r=e.expando,i=e.internal,o=e.nodes;if(!o.length)return[];var a=fy(o,1)[0].key,s=n.main.collectibles.filter(function(e){return!e.if||e.if()});if(!s.length)return[];var l=n.main.triggers.find(function(e){return-1!==e.keys.indexOf(a)})||{},c=l.collect,u=l.placement;if(!c||!c.from||!u)return[];var d={triggerer:a,position:i.get(rM)},f=(sM({chart:t,expando:r,nodes:o,collectConfig:c,collectibles:s,meta:d})||[]).map(function(e){return e.children.length?e.children[0]:e});return f.length?function(e){var t=e.chart,n=e.config,r=e.expando,i=e.placementConfig,o=e.hovered,a=e.collected,s=e.meta,l=function(e){for(var t=e.chart,n=e.config,r=e.expando,i=e.placementConfig,o=e.hovered,a=e.collected,s=e.meta,l=fy(o,1)[0],c=Array.isArray(i)?i:[i],u={bounds:l.bounds,key:l.key},d=cM({nodes:a}),f=0;f<c.length;f++){var h=c[f];if("function"==typeof h){var p=h({chart:t,expando:r,hovered:o,collected:hy(a),meta:s,collectedBounds:d,combineBounds:cM});if(p)return p}if("trigger"===h)return u;if("collectible"===h){var m=n.main.placements.collectible;return{bounds:"function"==typeof m?m({collected:hy(a)}):d,key:a[0].key}}}return u}({chart:t,config:n,expando:r,placementConfig:i,hovered:o,collected:a,meta:s}),c=l.bounds,u=l.key,d=fy(a,1)[0].desc;return[{bounds:c,nodes:a,data:a.map(function(e){return e.data}),key:u,meta:s,desc:d}]}({chart:t,config:n,expando:r,placementConfig:u,hovered:o,collected:f,meta:d}):[]}var dM=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),fM=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞יִײַ-ﬨשׁ-ﭏ]"),hM=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),pM=function(e){return dM.test(e)},mM=function(e){return fM.test(e)||hM.test(e)};function gM(e){for(var t=e?e.length:0,n=0;n<t;n++){var r=e[n];if(pM(r))return"ltr";if(mM(r))return"rtl"}return"ltr"}function yM(e){var t=e.config,n=e.h,r=e.context,i={section:function(e){return function(e){return{type:"section",content:e.content}}({content:e.content})},text:function(e){var n=e.value,r=e.style,i=e.visibility;return function(e){var t=e.config,n=e.value,r=e.style,i=void 0===r?{}:r,o=i.bold,a=void 0!==o&&o,s=i.italic,l=e.visibility;return{type:"text",content:[{content:n,style:{"font-weight":a?"bold":"normal","font-style":void 0!==s&&s?"italic":"normal","text-align":t.rtl?"right":"left",direction:gM(n),"white-space":"pre-wrap"},colspan:2}],visibility:ly(ly({},{count:!0}),l)}}({config:t,value:n,style:r,visibility:i})},measure:function(e){var r=e.label,i=e.value,o=e.color,a=e.style,s=e.survive,l=e.visibility;return function(e){var t,n,r,i,o=e.h,a=e.label,s=e.value,l=e.color,c=e.style,u=e.survive,d=e.visibility,f=e.config.rtl,h=o("div",{style:{display:"inline-block",width:10,height:10,"background-color":l,margin:"0 8px"}});return{type:"measure",label:a,value:s,content:[{content:f?[":",a]:[a,":"],style:{"text-align":f?"right":"left","font-weight":null!=c&&null!==(t=c.label)&&void 0!==t&&t.bold?"bold":"normal","font-style":null!=c&&null!==(n=c.label)&&void 0!==n&&n.italic?"italic":"normal",direction:gM(a)}},{content:l?f?[s,h]:[h,s]:s,style:{"text-align":f?"left":"right","vertical-align":"middle","font-weight":null!=c&&null!==(r=c.value)&&void 0!==r&&r.bold?"bold":"normal","font-style":null!=c&&null!==(i=c.value)&&void 0!==i&&i.italic?"italic":"normal",direction:gM(s)}}],survive:ly(ly({},{color:!1,duplicate:!1}),u),visibility:ly(ly({},{count:!0}),d)}}({config:t,h:n,label:r,value:i,color:o,style:a,survive:s,visibility:l})},divider:function(){return function(e){var t=e.visibility;return{type:"divider",content:[{content:"",style:{"background-image":"linear-gradient(transparent 8px, rgba(255, 255, 255, 0.4) 8px, rgba(255, 255, 255, 0.4) 9.2px, transparent 9.2px)",height:"17px"},colspan:2}],visibility:ly(ly({},{count:!1}),t)}}({visibility:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).visibility})},row:function(e){return function(e){var t=e.visibility;return{type:"row",content:[{content:e.content,style:e.style,colspan:e.colspan}],visibility:ly(ly({},{count:!0}),t)}}({content:e.content,style:e.style,colspan:e.colspan,visibility:e.visibility})},raw:function(e){return function(e){var t=e.visibility;return{type:"raw",content:e.value,visibility:ly(ly({},{count:!0}),t)}}({value:e.value,visibility:e.visibility})},color:function(e){var i=e.nodes,o=e.property,a=e.filter,s=void 0===a||a,l=e.visibility,c=e.fillColor;return function(e){var t=e.config,n=e.h,r=e.context,i=e.nodes,o=e.property,a=e.filter,s=e.visibility,l=e.fillColor,c=t.rtl,u={type:"color",label:void 0,value:void 0,content:[],filter:a,visibility:ly(ly({},{count:!0}),s)},d=t.getColorSettings();if("color"===d.type||!d.fieldType)return u;var f=fy(i,1)[0];if(u.value=function(e){var t=e.config,n=e.context,r=e.property,i=e.node,o=i.data[r];if(o){if(-3===i.data.value)return i.data.label;var a=n.resources.dataset(o.source.key).field(o.source.field).formatter(),s=o.value,l=o.label,c=t.getColorSettings();if(a&&"measure"===c.fieldType)return Number.isNaN(+s)?"-":a(o.value);var u=l||s;return void 0===u||Number.isNaN(u)||"NaN"===u?"-":u}}({config:t,context:r,property:o,node:f}),void 0===u.value)return u;u.label=function(e){var t=e.context,n=e.property,r=e.node,i=e.config.getColorSettings();if(i.label)return i.label;var o=r.data[n];if(o&&"color"!==i.type){var a=t.resources.dataset,s=o.source,l=s.key,c=s.field;return a(l).field(c).title()}}({config:t,context:r,property:o,node:f});var h=null!=l?l:function(e){var t=e.node.attrs;return(null==t?void 0:t.fill)||"#ddd"}({node:f}),p=n("div",{style:{display:"inline-block",width:10,height:10,"background-color":h,margin:"0 8px"}});return u.content.push({content:c?[":",u.label]:[u.label,":"],style:{"text-align":c?"right":"left",direction:gM(u.label)}},{content:c?[u.value,p]:[p,u.value],style:{"text-align":c?"left":"right","vertical-align":"middle",direction:gM(u.value)}}),u}({config:t,h:n,context:r,nodes:i,property:o,filter:s,visibility:l,fillColor:c})}};return i}function vM(e){var t=e.chart,n=e.translator,r=e.config,i=e.expando,o=e.h,a=e.data,s=e.style,l=fy(a,1)[0],c=function(e){var t=e.config,n=e.nodes.reduce(function(e,n){var r=t.main.getGroupByValue({data:n.data});return e[r]||(e[r]={sorting:Object.keys(e).length,items:[]}),e[r].items.push(n),e},{});return Object.keys(n).map(function(e){return n[e]}).sort(function(e,t){return e.sorting-t.sorting}).map(function(e){return e.items})}({config:r,nodes:l.node.nodes}),u=function(e){var t=e.chart,n=e.config,r=e.expando,i=e.h,o=e.context,a=e.groups,s=o.node.meta,l=o.resources,c=l.dataset,u=l.formatter,d=yM({config:n,h:i,context:o}),f=function(e){var t=e.dataset;return{dataset:{title:function(e,n){return t(e).field(n).title()}}}}({dataset:c}),h=a.map(function(e){var t=d.section({content:hy((n.main.section({expando:r,h:i,nodes:e,dataset:c,formatter:u,meta:s,create:d,util:f})||[]).filter(function(e){var t;return null===(t=e.content)||void 0===t?void 0:t.length})).filter(Boolean)});return t.content=function(e){var t=e.config,n=e.content,r=n.find(function(e){return"color"===e.type&&e.filter}),i=r?n.filter(function(e){return"measure"!==e.type||e.survive.color||e.label!==r.label||e.value!==r.value}):n;return t.main.showDuplicateMeasures?i:i.reduce(function(e,t){var n=t.type,r=t.survive;if("measure"!==n||r.duplicate)return e.filtered.push(t),e;var i="".concat(t.label,"-").concat(t.value);return e.memory[i]||(e.memory[i]=!0,e.filtered.push(t)),e},{memory:{},filtered:[]}).filtered}({config:n,content:t.content}),t});return n.main.sections({chart:t,expando:r,h:i,nodes:o.node.nodes,dataset:c,formatter:u,meta:s,create:d,util:f,sections:h}),h.filter(Boolean)}({chart:t,config:r,expando:i,h:o,context:l,groups:c}),d=function(e){var t=e.translator,n=e.config,r=e.context,i=e.templates,o=n.main.layout,a=o.rows,s=o.grouping,l=o.single,c=function(e){var t=e.limit,n=e.grouping,r=e.single,i={count:0,overflow:0,index:{started:void 0,group:void 0}};return{process:function(e){var o=e.visibility,a=e.index;if(r&&0!==a)return n?(i.index.started!==a&&i.index.group!==a&&(i.overflow++,i.index.group=a),!1):(i.overflow++,!1);if(i.count>=t){if(!n)return i.overflow++,!1;if(i.index.started!==a)return i.index.group!==a&&(i.overflow++,i.index.group=a),!1}return o.count&&i.count++,n&&(i.index.started=a),!0},overflow:function(){return i.overflow}}}({limit:a,grouping:s,single:"function"==typeof l?l({meta:r.node.meta,sections:i}):l}),u=i.reduce(function(e,t,n){var r=t.type,o=t.content;"section"===r&&(void 0===o?[]:o).forEach(function(t){c.process({visibility:t.visibility,index:n})&&e.push(t.content)});var a=n===i.length-1;return"divider"!==r||a||c.process({visibility:t.visibility,index:n})&&e.push(t.content),e},[]).filter(function(e){return e.length}),d=c.overflow();return d&&u.push(function(e){var t=e.translator,n=e.config,r=e.count,i=t?t.get("Object.ChartTooltip.NMore",r):"+".concat(r," more"),o=gM(i);return[{content:i,style:{"font-weight":"bold","text-align":n.rtl?"right":"left",direction:o},colspan:2}]}({translator:t,config:n,count:d})),u}({translator:n,config:r,context:l,templates:u});return d.length?function(e){var t=e.h,n=e.style;return e.rows.map(function(e){return t("tr",{},e.map(function(e){var r={style:ly(ly({},n.cell||{}),e.style||{}),class:e.class};return e.colspan&&(r.colspan=e.colspan),t("td",r,e.content)}))})}({h:o,style:s,rows:d}):function(e){var t=e.h;return t("tr",{},t("td",{style:{fontStyle:"italic",opacity:.75}},"Empty"))}({h:o})}function bM(e){var t=e.chart,n=e.translator,r=e.config,i=e.expando,o=e.internal;if(!r.main.key)return!1;var a=Dx(),s=nM({key:r.main.key,rtl:r.rtl,duration:r.duration}),l=r.main.events.tooltip,c=l.afterShow,u=l.afterHide,d=function(){var e=a.get("collected");return{expando:i,nodes:e.nodes,meta:e.meta}};return Lv(!0,s,{settings:{filter:function(e){return uM({chart:t,config:r,expando:i,internal:o,nodes:e})},extract:function(e){return a.set("collected",e.node),e},content:function(e){var o=e.h,a=e.data,s=e.style;return vM({chart:t,translator:n,config:r,expando:i,h:o,data:a,style:s})},placement:function(e){var t=e.nodes;return r.main.placement({meta:t[0].meta})},afterShow:function(){return c(d())},afterHide:function(){return u(d())}},style:{arrow:{color:r.style.background},content:r.style}})}function xM(e){var t=e.config,n=t.legend.keys;if(!n.tooltip||!n.component)return!1;if("categorical"!==t.getColorSettings().type)return!1;var r=nM({key:n.tooltip,rtl:t.rtl,duration:t.duration});return Lv(!0,r,{settings:{filter:function(e){return e.filter(function(e){return e.data&&e.key===n.component})},extract:function(e){return e},content:function(e){var t=e.h,n=e.data;return[t("tr",{},[t("td",{style:ly(ly({},e.style.cell||{}),{"font-weight":"bold","text-align":"left"}),colspan:2},n[0].node.data.label)])]},placement:"pointer"},style:{arrow:{color:t.style.background},content:t.style}})}function SM(e){var t=e.config.main.triggers.reduce(function(e,t){return t.keys.forEach(function(n){var r=t.distance||0;e.distance[n]=r,e.distances.includes(r)||e.distances.push(r),e.key[n]=!0,e.keys[r]||(e.keys[r]=[]),e.keys[r].push(n)}),e},{distance:{},distances:[],key:{},keys:{}});return function(e){return e.components.filter(function(e){return t.key[e.key]}).reduce(function(e,n){e.any=!0,e.components.push(n.key);var r=t.distance[n.key];return 0===r?e.position.push(n.key):(e.distances.includes(r)||(e.distances.push(r),e.distanceKeys[r]=[]),e.distanceKeys[r].push(n.key)),e},{any:!1,components:[],position:[],distances:[],distanceKeys:{}})}}var wM=function(){return!0};function MM(e){var t=e.config.main.triggers.reduce(function(e,t){var n=t.filter;return t.keys.forEach(function(t){e[t]="function"==typeof n?n:wM}),e},{});return function(e){var n=t[e.key];return!n||n(e)}}function kM(e){var t=e.chart,n=e.event,r=e.component,i={absolute:{x:0,y:0},relative:{x:0,y:0}},o=t.element.getBoundingClientRect(),a=o.left,s=o.top;i.absolute.x=(void 0===n.clientX?Math.floor(n.srcEvent.clientX):n.clientX)-a,i.absolute.y=(void 0===n.clientY?Math.floor(n.srcEvent.clientY):n.clientY)-s;var l=t.component(r);if(l){var c=l.rect.computedInner;i.relative.x=i.absolute.x-c.x,i.relative.y=i.absolute.y-c.y}return i}function CM(e){var t=e.chart,n=e.filter,r=e.hits,i=e.position,o=[];if(r.position.length&&o.push.apply(o,hy(t.shapesAt(i.absolute,{components:r.position.map(function(e){return{key:e}})}).filter(n))),!o.length&&r.distances.length){var a=[];r.distances.forEach(function(e){a.push.apply(a,hy(t.shapesAt({cx:i.absolute.x,cy:i.absolute.y,r:e},{components:r.distanceKeys[e].map(function(e){return{key:e}})}).filter(n)))}),a.length&&o.push(function(e){var t=e.nodes,n=e.origin,r=t.find(function(e){return"path"===e.type});if(r)return r;var i=function(e){var t=Math.abs(n.x-(e.localBounds.x+e.localBounds.width/2)),r=Math.abs(n.y-(e.localBounds.y+e.localBounds.height/2));return Math.sqrt(t*t+r*r)};return t.slice(1).reduce(function(e,t){var n=i(t);return n<e.distance&&(e.distance=n,e.node=t),e},{node:t[0],distance:i(t[0])}).node}({nodes:a,origin:i.relative}))}return o}function qM(e){var t=e.chart,n=e.config,r=e.expando,i=e.internal,o=e.facade,a=n.delay.tap,s=SM({config:n}),l=MM({config:n}),c=n.main.triggers.reduce(function(e,t){return e.push.apply(e,hy(t.keys)),e},[]);return{key:"event:".concat("tooltipTap"),type:"Tap",options:{event:"tooltipTap",enable:function(e,r){return!r||!!n.enable({event:r})&&t.componentsFromPoint({x:r.center.x,y:r.center.y}).filter(function(e){return-1!==c.indexOf(e.key)}).length>0}},recognizeWith:"tap",events:ay({},"tooltipTap",function(e){if(e.preventDefault(),"mouse"!==e.pointerType&&!n.main.suppress({event:e})){var c=t.component(n.main.key);if(c&&c.show){var u=t.componentsFromPoint({x:e.center.x,y:e.center.y}),d=s({components:u});if(d.any){var f=fy(d.components,1)[0],h=kM({chart:t,event:e,component:f});i.set(rM,h);var p=CM({chart:t,filter:l,hits:d,position:h});if(p.length){var m=p[0].key;n.main.events.tooltip.beforeShow({expando:r,event:e,collectNodes:function(){return o.collectNodes({nodes:p})},meta:{triggerer:m,position:h}}).then(function(){c.emit("show",e,{nodes:p,delay:a})}).catch(function(){})}else c.emit("hide")}else c.emit("hide")}}})}}function EM(e){var t=e.chart,n=e.config,r=e.expando,i=e.internal,o=e.facade,a=SM({config:n}),s=MM({config:n}),l=function(e){var t=e.config,n=e.expando,r=e.internal,i=e.facade,o=t.main.events.tooltip.beforeShow,a=t.delay.hover,s={ongoing:{},latest:void 0};return function(e){var t=e.event,l=e.tooltip,c=e.nodes,u=function(e){var t=e.nodes;return JSON.stringify(t.map(function(e){var t;return{key:e.key,bounds:e.bounds,value:null===(t=e.data)||void 0===t?void 0:t.value}}))}({nodes:c});if(!s.ongoing[u]){s.ongoing[u]=!0,s.latest=u;var d=c[0].key;o({expando:n,event:t,collectNodes:function(){return i.collectNodes({nodes:c})},meta:{triggerer:d,position:r.get(rM)}}).then(function(){u===s.latest&&l.emit("show",t,{nodes:c,delay:a})}).catch(function(){l.emit("show")}).finally(function(){delete s.ongoing[u],u===s.latest&&(s.latest=void 0)})}}}({config:n,expando:r,internal:i,facade:o}),c=[n.main.key,n.legend.keys.tooltip].filter(Boolean),u=function(){c.forEach(function(e){var n=t.component(e);null!=n&&n.show&&n.emit("hide")})};return{type:"native",events:{mousemove:function(e){if(n.enable({event:e})&&!n.main.suppress({event:e})){var r=t.componentsFromPoint({x:e.clientX,y:e.clientY}),o=t.component(n.main.key);if(o&&o.show){var c=a({components:r});if(c.any){var u=fy(c.components,1)[0],d=kM({chart:t,event:e,component:u});i.set(rM,d);var f=CM({chart:t,filter:s,hits:c,position:d});if(!f.length)return void o.emit("hide");l({event:e,tooltip:o,nodes:f})}else o.emit("hide")}var h=n.legend;if(h.keys.tooltip&&h.keys.component){var p=t.component(h.keys.tooltip);p&&p.show&&(r.some(function(e){return e.key===h.keys.component})?p.emit("show",e):p.emit("hide"))}}},mouseup:function(e){2===e.button&&u()},mouseleave:function(){n.main.events.interaction.mouseleave({expando:r}),u()},wheel:function(){u()}}}}function DM(e){var t=e.chart,n=e.translator,r=function(e){var t=e.config;return Lv(!0,{},{rtl:!1,enable:Zw.FALSE,getColorSettings:Zw.OBJECT,style:{fontSize:void 0,fontFamily:void 0,color:void 0,background:void 0},delay:{hover:500,tap:0},duration:8e3,main:{key:void 0,suppress:Zw.FALSE,getGroupByValue:Zw.NOOP,collectibles:[],triggers:[],placement:function(){return{type:"bounds"}},placements:{collectible:"combine"},showDuplicateMeasures:!1,layout:{rows:7,grouping:!1,single:!1},section:Zw.ARRAY,sections:Zw.NOOP,events:{tooltip:{beforeShow:function(){return Promise.resolve()},afterShow:Zw.NOOP,afterHide:Zw.NOOP},interaction:{mouseleave:Zw.NOOP}}},legend:{keys:{tooltip:void 0,component:void 0}}},void 0===t?{}:t)}({config:e.config}),i=Dx(),o=Dx(),a={components:void 0,interactions:void 0};return{getComponents:function(){return a.components||(a.components=function(e){var t=e.config;return[bM({chart:e.chart,translator:e.translator,config:t,expando:e.expando,internal:e.internal}),xM({config:t})].filter(Boolean)}({chart:t,translator:n,config:r,expando:i,internal:o})),a.components},getInteractions:function(){return a.interactions||(a.interactions=function(e){var t=e.chart,n=e.config,r=e.expando,i=e.internal,o=function(e){var t=e.chart,n=e.config,r=e.expando,i=e.internal;return{collectNodes:function(e){var o=e.nodes,a=fy(uM({chart:t,config:n,expando:r,internal:i,nodes:o}),1)[0];return(void 0===a?{nodes:[]}:a).nodes}}}({chart:t,config:n,expando:r,internal:i});return{gestures:[qM({chart:t,config:n,expando:r,internal:i,facade:o})],native:EM({chart:t,config:n,expando:r,internal:i,facade:o})}}({chart:t,config:r,expando:i,internal:o})),a.interactions},expando:i}}var TM={created(){this.state={}},beforeUpdate(){this.state={}},beforeRender({size:e}){this.state.ticks=this.scale.ticks({distance:e.width}).filter(e=>!e.isMinor),"linear"===this.scale.type&&function(e,t){const[,n]=e.domain();for(let e=0;e<t.length;e++){const r=t[e],i=t[e+1];r.data={},i||1===r.end?i?(r.data.start=r.value,r.data.end=i.value,r.end=i.position):(r.data.start=r.value,r.data.end=r.value):(r.data.start=r.value,r.data.end=n,r.end=1)}}(this.scale,this.state.ticks)},render(){const e=this.scale.data().fields.length?this.scale.data().fields[0].id():"",{ticks:t}=this.state,n=t.map(t=>({type:"rect",fill:"none",data:{source:{field:e},value:[t.data.start,t.data.end]},x:t.start*this.rect.width,y:0,width:(t.end-t.start)*this.rect.width,height:this.rect.height}));if(t.length&&t[0].start>0){const r=t[0];n.unshift({type:"rect",fill:"none",data:{source:{field:e},value:[this.scale.domain()[0],r.data.start]},x:0,y:0,width:r.start*this.rect.width,height:this.rect.height})}return n}};function OM(e,t=1){if(t%2==0)return e;let n=Math.round(e);return e-n>0?n+=.5:n-=.5,n}function NM(e,t){return e.x<t.x?e.x+e.width>=t.x:t.x+t.width>=e.x}function AM(e,t){const{localProps:{size:n},props:{anchor:r}}=t,i=function({props:e,localProps:{size:t},style:n,renderer:r}){const i=e.label.padding,o=Math.max(0,Math.min(e.label.justify,1)),a=Math.max(0,Math.min(e.label.align,1)),s=e=>r.measureText({text:e,fontSize:n.label.fontSize,fontFamily:n.label.fontFamily});return{resolve:(e,r)=>{const l="string"==typeof e.label?e.label:"",c=s(l);let{x:u,width:d}=r;e.start===e.end&&(d=c.width+2*i,1===e.end&&(u-=d));const f={x:u+i,y:i,width:d-2*i,height:t.height-2*i},h=s(`${l[0]}…`).width,p=Math.max(0,f.width-c.width),m=Math.max(0,f.height-c.height),g=o*p,y=a*m;return{show:f.width>=Math.min(h,c.width),text:l,dx:g,dy:y,rect:f,style:n.label,segment:{x:u+g,width:c.width+2*i},tickValue:e.value}}}}(t),o=function({localProps:{size:e},style:t,scale:n,props:r}){const[i,o]=n.domain(),a=Math.max(0,Math.min(1,r.guideLine.major.justify));return{resolve:(n,r)=>{const s=a*r.width,l=OM(r.x+s,t.majorGuideLine.strokeWidth);return{show:n.value>=i&&n.value<=o,x1:l,y1:0,x2:l,y2:OM(e.height,t.majorGuideLine.strokeWidth),style:t.majorGuideLine,tickValue:n.value}}}}(t),a=e.map(e=>{const t=function(e,t,n){const r=Math.abs(Math.max(e.start,0)-Math.min(e.end,1))*t.width;return{x:Math.max(e[n],0)*t.width,y:0,width:r,height:t.height}}(e,n,r);return{rect:t,label:i.resolve(e,t),guideLine:o.resolve(e,t)}});return function(e,t){const n=e.length;if(n<2)return;const r=e[n-1],i=t[n-1].label;if(r&&r.start===r.end)for(let e=n-2;e>-1;e--){const n=t[e].label;n.show=n.show&&!NM(n.segment,i.segment)}}(e,a),a}function _M(e,t){const n=function({localProps:{size:e},props:t,style:n}){return{resolve:r=>{const i=Math.max(e.height-t.guideLine.minor.size,0)*Math.max(0,Math.min(t.guideLine.minor.align,1)),o=OM(r.position*e.width,n.minorGuideLine.strokeWidth);return{guideLine:{show:!0,x1:o,y1:OM(i,n.minorGuideLine.strokeWidth),x2:o,y2:OM(t.guideLine.minor.size+i,n.minorGuideLine.strokeWidth),style:n.minorGuideLine}}}}}(t);return t.props.guideLine.minor.show?e.map(n.resolve):[]}function IM(e){return e.filter(e=>e.show).map(e=>bg({strokeWidth:1},e.style,{type:"line",x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,tickValue:e.tickValue}))}var LM={require:["renderer"],defaultSettings:{layout:{displayOrder:0,prioOrder:0},settings:{anchor:"start",label:{show:!0,padding:4,align:0,justify:0},line:{show:!0},guideLine:{major:{justify:0},minor:{show:!0,size:4,align:0}}},style:{label:"$label",line:"$guide-line",majorGuideLine:"$guide-line",minorGuideLine:"$guide-line"}},preferredSize:()=>({size:30,edgeBleed:{left:1,right:1}}),init(){this.props=this.settings.settings,this.localProps={},this.state={major:[],minor:[]}},created(){this.init()},beforeUpdate(){this.init()},beforeRender({size:e}){this.localProps.size=e;const t=this.scale.ticks({distance:e.width}),n=t.filter(e=>!e.isMinor),r=t.filter(e=>e.isMinor);this.state.line=function({localProps:{size:e},style:t,props:n}){const r=OM(1,t.line.strokeWidth);return{show:n.line.show,x1:OM(0,t.line.strokeWidth),y1:r,x2:OM(e.width,t.line.strokeWidth),y2:r,style:t.line}}(this),this.state.major=AM(n,this),this.state.minor=_M(r,this)},render(){return[...IM([this.state.line]),...(e=this.state.major.map(e=>e.label),e.filter(e=>e.show).map(e=>bg({},e.style,{type:"text",x:e.rect.x,y:e.rect.y,dx:e.dx,dy:e.dy,maxWidth:e.rect.width,text:e.text,title:e.text,baseline:"text-before-edge",tickValue:e.tickValue}))),...IM(this.state.major.map(e=>e.guideLine)),...IM(this.state.minor.map(e=>e.guideLine))];var e}};function PM(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function RM(e){return 1===e.length&&(e=function(e){return function(t,n){return PM(e(t),n)}}(e)),{left:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)<0?r=o+1:i=o}return r},right:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)>0?i=o:r=o+1}return r}}}var zM=RM(PM).right,FM=Math.sqrt(50),jM=Math.sqrt(10),BM=Math.sqrt(2);function HM(e,t,n){var r=(t-e)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=FM?10:o>=jM?5:o>=BM?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=FM?10:o>=jM?5:o>=BM?2:1)}function VM(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=FM?i*=10:o>=jM?i*=5:o>=BM&&(i*=2),t<e?-i:i}function $M(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var WM="$";function UM(){}function YM(e,t){var n=new UM;if(e instanceof UM)e.each(function(e,t){n.set(t,e)});else if(Array.isArray(e)){var r,i=-1,o=e.length;if(null==t)for(;++i<o;)n.set(i,e[i]);else for(;++i<o;)n.set(t(r=e[i],i,e),r)}else if(e)for(var a in e)n.set(a,e[a]);return n}function KM(){}UM.prototype=YM.prototype={constructor:UM,has:function(e){return WM+e in this},get:function(e){return this[WM+e]},set:function(e,t){return this[WM+e]=t,this},remove:function(e){var t=WM+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===WM&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===WM&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===WM&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===WM&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===WM&&++e;return e},empty:function(){for(var e in this)if(e[0]===WM)return!1;return!0},each:function(e){for(var t in this)t[0]===WM&&e(this[t],t.slice(1),this)}};var GM=YM.prototype;KM.prototype={constructor:KM,has:GM.has,add:function(e){return this[WM+(e+="")]=e,this},remove:GM.remove,clear:GM.clear,values:GM.keys,size:GM.size,empty:GM.empty,each:GM.each};var XM=Array.prototype,JM=XM.map,ZM=XM.slice;function QM(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function ek(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function tk(){}var nk=.7,rk=1/nk,ik="\\s*([+-]?\\d+)\\s*",ok="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",ak="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",sk=/^#([0-9a-f]{3,8})$/,lk=new RegExp("^rgb\\("+[ik,ik,ik]+"\\)$"),ck=new RegExp("^rgb\\("+[ak,ak,ak]+"\\)$"),uk=new RegExp("^rgba\\("+[ik,ik,ik,ok]+"\\)$"),dk=new RegExp("^rgba\\("+[ak,ak,ak,ok]+"\\)$"),fk=new RegExp("^hsl\\("+[ok,ak,ak]+"\\)$"),hk=new RegExp("^hsla\\("+[ok,ak,ak,ok]+"\\)$"),pk={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 mk(){return this.rgb().formatHex()}function gk(){return this.rgb().formatRgb()}function yk(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=sk.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?vk(t):3===n?new Sk(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?bk(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?bk(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=lk.exec(e))?new Sk(t[1],t[2],t[3],1):(t=ck.exec(e))?new Sk(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=uk.exec(e))?bk(t[1],t[2],t[3],t[4]):(t=dk.exec(e))?bk(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=fk.exec(e))?Ck(t[1],t[2]/100,t[3]/100,1):(t=hk.exec(e))?Ck(t[1],t[2]/100,t[3]/100,t[4]):pk.hasOwnProperty(e)?vk(pk[e]):"transparent"===e?new Sk(NaN,NaN,NaN,0):null}function vk(e){return new Sk(e>>16&255,e>>8&255,255&e,1)}function bk(e,t,n,r){return r<=0&&(e=t=n=NaN),new Sk(e,t,n,r)}function xk(e,t,n,r){return 1===arguments.length?function(e){return e instanceof tk||(e=yk(e)),e?new Sk((e=e.rgb()).r,e.g,e.b,e.opacity):new Sk}(e):new Sk(e,t,n,null==r?1:r)}function Sk(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function wk(){return"#"+kk(this.r)+kk(this.g)+kk(this.b)}function Mk(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function kk(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Ck(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ek(e,t,n,r)}function qk(e){if(e instanceof Ek)return new Ek(e.h,e.s,e.l,e.opacity);if(e instanceof tk||(e=yk(e)),!e)return new Ek;if(e instanceof Ek)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 Ek(a,s,l,e.opacity)}function Ek(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Dk(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function Tk(e){return function(){return e}}function Ok(e){return 1===(e=+e)?Nk: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):Tk(isNaN(t)?n:t)}}function Nk(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Tk(isNaN(e)?t:e)}QM(tk,yk,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:mk,formatHex:mk,formatHsl:function(){return qk(this).formatHsl()},formatRgb:gk,toString:gk}),QM(Sk,xk,ek(tk,{brighter:function(e){return e=null==e?rk:Math.pow(rk,e),new Sk(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?nk:Math.pow(nk,e),new Sk(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:wk,formatHex:wk,formatRgb:Mk,toString:Mk})),QM(Ek,function(e,t,n,r){return 1===arguments.length?qk(e):new Ek(e,t,n,null==r?1:r)},ek(tk,{brighter:function(e){return e=null==e?rk:Math.pow(rk,e),new Ek(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?nk:Math.pow(nk,e),new Ek(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Sk(Dk(e>=240?e-240:e+120,i,r),Dk(e,i,r),Dk(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var Ak=function e(t){var n=Ok(t);function r(e,t){var r=n((e=xk(e)).r,(t=xk(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=Nk(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function _k(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,i=t.slice();return function(o){for(n=0;n<r;++n)i[n]=e[n]*(1-o)+t[n]*o;return i}}function Ik(e,t){var n,r=t?t.length:0,i=e?Math.min(r,e.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=Bk(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<i;++n)a[n]=o[n](e);return a}}function Lk(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Pk(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Rk(e,t){var n,r={},i={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=Bk(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}var zk=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Fk=new RegExp(zk.source,"g");function jk(e,t){var n,r,i,o=zk.lastIndex=Fk.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=zk.exec(e))&&(r=Fk.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:Pk(n,r)})),o=Fk.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}function Bk(e,t){var n,r=typeof t;return null==t||"boolean"===r?Tk(t):("number"===r?Pk:"string"===r?(n=yk(t))?(t=n,Ak):jk:t instanceof yk?Ak:t instanceof Date?Lk:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?_k:Array.isArray(t)?Ik:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?Rk:Pk)(e,t)}function Hk(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function Vk(e){return+e}var $k=[0,1];function Wk(e){return e}function Uk(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function Yk(e){var t,n=e[0],r=e[e.length-1];return n>r&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function Kk(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=Uk(i,r),o=n(a,o)):(r=Uk(r,i),o=n(o,a)),function(e){return o(r(e))}}function Gk(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=Uk(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(t){var n=zM(e,t,1,r)-1;return o[n](i[n](t))}}function Xk(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Jk(e,t){return function(){var e,t,n,r,i,o,a=$k,s=$k,l=Bk,c=Wk;function u(){return r=Math.min(a.length,s.length)>2?Gk:Kk,i=o=null,d}function d(t){return isNaN(t=+t)?n:(i||(i=r(a.map(e),s,l)))(e(c(t)))}return d.invert=function(n){return c(t((o||(o=r(s,a.map(e),Pk)))(n)))},d.domain=function(e){return arguments.length?(a=JM.call(e,Vk),c===Wk||(c=Yk(a)),u()):a.slice()},d.range=function(e){return arguments.length?(s=ZM.call(e),u()):s.slice()},d.rangeRound=function(e){return s=ZM.call(e),l=Hk,u()},d.clamp=function(e){return arguments.length?(c=e?Yk(a):Wk,d):c!==Wk},d.interpolate=function(e){return arguments.length?(l=e,u()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,u()}}()(e,t)}function Zk(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Qk(e){return(e=Zk(Math.abs(e)))?e[1]:NaN}var eC,tC=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function nC(e){if(!(t=tC.exec(e)))throw new Error("invalid format: "+e);var t;return new rC({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function rC(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function iC(e,t){var n=Zk(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}nC.prototype=rC.prototype,rC.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var oC={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return iC(100*e,t)},r:iC,s:function(e,t){var n=Zk(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(eC=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Zk(e,Math.max(0,t+o-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function aC(e){return e}var sC,lC,cC,uC=Array.prototype.map,dC=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function fC(e){var t=void 0===e.grouping||void 0===e.thousands?aC:function(e,t){return function(n,r){for(var i=n.length,o=[],a=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}(uC.call(e.grouping,Number),e.thousands+""),n=void 0===e.currency?"":e.currency[0]+"",r=void 0===e.currency?"":e.currency[1]+"",i=e.decimal+"",o=void 0===e.numerals?aC:function(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}(uC.call(e.numerals,String)),a=void 0===e.percent?"%":e.percent+"",s=e.minus+"",l=void 0===e.nan?"NaN":e.nan+"";function c(e){var c=(e=nC(e)).fill,u=e.align,d=e.sign,f=e.symbol,h=e.zero,p=e.width,m=e.comma,g=e.precision,y=e.trim,v=e.type;"n"===v?(m=!0,v="g"):oC[v]||(void 0===g&&(g=12),y=!0,v="g"),(h||"0"===c&&"="===u)&&(h=!0,c="0",u="=");var b="$"===f?n:"#"===f&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",x="$"===f?r:/[%p]/.test(v)?a:"",S=oC[v],w=/[defgprs%]/.test(v);function M(e){var n,r,a,f=b,M=x;if("c"===v)M=S(e)+M,e="";else{var k=(e=+e)<0||1/e<0;if(e=isNaN(e)?l:S(Math.abs(e),g),y&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r<n;++r)switch(e[r]){case".":i=t=r;break;case"0":0===i&&(i=r),t=r;break;default:if(!+e[r])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),k&&0===+e&&"+"!==d&&(k=!1),f=(k?"("===d?d:s:"-"===d||"("===d?"":d)+f,M=("s"===v?dC[8+eC/3]:"")+M+(k&&"("===d?")":""),w)for(n=-1,r=e.length;++n<r;)if(48>(a=e.charCodeAt(n))||a>57){M=(46===a?i+e.slice(n+1):e.slice(n))+M,e=e.slice(0,n);break}}m&&!h&&(e=t(e,1/0));var C=f.length+e.length+M.length,q=C<p?new Array(p-C+1).join(c):"";switch(m&&h&&(e=t(q+e,q.length?p-M.length:1/0),q=""),u){case"<":e=f+e+M+q;break;case"=":e=f+q+e+M;break;case"^":e=q.slice(0,C=q.length>>1)+f+e+M+q.slice(C);break;default:e=q+f+e+M}return o(e)}return g=void 0===g?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),M.toString=function(){return e+""},M}return{format:c,formatPrefix:function(e,t){var n=c(((e=nC(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(Qk(t)/3))),i=Math.pow(10,-r),o=dC[8+r/3];return function(e){return n(i*e)+o}}}}function hC(e,t,n,r){var i,o=VM(e,t,n);switch((r=nC(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Qk(t)/3)))-Qk(Math.abs(e)))}(o,a))||(r.precision=i),cC(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Qk(t)-Qk(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(e){return Math.max(0,-Qk(Math.abs(e)))}(o))||(r.precision=i-2*("%"===r.type))}return lC(r)}function pC(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){var r,i,o,a,s=-1;if(n=+n,(e=+e)===(t=+t)&&n>0)return[e];if((r=t<e)&&(i=e,e=t,t=i),0===(a=HM(e,t,n))||!isFinite(a))return[];if(a>0)for(e=Math.ceil(e/a),t=Math.floor(t/a),o=new Array(i=Math.ceil(t-e+1));++s<i;)o[s]=(e+s)*a;else for(e=Math.floor(e*a),t=Math.ceil(t*a),o=new Array(i=Math.ceil(e-t+1));++s<i;)o[s]=(e-s)/a;return r&&o.reverse(),o}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return hC(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,i=t(),o=0,a=i.length-1,s=i[o],l=i[a];return l<s&&(r=s,s=l,l=r,r=o,o=a,a=r),(r=HM(s,l,n))>0?r=HM(s=Math.floor(s/r)*r,l=Math.ceil(l/r)*r,n):r<0&&(r=HM(s=Math.ceil(s*r)/r,l=Math.floor(l*r)/r,n)),r>0?(i[o]=Math.floor(s/r)*r,i[a]=Math.ceil(l/r)*r,t(i)):r<0&&(i[o]=Math.ceil(s*r)/r,i[a]=Math.floor(l*r)/r,t(i)),e},e}function mC(){var e=Jk(Wk,Wk);return e.copy=function(){return Xk(e,mC())},$M.apply(e,arguments),pC(e)}!function(e){sC=fC(e),lC=sC.format,cC=sC.formatPrefix}({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});var gC=new Date,yC=new Date;function vC(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=function(t){return e(t=new Date(+t)),t},i.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},i.round=function(e){var t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},i.range=function(n,r,o){var a,s=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return s;do{s.push(a=new Date(+n)),t(n,o),e(n)}while(a<n&&n<r);return s},i.filter=function(n){return vC(function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););})},n&&(i.count=function(t,r){return gC.setTime(+t),yC.setTime(+r),e(gC),e(yC),Math.floor(n(gC,yC))},i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?function(t){return r(t)%e===0}:function(t){return i.count(0,t)%e===0}):i:null}),i}var bC=vC(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});bC.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?vC(function(t){t.setTime(Math.floor(t/e)*e)},function(t,n){t.setTime(+t+n*e)},function(t,n){return(n-t)/e}):bC:null},bC.range;var xC=6e4,SC=36e5,wC=864e5,MC=6048e5,kC=vC(function(e){e.setTime(e-e.getMilliseconds())},function(e,t){e.setTime(+e+1e3*t)},function(e,t){return(t-e)/1e3},function(e){return e.getUTCSeconds()});kC.range;var CC=vC(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*xC)/wC},function(e){return e.getDate()-1});function qC(e){return vC(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+7*t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*xC)/MC})}CC.range;var EC=qC(0),DC=qC(1),TC=qC(2),OC=qC(3),NC=qC(4),AC=qC(5),_C=qC(6);EC.range,DC.range,TC.range,OC.range,NC.range,AC.range,_C.range;var IC=vC(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});IC.every=function(e){return isFinite(e=Math.floor(e))&&e>0?vC(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n*e)}):null},IC.range;var LC=vC(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+t*xC)},function(e,t){return(t-e)/xC},function(e){return e.getUTCMinutes()});LC.range;var PC=vC(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+t*SC)},function(e,t){return(t-e)/SC},function(e){return e.getUTCHours()});PC.range;var RC=vC(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/wC},function(e){return e.getUTCDate()-1});function zC(e){return vC(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+7*t)},function(e,t){return(t-e)/MC})}RC.range;var FC=zC(0),jC=zC(1),BC=zC(2),HC=zC(3),VC=zC(4),$C=zC(5),WC=zC(6);FC.range,jC.range,BC.range,HC.range,VC.range,$C.range,WC.range;var UC=vC(function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCMonth(e.getUTCMonth()+t)},function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())},function(e){return e.getUTCMonth()});UC.range;var YC=vC(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});function KC(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function GC(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function XC(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}YC.every=function(e){return isFinite(e=Math.floor(e))&&e>0?vC(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null},YC.range;var JC,ZC,QC={"-":"",_:" ",0:"0"},eq=/^\s*\d+/,tq=/^%/,nq=/[\\^$*+?|[\]().{}]/g;function rq(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function iq(e){return e.replace(nq,"\\$&")}function oq(e){return new RegExp("^(?:"+e.map(iq).join("|")+")","i")}function aq(e){for(var t={},n=-1,r=e.length;++n<r;)t[e[n].toLowerCase()]=n;return t}function sq(e,t,n){var r=eq.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function lq(e,t,n){var r=eq.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function cq(e,t,n){var r=eq.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function uq(e,t,n){var r=eq.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function dq(e,t,n){var r=eq.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function fq(e,t,n){var r=eq.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function hq(e,t,n){var r=eq.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function pq(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function mq(e,t,n){var r=eq.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function gq(e,t,n){var r=eq.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function yq(e,t,n){var r=eq.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function vq(e,t,n){var r=eq.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function bq(e,t,n){var r=eq.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function xq(e,t,n){var r=eq.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Sq(e,t,n){var r=eq.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function wq(e,t,n){var r=eq.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Mq(e,t,n){var r=eq.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function kq(e,t,n){var r=tq.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Cq(e,t,n){var r=eq.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function qq(e,t,n){var r=eq.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Eq(e,t){return rq(e.getDate(),t,2)}function Dq(e,t){return rq(e.getHours(),t,2)}function Tq(e,t){return rq(e.getHours()%12||12,t,2)}function Oq(e,t){return rq(1+CC.count(IC(e),e),t,3)}function Nq(e,t){return rq(e.getMilliseconds(),t,3)}function Aq(e,t){return Nq(e,t)+"000"}function _q(e,t){return rq(e.getMonth()+1,t,2)}function Iq(e,t){return rq(e.getMinutes(),t,2)}function Lq(e,t){return rq(e.getSeconds(),t,2)}function Pq(e){var t=e.getDay();return 0===t?7:t}function Rq(e,t){return rq(EC.count(IC(e)-1,e),t,2)}function zq(e){var t=e.getDay();return t>=4||0===t?NC(e):NC.ceil(e)}function Fq(e,t){return e=zq(e),rq(NC.count(IC(e),e)+(4===IC(e).getDay()),t,2)}function jq(e){return e.getDay()}function Bq(e,t){return rq(DC.count(IC(e)-1,e),t,2)}function Hq(e,t){return rq(e.getFullYear()%100,t,2)}function Vq(e,t){return rq((e=zq(e)).getFullYear()%100,t,2)}function $q(e,t){return rq(e.getFullYear()%1e4,t,4)}function Wq(e,t){var n=e.getDay();return rq((e=n>=4||0===n?NC(e):NC.ceil(e)).getFullYear()%1e4,t,4)}function Uq(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+rq(t/60|0,"0",2)+rq(t%60,"0",2)}function Yq(e,t){return rq(e.getUTCDate(),t,2)}function Kq(e,t){return rq(e.getUTCHours(),t,2)}function Gq(e,t){return rq(e.getUTCHours()%12||12,t,2)}function Xq(e,t){return rq(1+RC.count(YC(e),e),t,3)}function Jq(e,t){return rq(e.getUTCMilliseconds(),t,3)}function Zq(e,t){return Jq(e,t)+"000"}function Qq(e,t){return rq(e.getUTCMonth()+1,t,2)}function eE(e,t){return rq(e.getUTCMinutes(),t,2)}function tE(e,t){return rq(e.getUTCSeconds(),t,2)}function nE(e){var t=e.getUTCDay();return 0===t?7:t}function rE(e,t){return rq(FC.count(YC(e)-1,e),t,2)}function iE(e){var t=e.getUTCDay();return t>=4||0===t?VC(e):VC.ceil(e)}function oE(e,t){return e=iE(e),rq(VC.count(YC(e),e)+(4===YC(e).getUTCDay()),t,2)}function aE(e){return e.getUTCDay()}function sE(e,t){return rq(jC.count(YC(e)-1,e),t,2)}function lE(e,t){return rq(e.getUTCFullYear()%100,t,2)}function cE(e,t){return rq((e=iE(e)).getUTCFullYear()%100,t,2)}function uE(e,t){return rq(e.getUTCFullYear()%1e4,t,4)}function dE(e,t){var n=e.getUTCDay();return rq((e=n>=4||0===n?VC(e):VC.ceil(e)).getUTCFullYear()%1e4,t,4)}function fE(){return"+0000"}function hE(){return"%"}function pE(e){return+e}function mE(e){return Math.floor(+e/1e3)}!function(e){JC=function(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=oq(i),u=aq(i),d=oq(o),f=aq(o),h=oq(a),p=aq(a),m=oq(s),g=aq(s),y=oq(l),v=aq(l),b={a:function(e){return a[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:Eq,e:Eq,f:Aq,g:Vq,G:Wq,H:Dq,I:Tq,j:Oq,L:Nq,m:_q,M:Iq,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:pE,s:mE,S:Lq,u:Pq,U:Rq,V:Fq,w:jq,W:Bq,x:null,X:null,y:Hq,Y:$q,Z:Uq,"%":hE},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:Yq,e:Yq,f:Zq,g:cE,G:dE,H:Kq,I:Gq,j:Xq,L:Jq,m:Qq,M:eE,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:pE,s:mE,S:tE,u:nE,U:rE,V:oE,w:aE,W:sE,x:null,X:null,y:lE,Y:uE,Z:fE,"%":hE},S={a:function(e,t,n){var r=h.exec(t.slice(n));return r?(e.w=p[r[0].toLowerCase()],n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f[r[0].toLowerCase()],n+r[0].length):-1},b:function(e,t,n){var r=y.exec(t.slice(n));return r?(e.m=v[r[0].toLowerCase()],n+r[0].length):-1},B:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.m=g[r[0].toLowerCase()],n+r[0].length):-1},c:function(e,n,r){return k(e,t,n,r)},d:yq,e:yq,f:Mq,g:hq,G:fq,H:bq,I:bq,j:vq,L:wq,m:gq,M:xq,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=u[r[0].toLowerCase()],n+r[0].length):-1},q:mq,Q:Cq,s:qq,S:Sq,u:lq,U:cq,V:uq,w:sq,W:dq,x:function(e,t,r){return k(e,n,t,r)},X:function(e,t,n){return k(e,r,t,n)},y:hq,Y:fq,Z:pq,"%":kq};function w(e,t){return function(n){var r,i,o,a=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(i=QC[r=e.charAt(++s)])?r=e.charAt(++s):i="e"===r?" ":"0",(o=t[r])&&(r=o(n,i)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function M(e,t){return function(n){var r,i,o=XC(1900,void 0,1);if(k(o,e,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(t&&!("Z"in o)&&(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=GC(XC(o.y,0,1))).getUTCDay(),r=i>4||0===i?jC.ceil(r):jC(r),r=RC.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=KC(XC(o.y,0,1))).getDay(),r=i>4||0===i?DC.ceil(r):DC(r),r=CC.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?GC(XC(o.y,0,1)).getUTCDay():KC(XC(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,GC(o)):KC(o)}}function k(e,t,n,r){for(var i,o,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=S[i in QC?t.charAt(a++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=w(n,b),b.X=w(r,b),b.c=w(t,b),x.x=w(n,x),x.X=w(r,x),x.c=w(t,x),{format:function(e){var t=w(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=M(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=w(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=M(e+="",!0);return t.toString=function(){return e},t}}}(e),JC.format,JC.parse,ZC=JC.utcFormat,JC.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var gE=1e3,yE=6e4,vE=36e5,bE=864e5,xE=2592e6,SE=31536e6;function wE(e){return new Date(e)}function ME(e){return e instanceof Date?+e:+new Date(+e)}function kE(e,t,n,r,i,o,a,s,l){var c=Jk(Wk,Wk),u=c.invert,d=c.domain,f=l(".%L"),h=l(":%S"),p=l("%I:%M"),m=l("%I %p"),g=l("%a %d"),y=l("%b %d"),v=l("%B"),b=l("%Y"),x=[[a,1,gE],[a,5,5e3],[a,15,15e3],[a,30,3e4],[o,1,yE],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,vE],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,bE],[r,2,1728e5],[n,1,6048e5],[t,1,xE],[t,3,7776e6],[e,1,SE]];function S(s){return(a(s)<s?f:o(s)<s?h:i(s)<s?p:r(s)<s?m:t(s)<s?n(s)<s?g:y:e(s)<s?v:b)(s)}function w(t,n,r,i){if(null==t&&(t=10),"number"==typeof t){var o=Math.abs(r-n)/t,a=RM(function(e){return e[2]}).right(x,o);a===x.length?(i=VM(n/SE,r/SE,t),t=e):a?(i=(a=x[o/x[a-1][2]<x[a][2]/o?a-1:a])[1],t=a[0]):(i=Math.max(VM(n,r,t),1),t=s)}return null==i?t:t.every(i)}return c.invert=function(e){return new Date(u(e))},c.domain=function(e){return arguments.length?d(JM.call(e,ME)):d().map(wE)},c.ticks=function(e,t){var n,r=d(),i=r[0],o=r[r.length-1],a=o<i;return a&&(n=i,i=o,o=n),n=(n=w(e,i,o,t))?n.range(i,o+1):[],a?n.reverse():n},c.tickFormat=function(e,t){return null==t?S:l(t)},c.nice=function(e,t){var n=d();return(e=w(e,n[0],n[n.length-1],t))?d(function(e,t){var n,r=0,i=(e=e.slice()).length-1,o=e[r],a=e[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),e[r]=t.floor(o),e[i]=t.ceil(a),e}(n,e)):c},c.copy=function(){return Xk(c,kE(e,t,n,r,i,o,a,s,l))},c}function CE(){return $M.apply(kE(YC,UC,FC,RC,PC,LC,kC,bC,ZC).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function qE(e,t){return e&&t&&e.qTicks.length===t.qTicks.length&&e.qTicks.every((e,n)=>e.qStart===t.qTicks[n].qStart&&e.qEnd===t.qTicks[n].qEnd)}function EE(e){return e.qTags.indexOf("$qualified")>-1}function DE({qAxis:e}){const t=[],n=[];for(let r=0;r<e.length;r++){const i=r+1,o=e[r],a=e[i];qE(o,a)?(EE(a)?(t.push(i),n.push(r)):(t.push(r),n.push(i)),r++):(t.push(r),n.push(r))}return{qualified:t,nonQualified:n}}function TE({qualifiedMeta:e,nonQualifiedMeta:t}){return{resolve(n){let r,i=NaN,o=NaN,a=NaN,s=!1;for(let l=e.length-1;l>=0;l--){const c=e[l];if(c.queries.outer(n)){const e=t[l+1];if(i=c.index,r=l,c.attrs.isDayOrShorter()&&c.queries.canFitHalfDayTicks(n)){o="auto",s=!0;break}if(e&&e.queries.inner(n)){o=e.index;const r=t[l+2];r&&r.queries.minor(n)&&(a=r.index);break}}}if(!Number.isNaN(i)&&Number.isNaN(o)&&"auto"!==o){o=i,i=NaN;const e=t[r+1];e&&e.queries.minor(n)&&(a=e.index)}else Number.isNaN(i)&&(i="auto",o="auto");return{outer:i,inner:o,minor:a,isDayOrShorter:s}}}}function OE({qTicks:e,measureText:t=()=>({width:0}),cache:n={},scale:r}){const i=n;return{isDayOrShorter:()=>(i.isDayOrShorter=e.length>0&&Math.abs(e[0].qStart-e[0].qEnd)<=1,i.isDayOrShorter),count:()=>e.length,maxRange:()=>(i.maxRange=e.length?Math.max(...e.map(e=>Math.abs(r(e.qStart)-r(e.qEnd)))):0,i.maxRange),rangeAndWidth(){const n=r.clamp();return r.clamp(!1),i.rangeAndWidth=e.map(e=>({range:Math.abs(r(e.qStart)-r(e.qEnd)),width:t(`${e.qText}`).width+16})),r.clamp(n),i.rangeAndWidth}}}function NE({attrs:e,reqAutoFitWidth:t}){return{outer:t=>!e.rangeAndWidth().some(({width:e,range:n})=>e>n*t),inner:t=>!e.rangeAndWidth().some(({width:e,range:n})=>e>n*t),minor:t=>e.maxRange()*t>=6,canFitHalfDayTicks:n=>n>=t*e.count()}}function AE({qualified:e,nonQualified:t,qAxis:n,measureText:r,reqAutoFitWidth:i,scale:o},{attributesFactory:a=OE,queryFactory:s=NE}={attributesFactory:OE,queryFactory:NE}){const l=n.map((e,t)=>function(e,t){const{qTicks:n}=e,l=a({qTicks:n,measureText:r,scale:o});return{data:e,index:t,attrs:l,queries:s({attrs:l,reqAutoFitWidth:i})}}(e,t)),c=e.map(e=>l[e]),u=t.map(e=>l[e]);return{qAxisMeta:l,qualifiedMeta:c,nonQualifiedMeta:u}}function _E({qAxis:e=[],measureText:t=()=>({width:0}),cache:n={},reqAutoFitWidth:r=0,scale:i},{metaFactory:o=AE,mapper:a=DE,resolver:s=TE}={metaFactory:AE,mapper:DE,resolver:TE}){const{qualified:l,nonQualified:c}=a({qAxis:e}),{qualifiedMeta:u,nonQualifiedMeta:d}=o({qAxis:e,qualified:l,nonQualified:c,measureText:t,reqAutoFitWidth:r,scale:i}),f=s({qualifiedMeta:u,nonQualifiedMeta:d});return{resolve:t=>{const r=n.key({distance:t});if(n.get(r))return n.get(r);if(function(e){return!Array.isArray(e)||0===e.length||e.every(e=>0===e.qTicks.length)}(e))return{outer:"auto",inner:"auto",minor:NaN,isDayOrShorter:!1};const i=f.resolve(t);return n.set(r,i),i}}}function IE(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}const LE=IE(0).getTime();function PE(e){return(e.getTime()-LE)/86400/1e3}const RE=new Date,zE=new Date;function FE(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{const t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),i.range=(n,r,o)=>{const a=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return a;let s;do{a.push(s=new Date(+n)),t(n,o),e(n)}while(s<n&&n<r);return a},i.filter=n=>FE(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(i.count=(t,r)=>(RE.setTime(+t),zE.setTime(+r),e(RE),e(zE),Math.floor(n(RE,zE))),i.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i:null)),i}const jE=1e3,BE=6e4,HE=36e5,VE=864e5,$E=6048e5,WE=FE(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*jE)},(e,t)=>(t-e)/jE,e=>e.getUTCSeconds());WE.range;const UE=FE(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*jE)},(e,t)=>{e.setTime(+e+t*BE)},(e,t)=>(t-e)/BE,e=>e.getMinutes());UE.range;const YE=FE(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*BE)},(e,t)=>(t-e)/BE,e=>e.getUTCMinutes());YE.range;const KE=FE(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*jE-e.getMinutes()*BE)},(e,t)=>{e.setTime(+e+t*HE)},(e,t)=>(t-e)/HE,e=>e.getHours());KE.range;const GE=FE(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*HE)},(e,t)=>(t-e)/HE,e=>e.getUTCHours());GE.range;const XE=FE(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*BE)/VE,e=>e.getDate()-1);XE.range;const JE=FE(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/VE,e=>e.getUTCDate()-1);JE.range;const ZE=FE(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/VE,e=>Math.floor(e/VE));function QE(e){return FE(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+7*t)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*BE)/$E)}ZE.range;const eD=QE(0),tD=QE(1),nD=QE(2),rD=QE(3),iD=QE(4),oD=QE(5),aD=QE(6);function sD(e){return FE(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)},(e,t)=>(t-e)/$E)}eD.range,tD.range,nD.range,rD.range,iD.range,oD.range,aD.range;const lD=sD(0),cD=sD(1),uD=sD(2),dD=sD(3),fD=sD(4),hD=sD(5),pD=sD(6);lD.range,cD.range,uD.range,dD.range,fD.range,hD.range,pD.range;const mD=FE(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear()),e=>e.getMonth());mD.range;const gD=FE(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear()),e=>e.getUTCMonth());gD.range;const yD=FE(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());yD.every=e=>isFinite(e=Math.floor(e))&&e>0?FE(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}):null,yD.range;const vD=FE(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());vD.every=e=>isFinite(e=Math.floor(e))&&e>0?FE(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null,vD.range;const bD=1,xD=2,SD=3,wD=4,MD=5,kD=6;function CD({timeScale:e,labels:t,distance:n,isDayOrShorter:r,cache:i,timeOnly:o,initialMin:a}){const[s,l]=e.domain(),c=i.key({distance:n});let u;i.get(c,1)?u=i.get(c,1):(u=function(e,t,n,r,i,o){function a(e){return vD.filter(t=>(t.getUTCFullYear()-o.getUTCFullYear())%e===0)}const s=WE.count(e,t),l=YE.count(e,t),c=GE.count(e,t),u=JE.count(e,t),d=lD.count(e,t),f=gD.count(e,t),h=vD.count(e,t),p=n/r.second.width-1,m=n/r.minute.width-1,g=n/r.date.width-1,y=n/r.year.width-1,v={type:"year",desc:"year",count:h,interval:vD.every(1),formatter:r.year.formatter,offset:e=>vD.offset(e,-1),floor:vD.floor};if(s<=p)v.type=bD,v.desc="second",v.count=s,v.interval=WE.every(1),v.formatter=r.second.formatter,v.offset=e=>WE.offset(e,-1),v.floor=WE.floor;else if(s/2<=p)v.type=bD,v.desc="every other second",v.count=s/2,v.interval=WE.every(2),v.formatter=r.second.formatter,v.offset=e=>WE.offset(e,-2),v.floor=WE.floor;else if(s/5<=p)v.type=bD,v.desc="every 5 second",v.count=s/5,v.interval=WE.every(5),v.formatter=r.second.formatter,v.offset=e=>WE.offset(e,-5),v.floor=WE.floor;else if(s/15<=p)v.type=bD,v.desc="every 15 second",v.count=s/15,v.interval=WE.every(15),v.formatter=r.second.formatter,v.offset=e=>WE.offset(e,-15),v.floor=WE.floor;else if(s/30<=p)v.type=bD,v.desc="every 30 second",v.count=s/30,v.interval=WE.every(30),v.formatter=r.second.formatter,v.offset=e=>WE.offset(e,-30),v.floor=WE.floor;else if(l<=m)v.type=xD,v.desc="minute",v.count=l,v.interval=YE.every(1),v.formatter=r.minute.formatter,v.offset=e=>YE.offset(e,-1),v.floor=YE.floor;else if(l/2<=m)v.type=xD,v.desc="every 2 minute",v.count=l/2,v.interval=YE.every(2),v.formatter=r.minute.formatter,v.offset=e=>YE.offset(e,-2),v.floor=YE.floor;else if(l/5<=m)v.type=xD,v.desc="every 5 minute",v.count=l/5,v.interval=YE.every(5),v.formatter=r.minute.formatter,v.offset=e=>YE.offset(e,-5),v.floor=YE.floor;else if(l/10<=m)v.type=xD,v.desc="every 10 minute",v.count=l/10,v.interval=YE.every(10),v.formatter=r.minute.formatter,v.offset=e=>YE.offset(e,-10),v.floor=YE.floor;else if(l/15<=m)v.type=xD,v.desc="every 15 minute",v.count=l/15,v.interval=YE.every(15),v.formatter=r.minute.formatter,v.offset=e=>YE.offset(e,-15),v.floor=YE.floor;else if(l/30<=m)v.type=xD,v.desc="every 30 minute",v.count=l/30,v.interval=YE.every(30),v.formatter=r.minute.formatter,v.offset=e=>YE.offset(e,-30),v.floor=YE.floor;else if(c<=m)v.type=SD,v.desc="hour",v.count=c,v.interval=GE.every(1),v.formatter=r.minute.formatter,v.offset=e=>GE.offset(e,-1),v.floor=GE.floor;else if(c/2<=m)v.type=SD,v.desc="every 2 hour",v.count=c/2,v.interval=GE.every(2),v.formatter=r.minute.formatter,v.offset=e=>GE.offset(e,-2),v.floor=GE.floor;else if(c/3<=m)v.type=SD,v.desc="every 3 hour",v.count=c/3,v.interval=GE.every(3),v.formatter=r.minute.formatter,v.offset=e=>GE.offset(e,-3),v.floor=GE.floor;else if(c/6<=m)v.type=SD,v.desc="every 6 hour",v.count=c/6,v.interval=GE.every(6),v.formatter=r.minute.formatter,v.offset=e=>GE.offset(e,-6),v.floor=GE.floor;else if(c/12<=m||i)v.type=SD,v.desc="every 12 hour",v.count=c/12,v.interval=GE.every(12),v.formatter=r.minute.formatter,v.offset=e=>GE.offset(e,-12),v.floor=GE.floor;else if(u<=g)v.type=wD,v.desc="day",v.count=u,v.interval=JE.every(1),v.formatter=r.date.formatter,v.offset=e=>JE.offset(e,-1),v.floor=JE.floor;else if(u/2<=g)v.type=wD,v.desc="every 2 day",v.count=u/2,v.interval=JE.every(2),v.formatter=r.date.formatter,v.offset=e=>JE.offset(e,-2),v.floor=JE.floor;else if(u/3<=g)v.type=wD,v.desc="every 3 day",v.count=u/3,v.interval=JE.every(3),v.formatter=r.date.formatter,v.offset=e=>JE.offset(e,-3),v.floor=JE.floor;else if(d<=g)v.type=wD,v.desc="week",v.count=d,v.interval=lD.every(1),v.formatter=r.date.formatter,v.offset=e=>lD.offset(e,-1),v.floor=JE.floor;else if(d/2<=g)v.type=wD,v.desc="every 2 week",v.count=d/2,v.interval=lD.every(2),v.formatter=r.date.formatter,v.offset=e=>lD.offset(e,-2),v.floor=JE.floor;else if(f<=g)v.type=MD,v.desc="month",v.count=f,v.interval=gD.every(1),v.formatter=r.date.formatter,v.offset=e=>gD.offset(e,-1),v.floor=JE.floor;else if(f/3<=g)v.type=MD,v.desc="quarter",v.count=f/3,v.interval=gD.every(3),v.formatter=r.date.formatter,v.offset=e=>gD.offset(e,-3),v.floor=JE.floor;else if(f/6<=g)v.type=MD,v.desc="half year",v.count=f/6,v.interval=gD.every(6),v.formatter=r.date.formatter,v.offset=e=>gD.offset(e,-6),v.floor=JE.floor;else if(h<=y)v.type=kD,v.desc="year",v.count=h,v.interval=vD.every(1),v.formatter=r.year.formatter,v.offset=e=>vD.offset(e,-1),v.floor=vD.floor;else if(h/2<=y)v.type=kD,v.desc="every 2 year",v.count=h/2,v.interval=a(2),v.formatter=r.year.formatter,v.offset=e=>vD.offset(e,-2),v.floor=vD.floor;else if(h/5<=y)v.type=kD,v.desc="every 5 year",v.count=h/5,v.interval=a(5),v.formatter=r.year.formatter,v.offset=e=>vD.offset(e,-5),v.floor=vD.floor;else if(h/10<=y)v.type=kD,v.desc="every 10 year",v.count=h/10,v.interval=a(10),v.formatter=r.year.formatter,v.offset=e=>vD.offset(e,-10),v.floor=vD.floor;else{const e=Math.max(1,Math.floor(h/y));v.type=kD,v.desc="every nth year",v.count=e,v.interval=a(e),v.formatter=r.year.formatter,v.offset=t=>vD.offset(t,-e),v.floor=vD.floor}return v}(s,l,n,t.all(),r,a),i.set(c,u,1));const d=e.ticks(u.interval);d.length?s.getTime()!==d[0].getTime()&&d.unshift(u.offset(d[0])):d.push(u.floor(s));const f=d.map((e,t,n)=>{const r=n[t+1]?n[t+1]-e:l-e;return{start:e,end:new Date(e.getTime()+r),formatter:u.formatter}});let h=[];if(!o&&u.type<=SD){const n=t.getFormat("date"),r=e.ticks(JE.every(1));r.length&&s.getUTCDate()!==r[0].getUTCDate()&&r.unshift(JE.offset(r[0],-1)),h=(r.length?r:[JE.floor(s)]).map((e,t,r)=>{const i=r[t+1]?r[t+1]-e:l-e;return{start:e,end:new Date(e.getTime()+i),formatter:n.formatter}})}return{inner:f,outer:h}}const qD=86400,ED=1440,DD={};function TD(e,t,n,r){return{type:e,start:new Date(Date.UTC(...t)),end:new Date(Date.UTC(...n)),formatter:r}}function OD(e,t,n){const{generator:r,anchor:i,clamp:o,level:a}=t.ticks,{qNumFormat:s}=t.formatter;e.clamp(o);const[l,c]=e.domain(),u=CE().domain([IE(l),IE(c)]);u.clamp(o),u.range(t.invert?[1,0]:[0,1]);const d="object"==typeof r?r:{type:r};let f;f="d3"===d.type?(e,i)=>CD({timeScale:u,labels:n,distance:e,isDayOrShorter:i,cache:t.cache,timeOnly:"T"===s.qType,initialMin:void 0===d.initialMin?u.domain()[0]:IE(r.initialMin)}):e=>function(e,t,n,r,i,o=!1){if(DD[[t,n,r,r,o]])return DD[[t,n,r,r,o]];const a={year:e.getFormat("year"),date:e.getFormat("date"),minute:e.getFormat("minute"),second:e.getFormat("second")},s=IE(n),l=s.getFullYear(),c=s.getMonth(),u=s.getDate(),d=r-n,f=t/(i-r),h=f/1440,p=f/qD,m=366*f,g=3*f*30,y=a.second.width/p,v=a.minute.width/h,b=a.date.width/g,x=a.year.width/m;let S,w,M,k=0,C=0,q=null,E=null,D=null,T=null,O=null,N=null;const A={outer:[],inner:[]};for(y<1?(q=1,C=1/qD):y<2?(q=2,C=1/qD*2):y<5?(q=5,C=1/qD*5):y<10?(q=10,C=1/qD*10):y<30?(q=30,C=1/qD*30):v<1?(E=1,C=1/ED):v<2?(E=2,C=1/ED*2):v<5?(E=5,C=1/ED*5):v<10?(E=10,C=.006944444444444445):v<30?(E=30,C=.020833333333333336):v<60?(D=1,C=1/24):v<120?(D=2,C=2/24):v<360?(D=6,C=.25):v<720?(D=12,C=.5):b<1/90?(C=1,T=1):b<2/90?(C=2,T=2):b<7/90?(C=7,T=7):b<31/90?(O=1,C=31):b<1?(O=3,C=90):x<1?(N=1,C=366):x<2?(N=2,C=732):x<5?(N=5,C=1826.25):(N=10,C=3652.5),w=Math.floor((d+n%1)/C);k<i;){M=w+1,S=N?TD("year",[l+w*N,0,1],[l+M*N,0,1],a.year.formatter):O?TD("month",[l,c+w*O,1],[l,c+M*O,1],a.date.formatter):T?TD("day",[l,c,u+w*T],[l,c,u+M*T],a.date.formatter):D?TD("hour",[l,c,u,0+w*D],[l,c,u,0+M*D],a.minute.formatter):E?TD("minute",[l,c,u,0,0+w*E],[l,c,u,0,0+M*E],a.minute.formatter):TD("second",[l,c,u,0,0,0+w*q],[l,c,u,0,0,0+M*q],a.second.formatter),k=PE(S.start),A.inner.push(S);const e=Math.floor(k);if(!(o||N||O||T)){const t={type:"day",start:IE(e),end:IE(e+1),formatter:a.date.formatter,qStart:e};A.outer[A.outer.length-1]&&A.outer[A.outer.length-1].qStart===t.qStart||A.outer.push(t)}w++}return A.min=r,A.max=i,DD[[t,n,r,r,o]]=A,A}(n,e,d.min,l,c,"T"===s.qType);const h={transform:(t=[],{isMinor:n=!1}={})=>t.map(t=>{let r;r="start"===i?t.qStart:"end"===i?t.qEnd:(t.qStart+t.qEnd)/2;const o=e.clamp();n&&e.clamp(!1);const a=e(r),s=e(t.qStart),l=e(t.qEnd);return e.clamp(o),{value:r,position:a,start:s,end:l,label:t.qText,isMinor:n,data:n?void 0:{start:t.qStart,end:t.qEnd,scaleStart:e.domain()[0]}}}).filter(e=>e.position>=0&&e.position<=1),generate:(t=100,n)=>f(t,n)[a].map(t=>{let n;return n="start"===i?PE(t.start):"end"===i?PE(t.end):(PE(t.start)+PE(t.end))/2,{position:u(t.start),start:u(t.start),end:u(t.end),value:n,label:t.formatter(n),isMinor:!1,data:{start:PE(t.start),end:PE(t.end),scaleStart:e.domain()[0]}}}).filter(e=>e.position>=0&&e.position<=1)};return h}const ND=/t+/i;const AD={min:NaN,max:NaN,invert:!1,qAxis:[],field:void 0,formatter:{fn:()=>e=>e,measureText:()=>({width:0,height:0}),localeInfo:{},qNumFormat:{}},ticks:{generator:"d3",level:"outer",anchor:void 0,clamp:!1},cache:{get:()=>!1,set:()=>{},key:()=>""}};function _D(e,t){e.instance||(e.instance=t.copy(),e.instance.domain(t.domain()),e.instance.clamp(!0),e.instance.range(e.invert?[1,0]:[0,1]))}const ID="continuousPan";var LD={model:function({model:e,layoutService:t,largeDataService:n,dataProcessorModel:r=Vg,viewCache:i,viewState:o,definitionPath:a},s={}){const{engineFetcherFactory:l=Ng,snapshotFetcherFactory:c=_g,cacheFetcherFactory:u=Ag,cache:d={initial:{},merged:{}}}=s,f=l({model:e,layoutService:t,largeDataService:n,definitionPath:a}),h=c({layoutService:t,viewCache:i}),p=u({cache:d}),m=e=>{throw e.isHandled=!0,e};let g,y,v;return{update(e){({initialMin:y,initialMax:v}=function(e={}){let{qMin:t,qMax:n}=e;return t=Number.isNaN(+t)?0:t,n=Number.isNaN(+n)?0:n,{initialMin:t,initialMax:n}}(e.qHyperCube.qDimensionInfo[0])),i.set("continuousMin",y),i.set("continuousMax",v),i.set("minimiumZoomSpan",function(e,t){return Math.max(1e-6,(t-e)*jg)}(y,v)),g=t.meta.isSnapshot?h:f,t.meta.isSnapshot&&({zoom:{min:y,max:v}}=h.getSnapshotData()),o.preventSet("zoom",{min:y,max:v})},updateLayout(e){const{qDataPages:n,qAxisData:r}=e;return t.setHyperCubeValue("qDataPages",n),t.setHyperCubeValue("qAxisData",r),t.setHyperCubeValue("qMode","S"),t.setHyperCubeValue("qColumnOrder",[]),e},initialFetch(){return g.fetch(y,v).then(e=>{const t=function(e){return{qDataPages:e.qDataPages.map(e=>{const t=Pg(e.qArea,e.qMatrix);return{...e,qArea:t}}),qAxisData:e.qAxisData}}(e);return r.command.processDataPage({dataPage:t.qDataPages.length?t.qDataPages[0]:[]}),d.initial=t,d.merged=t,e}).then(e=>Rg(y,v,e)).then(e=>this.updateLayout(e)).catch(m)},fetch:(e,t)=>g.fetch(e,t).then(e=>function(e,t){const n={};return n.qDataPages=(e.qDataPages||[]).map((e,n)=>{const r=function(e,t){if(!t||!t.length||!t[0].length)return e;const n=t[0][0].qNum,r=t[t.length-1][0].qNum,i=[],o=[];for(let t=0,a=e.length;t<a;t++){const a=e[t][0];a.qNum<n?i.push(e[t]):a.qNum>r&&o.push(e[t])}return[...i,...t,...o]}(e.qMatrix,t.qDataPages[n].qMatrix),i=Pg(e.qArea,r);return{...e,qArea:i,qMatrix:r}}),e.qAxisData&&e.qAxisData.qAxis&&(n.qAxisData=function(e,t){if(!t||!t.qAxis.length||t.qAxis.every(e=>!e.qTicks.length))return e;const n=t.qAxis.map(e=>e.qName),r=t.qAxis.map(e=>({start:e.qTicks[0].qStart,end:e.qTicks[e.qTicks.length-1].qStart})),i=t.qAxis.map(e=>({qName:e.qName,qTags:[...e.qTags],qTicks:[...e.qTicks]}));for(let t=0,o=e.qAxis.length;t<o;t++){const o=e.qAxis[t],a=n.indexOf(o.qName),s=[],l=[];if(a>-1){const{start:e,end:t}=r[a];for(let n=0,r=o.qTicks.length;n<r;n++){const r=o.qTicks[n];r.qStart<e?s.push(r):r.qStart>t&&l.push(r)}i[a].qTicks=[...s,...i[a].qTicks,...l]}}return{qAxis:i}}(e.qAxisData,t.qAxisData)),n}(d.initial,e)).then(e=>(r.command.processDataPage({dataPage:e.qDataPages.length?e.qDataPages[0]:[]}),d.merged=e,e)).then(n=>Rg(e,t,n)).catch(m),fetchFromCache:(e,t)=>p.fetch(e,t).then(n=>Rg(e,t,n)),fetchMinMaxData:()=>Promise.resolve(d.initial.qDataPages||[]),getInitialCube(){const e=t.getHyperCube();return bg({},e,{...d.initial})},getInitialLayout(){const e=this.getInitialCube();return bg({},t.getLayout(),{qHyperCube:e})},getDimensionCardinality:()=>Hg(d.initial,t.meta),setSnapshotData(e){const{qHyperCube:t}=e,n=r.query.getShouldProcess()?[r.query.getFilteredDataPage({dataPage:d.merged.qDataPages[0]})]:d.merged.qDataPages;t.qDataPages=n,t.qAxisData=d.merged.qAxisData}}},event:{onZoomChange:function(e,t){const{layoutService:n,continuousDataModel:r}=e;function i(e,n,i){return r[e](n,i).then(e=>(r.updateLayout(e),t(),e))}const o=Ox((e,t)=>i("fetch",e,t),50);return({min:e,max:t},{min:r,max:a})=>!n.meta.isContinuous||e===r&&t===a?Promise.resolve(null):i("fetchFromCache",e,t).then(n=>(o(e,t),n))},onZoomIntercept:function({viewCache:e}){let t=NaN,n=NaN,r=NaN;return(i,o)=>(t=e.get("continuousMin"),n=e.get("continuousMax"),r=e.get("minimiumZoomSpan"),Math.abs(i.max-i.min)<r?o:{min:Math.min(i.max,Math.max(t,i.min)),max:Math.max(i.min,Math.min(n,i.max))})},onZoom:function({viewCache:e,viewState:t,chart:n},{threshold:r=50,rtl:i=!1,targetKey:o}){const a=e.get("continuousMin"),s=e.get("continuousMax");return Nx((e,r)=>{const l=(e=>n.componentsFromPoint(e).filter(e=>e.key===o)[0])(e);if(l){const o=function(e,t,n){let{x:r}=e;return r-=t.element.getBoundingClientRect().left,r-=n.rect.x,Math.max(0,Math.min(1,r/n.rect.width))}(e,n,l),c=i?1-o:o,{min:u,max:d}=t.get("zoom"),f=Math.abs(d-u),h=f-(r>0?Fg:zg)*f,p=u+h*c,m=d-h*(1-c),g=p<a?a-p:0,y=m>s?m-s:0;t.set("zoom",{min:Math.max(p-y,a),max:Math.min(m+g,s)})}},r)}},interactions:{areaPan:function({targetKey:e,chart:t,actions:n,viewState:r,viewCache:i}){return{type:"Pan",key:"continuous:pan",options:{event:ID,pointers:1,threshold:10,enable(r,i){return this.started===ID||!i||!!n.scroll.enabled()&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some(t=>t.key===e)}},events:{[`${ID}start`](n){n.preventDefault(),this.started=ID;const{min:i,max:o}=r.get("zoom");this[ID]={min:i,max:o,size:t.component(e).rect.computedInner.width,span:o-i}},[`${ID}move`](e){e.preventDefault();const{span:t,min:n,max:o,size:a}=this[ID],s=-e.deltaX/a;r.set("zoom",{min:Math.min(n+s*t,i.get("continuousMax")-t),max:Math.max(o+s*t,i.get("continuousMin")+t)})},[`${ID}end`](e){e.preventDefault(),this.started=!1},[`${ID}cancel`](e){e.preventDefault(),this.started=!1}}}}},picassoComponents:{axisOverlay:TM,timeAxis:LM},picassoScales:{time:function e(t,n={}){const r=function(e,t,n){const r={};return Object.keys(t).forEach(i=>{const o=e[i],a=typeof o;"function"===a?r[i]=o(n):"object"!==a||Array.isArray(o)?r[i]="undefined"===a?t[i]:o:r[i]=bg(!0,{},t[i],o)}),r}(t,AD,n),{qAxis:i}=r,o=mC(),a={instance:null,invert:!1},{min:s,max:l}=function(e,t){let n=+e.min,r=+e.max;return Number.isNaN(n)&&Number.isNaN(r)&&Array.isArray(t)&&t.length&&(n=Math.min(...t[t.length-1].qTicks.map(e=>e.qStart)),r=Math.max(...t[t.length-1].qTicks.map(e=>e.qEnd))),n===r&&(n-=.5,r+=.5),{min:Number.isNaN(+n)?0:n,max:Number.isNaN(+r)?1:r}}(r,i);let c,u,d=[];const f=function(e){return Number.isNaN(+e)?NaN:o(e)};f.ticks=({distance:e,resolve:t=c.resolve}={})=>{const n=t(e),o=n[r.ticks.level];if(Number.isNaN(+o)||(d=u.transform(i[o].qTicks,{isMinor:!1})),!Number.isNaN(+n.minor)){const e=u.transform(i[n.minor].qTicks,{isMinor:!0});d=d.concat(e)}return"auto"===o&&(d=u.generate(e,n.isDayOrShorter)),d},f.invert=e=>o.invert(e),f.domain=e=>Array.isArray(e)?o.domain(e):o.domain(),f.range=e=>Array.isArray(e)?o.range(e):o.range(),f.norm=e=>(_D(a,f),a.instance(e)),f.normInvert=e=>(_D(a,f),a.instance.invert(e)),f.copy=()=>e(t,n),f.clamp=(e=!0)=>(o.clamp(e),o.clamp()),f.min=()=>Math.min(s,l),f.max=()=>Math.max(s,l),o.range(r.invert?[1,0]:[0,1]),o.domain([s,l]),a.invert=r.invert;const h=function(e){const t={},{measureText:n,fn:r,localeInfo:i}=e.formatter,o={second:{type:"second",pattern:"hh:mm:ss",width:60,formatter:void 0},minute:{type:"minute",pattern:"hh:mm",width:60,formatter:void 0},date:{type:"date",pattern:"YYYY-MM-DD",width:60,formatter:void 0},year:{type:"year",pattern:"YYYY",width:60,formatter:void 0}};return i&&ND.test(i.qTimestampFmt)&&(o.minute.pattern+=" tt",o.second.pattern+=" tt"),o.date.pattern=i&&i.qDateFmt?i.qDateFmt:o.date.pattern,Object.keys(o).forEach(e=>{o[e].formatter=r(o[e].pattern),o[e].width=Math.max(o[e].width,n(o[e].formatter(41000.2343433)).width+16)}),t.getFormat=e=>o[e],t.all=()=>o,t.getFormatFromTicks=e=>{const t=e.filter(e=>!e.isMinor),{length:n}=t;if(!n)return o.date;const r=IE(t[0].data.start),i=IE(t[n-1].data.start);return JE.count(r,i)/n>=1?o.date:GE.count(r,i)/n>0?o.minute:YE.count(r,i)/n>0?o.second:o.date},t}(r);return u=OD(o.copy(),r,h),c=_E({qAxis:i,measureText:r.formatter.measureText,reqAutoFitWidth:2*h.getFormat("minute").width,cache:r.cache,scale:f}),f.data=()=>({fields:[{formatter:f.formatter,id:()=>`qHyperCube/${r.field}`,key:()=>r.field,raw:Cx(n,"fields.0.raw",()=>({}))}]}),f.formatter=()=>h.getFormatFromTicks(d).formatter,f}}};const PD=[["FULL",{width:550,height:450}],["MEDIUM",{width:400,height:220}],["SMALL",{width:300,height:150}],["XSMALL",{width:150,height:75}],["SPARK",{width:0,height:0}]],RD={};PD.forEach(([e,{width:t,height:n}])=>{RD[e]={width:t,height:n}});const zD={getLayoutModes:()=>RD,getLayoutMode(e,t){let n;for(n=0;n<PD.length;++n)if(e>=PD[n][1].width&&t>=PD[n][1].height)return PD[n][0];return"SPARK"}};function FD(e,t){return{layoutModes:zD.getLayoutModes(),center:void 0!==t.minCenterRatio?{minWidthRatio:t.minCenterRatio,minHeightRatio:t.minCenterRatio}:void 0,logicalSize:t.logicalSize?{align:.5,preserveAspectRatio:!0,...t.logicalSize}:void 0}}const jD=["$date","$timestamp","$time"],BD=["D","TS","T"],HD={hasTimeTag:e=>!!(e&&e.qTags&&e.qTags.some(e=>jD.some(t=>t===e))),hasUnknownFormat:e=>!(!e||!e.qNumFormat||"U"!==e.qNumFormat.qType),hasTimeFormat:e=>!!(e&&e.qNumFormat&&BD.some(t=>t===e.qNumFormat.qType)),isTimeDimension:(e,t)=>!!(e&&t&&(HD.hasTimeTag(t)&&HD.hasUnknownFormat(t)||HD.hasTimeFormat(t))),isTime:(e,t)=>!!(t&&t.qHyperCube.qDimensionInfo&&t.qHyperCube.qDimensionInfo.length)&&(e&&HD.isTimeDimension(e,t.qHyperCube.qDimensionInfo.filter(e=>7005!==e.qError?.qErrorCode)[0])),canBeContinuousDimension(e){if(!e)return!1;const t=e.qTags||[];return!(!e.qContinuousAxes||!t.some(e=>"$numeric"===e))},canBeContinuous(e){const t=e?.qHyperCube?.qDimensionInfo?.filter(e=>7005!==e.qError?.qErrorCode);return!((t?.length??0)<1)&&HD.canBeContinuousDimension(t[0])},maxNumberOfLines:12},VD=/^[A-Z][A-z0-9_]*$/i,$D={getChar(e){let t=e,n=-1;return t>9?(n=65+t-10,n>90&&(n+=6)):t=`${t}`.charCodeAt(0),[48,111,79,105,73,108].indexOf(n)>-1?this.getChar(t+1):String.fromCharCode(n)},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,"")}},WD={setValue:(e,t,n)=>{if(!t)return!1;const r=t.split("."),i=r[r.length-1];let o,a=e;for(o=0;o<r.length-1;++o)void 0===a[r[o]]&&(a[r[o]]=Number.isNaN(+r[o+1])?{}:[]),a=a[r[o]];if(void 0!==n){const e=a[i];return a[i]=n,{updated:n,previous:e}}return delete a[i],!1},getValue:(e,t,n)=>{const r=t.split(".");let i,o=e;if(void 0===o)return n;for(i=0;i<r.length;++i){if(void 0===o[r[i]])return n;o=o[r[i]]}return o},moveArrayElement:(e,t,n)=>{if(n>=e.length){let t=n-e.length;for(;1+t--;)e.push(void 0)}e.splice(n,0,e.splice(t,1)[0])},escapeField:e=>{let t;return t=!e||"]"===e||VD.test(e)?e:`[${e.replace(/\]/g,"]]")}]`,t},deleteUndefinedProperties:e=>{Object.keys(e).forEach(t=>{void 0===e[t]&&delete e[t]})},generateId:()=>$D.id(),shouldUseFormat:e=>!e.isCustomFormatted&&(e.qIsAutoFormat||"U"===e.qNumFormat.qType)},UD=e=>WD.getValue(e,"qHyperCube.qDimensionInfo",[]),YD=e=>WD.getValue(e,"qHyperCube.qMeasureInfo",[]),KD=e=>WD.getValue(e,"barGrouping.grouping"),GD={continuous({layout:e,properties:t,auto:n}){if(!HD.canBeContinuous(e))return!1;const r=t||e;return WD.getValue(r,"dimensionAxis.continuousAuto")?"function"==typeof n?n():!!n:!!r?.preferContinuousAxis},dimensionless:e=>!UD(e).length,grouped(e){return!this.dimensionless(e)&&"grouped"===KD(e)&&(UD(e).length>1||YD(e).length>1)&&!this.continuous({layout:e})},groupedByDimension(e){return this.grouped(e)&&UD(e).length>1&&1===YD(e).length},groupedByMeasure(e){return this.grouped(e)&&1===UD(e).length&&YD(e).length>1},stacked(e){return(!this.dimensionless(e)&&"grouped"!==KD(e)&&"butterfly"!==KD(e)||this.continuous({layout:e}))&&(UD(e).length>1||YD(e).length>1)},stackedByDimension(e){return this.stacked(e)&&UD(e).length>1&&1===YD(e).length},stackedByMeasure(e){return this.stacked(e)&&1===UD(e).length&&YD(e).length>1},simple:e=>0===UD(e).length||1===UD(e).length&&1===YD(e).length,snapshot:e=>!!WD.getValue(e,"snapshotData")};function XD(e,t){const n=e.component(t);return n&&n._DO_NOT_USE_getInfo&&n._DO_NOT_USE_getInfo().offset}const JD=e=>{throw e.isHandled=!0,e};const ZD={getDockValue:e=>"near"===e||"left"===e||"top"===e?0:1,getOppositeDock(e){switch(e){case"left":return"right";case"right":return"left";case"top":return"bottom";case"bottom":return"top";case"near":default:return"far";case"far":return"near"}},getHorizontalDock:e=>"near"===e||"left"===e?"left":"right",getVerticalDock:e=>"near"===e||"bottom"===e?"bottom":"top",getDock:(e,t,n)=>"vertical"===e||"y"===e?ZD.getVerticalDock(t):n?ZD.getOppositeDock(ZD.getHorizontalDock(t)):ZD.getHorizontalDock(t),getInvertedOrientation:e=>"vertical"===e?"horizontal":"vertical",getMinorScaleAxis:e=>"vertical"===e?"y":"x",getMajorScaleAxis:e=>"vertical"===e?"x":"y",getAlignment:(e,t)=>"vertical"===e?"near"===t||"bottom"===t?1:0:"near"===t||"left"===t?0:1,getMeasureScaleInvert:(e,t)=>"vertical"===e||t,getDimensionScaleInvert:(e,t)=>"horizontal"===e&&t,getSize:(e,{width:t,height:n})=>"vertical"===e?t:n};var QD=(e,t)=>{if("function"==typeof t.defaultValue)return t.defaultValue();if(void 0!==t.defaultValue)return t.defaultValue;if(Array.isArray(t.options))return t.options[0].value;switch(e){case"array":return[];case"string":return"";case"integer":case"number":return 0;case"boolean":return!1;default:return null}};const eT=166/26,tT=12/11,nT={stringWidthOverMWidth:e=>(12*Math.min(e,3)+Math.max(e-3,0)*eT)/11,getCharacterRatios(e){if(!e)return{latin:0,cjk:0};let t=e.match(/[\u4E00-\u9FFF]/g),n=e.match(/[\u3040-\u309F]/g),r=e.match(/[\u30A0-\u30FF]/g);t=t?t.length:0,n=n?n.length:0,r=r?r.length:0;const i=t+n+r;return{latin:e.length-i,cjk:i}},getTotalCharacterRatios(e,t,n="qText"){if(!e)return{latinRatio:1,cjkRatio:0};const r={latin:0,cjk:0};let i;void 0===t?e.forEach(e=>{i=nT.getCharacterRatios(e[n]),r.latin+=i.latin,r.cjk+=i.cjk}):e.forEach(e=>{i=nT.getCharacterRatios(e[t][n]),r.latin+=i.latin,r.cjk+=i.cjk});const o=Math.max(1,r.latin+r.cjk);return r.latinRatio=r.latin/o,r.cjkRatio=r.cjk/o,r},getAdjustedMaxGlyphCount(e,t,n,r="qText"){const i=nT.getTotalCharacterRatios(t,n,r),o=i.latinRatio*e,a=i.cjkRatio*e;return Math.ceil(nT.stringWidthOverMWidth(o)+a*tT)}},rT="#la-vie-tooltip";function iT(){if(!document.querySelector(rT)){const e=document.createElement("div");e.id="la-vie-tooltip",e.setAttribute("data-qs-css",""),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 oT({key:e="tooltip",rtl:t}){return{show:!0,key:e,type:"tooltip",layout:{displayOrder:3},beforeMount(){iT()},beforeUpdate(){iT()},destroyed(){!function(){const e=document.querySelector(rT);e&&e.parentElement&&e.childElementCount<1&&e.parentElement.removeChild(e)}()},settings:{appendTo:()=>document.querySelector(rT),content:({h:e,data:t,style:n})=>t[0].map(t=>e("tr",{},function(e,{h:t,style:n}){return e.map(e=>{const r={style:{...n.cell||{},...e.style||{}},class:e.class};return e.colspan&&(r.colspan=e.colspan),t("td",r,e.content)})}(t,{h:e,style:n}))),direction:t?"rtl":"ltr"},style:{arrow:{color:"#404040"},content:{display:"table","border-spacing":"4px",background:"rgba(64, 64, 64, 0.9)",opacity:"1",fontSize:"13px",fontFamily:'"Source Sans Pro", "Arial", "sans-serif"',"empty-cells":"show"},cell:{"max-width":"180px","word-break":"break-word","word-wrap":"break-word","overflow-wrap":"break-word",hyphens:"auto"}}}}const aT=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),sT=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞יִײַ-ﬨשׁ-ﭏ]"),lT=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),cT={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),isLtrChar:e=>aT.test(e),isRtlChar:e=>sT.test(e)||lT.test(e),detectTextDirection(e){const t=e?e.length:0;let n,r;for(n=0;n<t;n++){if(r=e[n],cT.isLtrChar(r))return"ltr";if(cT.isRtlChar(r))return"rtl"}return"ltr"}},uT={getColorSymbol:(e,t)=>e.h("div",{style:{display:"inline-block",width:"10px",height:"10px","background-color":t.color.fill,margin:"0 8px"}}),getNodeFillColor:e=>e.attrs&&void 0!==e.attrs.fill?e.attrs.fill:e.children&&e.children[0]&&e.children[0].attrs&&void 0!==e.children[0].attrs.fill?e.children[0].attrs.fill:void 0,getColor(e,t,n){const r=t.data,i=e.resources.formatter,o=e.resources.dataset,a={};if(n.coloring.label&&(a.label=`${n.coloring.label}`),"color"!==n.coloring.type&&r.fillTooltip){const e=i("fill"),t="measure"===n.coloring.fieldType;if(a.value=t&&e?e(r.fillTooltip.value):r.fillTooltip.label?r.fillTooltip.label:r.fillTooltip.value,!n.coloring.label){const e=o(r.fillTooltip.source.key).field(r.fillTooltip.source.field).title();a.label=`${e}`}}return a.fill=void 0===r._fillColor?uT.getNodeFillColor(t):r._fillColor,a},getMeasure:(e,t)=>({label:`${e(t.source.key).field(t.source.field).title()}`,value:""===t.label||"NaN"===t.label?"-":t.label,field:t.source.field}),hideColorRow:(e,t)=>void 0===e.color.value||e.measures.some(e=>e.field===t.coloring.field),getTitleRow(e,t){const n=cT.detectTextDirection(e.title);return[{content:e.title,style:{"font-weight":"bold","text-align":t?"right":"left",direction:n,"white-space":"pre-wrap"},colspan:2},{}]},getDescriptionRow(e,t){const n=cT.detectTextDirection(e.value);return[{content:e.value,style:{"text-align":t?"right":"left",direction:n,"white-space":"pre-wrap"},colspan:2},{}]},getNMoreRow(e,t,n){const r=t?t.get("Object.ChartTooltip.NMore",e):`+${e} more`;return[{content:r,style:{"font-weight":"bold","text-align":n?"right":"left",direction:cT.detectTextDirection(r)},colspan:2},{}]},getSeparatorRow:()=>[{content:"",style:{"background-image":"linear-gradient(transparent 8px, rgba(255, 255, 255, 0.4) 8px, rgba(255, 255, 255, 0.4) 9.2px, transparent 9.2px)",height:"17px"},colspan:2},{}],getColorRow(e,t,n){const r=cT.detectTextDirection(t.color.label),i=n?[":",t.color.label]:[t.color.label,":"],o=cT.detectTextDirection(t.color.value);return[{content:i,style:{"text-align":n?"right":"left",direction:r}},{content:n?[t.color.value,uT.getColorSymbol(e,t)]:[uT.getColorSymbol(e,t),t.color.value],style:{"text-align":n?"left":"right",direction:o,"vertical-align":"middle"}}]},getMeasureRow(e,t,n,r,i=!1){const o=cT.detectTextDirection(e.label),a=r?[":",e.label]:[e.label,":"],s=cT.detectTextDirection(e.value);let l;return l=i?r?[e.value,uT.getColorSymbol(t,n)]:[uT.getColorSymbol(t,n),e.value]:[e.value],[{content:a,style:{"text-align":r?"right":"left",direction:o}},{content:l,style:{"text-align":r?"left":"right",direction:s,"vertical-align":"middle"}}]}};function dT(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function fT(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function hT(){}var pT=.7,mT=1/pT,gT="\\s*([+-]?\\d+)\\s*",yT="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",vT="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",bT=/^#([0-9a-f]{3,8})$/,xT=new RegExp(`^rgb\\(${gT},${gT},${gT}\\)$`),ST=new RegExp(`^rgb\\(${vT},${vT},${vT}\\)$`),wT=new RegExp(`^rgba\\(${gT},${gT},${gT},${yT}\\)$`),MT=new RegExp(`^rgba\\(${vT},${vT},${vT},${yT}\\)$`),kT=new RegExp(`^hsl\\(${yT},${vT},${vT}\\)$`),CT=new RegExp(`^hsla\\(${yT},${vT},${vT},${yT}\\)$`),qT={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 ET(){return this.rgb().formatHex()}function DT(){return this.rgb().formatRgb()}function TT(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=bT.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?OT(t):3===n?new _T(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?NT(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?NT(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=xT.exec(e))?new _T(t[1],t[2],t[3],1):(t=ST.exec(e))?new _T(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=wT.exec(e))?NT(t[1],t[2],t[3],t[4]):(t=MT.exec(e))?NT(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=kT.exec(e))?FT(t[1],t[2]/100,t[3]/100,1):(t=CT.exec(e))?FT(t[1],t[2]/100,t[3]/100,t[4]):qT.hasOwnProperty(e)?OT(qT[e]):"transparent"===e?new _T(NaN,NaN,NaN,0):null}function OT(e){return new _T(e>>16&255,e>>8&255,255&e,1)}function NT(e,t,n,r){return r<=0&&(e=t=n=NaN),new _T(e,t,n,r)}function AT(e){return e instanceof hT||(e=TT(e)),e?new _T((e=e.rgb()).r,e.g,e.b,e.opacity):new _T}function _T(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function IT(){return`#${zT(this.r)}${zT(this.g)}${zT(this.b)}`}function LT(){const e=PT(this.opacity);return`${1===e?"rgb(":"rgba("}${RT(this.r)}, ${RT(this.g)}, ${RT(this.b)}${1===e?")":`, ${e})`}`}function PT(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function RT(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function zT(e){return((e=RT(e))<16?"0":"")+e.toString(16)}function FT(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new BT(e,t,n,r)}function jT(e){if(e instanceof BT)return new BT(e.h,e.s,e.l,e.opacity);if(e instanceof hT||(e=TT(e)),!e)return new BT;if(e instanceof BT)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 BT(a,s,l,e.opacity)}function BT(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function HT(e){return(e=(e||0)%360)<0?e+360:e}function VT(e){return Math.max(0,Math.min(1,e||0))}function $T(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}dT(hT,TT,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ET,formatHex:ET,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return jT(this).formatHsl()},formatRgb:DT,toString:DT}),dT(_T,function(e,t,n,r){return 1===arguments.length?AT(e):new _T(e,t,n,null==r?1:r)},fT(hT,{brighter(e){return e=null==e?mT:Math.pow(mT,e),new _T(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?pT:Math.pow(pT,e),new _T(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new _T(RT(this.r),RT(this.g),RT(this.b),PT(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:IT,formatHex:IT,formatHex8:function(){return`#${zT(this.r)}${zT(this.g)}${zT(this.b)}${zT(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:LT,toString:LT})),dT(BT,function(e,t,n,r){return 1===arguments.length?jT(e):new BT(e,t,n,null==r?1:r)},fT(hT,{brighter(e){return e=null==e?mT:Math.pow(mT,e),new BT(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?pT:Math.pow(pT,e),new BT(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 _T($T(e>=240?e-240:e+120,i,r),$T(e,i,r),$T(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new BT(HT(this.h),VT(this.s),VT(this.l),PT(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=PT(this.opacity);return`${1===e?"hsl(":"hsla("}${HT(this.h)}, ${100*VT(this.s)}%, ${100*VT(this.l)}%${1===e?")":`, ${e})`}`}}));const WT=Math.PI/180,UT=180/Math.PI,YT=.96422,KT=.82521,GT=4/29,XT=6/29,JT=3*XT*XT,ZT=XT*XT*XT;function QT(e){if(e instanceof eO)return new eO(e.l,e.a,e.b,e.opacity);if(e instanceof aO)return sO(e);e instanceof _T||(e=AT(e));var t,n,r=iO(e.r),i=iO(e.g),o=iO(e.b),a=tO((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?t=n=a:(t=tO((.4360747*r+.3850649*i+.1430804*o)/YT),n=tO((.0139322*r+.0971045*i+.7141733*o)/KT)),new eO(116*a-16,500*(t-a),200*(a-n),e.opacity)}function eO(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function tO(e){return e>ZT?Math.pow(e,1/3):e/JT+GT}function nO(e){return e>XT?e*e*e:JT*(e-GT)}function rO(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function iO(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function oO(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof aO)return new aO(e.h,e.c,e.l,e.opacity);if(e instanceof eO||(e=QT(e)),0===e.a&&0===e.b)return new aO(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*UT;return new aO(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new aO(e,t,n,null==r?1:r)}function aO(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function sO(e){if(isNaN(e.h))return new eO(e.l,0,0,e.opacity);var t=e.h*WT;return new eO(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}dT(eO,function(e,t,n,r){return 1===arguments.length?QT(e):new eO(e,t,n,null==r?1:r)},fT(hT,{brighter(e){return new eO(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new eO(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 _T(rO(3.1338561*(t=YT*nO(t))-1.6168667*(e=1*nO(e))-.4906146*(n=KT*nO(n))),rO(-.9787684*t+1.9161415*e+.033454*n),rO(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),dT(aO,oO,fT(hT,{brighter(e){return new aO(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new aO(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return sO(this).rgb()}}));var lO={isDark:function(e){return oO(e).l<70}};function cO(e){const t=e.qDef;!0===t.autoSort&&t.qSortCriterias.forEach(e=>{e.qSortByNumeric=1,e.qSortByAscii=1})}const uO={horizontal:{major:"width",minor:"height",start:"left",end:"right",shadow:{startOffset:"12px 0",endOffset:"-12px 0"}},vertical:{major:"height",minor:"width",start:"top",end:"bottom",shadow:{startOffset:"0 12px",endOffset:"0 -12px"}}},dO=e=>`${e} 12px -12px inset rgba(0, 0, 0, 0.0625)`;var fO={defaultSettings:{settings:{orientation:"horizontal",rtl:!1,range:()=>[0,1]}},renderer:"dom",render(e){const{range:t,orientation:n,rtl:r}=this.settings.settings,[i,o]=t(),a=Math.abs(i)<1e-15,s=Math.abs(o-1)<1e-15,l=(e=>{const t=uO[e];return{base:{position:"absolute",[t.major]:12,[t.minor]:"100%"},towardsStart:{[t.start]:0,[t.end]:"auto",boxShadow:dO(t.shadow.startOffset)},towardsEnd:{[t.start]:"auto",[t.end]:0,boxShadow:dO(t.shadow.endOffset)}}})(n),c="horizontal"===n&&r,u=[];return a||u.push(e("div",{style:{...l.base,...c?l.towardsEnd:l.towardsStart},class:"scroll-hint--towards-start"})),s||u.push(e("div",{style:{...l.base,...c?l.towardsStart:l.towardsEnd},class:"scroll-hint--towards-end"})),u}};function hO({viewState:e,viewCache:t,layoutService:n,dockService:r,rtl:i}){return!n.meta.isSnapshot&&{key:"scroll-hint",type:"scroll-hint",settings:{orientation:r.meta.major.orientation,rtl:i,range:()=>function({layoutService:e,viewState:t,viewCache:n}){return e.meta.isContinuous?function(e,t){const n=e.get("zoom"),r=t.get("continuousMin"),i=t.get("continuousMax");return[(n.min-r)/(i-r),(n.max-r)/(i-r)]}(t,n):function(e){return e.get("viewRange")}(t)}({layoutService:n,viewState:e,viewCache:t})}}}let pO;function mO(){pO=pO||document.createElement("canvas").getContext("2d")}const gO={measureTextWidth(e){mO();const{width:t}=pO.measureText(e);return t},lineWrap(e,t,n,r){let i,o;mO();const a=e?e.split(/\n+|\r+|\r\n/):[],s=[];let l,c,u,d,f=e?e.split(/\s+/):[],h=a[0];if("number"!=typeof t||t<=0)return[e];if("number"==typeof r&&a.length>=r)return a.slice(0,r);for(n&&(pO.font=n),o=0;o<a.length;o++){for(d=a[o]||"",f=d.split(/\s+/),[h]=f,u="",i=1;i<f.length;i++)if(l=`${h} ${f[i]}`,c=gO.measureTextWidth(l),c>t&&("number"!=typeof r||r>s.length)?(s.push(h),h=f[i]):h=l,"number"==typeof r&&s.length>=r){u=f.slice(i+1).join(" ");break}"number"!=typeof r||s.length<r?s.push(h):s[Math.max(0,s.length-1)]=`${s[Math.max(0,s.length-1)]||""} ${h} ${u}`}return s},wordWrap(e,t,n,r,i){if(mO(),!e||!e.length)return[];n&&(pO.font=n);let o=[];const a=e.slice();let s,l,c,u;if(a.filter(e=>!!e),"number"!=typeof t||t<0)return e.slice();for(u=0;u<a.length;u++)c=a[u],l=null,c&&(c.length<=1||gO.measureTextWidth(c)<=t?o.push(c):(s=gO.splitWord(c,t,void 0,r-o.length),s.length<=1?o.push(s[0]):(l=s.pop(),o=o.concat(s),a[u+1]?gO.measureTextWidth(`${l} ${a[u+1]}`)>t&&o.length+a.length-u<=r?a.splice(u+1,0,l):a[u+1]=`${l} ${a[u+1]}`:a.push(l))));return o.forEach((e,t,n)=>{n[t]=e?e.trim():e}),o.length>r?(o=o.splice(0,r),o[o.length-1]=gO.truncate(o[o.length-1],t,n,i).text):(c=o[o.length-1],c&&c.length>1&&gO.measureTextWidth(c)>t&&(o[o.length-1]=gO.truncate(c,t,n,i).text)),o},truncate(e,t,n,r="…"){mO();let i,o,a,s,l=e;const c=gO.measureTextWidth("i"),u=Math.ceil(t/c);if(n&&(pO.font=n),e&&t){if(gO.measureTextWidth(l)>t){for(i=Math.min(u,l.length);i>0;i--)if(o=l.substring(0,i-1),a=o.trim()+r,gO.measureTextWidth(a)<=t){s=l.substring(i-1),l=a;break}i||(s=l,l="…")}}else s=void 0;return{text:l,rest:s}},isNumber:e=>"number"==typeof e&&Number.isFinite(e),explodeWord(e,t,n,r){let i;mO();let o,a=e,s="",l=[];if(gO.isNumber(n)&&n<=1)return[e];const c=Math.ceil(t/r);for(i=Math.min(e.length,c);i>0&&(a=e.substring(0,i),o=e.substring(i-1,i)," "===o?a=e.substring(0,i-1):a+="-",s=e.substring(i),!(gO.measureTextWidth(a)<=t));i--);return(!i&&!a||gO.measureTextWidth(a)>t)&&(a=e.substring(0,1),s=e.substring(1)),l.push(a),s?(gO.measureTextWidth(s)>t?(s=gO.explodeWord(s,t,n-1,r),l=l.concat(s)):l.push(s),l.filter(e=>""!==e.trim())):l},splitWord:(e,t,n,r)=>(mO(),e&&t?(n&&(pO.font=n),gO.explodeWord(e,t,r,Math.max(1,gO.measureTextWidth("i")))):[]),wrapText(e,t,n,r,i){let o;return Number.isNaN(t)?[e]:(o=r>1?gO.lineWrap(e,t,n,r):[e],o=gO.wordWrap(o,t,n,r,i),o)},getFontHeight:e=>(mO(),e&&(pO.font=e),1.5*gO.measureTextWidth("m")),tokenize(e,t,n,r,i,o,a=1){mO(),t&&(pO.font=t);const s=gO.getFontHeight(),l=a*s;let c=[],u=0,d=[];if(o<s)return[];const f=o?Math.max(1,Math.floor(o/l)):r||1;return Array.isArray(r)?(r.forEach(e=>{u+=Number.isNaN(e)||e<=0?0:e}),r.forEach(e=>{c.push(Number.isNaN(e)||e<=0?f-u:e)})):c=[Number.isNaN(r)||r<=0?f:Math.min(f,r)],Array.isArray(e)?e.forEach((e,n)=>{d.length<f&&(d=d.concat(gO.wrapText(e,i,t,c[n])))}):d=gO.wrapText(e,i,t,c[0],n),d}},yO={getDefaultSettings:({size:e=10,fill:t="#999",alignment:n}={})=>({show:!0,type:"n-polygon",fill:t,stroke:"#000",strokeWidth:0,size:e,sides:3,startAngle:-90,alignment:n}),createOob({oob:e,dockValue:t,boxCenter:n,rendWidth:r,rendHeight:i,flipXY:o,symbol:a}){let s="x",l="y",c=r,u=i,d=t<.5?90:-90;return o&&(s="y",l="x",c=i,u=r,d=t<.5?180:0),a(bg({},e,{[s]:n*c,[l]:Math.max(e.size/2,Math.min(t*u,u-e.size/2)),startAngle:d}))}},vO=bg.bind(null,!0),bO={},{isArray:xO}=Array;function SO(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function wO(e){return void 0===e}function MO(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function kO(e,t){const n=t.substring(1).split("/").slice(0,-1);let r;return n.forEach((t,i)=>{if(i===n.length)return;r=+t;const o=isNaN(r)?{}:[];e[r||t]=wO(e[r||t])?o:e[t],e=e[r||t]}),e}function CO(e,t){return t?Object.keys(e).filter(t=>void 0!==e[t]).length:Object.keys(e).length}function qO(e,t,n){let r=!0;if(SO(e)&&SO(t))return CO(e,n)===CO(t,n)&&(Object.keys(e).forEach(i=>{qO(e[i],t[i],n)||(r=!1)}),r);if(xO(e)&&xO(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r+=1)if(!qO(e[r],t[r],n))return!1;return!0}return e===t}bO.compare=qO,bO.generate=function(e,t,n){n=n||"";let r=[];return Object.keys(t).forEach(i=>{const o=function(e){return e?vO({},{val:e}).val:e}(t[i]),a=e[i],s=`${n}/${i}`;qO(o,a)||MO(t,i)||(wO(a)?r.push({op:"add",path:s,value:o}):SO(o)&&SO(a)?r=r.concat(bO.generate(a,o,s)):xO(o)&&xO(a)?r=r.concat(function(e,t,n){let r=[];const i=e.slice();let o=-1;function a(e,t,n){if(e[n]&&wO(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+=1)if(e[n]&&e[n].qInfo.qId===t)return n;return-1}if(qO(t,i))return r;if(!wO(t[0])&&wO(t[0].qInfo)||0===t.length)return r.push({op:"replace",path:n,value:t}),r;for(let e=i.length-1;e>=0;e-=1)o=a(t,i[e].qInfo&&i[e].qInfo.qId,e),-1===o?(r.push({op:"remove",path:`${n}/${e}`}),i.splice(e,1)):r=r.concat(bO.generate(i[e],t[o],`${n}/${e}`));for(let e=0,s=t.length;e<s;e+=1)o=a(i,t[e].qInfo&&t[e].qInfo.qId),-1===o?(r.push({op:"add",path:`${n}/${e}`,value:t[e]}),i.splice(e,0,t[e])):o!==e&&(r.push({op:"move",path:`${n}/${e}`,from:`${n}/${o}`}),i.splice(e,0,i.splice(o,1)[0]));return r}(a,o,s)):r.push({op:"replace",path:`${n}/${i}`,value:o}))}),Object.keys(e).forEach(i=>{wO(t[i])&&!MO(e,i)&&r.push({op:"remove",path:`${n}/${i}`})}),r},bO.apply=function(e,t){t.forEach(t=>{let n=kO(e,t.path),r=t.path.split("/").splice(-1)[0],i=r&&isNaN(+r)?n[r]:n[+r]||n;const o=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(n=null,i=e),"add"===t.op||"replace"===t.op)if(xO(n))"-"===r&&(r=n.length),n.splice(+r,"add"===t.op?0:1,t.value);else if(xO(i)&&xO(t.value)){const e=t.value.slice();i.length=0,i.push(...e)}else if(SO(i)&&SO(t.value))a=i,Object.keys(a).forEach(e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!MO(a,e)&&delete a[e]}),vO(i,t.value);else{if(!n)throw new Error("Patchee is not an object we can patch");n[r]=t.value}else if("move"===t.op){const i=kO(e,t.from);xO(n)?n.splice(+r,0,i.splice(+o,1)[0]):(n[r]=i[o],delete i[o])}else"remove"===t.op&&(xO(n)?n.splice(+r,1):delete n[r]);var a})},bO.clone=function(e){return vO({},e)},bO.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},bO.updateObject=function(e,t){Object.keys(e).length?bO.apply(e,bO.generate(e,t)):vO(e,t)};const EO=Math.log(10);function DO(e){return 10**e}const TO={pow10:DO,log:(e,t)=>e<=0||t<=0?NaN:Math.log(e)/Math.log(t),log10:e=>e<=0?NaN:Math.log(e)/EO,eliminateFloatingError(e){const t=Math.round(e);return Math.abs(e-t)<1e-12?t:e},getNiceNumber(e){let t;if(0===e)return 0;const n=Math.floor(Math.log(Math.abs(e))/EO),r=e/DO(n);return t=r<=1?1:r<=2?2:r<=5?5:10,t*DO(n)*(e<0?-1:1)},getSmallNiceNumber(e){let t,n;if(0===e)return 0;t=Math.floor(Math.log(Math.abs(e))/EO);const r=e/DO(t);return r<1?(n=5,t--):n=r<2?1:r<5?2:5,n*DO(t)*(e<0?-1:1)},getMagnitude(e){if(0===e)return 0;return DO(Math.floor(Math.log(Math.abs(e))/EO))},getFraction(e){if(0===e)return 0;return e/DO(Math.floor(Math.log(Math.abs(e))/EO))},getGoodNumber(e){let t;if(0===e)return 0;const n=Math.floor(Math.log(Math.abs(e))/EO),r=e/DO(n);return t=Math.ceil(r),7!==t&&9!==t||t++,r>1&&r<=1.5?t=1.5:r>2&&r<=2.5&&(t=2.5),t*DO(n)*(e<0?-1:1)},getValueWithOffset:(e,t=0)=>e+Math.abs(e)*t,isNumber:e=>"number"==typeof e&&!Number.isNaN(e)};const OO={findMinPositiveDistance:function(e){if(e.length<2)return 0;e.sort((e,t)=>e-t);let t=1/0;for(let n=1;n<e.length;n++){const r=e[n]-e[n-1];r>0&&r<t&&(t=r)}return t===1/0?0:t}},NO=[[2,4,6],[2,4],[3]],AO=[,[,,[[1,2]],[[1,2,3],[1,3]],[[1,2,4],[1,4]],[[1,2,4],[1,5]],[[1,2,4,6],[2,4,6],[1,3,6],[1,6]],[[1,2,4,6],[2,4,6],[1,3,6],[1,7]],[[1,2,4,8],[2,4,8],[1,8]],[[1,2,4,8],[2,4,8],[1,3,9],[1,9]],[[1,2,4,6,10],[1,2,4,10],[1,3,10],[3,10],[1,10]]],[,,,[[2,3]],[[2,3,4],[2,4]],[[2,3,4],[2,4],[2,5]],[[2,4,6],[2,6]],[[2,4,6],[2,6],[2,7]],[[2,4,8],[2,8]],[[2,4,8],[2,8],[2,9]],[[2,4,6,10],[2,4,10],[5,10],[3,10]]],[,,,,[[3,4]],[[3,4,5],[3,5]],[[3,4,5,6],[3,6]],[[3,4,5,6],[3,5,7],[3,7]],[[3,4,5,6,8],[3,5,7],[4,8],[3,8]],[[3,4,5,6,8],[3,4,6,9],[3,4,6,8],[3,6,9],[4,8],[3,9]],[[4,6,10],[5,10],[3,10]]],[,,,,,[[4,5]],[[4,5,6],[4,6]],[[4,5,6,7],[4,5,6],[4,6]],[[4,5,6,7,8],[4,5,6,7],[4,6,8],[4,8]],[[4,5,6,7,8],[4,6,9],[4,6,8],[4,8]],[[4,6,10],[5,7,9],[5,10],[4,10]]],[,,,,,,[[5,6]],[[5,6,7],[5,7]],[[5,6,7,8],[5,6,7],[6,8]],[[5,6,7,8,9],[5,6,7,8],[5,7,9],[5,9]],[[6,8,10],[5,10]]],[,,,,,,,[[6,7]],[[6,7,8],[6,8]],[[6,7,8,9],[6,7,8],[6,9]],[[6,7,8,9,10],[6,8,10],[6,10]]],[,,,,,,,,[[7,8]],[[7,8,9],[7,9]],[[7,8,9,10],[8,10],[7,10],[7,9]]],[,,,,,,,,,[[8,9]],[[8,9,10],[8,10]]],[,,,,,,,,,,[[9,10]]]];function _O(e,t,n){const r=e?e.length:0;let i,o=void 0===t?Number.MAX_VALUE:e[0]/t;for(i=1;i<r;i++)o=Math.min(o,e[i]/e[i-1]);void 0!==n&&(o=Math.min(o,n/e[r-1])),e.splice(0,0,o)}function IO(e,t,n){let r;const i=e?e.length:0;for(r=0;r<i;r++)_O(e[r],t,n)}!function(){let e,t;for(IO(NO,1,10),e=0;e<AO.length;e++)if(AO[e])for(t=0;t<AO[e].length;t++)Array.isArray(AO[e][t])&&IO(AO[e][t])}();const LO={isInside(e,t,n,r){if(!r)return!0;const i=e.position-e.radius,o=e.position+e.radius;return i>=t&&o<=n},getCenterDistance:(e,t)=>Math.abs(e.center-t.center),getGap(e,t){const n=e.position<t.position?e:t,r=e.position<t.position?t:e;return r.position-r.radius-(n.position+n.radius)},findSegmentPositionMeetMax(e,t){const n=Math.max(0,e.max-t);return e.center-n},findSegmentPositionMeetMin(e,t){const n=Math.max(0,t-e.min);return e.center+n},findSegmentPositionMeetMinThenMax(e,t,n){const r=LO.findSegmentPositionMeetMin(e,t);return LO.findSegmentPositionMeetMax({center:r,max:r+e.radius},n)},findSegmentPositionMeetMaxThenMin(e,t,n){const r=LO.findSegmentPositionMeetMax(e,n);return LO.findSegmentPositionMeetMin({center:r,min:r-e.radius},t)},layoutPositionFromMin(e,t,n,r=0){const i=e.length-1;let o,a,s=t;for(let t=0;t<i;t++)o=e[t],a=e[t+1],o.position=LO.findSegmentPositionMeetMaxThenMin(o,s,(o.center+a.center-r)/2),s=o.position+o.radius+r/2;a.position=LO.findSegmentPositionMeetMaxThenMin(a,s,n)},adjustPositionFromMax(e,t,n,r=0){const i=e.length-1;let o,a,s;const l=Math.max(0,e[i].position+e[i].radius-n);if(0===l)return;let c,u=0;for(o=i;o>0&&(a=e[o],s=e[o-1],c=Math.max(0,LO.getGap(s,a)-r),c-=Math.max(0,u+c-l),u+=c,a.move=c,!(u>=l));o--);for(u<l&&(c=Math.max(0,s.position-s.radius-t),c-=Math.max(0,u+c-l),u+=c,s.move=c),u=0,o=0;o<=i;o++)a=e[o],u+=a.move||0,a.move=u,a.position-=u},layout(e,t,n,r=0){const i=e.length-1;if(!(i<0)){if(0===i){const r=e[0];return void(r.position=LO.findSegmentPositionMeetMaxThenMin(r,t,n))}LO.layoutPositionFromMin(e,t,n,r),LO.adjustPositionFromMax(e,t,n,r)}}},PO=(e,t,n,r=1)=>{const i=e.bandwidth();return n?"start"===t?i:"end"===t?i*(1-r):i*(2-r)/2:"start"===t?0:"end"===t?i*r:i*r/2},RO=e=>!1!==e.show&&0!==e.show&&"0"!==e.show,zO=e=>e.filter(RO),FO=(e,t)=>zO(WD.getValue(e,t,[])),jO=e=>RO(e)&&(!1!==e.showValue||!1!==e.showLabel),BO=e=>e.filter(jO),HO=(e,t)=>BO(WD.getValue(e,t,[])),VO=({refLineLayout:e,layoutService:t})=>t.meta.canBeContinuous?e.refLineExpr.value:e.refLineExpr.stringValue,$O=(e,t,n)=>{const{dimensionRefLineInfo:r}=t;if(r[e])return r[e][n]},WO=({label:e,dataPages:t})=>{const{qArea:n={}}=t||{},{qTop:r,qHeight:i}=n;return void 0!==r&&void 0!==i&&void 0!==e.valueInfo&&e.valueInfo.maxOrder<r},UO=({label:e,dataPages:t})=>{const{qArea:n={}}=t||{},{qTop:r,qHeight:i}=n;return void 0!==r&&void 0!==i&&void 0!==e.valueInfo&&e.valueInfo.minOrder>=r+i},YO=({value:e,qMin:t})=>"NaN"!==t&&e<t,KO=({value:e,qMax:t})=>"NaN"!==t&&e>t,GO={isRefLineVisible:RO,getVisibleRefLines:zO,getRefLines:FO,getMeasureRefLines:e=>FO(e,"refLine.refLines"),getDimensionRefLines:(e,t)=>t?[]:FO(e,"refLine.dimRefLines"),isRefLineLabelVisible:jO,getVisibleRefLineLabels:BO,getRefLineLabels:HO,getMeasureRefLineLabels:e=>HO(e,"refLine.refLines"),getDimensionRefLineLabels:(e,t)=>t?[]:HO(e,"refLine.dimRefLines"),getScaledPosition:({scale:e,size:t,value:n,valueInfo:r,align:i,invert:o=!1,layoutService:a,isContinuous:s})=>{if(!s){const s=e.pxScale(t);let l;if(a.meta.isGroupedByMeasure)return l=PO(s,i,o,a.meta.groupSize??a.meta.measureCount),s([n,0])+l;if(a.meta.isGroupedByDimension){if(!r)return NaN;const{innerValues:e,numInnerValues:t,minOrder:a}=r;let c;return l=PO(s,i,o,t),e&&e.length&&(c=(({pxScale:e,value:t,innerValues:n,invert:r,minOrder:i})=>{const o=(({pxScale:e,invert:t})=>e.bandwidth()*(t?-1:1))({pxScale:e,invert:r});for(let r=0;r<n.length;r++){const{id:a,order:s}=n[r],l=e([t,a]);if(void 0!==l)return l-o*(s-i)}})({pxScale:s,value:n,innerValues:e,invert:o,minOrder:a})),(void 0===c?s(n):c)+l}return l=PO(s,i,o),s(n)+l}return e(n)},getDimensionValuesInfo:({layout:e,canBeContinuous:t,discreteModel:n,layoutService:r})=>{const{isGroupedByDimension:i}=r.meta,o={},a=WD.getValue(e,"qHyperCube"),s="K"===a.qMode,l=n?n.query.getCurrentDataPage():WD.getValue(a,"S"===a.qMode?"qDataPages.0":"qStackedDataPages.0",[]);if(void 0===l?.qArea?.qTop)return o;const c=s?"qData.0.qSubNodes":"qMatrix",u=WD.getValue(l,c,[]),d=((e,t)=>e?t?"qValue":"qNum":"qText")(t,s),f=(e=>e.qArea.qTop)(l);return s?(()=>{for(let e=0;e<u.length;e++){const t=u[e],n=e+f,r=t[d];o[r]||(o[r]={id:t.qElemNo,qText:t.qText,minOrder:n,maxOrder:n,dataNode:u[e]})}})():i?(()=>{let e;for(let t=0;t<u.length;t++){const n=u[t][0],r=u[t][1],i=t+f,a=n[d];o[a]?(o[a].minOrder=Math.min(o[a].minOrder,i),o[a].maxOrder=Math.max(o[a].maxOrder,i),o[a].innerValues[o[a].innerValues.length]={id:r.qElemNumber,order:i}):o[a]={id:n.qElemNumber,qText:n.qText,minOrder:i,maxOrder:i,innerValues:[{id:r.qElemNumber,order:i}],dataNode:u[t]},0===t?0===i&&(o[a].isMinOrderOk=!0):a!==e&&(o[a].isMinOrderOk=!0,o[e].isMaxOrderOk=!0),e=a}})():(()=>{for(let e=0;e<u.length;e++){const t=u[e][0],n=e+f,r=t[d];o[r]||(o[r]={id:t.qElemNumber,qText:t.qText,minOrder:n,maxOrder:n,dataNode:u[e]})}})(),o},getInputValue:VO,extractInfoFromInputValue:$O,resolveValue:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const r=VO({refLineLayout:e,layoutService:n});return $O(r,t,"id")},isDiscreteMinOutOfBounds:WO,isDiscreteMaxOutOfBounds:UO,isContinuousMinOutOfBounds:YO,isContinuousMaxOutOfBounds:KO,isOutOfRange:({value:e,qMin:t,qMax:n})=>YO({value:e,qMin:t})||KO({value:e,qMax:n}),isOutOfDataPages:({label:e,dataPages:t})=>e.valueInfo.isMinOrderOk&&UO({label:e,dataPages:t})||e.valueInfo.isMaxOrderOk&&WO({label:e,dataPages:t}),getInvert:({orientation:e,rtl:t,isContinuous:n})=>"horizontal"===e?t:n},XO=({label:e,labelStyle:t})=>[e?.fontStyle||t?.fontStyle,e?.fontWeight||t?.fontWeight,e?.fontSize||t?.fontSize,e?.fontFamily||t?.fontFamily].filter(e=>!!e).join(" ");function JO(e){return e.showValue?`… ${e.valueString}`:"…"}function ZO(e,t,n=70){for(let r=0;r<e.length;r++){const i=e[r],o=XO({label:i,labelStyle:t});i.lines=gO.tokenize(i.title,o,JO(i),3,n),i.maxNumLines=i.lines.length}}function QO({title:e,font:t,ellipsis:n,maxNumLines:r=5,maxWidth:i=200}){const o=gO.tokenize(e,t,n,r,i),a=o.length;let s="";if(a){[s]=o;for(let e=1;e<a;e++)s=`${s}\n${o[e]}`}return s}function eN({oobs:e,font:t,ellipsis:n,maxNumLines:r=5,maxWidth:i=200}){const o=e.map(e=>QO({title:e.title,font:t,ellipsis:`${n} ${e.valueString}`,maxNumLines:r,maxWidth:i})),a=o.length;let s="";if(a){[s]=o;for(let e=1;e<a;e++)s=`${s}\n\n${o[e]}`}return s}function tN(e,t="value"){e.sort((e,n)=>e[t]-n[t])}const nN=3,rN=2;function iN({inputValue:e,inputValueLabel:t,localeInfo:n}){if(void 0===e||void 0===t||e.toString()===t)return!1;if(!n)return!0;const r=`+-${n.qDecimalSep||""}${n.qThousandSep||""}`.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&");return t.replace(new RegExp(`[0-9e${r}]`,"g"),"").length>0||function(e){if(e.indexOf("e")>-1)return!1;const t=e.indexOf("-");return-1!==t&&(e.lastIndexOf("-")!==t||0!==t)}(t)}const oN=({label:e,dataPages:t,qMin:n,qMax:r})=>{if(void 0!==n&&void 0!==r){const{inputValue:t}=e;if(GO.isContinuousMaxOutOfBounds({value:t,qMax:r}))return 1;if(GO.isContinuousMinOutOfBounds({value:t,qMin:n}))return-1}return GO.isDiscreteMaxOutOfBounds({label:e,dataPages:t})?1:GO.isDiscreteMinOutOfBounds({label:e,dataPages:t})?-1:0},aN={hasEngineFormat:iN,calculateLabelPositions({labels:e,scale:t,size:n,layoutService:r,orientation:i,rtl:o,isContinuous:a,isDimension:s}){const l=GO.getInvert({orientation:i,rtl:o,isContinuous:a}),c="S"===r.getHyperCubeValue("qMode")?"qDataPages.0":"qStackedDataPages.0",u=r.getHyperCubeValue(c),{canBeContinuous:d}=r.meta;let f,h;if(s&&d){const e=r.getLayoutValue("qHyperCube.qDimensionInfo.0");f=e.qMin,h=e.qMax}for(let i=0;i<e.length;i++){const o=e[i],{value:s,align:c,valueInfo:d}=o,p=oN({label:o,dataPages:u,qMin:f,qMax:h});o.scaledValue=1===p?l?-.1:1.1:-1===p?l?1.1:-.1:GO.getScaledPosition({scale:t,size:n,value:s,valueInfo:d,align:c,invert:l,layoutService:r,isContinuous:a}),o.center=o.scaledValue*n}},getTitle:e=>!1!==e.showValue?!1!==e.showLabel?`${e.text} ${e.valueString}`:e.valueString:!1!==e.showLabel?e.text:"",addLabelTitles({labels:e,formatter:t,isContinuous:n,canBeContinuous:r,localeInfo:i}){let o;if(n)for(let n=0;n<e.length;n++){const r=e[n],{value:a,inputValue:s,inputValueLabel:l}=r;o=iN({inputValue:s,inputValueLabel:l,localeInfo:i})?l:t?t(a):a,r.valueString=`${cT.lrm}(${o})${cT.lrm}`,r.title=aN.getTitle(r)}else if(r)for(let t=0;t<e.length;t++){const n=e[t],{valueText:r,inputValue:a,inputValueLabel:s}=n;o=iN({inputValue:a,inputValueLabel:s,localeInfo:i})?s:r,n.valueString=`${cT.lrm}(${o})${cT.lrm}`,n.title=aN.getTitle(n)}else for(let t=0;t<e.length;t++){const n=e[t];o=n.valueText,n.valueString=`${cT.lrm}(${o})${cT.lrm}`,n.title=aN.getTitle(n)}},measureLabelsWidth(e,t){for(let n=0;n<e.length;n++){const r=e[n];r.totalWidth=t(r.title,r).width}},measureLabelMaxLineWidth(e,t){const n=Math.max(...e.lines.map(n=>t(n,e).width));return n},getMaxTextWidth(e){const t=e.map(e=>e.totalWidth);return Math.max(...t)},addLabelsNeighborInfo(e,t,n,r=0){const i=e.length-1;if(i<0)return;let o,a;if([o]=e,o.cMin=t,0!==i){for(let t=0;t<i;t++)o=e[t],a=e[t+1],o.cMax=(o.center+a.center-r)/2,a.cMin=o.cMax+r;a.cMax=n}else o.cMax=n},getTotalNumLines(e){let t=0;return e.forEach(e=>{t+=e.maxNumLines}),t},reduceLabelsHavingMaxNumLines(e,t,n){const r=t-1,i=e.filter(e=>e.maxNumLines===t),o=Math.min(n,i.length);for(let e=i.length-1;e>=i.length-o;e--)i[e].maxNumLines=r},reduceTotalMaxNumLines(e,t,n){const r=Math.floor(n/t);let i=3;do{const t=aN.getTotalNumLines(e)-r;if(t<=0)return;aN.reduceLabelsHavingMaxNumLines(e,i,t),i--}while(i>1)},reduceMaxNumLines(e,t,n=0){for(let r=0;r<e.length;r++){const i=e[r];i.maxNumLines=Math.max(1,Math.min(i.maxNumLines,Math.floor((Math.max(0,i.cMax-i.cMin)+n)/t)))}},addLabelsSize(e,t,n=15,r){for(let i=0;i<e.length;i++){const o=e[i];o.width=Math.min(t,aN.measureLabelMaxLineWidth(o,r)),o.height=o.lines.length*n}},addLabelSegments(e,t){for(let n=0;n<e.length;n++){const r=e[n],{center:i}=r,o=r[t],a=o/2;r.segment={center:i,range:o,min:i-a,max:i+a,radius:a}}},addLabelsInfo({labels:e,scale:t,majorSize:n,lowerLimit:r,upperLimit:i,gap:o,labelStyle:a,maxLabelWidth:s,lineHeight:l,majorDimension:c,orientation:u,measureText:d,rtl:f,layoutService:h,isContinuous:p,isDimension:m}){const g=e.map(e=>e),y=n;aN.calculateLabelPositions({labels:e,scale:t,size:y,layoutService:h,orientation:u,rtl:f,isContinuous:p,isDimension:m}),tN(e,"center"),aN.addLabelsNeighborInfo(e,r,i,o),ZO(e,a,s),aN.reduceTotalMaxNumLines(g,l,i-(g.length-1)*o),"vertical"===u&&(aN.reduceMaxNumLines(e,l,.05*o),function(e,t,n=70){for(let r=0;r<e.length;r++){const i=e[r],o=XO({label:i,labelStyle:t});i.lines.length>i.maxNumLines&&(i.lines=gO.tokenize(i.title,o,JO(i),i.maxNumLines,n))}}(e,a,s)),aN.addLabelsSize(e,s,l,d),aN.addLabelSegments(e,c)},createLabels({labels:e,style:t,maxLabelWidth:n,areaProps:r,area:i,lineHeight:o=15,font:a}){const{majorAxis:s,minorAxis:l,dock:c}=r,{minorCenter:u}=i,{fontSize:d,fontFamily:f,fontStyle:h,fontWeight:p,textDecoration:m,background:g}=t;let y=[];return e.forEach(e=>{const{lines:t}=e,r=t.length,i=t.map((t,i)=>{const g={type:"text",text:t,title:QO({title:e.title,font:a,ellipsis:JO(e)}),dx:0,dy:0,maxWidth:n,width:n,fontSize:e.fontSize||d,fontFamily:e.fontFamily||f,fontStyle:e.fontStyle||h,fontWeight:e.fontWeight||p,textDecoration:e.textDecoration||m,fill:e.fill,baseline:"central",anchor:"middle",value:e.value,dock:c};return g[l]=u,g[s]=e.segment.position,g.y+=(i-(r-1)/2)*o,g});e.background&&y.push(function({minorCenter:e,majorAxis:t,minorAxis:n,dock:r,label:i,lineHeight:o,background:a}){const{lines:s}=i,{borderRadius:l=nN,padding:c={}}=a,{top:u=rN,bottom:d=rN,left:f=rN,right:h=rN}=c,p=s.length,m={type:"rect",rx:l,ry:l,fill:i.background.fill,width:i.width+(f+h),height:i.height+(u+d),value:i.value,dock:r};return m[n]=e,m[t]=i.segment.position,m.x-=i.width/2+f,m.y-=p*o/2+u,m}({minorCenter:u,majorAxis:s,minorAxis:l,dock:c,label:e,lineHeight:o,background:g})),y=y.concat(i)}),y}};function sN(e,t,n){let r;const i=typeof t;if("string"===i||"object"===i)r=e.formatter(t);else if(void 0!==n&&n.data){const e=n.data()&&n.data().fields;r=e&&e[0]?e[0].formatter():null}return r}function lN(e,t,n){return"top"===e||"bottom"===e?function(e,t){const{lineHeight:n,top:r,bottom:i,maxLabelWidth:o}=t;let a=1;return aN.getMaxTextWidth(e)>o&&(ZO(e,t,o),a=Math.max(...e.map(e=>e.lines.length))),a*n+r+i}(t,n):function(e,t){const{left:n,right:r,maxLabelWidth:i}=t;return Math.min(i,aN.getMaxTextWidth(e))+n+r}(t,n)}function cN(e,t){return t?e.domain():[0,1]}function uN(e,t,n,r="value"){let i=e.filter(e=>e[r]>=t);i=i.filter(e=>e[r]<=n);const o=e.filter(e=>e[r]<t),a=e.filter(e=>e[r]>n);return{filteredLabels:i,minOobs:o,maxOobs:a,numMinOobs:o.length,numMaxOobs:a.length}}function dN(e){let t,n=0;for(let r=1;r<10;r++)t=e(r),n=Math.max(n,Math.sqrt(t.width*t.width+t.height*t.height));return t=e("9+"),[n,Math.max(n,Math.sqrt(t.width*t.width+t.height*t.height))]}function fN(e,t){return e>9?t[1]:t[0]}function hN({alignment:e,dockValue:t,oobs:n,style:r,rect:i,symbol:o,position:a,areaProps:s,radius:l,font:c}){const u=n?n.length:0;if(u<1)return[];const{flipXY:d,majorAxis:f,minorAxis:h,minorDimension:p,dock:m}=s,g=i[p],y=yO.createOob({oob:yO.getDefaultSettings({size:r.size,fill:r.fill,alignment:e}),dockValue:t,boxCenter:.5,rendWidth:i.width,rendHeight:i.height,flipXY:d,symbol:o});y.dock=m;const v=`c${f}`,b=`c${h}`,x={type:"circle",r:l,stroke:"transparent",fill:r.text.background.fill,strokeWidth:0,dock:m};x[b]=g/2,x[v]=a;const S={type:"text",text:u>9?"9+":u,title:eN({oobs:n,font:c,ellipsis:"…"}),dx:0,dy:0,maxWidth:g,width:g,fontSize:r.text.fontSize,fontFamily:r.text.fontFamily,fill:r.text.fill,baseline:"central",anchor:"middle",dock:m};return S[h]=g/2,S[f]=a,[y,x,S]}const pN=e=>{const t=XO({labelStyle:e}),n=gO.getFontHeight(t)*(e.lineHeightMultiplicator||1),r=e.gap||12,i=e.maxWidth||75,o=e.padding.top||0,a=e.padding.bottom||0,s=e.padding.left||0,l=e.padding.right||0;return{...e,font:t,lineHeight:n,gap:r,maxLabelWidth:i,top:o,bottom:a,left:s,right:l}},mN=e=>e.map(e=>({...e,value:"function"==typeof e.value?e.value():e.value,valueText:"function"==typeof e.valueText?e.valueText():e.valueText,valueInfo:"function"==typeof e.valueInfo?e.valueInfo():e.valueInfo}));var gN={require:["renderer","chart","symbol"],defaultSettings:{layout:{displayOrder:0,prioOrder:0}},preferredSize(){const{scale:e}=this,{style:t,layoutService:n,isContinuous:r,localeInfo:i}=this.settings,o=!!r||n.meta.canBeContinuous,a=mN(this.settings.labels),s=sN(this.chart,this.settings.formatter,e);aN.addLabelTitles({labels:a,formatter:s,isContinuous:r,canBeContinuous:o,localeInfo:i});const{numMaxOobs:l,numMinOobs:c,filteredLabels:u}=(({labels:e,scale:t,isContinuous:n,canBeContinuous:r,layoutService:i})=>{if(n){const[r,i]=cN(t,n);return uN(e,r,i)}if(r){const t=i.getLayoutValue("qHyperCube.qDimensionInfo.0"),{qMin:n,qMax:r}=t;if("NaN"!==n&&"NaN"!==r)return uN(e,n,r,"inputValue")}return{filteredLabels:e}})({labels:a,scale:e,isContinuous:r,canBeContinuous:o,layoutService:n});let d;if(this.measureText=(e,n)=>{const{fontSize:r,fontFamily:i,fontWeight:o}=n||{};return this.renderer.measureText({text:e,fontWeight:o||t.label.fontWeight,fontSize:r||t.label.fontSize,fontFamily:i||t.label.fontFamily})},u&&u.length){const e=pN(t.label),{dock:n}=this.settings.layout;return aN.measureLabelsWidth(u,this.measureText),d=lN(n,u,e),d}const f=dN(this.measureText),h=l?fN(l,f):0,p=c?fN(c,f):0;return d=Math.max(h,p),d},render(){const{scale:e}=this;if(!e.domain().length)return;const{symbol:t}=this,{style:n,layoutService:r,theme:i,isContinuous:o,isDimension:a,localeInfo:s}=this.settings,l=!!o||r.meta.canBeContinuous,c=mN(this.settings.labels),{dock:u,rtl:d}=this.settings.layout,{padding:f}=n.label,h=function(e){return"left"===e||"right"===e?(e=>({dock:e,orientation:"vertical",majorAxis:"y",minorAxis:"x",majorDimension:"height",minorDimension:"width",flipXY:!1}))(e):(e=>({dock:e,orientation:"horizontal",majorAxis:"x",minorAxis:"y",majorDimension:"width",minorDimension:"height",flipXY:!0}))(e)}(u),p=function(e,t,n){const r=e[t.minorDimension];return{minorSize:r,majorSize:e[t.majorDimension],minorCenter:"vertical"===t.orientation?(r-n.right-n.left)/2+n.left:(r-n.top-n.bottom)/2+n.top}}(this.rect,h,f),{orientation:m,majorDimension:g}=h,{majorSize:y}=p,v=pN(n.label),{font:b,lineHeight:x,gap:S,maxLabelWidth:w}=v,M=sN(this.chart,this.settings.formatter,e),k=y;aN.addLabelTitles({labels:c,formatter:M,isContinuous:o,canBeContinuous:l,localeInfo:s}),aN.calculateLabelPositions({labels:c,scale:e,size:k,layoutService:r,orientation:m,rtl:d,isContinuous:o,isDimension:a});const[C,q]=cN(e,o),{filteredLabels:E,lowerOobs:D,upperOobs:T,lowerCircleSize:O,upperCircleSize:N,lowerOobSpace:A,upperOobSpace:_}=function({labels:e,minValue:t,maxValue:n,orientation:r,rtl:i,isContinuous:o,style:a,padding:s,measureText:l,prop:c="value"}){const{maxOobs:u,minOobs:d,filteredLabels:f}=uN(e,t,n,c),h="scaledValue"!==c&&GO.getInvert({orientation:r,rtl:i,isContinuous:o}),p=function(e,t,n){return n?t:e}(d,u,h),m=function(e,t,n){return n?e:t}(d,u,h),g=p.length,y=m.length,v=dN(l),b=fN(g,v),x=fN(y,v),S=function(e,t,n,r,i){return("vertical"===r?i.top:i.left)+(e>0?t+n:0)}(g,a.oob.size,b,r,s),w=function(e,t,n,r,i){return("vertical"===r?i.bottom:i.right)+(e>0?t+n:0)}(y,a.oob.size,x,r,s);return{filteredLabels:f,lowerOobs:p,upperOobs:m,lowerCircleSize:b,upperCircleSize:x,lowerOobSpace:S,upperOobSpace:w}}({labels:c,minValue:C,maxValue:q,orientation:m,rtl:d,isContinuous:o,style:n,padding:f,measureText:this.measureText,prop:o?"value":"scaledValue"}),I=A,L=y-_;tN(D),tN(T);const P=hN({alignment:0,dockValue:0,oobs:D,style:n.oob,rect:this.rect,symbol:t,position:n.oob.size+O/2,areaProps:h,radius:O/2,font:b}),R=hN({alignment:1,dockValue:1,oobs:T,style:n.oob,rect:this.rect,symbol:t,position:y-(n.oob.size+N/2),areaProps:h,radius:N/2,font:b});aN.addLabelsInfo({labels:E,scale:e,majorSize:y,lowerLimit:I,upperLimit:L,labelStyle:v,lineHeight:x,gap:S,maxLabelWidth:w,majorDimension:g,orientation:m,measureText:this.measureText,rtl:d,layoutService:r,isContinuous:o,isDimension:a}),LO.layout(E.map(e=>e.segment),I,L,n.label.gap);const z=E.filter(e=>LO.isInside(e.segment,I,L,o));return aN.createLabels({labels:z,style:n.label,maxLabelWidth:w,areaProps:h,area:p,lineHeight:x,font:b,theme:i}).concat([...P,...R])}};var yN={dataRelatedPropertiesPaths:["qHyperCube.qGrandTotalRow","qHyperCube.qHasOtherValues","qHyperCube.qSize","qHyperCube.qDimensionInfo[].qAttrDimInfo","qHyperCube.qDimensionInfo[].qAttrExprInfo","qHyperCube.qDimensionInfo[].qCardinalities","qHyperCube.qDimensionInfo[].qMax","qHyperCube.qDimensionInfo[].qMin","qHyperCube.qDimensionInfo[].qStateCounts","qHyperCube.qMeasureInfo[].qApprMaxGlyphCount","qHyperCube.qMeasureInfo[].qAttrExprInfo","qHyperCube.qMeasureInfo[].qMax","qHyperCube.qMeasureInfo[].qMin","qHyperCube.qMeasureInfo[].qTrendLines","qHyperCube.qTreeNodesOnDim","qSelectionInfo","plugins[].validMeasureValue","plugins[].labelBackgroundColor","plugins[].labelColor","plugins[].hasBackground","plugins[].maxLabelWidth","plugins[].points[].validMeasureValue","plugins[].points[].labelBackgroundColor","plugins[].points[].labelColor","plugins[].points[].hasBackground","plugins[].points[].maxLabelWidth"]};function vN(e){const{qHyperCube:t,...n}=e,{qAxisData:r,qDataPages:i,qStackedDataPages:o,qTreeDataPages:a,...s}=t,l=bg(!0,{},{...n,qHyperCube:{...s}}),{dataRelatedPropertiesPaths:c}=yN;function u(e,t){const n=t.indexOf("[]");if(-1===n)return void(void 0!==Cx(e,t)&&Ex(e,t,void 0));const r=t.substring(0,n),i=t.substring(n+2),o=i.startsWith(".")?i.substring(1):i;Cx(e,r,[]).forEach(e=>{o&&u(e,o)})}return c.forEach(e=>{u(l,e)}),l}var bN={axes:{trackBy:function({isTime:e,isContinuous:t,isMeasure:n,isMajor:r}){return i=>{if(e||t||n){if("line"===i.type)return i.tickValue??"axis";if("text"===i.type)return`${i.tickValue} ${i.text}`;if("container"===i.type){const e=i.children.filter(e=>"text"===e.type).map(e=>e.text);return`${i.data.value} ${e.join("")}`}return Math.random()}if(r){if("line"===i.type&&void 0===i.tickValue)return"axis";const e=i.transform&&i.transform.match(/rotate/gi)?"rotated":"horizontal";return`${i.data.group?`${i.data.group.value} `:""}${i.data.value} ${i.text} ${e}`}return Math.random()}},compensateForLayoutChanges:function({isMeasure:e,isTime:t,isContinuous:n,isHorizontal:r,dock:i}){return({currentNodes:o,currentRect:a,previousRect:s})=>{const l=a.x-s.x,c=a.y-s.y,u=a.width-s.width,d=a.height-s.height;e?("left"===i&&o.forEach(e=>{"line"===e.type?(e.x1+=u,e.x2+=u):"text"===e.type&&(e.x+=u)}),"left"!==i&&"right"!==i||o.forEach(e=>{"line"===e.type&&(e.x1===e.x2?(e.y1=a.y,e.y2=e.y1+a.height):(Math.round(e.y1)<a.y||e.y1>a.y+a.height)&&(e.strokeWidth=0)),"text"===e.type&&(e.y<a.y||e.y>a.y+a.height)&&(e.fontSize="1px","#"===e.fill?.[0]&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`))}),"top"!==i&&"bottom"!==i||o.forEach(e=>{"line"===e.type&&(e.y1===e.y2?(e.x1=a.x,e.x2=e.x1+a.width):(Math.round(e.x1)<a.x||e.x1>a.x+a.width)&&(e.strokeWidth=0)),"text"===e.type&&(e.x<a.x||e.x>a.x+a.width)&&(e.fontSize="1px","#"===e.fill?.[0]&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`))})):t?o.forEach(e=>{"line"===e.type?e.y1===e.y2?e.x2+=u:e.x1===e.x2&&(e.x1-=l,e.x2-=l):"text"===e.type&&(e.x-=l)}):n||r?o.forEach(e=>{"line"===e.type&&e.y1===e.y2&&(e.x1+=l,e.x2+=l+u)}):o.forEach(e=>{"line"===e.type&&e.x1===e.x2&&(e.y1+=c,e.y2+=c+d)})}}},bars:{trackBy:function(e){return e.data.typeIndex?`${e.data.value} ${e.data.typeIndex.value}`:e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:`${e.data.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach(e=>{e.children&&e.children.length>0&&e.children.forEach(e=>{void 0!==e.x&&void 0!==e.y?(e.x-=r,e.y-=i):e.transform=`translate(${-r}, ${-i})`})})}},barOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x;0===t.y-n.y&&0===r||e.forEach(e=>{e.children&&e.children.length>0&&e.children.forEach(e=>{e.opacity=0})})}},labels:{trackBy:function(e){if("rect"===e.type)return"-3"===e.data?Math.random():`${e.type} ${e.data} ${e.rotation}`;const t=e.transform&&e.transform.match(/rotate/gi)?"rotated":"horizontal";return`${e.type} ${e.data} ${e.text} ${t}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach(e=>{e.transform&&e.transform.match(/rotate\(-90/gi)?(e.x+=i,e.y-=r):(e.x-=r,e.y-=i)})},linkData:function(e){return e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:`${e.data.value}`}},lines:{trackBy:function(e){return"line"===e.type?e.value??Math.random():"path"===e.type?`${e.generatorType} ${e.layerObj.id} ${e.data.source.key}`:Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;e.forEach(e=>{if(void 0!==e.x1&&void 0!==e.y1)e.y1===e.y2?(e.x2=e.x1+t.width,e.y1-=i,e.y2-=i):e.x1===e.x2&&(e.y2=e.y1+t.height,e.x1-=r,e.x2-=r);else{const t="x"===e.major.p?r/e.major.size:i/e.major.size,n="y"===e.minor.p?i/e.minor.size:r/e.minor.size;e.points.forEach(e=>{e.modified||(e.major-=t,e.minor-=n,e.minor0-=n,e.modified=!0)})}})}},lineOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x;0===t.y-n.y&&0===r||e.forEach(e=>{e.opacity=0})}},markers:{trackBy:function(e){return e.data.line?`${e.data.line.value} ${e.data.major.value}`:`${e.data.major.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach(e=>{switch(e.type){case"circle":e.cx-=r,e.cy-=i;break;case"rect":e.x-=r,e.y-=i;break;case"path":e.transform=`translate(${-r}, ${-i})`}})}},points:{trackBy:function(e){return e.data.line?`${e.data.line.value} ${e.data.major.value}`:`${e.data.major.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach(e=>{"image"===e.type?(e.x-=r,e.y-=i):(e.cx-=r,e.cy-=i)})}},refLineLabels:{trackBy:function(e){if(void 0!==e.value){if("rect"===e.type)return`${e.value}`;if("text"===e.type)return`${e.value} ${e.text}`}return Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y,o=t.width-n.width,a=t.height-n.height;let s=-r,l=-i;e.forEach(e=>{switch(e.dock){case"right":r>0&&(s=t.width);break;case"left":o<0&&(s=-n.width);break;case"top":a<0&&(l=-n.height);break;case"bottom":i>0&&(l=t.height)}switch(e.type){case"text":case"rect":e.x+=s,e.y+=l;break;case"circle":e.cx+=s,e.cy+=l;break;case"path":e.transform=`translate(${s}, ${l})`}})}},shadowBars:{trackBy:function(){return Math.random()}},cacheProperties:function({viewCache:e,layout:t}){const n=vN(t);e.set("dataIndependentProperties",JSON.stringify(n))},propertiesHaveChanged:function({viewCache:e,layout:t}){const n=vN(t);return e.get("dataIndependentProperties")!==JSON.stringify(n)},nonUpdatingNode:{trackBy:function(){return Math.random()}}};const{getInputValue:xN,extractInfoFromInputValue:SN,resolveValue:wN}=GO;var MN={resolveValue:wN,resolveInnerValues:({refLineLayout:e,refLineModel:t,layoutService:n})=>{if(n.meta.isGroupedByDimension){const r=xN({refLineLayout:e,layoutService:n});return SN(r,t,"innerValues")}},resolveNumInnerValues:({refLineLayout:e,refLineModel:t,layoutService:n})=>{if(n.meta.mode.K)return 0;const r=xN({refLineLayout:e,layoutService:n});return SN(r,t,"numInnerValues")||0},resolveValueText:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const{dimensionValuesInfo:r}=t,{canBeContinuous:i}=n.meta,o=xN({refLineLayout:e,layoutService:n});return r[o]&&i?r[o].qText:o},resolveValueInfo:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const r=xN({refLineLayout:e,layoutService:n}),{dimensionRefLineInfo:i}=t;return i[r]}};function kN({isDimension:e,refLineModel:t={},layoutService:n,colorModel:r,dockService:i,animationsEnabled:o,chart:a,scale:s,axis:l,rtl:c,key:u,mainComponentKey:d,path:f,minimumLayoutMode:h}){const p=e?t.dimensionRefLines:f?t.query.getRefLines(f):t.measureRefLines;if(!p.length)return!1;const m={key:u,type:"ref-line",layout:{minimumLayoutMode:h},lines:{y:[],x:[]},style:{oob:{show:!1}},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}),animations:{enabled:o,trackBy:bN.lines.trackBy,compensateForLayoutChanges:bN.lines.compensateForLayoutChanges}},g=!(!e||"horizontal"!==i.meta.major.orientation||!c),y=!e||n.meta.isContinuous;return p.forEach(o=>{m.lines[l].push((({isDimension:e,refLineLayout:t,refLineModel:n,layoutService:r,colorModel:i,dockService:o,chart:a,scale:s,axis:l,invert:c,component:u,isContinuous:d})=>{const f={dir:l,line:{strokeWidth:t?.style?.lineThickness||2,strokeDasharray:t?.style?.lineType,stroke:i.resolveUIColor(t.paletteColor||{index:t.color})}};return!e||r.meta.isContinuous?(f.scale=s,f.value=t.refLineExpr.value):(f.valueInfo=MN.resolveValueInfo({refLineLayout:t,refLineModel:n,layoutService:r}),f.value=()=>{const e=GO.getScaledPosition({scale:a.scale(s),value:MN.resolveValue({refLineLayout:t,refLineModel:n,layoutService:r}),valueInfo:f.valueInfo,size:a.component(u)?.rect["horizontal"===o.meta.major.orientation?"width":"height"],align:t.align,invert:c,layoutService:r,isContinuous:d});return Number.isNaN(e)?void 0:e}),f})({isDimension:e,refLineLayout:o,refLineModel:t,layoutService:n,colorModel:r,dockService:i,chart:a,scale:s,axis:l,invert:g,component:d,isContinuous:y}))}),m}function CN({isDimension:e,refLineModel:t={},layoutService:n,colorModel:r,animationsEnabled:i,dock:o,scale:a,style:s,formatter:l,theme:c,localeInfo:u,rtl:d,key:f,path:h}){const p=e?t.dimensionRefLineLabels:h?t.query.getRefLineLabels(h):t.measureRefLineLabels;if(!p.length)return[];const m=[],g=!e||n.meta.isContinuous,y=p.map(e=>(({refLineLayout:e,refLineModel:t,layoutService:n,colorModel:r,scale:i,theme:o,isContinuous:a})=>{const s=r.resolveUIColor(e.paletteColor||{index:e.color}),{align:l,style:c}=e,{fontSize:u,fontFamily:d,fontStyle:f,fontWeight:h,textDecoration:p}=c||{},m={align:l,text:e.label,fill:e.coloredBackground?o.getContrastingColorTo(s):s,fontSize:u,fontFamily:d,fontStyle:f,fontWeight:h,textDecoration:p,showValue:!1!==e.showValue,showLabel:!1!==e.showLabel,inputValue:e.refLineExpr.value,inputValueLabel:e.refLineExpr.label};return e.coloredBackground&&(m.background={fill:s}),a?(m.scale=i,m.value=e.refLineExpr.value):(m.value=()=>MN.resolveValue({refLineLayout:e,refLineModel:t,layoutService:n}),m.valueText=()=>MN.resolveValueText({refLineLayout:e,refLineModel:t,layoutService:n}),m.valueInfo=()=>MN.resolveValueInfo({refLineLayout:e,refLineModel:t,layoutService:n})),m})({refLineLayout:e,refLineModel:t,layoutService:n,colorModel:r,scale:a,theme:c,isContinuous:g}));return m.push((({isDimension:e,layoutService:t,animationsEnabled:n,style:r,labels:i,scale:o,formatter:a,dock:s,key:l,rtl:c,theme:u,isContinuous:d,localeInfo:f})=>({key:l,type:"reference-line-labels",renderer:"svg",labels:i,formatter:a,scale:o,layoutService:t,layout:{dock:s,rtl:c},theme:u,isContinuous:d,isDimension:e,localeInfo:f,style:{label:{fontFamily:r.referenceLine.label.name.fontFamily,fontSize:r.referenceLine.label.name.fontSize,fontStyle:r.referenceLine.label.name.fontStyle,fontWeight:r.referenceLine.label.name.fontWeight,textDecoration:r.referenceLine.label.name.textDecoration,padding:{top:2,bottom:2,left:c?2:4,right:c?4:2},background:{padding:{top:1,bottom:1,left:2,right:2}},maxWidth:100,gap:"left"===s||"right"===s?10:16},oob:{size:8,fill:r.referenceLine.outOfBounds.backgroundColor,text:{fontFamily:r.referenceLine.outOfBounds.fontFamily,fontSize:r.referenceLine.outOfBounds.fontSize,fill:r.referenceLine.outOfBounds.color,background:{fill:r.referenceLine.outOfBounds.backgroundColor}}}},animations:{enabled:n,trackBy:bN.refLineLabels.trackBy,compensateForLayoutChanges:bN.refLineLabels.compensateForLayoutChanges}}))({isDimension:e,rtl:d,style:s,dock:o,key:f,labels:y,scale:a,formatter:l,layoutService:n,animationsEnabled:i,theme:c,isContinuous:g,localeInfo:u})),m}function qN({layoutService:e,discreteModel:t}){const{isContinuous:n,canBeContinuous:r,isGroupedByDimension:i}=e.meta,o=e.getLayout(),a="K"===o.qHyperCube.qMode,s=GD.dimensionless(o),l=GO.getMeasureRefLines(o),c=GO.getDimensionRefLines(o,s),u=GO.getMeasureRefLineLabels(o),d=GO.getDimensionRefLineLabels(o,s);let f={},h={};const p=()=>!(!c||!c.length)&&!c.every(t=>{const o=GO.getInputValue({refLineLayout:t,layoutService:e});return(t=>{if(r){const n=e.getLayoutValue("qHyperCube.qDimensionInfo.0"),{qMin:r,qMax:i}=n;return GO.isOutOfRange({value:t,qMin:r,qMax:i})}return!1})(o)||(t=>{if(!h[t])return!1;if(!n&&i){const n={valueInfo:h[t]},r="S"===e.getHyperCubeValue("qMode")?"qDataPages.0":"qStackedDataPages.0",i=e.getHyperCubeValue(r);return GO.isOutOfDataPages({label:n,dataPages:i})}return!0})(o)}),m={isKMode:a,canBeContinuous:r,measureRefLines:l,dimensionRefLines:c,measureRefLineLabels:u,dimensionRefLineLabels:d,dimensionRefLineInfo:h,dimensionValuesInfo:f,query:{getRefLines:e=>GO.getRefLines(o,e),getRefLineLabels:e=>GO.getRefLineLabels(o,e)},update:()=>{h=m.dimensionRefLineInfo,p()&&(f=GO.getDimensionValuesInfo({layout:o,canBeContinuous:r,discreteModel:t,layoutService:e}),m.dimensionValuesInfo=f,c.forEach(t=>{const n=GO.getInputValue({refLineLayout:t,layoutService:e});f[n]&&(h[n]?(h[n].innerValues=f[n].innerValues,h[n].minOrder=Math.min(h[n].minOrder,f[n].minOrder),h[n].maxOrder=Math.max(h[n].maxOrder,f[n].maxOrder),h[n].isMinOrderOk=h[n].isMinOrderOk||f[n].isMinOrderOk,h[n].isMaxOrderOk=h[n].isMaxOrderOk||f[n].isMaxOrderOk):h[n]={id:f[n].id,qText:f[n].qText,innerValues:f[n].innerValues,minOrder:f[n].minOrder,maxOrder:f[n].maxOrder,isMinOrderOk:f[n].isMinOrderOk,isMaxOrderOk:f[n].isMaxOrderOk},h[n].numInnerValues=(h[n].maxOrder||0)-(h[n].minOrder||0)+1)}))}};return m.update(),m}const EN={combineBounds(e){let t=Number.MAX_VALUE,n=-Number.MAX_VALUE,r=Number.MAX_VALUE,i=-Number.MAX_VALUE;return e.forEach(e=>{e&&(t=Math.min(t,e.x,e.x+e.width),n=Math.max(n,e.x,e.x+e.width),r=Math.min(r,e.y,e.y+e.height),i=Math.max(i,e.y,e.y+e.height))}),{x:t,y:r,width:n-t,height:i-r}}};function DN(e,t=!1){const n=t?"IM_5791_SVG_LABEL_RENDERING":"IM_4962_SVG_CHART_LABELS";if(e?.isEnabled(n))return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?void 0:"svg"}const TN={ref:null,refFn:e=>{const t=e.qHyperCubeDef.qMeasures?.findIndex(e=>"colorByExpression"===e.qAttributeExpressions?.[0]?.id);return`qHyperCubeDef.qMeasures.${-1===t?0:t}.qAttributeExpressions.0.qExpression`},change(e){const t=e.qHyperCubeDef?.qMeasures?.findIndex(e=>"colorByExpression"===e.qAttributeExpressions?.[0]?.id),n=WD.getValue(e,`qHyperCubeDef.qMeasures.${-1===t?0:t}.qAttributeExpressions.0`),r=WD.getValue(e,"color");n&&(n.id="colorByExpression",r&&(r.colorExpression=n.qExpression))}};function ON({color:e,colorModel:t}){if(!e)return;const n=t.resolveUIColor(e);if("none"===n)return"transparent";const r=ny(n);return r.setAlpha(e?.alpha>=0?e.alpha:1),r.isInvalid()?void 0:r.getRGBA()}function NN({point:e,dimensionValueInfo:t,layoutService:n}){const{dimensionValue:r}=e,i=""===e.measureValue?void 0:+e.measureValue;if(TO.isNumber(i))return i;const{dimensionCount:o,measureCount:a}=n.meta;if(2===o)return 0;const s=e.measureIndex?+e.measureIndex:0;return TO.isNumber(s)&&!(s>=a||0===o)&&1===o?t[r]?.dataNode[s+1]?.qNum:void 0}const AN={index:-1,color:"#595959"};function _N({chart:e,chartModel:t,discreteModel:n,colorService:r,themeService:i,layoutService:o,dockService:a,rtl:s,majorScale:l,minorScale:c,mainComponentKey:u,data:d,key:f}){if(!Array.isArray(d)||0===d.length)return!1;const h={resolveUIColor:r.getMain().getPaletteColor},p=i.getTheme(),m="horizontal"===a.meta.major.orientation,g=!(!m||!s),{canBeContinuous:y,isContinuous:v,isButterfly:b}=o.meta,x=o.getLayout(),S=function({layout:e,colorModel:t}){const n=e?.components?.find(e=>"general"===e.key);if(n?.bgColor?.useColorExpression){const e=ny(n?.bgColor?.colorExpression);return e.isInvalid()?void 0:e.getRGBA()}const r=n?.bgColor?.color;return ON({color:r,colorModel:t})}({layout:x,colorModel:h})??p.getStyle("object","","backgroundColor"),w=GO.getDimensionValuesInfo({layout:x,canBeContinuous:y,discreteModel:n,layoutService:o}),M=v?d:d.filter(e=>!!w[e.dimensionValue]),k={},C=M.map(e=>e.dimensionValue);C.forEach(e=>{w[e]&&(k[e]?(k[e].innerValues=w[e].innerValues,k[e].minOrder=Math.min(k[e].minOrder,w[e].minOrder),k[e].maxOrder=Math.max(k[e].maxOrder,w[e].maxOrder),k[e].isMinOrderOk=k[e].isMinOrderOk||w[e].isMinOrderOk,k[e].isMaxOrderOk=k[e].isMaxOrderOk||w[e].isMaxOrderOk):k[e]={id:w[e].id,dataNode:w[e].dataNode,qText:w[e].qText,innerValues:w[e].innerValues,minOrder:w[e].minOrder,maxOrder:w[e].maxOrder,isMinOrderOk:w[e].isMinOrderOk,isMaxOrderOk:w[e].isMaxOrderOk},k[e].numInnerValues=(k[e].maxOrder||0)-(k[e].minOrder||0)+1)}),M.forEach(e=>{const t=NN({point:e,dimensionValueInfo:k,layoutService:o});if(e.validMeasureValue=b&&1===e.measureIndex?-t:t,o?.meta?.isStacked){const t=k[e.dimensionValue]?.dataNode;if(Array.isArray(t)&&void 0!==e.measureIndex){const n=t.slice(0,e.measureIndex+2),r=t[e.measureIndex+1]?.qNum;if("number"==typeof r&&0!==r){const t=Math.sign(r);e.validMeasureValue=n.reduce((e,n)=>{const r=n.qNum;return"number"==typeof r&&Math.sign(r)===t?e+r:e},0)}}}const n=ON({colorModel:h,color:e.style?.label?.color||AN}),r=!!e.style?.label?.coloredBackground;e.labelBackgroundColor=r?n:void 0,e.labelColor=r?i.getTheme().getContrastingColorTo(n):n,e.hasBackground=r,e.maxLabelWidth=100});const q={scale:l,fn:({datum:t})=>{const n=e.scale(l),r=t.value.dimensionValue;if(v)return n("string"==typeof r?""===r?void 0:+r:r);if(void 0===k[r])return;return GO.getScaledPosition({scale:n,value:k[r].id,valueInfo:k[r],size:e.component(u)?.rect[m?"width":"height"],align:"center",invert:g,layoutService:o,isContinuous:v})}},E={scale:c,fn:({datum:e,scale:t})=>t(e.value.validMeasureValue)},D={key:f,type:"point",data:M,settings:{x:m?q:E,y:m?E:q,strokeWidth:({datum:e})=>e.value.style?.lineThickness??3,stroke:({datum:e})=>ON({colorModel:h,color:e.value.style?.lineColor?.color?e.value.style?.lineColor:{index:-1,color:"#000"}}),fill:({datum:e})=>e.value.style?.fill?.color?ON({colorModel:h,color:e.value.style?.fill}):S,size:({datum:e})=>`${e.value.style?.dataPointSize??10}px`,shape:({datum:e})=>e.value.style?.symbol||"circle"},animations:{enabled:t.query.animationsEnabled,trackBy:e=>e.data.value.cId,compensateForLayoutChanges:bN.points.compensateForLayoutChanges}};return D}const IN=e=>e?.qHyperCube?.qDimensionInfo?.filter(e=>7005!==e.qError?.qErrorCode).length||0,LN=!0,PN=!1,RN={index:0,color:"none"},zN={index:-1,color:"#595959"},FN={index:-1,color:"#595959"},jN=e=>{!e.dimensionValue?.qValueExpression&&e.dimensionValue?.qStringExpression&&(e.dimensionValue.qValueExpression=e.dimensionValue.qStringExpression,delete e.dimensionValue.qStringExpression)},BN=e=>{e.dimensionValue?.qValueExpression&&!e.dimensionValue?.qStringExpression&&(e.dimensionValue.qStringExpression=e.dimensionValue.qValueExpression,delete e.dimensionValue.qValueExpression)},HN=e=>{switch(e.type){case"image":break;case"point":delete e.points,delete e.style?.lineType,delete e.showPoints,delete e.style?.lineCurve;break;case"line":delete e.dimensionValue,delete e.measureValue,delete e.measureIndex,delete e.style?.dataPointSize,delete e.style?.fill,delete e.style?.symbol,delete e.style?.label;break;default:delete e.points,delete e.dimensionValue,delete e.measureValue,delete e.measureIndex,delete e.style?.lineType,delete e.style?.lineThickness,delete e.style?.lineColor,delete e.style?.dataPointSize,delete e.style?.fill}},VN=({translator:e})=>({label:{ref:"label.value",translation:"Common.Label",component:"string",expression:"optional",defaultValue:""},dimensionNumberValue:{ref:"dimensionValue",translation:"properties.dimensionReferenceLines.dimensionValue",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:0,show:(e,t,n)=>HD.canBeContinuous(n.layout)},dimensionStringValue:{ref:"dimensionValue",translation:"properties.dimensionReferenceLines.dimensionValue",component:"string",expression:"optional",defaultValue:"",show:(e,t,n)=>!HD.canBeContinuous(n.layout)},measureInputType:{type:"number",component:"dropdown",translation:"properties.plugins.measureInputType",show:(e,t,n)=>1===IN(n.layout),convertFunctions:{get:(e,t,n,r)=>void 0===r.measureValue?1:0,set(e,t,n,r,i){0===e?(i.measureValue=0,delete i.measureIndex):(i.measureIndex=0,delete i.measureValue)}},options:[{value:0,translation:e.get("properties.plugins.measureInputType.measureValue")},{value:1,translation:e.get("properties.plugins.measureInputType.measureIndex")}]},measureValue:{ref:"measureValue",translation:"properties.plugins.measureInputType.measureValue",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:0,schemaIgnore:!0,show:(e,t,n)=>void 0!==e.measureValue||2===IN(n.layout)},measureIndex:{ref:"measureIndex",translation:"properties.plugins.measureInputType.measureIndex",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:0,show:(e,t,n)=>void 0===e.measureValue&&1===IN(n.layout),invalid:(e,t,n)=>e.measureIndex<0||e.measureIndex>=(e=>e?.qHyperCube?.qMeasureInfo?.filter(e=>7005!==e.qError?.qErrorCode).length||0)(n.layout)}}),$N=()=>({symbol:{type:"string",component:"dropdown",ref:"style.symbol",translation:"Object.GridChart.Symbol",options:[{value:"circle",translation:"Object.GridChart.Symbol.Circle"},{value:"cross",translation:"Object.GridChart.Symbol.Cross"},{value:"diamond",translation:"Object.GridChart.Symbol.Diamond"},{value:"saltire",translation:"Object.GridChart.Symbol.Saltire"},{value:"square",translation:"Object.GridChart.Symbol.Square"},{value:"star",translation:"Object.GridChart.Symbol.Star"},{value:"triangle",translation:"Object.GridChart.Symbol.Triangle"}]},labelPlacement:{type:"string",component:"dropdown",ref:"label.placement",translation:"geo.properties.labelPosition",options:[{value:"auto",translation:"properties.axis.displaymode.auto"},{value:"top",translation:"geo.properties.labelPosition.above"},{value:"bottom",translation:"geo.properties.labelPosition.below"}]},fillColor:{ref:"style.fill",translation:"properties.distributionPlot.pointColor",type:"object",component:"color-picker",disableNone:PN,showAlpha:LN,defaultValue:RN},lineColor:{ref:"style.lineColor",translation:"LayerStyleEditor.style.strokeColor",type:"object",component:"color-picker",disableNone:PN,showAlpha:LN,defaultValue:zN},labelColor:{ref:"style.label.color",translation:"properties.plugins.label.color",type:"object",component:"color-picker",disableNone:PN,showAlpha:LN,defaultValue:FN},colorBackground:{ref:"style.label.coloredBackground",translation:"properties.referenceLines.coloredBackground",type:"boolean",defaultValue:!1,show:!0},lineThickness:{component:"slider",type:"number",expression:"optional",ref:"style.lineThickness",translation:"LayerStyleEditor.style.strokeWidth",show:!0,defaultValue:3,min:1,max:6,step:1},dataPointSize:{component:"slider",type:"number",expression:"optional",ref:"style.dataPointSize",translation:"LayerStyleEditor.style.dataPointSize",show:!0,defaultValue:10,min:3,max:30,step:1}}),WN=({translator:e,pluginOptions:t})=>{const n={type:"array",ref:"plugins",filter:e=>e.filter(e=>["point","line"].includes(e.type)),translation:"properties.shapes",show:e=>(e?.qHyperCubeDef?.qDimensions||[]).length>0,itemTitleRef:e=>t.filter(t=>t.value===e.type)[0].translation+(e.label?.value?`: ${e.label.value}`:""),allowAdd:!0,allowRemove:!0,allowMove:!0,allowDuplicate:!0,dialog:{ref:"type",options:t},add(e,t){void 0===t.plugins&&(t.plugins=[]),HN(e)},addTranslation:"properties.shapes.addShape",globalChange:(e,t,n)=>{e.plugins&&(e.plugins.forEach(HN),HD.canBeContinuous(n.layout)?e.plugins.forEach(e=>{switch(e.type){case"point":jN(e);break;case"line":(e=>{e.points?.forEach(jN)})(e)}}):e.plugins.forEach(e=>{switch(e.type){case"point":BN(e);break;case"line":(e=>{e.points?.forEach(BN)})(e)}}))},items:{point:{component:"items",show:e=>"point"===e.type,items:{dataSection:{component:"items",items:VN({translator:e})},styleSection:{component:"items",items:$N()}}},line:{type:"items",show:e=>"line"===e.type,items:{dataSection:{component:"items",items:{label:{ref:"label.value",translation:"Common.Label",component:"string",expression:"optional",defaultValue:""},points:{type:"array",ref:"points",titleTranslation:"properties.plugins.Points",itemTitleRef:(t,n)=>e.get("properties.plugins.Points.Point",n+1)+(t.label?.value?`: ${t.label.value}`:""),allowAdd:!0,allowRemove:!0,allowMove:!0,allowDuplicate:!0,addTranslation:"properties.plugins.Points.addPoint",items:{dataSection:{component:"items",items:VN({translator:e})},styleSection:{component:"items",items:$N(),show:(e,t,n)=>{const r=((e,t)=>{if(!t)return null;for(let n=0;n<t.length;n+=1)if("line"===t[n].type&&t[n].points.includes(e))return t[n];return null})(e,n.properties.plugins);return r?.showPoints}}}}}},styleSection:{component:"items",items:{lineColor:{ref:"style.lineColor",translation:"Object.Table.Representation.MiniChart.Colors.Line",type:"object",component:"color-picker",disableNone:PN,showAlpha:LN,defaultValue:zN},lineThickness:{component:"slider",type:"number",expression:"optional",ref:"style.lineThickness",translation:"LayerStyleEditor.style.lineThickness",show:!0,defaultValue:2,min:1,max:6,step:1},lineType:{component:"dropdown",type:"string",expression:"optional",ref:"style.lineType",translation:"LayerStyleEditor.style.lineType",show:!0,defaultValue:"",options:[{value:"",translation:"LayerStyleEditor.style.solid"},{value:"8 4",translation:"LayerStyleEditor.style.dashed"}],convertFunctions:{get(e,t){const n=e(t.type);return void 0===n||""===n?"":"8 4"}}},lineCurve:{translation:"LayerStyleEditor.style.lineCurve",type:"string",ref:"style.lineCurve",component:"dropdown",defaultValue:"linear",expression:"optional",options:[{value:"linear",translation:"LayerStyleEditor.style.linear"},{value:"monotone",translation:"LayerStyleEditor.style.monotone"}]}}},showPoints:{ref:"showPoints",translation:"properties.dataPoints.showDataPoints",type:"boolean",defaultValue:!1}}}}};return n};var UN=class e{constructor(e,t){this._key=e,this._value=t}getKey(){return this._key}getValue(){return this._value}equals(t){return t instanceof e&&(this._key===t._key&&this._value===t._value)}static newInstanceIfNeeded(){let t,n,r=arguments[0];return"string"==typeof arguments[1]?(t=arguments[1],n=r.length):(n=arguments[1],t=arguments[2]),t&&r?(r.length>n&&(r=r.substr(0,n)),new e(r,t)):null}},YN=class e{setValue(e){this._nextMap=null,this._value=e}getNextNode(e){return this._nextMap?this._nextMap[e]:null}put(t,n,r){let i,o;if(t.length===n)return o=this._value,this.setValue(r),o;const a=t.charAt(n);return this._nextMap?(i=this._nextMap[a],i||(i=new e,this._nextMap[a]=i)):(this._nextMap={},i=new e,this._nextMap[a]=i),i.put(t,n+1,r)}get(e,t){if(e.length<=t)return this._value;const n=this.getNextNode(e.charAt(t));return n?n.get(e,t+1):null}getLongestMatch(e,t){if(e.length<=t)return UN.newInstanceIfNeeded(e,this._value);const n=this.getNextNode(e.charAt(t));if(!n)return UN.newInstanceIfNeeded(e,t,this._value);const r=n.getLongestMatch(e,t+1);return r||UN.newInstanceIfNeeded(e,t,this._value)}},KN=class{constructor(){this.clear()}getLongestMatch(e){return this.root&&e?this.root.getLongestMatch(e,0):null}getMaxKeyLength(){return this.maxKeyLen}clear(){this.root=null,this.maxKeyLen=0,this.size=0}put(e,t){this.root||(this.root=new YN);const n=this.root.put(e,0,t);return n||(e.length>this.maxKeyLen&&(this.maxKeyLen=e.length),this.size++,null)}};(()=>{const e=[],t=[],n=new KN;let r,i,o;for(r in e["""]="34",e["&"]="38",e["<"]="60",e[">"]="62",e[" "]="160",e["¡"]="161",e["¢"]="162",e["£"]="163",e["¤"]="164",e["¥"]="165",e["¦"]="166",e["§"]="167",e["¨"]="168",e["©"]="169",e["ª"]="170",e["«"]="171",e["¬"]="172",e["­"]="173",e["®"]="174",e["¯"]="175",e["°"]="176",e["±"]="177",e["²"]="178",e["³"]="179",e["´"]="180",e["µ"]="181",e["¶"]="182",e["·"]="183",e["¸"]="184",e["¹"]="185",e["º"]="186",e["»"]="187",e["¼"]="188",e["½"]="189",e["¾"]="190",e["¿"]="191",e["À"]="192",e["Á"]="193",e["Â"]="194",e["Ã"]="195",e["Ä"]="196",e["Å"]="197",e["Æ"]="198",e["Ç"]="199",e["È"]="200",e["É"]="201",e["Ê"]="202",e["Ë"]="203",e["Ì"]="204",e["Í"]="205",e["Î"]="206",e["Ï"]="207",e["Ð"]="208",e["Ñ"]="209",e["Ò"]="210",e["Ó"]="211",e["Ô"]="212",e["Õ"]="213",e["Ö"]="214",e["×"]="215",e["Ø"]="216",e["Ù"]="217",e["Ú"]="218",e["Û"]="219",e["Ü"]="220",e["Ý"]="221",e["Þ"]="222",e["ß"]="223",e["à"]="224",e["á"]="225",e["â"]="226",e["ã"]="227",e["ä"]="228",e["å"]="229",e["æ"]="230",e["ç"]="231",e["è"]="232",e["é"]="233",e["ê"]="234",e["ë"]="235",e["ì"]="236",e["í"]="237",e["î"]="238",e["ï"]="239",e["ð"]="240",e["ñ"]="241",e["ò"]="242",e["ó"]="243",e["ô"]="244",e["õ"]="245",e["ö"]="246",e["÷"]="247",e["ø"]="248",e["ù"]="249",e["ú"]="250",e["û"]="251",e["ü"]="252",e["ý"]="253",e["þ"]="254",e["ÿ"]="255",e["&OElig"]="338",e["&oelig"]="339",e["&Scaron"]="352",e["&scaron"]="353",e["&Yuml"]="376",e["&fnof"]="402",e["&circ"]="710",e["&tilde"]="732",e["&Alpha"]="913",e["&Beta"]="914",e["&Gamma"]="915",e["&Delta"]="916",e["&Epsilon"]="917",e["&Zeta"]="918",e["&Eta"]="919",e["&Theta"]="920",e["&Iota"]="921",e["&Kappa"]="922",e["&Lambda"]="923",e["&Mu"]="924",e["&Nu"]="925",e["&Xi"]="926",e["&Omicron"]="927",e["&Pi"]="928",e["&Rho"]="929",e["&Sigma"]="931",e["&Tau"]="932",e["&Upsilon"]="933",e["&Phi"]="934",e["&Chi"]="935",e["&Psi"]="936",e["&Omega"]="937",e["&alpha"]="945",e["&beta"]="946",e["&gamma"]="947",e["&delta"]="948",e["&epsilon"]="949",e["&zeta"]="950",e["&eta"]="951",e["&theta"]="952",e["&iota"]="953",e["&kappa"]="954",e["&lambda"]="955",e["&mu"]="956",e["&nu"]="957",e["&xi"]="958",e["&omicron"]="959",e["&pi"]="960",e["&rho"]="961",e["&sigmaf"]="962",e["&sigma"]="963",e["&tau"]="964",e["&upsilon"]="965",e["&phi"]="966",e["&chi"]="967",e["&psi"]="968",e["&omega"]="969",e["&thetasym"]="977",e["&upsih"]="978",e["&piv"]="982",e["&ensp"]="8194",e["&emsp"]="8195",e["&thinsp"]="8201",e["&zwnj"]="8204",e["&zwj"]="8205",e["&lrm"]="8206",e["&rlm"]="8207",e["&ndash"]="8211",e["&mdash"]="8212",e["&lsquo"]="8216",e["&rsquo"]="8217",e["&sbquo"]="8218",e["&ldquo"]="8220",e["&rdquo"]="8221",e["&bdquo"]="8222",e["&dagger"]="8224",e["&Dagger"]="8225",e["&bull"]="8226",e["&hellip"]="8230",e["&permil"]="8240",e["&prime"]="8242",e["&Prime"]="8243",e["&lsaquo"]="8249",e["&rsaquo"]="8250",e["&oline"]="8254",e["&frasl"]="8260",e["&euro"]="8364",e["&image"]="8365",e["&weierp"]="8472",e["&real"]="8476",e["&trade"]="8482",e["&alefsym"]="8501",e["&larr"]="8592",e["&uarr"]="8593",e["&rarr"]="8594",e["&darr"]="8595",e["&harr"]="8596",e["&crarr"]="8629",e["&lArr"]="8656",e["&uArr"]="8657",e["&rArr"]="8658",e["&dArr"]="8659",e["&hArr"]="8660",e["&forall"]="8704",e["&part"]="8706",e["&exist"]="8707",e["&empty"]="8709",e["&nabla"]="8711",e["&isin"]="8712",e["¬in"]="8713",e["&ni"]="8715",e["&prod"]="8719",e["&sum"]="8721",e["&minus"]="8722",e["&lowast"]="8727",e["&radic"]="8730",e["&prop"]="8733",e["&infin"]="8734",e["&ang"]="8736",e["&and"]="8743",e["&or"]="8744",e["&cap"]="8745",e["&cup"]="8746",e["&int"]="8747",e["&there4"]="8756",e["&sim"]="8764",e["&cong"]="8773",e["&asymp"]="8776",e["&ne"]="8800",e["&equiv"]="8801",e["&le"]="8804",e["&ge"]="8805",e["&sub"]="8834",e["&sup"]="8835",e["&nsub"]="8836",e["&sube"]="8838",e["&supe"]="8839",e["&oplus"]="8853",e["&otimes"]="8855",e["&perp"]="8869",e["&sdot"]="8901",e["&lceil"]="8968",e["&rceil"]="8969",e["&lfloor"]="8970",e["&rfloor"]="8971",e["&lang"]="9001",e["&rang"]="9002",e["&loz"]="9674",e["&spades"]="9824",e["&clubs"]="9827",e["&hearts"]="9829",e["&diams"]="9830",e)"function"!=typeof e[r]&&e.hasOwnProperty(r)&&(t[e[r]]=r);for(i in t)"function"!=typeof t[i]&&t.hasOwnProperty(i)&&(o=t[i].toLowerCase().substr(1),n.put(o,String.fromCharCode(i)))})(),"undefined"!=typeof document&&document.createElement("div");for(let e=0;e<255;e++)e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e.toString(16);var GN={ATTRIBUTE:{FIRST_DIMENSION_DIFF:"firstDimensionDiff"},UNIT_MULTIPLIER:1,UNIT:{AUTO:"auto",SECONDS:"seconds",MINUTES:"minutes",HOURS:"hours",DAYS:"days",WEEKS:"weeks",MONTHS:"months",YEARS:"years",NUMBER:"number",NONE:"none"}};const XN="cao.fieldPicker.tab.period",JN={TITLE:"properties.forecast.stepSize.label",AUTO:"properties.axis.displaymode.auto",SECONDS:"properties.forecast.stepUnit.seconds",MINUTES:"properties.forecast.stepUnit.minutes",HOURS:"properties.forecast.stepUnit.hours",DAYS:"properties.forecast.stepUnit.days",WEEKS:"properties.forecast.stepUnit.weeks",MONTHS:"properties.forecast.stepUnit.months",YEARS:"properties.forecast.stepUnit.years",NUMBER:"properties.forecast.stepUnit.number",NONE:"properties.scrollbar.none"},ZN=(e,t,n)=>GD.continuous({layout:n.layout,properties:n.properties}),QN=(e,t,n)=>{const r=e?.qHyperCubeDef?.qDimensions?.[0]?.qDef?.continuous?.period;return ZN(0,0,n)&&r&&"none"!==r},{FIRST_DIMENSION_DIFF:eA}=GN.ATTRIBUTE,tA=(e,t,n)=>{const r=e?.qHyperCubeDef?.qDimensions?.[0];if(r)if(GD.continuous({layout:n.layout,properties:n.properties})&&"auto"===r.qDef?.continuous?.period){const e=r.qAttributeExpressions||[],t=e.find(e=>e.id===eA),n="Min(Aggr(If(RowNo() > 1, [$(=GetObjectField(0))] - Above([$(=GetObjectField(0))]), Null()),([$(=GetObjectField(0))], (Numeric, Ascending))))";t?(t.qExpression="",t.qLabelExpression=n,r.qAttribute=!0):(e.push({id:eA,qExpression:"",qLabelExpression:n,qAttribute:!0}),r.qAttributeExpressions=e)}else{const e=r.qAttributeExpressions||[],t=e.findIndex(e=>e.id===eA);-1!==t&&(e.splice(t,1),r.qAttributeExpressions=e)}},{UNIT:nA,UNIT_MULTIPLIER:rA}=GN;const iA={MINI_CHART:{value:"miniChart",translation:"properties.scrollbar.miniChart"},BAR:{value:"bar",translation:"properties.scrollbar.bar"},NONE:{value:"none",translation:"properties.scrollbar.none"}};var oA={OPTIONS:iA,DEFAULT:iA.MINI_CHART};function aA({layoutService:e,discrete:t}){return({h:n,rect:r,orientation:i,minThumbSize:o})=>{const a=t.query.getCurrentDataPage(),s=e.meta.size.y,l="horizontal"===i,c=r[l?"width":"height"];let u=a.qArea.qTop/s*c,d=a.qArea.qHeight/s*c;if(d<o){const e=(o-d)/2;u=u-e+(Math.max(0,0-(u-e))-Math.max(0,u+d+e-c)),d=o}return n("div",{style:{position:"absolute",right:0,bottom:0,background:"red",opacity:.2,...l?{top:0,left:u,width:d}:{top:u,left:0,height:d}}})}}function sA({layoutService:e,viewState:t,viewCache:n}){return e.meta.isContinuous?function(e,t){const n=e.get("zoom"),r=t.get("continuousMin"),i=t.get("continuousMax");return[(n.min-r)/(i-r),(n.max-r)/(i-r)]}(t,n):function(e){return e.get("viewRange")}(t)}const lA=e=>({miniChart:e===oA.OPTIONS.MINI_CHART.value,bar:e===oA.OPTIONS.BAR.value,none:e===oA.OPTIONS.NONE.value});function cA({layoutService:e,override:t}){const n=(({layoutService:e})=>{const t=e.getLayoutValue("scrollbar");if(t)return lA(t);const n=e.getLayoutValue("showMiniChartForContinuousAxis");if(void 0===n)return lA(oA.DEFAULT.value);const r=e.getLayoutValue("dimensionAxis.continuousAuto"),i=e.getLayoutValue("preferContinuousAxis");return lA(!n&&(r||!r&&i)?oA.OPTIONS.NONE.value:oA.OPTIONS.MINI_CHART.value)})({layoutService:e});return t&&t.predicate({layoutService:e,scrollbar:n})&&(n.miniChart=t.value===oA.OPTIONS.MINI_CHART.value,n.bar=t.value===oA.OPTIONS.BAR.value,n.none=t.value===oA.OPTIONS.NONE.value),n}function uA({layoutService:e,dockService:t,discrete:n,continuousDataModel:r,viewState:i,viewCache:o,themeService:a,rtl:s,scrollbarOverride:l,visualizeCache:c=!1,deviceType:u}){const d=cA({layoutService:e,override:l});if(d.none)return!1;const{orientation:f}=t.meta.major,h={key:"scrollbar",type:"scrollbar",layout:{dock:"horizontal"===f?t.meta.minor.start:t.meta.minor.end,minimumLayoutMode:"XSMALL"},show:()=>e.meta.isContinuous?r.getDimensionCardinality()>1:n.query.getCanScroll(),settings:{orientation:f,rtl:s,isContinuous:e.meta.isContinuous,range:()=>sA({layoutService:e,viewState:i,viewCache:o})}};d.bar&&(h.settings.style="slim",h.settings.size={area:"touch"===u?{max:16,min:16}:{max:8,min:8}},e.meta.isContinuous||(h.settings.size.thumb={min:4}));const p=a.getStyles();return p.color&&(h.style={standard:{thumb:{"border-color":p.color,opacity:.4},before:{background:p.color,opacity:.1},after:{background:p.color,opacity:.1}}}),e.meta.isDiscrete&&c&&(h.settings.injections=()=>[aA({layoutService:e,discrete:n})]),h}function dA({componentKey:e,chart:t,viewState:n,viewCache:r,layoutService:i,dockService:o,rtl:a}){return s=>{const{x:l,y:c}=s.center,u=t.element.getBoundingClientRect(),d=t.component(e),f="horizontal"===o.meta.major.orientation,h=f?l-u.left-d.rect.computedInner.x:c-u.top-d.rect.computedInner.y,p=f?d.rect.computedInner.width:d.rect.computedInner.height,m=f&&a?p-h:h,g=Math.max(0,Math.min(m/p,1)),[y,v]=sA({layoutService:i,viewState:n,viewCache:r}),b=g<y,x=g>v,S=!b&&!x;return{pixel:m,relative:g,thumb:S?m-y*p:0,beforeThumb:b,afterThumb:x,onThumb:S}}}function fA({componentKey:e,chart:t,viewState:n,viewCache:r,layoutService:i,dockService:o}){return()=>{const a=t.component(e),{orientation:s}=o.meta.major,{width:l,height:c}=a.rect.computedInner,u="horizontal"===s?l:c,[d,f]=sA({layoutService:i,viewState:n,viewCache:r});return{size:u,thumbSize:(f-d)*u}}}function hA({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){const c=dA({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:l}),u=fA({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a});return{type:"Tap",options:{event:"scrollbarTap",enable:(r,i)=>!i||!!n.scroll.enabled()&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some(t=>t.key===e)},events:{scrollbarTap(n){n.preventDefault();const a=c(n);if(o.meta.isContinuous){const e=r.get("zoom"),t=e.max-e.min,n=i.get("continuousMin"),o=i.get("continuousMax"),s=n+(o-n)*a.relative;r.set("zoom",{min:Math.min(s-t/2,o-t),max:Math.max(s+t/2,n+t)})}else{const e=u(),t=a.pixel-e.thumbSize/2,n=Math.max(0,t/e.size);s.command.scrollTo(n)}t.component(e).emit("render")}}}}const pA="data-scrollbar-handle";function mA({e:e}){return(e.srcEvent||e).srcElement.getAttribute(pA)||""}const gA="scrollbarResize";function yA({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:s}){const l=dA({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:s});return{type:"Pan",key:`event:${gA}`,options:{event:gA,threshold:0,enable(e,t){return!(!o.meta.isContinuous||!n.scroll.enabled())&&(!t||(this[gA]=this[gA]||{},(e=>{const[t]=e.changedPointers;return t&&("pointerdown"===t.type||"mousedown"===t.type)})(t)&&mA({e:t})&&(this[gA].panningEvent=t.srcEvent),!!this[gA].panningEvent))}},events:{[`${gA}start`](n){n.preventDefault(),this[gA]=this[gA]||{},this[gA].panningEvent&&t.component(e).emit("dragStart",this[gA].panningEvent)},[`${gA}move`](n){if(n.preventDefault(),this[gA]=this[gA]||{},!this[gA].panningEvent)return;const o=r.get("zoom"),a=i.get("continuousMin"),s=i.get("continuousMax"),c=i.get("minimiumZoomSpan"),u=(s-a)*l(n).relative+a,d=mA({e:this[gA].panningEvent});let f="start"===d?Math.min(u,o.max):o.min,h="end"===d?Math.max(u,o.min):o.max;f===h&&(f-="start"===d?c:0,h+="end"===d?c:0),r.set("zoom",{min:f,max:h}),t.component(e).emit("render")},[`${gA}end`](n){n.preventDefault(),this[gA]=this[gA]||{},delete this[gA].panningEvent,t.component(e).emit("dragEnd")},[`${gA}cancel`](n){n.preventDefault(),this[gA]=this[gA]||{},delete this[gA].panningEvent,t.component(e).emit("dragEnd")}}}}const vA="scrollbarPan";function bA({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){const c=dA({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:l}),u=fA({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a});return{type:"Pan",key:`event:${vA}`,options:{event:vA,threshold:0,enable(r,i){return this[vA]=this[vA]||{},!(i&&!this[vA].isPanning)||!!n.scroll.enabled()&&((!i||i.target===t.element)&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some(t=>t.key===e))}},events:{[`${vA}start`](n){n.preventDefault();const a=c(n);if(this[vA]=this[vA]||{},this[vA].isPanning=!0,t.component(e).emit("lockState"),o.meta.isContinuous){const e=r.get("zoom"),t=e.max-e.min,n=i.get("continuousMin"),o=i.get("continuousMax"),s=n+(o-n)*a.relative;s<e.min?r.set("zoom",{min:Math.min(s,o-t),max:Math.max(s+t,n+t)}):s>e.max&&r.set("zoom",{min:Math.min(s-t,o-t),max:Math.max(s,n+t)}),this[vA].relative=a.relative,this[vA].zoom=r.get("zoom"),this[vA].zoom.span=this[vA].zoom.max-this[vA].zoom.min,this[vA].zoom.fullSpan=o-n}else if(a.onThumb)this[vA].offset=a.thumb;else{const e=u();this[vA].offset=a.beforeThumb?0:e.thumbSize}},[`${vA}move`](n){n.preventDefault();const a=c(n);if(this[vA]=this[vA]||{},o.meta.isContinuous){const e=a.relative-this[vA].relative,{fullSpan:t,span:n,min:o,max:s}=this[vA].zoom,l=i.get("continuousMin"),c=i.get("continuousMax");r.set("zoom",{min:Math.min(o+e*t,c-n),max:Math.max(s+e*t,l+n)})}else{const e=a.pixel-(this[vA].offset||0),t=u(),n=Math.max(0,e/t.size);s.command.scrollTo(n)}t.component(e).emit("render")},[`${vA}end`](n){n.preventDefault(),this[vA]=this[vA]||{},this[vA].isPanning=!1,t.component(e).emit("unlockState")},[`${vA}cancel`](n){n.preventDefault(),this[vA]=this[vA]||{},this[vA].isPanning=!1,t.component(e).emit("unlockState")}}}}function xA({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){return[hA({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}),yA({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:l}),bA({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l})]}function SA({componentKey:e,chart:t,actions:n,layoutService:r}){const i=(i,o)=>{if(!r.meta.isContinuous)return;const a=t.component(e);a&&a.emit&&n.scroll.enabled()&&a.emit(i,o)};return{type:"native",events:{mousemove:e=>i("hover",e),mouseleave:()=>i("leave")}}}function wA({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){return{gestures:[...xA({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l})],native:SA({componentKey:e,chart:t,actions:n,layoutService:o})}}const MA={background:"rgba(0, 0, 0, 0.1)"},kA={top:-1,bottom:-1,width:6},CA={width:2,background:"#595959"};var qA={before:MA,after:MA,thumb:{background:"transparent",border:"1px solid rgba(68, 68, 68, 0.4)"},startHandle:kA,endHandle:kA,startHandleBorder:CA,endHandleBorder:CA};const EA={background:"rgba(0, 0, 0, 0.1)"},DA={top:-1,bottom:-1,width:6},TA={width:2,background:"#595959"};var OA={before:EA,after:EA,thumb:{background:"#B0AFAE",border:"transparent"},startHandle:DA,endHandle:DA,startHandleBorder:TA,endHandleBorder:TA};const NA={position:"absolute",top:0,right:0,bottom:0,left:0,boxSizing:"border-box"},AA={pointerEvents:"initial"},_A={pointerEvents:"none"};const IA="ew-resize",LA="default";function PA(){const{rect:e}=this,{settings:t}=this.settings,n="horizontal"===t.orientation,r=n?e.computedInner.width:e.computedInner.height,i=t.range(),o=n&&t.rtl;return{size:r,start:(o?1-i[1]:i[0])*r,end:(o?1-i[0]:i[1])*r}}function RA(){const e=this.state.hover.start||this.state.hover.end||this.state.drag.start||this.state.drag.end;this.renderer.element().ownerDocument.body.style.cursor=e?IA:LA}function zA(e,t,n){const{min:r}=this.settings.settings.size.thumb;if(n-t<r){const i=(r-(n-t))/2,o=Math.max(0,0-(t-i))-Math.max(0,n+i-e);return{size:e,start:t-i+o,end:n+i+o}}return{size:e,start:t,end:n}}function FA(e){const t=(e.srcEvent||e).srcElement;return this.renderer.element().contains(t)}function jA(){const{size:e,start:t,end:n}=PA.call(this);this.renderer.render(this.elements(this.h,zA.call(this,e,t,n)))}function BA(){const{state:e,settings:t,style:n}=this,r=t.settings.style;return e.style[r]||(e.style[r]=function({id:e,style:t}){const n="slim"===e?OA:qA;return{container:{...NA},before:{...NA,...n.before,...t.before},after:{...NA,...n.after,...t.after},thumb:{...NA,...n.thumb,...t.thumb},startHandle:{...NA,...AA,...n.startHandle},endHandle:{...NA,...AA,...n.endHandle},startHandleBorder:{...NA,..._A,...n.startHandleBorder},endHandleBorder:{...NA,..._A,...n.endHandleBorder}}}({id:t.settings.style,style:n[r]})),e.style[r]}var HA,VA,$A={require:["renderer"],defaultSettings:{settings:{style:"standard",size:{area:{min:30,max:40,ratio:1/8},thumb:{min:4}},orientation:"horizontal",rtl:!1,isContinuous:!1,range:()=>[0,1],injections:()=>[]},style:{standard:{before:{},thumb:{},after:{}},slim:{before:{},thumb:{},after:{}}}},renderer:"dom",on:{render(){jA.call(this)},lockState(){this.state.locked=!0},unlockState(){this.state.locked=!1},hover(e){if(this.state.locked||this.state.drag.start||this.state.drag.end||!FA.call(this,e)&&this.state.hover.isPristine())return;this.state.hover.reset();const t=mA({e:e});t&&(this.state.hover[t]=!0),RA.call(this),jA.call(this)},leave(){this.state.locked||(this.state.hover.reset(),RA.call(this),jA.call(this))},dragStart(e){if(this.state.locked)return;this.state.drag.reset();const t=mA({e:e});t&&(this.state.drag[t]=!0),RA.call(this)},dragEnd(){this.state.locked||(this.state.drag.reset(),RA.call(this),jA.call(this))}},preferredSize({outer:e}){const{min:t,max:n,ratio:r}=this.settings.settings.size.area,i="horizontal"===this.settings.settings.orientation?"height":"width";return Math.max(t,Math.min(n,e[i]*r))},created(){this.state={style:{},locked:!1,hover:{start:!1,end:!1,reset(){this.start=!1,this.end=!1},isPristine(){return!this.start&&!this.end}},drag:{start:!1,end:!1,reset(){this.start=!1,this.end=!1}}}},render(e){this.h=e;const{size:t,start:n,end:r}=PA.call(this);return this.elements(e,zA.call(this,t,n,r))},properties(){return"horizontal"===this.settings.settings.orientation?{start:"left",end:"right"}:{start:"top",end:"bottom"}},elements(e,{size:t,start:n,end:r}){const{settings:i}=this.settings,o=i.injections().map(t=>t({h:e,rect:this.rect,orientation:i.orientation,minThumbSize:i.size.thumb.min}));return function({h:e,size:t,start:n,end:r,properties:i,startHandleActive:o,endHandleActive:a,style:s,continuous:l,invert:c,injections:u}){const d={[i.end]:t-n},f={[i.start]:r},h={left:-3},p={left:1},m={right:-3,left:"auto"},g={left:3},y=e("div",{style:{...s.before,...c?f:d},class:"scrollbar--before"}),v=e("div",{style:{...s.after,...c?d:f},class:"scrollbar--after"}),b=[];if(l){const t=e("div",{style:{...s.startHandle,...c?m:h},class:"scrollbar--start-handle",[pA]:"start"},o?e("div",{style:{...s.startHandleBorder,...c?g:p}}):void 0);b.push(t);const n=e("div",{style:{...s.endHandle,...c?h:m},class:"scrollbar--end-handle",[pA]:"end"},a?e("div",{style:{...s.endHandleBorder,...c?p:g}}):void 0);b.push(n)}const x=e("div",{style:{...s.thumb,[i.start]:n,[i.end]:t-r},class:"scrollbar--thumb"},b);return e("div",{style:{...s.container}},[y,x,v,...u])}({h:e,size:t,start:n,end:r,properties:this.properties(),startHandleActive:this.state.hover.start||this.state.drag.start,endHandleActive:this.state.hover.end||this.state.drag.end,style:BA.call(this),continuous:i.isContinuous,invert:"horizontal"===i.orientation&&i.rtl,injections:o})}},WA={exports:{}},UA={};function YA(){if(HA)return UA;HA=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),a=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),d=Symbol.iterator;var f={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h=Object.assign,p={};function m(e,t,n){this.props=e,this.context=t,this.refs=p,this.updater=n||f}function g(){}function y(e,t,n){this.props=e,this.context=t,this.refs=p,this.updater=n||f}m.prototype.isReactComponent={},m.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},m.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},g.prototype=m.prototype;var v=y.prototype=new g;v.constructor=y,h(v,m.prototype),v.isPureReactComponent=!0;var b=Array.isArray,x=Object.prototype.hasOwnProperty,S={current:null},w={key:!0,ref:!0,__self:!0,__source:!0};function M(t,n,r){var i,o={},a=null,s=null;if(null!=n)for(i in void 0!==n.ref&&(s=n.ref),void 0!==n.key&&(a=""+n.key),n)x.call(n,i)&&!w.hasOwnProperty(i)&&(o[i]=n[i]);var l=arguments.length-2;if(1===l)o.children=r;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];o.children=c}if(t&&t.defaultProps)for(i in l=t.defaultProps)void 0===o[i]&&(o[i]=l[i]);return{$$typeof:e,type:t,key:a,ref:s,props:o,_owner:S.current}}function k(t){return"object"==typeof t&&null!==t&&t.$$typeof===e}var C=/\/+/g;function q(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function E(n,r,i,o,a){var s=typeof n;"undefined"!==s&&"boolean"!==s||(n=null);var l=!1;if(null===n)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(n.$$typeof){case e:case t:l=!0}}if(l)return a=a(l=n),n=""===o?"."+q(l,0):o,b(a)?(i="",null!=n&&(i=n.replace(C,"$&/")+"/"),E(a,r,i,"",function(e){return e})):null!=a&&(k(a)&&(a=function(t,n){return{$$typeof:e,type:t.type,key:n,ref:t.ref,props:t.props,_owner:t._owner}}(a,i+(!a.key||l&&l.key===a.key?"":(""+a.key).replace(C,"$&/")+"/")+n)),r.push(a)),1;if(l=0,o=""===o?".":o+":",b(n))for(var c=0;c<n.length;c++){var u=o+q(s=n[c],c);l+=E(s,r,i,u,a)}else if(u=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=d&&e[d]||e["@@iterator"])?e:null}(n),"function"==typeof u)for(n=u.call(n),c=0;!(s=n.next()).done;)l+=E(s=s.value,r,i,u=o+q(s,c++),a);else if("object"===s)throw r=String(n),Error("Objects are not valid as a React child (found: "+("[object Object]"===r?"object with keys {"+Object.keys(n).join(", ")+"}":r)+"). If you meant to render a collection of children, use an array instead.");return l}function D(e,t,n){if(null==e)return e;var r=[],i=0;return E(e,r,"","",function(e){return t.call(n,e,i++)}),r}function T(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var O={current:null},N={transition:null},A={ReactCurrentDispatcher:O,ReactCurrentBatchConfig:N,ReactCurrentOwner:S};function _(){throw Error("act(...) is not supported in production builds of React.")}return UA.Children={map:D,forEach:function(e,t,n){D(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return D(e,function(){t++}),t},toArray:function(e){return D(e,function(e){return e})||[]},only:function(e){if(!k(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},UA.Component=m,UA.Fragment=n,UA.Profiler=i,UA.PureComponent=y,UA.StrictMode=r,UA.Suspense=l,UA.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=A,UA.act=_,UA.cloneElement=function(t,n,r){if(null==t)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var i=h({},t.props),o=t.key,a=t.ref,s=t._owner;if(null!=n){if(void 0!==n.ref&&(a=n.ref,s=S.current),void 0!==n.key&&(o=""+n.key),t.type&&t.type.defaultProps)var l=t.type.defaultProps;for(c in n)x.call(n,c)&&!w.hasOwnProperty(c)&&(i[c]=void 0===n[c]&&void 0!==l?l[c]:n[c])}var c=arguments.length-2;if(1===c)i.children=r;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];i.children=l}return{$$typeof:e,type:t.type,key:o,ref:a,props:i,_owner:s}},UA.createContext=function(e){return(e={$$typeof:a,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:o,_context:e},e.Consumer=e},UA.createElement=M,UA.createFactory=function(e){var t=M.bind(null,e);return t.type=e,t},UA.createRef=function(){return{current:null}},UA.forwardRef=function(e){return{$$typeof:s,render:e}},UA.isValidElement=k,UA.lazy=function(e){return{$$typeof:u,_payload:{_status:-1,_result:e},_init:T}},UA.memo=function(e,t){return{$$typeof:c,type:e,compare:void 0===t?null:t}},UA.startTransition=function(e){var t=N.transition;N.transition={};try{e()}finally{N.transition=t}},UA.unstable_act=_,UA.useCallback=function(e,t){return O.current.useCallback(e,t)},UA.useContext=function(e){return O.current.useContext(e)},UA.useDebugValue=function(){},UA.useDeferredValue=function(e){return O.current.useDeferredValue(e)},UA.useEffect=function(e,t){return O.current.useEffect(e,t)},UA.useId=function(){return O.current.useId()},UA.useImperativeHandle=function(e,t,n){return O.current.useImperativeHandle(e,t,n)},UA.useInsertionEffect=function(e,t){return O.current.useInsertionEffect(e,t)},UA.useLayoutEffect=function(e,t){return O.current.useLayoutEffect(e,t)},UA.useMemo=function(e,t){return O.current.useMemo(e,t)},UA.useReducer=function(e,t,n){return O.current.useReducer(e,t,n)},UA.useRef=function(e){return O.current.useRef(e)},UA.useState=function(e){return O.current.useState(e)},UA.useSyncExternalStore=function(e,t,n){return O.current.useSyncExternalStore(e,t,n)},UA.useTransition=function(){return O.current.useTransition()},UA.version="18.3.1",UA}function KA(){return VA||(VA=1,WA.exports=YA()),WA.exports}var GA=KA(),XA=ug(GA),JA=t({__proto__:null,default:XA},[GA]);const ZA={black:"#000",white:"#fff"},QA="#e57373",e_="#ef5350",t_="#f44336",n_="#d32f2f",r_="#c62828",i_="#f3e5f5",o_="#ce93d8",a_="#ba68c8",s_="#ab47bc",l_="#9c27b0",c_="#7b1fa2",u_="#e3f2fd",d_="#90caf9",f_="#42a5f5",h_="#1976d2",p_="#1565c0",m_="#4fc3f7",g_="#29b6f6",y_="#03a9f4",v_="#0288d1",b_="#01579b",x_="#81c784",S_="#66bb6a",w_="#4caf50",M_="#388e3c",k_="#2e7d32",C_="#1b5e20",q_="#ffb74d",E_="#ffa726",D_="#ff9800",T_="#f57c00",O_="#e65100",N_={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};function A_(e){let t="https://mui.com/production-error/?code="+e;for(let e=1;e<arguments.length;e+=1)t+="&args[]="+encodeURIComponent(arguments[e]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}var __=Object.freeze({__proto__:null,default:A_}),I_="$$material";function L_(){return L_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},L_.apply(null,arguments)}function P_(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}var R_=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),this.tags=[],this.ctr=0},e}(),z_="-ms-",F_="-moz-",j_="-webkit-",B_="comm",H_="rule",V_="decl",$_="@keyframes",W_=Math.abs,U_=String.fromCharCode,Y_=Object.assign;function K_(e){return e.trim()}function G_(e,t,n){return e.replace(t,n)}function X_(e,t){return e.indexOf(t)}function J_(e,t){return 0|e.charCodeAt(t)}function Z_(e,t,n){return e.slice(t,n)}function Q_(e){return e.length}function eI(e){return e.length}function tI(e,t){return t.push(e),e}var nI=1,rI=1,iI=0,oI=0,aI=0,sI="";function lI(e,t,n,r,i,o,a){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:nI,column:rI,length:a,return:""}}function cI(e,t){return Y_(lI("",null,null,"",null,null,0),e,{length:-e.length},t)}function uI(){return aI=oI>0?J_(sI,--oI):0,rI--,10===aI&&(rI=1,nI--),aI}function dI(){return aI=oI<iI?J_(sI,oI++):0,rI++,10===aI&&(rI=1,nI++),aI}function fI(){return J_(sI,oI)}function hI(){return oI}function pI(e,t){return Z_(sI,e,t)}function mI(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function gI(e){return nI=rI=1,iI=Q_(sI=e),oI=0,[]}function yI(e){return sI="",e}function vI(e){return K_(pI(oI-1,SI(91===e?e+2:40===e?e+1:e)))}function bI(e){for(;(aI=fI())&&aI<33;)dI();return mI(e)>2||mI(aI)>3?"":" "}function xI(e,t){for(;--t&&dI()&&!(aI<48||aI>102||aI>57&&aI<65||aI>70&&aI<97););return pI(e,hI()+(t<6&&32==fI()&&32==dI()))}function SI(e){for(;dI();)switch(aI){case e:return oI;case 34:case 39:34!==e&&39!==e&&SI(aI);break;case 40:41===e&&SI(e);break;case 92:dI()}return oI}function wI(e,t){for(;dI()&&e+aI!==57&&(e+aI!==84||47!==fI()););return"/*"+pI(t,oI-1)+"*"+U_(47===e?e:dI())}function MI(e){for(;!mI(fI());)dI();return pI(e,oI)}function kI(e){return yI(CI("",null,null,null,[""],e=gI(e),0,[0],e))}function CI(e,t,n,r,i,o,a,s,l){for(var c=0,u=0,d=a,f=0,h=0,p=0,m=1,g=1,y=1,v=0,b="",x=i,S=o,w=r,M=b;g;)switch(p=v,v=dI()){case 40:if(108!=p&&58==J_(M,d-1)){-1!=X_(M+=G_(vI(v),"&","&\f"),"&\f")&&(y=-1);break}case 34:case 39:case 91:M+=vI(v);break;case 9:case 10:case 13:case 32:M+=bI(p);break;case 92:M+=xI(hI()-1,7);continue;case 47:switch(fI()){case 42:case 47:tI(EI(wI(dI(),hI()),t,n),l);break;default:M+="/"}break;case 123*m:s[c++]=Q_(M)*y;case 125*m:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:-1==y&&(M=G_(M,/\f/g,"")),h>0&&Q_(M)-d&&tI(h>32?DI(M+";",r,n,d-1):DI(G_(M," ","")+";",r,n,d-2),l);break;case 59:M+=";";default:if(tI(w=qI(M,t,n,c,u,i,s,b,x=[],S=[],d),o),123===v)if(0===u)CI(M,t,w,w,x,o,d,s,S);else switch(99===f&&110===J_(M,3)?100:f){case 100:case 108:case 109:case 115:CI(e,w,w,r&&tI(qI(e,w,w,0,0,i,s,b,i,x=[],d),S),i,S,d,s,r?x:S);break;default:CI(M,w,w,w,[""],S,0,s,S)}}c=u=h=0,m=y=1,b=M="",d=a;break;case 58:d=1+Q_(M),h=p;default:if(m<1)if(123==v)--m;else if(125==v&&0==m++&&125==uI())continue;switch(M+=U_(v),v*m){case 38:y=u>0?1:(M+="\f",-1);break;case 44:s[c++]=(Q_(M)-1)*y,y=1;break;case 64:45===fI()&&(M+=vI(dI())),f=fI(),u=d=Q_(b=M+=MI(hI())),v++;break;case 45:45===p&&2==Q_(M)&&(m=0)}}return o}function qI(e,t,n,r,i,o,a,s,l,c,u){for(var d=i-1,f=0===i?o:[""],h=eI(f),p=0,m=0,g=0;p<r;++p)for(var y=0,v=Z_(e,d+1,d=W_(m=a[p])),b=e;y<h;++y)(b=K_(m>0?f[y]+" "+v:G_(v,/&\f/g,f[y])))&&(l[g++]=b);return lI(e,t,n,0===i?H_:s,l,c,u)}function EI(e,t,n){return lI(e,t,n,B_,U_(aI),Z_(e,2,-2),0)}function DI(e,t,n,r){return lI(e,t,n,V_,Z_(e,0,r),Z_(e,r+1,-1),r)}function TI(e,t){for(var n="",r=eI(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function OI(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case V_:return e.return=e.return||e.value;case B_:return"";case $_:return e.return=e.value+"{"+TI(e.children,r)+"}";case H_:e.value=e.props.join(",")}return Q_(n=TI(e.children,r))?e.return=e.value+"{"+n+"}":""}function NI(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var AI=function(e,t,n){for(var r=0,i=0;r=i,i=fI(),38===r&&12===i&&(t[n]=1),!mI(i);)dI();return pI(e,oI)},_I=function(e,t){return yI(function(e,t){var n=-1,r=44;do{switch(mI(r)){case 0:38===r&&12===fI()&&(t[n]=1),e[n]+=AI(oI-1,t,n);break;case 2:e[n]+=vI(r);break;case 4:if(44===r){e[++n]=58===fI()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=U_(r)}}while(r=dI());return e}(gI(e),t))},II=new WeakMap,LI=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||II.get(n))&&!r){II.set(e,!0);for(var i=[],o=_I(t,i),a=n.props,s=0,l=0;s<o.length;s++)for(var c=0;c<a.length;c++,l++)e.props[l]=i[s]?o[s].replace(/&\f/g,a[c]):a[c]+" "+o[s]}}},PI=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function RI(e,t){switch(function(e,t){return 45^J_(e,0)?(((t<<2^J_(e,0))<<2^J_(e,1))<<2^J_(e,2))<<2^J_(e,3):0}(e,t)){case 5103:return j_+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return j_+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return j_+e+F_+e+z_+e+e;case 6828:case 4268:return j_+e+z_+e+e;case 6165:return j_+e+z_+"flex-"+e+e;case 5187:return j_+e+G_(e,/(\w+).+(:[^]+)/,j_+"box-$1$2"+z_+"flex-$1$2")+e;case 5443:return j_+e+z_+"flex-item-"+G_(e,/flex-|-self/,"")+e;case 4675:return j_+e+z_+"flex-line-pack"+G_(e,/align-content|flex-|-self/,"")+e;case 5548:return j_+e+z_+G_(e,"shrink","negative")+e;case 5292:return j_+e+z_+G_(e,"basis","preferred-size")+e;case 6060:return j_+"box-"+G_(e,"-grow","")+j_+e+z_+G_(e,"grow","positive")+e;case 4554:return j_+G_(e,/([^-])(transform)/g,"$1"+j_+"$2")+e;case 6187:return G_(G_(G_(e,/(zoom-|grab)/,j_+"$1"),/(image-set)/,j_+"$1"),e,"")+e;case 5495:case 3959:return G_(e,/(image-set\([^]*)/,j_+"$1$`$1");case 4968:return G_(G_(e,/(.+:)(flex-)?(.*)/,j_+"box-pack:$3"+z_+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+j_+e+e;case 4095:case 3583:case 4068:case 2532:return G_(e,/(.+)-inline(.+)/,j_+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Q_(e)-1-t>6)switch(J_(e,t+1)){case 109:if(45!==J_(e,t+4))break;case 102:return G_(e,/(.+:)(.+)-([^]+)/,"$1"+j_+"$2-$3$1"+F_+(108==J_(e,t+3)?"$3":"$2-$3"))+e;case 115:return~X_(e,"stretch")?RI(G_(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==J_(e,t+1))break;case 6444:switch(J_(e,Q_(e)-3-(~X_(e,"!important")&&10))){case 107:return G_(e,":",":"+j_)+e;case 101:return G_(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+j_+(45===J_(e,14)?"inline-":"")+"box$3$1"+j_+"$2$3$1"+z_+"$2box$3")+e}break;case 5936:switch(J_(e,t+11)){case 114:return j_+e+z_+G_(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return j_+e+z_+G_(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return j_+e+z_+G_(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return j_+e+z_+e+e}return e}var zI,FI,jI,BI,HI=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case V_:e.return=RI(e.value,e.length);break;case $_:return TI([cI(e,{value:G_(e.value,"@","@"+j_)})],r);case H_:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return TI([cI(e,{props:[G_(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return TI([cI(e,{props:[G_(t,/:(plac\w+)/,":"+j_+"input-$1")]}),cI(e,{props:[G_(t,/:(plac\w+)/,":-moz-$1")]}),cI(e,{props:[G_(t,/:(plac\w+)/,z_+"input-$1")]})],r)}return""})}}],VI=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var r,i,o=e.stylisPlugins||HI,a={},s=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)a[t[n]]=!0;s.push(e)});var l,c,u=[OI,(c=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&c(e)})],d=function(e){var t=eI(e);return function(n,r,i,o){for(var a="",s=0;s<t;s++)a+=e[s](n,r,i,o)||"";return a}}([LI,PI].concat(o,u));i=function(e,t,n,r){l=n,function(e){TI(kI(e),d)}(e?e+"{"+t.styles+"}":t.styles),r&&(f.inserted[t.name]=!0)};var f={key:t,sheet:new R_({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:i};return f.sheet.hydrate(s),f},$I={exports:{}},WI={};function UI(){return FI||(FI=1,$I.exports=function(){if(zI)return WI;zI=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var f=e.$$typeof;switch(f){case t:switch(e=e.type){case l:case c:case r:case o:case i:case d:return e;default:switch(e=e&&e.$$typeof){case s:case u:case p:case h:case a:return e;default:return f}}case n:return f}}}function x(e){return b(e)===c}return WI.AsyncMode=l,WI.ConcurrentMode=c,WI.ContextConsumer=s,WI.ContextProvider=a,WI.Element=t,WI.ForwardRef=u,WI.Fragment=r,WI.Lazy=p,WI.Memo=h,WI.Portal=n,WI.Profiler=o,WI.StrictMode=i,WI.Suspense=d,WI.isAsyncMode=function(e){return x(e)||b(e)===l},WI.isConcurrentMode=x,WI.isContextConsumer=function(e){return b(e)===s},WI.isContextProvider=function(e){return b(e)===a},WI.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},WI.isForwardRef=function(e){return b(e)===u},WI.isFragment=function(e){return b(e)===r},WI.isLazy=function(e){return b(e)===p},WI.isMemo=function(e){return b(e)===h},WI.isPortal=function(e){return b(e)===n},WI.isProfiler=function(e){return b(e)===o},WI.isStrictMode=function(e){return b(e)===i},WI.isSuspense=function(e){return b(e)===d},WI.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===o||e===i||e===d||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===h||e.$$typeof===a||e.$$typeof===s||e.$$typeof===u||e.$$typeof===g||e.$$typeof===y||e.$$typeof===v||e.$$typeof===m)},WI.typeOf=b,WI}()),$I.exports}!function(){if(BI)return jI;BI=1;var e=UI(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},i={};function o(n){return e.isMemo(n)?r:i[n.$$typeof]||t}i[e.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i[e.Memo]=r;var a=Object.defineProperty,s=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,c=Object.getOwnPropertyDescriptor,u=Object.getPrototypeOf,d=Object.prototype;jI=function e(t,r,i){if("string"!=typeof r){if(d){var f=u(r);f&&f!==d&&e(t,f,i)}var h=s(r);l&&(h=h.concat(l(r)));for(var p=o(t),m=o(r),g=0;g<h.length;++g){var y=h[g];if(!(n[y]||i&&i[y]||m&&m[y]||p&&p[y])){var v=c(r,y);try{a(t,y,v)}catch(e){}}}}return t}}();function YI(e,t,n){var r="";return n.split(" ").forEach(function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")}),r}var KI=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},GI=function(e,t,n){KI(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i=t;do{e.insert(t===i?"."+r:"",i,e.sheet,!0),i=i.next}while(void 0!==i)}};var XI={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},JI=/[A-Z]|^ms/g,ZI=/_EMO_([^_]+?)_([^]*?)_EMO_/g,QI=function(e){return 45===e.charCodeAt(1)},eL=function(e){return null!=e&&"boolean"!=typeof e},tL=NI(function(e){return QI(e)?e:e.replace(JI,"-$&").toLowerCase()}),nL=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(ZI,function(e,t,n){return iL={name:t,styles:n,next:iL},t})}return 1===XI[e]||QI(e)||"number"!=typeof t||0===t?t:t+"px"};function rL(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var i=n;if(1===i.anim)return iL={name:i.name,styles:i.styles,next:iL},i.name;var o=n;if(void 0!==o.styles){var a=o.next;if(void 0!==a)for(;void 0!==a;)iL={name:a.name,styles:a.styles,next:iL},a=a.next;return o.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=rL(e,t,n[i])+";";else for(var o in n){var a=n[o];if("object"!=typeof a){var s=a;null!=t&&void 0!==t[s]?r+=o+"{"+t[s]+"}":eL(s)&&(r+=tL(o)+":"+nL(o,s)+";")}else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var l=rL(e,t,a);switch(o){case"animation":case"animationName":r+=tL(o)+":"+l+";";break;default:r+=o+"{"+l+"}"}}else for(var c=0;c<a.length;c++)eL(a[c])&&(r+=tL(o)+":"+nL(o,a[c])+";")}return r}(e,t,n);case"function":if(void 0!==e){var s=iL,l=n(e);return iL=s,rL(e,t,l)}}var c=n;if(null==t)return c;var u=t[c];return void 0!==u?u:c}var iL,oL=/label:\s*([^\s;{]+)\s*(;|$)/g;function aL(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,i="";iL=void 0;var o=e[0];null==o||void 0===o.raw?(r=!1,i+=rL(n,t,o)):i+=o[0];for(var a=1;a<e.length;a++){if(i+=rL(n,t,e[a]),r)i+=o[a]}oL.lastIndex=0;for(var s,l="";null!==(s=oL.exec(i));)l+="-"+s[1];var c=function(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(i)+l;return{name:c,styles:i,next:iL}}var sL,lL,cL=!!JA.useInsertionEffect&&JA.useInsertionEffect,uL=cL||function(e){return e()},dL=cL||GA.useLayoutEffect,fL=GA.createContext("undefined"!=typeof HTMLElement?VI({key:"css"}):null),hL=fL.Provider,pL=function(e){return GA.forwardRef(function(t,n){var r=GA.useContext(fL);return e(t,r,n)})},mL=GA.createContext({}),gL={}.hasOwnProperty,yL="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",vL=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return KI(t,n,r),uL(function(){return GI(t,n,r)}),null},bL=pL(function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var i=e[yL],o=[r],a="";"string"==typeof e.className?a=YI(t.registered,o,e.className):null!=e.className&&(a=e.className+" ");var s=aL(o,void 0,GA.useContext(mL));a+=t.key+"-"+s.name;var l={};for(var c in e)gL.call(e,c)&&"css"!==c&&c!==yL&&(l[c]=e[c]);return l.className=a,n&&(l.ref=n),GA.createElement(GA.Fragment,null,GA.createElement(vL,{cache:t,serialized:s,isStringTag:"string"==typeof i}),GA.createElement(i,l))}),xL=function(e,t){var n=arguments;if(null==t||!gL.call(t,"css"))return GA.createElement.apply(void 0,n);var r=n.length,i=new Array(r);i[0]=bL,i[1]=function(e,t){var n={};for(var r in t)gL.call(t,r)&&(n[r]=t[r]);return n[yL]=e,n}(e,t);for(var o=2;o<r;o++)i[o]=n[o];return GA.createElement.apply(null,i)};sL=xL||(xL={}),lL||(lL=sL.JSX||(sL.JSX={}));var SL=pL(function(e,t){var n=aL([e.styles],void 0,GA.useContext(mL)),r=GA.useRef();return dL(function(){var e=t.key+"-global",i=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),o=!1,a=document.querySelector('style[data-emotion="'+e+" "+n.name+'"]');return t.sheet.tags.length&&(i.before=t.sheet.tags[0]),null!==a&&(o=!0,a.setAttribute("data-emotion",e),i.hydrate([a])),r.current=[i,o],function(){i.flush()}},[t]),dL(function(){var e=r.current,i=e[0];if(e[1])e[1]=!1;else{if(void 0!==n.next&&GI(t,n.next,!0),i.tags.length){var o=i.tags[i.tags.length-1].nextElementSibling;i.before=o,i.flush()}t.insert("",n,i,!1)}},[t,n.name]),null});function wL(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return aL(t)}function ML(){var e=wL.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}var kL=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,CL=NI(function(e){return kL.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}),qL=function(e){return"theme"!==e},EL=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?CL:qL},DL=function(e,t,n){var r;if(t){var i=t.shouldForwardProp;r=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},TL=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return KI(t,n,r),uL(function(){return GI(t,n,r)}),null},OL=function e(t,n){var r,i,o=t.__emotion_real===t,a=o&&t.__emotion_base||t;void 0!==n&&(r=n.label,i=n.target);var s=DL(t,n,o),l=s||EL(a),c=!l("as");return function(){var u=arguments,d=o&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&d.push("label:"+r+";"),null==u[0]||void 0===u[0].raw)d.push.apply(d,u);else{var f=u[0];d.push(f[0]);for(var h=u.length,p=1;p<h;p++)d.push(u[p],f[p])}var m=pL(function(e,t,n){var r=c&&e.as||a,o="",u=[],f=e;if(null==e.theme){for(var h in f={},e)f[h]=e[h];f.theme=GA.useContext(mL)}"string"==typeof e.className?o=YI(t.registered,u,e.className):null!=e.className&&(o=e.className+" ");var p=aL(d.concat(u),t.registered,f);o+=t.key+"-"+p.name,void 0!==i&&(o+=" "+i);var m=c&&void 0===s?EL(r):l,g={};for(var y in e)c&&"as"===y||m(y)&&(g[y]=e[y]);return g.className=o,n&&(g.ref=n),GA.createElement(GA.Fragment,null,GA.createElement(TL,{cache:t,serialized:p,isStringTag:"string"==typeof r}),GA.createElement(r,g))});return m.displayName=void 0!==r?r:"Styled("+("string"==typeof a?a:a.displayName||a.name||"Component")+")",m.defaultProps=t.defaultProps,m.__emotion_real=m,m.__emotion_base=a,m.__emotion_styles=d,m.__emotion_forwardProp=s,Object.defineProperty(m,"toString",{value:function(){return"."+i}}),m.withComponent=function(t,r){return e(t,L_({},n,r,{shouldForwardProp:DL(m,r,!0)})).apply(void 0,d)},m}}.bind(null);["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach(function(e){OL[e]=OL(e)});var NL,AL,_L={exports:{}},IL={};var LL=(AL||(AL=1,_L.exports=function(){if(NL)return IL;NL=1;var e=KA(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function a(e,n,a){var s,l={},c=null,u=null;for(s in void 0!==a&&(c=""+a),void 0!==n.key&&(c=""+n.key),void 0!==n.ref&&(u=n.ref),n)r.call(n,s)&&!o.hasOwnProperty(s)&&(l[s]=n[s]);if(e&&e.defaultProps)for(s in n=e.defaultProps)void 0===l[s]&&(l[s]=n[s]);return{$$typeof:t,type:e,key:c,ref:u,props:l,_owner:i.current}}return IL.Fragment=n,IL.jsx=a,IL.jsxs=a,IL}()),_L.exports);const PL=new Map;function RL(e){const{styles:t,defaultTheme:n={}}=e,r="function"==typeof t?e=>{return t(null==(r=e)||0===Object.keys(r).length?n:e);var r}:t;return LL.jsx(SL,{styles:r})}
|
|
19
19
|
/**
|
|
20
20
|
* @mui/styled-engine v5.18.0
|
|
21
21
|
*
|
|
@@ -106,4 +106,4 @@ e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,i,o,a,s,l,c,u,d,f=e.le
|
|
|
106
106
|
}
|
|
107
107
|
`),XF.rippleVisible,rj,550,({theme:e})=>e.transitions.easing.easeInOut,XF.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,XF.child,XF.childLeaving,ij,550,({theme:e})=>e.transitions.easing.easeInOut,XF.childPulsate,oj,({theme:e})=>e.transitions.easing.easeInOut),lj=GA.forwardRef(function(e,t){const n=dF({props:e,name:"MuiTouchRipple"}),{center:r=!1,classes:i={},className:o}=n,a=P_(n,JF),[s,l]=GA.useState([]),c=GA.useRef(0),u=GA.useRef(null);GA.useEffect(()=>{u.current&&(u.current(),u.current=null)},[s]);const d=GA.useRef(!1),f=FR(),h=GA.useRef(null),p=GA.useRef(null),m=GA.useCallback(e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:o,cb:a}=e;l(e=>[...e,LL.jsx(sj,{classes:{ripple:lR(i.ripple,XF.ripple),rippleVisible:lR(i.rippleVisible,XF.rippleVisible),ripplePulsate:lR(i.ripplePulsate,XF.ripplePulsate),child:lR(i.child,XF.child),childLeaving:lR(i.childLeaving,XF.childLeaving),childPulsate:lR(i.childPulsate,XF.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:o},c.current)]),c.current+=1,u.current=a},[i]),g=GA.useCallback((e={},t={},n=()=>{})=>{const{pulsate:i=!1,center:o=r||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&d.current)return void(d.current=!1);"touchstart"===(null==e?void 0:e.type)&&(d.current=!0);const s=a?null:p.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,g;if(o||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(l.width/2),u=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-l.left),u=Math.round(n-l.top)}if(o)g=Math.sqrt((2*l.width**2+l.height**2)/3),g%2==0&&(g+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-u),u)+2;g=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===h.current&&(h.current=()=>{m({pulsate:i,rippleX:c,rippleY:u,rippleSize:g,cb:n})},f.start(80,()=>{h.current&&(h.current(),h.current=null)})):m({pulsate:i,rippleX:c,rippleY:u,rippleSize:g,cb:n})},[r,m,f]),y=GA.useCallback(()=>{g({},{pulsate:!0})},[g]),v=GA.useCallback((e,t)=>{if(f.clear(),"touchend"===(null==e?void 0:e.type)&&h.current)return h.current(),h.current=null,void f.start(0,()=>{v(e,t)});h.current=null,l(e=>e.length>0?e.slice(1):e),u.current=t},[f]);return GA.useImperativeHandle(t,()=>({pulsate:y,start:g,stop:v}),[y,g,v]),LL.jsx(aj,L_({className:lR(XF.root,i.root,o),ref:p},a,{children:LL.jsx(VF,{component:null,exit:!0,children:s})}))});function cj(e){return uR("MuiButtonBase",e)}const uj=dR("MuiButtonBase",["root","disabled","focusVisible"]),dj=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],fj=sF("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${uj.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),hj=GA.forwardRef(function(e,t){const n=dF({props:e,name:"MuiButtonBase"}),{action:r,centerRipple:i=!1,children:o,className:a,component:s="button",disabled:l=!1,disableRipple:c=!1,disableTouchRipple:u=!1,focusRipple:d=!1,LinkComponent:f="a",onBlur:h,onClick:p,onContextMenu:m,onDragLeave:g,onFocus:y,onFocusVisible:v,onKeyDown:b,onKeyUp:x,onMouseDown:S,onMouseLeave:w,onMouseUp:M,onTouchEnd:k,onTouchMove:C,onTouchStart:q,tabIndex:E=0,TouchRippleProps:D,touchRippleRef:T,type:O}=n,N=P_(n,dj),A=GA.useRef(null),_=GA.useRef(null),I=LR(_,T),{isFocusVisibleRef:L,onFocus:P,onBlur:R,ref:z}=KR(),[F,j]=GA.useState(!1);l&&F&&j(!1),GA.useImperativeHandle(r,()=>({focusVisible:()=>{j(!0),A.current.focus()}}),[]);const[B,H]=GA.useState(!1);GA.useEffect(()=>{H(!0)},[]);const V=B&&!c&&!l;function $(e,t,n=u){return IR(r=>{t&&t(r);return!n&&_.current&&_.current[e](r),!0})}GA.useEffect(()=>{F&&d&&!c&&B&&_.current.pulsate()},[c,d,F,B]);const W=$("start",S),U=$("stop",m),Y=$("stop",g),K=$("stop",M),G=$("stop",e=>{F&&e.preventDefault(),w&&w(e)}),X=$("start",q),J=$("stop",k),Z=$("stop",C),Q=$("stop",e=>{R(e),!1===L.current&&j(!1),h&&h(e)},!1),ee=IR(e=>{A.current||(A.current=e.currentTarget),P(e),!0===L.current&&(j(!0),v&&v(e)),y&&y(e)}),te=()=>{const e=A.current;return s&&"button"!==s&&!("A"===e.tagName&&e.href)},ne=GA.useRef(!1),re=IR(e=>{d&&!ne.current&&F&&_.current&&" "===e.key&&(ne.current=!0,_.current.stop(e,()=>{_.current.start(e)})),e.target===e.currentTarget&&te()&&" "===e.key&&e.preventDefault(),b&&b(e),e.target===e.currentTarget&&te()&&"Enter"===e.key&&!l&&(e.preventDefault(),p&&p(e))}),ie=IR(e=>{d&&" "===e.key&&_.current&&F&&!e.defaultPrevented&&(ne.current=!1,_.current.stop(e,()=>{_.current.pulsate(e)})),x&&x(e),p&&e.target===e.currentTarget&&te()&&" "===e.key&&!e.defaultPrevented&&p(e)});let oe=s;"button"===oe&&(N.href||N.to)&&(oe=f);const ae={};"button"===oe?(ae.type=void 0===O?"button":O,ae.disabled=l):(N.href||N.to||(ae.role="button"),l&&(ae["aria-disabled"]=l));const se=LR(t,z,A),le=L_({},n,{centerRipple:i,component:s,disabled:l,disableRipple:c,disableTouchRipple:u,focusRipple:d,tabIndex:E,focusVisible:F}),ce=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,o=GR({root:["root",t&&"disabled",n&&"focusVisible"]},cj,i);return n&&r&&(o.root+=` ${r}`),o})(le);return LL.jsxs(fj,L_({as:oe,className:lR(ce.root,a),ownerState:le,onBlur:Q,onClick:p,onContextMenu:U,onFocus:ee,onKeyDown:re,onKeyUp:ie,onMouseDown:W,onMouseLeave:G,onMouseUp:K,onDragLeave:Y,onTouchEnd:J,onTouchMove:Z,onTouchStart:X,ref:se,tabIndex:l?-1:E,type:O},ae,N,{children:[o,V?LL.jsx(lj,L_({ref:I,center:i},D)):null]}))});function pj(e){return uR("MuiTypography",e)}dR("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const mj=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],gj=sF("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t[`align${QL(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(({theme:e,ownerState:t})=>L_({margin:0},"inherit"===t.variant&&{font:"inherit"},"inherit"!==t.variant&&e.typography[t.variant],"inherit"!==t.align&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),yj={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},vj={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},bj=GA.forwardRef(function(e,t){const n=dF({props:e,name:"MuiTypography"}),r=(e=>vj[e]||e)(n.color),i=rR(L_({},n,{color:r})),{align:o="inherit",className:a,component:s,gutterBottom:l=!1,noWrap:c=!1,paragraph:u=!1,variant:d="body1",variantMapping:f=yj}=i,h=P_(i,mj),p=L_({},i,{align:o,color:r,className:a,component:s,gutterBottom:l,noWrap:c,paragraph:u,variant:d,variantMapping:f}),m=s||(u?"p":f[d]||yj[d])||"span",g=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:o,classes:a}=e;return GR({root:["root",o,"inherit"!==e.align&&`align${QL(t)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]},pj,a)})(p);return LL.jsx(gj,L_({as:m,ref:t,ownerState:p,className:lR(g.root,a)},h))});const xj=GA.forwardRef(function(e,t){const{children:n,container:r,disablePortal:i=!1}=e,[o,a]=GA.useState(null),s=LR(GA.isValidElement(n)?tz(n):null,t);if(CR(()=>{i||a(function(e){return"function"==typeof e?e():e}(r)||document.body)},[r,i]),CR(()=>{if(o&&!i)return OR(t,o),()=>{OR(t,null)}},[t,o,i]),i){if(GA.isValidElement(n)){const e={ref:s};return GA.cloneElement(n,e)}return LL.jsx(GA.Fragment,{children:n})}return LL.jsx(GA.Fragment,{children:o?DF.createPortal(n,o):o})}),Sj=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],wj={entering:{opacity:1},entered:{opacity:1}},Mj=GA.forwardRef(function(e,t){const n=Uz(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:i,appear:o=!0,children:a,easing:s,in:l,onEnter:c,onEntered:u,onEntering:d,onExit:f,onExited:h,onExiting:p,style:m,timeout:g=r,TransitionComponent:y=RF}=e,v=P_(e,Sj),b=GA.useRef(null),x=LR(b,tz(a),t),S=e=>t=>{if(e){const n=b.current;void 0===t?e(n):e(n,t)}},w=S(d),M=S((e,t)=>{$F(e);const r=WF({style:m,timeout:g,easing:s},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",r),e.style.transition=n.transitions.create("opacity",r),c&&c(e,t)}),k=S(u),C=S(p),q=S(e=>{const t=WF({style:m,timeout:g,easing:s},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),f&&f(e)}),E=S(h);return LL.jsx(y,L_({appear:o,in:l,nodeRef:b,onEnter:M,onEntered:k,onEntering:w,onExit:q,onExited:E,onExiting:C,addEndListener:e=>{i&&i(b.current,e)},timeout:g},v,{children:(e,t)=>GA.cloneElement(a,L_({style:L_({opacity:0,visibility:"exited"!==e||l?void 0:"hidden"},wj[e],m,a.props.style),ref:x},t))}))});function kj(e){return uR("MuiBackdrop",e)}dR("MuiBackdrop",["root","invisible"]);const Cj=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],qj=sF("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(({ownerState:e})=>L_({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})),Ej=GA.forwardRef(function(e,t){var n,r,i;const o=dF({props:e,name:"MuiBackdrop"}),{children:a,className:s,component:l="div",components:c={},componentsProps:u={},invisible:d=!1,open:f,slotProps:h={},slots:p={},TransitionComponent:m=Mj,transitionDuration:g}=o,y=P_(o,Cj),v=L_({},o,{component:l,invisible:d}),b=(e=>{const{classes:t,invisible:n}=e;return GR({root:["root",n&&"invisible"]},kj,t)})(v),x=null!=(n=h.root)?n:u.root;return LL.jsx(m,L_({in:f,timeout:g},y,{children:LL.jsx(qj,L_({"aria-hidden":!0},x,{as:null!=(r=null!=(i=p.root)?i:c.Root)?r:l,className:lR(b.root,s,null==x?void 0:x.className),ownerState:L_({},v,null==x?void 0:x.ownerState),classes:b,ref:t,children:a}))}))});function Dj(e){return uR("MuiButton",e)}const Tj=dR("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),Oj=GA.createContext({}),Nj=GA.createContext(void 0),Aj=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],_j=e=>L_({},"small"===e.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===e.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===e.size&&{"& > *:nth-of-type(1)":{fontSize:22}}),Ij=sF(hj,{shouldForwardProp:e=>aF(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${QL(n.color)}`],t[`size${QL(n.size)}`],t[`${n.variant}Size${QL(n.size)}`],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})(({theme:e,ownerState:t})=>{var n,r;const i="light"===e.palette.mode?e.palette.grey[300]:e.palette.grey[800],o="light"===e.palette.mode?e.palette.grey.A100:e.palette.grey[700];return L_({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":L_({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:Mz.alpha(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===t.variant&&"inherit"!==t.color&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Mz.alpha(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===t.variant&&"inherit"!==t.color&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Mz.alpha(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===t.variant&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:o,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},"contained"===t.variant&&"inherit"!==t.color&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":L_({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${Tj.focusVisible}`]:L_({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${Tj.disabled}`]:L_({color:(e.vars||e).palette.action.disabled},"outlined"===t.variant&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"contained"===t.variant&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},"text"===t.variant&&{padding:"6px 8px"},"text"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main},"outlined"===t.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${Mz.alpha(e.palette[t.color].main,.5)}`},"contained"===t.variant&&{color:e.vars?e.vars.palette.text.primary:null==(n=(r=e.palette).getContrastText)?void 0:n.call(r,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:i,boxShadow:(e.vars||e).shadows[2]},"contained"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},"inherit"===t.color&&{color:"inherit",borderColor:"currentColor"},"small"===t.size&&"text"===t.variant&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"text"===t.variant&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"outlined"===t.variant&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"outlined"===t.variant&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"contained"===t.variant&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"contained"===t.variant&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})},({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${Tj.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${Tj.disabled}`]:{boxShadow:"none"}}),Lj=sF("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${QL(n.size)}`]]}})(({ownerState:e})=>L_({display:"inherit",marginRight:8,marginLeft:-4},"small"===e.size&&{marginLeft:-2},_j(e))),Pj=sF("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${QL(n.size)}`]]}})(({ownerState:e})=>L_({display:"inherit",marginRight:-4,marginLeft:8},"small"===e.size&&{marginRight:-2},_j(e))),Rj=GA.forwardRef(function(e,t){const n=GA.useContext(Oj),r=GA.useContext(Nj),i=dF({props:kR(n,e),name:"MuiButton"}),{children:o,color:a="primary",component:s="button",className:l,disabled:c=!1,disableElevation:u=!1,disableFocusRipple:d=!1,endIcon:f,focusVisibleClassName:h,fullWidth:p=!1,size:m="medium",startIcon:g,type:y,variant:v="text"}=i,b=P_(i,Aj),x=L_({},i,{color:a,component:s,disabled:c,disableElevation:u,disableFocusRipple:d,fullWidth:p,size:m,type:y,variant:v}),S=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:i,variant:o,classes:a}=e;return L_({},a,GR({root:["root",o,`${o}${QL(t)}`,`size${QL(i)}`,`${o}Size${QL(i)}`,`color${QL(t)}`,n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${QL(i)}`],endIcon:["icon","endIcon",`iconSize${QL(i)}`]},Dj,a))})(x),w=g&&LL.jsx(Lj,{className:S.startIcon,ownerState:x,children:g}),M=f&&LL.jsx(Pj,{className:S.endIcon,ownerState:x,children:f}),k=r||"";return LL.jsxs(Ij,L_({ownerState:x,className:lR(n.className,S.root,l,k),component:s,disabled:c,focusRipple:!d,focusVisibleClassName:lR(S.focusVisible,h),ref:t,type:y},b,{classes:S,children:[w,o,M]}))});function zj(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function Fj(e){return parseInt(TR(e).getComputedStyle(e).paddingRight,10)||0}function jj(e,t,n,r,i){const o=[t,n,...r];[].forEach.call(e.children,e=>{const t=-1===o.indexOf(e),n=!function(e){const t=-1!==["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&zj(e,i)})}function Bj(e,t){let n=-1;return e.some((e,r)=>!!t(e)&&(n=r,!0)),n}function Hj(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=DR(e);return t.body===e?TR(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=function(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}(DR(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${Fj(r)+e}px`;const t=DR(r).querySelectorAll(".mui-fixed");[].forEach.call(t,t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${Fj(t)+e}px`})}let e;if(r.parentNode instanceof DocumentFragment)e=DR(r).body;else{const t=r.parentElement,n=TR(r);e="HTML"===(null==t?void 0:t.nodeName)&&"scroll"===n.getComputedStyle(t).overflowY?t:r}n.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{n.forEach(({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)})}}const Vj=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function $j(e){const t=[],n=[];return Array.from(e.querySelectorAll(Vj)).forEach((e,r)=>{const i=function(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==i&&function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}(e))}(e)&&(0===i?t.push(e):n.push({documentOrder:r,tabIndex:i,node:e}))}),n.sort((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex).map(e=>e.node).concat(t)}function Wj(){return!0}function Uj(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:o=$j,isEnabled:a=Wj,open:s}=e,l=GA.useRef(!1),c=GA.useRef(null),u=GA.useRef(null),d=GA.useRef(null),f=GA.useRef(null),h=GA.useRef(!1),p=GA.useRef(null),m=LR(tz(t),p),g=GA.useRef(null);GA.useEffect(()=>{s&&p.current&&(h.current=!n)},[n,s]),GA.useEffect(()=>{if(!s||!p.current)return;const e=DR(p.current);return p.current.contains(e.activeElement)||(p.current.hasAttribute("tabIndex")||p.current.setAttribute("tabIndex","-1"),h.current&&p.current.focus()),()=>{i||(d.current&&d.current.focus&&(l.current=!0,d.current.focus()),d.current=null)}},[s]),GA.useEffect(()=>{if(!s||!p.current)return;const e=DR(p.current),t=t=>{g.current=t,!r&&a()&&"Tab"===t.key&&e.activeElement===p.current&&t.shiftKey&&(l.current=!0,u.current&&u.current.focus())},n=()=>{const t=p.current;if(null===t)return;if(!e.hasFocus()||!a()||l.current)return void(l.current=!1);if(t.contains(e.activeElement))return;if(r&&e.activeElement!==c.current&&e.activeElement!==u.current)return;if(e.activeElement!==f.current)f.current=null;else if(null!==f.current)return;if(!h.current)return;let n=[];if(e.activeElement!==c.current&&e.activeElement!==u.current||(n=o(p.current)),n.length>0){var i,s;const e=Boolean((null==(i=g.current)?void 0:i.shiftKey)&&"Tab"===(null==(s=g.current)?void 0:s.key)),t=n[0],r=n[n.length-1];"string"!=typeof t&&"string"!=typeof r&&(e?r.focus():t.focus())}else t.focus()};e.addEventListener("focusin",n),e.addEventListener("keydown",t,!0);const i=setInterval(()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&n()},50);return()=>{clearInterval(i),e.removeEventListener("focusin",n),e.removeEventListener("keydown",t,!0)}},[n,r,i,a,s,o]);const y=e=>{null===d.current&&(d.current=e.relatedTarget),h.current=!0};return LL.jsxs(GA.Fragment,{children:[LL.jsx("div",{tabIndex:s?0:-1,onFocus:y,ref:c,"data-testid":"sentinelStart"}),GA.cloneElement(t,{ref:m,onFocus:e=>{null===d.current&&(d.current=e.relatedTarget),h.current=!0,f.current=e.target;const n=t.props.onFocus;n&&n(e)}}),LL.jsx("div",{tabIndex:s?0:-1,onFocus:y,ref:u,"data-testid":"sentinelEnd"})]})}const Yj=new class{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&zj(e.modalRef,!1);const r=function(e){const t=[];return[].forEach.call(e.children,e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)}),t}(t);jj(t,e.mount,e.modalRef,r,!0);const i=Bj(this.containers,e=>e.container===t);return-1!==i?(this.containers[i].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n)}mount(e,t){const n=Bj(this.containers,t=>-1!==t.modals.indexOf(e)),r=this.containers[n];r.restore||(r.restore=Hj(r,t))}remove(e,t=!0){const n=this.modals.indexOf(e);if(-1===n)return n;const r=Bj(this.containers,t=>-1!==t.modals.indexOf(e)),i=this.containers[r];if(i.modals.splice(i.modals.indexOf(e),1),this.modals.splice(n,1),0===i.modals.length)i.restore&&i.restore(),e.modalRef&&zj(e.modalRef,t),jj(i.container,e.mount,e.modalRef,i.hiddenSiblings,!1),this.containers.splice(r,1);else{const e=i.modals[i.modals.length-1];e.modalRef&&zj(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function Kj(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=Yj,closeAfterTransition:o=!1,onTransitionEnter:a,onTransitionExited:s,children:l,onClose:c,open:u,rootRef:d}=e,f=GA.useRef({}),h=GA.useRef(null),p=GA.useRef(null),m=LR(p,d),[g,y]=GA.useState(!u),v=function(e){return!!e&&e.props.hasOwnProperty("in")}(l);let b=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(b=!1);const x=()=>(f.current.modalRef=p.current,f.current.mount=h.current,f.current),S=()=>{i.mount(x(),{disableScrollLock:r}),p.current&&(p.current.scrollTop=0)},w=IR(()=>{const e=function(e){return"function"==typeof e?e():e}(t)||DR(h.current).body;i.add(x(),e),p.current&&S()}),M=GA.useCallback(()=>i.isTopModal(x()),[i]),k=IR(e=>{h.current=e,e&&(u&&M()?S():p.current&&zj(p.current,b))}),C=GA.useCallback(()=>{i.remove(x(),b)},[b,i]);GA.useEffect(()=>()=>{C()},[C]),GA.useEffect(()=>{u?w():v&&o||C()},[u,C,v,o,w]);const q=e=>t=>{var r;null==(r=e.onKeyDown)||r.call(e,t),"Escape"===t.key&&229!==t.which&&M()&&(n||(t.stopPropagation(),c&&c(t,"escapeKeyDown")))},E=e=>t=>{var n;null==(n=e.onClick)||n.call(e,t),t.target===t.currentTarget&&c&&c(t,"backdropClick")};return{getRootProps:(t={})=>{const n=JR(e);delete n.onTransitionEnter,delete n.onTransitionExited;const r=L_({},n,t);return L_({role:"presentation"},r,{onKeyDown:q(r),ref:m})},getBackdropProps:(e={})=>L_({"aria-hidden":!0},e,{onClick:E(e),open:u}),getTransitionProps:()=>({onEnter:ER(()=>{y(!1),a&&a()},null==l?void 0:l.props.onEnter),onExited:ER(()=>{y(!0),s&&s(),o&&C()},null==l?void 0:l.props.onExited)}),rootRef:m,portalRef:k,isTopModal:M,exited:g,hasTransition:v}}function Gj(e){return uR("MuiModal",e)}dR("MuiModal",["root","hidden","backdrop"]);const Xj=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],Jj=sF("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(({theme:e,ownerState:t})=>L_({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),Zj=sF(Ej,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),Qj=GA.forwardRef(function(e,t){var n,r,i,o,a,s;const l=dF({name:"MuiModal",props:e}),{BackdropComponent:c=Zj,BackdropProps:u,className:d,closeAfterTransition:f=!1,children:h,container:p,component:m,components:g={},componentsProps:y={},disableAutoFocus:v=!1,disableEnforceFocus:b=!1,disableEscapeKeyDown:x=!1,disablePortal:S=!1,disableRestoreFocus:w=!1,disableScrollLock:M=!1,hideBackdrop:k=!1,keepMounted:C=!1,onBackdropClick:q,open:E,slotProps:D,slots:T}=l,O=P_(l,Xj),N=L_({},l,{closeAfterTransition:f,disableAutoFocus:v,disableEnforceFocus:b,disableEscapeKeyDown:x,disablePortal:S,disableRestoreFocus:w,disableScrollLock:M,hideBackdrop:k,keepMounted:C}),{getRootProps:A,getBackdropProps:_,getTransitionProps:I,portalRef:L,isTopModal:P,exited:R,hasTransition:z}=Kj(L_({},N,{rootRef:t})),F=L_({},N,{exited:R}),j=(e=>{const{open:t,exited:n,classes:r}=e;return GR({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},Gj,r)})(F),B={};if(void 0===h.props.tabIndex&&(B.tabIndex="-1"),z){const{onEnter:e,onExited:t}=I();B.onEnter=e,B.onExited=t}const H=null!=(n=null!=(r=null==T?void 0:T.root)?r:g.Root)?n:Jj,V=null!=(i=null!=(o=null==T?void 0:T.backdrop)?o:g.Backdrop)?i:c,$=null!=(a=null==D?void 0:D.root)?a:y.root,W=null!=(s=null==D?void 0:D.backdrop)?s:y.backdrop,U=ez({elementType:H,externalSlotProps:$,externalForwardedProps:O,getSlotProps:A,additionalProps:{ref:t,as:m},ownerState:F,className:lR(d,null==$?void 0:$.className,null==j?void 0:j.root,!F.open&&F.exited&&(null==j?void 0:j.hidden))}),Y=ez({elementType:V,externalSlotProps:W,additionalProps:u,getSlotProps:e=>_(L_({},e,{onClick:t=>{q&&q(t),null!=e&&e.onClick&&e.onClick(t)}})),className:lR(null==W?void 0:W.className,null==u?void 0:u.className,null==j?void 0:j.backdrop),ownerState:F});return C||E||z&&!R?LL.jsx(xj,{ref:L,container:p,disablePortal:S,children:LL.jsxs(H,L_({},U,{children:[!k&&c?LL.jsx(V,L_({},Y)):null,LL.jsx(Uj,{disableEnforceFocus:b,disableAutoFocus:v,disableRestoreFocus:w,isEnabled:P,open:E,children:GA.cloneElement(h,B)})]}))}):null});function eB(e){return uR("MuiDivider",e)}dR("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);const tB=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],nB=sF("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,"vertical"===n.orientation&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&"vertical"===n.orientation&&t.withChildrenVertical,"right"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignRight,"left"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignLeft]}})(({theme:e,ownerState:t})=>L_({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin"},t.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},t.light&&{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:Mz.alpha(e.palette.divider,.08)},"inset"===t.variant&&{marginLeft:72},"middle"===t.variant&&"horizontal"===t.orientation&&{marginLeft:e.spacing(2),marginRight:e.spacing(2)},"middle"===t.variant&&"vertical"===t.orientation&&{marginTop:e.spacing(1),marginBottom:e.spacing(1)},"vertical"===t.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},t.flexItem&&{alignSelf:"stretch",height:"auto"}),({ownerState:e})=>L_({},e.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}),({theme:e,ownerState:t})=>L_({},t.children&&"vertical"!==t.orientation&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}}),({theme:e,ownerState:t})=>L_({},t.children&&"vertical"===t.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}}),({ownerState:e})=>L_({},"right"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})),rB=sF("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,"vertical"===n.orientation&&t.wrapperVertical]}})(({theme:e,ownerState:t})=>L_({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`},"vertical"===t.orientation&&{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`})),iB=GA.forwardRef(function(e,t){const n=dF({props:e,name:"MuiDivider"}),{absolute:r=!1,children:i,className:o,component:a=(i?"div":"hr"),flexItem:s=!1,light:l=!1,orientation:c="horizontal",role:u=("hr"!==a?"separator":void 0),textAlign:d="center",variant:f="fullWidth"}=n,h=P_(n,tB),p=L_({},n,{absolute:r,component:a,flexItem:s,light:l,orientation:c,role:u,textAlign:d,variant:f}),m=(e=>{const{absolute:t,children:n,classes:r,flexItem:i,light:o,orientation:a,textAlign:s,variant:l}=e;return GR({root:["root",t&&"absolute",l,o&&"light","vertical"===a&&"vertical",i&&"flexItem",n&&"withChildren",n&&"vertical"===a&&"withChildrenVertical","right"===s&&"vertical"!==a&&"textAlignRight","left"===s&&"vertical"!==a&&"textAlignLeft"],wrapper:["wrapper","vertical"===a&&"wrapperVertical"]},eB,r)})(p);return LL.jsx(nB,L_({as:a,className:lR(m.root,o),role:u,ref:t,ownerState:p},h,{children:i?LL.jsx(rB,{className:m.wrapper,ownerState:p,children:i}):null}))});iB.muiSkipListHighlight=!0;const oB=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function aB(e){return`scale(${e}, ${e**2})`}const sB={entering:{opacity:1,transform:aB(1)},entered:{opacity:1,transform:"none"}},lB="undefined"!=typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),cB=GA.forwardRef(function(e,t){const{addEndListener:n,appear:r=!0,children:i,easing:o,in:a,onEnter:s,onEntered:l,onEntering:c,onExit:u,onExited:d,onExiting:f,style:h,timeout:p="auto",TransitionComponent:m=RF}=e,g=P_(e,oB),y=FR(),v=GA.useRef(),b=Uz(),x=GA.useRef(null),S=LR(x,tz(i),t),w=e=>t=>{if(e){const n=x.current;void 0===t?e(n):e(n,t)}},M=w(c),k=w((e,t)=>{$F(e);const{duration:n,delay:r,easing:i}=WF({style:h,timeout:p,easing:o},{mode:"enter"});let a;"auto"===p?(a=b.transitions.getAutoHeightDuration(e.clientHeight),v.current=a):a=n,e.style.transition=[b.transitions.create("opacity",{duration:a,delay:r}),b.transitions.create("transform",{duration:lB?a:.666*a,delay:r,easing:i})].join(","),s&&s(e,t)}),C=w(l),q=w(f),E=w(e=>{const{duration:t,delay:n,easing:r}=WF({style:h,timeout:p,easing:o},{mode:"exit"});let i;"auto"===p?(i=b.transitions.getAutoHeightDuration(e.clientHeight),v.current=i):i=t,e.style.transition=[b.transitions.create("opacity",{duration:i,delay:n}),b.transitions.create("transform",{duration:lB?i:.666*i,delay:lB?n:n||.333*i,easing:r})].join(","),e.style.opacity=0,e.style.transform=aB(.75),u&&u(e)}),D=w(d);return LL.jsx(m,L_({appear:r,in:a,nodeRef:x,onEnter:k,onEntered:C,onEntering:M,onExit:E,onExited:D,onExiting:q,addEndListener:e=>{"auto"===p&&y.start(v.current||0,e),n&&n(x.current,e)},timeout:"auto"===p?null:p},g,{children:(e,t)=>GA.cloneElement(i,L_({style:L_({opacity:0,transform:aB(.75),visibility:"exited"!==e||a?void 0:"hidden"},sB[e],h,i.props.style),ref:S},t))}))});cB.muiSupportAuto=!0;const uB=GA.createContext({});function dB(e){return uR("MuiList",e)}dR("MuiList",["root","padding","dense","subheader"]);const fB=["children","className","component","dense","disablePadding","subheader"],hB=sF("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})(({ownerState:e})=>L_({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})),pB=GA.forwardRef(function(e,t){const n=dF({props:e,name:"MuiList"}),{children:r,className:i,component:o="ul",dense:a=!1,disablePadding:s=!1,subheader:l}=n,c=P_(n,fB),u=GA.useMemo(()=>({dense:a}),[a]),d=L_({},n,{component:o,dense:a,disablePadding:s}),f=(e=>{const{classes:t,disablePadding:n,dense:r,subheader:i}=e;return GR({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},dB,t)})(d);return LL.jsx(uB.Provider,{value:u,children:LL.jsxs(hB,L_({as:o,className:lR(f.root,i),ref:t,ownerState:d},c,{children:[l,r]}))})});function mB(e){return uR("MuiListItemButton",e)}const gB=dR("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),yB=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],vB=sF(hj,{shouldForwardProp:e=>aF(e)||"classes"===e,name:"MuiListItemButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})(({theme:e,ownerState:t})=>L_({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${gB.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Mz.alpha(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${gB.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Mz.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${gB.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Mz.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Mz.alpha(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${gB.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${gB.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},"flex-start"===t.alignItems&&{alignItems:"flex-start"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.dense&&{paddingTop:4,paddingBottom:4})),bB=GA.forwardRef(function(e,t){const n=dF({props:e,name:"MuiListItemButton"}),{alignItems:r="center",autoFocus:i=!1,component:o="div",children:a,dense:s=!1,disableGutters:l=!1,divider:c=!1,focusVisibleClassName:u,selected:d=!1,className:f}=n,h=P_(n,yB),p=GA.useContext(uB),m=GA.useMemo(()=>({dense:s||p.dense||!1,alignItems:r,disableGutters:l}),[r,p.dense,s,l]),g=GA.useRef(null);CR(()=>{i&&g.current&&g.current.focus()},[i]);const y=L_({},n,{alignItems:r,dense:m.dense,disableGutters:l,divider:c,selected:d}),v=(e=>{const{alignItems:t,classes:n,dense:r,disabled:i,disableGutters:o,divider:a,selected:s}=e;return L_({},n,GR({root:["root",r&&"dense",!o&&"gutters",a&&"divider",i&&"disabled","flex-start"===t&&"alignItemsFlexStart",s&&"selected"]},mB,n))})(y),b=LR(g,t);return LL.jsx(uB.Provider,{value:m,children:LL.jsx(vB,L_({ref:b,href:h.href||h.to,component:(h.href||h.to)&&"div"===o?"button":o,focusVisibleClassName:lR(v.focusVisible,u),ownerState:y,className:lR(v.root,f)},h,{classes:v,children:a}))})});function xB(e){return uR("MuiListItemIcon",e)}dR("MuiListItemIcon",["root","alignItemsFlexStart"]);const SB=["className"],wB=sF("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"flex-start"===n.alignItems&&t.alignItemsFlexStart]}})(({theme:e,ownerState:t})=>L_({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},"flex-start"===t.alignItems&&{marginTop:8})),MB=GA.forwardRef(function(e,t){const n=dF({props:e,name:"MuiListItemIcon"}),{className:r}=n,i=P_(n,SB),o=L_({},n,{alignItems:GA.useContext(uB).alignItems}),a=(e=>{const{alignItems:t,classes:n}=e;return GR({root:["root","flex-start"===t&&"alignItemsFlexStart"]},xB,n)})(o);return LL.jsx(wB,L_({className:lR(a.root,r),ownerState:o,ref:t},i))});function kB(e){return uR("MuiListItemText",e)}const CB=dR("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),qB=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],EB=sF("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${CB.primary}`]:t.primary},{[`& .${CB.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})(({ownerState:e})=>L_({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},e.primary&&e.secondary&&{marginTop:6,marginBottom:6},e.inset&&{paddingLeft:56})),DB=GA.forwardRef(function(e,t){const n=dF({props:e,name:"MuiListItemText"}),{children:r,className:i,disableTypography:o=!1,inset:a=!1,primary:s,primaryTypographyProps:l,secondary:c,secondaryTypographyProps:u}=n,d=P_(n,qB),{dense:f}=GA.useContext(uB);let h=null!=s?s:r,p=c;const m=L_({},n,{disableTypography:o,inset:a,primary:!!h,secondary:!!p,dense:f}),g=(e=>{const{classes:t,inset:n,primary:r,secondary:i,dense:o}=e;return GR({root:["root",n&&"inset",o&&"dense",r&&i&&"multiline"],primary:["primary"],secondary:["secondary"]},kB,t)})(m);return null==h||h.type===bj||o||(h=LL.jsx(bj,L_({variant:f?"body2":"body1",className:g.primary,component:null!=l&&l.variant?void 0:"span",display:"block"},l,{children:h}))),null==p||p.type===bj||o||(p=LL.jsx(bj,L_({variant:"body2",className:g.secondary,color:"text.secondary",display:"block"},u,{children:p}))),LL.jsxs(EB,L_({className:lR(g.root,i),ownerState:m,ref:t},d,{children:[h,p]}))});function TB(e){return uR("MuiPopover",e)}dR("MuiPopover",["root","paper"]);const OB=["onEntering"],NB=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],AB=["slotProps"];function _B(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function IB(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function LB(e){return[e.horizontal,e.vertical].map(e=>"number"==typeof e?`${e}px`:e).join(" ")}function PB(e){return"function"==typeof e?e():e}const RB=sF(Qj,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),zB=sF(GF,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),FB=GA.forwardRef(function(e,t){var n,r,i;const o=dF({props:e,name:"MuiPopover"}),{action:a,anchorEl:s,anchorOrigin:l={vertical:"top",horizontal:"left"},anchorPosition:c,anchorReference:u="anchorEl",children:d,className:f,container:h,elevation:p=8,marginThreshold:m=16,open:g,PaperProps:y={},slots:v,slotProps:b,transformOrigin:x={vertical:"top",horizontal:"left"},TransitionComponent:S=cB,transitionDuration:w="auto",TransitionProps:{onEntering:M}={},disableScrollLock:k=!1}=o,C=P_(o.TransitionProps,OB),q=P_(o,NB),E=null!=(n=null==b?void 0:b.paper)?n:y,D=GA.useRef(),T=LR(D,E.ref),O=L_({},o,{anchorOrigin:l,anchorReference:u,elevation:p,marginThreshold:m,externalPaperSlotProps:E,transformOrigin:x,TransitionComponent:S,transitionDuration:w,TransitionProps:C}),N=(e=>{const{classes:t}=e;return GR({root:["root"],paper:["paper"]},TB,t)})(O),A=GA.useCallback(()=>{if("anchorPosition"===u)return c;const e=PB(s),t=(e&&1===e.nodeType?e:DR(D.current).body).getBoundingClientRect();return{top:t.top+_B(t,l.vertical),left:t.left+IB(t,l.horizontal)}},[s,l.horizontal,l.vertical,c,u]),_=GA.useCallback(e=>({vertical:_B(e,x.vertical),horizontal:IB(e,x.horizontal)}),[x.horizontal,x.vertical]),I=GA.useCallback(e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=_(t);if("none"===u)return{top:null,left:null,transformOrigin:LB(n)};const r=A();let i=r.top-n.vertical,o=r.left-n.horizontal;const a=i+t.height,l=o+t.width,c=TR(PB(s)),d=c.innerHeight-m,f=c.innerWidth-m;if(null!==m&&i<m){const e=i-m;i-=e,n.vertical+=e}else if(null!==m&&a>d){const e=a-d;i-=e,n.vertical+=e}if(null!==m&&o<m){const e=o-m;o-=e,n.horizontal+=e}else if(l>f){const e=l-f;o-=e,n.horizontal+=e}return{top:`${Math.round(i)}px`,left:`${Math.round(o)}px`,transformOrigin:LB(n)}},[s,u,A,_,m]),[L,P]=GA.useState(g),R=GA.useCallback(()=>{const e=D.current;if(!e)return;const t=I(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,P(!0)},[I]);GA.useEffect(()=>(k&&window.addEventListener("scroll",R),()=>window.removeEventListener("scroll",R)),[s,k,R]);GA.useEffect(()=>{g&&R()}),GA.useImperativeHandle(a,()=>g?{updatePosition:()=>{R()}}:null,[g,R]),GA.useEffect(()=>{if(!g)return;const e=function(e,t=166){let n;function r(...r){clearTimeout(n),n=setTimeout(()=>{e.apply(this,r)},t)}return r.clear=()=>{clearTimeout(n)},r}(()=>{R()}),t=TR(s);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}},[s,g,R]);let z=w;"auto"!==w||S.muiSupportAuto||(z=void 0);const F=h||(s?DR(PB(s)).body:void 0),j=null!=(r=null==v?void 0:v.root)?r:RB,B=null!=(i=null==v?void 0:v.paper)?i:zB,H=ez({elementType:B,externalSlotProps:L_({},E,{style:L?E.style:L_({},E.style,{opacity:0})}),additionalProps:{elevation:p,ref:T},ownerState:O,className:lR(N.paper,null==E?void 0:E.className)}),V=ez({elementType:j,externalSlotProps:(null==b?void 0:b.root)||{},externalForwardedProps:q,additionalProps:{ref:t,slotProps:{backdrop:{invisible:!0}},container:F,open:g},ownerState:O,className:lR(N.root,f)}),{slotProps:$}=V,W=P_(V,AB);return LL.jsx(j,L_({},W,!XR(j)&&{slotProps:$,disableScrollLock:k},{children:LL.jsx(S,L_({appear:!0,in:g,onEntering:(e,t)=>{M&&M(e,t),R()},onExited:()=>{P(!1)},timeout:z},C,{children:LL.jsx(B,L_({},H,{children:d}))}))}))});function jB(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function BB(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function HB(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VB(){return VB=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},VB.apply(null,arguments)}function $B(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function WB(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$B(Object(n),!0).forEach(function(t){HB(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$B(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function UB(){
|
|
108
108
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
|
|
109
|
-
var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof s?r:s,c=Object.create(l.prototype);return YB(c,"_invoke",function(n,r,i){var o,s,l,c=0,u=i||[],d=!1,f={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return o=t,s=0,l=e,f.n=n,a}};function h(n,r){for(s=n,l=r,t=0;!d&&c&&!i&&t<u.length;t++){var i,o=u[t],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=h&&((i=n<2&&h<o[1])?(s=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,u,p){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&h(u,p),s=u,l=p;(t=s<2?e:l)||!d;){o||(s?s<3?(s>1&&(f.n=-1),h(s,l)):f.n=l:f.v=l);try{if(c=2,o){if(s||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=e}else if((t=(d=f.n<0)?l:n.call(r,f))!==a)break}catch(t){o=e,s=1,l=t}finally{c=1}}return{value:t,done:d}}}(n,i,o),!0),c}var a={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][r]?t(t([][r]())):(YB(t={},r,function(){return this}),t),d=c.prototype=s.prototype=Object.create(u);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,YB(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=c,YB(d,"constructor",c),YB(c,"constructor",l),l.displayName="GeneratorFunction",YB(c,i,"GeneratorFunction"),YB(d),YB(d,i,"Generator"),YB(d,r,function(){return this}),YB(d,"toString",function(){return"[object Generator]"}),(UB=function(){return{w:o,m:f}})()}function YB(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}YB=function(e,t,n,r){function o(t,n){YB(e,t,function(e){return this._invoke(t,n,e)})}t?i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(o("next",0),o("throw",1),o("return",2))},YB(e,t,n,r)}function KB(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,c=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||JB(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 GB(e){return function(e){if(Array.isArray(e))return jB(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||JB(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 XB(e){return XB="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},XB(e)}function JB(e,t){if(e){if("string"==typeof e)return jB(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?jB(e,t):void 0}}var ZB=function(e){var t=e.className,n=e.title,r=e.path,i=e.fillRule;return XA.createElement(mF,{className:t,viewBox:"0 0 16 16",fontSize:"small",role:"img",style:{height:12,width:12}},XA.createElement("path",{d:r}),n?XA.createElement("title",null,n):void 0,i?XA.createElement("use",{fillRule:i}):void 0)},QB={STYLE:{ELLIPSIS:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},FOCUS:{boxShadow:"inset 0 0 0 2px #177FE6"},ICONS:{COLOR:{PRIMARY:"rgba(89, 89, 89)",SECONDARY:"rgba(89, 89, 89, 0.8)",DISABLED:"rgba(89, 89, 89, 0.4)"}}}},eH={L:new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),R:new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞יִײַ-ﬨשׁ-ﭏ]"),AL:new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]")},tH=function(e){return eH.R.test(e)||eH.AL.test(e)};function nH(e){for(var t,n,r=e?e.length:0,i=0;i<r;i++){if(n=t=e[i],eH.L.test(n))return"ltr";if(tH(t))return"rtl"}return"ltr"}var rH,iH,oH=sF(Rj,{shouldForwardProp:function(e){return"direction"!==e&&"padding"!==e&&"styling"!==e}})(function(e){var t=e.direction,n=e.padding,r=e.styling,i=r.fontSize,o=r.fontFamily,a=r.color;return{fontWeight:"normal",lineHeight:"normal",fontSize:"".concat(i," !important"),fontFamily:"".concat(o," !important"),color:"".concat(a," !important"),height:"100%",minWidth:"0px",maxWidth:"640px",padding:n,"&:disabled":{color:a,opacity:1},"& .MuiButton-startIcon":{margin:"ltr"===t?"0 2px":void 0},"& .MuiButton-endIcon":{margin:"rtl"===t?"0 2px":void 0}}}),aH=sF(function(e){var t=e.className;return XA.createElement(ZB,{className:t,path:"M13,7 L8,7 L13,7 L13,4.98151367 C13,2.23029964 10.7614237,0 8,0 C5.23857625,0 3,2.23029964 3,4.98151367 L3,7 L3.75,7 L3,7 L4.5,7 L4.5,5.33193359 C4.5,3.21561511 5.54860291,1.5 8,1.5 C10.4513971,1.5 11.5,3.21561511 11.5,5.33193359 L11.5,7 L12.25,7 L3,7 C2.44771525,7 2,7.44771525 2,8 L2,15 C2,15.5522847 2.44771525,16 3,16 L13,16 C13.5522847,16 14,15.5522847 14,15 L14,8 C14,7.44771525 13.5522847,7 13,7 L3,7 L13,7 Z",fillRule:"evenodd"})})(function(){return{color:QB.STYLE.ICONS.COLOR.SECONDARY,marginTop:"1px"}}),sH=sF(function(e){var t=e.className;return XA.createElement(ZB,{className:t,path:"m8 9 4.5-4.5L14 6l-4.5 4.5L8 12 2 6l1.5-1.5L8 9Z"})})(function(){return{color:QB.STYLE.ICONS.COLOR.SECONDARY,marginTop:"1px","&.disabled":{color:QB.STYLE.ICONS.COLOR.DISABLED,opacity:.6}}}),lH=function(e){var t=e.isOpen,n=e.onClick,r=e.popoverId,i=e.source,o=i.styling,a=i.info.text,s=i.layout.direction,l=i.meta,c=l.allowed,u=l.hasAlternatives,d=l.hasCyclic,f=l.hasMultiple,h=l.index,p=l.isCyclic,m=l.isLocked,g=i.resources.translator,y=i.services.focus,v=i.settings.isDisabled,b=i.state.inSelections,x=!(!c.change||!u),S=!(!c.reload||!p),w=(x||S)&&!b&&!v(),M={pointerEvents:w?"auto":"none"},k=function(e){var t=e.allowed,n=e.canChange,r=e.canReload,i=e.direction,o=e.hasCyclic,a=e.isLocked,s={top:"8px",right:"6px",bottom:"8px",left:"6px"};if(!e.hasMultiple)return"".concat(s.top," ").concat(s.right," ").concat(s.bottom," ").concat(s.left);var l=o&&t.reload;return"ltr"===i&&(a?s.left="0px":r||!n&&l?s.left="4px":n||(s.left="2px"),n||r||(s.right="0px")),"rtl"===i&&(a?s.right="0px":r||!n&&l?s.right="4px":n||(s.right="2px"),n||r||(s.left="0px")),"".concat(s.top," ").concat(s.right," ").concat(s.bottom," ").concat(s.left)}({allowed:c,canChange:x,canReload:S,direction:s,hasCyclic:d,hasMultiple:f,isLocked:m}),C=HB(HB({},"rtl"===s?"endIcon":"startIcon",m&&XA.createElement(aH,{height:12})),"rtl"===s?"startIcon":"endIcon",(x||S)&&XA.createElement(sH,{className:"".concat(b||v()?"disabled":"")})),q=GA.useRef(),E=GA.useRef();GA.useEffect(function(){t||y.shouldFor(h)&&(q.current.focus(),E.current.focusVisible())});var D=nH(a),T="Accessibility.".concat(w?"Alternative":"Normal",".Instructions");return XA.createElement(oH,VB({action:E,"aria-describedby":r,"aria-label":g.get(T),color:"inherit",direction:s,disabled:!w||v()||b,onClick:function(e){w&&n(e)},padding:k,ref:q,style:M,styling:o.title,title:a},C),XA.createElement("span",{dir:D,style:QB.STYLE.ELLIPSIS},a))},cH=function(e){var t=e.className,n=e.title;return XA.createElement(ZB,{className:t,title:n,path:"M 6 2 h 10 V 1 H 6 Z m 5 5 h 5 V 6 h -5 Z m 5 5 h -5 v -1 h 5 Z M 5 10 h 1 v 2.663 a 3.5 3.5 0 1 0 -2.922 0.036 l -0.406 0.914 A 4.501 4.501 0 1 1 7.329 13 H 9 v 1 H 5 Z"})},uH=sF(Rj,{shouldForwardProp:function(e){return"direction"!==e&&"isFirst"!==e&&"isLast"!==e&&"styling"!==e}})(function(e){var t=e.direction,n=e.isFirst,r=e.isLast,i=e.styling.color;return{fontWeight:"normal",lineHeight:"normal",color:i,height:"24px",width:"24px",padding:0,marginLeft:"ltr"!==t||n?void 0:"4px",marginRight:"rtl"!==t||r?void 0:"4px","&:disabled":{color:i,opacity:1}}}),dH=sF(cH,{shouldForwardProp:function(e){return"direction"!==e&&"isFirst"!==e&&"isLast"!==e}})(function(e){var t=e.direction,n=e.isFirst,r=e.isLast;return{color:QB.STYLE.ICONS.COLOR.PRIMARY,marginTop:"1px",marginLeft:"ltr"!==t||n?void 0:"4px",marginRight:"rtl"!==t||r?void 0:"4px"}}),fH=sF(function(e){var t=e.className,n=e.title;return XA.createElement(ZB,{className:t,title:n,path:"M1 8a7 7 0 1 1 10 6.326V11h-1v5h5v-1h-3.124A8 8 0 1 0 8 16v-1a7 7 0 0 1-7-7Z"})},{})(function(){return{color:QB.STYLE.ICONS.COLOR.SECONDARY,"&.disabled":{color:QB.STYLE.ICONS.COLOR.DISABLED}}}),hH=function(e){var t=e.source;if(!t.meta.isCyclic)return null;var n=KB(GA.useState(!1),2),r=n[0],i=n[1],o=t.styling,a=t.action.stepCycle,s=t.info,l=s.position,c=s.tooltip,u=t.layout.direction,d=t.meta,f=d.allowed,h=d.isFirst,p=d.isLast,m=t.settings.isDisabled,g=t.state.inSelections;return GA.useEffect(function(){r&&i(!1)},[l]),f.reload?XA.createElement(uH,{direction:u,disabled:r||g||m(),isFirst:h,isLast:p,onClick:function(){return i(!0),void a()},styling:o.title,title:c,variant:"outlined"},XA.createElement(fH,{className:"".concat(r||g||m()?"disabled":"")})):XA.createElement(dH,{direction:u,isFirst:h,isLast:p,style:{flexShrink:0},title:c})},pH=function(e){var t=e.className,n=e.title;return XA.createElement(ZB,{className:t,title:n,path:"M7 4h9v1H7V4ZM9 8h7v1H9V8ZM11 12h5v1h-5v-1ZM1 4v3.526a3.5 3.5 0 0 0 3.5 3.5h2.31L5.22 9.402l.715-.7L8.7 11.527 5.935 14.35l-.714-.7 1.59-1.624H4.5a4.5 4.5 0 0 1-4.5-4.5V4h1Z"})},mH=sF(Rj,{shouldForwardProp:function(e){return"styling"!==e}})(function(e){var t=e.styling,n=t.fontSize,r=t.fontFamily,i=t.color;return{fontWeight:"normal",lineHeight:"normal",fontSize:"".concat(n," !important"),fontFamily:"".concat(r," !important"),color:"".concat(i," !important"),padding:"0px 5px",height:"100%",minWidth:"45px","&:disabled":{color:i}}}),gH={color:QB.STYLE.ICONS.COLOR.SECONDARY,marginTop:"1px","&.disabled":{color:QB.STYLE.ICONS.COLOR.DISABLED}},yH=sF(function(e){var t=e.className;return XA.createElement(ZB,{className:t,path:"M8.5 8 4 3.5 5.5 2l6 6-6 6L4 12.5 8.5 8z"})})(function(){return gH}),vH=sF(function(e){var t=e.className;return XA.createElement(ZB,{className:t,path:"m7 8 4.5 4.5L10 14 4 8l6-6 1.5 1.5z"})})(function(){return gH}),bH=sF(pH,{shouldForwardProp:function(e){return"direction"!==e&&"isFirst"!==e&&"isLast"!==e}})(function(e){var t=e.direction,n=e.isFirst,r=e.isLast;return{color:QB.STYLE.ICONS.COLOR.PRIMARY,marginTop:"1px",marginLeft:"ltr"!==t||n?void 0:"4px",marginRight:"rtl"!==t||r?void 0:"4px"}}),xH=function(e){var t=e.source;if(!t.meta.isDrillDown)return null;var n=t.styling,r=t.action.drillUp,i=t.info,o=i.breadcrumbs,a=i.tooltip,s=t.layout.direction,l=t.meta,c=l.isFirst,u=l.isLast,d=t.settings.isDisabled,f=t.state.inSelections,h=d()||f?"disabled":null,p=HB({},"rtl"===s?"startIcon":"endIcon","rtl"===s?XA.createElement(vH,{className:h}):XA.createElement(yH,{className:h})),m=o.map(function(e,t){var i=nH(e);return XA.createElement(mH,VB({disabled:d()||f,key:"breadcrumb-".concat(e),onClick:function(){return function(e){r({steps:o.length-e})}(t)},styling:n.title,title:e},p),XA.createElement("span",{dir:i,style:QB.STYLE.ELLIPSIS},e))});return XA.createElement(XA.Fragment,null,"rtl"===s?m.reverse():void 0,XA.createElement(bH,{direction:s,isFirst:c,isLast:u,style:{flexShrink:0},title:a}),"rtl"===s?void 0:m)},SH=sF(bB,{shouldForwardProp:function(e){return"nested"!==e&&"rtl"!==e}})(function(e){var t=e.nested,n=e.rtl;return{padding:"4px ".concat(t&&n?"32px":"16px"," 4px ").concat(t&&!n?"32px":"16px"),"&:focus":WB({},QB.STYLE.FOCUS)}}),wH=sF(MB)(function(){return{marginRight:0,justifyContent:"center"}}),MH=sF(function(e){var t=e.className;return XA.createElement(ZB,{className:t,path:"m6 10 7-7 2 2-7 7-2 2-5-5 2-2 3 3Z"})})(function(){return{color:QB.STYLE.ICONS.COLOR.SECONDARY}}),kH=sF(cH)(function(){return{color:QB.STYLE.ICONS.COLOR.SECONDARY}}),CH=sF(pH)(function(){return{color:QB.STYLE.ICONS.COLOR.SECONDARY,fontWeight:600}}),qH=function(e){var t=e.id,n=e.meta,r=e.nested,i=e.onClick,o=e.selected,a=e.source,s=e.text,l=a.styling,c=a.settings.isRTL,u=WB({fontWeight:!n||n.isNormal?"normal":600,lineHeight:"normal",fontSize:l.popover.fontSize,fontFamily:l.popover.fontFamily,color:l.popover.color,textAlign:c?"end":"start"},QB.STYLE.ELLIPSIS),d=nH(s),f=XA.createElement(wH,{sx:c?{paddingRight:"12px"}:{paddingLeft:"12px"}},function(e){var t=e.meta;return e.selected?XA.createElement(MH,{height:12}):null!=t&&t.isCyclic?XA.createElement(kH,{height:12}):null!=t&&t.isDrillDown?XA.createElement(CH,{height:12}):void 0}({meta:n,selected:o}));return XA.createElement(XA.Fragment,{key:t},XA.createElement(SH,{autoFocus:o,nested:r,onClick:function(e){return null==i?void 0:i(e)},rtl:c,title:s},c&&f,XA.createElement(DB,{dir:d,primaryTypographyProps:{style:u}},s),!c&&f))},EH=sF(iB)(function(){return{marginTop:"-1px"}}),DH=function(e){var t=e.anchor,n=e.id,r=e.onClose,i=e.open,o=e.source,a=o.action,s=a.changeTo,l=a.drillUp,c=a.setActiveField,u=o.info,d=u.breadcrumbs,f=u.group,h=u.id,p=u.text,m=o.data.alternatives,g=o.meta,y=g.index,v=g.isCyclic,b=g.isDrillDown,x=o.resources.translator,S=o.services.focus,w={isChanging:!1},M=GA.useRef(),k=function(){var e,t=document.activeElement;null!=M&&null!==(e=M.current)&&void 0!==e&&e.contains(t)&&t.blur(),r()},C=v||b,q=XA.createElement(qH,{id:h,key:h,meta:o.meta,onClick:k,selected:!C,source:o,text:C?f.name:p}),E=C&&f.items.map(function(e){return XA.createElement(qH,{id:e.id,nested:!0,onClick:function(t){return function(e,t){w.isChanging||(w.isChanging=!0,"keydown"!==e.type&&"keyup"!==e.type||S.queueFor(y),v&&c({fieldIndex:t.index}),b&&l({steps:d.length-t.index}))}(t,e)},selected:e.current,source:o,text:e.text})}),D=m.map(function(e,t){return XA.createElement(XA.Fragment,{key:e.id},XA.createElement(qH,{id:e.id,key:e.id,meta:e.meta,onClick:function(t){return n=t,r=e.id,void(w.isChanging||(w.isChanging=!0,"keydown"!==n.type&&"keyup"!==n.type||S.queueFor(y),s({id:r})));var n,r},source:o,text:e.text}),t<m.length-1&&XA.createElement(EH,{key:"divider-".concat(e.id)}))});return XA.createElement(FB,{anchorEl:t,anchorOrigin:{vertical:"top",horizontal:"center"},disableRestoreFocus:!0,id:n,onClose:k,open:i,ref:M,slotProps:{paper:{style:{minWidth:"250px",maxWidth:"640px",maxHeight:"300px"}}},transformOrigin:{vertical:"bottom",horizontal:"center"}},XA.createElement(pB,{"aria-label":x.get("Accessibility.Popover.Instructions"),dense:!0},q,E,XA.createElement(EH,{key:"divider-".concat(h)}),D))},TH=function(e){var t=e.source,n=KB(GA.useState(null),2),r=n[0],i=n[1],o={id:r?"alternatives-popover":void 0,isOpen:Boolean(r)},a=t.layout.direction,s=t.meta.index,l=t.services.focus,c=function(){i(null)};GA.useEffect(function(){o.isOpen&&c()},[t.info.key]);var u=XA.createElement(hH,{source:t}),d=XA.createElement(xH,{source:t});return XA.createElement(XA.Fragment,null,"rtl"===a?void 0:d,"rtl"===a?void 0:u,XA.createElement(lH,{onClick:function(e){var t=e.currentTarget;t.classList.contains("qcm-focus-visible")&&l.queueFor(s),i(t)},isOpen:o.isOpen,popoverId:o.id,source:t}),XA.createElement(DH,{anchor:r,id:o.id,onClose:c,open:o.isOpen,source:t}),"rtl"===a?d:void 0,"rtl"===a?u:void 0)};function OH(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var NH,AH,_H=function(){if(iH)return rH;iH=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},o=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,i=e.call(n,"constructor"),o=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!i&&!o)return!1;for(r in n);return void 0===r||e.call(n,r)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return rH=function e(){var t,n,r,l,c,u,d=arguments[0],f=1,h=arguments.length,p=!1;for("boolean"==typeof d&&(p=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<h;++f)if(null!=(t=arguments[f]))for(n in t)r=s(d,n),d!==(l=s(t,n))&&(p&&l&&(o(l)||(c=i(l)))?(c?(c=!1,u=r&&i(r)?r:[]):u=r&&o(r)?r:{},a(d,{name:n,newValue:e(p,u,l)})):void 0!==l&&a(d,{name:n,newValue:l}));return d},rH}(),IH=OH(_H),LH={},PH=OH((NH||(NH=1,AH=LH,(()=>{var e={909: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,c,u,d=arguments[0],f=1,h=arguments.length,p=!1;for("boolean"==typeof d&&(p=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<h;++f)if(null!=(t=arguments[f]))for(n in t)r=l(d,n),d!==(i=l(t,n))&&(p&&i&&(a(i)||(c=o(i)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&a(r)?r:{},s(d,{name:n,newValue:e(p,u,i)})):void 0!==i&&s(d,{name:n,newValue:i}));return d}}},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),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};n.r(r),n.d(r,{default:()=>De});var i=n(909),o=n.n(i);const a=function(e,t,n){if(!t)return!1;var r,i=t.split("."),o=i[i.length-1],a=e;for(r=0;r<i.length-1;++r)void 0===a[i[r]]&&(a[i[r]]=Number.isNaN(+i[r+1])?{}:[]),a=a[i[r]];if(void 0!==n){var s=a[o];return a[o]=n,{updated:n,previous:s}}return delete a[o],!1},s=function(e,t,n){var r,i=t.split("."),o=e;if(void 0===o)return n;for(r=0;r<i.length;++r){if(void 0===o[i[r]])return n;o=o[i[r]]}return o},l={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 c="".concat(" ","(").concat(" "),u="".concat(" ",")").concat(" ");function d(e){return c+e+u}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var n=function(e,t){if(!t)return null;var n,r;for(n=0;n<t.length;n++)if((r=t[n]).qInfo.qId===e)return r;return null}(e.qLibraryId,t.dimensionList);return n&&n.qData.info[0].qTags.indexOf("$numeric")>-1}var r=function(e,t){if(!t)return null;var n,r,i=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var n=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(n)&&(t=(t=t.substring(1,n)).trim()),t}(e);for(n=0;n<t.length;n++){if((r=t[n]).qName===i)return r;if(r.qDerivedFieldData)for(var o=0;o<r.qDerivedFieldData.qDerivedFieldLists.length;++o)for(var a=r.qDerivedFieldData.qDerivedFieldLists[o],s=0;s<a.qFieldDefs.length;++s){var 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 h(e){return!(!e.fullAccumulation&&!e.fullRange)}function p(e,t){var n=e.crossAllDimensions;return 2===t&&n?"RowNo(Total)":"RowNo()"}function m(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 g(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function y(e,t){var n=e.crossAllDimensions;return 2===t&&n?"Above(Total ":"Above("}function v(e){return void 0===e?")":", 0, ".concat(e,")")}function b(e){return"Replace(Replace(".concat(e,",'''',''''''),'$','$''&''')")}function x(e,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=").concat(b("MinString(".concat(t,")")),")' and Only({1}").concat(t,")<='$(=").concat(b("MaxString(".concat(t,")")),")'\"}")}function S(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 c=x(f(r[0],i),g(0));return"".concat(a,"({1<").concat(c,">}").concat(l,")")}if(r&&2===r.length){var u=f(r[0],i),d=f(r[1],i),h=g(0),p=g(1),m=x(u,h),y=x(d,p);return"".concat(a,"({1<").concat(m,",").concat(y,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function w(e){return"".concat(e,"(")}function M(e){var t=e.properties,n=e.layout;return s(t,"qHyperCubeDef.qDimensions",s(n,"qHyperCube.qDimensionInfo",[])).length}const k={isFullRange:h,getNumDimensions:M,getExpressionWithExcludedComp:function(e){var t=e.expression,n=e.modifier,r=e.dimensions,i=e.dimensionAndFieldList,o=e.treatMissingAsNull,a=d(m(t));if(!n.showExcludedValues)return a;var s=S({modifier:n,dimensions:r,dimensionAndFieldList:i}),l=o?"":", 0";if(r&&1===r.length){var c=g(0);return"If(Count(".concat(c,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(r&&2===r.length){var u=g(0),f=g(1);return"If(Count(".concat(u,") * Count(").concat(f,") > 0, ").concat(a," + ").concat(s).concat(l,")")}return a},getRowNoComp:p,getNumStepComp:function(e,t){if(!h(e)){var n=e.steps;return"number"!=typeof n||Number.isNaN(n)?6:n}return p(e,t)},getAboveCompPrefix:y,getAboveCompSuffix:v,getAboveComp:function(e,t,n,r){return y(e,t)+n+v(r)},getFunctionPrefix:w,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return w(e)+t+")"},getAggrComp:function(e,t,n){return"Aggr(".concat(e,", ").concat(t,", ").concat(n,")")},getExcludedComp:S,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===M({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=g(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:m,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var n=t.indexOf(c);if(-1!==n){var r=t.indexOf(u);if(-1!==r)return t.substring(n+c.length,r)}}},initModifier:function(e,t){Object.keys(t).forEach(function(n){void 0===e[n]&&(e[n]=t[n])})},isNumeric:f,isApplicable:function(e){var t=e.properties,n=e.layout,r=e.minDimensions,i=void 0===r?1:r,o=e.maxDimensions,a=void 0===o?2:o;if(!t&&!n)return!0;var s=M({properties:t,layout:n});return s>=i&&s<=a},getExpressionWithMarkers:d,canExtract:function(e){var t=e.indexOf(c),n=e.indexOf(u);return t>-1&&n>-1&&t<n},getDimDefWithWrapper:g,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=l.OPTIONS.find(function(t){return t.value===e.decomposition});return t?l.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(l.EXPRESSIONS).find(function(n){var r=e.qDef.base.qDef.toLowerCase()||e.qDef.qDef.toLowerCase();return l.EXPRESSIONS[n]&&r.includes(l.EXPRESSIONS[n].toLowerCase())&&(t=n),n}),t}};function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function q(e){return q="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},q(e)}var E=o().bind(null,!0),D={},T=Array.isArray;function O(e){return null!=e&&!Array.isArray(e)&&"object"===q(e)}function N(e){return void 0===e}function A(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function _(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]=N(e[n||t])?o:e[t],e=e[n||t]}}),e}function I(e,t){var n=!0;if(O(e)&&O(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(T(e)&&T(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}D.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)||A(t,i)||(N(a)?r.push({op:"add",path:s,value:o}):O(o)&&O(a)?r=r.concat(D.generate(a,o,s)):T(o)&&T(a)?r=r.concat(function(e,t,n){var r=[],i=e.slice(),o=-1;function a(e,t,n){if(e[n]&&N(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(!N(t[0])&&N(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(D.generate(i[s],t[o],"".concat(n,"/").concat(s)));for(var l=0,c=t.length;l<c;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){N(t[i])&&!A(e,i)&&r.push({op:"remove",path:"".concat(n,"/").concat(i)})}),r},D.apply=function(e,t){t.forEach(function(t){var n,r,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(T(i))"-"===o&&(o=i.length),i.splice(+o,"add"===t.op?0:1,t.value);else if(T(a)&&T(t.value)){var l,c=t.value.slice();a.length=0,(l=a).push.apply(l,function(e){if(Array.isArray(e))return C(e)}(r=c)||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 C(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?C(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(O(a)&&O(t.value))n=a,Object.keys(n).forEach(function(e){Object.getOwnPropertyDescriptor(n,e).configurable&&!A(n,e)&&delete n[e]}),E(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 u=_(e,t.from);T(i)?i.splice(+o,0,u.splice(+s,1)[0]):(i[o]=u[s],delete u[s])}else"remove"===t.op&&(T(i)?i.splice(+o,1):delete i[o])})},D.clone=function(e){return E({},e)},D.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},D.updateObject=function(e,t){Object.keys(e).length?D.apply(e,D.generate(e,t)):E(e,t)};const L=D;var P="accumulation";function R(e,t){var n=s(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===P)return n[r]}function z(e,t){var n=function(e,t){var n=s(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===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 j={translationKey:"properties.modifier.accumulation",needDimension:k.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return k.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,o=e.numDimensions,a=e.dimensionAndFieldList;if(!n)return t;var l=o;void 0===l&&(l=k.getNumDimensions({properties:r,layout:i}));var c=s(r,"qHyperCubeDef.qDimensions",[]),u=k.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:a}),d=k.getNumStepComp(n,l),f=k.getAboveComp(n,l,u,d),h=k.getRangeComp("RangeSum",f);if(k.needDimension({modifier:n,properties:r,layout:i})){var p=k.getDimComp(c,1),m=k.getDimComp(c,0),g=k.getAggrComp(h,p,m);h=n.showExcludedValues?k.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:a,valueComp:g}):g}return h},extractInputExpression:k.extractInputExpression,initModifier:function(e){k.initModifier(e,F)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:function(e,t){return!k.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(z(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(z(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(z(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(z(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(z(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return k.isApplicable({properties:t.properties})}}},show:function(t,n,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}}}};var B="movingAverage";function H(e,t){var n=s(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===B)return n[r]}function V(e,t){var n=function(e,t){var n=s(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===B)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var $={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1};const W={translationKey:"properties.modifier.movingAverage",needDimension:k.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return k.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,n=e.expression,r=e.modifier,i=e.properties,o=e.layout,a=e.numDimensions,l=e.dimensionAndFieldList;if(!r)return n;var c=a;void 0===c&&(c=k.getNumDimensions({properties:i,layout:o}));var u=s(i,"qHyperCubeDef.qDimensions",[]),d=r.showExcludedValues&&r.nullSuppression,f=k.getExpressionWithExcludedComp({expression:n,modifier:r,dimensions:u,dimensionAndFieldList:l,treatMissingAsNull:d}),h=k.getNumStepComp(r,c),p=k.getAboveComp(r,c,f,h);if(r.nullSuppression)t=k.getRangeComp("RangeAvg",p);else{var m=k.getRangeComp("RangeSum",p),g=function(e,t){var n=k.getRowNoComp(e,t);if(!k.isFullRange(e)){var r=e.steps,i="number"!=typeof r||Number.isNaN(r)?6:r;return"RangeMin(".concat(i,", ").concat(n,")")}return n}(r,c);t="".concat(m," / ").concat(g)}var y=t;if(k.needDimension({modifier:r,properties:i,layout:o})){var v=k.getDimComp(u,1),b=k.getDimComp(u,0),x=k.getAggrComp(y,v,b);y=r.showExcludedValues?k.getExcludedComp({modifier:r,dimensions:u,dimensionAndFieldList:l,funcComp:"Only",valueComp:x}):x}return y},extractInputExpression:k.extractInputExpression,initModifier:function(e){k.initModifier(e,$)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.movingAverage.disclaimer",show:function(e,t){return!k.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(V(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.movingAverage.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(V(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.movingAverage.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(V(t,e),".fullRange")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(V(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=H(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=H(t,e);return n&&!n.fullRange}},showExcludedValues:{refFn:function(t){return"".concat(V(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat(V(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return k.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(B))return!1;var o=H(t,e);return o&&!o.disabled}}}};var U="timeSeriesDecomposition";function Y(e,t){var n=s(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=s(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 G={type:"timeSeriesDecomposition",disabled:!1,decomposition:"",steps:2,outputExpression:""};const X={translationKey:"properties.modifier.timeSeriesDecomposition",needDimension:k.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return k.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties;return n?k.generateTSDExpression(n,t,r):t},extractInputExpression:k.extractInputExpression,initModifier:function(e,t){k.initModifier(e,G),""===e.decomposition&&t&&(e.decomposition=k.getDecomposition(t))},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.timeSeriesDecomposition||"properties.modifier.timeSeriesDecomposition",show:function(e,t){return!k.isApplicable({properties:t.properties})}},settings:{type:"items",items:{decomposition:{refFn:function(t){return"".concat(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:l.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=Y(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=Y(t,e);return n&&!n.fullRange}}},show:function(e,t){return k.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(U))return!1;var o=Y(t,e);return o&&!o.disabled}}}};var J="difference";function Z(e,t){var n=function(e,t){var n=s(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===J)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var Q={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""};const ee={translationKey:"properties.modifier.difference",needDimension:k.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return k.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:k.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,o=e.numDimensions,a=e.dimensionAndFieldList;if(!n)return t;var l=o;void 0===l&&(l=k.getNumDimensions({properties:r,layout:i}));var c=s(r,"qHyperCubeDef.qDimensions",[]),u=k.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:a}),d=k.getAboveComp(n,l,u),f="".concat(u," - ").concat(d);if(k.needDimension({modifier:n,properties:r,layout:i})){var h=k.getDimComp(c,1),p=k.getDimComp(c,0),m=k.getAggrComp(f,h,p);f=n.showExcludedValues?k.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:a,funcComp:"Only",valueComp:m}):m}return f},initModifier:function(e){Object.keys(Q).forEach(function(t){void 0===e[t]&&(e[t]=Q[t])})},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:function(e,t){return!k.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(Z(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.difference.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(Z(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.difference.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},showExcludedValues:{refFn:function(t){return"".concat(Z(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return k.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(J))return!1;var o=function(e,t){var n=s(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===J)return n[r]}(t,e);return o&&!o.disabled}}}};var te="normalization";function ne(e,t){var n=s(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=s(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(k.getFieldWithWrapper(t),"={'").concat(n,"'}>}"):""}function le(e,t){return 0===e&&t>1||2===e?"Total":""}function ce(e,t,n){return 0===e&&t>1?"<".concat(k.getDimDefWithWrapper(n),">"):""}const ue={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,n=e.layout;return k.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:k.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,o=e.numDimensions,a=e.dimensionAndFieldList;if(!n)return t;var l=o;void 0===l&&(l=k.getNumDimensions({properties:r,layout:i}));var c=s(r,"qHyperCubeDef.qDimensions",[]),u=k.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:a}),d=n.selectionScope,f=n.dimensionalScope;return function(e,t,n,r,i,o,a){var s=ae(t),l=se(t,n,r),c=""===s&&""===l?"":s||l,u=le(i,o),d=ce(i,o,a),f=function(e){for(var t=[],n=0;n<e;n++)t[n]=k.getDimDefWithWrapper(n);return t.join(", ")}(o);return"".concat(e,"/ Sum(").concat(c," ").concat(u).concat(d," Aggr(").concat(c," ").concat(e,", ").concat(f,"))")}(u,d,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]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:function(e,t){return!k.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(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){if(1===e){var n=ie(t,0);t.splice(n,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){if(e<2){var n=ie(t,0);t.splice(n,1)}return t}(i,o),o=function(e,t){if(0===e){var n=ie(t,1);t.splice(n,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 k.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}}},getDisregardSelectionComp:ae,getFieldSelectionComp:se,getTotalComp:le,getSelectedDimComp:ce};var de="library id deleted",fe="qDef.qDef",he="qDef.base.qDef",pe="qLibraryId",me="qDef.base.qLibraryId",ge="qDef.qLabel",ye="qDef.qLabelExpression",ve="qDef.base.qLabel",be="qDef.base.qLabelExpression",xe="qDef.qAggrFunc",Se="qDef.base.qAggrFunc",we="qDef.base";const Me={getExpression:function(e){var t=s(e,he);return void 0!==t?t:s(e,fe)},getExpressionRef:function(e){return void 0!==s(e,he)?he:fe},getLibraryIdRef:function(e){return s(e,me)?me:pe},getLibraryId:function(e){return s(e,me)||s(e,pe)},getLabelRef:function(e){return s(e,we)?ve:ge},getLabelExpressionRef:function(e){return s(e,we)?be:ye}};var ke={initBase:function(e,t){(t||ke.isValid(e))&&(a(e,he,s(e,fe)),a(e,me,s(e,pe)),a(e,ve,s(e,ge)),a(e,be,s(e,ye)))},restoreBase:function(e){ke.isValid(e)&&(a(e,fe,s(e,he)),a(e,pe,s(e,me)),a(e,ge,s(e,ve)),a(e,ye,s(e,be)),s(e,xe)&&s(e,Se)&&a(e,xe,s(e,Se)),delete e.qDef.base)},isValid:function(e){var t=s(e,he),n=s(e,me);return void 0!==t||void 0!==n}};const Ce=ke;function qe(e){return qe="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},qe(e)}var Ee={accumulation:j,movingAverage:W,difference:ee,normalization:ue,timeSeriesDecomposition:X};const De={modifiers:Ee,apply:Oe,applyModifiers:Ne,cleanUpMeasure:Ae,destroy:function(e){e&&Te[e.id]&&Te[e.id].masterItemSubscriber&&(Te[e.id].masterItemSubscriber&&Te[e.id].masterItemSubscriber.unsubscribe(),delete Te[e.id])},hasActiveModifiers:_e,getActiveModifier:Ie,initBase:Ce.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some(function(e){return Ee[e]})},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some(function(e){return Ee[e]&&Ee[e].isApplicable({properties:n,layout:r})})},measureBase:Me,limitedSorting:function(e){var t=e.measures,n=e.properties,r=e.layout,i=!1,o=!1;return t.forEach(function(e){var t=Re(e);$e({modifiers:t,properties:n,layout:r})&&(i=!0,o=o||Ge({modifiers:t,properties:n,layout:r}))}),i&&!o},ifEnableTotalsFunction:Le};var Te={};function Oe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.model,n=e.properties,r=e.isSnapshot,i=void 0!==r&&r,a=e.masterItem,l=!1;Te[t.id]=Te[t.id]||{isFirstTime:!0};var c=Te[t.id].isFirstTime;if(Te[t.id].isFirstTime=!1,n&&"object"===qe(n))return Ne({model:t,properties:n});var u=t?t.layout:void 0,d=s(u,"qSelectionInfo.qInSelections");if(i||d)return Promise.resolve(l);var f=s(u,"qHyperCube.qMeasureInfo"),h=Te[t.id].lastReloadTime;if(Te[t.id].lastReloadTime=s(t,"app.layout.qLastReloadTime"),_e({measures:f,layout:u})){var p=function(e){var t=e.measures,n=e.layout,r=e.lastReloadTime;return s(e.model,"app.layout.qLastReloadTime")!==r&&function(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some(function(e){return Ve({measure:e,properties:n,layout:r})})}({measures:t,layout:n})}({measures:f,layout:u,model:t,lastReloadTime:h});return p||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 $e({modifiers:Re(t),layout:n})?!t.base:!!t.base}({measure:e,layout:n})}))}({measures:f,layout:u,masterItem:a,isFirstTime:c})?t.getEffectiveProperties().then(function(e){var n=o()(!0,{},e);Fe(n);var r=Xe(n);return We({model:t}).then(function(i){return Ue({libraryIds:r,model:t}).then(function(r){return p&&function(e){var t=e.properties;Pe(t).forEach(function(e){return function(e){var t=e.measure;if(Ve({measure:t,properties:e.properties})){var n=0,r=t.qDef.modifiers;Array.isArray(r)&&r.forEach(function(e){if("object"===qe(e)&&!e.disabled){if(n++,"object"!==qe(Ee[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=Ee[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==r&&Be(t)&&k.simplifyExpression(t.qDef.base.qDef)!==k.simplifyExpression(r)&&(t.qDef.base.qDef=r)}})}}({measure:e,properties:t})})}({properties:n}),Ne({model:t,oldProperties:e,properties:n,runUpdateIfChange:!0,masterItem:a,libraryItemsProps:r,dimensionAndFieldList:i})})}).catch(function(){return Promise.resolve(l)})}):Promise.resolve(l)}return function(e){return!!Array.isArray(e)&&e.some(function(e){return"object"===qe(e.base)})}(f)?t.getEffectiveProperties().then(function(e){return function(e){var t=e.model,n=e.properties,r=Xe(n);return Je({model:t,libraryIds:r}).then(function(){var e=o()(!0,{},n);return Pe(n).forEach(function(e){return Ae(e)}),Ke({oldProperties:e,newProperties:n,model:t})})}({model:t,properties:e})}):Promise.resolve(l)}function Ne(e){var t=e.model,n=e.oldProperties,r=e.properties,i=e.measures,a=e.runUpdateIfChange,l=void 0!==a&&a,c=e.masterItem,u=e.libraryItemsProps,d=e.dimensionAndFieldList;void 0===n&&(n=l?o()(!0,{},r):r),Fe(r);var f=Xe(r);return Je({model:t,libraryIds:f,masterItem:c}).then(function(){return function(e){var t=e.measures,n=e.properties,r=e.model,i=e.libraryItemsProps,a=e.dimensionAndFieldList;if(t||(t=Pe(n)),!t.length)return Promise.resolve();if(!i&&!_e({measures:t,properties:n}))return t.forEach(function(e){return Ae(e)}),Promise.resolve();var l=i?void 0:Xe(n);return We({model:r,dimensionAndFieldList:a}).then(function(e){return Ue({libraryIds:l,model:r,libraryItemsProps:i}).then(function(r){t.forEach(function(t){var i=t.qDef.modifiers;r&&$e({modifiers:i,properties:n})?(function(e){var t=e.measure,n=e.properties,r=e.libraryItemsProps,i=e.dimensionAndFieldList,a=0;Ce.isValid(t)||Ce.initBase(t,!0);var l=t.qDef,c=l.modifiers,u=l.base;Array.isArray(c)&&c.forEach(function(e){if("object"===qe(e)&&!e.disabled){if(a++,"object"!==qe(Ee[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(a>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");Ee[e.type].initModifier(e,t);var l=t.qLibraryId||u&&u.qLibraryId;l?function(e){var t=e.measure,n=e.modifier,r=e.properties,i=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],s=a.qMeasure.qDef,l=""===s?s:Ee[n.type].generateExpression({expression:s,modifier:n,properties:r,dimensionAndFieldList:i});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=o()(!0,{},t.qDef.base)}({measure:t,modifier:e,libraryId:l,properties:n,libraryItemsProps:r,dimensionAndFieldList:i}):function(e){var t=e.measure,n=e.modifier,r=e.properties,i=e.dimensionAndFieldList;"function"==typeof Ee[n.type].updateModifier&&Ee[n.type].updateModifier(n,r.qHyperCubeDef);var a=Me.getExpression(t),s=""===a?a:Ee[n.type].generateExpression({expression:a,modifier:n,properties:r,dimensionAndFieldList:i});n.outputExpression=s,t.qDef.qDef=n.outputExpression,t.qDef.base.qLabelExpression?t.qDef.qLabelExpression=t.qDef.base.qLabelExpression:t.qDef.qLabel=t.qDef.base.qLabel||a,n.base=o()(!0,{},t.qDef.base)}({measure:t,modifier:e,properties:n,dimensionAndFieldList:i}),function(e){var t=s(e,"qDef.qAggrFunc");"Expr"!==t||Le(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&Le(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}),je(t)):Ae(t)})})})}({measures:i,properties:r,model:t,libraryItemsProps:u,dimensionAndFieldList:d}).then(function(){return l?Ke({oldProperties:n,newProperties:r,model:t}):Promise.resolve(!1)})}).catch(function(){return Promise.resolve(!1)})}function Ae(e){!function(e){var t=Re(e);return Array.isArray(t)&&t.some(function(e){return"object"===qe(e)&&!e.disabled&&!Ee[e.type]})}(e)?Ce.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,je(e)}function _e(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some(function(e){return $e({modifiers:Re(e),properties:n,layout:r})})}function Ie(e){var t=Re(e);if(Array.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];if(Ee[r.type]&&!r.disabled)return r}}function Le(e){var t=Ie(e);return!t||Ee[t.type].enableTotalsFunction(e)}function Pe(e){return s(e,"qHyperCubeDef.qMeasures",[]).concat(s(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function Re(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function ze(e){return s(e,"outputExpression.qValueExpression.qExpr")||s(e,"outputExpression")}function Fe(e){Pe(e).forEach(function(e){return function(e){var t=Ie(e);t&&(void 0!==t.outputExpression&&ze(t)!==e.qDef.qDef?delete e.qDef.base:!Ce.isValid(e)&&t.base&&(e.qDef.base=o()(!0,{},t.base)))}(e)})}function je(e){var t=Re(e);Array.isArray(t)&&t.forEach(function(t){"object"===qe(t)&&(t.disabled||!Ee[t.type]&&ze(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)})}function Be(e){return e.base||e.qDef&&e.qDef.base}function He(e){var t=Be(e);return e.qLibraryId||t&&t.qLibraryId}function Ve(e){var t=e.measure,n=e.properties,r=e.layout;return!He(t)&&$e({modifiers:Re(t),properties:n,layout:r})}function $e(e){var t=e.modifiers,n=e.properties,r=e.layout,i={};return Array.isArray(t)&&t.some(function(e){return!("object"!==qe(e)||e.disabled||!Ee[e.type])&&(void 0===i[e.type]&&(i[e.type]=Ee[e.type].isApplicable({properties:n,layout:r})),i[e.type])})}function We(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 Ue(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}).catch(function(){return null})}function Ye(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Ke(e){var t=e.oldProperties,n=e.newProperties,r=e.model,i=JSON.stringify(s(t,"qHyperCubeDef.qMeasures"),Ye)!==JSON.stringify(s(n,"qHyperCubeDef.qMeasures"),Ye)||JSON.stringify(s(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ye)!==JSON.stringify(s(n,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ye);return i?function(e){var t=e.model,n=e.oldProperties,r=e.newProperties,i=t.layout;return i&&!i.qHasSoftPatches&&!i.qExtendsId&&s(i,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(r):function(e,t,n){if(!e)return Promise.resolve();var r=L.generate(t,n);return o()(!0,t,n),r&&r.length?(r=r.map(function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}}),e.applyPatches(r,!0)):Promise.resolve()}(t,n,r)}({model:r,oldProperties:t,newProperties:n}).then(function(){return i}):Promise.resolve(i)}function Ge(e){var t=e.modifiers,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some(function(e){return"object"===qe(e)&&!e.disabled&&Ee[e.type]&&Ee[e.type].needDimension({modifier:e,properties:n,layout:r})})}function Xe(e){var t=Pe(e),n=[],r=[],i=!1;return t.forEach(function(t){var r=Re(t);if($e({modifiers:r,properties:e})){var o=He(t);o&&n.push(o),i=i||Ge({modifiers:r,properties:e})}}),s(e,"qHyperCubeDef.qDimensions",[]).forEach(function(e){var t=e.qLibraryId;t&&r.push(t)}),{measureLibraryIds:n,dimensionLibraryIds:r}}function Je(e){var t=e.model,n=e.libraryIds,r=e.masterItem;return!r&&r!==de&&n&&(n.measureLibraryIds.length||n.dimensionLibraryIds.length)?(Te[t.id].masterItemSubscriber=Te[t.id].masterItemSubscriber||function(e){var t=e.model,n=e.callback,r={},i={},o={},a={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},n=s(e,"qInfo.qType");return n&&a[n]&&a[n].forEach(function(n){t[n]=s(e,n)}),JSON.stringify(t)}function c(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 u(){Object.keys(r).forEach(function(e){i[e]||o[e]||(r[e].listener.dispose(),r[e].unbindCloseListnener(),delete r[e])})}var d=function(e,t){return e.once("closed",t),function(){return e.removeListener("closed",t)}};function f(e,i){return t.app[i](e).then(function(t){r[e]={listener:t.layoutSubscribe(c),unbindCloseListnener:d(t,function(){return e=t.id,n(de),delete r[e],void u();var e}),enabled:!1,properties:l(t.layout)}}).catch(function(){})}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}),u(),t.app&&(Object.keys(i).forEach(function(e){i[e]&&!r[e]&&s.push(f(e,"getMeasure"))}),Object.keys(o).forEach(function(e){o[e]&&!r[e]&&s.push(f(e,"getDimension"))})),Promise.all(s)},unsubscribe:function(){Object.keys(r).forEach(function(e){r[e].listener.dispose(),r[e].unbindCloseListnener()}),r={}}}}({model:t,callback:function(e){return Oe({model:t,masterItem:e}).then(function(){return t.app.clearUndoBuffer()})}}),Te[t.id].masterItemSubscriber.subscribe(n)):Promise.resolve()}AH.default=r.default,Object.defineProperty(AH,"__esModule",{value:!0})})()),LH));function RH(e){var t=e.model,n=e.properties;return e.noModelDependencies?PH.apply({model:t,properties:n}):t.modifiers?t.modifiers.apply({model:t,properties:n}):Promise.resolve()}function zH(e){return Array.isArray(e)}function FH(e){return null!=e&&!Array.isArray(e)&&"object"===XB(e)}function jH(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function BH(e){return void 0===e}function HH(e,t){if(FH(e)&&FH(t)){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n=Object.keys(e),r=0,i=n.length;r<i;r+=1)if(!HH(e[n[r]],t[n[r]]))return!1;return!0}if(zH(e)&&zH(t)){if(e.length!==t.length)return!1;for(var o=0,a=e.length;o<a;o+=1)if(!HH(e[o],t[o]))return!1;return!0}return e===t}function VH(e){var t=e.oldData,n=void 0===t?{}:t,r=e.newData,i=void 0===r?{}:r,o=e.basePath,a=void 0===o?"":o,s=[];return Object.keys(i).forEach(function(e){var t=function(e){return e?IH(!0,{},{value:e}).value:e}(i[e]),r=n[e],o="".concat(a,"/").concat(e);HH(t,r)||jH(i,e)||(BH(r)?s.push({op:"add",path:o,value:t}):FH(t)&&FH(r)?s.push.apply(s,GB(VH({oldData:r,newData:t,basePath:o}))):zH(t)&&zH(r)?s.push.apply(s,GB(function(e){var t=e.newArray,n=e.basePath,r=[];return HH(t,e.oldArray.slice())||(!BH(t[0])&&BH(t[0].qInfo)||0===t.length)&&r.push({op:"replace",path:n,value:t}),r}({oldArray:r,newArray:t,basePath:o}))):s.push({op:"replace",path:o,value:t}))}),Object.keys(n).forEach(function(e){BH(i[e])&&!jH(n,e)&&s.push({op:"remove",path:"".concat(a,"/").concat(e)})}),s}function $H(e){var t=e.model,n=VH({oldData:e.oldProperties,newData:e.newProperties});null!=t&&t.applyPatches&&null!=n&&n.length&&t.applyPatches(n.map(function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}}),!0)}function WH(e){var t=e.properties,n=e.container,r=e.filtered,i=t.color;if(i){var o=i.auto,a=i.mode;if(!o){var s,l=r.map(function(e){var r;return null===(r=t.qHyperCubeDef[n][e])||void 0===r?void 0:r.qDef.cId}).filter(function(e){return void 0!==e}),c=t.qHyperCubeDef[n].filter(function(e){return!l.includes(e.qDef.cId)});if("byDimension"===a){var u=i.byDimDef,d=void 0===u.activeDimensionIndex?-1:u.activeDimensionIndex;if(d<0)return;var f=c[d];if(f.qLibraryId)i.byDimDef={type:"libraryItem",key:f.qLibraryId,label:f.qLibraryId,activeDimensionIndex:d};else{var h=f.qDef,p=h.qLabelExpression||h.qFieldLabels&&h.qFieldLabels[0]||h.qFieldDefs[0],m=(s=f.qDef.qFieldDefs[0]).split(" ").length>1&&"="!==s[0]&&"["!==s[0]?"[".concat(s,"]"):s;i.byDimDef={type:"expression",key:m,label:p||m,activeDimensionIndex:d}}}if("byMeasure"===a){var g=i.byMeasureDef,y=void 0===g.activeMeasureIndex?-1:g.activeMeasureIndex;if(y<0)return;var v=c[y],b=PH.measureBase.getLibraryId(v);if(b){i.byMeasureDef={type:"libraryItem",key:b,label:b,activeMeasureIndex:y};var x=PH.hasActiveModifiers({measures:[v]})?v.qDef.qDef:void 0;x&&(i.byMeasureDef.expression=x)}else{var S=v.qDef;i.byMeasureDef={type:"expression",key:S.qDef,label:S.qLabelExpression||S.qLabel||S.qDef,activeMeasureIndex:y}}}}}}function UH(e){return YH.apply(this,arguments)}function YH(){return(YH=function(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function a(e){BB(o,r,i,a,s,"next",e)}function s(e){BB(o,r,i,a,s,"throw",e)}a(void 0)})}}(UB().m(function e(t){var n,r,i,o,a,s,l,c,u,d,f,h,p,m;return UB().w(function(e){for(;;)switch(e.n){case 0:if(n=t.from,r=t.to,i=t.model,o=t.container,a=t.filtered,s=t.noModelDependencies,l=t.skipAttributeExpressions,c=t.onChange,i){e.n=1;break}return e.a(2);case 1:return e.n=2,i.getEffectiveProperties();case 2:return u=e.v,d=u.qHyperCubeDef[o].findIndex(function(e){return e.qDef.cId===n}),f=u.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[o].findIndex(function(e){return e.qDef.cId===r}),h=IH(!0,{},u),p=h.qHyperCubeDef[o][d],(m=h.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[o][f]).qAttributeDimensions=p.qAttributeDimensions,p.qAttributeDimensions=[],l||(m.qAttributeExpressions=p.qAttributeExpressions,p.qAttributeExpressions=[]),h.qHyperCubeDef[o][d]=m,h.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[o][f]=p,c({fromItem:p,toItem:m,oldProperties:u,newProperties:h,model:i}),e.n=3,RH({model:i,properties:h,noModelDependencies:s});case 3:s?WH({properties:h,container:o,filtered:a}):i.colorSupport&&i.colorSupport.colorByUpdater(h,"qHyperCubeDef."),$H({model:i,oldProperties:u,newProperties:h});case 4:return e.a(2)}},e)}))).apply(this,arguments)}function KH(e){var t=e.callbacks,n=e.data,r=e.resources,i=e.settings,o=t.onChange,a=n.infos,s=n.filtered,l=r.app,c=r.model,u=r.translator,d=i.noModelDependencies,f=i.skipAttributeExpressions;return a.map(function(e,t){var n=e.cId,r=e.qGrouping,i=e.qGroupFallbackTitles,a=e.qGroupPos,h=e.qFallbackTitle,p=e.qLocked,m=e.title,g="C"===r,y="H"===r,v="N"===r,b="number"==typeof e.explicitColumn?e.explicitColumn:t,x=function(t,n){g&&l&&l.getDimension&&l.getDimension(e.qLibraryId).then(function(e){null==e||e[t](n)}).catch(function(){})};return{meta:{isCyclic:g,isDrillDown:y,isLocked:!!p,isNormal:v},info:{id:n,key:"".concat(n,"-").concat(a),text:v?h:i[a],position:a,breadcrumbs:i.slice(0,e.qGroupPos),group:{name:m,items:i.slice(0,y?e.qGroupPos+1:i.length).map(function(e,t){return{id:"".concat(n,"-item-").concat(t),text:e,current:a===t,index:t}})},tooltip:v?void 0:u.get(g?"Tooltip.dimensions.cyclic":"Tooltip.dimensions.drilldown")},action:{changeTo:function(e){var t=e.id;return UH({from:n,to:t,container:"qDimensions",model:c,filtered:s,noModelDependencies:d,skipAttributeExpressions:f,onChange:o})},drillUp:function(e){var t=e.steps;y&&c&&(null==c||c.drillUp("/qHyperCubeDef",b,t))},stepCycle:function(){return x("stepCycle",1)},setActiveField:function(e){var t=e.fieldIndex;return x("setActiveField",t)}}}})}function GH(e){var t=e.callbacks,n=e.data,r=e.resources,i=e.settings,o=t.onChange,a=n.infos,s=n.filtered,l=r.model,c=i.noModelDependencies,u=i.skipAttributeExpressions;return a.map(function(e){var t=e.cId,n=e.qFallbackTitle;return{meta:{isNormal:!0},info:{id:t,key:t,text:n},action:{changeTo:function(e){var n=e.id;return UH({from:t,to:n,container:"qMeasures",model:l,filtered:s,noModelDependencies:c,skipAttributeExpressions:u,onChange:o})}}}})}function XH(e){var t=e.callbacks,n=e.data,r=e.dock,i=e.key,o=e.rect,a=e.resources,s=e.settings,l=e.state,c=e.styling,u=function(e){var t=e.dock,n=e.rect,r={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",height:"100%"};return"left"!==t&&"right"!==t||(r.width="".concat(n.height,"px"),r.height="".concat(n.width,"px"),r.transformOrigin="top left"),"left"===t&&(r.transform="rotate(-90deg) translate(-".concat(n.height,"px, 0)")),"right"===t&&(r.transform="rotate(90deg) translate(0, -".concat(n.width,"px)")),r}({dock:r,rect:o}),d=function(e){var t=e.callbacks,n=e.data,r=e.dock,i=e.key,o=e.resources,a=e.settings,s=e.state,l=e.styling,c=n.alternatives,u=n.infos,d=o.app,f=o.cache,h=o.model,p=a.isRTL,m=a.isSnapshot,g=a.noModelDependencies,y=a.type,v=function(e){var t=e.dock;return"top"!==t&&"bottom"!==t||!e.isRTL?"ltr":"rtl"}({dock:r,isRTL:p}),b=function(e){var t=e.cache,n="axis-title-auto-focus_"+e.key;return{queueFor:function(e){var r;return null==t||null===(r=t.set)||void 0===r?void 0:r.call(t,n,{focus:!0,index:e})},shouldFor:function(e){var r,i,o=null==t||null===(r=t.get)||void 0===r?void 0:r.call(t,n),a=!(null==o||!o.focus||(null==o?void 0:o.index)!==e);return a&&(null==t||null===(i=t.set)||void 0===i||i.call(t,n,{focus:!1})),a}}}({cache:f,key:i}),x=("dimension"===y?KH:GH)({callbacks:t,data:n,resources:o,settings:a});"rtl"===v&&x.reverse();var S={allowed:{change:g?!m:!(null==h||!h.modifiers||null==h||!h.colorSupport||m),reload:!!d&&!m},hasAlternatives:!!c.length,hasCyclic:x.some(function(e){return e.meta.isCyclic}),hasMultiple:u.length>1};return x.map(function(e,t){return WB(WB({data:n,layout:{direction:v},resources:{translator:o.translator},services:{focus:b},settings:a,state:s,styling:l},e),{},{meta:WB(WB(WB({},S),e.meta),{},{index:t,isFirst:0===t,isLast:t===x.length-1})})})}({callbacks:t,data:n,dock:r,key:i,resources:a,settings:s,state:l,styling:c});return XA.createElement("div",{style:u},d.map(function(e){return XA.createElement(XA.Fragment,{key:e.info.id},XA.createElement(TH,{source:e}),!e.meta.isLast&&XA.createElement("span",{dir:e.layout.direction,style:WB(WB({},c.title),{},{lineHeight:"normal"})},", "))}))}var JH,ZH='"Source Sans Pro", "Arial", "sans-serif"',QH="12px",eV=function(e){var t=e.rect,n=e.state,r=e.settings,i=r.callbacks,o=r.data,a=r.key,s=r.layout,l=r.resources,c=r.settings,u=r.style;return XH({callbacks:i,data:o,dock:s.dock,key:a,rect:t,resources:l,settings:c,state:n,styling:u})},tV={renderer:"react",require:["renderer"],disableTriggers:!0,key:"axis-title",defaultSettings:{callbacks:{onChange:function(){}},data:{alternatives:[],infos:[],filtered:[]},resources:{app:void 0,cache:void 0,model:void 0,selections:void 0,translator:void 0},settings:{isDisabled:function(){return!1},isRTL:!1,isSnapshot:!1,noModelDependencies:!1,skipAttributeExpressions:!1,type:"dimension"},style:{title:{color:"#333",fontFamily:ZH,fontSize:QH},popover:{color:"#595959CC",fontFamily:ZH,fontSize:QH}}},preferredSize:function(){var e=this.settings,t=e.data,n=e.settings,r=e.style,i=t.alternatives,o=n.type,a=r.title,s=a.fontSize,l=a.fontFamily,c=i.length||"measure"!==o?28:20,u=this.registries.renderer("svg")().measureText({text:"M",fontSize:s,fontFamily:l}).height;return Math.max(c,u)},created:function(){var e=this;this.state={inSelections:!1},this.listeners={onSelectionsActivated:function(){e.state.inSelections=!0,e.renderer.render(eV(e))},onSelectionsDeactivated:function(){e.state.inSelections=!1}}},beforeMount:function(){var e=this.settings.resources.selections;e&&(e.addListener("activated",this.listeners.onSelectionsActivated),e.addListener("deactivated",this.listeners.onSelectionsDeactivated),e.addListener("canceled",this.listeners.onSelectionsDeactivated))},render:function(){return eV(this)},beforeUnmount:function(){var e=this.settings.resources.selections;e&&(e.removeListener("activated",this.listeners.onSelectionsActivated),e.removeListener("deactivated",this.listeners.onSelectionsDeactivated),e.removeListener("canceled",this.listeners.onSelectionsDeactivated))}},nV=function(e){var t=e.dock,n=e.settings.label,r="center"===t,i=r?{}:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"};return XA.createElement("span",{style:i,title:n},r?n:"* ".concat(n))},rV={renderer:"react",disableTriggers:!0,key:"disclaimer",defaultSettings:{settings:{isRTL:!1,label:void 0},style:{fontFamily:'"Source Sans Pro", "Arial", "sans-serif"'}},preferredSize:function(){return 22},render:function(){var e=this.rect,t=this.settings,n=t.layout,r=t.settings,i=t.style;return function(e){var t=e.dock,n=e.rect,r=e.settings,i=e.styling,o=function(e){var t=e.dock;return"top"!==t&&"bottom"!==t||!e.isRTL?"ltr":"rtl"}({dock:t,isRTL:r.isRTL}),a=function(e){var t=e.dock,n=e.rect,r={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",color:"#7b7a78",fontStyle:"italic",fontSize:"13px",fontFamily:e.styling.fontFamily};return"left"===t&&(r.width="".concat(n.height,"px"),r.transform="rotate(-90deg) translate(-".concat(n.height,"px, 0)"),r.transformOrigin="top left"),"right"===t&&(r.width="".concat(n.height,"px"),r.transform="rotate(90deg) translate(0, -".concat(n.width,"px)"),r.transformOrigin="top left"),"center"===t&&(r.width="".concat(n.width,"px"),r.height="".concat(n.height,"px"),r.color="#595959",r.fontStyle="normal",r.fontSize="1.2em",r.textAlign="center"),"bottom"!==t&&"top"!==t||(r.justifyContent="flex-start",r.alignItems="flex-start"),r}({dock:t,rect:n,styling:i});return XA.createElement("div",{dir:o,style:a},XA.createElement(nV,{dock:t,settings:r}))}({dock:n.dock,rect:e,settings:r,styling:i})}},iV={},oV=function(){if(JH)return iV;JH=1;var e=TF;return iV.createRoot=e.createRoot,iV.hydrateRoot=e.hydrateRoot,iV}(),aV=$z({spacing:8,shadows:["none","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)"],transitions:{easing:{easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},duration:{standard:300,short:250,enteringScreen:225,shorter:200,leavingScreen:195,shortest:150,complex:375}},typography:{fontSize:14,fontWeightLight:300,fontWeightRegular:400,fontWeightMedium:600,fontWeightBold:700,htmlFontSize:14,fontFamily:"'Source Sans Pro', 'HelveticaNeue', 'Helvetica Neue', Helvetica, Arial, sans-serif",button:{fontWeight:600,fontSize:14,textTransform:"none"}},shape:{borderRadius:3},components:{MuiButtonBase:{defaultProps:{disableRipple:!0,disableTouchRipple:!0,focusVisibleClassName:"qcm-focus-visible"}},MuiButton:{defaultProps:{color:"inherit",disableRipple:!0,focusVisibleClassName:"qcm-focus-visible"},styleOverrides:{root:{height:"32px",lineHeight:"16px",minWidth:"24px",fontSize:141,borderRadius:3,"& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},text:{padding:"8px 16px","&:active":{backgroundColor:"rgba(0, 0, 0, 0.1)"},"&.Mui-focusVisible":{boxShadow:"inset 0 0 0 2px ".concat("#177FE6")}},outlined:{border:"1px solid rgba(0, 0, 0, 0.15)"},sizeSmall:{fontSize:12,height:"24px","& > svg:only-child, & > i:only-child":{marginLeft:"-7px",marginRight:"-7px"}},sizeLarge:{fontSize:16,height:"40px",lineHeight:"20px","& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},textSizeSmall:{padding:"4px 11px"},textSizeLarge:{padding:"10px 19px"}},variants:[]},MuiList:{styleOverrides:{padding:{paddingTop:"0px",paddingBottom:"0px"}}},MuiListItemButton:{styleOverrides:{root:{fontSize:14,height:"32px"}}},MuiListItemIcon:{styleOverrides:{root:{color:"#404040",minWidth:"16px",marginRight:"16px"}}},MuiListItemText:{styleOverrides:{root:{fontSize:"12px"},primary:{fontSize:14,color:"#404040",lineHeight:"16px",fontWeight:600},secondary:{fontSize:12,color:"#737373",fontWeight:400,lineHeight:"16px"}}}}});function sV(e){var t={x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1},margin:{left:0,top:0}},n=e||{},r=n.x,i=n.y,o=n.width,a=n.height,s=n.scaleRatio,l=n.margin;return t.x=Number.isNaN(r)||void 0===r?t.x:r,t.y=Number.isNaN(i)||void 0===i?t.y:i,t.width=Number.isNaN(o)||void 0===o?t.width:o,t.height=Number.isNaN(a)||void 0===a?t.height:a,void 0!==s&&(t.scaleRatio.x=Number.isNaN(s.x)?t.scaleRatio.x:s.x,t.scaleRatio.y=Number.isNaN(s.y)?t.scaleRatio.y:s.y),void 0!==l&&(t.margin.left=Number.isNaN(l.left)?0:l.left,t.margin.top=Number.isNaN(l.top)?0:l.top),t}function lV(){var e={rendererBox:sV(),container:void 0,root:void 0},t=function(){var t,n;null===(t=e.root)||void 0===t||t.unmount(),null===(n=e.container)||void 0===n||null===(n=n.parentElement)||void 0===n||n.removeChild(e.container),e.container=void 0};return{size:function(t){return t&&(e.rendererBox=sV(t)),e.rendererBox},element:function(){return e.container},appendTo:function(t){return e.container||(e.container=document.createElement("div"),e.container.style.position="absolute",e.container.style["-webkit-font-smoothing"]="antialiased",e.container.style["-moz-osx-font-smoothing"]="antialiased",e.container.style.pointerEvents="none",e.root=oV.createRoot(e.container)),t.appendChild(e.container),e.container},setKey:function(t){e.container&&e.container.setAttribute("data-key",t)},render:function(t){if(!e.container)return!1;var n=e.rendererBox,r=n.scaleRatio.x,i=n.scaleRatio.y;return e.container.style.left="".concat(Math.round(n.margin.left+n.x*r),"px"),e.container.style.top="".concat(Math.round(n.margin.top+n.y*i),"px"),e.container.style.width="".concat(Math.round(n.width),"px"),e.container.style.height="".concat(Math.round(n.height),"px"),e.container.style.transform="scale(".concat(r,", ").concat(i,")"),e.container.style.transformOrigin="top left",e.root.render(function(e){var t=e.nodes;return XA.createElement(XA.StrictMode,null,XA.createElement(cF,{theme:aV},t))}({nodes:t})),!0},findShapes:function(){return[]},itemsAt:function(){return[]},clear:function(){t()},destroy:function(){t()}}}const cV={getDefaultSettings:({size:e=10,fill:t="#999",alignment:n}={})=>({show:!0,type:"n-polygon",fill:t,stroke:"#000",strokeWidth:0,size:e,sides:3,startAngle:-90,alignment:n}),createOob({oob:e,dockValue:t,boxCenter:n,rendWidth:r,rendHeight:i,flipXY:o,symbol:a}){let s="x",l="y",c=r,u=i,d=t<.5?90:-90;return o&&(s="y",l="x",c=i,u=r,d=t<.5?180:0),a(bg({},e,{[s]:n*c,[l]:u-Math.max(e.size/2,Math.min(t*u,u-e.size/2)),startAngle:d}))}};function uV({i:e,width:t,height:n,resolved:r,keys:i,flipXY:o,calcKey:a="box"}){let s,l=null,c=null;void 0!==r.major.settings.binStart?(l=r.major.items[e].binStart,c=r.major.items[e].binEnd,s=r.major.settings.binStart.scale):(s=r.major.settings.major.scale,l=s?r.major.items[e].major:0);let u=0;s?s.bandwidth?(u=s.bandwidth(),l-=u/2):u=c-l:u=1;const d=bg({},{major:l,majorEnd:c},r.minor.items[e]);i.forEach(t=>{d[t]=r[t].items[e]});const f=o?n:t,h=function({bandwidth:e,width:t,minWidthPx:n,maxWidthPx:r,maxMajorWidth:i}){const o=e>=0?1:-1;let a=Math.min(o*e*t,Number.isNaN(Number(r))?i:r/i);return a=Number.isNaN(Number(n))?a:Math.max(n/i,a),a*o}({bandwidth:u,width:d[a].width,minWidthPx:d[a].minWidthPx,maxWidthPx:d[a].maxWidthPx,maxMajorWidth:f}),p=(u-h)/2,m=p+d.major+h/2;return{item:d,boxCenter:m,boxWidth:h,boxPadding:p,rendWidth:t,rendHeight:n}}function dV({keys:e,data:t,defaultSettings:n,style:r,settings:i,width:o,height:a,resolver:s}){const l=bg(!0,{},n||{},r||{}),c={major:"horizontal"===i.orientation?a:o,minor:"horizontal"===i.orientation?o:a},u=i.major;let d;d="object"==typeof u&&"object"==typeof u.ref&&void 0!==u.ref.start&&void 0!==u.ref.end?s.resolve({data:t,defaults:{start:0,end:1},scaled:c,settings:bg(!0,{},{binStart:{scale:i.major.scale,ref:i.major.ref.start},binEnd:{scale:i.major.scale,ref:i.major.ref.end}})}):"object"==typeof u&&void 0!==u.binStart&&void 0!==u.binEnd?s.resolve({data:t,defaults:{start:0,end:1},scaled:c,settings:bg(!0,{},{binStart:{scale:i.major.scale,ref:"binStart"},binEnd:{scale:i.major.scale,ref:"binEnd"}},i.major)}):s.resolve({data:t,scaled:c,defaults:{major:.5},settings:{major:i.major}});const f=i.minor||{};let h;const p={major:d,minor:s.resolve({data:t,defaults:{start:0,end:1},scaled:c,settings:bg(!0,{},{start:{scale:f.scale,ref:"start"},end:{scale:f.scale,ref:"end"},min:{scale:f.scale,ref:"min"},max:{scale:f.scale,ref:"max"},med:{scale:f.scale,ref:"med"}},f)})};for(let n=0,r=e.length;n<r;n++)h=e[n],p[h]=s.resolve({data:t,defaults:l[h],settings:i[h],scaled:c});return p}const fV=["oob"];const hV={require:["chart","resolver","symbol"],defaultSettings:{settings:{size:10},data:{},style:{}},created(){this.state={}},preferredSize(){return this.settings.settings.size},render(){const{width:e,height:t}=this.rect,{dockValue:n}=this.settings.settings,r="horizontal"===this.settings.settings.orientation,{data:i,style:o,resolver:a,symbol:s}=this,l=dV({keys:fV,data:i,defaultSettings:{oob:cV.getDefaultSettings()},style:o,settings:this.settings.settings,width:e,height:t,resolver:a}),{settings:c,items:u}=l,d=function({width:e,height:t,flipXY:n,resolved:r,keys:i,symbol:o,dockValue:a,_calcItemRenderingOpts:s=uV}){const l=[],{items:c}=r.major;for(let u=0,d=c.length;u<d;u++){const{item:d,boxCenter:f,rendWidth:h,rendHeight:p}=s({i:u,width:e,height:t,resolved:r,keys:i,flipXY:n,calcKey:"oob"}),m=c[u].data,g=[];if(d.oob.show){g.push(cV.createOob({oob:d.oob,dockValue:a,boxCenter:f,rendWidth:h,rendHeight:p,flipXY:n,symbol:o}));const e={type:"container",data:m,collider:{type:"bounds"},children:g};l.push(e)}}return l}({width:e,height:t,flipXY:r,resolved:l,keys:fV,symbol:s,dockValue:n});return d}},pV={size:25,hat:{show:!0,fill:"#999",stroke:"#000",strokeWidth:0,strokeLinejoin:"miter",width:1,maxWidthPx:void 0,minWidthPx:1,minHeightPx:1,alignment:0}},mV=["hat"];function gV(e,t=!0){let n="";for(let t=0;t<e.length;t++){const r=e[t];n+=0===t?`M${r.x} ${r.y}`:`L${r.x} ${r.y}`,n+=" "}return t&&(n+="Z"),n}function yV({item:e,boxWidth:t,boxPadding:n,rendWidth:r,rendHeight:i,flipXY:o}){let a="x",s="y",l=r,c=i,u=e.hat.alignment||0;o&&(a="y",s="x",l=i,c=r,u=1-u);const d=(n+e.major)*l;let f=[{[a]:d,[s]:0+c},{[a]:d+t*u*l,[s]:8},{[a]:d+t*l,[s]:0+c},{[a]:d+t*l,[s]:0+c+10},{[a]:d,[s]:0+c+10}];const h=bg({},e.hat,{type:"path",d:gV(f)});f=[{[a]:d,[s]:0},{[a]:d+t*(1-u)*l,[s]:0+c-8},{[a]:d+t*l,[s]:0},{[a]:d+t*l,[s]:-10},{[a]:d,[s]:-10}];return[h,bg({},e.hat,{type:"path",d:gV(f)})]}const vV={require:["chart","resolver","symbol"],defaultSettings:{settings:{size:25},data:{},style:{hat:"$shape"}},created(){this.state={}},preferredSize(){return this.settings.settings.size},render(){const{width:e,height:t}=this.rect,n="horizontal"===this.settings.settings.orientation,{data:r,style:i,resolver:o}=this,a=dV({keys:mV,data:r,defaultSettings:pV,style:i,settings:this.settings.settings,width:e,height:t,resolver:o}),{settings:s,items:l}=a,c=function({width:e,height:t,flipXY:n,resolved:r,keys:i,_calcItemRenderingOpts:o=uV}){const a=[],{items:s}=r.major;for(let l=0,c=s.length;l<c;l++){const{item:c,boxWidth:u,boxPadding:d,rendWidth:f,rendHeight:h}=o({i:l,width:e,height:t,resolved:r,keys:i,flipXY:n,calcKey:"hat"}),p=s[l].data,m=[];c.hat.show&&m.push(...yV({item:c,boxWidth:u,boxPadding:d,rendWidth:f,rendHeight:h,flipXY:n}));const g={type:"container",data:p,collider:{type:"bounds"},children:m};a.push(g)}return a}({width:e,height:t,flipXY:n,resolved:a,keys:mV});return c}};var bV={defaultSettings:{settings:{size:10}},preferredSize(){return this.settings.settings.size},render:()=>[]};function xV(e,t,n,r){const i=function(t){const n=String(t);return e(n)};return i.ticks=()=>t.map(t=>{const o=i([t.data.value,r?n-1:0]),a=i([t.data.value,r?0:n-1])+e.bandwidth();return{position:(o+a)/2,label:t.label,data:t.data,start:o,end:a}}),i.bandwidth=()=>e.bandwidth(),i.data=()=>e.data(),i.domain=()=>e.domain(),i.pxScale=function(r){const i=e.pxScale(r);return i===e?this:xV(i,t,n)},i}function SV(e){const t=e.scale("band");e.scale("group-by-measure",function(e={},n={},r={}){const i=t(e,n,r),o=i.domain(),a=i.ticks(),s=[],l=e.measureCount;return o.forEach((e,t)=>{for(let t=0;t<l;++t)s.push(String([e,t]));s.push(`SPACER_${t}_SPACER`)}),s.splice(-1),i.domain(s),xV(i,a,l,e.invert)})}function wV(){const e=vp();return e.use(ag),e.use(function(e){if("function"!=typeof e.interaction)return t=>{t.interaction("hammer",cg(e))};e.interaction("hammer",cg(Hammer))}(yg)),e.use(SV),e.renderer("react-qcm",lV),e.component("box-sliced-hat",vV),e.component("box-out-of-bounds",hV),e.component("disclaimer",rV),e.component("scrollbar",$A),e.component("scroll-hint",fO),e.component("reference-line-labels",gN),e.component("axis-overlay",LD.picassoComponents.axisOverlay),e.component("time-axis",LD.picassoComponents.timeAxis),e.component("space",bV),e.component("axis-title",tV),e.component("point-label",pv),e.scale("q-time-axis",LD.picassoScales.time),e}const MV={CUSTOM:{EXPRESSION:"customTooltipExpression",TITLE:"customTooltipTitle",DESCRIPTION:"customTooltipDescription",QUARANTINE:"customTooltip",IMAGES:"customTooltipImages"},CHART:{CONTAINER_ID:"tooltipContainerId",STATE:"customTooltipSessionState",CHART_OBJECT_ID:"customTooltipSessionObjectId",CHART_PARENT_TYPE:"TooltipChartParent",CHART_CHILD_TYPE:"TooltipChart",STYLE:{small:"140px",medium:"200px",large:"340px"}}};function kV(e){const t=e.split("/");return"qmem:"===t[0]&&""===t[1]}const CV={getImageSize(e,t){let n;function r(){n&&(clearTimeout(n),n=null)}function i(e){const t=e;t.onload=null,t.onerror=null,r()}const o={small:50,medium:200,large:340,original:340};return new Promise(a=>{const s=new Image;s.referrerPolicy="no-referrer",s.onload=()=>{let e;const{height:n,width:l}=s,c=o[t]*(n>l?1:n/l),u=o[t]*(l>n?1:l/n);!n||!l||0===n&&0===l?(e={height:20,width:20,imageError:!0},i(s)):"original"===t?(e={height:Math.min(c,n),width:Math.min(u,l)},r()):(e={height:c,width:u},r()),a(e)},s.onerror=()=>{i(s),a({height:20,width:20,imageError:!0})},s.src=e,n=setTimeout(()=>{i(s),a({height:20,width:20,imageError:!0})},3e3)})}};async function qV(e,t,n){let r=e.ref.qStaticContentUrl.qUrl;const i=function(e){let t,n,r,i,o,a;if(e&&(e.session?.options||e.enigmaModel?.session?.sessionConfig||e.session?.config?.url)){if(t=e.session.options||e.enigmaModel?.session.sessionConfig,!t){t=e.session?.config;const n=new URL(t.url);t.host=n.hostname,t.port=n.port,t.isSecure="wss:"===n.protocol}return a=void 0!==t.secure?t.secure:t.isSecure,n=a?"https://":"http://",r=t.host||"localhost",i=t.port?`:${t.port}`:"",o=t.prefix?t.prefix:"/","/"!==o[o.length-1]&&(o=`${o}/`),n+r+i+o}return""}(n);i&&(!function(e,t){const n=e.replace(t,"").replace(/^\.\.\//i,"/");n[0]}(r,i),r=r.replace(/"/g,'\\"'),r=r.replace(/'/g,"\\'"),r=function(e,t){return t+("/"===e[0]?e.substr(1):e)}(r,i));const{height:o,width:a,imageError:s}=await CV.getImageSize(r,t);return{src:r,size:t,height:o,width:a,imageError:s}}async function EV(e,t,n,r){const{app:i,flags:o}=t,a=e.layout?.tooltip?.imageComponents;if(!a)return[];const[s]=a,l=s.size||"small",c=s.type||"media";let u=-1;for(let e=0;e<n.length;e++)if(n[e].cId===s.cId){u=e;break}const d=r.data?.customTooltipAttrExps?.value||[];let f;if(-1!==u&&d[u]&&(f=d[u]),"media"===c&&s.ref?.qStaticContentUrl?.qUrl)return qV(s,l,i);if("url"===c)return async function(e,t,n,r,i){let o,a=n.ref;if(i&&i.label&&(a=i.label),t.isEnabled("IMAGE_BUNDLE_LOAD")&&e?.getImage&&kV(a))try{const t=`data:image/png;base64, ${await e.getImage(a)}`,{height:n,width:i,imageError:s}=await CV.getImageSize(t,r);o={src:t,size:r,height:n,width:i,imageError:s}}catch(e){}else{const{height:e,width:t,imageError:n}=await CV.getImageSize(a,r);o={src:a,size:r,height:e,width:t,imageError:n}}return o}(i,o,s,l,f);if(o.isEnabled("IMAGE_BUNDLE_LOAD")&&"field"===c&&f&&f.label){return async function(e,t,n,r){let i;const o=r.label,a=`qmem://${t.qFallbackTitle}/${o}`;if(kV(a))try{const t=await e.getImage(a);if(t){const e=`data:image/png;base64, ${t}`,{height:r,width:o,imageError:a}=await CV.getImageSize(e,n);i={src:e,size:n,height:r,width:o,imageError:a}}}catch(e){}return i}(i,n[u],l,f)}return[]}const DV={async addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){const i=t,o=[];for(let t=0;t<i.length;t++)o.push(EV(e,r,n,i[t]));const a=await Promise.all(o);for(let e=0;e<i.length;e++)i[e].data.customTooltipImages=[a[e]];return i},checkIfPromisesExist({customTooltipModel:e}){const t=e.layout?.tooltip?.imageComponents;return!!t&&t.length>0}},TV={async handlePromises({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){let i=t;return i=await DV.addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}),i},checkIfPromisesExist:({customTooltipModel:e})=>DV.checkIfPromisesExist({customTooltipModel:e})};const OV=(e,t)=>{const n=e?.qHyperCubeDef?.qDimensions,r=e?.qHyperCubeDef?.qMeasures,i=e?.qHyperCubeDef?.qInterColumnSortOrder,o=t;return{qInfo:{qType:MV.CHART.CHART_PARENT_TYPE,qId:MV.CHART.CHART_OBJECT_ID},qHyperCubeDef:{qDimensions:n,qMeasures:r,qInterColumnSortOrder:i,qInitialDataFetch:[{qWidth:0,qHeight:0}]},qStateName:o}},NV=e=>{const t=e.tooltip?.chart?.object?.refId;return{qInfo:{qType:MV.CHART.CHART_CHILD_TYPE},qExtendsId:t}};const AV={createContainer:({ctx:e,layout:t})=>{if(!(t.qHyperCube?.qDimensionInfo?.length<=0))return function(e,t){const n=t.tooltip?.chart?.style?.size??"medium",r=MV.CHART.STYLE[n];return[{content:[e.h("div",{style:{display:"flex",width:r,height:r,backgroundColor:"#FFFFFF",borderRadius:"5px",padding:"2px",color:"#595959"},colspan:2,id:MV.CHART.CONTAINER_ID})],colspan:2,style:{"text-align":e.rtl?"right":"left","max-width":r}},{}]}(e,t)},show:async({app:e,properties:t,selectedNodes:n,dimIndex:r,customTooltipModel:i,rtl:o})=>{const a=i,s=t?.tooltip?.chart?.object?.refId;if(a?.embed&&e.removeSessionAlternateState&&e.addSessionAlternateState&&s&&!(t.qHyperCubeDef.qDimensions.length<=0)){await AV.hide({app:e,customTooltipModel:i});try{await async function({app:e,properties:t,customTooltipModel:n}){const r=n,i=MV.CHART.STATE,o=t.qStateName;r.miniChartToken.alternateState||(r.miniChartToken.alternateState=i,await e.addSessionAlternateState(i,o),r.miniChartToken.alternateState=i)}({app:e,properties:t,customTooltipModel:i});const s=await async function({app:e,properties:t,customTooltipModel:n}){const r=n;r.miniChartToken.sessionObj?.id&&await e.destroySessionObject(r.miniChartToken.sessionObj.id);const i=MV.CHART.STATE,o=OV(t,i),a=await e.createSessionObject(o),s=NV(t);if(a.id!==MV.CHART.CHART_OBJECT_ID)return void e.destroySessionObject(a.id);r.miniChartToken.sessionObj=a;const l=await a.createChild(s);if(r.miniChartToken.sessionObj&&r.miniChartToken.sessionObj.id===a.id)return r.miniChartToken.model=l,l;e.destroySessionObject(a.id)}({app:e,properties:t,customTooltipModel:i});if(a.miniChartToken.alternateState&&a.miniChartToken.sessionObj&&s){const e=n.length>0&&void 0!==n[0].data?.value?[n[0].data?.value]:[],s=void 0!==r?r:t.qHyperCubeDef.qDimensions.length-1;if(2===t.qHyperCubeDef.qDimensions.length&&void 0===r&&n.length>0){const e=n[0].data.selectionOuterDimension??n[0].data.selectionDimension;if(e?.source?.field){const t=e?.source?.field.split("/"),n=t[t.length-1],r=void 0!==e.value?[e.value]:[];r.length>0&&void 0!==n&&a.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",Number(n),r,!1)}}e.length>0&&a.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",s,e,!1);const l=document.getElementById(MV.CHART.CONTAINER_ID),c={direction:o?"rtl":"ltr",isReadonly:!0,isPopover:!0,navigation:!1,selections:!1};a.miniChartToken.vis=await i.embed.render({element:l,model:a.miniChartToken.model,options:c,id:a.miniChartToken.model?.id,type:a.miniChartToken.model?.genericType})}}catch(t){await AV.hide({app:e,customTooltipModel:i})}}},hide:async({app:e,customTooltipModel:t})=>{const n=t;n?.embed&&(AV.destroyVisualization({customTooltipModel:t}),await e.destroySessionObject(MV.CHART.CHART_OBJECT_ID),n.miniChartToken.sessionObj=void 0,await async function({app:e,customTooltipModel:t}){const n=t,r=MV.CHART.STATE;n.miniChartToken.alternateState=void 0,await e.removeSessionAlternateState(r)}({app:e,customTooltipModel:t}))},destroyVisualization:({customTooltipModel:e})=>{const t=e;"function"==typeof t.miniChartToken?.vis?.destroy&&(t.miniChartToken.vis.destroy(),t.miniChartToken.vis=void 0)}};function _V(e){const t=e.qHyperCubeDef?e.qHyperCubeDef.qDimensions:e.qHyperCube.qDimensionInfo;if(t&&t.length>0)return t}function IV(){const{EXPRESSION:e,TITLE:t,DESCRIPTION:n,IMAGES:r}=MV.CUSTOM,i={};return i[e]=!0,i[t]=!0,i[n]=!0,i[r]=!0,i}function LV(e){const t=IV();return e.filter(e=>t[e.id])}const PV={getNodes(e,t){const n=function(e,t){let n=0,r=0;e.center?(n+=e.center.x,r+=e.center.y):(n+=e.clientX,r+=e.clientY);const i=t.element.getBoundingClientRect();return{cx:n-i.left,cy:r-i.top}}(e,t);return t.shapesAt({x:n.cx,y:n.cy})},getDataNodes(e,t){let n,r=[];const i={container:{bar:!0,"bullet-axis":!0},circle:{"point-component":!0}};return t.forEach(t=>{const o=t.data?.selectionDimension??t.data;if(!o||t.data?.customTooltipAttrExps||i[t.type]){if(t.data?.customTooltipAttrExps&&!t.data.customTooltipImages){const e=t;e.data.customTooltipImages=[],r.push(e)}}else{n||(n=[],Object.keys(i).forEach(t=>{n=n.concat(e.findShapes(t).filter(e=>e.data&&e.data.customTooltipAttrExps&&!e.data.customTooltipImages&&i[t][e.key]))}));const t=n.filter(e=>{const t=e.data.stack??e.data.selectionOuterDimension??e.data.selectionDimension;return t&&t.value===o.value&&t.label===o.label});t.length>0&&(r=r.concat(t[0]))}}),r},displayTooltip(e,t,{nodes:n,opts:r={},customTooltipModel:i,extractedNodes:o=[],hide:a}){if(i&&!a){const{layout:a,chart:s}=i,{attrExps:l}=PV.getAttrExprData(a);o.length||n.length?TV.handlePromises({customTooltipModel:i,nodes:PV.getDataNodes(s,o.length>0?o:n),attrExps:l,opts:r}).then(()=>{t.emit("show",e,n.length?{nodes:n}:void 0)}):t.emit("show",e,n.length?{nodes:n}:void 0)}else i?.miniChartToken?.alternateState&&AV.hide({app:r.app,customTooltipModel:i}),t.emit("hide")},checkIfPromisesExist:({customTooltipModel:e})=>TV.checkIfPromisesExist({customTooltipModel:e}),getAttrExps(e,t){const n=t,r=e.qHyperCubeDef?.qDimensions?"qAttributeExpressions":"qAttrExprInfo";return n[r]||(n[r]=[]),n[r]},getAttrExprData(e){let t=[],n="";const r=e.qHyperCube?.qDimensionInfo||[];if(r.length>0){const i=r.length-1;t=e.qHyperCube?.qDimensionInfo?.[i]?.qAttrExprInfo||[],n=`qDimensionInfo/${i}/qAttrExprInfo`}return{attrExps:t,fieldPath:n}},quarantineCustomTooltipAttrs(e,t={}){const n=e.qLayoutExclude?.quarantine?.[MV.CUSTOM.QUARANTINE];if(!n){!function(e,t){const n=t;let r=n.qLayoutExclude;r||(n.qLayoutExclude={quarantine:{}},r=n.qLayoutExclude),r.quarantine||(r.quarantine={}),r.quarantine[MV.CUSTOM.QUARANTINE]=[],e.forEach(e=>{r.quarantine[MV.CUSTOM.QUARANTINE].push(e)}),n.qLayoutExclude=r}(LV(t.qAttributeExpressions||[]),e)}},unquarantineCustomTooltipAttrs(e){const t=e,n=e.qLayoutExclude?.quarantine?.[MV.CUSTOM.QUARANTINE];n&&delete t.qLayoutExclude.quarantine[MV.CUSTOM.QUARANTINE]},setAttrsFromQuarantine(e,t){const n=_V(e);if(!n)return;const r=void 0!==t?t:n.length-1;if(!n[r])return;const i=this.getAttrExps(e,n[r]);if(0===LV(i).length){const t=e.qLayoutExclude?.quarantine?.customTooltip||[],n=[...i,...t],o=e;o.qHyperCubeDef?o.qHyperCubeDef.qDimensions[r].qAttributeExpressions=n:o.qHyperCube.qDimensionInfo[r].qAttrExprInfo=n}},moveCustomTooltipAttrs(e,t={},n=void 0){let r=[];const i=_V(e)||[];[...i,t].forEach(e=>{const t=LV(e.qAttributeExpressions||[]);t.length>0&&(r=t)});const o=IV(),a=i.map(e=>{const t=e,n=e.qAttributeExpressions||[];return t.qAttributeExpressions=n.filter(e=>!o[e.id]),t}),s=void 0!==n?n:a.length-1;a.length>0&&(a[s].qAttributeExpressions=a[s].qAttributeExpressions.concat(r));const l=e;e.qHyperCubeDef?l.qHyperCubeDef.qDimensions=a:l.qHyperCube.qDimensionInfo=a},addCallbackCustomTooltip(e){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e):(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},moveCallbackCustomTooltip(e,t){1===e.qHyperCubeDef.qDimensions.length&&(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e)),e.qHyperCubeDef.qDimensions.length>1&&this.moveCustomTooltipAttrs(e,t)},removeCallbackCustomTooltip(e,t){e.qHyperCubeDef.qDimensions.length>0?this.moveCustomTooltipAttrs(e,t):this.quarantineCustomTooltipAttrs(e,t)},replaceCallbackCustomTooltip(e,t){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e,t):(this.quarantineCustomTooltipAttrs(e,t),this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},shouldIgnoreDefaultRows:e=>e.tooltip?.hideBasic||0,DEBOUNCE_THRESHOLD:50,getFooterRow:(e,t)=>[{content:e,style:{"font-style":"italic","font-size":"12px","line-height":"16px",color:"rgba(255, 255, 255, 0.6)","text-align":t?"right":"left",direction:cT.detectTextDirection(e)},colspan:2},{}],getImageRow(e,t){const n=cT.detectTextDirection(e.src),r=[],i={style:{display:"block","margin-left":"auto","margin-right":"auto",overflow:"hidden",width:e.width,height:e.height}};if("original"===e.size||e.imageError){r.push(t.h("span",{style:{display:"inline-block",height:"100%","vertical-align":"middle"}}));const n=e.imageError?`${e.src}?${Math.random()}`:e.src;r.push(t.h("img",{style:{"max-width":e.width,"max-height":e.height,"vertical-align":"middle"},src:n,referrerpolicy:"no-referrer"})),i.style["text-align"]="center",i.style["white-space"]="nowrap"}else i.style["background-size"]="contain",i.style["background-repeat"]="no-repeat",i.style["background-position"]="center",i.style["background-image"]=`url('${e.src}')`;return[{content:[t.h("div",i,r),""],style:{"text-align":t.rtl?"right":"left",direction:n,"max-width":e.width},colspan:2},{}]}};function RV({layout:e,app:t,picasso:n,model:r,chart:i,translator:o,localeInfo:a,embed:s}){return{layout:e,app:t,picasso:n,model:r,chart:i,translator:o,localeInfo:a,useCustomTooltip:e.tooltip&&!e.tooltip.auto,utils:PV,miniChartToken:{},embed:s}}function zV(e,t,n,r){const i=t.qHyperCube?.[n]?.[r]?.qAttrExprInfo||[],o=[],a=e.qSubNodes&&e.qSubNodes[r]?e.qSubNodes[r].qAttrExps:e.qAttrExps;return a?(i.forEach((e,t)=>{const i=a.qValues&&a.qValues[t]?a.qValues[t]:void 0,s=void 0===i?"NaN":function(e,t){let n;switch(e.id){case MV.CUSTOM.EXPRESSION:n="NaN"===t.qNum||e.isCustomFormatted?void 0===t.qText?"NaN":t.qText:t.qNum;break;case MV.CUSTOM.TITLE:case MV.CUSTOM.DESCRIPTION:case MV.CUSTOM.IMAGES:n=void 0===t.qText?e.qFallbackTitle:t.qText;break;default:n="NaN"}return n}(e,i);o.push({source:{key:"qHyperCube",field:`${n}/${r}/qAttrExprInfo/${t}`},label:s,value:"value"})}),o):o}const FV={getNode(e,{dimensionCount:t}){if(!t||t<1)return;const n=t-1,r="qDimensionInfo";return{field:`${r}/${n}`,value:t=>zV(t,e,r,n)}}};const jV={getCustomAttrExps(e,t,n){const r={customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]},i=t.data?.customTooltipAttrExps?.value||[];if(Number.isNaN(i))return r;return function(e,t,n,r){const i={[MV.CUSTOM.TITLE]:!0,[MV.CUSTOM.DESCRIPTION]:!0},{attrExps:o,fieldPath:a}=PV.getAttrExprData(e);return 0===t.length||0===o.length||""===a||o.forEach((e,o)=>{const s=t[o];if(e.id===MV.CUSTOM.EXPRESSION&&s){const t=e.qFallbackTitle,i="NaN"===s.value||e.isCustomFormatted?s.value:n("qHyperCube").field(`${a}/${o}`).formatter()(s.value);r.customTooltipAttrExpsArr.push({label:t,value:i})}else if(i[e.id]&&s){const t="-"!==s.value&&"NaN"!==s.value?s.value:s.label;t&&"undefined"!==t&&r.customTooltipInfoAttrExpsArr.push({...e.id===MV.CUSTOM.TITLE&&{title:t},value:t,id:e.id})}}),r}(n,i.map(t=>uT.getMeasure(e,t)),e,r)}};function BV({nodes:e,layout:t,dataset:n}){const r=function(e,t,n){const r=[];return e.forEach(e=>{r.push(jV.getCustomAttrExps(n,e,t))}),r}(e,t,n);return r.reduce((e,t)=>({customTooltipAttrExpsArr:e.customTooltipAttrExpsArr.concat(t.customTooltipAttrExpsArr),customTooltipInfoAttrExpsArr:e.customTooltipInfoAttrExpsArr.concat(t.customTooltipInfoAttrExpsArr)}),{customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]})}function HV(e){const t=MV.CUSTOM.EXPRESSION,{qNumFormat:n,qLabel:r,qLabelExpression:i,cId:o}=e.qDef;return e.qLibraryId?{qLibraryId:e.qLibraryId,id:t,qNumFormat:n,qLabel:r,qLabelExpression:i,cId:o}:{qExpression:e.qDef.qDef,id:t,qNumFormat:n,qLabel:r,qLabelExpression:i,cId:o}}function VV(e){const t=e.qHyperCubeDef?.qDimensions;return t[t.length-1].qAttributeExpressions||[]}const $V={migrateProperties(e){const t=bg(!0,{},e),n=t.tooltip?.data?.qHyperCubeDef?.qMeasures||[];let r=VV(t);return r=function(e,t){return t.concat(e.map(e=>HV(e)))}(n,r),function(e,t){const n=t.qHyperCubeDef?.qDimensions;n[n.length-1].qAttributeExpressions=e}(r,t),delete t.tooltip?.data,t},getPatches(e){const t=e.tooltip?.data?.qHyperCubeDef?.qMeasures||[],n=e.qHyperCubeDef?.qDimensions.length-1,r=function(e,t,n){let r=e.length;const i=[];return t.forEach(e=>{const t=HV(e),o=JSON.stringify(t);i.push({qPath:`/qHyperCubeDef/qDimensions/${n}/qAttributeExpressions/${r}`,qOp:"add",qValue:o}),r++}),i.push({qPath:"/tooltip/data",qOp:"remove"}),i}(VV(e),t,n);return r},checkForBackwardCompatibility:(e,t)=>(e.qMeasureInfo||[]).length>0&&t.length>0,updateProperties(e,t){const n=new Promise(n=>{const r=t.qHyperCube?.qDimensionInfo||[],i=t.tooltip?.data?.qHyperCube||{},o=t.qMeta?.privileges?.includes("update");e&&e.getEffectiveProperties&&this.checkForBackwardCompatibility(i,r)&&e.getEffectiveProperties().then(t=>{if(o){const r=this.migrateProperties(t);e.setProperties(r).then(()=>{e.app.clearUndoBuffer(),n(!0)})}else{const r=this.getPatches(t);e.applyPatches(r,!0).then(()=>{e.app.clearUndoBuffer(),n(!0)})}}),n(!1)});return n}};var WV={attrExpr:$V};const{CUSTOM:UV}=MV;function YV({flags:e,layout:t,app:n,model:r,picasso:i,chart:o,translator:a,localeInfo:s,embed:l,options:c}){const u={properties:void 0},d=RV({layout:t,app:n,model:r,picasso:i,chart:o,translator:a,localeInfo:s,embed:l}),f="rtl"===c.direction,h=()=>{const e=!!u.properties?.qHyperCubeDef?.qDimensions.some(e=>e.qCalcCondition?.qCond?.qv);return!(!t.tooltip||t.tooltip.auto||e)};return{setProperties:e=>{u.properties=e},isEnabled:()=>h(),hideBasic:()=>h()&&Cx(t,"tooltip.hideBasic",!1),getAttributes:({dataset:e,nodes:n})=>{const r=BV({dataset:e,nodes:n,layout:t});return{title:r.customTooltipInfoAttrExpsArr.find(e=>e.id===UV.TITLE)?.title,description:r.customTooltipInfoAttrExpsArr.find(e=>e.id===UV.DESCRIPTION)?.value,measures:r.customTooltipAttrExpsArr}},hasImages:()=>PV.checkIfPromisesExist({customTooltipModel:d}),createImageRow:({value:e,h:t})=>PV.getImageRow(e,{h:t,rtl:f}),addImages:({nodes:r})=>{const i=PV.getDataNodes(o,r),{attrExps:a}=PV.getAttrExprData(t);return TV.handlePromises({customTooltipModel:d,nodes:i,attrExps:a,opts:{flags:e,app:n}})},chart:{isEnabled:()=>!!(h()&&t.tooltip?.chart?.object?.refId&&l&&"function"==typeof r?.getEffectiveProperties),hasLimitation:()=>!!n?.isInModalSelection?.(),createContainer:({h:e})=>AV.createContainer({layout:t,ctx:{h:e,rtl:f}}),createLimitationRow:()=>PV.getFooterRow(a.get("properties.tooltip.notselectedmessage"),f),show:({nodes:e,properties:t})=>AV.show({app:n,properties:t,selectedNodes:e,customTooltipModel:d,rtl:f}),hasAlternateState:()=>!!d.miniChartToken?.alternateState,hide:()=>AV.hide({app:n,customTooltipModel:d}),destroy:()=>AV.destroyVisualization({customTooltipModel:d})}}}var KV=7005;const GV=e=>e.qError?.qErrorCode!==KV,XV=e=>{if(e.qHyperCubeDef.qDimensions.length>1&&1===e.qHyperCubeDef.qMeasures.length){const t=e.qHyperCubeDef.qInterColumnSortOrder.indexOf(0);0!==t&&WD.moveArrayElement(e.qHyperCubeDef.qInterColumnSortOrder,t,0)}},JV=(e,t)=>{t>10?1!==e.qHyperCubeDef.qInterColumnSortOrder[0]&&WD.moveArrayElement(e.qHyperCubeDef.qInterColumnSortOrder,1,0):0!==e.qHyperCubeDef.qInterColumnSortOrder[0]&&WD.moveArrayElement(e.qHyperCubeDef.qInterColumnSortOrder,1,0)},ZV=e=>{if(!e.qHyperCubeDef)return;const t=e.qHyperCubeDef.qDimensions,n=e.qHyperCubeDef.qMeasures;1===t.length&&1===n.length&&(n[0].qSortBy.qSortByNumeric=-1,e.qHyperCubeDef.qInterColumnSortOrder.splice(0,e.qHyperCubeDef.qInterColumnSortOrder.length,1,0))},QV=(e,t)=>{const n=e.qHyperCubeDef.qDimensions,r=e.qHyperCubeDef.qMeasures;if(1===n.length&&1===r.length){const r=n[0];return r.qLibraryId?t.getDimension(r.qLibraryId).then(e=>e.getLayout()).then(t=>{if(t&&t.qDimInfos&&t.qDimInfos[0]){const n=t.qDimInfos[0].qCardinal;JV(e,n)}return r}):t.getField(r.qDef.qFieldDefs[0]).then(t=>t.getCardinal().then(t=>(JV(e,t),r)),()=>r)}return XV(e),Promise.resolve()};function e$(e){const t=e.qHyperCubeDef.qDimensions,n=e.qHyperCubeDef.qMeasures,{color:{mode:r}}=e;t.length>1&&e.color?Ex(e,"color.persistent",!0):"byDimension"===r&&n.length>1?Ex(e,"color.mode","byMultiple"):"byExpression"===r&&0===n.length?Ex(e,"color.mode","primary"):0===t.length&&n.length>0&&(Ex(e,"color.byMeasureDef",void 0),Ex(e,"color.byDimDef",void 0),1===n.length&&"byExpression"!==r&&Ex(e,"color.mode","primary"))}const t$=(e,t)=>{e$(t),cO(e),PV.addCallbackCustomTooltip(t)},n$=e=>{e$(e)};function r$({translator:e}){return{dimensions:{min:0,max:e=>e>1?1:2,description(t,n,r,i){let o;const a=i?.layout?i.layout.qHyperCube.qDimensionInfo.filter(e=>GV(e)).length:t.qHyperCubeDef.qDimensions.length;return r.isAutoChart&&n>a-1?o="Visualizations.Descriptions.Color":a>1&&0===n?"stacked"===t.barGrouping.grouping?o="Visualizations.Descriptions.Stack":(o="Visualizations.Descriptions.Group",t.qHyperCubeDef.qColumnOrder=[0,1,2]):o="Visualizations.Descriptions.Bars",e.get(o)},add:(e,t,n)=>(t.qHyperCubeDef.qDimensions.length>1&&"stacked"===t.barGrouping.grouping&&(t.qHyperCubeDef.qMode="K",t.qHyperCubeDef.qAlwaysFullyExpanded=!0),n?.app?QV(t,n.app).then(()=>(t$(e,t),e)):(ZV(t),t$(e,t),e)),move(e,t,n){const r=n.layout.qHyperCube.qDimensionInfo.filter(e=>GV(e)).length;r>1&&"stacked"===t.barGrouping.grouping&&(t.qHyperCubeDef.qMode="K",t.qHyperCubeDef.qAlwaysFullyExpanded=!0),XV(t),e$(t),PV.moveCallbackCustomTooltip(t,e)},remove(e,t){const n=t.qHyperCubeDef.qDimensions;e$(t),1===n.length&&(t.qHyperCubeDef.qMode="S"),PV.removeCallbackCustomTooltip(t,e)},replace(e,t,n,r){PV.replaceCallbackCustomTooltip(r,t)}},measures:{min:1,max:e=>e>1?1:15,description:()=>e.get("Visualizations.Descriptions.LengthBars"),add:(e,t,n)=>n?.app?QV(t,n.app).then(()=>(e.qSortBy.qSortByNumeric=-1,n$(t),e)):(ZV(t),n$(t),e),move(e,t){XV(t),e$(t)},remove(e,t){const n=t.qHyperCubeDef.qDimensions;e$(t),n.length>1&&"stacked"===t.barGrouping.grouping?(t.qHyperCubeDef.qMode="K",t.qHyperCubeDef.qAlwaysFullyExpanded=!0):1===n.length&&(t.qHyperCubeDef.qMode="S")}}}}function i$(e){return{properties:{version:"2.0.2",barGrouping:{grouping:"grouped"},color:{auto:!0,autoMinMax:!0,byDimDef:void 0,byMeasureDef:void 0,colorExpression:void 0,dimensionScheme:"12",expressionIsColor:!0,expressionLabel:"",formatting:{numFormatFromTemplate:!0,isCustomFormatted:void 0},measureMin:void 0,measureMax:void 0,measureScheme:"sg",mode:"primary",paletteColor:{index:6},persistent:!1,reverseScheme:!1,singleColor:void 0,useBaseColors:"off",useDimColVal:!0,useMeasureGradient:!0},components:[],dataPoint:{showLabels:!1,showSegmentLabels:!1,showTotalLabels:!0},dimensionAxis:{axisDisplayMode:"auto",continuousAuto:!0,dock:"near",label:"auto",maxVisibleItems:10,show:"all"},footnote:"",gridLine:{auto:!0,spacing:2},legend:{dock:"auto",show:!0,showTitle:!0},measureAxis:{autoMinMax:!0,dock:"near",max:10,min:0,minMax:"min",show:"all",spacing:1},orientation:"vertical",preferContinuousAxis:!0,qHyperCubeDef:{qDimensions:[],qMeasures:[],qInitialDataFetch:[{qWidth:17,qHeight:500}],qSuppressMissing:!0,qSuppressZero:!1},refLine:{refLines:[],dimRefLines:[]},scrollbar:"miniChart",scrollStartPos:0,showDetails:!0,showDisclaimer:!0,showMiniChartForContinuousAxis:!0,showTitles:!0,subtitle:"",title:"",tooltip:{auto:!0,hideBasic:!1,data:{qHyperCubeDef:void 0},chart:void 0,imageComponents:void 0}},data:{targets:[{path:"/qHyperCubeDef",...r$(e)}]}}}var o$={properties_dataPoints_labelmode_share:{id:"properties.dataPoints.labelmode.share",locale:{"en-US":"Share","zh-TW":"佔有率","zh-CN":"份额","tr-TR":"Pay","sv-SE":"Andel","it-IT":"Percentuale","es-ES":"Cuota","de-DE":"Anteil","pl-PL":"Udział","nl-NL":"Aandeel","ko-KR":"공유","pt-BR":"Percentual","fr-FR":"Part","ja-JP":"割合","ru-RU":"Доля"}},Tooltip_selections_locked:{id:"Tooltip.selections.locked",locale:{"en-US":"Selections on this dimension are locked","zh-TW":"已鎖定此維度上的選項","zh-CN":"相关维度的选择已锁定","tr-TR":"Bu boyuttaki seçimler kilitli","sv-SE":"Urval i den här dimensionen är låsta","it-IT":"Le selezioni in questa dimensione sono bloccate","es-ES":"Las selecciones de esta dimensión están bloqueadas.","de-DE":"Auswahlen sind für diese Dimension gesperrt","pl-PL":"Selekcje dotyczące tego wymiaru są zablokowane","nl-NL":"Selecties voor deze dimensie zijn vergrendeld","ko-KR":"이 차원의 선택은 잠겨 있습니다.","pt-BR":"Seleções estão bloqueadas nesta dimensão","fr-FR":"Sélections verrouillées pour cette dimension","ja-JP":"この軸での選択はロックされています","ru-RU":"Выборки для данного измерения заблокированы"}},Tooltip_dimensions_drilldown:{id:"Tooltip.dimensions.drilldown",locale:{"en-US":"Drill-down dimension","zh-TW":"向下探查維度","zh-CN":"下钻维度","tr-TR":"Detaya inme boyutu","sv-SE":"Hierarkisk dimension","it-IT":"Dimensione di drill-down","es-ES":"Dimensión jerárquica","de-DE":"Drilldown-Dimension:","pl-PL":"Wymiar hierarchiczny","nl-NL":"Drill-downdimensie","ko-KR":"드릴다운 차원","pt-BR":"Dimensão da hierarquia","fr-FR":"Descendre dans la hiérarchie de la dimension","ja-JP":"軸のドリルダウン","ru-RU":"Измерение с детализацией"}},Object_ErrorMessage_MissingDimension:{id:"Object.ErrorMessage.MissingDimension",locale:{"en-US":"Dimension not found","zh-TW":"找不到維度","zh-CN":"未找到维度","tr-TR":"Boyut bulunamadı","sv-SE":"Dimensionen hittades inte","it-IT":"Dimensione non trovata","es-ES":"No se ha encontrado la dimensión","de-DE":"Dimension nicht gefunden","pl-PL":"Wymiar nie został znaleziony","nl-NL":"Dimensie niet gevonden","ko-KR":"차원을 찾지 못했습니다.","pt-BR":"Dimensão não encontrada","fr-FR":"Dimension introuvable","ja-JP":"軸が見つかりません","ru-RU":"Измерение не найдено"}},Object_ErrorMessage_MissingMeasure:{id:"Object.ErrorMessage.MissingMeasure",locale:{"en-US":"Measure not found","zh-TW":"找不到量值","zh-CN":"未找到度量","tr-TR":"Hesaplama bulunamadı","sv-SE":"Måttet hittades inte","it-IT":"Misura non trovata","es-ES":"No se ha encontrado la medida","de-DE":"Kennzahl nicht gefunden","pl-PL":"Miara nie została znaleziona","nl-NL":"Meting niet gevonden","ko-KR":"측정값을 찾지 못했습니다.","pt-BR":"Medida não encontrada","fr-FR":"Mesure introuvable","ja-JP":"メジャーが見つかりません","ru-RU":"Мера не найдена"}},Object_Disclaimer_LimitedData:{id:"Object.Disclaimer.LimitedData",locale:{"en-US":"Currently showing a limited data set.","zh-TW":"目前顯示的是有限的資料集。","zh-CN":"当前正显示有限的数据集。","tr-TR":"Şu anda sınırlı bir veri kümesi gösteriliyor.","sv-SE":"Just nu visas en begränsad uppsättning data.","it-IT":"Attualmente viene visualizzata una serie di dati limitata.","es-ES":"Mostrando actualmente un conjunto limitado de datos.","de-DE":"Zurzeit wird nur ein beschränkter Datensatz angezeigt.","pl-PL":"Aktualnie przedstawiany jest ograniczony zestaw danych.","nl-NL":"Momenteel wordt een beperkte gegevensverzameling getoond.","ko-KR":"현재 제한된 데이터 집합을 표시하고 있습니다.","pt-BR":"Mostrando um conjunto de dados limitado.","fr-FR":"Affichage d'un ensemble de données limité pour l'instant.","ja-JP":"現在、限定的なデータ セットを表示しています。","ru-RU":"В настоящее время отображается ограниченный набор данных."}},Object_Disclaimer_OnlyNegativeOrZeroValues:{id:"Object.Disclaimer.OnlyNegativeOrZeroValues",locale:{"en-US":"The chart is not displayed because it contains only negative or zero values.","zh-TW":"系統不會顯示圖表,因為該圖表僅包含負值或零值。","zh-CN":"未显示图表,因为它仅包含负值或零值。","tr-TR":"Yalnızca negatif veya sıfır değerlerini içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller negativa eller nollvärden","it-IT":"Il grafico non viene visualizzato poiché contiene solo valori negativi o uguali a zero.","es-ES":"El gráfico no se muestra porque sólo contiene valores negativos o valores cero.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur negative oder 0-Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wartości ujemne lub zerowe.","nl-NL":"De grafiek wordt niet weergegeven omdat het alleen negatieve waarden of nulwaarden bevat.","ko-KR":"음수 또는 zero 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores negativos ou zero.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs négatives ou égales à zéro.","ja-JP":"チャートは負の値またはゼロ値しか含まれていないため、表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только отрицательные или нулевые значения."}},Object_Disclaimer_NegativeOrZeroValues:{id:"Object.Disclaimer.NegativeOrZeroValues",locale:{"en-US":"The data set contains negative or zero values that cannot be shown in this chart.","zh-TW":"資料集包含無法在此圖表中顯示的負值或零值。","zh-CN":"数据集中包含无法在此图表中显示的负值或零值。","tr-TR":"Veri kümesi, bu grafikte gösterilemeyen negatif veya sıfır değerlerini içeriyor.","sv-SE":"Datauppsättningen innehåller negativa värden eller nollvärden som inte kan visas i detta diagram.","it-IT":"La serie di dati contiene valori negativi o uguali a zero che non possono essere visualizzati in questo grafico.","es-ES":"El conjunto de datos contiene valores negativos o cero que no se pueden mostrar en este gráfico.","de-DE":"Die in den Datensätzen enthaltenen negativen oder 0-Werte können nicht in diesem Diagramm dargestellt werden.","pl-PL":"Zestaw danych zawiera wartości ujemne lub zerowe, których nie można przedstawić w tym wykresie.","nl-NL":"De gegevensverzameling bevat negatieve waarden of nulwaarden die niet kunnen worden weergegeven in deze grafiek.","ko-KR":"데이터 집합에 해당 차트에 표시할 수 없는 음수 값 또는 zero 값이 포함되어 있습니다.","pt-BR":"O conjunto de dados contém valores negativos ou iguais a zero que não podem ser mostrados neste gráfico.","fr-FR":"L'ensemble de données contient des valeurs négatives ou égales à zéro impossibles à afficher dans ce graphique.","ja-JP":"データ セットには、本チャートに表示できない負の値またはゼロ値が含まれています。","ru-RU":"Набор данных содержит отрицательные или нулевые значения, которые невозможно показать в этой диаграмме."}},Object_Disclaimer_DataRangeIncludingZero:{id:"Object.Disclaimer.DataRangeIncludingZero",locale:{"en-US":"The logarithmic scale has been replaced by a linear scale because the data range includes zero.","zh-TW":"對數刻度已遭線性刻度取代,因為資料範圍包含零。","zh-CN":"对数刻度已替换为线性刻度,因为该数据范围包括零。","tr-TR":"Veri aralığı sıfır değerini içerdiğinden, logaritmik ölçek yerine doğrusal ölçek kullanıldı.","sv-SE":"Den logaritmiska skalan har ersatts av en linjär skala eftersom dataintervallet innehåller värdet noll.","it-IT":"La scala logaritmica è stata sostituita da una scala lineare perché l'intervallo di dati include zero.","es-ES":"La escala logarítmica ha sido reemplazada por una escala lineal porque el rango de datos incluye cero.","de-DE":"Die logarithmische Skala wurde durch die lineare Skala ersetzt, weil der Datenbereich NULL enthält.","pl-PL":"Skala logarytmiczna została zastąpiona liniową, ponieważ zakres danych zawiera zero.","nl-NL":"De logaritmische schaal is vervangen door een lineaire schaal omdat het gegevensbereik nullen bevat.","ko-KR":"데이터 범위에 0이 포함되어 있으므로 로그 눈금이 선형 눈금으로 바뀌었습니다.","pt-BR":"A escala logarítmica foi substituída por uma escala linear, pois o intervalo de dados inclui zero.","fr-FR":"L'échelle logarithmique a été remplacée par une échelle linéaire, car la plage de données comprend la valeur zéro.","ja-JP":"データ範囲にゼロが含まれるため、Log スケールは Linear スケールで置換されています。","ru-RU":"Логарифмический масштаб заменен линейным масштабом, поскольку диапазон данных включает ноль."}},Object_Disclaimer_NoDataExist:{id:"Object.Disclaimer.NoDataExist",locale:{"en-US":"The selections generated no data for this chart.","zh-TW":"此選項無法產生任何適用於此圖表的資料。","zh-CN":"选择未生成此图表的数据。","tr-TR":"Seçimler bu grafik için hiç veri oluşturmadı.","sv-SE":"Urvalen genererade inga data för detta diagram.","it-IT":"Le selezioni non hanno generato dati per questo grafico.","es-ES":"Las selecciones no han generado datos para este gráfico.","de-DE":"Die Auswahlen haben für dieses Diagramm keine Daten generiert.","pl-PL":"Selekcje nie spowodowały wygenerowania danych dla tego wykresu.","nl-NL":"De selecties hebben geen gegevens voor de grafiek gegenereerd.","ko-KR":"선택 내용으로 해당 차트에 대한 데이터가 생성되지 않았습니다.","pt-BR":"As seleções não geraram dados para este gráfico.","fr-FR":"Les sélections n'ont pas généré de données pour ce graphique.","ja-JP":"このチャートには選択からデータが生成されませんでした。","ru-RU":"В результате выборок данные для этой диаграммы не созданы."}},Object_Disclaimer_OnlyNanData:{id:"Object.Disclaimer.OnlyNanData",locale:{"en-US":"The chart is not displayed because it contains only undefined values.","zh-TW":"系統不會顯示圖表,因為該圖表僅包含未定義的值。","zh-CN":"未显示图表,因为它仅包含未定义的值。","tr-TR":"Yalnızca tanımsız değerleri içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller odefinierade värden.","it-IT":"Il grafico non è visualizzato poiché contiene solo valori non definiti.","es-ES":"El gráfico no se muestra porque solo contiene valores indefinidos.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur nicht definierte Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wartości niezdefiniowane.","nl-NL":"De grafiek wordt niet weergegeven omdat deze alleen ongedefinieerde waarden bevat.","ko-KR":"정의되지 않은 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores não definidos.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs non définies.","ja-JP":"未定義の値しか含まれていないため、チャートは表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только неопределенные значения."}},Object_Disclaimer_OnlyNegativeValues:{id:"Object.Disclaimer.OnlyNegativeValues",locale:{"en-US":"The chart is not displayed because it contains only negative values.","zh-TW":"系統不會顯示圖表,因為該圖表僅包含負值。","zh-CN":"未显示图表,因为它仅包含负值。","tr-TR":"Yalnızca negatif değerleri içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det endast innehåller negativa värden.","it-IT":"Il grafico non viene visualizzato poiché contiene solo valori negativi.","es-ES":"El gráfico no se muestra porque solo contiene valores negativos.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur negative oder Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wyłącznie wartości ujemne.","nl-NL":"Het diagram wordt niet weergegeven omdat deze alleen negatieve waarden bevat.","ko-KR":"음수 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não é exibido porque contém apenas valores negativos.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs négatives.","ja-JP":"負の値しか含まれていないため、チャートは表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только отрицательные значения."}},Object_Disclaimer_NegativeValues:{id:"Object.Disclaimer.NegativeValues",locale:{"en-US":"The data set contains negative values that cannot be shown in this chart.","zh-TW":"資料集包含無法在此圖表中顯示的負值。","zh-CN":"数据集包含无法在此图表中显示的负值。","tr-TR":"Veri kümesi, bu grafikte gösterilemeyen negatif değerleri içeriyor.","sv-SE":"Datauppsättningen innehåller negativa värden som inte kan visas i det här diagrammet.","it-IT":"Il set di dati contiene valori negativi che non possono essere visualizzati in questo grafico.","es-ES":"El conjunto de datos contiene valores negativos que no se pueden mostrar en este gráfico.","de-DE":"Die in den Datensätzen enthaltenen negativen Werte können nicht in diesem Diagramm dargestellt werden.","pl-PL":"Zestaw danych zawiera wartości ujemne, których nie można przedstawić na tym wykresie.","nl-NL":"De gegevensverzameling bevat negatieve waarden die niet kunnen worden weergegeven in dit diagram.","ko-KR":"데이터 집합에 해당 차트에 표시할 수 없는 음수 값이 포함되어 있습니다.","pt-BR":"O conjunto de dados contém valores negativos que não podem ser mostrados neste gráfico.","fr-FR":"Le jeu de données contient des valeurs négatives impossibles à afficher dans ce graphique.","ja-JP":"このチャートには表示できない負の値がデータ セットに含まれています。","ru-RU":"Набор данных содержит отрицательные значения, которые нельзя отобразить на этой диаграмме."}},Object_ChartTooltip_NMore:{id:"Object.ChartTooltip.NMore",locale:{"en-US":"+{0} more","zh-TW":"再加 {0} 個","zh-CN":"+{0} 个","tr-TR":"+{0} öğe daha","sv-SE":"+{0} till","it-IT":"Altre +{0}","es-ES":"+{0} más","de-DE":"+{0} mehr","pl-PL":"+ {0} więcej","nl-NL":"+ {0} meer","ko-KR":"+추가 {0}개","pt-BR":"+{0} mais","fr-FR":"+ {0} de plus","ja-JP":"さらに {0}","ru-RU":"+ дополнительно: {0}"}},Object_ChartTooltip_sumOfPositives:{id:"Object.ChartTooltip.sumOfPositives",locale:{"en-US":"Sum of positives","zh-TW":"正數總和","zh-CN":"正值总和","tr-TR":"Pozitif değerlerin toplamı","sv-SE":"Summan av positiva","it-IT":"Somma valori positivi","es-ES":"Suma de positivos","de-DE":"Summe positiver Werte","pl-PL":"Suma dodatnich","nl-NL":"Som positieven","ko-KR":"양수 합계","pt-BR":"Soma de positivos","fr-FR":"Sommes des valeurs positives","ja-JP":"正の合計","ru-RU":"Сумма положительных значений"}},Object_ChartTooltip_sumOfNegatives:{id:"Object.ChartTooltip.sumOfNegatives",locale:{"en-US":"Sum of negatives","zh-TW":"負數總和","zh-CN":"负值总和","tr-TR":"Negatif değerlerin toplamı","sv-SE":"Summan av negativa","it-IT":"Somma valori negativi","es-ES":"Suma de negativos","de-DE":"Summe negativer Werte","pl-PL":"Suma ujemnych","nl-NL":"Som negatieven","ko-KR":"음수 합계","pt-BR":"Soma de negativos","fr-FR":"Somme des valeurs négatives","ja-JP":"負の合計","ru-RU":"Сумма отрицательных значений"}},Object_ChartTooltip_ColorExpression:{id:"Object.ChartTooltip.ColorExpression",locale:{"en-US":"Color expression","zh-TW":"色彩運算式","zh-CN":"颜色表达式","tr-TR":"Renk ifadesi","sv-SE":"Färguttryck","it-IT":"Espressione colore","es-ES":"Expresión de color","de-DE":"Farbformel","pl-PL":"Wyrażenie koloru","nl-NL":"Kleuruitdrukking","ko-KR":"색상 표현식","pt-BR":"Expressão de cor","fr-FR":"Expression de couleur","ja-JP":"カラー表現","ru-RU":"Выражение для цвета"}},Object_Disclaimer_OnlyNanColor:{id:"Object.Disclaimer.OnlyNanColor",locale:{"en-US":"The data used to color this visualization only contains undefined values.","zh-TW":"用以定義此視覺化的色彩的資料只包含未定義的值。","zh-CN":"用于将该可视化着色的数据仅包含未定义的值。","tr-TR":"Bu görselleştirmeyi renklendirmek için kullanılan veriler yalnızca tanımlanmamış değerler içeriyor.","sv-SE":"Data som används för att färgsätta denna visualisering innehåller enbart odefinierade värden.","it-IT":"I dati utilizzati per colorare questa visualizzazione contengono solo valori non definiti.","es-ES":"Los datos utilizados para colorear esta visualización solo contienen valores indefinidos.","de-DE":"Die verwendeten Daten für die Farbgebung dieser Visualisierung enthalten undefinierte Werte.","pl-PL":"Dane używane do kolorowania tej wizualizacji zawierają wyłącznie niezdefiniowane wartości.","nl-NL":"De gegevens die worden gebruikt om deze visualisatie kleur te geven bevatten uitsluitend ongedefinieerde waarden.","ko-KR":"이 시각화에 색을 지정하는 데 사용된 데이터에는 정의되지 않은 값만 포함되어 있습니다.","pt-BR":"Os dados usados para colorir esse visualização contém somente valores indefinidos.","fr-FR":"Les données utilisées pour colorer cette visualisation ne comportent que des valeurs non définies.","ja-JP":"このビジュアライゼーションの色の割り当てに使用したデータには、未定義の値が含まれています。","ru-RU":"Данные, используемые для выбора цвета визуализации, содержат только неопределенные значения."}},properties_trendlines_types_average:{id:"properties.trendlines.types.average",locale:{"en-US":"Average","zh-TW":"平均值","zh-CN":"平均值","tr-TR":"Ortalama","sv-SE":"Medel","it-IT":"Media","es-ES":"Media","de-DE":"Durchschnitt","pl-PL":"Średnia","nl-NL":"Gemiddelde","ko-KR":"평균","pt-BR":"Média","fr-FR":"Moyenne","ja-JP":"平均値","ru-RU":"Среднее"}},properties_trendlines_types_linear:{id:"properties.trendlines.types.linear",locale:{"en-US":"Linear","zh-TW":"線性","zh-CN":"线性","tr-TR":"Doğrusal","sv-SE":"Linjär","it-IT":"Lineare","es-ES":"Lineal","de-DE":"Linear","pl-PL":"Liniowa","nl-NL":"Lineair","ko-KR":"선형","pt-BR":"Linear","fr-FR":"Linéaire","ja-JP":"線形","ru-RU":"Линейный"}},properties_trendlines_types_polynomial2:{id:"properties.trendlines.types.polynomial2",locale:{"en-US":"Second degree polynomial","zh-TW":"第二度多項式","zh-CN":"二次多项式","tr-TR":"İkinci derece polinom","sv-SE":"Polynomial, andra graden","it-IT":"Polinomio di secondo grado","es-ES":"Polinómica de segundo grado","de-DE":"Polynom zweiten Grades","pl-PL":"Wielomianowa drugiego stopnia","nl-NL":"Tweedegraadspolynoom","ko-KR":"2차 다항식","pt-BR":"Polinômio de segundo grau","fr-FR":"Polynomial du 2ème degré","ja-JP":"2 番目の角度の多項式近似","ru-RU":"Полиномиальный второй степени"}},properties_trendlines_types_polynomial3:{id:"properties.trendlines.types.polynomial3",locale:{"en-US":"Third degree polynomial","zh-TW":"第三度多項式","zh-CN":"三次多项式","tr-TR":"Üçüncü derece polinom","sv-SE":"Polynomial, tredje graden","it-IT":"Polinomio di terzo grado","es-ES":"Polinómica de tercer grado","de-DE":"Polynom dritten Grades","pl-PL":"Wielomianowa trzeciego stopnia","nl-NL":"Derdegraadspolynoom","ko-KR":"3차 다항식","pt-BR":"Polinômio de terceiro grau","fr-FR":"Polynomial du 3ème degré","ja-JP":"3 番目の角度の多項式近似","ru-RU":"Полиномиальный третьей степени"}},properties_trendlines_types_polynomial4:{id:"properties.trendlines.types.polynomial4",locale:{"en-US":"Fourth degree polynomial","zh-TW":"第四度多項式","zh-CN":"四次多项式","tr-TR":"Dördüncü derece polinom","sv-SE":"Polynomial, fjärde graden","it-IT":"Polinomio di quarto grado","es-ES":"Polinómica de cuarto grado","de-DE":"Polynom vierten Grades","pl-PL":"Wielomianowa czwartego stopnia","nl-NL":"Vierdegraadspolynoom","ko-KR":"4차 다항식","pt-BR":"Polinômio de quarto grau","fr-FR":"Polynomial du 4ème degré","ja-JP":"4 番目の角度の多項式近似","ru-RU":"Полиномиальный четвертой степени"}},properties_trendlines_types_exponential:{id:"properties.trendlines.types.exponential",locale:{"en-US":"Exponential","zh-TW":"指數","zh-CN":"指数","tr-TR":"Üstel","sv-SE":"Exponentiell","it-IT":"Esponenziale","es-ES":"Exponencial","de-DE":"Exponentiell","pl-PL":"Wykładnicze","nl-NL":"Exponentieel","ko-KR":"지수","pt-BR":"Exponencial","fr-FR":"Exponentiel","ja-JP":"指数","ru-RU":"Экспоненциальный"}},properties_trendlines_types_logarithmic:{id:"properties.trendlines.types.logarithmic",locale:{"en-US":"Logarithmic","zh-TW":"對數","zh-CN":"对数","tr-TR":"Logaritmik","sv-SE":"Logaritmisk","it-IT":"Logaritmica","es-ES":"Logarítmica","de-DE":"Logarithmisch","pl-PL":"Logarytmiczna","nl-NL":"Logaritmisch","ko-KR":"로그","pt-BR":"Logarítmico","fr-FR":"Logarithmique","ja-JP":"対数","ru-RU":"Логарифмический"}},properties_trendlines_types_power:{id:"properties.trendlines.types.power",locale:{"en-US":"Power","zh-TW":"乘冪","zh-CN":"幂","tr-TR":"Üs","sv-SE":"Potens","it-IT":"Potenza","es-ES":"Potencia","de-DE":"Potenz","pl-PL":"Potęgowa","nl-NL":"Macht","ko-KR":"거듭제곱","pt-BR":"Potência","fr-FR":"Puissance","ja-JP":"累乗","ru-RU":"Силовой"}},Common_Measures:{id:"Common.Measures",locale:{"en-US":"Measures","de-DE":"Kennzahlen","fr-FR":"Mesures","it-IT":"Misure","ja-JP":"メジャー","ko-KR":"측정값","es-ES":"Medidas","nl-NL":"Metingen","pl-PL":"Miary","pt-BR":"Medidas","sv-SE":"Mått","tr-TR":"Hesaplamalar","zh-CN":"度量","zh-TW":"量值","ru-RU":"Меры"}},Tooltip_ToggleOnLassoSelection:{id:"Tooltip.ToggleOnLassoSelection",locale:{"en-US":"Turn on lasso selection","de-DE":"Lasso-Auswahl aktivieren","fr-FR":"Activer la sélection au lasso","it-IT":"Attiva selezione lazo","ja-JP":"囲み選択をオンにする","ko-KR":"올가미 선택 켜기","es-ES":"Activar la selección de contorno","nl-NL":"Lassoselectie inschakelen","pl-PL":"Włącz zaznaczenie lasso","pt-BR":"Ativar seleção de laço","sv-SE":"Slå på lassourval","tr-TR":"Serbest seçimi aç","zh-CN":"开启套索选择方法","zh-TW":"開啟套索選取","ru-RU":"Включить выбор лассо"}},Tooltip_ToggleOffLassoSelection:{id:"Tooltip.ToggleOffLassoSelection",locale:{"en-US":"Turn off lasso selection","de-DE":"Lasso-Auswahl deaktivieren","fr-FR":"Désactiver la sélection au lasso","it-IT":"Disattiva selezione lazo","ja-JP":"囲み選択をオフにする","ko-KR":"올가미 선택 끄기","es-ES":"Desactivar la selección de contorno","nl-NL":"Lassoselectie uitschakelen","pl-PL":"Wyłącz zaznaczenie lasso","pt-BR":"Desativar seleção de laço","sv-SE":"Stäng av lassourval","tr-TR":"Serbest seçimi kapat","zh-CN":"关闭套索选择方法","zh-TW":"關閉套索選取","ru-RU":"Выключить выбор лассо"}}};function a$({env:t}){const{flags:n}=t,r=t.anything?.sense?.isUnsupportedFeature,i=e.useTranslator();!function(e){if(e&&e.get&&e.add){const t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(o$).forEach(t=>{e.add(o$[t])})}}(t.translator);const o=e.useEmbed(),a=e.useTheme(),[s,l]=e.useState(),c=e.useDeviceType(),u=e.useAppLayout(),{qLocaleInfo:d}=u;return e.useEffect(()=>{l({translator:i,theme:a,embed:o,deviceType:c,localeInfo:d,isUnsupportedFeature:r,flags:n})},[d,r,i.language(),a.name(),c]),s}function s$(){const[t]=e.useState(()=>Dx()),[n]=e.useState(()=>function(e){var t=ly({},e),n={},r={},i=!1,o={get:function(e){return t[e]},set:function(e,o){var a=t[e];!i&&n[e]?t[e]=n[e](o,a):t[e]=o,!i&&r[e]&&r[e](t[e],a)},preventSet:function(e,t){i=!0,o.set(e,t),i=!1},intercept:function(e,t){n[e]=t},onChanged:function(e,t){r[e]=t}};return o}({viewRange:[0,1],scrollOffset:void 0}));return{viewCache:t,viewState:n}}const l$="REJECTED",c$=()=>{},u$=2,d$=20,f$=200,h$=10;var p$={contains:function(e,t){if(!e)return!1;const{qArea:n}=e;return!!n&&(n.qLeft<=t.qLeft&&n.qLeft+n.qWidth>=t.qLeft+t.qWidth&&n.qTop<=t.qTop&&n.qTop+n.qHeight>=t.qTop+t.qHeight)},patcher:function({layoutService:e}){const t=t=>{t.qArea.qHeight=t.qMatrix.length,t.qArea.qWidth=e.meta.size.x};return t.should=e=>0===e.qArea.qHeight&&0===e.qArea.qWidth&&!!e.qMatrix.length,t},slicer:function(e,t){const n=Math.max(0,t.qHeight)-Math.abs(Math.min(0,t.qTop-e.qArea.qTop)),r=Math.max(0,t.qWidth)-Math.abs(Math.min(0,t.qLeft-e.qArea.qLeft)),i=Math.max(t.qTop,e.qArea.qTop),o=Math.max(t.qLeft,e.qArea.qLeft),a=Math.max(0,i-e.qArea.qTop),s=Math.min(i+n-e.qArea.qTop,e.qArea.qHeight),l=Math.max(0,o-e.qArea.qLeft),c=Math.min(o+r-e.qArea.qLeft,e.qArea.qWidth),u={qArea:{qHeight:s-a,qWidth:c-l,qTop:i,qLeft:o},qMatrix:[]};for(let t=a;t<s;t++)u.qMatrix.push(e.qMatrix[t].slice(l,c));return u},cacheWarden:function({bounds:e={width:0,height:0}}){return{release(t,n){const r=n.qTop-h$<=t.qTop,i=n.qLeft+n.qWidth+h$>=t.qLeft+t.qWidth,o=n.qTop+n.qHeight+h$>=t.qTop+t.qHeight,a=n.qLeft-h$<=t.qLeft;return r&&t.qTop>0||i&&t.qLeft+t.qWidth<e.width||o&&t.qTop+t.qHeight<e.height||a&&t.qLeft>0}}},request:function({definitionPath:e}){return t=>({method:"getHyperCubeData",args:[e,[t]]})}};var m$={contains:function(e,t){if(!e)return!1;const{qArea:n}=e;return!!n&&(n.qTop<=t.qTop&&n.qTop+n.qHeight>=t.qTop+t.qHeight)},patcher:function({layoutService:e}){const t=t=>{t.qArea.qHeight=t.qData[0].qSubNodes.length,t.qArea.qWidth=e.meta.size.x};return t.should=e=>0===e.qArea.qHeight&&0===e.qArea.qWidth&&!!e.qData.length,t},slicer:function(e,t){const n=Math.max(0,t.qHeight)-Math.abs(Math.min(0,t.qTop-e.qArea.qTop)),r=Math.max(t.qTop,e.qArea.qTop),i=Math.max(t.qLeft,e.qArea.qLeft),o=Math.max(0,r-e.qArea.qTop),a=Math.min(r+n-e.qArea.qTop,e.qArea.qHeight),s=e.qData[0].qUp+e.qArea.qHeight+e.qData[0].qDown-r-(a-o),l={qArea:{qHeight:a-o,qWidth:e.qArea.qWidth,qTop:r,qLeft:i},qData:[{...e.qData[0],qUp:r,qDown:s,qSubNodes:[]}]};for(let t=o;t<a;t++)l.qData[0].qSubNodes.push(e.qData[0].qSubNodes[t]);return l},cacheWarden:function({bounds:e={height:0}}){return{release(t,n){const r=n.qTop-h$<=t.qTop,i=n.qTop+n.qHeight+h$>=t.qTop+t.qHeight;return r&&t.qTop>0||i&&t.qTop+t.qHeight<e.height}}},request:function({definitionPath:e}){return t=>({method:"getHyperCubeStackData",args:[e,[t]]})}};var g$={contains:function(){return!1},patcher:function(){const e=e=>e;return e.should=()=>!1,e},slicer:function(e){return e},cacheWarden:function(){return{release:()=>!0}},request:function({definitionPath:e}){return t=>({method:"getHyperCubeTreeData",args:[e,[t]]})}};const y$="pages";const v$="discretePan";function b$({chart:e,actions:t,componentKey:n,dockService:r,rtl:i,scroller:o}){return{type:"Pan",key:"discrete:pan",options:{event:v$,pointers:1,threshold:10,enable(r,i){return this.started===v$||!i||!(!t.scroll.enabled()||!o.enabled())&&e.componentsFromPoint({x:i.center.x,y:i.center.y}).some(e=>e.key===n)}},events:{[`${v$}start`](e){e.preventDefault(),this.started=v$;const t="horizontal"===r.meta.major.orientation?e.deltaX:e.deltaY;this.previousTotalDelta=t<0?-10:10},[`${v$}move`](e){e.preventDefault();const t="horizontal"===r.meta.major.orientation,n=t?e.deltaX:e.deltaY,a=t&&i?-1:1,s=(n-this.previousTotalDelta)*a;this.previousTotalDelta=n,o.scroll(s)},[`${v$}end`](e){e.preventDefault(),this.started=!1},[`${v$}cancel`](e){e.preventDefault(),this.started=!1}}}}function x$({chart:e,componentKey:t,actions:n,scroller:r}){return function(i){if(!n.scroll.enabled()||!r.enabled())return;const[o]=e.componentsFromPoint({x:i.clientX,y:i.clientY}).filter(e=>e.key===t);if(!o)return;i.preventDefault();const a=Math.abs(i.deltaY)>Math.abs(i.deltaX)?i.deltaY:i.deltaX,s=100*Math.sign(-a);r.scroll(s)}}function S$({layoutService:e}){const t=function({layoutService:e}){const t=Math.floor(1e4/(e.meta.dimensionCount+e.meta.measureCount));return function({width:e,height:n}){const r=Math.min(t,Math.max(f$,n));return{width:e,height:Math.max(d$,Math.min(n*u$,r))}}}({layoutService:e}),n={width:e.meta.size.x,height:e.meta.size.y};return function(e){const{width:r,height:i}=t({width:e.qWidth,height:e.qHeight}),o=i?Math.ceil((i-e.qHeight)/2):0,a=r?Math.ceil((r-e.qWidth)/2):0;return{qHeight:i?Math.min(i,n.height):e.qHeight,qWidth:r?Math.min(r,n.width):e.qWidth,qTop:i?Math.max(0,Math.min(e.qTop-o,n.height-i)):e.qTop,qLeft:r?Math.max(0,Math.min(e.qLeft-a,n.width-r)):e.qLeft}}}function w$(e){let t,n;const r=i=>{t=i;const{method:o,args:a}=t.request;e[o](...a).then(e=>{if(t.canceled||n)return t.reject(l$),t=null,void(n&&(r(n),n=null));t.resolve(e[0]),t=null})},i=e=>new Promise((i,o)=>{const a={request:e,resolve:i,reject:o,canceled:!1,cancel:()=>{a.canceled=!0}};t?(e=>{n&&n.reject(l$),n=e})(a):r(a)});return i.isProcessing=()=>!!t,i.hasQueued=()=>!!n,i.cancel=()=>{i.isProcessing()&&t.cancel(),i.hasQueued()&&(n.reject(l$),n=null)},i}const M$={command:{update:()=>{}}};function k$({dataStore:e,composition:t,enigmaModel:n,layoutService:r,trendLineModel:i=M$,definitionPath:o,processDataPage:a}){const{slicer:s,cacheWarden:l,request:c}=t,u=function({dataStore:e,slice:t,warden:n,expand:r,request:i,process:o,connectionless:a,processDataPage:s}){return(l,{onProcessing:c}={})=>{if(e.contains(l)){const r=e.getCurrent();if(a)return Promise.resolve(t(r,l));const i=n.release(r.qArea,l),s=o.isProcessing();if(!i&&s&&o.cancel(),!i||s)return Promise.resolve(t(r,l))}if(a)return Promise.resolve(e.getCurrent());o.isProcessing()&&c&&c();const u=r(l);return o(i(u)).then(n=>(s(n),e.add(n),t(n,l)))}}({dataStore:e,slice:s,warden:l({bounds:{width:r.meta.size.x,height:r.meta.size.y}}),expand:S$({layoutService:r}),request:c({definitionPath:o}),process:w$(n),connectionless:r.meta.isSnapshot,processDataPage:a}),d=Nx((e,{onProcessing:t,onData:n})=>{u(e,{onProcessing:t}).then(e=>n(e)).catch(e=>{if(e!==l$)throw e})},50);return function(e,{onProcessing:t=c$,onDataPage:n=c$}={}){d(e,{onProcessing:t,onData:e=>{r.setDataPages(e?[e]:[]),i.command.update(),n(e)}})}}var C$={inTotal:function({layoutService:e}){return e.meta.size.x},area:function({layoutService:e}){return{qTop:0,qHeight:1,qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:r}){const{pixel:i}=t,o=e.getDataPages()[0],a=i/r;return[a,n.inView>=n.inTotal?a+1:a+o.qArea.qWidth/n.inView]}};var q$={inTotal:function({layoutService:e}){if(e.meta.isSnapshot&&!e.getLayoutValue("reducedHyperCube")){const[t]=e.getDataPages();if(t)return t.qArea.qHeight}return e.meta.size.y},area:function({layoutService:e,itemOffset:t,inView:n,areaBuffer:r}){const i=void 0===r?4:r,o=Math.max(0,Math.floor(t)-i/2);return{qTop:o,qHeight:Math.min(e.meta.size.y-o,Math.max(0,Math.ceil(n+i))),qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:r}){const{pixel:i}=t,o=e.getDataPages()[0],a=r/n.inView,s=(i+o.qArea.qTop*a)/r;return[s,n.inView>=n.inTotal?s+1:s+o.qArea.qHeight/n.inView]}};function E$(e){const{groupSize:t,measureCount:n}=e.meta;return t??n}function D$(e,t){const n=[];for(let r=0;r<e.length;r++){const i=t(e[r]);-1===n.indexOf(i)&&n.push(i)}return n.length}function T$(e){return D$(e.qMatrix,e=>e[0].qElemNumber)-1}var O$={inTotal:function({layoutService:e}){const t=E$(e);return e.meta.size.y*t*(1+1/t)-1},area:function({layoutService:e,itemOffset:t,inView:n,areaBuffer:r}){const i=E$(e),o=void 0===r?i:r,a=t/(i+1),s=Math.max(0,Math.floor((t-a-o/2)/i));return{qTop:s,qHeight:Math.min(e.meta.size.y-s,Math.max(0,Math.ceil((n+o)/i+1))),qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:r}){const i=E$(e),o=e.getDataPages()[0],a=r/n.inView,{pixel:s}=t,l=T$(o),c=o.qArea.qHeight*i+l,u=(s+(o.qArea.qTop*i+o.qArea.qTop)*a)/r;return[u,n.inView>=n.inTotal?u+1:u+c/n.inView]}};const N$=(e,t)=>t/(e.meta.size.y/e.meta.size.dimensions[0]+1);function A$(e){return{itemOffset(t,n){if(0!==t.qArea.qTop)return N$(e,n);const r=((e,t)=>{const n={successful:!0,count:0};let r=Math.abs(Math.floor(t));const i=[];for(let t=0;t<=r;t++){if(!e[t])return n.successful=!1,n;const o=e[t][0].qElemNumber;-1===i.indexOf(o)&&(i.push(o),r--)}return n.count=i.length-1,n})(t.qMatrix,n);return r.successful?r.count:N$(e,n)},area(t,n,r){if(0!==t.qArea.qTop)return N$(e,n);return D$(t.qMatrix.slice(0,r.qTop+1),e=>e[0].qElemNumber)-1}}}var _$={inTotal:function({layoutService:e}){return e.meta.size.y+e.meta.size.dimensions[0]-1},area:function({getDataPages:e,layoutService:t,itemOffset:n,inView:r}){const i=A$(t).itemOffset(e(),n),o=Math.max(0,Math.floor(n-i));return{qTop:o,qHeight:Math.min(t.meta.size.y-o,Math.max(0,Math.ceil(r+1))),qLeft:0,qWidth:t.meta.size.x}},scaleRange:function({getDataPages:e,layoutService:t,offsets:n,items:r,viewSize:i,upperBound:o}){const a=t.getDataPages()[0],s=i/r.inView,{item:l,pixel:c}=n,u=A$(t).area(e(),l,a.qArea),d=T$(a),f=a.qArea.qHeight+d,h=c===o?(r.inView-f)*s/i:(c+(a.qArea.qTop+u)*s)/i;return[h,r.inView>=r.inTotal?h+1:h+f/r.inView]}};function I$({chart:e,rect:t,dockService:n,itemWidths:r,axisKey:i,renderer:o,isGrouped:a,dimensionAxis:s,inTotal:l,isMajorLabelless:c,maxDataRows:u}){const{DEFAULT:d,SQUEEZE:f,LABELLESS:h}=r[n.meta.chart.mode],p="horizontal"===n.meta.major.orientation,{axisDisplayMode:m="auto",maxVisibleItems:g=10,label:y}=s,v=p?t.width:t.height,b=v/l>=f;switch(m){case"max":return Math.min(l,u);case"custom":return Math.min(g,u);default:return c?v/h:b?function({chart:e,isHorizontal:t,axisKey:n,renderer:r={},isGrouped:i,itemSize:o,label:a}){if(i||"auto"!==a&&"tilted"!==a)return!1;const s=e.component(n),{measureText:l}=r;if(!s||!l)return!0;const{fontFamily:c,fontSize:u,tiltAngle:d}=s.settings.settings.labels,{height:f}=l({fontFamily:c,fontSize:u,text:"M"});if(!t)return f>o;const h=(90-d)*(Math.PI/180);return f>Math.cos(h)*o}({chart:e,isHorizontal:p,axisKey:i,renderer:o,isGrouped:a,itemSize:f,label:y})?v/d:l:v/d}}function L$({chart:e,getRect:t,getDataPages:n,layoutService:r,dockService:i,getItemWidths:o,axisKey:a,renderer:s,areaBuffer:l,rtl:c}){const{inTotal:u,area:d,scaleRange:f}=function({layoutService:e}){const{isDimensionless:t,isGrouped:n,isGroupedByMeasure:r}=e.meta;return t?C$:n?r?O$:_$:q$}({layoutService:r}),h=()=>"horizontal"===i.meta.major.orientation?t().width:t().height,p=e=>e?h()/e:0,m=(e,t)=>-(e-t)*p(t);return{getItems(){const n=r.getLayoutValue("dimensionAxis"),l=u({layoutService:r});return{inTotal:l,inView:I$({chart:e,rect:t(),dockService:i,itemWidths:o(),axisKey:a,renderer:s,isGrouped:r.meta.isGrouped,dimensionAxis:n,inTotal:l,isMajorLabelless:"none"===n.show||"title"===n.show,maxDataRows:Math.floor(1e4/(r.meta.dimensionCount+r.meta.measureCount))})}},getItemSize({items:e}){const{inView:t}=e;return p(t)},getOffsets({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t,i=Math.min(0,Math.max(e,m(n,r))),o=r?Math.abs(r*i/h()):0;return{start:{pixel:i,item:o},end:{item:Math.min(o+(r||0),n)}}},getUpperBound({items:e}){const{inTotal:t,inView:n}=e;return m(t,n)},getViewRange({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t;return function({viewSize:e,inTotal:t,inView:n,pixelOffset:r}){const i=e/n*t,o=Math.abs(r)/i;return[o,Math.min(1,o+e/i)]}({viewSize:h(),inTotal:n,inView:r,pixelOffset:e})},getArea:({itemOffset:e,items:t})=>d({getDataPages:n,layoutService:r,itemOffset:e,inView:t.inView,areaBuffer:l}),getScaleRange({offsets:e,items:t}){const o=f({getDataPages:n,layoutService:r,offsets:e,items:t,viewSize:h(),upperBound:m(t.inTotal,t.inView)});return"horizontal"===i.meta.major.orientation&&c?function(e){return[1-e[1],1-e[0]]}(o):o},validate:{offset({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t;return e<=0&&e>=m(n,r)}},convert:{itemToPixelOffset({itemOffset:e,items:t}){const{inView:n}=t,r=e*p(n);return Number.isFinite(r)?-r:0},relativeToPixelOffset({relativeOffset:e,items:t}){const{inTotal:n,inView:r}=t;return-e*(p(r)*n)}}}}function P$({chart:e,componentKey:t,state:n,dataStore:r,pageData:i,layoutService:o,dockService:a,itemWidths:s,getRect:l,axisKey:c,renderer:u,areaBuffer:d,viewState:f,rtl:h}){n.set("rect",{width:0,height:0}),n.set("itemWidths",{}),n.set("itemSize",0),n.set("items",{}),n.set("offsets",{}),n.set("finished",0),n.set("scaleRange",[0,1]);const p=L$({chart:e,getRect:()=>n.get("rect"),getDataPages:r.getCurrent,layoutService:o,dockService:a,getItemWidths:()=>n.get("itemWidths"),axisKey:c,renderer:u,areaBuffer:d,rtl:h}),m=()=>{const e=p.getItems();return n.set("items",e),e},g=({pixelOffset:e,items:t})=>{const r=p.getOffsets({pixelOffset:e,items:t});return n.set("offsets",r),r},y=e=>{const t=Date.now(),r=m(),a=g({pixelOffset:e,items:r}),s=p.getArea({itemOffset:a.start.item,items:r});if((e=>{const[{qArea:t}]=o.getDataPages();return!!t&&Object.keys(e).every(n=>e[n]===t[n])})(s))return void((p.validate.offset({pixelOffset:e,items:r})||f.get("scrollOffset").start!==a.start.item)&&(n.set("finished",t),n.set("scaleRange",p.getScaleRange({offsets:a.start,items:r})),f.preventSet("viewRange",p.getViewRange({pixelOffset:a.start.pixel,items:r})),f.set("scrollOffset",{start:a.start.item,end:a.end.item})));f.preventSet("viewRange",p.getViewRange({pixelOffset:a.start.pixel,items:r}));const l=()=>{n.get("finished")>t||(n.set("finished",t),n.set("scaleRange",p.getScaleRange({offsets:a.start,items:r})),f.set("scrollOffset",{start:a.start.item,end:a.end.item}))};i(s,{onProcessing:l,onDataPage:l})};return{enabled(){const{inTotal:e,inView:t}=n.get("items");return e>t},itemSize:()=>n.get("itemSize"),scaleRange:()=>n.get("scaleRange"),initialize(){const r=e.component(t);if(!r)return Promise.resolve();n.set("rect","function"==typeof l?l():r.rect),n.set("itemWidths","function"==typeof s?s():s);const a=m();n.set("itemSize",p.getItemSize({items:a}));const c=(({items:e})=>{const t=o.getLayoutValue("scrollStartPos"),n=f.get("scrollOffset");if(void 0===n)return 1===t?p.getUpperBound({items:e}):0;if("number"==typeof n)return p.convert.itemToPixelOffset({itemOffset:n,items:e});const{start:r,end:i}=n,a=1===t&&i?i-e.inView:r;return p.convert.itemToPixelOffset({itemOffset:a,items:e})})({items:a}),u=g({pixelOffset:c,items:a});f.preventSet("viewRange",p.getViewRange({pixelOffset:u.start.pixel,items:a}));const d=p.getArea({itemOffset:u.start.item,items:a});return new Promise(e=>{i(d,{onDataPage:()=>{n.set("scaleRange",p.getScaleRange({offsets:u.start,items:a})),f.preventSet("scrollOffset",{start:u.start.item,end:u.end.item}),e()}})})},scroll(e){const t=n.get("offsets").start.pixel+e;y(t)},scrollToRelative(e){const t=n.get("items"),r=p.convert.relativeToPixelOffset({relativeOffset:e,items:t});y(r)}}}function R$({chart:e,actions:t,componentKey:n,enigmaModel:r,layoutService:i,dockService:o,trendLineModel:a,itemWidths:s,viewState:l,rtl:c,options:{definitionPath:u="/qHyperCubeDef",getRect:d,axisKey:f,renderer:h,areaBuffer:p,processDataPage:m=()=>{}}={}}){const g=Dx(),y=function({qMode:e}){switch(e){case"K":return m$;case"T":return g$;default:return p$}}({qMode:i.getHyperCubeValue("qMode")}),v=function({state:e,contains:t}){return e.set(y$,[]),{add:t=>{const n=e.get(y$);n.length=0,n.push(t)},getCurrent:()=>e.get(y$)[0],getAll:()=>e.get(y$),contains:n=>t(e.get(y$)[0],n)}}({state:g,contains:y.contains});!function({layoutService:e,dataStore:t,composition:n}){const r=e.getDataPages()[0];if(!r)return;const i=n.patcher({layoutService:e});i.should(r)&&i(r),t.add(r)}({layoutService:i,dataStore:v,composition:y});const b=function({buffer:e}){return void 0===e?void 0:2*Math.round(e/2)}({buffer:p}),x=k$({dataStore:v,composition:y,enigmaModel:r,layoutService:i,trendLineModel:a,definitionPath:u,processDataPage:m}),S=P$({chart:e,componentKey:n,state:g,dataStore:v,pageData:x,layoutService:i,dockService:o,itemWidths:s,getRect:d,axisKey:f,renderer:h,areaBuffer:b,viewState:l,rtl:c}),w=function({layoutService:e,dataStore:t}){return function(n){const r=Cx(n,`${e.refs.dataPages}`);r.length=0,r.push(t.getCurrent())}}({layoutService:i,dataStore:v}),M=function({chart:e,actions:t,componentKey:n,dockService:r,rtl:i,scroller:o}){return{gestures:[b$({chart:e,actions:t,componentKey:n,dockService:r,rtl:i,scroller:o})],native:{type:"native",events:{wheel:x$({chart:e,actions:t,componentKey:n,scroller:o})}}}}({chart:e,actions:t,componentKey:n,dockService:o,rtl:c,scroller:S});return{interactions:M,query:{getCanScroll:()=>S.enabled(),getItemSize:()=>S.itemSize(),getScaleRange:()=>S.scaleRange(),getCurrentDataPage:()=>v.getCurrent()},command:{initialize:()=>S.initialize(),scrollTo:e=>S.scrollToRelative(e),setSnapshotData:e=>w(e)}}}var z$="AVERAGE",F$="LINEAR",j$="POLYNOMIAL2",B$="POLYNOMIAL3",H$="POLYNOMIAL4",V$="EXPONENTIAL",$$="LOG",W$="POWER";function U$({dimValue:e,value:t,qTrendLine:n}){const{qType:r,qCoeff:i}=n,o={x:e,y:i[2]*t**2+i[1]*t+i[0]};switch(r){case B$:return o.y+=i[3]*t**3,o;case H$:return o.y+=i[4]*t**4+i[3]*t**3,o;default:return o}}var Y$={average:function({dimValue:e,qTrendLine:t}){return{x:e,y:t.qCoeff[0]}},linear:function({dimValue:e,value:t,qTrendLine:n}){return{x:e,y:n.qCoeff[1]*t+n.qCoeff[0]}},polynomial2:U$,polynomial3:U$,polynomial4:U$,exponential:function({dimValue:e,value:t,qTrendLine:n}){return{x:e,y:Math.exp(n.qCoeff[0]+t*n.qCoeff[1])}},log:function({dimValue:e,value:t,qTrendLine:n}){return{x:e,y:n.qCoeff[1]+n.qCoeff[0]*Math.log(t)}},power:function({dimValue:e,value:t,qTrendLine:n}){return{x:e,y:10**(n.qCoeff[0]+n.qCoeff[1]*Math.log(t)*Math.LOG10E)}}};function K$(e,t){const n=Y$[t.qType.toLowerCase()],r=Math.max(1,e/500);let i=1/0,o=-1/0;for(let a=0;a<e;a+=r){const{y:e}=n({dimValue:null,value:a+1,qTrendLine:t});i=Math.min(e,i),o=Math.max(e,o)}return{min:i,max:o}}function G$(e){return Y$[e.qType.toLowerCase()]}function X$(e,t){return e.meta.isContinuous?function(e,t){return{generate:(n,r,i)=>{const o=[],a=G$(n),s=t.get("zoom"),l=n.start??s.min,c=n.end??s.max,u=(c-l)/100,d=e.meta.isButterfly&&i>0;if(u>0){const e=e=>{const t=a({dimValue:e,value:e,qTrendLine:n});d&&(t.y=-t.y),t.layerId=r,t.measureIndex=i,t.dimValue=e,o.push(t)};let t=l;for(let n=l;n<=c;n+=u)e(n),t=n;t!==c&&e(c)}return o},calculate:(e,t)=>G$(e)({dimValue:t,value:t,qTrendLine:e}),findMinMax(e,t){const n=this.generate(t).map(({y:e})=>e);return{min:Math.min(...n),max:Math.max(...n)}}}}(e,t):e.meta.mode.K?function(e){return{generate:(t,n,r)=>{const i=[],o=e.getDataPages()[0],a=o.qData[0].qSubNodes,s=o.qArea.qTop,l=Y$[t.qType.toLowerCase()];for(let e=0;e<a.length;e++){const o=a[e],c=l({dimValue:o.qElemNo,value:e+s+1,qTrendLine:t});c.layerId=n,c.measureIndex=r,c.dimValue=o.qText,i.push(c)}return i},findMinMax:K$}}(e):function(e){return{generate:(t,n,r)=>{const i=[],o=e.getDataPages()[0],a=o.qMatrix,s=o.qArea.qTop,l=Y$[t.qType.toLowerCase()],c=e.meta.isButterfly&&r>0;for(let e=0;e<a.length;e++){const o=a[e][0],u=e+s+1,d=l({dimValue:o.qElemNumber,value:u,qTrendLine:t});c&&(d.y=-d.y),d.layerId=n,d.measureIndex=r,d.dimValue=o.qText,i.push(d)}return i},calculate:(e,t,n)=>(0,Y$[e.qType.toLowerCase()])({dimValue:n,value:t,qTrendLine:e}),findMinMax:K$}}(e)}var J$={TYPES:{AVERAGE:"properties.trendlines.types.average",LINEAR:"properties.trendlines.types.linear",POLYNOMIAL2:"properties.trendlines.types.polynomial2",POLYNOMIAL3:"properties.trendlines.types.polynomial3",POLYNOMIAL4:"properties.trendlines.types.polynomial4",EXPONENTIAL:"properties.trendlines.types.exponential",LOG:"properties.trendlines.types.logarithmic",POWER:"properties.trendlines.types.power"},STYLE:{DASHED:"properties.trendlines.style.dashed"},TYPE:"properties.trendlines.type",HEADER:"properties.trendlines",ADD_BUTTON:"properties.trendlines.button.add"},Z$={color:"#f93f17",index:9};const{isDark:Q$}=lO,eW={x:NaN,y:NaN,layerId:NaN,measureIndex:NaN},tW=({layoutService:e,viewState:t,colorModel:n,chart:r,env:i,keys:{colorScale:o},isEnabled:a=()=>!1})=>{const{translator:s}=i,l=[eW],c=[],u=[],d=X$(e,t);e.getLayoutValue("qHyperCube.qMeasureInfo",[]).forEach((e,t)=>{Array.isArray(e.qTrendLines)&&(c.push(...e.qTrendLines),u.push(...e.qTrendLines.map(()=>t)))});const f=Tx(e=>{const{style:t}=c[e]||{},i=n.settings();if(t.autoColor){if("measure"===i.mode){const t=u[e],n=r.scale(o)(t);return Q$(n)?function(e){const t=oO(e);return t.l<30?t.l+=15:t.l<50?t.l+=10:t.l+=5,t.toString()}(n):function(e){const t=oO(e);return t.l-=5,t.toString()}(n)}return n.resolveUIColor(Z$)}return t.paletteColor?n.resolveUIColor(t.paletteColor):"none"});return{query:{hasTrendLines:()=>!!c.length&&a(),getData:()=>l,getStroke:f,getLineDash:e=>{const{style:t}=c[e]||{};return t?.lineDash},getLineThickness:e=>{const{style:t}=c[e]||{};return t?.lineThickness??2},getLabel:e=>(c[e]||{}).label,getType:e=>{const{qType:t}=c[e]||{};return s.get(J$.TYPES[t])},getMinMax:()=>{let t=1/0,n=-1/0;return c.forEach(r=>{const i=d.findMinMax(e.meta.size.y,r);t=Math.min(i.min,t),n=Math.max(i.max,n)}),{min:t,max:n}},getCalculatedValue:(e,t,n)=>{const r=c[e];return d.calculate(r,t,n)}},command:{update:()=>{l.length=0,c.forEach((e,t)=>{const n=d.generate(e,t,u[t]);l.push(...n)})}}}};var nW={source:"trend",extract:{field:"x",props:{minor:{field:"y"},layer:{field:"layerId"},measureIndex:{field:"measureIndex"},dimValue:{field:"dimValue"}}}};const rW=({meta:e})=>e.isContinuous?({scale:e,datum:t})=>e(t.value):e.isGroupedByMeasure?({scale:e,datum:t})=>e([t.value,t.measureIndex.value])+e.bandwidth()/2:({scale:e,datum:t})=>e(t.value)+e.bandwidth()/2,iW=(e,{layoutService:t,trendLineModel:n,dockService:r,animationsEnabled:i})=>{if(!n.query.hasTrendLines())return[];const o=(({majorScale:e,minorScale:t},{trendLineModel:n,layoutService:r,dockService:i,animationsEnabled:o})=>{const a=rW(r);return{key:"trend-lines",type:"line",layout:{dock:"center"},data:nW,settings:{connect:!0,orientation:i.meta.major.orientation,coordinates:{major:{scale:e,fn:a},minor:{scale:t},layerId:{ref:"layer"}},layers:{curve:"monotone",line:{strokeWidth:({datum:e})=>n.query.getLineThickness(e.layer.value),stroke:({datum:e})=>n.query.getStroke(e.layer.value),strokeDasharray:({datum:e})=>n.query.getLineDash(e.layer.value)}}},animations:{enabled:o,trackBy:bN.nonUpdatingNode.trackBy,compensateForLayoutChanges:bN.lines.compensateForLayoutChanges}}})(e,{trendLineModel:n,layoutService:t,dockService:r,animationsEnabled:i}),a=(({majorScale:e,minorScale:t,tooltipOverlay:n="trend-lines-tooltip-overlay"},{layoutService:r,dockService:i})=>{const o=rW(r),a="horizontal"===i.meta.major.orientation,s={scale:e,fn:o},l={scale:t,ref:"minor"};return{key:n,type:"point",layout:{dock:"center"},data:nW,settings:{x:a?s:l,y:a?l:s,opacity:0,size:1,sizeLimits:{maxPx:8,minPx:8}}}})(e,{layoutService:t,dockService:r});return[o,a]};function oW(e,t){const{getLabel:n,getType:r,getLineDash:i,getStroke:o}=t.query;return({node:t,resources:a})=>{const s={type:"icon",style:{stroke:o(t.data.layer.value),"min-width":"16px","vertical-align":"middle","stroke-dasharray":i(t.data.layer.value)}},l={content:[{content:n(t.data.layer.value),style:{"font-weight":"bold"}},{content:r(t.data.layer.value)}],style:{"min-width":"136px"}};return{title:t.data.dimValue.label,row:[s,l,{content:a.formatter(e.formatter)(t.data.minor.value)}]}}}function aW(e,{h:t,style:n}){return e.map(e=>{const r={style:{direction:"string"==typeof e.content?cT.detectTextDirection(e.content):void 0,...n.cell||{},...e.style||{}},class:e.class};e.colspan&&(r.colspan=e.colspan);const i=function(e,t){return Array.isArray(t.content)?e("div",{style:{display:"flex","flex-direction":"column"}},t.content.map(t=>e("span",{style:t.style,direction:cT.detectTextDirection(t.content)},t.content))):"icon"===t.type?function(e){const t=e("line",{x1:"0px",y1:"16px",x2:"16px",y2:"0px","stroke-width":"3px"});return e("svg",{xlms:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16"},t)}(e):t.content}(t,e);return t("td",r,i)})}function sW(e,t){return({h:n,data:r,style:i})=>{const o=r[0].title,a=r.filter(e=>e.title===o),s=function(e,t){const n=e("td",{colspan:3,style:{"font-weight":"bold"},direction:cT.detectTextDirection(t)},t);return e("tr",{},n)}(n,o),l=[s];if(a.slice(0,2).forEach(e=>{l.push(n("tr",{},aW(e.row,{h:n,style:i})))}),r.length>2){const i=r.length-2;l.push(...function(e,t,n,r){const i=t?t.get("Object.ChartTooltip.NMore",r):`+${r} more`,o=cT.detectTextDirection(i);return[e("tr",{},e("td",{style:{"background-image":"linear-gradient(transparent 8px, rgba(255, 255, 255, 0.4) 8px, rgba(255, 255, 255, 0.4) 9.2px, transparent 9.2px)",height:"17px"},colspan:3},"")),e("tr",{},e("td",{style:{"font-weight":"bold","text-align":n?"right":"left",direction:o},colspan:3},i))]}(n,e,t,i))}return l}}function lW(e,{trendLineModel:t,translator:n},r={}){if(!t.query.hasTrendLines())return!1;const{rtl:i}=r,o=oT({key:e.tooltip,rtl:i});return bg(!0,o,{settings:{extract:oW(e,t),content:sW(n,i),placement:"pointer",direction:r.rtl?"rtl":"ltr"}})}function cW(e,t){const n=t.element.getBoundingClientRect();return{x:(e.center?e.center.x:e.clientX)-n.left,y:(e.center?e.center.y:e.clientY)-n.top}}function uW(e,{chart:t,viewState:n,trendLineModel:r,layoutService:i,rtl:o}){const{isContinuous:a}=i.meta;let s={components:[{key:e.tooltipOverlay}],propagation:"stop"},l=e=>{const n=cW(e,t);return t.shapesAt(n,s)};if(a){const{getCalculatedValue:i}=r.query;s={components:[{key:"trend-lines"}],propagation:"stop"},l=(r,a)=>{const l=cW(r,t),c=t.shapesAt(function(e){return{cx:e.x,cy:e.y,r:3}}(l),s);if(c.length){const r=function(e,t,n,r){let i=(e.x-t.rect.computed.x)/t.rect.computed.width;i=r?1-i:i;const{min:o,max:a}=n.get("zoom");return o+(a-o)*i}(l,a,n,o),s=t.scale(e.majorInnerScale),u=(s?.formatter?s.formatter():t.formatter({data:{fields:["qDimensionInfo/0"]}}))(r);c.forEach(e=>{e.data.dimValue.value=r,e.data.dimValue.label=u,e.data.minor.value=i(e.data.layer.value,r).y})}return c}}return n=>{const r=t.component(e.tooltip);if(r&&(n=>t.componentsFromPoint({x:n.center?n.center.x:n.clientX,y:n.center?n.center.y:n.clientY}).some(t=>t.key===e.tooltipOverlay))(n)){const e=l(n,r);return e.length?(r.emit("show",n,{nodes:e}),!0):(r.emit("hide"),!1)}return!1}}const dW=e=>{e.style.dashed?e.style.lineDash="8, 4":e.style.lineDash=""},fW=e=>{dW(e),e.qMultiDimMode="Sum",e.qXColIx=0};function hW(e={}){const{translator:t,events:n={onGlobalChange:()=>{}},allowStackedByDimension:r=!1}=e;return{show:(e,t,{layout:n})=>!GD.dimensionless(n)&&!GD.groupedByDimension(n)&&(r||!GD.stackedByDimension(n)),type:"array",ref:"qTrendLines",titleTranslation:J$.HEADER,itemTitleRef:e=>{const n=typeof e.label;return"string"===n&&e.label?e.label:"object"===n?e.label.qStringExpression?e.label.qStringExpression.qExpr:e.label.qValueExpression.qExpr:t.get(J$.TYPES[e.qType])},max:8,allowAdd:!0,allowRemove:!0,allowMove:!1,addTranslation:J$.ADD_BUTTON,add:fW,globalChange:e=>{const t=Cx(e,"qHyperCubeDef.qMeasures",[]).reduce((e,t)=>(Array.isArray(t.qTrendLines)&&e.push(...t.qTrendLines),e),[]),r=(e=>!Cx(e,"dimensionAxis.continuousAuto",!1)&&e.preferContinuousAxis)(e)?"Possible":"Never";t.forEach(e=>{e.qContinuousXAxis=r}),n.onGlobalChange(e,t)},items:{label:{ref:"label",type:"string",expression:"optional",translation:"Common.Label",defaultValue:""},type:{ref:"qType",type:"string",component:"dropdown",translation:J$.TYPE,options:[{value:z$,translation:J$.TYPES.AVERAGE},{value:F$,translation:J$.TYPES.LINEAR},{value:j$,translation:J$.TYPES.POLYNOMIAL2},{value:B$,translation:J$.TYPES.POLYNOMIAL3},{value:H$,translation:J$.TYPES.POLYNOMIAL4},{value:V$,translation:J$.TYPES.EXPONENTIAL},{value:$$,translation:J$.TYPES.LOG},{value:W$,translation:J$.TYPES.POWER}],defaultValue:z$},autoColor:{ref:"style.autoColor",type:"boolean",translation:"properties.colors",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},paletteColor:{ref:"style.paletteColor",translation:"properties.color",type:"object",component:"color-picker",dualOutput:!0,defaultValue:Z$,show:e=>!e.style.autoColor},dashed:{ref:"style.dashed",translation:J$.STYLE.DASHED,type:"boolean",defaultValue:!0,change:dW}}}}var pW,mW;var gW=function(){if(mW)return pW;mW=1;var e={};function t(){t.init.call(this)}return e.isObject=function(e){return"object"==typeof e&&null!==e},e.isNumber=function(e){return"number"==typeof e},e.isUndefined=function(e){return void 0===e},e.isFunction=function(e){return"function"==typeof e},pW=t,t.EventEmitter=t,t.prototype._events=void 0,t.prototype._maxListeners=void 0,t.defaultMaxListeners=10,t.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},t.prototype.setMaxListeners=function(t){if(!e.isNumber(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},t.prototype.emit=function(t){var n,r,i,o,a,s;if(this._events||(this._events={}),"error"===t&&!this._events.error)throw(n=arguments[1])instanceof Error?n:Error('Uncaught, unspecified "error" event.');if(r=this._events[t],e.isUndefined(r))return!1;if(e.isFunction(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:for(i=arguments.length,o=new Array(i-1),a=1;a<i;a++)o[a-1]=arguments[a];r.apply(this,o)}else if(e.isObject(r)){for(i=arguments.length,o=new Array(i-1),a=1;a<i;a++)o[a-1]=arguments[a];for(i=(s=r.slice()).length,a=0;a<i;a++)s[a].apply(this,o)}return!0},t.prototype.addListener=function(n,r){var i;if(!e.isFunction(r))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",n,e.isFunction(r.listener)?r.listener:r),this._events[n]?e.isObject(this._events[n])?this._events[n].push(r):this._events[n]=[this._events[n],r]:this._events[n]=r,e.isObject(this._events[n])&&!this._events[n].warned)&&((i=e.isUndefined(this._maxListeners)?t.defaultMaxListeners:this._maxListeners)&&i>0&&this._events[n].length>i&&(this._events[n].warned=!0,e.isFunction(console.error)&&console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[n].length),e.isFunction(console.trace)&&console.trace()));return this},t.prototype.on=t.prototype.addListener,t.prototype.once=function(t,n){if(!e.isFunction(n))throw TypeError("listener must be a function");var r=!1;function i(){this.removeListener(t,i),r||(r=!0,n.apply(this,arguments))}return i.listener=n,this.on(t,i),this},t.prototype.removeListener=function(t,n){var r,i,o,a;if(!e.isFunction(n))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(o=(r=this._events[t]).length,i=-1,r===n||e.isFunction(r.listener)&&r.listener===n)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,n);else if(e.isObject(r)){for(a=o;a-- >0;)if(r[a]===n||r[a].listener&&r[a].listener===n){i=a;break}if(i<0)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(i,1),this._events.removeListener&&this.emit("removeListener",t,n)}return this},t.prototype.removeAllListeners=function(t){var n,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(n in this._events)"removeListener"!==n&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[t],e.isFunction(r))this.removeListener(t,r);else if(Array.isArray(r))for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},t.prototype.listeners=function(t){return this._events&&this._events[t]?e.isFunction(this._events[t])?[this._events[t]]:this._events[t].slice():[]},t.listenerCount=function(t,n){return t._events&&t._events[n]?e.isFunction(t._events[n])?1:t._events[n].length:0},pW}(),yW=ug(gW);const vW={shapes:[{type:"path",attrs:{d:"M15.9488039,5.20769129 C16.0487326,6.70662306 15.3492311,8.30548361 14.050157,9.30477145 C12.651154,10.5039169 10.8524359,10.8037032 8.85386017,10.4039881 L7.3549284,10.0042729 L5.75606786,9.70448659 C5.75606786,9.90434416 5.65613907,10.0042729 5.4562815,10.2041305 C5.05656637,10.6038456 4.55692244,10.8037032 4.05727852,10.8037032 C3.75749217,10.8037032 3.45770582,10.7037744 3.15791946,10.6038456 C3.05799068,10.903632 3.15791946,11.2034184 3.45770582,11.7030623 C5.05656637,14.0014243 3.85742095,15.9000712 3.75749217,16 L2.2585604,15.3004985 C2.2585604,15.2005697 2.95806189,14.0014243 1.95877405,12.6024213 C1.6589877,12.0028486 1.15934378,11.0035608 1.55905891,10.0042729 C1.6589877,9.80441537 1.75891648,9.6045578 1.95877405,9.40470024 C1.6589877,8.90505631 1.55905891,8.30548361 1.85884527,7.7059109 C1.55905891,7.40612455 1.25927256,7.1063382 1.15934378,6.70662306 C0.859557424,5.90719279 0.959486209,4.5081898 1.6589877,3.30904439 C1.95877405,2.6095429 2.55834676,2.0099702 3.15791946,1.51032628 C3.95734974,0.91075357 4.95663758,0.610967217 6.15578299,0.311180864 C9.05371774,-0.388320626 11.9516525,0.111323295 13.9502282,1.61025506 C15.1493736,2.50961412 15.8488751,3.80868831 15.9488039,5.20769129 Z M13.0508691,8.10562604 C13.8502994,7.40612455 14.3499433,6.40683671 14.3499433,5.30762008 C14.2500145,4.20840345 13.550513,3.40897318 12.9509403,2.90932926 C12.1515101,2.40968533 11.252151,2.0099702 10.1529344,1.81011263 C8.95378895,1.61025506 7.75464354,1.71018384 6.45556935,1.91004141 C4.75678001,2.30975655 3.65756338,3.00925804 3.05799068,4.10847467 C2.55834676,5.00783373 2.65827554,5.90719279 2.75820433,6.20697914 C2.75820433,6.30690792 2.85813311,6.40683671 3.05799068,6.40683671 C3.15791946,6.40683671 3.25784825,6.40683671 3.35777703,6.40683671 C3.45770582,6.40683671 3.45770582,6.40683671 3.45770582,6.40683671 L3.5576346,6.40683671 L3.65756338,6.40683671 C4.65685123,6.40683671 5.4562815,6.90648063 5.85599664,7.80583969 L5.85599664,8.00569726 C6.35564056,8.10562604 7.05514205,8.30548361 7.75464354,8.50534118 L9.25357531,8.90505631 C10.0530056,9.0049851 10.7525071,9.0049851 11.4520086,8.80512753 C12.0515813,8.70519875 12.5512252,8.40541239 13.0508691,8.10562604 Z"}}]};function bW(){const[t]=e.useState({}),[n]=e.useState({}),r=function(){const t=e.useLayout(),n=e.useTranslator(),r=!!t?.qSelectionInfo?.qInSelections,i=!!t?.qHyperCube?.qDimensionInfo?.[0]?.qIsOneAndOnlyOne,[o,a]=e.useState(!1),[s,l]=e.useState(!1),[c,u]=e.useState({key:"lasso",enabled:()=>!1,active:()=>!1,action:()=>!1}),d=e=>{l("boolean"==typeof e?e:!s)};return e.useAction(()=>(u({key:"lasso",action:d,enabled:()=>o,active:()=>s}),{key:"lasso",label:n.get(s?"Tooltip.ToggleOffLassoSelection":"Tooltip.ToggleOnLassoSelection"),icon:vW,hidden:!o||!r||i,active:s,action:d}),[r,i,s,o,n.language()]),{get:()=>c,setAllows:e=>{a(!!e)}}}(),[i,o]=e.useState();return e.useEffect(()=>{const e={};e.scroll={key:"scroll",isActive:!0,isEnabled:!0,action(){this.isActive=!this.isActive},active(){return this.isActive},enabled(){const{layoutService:e,discrete:r}=t;return n.allowScroll&&(e?.meta.isContinuous||r?.query.getCanScroll())}},e.interact={key:"interact",isEnabled:!0,enabled:()=>n.allowInteract},e.tooltip={key:"tooltip",isActive:!0,isEnabled:!0,action(e){this.isActive=!!e},active(){return this.isActive},enabled:()=>n.allowTooltip},e.select={key:"select",isActive:!1,isEnabled:!0,action(){this.isActive=!this.isActive},active(){return this.isActive},enabled:()=>n.allowSelect},e.lasso=r.get(),Object.keys(e).forEach(t=>{return n=e[t],Object.keys(yW.prototype).forEach(e=>{n[e]=yW.prototype[e]}),yW.init(n),n;var n}),o(e)},[]),e.useEffect(()=>{i&&r&&(i.lasso={...i.lasso,...r.get()})},[r]),{get:()=>i,setAllows:e=>{Object.assign(n,e),r.setAllows(e?.allowSelect)},setContext:e=>{Object.assign(t,e)},destroy:()=>{Object.keys(i).forEach(e=>i[e].removeAllListeners())}}}var xW={SPARK:{DEFAULT:7,SQUEEZE:7,LABELLESS:7},XSMALL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},SMALL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},MEDIUM:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},FULL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20}},SW={SCALE:{MAIN:{MINOR:"minor",MAJOR:"major",MAJOR_INNER:"majorInner",COLOR:"fill"},REDUCED:{MINOR:"miniMinor",MAJOR:"miniMajor",COLOR:"reducedFill"}},COMPONENT:{BAR:"bar",MINI_BAR:"mini-marker",GHOST_BAR_OOB:"ghost-bar",BAR_AXIS:"bar-axis",GROUP_AXIS:"group-axis",BAR_OOB_MAX:"bar-oob-max",BAR_OOB_MIN:"bar-oob-min",STACK_TOTAL_BAR:"stack-total-bar",BASE_TOOLTIP:"tooltip",BASE_TOOLTIP_NEW:"tooltip-qcm",SPACE:"space",LEGEND_CAT_TOOLTIP:"legend-cat-tooltip",LEGEND_COLOR_CAT:"legend-color-cat",MEASURE_REF_LINE:"mes-ref-line",DIMENSION_REF_LINE:"dim-ref-line",MEASURE_REF_LINE_LABEL:"mes-ref-line-label",DIMENSION_REF_LINE_LABEL:"dim-ref-line-label",TREND_LINES_TOOLTIP:"trend-lines-tooltip",TREND_LINES_TOOLTIP_OVERLAY:"trend-lines-tooltip-overlay"},COLLECTION:{MAIN:"main-collection",MINI:"mini-collection",MINI_STACK:"mini-stack-collection",MINI_CONTINUOUS:"mini-continuous-collection",STACK_TOTAL:"stack-total-collection"},FORMATTER:{MINOR:"bar",COLOR:"fill"}};const wW=({layout:e})=>{const t=e?.qHyperCube?.qDimensionInfo?.filter(e=>e.qError?.qErrorCode!==KV),n=e?.qHyperCube?.qMeasureInfo?.filter(e=>e.qError?.qErrorCode!==KV);return 1===(t?.length??0)&&2===(n?.length??0)};function MW(e,t,n="/qHyperCubeDef"){return{fetch(){return function(e,t,n){return e.getHyperCubeReducedData(n.path,[n.rect],n.zoomLevel,n.filter).catch(JD).then(e=>{const n=t.getHyperCubeValue("qMode"),r=t.getHyperCubeValue("qDimensionInfo"),i="K"===n&&r.length>1&&e[0]?.qIsReduced,o=e.slice(),a=t.getHyperCubeValue("qMeasureInfo"),s=i?[]:t.getHyperCubeValue("qColumnOrder");return{reducedCube:{qDataPages:o,qDimensionInfo:r.slice(),qEffectiveInterColumnSortOrder:[1,0],qMeasureInfo:i?[a[0],a[0]]:a.slice(),qStackedDataPages:[],qMode:"S",qHasOtherValues:t.getHyperCubeValue("qHasOtherValues"),qSize:t.getHyperCubeValue("qSize"),qColumnOrder:s}}})}(e,t,this.settings())},settings(){const e=t.getHyperCubeValue("qDimensionInfo"),r=t.meta.isStacked&&e.length>1?1:0,i=t.getHyperCubeValue("qMeasureInfo");return{path:n,rect:{qTop:0,qLeft:r,qWidth:e.length+i.length+r,qHeight:Math.min(2e3,1e4/(i.length+1))},zoomLevel:-1,filter:"D1"}}}}function kW({enigma:e,layoutService:t,viewModel:n,definitionPath:r,reducedHyperCubePath:i},o={}){const a=MW(e,t,r),s=function(e,t="reducedHyperCube"){return{fetch:()=>Promise.resolve({reducedCube:e.getLayoutValue(t)||e.getHyperCube()})}}(t,i),l=function(e){return{fetch:()=>{const t=e.getHyperCube(),n={...t,qDataPages:t.qDataPages.slice()};return Promise.resolve({reducedCube:n})}}}(t),c=function({layoutService:e}){const{isSnapshot:t,isStackedByDimension:n}=e.meta,r=e=>{e.qDimensionInfo.unshift({key:"dummy-patch-dimension"})};return r.should=e=>t&&n&&1===e.qDimensionInfo.length,r}({layoutService:t}),u={mode:{isReduced:!1}};return{fetch(){if(t.meta.isSnapshot)return s.fetch();if(t.meta.isContinuous)return l.fetch();if(!t.meta.isStacked){if(t.getHyperCubeValue("qSize.qcy",NaN)===t.getHyperCubeValue("qDataPages.0.qArea.qHeight",NaN))return l.fetch()}return a.fetch()},model:()=>u,update(e){var r;c.should(e)&&c(e),u.mode=bg(u.mode,t.meta),u.mode.isReduced=e.qDataPages[0]&&e.qDataPages[0].qIsReduced,u.mode.isStackedByDimension=u.mode.isStacked&&(2===(r=e).qDimensionInfo.length&&2===r.qMeasureInfo.length),u.mode.isStackedByMeasure=u.mode.isStacked&&function(e){return e.qMeasureInfo.length>1&&1===e.qDimensionInfo.length}(e),u.fields={major:u.mode.isStackedByDimension?"qDimensionInfo/"+(e.qDimensionInfo.length-1):n.fields.major,majorGroup:n.fields.majorGroup,minor:u.mode.isStackedByDimension?e.qMeasureInfo.map((e,t)=>`qMeasureInfo/${t}`):n.fields.minor},u.scales={major:SW.SCALE.REDUCED.MAJOR,minor:SW.SCALE.REDUCED.MINOR},u.cube=e,o.qDataPages=e.qDataPages},fetchMinMaxData(){if(o.qDataPages)return Promise.resolve(o.qDataPages);let n=a.settings();const r="K"===t.getHyperCubeValue("qMode")?1:n.rect.qHeight;return n=bg(!0,{},n,{rect:{qHeight:r}}),e.getHyperCubeReducedData(n.path,[n.rect],n.zoomLevel,n.filter).then(e=>e)},setSnapshotData(e){e.reducedHyperCube=u.cube}}}function CW({clearMinor:e,clearLegend:t,clearDiscrete:n,clearContinuous:r,selectionInfo:i}){t({componentName:"legendRangeBrush"}),e({eventName:"measureRange",componentName:"measureRangeBrush"}),n({eventName:"discreteRange",componentName:"discreteRangeBrush",brushName:!1}),"tap"!==i.event&&r({componentName:"continuousRangeBrush",brushName:!1})}function qW({layout:e,defaultAuto:t}){return e.qHyperCube.qDimensionInfo.length>1?{mode:"byDimension",useDimColVal:!0,useBaseColors:"dimension",byDimDef:{activeDimensionIndex:1}}:e.qHyperCube.qMeasureInfo.length>1?{mode:"primary",useBaseColors:"measure",paletteColor:null}:t(e)}function EW({layoutService:e,node:t}){const{isGroupedByDimension:n,isStackedByDimension:r,isDimensionless:i}=e.meta;return n?`${t.data.label}, ${t.data.group.label}`:r?`${t.data.label}, ${t.data.stack.label}`:i?void 0:t.data.label}function DW({chart:e,actions:t,translator:n,rtl:r,viewState:i,viewModel:o,layoutService:a,dockService:s,colorService:l,themeService:c,trendLineModel:u,custom:d}){const{isTwoDimensional:f,isStacked:h,isGroupedByDimension:p,isGroupedByMeasure:m,isStackedByDimension:g,isStackedByMeasure:y}=a.meta,{fontFamily:v}=c.getStyles(),b=function({layoutService:e,dockService:t}){const{BAR_AXIS:n,BAR_OOB_MIN:r,BAR_OOB_MAX:i,GROUP_AXIS:o}=SW.COMPONENT,{isGrouped:a,isGroupedByDimension:s}=e.meta,{orientation:l}=t.meta.chart,c="vertical"===l;return[({chart:e,hovered:t,meta:l,collected:u,collectedBounds:d})=>{const[f]=t,{triggerer:h}=l;if(h===r||h===i)return{key:f.key,bounds:f.bounds};if(c&&(h===n||h===o)){const t=e.findShapes("path").find(e=>s&&h===n?(e.key===r||e.key===i)&&e.data.value===f.data.value&&e.data.group.value===f.data.group.value:(e.key===r||e.key===i)&&e.data.value===f.data.value),o=e.findShapes("path").find(e=>s&&h===n?e.key===i&&e.data.value===f.data.value&&e.data.group.value===f.data.group.value:e.key===i&&e.data.value===f.data.value);if(t)return a?{key:o?o.key:SW.COMPONENT.BAR,bounds:d}:{key:t.key,bounds:t.bounds}}if(!c){const t=!u.some(e=>e.bounds.height+e.bounds.width!==0);if(t){const t=e.findShapes("path").find(e=>s&&h===n?(e.key===r||e.key===i)&&e.data.value===f.data.value&&e.data.group.value===f.data.group.value:(e.key===r||e.key===i)&&e.data.value===f.data.value);if(t)return{key:t.key,bounds:t.bounds}}}return!1},"collectible"]}({layoutService:a,dockService:s}),x=uW({majorInnerScale:SW.SCALE.MAIN.MAJOR_INNER,tooltip:SW.COMPONENT.TREND_LINES_TOOLTIP,tooltipOverlay:SW.COMPONENT.TREND_LINES_TOOLTIP_OVERLAY},{chart:e,viewState:i,trendLineModel:u,layoutService:a,rtl:r}),S=({collected:t,triggerer:n})=>{if(h){t.splice(0,t.length);const r=e.findShapes("container").filter(e=>e.key===SW.COMPONENT.BAR&&e.data?.stack.value===n.data.value).filter(e=>y?e.data?.value===n.data.value:e.data?.stack.value===n.data.value);r.forEach(e=>{if(e.children.length){const[n]=e.children;n.key=e.key,t.push(n)}else t.push(e)})}};return DM({chart:e,translator:n,config:{rtl:r,enable:()=>t.tooltip.enabled(),getColorSettings:()=>l.getMain().getSettings(),style:{fontFamily:v},main:{key:SW.COMPONENT.BASE_TOOLTIP_NEW,suppress:({event:e})=>x(e),getGroupByValue:({data:e})=>e.value,collectibles:[{key:SW.COMPONENT.BAR,type:"bar",major:({data:e,meta:t})=>m?t.triggerer===SW.COMPONENT.BAR_OOB_MIN||t.triggerer===SW.COMPONENT.BAR_OOB_MAX?[e.value,e.measureIndex.value]:e.value:p?t.triggerer===SW.COMPONENT.BAR_AXIS||t.triggerer===SW.COMPONENT.BAR_OOB_MIN||t.triggerer===SW.COMPONENT.BAR_OOB_MAX?[e.value,e.group.value]:e.group.value:g?e.stack.value:e.value},{key:`${SW.COMPONENT.GHOST_BAR_OOB}-min`,type:"bar",if:()=>!y&&!g,major:({data:e,meta:t})=>m?t.triggerer===SW.COMPONENT.BAR_OOB_MIN||t.triggerer===SW.COMPONENT.BAR_OOB_MAX?[e.value,e.measureIndex.value]:e.value:p?t.triggerer===SW.COMPONENT.BAR_OOB_MIN||t.triggerer===SW.COMPONENT.BAR_OOB_MAX||t.triggerer===SW.COMPONENT.BAR_AXIS?[e.value,e.group.value]:e.group.value:e.value},{key:`${SW.COMPONENT.GHOST_BAR_OOB}-max`,type:"bar",if:()=>!y&&!g,major:({data:e,meta:t})=>m?t.triggerer===SW.COMPONENT.BAR_OOB_MIN||t.triggerer===SW.COMPONENT.BAR_OOB_MAX?[e.value,e.measureIndex.value]:e.value:p?t.triggerer===SW.COMPONENT.BAR_OOB_MIN||t.triggerer===SW.COMPONENT.BAR_OOB_MAX||t.triggerer===SW.COMPONENT.BAR_AXIS?[e.value,e.group.value]:e.group.value:e.value}],triggers:[{keys:[SW.COMPONENT.BAR],collect:{from:"single"},placement:b},{keys:[SW.COMPONENT.BAR_AXIS],collect:{from:"dimension",by:({data:e})=>p?[e.value,e.group.value]:e.value,after:S},placement:b},{keys:[SW.COMPONENT.BAR_OOB_MIN,SW.COMPONENT.BAR_OOB_MAX],collect:{from:"dimension",by:({data:e})=>m?[e.value,e.measureIndex.value]:p?[e.value,e.group.value]:e.value,after:S},placement:b},{keys:[SW.COMPONENT.GROUP_AXIS],collect:{from:"dimension",by:({data:e})=>e.group.value},placement:b}],layout:{grouping:f,single:()=>!(!d.isEnabled()||!d.hasImages())||d.chart.isEnabled()},section:({h:t,nodes:n,dataset:r,formatter:i,create:s,util:l})=>{const[c]=n,{title:u,description:f,measures:h}=d.isEnabled()?d.getAttributes({dataset:r,nodes:[c]}):{},p=[];u&&p.push(s.text({value:u,style:{bold:!0}})),f&&p.push(s.text({value:f}));const m=d.hideBasic();if(m&&!h.length&&(u||f)||p.push(s.text({value:EW({layoutService:a,node:c}),style:{bold:!0}})),!m){const t=void 0!==c.data.fill?.value?e.scale(SW.SCALE.MAIN.COLOR)(c.data.fill.value):void 0;p.push(s.color({nodes:n,property:SW.SCALE.MAIN.COLOR,fillColor:t})),p.push(...n.map(e=>function({viewModel:e,layoutService:t,formatter:n,create:r,util:i,node:o}){const{isStacked:a,isStackedByDimension:s}=t.meta;if(a){const t=n(SW.FORMATTER.MINOR),{segment:a}=o.data,l=s&&t?t(a.value):a.label;return r.measure({label:i.dataset.title(o.data.source.key,e.fields.minor[s?0:o.data.measureIndex.value]),value:!0===o.data.null?.value||"NaN"===l?"-":l})}const{data:l}=o,{end:c}=l,{key:u,field:d}=c.source;return r.measure({label:i.dataset.title(u,d),value:c.label})}({viewModel:o,layoutService:a,formatter:i,create:s,util:l,node:e})))}h&&p.push(...h.map(e=>s.measure({label:e.label,value:e.value,survive:{color:!0,duplicate:!0}}))),d.chart.isEnabled()&&(d.chart.hasLimitation()?(d.chart.destroy(),p.push(s.raw({value:d.chart.createLimitationRow()}))):p.push(s.raw({value:d.chart.createContainer({h:t})})));const{customTooltipImages:g}=c.data;return d.isEnabled()&&g&&p.push(...g.map(e=>s.raw({value:d.createImageRow({value:e,h:t})}))),p.filter(Boolean)},sections:({nodes:t,formatter:r,meta:i,create:o,sections:a})=>{if(!h||i.triggerer!==SW.COMPONENT.BAR_AXIS)return;const[s]=t,[l]=e.findShapes("container").filter(e=>e.key===SW.COMPONENT.STACK_TOTAL_BAR&&e.data&&e.data.value===s.data.stack.value);if(!l)return;const c=r(SW.FORMATTER.MINOR),u=[];if(l.data.sumOfPositives.value>0){const{value:e}=l.data.sumOfPositives;u.push(o.measure({label:n?n.get("Object.ChartTooltip.sumOfPositives"):"Sum of positives",value:c?c(e):e}))}if(l.data.sumOfNegatives.value<0){const{value:e}=l.data.sumOfNegatives;u.push(o.measure({label:n?n.get("Object.ChartTooltip.sumOfNegatives"):"Sum of negatives",value:c?c(e):e}))}a.unshift(o.section({content:[o.text({value:l.data.label,style:{bold:!0}}),...u]}),o.divider())},events:{tooltip:{beforeShow:({collectNodes:e})=>d.isEnabled()&&d.hasImages()?d.addImages({nodes:e()}):Promise.resolve(),afterShow:({expando:e,nodes:t})=>{d.chart.isEnabled()&&!d.chart.hasLimitation()&&d.chart.show({nodes:t,properties:e.get("properties")})}},interaction:{mouseleave:()=>{d.chart.isEnabled()&&d.chart.hasAlternateState()&&d.chart.hide()}}}},legend:{keys:{tooltip:SW.COMPONENT.LEGEND_CAT_TOOLTIP,component:SW.COMPONENT.LEGEND_COLOR_CAT}}}})}const TW={getMaxGlyphCount(e,t){const{qDimensionInfo:n}=e,{qApprMaxGlyphCount:r}=n[t];return r},getDimensionSize(e){const t=e?.qCardinalities?.qHypercubeCardinal,{qLocked:n=0,qOption:r=0,qSelected:i=0}=e?.qStateCounts||{};return[void 0,0].includes(t)?n+r+i:t}};function OW({picasso:t,chart:n,environment:r,viewState:i,viewCache:o}){const a=e.useStaleLayout(),s=e.useModel(),l=e.useApp(),c=e.usePlugins(),u=e.useSelections(),d=e.useOptions(),[f,h]=e.useState(),[p,m]=e.useState(),[g,y]=e.useState(),v=e.useConstraints(),b=bW();return e.useEffect(()=>{if(!n)return()=>{};const e=b.get(),t=function({chart:e,actions:t,selections:n}){const r=e.scale(SW.SCALE.MAIN.MAJOR),i=Hw({chart:e,actions:t,selections:n,config:{allowSimultaneous:!0,brushRanges:!0,majorScale:r,selectionActions:{reset(){e.brushSelectionIncludeMax=void 0,t.lasso.active()&&t.lasso.action(!1)},clear:CW},custom:{getActions:()=>t},setBrushAliases({defaultFunc:e,brush:t}){e(),t.addKeyAlias("miniCube/qDimensionInfo/0","qHyperCube/qDimensionInfo/0"),t.addKeyAlias("miniCube/qDimensionInfo/1","qHyperCube/qDimensionInfo/1")}}});return i}({chart:n,actions:e,selections:u});return m(e),y(t),()=>{t.destroy(),b.destroy()}},[n]),e.useEffect(()=>{if(!v)return;const e={allowScroll:!v.active,allowInteract:!v.active,allowTooltip:!v.passive,allowSelect:!v.select&&!v.active};b.setAllows(e)},[v]),e.useEffect(()=>{if(!g||!r)return;const{theme:e,translator:u,localeInfo:f,flags:m,embed:y}=r,{direction:v="ltr"}=d,x="rtl"===v,S=Px({source:a,metaAdditionsFn:({layout:e})=>{const t=HD.canBeContinuous(e),n=GD.continuous({layout:e}),r=GD.dimensionless(e),i=wW({layout:e})&&"butterfly"===e?.barGrouping?.grouping;return{canBeContinuous:t,isDiscrete:!n,isContinuous:n,isTime:HD.isTime(n,e),isDimensionless:r,isSimple:GD.simple(e),isGrouped:!i&&GD.grouped(e),isGroupedByMeasure:!i&&GD.groupedByMeasure(e),isGroupedByDimension:!i&&GD.groupedByDimension(e),isStacked:!i&&GD.stacked(e),isStackedByDimension:!i&&GD.stackedByDimension(e),isStackedByMeasure:!i&&GD.stackedByMeasure(e),isSnapshot:GD.snapshot(e),isButterfly:i}},experimental:{filter:!0}});g.setFilteredFields(S.meta.filteredFields);const w=function(e){return e.color.auto?e.qHyperCube.qDimensionInfo.length>1:"byDimension"===e.color.mode&&e.color.byDimDef&&e.color.byDimDef.activeDimensionIndex>-1}(S.getLayout())?Px({source:S.getLayout()}):void 0,M=function({layout:e,options:t={}}){return!(!e?.snapshotData||t.freeResize)&&{width:e.snapshotData.content.size.w,height:e.snapshotData.content.size.h}}({layout:a,options:d}),k=function({layoutService:e,viewCache:t,options:n}){const r={};return r.fields=function(e){const{meta:t}=e,n={majorGroup:t.isGroupedByDimension?"qDimensionInfo/0":void 0,majorStack:t.isStacked?"qDimensionInfo/0":void 0,major:t.isDimensionless?void 0:"qDimensionInfo/"+(t.dimensionCount-1),majors:e.getHyperCubeValue("qDimensionInfo").map((e,t)=>`qDimensionInfo/${t}`),minor:e.getHyperCubeValue("qMeasureInfo").map((e,t)=>`qMeasureInfo/${t}`)};return n.majorNumeric=`${t.isStackedByDimension?n.majorStack:n.major}:numeric`,n}(e),r.selectionDimensionIdx=(e=>{const t=e.qDimensionInfo.length;for(let n=0;n<t;n++){const r=e.qDimensionInfo[n];if(!(r.qLocked||r.qCardinalities.qHypercubeCardinal<=1&&n<t-1))return n}})(e.getHyperCube()),r.isDimensionLocked=t=>e.getHyperCube().qDimensionInfo[t].qLocked,r.selectionDimensionProp=e=>void 0===r.selectionDimensionIdx||void 0!==e&&r.selectionDimensionIdx!==e?{}:{selectionDimension:{field:r.selectionDimensionIdx}},r.animations={enabled:()=>!(!1===n.chartAnimations||r.animations.isPartialUpdating||r.animations.isSizeChanging||r.animations.hasSlicedHats||bN.propertiesHaveChanged({viewCache:t,layout:e.getLayout()})),isPartialUpdating:!1,isSizeChanging:!1,hasSlicedHats:!1},r}({layoutService:S,viewCache:o,options:d}),C=kx({chart:n,layoutService:S,config:{logicalSize:M,rtl:x},typeConfig:{type:"major-minor",fallback:"vertical",invert:!0}}),q=function({layoutService:e}){return px({config:{args:{layoutService:e},disclaimers:{NoDataExist:!0,OnlyNanDataMeasure:!0,OnlyNanDataDimensionContinuous:!0,LimitedData:{condition:()=>{const{isContinuous:t,isTwoDimensional:n}=e.meta;if(!t||!n)return!1;const r=e.getLayout().qHyperCube.qDimensionInfo[1];return TW.getDimensionSize(r)>HD.maxNumberOfLines}},OnlyNegativeValues:{condition:()=>{if(e.meta.isButterfly){const{qMeasureInfo:t}=e.getHyperCube();return t.every(e=>{const{qMin:t,qMax:n}=e;return t<0&&n<0})}return!1},alignment:"center"},NegativeValues:{condition:()=>{if(e.meta.isButterfly){const{qMeasureInfo:t}=e.getHyperCube();return t.some(e=>{const{qMin:t}=e;return t<0})}return!1}}}}})}({layoutService:S}),E=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,c=r.extend,u=void 0===c?[]:c,d={theme:t,matrix:Gw(a),styles:void 0};return d.styles=Jw({theme:t,id:i,transform:l,extend:u,matrix:d.matrix}),{getStyles:function(){return d.styles},getTheme:function(){return d.theme},setTheme:function(e){d.theme=e,d.styles=Jw({theme:e,id:i,transform:l,extend:u,matrix:d.matrix})}}}({theme:e,config:{id:"barChart",transform:[["label.value.fontSize",e=>parseInt(e,10)]],resolve:[["object","plugins.label","fontFamily",'"Source Sans Pro", "Arial", "sans-serif"'],["object","plugins.label","fontSize","12px"]]}}),D=LD.model({model:s,layoutService:S,viewCache:o,viewState:i}),T=kW({enigma:s,layoutService:S,viewModel:k});!function({layoutService:e,viewState:t,viewStateOptions:n={}}){const r=e.meta.isSnapshot?e.getLayoutValue("snapshotData.content.chartData",{}):n;t.preventSet("scrollOffset",r.scrollOffset),t.preventSet("legendScrollOffset",r.legendScrollOffset||0),r.zoom&&t.preventSet("zoom",r.zoom)}({layoutService:S,viewState:i,viewStateOptions:d?.viewState});const O=function({app:e,model:t,translator:n,picasso:r,localeInfo:i,theme:o,continuousDataModel:a,layoutService:s,legendLayoutService:l,reducedDataModel:c}){const{isContinuous:u,isStacked:d}=s.meta,f={main:void 0,mini:{getScales:()=>({}),getColor:()=>e=>e,getDatumProps:()=>({}),getAuxiliarySettings:()=>{}}};return{initialize:()=>{const h=[],{isReduced:p}=c.model().mode,m=u||p||d,g=!u&&(p||d)&&l?l.getHyperCube():void 0,y=g?"legendCube":void 0;return f.main=cx({app:e,model:t,translator:n,picasso:r,layoutService:s,config:{localeInfo:i,auto:qW,key:SW.SCALE.MAIN.COLOR},createConfig:()=>({hc:m?g||s.getHyperCube():c.model().cube,source:m?y:"miniCube",theme:o})}),h.push(f.main.initialize()),u&&(f.mini=cx({app:e,model:t,translator:n,picasso:r,layoutService:s,config:{localeInfo:i,auto:qW,key:SW.SCALE.REDUCED.COLOR},createConfig:()=>({layout:a.getInitialLayout(),hc:a.getInitialCube(),source:"miniCube",theme:o})}),h.push(f.mini.initialize())),Promise.all(h)},getMain:()=>f.main,getMini:()=>f.mini}}({picasso:t,model:s,app:l,translator:u,localeInfo:f,theme:e,continuousDataModel:D,layoutService:S,legendLayoutService:w,reducedDataModel:T}),N=function(e){var t,n=e.app,r=e.translator,i={initialized:!1,dimensions:[],measures:[]};return{initialize:(t=oy(uy().m(function e(t){var o,a,s,l,c,u,d;return uy().w(function(e){for(;;)switch(e.n){case 0:if(o=t.properties,!i.initialized){e.n=1;break}return e.a(2);case 1:return s=[Tv(a={app:n,translator:r,properties:o}),Av(a)],e.n=2,Promise.all(s);case 2:l=e.v,c=fy(l,2),u=c[0],d=c[1],i.dimensions=u,i.measures=d,i.initialized=!0;case 3:return e.a(2)}},e)})),function(e){return t.apply(this,arguments)}),getAlternatives:function(){return{dimensions:hy(i.dimensions),measures:hy(i.measures)}}}}({app:l,translator:u}),A=function({layoutService:e,themeService:t,colorService:n}){const r=t.getStyles(),i=t=>(e.getLayoutValue("components",[])||[]).find(e=>e.key===t),o=(e,t)=>{const r=n.getMain().getPaletteColor;if(e?.color&&r){const n=r(e);return"none"===n&&e.index>0?e?.color??t:n??t}return t};return{axis:{title:{getStyle:()=>{const e=i("axis")?.axis?.title;return{fontFamily:e?.fontFamily??r.axis.title.fontFamily,fontSize:e?.fontSize??r.axis.title.fontSize,color:o(e?.color,r.axis.title.color)}}},label:{getStyle:()=>{const e=i("axis")?.axis?.label?.name;return{fill:o(e?.color,r.axis.label.name.color),fontSize:e?.fontSize??r.axis.label.name.fontSize,fontFamily:e?.fontFamily??r.axis.label.name.fontFamily}}}},legend:{title:{getStyle:()=>{const e=i("legend")?.legend?.title;return{fontFamily:e?.fontFamily??r.legend.title.fontFamily,fontSize:e?.fontSize??r.legend.title.fontSize,color:o(e?.color,r.legend.title.color)}}},label:{getStyle:()=>{const e=i("legend")?.legend?.label;return{fontFamily:e?.fontFamily??r.legend.label.fontFamily,fontSize:e?.fontSize??r.legend.label.fontSize,color:o(e?.color,r.legend.label.color)}}}},label:{getStyle:()=>{const e=i("label")?.label?.value;return{fill:o(e?.color,r.label.value.color),useContrastColor:e?.useContrastColor??!0,fontSize:e?.fontSize??r.label.value.fontSize,fontFamily:e?.fontFamily??r.label.value.fontFamily}}}}}({layoutService:S,themeService:E,colorService:O}),_=tW({layoutService:S,viewState:i,colorModel:{settings:()=>O.getMain().getSettings(),resolveUIColor:e=>O.getMain().getPaletteColor(e)},chart:n,env:r,keys:{colorScale:SW.SCALE.MAIN.COLOR},isEnabled:()=>!S.meta.isGroupedByDimension&&(!S.meta.isStackedByDimension||m.isEnabled("TRENDLINES_STACKED_DIM"))&&!S.meta.isDimensionless});WV.attrExpr.updateProperties(s,a);const I=RV({layout:a,app:l,model:s,picasso:t,chart:n,translator:u,localeInfo:f,embed:y}),L=YV({app:l,chart:n,embed:y,flags:m,layout:S.getLayout(),localeInfo:f,model:s,options:{direction:d.direction},picasso:t,translator:u}),P=DW({chart:n,actions:p,translator:u,rtl:x,viewState:i,viewModel:k,layoutService:S,dockService:C,colorService:O,themeService:E,trendLineModel:_,custom:L});let R;S.meta.isDiscrete&&(R=R$({chart:n,actions:p,componentKey:SW.COMPONENT.BAR,enigmaModel:s,layoutService:S,dockService:C,trendLineModel:_,itemWidths:xW,viewState:i,rtl:x,options:{axisKey:SW.COMPONENT.BAR_AXIS,renderer:t.renderer("svg")()}}));const z=qN({layoutService:S,discreteModel:R}),F=function(e){return{layout:e.getLayout(),keys:{SCALE:{MAIN:{MINOR:SW.SCALE.MAIN.MINOR,MAJOR:SW.SCALE.MAIN.MAJOR}},COMPONENT:{BAR:SW.COMPONENT.BAR,BAR_AXIS:SW.COMPONENT.BAR_AXIS,Y_AXIS:"y-axis",MEASURE_TITLE:"measure-title",DIMENSION_TITLE:"dimension-title"},COLLECTION:{MAIN:SW.COLLECTION.MAIN}}}}(S),j=function(e){var t=e.picassoInstance,n=e.plugins,r=e.pluginArgs,i=void 0===r?{}:r,o={initialized:!1,definitions:[]};return{initialize:function(){return oy(uy().m(function e(){var r,a,s,l;return uy().w(function(e){for(;;)switch(e.n){case 0:if(!o.initialized){e.n=1;break}return e.a(2);case 1:return a=Promise.all(n.filter(function(e){return"custom-component"===e.info.type}).map(function(){var e=oy(uy().m(function e(n){var r;return uy().w(function(e){for(;;)switch(e.n){case 0:if(n.info.componentName){e.n=1;break}throw new Error("plugin-service: Custom component is missing componentName");case 1:return e.n=2,n.fn(ly({},i));case 2:if("object"===py(r=e.v)){e.n=3;break}throw new Error("plugin-service: Custom component needs to be an object");case 3:t.component(n.info.componentName,r);case 4:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}())),s=Promise.all(n.filter(function(e){return"component-definition"===e.info.type}).map(function(e){return e.fn(ly({},i))})),e.n=2,Promise.all([a,s]);case 2:l=e.v,o.initialized=!0,(r=o.definitions).push.apply(r,hy(l[1]));case 3:return e.a(2)}},e)}))()},extendComponents:function(e){return o.initialized?(o.definitions.filter(Boolean).forEach(function(t){var n=fy(e.filter(function(e){return e.key&&e.key===t.key}),1)[0];if(n){var r=Lv(!0,{},n.brush);Lv(!0,n,t),t.brush&&(n.brush=function(e,t){return"object"===py(e)&&Object.keys(e).length?(Array.isArray(t.consume)&&(e.consume=Rx({originalArray:e.consume,newArray:t.consume,matchKey:"context"})),Array.isArray(t.trigger)&&(e.trigger=Rx({originalArray:e.trigger,newArray:t.trigger,matchKey:"on"})),e):t}(r,t.brush))}else e.push(t)}),e):e}}}({picassoInstance:t,plugins:c||[],pluginArgs:F});b.setContext({discrete:R,layoutService:S}),h({alternativeService:N,discrete:R,continuous:LD,legendLayoutService:w,layoutService:S,viewModel:k,dockService:C,themeService:E,styleService:A,continuousDataModel:D,reducedDataModel:T,colorService:O,trendLineModel:_,refLineModel:z,pluginService:j,customTooltipModel:I,tooltipService:P,selectionService:g,logicalSize:M,disclaimerService:q,customTooltipService:L})},[g,d,r,a]),f}function NW(e){return e.qIsOtherCell||-3===e.qElemNumber||-3===e.qElemNo}function AW(e){return e.some(NW)}function _W(e,t){let n=NaN,r=NaN;return e.forEach(e=>{AW(e)||e.slice(-t).forEach(e=>{"NaN"!==e.qNum&&(n=Number.isNaN(n)?e.qNum:Math.min(e.qNum,n),r=Number.isNaN(r)?e.qNum:Math.max(e.qNum,r))})}),{min:n,max:r}}function IW(e){let t=NaN,n=NaN;if(!e.getLayoutValue("measureAxis.autoMinMax",!1)){const r=e.getLayoutValue("measureAxis.minMax");e.meta.isButterfly||"min"!==r&&"minMax"!==r||(t=+e.getLayoutValue("measureAxis.min")),"max"!==r&&"minMax"!==r||(n=+e.getLayoutValue("measureAxis.max"),e.meta.isButterfly&&(t=-n))}return{min:t,max:n,isExplicitMin:!Number.isNaN(t),isExplicitMax:!Number.isNaN(n)}}function LW(e,t){let n=NaN,r=NaN;return e.forEach(e=>{if(!AW(e)){let i=0,o=0;e.slice(-t).forEach(e=>{"NaN"!==e.qNum&&(e.qNum>=0?o+=e.qNum:i+=e.qNum)}),n=Number.isNaN(n)?i:Math.min(i,n),r=Number.isNaN(r)?o:Math.max(o,r)}}),{min:n,max:r}}function PW(e,t){const n={};e.forEach(e=>{if(!AW(e)){const r=e[0].qElemNumber;n[r]=n[r]?n[r]:{min:0,max:0,cId:r},e.slice(t).forEach(e=>{"NaN"!==e.qNum&&(e.qNum>=0?n[r].max+=e.qNum:n[r].min+=e.qNum)})}});let r=NaN,i=NaN;return Object.keys(n).forEach(e=>{r=Number.isNaN(r)?n[e].min:Math.min(n[e].min,r),i=Number.isNaN(i)?n[e].max:Math.max(n[e].max,i)}),{min:r,max:i}}function RW(e){return"number"==typeof e&&!Number.isNaN(e)}function zW(e){const{meta:t}=e,n=e.getHyperCubeValue("qMeasureInfo");return t.isButterfly?{min:Math.min(0,RW(n[1].qMax)?-n[1].qMax:0),max:Math.max(0,RW(n[0].qMax)?n[0].qMax:0)}:{min:Math.min(...n.filter(e=>RW(e.qMin)).map(e=>e.qMin)),max:Math.max(...n.filter(e=>RW(e.qMax)).map(e=>e.qMax))}}const{isNumber:FW}=TO;function jW(e,t,n){for(let n=e.length-1;n>-1;n--)if(t(e[n]))return e[n];return n}function BW(e){return!Number.isNaN(+e.qNum)}function HW(e){return e.qNum}function VW(e){return!Number.isNaN(+e.qNum)}function $W(e){return e.qNum}function WW(e,t){return e.push(...t),e}const{getValueWithOffset:UW,isNumber:YW}=TO;function KW(e,t){return Math.abs(e/t)<5||0===t}function GW({layoutService:e,trendLineModel:t},n={}){const{stackedByMeasureExtractor:r=LW,stackedByDimensionExtractor:i=PW,straightExtractor:o=_W,measureInfoExtractor:a=zW,explicitExtractor:s=IW}=n,{meta:l}=e;return{extract({qDataPages:e,qStackedDataPages:n,others:r,count:i}){let o,a;if(Array.isArray(n)?({min:o,max:a}=this.extractFromStacked(n)):({min:o,max:a}=this.extractFromStraight(e,i)),t.query.hasTrendLines()){const{min:e,max:n}=t.query.getMinMax();o=Number.isFinite(e)?Math.min(o,e):o,a=Number.isFinite(n)?Math.max(a,n):a}const{min:s,max:l}=this.extractOthers(r),c=this.extractExplicit(),u=[0,o,a].filter(e=>YW(e));let d=Math.min(...u),f=Math.max(...u);d=KW(s,d)?Math.min(d,s):d,f=KW(l,f)?Math.max(f,l):f;const h=[c.explicitMin,c.explicitMax,d,f].filter(e=>YW(e));return o=Number.isNaN(c.explicitMin)?Math.min(...h):c.explicitMin,a=Number.isNaN(c.explicitMax)?Math.max(...h):c.explicitMax,o===a&&(Number.isNaN(c.explicitMin)?o=UW(o,-.2):Number.isNaN(c.explicitMax)&&(a=UW(a,.2))),{min:o,max:a,implicitMin:d,implicitMax:f,otherMin:s,otherMax:l,hasOtherMin:s<o,hasOtherMax:l>a,...c}},extractExplicit(){const{min:t,max:n,isExplicitMin:r,isExplicitMax:i}=s(e);return{hasExplicitMinMax:r||i,hasExplicitMin:r,hasExplicitMax:i,explicitMin:t,explicitMax:n}},extractFromStacked:e=>function(e){return e.length?{min:Math.min(...e[0].qSubNodes.filter(e=>FW(e.qMinNeg)).map(e=>e.qMinNeg)),max:Math.max(...e[0].qSubNodes.filter(e=>FW(e.qMaxPos)).map(e=>e.qMaxPos))}:{min:0,max:0}}(e.length?e[0].qData:[]),extractFromStraight(t,n){const s=t.length?t[0].qMatrix:[];return l.isStackedByMeasure?r(s,n):l.isStackedByDimension?i(s,n):e.getHyperCubeValue("qHasOtherValues")?o(s,n):a(e)},extractOthers:e=>l.isStackedByDimension?function(e){const t=jW(Cx(e,"0.qData.0.qSubNodes",[]),NW,{qMaxPos:0,qMinNeg:0});return{min:t.qMinNeg,max:t.qMaxPos}}(e):l.isGroupedByDimension?function(e){const t=Cx(e,"0.qMatrix",[]).filter(AW).reduce(WW,[]).filter(VW).map($W);return{min:Math.min(0,...t),max:Math.max(0,...t)}}(e):function(e){const t=jW(Cx(e,"0.qMatrix",[]),AW,[]).filter(BW).map(HW);return{min:Math.min(0,...t),max:Math.max(0,...t)}}(e)}}function XW(e){const t=function({reducedDataModel:e,layoutService:t,continuousDataModel:n}){const{meta:r,getHyperCubeValue:i}=t,o=e=>!e.length&&r.mode.K,a=e=>{const t=i("qStackedDataPages",[]);return{qStackedDataPages:t,others:e?t:[]}};return{resolve(){const t=i("qMeasureInfo").length,s=i("qDimensionInfo").length,l=i("qHasOtherValues");if(!r.isStacked&&!l)return Promise.resolve({qDataPages:[{}],count:t});if(r.isContinuous){const e=r.isStackedByDimension?s:t;return n.fetchMinMaxData().then(t=>({qDataPages:t,count:e}))}const c=r.isStackedByDimension?1:t;return e.fetchMinMaxData().then(e=>{if(o(e))return a(l);let t=[];return l&&(t=r.mode.K?i("qStackedDataPages",[]):i("qDataPages",[])),{qDataPages:e,count:c,others:t}})}}}(e),n=GW(e);return t.resolve().then(e=>n.extract(e))}const JW="lasso",ZW=({key:e,componentTargetKey:t,requireFailure:n,recognizeWith:r},i)=>({key:`event:${e}`,type:"Pan",requireFailure:n,recognizeWith:r,options:{event:JW,enable(e,n){if(this.started===JW||!n)return!0;if(!i.actions.select.enabled()||!i.actions.lasso.enabled()||!i.actions.lasso.active())return!1;return this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter(e=>e.key===t).length>0}},events:{lassostart(t){t.preventDefault(),this.started!==JW&&(i.actions.select.emit("start",JW),this.chart.component(e).emit("lassoStart",t),this.started=JW)},lassomove(t){t.preventDefault(),this.chart.component(e).emit("lassoMove",t),"function"==typeof i.updateOnMove&&i.updateOnMove(this.chart)},lassoend(t){t.preventDefault(),this.started=!1,this.chart.component(e).emit("lassoEnd",t),i.actions.select.emit("end",JW),"function"==typeof i.updateOnEnd&&i.updateOnEnd()}}});const QW=({targets:e,requireFailure:t,recognizeWith:n,components:r,eventName:i="tap"},o)=>{let a;const s=o.customTooltipModel?o.customTooltipModel.utils:void 0,l=s?o.debouncer(s.displayTooltip,s.DEBOUNCE_THRESHOLD):void 0;return{key:"event:tap",type:"Tap",requireFailure:t,recognizeWith:n,options:{event:i,interval:10,pointers:1,enable(t,n){return!n||!(!o.actions.select.enabled()&&!o.actions.tooltip.enabled())&&(a=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter(t=>-1!==e.indexOf(t.key)),a.length>0)}},events:{[i](t){t.preventDefault();const n=function(e,t){const n=t.element.getBoundingClientRect();let r,i;return e.center?(({x:r}=e.center),({y:i}=e.center)):(r=e.clientX,i=e.clientY),{x:r-n.left,y:i-n.top}}(t,this.chart),c=o.hitRadius?o.hitRadius(a):0,u=c>0?{cx:n.x,cy:n.y,r:c}:n,d=o.shapesAt?o.shapesAt(u):this.chart.shapesAt(u,{components:e.map(e=>({key:e,propagation:"stop"})),propagation:"stop"}),f=this.chart.component("tooltip"),h="mouse"!==t.pointerType&&f&&f.show;if(!o.isLocked(a)&&!o.tooltipOnly&&o.actions.select.enabled()){const e=this.chart.componentsFromPoint({x:t.center.x,y:t.center.y}),n=e.some(e=>"legend-cat"===e.type);if(!d.length&&n||(this.chart.brushSelectionIncludeMax=!1,o.actions.select.brushSelectionIncludeMax=!1,o.actions.select.emit("start",i,e)),d.length&&r){this.chart.brushSelectionIncludeMax=!1,o.actions.select.brushSelectionIncludeMax=!1;const e="function"==typeof r?r(t,d):r;this.chart.brushFromShapes(d,{components:e}),o.actions.select.emit("end",i),(({largeDataService:e,chart:t})=>{(e?.meta||{}).isLargeNumPoints&&t.brush("lazySelection")._state(t.brush("selection")._state())})({largeDataService:o.largeDataService,chart:this.chart})}}if(f&&o.actions.tooltip.enabled())if(d.length){const{customTooltipModel:e}=o;if(e?.useCustomTooltip&&s.checkIfPromisesExist({customTooltipModel:e})){const n=s.getNodes(t,this.chart);l(t,f,{nodes:n,opts:o,customTooltipModel:e})}else f.emit("show",t,{nodes:d})}else h&&f.emit("hide")}}}};const eU=({key:e,requireFailure:t,recognizeWith:n,eventName:r="tap"},i)=>({prio:1,key:`event:${e}-tap`,type:"Tap",requireFailure:t,recognizeWith:n,options:{event:`${r}-${e}-tap`,interval:10,pointers:1,enable:(t,n)=>!!n&&(!!i.actions.select.enabled()&&(!(!n.target||"INPUT"!==n.target.nodeName)||!(!n.target||!n.target.hasAttribute("data-other-value"))&&(n.target.getAttribute("data-key")||"").split("-bubble")[0]===e))},events:{[`${r}-${e}-tap`](t){(t.target.getAttribute("data-key")||"").split("-bubble")[0]&&(t.preventDefault(),this.chart.component(e).emit("bubbleStart",t))}}});const tU=({eventName:e,key:t,fillTargets:n=[],requireFailure:r,recognizeWith:i},o,a)=>({key:`event:${t}`,type:"Pan",requireFailure:r,recognizeWith:i,options:{event:e,enable(r,i){if(this.started===e||!i)return!0;if(!o.actions.select.enabled())return!1;const a=this.chart.componentsFromPoint({x:i.center.x,y:i.center.y}).filter(e=>-1!==n.indexOf(e.key)),s=0===a.length&&function(e,t){const{target:n}=e.srcEvent;return!(!n||0!==(n.getAttribute("data-key")||"").indexOf(`${t}-`))}(i,t);return s?(this.started=e,!0):a.length>0}},events:{[`${e}start`](n){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,o.actions.select.brushSelectionIncludeMax=!0),n.preventDefault(),o.actions.select.emit("start",e),this.chart.component(t).emit(`${a}Start`,n),this.started=e},[`${e}move`](e){e.preventDefault(),this.chart.component(t).emit(`${a}Move`,e),"function"==typeof o.updateOnMove&&o.updateOnMove(this.chart)},[`${e}end`](n){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,o.actions.select.brushSelectionIncludeMax=!0),n.preventDefault(),this.chart.component(t).emit(`${a}End`,n),o.actions.select.emit("end",e),this.started=!1,"function"==typeof o.updateOnEnd&&o.updateOnEnd()}}});function nU(e,t){const n=function(e){const{key:t,targets:n,fillTargets:r,targetSelector:i,targetFillSelector:o,dock:a,scale:s,bubblesPlacement:l="inside",observeBrush:c=!1,multiple:u=!1,toLabel:d,onEdited:f}=e;return{key:t,type:"brush-range",layout:{dock:n.map(e=>`@${e}`).join(",")},on:f?{bubbleEnd(){f()}}:{},settings:{brush:c?{context:"selection",observe:!0}:"selection",scale:s,multiple:u,direction:"left"===a||"right"===a?"vertical":"horizontal",bubbles:{align:"left"===a||"top"===a?"end":"start",placement:l,label:d},target:{components:r,selector:i,fillSelector:o,fill:"rgba(82,204,82,0.2)"}}}}(e),r=tU(e,t,"range");return{interactions:[e.onEdited?eU(e,t):null,r].filter(Boolean),components:[n]}}const rU={refLines:{minimumLayoutMode:"SPARK"},measureAxisTitle:{minimumLayoutMode:"XSMALL"},dimensionAxisTitle:{minimumLayoutMode:"XSMALL"},measureAxis:{minimumLayoutMode:"XSMALL"},dimensionAxis:{minimumLayoutMode:"XSMALL"},gridLines:{minimumLayoutMode:"XSMALL"},refLinesLabels:{minimumLayoutMode:"SMALL"},horizontalDimensionAxis:{minimumLayoutMode:{width:"XSMALL",height:"SMALL"}},verticalDimensionAxis:{minimumLayoutMode:{width:"SMALL",height:"XSMALL"}},horizontalDimensionAxisTitle:{minimumLayoutMode:{width:"XSMALL",height:"MEDIUM"}},verticalDimensionAxisTitle:{minimumLayoutMode:{width:"MEDIUM",height:"XSMALL"}}},iU="inner-time-axis",oU="outer-time-axis";const aU={getMajorAxisMaxGlyphCount(e,t){let n=0;if(e.qDimensionInfo.length){const r=t?0:e.qDimensionInfo.length-1;n=TW.getMaxGlyphCount(e,r)}else e.qMeasureInfo.forEach(e=>{n=Math.max(n,e.qFallbackTitle.length)});return n},getAxisData(e,t){let n;return n=e.qDimensionInfo.length?Cx(e,t?"qStackedDataPages.0.qData.0.qSubNodes":"qDataPages.0.qMatrix"):e.qMeasureInfo,n},getBarAxisMaxGlyphCount(e,t){if(!e)return;const n=aU.getAxisData(e,t),r=!e.qDimensionInfo.length,i=r||t?void 0:e.qDimensionInfo.length-1,o=aU.getMajorAxisMaxGlyphCount(e,t),a=r?"qFallbackTitle":"qText";return nT.getAdjustedMaxGlyphCount(o,n,i,a)},getGroupAxisMaxGlyphCount(e){if(!e)return;const t=aU.getAxisData(e),n=TW.getMaxGlyphCount(e,0);return nT.getAdjustedMaxGlyphCount(n,t,0)}};var sU=3,lU=13;function cU(e,t,n,r){const{meta:i}=t.layoutService,o=[],a=!("none"===e.measureAxis.show),s=!("title"===e.measureAxis.show);i.isContinuous?o.push(...function(e,t,n,r){const{meta:i}=t.layoutService,{axis:o,grid:a}=t.themeService.getStyles(),s=t.styleService.axis.label.getStyle(),{auto:l,spacing:c}=t.layoutService.getLayoutValue("gridLine",{}),u=[],d="none"!==e.dimensionAxis.show&&"title"!==e.dimensionAxis.show,f=rU[`${t.dockService.meta.major.orientation}DimensionAxis`].minimumLayoutMode,h={type:"grid-line",x:{},layout:{minimumLayoutMode:rU.gridLines.minimumLayoutMode},ticks:{stroke:a.line.major.color},minorTicks:{show:!1,stroke:a.line.minor.color},animations:{enabled:t.viewModel.animations.enabled,trackBy:bN.lines.trackBy,compensateForLayoutChanges:bN.lines.compensateForLayoutChanges}},p=!!e.showMiniChartForContinuousAxis&&{type:"range",key:"range-brush-highlighter",layout:{dock:"@scrollbar"},settings:{scale:t.reducedDataModel.scales.major,brush:"selection",fill:"#6CB33F",opacity:.2}};if(i.isTime){if(d){const e=n?"end":"start",r=n?1:0,i="bottom"===t.dockService.meta.major.dock?0:1,a={label:{fill:s.fill,fontSize:s.fontSize,fontFamily:s.fontFamily},majorGuideLine:{stroke:o.line.major.color},minorGuideLine:{stroke:o.line.minor.color}},d={type:"time-axis",renderer:"svg",layout:{dock:t.dockService.meta.major.dock,minimumLayoutMode:f},preferredSize:()=>({size:2*parseFloat(s.fontSize),edgeBleed:{left:1,right:1}}),settings:{anchor:e,label:{align:i,justify:r},guideLine:{major:{justify:r},minor:{align:i}}},style:a,animations:{enabled:t.viewModel.animations.enabled,trackBy:bN.axes.trackBy({isTime:!0}),compensateForLayoutChanges:bN.axes.compensateForLayoutChanges({isTime:!0})}};u.push(bg(!0,{},d,{key:iU,scale:SW.SCALE.MAIN.MAJOR_INNER,settings:{guideLine:{minor:{show:!0}},line:{show:!l&&0===c}},style:bg(!0,{},a,{line:{stroke:o.line.major.color},majorGuideLine:{stroke:o.line.minor.color},minorGuideLine:{stroke:o.line.major.color}})})),u.push(bg(!0,{},d,{key:oU,scale:SW.SCALE.MAIN.MAJOR,settings:{guideLine:{minor:{show:!1}},line:{show:!1}}})),u.push({type:"axis-overlay",key:"outer-axis-overlay",scale:SW.SCALE.MAIN.MAJOR,layout:{dock:`@${oU}`,minimumLayoutMode:f}}),u.push({type:"axis-overlay",key:"inner-axis-overlay",scale:SW.SCALE.MAIN.MAJOR_INNER,layout:{dock:`@${iU}`,minimumLayoutMode:f}}),u.push(p)}return u.push(bg(!0,{},h,{key:"inner-time-grid",x:{scale:SW.SCALE.MAIN.MAJOR_INNER},ticks:{stroke:a.line.minor.color}})),u.push(bg(!0,{},h,{key:"outer-time-grid",x:{scale:SW.SCALE.MAIN.MAJOR}})),u}if(i.isContinuous){const e="continuous-axis";d&&(u.push({type:"axis",key:e,renderer:DN(t.flags),scale:SW.SCALE.MAIN.MAJOR,layout:{dock:t.dockService.meta.major.dock,minimumLayoutMode:f},settings:{labels:{align:0,offset:4,fill:s.fill,fontSize:s.fontSize,fontFamily:s.fontFamily},ticks:{show:!0,stroke:o.line.major.color},line:{show:!r},minorTicks:{show:!1}},animations:{enabled:t.viewModel.animations.enabled,trackBy:bN.axes.trackBy({isContinuous:!0}),compensateForLayoutChanges:bN.axes.compensateForLayoutChanges({isContinuous:!0})}}),u.push({type:"axis-overlay",key:"inner-axis-overlay",scale:SW.SCALE.MAIN.MAJOR,layout:{dock:`@${e}`,minimumLayoutMode:f}}),u.push(p)),u.push(bg(!0,{},h,{key:"continuous-grid",x:{scale:SW.SCALE.MAIN.MAJOR},minorTicks:{show:!0}}))}return u}(e,t,n,r)):o.push(...function(e,t,n,r){if("none"===e.dimensionAxis.show)return[];const{meta:i}=t.layoutService,o=t.themeService.getStyles(),a=[],s=function(e,t){return!t.layoutService.meta.isGroupedByDimension||!e.legend.show||t.colorService.getMain().getSettings().field!==t.viewModel.fields.major}(e,t),l=function(e,t){return!(!t.layoutService.meta.isGroupedByDimension||e.legend.show&&t.colorService.getMain().getSettings().field===t.viewModel.fields.majorGroup)}(e,t),c="horizontal"===t.dockService.meta.major.orientation,u=c?e.dimensionAxis.label:"auto",d="horizontal"===u?void 0:t.dockService.meta.minor.size/4,f=t.styleService.axis.label.getStyle(),h={type:"axis",renderer:DN(t.flags),layout:{dock:t.dockService.meta.major.dock,minimumLayoutMode:rU[`${t.dockService.meta.major.orientation}DimensionAxis`].minimumLayoutMode},settings:{labels:{show:!("title"===e.dimensionAxis.show),mode:u,tiltAngle:n?-40:40,maxEdgeBleed:50,maxLengthPx:d,...f},line:{show:!r,stroke:o.axis.line.major.color}},brush:{consume:[{context:"selection",data:["selectionDimension","axisSelectionDimension"],style:{inactive:{opacity:.3}}}]},animations:{enabled:t.viewModel.animations.enabled,trackBy:bN.axes.trackBy({isMajor:!0}),compensateForLayoutChanges:bN.axes.compensateForLayoutChanges({isHorizontal:c})}};l&&a.push(bg(!0,{},h,{key:"group-axis",scale:SW.SCALE.MAIN.MAJOR_INNER,settings:{paddingEnd:s?10:4,labels:{mode:s?"horizontal":h.settings.labels.mode,maxGlyphCount:aU.getGroupAxisMaxGlyphCount(e.qHyperCube),maxLengthPx:d},line:{show:(c||!s)&&h.settings.line.show}}}));const p=aU.getBarAxisMaxGlyphCount(e.qHyperCube,i.isStackedByDimension);return s&&a.push(bg(!0,{},h,{key:SW.COMPONENT.BAR_AXIS,scale:SW.SCALE.MAIN.MAJOR,settings:{paddingEnd:4,labels:{maxGlyphCount:p,maxLengthPx:d,tiltThreshold:p>sU&&p<lU?1:void 0},line:{show:!(c&&l)&&h.settings.line.show}}})),c||2!==a.length?a:[a[1],a[0]]}(e,t,n,r));const l=t.themeService.getStyles(),c=t.styleService.axis.label.getStyle();return a&&o.push({type:"axis",key:"y-axis",renderer:DN(t.flags),formatter:SW.FORMATTER.MINOR,layout:{dock:t.dockService.meta.minor.dock,minimumLayoutMode:rU.measureAxis.minimumLayoutMode},scale:SW.SCALE.MAIN.MINOR,settings:{labels:{show:s,...c},line:{stroke:l.axis.line.major.color},ticks:{stroke:l.axis.line.major.color},minorTicks:{stroke:l.axis.line.minor.color}},animations:{enabled:t.viewModel.animations.enabled,trackBy:bN.axes.trackBy({isMeasure:!0}),compensateForLayoutChanges:bN.axes.compensateForLayoutChanges({isMeasure:!0,dock:t.dockService.meta.minor.dock})}}),o}var uU={BAR:{STROKE:{COLOR:"#205891",WIDTH:{NONE:0,SMALL:1,MEDIUM:2,LARGE:4}}}};function dU({layoutService:e,discrete:t,flags:n}){const{isContinuous:r,isGrouped:i}=e.meta;if(r&&!n?.isEnabled("TLV_1060_CONTINUOUS_AXIS_BAR_WIDTH"))return 1;const o=(e.getLayoutValue("components",[])||[]).filter(e=>"bar"===e.key)[0];if(o?.style?.width){const{style:e}=o;return e.strokeWidth&&"none"!==e.strokeWidth&&!r?function(){const n=uU.BAR.STROKE.WIDTH[e.strokeWidth.toUpperCase()]/t.query.getItemSize(),r=e.width+n;return r>1?e.width-(r-1):e.width}:e.width}return i?.9:.7}const{isNumber:fU}=TO,hU=["$year","$yearquarter","$quarter","$yearmonth","$month","$weeknumber","$yearweek","$week","$weekday","$day","$date"],pU={seconds:1/86400,minutes:1/1440,hours:1/24,days:1,weeks:7,months:365/12,quarters:91.25,years:365,number:1},mU={$date:1,$day:1,$weekday:1,$week:1,$yearweek:7,$weeknumber:1,$month:1,$yearmonth:365/12,$quarter:1,$yearquarter:91.25,$year:365},gU=({data:e,layout:t})=>{const n=t.qHyperCube?.qDimensionInfo?.[0]?.unit;if("auto"!==n)return pU[n||"none"]||1;const r=t.qHyperCube?.qDimensionInfo?.[0]?.qTags||[];for(let e=0;e<hU.length;e+=1)if(-1!==r.indexOf(hU[e]))return mU[hU[e]]||1;return(({data:e,layout:t})=>{const n=(t.qHyperCube?.qDimensionInfo?.[0]?.qAttrExprInfo||[]).find(e=>"firstDimensionDiff"===e.id);let r=Number(n?.qFallbackTitle);if(fU(r))return r;const i=e.items.map(e=>e.timeStart.value);return r=OO.findMinPositiveDistance(i),r})({data:e,layout:t})};function yU({opts:e,MIN_BAR_WIDTH:t}){return({data:n,mainRect:r,maxBarWidth:i})=>{const{min:o,max:a}=e.viewState.get("zoom"),s=Math.max(0,(({data:e,width:t,min:n,max:r,opts:i})=>{if(r===n)return t;const o=i.layoutService.getLayout(),a=(o.qHyperCube?.qDimensionInfo?.[0]?.unitMultiplier||1)*gU({data:e,layout:o});return a<=0?t:a/(r-n)*t})({data:n,width:r.width,min:o,max:a,opts:e}));return Math.max(t,Math.min(s,i))}}const vU={FULL:16,MEDIUM:14,SMALL:12,XSMALL:8,SPARK:4};function bU(e,t,n={}){const r=yU({opts:e,MIN_BAR_WIDTH:2});return({data:i})=>{const{chart:o,viewState:a,viewCache:s,layoutService:l,discrete:c,flags:u}=e,d=o.component(t).rect;if(!i.items.length||!d)return 2;const{min:f,max:h}=a.get("zoom");if(n[[f,h]])return n[[f,h]];const p=l.getLayout();let m;n={};let g=vU[zD.getLayoutMode(d.width,Number.MAX_VALUE)];const y=p.qHyperCube.qDimensionInfo?.[0]?.unit;if(u.isEnabled("TLV_1060_CONTINUOUS_AXIS_BAR_WIDTH")&&y&&"none"!==y){g=d.width;m=dU({layoutService:l,discrete:c,flags:u})*r({data:i,mainRect:d,maxBarWidth:g})}else{const e=Math.abs(h-f),t=Math.abs(s.get("continuousMax")-s.get("continuousMin"));if(0===t)return g;const n=function(e,t,n){return e*(1-n)+t*n}(2,g,1-Math.min(e/t/.2,1));m=Math.max(2,Math.min(g,n))}return n[[f,h]]=m,n[[f,h]]}}function xU(e,t){const{hasExplicitMax:n,explicitMax:r}=t;return!!n&&e>r&&r<=0}function SU(e,t){const{hasExplicitMin:n,explicitMin:r}=t;return!!n&&e<r&&r>=0}function wU(e,t){const{hasExplicitMax:n,explicitMax:r}=t;return!!n&&e>r&&r>0}function MU(e,t){const{hasExplicitMin:n,explicitMin:r}=t;return!!n&&e<r&&r<0}const kU="max",CU="min",qU={min:"Min",max:"Max"};function EU(e,t,n){return void 0===n?xU(e,t)||SU(e,t):n===kU?xU(e,t):SU(e,t)}function DU({minorMinMax:e,type:t}){return!(function({minorMinMax:e,type:t}){return!e[`hasExplicit${qU[t]}`]}({minorMinMax:e,type:t})||function({minorMinMax:e,type:t}){const n=t===kU?e.implicitMax:e.implicitMin;return!EU(Number(n.toFixed(13)),e,t)}({minorMinMax:e,type:t}))}function TU(e,{barComponent:t,type:n,isStacked:r}){const{viewCache:i,dockService:o,themeService:a}=e,s=i.get("minorMinMax");if(!s.hasExplicitMinMax)return!1;const l=n===kU?s.implicitMax:s.implicitMin;if(!EU(Number(l.toFixed(13)),s,n))return!1;const{orientation:c}=t.settings,u=n===kU?o.meta.minor.end:o.meta.minor.start;let d="end";r&&(d=n===kU?"sumOfPositives":"sumOfNegatives");const f=a.getStyles();return{type:"box-out-of-bounds",key:`bar-oob-${n}`,layout:{dock:u},data:t.data,brush:t.brush,settings:{orientation:c,major:t.settings.major,minor:t.settings.minor,dockValue:ZD.getDockValue(u),oob:bg({},t.settings.box,{fill:f.outOfRange.color,alignment:1,opacity:1,show:function(e){return!0!==e.datum.null?.value&&((!r||0!==e.datum[d].value)&&EU(e.datum[d].value,s,n))}})},animations:{enabled:e.viewModel.animations.enabled,compensateForLayoutChanges:bN.barOobs.compensateForLayoutChanges}}}function OU(e){return Math.min(Math.max(0,e),1)}const NU=(e,{chart:t,type:n,componentKey:r,collectionKey:i})=>{const{layoutService:o,dockService:a,viewCache:s}=e,{isStacked:l}=o.meta,c=s.get("minorMinMax"),{meta:u}=e.layoutService;if(!DU({minorMinMax:c,type:n}))return!1;let d;u.isGroupedByDimension?d=({scale:e,datum:t})=>e([t.group.value,t.value])+e.bandwidth([t.group.value,t.value])/2:u.isGroupedByMeasure&&(d=({scale:e,datum:t})=>e([t.value,t.measureIndex.value])+e.bandwidth()/2);const f={type:"box",key:`${SW.COMPONENT.GHOST_BAR_OOB}-${n}`,data:{collection:i},settings:{orientation:a.meta.minor.orientation,major:{scale:SW.SCALE.MAIN.MAJOR,fn:d},minor:{scale:SW.SCALE.MAIN.MINOR,start:e=>OU(t.scale(SW.SCALE.MAIN.MINOR)(e?.datum?.start?.value||0)),end(e){const r=t.scale(SW.SCALE.MAIN.MINOR);let i="end";l&&(i="max"===n?"sumOfPositives":"sumOfNegatives");const o=e.datum[i]?e.datum[i].value:r[n]();return OU(r(o))}},box:{width:dU({layoutService:e.layoutService,discrete:e.discrete}),minWidthPx:2,fill:"none",stroke:"transparent",show:e=>{const r=t.scale(SW.SCALE.MAIN.MINOR);let i="end";l&&(i="max"===n?"sumOfPositives":"sumOfNegatives");const o=e.datum[i]?e.datum[i].value:r.max();return"max"===n?o>r.max():o<r.min()}},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}};return f};function AU(e,t){const{style:n,styleService:r,dockService:i}=t,o=r.label.getStyle(),a=o.useContrastColor&&!e.onBackground?function(e){return function(t){return lO.isDark(t.node.attrs.fill)?e.lightColor:e.darkColor}}(n):o.fill,s="horizontal"===i.meta.major.orientation,l=e.padding||{left:s?0:4,right:s?0:4,top:s?4:0,bottom:s?4:0};return{position:e.position,justify:e.justify,fill:a,overflow:e.overflow,background:e.background,padding:l}}function _U(e){return{placements:e.simplifiedPlacements.map(t=>AU(t,e)),label:e.label}}function IU(e,t){if(t){if(function(e,t){return xU(e,t)}(e,t))return-1;if(function(e,t){return SU(e,t)}(e,t))return 1}return function(e,t){if(t&&0===e){const{min:e,max:n}=t;return 0===n&&0===e?1:n<=0?-1:e>=0||n>=-e?1:-1}return e>=0?1:-1}(e,t)}function LU(e,t,n,r){const i=IU(e,r);let o="up";return"vertical"===t&&i<0?o="down":"horizontal"===t&&(o=i>=0&&!n||i<0&&n?"right":"left"),o}function PU(e,t){const{dataPoint:n}=e;if(!n.showLabels)return!1;const{isStacked:r,isContinuous:i}=t.layoutService.meta;return!r||!i&&!!n.showSegmentLabels}function RU(e,t){const{dataPoint:n}=e;if(!n.showLabels)return!1;const{isStacked:r,isContinuous:i}=t.layoutService.meta;return!!r&&(!!i||!1!==n.showTotalLabels)}function zU(e,t,n,r){const i=[];return void 0!==e&&(i[e]={position:"outside",onBackground:!0,justify:0,overflow:r}),void 0!==t&&(i[t]={position:"inside",onBackground:!1,justify:n}),i}function FU({layout:e,component:t,minorScale:n},r,i){if(!PU(e,r))return!1;const{viewModel:o,ds:a,viewCache:s,layoutService:l,dockService:c,themeService:u}=r,{meta:d}=l,f=s.get("minorMinMax"),h=u.getStyles(),p=r.styleService.label.getStyle();let m;!d.isStacked&&(m=d.isStacked?1:0);const g=0===m?1:0,y=d.isStacked?.5:1,v=o.fields.minor[0],b=void 0===v?void 0:a.field(v).formatter();let x,S=-1;x=d.isStacked?d.isStackedByMeasure||!b?function(e){return e.data.segment.label}:function(e){return Math.abs(e.data.segment.value)>S?b(e.data.segment.value):""}:function(e){return e.data.end.label};const w={label:x,simplifiedPlacements:zU(m,g,y,d.isContinuous),style:h.label.value},M=[_U(bg(r,w))],k={component:t,selector:"rect",strategy:{type:"bar",settings:{direction:e=>LU(e.data.end.value,c.meta.minor.orientation,i,f),labels:M,fontSize:parseInt(p.fontSize,10),fontFamily:p.fontFamily,linkData:bN.labels.linkData}}},C=[k],q={key:"bar-labels",type:"labels",renderer:DN(r.flags),layout:{minimumLayoutMode:"XSMALL"},settings:{sources:C},animations:{enabled:r.viewModel.animations.enabled,trackBy:bN.labels.trackBy,compensateForLayoutChanges:bN.labels.compensateForLayoutChanges}};return d.isStackedByDimension&&b&&(q.beforeRender=()=>{S=function(e,t,n){const r="vertical"===t.dockService.meta.minor.orientation?"height":"width",i=t.chart.component(e),o=i&&i.rect?i.rect[r]:1,a=n?n.min():0;return 9.999*((n?n.max():0)-a)/o}(t,r,n)}),q}const jU={isSameMeasureAndColorRow:(e,t,n)=>t&&e&&t[0].content[0]===e[0].content[0]&&t[0].content[1]===e[0].content[1]&&t[1].content[n?0:1]===e[1].content[0],getTitle(e,t){const n=e.data;let r;return t.isStackedByDimension?r=n.stack?n.stack.label:void 0:t.isGroupedByDimension&&(r=n.group?n.group.label:void 0),void 0!==r?`${n.label}, ${r}`:n.label},getMeasure(e,t,n,r,i){if(n.isStacked&&("bar-oob-max"===t.key||"bar-oob-min"===t.key))return!1;const o=t.data,a=n.isStacked?r.viewModel.fields.minor[n.isStackedByDimension?0:o.measureIndex.value]:void 0,s=n.isStacked?{source:{key:o.source.key,field:a},label:!0===o.null?.value?"":n.isStackedByDimension&&i?i(o.segment.value):o.segment.label}:o.end;return uT.getMeasure(e,s)},getMeasures(e,t,n,r,i){const o=e.resources.dataset;return t.map(e=>jU.getMeasure(o,e,n,r,i)).filter(Boolean)},getCustomTooltipAttrExps(e,t,n){const r=e.resources.dataset;return BV({nodes:t,layout:n.layoutService.getLayout(),dataset:r})},extractBarTooltipData(e,t,n,r,i){const o={title:jU.getTitle(t,n),color:uT.getColor(e,t,r),measures:jU.getMeasures(e,t.childrenNodes?t.childrenNodes:[t],n,r,i)};if(jU.useCustomTooltip(r)){const n=jU.getCustomTooltipAttrExps(e,t.childrenNodes?t.childrenNodes:[t],r);o.customMeasures=n.customTooltipAttrExpsArr,o.customTitle=n.customTooltipInfoAttrExpsArr.filter(e=>e.id===MV.CUSTOM.TITLE),o.customDescription=n.customTooltipInfoAttrExpsArr.filter(e=>e.id===MV.CUSTOM.DESCRIPTION);let i=[];(t.childrenNodes?t.childrenNodes:[t]).forEach(e=>{e.data.customTooltipImages?.length>0&&!Array.isArray(e.data.customTooltipImages[0])&&(i=e.data.customTooltipImages)}),i.length>0&&(o.customImages=i);const a=r.layoutService.getLayout();if(a.tooltip?.chart?.object?.refId&&r.app&&r.customTooltipModel.embed&&"function"==typeof r.customTooltipModel.model?.getEffectiveProperties)if(r.app.isInModalSelection?.()){if(a?.qHyperCube?.qDimensionInfo?.length>0){AV.destroyVisualization({customTooltipModel:r.customTooltipModel});const e=r.customTooltipModel.translator.get("properties.tooltip.notselectedmessage");o.customLimitation=e}}else{const t=AV.createContainer({ctx:e,layout:a});o.customChart=t}}return o},getTotalStackTitle:(e,t)=>e>0?t?t.get("Object.ChartTooltip.sumOfPositives"):"Sum of positives":e<0?t?t.get("Object.ChartTooltip.sumOfNegatives"):"Sum of negatives":"",extractStackTotalBarTooltipData(e,t,n){const r=e.data.label,i=[e.data.sumOfPositives.value,e.data.sumOfNegatives.value].filter(e=>0!==e).map(e=>({label:`${jU.getTotalStackTitle(e,t)}`,value:n?n(e):e}));return{title:r,measures:i}},extractTooltipData(e,t){const n=t.chart.formatter(SW.FORMATTER.MINOR),{meta:r}=t.layoutService,i=e.node.childrenNodes?e.node.childrenNodes:[e.node],o=Math.max(0,i.length-6);i.length=Math.min(i.length,6);const{stackTotalBarNodes:a}=e.node,s=a&&a.length?a.map(e=>jU.extractStackTotalBarTooltipData(e,t.translator,n)):[];return{barTooltipData:i.map(i=>jU.extractBarTooltipData(e,i,r,t,n)),stackTotalBarTooltipData:s,numInvisibleNodesPhase1:o}},extractBarNodeData(e,t,n,r,i,o,a){let s=!i&&uT.getTitleRow(t,r);const l=uT.hideColorRow(t,n),c=!o&&!l&&uT.getColorRow(e,t,r),u=t.measures.map(i=>!a&&uT.getMeasureRow(i,e,t,r,l&&i.field===n.coloring.field)),d=u.filter(e=>!jU.isSameMeasureAndColorRow(e,c,r));if(jU.useCustomTooltip(n)){const n=i?[]:t.customMeasures.map(n=>uT.getMeasureRow(n,e,t,r,!1)),o=!(!t.customTitle[0]||i)&&uT.getTitleRow(t.customTitle[0],r),a=!(!t.customDescription[0]||i)&&uT.getDescriptionRow(t.customDescription[0],r);s=!jU.shouldIgnoreTitleRowForCtt(o,a,d,n)&&s;const l=[o,a,s,c,...d,...n];if(t.customChart&&l.push(t.customChart),t.customLimitation&&l.push(PV.getFooterRow(t.customLimitation,r)),t.customImages){const n=t.customImages.map(t=>PV.getImageRow(t,e));l.push(...n)}return l.filter(Boolean)}return[s,c,...d].filter(Boolean)},extractStackTotalBarNodeData(e,t,n){const r=!!t.measures.length&&uT.getTitleRow(t,n),i=t.measures.map(r=>uT.getMeasureRow(r,e,t,n,!1));return[r,...i].filter(Boolean)},useCustomTooltip:e=>Cx(e,"customTooltipModel.useCustomTooltip",!1),shouldIgnoreTitleRow:(e,t)=>e.isDimensionless||t>0&&!e.isGroupedByDimension&&!e.isStackedByDimension,shouldIgnoreTitleRowForCtt:(e,t,n,r)=>!1===n[0]&&0===r.length&&(e.length>0||t.length>0),shouldIgnoreColorRow:(e,t)=>t>0&&(e.isGroupedByMeasure||e.isStackedByMeasure),shouldIgnoreMeasureRow:(e,t,n)=>e&&t.measures.some(e=>e.field===n.coloring.field),shouldIgnoreDefaultRows:(e,t)=>jU.useCustomTooltip(t)&&Cx(e,"tooltip.hideBasic",0),extractBarsData(e,t,n,r){const{meta:i}=t.layoutService,o=t.layoutService.getLayout(),a=r.length;let s,l,c=[];const u=jU.shouldIgnoreDefaultRows(o,t);for(s=0;s<a;s++){l=r[s];const o=jU.shouldIgnoreTitleRow(i,s),d=u||jU.shouldIgnoreColorRow(i,s),f=u||jU.shouldIgnoreMeasureRow(d,l,t);if(c=c.concat(jU.extractBarNodeData(e,l,t,n,o,d,f)),c.length>=6||l.customImages||l.customChart||l.customLimitation)return{barsData:c,numInvisibleNodesPhase2:a-(s+1)}}return{barsData:c,numInvisibleNodesPhase2:0}},extractStackTotalBarsData(e,t,n){let r=[];return n.some(e=>e.measures.length)&&n.forEach(n=>{r=r.concat(jU.extractStackTotalBarNodeData(e,n,t))}),r},extractData(e,t,n){const{barTooltipData:r,numInvisibleNodesPhase1:i,stackTotalBarTooltipData:o}=jU.extractTooltipData(e,t),a=jU.extractStackTotalBarsData(e,n,o);a.length&&a.push(uT.getSeparatorRow());const{barsData:s,numInvisibleNodesPhase2:l}=jU.extractBarsData(e,t,n,r),c=a.concat(s),u=i+l;return u&&c.push(uT.getNMoreRow(u,t.translator,n)),c},calculateBoundsFromBars(e){const t=e.filter(e=>{const t=e.bounds;return t.width>0&&t.height>0}),n=t.length?t:e;return EN.combineBounds(n.map(e=>e.bounds))},calculateBoundsFromScale({opts:e,barKey:t,scale:n,majorScale:r,data:i,groupProp:o}){const a=e.chart.component(t).rect,{orientation:s}=e.dockService.meta.major,l="horizontal"===s?"width":"height",c=e.chart.scale(n).pxScale(a[l]);let u,d,f;if(e.layoutService.meta.isGroupedByMeasure){const t=e.viewModel.fields.minor.length;u=i.value,d=n===r&&void 0!==u?(c([u,0])+c([u,t-1]))/2:0,f=n===r&&void 0!==u?c.bandwidth([u,0]):0}else{const{value:e}=i;u=i[o]?i[o].value:void 0,d=c(n===r&&void 0!==u?[u,e]:e),f=n===r&&void 0!==u?c.bandwidth([u,e]):c.bandwidth(e)}const h=(d+f/2)*a[l],p={width:0,height:0};return"horizontal"===s?(p.x=h,p.y=a.height):(p.y=h,p.x=0),p},calculateTotalBounds({opts:e,labels:t,bars:n,barKey:r,barAxisKey:i,majorScale:o,majorInnerScale:a,groupProp:s}){const l=n.filter(e=>e.children&&e.children.length);let c;return c=l.length?jU.calculateBoundsFromBars(l):jU.calculateBoundsFromScale({opts:e,barKey:r,scale:t[0].key===i?o:a,majorScale:o,data:t[0].data,groupProp:s}),c},filterNodesOnKeys:(e,t)=>e.filter(e=>e.data&&t.indexOf(e.key)>-1),isBarMatchingLabel:(e,t)=>t.data.value===e.data.value,isBarMatchingLabelOnProp:(e,t,n)=>t.data.value===(e.data[n]?e.data[n].value:e.data.value),findBarsMatchingLabels(e,t,n,r){const i=e.filter(e=>t.some(t=>n(e,t,r)));return i},findBarsFromGroupLabelsInGroupedByDim(e,t,n){const r=jU.isBarMatchingLabelOnProp;return jU.findBarsMatchingLabels(e,t,r,n)},findBarsFromBarLabelsInGroupedByDim:(e,t,n)=>e.filter(e=>t.some(t=>t.data.group&&t.data.group.value===e.data[n].value&&t.data.value===e.data.value)),findBarsFromLabelsInSingleDim(e,t){const n=jU.isBarMatchingLabel;return jU.findBarsMatchingLabels(e,t,n)},findBarsFromLabelsInGroupedByDim(e,t,n,r){const i=t.filter(e=>e.key===n),o=t.filter(e=>e.key!==n),a=jU.findBarsFromBarLabelsInGroupedByDim(e,i,r),s=jU.findBarsFromGroupLabelsInGroupedByDim(e,o,r);return a.concat(s)},findStackTotalBarsFromLabelsInStackedByDim(e,t){const n=jU.isBarMatchingLabel;return jU.findBarsMatchingLabels(e,t,n)},findStackTotalBarsFromLabelsInStackedByMeasure(e,t){const n=jU.isBarMatchingLabel;return jU.findBarsMatchingLabels(e,t,n)},findBarsFromLabelsInStackedByDim(e,t,n){const r=jU.isBarMatchingLabelOnProp;return jU.findBarsMatchingLabels(e,t,r,n)},findBarsFromLabelsInStackedByMeasure:(e,t)=>jU.findBarsFromLabelsInSingleDim(e,t),findBarsFromLabels({labels:e,opts:t,filterKeys:n,barAxisKey:r,groupProp:i,stackProp:o}){const{meta:a}=t.layoutService,s=jU.filterNodesOnKeys(t.chart.findShapes("container"),n);return a.isStackedByDimension?jU.findBarsFromLabelsInStackedByDim(s,e,o):a.isStackedByMeasure?jU.findBarsFromLabelsInStackedByMeasure(s,e):a.isGroupedByDimension?jU.findBarsFromLabelsInGroupedByDim(s,e,r,i):jU.findBarsFromLabelsInSingleDim(s,e)},findStackTotalBarsFromLabels({labels:e,opts:t,stackTotalBarKey:n}){const{meta:r}=t.layoutService;if(r.isStacked){const i=jU.filterNodesOnKeys(t.chart.findShapes("container"),[n]);return r.isStackedByDimension?jU.findStackTotalBarsFromLabelsInStackedByDim(i,e):jU.findStackTotalBarsFromLabelsInStackedByMeasure(i,e)}return[]},isSingleBarMode:(e,t)=>(e.isSimple||1===t.length)&&t[0].children&&t[0].children.length,filterNodesOnLabels({labels:e,opts:t,barKey:n,stackTotalBarKey:r,barAxisKey:i,barOobMaxKey:o,barOobMinKey:a,groupProp:s,stackProp:l,majorScale:c,majorInnerScale:u,filterFn:d}){const{meta:f}=t.layoutService;if(e.length){let h=jU.findBarsFromLabels({labels:e,opts:t,filterKeys:[n],stackTotalBarKey:r,barAxisKey:i,barOobMaxKey:o,barOobMinKey:a,groupProp:s,stackProp:l});if(d&&(h=h.filter(d)),jU.isSingleBarMode(f,h))return[h[0]];if(h.length){let f=jU.findBarsFromLabels({labels:e,opts:t,filterKeys:[n,o,a],stackTotalBarKey:r,barAxisKey:i,barOobMaxKey:o,barOobMinKey:a,groupProp:s,stackProp:l});d&&(f=f.filter(d));const p=jU.calculateTotalBounds({opts:t,labels:e,bars:f,barKey:n,barAxisKey:i,groupProp:s,majorScale:c,majorInnerScale:u}),m=jU.findStackTotalBarsFromLabels({labels:e,opts:t,stackTotalBarKey:r}),g={key:n,bounds:p,childrenNodes:h,data:h.map(e=>e.data),stackTotalBarNodes:m};return[g]}return[]}return[]},filterNodesForOob:(e,t,n)=>e.key===t&&0===e.children.length||e.key===n,filterNodes({nodes:e,opts:t,barKey:n,stackTotalBarKey:r,barAxisKey:i,groupAxisKey:o,barOobMaxKey:a,barOobMinKey:s,groupProp:l,stackProp:c,majorScale:u,majorInnerScale:d}){let f=jU.filterNodesOnKeys(e,[i,o]),h=f&&f.length?[f[0]]:[];const p=jU.filterNodesOnLabels({labels:h,opts:t,barKey:n,stackTotalBarKey:r,barAxisKey:i,barOobMaxKey:a,barOobMinKey:s,groupProp:l,stackProp:c,majorScale:u,majorInnerScale:d});if(p&&p.length)return p;const{meta:m}=t.layoutService;if(m.isStackedByMeasure){f=jU.filterNodesOnKeys(e,[a,s]),h=f&&f.length?[f[0]]:[];const o=e=>jU.filterNodesForOob(e,n,a),p=jU.filterNodesOnLabels({labels:f,opts:t,barKey:n,stackTotalBarKey:r,barAxisKey:i,barOobMaxKey:a,barOobMinKey:s,groupProp:l,stackProp:c,majorScale:u,majorInnerScale:d,filterFn:o});if(p&&p.length)return p[0].stackTotalBarNodes=void 0,p}if(m.isStackedByDimension){f=jU.filterNodesOnKeys(e,[a,s]),h=f&&f.length?[f[0]]:[];const o=e=>jU.filterNodesForOob(e,n,a),p=jU.filterNodesOnLabels({labels:f,opts:t,barKey:n,stackTotalBarKey:r,barAxisKey:i,barOobMaxKey:a,barOobMinKey:s,groupProp:l,stackProp:c,majorScale:u,majorInnerScale:d,filterFn:o});if(p&&p.length)return p[0].stackTotalBarNodes=void 0,p}const g=jU.filterNodesOnKeys(e,[n,a,s]);return g.length?[g[0]]:[]}};function BU(e,t={},n){let r=[];const i=oT({key:SW.COMPONENT.BASE_TOOLTIP,rtl:n});return bg(!0,i,{scale:SW.SCALE.MAIN.COLOR,settings:{filter:e=>jU.filterNodes({nodes:e,opts:t,barKey:SW.COMPONENT.BAR,stackTotalBarKey:SW.COMPONENT.STACK_TOTAL_BAR,barAxisKey:SW.COMPONENT.BAR_AXIS,groupAxisKey:SW.COMPONENT.GROUP_AXIS,barOobMaxKey:SW.COMPONENT.BAR_OOB_MAX,barOobMinKey:SW.COMPONENT.BAR_OOB_MIN,groupProp:"group",stackProp:"stack",majorScale:"major",majorInnerScale:"majorInner"}),extract:e=>(r=e.node.childrenNodes?e.node.childrenNodes:[e.node],jU.extractData(e,t,n)),placement:"bounds",afterShow:()=>{const{app:e,properties:i,customTooltipModel:o}=t;e&&!e.isInModalSelection?.()&&o.useCustomTooltip&&o.embed&&AV.show({app:e,properties:i,selectedNodes:r,customTooltipModel:o,rtl:n})}},style:{content:{fontFamily:t.themeService.getStyles().fontFamily}}})}const HU={extractData:(e,t)=>[uT.getTitleRow({title:e.node.data.label},t)],filterNodes(e,t){const n=e.filter(e=>e.data&&e.key===t);return n.length?[n[0]]:[]}};function VU(e,t={},n){if("categorical"!==t.colorService.getMain().getSettings().type)return!1;const r=oT({key:SW.COMPONENT.LEGEND_CAT_TOOLTIP,rtl:n});return bg(!0,r,{scale:SW.SCALE.MAIN.COLOR,settings:{filter:e=>HU.filterNodes(e,SW.COMPONENT.LEGEND_COLOR_CAT),extract:e=>HU.extractData(e,n),placement:"pointer",direction:n?"rtl":"ltr"},style:{content:{fontFamily:t.themeService.getStyles().fontFamily}}})}function $U(e,{fill:t}){return{[SW.FORMATTER.MINOR]:{data:{fields:e.viewModel.fields.minor}},[SW.FORMATTER.COLOR]:t&&t.data&&t.data.field?{data:{field:t.data.field}}:{}}}const WU=1,UU=3;function YU(e){return e.getLayoutValue("gridLine.auto")}function KU(e){return!YU(e)&&e.getLayoutValue("gridLine.spacing")===WU}function GU(e){return!YU(e)&&e.getLayoutValue("gridLine.spacing")===UU}const XU=e=>({enabled:e.animations.enabled,trackBy:bN.lines.trackBy,compensateForLayoutChanges:bN.lines.compensateForLayoutChanges}),JU=(e,{themeService:t,layoutService:n,dockService:r,viewModel:i})=>{if(!YU(n)&&function(e){return!e.getLayoutValue("gridLine.spacing")}(n))return!1;const{grid:o}=t.getStyles(),a={key:"grid-line",type:"grid-line",layout:{minimumLayoutMode:rU.measureAxis.minimumLayoutMode},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}),ticks:{show:!KU(n)||((e,t)=>t%2==0),stroke:o.line.major.color},minorTicks:{show:GU(n),stroke:o.line.minor.color},animations:XU(i)};return a["horizontal"===r.meta.major.orientation?"y":"x"]=SW.SCALE.MAIN.MINOR,a};function ZU(e,t){const n=[JU(0,t)];return n[0]&&n.push((({dockService:e,themeService:t,viewCache:n,viewModel:r})=>{const i=n.get("minorMinMax");if(i.min>0||i.max<0)return!1;const o=t.getStyles(),a={};return a["horizontal"===e.meta.minor.orientation?"x":"y"]=[{value:0,scale:SW.SCALE.MAIN.MINOR,line:{stroke:o.grid.line.highContrast.color}}],{key:"high-contrast-grid-line",type:"ref-line",scale:SW.SCALE.MAIN.MINOR,lines:a,animations:XU(r)}})(t)),n}const QU="areaPan",eY=e=>({type:"Pan",key:"panorama",options:{event:QU,pointers:1,threshold:10,enable(t,n){return this.started===QU||!n||!!e.actions.scroll.enabled()&&e.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some(e=>e.key===SW.COMPONENT.BAR)}},events:{areaPanstart(t){t.preventDefault(),this.started=QU;const n=e.viewState.get("zoom");this[QU]={min:n.min,max:n.max,size:e.chart.component(SW.COMPONENT.BAR).rect.computedInner.width,span:n.max-n.min}},areaPanmove(t){t.preventDefault();const{span:n,min:r,max:i,size:o}=this[QU],a=-t.deltaX/o;e.viewState.set("zoom",{min:Math.min(r+a*n,e.viewCache.get("continuousMax")-n),max:Math.max(i+a*n,e.viewCache.get("continuousMin")+n)})},areaPanend(e){e.preventDefault(),this.started=!1},areaPancancel(e){e.preventDefault(),this.started=!1}}});function tY(e,t){if(e.layoutService.meta.isDiscrete)return{};const{viewCache:n,viewState:r,chart:i}=e,{rtl:o}=t,a=LD.event.onZoom({viewCache:n,viewState:r,chart:i},{threshold:100,rtl:o,targetKey:SW.COMPONENT.BAR}),s={last:0};return{type:"Pinch",key:"continuous-pinch-zoom",options:{event:"zoom",pointers:2,threshold:0,enable:(t,n)=>!n||!!e.actions.scroll.enabled()&&e.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some(e=>e.key===SW.COMPONENT.BAR)},events:{zoomstart(e){s.last=e.scale,e.preventDefault()},zoommove(e){const t=e.scale-s.last;(function(e){return Math.abs(e)>.01})(t)&&a(e.center,t>0?1:-1),e.preventDefault(),s.last=e.scale}}}}function nY({chart:e},t,n){const r=e.component(SW.COMPONENT.BASE_TOOLTIP);r&&r.show&&(r.emit("hide"),n?.customTooltipModel?.useCustomTooltip&&t&&t({},r,{nodes:[],opts:n,customTooltipModel:n.customTooltipModel,hide:!0}));const i=e.component(SW.COMPONENT.LEGEND_CAT_TOOLTIP);i&&i.show&&i.emit("hide");const o=e.component(SW.COMPONENT.TREND_LINES_TOOLTIP);o&&o.show&&o.emit("hide")}function rY(e,t){const{viewCache:n,viewState:r,chart:i,trendLineModel:o,layoutService:a}=e,{rtl:s}=t,l=e.layoutService.meta.isContinuous?LD.event.onZoom({viewCache:n,viewState:r,chart:i},{rtl:s,threshold:50,targetKey:SW.COMPONENT.BAR}):void 0,c=uW({majorInnerScale:SW.SCALE.MAIN.MAJOR_INNER,tooltip:SW.COMPONENT.TREND_LINES_TOOLTIP,tooltipOverlay:SW.COMPONENT.TREND_LINES_TOOLTIP_OVERLAY},{chart:i,viewState:r,trendLineModel:o,layoutService:a,rtl:s}),u=[SW.COMPONENT.BAR,SW.COMPONENT.BAR_AXIS,SW.COMPONENT.GROUP_AXIS,SW.COMPONENT.BAR_OOB_MAX,SW.COMPONENT.BAR_OOB_MIN],d=e.customTooltipModel.utils,f=e.debouncer(d.displayTooltip,d.DEBOUNCE_THRESHOLD);return{type:"native",events:{wheel(t){let n,r=!1;if(e.actions.scroll.enabled()){const i={x:t.clientX,y:t.clientY};[n]=e.chart.componentsFromPoint(i).filter(e=>e.key===SW.COMPONENT.BAR),n&&(e.layoutService.meta.isContinuous&&l(i,Math.sign(-t.deltaY)),r=!0)}!r&&e.actions.interact.enabled()&&([n]=e.chart.componentsFromPoint(t).filter(e=>e.key===SW.COMPONENT.LEGEND_COLOR_CAT),n&&(r=!0,function(e,t){const n=(Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY)>=0?"next":"prev";t.emit(n)}(t,n))),r&&t.preventDefault(),nY(e,f,e)},mousemove(t){if(e.actions.tooltip.enabled()){if(c(t))return;const n=this.chart.componentsFromPoint({x:t.clientX,y:t.clientY}),r=this.chart.component(SW.COMPONENT.BASE_TOOLTIP);if(r&&r.show)if(n.some(e=>u.indexOf(e.key)>-1)){const{customTooltipModel:n}=e;if(n.useCustomTooltip&&d.checkIfPromisesExist({customTooltipModel:n})){const i=d.getNodes(t,this.chart);f(t,r,{nodes:i,opts:e,customTooltipModel:n})}else r.emit("show",t)}else r.emit("hide");const i=this.chart.component(SW.COMPONENT.LEGEND_CAT_TOOLTIP);i&&i.show&&(n.some(e=>e.key===SW.COMPONENT.LEGEND_COLOR_CAT)?i.emit("show",t):i.emit("hide"))}},mouseup(t){2===t.button&&nY(this,f,e)},mouseleave(){nY(this,f,e)}}}}const iY=(e,t)=>({type:"hammer",enable:!0,gestures:[...(t.hammer||{}).gestures||[],...wA({...e,componentKey:"scrollbar",rtl:t.rtl}).gestures,...e.layoutService.meta.isDiscrete?e.discrete.interactions.gestures:[eY(e),tY(e,t)]]});function oY(e,t){const n=[iY(e,t),rY(e,t),wA({...e,componentKey:"scrollbar",rtl:t.rtl}).native];return e.layoutService.meta.isDiscrete&&n.push(e.discrete.interactions.native),n}function aY(e,t){const{viewCache:n,viewState:r,chart:i}=e,{rtl:o}=t,a=e.layoutService.meta.isContinuous?LD.event.onZoom({viewCache:n,viewState:r,chart:i},{rtl:o,threshold:50,targetKey:SW.COMPONENT.BAR}):void 0;return{type:"native",events:{wheel(t){let n,r=!1;if(e.actions.scroll.enabled()){const i={x:t.clientX,y:t.clientY};[n]=e.chart.componentsFromPoint(i).filter(e=>e.key===SW.COMPONENT.BAR),n&&(e.layoutService.meta.isContinuous&&a(i,Math.sign(-t.deltaY)),r=!0)}!r&&e.actions.interact.enabled()&&([n]=e.chart.componentsFromPoint(t).filter(e=>e.key===SW.COMPONENT.LEGEND_COLOR_CAT),n&&(r=!0,function(e,t){const n=(Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY)>=0?"next":"prev";t.emit(n)}(t,n))),r&&t.preventDefault()}}}}const sY=(e,t,n)=>({type:"hammer",enable:!0,gestures:[...(t.hammer||{}).gestures||[],...wA({...e,componentKey:"scrollbar",rtl:t.rtl}).gestures,...n.gestures,...e.layoutService.meta.isDiscrete?e.discrete.interactions.gestures:[eY(e),tY(e,t)]]});function lY(e,t){const n=e.tooltipService.getInteractions(),r=[sY(e,t,n),aY(e,t),wA({...e,componentKey:"scrollbar",rtl:t.rtl}).native,n.native];return e.layoutService.meta.isDiscrete&&r.push(e.discrete.interactions.native),r}const cY=e=>({enabled:e.animations.enabled,compensateForLayoutChanges:bN.bars.compensateForLayoutChanges});const uY=(e,t,{collectionKey:n})=>{if(!cA({layoutService:t.layoutService}).miniChart)return!1;if(t.reducedDataModel.mode.isContinuous)return function(e,t,{collectionKey:n}){const{continuousDataModel:r,reducedDataModel:i,colorService:o,layoutService:a,viewModel:s}=t,{meta:l}=a,c=a.getLayout(),u=t.flags.isEnabled("TLV_1060_CONTINUOUS_AXIS_BAR_WIDTH")&&l.isContinuous&&c.qHyperCube.qDimensionInfo?.[0]?.unit?bU(t,SW.COMPONENT.MINI_BAR):2;return{type:"box",key:SW.COMPONENT.MINI_BAR,layout:{dock:"@scrollbar"},show:()=>r.getDimensionCardinality()>1,data:{collection:n},settings:{box:bg(!0,{},e.settings.box,{minWidthPx:u,fill:o.getMini().getColor(),strokeWidth:0}),major:bg(!0,{},e.settings.major,{scale:i.scales.major}),minor:e.settings.minor,orientation:e.settings.orientation,oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},animations:cY(s)}}(e,t,{collectionKey:n});const{mode:r,scales:i}=t.reducedDataModel;let o;return r.isGroupedByDimension&&!r.isReduced?o=({scale:e,datum:t})=>e([t.group.value,t.value])+e.bandwidth([t.group.value,t.value])/2:r.isGroupedByMeasure&&(o=({scale:e,datum:t})=>e([t.value,t.measureIndex.value])+e.bandwidth()/2),{type:"box",key:SW.COMPONENT.MINI_BAR,layout:{dock:"@scrollbar"},show:()=>t.discrete.query.getCanScroll(),data:{collection:n},settings:{box:{...e.settings.box,fill:r.isReduced||r.isStackedByDimension?t.colorService.getMain().getSettings().others:t.colorService.getMain().getColor(),strokeWidth:0},major:{scale:i.major,fn:o},minor:{scale:i.minor},orientation:e.settings.orientation,oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},animations:cY(t.viewModel)}},{measureText:dY}=vp.renderer("svg")();function fY(e,t,n){const r=function(e){const t=bg(!0,{},e);return delete t.data,t}(t.minor),i=function(e,t,{majorScaleInvert:n,maxPxStep:r,align:i,getProp:o}){let a={invert:n,data:{extract:e.mode.isDimensionless?e.fields.minor.map((e,t)=>({field:e,value:t})):{source:"miniCube",field:"qDimensionInfo/0"}},type:e.mode.isDimensionless?"band":void 0,maxPxStep:r,align:i};return e.mode.isStackedByDimension?a.data.extract.field="qDimensionInfo/1":e.mode.isGroupedByDimension?e.mode.isReduced||(a.data={source:"miniCube",hierarchy:{value:e=>e.qElemNumber}}):e.mode.isGroupedByMeasure?(a=bg(!0,{},t),a.data.extract.source="miniCube"):e.mode.isContinuous&&(a=bg(!0,{},t,{min:()=>o("continuousMin"),max:()=>o("continuousMax")})),a}(e,t.major,n);return{reducedMinor:r,reducedMajor:i}}const hY=50,pY=100,mY=200;function gY(e,t){const n=function(e){const t=e.getLayoutValue("measureAxis.spacing",1);switch(t){case.5:return hY;case 1:return pY;case 2:return mY;default:return 125*t}}(t);return Math.max(1,Math.round(e/n))}function yY(e,t,n){return 0===t||t===Math.floor((n.length-1)/2)||t===n.length-1}function vY(e,t,n){return 0===t||0===e||t===n.length-1}function bY(e){for(let t=1;t<e.length;t++)if(e[t]===e[t-1])return!0;return!1}function xY(e,t,n,r,i){e.domain([t,n]),e.nice(10);const[o,a]=e.domain();let s=e.ticks(10);const l=function(e){return e.length%2==0}(s),c=function(e){const t=Math.round(.3*e.length),n=t,r=e.length-t;return e.slice(n,r).some(e=>0===e)}(s),u=c?vY:yY;s=s.filter(u),l&&!c&&!r&&s.length>1&&(s=[s[0],(s[0]+s[s.length-1])/2,s[s.length-1]]);const d=i?i.formatter(SW.FORMATTER.MINOR):void 0;return bY(d?s.map(d):s)&&(s=[s[0],s[s.length-1]]),{roundedMin:o,roundedMax:a,ticks:s}}function SY(e,t,n,r,i,o,a,s){const l=o.formatter(SW.FORMATTER.MINOR),c=s.getStyles(),u="horizontal"===a.meta.major.orientation?"height":"width",d=e=>dY({text:e,fontSize:c.axis.label.name.fontSize,fontFamily:c.axis.label.name.fontFamily})[u];let[f,h]=e.domain(),p=e.ticks(r);function m(){const e=p.map(l);return!bY(e)&&function(e){const t=i/p.length;return Math.max(...e.map(d))<=t}(e)}for(let i=r-1;i>0&&!m();i--)e.domain([t,n]),e.nice(i),[f,h]=e.domain(),p=e.ticks(i);return{roundedMin:f,roundedMax:h,ticks:p}}const wY=(e,t)=>e.value-t.value,MY=e=>({value:e,isMinor:!1}),kY=e=>({value:e,isMinor:!0});function CY(e,t,n){const r=Number.isNaN(t)&&Number.isNaN(n)?3:2;return e.filter(e=>(e=>Number.isNaN(t)||e>=t)(e)&&(e=>Number.isNaN(n)||e<=n)(e)).length<=r}function qY({chart:e,viewCache:t,dockService:n,layoutService:r,themeService:i,viewModel:o,ds:a}){const{isButterfly:s}=r.meta,{explicitMin:l,explicitMax:c,hasExplicitMin:u,hasExplicitMax:d}=t.get("minorMinMax"),{min:f,max:h}=function(e){let{min:t,max:n}=e.get("minorMinMax");return t===n&&0===t&&(t-=1,n+=1),{min:t,max:n}}(t),p=s?Math.max(Math.abs(f),Math.abs(h)):h,m=s?-p:f,g=Tx(()=>{const s=function(e,t,n){let r;return e?r=n.meta.chart.size:({rect:r}=t.component(SW.COMPONENT.BAR)),"horizontal"===n.meta.major.orientation?r.height:r.width}(t.get("isPreRender"),e,n),f=gY(s,r),h=function(e,t,n){const r=mC().domain([e,t]);return r.nice(n),r}(m,p,f);let g,y,v=[];"SPARK"===n.meta.chart.mode?({roundedMin:g,roundedMax:y}=function(e,t){return{roundedMin:e,roundedMax:t}}(m,p)):(({roundedMin:g,roundedMax:y,ticks:v}=SY(h,m,p,f,s,e,n,i)),CY(v,l,c)&&({roundedMin:g,roundedMax:y,ticks:v}=xY(h,m,p,u||d,e)));const b=function(e,t){const n=[];for(let r=0;r<e.length-1;r++){const i=e[r],o=(e[r+1]-i)/(t+1);for(let e=1;e<=t;e++)n.push(i+o*e)}return n}(v,1);v=function(e,t,n){return e&&n.length&&!n.some(e=>e===t)?(n.unshift(t),n.filter(e=>e>=t)):n}(u,l,v),v=function(e,t,n){return e&&n.length&&!n.some(e=>e===t)?(n.push(t),n.filter(e=>e<=t)):n}(d,c,v);let x=function(e,t){return[...e.map(MY),...t.map(kY)].sort(wY)}(v,b);if(r.meta.isButterfly){const e=o.fields.minor[0],t=void 0===e?void 0:a.field(e).formatter();"function"==typeof t&&(x=x.map(e=>({...e,label:t(Math.abs(e.value))})))}return{roundedMin:g,roundedMax:y,ticks:x}},()=>t.get("isPreRender"));return{values:()=>g().ticks,min:()=>u?l:g().roundedMin,max:()=>d?c:g().roundedMax}}function EY(e,{picasso:t,discrete:n,layoutService:r,dockService:i,viewModel:o,viewCache:a,reducedDataModel:s,colorService:l,themeService:c,viewState:u,chart:d,ds:f},{localeInfo:h,rtl:p}){const{meta:m}=r,{fields:g}=o,y=()=>{if("custom"!==r.getLayoutValue("dimensionAxis.axisDisplayMode"))return Math.min(200,i.meta.chart.size["horizontal"===i.meta.major.orientation?"height":"width"]/4)},v=!("none"===r.getLayoutValue("measureAxis.show"))?(b=i.meta.minor.orientation,x=i.meta.minor.dock,"vertical"===b?"near"===x||"left"===x?0:1:"near"===x||"bottom"===x?1:0):.5;var b,x;const S={},w="vertical"===i.meta.minor.orientation&&p,M=l.getMain().getScales(),k=l.getMini().getScales();if(Object.assign(S,M,{reducedFill:k.reducedFill}),S[SW.SCALE.MAIN.MINOR]=function({chart:e,viewModel:{fields:t},dockService:n,viewCache:r,viewModel:i,layoutService:o,themeService:a,ds:s},{rtl:l}){const c=qY({chart:e,dockService:n,viewCache:r,layoutService:o,themeService:a,viewModel:i,ds:s}),u={invert:"vertical"===n.meta.minor.orientation||l,ticks:{values:c.values},minorTicks:{count:1},min:c.min,max:c.max};return o.meta.isStacked||(u.data={source:"qHyperCube",fields:t.minor}),u}({chart:d,viewModel:o,dockService:i,viewCache:a,layoutService:r,themeService:c,ds:f},{rtl:p}),m.isGroupedByDimension)[SW.SCALE.MAIN.MAJOR_INNER,SW.SCALE.MAIN.MAJOR].forEach((e,t)=>{S[e]={invert:w,data:{source:"qHyperCube",hierarchy:{label:e=>e.qText?e.qText:"",value:e=>e.qElemNumber,props:{...o.selectionDimensionProp(t),group:m.isGroupedByDimension?{field:g.majorGroup}:void 0}}},label:({datum:e})=>e.label,ticks:{depth:t+1},maxPxStep:y,align:v}}),o.isDimensionLocked(0)||(S[SW.SCALE.MAIN.MAJOR_INNER].data.hierarchy.props.axisSelectionDimension={field:0});else if(m.isGroupedByMeasure)S[SW.SCALE.MAIN.MAJOR]={type:"group-by-measure",invert:w,data:{extract:{source:"qHyperCube",field:"qDimensionInfo/0",props:{axisSelectionDimension:{field:0}}}},measureCount:e.qHyperCube.qMeasureInfo.length,maxPxStep:y,align:v};else if(m.isTime){const{innerTime:e,outerTime:n}=function(e,t){const{layoutService:n,viewModel:r,viewCache:i,picasso:o,viewState:a,localeInfo:s,themeService:l}=e,c=()=>n.getHyperCubeValue("qAxisData.qAxis",[]),u=o.formatter("q-time"),d=l.getStyles(),f=e=>dY({text:e,fontSize:d.axis.label.name.fontSize,fontFamily:d.axis.label.name.fontFamily});i.set("qTimeAxisCache",[]);const h={get:(e,t=0)=>{const n=i.get("qTimeAxisCache");return n[t]&&n[t][0]===e?n[t][1]:void 0},set:(e,t,n=0)=>{i.get("qTimeAxisCache")[n]=[e,t]},key:({distance:e})=>{const{min:t,max:n}=a.get("zoom"),r=(n-t)/(i.get("continuousMax")-i.get("continuousMin")),o=c().map(e=>e.qName);return[e,Number.parseFloat(r).toFixed(12),...o].toString()}};return{innerTime:{data:{field:r.fields.majorNumeric},type:"q-time-axis",qAxis:c,field:r.fields.majorNumeric,min:()=>a.get("zoom").min,max:()=>a.get("zoom").max,invert:!!t,formatter:{fn:u,localeInfo:s,qNumFormat:n.getHyperCubeValue("qDimensionInfo.0",{}).qNumFormat,measureText:f},ticks:{generator:{type:"d3",initialMin:a.get("zoom").min},level:"inner",anchor:"start",clamp:!0},cache:h},outerTime:{data:{field:r.fields.majorNumeric},type:"q-time-axis",qAxis:c,field:r.fields.majorNumeric,min:()=>a.get("zoom").min,max:()=>a.get("zoom").max,invert:!!t,formatter:{fn:u,localeInfo:s,qNumFormat:n.getHyperCubeValue("qDimensionInfo.0",{}).qNumFormat,measureText:f},ticks:{generator:{type:"d3"},level:"outer",anchor:"start",clamp:!0},cache:h}}}({picasso:t,localeInfo:h,viewState:u,viewModel:o,viewCache:a,themeService:c,layoutService:r},p);S[SW.SCALE.MAIN.MAJOR_INNER]=e,S[SW.SCALE.MAIN.MAJOR]=n}else m.isContinuous?S[SW.SCALE.MAIN.MAJOR]={type:"linear",invert:w,data:{extract:{key:"qHyperCube",field:g.majorNumeric}},ticks:{forceBounds:!0,count:u.get("zoom").min===u.get("zoom").max?1:void 0},minorTicks:{count:1},min:()=>u.get("zoom").min,max:()=>u.get("zoom").max}:S[SW.SCALE.MAIN.MAJOR]={invert:w,data:{extract:m.isDimensionless?g.minor.map((t,n)=>({field:t,label:()=>e.qHyperCube.qMeasureInfo[n].qFallbackTitle,value:n})):{source:"qHyperCube",field:"qDimensionInfo/0",props:{axisSelectionDimension:{field:0}}}},type:m.isDimensionless?"band":void 0,maxPxStep:y,align:v};const{reducedMinor:C,reducedMajor:q}=fY(s,{major:S[SW.SCALE.MAIN.MAJOR],minor:S[SW.SCALE.MAIN.MINOR]},{majorScaleInvert:w,maxPxStep:y,align:v,getProp:a.get});return m.isDiscrete&&(S[SW.SCALE.MAIN.MAJOR].range=n.query.getScaleRange,m.isGroupedByDimension&&(S[SW.SCALE.MAIN.MAJOR_INNER].range=n.query.getScaleRange)),S[s.scales.major]=q,S[s.scales.minor]=C,S}function DY(e,t,n){const{layoutService:r,colorService:i}=e;return function(e,t){if(!e.targets)throw new Error("Missing 'targets' property");return{interactions:[QW(e,t)],components:[]}}({targets:[r.meta.isStackedByDimension&&r.getHyperCubeValue("qStackedDataPages.0.qArea.qHeight",NaN)>1?SW.COMPONENT.STACK_TOTAL_BAR:SW.COMPONENT.BAR,SW.COMPONENT.BAR_AXIS,SW.COMPONENT.GROUP_AXIS,"outer-axis-overlay","inner-axis-overlay",SW.COMPONENT.LEGEND_COLOR_CAT],components(e,t){const r={action:e.srcEvent.ctrlKey||n?"set":"toggle",contexts:["selection"],key:t[0].key};return SW.COMPONENT.BAR===t[0].key?[{...r,data:["selectionDimension"]}]:[SW.COMPONENT.BAR_AXIS,SW.COMPONENT.GROUP_AXIS].includes(t[0].key)?[{...r,data:["selectionDimension","axisSelectionDimension"]}]:[r]}},{...e,isLocked:n=>n.some(e=>e.key===SW.COMPONENT.LEGEND_COLOR_CAT)?i.getMain().isSelectionLocked({isMeasureSelectionLocked:t}):e.isLocked(n)})}function TY(e){const t=e.layoutService.meta.isStackedByDimension&&e.layoutService.getHyperCubeValue("qStackedDataPages.0.qArea.qHeight",NaN)>1;return function(e,t){if(!e.componentTargetKey)throw new Error("Missing 'componentTargetKey' property");const n={key:"lasso",...e},r=(({key:e,components:t})=>({key:e,type:"brush-lasso",layout:{displayOrder:99},settings:{brush:{components:t},lasso:{fill:"rgba(0, 0, 0, 0)",stroke:"black",strokeWidth:2,opacity:.7,strokeDasharray:[]},snapIndicator:{threshold:75,strokeDasharray:"5, 5",stroke:"black",strokeWidth:2,opacity:.7},startPoint:{r:10,stroke:"rgba(77, 192, 78, 1)",strokeWidth:0,opacity:1}}}))(n);return{interactions:[ZW(n,t)],components:[r]}}({key:"lasso",componentTargetKey:SW.COMPONENT.BAR,components:[t?{key:SW.COMPONENT.STACK_TOTAL_BAR,contexts:["selection"],action:"add"}:{key:SW.COMPONENT.BAR,contexts:["selection"],action:"add",data:["selectionDimension"]}]},e)}function OY(e){return function(e,t){const n=function(e){const{key:t,targets:n,components:r,fillTargets:i,dock:o}=e;return{key:t,type:"brush-area-dir",layout:{dock:n.map(e=>`@${e}`).join(",")},settings:{multiple:!0,brush:{components:r},direction:"left"===o||"right"===o?"vertical":"horizontal",bubbles:{align:"left"===o||"top"===o?"end":"start",placement:"inside"},target:{components:i,fill:"rgba(82,204,82,0.2)"}}}}(e);return{interactions:[tU(e,t,"area")],components:[n]}}({eventName:"discreteRange",components:[{key:SW.COMPONENT.BAR,contexts:["selection"],action:"set",data:["selectionDimension"]}],key:"discreteRangeBrush",targets:["group-axis",SW.COMPONENT.BAR_AXIS,SW.COMPONENT.BAR],fillTargets:["group-axis",SW.COMPONENT.BAR_AXIS],dock:e.dockService.meta.major.dock},e)}function NY(e,t,n){const{selectionService:r}=e,{isUnsupportedFeature:i}=t,o=void 0===n,a=r.getIsSingleSelect(n),s=DY(e,o,a);if(o||a)return{components:[...s.components],gestures:[...s.interactions]};const l=TY(e),c=function(e,t){return e.layoutService.meta.isStacked||e.layoutService.meta.isButterfly||t?.("rangeSelections")?{components:[],interactions:[]}:nU({eventName:"measureRange",key:"measureRangeBrush",targets:["y-axis",SW.COMPONENT.BAR],fillTargets:["y-axis"],dock:e.dockService.meta.minor.dock,scale:SW.SCALE.MAIN.MINOR,onEdited(){e.actions.select.emit("end","measureRange")}},e)}(e,i),u=function(e){return e.layoutService.meta.isContinuous?nU({eventName:"continuousRange",key:"continuousRangeBrush",targets:e.layoutService.meta.isTime?["outer-time-axis","inner-time-axis",SW.COMPONENT.BAR]:["continuous-axis",SW.COMPONENT.BAR],fillTargets:e.layoutService.meta.isTime?["outer-time-axis","inner-time-axis"]:["continuous-axis"],observeBrush:!0,multiple:!0,dock:e.dockService.meta.major.dock,scale:e.layoutService.meta.isTime?SW.SCALE.MAIN.MAJOR_INNER:SW.SCALE.MAIN.MAJOR,toLabel({datum:t,data:n,scale:r}){const i=e.layoutService.meta.isTime?r.formatter():e.chart.formatter(SW.FORMATTER.MINOR),o=e.chart&&e.chart.brushSelectionIncludeMax;return`${t!==Math.max(...n)||o?"":"<"}${i(t)}`}},e):{components:[],interactions:[]}}(e),d=OY(e);return{components:[...s.components,...l.components,...c.components,...d.components,...u.components],gestures:[...l.interactions,...s.interactions,...c.interactions,...d.interactions,...u.interactions]}}const{isNumber:AY}=TO;function _Y({layoutService:e,viewModel:t,dockService:n}){const{meta:r}=e;if(!r.isStackedByDimension||r.isContinuous)return!1;const{fields:i}=t,o=e.getLayoutValue("components",null),a=o?o.filter(e=>"bar"===e.key)[0]:null;return{key:"shadow-bar",type:"box",data:{extract:[{field:i.majorStack,filter:e=>0!==e.qDown||0!==e.qUp,props:{start:{value:e=>(e=>Number(e.filter(e=>AY(e.qMaxPos)).map(e=>e.qMaxPos).reduce((e,t)=>e+t,0).toFixed(13)))(e.qSubNodes)},end:{value:e=>AY(e.qMaxPos)?Number(e.qMaxPos.toFixed(13)):0}}},{field:i.majorStack,filter:e=>0!==e.qDown||0!==e.qUp,props:{start:{value:e=>(e=>Number(e.filter(e=>AY(e.qMinNeg)).map(e=>e.qMinNeg).reduce((e,t)=>e+t,0).toFixed(13)))(e.qSubNodes)},end:{value:e=>AY(e.qMinNeg)?Number(e.qMinNeg.toFixed(13)):0}}}]},settings:{major:{scale:SW.SCALE.MAIN.MAJOR},minor:{scale:SW.SCALE.MAIN.MINOR},orientation:n.meta.minor.orientation,box:{width:a?.style?.width&&a.style.width>0?a.style.width:.7,fill:()=>({type:"pattern",fill:"rgba(165, 165, 165, 0.8)",width:4,height:4,shapes:[{type:"rect",x:0,y:3,width:1,height:1},{type:"rect",x:1,y:2,width:1,height:1},{type:"rect",x:2,y:1,width:1,height:1},{type:"rect",x:3,y:0,width:1,height:1}]})},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},animations:{enabled:t.animations.enabled,trackBy:bN.shadowBars.trackBy,compensateForLayoutChanges:bN.bars.compensateForLayoutChanges}}}const IY={min:"Min",max:"Max"};function LY(e,t,n){const r=n?e.implicitMax:e.implicitMin;return!function(e,t,n){return void 0===n?wU(e,t)||MU(e,t):n===kU?wU(e,t):MU(e,t)}(Number(r.toFixed(13)),e,t)}function PY(e,{barComponent:t,type:n,isStacked:r}){const{viewCache:i,layoutService:o,dockService:a}=e,s=i.get("minorMinMax"),l=n===kU;if(function(e,t){return!e[`hasOther${IY[t]}`]}(s,n)){if(function(e,t){return!e[`hasExplicit${IY[t]}`]}(s,n))return!1;if(LY(s,n,l))return!1}if(function(e,t,n){const r=n?e=>e<0:e=>e>0;return e[`hasExplicit${IY[t]}`]&&r(e[`explicit${IY[t]}`])}(s,n,l))return!1;let c="end";r&&(c=l?"sumOfPositives":"sumOfNegatives");const u=function(e){let t;return()=>(void 0===t&&(t=e()),t)}(()=>e.chart.scale(SW.SCALE.MAIN.MINOR)[n]()),d=l?e=>e.datum[c].value>u():e=>e.datum[c].value<u(),f=SW.COMPONENT.BAR,h=e.layoutService.getLayoutValue("components",[]),p=h?h.filter(e=>e.key===f)[0]:null;return{type:"box-sliced-hat",key:`sliced-hat-${n}`,layout:{dock:l?a.meta.minor.end:a.meta.minor.start},data:t.data,brush:t.brush,settings:{orientation:t.settings.orientation,major:t.settings.major,minor:t.settings.minor,hat:bg({},t.settings.box,{fill:o.meta.isStacked?"#999":t.settings.box.fill,alignment:1,opacity:1,show:d,width:dU({layoutService:e.layoutService,discrete:e.discrete}),strokeWidth:p?.style?.strokeWidth?uU.BAR.STROKE.WIDTH[p.style.strokeWidth.toUpperCase()]:uU.BAR.STROKE.WIDTH.NONE,stroke:p?.style?.strokeColor?.color??uU.BAR.STROKE.COLOR})}}}function RY(e,{collectionKey:t},n){const{meta:r}=e.layoutService,{fields:i}=e.viewModel,o=r.isStackedByDimension&&!r.isContinuous?"qValue":"qNum";function a(t,n){const i=e.ds.field(t).raw(),a=e.ds.field(t).formatter(),s=WD.shouldUseFormat(i),l=r.isButterfly&&n>0;return{field:t,reduceLabel:"none",value:e=>"NaN"===e[o]?0:(e=>l&&0!==e?-e:e)(e[o]),label:e=>s?(e=>"NaN"===e[o]?"-":a(e[o]))(e):e.qText}}function s(e){if(!r.isButterfly)return;return{field:e,reduceLabel:"none",value:e=>e[o]<0}}const l=r.isStackedByDimension?e=>"NaN"===e.qValue:e=>!!e.qIsNull;function c(e){return{field:e,reduceLabel:"none",reduce:"first",value:l}}const u={key:t,data:{extract:i.minor.map((t,o)=>{const l=e.colorService.getMain().getDatumProps(o),u=e.colorService.getMini().getDatumProps(o),d=l[Object.keys(l)[0]],f=d?.field,h=f?{field:f,reduceLabel:"none",value:e=>void 0!==e.qNum&&"NaN"!==e.qNum?e.qNum:e.qText||"-"}:void 0,p={field:r.isDimensionless?t:i.major,props:{...e.viewModel.selectionDimensionProp(),axisSelectionDimension:{field:0},start:0,end:a(t,o),negative:s(t),null:c(t),segment:r.isStacked?a(t):void 0,group:r.isGroupedByDimension?{field:i.majorGroup}:void 0,stack:r.isStacked?{field:i.majorStack}:void 0,measureIndex:r.isGroupedByDimension||r.isStackedByDimension?void 0:o,timeStart:r.isContinuous?{field:i.majorNumeric}:void 0,timeEnd:r.isContinuous?{field:i.majorNumeric}:void 0,fillTooltip:h,...l,...u,id:{value:e=>`r${e.qRow}e${e.qElemNumber}m${o}`},customTooltipAttrExps:0!==r.dimensionCount?FV.getNode(e.layoutService.getLayout(),r):void 0}};return r.isDimensionless&&(p.value=o),void 0!==n&&(p.source=n),WD.deleteUndefinedProperties(p.props),p}),filter:r.isButterfly?e=>!e.negative.value:void 0}};return r.isStacked&&(u.data.stack={stackKey:e=>e.stack.value,value:e=>e.end.value,offset:"diverging"}),u}const{isNumber:zY}=TO;function FY({layoutService:e,viewModel:t},{collectionKey:n}){const{meta:r}=e,{fields:i}=t;if(!r.isStacked)return!1;let o;return o=r.isStackedByMeasure?function(e,t){const n={field:0,props:{sumOfPositives:{fields:t.minor.map(e=>({field:e})),value:e=>e.reduce((e,t)=>t>0?e+t:e,0),reduceLabel:"none"},sumOfNegatives:{fields:t.minor.map(e=>({field:e})),value:e=>e.reduce((e,t)=>t<0?e+t:e,0),reduceLabel:"none"},null:{fields:t.minor.map(e=>({field:e})),value:e=>Array.isArray(e)&&e.every(e=>"NaN"===e),reduceLabel:"none"}}};if(e.isContinuous){const e={field:t.major,value:e=>e.qNum,reduceLabel:"none"};n.props.timeStart=e,n.props.timeEnd=e,n.value=e=>e.qNum}return n}(r,i):function(e,t){if(!e.isContinuous)return{field:t.majorStack,reduceLabel:"none",props:{sumOfPositives:{value:e=>zY(e.qMaxPos)?Number(e.qMaxPos.toFixed(13)):0},sumOfNegatives:{value:e=>zY(e.qMinNeg)?Number(e.qMinNeg.toFixed(13)):0},null:{value:e=>{const{qSubNodes:t=[]}=e;return t.every(e=>"NaN"===((e.qSubNodes||[])[0]||{}).qValue)}}}};const n={field:t.majors[0],value:e=>e.qNum,reduceLabel:"none"};return{field:t.majorStack,trackBy:e=>e.qNum,reduce:e=>e[0],props:{sumOfPositives:{field:t.minor[0],reduceLabel:"none",reduce:e=>e.reduce((e,t)=>t>0?e+t:e,0)},sumOfNegatives:{field:t.minor[0],reduceLabel:"none",reduce:e=>e.reduce((e,t)=>t<0?e+t:e,0)},timeStart:n,timeEnd:n}}}(r,i),{key:n,data:{extract:o}}}const jY="main-collection",BY="stack-total-collection";function HY(e,{collectionKey:t}){const{layoutService:n,colorService:r,reducedDataModel:{fields:i,mode:o}}=e,{meta:a}=n,s=a.isStackedByDimension&&!a.isContinuous?"qValue":"qNum";function l(e,t){if(!a.isButterfly)return{field:e};const n=t>0;return{field:e,value:e=>"NaN"===e[s]?0:(e=>n&&0!==e?-e:e)(e[s])}}function c(e){if(!a.isButterfly)return;return{field:e,reduceLabel:"none",value:e=>e[s]<0}}return{key:t,data:{extract:i.minor.map((e,t)=>{const n=o.isReduced?{}:r.getMain().getDatumProps(t),a={start:0,end:l(e,t),negative:c(e),group:{field:i.majorGroup},measureIndex:t,...n},s={source:"miniCube",field:o.isDimensionless?e:i.major,props:a};return o.isDimensionless&&(s.value=t),s}),filter:a.isButterfly?e=>!e.negative.value:void 0}}}const VY="mini-collection",$Y="mini-stack-collection",WY="mini-continuous-collection",UY="miniCube",YY=(e,t)=>{const n=(e=>{const t=[RY(e,{collectionKey:jY})];return e.layoutService.meta.isStacked&&t.push(FY(e,{collectionKey:BY})),t})(t),r=((e,t)=>{const n=[];return cA({layoutService:t.layoutService}).miniChart&&(t.reducedDataModel.mode.isContinuous?n.push(RY(t,{collectionKey:WY},UY)):t.layoutService.meta.isStacked?n.push(function(e,{collectionKey:t}){const{colorService:n,reducedDataModel:{fields:r,mode:i}}=e;return{key:t,data:{extract:r.minor.map((e,t)=>{const o={end:{field:e,reduceLabel:"none"},...i.isStackedByMeasure&&!i.isReduced?n.getMain().getDatumProps(t):{}};return i.isContinuous&&(o.timeStart={field:r.major,value:e=>e.qNum},o.timeEnd=o.timeStart),{source:"miniCube",field:r.major,props:o}}),stack:{stackKey:e=>e.value,value:e=>e.end.value,offset:"diverging"}}}}(t,{collectionKey:$Y})):n.push(HY(t,{collectionKey:VY}))),n})(0,t);return n.concat(r)};function KY(e,t,n,r){const i=[{position:e,onBackground:!0,justify:0,overflow:r}];if(t){const t={fill:"#e6e6e6",padding:{left:2,right:2,top:2,bottom:2}};i.push({position:"inside",onBackground:!1,justify:"outside"===e?1:0,background:n?t:void 0})}return i}function GY({layout:e,component:t},n,r){if(!RU(e,n))return!1;const{layoutService:i,chart:o,dockService:a,viewModel:s,themeService:l,styleService:c}=n,{meta:u}=i,d=!PU(e,n),f=l.getStyles(),h=c.label.getStyle(),p=h.useContrastColor;function m(e){const t=o.formatter(SW.FORMATTER.MINOR);return t?t(e):e}const g={label:function(e){return 0===e.data.sumOfPositives.value&&0!==e.data.sumOfNegatives.value?"":m(e.data.sumOfPositives.value)},simplifiedPlacements:KY("outside",d,p,u.isContinuous),style:f.label.value},y={label:function(e){return 0===e.data.sumOfNegatives.value&&0!==e.data.sumOfPositives.value?"":m(e.data.sumOfNegatives.value)},simplifiedPlacements:KY("opposite",d,p,u.isContinuous),style:f.label.value},v=[_U(bg(n,g)),_U(bg(n,y))];return{key:"stack-total-labels",type:"labels",renderer:DN(n.flags),layout:{displayOrder:2,minimumLayoutMode:"XSMALL"},settings:{sources:[{component:t,selector:"rect",strategy:{type:"bar",settings:{direction:e=>LU(e.data.sumOfPositives.value,a.meta.minor.orientation,r),labels:v,fontSize:parseInt(h.fontSize,10),fontFamily:h.fontFamily,linkData:bN.labels.linkData}}}]},animations:{enabled:s.animations.enabled,trackBy:bN.labels.trackBy,compensateForLayoutChanges:bN.labels.compensateForLayoutChanges}}}function XY(e,t,n){const r=[{position:e,justify:0,overflow:n,background:{padding:{left:1,right:1,top:1,bottom:1}}}];return r.push({position:"inside",onBackground:!1,justify:1,background:{padding:{left:2,right:2,top:2,bottom:2}}}),r}function JY({layout:e,type:t},n){const{layoutService:r,viewCache:i,themeService:o,styleService:a}=n,{meta:s}=r,{isStacked:l}=s;if(!l&&!PU(e,n)||l&&!RU(e,n))return!1;const c=i.get("minorMinMax");if(!c.hasExplicitMinMax||t===kU&&0===c.max||t===CU&&0===c.min)return!1;if(!EU(t===kU?c.implicitMax:c.implicitMin,c,t))return!1;const u=o.getStyles(),d=a.label.getStyle();let f=e=>e.data.end.label;s.isStacked&&(f=t===kU?function(e){if(EU(e.data.sumOfNegatives.value,c,t)){const t=0===e.data.sumOfNegatives.value?e.data.sumOfPositives.value:e.data.sumOfNegatives.value,r=n.chart.formatter(SW.FORMATTER.MINOR);return r?r(t):t}return""}:function(e){if(EU(e.data.sumOfPositives.value,c,t)){const t=0===e.data.sumOfPositives.value?e.data.sumOfNegatives.value:e.data.sumOfPositives.value,r=n.chart.formatter(SW.FORMATTER.MINOR);return r?r(t):t}return""});const h={label:f,simplifiedPlacements:XY("outside",0,s.isContinuous),styles:u},p={label:f,simplifiedPlacements:XY("opposite",0,s.isContinuous),styles:u},m=[_U(bg(n,h)),_U(bg(n,p))],g="vertical"===n.dockService.meta.minor.orientation?"down":"right",y=[{component:`${SW.COMPONENT.GHOST_BAR_OOB}-${t}`,selector:"rect",strategy:{type:"bar",settings:{direction:g,labels:m,fontSize:parseInt(d.fontSize,10),fontFamily:d.fontFamily,linkData:bN.labels.linkData}}}];return{key:`bar-oob-labels-${t}`,type:"labels",renderer:DN(n.flags),layout:{minimumLayoutMode:"XSMALL"},settings:{sources:y},animations:{enabled:n.viewModel.animations.enabled,trackBy:bN.labels.trackBy,compensateForLayoutChanges:bN.labels.compensateForLayoutChanges}}}function ZY(e){return"all"===e||"title"===e}function QY(e,t,n){if(!ZY(e.dimensionAxis.show)||t.layoutService.meta.isDimensionless)return!1;const r=t.alternativeService.getAlternatives(),{actions:i}=t,o=t.styleService.axis.title.getStyle();return{type:"axis-title",key:"dimension-title",renderer:"react-qcm",layout:{minimumLayoutMode:rU[`${t.dockService.meta.major.orientation}DimensionAxisTitle`].minimumLayoutMode,dock:t.dockService.meta.major.dock},data:{infos:t.layoutService.getHyperCubeValue("qDimensionInfo"),alternatives:r.dimensions,filtered:t.layoutService.meta.filteredFields.dimensions},resources:{app:t.app,cache:t.viewCache,model:t.model,selections:t.selections,translator:t.translator},callbacks:{onChange:()=>{}},settings:{isDisabled:()=>!i?.interact?.enabled(),isRTL:n,isSnapshot:t.layoutService.meta.isSnapshot,noModelDependencies:t?.flags?.isEnabled("VIZ_252_DATA_TITLE_OUTSIDE_SENSE"),skipAttributeExpressions:!1,type:"dimension"},style:{title:{color:o.color,fontFamily:o.fontFamily,fontSize:o.fontSize}}}}function eK(e,t,n){if(!ZY(e.measureAxis.show))return!1;const r=t.alternativeService.getAlternatives(),{actions:i}=t,o=t.styleService.axis.title.getStyle();return{type:"axis-title",key:"measure-title",renderer:"react-qcm",layout:{minimumLayoutMode:"SMALL",dock:t.dockService.meta.minor.dock},data:{infos:t.layoutService.getHyperCubeValue("qMeasureInfo"),alternatives:r.measures,filtered:t.layoutService.meta.filteredFields.measures},resources:{app:t.app,cache:t.viewCache,model:t.model,selections:t.selections,translator:t.translator},callbacks:{onChange:()=>{}},settings:{isDisabled:()=>!i?.interact?.enabled(),isRTL:n,isSnapshot:t.layoutService.meta.isSnapshot,noModelDependencies:t?.flags?.isEnabled("VIZ_252_DATA_TITLE_OUTSIDE_SENSE"),skipAttributeExpressions:!1,type:"measure"},style:{title:{color:o.color,fontFamily:o.fontFamily,fontSize:o.fontSize}}}}function tK({environment:e,rtl:t,refLineModel:n,layoutService:r,colorService:i,dockService:o,themeService:a,viewModel:s,chart:l}){const{theme:c,localeInfo:u}=e,d={resolveUIColor:i.getMain().getPaletteColor},f=a.getStyles(),h=s.animations.enabled;return[kN({refLineModel:n,layoutService:r,colorModel:d,dockService:o,animationsEnabled:h,chart:l,scale:SW.SCALE.MAIN.MINOR,axis:"horizontal"===o.meta.major.orientation?"y":"x",key:SW.COMPONENT.MEASURE_REF_LINE,minimumLayoutMode:rU.refLines.minimumLayoutMode}),kN({isDimension:!0,refLineModel:n,layoutService:r,colorModel:d,dockService:o,animationsEnabled:h,chart:l,scale:SW.SCALE.MAIN.MAJOR,axis:"horizontal"===o.meta.major.orientation?"x":"y",rtl:t,key:SW.COMPONENT.DIMENSION_REF_LINE,mainComponentKey:SW.COMPONENT.BAR,minimumLayoutMode:rU.refLines.minimumLayoutMode}),...CN({refLineModel:n,layoutService:r,colorModel:d,animationsEnabled:h,dock:o.meta.minor.opposite,scale:SW.SCALE.MAIN.MINOR,style:f,formatter:SW.FORMATTER.MINOR,theme:c,localeInfo:u,rtl:t,key:SW.COMPONENT.MEASURE_REF_LINE_LABEL}),...CN({isDimension:!0,refLineModel:n,layoutService:r,colorModel:d,animationsEnabled:h,dock:o.meta.major.opposite,scale:SW.SCALE.MAIN.MAJOR,style:f,theme:c,localeInfo:u,rtl:t,key:SW.COMPONENT.DIMENSION_REF_LINE_LABEL})]}function nK({dockService:e,layoutService:t,discrete:n,continuousDataModel:r,viewModel:i,flags:o}){if(!o?.isEnabled("VIZ_199_ADD_SPACE_BETWEEN"))return!1;if(!!cA({layoutService:t}).none)return!1;const{rtl:a}=e.config,s="horizontal"===e.meta.chart.orientation,l=!s,{dock:c}=e.meta.major,{show:u}=t.getLayoutValue("dimensionAxis",{}),d="none"!==u;if(l&&d&&"bottom"===c)return!1;if(s&&d){if(!a&&"right"===c)return!1;if(a&&"left"===c)return!1}const f=a?"left":"right";return{type:"space",key:SW.COMPONENT.SPACE,layout:{dock:l?"bottom":f,minimumLayoutMode:"XSMALL"},show:()=>t.meta.isContinuous?r.getDimensionCardinality()>1:n.query.getCanScroll(),settings:{size:Math.max(6,Math.min(16,Math.floor(.025*e.meta.minor.size)))},animations:{enabled:i.animations.enabled,trackBy:()=>Math.random()}}}function rK({chart:e,chartModel:t,discreteModel:n,colorService:r,themeService:i,layoutService:o,dockService:a,context:s,resources:l,viewCache:c}){const u=[],d=o.getLayoutValue("plugins");if(!Array.isArray(d)||0===d.length)return u;!function(e){e.forEach(e=>{e&&!e.cId&&(e.cId=WD.generateId)})}(d);const f=[],h=function(e){const t=[];return e.forEach(e=>{e?.type!==t[t.length-1]?.[0]?.type||"point"!==e?.type&&("line"!==e?.type||e?.showPoints||t[t.length-1]?.[0]?.showPoints)?t.push([e]):t[t.length-1].push(e)}),t}(d);return h.forEach((c,d)=>{const h=`points-addon-${d}`,p=`lines-addon-${d}`;switch(c[0]?.type){case"point":u.push(_N({chart:e,chartModel:t,discreteModel:n,colorService:r,themeService:i,layoutService:o,dockService:a,flags:l.flags,rtl:s.rtl,majorScale:SW.SCALE.MAIN.MAJOR,minorScale:SW.SCALE.MAIN.MINOR,mainComponentKey:SW.COMPONENT.BAR,data:c,key:h})),f.push({key:h,lines:!1,labels:!0,fixed:!0,duplicates:!0});break;case"line":u.push(function({chart:e,chartModel:t,discreteModel:n,colorService:r,layoutService:i,dockService:o,rtl:a,majorScale:s,minorScale:l,mainComponentKey:c,data:u,key:d,scales:f={}}){if(!Array.isArray(u)||0===u.length)return!1;const h={resolveUIColor:r.getMain().getPaletteColor},p="horizontal"===o.meta.major.orientation,m=!(!p||!a),{canBeContinuous:g,isContinuous:y}=i.meta,v=i.getLayout(),b=GO.getDimensionValuesInfo({layout:v,canBeContinuous:g,discreteModel:n,layoutService:i}),x=[];u.forEach((e,t)=>{const n=(e?.points??[]).map((n,r)=>({...n,lineId:t,style:0===r?e.style:void 0}));x.push(...n)});const S={},w=[];u.forEach(e=>w.push(...(e?.points??[]).map(e=>e.dimensionValue))),w.forEach(e=>{b[e]&&(S[e]?(S[e].innerValues=b[e].innerValues,S[e].minOrder=Math.min(S[e].minOrder,b[e].minOrder),S[e].maxOrder=Math.max(S[e].maxOrder,b[e].maxOrder),S[e].isMinOrderOk=S[e].isMinOrderOk||b[e].isMinOrderOk,S[e].isMaxOrderOk=S[e].isMaxOrderOk||b[e].isMaxOrderOk):S[e]={id:b[e].id,dataNode:b[e].dataNode,qText:b[e].qText,innerValues:b[e].innerValues,minOrder:b[e].minOrder,maxOrder:b[e].maxOrder,isMinOrderOk:b[e].isMinOrderOk,isMaxOrderOk:b[e].isMaxOrderOk},S[e].numInnerValues=(S[e].maxOrder||0)-(S[e].minOrder||0)+1)});const M=x[0];x.forEach(t=>{const n=NN({point:t,dimensionValueInfo:S,layoutService:i}),r=t?.scale,o=M?.scale,a=i?.meta?.isButterfly,s=i?.meta?.isStacked,l=S[t.dimensionValue]?.dataNode;let c=n;const u=o&&r&&o!==r,d=a&&1===t.measureIndex,h=s&&Array.isArray(l);if(u)c=function(e,t,n){const r=t.min(),i=t.max(),o=n.min(),a=n.max();return i===r?o:o+(e-r)/(i-r)*(a-o)}(n,f[r]||e.scale(r),f[o]||e.scale(o));else if(d)c=-n;else if(h&&void 0!==t.measureIndex&&Array.isArray(l)){const e=l.slice(0,t.measureIndex+2),n=l[t.measureIndex+1]?.qNum;if("number"==typeof n&&0!==n){const t=Math.sign(n);c=e.reduce((e,n)=>{const r=n.qNum;return"number"==typeof r&&Math.sign(r)===t?e+r:e},0)}}t.validMeasureValue=c});const k={scale:s,fn:({datum:t})=>{const n=e.scale(s),r=t.value.dimensionValue;return y?n("string"==typeof r?""===r?void 0:+r:r):void 0!==S[r]?GO.getScaledPosition({scale:n,value:S[r].id,valueInfo:S[r],size:e.component(c)?.rect[p?"width":"height"],align:"center",invert:m,layoutService:i,isContinuous:y}):void 0}},C={scale:l,fn:({datum:e,scale:t})=>t(e.value.validMeasureValue)};return{key:d,type:"line",data:x,settings:{connect:!0,coordinates:{major:p?k:C,minor:p?C:k,layerId:({datum:e})=>e.value.lineId},layers:{curve:({datum:e})=>e.value.style?.lineCurve??"linear",line:{strokeWidth:({datum:e})=>e.value.style?.lineThickness??2,stroke:({datum:e})=>ON({colorModel:h,color:e.value.style?.lineColor?.color?e.value.style?.lineColor:{index:-1,color:"#000"}}),strokeDasharray:({datum:e})=>e.value.style?.lineType}}},animations:{enabled:t.query.animationsEnabled,trackBy:bN.nonUpdatingNode.trackBy,compensateForLayoutChanges:bN.lines.compensateForLayoutChanges}}}({chart:e,chartModel:t,discreteModel:n,colorService:r,layoutService:o,dockService:a,rtl:s.rtl,majorScale:SW.SCALE.MAIN.MAJOR,minorScale:SW.SCALE.MAIN.MINOR,mainComponentKey:SW.COMPONENT.BAR,data:c,key:p})),c.forEach((c,d)=>{if(c?.showPoints&&c?.points){const h=`points-${d}-for-${p}`;u.push(_N({chart:e,chartModel:t,discreteModel:n,colorService:r,themeService:i,layoutService:o,dockService:a,flags:l.flags,rtl:s.rtl,majorScale:SW.SCALE.MAIN.MAJOR,minorScale:SW.SCALE.MAIN.MINOR,mainComponentKey:SW.COMPONENT.BAR,data:c.points,key:h})),f.push({key:h,lines:!0,labels:!0,duplicates:!0})}else c?.points&&f.push({key:p,lines:!0,labels:!1,duplicates:!0,points:c.points})})}}),u.push(function({layoutService:e,dockService:t,chartModel:n,themeService:r,configs:i,flags:o,cache:a}){const s=e.getLayoutValue("plugins"),{rtl:l}=t.config,{orientation:c}=t.meta.major,{isOneDimensional:u,isStacked:d}=e.meta,f=r.getStyles();return{type:"point-label",key:"plugins-point-labels",renderer:DN(o),settings:{all:!0,cache:a,configs:i,label:e=>e.value?.label?.value?e.value?.label?.value:d?e.point?.label:e.end?.label,lineId:({data:e})=>{for(let t=0;t<s.length;t++){const n=s[t];switch(n.type){case"point":if(n.cId===e.value?.cId)return n.cId;break;case"line":if(n.points.some(t=>t.cId===e.value?.cId))return n.cId}}return e.value?.cId||e.line?.value},majorValue:e=>e.value?.dimensionValue?e.value.dimensionValue:u?e.value:e.major?.value,orientation:c,pointValue:e=>e.value?.validMeasureValue,rtl:l},style:f.plugins.label,animations:{enabled:n.query.animationsEnabled,trackBy:bN.nonUpdatingNode.trackBy,compensateForLayoutChanges:bN.labels.compensateForLayoutChanges}}}({layoutService:o,dockService:a,chartModel:t,themeService:i,configs:f,flags:l.flags,cache:c})),u}const iK=(e,t,n)=>{const{layoutService:r,dockService:i,colorService:o,chart:a,actions:s,discrete:l,continuousDataModel:c,reducedDataModel:u,viewModel:d,viewState:f,viewCache:h,themeService:p,refLineModel:m,pluginService:g,tooltipService:y,rtl:v,logicalSize:b,trendLineModel:x,disclaimerService:S}=t,{localeInfo:w}=n,M=function(e,t){const{disclaimerService:n,themeService:r,translator:i}=e,o=n.getDisclaimer();if(!o)return!1;const{fontFamily:a}=r.getStyles();return{key:"disclaimer",type:"disclaimer",renderer:"react-qcm",layout:{dock:o.alignment},settings:{isRTL:t,label:i.get(`Object.Disclaimer.${o.key}`)},style:{fontFamily:a}}}(t,v);if(S.getHasSuppressingDisclaimer())return{components:[M]};const k=EY(e,t,{localeInfo:w,rtl:v}),C=!s?.interact?.enabled(),q=o.getMain().getLegend({eventName:"legend-c",key:"legend-color",viewState:f,chart:a,styleReference:"object.barChart",styleOverrides:{title:t.styleService.legend.title.getStyle(),label:t.styleService.legend.label.getStyle()},rtl:v,settings:{item:{shape:{size:10}}}},{actions:s,navigationDisabled:C}),E=q.components[0];if(E){const{dock:e}=E.layout;if(k.fillRange&&(["right","left"].includes(e)||v)&&(k.fillRange.invert=!0),"legend-seq"===E.type&&void 0!==d.selectionDimensionIdx&&k.fillRange&&k.fillRange.min<k.fillRange.max){const e=nU({eventName:"legendRange",key:"legendRangeBrush",targets:[E.key],fillTargets:[E.key],targetSelector:'[id="legend-seq-target"]',targetFillSelector:'[id="legend-seq-ticks"]',dock:E.layout.dock,scale:"fillRange",bubblesPlacement:"outside",onEdited:()=>{s.select.emit("end","legendRange")}},t);q.components.push(...e.components),q.interactions.unshift(...e.interactions)}}else k.fillRange&&v&&(k.fillRange.invert=!0);const D=((e,{componentKey:t,collectionKey:n})=>{const{layoutService:r,colorService:i,dockService:o,discrete:a,viewModel:s,flags:l}=e,{meta:c}=r,u=i.getMain().getPaletteColor;let d,f;c.isGroupedByDimension?d=({scale:e,datum:t})=>e([t.group.value,t.value])+e.bandwidth([t.group.value,t.value])/2:c.isGroupedByMeasure&&(d=({scale:e,datum:t})=>e([t.value,t.measureIndex.value])+e.bandwidth()/2);let h=2;c.isContinuous?(f={start:"timeStart",end:"timeEnd"},h=bU(e,t)):c.isStacked&&(f="stack");const p=c.isStackedByDimension&&r.getHyperCubeValue("qStackedDataPages.0.qArea.qHeight",NaN)>1,m=e=>!0===e.datum.null?.value,g=r.getLayoutValue("components",null),y=g?g.filter(e=>e.key===t)[0]:null;return{key:t,type:"box",data:{collection:n},preferredSize:c.isContinuous?()=>({size:0,edgeBleed:{left:1,right:1}}):void 0,brush:{consume:[{context:"selection",data:["selectionDimension","axisSelectionDimension","end","fill","timeEnd"],style:{active:{strokeWidth:c.isContinuous||p?0:2,stroke:"#000"},inactive:{opacity:.3}}}]},settings:{major:{scale:SW.SCALE.MAIN.MAJOR,fn:d,ref:f},minor:{scale:SW.SCALE.MAIN.MINOR},orientation:o.meta.minor.orientation,box:{width:dU({layoutService:r,discrete:a,flags:l}),minWidthPx:h,fill:i.getMain().getColor(),opacity:e=>m(e)?0:void 0,minHeightPx:function(e){return c.isStacked?.1:m(e)?.01:.3},strokeWidth:y?.style?.strokeWidth?uU.BAR.STROKE.WIDTH[y.style.strokeWidth.toUpperCase()]:uU.BAR.STROKE.WIDTH.NONE,stroke:y?.style?.strokeColor?.color?u(y?.style?.strokeColor):uU.BAR.STROKE.COLOR},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},animations:{enabled:s.animations.enabled,isMainComponent:!0,trackBy:bN.bars.trackBy,compensateForLayoutChanges:bN.bars.compensateForLayoutChanges}}})(t,{componentKey:SW.COMPONENT.BAR,collectionKey:SW.COLLECTION.MAIN}),T=((e,{componentKey:t,collectionKey:n})=>{const{meta:r}=e.layoutService;if(!r.isStacked)return!1;let i=2;r.isContinuous&&(i=bU(e,t));const o={key:t,type:"box",data:{collection:n},settings:{major:{scale:SW.SCALE.MAIN.MAJOR},minor:{scale:SW.SCALE.MAIN.MINOR,start:{ref:"sumOfNegatives"},end:{ref:"sumOfPositives"}},orientation:e.dockService.meta.minor.orientation,box:{width:dU({layoutService:e.layoutService,discrete:e.discrete}),minWidthPx:i,opacity:0,fill:"none"},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},brush:{consume:[{context:"selection",data:[""],style:{active:{strokeWidth:2,stroke:"#000",opacity:e=>!0===e.data?.null?.value?0:1},inactive:{opacity:e=>!0===e.data?.null?.value?0:.3}}}]}};return r.isContinuous&&(o.settings.major.ref={start:"timeStart",end:"timeEnd"}),o})(t,{componentKey:SW.COMPONENT.STACK_TOTAL_BAR,collectionKey:SW.COLLECTION.STACK_TOTAL}),O=NY(t,n,d.selectionDimensionIdx),{isStacked:N}=r.meta;let A;A=u.mode.isContinuous?SW.COLLECTION.MINI_CONTINUOUS:N?SW.COLLECTION.MINI_STACK:SW.COLLECTION.MINI;const _=N?T:D,I=ZU(0,t),L=t.flags.isEnabled("VIZ_266_BARCHART_REFACTOR_TOOLTIP"),P=[...I,PY(t,{barComponent:_,type:"max",isStacked:N}),PY(t,{barComponent:_,type:"min",isStacked:N}),TU(t,{barComponent:_,type:"max",isStacked:N}),TU(t,{barComponent:_,type:"min",isStacked:N}),NU(t,{chart:a,type:"max",collectionKey:N?SW.COLLECTION.STACK_TOTAL:SW.COLLECTION.MAIN}),NU(t,{chart:a,type:"min",collectionKey:N?SW.COLLECTION.STACK_TOTAL:SW.COLLECTION.MAIN}),...cU(e,t,v,!!I[0]),D,T,_Y({layoutService:r,viewModel:d,dockService:i}),QY(e,t,v),eK(e,t,v),...tK({environment:n,rtl:v,refLineModel:m,layoutService:r,colorService:o,dockService:i,themeService:p,viewModel:d,chart:a}),hO({viewState:f,viewCache:h,layoutService:r,dockService:i,rtl:v}),nK({dockService:i,layoutService:r,discrete:l,continuousDataModel:c,viewModel:d,flags:t.flags}),uY(D,t,{collectionKey:A}),uA({layoutService:r,dockService:i,discrete:l,continuousDataModel:c,viewState:f,viewCache:h,themeService:p,rtl:v,deviceType:n.deviceType}),...iW({majorScale:SW.SCALE.MAIN.MAJOR,minorScale:SW.SCALE.MAIN.MINOR,tooltipOverlay:SW.COMPONENT.TREND_LINES_TOOLTIP_OVERLAY},{layoutService:r,trendLineModel:x,dockService:i,animationsEnabled:d.animations.enabled}),...q.components,FU({layout:e,component:SW.COMPONENT.BAR,minorScale:k.minor},t,v),GY({layout:e,component:SW.COMPONENT.STACK_TOTAL_BAR},t,v),JY({layout:e,type:"max"},t),JY({layout:e,type:"min"},t),...O.components,!L&&BU(0,{...t,coloring:o.getMain().getSettings()},v),!L&&VU(0,{...t,coloring:o.getMain().getSettings()},v),...L?y.getComponents():[!1],!1!==e.showDisclaimer&&M,lW({tooltip:SW.COMPONENT.TREND_LINES_TOOLTIP,formatter:SW.FORMATTER.MINOR},t,{rtl:v}),...t.flags.isEnabled("TLV_1274_PLUGINS_BAR_CHART")?rK({chart:a,chartModel:{query:{animationsEnabled:d.animations.enabled}},discreteModel:l,colorService:o,themeService:p,layoutService:r,dockService:i,context:{},resources:t,viewCache:h}):[]].filter(Boolean);!function(e){if(e&&0!==e.length)for(let t=0;t<e.length;t++)e[t].layout=e[t].layout||{},e[t].layout.displayOrder=t}(P);const R=[...q.interactions,...O.gestures].sort((e,t)=>(t.prio||0)-(e.prio||0));return{interactions:L?lY(t,{rtl:v,hammer:{gestures:R}}):oY(t,{rtl:v,hammer:{gestures:R}}),scales:k,palettes:o.getMain().getPalettes(),components:g.extendComponents(P),strategy:FD(0,{logicalSize:b,minCenterRatio:0}),formatters:$U(t,k),collections:YY(0,t)}};function oK({picasso:t,chart:n,services:r,environment:i,viewState:o,viewCache:a,bootstrapped:s}){const{width:l,height:c}=e.useRect(),u=e.useModel(),d=e.useSelections(),f=e.useOptions(),[h,p]=e.useState(),[m,g]=e.useState(),[y,v]=e.useState(),[b,x]=e.useState(),S=e.useApp();function w(){if(!n.layoutComponents)return Promise.resolve();const{discrete:e,layoutService:s,viewModel:l}=r;a.set("isPreRender",!0);const c=function(e={}){const{alternativeService:s,selectionService:l,refLineModel:c,discrete:p,reducedDataModel:m,continuousDataModel:g,trendLineModel:y,pluginService:v,colorService:b,viewModel:x,dockService:w,themeService:M,customTooltipModel:k,layoutService:C,logicalSize:q,styleService:E,disclaimerService:D,tooltipService:T}=r,O=l.custom.getActions(),N=t.data("q")(h.prepPicassoDataSet()),A={picasso:t,ds:N,rtl:"rtl"===f?.direction,model:u,app:S,chart:n,actions:O,localeInfo:i.localeInfo,logicalSize:q,flags:i.flags,translator:i.translator,selections:d,isLocked:l.getIsSelectionLocked,viewCache:a,viewState:o,alternativeService:s,layoutService:C,dockService:w,viewModel:x,colorService:b,selectionService:l,themeService:M,trendLineModel:y,discrete:p,continuousDataModel:g,reducedDataModel:m.model(),customTooltipModel:k,debouncer:Ox,refLineModel:c,pluginService:v,styleService:E,disclaimerService:D,tooltipService:T,...e};return iK(C.getLayout(),A,i)}(m);h.extractDataPages(),n.layoutComponents({settings:c,data:y}),a.set("isPreRender",!1),h.insertDataPages(),l.animations.hasSlicedHats=c.components.filter(e=>"box-sliced-hat"===e.type).length>0;const p=[];return 1!==c.components.length&&s.meta.isDiscrete&&p.push(e.command.initialize()),Promise.all(p)}const[[M,k]=[]]=e.usePromise(()=>{if(!(t&&n&&r&&i&&o&&a&&s))return Promise.resolve();const{alternativeService:e,layoutService:l,selectionService:c,refLineModel:u,discrete:d,continuous:f,reducedDataModel:h,continuousDataModel:p,trendLineModel:m,legendLayoutService:g,colorService:y,pluginService:v,viewModel:b,customTooltipModel:S,disclaimerService:w,customTooltipService:M,tooltipService:k}=r;if(!c?.custom?.getActions())return Promise.resolve();const{properties:C}=s,q=C?.qHyperCubeDef.qDimensions.some(e=>e.qCalcCondition?.qCond?.qv);q&&(S.useCustomTooltip=!1);const E=()=>{x(Date.now()),b.animations.isPartialUpdating=!0};o.onChanged("scrollOffset",()=>{g&&g.setDataPages([d.query.getCurrentDataPage()]),u&&u.update(),E()}),o.onChanged("legendScrollOffset",E),o.intercept("zoom",f.event.onZoomIntercept({viewCache:a})),o.onChanged("zoom",f.event.onZoomChange({layoutService:l,continuousDataModel:p},E)),c.setLayout(l.getLayout());const D=[];l.meta.isContinuous&&(p.update(l.getLayout()),D.push(p.initialFetch())),m.command.update(),D.push(h.fetch().then(({reducedCube:e})=>{h.update(e)})),M.setProperties(C),k.expando.set("properties",C),w.initialize(),D.push(Promise.resolve({properties:s.properties}));return Promise.all(D).then(t=>Promise.all([v.initialize(),y.initialize(),e.initialize({properties:C}),XW({reducedDataModel:h,layoutService:l,continuousDataModel:p,trendLineModel:m})]).then(e=>[t,e.pop()]))},[s]);e.useEffect(()=>{if(!r?.colorService?.getMain()||!k)return;const{layoutService:e,selectionService:t,reducedDataModel:n,continuousDataModel:o,trendLineModel:s,legendLayoutService:l,colorService:c,viewModel:u}=r;a.set("minorMinMax",k);const d=e.getHyperCube(),f=e.meta.isContinuous?o.getInitialCube():n.model().cube,{field:h}=c.getMain().getSettings(),m=!e.meta.isContinuous&&(n.model().mode.isReduced||e.meta.isStacked)&&l,y=m?l.getHyperCube():void 0;t.setBrushAliases({colorField:h,useLegendCube:m,legendAlias:`legendCube/${h}`});const v=function({mainCube:e,miniCube:t,legendCube:n,localeInfo:r,layoutService:i,viewModel:o,trendLineModel:a}){const s=i.refs.dataPages.split(".").pop();let l=[],c=[];const u=i.meta.isContinuous?[{key:o.fields.majorNumeric,from:i.meta.isStackedByDimension?o.fields.majorStack:o.fields.major,override:{value:e=>e.qNum}}]:void 0;return{prepPicassoDataSet:()=>({key:"qHyperCube",data:e,config:{localeInfo:r,virtualFields:u}}),prepPicassoData(i){const o=[{type:"q",key:"qHyperCube",data:e,config:{localeInfo:r,virtualFields:u}},{type:"q",key:"miniCube",data:t,config:{localeInfo:r,virtualFields:u}},...i];return n&&o.push({type:"q",key:"legendCube",data:n,config:{localeInfo:r,virtualFields:u}}),a.query.hasTrendLines()&&o.push({key:"trend",data:a.query.getData()}),o},extractDataPages(){l=e[s],c=t.qDataPages,e[s]=[],t.qDataPages=[]},insertDataPages(){e[s]=l,t.qDataPages=c}}}({mainCube:d,miniCube:f,legendCube:y,localeInfo:i.localeInfo,layoutService:e,viewModel:u,trendLineModel:s}),b=M[M.length-1];g({localeInfo:i.localeInfo,...b}),p(v)},[k]),e.useEffect(()=>{if(!r||!m||!h)return;const e=r.colorService.getMain();if(!e)return;h.prepPicassoDataSet();const t=h.prepPicassoData(e.getData());v(t)},[m]),e.useEffect(()=>{r?.colorService?.getMain()&&n.update&&h&&y&&w().then(()=>{const{layoutService:e,discrete:t,legendLayoutService:i}=r;if(i){1===e.getLayoutValue("scrollStartPos")&&i.setDataPages([t.query.getCurrentDataPage()])}n.update(),bN.cacheProperties({viewCache:a,layout:e.getLayout()})})},[y]),e.useEffect(()=>{if(!(l&&c&&h&&n?.update&&r?.colorService.getMain()))return;const{viewModel:e}=r;e.animations.isSizeChanging=!0;const{dockService:t,themeService:o}=r;t.update({width:l,height:c}),o.setTheme(i.theme),w().then(()=>{n.update&&n.update()})},[l,c]),e.useEffect(()=>{if(!n?.update)return;const{viewModel:e}=r;n.update({partialData:!0,excludeFromUpdate:["mini-marker","dim-title","measure-title","ref-line","grid-line"]}),e.animations.isPartialUpdating=!1},[b])}const aK=e=>"[object Object]"===Object.prototype.toString.call(e),sK=e=>Array.isArray(e);function lK(e,t){if(e===t)return!0;if(sK(e)){if(!sK(t))return!1;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!lK(e[n],t[n]))return!1;return!0}if(aK(e)){if(!aK(t))return!1;const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r=0;r<n.length;r++){if(!Object.hasOwn(t,n[r]))return!1;if(!lK(e[n[r]],t[n[r]]))return!1}return!0}return e===t}function cK({enable:t=!0}={}){const n=e.useModel(),r=()=>Date.now().toString()+Math.random(),[i,o]=e.useState(r()),a={properties:void 0};return e.useEffect(()=>{if(!n||!n.getEffectiveProperties||!t)return()=>{};const e=()=>{n.getEffectiveProperties().then(e=>{const t=bg(!0,{},e);if(!a.properties)return void(a.properties=t);const n=function(e,t){const n={properties:!1,exclude:!1};if(e===t)return n;const r=bg(!0,{},e),i=bg(!0,{},t);return n.exclude=!lK(r.qHyperCubeDef?.qLayoutExclude,i.qHyperCubeDef?.qLayoutExclude),delete r.qHyperCubeDef?.qLayoutExclude,delete i.qHyperCubeDef?.qLayoutExclude,n.properties=!lK(r,i),n}(a.properties,t);a.properties=t,n.exclude&&!n.properties&&o(r())})};return n.on("changed",e),e(),()=>{n.removeListener("changed",e)}},[t]),i}function uK({env:t,services:n}){const r=e.useApp(),i=e.useModel(),o=e.useRenderState(),a=cK({enable:!1===n?.layoutService?.meta?.isSnapshot}),[s,l]=e.usePromise(async()=>{if(!t||!n)return Promise.resolve();const{layoutService:e}=n,{isSnapshot:a,isStacked:s,isContinuous:l}=e.meta,c=[];return a||c.push(i.getEffectiveProperties()),Promise.all(c).then(async t=>{const n=t[0]||void 0;if(n?.qHyperCubeDef){const t=e.getLayout(),a=bg(!0,{},n),c=(({properties:e,layout:t,isStacked:n,isContinuous:r,model:i,layoutService:o})=>{const a=t.qHyperCube.qDimensionInfo.filter(e=>7005!==e.qError?.qErrorCode),s=t.qHyperCube.qMeasureInfo.filter(e=>7005!==e.qError?.qErrorCode),l=bg(!0,{},e);return((e,t,n)=>{const{color:{mode:r}}=n;e.length>1&&n.color?n.color.persistent=!0:"byDimension"===r&&t.length>1?n.color.mode="byMultiple":"byExpression"===r&&0===t.length?n.color.mode="primary":0===e.length&&t.length>0&&(n.color.byMeasureDef=void 0,n.color.byDimDef=void 0,1===t.length&&"byExpression"!==r&&(n.color.mode="primary"))})(a,s,e),a.length>1&&n&&!r&&"S"===e.qHyperCubeDef.qMode&&(e.qHyperCubeDef.qMode="K"),a.length<2&&"K"===e.qHyperCubeDef.qMode&&(e.qHyperCubeDef.qMode="S"),i.colorSupport?.colorByUpdater?.(e,"qHyperCubeDef.",t),function({properties:e,layoutService:t}){const{filteredFields:n}=t.meta;if(!(n.measures.length>0))return;const{mode:r}=e.color||{};if("byExpression"===r){const r=t.getLayout();if("colorByExpression"===r.qHyperCube.qMeasureInfo?.[0]?.qAttrExprInfo?.[0]?.id)return;const{current:i,target:o}=function({properties:e,filtered:t}){const{qMeasures:n}=e.qHyperCubeDef||[],{current:r,target:i}=n.reduce((e,n,r)=>("colorByExpression"===n.qAttributeExpressions[0]?.id&&(e.current=r),void 0!==e.target||t.includes(r)||(e.target=r),e),{current:void 0,target:void 0});return{current:r,target:i}}({properties:e,filtered:n.measures});if(void 0===i)return;const a=e.qHyperCubeDef.qMeasures[i].qAttributeExpressions[0];e.qHyperCubeDef.qMeasures[i].qAttributeExpressions.splice(0,1),e.qHyperCubeDef.qMeasures[o].qAttributeExpressions.splice(0,0,a)}}({properties:e,layoutService:o}),!bO.compare(l,e,!0)&&JSON.stringify(l)!==JSON.stringify(e)&&(e.hash=Math.random(),!0)})({properties:n,layout:t,isStacked:s,isContinuous:l,model:i,layoutService:e});if(c)return o.pending(),(e=>!(!e||e.qHasSoftPatches||e.qExtendsId||!((e.qMeta?.privileges||[]).indexOf("update")>-1)))(t)?i.setProperties(n).then(()=>{r.clearUndoBuffer()}):void await((e,t,n)=>{if(!e)return Promise.resolve();let r=bO.generate(t,n);return bg(!0,t,n),r&&r.length?(r=r.map(e=>({qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path})),e.applyPatches(r,!0)):Promise.resolve()})(i,a,n);o.restore()}return{properties:n}})},[t,n,a]);if(l&&!l.isHandled)throw l;return s}var dK,fK={exports:{}};var hK=(dK||(dK=1,function(e){self,e.exports=(()=>{var e={909: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,c,u,d=arguments[0],f=1,h=arguments.length,p=!1;for("boolean"==typeof d&&(p=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<h;++f)if(null!=(t=arguments[f]))for(n in t)r=l(d,n),d!==(i=l(t,n))&&(p&&i&&(a(i)||(c=o(i)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&a(r)?r:{},s(d,{name:n,newValue:e(p,u,i)})):void 0!==i&&s(d,{name:n,newValue:i}));return d}},8:(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,c,u,d=arguments[0],f=1,h=arguments.length,p=!1;for("boolean"==typeof d&&(p=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<h;++f)if(null!=(t=arguments[f]))for(n in t)r=l(d,n),d!==(i=l(t,n))&&(p&&i&&(a(i)||(c=o(i)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&a(r)?r:{},s(d,{name:n,newValue:e(p,u,i)})):void 0!==i&&s(d,{name:n,newValue:i}));return d}}},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:()=>Ne});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 c(e){return s+e+l}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var n=function(e,t){if(!t)return null;var n,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 d(e){return!(!e.fullAccumulation&&!e.fullRange)}function f(e,t){var n=e.crossAllDimensions;return 2===t&&n?"RowNo(Total)":"RowNo()"}function h(e){var t=function(e){return e?(e=function(e){return e.replace(/\/\*[^]*?\*\//g,"")}(e=function(e){return e.replace(/\/\/(.*)$/gm,"")}(e))).trim():""}(e),n=t.trim();return"="===n.substring(0,1)?n.substring(1).trim():n}function p(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function 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 v(e,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=").concat(y("MinString(".concat(t,")")),")' and Only({1}").concat(t,")<='$(=").concat(y("MaxString(".concat(t,")")),")'\"}")}function b(e){var t=e.modifier,n=void 0===t?{}:t,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 c=v(u(r[0],i),p(0));return"".concat(a,"({1<").concat(c,">}").concat(l,")")}if(r&&2===r.length){var d=u(r[0],i),f=u(r[1],i),h=p(0),m=p(1),g=v(d,h),y=v(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 S(e){var t=e.properties,n=e.layout;return o(t,"qHyperCubeDef.qDimensions",o(n,"qHyperCube.qDimensionInfo",[])).length}const w={isFullRange:d,getNumDimensions:S,getExpressionWithExcludedComp:function(e){var t=e.expression,n=e.modifier,r=e.dimensions,i=e.dimensionAndFieldList,o=e.treatMissingAsNull,a=c(h(t));if(!n.showExcludedValues)return a;var s=b({modifier:n,dimensions:r,dimensionAndFieldList:i}),l=o?"":", 0";if(r&&1===r.length){var u=p(0);return"If(Count(".concat(u,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(r&&2===r.length){var d=p(0),f=p(1);return"If(Count(".concat(d,") * Count(").concat(f,") > 0, ").concat(a," + ").concat(s).concat(l,")")}return a},getRowNoComp:f,getNumStepComp:function(e,t){if(!d(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:b,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===S({properties:n,layout:r})},getDimComp:function(e,t){var n=function(e){return e[arguments.length>1&&void 0!==arguments[1]?arguments[1]:0].qDef.qSortCriterias[0]}(e,t),r=p(t);if(!n.qSortByExpression&&!n.qSortByNumeric&&!n.qSortByAscii)return r;var i=["Descending","Ascending"],o=n.qSortByNumeric?"(Numeric, ".concat(i[(n.qSortByNumeric+1)/2],")"):"",a=n.qSortByAscii?"(Text, ".concat(i[(n.qSortByAscii+1)/2],")"):"";return n.qSortByNumeric&&n.qSortByAscii?"(".concat(r,", ").concat(o,", ").concat(a,")"):n.qSortByNumeric?"(".concat(r,", ").concat(o,")"):n.qSortByAscii?"(".concat(r,", ").concat(a,")"):r},simplifyExpression:h,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var n=t.indexOf(s);if(-1!==n){var r=t.indexOf(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:u,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=S({properties:t,layout:n});return s>=i&&s<=a},getExpressionWithMarkers:c,canExtract:function(e){var t=e.indexOf(s),n=e.indexOf(l);return t>-1&&n>-1&&t<n},getDimDefWithWrapper:p,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")},generateTSDExpression:function(e,t,n){var 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 M(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 k(e){return k="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},k(e)}var C=t().bind(null,!0),q={},E=Array.isArray;function D(e){return null!=e&&!Array.isArray(e)&&"object"===k(e)}function T(e){return void 0===e}function O(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function N(e,t){var n,r=t.substring(1).split("/").slice(0,-1);return r.forEach(function(t,i){if(i!==r.length){n=+t;var o=Number.isNaN(n)?{}:[];e[n||t]=T(e[n||t])?o:e[t],e=e[n||t]}}),e}function A(e,t){var n=!0;if(D(e)&&D(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach(function(r){A(e[r],t[r])||(n=!1)}),n);if(E(e)&&E(t)){if(e.length!==t.length)return!1;for(var r=0,i=e.length;r<i;r+=1)if(!A(e[r],t[r]))return!1;return!0}return e===t}q.generate=function(e,t,n){n=n||"";var r=[];return Object.keys(t).forEach(function(i){var o=function(e){return e?C({},{val:e}).val:e}(t[i]),a=e[i],s="".concat(n,"/").concat(i);A(o,a)||O(t,i)||(T(a)?r.push({op:"add",path:s,value:o}):D(o)&&D(a)?r=r.concat(q.generate(a,o,s)):E(o)&&E(a)?r=r.concat(function(e,t,n){var r=[],i=e.slice(),o=-1;function a(e,t,n){if(e[n]&&T(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(A(t,i))return r;if(!T(t[0])&&T(t[0].qInfo))return r.push({op:"replace",path:n,value:t}),r;for(var s=i.length-1;s>=0;s-=1)-1===(o=a(t,i[s].qInfo&&i[s].qInfo.qId,s))?(r.push({op:"remove",path:"".concat(n,"/").concat(s)}),i.splice(s,1)):r=r.concat(q.generate(i[s],t[o],"".concat(n,"/").concat(s)));for(var l=0,c=t.length;l<c;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){T(t[i])&&!O(e,i)&&r.push({op:"remove",path:"".concat(n,"/").concat(i)})}),r},q.apply=function(e,t){t.forEach(function(t){var n,r,i=N(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(E(i))"-"===o&&(o=i.length),i.splice(+o,"add"===t.op?0:1,t.value);else if(E(a)&&E(t.value)){var l,c=t.value.slice();a.length=0,(l=a).push.apply(l,function(e){if(Array.isArray(e))return M(e)}(r=c)||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 M(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?M(e,t):void 0}}(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(D(a)&&D(t.value))n=a,Object.keys(n).forEach(function(e){Object.getOwnPropertyDescriptor(n,e).configurable&&!O(n,e)&&delete n[e]}),C(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 u=N(e,t.from);E(i)?i.splice(+o,0,u.splice(+s,1)[0]):(i[o]=u[s],delete u[s])}else"remove"===t.op&&(E(i)?i.splice(+o,1):delete i[o])})},q.clone=function(e){return C({},e)},q.createPatch=function(e,t,n){var r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},q.updateObject=function(e,t){Object.keys(e).length?q.apply(e,q.generate(e,t)):C(e,t)};const _=q,I=function(e,n,r){if(!e)return Promise.resolve();var i=_.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 L="accumulation";function P(e,t){var n=o(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===L)return n[r]}function R(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===L)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var z={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""};const F={translationKey:"properties.modifier.accumulation",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.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=w.getNumDimensions({properties:r,layout:i}));var c=o(r,"qHyperCubeDef.qDimensions",[]),u=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:s}),d=w.getNumStepComp(n,l),f=w.getAboveComp(n,l,u,d),h=w.getRangeComp("RangeSum",f);if(w.needDimension({modifier:n,properties:r,layout:i})){var p=w.getDimComp(c,1),m=w.getDimComp(c,0),g=w.getAggrComp(h,p,m);h=n.showExcludedValues?w.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:s,valueComp:g}):g}return h},extractInputExpression:w.extractInputExpression,initModifier:function(e){w.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.accumulation.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(R(t,e),".accumulationDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.accumulation.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(R(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.accumulation.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(R(t,e),".fullAccumulation")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(R(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=P(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=P(t,e);return n&&!n.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(R(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return w.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=P(t,e);return o&&!o.disabled}};return n}};var j="movingAverage";function B(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 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===j)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var V={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1};const $={translationKey:"properties.modifier.movingAverage",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.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 c=s;void 0===c&&(c=w.getNumDimensions({properties:i,layout:a}));var u=o(i,"qHyperCubeDef.qDimensions",[]),d=r.showExcludedValues&&r.nullSuppression,f=w.getExpressionWithExcludedComp({expression:n,modifier:r,dimensions:u,dimensionAndFieldList:l,treatMissingAsNull:d}),h=w.getNumStepComp(r,c),p=w.getAboveComp(r,c,f,h);if(r.nullSuppression)t=w.getRangeComp("RangeAvg",p);else{var m=w.getRangeComp("RangeSum",p),g=function(e,t){var n=w.getRowNoComp(e,t);if(!w.isFullRange(e)){var r=e.steps,i="number"!=typeof r||Number.isNaN(r)?6:r;return"RangeMin(".concat(i,", ").concat(n,")")}return n}(r,c);t="".concat(m," / ").concat(g)}var y=t;if(w.needDimension({modifier:r,properties:i,layout:a})){var v=w.getDimComp(u,1),b=w.getDimComp(u,0),x=w.getAggrComp(y,v,b);y=r.showExcludedValues?w.getExcludedComp({modifier:r,dimensions:u,dimensionAndFieldList:l,funcComp:"Only",valueComp:x}):x}return y},extractInputExpression:w.extractInputExpression,initModifier:function(e){w.initModifier(e,V)},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!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(H(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.movingAverage.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(H(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.movingAverage.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(H(t,e),".fullRange")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(H(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=B(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=B(t,e);return n&&!n.fullRange}},showExcludedValues:{refFn:function(t){return"".concat(H(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat(H(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return w.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=B(t,e);return o&&!o.disabled}};return n}};var W="timeSeriesDecomposition";function U(e,t){var n=o(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===W)return n[r]}function Y(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===W)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var K={type:"timeSeriesDecomposition",disabled:!1,decomposition:"",steps:2,outputExpression:""};const G={translationKey:"properties.modifier.timeSeriesDecomposition",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties;return n?w.generateTSDExpression(n,t,r):t},extractInputExpression:w.extractInputExpression,initModifier:function(e,t){w.initModifier(e,K),""===e.decomposition&&t&&(e.decomposition=w.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!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{decomposition:{refFn:function(t){return"".concat(Y(t,e),".decomposition")},type:"string",translation:t.modifierTrendDecompositionDecomposition||"properties.modifier.trendDecomposition.decomposition",component:"dropdown",schemaIgnore:!0,defaultValue:t.trendDecompositionParametersDecompositionObserved||"cao.trendDecomposition.parameters.decomposition.observed",options:a.OPTIONS},steps:{refFn:function(t){return"".concat(Y(t,e),".steps")},type:"integer",translation:t.modifierTimeSeriesDecompositionPeriods||"properties.modifier.timeSeriesDecomposition.periods",schemaIgnore:!0,defaultValue:2,change:function(t,n){var r=U(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=U(t,e);return n&&!n.fullRange}}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(W))return!1;var o=U(t,e);return o&&!o.disabled}};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 Z(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 Q={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""};const ee={translationKey:"properties.modifier.difference",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:w.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=w.getNumDimensions({properties:r,layout:i}));var c=o(r,"qHyperCubeDef.qDimensions",[]),u=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:s}),d=w.getAboveComp(n,l,u),f="".concat(u," - ").concat(d);if(w.needDimension({modifier:n,properties:r,layout:i})){var h=w.getDimComp(c,1),p=w.getDimComp(c,0),m=w.getAggrComp(f,h,p);f=n.showExcludedValues?w.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:s,funcComp:"Only",valueComp:m}):m}return f},initModifier:function(e){Object.keys(Q).forEach(function(t){void 0===e[t]&&(e[t]=Q[t])})},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(Z(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.difference.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(Z(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.difference.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},showExcludedValues:{refFn:function(t){return"".concat(Z(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return w.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(w.getFieldWithWrapper(t),"={'").concat(n,"'}>}"):""}function le(e,t){return 0===e&&t>1||2===e?"Total":""}function ce(e,t,n){return 0===e&&t>1?"<".concat(w.getDimDefWithWrapper(n),">"):""}const ue={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:w.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=w.getNumDimensions({properties:r,layout:i}));var c=o(r,"qHyperCubeDef.qDimensions",[]),u=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:s}),d=n.selectionScope,f=n.dimensionalScope;return function(e,t,n,r,i,o,a){var s=ae(t),l=se(t,n,r),c=""===s&&""===l?"":s||l,u=le(i,o),d=ce(i,o,a),f=function(e){for(var t=[],n=0;n<e;n++)t[n]=w.getDimDefWithWrapper(n);return t.join(", ")}(o);return"".concat(e,"/ Sum(").concat(c," ").concat(u).concat(d," Aggr(").concat(c," ").concat(e,", ").concat(f,"))")}(u,d,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!w.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){if(1===e){var n=ie(t,0);t.splice(n,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){if(e<2){var n=ie(t,0);t.splice(n,1)}return t}(i,o),o=function(e,t){if(0===e){var n=ie(t,1);t.splice(n,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 w.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:ce};var de="qDef.base",fe="qDef.qDef",he="qDef.base.qDef",pe="qLibraryId",me="qDef.base.qLibraryId";const ge={getExpression:function(e){var t=o(e,he);return void 0!==t?t:o(e,fe)},getExpressionRef:function(e){return void 0!==o(e,he)?he:fe},getLibraryIdRef:function(e){return o(e,me)?me:pe},getLibraryId:function(e){return o(e,me)||o(e,pe)},getLabelRef:function(e){return o(e,de)?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return o(e,de)?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}};var ye="qDef.qDef",ve="qDef.base.qDef",be="qLibraryId",xe="qDef.base.qLibraryId",Se="qDef.qLabel",we="qDef.qLabelExpression",Me="qDef.base.qLabel",ke="qDef.base.qLabelExpression",Ce="qDef.qAggrFunc",qe="qDef.base.qAggrFunc",Ee={initBase:function(e,t){(t||Ee.isValid(e))&&(n(e,ve,o(e,ye)),n(e,xe,o(e,be)),n(e,Me,o(e,Se)),n(e,ke,o(e,we)))},restoreBase:function(e){Ee.isValid(e)&&(n(e,ye,o(e,ve)),n(e,be,o(e,xe)),n(e,Se,o(e,Me)),n(e,we,o(e,ke)),o(e,Ce)&&o(e,qe)&&n(e,Ce,o(e,qe)),delete e.qDef.base)},isValid:function(e){var t=o(e,ve),n=o(e,xe);return void 0!==t||void 0!==n}};const De=Ee;function Te(e){return Te="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},Te(e)}var Oe={accumulation:F,movingAverage:$,difference:ee,normalization:ue,timeSeriesDecomposition:G};const Ne={modifiers:Oe,apply:_e,applyModifiers:Ie,cleanUpMeasure:Le,destroy:function(e){e&&Ae[e.id]&&Ae[e.id].masterItemSubscriber&&(Ae[e.id].masterItemSubscriber&&Ae[e.id].masterItemSubscriber.unsubscribe(),delete Ae[e.id])},hasActiveModifiers:Pe,getActiveModifier:Re,initBase:De.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some(function(e){return Oe[e]})},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some(function(e){return Oe[e]&&Oe[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);Ye({modifiers:t,properties:n,layout:r})&&(i=!0,o=o||Ze({modifiers:t,properties:n,layout:r}))}),i&&!o},ifEnableTotalsFunction:ze};var Ae={};function _e(){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;Ae[n.id]=Ae[n.id]||{isFirstTime:!0};var c=Ae[n.id].isFirstTime;if(Ae[n.id].isFirstTime=!1,r&&"object"===Te(r))return Ie({model:n,properties:r});var u=n?n.layout:void 0,d=o(u,"qSelectionInfo.qInSelections");if(a||d)return Promise.resolve(l);var f=o(u,"qHyperCube.qMeasureInfo"),h=Ae[n.id].lastReloadTime;if(Ae[n.id].lastReloadTime=o(n,"app.layout.qLastReloadTime"),Pe({measures:f,layout:u})){var p=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 Ue({measure:e,properties:n,layout:r})})}({measures:t,layout:n})}({measures:f,layout:u,model:n,lastReloadTime:h});return p||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 Ye({modifiers:je(t),layout:n})?!t.base:!!t.base}({measure:e,layout:n})}))}({measures:f,layout:u,masterItem:s,isFirstTime:c})?n.getEffectiveProperties().then(function(e){var r=t()(!0,{},e);He(r);var i=Qe(r);return Ke({model:n}).then(function(t){return Ge({libraryIds:i,model:n}).then(function(i){return p&&function(e){var t=e.properties;Fe(t).forEach(function(e){return function(e){var t=e.measure;if(Ue({measure:t,properties:e.properties})){var n=0,r=t.qDef.modifiers;Array.isArray(r)&&r.forEach(function(e){if("object"===Te(e)&&!e.disabled){if(n++,"object"!==Te(Oe[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=Oe[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==r&&$e(t)&&w.simplifyExpression(t.qDef.base.qDef)!==w.simplifyExpression(r)&&(t.qDef.base.qDef=r)}})}}({measure:e,properties:t})})}({properties:r}),Ie({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"===Te(e.base)})}(f)?n.getEffectiveProperties().then(function(e){return function(e){var n=e.model,r=e.properties,i=Qe(r);return et({model:n,libraryIds:i}).then(function(){var e=t()(!0,{},r);return Fe(r).forEach(function(e){return Le(e)}),Je({oldProperties:e,newProperties:r,model:n})})}({model:n,properties:e})}):Promise.resolve(l)}function Ie(e){var n=e.model,r=e.oldProperties,i=e.properties,a=e.measures,s=e.runUpdateIfChange,l=void 0!==s&&s,c=e.masterItem,u=e.libraryItemsProps,d=e.dimensionAndFieldList;void 0===r&&(r=l?t()(!0,{},i):i),He(i);var f=Qe(i);return et({model:n,libraryIds:f,masterItem:c}).then(function(){return function(e){var n=e.measures,r=e.properties,i=e.model,a=e.libraryItemsProps,s=e.dimensionAndFieldList;if(n||(n=Fe(r)),!n.length)return Promise.resolve();if(!Pe({measures:n,properties:r}))return n.forEach(function(e){return Le(e)}),Promise.resolve();var l=a?void 0:Qe(r);return Ke({model:i,dimensionAndFieldList:s}).then(function(e){return Ge({libraryIds:l,model:i,libraryItemsProps:a}).then(function(i){n.forEach(function(n){Ye({modifiers:n.qDef.modifiers,properties:r})?(function(e){var n=e.measure,r=e.properties,i=e.libraryItemsProps,a=e.dimensionAndFieldList,s=0;De.isValid(n)||De.initBase(n,!0);var l=n.qDef,c=l.modifiers,u=l.base;Array.isArray(c)&&c.forEach(function(e){if("object"===Te(e)&&!e.disabled){if(s++,"object"!==Te(Oe[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)");Oe[e.type].initModifier(e,n);var l=n.qLibraryId||u&&u.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:Oe[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 Oe[r.type].updateModifier&&Oe[r.type].updateModifier(r,i.qHyperCubeDef);var a=ge.getExpression(n),s=""===a?a:Oe[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||ze(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&ze(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}),Ve(n)):Le(n)})})})}({measures:a,properties:i,model:n,libraryItemsProps:u,dimensionAndFieldList:d}).then(function(){return l?Je({oldProperties:r,newProperties:i,model:n}):Promise.resolve(!1)})})}function Le(e){!function(e){var t=je(e);return Array.isArray(t)&&t.some(function(e){return"object"===Te(e)&&!e.disabled&&!Oe[e.type]})}(e)?De.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,Ve(e)}function Pe(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some(function(e){return Ye({modifiers:je(e),properties:n,layout:r})})}function Re(e){var t=je(e);if(Array.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];if(Oe[r.type]&&!r.disabled)return r}}function ze(e){var t=Re(e);return!t||Oe[t.type].enableTotalsFunction(e)}function Fe(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 Be(e){return o(e,"outputExpression.qValueExpression.qExpr")||o(e,"outputExpression")}function He(e){Fe(e).forEach(function(e){return function(e){var n=Re(e);n&&(void 0!==n.outputExpression&&Be(n)!==e.qDef.qDef?delete e.qDef.base:!De.isValid(e)&&n.base&&(e.qDef.base=t()(!0,{},n.base)))}(e)})}function Ve(e){var t=je(e);Array.isArray(t)&&t.forEach(function(t){"object"===Te(t)&&(t.disabled||!Oe[t.type]&&Be(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)})}function $e(e){return e.base||e.qDef&&e.qDef.base}function We(e){var t=$e(e);return e.qLibraryId||t&&t.qLibraryId}function Ue(e){var t=e.measure,n=e.properties,r=e.layout;return!We(t)&&Ye({modifiers:je(t),properties:n,layout:r})}function Ye(e){var t=e.modifiers,n=e.properties,r=e.layout,i={};return Array.isArray(t)&&t.some(function(e){return!("object"!==Te(e)||e.disabled||!Oe[e.type])&&(void 0===i[e.type]&&(i[e.type]=Oe[e.type].isApplicable({properties:n,layout:r})),i[e.type])})}function Ke(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):I(t,n,r)}({model:r,oldProperties:t,newProperties:n}).then(function(){return i}):Promise.resolve(i)}function Ze(e){var t=e.modifiers,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some(function(e){return"object"===Te(e)&&!e.disabled&&Oe[e.type]&&Oe[e.type].needDimension({modifier:e,properties:n,layout:r})})}function Qe(e){var t=Fe(e),n=[],r=[],i=!1;return t.forEach(function(t){var r=je(t);if(Ye({modifiers:r,properties:e})){var o=We(t);o&&n.push(o),i=i||Ze({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)?(Ae[t.id].masterItemSubscriber=Ae[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 c(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 u(e,n){return t.app[n](e).then(function(t){r[e]={listener:t.layoutSubscribe(c),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(u(e,"getMeasure"))}),Object.keys(a).forEach(function(e){a[e]&&!r[e]&&s.push(u(e,"getDimension"))})),Promise.all(s)},unsubscribe:function(){Object.keys(r).forEach(function(e){r[e].listener.dispose()}),r={}}}}({model:t,callback:function(e){return _e({model:t,masterItem:e}).then(function(){return t.app.clearUndoBuffer()})}}),Ae[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:()=>He});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 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}function u(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 d={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:u};var f=n(8),h=n.n(f);const p=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&&d.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]})},v=function(e){var t=e.exportFormat,n=e.properties;n.qLayoutExclude||(n.qLayoutExclude={}),n.qLayoutExclude.disabled&&(Object.keys(n.qLayoutExclude.disabled).forEach(function(e){t.properties.hasOwnProperty(e)||(t.properties[e]=n.qLayoutExclude.disabled[e])}),delete n.qLayoutExclude.disabled),n.qLayoutExclude.changed&&(function(e){Object.keys(e.qLayoutExclude.changed).forEach(function(t){e.qLayoutExclude.changed[t].to===o.getValue(e,t)&&o.setValue(e,t,e.qLayoutExclude.changed[t].from)})}(n),delete n.qLayoutExclude.changed),n.qLayoutExclude.quarantine&&!o.isEmpty(n.qLayoutExclude.quarantine)||delete n.qLayoutExclude},b=function(e){e.forEach(function(e){h().cleanUpMeasure(e),e.qDef.modifiers&&(e.store={modifiers:e.qDef.modifiers},delete e.qDef.modifiers)})};function x(e,t,n){var r,i,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=o.getValue(e,t);if(!o.isAtomicValue(s))try{if((i=(i=(r=JSON.stringify(s)).match(/:\{/g))?i.length:0)>2&&!a)return;s=JSON.parse(r)}catch(e){return}o.getValue(e,"qLayoutExclude.quarantine")||o.setValue(e,"qLayoutExclude.quarantine",{});var l=o.getValue(e,"qLayoutExclude.quarantine");l[n]||(l[n]={}),l[n][t]=s}var S=n(909),w=n.n(S);function M(e,t){var n=w()(!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 k(e,t){return w()(!0,{},t,e)}function C(e,t,n){return"function"==typeof e?e(t):Number.isNaN(+e)?n:e}var q=Math.pow(2,53)-1;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 D(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 T=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},O=function(e,t,n){t.hasOwnProperty(e)&&(n[e]=t[e])},N=function(e,t,n,r){t.hasOwnProperty(e)?n[e]=t[e]:n[e]=r},A=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}}},_=function(){return{qDef:{autoSort:!0,cId:"",numFormatFromTemplate:!0},qLibraryId:"",qTrendLines:[]}},I=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=M(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 c=M(s.excludedDimensions[t],a);o.qDimensions.length<i?o.qDimensions.push(c):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(c)}},L=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=k(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 c=k(s.excludedMeasures[t],a);o.qMeasures.length<i?o.qMeasures.push(c):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(c)}},P=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=C(a.max,i.dimensions.length,q),l=C(a.min,i.dimensions.length,0);return{maxDimensions:C(o.max,s,q),minDimensions:C(o.min,l,0),maxMeasures:s,minMeasures:l}},R=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?(d.indexAdded(n.qInterColumnSortOrder,o),++o):(--o,d.indexRemoved(n.qInterColumnSortOrder,o))},z=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=w()(!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=w()(!0,{},n,i)).components&&(i.components=[]),i},F=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=[]))},B=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 E(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 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}}(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)})}},H=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 D(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 D(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?D(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();a.qMeasures=[],s.forEach(function(e){a.qMeasures.push(e),r.measures.added(e,n)})}},V=function(e){var t=e.measures,n=e.modifierTypes;t&&n&&h().isSupportedModifiers(n)&&t.forEach(function(e){e.store&&e.store.modifiers&&(e.qDef.modifiers=e.store.modifiers),delete e.store})};function $(e,t){var n=o.getValue(e,"qLayoutExclude.quarantine",{})[t];return!!n&&(Object.keys(n).forEach(function(t){o.setValue(e,t,n[t])}),delete e.qLayoutExclude.quarantine[t],!0)}const W={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,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=[]),p({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),v({exportFormat:i,properties:a}),r||b(i.properties.qHyperCubeDef.qMeasures),Array.isArray(i.properties.filters)&&(x(i.properties,"filters","storedFilters",!0),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,c=e.hypercubePath,u=e.extension,d=e.supportedFilters,f=void 0===d||d,h=e.isHCModifierSupported,p=void 0===h||h,m={qChildren:[]},g=z({exportFormat:t,initialProperties:r,hypercubePath:c}),y=o.getValue(r,c||"").qHyperCubeDef,v=o.getValue(g,c||"").qHyperCubeDef,b=P({exportFormat:t,dataDefinition:a}),x=b.maxDimensions,S=b.minDimensions,w=b.maxMeasures,M=b.minMeasures,k=l.defaultDimension,C=void 0===k?A():k,q=l.defaultMeasure,E=void 0===q?_():q;v.qDimensions.length=0,v.qMeasures.length=0,F({exportFormat:t,maxDimensions:x,minDimensions:S,maxMeasures:w,minMeasures:M})&&j({exportFormat:t,maxDimensions:x,minDimensions:S,maxMeasures:w,minMeasures:M,newHyperCubeDef:v}),I({exportFormat:t,maxDimensions:x,minDimensions:S,newHyperCubeDef:v,defaultDimension:C}),L({exportFormat:t,maxMeasures:w,minMeasures:M,newHyperCubeDef:v,defaultMeasure:E}),B({newProperties:g,dataDefinition:a,hypercubePath:c}),H({newProperties:g,dataDefinition:a,hypercubePath:c}),R({exportFormat:t,newHyperCubeDef:v}),O("qMaxStackedCells",y,v),O("qNoOfLeftDims",y,v),N("qInitialDataFetch",y,v,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),N("qMode",y,v,"S"),N("qReductionMode",y,v,"N"),N("qSortbyYValue",y,v),N("qIndentMode",y,v),N("qShowTotalsAbove",y,v),T(g,t,r),m.qProperty=g;var D=o.getValue(u||{},"support.modifiers");return V({measures:v.qMeasures,modifierTypes:D}),f&&$(m.qProperty,"storedFilters"),"S"===v.qMode&&p&&$(m.qProperty,"dynamicScript"),m}};var U={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function Y(e,t,n,r){t=t||[];var i=u(e,r,n),o=u(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}const G={create:function(e,t){if(!e||!U[e])throw new Error("Attribute Expressions Util: ID required");var n={};return t&&Object.keys(t).forEach(function(e){n[e]=t[e]}),n.id=e,n.qAttribute=!0,n},moveByIdFromGroup:function(e,t,n,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(Y(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"}},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}}},Z={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 Q={scatterplot:Z,"sn-scatter-plot":Z,piechart:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return 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=d.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 c=n?o.getValue(t,"color.byDimDef"):o.getValue(t,"color.byMeasureDef"),u=o.getValue(t,"color.formatting.qNumFormat"),f=o.getValue(t,"color.formatting.isCustomFormatted");if(c){var h=G.create(G.IDMAP.COLOR_BY_ALTERNATIVE);switch(c.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:h,label:s,item:c,isDimension:n,qNumFormat:u,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=d.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:h,measures:a,item:c,isDimension:n,qNumFormat:u,isCustomFormatted:f})}n?(h.qSortBy={qSortByAscii:1},l.qAttributeDimensions.push(h)):l.qAttributeExpressions.push(h)}}}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:h().measureBase.getLibraryId(e)}(n,t),i?(s.type="measure",s.name=i,s.id=i,o=function(e,t){return h().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=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:s,key: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)}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=d.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)},ce=function(e,t){var n={primary:!0};if(e){var r=(Q[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},ue=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))},de=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=d.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})},he=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},pe=function(e){var t=o.getValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",[]),n=o.getValue(e,"color.colorExpression","");t.splice(0,0,{qExpression:n,id:"colorByExpression"}),o.setValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",t)},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=W.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,c=l.COLOR_BY_ALTERNATIVE,u=l.COLOR_BY_EXPRESSION;return G.moveByIdFromGroup(a,[],"qAttributeDimensions",c),G.moveByIdFromGroup(a,[],"qAttributeExpressions",c),G.moveByIdFromGroup(s,[],"qAttributeExpressions",u),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,c=e.isHCModifierSupported,u=W.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:i,hypercubePath:a,extension:s,supportedFilters:l,isHCModifierSupported:c}),d=u.qProperty,f=o.getValue(d,"visualization"),h=o.getValue(d,"qHyperCubeDef.qDimensions",[]),p=o.getValue(d,"color.mode",""),m=o.getValue(d,"color.auto",""),g=ce(d,f),y=ue({canColorBy:g,autoColor:m,colorMode:p,dimensions:h});return g[p]?he({shouldUpdateColorBy:y,properties:d})&&pe(d):me(d),y&&de(d,"qHyperCubeDef."),ge(d)&&le(d,"color.persistent",!0),fe(h),u}};var ve=["bar","marker","line"];const be=function(e){var t=e.initialProperties,n=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?$(n,"unsupportedAutoMinMax")||w()(n.measureAxis,t.measureAxis):$(n,"supportedAutoMinMax")||w()(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}}),ve.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]&&w()(s,n.properties.measureAxes[t[0].axis])):w()(s,n.properties.measureAxes[0])}},Se=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}}},we={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,c=e.isHCModifierSupported,u=ye.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:i,hypercubePath:o,extension:s,supportedFilters:l,isHCModifierSupported:c}),d=u.qProperty;return be({initialProperties:n,properties:d}),xe({exportFormat:t,initialProperties:n,properties:d,measureType:a}),Se(d.qHyperCubeDef),d.qHyperCubeDef.qColumnOrder=[],d.qHyperCubeDef.columnOrder=[],u}};function Me(e,t,n){return"qLayoutExclude.quarantine.".concat(e,".").concat(t,".").concat(n)}function ke(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 c=Me(n,r,l);o.setValue(t,c,s),o.setValue(i,a,void 0)}}({properties:t,quarantineName:r,arrayName:i,item:e,itemPath:a})})}function Ce(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=Me(n,r,s),c=o.getValue(t,l);void 0!==c&&(o.setValue(i,a,c),o.setValue(t,l,void 0))}}({properties:t,quarantineName:r,arrayName:i,item:e,itemPath:a})})}var qe="qHyperCubeDef.qMeasures",Ee="conditionalColoring",De="measures",Te="qDef.conditionalColoring";const Oe={quarantine:function(e){ke({properties:e,arrayPath:qe,quarantineName:Ee,arrayName:De,itemPath:Te})},unquarantine:function(e){Ce({properties:e,arrayPath:qe,itemPath:Te,arrayName:De,quarantineName:Ee})}};var Ne="qHyperCubeDef.qMeasures",Ae="measures",_e="qHyperCubeDef.qDimensions",Ie="dimensions",Le="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",Pe="alternativeMeasures",Re="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",ze="alternativeDimensions",Fe="qCalcCondition",je="conditionalShowHide";const Be={quarantine:function(e){ke({properties:e,arrayPath:Ne,quarantineName:je,arrayName:Ae,itemPath:Fe}),ke({properties:e,arrayPath:_e,quarantineName:je,arrayName:Ie,itemPath:Fe})},unquarantine:function(e){Ce({properties:e,arrayPath:Ne,quarantineName:je,arrayName:Ae,itemPath:Fe}),Ce({properties:e,arrayPath:_e,quarantineName:je,arrayName:Ie,itemPath:Fe})},quarantineAlternative:function(e){ke({properties:e,arrayPath:Le,quarantineName:je,arrayName:Pe,itemPath:Fe}),ke({properties:e,arrayPath:Re,quarantineName:je,arrayName:ze,itemPath:Fe})},unquarantineAlternative:function(e){Ce({properties:e,arrayPath:Le,quarantineName:je,arrayName:Pe,itemPath:Fe}),Ce({properties:e,arrayPath:Re,quarantineName:je,arrayName:ze,itemPath:Fe})}},He={hypercube:W,colorChart:ye,axisChart:we,quarantineProperty:x,unquarantineProperty:$,quarantineArrayProp:ke,unquarantineArrayProp:Ce,conditionalColoring:Oe,conditionalShow:Be}})(),r.default})()}(fK)),fK.exports),pK=ug(hK);function mK(e,t){if("custom"===e.dimensionAxis.axisDisplayMode){const n=t.layout.qHyperCube.qMeasureInfo.filter(e=>e.qError?.qErrorCode!==KV).length,r=t.layout.qHyperCube.qDimensionInfo.filter(e=>e.qError?.qErrorCode!==KV).length,i=e.dimensionAxis.maxVisibleItems;i<1?e.dimensionAxis.maxVisibleItems=10:i>1e4/(r+n)&&(e.dimensionAxis.maxVisibleItems=Math.min(i,Math.floor(1e4/(r+n))))}}const gK=[{translation:"Common.None",value:"none"},{translation:"Common.Small",value:"small"},{translation:"Common.Medium",value:"medium"},{translation:"Common.Large",value:"large"}],yK=(e,t,n)=>{const r=`${e}.fontFamily`,i=`${e}.fontSize`;return{fontFamilyItem:{component:"dropdown",ref:r,options:()=>t.getOptions(r),defaultValue:()=>t.getDefaultValue(r)},fontWrapperItem:{component:"inline-wrapper",items:{fontSizeItem:{component:"dropdown",ref:i,options:()=>t.getOptions(i),defaultValue:()=>t.getDefaultValue(i)},fontColorItem:{component:"color-picker",width:!1,ref:`${e}.color`,defaultValue:()=>({color:n.getStyle("object.barChart",e,"color")})}}}}};function vK(e,t,n){const r=function(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,c={};l.forEach(function(e){for(var r=e.split("."),i=c,a=0;a<r.length;a++){var l=r[a];a===r.length-1?i[l]=Cv({theme:t,translator:n,id:s,path:e,flags:o}):void 0===i[l]&&(i[l]={}),i=i[l]}});var u=function(e){for(var t=e.split("."),n=c,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 c.getDefaultValue=function(e){return u(e).getDefaultValue()},c.getOptions=function(e){return u(e).getOptions()},c}({theme:e,translator:n,config:{id:"barChart",paths:["axis.title","axis.label.name","label.value","legend.title","legend.label"]},flags:t});return{component:"styling-panel",show:!0,chartType:"barchart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.BarChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,useBackground:t?.isEnabled("SENSECLIENT_IM_2428_BARCHART_BG"),items:{outlineSection:{translation:"properties.Outline",component:"panel-section",items:{wrapperItem:{component:"items",ref:"components",key:"bar",items:{barStroke:{component:"inline-wrapper",items:{strokeWidth:{ref:"style.strokeWidth",width:!0,component:"dropdown",options:Object.keys(gK).map(e=>gK[e]),defaultValue:"none",schemaIgnore:!0},strokeColor:{ref:"style.strokeColor",defaultValue:{color:"#205891"},schemaIgnore:!0,width:"auto",component:"color-picker"}}}}}}},widthSection:{translation:"LayerStyleEditor.style.barWidth",component:"panel-section",show:(e,n)=>!GD.continuous({layout:n.layout})||t?.isEnabled("TLV_1060_CONTINUOUS_AXIS_BAR_WIDTH"),items:{barWidth:{component:"items",ref:"components",key:"bar",items:{width:{ref:"style.width",component:"slider",min:.01,max:1,step:.01,defaultValue(e,t,n){const{properties:r}=n,{barGrouping:i,qHyperCubeDef:o}=r,a=o.qMeasures.length,s=o.qDimensions.length,l="grouped"===i.grouping&&s>0&&a+s>2;return GD.continuous({properties:r})?1:l?.9:.7},schemaIgnore:!0}}}}},axisTitleSection:{translation:"properties.axis.title",component:"panel-section",items:{axisTitleItems:{component:"items",ref:"components",key:"axis",items:yK("axis.title",r,e)}}},axisLabelSection:{translation:"properties.axis.label",component:"panel-section",items:{axisLabelItems:{component:"items",ref:"components",key:"axis",items:yK("axis.label.name",r,e)}}},labelSection:t?.isEnabled("CLIENT_IM_3050")?{translation:"properties.dataPoints.labelmode",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"label",items:{...yK("label.value",r,e),contrastColor:{component:"checkbox",type:"boolean",ref:"label.value.useContrastColor",translation:"properties.dataPoints.valuelabel.contrast",defaultValue:!0}}}}}:void 0,legendTitleSection:t?.isEnabled("CLIENT_IM_3051")?{translation:"properties.legend.title",component:"panel-section",items:{legendTitleSection:{component:"items",ref:"components",key:"legend",items:yK("legend.title",r,e)}}}:void 0,legendLabelSection:t?.isEnabled("CLIENT_IM_3051")?{translation:"properties.legend.label",component:"panel-section",items:{legendLabelSection:{component:"items",ref:"components",key:"legend",items:yK("legend.label",r,e)}}}:void 0}}}function bK(e){return{classification:{section:"styling",tags:["simple"],exclusive:!0},component:"items",show:!0,chartType:"barchart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.BarChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,useBackground:e?.isEnabled("SENSECLIENT_IM_2428_BARCHART_BG"),items:{outlineSection:{translation:"LayerStyleEditor.style.strokeWidth",component:"items",items:{wrapperItem:{component:"items",ref:"components",key:"bar",items:{barStroke:{component:"inline-wrapper",items:{strokeWidth:{ref:"style.strokeWidth",width:!0,component:"dropdown",translation:"LayerStyleEditor.style.strokeWidth",options:Object.keys(gK).map(e=>gK[e]),schemaIgnore:!0,defaultValue:gK[0].value},strokeColor:{ref:"style.strokeColor",schemaIgnore:!0,defaultValue:{color:"#205891",index:-1},width:"auto",component:"color-picker"}}}}}}},widthSection:{translation:"LayerStyleEditor.style.barWidth",component:"items",show:(e,t)=>!GD.continuous({layout:t.layout}),items:{barWidth:{component:"items",ref:"components",key:"bar",items:{width:{ref:"style.width",translation:"LayerStyleEditor.style.barWidth",component:"slider",min:.01,max:1,step:.01,schemaIgnore:!0,defaultValue:(e,t,n)=>((e,t)=>{const n=t.qHyperCube?.qMeasureInfo?.filter(e=>e.qError?.qErrorCode!==KV).length,r=t.qHyperCube?.qDimensionInfo?.filter(e=>e.qError?.qErrorCode!==KV).length,i="grouped"===e.barGrouping?.grouping&&r>0&&n+r>2;return GD.continuous({layout:t})?1:i?.9:.7})(n.properties,n.layout)}}}}},optionsSection:{translation:"LayerStyleEditor.label.Options",component:"items",items:{wrapperItem:{component:"items",items:{optionsHeader:{component:"header",translation:"LayerStyleEditor.label.Options"},scrollbar:{ref:"scrollbar",translation:"properties.scrollbar",component:"dropdown",type:"string",options:Object.keys(oA.OPTIONS).map(e=>oA.OPTIONS[e]),schemaIgnore:!0,defaultValue:oA.DEFAULT.value},scrollAlignment:{ref:"scrollStartPos",translation:"properties.ScrollAlignment",component:"dropdown",schemaIgnore:!0,defaultValue:0,options:[{value:0,translation:"properties.ScrollAlignStart"},{value:1,translation:"properties.ScrollAlignEnd"}]},gridLines:{type:"items",items:{showGridLines:{ref:"gridLine.auto",type:"boolean",translation:"properties.gridLine.spacing",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},gridSpacing:{ref:"gridLine.spacing",type:"number",component:"dropdown",defaultValue:2,options:[{value:0,translation:"properties.gridLine.noLines"},{value:1,translation:"properties.gridLine.wide"},{value:2,translation:"properties.gridLine.medium"},{value:3,translation:"properties.gridLine.narrow"}],show:e=>e.gridLine&&!e.gridLine.auto}}}}}}}}}}function xK(e,t,n,r=!1){return r?bK(t):vK(e,t,n)}const SK=e=>e.qError?.qErrorCode!==KV,wK=(e,t)=>e?.qHyperCube[t].filter(e=>SK(e)),MK=e=>{if(!e)return!1;const t=bg(!0,{},e);return t.qHyperCube.qMeasureInfo=wK(e,"qMeasureInfo"),t.qHyperCube.qDimensionInfo=wK(e,"qDimensionInfo"),t&&!GD.continuous({layout:t})&&GD.stacked(t)},kK=({translator:e,flags:t,anything:n})=>{const r=(i=t?.isEnabled("TLV_1060_CONTINUOUS_AXIS_BAR_WIDTH"),i?{type:"items",show:ZN,items:{unit:{translation:XN,type:"string",component:"dropdown",ref:"qHyperCubeDef.qDimensions.0.qDef.unit",show:ZN,globalChange:tA,options:[{value:nA.AUTO,translation:JN.AUTO},{value:nA.SECONDS,translation:JN.SECONDS},{value:nA.MINUTES,translation:JN.MINUTES},{value:nA.HOURS,translation:JN.HOURS},{value:nA.DAYS,translation:JN.DAYS},{value:nA.WEEKS,translation:JN.WEEKS},{value:nA.MONTHS,translation:JN.MONTHS},{value:nA.YEARS,translation:JN.YEARS},{value:nA.NUMBER,translation:JN.NUMBER},{value:nA.NONE,translation:JN.NONE}],undefinedValue:nA.NONE,defaultValue:nA.AUTO,schemaIgnore:!0},unitMultiplier:{translation:JN.TITLE,type:"number",defaultValue:rA,schemaIgnore:!0,show:QN,ref:"qHyperCubeDef.qDimensions.0.qDef.unitMultiplier",min:Number.EPSILON,rollbackInvalid:!0}}}:{show:!1,globalChange:e=>{(e?.qHyperCubeDef?.qDimensions||[]).forEach(e=>{delete e.qDef.unit,delete e.qDef.unitMultiplier})}});var i;const o=n?.sense?.isUnsupportedFeature?.("continuousData"),a={items:{labels:{items:{header:{show:(e,t,n)=>wK(n.layout,"qMeasureInfo").length},pointLabels:{component:"checkbox",ref:"dataPoint.showLabels",type:"boolean",translation:"Simple.Label.Value",show:(e,t,n)=>!MK(t.layout)&&wK(n.layout,"qMeasureInfo").length},segmentLabels:{component:"checkbox",ref:"dataPoint.showSegmentLabels",type:"boolean",translation:"properties.dataPoints.segmentLabelMode",defaultValue:!1,show:(e,t)=>MK(t.layout),convertFunctions:{get:(e,t,n,r)=>r.dataPoint.showLabels&&r.dataPoint.showSegmentLabels,set(e,t,n,r,i){i.dataPoint.showSegmentLabels=e,i.dataPoint.showLabels=i.dataPoint.showSegmentLabels||i.dataPoint.showTotalLabels}}},totalLabels:{component:"checkbox",ref:"dataPoint.showTotalLabels",type:"boolean",translation:"properties.dataPoints.totalLabelMode",defaultValue:!0,show:(e,t)=>MK(t.layout),convertFunctions:{get:(e,t,n,r)=>r.dataPoint.showLabels&&r.dataPoint.showTotalLabels,set(e,t,n,r,i){i.dataPoint.showTotalLabels=e,i.dataPoint.showLabels=i.dataPoint.showSegmentLabels||i.dataPoint.showTotalLabels}}},dimensionTitle:{component:"checkbox",ref:"dimensionAxis.show",type:"string",translation:"Simple.Label.Dimension.Hide",defaultValue:"all",show:(e,t,n)=>wK(n.layout,"qDimensionInfo").length&&wK(n.layout,"qMeasureInfo").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.Measure.Hide",defaultValue:"all",show:(e,t,n)=>wK(n.layout,"qMeasureInfo").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"}}}}}}},s=n?.sense?.theme,l={uses:"settings",items:{simpleStyling:xK(s,t,e,!0),simpleLabels:a,general:{items:{showDisclaimer:{translation:"properties.showDisclaimer",type:"boolean",ref:"showDisclaimer",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Show"},{value:!1,translation:"properties.hide"}]}}},presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:{boxStyling:xK(s,t,e,!1),grouping:{ref:"barGrouping.grouping",type:"string",component:"item-selection-list",defaultValue:"grouped",horizontal:!0,items:(e,t)=>{const n=[{icon:"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.grouped",value:"grouped"},{icon:"stacked",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.stacked",value:"stacked"}];return wW({layout:t.layout})&&n.push({icon:"bars_butterfly",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.butterfly",value:"butterfly"}),n},show(e,t){const n=wK(t.layout,"qMeasureInfo").length,r=wK(t.layout,"qDimensionInfo").length;return r>0&&n+r>2},globalChange(e,t,n){"butterfly"!==e.barGrouping.grouping||wW({layout:n.layout})||(e.barGrouping.grouping="stacked"),"butterfly"===e.barGrouping.grouping&&e.measureAxis&&"max"!==e.measureAxis.minMax&&!e.measureAxis.autoMinMax&&(e.measureAxis.minMax="max")},change(e,t,n){"butterfly"!==e.barGrouping.grouping||wW({layout:n.layout})||(e.barGrouping.grouping="stacked"),wK(t.layout,"qDimensionInfo").length>1&&"stacked"===e.barGrouping.grouping?(e.qHyperCubeDef.qMode="K",e.qHyperCubeDef.qAlwaysFullyExpanded=!0):e.qHyperCubeDef.qMode="S"},readOnly:(e,t,n)=>GD.continuous({layout:n.layout}),convertFunctions:{get(e,t,n){const r="stacked";return"butterfly"===e(t.type)?wW({layout:n.layout})?e(t.type):r:GD.continuous({layout:n.layout})?r:e(t.type)},set(e,t,n){const r=QD(n.type,n);t(n.type,e,r)}}},orientation:{ref:"orientation",type:"string",component:"item-selection-list",defaultValue:"vertical",horizontal:!0,items:[{component:"icon-item",icon:"bars_vertical",labelPlacement:"bottom",translation:"properties.orientation.vertical",value:"vertical"},{icon:"bars_horizontal",component:"icon-item",labelPlacement:"bottom",translation:"Common.Horizontal",value:"horizontal"}],readOnly:(e,t,n)=>GD.continuous({layout:n.layout}),convertFunctions:(c="vertical",{get:(e,t,n)=>GD.continuous({layout:n.layout})?c:e(t.type),set(e,t,n){const r=QD(n.type,n);t(n.type,e,r)}})},scroll:{type:"items",items:{scrollbar:{type:"string",component:"dropdown",ref:"scrollbar",translation:"properties.scrollbar",options:Object.keys(oA.OPTIONS).map(e=>oA.OPTIONS[e]),defaultValue:oA.DEFAULT.value},scrollStartPos:{ref:"scrollStartPos",type:"number",translation:"properties.ScrollAlignment",component:"dropdown",defaultValue:0,options:[{value:0,translation:"properties.ScrollAlignStart"},{value:1,translation:"properties.ScrollAlignEnd"}],show:(e,t,n)=>!GD.continuous({layout:n.layout})}}},gridLines:{type:"items",snapshot:{tid:"property-gridLines"},items:{showGridLines:{ref:"gridLine.auto",type:"boolean",translation:"properties.gridLine.spacing",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},gridSpacing:{ref:"gridLine.spacing",type:"number",component:"dropdown",defaultValue:2,options:[{value:0,translation:"properties.gridLine.noLines"},{value:1,translation:"properties.gridLine.wide"},{value:2,translation:"properties.gridLine.medium"},{value:3,translation:"properties.gridLine.narrow"}],show:e=>e.gridLine&&!e.gridLine.auto}}},valueLabels:{type:"items",snapshot:{tid:"property-valueLabels"},items:{showLabels:{ref:"dataPoint.showLabels",type:"boolean",translation:"properties.dataPoints.labelmode",component:"switch",defaultValue:!1,options:[{value:!0,label:(t,n)=>((e,t,n)=>n&&n.get(MK(t.layout)?"properties.on":"Common.Auto"))(0,n,e)},{value:!1,translation:"properties.off"}]},showSegmentLabels:{ref:"dataPoint.showSegmentLabels",type:"boolean",translation:"properties.dataPoints.segmentLabelMode",component:"switch",defaultValue:!1,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],show:(e,t,n)=>e.dataPoint.showLabels&&MK(n.layout)},showTotalLabels:{ref:"dataPoint.showTotalLabels",type:"boolean",translation:"properties.dataPoints.totalLabelMode",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],show:(e,t,n)=>e.dataPoint.showLabels&&MK(n.layout)}}}}},colorsAndLegend:{uses:"colorsAndLegend",items:{colors:{items:{attributeExpression:TN}},legend:{items:{show:{snapshot:{tid:"property-legend"}}}}}},dimensionAxis:{uses:"axis.dimensionAxis",items:{axisDisplaySettings:{components:"items",type:"items",show:(e,t,n)=>!GD.continuous({layout:n.layout}),items:{axisDisplayMode:{ref:"dimensionAxis.axisDisplayMode",type:"string",translation:"properties.axis.displaymode",component:"dropdown",defaultValue:"auto",options:[{value:"auto",translation:"properties.axis.displaymode.auto"},{value:"max",translation:"properties.axis.displaymode.max"},{value:"custom",translation:"properties.axis.displaymode.custom"}]},maxVisibleItems:{ref:"dimensionAxis.maxVisibleItems",translation:"properties.axis.maxvisiblevalues",expression:"optional",type:"integer",invalid(e,t,n){const r=wK(n.layout,"qMeasureInfo").length,i=wK(n.layout,"qDimensionInfo").length,o=e.dimensionAxis.maxVisibleItems;return o<0||o>1e4/(i+r)},globalChange:mK,defaultValue:10,show:e=>"custom"===e.dimensionAxis.axisDisplayMode},hint:{component:"text",translation:"properties.axis.maxvisiblevalues.hint",style:"hint",show:e=>["custom","max"].indexOf(e.dimensionAxis.axisDisplayMode)>-1}}},continuousGroup:{items:{miniChart:null,unit:r},show:!o}}},measureAxis:{uses:"axis.flippableMeasureAxis"},tooltip:{uses:"tooltip"}}};var c;return t?.isEnabled("SENSECLIENT_LAYERED_LABELS")&&(l.items.dimensionAxis.items.othersGroup={items:{label:{options:[{value:"auto",translation:"Common.Auto"},{value:"horizontal",translation:"Common.Horizontal"},{value:"tilted",translation:"properties.labels.tilted"},{value:"layered",translation:"properties.labels.layered"}]}}}),l.items.measureAxis={uses:"axis.flippableMeasureAxis",items:{minMax:{items:{minMax:{show:e=>"butterfly"!==e.barGrouping.grouping&&e.measureAxis&&!e.measureAxis.autoMinMax},min:{show:e=>"butterfly"!==e.barGrouping.grouping&&e.measureAxis&&["min","minMax"].includes(e.measureAxis.minMax)&&!e.measureAxis.autoMinMax},max:{invalid:e=>e.measureAxis&&"minMax"===e.measureAxis.minMax?e.measureAxis.min>=e.measureAxis.max:!(!e.measureAxis||"max"!==e.measureAxis.minMax||"butterfly"!==e.barGrouping.grouping)&&e.measureAxis.max<=0}}}}},l},CK={uses:"sortingWithDisclaimer",items:{defaultSorting:{items:{dimensions:{locked:(e,t,n)=>1===n.getMeasures().length&&2===n.getDimensions().length&&0===e,items:{autoSort:{change(e){cO(e)}}}},interColumnSorting:{reset:(e,t)=>{const{qDimensions:n,qMeasures:r,qInterColumnSortOrder:i}=e.qHyperCubeDef,{qCardinal:o}=t.layout.qHyperCube.qDimensionInfo[0],a=i.length,s=[...Array(a).keys()];1===n.length&&r.length>=1&&o>10&&([s[0],s[1]]=[s[1],s[0]]),e.qHyperCubeDef.qInterColumnSortOrder=s}}}}}},qK=({translator:e,flags:t})=>({type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}},refLines:{uses:"reflines"},dimRefLines:{uses:"dimReflines"},plugins:t?.isEnabled("CLIENT_TLV_694_PLUGINS_UI")&&t?.isEnabled("TLV_1274_PLUGINS_BAR_CHART")?WN({translator:e,pluginOptions:[{value:"point",translation:e.get("Visualizations.Descriptions.Point")},{value:"line",translation:e.get("Visualizations.Descriptions.Line")}]}):void 0}}),EK=({translator:e,flags:t,anything:n})=>({uses:"data",items:{dimensions:{items:{nullSuppression:{show(e,t,r){if(n?.sense?.isUnsupportedFeature?.("includeZeroValues"))return!1;const i=((e,t)=>{const n=t.layout?.qHyperCube?.qDimensionInfo?.findIndex(e=>SK(e));return t.properties?.qHyperCubeDef?.qDimensions?.[n]===e})(e,t),o=GD.continuous({layout:r.layout});return!(i&&o)}},visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Chart.Dimensions.VisibilityCondition",defaultValue:{qv:""},tid:"visibilityCondition",isExpression:e=>"string"==typeof e&&e.trim().length>0},unit:{type:"string",defaultValue:"auto",ref:"qDef.unit",show:!1}}},measures:{items:{visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Chart.Measures.VisibilityCondition",defaultValue:{qv:""},tid:"visibilityCondition",isExpression:e=>"string"==typeof e&&e.trim().length>0},trendLines:n?.sense?.isUnsupportedFeature?.("trendlines")?void 0:hW({translator:e,allowStackedByDimension:t&&t.isEnabled("TRENDLINES_STACKED_DIM")})}}}});function DK({translator:e,flags:t,anything:n}){return{type:"items",component:"accordion",items:{data:EK({translator:e,flags:t,anything:n}),sorting:CK,addons:qK({translator:e,flags:t}),settings:kK({translator:e,flags:t,anything:n})}}}const TK=e=>e.qError?.qErrorCode!==KV;function OK({flags:e}){return{type:"items",component:"accordion",items:{data:{uses:"data"},sort:{uses:"sortWithDisclaimer",items:{sort:{items:{dimensions:{locked(e,t,n){const r=n.qHyperCube.qMeasureInfo.length,i=n.qHyperCube.qDimensionInfo.filter(e=>TK(e)).length;return 1===r&&2===i&&0===e}}}}}},presentation:{uses:"presentation",items:{showLabels:{ref:"dataPoint.showLabels",type:"boolean",translation:"properties.dataPoints.labelmode",component:"switch",options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]},grouping:{ref:"barGrouping.grouping",type:"string",component:"item-selection-list",horizontal:!0,items:(e,t)=>{const n=[{icon:"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.grouped",value:"grouped"},{icon:"stacked",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.stacked",value:"stacked"}];return wW({layout:t?.layout})&&n.push({icon:"bars_butterfly",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.butterfly",value:"butterfly"}),n},show(e,t){const n=t.qHyperCube.qMeasureInfo.filter(e=>TK(e)).length,r=t.qHyperCube.qDimensionInfo.filter(e=>TK(e)).length;return n+r>2&&!GD.continuous({layout:t})&&(i=t,!(i?.qHyperCube?.qDimensionInfo?.filter(e=>TK(e)).length>1&&i?.qHyperCube?.isHCEnabled));var i},change(e){e.qHyperCubeDef.qDimensions.length>1&&"stacked"===e.barGrouping.grouping?(e.qHyperCubeDef.qMode="K",e.qHyperCubeDef.qAlwaysFullyExpanded=!0):e.qHyperCubeDef.qMode="S"}},orientation:{ref:"orientation",type:"string",component:"item-selection-list",horizontal:!0,items:[{component:"icon-item",icon:"bars_vertical",labelPlacement:"bottom",translation:"properties.orientation.vertical",value:"vertical"},{icon:"bars_horizontal",component:"icon-item",labelPlacement:"bottom",translation:"Common.Horizontal",value:"horizontal"}],show:(e,t)=>!GD.continuous({layout:t})}}},color:{uses:"color"}}}}function NK(e){const t={},n=Cx(e,"components"),r=Cx(e,"dimensionAxis.axisDisplayMode"),i=Cx(e,"dimensionAxis.maxVisibleItems"),o=n?n.filter(e=>"bar"===e.key)[0]:void 0,a=Cx(e,"tooltip");if(o&&o.style&&Object.keys(o.style).forEach(e=>{t[`chart_style_${e}`]=o.style[e]}),i&&(t.chart_dimaxis_maxVisibleItems=i),r&&(t.chart_dimaxis_axisDisplayMode=r),a){t.chart_tooltip_custom=!a.auto;const e=Cx(a,"chart.object.refId");!a.auto&&e&&(t.chart_tooltip_custom_mini_chart=e)}return t}const AK=e=>!!(e&&e.qHyperCube.qSize.qcy>0),_K={ACCUMULATIONS:"accumulation",MOVING_AVERAGE:"movingAverage",DIFFERENCE:"difference",NORMALIZATION:"normalization"};function IK(){const e=[];return Object.keys(_K).forEach(t=>{e.push(_K[t])}),e}function LK(e){return{definition:DK(e),softDefinition:OK(e),support:{snapshot:AK,export:AK,exportData:!0,sharing:AK,viewData:!0,effects:!0,modifiers:IK()},importProperties:(t,n,r,i)=>{const o={layout:{templateId:n.templateId}};r.mapProperties(o);const a={defaultDimension:r.getDefaultDimensionProperties(),defaultMeasure:r.getDefaultMeasureProperties()},s=pK.axisChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r$(e),defaultPropertyValues:a,hypercubePath:i,extension:r}),l=s.qProperty;return l.qHyperCubeDef.qDimensions.length>1&&"stacked"===l.barGrouping.grouping&&(l.qHyperCubeDef.qMode="K",l.qHyperCubeDef.qAlwaysFullyExpanded=!0),pK.conditionalShow.unquarantine(l),pK.conditionalShow.unquarantineAlternative(l),s},exportProperties:(e,t,n)=>{pK.conditionalShow.quarantine(e.qProperty),pK.conditionalShow.quarantineAlternative(e.qProperty);return pK.axisChart.exportProperties({propertyTree:e,hyperCubePath:t,viewDataMode:n})},migrate:{properties:e=>(e.qExtendsId||(function(e){e.qHyperCubeDef.qDimensions.forEach(cO),e.qHyperCubeDef.qLayoutExclude?.qHyperCubeDef?.qDimensions&&e.qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.forEach(cO)}(e),function({properties:e}){const{scrollbar:t,dimensionAxis:n,preferContinuousAxis:r,showMiniChartForContinuousAxis:i}=e;if(t||!1!==i)return;const{continuousAuto:o}=n;(o||!o&&r)&&(e.scrollbar=oA.OPTIONS.NONE.value)}({properties:e})),e)},extendMetrics:NK}}return function(t){const n=wV();return{qae:i$(t),ext:LK(t),component(){const r=a$({env:t}),{viewState:i,viewCache:o}=s$(),a=function({picasso:t}){const n=e.useElement(),r=e.useOptions(),[i,o]=e.useState();return e.useEffect(()=>{if(!t)return()=>{};n.style.overflow="hidden";const e=t({renderer:{prio:[r?.renderer||"canvas"]}}).chart({element:n,data:[],settings:{}});o(e);const{destroy:i}=e;return()=>{i()}},[r.renderer]),i}({picasso:n}),s=OW({picasso:n,chart:a,environment:r,viewState:i,viewCache:o}),l=uK({env:t,services:s});oK({picasso:n,chart:a,services:s,environment:r,viewState:i,viewCache:o,bootstrapped:l}),(({environment:t,services:n,chart:r,viewState:i,bootstrapped:o})=>{e.onTakeSnapshot(e=>{if(!t||!n||!o)return;const{layoutService:a,dockService:s,colorService:l,discrete:c,continuousDataModel:u,reducedDataModel:d}=n,{width:f,height:h}=s.meta.chart.size;if(e.snapshotData=e.snapshotData||{},e.snapshotData.content={size:{w:f,h:h}},a.meta.isSnapshot)return Promise.resolve();e.snapshotData.content.chartData={scrollOffset:i.get("scrollOffset"),zoom:i.get("zoom"),legendScrollOffset:XD(r,SW.COMPONENT.LEGEND_COLOR_CAT)};const{properties:p}=o,m=p?.qHyperCubeDef.qDimensions.some(e=>e.qCalcCondition?.qCond?.qv);return m&&(e.tooltip.auto=!0),a.meta.isDiscrete?(c.command.setSnapshotData(e),d.setSnapshotData(e)):u.setSnapshotData(e),l.getMain().getSnapshotData().then(t=>{e.snapshotData.content.chartData={...e.snapshotData.content.chartData,...t}}).catch(()=>{})}),e.useImperativeHandle(()=>({getViewState(){if(i&&r)return{scrollOffset:i.get("scrollOffset"),zoom:i.get("zoom"),legendScrollOffset:XD(r,SW.COMPONENT.LEGEND_COLOR_CAT)}}}),[i,r])})({environment:r,services:s,chart:a,viewState:i,bootstrapped:l})}}}});
|
|
109
|
+
var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof s?r:s,c=Object.create(l.prototype);return YB(c,"_invoke",function(n,r,i){var o,s,l,c=0,u=i||[],d=!1,f={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return o=t,s=0,l=e,f.n=n,a}};function h(n,r){for(s=n,l=r,t=0;!d&&c&&!i&&t<u.length;t++){var i,o=u[t],h=f.p,p=o[2];n>3?(i=p===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=h&&((i=n<2&&h<o[1])?(s=0,f.v=r,f.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,f.n=p,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,u,p){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&h(u,p),s=u,l=p;(t=s<2?e:l)||!d;){o||(s?s<3?(s>1&&(f.n=-1),h(s,l)):f.n=l:f.v=l);try{if(c=2,o){if(s||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=e}else if((t=(d=f.n<0)?l:n.call(r,f))!==a)break}catch(t){o=e,s=1,l=t}finally{c=1}}return{value:t,done:d}}}(n,i,o),!0),c}var a={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][r]?t(t([][r]())):(YB(t={},r,function(){return this}),t),d=c.prototype=s.prototype=Object.create(u);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,YB(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=c,YB(d,"constructor",c),YB(c,"constructor",l),l.displayName="GeneratorFunction",YB(c,i,"GeneratorFunction"),YB(d),YB(d,i,"Generator"),YB(d,r,function(){return this}),YB(d,"toString",function(){return"[object Generator]"}),(UB=function(){return{w:o,m:f}})()}function YB(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}YB=function(e,t,n,r){function o(t,n){YB(e,t,function(e){return this._invoke(t,n,e)})}t?i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(o("next",0),o("throw",1),o("return",2))},YB(e,t,n,r)}function KB(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,c=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||JB(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 GB(e){return function(e){if(Array.isArray(e))return jB(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||JB(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 XB(e){return XB="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},XB(e)}function JB(e,t){if(e){if("string"==typeof e)return jB(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?jB(e,t):void 0}}var ZB=function(e){var t=e.className,n=e.title,r=e.path,i=e.fillRule;return XA.createElement(mF,{className:t,viewBox:"0 0 16 16",fontSize:"small",role:"img",style:{height:12,width:12}},XA.createElement("path",{d:r}),n?XA.createElement("title",null,n):void 0,i?XA.createElement("use",{fillRule:i}):void 0)},QB={STYLE:{ELLIPSIS:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},FOCUS:{boxShadow:"inset 0 0 0 2px #177FE6"},ICONS:{COLOR:{PRIMARY:"rgba(89, 89, 89)",SECONDARY:"rgba(89, 89, 89, 0.8)",DISABLED:"rgba(89, 89, 89, 0.4)"}}}},eH={L:new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),R:new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞יִײַ-ﬨשׁ-ﭏ]"),AL:new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]")},tH=function(e){return eH.R.test(e)||eH.AL.test(e)};function nH(e){for(var t,n,r=e?e.length:0,i=0;i<r;i++){if(n=t=e[i],eH.L.test(n))return"ltr";if(tH(t))return"rtl"}return"ltr"}var rH,iH,oH=sF(Rj,{shouldForwardProp:function(e){return"direction"!==e&&"padding"!==e&&"styling"!==e}})(function(e){var t=e.direction,n=e.padding,r=e.styling,i=r.fontSize,o=r.fontFamily,a=r.color;return{fontWeight:"normal",lineHeight:"normal",fontSize:"".concat(i," !important"),fontFamily:"".concat(o," !important"),color:"".concat(a," !important"),height:"100%",minWidth:"0px",maxWidth:"640px",padding:n,"&:disabled":{color:a,opacity:1},"& .MuiButton-startIcon":{margin:"ltr"===t?"0 2px":void 0},"& .MuiButton-endIcon":{margin:"rtl"===t?"0 2px":void 0}}}),aH=sF(function(e){var t=e.className;return XA.createElement(ZB,{className:t,path:"M13,7 L8,7 L13,7 L13,4.98151367 C13,2.23029964 10.7614237,0 8,0 C5.23857625,0 3,2.23029964 3,4.98151367 L3,7 L3.75,7 L3,7 L4.5,7 L4.5,5.33193359 C4.5,3.21561511 5.54860291,1.5 8,1.5 C10.4513971,1.5 11.5,3.21561511 11.5,5.33193359 L11.5,7 L12.25,7 L3,7 C2.44771525,7 2,7.44771525 2,8 L2,15 C2,15.5522847 2.44771525,16 3,16 L13,16 C13.5522847,16 14,15.5522847 14,15 L14,8 C14,7.44771525 13.5522847,7 13,7 L3,7 L13,7 Z",fillRule:"evenodd"})})(function(){return{color:QB.STYLE.ICONS.COLOR.SECONDARY,marginTop:"1px"}}),sH=sF(function(e){var t=e.className;return XA.createElement(ZB,{className:t,path:"m8 9 4.5-4.5L14 6l-4.5 4.5L8 12 2 6l1.5-1.5L8 9Z"})})(function(){return{color:QB.STYLE.ICONS.COLOR.SECONDARY,marginTop:"1px","&.disabled":{color:QB.STYLE.ICONS.COLOR.DISABLED,opacity:.6}}}),lH=function(e){var t=e.isOpen,n=e.onClick,r=e.popoverId,i=e.source,o=i.styling,a=i.info.text,s=i.layout.direction,l=i.meta,c=l.allowed,u=l.hasAlternatives,d=l.hasCyclic,f=l.hasMultiple,h=l.index,p=l.isCyclic,m=l.isLocked,g=i.resources.translator,y=i.services.focus,v=i.settings.isDisabled,b=i.state.inSelections,x=!(!c.change||!u),S=!(!c.reload||!p),w=(x||S)&&!b&&!v(),M={pointerEvents:w?"auto":"none"},k=function(e){var t=e.allowed,n=e.canChange,r=e.canReload,i=e.direction,o=e.hasCyclic,a=e.isLocked,s={top:"8px",right:"6px",bottom:"8px",left:"6px"};if(!e.hasMultiple)return"".concat(s.top," ").concat(s.right," ").concat(s.bottom," ").concat(s.left);var l=o&&t.reload;return"ltr"===i&&(a?s.left="0px":r||!n&&l?s.left="4px":n||(s.left="2px"),n||r||(s.right="0px")),"rtl"===i&&(a?s.right="0px":r||!n&&l?s.right="4px":n||(s.right="2px"),n||r||(s.left="0px")),"".concat(s.top," ").concat(s.right," ").concat(s.bottom," ").concat(s.left)}({allowed:c,canChange:x,canReload:S,direction:s,hasCyclic:d,hasMultiple:f,isLocked:m}),C=HB(HB({},"rtl"===s?"endIcon":"startIcon",m&&XA.createElement(aH,{height:12})),"rtl"===s?"startIcon":"endIcon",(x||S)&&XA.createElement(sH,{className:"".concat(b||v()?"disabled":"")})),q=GA.useRef(),E=GA.useRef();GA.useEffect(function(){t||y.shouldFor(h)&&(q.current.focus(),E.current.focusVisible())});var D=nH(a),T="Accessibility.".concat(w?"Alternative":"Normal",".Instructions");return XA.createElement(oH,VB({action:E,"aria-describedby":r,"aria-label":g.get(T),color:"inherit",direction:s,disabled:!w||v()||b,onClick:function(e){w&&n(e)},padding:k,ref:q,style:M,styling:o.title,title:a},C),XA.createElement("span",{dir:D,style:QB.STYLE.ELLIPSIS},a))},cH=function(e){var t=e.className,n=e.title;return XA.createElement(ZB,{className:t,title:n,path:"M 6 2 h 10 V 1 H 6 Z m 5 5 h 5 V 6 h -5 Z m 5 5 h -5 v -1 h 5 Z M 5 10 h 1 v 2.663 a 3.5 3.5 0 1 0 -2.922 0.036 l -0.406 0.914 A 4.501 4.501 0 1 1 7.329 13 H 9 v 1 H 5 Z"})},uH=sF(Rj,{shouldForwardProp:function(e){return"direction"!==e&&"isFirst"!==e&&"isLast"!==e&&"styling"!==e}})(function(e){var t=e.direction,n=e.isFirst,r=e.isLast,i=e.styling.color;return{fontWeight:"normal",lineHeight:"normal",color:i,height:"24px",width:"24px",padding:0,marginLeft:"ltr"!==t||n?void 0:"4px",marginRight:"rtl"!==t||r?void 0:"4px","&:disabled":{color:i,opacity:1}}}),dH=sF(cH,{shouldForwardProp:function(e){return"direction"!==e&&"isFirst"!==e&&"isLast"!==e}})(function(e){var t=e.direction,n=e.isFirst,r=e.isLast;return{color:QB.STYLE.ICONS.COLOR.PRIMARY,marginTop:"1px",marginLeft:"ltr"!==t||n?void 0:"4px",marginRight:"rtl"!==t||r?void 0:"4px"}}),fH=sF(function(e){var t=e.className,n=e.title;return XA.createElement(ZB,{className:t,title:n,path:"M1 8a7 7 0 1 1 10 6.326V11h-1v5h5v-1h-3.124A8 8 0 1 0 8 16v-1a7 7 0 0 1-7-7Z"})},{})(function(){return{color:QB.STYLE.ICONS.COLOR.SECONDARY,"&.disabled":{color:QB.STYLE.ICONS.COLOR.DISABLED}}}),hH=function(e){var t=e.source;if(!t.meta.isCyclic)return null;var n=KB(GA.useState(!1),2),r=n[0],i=n[1],o=t.styling,a=t.action.stepCycle,s=t.info,l=s.position,c=s.tooltip,u=t.layout.direction,d=t.meta,f=d.allowed,h=d.isFirst,p=d.isLast,m=t.settings.isDisabled,g=t.state.inSelections;return GA.useEffect(function(){r&&i(!1)},[l]),f.reload?XA.createElement(uH,{direction:u,disabled:r||g||m(),isFirst:h,isLast:p,onClick:function(){return i(!0),void a()},styling:o.title,title:c,variant:"outlined"},XA.createElement(fH,{className:"".concat(r||g||m()?"disabled":"")})):XA.createElement(dH,{direction:u,isFirst:h,isLast:p,style:{flexShrink:0},title:c})},pH=function(e){var t=e.className,n=e.title;return XA.createElement(ZB,{className:t,title:n,path:"M7 4h9v1H7V4ZM9 8h7v1H9V8ZM11 12h5v1h-5v-1ZM1 4v3.526a3.5 3.5 0 0 0 3.5 3.5h2.31L5.22 9.402l.715-.7L8.7 11.527 5.935 14.35l-.714-.7 1.59-1.624H4.5a4.5 4.5 0 0 1-4.5-4.5V4h1Z"})},mH=sF(Rj,{shouldForwardProp:function(e){return"styling"!==e}})(function(e){var t=e.styling,n=t.fontSize,r=t.fontFamily,i=t.color;return{fontWeight:"normal",lineHeight:"normal",fontSize:"".concat(n," !important"),fontFamily:"".concat(r," !important"),color:"".concat(i," !important"),padding:"0px 5px",height:"100%",minWidth:"45px","&:disabled":{color:i}}}),gH={color:QB.STYLE.ICONS.COLOR.SECONDARY,marginTop:"1px","&.disabled":{color:QB.STYLE.ICONS.COLOR.DISABLED}},yH=sF(function(e){var t=e.className;return XA.createElement(ZB,{className:t,path:"M8.5 8 4 3.5 5.5 2l6 6-6 6L4 12.5 8.5 8z"})})(function(){return gH}),vH=sF(function(e){var t=e.className;return XA.createElement(ZB,{className:t,path:"m7 8 4.5 4.5L10 14 4 8l6-6 1.5 1.5z"})})(function(){return gH}),bH=sF(pH,{shouldForwardProp:function(e){return"direction"!==e&&"isFirst"!==e&&"isLast"!==e}})(function(e){var t=e.direction,n=e.isFirst,r=e.isLast;return{color:QB.STYLE.ICONS.COLOR.PRIMARY,marginTop:"1px",marginLeft:"ltr"!==t||n?void 0:"4px",marginRight:"rtl"!==t||r?void 0:"4px"}}),xH=function(e){var t=e.source;if(!t.meta.isDrillDown)return null;var n=t.styling,r=t.action.drillUp,i=t.info,o=i.breadcrumbs,a=i.tooltip,s=t.layout.direction,l=t.meta,c=l.isFirst,u=l.isLast,d=t.settings.isDisabled,f=t.state.inSelections,h=d()||f?"disabled":null,p=HB({},"rtl"===s?"startIcon":"endIcon","rtl"===s?XA.createElement(vH,{className:h}):XA.createElement(yH,{className:h})),m=o.map(function(e,t){var i=nH(e);return XA.createElement(mH,VB({disabled:d()||f,key:"breadcrumb-".concat(e),onClick:function(){return function(e){r({steps:o.length-e})}(t)},styling:n.title,title:e},p),XA.createElement("span",{dir:i,style:QB.STYLE.ELLIPSIS},e))});return XA.createElement(XA.Fragment,null,"rtl"===s?m.reverse():void 0,XA.createElement(bH,{direction:s,isFirst:c,isLast:u,style:{flexShrink:0},title:a}),"rtl"===s?void 0:m)},SH=sF(bB,{shouldForwardProp:function(e){return"nested"!==e&&"rtl"!==e}})(function(e){var t=e.nested,n=e.rtl;return{padding:"4px ".concat(t&&n?"32px":"16px"," 4px ").concat(t&&!n?"32px":"16px"),"&:focus":WB({},QB.STYLE.FOCUS)}}),wH=sF(MB)(function(){return{marginRight:0,justifyContent:"center"}}),MH=sF(function(e){var t=e.className;return XA.createElement(ZB,{className:t,path:"m6 10 7-7 2 2-7 7-2 2-5-5 2-2 3 3Z"})})(function(){return{color:QB.STYLE.ICONS.COLOR.SECONDARY}}),kH=sF(cH)(function(){return{color:QB.STYLE.ICONS.COLOR.SECONDARY}}),CH=sF(pH)(function(){return{color:QB.STYLE.ICONS.COLOR.SECONDARY,fontWeight:600}}),qH=function(e){var t=e.id,n=e.meta,r=e.nested,i=e.onClick,o=e.selected,a=e.source,s=e.text,l=a.styling,c=a.settings.isRTL,u=WB({fontWeight:!n||n.isNormal?"normal":600,lineHeight:"normal",fontSize:l.popover.fontSize,fontFamily:l.popover.fontFamily,color:l.popover.color,textAlign:c?"end":"start"},QB.STYLE.ELLIPSIS),d=nH(s),f=XA.createElement(wH,{sx:c?{paddingRight:"12px"}:{paddingLeft:"12px"}},function(e){var t=e.meta;return e.selected?XA.createElement(MH,{height:12}):null!=t&&t.isCyclic?XA.createElement(kH,{height:12}):null!=t&&t.isDrillDown?XA.createElement(CH,{height:12}):void 0}({meta:n,selected:o}));return XA.createElement(XA.Fragment,{key:t},XA.createElement(SH,{autoFocus:o,nested:r,onClick:function(e){return null==i?void 0:i(e)},rtl:c,title:s},c&&f,XA.createElement(DB,{dir:d,primaryTypographyProps:{style:u}},s),!c&&f))},EH=sF(iB)(function(){return{marginTop:"-1px"}}),DH=function(e){var t=e.anchor,n=e.id,r=e.onClose,i=e.open,o=e.source,a=o.action,s=a.changeTo,l=a.drillUp,c=a.setActiveField,u=o.info,d=u.breadcrumbs,f=u.group,h=u.id,p=u.text,m=o.data.alternatives,g=o.meta,y=g.index,v=g.isCyclic,b=g.isDrillDown,x=o.resources.translator,S=o.services.focus,w={isChanging:!1},M=GA.useRef(),k=function(){var e,t=document.activeElement;null!=M&&null!==(e=M.current)&&void 0!==e&&e.contains(t)&&t.blur(),r()},C=v||b,q=XA.createElement(qH,{id:h,key:h,meta:o.meta,onClick:k,selected:!C,source:o,text:C?f.name:p}),E=C&&f.items.map(function(e){return XA.createElement(qH,{id:e.id,nested:!0,onClick:function(t){return function(e,t){w.isChanging||(w.isChanging=!0,"keydown"!==e.type&&"keyup"!==e.type||S.queueFor(y),v&&c({fieldIndex:t.index}),b&&l({steps:d.length-t.index}))}(t,e)},selected:e.current,source:o,text:e.text})}),D=m.map(function(e,t){return XA.createElement(XA.Fragment,{key:e.id},XA.createElement(qH,{id:e.id,key:e.id,meta:e.meta,onClick:function(t){return n=t,r=e.id,void(w.isChanging||(w.isChanging=!0,"keydown"!==n.type&&"keyup"!==n.type||S.queueFor(y),s({id:r})));var n,r},source:o,text:e.text}),t<m.length-1&&XA.createElement(EH,{key:"divider-".concat(e.id)}))});return XA.createElement(FB,{anchorEl:t,anchorOrigin:{vertical:"top",horizontal:"center"},disableRestoreFocus:!0,id:n,onClose:k,open:i,ref:M,slotProps:{paper:{style:{minWidth:"250px",maxWidth:"640px",maxHeight:"300px"}}},transformOrigin:{vertical:"bottom",horizontal:"center"}},XA.createElement(pB,{"aria-label":x.get("Accessibility.Popover.Instructions"),dense:!0},q,E,XA.createElement(EH,{key:"divider-".concat(h)}),D))},TH=function(e){var t=e.source,n=KB(GA.useState(null),2),r=n[0],i=n[1],o={id:r?"alternatives-popover":void 0,isOpen:Boolean(r)},a=t.layout.direction,s=t.meta.index,l=t.services.focus,c=function(){i(null)};GA.useEffect(function(){o.isOpen&&c()},[t.info.key]);var u=XA.createElement(hH,{source:t}),d=XA.createElement(xH,{source:t});return XA.createElement(XA.Fragment,null,"rtl"===a?void 0:d,"rtl"===a?void 0:u,XA.createElement(lH,{onClick:function(e){var t=e.currentTarget;t.classList.contains("qcm-focus-visible")&&l.queueFor(s),i(t)},isOpen:o.isOpen,popoverId:o.id,source:t}),XA.createElement(DH,{anchor:r,id:o.id,onClose:c,open:o.isOpen,source:t}),"rtl"===a?d:void 0,"rtl"===a?u:void 0)};function OH(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var NH,AH,_H=function(){if(iH)return rH;iH=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},o=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,i=e.call(n,"constructor"),o=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!i&&!o)return!1;for(r in n);return void 0===r||e.call(n,r)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return rH=function e(){var t,n,r,l,c,u,d=arguments[0],f=1,h=arguments.length,p=!1;for("boolean"==typeof d&&(p=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<h;++f)if(null!=(t=arguments[f]))for(n in t)r=s(d,n),d!==(l=s(t,n))&&(p&&l&&(o(l)||(c=i(l)))?(c?(c=!1,u=r&&i(r)?r:[]):u=r&&o(r)?r:{},a(d,{name:n,newValue:e(p,u,l)})):void 0!==l&&a(d,{name:n,newValue:l}));return d},rH}(),IH=OH(_H),LH={},PH=OH((NH||(NH=1,AH=LH,(()=>{var e={909: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,c,u,d=arguments[0],f=1,h=arguments.length,p=!1;for("boolean"==typeof d&&(p=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<h;++f)if(null!=(t=arguments[f]))for(n in t)r=l(d,n),d!==(i=l(t,n))&&(p&&i&&(a(i)||(c=o(i)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&a(r)?r:{},s(d,{name:n,newValue:e(p,u,i)})):void 0!==i&&s(d,{name:n,newValue:i}));return d}}},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),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};n.r(r),n.d(r,{default:()=>De});var i=n(909),o=n.n(i);const a=function(e,t,n){if(!t)return!1;var r,i=t.split("."),o=i[i.length-1],a=e;for(r=0;r<i.length-1;++r)void 0===a[i[r]]&&(a[i[r]]=Number.isNaN(+i[r+1])?{}:[]),a=a[i[r]];if(void 0!==n){var s=a[o];return a[o]=n,{updated:n,previous:s}}return delete a[o],!1},s=function(e,t,n){var r,i=t.split("."),o=e;if(void 0===o)return n;for(r=0;r<i.length;++r){if(void 0===o[i[r]])return n;o=o[i[r]]}return o},l={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 c="".concat(" ","(").concat(" "),u="".concat(" ",")").concat(" ");function d(e){return c+e+u}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var n=function(e,t){if(!t)return null;var n,r;for(n=0;n<t.length;n++)if((r=t[n]).qInfo.qId===e)return r;return null}(e.qLibraryId,t.dimensionList);return n&&n.qData.info[0].qTags.indexOf("$numeric")>-1}var r=function(e,t){if(!t)return null;var n,r,i=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var n=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(n)&&(t=(t=t.substring(1,n)).trim()),t}(e);for(n=0;n<t.length;n++){if((r=t[n]).qName===i)return r;if(r.qDerivedFieldData)for(var o=0;o<r.qDerivedFieldData.qDerivedFieldLists.length;++o)for(var a=r.qDerivedFieldData.qDerivedFieldLists[o],s=0;s<a.qFieldDefs.length;++s){var 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 h(e){return!(!e.fullAccumulation&&!e.fullRange)}function p(e,t){var n=e.crossAllDimensions;return 2===t&&n?"RowNo(Total)":"RowNo()"}function m(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 g(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function y(e,t){var n=e.crossAllDimensions;return 2===t&&n?"Above(Total ":"Above("}function v(e){return void 0===e?")":", 0, ".concat(e,")")}function b(e){return"Replace(Replace(".concat(e,",'''',''''''),'$','$''&''')")}function x(e,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=").concat(b("MinString(".concat(t,")")),")' and Only({1}").concat(t,")<='$(=").concat(b("MaxString(".concat(t,")")),")'\"}")}function S(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 c=x(f(r[0],i),g(0));return"".concat(a,"({1<").concat(c,">}").concat(l,")")}if(r&&2===r.length){var u=f(r[0],i),d=f(r[1],i),h=g(0),p=g(1),m=x(u,h),y=x(d,p);return"".concat(a,"({1<").concat(m,",").concat(y,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function w(e){return"".concat(e,"(")}function M(e){var t=e.properties,n=e.layout;return s(t,"qHyperCubeDef.qDimensions",s(n,"qHyperCube.qDimensionInfo",[])).length}const k={isFullRange:h,getNumDimensions:M,getExpressionWithExcludedComp:function(e){var t=e.expression,n=e.modifier,r=e.dimensions,i=e.dimensionAndFieldList,o=e.treatMissingAsNull,a=d(m(t));if(!n.showExcludedValues)return a;var s=S({modifier:n,dimensions:r,dimensionAndFieldList:i}),l=o?"":", 0";if(r&&1===r.length){var c=g(0);return"If(Count(".concat(c,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(r&&2===r.length){var u=g(0),f=g(1);return"If(Count(".concat(u,") * Count(").concat(f,") > 0, ").concat(a," + ").concat(s).concat(l,")")}return a},getRowNoComp:p,getNumStepComp:function(e,t){if(!h(e)){var n=e.steps;return"number"!=typeof n||Number.isNaN(n)?6:n}return p(e,t)},getAboveCompPrefix:y,getAboveCompSuffix:v,getAboveComp:function(e,t,n,r){return y(e,t)+n+v(r)},getFunctionPrefix:w,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return w(e)+t+")"},getAggrComp:function(e,t,n){return"Aggr(".concat(e,", ").concat(t,", ").concat(n,")")},getExcludedComp:S,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===M({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=g(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:m,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var n=t.indexOf(c);if(-1!==n){var r=t.indexOf(u);if(-1!==r)return t.substring(n+c.length,r)}}},initModifier:function(e,t){Object.keys(t).forEach(function(n){void 0===e[n]&&(e[n]=t[n])})},isNumeric:f,isApplicable:function(e){var t=e.properties,n=e.layout,r=e.minDimensions,i=void 0===r?1:r,o=e.maxDimensions,a=void 0===o?2:o;if(!t&&!n)return!0;var s=M({properties:t,layout:n});return s>=i&&s<=a},getExpressionWithMarkers:d,canExtract:function(e){var t=e.indexOf(c),n=e.indexOf(u);return t>-1&&n>-1&&t<n},getDimDefWithWrapper:g,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=l.OPTIONS.find(function(t){return t.value===e.decomposition});return t?l.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(l.EXPRESSIONS).find(function(n){var r=e.qDef.base.qDef.toLowerCase()||e.qDef.qDef.toLowerCase();return l.EXPRESSIONS[n]&&r.includes(l.EXPRESSIONS[n].toLowerCase())&&(t=n),n}),t}};function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function q(e){return q="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},q(e)}var E=o().bind(null,!0),D={},T=Array.isArray;function O(e){return null!=e&&!Array.isArray(e)&&"object"===q(e)}function N(e){return void 0===e}function A(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function _(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]=N(e[n||t])?o:e[t],e=e[n||t]}}),e}function I(e,t){var n=!0;if(O(e)&&O(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(T(e)&&T(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}D.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)||A(t,i)||(N(a)?r.push({op:"add",path:s,value:o}):O(o)&&O(a)?r=r.concat(D.generate(a,o,s)):T(o)&&T(a)?r=r.concat(function(e,t,n){var r=[],i=e.slice(),o=-1;function a(e,t,n){if(e[n]&&N(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(!N(t[0])&&N(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(D.generate(i[s],t[o],"".concat(n,"/").concat(s)));for(var l=0,c=t.length;l<c;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){N(t[i])&&!A(e,i)&&r.push({op:"remove",path:"".concat(n,"/").concat(i)})}),r},D.apply=function(e,t){t.forEach(function(t){var n,r,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(T(i))"-"===o&&(o=i.length),i.splice(+o,"add"===t.op?0:1,t.value);else if(T(a)&&T(t.value)){var l,c=t.value.slice();a.length=0,(l=a).push.apply(l,function(e){if(Array.isArray(e))return C(e)}(r=c)||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 C(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?C(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(O(a)&&O(t.value))n=a,Object.keys(n).forEach(function(e){Object.getOwnPropertyDescriptor(n,e).configurable&&!A(n,e)&&delete n[e]}),E(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 u=_(e,t.from);T(i)?i.splice(+o,0,u.splice(+s,1)[0]):(i[o]=u[s],delete u[s])}else"remove"===t.op&&(T(i)?i.splice(+o,1):delete i[o])})},D.clone=function(e){return E({},e)},D.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},D.updateObject=function(e,t){Object.keys(e).length?D.apply(e,D.generate(e,t)):E(e,t)};const L=D;var P="accumulation";function R(e,t){var n=s(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===P)return n[r]}function z(e,t){var n=function(e,t){var n=s(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===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 j={translationKey:"properties.modifier.accumulation",needDimension:k.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return k.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,o=e.numDimensions,a=e.dimensionAndFieldList;if(!n)return t;var l=o;void 0===l&&(l=k.getNumDimensions({properties:r,layout:i}));var c=s(r,"qHyperCubeDef.qDimensions",[]),u=k.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:a}),d=k.getNumStepComp(n,l),f=k.getAboveComp(n,l,u,d),h=k.getRangeComp("RangeSum",f);if(k.needDimension({modifier:n,properties:r,layout:i})){var p=k.getDimComp(c,1),m=k.getDimComp(c,0),g=k.getAggrComp(h,p,m);h=n.showExcludedValues?k.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:a,valueComp:g}):g}return h},extractInputExpression:k.extractInputExpression,initModifier:function(e){k.initModifier(e,F)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:function(e,t){return!k.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(z(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(z(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(z(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(z(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(z(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return k.isApplicable({properties:t.properties})}}},show:function(t,n,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}}}};var B="movingAverage";function H(e,t){var n=s(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===B)return n[r]}function V(e,t){var n=function(e,t){var n=s(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===B)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var $={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1};const W={translationKey:"properties.modifier.movingAverage",needDimension:k.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return k.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,n=e.expression,r=e.modifier,i=e.properties,o=e.layout,a=e.numDimensions,l=e.dimensionAndFieldList;if(!r)return n;var c=a;void 0===c&&(c=k.getNumDimensions({properties:i,layout:o}));var u=s(i,"qHyperCubeDef.qDimensions",[]),d=r.showExcludedValues&&r.nullSuppression,f=k.getExpressionWithExcludedComp({expression:n,modifier:r,dimensions:u,dimensionAndFieldList:l,treatMissingAsNull:d}),h=k.getNumStepComp(r,c),p=k.getAboveComp(r,c,f,h);if(r.nullSuppression)t=k.getRangeComp("RangeAvg",p);else{var m=k.getRangeComp("RangeSum",p),g=function(e,t){var n=k.getRowNoComp(e,t);if(!k.isFullRange(e)){var r=e.steps,i="number"!=typeof r||Number.isNaN(r)?6:r;return"RangeMin(".concat(i,", ").concat(n,")")}return n}(r,c);t="".concat(m," / ").concat(g)}var y=t;if(k.needDimension({modifier:r,properties:i,layout:o})){var v=k.getDimComp(u,1),b=k.getDimComp(u,0),x=k.getAggrComp(y,v,b);y=r.showExcludedValues?k.getExcludedComp({modifier:r,dimensions:u,dimensionAndFieldList:l,funcComp:"Only",valueComp:x}):x}return y},extractInputExpression:k.extractInputExpression,initModifier:function(e){k.initModifier(e,$)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.movingAverage.disclaimer",show:function(e,t){return!k.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(V(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.movingAverage.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(V(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.movingAverage.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(V(t,e),".fullRange")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(V(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=H(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=H(t,e);return n&&!n.fullRange}},showExcludedValues:{refFn:function(t){return"".concat(V(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat(V(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return k.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(B))return!1;var o=H(t,e);return o&&!o.disabled}}}};var U="timeSeriesDecomposition";function Y(e,t){var n=s(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=s(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 G={type:"timeSeriesDecomposition",disabled:!1,decomposition:"",steps:2,outputExpression:""};const X={translationKey:"properties.modifier.timeSeriesDecomposition",needDimension:k.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return k.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties;return n?k.generateTSDExpression(n,t,r):t},extractInputExpression:k.extractInputExpression,initModifier:function(e,t){k.initModifier(e,G),""===e.decomposition&&t&&(e.decomposition=k.getDecomposition(t))},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.timeSeriesDecomposition||"properties.modifier.timeSeriesDecomposition",show:function(e,t){return!k.isApplicable({properties:t.properties})}},settings:{type:"items",items:{decomposition:{refFn:function(t){return"".concat(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:l.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=Y(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=Y(t,e);return n&&!n.fullRange}}},show:function(e,t){return k.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(U))return!1;var o=Y(t,e);return o&&!o.disabled}}}};var J="difference";function Z(e,t){var n=function(e,t){var n=s(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===J)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var Q={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""};const ee={translationKey:"properties.modifier.difference",needDimension:k.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return k.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:k.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,o=e.numDimensions,a=e.dimensionAndFieldList;if(!n)return t;var l=o;void 0===l&&(l=k.getNumDimensions({properties:r,layout:i}));var c=s(r,"qHyperCubeDef.qDimensions",[]),u=k.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:a}),d=k.getAboveComp(n,l,u),f="".concat(u," - ").concat(d);if(k.needDimension({modifier:n,properties:r,layout:i})){var h=k.getDimComp(c,1),p=k.getDimComp(c,0),m=k.getAggrComp(f,h,p);f=n.showExcludedValues?k.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:a,funcComp:"Only",valueComp:m}):m}return f},initModifier:function(e){Object.keys(Q).forEach(function(t){void 0===e[t]&&(e[t]=Q[t])})},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:function(e,t){return!k.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(Z(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.difference.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(Z(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.difference.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},showExcludedValues:{refFn:function(t){return"".concat(Z(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return k.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(J))return!1;var o=function(e,t){var n=s(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===J)return n[r]}(t,e);return o&&!o.disabled}}}};var te="normalization";function ne(e,t){var n=s(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=s(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(k.getFieldWithWrapper(t),"={'").concat(n,"'}>}"):""}function le(e,t){return 0===e&&t>1||2===e?"Total":""}function ce(e,t,n){return 0===e&&t>1?"<".concat(k.getDimDefWithWrapper(n),">"):""}const ue={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,n=e.layout;return k.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:k.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,o=e.numDimensions,a=e.dimensionAndFieldList;if(!n)return t;var l=o;void 0===l&&(l=k.getNumDimensions({properties:r,layout:i}));var c=s(r,"qHyperCubeDef.qDimensions",[]),u=k.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:a}),d=n.selectionScope,f=n.dimensionalScope;return function(e,t,n,r,i,o,a){var s=ae(t),l=se(t,n,r),c=""===s&&""===l?"":s||l,u=le(i,o),d=ce(i,o,a),f=function(e){for(var t=[],n=0;n<e;n++)t[n]=k.getDimDefWithWrapper(n);return t.join(", ")}(o);return"".concat(e,"/ Sum(").concat(c," ").concat(u).concat(d," Aggr(").concat(c," ").concat(e,", ").concat(f,"))")}(u,d,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]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:function(e,t){return!k.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(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){if(1===e){var n=ie(t,0);t.splice(n,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){if(e<2){var n=ie(t,0);t.splice(n,1)}return t}(i,o),o=function(e,t){if(0===e){var n=ie(t,1);t.splice(n,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 k.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}}},getDisregardSelectionComp:ae,getFieldSelectionComp:se,getTotalComp:le,getSelectedDimComp:ce};var de="library id deleted",fe="qDef.qDef",he="qDef.base.qDef",pe="qLibraryId",me="qDef.base.qLibraryId",ge="qDef.qLabel",ye="qDef.qLabelExpression",ve="qDef.base.qLabel",be="qDef.base.qLabelExpression",xe="qDef.qAggrFunc",Se="qDef.base.qAggrFunc",we="qDef.base";const Me={getExpression:function(e){var t=s(e,he);return void 0!==t?t:s(e,fe)},getExpressionRef:function(e){return void 0!==s(e,he)?he:fe},getLibraryIdRef:function(e){return s(e,me)?me:pe},getLibraryId:function(e){return s(e,me)||s(e,pe)},getLabelRef:function(e){return s(e,we)?ve:ge},getLabelExpressionRef:function(e){return s(e,we)?be:ye}};var ke={initBase:function(e,t){(t||ke.isValid(e))&&(a(e,he,s(e,fe)),a(e,me,s(e,pe)),a(e,ve,s(e,ge)),a(e,be,s(e,ye)))},restoreBase:function(e){ke.isValid(e)&&(a(e,fe,s(e,he)),a(e,pe,s(e,me)),a(e,ge,s(e,ve)),a(e,ye,s(e,be)),s(e,xe)&&s(e,Se)&&a(e,xe,s(e,Se)),delete e.qDef.base)},isValid:function(e){var t=s(e,he),n=s(e,me);return void 0!==t||void 0!==n}};const Ce=ke;function qe(e){return qe="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},qe(e)}var Ee={accumulation:j,movingAverage:W,difference:ee,normalization:ue,timeSeriesDecomposition:X};const De={modifiers:Ee,apply:Oe,applyModifiers:Ne,cleanUpMeasure:Ae,destroy:function(e){e&&Te[e.id]&&Te[e.id].masterItemSubscriber&&(Te[e.id].masterItemSubscriber&&Te[e.id].masterItemSubscriber.unsubscribe(),delete Te[e.id])},hasActiveModifiers:_e,getActiveModifier:Ie,initBase:Ce.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some(function(e){return Ee[e]})},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some(function(e){return Ee[e]&&Ee[e].isApplicable({properties:n,layout:r})})},measureBase:Me,limitedSorting:function(e){var t=e.measures,n=e.properties,r=e.layout,i=!1,o=!1;return t.forEach(function(e){var t=Re(e);$e({modifiers:t,properties:n,layout:r})&&(i=!0,o=o||Ge({modifiers:t,properties:n,layout:r}))}),i&&!o},ifEnableTotalsFunction:Le};var Te={};function Oe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.model,n=e.properties,r=e.isSnapshot,i=void 0!==r&&r,a=e.masterItem,l=!1;Te[t.id]=Te[t.id]||{isFirstTime:!0};var c=Te[t.id].isFirstTime;if(Te[t.id].isFirstTime=!1,n&&"object"===qe(n))return Ne({model:t,properties:n});var u=t?t.layout:void 0,d=s(u,"qSelectionInfo.qInSelections");if(i||d)return Promise.resolve(l);var f=s(u,"qHyperCube.qMeasureInfo"),h=Te[t.id].lastReloadTime;if(Te[t.id].lastReloadTime=s(t,"app.layout.qLastReloadTime"),_e({measures:f,layout:u})){var p=function(e){var t=e.measures,n=e.layout,r=e.lastReloadTime;return s(e.model,"app.layout.qLastReloadTime")!==r&&function(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some(function(e){return Ve({measure:e,properties:n,layout:r})})}({measures:t,layout:n})}({measures:f,layout:u,model:t,lastReloadTime:h});return p||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 $e({modifiers:Re(t),layout:n})?!t.base:!!t.base}({measure:e,layout:n})}))}({measures:f,layout:u,masterItem:a,isFirstTime:c})?t.getEffectiveProperties().then(function(e){var n=o()(!0,{},e);Fe(n);var r=Xe(n);return We({model:t}).then(function(i){return Ue({libraryIds:r,model:t}).then(function(r){return p&&function(e){var t=e.properties;Pe(t).forEach(function(e){return function(e){var t=e.measure;if(Ve({measure:t,properties:e.properties})){var n=0,r=t.qDef.modifiers;Array.isArray(r)&&r.forEach(function(e){if("object"===qe(e)&&!e.disabled){if(n++,"object"!==qe(Ee[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=Ee[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==r&&Be(t)&&k.simplifyExpression(t.qDef.base.qDef)!==k.simplifyExpression(r)&&(t.qDef.base.qDef=r)}})}}({measure:e,properties:t})})}({properties:n}),Ne({model:t,oldProperties:e,properties:n,runUpdateIfChange:!0,masterItem:a,libraryItemsProps:r,dimensionAndFieldList:i})})}).catch(function(){return Promise.resolve(l)})}):Promise.resolve(l)}return function(e){return!!Array.isArray(e)&&e.some(function(e){return"object"===qe(e.base)})}(f)?t.getEffectiveProperties().then(function(e){return function(e){var t=e.model,n=e.properties,r=Xe(n);return Je({model:t,libraryIds:r}).then(function(){var e=o()(!0,{},n);return Pe(n).forEach(function(e){return Ae(e)}),Ke({oldProperties:e,newProperties:n,model:t})})}({model:t,properties:e})}):Promise.resolve(l)}function Ne(e){var t=e.model,n=e.oldProperties,r=e.properties,i=e.measures,a=e.runUpdateIfChange,l=void 0!==a&&a,c=e.masterItem,u=e.libraryItemsProps,d=e.dimensionAndFieldList;void 0===n&&(n=l?o()(!0,{},r):r),Fe(r);var f=Xe(r);return Je({model:t,libraryIds:f,masterItem:c}).then(function(){return function(e){var t=e.measures,n=e.properties,r=e.model,i=e.libraryItemsProps,a=e.dimensionAndFieldList;if(t||(t=Pe(n)),!t.length)return Promise.resolve();if(!i&&!_e({measures:t,properties:n}))return t.forEach(function(e){return Ae(e)}),Promise.resolve();var l=i?void 0:Xe(n);return We({model:r,dimensionAndFieldList:a}).then(function(e){return Ue({libraryIds:l,model:r,libraryItemsProps:i}).then(function(r){t.forEach(function(t){var i=t.qDef.modifiers;r&&$e({modifiers:i,properties:n})?(function(e){var t=e.measure,n=e.properties,r=e.libraryItemsProps,i=e.dimensionAndFieldList,a=0;Ce.isValid(t)||Ce.initBase(t,!0);var l=t.qDef,c=l.modifiers,u=l.base;Array.isArray(c)&&c.forEach(function(e){if("object"===qe(e)&&!e.disabled){if(a++,"object"!==qe(Ee[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(a>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");Ee[e.type].initModifier(e,t);var l=t.qLibraryId||u&&u.qLibraryId;l?function(e){var t=e.measure,n=e.modifier,r=e.properties,i=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],s=a.qMeasure.qDef,l=""===s?s:Ee[n.type].generateExpression({expression:s,modifier:n,properties:r,dimensionAndFieldList:i});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=o()(!0,{},t.qDef.base)}({measure:t,modifier:e,libraryId:l,properties:n,libraryItemsProps:r,dimensionAndFieldList:i}):function(e){var t=e.measure,n=e.modifier,r=e.properties,i=e.dimensionAndFieldList;"function"==typeof Ee[n.type].updateModifier&&Ee[n.type].updateModifier(n,r.qHyperCubeDef);var a=Me.getExpression(t),s=""===a?a:Ee[n.type].generateExpression({expression:a,modifier:n,properties:r,dimensionAndFieldList:i});n.outputExpression=s,t.qDef.qDef=n.outputExpression,t.qDef.base.qLabelExpression?t.qDef.qLabelExpression=t.qDef.base.qLabelExpression:t.qDef.qLabel=t.qDef.base.qLabel||a,n.base=o()(!0,{},t.qDef.base)}({measure:t,modifier:e,properties:n,dimensionAndFieldList:i}),function(e){var t=s(e,"qDef.qAggrFunc");"Expr"!==t||Le(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&Le(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}),je(t)):Ae(t)})})})}({measures:i,properties:r,model:t,libraryItemsProps:u,dimensionAndFieldList:d}).then(function(){return l?Ke({oldProperties:n,newProperties:r,model:t}):Promise.resolve(!1)})}).catch(function(){return Promise.resolve(!1)})}function Ae(e){!function(e){var t=Re(e);return Array.isArray(t)&&t.some(function(e){return"object"===qe(e)&&!e.disabled&&!Ee[e.type]})}(e)?Ce.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,je(e)}function _e(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some(function(e){return $e({modifiers:Re(e),properties:n,layout:r})})}function Ie(e){var t=Re(e);if(Array.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];if(Ee[r.type]&&!r.disabled)return r}}function Le(e){var t=Ie(e);return!t||Ee[t.type].enableTotalsFunction(e)}function Pe(e){return s(e,"qHyperCubeDef.qMeasures",[]).concat(s(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function Re(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function ze(e){return s(e,"outputExpression.qValueExpression.qExpr")||s(e,"outputExpression")}function Fe(e){Pe(e).forEach(function(e){return function(e){var t=Ie(e);t&&(void 0!==t.outputExpression&&ze(t)!==e.qDef.qDef?delete e.qDef.base:!Ce.isValid(e)&&t.base&&(e.qDef.base=o()(!0,{},t.base)))}(e)})}function je(e){var t=Re(e);Array.isArray(t)&&t.forEach(function(t){"object"===qe(t)&&(t.disabled||!Ee[t.type]&&ze(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)})}function Be(e){return e.base||e.qDef&&e.qDef.base}function He(e){var t=Be(e);return e.qLibraryId||t&&t.qLibraryId}function Ve(e){var t=e.measure,n=e.properties,r=e.layout;return!He(t)&&$e({modifiers:Re(t),properties:n,layout:r})}function $e(e){var t=e.modifiers,n=e.properties,r=e.layout,i={};return Array.isArray(t)&&t.some(function(e){return!("object"!==qe(e)||e.disabled||!Ee[e.type])&&(void 0===i[e.type]&&(i[e.type]=Ee[e.type].isApplicable({properties:n,layout:r})),i[e.type])})}function We(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 Ue(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}).catch(function(){return null})}function Ye(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Ke(e){var t=e.oldProperties,n=e.newProperties,r=e.model,i=JSON.stringify(s(t,"qHyperCubeDef.qMeasures"),Ye)!==JSON.stringify(s(n,"qHyperCubeDef.qMeasures"),Ye)||JSON.stringify(s(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ye)!==JSON.stringify(s(n,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ye);return i?function(e){var t=e.model,n=e.oldProperties,r=e.newProperties,i=t.layout;return i&&!i.qHasSoftPatches&&!i.qExtendsId&&s(i,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(r):function(e,t,n){if(!e)return Promise.resolve();var r=L.generate(t,n);return o()(!0,t,n),r&&r.length?(r=r.map(function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}}),e.applyPatches(r,!0)):Promise.resolve()}(t,n,r)}({model:r,oldProperties:t,newProperties:n}).then(function(){return i}):Promise.resolve(i)}function Ge(e){var t=e.modifiers,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some(function(e){return"object"===qe(e)&&!e.disabled&&Ee[e.type]&&Ee[e.type].needDimension({modifier:e,properties:n,layout:r})})}function Xe(e){var t=Pe(e),n=[],r=[],i=!1;return t.forEach(function(t){var r=Re(t);if($e({modifiers:r,properties:e})){var o=He(t);o&&n.push(o),i=i||Ge({modifiers:r,properties:e})}}),s(e,"qHyperCubeDef.qDimensions",[]).forEach(function(e){var t=e.qLibraryId;t&&r.push(t)}),{measureLibraryIds:n,dimensionLibraryIds:r}}function Je(e){var t=e.model,n=e.libraryIds,r=e.masterItem;return!r&&r!==de&&n&&(n.measureLibraryIds.length||n.dimensionLibraryIds.length)?(Te[t.id].masterItemSubscriber=Te[t.id].masterItemSubscriber||function(e){var t=e.model,n=e.callback,r={},i={},o={},a={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},n=s(e,"qInfo.qType");return n&&a[n]&&a[n].forEach(function(n){t[n]=s(e,n)}),JSON.stringify(t)}function c(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 u(){Object.keys(r).forEach(function(e){i[e]||o[e]||(r[e].listener.dispose(),r[e].unbindCloseListnener(),delete r[e])})}var d=function(e,t){return e.once("closed",t),function(){return e.removeListener("closed",t)}};function f(e,i){return t.app[i](e).then(function(t){r[e]={listener:t.layoutSubscribe(c),unbindCloseListnener:d(t,function(){return e=t.id,n(de),delete r[e],void u();var e}),enabled:!1,properties:l(t.layout)}}).catch(function(){})}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}),u(),t.app&&(Object.keys(i).forEach(function(e){i[e]&&!r[e]&&s.push(f(e,"getMeasure"))}),Object.keys(o).forEach(function(e){o[e]&&!r[e]&&s.push(f(e,"getDimension"))})),Promise.all(s)},unsubscribe:function(){Object.keys(r).forEach(function(e){r[e].listener.dispose(),r[e].unbindCloseListnener()}),r={}}}}({model:t,callback:function(e){return Oe({model:t,masterItem:e}).then(function(){return t.app.clearUndoBuffer()})}}),Te[t.id].masterItemSubscriber.subscribe(n)):Promise.resolve()}AH.default=r.default,Object.defineProperty(AH,"__esModule",{value:!0})})()),LH));function RH(e){var t=e.model,n=e.properties;return e.noModelDependencies?PH.apply({model:t,properties:n}):t.modifiers?t.modifiers.apply({model:t,properties:n}):Promise.resolve()}function zH(e){return Array.isArray(e)}function FH(e){return null!=e&&!Array.isArray(e)&&"object"===XB(e)}function jH(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function BH(e){return void 0===e}function HH(e,t){if(FH(e)&&FH(t)){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n=Object.keys(e),r=0,i=n.length;r<i;r+=1)if(!HH(e[n[r]],t[n[r]]))return!1;return!0}if(zH(e)&&zH(t)){if(e.length!==t.length)return!1;for(var o=0,a=e.length;o<a;o+=1)if(!HH(e[o],t[o]))return!1;return!0}return e===t}function VH(e){var t=e.oldData,n=void 0===t?{}:t,r=e.newData,i=void 0===r?{}:r,o=e.basePath,a=void 0===o?"":o,s=[];return Object.keys(i).forEach(function(e){var t=function(e){return e?IH(!0,{},{value:e}).value:e}(i[e]),r=n[e],o="".concat(a,"/").concat(e);HH(t,r)||jH(i,e)||(BH(r)?s.push({op:"add",path:o,value:t}):FH(t)&&FH(r)?s.push.apply(s,GB(VH({oldData:r,newData:t,basePath:o}))):zH(t)&&zH(r)?s.push.apply(s,GB(function(e){var t=e.newArray,n=e.basePath,r=[];return HH(t,e.oldArray.slice())||(!BH(t[0])&&BH(t[0].qInfo)||0===t.length)&&r.push({op:"replace",path:n,value:t}),r}({oldArray:r,newArray:t,basePath:o}))):s.push({op:"replace",path:o,value:t}))}),Object.keys(n).forEach(function(e){BH(i[e])&&!jH(n,e)&&s.push({op:"remove",path:"".concat(a,"/").concat(e)})}),s}function $H(e){var t=e.model,n=VH({oldData:e.oldProperties,newData:e.newProperties});null!=t&&t.applyPatches&&null!=n&&n.length&&t.applyPatches(n.map(function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}}),!0)}function WH(e){var t=e.properties,n=e.container,r=e.filtered,i=t.color;if(i){var o=i.auto,a=i.mode;if(!o){var s,l=r.map(function(e){var r;return null===(r=t.qHyperCubeDef[n][e])||void 0===r?void 0:r.qDef.cId}).filter(function(e){return void 0!==e}),c=t.qHyperCubeDef[n].filter(function(e){return!l.includes(e.qDef.cId)});if("byDimension"===a){var u=i.byDimDef,d=void 0===u.activeDimensionIndex?-1:u.activeDimensionIndex;if(d<0)return;var f=c[d];if(f.qLibraryId)i.byDimDef={type:"libraryItem",key:f.qLibraryId,label:f.qLibraryId,activeDimensionIndex:d};else{var h=f.qDef,p=h.qLabelExpression||h.qFieldLabels&&h.qFieldLabels[0]||h.qFieldDefs[0],m=(s=f.qDef.qFieldDefs[0]).split(" ").length>1&&"="!==s[0]&&"["!==s[0]?"[".concat(s,"]"):s;i.byDimDef={type:"expression",key:m,label:p||m,activeDimensionIndex:d}}}if("byMeasure"===a){var g=i.byMeasureDef,y=void 0===g.activeMeasureIndex?-1:g.activeMeasureIndex;if(y<0)return;var v=c[y],b=PH.measureBase.getLibraryId(v);if(b){i.byMeasureDef={type:"libraryItem",key:b,label:b,activeMeasureIndex:y};var x=PH.hasActiveModifiers({measures:[v]})?v.qDef.qDef:void 0;x&&(i.byMeasureDef.expression=x)}else{var S=v.qDef;i.byMeasureDef={type:"expression",key:S.qDef,label:S.qLabelExpression||S.qLabel||S.qDef,activeMeasureIndex:y}}}}}}function UH(e){return YH.apply(this,arguments)}function YH(){return(YH=function(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function a(e){BB(o,r,i,a,s,"next",e)}function s(e){BB(o,r,i,a,s,"throw",e)}a(void 0)})}}(UB().m(function e(t){var n,r,i,o,a,s,l,c,u,d,f,h,p,m;return UB().w(function(e){for(;;)switch(e.n){case 0:if(n=t.from,r=t.to,i=t.model,o=t.container,a=t.filtered,s=t.noModelDependencies,l=t.skipAttributeExpressions,c=t.onChange,i){e.n=1;break}return e.a(2);case 1:return e.n=2,i.getEffectiveProperties();case 2:return u=e.v,d=u.qHyperCubeDef[o].findIndex(function(e){return e.qDef.cId===n}),f=u.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[o].findIndex(function(e){return e.qDef.cId===r}),h=IH(!0,{},u),p=h.qHyperCubeDef[o][d],(m=h.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[o][f]).qAttributeDimensions=p.qAttributeDimensions,p.qAttributeDimensions=[],l||(m.qAttributeExpressions=p.qAttributeExpressions,p.qAttributeExpressions=[]),h.qHyperCubeDef[o][d]=m,h.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[o][f]=p,c({fromItem:p,toItem:m,oldProperties:u,newProperties:h,model:i}),e.n=3,RH({model:i,properties:h,noModelDependencies:s});case 3:s?WH({properties:h,container:o,filtered:a}):i.colorSupport&&i.colorSupport.colorByUpdater(h,"qHyperCubeDef."),$H({model:i,oldProperties:u,newProperties:h});case 4:return e.a(2)}},e)}))).apply(this,arguments)}function KH(e){var t=e.callbacks,n=e.data,r=e.resources,i=e.settings,o=t.onChange,a=n.infos,s=n.filtered,l=r.app,c=r.model,u=r.translator,d=i.noModelDependencies,f=i.skipAttributeExpressions;return a.map(function(e,t){var n=e.cId,r=e.qGrouping,i=e.qGroupFallbackTitles,a=e.qGroupPos,h=e.qFallbackTitle,p=e.qLocked,m=e.title,g="C"===r,y="H"===r,v="N"===r,b="number"==typeof e.explicitColumn?e.explicitColumn:t,x=function(t,n){g&&l&&l.getDimension&&l.getDimension(e.qLibraryId).then(function(e){null==e||e[t](n)}).catch(function(){})};return{meta:{isCyclic:g,isDrillDown:y,isLocked:!!p,isNormal:v},info:{id:n,key:"".concat(n,"-").concat(a),text:v?h:i[a],position:a,breadcrumbs:i.slice(0,e.qGroupPos),group:{name:m,items:i.slice(0,y?e.qGroupPos+1:i.length).map(function(e,t){return{id:"".concat(n,"-item-").concat(t),text:e,current:a===t,index:t}})},tooltip:v?void 0:u.get(g?"Tooltip.dimensions.cyclic":"Tooltip.dimensions.drilldown")},action:{changeTo:function(e){var t=e.id;return UH({from:n,to:t,container:"qDimensions",model:c,filtered:s,noModelDependencies:d,skipAttributeExpressions:f,onChange:o})},drillUp:function(e){var t=e.steps;y&&c&&(null==c||c.drillUp("/qHyperCubeDef",b,t))},stepCycle:function(){return x("stepCycle",1)},setActiveField:function(e){var t=e.fieldIndex;return x("setActiveField",t)}}}})}function GH(e){var t=e.callbacks,n=e.data,r=e.resources,i=e.settings,o=t.onChange,a=n.infos,s=n.filtered,l=r.model,c=i.noModelDependencies,u=i.skipAttributeExpressions;return a.map(function(e){var t=e.cId,n=e.qFallbackTitle;return{meta:{isNormal:!0},info:{id:t,key:t,text:n},action:{changeTo:function(e){var n=e.id;return UH({from:t,to:n,container:"qMeasures",model:l,filtered:s,noModelDependencies:c,skipAttributeExpressions:u,onChange:o})}}}})}function XH(e){var t=e.callbacks,n=e.data,r=e.dock,i=e.key,o=e.rect,a=e.resources,s=e.settings,l=e.state,c=e.styling,u=function(e){var t=e.dock,n=e.rect,r={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",height:"100%"};return"left"!==t&&"right"!==t||(r.width="".concat(n.height,"px"),r.height="".concat(n.width,"px"),r.transformOrigin="top left"),"left"===t&&(r.transform="rotate(-90deg) translate(-".concat(n.height,"px, 0)")),"right"===t&&(r.transform="rotate(90deg) translate(0, -".concat(n.width,"px)")),r}({dock:r,rect:o}),d=function(e){var t=e.callbacks,n=e.data,r=e.dock,i=e.key,o=e.resources,a=e.settings,s=e.state,l=e.styling,c=n.alternatives,u=n.infos,d=o.app,f=o.cache,h=o.model,p=a.isRTL,m=a.isSnapshot,g=a.noModelDependencies,y=a.type,v=function(e){var t=e.dock;return"top"!==t&&"bottom"!==t||!e.isRTL?"ltr":"rtl"}({dock:r,isRTL:p}),b=function(e){var t=e.cache,n="axis-title-auto-focus_"+e.key;return{queueFor:function(e){var r;return null==t||null===(r=t.set)||void 0===r?void 0:r.call(t,n,{focus:!0,index:e})},shouldFor:function(e){var r,i,o=null==t||null===(r=t.get)||void 0===r?void 0:r.call(t,n),a=!(null==o||!o.focus||(null==o?void 0:o.index)!==e);return a&&(null==t||null===(i=t.set)||void 0===i||i.call(t,n,{focus:!1})),a}}}({cache:f,key:i}),x=("dimension"===y?KH:GH)({callbacks:t,data:n,resources:o,settings:a});"rtl"===v&&x.reverse();var S={allowed:{change:g?!m:!(null==h||!h.modifiers||null==h||!h.colorSupport||m),reload:!!d&&!m},hasAlternatives:!!c.length,hasCyclic:x.some(function(e){return e.meta.isCyclic}),hasMultiple:u.length>1};return x.map(function(e,t){return WB(WB({data:n,layout:{direction:v},resources:{translator:o.translator},services:{focus:b},settings:a,state:s,styling:l},e),{},{meta:WB(WB(WB({},S),e.meta),{},{index:t,isFirst:0===t,isLast:t===x.length-1})})})}({callbacks:t,data:n,dock:r,key:i,resources:a,settings:s,state:l,styling:c});return XA.createElement("div",{style:u},d.map(function(e){return XA.createElement(XA.Fragment,{key:e.info.id},XA.createElement(TH,{source:e}),!e.meta.isLast&&XA.createElement("span",{dir:e.layout.direction,style:WB(WB({},c.title),{},{lineHeight:"normal"})},", "))}))}var JH,ZH='"Source Sans Pro", "Arial", "sans-serif"',QH="12px",eV=function(e){var t=e.rect,n=e.state,r=e.settings,i=r.callbacks,o=r.data,a=r.key,s=r.layout,l=r.resources,c=r.settings,u=r.style;return XH({callbacks:i,data:o,dock:s.dock,key:a,rect:t,resources:l,settings:c,state:n,styling:u})},tV={renderer:"react",require:["renderer"],disableTriggers:!0,key:"axis-title",defaultSettings:{callbacks:{onChange:function(){}},data:{alternatives:[],infos:[],filtered:[]},resources:{app:void 0,cache:void 0,model:void 0,selections:void 0,translator:void 0},settings:{isDisabled:function(){return!1},isRTL:!1,isSnapshot:!1,noModelDependencies:!1,skipAttributeExpressions:!1,type:"dimension"},style:{title:{color:"#333",fontFamily:ZH,fontSize:QH},popover:{color:"#595959CC",fontFamily:ZH,fontSize:QH}}},preferredSize:function(){var e=this.settings,t=e.data,n=e.settings,r=e.style,i=t.alternatives,o=n.type,a=r.title,s=a.fontSize,l=a.fontFamily,c=i.length||"measure"!==o?28:20,u=this.registries.renderer("svg")().measureText({text:"M",fontSize:s,fontFamily:l}).height;return Math.max(c,u)},created:function(){var e=this;this.state={inSelections:!1},this.listeners={onSelectionsActivated:function(){e.state.inSelections=!0,e.renderer.render(eV(e))},onSelectionsDeactivated:function(){e.state.inSelections=!1}}},beforeMount:function(){var e=this.settings.resources.selections;e&&(e.addListener("activated",this.listeners.onSelectionsActivated),e.addListener("deactivated",this.listeners.onSelectionsDeactivated),e.addListener("canceled",this.listeners.onSelectionsDeactivated))},render:function(){return eV(this)},beforeUnmount:function(){var e=this.settings.resources.selections;e&&(e.removeListener("activated",this.listeners.onSelectionsActivated),e.removeListener("deactivated",this.listeners.onSelectionsDeactivated),e.removeListener("canceled",this.listeners.onSelectionsDeactivated))}},nV=function(e){var t=e.dock,n=e.settings.label,r="center"===t,i=r?{}:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"};return XA.createElement("span",{style:i,title:n},r?n:"* ".concat(n))},rV={renderer:"react",disableTriggers:!0,key:"disclaimer",defaultSettings:{settings:{isRTL:!1,label:void 0},style:{fontFamily:'"Source Sans Pro", "Arial", "sans-serif"'}},preferredSize:function(){return 22},render:function(){var e=this.rect,t=this.settings,n=t.layout,r=t.settings,i=t.style;return function(e){var t=e.dock,n=e.rect,r=e.settings,i=e.styling,o=function(e){var t=e.dock;return"top"!==t&&"bottom"!==t||!e.isRTL?"ltr":"rtl"}({dock:t,isRTL:r.isRTL}),a=function(e){var t=e.dock,n=e.rect,r={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",color:"#7b7a78",fontStyle:"italic",fontSize:"13px",fontFamily:e.styling.fontFamily};return"left"===t&&(r.width="".concat(n.height,"px"),r.transform="rotate(-90deg) translate(-".concat(n.height,"px, 0)"),r.transformOrigin="top left"),"right"===t&&(r.width="".concat(n.height,"px"),r.transform="rotate(90deg) translate(0, -".concat(n.width,"px)"),r.transformOrigin="top left"),"center"===t&&(r.width="".concat(n.width,"px"),r.height="".concat(n.height,"px"),r.color="#595959",r.fontStyle="normal",r.fontSize="1.2em",r.textAlign="center"),"bottom"!==t&&"top"!==t||(r.justifyContent="flex-start",r.alignItems="flex-start"),r}({dock:t,rect:n,styling:i});return XA.createElement("div",{dir:o,style:a},XA.createElement(nV,{dock:t,settings:r}))}({dock:n.dock,rect:e,settings:r,styling:i})}},iV={},oV=function(){if(JH)return iV;JH=1;var e=TF;return iV.createRoot=e.createRoot,iV.hydrateRoot=e.hydrateRoot,iV}(),aV=$z({spacing:8,shadows:["none","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)"],transitions:{easing:{easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},duration:{standard:300,short:250,enteringScreen:225,shorter:200,leavingScreen:195,shortest:150,complex:375}},typography:{fontSize:14,fontWeightLight:300,fontWeightRegular:400,fontWeightMedium:600,fontWeightBold:700,htmlFontSize:14,fontFamily:"'Source Sans Pro', 'HelveticaNeue', 'Helvetica Neue', Helvetica, Arial, sans-serif",button:{fontWeight:600,fontSize:14,textTransform:"none"}},shape:{borderRadius:3},components:{MuiButtonBase:{defaultProps:{disableRipple:!0,disableTouchRipple:!0,focusVisibleClassName:"qcm-focus-visible"}},MuiButton:{defaultProps:{color:"inherit",disableRipple:!0,focusVisibleClassName:"qcm-focus-visible"},styleOverrides:{root:{height:"32px",lineHeight:"16px",minWidth:"24px",fontSize:141,borderRadius:3,"& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},text:{padding:"8px 16px","&:active":{backgroundColor:"rgba(0, 0, 0, 0.1)"},"&.Mui-focusVisible":{boxShadow:"inset 0 0 0 2px ".concat("#177FE6")}},outlined:{border:"1px solid rgba(0, 0, 0, 0.15)"},sizeSmall:{fontSize:12,height:"24px","& > svg:only-child, & > i:only-child":{marginLeft:"-7px",marginRight:"-7px"}},sizeLarge:{fontSize:16,height:"40px",lineHeight:"20px","& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},textSizeSmall:{padding:"4px 11px"},textSizeLarge:{padding:"10px 19px"}},variants:[]},MuiList:{styleOverrides:{padding:{paddingTop:"0px",paddingBottom:"0px"}}},MuiListItemButton:{styleOverrides:{root:{fontSize:14,height:"32px"}}},MuiListItemIcon:{styleOverrides:{root:{color:"#404040",minWidth:"16px",marginRight:"16px"}}},MuiListItemText:{styleOverrides:{root:{fontSize:"12px"},primary:{fontSize:14,color:"#404040",lineHeight:"16px",fontWeight:600},secondary:{fontSize:12,color:"#737373",fontWeight:400,lineHeight:"16px"}}}}});function sV(e){var t={x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1},margin:{left:0,top:0}},n=e||{},r=n.x,i=n.y,o=n.width,a=n.height,s=n.scaleRatio,l=n.margin;return t.x=Number.isNaN(r)||void 0===r?t.x:r,t.y=Number.isNaN(i)||void 0===i?t.y:i,t.width=Number.isNaN(o)||void 0===o?t.width:o,t.height=Number.isNaN(a)||void 0===a?t.height:a,void 0!==s&&(t.scaleRatio.x=Number.isNaN(s.x)?t.scaleRatio.x:s.x,t.scaleRatio.y=Number.isNaN(s.y)?t.scaleRatio.y:s.y),void 0!==l&&(t.margin.left=Number.isNaN(l.left)?0:l.left,t.margin.top=Number.isNaN(l.top)?0:l.top),t}function lV(){var e={rendererBox:sV(),container:void 0,root:void 0},t=function(){var t,n;null===(t=e.root)||void 0===t||t.unmount(),null===(n=e.container)||void 0===n||null===(n=n.parentElement)||void 0===n||n.removeChild(e.container),e.container=void 0};return{size:function(t){return t&&(e.rendererBox=sV(t)),e.rendererBox},element:function(){return e.container},appendTo:function(t){return e.container||(e.container=document.createElement("div"),e.container.style.position="absolute",e.container.style["-webkit-font-smoothing"]="antialiased",e.container.style["-moz-osx-font-smoothing"]="antialiased",e.container.style.pointerEvents="none",e.root=oV.createRoot(e.container)),t.appendChild(e.container),e.container},setKey:function(t){e.container&&e.container.setAttribute("data-key",t)},render:function(t){if(!e.container)return!1;var n=e.rendererBox,r=n.scaleRatio.x,i=n.scaleRatio.y;return e.container.style.left="".concat(Math.round(n.margin.left+n.x*r),"px"),e.container.style.top="".concat(Math.round(n.margin.top+n.y*i),"px"),e.container.style.width="".concat(Math.round(n.width),"px"),e.container.style.height="".concat(Math.round(n.height),"px"),e.container.style.transform="scale(".concat(r,", ").concat(i,")"),e.container.style.transformOrigin="top left",e.root.render(function(e){var t=e.nodes;return XA.createElement(XA.StrictMode,null,XA.createElement(cF,{theme:aV},t))}({nodes:t})),!0},findShapes:function(){return[]},itemsAt:function(){return[]},clear:function(){t()},destroy:function(){t()}}}const cV={getDefaultSettings:({size:e=10,fill:t="#999",alignment:n}={})=>({show:!0,type:"n-polygon",fill:t,stroke:"#000",strokeWidth:0,size:e,sides:3,startAngle:-90,alignment:n}),createOob({oob:e,dockValue:t,boxCenter:n,rendWidth:r,rendHeight:i,flipXY:o,symbol:a}){let s="x",l="y",c=r,u=i,d=t<.5?90:-90;return o&&(s="y",l="x",c=i,u=r,d=t<.5?180:0),a(bg({},e,{[s]:n*c,[l]:u-Math.max(e.size/2,Math.min(t*u,u-e.size/2)),startAngle:d}))}};function uV({i:e,width:t,height:n,resolved:r,keys:i,flipXY:o,calcKey:a="box"}){let s,l=null,c=null;void 0!==r.major.settings.binStart?(l=r.major.items[e].binStart,c=r.major.items[e].binEnd,s=r.major.settings.binStart.scale):(s=r.major.settings.major.scale,l=s?r.major.items[e].major:0);let u=0;s?s.bandwidth?(u=s.bandwidth(),l-=u/2):u=c-l:u=1;const d=bg({},{major:l,majorEnd:c},r.minor.items[e]);i.forEach(t=>{d[t]=r[t].items[e]});const f=o?n:t,h=function({bandwidth:e,width:t,minWidthPx:n,maxWidthPx:r,maxMajorWidth:i}){const o=e>=0?1:-1;let a=Math.min(o*e*t,Number.isNaN(Number(r))?i:r/i);return a=Number.isNaN(Number(n))?a:Math.max(n/i,a),a*o}({bandwidth:u,width:d[a].width,minWidthPx:d[a].minWidthPx,maxWidthPx:d[a].maxWidthPx,maxMajorWidth:f}),p=(u-h)/2,m=p+d.major+h/2;return{item:d,boxCenter:m,boxWidth:h,boxPadding:p,rendWidth:t,rendHeight:n}}function dV({keys:e,data:t,defaultSettings:n,style:r,settings:i,width:o,height:a,resolver:s}){const l=bg(!0,{},n||{},r||{}),c={major:"horizontal"===i.orientation?a:o,minor:"horizontal"===i.orientation?o:a},u=i.major;let d;d="object"==typeof u&&"object"==typeof u.ref&&void 0!==u.ref.start&&void 0!==u.ref.end?s.resolve({data:t,defaults:{start:0,end:1},scaled:c,settings:bg(!0,{},{binStart:{scale:i.major.scale,ref:i.major.ref.start},binEnd:{scale:i.major.scale,ref:i.major.ref.end}})}):"object"==typeof u&&void 0!==u.binStart&&void 0!==u.binEnd?s.resolve({data:t,defaults:{start:0,end:1},scaled:c,settings:bg(!0,{},{binStart:{scale:i.major.scale,ref:"binStart"},binEnd:{scale:i.major.scale,ref:"binEnd"}},i.major)}):s.resolve({data:t,scaled:c,defaults:{major:.5},settings:{major:i.major}});const f=i.minor||{};let h;const p={major:d,minor:s.resolve({data:t,defaults:{start:0,end:1},scaled:c,settings:bg(!0,{},{start:{scale:f.scale,ref:"start"},end:{scale:f.scale,ref:"end"},min:{scale:f.scale,ref:"min"},max:{scale:f.scale,ref:"max"},med:{scale:f.scale,ref:"med"}},f)})};for(let n=0,r=e.length;n<r;n++)h=e[n],p[h]=s.resolve({data:t,defaults:l[h],settings:i[h],scaled:c});return p}const fV=["oob"];const hV={require:["chart","resolver","symbol"],defaultSettings:{settings:{size:10},data:{},style:{}},created(){this.state={}},preferredSize(){return this.settings.settings.size},render(){const{width:e,height:t}=this.rect,{dockValue:n}=this.settings.settings,r="horizontal"===this.settings.settings.orientation,{data:i,style:o,resolver:a,symbol:s}=this,l=dV({keys:fV,data:i,defaultSettings:{oob:cV.getDefaultSettings()},style:o,settings:this.settings.settings,width:e,height:t,resolver:a}),{settings:c,items:u}=l,d=function({width:e,height:t,flipXY:n,resolved:r,keys:i,symbol:o,dockValue:a,_calcItemRenderingOpts:s=uV}){const l=[],{items:c}=r.major;for(let u=0,d=c.length;u<d;u++){const{item:d,boxCenter:f,rendWidth:h,rendHeight:p}=s({i:u,width:e,height:t,resolved:r,keys:i,flipXY:n,calcKey:"oob"}),m=c[u].data,g=[];if(d.oob.show){g.push(cV.createOob({oob:d.oob,dockValue:a,boxCenter:f,rendWidth:h,rendHeight:p,flipXY:n,symbol:o}));const e={type:"container",data:m,collider:{type:"bounds"},children:g};l.push(e)}}return l}({width:e,height:t,flipXY:r,resolved:l,keys:fV,symbol:s,dockValue:n});return d}},pV={size:25,hat:{show:!0,fill:"#999",stroke:"#000",strokeWidth:0,strokeLinejoin:"miter",width:1,maxWidthPx:void 0,minWidthPx:1,minHeightPx:1,alignment:0}},mV=["hat"];function gV(e,t=!0){let n="";for(let t=0;t<e.length;t++){const r=e[t];n+=0===t?`M${r.x} ${r.y}`:`L${r.x} ${r.y}`,n+=" "}return t&&(n+="Z"),n}function yV({item:e,boxWidth:t,boxPadding:n,rendWidth:r,rendHeight:i,flipXY:o}){let a="x",s="y",l=r,c=i,u=e.hat.alignment||0;o&&(a="y",s="x",l=i,c=r,u=1-u);const d=(n+e.major)*l;let f=[{[a]:d,[s]:0+c},{[a]:d+t*u*l,[s]:8},{[a]:d+t*l,[s]:0+c},{[a]:d+t*l,[s]:0+c+10},{[a]:d,[s]:0+c+10}];const h=bg({},e.hat,{type:"path",d:gV(f)});f=[{[a]:d,[s]:0},{[a]:d+t*(1-u)*l,[s]:0+c-8},{[a]:d+t*l,[s]:0},{[a]:d+t*l,[s]:-10},{[a]:d,[s]:-10}];return[h,bg({},e.hat,{type:"path",d:gV(f)})]}const vV={require:["chart","resolver","symbol"],defaultSettings:{settings:{size:25},data:{},style:{hat:"$shape"}},created(){this.state={}},preferredSize(){return this.settings.settings.size},render(){const{width:e,height:t}=this.rect,n="horizontal"===this.settings.settings.orientation,{data:r,style:i,resolver:o}=this,a=dV({keys:mV,data:r,defaultSettings:pV,style:i,settings:this.settings.settings,width:e,height:t,resolver:o}),{settings:s,items:l}=a,c=function({width:e,height:t,flipXY:n,resolved:r,keys:i,_calcItemRenderingOpts:o=uV}){const a=[],{items:s}=r.major;for(let l=0,c=s.length;l<c;l++){const{item:c,boxWidth:u,boxPadding:d,rendWidth:f,rendHeight:h}=o({i:l,width:e,height:t,resolved:r,keys:i,flipXY:n,calcKey:"hat"}),p=s[l].data,m=[];c.hat.show&&m.push(...yV({item:c,boxWidth:u,boxPadding:d,rendWidth:f,rendHeight:h,flipXY:n}));const g={type:"container",data:p,collider:{type:"bounds"},children:m};a.push(g)}return a}({width:e,height:t,flipXY:n,resolved:a,keys:mV});return c}};var bV={defaultSettings:{settings:{size:10}},preferredSize(){return this.settings.settings.size},render:()=>[]};function xV(e,t,n,r){const i=function(t){const n=String(t);return e(n)};return i.ticks=()=>t.map(t=>{const o=i([t.data.value,r?n-1:0]),a=i([t.data.value,r?0:n-1])+e.bandwidth();return{position:(o+a)/2,label:t.label,data:t.data,start:o,end:a}}),i.bandwidth=()=>e.bandwidth(),i.data=()=>e.data(),i.domain=()=>e.domain(),i.pxScale=function(r){const i=e.pxScale(r);return i===e?this:xV(i,t,n)},i}function SV(e){const t=e.scale("band");e.scale("group-by-measure",function(e={},n={},r={}){const i=t(e,n,r),o=i.domain(),a=i.ticks(),s=[],l=e.measureCount;return o.forEach((e,t)=>{for(let t=0;t<l;++t)s.push(String([e,t]));s.push(`SPACER_${t}_SPACER`)}),s.splice(-1),i.domain(s),xV(i,a,l,e.invert)})}function wV(){const e=vp();return e.use(ag),e.use(function(e){if("function"!=typeof e.interaction)return t=>{t.interaction("hammer",cg(e))};e.interaction("hammer",cg(Hammer))}(yg)),e.use(SV),e.renderer("react-qcm",lV),e.component("box-sliced-hat",vV),e.component("box-out-of-bounds",hV),e.component("disclaimer",rV),e.component("scrollbar",$A),e.component("scroll-hint",fO),e.component("reference-line-labels",gN),e.component("axis-overlay",LD.picassoComponents.axisOverlay),e.component("time-axis",LD.picassoComponents.timeAxis),e.component("space",bV),e.component("axis-title",tV),e.component("point-label",pv),e.scale("q-time-axis",LD.picassoScales.time),e}const MV={CUSTOM:{EXPRESSION:"customTooltipExpression",TITLE:"customTooltipTitle",DESCRIPTION:"customTooltipDescription",QUARANTINE:"customTooltip",IMAGES:"customTooltipImages"},CHART:{CONTAINER_ID:"tooltipContainerId",STATE:"customTooltipSessionState",CHART_OBJECT_ID:"customTooltipSessionObjectId",CHART_PARENT_TYPE:"TooltipChartParent",CHART_CHILD_TYPE:"TooltipChart",STYLE:{small:"140px",medium:"200px",large:"340px"}}};function kV(e){const t=e.split("/");return"qmem:"===t[0]&&""===t[1]}const CV={getImageSize(e,t){let n;function r(){n&&(clearTimeout(n),n=null)}function i(e){const t=e;t.onload=null,t.onerror=null,r()}const o={small:50,medium:200,large:340,original:340};return new Promise(a=>{const s=new Image;s.referrerPolicy="no-referrer",s.onload=()=>{let e;const{height:n,width:l}=s,c=o[t]*(n>l?1:n/l),u=o[t]*(l>n?1:l/n);!n||!l||0===n&&0===l?(e={height:20,width:20,imageError:!0},i(s)):"original"===t?(e={height:Math.min(c,n),width:Math.min(u,l)},r()):(e={height:c,width:u},r()),a(e)},s.onerror=()=>{i(s),a({height:20,width:20,imageError:!0})},s.src=e,n=setTimeout(()=>{i(s),a({height:20,width:20,imageError:!0})},3e3)})}};async function qV(e,t,n){let r=e.ref.qStaticContentUrl.qUrl;const i=function(e){let t,n,r,i,o,a;if(e&&(e.session?.options||e.enigmaModel?.session?.sessionConfig||e.session?.config?.url)){if(t=e.session.options||e.enigmaModel?.session.sessionConfig,!t){t=e.session?.config;const n=new URL(t.url);t.host=n.hostname,t.port=n.port,t.isSecure="wss:"===n.protocol}return a=void 0!==t.secure?t.secure:t.isSecure,n=a?"https://":"http://",r=t.host||"localhost",i=t.port?`:${t.port}`:"",o=t.prefix?t.prefix:"/","/"!==o[o.length-1]&&(o=`${o}/`),n+r+i+o}return""}(n);i&&(!function(e,t){const n=e.replace(t,"").replace(/^\.\.\//i,"/");n[0]}(r,i),r=r.replace(/"/g,'\\"'),r=r.replace(/'/g,"\\'"),r=function(e,t){return t+("/"===e[0]?e.substr(1):e)}(r,i));const{height:o,width:a,imageError:s}=await CV.getImageSize(r,t);return{src:r,size:t,height:o,width:a,imageError:s}}async function EV(e,t,n,r){const{app:i,flags:o}=t,a=e.layout?.tooltip?.imageComponents;if(!a)return[];const[s]=a,l=s.size||"small",c=s.type||"media";let u=-1;for(let e=0;e<n.length;e++)if(n[e].cId===s.cId){u=e;break}const d=r.data?.customTooltipAttrExps?.value||[];let f;if(-1!==u&&d[u]&&(f=d[u]),"media"===c&&s.ref?.qStaticContentUrl?.qUrl)return qV(s,l,i);if("url"===c)return async function(e,t,n,r,i){let o,a=n.ref;if(i&&i.label&&(a=i.label),t.isEnabled("IMAGE_BUNDLE_LOAD")&&e?.getImage&&kV(a))try{const t=`data:image/png;base64, ${await e.getImage(a)}`,{height:n,width:i,imageError:s}=await CV.getImageSize(t,r);o={src:t,size:r,height:n,width:i,imageError:s}}catch(e){}else{const{height:e,width:t,imageError:n}=await CV.getImageSize(a,r);o={src:a,size:r,height:e,width:t,imageError:n}}return o}(i,o,s,l,f);if(o.isEnabled("IMAGE_BUNDLE_LOAD")&&"field"===c&&f&&f.label){return async function(e,t,n,r){let i;const o=r.label,a=`qmem://${t.qFallbackTitle}/${o}`;if(kV(a))try{const t=await e.getImage(a);if(t){const e=`data:image/png;base64, ${t}`,{height:r,width:o,imageError:a}=await CV.getImageSize(e,n);i={src:e,size:n,height:r,width:o,imageError:a}}}catch(e){}return i}(i,n[u],l,f)}return[]}const DV={async addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){const i=t,o=[];for(let t=0;t<i.length;t++)o.push(EV(e,r,n,i[t]));const a=await Promise.all(o);for(let e=0;e<i.length;e++)i[e].data.customTooltipImages=[a[e]];return i},checkIfPromisesExist({customTooltipModel:e}){const t=e.layout?.tooltip?.imageComponents;return!!t&&t.length>0}},TV={async handlePromises({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){let i=t;return i=await DV.addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}),i},checkIfPromisesExist:({customTooltipModel:e})=>DV.checkIfPromisesExist({customTooltipModel:e})};const OV=(e,t)=>{const n=e?.qHyperCubeDef?.qDimensions,r=e?.qHyperCubeDef?.qMeasures,i=e?.qHyperCubeDef?.qInterColumnSortOrder,o=t;return{qInfo:{qType:MV.CHART.CHART_PARENT_TYPE,qId:MV.CHART.CHART_OBJECT_ID},qHyperCubeDef:{qDimensions:n,qMeasures:r,qInterColumnSortOrder:i,qInitialDataFetch:[{qWidth:0,qHeight:0}]},qStateName:o}},NV=e=>{const t=e.tooltip?.chart?.object?.refId;return{qInfo:{qType:MV.CHART.CHART_CHILD_TYPE},qExtendsId:t}};const AV={createContainer:({ctx:e,layout:t})=>{if(!(t.qHyperCube?.qDimensionInfo?.length<=0))return function(e,t){const n=t.tooltip?.chart?.style?.size??"medium",r=MV.CHART.STYLE[n];return[{content:[e.h("div",{style:{display:"flex",width:r,height:r,backgroundColor:"#FFFFFF",borderRadius:"5px",padding:"2px",color:"#595959"},colspan:2,id:MV.CHART.CONTAINER_ID})],colspan:2,style:{"text-align":e.rtl?"right":"left","max-width":r}},{}]}(e,t)},show:async({app:e,properties:t,selectedNodes:n,dimIndex:r,customTooltipModel:i,rtl:o})=>{const a=i,s=t?.tooltip?.chart?.object?.refId;if(a?.embed&&e.removeSessionAlternateState&&e.addSessionAlternateState&&s&&!(t.qHyperCubeDef.qDimensions.length<=0)){await AV.hide({app:e,customTooltipModel:i});try{await async function({app:e,properties:t,customTooltipModel:n}){const r=n,i=MV.CHART.STATE,o=t.qStateName;r.miniChartToken.alternateState||(r.miniChartToken.alternateState=i,await e.addSessionAlternateState(i,o),r.miniChartToken.alternateState=i)}({app:e,properties:t,customTooltipModel:i});const s=await async function({app:e,properties:t,customTooltipModel:n}){const r=n;r.miniChartToken.sessionObj?.id&&await e.destroySessionObject(r.miniChartToken.sessionObj.id);const i=MV.CHART.STATE,o=OV(t,i),a=await e.createSessionObject(o),s=NV(t);if(a.id!==MV.CHART.CHART_OBJECT_ID)return void e.destroySessionObject(a.id);r.miniChartToken.sessionObj=a;const l=await a.createChild(s);if(r.miniChartToken.sessionObj&&r.miniChartToken.sessionObj.id===a.id)return r.miniChartToken.model=l,l;e.destroySessionObject(a.id)}({app:e,properties:t,customTooltipModel:i});if(a.miniChartToken.alternateState&&a.miniChartToken.sessionObj&&s){const e=n.length>0&&void 0!==n[0].data?.value?[n[0].data?.value]:[],s=void 0!==r?r:t.qHyperCubeDef.qDimensions.length-1;if(2===t.qHyperCubeDef.qDimensions.length&&void 0===r&&n.length>0){const e=n[0].data.selectionOuterDimension??n[0].data.selectionDimension;if(e?.source?.field){const t=e?.source?.field.split("/"),n=t[t.length-1],r=void 0!==e.value?[e.value]:[];r.length>0&&void 0!==n&&a.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",Number(n),r,!1)}}e.length>0&&a.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",s,e,!1);const l=document.getElementById(MV.CHART.CONTAINER_ID),c={direction:o?"rtl":"ltr",isReadonly:!0,isPopover:!0,navigation:!1,selections:!1};a.miniChartToken.vis=await i.embed.render({element:l,model:a.miniChartToken.model,options:c,id:a.miniChartToken.model?.id,type:a.miniChartToken.model?.genericType})}}catch(t){await AV.hide({app:e,customTooltipModel:i})}}},hide:async({app:e,customTooltipModel:t})=>{const n=t;n?.embed&&(AV.destroyVisualization({customTooltipModel:t}),await e.destroySessionObject(MV.CHART.CHART_OBJECT_ID),n.miniChartToken.sessionObj=void 0,await async function({app:e,customTooltipModel:t}){const n=t,r=MV.CHART.STATE;n.miniChartToken.alternateState=void 0,await e.removeSessionAlternateState(r)}({app:e,customTooltipModel:t}))},destroyVisualization:({customTooltipModel:e})=>{const t=e;"function"==typeof t.miniChartToken?.vis?.destroy&&(t.miniChartToken.vis.destroy(),t.miniChartToken.vis=void 0)}};function _V(e){const t=e.qHyperCubeDef?e.qHyperCubeDef.qDimensions:e.qHyperCube.qDimensionInfo;if(t&&t.length>0)return t}function IV(){const{EXPRESSION:e,TITLE:t,DESCRIPTION:n,IMAGES:r}=MV.CUSTOM,i={};return i[e]=!0,i[t]=!0,i[n]=!0,i[r]=!0,i}function LV(e){const t=IV();return e.filter(e=>t[e.id])}const PV={getNodes(e,t){const n=function(e,t){let n=0,r=0;e.center?(n+=e.center.x,r+=e.center.y):(n+=e.clientX,r+=e.clientY);const i=t.element.getBoundingClientRect();return{cx:n-i.left,cy:r-i.top}}(e,t);return t.shapesAt({x:n.cx,y:n.cy})},getDataNodes(e,t){let n,r=[];const i={container:{bar:!0,"bullet-axis":!0},circle:{"point-component":!0}};return t.forEach(t=>{const o=t.data?.selectionDimension??t.data;if(!o||t.data?.customTooltipAttrExps||i[t.type]){if(t.data?.customTooltipAttrExps&&!t.data.customTooltipImages){const e=t;e.data.customTooltipImages=[],r.push(e)}}else{n||(n=[],Object.keys(i).forEach(t=>{n=n.concat(e.findShapes(t).filter(e=>e.data&&e.data.customTooltipAttrExps&&!e.data.customTooltipImages&&i[t][e.key]))}));const t=n.filter(e=>{const t=e.data.stack??e.data.selectionOuterDimension??e.data.selectionDimension;return t&&t.value===o.value&&t.label===o.label});t.length>0&&(r=r.concat(t[0]))}}),r},displayTooltip(e,t,{nodes:n,opts:r={},customTooltipModel:i,extractedNodes:o=[],hide:a}){if(i&&!a){const{layout:a,chart:s}=i,{attrExps:l}=PV.getAttrExprData(a);o.length||n.length?TV.handlePromises({customTooltipModel:i,nodes:PV.getDataNodes(s,o.length>0?o:n),attrExps:l,opts:r}).then(()=>{t.emit("show",e,n.length?{nodes:n}:void 0)}):t.emit("show",e,n.length?{nodes:n}:void 0)}else i?.miniChartToken?.alternateState&&AV.hide({app:r.app,customTooltipModel:i}),t.emit("hide")},checkIfPromisesExist:({customTooltipModel:e})=>TV.checkIfPromisesExist({customTooltipModel:e}),getAttrExps(e,t){const n=t,r=e.qHyperCubeDef?.qDimensions?"qAttributeExpressions":"qAttrExprInfo";return n[r]||(n[r]=[]),n[r]},getAttrExprData(e){let t=[],n="";const r=e.qHyperCube?.qDimensionInfo||[];if(r.length>0){const i=r.length-1;t=e.qHyperCube?.qDimensionInfo?.[i]?.qAttrExprInfo||[],n=`qDimensionInfo/${i}/qAttrExprInfo`}return{attrExps:t,fieldPath:n}},quarantineCustomTooltipAttrs(e,t={}){const n=e.qLayoutExclude?.quarantine?.[MV.CUSTOM.QUARANTINE];if(!n){!function(e,t){const n=t;let r=n.qLayoutExclude;r||(n.qLayoutExclude={quarantine:{}},r=n.qLayoutExclude),r.quarantine||(r.quarantine={}),r.quarantine[MV.CUSTOM.QUARANTINE]=[],e.forEach(e=>{r.quarantine[MV.CUSTOM.QUARANTINE].push(e)}),n.qLayoutExclude=r}(LV(t.qAttributeExpressions||[]),e)}},unquarantineCustomTooltipAttrs(e){const t=e,n=e.qLayoutExclude?.quarantine?.[MV.CUSTOM.QUARANTINE];n&&delete t.qLayoutExclude.quarantine[MV.CUSTOM.QUARANTINE]},setAttrsFromQuarantine(e,t){const n=_V(e);if(!n)return;const r=void 0!==t?t:n.length-1;if(!n[r])return;const i=this.getAttrExps(e,n[r]);if(0===LV(i).length){const t=e.qLayoutExclude?.quarantine?.customTooltip||[],n=[...i,...t],o=e;o.qHyperCubeDef?o.qHyperCubeDef.qDimensions[r].qAttributeExpressions=n:o.qHyperCube.qDimensionInfo[r].qAttrExprInfo=n}},moveCustomTooltipAttrs(e,t={},n=void 0){let r=[];const i=_V(e)||[];[...i,t].forEach(e=>{const t=LV(e.qAttributeExpressions||[]);t.length>0&&(r=t)});const o=IV(),a=i.map(e=>{const t=e,n=e.qAttributeExpressions||[];return t.qAttributeExpressions=n.filter(e=>!o[e.id]),t}),s=void 0!==n?n:a.length-1;a.length>0&&(a[s].qAttributeExpressions=a[s].qAttributeExpressions.concat(r));const l=e;e.qHyperCubeDef?l.qHyperCubeDef.qDimensions=a:l.qHyperCube.qDimensionInfo=a},addCallbackCustomTooltip(e){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e):(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},moveCallbackCustomTooltip(e,t){1===e.qHyperCubeDef.qDimensions.length&&(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e)),e.qHyperCubeDef.qDimensions.length>1&&this.moveCustomTooltipAttrs(e,t)},removeCallbackCustomTooltip(e,t){e.qHyperCubeDef.qDimensions.length>0?this.moveCustomTooltipAttrs(e,t):this.quarantineCustomTooltipAttrs(e,t)},replaceCallbackCustomTooltip(e,t){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e,t):(this.quarantineCustomTooltipAttrs(e,t),this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},shouldIgnoreDefaultRows:e=>e.tooltip?.hideBasic||0,DEBOUNCE_THRESHOLD:50,getFooterRow:(e,t)=>[{content:e,style:{"font-style":"italic","font-size":"12px","line-height":"16px",color:"rgba(255, 255, 255, 0.6)","text-align":t?"right":"left",direction:cT.detectTextDirection(e)},colspan:2},{}],getImageRow(e,t){const n=cT.detectTextDirection(e.src),r=[],i={style:{display:"block","margin-left":"auto","margin-right":"auto",overflow:"hidden",width:e.width,height:e.height}};if("original"===e.size||e.imageError){r.push(t.h("span",{style:{display:"inline-block",height:"100%","vertical-align":"middle"}}));const n=e.imageError?`${e.src}?${Math.random()}`:e.src;r.push(t.h("img",{style:{"max-width":e.width,"max-height":e.height,"vertical-align":"middle"},src:n,referrerpolicy:"no-referrer"})),i.style["text-align"]="center",i.style["white-space"]="nowrap"}else i.style["background-size"]="contain",i.style["background-repeat"]="no-repeat",i.style["background-position"]="center",i.style["background-image"]=`url('${e.src}')`;return[{content:[t.h("div",i,r),""],style:{"text-align":t.rtl?"right":"left",direction:n,"max-width":e.width},colspan:2},{}]}};function RV({layout:e,app:t,picasso:n,model:r,chart:i,translator:o,localeInfo:a,embed:s}){return{layout:e,app:t,picasso:n,model:r,chart:i,translator:o,localeInfo:a,useCustomTooltip:e.tooltip&&!e.tooltip.auto,utils:PV,miniChartToken:{},embed:s}}function zV(e,t,n,r){const i=t.qHyperCube?.[n]?.[r]?.qAttrExprInfo||[],o=[],a=e.qSubNodes&&e.qSubNodes[r]?e.qSubNodes[r].qAttrExps:e.qAttrExps;return a?(i.forEach((e,t)=>{const i=a.qValues&&a.qValues[t]?a.qValues[t]:void 0,s=void 0===i?"NaN":function(e,t){let n;switch(e.id){case MV.CUSTOM.EXPRESSION:n="NaN"===t.qNum||e.isCustomFormatted?void 0===t.qText?"NaN":t.qText:t.qNum;break;case MV.CUSTOM.TITLE:case MV.CUSTOM.DESCRIPTION:case MV.CUSTOM.IMAGES:n=void 0===t.qText?e.qFallbackTitle:t.qText;break;default:n="NaN"}return n}(e,i);o.push({source:{key:"qHyperCube",field:`${n}/${r}/qAttrExprInfo/${t}`},label:s,value:"value"})}),o):o}const FV={getNode(e,{dimensionCount:t}){if(!t||t<1)return;const n=t-1,r="qDimensionInfo";return{field:`${r}/${n}`,value:t=>zV(t,e,r,n)}}};const jV={getCustomAttrExps(e,t,n){const r={customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]},i=t.data?.customTooltipAttrExps?.value||[];if(Number.isNaN(i))return r;return function(e,t,n,r){const i={[MV.CUSTOM.TITLE]:!0,[MV.CUSTOM.DESCRIPTION]:!0},{attrExps:o,fieldPath:a}=PV.getAttrExprData(e);return 0===t.length||0===o.length||""===a||o.forEach((e,o)=>{const s=t[o];if(e.id===MV.CUSTOM.EXPRESSION&&s){const t=e.qFallbackTitle,i="NaN"===s.value||e.isCustomFormatted?s.value:n("qHyperCube").field(`${a}/${o}`).formatter()(s.value);r.customTooltipAttrExpsArr.push({label:t,value:i})}else if(i[e.id]&&s){const t="-"!==s.value&&"NaN"!==s.value?s.value:s.label;t&&"undefined"!==t&&r.customTooltipInfoAttrExpsArr.push({...e.id===MV.CUSTOM.TITLE&&{title:t},value:t,id:e.id})}}),r}(n,i.map(t=>uT.getMeasure(e,t)),e,r)}};function BV({nodes:e,layout:t,dataset:n}){const r=function(e,t,n){const r=[];return e.forEach(e=>{r.push(jV.getCustomAttrExps(n,e,t))}),r}(e,t,n);return r.reduce((e,t)=>({customTooltipAttrExpsArr:e.customTooltipAttrExpsArr.concat(t.customTooltipAttrExpsArr),customTooltipInfoAttrExpsArr:e.customTooltipInfoAttrExpsArr.concat(t.customTooltipInfoAttrExpsArr)}),{customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]})}function HV(e){const t=MV.CUSTOM.EXPRESSION,{qNumFormat:n,qLabel:r,qLabelExpression:i,cId:o}=e.qDef;return e.qLibraryId?{qLibraryId:e.qLibraryId,id:t,qNumFormat:n,qLabel:r,qLabelExpression:i,cId:o}:{qExpression:e.qDef.qDef,id:t,qNumFormat:n,qLabel:r,qLabelExpression:i,cId:o}}function VV(e){const t=e.qHyperCubeDef?.qDimensions;return t[t.length-1].qAttributeExpressions||[]}const $V={migrateProperties(e){const t=bg(!0,{},e),n=t.tooltip?.data?.qHyperCubeDef?.qMeasures||[];let r=VV(t);return r=function(e,t){return t.concat(e.map(e=>HV(e)))}(n,r),function(e,t){const n=t.qHyperCubeDef?.qDimensions;n[n.length-1].qAttributeExpressions=e}(r,t),delete t.tooltip?.data,t},getPatches(e){const t=e.tooltip?.data?.qHyperCubeDef?.qMeasures||[],n=e.qHyperCubeDef?.qDimensions.length-1,r=function(e,t,n){let r=e.length;const i=[];return t.forEach(e=>{const t=HV(e),o=JSON.stringify(t);i.push({qPath:`/qHyperCubeDef/qDimensions/${n}/qAttributeExpressions/${r}`,qOp:"add",qValue:o}),r++}),i.push({qPath:"/tooltip/data",qOp:"remove"}),i}(VV(e),t,n);return r},checkForBackwardCompatibility:(e,t)=>(e.qMeasureInfo||[]).length>0&&t.length>0,updateProperties(e,t){const n=new Promise(n=>{const r=t.qHyperCube?.qDimensionInfo||[],i=t.tooltip?.data?.qHyperCube||{},o=t.qMeta?.privileges?.includes("update");e&&e.getEffectiveProperties&&this.checkForBackwardCompatibility(i,r)&&e.getEffectiveProperties().then(t=>{if(o){const r=this.migrateProperties(t);e.setProperties(r).then(()=>{e.app.clearUndoBuffer(),n(!0)})}else{const r=this.getPatches(t);e.applyPatches(r,!0).then(()=>{e.app.clearUndoBuffer(),n(!0)})}}),n(!1)});return n}};var WV={attrExpr:$V};const{CUSTOM:UV}=MV;function YV({flags:e,layout:t,app:n,model:r,picasso:i,chart:o,translator:a,localeInfo:s,embed:l,options:c}){const u={properties:void 0},d=RV({layout:t,app:n,model:r,picasso:i,chart:o,translator:a,localeInfo:s,embed:l}),f="rtl"===c.direction,h=()=>{const e=!!u.properties?.qHyperCubeDef?.qDimensions.some(e=>e.qCalcCondition?.qCond?.qv);return!(!t.tooltip||t.tooltip.auto||e)};return{setProperties:e=>{u.properties=e},isEnabled:()=>h(),hideBasic:()=>h()&&Cx(t,"tooltip.hideBasic",!1),getAttributes:({dataset:e,nodes:n})=>{const r=BV({dataset:e,nodes:n,layout:t});return{title:r.customTooltipInfoAttrExpsArr.find(e=>e.id===UV.TITLE)?.title,description:r.customTooltipInfoAttrExpsArr.find(e=>e.id===UV.DESCRIPTION)?.value,measures:r.customTooltipAttrExpsArr}},hasImages:()=>PV.checkIfPromisesExist({customTooltipModel:d}),createImageRow:({value:e,h:t})=>PV.getImageRow(e,{h:t,rtl:f}),addImages:({nodes:r})=>{const i=PV.getDataNodes(o,r),{attrExps:a}=PV.getAttrExprData(t);return TV.handlePromises({customTooltipModel:d,nodes:i,attrExps:a,opts:{flags:e,app:n}})},chart:{isEnabled:()=>!!(h()&&t.tooltip?.chart?.object?.refId&&l&&"function"==typeof r?.getEffectiveProperties),hasLimitation:()=>!!n?.isInModalSelection?.(),createContainer:({h:e})=>AV.createContainer({layout:t,ctx:{h:e,rtl:f}}),createLimitationRow:()=>PV.getFooterRow(a.get("properties.tooltip.notselectedmessage"),f),show:({nodes:e,properties:t})=>AV.show({app:n,properties:t,selectedNodes:e,customTooltipModel:d,rtl:f}),hasAlternateState:()=>!!d.miniChartToken?.alternateState,hide:()=>AV.hide({app:n,customTooltipModel:d}),destroy:()=>AV.destroyVisualization({customTooltipModel:d})}}}var KV=7005;const GV=e=>e.qError?.qErrorCode!==KV,XV=e=>{if(e.qHyperCubeDef.qDimensions.length>1&&1===e.qHyperCubeDef.qMeasures.length){const t=e.qHyperCubeDef.qInterColumnSortOrder.indexOf(0);0!==t&&WD.moveArrayElement(e.qHyperCubeDef.qInterColumnSortOrder,t,0)}},JV=(e,t)=>{t>10?1!==e.qHyperCubeDef.qInterColumnSortOrder[0]&&WD.moveArrayElement(e.qHyperCubeDef.qInterColumnSortOrder,1,0):0!==e.qHyperCubeDef.qInterColumnSortOrder[0]&&WD.moveArrayElement(e.qHyperCubeDef.qInterColumnSortOrder,1,0)},ZV=e=>{if(!e.qHyperCubeDef)return;const t=e.qHyperCubeDef.qDimensions,n=e.qHyperCubeDef.qMeasures;1===t.length&&1===n.length&&(n[0].qSortBy.qSortByNumeric=-1,e.qHyperCubeDef.qInterColumnSortOrder.splice(0,e.qHyperCubeDef.qInterColumnSortOrder.length,1,0))},QV=(e,t)=>{const n=e.qHyperCubeDef.qDimensions,r=e.qHyperCubeDef.qMeasures;if(1===n.length&&1===r.length){const r=n[0];return r.qLibraryId?t.getDimension(r.qLibraryId).then(e=>e.getLayout()).then(t=>{if(t&&t.qDimInfos&&t.qDimInfos[0]){const n=t.qDimInfos[0].qCardinal;JV(e,n)}return r}):t.getField(r.qDef.qFieldDefs[0]).then(t=>t.getCardinal().then(t=>(JV(e,t),r)),()=>r)}return XV(e),Promise.resolve()};function e$(e){const t=e.qHyperCubeDef.qDimensions,n=e.qHyperCubeDef.qMeasures,{color:{mode:r}}=e;t.length>1&&e.color?Ex(e,"color.persistent",!0):"byDimension"===r&&n.length>1?Ex(e,"color.mode","byMultiple"):"byExpression"===r&&0===n.length?Ex(e,"color.mode","primary"):0===t.length&&n.length>0&&(Ex(e,"color.byMeasureDef",void 0),Ex(e,"color.byDimDef",void 0),1===n.length&&"byExpression"!==r&&Ex(e,"color.mode","primary"))}const t$=(e,t)=>{e$(t),cO(e),PV.addCallbackCustomTooltip(t)},n$=e=>{e$(e)};function r$({translator:e}){return{dimensions:{min:0,max:e=>e>1?1:2,description(t,n,r,i){let o;const a=i?.layout?i.layout.qHyperCube.qDimensionInfo.filter(e=>GV(e)).length:t.qHyperCubeDef.qDimensions.length;return r.isAutoChart&&n>a-1?o="Visualizations.Descriptions.Color":a>1&&0===n?"stacked"===t.barGrouping.grouping?o="Visualizations.Descriptions.Stack":(o="Visualizations.Descriptions.Group",t.qHyperCubeDef.qColumnOrder=[0,1,2]):o="Visualizations.Descriptions.Bars",e.get(o)},add:(e,t,n)=>(t.qHyperCubeDef.qDimensions.length>1&&"stacked"===t.barGrouping.grouping&&(t.qHyperCubeDef.qMode="K",t.qHyperCubeDef.qAlwaysFullyExpanded=!0),n?.app?QV(t,n.app).then(()=>(t$(e,t),e)):(ZV(t),t$(e,t),e)),move(e,t,n){const r=n.layout.qHyperCube.qDimensionInfo.filter(e=>GV(e)).length;r>1&&"stacked"===t.barGrouping.grouping&&(t.qHyperCubeDef.qMode="K",t.qHyperCubeDef.qAlwaysFullyExpanded=!0),XV(t),e$(t),PV.moveCallbackCustomTooltip(t,e)},remove(e,t){const n=t.qHyperCubeDef.qDimensions;e$(t),1===n.length&&(t.qHyperCubeDef.qMode="S"),PV.removeCallbackCustomTooltip(t,e)},replace(e,t,n,r){PV.replaceCallbackCustomTooltip(r,t)}},measures:{min:1,max:e=>e>1?1:15,description:()=>e.get("Visualizations.Descriptions.LengthBars"),add:(e,t,n)=>n?.app?QV(t,n.app).then(()=>(e.qSortBy.qSortByNumeric=-1,n$(t),e)):(ZV(t),n$(t),e),move(e,t){XV(t),e$(t)},remove(e,t){const n=t.qHyperCubeDef.qDimensions;e$(t),n.length>1&&"stacked"===t.barGrouping.grouping?(t.qHyperCubeDef.qMode="K",t.qHyperCubeDef.qAlwaysFullyExpanded=!0):1===n.length&&(t.qHyperCubeDef.qMode="S")}}}}function i$(e){return{properties:{version:"2.0.4",barGrouping:{grouping:"grouped"},color:{auto:!0,autoMinMax:!0,byDimDef:void 0,byMeasureDef:void 0,colorExpression:void 0,dimensionScheme:"12",expressionIsColor:!0,expressionLabel:"",formatting:{numFormatFromTemplate:!0,isCustomFormatted:void 0},measureMin:void 0,measureMax:void 0,measureScheme:"sg",mode:"primary",paletteColor:{index:6},persistent:!1,reverseScheme:!1,singleColor:void 0,useBaseColors:"off",useDimColVal:!0,useMeasureGradient:!0},components:[],dataPoint:{showLabels:!1,showSegmentLabels:!1,showTotalLabels:!0},dimensionAxis:{axisDisplayMode:"auto",continuousAuto:!0,dock:"near",label:"auto",maxVisibleItems:10,show:"all"},footnote:"",gridLine:{auto:!0,spacing:2},legend:{dock:"auto",show:!0,showTitle:!0},measureAxis:{autoMinMax:!0,dock:"near",max:10,min:0,minMax:"min",show:"all",spacing:1},orientation:"vertical",preferContinuousAxis:!0,qHyperCubeDef:{qDimensions:[],qMeasures:[],qInitialDataFetch:[{qWidth:17,qHeight:500}],qSuppressMissing:!0,qSuppressZero:!1},refLine:{refLines:[],dimRefLines:[]},scrollbar:"miniChart",scrollStartPos:0,showDetails:!0,showDisclaimer:!0,showMiniChartForContinuousAxis:!0,showTitles:!0,subtitle:"",title:"",tooltip:{auto:!0,hideBasic:!1,data:{qHyperCubeDef:void 0},chart:void 0,imageComponents:void 0}},data:{targets:[{path:"/qHyperCubeDef",...r$(e)}]}}}var o$={Common_Measures:{id:"Common.Measures",locale:{"de-DE":"Kennzahlen","en-US":"Measures","es-ES":"Medidas","fr-FR":"Mesures","it-IT":"Misure","ja-JP":"メジャー","ko-KR":"측정값","nl-NL":"Metingen","pl-PL":"Miary","pt-BR":"Medidas","ru-RU":"Меры","sv-SE":"Mått","tr-TR":"Hesaplamalar","zh-CN":"度量","zh-TW":"量值"}},Object_ChartTooltip_ColorExpression:{id:"Object.ChartTooltip.ColorExpression",locale:{"de-DE":"Farbformel","en-US":"Color expression","es-ES":"Expresión de color","fr-FR":"Expression de couleur","it-IT":"Espressione colore","ja-JP":"カラー表現","ko-KR":"색상 표현식","nl-NL":"Kleuruitdrukking","pl-PL":"Wyrażenie koloru","pt-BR":"Expressão de cor","ru-RU":"Выражение для цвета","sv-SE":"Färguttryck","tr-TR":"Renk ifadesi","zh-CN":"颜色表达式","zh-TW":"色彩運算式"}},Object_ChartTooltip_NMore:{id:"Object.ChartTooltip.NMore",locale:{"de-DE":"+{0} mehr","en-US":"+{0} more","es-ES":"+{0} más","fr-FR":"+{0} plus","it-IT":"+{0} altre","ja-JP":"さらに +{0}","ko-KR":"{0} 이상","nl-NL":"+{0} meer","pl-PL":"Jeszcze {0}","pt-BR":"+{0} mais","ru-RU":"Еще +{0}","sv-SE":"Fler än {0} ytterligare","tr-TR":"+{0} daha","zh-CN":"+{0} 以上","zh-TW":"其他 +{0} 個"}},Object_ChartTooltip_sumOfNegatives:{id:"Object.ChartTooltip.sumOfNegatives",locale:{"de-DE":"Summe negativer Werte","en-US":"Sum of negatives","es-ES":"Suma de negativos","fr-FR":"Somme des valeurs négatives","it-IT":"Somma valori negativi","ja-JP":"負の合計","ko-KR":"음수 합계","nl-NL":"Som negatieven","pl-PL":"Suma ujemnych","pt-BR":"Soma de negativos","ru-RU":"Сумма отрицательных значений","sv-SE":"Summan av negativa","tr-TR":"Negatif değerlerin toplamı","zh-CN":"负值总和","zh-TW":"負數總和"}},Object_ChartTooltip_sumOfPositives:{id:"Object.ChartTooltip.sumOfPositives",locale:{"de-DE":"Summe positiver Werte","en-US":"Sum of positives","es-ES":"Suma de positivos","fr-FR":"Sommes des valeurs positives","it-IT":"Somma valori positivi","ja-JP":"正の合計","ko-KR":"양수 합계","nl-NL":"Som positieven","pl-PL":"Suma dodatnich","pt-BR":"Soma de positivos","ru-RU":"Сумма положительных значений","sv-SE":"Summan av positiva","tr-TR":"Pozitif değerlerin toplamı","zh-CN":"正值总和","zh-TW":"正數總和"}},Object_Disclaimer_DataRangeIncludingZero:{id:"Object.Disclaimer.DataRangeIncludingZero",locale:{"de-DE":"Die logarithmische Skala wurde durch die lineare Skala ersetzt, weil der Datenbereich NULL enthält.","en-US":"The logarithmic scale has been replaced by a linear scale because the data range includes zero.","es-ES":"La escala logarítmica ha sido reemplazada por una escala lineal porque el rango de datos incluye cero.","fr-FR":"L'échelle logarithmique a été remplacée par une échelle linéaire, car la plage de données comprend la valeur zéro.","it-IT":"La scala logaritmica è stata sostituita da una scala lineare perché l'intervallo di dati include zero.","ja-JP":"データ範囲にゼロが含まれるため、Log スケールは Linear スケールで置換されています。","ko-KR":"데이터 범위에 0이 포함되어 있으므로 로그 눈금이 선형 눈금으로 바뀌었습니다.","nl-NL":"De logaritmische schaal is vervangen door een lineaire schaal omdat het gegevensbereik nullen bevat.","pl-PL":"Skala logarytmiczna została zastąpiona liniową, ponieważ zakres danych zawiera zero.","pt-BR":"A escala logarítmica foi substituída por uma escala linear, pois o intervalo de dados inclui zero.","ru-RU":"Логарифмический масштаб заменен линейным масштабом, поскольку диапазон данных включает ноль.","sv-SE":"Den logaritmiska skalan har ersatts av en linjär skala eftersom dataintervallet innehåller värdet noll.","tr-TR":"Veri aralığı sıfır değerini içerdiğinden, logaritmik ölçek yerine doğrusal ölçek kullanıldı.","zh-CN":"对数刻度已替换为线性刻度,因为该数据范围包括零。","zh-TW":"對數刻度已遭線性刻度取代,因為資料範圍包含零。"}},Object_Disclaimer_LimitedData:{id:"Object.Disclaimer.LimitedData",locale:{"de-DE":"Zurzeit wird nur ein beschränkter Datensatz angezeigt.","en-US":"Currently showing a limited data set.","es-ES":"Mostrando actualmente un conjunto limitado de datos.","fr-FR":"Affichage d'un ensemble de données limité pour l'instant.","it-IT":"Attualmente viene visualizzata una serie di dati limitata.","ja-JP":"現在、限定的なデータ セットを表示しています。","ko-KR":"현재 제한된 데이터 집합을 표시하고 있습니다.","nl-NL":"Momenteel wordt een beperkte gegevensverzameling getoond.","pl-PL":"Aktualnie przedstawiany jest ograniczony zestaw danych.","pt-BR":"Mostrando um conjunto de dados limitado.","ru-RU":"В настоящее время отображается ограниченный набор данных.","sv-SE":"Just nu visas en begränsad datauppsättning.","tr-TR":"Şu anda sınırlı bir veri kümesi gösteriliyor.","zh-CN":"当前正显示有限的数据集。","zh-TW":"目前顯示的是有限的資料集。"}},Object_Disclaimer_NegativeOrZeroValues:{id:"Object.Disclaimer.NegativeOrZeroValues",locale:{"de-DE":"Die in den Datensätzen enthaltenen negativen oder 0-Werte können nicht in diesem Diagramm dargestellt werden.","en-US":"The data set contains negative or zero values that cannot be shown in this chart.","es-ES":"El conjunto de datos contiene valores cero o negativos que no se pueden mostrar en este gráfico.","fr-FR":"L'ensemble de données contient des valeurs négatives ou égales à zéro impossibles à afficher dans ce graphique.","it-IT":"La serie di dati contiene valori negativi o uguali a zero che non possono essere visualizzati in questo grafico.","ja-JP":"データ セットには、本チャートに表示できない負の値またはゼロ値が含まれています。","ko-KR":"데이터 집합에 해당 차트에 표시할 수 없는 음수 값 또는 zero 값이 포함되어 있습니다.","nl-NL":"De gegevensverzameling bevat negatieve waarden of nulwaarden die niet kunnen worden weergegeven in deze diagram.","pl-PL":"Zestaw danych zawiera wartości ujemne lub zerowe, których nie można przedstawić w tym wykresie.","pt-BR":"O conjunto de dados contém valores negativos ou iguais a zero que não podem ser mostrados neste gráfico.","ru-RU":"Набор данных содержит отрицательные или нулевые значения, которые невозможно показать в этой диаграмме.","sv-SE":"Datauppsättningen innehåller negativa värden eller nollvärden som inte kan visas i detta diagram.","tr-TR":"Veri kümesi, bu grafikte gösterilemeyen negatif veya sıfır değerlerini içeriyor.","zh-CN":"数据集中包含无法在此图表中显示的负值或零值。","zh-TW":"資料集包含無法在此圖表中顯示的負值或零值。"}},Object_Disclaimer_NegativeValues:{id:"Object.Disclaimer.NegativeValues",locale:{"de-DE":"Die in den Datensätzen enthaltenen negativen Werte können nicht in diesem Diagramm dargestellt werden.","en-US":"The data set contains negative values that cannot be shown in this chart.","es-ES":"El conjunto de datos contiene valores negativos que no se pueden mostrar en este gráfico.","fr-FR":"Le jeu de données contient des valeurs négatives impossibles à afficher dans ce graphique.","it-IT":"Il set di dati contiene valori negativi che non possono essere visualizzati in questo grafico.","ja-JP":"このチャートには表示できない負の値がデータ セットに含まれています。","ko-KR":"데이터 집합에 해당 차트에 표시할 수 없는 음수 값이 포함되어 있습니다.","nl-NL":"De gegevensverzameling bevat negatieve waarden die niet kunnen worden weergegeven in dit diagram.","pl-PL":"Zestaw danych zawiera wartości ujemne, których nie można przedstawić na tym wykresie.","pt-BR":"O conjunto de dados contém valores negativos que não podem ser mostrados neste gráfico.","ru-RU":"Набор данных содержит отрицательные значения, которые нельзя отобразить на этой диаграмме.","sv-SE":"Datauppsättningen innehåller negativa värden som inte kan visas i det här diagrammet.","tr-TR":"Veri kümesi, bu grafikte gösterilemeyen negatif değerleri içeriyor.","zh-CN":"数据集包含无法在此图表中显示的负值。","zh-TW":"資料集包含無法在此圖表中顯示的負值。"}},Object_Disclaimer_NoDataExist:{id:"Object.Disclaimer.NoDataExist",locale:{"de-DE":"Die Auswahlen haben für dieses Diagramm keine Daten generiert.","en-US":"The selections generated no data for this chart.","es-ES":"Las selecciones no han generado datos para este gráfico.","fr-FR":"Les sélections n'ont pas généré de données pour ce graphique.","it-IT":"Le selezioni non hanno generato dati per questo grafico.","ja-JP":"このチャートには選択からデータが生成されませんでした。","ko-KR":"선택 내용으로 이 차트에 대한 데이터가 생성되지 않았습니다.","nl-NL":"De selecties hebben geen gegevens voor de diagram gegenereerd.","pl-PL":"Wymiary nie spowodowały wygenerowania danych dla tego wykresu.","pt-BR":"As seleções não geraram dados para este gráfico.","ru-RU":"В результате выборок данные для этой диаграммы не созданы.","sv-SE":"Urvalen genererade inga data för detta diagram.","tr-TR":"Seçimler bu grafik için hiç veri oluşturmadı.","zh-CN":"选择未生成此图表的数据。","zh-TW":"此選項無法產生任何適用於此圖表的資料。"}},Object_Disclaimer_OnlyNanColor:{id:"Object.Disclaimer.OnlyNanColor",locale:{"de-DE":"Die verwendeten Daten für die Farbgebung dieser Visualisierung enthalten undefinierte Werte.","en-US":"The data used to color this visualization only contains undefined values.","es-ES":"Los datos utilizados para colorear esta visualización solo contienen valores indefinidos.","fr-FR":"Les données utilisées pour colorer cette visualisation ne comportent que des valeurs non définies.","it-IT":"I dati utilizzati per colorare questa visualizzazione contengono solo valori non definiti.","ja-JP":"このビジュアライゼーションの色の割り当てに使用したデータには、未定義の値が含まれています。","ko-KR":"이 시각화에 색을 지정하는 데 사용된 데이터에는 정의되지 않은 값만 포함되어 있습니다.","nl-NL":"De gegevens die worden gebruikt om deze visualisatie kleur te geven bevatten uitsluitend ongedefinieerde waarden.","pl-PL":"Dane używane do kolorowania tej wizualizacji zawierają wyłącznie niezdefiniowane wartości.","pt-BR":"Os dados usados para colorir esse visualização contém somente valores indefinidos.","ru-RU":"Данные, используемые для выбора цвета визуализации, содержат только неопределенные значения.","sv-SE":"Data som används för att färgsätta denna visualisering innehåller enbart odefinierade värden.","tr-TR":"Bu görselleştirmeyi renklendirmek için kullanılan veriler yalnızca tanımlanmamış değerler içeriyor.","zh-CN":"用于将该可视化着色的数据仅包含未定义的值。","zh-TW":"用以定義此視覺化的色彩的資料只包含未定義的值。"}},Object_Disclaimer_OnlyNanData:{id:"Object.Disclaimer.OnlyNanData",locale:{"de-DE":"Das Diagramm wird nicht angezeigt, da es nur nicht definierte Werte enthält.","en-US":"The chart is not displayed because it contains only undefined values.","es-ES":"El gráfico no se muestra porque solo contiene valores indefinidos.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs non définies.","it-IT":"Il grafico non è visualizzato poiché contiene solo valori non definiti.","ja-JP":"未定義の値しか含まれていないため、チャートは表示されていません。","ko-KR":"정의되지 않은 값만 포함되어 있으므로 차트가 표시되지 않습니다.","nl-NL":"De diagram wordt niet weergegeven omdat deze alleen ongedefinieerde waarden bevat.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wyłącznie wartości niezdefiniowane.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores não definidos.","ru-RU":"Диаграмма не отображается, поскольку она содержит только неопределенные значения.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller odefinierade värden.","tr-TR":"Yalnızca tanımsız değerleri içermesi nedeniyle grafik görüntülenmiyor.","zh-CN":"未显示图表,因为它仅包含未定义的值。","zh-TW":"系統不會顯示圖表,因為該圖表僅包含未定義的值。"}},Object_Disclaimer_OnlyNegativeOrZeroValues:{id:"Object.Disclaimer.OnlyNegativeOrZeroValues",locale:{"de-DE":"Das Diagramm wird nicht angezeigt, da es nur negative oder 0-Werte enthält.","en-US":"The chart is not displayed because it contains only negative or zero values.","es-ES":"El gráfico no se muestra porque solo contiene valores negativos o valores cero.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs négatives ou égales à zéro.","it-IT":"Il grafico non viene visualizzato poiché contiene solo valori negativi o uguali a zero.","ja-JP":"チャートは負の値またはゼロ値しか含まれていないため、表示されていません。","ko-KR":"음수 또는 zero 값만 포함되어 있으므로 차트가 표시되지 않습니다.","nl-NL":"De diagram wordt niet weergegeven omdat deze alleen negatieve waarden of nulwaarden bevat.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wyłącznie wartości ujemne lub zerowe.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores negativos ou zero.","ru-RU":"Диаграмма не отображается, поскольку она содержит только отрицательные или нулевые значения.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller negativa värden eller nollvärden","tr-TR":"Yalnızca negatif veya sıfır değerlerini içermesi nedeniyle grafik görüntülenmiyor.","zh-CN":"未显示图表,因为它仅包含负值或零值。","zh-TW":"系統不會顯示圖表,因為該圖表僅包含負值或零值。"}},Object_Disclaimer_OnlyNegativeValues:{id:"Object.Disclaimer.OnlyNegativeValues",locale:{"de-DE":"Das Diagramm wird nicht angezeigt, da es nur negative oder Werte enthält.","en-US":"The chart is not displayed because it contains only negative values.","es-ES":"El gráfico no se muestra porque solo contiene valores negativos.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs négatives.","it-IT":"Il grafico non viene visualizzato poiché contiene solo valori negativi.","ja-JP":"負の値しか含まれていないため、チャートは表示されていません。","ko-KR":"음수 값만 포함되어 있으므로 차트가 표시되지 않습니다.","nl-NL":"Het diagram wordt niet weergegeven omdat deze alleen negatieve waarden bevat.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wyłącznie wartości ujemne.","pt-BR":"O gráfico não é exibido porque contém apenas valores negativos.","ru-RU":"Диаграмма не отображается, поскольку она содержит только отрицательные значения.","sv-SE":"Diagrammet visas inte eftersom det endast innehåller negativa värden.","tr-TR":"Yalnızca negatif değerleri içermesi nedeniyle grafik görüntülenmiyor.","zh-CN":"未显示图表,因为它仅包含负值。","zh-TW":"系統不會顯示圖表,因為該圖表僅包含負值。"}},Object_ErrorMessage_MissingDimension:{id:"Object.ErrorMessage.MissingDimension",locale:{"de-DE":"Dimension nicht gefunden","en-US":"Dimension not found","es-ES":"No se ha encontrado la dimensión","fr-FR":"Dimension introuvable","it-IT":"Dimensione non trovata","ja-JP":"軸が見つかりません","ko-KR":"차원을 찾지 못했습니다.","nl-NL":"Dimensie niet gevonden","pl-PL":"Wymiar nie został znaleziony","pt-BR":"Dimensão não encontrada","ru-RU":"Измерение не найдено","sv-SE":"Dimensionen hittades inte","tr-TR":"Boyut bulunamadı","zh-CN":"未找到维度","zh-TW":"找不到維度"}},Object_ErrorMessage_MissingMeasure:{id:"Object.ErrorMessage.MissingMeasure",locale:{"de-DE":"Kennzahl nicht gefunden","en-US":"Measure not found","es-ES":"No se ha encontrado la medida","fr-FR":"Mesure introuvable","it-IT":"Misura non trovata","ja-JP":"メジャーが見つかりません","ko-KR":"측정값을 찾지 못했습니다.","nl-NL":"Meting niet gevonden","pl-PL":"Miara nie została znaleziona","pt-BR":"Medida não encontrada","ru-RU":"Мера не найдена","sv-SE":"Måttet hittades inte","tr-TR":"Hesaplama bulunamadı","zh-CN":"未找到度量","zh-TW":"找不到量值"}},Tooltip_ToggleOffLassoSelection:{id:"Tooltip.ToggleOffLassoSelection",locale:{"de-DE":"Lasso-Auswahl deaktivieren","en-US":"Turn off lasso selection","es-ES":"Desactivar la selección de contorno","fr-FR":"Désactiver la sélection au lasso","it-IT":"Disattiva selezione lazo","ja-JP":"囲み選択をオフにする","ko-KR":"올가미 선택 끄기","nl-NL":"Lassoselectie uitschakelen","pl-PL":"Wyłącz zaznaczenie lasso","pt-BR":"Desativar seleção de laço","ru-RU":"Выключить выбор лассо","sv-SE":"Stäng av lassourval","tr-TR":"Serbest seçimi kapat","zh-CN":"关闭套索选择方法","zh-TW":"關閉套索選取"}},Tooltip_ToggleOnLassoSelection:{id:"Tooltip.ToggleOnLassoSelection",locale:{"de-DE":"Lasso-Auswahl aktivieren","en-US":"Turn on lasso selection","es-ES":"Activar la selección de contorno","fr-FR":"Activer la sélection au lasso","it-IT":"Attiva selezione lazo","ja-JP":"囲み選択をオンにする","ko-KR":"올가미 선택 켜기","nl-NL":"Lassoselectie inschakelen","pl-PL":"Włącz zaznaczenie lasso","pt-BR":"Ativar seleção de laço","ru-RU":"Включить выбор лассо","sv-SE":"Slå på lassourval","tr-TR":"Serbest seçimi aç","zh-CN":"开启套索选择方法","zh-TW":"開啟套索選取"}},Tooltip_dimensions_cyclic:{id:"Tooltip.dimensions.cyclic",locale:{"de-DE":"Zyklische Dimension","en-US":"Cyclic dimension","es-ES":"Dimensión cíclica","fr-FR":"Dimension cyclique","it-IT":"Dimensione ciclica","ja-JP":"サイクリック軸","ko-KR":"순환 차원","nl-NL":"Cyclische dimensie","pl-PL":"Wymiar cykliczny","pt-BR":"Dimensão cíclica","ru-RU":"Циклическое измерение","sv-SE":"Cyklisk dimension","tr-TR":"Döngüsel boyut","zh-CN":"循环维度","zh-TW":"循環維度"}},Tooltip_dimensions_drilldown:{id:"Tooltip.dimensions.drilldown",locale:{"de-DE":"Drilldown-Dimension","en-US":"Drill-down dimension","es-ES":"Dimensión jerárquica","fr-FR":"Descendre dans la hiérarchie de la dimension","it-IT":"Dimensione di drill-down","ja-JP":"軸のドリルダウン","ko-KR":"드릴다운 차원","nl-NL":"Drill-downdimensie","pl-PL":"Wymiar hierarchiczny","pt-BR":"Dimensão da hierarquia","ru-RU":"Детализированное измерение","sv-SE":"Hierarkisk dimension","tr-TR":"Detaya inme boyutu","zh-CN":"下钻维度","zh-TW":"向下探查維度"}},Tooltip_selections_locked:{id:"Tooltip.selections.locked",locale:{"de-DE":"Auswahlen sind für diese Dimension gesperrt","en-US":"Selections on this dimension are locked","es-ES":"Las selecciones de esta dimensión están bloqueadas.","fr-FR":"Sélections verrouillées pour cette dimension","it-IT":"Le selezioni in questa dimensione sono bloccate","ja-JP":"この軸での選択はロックされています","ko-KR":"이 차원의 선택은 잠겨 있습니다.","nl-NL":"Selecties voor deze dimensie zijn vergrendeld","pl-PL":"Wybory dotyczące tego wymiaru są zablokowane","pt-BR":"Seleções estão bloqueadas nesta dimensão","ru-RU":"Выборки для данного измерения заблокированы","sv-SE":"Urval i den här dimensionen är låsta","tr-TR":"Bu boyuttaki seçimler kilitli","zh-CN":"相关维度的选择已锁定","zh-TW":"已鎖定此維度上的選項"}},Visualizations_Descriptions_Bars:{id:"Visualizations.Descriptions.Bars",locale:{"de-DE":"Balken","en-US":"Bars","es-ES":"Barras","fr-FR":"Barres","it-IT":"Barre","ja-JP":"棒","ko-KR":"막대","nl-NL":"Staven","pl-PL":"Słupki","pt-BR":"Barras","ru-RU":"Полосы","sv-SE":"Staplar","tr-TR":"Çubuklar","zh-CN":"条形","zh-TW":"長條"}},Visualizations_Descriptions_HeightLine:{id:"Visualizations.Descriptions.HeightLine",locale:{"de-DE":"Linienhöhe","en-US":"Height of line","es-ES":"Altura de línea","fr-FR":"Hauteur de ligne","it-IT":"Altezza della linea","ja-JP":"線の高さ","ko-KR":"선 높이","nl-NL":"Hoogte van lijn","pl-PL":"Wysokość linii","pt-BR":"Altura da linha","ru-RU":"Высота линии","sv-SE":"Linjens höjd","tr-TR":"Çizgi yüksekliği","zh-CN":"线高度","zh-TW":"折線高度"}},Visualizations_Descriptions_LengthBars:{id:"Visualizations.Descriptions.LengthBars",locale:{"de-DE":"Balkenlänge","en-US":"Length of bars","es-ES":"Longitud de barras","fr-FR":"Longueur des barres","it-IT":"Lunghezza delle barre","ja-JP":"棒の長さ","ko-KR":"막대 길이","nl-NL":"Lengte van staven","pl-PL":"Długość słupków","pt-BR":"Comprimento das barras","ru-RU":"Длина полос","sv-SE":"Staplarnas längd","tr-TR":"Çubuk uzunluğu","zh-CN":"条形长度","zh-TW":"長條長度"}},properties_dataPoints_labelmode_share:{id:"properties.dataPoints.labelmode.share",locale:{"de-DE":"Freigeben","en-US":"Share","es-ES":"Compartir","fr-FR":"Partage","it-IT":"Condividi","ja-JP":"共有","ko-KR":"공유","nl-NL":"Delen","pl-PL":"Udostępnij","pt-BR":"Compartilhar","ru-RU":"Совместное использование","sv-SE":"Dela","tr-TR":"Paylaş","zh-CN":"共享","zh-TW":"共用"}},properties_trendlines_types_average:{id:"properties.trendlines.types.average",locale:{"de-DE":"Durchschnitt","en-US":"Average","es-ES":"Media","fr-FR":"Moyenne","it-IT":"Media","ja-JP":"平均値","ko-KR":"평균","nl-NL":"Gemiddelde","pl-PL":"Średnia","pt-BR":"Média","ru-RU":"Среднее","sv-SE":"Medel","tr-TR":"Ortalama","zh-CN":"平均值","zh-TW":"平均值"}},properties_trendlines_types_exponential:{id:"properties.trendlines.types.exponential",locale:{"de-DE":"Exponentiell","en-US":"Exponential","es-ES":"Exponencial","fr-FR":"Exponentiel","it-IT":"Esponenziale","ja-JP":"指数","ko-KR":"지수","nl-NL":"Exponentieel","pl-PL":"Wykładnicze","pt-BR":"Exponencial","ru-RU":"Экспоненциальный","sv-SE":"Exponentiell","tr-TR":"Üstel","zh-CN":"指数","zh-TW":"指數"}},properties_trendlines_types_linear:{id:"properties.trendlines.types.linear",locale:{"de-DE":"Linear","en-US":"Linear","es-ES":"Lineal","fr-FR":"Linéaire","it-IT":"Lineare","ja-JP":"線形","ko-KR":"선형","nl-NL":"Lineair","pl-PL":"Liniowe","pt-BR":"Linear","ru-RU":"Линейный","sv-SE":"Linjär","tr-TR":"Doğrusal","zh-CN":"线性","zh-TW":"線性"}},properties_trendlines_types_logarithmic:{id:"properties.trendlines.types.logarithmic",locale:{"de-DE":"Logarithmisch","en-US":"Logarithmic","es-ES":"Logarítmica","fr-FR":"Logarithmique","it-IT":"Logaritmica","ja-JP":"対数","ko-KR":"로그","nl-NL":"Logaritmisch","pl-PL":"Logarytmiczne","pt-BR":"Logarítmico","ru-RU":"Логарифмический","sv-SE":"Logaritmisk","tr-TR":"Logaritmik","zh-CN":"对数","zh-TW":"對數"}},properties_trendlines_types_polynomial2:{id:"properties.trendlines.types.polynomial2",locale:{"de-DE":"Polynom zweiten Grades","en-US":"Second degree polynomial","es-ES":"Polinómica de segundo grado","fr-FR":"Polynomial du 2ème degré","it-IT":"Polinomio di secondo grado","ja-JP":"2 番目の角度の多項式近似","ko-KR":"2차 다항식","nl-NL":"Tweedegraadspolynoom","pl-PL":"Wielomianowe drugiego stopnia","pt-BR":"Polinômio de segundo grau","ru-RU":"Полиномиальный второй степени","sv-SE":"Polynomial, andra graden","tr-TR":"İkinci derece polinom","zh-CN":"二次多项式","zh-TW":"第二度多項式"}},properties_trendlines_types_polynomial3:{id:"properties.trendlines.types.polynomial3",locale:{"de-DE":"Polynom dritten Grades","en-US":"Third degree polynomial","es-ES":"Polinómica de tercer grado","fr-FR":"Polynomial du 3ème degré","it-IT":"Polinomio di terzo grado","ja-JP":"3 番目の角度の多項式近似","ko-KR":"3차 다항식","nl-NL":"Derdegraadspolynoom","pl-PL":"Wielomianowe trzeciego stopnia","pt-BR":"Polinômio de terceiro grau","ru-RU":"Полиномиальный третьей степени","sv-SE":"Polynomial, tredje graden","tr-TR":"Üçüncü derece polinom","zh-CN":"三次多项式","zh-TW":"第三度多項式"}},properties_trendlines_types_polynomial4:{id:"properties.trendlines.types.polynomial4",locale:{"de-DE":"Polynom vierten Grades","en-US":"Fourth degree polynomial","es-ES":"Polinómica de cuarto grado","fr-FR":"Polynomial du 4ème degré","it-IT":"Polinomio di quarto grado","ja-JP":"4 番目の角度の多項式近似","ko-KR":"4차 다항식","nl-NL":"Vierdegraadspolynoom","pl-PL":"Wielomianowe czwartego stopnia","pt-BR":"Polinômio de quarto grau","ru-RU":"Полиномиальный четвертой степени","sv-SE":"Polynomial, fjärde graden","tr-TR":"Dördüncü derece polinom","zh-CN":"四次多项式","zh-TW":"第四度多項式"}},properties_trendlines_types_power:{id:"properties.trendlines.types.power",locale:{"de-DE":"Potenz","en-US":"Power","es-ES":"Potencia","fr-FR":"Puissance","it-IT":"Potenza","ja-JP":"累乗","ko-KR":"거듭제곱","nl-NL":"Macht","pl-PL":"Potęgowe","pt-BR":"Potência","ru-RU":"Степенной","sv-SE":"Potens","tr-TR":"Üs","zh-CN":"幂","zh-TW":"乘冪"}}};function a$({env:t}){const{flags:n}=t,r=t.anything?.sense?.isUnsupportedFeature,i=e.useTranslator();!function(e){if(e&&e.get&&e.add){const t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(o$).forEach(t=>{e.add(o$[t])})}}(t.translator);const o=e.useEmbed(),a=e.useTheme(),[s,l]=e.useState(),c=e.useDeviceType(),u=e.useAppLayout(),{qLocaleInfo:d}=u;return e.useEffect(()=>{l({translator:i,theme:a,embed:o,deviceType:c,localeInfo:d,isUnsupportedFeature:r,flags:n})},[d,r,i.language(),a.name(),c]),s}function s$(){const[t]=e.useState(()=>Dx()),[n]=e.useState(()=>function(e){var t=ly({},e),n={},r={},i=!1,o={get:function(e){return t[e]},set:function(e,o){var a=t[e];!i&&n[e]?t[e]=n[e](o,a):t[e]=o,!i&&r[e]&&r[e](t[e],a)},preventSet:function(e,t){i=!0,o.set(e,t),i=!1},intercept:function(e,t){n[e]=t},onChanged:function(e,t){r[e]=t}};return o}({viewRange:[0,1],scrollOffset:void 0}));return{viewCache:t,viewState:n}}const l$="REJECTED",c$=()=>{},u$=2,d$=20,f$=200,h$=10;var p$={contains:function(e,t){if(!e)return!1;const{qArea:n}=e;return!!n&&(n.qLeft<=t.qLeft&&n.qLeft+n.qWidth>=t.qLeft+t.qWidth&&n.qTop<=t.qTop&&n.qTop+n.qHeight>=t.qTop+t.qHeight)},patcher:function({layoutService:e}){const t=t=>{t.qArea.qHeight=t.qMatrix.length,t.qArea.qWidth=e.meta.size.x};return t.should=e=>0===e.qArea.qHeight&&0===e.qArea.qWidth&&!!e.qMatrix.length,t},slicer:function(e,t){const n=Math.max(0,t.qHeight)-Math.abs(Math.min(0,t.qTop-e.qArea.qTop)),r=Math.max(0,t.qWidth)-Math.abs(Math.min(0,t.qLeft-e.qArea.qLeft)),i=Math.max(t.qTop,e.qArea.qTop),o=Math.max(t.qLeft,e.qArea.qLeft),a=Math.max(0,i-e.qArea.qTop),s=Math.min(i+n-e.qArea.qTop,e.qArea.qHeight),l=Math.max(0,o-e.qArea.qLeft),c=Math.min(o+r-e.qArea.qLeft,e.qArea.qWidth),u={qArea:{qHeight:s-a,qWidth:c-l,qTop:i,qLeft:o},qMatrix:[]};for(let t=a;t<s;t++)u.qMatrix.push(e.qMatrix[t].slice(l,c));return u},cacheWarden:function({bounds:e={width:0,height:0}}){return{release(t,n){const r=n.qTop-h$<=t.qTop,i=n.qLeft+n.qWidth+h$>=t.qLeft+t.qWidth,o=n.qTop+n.qHeight+h$>=t.qTop+t.qHeight,a=n.qLeft-h$<=t.qLeft;return r&&t.qTop>0||i&&t.qLeft+t.qWidth<e.width||o&&t.qTop+t.qHeight<e.height||a&&t.qLeft>0}}},request:function({definitionPath:e}){return t=>({method:"getHyperCubeData",args:[e,[t]]})}};var m$={contains:function(e,t){if(!e)return!1;const{qArea:n}=e;return!!n&&(n.qTop<=t.qTop&&n.qTop+n.qHeight>=t.qTop+t.qHeight)},patcher:function({layoutService:e}){const t=t=>{t.qArea.qHeight=t.qData[0].qSubNodes.length,t.qArea.qWidth=e.meta.size.x};return t.should=e=>0===e.qArea.qHeight&&0===e.qArea.qWidth&&!!e.qData.length,t},slicer:function(e,t){const n=Math.max(0,t.qHeight)-Math.abs(Math.min(0,t.qTop-e.qArea.qTop)),r=Math.max(t.qTop,e.qArea.qTop),i=Math.max(t.qLeft,e.qArea.qLeft),o=Math.max(0,r-e.qArea.qTop),a=Math.min(r+n-e.qArea.qTop,e.qArea.qHeight),s=e.qData[0].qUp+e.qArea.qHeight+e.qData[0].qDown-r-(a-o),l={qArea:{qHeight:a-o,qWidth:e.qArea.qWidth,qTop:r,qLeft:i},qData:[{...e.qData[0],qUp:r,qDown:s,qSubNodes:[]}]};for(let t=o;t<a;t++)l.qData[0].qSubNodes.push(e.qData[0].qSubNodes[t]);return l},cacheWarden:function({bounds:e={height:0}}){return{release(t,n){const r=n.qTop-h$<=t.qTop,i=n.qTop+n.qHeight+h$>=t.qTop+t.qHeight;return r&&t.qTop>0||i&&t.qTop+t.qHeight<e.height}}},request:function({definitionPath:e}){return t=>({method:"getHyperCubeStackData",args:[e,[t]]})}};var g$={contains:function(){return!1},patcher:function(){const e=e=>e;return e.should=()=>!1,e},slicer:function(e){return e},cacheWarden:function(){return{release:()=>!0}},request:function({definitionPath:e}){return t=>({method:"getHyperCubeTreeData",args:[e,[t]]})}};const y$="pages";const v$="discretePan";function b$({chart:e,actions:t,componentKey:n,dockService:r,rtl:i,scroller:o}){return{type:"Pan",key:"discrete:pan",options:{event:v$,pointers:1,threshold:10,enable(r,i){return this.started===v$||!i||!(!t.scroll.enabled()||!o.enabled())&&e.componentsFromPoint({x:i.center.x,y:i.center.y}).some(e=>e.key===n)}},events:{[`${v$}start`](e){e.preventDefault(),this.started=v$;const t="horizontal"===r.meta.major.orientation?e.deltaX:e.deltaY;this.previousTotalDelta=t<0?-10:10},[`${v$}move`](e){e.preventDefault();const t="horizontal"===r.meta.major.orientation,n=t?e.deltaX:e.deltaY,a=t&&i?-1:1,s=(n-this.previousTotalDelta)*a;this.previousTotalDelta=n,o.scroll(s)},[`${v$}end`](e){e.preventDefault(),this.started=!1},[`${v$}cancel`](e){e.preventDefault(),this.started=!1}}}}function x$({chart:e,componentKey:t,actions:n,scroller:r}){return function(i){if(!n.scroll.enabled()||!r.enabled())return;const[o]=e.componentsFromPoint({x:i.clientX,y:i.clientY}).filter(e=>e.key===t);if(!o)return;i.preventDefault();const a=Math.abs(i.deltaY)>Math.abs(i.deltaX)?i.deltaY:i.deltaX,s=100*Math.sign(-a);r.scroll(s)}}function S$({layoutService:e}){const t=function({layoutService:e}){const t=Math.floor(1e4/(e.meta.dimensionCount+e.meta.measureCount));return function({width:e,height:n}){const r=Math.min(t,Math.max(f$,n));return{width:e,height:Math.max(d$,Math.min(n*u$,r))}}}({layoutService:e}),n={width:e.meta.size.x,height:e.meta.size.y};return function(e){const{width:r,height:i}=t({width:e.qWidth,height:e.qHeight}),o=i?Math.ceil((i-e.qHeight)/2):0,a=r?Math.ceil((r-e.qWidth)/2):0;return{qHeight:i?Math.min(i,n.height):e.qHeight,qWidth:r?Math.min(r,n.width):e.qWidth,qTop:i?Math.max(0,Math.min(e.qTop-o,n.height-i)):e.qTop,qLeft:r?Math.max(0,Math.min(e.qLeft-a,n.width-r)):e.qLeft}}}function w$(e){let t,n;const r=i=>{t=i;const{method:o,args:a}=t.request;e[o](...a).then(e=>{if(t.canceled||n)return t.reject(l$),t=null,void(n&&(r(n),n=null));t.resolve(e[0]),t=null})},i=e=>new Promise((i,o)=>{const a={request:e,resolve:i,reject:o,canceled:!1,cancel:()=>{a.canceled=!0}};t?(e=>{n&&n.reject(l$),n=e})(a):r(a)});return i.isProcessing=()=>!!t,i.hasQueued=()=>!!n,i.cancel=()=>{i.isProcessing()&&t.cancel(),i.hasQueued()&&(n.reject(l$),n=null)},i}const M$={command:{update:()=>{}}};function k$({dataStore:e,composition:t,enigmaModel:n,layoutService:r,trendLineModel:i=M$,definitionPath:o,processDataPage:a}){const{slicer:s,cacheWarden:l,request:c}=t,u=function({dataStore:e,slice:t,warden:n,expand:r,request:i,process:o,connectionless:a,processDataPage:s}){return(l,{onProcessing:c}={})=>{if(e.contains(l)){const r=e.getCurrent();if(a)return Promise.resolve(t(r,l));const i=n.release(r.qArea,l),s=o.isProcessing();if(!i&&s&&o.cancel(),!i||s)return Promise.resolve(t(r,l))}if(a)return Promise.resolve(e.getCurrent());o.isProcessing()&&c&&c();const u=r(l);return o(i(u)).then(n=>(s(n),e.add(n),t(n,l)))}}({dataStore:e,slice:s,warden:l({bounds:{width:r.meta.size.x,height:r.meta.size.y}}),expand:S$({layoutService:r}),request:c({definitionPath:o}),process:w$(n),connectionless:r.meta.isSnapshot,processDataPage:a}),d=Nx((e,{onProcessing:t,onData:n})=>{u(e,{onProcessing:t}).then(e=>n(e)).catch(e=>{if(e!==l$)throw e})},50);return function(e,{onProcessing:t=c$,onDataPage:n=c$}={}){d(e,{onProcessing:t,onData:e=>{r.setDataPages(e?[e]:[]),i.command.update(),n(e)}})}}var C$={inTotal:function({layoutService:e}){return e.meta.size.x},area:function({layoutService:e}){return{qTop:0,qHeight:1,qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:r}){const{pixel:i}=t,o=e.getDataPages()[0],a=i/r;return[a,n.inView>=n.inTotal?a+1:a+o.qArea.qWidth/n.inView]}};var q$={inTotal:function({layoutService:e}){if(e.meta.isSnapshot&&!e.getLayoutValue("reducedHyperCube")){const[t]=e.getDataPages();if(t)return t.qArea.qHeight}return e.meta.size.y},area:function({layoutService:e,itemOffset:t,inView:n,areaBuffer:r}){const i=void 0===r?4:r,o=Math.max(0,Math.floor(t)-i/2);return{qTop:o,qHeight:Math.min(e.meta.size.y-o,Math.max(0,Math.ceil(n+i))),qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:r}){const{pixel:i}=t,o=e.getDataPages()[0],a=r/n.inView,s=(i+o.qArea.qTop*a)/r;return[s,n.inView>=n.inTotal?s+1:s+o.qArea.qHeight/n.inView]}};function E$(e){const{groupSize:t,measureCount:n}=e.meta;return t??n}function D$(e,t){const n=[];for(let r=0;r<e.length;r++){const i=t(e[r]);-1===n.indexOf(i)&&n.push(i)}return n.length}function T$(e){return D$(e.qMatrix,e=>e[0].qElemNumber)-1}var O$={inTotal:function({layoutService:e}){const t=E$(e);return e.meta.size.y*t*(1+1/t)-1},area:function({layoutService:e,itemOffset:t,inView:n,areaBuffer:r}){const i=E$(e),o=void 0===r?i:r,a=t/(i+1),s=Math.max(0,Math.floor((t-a-o/2)/i));return{qTop:s,qHeight:Math.min(e.meta.size.y-s,Math.max(0,Math.ceil((n+o)/i+1))),qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:r}){const i=E$(e),o=e.getDataPages()[0],a=r/n.inView,{pixel:s}=t,l=T$(o),c=o.qArea.qHeight*i+l,u=(s+(o.qArea.qTop*i+o.qArea.qTop)*a)/r;return[u,n.inView>=n.inTotal?u+1:u+c/n.inView]}};const N$=(e,t)=>t/(e.meta.size.y/e.meta.size.dimensions[0]+1);function A$(e){return{itemOffset(t,n){if(0!==t.qArea.qTop)return N$(e,n);const r=((e,t)=>{const n={successful:!0,count:0};let r=Math.abs(Math.floor(t));const i=[];for(let t=0;t<=r;t++){if(!e[t])return n.successful=!1,n;const o=e[t][0].qElemNumber;-1===i.indexOf(o)&&(i.push(o),r--)}return n.count=i.length-1,n})(t.qMatrix,n);return r.successful?r.count:N$(e,n)},area(t,n,r){if(0!==t.qArea.qTop)return N$(e,n);return D$(t.qMatrix.slice(0,r.qTop+1),e=>e[0].qElemNumber)-1}}}var _$={inTotal:function({layoutService:e}){return e.meta.size.y+e.meta.size.dimensions[0]-1},area:function({getDataPages:e,layoutService:t,itemOffset:n,inView:r}){const i=A$(t).itemOffset(e(),n),o=Math.max(0,Math.floor(n-i));return{qTop:o,qHeight:Math.min(t.meta.size.y-o,Math.max(0,Math.ceil(r+1))),qLeft:0,qWidth:t.meta.size.x}},scaleRange:function({getDataPages:e,layoutService:t,offsets:n,items:r,viewSize:i,upperBound:o}){const a=t.getDataPages()[0],s=i/r.inView,{item:l,pixel:c}=n,u=A$(t).area(e(),l,a.qArea),d=T$(a),f=a.qArea.qHeight+d,h=c===o?(r.inView-f)*s/i:(c+(a.qArea.qTop+u)*s)/i;return[h,r.inView>=r.inTotal?h+1:h+f/r.inView]}};function I$({chart:e,rect:t,dockService:n,itemWidths:r,axisKey:i,renderer:o,isGrouped:a,dimensionAxis:s,inTotal:l,isMajorLabelless:c,maxDataRows:u}){const{DEFAULT:d,SQUEEZE:f,LABELLESS:h}=r[n.meta.chart.mode],p="horizontal"===n.meta.major.orientation,{axisDisplayMode:m="auto",maxVisibleItems:g=10,label:y}=s,v=p?t.width:t.height,b=v/l>=f;switch(m){case"max":return Math.min(l,u);case"custom":return Math.min(g,u);default:return c?v/h:b?function({chart:e,isHorizontal:t,axisKey:n,renderer:r={},isGrouped:i,itemSize:o,label:a}){if(i||"auto"!==a&&"tilted"!==a)return!1;const s=e.component(n),{measureText:l}=r;if(!s||!l)return!0;const{fontFamily:c,fontSize:u,tiltAngle:d}=s.settings.settings.labels,{height:f}=l({fontFamily:c,fontSize:u,text:"M"});if(!t)return f>o;const h=(90-d)*(Math.PI/180);return f>Math.cos(h)*o}({chart:e,isHorizontal:p,axisKey:i,renderer:o,isGrouped:a,itemSize:f,label:y})?v/d:l:v/d}}function L$({chart:e,getRect:t,getDataPages:n,layoutService:r,dockService:i,getItemWidths:o,axisKey:a,renderer:s,areaBuffer:l,rtl:c}){const{inTotal:u,area:d,scaleRange:f}=function({layoutService:e}){const{isDimensionless:t,isGrouped:n,isGroupedByMeasure:r}=e.meta;return t?C$:n?r?O$:_$:q$}({layoutService:r}),h=()=>"horizontal"===i.meta.major.orientation?t().width:t().height,p=e=>e?h()/e:0,m=(e,t)=>-(e-t)*p(t);return{getItems(){const n=r.getLayoutValue("dimensionAxis"),l=u({layoutService:r});return{inTotal:l,inView:I$({chart:e,rect:t(),dockService:i,itemWidths:o(),axisKey:a,renderer:s,isGrouped:r.meta.isGrouped,dimensionAxis:n,inTotal:l,isMajorLabelless:"none"===n.show||"title"===n.show,maxDataRows:Math.floor(1e4/(r.meta.dimensionCount+r.meta.measureCount))})}},getItemSize({items:e}){const{inView:t}=e;return p(t)},getOffsets({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t,i=Math.min(0,Math.max(e,m(n,r))),o=r?Math.abs(r*i/h()):0;return{start:{pixel:i,item:o},end:{item:Math.min(o+(r||0),n)}}},getUpperBound({items:e}){const{inTotal:t,inView:n}=e;return m(t,n)},getViewRange({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t;return function({viewSize:e,inTotal:t,inView:n,pixelOffset:r}){const i=e/n*t,o=Math.abs(r)/i;return[o,Math.min(1,o+e/i)]}({viewSize:h(),inTotal:n,inView:r,pixelOffset:e})},getArea:({itemOffset:e,items:t})=>d({getDataPages:n,layoutService:r,itemOffset:e,inView:t.inView,areaBuffer:l}),getScaleRange({offsets:e,items:t}){const o=f({getDataPages:n,layoutService:r,offsets:e,items:t,viewSize:h(),upperBound:m(t.inTotal,t.inView)});return"horizontal"===i.meta.major.orientation&&c?function(e){return[1-e[1],1-e[0]]}(o):o},validate:{offset({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t;return e<=0&&e>=m(n,r)}},convert:{itemToPixelOffset({itemOffset:e,items:t}){const{inView:n}=t,r=e*p(n);return Number.isFinite(r)?-r:0},relativeToPixelOffset({relativeOffset:e,items:t}){const{inTotal:n,inView:r}=t;return-e*(p(r)*n)}}}}function P$({chart:e,componentKey:t,state:n,dataStore:r,pageData:i,layoutService:o,dockService:a,itemWidths:s,getRect:l,axisKey:c,renderer:u,areaBuffer:d,viewState:f,rtl:h}){n.set("rect",{width:0,height:0}),n.set("itemWidths",{}),n.set("itemSize",0),n.set("items",{}),n.set("offsets",{}),n.set("finished",0),n.set("scaleRange",[0,1]);const p=L$({chart:e,getRect:()=>n.get("rect"),getDataPages:r.getCurrent,layoutService:o,dockService:a,getItemWidths:()=>n.get("itemWidths"),axisKey:c,renderer:u,areaBuffer:d,rtl:h}),m=()=>{const e=p.getItems();return n.set("items",e),e},g=({pixelOffset:e,items:t})=>{const r=p.getOffsets({pixelOffset:e,items:t});return n.set("offsets",r),r},y=e=>{const t=Date.now(),r=m(),a=g({pixelOffset:e,items:r}),s=p.getArea({itemOffset:a.start.item,items:r});if((e=>{const[{qArea:t}]=o.getDataPages();return!!t&&Object.keys(e).every(n=>e[n]===t[n])})(s))return void((p.validate.offset({pixelOffset:e,items:r})||f.get("scrollOffset").start!==a.start.item)&&(n.set("finished",t),n.set("scaleRange",p.getScaleRange({offsets:a.start,items:r})),f.preventSet("viewRange",p.getViewRange({pixelOffset:a.start.pixel,items:r})),f.set("scrollOffset",{start:a.start.item,end:a.end.item})));f.preventSet("viewRange",p.getViewRange({pixelOffset:a.start.pixel,items:r}));const l=()=>{n.get("finished")>t||(n.set("finished",t),n.set("scaleRange",p.getScaleRange({offsets:a.start,items:r})),f.set("scrollOffset",{start:a.start.item,end:a.end.item}))};i(s,{onProcessing:l,onDataPage:l})};return{enabled(){const{inTotal:e,inView:t}=n.get("items");return e>t},itemSize:()=>n.get("itemSize"),scaleRange:()=>n.get("scaleRange"),initialize(){const r=e.component(t);if(!r)return Promise.resolve();n.set("rect","function"==typeof l?l():r.rect),n.set("itemWidths","function"==typeof s?s():s);const a=m();n.set("itemSize",p.getItemSize({items:a}));const c=(({items:e})=>{const t=o.getLayoutValue("scrollStartPos"),n=f.get("scrollOffset");if(void 0===n)return 1===t?p.getUpperBound({items:e}):0;if("number"==typeof n)return p.convert.itemToPixelOffset({itemOffset:n,items:e});const{start:r,end:i}=n,a=1===t&&i?i-e.inView:r;return p.convert.itemToPixelOffset({itemOffset:a,items:e})})({items:a}),u=g({pixelOffset:c,items:a});f.preventSet("viewRange",p.getViewRange({pixelOffset:u.start.pixel,items:a}));const d=p.getArea({itemOffset:u.start.item,items:a});return new Promise(e=>{i(d,{onDataPage:()=>{n.set("scaleRange",p.getScaleRange({offsets:u.start,items:a})),f.preventSet("scrollOffset",{start:u.start.item,end:u.end.item}),e()}})})},scroll(e){const t=n.get("offsets").start.pixel+e;y(t)},scrollToRelative(e){const t=n.get("items"),r=p.convert.relativeToPixelOffset({relativeOffset:e,items:t});y(r)}}}function R$({chart:e,actions:t,componentKey:n,enigmaModel:r,layoutService:i,dockService:o,trendLineModel:a,itemWidths:s,viewState:l,rtl:c,options:{definitionPath:u="/qHyperCubeDef",getRect:d,axisKey:f,renderer:h,areaBuffer:p,processDataPage:m=()=>{}}={}}){const g=Dx(),y=function({qMode:e}){switch(e){case"K":return m$;case"T":return g$;default:return p$}}({qMode:i.getHyperCubeValue("qMode")}),v=function({state:e,contains:t}){return e.set(y$,[]),{add:t=>{const n=e.get(y$);n.length=0,n.push(t)},getCurrent:()=>e.get(y$)[0],getAll:()=>e.get(y$),contains:n=>t(e.get(y$)[0],n)}}({state:g,contains:y.contains});!function({layoutService:e,dataStore:t,composition:n}){const r=e.getDataPages()[0];if(!r)return;const i=n.patcher({layoutService:e});i.should(r)&&i(r),t.add(r)}({layoutService:i,dataStore:v,composition:y});const b=function({buffer:e}){return void 0===e?void 0:2*Math.round(e/2)}({buffer:p}),x=k$({dataStore:v,composition:y,enigmaModel:r,layoutService:i,trendLineModel:a,definitionPath:u,processDataPage:m}),S=P$({chart:e,componentKey:n,state:g,dataStore:v,pageData:x,layoutService:i,dockService:o,itemWidths:s,getRect:d,axisKey:f,renderer:h,areaBuffer:b,viewState:l,rtl:c}),w=function({layoutService:e,dataStore:t}){return function(n){const r=Cx(n,`${e.refs.dataPages}`);r.length=0,r.push(t.getCurrent())}}({layoutService:i,dataStore:v}),M=function({chart:e,actions:t,componentKey:n,dockService:r,rtl:i,scroller:o}){return{gestures:[b$({chart:e,actions:t,componentKey:n,dockService:r,rtl:i,scroller:o})],native:{type:"native",events:{wheel:x$({chart:e,actions:t,componentKey:n,scroller:o})}}}}({chart:e,actions:t,componentKey:n,dockService:o,rtl:c,scroller:S});return{interactions:M,query:{getCanScroll:()=>S.enabled(),getItemSize:()=>S.itemSize(),getScaleRange:()=>S.scaleRange(),getCurrentDataPage:()=>v.getCurrent()},command:{initialize:()=>S.initialize(),scrollTo:e=>S.scrollToRelative(e),setSnapshotData:e=>w(e)}}}var z$="AVERAGE",F$="LINEAR",j$="POLYNOMIAL2",B$="POLYNOMIAL3",H$="POLYNOMIAL4",V$="EXPONENTIAL",$$="LOG",W$="POWER";function U$({dimValue:e,value:t,qTrendLine:n}){const{qType:r,qCoeff:i}=n,o={x:e,y:i[2]*t**2+i[1]*t+i[0]};switch(r){case B$:return o.y+=i[3]*t**3,o;case H$:return o.y+=i[4]*t**4+i[3]*t**3,o;default:return o}}var Y$={average:function({dimValue:e,qTrendLine:t}){return{x:e,y:t.qCoeff[0]}},linear:function({dimValue:e,value:t,qTrendLine:n}){return{x:e,y:n.qCoeff[1]*t+n.qCoeff[0]}},polynomial2:U$,polynomial3:U$,polynomial4:U$,exponential:function({dimValue:e,value:t,qTrendLine:n}){return{x:e,y:Math.exp(n.qCoeff[0]+t*n.qCoeff[1])}},log:function({dimValue:e,value:t,qTrendLine:n}){return{x:e,y:n.qCoeff[1]+n.qCoeff[0]*Math.log(t)}},power:function({dimValue:e,value:t,qTrendLine:n}){return{x:e,y:10**(n.qCoeff[0]+n.qCoeff[1]*Math.log(t)*Math.LOG10E)}}};function K$(e,t){const n=Y$[t.qType.toLowerCase()],r=Math.max(1,e/500);let i=1/0,o=-1/0;for(let a=0;a<e;a+=r){const{y:e}=n({dimValue:null,value:a+1,qTrendLine:t});i=Math.min(e,i),o=Math.max(e,o)}return{min:i,max:o}}function G$(e){return Y$[e.qType.toLowerCase()]}function X$(e,t){return e.meta.isContinuous?function(e,t){return{generate:(n,r,i)=>{const o=[],a=G$(n),s=t.get("zoom"),l=n.start??s.min,c=n.end??s.max,u=(c-l)/100,d=e.meta.isButterfly&&i>0;if(u>0){const e=e=>{const t=a({dimValue:e,value:e,qTrendLine:n});d&&(t.y=-t.y),t.layerId=r,t.measureIndex=i,t.dimValue=e,o.push(t)};let t=l;for(let n=l;n<=c;n+=u)e(n),t=n;t!==c&&e(c)}return o},calculate:(e,t)=>G$(e)({dimValue:t,value:t,qTrendLine:e}),findMinMax(e,t){const n=this.generate(t).map(({y:e})=>e);return{min:Math.min(...n),max:Math.max(...n)}}}}(e,t):e.meta.mode.K?function(e){return{generate:(t,n,r)=>{const i=[],o=e.getDataPages()[0],a=o.qData[0].qSubNodes,s=o.qArea.qTop,l=Y$[t.qType.toLowerCase()];for(let e=0;e<a.length;e++){const o=a[e],c=l({dimValue:o.qElemNo,value:e+s+1,qTrendLine:t});c.layerId=n,c.measureIndex=r,c.dimValue=o.qText,i.push(c)}return i},findMinMax:K$}}(e):function(e){return{generate:(t,n,r)=>{const i=[],o=e.getDataPages()[0],a=o.qMatrix,s=o.qArea.qTop,l=Y$[t.qType.toLowerCase()],c=e.meta.isButterfly&&r>0;for(let e=0;e<a.length;e++){const o=a[e][0],u=e+s+1,d=l({dimValue:o.qElemNumber,value:u,qTrendLine:t});c&&(d.y=-d.y),d.layerId=n,d.measureIndex=r,d.dimValue=o.qText,i.push(d)}return i},calculate:(e,t,n)=>(0,Y$[e.qType.toLowerCase()])({dimValue:n,value:t,qTrendLine:e}),findMinMax:K$}}(e)}var J$={TYPES:{AVERAGE:"properties.trendlines.types.average",LINEAR:"properties.trendlines.types.linear",POLYNOMIAL2:"properties.trendlines.types.polynomial2",POLYNOMIAL3:"properties.trendlines.types.polynomial3",POLYNOMIAL4:"properties.trendlines.types.polynomial4",EXPONENTIAL:"properties.trendlines.types.exponential",LOG:"properties.trendlines.types.logarithmic",POWER:"properties.trendlines.types.power"},STYLE:{DASHED:"properties.trendlines.style.dashed"},TYPE:"properties.trendlines.type",HEADER:"properties.trendlines",ADD_BUTTON:"properties.trendlines.button.add"},Z$={color:"#f93f17",index:9};const{isDark:Q$}=lO,eW={x:NaN,y:NaN,layerId:NaN,measureIndex:NaN},tW=({layoutService:e,viewState:t,colorModel:n,chart:r,env:i,keys:{colorScale:o},isEnabled:a=()=>!1})=>{const{translator:s}=i,l=[eW],c=[],u=[],d=X$(e,t);e.getLayoutValue("qHyperCube.qMeasureInfo",[]).forEach((e,t)=>{Array.isArray(e.qTrendLines)&&(c.push(...e.qTrendLines),u.push(...e.qTrendLines.map(()=>t)))});const f=Tx(e=>{const{style:t}=c[e]||{},i=n.settings();if(t.autoColor){if("measure"===i.mode){const t=u[e],n=r.scale(o)(t);return Q$(n)?function(e){const t=oO(e);return t.l<30?t.l+=15:t.l<50?t.l+=10:t.l+=5,t.toString()}(n):function(e){const t=oO(e);return t.l-=5,t.toString()}(n)}return n.resolveUIColor(Z$)}return t.paletteColor?n.resolveUIColor(t.paletteColor):"none"});return{query:{hasTrendLines:()=>!!c.length&&a(),getData:()=>l,getStroke:f,getLineDash:e=>{const{style:t}=c[e]||{};return t?.lineDash},getLineThickness:e=>{const{style:t}=c[e]||{};return t?.lineThickness??2},getLabel:e=>(c[e]||{}).label,getType:e=>{const{qType:t}=c[e]||{};return s.get(J$.TYPES[t])},getMinMax:()=>{let t=1/0,n=-1/0;return c.forEach(r=>{const i=d.findMinMax(e.meta.size.y,r);t=Math.min(i.min,t),n=Math.max(i.max,n)}),{min:t,max:n}},getCalculatedValue:(e,t,n)=>{const r=c[e];return d.calculate(r,t,n)}},command:{update:()=>{l.length=0,c.forEach((e,t)=>{const n=d.generate(e,t,u[t]);l.push(...n)})}}}};var nW={source:"trend",extract:{field:"x",props:{minor:{field:"y"},layer:{field:"layerId"},measureIndex:{field:"measureIndex"},dimValue:{field:"dimValue"}}}};const rW=({meta:e})=>e.isContinuous?({scale:e,datum:t})=>e(t.value):e.isGroupedByMeasure?({scale:e,datum:t})=>e([t.value,t.measureIndex.value])+e.bandwidth()/2:({scale:e,datum:t})=>e(t.value)+e.bandwidth()/2,iW=(e,{layoutService:t,trendLineModel:n,dockService:r,animationsEnabled:i})=>{if(!n.query.hasTrendLines())return[];const o=(({majorScale:e,minorScale:t},{trendLineModel:n,layoutService:r,dockService:i,animationsEnabled:o})=>{const a=rW(r);return{key:"trend-lines",type:"line",layout:{dock:"center"},data:nW,settings:{connect:!0,orientation:i.meta.major.orientation,coordinates:{major:{scale:e,fn:a},minor:{scale:t},layerId:{ref:"layer"}},layers:{curve:"monotone",line:{strokeWidth:({datum:e})=>n.query.getLineThickness(e.layer.value),stroke:({datum:e})=>n.query.getStroke(e.layer.value),strokeDasharray:({datum:e})=>n.query.getLineDash(e.layer.value)}}},animations:{enabled:o,trackBy:bN.nonUpdatingNode.trackBy,compensateForLayoutChanges:bN.lines.compensateForLayoutChanges}}})(e,{trendLineModel:n,layoutService:t,dockService:r,animationsEnabled:i}),a=(({majorScale:e,minorScale:t,tooltipOverlay:n="trend-lines-tooltip-overlay"},{layoutService:r,dockService:i})=>{const o=rW(r),a="horizontal"===i.meta.major.orientation,s={scale:e,fn:o},l={scale:t,ref:"minor"};return{key:n,type:"point",layout:{dock:"center"},data:nW,settings:{x:a?s:l,y:a?l:s,opacity:0,size:1,sizeLimits:{maxPx:8,minPx:8}}}})(e,{layoutService:t,dockService:r});return[o,a]};function oW(e,t){const{getLabel:n,getType:r,getLineDash:i,getStroke:o}=t.query;return({node:t,resources:a})=>{const s={type:"icon",style:{stroke:o(t.data.layer.value),"min-width":"16px","vertical-align":"middle","stroke-dasharray":i(t.data.layer.value)}},l={content:[{content:n(t.data.layer.value),style:{"font-weight":"bold"}},{content:r(t.data.layer.value)}],style:{"min-width":"136px"}};return{title:t.data.dimValue.label,row:[s,l,{content:a.formatter(e.formatter)(t.data.minor.value)}]}}}function aW(e,{h:t,style:n}){return e.map(e=>{const r={style:{direction:"string"==typeof e.content?cT.detectTextDirection(e.content):void 0,...n.cell||{},...e.style||{}},class:e.class};e.colspan&&(r.colspan=e.colspan);const i=function(e,t){return Array.isArray(t.content)?e("div",{style:{display:"flex","flex-direction":"column"}},t.content.map(t=>e("span",{style:t.style,direction:cT.detectTextDirection(t.content)},t.content))):"icon"===t.type?function(e){const t=e("line",{x1:"0px",y1:"16px",x2:"16px",y2:"0px","stroke-width":"3px"});return e("svg",{xlms:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16"},t)}(e):t.content}(t,e);return t("td",r,i)})}function sW(e,t){return({h:n,data:r,style:i})=>{const o=r[0].title,a=r.filter(e=>e.title===o),s=function(e,t){const n=e("td",{colspan:3,style:{"font-weight":"bold"},direction:cT.detectTextDirection(t)},t);return e("tr",{},n)}(n,o),l=[s];if(a.slice(0,2).forEach(e=>{l.push(n("tr",{},aW(e.row,{h:n,style:i})))}),r.length>2){const i=r.length-2;l.push(...function(e,t,n,r){const i=t?t.get("Object.ChartTooltip.NMore",r):`+${r} more`,o=cT.detectTextDirection(i);return[e("tr",{},e("td",{style:{"background-image":"linear-gradient(transparent 8px, rgba(255, 255, 255, 0.4) 8px, rgba(255, 255, 255, 0.4) 9.2px, transparent 9.2px)",height:"17px"},colspan:3},"")),e("tr",{},e("td",{style:{"font-weight":"bold","text-align":n?"right":"left",direction:o},colspan:3},i))]}(n,e,t,i))}return l}}function lW(e,{trendLineModel:t,translator:n},r={}){if(!t.query.hasTrendLines())return!1;const{rtl:i}=r,o=oT({key:e.tooltip,rtl:i});return bg(!0,o,{settings:{extract:oW(e,t),content:sW(n,i),placement:"pointer",direction:r.rtl?"rtl":"ltr"}})}function cW(e,t){const n=t.element.getBoundingClientRect();return{x:(e.center?e.center.x:e.clientX)-n.left,y:(e.center?e.center.y:e.clientY)-n.top}}function uW(e,{chart:t,viewState:n,trendLineModel:r,layoutService:i,rtl:o}){const{isContinuous:a}=i.meta;let s={components:[{key:e.tooltipOverlay}],propagation:"stop"},l=e=>{const n=cW(e,t);return t.shapesAt(n,s)};if(a){const{getCalculatedValue:i}=r.query;s={components:[{key:"trend-lines"}],propagation:"stop"},l=(r,a)=>{const l=cW(r,t),c=t.shapesAt(function(e){return{cx:e.x,cy:e.y,r:3}}(l),s);if(c.length){const r=function(e,t,n,r){let i=(e.x-t.rect.computed.x)/t.rect.computed.width;i=r?1-i:i;const{min:o,max:a}=n.get("zoom");return o+(a-o)*i}(l,a,n,o),s=t.scale(e.majorInnerScale),u=(s?.formatter?s.formatter():t.formatter({data:{fields:["qDimensionInfo/0"]}}))(r);c.forEach(e=>{e.data.dimValue.value=r,e.data.dimValue.label=u,e.data.minor.value=i(e.data.layer.value,r).y})}return c}}return n=>{const r=t.component(e.tooltip);if(r&&(n=>t.componentsFromPoint({x:n.center?n.center.x:n.clientX,y:n.center?n.center.y:n.clientY}).some(t=>t.key===e.tooltipOverlay))(n)){const e=l(n,r);return e.length?(r.emit("show",n,{nodes:e}),!0):(r.emit("hide"),!1)}return!1}}const dW=e=>{e.style.dashed?e.style.lineDash="8, 4":e.style.lineDash=""},fW=e=>{dW(e),e.qMultiDimMode="Sum",e.qXColIx=0};function hW(e={}){const{translator:t,events:n={onGlobalChange:()=>{}},allowStackedByDimension:r=!1}=e;return{show:(e,t,{layout:n})=>!GD.dimensionless(n)&&!GD.groupedByDimension(n)&&(r||!GD.stackedByDimension(n)),type:"array",ref:"qTrendLines",titleTranslation:J$.HEADER,itemTitleRef:e=>{const n=typeof e.label;return"string"===n&&e.label?e.label:"object"===n?e.label.qStringExpression?e.label.qStringExpression.qExpr:e.label.qValueExpression.qExpr:t.get(J$.TYPES[e.qType])},max:8,allowAdd:!0,allowRemove:!0,allowMove:!1,addTranslation:J$.ADD_BUTTON,add:fW,globalChange:e=>{const t=Cx(e,"qHyperCubeDef.qMeasures",[]).reduce((e,t)=>(Array.isArray(t.qTrendLines)&&e.push(...t.qTrendLines),e),[]),r=(e=>!Cx(e,"dimensionAxis.continuousAuto",!1)&&e.preferContinuousAxis)(e)?"Possible":"Never";t.forEach(e=>{e.qContinuousXAxis=r}),n.onGlobalChange(e,t)},items:{label:{ref:"label",type:"string",expression:"optional",translation:"Common.Label",defaultValue:""},type:{ref:"qType",type:"string",component:"dropdown",translation:J$.TYPE,options:[{value:z$,translation:J$.TYPES.AVERAGE},{value:F$,translation:J$.TYPES.LINEAR},{value:j$,translation:J$.TYPES.POLYNOMIAL2},{value:B$,translation:J$.TYPES.POLYNOMIAL3},{value:H$,translation:J$.TYPES.POLYNOMIAL4},{value:V$,translation:J$.TYPES.EXPONENTIAL},{value:$$,translation:J$.TYPES.LOG},{value:W$,translation:J$.TYPES.POWER}],defaultValue:z$},autoColor:{ref:"style.autoColor",type:"boolean",translation:"properties.colors",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},paletteColor:{ref:"style.paletteColor",translation:"properties.color",type:"object",component:"color-picker",dualOutput:!0,defaultValue:Z$,show:e=>!e.style.autoColor},dashed:{ref:"style.dashed",translation:J$.STYLE.DASHED,type:"boolean",defaultValue:!0,change:dW}}}}var pW,mW;var gW=function(){if(mW)return pW;mW=1;var e={};function t(){t.init.call(this)}return e.isObject=function(e){return"object"==typeof e&&null!==e},e.isNumber=function(e){return"number"==typeof e},e.isUndefined=function(e){return void 0===e},e.isFunction=function(e){return"function"==typeof e},pW=t,t.EventEmitter=t,t.prototype._events=void 0,t.prototype._maxListeners=void 0,t.defaultMaxListeners=10,t.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},t.prototype.setMaxListeners=function(t){if(!e.isNumber(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},t.prototype.emit=function(t){var n,r,i,o,a,s;if(this._events||(this._events={}),"error"===t&&!this._events.error)throw(n=arguments[1])instanceof Error?n:Error('Uncaught, unspecified "error" event.');if(r=this._events[t],e.isUndefined(r))return!1;if(e.isFunction(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:for(i=arguments.length,o=new Array(i-1),a=1;a<i;a++)o[a-1]=arguments[a];r.apply(this,o)}else if(e.isObject(r)){for(i=arguments.length,o=new Array(i-1),a=1;a<i;a++)o[a-1]=arguments[a];for(i=(s=r.slice()).length,a=0;a<i;a++)s[a].apply(this,o)}return!0},t.prototype.addListener=function(n,r){var i;if(!e.isFunction(r))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",n,e.isFunction(r.listener)?r.listener:r),this._events[n]?e.isObject(this._events[n])?this._events[n].push(r):this._events[n]=[this._events[n],r]:this._events[n]=r,e.isObject(this._events[n])&&!this._events[n].warned)&&((i=e.isUndefined(this._maxListeners)?t.defaultMaxListeners:this._maxListeners)&&i>0&&this._events[n].length>i&&(this._events[n].warned=!0,e.isFunction(console.error)&&console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[n].length),e.isFunction(console.trace)&&console.trace()));return this},t.prototype.on=t.prototype.addListener,t.prototype.once=function(t,n){if(!e.isFunction(n))throw TypeError("listener must be a function");var r=!1;function i(){this.removeListener(t,i),r||(r=!0,n.apply(this,arguments))}return i.listener=n,this.on(t,i),this},t.prototype.removeListener=function(t,n){var r,i,o,a;if(!e.isFunction(n))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(o=(r=this._events[t]).length,i=-1,r===n||e.isFunction(r.listener)&&r.listener===n)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,n);else if(e.isObject(r)){for(a=o;a-- >0;)if(r[a]===n||r[a].listener&&r[a].listener===n){i=a;break}if(i<0)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(i,1),this._events.removeListener&&this.emit("removeListener",t,n)}return this},t.prototype.removeAllListeners=function(t){var n,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(n in this._events)"removeListener"!==n&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[t],e.isFunction(r))this.removeListener(t,r);else if(Array.isArray(r))for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},t.prototype.listeners=function(t){return this._events&&this._events[t]?e.isFunction(this._events[t])?[this._events[t]]:this._events[t].slice():[]},t.listenerCount=function(t,n){return t._events&&t._events[n]?e.isFunction(t._events[n])?1:t._events[n].length:0},pW}(),yW=ug(gW);const vW={shapes:[{type:"path",attrs:{d:"M15.9488039,5.20769129 C16.0487326,6.70662306 15.3492311,8.30548361 14.050157,9.30477145 C12.651154,10.5039169 10.8524359,10.8037032 8.85386017,10.4039881 L7.3549284,10.0042729 L5.75606786,9.70448659 C5.75606786,9.90434416 5.65613907,10.0042729 5.4562815,10.2041305 C5.05656637,10.6038456 4.55692244,10.8037032 4.05727852,10.8037032 C3.75749217,10.8037032 3.45770582,10.7037744 3.15791946,10.6038456 C3.05799068,10.903632 3.15791946,11.2034184 3.45770582,11.7030623 C5.05656637,14.0014243 3.85742095,15.9000712 3.75749217,16 L2.2585604,15.3004985 C2.2585604,15.2005697 2.95806189,14.0014243 1.95877405,12.6024213 C1.6589877,12.0028486 1.15934378,11.0035608 1.55905891,10.0042729 C1.6589877,9.80441537 1.75891648,9.6045578 1.95877405,9.40470024 C1.6589877,8.90505631 1.55905891,8.30548361 1.85884527,7.7059109 C1.55905891,7.40612455 1.25927256,7.1063382 1.15934378,6.70662306 C0.859557424,5.90719279 0.959486209,4.5081898 1.6589877,3.30904439 C1.95877405,2.6095429 2.55834676,2.0099702 3.15791946,1.51032628 C3.95734974,0.91075357 4.95663758,0.610967217 6.15578299,0.311180864 C9.05371774,-0.388320626 11.9516525,0.111323295 13.9502282,1.61025506 C15.1493736,2.50961412 15.8488751,3.80868831 15.9488039,5.20769129 Z M13.0508691,8.10562604 C13.8502994,7.40612455 14.3499433,6.40683671 14.3499433,5.30762008 C14.2500145,4.20840345 13.550513,3.40897318 12.9509403,2.90932926 C12.1515101,2.40968533 11.252151,2.0099702 10.1529344,1.81011263 C8.95378895,1.61025506 7.75464354,1.71018384 6.45556935,1.91004141 C4.75678001,2.30975655 3.65756338,3.00925804 3.05799068,4.10847467 C2.55834676,5.00783373 2.65827554,5.90719279 2.75820433,6.20697914 C2.75820433,6.30690792 2.85813311,6.40683671 3.05799068,6.40683671 C3.15791946,6.40683671 3.25784825,6.40683671 3.35777703,6.40683671 C3.45770582,6.40683671 3.45770582,6.40683671 3.45770582,6.40683671 L3.5576346,6.40683671 L3.65756338,6.40683671 C4.65685123,6.40683671 5.4562815,6.90648063 5.85599664,7.80583969 L5.85599664,8.00569726 C6.35564056,8.10562604 7.05514205,8.30548361 7.75464354,8.50534118 L9.25357531,8.90505631 C10.0530056,9.0049851 10.7525071,9.0049851 11.4520086,8.80512753 C12.0515813,8.70519875 12.5512252,8.40541239 13.0508691,8.10562604 Z"}}]};function bW(){const[t]=e.useState({}),[n]=e.useState({}),r=function(){const t=e.useLayout(),n=e.useTranslator(),r=!!t?.qSelectionInfo?.qInSelections,i=!!t?.qHyperCube?.qDimensionInfo?.[0]?.qIsOneAndOnlyOne,[o,a]=e.useState(!1),[s,l]=e.useState(!1),[c,u]=e.useState({key:"lasso",enabled:()=>!1,active:()=>!1,action:()=>!1}),d=e=>{l("boolean"==typeof e?e:!s)};return e.useAction(()=>(u({key:"lasso",action:d,enabled:()=>o,active:()=>s}),{key:"lasso",label:n.get(s?"Tooltip.ToggleOffLassoSelection":"Tooltip.ToggleOnLassoSelection"),icon:vW,hidden:!o||!r||i,active:s,action:d}),[r,i,s,o,n.language()]),{get:()=>c,setAllows:e=>{a(!!e)}}}(),[i,o]=e.useState();return e.useEffect(()=>{const e={};e.scroll={key:"scroll",isActive:!0,isEnabled:!0,action(){this.isActive=!this.isActive},active(){return this.isActive},enabled(){const{layoutService:e,discrete:r}=t;return n.allowScroll&&(e?.meta.isContinuous||r?.query.getCanScroll())}},e.interact={key:"interact",isEnabled:!0,enabled:()=>n.allowInteract},e.tooltip={key:"tooltip",isActive:!0,isEnabled:!0,action(e){this.isActive=!!e},active(){return this.isActive},enabled:()=>n.allowTooltip},e.select={key:"select",isActive:!1,isEnabled:!0,action(){this.isActive=!this.isActive},active(){return this.isActive},enabled:()=>n.allowSelect},e.lasso=r.get(),Object.keys(e).forEach(t=>{return n=e[t],Object.keys(yW.prototype).forEach(e=>{n[e]=yW.prototype[e]}),yW.init(n),n;var n}),o(e)},[]),e.useEffect(()=>{i&&r&&(i.lasso={...i.lasso,...r.get()})},[r]),{get:()=>i,setAllows:e=>{Object.assign(n,e),r.setAllows(e?.allowSelect)},setContext:e=>{Object.assign(t,e)},destroy:()=>{Object.keys(i).forEach(e=>i[e].removeAllListeners())}}}var xW={SPARK:{DEFAULT:7,SQUEEZE:7,LABELLESS:7},XSMALL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},SMALL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},MEDIUM:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},FULL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20}},SW={SCALE:{MAIN:{MINOR:"minor",MAJOR:"major",MAJOR_INNER:"majorInner",COLOR:"fill"},REDUCED:{MINOR:"miniMinor",MAJOR:"miniMajor",COLOR:"reducedFill"}},COMPONENT:{BAR:"bar",MINI_BAR:"mini-marker",GHOST_BAR_OOB:"ghost-bar",BAR_AXIS:"bar-axis",GROUP_AXIS:"group-axis",BAR_OOB_MAX:"bar-oob-max",BAR_OOB_MIN:"bar-oob-min",STACK_TOTAL_BAR:"stack-total-bar",BASE_TOOLTIP:"tooltip",BASE_TOOLTIP_NEW:"tooltip-qcm",SPACE:"space",LEGEND_CAT_TOOLTIP:"legend-cat-tooltip",LEGEND_COLOR_CAT:"legend-color-cat",MEASURE_REF_LINE:"mes-ref-line",DIMENSION_REF_LINE:"dim-ref-line",MEASURE_REF_LINE_LABEL:"mes-ref-line-label",DIMENSION_REF_LINE_LABEL:"dim-ref-line-label",TREND_LINES_TOOLTIP:"trend-lines-tooltip",TREND_LINES_TOOLTIP_OVERLAY:"trend-lines-tooltip-overlay"},COLLECTION:{MAIN:"main-collection",MINI:"mini-collection",MINI_STACK:"mini-stack-collection",MINI_CONTINUOUS:"mini-continuous-collection",STACK_TOTAL:"stack-total-collection"},FORMATTER:{MINOR:"bar",COLOR:"fill"}};const wW=({layout:e})=>{const t=e?.qHyperCube?.qDimensionInfo?.filter(e=>e.qError?.qErrorCode!==KV),n=e?.qHyperCube?.qMeasureInfo?.filter(e=>e.qError?.qErrorCode!==KV);return 1===(t?.length??0)&&2===(n?.length??0)};function MW(e,t,n="/qHyperCubeDef"){return{fetch(){return function(e,t,n){return e.getHyperCubeReducedData(n.path,[n.rect],n.zoomLevel,n.filter).catch(JD).then(e=>{const n=t.getHyperCubeValue("qMode"),r=t.getHyperCubeValue("qDimensionInfo"),i="K"===n&&r.length>1&&e[0]?.qIsReduced,o=e.slice(),a=t.getHyperCubeValue("qMeasureInfo"),s=i?[]:t.getHyperCubeValue("qColumnOrder");return{reducedCube:{qDataPages:o,qDimensionInfo:r.slice(),qEffectiveInterColumnSortOrder:[1,0],qMeasureInfo:i?[a[0],a[0]]:a.slice(),qStackedDataPages:[],qMode:"S",qHasOtherValues:t.getHyperCubeValue("qHasOtherValues"),qSize:t.getHyperCubeValue("qSize"),qColumnOrder:s}}})}(e,t,this.settings())},settings(){const e=t.getHyperCubeValue("qDimensionInfo"),r=t.meta.isStacked&&e.length>1?1:0,i=t.getHyperCubeValue("qMeasureInfo");return{path:n,rect:{qTop:0,qLeft:r,qWidth:e.length+i.length+r,qHeight:Math.min(2e3,1e4/(i.length+1))},zoomLevel:-1,filter:"D1"}}}}function kW({enigma:e,layoutService:t,viewModel:n,definitionPath:r,reducedHyperCubePath:i},o={}){const a=MW(e,t,r),s=function(e,t="reducedHyperCube"){return{fetch:()=>Promise.resolve({reducedCube:e.getLayoutValue(t)||e.getHyperCube()})}}(t,i),l=function(e){return{fetch:()=>{const t=e.getHyperCube(),n={...t,qDataPages:t.qDataPages.slice()};return Promise.resolve({reducedCube:n})}}}(t),c=function({layoutService:e}){const{isSnapshot:t,isStackedByDimension:n}=e.meta,r=e=>{e.qDimensionInfo.unshift({key:"dummy-patch-dimension"})};return r.should=e=>t&&n&&1===e.qDimensionInfo.length,r}({layoutService:t}),u={mode:{isReduced:!1}};return{fetch(){if(t.meta.isSnapshot)return s.fetch();if(t.meta.isContinuous)return l.fetch();if(!t.meta.isStacked){if(t.getHyperCubeValue("qSize.qcy",NaN)===t.getHyperCubeValue("qDataPages.0.qArea.qHeight",NaN))return l.fetch()}return a.fetch()},model:()=>u,update(e){var r;c.should(e)&&c(e),u.mode=bg(u.mode,t.meta),u.mode.isReduced=e.qDataPages[0]&&e.qDataPages[0].qIsReduced,u.mode.isStackedByDimension=u.mode.isStacked&&(2===(r=e).qDimensionInfo.length&&2===r.qMeasureInfo.length),u.mode.isStackedByMeasure=u.mode.isStacked&&function(e){return e.qMeasureInfo.length>1&&1===e.qDimensionInfo.length}(e),u.fields={major:u.mode.isStackedByDimension?"qDimensionInfo/"+(e.qDimensionInfo.length-1):n.fields.major,majorGroup:n.fields.majorGroup,minor:u.mode.isStackedByDimension?e.qMeasureInfo.map((e,t)=>`qMeasureInfo/${t}`):n.fields.minor},u.scales={major:SW.SCALE.REDUCED.MAJOR,minor:SW.SCALE.REDUCED.MINOR},u.cube=e,o.qDataPages=e.qDataPages},fetchMinMaxData(){if(o.qDataPages)return Promise.resolve(o.qDataPages);let n=a.settings();const r="K"===t.getHyperCubeValue("qMode")?1:n.rect.qHeight;return n=bg(!0,{},n,{rect:{qHeight:r}}),e.getHyperCubeReducedData(n.path,[n.rect],n.zoomLevel,n.filter).then(e=>e)},setSnapshotData(e){e.reducedHyperCube=u.cube}}}function CW({clearMinor:e,clearLegend:t,clearDiscrete:n,clearContinuous:r,selectionInfo:i}){t({componentName:"legendRangeBrush"}),e({eventName:"measureRange",componentName:"measureRangeBrush"}),n({eventName:"discreteRange",componentName:"discreteRangeBrush",brushName:!1}),"tap"!==i.event&&r({componentName:"continuousRangeBrush",brushName:!1})}function qW({layout:e,defaultAuto:t}){return e.qHyperCube.qDimensionInfo.length>1?{mode:"byDimension",useDimColVal:!0,useBaseColors:"dimension",byDimDef:{activeDimensionIndex:1}}:e.qHyperCube.qMeasureInfo.length>1?{mode:"primary",useBaseColors:"measure",paletteColor:null}:t(e)}function EW({layoutService:e,node:t}){const{isGroupedByDimension:n,isStackedByDimension:r,isDimensionless:i}=e.meta;return n?`${t.data.label}, ${t.data.group.label}`:r?`${t.data.label}, ${t.data.stack.label}`:i?void 0:t.data.label}function DW({chart:e,actions:t,translator:n,rtl:r,viewState:i,viewModel:o,layoutService:a,dockService:s,colorService:l,themeService:c,trendLineModel:u,custom:d}){const{isTwoDimensional:f,isStacked:h,isGroupedByDimension:p,isGroupedByMeasure:m,isStackedByDimension:g,isStackedByMeasure:y}=a.meta,{fontFamily:v}=c.getStyles(),b=function({layoutService:e,dockService:t}){const{BAR_AXIS:n,BAR_OOB_MIN:r,BAR_OOB_MAX:i,GROUP_AXIS:o}=SW.COMPONENT,{isGrouped:a,isGroupedByDimension:s}=e.meta,{orientation:l}=t.meta.chart,c="vertical"===l;return[({chart:e,hovered:t,meta:l,collected:u,collectedBounds:d})=>{const[f]=t,{triggerer:h}=l;if(h===r||h===i)return{key:f.key,bounds:f.bounds};if(c&&(h===n||h===o)){const t=e.findShapes("path").find(e=>s&&h===n?(e.key===r||e.key===i)&&e.data.value===f.data.value&&e.data.group.value===f.data.group.value:(e.key===r||e.key===i)&&e.data.value===f.data.value),o=e.findShapes("path").find(e=>s&&h===n?e.key===i&&e.data.value===f.data.value&&e.data.group.value===f.data.group.value:e.key===i&&e.data.value===f.data.value);if(t)return a?{key:o?o.key:SW.COMPONENT.BAR,bounds:d}:{key:t.key,bounds:t.bounds}}if(!c){const t=!u.some(e=>e.bounds.height+e.bounds.width!==0);if(t){const t=e.findShapes("path").find(e=>s&&h===n?(e.key===r||e.key===i)&&e.data.value===f.data.value&&e.data.group.value===f.data.group.value:(e.key===r||e.key===i)&&e.data.value===f.data.value);if(t)return{key:t.key,bounds:t.bounds}}}return!1},"collectible"]}({layoutService:a,dockService:s}),x=uW({majorInnerScale:SW.SCALE.MAIN.MAJOR_INNER,tooltip:SW.COMPONENT.TREND_LINES_TOOLTIP,tooltipOverlay:SW.COMPONENT.TREND_LINES_TOOLTIP_OVERLAY},{chart:e,viewState:i,trendLineModel:u,layoutService:a,rtl:r}),S=({collected:t,triggerer:n})=>{if(h){t.splice(0,t.length);const r=e.findShapes("container").filter(e=>e.key===SW.COMPONENT.BAR&&e.data?.stack.value===n.data.value).filter(e=>y?e.data?.value===n.data.value:e.data?.stack.value===n.data.value);r.forEach(e=>{if(e.children.length){const[n]=e.children;n.key=e.key,t.push(n)}else t.push(e)})}};return DM({chart:e,translator:n,config:{rtl:r,enable:()=>t.tooltip.enabled(),getColorSettings:()=>l.getMain().getSettings(),style:{fontFamily:v},main:{key:SW.COMPONENT.BASE_TOOLTIP_NEW,suppress:({event:e})=>x(e),getGroupByValue:({data:e})=>e.value,collectibles:[{key:SW.COMPONENT.BAR,type:"bar",major:({data:e,meta:t})=>m?t.triggerer===SW.COMPONENT.BAR_OOB_MIN||t.triggerer===SW.COMPONENT.BAR_OOB_MAX?[e.value,e.measureIndex.value]:e.value:p?t.triggerer===SW.COMPONENT.BAR_AXIS||t.triggerer===SW.COMPONENT.BAR_OOB_MIN||t.triggerer===SW.COMPONENT.BAR_OOB_MAX?[e.value,e.group.value]:e.group.value:g?e.stack.value:e.value},{key:`${SW.COMPONENT.GHOST_BAR_OOB}-min`,type:"bar",if:()=>!y&&!g,major:({data:e,meta:t})=>m?t.triggerer===SW.COMPONENT.BAR_OOB_MIN||t.triggerer===SW.COMPONENT.BAR_OOB_MAX?[e.value,e.measureIndex.value]:e.value:p?t.triggerer===SW.COMPONENT.BAR_OOB_MIN||t.triggerer===SW.COMPONENT.BAR_OOB_MAX||t.triggerer===SW.COMPONENT.BAR_AXIS?[e.value,e.group.value]:e.group.value:e.value},{key:`${SW.COMPONENT.GHOST_BAR_OOB}-max`,type:"bar",if:()=>!y&&!g,major:({data:e,meta:t})=>m?t.triggerer===SW.COMPONENT.BAR_OOB_MIN||t.triggerer===SW.COMPONENT.BAR_OOB_MAX?[e.value,e.measureIndex.value]:e.value:p?t.triggerer===SW.COMPONENT.BAR_OOB_MIN||t.triggerer===SW.COMPONENT.BAR_OOB_MAX||t.triggerer===SW.COMPONENT.BAR_AXIS?[e.value,e.group.value]:e.group.value:e.value}],triggers:[{keys:[SW.COMPONENT.BAR],collect:{from:"single"},placement:b},{keys:[SW.COMPONENT.BAR_AXIS],collect:{from:"dimension",by:({data:e})=>p?[e.value,e.group.value]:e.value,after:S},placement:b},{keys:[SW.COMPONENT.BAR_OOB_MIN,SW.COMPONENT.BAR_OOB_MAX],collect:{from:"dimension",by:({data:e})=>m?[e.value,e.measureIndex.value]:p?[e.value,e.group.value]:e.value,after:S},placement:b},{keys:[SW.COMPONENT.GROUP_AXIS],collect:{from:"dimension",by:({data:e})=>e.group.value},placement:b}],layout:{grouping:f,single:()=>!(!d.isEnabled()||!d.hasImages())||d.chart.isEnabled()},section:({h:t,nodes:n,dataset:r,formatter:i,create:s,util:l})=>{const[c]=n,{title:u,description:f,measures:h}=d.isEnabled()?d.getAttributes({dataset:r,nodes:[c]}):{},p=[];u&&p.push(s.text({value:u,style:{bold:!0}})),f&&p.push(s.text({value:f}));const m=d.hideBasic();if(m&&!h.length&&(u||f)||p.push(s.text({value:EW({layoutService:a,node:c}),style:{bold:!0}})),!m){const t=void 0!==c.data.fill?.value?e.scale(SW.SCALE.MAIN.COLOR)(c.data.fill.value):void 0;p.push(s.color({nodes:n,property:SW.SCALE.MAIN.COLOR,fillColor:t})),p.push(...n.map(e=>function({viewModel:e,layoutService:t,formatter:n,create:r,util:i,node:o}){const{isStacked:a,isStackedByDimension:s}=t.meta;if(a){const t=n(SW.FORMATTER.MINOR),{segment:a}=o.data,l=s&&t?t(a.value):a.label;return r.measure({label:i.dataset.title(o.data.source.key,e.fields.minor[s?0:o.data.measureIndex.value]),value:!0===o.data.null?.value||"NaN"===l?"-":l})}const{data:l}=o,{end:c}=l,{key:u,field:d}=c.source;return r.measure({label:i.dataset.title(u,d),value:c.label})}({viewModel:o,layoutService:a,formatter:i,create:s,util:l,node:e})))}h&&p.push(...h.map(e=>s.measure({label:e.label,value:e.value,survive:{color:!0,duplicate:!0}}))),d.chart.isEnabled()&&(d.chart.hasLimitation()?(d.chart.destroy(),p.push(s.raw({value:d.chart.createLimitationRow()}))):p.push(s.raw({value:d.chart.createContainer({h:t})})));const{customTooltipImages:g}=c.data;return d.isEnabled()&&g&&p.push(...g.map(e=>s.raw({value:d.createImageRow({value:e,h:t})}))),p.filter(Boolean)},sections:({nodes:t,formatter:r,meta:i,create:o,sections:a})=>{if(!h||i.triggerer!==SW.COMPONENT.BAR_AXIS)return;const[s]=t,[l]=e.findShapes("container").filter(e=>e.key===SW.COMPONENT.STACK_TOTAL_BAR&&e.data&&e.data.value===s.data.stack.value);if(!l)return;const c=r(SW.FORMATTER.MINOR),u=[];if(l.data.sumOfPositives.value>0){const{value:e}=l.data.sumOfPositives;u.push(o.measure({label:n?n.get("Object.ChartTooltip.sumOfPositives"):"Sum of positives",value:c?c(e):e}))}if(l.data.sumOfNegatives.value<0){const{value:e}=l.data.sumOfNegatives;u.push(o.measure({label:n?n.get("Object.ChartTooltip.sumOfNegatives"):"Sum of negatives",value:c?c(e):e}))}a.unshift(o.section({content:[o.text({value:l.data.label,style:{bold:!0}}),...u]}),o.divider())},events:{tooltip:{beforeShow:({collectNodes:e})=>d.isEnabled()&&d.hasImages()?d.addImages({nodes:e()}):Promise.resolve(),afterShow:({expando:e,nodes:t})=>{d.chart.isEnabled()&&!d.chart.hasLimitation()&&d.chart.show({nodes:t,properties:e.get("properties")})}},interaction:{mouseleave:()=>{d.chart.isEnabled()&&d.chart.hasAlternateState()&&d.chart.hide()}}}},legend:{keys:{tooltip:SW.COMPONENT.LEGEND_CAT_TOOLTIP,component:SW.COMPONENT.LEGEND_COLOR_CAT}}}})}const TW={getMaxGlyphCount(e,t){const{qDimensionInfo:n}=e,{qApprMaxGlyphCount:r}=n[t];return r},getDimensionSize(e){const t=e?.qCardinalities?.qHypercubeCardinal,{qLocked:n=0,qOption:r=0,qSelected:i=0}=e?.qStateCounts||{};return[void 0,0].includes(t)?n+r+i:t}};function OW({picasso:t,chart:n,environment:r,viewState:i,viewCache:o}){const a=e.useStaleLayout(),s=e.useModel(),l=e.useApp(),c=e.usePlugins(),u=e.useSelections(),d=e.useOptions(),[f,h]=e.useState(),[p,m]=e.useState(),[g,y]=e.useState(),v=e.useConstraints(),b=bW();return e.useEffect(()=>{if(!n)return()=>{};const e=b.get(),t=function({chart:e,actions:t,selections:n}){const r=e.scale(SW.SCALE.MAIN.MAJOR),i=Hw({chart:e,actions:t,selections:n,config:{allowSimultaneous:!0,brushRanges:!0,majorScale:r,selectionActions:{reset(){e.brushSelectionIncludeMax=void 0,t.lasso.active()&&t.lasso.action(!1)},clear:CW},custom:{getActions:()=>t},setBrushAliases({defaultFunc:e,brush:t}){e(),t.addKeyAlias("miniCube/qDimensionInfo/0","qHyperCube/qDimensionInfo/0"),t.addKeyAlias("miniCube/qDimensionInfo/1","qHyperCube/qDimensionInfo/1")}}});return i}({chart:n,actions:e,selections:u});return m(e),y(t),()=>{t.destroy(),b.destroy()}},[n]),e.useEffect(()=>{if(!v)return;const e={allowScroll:!v.active,allowInteract:!v.active,allowTooltip:!v.passive,allowSelect:!v.select&&!v.active};b.setAllows(e)},[v]),e.useEffect(()=>{if(!g||!r)return;const{theme:e,translator:u,localeInfo:f,flags:m,embed:y}=r,{direction:v="ltr"}=d,x="rtl"===v,S=Px({source:a,metaAdditionsFn:({layout:e})=>{const t=HD.canBeContinuous(e),n=GD.continuous({layout:e}),r=GD.dimensionless(e),i=wW({layout:e})&&"butterfly"===e?.barGrouping?.grouping;return{canBeContinuous:t,isDiscrete:!n,isContinuous:n,isTime:HD.isTime(n,e),isDimensionless:r,isSimple:GD.simple(e),isGrouped:!i&&GD.grouped(e),isGroupedByMeasure:!i&&GD.groupedByMeasure(e),isGroupedByDimension:!i&&GD.groupedByDimension(e),isStacked:!i&&GD.stacked(e),isStackedByDimension:!i&&GD.stackedByDimension(e),isStackedByMeasure:!i&&GD.stackedByMeasure(e),isSnapshot:GD.snapshot(e),isButterfly:i}},experimental:{filter:!0}});g.setFilteredFields(S.meta.filteredFields);const w=function(e){return e.color.auto?e.qHyperCube.qDimensionInfo.length>1:"byDimension"===e.color.mode&&e.color.byDimDef&&e.color.byDimDef.activeDimensionIndex>-1}(S.getLayout())?Px({source:S.getLayout()}):void 0,M=function({layout:e,options:t={}}){return!(!e?.snapshotData||t.freeResize)&&{width:e.snapshotData.content.size.w,height:e.snapshotData.content.size.h}}({layout:a,options:d}),k=function({layoutService:e,viewCache:t,options:n}){const r={};return r.fields=function(e){const{meta:t}=e,n={majorGroup:t.isGroupedByDimension?"qDimensionInfo/0":void 0,majorStack:t.isStacked?"qDimensionInfo/0":void 0,major:t.isDimensionless?void 0:"qDimensionInfo/"+(t.dimensionCount-1),majors:e.getHyperCubeValue("qDimensionInfo").map((e,t)=>`qDimensionInfo/${t}`),minor:e.getHyperCubeValue("qMeasureInfo").map((e,t)=>`qMeasureInfo/${t}`)};return n.majorNumeric=`${t.isStackedByDimension?n.majorStack:n.major}:numeric`,n}(e),r.selectionDimensionIdx=(e=>{const t=e.qDimensionInfo.length;for(let n=0;n<t;n++){const r=e.qDimensionInfo[n];if(!(r.qLocked||r.qCardinalities.qHypercubeCardinal<=1&&n<t-1))return n}})(e.getHyperCube()),r.isDimensionLocked=t=>e.getHyperCube().qDimensionInfo[t].qLocked,r.selectionDimensionProp=e=>void 0===r.selectionDimensionIdx||void 0!==e&&r.selectionDimensionIdx!==e?{}:{selectionDimension:{field:r.selectionDimensionIdx}},r.animations={enabled:()=>!(!1===n.chartAnimations||r.animations.isPartialUpdating||r.animations.isSizeChanging||r.animations.hasSlicedHats||bN.propertiesHaveChanged({viewCache:t,layout:e.getLayout()})),isPartialUpdating:!1,isSizeChanging:!1,hasSlicedHats:!1},r}({layoutService:S,viewCache:o,options:d}),C=kx({chart:n,layoutService:S,config:{logicalSize:M,rtl:x},typeConfig:{type:"major-minor",fallback:"vertical",invert:!0}}),q=function({layoutService:e}){return px({config:{args:{layoutService:e},disclaimers:{NoDataExist:!0,OnlyNanDataMeasure:!0,OnlyNanDataDimensionContinuous:!0,LimitedData:{condition:()=>{const{isContinuous:t,isTwoDimensional:n}=e.meta;if(!t||!n)return!1;const r=e.getLayout().qHyperCube.qDimensionInfo[1];return TW.getDimensionSize(r)>HD.maxNumberOfLines}},OnlyNegativeValues:{condition:()=>{if(e.meta.isButterfly){const{qMeasureInfo:t}=e.getHyperCube();return t.every(e=>{const{qMin:t,qMax:n}=e;return t<0&&n<0})}return!1},alignment:"center"},NegativeValues:{condition:()=>{if(e.meta.isButterfly){const{qMeasureInfo:t}=e.getHyperCube();return t.some(e=>{const{qMin:t}=e;return t<0})}return!1}}}}})}({layoutService:S}),E=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,c=r.extend,u=void 0===c?[]:c,d={theme:t,matrix:Gw(a),styles:void 0};return d.styles=Jw({theme:t,id:i,transform:l,extend:u,matrix:d.matrix}),{getStyles:function(){return d.styles},getTheme:function(){return d.theme},setTheme:function(e){d.theme=e,d.styles=Jw({theme:e,id:i,transform:l,extend:u,matrix:d.matrix})}}}({theme:e,config:{id:"barChart",transform:[["label.value.fontSize",e=>parseInt(e,10)]],resolve:[["object","plugins.label","fontFamily",'"Source Sans Pro", "Arial", "sans-serif"'],["object","plugins.label","fontSize","12px"]]}}),D=LD.model({model:s,layoutService:S,viewCache:o,viewState:i}),T=kW({enigma:s,layoutService:S,viewModel:k});!function({layoutService:e,viewState:t,viewStateOptions:n={}}){const r=e.meta.isSnapshot?e.getLayoutValue("snapshotData.content.chartData",{}):n;t.preventSet("scrollOffset",r.scrollOffset),t.preventSet("legendScrollOffset",r.legendScrollOffset||0),r.zoom&&t.preventSet("zoom",r.zoom)}({layoutService:S,viewState:i,viewStateOptions:d?.viewState});const O=function({app:e,model:t,translator:n,picasso:r,localeInfo:i,theme:o,continuousDataModel:a,layoutService:s,legendLayoutService:l,reducedDataModel:c}){const{isContinuous:u,isStacked:d}=s.meta,f={main:void 0,mini:{getScales:()=>({}),getColor:()=>e=>e,getDatumProps:()=>({}),getAuxiliarySettings:()=>{}}};return{initialize:()=>{const h=[],{isReduced:p}=c.model().mode,m=u||p||d,g=!u&&(p||d)&&l?l.getHyperCube():void 0,y=g?"legendCube":void 0;return f.main=cx({app:e,model:t,translator:n,picasso:r,layoutService:s,config:{localeInfo:i,auto:qW,key:SW.SCALE.MAIN.COLOR},createConfig:()=>({hc:m?g||s.getHyperCube():c.model().cube,source:m?y:"miniCube",theme:o})}),h.push(f.main.initialize()),u&&(f.mini=cx({app:e,model:t,translator:n,picasso:r,layoutService:s,config:{localeInfo:i,auto:qW,key:SW.SCALE.REDUCED.COLOR},createConfig:()=>({layout:a.getInitialLayout(),hc:a.getInitialCube(),source:"miniCube",theme:o})}),h.push(f.mini.initialize())),Promise.all(h)},getMain:()=>f.main,getMini:()=>f.mini}}({picasso:t,model:s,app:l,translator:u,localeInfo:f,theme:e,continuousDataModel:D,layoutService:S,legendLayoutService:w,reducedDataModel:T}),N=function(e){var t,n=e.app,r=e.translator,i={initialized:!1,dimensions:[],measures:[]};return{initialize:(t=oy(uy().m(function e(t){var o,a,s,l,c,u,d;return uy().w(function(e){for(;;)switch(e.n){case 0:if(o=t.properties,!i.initialized){e.n=1;break}return e.a(2);case 1:return s=[Tv(a={app:n,translator:r,properties:o}),Av(a)],e.n=2,Promise.all(s);case 2:l=e.v,c=fy(l,2),u=c[0],d=c[1],i.dimensions=u,i.measures=d,i.initialized=!0;case 3:return e.a(2)}},e)})),function(e){return t.apply(this,arguments)}),getAlternatives:function(){return{dimensions:hy(i.dimensions),measures:hy(i.measures)}}}}({app:l,translator:u}),A=function({layoutService:e,themeService:t,colorService:n}){const r=t.getStyles(),i=t=>(e.getLayoutValue("components",[])||[]).find(e=>e.key===t),o=(e,t)=>{const r=n.getMain().getPaletteColor;if(e?.color&&r){const n=r(e);return"none"===n&&e.index>0?e?.color??t:n??t}return t};return{axis:{title:{getStyle:()=>{const e=i("axis")?.axis?.title;return{fontFamily:e?.fontFamily??r.axis.title.fontFamily,fontSize:e?.fontSize??r.axis.title.fontSize,color:o(e?.color,r.axis.title.color)}}},label:{getStyle:()=>{const e=i("axis")?.axis?.label?.name;return{fill:o(e?.color,r.axis.label.name.color),fontSize:e?.fontSize??r.axis.label.name.fontSize,fontFamily:e?.fontFamily??r.axis.label.name.fontFamily}}}},legend:{title:{getStyle:()=>{const e=i("legend")?.legend?.title;return{fontFamily:e?.fontFamily??r.legend.title.fontFamily,fontSize:e?.fontSize??r.legend.title.fontSize,color:o(e?.color,r.legend.title.color)}}},label:{getStyle:()=>{const e=i("legend")?.legend?.label;return{fontFamily:e?.fontFamily??r.legend.label.fontFamily,fontSize:e?.fontSize??r.legend.label.fontSize,color:o(e?.color,r.legend.label.color)}}}},label:{getStyle:()=>{const e=i("label")?.label?.value;return{fill:o(e?.color,r.label.value.color),useContrastColor:e?.useContrastColor??!0,fontSize:e?.fontSize??r.label.value.fontSize,fontFamily:e?.fontFamily??r.label.value.fontFamily}}}}}({layoutService:S,themeService:E,colorService:O}),_=tW({layoutService:S,viewState:i,colorModel:{settings:()=>O.getMain().getSettings(),resolveUIColor:e=>O.getMain().getPaletteColor(e)},chart:n,env:r,keys:{colorScale:SW.SCALE.MAIN.COLOR},isEnabled:()=>!S.meta.isGroupedByDimension&&(!S.meta.isStackedByDimension||m.isEnabled("TRENDLINES_STACKED_DIM"))&&!S.meta.isDimensionless});WV.attrExpr.updateProperties(s,a);const I=RV({layout:a,app:l,model:s,picasso:t,chart:n,translator:u,localeInfo:f,embed:y}),L=YV({app:l,chart:n,embed:y,flags:m,layout:S.getLayout(),localeInfo:f,model:s,options:{direction:d.direction},picasso:t,translator:u}),P=DW({chart:n,actions:p,translator:u,rtl:x,viewState:i,viewModel:k,layoutService:S,dockService:C,colorService:O,themeService:E,trendLineModel:_,custom:L});let R;S.meta.isDiscrete&&(R=R$({chart:n,actions:p,componentKey:SW.COMPONENT.BAR,enigmaModel:s,layoutService:S,dockService:C,trendLineModel:_,itemWidths:xW,viewState:i,rtl:x,options:{axisKey:SW.COMPONENT.BAR_AXIS,renderer:t.renderer("svg")()}}));const z=qN({layoutService:S,discreteModel:R}),F=function(e){return{layout:e.getLayout(),keys:{SCALE:{MAIN:{MINOR:SW.SCALE.MAIN.MINOR,MAJOR:SW.SCALE.MAIN.MAJOR}},COMPONENT:{BAR:SW.COMPONENT.BAR,BAR_AXIS:SW.COMPONENT.BAR_AXIS,Y_AXIS:"y-axis",MEASURE_TITLE:"measure-title",DIMENSION_TITLE:"dimension-title"},COLLECTION:{MAIN:SW.COLLECTION.MAIN}}}}(S),j=function(e){var t=e.picassoInstance,n=e.plugins,r=e.pluginArgs,i=void 0===r?{}:r,o={initialized:!1,definitions:[]};return{initialize:function(){return oy(uy().m(function e(){var r,a,s,l;return uy().w(function(e){for(;;)switch(e.n){case 0:if(!o.initialized){e.n=1;break}return e.a(2);case 1:return a=Promise.all(n.filter(function(e){return"custom-component"===e.info.type}).map(function(){var e=oy(uy().m(function e(n){var r;return uy().w(function(e){for(;;)switch(e.n){case 0:if(n.info.componentName){e.n=1;break}throw new Error("plugin-service: Custom component is missing componentName");case 1:return e.n=2,n.fn(ly({},i));case 2:if("object"===py(r=e.v)){e.n=3;break}throw new Error("plugin-service: Custom component needs to be an object");case 3:t.component(n.info.componentName,r);case 4:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}())),s=Promise.all(n.filter(function(e){return"component-definition"===e.info.type}).map(function(e){return e.fn(ly({},i))})),e.n=2,Promise.all([a,s]);case 2:l=e.v,o.initialized=!0,(r=o.definitions).push.apply(r,hy(l[1]));case 3:return e.a(2)}},e)}))()},extendComponents:function(e){return o.initialized?(o.definitions.filter(Boolean).forEach(function(t){var n=fy(e.filter(function(e){return e.key&&e.key===t.key}),1)[0];if(n){var r=Lv(!0,{},n.brush);Lv(!0,n,t),t.brush&&(n.brush=function(e,t){return"object"===py(e)&&Object.keys(e).length?(Array.isArray(t.consume)&&(e.consume=Rx({originalArray:e.consume,newArray:t.consume,matchKey:"context"})),Array.isArray(t.trigger)&&(e.trigger=Rx({originalArray:e.trigger,newArray:t.trigger,matchKey:"on"})),e):t}(r,t.brush))}else e.push(t)}),e):e}}}({picassoInstance:t,plugins:c||[],pluginArgs:F});b.setContext({discrete:R,layoutService:S}),h({alternativeService:N,discrete:R,continuous:LD,legendLayoutService:w,layoutService:S,viewModel:k,dockService:C,themeService:E,styleService:A,continuousDataModel:D,reducedDataModel:T,colorService:O,trendLineModel:_,refLineModel:z,pluginService:j,customTooltipModel:I,tooltipService:P,selectionService:g,logicalSize:M,disclaimerService:q,customTooltipService:L})},[g,d,r,a]),f}function NW(e){return e.qIsOtherCell||-3===e.qElemNumber||-3===e.qElemNo}function AW(e){return e.some(NW)}function _W(e,t){let n=NaN,r=NaN;return e.forEach(e=>{AW(e)||e.slice(-t).forEach(e=>{"NaN"!==e.qNum&&(n=Number.isNaN(n)?e.qNum:Math.min(e.qNum,n),r=Number.isNaN(r)?e.qNum:Math.max(e.qNum,r))})}),{min:n,max:r}}function IW(e){let t=NaN,n=NaN;if(!e.getLayoutValue("measureAxis.autoMinMax",!1)){const r=e.getLayoutValue("measureAxis.minMax");e.meta.isButterfly||"min"!==r&&"minMax"!==r||(t=+e.getLayoutValue("measureAxis.min")),"max"!==r&&"minMax"!==r||(n=+e.getLayoutValue("measureAxis.max"),e.meta.isButterfly&&(t=-n))}return{min:t,max:n,isExplicitMin:!Number.isNaN(t),isExplicitMax:!Number.isNaN(n)}}function LW(e,t){let n=NaN,r=NaN;return e.forEach(e=>{if(!AW(e)){let i=0,o=0;e.slice(-t).forEach(e=>{"NaN"!==e.qNum&&(e.qNum>=0?o+=e.qNum:i+=e.qNum)}),n=Number.isNaN(n)?i:Math.min(i,n),r=Number.isNaN(r)?o:Math.max(o,r)}}),{min:n,max:r}}function PW(e,t){const n={};e.forEach(e=>{if(!AW(e)){const r=e[0].qElemNumber;n[r]=n[r]?n[r]:{min:0,max:0,cId:r},e.slice(t).forEach(e=>{"NaN"!==e.qNum&&(e.qNum>=0?n[r].max+=e.qNum:n[r].min+=e.qNum)})}});let r=NaN,i=NaN;return Object.keys(n).forEach(e=>{r=Number.isNaN(r)?n[e].min:Math.min(n[e].min,r),i=Number.isNaN(i)?n[e].max:Math.max(n[e].max,i)}),{min:r,max:i}}function RW(e){return"number"==typeof e&&!Number.isNaN(e)}function zW(e){const{meta:t}=e,n=e.getHyperCubeValue("qMeasureInfo");return t.isButterfly?{min:Math.min(0,RW(n[1].qMax)?-n[1].qMax:0),max:Math.max(0,RW(n[0].qMax)?n[0].qMax:0)}:{min:Math.min(...n.filter(e=>RW(e.qMin)).map(e=>e.qMin)),max:Math.max(...n.filter(e=>RW(e.qMax)).map(e=>e.qMax))}}const{isNumber:FW}=TO;function jW(e,t,n){for(let n=e.length-1;n>-1;n--)if(t(e[n]))return e[n];return n}function BW(e){return!Number.isNaN(+e.qNum)}function HW(e){return e.qNum}function VW(e){return!Number.isNaN(+e.qNum)}function $W(e){return e.qNum}function WW(e,t){return e.push(...t),e}const{getValueWithOffset:UW,isNumber:YW}=TO;function KW(e,t){return Math.abs(e/t)<5||0===t}function GW({layoutService:e,trendLineModel:t},n={}){const{stackedByMeasureExtractor:r=LW,stackedByDimensionExtractor:i=PW,straightExtractor:o=_W,measureInfoExtractor:a=zW,explicitExtractor:s=IW}=n,{meta:l}=e;return{extract({qDataPages:e,qStackedDataPages:n,others:r,count:i}){let o,a;if(Array.isArray(n)?({min:o,max:a}=this.extractFromStacked(n)):({min:o,max:a}=this.extractFromStraight(e,i)),t.query.hasTrendLines()){const{min:e,max:n}=t.query.getMinMax();o=Number.isFinite(e)?Math.min(o,e):o,a=Number.isFinite(n)?Math.max(a,n):a}const{min:s,max:l}=this.extractOthers(r),c=this.extractExplicit(),u=[0,o,a].filter(e=>YW(e));let d=Math.min(...u),f=Math.max(...u);d=KW(s,d)?Math.min(d,s):d,f=KW(l,f)?Math.max(f,l):f;const h=[c.explicitMin,c.explicitMax,d,f].filter(e=>YW(e));return o=Number.isNaN(c.explicitMin)?Math.min(...h):c.explicitMin,a=Number.isNaN(c.explicitMax)?Math.max(...h):c.explicitMax,o===a&&(Number.isNaN(c.explicitMin)?o=UW(o,-.2):Number.isNaN(c.explicitMax)&&(a=UW(a,.2))),{min:o,max:a,implicitMin:d,implicitMax:f,otherMin:s,otherMax:l,hasOtherMin:s<o,hasOtherMax:l>a,...c}},extractExplicit(){const{min:t,max:n,isExplicitMin:r,isExplicitMax:i}=s(e);return{hasExplicitMinMax:r||i,hasExplicitMin:r,hasExplicitMax:i,explicitMin:t,explicitMax:n}},extractFromStacked:e=>function(e){return e.length?{min:Math.min(...e[0].qSubNodes.filter(e=>FW(e.qMinNeg)).map(e=>e.qMinNeg)),max:Math.max(...e[0].qSubNodes.filter(e=>FW(e.qMaxPos)).map(e=>e.qMaxPos))}:{min:0,max:0}}(e.length?e[0].qData:[]),extractFromStraight(t,n){const s=t.length?t[0].qMatrix:[];return l.isStackedByMeasure?r(s,n):l.isStackedByDimension?i(s,n):e.getHyperCubeValue("qHasOtherValues")?o(s,n):a(e)},extractOthers:e=>l.isStackedByDimension?function(e){const t=jW(Cx(e,"0.qData.0.qSubNodes",[]),NW,{qMaxPos:0,qMinNeg:0});return{min:t.qMinNeg,max:t.qMaxPos}}(e):l.isGroupedByDimension?function(e){const t=Cx(e,"0.qMatrix",[]).filter(AW).reduce(WW,[]).filter(VW).map($W);return{min:Math.min(0,...t),max:Math.max(0,...t)}}(e):function(e){const t=jW(Cx(e,"0.qMatrix",[]),AW,[]).filter(BW).map(HW);return{min:Math.min(0,...t),max:Math.max(0,...t)}}(e)}}function XW(e){const t=function({reducedDataModel:e,layoutService:t,continuousDataModel:n}){const{meta:r,getHyperCubeValue:i}=t,o=e=>!e.length&&r.mode.K,a=e=>{const t=i("qStackedDataPages",[]);return{qStackedDataPages:t,others:e?t:[]}};return{resolve(){const t=i("qMeasureInfo").length,s=i("qDimensionInfo").length,l=i("qHasOtherValues");if(!r.isStacked&&!l)return Promise.resolve({qDataPages:[{}],count:t});if(r.isContinuous){const e=r.isStackedByDimension?s:t;return n.fetchMinMaxData().then(t=>({qDataPages:t,count:e}))}const c=r.isStackedByDimension?1:t;return e.fetchMinMaxData().then(e=>{if(o(e))return a(l);let t=[];return l&&(t=r.mode.K?i("qStackedDataPages",[]):i("qDataPages",[])),{qDataPages:e,count:c,others:t}})}}}(e),n=GW(e);return t.resolve().then(e=>n.extract(e))}const JW="lasso",ZW=({key:e,componentTargetKey:t,requireFailure:n,recognizeWith:r},i)=>({key:`event:${e}`,type:"Pan",requireFailure:n,recognizeWith:r,options:{event:JW,enable(e,n){if(this.started===JW||!n)return!0;if(!i.actions.select.enabled()||!i.actions.lasso.enabled()||!i.actions.lasso.active())return!1;return this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter(e=>e.key===t).length>0}},events:{lassostart(t){t.preventDefault(),this.started!==JW&&(i.actions.select.emit("start",JW),this.chart.component(e).emit("lassoStart",t),this.started=JW)},lassomove(t){t.preventDefault(),this.chart.component(e).emit("lassoMove",t),"function"==typeof i.updateOnMove&&i.updateOnMove(this.chart)},lassoend(t){t.preventDefault(),this.started=!1,this.chart.component(e).emit("lassoEnd",t),i.actions.select.emit("end",JW),"function"==typeof i.updateOnEnd&&i.updateOnEnd()}}});const QW=({targets:e,requireFailure:t,recognizeWith:n,components:r,eventName:i="tap"},o)=>{let a;const s=o.customTooltipModel?o.customTooltipModel.utils:void 0,l=s?o.debouncer(s.displayTooltip,s.DEBOUNCE_THRESHOLD):void 0;return{key:"event:tap",type:"Tap",requireFailure:t,recognizeWith:n,options:{event:i,interval:10,pointers:1,enable(t,n){return!n||!(!o.actions.select.enabled()&&!o.actions.tooltip.enabled())&&(a=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter(t=>-1!==e.indexOf(t.key)),a.length>0)}},events:{[i](t){t.preventDefault();const n=function(e,t){const n=t.element.getBoundingClientRect();let r,i;return e.center?(({x:r}=e.center),({y:i}=e.center)):(r=e.clientX,i=e.clientY),{x:r-n.left,y:i-n.top}}(t,this.chart),c=o.hitRadius?o.hitRadius(a):0,u=c>0?{cx:n.x,cy:n.y,r:c}:n,d=o.shapesAt?o.shapesAt(u):this.chart.shapesAt(u,{components:e.map(e=>({key:e,propagation:"stop"})),propagation:"stop"}),f=this.chart.component("tooltip"),h="mouse"!==t.pointerType&&f&&f.show;if(!o.isLocked(a)&&!o.tooltipOnly&&o.actions.select.enabled()){const e=this.chart.componentsFromPoint({x:t.center.x,y:t.center.y}),n=e.some(e=>"legend-cat"===e.type);if(!d.length&&n||(this.chart.brushSelectionIncludeMax=!1,o.actions.select.brushSelectionIncludeMax=!1,o.actions.select.emit("start",i,e)),d.length&&r){this.chart.brushSelectionIncludeMax=!1,o.actions.select.brushSelectionIncludeMax=!1;const e="function"==typeof r?r(t,d):r;this.chart.brushFromShapes(d,{components:e}),o.actions.select.emit("end",i),(({largeDataService:e,chart:t})=>{(e?.meta||{}).isLargeNumPoints&&t.brush("lazySelection")._state(t.brush("selection")._state())})({largeDataService:o.largeDataService,chart:this.chart})}}if(f&&o.actions.tooltip.enabled())if(d.length){const{customTooltipModel:e}=o;if(e?.useCustomTooltip&&s.checkIfPromisesExist({customTooltipModel:e})){const n=s.getNodes(t,this.chart);l(t,f,{nodes:n,opts:o,customTooltipModel:e})}else f.emit("show",t,{nodes:d})}else h&&f.emit("hide")}}}};const eU=({key:e,requireFailure:t,recognizeWith:n,eventName:r="tap"},i)=>({prio:1,key:`event:${e}-tap`,type:"Tap",requireFailure:t,recognizeWith:n,options:{event:`${r}-${e}-tap`,interval:10,pointers:1,enable:(t,n)=>!!n&&(!!i.actions.select.enabled()&&(!(!n.target||"INPUT"!==n.target.nodeName)||!(!n.target||!n.target.hasAttribute("data-other-value"))&&(n.target.getAttribute("data-key")||"").split("-bubble")[0]===e))},events:{[`${r}-${e}-tap`](t){(t.target.getAttribute("data-key")||"").split("-bubble")[0]&&(t.preventDefault(),this.chart.component(e).emit("bubbleStart",t))}}});const tU=({eventName:e,key:t,fillTargets:n=[],requireFailure:r,recognizeWith:i},o,a)=>({key:`event:${t}`,type:"Pan",requireFailure:r,recognizeWith:i,options:{event:e,enable(r,i){if(this.started===e||!i)return!0;if(!o.actions.select.enabled())return!1;const a=this.chart.componentsFromPoint({x:i.center.x,y:i.center.y}).filter(e=>-1!==n.indexOf(e.key)),s=0===a.length&&function(e,t){const{target:n}=e.srcEvent;return!(!n||0!==(n.getAttribute("data-key")||"").indexOf(`${t}-`))}(i,t);return s?(this.started=e,!0):a.length>0}},events:{[`${e}start`](n){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,o.actions.select.brushSelectionIncludeMax=!0),n.preventDefault(),o.actions.select.emit("start",e),this.chart.component(t).emit(`${a}Start`,n),this.started=e},[`${e}move`](e){e.preventDefault(),this.chart.component(t).emit(`${a}Move`,e),"function"==typeof o.updateOnMove&&o.updateOnMove(this.chart)},[`${e}end`](n){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,o.actions.select.brushSelectionIncludeMax=!0),n.preventDefault(),this.chart.component(t).emit(`${a}End`,n),o.actions.select.emit("end",e),this.started=!1,"function"==typeof o.updateOnEnd&&o.updateOnEnd()}}});function nU(e,t){const n=function(e){const{key:t,targets:n,fillTargets:r,targetSelector:i,targetFillSelector:o,dock:a,scale:s,bubblesPlacement:l="inside",observeBrush:c=!1,multiple:u=!1,toLabel:d,onEdited:f}=e;return{key:t,type:"brush-range",layout:{dock:n.map(e=>`@${e}`).join(",")},on:f?{bubbleEnd(){f()}}:{},settings:{brush:c?{context:"selection",observe:!0}:"selection",scale:s,multiple:u,direction:"left"===a||"right"===a?"vertical":"horizontal",bubbles:{align:"left"===a||"top"===a?"end":"start",placement:l,label:d},target:{components:r,selector:i,fillSelector:o,fill:"rgba(82,204,82,0.2)"}}}}(e),r=tU(e,t,"range");return{interactions:[e.onEdited?eU(e,t):null,r].filter(Boolean),components:[n]}}const rU={refLines:{minimumLayoutMode:"SPARK"},measureAxisTitle:{minimumLayoutMode:"XSMALL"},dimensionAxisTitle:{minimumLayoutMode:"XSMALL"},measureAxis:{minimumLayoutMode:"XSMALL"},dimensionAxis:{minimumLayoutMode:"XSMALL"},gridLines:{minimumLayoutMode:"XSMALL"},refLinesLabels:{minimumLayoutMode:"SMALL"},horizontalDimensionAxis:{minimumLayoutMode:{width:"XSMALL",height:"SMALL"}},verticalDimensionAxis:{minimumLayoutMode:{width:"SMALL",height:"XSMALL"}},horizontalDimensionAxisTitle:{minimumLayoutMode:{width:"XSMALL",height:"MEDIUM"}},verticalDimensionAxisTitle:{minimumLayoutMode:{width:"MEDIUM",height:"XSMALL"}}},iU="inner-time-axis",oU="outer-time-axis";const aU={getMajorAxisMaxGlyphCount(e,t){let n=0;if(e.qDimensionInfo.length){const r=t?0:e.qDimensionInfo.length-1;n=TW.getMaxGlyphCount(e,r)}else e.qMeasureInfo.forEach(e=>{n=Math.max(n,e.qFallbackTitle.length)});return n},getAxisData(e,t){let n;return n=e.qDimensionInfo.length?Cx(e,t?"qStackedDataPages.0.qData.0.qSubNodes":"qDataPages.0.qMatrix"):e.qMeasureInfo,n},getBarAxisMaxGlyphCount(e,t){if(!e)return;const n=aU.getAxisData(e,t),r=!e.qDimensionInfo.length,i=r||t?void 0:e.qDimensionInfo.length-1,o=aU.getMajorAxisMaxGlyphCount(e,t),a=r?"qFallbackTitle":"qText";return nT.getAdjustedMaxGlyphCount(o,n,i,a)},getGroupAxisMaxGlyphCount(e){if(!e)return;const t=aU.getAxisData(e),n=TW.getMaxGlyphCount(e,0);return nT.getAdjustedMaxGlyphCount(n,t,0)}};var sU=3,lU=13;function cU(e,t,n,r){const{meta:i}=t.layoutService,o=[],a=!("none"===e.measureAxis.show),s=!("title"===e.measureAxis.show);i.isContinuous?o.push(...function(e,t,n,r){const{meta:i}=t.layoutService,{axis:o,grid:a}=t.themeService.getStyles(),s=t.styleService.axis.label.getStyle(),{auto:l,spacing:c}=t.layoutService.getLayoutValue("gridLine",{}),u=[],d="none"!==e.dimensionAxis.show&&"title"!==e.dimensionAxis.show,f=rU[`${t.dockService.meta.major.orientation}DimensionAxis`].minimumLayoutMode,h={type:"grid-line",x:{},layout:{minimumLayoutMode:rU.gridLines.minimumLayoutMode},ticks:{stroke:a.line.major.color},minorTicks:{show:!1,stroke:a.line.minor.color},animations:{enabled:t.viewModel.animations.enabled,trackBy:bN.lines.trackBy,compensateForLayoutChanges:bN.lines.compensateForLayoutChanges}},p=!!e.showMiniChartForContinuousAxis&&{type:"range",key:"range-brush-highlighter",layout:{dock:"@scrollbar"},settings:{scale:t.reducedDataModel.scales.major,brush:"selection",fill:"#6CB33F",opacity:.2}};if(i.isTime){if(d){const e=n?"end":"start",r=n?1:0,i="bottom"===t.dockService.meta.major.dock?0:1,a={label:{fill:s.fill,fontSize:s.fontSize,fontFamily:s.fontFamily},majorGuideLine:{stroke:o.line.major.color},minorGuideLine:{stroke:o.line.minor.color}},d={type:"time-axis",renderer:"svg",layout:{dock:t.dockService.meta.major.dock,minimumLayoutMode:f},preferredSize:()=>({size:2*parseFloat(s.fontSize),edgeBleed:{left:1,right:1}}),settings:{anchor:e,label:{align:i,justify:r},guideLine:{major:{justify:r},minor:{align:i}}},style:a,animations:{enabled:t.viewModel.animations.enabled,trackBy:bN.axes.trackBy({isTime:!0}),compensateForLayoutChanges:bN.axes.compensateForLayoutChanges({isTime:!0})}};u.push(bg(!0,{},d,{key:iU,scale:SW.SCALE.MAIN.MAJOR_INNER,settings:{guideLine:{minor:{show:!0}},line:{show:!l&&0===c}},style:bg(!0,{},a,{line:{stroke:o.line.major.color},majorGuideLine:{stroke:o.line.minor.color},minorGuideLine:{stroke:o.line.major.color}})})),u.push(bg(!0,{},d,{key:oU,scale:SW.SCALE.MAIN.MAJOR,settings:{guideLine:{minor:{show:!1}},line:{show:!1}}})),u.push({type:"axis-overlay",key:"outer-axis-overlay",scale:SW.SCALE.MAIN.MAJOR,layout:{dock:`@${oU}`,minimumLayoutMode:f}}),u.push({type:"axis-overlay",key:"inner-axis-overlay",scale:SW.SCALE.MAIN.MAJOR_INNER,layout:{dock:`@${iU}`,minimumLayoutMode:f}}),u.push(p)}return u.push(bg(!0,{},h,{key:"inner-time-grid",x:{scale:SW.SCALE.MAIN.MAJOR_INNER},ticks:{stroke:a.line.minor.color}})),u.push(bg(!0,{},h,{key:"outer-time-grid",x:{scale:SW.SCALE.MAIN.MAJOR}})),u}if(i.isContinuous){const e="continuous-axis";d&&(u.push({type:"axis",key:e,renderer:DN(t.flags),scale:SW.SCALE.MAIN.MAJOR,layout:{dock:t.dockService.meta.major.dock,minimumLayoutMode:f},settings:{labels:{align:0,offset:4,fill:s.fill,fontSize:s.fontSize,fontFamily:s.fontFamily},ticks:{show:!0,stroke:o.line.major.color},line:{show:!r},minorTicks:{show:!1}},animations:{enabled:t.viewModel.animations.enabled,trackBy:bN.axes.trackBy({isContinuous:!0}),compensateForLayoutChanges:bN.axes.compensateForLayoutChanges({isContinuous:!0})}}),u.push({type:"axis-overlay",key:"inner-axis-overlay",scale:SW.SCALE.MAIN.MAJOR,layout:{dock:`@${e}`,minimumLayoutMode:f}}),u.push(p)),u.push(bg(!0,{},h,{key:"continuous-grid",x:{scale:SW.SCALE.MAIN.MAJOR},minorTicks:{show:!0}}))}return u}(e,t,n,r)):o.push(...function(e,t,n,r){if("none"===e.dimensionAxis.show)return[];const{meta:i}=t.layoutService,o=t.themeService.getStyles(),a=[],s=function(e,t){return!t.layoutService.meta.isGroupedByDimension||!e.legend.show||t.colorService.getMain().getSettings().field!==t.viewModel.fields.major}(e,t),l=function(e,t){return!(!t.layoutService.meta.isGroupedByDimension||e.legend.show&&t.colorService.getMain().getSettings().field===t.viewModel.fields.majorGroup)}(e,t),c="horizontal"===t.dockService.meta.major.orientation,u=c?e.dimensionAxis.label:"auto",d="horizontal"===u?void 0:t.dockService.meta.minor.size/4,f=t.styleService.axis.label.getStyle(),h={type:"axis",renderer:DN(t.flags),layout:{dock:t.dockService.meta.major.dock,minimumLayoutMode:rU[`${t.dockService.meta.major.orientation}DimensionAxis`].minimumLayoutMode},settings:{labels:{show:!("title"===e.dimensionAxis.show),mode:u,tiltAngle:n?-40:40,maxEdgeBleed:50,maxLengthPx:d,...f},line:{show:!r,stroke:o.axis.line.major.color}},brush:{consume:[{context:"selection",data:["selectionDimension","axisSelectionDimension"],style:{inactive:{opacity:.3}}}]},animations:{enabled:t.viewModel.animations.enabled,trackBy:bN.axes.trackBy({isMajor:!0}),compensateForLayoutChanges:bN.axes.compensateForLayoutChanges({isHorizontal:c})}};l&&a.push(bg(!0,{},h,{key:"group-axis",scale:SW.SCALE.MAIN.MAJOR_INNER,settings:{paddingEnd:s?10:4,labels:{mode:s?"horizontal":h.settings.labels.mode,maxGlyphCount:aU.getGroupAxisMaxGlyphCount(e.qHyperCube),maxLengthPx:d},line:{show:(c||!s)&&h.settings.line.show}}}));const p=aU.getBarAxisMaxGlyphCount(e.qHyperCube,i.isStackedByDimension);return s&&a.push(bg(!0,{},h,{key:SW.COMPONENT.BAR_AXIS,scale:SW.SCALE.MAIN.MAJOR,settings:{paddingEnd:4,labels:{maxGlyphCount:p,maxLengthPx:d,tiltThreshold:p>sU&&p<lU?1:void 0},line:{show:!(c&&l)&&h.settings.line.show}}})),c||2!==a.length?a:[a[1],a[0]]}(e,t,n,r));const l=t.themeService.getStyles(),c=t.styleService.axis.label.getStyle();return a&&o.push({type:"axis",key:"y-axis",renderer:DN(t.flags),formatter:SW.FORMATTER.MINOR,layout:{dock:t.dockService.meta.minor.dock,minimumLayoutMode:rU.measureAxis.minimumLayoutMode},scale:SW.SCALE.MAIN.MINOR,settings:{labels:{show:s,...c},line:{stroke:l.axis.line.major.color},ticks:{stroke:l.axis.line.major.color},minorTicks:{stroke:l.axis.line.minor.color}},animations:{enabled:t.viewModel.animations.enabled,trackBy:bN.axes.trackBy({isMeasure:!0}),compensateForLayoutChanges:bN.axes.compensateForLayoutChanges({isMeasure:!0,dock:t.dockService.meta.minor.dock})}}),o}var uU={BAR:{STROKE:{COLOR:"#205891",WIDTH:{NONE:0,SMALL:1,MEDIUM:2,LARGE:4}}}};function dU({layoutService:e,discrete:t,flags:n}){const{isContinuous:r,isGrouped:i}=e.meta;if(r&&!n?.isEnabled("TLV_1060_CONTINUOUS_AXIS_BAR_WIDTH"))return 1;const o=(e.getLayoutValue("components",[])||[]).filter(e=>"bar"===e.key)[0];if(o?.style?.width){const{style:e}=o;return e.strokeWidth&&"none"!==e.strokeWidth&&!r?function(){const n=uU.BAR.STROKE.WIDTH[e.strokeWidth.toUpperCase()]/t.query.getItemSize(),r=e.width+n;return r>1?e.width-(r-1):e.width}:e.width}return i?.9:.7}const{isNumber:fU}=TO,hU=["$year","$yearquarter","$quarter","$yearmonth","$month","$weeknumber","$yearweek","$week","$weekday","$day","$date"],pU={seconds:1/86400,minutes:1/1440,hours:1/24,days:1,weeks:7,months:365/12,quarters:91.25,years:365,number:1},mU={$date:1,$day:1,$weekday:1,$week:1,$yearweek:7,$weeknumber:1,$month:1,$yearmonth:365/12,$quarter:1,$yearquarter:91.25,$year:365},gU=({data:e,layout:t})=>{const n=t.qHyperCube?.qDimensionInfo?.[0]?.continuous?.period;if("auto"!==n)return pU[n||"none"]||1;const r=t.qHyperCube?.qDimensionInfo?.[0]?.qTags||[];for(let e=0;e<hU.length;e+=1)if(-1!==r.indexOf(hU[e]))return mU[hU[e]]||1;return(({data:e,layout:t})=>{const n=(t.qHyperCube?.qDimensionInfo?.[0]?.qAttrExprInfo||[]).find(e=>"firstDimensionDiff"===e.id);let r=Number(n?.qFallbackTitle);if(fU(r))return r;const i=e.items.map(e=>e.timeStart.value);return r=OO.findMinPositiveDistance(i),r})({data:e,layout:t})};function yU({opts:e,MIN_BAR_WIDTH:t}){return({data:n,mainRect:r,maxBarWidth:i})=>{const{min:o,max:a}=e.viewState.get("zoom"),s=Math.max(0,(({data:e,width:t,min:n,max:r,opts:i})=>{if(r===n)return t;const o=i.layoutService.getLayout(),a=(o.qHyperCube?.qDimensionInfo?.[0]?.continuous.stepSize||1)*gU({data:e,layout:o});return a<=0?t:a/(r-n)*t})({data:n,width:r.width,min:o,max:a,opts:e}));return Math.max(t,Math.min(s,i))}}const vU={FULL:16,MEDIUM:14,SMALL:12,XSMALL:8,SPARK:4};function bU(e,t,n={}){const r=yU({opts:e,MIN_BAR_WIDTH:2});return({data:i})=>{const{chart:o,viewState:a,viewCache:s,layoutService:l,discrete:c,flags:u}=e,d=o.component(t).rect;if(!i.items.length||!d)return 2;const{min:f,max:h}=a.get("zoom");if(n[[f,h]])return n[[f,h]];const p=l.getLayout();let m;n={};let g=vU[zD.getLayoutMode(d.width,Number.MAX_VALUE)];const y=p.qHyperCube.qDimensionInfo?.[0]?.continuous?.period;if(u.isEnabled("TLV_1060_CONTINUOUS_AXIS_BAR_WIDTH")&&y&&"none"!==y){g=d.width;m=dU({layoutService:l,discrete:c,flags:u})*r({data:i,mainRect:d,maxBarWidth:g})}else{const e=Math.abs(h-f),t=Math.abs(s.get("continuousMax")-s.get("continuousMin"));if(0===t)return g;const n=function(e,t,n){return e*(1-n)+t*n}(2,g,1-Math.min(e/t/.2,1));m=Math.max(2,Math.min(g,n))}return n[[f,h]]=m,n[[f,h]]}}function xU(e,t){const{hasExplicitMax:n,explicitMax:r}=t;return!!n&&e>r&&r<=0}function SU(e,t){const{hasExplicitMin:n,explicitMin:r}=t;return!!n&&e<r&&r>=0}function wU(e,t){const{hasExplicitMax:n,explicitMax:r}=t;return!!n&&e>r&&r>0}function MU(e,t){const{hasExplicitMin:n,explicitMin:r}=t;return!!n&&e<r&&r<0}const kU="max",CU="min",qU={min:"Min",max:"Max"};function EU(e,t,n){return void 0===n?xU(e,t)||SU(e,t):n===kU?xU(e,t):SU(e,t)}function DU({minorMinMax:e,type:t}){return!(function({minorMinMax:e,type:t}){return!e[`hasExplicit${qU[t]}`]}({minorMinMax:e,type:t})||function({minorMinMax:e,type:t}){const n=t===kU?e.implicitMax:e.implicitMin;return!EU(Number(n.toFixed(13)),e,t)}({minorMinMax:e,type:t}))}function TU(e,{barComponent:t,type:n,isStacked:r}){const{viewCache:i,dockService:o,themeService:a}=e,s=i.get("minorMinMax");if(!s.hasExplicitMinMax)return!1;const l=n===kU?s.implicitMax:s.implicitMin;if(!EU(Number(l.toFixed(13)),s,n))return!1;const{orientation:c}=t.settings,u=n===kU?o.meta.minor.end:o.meta.minor.start;let d="end";r&&(d=n===kU?"sumOfPositives":"sumOfNegatives");const f=a.getStyles();return{type:"box-out-of-bounds",key:`bar-oob-${n}`,layout:{dock:u},data:t.data,brush:t.brush,settings:{orientation:c,major:t.settings.major,minor:t.settings.minor,dockValue:ZD.getDockValue(u),oob:bg({},t.settings.box,{fill:f.outOfRange.color,alignment:1,opacity:1,show:function(e){return!0!==e.datum.null?.value&&((!r||0!==e.datum[d].value)&&EU(e.datum[d].value,s,n))}})},animations:{enabled:e.viewModel.animations.enabled,compensateForLayoutChanges:bN.barOobs.compensateForLayoutChanges}}}function OU(e){return Math.min(Math.max(0,e),1)}const NU=(e,{chart:t,type:n,componentKey:r,collectionKey:i})=>{const{layoutService:o,dockService:a,viewCache:s}=e,{isStacked:l}=o.meta,c=s.get("minorMinMax"),{meta:u}=e.layoutService;if(!DU({minorMinMax:c,type:n}))return!1;let d;u.isGroupedByDimension?d=({scale:e,datum:t})=>e([t.group.value,t.value])+e.bandwidth([t.group.value,t.value])/2:u.isGroupedByMeasure&&(d=({scale:e,datum:t})=>e([t.value,t.measureIndex.value])+e.bandwidth()/2);const f={type:"box",key:`${SW.COMPONENT.GHOST_BAR_OOB}-${n}`,data:{collection:i},settings:{orientation:a.meta.minor.orientation,major:{scale:SW.SCALE.MAIN.MAJOR,fn:d},minor:{scale:SW.SCALE.MAIN.MINOR,start:e=>OU(t.scale(SW.SCALE.MAIN.MINOR)(e?.datum?.start?.value||0)),end(e){const r=t.scale(SW.SCALE.MAIN.MINOR);let i="end";l&&(i="max"===n?"sumOfPositives":"sumOfNegatives");const o=e.datum[i]?e.datum[i].value:r[n]();return OU(r(o))}},box:{width:dU({layoutService:e.layoutService,discrete:e.discrete}),minWidthPx:2,fill:"none",stroke:"transparent",show:e=>{const r=t.scale(SW.SCALE.MAIN.MINOR);let i="end";l&&(i="max"===n?"sumOfPositives":"sumOfNegatives");const o=e.datum[i]?e.datum[i].value:r.max();return"max"===n?o>r.max():o<r.min()}},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}};return f};function AU(e,t){const{style:n,styleService:r,dockService:i}=t,o=r.label.getStyle(),a=o.useContrastColor&&!e.onBackground?function(e){return function(t){return lO.isDark(t.node.attrs.fill)?e.lightColor:e.darkColor}}(n):o.fill,s="horizontal"===i.meta.major.orientation,l=e.padding||{left:s?0:4,right:s?0:4,top:s?4:0,bottom:s?4:0};return{position:e.position,justify:e.justify,fill:a,overflow:e.overflow,background:e.background,padding:l}}function _U(e){return{placements:e.simplifiedPlacements.map(t=>AU(t,e)),label:e.label}}function IU(e,t){if(t){if(function(e,t){return xU(e,t)}(e,t))return-1;if(function(e,t){return SU(e,t)}(e,t))return 1}return function(e,t){if(t&&0===e){const{min:e,max:n}=t;return 0===n&&0===e?1:n<=0?-1:e>=0||n>=-e?1:-1}return e>=0?1:-1}(e,t)}function LU(e,t,n,r){const i=IU(e,r);let o="up";return"vertical"===t&&i<0?o="down":"horizontal"===t&&(o=i>=0&&!n||i<0&&n?"right":"left"),o}function PU(e,t){const{dataPoint:n}=e;if(!n.showLabels)return!1;const{isStacked:r,isContinuous:i}=t.layoutService.meta;return!r||!i&&!!n.showSegmentLabels}function RU(e,t){const{dataPoint:n}=e;if(!n.showLabels)return!1;const{isStacked:r,isContinuous:i}=t.layoutService.meta;return!!r&&(!!i||!1!==n.showTotalLabels)}function zU(e,t,n,r){const i=[];return void 0!==e&&(i[e]={position:"outside",onBackground:!0,justify:0,overflow:r}),void 0!==t&&(i[t]={position:"inside",onBackground:!1,justify:n}),i}function FU({layout:e,component:t,minorScale:n},r,i){if(!PU(e,r))return!1;const{viewModel:o,ds:a,viewCache:s,layoutService:l,dockService:c,themeService:u}=r,{meta:d}=l,f=s.get("minorMinMax"),h=u.getStyles(),p=r.styleService.label.getStyle();let m;!d.isStacked&&(m=d.isStacked?1:0);const g=0===m?1:0,y=d.isStacked?.5:1,v=o.fields.minor[0],b=void 0===v?void 0:a.field(v).formatter();let x,S=-1;x=d.isStacked?d.isStackedByMeasure||!b?function(e){return e.data.segment.label}:function(e){return Math.abs(e.data.segment.value)>S?b(e.data.segment.value):""}:function(e){return e.data.end.label};const w={label:x,simplifiedPlacements:zU(m,g,y,d.isContinuous),style:h.label.value},M=[_U(bg(r,w))],k={component:t,selector:"rect",strategy:{type:"bar",settings:{direction:e=>LU(e.data.end.value,c.meta.minor.orientation,i,f),labels:M,fontSize:parseInt(p.fontSize,10),fontFamily:p.fontFamily,linkData:bN.labels.linkData}}},C=[k],q={key:"bar-labels",type:"labels",renderer:DN(r.flags),layout:{minimumLayoutMode:"XSMALL"},settings:{sources:C},animations:{enabled:r.viewModel.animations.enabled,trackBy:bN.labels.trackBy,compensateForLayoutChanges:bN.labels.compensateForLayoutChanges}};return d.isStackedByDimension&&b&&(q.beforeRender=()=>{S=function(e,t,n){const r="vertical"===t.dockService.meta.minor.orientation?"height":"width",i=t.chart.component(e),o=i&&i.rect?i.rect[r]:1,a=n?n.min():0;return 9.999*((n?n.max():0)-a)/o}(t,r,n)}),q}const jU={isSameMeasureAndColorRow:(e,t,n)=>t&&e&&t[0].content[0]===e[0].content[0]&&t[0].content[1]===e[0].content[1]&&t[1].content[n?0:1]===e[1].content[0],getTitle(e,t){const n=e.data;let r;return t.isStackedByDimension?r=n.stack?n.stack.label:void 0:t.isGroupedByDimension&&(r=n.group?n.group.label:void 0),void 0!==r?`${n.label}, ${r}`:n.label},getMeasure(e,t,n,r,i){if(n.isStacked&&("bar-oob-max"===t.key||"bar-oob-min"===t.key))return!1;const o=t.data,a=n.isStacked?r.viewModel.fields.minor[n.isStackedByDimension?0:o.measureIndex.value]:void 0,s=n.isStacked?{source:{key:o.source.key,field:a},label:!0===o.null?.value?"":n.isStackedByDimension&&i?i(o.segment.value):o.segment.label}:o.end;return uT.getMeasure(e,s)},getMeasures(e,t,n,r,i){const o=e.resources.dataset;return t.map(e=>jU.getMeasure(o,e,n,r,i)).filter(Boolean)},getCustomTooltipAttrExps(e,t,n){const r=e.resources.dataset;return BV({nodes:t,layout:n.layoutService.getLayout(),dataset:r})},extractBarTooltipData(e,t,n,r,i){const o={title:jU.getTitle(t,n),color:uT.getColor(e,t,r),measures:jU.getMeasures(e,t.childrenNodes?t.childrenNodes:[t],n,r,i)};if(jU.useCustomTooltip(r)){const n=jU.getCustomTooltipAttrExps(e,t.childrenNodes?t.childrenNodes:[t],r);o.customMeasures=n.customTooltipAttrExpsArr,o.customTitle=n.customTooltipInfoAttrExpsArr.filter(e=>e.id===MV.CUSTOM.TITLE),o.customDescription=n.customTooltipInfoAttrExpsArr.filter(e=>e.id===MV.CUSTOM.DESCRIPTION);let i=[];(t.childrenNodes?t.childrenNodes:[t]).forEach(e=>{e.data.customTooltipImages?.length>0&&!Array.isArray(e.data.customTooltipImages[0])&&(i=e.data.customTooltipImages)}),i.length>0&&(o.customImages=i);const a=r.layoutService.getLayout();if(a.tooltip?.chart?.object?.refId&&r.app&&r.customTooltipModel.embed&&"function"==typeof r.customTooltipModel.model?.getEffectiveProperties)if(r.app.isInModalSelection?.()){if(a?.qHyperCube?.qDimensionInfo?.length>0){AV.destroyVisualization({customTooltipModel:r.customTooltipModel});const e=r.customTooltipModel.translator.get("properties.tooltip.notselectedmessage");o.customLimitation=e}}else{const t=AV.createContainer({ctx:e,layout:a});o.customChart=t}}return o},getTotalStackTitle:(e,t)=>e>0?t?t.get("Object.ChartTooltip.sumOfPositives"):"Sum of positives":e<0?t?t.get("Object.ChartTooltip.sumOfNegatives"):"Sum of negatives":"",extractStackTotalBarTooltipData(e,t,n){const r=e.data.label,i=[e.data.sumOfPositives.value,e.data.sumOfNegatives.value].filter(e=>0!==e).map(e=>({label:`${jU.getTotalStackTitle(e,t)}`,value:n?n(e):e}));return{title:r,measures:i}},extractTooltipData(e,t){const n=t.chart.formatter(SW.FORMATTER.MINOR),{meta:r}=t.layoutService,i=e.node.childrenNodes?e.node.childrenNodes:[e.node],o=Math.max(0,i.length-6);i.length=Math.min(i.length,6);const{stackTotalBarNodes:a}=e.node,s=a&&a.length?a.map(e=>jU.extractStackTotalBarTooltipData(e,t.translator,n)):[];return{barTooltipData:i.map(i=>jU.extractBarTooltipData(e,i,r,t,n)),stackTotalBarTooltipData:s,numInvisibleNodesPhase1:o}},extractBarNodeData(e,t,n,r,i,o,a){let s=!i&&uT.getTitleRow(t,r);const l=uT.hideColorRow(t,n),c=!o&&!l&&uT.getColorRow(e,t,r),u=t.measures.map(i=>!a&&uT.getMeasureRow(i,e,t,r,l&&i.field===n.coloring.field)),d=u.filter(e=>!jU.isSameMeasureAndColorRow(e,c,r));if(jU.useCustomTooltip(n)){const n=i?[]:t.customMeasures.map(n=>uT.getMeasureRow(n,e,t,r,!1)),o=!(!t.customTitle[0]||i)&&uT.getTitleRow(t.customTitle[0],r),a=!(!t.customDescription[0]||i)&&uT.getDescriptionRow(t.customDescription[0],r);s=!jU.shouldIgnoreTitleRowForCtt(o,a,d,n)&&s;const l=[o,a,s,c,...d,...n];if(t.customChart&&l.push(t.customChart),t.customLimitation&&l.push(PV.getFooterRow(t.customLimitation,r)),t.customImages){const n=t.customImages.map(t=>PV.getImageRow(t,e));l.push(...n)}return l.filter(Boolean)}return[s,c,...d].filter(Boolean)},extractStackTotalBarNodeData(e,t,n){const r=!!t.measures.length&&uT.getTitleRow(t,n),i=t.measures.map(r=>uT.getMeasureRow(r,e,t,n,!1));return[r,...i].filter(Boolean)},useCustomTooltip:e=>Cx(e,"customTooltipModel.useCustomTooltip",!1),shouldIgnoreTitleRow:(e,t)=>e.isDimensionless||t>0&&!e.isGroupedByDimension&&!e.isStackedByDimension,shouldIgnoreTitleRowForCtt:(e,t,n,r)=>!1===n[0]&&0===r.length&&(e.length>0||t.length>0),shouldIgnoreColorRow:(e,t)=>t>0&&(e.isGroupedByMeasure||e.isStackedByMeasure),shouldIgnoreMeasureRow:(e,t,n)=>e&&t.measures.some(e=>e.field===n.coloring.field),shouldIgnoreDefaultRows:(e,t)=>jU.useCustomTooltip(t)&&Cx(e,"tooltip.hideBasic",0),extractBarsData(e,t,n,r){const{meta:i}=t.layoutService,o=t.layoutService.getLayout(),a=r.length;let s,l,c=[];const u=jU.shouldIgnoreDefaultRows(o,t);for(s=0;s<a;s++){l=r[s];const o=jU.shouldIgnoreTitleRow(i,s),d=u||jU.shouldIgnoreColorRow(i,s),f=u||jU.shouldIgnoreMeasureRow(d,l,t);if(c=c.concat(jU.extractBarNodeData(e,l,t,n,o,d,f)),c.length>=6||l.customImages||l.customChart||l.customLimitation)return{barsData:c,numInvisibleNodesPhase2:a-(s+1)}}return{barsData:c,numInvisibleNodesPhase2:0}},extractStackTotalBarsData(e,t,n){let r=[];return n.some(e=>e.measures.length)&&n.forEach(n=>{r=r.concat(jU.extractStackTotalBarNodeData(e,n,t))}),r},extractData(e,t,n){const{barTooltipData:r,numInvisibleNodesPhase1:i,stackTotalBarTooltipData:o}=jU.extractTooltipData(e,t),a=jU.extractStackTotalBarsData(e,n,o);a.length&&a.push(uT.getSeparatorRow());const{barsData:s,numInvisibleNodesPhase2:l}=jU.extractBarsData(e,t,n,r),c=a.concat(s),u=i+l;return u&&c.push(uT.getNMoreRow(u,t.translator,n)),c},calculateBoundsFromBars(e){const t=e.filter(e=>{const t=e.bounds;return t.width>0&&t.height>0}),n=t.length?t:e;return EN.combineBounds(n.map(e=>e.bounds))},calculateBoundsFromScale({opts:e,barKey:t,scale:n,majorScale:r,data:i,groupProp:o}){const a=e.chart.component(t).rect,{orientation:s}=e.dockService.meta.major,l="horizontal"===s?"width":"height",c=e.chart.scale(n).pxScale(a[l]);let u,d,f;if(e.layoutService.meta.isGroupedByMeasure){const t=e.viewModel.fields.minor.length;u=i.value,d=n===r&&void 0!==u?(c([u,0])+c([u,t-1]))/2:0,f=n===r&&void 0!==u?c.bandwidth([u,0]):0}else{const{value:e}=i;u=i[o]?i[o].value:void 0,d=c(n===r&&void 0!==u?[u,e]:e),f=n===r&&void 0!==u?c.bandwidth([u,e]):c.bandwidth(e)}const h=(d+f/2)*a[l],p={width:0,height:0};return"horizontal"===s?(p.x=h,p.y=a.height):(p.y=h,p.x=0),p},calculateTotalBounds({opts:e,labels:t,bars:n,barKey:r,barAxisKey:i,majorScale:o,majorInnerScale:a,groupProp:s}){const l=n.filter(e=>e.children&&e.children.length);let c;return c=l.length?jU.calculateBoundsFromBars(l):jU.calculateBoundsFromScale({opts:e,barKey:r,scale:t[0].key===i?o:a,majorScale:o,data:t[0].data,groupProp:s}),c},filterNodesOnKeys:(e,t)=>e.filter(e=>e.data&&t.indexOf(e.key)>-1),isBarMatchingLabel:(e,t)=>t.data.value===e.data.value,isBarMatchingLabelOnProp:(e,t,n)=>t.data.value===(e.data[n]?e.data[n].value:e.data.value),findBarsMatchingLabels(e,t,n,r){const i=e.filter(e=>t.some(t=>n(e,t,r)));return i},findBarsFromGroupLabelsInGroupedByDim(e,t,n){const r=jU.isBarMatchingLabelOnProp;return jU.findBarsMatchingLabels(e,t,r,n)},findBarsFromBarLabelsInGroupedByDim:(e,t,n)=>e.filter(e=>t.some(t=>t.data.group&&t.data.group.value===e.data[n].value&&t.data.value===e.data.value)),findBarsFromLabelsInSingleDim(e,t){const n=jU.isBarMatchingLabel;return jU.findBarsMatchingLabels(e,t,n)},findBarsFromLabelsInGroupedByDim(e,t,n,r){const i=t.filter(e=>e.key===n),o=t.filter(e=>e.key!==n),a=jU.findBarsFromBarLabelsInGroupedByDim(e,i,r),s=jU.findBarsFromGroupLabelsInGroupedByDim(e,o,r);return a.concat(s)},findStackTotalBarsFromLabelsInStackedByDim(e,t){const n=jU.isBarMatchingLabel;return jU.findBarsMatchingLabels(e,t,n)},findStackTotalBarsFromLabelsInStackedByMeasure(e,t){const n=jU.isBarMatchingLabel;return jU.findBarsMatchingLabels(e,t,n)},findBarsFromLabelsInStackedByDim(e,t,n){const r=jU.isBarMatchingLabelOnProp;return jU.findBarsMatchingLabels(e,t,r,n)},findBarsFromLabelsInStackedByMeasure:(e,t)=>jU.findBarsFromLabelsInSingleDim(e,t),findBarsFromLabels({labels:e,opts:t,filterKeys:n,barAxisKey:r,groupProp:i,stackProp:o}){const{meta:a}=t.layoutService,s=jU.filterNodesOnKeys(t.chart.findShapes("container"),n);return a.isStackedByDimension?jU.findBarsFromLabelsInStackedByDim(s,e,o):a.isStackedByMeasure?jU.findBarsFromLabelsInStackedByMeasure(s,e):a.isGroupedByDimension?jU.findBarsFromLabelsInGroupedByDim(s,e,r,i):jU.findBarsFromLabelsInSingleDim(s,e)},findStackTotalBarsFromLabels({labels:e,opts:t,stackTotalBarKey:n}){const{meta:r}=t.layoutService;if(r.isStacked){const i=jU.filterNodesOnKeys(t.chart.findShapes("container"),[n]);return r.isStackedByDimension?jU.findStackTotalBarsFromLabelsInStackedByDim(i,e):jU.findStackTotalBarsFromLabelsInStackedByMeasure(i,e)}return[]},isSingleBarMode:(e,t)=>(e.isSimple||1===t.length)&&t[0].children&&t[0].children.length,filterNodesOnLabels({labels:e,opts:t,barKey:n,stackTotalBarKey:r,barAxisKey:i,barOobMaxKey:o,barOobMinKey:a,groupProp:s,stackProp:l,majorScale:c,majorInnerScale:u,filterFn:d}){const{meta:f}=t.layoutService;if(e.length){let h=jU.findBarsFromLabels({labels:e,opts:t,filterKeys:[n],stackTotalBarKey:r,barAxisKey:i,barOobMaxKey:o,barOobMinKey:a,groupProp:s,stackProp:l});if(d&&(h=h.filter(d)),jU.isSingleBarMode(f,h))return[h[0]];if(h.length){let f=jU.findBarsFromLabels({labels:e,opts:t,filterKeys:[n,o,a],stackTotalBarKey:r,barAxisKey:i,barOobMaxKey:o,barOobMinKey:a,groupProp:s,stackProp:l});d&&(f=f.filter(d));const p=jU.calculateTotalBounds({opts:t,labels:e,bars:f,barKey:n,barAxisKey:i,groupProp:s,majorScale:c,majorInnerScale:u}),m=jU.findStackTotalBarsFromLabels({labels:e,opts:t,stackTotalBarKey:r}),g={key:n,bounds:p,childrenNodes:h,data:h.map(e=>e.data),stackTotalBarNodes:m};return[g]}return[]}return[]},filterNodesForOob:(e,t,n)=>e.key===t&&0===e.children.length||e.key===n,filterNodes({nodes:e,opts:t,barKey:n,stackTotalBarKey:r,barAxisKey:i,groupAxisKey:o,barOobMaxKey:a,barOobMinKey:s,groupProp:l,stackProp:c,majorScale:u,majorInnerScale:d}){let f=jU.filterNodesOnKeys(e,[i,o]),h=f&&f.length?[f[0]]:[];const p=jU.filterNodesOnLabels({labels:h,opts:t,barKey:n,stackTotalBarKey:r,barAxisKey:i,barOobMaxKey:a,barOobMinKey:s,groupProp:l,stackProp:c,majorScale:u,majorInnerScale:d});if(p&&p.length)return p;const{meta:m}=t.layoutService;if(m.isStackedByMeasure){f=jU.filterNodesOnKeys(e,[a,s]),h=f&&f.length?[f[0]]:[];const o=e=>jU.filterNodesForOob(e,n,a),p=jU.filterNodesOnLabels({labels:f,opts:t,barKey:n,stackTotalBarKey:r,barAxisKey:i,barOobMaxKey:a,barOobMinKey:s,groupProp:l,stackProp:c,majorScale:u,majorInnerScale:d,filterFn:o});if(p&&p.length)return p[0].stackTotalBarNodes=void 0,p}if(m.isStackedByDimension){f=jU.filterNodesOnKeys(e,[a,s]),h=f&&f.length?[f[0]]:[];const o=e=>jU.filterNodesForOob(e,n,a),p=jU.filterNodesOnLabels({labels:f,opts:t,barKey:n,stackTotalBarKey:r,barAxisKey:i,barOobMaxKey:a,barOobMinKey:s,groupProp:l,stackProp:c,majorScale:u,majorInnerScale:d,filterFn:o});if(p&&p.length)return p[0].stackTotalBarNodes=void 0,p}const g=jU.filterNodesOnKeys(e,[n,a,s]);return g.length?[g[0]]:[]}};function BU(e,t={},n){let r=[];const i=oT({key:SW.COMPONENT.BASE_TOOLTIP,rtl:n});return bg(!0,i,{scale:SW.SCALE.MAIN.COLOR,settings:{filter:e=>jU.filterNodes({nodes:e,opts:t,barKey:SW.COMPONENT.BAR,stackTotalBarKey:SW.COMPONENT.STACK_TOTAL_BAR,barAxisKey:SW.COMPONENT.BAR_AXIS,groupAxisKey:SW.COMPONENT.GROUP_AXIS,barOobMaxKey:SW.COMPONENT.BAR_OOB_MAX,barOobMinKey:SW.COMPONENT.BAR_OOB_MIN,groupProp:"group",stackProp:"stack",majorScale:"major",majorInnerScale:"majorInner"}),extract:e=>(r=e.node.childrenNodes?e.node.childrenNodes:[e.node],jU.extractData(e,t,n)),placement:"bounds",afterShow:()=>{const{app:e,properties:i,customTooltipModel:o}=t;e&&!e.isInModalSelection?.()&&o.useCustomTooltip&&o.embed&&AV.show({app:e,properties:i,selectedNodes:r,customTooltipModel:o,rtl:n})}},style:{content:{fontFamily:t.themeService.getStyles().fontFamily}}})}const HU={extractData:(e,t)=>[uT.getTitleRow({title:e.node.data.label},t)],filterNodes(e,t){const n=e.filter(e=>e.data&&e.key===t);return n.length?[n[0]]:[]}};function VU(e,t={},n){if("categorical"!==t.colorService.getMain().getSettings().type)return!1;const r=oT({key:SW.COMPONENT.LEGEND_CAT_TOOLTIP,rtl:n});return bg(!0,r,{scale:SW.SCALE.MAIN.COLOR,settings:{filter:e=>HU.filterNodes(e,SW.COMPONENT.LEGEND_COLOR_CAT),extract:e=>HU.extractData(e,n),placement:"pointer",direction:n?"rtl":"ltr"},style:{content:{fontFamily:t.themeService.getStyles().fontFamily}}})}function $U(e,{fill:t}){return{[SW.FORMATTER.MINOR]:{data:{fields:e.viewModel.fields.minor}},[SW.FORMATTER.COLOR]:t&&t.data&&t.data.field?{data:{field:t.data.field}}:{}}}const WU=1,UU=3;function YU(e){return e.getLayoutValue("gridLine.auto")}function KU(e){return!YU(e)&&e.getLayoutValue("gridLine.spacing")===WU}function GU(e){return!YU(e)&&e.getLayoutValue("gridLine.spacing")===UU}const XU=e=>({enabled:e.animations.enabled,trackBy:bN.lines.trackBy,compensateForLayoutChanges:bN.lines.compensateForLayoutChanges}),JU=(e,{themeService:t,layoutService:n,dockService:r,viewModel:i})=>{if(!YU(n)&&function(e){return!e.getLayoutValue("gridLine.spacing")}(n))return!1;const{grid:o}=t.getStyles(),a={key:"grid-line",type:"grid-line",layout:{minimumLayoutMode:rU.measureAxis.minimumLayoutMode},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}),ticks:{show:!KU(n)||((e,t)=>t%2==0),stroke:o.line.major.color},minorTicks:{show:GU(n),stroke:o.line.minor.color},animations:XU(i)};return a["horizontal"===r.meta.major.orientation?"y":"x"]=SW.SCALE.MAIN.MINOR,a};function ZU(e,t){const n=[JU(0,t)];return n[0]&&n.push((({dockService:e,themeService:t,viewCache:n,viewModel:r})=>{const i=n.get("minorMinMax");if(i.min>0||i.max<0)return!1;const o=t.getStyles(),a={};return a["horizontal"===e.meta.minor.orientation?"x":"y"]=[{value:0,scale:SW.SCALE.MAIN.MINOR,line:{stroke:o.grid.line.highContrast.color}}],{key:"high-contrast-grid-line",type:"ref-line",scale:SW.SCALE.MAIN.MINOR,lines:a,animations:XU(r)}})(t)),n}const QU="areaPan",eY=e=>({type:"Pan",key:"panorama",options:{event:QU,pointers:1,threshold:10,enable(t,n){return this.started===QU||!n||!!e.actions.scroll.enabled()&&e.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some(e=>e.key===SW.COMPONENT.BAR)}},events:{areaPanstart(t){t.preventDefault(),this.started=QU;const n=e.viewState.get("zoom");this[QU]={min:n.min,max:n.max,size:e.chart.component(SW.COMPONENT.BAR).rect.computedInner.width,span:n.max-n.min}},areaPanmove(t){t.preventDefault();const{span:n,min:r,max:i,size:o}=this[QU],a=-t.deltaX/o;e.viewState.set("zoom",{min:Math.min(r+a*n,e.viewCache.get("continuousMax")-n),max:Math.max(i+a*n,e.viewCache.get("continuousMin")+n)})},areaPanend(e){e.preventDefault(),this.started=!1},areaPancancel(e){e.preventDefault(),this.started=!1}}});function tY(e,t){if(e.layoutService.meta.isDiscrete)return{};const{viewCache:n,viewState:r,chart:i}=e,{rtl:o}=t,a=LD.event.onZoom({viewCache:n,viewState:r,chart:i},{threshold:100,rtl:o,targetKey:SW.COMPONENT.BAR}),s={last:0};return{type:"Pinch",key:"continuous-pinch-zoom",options:{event:"zoom",pointers:2,threshold:0,enable:(t,n)=>!n||!!e.actions.scroll.enabled()&&e.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some(e=>e.key===SW.COMPONENT.BAR)},events:{zoomstart(e){s.last=e.scale,e.preventDefault()},zoommove(e){const t=e.scale-s.last;(function(e){return Math.abs(e)>.01})(t)&&a(e.center,t>0?1:-1),e.preventDefault(),s.last=e.scale}}}}function nY({chart:e},t,n){const r=e.component(SW.COMPONENT.BASE_TOOLTIP);r&&r.show&&(r.emit("hide"),n?.customTooltipModel?.useCustomTooltip&&t&&t({},r,{nodes:[],opts:n,customTooltipModel:n.customTooltipModel,hide:!0}));const i=e.component(SW.COMPONENT.LEGEND_CAT_TOOLTIP);i&&i.show&&i.emit("hide");const o=e.component(SW.COMPONENT.TREND_LINES_TOOLTIP);o&&o.show&&o.emit("hide")}function rY(e,t){const{viewCache:n,viewState:r,chart:i,trendLineModel:o,layoutService:a}=e,{rtl:s}=t,l=e.layoutService.meta.isContinuous?LD.event.onZoom({viewCache:n,viewState:r,chart:i},{rtl:s,threshold:50,targetKey:SW.COMPONENT.BAR}):void 0,c=uW({majorInnerScale:SW.SCALE.MAIN.MAJOR_INNER,tooltip:SW.COMPONENT.TREND_LINES_TOOLTIP,tooltipOverlay:SW.COMPONENT.TREND_LINES_TOOLTIP_OVERLAY},{chart:i,viewState:r,trendLineModel:o,layoutService:a,rtl:s}),u=[SW.COMPONENT.BAR,SW.COMPONENT.BAR_AXIS,SW.COMPONENT.GROUP_AXIS,SW.COMPONENT.BAR_OOB_MAX,SW.COMPONENT.BAR_OOB_MIN],d=e.customTooltipModel.utils,f=e.debouncer(d.displayTooltip,d.DEBOUNCE_THRESHOLD);return{type:"native",events:{wheel(t){let n,r=!1;if(e.actions.scroll.enabled()){const i={x:t.clientX,y:t.clientY};[n]=e.chart.componentsFromPoint(i).filter(e=>e.key===SW.COMPONENT.BAR),n&&(e.layoutService.meta.isContinuous&&l(i,Math.sign(-t.deltaY)),r=!0)}!r&&e.actions.interact.enabled()&&([n]=e.chart.componentsFromPoint(t).filter(e=>e.key===SW.COMPONENT.LEGEND_COLOR_CAT),n&&(r=!0,function(e,t){const n=(Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY)>=0?"next":"prev";t.emit(n)}(t,n))),r&&t.preventDefault(),nY(e,f,e)},mousemove(t){if(e.actions.tooltip.enabled()){if(c(t))return;const n=this.chart.componentsFromPoint({x:t.clientX,y:t.clientY}),r=this.chart.component(SW.COMPONENT.BASE_TOOLTIP);if(r&&r.show)if(n.some(e=>u.indexOf(e.key)>-1)){const{customTooltipModel:n}=e;if(n.useCustomTooltip&&d.checkIfPromisesExist({customTooltipModel:n})){const i=d.getNodes(t,this.chart);f(t,r,{nodes:i,opts:e,customTooltipModel:n})}else r.emit("show",t)}else r.emit("hide");const i=this.chart.component(SW.COMPONENT.LEGEND_CAT_TOOLTIP);i&&i.show&&(n.some(e=>e.key===SW.COMPONENT.LEGEND_COLOR_CAT)?i.emit("show",t):i.emit("hide"))}},mouseup(t){2===t.button&&nY(this,f,e)},mouseleave(){nY(this,f,e)}}}}const iY=(e,t)=>({type:"hammer",enable:!0,gestures:[...(t.hammer||{}).gestures||[],...wA({...e,componentKey:"scrollbar",rtl:t.rtl}).gestures,...e.layoutService.meta.isDiscrete?e.discrete.interactions.gestures:[eY(e),tY(e,t)]]});function oY(e,t){const n=[iY(e,t),rY(e,t),wA({...e,componentKey:"scrollbar",rtl:t.rtl}).native];return e.layoutService.meta.isDiscrete&&n.push(e.discrete.interactions.native),n}function aY(e,t){const{viewCache:n,viewState:r,chart:i}=e,{rtl:o}=t,a=e.layoutService.meta.isContinuous?LD.event.onZoom({viewCache:n,viewState:r,chart:i},{rtl:o,threshold:50,targetKey:SW.COMPONENT.BAR}):void 0;return{type:"native",events:{wheel(t){let n,r=!1;if(e.actions.scroll.enabled()){const i={x:t.clientX,y:t.clientY};[n]=e.chart.componentsFromPoint(i).filter(e=>e.key===SW.COMPONENT.BAR),n&&(e.layoutService.meta.isContinuous&&a(i,Math.sign(-t.deltaY)),r=!0)}!r&&e.actions.interact.enabled()&&([n]=e.chart.componentsFromPoint(t).filter(e=>e.key===SW.COMPONENT.LEGEND_COLOR_CAT),n&&(r=!0,function(e,t){const n=(Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY)>=0?"next":"prev";t.emit(n)}(t,n))),r&&t.preventDefault()}}}}const sY=(e,t,n)=>({type:"hammer",enable:!0,gestures:[...(t.hammer||{}).gestures||[],...wA({...e,componentKey:"scrollbar",rtl:t.rtl}).gestures,...n.gestures,...e.layoutService.meta.isDiscrete?e.discrete.interactions.gestures:[eY(e),tY(e,t)]]});function lY(e,t){const n=e.tooltipService.getInteractions(),r=[sY(e,t,n),aY(e,t),wA({...e,componentKey:"scrollbar",rtl:t.rtl}).native,n.native];return e.layoutService.meta.isDiscrete&&r.push(e.discrete.interactions.native),r}const cY=e=>({enabled:e.animations.enabled,compensateForLayoutChanges:bN.bars.compensateForLayoutChanges});const uY=(e,t,{collectionKey:n})=>{if(!cA({layoutService:t.layoutService}).miniChart)return!1;if(t.reducedDataModel.mode.isContinuous)return function(e,t,{collectionKey:n}){const{continuousDataModel:r,reducedDataModel:i,colorService:o,layoutService:a,viewModel:s}=t,{meta:l}=a,c=a.getLayout(),u=t.flags.isEnabled("TLV_1060_CONTINUOUS_AXIS_BAR_WIDTH")&&l.isContinuous&&c.qHyperCube.qDimensionInfo?.[0]?.continuous?.period?bU(t,SW.COMPONENT.MINI_BAR):2;return{type:"box",key:SW.COMPONENT.MINI_BAR,layout:{dock:"@scrollbar"},show:()=>r.getDimensionCardinality()>1,data:{collection:n},settings:{box:bg(!0,{},e.settings.box,{minWidthPx:u,fill:o.getMini().getColor(),strokeWidth:0}),major:bg(!0,{},e.settings.major,{scale:i.scales.major}),minor:e.settings.minor,orientation:e.settings.orientation,oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},animations:cY(s)}}(e,t,{collectionKey:n});const{mode:r,scales:i}=t.reducedDataModel;let o;return r.isGroupedByDimension&&!r.isReduced?o=({scale:e,datum:t})=>e([t.group.value,t.value])+e.bandwidth([t.group.value,t.value])/2:r.isGroupedByMeasure&&(o=({scale:e,datum:t})=>e([t.value,t.measureIndex.value])+e.bandwidth()/2),{type:"box",key:SW.COMPONENT.MINI_BAR,layout:{dock:"@scrollbar"},show:()=>t.discrete.query.getCanScroll(),data:{collection:n},settings:{box:{...e.settings.box,fill:r.isReduced||r.isStackedByDimension?t.colorService.getMain().getSettings().others:t.colorService.getMain().getColor(),strokeWidth:0},major:{scale:i.major,fn:o},minor:{scale:i.minor},orientation:e.settings.orientation,oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},animations:cY(t.viewModel)}},{measureText:dY}=vp.renderer("svg")();function fY(e,t,n){const r=function(e){const t=bg(!0,{},e);return delete t.data,t}(t.minor),i=function(e,t,{majorScaleInvert:n,maxPxStep:r,align:i,getProp:o}){let a={invert:n,data:{extract:e.mode.isDimensionless?e.fields.minor.map((e,t)=>({field:e,value:t})):{source:"miniCube",field:"qDimensionInfo/0"}},type:e.mode.isDimensionless?"band":void 0,maxPxStep:r,align:i};return e.mode.isStackedByDimension?a.data.extract.field="qDimensionInfo/1":e.mode.isGroupedByDimension?e.mode.isReduced||(a.data={source:"miniCube",hierarchy:{value:e=>e.qElemNumber}}):e.mode.isGroupedByMeasure?(a=bg(!0,{},t),a.data.extract.source="miniCube"):e.mode.isContinuous&&(a=bg(!0,{},t,{min:()=>o("continuousMin"),max:()=>o("continuousMax")})),a}(e,t.major,n);return{reducedMinor:r,reducedMajor:i}}const hY=50,pY=100,mY=200;function gY(e,t){const n=function(e){const t=e.getLayoutValue("measureAxis.spacing",1);switch(t){case.5:return hY;case 1:return pY;case 2:return mY;default:return 125*t}}(t);return Math.max(1,Math.round(e/n))}function yY(e,t,n){return 0===t||t===Math.floor((n.length-1)/2)||t===n.length-1}function vY(e,t,n){return 0===t||0===e||t===n.length-1}function bY(e){for(let t=1;t<e.length;t++)if(e[t]===e[t-1])return!0;return!1}function xY(e,t,n,r,i){e.domain([t,n]),e.nice(10);const[o,a]=e.domain();let s=e.ticks(10);const l=function(e){return e.length%2==0}(s),c=function(e){const t=Math.round(.3*e.length),n=t,r=e.length-t;return e.slice(n,r).some(e=>0===e)}(s),u=c?vY:yY;s=s.filter(u),l&&!c&&!r&&s.length>1&&(s=[s[0],(s[0]+s[s.length-1])/2,s[s.length-1]]);const d=i?i.formatter(SW.FORMATTER.MINOR):void 0;return bY(d?s.map(d):s)&&(s=[s[0],s[s.length-1]]),{roundedMin:o,roundedMax:a,ticks:s}}function SY(e,t,n,r,i,o,a,s){const l=o.formatter(SW.FORMATTER.MINOR),c=s.getStyles(),u="horizontal"===a.meta.major.orientation?"height":"width",d=e=>dY({text:e,fontSize:c.axis.label.name.fontSize,fontFamily:c.axis.label.name.fontFamily})[u];let[f,h]=e.domain(),p=e.ticks(r);function m(){const e=p.map(l);return!bY(e)&&function(e){const t=i/p.length;return Math.max(...e.map(d))<=t}(e)}for(let i=r-1;i>0&&!m();i--)e.domain([t,n]),e.nice(i),[f,h]=e.domain(),p=e.ticks(i);return{roundedMin:f,roundedMax:h,ticks:p}}const wY=(e,t)=>e.value-t.value,MY=e=>({value:e,isMinor:!1}),kY=e=>({value:e,isMinor:!0});function CY(e,t,n){const r=Number.isNaN(t)&&Number.isNaN(n)?3:2;return e.filter(e=>(e=>Number.isNaN(t)||e>=t)(e)&&(e=>Number.isNaN(n)||e<=n)(e)).length<=r}function qY({chart:e,viewCache:t,dockService:n,layoutService:r,themeService:i,viewModel:o,ds:a}){const{isButterfly:s}=r.meta,{explicitMin:l,explicitMax:c,hasExplicitMin:u,hasExplicitMax:d}=t.get("minorMinMax"),{min:f,max:h}=function(e){let{min:t,max:n}=e.get("minorMinMax");return t===n&&0===t&&(t-=1,n+=1),{min:t,max:n}}(t),p=s?Math.max(Math.abs(f),Math.abs(h)):h,m=s?-p:f,g=Tx(()=>{const s=function(e,t,n){let r;return e?r=n.meta.chart.size:({rect:r}=t.component(SW.COMPONENT.BAR)),"horizontal"===n.meta.major.orientation?r.height:r.width}(t.get("isPreRender"),e,n),f=gY(s,r),h=function(e,t,n){const r=mC().domain([e,t]);return r.nice(n),r}(m,p,f);let g,y,v=[];"SPARK"===n.meta.chart.mode?({roundedMin:g,roundedMax:y}=function(e,t){return{roundedMin:e,roundedMax:t}}(m,p)):(({roundedMin:g,roundedMax:y,ticks:v}=SY(h,m,p,f,s,e,n,i)),CY(v,l,c)&&({roundedMin:g,roundedMax:y,ticks:v}=xY(h,m,p,u||d,e)));const b=function(e,t){const n=[];for(let r=0;r<e.length-1;r++){const i=e[r],o=(e[r+1]-i)/(t+1);for(let e=1;e<=t;e++)n.push(i+o*e)}return n}(v,1);v=function(e,t,n){return e&&n.length&&!n.some(e=>e===t)?(n.unshift(t),n.filter(e=>e>=t)):n}(u,l,v),v=function(e,t,n){return e&&n.length&&!n.some(e=>e===t)?(n.push(t),n.filter(e=>e<=t)):n}(d,c,v);let x=function(e,t){return[...e.map(MY),...t.map(kY)].sort(wY)}(v,b);if(r.meta.isButterfly){const e=o.fields.minor[0],t=void 0===e?void 0:a.field(e).formatter();"function"==typeof t&&(x=x.map(e=>({...e,label:t(Math.abs(e.value))})))}return{roundedMin:g,roundedMax:y,ticks:x}},()=>t.get("isPreRender"));return{values:()=>g().ticks,min:()=>u?l:g().roundedMin,max:()=>d?c:g().roundedMax}}function EY(e,{picasso:t,discrete:n,layoutService:r,dockService:i,viewModel:o,viewCache:a,reducedDataModel:s,colorService:l,themeService:c,viewState:u,chart:d,ds:f},{localeInfo:h,rtl:p}){const{meta:m}=r,{fields:g}=o,y=()=>{if("custom"!==r.getLayoutValue("dimensionAxis.axisDisplayMode"))return Math.min(200,i.meta.chart.size["horizontal"===i.meta.major.orientation?"height":"width"]/4)},v=!("none"===r.getLayoutValue("measureAxis.show"))?(b=i.meta.minor.orientation,x=i.meta.minor.dock,"vertical"===b?"near"===x||"left"===x?0:1:"near"===x||"bottom"===x?1:0):.5;var b,x;const S={},w="vertical"===i.meta.minor.orientation&&p,M=l.getMain().getScales(),k=l.getMini().getScales();if(Object.assign(S,M,{reducedFill:k.reducedFill}),S[SW.SCALE.MAIN.MINOR]=function({chart:e,viewModel:{fields:t},dockService:n,viewCache:r,viewModel:i,layoutService:o,themeService:a,ds:s},{rtl:l}){const c=qY({chart:e,dockService:n,viewCache:r,layoutService:o,themeService:a,viewModel:i,ds:s}),u={invert:"vertical"===n.meta.minor.orientation||l,ticks:{values:c.values},minorTicks:{count:1},min:c.min,max:c.max};return o.meta.isStacked||(u.data={source:"qHyperCube",fields:t.minor}),u}({chart:d,viewModel:o,dockService:i,viewCache:a,layoutService:r,themeService:c,ds:f},{rtl:p}),m.isGroupedByDimension)[SW.SCALE.MAIN.MAJOR_INNER,SW.SCALE.MAIN.MAJOR].forEach((e,t)=>{S[e]={invert:w,data:{source:"qHyperCube",hierarchy:{label:e=>e.qText?e.qText:"",value:e=>e.qElemNumber,props:{...o.selectionDimensionProp(t),group:m.isGroupedByDimension?{field:g.majorGroup}:void 0}}},label:({datum:e})=>e.label,ticks:{depth:t+1},maxPxStep:y,align:v}}),o.isDimensionLocked(0)||(S[SW.SCALE.MAIN.MAJOR_INNER].data.hierarchy.props.axisSelectionDimension={field:0});else if(m.isGroupedByMeasure)S[SW.SCALE.MAIN.MAJOR]={type:"group-by-measure",invert:w,data:{extract:{source:"qHyperCube",field:"qDimensionInfo/0",props:{axisSelectionDimension:{field:0}}}},measureCount:e.qHyperCube.qMeasureInfo.length,maxPxStep:y,align:v};else if(m.isTime){const{innerTime:e,outerTime:n}=function(e,t){const{layoutService:n,viewModel:r,viewCache:i,picasso:o,viewState:a,localeInfo:s,themeService:l}=e,c=()=>n.getHyperCubeValue("qAxisData.qAxis",[]),u=o.formatter("q-time"),d=l.getStyles(),f=e=>dY({text:e,fontSize:d.axis.label.name.fontSize,fontFamily:d.axis.label.name.fontFamily});i.set("qTimeAxisCache",[]);const h={get:(e,t=0)=>{const n=i.get("qTimeAxisCache");return n[t]&&n[t][0]===e?n[t][1]:void 0},set:(e,t,n=0)=>{i.get("qTimeAxisCache")[n]=[e,t]},key:({distance:e})=>{const{min:t,max:n}=a.get("zoom"),r=(n-t)/(i.get("continuousMax")-i.get("continuousMin")),o=c().map(e=>e.qName);return[e,Number.parseFloat(r).toFixed(12),...o].toString()}};return{innerTime:{data:{field:r.fields.majorNumeric},type:"q-time-axis",qAxis:c,field:r.fields.majorNumeric,min:()=>a.get("zoom").min,max:()=>a.get("zoom").max,invert:!!t,formatter:{fn:u,localeInfo:s,qNumFormat:n.getHyperCubeValue("qDimensionInfo.0",{}).qNumFormat,measureText:f},ticks:{generator:{type:"d3",initialMin:a.get("zoom").min},level:"inner",anchor:"start",clamp:!0},cache:h},outerTime:{data:{field:r.fields.majorNumeric},type:"q-time-axis",qAxis:c,field:r.fields.majorNumeric,min:()=>a.get("zoom").min,max:()=>a.get("zoom").max,invert:!!t,formatter:{fn:u,localeInfo:s,qNumFormat:n.getHyperCubeValue("qDimensionInfo.0",{}).qNumFormat,measureText:f},ticks:{generator:{type:"d3"},level:"outer",anchor:"start",clamp:!0},cache:h}}}({picasso:t,localeInfo:h,viewState:u,viewModel:o,viewCache:a,themeService:c,layoutService:r},p);S[SW.SCALE.MAIN.MAJOR_INNER]=e,S[SW.SCALE.MAIN.MAJOR]=n}else m.isContinuous?S[SW.SCALE.MAIN.MAJOR]={type:"linear",invert:w,data:{extract:{key:"qHyperCube",field:g.majorNumeric}},ticks:{forceBounds:!0,count:u.get("zoom").min===u.get("zoom").max?1:void 0},minorTicks:{count:1},min:()=>u.get("zoom").min,max:()=>u.get("zoom").max}:S[SW.SCALE.MAIN.MAJOR]={invert:w,data:{extract:m.isDimensionless?g.minor.map((t,n)=>({field:t,label:()=>e.qHyperCube.qMeasureInfo[n].qFallbackTitle,value:n})):{source:"qHyperCube",field:"qDimensionInfo/0",props:{axisSelectionDimension:{field:0}}}},type:m.isDimensionless?"band":void 0,maxPxStep:y,align:v};const{reducedMinor:C,reducedMajor:q}=fY(s,{major:S[SW.SCALE.MAIN.MAJOR],minor:S[SW.SCALE.MAIN.MINOR]},{majorScaleInvert:w,maxPxStep:y,align:v,getProp:a.get});return m.isDiscrete&&(S[SW.SCALE.MAIN.MAJOR].range=n.query.getScaleRange,m.isGroupedByDimension&&(S[SW.SCALE.MAIN.MAJOR_INNER].range=n.query.getScaleRange)),S[s.scales.major]=q,S[s.scales.minor]=C,S}function DY(e,t,n){const{layoutService:r,colorService:i}=e;return function(e,t){if(!e.targets)throw new Error("Missing 'targets' property");return{interactions:[QW(e,t)],components:[]}}({targets:[r.meta.isStackedByDimension&&r.getHyperCubeValue("qStackedDataPages.0.qArea.qHeight",NaN)>1?SW.COMPONENT.STACK_TOTAL_BAR:SW.COMPONENT.BAR,SW.COMPONENT.BAR_AXIS,SW.COMPONENT.GROUP_AXIS,"outer-axis-overlay","inner-axis-overlay",SW.COMPONENT.LEGEND_COLOR_CAT],components(e,t){const r={action:e.srcEvent.ctrlKey||n?"set":"toggle",contexts:["selection"],key:t[0].key};return SW.COMPONENT.BAR===t[0].key?[{...r,data:["selectionDimension"]}]:[SW.COMPONENT.BAR_AXIS,SW.COMPONENT.GROUP_AXIS].includes(t[0].key)?[{...r,data:["selectionDimension","axisSelectionDimension"]}]:[r]}},{...e,isLocked:n=>n.some(e=>e.key===SW.COMPONENT.LEGEND_COLOR_CAT)?i.getMain().isSelectionLocked({isMeasureSelectionLocked:t}):e.isLocked(n)})}function TY(e){const t=e.layoutService.meta.isStackedByDimension&&e.layoutService.getHyperCubeValue("qStackedDataPages.0.qArea.qHeight",NaN)>1;return function(e,t){if(!e.componentTargetKey)throw new Error("Missing 'componentTargetKey' property");const n={key:"lasso",...e},r=(({key:e,components:t})=>({key:e,type:"brush-lasso",layout:{displayOrder:99},settings:{brush:{components:t},lasso:{fill:"rgba(0, 0, 0, 0)",stroke:"black",strokeWidth:2,opacity:.7,strokeDasharray:[]},snapIndicator:{threshold:75,strokeDasharray:"5, 5",stroke:"black",strokeWidth:2,opacity:.7},startPoint:{r:10,stroke:"rgba(77, 192, 78, 1)",strokeWidth:0,opacity:1}}}))(n);return{interactions:[ZW(n,t)],components:[r]}}({key:"lasso",componentTargetKey:SW.COMPONENT.BAR,components:[t?{key:SW.COMPONENT.STACK_TOTAL_BAR,contexts:["selection"],action:"add"}:{key:SW.COMPONENT.BAR,contexts:["selection"],action:"add",data:["selectionDimension"]}]},e)}function OY(e){return function(e,t){const n=function(e){const{key:t,targets:n,components:r,fillTargets:i,dock:o}=e;return{key:t,type:"brush-area-dir",layout:{dock:n.map(e=>`@${e}`).join(",")},settings:{multiple:!0,brush:{components:r},direction:"left"===o||"right"===o?"vertical":"horizontal",bubbles:{align:"left"===o||"top"===o?"end":"start",placement:"inside"},target:{components:i,fill:"rgba(82,204,82,0.2)"}}}}(e);return{interactions:[tU(e,t,"area")],components:[n]}}({eventName:"discreteRange",components:[{key:SW.COMPONENT.BAR,contexts:["selection"],action:"set",data:["selectionDimension"]}],key:"discreteRangeBrush",targets:["group-axis",SW.COMPONENT.BAR_AXIS,SW.COMPONENT.BAR],fillTargets:["group-axis",SW.COMPONENT.BAR_AXIS],dock:e.dockService.meta.major.dock},e)}function NY(e,t,n){const{selectionService:r}=e,{isUnsupportedFeature:i}=t,o=void 0===n,a=r.getIsSingleSelect(n),s=DY(e,o,a);if(o||a)return{components:[...s.components],gestures:[...s.interactions]};const l=TY(e),c=function(e,t){return e.layoutService.meta.isStacked||e.layoutService.meta.isButterfly||t?.("rangeSelections")?{components:[],interactions:[]}:nU({eventName:"measureRange",key:"measureRangeBrush",targets:["y-axis",SW.COMPONENT.BAR],fillTargets:["y-axis"],dock:e.dockService.meta.minor.dock,scale:SW.SCALE.MAIN.MINOR,onEdited(){e.actions.select.emit("end","measureRange")}},e)}(e,i),u=function(e){return e.layoutService.meta.isContinuous?nU({eventName:"continuousRange",key:"continuousRangeBrush",targets:e.layoutService.meta.isTime?["outer-time-axis","inner-time-axis",SW.COMPONENT.BAR]:["continuous-axis",SW.COMPONENT.BAR],fillTargets:e.layoutService.meta.isTime?["outer-time-axis","inner-time-axis"]:["continuous-axis"],observeBrush:!0,multiple:!0,dock:e.dockService.meta.major.dock,scale:e.layoutService.meta.isTime?SW.SCALE.MAIN.MAJOR_INNER:SW.SCALE.MAIN.MAJOR,toLabel({datum:t,data:n,scale:r}){const i=e.layoutService.meta.isTime?r.formatter():e.chart.formatter(SW.FORMATTER.MINOR),o=e.chart&&e.chart.brushSelectionIncludeMax;return`${t!==Math.max(...n)||o?"":"<"}${i(t)}`}},e):{components:[],interactions:[]}}(e),d=OY(e);return{components:[...s.components,...l.components,...c.components,...d.components,...u.components],gestures:[...l.interactions,...s.interactions,...c.interactions,...d.interactions,...u.interactions]}}const{isNumber:AY}=TO;function _Y({layoutService:e,viewModel:t,dockService:n}){const{meta:r}=e;if(!r.isStackedByDimension||r.isContinuous)return!1;const{fields:i}=t,o=e.getLayoutValue("components",null),a=o?o.filter(e=>"bar"===e.key)[0]:null;return{key:"shadow-bar",type:"box",data:{extract:[{field:i.majorStack,filter:e=>0!==e.qDown||0!==e.qUp,props:{start:{value:e=>(e=>Number(e.filter(e=>AY(e.qMaxPos)).map(e=>e.qMaxPos).reduce((e,t)=>e+t,0).toFixed(13)))(e.qSubNodes)},end:{value:e=>AY(e.qMaxPos)?Number(e.qMaxPos.toFixed(13)):0}}},{field:i.majorStack,filter:e=>0!==e.qDown||0!==e.qUp,props:{start:{value:e=>(e=>Number(e.filter(e=>AY(e.qMinNeg)).map(e=>e.qMinNeg).reduce((e,t)=>e+t,0).toFixed(13)))(e.qSubNodes)},end:{value:e=>AY(e.qMinNeg)?Number(e.qMinNeg.toFixed(13)):0}}}]},settings:{major:{scale:SW.SCALE.MAIN.MAJOR},minor:{scale:SW.SCALE.MAIN.MINOR},orientation:n.meta.minor.orientation,box:{width:a?.style?.width&&a.style.width>0?a.style.width:.7,fill:()=>({type:"pattern",fill:"rgba(165, 165, 165, 0.8)",width:4,height:4,shapes:[{type:"rect",x:0,y:3,width:1,height:1},{type:"rect",x:1,y:2,width:1,height:1},{type:"rect",x:2,y:1,width:1,height:1},{type:"rect",x:3,y:0,width:1,height:1}]})},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},animations:{enabled:t.animations.enabled,trackBy:bN.shadowBars.trackBy,compensateForLayoutChanges:bN.bars.compensateForLayoutChanges}}}const IY={min:"Min",max:"Max"};function LY(e,t,n){const r=n?e.implicitMax:e.implicitMin;return!function(e,t,n){return void 0===n?wU(e,t)||MU(e,t):n===kU?wU(e,t):MU(e,t)}(Number(r.toFixed(13)),e,t)}function PY(e,{barComponent:t,type:n,isStacked:r}){const{viewCache:i,layoutService:o,dockService:a}=e,s=i.get("minorMinMax"),l=n===kU;if(function(e,t){return!e[`hasOther${IY[t]}`]}(s,n)){if(function(e,t){return!e[`hasExplicit${IY[t]}`]}(s,n))return!1;if(LY(s,n,l))return!1}if(function(e,t,n){const r=n?e=>e<0:e=>e>0;return e[`hasExplicit${IY[t]}`]&&r(e[`explicit${IY[t]}`])}(s,n,l))return!1;let c="end";r&&(c=l?"sumOfPositives":"sumOfNegatives");const u=function(e){let t;return()=>(void 0===t&&(t=e()),t)}(()=>e.chart.scale(SW.SCALE.MAIN.MINOR)[n]()),d=l?e=>e.datum[c].value>u():e=>e.datum[c].value<u(),f=SW.COMPONENT.BAR,h=e.layoutService.getLayoutValue("components",[]),p=h?h.filter(e=>e.key===f)[0]:null;return{type:"box-sliced-hat",key:`sliced-hat-${n}`,layout:{dock:l?a.meta.minor.end:a.meta.minor.start},data:t.data,brush:t.brush,settings:{orientation:t.settings.orientation,major:t.settings.major,minor:t.settings.minor,hat:bg({},t.settings.box,{fill:o.meta.isStacked?"#999":t.settings.box.fill,alignment:1,opacity:1,show:d,width:dU({layoutService:e.layoutService,discrete:e.discrete}),strokeWidth:p?.style?.strokeWidth?uU.BAR.STROKE.WIDTH[p.style.strokeWidth.toUpperCase()]:uU.BAR.STROKE.WIDTH.NONE,stroke:p?.style?.strokeColor?.color??uU.BAR.STROKE.COLOR})}}}function RY(e,{collectionKey:t},n){const{meta:r}=e.layoutService,{fields:i}=e.viewModel,o=r.isStackedByDimension&&!r.isContinuous?"qValue":"qNum";function a(t,n){const i=e.ds.field(t).raw(),a=e.ds.field(t).formatter(),s=WD.shouldUseFormat(i),l=r.isButterfly&&n>0;return{field:t,reduceLabel:"none",value:e=>"NaN"===e[o]?0:(e=>l&&0!==e?-e:e)(e[o]),label:e=>s?(e=>"NaN"===e[o]?"-":a(e[o]))(e):e.qText}}function s(e){if(!r.isButterfly)return;return{field:e,reduceLabel:"none",value:e=>e[o]<0}}const l=r.isStackedByDimension?e=>"NaN"===e.qValue:e=>!!e.qIsNull;function c(e){return{field:e,reduceLabel:"none",reduce:"first",value:l}}const u={key:t,data:{extract:i.minor.map((t,o)=>{const l=e.colorService.getMain().getDatumProps(o),u=e.colorService.getMini().getDatumProps(o),d=l[Object.keys(l)[0]],f=d?.field,h=f?{field:f,reduceLabel:"none",value:e=>void 0!==e.qNum&&"NaN"!==e.qNum?e.qNum:e.qText||"-"}:void 0,p={field:r.isDimensionless?t:i.major,props:{...e.viewModel.selectionDimensionProp(),axisSelectionDimension:{field:0},start:0,end:a(t,o),negative:s(t),null:c(t),segment:r.isStacked?a(t):void 0,group:r.isGroupedByDimension?{field:i.majorGroup}:void 0,stack:r.isStacked?{field:i.majorStack}:void 0,measureIndex:r.isGroupedByDimension||r.isStackedByDimension?void 0:o,timeStart:r.isContinuous?{field:i.majorNumeric}:void 0,timeEnd:r.isContinuous?{field:i.majorNumeric}:void 0,fillTooltip:h,...l,...u,id:{value:e=>`r${e.qRow}e${e.qElemNumber}m${o}`},customTooltipAttrExps:0!==r.dimensionCount?FV.getNode(e.layoutService.getLayout(),r):void 0}};return r.isDimensionless&&(p.value=o),void 0!==n&&(p.source=n),WD.deleteUndefinedProperties(p.props),p}),filter:r.isButterfly?e=>!e.negative.value:void 0}};return r.isStacked&&(u.data.stack={stackKey:e=>e.stack.value,value:e=>e.end.value,offset:"diverging"}),u}const{isNumber:zY}=TO;function FY({layoutService:e,viewModel:t},{collectionKey:n}){const{meta:r}=e,{fields:i}=t;if(!r.isStacked)return!1;let o;return o=r.isStackedByMeasure?function(e,t){const n={field:0,props:{sumOfPositives:{fields:t.minor.map(e=>({field:e})),value:e=>e.reduce((e,t)=>t>0?e+t:e,0),reduceLabel:"none"},sumOfNegatives:{fields:t.minor.map(e=>({field:e})),value:e=>e.reduce((e,t)=>t<0?e+t:e,0),reduceLabel:"none"},null:{fields:t.minor.map(e=>({field:e})),value:e=>Array.isArray(e)&&e.every(e=>"NaN"===e),reduceLabel:"none"}}};if(e.isContinuous){const e={field:t.major,value:e=>e.qNum,reduceLabel:"none"};n.props.timeStart=e,n.props.timeEnd=e,n.value=e=>e.qNum}return n}(r,i):function(e,t){if(!e.isContinuous)return{field:t.majorStack,reduceLabel:"none",props:{sumOfPositives:{value:e=>zY(e.qMaxPos)?Number(e.qMaxPos.toFixed(13)):0},sumOfNegatives:{value:e=>zY(e.qMinNeg)?Number(e.qMinNeg.toFixed(13)):0},null:{value:e=>{const{qSubNodes:t=[]}=e;return t.every(e=>"NaN"===((e.qSubNodes||[])[0]||{}).qValue)}}}};const n={field:t.majors[0],value:e=>e.qNum,reduceLabel:"none"};return{field:t.majorStack,trackBy:e=>e.qNum,reduce:e=>e[0],props:{sumOfPositives:{field:t.minor[0],reduceLabel:"none",reduce:e=>e.reduce((e,t)=>t>0?e+t:e,0)},sumOfNegatives:{field:t.minor[0],reduceLabel:"none",reduce:e=>e.reduce((e,t)=>t<0?e+t:e,0)},timeStart:n,timeEnd:n}}}(r,i),{key:n,data:{extract:o}}}const jY="main-collection",BY="stack-total-collection";function HY(e,{collectionKey:t}){const{layoutService:n,colorService:r,reducedDataModel:{fields:i,mode:o}}=e,{meta:a}=n,s=a.isStackedByDimension&&!a.isContinuous?"qValue":"qNum";function l(e,t){if(!a.isButterfly)return{field:e};const n=t>0;return{field:e,value:e=>"NaN"===e[s]?0:(e=>n&&0!==e?-e:e)(e[s])}}function c(e){if(!a.isButterfly)return;return{field:e,reduceLabel:"none",value:e=>e[s]<0}}return{key:t,data:{extract:i.minor.map((e,t)=>{const n=o.isReduced?{}:r.getMain().getDatumProps(t),a={start:0,end:l(e,t),negative:c(e),group:{field:i.majorGroup},measureIndex:t,...n},s={source:"miniCube",field:o.isDimensionless?e:i.major,props:a};return o.isDimensionless&&(s.value=t),s}),filter:a.isButterfly?e=>!e.negative.value:void 0}}}const VY="mini-collection",$Y="mini-stack-collection",WY="mini-continuous-collection",UY="miniCube",YY=(e,t)=>{const n=(e=>{const t=[RY(e,{collectionKey:jY})];return e.layoutService.meta.isStacked&&t.push(FY(e,{collectionKey:BY})),t})(t),r=((e,t)=>{const n=[];return cA({layoutService:t.layoutService}).miniChart&&(t.reducedDataModel.mode.isContinuous?n.push(RY(t,{collectionKey:WY},UY)):t.layoutService.meta.isStacked?n.push(function(e,{collectionKey:t}){const{colorService:n,reducedDataModel:{fields:r,mode:i}}=e;return{key:t,data:{extract:r.minor.map((e,t)=>{const o={end:{field:e,reduceLabel:"none"},...i.isStackedByMeasure&&!i.isReduced?n.getMain().getDatumProps(t):{}};return i.isContinuous&&(o.timeStart={field:r.major,value:e=>e.qNum},o.timeEnd=o.timeStart),{source:"miniCube",field:r.major,props:o}}),stack:{stackKey:e=>e.value,value:e=>e.end.value,offset:"diverging"}}}}(t,{collectionKey:$Y})):n.push(HY(t,{collectionKey:VY}))),n})(0,t);return n.concat(r)};function KY(e,t,n,r){const i=[{position:e,onBackground:!0,justify:0,overflow:r}];if(t){const t={fill:"#e6e6e6",padding:{left:2,right:2,top:2,bottom:2}};i.push({position:"inside",onBackground:!1,justify:"outside"===e?1:0,background:n?t:void 0})}return i}function GY({layout:e,component:t},n,r){if(!RU(e,n))return!1;const{layoutService:i,chart:o,dockService:a,viewModel:s,themeService:l,styleService:c}=n,{meta:u}=i,d=!PU(e,n),f=l.getStyles(),h=c.label.getStyle(),p=h.useContrastColor;function m(e){const t=o.formatter(SW.FORMATTER.MINOR);return t?t(e):e}const g={label:function(e){return 0===e.data.sumOfPositives.value&&0!==e.data.sumOfNegatives.value?"":m(e.data.sumOfPositives.value)},simplifiedPlacements:KY("outside",d,p,u.isContinuous),style:f.label.value},y={label:function(e){return 0===e.data.sumOfNegatives.value&&0!==e.data.sumOfPositives.value?"":m(e.data.sumOfNegatives.value)},simplifiedPlacements:KY("opposite",d,p,u.isContinuous),style:f.label.value},v=[_U(bg(n,g)),_U(bg(n,y))];return{key:"stack-total-labels",type:"labels",renderer:DN(n.flags),layout:{displayOrder:2,minimumLayoutMode:"XSMALL"},settings:{sources:[{component:t,selector:"rect",strategy:{type:"bar",settings:{direction:e=>LU(e.data.sumOfPositives.value,a.meta.minor.orientation,r),labels:v,fontSize:parseInt(h.fontSize,10),fontFamily:h.fontFamily,linkData:bN.labels.linkData}}}]},animations:{enabled:s.animations.enabled,trackBy:bN.labels.trackBy,compensateForLayoutChanges:bN.labels.compensateForLayoutChanges}}}function XY(e,t,n){const r=[{position:e,justify:0,overflow:n,background:{padding:{left:1,right:1,top:1,bottom:1}}}];return r.push({position:"inside",onBackground:!1,justify:1,background:{padding:{left:2,right:2,top:2,bottom:2}}}),r}function JY({layout:e,type:t},n){const{layoutService:r,viewCache:i,themeService:o,styleService:a}=n,{meta:s}=r,{isStacked:l}=s;if(!l&&!PU(e,n)||l&&!RU(e,n))return!1;const c=i.get("minorMinMax");if(!c.hasExplicitMinMax||t===kU&&0===c.max||t===CU&&0===c.min)return!1;if(!EU(t===kU?c.implicitMax:c.implicitMin,c,t))return!1;const u=o.getStyles(),d=a.label.getStyle();let f=e=>e.data.end.label;s.isStacked&&(f=t===kU?function(e){if(EU(e.data.sumOfNegatives.value,c,t)){const t=0===e.data.sumOfNegatives.value?e.data.sumOfPositives.value:e.data.sumOfNegatives.value,r=n.chart.formatter(SW.FORMATTER.MINOR);return r?r(t):t}return""}:function(e){if(EU(e.data.sumOfPositives.value,c,t)){const t=0===e.data.sumOfPositives.value?e.data.sumOfNegatives.value:e.data.sumOfPositives.value,r=n.chart.formatter(SW.FORMATTER.MINOR);return r?r(t):t}return""});const h={label:f,simplifiedPlacements:XY("outside",0,s.isContinuous),styles:u},p={label:f,simplifiedPlacements:XY("opposite",0,s.isContinuous),styles:u},m=[_U(bg(n,h)),_U(bg(n,p))],g="vertical"===n.dockService.meta.minor.orientation?"down":"right",y=[{component:`${SW.COMPONENT.GHOST_BAR_OOB}-${t}`,selector:"rect",strategy:{type:"bar",settings:{direction:g,labels:m,fontSize:parseInt(d.fontSize,10),fontFamily:d.fontFamily,linkData:bN.labels.linkData}}}];return{key:`bar-oob-labels-${t}`,type:"labels",renderer:DN(n.flags),layout:{minimumLayoutMode:"XSMALL"},settings:{sources:y},animations:{enabled:n.viewModel.animations.enabled,trackBy:bN.labels.trackBy,compensateForLayoutChanges:bN.labels.compensateForLayoutChanges}}}function ZY(e){return"all"===e||"title"===e}function QY(e,t,n){if(!ZY(e.dimensionAxis.show)||t.layoutService.meta.isDimensionless)return!1;const r=t.alternativeService.getAlternatives(),{actions:i}=t,o=t.styleService.axis.title.getStyle();return{type:"axis-title",key:"dimension-title",renderer:"react-qcm",layout:{minimumLayoutMode:rU[`${t.dockService.meta.major.orientation}DimensionAxisTitle`].minimumLayoutMode,dock:t.dockService.meta.major.dock},data:{infos:t.layoutService.getHyperCubeValue("qDimensionInfo"),alternatives:r.dimensions,filtered:t.layoutService.meta.filteredFields.dimensions},resources:{app:t.app,cache:t.viewCache,model:t.model,selections:t.selections,translator:t.translator},callbacks:{onChange:()=>{}},settings:{isDisabled:()=>!i?.interact?.enabled(),isRTL:n,isSnapshot:t.layoutService.meta.isSnapshot,noModelDependencies:t?.flags?.isEnabled("VIZ_252_DATA_TITLE_OUTSIDE_SENSE"),skipAttributeExpressions:!1,type:"dimension"},style:{title:{color:o.color,fontFamily:o.fontFamily,fontSize:o.fontSize}}}}function eK(e,t,n){if(!ZY(e.measureAxis.show))return!1;const r=t.alternativeService.getAlternatives(),{actions:i}=t,o=t.styleService.axis.title.getStyle();return{type:"axis-title",key:"measure-title",renderer:"react-qcm",layout:{minimumLayoutMode:"SMALL",dock:t.dockService.meta.minor.dock},data:{infos:t.layoutService.getHyperCubeValue("qMeasureInfo"),alternatives:r.measures,filtered:t.layoutService.meta.filteredFields.measures},resources:{app:t.app,cache:t.viewCache,model:t.model,selections:t.selections,translator:t.translator},callbacks:{onChange:()=>{}},settings:{isDisabled:()=>!i?.interact?.enabled(),isRTL:n,isSnapshot:t.layoutService.meta.isSnapshot,noModelDependencies:t?.flags?.isEnabled("VIZ_252_DATA_TITLE_OUTSIDE_SENSE"),skipAttributeExpressions:!1,type:"measure"},style:{title:{color:o.color,fontFamily:o.fontFamily,fontSize:o.fontSize}}}}function tK({environment:e,rtl:t,refLineModel:n,layoutService:r,colorService:i,dockService:o,themeService:a,viewModel:s,chart:l}){const{theme:c,localeInfo:u}=e,d={resolveUIColor:i.getMain().getPaletteColor},f=a.getStyles(),h=s.animations.enabled;return[kN({refLineModel:n,layoutService:r,colorModel:d,dockService:o,animationsEnabled:h,chart:l,scale:SW.SCALE.MAIN.MINOR,axis:"horizontal"===o.meta.major.orientation?"y":"x",key:SW.COMPONENT.MEASURE_REF_LINE,minimumLayoutMode:rU.refLines.minimumLayoutMode}),kN({isDimension:!0,refLineModel:n,layoutService:r,colorModel:d,dockService:o,animationsEnabled:h,chart:l,scale:SW.SCALE.MAIN.MAJOR,axis:"horizontal"===o.meta.major.orientation?"x":"y",rtl:t,key:SW.COMPONENT.DIMENSION_REF_LINE,mainComponentKey:SW.COMPONENT.BAR,minimumLayoutMode:rU.refLines.minimumLayoutMode}),...CN({refLineModel:n,layoutService:r,colorModel:d,animationsEnabled:h,dock:o.meta.minor.opposite,scale:SW.SCALE.MAIN.MINOR,style:f,formatter:SW.FORMATTER.MINOR,theme:c,localeInfo:u,rtl:t,key:SW.COMPONENT.MEASURE_REF_LINE_LABEL}),...CN({isDimension:!0,refLineModel:n,layoutService:r,colorModel:d,animationsEnabled:h,dock:o.meta.major.opposite,scale:SW.SCALE.MAIN.MAJOR,style:f,theme:c,localeInfo:u,rtl:t,key:SW.COMPONENT.DIMENSION_REF_LINE_LABEL})]}function nK({dockService:e,layoutService:t,discrete:n,continuousDataModel:r,viewModel:i,flags:o}){if(!o?.isEnabled("VIZ_199_ADD_SPACE_BETWEEN"))return!1;if(!!cA({layoutService:t}).none)return!1;const{rtl:a}=e.config,s="horizontal"===e.meta.chart.orientation,l=!s,{dock:c}=e.meta.major,{show:u}=t.getLayoutValue("dimensionAxis",{}),d="none"!==u;if(l&&d&&"bottom"===c)return!1;if(s&&d){if(!a&&"right"===c)return!1;if(a&&"left"===c)return!1}const f=a?"left":"right";return{type:"space",key:SW.COMPONENT.SPACE,layout:{dock:l?"bottom":f,minimumLayoutMode:"XSMALL"},show:()=>t.meta.isContinuous?r.getDimensionCardinality()>1:n.query.getCanScroll(),settings:{size:Math.max(6,Math.min(16,Math.floor(.025*e.meta.minor.size)))},animations:{enabled:i.animations.enabled,trackBy:()=>Math.random()}}}function rK({chart:e,chartModel:t,discreteModel:n,colorService:r,themeService:i,layoutService:o,dockService:a,context:s,resources:l,viewCache:c}){const u=[],d=o.getLayoutValue("plugins");if(!Array.isArray(d)||0===d.length)return u;!function(e){e.forEach(e=>{e&&!e.cId&&(e.cId=WD.generateId)})}(d);const f=[],h=function(e){const t=[];return e.forEach(e=>{e?.type!==t[t.length-1]?.[0]?.type||"point"!==e?.type&&("line"!==e?.type||e?.showPoints||t[t.length-1]?.[0]?.showPoints)?t.push([e]):t[t.length-1].push(e)}),t}(d);return h.forEach((c,d)=>{const h=`points-addon-${d}`,p=`lines-addon-${d}`;switch(c[0]?.type){case"point":u.push(_N({chart:e,chartModel:t,discreteModel:n,colorService:r,themeService:i,layoutService:o,dockService:a,flags:l.flags,rtl:s.rtl,majorScale:SW.SCALE.MAIN.MAJOR,minorScale:SW.SCALE.MAIN.MINOR,mainComponentKey:SW.COMPONENT.BAR,data:c,key:h})),f.push({key:h,lines:!1,labels:!0,fixed:!0,duplicates:!0});break;case"line":u.push(function({chart:e,chartModel:t,discreteModel:n,colorService:r,layoutService:i,dockService:o,rtl:a,majorScale:s,minorScale:l,mainComponentKey:c,data:u,key:d,scales:f={}}){if(!Array.isArray(u)||0===u.length)return!1;const h={resolveUIColor:r.getMain().getPaletteColor},p="horizontal"===o.meta.major.orientation,m=!(!p||!a),{canBeContinuous:g,isContinuous:y}=i.meta,v=i.getLayout(),b=GO.getDimensionValuesInfo({layout:v,canBeContinuous:g,discreteModel:n,layoutService:i}),x=[];u.forEach((e,t)=>{const n=(e?.points??[]).map((n,r)=>({...n,lineId:t,style:0===r?e.style:void 0}));x.push(...n)});const S={},w=[];u.forEach(e=>w.push(...(e?.points??[]).map(e=>e.dimensionValue))),w.forEach(e=>{b[e]&&(S[e]?(S[e].innerValues=b[e].innerValues,S[e].minOrder=Math.min(S[e].minOrder,b[e].minOrder),S[e].maxOrder=Math.max(S[e].maxOrder,b[e].maxOrder),S[e].isMinOrderOk=S[e].isMinOrderOk||b[e].isMinOrderOk,S[e].isMaxOrderOk=S[e].isMaxOrderOk||b[e].isMaxOrderOk):S[e]={id:b[e].id,dataNode:b[e].dataNode,qText:b[e].qText,innerValues:b[e].innerValues,minOrder:b[e].minOrder,maxOrder:b[e].maxOrder,isMinOrderOk:b[e].isMinOrderOk,isMaxOrderOk:b[e].isMaxOrderOk},S[e].numInnerValues=(S[e].maxOrder||0)-(S[e].minOrder||0)+1)});const M=x[0];x.forEach(t=>{const n=NN({point:t,dimensionValueInfo:S,layoutService:i}),r=t?.scale,o=M?.scale,a=i?.meta?.isButterfly,s=i?.meta?.isStacked,l=S[t.dimensionValue]?.dataNode;let c=n;const u=o&&r&&o!==r,d=a&&1===t.measureIndex,h=s&&Array.isArray(l);if(u)c=function(e,t,n){const r=t.min(),i=t.max(),o=n.min(),a=n.max();return i===r?o:o+(e-r)/(i-r)*(a-o)}(n,f[r]||e.scale(r),f[o]||e.scale(o));else if(d)c=-n;else if(h&&void 0!==t.measureIndex&&Array.isArray(l)){const e=l.slice(0,t.measureIndex+2),n=l[t.measureIndex+1]?.qNum;if("number"==typeof n&&0!==n){const t=Math.sign(n);c=e.reduce((e,n)=>{const r=n.qNum;return"number"==typeof r&&Math.sign(r)===t?e+r:e},0)}}t.validMeasureValue=c});const k={scale:s,fn:({datum:t})=>{const n=e.scale(s),r=t.value.dimensionValue;return y?n("string"==typeof r?""===r?void 0:+r:r):void 0!==S[r]?GO.getScaledPosition({scale:n,value:S[r].id,valueInfo:S[r],size:e.component(c)?.rect[p?"width":"height"],align:"center",invert:m,layoutService:i,isContinuous:y}):void 0}},C={scale:l,fn:({datum:e,scale:t})=>t(e.value.validMeasureValue)};return{key:d,type:"line",data:x,settings:{connect:!0,coordinates:{major:p?k:C,minor:p?C:k,layerId:({datum:e})=>e.value.lineId},layers:{curve:({datum:e})=>e.value.style?.lineCurve??"linear",line:{strokeWidth:({datum:e})=>e.value.style?.lineThickness??2,stroke:({datum:e})=>ON({colorModel:h,color:e.value.style?.lineColor?.color?e.value.style?.lineColor:{index:-1,color:"#000"}}),strokeDasharray:({datum:e})=>e.value.style?.lineType}}},animations:{enabled:t.query.animationsEnabled,trackBy:bN.nonUpdatingNode.trackBy,compensateForLayoutChanges:bN.lines.compensateForLayoutChanges}}}({chart:e,chartModel:t,discreteModel:n,colorService:r,layoutService:o,dockService:a,rtl:s.rtl,majorScale:SW.SCALE.MAIN.MAJOR,minorScale:SW.SCALE.MAIN.MINOR,mainComponentKey:SW.COMPONENT.BAR,data:c,key:p})),c.forEach((c,d)=>{if(c?.showPoints&&c?.points){const h=`points-${d}-for-${p}`;u.push(_N({chart:e,chartModel:t,discreteModel:n,colorService:r,themeService:i,layoutService:o,dockService:a,flags:l.flags,rtl:s.rtl,majorScale:SW.SCALE.MAIN.MAJOR,minorScale:SW.SCALE.MAIN.MINOR,mainComponentKey:SW.COMPONENT.BAR,data:c.points,key:h})),f.push({key:h,lines:!0,labels:!0,duplicates:!0})}else c?.points&&f.push({key:p,lines:!0,labels:!1,duplicates:!0,points:c.points})})}}),u.push(function({layoutService:e,dockService:t,chartModel:n,themeService:r,configs:i,flags:o,cache:a}){const s=e.getLayoutValue("plugins"),{rtl:l}=t.config,{orientation:c}=t.meta.major,{isOneDimensional:u,isStacked:d}=e.meta,f=r.getStyles();return{type:"point-label",key:"plugins-point-labels",renderer:DN(o),settings:{all:!0,cache:a,configs:i,label:e=>e.value?.label?.value?e.value?.label?.value:d?e.point?.label:e.end?.label,lineId:({data:e})=>{for(let t=0;t<s.length;t++){const n=s[t];switch(n.type){case"point":if(n.cId===e.value?.cId)return n.cId;break;case"line":if(n.points.some(t=>t.cId===e.value?.cId))return n.cId}}return e.value?.cId||e.line?.value},majorValue:e=>e.value?.dimensionValue?e.value.dimensionValue:u?e.value:e.major?.value,orientation:c,pointValue:e=>e.value?.validMeasureValue,rtl:l},style:f.plugins.label,animations:{enabled:n.query.animationsEnabled,trackBy:bN.nonUpdatingNode.trackBy,compensateForLayoutChanges:bN.labels.compensateForLayoutChanges}}}({layoutService:o,dockService:a,chartModel:t,themeService:i,configs:f,flags:l.flags,cache:c})),u}const iK=(e,t,n)=>{const{layoutService:r,dockService:i,colorService:o,chart:a,actions:s,discrete:l,continuousDataModel:c,reducedDataModel:u,viewModel:d,viewState:f,viewCache:h,themeService:p,refLineModel:m,pluginService:g,tooltipService:y,rtl:v,logicalSize:b,trendLineModel:x,disclaimerService:S}=t,{localeInfo:w}=n,M=function(e,t){const{disclaimerService:n,themeService:r,translator:i}=e,o=n.getDisclaimer();if(!o)return!1;const{fontFamily:a}=r.getStyles();return{key:"disclaimer",type:"disclaimer",renderer:"react-qcm",layout:{dock:o.alignment},settings:{isRTL:t,label:i.get(`Object.Disclaimer.${o.key}`)},style:{fontFamily:a}}}(t,v);if(S.getHasSuppressingDisclaimer())return{components:[M]};const k=EY(e,t,{localeInfo:w,rtl:v}),C=!s?.interact?.enabled(),q=o.getMain().getLegend({eventName:"legend-c",key:"legend-color",viewState:f,chart:a,styleReference:"object.barChart",styleOverrides:{title:t.styleService.legend.title.getStyle(),label:t.styleService.legend.label.getStyle()},rtl:v,settings:{item:{shape:{size:10}}}},{actions:s,navigationDisabled:C}),E=q.components[0];if(E){const{dock:e}=E.layout;if(k.fillRange&&(["right","left"].includes(e)||v)&&(k.fillRange.invert=!0),"legend-seq"===E.type&&void 0!==d.selectionDimensionIdx&&k.fillRange&&k.fillRange.min<k.fillRange.max){const e=nU({eventName:"legendRange",key:"legendRangeBrush",targets:[E.key],fillTargets:[E.key],targetSelector:'[id="legend-seq-target"]',targetFillSelector:'[id="legend-seq-ticks"]',dock:E.layout.dock,scale:"fillRange",bubblesPlacement:"outside",onEdited:()=>{s.select.emit("end","legendRange")}},t);q.components.push(...e.components),q.interactions.unshift(...e.interactions)}}else k.fillRange&&v&&(k.fillRange.invert=!0);const D=((e,{componentKey:t,collectionKey:n})=>{const{layoutService:r,colorService:i,dockService:o,discrete:a,viewModel:s,flags:l}=e,{meta:c}=r,u=i.getMain().getPaletteColor;let d,f;c.isGroupedByDimension?d=({scale:e,datum:t})=>e([t.group.value,t.value])+e.bandwidth([t.group.value,t.value])/2:c.isGroupedByMeasure&&(d=({scale:e,datum:t})=>e([t.value,t.measureIndex.value])+e.bandwidth()/2);let h=2;c.isContinuous?(f={start:"timeStart",end:"timeEnd"},h=bU(e,t)):c.isStacked&&(f="stack");const p=c.isStackedByDimension&&r.getHyperCubeValue("qStackedDataPages.0.qArea.qHeight",NaN)>1,m=e=>!0===e.datum.null?.value,g=r.getLayoutValue("components",null),y=g?g.filter(e=>e.key===t)[0]:null;return{key:t,type:"box",data:{collection:n},preferredSize:c.isContinuous?()=>({size:0,edgeBleed:{left:1,right:1}}):void 0,brush:{consume:[{context:"selection",data:["selectionDimension","axisSelectionDimension","end","fill","timeEnd"],style:{active:{strokeWidth:c.isContinuous||p?0:2,stroke:"#000"},inactive:{opacity:.3}}}]},settings:{major:{scale:SW.SCALE.MAIN.MAJOR,fn:d,ref:f},minor:{scale:SW.SCALE.MAIN.MINOR},orientation:o.meta.minor.orientation,box:{width:dU({layoutService:r,discrete:a,flags:l}),minWidthPx:h,fill:i.getMain().getColor(),opacity:e=>m(e)?0:void 0,minHeightPx:function(e){return c.isStacked?.1:m(e)?.01:.3},strokeWidth:y?.style?.strokeWidth?uU.BAR.STROKE.WIDTH[y.style.strokeWidth.toUpperCase()]:uU.BAR.STROKE.WIDTH.NONE,stroke:y?.style?.strokeColor?.color?u(y?.style?.strokeColor):uU.BAR.STROKE.COLOR},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},animations:{enabled:s.animations.enabled,isMainComponent:!0,trackBy:bN.bars.trackBy,compensateForLayoutChanges:bN.bars.compensateForLayoutChanges}}})(t,{componentKey:SW.COMPONENT.BAR,collectionKey:SW.COLLECTION.MAIN}),T=((e,{componentKey:t,collectionKey:n})=>{const{meta:r}=e.layoutService;if(!r.isStacked)return!1;let i=2;r.isContinuous&&(i=bU(e,t));const o={key:t,type:"box",data:{collection:n},settings:{major:{scale:SW.SCALE.MAIN.MAJOR},minor:{scale:SW.SCALE.MAIN.MINOR,start:{ref:"sumOfNegatives"},end:{ref:"sumOfPositives"}},orientation:e.dockService.meta.minor.orientation,box:{width:dU({layoutService:e.layoutService,discrete:e.discrete}),minWidthPx:i,opacity:0,fill:"none"},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},brush:{consume:[{context:"selection",data:[""],style:{active:{strokeWidth:2,stroke:"#000",opacity:e=>!0===e.data?.null?.value?0:1},inactive:{opacity:e=>!0===e.data?.null?.value?0:.3}}}]}};return r.isContinuous&&(o.settings.major.ref={start:"timeStart",end:"timeEnd"}),o})(t,{componentKey:SW.COMPONENT.STACK_TOTAL_BAR,collectionKey:SW.COLLECTION.STACK_TOTAL}),O=NY(t,n,d.selectionDimensionIdx),{isStacked:N}=r.meta;let A;A=u.mode.isContinuous?SW.COLLECTION.MINI_CONTINUOUS:N?SW.COLLECTION.MINI_STACK:SW.COLLECTION.MINI;const _=N?T:D,I=ZU(0,t),L=t.flags.isEnabled("VIZ_266_BARCHART_REFACTOR_TOOLTIP"),P=[...I,PY(t,{barComponent:_,type:"max",isStacked:N}),PY(t,{barComponent:_,type:"min",isStacked:N}),TU(t,{barComponent:_,type:"max",isStacked:N}),TU(t,{barComponent:_,type:"min",isStacked:N}),NU(t,{chart:a,type:"max",collectionKey:N?SW.COLLECTION.STACK_TOTAL:SW.COLLECTION.MAIN}),NU(t,{chart:a,type:"min",collectionKey:N?SW.COLLECTION.STACK_TOTAL:SW.COLLECTION.MAIN}),...cU(e,t,v,!!I[0]),D,T,_Y({layoutService:r,viewModel:d,dockService:i}),QY(e,t,v),eK(e,t,v),...tK({environment:n,rtl:v,refLineModel:m,layoutService:r,colorService:o,dockService:i,themeService:p,viewModel:d,chart:a}),hO({viewState:f,viewCache:h,layoutService:r,dockService:i,rtl:v}),nK({dockService:i,layoutService:r,discrete:l,continuousDataModel:c,viewModel:d,flags:t.flags}),uY(D,t,{collectionKey:A}),uA({layoutService:r,dockService:i,discrete:l,continuousDataModel:c,viewState:f,viewCache:h,themeService:p,rtl:v,deviceType:n.deviceType}),...iW({majorScale:SW.SCALE.MAIN.MAJOR,minorScale:SW.SCALE.MAIN.MINOR,tooltipOverlay:SW.COMPONENT.TREND_LINES_TOOLTIP_OVERLAY},{layoutService:r,trendLineModel:x,dockService:i,animationsEnabled:d.animations.enabled}),...q.components,FU({layout:e,component:SW.COMPONENT.BAR,minorScale:k.minor},t,v),GY({layout:e,component:SW.COMPONENT.STACK_TOTAL_BAR},t,v),JY({layout:e,type:"max"},t),JY({layout:e,type:"min"},t),...O.components,!L&&BU(0,{...t,coloring:o.getMain().getSettings()},v),!L&&VU(0,{...t,coloring:o.getMain().getSettings()},v),...L?y.getComponents():[!1],!1!==e.showDisclaimer&&M,lW({tooltip:SW.COMPONENT.TREND_LINES_TOOLTIP,formatter:SW.FORMATTER.MINOR},t,{rtl:v}),...t.flags.isEnabled("TLV_1274_PLUGINS_BAR_CHART")?rK({chart:a,chartModel:{query:{animationsEnabled:d.animations.enabled}},discreteModel:l,colorService:o,themeService:p,layoutService:r,dockService:i,context:{},resources:t,viewCache:h}):[]].filter(Boolean);!function(e){if(e&&0!==e.length)for(let t=0;t<e.length;t++)e[t].layout=e[t].layout||{},e[t].layout.displayOrder=t}(P);const R=[...q.interactions,...O.gestures].sort((e,t)=>(t.prio||0)-(e.prio||0));return{interactions:L?lY(t,{rtl:v,hammer:{gestures:R}}):oY(t,{rtl:v,hammer:{gestures:R}}),scales:k,palettes:o.getMain().getPalettes(),components:g.extendComponents(P),strategy:FD(0,{logicalSize:b,minCenterRatio:0}),formatters:$U(t,k),collections:YY(0,t)}};function oK({picasso:t,chart:n,services:r,environment:i,viewState:o,viewCache:a,bootstrapped:s}){const{width:l,height:c}=e.useRect(),u=e.useModel(),d=e.useSelections(),f=e.useOptions(),[h,p]=e.useState(),[m,g]=e.useState(),[y,v]=e.useState(),[b,x]=e.useState(),S=e.useApp();function w(){if(!n.layoutComponents)return Promise.resolve();const{discrete:e,layoutService:s,viewModel:l}=r;a.set("isPreRender",!0);const c=function(e={}){const{alternativeService:s,selectionService:l,refLineModel:c,discrete:p,reducedDataModel:m,continuousDataModel:g,trendLineModel:y,pluginService:v,colorService:b,viewModel:x,dockService:w,themeService:M,customTooltipModel:k,layoutService:C,logicalSize:q,styleService:E,disclaimerService:D,tooltipService:T}=r,O=l.custom.getActions(),N=t.data("q")(h.prepPicassoDataSet()),A={picasso:t,ds:N,rtl:"rtl"===f?.direction,model:u,app:S,chart:n,actions:O,localeInfo:i.localeInfo,logicalSize:q,flags:i.flags,translator:i.translator,selections:d,isLocked:l.getIsSelectionLocked,viewCache:a,viewState:o,alternativeService:s,layoutService:C,dockService:w,viewModel:x,colorService:b,selectionService:l,themeService:M,trendLineModel:y,discrete:p,continuousDataModel:g,reducedDataModel:m.model(),customTooltipModel:k,debouncer:Ox,refLineModel:c,pluginService:v,styleService:E,disclaimerService:D,tooltipService:T,...e};return iK(C.getLayout(),A,i)}(m);h.extractDataPages(),n.layoutComponents({settings:c,data:y}),a.set("isPreRender",!1),h.insertDataPages(),l.animations.hasSlicedHats=c.components.filter(e=>"box-sliced-hat"===e.type).length>0;const p=[];return 1!==c.components.length&&s.meta.isDiscrete&&p.push(e.command.initialize()),Promise.all(p)}const[[M,k]=[]]=e.usePromise(()=>{if(!(t&&n&&r&&i&&o&&a&&s))return Promise.resolve();const{alternativeService:e,layoutService:l,selectionService:c,refLineModel:u,discrete:d,continuous:f,reducedDataModel:h,continuousDataModel:p,trendLineModel:m,legendLayoutService:g,colorService:y,pluginService:v,viewModel:b,customTooltipModel:S,disclaimerService:w,customTooltipService:M,tooltipService:k}=r;if(!c?.custom?.getActions())return Promise.resolve();const{properties:C}=s,q=C?.qHyperCubeDef.qDimensions.some(e=>e.qCalcCondition?.qCond?.qv);q&&(S.useCustomTooltip=!1);const E=()=>{x(Date.now()),b.animations.isPartialUpdating=!0};o.onChanged("scrollOffset",()=>{g&&g.setDataPages([d.query.getCurrentDataPage()]),u&&u.update(),E()}),o.onChanged("legendScrollOffset",E),o.intercept("zoom",f.event.onZoomIntercept({viewCache:a})),o.onChanged("zoom",f.event.onZoomChange({layoutService:l,continuousDataModel:p},E)),c.setLayout(l.getLayout());const D=[];l.meta.isContinuous&&(p.update(l.getLayout()),D.push(p.initialFetch())),m.command.update(),D.push(h.fetch().then(({reducedCube:e})=>{h.update(e)})),M.setProperties(C),k.expando.set("properties",C),w.initialize(),D.push(Promise.resolve({properties:s.properties}));return Promise.all(D).then(t=>Promise.all([v.initialize(),y.initialize(),e.initialize({properties:C}),XW({reducedDataModel:h,layoutService:l,continuousDataModel:p,trendLineModel:m})]).then(e=>[t,e.pop()]))},[s]);e.useEffect(()=>{if(!r?.colorService?.getMain()||!k)return;const{layoutService:e,selectionService:t,reducedDataModel:n,continuousDataModel:o,trendLineModel:s,legendLayoutService:l,colorService:c,viewModel:u}=r;a.set("minorMinMax",k);const d=e.getHyperCube(),f=e.meta.isContinuous?o.getInitialCube():n.model().cube,{field:h}=c.getMain().getSettings(),m=!e.meta.isContinuous&&(n.model().mode.isReduced||e.meta.isStacked)&&l,y=m?l.getHyperCube():void 0;t.setBrushAliases({colorField:h,useLegendCube:m,legendAlias:`legendCube/${h}`});const v=function({mainCube:e,miniCube:t,legendCube:n,localeInfo:r,layoutService:i,viewModel:o,trendLineModel:a}){const s=i.refs.dataPages.split(".").pop();let l=[],c=[];const u=i.meta.isContinuous?[{key:o.fields.majorNumeric,from:i.meta.isStackedByDimension?o.fields.majorStack:o.fields.major,override:{value:e=>e.qNum}}]:void 0;return{prepPicassoDataSet:()=>({key:"qHyperCube",data:e,config:{localeInfo:r,virtualFields:u}}),prepPicassoData(i){const o=[{type:"q",key:"qHyperCube",data:e,config:{localeInfo:r,virtualFields:u}},{type:"q",key:"miniCube",data:t,config:{localeInfo:r,virtualFields:u}},...i];return n&&o.push({type:"q",key:"legendCube",data:n,config:{localeInfo:r,virtualFields:u}}),a.query.hasTrendLines()&&o.push({key:"trend",data:a.query.getData()}),o},extractDataPages(){l=e[s],c=t.qDataPages,e[s]=[],t.qDataPages=[]},insertDataPages(){e[s]=l,t.qDataPages=c}}}({mainCube:d,miniCube:f,legendCube:y,localeInfo:i.localeInfo,layoutService:e,viewModel:u,trendLineModel:s}),b=M[M.length-1];g({localeInfo:i.localeInfo,...b}),p(v)},[k]),e.useEffect(()=>{if(!r||!m||!h)return;const e=r.colorService.getMain();if(!e)return;h.prepPicassoDataSet();const t=h.prepPicassoData(e.getData());v(t)},[m]),e.useEffect(()=>{r?.colorService?.getMain()&&n.update&&h&&y&&w().then(()=>{const{layoutService:e,discrete:t,legendLayoutService:i}=r;if(i){1===e.getLayoutValue("scrollStartPos")&&i.setDataPages([t.query.getCurrentDataPage()])}n.update(),bN.cacheProperties({viewCache:a,layout:e.getLayout()})})},[y]),e.useEffect(()=>{if(!(l&&c&&h&&n?.update&&r?.colorService.getMain()))return;const{viewModel:e}=r;e.animations.isSizeChanging=!0;const{dockService:t,themeService:o}=r;t.update({width:l,height:c}),o.setTheme(i.theme),w().then(()=>{n.update&&n.update()})},[l,c]),e.useEffect(()=>{if(!n?.update)return;const{viewModel:e}=r;n.update({partialData:!0,excludeFromUpdate:["mini-marker","dim-title","measure-title","ref-line","grid-line"]}),e.animations.isPartialUpdating=!1},[b])}const aK=e=>"[object Object]"===Object.prototype.toString.call(e),sK=e=>Array.isArray(e);function lK(e,t){if(e===t)return!0;if(sK(e)){if(!sK(t))return!1;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!lK(e[n],t[n]))return!1;return!0}if(aK(e)){if(!aK(t))return!1;const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r=0;r<n.length;r++){if(!Object.hasOwn(t,n[r]))return!1;if(!lK(e[n[r]],t[n[r]]))return!1}return!0}return e===t}function cK({enable:t=!0}={}){const n=e.useModel(),r=()=>Date.now().toString()+Math.random(),[i,o]=e.useState(r()),a={properties:void 0};return e.useEffect(()=>{if(!n||!n.getEffectiveProperties||!t)return()=>{};const e=()=>{n.getEffectiveProperties().then(e=>{const t=bg(!0,{},e);if(!a.properties)return void(a.properties=t);const n=function(e,t){const n={properties:!1,exclude:!1};if(e===t)return n;const r=bg(!0,{},e),i=bg(!0,{},t);return n.exclude=!lK(r.qHyperCubeDef?.qLayoutExclude,i.qHyperCubeDef?.qLayoutExclude),delete r.qHyperCubeDef?.qLayoutExclude,delete i.qHyperCubeDef?.qLayoutExclude,n.properties=!lK(r,i),n}(a.properties,t);a.properties=t,n.exclude&&!n.properties&&o(r())})};return n.on("changed",e),e(),()=>{n.removeListener("changed",e)}},[t]),i}function uK({env:t,services:n}){const r=e.useApp(),i=e.useModel(),o=e.useRenderState(),a=cK({enable:!1===n?.layoutService?.meta?.isSnapshot}),[s,l]=e.usePromise(async()=>{if(!t||!n)return Promise.resolve();const{layoutService:e}=n,{isSnapshot:a,isStacked:s,isContinuous:l}=e.meta,c=[];return a||c.push(i.getEffectiveProperties()),Promise.all(c).then(async t=>{const n=t[0]||void 0;if(n?.qHyperCubeDef){const t=e.getLayout(),a=bg(!0,{},n),c=(({properties:e,layout:t,isStacked:n,isContinuous:r,model:i,layoutService:o})=>{const a=t.qHyperCube.qDimensionInfo.filter(e=>7005!==e.qError?.qErrorCode),s=t.qHyperCube.qMeasureInfo.filter(e=>7005!==e.qError?.qErrorCode),l=bg(!0,{},e);return((e,t,n)=>{const{color:{mode:r}}=n;e.length>1&&n.color?n.color.persistent=!0:"byDimension"===r&&t.length>1?n.color.mode="byMultiple":"byExpression"===r&&0===t.length?n.color.mode="primary":0===e.length&&t.length>0&&(n.color.byMeasureDef=void 0,n.color.byDimDef=void 0,1===t.length&&"byExpression"!==r&&(n.color.mode="primary"))})(a,s,e),a.length>1&&n&&!r&&"S"===e.qHyperCubeDef.qMode&&(e.qHyperCubeDef.qMode="K"),a.length<2&&"K"===e.qHyperCubeDef.qMode&&(e.qHyperCubeDef.qMode="S"),i.colorSupport?.colorByUpdater?.(e,"qHyperCubeDef.",t),function({properties:e,layoutService:t}){const{filteredFields:n}=t.meta;if(!(n.measures.length>0))return;const{mode:r}=e.color||{};if("byExpression"===r){const r=t.getLayout();if("colorByExpression"===r.qHyperCube.qMeasureInfo?.[0]?.qAttrExprInfo?.[0]?.id)return;const{current:i,target:o}=function({properties:e,filtered:t}){const{qMeasures:n}=e.qHyperCubeDef||[],{current:r,target:i}=n.reduce((e,n,r)=>("colorByExpression"===n.qAttributeExpressions[0]?.id&&(e.current=r),void 0!==e.target||t.includes(r)||(e.target=r),e),{current:void 0,target:void 0});return{current:r,target:i}}({properties:e,filtered:n.measures});if(void 0===i)return;const a=e.qHyperCubeDef.qMeasures[i].qAttributeExpressions[0];e.qHyperCubeDef.qMeasures[i].qAttributeExpressions.splice(0,1),e.qHyperCubeDef.qMeasures[o].qAttributeExpressions.splice(0,0,a)}}({properties:e,layoutService:o}),!bO.compare(l,e,!0)&&JSON.stringify(l)!==JSON.stringify(e)&&(e.hash=Math.random(),!0)})({properties:n,layout:t,isStacked:s,isContinuous:l,model:i,layoutService:e});if(c)return o.pending(),(e=>!(!e||e.qHasSoftPatches||e.qExtendsId||!((e.qMeta?.privileges||[]).indexOf("update")>-1)))(t)?i.setProperties(n).then(()=>{r.clearUndoBuffer()}):void await((e,t,n)=>{if(!e)return Promise.resolve();let r=bO.generate(t,n);return bg(!0,t,n),r&&r.length?(r=r.map(e=>({qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path})),e.applyPatches(r,!0)):Promise.resolve()})(i,a,n);o.restore()}return{properties:n}})},[t,n,a]);if(l&&!l.isHandled)throw l;return s}var dK,fK={exports:{}};var hK=(dK||(dK=1,function(e){self,e.exports=(()=>{var e={909: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,c,u,d=arguments[0],f=1,h=arguments.length,p=!1;for("boolean"==typeof d&&(p=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<h;++f)if(null!=(t=arguments[f]))for(n in t)r=l(d,n),d!==(i=l(t,n))&&(p&&i&&(a(i)||(c=o(i)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&a(r)?r:{},s(d,{name:n,newValue:e(p,u,i)})):void 0!==i&&s(d,{name:n,newValue:i}));return d}},8:(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,c,u,d=arguments[0],f=1,h=arguments.length,p=!1;for("boolean"==typeof d&&(p=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<h;++f)if(null!=(t=arguments[f]))for(n in t)r=l(d,n),d!==(i=l(t,n))&&(p&&i&&(a(i)||(c=o(i)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&a(r)?r:{},s(d,{name:n,newValue:e(p,u,i)})):void 0!==i&&s(d,{name:n,newValue:i}));return d}}},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:()=>Ne});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 c(e){return s+e+l}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var n=function(e,t){if(!t)return null;var n,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 d(e){return!(!e.fullAccumulation&&!e.fullRange)}function f(e,t){var n=e.crossAllDimensions;return 2===t&&n?"RowNo(Total)":"RowNo()"}function h(e){var t=function(e){return e?(e=function(e){return e.replace(/\/\*[^]*?\*\//g,"")}(e=function(e){return e.replace(/\/\/(.*)$/gm,"")}(e))).trim():""}(e),n=t.trim();return"="===n.substring(0,1)?n.substring(1).trim():n}function p(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function 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 v(e,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=").concat(y("MinString(".concat(t,")")),")' and Only({1}").concat(t,")<='$(=").concat(y("MaxString(".concat(t,")")),")'\"}")}function b(e){var t=e.modifier,n=void 0===t?{}:t,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 c=v(u(r[0],i),p(0));return"".concat(a,"({1<").concat(c,">}").concat(l,")")}if(r&&2===r.length){var d=u(r[0],i),f=u(r[1],i),h=p(0),m=p(1),g=v(d,h),y=v(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 S(e){var t=e.properties,n=e.layout;return o(t,"qHyperCubeDef.qDimensions",o(n,"qHyperCube.qDimensionInfo",[])).length}const w={isFullRange:d,getNumDimensions:S,getExpressionWithExcludedComp:function(e){var t=e.expression,n=e.modifier,r=e.dimensions,i=e.dimensionAndFieldList,o=e.treatMissingAsNull,a=c(h(t));if(!n.showExcludedValues)return a;var s=b({modifier:n,dimensions:r,dimensionAndFieldList:i}),l=o?"":", 0";if(r&&1===r.length){var u=p(0);return"If(Count(".concat(u,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(r&&2===r.length){var d=p(0),f=p(1);return"If(Count(".concat(d,") * Count(").concat(f,") > 0, ").concat(a," + ").concat(s).concat(l,")")}return a},getRowNoComp:f,getNumStepComp:function(e,t){if(!d(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:b,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===S({properties:n,layout:r})},getDimComp:function(e,t){var n=function(e){return e[arguments.length>1&&void 0!==arguments[1]?arguments[1]:0].qDef.qSortCriterias[0]}(e,t),r=p(t);if(!n.qSortByExpression&&!n.qSortByNumeric&&!n.qSortByAscii)return r;var i=["Descending","Ascending"],o=n.qSortByNumeric?"(Numeric, ".concat(i[(n.qSortByNumeric+1)/2],")"):"",a=n.qSortByAscii?"(Text, ".concat(i[(n.qSortByAscii+1)/2],")"):"";return n.qSortByNumeric&&n.qSortByAscii?"(".concat(r,", ").concat(o,", ").concat(a,")"):n.qSortByNumeric?"(".concat(r,", ").concat(o,")"):n.qSortByAscii?"(".concat(r,", ").concat(a,")"):r},simplifyExpression:h,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var n=t.indexOf(s);if(-1!==n){var r=t.indexOf(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:u,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=S({properties:t,layout:n});return s>=i&&s<=a},getExpressionWithMarkers:c,canExtract:function(e){var t=e.indexOf(s),n=e.indexOf(l);return t>-1&&n>-1&&t<n},getDimDefWithWrapper:p,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")},generateTSDExpression:function(e,t,n){var 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 M(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 k(e){return k="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},k(e)}var C=t().bind(null,!0),q={},E=Array.isArray;function D(e){return null!=e&&!Array.isArray(e)&&"object"===k(e)}function T(e){return void 0===e}function O(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function N(e,t){var n,r=t.substring(1).split("/").slice(0,-1);return r.forEach(function(t,i){if(i!==r.length){n=+t;var o=Number.isNaN(n)?{}:[];e[n||t]=T(e[n||t])?o:e[t],e=e[n||t]}}),e}function A(e,t){var n=!0;if(D(e)&&D(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach(function(r){A(e[r],t[r])||(n=!1)}),n);if(E(e)&&E(t)){if(e.length!==t.length)return!1;for(var r=0,i=e.length;r<i;r+=1)if(!A(e[r],t[r]))return!1;return!0}return e===t}q.generate=function(e,t,n){n=n||"";var r=[];return Object.keys(t).forEach(function(i){var o=function(e){return e?C({},{val:e}).val:e}(t[i]),a=e[i],s="".concat(n,"/").concat(i);A(o,a)||O(t,i)||(T(a)?r.push({op:"add",path:s,value:o}):D(o)&&D(a)?r=r.concat(q.generate(a,o,s)):E(o)&&E(a)?r=r.concat(function(e,t,n){var r=[],i=e.slice(),o=-1;function a(e,t,n){if(e[n]&&T(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(A(t,i))return r;if(!T(t[0])&&T(t[0].qInfo))return r.push({op:"replace",path:n,value:t}),r;for(var s=i.length-1;s>=0;s-=1)-1===(o=a(t,i[s].qInfo&&i[s].qInfo.qId,s))?(r.push({op:"remove",path:"".concat(n,"/").concat(s)}),i.splice(s,1)):r=r.concat(q.generate(i[s],t[o],"".concat(n,"/").concat(s)));for(var l=0,c=t.length;l<c;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){T(t[i])&&!O(e,i)&&r.push({op:"remove",path:"".concat(n,"/").concat(i)})}),r},q.apply=function(e,t){t.forEach(function(t){var n,r,i=N(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(E(i))"-"===o&&(o=i.length),i.splice(+o,"add"===t.op?0:1,t.value);else if(E(a)&&E(t.value)){var l,c=t.value.slice();a.length=0,(l=a).push.apply(l,function(e){if(Array.isArray(e))return M(e)}(r=c)||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 M(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?M(e,t):void 0}}(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(D(a)&&D(t.value))n=a,Object.keys(n).forEach(function(e){Object.getOwnPropertyDescriptor(n,e).configurable&&!O(n,e)&&delete n[e]}),C(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 u=N(e,t.from);E(i)?i.splice(+o,0,u.splice(+s,1)[0]):(i[o]=u[s],delete u[s])}else"remove"===t.op&&(E(i)?i.splice(+o,1):delete i[o])})},q.clone=function(e){return C({},e)},q.createPatch=function(e,t,n){var r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},q.updateObject=function(e,t){Object.keys(e).length?q.apply(e,q.generate(e,t)):C(e,t)};const _=q,I=function(e,n,r){if(!e)return Promise.resolve();var i=_.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 L="accumulation";function P(e,t){var n=o(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===L)return n[r]}function R(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===L)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var z={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""};const F={translationKey:"properties.modifier.accumulation",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.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=w.getNumDimensions({properties:r,layout:i}));var c=o(r,"qHyperCubeDef.qDimensions",[]),u=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:s}),d=w.getNumStepComp(n,l),f=w.getAboveComp(n,l,u,d),h=w.getRangeComp("RangeSum",f);if(w.needDimension({modifier:n,properties:r,layout:i})){var p=w.getDimComp(c,1),m=w.getDimComp(c,0),g=w.getAggrComp(h,p,m);h=n.showExcludedValues?w.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:s,valueComp:g}):g}return h},extractInputExpression:w.extractInputExpression,initModifier:function(e){w.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.accumulation.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(R(t,e),".accumulationDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.accumulation.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(R(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.accumulation.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(R(t,e),".fullAccumulation")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(R(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=P(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=P(t,e);return n&&!n.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(R(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return w.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=P(t,e);return o&&!o.disabled}};return n}};var j="movingAverage";function B(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 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===j)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var V={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1};const $={translationKey:"properties.modifier.movingAverage",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.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 c=s;void 0===c&&(c=w.getNumDimensions({properties:i,layout:a}));var u=o(i,"qHyperCubeDef.qDimensions",[]),d=r.showExcludedValues&&r.nullSuppression,f=w.getExpressionWithExcludedComp({expression:n,modifier:r,dimensions:u,dimensionAndFieldList:l,treatMissingAsNull:d}),h=w.getNumStepComp(r,c),p=w.getAboveComp(r,c,f,h);if(r.nullSuppression)t=w.getRangeComp("RangeAvg",p);else{var m=w.getRangeComp("RangeSum",p),g=function(e,t){var n=w.getRowNoComp(e,t);if(!w.isFullRange(e)){var r=e.steps,i="number"!=typeof r||Number.isNaN(r)?6:r;return"RangeMin(".concat(i,", ").concat(n,")")}return n}(r,c);t="".concat(m," / ").concat(g)}var y=t;if(w.needDimension({modifier:r,properties:i,layout:a})){var v=w.getDimComp(u,1),b=w.getDimComp(u,0),x=w.getAggrComp(y,v,b);y=r.showExcludedValues?w.getExcludedComp({modifier:r,dimensions:u,dimensionAndFieldList:l,funcComp:"Only",valueComp:x}):x}return y},extractInputExpression:w.extractInputExpression,initModifier:function(e){w.initModifier(e,V)},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!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(H(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.movingAverage.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(H(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.movingAverage.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(H(t,e),".fullRange")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(H(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=B(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=B(t,e);return n&&!n.fullRange}},showExcludedValues:{refFn:function(t){return"".concat(H(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat(H(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return w.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=B(t,e);return o&&!o.disabled}};return n}};var W="timeSeriesDecomposition";function U(e,t){var n=o(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===W)return n[r]}function Y(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===W)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var K={type:"timeSeriesDecomposition",disabled:!1,decomposition:"",steps:2,outputExpression:""};const G={translationKey:"properties.modifier.timeSeriesDecomposition",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties;return n?w.generateTSDExpression(n,t,r):t},extractInputExpression:w.extractInputExpression,initModifier:function(e,t){w.initModifier(e,K),""===e.decomposition&&t&&(e.decomposition=w.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!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{decomposition:{refFn:function(t){return"".concat(Y(t,e),".decomposition")},type:"string",translation:t.modifierTrendDecompositionDecomposition||"properties.modifier.trendDecomposition.decomposition",component:"dropdown",schemaIgnore:!0,defaultValue:t.trendDecompositionParametersDecompositionObserved||"cao.trendDecomposition.parameters.decomposition.observed",options:a.OPTIONS},steps:{refFn:function(t){return"".concat(Y(t,e),".steps")},type:"integer",translation:t.modifierTimeSeriesDecompositionPeriods||"properties.modifier.timeSeriesDecomposition.periods",schemaIgnore:!0,defaultValue:2,change:function(t,n){var r=U(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=U(t,e);return n&&!n.fullRange}}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(W))return!1;var o=U(t,e);return o&&!o.disabled}};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 Z(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 Q={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""};const ee={translationKey:"properties.modifier.difference",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:w.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=w.getNumDimensions({properties:r,layout:i}));var c=o(r,"qHyperCubeDef.qDimensions",[]),u=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:s}),d=w.getAboveComp(n,l,u),f="".concat(u," - ").concat(d);if(w.needDimension({modifier:n,properties:r,layout:i})){var h=w.getDimComp(c,1),p=w.getDimComp(c,0),m=w.getAggrComp(f,h,p);f=n.showExcludedValues?w.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:s,funcComp:"Only",valueComp:m}):m}return f},initModifier:function(e){Object.keys(Q).forEach(function(t){void 0===e[t]&&(e[t]=Q[t])})},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(Z(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.difference.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(Z(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.difference.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},showExcludedValues:{refFn:function(t){return"".concat(Z(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return w.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(w.getFieldWithWrapper(t),"={'").concat(n,"'}>}"):""}function le(e,t){return 0===e&&t>1||2===e?"Total":""}function ce(e,t,n){return 0===e&&t>1?"<".concat(w.getDimDefWithWrapper(n),">"):""}const ue={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:w.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=w.getNumDimensions({properties:r,layout:i}));var c=o(r,"qHyperCubeDef.qDimensions",[]),u=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:s}),d=n.selectionScope,f=n.dimensionalScope;return function(e,t,n,r,i,o,a){var s=ae(t),l=se(t,n,r),c=""===s&&""===l?"":s||l,u=le(i,o),d=ce(i,o,a),f=function(e){for(var t=[],n=0;n<e;n++)t[n]=w.getDimDefWithWrapper(n);return t.join(", ")}(o);return"".concat(e,"/ Sum(").concat(c," ").concat(u).concat(d," Aggr(").concat(c," ").concat(e,", ").concat(f,"))")}(u,d,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!w.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){if(1===e){var n=ie(t,0);t.splice(n,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){if(e<2){var n=ie(t,0);t.splice(n,1)}return t}(i,o),o=function(e,t){if(0===e){var n=ie(t,1);t.splice(n,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 w.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:ce};var de="qDef.base",fe="qDef.qDef",he="qDef.base.qDef",pe="qLibraryId",me="qDef.base.qLibraryId";const ge={getExpression:function(e){var t=o(e,he);return void 0!==t?t:o(e,fe)},getExpressionRef:function(e){return void 0!==o(e,he)?he:fe},getLibraryIdRef:function(e){return o(e,me)?me:pe},getLibraryId:function(e){return o(e,me)||o(e,pe)},getLabelRef:function(e){return o(e,de)?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return o(e,de)?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}};var ye="qDef.qDef",ve="qDef.base.qDef",be="qLibraryId",xe="qDef.base.qLibraryId",Se="qDef.qLabel",we="qDef.qLabelExpression",Me="qDef.base.qLabel",ke="qDef.base.qLabelExpression",Ce="qDef.qAggrFunc",qe="qDef.base.qAggrFunc",Ee={initBase:function(e,t){(t||Ee.isValid(e))&&(n(e,ve,o(e,ye)),n(e,xe,o(e,be)),n(e,Me,o(e,Se)),n(e,ke,o(e,we)))},restoreBase:function(e){Ee.isValid(e)&&(n(e,ye,o(e,ve)),n(e,be,o(e,xe)),n(e,Se,o(e,Me)),n(e,we,o(e,ke)),o(e,Ce)&&o(e,qe)&&n(e,Ce,o(e,qe)),delete e.qDef.base)},isValid:function(e){var t=o(e,ve),n=o(e,xe);return void 0!==t||void 0!==n}};const De=Ee;function Te(e){return Te="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},Te(e)}var Oe={accumulation:F,movingAverage:$,difference:ee,normalization:ue,timeSeriesDecomposition:G};const Ne={modifiers:Oe,apply:_e,applyModifiers:Ie,cleanUpMeasure:Le,destroy:function(e){e&&Ae[e.id]&&Ae[e.id].masterItemSubscriber&&(Ae[e.id].masterItemSubscriber&&Ae[e.id].masterItemSubscriber.unsubscribe(),delete Ae[e.id])},hasActiveModifiers:Pe,getActiveModifier:Re,initBase:De.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some(function(e){return Oe[e]})},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some(function(e){return Oe[e]&&Oe[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);Ye({modifiers:t,properties:n,layout:r})&&(i=!0,o=o||Ze({modifiers:t,properties:n,layout:r}))}),i&&!o},ifEnableTotalsFunction:ze};var Ae={};function _e(){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;Ae[n.id]=Ae[n.id]||{isFirstTime:!0};var c=Ae[n.id].isFirstTime;if(Ae[n.id].isFirstTime=!1,r&&"object"===Te(r))return Ie({model:n,properties:r});var u=n?n.layout:void 0,d=o(u,"qSelectionInfo.qInSelections");if(a||d)return Promise.resolve(l);var f=o(u,"qHyperCube.qMeasureInfo"),h=Ae[n.id].lastReloadTime;if(Ae[n.id].lastReloadTime=o(n,"app.layout.qLastReloadTime"),Pe({measures:f,layout:u})){var p=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 Ue({measure:e,properties:n,layout:r})})}({measures:t,layout:n})}({measures:f,layout:u,model:n,lastReloadTime:h});return p||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 Ye({modifiers:je(t),layout:n})?!t.base:!!t.base}({measure:e,layout:n})}))}({measures:f,layout:u,masterItem:s,isFirstTime:c})?n.getEffectiveProperties().then(function(e){var r=t()(!0,{},e);He(r);var i=Qe(r);return Ke({model:n}).then(function(t){return Ge({libraryIds:i,model:n}).then(function(i){return p&&function(e){var t=e.properties;Fe(t).forEach(function(e){return function(e){var t=e.measure;if(Ue({measure:t,properties:e.properties})){var n=0,r=t.qDef.modifiers;Array.isArray(r)&&r.forEach(function(e){if("object"===Te(e)&&!e.disabled){if(n++,"object"!==Te(Oe[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=Oe[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==r&&$e(t)&&w.simplifyExpression(t.qDef.base.qDef)!==w.simplifyExpression(r)&&(t.qDef.base.qDef=r)}})}}({measure:e,properties:t})})}({properties:r}),Ie({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"===Te(e.base)})}(f)?n.getEffectiveProperties().then(function(e){return function(e){var n=e.model,r=e.properties,i=Qe(r);return et({model:n,libraryIds:i}).then(function(){var e=t()(!0,{},r);return Fe(r).forEach(function(e){return Le(e)}),Je({oldProperties:e,newProperties:r,model:n})})}({model:n,properties:e})}):Promise.resolve(l)}function Ie(e){var n=e.model,r=e.oldProperties,i=e.properties,a=e.measures,s=e.runUpdateIfChange,l=void 0!==s&&s,c=e.masterItem,u=e.libraryItemsProps,d=e.dimensionAndFieldList;void 0===r&&(r=l?t()(!0,{},i):i),He(i);var f=Qe(i);return et({model:n,libraryIds:f,masterItem:c}).then(function(){return function(e){var n=e.measures,r=e.properties,i=e.model,a=e.libraryItemsProps,s=e.dimensionAndFieldList;if(n||(n=Fe(r)),!n.length)return Promise.resolve();if(!Pe({measures:n,properties:r}))return n.forEach(function(e){return Le(e)}),Promise.resolve();var l=a?void 0:Qe(r);return Ke({model:i,dimensionAndFieldList:s}).then(function(e){return Ge({libraryIds:l,model:i,libraryItemsProps:a}).then(function(i){n.forEach(function(n){Ye({modifiers:n.qDef.modifiers,properties:r})?(function(e){var n=e.measure,r=e.properties,i=e.libraryItemsProps,a=e.dimensionAndFieldList,s=0;De.isValid(n)||De.initBase(n,!0);var l=n.qDef,c=l.modifiers,u=l.base;Array.isArray(c)&&c.forEach(function(e){if("object"===Te(e)&&!e.disabled){if(s++,"object"!==Te(Oe[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)");Oe[e.type].initModifier(e,n);var l=n.qLibraryId||u&&u.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:Oe[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 Oe[r.type].updateModifier&&Oe[r.type].updateModifier(r,i.qHyperCubeDef);var a=ge.getExpression(n),s=""===a?a:Oe[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||ze(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&ze(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}),Ve(n)):Le(n)})})})}({measures:a,properties:i,model:n,libraryItemsProps:u,dimensionAndFieldList:d}).then(function(){return l?Je({oldProperties:r,newProperties:i,model:n}):Promise.resolve(!1)})})}function Le(e){!function(e){var t=je(e);return Array.isArray(t)&&t.some(function(e){return"object"===Te(e)&&!e.disabled&&!Oe[e.type]})}(e)?De.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,Ve(e)}function Pe(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some(function(e){return Ye({modifiers:je(e),properties:n,layout:r})})}function Re(e){var t=je(e);if(Array.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];if(Oe[r.type]&&!r.disabled)return r}}function ze(e){var t=Re(e);return!t||Oe[t.type].enableTotalsFunction(e)}function Fe(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 Be(e){return o(e,"outputExpression.qValueExpression.qExpr")||o(e,"outputExpression")}function He(e){Fe(e).forEach(function(e){return function(e){var n=Re(e);n&&(void 0!==n.outputExpression&&Be(n)!==e.qDef.qDef?delete e.qDef.base:!De.isValid(e)&&n.base&&(e.qDef.base=t()(!0,{},n.base)))}(e)})}function Ve(e){var t=je(e);Array.isArray(t)&&t.forEach(function(t){"object"===Te(t)&&(t.disabled||!Oe[t.type]&&Be(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)})}function $e(e){return e.base||e.qDef&&e.qDef.base}function We(e){var t=$e(e);return e.qLibraryId||t&&t.qLibraryId}function Ue(e){var t=e.measure,n=e.properties,r=e.layout;return!We(t)&&Ye({modifiers:je(t),properties:n,layout:r})}function Ye(e){var t=e.modifiers,n=e.properties,r=e.layout,i={};return Array.isArray(t)&&t.some(function(e){return!("object"!==Te(e)||e.disabled||!Oe[e.type])&&(void 0===i[e.type]&&(i[e.type]=Oe[e.type].isApplicable({properties:n,layout:r})),i[e.type])})}function Ke(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):I(t,n,r)}({model:r,oldProperties:t,newProperties:n}).then(function(){return i}):Promise.resolve(i)}function Ze(e){var t=e.modifiers,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some(function(e){return"object"===Te(e)&&!e.disabled&&Oe[e.type]&&Oe[e.type].needDimension({modifier:e,properties:n,layout:r})})}function Qe(e){var t=Fe(e),n=[],r=[],i=!1;return t.forEach(function(t){var r=je(t);if(Ye({modifiers:r,properties:e})){var o=We(t);o&&n.push(o),i=i||Ze({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)?(Ae[t.id].masterItemSubscriber=Ae[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 c(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 u(e,n){return t.app[n](e).then(function(t){r[e]={listener:t.layoutSubscribe(c),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(u(e,"getMeasure"))}),Object.keys(a).forEach(function(e){a[e]&&!r[e]&&s.push(u(e,"getDimension"))})),Promise.all(s)},unsubscribe:function(){Object.keys(r).forEach(function(e){r[e].listener.dispose()}),r={}}}}({model:t,callback:function(e){return _e({model:t,masterItem:e}).then(function(){return t.app.clearUndoBuffer()})}}),Ae[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:()=>He});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 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}function u(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 d={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:u};var f=n(8),h=n.n(f);const p=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&&d.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]})},v=function(e){var t=e.exportFormat,n=e.properties;n.qLayoutExclude||(n.qLayoutExclude={}),n.qLayoutExclude.disabled&&(Object.keys(n.qLayoutExclude.disabled).forEach(function(e){t.properties.hasOwnProperty(e)||(t.properties[e]=n.qLayoutExclude.disabled[e])}),delete n.qLayoutExclude.disabled),n.qLayoutExclude.changed&&(function(e){Object.keys(e.qLayoutExclude.changed).forEach(function(t){e.qLayoutExclude.changed[t].to===o.getValue(e,t)&&o.setValue(e,t,e.qLayoutExclude.changed[t].from)})}(n),delete n.qLayoutExclude.changed),n.qLayoutExclude.quarantine&&!o.isEmpty(n.qLayoutExclude.quarantine)||delete n.qLayoutExclude},b=function(e){e.forEach(function(e){h().cleanUpMeasure(e),e.qDef.modifiers&&(e.store={modifiers:e.qDef.modifiers},delete e.qDef.modifiers)})};function x(e,t,n){var r,i,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=o.getValue(e,t);if(!o.isAtomicValue(s))try{if((i=(i=(r=JSON.stringify(s)).match(/:\{/g))?i.length:0)>2&&!a)return;s=JSON.parse(r)}catch(e){return}o.getValue(e,"qLayoutExclude.quarantine")||o.setValue(e,"qLayoutExclude.quarantine",{});var l=o.getValue(e,"qLayoutExclude.quarantine");l[n]||(l[n]={}),l[n][t]=s}var S=n(909),w=n.n(S);function M(e,t){var n=w()(!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 k(e,t){return w()(!0,{},t,e)}function C(e,t,n){return"function"==typeof e?e(t):Number.isNaN(+e)?n:e}var q=Math.pow(2,53)-1;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 D(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 T=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},O=function(e,t,n){t.hasOwnProperty(e)&&(n[e]=t[e])},N=function(e,t,n,r){t.hasOwnProperty(e)?n[e]=t[e]:n[e]=r},A=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}}},_=function(){return{qDef:{autoSort:!0,cId:"",numFormatFromTemplate:!0},qLibraryId:"",qTrendLines:[]}},I=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=M(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 c=M(s.excludedDimensions[t],a);o.qDimensions.length<i?o.qDimensions.push(c):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(c)}},L=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=k(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 c=k(s.excludedMeasures[t],a);o.qMeasures.length<i?o.qMeasures.push(c):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(c)}},P=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=C(a.max,i.dimensions.length,q),l=C(a.min,i.dimensions.length,0);return{maxDimensions:C(o.max,s,q),minDimensions:C(o.min,l,0),maxMeasures:s,minMeasures:l}},R=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?(d.indexAdded(n.qInterColumnSortOrder,o),++o):(--o,d.indexRemoved(n.qInterColumnSortOrder,o))},z=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=w()(!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=w()(!0,{},n,i)).components&&(i.components=[]),i},F=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=[]))},B=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 E(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 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}}(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)})}},H=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 D(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 D(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?D(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();a.qMeasures=[],s.forEach(function(e){a.qMeasures.push(e),r.measures.added(e,n)})}},V=function(e){var t=e.measures,n=e.modifierTypes;t&&n&&h().isSupportedModifiers(n)&&t.forEach(function(e){e.store&&e.store.modifiers&&(e.qDef.modifiers=e.store.modifiers),delete e.store})};function $(e,t){var n=o.getValue(e,"qLayoutExclude.quarantine",{})[t];return!!n&&(Object.keys(n).forEach(function(t){o.setValue(e,t,n[t])}),delete e.qLayoutExclude.quarantine[t],!0)}const W={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,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=[]),p({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),v({exportFormat:i,properties:a}),r||b(i.properties.qHyperCubeDef.qMeasures),Array.isArray(i.properties.filters)&&(x(i.properties,"filters","storedFilters",!0),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,c=e.hypercubePath,u=e.extension,d=e.supportedFilters,f=void 0===d||d,h=e.isHCModifierSupported,p=void 0===h||h,m={qChildren:[]},g=z({exportFormat:t,initialProperties:r,hypercubePath:c}),y=o.getValue(r,c||"").qHyperCubeDef,v=o.getValue(g,c||"").qHyperCubeDef,b=P({exportFormat:t,dataDefinition:a}),x=b.maxDimensions,S=b.minDimensions,w=b.maxMeasures,M=b.minMeasures,k=l.defaultDimension,C=void 0===k?A():k,q=l.defaultMeasure,E=void 0===q?_():q;v.qDimensions.length=0,v.qMeasures.length=0,F({exportFormat:t,maxDimensions:x,minDimensions:S,maxMeasures:w,minMeasures:M})&&j({exportFormat:t,maxDimensions:x,minDimensions:S,maxMeasures:w,minMeasures:M,newHyperCubeDef:v}),I({exportFormat:t,maxDimensions:x,minDimensions:S,newHyperCubeDef:v,defaultDimension:C}),L({exportFormat:t,maxMeasures:w,minMeasures:M,newHyperCubeDef:v,defaultMeasure:E}),B({newProperties:g,dataDefinition:a,hypercubePath:c}),H({newProperties:g,dataDefinition:a,hypercubePath:c}),R({exportFormat:t,newHyperCubeDef:v}),O("qMaxStackedCells",y,v),O("qNoOfLeftDims",y,v),N("qInitialDataFetch",y,v,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),N("qMode",y,v,"S"),N("qReductionMode",y,v,"N"),N("qSortbyYValue",y,v),N("qIndentMode",y,v),N("qShowTotalsAbove",y,v),T(g,t,r),m.qProperty=g;var D=o.getValue(u||{},"support.modifiers");return V({measures:v.qMeasures,modifierTypes:D}),f&&$(m.qProperty,"storedFilters"),"S"===v.qMode&&p&&$(m.qProperty,"dynamicScript"),m}};var U={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function Y(e,t,n,r){t=t||[];var i=u(e,r,n),o=u(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}const G={create:function(e,t){if(!e||!U[e])throw new Error("Attribute Expressions Util: ID required");var n={};return t&&Object.keys(t).forEach(function(e){n[e]=t[e]}),n.id=e,n.qAttribute=!0,n},moveByIdFromGroup:function(e,t,n,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(Y(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"}},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}}},Z={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 Q={scatterplot:Z,"sn-scatter-plot":Z,piechart:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return 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=d.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 c=n?o.getValue(t,"color.byDimDef"):o.getValue(t,"color.byMeasureDef"),u=o.getValue(t,"color.formatting.qNumFormat"),f=o.getValue(t,"color.formatting.isCustomFormatted");if(c){var h=G.create(G.IDMAP.COLOR_BY_ALTERNATIVE);switch(c.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:h,label:s,item:c,isDimension:n,qNumFormat:u,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=d.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:h,measures:a,item:c,isDimension:n,qNumFormat:u,isCustomFormatted:f})}n?(h.qSortBy={qSortByAscii:1},l.qAttributeDimensions.push(h)):l.qAttributeExpressions.push(h)}}}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:h().measureBase.getLibraryId(e)}(n,t),i?(s.type="measure",s.name=i,s.id=i,o=function(e,t){return h().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=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:s,key: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)}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=d.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)},ce=function(e,t){var n={primary:!0};if(e){var r=(Q[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},ue=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))},de=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=d.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})},he=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},pe=function(e){var t=o.getValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",[]),n=o.getValue(e,"color.colorExpression","");t.splice(0,0,{qExpression:n,id:"colorByExpression"}),o.setValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",t)},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=W.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,c=l.COLOR_BY_ALTERNATIVE,u=l.COLOR_BY_EXPRESSION;return G.moveByIdFromGroup(a,[],"qAttributeDimensions",c),G.moveByIdFromGroup(a,[],"qAttributeExpressions",c),G.moveByIdFromGroup(s,[],"qAttributeExpressions",u),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,c=e.isHCModifierSupported,u=W.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:i,hypercubePath:a,extension:s,supportedFilters:l,isHCModifierSupported:c}),d=u.qProperty,f=o.getValue(d,"visualization"),h=o.getValue(d,"qHyperCubeDef.qDimensions",[]),p=o.getValue(d,"color.mode",""),m=o.getValue(d,"color.auto",""),g=ce(d,f),y=ue({canColorBy:g,autoColor:m,colorMode:p,dimensions:h});return g[p]?he({shouldUpdateColorBy:y,properties:d})&&pe(d):me(d),y&&de(d,"qHyperCubeDef."),ge(d)&&le(d,"color.persistent",!0),fe(h),u}};var ve=["bar","marker","line"];const be=function(e){var t=e.initialProperties,n=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?$(n,"unsupportedAutoMinMax")||w()(n.measureAxis,t.measureAxis):$(n,"supportedAutoMinMax")||w()(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}}),ve.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]&&w()(s,n.properties.measureAxes[t[0].axis])):w()(s,n.properties.measureAxes[0])}},Se=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}}},we={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,c=e.isHCModifierSupported,u=ye.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:i,hypercubePath:o,extension:s,supportedFilters:l,isHCModifierSupported:c}),d=u.qProperty;return be({initialProperties:n,properties:d}),xe({exportFormat:t,initialProperties:n,properties:d,measureType:a}),Se(d.qHyperCubeDef),d.qHyperCubeDef.qColumnOrder=[],d.qHyperCubeDef.columnOrder=[],u}};function Me(e,t,n){return"qLayoutExclude.quarantine.".concat(e,".").concat(t,".").concat(n)}function ke(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 c=Me(n,r,l);o.setValue(t,c,s),o.setValue(i,a,void 0)}}({properties:t,quarantineName:r,arrayName:i,item:e,itemPath:a})})}function Ce(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=Me(n,r,s),c=o.getValue(t,l);void 0!==c&&(o.setValue(i,a,c),o.setValue(t,l,void 0))}}({properties:t,quarantineName:r,arrayName:i,item:e,itemPath:a})})}var qe="qHyperCubeDef.qMeasures",Ee="conditionalColoring",De="measures",Te="qDef.conditionalColoring";const Oe={quarantine:function(e){ke({properties:e,arrayPath:qe,quarantineName:Ee,arrayName:De,itemPath:Te})},unquarantine:function(e){Ce({properties:e,arrayPath:qe,itemPath:Te,arrayName:De,quarantineName:Ee})}};var Ne="qHyperCubeDef.qMeasures",Ae="measures",_e="qHyperCubeDef.qDimensions",Ie="dimensions",Le="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",Pe="alternativeMeasures",Re="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",ze="alternativeDimensions",Fe="qCalcCondition",je="conditionalShowHide";const Be={quarantine:function(e){ke({properties:e,arrayPath:Ne,quarantineName:je,arrayName:Ae,itemPath:Fe}),ke({properties:e,arrayPath:_e,quarantineName:je,arrayName:Ie,itemPath:Fe})},unquarantine:function(e){Ce({properties:e,arrayPath:Ne,quarantineName:je,arrayName:Ae,itemPath:Fe}),Ce({properties:e,arrayPath:_e,quarantineName:je,arrayName:Ie,itemPath:Fe})},quarantineAlternative:function(e){ke({properties:e,arrayPath:Le,quarantineName:je,arrayName:Pe,itemPath:Fe}),ke({properties:e,arrayPath:Re,quarantineName:je,arrayName:ze,itemPath:Fe})},unquarantineAlternative:function(e){Ce({properties:e,arrayPath:Le,quarantineName:je,arrayName:Pe,itemPath:Fe}),Ce({properties:e,arrayPath:Re,quarantineName:je,arrayName:ze,itemPath:Fe})}},He={hypercube:W,colorChart:ye,axisChart:we,quarantineProperty:x,unquarantineProperty:$,quarantineArrayProp:ke,unquarantineArrayProp:Ce,conditionalColoring:Oe,conditionalShow:Be}})(),r.default})()}(fK)),fK.exports),pK=ug(hK);function mK(e,t){if("custom"===e.dimensionAxis.axisDisplayMode){const n=t.layout.qHyperCube.qMeasureInfo.filter(e=>e.qError?.qErrorCode!==KV).length,r=t.layout.qHyperCube.qDimensionInfo.filter(e=>e.qError?.qErrorCode!==KV).length,i=e.dimensionAxis.maxVisibleItems;i<1?e.dimensionAxis.maxVisibleItems=10:i>1e4/(r+n)&&(e.dimensionAxis.maxVisibleItems=Math.min(i,Math.floor(1e4/(r+n))))}}const gK=[{translation:"Common.None",value:"none"},{translation:"Common.Small",value:"small"},{translation:"Common.Medium",value:"medium"},{translation:"Common.Large",value:"large"}],yK=(e,t,n)=>{const r=`${e}.fontFamily`,i=`${e}.fontSize`;return{fontFamilyItem:{component:"dropdown",ref:r,options:()=>t.getOptions(r),defaultValue:()=>t.getDefaultValue(r)},fontWrapperItem:{component:"inline-wrapper",items:{fontSizeItem:{component:"dropdown",ref:i,options:()=>t.getOptions(i),defaultValue:()=>t.getDefaultValue(i)},fontColorItem:{component:"color-picker",width:!1,ref:`${e}.color`,defaultValue:()=>({color:n.getStyle("object.barChart",e,"color")})}}}}};function vK(e,t,n){const r=function(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,c={};l.forEach(function(e){for(var r=e.split("."),i=c,a=0;a<r.length;a++){var l=r[a];a===r.length-1?i[l]=Cv({theme:t,translator:n,id:s,path:e,flags:o}):void 0===i[l]&&(i[l]={}),i=i[l]}});var u=function(e){for(var t=e.split("."),n=c,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 c.getDefaultValue=function(e){return u(e).getDefaultValue()},c.getOptions=function(e){return u(e).getOptions()},c}({theme:e,translator:n,config:{id:"barChart",paths:["axis.title","axis.label.name","label.value","legend.title","legend.label"]},flags:t});return{component:"styling-panel",show:!0,chartType:"barchart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.BarChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,useBackground:t?.isEnabled("SENSECLIENT_IM_2428_BARCHART_BG"),items:{outlineSection:{translation:"properties.Outline",component:"panel-section",items:{wrapperItem:{component:"items",ref:"components",key:"bar",items:{barStroke:{component:"inline-wrapper",items:{strokeWidth:{ref:"style.strokeWidth",width:!0,component:"dropdown",options:Object.keys(gK).map(e=>gK[e]),defaultValue:"none",schemaIgnore:!0},strokeColor:{ref:"style.strokeColor",defaultValue:{color:"#205891"},schemaIgnore:!0,width:"auto",component:"color-picker"}}}}}}},widthSection:{translation:"LayerStyleEditor.style.barWidth",component:"panel-section",show:(e,n)=>!GD.continuous({layout:n.layout})||t?.isEnabled("TLV_1060_CONTINUOUS_AXIS_BAR_WIDTH"),items:{barWidth:{component:"items",ref:"components",key:"bar",items:{width:{ref:"style.width",component:"slider",min:.01,max:1,step:.01,defaultValue(e,t,n){const{properties:r}=n,{barGrouping:i,qHyperCubeDef:o}=r,a=o.qMeasures.length,s=o.qDimensions.length,l="grouped"===i.grouping&&s>0&&a+s>2;return GD.continuous({properties:r})?1:l?.9:.7},schemaIgnore:!0}}}}},axisTitleSection:{translation:"properties.axis.title",component:"panel-section",items:{axisTitleItems:{component:"items",ref:"components",key:"axis",items:yK("axis.title",r,e)}}},axisLabelSection:{translation:"properties.axis.label",component:"panel-section",items:{axisLabelItems:{component:"items",ref:"components",key:"axis",items:yK("axis.label.name",r,e)}}},labelSection:t?.isEnabled("CLIENT_IM_3050")?{translation:"properties.dataPoints.labelmode",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"label",items:{...yK("label.value",r,e),contrastColor:{component:"checkbox",type:"boolean",ref:"label.value.useContrastColor",translation:"properties.dataPoints.valuelabel.contrast",defaultValue:!0}}}}}:void 0,legendTitleSection:t?.isEnabled("CLIENT_IM_3051")?{translation:"properties.legend.title",component:"panel-section",items:{legendTitleSection:{component:"items",ref:"components",key:"legend",items:yK("legend.title",r,e)}}}:void 0,legendLabelSection:t?.isEnabled("CLIENT_IM_3051")?{translation:"properties.legend.label",component:"panel-section",items:{legendLabelSection:{component:"items",ref:"components",key:"legend",items:yK("legend.label",r,e)}}}:void 0}}}function bK(e){return{classification:{section:"styling",tags:["simple"],exclusive:!0},component:"items",show:!0,chartType:"barchart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.BarChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,useBackground:e?.isEnabled("SENSECLIENT_IM_2428_BARCHART_BG"),items:{outlineSection:{translation:"LayerStyleEditor.style.strokeWidth",component:"items",items:{wrapperItem:{component:"items",ref:"components",key:"bar",items:{barStroke:{component:"inline-wrapper",items:{strokeWidth:{ref:"style.strokeWidth",width:!0,component:"dropdown",translation:"LayerStyleEditor.style.strokeWidth",options:Object.keys(gK).map(e=>gK[e]),schemaIgnore:!0,defaultValue:gK[0].value},strokeColor:{ref:"style.strokeColor",schemaIgnore:!0,defaultValue:{color:"#205891",index:-1},width:"auto",component:"color-picker"}}}}}}},widthSection:{translation:"LayerStyleEditor.style.barWidth",component:"items",show:(e,t)=>!GD.continuous({layout:t.layout}),items:{barWidth:{component:"items",ref:"components",key:"bar",items:{width:{ref:"style.width",translation:"LayerStyleEditor.style.barWidth",component:"slider",min:.01,max:1,step:.01,schemaIgnore:!0,defaultValue:(e,t,n)=>((e,t)=>{const n=t.qHyperCube?.qMeasureInfo?.filter(e=>e.qError?.qErrorCode!==KV).length,r=t.qHyperCube?.qDimensionInfo?.filter(e=>e.qError?.qErrorCode!==KV).length,i="grouped"===e.barGrouping?.grouping&&r>0&&n+r>2;return GD.continuous({layout:t})?1:i?.9:.7})(n.properties,n.layout)}}}}},optionsSection:{translation:"LayerStyleEditor.label.Options",component:"items",items:{wrapperItem:{component:"items",items:{optionsHeader:{component:"header",translation:"LayerStyleEditor.label.Options"},scrollbar:{ref:"scrollbar",translation:"properties.scrollbar",component:"dropdown",type:"string",options:Object.keys(oA.OPTIONS).map(e=>oA.OPTIONS[e]),schemaIgnore:!0,defaultValue:oA.DEFAULT.value},scrollAlignment:{ref:"scrollStartPos",translation:"properties.ScrollAlignment",component:"dropdown",schemaIgnore:!0,defaultValue:0,options:[{value:0,translation:"properties.ScrollAlignStart"},{value:1,translation:"properties.ScrollAlignEnd"}]},gridLines:{type:"items",items:{showGridLines:{ref:"gridLine.auto",type:"boolean",translation:"properties.gridLine.spacing",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},gridSpacing:{ref:"gridLine.spacing",type:"number",component:"dropdown",defaultValue:2,options:[{value:0,translation:"properties.gridLine.noLines"},{value:1,translation:"properties.gridLine.wide"},{value:2,translation:"properties.gridLine.medium"},{value:3,translation:"properties.gridLine.narrow"}],show:e=>e.gridLine&&!e.gridLine.auto}}}}}}}}}}function xK(e,t,n,r=!1){return r?bK(t):vK(e,t,n)}const SK=e=>e.qError?.qErrorCode!==KV,wK=(e,t)=>e?.qHyperCube[t].filter(e=>SK(e)),MK=e=>{if(!e)return!1;const t=bg(!0,{},e);return t.qHyperCube.qMeasureInfo=wK(e,"qMeasureInfo"),t.qHyperCube.qDimensionInfo=wK(e,"qDimensionInfo"),t&&!GD.continuous({layout:t})&&GD.stacked(t)},kK=({translator:e,flags:t,anything:n})=>{const r=(i=t?.isEnabled("TLV_1060_CONTINUOUS_AXIS_BAR_WIDTH"),i?{type:"items",show:ZN,items:{period:{translation:XN,type:"string",component:"dropdown",ref:"qHyperCubeDef.qDimensions.0.qDef.continuous.period",show:ZN,globalChange:tA,options:[{value:nA.AUTO,translation:JN.AUTO},{value:nA.SECONDS,translation:JN.SECONDS},{value:nA.MINUTES,translation:JN.MINUTES},{value:nA.HOURS,translation:JN.HOURS},{value:nA.DAYS,translation:JN.DAYS},{value:nA.WEEKS,translation:JN.WEEKS},{value:nA.MONTHS,translation:JN.MONTHS},{value:nA.YEARS,translation:JN.YEARS},{value:nA.NUMBER,translation:JN.NUMBER},{value:nA.NONE,translation:JN.NONE}],undefinedValue:nA.NONE,defaultValue:nA.AUTO,schemaIgnore:!0},stepSize:{translation:JN.TITLE,type:"number",defaultValue:rA,schemaIgnore:!0,show:QN,ref:"qHyperCubeDef.qDimensions.0.qDef.continuous.stepSize",min:Number.EPSILON,rollbackInvalid:!0}}}:{show:!1,globalChange:e=>{(e?.qHyperCubeDef?.qDimensions||[]).forEach(e=>{delete e.qDef.continuous?.period,delete e.qDef.continuous?.stepSize})}});var i;const o=n?.sense?.isUnsupportedFeature?.("continuousData"),a={items:{labels:{items:{header:{show:(e,t,n)=>wK(n.layout,"qMeasureInfo").length},pointLabels:{component:"checkbox",ref:"dataPoint.showLabels",type:"boolean",translation:"Simple.Label.Value",show:(e,t,n)=>!MK(t.layout)&&wK(n.layout,"qMeasureInfo").length},segmentLabels:{component:"checkbox",ref:"dataPoint.showSegmentLabels",type:"boolean",translation:"properties.dataPoints.segmentLabelMode",defaultValue:!1,show:(e,t)=>MK(t.layout),convertFunctions:{get:(e,t,n,r)=>r.dataPoint.showLabels&&r.dataPoint.showSegmentLabels,set(e,t,n,r,i){i.dataPoint.showSegmentLabels=e,i.dataPoint.showLabels=i.dataPoint.showSegmentLabels||i.dataPoint.showTotalLabels}}},totalLabels:{component:"checkbox",ref:"dataPoint.showTotalLabels",type:"boolean",translation:"properties.dataPoints.totalLabelMode",defaultValue:!0,show:(e,t)=>MK(t.layout),convertFunctions:{get:(e,t,n,r)=>r.dataPoint.showLabels&&r.dataPoint.showTotalLabels,set(e,t,n,r,i){i.dataPoint.showTotalLabels=e,i.dataPoint.showLabels=i.dataPoint.showSegmentLabels||i.dataPoint.showTotalLabels}}},dimensionTitle:{component:"checkbox",ref:"dimensionAxis.show",type:"string",translation:"Simple.Label.Dimension.Hide",defaultValue:"all",show:(e,t,n)=>wK(n.layout,"qDimensionInfo").length&&wK(n.layout,"qMeasureInfo").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.Measure.Hide",defaultValue:"all",show:(e,t,n)=>wK(n.layout,"qMeasureInfo").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"}}}}}}},s=n?.sense?.theme,l={uses:"settings",items:{simpleStyling:xK(s,t,e,!0),simpleLabels:a,general:{items:{showDisclaimer:{translation:"properties.showDisclaimer",type:"boolean",ref:"showDisclaimer",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Show"},{value:!1,translation:"properties.hide"}]}}},presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:{boxStyling:xK(s,t,e,!1),grouping:{ref:"barGrouping.grouping",type:"string",component:"item-selection-list",defaultValue:"grouped",horizontal:!0,items:(e,t)=>{const n=[{icon:"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.grouped",value:"grouped"},{icon:"stacked",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.stacked",value:"stacked"}];return wW({layout:t.layout})&&n.push({icon:"bars_butterfly",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.butterfly",value:"butterfly"}),n},show(e,t){const n=wK(t.layout,"qMeasureInfo").length,r=wK(t.layout,"qDimensionInfo").length;return r>0&&n+r>2},globalChange(e,t,n){"butterfly"!==e.barGrouping.grouping||wW({layout:n.layout})||(e.barGrouping.grouping="stacked"),"butterfly"===e.barGrouping.grouping&&e.measureAxis&&"max"!==e.measureAxis.minMax&&!e.measureAxis.autoMinMax&&(e.measureAxis.minMax="max")},change(e,t,n){"butterfly"!==e.barGrouping.grouping||wW({layout:n.layout})||(e.barGrouping.grouping="stacked"),wK(t.layout,"qDimensionInfo").length>1&&"stacked"===e.barGrouping.grouping?(e.qHyperCubeDef.qMode="K",e.qHyperCubeDef.qAlwaysFullyExpanded=!0):e.qHyperCubeDef.qMode="S"},readOnly:(e,t,n)=>GD.continuous({layout:n.layout}),convertFunctions:{get(e,t,n){const r="stacked";return"butterfly"===e(t.type)?wW({layout:n.layout})?e(t.type):r:GD.continuous({layout:n.layout})?r:e(t.type)},set(e,t,n){const r=QD(n.type,n);t(n.type,e,r)}}},orientation:{ref:"orientation",type:"string",component:"item-selection-list",defaultValue:"vertical",horizontal:!0,items:[{component:"icon-item",icon:"bars_vertical",labelPlacement:"bottom",translation:"properties.orientation.vertical",value:"vertical"},{icon:"bars_horizontal",component:"icon-item",labelPlacement:"bottom",translation:"Common.Horizontal",value:"horizontal"}],readOnly:(e,t,n)=>GD.continuous({layout:n.layout}),convertFunctions:(c="vertical",{get:(e,t,n)=>GD.continuous({layout:n.layout})?c:e(t.type),set(e,t,n){const r=QD(n.type,n);t(n.type,e,r)}})},scroll:{type:"items",items:{scrollbar:{type:"string",component:"dropdown",ref:"scrollbar",translation:"properties.scrollbar",options:Object.keys(oA.OPTIONS).map(e=>oA.OPTIONS[e]),defaultValue:oA.DEFAULT.value},scrollStartPos:{ref:"scrollStartPos",type:"number",translation:"properties.ScrollAlignment",component:"dropdown",defaultValue:0,options:[{value:0,translation:"properties.ScrollAlignStart"},{value:1,translation:"properties.ScrollAlignEnd"}],show:(e,t,n)=>!GD.continuous({layout:n.layout})}}},gridLines:{type:"items",snapshot:{tid:"property-gridLines"},items:{showGridLines:{ref:"gridLine.auto",type:"boolean",translation:"properties.gridLine.spacing",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},gridSpacing:{ref:"gridLine.spacing",type:"number",component:"dropdown",defaultValue:2,options:[{value:0,translation:"properties.gridLine.noLines"},{value:1,translation:"properties.gridLine.wide"},{value:2,translation:"properties.gridLine.medium"},{value:3,translation:"properties.gridLine.narrow"}],show:e=>e.gridLine&&!e.gridLine.auto}}},valueLabels:{type:"items",snapshot:{tid:"property-valueLabels"},items:{showLabels:{ref:"dataPoint.showLabels",type:"boolean",translation:"properties.dataPoints.labelmode",component:"switch",defaultValue:!1,options:[{value:!0,label:(t,n)=>((e,t,n)=>n&&n.get(MK(t.layout)?"properties.on":"Common.Auto"))(0,n,e)},{value:!1,translation:"properties.off"}]},showSegmentLabels:{ref:"dataPoint.showSegmentLabels",type:"boolean",translation:"properties.dataPoints.segmentLabelMode",component:"switch",defaultValue:!1,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],show:(e,t,n)=>e.dataPoint.showLabels&&MK(n.layout)},showTotalLabels:{ref:"dataPoint.showTotalLabels",type:"boolean",translation:"properties.dataPoints.totalLabelMode",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],show:(e,t,n)=>e.dataPoint.showLabels&&MK(n.layout)}}}}},colorsAndLegend:{uses:"colorsAndLegend",items:{colors:{items:{attributeExpression:TN}},legend:{items:{show:{snapshot:{tid:"property-legend"}}}}}},dimensionAxis:{uses:"axis.dimensionAxis",items:{axisDisplaySettings:{components:"items",type:"items",show:(e,t,n)=>!GD.continuous({layout:n.layout}),items:{axisDisplayMode:{ref:"dimensionAxis.axisDisplayMode",type:"string",translation:"properties.axis.displaymode",component:"dropdown",defaultValue:"auto",options:[{value:"auto",translation:"properties.axis.displaymode.auto"},{value:"max",translation:"properties.axis.displaymode.max"},{value:"custom",translation:"properties.axis.displaymode.custom"}]},maxVisibleItems:{ref:"dimensionAxis.maxVisibleItems",translation:"properties.axis.maxvisiblevalues",expression:"optional",type:"integer",invalid(e,t,n){const r=wK(n.layout,"qMeasureInfo").length,i=wK(n.layout,"qDimensionInfo").length,o=e.dimensionAxis.maxVisibleItems;return o<0||o>1e4/(i+r)},globalChange:mK,defaultValue:10,show:e=>"custom"===e.dimensionAxis.axisDisplayMode},hint:{component:"text",translation:"properties.axis.maxvisiblevalues.hint",style:"hint",show:e=>["custom","max"].indexOf(e.dimensionAxis.axisDisplayMode)>-1}}},continuousGroup:{items:{miniChart:null,continuousDimension:r},show:!o}}},measureAxis:{uses:"axis.flippableMeasureAxis"},tooltip:{uses:"tooltip"}}};var c;return t?.isEnabled("SENSECLIENT_LAYERED_LABELS")&&(l.items.dimensionAxis.items.othersGroup={items:{label:{options:[{value:"auto",translation:"Common.Auto"},{value:"horizontal",translation:"Common.Horizontal"},{value:"tilted",translation:"properties.labels.tilted"},{value:"layered",translation:"properties.labels.layered"}]}}}),l.items.measureAxis={uses:"axis.flippableMeasureAxis",items:{minMax:{items:{minMax:{show:e=>"butterfly"!==e.barGrouping.grouping&&e.measureAxis&&!e.measureAxis.autoMinMax},min:{show:e=>"butterfly"!==e.barGrouping.grouping&&e.measureAxis&&["min","minMax"].includes(e.measureAxis.minMax)&&!e.measureAxis.autoMinMax},max:{invalid:e=>e.measureAxis&&"minMax"===e.measureAxis.minMax?e.measureAxis.min>=e.measureAxis.max:!(!e.measureAxis||"max"!==e.measureAxis.minMax||"butterfly"!==e.barGrouping.grouping)&&e.measureAxis.max<=0}}}}},l},CK={uses:"sortingWithDisclaimer",items:{defaultSorting:{items:{dimensions:{locked:(e,t,n)=>1===n.getMeasures().length&&2===n.getDimensions().length&&0===e,items:{autoSort:{change(e){cO(e)}}}},interColumnSorting:{reset:(e,t)=>{const{qDimensions:n,qMeasures:r,qInterColumnSortOrder:i}=e.qHyperCubeDef,{qCardinal:o}=t.layout.qHyperCube.qDimensionInfo[0],a=i.length,s=[...Array(a).keys()];1===n.length&&r.length>=1&&o>10&&([s[0],s[1]]=[s[1],s[0]]),e.qHyperCubeDef.qInterColumnSortOrder=s}}}}}},qK=({translator:e,flags:t})=>({type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}},refLines:{uses:"reflines"},dimRefLines:{uses:"dimReflines"},plugins:t?.isEnabled("CLIENT_TLV_694_PLUGINS_UI")&&t?.isEnabled("TLV_1274_PLUGINS_BAR_CHART")?WN({translator:e,pluginOptions:[{value:"point",translation:e.get("Visualizations.Descriptions.Point")},{value:"line",translation:e.get("Visualizations.Descriptions.Line")}]}):void 0}}),EK=({translator:e,flags:t,anything:n})=>({uses:"data",items:{dimensions:{items:{nullSuppression:{show(e,t,r){if(n?.sense?.isUnsupportedFeature?.("includeZeroValues"))return!1;const i=((e,t)=>{const n=t.layout?.qHyperCube?.qDimensionInfo?.findIndex(e=>SK(e));return t.properties?.qHyperCubeDef?.qDimensions?.[n]===e})(e,t),o=GD.continuous({layout:r.layout});return!(i&&o)}},visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Chart.Dimensions.VisibilityCondition",defaultValue:{qv:""},tid:"visibilityCondition",isExpression:e=>"string"==typeof e&&e.trim().length>0},period:{type:"string",defaultValue:"auto",ref:"qDef.continuous.period",show:!1}}},measures:{items:{visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Chart.Measures.VisibilityCondition",defaultValue:{qv:""},tid:"visibilityCondition",isExpression:e=>"string"==typeof e&&e.trim().length>0},trendLines:n?.sense?.isUnsupportedFeature?.("trendlines")?void 0:hW({translator:e,allowStackedByDimension:t&&t.isEnabled("TRENDLINES_STACKED_DIM")})}}}});function DK({translator:e,flags:t,anything:n}){return{type:"items",component:"accordion",items:{data:EK({translator:e,flags:t,anything:n}),sorting:CK,addons:qK({translator:e,flags:t}),settings:kK({translator:e,flags:t,anything:n})}}}const TK=e=>e.qError?.qErrorCode!==KV;function OK({flags:e}){return{type:"items",component:"accordion",items:{data:{uses:"data"},sort:{uses:"sortWithDisclaimer",items:{sort:{items:{dimensions:{locked(e,t,n){const r=n.qHyperCube.qMeasureInfo.length,i=n.qHyperCube.qDimensionInfo.filter(e=>TK(e)).length;return 1===r&&2===i&&0===e}}}}}},presentation:{uses:"presentation",items:{showLabels:{ref:"dataPoint.showLabels",type:"boolean",translation:"properties.dataPoints.labelmode",component:"switch",options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]},grouping:{ref:"barGrouping.grouping",type:"string",component:"item-selection-list",horizontal:!0,items:(e,t)=>{const n=[{icon:"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.grouped",value:"grouped"},{icon:"stacked",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.stacked",value:"stacked"}];return wW({layout:t?.layout})&&n.push({icon:"bars_butterfly",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.butterfly",value:"butterfly"}),n},show(e,t){const n=t.qHyperCube.qMeasureInfo.filter(e=>TK(e)).length,r=t.qHyperCube.qDimensionInfo.filter(e=>TK(e)).length;return n+r>2&&!GD.continuous({layout:t})&&(i=t,!(i?.qHyperCube?.qDimensionInfo?.filter(e=>TK(e)).length>1&&i?.qHyperCube?.isHCEnabled));var i},change(e){e.qHyperCubeDef.qDimensions.length>1&&"stacked"===e.barGrouping.grouping?(e.qHyperCubeDef.qMode="K",e.qHyperCubeDef.qAlwaysFullyExpanded=!0):e.qHyperCubeDef.qMode="S"}},orientation:{ref:"orientation",type:"string",component:"item-selection-list",horizontal:!0,items:[{component:"icon-item",icon:"bars_vertical",labelPlacement:"bottom",translation:"properties.orientation.vertical",value:"vertical"},{icon:"bars_horizontal",component:"icon-item",labelPlacement:"bottom",translation:"Common.Horizontal",value:"horizontal"}],show:(e,t)=>!GD.continuous({layout:t})}}},color:{uses:"color"}}}}function NK(e){const t={},n=Cx(e,"components"),r=Cx(e,"dimensionAxis.axisDisplayMode"),i=Cx(e,"dimensionAxis.maxVisibleItems"),o=n?n.filter(e=>"bar"===e.key)[0]:void 0,a=Cx(e,"tooltip");if(o&&o.style&&Object.keys(o.style).forEach(e=>{t[`chart_style_${e}`]=o.style[e]}),i&&(t.chart_dimaxis_maxVisibleItems=i),r&&(t.chart_dimaxis_axisDisplayMode=r),a){t.chart_tooltip_custom=!a.auto;const e=Cx(a,"chart.object.refId");!a.auto&&e&&(t.chart_tooltip_custom_mini_chart=e)}return t}const AK=e=>!!(e&&e.qHyperCube.qSize.qcy>0),_K={ACCUMULATIONS:"accumulation",MOVING_AVERAGE:"movingAverage",DIFFERENCE:"difference",NORMALIZATION:"normalization"};function IK(){const e=[];return Object.keys(_K).forEach(t=>{e.push(_K[t])}),e}function LK(e){return{definition:DK(e),softDefinition:OK(e),support:{snapshot:AK,export:AK,exportData:!0,sharing:AK,viewData:!0,effects:!0,modifiers:IK()},importProperties:(t,n,r,i)=>{const o={layout:{templateId:n.templateId}};r.mapProperties(o);const a={defaultDimension:r.getDefaultDimensionProperties(),defaultMeasure:r.getDefaultMeasureProperties()},s=pK.axisChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r$(e),defaultPropertyValues:a,hypercubePath:i,extension:r}),l=s.qProperty;return l.qHyperCubeDef.qDimensions.length>1&&"stacked"===l.barGrouping.grouping&&(l.qHyperCubeDef.qMode="K",l.qHyperCubeDef.qAlwaysFullyExpanded=!0),pK.conditionalShow.unquarantine(l),pK.conditionalShow.unquarantineAlternative(l),s},exportProperties:(e,t,n)=>{pK.conditionalShow.quarantine(e.qProperty),pK.conditionalShow.quarantineAlternative(e.qProperty);return pK.axisChart.exportProperties({propertyTree:e,hyperCubePath:t,viewDataMode:n})},migrate:{properties:e=>(e.qExtendsId||(function(e){e.qHyperCubeDef.qDimensions.forEach(cO),e.qHyperCubeDef.qLayoutExclude?.qHyperCubeDef?.qDimensions&&e.qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.forEach(cO)}(e),function({properties:e}){const{scrollbar:t,dimensionAxis:n,preferContinuousAxis:r,showMiniChartForContinuousAxis:i}=e;if(t||!1!==i)return;const{continuousAuto:o}=n;(o||!o&&r)&&(e.scrollbar=oA.OPTIONS.NONE.value)}({properties:e})),e)},extendMetrics:NK}}return function(t){const n=wV();return{qae:i$(t),ext:LK(t),component(){const r=a$({env:t}),{viewState:i,viewCache:o}=s$(),a=function({picasso:t}){const n=e.useElement(),r=e.useOptions(),[i,o]=e.useState();return e.useEffect(()=>{if(!t)return()=>{};n.style.overflow="hidden";const e=t({renderer:{prio:[r?.renderer||"canvas"]}}).chart({element:n,data:[],settings:{}});o(e);const{destroy:i}=e;return()=>{i()}},[r.renderer]),i}({picasso:n}),s=OW({picasso:n,chart:a,environment:r,viewState:i,viewCache:o}),l=uK({env:t,services:s});oK({picasso:n,chart:a,services:s,environment:r,viewState:i,viewCache:o,bootstrapped:l}),(({environment:t,services:n,chart:r,viewState:i,bootstrapped:o})=>{e.onTakeSnapshot(e=>{if(!t||!n||!o)return;const{layoutService:a,dockService:s,colorService:l,discrete:c,continuousDataModel:u,reducedDataModel:d}=n,{width:f,height:h}=s.meta.chart.size;if(e.snapshotData=e.snapshotData||{},e.snapshotData.content={size:{w:f,h:h}},a.meta.isSnapshot)return Promise.resolve();e.snapshotData.content.chartData={scrollOffset:i.get("scrollOffset"),zoom:i.get("zoom"),legendScrollOffset:XD(r,SW.COMPONENT.LEGEND_COLOR_CAT)};const{properties:p}=o,m=p?.qHyperCubeDef.qDimensions.some(e=>e.qCalcCondition?.qCond?.qv);return m&&(e.tooltip.auto=!0),a.meta.isDiscrete?(c.command.setSnapshotData(e),d.setSnapshotData(e)):u.setSnapshotData(e),l.getMain().getSnapshotData().then(t=>{e.snapshotData.content.chartData={...e.snapshotData.content.chartData,...t}}).catch(()=>{})}),e.useImperativeHandle(()=>({getViewState(){if(i&&r)return{scrollOffset:i.get("scrollOffset"),zoom:i.get("zoom"),legendScrollOffset:XD(r,SW.COMPONENT.LEGEND_COLOR_CAT)}}}),[i,r])})({environment:r,services:s,chart:a,viewState:i,bootstrapped:l})}}}});
|