@nebula.js/sn-combo-chart 1.8.13 → 1.8.14
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/dist/sn-combo-chart.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @nebula.js/sn-combo-chart v1.8.
|
|
2
|
+
* @nebula.js/sn-combo-chart v1.8.14
|
|
3
3
|
* Copyright (c) 2022 QlikTech International AB
|
|
4
4
|
* Released under the MIT license.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("@nebula.js/stardust")):"function"==typeof define&&define.amd?define(["@nebula.js/stardust"],t):(e="undefined"!=typeof globalThis?globalThis:e||self)["sn-combo-chart"]=t(e.stardust)}(this,(function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var r=Object.prototype.hasOwnProperty,i=Object.prototype.toString,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===i.call(e)},l=function(e){if(!e||"[object Object]"!==i.call(e))return!1;var t,n=r.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&r.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!o)return!1;for(t in e);return void 0===t||r.call(e,t)},u=function(e,t){o&&"__proto__"===t.name?o(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},c=function(e,t){if("__proto__"===t){if(!r.call(e,t))return;if(a)return a(e,t).value}return e[t]},d=function e(){var t,n,r,i,o,a,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=c(d,n),d!==(i=c(t,n))&&(p&&i&&(l(i)||(o=s(i)))?(o?(o=!1,a=r&&s(r)?r:[]):a=r&&l(r)?r:{},u(d,{name:n,newValue:e(p,a,i)})):void 0!==i&&u(d,{name:n,newValue:i}));return d};const f="center",h="bottom";var p={NoDataExist:{label:"NoDataExist",alignment:f,default:!0},OnlyNanData:{label:"OnlyNanData",alignment:f,default:!0},OnlyNegativeOrZeroValues:{label:"OnlyNegativeOrZeroValues",alignment:f,default:!1},LimitedData:{label:"LimitedData",alignment:h,default:!1},OnlyNanColor:{label:"OnlyNanColor",alignment:h,default:!1},NegativeOrZeroValues:{label:"NegativeOrZeroValues",alignment:h,default:!1},DataRangeIncludingZero:{label:"DataRangeIncludingZero",alignment:h,default:!1}};const m=[["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}]],y={};m.forEach((([e,{width:t,height:n}])=>{y[e]={width:t,height:n}}));const g={getLayoutModes:()=>y,getLayoutMode(e,t){let n;for(n=0;n<m.length;++n)if(e>=m[n][1].width&&t>=m[n][1].height)return m[n][0];return"SPARK"}};const v=["$date","$timestamp","$time"],b=["D","TS","T"],x={hasTimeTag:e=>!!(e&&e.qTags&&e.qTags.some((e=>v.some((t=>t===e))))),hasUnknownFormat:e=>!(!e||!e.qNumFormat||"U"!==e.qNumFormat.qType),hasTimeFormat:e=>!!(e&&e.qNumFormat&&b.some((t=>t===e.qNumFormat.qType))),isTimeDimension:(e,t)=>!!(e&&t&&(x.hasTimeTag(t)&&x.hasUnknownFormat(t)||x.hasTimeFormat(t))),isTime:(e,t)=>!!(t&&t.qHyperCube.qDimensionInfo&&t.qHyperCube.qDimensionInfo.length)&&(e&&x.isTimeDimension(e,t.qHyperCube.qDimensionInfo[0])),canBeContinuousDimension(e){if(!e)return!1;const t=e.qTags||[];return!(!e.qContinuousAxes||!t.some((e=>"$numeric"===e)))},canBeContinuous:e=>!(!(e&&e.qHyperCube&&e.qHyperCube.qDimensionInfo)||e.qHyperCube.qDimensionInfo.length<1)&&x.canBeContinuousDimension(e.qHyperCube.qDimensionInfo[0]),maxNumberOfLines:12},M=(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},S=e=>M(e,"qHyperCube.qDimensionInfo",[]),w=e=>M(e,"qHyperCube.qMeasureInfo",[]),E=e=>M(e,"barGrouping.grouping"),k={continuous:(e,t=!1)=>!!x.canBeContinuous(e)&&(M(e,"dimensionAxis.continuousAuto")?"function"==typeof t?t():t:!!e.preferContinuousAxis),dimensionless:e=>!S(e).length,grouped(e){return!this.dimensionless(e)&&"grouped"===E(e)&&(S(e).length>1||w(e).length>1)&&!this.continuous(e)},groupedByDimension(e){return this.grouped(e)&&S(e).length>1&&1===w(e).length},groupedByMeasure(e){return this.grouped(e)&&1===S(e).length&&w(e).length>1},stacked(e){return(!this.dimensionless(e)&&"grouped"!==E(e)||this.continuous(e))&&(S(e).length>1||w(e).length>1)},stackedByDimension(e){return this.stacked(e)&&S(e).length>1&&1===w(e).length},stackedByMeasure(e){return this.stacked(e)&&1===S(e).length&&w(e).length>1},simple:e=>0===S(e).length||1===S(e).length&&1===w(e).length,snapshot:e=>!!M(e,"snapshotData")};function C(e,t){const n=e.component(t);return n&&n._DO_NOT_USE_getInfo&&n._DO_NOT_USE_getInfo().offset}const O=e=>{throw e.isHandled=!0,e};const T={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":return"far";case"far":return"near";default:return"far"}},getHorizontalDock:e=>"near"===e||"left"===e?"left":"right",getVerticalDock:e=>"near"===e||"bottom"===e?"bottom":"top",getDock:(e,t,n)=>"vertical"===e||"y"===e?T.getVerticalDock(t):n?T.getOppositeDock(T.getHorizontalDock(t)):T.getHorizontalDock(t),getInvertedOrientation:e=>"vertical"===e?"horizontal":"vertical",getMinorScaleAxis:e=>"vertical"===e?"y":"x",getMajorScaleAxis:e=>"vertical"===e?"x":"y",getAlignment(e,t){switch(e){case"vertical":return"near"===t||"bottom"===t?1:0;default:return"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},A={stringWidthOverMWidth:e=>(12*Math.min(e,3)+6.384615384615385*Math.max(e-3,0))/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=A.getCharacterRatios(e[n]),r.latin+=i.latin,r.cjk+=i.cjk})):e.forEach((e=>{i=A.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=A.getTotalCharacterRatios(t,n,r),o=i.latinRatio*e,a=i.cjkRatio*e;return Math.ceil(A.stringWidthOverMWidth(o)+1.0909090909090908*a)}},N="#la-vie-tooltip";function q(){if(!document.querySelector(N)){const e=document.createElement("div");e.id="la-vie-tooltip",e.style.overflow="hidden",e.style.position="fixed",e.style.pointerEvents="none",e.style.left="0px",e.style.top="0px",e.style.width="100%",e.style.height="100%",e.style.zIndex=1020,document.body.appendChild(e)}}function D({key:e="tooltip",rtl:t}){return{show:!0,key:e,type:"tooltip",layout:{displayOrder:3},beforeMount(){q()},beforeUpdate(){q()},destroyed(){!function(){const e=document.querySelector(N);e&&e.parentElement&&e.childElementCount<1&&e.parentElement.removeChild(e)}()},settings:{appendTo:()=>document.querySelector(N),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:"QlikView Sans, sans-serif","empty-cells":"show"},cell:{"max-width":"180px","word-break":"break-word","word-wrap":"break-word","overflow-wrap":"break-word",hyphens:"auto"}}}}const R=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),I=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞יִײַ-ﬨשׁ-ﭏ]"),_=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),P={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),isLtrChar:e=>R.test(e),isRtlChar:e=>I.test(e)||_.test(e),detectTextDirection(e){const t=e?e.length:0;let n,r;for(n=0;n<t;n++){if(r=e[n],P.isLtrChar(r))return"ltr";if(P.isRtlChar(r))return"rtl"}return"ltr"}},L={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?L.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=P.detectTextDirection(e.title);return[{content:e.title,style:{"font-weight":"bold","text-align":t?"right":"left",direction:n},colspan:2},{}]},getDescriptionRow(e,t){const n=P.detectTextDirection(e.value);return[{content:e.value,style:{"text-align":t?"right":"left",direction:n},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:P.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=P.detectTextDirection(t.color.label),i=n?[":",t.color.label]:[t.color.label,":"],o=P.detectTextDirection(t.color.value);return[{content:i,style:{"text-align":n?"right":"left",direction:r}},{content:n?[t.color.value,L.getColorSymbol(e,t)]:[L.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=P.detectTextDirection(e.label),a=r?[":",e.label]:[e.label,":"],s=P.detectTextDirection(e.value);let l;return l=i?r?[e.value,L.getColorSymbol(t,n)]:[L.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 j(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function z(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function F(){}var B=.7,V=1/B,H="\\s*([+-]?\\d+)\\s*",$="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",U="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",W=/^#([0-9a-f]{3,8})$/,Y=new RegExp("^rgb\\("+[H,H,H]+"\\)$"),X=new RegExp("^rgb\\("+[U,U,U]+"\\)$"),G=new RegExp("^rgba\\("+[H,H,H,$]+"\\)$"),K=new RegExp("^rgba\\("+[U,U,U,$]+"\\)$"),J=new RegExp("^hsl\\("+[$,U,U]+"\\)$"),Z=new RegExp("^hsla\\("+[$,U,U,$]+"\\)$"),Q={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 ee(){return this.rgb().formatHex()}function te(){return this.rgb().formatRgb()}function ne(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=W.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?re(t):3===n?new se(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?ie(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?ie(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=Y.exec(e))?new se(t[1],t[2],t[3],1):(t=X.exec(e))?new se(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=G.exec(e))?ie(t[1],t[2],t[3],t[4]):(t=K.exec(e))?ie(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=J.exec(e))?de(t[1],t[2]/100,t[3]/100,1):(t=Z.exec(e))?de(t[1],t[2]/100,t[3]/100,t[4]):Q.hasOwnProperty(e)?re(Q[e]):"transparent"===e?new se(NaN,NaN,NaN,0):null}function re(e){return new se(e>>16&255,e>>8&255,255&e,1)}function ie(e,t,n,r){return r<=0&&(e=t=n=NaN),new se(e,t,n,r)}function oe(e){return e instanceof F||(e=ne(e)),e?new se((e=e.rgb()).r,e.g,e.b,e.opacity):new se}function ae(e,t,n,r){return 1===arguments.length?oe(e):new se(e,t,n,null==r?1:r)}function se(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function le(){return"#"+ce(this.r)+ce(this.g)+ce(this.b)}function ue(){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 ce(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function de(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new he(e,t,n,r)}function fe(e){if(e instanceof he)return new he(e.h,e.s,e.l,e.opacity);if(e instanceof F||(e=ne(e)),!e)return new he;if(e instanceof he)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 he(a,s,l,e.opacity)}function he(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function pe(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}j(F,ne,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:ee,formatHex:ee,formatHsl:function(){return fe(this).formatHsl()},formatRgb:te,toString:te}),j(se,ae,z(F,{brighter:function(e){return e=null==e?V:Math.pow(V,e),new se(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?B:Math.pow(B,e),new se(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:le,formatHex:le,formatRgb:ue,toString:ue})),j(he,(function(e,t,n,r){return 1===arguments.length?fe(e):new he(e,t,n,null==r?1:r)}),z(F,{brighter:function(e){return e=null==e?V:Math.pow(V,e),new he(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?B:Math.pow(B,e),new he(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 se(pe(e>=240?e-240:e+120,i,r),pe(e,i,r),pe(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 me=Math.PI/180,ye=180/Math.PI,ge=.96422,ve=.82521,be=4/29,xe=6/29,Me=3*xe*xe;function Se(e){if(e instanceof we)return new we(e.l,e.a,e.b,e.opacity);if(e instanceof Ne)return qe(e);e instanceof se||(e=oe(e));var t,n,r=Oe(e.r),i=Oe(e.g),o=Oe(e.b),a=Ee((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?t=n=a:(t=Ee((.4360747*r+.3850649*i+.1430804*o)/ge),n=Ee((.0139322*r+.0971045*i+.7141733*o)/ve)),new we(116*a-16,500*(t-a),200*(a-n),e.opacity)}function we(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function Ee(e){return e>.008856451679035631?Math.pow(e,1/3):e/Me+be}function ke(e){return e>xe?e*e*e:Me*(e-be)}function Ce(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Oe(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Te(e){if(e instanceof Ne)return new Ne(e.h,e.c,e.l,e.opacity);if(e instanceof we||(e=Se(e)),0===e.a&&0===e.b)return new Ne(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*ye;return new Ne(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function Ae(e,t,n,r){return 1===arguments.length?Te(e):new Ne(e,t,n,null==r?1:r)}function Ne(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function qe(e){if(isNaN(e.h))return new we(e.l,0,0,e.opacity);var t=e.h*me;return new we(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}j(we,(function(e,t,n,r){return 1===arguments.length?Se(e):new we(e,t,n,null==r?1:r)}),z(F,{brighter:function(e){return new we(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new we(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new se(Ce(3.1338561*(t=ge*ke(t))-1.6168667*(e=1*ke(e))-.4906146*(n=ve*ke(n))),Ce(-.9787684*t+1.9161415*e+.033454*n),Ce(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),j(Ne,Ae,z(F,{brighter:function(e){return new Ne(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new Ne(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return qe(this).rgb()}}));var De={isDark:function(e){return Ae(e).l<70}};function Re(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Ie(e){return 1===e.length&&(e=function(e){return function(t,n){return Re(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 _e=Ie(Re).right,Pe=Math.sqrt(50),Le=Math.sqrt(10),je=Math.sqrt(2);function ze(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>=Pe?10:o>=Le?5:o>=je?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=Pe?10:o>=Le?5:o>=je?2:1)}function Fe(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>=Pe?i*=10:o>=Le?i*=5:o>=je&&(i*=2),t<e?-i:i}function Be(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var Ve="$";function He(){}function $e(e,t){var n=new He;if(e instanceof He)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 Ue(){}He.prototype=$e.prototype={constructor:He,has:function(e){return Ve+e in this},get:function(e){return this[Ve+e]},set:function(e,t){return this[Ve+e]=t,this},remove:function(e){var t=Ve+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===Ve&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===Ve&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===Ve&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===Ve&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===Ve&&++e;return e},empty:function(){for(var e in this)if(e[0]===Ve)return!1;return!0},each:function(e){for(var t in this)t[0]===Ve&&e(this[t],t.slice(1),this)}};var We=$e.prototype;Ue.prototype={constructor:Ue,has:We.has,add:function(e){return this[Ve+(e+="")]=e,this},remove:We.remove,clear:We.clear,values:We.keys,size:We.size,empty:We.empty,each:We.each};var Ye=Array.prototype,Xe=Ye.map,Ge=Ye.slice;function Ke(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Je(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Ze(){}var Qe=.7,et=1/Qe,tt="\\s*([+-]?\\d+)\\s*",nt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",rt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",it=/^#([0-9a-f]{3})$/,ot=/^#([0-9a-f]{6})$/,at=new RegExp("^rgb\\("+[tt,tt,tt]+"\\)$"),st=new RegExp("^rgb\\("+[rt,rt,rt]+"\\)$"),lt=new RegExp("^rgba\\("+[tt,tt,tt,nt]+"\\)$"),ut=new RegExp("^rgba\\("+[rt,rt,rt,nt]+"\\)$"),ct=new RegExp("^hsl\\("+[nt,rt,rt]+"\\)$"),dt=new RegExp("^hsla\\("+[nt,rt,rt,nt]+"\\)$"),ft={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 ht(e){var t;return e=(e+"").trim().toLowerCase(),(t=it.exec(e))?new vt((t=parseInt(t[1],16))>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):(t=ot.exec(e))?pt(parseInt(t[1],16)):(t=at.exec(e))?new vt(t[1],t[2],t[3],1):(t=st.exec(e))?new vt(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=lt.exec(e))?mt(t[1],t[2],t[3],t[4]):(t=ut.exec(e))?mt(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=ct.exec(e))?xt(t[1],t[2]/100,t[3]/100,1):(t=dt.exec(e))?xt(t[1],t[2]/100,t[3]/100,t[4]):ft.hasOwnProperty(e)?pt(ft[e]):"transparent"===e?new vt(NaN,NaN,NaN,0):null}function pt(e){return new vt(e>>16&255,e>>8&255,255&e,1)}function mt(e,t,n,r){return r<=0&&(e=t=n=NaN),new vt(e,t,n,r)}function yt(e){return e instanceof Ze||(e=ht(e)),e?new vt((e=e.rgb()).r,e.g,e.b,e.opacity):new vt}function gt(e,t,n,r){return 1===arguments.length?yt(e):new vt(e,t,n,null==r?1:r)}function vt(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function bt(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function xt(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new St(e,t,n,r)}function Mt(e){if(e instanceof St)return new St(e.h,e.s,e.l,e.opacity);if(e instanceof Ze||(e=ht(e)),!e)return new St;if(e instanceof St)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 St(a,s,l,e.opacity)}function St(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function wt(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Ke(Ze,ht,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),Ke(vt,gt,Je(Ze,{brighter:function(e){return e=null==e?et:Math.pow(et,e),new vt(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?Qe:Math.pow(Qe,e),new vt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},hex:function(){return"#"+bt(this.r)+bt(this.g)+bt(this.b)},toString:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}})),Ke(St,(function(e,t,n,r){return 1===arguments.length?Mt(e):new St(e,t,n,null==r?1:r)}),Je(Ze,{brighter:function(e){return e=null==e?et:Math.pow(et,e),new St(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?Qe:Math.pow(Qe,e),new St(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 vt(wt(e>=240?e-240:e+120,i,r),wt(e,i,r),wt(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var Et=Math.PI/180,kt=180/Math.PI,Ct=.96422,Ot=.82521,Tt=4/29,At=6/29,Nt=3*At*At;function qt(e){if(e instanceof Dt)return new Dt(e.l,e.a,e.b,e.opacity);if(e instanceof jt){if(isNaN(e.h))return new Dt(e.l,0,0,e.opacity);var t=e.h*Et;return new Dt(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}e instanceof vt||(e=yt(e));var n,r,i=Pt(e.r),o=Pt(e.g),a=Pt(e.b),s=Rt((.2225045*i+.7168786*o+.0606169*a)/1);return i===o&&o===a?n=r=s:(n=Rt((.4360747*i+.3850649*o+.1430804*a)/Ct),r=Rt((.0139322*i+.0971045*o+.7141733*a)/Ot)),new Dt(116*s-16,500*(n-s),200*(s-r),e.opacity)}function Dt(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function Rt(e){return e>.008856451679035631?Math.pow(e,1/3):e/Nt+Tt}function It(e){return e>At?e*e*e:Nt*(e-Tt)}function _t(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Pt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Lt(e){if(e instanceof jt)return new jt(e.h,e.c,e.l,e.opacity);if(e instanceof Dt||(e=qt(e)),0===e.a&&0===e.b)return new jt(NaN,0,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*kt;return new jt(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function jt(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}Ke(Dt,(function(e,t,n,r){return 1===arguments.length?qt(e):new Dt(e,t,n,null==r?1:r)}),Je(Ze,{brighter:function(e){return new Dt(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new Dt(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new vt(_t(3.1338561*(t=Ct*It(t))-1.6168667*(e=1*It(e))-.4906146*(n=Ot*It(n))),_t(-.9787684*t+1.9161415*e+.033454*n),_t(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),Ke(jt,(function(e,t,n,r){return 1===arguments.length?Lt(e):new jt(e,t,n,null==r?1:r)}),Je(Ze,{brighter:function(e){return new jt(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new jt(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return qt(this).rgb()}}));var zt=-.14861,Ft=1.78277,Bt=-.29227,Vt=-.90649,Ht=1.97294,$t=Ht*Vt,Ut=Ht*Ft,Wt=Ft*Bt-Vt*zt;function Yt(e){if(e instanceof Xt)return new Xt(e.h,e.s,e.l,e.opacity);e instanceof vt||(e=yt(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(Wt*r+$t*t-Ut*n)/(Wt+$t-Ut),o=r-i,a=(Ht*(n-i)-Bt*o)/Vt,s=Math.sqrt(a*a+o*o)/(Ht*i*(1-i)),l=s?Math.atan2(a,o)*kt-120:NaN;return new Xt(l<0?l+360:l,s,i,e.opacity)}function Xt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Gt(e){return function(){return e}}function Kt(e){return 1==(e=+e)?Jt: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):Gt(isNaN(t)?n:t)}}function Jt(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Gt(isNaN(e)?t:e)}Ke(Xt,(function(e,t,n,r){return 1===arguments.length?Yt(e):new Xt(e,t,n,null==r?1:r)}),Je(Ze,{brighter:function(e){return e=null==e?et:Math.pow(et,e),new Xt(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?Qe:Math.pow(Qe,e),new Xt(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*Et,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new vt(255*(t+n*(zt*r+Ft*i)),255*(t+n*(Bt*r+Vt*i)),255*(t+n*(Ht*r)),this.opacity)}}));var Zt=function e(t){var n=Kt(t);function r(e,t){var r=n((e=gt(e)).r,(t=gt(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=Jt(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 Qt(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]=sn(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 en(e,t){var n=new Date;return t-=e=+e,function(r){return n.setTime(e+t*r),n}}function tn(e,t){return t-=e=+e,function(n){return e+t*n}}function nn(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]=sn(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}var rn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,on=new RegExp(rn.source,"g");function an(e,t){var n,r,i,o=rn.lastIndex=on.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=rn.exec(e))&&(r=on.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:tn(n,r)})),o=on.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 sn(e,t){var n,r=typeof t;return null==t||"boolean"===r?Gt(t):("number"===r?tn:"string"===r?(n=ht(t))?(t=n,Zt):an:t instanceof ht?Zt:t instanceof Date?en:Array.isArray(t)?Qt:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?nn:tn)(e,t)}function ln(e,t){return t-=e=+e,function(n){return Math.round(e+t*n)}}function un(e){return+e}var cn=[0,1];function dn(e){return e}function fn(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function hn(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 pn(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=fn(i,r),o=n(a,o)):(r=fn(r,i),o=n(o,a)),function(e){return o(r(e))}}function mn(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]=fn(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(t){var n=_e(e,t,1,r)-1;return o[n](i[n](t))}}function yn(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function gn(e,t){return function(){var e,t,n,r,i,o,a=cn,s=cn,l=sn,u=dn;function c(){return r=Math.min(a.length,s.length)>2?mn:pn,i=o=null,d}function d(t){return isNaN(t=+t)?n:(i||(i=r(a.map(e),s,l)))(e(u(t)))}return d.invert=function(n){return u(t((o||(o=r(s,a.map(e),tn)))(n)))},d.domain=function(e){return arguments.length?(a=Xe.call(e,un),u===dn||(u=hn(a)),c()):a.slice()},d.range=function(e){return arguments.length?(s=Ge.call(e),c()):s.slice()},d.rangeRound=function(e){return s=Ge.call(e),l=ln,c()},d.clamp=function(e){return arguments.length?(u=e?hn(a):dn,d):u!==dn},d.interpolate=function(e){return arguments.length?(l=e,c()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,c()}}()(e,t)}function vn(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 bn(e){return(e=vn(Math.abs(e)))?e[1]:NaN}var xn,Mn=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Sn(e){return new wn(e)}function wn(e){if(!(t=Mn.exec(e)))throw new Error("invalid format: "+e);var t;this.fill=t[1]||" ",this.align=t[2]||">",this.sign=t[3]||"-",this.symbol=t[4]||"",this.zero=!!t[5],this.width=t[6]&&+t[6],this.comma=!!t[7],this.precision=t[8]&&+t[8].slice(1),this.trim=!!t[9],this.type=t[10]||""}function En(e,t){var n=vn(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")}Sn.prototype=wn.prototype,wn.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var kn={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.round(e).toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return En(100*e,t)},r:En,s:function(e,t){var n=vn(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(xn=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")+vn(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 Cn(e){return e}var On,Tn,An,Nn=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function qn(e){var t,n,r=e.grouping&&e.thousands?(t=e.grouping,n=e.thousands,function(e,r){for(var i=e.length,o=[],a=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(e.substring(i-=s,i+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(n)}):Cn,i=e.currency,o=e.decimal,a=e.numerals?function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(e.numerals):Cn,s=e.percent||"%";function l(e){var t=(e=Sn(e)).fill,n=e.align,l=e.sign,u=e.symbol,c=e.zero,d=e.width,f=e.comma,h=e.precision,p=e.trim,m=e.type;"n"===m?(f=!0,m="g"):kn[m]||(null==h&&(h=12),p=!0,m="g"),(c||"0"===t&&"="===n)&&(c=!0,t="0",n="=");var y="$"===u?i[0]:"#"===u&&/[boxX]/.test(m)?"0"+m.toLowerCase():"",g="$"===u?i[1]:/[%p]/.test(m)?s:"",v=kn[m],b=/[defgprs%]/.test(m);function x(e){var i,s,u,x=y,M=g;if("c"===m)M=v(e)+M,e="";else{var S=(e=+e)<0;if(e=v(Math.abs(e),h),p&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r<n;++r)switch(e[r]){case".":i=t=r;break;case"0":0===i&&(i=r),t=r;break;default:if(i>0){if(!+e[r])break e;i=0}}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),S&&0==+e&&(S=!1),x=(S?"("===l?l:"-":"-"===l||"("===l?"":l)+x,M=("s"===m?Nn[8+xn/3]:"")+M+(S&&"("===l?")":""),b)for(i=-1,s=e.length;++i<s;)if(48>(u=e.charCodeAt(i))||u>57){M=(46===u?o+e.slice(i+1):e.slice(i))+M,e=e.slice(0,i);break}}f&&!c&&(e=r(e,1/0));var w=x.length+e.length+M.length,E=w<d?new Array(d-w+1).join(t):"";switch(f&&c&&(e=r(E+e,E.length?d-M.length:1/0),E=""),n){case"<":e=x+e+M+E;break;case"=":e=x+E+e+M;break;case"^":e=E.slice(0,w=E.length>>1)+x+e+M+E.slice(w);break;default:e=E+x+e+M}return a(e)}return h=null==h?6:/[gprs]/.test(m)?Math.max(1,Math.min(21,h)):Math.max(0,Math.min(20,h)),x.toString=function(){return e+""},x}return{format:l,formatPrefix:function(e,t){var n=l(((e=Sn(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(bn(t)/3))),i=Math.pow(10,-r),o=Nn[8+r/3];return function(e){return n(i*e)+o}}}}function Dn(e,t,n,r){var i,o=Fe(e,t,n);switch((r=Sn(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(bn(t)/3)))-bn(Math.abs(e)))}(o,a))||(r.precision=i),An(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,bn(t)-bn(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,-bn(Math.abs(e)))}(o))||(r.precision=i-2*("%"===r.type))}return Tn(r)}function Rn(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=ze(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 Dn(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=ze(s,l,n))>0?r=ze(s=Math.floor(s/r)*r,l=Math.ceil(l/r)*r,n):r<0&&(r=ze(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 In(){var e=gn(dn,dn);return e.copy=function(){return yn(e,In())},Be.apply(e,arguments),Rn(e)}!function(e){On=qn(e),Tn=On.format,An=On.formatPrefix}({decimal:".",thousands:",",grouping:[3],currency:["$",""]});var _n=new Date,Pn=new Date;function Ln(e,t,n,r){function i(t){return e(t=new Date(+t)),t}return i.floor=i,i.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},i.round=function(e){var t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},i.range=function(n,r,o){var a,s=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return s;do{s.push(a=new Date(+n)),t(n,o),e(n)}while(a<n&&n<r);return s},i.filter=function(n){return Ln((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 _n.setTime(+t),Pn.setTime(+r),e(_n),e(Pn),Math.floor(n(_n,Pn))},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 jn=Ln((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));jn.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?Ln((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):jn:null};var zn=1e3,Fn=6e4,Bn=36e5,Vn=864e5,Hn=6048e5,$n=Ln((function(e){e.setTime(Math.floor(e/zn)*zn)}),(function(e,t){e.setTime(+e+t*zn)}),(function(e,t){return(t-e)/zn}),(function(e){return e.getUTCSeconds()}));Ln((function(e){e.setTime(Math.floor(e/Fn)*Fn)}),(function(e,t){e.setTime(+e+t*Fn)}),(function(e,t){return(t-e)/Fn}),(function(e){return e.getMinutes()})),Ln((function(e){var t=e.getTimezoneOffset()*Fn%Bn;t<0&&(t+=Bn),e.setTime(Math.floor((+e-t)/Bn)*Bn+t)}),(function(e,t){e.setTime(+e+t*Bn)}),(function(e,t){return(t-e)/Bn}),(function(e){return e.getHours()}));var Un=Ln((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())*Fn)/Vn}),(function(e){return e.getDate()-1}));function Wn(e){return Ln((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())*Fn)/Hn}))}var Yn=Wn(0),Xn=Wn(1);Wn(2),Wn(3);var Gn=Wn(4);Wn(5),Wn(6),Ln((function(e){e.setDate(1),e.setHours(0,0,0,0)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()}));var Kn=Ln((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()}));Kn.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Ln((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n*e)})):null};var Jn=Ln((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+t*Fn)}),(function(e,t){return(t-e)/Fn}),(function(e){return e.getUTCMinutes()})),Zn=Ln((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+t*Bn)}),(function(e,t){return(t-e)/Bn}),(function(e){return e.getUTCHours()})),Qn=Ln((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/Vn}),(function(e){return e.getUTCDate()-1}));function er(e){return Ln((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)/Hn}))}var tr=er(0),nr=er(1);er(2),er(3);var rr=er(4);er(5),er(6);var ir=Ln((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()})),or=Ln((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 ar(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 sr(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 lr(e){return{y:e,m:0,d:1,H:0,M:0,S:0,L:0}}or.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Ln((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null};var ur,cr,dr,fr={"-":"",_:" ",0:"0"},hr=/^\s*\d+/,pr=/^%/,mr=/[\\^$*+?|[\]().{}]/g;function yr(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 gr(e){return e.replace(mr,"\\$&")}function vr(e){return new RegExp("^(?:"+e.map(gr).join("|")+")","i")}function br(e){for(var t={},n=-1,r=e.length;++n<r;)t[e[n].toLowerCase()]=n;return t}function xr(e,t,n){var r=hr.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Mr(e,t,n){var r=hr.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Sr(e,t,n){var r=hr.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function wr(e,t,n){var r=hr.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Er(e,t,n){var r=hr.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function kr(e,t,n){var r=hr.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Cr(e,t,n){var r=hr.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Or(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 Tr(e,t,n){var r=hr.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Ar(e,t,n){var r=hr.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Nr(e,t,n){var r=hr.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function qr(e,t,n){var r=hr.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Dr(e,t,n){var r=hr.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Rr(e,t,n){var r=hr.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Ir(e,t,n){var r=hr.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function _r(e,t,n){var r=hr.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Pr(e,t,n){var r=pr.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Lr(e,t,n){var r=hr.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function jr(e,t,n){var r=hr.exec(t.slice(n));return r?(e.Q=1e3*+r[0],n+r[0].length):-1}function zr(e,t){return yr(e.getDate(),t,2)}function Fr(e,t){return yr(e.getHours(),t,2)}function Br(e,t){return yr(e.getHours()%12||12,t,2)}function Vr(e,t){return yr(1+Un.count(Kn(e),e),t,3)}function Hr(e,t){return yr(e.getMilliseconds(),t,3)}function $r(e,t){return Hr(e,t)+"000"}function Ur(e,t){return yr(e.getMonth()+1,t,2)}function Wr(e,t){return yr(e.getMinutes(),t,2)}function Yr(e,t){return yr(e.getSeconds(),t,2)}function Xr(e){var t=e.getDay();return 0===t?7:t}function Gr(e,t){return yr(Yn.count(Kn(e),e),t,2)}function Kr(e,t){var n=e.getDay();return e=n>=4||0===n?Gn(e):Gn.ceil(e),yr(Gn.count(Kn(e),e)+(4===Kn(e).getDay()),t,2)}function Jr(e){return e.getDay()}function Zr(e,t){return yr(Xn.count(Kn(e),e),t,2)}function Qr(e,t){return yr(e.getFullYear()%100,t,2)}function ei(e,t){return yr(e.getFullYear()%1e4,t,4)}function ti(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+yr(t/60|0,"0",2)+yr(t%60,"0",2)}function ni(e,t){return yr(e.getUTCDate(),t,2)}function ri(e,t){return yr(e.getUTCHours(),t,2)}function ii(e,t){return yr(e.getUTCHours()%12||12,t,2)}function oi(e,t){return yr(1+Qn.count(or(e),e),t,3)}function ai(e,t){return yr(e.getUTCMilliseconds(),t,3)}function si(e,t){return ai(e,t)+"000"}function li(e,t){return yr(e.getUTCMonth()+1,t,2)}function ui(e,t){return yr(e.getUTCMinutes(),t,2)}function ci(e,t){return yr(e.getUTCSeconds(),t,2)}function di(e){var t=e.getUTCDay();return 0===t?7:t}function fi(e,t){return yr(tr.count(or(e),e),t,2)}function hi(e,t){var n=e.getUTCDay();return e=n>=4||0===n?rr(e):rr.ceil(e),yr(rr.count(or(e),e)+(4===or(e).getUTCDay()),t,2)}function pi(e){return e.getUTCDay()}function mi(e,t){return yr(nr.count(or(e),e),t,2)}function yi(e,t){return yr(e.getUTCFullYear()%100,t,2)}function gi(e,t){return yr(e.getUTCFullYear()%1e4,t,4)}function vi(){return"+0000"}function bi(){return"%"}function xi(e){return+e}function Mi(e){return Math.floor(+e/1e3)}!function(e){ur=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,u=vr(i),c=br(i),d=vr(o),f=br(o),h=vr(a),p=br(a),m=vr(s),y=br(s),g=vr(l),v=br(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:zr,e:zr,f:$r,H:Fr,I:Br,j:Vr,L:Hr,m:Ur,M:Wr,p:function(e){return i[+(e.getHours()>=12)]},Q:xi,s:Mi,S:Yr,u:Xr,U:Gr,V:Kr,w:Jr,W:Zr,x:null,X:null,y:Qr,Y:ei,Z:ti,"%":bi},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:ni,e:ni,f:si,H:ri,I:ii,j:oi,L:ai,m:li,M:ui,p:function(e){return i[+(e.getUTCHours()>=12)]},Q:xi,s:Mi,S:ci,u:di,U:fi,V:hi,w:pi,W:mi,x:null,X:null,y:yi,Y:gi,Z:vi,"%":bi},M={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=g.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=y[r[0].toLowerCase()],n+r[0].length):-1},c:function(e,n,r){return E(e,t,n,r)},d:Ar,e:Ar,f:_r,H:qr,I:qr,j:Nr,L:Ir,m:Tr,M:Dr,p:function(e,t,n){var r=u.exec(t.slice(n));return r?(e.p=c[r[0].toLowerCase()],n+r[0].length):-1},Q:Lr,s:jr,S:Rr,u:Mr,U:Sr,V:wr,w:xr,W:Er,x:function(e,t,r){return E(e,n,t,r)},X:function(e,t,n){return E(e,r,t,n)},y:Cr,Y:kr,Z:Or,"%":Pr};function S(e,t){return function(n){var r,i,o,a=[],s=-1,l=0,u=e.length;for(n instanceof Date||(n=new Date(+n));++s<u;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(i=fr[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 w(e,t){return function(n){var r,i,o=lr(1900);if(E(o,e,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("p"in o&&(o.H=o.H%12+12*o.p),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=sr(lr(o.y))).getUTCDay(),r=i>4||0===i?nr.ceil(r):nr(r),r=Qn.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=t(lr(o.y))).getDay(),r=i>4||0===i?Xn.ceil(r):Xn(r),r=Un.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?sr(lr(o.y)).getUTCDay():t(lr(o.y)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,sr(o)):t(o)}}function E(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=M[i in fr?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=S(n,b),b.X=S(r,b),b.c=S(t,b),x.x=S(n,x),x.X=S(r,x),x.c=S(t,x),{format:function(e){var t=S(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=w(e+="",ar);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=w(e,sr);return t.toString=function(){return e},t}}}(e),cr=ur.utcFormat,dr=ur.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 Si="%Y-%m-%dT%H:%M:%S.%LZ";Date.prototype.toISOString||cr(Si),+new Date("2000-01-01T00:00:00.000Z")||dr(Si);var wi=1e3,Ei=6e4,ki=36e5,Ci=864e5,Oi=2592e6,Ti=31536e6;function Ai(e){return new Date(e)}function Ni(e){return e instanceof Date?+e:+new Date(+e)}function qi(e,t,n,r,i,o,a,s,l){var u=gn(dn,dn),c=u.invert,d=u.domain,f=l(".%L"),h=l(":%S"),p=l("%I:%M"),m=l("%I %p"),y=l("%a %d"),g=l("%b %d"),v=l("%B"),b=l("%Y"),x=[[a,1,wi],[a,5,5e3],[a,15,15e3],[a,30,3e4],[o,1,Ei],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,ki],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,Ci],[r,2,1728e5],[n,1,6048e5],[t,1,Oi],[t,3,7776e6],[e,1,Ti]];function M(s){return(a(s)<s?f:o(s)<s?h:i(s)<s?p:r(s)<s?m:t(s)<s?n(s)<s?y:g:e(s)<s?v:b)(s)}function S(t,n,r,i){if(null==t&&(t=10),"number"==typeof t){var o=Math.abs(r-n)/t,a=Ie((function(e){return e[2]})).right(x,o);a===x.length?(i=Fe(n/Ti,r/Ti,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(Fe(n,r,t),1),t=s)}return null==i?t:t.every(i)}return u.invert=function(e){return new Date(c(e))},u.domain=function(e){return arguments.length?d(Xe.call(e,Ni)):d().map(Ai)},u.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=S(e,i,o,t))?n.range(i,o+1):[],a?n.reverse():n},u.tickFormat=function(e,t){return null==t?M:l(t)},u.nice=function(e,t){var n=d();return(e=S(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)):u},u.copy=function(){return yn(u,qi(e,t,n,r,i,o,a,s,l))},u}const Di={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"}}},Ri=e=>e+" 12px -12px inset rgba(0, 0, 0, 0.0625)";var Ii={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=Di[e];return{base:{position:"absolute",[t.major]:12,[t.minor]:"100%"},towardsStart:{[t.start]:0,[t.end]:"auto",boxShadow:Ri(t.shadow.startOffset)},towardsEnd:{[t.start]:"auto",[t.end]:0,boxShadow:Ri(t.shadow.endOffset)}}})(n),u="horizontal"===n&&r,c=[];return a||c.push(e("div",{style:{...l.base,...u?l.towardsEnd:l.towardsStart},class:"scroll-hint--towards-start"})),s||c.push(e("div",{style:{...l.base,...u?l.towardsStart:l.towardsEnd},class:"scroll-hint--towards-end"})),c}};function _i({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 Pi;function Li(){Pi=Pi||document.createElement("canvas").getContext("2d")}const ji={measureTextWidth(e){Li();const{width:t}=Pi.measureText(e);return t},lineWrap(e,t,n,r){let i,o;Li();const a=e?e.split(/\n+|\r+|\r\n/):[],s=[];let l,u,c,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&&(Pi.font=n),o=0;o<a.length;o++){for(d=a[o]||"",f=d.split(/\s+/),[h]=f,c="",i=1;i<f.length;i++)if(l=`${h} ${f[i]}`,u=ji.measureTextWidth(l),u>t&&("number"!=typeof r||r>s.length)?(s.push(h),h=f[i]):h=l,"number"==typeof r&&s.length>=r){c=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} ${c}`}return s},wordWrap(e,t,n,r,i){if(Li(),!e||!e.length)return[];n&&(Pi.font=n);let o=[];const a=e.slice();let s,l,u,c;if(a.filter((e=>!!e)),"number"!=typeof t||t<0)return e.slice();for(c=0;c<a.length;c++)u=a[c],l=null,u&&(u.length<=1||ji.measureTextWidth(u)<=t?o.push(u):(s=ji.splitWord(u,t,void 0,r-o.length),s.length<=1?o.push(s[0]):(l=s.pop(),o=o.concat(s),a[c+1]?ji.measureTextWidth(`${l} ${a[c+1]}`)>t&&o.length+a.length-c<=r?a.splice(c+1,0,l):a[c+1]=`${l} ${a[c+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]=ji.truncate(o[o.length-1],t,n,i).text):(u=o[o.length-1],u&&u.length>1&&ji.measureTextWidth(u)>t&&(o[o.length-1]=ji.truncate(u,t,n,i).text)),o},truncate(e,t,n,r="…"){Li();let i,o,a,s,l=e;const u=ji.measureTextWidth("i"),c=Math.ceil(t/u);if(n&&(Pi.font=n),e&&t){if(ji.measureTextWidth(l)>t){for(i=Math.min(c,l.length);i>0;i--)if(o=l.substring(0,i-1),a=o.trim()+r,ji.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;Li();let o,a=e,s="",l=[];if(ji.isNumber(n)&&n<=1)return[e];const u=Math.ceil(t/r);for(i=Math.min(e.length,u);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),!(ji.measureTextWidth(a)<=t));i--);return(!i&&!a||ji.measureTextWidth(a)>t)&&(a=e.substring(0,1),s=e.substring(1)),l.push(a),s?(ji.measureTextWidth(s)>t?(s=ji.explodeWord(s,t,n-1,r),l=l.concat(s)):l.push(s),l.filter((e=>""!==e.trim()))):l},splitWord:(e,t,n,r)=>(Li(),e&&t?(n&&(Pi.font=n),ji.explodeWord(e,t,r,Math.max(1,ji.measureTextWidth("i")))):[]),wrapText(e,t,n,r,i){let o;return Number.isNaN(t)?[e]:(o=r>1?ji.lineWrap(e,t,n,r):[e],o=ji.wordWrap(o,t,n,r,i),o)},getFontHeight:e=>(Li(),e&&(Pi.font=e),1.5*ji.measureTextWidth("m")),tokenize(e,t,n,r,i,o,a=1){Li(),t&&(Pi.font=t);const s=ji.getFontHeight(),l=a*s;let u=[],c=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=>{c+=Number.isNaN(e)||e<=0?0:e})),r.forEach((e=>{u.push(Number.isNaN(e)||e<=0?f-c:e)}))):u=[Number.isNaN(r)||r<=0?f:Math.min(f,r)],Array.isArray(e)?e.forEach(((e,n)=>{d.length<f&&(d=d.concat(ji.wrapText(e,i,t,u[n])))})):d=ji.wrapText(e,i,t,u[0],n),d}},zi={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",u=r,c=i,f=t<.5?90:-90;return o&&(s="y",l="x",u=i,c=r,f=t<.5?180:0),a(d({},e,{[s]:n*u,[l]:Math.max(e.size/2,Math.min(t*c,c-e.size/2)),startAngle:f}))}},Fi=d.bind(null,!0),Bi={},{isArray:Vi}=Array;function Hi(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function $i(e){return void 0===e}function Ui(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function Wi(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]=$i(e[r||t])?o:e[t],e=e[r||t]})),e}function Yi(e,t){let n=!0;if(Hi(e)&&Hi(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((r=>{Yi(e[r],t[r])||(n=!1)})),n);if(Vi(e)&&Vi(t)){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n+=1)if(!Yi(e[n],t[n]))return!1;return!0}return e===t}Bi.generate=function(e,t,n){n=n||"";let r=[];return Object.keys(t).forEach((i=>{const o=function(e){return e?Fi({},{val:e}).val:e}(t[i]),a=e[i],s=`${n}/${i}`;Yi(o,a)||Ui(t,i)||($i(a)?r.push({op:"add",path:s,value:o}):Hi(o)&&Hi(a)?r=r.concat(Bi.generate(a,o,s)):Vi(o)&&Vi(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]&&$i(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(Yi(t,i))return r;if(!$i(t[0])&&$i(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(Bi.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=>{$i(t[i])&&!Ui(e,i)&&r.push({op:"remove",path:`${n}/${i}`})})),r},Bi.apply=function(e,t){t.forEach((t=>{let n=Wi(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(Vi(n))"-"===r&&(r=n.length),n.splice(+r,"add"===t.op?0:1,t.value);else if(Vi(i)&&Vi(t.value)){const e=t.value.slice();i.length=0,i.push(...e)}else if(Hi(i)&&Hi(t.value))a=i,Object.keys(a).forEach((e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!Ui(a,e)&&delete a[e]})),Fi(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=Wi(e,t.from);Vi(n)?n.splice(+r,0,i.splice(+o,1)[0]):(n[r]=i[o],delete i[o])}else"remove"===t.op&&(Vi(n)?n.splice(+r,1):delete n[r]);var a}))},Bi.clone=function(e){return Fi({},e)},Bi.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},Bi.updateObject=function(e,t){Object.keys(e).length?Bi.apply(e,Bi.generate(e,t)):Fi(e,t)};const Xi=[[2,4,6],[2,4],[3]],Gi=[,[,,[[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 Ki(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 Ji(e,t,n){let r;const i=e?e.length:0;for(r=0;r<i;r++)Ki(e[r],t,n)}!function(){let e,t;for(Ji(Xi,1,10),e=0;e<Gi.length;e++)if(Gi[e])for(t=0;t<Gi[e].length;t++)Array.isArray(Gi[e][t])&&Ji(Gi[e][t])}();const Zi={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=Zi.findSegmentPositionMeetMin(e,t);return Zi.findSegmentPositionMeetMax({center:r,max:r+e.radius},n)},findSegmentPositionMeetMaxThenMin(e,t,n){const r=Zi.findSegmentPositionMeetMax(e,n);return Zi.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=Zi.findSegmentPositionMeetMaxThenMin(o,s,(o.center+a.center-r)/2),s=o.position+o.radius+r/2;a.position=Zi.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 u,c=0;for(o=i;o>0&&(a=e[o],s=e[o-1],u=Math.max(0,Zi.getGap(s,a)-r),u-=Math.max(0,c+u-l),c+=u,a.move=u,!(c>=l));o--);for(c<l&&(u=Math.max(0,s.position-s.radius-t),u-=Math.max(0,c+u-l),c+=u,s.move=u),c=0,o=0;o<=i;o++)a=e[o],c+=a.move||0,a.move=c,a.position-=c},layout(e,t,n,r=0){const i=e.length-1;if(!(i<0))if(0!==i)Zi.layoutPositionFromMin(e,t,n,r),Zi.adjustPositionFromMax(e,t,n,r);else{const r=e[0];r.position=Zi.findSegmentPositionMeetMaxThenMin(r,t,n)}}},Qi=(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},eo=e=>!1!==e.show&&0!==e.show&&"0"!==e.show,to=e=>e.filter(eo),no=(e,t)=>to(M(e,t,[])),ro=e=>eo(e)&&(!1!==e.showValue||!1!==e.showLabel),io=e=>e.filter(ro),oo=(e,t)=>io(M(e,t,[])),ao=({refLineLayout:e,layoutService:t})=>t.meta.canBeContinuous?e.refLineExpr.value:e.refLineExpr.stringValue,so=(e,t,n)=>{const{dimensionRefLineInfo:r}=t;if(r[e])return r[e][n]},lo=({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},co=({value:e,qMin:t})=>"NaN"!==t&&e<t,fo=({value:e,qMax:t})=>"NaN"!==t&&e>t,ho={isRefLineVisible:eo,getVisibleRefLines:to,getRefLines:no,getMeasureRefLines:e=>no(e,"refLine.refLines"),getDimensionRefLines:(e,t)=>t?[]:no(e,"refLine.dimRefLines"),isRefLineLabelVisible:ro,getVisibleRefLineLabels:io,getRefLineLabels:oo,getMeasureRefLineLabels:e=>oo(e,"refLine.refLines"),getDimensionRefLineLabels:(e,t)=>t?[]:oo(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=Qi(s,i,o,a.meta.measureCount),s([n,0])+l;if(a.meta.isGroupedByDimension){if(!r)return NaN;const{innerValues:e,numInnerValues:t,minOrder:a}=r;let u;return l=Qi(s,i,o,t),e&&e.length&&(u=(({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===u?s(n):u)+l}return l=Qi(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=M(e,"qHyperCube"),s="K"===a.qMode,l=n?n.query.getCurrentDataPage():M(a,"S"===a.qMode?"qDataPages.0":"qStackedDataPages.0",[]);const u=M(l,s?"qData.0.qSubNodes":"qMatrix",[]),c=((e,t)=>e?t?"qValue":"qNum":"qText")(t,s),d=(e=>e.qArea.qTop)(l);return s?(()=>{for(let e=0;e<u.length;e++){const t=u[e],n=e+d,r=t[c];o[r]||(o[r]={id:t.qElemNo,qText:t.qText,minOrder:n,maxOrder:n})}})():i?(()=>{let e;for(let t=0;t<u.length;t++){const n=u[t][0],r=u[t][1],i=t+d,a=n[c];o[a]?(o[a].minOrder=Math.min(o[a].minOrder,i),o[a].maxOrder=Math.max(o[a].maxOrder,i),o[a].innerValues[o[a].innerValues.length]={id:r.qElemNumber,order:i}):o[a]={id:n.qElemNumber,qText:n.qText,minOrder:i,maxOrder:i,innerValues:[{id:r.qElemNumber,order:i}]},0===t?0===i&&(o[a].isMinOrderOk=!0):a!==e&&(o[a].isMinOrderOk=!0,o[e].isMaxOrderOk=!0),e=a}})():(()=>{for(let e=0;e<u.length;e++){const t=u[e][0],n=e+d,r=t[c];o[r]||(o[r]={id:t.qElemNumber,qText:t.qText,minOrder:n,maxOrder:n})}})(),o},getInputValue:ao,extractInfoFromInputValue:so,resolveValue:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const r=ao({refLineLayout:e,layoutService:n});return so(r,t,"id")},isDiscreteMinOutOfBounds:lo,isDiscreteMaxOutOfBounds:uo,isContinuousMinOutOfBounds:co,isContinuousMaxOutOfBounds:fo,isOutOfRange:({value:e,qMin:t,qMax:n})=>co({value:e,qMin:t})||fo({value:e,qMax:n}),isOutOfDataPages:({label:e,dataPages:t})=>e.valueInfo.isMinOrderOk&&uo({label:e,dataPages:t})||e.valueInfo.isMaxOrderOk&&lo({label:e,dataPages:t}),getInvert:({orientation:e,rtl:t,isContinuous:n})=>"horizontal"===e?t:n};function po(e,t,n=70){for(let r=0;r<e.length;r++){const i=e[r];i.lines=ji.tokenize(i.title,t,"… "+i.valueString,3,n),i.maxNumLines=i.lines.length}}function mo({title:e,font:t,ellipsis:n,maxNumLines:r=5,maxWidth:i=200}){const o=ji.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 yo({oobs:e,font:t,ellipsis:n,maxNumLines:r=5,maxWidth:i=200}){const o=e.map((e=>mo({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 go(e,t="value"){e.sort(((e,n)=>e[t]-n[t]))}const vo=3,bo=2;function xo({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 Mo=({label:e,dataPages:t,qMin:n,qMax:r})=>{if(void 0!==n&&void 0!==r){const{inputValue:t}=e;if(ho.isContinuousMaxOutOfBounds({value:t,qMax:r}))return 1;if(ho.isContinuousMinOutOfBounds({value:t,qMin:n}))return-1}return ho.isDiscreteMaxOutOfBounds({label:e,dataPages:t})?1:ho.isDiscreteMinOutOfBounds({label:e,dataPages:t})?-1:0},So={hasEngineFormat:xo,calculateLabelPositions({labels:e,scale:t,size:n,layoutService:r,orientation:i,rtl:o,isContinuous:a,isDimension:s}){const l=ho.getInvert({orientation:i,rtl:o,isContinuous:a}),u="S"===r.getHyperCubeValue("qMode")?"qDataPages.0":"qStackedDataPages.0",c=r.getHyperCubeValue(u),{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:u,valueInfo:d}=o,p=Mo({label:o,dataPages:c,qMin:f,qMax:h});o.scaledValue=1===p?l?-.1:1.1:-1===p?l?1.1:-.1:ho.getScaledPosition({scale:t,size:n,value:s,valueInfo:d,align:u,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=xo({inputValue:s,inputValueLabel:l,localeInfo:i})?l:t?t(a):a,r.valueString=`${P.lrm}(${o})${P.lrm}`,r.title=So.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=xo({inputValue:a,inputValueLabel:s,localeInfo:i})?s:r,n.valueString=`${P.lrm}(${o})${P.lrm}`,n.title=So.getTitle(n)}else for(let t=0;t<e.length;t++){const n=e[t];o=n.valueText,n.valueString=`${P.lrm}(${o})${P.lrm}`,n.title=So.getTitle(n)}},measureLabelsWidth(e,t){for(let n=0;n<e.length;n++){const r=e[n];r.totalWidth=t(r.title).width}},measureLabelMaxLineWidth:(e,t)=>Math.max(...e.lines.map((e=>t(e).width))),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=So.getTotalNumLines(e)-r;if(t<=0)return;So.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,So.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,font:a,maxLabelWidth:s,lineHeight:l,majorDimension:u,orientation:c,measureText:d,rtl:f,layoutService:h,isContinuous:p,isDimension:m}){const y=e.map((e=>e)),g=n;So.calculateLabelPositions({labels:e,scale:t,size:g,layoutService:h,orientation:c,rtl:f,isContinuous:p,isDimension:m}),go(e,"center"),So.addLabelsNeighborInfo(e,r,i,o),po(e,a,s),So.reduceTotalMaxNumLines(y,l,i-(y.length-1)*o),"vertical"===c&&(So.reduceMaxNumLines(e,l,.05*o),function(e,t,n=70){for(let r=0;r<e.length;r++){const i=e[r];i.lines.length>i.maxNumLines&&(i.lines=ji.tokenize(i.title,t,"… "+i.valueString,i.maxNumLines,n))}}(e,a,s)),So.addLabelsSize(e,s,l,d),So.addLabelSegments(e,u)},createLabels({labels:e,style:t,maxLabelWidth:n,areaProps:r,area:i,lineHeight:o=15,font:a}){const{majorAxis:s,minorAxis:l}=r,{minorCenter:u}=i,{fontSize:c,fontFamily:d,background:f}=t;let h=[];return e.forEach((e=>{const{lines:t}=e,r=t.length,i=t.map(((t,i)=>{const f={type:"text",text:t,title:mo({title:e.title,font:a,ellipsis:"… "+e.valueString}),dx:0,dy:0,maxWidth:n,width:n,fontSize:c,fontFamily:d,fill:e.fill,baseline:"central",anchor:"middle"};return f[l]=u,f[s]=e.segment.position,f.y+=(i-(r-1)/2)*o,f}));e.background&&h.push(function({minorCenter:e,majorAxis:t,minorAxis:n,label:r,lineHeight:i,background:o}){const{lines:a}=r,{borderRadius:s=vo,padding:l={}}=o,{top:u=bo,bottom:c=bo,left:d=bo,right:f=bo}=l,h=a.length,p={type:"rect",rx:s,ry:s,fill:r.background.fill,width:r.width+(d+f),height:r.height+(u+c)};return p[n]=e,p[t]=r.segment.position,p.x-=r.width/2+d,p.y-=h*i/2+u,p}({minorCenter:u,majorAxis:s,minorAxis:l,label:e,lineHeight:o,background:f})),h=h.concat(i)})),h}};function wo(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 Eo(e,t,n){return"top"===e||"bottom"===e?function(e,t){const{font:n,lineHeight:r,top:i,bottom:o,maxLabelWidth:a}=t;let s=1;return So.getMaxTextWidth(e)>a&&(po(e,n,a),s=Math.max(...e.map((e=>e.lines.length)))),s*r+i+o}(t,n):function(e,t){const{left:n,right:r,maxLabelWidth:i}=t;return Math.min(i,So.getMaxTextWidth(e))+n+r}(t,n)}function ko(e,t){return t?e.domain():[0,1]}function Co(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 Oo(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 To(e,t){return e>9?t[1]:t[0]}function Ao({alignment:e,dockValue:t,oobs:n,style:r,rect:i,symbol:o,position:a,areaProps:s,radius:l,font:u}){const c=n?n.length:0;if(c<1)return[];const{flipXY:d,majorAxis:f,minorAxis:h,minorDimension:p}=s,m=i[p],y=zi.createOob({oob:zi.getDefaultSettings({size:r.size,fill:r.fill,alignment:e}),dockValue:t,boxCenter:.5,rendWidth:i.width,rendHeight:i.height,flipXY:d,symbol:o}),g="c"+f,v="c"+h,b={type:"circle",r:l,stroke:"transparent",fill:r.text.background.fill,strokeWidth:0};b[v]=m/2,b[g]=a;const x={type:"text",text:c>9?"9+":c,title:yo({oobs:n,font:u,ellipsis:"…"}),dx:0,dy:0,maxWidth:m,width:m,fontSize:r.text.fontSize,fontFamily:r.text.fontFamily,fill:r.text.fill,baseline:"central",anchor:"middle"};return x[h]=m/2,x[f]=a,[y,b,x]}function No(e){const t=`normal ${e.fontSize} '${e.fontFamily}'`;return{font:t,lineHeight:ji.getFontHeight(t)*(e.lineHeightMultiplicator||1),gap:e.gap||12,maxLabelWidth:e.maxWidth||75,top:e.padding.top||0,bottom:e.padding.bottom||0,left:e.padding.left||0,right:e.padding.right||0}}const qo=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 Do={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=qo(this.settings.labels),s=wo(this.chart,this.settings.formatter,e);So.addLabelTitles({labels:a,formatter:s,isContinuous:r,canBeContinuous:o,localeInfo:i});const{numMaxOobs:l,numMinOobs:u,filteredLabels:c}=(({labels:e,scale:t,isContinuous:n,canBeContinuous:r,layoutService:i})=>{if(n){const[r,i]=ko(t,n);return Co(e,r,i)}if(r){const t=i.getLayoutValue("qHyperCube.qDimensionInfo.0"),{qMin:n,qMax:r}=t;if("NaN"!==n&&"NaN"!==r)return Co(e,n,r,"inputValue")}return{filteredLabels:e}})({labels:a,scale:e,isContinuous:r,canBeContinuous:o,layoutService:n});let d;if(this.measureText=e=>this.renderer.measureText({text:e,fontSize:t.label.fontSize,fontFamily:t.label.fontFamily}),c&&c.length){const e=No(t.label),{dock:n}=this.settings.layout;return So.measureLabelsWidth(c,this.measureText),d=Eo(n,c,e),d}const f=Oo(this.measureText),h=l?To(l,f):0,p=u?To(u,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,u=qo(this.settings.labels),{dock:c,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)}(c),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:y}=h,{majorSize:g}=p,{font:v,lineHeight:b,gap:x,maxLabelWidth:M}=No(n.label),S=wo(this.chart,this.settings.formatter,e),w=g;So.addLabelTitles({labels:u,formatter:S,isContinuous:o,canBeContinuous:l,localeInfo:s}),So.calculateLabelPositions({labels:u,scale:e,size:w,layoutService:r,orientation:m,rtl:d,isContinuous:o,isDimension:a});const[E,k]=ko(e,o),{filteredLabels:C,lowerOobs:O,upperOobs:T,lowerCircleSize:A,upperCircleSize:N,lowerOobSpace:q,upperOobSpace:D}=function({labels:e,minValue:t,maxValue:n,orientation:r,rtl:i,isContinuous:o,style:a,padding:s,measureText:l,prop:u="value"}){const{maxOobs:c,minOobs:d,filteredLabels:f}=Co(e,t,n,u),h="scaledValue"!==u&&ho.getInvert({orientation:r,rtl:i,isContinuous:o}),p=function(e,t,n){return n?t:e}(d,c,h),m=function(e,t,n){return n?e:t}(d,c,h),y=p.length,g=m.length,v=Oo(l),b=To(y,v),x=To(g,v);return{filteredLabels:f,lowerOobs:p,upperOobs:m,lowerCircleSize:b,upperCircleSize:x,lowerOobSpace:function(e,t,n,r,i){return("vertical"===r?i.top:i.left)+(e>0?t+n:0)}(y,a.oob.size,b,r,s),upperOobSpace:function(e,t,n,r,i){return("vertical"===r?i.bottom:i.right)+(e>0?t+n:0)}(g,a.oob.size,x,r,s)}}({labels:u,minValue:E,maxValue:k,orientation:m,rtl:d,isContinuous:o,style:n,padding:f,measureText:this.measureText,prop:o?"value":"scaledValue"}),R=q,I=g-D;go(O),go(T);const _=Ao({alignment:0,dockValue:0,oobs:O,style:n.oob,rect:this.rect,symbol:t,position:n.oob.size+A/2,areaProps:h,radius:A/2,font:v}),P=Ao({alignment:1,dockValue:1,oobs:T,style:n.oob,rect:this.rect,symbol:t,position:g-(n.oob.size+N/2),areaProps:h,radius:N/2,font:v});So.addLabelsInfo({labels:C,scale:e,majorSize:g,lowerLimit:R,upperLimit:I,font:v,lineHeight:b,gap:x,maxLabelWidth:M,majorDimension:y,orientation:m,measureText:this.measureText,rtl:d,layoutService:r,isContinuous:o,isDimension:a}),Zi.layout(C.map((e=>e.segment)),R,I,n.label.gap);const L=C.filter((e=>Zi.isInside(e.segment,R,I,o)));return So.createLabels({labels:L,style:n.label,maxLabelWidth:M,areaProps:h,area:p,lineHeight:b,font:v,theme:i}).concat([..._,...P])}};const{getInputValue:Ro,extractInfoFromInputValue:Io,resolveValue:_o}=ho;var Po={resolveValue:_o,resolveInnerValues:({refLineLayout:e,refLineModel:t,layoutService:n})=>{if(n.meta.isGroupedByDimension){const r=Ro({refLineLayout:e,layoutService:n});return Io(r,t,"innerValues")}},resolveNumInnerValues:({refLineLayout:e,refLineModel:t,layoutService:n})=>{if(n.meta.mode.K)return 0;const r=Ro({refLineLayout:e,layoutService:n});return Io(r,t,"numInnerValues")||0},resolveValueText:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const{dimensionValuesInfo:r}=t,{canBeContinuous:i}=n.meta,o=Ro({refLineLayout:e,layoutService:n});return r[o]&&i?r[o].qText:o},resolveValueInfo:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const r=Ro({refLineLayout:e,layoutService:n}),{dimensionRefLineInfo:i}=t;return i[r]}};function Lo({isDimension:e,refLineModel:t={},layoutService:n,colorModel:r,dockService:i,chart:o,scale:a,axis:s,rtl:l,key:u,mainComponentKey:c,path:d,minimumLayoutMode:f}){const h=e?t.dimensionRefLines:d?t.query.getRefLines(d):t.measureRefLines;if(!h.length)return!1;const p={key:u,type:"ref-line",layout:{minimumLayoutMode:f},lines:{y:[],x:[]},style:{oob:{show:!1}},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}})},m=!(!e||"horizontal"!==i.meta.major.orientation||!l),y=!e||n.meta.isContinuous;return h.forEach((l=>{p.lines[s].push((({isDimension:e,refLineLayout:t,refLineModel:n,layoutService:r,colorModel:i,dockService:o,chart:a,scale:s,axis:l,invert:u,component:c,isContinuous:d})=>{var f,h;const p={dir:l,line:{strokeWidth:(null==t||null===(f=t.style)||void 0===f?void 0:f.lineThickness)||2,strokeDasharray:null==t||null===(h=t.style)||void 0===h?void 0:h.lineType,stroke:i.resolveUIColor(t.paletteColor||{index:t.color})}};return!e||r.meta.isContinuous?(p.scale=s,p.value=t.refLineExpr.value):p.value=()=>{var e;const i=ho.getScaledPosition({scale:a.scale(s),value:Po.resolveValue({refLineLayout:t,refLineModel:n,layoutService:r}),valueInfo:Po.resolveValueInfo({refLineLayout:t,refLineModel:n,layoutService:r}),size:null===(e=a.component(c))||void 0===e?void 0:e.rect["horizontal"===o.meta.major.orientation?"width":"height"],align:t.align,invert:u,layoutService:r,isContinuous:d});return Number.isNaN(i)?void 0:i},p})({isDimension:e,refLineLayout:l,refLineModel:t,layoutService:n,colorModel:r,dockService:i,chart:o,scale:a,axis:s,invert:m,component:c,isContinuous:y}))})),p}const jo={referenceLine:{label:{name:{fontFamily:"Source Sans Pro, sans-serif",fontSize:"12px"}},outOfBounds:{backgroundColor:"#737373",color:"#e6e6e6",fontFamily:"Source Sans Pro, sans-serif",fontSize:"10px"}}};function zo({isDimension:e,refLineModel:t={},layoutService:n,colorModel:r,dock:i,scale:o,style:a,formatter:s,theme:l,localeInfo:u,rtl:c,key:f,path:h}){const p=e?t.dimensionRefLineLabels:h?t.query.getRefLineLabels(h):t.measureRefLineLabels;if(!p.length)return[];const m=[],y=!e||n.meta.isContinuous,g=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}),l={align:e.align,text:e.label,fill:e.coloredBackground?o.getContrastingColorTo(s):s,showValue:!1!==e.showValue,showLabel:!1!==e.showLabel,inputValue:e.refLineExpr.value,inputValueLabel:e.refLineExpr.label};return e.coloredBackground&&(l.background={fill:s}),a?(l.scale=i,l.value=e.refLineExpr.value):(l.value=()=>Po.resolveValue({refLineLayout:e,refLineModel:t,layoutService:n}),l.valueText=()=>Po.resolveValueText({refLineLayout:e,refLineModel:t,layoutService:n}),l.valueInfo=()=>Po.resolveValueInfo({refLineLayout:e,refLineModel:t,layoutService:n})),l})({refLineLayout:e,refLineModel:t,layoutService:n,colorModel:r,scale:o,theme:l,isContinuous:y})));return m.push((({isDimension:e,layoutService:t,style:n,labels:r,scale:i,formatter:o,dock:a,key:s,rtl:l,theme:u,isContinuous:c,localeInfo:d})=>({key:s,type:"reference-line-labels",renderer:"svg",labels:r,formatter:o,scale:i,layoutService:t,layout:{dock:a,rtl:l},theme:u,isContinuous:c,isDimension:e,localeInfo:d,style:{label:{fontFamily:n.referenceLine.label.name.fontFamily,fontSize:n.referenceLine.label.name.fontSize,padding:{top:2,bottom:2,left:l?2:4,right:l?4:2},background:{padding:{top:1,bottom:1,left:2,right:2}},maxWidth:100,gap:"left"===a||"right"===a?10:16},oob:{size:8,fill:n.referenceLine.outOfBounds.backgroundColor,text:{fontFamily:n.referenceLine.outOfBounds.fontFamily,fontSize:n.referenceLine.outOfBounds.fontSize,fill:n.referenceLine.outOfBounds.color,background:{fill:n.referenceLine.outOfBounds.backgroundColor}}}}}))({isDimension:e,rtl:c,style:d(!0,jo,a),dock:i,key:f,labels:g,scale:o,formatter:s,layoutService:n,theme:l,isContinuous:y,localeInfo:u})),m}function Fo({layoutService:e,discreteModel:t}){const{isContinuous:n,canBeContinuous:r,isGroupedByDimension:i}=e.meta,o=e.getLayout(),a="K"===o.qHyperCube.qMode,s=k.dimensionless(o),l=ho.getMeasureRefLines(o),u=ho.getDimensionRefLines(o,s),c=ho.getMeasureRefLineLabels(o),d=ho.getDimensionRefLineLabels(o,s);let f={},h={};const p=()=>!(!u||!u.length)&&!u.every((t=>{const o=ho.getInputValue({refLineLayout:t,layoutService:e});return(t=>{if(r){const n=e.getLayoutValue("qHyperCube.qDimensionInfo.0"),{qMin:r,qMax:i}=n;return ho.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 ho.isOutOfDataPages({label:n,dataPages:i})}return!0})(o)})),m={isKMode:a,canBeContinuous:r,measureRefLines:l,dimensionRefLines:u,measureRefLineLabels:c,dimensionRefLineLabels:d,dimensionRefLineInfo:h,dimensionValuesInfo:f,query:{getRefLines:e=>ho.getRefLines(o,e),getRefLineLabels:e=>ho.getRefLineLabels(o,e)},update:()=>{h=m.dimensionRefLineInfo,p()&&(f=ho.getDimensionValuesInfo({layout:o,canBeContinuous:r,discreteModel:t,layoutService:e}),m.dimensionValuesInfo=f,u.forEach((t=>{const n=ho.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 Bo={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}}};var Vo={DATA:{MAIN:"qHyperCube",REDUCED:"reduced-data"},SCALE:{MAJOR:"main-major",MAJOR_INNER:"major-inner",MINOR:{PRIMARY:"minor-primary",SECONDARY:"minor-secondary",REDUCED_PRIMARY:"reduced-minor-primary",REDUCED_SECONDARY:"reduced-minor-secondary"},COLOR:"color",REDUCED:"reduced-major"},COMPONENT:{BAR:"bar-series",BAR_LABEL:"bar-label",BAR_OOB_LABEL:"bar-oob-label",STACK_BAR:"stack-bar",STACK_BAR_LABEL:"stack-bar-label",AXIS:{MAJOR:"major-axis",MAJOR_CONTINUOUS:"major-axis-continuous",TIME_INNER:"major-axis-time-inner",TIME_OUTER:"major-axis-time-outer",MINOR:{PRIMARY:"minor-primary-axis",SECONDARY:"minor-secondary-axis"}},AXIS_OVERLAY:{TIME_INNER:"axis-overlay-time-inner",TIME_OUTER:"axis-overlay-time-outer",CONTINUOUS:"axis-overlay-continuous"},AXIS_TITLE:{MAJOR:"major-axis-title",MINOR:{PRIMARY:"minor-primary-axis-title",SECONDARY:"minor-secondary-axis-title"}},MARKER:"marker-series",LINE:"line-series",POINT:"point-component",LABEL_SPACE:"label-space-component",POINT_LABEL:"point-label",GRID_LINE:"grid-line",ZERO_LINE:"zero-line",LEGEND:"legend",LEGEND_CATEGORICAL:"legend-cat",LEGEND_TOOLTIP:"legend-tooltip",TOOLTIP:"tooltip",MINI_CHART:{BAR:"mini-chart-bar-series",LINE:"mini-chart-line-series",MARKER:"mini-chart-marker-series"},BAR_OOB:"bar-oob",GHOST_BAR_OOB:"ghost-bar-oob",SLICED_HAT:"sliced-hat",DATA_OOB_MARKER:"data-out-of-bounds-marker",PRIMARY_MEASURE_AXIS_REF_LINE:"primary-mes-axis-ref-line",SECONDARY_MEASURE_AXIS_REF_LINE:"secondary-mes-axis-ref-line",DIMENSION_REF_LINE:"dim-ref-line",PRIMARY_MEASURE_AXIS_REF_LINE_LABEL:"primary-mes-ref-line-label",SECONDARY_MEASURE_AXIS_REF_LINE_LABEL:"secondary-mes-ref-line-label",DIMENSION_REF_LINE_LABEL:"dim-ref-line-label"},COLLECTION:{PRIMARY:"primary-collection",SECONDARY:"secondary-collection",STACKED_PRIMARY:"stacked-collection-primary",STACKED_SECONDARY:"stacked-collection-secondary",STACKED_TOTAL_PRIMARY:"stacked-total-collection-primary",STACKED_TOTAL_SECONDARY:"stacked-total-collection-secondary",REDUCED:"reduced-collection",REDUCED_PRIMARY:"reduced-collection-primary",REDUCED_SECONDARY:"reduced-collection-secondary",REDUCED_STACKED_PRIMARY:"reduced-collection-stacked-primary",REDUCED_STACKED_SECONDARY:"reduced-collection-stacked-secondary",LINE:"line-collection"},FORMATTER:{PRIMARY:"primary-formatter",SECONDARY:"secondary-formatter"}},Ho={LINE:"line",BAR:"bar",MARKER:"marker"},$o={PRIMARY:0,SECONDARY:1},Uo={type:"bar",axis:0};const Wo={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 Yo(e){const t=e.split("/");return"qmem:"===t[0]&&""===t[1]}const Xo={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,u=o[t]*(n>l?1:n/l),c=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(u,n),width:Math.min(c,l)},r()):(e={height:u,width:c},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 Go(e,t,n,r){var i,o,a,s,l,u;const{app:c,flags:d}=t,f=null===(i=e.layout)||void 0===i||null===(o=i.tooltip)||void 0===o?void 0:o.imageComponents;if(!f)return[];const[h]=f,p=h.size||"small",m=h.type||"media";let y=-1;for(let e=0;e<n.length;e++)if(n[e].cId===h.cId){y=e;break}const g=(null===(a=r.data)||void 0===a||null===(s=a.customTooltipAttrExps)||void 0===s?void 0:s.value)||[];let v;if(-1!==y&&g[y]&&(v=g[y]),"media"===m&&null!==(l=h.ref)&&void 0!==l&&null!==(u=l.qStaticContentUrl)&&void 0!==u&&u.qUrl)return async function(e,t,n){let r=e.ref.qStaticContentUrl.qUrl;const i=function(e){let t,n,r,i,o,a;return e&&e.session&&e.session.options||e&&e.enigmaModel&&e.enigmaModel.session&&e.enigmaModel.session.sessionConfig?(t=e.session.options||e.enigmaModel.session.sessionConfig,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+="/"),n+r+i+o):""}(n);i&&(function(e,t){e.replace(t,"").replace(/^\.\.\//i,"/")[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 Xo.getImageSize(r,t);return{src:r,size:t,height:o,width:a,imageError:s}}(h,p,c);if("url"===m)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")&&null!=e&&e.getImage&&Yo(a))try{const t="data:image/png;base64, "+await e.getImage(a),{height:n,width:i,imageError:s}=await Xo.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 Xo.getImageSize(a,r);o={src:a,size:r,height:e,width:t,imageError:n}}return o}(c,d,h,p,v);if(d.isEnabled("IMAGE_BUNDLE_LOAD")&&"field"===m&&v&&v.label){return async function(e,t,n,r){let i;const o=r.label,a=`qmem://${t.qFallbackTitle}/${o}`;if(Yo(a))try{const t=await e.getImage(a);if(t){const e="data:image/png;base64, "+t,{height:r,width:o,imageError:a}=await Xo.getImageSize(e,n);i={src:e,size:n,height:r,width:o,imageError:a}}}catch(e){}return i}(c,n[y],p,v)}return[]}const Ko={async addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){const i=t,o=[];for(let t=0;t<i.length;t++)o.push(Go(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}){var t,n;const r=null===(t=e.layout)||void 0===t||null===(n=t.tooltip)||void 0===n?void 0:n.imageComponents;return!!r&&r.length>0}},Jo={async handlePromises({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){let i=t;return i=await Ko.addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}),i},checkIfPromisesExist:({customTooltipModel:e})=>Ko.checkIfPromisesExist({customTooltipModel:e})};const Zo=(e,t)=>{var n,r,i;const o=null==e||null===(n=e.qHyperCubeDef)||void 0===n?void 0:n.qDimensions,a=null==e||null===(r=e.qHyperCubeDef)||void 0===r?void 0:r.qMeasures,s=null==e||null===(i=e.qHyperCubeDef)||void 0===i?void 0:i.qInterColumnSortOrder,l=t;return{qInfo:{qType:Wo.CHART.CHART_PARENT_TYPE,qId:Wo.CHART.CHART_OBJECT_ID},qHyperCubeDef:{qDimensions:o,qMeasures:a,qInterColumnSortOrder:s,qInitialDataFetch:[{qWidth:0,qHeight:0}]},qStateName:l}},Qo=e=>{var t,n,r;const i=null===(t=e.tooltip)||void 0===t||null===(n=t.chart)||void 0===n||null===(r=n.object)||void 0===r?void 0:r.refId;return{qInfo:{qType:Wo.CHART.CHART_CHILD_TYPE},qExtendsId:i}};const ea={createContainer:({ctx:e,layout:t})=>{var n,r;if(!((null===(n=t.qHyperCube)||void 0===n||null===(r=n.qDimensionInfo)||void 0===r?void 0:r.length)<=0))return function(e,t){var n,r,i,o;const a=null!==(n=null===(r=t.tooltip)||void 0===r||null===(i=r.chart)||void 0===i||null===(o=i.style)||void 0===o?void 0:o.size)&&void 0!==n?n:"medium",s=Wo.CHART.STYLE[a];return[{content:[e.h("div",{style:{display:"flex",width:s,height:s,backgroundColor:"#FFFFFF",borderRadius:"5px",padding:"2px",color:"#595959"},colspan:2,id:Wo.CHART.CONTAINER_ID})],colspan:2,style:{"text-align":e.rtl?"right":"left","max-width":s,width:"100%"}},{}]}(e,t)},show:async({app:e,properties:t,selectedNodes:n,dimIndex:r,customTooltipModel:i,rtl:o})=>{var a,s,l;const u=i,c=null==t||null===(a=t.tooltip)||void 0===a||null===(s=a.chart)||void 0===s||null===(l=s.object)||void 0===l?void 0:l.refId;if(null!=u&&u.embed&&e.removeSessionAlternateState&&e.addSessionAlternateState&&c&&!(t.qHyperCubeDef.qDimensions.length<=0)){await ea.hide({app:e,customTooltipModel:i});try{await async function({app:e,properties:t,customTooltipModel:n}){const r=n,i=Wo.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 a=await async function({app:e,properties:t,customTooltipModel:n}){var r;const i=n;null!==(r=i.miniChartToken.sessionObj)&&void 0!==r&&r.id&&await e.destroySessionObject(i.miniChartToken.sessionObj.id);const o=Wo.CHART.STATE,a=Zo(t,o),s=await e.createSessionObject(a),l=Qo(t);if(s.id!==Wo.CHART.CHART_OBJECT_ID)return void e.destroySessionObject(s.id);i.miniChartToken.sessionObj=s;const u=await s.createChild(l);if(i.miniChartToken.sessionObj&&i.miniChartToken.sessionObj.id===s.id)return i.miniChartToken.model=u,u;e.destroySessionObject(s.id)}({app:e,properties:t,customTooltipModel:i});if(u.miniChartToken.alternateState&&u.miniChartToken.sessionObj&&a){var d,f,h,p;const e=n.length>0&&void 0!==(null===(d=n[0].data)||void 0===d?void 0:d.value)?[null===(f=n[0].data)||void 0===f?void 0:f.value]:[],a=void 0!==r?r:t.qHyperCubeDef.qDimensions.length-1;if(2===t.qHyperCubeDef.qDimensions.length&&void 0===r&&n.length>0){var m,y;const e=null!==(m=n[0].data.selectionOuterDimension)&&void 0!==m?m:n[0].data.selectionDimension;if(null!=e&&null!==(y=e.source)&&void 0!==y&&y.field){var g;const t=null==e||null===(g=e.source)||void 0===g?void 0:g.field.split("/"),n=t[t.length-1],r=void 0!==e.value?[e.value]:[];r.length>0&&void 0!==n&&u.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",Number(n),r,!1)}}e.length>0&&u.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",a,e,!1);const s=document.getElementById(Wo.CHART.CONTAINER_ID),l={direction:o?"rtl":"ltr",isReadonly:!0,isPopover:!0,navigation:!1,selections:!1};u.miniChartToken.vis=await i.embed.render({element:s,model:u.miniChartToken.model,options:l,id:null===(h=u.miniChartToken.model)||void 0===h?void 0:h.id,type:null===(p=u.miniChartToken.model)||void 0===p?void 0:p.genericType})}}catch(t){await ea.hide({app:e,customTooltipModel:i})}}},hide:async({app:e,customTooltipModel:t})=>{const n=t;null!=n&&n.embed&&(ea.destroyVisualization({customTooltipModel:t}),await e.destroySessionObject(Wo.CHART.CHART_OBJECT_ID),n.miniChartToken.sessionObj=void 0,await async function({app:e,customTooltipModel:t}){const n=t,r=Wo.CHART.STATE;await e.removeSessionAlternateState(r),n.miniChartToken.alternateState=void 0}({app:e,customTooltipModel:t}))},destroyVisualization:({customTooltipModel:e})=>{var t,n;const r=e;"function"==typeof(null===(t=r.miniChartToken)||void 0===t||null===(n=t.vis)||void 0===n?void 0:n.destroy)&&(r.miniChartToken.vis.destroy(),r.miniChartToken.vis=void 0)}};function ta(e){const t=e.qHyperCubeDef?e.qHyperCubeDef.qDimensions:e.qHyperCube.qDimensionInfo;if(t&&t.length>0)return t}function na(){const{EXPRESSION:e,TITLE:t,DESCRIPTION:n,IMAGES:r}=Wo.CUSTOM,i={};return i[e]=!0,i[t]=!0,i[n]=!0,i[r]=!0,i}function ra(e){const t=na();return e.filter((e=>t[e.id]))}const ia={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=>{var o,a,s,l;const u=null!==(o=null===(a=t.data)||void 0===a?void 0:a.selectionDimension)&&void 0!==o?o:t.data;if(!u||null!==(s=t.data)&&void 0!==s&&s.customTooltipAttrExps||i[t.type]){if(null!==(l=t.data)&&void 0!==l&&l.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=>{var t,n;const r=null!==(t=null!==(n=e.data.stack)&&void 0!==n?n:e.data.selectionOuterDimension)&&void 0!==t?t:e.data.selectionDimension;return r&&r.value===u.value&&r.label===u.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}=ia.getAttrExprData(a);o.length||n.length?Jo.handlePromises({customTooltipModel:i,nodes:ia.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{var s,l;null!==(s=r.flags)&&void 0!==s&&s.isEnabled("CUSTOM_TOOLTIP_CHART")&&null!=i&&null!==(l=i.miniChartToken)&&void 0!==l&&l.alternateState&&ea.hide({app:r.app,customTooltipModel:i}),t.emit("hide")}},checkIfPromisesExist:({customTooltipModel:e})=>Jo.checkIfPromisesExist({customTooltipModel:e}),getAttrExps(e,t){var n;const r=t,i=null!==(n=e.qHyperCubeDef)&&void 0!==n&&n.qDimensions?"qAttributeExpressions":"qAttrExprInfo";return r[i]||(r[i]=[]),r[i]},getAttrExprData(e){var t;let n=[],r="";const i=(null===(t=e.qHyperCube)||void 0===t?void 0:t.qDimensionInfo)||[];if(i.length>0){var o,a,s;const t=i.length-1;n=(null===(o=e.qHyperCube)||void 0===o||null===(a=o.qDimensionInfo)||void 0===a||null===(s=a[t])||void 0===s?void 0:s.qAttrExprInfo)||[],r=`qDimensionInfo/${t}/qAttrExprInfo`}return{attrExps:n,fieldPath:r}},quarantineCustomTooltipAttrs(e,t={}){var n,r;if(!(null===(n=e.qLayoutExclude)||void 0===n||null===(r=n.quarantine)||void 0===r?void 0:r[Wo.CUSTOM.QUARANTINE])){!function(e,t){const n=t;let r=n.qLayoutExclude;r||(n.qLayoutExclude={quarantine:{}},r=n.qLayoutExclude),r.quarantine||(r.quarantine={}),r.quarantine[Wo.CUSTOM.QUARANTINE]=[],e.forEach((e=>{r.quarantine[Wo.CUSTOM.QUARANTINE].push(e)})),n.qLayoutExclude=r}(ra(t.qAttributeExpressions||[]),e)}},unquarantineCustomTooltipAttrs(e){var t,n;const r=e;(null===(t=e.qLayoutExclude)||void 0===t||null===(n=t.quarantine)||void 0===n?void 0:n[Wo.CUSTOM.QUARANTINE])&&delete r.qLayoutExclude.quarantine[Wo.CUSTOM.QUARANTINE]},setAttrsFromQuarantine(e,t){const n=ta(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===ra(i).length){var o,a;const t=(null===(o=e.qLayoutExclude)||void 0===o||null===(a=o.quarantine)||void 0===a?void 0:a.customTooltip)||[],n=[...i,...t],s=e;s.qHyperCubeDef?s.qHyperCubeDef.qDimensions[r].qAttributeExpressions=n:s.qHyperCube.qDimensionInfo[r].qAttrExprInfo=n}},moveCustomTooltipAttrs(e,t={},n){let r=[];const i=ta(e)||[];[...i,t].forEach((e=>{const t=ra(e.qAttributeExpressions||[]);t.length>0&&(r=t)}));const o=na(),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){var t;return(null===(t=e.tooltip)||void 0===t?void 0:t.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:P.detectTextDirection(e)},colspan:2},{}],getImageRow(e,t){const n=P.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 oa(e,t,n,r){var i,o,a;const s=(null===(i=t.qHyperCube)||void 0===i||null===(o=i[n])||void 0===o||null===(a=o[r])||void 0===a?void 0:a.qAttrExprInfo)||[],l=[],u=e.qSubNodes&&e.qSubNodes[r]?e.qSubNodes[r].qAttrExps:e.qAttrExps;return u?(s.forEach(((e,t)=>{const i=u.qValues&&u.qValues[t]?u.qValues[t]:void 0,o=void 0===i?"NaN":function(e,t){let n;switch(e.id){case Wo.CUSTOM.EXPRESSION:n="NaN"===t.qNum||e.isCustomFormatted?void 0===t.qText?"NaN":t.qText:t.qNum;break;case Wo.CUSTOM.TITLE:case Wo.CUSTOM.DESCRIPTION:case Wo.CUSTOM.IMAGES:n=void 0===t.qText?e.qFallbackTitle:t.qText;break;default:n="NaN"}return n}(e,i);l.push({source:{key:"qHyperCube",field:`${n}/${r}/qAttrExprInfo/${t}`},label:o,value:"value"})})),l):l}const aa={getNode(e,{dimensionCount:t}){if(!t||t<1)return;const n=t-1,r="qDimensionInfo";return{field:`${r}/${n}`,value:t=>oa(t,e,r,n)}}};const sa={getCustomAttrExps(e,t,n){var r,i;const o={customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]},a=(null===(r=t.data)||void 0===r||null===(i=r.customTooltipAttrExps)||void 0===i?void 0:i.value)||[];if(Number.isNaN(a))return o;return function(e,t,n,r){const i={[Wo.CUSTOM.TITLE]:!0,[Wo.CUSTOM.DESCRIPTION]:!0},{attrExps:o,fieldPath:a}=ia.getAttrExprData(e);return 0===t.length||0===o.length||""===a||o.forEach(((e,o)=>{const s=t[o];if(e.id===Wo.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===Wo.CUSTOM.TITLE&&{title:t},value:t,id:e.id})}})),r}(n,a.map((t=>L.getMeasure(e,t))),e,o)}};function la({nodes:e,layout:t,dataset:n}){return function(e,t,n){const r=[];return e.forEach((e=>{r.push(sa.getCustomAttrExps(n,e,t))})),r}(e,t,n).reduce(((e,t)=>({customTooltipAttrExpsArr:e.customTooltipAttrExpsArr.concat(t.customTooltipAttrExpsArr),customTooltipInfoAttrExpsArr:e.customTooltipInfoAttrExpsArr.concat(t.customTooltipInfoAttrExpsArr)})),{customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]})}function ua(e){return(ua="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ca(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 da(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){ca(o,r,i,a,s,"next",e)}function s(e){ca(o,r,i,a,s,"throw",e)}a(void 0)}))}}function fa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ha(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 pa(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ha(Object(n),!0).forEach((function(t){fa(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ha(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ma(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function ya(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(e,t)||va(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 ga(e){return function(e){if(Array.isArray(e))return ba(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||va(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 va(e,t){if(e){if("string"==typeof e)return ba(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)?ba(e,t):void 0}}function ba(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var xa=Object.prototype.hasOwnProperty,Ma=Object.prototype.toString,Sa=Object.defineProperty,wa=Object.getOwnPropertyDescriptor,Ea=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Ma.call(e)},ka=function(e){if(!e||"[object Object]"!==Ma.call(e))return!1;var t,n=xa.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&xa.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||xa.call(e,t)},Ca=function(e,t){Sa&&"__proto__"===t.name?Sa(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Oa=function(e,t){if("__proto__"===t){if(!xa.call(e,t))return;if(wa)return wa(e,t).value}return e[t]},Ta=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<u;++l)if(null!=(t=arguments[l]))for(n in t)r=Oa(s,n),s!==(i=Oa(t,n))&&(c&&i&&(ka(i)||(o=Ea(i)))?(o?(o=!1,a=r&&Ea(r)?r:[]):a=r&&ka(r)?r:{},Ca(s,{name:n,newValue:e(c,a,i)})):void 0!==i&&Ca(s,{name:n,newValue:i}));return s};function Aa(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 Na(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 qa(e,t,n,r,i){var o,a=i.byRow,s=i.byElemNo;if(r&&(t.input.persistent||e.hc.qDimensionInfo.length>1||void 0===n.activeDimensionIndex&&e.hc.qSize.qcy>((null===(o=e.hc.qDataPages[0])||void 0===o?void 0:o.qArea.qHeight)||0)))return s(r,r.raw().qCardinal);if(r){var l=t.pic.extract({field:r.key(),trackBy:r.value}).length;return a(r,l)}return{}}function Da(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 Ra(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 Ia(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function _a(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Pa(){}var La=1/.7,ja="\\s*([+-]?\\d+)\\s*",za="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Fa="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ba=/^#([0-9a-f]{3,8})$/,Va=new RegExp("^rgb\\("+[ja,ja,ja]+"\\)$"),Ha=new RegExp("^rgb\\("+[Fa,Fa,Fa]+"\\)$"),$a=new RegExp("^rgba\\("+[ja,ja,ja,za]+"\\)$"),Ua=new RegExp("^rgba\\("+[Fa,Fa,Fa,za]+"\\)$"),Wa=new RegExp("^hsl\\("+[za,Fa,Fa]+"\\)$"),Ya=new RegExp("^hsla\\("+[za,Fa,Fa,za]+"\\)$"),Xa={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 Ga(){return this.rgb().formatHex()}function Ka(){return this.rgb().formatRgb()}function Ja(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Ba.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Za(t):3===n?new ns(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Qa(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Qa(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=Va.exec(e))?new ns(t[1],t[2],t[3],1):(t=Ha.exec(e))?new ns(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=$a.exec(e))?Qa(t[1],t[2],t[3],t[4]):(t=Ua.exec(e))?Qa(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Wa.exec(e))?as(t[1],t[2]/100,t[3]/100,1):(t=Ya.exec(e))?as(t[1],t[2]/100,t[3]/100,t[4]):Xa.hasOwnProperty(e)?Za(Xa[e]):"transparent"===e?new ns(NaN,NaN,NaN,0):null}function Za(e){return new ns(e>>16&255,e>>8&255,255&e,1)}function Qa(e,t,n,r){return r<=0&&(e=t=n=NaN),new ns(e,t,n,r)}function es(e){return e instanceof Pa||(e=Ja(e)),e?new ns((e=e.rgb()).r,e.g,e.b,e.opacity):new ns}function ts(e,t,n,r){return 1===arguments.length?es(e):new ns(e,t,n,null==r?1:r)}function ns(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function rs(){return"#"+os(this.r)+os(this.g)+os(this.b)}function is(){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 os(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function as(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new ls(e,t,n,r)}function ss(e){if(e instanceof ls)return new ls(e.h,e.s,e.l,e.opacity);if(e instanceof Pa||(e=Ja(e)),!e)return new ls;if(e instanceof ls)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 ls(a,s,l,e.opacity)}function ls(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function us(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Ia(Pa,Ja,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:Ga,formatHex:Ga,formatHsl:function(){return ss(this).formatHsl()},formatRgb:Ka,toString:Ka}),Ia(ns,ts,_a(Pa,{brighter:function(e){return e=null==e?La:Math.pow(La,e),new ns(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new ns(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:rs,formatHex:rs,formatRgb:is,toString:is})),Ia(ls,(function(e,t,n,r){return 1===arguments.length?ss(e):new ls(e,t,n,null==r?1:r)}),_a(Pa,{brighter:function(e){return e=null==e?La:Math.pow(La,e),new ls(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new ls(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 ns(us(e>=240?e-240:e+120,i,r),us(e,i,r),us(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 cs=Math.PI/180,ds=180/Math.PI,fs=4/29,hs=6/29,ps=3*hs*hs;function ms(e){if(e instanceof ys)return new ys(e.l,e.a,e.b,e.opacity);if(e instanceof Ss)return ws(e);e instanceof ns||(e=es(e));var t,n,r=xs(e.r),i=xs(e.g),o=xs(e.b),a=gs((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?t=n=a:(t=gs((.4360747*r+.3850649*i+.1430804*o)/.96422),n=gs((.0139322*r+.0971045*i+.7141733*o)/.82521)),new ys(116*a-16,500*(t-a),200*(a-n),e.opacity)}function ys(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function gs(e){return e>.008856451679035631?Math.pow(e,1/3):e/ps+fs}function vs(e){return e>hs?e*e*e:ps*(e-fs)}function bs(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function xs(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Ms(e){if(e instanceof Ss)return new Ss(e.h,e.c,e.l,e.opacity);if(e instanceof ys||(e=ms(e)),0===e.a&&0===e.b)return new Ss(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*ds;return new Ss(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function Ss(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function ws(e){if(isNaN(e.h))return new ys(e.l,0,0,e.opacity);var t=e.h*cs;return new ys(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}function Es(e){return function(){return e}}function ks(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Es(isNaN(e)?t:e)}Ia(ys,(function(e,t,n,r){return 1===arguments.length?ms(e):new ys(e,t,n,null==r?1:r)}),_a(Pa,{brighter:function(e){return new ys(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new ys(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new ns(bs(3.1338561*(t=.96422*vs(t))-1.6168667*(e=1*vs(e))-.4906146*(n=.82521*vs(n))),bs(-.9787684*t+1.9161415*e+.033454*n),bs(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),Ia(Ss,(function(e,t,n,r){return 1===arguments.length?Ms(e):new Ss(e,t,n,null==r?1:r)}),_a(Pa,{brighter:function(e){return new Ss(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new Ss(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return ws(this).rgb()}}));var Cs=function e(t){var n=function(e){return 1==(e=+e)?ks: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):Es(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=ts(e)).r,(t=ts(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=ks(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),Os=/^class(-pyramid)?/,Ts=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,u={},c="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(ga(c))),o=Math.max.apply(Math,[o].concat(ga(c))),u.min=i,u.max=o,t.breakTypes&&-1===t.breakTypes.indexOf(!0))u.type="categorical",Object.assign(u,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 u=0;u<r.length;u++)if(r[u]>n){o.push(i[u]),o.push(i[u]);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?c:l}));else if(t.breakTypes){var f=t.breakTypes;u.type="continuous",u.domain=[i],u.range=[d[0]];for(var h=0;h<c.length;h+=1)if(f[h]){var p=d[h],m=d[h+1],y=Cs(p,m)(.5);u.range.push(y),u.domain.push(c[h]),h<c.length-1&&f[h+1]&&(u.range.push(d[h+1]),u.domain.push((c[h]+c[h+1])/2))}else u.range.push(d[h]),u.range.push(d[h+1]),u.domain.push(c[h]),u.domain.push(c[h]+Math.min(1e-6,(o-i)/1e6));u.range.push(d[d.length-1]),u.domain.push(o)}else u.domain=c,u.range=d;return u};function As(e,t,n,r,i){var o,a,s,l=0,u=[],c=(e-t)/(r+1);if(0===c)return 1;for(o=0;o<n.length;o+=1)a=.99*(n[o]-t),s=n[o]>e?Math.floor(e/c):n[o]<t?0:Math.floor(a/c),Number.isNaN(s)||(u[s]?u[s]+=1:u[s]=1);for(o=0;o<u.length;o+=1)u[o]&&(l+=1);return l<=r||l>=i?Math.max(l,r):As(e,t,n,r+1,i)}var Ns=function(e,t,n,r){var i,o,a=t.theme,s=t.hc,l=r.f,u={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")}},c=[],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))&&(c=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,ga(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(u.min=n.input.measureMin,u.max=n.input.measureMax,u.max<u.min)return{invalid:!0}}else if(l&&!d)u.min=l.min(),u.max=l.max();else if(l){if(!c.length)return{invalid:!0};u.min=Math.min.apply(Math,ga(c)),u.max=Math.max.apply(Math,ga(c))}if(n.input.measureScheme&&(u.palettes={quant:n.input.measureScheme}),a){var f=a.getDataColorScales().filter((function(e){return e.key===n.input.measureScheme}))[0];u.type=f&&Os.test(f.type)?"categorical":"continuous","categorical"===u.type&&(o=f.colors.some((function(e){return Array.isArray(e)}))?Math.max.apply(Math,ga(f.colors.map((function(e){return e?e.length:0})))):f.colors.length)}if("categorical"===u.type){for(var h=d?As(u.max,u.min,c,1,o):o,p=(u.max-u.min)/h,m=[],y=0;y<h+1;y+=1)m.push(u.min+p*y);u.domain=m,u.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 u};function qs(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 Ds(e){e.measureOverrides.every((function(e){return!e}))&&(e.measureOverrides=null)}function Rs(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 Is(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?qs:o,s=n.input.byMeasureDef||{activeMeasureIndex:0},l=a(n,s),u=Ns(0,{theme:r,hc:i},n,{f:l});if(u.invalid)return u;("expression"===s.type||s.activeMeasureIndex<0)&&(u.label=s.label,l&&"color.altLabel"===l.raw().labelExpRef&&(u.label=n.input.altLabel)),!u.label&&l&&(u.label=l.title());var c=s.activeMeasureIndex>=0?l:null;if(!c&&l&&void 0!==l.raw().matchMeasure&&l.raw().matchMeasure>-1&&(c=n.pic.fields().filter((function(e){return"measure"===e.type()}))[l.raw().matchMeasure]),n.input.useMeasureGradient&&"libraryItem"===s.type)if(c){var d=c.raw().coloring;d&&d.gradient&&Ta(u,Ts(e,d.gradient,u,c))}else u.auxiliary=s;return u}(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?Da:i,a=r.getCByField,s=void 0===a?Ra:a,l=r.getPersistence,u=void 0===l?qa:l,c=o(t,n),d=s(n,c),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"===c.type||c.activeDimensionIndex<0)&&(p.label=c.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"===c.type&&(p.auxiliary=c),Ta(p,u(t,n,c,d,{byRow:Na,byElemNo:Aa})),p}(e,n,t);if("byExpression"===t.input.mode)return function(e,t,n,r){var i=t.hc,o=t.theme,a=t.translator,s=n.pic.field((function(e){return"colorByExpression"===e.raw().id}));if(!(s&&s.raw().qFallbackTitle&&(Number.isFinite(s.raw().qMin)&&Number.isFinite(s.raw().qMax)||n.input.expressionIsColor)))return{mode:"constant",type:"constant",primary:r.nil};if(n.input.expressionIsColor)return{mode:"field",fieldType:"expression",field:s?s.key():void 0,type:"color"};var l=Ns(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=[],u=[];"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?u.push(r.primary):u.push(i)}}));var c=n.input.dimensionScheme?{categorical:n.input.dimensionScheme}:void 0,d=o?o.getDataColorPalettes()[0]:void 0;return"measure"===n.input.useBaseColors&&d&&(c={categorical:d.key}),{mode:"measure",type:"categorical",palettes:c,label:a?a.get("Common.Measures"):void 0,explicit:l.length?{domain:l,range:u}: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)),pa(pa({},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 pa(pa({},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(Ds(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=Rs(e.measureOverrides,e.explicit),Ds(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=Rs(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}function _s(e){var t=pa({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(Ta(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=Ta(!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=Ta(!1,{},n.input,{measureOverrides:null}))},palettes:function(){if(!n.palettes){var e=t.theme,r=[];(e&&e.getDataColorPickerPalettes()||[]).forEach((function(e){r.push({key:"ui",colors:e.colors})})),n.palettes=r}return n.palettes},getAuxiliaryData:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/qHyperCubeDef";if(!e.auxiliary&&!/qAttrDimInfo/.test(e.field))return Promise.resolve();var i=e.auxiliary||{},o=i.key;if("measure"===e.fieldType)return r.getMeasure(o,t).catch((function(){}));if("dimension"===e.fieldType){var a="".concat(n,"/").concat(e.field).replace("qDimensionInfo","qDimensions").replace("qAttrDimInfo","qAttributeDimensions");return Promise.all([/qAttrDimInfo/.test(e.field)?r.getAttributeDimension(a,t).catch((function(){})):Promise.resolve(),o?r.getDimensionColorMap(o,t).catch((function(){})):Promise.resolve()])}return Promise.resolve()},getAuxiliarySettings:function(e,r){var i=this;return e.auxiliary||/qAttrDimInfo/.test(e.field)?(this.palettes(),this.getAuxiliaryData(e,r).then((function(r){if(!r)return{};if("measure"===e.fieldType){if(r.coloring&&r.coloring.gradient){var o=n.pic.field(e.field);return Ts(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 u=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=u}return l?function(e,t,n,r){var i=r.external,o=r.field,a=pa({},e);Ta(a,Aa(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,Ta(a,Aa(o)))):!1===t.autoFill&&t.single?a.range=[n.resolveUIColor(t.single)]:t.autoFill&&(s&&(a.palettes={categorical:s.key}),Ta(a,Aa(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],u=(l.text||l).label;r[u]&&-1===a.indexOf(l.value)&&(a.push(l.value),o.push(t.resolveUIColor(r[u])))}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=pa(pa({},e),r.getDataColorSpecials())),n.settings=Ta(e,Is(this,n,t,e))}return n.settings}};return i}var Ps=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},Ls=function(e){throw e.isHandled=!0,e},js=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()},zs=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()},Fs=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(Ls):Promise.reject()};function Bs(e){var t=e.hc,n=e.source,r=e.coloring,i={data:{extract:[{source:"dummy",field:0,filter:function(){return i.expando=t.qDataPages[0]?t.qDataPages[0].qArea.qTop:0,!1}},{source:n,field:r.field,trackBy:r.valueAccessor,reduce:"first",props:{row:{reduce:function(){return i.expando++}},text:{value:function(e){return e.qText},reduce:"first"}}}]},expando:0};return i}function Vs(e){return function(t){return"object"===ua(t.datum[e])?t.datum[e].value:void 0}}function Hs(e){return"object"===ua(e.datum.isNull)?e.datum.isNull.value:-2===e.datum.value}function $s(e){return-3===e.datum.value}var Us=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"},Ws=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 Ys(e,t){var n=e.styleReference,r=e.chart,i=e.rtl,o=t.legendProps,a=t.coloring,s=t.theme,l=t.hc;return{layout:{minimumLayoutMode:"MEDIUM",dock:Us(o,r,i)},show:"function"==typeof o.show?function(){return Ws(o,l,a)}:Ws(o,l,a),renderer:"svg",mounted:function(e){e.childNodes[0].style.pointerEvents="none",e.style.overflow="hidden"},settings:{title:{show:!1!==o.showTitle,wordBreak:"break-word",maxLines:2,lineHeight:1.2,text:a.label||"",fill:s?s.getStyle(n,"legend.title","color"):void 0,fontSize:s?s.getStyle(n,"legend.title","fontSize"):"16px",fontFamily:s?s.getStyle(n,"legend.title","fontFamily"):"QlikView Sans, sans-serif"}}}}function Xs(e,t,n){var r=[],i=[],o=function(e,t,n){return"categorical"===t.coloring.type?function(e,t,n){var r=Ys(e,t);if(!r.show)return!1;var i=e.key,o=e.styleReference,a=e.viewState,s=e.rtl,l=e.settings,u=e.style,c=t.scaleKey,d=t.theme,f=t.scales,h={up:"M13.6,11 L2.4,11 C2.28954305,11 2.2,10.9104569 2.2,10.8 C2.2,10.756726 2.21403557,10.7146192 2.24,10.68 L7.84,3.21333333 C7.90627417,3.12496777 8.03163444,3.10705916 8.12,3.17333333 C8.13516113,3.18470418 8.14862915,3.1981722 8.16,3.21333333 L13.76,10.68 C13.8262742,10.7683656 13.8083656,10.8937258 13.72,10.96 C13.6853808,10.9859644 13.643274,11 13.6,11 Z",down:"M2.4,4 L13.6,4 C13.7104569,4 13.8,4.08954305 13.8,4.2 C13.8,4.24327404 13.7859644,4.28538077 13.76,4.32 L8.16,11.7866667 C8.09372583,11.8750322 7.96836556,11.8929408 7.88,11.8266667 C7.86483887,11.8152958 7.85137085,11.8018278 7.84,11.7866667 L2.24,4.32 C2.17372583,4.23163444 2.19163444,4.10627417 2.28,4.04 C2.31461923,4.01403557 2.35672596,4 2.4,4 Z",left:"M11,2.4 L11,13.6 C11,13.7104569 10.9104569,13.8 10.8,13.8 C10.756726,13.8 10.7146192,13.7859644 10.68,13.76 L3.21333333,8.16 C3.12496777,8.09372583 3.10705916,7.96836556 3.17333333,7.88 C3.18470418,7.86483887 3.1981722,7.85137085 3.21333333,7.84 L10.68,2.24 C10.7683656,2.17372583 10.8937258,2.19163444 10.96,2.28 C10.9859644,2.31461923 11,2.35672596 11,2.4 Z",right:"M4,13.6 L4,2.4 C4,2.28954305 4.08954305,2.2 4.2,2.2 C4.24327404,2.2 4.28538077,2.21403557 4.32,2.24 L11.7866667,7.84 C11.8750322,7.90627417 11.8929408,8.03163444 11.8266667,8.12 C11.8152958,8.13516113 11.8018278,8.14862915 11.7866667,8.16 L4.32,13.76 C4.23163444,13.8262742 4.10627417,13.8083656 4.04,13.72 C4.01403557,13.6853808 4,13.643274 4,13.6 Z"},p="".concat(c,"Legend");return Ta(!0,r,{type:"legend-cat",key:"".concat(i,"-cat"),scale:p in f?p:c,settings:{layout:{scrollOffset:function(){return a?a.get("legendScrollOffset"):void 0},size:-1!==["top","bottom"].indexOf(r.layout.dock)?2:1,direction:s?"rtl":"ltr",horizontal:20},item:{show:function(e){return-2!==e.datum.value},label:{fill:d?d.getStyle(o,"legend.label","color"):void 0,fontSize:d?d.getStyle(o,"legend.label","fontSize"):void 0,fontFamily:d?d.getStyle(o,"legend.label","fontFamily"):"QlikView Sans, sans-serif"}},navigation:{disabled:n,button:{content:function(e,t){var n=t.direction;return e("i",{style:{"pointer-events":"none",fontSize:"12px",display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizelegibility",margin:"0px"}},[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor"},[e("path",{d:h[n]})])])}}}},brush:{consume:[{context:"selection",data:["",i],style:{inactive:{opacity:.3}}}]}},{settings:l,style:u})}(e,t,n):"continuous"===t.coloring.type&&function(e,t){var n=e.key,r=e.styleReference,i=e.rtl,o=e.settings,a=e.style,s=t.scaleKey,l=t.theme,u=Ys(e,t);return!!u.show&&Ta(!0,u,{type:"legend-seq",key:"".concat(n,"-seq"),settings:{fill:s,major:"".concat(s,"Range"),length:1,tick:{fill:l?l.getStyle(r,"legend.label","color"):void 0,fontSize:l?l.getStyle(r,"legend.label","fontSize"):void 0,fontFamily:l?l.getStyle(r,"legend.label","fontFamily"):"QlikView Sans, sans-serif"},title:{anchor:!i||"top"!==u.layout.dock&&"bottom"!==u.layout.dock?void 0:"right",padding:parseFloat(u.settings.title.fontSize)||16}}},{settings:o,style:a})}(e,t)}(e,t,n&&n.navigationDisabled);return r.push(o),o&&"legend-cat"===o.type&&(i.push(function(e){var t=e.key,n=e.requireFailure,r=e.recognizeWith,i=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:tap-".concat(t),type:"Tap",requireFailure:n,recognizeWith:r,options:{event:"legendtap",interval:10,pointers:1,enable:function(e,n){var r;if(!n)return!0;if(null!=i&&null!==(r=i.interact)&&void 0!==r&&r.enabled&&!i.interact.enabled())return!1;if(!this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some((function(e){return e.key==="".concat(t,"-cat")})))return!1;var o=n.srcEvent.target;return!!(o&&o.hasAttribute("data-action")&&o.hasAttribute("data-component-key"))||!(!o||!o.childNodes[0]||"BUTTON"!==o.childNodes[0].nodeName)}},events:{legendtap:function(e){e.preventDefault();var t=e.srcEvent.target;t&&t.hasAttribute("data-action")&&t.hasAttribute("data-component-key")&&this.chart.component(t.getAttribute("data-component-key")).emit(t.getAttribute("data-action"))}}}}(e,n)),i.push(function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.eventName,r=t.key,i=t.requireFailure,o=t.recognizeWith,a=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:pan-".concat(r),type:"Pan",requireFailure:i,recognizeWith:o,options:{event:n,pointers:1,threshold:10,enable:function(e,t){var i;return this.started===n||!t||!(null!=a&&null!==(i=a.interact)&&void 0!==i&&i.enabled&&!a.interact.enabled())&&this.chart.componentsFromPoint({x:t.center.x,y:t.center.y}).some((function(e){return e.key==="".concat(r,"-cat")}))}},events:(e={},fa(e,"".concat(n,"start"),(function(e){e.preventDefault(),this.started!==n&&(this.started=n,this.chart.component("".concat(r,"-cat")).emit("panstart",e))})),fa(e,"".concat(n,"move"),(function(e){e.preventDefault(),this.chart.component("".concat(r,"-cat")).emit("panmove",e)})),fa(e,"".concat(n,"end"),(function(e){e.preventDefault(),this.chart.component("".concat(r,"-cat")).emit("panend",e),this.started=!1})),e)}}(e,n))),{interactions:i,components:r}}var Gs=function(e){return"rgba(".concat([(16711680&e)>>16,(65280&e)>>8,255&e,((4278190080&e)>>>24)/255].join(","),")")};var Ks=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function Js(e){var t=e.qHyperCube,n=t.qDimensionInfo,r=t.qMeasureInfo,i=n.some(Ks),o=r.some(Ks),a=e.color.useBaseColors;return"measure"===a&&!o||"dimension"===a&&!i?"off":a}function Zs(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=pa(pa(pa({},e),t),{},{colorProps:pa(pa({},e.colorProps),t.colorProps||{})});return n}var Qs=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function el(e){var t,n=e.qHyperCube.qDimensionInfo.some(Qs),r=e.qHyperCube.qMeasureInfo.some(Qs),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 tl=function(){};function nl(e){var t,n,r,i,o=e.picasso,a=e.model,s=e.app,l=e.translator,u=e.layoutService,c=void 0===u?void 0:u,d=e.createConfig,f=void 0===d?tl:d,h=e.config,p=void 0===h?{}:h,m=e.custom,y=void 0===m?{}:m,g=p.localeInfo,v=p.key,b=p.theme,x=void 0===b?void 0:b,M=p.auto,S=void 0===M?void 0:M,w=p.definitionPath,E=null==c||null===(t=c.getLayout)||void 0===t?void 0:t.call(c),k={theme:x,key:v,localeInfo:g,layout:E,hc:null==c||null===(n=c.getHyperCube)||void 0===n?void 0:n.call(c),legendProps:null==c||null===(r=c.getLayoutValue)||void 0===r?void 0:r.call(c,"legend"),colorProps:pa(pa({},null==c||null===(i=c.getLayoutValue)||void 0===i?void 0:i.call(c,"color")),{},{useBaseColors:E?Js(E):void 0})},C=function(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.auto,n=_s(e.resources).auto(t||function(){return{mode:"byDimension",persistent:!1,useDimColVal:!0,byDimDef:{activeDimensionIndex:0,type:"expression",label:""}}}).getDimensionColorMap((function(e,t){var n=t.layout,r=t.app;return js(e,{layout:n,app:r})})).getMeasure((function(e,t){var n=t.layout,r=t.app;return zs(e,{layout:n,app:r})})).getAttributeDimension((function(e,t){var n=t.layout,r=t.model,i=t.app;return Fs(e,{layout:n,model:r,app:i})}));return n.getSnapshotData=Ps,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=pa({},i),r={},!n.key)throw new Error("Missing key");t.set(pa(pa({},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=pa(pa({},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];if(l){var u=l.colors[0]?l.colors:[[]].concat(ga(l.colors.slice(1)));u=Array.isArray(u[0])?u.map((function(e){return e.slice().reverse()})):u.slice().reverse(),i.push({key:"quant",colors:u})}}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 u={override:!0,domain:n.explicit&&"function"==typeof n.explicit.domain?n.explicit.domain:[].concat(ga((n.explicit||{}).domain||[]),[-3,-2]),range:n.explicit&&"function"==typeof n.explicit.range?n.explicit.range:[].concat(ga((n.explicit||{}).range||[]),[n.others,n.nil])};if("field"===n.mode){if("dimension"===n.fieldType){var c,d=Bs({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]}}),c={source:"attrDim",extract:{field:"qDimensionInfo/0",filter:function(e){return e.qElemNumber>=0},props:{row:{value:function(e){return h[e.qElemNumber]}}}}}}var p={data:d,range:n.range,domain:n.domain,explicit:u,type:"categorical-color",label:function(e){return e.datum.text&&e.datum.text.value?e.datum.text.value:e.datum.label}};s[l]=p,c&&(s["".concat(l,"Legend")]=pa(pa({},p),{},{data:c})),t&&t.qHasOtherValues&&c&&((c||p.data).amend=[{label:t.qDimensionInfo[0].othersLabel,source:{key:"qHyperCube",field:"qDimensionInfo/0"},row:{value:-3},value:-3}])}else if("measure"===n.fieldType){var m={data:{field:n.field},min:n.min,max:n.max};s[l]=Ta({},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")]=Ta({},m,{invert:!!r}))}else if("color"!==n.type)throw new Error("UNUSED FIELD")}else if("dimension"===n.mode){var y={data:t.qDimensionInfo.map((function(e,t){return t})),label:function(e){return t.qDimensionInfo[e.datum.value].qFallbackTitle},explicit:u,type:"categorical-color"};s[l]=y}else if("measure"===n.mode){var g={data:t.qMeasureInfo.map((function(e,t){return t})).filter((function(e){var t,r;return!(null!==(t=n.explicit)&&void 0!==t&&null!==(r=t.exclude)&&void 0!==r&&r.includes(e))})),label:function(e){return t.qMeasureInfo[e.datum.value].qFallbackTitle},explicit:u,type:"categorical-color"};s[l]=g}}return s}({hc:n.hc,coloring:i(),key:n.key,source:n.source,picasso:e.picasso}),r.scales},color:function(){return r.color=r.color||function(e){var t=e.coloring,n=e.scales,r=e.key,i=Vs(r),o=Vs("".concat(r,"IsAnOther")),a=function(e,t){var r=e.fieldType,a=e.invalid,s=e.mode,l=e.nil,u=e.others,c=e.primary,d=e.type;return a?function(e){return $s(e)||o(e)?u:l}:n[t]?function(e){return $s(e)?u:Hs(e)||-2===i(e)&&"dimension"===r||"NaN"===i(e)?l:o(e)?u:e.resources.scale(t)(i(e))||u}:"constant"===s?function(e){return $s(e)||o(e)?u:Hs(e)?l:c}:"color"===d?function(e){return $s(e)||o(e)?u:Hs(e)?l:i(e)||u}:null},s=a(t,r);if(t.measureOverrides){var l=Vs("".concat(r,"MeasureIdx")),u=t.measureOverrides.map((function(e){return e&&a(e)}));return function(e){var t=l(e);return u[t]?u[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,u=a,c=i.nil;"field"===i.mode&&i.field?t=i.field:o[a]&&"field"===i.mode&&(t=o[a].data.field||i.field),t?(n={field:t,reduce:"first"},"color"===i.type&&(n.value=function(e){return"NaN"!==e.qNum?Gs(e.qNum):e.qText&&Ja(e.qText)?e.qText:c})):"dimension"===i.mode?n=void 0!==i.field?i.field:r.qDimensionInfo.length-1:"measure"===i.mode&&(n=l);var d=fa({},u,n);return r.qDimensionInfo.length>1&&(d["".concat(u,"IsAnOther")]={fields:r.qDimensionInfo.map((function(e,t){return{field:"qDimensionInfo/".concat(t)}})),value:function(e){return-1!==e.indexOf(-3)}}),s&&(d["".concat(u,"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,u=void 0===l?"object.legend":l,c=e.settings,d=void 0===c?{}:c,f=e.style,h=arguments.length>1?arguments[1]:void 0;return Xs({eventName:t,key:r,rtl:s,viewState:o,chart:a,styleReference:u,settings:d,style:void 0===f?{}:f},{legendProps:n.legendProps,scaleKey:n.key,coloring:i(),theme:n.theme,hc:n.hc,scales:this.scales()},h)}};return o}({picasso:o,model:a,app:s,translator:l,auto:S});!1!==S&&C.auto((function(e){return S?S({layout:e,defaultAuto:el}):el(e)}));var O=!1;return{getColor:function(){return C.color()},getPaletteColor:function(e){var t=e.index,n=e.color;return C.resolveUIColor({index:t,color:n})},getData:function(){return C.data()},getDatumProps:function(e){return C.datumProps(e)},getSnapshotData:function(){return C.getSnapshotData(w)},getSettingsForMeasure:function(e){return C.settingsForMeasure(e)},getSettings:function(){return C.settings()},getLegend:function(e,t){return C.legend(e,t)},getScales:function(){return C.scales()},getPalettes:function(){return C.palettes()},isSelectionLocked:function(e){var t=e.isMeasureSelectionLocked;return C.isSelectionLocked({isMeasureSelectionLocked:t})},isInitialized:function(){return O},custom:pa({},y),initialize:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.createConfig,n=void 0===t?f:t,r=n({getUseBaseColors:Js}),i=Zs(k,r);C.config(i);var o=C.getAuxiliarySettings(w).then((function(){O=!0}));return o}}}function rl(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 il=[{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 ol(e){var t=e.width,n=e.height,r=il.filter((function(e){return t>=e.size.width&&n>=e.size.height})).shift();return r?r.key:"SPARK"}var al={left:"right",right:"left",top:"bottom",bottom:"top",near:"far",far:"near"};function sl(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?al[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:al[o],start:a,end:al[a]}}function ll(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,u={chart:{size:void 0,mode:void 0},x:{dock:void 0,opposite:void 0,size:void 0},y:{dock:void 0,opposite:void 0,size:void 0}},c={type:"x-y",meta:u,update:function(e){u.chart.size={width:e.width,height:e.height},u.chart.mode=ol(e);var t=sl({orientation:"horizontal",dock:n.getLayoutValue("xAxis.dock"),btt:!1,rtl:l}),r=t.current,i=t.opposite;u.x.dock=r,u.x.opposite=i,u.x.size=e.width;var o=sl({orientation:"vertical",dock:n.getLayoutValue("yAxis.dock"),btt:!0,rtl:l}),a=o.current,s=o.opposite;u.y.dock=a,u.y.opposite=s,u.y.size=e.height}};return c.update(rl({chart:t,logicalSize:a})),c}var ul="vertical",cl="horizontal";function dl(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,u=i.rtl,c=void 0!==u&&u,d=a.fallback===ul?ul:cl,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",meta:p,update:function(e){p.chart.orientation=n.getLayoutValue("orientation",d),p.chart.size={width:e.width,height:e.height},p.chart.mode=ol(e),p.major.orientation=function(e){var t=e.chartOrientation,n=e.invert;return e.layoutService.meta.isContinuous?cl:n?t===ul?cl:ul:t}({layoutService:n,chartOrientation:p.chart.orientation,invert:f});var t=sl({orientation:p.major.orientation,dock:n.getLayoutValue("dimensionAxis.dock"),btt:!1,rtl:c}),r=t.current,i=t.opposite;p.major.dock=r,p.major.opposite=i,p.major.size=p.major.orientation===ul?e.height:e.width,h.forEach((function(t){var r={};r.orientation=p.major.orientation===ul?cl:ul;var i=sl({orientation:r.orientation,dock:n.getLayoutValue("".concat(t.ref,".dock")),btt:!0,rtl:c}),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===ul?e.height:e.width,p[t.name]=r}))}};return m.update(rl({chart:t,logicalSize:l})),m}function fl(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?ll:dl)({chart:t,layoutService:n,config:i,typeConfig:a})}function hl(e,t,n){if(void 0===e||void 0===t)return n;for(var r=t.split("."),i=e,o=0;o<r.length;++o){var a=r[o];if(void 0===i[a])return n;i=i[a]}return i}function pl(e,t,n){if(void 0!==e&&void 0!==t){for(var r=t.split("."),i=r[r.length-1],o=e,a=0;a<r.length-1;++a){var s=r[a];void 0===o[s]&&(o[s]=Number.isNaN(+r[a+1])?{}:[]),o=o[s]}void 0!==n?o[i]=n:delete o[i]}}function ml(){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 yl(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return function(){for(var r=this,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var s=function(){return e.apply(r,o)};clearTimeout(t),t=setTimeout(s,n)}}function gl(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 u=Date.now()-o,c=function(){o=Date.now(),r=0,e.apply(t,n)};r||(u>=i?c():r=setTimeout(c,i-u))}}function vl(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 bl(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:vl(e)}}}(e);case"K":return function(e){var t=vl(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=vl(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 xl(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 Ml(e){return(Ml="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Sl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function El(e,t,n){return t&&wl(e.prototype,t),n&&wl(e,n),e}function kl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cl(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 Ol(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Cl(Object(n),!0).forEach((function(t){kl(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Tl(e,t){return(Tl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Al(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function Nl(e,t,n){return(Nl=Al()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&Tl(i,n.prototype),i}).apply(null,arguments)}function ql(e){return function(e){if(Array.isArray(e))return Rl(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Dl(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 Dl(e,t){if(e){if("string"==typeof e)return Rl(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)?Rl(e,t):void 0}}function Rl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Il=Object.prototype.hasOwnProperty,_l=Object.prototype.toString,Pl=Object.defineProperty,Ll=Object.getOwnPropertyDescriptor,jl=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===_l.call(e)},zl=function(e){if(!e||"[object Object]"!==_l.call(e))return!1;var t,n=Il.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Il.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||Il.call(e,t)},Fl=function(e,t){Pl&&"__proto__"===t.name?Pl(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Bl=function(e,t){if("__proto__"===t){if(!Il.call(e,t))return;if(Ll)return Ll(e,t).value}return e[t]},Vl=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<u;++l)if(null!=(t=arguments[l]))for(n in t)r=Bl(s,n),s!==(i=Bl(t,n))&&(c&&i&&(zl(i)||(o=jl(i)))?(o?(o=!1,a=r&&jl(r)?r:[]):a=r&&zl(r)?r:{},Fl(s,{name:n,newValue:e(c,a,i)})):void 0!==i&&Fl(s,{name:n,newValue:i}));return s};function Hl(e,t,n){if(!e)return-1;var r=n.cache,i=e.origin?e.origin():null;i&&(e=i);var o=r.fields.indexOf(e),a=-1,s=-1;if(-1===o)for(var l=0;l<r.wrappedFields.length;l++)if(s=r.wrappedFields[l].attrDims.map((function(e){return e.instance})).indexOf(e),a=r.wrappedFields[l].attrExps.map((function(e){return e.instance})).indexOf(e),-1!==s||-1!==a){o=l;break}return(o-=t.qArea.qLeft)<0||o>=t.qArea.qWidth?-1:s>=0?function(e){return e[o].qAttrDims.qValues[s]}:a>=0?function(e){return e[o].qAttrExps.qValues[a]}:function(e){return e[o]}}function $l(e,t,n){var r=n.key,i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function Ul(e){var t=e.cache,n=e.f,r=e.mainCell,i=e.p;e.prop;var o=e.page,a=e.rowIdx,s=e.row,l=e.sourceKey,u=e.target,c=e.targetProp,d=r;if(i.field&&i.field!==n){var f=Hl(i.field,o,{cache:t});if(-1===f)return;d=Vl({qRow:a},f(s))}u[c]=$l(i,d,{key:l})}function Wl(e,t,n,r){for(var i=Array.isArray(e)?e:[e],o=[],a=0;a<i.length;a++)if(void 0!==i[a].field){for(var s=t.raw(),l=t.key(),u="object"===Ml(i[a].field)?i[a].field:t.field(i[a].field),c=r.normalizeConfig(i[a],t),d=c.props,f=c.main,h=Object.keys(d),p=!!i[a].trackBy,m=Ml(i[a].trackBy),y={},g=[],v=[],b=0;b<s.qDataPages.length;b++){var x=Hl(u,s.qDataPages[b],{cache:n});if(-1!==x)for(var M=0;M<s.qDataPages[b].qMatrix.length;M++){var S=s.qDataPages[b].qArea.qTop+M,w=Vl({qRow:S},x(s.qDataPages[b].qMatrix[M])),E=$l(f,w,{key:l});if(!f.filter||f.filter(w)){for(var k=0;k<h.length;k++){var C=d[h[k]],O=C.fields||[C];C.fields&&(E[h[k]]=[]);for(var T=0;T<O.length;T++)Ul({cache:n,f:u,mainCell:w,p:O[T],prop:h[k],props:d,page:s.qDataPages[b],rowIdx:S,row:s.qDataPages[b].qMatrix[M],sourceKey:l,target:C.fields?E[h[k]]:E,targetProp:C.fields?T:h[k]});if(C.fields){var A=E[h[k]].map((function(e){return e.value})),N=E[h[k]].map((function(e){return e.label}));E[h[k]]={value:"function"==typeof C.value?C.value(A):void 0!==C.value?C.value:A,label:"function"==typeof C.label?C.label(N):void 0!==C.label?String(C.label):String(E[h[k]].value)}}}p&&r.track({cfg:i[a],itemData:w,obj:E,target:g,tracker:y,trackType:m}),v.push(E)}}}p?o.push.apply(o,ql(r.collect(g,{main:f,propsArr:h,props:d}))):o.push.apply(o,v)}return o}function Yl(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 Xl(e,t){var n,r,i,o,a,s=new Zl(e),l=+e.value&&(s.value=e.value),u=[s];for(null==t&&(t=Gl);n=u.pop();)if(l&&(n.value=+n.data.value),(i=t(n.data))&&(a=i.length))for(n.children=new Array(a),o=a-1;o>=0;--o)u.push(r=n.children[o]=new Zl(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Jl)}function Gl(e){return e.children}function Kl(e){e.data=e.data.data}function Jl(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function Zl(e){this.data=e,this.depth=this.height=0,this.parent=null}function Ql(e){if("function"!=typeof e)throw new Error;return e}Zl.prototype=Xl.prototype={constructor:Zl,count:function(){return this.eachAfter(Yl)},each:function(e){var t,n,r,i,o=this,a=[o];do{for(t=a.reverse(),a=[];o=t.pop();)if(e(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r])}while(a.length);return this},eachAfter:function(e){for(var t,n,r,i=this,o=[i],a=[];i=o.pop();)if(a.push(i),t=i.children)for(n=0,r=t.length;n<r;++n)o.push(t[n]);for(;i=a.pop();)e(i);return this},eachBefore:function(e){for(var t,n,r=this,i=[r];r=i.pop();)if(e(r),t=r.children)for(n=t.length-1;n>=0;--n)i.push(t[n]);return this},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){var e=[];return this.each((function(t){e.push(t)})),e},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return Xl(this).eachBefore(Kl)}};var eu={depth:-1},tu={};function nu(e){return e.id}function ru(e){return e.parentId}function iu(e,t){"/"===e.charAt(0)&&(e=e.substring(1));for(var n,r=e.split("/"),i=t,o=0;o<r.length;o++){if("*"===r[o]&&Array.isArray(i)){var a=[];n=r.slice(o+1).join("/");for(var s=0;s<i.length;s++){var l=iu(n,i[s]);Array.isArray(l)?a.push.apply(a,ql(l)):a.push(l)}return a}if(!r[o]&&Array.isArray(i)){var u=new Array(i.length);n=r.slice(o+1).join("/");for(var c=0;c<i.length;c++)u[c]=iu(n,i[c]);return u}r[o]in i&&(i=i[r[o]])}return i}function ou(e,t,n){var r=[];if(!e||!e.length)return r;if(t<=0){var i=n>=0?[e[n]]:e;r.push.apply(r,ql(i))}else for(var o=0;o<e.length;o++)e[o].children&&e[o].children.length&&r.push.apply(r,ql(ou(e[o].children,t-1,n)));return r}function au(e,t,n){if(e===t)return function(e){return e};if(e>t){var r=Math.max(0,Math.min(100,e-t)),i=ql(Array(r)).map(String.prototype.valueOf,"parent").join(".");return Function("node","return node.".concat(i,";"))}if(t>e){var o=Math.max(0,Math.min(100,t-e));return function(e){return ou(e.children,o-1,n)}}return!1}function su(e,t){var n=t.cache;if("number"==typeof e)return n.fields[e];var r=n.allFields;if("function"==typeof e){for(var i=0;i<r.length;i++)if(e(r[i]))return r[i];return!1}if("string"==typeof e){for(var o=0;o<r.length;o++)if(r[o].key()===e||r[o].title()===e)return r[o]}else if(e&&-1!==r.indexOf(e))return e;throw Error("Field not found: ".concat(e))}var lu=/^qDimensionInfo(?:\/(\d+))?/,uu=/^\/?qMeasureInfo\/(\d+)/,cu=/\/qAttrExprInfo\/(\d+)/,du=/\/qAttrDimInfo\/(\d+)/;function fu(e){return(e.qColumnOrder&&e.qColumnOrder.length?e.qColumnOrder:e.qDimensionInfo.map((function(e,t){return t}))).filter((function(t){return t<e.qDimensionInfo.length}))}function hu(e,t){var n=t.cube;if(!e)return-1;var r=e.origin&&e.origin()?e.origin().key():e.key(),i=!1,o=-1,a=-1,s=-1,l=-1,u=-1,c=r,d=n.qEffectiveInterColumnSortOrder,f=fu(n);return lu.test(c)&&(i=!0,o=+lu.exec(c)[1],c=r.replace(lu,"")),uu.test(c)&&("K"===n.qMode?l=+uu.exec(c)[1]:d&&-1!==d.indexOf(-1)?(l=+uu.exec(c)[1],u=0):u=+uu.exec(c)[1],c=c.replace(uu,"")),c&&(du.exec(c)?s=+du.exec(c)[1]:cu.exec(c)&&(a=+cu.exec(c)[1])),{fieldDepth:(i?"S"===n.qMode?f[o]:d?d.indexOf(o):o:d&&-1!==d.indexOf(-1)?d.indexOf(-1):n.qDimensionInfo.length-("K"===n.qMode?0:1))+1,pseudoMeasureIndex:l,measureIdx:u,attrDimIdx:s,attrIdx:a}}function pu(e,t){var n,r,i=au(e.fieldDepth,t.fieldDepth,t.pseudoMeasureIndex);return n=t.measureIdx>=0?function(e){return e.data.qValues[t.measureIdx]}:function(e){return e.data},t.attrDimIdx>=0?r=function(e){var n;return null==e||null===(n=e.qAttrDims)||void 0===n?void 0:n.qValues[t.attrDimIdx]}:t.attrIdx>=0&&(r=function(e){var n;return null==e||null===(n=e.qAttrExps)||void 0===n?void 0:n.qValues[t.attrIdx]}),{nodeFn:i,attrFn:r,valueFn:n}}function mu(e,t,n){var r=n.key,i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function yu(e){for(var t=e.propsArr,n=e.props,r=e.item,i=e.itemData,o=e.ret,a=e.sourceKey,s=0;s<t.length;s++){var l=n[t[s]],u=l.fields||[l],c=void 0,d=void 0;l.fields&&(c=[],d=[]);for(var f=function(e){var n=u[e],f=void 0,h=void 0,p=void 0,m=void 0,y=void 0,g=void 0;if("primitive"===n.type?(p=n.value,g=String(n.value)):("function"==typeof n.value&&(f=function(e){return n.value(e,r)}),"function"==typeof n.label&&(h=function(e){return n.label(e,r)}),n.accessor?(m=n.accessor(r),Array.isArray(m)?(y=m.map(n.valueAccessor),n.attrAccessor&&(y=y.map(n.attrAccessor)),f&&(p=y.map(f),f=null),h&&(g=y.map(h),h=null),p=n.reduce?n.reduce(p):p,g=n.reduceLabel?n.reduceLabel(g,p):String(p)):g=p=n.attrAccessor?n.attrAccessor(n.valueAccessor(m)):n.valueAccessor(m)):(p=i,g=i)),l.fields){var v=f?f(p):p;c.push(v),d.push(h&&null!=g?h(g):null!=g?g:String(v))}else{var b=f?f(p):p;o[t[s]]={value:b,label:h?h(g):null!=g?g:String(b)},n.field&&(o[t[s]].source={field:n.field.key(),key:a})}},h=0;h<u.length;h++)f(h);c&&(o[t[s]]={value:"function"==typeof l.value?l.value(c,r):c,label:"function"==typeof l.label?l.label(d,r):d})}}var gu=function(e,t,n){var r="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",i="K"===e.qMode?"qSubNodes":"qNodes",o=iu(r,e);return o&&o[0]?(t.tree=Xl(o[0],n.children||function(e){return e[i]}),t.tree):null};function vu(e){for(var t=e.raw().qDataPages.length?e.raw().qDataPages[0].qMatrix:[],n=function(e){var t=e.raw().qColumnOrder,n=e.fields();return t&&t.length===n.length?t:n.map((function(e,t){return t}))}(e),r=e.fields(),i=e.fields().filter((function(e){return"dimension"===e.type()})).map((function(e){return n.indexOf(r.indexOf(e))})),o=e.fields().filter((function(e){return"measure"===e.type()})).map((function(e){return n.indexOf(r.indexOf(e))})),a={__root:{__id:"__root",qValues:[]}},s=0;s<t.length;s++){for(var l=t[s],u="__root",c=!1,d=0;d<i.length;d++){var f=l[i[d]],h="".concat(u,"__").concat(f.qText);a[h]||(a[h]=Ol({__id:h,__parent:u,qValues:[]},f),c=!0),u=h}if(c)for(var p=0;p<o.length;p++){var m=l[o[p]];a[u].qValues.push(m)}}var y=Object.keys(a).map((function(e){return a[e]}));return function(){var e=nu,t=ru;function n(n){var r,i,o,a,s,l,u,c=n.length,d=new Array(c),f={};for(i=0;i<c;++i)r=n[i],s=d[i]=new Zl(r),null!=(l=e(r,i,n))&&(l+="")&&(f[u="$"+(s.id=l)]=u in f?tu:s);for(i=0;i<c;++i)if(s=d[i],null!=(l=t(n[i],i,n))&&(l+="")){if(!(a=f["$"+l]))throw new Error("missing: "+l);if(a===tu)throw new Error("ambiguous: "+l);a.children?a.children.push(s):a.children=[s],s.parent=a}else{if(o)throw new Error("multiple roots");o=s}if(!o)throw new Error("no root");if(o.parent=eu,o.eachBefore((function(e){e.depth=e.parent.depth+1,--c})).eachBefore(Jl),o.parent=null,c>0)throw new Error("cycle");return o}return n.id=function(t){return arguments.length?(e=Ql(t),n):e},n.parentId=function(e){return arguments.length?(t=Ql(e),n):t},n}().id((function(e){return e.__id})).parentId((function(e){return e.__parent}))(y)}var bu=function(e){for(var t=e.propsArr,n=e.props,r=e.cube,i=e.cache,o=e.itemDepthObject,a=e.f,s=0;s<t.length;s++)for(var l=n[t[s]],u=l.fields?l.fields:[l],c=0;c<u.length;c++){var d=u[c];if(d.field!==a){var f=pu(o,hu(d.field,{cube:r,cache:i}));d.accessor=f.nodeFn,d.valueAccessor=f.valueFn,d.attrAccessor=f.attrFn}}};function xu(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=t.raw(),o=t.key(),a="S"===i.qMode?vu(t):gu(i,n,e);if(!a)return null;for(var s=a.height,l=[],u=0;u<=s;u++){var c=null;if(u>0)if("S"===i.qMode){var d=fu(i),f=d[u-1];c=n.fields[f]}else{var h=i.qEffectiveInterColumnSortOrder[u-1];u>i.qEffectiveInterColumnSortOrder.length&&(h=i.qDimensionInfo.length),c=n.fields[h]}var p=r.normalizeConfig(Ol(Ol({},e),{},{field:c?c.key():void 0}),t),m=p.props,y=p.main,g=Object.keys(m);l[u]={propsArr:g,props:m,main:y};var v=c?hu(c,{cube:i,cache:n}):{fieldDepth:0};bu({propsArr:g,props:m,cube:i,cache:n,itemDepthObject:v,f:c})}for(var b=a.copy(),x=b.descendants(),M=a.descendants(),S=0;S<M.length;S++){var w=l[M[S].depth].propsArr,E=l[M[S].depth].props,k=l[M[S].depth].main,C=x[S],O=C.data,T=mu(k,O,{key:o});yu({propsArr:w,props:E,item:C,itemData:O,ret:T,sourceKey:o,isTree:!0}),M[S].data=T}return a}function Mu(e,t,n,r){for(var i=Array.isArray(e)?e:[e],o=[],a=0;a<i.length;a++)if(void 0!==i[a].field){var s=t.raw(),l=t.key();if(!gu(s,n,e))continue;var u="object"===Ml(i[a].field)?i[a].field:t.field(i[a].field),c=r.normalizeConfig(i[a],t),d=c.props,f=c.main,h=Object.keys(d),p=hu(u,{cube:s,cache:n}),m=pu({fieldDepth:0},p),y=m.nodeFn,g=m.attrFn,v=m.valueFn;bu({propsArr:h,props:d,cube:s,cache:n,itemDepthObject:p,f:u});for(var b=!!i[a].trackBy,x=Ml(i[a].trackBy),M={},S=[],w=y(n.tree),E=[],k=0;k<w.length;k++){var C=w[k],O=g?g(v(C)):v(C);if(!f.filter||f.filter(O)){var T=mu(f,O,{key:l});yu({propsArr:h,props:d,item:C,itemData:O,ret:T,sourceKey:l}),b&&r.track({cfg:i[a],itemData:O,obj:T,target:S,tracker:M,trackType:x}),E.push(T)}}b?o.push.apply(o,ql(r.collect(S,{main:f,propsArr:h,props:d}))):o.push.apply(o,E)}return o}var Su,wu=(function(e){
|
|
8
8
|
/*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
|
|
9
|
-
e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,i,o,a,s,l,u,c,d,f=e.length,h=e.search(/[0-9\-\+#]/),p=h>0?e.substring(0,h):"",m=e.split("").reverse().join(""),y=m.search(/[0-9\-\+#]/),g=f-y,v=e.substring(g,g+1),b=g+("."===v||","===v?1:0),x=y>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"),(!(u=t.split("."))[1]||u[1]&&u[1].length<=s)&&(t=(+t).toFixed(s+1)),c=e[0].split(o),e[0]=c.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;u[0].length<e[0].length-a;)u[0]="0"+u[0];else 0==+u[0]&&(u[0]="");if((t=t.split("."))[0]=u[0],l=c[1]&&c[c.length-1].length){for(m="",g=(d=t[0]).length%l,f=d.length,b=0;b<f;b++)m+=d.charAt(b),!((b-g+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}}(Su={exports:{}}),Su.exports);function Eu(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}var ku={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"},Cu=/%$/,Ou=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,Tu=/^\(oct\)/i,Au=/^\(dec\)/i,Nu=/^\(hex\)/i,qu=/^\(bin\)/i,Du=/^\(rom\)/i,Ru=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,Iu=/#|0/g;function _u(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 Pu(e,t,n){var r=Eu(e);return n?r:new RegExp(r||"",t)}function Lu(e,t,n){var r,i,o,a,s,l,u,c,d,f,h,p=e.pattern;p.indexOf("A")>=0&&(p=p.replace("A",""),e.abbreviate=!0),f=t,(h=n)&&(h=Eu(h)),f&&(f=Eu(f)),d=new RegExp("(?:[#0]+".concat(f,")?[#0]+(?:").concat(h,"[#0]+)?")),a=(o=(o=p.match(d))?o[0]:"")?p.substr(0,p.indexOf(o)):p,s=o?p.substring(p.indexOf(o)+o.length):"",o||(o=p?"#":"##########"),t&&t===n&&(i=(r=o.split(n)).pop(),o=r.join("")+n+i,t=""),l=t,t=/,/.test(n)?"¤":",",l&&(o=o.replace(Pu(l,"g"),t)),u=n,n=".",u&&(o=o.replace(Pu(u,"g"),n)),c=(c=o.match(/#/g))?c.length:0;var m,y=p.split(u);y[1]&&(m=y[1].match(Iu)),e.prefix=a||"",e.postfix=s||"",e.pattern=p,e.maxPrecision=m?m.length:2,e.percentage=Cu.test(p),e.numericPattern=o||"",e.numericRegex=new RegExp("".concat(Pu(t,null,!0),"|").concat(Pu(n,null,!0)),"g"),e.groupTemp=l,e.decTemp=u,e.t=t,e.d=n,e.temp=c}var ju=function(){function e(t,n,r,i,o){Sl(this,e),this.localeInfo=t,this.pattern=n,this.thousandDelimiter=r||",",this.decimalDelimiter=i||".",this.type=o||"numeric",this.patternSeparator=";",this.abbreviations=function(e,t){if(!e||!e.qNumericalAbbreviation)return ku;var n={};return e.qNumericalAbbreviation.split(t).forEach((function(e){var t=e.split(":");2===t.length&&(n[t[0]]=t[1])})),n}(t,this.patternSeparator),this.prepare()}return El(e,[{key:"clone",value:function(){var t=new e(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return t.subtype=this.subtype,t}},{key:"format",value:function(e,t,n,r){return this.prepare(t,n,r),this.formatValue(e)}},{key:"prepare",value:function(e,t,n){var r;void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===n&&(n=this.decimalDelimiter),e?(this._prepared={positive:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},negative:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},zero:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""}},r=this._prepared,e=e.split(this.patternSeparator),r.positive.pattern=e[0],r.negative.pattern=e[1],r.zero.pattern=e[2],Ru.test(e[0])&&(r.positive.isFunctional=!0),e[1]?Ru.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?Ru.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1,r.positive.isFunctional||Lu(r.positive,t,n),r.negative&&!r.negative.isFunctional&&Lu(r.negative,t,n),r.zero&&!r.zero.isFunctional&&Lu(r.zero,t,n)):this._prepared={pattern:!1}}},{key:"formatValue",value:function(e){var t,n,r,i,o,a,s,l,u,c=this._prepared,d="",f="",h=e;if(isNaN(e))return"".concat(h);if(e=+e,!1===c.pattern)return e.toString();if(0===e&&c.zero)return(c=c.zero).pattern;if(e<0&&c.negative?(c=c.negative,e=-e):c=c.positive,o=c.d,a=c.t,c.isFunctional)e=function(e,t,n){var r;return Ou.test(t)?e=_u(e,Number(/\d{2}/.exec(t)[0]),t,n):Tu.test(t)?e=_u(e,8,t,n):Au.test(t)?e=_u(e,10,t,n):Nu.test(t)?e=_u(e,16,t,n):qu.test(t)?e=_u(e,2,t,n):Du.test(t)&&(r="",e<0&&(r="-",e=-e),e=0===(e=Math.floor(e))?"0":e<=5e5?r+(e=function(e,t){for(var n,r="",i=Number(String(e).slice(-3)),o=(e-i)/1e3,a=[0,1,4,5,9,10,40,50,90,100,400,500,900].reverse(),s=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();i>0;)for(n=0;n<a.length;n++)if(a[n]<=i){r+=s[n],i-=a[n];break}for(n=0;n<o;n++)r="M".concat(r);return t[1]!==t[1].toUpperCase()&&(r=r.toLowerCase()),r}(e,t)):t+r+e.toExponential(0)),e}(e,c.pattern,o);else{if(c.percentage&&(e*=100),c.abbreviate){var p,m,y=Object.keys(this.abbreviations).map((function(e){return parseInt(e,10)})).sort((function(e,t){return e-t})),g=y[0];for(s=0,n=Number(Number(e).toExponential().split("e")[1]);g<=n&&s<y.length;)g=y[++s];s>0&&(p=y[s-1]),p&&n>0&&p>0?m=p:(n<0&&p<0||!p)&&(g<0&&g-n<=c.maxPrecision?m=g:p<=n&&!(g>0&&-n<=c.maxPrecision)&&(m=p)),m&&(d=this.abbreviations[m],e/=Math.pow(10,m))}if(r=Math.abs(e),t=c.temp,u=(l=c.numericPattern).split(o)[1],"I"===this.type&&(e=Math.round(e)),i=e,u||"#"!==l.slice(-1)[0])if(r>=1e15||r>0&&r<=1e-14)e=r?r.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{var v=Number(e.toFixed(Math.min(20,u?u.length:0)).split(".")[0]),b=l.split(o)[0];if(e=wu(b+=o,v)||"0",u){var x=Math.max(0,Math.min(14,u.length)),M=u.replace(/#+$/,"").length,S=("I"===this.type?0:r%1).toFixed(x).slice(2).replace(/0+$/,"");for(s=S.length;s<M;s++)S+="0";S&&(e+=o+S)}else 0===v&&(i=0)}else if(r>=Math.pow(10,t)||r<1||r<1e-4)0===e?e="0":r<1e-4||r>=1e20?(e=(e=i.toExponential(Math.max(1,Math.min(14,t))-1)).replace(/\.?0+(?=e)/,""),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=wu(l,e)}e=e.replace(c.numericRegex,(function(e){return e===a?c.groupTemp:e===o?c.decTemp:""})),i<0&&!/^-/.test(e)&&(e="-".concat(e))}return c.prefix+e+f+d+c.postfix}}],[{key:"getStaticFormatter",value:function(){return{prepare:function(){},formatValue:function(e){return"".concat(e)}}}}]),e}();function zu(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.size,o=void 0===i?5e3:i,a=r.multipleArguments,s=void 0!==a&&a,l=r.toKey,u=void 0===l?function(e){return e}:l,c=Object.create(null),d=Object.create(null),f=0,h=0;return(t=s?function(){return n=u.apply(void 0,arguments),t.has(n)?t.get(n):t.set(n,e.apply(void 0,arguments))}:function(r){return n=u(r),t.has(n)?t.get(n):t.set(n,e(r))}).set=function(e,t){return f>=o&&(delete c[d[h]],delete d[h],f--,h++),c[e]=t,d[f]=e,f++,t},t.get=function(e){return c[e]},t.has=function(e){return e in c},t.clear=function(){c=Object.create(null),d=Object.create(null),f=0,h=0},t.size=function(){return f},t}function Fu(e,t,n,r,i){var o=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Nl(ju,t)}(i,e,t,n,r),a=zu(o.formatValue.bind(o),{toKey:function(e){return isNaN(e)?e:+e}});function s(e){return a(e)}return s.format=function(e,t,n,r){return a.clear(),o.format(t,e,n,r)},s.pattern=function(e){return e&&(a.clear(),o.pattern=e,o.prepare()),o.pattern},s}var Bu=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Vu=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Hu=["January","February","March","April","May","June","July","August","September","October","November","December"],$u=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Uu(e,t){for(var n=e.length;n<t;n++)e="0".concat(e);return e}function Wu(e){var t=e.toString().split(".");return t[1]?t=Number("0.".concat(t[1])):0}var Yu=function(){function e(t,n,r){Sl(this,e);var i,o=t||{};o.qCalendarStrings||(o.qCalendarStrings={qLongDayNames:Bu,qDayNames:Vu,qLongMonthNames:Hu,qMonthNames:$u}),this.localeInfo=o,this.locale_days=o.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=o.qCalendarStrings.qDayNames.slice(),this.locale_months=o.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=o.qCalendarStrings.qMonthNames.slice(),n||(n=(kl(i={},"T",o.qTimeFmt||"hh:mm:ss"),kl(i,"D",o.qDateFmt||"YYYY-MM-DD"),kl(i,"TS",o.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"),i)[r]),this.pattern=n}return El(e,[{key:"clone",value:function(){var t=new e(this.localeInfo,this.pattern);return t.subtype=this.subtype,t}},{key:"format",value:function(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+]|\[|]/g,"");var n,r,i,o,a,s=/t+/gi.test(t);e instanceof Date?(i=s,o=(r=e).getUTCHours(),i&&((o%=12)||(o=12)),(a=r.getUTCDay()-1)<0&&(a=6),n={year:r.getUTCFullYear(),month:r.getUTCMonth(),day:a,date:r.getUTCDate(),h:o,m:r.getUTCMinutes(),s:r.getUTCSeconds(),f:r.getUTCMilliseconds(),t:r.getUTCHours()>=12?"pm":"am"}):(e<0&&(e=-e,t="-".concat(t)),n=function(e,t){var n,r=function(e){var t=e,n=24*Wu(t),r=60*Wu(n),i=60*Wu(r),o=1e3*Wu(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,u=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)&&(u=n?n.getDay()-1:0)<0&&(u=6);var c="";return n&&(c=n.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:u,date:i,h:o,m:a,s:s,f:l,t:c}}(e,t));var l=function(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:Uu("".concat(t.year).slice(-2),2),YYY:Uu("".concat(t.year).slice(-3),3),def:function(e){return Uu("".concat(t.year),e.length)}},"M+":{M:t.month+1,MM:Uu("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:Uu("".concat(t.day),2),WWW:e.locale_days_abbr[t.day],def:e.locale_days[t.day]},"D+|d+":{D:t.date,def:function(e){return Uu("".concat(t.date),e.length)}},"h+|H+":{h:t.h,def:function(e){return Uu("".concat(t.h),e.length)}},"m+":{m:t.m,def:function(e){return Uu("".concat(t.m),e.length)}},"s+|S+":{s:t.s,def:function(e){return Uu("".concat(t.s),e.length)}},"f+|F+":{def:function(e){var n="".concat(t.f),r=e.length-n.length;if(r>0)for(var i=0;i<r;i++)n+="0";else r<0&&(n=n.slice(0,e.length));return n}},"t{1,2}|T{1,2}":{def:function(e){var n=t.t;return e[0].toUpperCase()===e[0]&&(n=n.toUpperCase()),n.slice(0,e.length)}}}}(this,n),u=[];for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&u.push(c);var d=new RegExp(u.join("|"),"g");return t.replace(d,(function(e){var t,n,r;for(n in l)if(Object.prototype.hasOwnProperty.call(l,n)&&(t=new RegExp(n)).test(e))break;if(!t)return"";for(var i in l[n])if(i===e||i.toLowerCase()===e){void 0===(r=l[n][i])&&(r=l[n][i.toLowerCase()]);break}return void 0===r&&(r=l[n].def),"function"==typeof r&&(r=r(e)),r}))}}]),e}();function Xu(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Nl(Yu,t)}function Gu(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}function Ku(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=Xu(n,e,t),i=zu(r.format.bind(r),{toKey:function(e){return"object"===Ml(e)&&"function"==typeof e.getTime?e.getTime():e}});function o(e){return"IV"!==t?Gu(e):e}function a(e){return e=o(e),i(e)}return a.format=function(e,t){return i.clear(),t=o(t),r.format(t,e)},a.locale=function(n){return r=Xu(n,e,t),i=zu(r.format.bind(r),{toKey:function(e){return"object"===Ml(e)?e.getTime():e}}),this},a.qtype=function(e){return void 0!==e&&(t=e,i.clear()),t},a}function Ju(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return Ku(e.qNumFormat.qFmt,e.qNumFormat.qType,t);var n="#",r=t&&void 0!==t.qThousandSep?t.qThousandSep:",",i=t&&void 0!==t.qDecimalSep?t.qDecimalSep:".",o="U",a=e&&!!e.qIsAutoFormat;return e&&e.qNumFormat?(n=e.qNumFormat.qFmt||n,r=e.qNumFormat.qThou||r,i=e.qNumFormat.qDec||i,o=e.qNumFormat.qType||o,a=a&&-1===["M"].indexOf(e.qNumFormat.qType)):a=!0,(a||"U"===o)&&(n="#".concat(i,"##A"),o="U"),Fu(n,r,i,o,t)}function Zu(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.meta,r=t.id,i=t.key,o=t.localeInfo,a=t.fieldExtractor,s=t.value,l=t.type,u=t.sourceField,c=s||("dimension"===l?function(e){return e.qElemNo}:function(e){return e.qValue}),d=function(e){return e.qText||""},f="dimension"===l?"first":"avg",h=Ju(n,o),p="dimension"===l?"first":function(e,t){return h(t)},m={id:function(){return r},key:function(){return i},raw:function(){return n},title:function(){return n.qFallbackTitle||n.label},type:function(){return l},origin:function(){return u},items:function(){return e||(e=a(m)),e},min:function(){return n.qMin},max:function(){return n.qMax},value:c,label:d,reduce:f,reduceLabel:p,formatter:function(){return h},tags:function(){return n.qTags}};return m}function Qu(e,t,n,r,i){return(t[e]||[]).map((function(t,o){var a="".concat(r?"".concat(r,"/"):"").concat(e,"/").concat(o),s={instance:Zu(Vl({id:"".concat(n?"".concat(n,"/"):"").concat(a),key:a,meta:t},i))};return s.attrDims=Qu("qAttrDimInfo",t,n,a,Vl({},i,{value:function(e){return e.qElemNo},type:"dimension"})),s.attrExps=Qu("qAttrExprInfo",t,n,a,Vl({},i,{value:function(e){return e.qNum},type:"measure"})),s.measures=Qu("qMeasureInfo",t,n,a,Vl({},i,{value:function(e){return e.qValue},type:"measure"})),s}))}function ec(){var e,t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=r.key,o=r.data,a=r.config,s=void 0===a?{}:a,l={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},u=o;if(!u)throw new Error('Missing "data" input');if(!u.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');var c=ec.util,d={cache:l,cube:u,localeInfo:s.localeInfo,fieldExtractor:null,pages:null,hierarchy:function(){return null},virtualFields:s.virtualFields},f={key:function(){return i},raw:function(){return u},field:function(e){return su(e,d)},fields:function(){return l.fields.slice()},extract:function(e){return d.extractor(e,f,l,c)},hierarchy:function(e){return d.hierarchy(e,f,l,c)},_cache:function(){return l}};"K"===u.qMode||"T"===u.qMode||!u.qMode&&u.qNodesOnDim?(d.extractor=Mu,d.hierarchy=xu,d.pages="K"===u.qMode?u.qStackedDataPages:u.qTreeDataPages):"S"===u.qMode?(d.extractor=Wl,d.pages=u.qDataPages,d.hierarchy=xu):d.extractor=function(){return[]},d.fieldExtractor=function(e){return d.extractor({field:e},f,l,c)};var h="S"===u.qMode?function(e){return e.qElemNumber}:void 0,p="S"===u.qMode?function(e){return e.qNum}:void 0;(e=l.wrappedFields).push.apply(e,ql(Qu("qDimensionInfo",u,i,"",Vl({},d,{value:h,type:"dimension"})))),(t=l.wrappedFields).push.apply(t,ql(Qu("qMeasureInfo",u,i,"",Vl({},d,{value:p,type:"measure"})))),l.fields=l.wrappedFields.map((function(e){return e.instance}));var m=function e(t){t.forEach((function(t){l.allFields.push(t.instance),e(t.measures),e(t.attrDims),e(t.attrExps)}))};return m(l.wrappedFields),(s.virtualFields||[]).forEach((function(e){var t=f.field(e.from),n=Zu(Ol({meta:t.raw(),id:"".concat(i,"/").concat(e.key),sourceField:t,fieldExtractor:function(e){return d.extractor({field:e},f,l,c)},key:e.key,type:t.type(),localeInfo:d.localeInfo,value:t.value},e.override||{}));l.virtualFields.push(n)})),(n=l.allFields).push.apply(n,ql(l.virtualFields)),f}var tc=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],nc=/\/qDimensionInfo(?:\/(\d+))?/,rc=/\/qMeasureInfo\/(\d+)/,ic=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,oc=/\/qAttrExprInfo\/(\d+)/,ac=/\/?qHyperCube/,sc=/\/?qTreeData/,lc=function(e){return"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14))},uc=function(e){return"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13))};function cc(e,t){var n=e,r=-1,i=-1,o="",a=function(e){return e};ac.test(e)?(o="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),a=lc):sc.test(e)&&(o="".concat(n.substr(0,n.indexOf("qTreeData")+9)),a=uc);var s=!0;if(nc.test(e)&&(r=+nc.exec(e)[1]),rc.test(e)&&(i=+rc.exec(e)[1]),ic.test(e)){i=-1,r=0;var l=+ic.exec(n)[2];isNaN(l)||(r=l,n=n.replace(/\/\d+$/,"")),s=!1}if(oc.test(e)){var u=i;if(t){i=0;var c=iu(o,t);i+=(c.qMeasureInfo||[]).length,r>-1?(i=c.qDimensionInfo.slice(0,r).reduce((function(e,t){return e+t.qAttrExprInfo.length}),i),r=-1):(i=c.qDimensionInfo.reduce((function(e,t){return e+t.qAttrExprInfo.length}),i),i=c.qMeasureInfo.slice(0,u).reduce((function(e,t){return e+t.qAttrExprInfo.length}),i)),i+=+oc.exec(n)[1]}else r>-1?(r=-1,i=+oc.exec(n)[1]):i+=+oc.exec(n)[1]+1}return tc.forEach((function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(e,t)||Dl(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,2),r=t[0],i=t[1];n=n.replace(r,i)})),s&&(n=a(n)),n&&"/"!==n[0]&&(n="/".concat(n)),{measureIdx:i,dimensionIdx:r,path:n}}function dc(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,i=n.byCells,o=n.primarySource,a=[],s={},l=e.isActive(),u=!1;return e.brushes().forEach((function(e){var t=cc(e.id,r);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){var n=e.brush.ranges();n.length&&(u=!0,s.multiRangeSelectTreeDataValues||(s.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),n.forEach((function(e){return s.multiRangeSelectTreeDataValues.ranges.push({qMeasureIx:t.measureIdx,qDimensionIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})})))}else{if("range"===e.type&&t.measureIdx>-1){var l=e.brush.ranges();l.length&&(u=!0,s.rangeSelectHyperCubeValues||(s.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),l.forEach((function(e){return s.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:t.measureIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})})))}if("range"===e.type&&t.dimensionIdx>-1){var c=e.brush.ranges();c.length&&(u=!0,s.selectHyperCubeContinuousRange||(s.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),c.forEach((function(e){return s.selectHyperCubeContinuousRange.ranges.push({qDimIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!1}})})))}if("value"===e.type&&t.dimensionIdx>-1)if(i)if(r&&r.qHyperCube&&("P"===r.qHyperCube.qMode||"T"===r.qHyperCube.qMode||"K"===r.qHyperCube.qMode)){var d=r.qHyperCube,f=d.qNoOfLeftDims,h=d.qEffectiveInterColumnSortOrder.indexOf(t.dimensionIdx);if(s.selectPivotCells||(s.selectPivotCells={path:t.path,cells:[]}),e.id===o||!o){var p=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)}));(0===f||h>=f)&&f>-1?p.forEach((function(e){s.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:h-f})})):p.forEach((function(e){s.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})})),u=!!s.selectPivotCells.cells.length}}else s.selectHyperCubeCells||(s.selectHyperCubeCells={path:t.path,cols:[]}),s.selectHyperCubeCells.cols.push(t.dimensionIdx),e.id!==o&&(o||s.selectHyperCubeCells.values)||(s.selectHyperCubeCells.values=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)})),u=!!s.selectHyperCubeCells.values.length);else{var m=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)}));u=!!m.length,a.push({params:[t.path,t.dimensionIdx,m,!1],method:"selectHyperCubeValues"})}}})),!u&&l?[{method:"resetMadeSelections",params:[]}]:(s.rangeSelectHyperCubeValues&&a.push({method:"rangeSelectHyperCubeValues",params:[s.rangeSelectHyperCubeValues.path,s.rangeSelectHyperCubeValues.ranges,[],null===(t=n.orMode)||void 0===t||t]}),s.selectHyperCubeContinuousRange&&a.push({method:"selectHyperCubeContinuousRange",params:[s.selectHyperCubeContinuousRange.path,s.selectHyperCubeContinuousRange.ranges]}),s.selectHyperCubeCells&&a.push({method:"selectHyperCubeCells",params:[s.selectHyperCubeCells.path,s.selectHyperCubeCells.values,s.selectHyperCubeCells.cols]}),s.selectPivotCells&&a.push({method:"selectPivotCells",params:[s.selectPivotCells.path,s.selectPivotCells.cells]}),s.multiRangeSelectTreeDataValues&&a.push({method:"multiRangeSelectTreeDataValues",params:[s.multiRangeSelectTreeDataValues.path,s.multiRangeSelectTreeDataValues.ranges]}),a)}function fc(e){ec.util=e.data("matrix").util,e.data("q",ec),e.formatter("q-number",Fu),e.formatter("q-time",Ku)}function hc(e){var t=hl(e.layout||{},e.path.split("/").join("."));if(!t)return!1;var n=t.qIsOneAndOnlyOne;return void 0!==n&&n}function pc(){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"===ua(e.data)&&Array.isArray(e.data.fields)})).every((function(e){return e.data.fields.every((function(e){var t=e.raw();return!(!t.qLocked&&t.qCardinal)}))}));return t}function mc(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))}fc.qBrushHelper=dc,fc.selections=dc;var yc="Shift";function gc(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}));return l.length>1?function(e){var t=e.layout,n=void 0===t?{}:t,r=e.values,i=void 0===r?[]:r;if(null==i||!i.length)return[];var o=Array.from(new Set(i.map((function(e){return e.key})))),a=[];return o.forEach((function(e){var t=hc({layout:n,path:e}),r=i.filter((function(t){return t.key===e})),o=t?[r.pop()]:r;a.push.apply(a,ga(o))})),a.filter(Boolean)}({layout:s,values:l}):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)}}}var vc=[],bc=0,xc=function(e){var t=vc.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()})))},Mc=function(){document.addEventListener("keyup",xc)},Sc=function(){document.removeEventListener("keyup",xc)},wc=function(e,t){Object.keys(t).forEach((function(n){e.on(n,t[n])}))},Ec=function(e,t){Object.keys(t).forEach((function(n){e.removeListener(n,t[n])}))};function kc(e,t,n){if(t&&void 0!==n&&"selectHyperCubeContinuousRange"===e.method){var r=e.params;if(r&&r[1]&&r[1][0]){var i=r[1][0],o=i.qDimIx,a=i.qRange;"undefined"!==o&&a&&!1===a.qMaxInclEq&&a.qMax>=n&&(a.qMaxInclEq=!0)}}}function Cc(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,u=void 0===l?"rangeClear":l,c=r.event===i,d=n.querySelector("[data-key='".concat(o,"-edge-0']"));if(c||!d)return!1;var f=t.component(o);return!!f&&(f.emit(u),"string"==typeof s&&t.brush(s).clear(),f)}function Oc(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 Cc({selectionInfo:t,chart:n,document:r,eventName:void 0!==l&&l?void 0:o,componentName:s,emit:"areaClear",brushName:e.brushName})}function Tc(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 Cc({selectionInfo:t,chart:n,document:r,eventName:void 0!==l&&l?void 0:o,componentName:s,brushName:e.brushName})}function Ac(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,u=void 0!==l&&l,c=e.brushName,d=Cc({selectionInfo:t,chart:n,document:r,eventName:u?void 0:s,componentName:o,brushName:void 0!==c&&c});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()})),y=n.brush(p),g=y.brushes().filter((function(e){return"range"===e.type&&m.some((function(t){return t===e.id}))}));y&&g.length&&g.forEach((function(e){y.removeRanges(e.brush.ranges().map((function(t){return{key:e.id,range:t}})))}))}}function Nc(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;Cc({selectionInfo:t,chart:n,document:r,eventName:void 0!==s&&s?void 0:a,componentName:"".concat(a,"-range-brush"),emit:"areaClear",brushName:!1})&&i.clear()}function qc(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()})))}}function Dc(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,u=e.cleared,c=void 0!==u&&u,d=e.brushName;Cc({selectionInfo:t,chart:n,document:r,eventName:c?void 0:a,componentName:l,brushName:void 0!==d&&d})&&i.clear()}var Rc=function(e){e.chart,e.document,e.selections,e.selectionInfo;var t=ma(e,["chart","document","selections","selectionInfo"]);t.clearDiscrete(),t.clearContinuous(),t.clearMinor(),t.clearRange(),t.clearTap(),t.clearLegend()};function Ic(e){var t,n=e.lasso;null!=n&&null!==(t=n.active)&&void 0!==t&&t.call(n)&&(null==n||n.action(!1))}function _c(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 u=(a||{}).lasso,c=void 0!==u&&u,d=i.reset,f=void 0===d?Ic:d,h=i.clear,p=!1!==h&&function(e){var t=e.clear,n=void 0===t?Rc: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(pa({clearDiscrete:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Oc(pa(pa({},t),e))},clearContinuous:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Tc(pa(pa({},t),e))},clearMinor:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Ac(pa(pa({},t),e))},clearRange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Nc(pa(pa({},t),e))},clearTap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return qc(pa(pa({},t),e))},clearLegend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Dc(pa(pa({},t),e))}},t))}}({clear:h,selections:s,selectionInfo:r,chart:n}),m=function(e){var t=e.chart,n=e.lasso,r=e.reset,i=e.clear,o=!1,a={deactivated:function(e){r({e:e,lasso:n})},canceled:function(e){r({e:e,lasso:n}),i({e:e,chart:t,document:document})},cleared:function(e){o||(o=!0,i({e:e,chart:t,document:document,cleared:!0}),o=!1)}};return!1===r&&delete a.deactivated,!1===i&&delete a.cleared,!1===r&&!1===i&&delete a.canceled,a}({chart:n,clear:p,reset:f,lasso:c}),y={};Object.entries(m).forEach((function(e){var t=ya(e,2),n=t[0],r=t[1];y[n]=function(e,t){return t?function(n){return t({event:n,defaultFunc:e})}:e}(r,l[n])}));var g=function(e){var t=e.selectionEvents,n=e.selections,r=e.selectionInfo,i=e.clear,o=e.chart,a=e.document,s=t.start,l={selections:n,selectionInfo:r,chart:o,document:a},u=function(e){return Object.assign(r,e||{})},c=function(e){var t=e.event,n=e.components;return function(){return function(e){var t=e.selectionInfo,n=e.clear,r=e.event,i=e.components,o=void 0===i?[]:i;(0,e.setSelectionInfo)(pa(pa({},void 0===t?{}:t),{},{event:r,components:o.map((function(e){return e.key})).filter(Boolean)})),n()}({event:t,components:n,clear:i,chart:o,selectionInfo:r,setSelectionInfo:u})}};return"function"==typeof s?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];s(pa(pa({defaultFunc:c({event:e,components:t}),setSelectionInfo:u,clear:i},l),{},{event:e,components:t}))}:function(e){c({event:e,components:arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]})()}}({selectionEvents:l,selections:s,selectionInfo:r,clear:p,chart:n,document:document});return null==a||null===(t=a.select)||void 0===t||t.on("start",g),Object.entries(y).forEach((function(e){var t=ya(e,2),n=t[0],r=t[1];null==s||s.on(n,r)})),function(){var e;null==a||null===(e=a.select)||void 0===e||e.removeListener("start",g),Object.entries(y).forEach((function(e){var t=ya(e,2),n=t[0],r=t[1];null==s||s.removeListener(n,r)}))}}var Pc=[{key:"qHyperCube/qDimensionInfo/0:numeric",includeMax:!1}];function Lc(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,u=void 0===l?void 0:l,c=o.selectionActions,d=(c=void 0===c?{}:c).clear,f=c.reset,h=o.selectionEvents,p=void 0===h?{deactivated:void 0,canceled:void 0,cleared:void 0,start:void 0}:h,m=o.brushEvents,y=void 0===m?{}:m,g=o.brushName,v=void 0===g?"selection":g,b=o.brushMaxListeners,x=void 0===b?20:b,M=o.brushRanges,S=void 0!==M&&M,w=o.interceptors,E=void 0===w?{}:w,k=o.selectionsFn,C=void 0===k?i.selections:k,O=t.brush(v);if("number"==typeof x&&O.setMaxListeners(x),S){var T=!0===S?Pc:S;O.configure({ranges:T})}var A={canSelect:!0,getIsSelectionLocked:!1,isInnerDimensionLocked:!1,lockedDimensions:[],singleSelectIndex:0,singleSelectDims:[],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(){},allowSimultaneous:function(){},release:function(){}};var u=++bc,c=null,d=[],f={};n.on=n.on.bind(n),n.isActive=n.isActive.bind(n),n.addListener=n.addListener.bind(n),n.removeListener=n.removeListener.bind(n);var h=gc({brush:r,getConfig:function(){return{layout:c,allowSimultaneous:d}}}),p=h.rangeInterceptor,m=h.interceptor;r.intercept("set-ranges",p),r.intercept("toggle-ranges",p),r.intercept("toggle-values",m),r.intercept("set-values",m),r.intercept("add-values",m),r.on("start",(function(){return n.begin(l)}));var y={activate:function(){},deactivated:function(){return r.end()},cleared:function(){return r.clear()},canceled:function(){return r.end()}};wc(n,y);var g=null==i||null===(e=i.max)||void 0===e?void 0:e.call(i);return null!=o&&o.select?(o.select.on("start",(function(){var e;r.start(),"function"==typeof o.select.getBrushOptions&&(f=(e=o.select).getBrushOptions.apply(e,arguments))})),o.select.on("end",(function(){a(r,f,c).forEach((function(e){kc(e,o.select.brushSelectionIncludeMax,g),n.select(e)}))}))):r.on("update",(function(){a(r,f,c).forEach((function(e){return n.select(e)}))})),0===vc.length&&Mc(),vc.push({key:u,selections:n}),{layout:function(e){c=e},allowSimultaneous:function(e){d=e},release:function(){c=null;var e=vc.indexOf(vc.filter((function(e){return e.key===u}))[0]);-1!==e&&vc.splice(e,1),vc.length||Sc(),Ec(n,y)}}}({brush:O,majorScale:u,actions:n,selections:r,picassoQ:i,selectionsFn:C});!function(e){var t=e.brush,n=e.interceptors,r=void 0===n?{}:n;Object.entries(r).forEach((function(e){var n=ya(e,2),r=n[0],i=n[1];(Array.isArray(i)?i:[i]).forEach((function(e){t.intercept(r,e)}))}))}({brush:O,interceptors:E});var q=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=ya(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=ya(e,2),r=n[0],i=n[1];t.removeListener(r,i)}))}}({brush:r,chart:t,selectionInfo:o,brushEvents:e.brushEvents}),u=_c({chart:t,selectionInfo:o,selectionActions:n,actions:i,selections:a,selectionEvents:s}),c=function(e){var t=e.actions;if(null==t||!t.lasso)return function(){};var n=!1,r=function(e){n||e.key!==yc||(t.lasso.action(!0),n=!0)},i=function(e){e.key===yc&&(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(),u(),c()}}({chart:t,brush:O,actions:n,selections:r,selectionInfo:A.selectionInfo,selectionActions:{clear:d,reset:f},selectionEvents:p,brushEvents:y});if(s){var D=!0===s?ga(Array(15)).map((function(e,t){return"qHyperCube/qMeasureInfo/".concat(t)})):s;N.allowSimultaneous(D)}return{unbindEvents:q,state:A,picassoSelections:N,brush:O}}function jc(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=Lc({chart:t,actions:i,selections:n,picassoQ:fc,config:a}),l=s.unbindEvents,u=s.state,c=s.picassoSelections,d=s.brush,f=a.custom,h=void 0===f?{}:f,p=a.legendAlias,m=void 0===p?void 0:p,y=a.setBrushAliases,g=void 0===y?mc:y;return{getIsDimensionLocked:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return u.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:pc(r)},getIsSingleSelect:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u.singleSelectIndex;return u.singleSelectDimensions[e]},getCanSelect:function(){return u.canSelect},getSelectionInfo:function(){return u.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,u=void 0===l?[]:l;return s.lockedDimensions=u.map((function(e){return!!e.qLocked})),s.singleSelectDimensions=u.map((function(e,t){return hc({layout:a,path:"qHyperCube/qDimensionInfo/".concat(t)})})),s.singleSelectIndex=function(e){var t,n=((null==e?void 0:e.qHyperCube)||{}).qDimensionInfo,r=void 0===n?[]:n;return null!==(t=r.map((function(e,t){var n;return!(e.qLocked||(null===(n=e.qCardinalities)||void 0===n?void 0:n.qHypercubeCardinal)<=1)&&t})).filter((function(e){return"number"==typeof e}))[0])&&void 0!==t?t:Math.max(r.length-1,0)}(a),s.canSelect=0===u.length||u.some((function(e){return!e.qLocked})),s.dimensionLocked=!(null===(r=u[0])||void 0===r||!r.qLocked),s}({selections:n,picassoSelections:c,layout:e});Object.assign(u,t)},setBrushAliases:function(e){var t=e.colorField,n=e.useLegendCube,r=void 0!==n&&n,i=ma(e,["colorField","useLegendCube"]),o=pa({useLegendCube:r,colorField:t,brush:d,legendAlias:m},i);g(pa(pa({},o),{},{defaultFunc:function(){return mc(o)}}))},destroy:function(){l(),c.release()},custom:pa({},h)}}var zc="QlikView Sans, sans-serif",Fc="#737373",Bc="#cccccc",Vc="#e6e6e6";function Hc(e){var t={};return[].concat(ga(e),ga([["","","color"],["object","axis.title","fontFamily",zc],["object","axis.title","fontSize","13px"],["object","axis.title","color"],["object","axis.label.name","fontFamily",zc],["object","axis.label.name","fontSize","12px"],["object","axis.label.name","color","#595959"],["object","axis.line.major","color",Bc],["object","axis.line.minor","color",Vc],["object","grid.line.major","color",Bc],["object","grid.line.minor","color",Vc],["object","grid.line.highContrast","color",Vc],["object","referenceLine.label.name","fontFamily",zc],["object","referenceLine.label.name","fontSize","12px"],["object","referenceLine.label.name","color","#333333"],["object","referenceLine.outOfBounds","fontFamily",zc],["object","referenceLine.outOfBounds","fontSize","12px"],["object","referenceLine.outOfBounds","color",Vc],["object","referenceLine.outOfBounds","backgroundColor",Fc,function(e){return"transparent"===e?Fc:e}]])).reduce((function(e,n){var r="".concat(n[0],"-").concat(n[1],"-").concat(n[2],"}");return t[r]||(t[r]=!0,e.push(n)),e}),[]).sort((function(e,t){return(e[0].split?e[0].split(".").length:0)-(t[0].split?t[0].split(".").length:0)}))}function $c(e,t){var n={};return e.forEach((function(e){var r=ya(e,5),i=r[0],o=r[1],a=r[2],s=r[3],l=r[4],u=(void 0===l?function(e){return e}:l)(function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0;if(!e||!1===t)return i;var o=e.getStyle(t,n,r);return void 0===o?i:o}(t,i,o,a,s));pl(n,[o,a].filter(Boolean).join("."),u)})),n}function Uc({key:e,source:t,layoutService:n,fieldModel:r,colorService:i,series:o}){const{meta:a}=n;if(a.isBarSeriesStacked){const{major:a,majorNumeric:s}=r.main,l=o.filter((e=>e.type===Ho.BAR)),u=n.meta.isContinuous?s:a,c=e=>"NaN"!==e.qNum?e.qNum:0;return[{key:e,data:{extract:l.map((({ref:e,typeIndex:r,refIndex:o})=>({source:t,field:a,value:n.meta.isContinuous?e=>e.qNum:void 0,props:{major:{field:u},selectionDimension:{field:a},segment:{field:e,value:c,reduceLabel:"none"},end:{field:e,value:c,reduceLabel:"none"},null:{fields:l.map((e=>({field:e.ref}))),value:e=>Array.isArray(e)&&e.every((e=>"NaN"===e)),reduceLabel:"none"},typeIndex:r,...i.getDatumProps(o),customTooltipAttrExps:aa.getNode(n.getLayout(),n.meta),sumOfPositives:{fields:l.map((e=>({field:e.ref}))),value:e=>e.reduce(((e,t)=>t>0?e+t:e),0),reduceLabel:"none"},sumOfNegatives:{fields:l.map((e=>({field:e.ref}))),value:e=>e.reduce(((e,t)=>t<0?e+t:e),0),reduceLabel:"none"}}}))),stack:{stackKey:e=>e.value,value:e=>e.end.value,offset:"diverging"}}}]}return[]}function Wc({key:e,series:t,source:n,fieldModel:r,colorService:i,layoutService:o,forceCreate:a=!1}){if(t.length||a){const{major:a,majorNumeric:s}=r.main,l=e=>"NaN"!==e.qNum?e.qNum:0,u=o.meta.isContinuous?s:a;return[{key:e,data:{extract:t.map((({ref:e,refIndex:t,typeIndex:r,options:s},c)=>({source:n,field:a,value:o.meta.isContinuous?e=>e.qNum:void 0,props:{major:{field:u},selectionDimension:{field:a},end:{field:e,value:s.showAsZeros?l:void 0,reduceLabel:"none"},start:0,line:c,typeIndex:r,null:{field:e,value:e=>"NaN"===e.qNum,reduceLabel:"none"},customTooltipAttrExps:aa.getNode(o.getLayout(),o.meta),...i.getDatumProps(t)}})))}}]}return[]}function Yc({key:e,layoutService:t,fieldModel:n,series:r}){const{meta:i}=t;if(i.isBarSeriesStacked){const{major:t,majorNumeric:o}=n.main,a=r.filter((e=>e.type===Ho.BAR)),s=i.isContinuous?{field:o,value:e=>e.qNum,reduceLabel:"none"}:[];return[{key:e,data:{extract:{field:0,props:{major:{field:i.isContinuous?o:t},null:{fields:a.map((e=>({field:e.ref}))),value:e=>Array.isArray(e)&&e.every((e=>"NaN"===e)),reduceLabel:"none"},sumOfPositives:{fields:a.map((e=>({field:e.ref}))),value:e=>e.reduce(((e,t)=>t>0?e+t:e),0),reduceLabel:"none"},sumOfNegatives:{fields:a.map((e=>({field:e.ref}))),value:e=>e.reduce(((e,t)=>t<0?e+t:e),0),reduceLabel:"none"},timeStart:s,timeEnd:s},value:i.isContinuous?e=>e.qNum:void 0}}}]}return[]}const Xc={MINI_CHART:{value:"miniChart",translation:"properties.scrollbar.miniChart"},BAR:{value:"bar",translation:"properties.scrollbar.bar"},NONE:{value:"none",translation:"properties.scrollbar.none"}};var Gc={OPTIONS:Xc,DEFAULT:Xc.MINI_CHART};function Kc({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,u=r[l?"width":"height"];let c=a.qArea.qTop/s*u,d=a.qArea.qHeight/s*u;if(d<o){const e=(o-d)/2;c=c-e+(Math.max(0,0-(c-e))-Math.max(0,c+d+e-u)),d=o}return n("div",{style:{position:"absolute",right:0,bottom:0,background:"red",opacity:.2,...l?{top:0,left:c,width:d}:{top:c,left:0,height:d}}})}}function Jc({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 Zc=e=>({miniChart:e===Gc.OPTIONS.MINI_CHART.value,bar:e===Gc.OPTIONS.BAR.value,none:e===Gc.OPTIONS.NONE.value});function Qc({layoutService:e,override:t}){const n=(({layoutService:e})=>{const t=e.getLayoutValue("scrollbar");if(t)return Zc(t);const n=e.getLayoutValue("showMiniChartForContinuousAxis");if(void 0===n)return Zc(Gc.DEFAULT.value);const r=e.getLayoutValue("dimensionAxis.continuousAuto"),i=e.getLayoutValue("preferContinuousAxis");return Zc(!n&&(r||!r&&i)?Gc.OPTIONS.NONE.value:Gc.OPTIONS.MINI_CHART.value)})({layoutService:e});return t&&t.predicate({layoutService:e,scrollbar:n})&&(n.miniChart=t.value===Gc.OPTIONS.MINI_CHART.value,n.bar=t.value===Gc.OPTIONS.BAR.value,n.none=t.value===Gc.OPTIONS.NONE.value),n}function ed({componentKey:e,chart:t,viewState:n,viewCache:r,layoutService:i,dockService:o,rtl:a}){return s=>{const{x:l,y:u}=s.center,c=t.element.getBoundingClientRect(),d=t.component(e),f="horizontal"===o.meta.major.orientation,h=f?l-c.left-d.rect.computedInner.x:u-c.top-d.rect.computedInner.y,p=f?d.rect.computedInner.width:d.rect.computedInner.height,m=f&&a?p-h:h,y=Math.max(0,Math.min(m/p,1)),[g,v]=Jc({layoutService:i,viewState:n,viewCache:r}),b=y<g,x=y>v,M=!b&&!x;return{pixel:m,relative:y,thumb:M?m-g*p:0,beforeThumb:b,afterThumb:x,onThumb:M}}}function td({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:u}=a.rect.computedInner,c="horizontal"===s?l:u,[d,f]=Jc({layoutService:i,viewState:n,viewCache:r});return{size:c,thumbSize:(f-d)*c}}}function nd({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){const u=ed({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:l}),c=td({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=u(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=c(),t=a.pixel-e.thumbSize/2,n=Math.max(0,t/e.size);s.command.scrollTo(n)}t.component(e).emit("render")}}}}const rd="data-scrollbar-handle";function id({e:e}){return(e.srcEvent||e).srcElement.getAttribute(rd)||""}const od="scrollbarResize";function ad({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:s}){const l=ed({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:s});return{type:"Pan",key:"event:scrollbarResize",options:{event:od,threshold:0,enable(e,t){return!(!o.meta.isContinuous||!n.scroll.enabled())&&(!t||(this[od]=this[od]||{},(e=>{const[t]=e.changedPointers;return t&&("pointerdown"===t.type||"mousedown"===t.type)})(t)&&id({e:t})&&(this[od].panningEvent=t.srcEvent),!!this[od].panningEvent))}},events:{scrollbarResizestart(n){n.preventDefault(),this[od]=this[od]||{},this[od].panningEvent&&t.component(e).emit("dragStart",this[od].panningEvent)},scrollbarResizemove(n){if(n.preventDefault(),this[od]=this[od]||{},!this[od].panningEvent)return;const o=r.get("zoom"),a=i.get("continuousMin"),s=i.get("continuousMax"),u=i.get("minimiumZoomSpan"),c=(s-a)*l(n).relative+a,d=id({e:this[od].panningEvent});let f="start"===d?Math.min(c,o.max):o.min,h="end"===d?Math.max(c,o.min):o.max;f===h&&(f-="start"===d?u:0,h+="end"===d?u:0),r.set("zoom",{min:f,max:h}),t.component(e).emit("render")},scrollbarResizeend(n){n.preventDefault(),this[od]=this[od]||{},delete this[od].panningEvent,t.component(e).emit("dragEnd")},scrollbarResizecancel(n){n.preventDefault(),this[od]=this[od]||{},delete this[od].panningEvent,t.component(e).emit("dragEnd")}}}}const sd="scrollbarPan";function ld({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){const u=ed({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:l}),c=td({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a});return{type:"Pan",key:"event:scrollbarPan",options:{event:sd,threshold:0,enable(r,i){return this[sd]=this[sd]||{},!(i&&!this[sd].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:{scrollbarPanstart(n){n.preventDefault();const a=u(n);if(this[sd]=this[sd]||{},this[sd].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[sd].relative=a.relative,this[sd].zoom=r.get("zoom"),this[sd].zoom.span=this[sd].zoom.max-this[sd].zoom.min,this[sd].zoom.fullSpan=o-n}else if(a.onThumb)this[sd].offset=a.thumb;else{const e=c();this[sd].offset=a.beforeThumb?0:e.thumbSize}},scrollbarPanmove(n){n.preventDefault();const a=u(n);if(this[sd]=this[sd]||{},o.meta.isContinuous){const e=a.relative-this[sd].relative,{fullSpan:t,span:n,min:o,max:s}=this[sd].zoom,l=i.get("continuousMin"),u=i.get("continuousMax");r.set("zoom",{min:Math.min(o+e*t,u-n),max:Math.max(s+e*t,l+n)})}else{const e=a.pixel-(this[sd].offset||0),t=c(),n=Math.max(0,e/t.size);s.command.scrollTo(n)}t.component(e).emit("render")},scrollbarPanend(n){n.preventDefault(),this[sd]=this[sd]||{},this[sd].isPanning=!1,t.component(e).emit("unlockState")},scrollbarPancancel(n){n.preventDefault(),this[sd]=this[sd]||{},this[sd].isPanning=!1,t.component(e).emit("unlockState")}}}}function ud({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){return[nd({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}),ad({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:l}),ld({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l})]}function cd({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")}}}const dd={background:"rgba(0, 0, 0, 0.1)"},fd={top:-1,bottom:-1,width:6},hd={width:2,background:"#595959"};var pd={before:dd,after:dd,thumb:{background:"transparent",border:"1px solid rgba(68, 68, 68, 0.4)"},startHandle:fd,endHandle:fd,startHandleBorder:hd,endHandleBorder:hd};const md={background:"rgba(0, 0, 0, 0.1)"},yd={top:-1,bottom:-1,width:6},gd={width:2,background:"#595959"};var vd={before:md,after:md,thumb:{background:"#B0AFAE",border:"transparent"},startHandle:yd,endHandle:yd,startHandleBorder:gd,endHandleBorder:gd};const bd={position:"absolute",top:0,right:0,bottom:0,left:0,boxSizing:"border-box"},xd={pointerEvents:"initial"},Md={pointerEvents:"none"};const Sd="ew-resize",wd="default";function Ed(){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 kd(){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?Sd:wd}function Cd(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 Od(e){const t=(e.srcEvent||e).srcElement;return this.renderer.element().contains(t)}function Td(){const{size:e,start:t,end:n}=Ed.call(this);this.renderer.render(this.elements(this.h,Cd.call(this,e,t,n)))}function Ad(){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?vd:pd;return{container:{...bd},before:{...bd,...n.before,...t.before},after:{...bd,...n.after,...t.after},thumb:{...bd,...n.thumb,...t.thumb},startHandle:{...bd,...xd,...n.startHandle},endHandle:{...bd,...xd,...n.endHandle},startHandleBorder:{...bd,...Md,...n.startHandleBorder},endHandleBorder:{...bd,...Md,...n.endHandleBorder}}}({id:t.settings.style,style:n[r]})),e.style[r]}var Nd={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(){Td.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||!Od.call(this,e)&&this.state.hover.isPristine())return;this.state.hover.reset();const t=id({e:e});t&&(this.state.hover[t]=!0),kd.call(this),Td.call(this)},leave(){this.state.locked||(this.state.hover.reset(),kd.call(this),Td.call(this))},dragStart(e){if(this.state.locked)return;this.state.drag.reset();const t=id({e:e});t&&(this.state.drag[t]=!0),kd.call(this)},dragEnd(){this.state.locked||(this.state.drag.reset(),kd.call(this),Td.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}=Ed.call(this);return this.elements(e,Cd.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:u,injections:c}){const d={[i.end]:t-n},f={[i.start]:r},h={left:-3},p={left:1},m={right:-3,left:"auto"},y={left:3},g=e("div",{style:{...s.before,...u?f:d},class:"scrollbar--before"}),v=e("div",{style:{...s.after,...u?d:f},class:"scrollbar--after"}),b=[];if(l){const t=e("div",{style:{...s.startHandle,...u?m:h},class:"scrollbar--start-handle",[rd]:"start"},o?e("div",{style:{...s.startHandleBorder,...u?y:p}}):void 0);b.push(t);const n=e("div",{style:{...s.endHandle,...u?h:m},class:"scrollbar--end-handle",[rd]:"end"},a?e("div",{style:{...s.endHandleBorder,...u?p:y}}):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}},[g,x,v,...c])}({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:Ad.call(this),continuous:i.isContinuous,invert:"horizontal"===i.orientation&&i.rtl,injections:o})}};function qd({layoutService:e}){return e.meta.isContinuous&&Qc({layoutService:e}).miniChart}function Dd({models:e}){const{layoutService:t,fieldModel:n,seriesModel:r,colorService:i}=e,{primarySeries:o,secondarySeries:a}=r.meta,s=r.query.series(Ho.LINE),l=[...Wc({forceCreate:!0,key:Vo.COLLECTION.PRIMARY,series:o,fieldModel:n,colorService:i,layoutService:t}),...Wc({key:Vo.COLLECTION.SECONDARY,series:a,fieldModel:n,colorService:i,layoutService:t}),...Wc({key:Vo.COLLECTION.LINE,series:s,fieldModel:n,colorService:i,layoutService:t}),...Uc({key:Vo.COLLECTION.STACKED_PRIMARY,layoutService:t,fieldModel:n,colorService:i,series:o}),...Uc({key:Vo.COLLECTION.STACKED_SECONDARY,layoutService:t,fieldModel:n,colorService:i,series:a}),...Yc({key:Vo.COLLECTION.STACKED_TOTAL_PRIMARY,layoutService:t,fieldModel:n,series:o}),...Yc({key:Vo.COLLECTION.STACKED_TOTAL_SECONDARY,layoutService:t,fieldModel:n,series:a})];return qd(e)&&(l.push(...Wc({key:Vo.COLLECTION.REDUCED,source:Vo.DATA.REDUCED,series:r.query.all(),fieldModel:n,colorService:i,layoutService:t})),l.push(...Wc({key:Vo.COLLECTION.REDUCED_PRIMARY,source:Vo.DATA.REDUCED,series:o,fieldModel:n,colorService:i,layoutService:t})),l.push(...Wc({key:Vo.COLLECTION.REDUCED_SECONDARY,source:Vo.DATA.REDUCED,series:a,fieldModel:n,colorService:i,layoutService:t})),l.push(...Uc({key:Vo.COLLECTION.REDUCED_STACKED_PRIMARY,source:Vo.DATA.REDUCED,layoutService:t,fieldModel:n,series:r.meta.primarySeries.filter((e=>e.type===Ho.BAR)),colorService:i})),l.push(...Uc({key:Vo.COLLECTION.REDUCED_STACKED_SECONDARY,source:Vo.DATA.REDUCED,layoutService:t,fieldModel:n,series:r.meta.secondarySeries.filter((e=>e.type===Ho.BAR)),colorService:i}))),l}const Rd=({layoutService:e,dockService:t})=>"custom"!==e.getLayoutValue("dimensionAxis.axisDisplayMode")?Math.min(200,t.meta.chart.size["horizontal"===t.meta.major.orientation?"height":"width"]/4):void 0;function Id({models:e}){const{dockService:t,seriesModel:n}=e;if(1!==n.meta.measureAxes.length)return.5;const r=n.meta.measureAxes[0].isPrimary?t.meta.minor.dock:t.meta.minorSecondary.dock;return"horizontal"===t.meta.minor.orientation?"near"===r||"bottom"===r?1:0:"near"===r||"left"===r?0:1}const _d=({models:e,environment:t})=>{const{fieldModel:n,discreteModel:r,layoutService:i,dockService:o}=e,{orientation:a}=o.meta.major;return{data:{extract:{field:n.main.major,props:{selectionDimension:{field:n.main.major}}}},maxPxStep:Rd({layoutService:i,dockService:o}),invert:"horizontal"===a&&"rtl"===t.options.direction,range:r.query.getScaleRange,align:Id({models:e})}},Pd=({models:e,environment:t})=>{const{fieldModel:n,discreteModel:r,layoutService:i,dockService:o}=e,{orientation:a}=o.meta.major;return{type:"group-by-measure",data:{extract:{field:n.main.major}},measureCount:i.meta.groupSize,maxPxStep:Rd({layoutService:i,dockService:o}),invert:"horizontal"===a&&"rtl"===t.options.direction,range:r.query.getScaleRange,align:Id({models:e})}};function Ld({viewState:e,models:t,environment:n}){const{fieldModel:r,dockService:i}=t,{orientation:o}=i.meta.major;return{type:"linear",invert:"horizontal"===o&&"rtl"===n.options.direction,data:{extract:{field:r.main.majorNumeric}},ticks:{forceBounds:!0,count:e.get("zoom").min===e.get("zoom").max?1:void 0},minorTicks:{count:1},min:()=>e.get("zoom").min,max:()=>e.get("zoom").max}}function jd({viewCache:e,mainMajor:t}){return d(!0,{},t,{min:()=>e.get("continuousMin"),max:()=>e.get("continuousMax")})}function zd({viewState:e,viewCache:t,layoutService:n}){return t.set("qTimeAxisCache",[]),{get:(e,n=0)=>{const r=t.get("qTimeAxisCache");return r[n]&&r[n][0]===e?r[n][1]:void 0},set:(e,n,r=0)=>{t.get("qTimeAxisCache")[r]=[e,n]},key:({distance:r})=>{const{min:i,max:o}=e.get("zoom"),a=(o-i)/(t.get("continuousMax")-t.get("continuousMin")),s=n.getHyperCubeValue("qAxisData.qAxis",[]).map((e=>e.qName));return[r,Number.parseFloat(a).toFixed(12),...s].toString()}}}function Fd({picasso:e,viewState:t,viewCache:n,models:r,environment:i}){const{layoutService:o,fieldModel:a,appLayoutModel:s,themeService:l}=r,{measureText:u}=e.renderer("svg")(),{majorNumeric:c}=a.main,f=l.getStyles(),h={type:"time",data:{field:c},qAxis:()=>o.getHyperCubeValue("qAxisData.qAxis",[]),field:c,min:()=>t.get("zoom").min,max:()=>t.get("zoom").max,invert:"rtl"===i.options.direction,formatter:{fn:e.formatter("q-time"),localeInfo:s.qLocaleInfo,qNumFormat:o.getHyperCubeValue("qDimensionInfo.0",{}).qNumFormat,measureText:e=>u({text:e,fontFamily:f.axis.label.name.fontFamily,fontSize:f.axis.label.name.fontSize})},ticks:{generator:{type:"d3",initialMin:t.get("zoom").min},anchor:"start",clamp:!0},cache:zd({viewState:t,viewCache:n,layoutService:o})};return{[Vo.SCALE.MAJOR]:d(!0,{},h,{ticks:{level:"outer"}}),[Vo.SCALE.MAJOR_INNER]:d(!0,{},h,{ticks:{level:"inner"}})}}function Bd({picasso:e,models:t,viewState:n,viewCache:r,environment:i}){const{meta:o}=t.layoutService,a=o.isTime?{...Fd({picasso:e,viewState:n,viewCache:r,models:t,environment:i})}:o.isContinuous?{[Vo.SCALE.MAJOR]:Ld({models:t,viewState:n,environment:i})}:o.isBarSeriesGrouped?{[Vo.SCALE.MAJOR]:Pd({models:t,environment:i})}:{[Vo.SCALE.MAJOR]:o.isBarSeriesStackedInBothAxis?Pd({models:t,environment:i}):_d({models:t,environment:i})};return qd(t)?{...a,[Vo.SCALE.REDUCED]:jd({viewCache:r,mainMajor:a[Vo.SCALE.MAJOR]})}:a}function Vd({fields:e,tickModel:t,dockService:n,environment:r}){const i="rtl"===r.options.direction,{orientation:o}=n.meta.minor;return{data:{source:"qHyperCube",fields:e},invert:"vertical"===o||i,ticks:{values:t.query.getValues},min:t.query.getMin,max:t.query.getMax}}function Hd({layoutService:e,tickModel:t,dockService:n,environment:r}){if(!qd({layoutService:e}))return;const i="rtl"===r.options.direction,{orientation:o}=n.meta.minor;return{type:"linear",invert:"vertical"===o||i,min:t.query.getMin,max:t.query.getMax}}function $d({picasso:e,models:t,viewState:n,viewCache:r,environment:i}){const{layoutService:o,fieldModel:a,primaryTickModel:s,secondaryTickModel:l,colorService:u,dockService:c}=t;return{...Bd({picasso:e,models:t,viewState:n,viewCache:r,environment:i}),[Vo.SCALE.MINOR.PRIMARY]:Vd({fields:a.main.minorsPrimary,tickModel:s,dockService:c,environment:i}),[Vo.SCALE.MINOR.SECONDARY]:Vd({fields:a.main.minorsSecondary,tickModel:l,dockService:c,environment:i}),[Vo.SCALE.MINOR.REDUCED_PRIMARY]:Hd({layoutService:o,tickModel:s,dockService:c,environment:i}),[Vo.SCALE.MINOR.REDUCED_SECONDARY]:Hd({layoutService:o,tickModel:l,dockService:c,environment:i}),...u.custom.wrappedScales()}}var Ud={AXIS:{MAJOR:{HORIZONTAL:{width:"XSMALL",height:"SMALL"},VERTICAL:{width:"SMALL",height:"XSMALL"}},MINOR:"XSMALL"},AXIS_TITLE:{MAJOR:{HORIZONTAL:{width:"XSMALL",height:"MEDIUM"},VERTICAL:{width:"MEDIUM",height:"XSMALL"}},MINOR:"SMALL"},GRID_LINE:"XSMALL",VALUE_LABEL:"XSMALL",LABEL_SPACE:"XSMALL",OUT_OF_BOUNDS_MARKER:"XSMALL",REFERENCE_LINE:"SPARK"};const Wd=["all","labels"];function Yd({models:e}){const{layoutService:t,dockService:n,seriesModel:r,themeService:i}=e,o=t.getLayoutValue("measureAxes");if(!o||!o.length)return!1;const a=i.getStyles(),{measureAxes:s}=r.meta;return s.filter((e=>{const t=e.isPrimary?0:1;return Wd.some((e=>o[t].show===e))})).map((e=>({type:"axis",key:e.isPrimary?Vo.COMPONENT.AXIS.MINOR.PRIMARY:Vo.COMPONENT.AXIS.MINOR.SECONDARY,scale:e.scale,layout:{dock:e.isPrimary?n.meta.minor.dock:n.meta.minorSecondary.dock,minimumLayoutMode:Ud.AXIS.MINOR},settings:{labels:{show:!0,fontFamily:a.axis.label.name.fontFamily,fontSize:a.axis.label.name.fontSize,fill:a.axis.label.name.color},line:{stroke:a.axis.line.major.color},ticks:{stroke:a.axis.line.major.color},minorTicks:{stroke:a.axis.line.minor.color}}})))}var Xd=.5,Gd=3,Kd=13;function Jd({models:e,environment:t}){const{layoutService:n,dockService:r,themeService:i}=e,o="rtl"===t.options.direction,a=n.getLayoutValue("dimensionAxis"),s=i.getStyles(),l=(({layoutService:e})=>{const t=e.getHyperCubeValue("qDimensionInfo.0.qApprMaxGlyphCount"),[n]=e.getDataPages(),r=n?n.qMatrix:[];return A.getAdjustedMaxGlyphCount(t,r,0,"qText")})({layoutService:n}),{orientation:u}=r.meta.major,c="horizontal"===u?a.label:"auto";return{type:"axis",key:Vo.COMPONENT.AXIS.MAJOR,scale:Vo.SCALE.MAJOR,layout:{dock:r.meta.major.dock,minimumLayoutMode:Ud.AXIS.MAJOR[u.toUpperCase()]},settings:{labels:{mode:a.label,tiltAngle:o?-40:40,maxEdgeBleed:50,maxLengthPx:"horizontal"===c?void 0:r.meta.minor.size/4,maxGlyphCount:l,tiltThreshold:l>Gd&&l<Kd?1:void 0,fontFamily:s.axis.label.name.fontFamily,fontSize:s.axis.label.name.fontSize,fill:s.axis.label.name.color}},brush:{consume:[{context:"selection",style:{inactive:{opacity:Xd}}}]}}}function Zd({models:e}){const{dockService:t,themeService:n}=e,{orientation:r}=t.meta.major,i=n.getStyles();return{type:"axis",key:Vo.COMPONENT.AXIS.MAJOR_CONTINUOUS,scale:Vo.SCALE.MAJOR,layout:{dock:t.meta.major.dock,minimumLayoutMode:Ud.AXIS.MAJOR[r.toUpperCase()]},settings:{labels:{align:0,offset:4,fontFamily:i.axis.label.name.fontFamily,fontSize:i.axis.label.name.fontSize,fill:i.axis.label.name.color},line:{show:!1}}}}function Qd({models:e,environment:t}){const{layoutService:n}=e,r=n.getLayoutValue("dimensionAxis");if(!r)return[];const{show:i}=r;return"none"===i||"title"===i?[]:n.meta.isTime?function({models:e,environment:t}){const{dockService:n,themeService:r}=e,i="rtl"===t.options.direction,{orientation:o}=n.meta.major,a="bottom"===n.meta.major.dock?0:1,s=r.getStyles(),l=i?1:0,u={type:"time-axis",renderer:"svg",layout:{dock:n.meta.major.dock,minimumLayoutMode:Ud.AXIS.MAJOR[o]},preferredSize:()=>({size:2*parseFloat(s.axis.label.name.fontSize),edgeBleed:{left:1,right:1}}),settings:{anchor:i?"end":"start",label:{align:a,justify:l},guideLine:{major:{justify:l},minor:{align:a}},line:{show:!1}},style:{label:{fontFamily:s.axis.label.name.fontFamily,fontSize:s.axis.label.name.fontSize,fill:s.axis.label.name.color},majorGuideLine:{stroke:s.axis.line.major.color},minorGuideLine:{stroke:s.axis.line.minor.color}}};return[d(!0,{},u,{key:Vo.COMPONENT.AXIS.TIME_INNER,scale:Vo.SCALE.MAJOR_INNER,settings:{guideLine:{minor:{show:!0}}},style:{majorGuideLine:{stroke:s.axis.line.minor.color},minorGuideLine:{stroke:s.axis.line.major.color}}}),d(!0,{},u,{key:Vo.COMPONENT.AXIS.TIME_OUTER,scale:Vo.SCALE.MAJOR,settings:{guideLine:{minor:{show:!1}}}})]}({models:e,environment:t}):n.meta.isContinuous?[Zd({models:e})]:[Jd({models:e,environment:t})]}const ef=({layoutService:e,axis:t})=>e.meta.isBarSeriesGrouped?({scale:e,datum:t})=>e([t.value,t.typeIndex.value])+e.bandwidth()/2:e.meta.isBarSeriesStackedInBothAxis?({scale:e,datum:n})=>e([n.value,t])+e.bandwidth()/2:null,tf=({layoutService:e,seriesModel:t,rtl:n,orientation:r})=>e.meta.isContinuous?null:e.meta.isBarSeriesGrouped?({scale:e,datum:i})=>e([i.value,n&&"horizontal"===r?t.meta.barSeriesCount-1:0])+e.bandwidth()*t.meta.barSeriesCount/2:e.meta.isBarSeriesStackedInBothAxis?({scale:e,datum:t})=>e([t.value,n&&"horizontal"===r?1:0])+e.bandwidth():null;function nf({layoutService:e,active:t={},inactive:n={}}){return{consume:[{context:"selection",data:["selectionDimension","end","color","major"],style:{active:{strokeWidth:e.meta.isContinuous?0:2,stroke:"#000",opacity:e=>{var t,n;return!0===(null===(t=e.data)||void 0===t||null===(n=t.null)||void 0===n?void 0:n.value)?0:1},...t},inactive:{opacity:e=>{var t,n;return!0===(null===(t=e.data)||void 0===t||null===(n=t.null)||void 0===n?void 0:n.value)?0:Xd},...n}}}]}}var rf="max",of="min";function af(e,t){return function(e,t){const{hasExplicitMax:n}=t.meta,{max:r}=t.explicit;return!!n&&e>r}(e,t)||function(e,t){const{hasExplicitMin:n}=t.meta,{min:r}=t.explicit;return!!n&&e<r}(e,t)}const sf=(e,t)=>`${e}-${t.id}`,lf=4,uf=12,cf=4;function df({chart:e,layoutService:t,dockService:n,markerKey:r,markerType:i}){if(t.meta.isContinuous)return()=>cf+"px";const o={size:void 0},a="horizontal"===n.meta.major.orientation?"width":"height";return t=>{if(!o.size){const n=e.component(r),s=t.resources.scale(Vo.SCALE.MAJOR),l=n.rect[a]*s.bandwidth()*.25,u=Math.max(lf,Math.min(uf,l));o.size=("bar"===i?2*u:u)+"px"}return o.size}}const{isDark:ff}=De;const hf=({chart:e,models:t,series:n,environment:r})=>{const{layoutService:i,seriesModel:o,colorService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:u}=t,c=a.getColor(),{fill:d,marker:f}=n.options,{isContinuous:h}=i.meta,p="rtl"===r.options.direction,{orientation:m}=s.meta.major,y="horizontal"===m,g=(n.isPrimary?l:u).query.getExtrema(),v=({end:e})=>{const{value:t}=e;return af(t,g)},b=sf(Vo.COMPONENT.MARKER,n);return{type:"point",key:b,data:{filter:e=>n.ref===e.end.source.field,collection:n.collection},settings:{[y?"x":"y"]:{scale:Vo.SCALE.MAJOR,fn:tf({layoutService:i,seriesModel:o,rtl:p,orientation:m}),ref:h?"major":void 0},[y?"y":"x"]:{scale:n.scale,ref:"end",fn:e=>{var t;const n=!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)?e.scale.min():e.datum.end.value;return function(e){return Math.min(Math.max(0,e),1)}(e.scale(n))}},fill:d?c:"none",opacity:e=>{var t;return!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)||v(e.datum)?0:1},stroke:e=>{const t=c(e);return d?ff(t)?function(e){return ae(e).brighter(.5).toString()}(t):function(e){return ae(e).darker().toString()}(t):t},size:df({chart:e,layoutService:i,dockService:s,markerKey:b,markerType:f}),shape:()=>(({marker:e,horizontal:t,rtl:n})=>{let r;return"triangle"!==e||t||(r=n?"left":"right"),"bar"===e&&(r=t?"horizontal":"vertical"),r?{type:e,direction:r}:{type:e}})({marker:f,horizontal:y,rtl:p})},brush:nf({layoutService:i,active:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||v(e.data)?0:1}},inactive:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||v(e.data)?0:Xd}}})}};function pf({property:e="end",isHorizontal:t,isColor:n,fallback:r,rtl:i}){return function(o){const{datum:a,resources:{scale:s}}=o,l=s(Vo.SCALE.MAJOR),u=s(Vo.SCALE.COLOR),c=t&&i?[...a.points].reverse():a.points,d=c.reduce(((t,n,r)=>{const i="NaN"===n[e].value||Number.isNaN(n[e].value),o=c[r+1],a=o&&"NaN"!==o[e].value&&!Number.isNaN(o[e].value);return i?t.length&&a&&t.push(n):t.push(n),t}),[]),f="group-by-measure"===l.type?e=>l([e.major.value,e.typeIndex.value]):e=>l(e.major.value),h=d.map(f),p=Math.min(...h),m=Math.max(...h)-p,y=0===m?1:m,g=h.map(((e,t)=>0===t?0:t===h.length-1?1:(e-p)/y)),v=[];for(let t=0;t<d.length;t++){const i=d[t],o=i.color&&i.color.value,a=n?o||r:u(o)||r,s=0===t,l=t===d.length-1,c=g[t];if("NaN"===i[e].value||Number.isNaN(i[e].value))v[t-1].virtual||v.push({virtual:!0});else{const n=d[t-1];n&&"NaN"!==n[e].value&&!Number.isNaN(n[e].value)?v.push({color:a,offset:s?0:Math.max(0,parseFloat((c-(c-g[t-1])/2).toFixed(5)))}):v.push({color:a,offset:c});const r=d[t+1];r&&"NaN"!==r[e].value&&!Number.isNaN(r[e].value)?v.push({color:a,offset:l?1:Math.max(0,parseFloat((c+(g[t+1]-c)/2).toFixed(5)))}):v.push({color:a,offset:c})}}const b=v.reduce(((e,t,n)=>{if(t.virtual){const t=v[n-1],r=v[n+1],i=t.offset+(r.offset-t.offset)/2;e.push({color:t.color,offset:i},{color:r.color,offset:i})}else e.push(t);return e}),[]);return{type:"gradient",x1:0,x2:t?1:0,y1:0,y2:t?0:1,stops:b}}}function mf({environment:e,models:t,measureIndex:n}){const{layoutService:r,colorService:i,dockService:o}=t,a="rtl"===e.options.direction,{hasMultipleMeasures:s}=r.meta,{mode:l,type:u,nil:c}=i.getSettingsForMeasure(n),d="horizontal"===o.meta.major.orientation;if(!l||"constant"===u)return i.getColor();if("measure"===l&&"categorical"===u)return i.getColor();const f=r.getHyperCubeValue(`qMeasureInfo.${n}.color`);if(null!=f&&f.on)return"byExpression"===f.mode?pf({isHorizontal:d,isColor:!0,fallback:c,rtl:a}):i.getColor();const h=r.getLayoutValue("color",{}),p=!h.auto&&"byExpression"===h.mode,m=!!h.colorExpression;if(p&&!m)return c;const y=!h.auto&&"byMeasure"===h.mode&&h.byMeasureDef&&void 0!==h.byMeasureDef.activeMeasureIndex;return s||!y?pf({isHorizontal:d,isColor:"color"===u,fallback:c,rtl:a}):"continuous"===u?function({isHorizontal:e,rtl:t}){return function(n){const{datum:{points:r},resources:{scale:i}}=n,o=i(Vo.SCALE.COLOR),a=r.map((e=>e.end.value)).filter((e=>"NaN"!==e&&!Number.isNaN(e))),s=Math.min(...a),l=Math.max(...a),u=l-s,c=0===u?1:u,d=o.domain().map((e=>({color:o(Math.min(l,Math.max(s,e))),offset:Math.min(1,Math.max(0,(e-s)/c))})));return{type:"gradient",x1:!e&&t?1:0,x2:e||t?0:1,y1:e?1:0,y2:0,stops:d}}}({isHorizontal:d,rtl:a}):function({isHorizontal:e,isArea:t,fallback:n,rtl:r}){return function(i){const{datum:{points:o},resources:{scale:a}}=i,s=a(Vo.SCALE.COLOR),l=o.map((e=>e.end.value)).filter((e=>"NaN"!==e&&!Number.isNaN(e))),u=Math.min(...l),c=Math.max(...l),d=t?Math.min(0,u):u,f=(t?Math.max(0,c):c)-d,h=0===f?1:f,p=s.domain(),m=[];for(let e=0;e<p.length-1;e++){const t=p[e],r=s(t)||n;m.push({color:r,offset:Math.min(1,Math.max(0,(t-d)/h))});const i=p[e+1];m.push({color:r,offset:Math.min(1,Math.max(0,(i-d)/h))})}return{type:"gradient",x1:!e&&r?1:0,x2:e||r?0:1,y1:e?1:0,y2:0,stops:m}}}({isHorizontal:d,fallback:c,rtl:a})}const yf=({models:e,environment:t,series:n})=>{const{layoutService:r,seriesModel:i,dockService:o,styleModel:a}=e,s="rtl"===t.options.direction,{orientation:l}=o.meta.major,u=tf({layoutService:r,seriesModel:i,rtl:s,orientation:l});return{key:sf(Vo.COMPONENT.LINE,n),type:"line",data:{filter:e=>n.ref===e.end.source.field,collection:n.collection},settings:{coordinates:{major:{scale:Vo.SCALE.MAJOR,fn:u},minor:{scale:n.scale,ref:"end"}},layers:{curve:a.query.line.getCurveFn(),line:{stroke:mf({models:e,environment:t,measureIndex:n.refIndex}),strokeWidth:a.query.line.getStrokeWidthFn(),strokeDasharray:a.query.line.getStrokeDasharrayFn(),strokeLinejoin:"round"}},connect:n.options.showAsConnections,orientation:o.meta.major.orientation},brush:nf({layoutService:r,active:{stroke:void 0,strokeWidth:void 0,opacity:Xd},inactive:{opacity:Xd}})}};var gf={BAR:{STROKE:{COLOR:"#205891",WIDTH:{NONE:0,SMALL:1,MEDIUM:2,LARGE:4}}},LINE:{CURVE:{LINEAR:"linear",MONOTONE:"monotone",STEP:"step"},WIDTH:{FULL:{DEFAULT:2,ACTIVE:2},LESS:{DEFAULT:1,ACTIVE:1}},TYPE:{SOLID:void 0,DASHED:"5, 5"}},POINT:{SIZE:{DEFAULT:6,ACTIVE:4}}};function vf({series:e,layoutService:t}){const{showAsConnections:n}=e.options,r=function({layoutService:e}){const{isDiscrete:t}=e.meta;return({item:e})=>{if(e.dummy)return t;const{value:n}=e.end;return"NaN"===n||Number.isNaN(n)}}({layoutService:t}),i=n?(e,t)=>0!==e&&t.slice(0,e).reverse().some((e=>!r({item:e}))):(e,t)=>0!==e&&!r({item:t[e-1]}),o=n?(e,t)=>e!==t.length-1&&t.slice(e+1,t.length).some((e=>!r({item:e}))):(e,t)=>e!==t.length-1&&!r({item:t[e+1]});return({index:e,items:t})=>({before:i(e,t),after:o(e,t)})}const bf=3,xf=20;function Mf({models:e,series:t,environment:n}){const{layoutService:r,colorService:i,seriesModel:o,dockService:a,styleModel:s,primaryExtremumModel:l,secondaryExtremumModel:u,selectionService:c}=e,d=r.getLayoutValue("dataPoint.show",!1),{orientation:f}=a.meta.major,h="horizontal"===f,p="SPARK"===a.meta.chart.mode,m=i.getColor(),{POINT:y}=gf,g=function({layoutService:e,series:t}){const n={key:void 0,map:void 0},r=vf({series:t,layoutService:e});return({item:e,items:t})=>{n.key!==t&&(n.key=t,n.map=function({items:e}){return e.reduce(((e,t)=>{const{value:n}=t.line;return e[n]||(e[n]={items:[],keys:[]}),e[n].items.push(t),e[n].keys.push(`${t.major.value}-${t.line.value}`),e}),{})}({items:t}));const{value:i}=e.line,o=n.map[i],a=`${e.major.value}-${i}`,s=o.keys.indexOf(a),{before:l,after:u}=r({index:s,items:o.items});return!l&&!u}}({series:t,layoutService:r}),v="rtl"===n.options.direction,b=(t.isPrimary?l:u).query.getExtrema(),{isContinuous:x}=r.meta,M=({end:e})=>{const{value:t}=e;return af(t,b)};return{type:"point",key:sf(Vo.COMPONENT.POINT,t),data:{filter:e=>t.ref===e.end.source.field,collection:t.collection},preferredSize:()=>({edgeBleed:{top:h?y.SIZE.DEFAULT/2:0}}),settings:{[h?"y":"x"]:{scale:t.scale,ref:"end",fn:e=>{var t;const n=!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)?e.scale.min():e.datum.end.value;return function(e){return Math.min(Math.max(0,e),1)}(e.scale(n))}},[h?"x":"y"]:{scale:Vo.SCALE.MAJOR,fn:tf({layoutService:r,seriesModel:o,rtl:v,orientation:f}),ref:"major"},sizeLimits:{minPx:bf,maxPx:xf},size:e=>{const{value:t}=e.datum.line;return s.query.point.getSize(t)+"px"},fill:m,opacity:({datum:e,data:t})=>{var n;return null!==(n=e.null)&&void 0!==n&&n.value||M(e)?0:p?g({item:e,items:t.items})?1:0:d||g({item:e,items:t.items})?1:0}},brush:nf({layoutService:r,active:{r:e=>e.r+gf.POINT.SIZE.ACTIVE/2,strokeWidth:1.5,stroke:"#FFFFFF",opacity:e=>{var t;if(!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||M(e.data))return 0;if(!x||d)return 1;const{event:n,components:r=[]}=(null==c?void 0:c.getSelectionInfo())||{};if("continuousRange"===n)return 0;if("tap"!==n)return 1;return[Vo.COMPONENT.AXIS_OVERLAY.CONTINUOUS,Vo.COMPONENT.AXIS_OVERLAY.TIME_INNER,Vo.COMPONENT.AXIS_OVERLAY.TIME_OUTER].some((e=>r.indexOf(e)>=0))?0:1}},inactive:{opacity:e=>1===e.opacity?.5:0}})}}const Sf=(e,{dataset:t})=>{var n;if(null!==(n=e.null)&&void 0!==n&&n.value)return"-";const{value:r,label:i,source:o}=e.end,a=t(o.key).field(o.field);return a.raw().isCustomFormatted?i:a.formatter()(r)};function wf({chart:e,models:t,environment:n,series:r,lineSeries:i}){const{layoutService:o,dockService:a,themeService:s,primaryExtremumModel:l,secondaryExtremumModel:u}=t,{id:c}=r,d="rtl"===n.options.direction,f=o.getLayoutValue("dataPoint");if(!f)return!1;if(!f.show||!f.showLineLabels)return!1;const h=(r.isPrimary?l:u).query.getExtrema(),p=s.getStyles();return{type:"point-label",key:`${Vo.COMPONENT.POINT_LABEL}-${c}`,layout:{displayOrder:2,minimumLayoutMode:Ud.VALUE_LABEL},settings:{orientation:a.meta.major.orientation,rtl:d,connect:r.options.showAsConnections,label:t=>Sf(t,e),pointValue:e=>e.end.value,majorValue:e=>e.value,target:{labelSpace:Vo.COMPONENT.LABEL_SPACE,point:`${Vo.COMPONENT.POINT}-${c}`,allPoints:i.map((e=>`${Vo.COMPONENT.POINT}-${e.id}`))},lineIndex:"typeIndex",showLabel:e=>!(({end:e})=>af(e.value,h))(e.data)},style:{fontFamily:p.label.value.fontFamily,fontSize:p.label.value.fontSize,fill:p.label.value.color}}}const Ef=({chart:e,dock:t})=>{let n=t;const r=e.component(`${Vo.COMPONENT.SLICED_HAT}-${rf}`),i=e.component(`${Vo.COMPONENT.SLICED_HAT}-${rf}-${$o.PRIMARY}`),o=e.component(`${Vo.COMPONENT.SLICED_HAT}-${rf}-${$o.SECONDARY}`);return r?n=`@${Vo.COMPONENT.SLICED_HAT}-${rf}`:i?n=`@${Vo.COMPONENT.SLICED_HAT}-${rf}-${$o.PRIMARY}`:o&&(n=`@${Vo.COMPONENT.SLICED_HAT}-${rf}-${$o.SECONDARY}`),n},kf=({dockPosition:e,orientation:t,rtl:n})=>{let r=1;return e!==`@${Vo.COMPONENT.SLICED_HAT}-${rf}`&&e!==`@${Vo.COMPONENT.SLICED_HAT}-${rf}-${$o.PRIMARY}`&&e!==`@${Vo.COMPONENT.SLICED_HAT}-${rf}-${$o.SECONDARY}`||!("horizontal"===t||"vertical"===t&&n)||(r=4),e!==`@${Vo.COMPONENT.SLICED_HAT}-${of}`&&e!==`@${Vo.COMPONENT.SLICED_HAT}-${of}-${$o.PRIMARY}`&&e!==`@${Vo.COMPONENT.SLICED_HAT}-${of}-${$o.SECONDARY}`||"vertical"!==t||n||(r=4),r};function Cf({chart:e,models:t,environment:n,lineSeries:r}){const{layoutService:i,dockService:o,primaryExtremumModel:a,secondaryExtremumModel:s}=t,l=i.getLayoutValue("dataPoint",{}),u="rtl"===n.options.direction;if(!r.length)return!1;if(!l.show||!l.showLineLabels)return!1;const c="horizontal"===o.meta.major.orientation,{show:d}=i.getLayoutValue("dimensionAxis",{});if("none"!==d){const{dock:e}=o.meta.major;if(c&&"top"===e)return!1;if(!c&&e===(u?"left":"right"))return!1}const f=u?"left":"right";return{type:"label-space",key:Vo.COMPONENT.LABEL_SPACE,layout:{minimumLayoutMode:Ud.LABEL_SPACE,dock:Ef({chart:e,dock:c?"top":f})},settings:{size:10},show:()=>{const t=e.component(`${Vo.COMPONENT.LINE}-${r[0].id}`);if(!t||!t.rect)return!1;const n=(c?17:34)/t.rect[c?"height":"width"],i=a.query.getExtrema(),o=e.scale(Vo.SCALE.MINOR.PRIMARY)(i.implicit.line.max),l=c||u?o:1-o,d=r.filter((e=>e.isPrimary)).length>0,f=s.query.getExtrema(),h=e.scale(Vo.SCALE.MINOR.SECONDARY)(f.implicit.line.max),p=c||u?h:1-h,m=r.filter((e=>!e.isPrimary)).length>0;return d&&l<n||m&&p<n}}}const Of={min:"Min",max:"Max"};function Tf(e,t,n){const{hasExplicitMax:r}=n.meta,{max:i}=n.explicit;return!!r&&Math.max(e,t)>i&&i<=Math.min(e,t)}function Af(e,t,n){const{hasExplicitMin:r}=n.meta,{min:i}=n.explicit;return!!r&&Math.min(e,t)<i&&i>=Math.max(e,t)}function Nf(e,t,n){return Tf(e,t,n)||Af(e,t,n)}function qf(e,t){const{hasExplicitMax:n}=t.meta,{max:r}=t.explicit;return!!n&&e>r&&r<=0}function Df(e,t){const{hasExplicitMin:n}=t.meta,{min:r}=t.explicit;return!!n&&e<r&&r>=0}function Rf(e,t){return qf(e,t)||Df(e,t)}function If({extrema:e,type:t}){return!(function({extrema:e,type:t}){return!e.meta["hasExplicit"+Of[t]]}({extrema:e,type:t})||function({extrema:e,type:t}){const n=t===rf?e.implicit.bar.max:e.implicit.bar.min,r=Number(n.toFixed(13));return t===rf?!qf(r,e):!Df(r,e)}({extrema:e,type:t}))}var _f=Object.freeze({__proto__:null,isSegmentMaxOutOfBounds:Tf,isSegmentMinOutOfBounds:Af,isSegmentOutOfBounds:Nf,isMaxOutOfBounds:qf,isMinOutOfBounds:Df,isOutOfBounds:Rf,shouldShowOob:If});const Pf={min:"Min",max:"Max"},Lf=({chart:e,models:t,markerSeries:n,lineSeries:r,barSeries:i,environment:o,type:a})=>{const{dockService:s,primaryExtremumModel:l,secondaryExtremumModel:u,primaryTickModel:c,secondaryTickModel:d,layoutService:f,seriesModel:h,themeService:p,fieldModel:m}=t,y="rtl"===o.options.direction,{dock:g,opposite:v,orientation:b}=s.meta.major,x=l.query.getExtrema(),M=u.query.getExtrema(),S=a===rf,{isBarSeriesGrouped:w}=f.meta,E=(({chart:e,type:t,opposite:n,dock:r})=>{let i=t===rf?n:r;const o=e.component(`${Vo.COMPONENT.SLICED_HAT}-${t}`),a=e.component(`${Vo.COMPONENT.SLICED_HAT}-${t}-${$o.PRIMARY}`),s=e.component(`${Vo.COMPONENT.SLICED_HAT}-${t}-${$o.SECONDARY}`),l=e.component(Vo.COMPONENT.LABEL_SPACE),u=e.component(`${Vo.COMPONENT.BAR_OOB}-${t}`),c=e.component(`${Vo.COMPONENT.BAR_OOB}-${t}-${$o.PRIMARY}`),d=e.component(`${Vo.COMPONENT.BAR_OOB}-${t}-${$o.SECONDARY}`);return o?i=`@${Vo.COMPONENT.SLICED_HAT}-${t}`:a?i=`@${Vo.COMPONENT.SLICED_HAT}-${t}-${$o.PRIMARY}`:s?i=`@${Vo.COMPONENT.SLICED_HAT}-${t}-${$o.SECONDARY}`:u||c||d?l&&t===rf?i="@"+Vo.COMPONENT.LABEL_SPACE:u?i=`@${Vo.COMPONENT.BAR_OOB}-${t}`:c?i=`@${Vo.COMPONENT.BAR_OOB}-${t}-${$o.PRIMARY}`:d&&(i=`@${Vo.COMPONENT.BAR_OOB}-${t}-${$o.SECONDARY}`):l&&t===rf&&(i="@"+Vo.COMPONENT.LABEL_SPACE),i})({chart:e,type:a,opposite:v,dock:g}),k=tf({layoutService:f,seriesModel:h,rtl:y,orientation:b}),C=r.concat(n);if(!C.length)return!1;const O=S?x.implicit.bar.max:x.implicit.bar.min,T=Number(O.toFixed(13));if(!w&&i.length&&_f[`is${Pf[a]}OutOfBounds`](T,x))return!1;if(!x.meta.hasExplicit&&!M.meta.hasExplicit)return!1;const A=S?"max":"min",N=Math[A](Number(x.implicit.line[A].toFixed(13)),Number(x.implicit.marker[A].toFixed(13))),q=Math[A](Number(M.implicit.line[A].toFixed(13)),Number(M.implicit.marker[A].toFixed(13))),D=C.filter((e=>e.isPrimary)),R=C.filter((e=>!e.isPrimary)),I=D.length>0,_=R.length>0,{major:P,majorNumeric:L}=m.main,j=e=>"NaN"!==e.qNum?e.qNum:0,z=f.meta.isContinuous?L:P;return{type:"data-out-of-bounds-marker",key:`${Vo.COMPONENT.DATA_OOB_MARKER}-${a}`,layout:{dock:E,minimumLayoutMode:Ud.OUT_OF_BOUNDS_MARKER},data:{extract:C.map((({ref:e,typeIndex:t,options:n})=>({field:P,value:f.meta.isContinuous?e=>e.qNum:void 0,props:{major:{field:z},end:{field:e,value:n.showAsZeros?j:void 0},typeIndex:t,null:{field:e,value:e=>"NaN"===e.qNum}}})))},settings:{type:a,primaryExtremum:S?()=>c.query.getMax():()=>c.query.getMin(),secondaryExtremum:S?()=>d.query.getMax():()=>d.query.getMin(),primarySeries:D,secondarySeries:R,orientation:b,rtl:y,major:{scale:Vo.SCALE.MAJOR,fn:k},markerOffset:kf({dockPosition:E,orientation:b,rtl:y})},brush:nf({layoutService:f}),show:()=>{if(S){if(I&&N>c.query.getMax())return!0;if(_&&q>d.query.getMax())return!0}if(!S){if(I&&N<c.query.getMin())return!0;if(_&&q<d.query.getMin())return!0}return!1},style:{fill:p.getStyles().outOfRange.color}}},jf={FULL:16,MEDIUM:14,SMALL:12,XSMALL:8,SPARK:4};function zf({chart:e,models:t,viewState:n,viewCache:r,axis:i}){const o=ml(),{dockService:a}=t;return({data:t})=>(({items:t})=>{const{rect:n}=e.component(`${Vo.COMPONENT.BAR}-${i}`)||{};return(!t.length||!n)&&2})(t)||(()=>{const{min:e,max:t}=n.get("zoom");return o.get([e,t])||o.empty()&&!1})()||(()=>{const e=jf[a.meta.chart.mode];return 0===Math.abs(r.get("continuousMax")-r.get("continuousMin"))&&e})()||(()=>{const{min:e,max:t}=n.get("zoom"),i=Math.abs(r.get("continuousMax")-r.get("continuousMin")),s=Math.abs(t-e),l=jf[a.meta.chart.mode],u=function(e,t,n){return e*(1-n)+t*n}(2,l,1-Math.min(s/i/.2,1));return o.set([e,t],Math.max(2,Math.min(l,u)))})()}const Ff=({isContinuous:e,isBarSeriesGrouped:t,styleModel:n,discreteModel:r,isBarSeriesStackedInBothAxis:i})=>e?1:n.query.bar.getHasStyling()?n.query.bar.getHasStrokeWidth()?function(){const e=n.query.bar.getStrokeWidth()/r.query.getItemSize(),t=n.query.bar.getWidthFn()(),i=t+e;return i>1?t-(i-1):t}:n.query.bar.getWidthFn():t||i?.9:.7;function Bf(e){return Math.min(Math.max(0,e),1)}const Vf=({chart:e,models:t,viewState:n,viewCache:r,isPrimary:i})=>{const{layoutService:o,dockService:a,colorService:s,seriesModel:l,styleModel:u,discreteModel:c,primaryExtremumModel:d,secondaryExtremumModel:f}=t,{isContinuous:h,isBarSeriesStacked:p,isBarSeriesGrouped:m,isBarSeriesStackedInBothAxis:y}=o.meta,g=e=>e.datum.start?e.datum.start.value:e.scale.min(),v=i?$o.PRIMARY:$o.SECONDARY,b=i?Vo.SCALE.MINOR.PRIMARY:Vo.SCALE.MINOR.SECONDARY;if(!(i?l.meta.primaryBarSeriesCount:l.meta.secondaryBarSeriesCount))return!1;const x=p?{scale:b,start:{ref:"start",fn:e=>{const t=g(e);return Bf(e.scale(t))}},end:{ref:"end",fn:e=>{const t=(e=>e.datum.end?e.datum.end.value:g(e))(e);return Bf(e.scale(t))}}}:{scale:b,start:{ref:"start",fn:e=>{const t=g(e);return Bf(e.scale(t))}},end:{ref:"end",fn:e=>{var t;const n=!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)?g(e):e.datum.end.value;return Bf(e.scale(n))}}},M=(i?d:f).query.getExtrema(),S=p?({start:e,end:t})=>Nf(e.value,t.value,M):({end:e})=>Rf(e.value,M);return{type:"box",key:`${Vo.COMPONENT.BAR}-${v}`,data:{filter:(()=>{if(p)return;const e=l.query.series(Ho.BAR).filter((e=>e.isPrimary===i)).map((e=>e.ref));return t=>e.some((e=>e===t.end.source.field))})(),collection:p?i?Vo.COLLECTION.STACKED_PRIMARY:Vo.COLLECTION.STACKED_SECONDARY:i?Vo.COLLECTION.PRIMARY:Vo.COLLECTION.SECONDARY},preferredSize:h?()=>({size:0,edgeBleed:{left:1,right:1}}):void 0,settings:{orientation:a.meta.minor.orientation,major:{scale:Vo.SCALE.MAJOR,fn:ef({layoutService:o,axis:v}),ref:h?{start:"major",end:"major"}:void 0},minor:x,box:{width:Ff({isContinuous:h,isBarSeriesGrouped:m,styleModel:u,discreteModel:c,isBarSeriesStackedInBothAxis:y}),minWidthPx:h?zf({chart:e,models:t,viewState:n,viewCache:r,axis:v}):void 0,fill:s.getColor(),strokeWidth:u.query.bar.getStrokeWidth(),stroke:u.query.bar.getStrokeColor(),minHeightPx:.3,opacity:e=>{var t,n;return!0===(null===(t=e.datum)||void 0===t||null===(n=t.null)||void 0===n?void 0:n.value)||S(e.datum)?0:1}},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},brush:nf({layoutService:o,active:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||S(e.data)?0:1}},inactive:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||S(e.data)?0:Xd}}})}},Hf=({chart:e,models:t,viewState:n,viewCache:r,isPrimary:i})=>{const{layoutService:o,dockService:a,colorService:s,seriesModel:l,styleModel:u,discreteModel:c}=t,{isBarSeriesStacked:d,isContinuous:f,isBarSeriesGrouped:h,isBarSeriesStackedInBothAxis:p}=o.meta,m=i?$o.PRIMARY:$o.SECONDARY,y=i?l.meta.primaryBarSeriesCount:l.meta.secondaryBarSeriesCount;if(!d||0===y)return!1;return{key:`${Vo.COMPONENT.STACK_BAR}-${m}`,type:"box",data:{collection:i?Vo.COLLECTION.STACKED_TOTAL_PRIMARY:Vo.COLLECTION.STACKED_TOTAL_SECONDARY},settings:{major:{scale:Vo.SCALE.MAJOR,fn:ef({layoutService:o,axis:m}),ref:f?{start:"timeStart",end:"timeEnd"}:void 0},minor:{scale:i?Vo.SCALE.MINOR.PRIMARY:Vo.SCALE.MINOR.SECONDARY,start:{ref:"sumOfNegatives"},end:{ref:"sumOfPositives"}},orientation:a.meta.minor.orientation,box:{width:Ff({isContinuous:f,isBarSeriesGrouped:h,styleModel:u,discreteModel:c,isBarSeriesStackedInBothAxis:p}),minWidthPx:f?zf({chart:e,models:t,viewState:n,viewCache:r,axis:m}):2,opacity:0,fill:s.getColor()},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}}};function $f({style:e,simplifiedPlacement:t}){return n=>De.isDark(t.background?t.background.fill:n.node.attrs.fill)?e.lightColor:e.darkColor}function Uf(e,t){const n="horizontal"===e.dockService.meta.major.orientation;return{placements:t.simplifiedPlacements.map((e=>function({simplifiedPlacement:e,style:t,isHorizontal:n}){const r=e.padding||{left:n?0:4,right:n?0:4,top:n?4:0,bottom:n?4:0};return{position:e.position,justify:e.justify,fill:e.onBackground?t.color:$f({style:t,simplifiedPlacement:e}),overflow:e.overflow,background:e.background,padding:r}}({simplifiedPlacement:e,style:t.style,isHorizontal:n}))),label:t.label}}function Wf(e,t,n,r){const i=function(e,t){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)}(e,r);let o="up";return"vertical"===t&&i<0?o="down":"horizontal"===t&&(o=i>=0&&!n||i<0&&n?"right":"left"),o}const Yf=(e,t)=>{if(!e)return!1;const{isBarSeriesStacked:n,isContinuous:r}=t;return!n||!r},Xf=(e,t)=>{if(!e)return!1;const{isBarSeriesStacked:n,isContinuous:r}=t;return!!n&&(!!r||!1!==e)};function Gf(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}const Kf=({models:e,environment:t,isPrimary:n})=>{const{layoutService:r,seriesModel:i}=e,{meta:o}=r,a="rtl"===t.options.direction,s=e.themeService.getStyles(),l=e.layoutService.getLayoutValue("dataPoint.showBarLabels",!1),u=n?$o.PRIMARY:$o.SECONDARY;if(!(n?i.meta.primaryBarSeriesCount:i.meta.secondaryBarSeriesCount)||!Yf(l,o))return!1;let c;!o.isBarSeriesStacked&&(c=o.isBarSeriesStacked?1:0);const d={label:e=>Sf(e.data,e),simplifiedPlacements:Gf(c,0===c?1:0,o.isBarSeriesStacked?.5:1,o.isContinuous),style:s.label.value},f=[Uf(e,d)],h=[{component:`${Vo.COMPONENT.BAR}-${u}`,selector:"rect",strategy:{type:"bar",settings:{direction:t=>Wf(t.data.end.value,e.dockService.meta.minor.orientation,a,0),labels:f,fontSize:s.label.value.numFontSize,fontFamily:s.label.value.fontFamily}}}];return{type:"labels",key:`${Vo.COMPONENT.BAR_LABEL}-${u}`,layout:{minimumLayoutMode:Ud.VALUE_LABEL},settings:{sources:h}}};function Jf(e,t,n){const r=[{position:e,onBackground:!0,justify:0,overflow:n}];return t&&r.push({position:"inside",onBackground:!1,justify:"outside"===e?1:0,background:{fill:"#cce6e6e6",padding:{left:2,right:2,top:2,bottom:2}}}),r}function Zf({chart:e,models:t,environment:n,isPrimary:r}){const{meta:i}=t.layoutService,o="rtl"===n.options.direction,a=t.themeService.getStyles(),s=t.layoutService.getLayoutValue("dataPoint.showBarLabels",!1),l=r?$o.PRIMARY:$o.SECONDARY;if(0===(r?t.seriesModel.meta.primaryBarSeriesCount:t.seriesModel.meta.secondaryBarSeriesCount)||!Xf(s,i))return!1;const u=e.formatter(r?Vo.FORMATTER.PRIMARY:Vo.FORMATTER.SECONDARY)||(e=>e),c=e=>0===e?"":u(e),d={label:e=>c(e.data.sumOfPositives.value),simplifiedPlacements:Jf("outside",true,i.isContinuous),style:a.label.value},f={label:e=>c(e.data.sumOfNegatives.value),simplifiedPlacements:Jf("opposite",true,i.isContinuous),style:a.label.value},h=[Uf(t,d),Uf(t,f)];return{type:"labels",key:`${Vo.COMPONENT.STACK_BAR_LABEL}-${l}`,layout:{displayOrder:2,minimumLayoutMode:Ud.VALUE_LABEL},settings:{sources:[{component:`${Vo.COMPONENT.STACK_BAR}-${l}`,selector:"rect",strategy:{type:"bar",settings:{direction:e=>Wf(e.data.sumOfPositives.value,t.dockService.meta.minor.orientation,o),labels:h,fontSize:a.label.value.numFontSize,fontFamily:a.label.value.fontFamily}}}]}}}var Qf=Object.freeze({__proto__:null,hasMaxHat:function(e,t){const{hasExplicitMax:n}=t.meta,{max:r}=t.explicit;return!!n&&e>r&&r>0},hasMinHat:function(e,t){const{hasExplicitMin:n}=t.meta,{min:r}=t.explicit;return!!n&&e<r&&r<0}});const eh={min:"Min",max:"Max"};function th({chart:e,models:t,type:n,viewCache:r,viewState:i,isPrimary:o}){const{layoutService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:u,styleModel:c,discreteModel:f}=t,{isBarSeriesStacked:h,isContinuous:p,isBarSeriesGrouped:m,isBarSeriesStackedInBothAxis:y}=a.meta,g=h?Hf({chart:e,models:t,viewCache:r,viewState:i,isPrimary:o}):Vf({chart:e,models:t,viewCache:r,viewState:i,isPrimary:o}),v=o?l.query.getExtrema():u.query.getExtrema(),b=n===rf,x=o?$o.PRIMARY:$o.SECONDARY;if(!g)return!1;if(function(e,t){return!e.meta["hasExplicit"+eh[t]]}(v,n)||function(e,t,n){const r=n?e.implicit.bar.max:e.implicit.bar.min,i=Number(r.toFixed(13));return!Qf[`has${eh[t]}Hat`](i,e)}(v,n,b)||function(e,t,n){const r=n?e=>e<0:e=>e>0;return e.meta["hasExplicit"+eh[t]]&&r(e.explicit[t])}(v,n,b))return!1;let M="end";h&&(M=b?"sumOfPositives":"sumOfNegatives");const S=function(e){let t;return()=>(void 0===t&&(t=e()),t)}((()=>e.scale(o?Vo.SCALE.MINOR.PRIMARY:Vo.SCALE.MINOR.SECONDARY)[n]()));const w=(({chart:e,type:t,isPrimary:n,dock:r})=>{let i=r;const o=e.component(`${Vo.COMPONENT.SLICED_HAT}-${t}-${$o.PRIMARY}`),a=e.component(`${Vo.COMPONENT.SLICED_HAT}-${t}-${$o.SECONDARY}`);return o&&a&&(i=n?r:`@${Vo.COMPONENT.SLICED_HAT}-${t}-${$o.PRIMARY}`),i})({chart:e,type:n,isPrimary:o,dock:b?s.meta.minor.end:s.meta.minor.start});return{type:"box-sliced-hat",key:`${Vo.COMPONENT.SLICED_HAT}-${n}-${x}`,layout:{dock:w},data:g.data,settings:{orientation:g.settings.orientation,major:g.settings.major,minor:g.settings.minor,hat:d({},g.settings.box,{fill:h?"#999":g.settings.box.fill,alignment:1,opacity:1,show:function(e){const t=S(),n=function(e){if("number"!=typeof e)return e;const t=Math.round(e);return Math.abs(e-t)<1e-12?t:e}(e.datum[M].value);return b?n>t:n<t},width:Ff({isContinuous:p,isBarSeriesGrouped:m,styleModel:c,discreteModel:f,isBarSeriesStackedInBothAxis:y}),strokeWidth:c.query.bar.getStrokeWidth(),stroke:c.query.bar.getStrokeColor()})},brush:nf({layoutService:a})}}const nh={min:"Min",max:"Max"},rh={sumOfPositives:"sumOfNegatives",sumOfNegatives:"sumOfPositives"};function ih({chart:e,models:t,type:n,viewCache:r,viewState:i,isPrimary:o}){const{layoutService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:u,themeService:c}=t,{end:f,start:h}=s.meta.minor,{isBarSeriesStacked:p}=a.meta,m=p?Hf({chart:e,models:t,viewCache:r,viewState:i,isPrimary:o}):Vf({chart:e,models:t,viewCache:r,viewState:i,isPrimary:o}),y=o?l.query.getExtrema():u.query.getExtrema(),g=n===rf?y.implicit.bar.max:y.implicit.bar.min,v=Number(g.toFixed(13)),b=o?$o.PRIMARY:$o.SECONDARY;if(!m)return!1;if(!_f[`is${nh[n]}OutOfBounds`](v,y))return!1;const x=(({chart:e,type:t,end:n,start:r,isPrimary:i})=>{let o=t===rf?n:r;const a=e.component(Vo.COMPONENT.LABEL_SPACE),s=e.component(`${Vo.COMPONENT.SLICED_HAT}-${t}-${$o.PRIMARY}`),l=e.component(`${Vo.COMPONENT.SLICED_HAT}-${t}-${$o.SECONDARY}`),u=e.component(`${Vo.COMPONENT.BAR_OOB}-${t}-${$o.PRIMARY}`),c=e.component(`${Vo.COMPONENT.BAR_OOB}-${t}-${$o.SECONDARY}`);return s?o=`@${Vo.COMPONENT.SLICED_HAT}-${t}-${$o.PRIMARY}`:l?o=`@${Vo.COMPONENT.SLICED_HAT}-${t}-${$o.SECONDARY}`:u&&c&&!i?o=`@${Vo.COMPONENT.BAR_OOB}-${t}-${$o.PRIMARY}`:a&&t===rf&&(o="@"+Vo.COMPONENT.LABEL_SPACE),o})({chart:e,type:n,end:f,start:h,isPrimary:o});let M="end";p&&(M=n===rf?"sumOfPositives":"sumOfNegatives");return{type:"box-out-of-bounds",key:`${Vo.COMPONENT.BAR_OOB}-${n}-${b}`,layout:{dock:x},data:m.data,settings:{orientation:m.settings.orientation,major:m.settings.major,minor:m.settings.minor,dockValue:T.getDockValue(n===rf?f:h),oob:d({},m.settings.box,{fill:c.getStyles().outOfRange.color,alignment:1,opacity:1,show:function(e){var t;if(!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value))return!1;const r=p&&0===e.datum[M].value,i=_f[`is${nh[n]}OutOfBounds`](e.datum[M].value,y,n);return(!r||function({type:e,item:t,prop:n,extrema:r}){const i=t.datum[rh[n]].value;return 0!==i&&_f[`is${nh[e]}OutOfBounds`](i,r,e)}({type:n,item:e,prop:M,extrema:y}))&&i}})},brush:nf({layoutService:a})}}function oh(e){return Math.min(Math.max(0,e),1)}const ah=({chart:e,models:t,type:n,isPrimary:r})=>{const{discreteModel:i,styleModel:o,seriesModel:a,layoutService:s}=t;if(!(r?a.meta.primaryBarSeriesCount:a.meta.secondaryBarSeriesCount))return!1;const{isBarSeriesStacked:l,isContinuous:u,isBarSeriesGrouped:c,isBarSeriesStackedInBothAxis:d}=s.meta,f=e.scale(r?Vo.SCALE.MINOR.PRIMARY:Vo.SCALE.MINOR.SECONDARY),h=r?$o.PRIMARY:$o.SECONDARY,p=r?t.primaryExtremumModel.query.getExtrema():t.secondaryExtremumModel.query.getExtrema(),m=n===rf;if(!If({extrema:p,type:n}))return!1;const y=e=>e.datum.start?e.datum.start.value:e.scale.min(),g=(e,t="end")=>e.datum[t]?e.datum[t].value:y(e);return{type:"box",key:`${Vo.COMPONENT.GHOST_BAR_OOB}-${n}-${h}`,data:{filter:(()=>{if(l)return;const e=a.query.series(Ho.BAR).filter((e=>e.isPrimary===r)).map((e=>e.ref));return t=>e.some((e=>e===t.end.source.field))})(),collection:l?r?Vo.COLLECTION.STACKED_TOTAL_PRIMARY:Vo.COLLECTION.STACKED_TOTAL_SECONDARY:r?Vo.COLLECTION.PRIMARY:Vo.COLLECTION.SECONDARY},settings:{orientation:t.dockService.meta.minor.orientation,major:{scale:Vo.SCALE.MAJOR,fn:ef({layoutService:s,axis:h}),ref:u?{start:"major",end:"major"}:void 0},minor:{scale:r?Vo.SCALE.MINOR.PRIMARY:Vo.SCALE.MINOR.SECONDARY,start:{ref:"start",fn:e=>{const t=y(e);return oh(e.scale(t))}},end:l?"max"===n?{ref:"sumOfPositives",fn:e=>{const t=g(e,"sumOfPositives");return oh(e.scale(t))}}:{ref:"sumOfNegatives",fn:e=>{const t=g(e,"sumOfNegatives");return oh(e.scale(t))}}:{ref:"end",fn:e=>{const t=g(e);return oh(e.scale(t))}}},box:{width:Ff({isContinuous:u,isBarSeriesGrouped:c,styleModel:o,discreteModel:i,isBarSeriesStackedInBothAxis:d}),stroke:"transparent",fill:"none",opacity:0,show:e=>{let t="end";l&&(t=m?"sumOfPositives":"sumOfNegatives");const n=e.datum[t]?e.datum[t].value:f.max();return m?n>f.max():n<f.min()}},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}}};function sh(e,t,n,r,i){const o=[{position:e,justify:0,overflow:n,background:{padding:{left:1,right:1,top:1,bottom:1}}}];return t&&o.push({position:"inside",onBackground:!1,justify:r||i?0:1,background:{padding:{left:2,right:2,top:2,bottom:2}}}),o}const lh=({chart:e,models:t,type:n,environment:r,isPrimary:i})=>{const{layoutService:o,dockService:a,primaryExtremumModel:s,secondaryExtremumModel:l,themeService:u,seriesModel:c}=t,d=u.getStyles(),{meta:f}=o,{isBarSeriesStacked:h}=f,p=e.formatter(i?Vo.FORMATTER.PRIMARY:Vo.FORMATTER.SECONDARY),m=o.getLayoutValue("dataPoint.showBarLabels",!1),y="horizontal"===a.meta.major.orientation,g="rtl"===r.options.direction;if(!(i?c.meta.primaryBarSeriesCount:c.meta.secondaryBarSeriesCount)||!h&&!Yf(m,f)||h&&!Xf(m,f))return!1;const v=i?s.query.getExtrema():l.query.getExtrema();if(!v.meta.hasExplicit)return!1;const b=n===rf?v.implicit.bar.max:v.implicit.bar.min;if(!(n===rf?qf(b,v):Df(b,v)))return!1;let x=e=>Sf(e.data,e);f.isBarSeriesStacked&&(x=n===rf?function(e){var t;if(!0===(null===(t=e.data.null)||void 0===t?void 0:t.value))return"";if(qf(e.data.sumOfPositives.value,v)){const t=0===e.data.sumOfNegatives.value?e.data.sumOfPositives.value:e.data.sumOfNegatives.value;return p?p(t):t}return""}:function(e){var t;if(!0===(null===(t=e.data.null)||void 0===t?void 0:t.value))return"";if(Df(e.data.sumOfNegatives.value,v)){const t=0===e.data.sumOfPositives.value?e.data.sumOfNegatives.value:e.data.sumOfPositives.value;return p?p(t):t}return""});const M={label:x,simplifiedPlacements:sh("outside",true,f.isContinuous,y,g),style:d.label.value},S={label:x,simplifiedPlacements:sh("opposite",true,f.isContinuous,y,g),style:d.label.value},w=[Uf(t,M),Uf(t,S)],E=i?$o.PRIMARY:$o.SECONDARY,k="horizontal"===a.meta.major.orientation?"down":"right",C=[{component:`${Vo.COMPONENT.GHOST_BAR_OOB}-${n}-${E}`,selector:"rect",strategy:{type:"bar",settings:{direction:k,labels:w,fontSize:d.label.value.numFontSize,fontFamily:d.label.value.fontFamily}}}];return{key:`${Vo.COMPONENT.BAR_OOB_LABEL}-${n}-${E}`,type:"labels",layout:{minimumLayoutMode:Ud.VALUE_LABEL},settings:{sources:C}}},uh=({chart:e,models:t,viewState:n,viewCache:r})=>[Vf({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!0}),Vf({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!1})],ch=({chart:e,models:t,viewState:n,viewCache:r})=>[Hf({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!0}),Hf({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!1})],dh=({chart:e,models:t,environment:n})=>{const{isBarSeriesStacked:r}=t.layoutService.meta;if(r){return[Zf({chart:e,models:t,environment:n,isPrimary:!0}),Zf({chart:e,models:t,environment:n,isPrimary:!1})]}return[Kf({models:t,environment:n,isPrimary:!0}),Kf({models:t,environment:n,isPrimary:!1})]},fh=({chart:e,models:t,viewCache:n,viewState:r})=>[th({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!0}),th({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!0}),th({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!1}),th({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!1})],hh=({chart:e,models:t,viewCache:n,viewState:r})=>[ih({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!0}),ih({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!0}),ih({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!1}),ih({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!1})],ph=({chart:e,models:t})=>[ah({chart:e,models:t,type:"max",isPrimary:!0}),ah({chart:e,models:t,type:"min",isPrimary:!0}),ah({chart:e,models:t,type:"max",isPrimary:!1}),ah({chart:e,models:t,type:"min",isPrimary:!1})],mh=({chart:e,models:t,environment:n})=>[lh({chart:e,models:t,type:"max",environment:n,isPrimary:!0}),lh({chart:e,models:t,type:"min",environment:n,isPrimary:!0}),lh({chart:e,models:t,type:"max",environment:n,isPrimary:!1}),lh({chart:e,models:t,type:"min",environment:n,isPrimary:!1})],yh=({chart:e,environment:t,models:n,viewState:r,viewCache:i})=>{const{seriesModel:o}=n,a=o.query.series(Ho.BAR).slice(-1),s=o.query.series(Ho.LINE),l=o.query.series(Ho.MARKER);return[...uh({chart:e,models:n,viewState:r,viewCache:i}),...ch({chart:e,models:n,viewState:r,viewCache:i}),...s.map((e=>yf({models:n,environment:t,series:e}))),...s.map((e=>Mf({models:n,series:e,environment:t}))),...l.map((r=>hf({chart:e,models:n,series:r,environment:t}))),...s.map((r=>wf({chart:e,models:n,environment:t,series:r,lineSeries:s}))),...dh({chart:e,models:n,environment:t}),...fh({chart:e,models:n,viewCache:i,viewState:r}),...hh({chart:e,models:n,viewCache:i,viewState:r}),...ph({chart:e,models:n}),...mh({chart:e,models:n,environment:t}),Lf({chart:e,models:n,markerSeries:l,lineSeries:s,barSeries:a,environment:t,type:"max"}),Lf({chart:e,models:n,markerSeries:l,lineSeries:s,barSeries:a,environment:t,type:"min"}),Cf({chart:e,models:n,environment:t,lineSeries:s})]},gh=0,vh=1,bh=3;function xh({models:e}){const{dockService:t,seriesModel:n,layoutService:r,themeService:i}=e,{auto:o,spacing:a}=r.getLayoutValue("gridLine",{});if(!o&&a===gh)return!1;const s=i.getStyles(),l=n.meta.primarySeries.length>0;return{key:Vo.COMPONENT.GRID_LINE,type:"grid-line",layout:{minimumLayoutMode:Ud.GRID_LINE},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}),ticks:{show:!(!o&&a===vh)||((e,t)=>t%2==0),stroke:s.grid.line.major.color},minorTicks:{show:!o&&a===bh,stroke:s.grid.line.minor.color},["horizontal"===t.meta.major.orientation?"y":"x"]:l?Vo.SCALE.MINOR.PRIMARY:Vo.SCALE.MINOR.SECONDARY}}function Mh({models:e}){const{primaryExtremumModel:t,primaryTickModel:n,themeService:r,dockService:i,seriesModel:o}=e,a=t.query.getExtrema();return!!(o.meta.primarySeries.length>0&&a.meta.includesZero)&&{key:Vo.COMPONENT.ZERO_LINE,type:"ref-line",layout:{minimumLayoutMode:Ud.GRID_LINE},show:()=>n.query.getMin()<=0&&n.query.getMax()>=0,lines:{["horizontal"===i.meta.minor.orientation?"x":"y"]:[{value:0,scale:Vo.SCALE.MINOR.PRIMARY,line:{stroke:r.getStyles().grid.line.highContrast.color}}]}}}function Sh({models:e}){const{layoutService:t,themeService:n}=e,{isContinuous:r,isTime:i}=t.meta;if(!r)return[];const o=n.getStyles(),a={type:"grid-line",layout:{minimumLayoutMode:Ud.GRID_LINE},ticks:{stroke:o.grid.line.major.color},minorTicks:{show:!1,stroke:o.grid.line.minor.color}};return i?[d(!0,{},a,{key:"time-inner-grid",x:{scale:Vo.SCALE.MAJOR_INNER},ticks:{stroke:o.grid.line.minor.color}}),d(!0,{},a,{key:"time-outer-grid",x:{scale:Vo.SCALE.MAJOR}})]:[d(!0,{},a,{key:"continuous-grid",x:{scale:Vo.SCALE.MAJOR},minorTicks:{show:!0}})]}function wh({models:e}){return[xh({models:e}),Mh({models:e}),...Sh({models:e})]}function Eh({models:e,environment:t,actions:n}){const{layoutService:r,dockService:i,propertiesModel:o,appModel:a,genericObjectModel:s,themeService:l}=e,u=o.query.getProperties(),c=r.getLayoutValue("dimensionAxis");if(!c)return!1;const{show:d}=c;if("all"!==d&&"title"!==d)return!1;const{orientation:f}=i.meta.major,h=l.getStyles();return{type:"data-title",key:Vo.COMPONENT.AXIS_TITLE.MAJOR,layout:{dock:i.meta.major.dock,minimumLayoutMode:Ud.AXIS_TITLE.MAJOR[f.toUpperCase()]},settings:{hyperCube:r.getHyperCube(),hyperCubeDef:u&&u.qHyperCubeDef,isDimension:!0,disabled:()=>!n.interact.enabled(),model:s,app:a,translator:t.translator,rtl:"rtl"===t.options.direction,selections:void 0},style:{fontFamily:h.axis.title.fontFamily,fontSize:h.axis.title.fontSize,color:h.axis.title.color}}}const kh=(e,t,n)=>e.query.seriesByAxis(n).map((e=>({...t[e.refIndex],explicitColumn:e.refIndex})));function Ch({models:e,environment:t,actions:n}){const{layoutService:r,dockService:i,seriesModel:o,propertiesModel:a,appModel:s,genericObjectModel:l,themeService:u}=e,c=a.query.getProperties(),d=r.getLayoutValue("measureAxes");if(!d||!d.length)return!1;const f=u.getStyles(),{measureAxes:h}=o.meta;return h.filter((e=>e.isPrimary?"all"===d[0].show||"title"===d[0].show:"all"===d[1].show||"title"===d[1].show)).map((e=>{const a=r.getHyperCube(),{isPrimary:u}=e,d=o.query.seriesByAxis(u).length>1,h={type:"data-title",key:u?Vo.COMPONENT.AXIS_TITLE.MINOR.PRIMARY:Vo.COMPONENT.AXIS_TITLE.MINOR.SECONDARY,layout:{dock:u?i.meta.minor.dock:i.meta.minorSecondary.dock,minimumLayoutMode:Ud.AXIS_TITLE.MINOR},settings:{hyperCube:a,hyperCubeDef:c&&c.qHyperCubeDef,isDimension:!1,explicitItemInfos:kh(o,a.qMeasureInfo,u),onChangeToAlternative:({oldItem:e,newItem:t})=>{t.qDef.series=e.qDef.series;const n=e.qAttributeExpressions.findIndex((e=>"colorByExpression"===e.id));if(-1!==n){const r=e.qAttributeExpressions.splice(n,1)[0];t.qAttributeExpressions.unshift(r)}},disabled:()=>!n.interact.enabled(),model:l,app:s,translator:t.translator,rtl:"rtl"===t.options.direction,selections:void 0,skipAttributeExpressions:!0},style:{fontFamily:f.axis.title.fontFamily,fontSize:f.axis.title.fontSize,color:f.axis.title.color}};return d&&(h.settings.padding="0",h.settings.minWidth="auto"),h}))}function Oh({models:e,environment:t,actions:n}){return[Eh({models:e,environment:t,actions:n}),...Ch({models:e,environment:t,actions:n})]}function Th({models:e,environment:t,viewState:n,viewCache:r}){const{discreteModel:i,layoutService:o,dockService:a,continuousModel:s,themeService:l}=e,{isSnapshot:u,isDiscrete:c,isContinuous:d}=o.meta,f="rtl"===t.options.direction;return!(u&&!d)&&function({layoutService:e,dockService:t,discrete:n,continuousDataModel:r,viewState:i,viewCache:o,themeService:a,rtl:s,scrollbarOverride:l,visualizeCache:u=!1,deviceType:c}){const d=Qc({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:()=>Jc({layoutService:e,viewState:i,viewCache:o})}};d.bar&&(h.settings.style="slim",h.settings.size={area:"touch"===c?{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&&u&&(h.settings.injections=()=>[Kc({layoutService:e,discrete:n})]),h}({viewState:n,viewCache:r,discrete:i,continuousDataModel:s,layoutService:o,dockService:a,themeService:l,rtl:f,scrollbarOverride:{predicate:()=>c,value:Gc.OPTIONS.BAR.value},deviceType:t.deviceType})}function Ah({chart:e,models:t,viewState:n,viewCache:r,isPrimary:i}){const{layoutService:o}=t,a=Vf({chart:e,models:t,viewState:n,viewCache:r,isPrimary:i});if(!a)return!1;const s=i?$o.PRIMARY:$o.SECONDARY;return a.key=`${Vo.COMPONENT.MINI_CHART.BAR}-${s}`,a.data.collection=o.meta.isBarSeriesStacked?i?Vo.COLLECTION.REDUCED_STACKED_PRIMARY:Vo.COLLECTION.REDUCED_STACKED_SECONDARY:i?Vo.COLLECTION.REDUCED_PRIMARY:Vo.COLLECTION.REDUCED_SECONDARY,a.settings.box.minWidthPx=void 0,a.settings.minor.scale=i?Vo.SCALE.MINOR.REDUCED_PRIMARY:Vo.SCALE.MINOR.REDUCED_SECONDARY,a.settings.major.scale=Vo.SCALE.REDUCED,a.layout={dock:"@scrollbar"},a}function Nh({environment:e,models:t}){const n=t.styleModel.query.line.getStrokeDasharrayFn();return t.seriesModel.query.series(Ho.LINE).map((r=>{const i=yf({models:t,environment:e,series:r});return i.key=sf(Vo.COMPONENT.MINI_CHART.LINE,r),i.data.collection=Vo.COLLECTION.REDUCED,i.settings.coordinates.minor.scale=r.isPrimary?Vo.SCALE.MINOR.REDUCED_PRIMARY:Vo.SCALE.MINOR.REDUCED_SECONDARY,i.settings.coordinates.major.scale=Vo.SCALE.REDUCED,i.settings.layers.line.strokeWidth=1,i.settings.layers.line.strokeDasharray=(...e)=>void 0===n(...e)?void 0:"1, 1",i.layout={dock:"@scrollbar"},i}))}function qh({models:e,environment:t}){return e.seriesModel.query.series(Ho.MARKER).map((n=>{const r=hf({models:e,environment:t,series:n});return r.key=sf(Vo.COMPONENT.MINI_CHART.MARKER,n),r.data.collection=Vo.COLLECTION.REDUCED,r.settings.y.scale=n.isPrimary?Vo.SCALE.MINOR.REDUCED_PRIMARY:Vo.SCALE.MINOR.REDUCED_SECONDARY,r.settings.x.scale=Vo.SCALE.REDUCED,r.layout={dock:"@scrollbar"},r}))}function Dh({chart:e,models:t,viewState:n,viewCache:r,environment:i}){return qd(t)?[Ah({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!0}),Ah({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!1}),...Nh({environment:i,models:t}),...qh({models:t,environment:i})]:[]}function Rh({models:e,environment:t}){const{type:n}=e.colorService.getSettings();if("categorical"!==n)return!1;const r=D({key:Vo.COMPONENT.LEGEND_TOOLTIP,rtl:"rtl"===t.options.direction}),i=e.themeService.getStyles();return d(!0,r,{settings:{filter:e=>function({nodes:e}){return e.filter((e=>e.data&&e.key===Vo.COMPONENT.LEGEND_CATEGORICAL))}({nodes:e}),extract:e=>function({context:e}){return[[{content:e.node.data.label,style:{"font-weight":"bold","text-align":"left"},colspan:2}]]}({context:e}),placement:"pointer"},scale:Vo.SCALE.COLOR,style:{content:{fontFamily:i.fontFamily}}})}function Ih({colorSettings:e,nodes:t}){let n=t.filter((e=>e.data[Vo.SCALE.COLOR]&&(e=>e.data[Vo.SCALE.COLOR].value===e.data.end.value)(e)))[0];return n||(null!=e&&e.field&&([n]=t.filter((t=>{var n,r;return(null===(n=t.data[Vo.SCALE.COLOR])||void 0===n||null===(r=n.source)||void 0===r?void 0:r.field)===e.field}))),n||t[0])}const _h=({models:e,rtl:t})=>{const{detectTextDirection:n}=P,r=e.colorService.getSettings();return function({context:e,nodes:i}){const o=Ih({colorSettings:r,nodes:i}),a=function({colorSettings:e,context:t,node:n}){const{color:r}=n.data;if("color"===e.type||!r||!e.fieldType)return;const{value:i,label:o}=r,{key:a,field:s}=r.source,{dataset:l}=t.resources,u=l(a).field(s).formatter();if(u&&"measure"===e.fieldType)return Number.isNaN(i)?"-":u(r.value);const c=o||i;return Number.isNaN(c)||"NaN"===c?"-":c}({colorSettings:r,context:e,node:o});if(void 0===a)return!1;const s=function({colorSettings:e,context:t,node:n}){if(e.label)return e.label;const{color:r}=n.data;if("color"!==e.type&&r){const{dataset:e}=t.resources,{key:n,field:i}=r.source;return e(n).field(i).title()}}({colorSettings:r,context:e,node:o}),l=function({node:e}){const{data:t,attrs:n}=e;return t.fillColor?t.fillColor:n&&n.fill?n.fill:void 0}({node:o}),u=e.h("div",{style:{display:"inline-block",width:10,height:10,"background-color":l,margin:"0 8px"}});return{label:t?[":",s]:[s,":"],value:t?[a,u]:[u,a],labelDirection:n(s),valueDirection:n(a)}}};function Ph({chart:e,models:t,rtl:n,translator:r}){const{detectTextDirection:i}=P,{tooltipModel:o,layoutService:a}=t,s=_h({models:t,rtl:n}),l=function({rtl:e}){const{detectTextDirection:t}=P;return function({node:n,dataset:r}){var i,o;const{segment:a,end:s}=n.data,{value:l,label:u,source:c}=a||s,{key:d,field:f}=c,h=r(d).field(f),p=h.title();let m;return m=h.raw().isCustomFormatted?u:""===l||Number.isNaN(l)||!0===(null===(i=n.data)||void 0===i||null===(o=i.null)||void 0===o?void 0:o.value)?"-":h.formatter()(l),{label:e?[":",p]:[p,":"],value:m,labelDirection:t(p),valueDirection:t(l)}}}({rtl:n});return function({context:t}){const u=t.node.childrenNodes,{data:c}=u[0],{dataset:d}=t.resources,f=c.label,h=s({context:t,nodes:u}),p={dataId:c.value,title:{label:f,direction:i(f)},color:h},m=u.map((t=>l({chart:e,node:t,dataset:d}))).filter(((e,t,n)=>t===n.findIndex((t=>t.label[0]===e.label[0]&&t.value===e.value))));if(p.measures=h?m.filter((e=>e.label[0]!==h.label[0]||e.value!==h.value[1])):m,o.query.useCustomTooltip()){var y,g;const e=a.getLayout();e.tooltip.hideBasic&&(p.measures=[],p.color=void 0);const{customTooltipInfoAttrExpsArr:s,customTooltipAttrExpsArr:l}=la({nodes:[u[0]],layout:e,dataset:d});if([p.customTitle]=s.filter((e=>e.id===Wo.CUSTOM.TITLE)).map((e=>{const t=e;return t.direction=i(p.customTitle),t})),[p.customDescription]=s.filter((e=>e.id===Wo.CUSTOM.DESCRIPTION)).map((e=>{const t=e;return t.direction=i(p.customDescription),t})),p.customMeasures=l.map((e=>{const t=e;return t.label=n?[":",t.label]:[t.label,":"],t.value=""===t.value||"NaN"===t.value?"-":t.value,t.valueDirection=i(e.value),t.labelDirection=i(e.label),e})),null!==(y=(g=o.query).useTooltipChart)&&void 0!==y&&y.call(g))if(o.query.hasChartLimitation()){ea.destroyVisualization({customTooltipModel:o.query.getCustomTooltipModel()});const e=r.get("properties.tooltip.notselectedmessage");p.customLimitation=e}else{const n=ea.createContainer({ctx:t,layout:e});p.customChart=n}let c=[];u.forEach((e=>{var t,n;(null===(t=e.data)||void 0===t||null===(n=t.customTooltipImages)||void 0===n?void 0:n.length)>0&&!Array.isArray(e.data.customTooltipImages[0])&&(c=e.data.customTooltipImages)})),c.length>0&&(p.customImages=c)}return p}}function Lh(e){return(null==e?void 0:e.type)||Ho.BAR}const jh={circle:"circle",square:"rect",diamond:"path",triangle:"path",bar:"rect"},zh=[`${Vo.COMPONENT.BAR}-${$o.PRIMARY}`,`${Vo.COMPONENT.BAR}-${$o.SECONDARY}`];const Fh=({chart:e,seriesModel:t,value:n})=>{const r=function({value:e,chart:t,seriesModel:n}){const r=n.meta.allSeries,i=[];return r.forEach((n=>{const r=Lh(n);r===Ho.BAR?i.push(...t.findShapes("rect").filter((t=>-1!==zh.indexOf(t.key)&&t.data.typeIndex.value===n.typeIndex&&t.data.major.value===e))):r===Ho.LINE?i.push(...t.findShapes("circle").filter((t=>t.key===`${Vo.COMPONENT.POINT}-${n.id}`&&t.data.major.value===e))):i.push(...t.findShapes(jh[n.options.marker]).filter((t=>t.key===`${Vo.COMPONENT.MARKER}-${n.id}`&&t.data.major.value===e)))})),i}({chart:e,seriesModel:t,value:n});if(0===r.lenght)return null;return{bounds:Bo.combineBounds(r.map((e=>e.bounds))),data:r.map((e=>e.data)),childrenNodes:r,key:r[0].key}},Bh=[`${Vo.COMPONENT.BAR}-${$o.PRIMARY}`,`${Vo.COMPONENT.BAR}-${$o.SECONDARY}`,`${Vo.COMPONENT.BAR_OOB}-${rf}`,`${Vo.COMPONENT.BAR_OOB}-${of}`,`${Vo.COMPONENT.BAR_OOB}-${rf}-${$o.PRIMARY}`,`${Vo.COMPONENT.BAR_OOB}-${of}-${$o.PRIMARY}`,`${Vo.COMPONENT.BAR_OOB}-${rf}-${$o.SECONDARY}`,`${Vo.COMPONENT.BAR_OOB}-${of}-${$o.SECONDARY}`,`${Vo.COMPONENT.SLICED_HAT}-${rf}`,`${Vo.COMPONENT.SLICED_HAT}-${of}`,`${Vo.COMPONENT.SLICED_HAT}-${rf}-${$o.PRIMARY}`,`${Vo.COMPONENT.SLICED_HAT}-${of}-${$o.PRIMARY}`,`${Vo.COMPONENT.SLICED_HAT}-${rf}-${$o.SECONDARY}`,`${Vo.COMPONENT.SLICED_HAT}-${of}-${$o.SECONDARY}`,`${Vo.COMPONENT.DATA_OOB_MARKER}-${rf}`,`${Vo.COMPONENT.DATA_OOB_MARKER}-${of}`,Vo.COMPONENT.AXIS.MAJOR],Vh=({chart:e,models:t,nodes:n})=>{const{seriesModel:r}=t,{pointComponentKeys:i,markerComponentKeys:o}=r.meta,a=[...i,...o],s=[...Bh,...a];return n.length?(({chart:e,nodes:t,seriesModel:n})=>{const r=[],i=[];for(let o=0;o<t.length;++o){const{value:a}=t[o].data||{};if(void 0!==a&&-1===i.indexOf(a)){i.push(a);const t=Fh({chart:e,seriesModel:n,value:a});t&&r.push(t)}}return r})({chart:e,nodes:n.filter((e=>(({node:e})=>s.map((t=>-1!==e.key.indexOf(t))).some((e=>!0===e)))({node:e}))),seriesModel:r}):[]};function Hh({chart:e,models:t,environment:n}){const r=t.seriesModel.query.all(),i="rtl"===n.options.direction,{translator:o}=n,{appModel:a,tooltipModel:s,propertiesModel:l}=t,u=null==s?void 0:s.query.getCustomTooltipModel(),c=null==l?void 0:l.query.getProperties(),f=D({key:Vo.COMPONENT.TOOLTIP,rtl:i}),h=function({chart:e,models:t,rtl:n,translator:r}){const i=Ph({chart:e,models:t,rtl:n,translator:r});return function({context:e}){const t=i({context:e}),{dataId:r,title:o,color:a,measures:s,customTitle:l,customDescription:u,customMeasures:c,customImages:d,customChart:f,customLimitation:h}=t,p={dataId:r,title:[{content:o.label,style:{"font-weight":"bold","text-align":n?"right":"left",direction:o.direction},colspan:2}],color:void 0,measures:[]};return a&&(p.color=[{content:a.label,style:{"text-align":n?"right":"left",direction:a.labelDirection}},{content:a.value,style:{"text-align":n?"left":"right","vertical-align":"middle",direction:a.valueDirection}}]),p.measures=s.map((e=>[{content:e.label,style:{"text-align":n?"right":"left",direction:e.labelDirection}},{content:e.value,style:{"text-align":n?"left":"right","vertical-align":"middle",direction:e.valueDirection}}])),(l||u)&&0===c.length&&0===s.length&&(p.title=[]),l&&(p.customTitle=[{content:l.title,style:{"font-weight":"bold","text-align":n?"right":"left",direction:l.direction},colspan:2}]),u&&(p.customDescription=[{content:u.value,style:{"text-align":n?"right":"left",direction:u.direction},colspan:2}]),c&&(p.customMeasures=c.map((e=>[{content:e.label,style:{"text-align":n?"right":"left",direction:e.labelDirection}},{content:e.value,style:{"text-align":n?"left":"right","vertical-align":"middle",direction:e.valueDirection}}]))),f&&(p.customChart=f),h&&(p.customLimitation=ia.getFooterRow(h,e)),d&&(p.customImages=d.map((t=>ia.getImageRow(t,e)))),p}}({chart:e,models:t,rtl:i,translator:o,series:r});let p=[];return d(!0,f,{settings:{filter:n=>Vh({chart:e,models:t,nodes:n}),extract:e=>{var n,r,i;if(e&&(p=null!==(n=e.node)&&void 0!==n&&n.childrenNodes?[...e.node.childrenNodes]:[e.node],null!==(r=t.layoutService)&&void 0!==r&&null!==(i=r.meta)&&void 0!==i&&i.isContinuous)){const e=[];for(let t=0;t<p.length;t++){var o,a;null!==(o=p[t].data)&&void 0!==o&&null!==(a=o.selectionDimension)&&void 0!==a&&a.value&&(e[t]={data:{value:p[t].data.selectionDimension.value}})}p=e}return h({context:e})},content:({h:e,data:t,style:n})=>{const r=t,{visible:a,hidden:s}=function({sections:e}){const t={visible:[],hidden:[]};return e.reduce(((e,n)=>((e<7?t.visible:t.hidden).push(n),((e,t)=>{const n=void 0===t.color?0:1,{length:r}=t.measures;return e+1+n+r+(t.customLimitation||t.customChart||t.customImages&&t.customImages.length>0?7:0)})(e,n))),0),t}({sections:r}),l=a.reduce(((e,t)=>{const{title:n,color:r,measures:i,customTitle:o,customDescription:a,customMeasures:s,customImages:l,customChart:u,customLimitation:c}=t;return o&&e.push(o),a&&e.push(a),e.push(n),r&&e.push(r),e.push(...i),s&&e.push(...s),u&&e.push(u),c&&e.push(c),l&&e.push(...l),e}),[]);return s.length&&l.push(function({count:e,translator:t,rtl:n}){const{detectTextDirection:r}=P,i=t?t.get("Object.ChartTooltip.NMore",e):`+${e} more`;return[{content:i,style:{"font-weight":"bold","text-align":n?"right":"left",direction:r(i)},colspan:2}]}({count:s.length,rtl:i,translator:o})),l.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}))))},placement:"bounds",afterShow:()=>{s.query.useTooltipChart()&&s.query.useCustomTooltip()&&!s.query.hasChartLimitation()&&ea.show({app:a,properties:c,selectedNodes:p,customTooltipModel:u,rtl:i})}},style:{content:{fontFamily:t.themeService.getStyles().fontFamily}}})}function $h({chart:e,models:t,environment:n}){return[Rh({models:t,environment:n}),Hh({chart:e,models:t,environment:n})]}function Uh({models:e}){const{layoutService:t,dockService:n}=e,{isContinuous:r,isTime:i}=t.meta,o=t.getLayoutValue("dimensionAxis");if(!o||"none"===o.show||"title"===o.show)return[!1];if(!r)return[!1];const a=Ud.AXIS.MAJOR[n.meta.major.orientation.toUpperCase()];return i?[{type:"axis-overlay",key:Vo.COMPONENT.AXIS_OVERLAY.TIME_INNER,scale:Vo.SCALE.MAJOR_INNER,layout:{dock:"@"+Vo.COMPONENT.AXIS.TIME_INNER,minimumLayoutMode:a}},{type:"axis-overlay",key:Vo.COMPONENT.AXIS_OVERLAY.TIME_OUTER,scale:Vo.SCALE.MAJOR,layout:{dock:"@"+Vo.COMPONENT.AXIS.TIME_OUTER,minimumLayoutMode:a}}]:[{type:"axis-overlay",key:Vo.COMPONENT.AXIS_OVERLAY.CONTINUOUS,scale:Vo.SCALE.MAJOR,layout:{dock:"@"+Vo.COMPONENT.AXIS.MAJOR_CONTINUOUS,minimumLayoutMode:a}}]}function Wh({chart:e,models:t,environment:n}){const{refLineModel:r,layoutService:i,colorService:o,dockService:a,themeService:s,appLayoutModel:l,seriesModel:u}=t,c=l.qLocaleInfo,{options:d,theme:f}=n,h="rtl"===d.direction,p=u.query.series(Ho.BAR).filter((e=>e.isPrimary)),m=u.query.series(Ho.BAR).filter((e=>!e.isPrimary)),y=u.query.series(Ho.LINE),g=u.query.series(Ho.MARKER),v=u.query.all(),b=v.some((e=>e.isPrimary)),x=v.some((e=>!e.isPrimary)),M=b&&x,S={resolveUIColor:o.getPaletteColor},w=b?zo({refLineModel:r,layoutService:i,colorModel:S,dock:M?a.meta.minor.dock:a.meta.minor.opposite,scale:Vo.SCALE.MINOR.PRIMARY,style:s.getStyles(),formatter:Vo.FORMATTER.PRIMARY,theme:f,localeInfo:c,rtl:h,key:Vo.COMPONENT.PRIMARY_MEASURE_AXIS_REF_LINE_LABEL}):[],E=x?zo({refLineModel:r,layoutService:i,colorModel:S,dock:M?a.meta.minor.opposite:a.meta.minor.dock,scale:Vo.SCALE.MINOR.SECONDARY,style:s.getStyles(),formatter:Vo.FORMATTER.SECONDARY,theme:f,localeInfo:c,rtl:h,key:Vo.COMPONENT.SECONDARY_MEASURE_AXIS_REF_LINE_LABEL,path:"refLine.refLines2"}):[];return[!!b&&Lo({refLineModel:r,layoutService:i,colorModel:S,dockService:a,chart:e,scale:Vo.SCALE.MINOR.PRIMARY,axis:"horizontal"===a.meta.major.orientation?"y":"x",key:Vo.COMPONENT.PRIMARY_MEASURE_AXIS_REF_LINE,minimumLayoutMode:Ud.REFERENCE_LINE}),!!x&&Lo({refLineModel:r,layoutService:i,colorModel:S,dockService:a,chart:e,scale:Vo.SCALE.MINOR.SECONDARY,axis:"horizontal"===a.meta.major.orientation?"y":"x",key:Vo.COMPONENT.SECONDARY_MEASURE_AXIS_REF_LINE,path:"refLine.refLines2",minimumLayoutMode:Ud.REFERENCE_LINE}),Lo({isDimension:!0,refLineModel:r,layoutService:i,colorModel:S,dockService:a,chart:e,scale:Vo.SCALE.MAJOR,axis:"horizontal"===a.meta.major.orientation?"x":"y",rtl:h,key:Vo.COMPONENT.DIMENSION_REF_LINE,mainComponentKey:p.length?`${Vo.COMPONENT.BAR}-${$o.PRIMARY}`:m.length?`${Vo.COMPONENT.BAR}-${$o.SECONDARY}`:y.length?`${Vo.COMPONENT.LINE}-${y[0].id}`:g.length?`${Vo.COMPONENT.MARKER}-${g[0].id}`:`${Vo.COMPONENT.BAR}-${$o.PRIMARY}`,minimumLayoutMode:Ud.REFERENCE_LINE}),...w,...E,...zo({isDimension:!0,refLineModel:r,layoutService:i,colorModel:S,dock:a.meta.major.opposite,scale:Vo.SCALE.MAJOR,style:s.getStyles(),theme:f,localeInfo:c,rtl:h,key:Vo.COMPONENT.DIMENSION_REF_LINE_LABEL})]}function Yh(e){return"NaN"===e.qMin&&"NaN"===e.qMax}var Xh=[{key:"NoDataExist",alignment:"center",condition:({layoutService:e})=>{const{x:t,y:n}=e.meta.size;return t*n==0}},{key:"OnlyNanData",alignment:"center",condition:({layoutService:e})=>{const{isContinuous:t}=e.meta;if(!t)return!1;const n=e.getHyperCubeValue("qDimensionInfo.0");return n&&(n.qMax<n.qMin||"NaN"===n.qMax)}},{key:"OnlyNanData",alignment:"center",condition:({layoutService:e})=>e.getHyperCubeValue("qMeasureInfo").every(Yh)},{key:"DataRangeIncludingZero",alignment:"bottom",condition:({layoutService:e,primaryExtremumModel:t,secondaryExtremumModel:n,flags:r})=>{if(!1===e.getLayout().showDisclaimer&&r.isEnabled("SHOW_DISCLAIMER"))return!1;const i=e.getLayoutValue("measureAxis.logarithmic",!1),o=t.query.getExtrema(),a=n.query.getExtrema();return i&&(o.meta.includesZero||a.meta.includesZero)}}];function Gh({environment:e,models:t}){const{flags:n,translator:r,options:i}=e,{layoutService:o,primaryExtremumModel:a,secondaryExtremumModel:s}=t,l=function({layoutService:e,primaryExtremumModel:t,secondaryExtremumModel:n,flags:r}){let i,o;for(let a=0,s=Xh.length;a<s;a++){i=Xh[a];try{o=i.condition({layoutService:e,primaryExtremumModel:t,secondaryExtremumModel:n,flags:r})}catch(e){throw Error("failing disclaimer condition",e)}if(o)return i}return!1}({layoutService:o,primaryExtremumModel:a,secondaryExtremumModel:s,flags:n});if(!l)return!1;return function(e,t,n){if(!e)return!1;const{translator:r}=t,{rtl:i}=n;return{key:"disclaimer",type:"disclaimer",layout:{dock:p[e].alignment},settings:{label:r.get("Object.Disclaimer."+e),rtl:i}}}(l.key,{translator:r},{rtl:"rtl"===i.direction})}function Kh({layoutService:e}){return!!qd({layoutService:e})&&{type:"range",key:"range-brush-highlighter",layout:{dock:"@scrollbar"},settings:{scale:Vo.SCALE.REDUCED,brush:"selection",fill:"#6CB33F",opacity:.2}}}function Jh({models:e,environment:t}){const{layoutService:n,colorService:r,dockService:i,seriesModel:o,selectionService:a}=e,{hasLineSeries:s,isContinuous:l,hasMultipleMeasures:u,isGroupedByMeasure:c}=n.meta;if(!s)return!1;const{options:d}=t,f=n.getLayoutValue("color",{}),h=e=>e.filter((e=>Lh(e)===Ho.LINE)).map((e=>({key:sf(Vo.COMPONENT.LINE,e),typeIndex:e.typeIndex}))),p=!f.auto&&"byMeasure"===f.mode&&f.byMeasureDef&&void 0!==f.byMeasureDef.activeMeasureIndex,m=n.getHyperCubeValue("qMeasureInfo").map((e=>{var t;return null===(t=e.color)||void 0===t?void 0:t.on}));return{type:"brush-highlighter",key:"brush-highlighter",data:{collection:Vo.COLLECTION.LINE},settings:{getSelectionInfo:()=>{var e;return(null==a||null===(e=a.getSelectionInfo)||void 0===e?void 0:e.call(a))||{}},seriesInfo:{primary:h(o.meta.primarySeries),secondary:h(o.meta.secondarySeries)},selectionValues:{"qHyperCube/qDimensionInfo/0":l?e=>e.value:e=>e.major.value,"qHyperCube/qDimensionInfo/0:numeric":e=>e.major.value,"qHyperCube/qDimensionInfo/0/qAttrExprInfo/0":e=>e.end.value,"qHyperCube/qMeasureInfo/X":e=>e.end.value},colorSettings:e=>r.getSettingsForMeasure(e),colorByData:e=>!m[e]&&p,hasMultipleMeasures:u,groupedByMeasure:c,itemsPerGroup:o.meta.barSeriesCount,orientation:i.meta.major.orientation,rtl:"rtl"===d.direction}}}function Zh({models:{fieldModel:e}}){return{[Vo.FORMATTER.PRIMARY]:{data:{fields:e.main.minorsPrimary}},[Vo.FORMATTER.SECONDARY]:{data:{fields:e.main.minorsSecondary}}}}const Qh=2e3;function ep({model:e,layoutService:t,definitionPath:n="/qHyperCubeDef"}){return{fetch(t,r){const i={qStart:t,qEnd:r,qNbrPoints:this.computeNbrOfBins(),qMaxNbrTicks:300,qMaxNumberLines:this.computeMaxNumberLines()};return e.getHyperCubeContinuousData(n,i,!1)},shouldFetchReduced(){const{qHyperCube:e}=t.getLayout();return e.qSize.qcy*e.qMeasureInfo.length>=Qh},computeNbrOfBins(){const{qHyperCube:e}=t.getLayout();if(!this.shouldFetchReduced())return Qh;let n=e.qMeasureInfo.length||1,r=4+2*(n-1);return e.qDimensionInfo.length>1&&(n=Math.max(1,Math.min(12,t.meta.size.dimensions[1])),r=4),Math.ceil(Qh/(n*r))},computeMaxNumberLines(){const{qHyperCube:e}=t.getLayout();return e.qDimensionInfo.length>1&&!this.shouldFetchReduced()?t.meta.size.dimensions[1]+1:12}}}function tp(e={}){const{cache:t={}}=e;return{fetch:()=>Promise.resolve(t.merged)}}function np({layoutService:e,viewCache:t}){return{fetch:()=>{const{qAxisData:t,qDataPages:n}=e.getHyperCube();return Promise.resolve({qAxisData:t,qDataPages:n})},getSnapshotData(){const n=e.getLayoutValue("snapshotData.content.chartData",{});return"zoom"in n&&"min"in n.zoom&&"max"in n.zoom?function({zoom:e}){return{zoom:e}}(n):function({scrollOffset:e=0,viewRange:t=0},n){let r=n+e,i=r+t;return 1===t&&0===e&&(r=n-.5,i=n+.5),{zoom:{min:r,max:i}}}(n,t.get("continuousMin"))}}}function rp(){const e=()=>{},t=[],n={};return e.set=(e,r)=>{const i=t.indexOf(e);i>-1&&t.splice(i,1),t.push(e),n[e]=r},e.forEach=e=>{t.forEach(((t,r)=>e(n[t],r)))},e.has=e=>e in n,e}function ip(e,t,n){return n[0]&&n[0][1]&&n[0][1].qElemNumber>-1?function({start:e,end:t,matrix:n}){const r=[],i=rp(),o=rp();for(let a=0;a<n.length;a++){const s=n[a],l=s[1].qElemNumber.toString();s[0].qNum<e?i.set(l,s):s[0].qNum>t&&(o.has(l)||o.set(l,s)),s[0].qNum>=e&&s[0].qNum<=t&&r.push(s)}return i.forEach(((e,t)=>r.splice(t,0,e))),o.forEach((e=>r.push(e))),r}({start:e,end:t,matrix:n}):function({start:e,end:t,matrix:n}){const r=[];let i,o;for(let a=0;a<n.length;a++){const s=n[a];s[0].qNum<e?i=s:s[0].qNum>t&&(o||(o=s)),s[0].qNum>=e&&s[0].qNum<=t&&r.push(s)}return i&&r.unshift(i),o&&r.push(o),r}({start:e,end:t,matrix:n})}function op(e,t){return{...e,qWidth:t[0]?t[0].length:0,qHeight:t.length}}function ap(e,t,n){const r={qDataPages:(n.qDataPages||[]).map((n=>{const r=ip(e,t,n.qMatrix),i=op(n.qArea,r);return{...n,qArea:i,qMatrix:r}}))};return n.qAxisData&&n.qAxisData.qAxis&&(r.qAxisData=function(e,t,n){return{qAxis:n.qAxis.map((n=>({qName:n.qName,qTags:n.qTags,qTicks:n.qTicks.reduce(((n,r)=>((r.qStart>=e&&r.qStart<=t||r.qEnd>=e&&r.qEnd<=t||r.qStart<e&&r.qEnd>t)&&n.push(r),n)),[])})))}}(e,t,n.qAxisData)),r}const sp=2**.5,lp=1/sp;function up(e){return e.qIsOtherCell}function cp({qDataPages:e=[]}={},t={}){const n=e.length?e[0].qMatrix:[];return t.isStackedByDimension?function(e){const t={};return e.forEach((e=>{if(!e.some(up)){const n=e[0].qElemNumber;t[n]=void 0}})),Object.keys(t).length}(n):function(e){let t=0;return e.forEach((e=>{e.some(up)||t++})),t}(n)}const dp={command:{processDataPage:()=>{}}};var fp={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 hp(e,t=1){if(t%2==0)return e;let n=Math.round(e);return e-n>0?n+=.5:n-=.5,n}function pp(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:"",u=s(l);let{x:c,width:d}=r;e.start===e.end&&(d=u.width+2*i,1===e.end&&(c-=d));const f={x:c+i,y:i,width:d-2*i,height:t.height-2*i},h=s(l[0]+"…").width,p=Math.max(0,f.width-u.width),m=Math.max(0,f.height-u.height),y=o*p,g=a*m;return{show:f.width>=Math.min(h,u.width),text:l,dx:y,dy:g,rect:f,style:n.label,segment:{x:c+y,width:u.width+2*i}}}}}(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=hp(r.x+s,t.majorGuideLine.strokeWidth);return{show:n.value>=i&&n.value<=o,x1:l,y1:0,x2:l,y2:hp(e.height,t.majorGuideLine.strokeWidth),style:t.majorGuideLine}}}}(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&&(o=n.segment,a=i.segment,!(o.x<a.x?o.x+o.width>=a.x:a.x+a.width>=o.x))}var o,a}(e,a),a}function mp(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=hp(r.position*e.width,n.minorGuideLine.strokeWidth);return{guideLine:{show:!0,x1:o,y1:hp(i,n.minorGuideLine.strokeWidth),x2:o,y2:hp(t.guideLine.minor.size+i,n.minorGuideLine.strokeWidth),style:n.minorGuideLine}}}}}(t);return t.props.guideLine.minor.show?e.map(n.resolve):[]}function yp(e){return e.filter((e=>e.show)).map((e=>d({strokeWidth:1},e.style,{type:"line",x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2})))}var gp={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=hp(1,t.line.strokeWidth);return{show:n.line.show,x1:hp(0,t.line.strokeWidth),y1:r,x2:hp(e.width,t.line.strokeWidth),y2:r,style:t.line}}(this),this.state.major=pp(n,this),this.state.minor=mp(r,this)},render(){return[...yp([this.state.line]),...(e=this.state.major.map((e=>e.label)),e.filter((e=>e.show)).map((e=>d({},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"})))),...yp(this.state.major.map((e=>e.guideLine))),...yp(this.state.minor.map((e=>e.guideLine)))];var e}};function vp(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 bp(e){return e.qTags.indexOf("$qualified")>-1}function xp({qAxis:e}){const t=[],n=[];for(let r=0;r<e.length;r++){const i=r+1,o=e[r],a=e[i];vp(o,a)?(bp(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 Mp({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 u=e[l];if(u.queries.outer(n)){const e=t[l+1];if(i=u.index,r=l,u.attrs.isDayOrShorter()&&u.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 Sp({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 wp({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 Ep({qualified:e,nonQualified:t,qAxis:n,measureText:r,reqAutoFitWidth:i,scale:o},{attributesFactory:a=Sp,queryFactory:s=wp}={attributesFactory:Sp,queryFactory:wp}){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))),u=e.map((e=>l[e])),c=t.map((e=>l[e]));return{qAxisMeta:l,qualifiedMeta:u,nonQualifiedMeta:c}}function kp({qAxis:e=[],measureText:t=(()=>({width:0})),cache:n={},reqAutoFitWidth:r=0,scale:i},{metaFactory:o=Ep,mapper:a=xp,resolver:s=Mp}={metaFactory:Ep,mapper:xp,resolver:Mp}){const{qualified:l,nonQualified:u}=a({qAxis:e}),{qualifiedMeta:c,nonQualifiedMeta:d}=o({qAxis:e,qualified:l,nonQualified:u,measureText:t,reqAutoFitWidth:r,scale:i}),f=s({qualifiedMeta:c,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 Cp(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}const Op=Cp(0).getTime();function Tp(e){return(e.getTime()-Op)/86400/1e3}var Ap=new Date,Np=new Date;function qp(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 qp((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 Ap.setTime(+t),Np.setTime(+r),e(Ap),e(Np),Math.floor(n(Ap,Np))},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 Dp=36e5,Rp=qp((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()})),Ip=qp((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getUTCMinutes()})),_p=qp((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+t*Dp)}),(function(e,t){return(t-e)/Dp}),(function(e){return e.getUTCHours()})),Pp=qp((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/864e5}),(function(e){return e.getUTCDate()-1}));function Lp(e){return qp((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/6048e5}))}var jp=Lp(0);Lp(1),Lp(2),Lp(3),Lp(4),Lp(5),Lp(6);var zp=qp((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()})),Fp=qp((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()}));Fp.every=function(e){return isFinite(e=Math.floor(e))&&e>0?qp((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null};var Bp=Fp;const Vp=1,Hp=2,$p=3,Up=4,Wp=5,Yp=6;function Xp({timeScale:e,labels:t,distance:n,isDayOrShorter:r,cache:i,timeOnly:o,initialMin:a}){const[s,l]=e.domain(),u=i.key({distance:n});let c;i.get(u,1)?c=i.get(u,1):(c=function(e,t,n,r,i,o){function a(e){return Bp.filter((t=>(t.getUTCFullYear()-o.getUTCFullYear())%e==0))}const s=Rp.count(e,t),l=Ip.count(e,t),u=_p.count(e,t),c=Pp.count(e,t),d=jp.count(e,t),f=zp.count(e,t),h=Bp.count(e,t),p=n/r.second.width-1,m=n/r.minute.width-1,y=n/r.date.width-1,g=n/r.year.width-1,v={type:"year",desc:"year",count:h,interval:Bp.every(1),formatter:r.year.formatter,offset:e=>Bp.offset(e,-1),floor:Bp.floor};if(s<=p)v.type=Vp,v.desc="second",v.count=s,v.interval=Rp.every(1),v.formatter=r.second.formatter,v.offset=e=>Rp.offset(e,-1),v.floor=Rp.floor;else if(s/2<=p)v.type=Vp,v.desc="every other second",v.count=s/2,v.interval=Rp.every(2),v.formatter=r.second.formatter,v.offset=e=>Rp.offset(e,-2),v.floor=Rp.floor;else if(s/5<=p)v.type=Vp,v.desc="every 5 second",v.count=s/5,v.interval=Rp.every(5),v.formatter=r.second.formatter,v.offset=e=>Rp.offset(e,-5),v.floor=Rp.floor;else if(s/15<=p)v.type=Vp,v.desc="every 15 second",v.count=s/15,v.interval=Rp.every(15),v.formatter=r.second.formatter,v.offset=e=>Rp.offset(e,-15),v.floor=Rp.floor;else if(s/30<=p)v.type=Vp,v.desc="every 30 second",v.count=s/30,v.interval=Rp.every(30),v.formatter=r.second.formatter,v.offset=e=>Rp.offset(e,-30),v.floor=Rp.floor;else if(l<=m)v.type=Hp,v.desc="minute",v.count=l,v.interval=Ip.every(1),v.formatter=r.minute.formatter,v.offset=e=>Ip.offset(e,-1),v.floor=Ip.floor;else if(l/2<=m)v.type=Hp,v.desc="every 2 minute",v.count=l/2,v.interval=Ip.every(2),v.formatter=r.minute.formatter,v.offset=e=>Ip.offset(e,-2),v.floor=Ip.floor;else if(l/5<=m)v.type=Hp,v.desc="every 5 minute",v.count=l/5,v.interval=Ip.every(5),v.formatter=r.minute.formatter,v.offset=e=>Ip.offset(e,-5),v.floor=Ip.floor;else if(l/10<=m)v.type=Hp,v.desc="every 10 minute",v.count=l/10,v.interval=Ip.every(10),v.formatter=r.minute.formatter,v.offset=e=>Ip.offset(e,-10),v.floor=Ip.floor;else if(l/15<=m)v.type=Hp,v.desc="every 15 minute",v.count=l/15,v.interval=Ip.every(15),v.formatter=r.minute.formatter,v.offset=e=>Ip.offset(e,-15),v.floor=Ip.floor;else if(l/30<=m)v.type=Hp,v.desc="every 30 minute",v.count=l/30,v.interval=Ip.every(30),v.formatter=r.minute.formatter,v.offset=e=>Ip.offset(e,-30),v.floor=Ip.floor;else if(u<=m)v.type=$p,v.desc="hour",v.count=u,v.interval=_p.every(1),v.formatter=r.minute.formatter,v.offset=e=>_p.offset(e,-1),v.floor=_p.floor;else if(u/2<=m)v.type=$p,v.desc="every 2 hour",v.count=u/2,v.interval=_p.every(2),v.formatter=r.minute.formatter,v.offset=e=>_p.offset(e,-2),v.floor=_p.floor;else if(u/3<=m)v.type=$p,v.desc="every 3 hour",v.count=u/3,v.interval=_p.every(3),v.formatter=r.minute.formatter,v.offset=e=>_p.offset(e,-3),v.floor=_p.floor;else if(u/6<=m)v.type=$p,v.desc="every 6 hour",v.count=u/6,v.interval=_p.every(6),v.formatter=r.minute.formatter,v.offset=e=>_p.offset(e,-6),v.floor=_p.floor;else if(u/12<=m||i)v.type=$p,v.desc="every 12 hour",v.count=u/12,v.interval=_p.every(12),v.formatter=r.minute.formatter,v.offset=e=>_p.offset(e,-12),v.floor=_p.floor;else if(c<=y)v.type=Up,v.desc="day",v.count=c,v.interval=Pp.every(1),v.formatter=r.date.formatter,v.offset=e=>Pp.offset(e,-1),v.floor=Pp.floor;else if(c/2<=y)v.type=Up,v.desc="every 2 day",v.count=c/2,v.interval=Pp.every(2),v.formatter=r.date.formatter,v.offset=e=>Pp.offset(e,-2),v.floor=Pp.floor;else if(c/3<=y)v.type=Up,v.desc="every 3 day",v.count=c/3,v.interval=Pp.every(3),v.formatter=r.date.formatter,v.offset=e=>Pp.offset(e,-3),v.floor=Pp.floor;else if(d<=y)v.type=Up,v.desc="week",v.count=d,v.interval=jp.every(1),v.formatter=r.date.formatter,v.offset=e=>jp.offset(e,-1),v.floor=Pp.floor;else if(d/2<=y)v.type=Up,v.desc="every 2 week",v.count=d/2,v.interval=jp.every(2),v.formatter=r.date.formatter,v.offset=e=>jp.offset(e,-2),v.floor=Pp.floor;else if(f<=y)v.type=Wp,v.desc="month",v.count=f,v.interval=zp.every(1),v.formatter=r.date.formatter,v.offset=e=>zp.offset(e,-1),v.floor=Pp.floor;else if(f/3<=y)v.type=Wp,v.desc="quarter",v.count=f/3,v.interval=zp.every(3),v.formatter=r.date.formatter,v.offset=e=>zp.offset(e,-3),v.floor=Pp.floor;else if(f/6<=y)v.type=Wp,v.desc="half year",v.count=f/6,v.interval=zp.every(6),v.formatter=r.date.formatter,v.offset=e=>zp.offset(e,-6),v.floor=Pp.floor;else if(h<=g)v.type=Yp,v.desc="year",v.count=h,v.interval=Bp.every(1),v.formatter=r.year.formatter,v.offset=e=>Bp.offset(e,-1),v.floor=Bp.floor;else if(h/2<=g)v.type=Yp,v.desc="every 2 year",v.count=h/2,v.interval=a(2),v.formatter=r.year.formatter,v.offset=e=>Bp.offset(e,-2),v.floor=Bp.floor;else if(h/5<=g)v.type=Yp,v.desc="every 5 year",v.count=h/5,v.interval=a(5),v.formatter=r.year.formatter,v.offset=e=>Bp.offset(e,-5),v.floor=Bp.floor;else if(h/10<=g)v.type=Yp,v.desc="every 10 year",v.count=h/10,v.interval=a(10),v.formatter=r.year.formatter,v.offset=e=>Bp.offset(e,-10),v.floor=Bp.floor;else{const e=Math.floor(h/g);v.type=Yp,v.desc="every nth year",v.count=e,v.interval=a(e),v.formatter=r.year.formatter,v.offset=t=>Bp.offset(t,-e),v.floor=Bp.floor}return v}(s,l,n,t.all(),r,a),i.set(u,c,1));const d=e.ticks(c.interval);d.length?s.getTime()!==d[0].getTime()&&d.unshift(c.offset(d[0])):d.push(c.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:c.formatter}}));let h=[];if(!o&&c.type<=$p){const n=t.getFormat("date"),r=e.ticks(Pp.every(1));r.length&&s.getUTCDate()!==r[0].getUTCDate()&&r.unshift(Pp.offset(r[0],-1)),h=(r.length?r:[Pp.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 Gp=86400,Kp=1440,Jp={};function Zp(e,t,n,r){return{type:e,start:new Date(Date.UTC(...t)),end:new Date(Date.UTC(...n)),formatter:r}}function Qp(e,t,n){const{generator:r,anchor:i,clamp:o,level:a}=t.ticks,{qNumFormat:s}=t.formatter;e.clamp(o);const[l,u]=e.domain(),c=function(){return Be.apply(qi(or,ir,tr,Qn,Zn,Jn,$n,jn,cr).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}().domain([Cp(l),Cp(u)]);c.clamp(o),c.range(t.invert?[1,0]:[0,1]);const d="object"==typeof r?r:{type:r};let f;f="d3"===d.type?(e,i)=>Xp({timeScale:c,labels:n,distance:e,isDayOrShorter:i,cache:t.cache,timeOnly:"T"===s.qType,initialMin:void 0===d.initialMin?c.domain()[0]:Cp(r.initialMin)}):e=>function(e,t,n,r,i,o=!1){if(Jp[[t,n,r,r,o]])return Jp[[t,n,r,r,o]];const a={year:e.getFormat("year"),date:e.getFormat("date"),minute:e.getFormat("minute"),second:e.getFormat("second")},s=Cp(n),l=s.getFullYear(),u=s.getMonth(),c=s.getDate(),d=r-n,f=t/(i-r),h=f/1440,p=f/Gp,m=366*f,y=3*f*30,g=a.second.width/p,v=a.minute.width/h,b=a.date.width/y,x=a.year.width/m;let M,S,w,E=0,k=0,C=null,O=null,T=null,A=null,N=null,q=null;const D={outer:[],inner:[]};for(g<1?(C=1,k=1/Gp):g<2?(C=2,k=1/Gp*2):g<5?(C=5,k=1/Gp*5):g<10?(C=10,k=.00011574074074074073):g<30?(C=30,k=.0003472222222222222):v<1?(O=1,k=1/Kp):v<2?(O=2,k=1/Kp*2):v<5?(O=5,k=1/Kp*5):v<10?(O=10,k=.006944444444444445):v<30?(O=30,k=.020833333333333336):v<60?(T=1,k=1/24):v<120?(T=2,k=2/24):v<360?(T=6,k=.25):v<720?(T=12,k=.5):b<1/90?(k=1,A=1):b<2/90?(k=2,A=2):b<7/90?(k=7,A=7):b<31/90?(N=1,k=31):b<1?(N=3,k=90):x<1?(q=1,k=366):x<2?(q=2,k=732):x<5?(q=5,k=1826.25):(q=10,k=3652.5),S=Math.floor((d+n%1)/k);E<i;){w=S+1,M=q?Zp("year",[l+S*q,0,1],[l+w*q,0,1],a.year.formatter):N?Zp("month",[l,u+S*N,1],[l,u+w*N,1],a.date.formatter):A?Zp("day",[l,u,c+S*A],[l,u,c+w*A],a.date.formatter):T?Zp("hour",[l,u,c,0+S*T],[l,u,c,0+w*T],a.minute.formatter):O?Zp("minute",[l,u,c,0,0+S*O],[l,u,c,0,0+w*O],a.minute.formatter):Zp("second",[l,u,c,0,0,0+S*C],[l,u,c,0,0,0+w*C],a.second.formatter),E=Tp(M.start),D.inner.push(M);const e=Math.floor(E);if(!(o||q||N||A)){const t={type:"day",start:Cp(e),end:Cp(e+1),formatter:a.date.formatter,qStart:e};D.outer[D.outer.length-1]&&D.outer[D.outer.length-1].qStart===t.qStart||D.outer.push(t)}S++}return D.min=r,D.max=i,Jp[[t,n,r,r,o]]=D,D}(n,e,d.min,l,u,"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?Tp(t.start):"end"===i?Tp(t.end):(Tp(t.start)+Tp(t.end))/2,{position:c(t.start),start:c(t.start),end:c(t.end),value:n,label:t.formatter(n),isMinor:!1,data:{start:Tp(t.start),end:Tp(t.end),scaleStart:e.domain()[0]}}})).filter((e=>e.position>=0&&e.position<=1))};return h}const em=/t+/i;const tm={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 nm(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 rm="continuousPan";var im={model:function({model:e,layoutService:t,dataProcessorModel:n=dp,viewCache:r,viewState:i,definitionPath:o},a={}){const{engineFetcherFactory:s=ep,snapshotFetcherFactory:l=np,cacheFetcherFactory:u=tp,cache:c={initial:{},merged:{}}}=a,f=s({model:e,layoutService:t,definitionPath:o}),h=l({layoutService:t,viewCache:r}),p=u({cache:c}),m=e=>{throw e.isHandled=!0,e};let y,g,v;return{update(e){({initialMin:g,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])),r.set("continuousMin",g),r.set("continuousMax",v),r.set("minimiumZoomSpan",function(e,t){return Math.max(1e-6,2.3841857910156157e-7*(t-e))}(g,v)),y=t.meta.isSnapshot?h:f,t.meta.isSnapshot&&({zoom:{min:g,max:v}}=h.getSnapshotData()),i.preventSet("zoom",{min:g,max:v})},updateLayout(e){const{qDataPages:n,qAxisData:r}=e;return t.setHyperCubeValue("qDataPages",n),t.setHyperCubeValue("qAxisData",r),t.setHyperCubeValue("qMode","S"),e},initialFetch(){return y.fetch(g,v).then((e=>{const t=function(e){return{qDataPages:e.qDataPages.map((e=>{const t=op(e.qArea,e.qMatrix);return{...e,qArea:t}})),qAxisData:e.qAxisData}}(e);return n.command.processDataPage({dataPage:t.qDataPages.length?t.qDataPages[0]:[]}),c.initial=t,c.merged=t,e})).then((e=>ap(g,v,e))).then((e=>this.updateLayout(e))).catch(m)},fetch:(e,t)=>y.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=op(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}(c.initial,e))).then((e=>(n.command.processDataPage({dataPage:e.qDataPages.length?e.qDataPages[0]:[]}),c.merged=e,e))).then((n=>ap(e,t,n))).catch(m),fetchFromCache:(e,t)=>p.fetch(e,t).then((n=>ap(e,t,n))),fetchMinMaxData:()=>Promise.resolve(c.initial.qDataPages||[]),getInitialCube(){const e=t.getHyperCube();return d({},e,{...c.initial})},getInitialLayout(){const e=this.getInitialCube();return d({},t.getLayout(),{qHyperCube:e})},getDimensionCardinality:()=>cp(c.initial,t.meta),setSnapshotData(e){const{qHyperCube:t}=e;t.qDataPages=c.merged.qDataPages,t.qAxisData=c.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=yl(((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 gl(((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),u=i?1-o:o,{min:c,max:d}=t.get("zoom"),f=Math.abs(d-c),h=f-(r>0?lp:sp)*f,p=c+h*u,m=d-h*(1-u),y=p<a?a-p:0,g=m>s?m-s:0;t.set("zoom",{min:Math.max(p-g,a),max:Math.min(m+y,s)})}}),r)}},interactions:{areaPan:function({targetKey:e,chart:t,actions:n,viewState:r,viewCache:i}){return{type:"Pan",key:"continuous:pan",options:{event:rm,pointers:1,threshold:10,enable(r,i){return this.started===rm||!i||!!n.scroll.enabled()&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some((t=>t.key===e))}},events:{continuousPanstart(n){n.preventDefault(),this.started=rm;const{min:i,max:o}=r.get("zoom");this[rm]={min:i,max:o,size:t.component(e).rect.computedInner.width,span:o-i}},continuousPanmove(e){e.preventDefault();const{span:t,min:n,max:o,size:a}=this[rm],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)})},continuousPanend(e){e.preventDefault(),this.started=!1},continuousPancancel(e){e.preventDefault(),this.started=!1}}}}},picassoComponents:{axisOverlay:fp,timeAxis:gp},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]=d(!0,{},t[i],o)})),r}(t,tm,n),{qAxis:i}=r,o=In(),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 u,c,f=[];const h=function(e){return Number.isNaN(+e)?NaN:o(e)};h.ticks=({distance:e,resolve:t=u.resolve}={})=>{const n=t(e),o=n[r.ticks.level];if(Number.isNaN(+o)||(f=c.transform(i[o].qTicks,{isMinor:!1})),!Number.isNaN(+n.minor)){const e=c.transform(i[n.minor].qTicks,{isMinor:!0});f=f.concat(e)}return"auto"===o&&(f=c.generate(e,n.isDayOrShorter)),f},h.invert=e=>o.invert(e),h.domain=e=>Array.isArray(e)?o.domain(e):o.domain(),h.range=e=>Array.isArray(e)?o.range(e):o.range(),h.norm=e=>(nm(a,h),a.instance(e)),h.normInvert=e=>(nm(a,h),a.instance.invert(e)),h.copy=()=>e(t,n),h.clamp=(e=!0)=>(o.clamp(e),o.clamp()),h.min=()=>Math.min(s,l),h.max=()=>Math.max(s,l),o.range(r.invert?[1,0]:[0,1]),o.domain([s,l]),a.invert=r.invert;const p=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&&em.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=Cp(t[0].data.start),i=Cp(t[n-1].data.start);return Pp.count(r,i)/n>=1?o.date:_p.count(r,i)/n>0?o.minute:Ip.count(r,i)/n>0?o.second:o.date},t}(r);return c=Qp(o.copy(),r,p),u=kp({qAxis:i,measureText:r.formatter.measureText,reqAutoFitWidth:2*p.getFormat("minute").width,cache:r.cache,scale:h}),h.data=()=>({fields:[{formatter:h.formatter,id:()=>"qHyperCube/"+r.field,key:()=>r.field,raw:hl(n,"fields.0.raw",(()=>({})))}]}),h.formatter=()=>p.getFormatFromTicks(f).formatter,h}}};const om=e=>e.meta.seriesComponentKeys[0];const{event:{onZoom:am}}=im,sm=[`${Vo.COMPONENT.BAR}-${$o.PRIMARY}`,`${Vo.COMPONENT.BAR}-${$o.SECONDARY}`,`${Vo.COMPONENT.BAR_OOB}-${rf}`,`${Vo.COMPONENT.BAR_OOB}-${of}`,`${Vo.COMPONENT.BAR_OOB}-${rf}-${$o.PRIMARY}`,`${Vo.COMPONENT.BAR_OOB}-${of}-${$o.PRIMARY}`,`${Vo.COMPONENT.BAR_OOB}-${rf}-${$o.SECONDARY}`,`${Vo.COMPONENT.BAR_OOB}-${of}-${$o.SECONDARY}`,`${Vo.COMPONENT.SLICED_HAT}-${rf}`,`${Vo.COMPONENT.SLICED_HAT}-${of}`,`${Vo.COMPONENT.SLICED_HAT}-${rf}-${$o.PRIMARY}`,`${Vo.COMPONENT.SLICED_HAT}-${of}-${$o.PRIMARY}`,`${Vo.COMPONENT.SLICED_HAT}-${rf}-${$o.SECONDARY}`,`${Vo.COMPONENT.SLICED_HAT}-${of}-${$o.SECONDARY}`,`${Vo.COMPONENT.DATA_OOB_MARKER}-${rf}`,`${Vo.COMPONENT.DATA_OOB_MARKER}-${of}`,Vo.COMPONENT.AXIS.MAJOR];function lm({chart:e,models:t,actions:n,viewState:r,viewCache:i,environment:o}){const{appModel:a,layoutService:s,seriesModel:l,tooltipModel:u,flags:c}=t,{pointComponentKeys:d,markerComponentKeys:f,barComponentKeys:h}=l.meta,p=[...d,...f],m=[...h],y=[...sm,...p],g=u.query.getCustomTooltipModel(),v=om(l),b=g.utils,x=yl(b.displayTooltip,b.DEBOUNCE_THRESHOLD),M=s.meta.isContinuous?am({chart:e,viewState:r,viewCache:i},{rtl:"rtl"===o.options.direction,threshold:50,targetKey:v}):()=>{},S=()=>e.component(Vo.COMPONENT.LEGEND_TOOLTIP),w=()=>e.component(Vo.COMPONENT.TOOLTIP),E=()=>{(()=>{const e=S();e&&e.show&&e.emit("hide")})(),(()=>{const e=w();e&&e.show&&(e.emit("hide"),u.query.useCustomTooltip()&&x&&x({},e,{nodes:[],opts:{app:a,flags:c},customTooltipModel:g,hide:!0}))})()};return{type:"native",events:{wheel(t){const r={x:t.clientX,y:t.clientY},i=e.componentsFromPoint(r);if(n.interact.enabled()){const[e]=i.filter((e=>e.key===Vo.COMPONENT.LEGEND_CATEGORICAL));((e,t)=>{if(t){const n=Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY;t.emit(n>=0?"next":"prev"),e.preventDefault()}})(t,e)}if(n.scroll.enabled()){const[e]=i.filter((e=>e.key===v));e&&(M(r,Math.sign(-t.deltaY)),t.preventDefault())}E()},mousemove(r){if(!n.tooltip.enabled())return;const i=e.componentsFromPoint({x:r.clientX,y:r.clientY}),o=S();o&&o.show&&(i.some((e=>e.key===Vo.COMPONENT.LEGEND_CATEGORICAL))?o.emit("show",r):o.emit("hide"));const s=w();if(s&&s.show)if(i.some((e=>-1!==y.indexOf(e.key)))){const n=[],{x:o,y:d}=function({chart:e,e:t}){const{left:n,top:r}=e.element.getBoundingClientRect();return{x:(t.center?t.center.x:t.clientX)-n,y:(t.center?t.center.y:t.clientY)-r}}({chart:e,e:r});if(i.some((e=>p.indexOf(e.key)>-1))&&n.push(...e.shapesAt({cx:o,cy:d,r:3},{components:p.map((e=>({key:e})))})),i.some((e=>m.indexOf(e.key)>-1))&&n.push(...e.shapesAt({x:o,y:d},{components:m.map((e=>({key:e})))})),u.query.useCustomTooltip()&&b.checkIfPromisesExist({customTooltipModel:g})){let i=[];if(0===n.length&&(n.push(...b.getNodes(r,e)),1===n.length&&n[0].key===Vo.COMPONENT.AXIS.MAJOR)){var l;const r=Vh({chart:e,models:t,nodes:n});null!=r&&r.length&&null!==(l=r[0].childrenNodes)&&void 0!==l&&l.length&&(i=r[0].childrenNodes)}x(r,s,{nodes:n,extractedNodes:i,opts:{app:a,flags:c},customTooltipModel:g})}else s.emit("show",r,n.length?{nodes:n}:void 0)}else s.emit("hide")},mouseup(e){2===e.button&&E()},mouseleave(){E()}}}}const um="continuousPinchZoom";const cm=im.interactions.areaPan;function dm({chart:e,models:t,environment:n,viewState:r,viewCache:i,actions:o,selectables:a}){const{layoutService:s,dockService:l,discreteModel:u,colorService:c}=t,d="rtl"===n.options.direction,f=function({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){return{gestures:[...ud({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l})],native:cd({componentKey:e,chart:t,actions:n,layoutService:o})}}({componentKey:"scrollbar",chart:e,actions:o,viewState:r,viewCache:i,discrete:u,layoutService:s,dockService:l,rtl:d}),h={type:"hammer",enable:!0,gestures:[...c.custom.legendInteractions(),...a.gestures.sort(((e,t)=>(t.prio||0)-(e.prio||0))),...f.gestures]},p=[lm({chart:e,models:t,actions:o,viewState:r,viewCache:i,environment:n}),f.native];return s.meta.isDiscrete&&(h.gestures.push(...u.interactions.gestures),p.push(u.interactions.native)),s.meta.isContinuous&&h.gestures.push(cm({targetKey:om(t.seriesModel),chart:e,actions:o,viewState:r,viewCache:i}),function({targetKey:e,chart:t,actions:n,viewState:r,viewCache:i,rtl:o}){const a={last:0,diff:0},s=im.event.onZoom({viewCache:i,viewState:r,chart:t},{threshold:100,rtl:o,targetKey:e});return{type:"Pinch",key:"continuous:pinch-zoom",options:{event:um,pointers:2,threshold:0,enable:(r,i)=>!i||!!n.scroll.enabled()&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some((t=>t.key===e))},events:{[um+"start"](e){a.last=e.scale,e.preventDefault()},[um+"move"](e){const t=e.scale-a.last;Math.abs(t)>.01&&s(e.center,t>0?1:-1),a.last=e.scale,e.preventDefault()}}}}({targetKey:om(t.seriesModel),chart:e,actions:o,viewState:r,viewCache:i,rtl:d})),[h,...p]}const fm="lasso",hm=({key:e,componentTargetKey:t,requireFailure:n,recognizeWith:r},i)=>({key:"event:"+e,type:"Pan",requireFailure:n,recognizeWith:r,options:{event:fm,enable(e,n){if(this.started===fm||!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!==fm&&(i.actions.select.emit("start",fm),this.chart.component(e).emit("lassoStart",t),this.started=fm)},lassomove(t){t.preventDefault(),this.chart.component(e).emit("lassoMove",t)},lassoend(t){t.preventDefault(),this.started=!1,this.chart.component(e).emit("lassoEnd",t),i.actions.select.emit("end",fm)}}});const pm=({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),u=o.hitRadius?o.hitRadius(a):0,c=u>0?{cx:n.x,cy:n.y,r:u}:n,d=o.shapesAt?o.shapesAt(c):this.chart.shapesAt(c,{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)}}if(f&&o.actions.tooltip.enabled())if(d.length){const{customTooltipModel:e}=o;if(null!=e&&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 mm=({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 ym=({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)));return 0===a.length&&function(e,t){const{target:n}=e.srcEvent;return!(!n||0!==(n.getAttribute("data-key")||"").indexOf(t+"-"))}(i,t)?(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)},[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 gm(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:u=!1,multiple:c=!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:u?{context:"selection",observe:!0}:"selection",scale:s,multiple:c,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=ym(e,t,"range");return{interactions:[e.onEdited?mm(e,t):null,r].filter(Boolean),components:[n]}}const vm=/axis|legend/;function bm({actions:e,models:t}){const{seriesModel:n,layoutService:r,colorService:i,tooltipModel:o,flags:a}=t,s=r.getHyperCubeValue("qDimensionInfo.0.qIsOneAndOnlyOne",!1);return function(e,t){if(!e.targets)throw new Error("Missing 'targets' property");return{interactions:[pm(e,t)],components:[]}}({targets:[`${Vo.COMPONENT.BAR}-${$o.PRIMARY}`,`${Vo.COMPONENT.BAR}-${$o.SECONDARY}`,...n.query.series(Ho.MARKER).map((e=>sf(Vo.COMPONENT.MARKER,e))),...n.query.series(Ho.LINE).map((e=>sf(Vo.COMPONENT.POINT,e))),Vo.COMPONENT.AXIS.MAJOR,Vo.COMPONENT.AXIS_OVERLAY.TIME_INNER,Vo.COMPONENT.AXIS_OVERLAY.TIME_OUTER,Vo.COMPONENT.AXIS_OVERLAY.CONTINUOUS,Vo.COMPONENT.LEGEND_CATEGORICAL],components:(e,t)=>{const[n]=t,{key:r}=n,i={key:r,action:e.srcEvent.ctrlKey||s?"set":"toggle",contexts:["selection"]};return-1===[Vo.COMPONENT.AXIS.MAJOR,Vo.COMPONENT.AXIS_OVERLAY.TIME_INNER,Vo.COMPONENT.AXIS_OVERLAY.TIME_OUTER,Vo.COMPONENT.AXIS_OVERLAY.CONTINUOUS,Vo.COMPONENT.LEGEND_CATEGORICAL].indexOf(r)&&(i.data=["selectionDimension"]),[i]}},{actions:e,isLocked:e=>e.some((e=>"legend-cat"===e.type))?i.isSelectionLocked({isMeasureSelectionLocked:r.meta.isDimensionLocked}):r.meta.isDimensionLocked,hitRadius:e=>(e=>e.some((e=>vm.test(e.type))))(e)?0:3,customTooltipModel:o.query.getCustomTooltipModel(),debouncer:yl,flags:a})}function xm({actions:e,models:t}){const{layoutService:n,dockService:r,seriesModel:i}=t,{isDiscrete:o,isDimensionLocked:a}=n.meta;if(!o||a)return!1;const s=[...i.meta.seriesComponentKeys,Vo.COMPONENT.AXIS.MAJOR];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:[ym(e,t,"area")],components:[n]}}({eventName:"discreteRange",key:"discrete-range-brush",components:[{key:s[0],contexts:["selection"],action:"set",data:["selectionDimension"]}],targets:s,fillTargets:[Vo.COMPONENT.AXIS.MAJOR],dock:r.meta.major.dock},{actions:e})}const Mm={components:[],interactions:[]};function Sm({actions:e,chart:t,models:n}){const r=function({actions:e,models:t}){const{dockService:n,seriesModel:r,layoutService:i}=t;return!i.meta.isDimensionLocked&&!i.meta.isBarSeriesStacked&&gm({eventName:"minorRange",key:"minor-range-brush",targets:[Vo.COMPONENT.AXIS.MINOR.PRIMARY,`${Vo.COMPONENT.BAR}-${$o.PRIMARY}`,...r.query.series(Ho.MARKER).filter((e=>e.isPrimary)).map((e=>sf(Vo.COMPONENT.MARKER,e))),...r.query.series(Ho.LINE).filter((e=>e.isPrimary)).map((e=>sf(Vo.COMPONENT.POINT,e)))],fillTargets:[Vo.COMPONENT.AXIS.MINOR.PRIMARY],dock:n.meta.minor.dock,scale:Vo.SCALE.MINOR.PRIMARY,onEdited(){e.select.emit("end","minorRange")}},{actions:e})}({actions:e,models:n})||Mm,i=function({actions:e,models:t}){const{dockService:n,seriesModel:r,layoutService:i}=t;return!i.meta.isDimensionLocked&&!i.meta.isBarSeriesStacked&&gm({eventName:"minorRange-secondary",key:"minor-secondary-range-brush",targets:[Vo.COMPONENT.AXIS.MINOR.SECONDARY,`${Vo.COMPONENT.BAR}-${$o.SECONDARY}`,...r.query.series(Ho.MARKER).filter((e=>!e.isPrimary)).map((e=>sf(Vo.COMPONENT.MARKER,e))),...r.query.series(Ho.LINE).filter((e=>!e.isPrimary)).map((e=>sf(Vo.COMPONENT.POINT,e)))],fillTargets:[Vo.COMPONENT.AXIS.MINOR.SECONDARY],dock:n.meta.minorSecondary.dock,scale:Vo.SCALE.MINOR.SECONDARY,onEdited(){e.select.emit("end","minorRange-secondary")}},{actions:e})}({actions:e,models:n})||Mm,o=xm({actions:e,models:n})||Mm,a=function({actions:e,chart:t,models:n}){const{layoutService:r,dockService:i,seriesModel:o}=n,{isContinuous:a,isTime:s}=r.meta;if(!a)return!1;const l=s?[Vo.COMPONENT.AXIS_OVERLAY.TIME_INNER,Vo.COMPONENT.AXIS_OVERLAY.TIME_OUTER]:[Vo.COMPONENT.AXIS_OVERLAY.CONTINUOUS];return gm({eventName:"continuousRange",key:"continuous-range-brush",targets:[`${Vo.COMPONENT.BAR}-${$o.PRIMARY}`,`${Vo.COMPONENT.BAR}-${$o.SECONDARY}`,...o.query.series(Ho.MARKER).map((e=>sf(Vo.COMPONENT.MARKER,e))),...o.query.series(Ho.LINE).map((e=>sf(Vo.COMPONENT.POINT,e))),...l],fillTargets:l,dock:i.meta.major.dock,scale:s?Vo.SCALE.MAJOR_INNER:Vo.SCALE.MAJOR,observeBrush:!0,multiple:!0,toLabel({datum:e,data:n,scale:r}){const i=s?r.formatter():t.formatter(Vo.FORMATTER.PRIMARY),o=t.scale(Vo.SCALE.MAJOR).max(),a=t.brushSelectionIncludeMax&&e===o;return`${e!==Math.max(...n)||a?"":"<"}${i(e)}`}},{actions:e})}({actions:e,chart:t,models:n})||Mm,s=function({actions:e,models:t}){const{colorService:n,layoutService:r}=t,[i]=n.custom.legendComponents(),o=n.custom.wrappedScales(),{isDimensionLocked:a}=r.meta;if(a||!i)return!1;const s=Vo.SCALE.COLOR+"Range",{type:l,key:u}=i,c=o[s];return!("legend-seq"!==l||!c||c.min>=c.max)&&gm({eventName:"legendRange",key:"legend-range-brush",targets:[u],fillTargets:[u],targetSelector:'[id="legend-seq-target"]',targetFillSelector:'[id="legend-seq-ticks"]',dock:i.layout.dock,scale:s,bubblesPlacement:"outside",onEdited:()=>{e.select.emit("end","legendRange")}},{actions:e})}({actions:e,models:n})||Mm;return{components:[...r.components,...i.components,...o.components,...a.components,...s.components],interactions:[...r.interactions,...i.interactions,...o.interactions,...a.interactions,...s.interactions]}}function wm({actions:e,models:t}){const{layoutService:n,seriesModel:r}=t,{seriesComponentKeys:i}=r.meta;if(n.meta.isDimensionLocked)return{components:[],interactions:[]};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:[hm(n,t)],components:[r]}}({key:"lasso",componentTargetKey:i[0],components:i.map((e=>({key:e,action:"add",contexts:["selection"],data:["selectionDimension"]})))},{actions:e})}function Em({picasso:e,chart:t,models:n,environment:r,viewState:i,viewCache:o,actions:a}){const{colorService:s,pluginService:l}=n,u=n.layoutService.getLayout(),{options:c}=r,d=function(e,t){return{layoutModes:g.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}}(0,{logicalSize:function({layout:e,options:t={}}){return!(null==e||!e.snapshotData||t.freeResize)&&{width:e.snapshotData.content.size.w,height:e.snapshotData.content.size.h}}({layout:u,options:c}),minCenterRatio:0}),f=function({chart:e,models:t,environment:n,viewState:r,viewCache:i,actions:o}){var a;const{colorService:s,layoutService:l,dockService:u}=t,c=Gh({environment:n,models:t});return"center"===(null==c||null===(a=c.layout)||void 0===a?void 0:a.dock)?[c]:[...wh({models:t}),...Yd({models:t}),...yh({chart:e,models:t,environment:n,viewState:r,viewCache:i}),Jh({models:t,environment:n}),...Qd({models:t,environment:n}),...Oh({models:t,environment:n,actions:o}),_i({viewState:r,viewCache:i,layoutService:l,dockService:u}),...Uh({models:t}),...Wh({chart:e,models:t,environment:n}),Th({models:t,environment:n,viewState:r,viewCache:i}),...s.custom.legendComponents(),Kh(t),...Dh({chart:e,models:t,viewState:r,viewCache:i,environment:n}),...$h({chart:e,models:t,environment:n}),c].filter(Boolean)}({chart:t,models:n,environment:r,viewState:i,viewCache:o,actions:a}),h=function({actions:e,chart:t,models:n}){const{layoutService:r}=n,i=r.getHyperCubeValue("qDimensionInfo.0.qIsOneAndOnlyOne",!1),o=bm({actions:e,models:n});if(i)return{components:[...o.components],gestures:[...o.interactions]};const a=Sm({actions:e,chart:t,models:n}),s=wm({actions:e,models:n});return{components:[...o.components,...a.components,...s.components],gestures:[...o.interactions,...a.interactions,...s.interactions]}}({actions:a,chart:t,models:n}),p=l.extendComponents([...f,...h.components]);return{collections:Dd({models:n}),scales:$d({picasso:e,models:n,viewState:i,viewCache:o,environment:r}),components:p,formatters:Zh({models:n}),interactions:dm({chart:t,models:n,environment:r,viewState:i,viewCache:o,actions:a,selectables:h}),strategy:d,palettes:s.getPalettes()}}const km=({models:{layoutService:e,fieldModel:t,appLayoutModel:n}})=>({type:"q",key:Vo.DATA.MAIN,data:e.getHyperCube(),config:{virtualFields:t.virtuals,localeInfo:n.qLocaleInfo}}),Cm=({models:{layoutService:e,fieldModel:t,continuousModel:n,appLayoutModel:r}})=>e.meta.isContinuous?[{type:"q",key:Vo.DATA.REDUCED,data:n.getInitialCube(),config:{virtualFields:t.virtuals,localeInfo:r.qLocaleInfo}}]:[],{event:{onZoomIntercept:Om,onZoomChange:Tm}}=im,Am=[Vo.COMPONENT.AXIS_TITLE.MAJOR,Vo.COMPONENT.AXIS_TITLE.MINOR.PRIMARY,Vo.COMPONENT.AXIS_TITLE.MINOR.SECONDARY,Vo.COMPONENT.GRID_LINE,Vo.COMPONENT.ZERO_LINE],Nm=({picasso:t,chart:n,models:r,environment:i,viewState:o,viewCache:a,actions:s})=>{(({chart:t,models:n,viewState:r,viewCache:i})=>{e.useEffect((()=>{if(!n||!r||!i)return;const{layoutService:e,continuousModel:o,refLineModel:a,seriesModel:s}=n,{miniComponentKeys:l}=s.meta,u=()=>{a&&a.update(),t.update({partialData:!0,excludeFromUpdate:[...Am,...l]})};r.onChanged("scrollOffset",u),e.meta.isContinuous&&(r.onChanged("zoom",Tm({layoutService:e,continuousDataModel:o},u)),r.intercept("zoom",Om({viewCache:i})))}),[n,r,i])})({chart:n,models:r,viewState:o,viewCache:a}),(({picasso:t,chart:n,models:r,environment:i,viewState:o,viewCache:a,actions:s})=>{const[,l]=e.usePromise((async()=>{if(null==n||!n.update||!r||!i)return;const{layoutService:e,colorService:l,discreteModel:u}=r;function c(e=!1){n.update({settings:Em({picasso:t,chart:n,models:r,environment:i,viewState:o,viewCache:a,actions:s}),data:e&&[km({models:r}),...Cm({models:r}),...l.getData()]})}const d=e.getDataPages();e.setDataPages([]),c(!0),e.setDataPages(d),e.meta.isContinuous||await u.command.initialize(),c(!1)}),[null==n?void 0:n.update,r,i]);if(l)throw l})({picasso:t,chart:n,models:r,environment:i,viewState:o,viewCache:a,actions:s})};var qm={exports:{}};
|
|
9
|
+
e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,i,o,a,s,l,u,c,d,f=e.length,h=e.search(/[0-9\-\+#]/),p=h>0?e.substring(0,h):"",m=e.split("").reverse().join(""),y=m.search(/[0-9\-\+#]/),g=f-y,v=e.substring(g,g+1),b=g+("."===v||","===v?1:0),x=y>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"),(!(u=t.split("."))[1]||u[1]&&u[1].length<=s)&&(t=(+t).toFixed(s+1)),c=e[0].split(o),e[0]=c.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;u[0].length<e[0].length-a;)u[0]="0"+u[0];else 0==+u[0]&&(u[0]="");if((t=t.split("."))[0]=u[0],l=c[1]&&c[c.length-1].length){for(m="",g=(d=t[0]).length%l,f=d.length,b=0;b<f;b++)m+=d.charAt(b),!((b-g+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}}(Su={exports:{}}),Su.exports);function Eu(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}var ku={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"},Cu=/%$/,Ou=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,Tu=/^\(oct\)/i,Au=/^\(dec\)/i,Nu=/^\(hex\)/i,qu=/^\(bin\)/i,Du=/^\(rom\)/i,Ru=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,Iu=/#|0/g;function _u(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 Pu(e,t,n){var r=Eu(e);return n?r:new RegExp(r||"",t)}function Lu(e,t,n){var r,i,o,a,s,l,u,c,d,f,h,p=e.pattern;p.indexOf("A")>=0&&(p=p.replace("A",""),e.abbreviate=!0),f=t,(h=n)&&(h=Eu(h)),f&&(f=Eu(f)),d=new RegExp("(?:[#0]+".concat(f,")?[#0]+(?:").concat(h,"[#0]+)?")),a=(o=(o=p.match(d))?o[0]:"")?p.substr(0,p.indexOf(o)):p,s=o?p.substring(p.indexOf(o)+o.length):"",o||(o=p?"#":"##########"),t&&t===n&&(i=(r=o.split(n)).pop(),o=r.join("")+n+i,t=""),l=t,t=/,/.test(n)?"¤":",",l&&(o=o.replace(Pu(l,"g"),t)),u=n,n=".",u&&(o=o.replace(Pu(u,"g"),n)),c=(c=o.match(/#/g))?c.length:0;var m,y=p.split(u);y[1]&&(m=y[1].match(Iu)),e.prefix=a||"",e.postfix=s||"",e.pattern=p,e.maxPrecision=m?m.length:2,e.percentage=Cu.test(p),e.numericPattern=o||"",e.numericRegex=new RegExp("".concat(Pu(t,null,!0),"|").concat(Pu(n,null,!0)),"g"),e.groupTemp=l,e.decTemp=u,e.t=t,e.d=n,e.temp=c}var ju=function(){function e(t,n,r,i,o){Sl(this,e),this.localeInfo=t,this.pattern=n,this.thousandDelimiter=r||",",this.decimalDelimiter=i||".",this.type=o||"numeric",this.patternSeparator=";",this.abbreviations=function(e,t){if(!e||!e.qNumericalAbbreviation)return ku;var n={};return e.qNumericalAbbreviation.split(t).forEach((function(e){var t=e.split(":");2===t.length&&(n[t[0]]=t[1])})),n}(t,this.patternSeparator),this.prepare()}return El(e,[{key:"clone",value:function(){var t=new e(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return t.subtype=this.subtype,t}},{key:"format",value:function(e,t,n,r){return this.prepare(t,n,r),this.formatValue(e)}},{key:"prepare",value:function(e,t,n){var r;void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===n&&(n=this.decimalDelimiter),e?(this._prepared={positive:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},negative:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},zero:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""}},r=this._prepared,e=e.split(this.patternSeparator),r.positive.pattern=e[0],r.negative.pattern=e[1],r.zero.pattern=e[2],Ru.test(e[0])&&(r.positive.isFunctional=!0),e[1]?Ru.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?Ru.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1,r.positive.isFunctional||Lu(r.positive,t,n),r.negative&&!r.negative.isFunctional&&Lu(r.negative,t,n),r.zero&&!r.zero.isFunctional&&Lu(r.zero,t,n)):this._prepared={pattern:!1}}},{key:"formatValue",value:function(e){var t,n,r,i,o,a,s,l,u,c=this._prepared,d="",f="",h=e;if(isNaN(e))return"".concat(h);if(e=+e,!1===c.pattern)return e.toString();if(0===e&&c.zero)return(c=c.zero).pattern;if(e<0&&c.negative?(c=c.negative,e=-e):c=c.positive,o=c.d,a=c.t,c.isFunctional)e=function(e,t,n){var r;return Ou.test(t)?e=_u(e,Number(/\d{2}/.exec(t)[0]),t,n):Tu.test(t)?e=_u(e,8,t,n):Au.test(t)?e=_u(e,10,t,n):Nu.test(t)?e=_u(e,16,t,n):qu.test(t)?e=_u(e,2,t,n):Du.test(t)&&(r="",e<0&&(r="-",e=-e),e=0===(e=Math.floor(e))?"0":e<=5e5?r+(e=function(e,t){for(var n,r="",i=Number(String(e).slice(-3)),o=(e-i)/1e3,a=[0,1,4,5,9,10,40,50,90,100,400,500,900].reverse(),s=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();i>0;)for(n=0;n<a.length;n++)if(a[n]<=i){r+=s[n],i-=a[n];break}for(n=0;n<o;n++)r="M".concat(r);return t[1]!==t[1].toUpperCase()&&(r=r.toLowerCase()),r}(e,t)):t+r+e.toExponential(0)),e}(e,c.pattern,o);else{if(c.percentage&&(e*=100),c.abbreviate){var p,m,y=Object.keys(this.abbreviations).map((function(e){return parseInt(e,10)})).sort((function(e,t){return e-t})),g=y[0];for(s=0,n=Number(Number(e).toExponential().split("e")[1]);g<=n&&s<y.length;)g=y[++s];s>0&&(p=y[s-1]),p&&n>0&&p>0?m=p:(n<0&&p<0||!p)&&(g<0&&g-n<=c.maxPrecision?m=g:p<=n&&!(g>0&&-n<=c.maxPrecision)&&(m=p)),m&&(d=this.abbreviations[m],e/=Math.pow(10,m))}if(r=Math.abs(e),t=c.temp,u=(l=c.numericPattern).split(o)[1],"I"===this.type&&(e=Math.round(e)),i=e,u||"#"!==l.slice(-1)[0])if(r>=1e15||r>0&&r<=1e-14)e=r?r.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{var v=Number(e.toFixed(Math.min(20,u?u.length:0)).split(".")[0]),b=l.split(o)[0];if(e=wu(b+=o,v)||"0",u){var x=Math.max(0,Math.min(14,u.length)),M=u.replace(/#+$/,"").length,S=("I"===this.type?0:r%1).toFixed(x).slice(2).replace(/0+$/,"");for(s=S.length;s<M;s++)S+="0";S&&(e+=o+S)}else 0===v&&(i=0)}else if(r>=Math.pow(10,t)||r<1||r<1e-4)0===e?e="0":r<1e-4||r>=1e20?(e=(e=i.toExponential(Math.max(1,Math.min(14,t))-1)).replace(/\.?0+(?=e)/,""),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=wu(l,e)}e=e.replace(c.numericRegex,(function(e){return e===a?c.groupTemp:e===o?c.decTemp:""})),i<0&&!/^-/.test(e)&&(e="-".concat(e))}return c.prefix+e+f+d+c.postfix}}],[{key:"getStaticFormatter",value:function(){return{prepare:function(){},formatValue:function(e){return"".concat(e)}}}}]),e}();function zu(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.size,o=void 0===i?5e3:i,a=r.multipleArguments,s=void 0!==a&&a,l=r.toKey,u=void 0===l?function(e){return e}:l,c=Object.create(null),d=Object.create(null),f=0,h=0;return(t=s?function(){return n=u.apply(void 0,arguments),t.has(n)?t.get(n):t.set(n,e.apply(void 0,arguments))}:function(r){return n=u(r),t.has(n)?t.get(n):t.set(n,e(r))}).set=function(e,t){return f>=o&&(delete c[d[h]],delete d[h],f--,h++),c[e]=t,d[f]=e,f++,t},t.get=function(e){return c[e]},t.has=function(e){return e in c},t.clear=function(){c=Object.create(null),d=Object.create(null),f=0,h=0},t.size=function(){return f},t}function Fu(e,t,n,r,i){var o=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Nl(ju,t)}(i,e,t,n,r),a=zu(o.formatValue.bind(o),{toKey:function(e){return isNaN(e)?e:+e}});function s(e){return a(e)}return s.format=function(e,t,n,r){return a.clear(),o.format(t,e,n,r)},s.pattern=function(e){return e&&(a.clear(),o.pattern=e,o.prepare()),o.pattern},s}var Bu=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Vu=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Hu=["January","February","March","April","May","June","July","August","September","October","November","December"],$u=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Uu(e,t){for(var n=e.length;n<t;n++)e="0".concat(e);return e}function Wu(e){var t=e.toString().split(".");return t[1]?t=Number("0.".concat(t[1])):0}var Yu=function(){function e(t,n,r){Sl(this,e);var i,o=t||{};o.qCalendarStrings||(o.qCalendarStrings={qLongDayNames:Bu,qDayNames:Vu,qLongMonthNames:Hu,qMonthNames:$u}),this.localeInfo=o,this.locale_days=o.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=o.qCalendarStrings.qDayNames.slice(),this.locale_months=o.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=o.qCalendarStrings.qMonthNames.slice(),n||(n=(kl(i={},"T",o.qTimeFmt||"hh:mm:ss"),kl(i,"D",o.qDateFmt||"YYYY-MM-DD"),kl(i,"TS",o.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"),i)[r]),this.pattern=n}return El(e,[{key:"clone",value:function(){var t=new e(this.localeInfo,this.pattern);return t.subtype=this.subtype,t}},{key:"format",value:function(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+]|\[|]/g,"");var n,r,i,o,a,s=/t+/gi.test(t);e instanceof Date?(i=s,o=(r=e).getUTCHours(),i&&((o%=12)||(o=12)),(a=r.getUTCDay()-1)<0&&(a=6),n={year:r.getUTCFullYear(),month:r.getUTCMonth(),day:a,date:r.getUTCDate(),h:o,m:r.getUTCMinutes(),s:r.getUTCSeconds(),f:r.getUTCMilliseconds(),t:r.getUTCHours()>=12?"pm":"am"}):(e<0&&(e=-e,t="-".concat(t)),n=function(e,t){var n,r=function(e){var t=e,n=24*Wu(t),r=60*Wu(n),i=60*Wu(r),o=1e3*Wu(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,u=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)&&(u=n?n.getDay()-1:0)<0&&(u=6);var c="";return n&&(c=n.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:u,date:i,h:o,m:a,s:s,f:l,t:c}}(e,t));var l=function(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:Uu("".concat(t.year).slice(-2),2),YYY:Uu("".concat(t.year).slice(-3),3),def:function(e){return Uu("".concat(t.year),e.length)}},"M+":{M:t.month+1,MM:Uu("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:Uu("".concat(t.day),2),WWW:e.locale_days_abbr[t.day],def:e.locale_days[t.day]},"D+|d+":{D:t.date,def:function(e){return Uu("".concat(t.date),e.length)}},"h+|H+":{h:t.h,def:function(e){return Uu("".concat(t.h),e.length)}},"m+":{m:t.m,def:function(e){return Uu("".concat(t.m),e.length)}},"s+|S+":{s:t.s,def:function(e){return Uu("".concat(t.s),e.length)}},"f+|F+":{def:function(e){var n="".concat(t.f),r=e.length-n.length;if(r>0)for(var i=0;i<r;i++)n+="0";else r<0&&(n=n.slice(0,e.length));return n}},"t{1,2}|T{1,2}":{def:function(e){var n=t.t;return e[0].toUpperCase()===e[0]&&(n=n.toUpperCase()),n.slice(0,e.length)}}}}(this,n),u=[];for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&u.push(c);var d=new RegExp(u.join("|"),"g");return t.replace(d,(function(e){var t,n,r;for(n in l)if(Object.prototype.hasOwnProperty.call(l,n)&&(t=new RegExp(n)).test(e))break;if(!t)return"";for(var i in l[n])if(i===e||i.toLowerCase()===e){void 0===(r=l[n][i])&&(r=l[n][i.toLowerCase()]);break}return void 0===r&&(r=l[n].def),"function"==typeof r&&(r=r(e)),r}))}}]),e}();function Xu(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Nl(Yu,t)}function Gu(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}function Ku(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=Xu(n,e,t),i=zu(r.format.bind(r),{toKey:function(e){return"object"===Ml(e)&&"function"==typeof e.getTime?e.getTime():e}});function o(e){return"IV"!==t?Gu(e):e}function a(e){return e=o(e),i(e)}return a.format=function(e,t){return i.clear(),t=o(t),r.format(t,e)},a.locale=function(n){return r=Xu(n,e,t),i=zu(r.format.bind(r),{toKey:function(e){return"object"===Ml(e)?e.getTime():e}}),this},a.qtype=function(e){return void 0!==e&&(t=e,i.clear()),t},a}function Ju(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return Ku(e.qNumFormat.qFmt,e.qNumFormat.qType,t);var n="#",r=t&&void 0!==t.qThousandSep?t.qThousandSep:",",i=t&&void 0!==t.qDecimalSep?t.qDecimalSep:".",o="U",a=e&&!!e.qIsAutoFormat;return e&&e.qNumFormat?(n=e.qNumFormat.qFmt||n,r=e.qNumFormat.qThou||r,i=e.qNumFormat.qDec||i,o=e.qNumFormat.qType||o,a=a&&-1===["M"].indexOf(e.qNumFormat.qType)):a=!0,(a||"U"===o)&&(n="#".concat(i,"##A"),o="U"),Fu(n,r,i,o,t)}function Zu(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.meta,r=t.id,i=t.key,o=t.localeInfo,a=t.fieldExtractor,s=t.value,l=t.type,u=t.sourceField,c=s||("dimension"===l?function(e){return e.qElemNo}:function(e){return e.qValue}),d=function(e){return e.qText||""},f="dimension"===l?"first":"avg",h=Ju(n,o),p="dimension"===l?"first":function(e,t){return h(t)},m={id:function(){return r},key:function(){return i},raw:function(){return n},title:function(){return n.qFallbackTitle||n.label},type:function(){return l},origin:function(){return u},items:function(){return e||(e=a(m)),e},min:function(){return n.qMin},max:function(){return n.qMax},value:c,label:d,reduce:f,reduceLabel:p,formatter:function(){return h},tags:function(){return n.qTags}};return m}function Qu(e,t,n,r,i){return(t[e]||[]).map((function(t,o){var a="".concat(r?"".concat(r,"/"):"").concat(e,"/").concat(o),s={instance:Zu(Vl({id:"".concat(n?"".concat(n,"/"):"").concat(a),key:a,meta:t},i))};return s.attrDims=Qu("qAttrDimInfo",t,n,a,Vl({},i,{value:function(e){return e.qElemNo},type:"dimension"})),s.attrExps=Qu("qAttrExprInfo",t,n,a,Vl({},i,{value:function(e){return e.qNum},type:"measure"})),s.measures=Qu("qMeasureInfo",t,n,a,Vl({},i,{value:function(e){return e.qValue},type:"measure"})),s}))}function ec(){var e,t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=r.key,o=r.data,a=r.config,s=void 0===a?{}:a,l={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},u=o;if(!u)throw new Error('Missing "data" input');if(!u.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');var c=ec.util,d={cache:l,cube:u,localeInfo:s.localeInfo,fieldExtractor:null,pages:null,hierarchy:function(){return null},virtualFields:s.virtualFields},f={key:function(){return i},raw:function(){return u},field:function(e){return su(e,d)},fields:function(){return l.fields.slice()},extract:function(e){return d.extractor(e,f,l,c)},hierarchy:function(e){return d.hierarchy(e,f,l,c)},_cache:function(){return l}};"K"===u.qMode||"T"===u.qMode||!u.qMode&&u.qNodesOnDim?(d.extractor=Mu,d.hierarchy=xu,d.pages="K"===u.qMode?u.qStackedDataPages:u.qTreeDataPages):"S"===u.qMode?(d.extractor=Wl,d.pages=u.qDataPages,d.hierarchy=xu):d.extractor=function(){return[]},d.fieldExtractor=function(e){return d.extractor({field:e},f,l,c)};var h="S"===u.qMode?function(e){return e.qElemNumber}:void 0,p="S"===u.qMode?function(e){return e.qNum}:void 0;(e=l.wrappedFields).push.apply(e,ql(Qu("qDimensionInfo",u,i,"",Vl({},d,{value:h,type:"dimension"})))),(t=l.wrappedFields).push.apply(t,ql(Qu("qMeasureInfo",u,i,"",Vl({},d,{value:p,type:"measure"})))),l.fields=l.wrappedFields.map((function(e){return e.instance}));var m=function e(t){t.forEach((function(t){l.allFields.push(t.instance),e(t.measures),e(t.attrDims),e(t.attrExps)}))};return m(l.wrappedFields),(s.virtualFields||[]).forEach((function(e){var t=f.field(e.from),n=Zu(Ol({meta:t.raw(),id:"".concat(i,"/").concat(e.key),sourceField:t,fieldExtractor:function(e){return d.extractor({field:e},f,l,c)},key:e.key,type:t.type(),localeInfo:d.localeInfo,value:t.value},e.override||{}));l.virtualFields.push(n)})),(n=l.allFields).push.apply(n,ql(l.virtualFields)),f}var tc=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],nc=/\/qDimensionInfo(?:\/(\d+))?/,rc=/\/qMeasureInfo\/(\d+)/,ic=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,oc=/\/qAttrExprInfo\/(\d+)/,ac=/\/?qHyperCube/,sc=/\/?qTreeData/,lc=function(e){return"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14))},uc=function(e){return"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13))};function cc(e,t){var n=e,r=-1,i=-1,o="",a=function(e){return e};ac.test(e)?(o="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),a=lc):sc.test(e)&&(o="".concat(n.substr(0,n.indexOf("qTreeData")+9)),a=uc);var s=!0;if(nc.test(e)&&(r=+nc.exec(e)[1]),rc.test(e)&&(i=+rc.exec(e)[1]),ic.test(e)){i=-1,r=0;var l=+ic.exec(n)[2];isNaN(l)||(r=l,n=n.replace(/\/\d+$/,"")),s=!1}if(oc.test(e)){var u=i;if(t){i=0;var c=iu(o,t);i+=(c.qMeasureInfo||[]).length,r>-1?(i=c.qDimensionInfo.slice(0,r).reduce((function(e,t){return e+t.qAttrExprInfo.length}),i),r=-1):(i=c.qDimensionInfo.reduce((function(e,t){return e+t.qAttrExprInfo.length}),i),i=c.qMeasureInfo.slice(0,u).reduce((function(e,t){return e+t.qAttrExprInfo.length}),i)),i+=+oc.exec(n)[1]}else r>-1?(r=-1,i=+oc.exec(n)[1]):i+=+oc.exec(n)[1]+1}return tc.forEach((function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(e,t)||Dl(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,2),r=t[0],i=t[1];n=n.replace(r,i)})),s&&(n=a(n)),n&&"/"!==n[0]&&(n="/".concat(n)),{measureIdx:i,dimensionIdx:r,path:n}}function dc(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,i=n.byCells,o=n.primarySource,a=[],s={},l=e.isActive(),u=!1;return e.brushes().forEach((function(e){var t=cc(e.id,r);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){var n=e.brush.ranges();n.length&&(u=!0,s.multiRangeSelectTreeDataValues||(s.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),n.forEach((function(e){return s.multiRangeSelectTreeDataValues.ranges.push({qMeasureIx:t.measureIdx,qDimensionIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})})))}else{if("range"===e.type&&t.measureIdx>-1){var l=e.brush.ranges();l.length&&(u=!0,s.rangeSelectHyperCubeValues||(s.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),l.forEach((function(e){return s.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:t.measureIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})})))}if("range"===e.type&&t.dimensionIdx>-1){var c=e.brush.ranges();c.length&&(u=!0,s.selectHyperCubeContinuousRange||(s.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),c.forEach((function(e){return s.selectHyperCubeContinuousRange.ranges.push({qDimIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!1}})})))}if("value"===e.type&&t.dimensionIdx>-1)if(i)if(r&&r.qHyperCube&&("P"===r.qHyperCube.qMode||"T"===r.qHyperCube.qMode||"K"===r.qHyperCube.qMode)){var d=r.qHyperCube,f=d.qNoOfLeftDims,h=d.qEffectiveInterColumnSortOrder.indexOf(t.dimensionIdx);if(s.selectPivotCells||(s.selectPivotCells={path:t.path,cells:[]}),e.id===o||!o){var p=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)}));(0===f||h>=f)&&f>-1?p.forEach((function(e){s.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:h-f})})):p.forEach((function(e){s.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})})),u=!!s.selectPivotCells.cells.length}}else s.selectHyperCubeCells||(s.selectHyperCubeCells={path:t.path,cols:[]}),s.selectHyperCubeCells.cols.push(t.dimensionIdx),e.id!==o&&(o||s.selectHyperCubeCells.values)||(s.selectHyperCubeCells.values=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)})),u=!!s.selectHyperCubeCells.values.length);else{var m=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)}));u=!!m.length,a.push({params:[t.path,t.dimensionIdx,m,!1],method:"selectHyperCubeValues"})}}})),!u&&l?[{method:"resetMadeSelections",params:[]}]:(s.rangeSelectHyperCubeValues&&a.push({method:"rangeSelectHyperCubeValues",params:[s.rangeSelectHyperCubeValues.path,s.rangeSelectHyperCubeValues.ranges,[],null===(t=n.orMode)||void 0===t||t]}),s.selectHyperCubeContinuousRange&&a.push({method:"selectHyperCubeContinuousRange",params:[s.selectHyperCubeContinuousRange.path,s.selectHyperCubeContinuousRange.ranges]}),s.selectHyperCubeCells&&a.push({method:"selectHyperCubeCells",params:[s.selectHyperCubeCells.path,s.selectHyperCubeCells.values,s.selectHyperCubeCells.cols]}),s.selectPivotCells&&a.push({method:"selectPivotCells",params:[s.selectPivotCells.path,s.selectPivotCells.cells]}),s.multiRangeSelectTreeDataValues&&a.push({method:"multiRangeSelectTreeDataValues",params:[s.multiRangeSelectTreeDataValues.path,s.multiRangeSelectTreeDataValues.ranges]}),a)}function fc(e){ec.util=e.data("matrix").util,e.data("q",ec),e.formatter("q-number",Fu),e.formatter("q-time",Ku)}function hc(e){var t=hl(e.layout||{},e.path.split("/").join("."));if(!t)return!1;var n=t.qIsOneAndOnlyOne;return void 0!==n&&n}function pc(){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"===ua(e.data)&&Array.isArray(e.data.fields)})).every((function(e){return e.data.fields.every((function(e){var t=e.raw();return!(!t.qLocked&&t.qCardinal)}))}));return t}function mc(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))}fc.qBrushHelper=dc,fc.selections=dc;var yc="Shift";function gc(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}));return l.length>1?function(e){var t=e.layout,n=void 0===t?{}:t,r=e.values,i=void 0===r?[]:r;if(null==i||!i.length)return[];var o=Array.from(new Set(i.map((function(e){return e.key})))),a=[];return o.forEach((function(e){var t=hc({layout:n,path:e}),r=i.filter((function(t){return t.key===e})),o=t?[r.pop()]:r;a.push.apply(a,ga(o))})),a.filter(Boolean)}({layout:s,values:l}):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)}}}var vc=[],bc=0,xc=function(e){var t=vc.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()})))},Mc=function(){document.addEventListener("keyup",xc)},Sc=function(){document.removeEventListener("keyup",xc)},wc=function(e,t){Object.keys(t).forEach((function(n){e.on(n,t[n])}))},Ec=function(e,t){Object.keys(t).forEach((function(n){e.removeListener(n,t[n])}))};function kc(e,t,n){if(t&&void 0!==n&&"selectHyperCubeContinuousRange"===e.method){var r=e.params;if(r&&r[1]&&r[1][0]){var i=r[1][0],o=i.qDimIx,a=i.qRange;"undefined"!==o&&a&&!1===a.qMaxInclEq&&a.qMax>=n&&(a.qMaxInclEq=!0)}}}function Cc(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,u=void 0===l?"rangeClear":l,c=r.event===i,d=n.querySelector("[data-key='".concat(o,"-edge-0']"));if(c||!d)return!1;var f=t.component(o);return!!f&&(f.emit(u),"string"==typeof s&&t.brush(s).clear(),f)}function Oc(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 Cc({selectionInfo:t,chart:n,document:r,eventName:void 0!==l&&l?void 0:o,componentName:s,emit:"areaClear",brushName:e.brushName})}function Tc(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 Cc({selectionInfo:t,chart:n,document:r,eventName:void 0!==l&&l?void 0:o,componentName:s,brushName:e.brushName})}function Ac(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,u=void 0!==l&&l,c=e.brushName,d=Cc({selectionInfo:t,chart:n,document:r,eventName:u?void 0:s,componentName:o,brushName:void 0!==c&&c});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()})),y=n.brush(p),g=y.brushes().filter((function(e){return"range"===e.type&&m.some((function(t){return t===e.id}))}));y&&g.length&&g.forEach((function(e){y.removeRanges(e.brush.ranges().map((function(t){return{key:e.id,range:t}})))}))}}function Nc(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;Cc({selectionInfo:t,chart:n,document:r,eventName:void 0!==s&&s?void 0:a,componentName:"".concat(a,"-range-brush"),emit:"areaClear",brushName:!1})&&i.clear()}function qc(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()})))}}function Dc(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,u=e.cleared,c=void 0!==u&&u,d=e.brushName;Cc({selectionInfo:t,chart:n,document:r,eventName:c?void 0:a,componentName:l,brushName:void 0!==d&&d})&&i.clear()}var Rc=function(e){e.chart,e.document,e.selections,e.selectionInfo;var t=ma(e,["chart","document","selections","selectionInfo"]);t.clearDiscrete(),t.clearContinuous(),t.clearMinor(),t.clearRange(),t.clearTap(),t.clearLegend()};function Ic(e){var t,n=e.lasso;null!=n&&null!==(t=n.active)&&void 0!==t&&t.call(n)&&(null==n||n.action(!1))}function _c(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 u=(a||{}).lasso,c=void 0!==u&&u,d=i.reset,f=void 0===d?Ic:d,h=i.clear,p=!1!==h&&function(e){var t=e.clear,n=void 0===t?Rc: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(pa({clearDiscrete:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Oc(pa(pa({},t),e))},clearContinuous:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Tc(pa(pa({},t),e))},clearMinor:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Ac(pa(pa({},t),e))},clearRange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Nc(pa(pa({},t),e))},clearTap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return qc(pa(pa({},t),e))},clearLegend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Dc(pa(pa({},t),e))}},t))}}({clear:h,selections:s,selectionInfo:r,chart:n}),m=function(e){var t=e.chart,n=e.lasso,r=e.reset,i=e.clear,o=!1,a={deactivated:function(e){r({e:e,lasso:n})},canceled:function(e){r({e:e,lasso:n}),i({e:e,chart:t,document:document})},cleared:function(e){o||(o=!0,i({e:e,chart:t,document:document,cleared:!0}),o=!1)}};return!1===r&&delete a.deactivated,!1===i&&delete a.cleared,!1===r&&!1===i&&delete a.canceled,a}({chart:n,clear:p,reset:f,lasso:c}),y={};Object.entries(m).forEach((function(e){var t=ya(e,2),n=t[0],r=t[1];y[n]=function(e,t){return t?function(n){return t({event:n,defaultFunc:e})}:e}(r,l[n])}));var g=function(e){var t=e.selectionEvents,n=e.selections,r=e.selectionInfo,i=e.clear,o=e.chart,a=e.document,s=t.start,l={selections:n,selectionInfo:r,chart:o,document:a},u=function(e){return Object.assign(r,e||{})},c=function(e){var t=e.event,n=e.components;return function(){return function(e){var t=e.selectionInfo,n=e.clear,r=e.event,i=e.components,o=void 0===i?[]:i;(0,e.setSelectionInfo)(pa(pa({},void 0===t?{}:t),{},{event:r,components:o.map((function(e){return e.key})).filter(Boolean)})),n()}({event:t,components:n,clear:i,chart:o,selectionInfo:r,setSelectionInfo:u})}};return"function"==typeof s?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];s(pa(pa({defaultFunc:c({event:e,components:t}),setSelectionInfo:u,clear:i},l),{},{event:e,components:t}))}:function(e){c({event:e,components:arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]})()}}({selectionEvents:l,selections:s,selectionInfo:r,clear:p,chart:n,document:document});return null==a||null===(t=a.select)||void 0===t||t.on("start",g),Object.entries(y).forEach((function(e){var t=ya(e,2),n=t[0],r=t[1];null==s||s.on(n,r)})),function(){var e;null==a||null===(e=a.select)||void 0===e||e.removeListener("start",g),Object.entries(y).forEach((function(e){var t=ya(e,2),n=t[0],r=t[1];null==s||s.removeListener(n,r)}))}}var Pc=[{key:"qHyperCube/qDimensionInfo/0:numeric",includeMax:!1}];function Lc(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,u=void 0===l?void 0:l,c=o.selectionActions,d=(c=void 0===c?{}:c).clear,f=c.reset,h=o.selectionEvents,p=void 0===h?{deactivated:void 0,canceled:void 0,cleared:void 0,start:void 0}:h,m=o.brushEvents,y=void 0===m?{}:m,g=o.brushName,v=void 0===g?"selection":g,b=o.brushMaxListeners,x=void 0===b?20:b,M=o.brushRanges,S=void 0!==M&&M,w=o.interceptors,E=void 0===w?{}:w,k=o.selectionsFn,C=void 0===k?i.selections:k,O=t.brush(v);if("number"==typeof x&&O.setMaxListeners(x),S){var T=!0===S?Pc:S;O.configure({ranges:T})}var A={canSelect:!0,getIsSelectionLocked:!1,isInnerDimensionLocked:!1,lockedDimensions:[],singleSelectIndex:0,singleSelectDims:[],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(){},allowSimultaneous:function(){},release:function(){}};var u=++bc,c=null,d=[],f={};n.on=n.on.bind(n),n.isActive=n.isActive.bind(n),n.addListener=n.addListener.bind(n),n.removeListener=n.removeListener.bind(n);var h=gc({brush:r,getConfig:function(){return{layout:c,allowSimultaneous:d}}}),p=h.rangeInterceptor,m=h.interceptor;r.intercept("set-ranges",p),r.intercept("toggle-ranges",p),r.intercept("toggle-values",m),r.intercept("set-values",m),r.intercept("add-values",m),r.on("start",(function(){return n.begin(l)}));var y={activate:function(){},deactivated:function(){return r.end()},cleared:function(){return r.clear()},canceled:function(){return r.end()}};wc(n,y);var g=null==i||null===(e=i.max)||void 0===e?void 0:e.call(i);return null!=o&&o.select?(o.select.on("start",(function(){var e;r.start(),"function"==typeof o.select.getBrushOptions&&(f=(e=o.select).getBrushOptions.apply(e,arguments))})),o.select.on("end",(function(){a(r,f,c).forEach((function(e){kc(e,o.select.brushSelectionIncludeMax,g),n.select(e)}))}))):r.on("update",(function(){a(r,f,c).forEach((function(e){return n.select(e)}))})),0===vc.length&&Mc(),vc.push({key:u,selections:n}),{layout:function(e){c=e},allowSimultaneous:function(e){d=e},release:function(){c=null;var e=vc.indexOf(vc.filter((function(e){return e.key===u}))[0]);-1!==e&&vc.splice(e,1),vc.length||Sc(),Ec(n,y)}}}({brush:O,majorScale:u,actions:n,selections:r,picassoQ:i,selectionsFn:C});!function(e){var t=e.brush,n=e.interceptors,r=void 0===n?{}:n;Object.entries(r).forEach((function(e){var n=ya(e,2),r=n[0],i=n[1];(Array.isArray(i)?i:[i]).forEach((function(e){t.intercept(r,e)}))}))}({brush:O,interceptors:E});var q=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=ya(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=ya(e,2),r=n[0],i=n[1];t.removeListener(r,i)}))}}({brush:r,chart:t,selectionInfo:o,brushEvents:e.brushEvents}),u=_c({chart:t,selectionInfo:o,selectionActions:n,actions:i,selections:a,selectionEvents:s}),c=function(e){var t=e.actions;if(null==t||!t.lasso)return function(){};var n=!1,r=function(e){n||e.key!==yc||(t.lasso.action(!0),n=!0)},i=function(e){e.key===yc&&(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(),u(),c()}}({chart:t,brush:O,actions:n,selections:r,selectionInfo:A.selectionInfo,selectionActions:{clear:d,reset:f},selectionEvents:p,brushEvents:y});if(s){var D=!0===s?ga(Array(15)).map((function(e,t){return"qHyperCube/qMeasureInfo/".concat(t)})):s;N.allowSimultaneous(D)}return{unbindEvents:q,state:A,picassoSelections:N,brush:O}}function jc(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=Lc({chart:t,actions:i,selections:n,picassoQ:fc,config:a}),l=s.unbindEvents,u=s.state,c=s.picassoSelections,d=s.brush,f=a.custom,h=void 0===f?{}:f,p=a.legendAlias,m=void 0===p?void 0:p,y=a.setBrushAliases,g=void 0===y?mc:y;return{getIsDimensionLocked:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return u.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:pc(r)},getIsSingleSelect:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u.singleSelectIndex;return u.singleSelectDimensions[e]},getCanSelect:function(){return u.canSelect},getSelectionInfo:function(){return u.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,u=void 0===l?[]:l;return s.lockedDimensions=u.map((function(e){return!!e.qLocked})),s.singleSelectDimensions=u.map((function(e,t){return hc({layout:a,path:"qHyperCube/qDimensionInfo/".concat(t)})})),s.singleSelectIndex=function(e){var t,n=((null==e?void 0:e.qHyperCube)||{}).qDimensionInfo,r=void 0===n?[]:n;return null!==(t=r.map((function(e,t){var n;return!(e.qLocked||(null===(n=e.qCardinalities)||void 0===n?void 0:n.qHypercubeCardinal)<=1)&&t})).filter((function(e){return"number"==typeof e}))[0])&&void 0!==t?t:Math.max(r.length-1,0)}(a),s.canSelect=0===u.length||u.some((function(e){return!e.qLocked})),s.dimensionLocked=!(null===(r=u[0])||void 0===r||!r.qLocked),s}({selections:n,picassoSelections:c,layout:e});Object.assign(u,t)},setBrushAliases:function(e){var t=e.colorField,n=e.useLegendCube,r=void 0!==n&&n,i=ma(e,["colorField","useLegendCube"]),o=pa({useLegendCube:r,colorField:t,brush:d,legendAlias:m},i);g(pa(pa({},o),{},{defaultFunc:function(){return mc(o)}}))},destroy:function(){l(),c.release()},custom:pa({},h)}}var zc="QlikView Sans, sans-serif",Fc="#737373",Bc="#cccccc",Vc="#e6e6e6";function Hc(e){var t={};return[].concat(ga(e),ga([["","","color"],["object","axis.title","fontFamily",zc],["object","axis.title","fontSize","13px"],["object","axis.title","color"],["object","axis.label.name","fontFamily",zc],["object","axis.label.name","fontSize","12px"],["object","axis.label.name","color","#595959"],["object","axis.line.major","color",Bc],["object","axis.line.minor","color",Vc],["object","grid.line.major","color",Bc],["object","grid.line.minor","color",Vc],["object","grid.line.highContrast","color",Vc],["object","referenceLine.label.name","fontFamily",zc],["object","referenceLine.label.name","fontSize","12px"],["object","referenceLine.label.name","color","#333333"],["object","referenceLine.outOfBounds","fontFamily",zc],["object","referenceLine.outOfBounds","fontSize","12px"],["object","referenceLine.outOfBounds","color",Vc],["object","referenceLine.outOfBounds","backgroundColor",Fc,function(e){return"transparent"===e?Fc:e}]])).reduce((function(e,n){var r="".concat(n[0],"-").concat(n[1],"-").concat(n[2],"}");return t[r]||(t[r]=!0,e.push(n)),e}),[]).sort((function(e,t){return(e[0].split?e[0].split(".").length:0)-(t[0].split?t[0].split(".").length:0)}))}function $c(e,t){var n={};return e.forEach((function(e){var r=ya(e,5),i=r[0],o=r[1],a=r[2],s=r[3],l=r[4],u=(void 0===l?function(e){return e}:l)(function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0;if(!e||!1===t)return i;var o=e.getStyle(t,n,r);return void 0===o?i:o}(t,i,o,a,s));pl(n,[o,a].filter(Boolean).join("."),u)})),n}function Uc({key:e,source:t,layoutService:n,fieldModel:r,colorService:i,series:o}){const{meta:a}=n;if(a.isBarSeriesStacked){const{major:a,majorNumeric:s}=r.main,l=o.filter((e=>e.type===Ho.BAR)),u=n.meta.isContinuous?s:a,c=e=>"NaN"!==e.qNum?e.qNum:0;return[{key:e,data:{extract:l.map((({ref:e,typeIndex:r,refIndex:o})=>({source:t,field:a,value:n.meta.isContinuous?e=>e.qNum:void 0,props:{major:{field:u},selectionDimension:{field:a},segment:{field:e,value:c,reduceLabel:"none"},end:{field:e,value:c,reduceLabel:"none"},null:{fields:l.map((e=>({field:e.ref}))),value:e=>Array.isArray(e)&&e.every((e=>"NaN"===e)),reduceLabel:"none"},typeIndex:r,...i.getDatumProps(o),customTooltipAttrExps:aa.getNode(n.getLayout(),n.meta),sumOfPositives:{fields:l.map((e=>({field:e.ref}))),value:e=>e.reduce(((e,t)=>t>0?e+t:e),0),reduceLabel:"none"},sumOfNegatives:{fields:l.map((e=>({field:e.ref}))),value:e=>e.reduce(((e,t)=>t<0?e+t:e),0),reduceLabel:"none"}}}))),stack:{stackKey:e=>e.value,value:e=>e.end.value,offset:"diverging"}}}]}return[]}function Wc({key:e,series:t,source:n,fieldModel:r,colorService:i,layoutService:o,forceCreate:a=!1}){if(t.length||a){const{major:a,majorNumeric:s}=r.main,l=e=>"NaN"!==e.qNum?e.qNum:0,u=o.meta.isContinuous?s:a;return[{key:e,data:{extract:t.map((({ref:e,refIndex:t,typeIndex:r,options:s},c)=>({source:n,field:a,value:o.meta.isContinuous?e=>e.qNum:void 0,props:{major:{field:u},selectionDimension:{field:a},end:{field:e,value:s.showAsZeros?l:void 0,reduceLabel:"none"},start:0,line:c,typeIndex:r,null:{field:e,value:e=>"NaN"===e.qNum,reduceLabel:"none"},customTooltipAttrExps:aa.getNode(o.getLayout(),o.meta),...i.getDatumProps(t)}})))}}]}return[]}function Yc({key:e,layoutService:t,fieldModel:n,series:r}){const{meta:i}=t;if(i.isBarSeriesStacked){const{major:t,majorNumeric:o}=n.main,a=r.filter((e=>e.type===Ho.BAR)),s=i.isContinuous?{field:o,value:e=>e.qNum,reduceLabel:"none"}:[];return[{key:e,data:{extract:{field:0,props:{major:{field:i.isContinuous?o:t},null:{fields:a.map((e=>({field:e.ref}))),value:e=>Array.isArray(e)&&e.every((e=>"NaN"===e)),reduceLabel:"none"},sumOfPositives:{fields:a.map((e=>({field:e.ref}))),value:e=>e.reduce(((e,t)=>t>0?e+t:e),0),reduceLabel:"none"},sumOfNegatives:{fields:a.map((e=>({field:e.ref}))),value:e=>e.reduce(((e,t)=>t<0?e+t:e),0),reduceLabel:"none"},timeStart:s,timeEnd:s},value:i.isContinuous?e=>e.qNum:void 0}}}]}return[]}const Xc={MINI_CHART:{value:"miniChart",translation:"properties.scrollbar.miniChart"},BAR:{value:"bar",translation:"properties.scrollbar.bar"},NONE:{value:"none",translation:"properties.scrollbar.none"}};var Gc={OPTIONS:Xc,DEFAULT:Xc.MINI_CHART};function Kc({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,u=r[l?"width":"height"];let c=a.qArea.qTop/s*u,d=a.qArea.qHeight/s*u;if(d<o){const e=(o-d)/2;c=c-e+(Math.max(0,0-(c-e))-Math.max(0,c+d+e-u)),d=o}return n("div",{style:{position:"absolute",right:0,bottom:0,background:"red",opacity:.2,...l?{top:0,left:c,width:d}:{top:c,left:0,height:d}}})}}function Jc({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 Zc=e=>({miniChart:e===Gc.OPTIONS.MINI_CHART.value,bar:e===Gc.OPTIONS.BAR.value,none:e===Gc.OPTIONS.NONE.value});function Qc({layoutService:e,override:t}){const n=(({layoutService:e})=>{const t=e.getLayoutValue("scrollbar");if(t)return Zc(t);const n=e.getLayoutValue("showMiniChartForContinuousAxis");if(void 0===n)return Zc(Gc.DEFAULT.value);const r=e.getLayoutValue("dimensionAxis.continuousAuto"),i=e.getLayoutValue("preferContinuousAxis");return Zc(!n&&(r||!r&&i)?Gc.OPTIONS.NONE.value:Gc.OPTIONS.MINI_CHART.value)})({layoutService:e});return t&&t.predicate({layoutService:e,scrollbar:n})&&(n.miniChart=t.value===Gc.OPTIONS.MINI_CHART.value,n.bar=t.value===Gc.OPTIONS.BAR.value,n.none=t.value===Gc.OPTIONS.NONE.value),n}function ed({componentKey:e,chart:t,viewState:n,viewCache:r,layoutService:i,dockService:o,rtl:a}){return s=>{const{x:l,y:u}=s.center,c=t.element.getBoundingClientRect(),d=t.component(e),f="horizontal"===o.meta.major.orientation,h=f?l-c.left-d.rect.computedInner.x:u-c.top-d.rect.computedInner.y,p=f?d.rect.computedInner.width:d.rect.computedInner.height,m=f&&a?p-h:h,y=Math.max(0,Math.min(m/p,1)),[g,v]=Jc({layoutService:i,viewState:n,viewCache:r}),b=y<g,x=y>v,M=!b&&!x;return{pixel:m,relative:y,thumb:M?m-g*p:0,beforeThumb:b,afterThumb:x,onThumb:M}}}function td({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:u}=a.rect.computedInner,c="horizontal"===s?l:u,[d,f]=Jc({layoutService:i,viewState:n,viewCache:r});return{size:c,thumbSize:(f-d)*c}}}function nd({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){const u=ed({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:l}),c=td({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=u(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=c(),t=a.pixel-e.thumbSize/2,n=Math.max(0,t/e.size);s.command.scrollTo(n)}t.component(e).emit("render")}}}}const rd="data-scrollbar-handle";function id({e:e}){return(e.srcEvent||e).srcElement.getAttribute(rd)||""}const od="scrollbarResize";function ad({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:s}){const l=ed({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:s});return{type:"Pan",key:"event:scrollbarResize",options:{event:od,threshold:0,enable(e,t){return!(!o.meta.isContinuous||!n.scroll.enabled())&&(!t||(this[od]=this[od]||{},(e=>{const[t]=e.changedPointers;return t&&("pointerdown"===t.type||"mousedown"===t.type)})(t)&&id({e:t})&&(this[od].panningEvent=t.srcEvent),!!this[od].panningEvent))}},events:{scrollbarResizestart(n){n.preventDefault(),this[od]=this[od]||{},this[od].panningEvent&&t.component(e).emit("dragStart",this[od].panningEvent)},scrollbarResizemove(n){if(n.preventDefault(),this[od]=this[od]||{},!this[od].panningEvent)return;const o=r.get("zoom"),a=i.get("continuousMin"),s=i.get("continuousMax"),u=i.get("minimiumZoomSpan"),c=(s-a)*l(n).relative+a,d=id({e:this[od].panningEvent});let f="start"===d?Math.min(c,o.max):o.min,h="end"===d?Math.max(c,o.min):o.max;f===h&&(f-="start"===d?u:0,h+="end"===d?u:0),r.set("zoom",{min:f,max:h}),t.component(e).emit("render")},scrollbarResizeend(n){n.preventDefault(),this[od]=this[od]||{},delete this[od].panningEvent,t.component(e).emit("dragEnd")},scrollbarResizecancel(n){n.preventDefault(),this[od]=this[od]||{},delete this[od].panningEvent,t.component(e).emit("dragEnd")}}}}const sd="scrollbarPan";function ld({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){const u=ed({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:l}),c=td({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a});return{type:"Pan",key:"event:scrollbarPan",options:{event:sd,threshold:0,enable(r,i){return this[sd]=this[sd]||{},!(i&&!this[sd].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:{scrollbarPanstart(n){n.preventDefault();const a=u(n);if(this[sd]=this[sd]||{},this[sd].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[sd].relative=a.relative,this[sd].zoom=r.get("zoom"),this[sd].zoom.span=this[sd].zoom.max-this[sd].zoom.min,this[sd].zoom.fullSpan=o-n}else if(a.onThumb)this[sd].offset=a.thumb;else{const e=c();this[sd].offset=a.beforeThumb?0:e.thumbSize}},scrollbarPanmove(n){n.preventDefault();const a=u(n);if(this[sd]=this[sd]||{},o.meta.isContinuous){const e=a.relative-this[sd].relative,{fullSpan:t,span:n,min:o,max:s}=this[sd].zoom,l=i.get("continuousMin"),u=i.get("continuousMax");r.set("zoom",{min:Math.min(o+e*t,u-n),max:Math.max(s+e*t,l+n)})}else{const e=a.pixel-(this[sd].offset||0),t=c(),n=Math.max(0,e/t.size);s.command.scrollTo(n)}t.component(e).emit("render")},scrollbarPanend(n){n.preventDefault(),this[sd]=this[sd]||{},this[sd].isPanning=!1,t.component(e).emit("unlockState")},scrollbarPancancel(n){n.preventDefault(),this[sd]=this[sd]||{},this[sd].isPanning=!1,t.component(e).emit("unlockState")}}}}function ud({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){return[nd({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}),ad({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:l}),ld({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l})]}function cd({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")}}}const dd={background:"rgba(0, 0, 0, 0.1)"},fd={top:-1,bottom:-1,width:6},hd={width:2,background:"#595959"};var pd={before:dd,after:dd,thumb:{background:"transparent",border:"1px solid rgba(68, 68, 68, 0.4)"},startHandle:fd,endHandle:fd,startHandleBorder:hd,endHandleBorder:hd};const md={background:"rgba(0, 0, 0, 0.1)"},yd={top:-1,bottom:-1,width:6},gd={width:2,background:"#595959"};var vd={before:md,after:md,thumb:{background:"#B0AFAE",border:"transparent"},startHandle:yd,endHandle:yd,startHandleBorder:gd,endHandleBorder:gd};const bd={position:"absolute",top:0,right:0,bottom:0,left:0,boxSizing:"border-box"},xd={pointerEvents:"initial"},Md={pointerEvents:"none"};const Sd="ew-resize",wd="default";function Ed(){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 kd(){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?Sd:wd}function Cd(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 Od(e){const t=(e.srcEvent||e).srcElement;return this.renderer.element().contains(t)}function Td(){const{size:e,start:t,end:n}=Ed.call(this);this.renderer.render(this.elements(this.h,Cd.call(this,e,t,n)))}function Ad(){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?vd:pd;return{container:{...bd},before:{...bd,...n.before,...t.before},after:{...bd,...n.after,...t.after},thumb:{...bd,...n.thumb,...t.thumb},startHandle:{...bd,...xd,...n.startHandle},endHandle:{...bd,...xd,...n.endHandle},startHandleBorder:{...bd,...Md,...n.startHandleBorder},endHandleBorder:{...bd,...Md,...n.endHandleBorder}}}({id:t.settings.style,style:n[r]})),e.style[r]}var Nd={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(){Td.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||!Od.call(this,e)&&this.state.hover.isPristine())return;this.state.hover.reset();const t=id({e:e});t&&(this.state.hover[t]=!0),kd.call(this),Td.call(this)},leave(){this.state.locked||(this.state.hover.reset(),kd.call(this),Td.call(this))},dragStart(e){if(this.state.locked)return;this.state.drag.reset();const t=id({e:e});t&&(this.state.drag[t]=!0),kd.call(this)},dragEnd(){this.state.locked||(this.state.drag.reset(),kd.call(this),Td.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}=Ed.call(this);return this.elements(e,Cd.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:u,injections:c}){const d={[i.end]:t-n},f={[i.start]:r},h={left:-3},p={left:1},m={right:-3,left:"auto"},y={left:3},g=e("div",{style:{...s.before,...u?f:d},class:"scrollbar--before"}),v=e("div",{style:{...s.after,...u?d:f},class:"scrollbar--after"}),b=[];if(l){const t=e("div",{style:{...s.startHandle,...u?m:h},class:"scrollbar--start-handle",[rd]:"start"},o?e("div",{style:{...s.startHandleBorder,...u?y:p}}):void 0);b.push(t);const n=e("div",{style:{...s.endHandle,...u?h:m},class:"scrollbar--end-handle",[rd]:"end"},a?e("div",{style:{...s.endHandleBorder,...u?p:y}}):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}},[g,x,v,...c])}({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:Ad.call(this),continuous:i.isContinuous,invert:"horizontal"===i.orientation&&i.rtl,injections:o})}};function qd({layoutService:e}){return e.meta.isContinuous&&Qc({layoutService:e}).miniChart}function Dd({models:e}){const{layoutService:t,fieldModel:n,seriesModel:r,colorService:i}=e,{primarySeries:o,secondarySeries:a}=r.meta,s=r.query.series(Ho.LINE),l=[...Wc({forceCreate:!0,key:Vo.COLLECTION.PRIMARY,series:o,fieldModel:n,colorService:i,layoutService:t}),...Wc({key:Vo.COLLECTION.SECONDARY,series:a,fieldModel:n,colorService:i,layoutService:t}),...Wc({key:Vo.COLLECTION.LINE,series:s,fieldModel:n,colorService:i,layoutService:t}),...Uc({key:Vo.COLLECTION.STACKED_PRIMARY,layoutService:t,fieldModel:n,colorService:i,series:o}),...Uc({key:Vo.COLLECTION.STACKED_SECONDARY,layoutService:t,fieldModel:n,colorService:i,series:a}),...Yc({key:Vo.COLLECTION.STACKED_TOTAL_PRIMARY,layoutService:t,fieldModel:n,series:o}),...Yc({key:Vo.COLLECTION.STACKED_TOTAL_SECONDARY,layoutService:t,fieldModel:n,series:a})];return qd(e)&&(l.push(...Wc({key:Vo.COLLECTION.REDUCED,source:Vo.DATA.REDUCED,series:r.query.all(),fieldModel:n,colorService:i,layoutService:t})),l.push(...Wc({key:Vo.COLLECTION.REDUCED_PRIMARY,source:Vo.DATA.REDUCED,series:o,fieldModel:n,colorService:i,layoutService:t})),l.push(...Wc({key:Vo.COLLECTION.REDUCED_SECONDARY,source:Vo.DATA.REDUCED,series:a,fieldModel:n,colorService:i,layoutService:t})),l.push(...Uc({key:Vo.COLLECTION.REDUCED_STACKED_PRIMARY,source:Vo.DATA.REDUCED,layoutService:t,fieldModel:n,series:r.meta.primarySeries.filter((e=>e.type===Ho.BAR)),colorService:i})),l.push(...Uc({key:Vo.COLLECTION.REDUCED_STACKED_SECONDARY,source:Vo.DATA.REDUCED,layoutService:t,fieldModel:n,series:r.meta.secondarySeries.filter((e=>e.type===Ho.BAR)),colorService:i}))),l}const Rd=({layoutService:e,dockService:t})=>"custom"!==e.getLayoutValue("dimensionAxis.axisDisplayMode")?Math.min(200,t.meta.chart.size["horizontal"===t.meta.major.orientation?"height":"width"]/4):void 0;function Id({models:e}){const{dockService:t,seriesModel:n,layoutService:r}=e,i=2===n.meta.measureAxes.length;if(i)return.5;const o=n.meta.measureAxes[0].isPrimary?t.meta.minor.dock:t.meta.minorSecondary.dock;if(!i){const e=n.meta.measureAxes[0].isPrimary?0:1;if("none"===r.getLayoutValue(`measureAxes.${e}.show`))return.5}return"horizontal"===t.meta.minor.orientation?"near"===o||"bottom"===o?1:0:"near"===o||"left"===o?0:1}const _d=({models:e,environment:t})=>{const{fieldModel:n,discreteModel:r,layoutService:i,dockService:o}=e,{orientation:a}=o.meta.major;return{data:{extract:{field:n.main.major,props:{selectionDimension:{field:n.main.major}}}},maxPxStep:Rd({layoutService:i,dockService:o}),invert:"horizontal"===a&&"rtl"===t.options.direction,range:r.query.getScaleRange,align:Id({models:e})}},Pd=({models:e,environment:t})=>{const{fieldModel:n,discreteModel:r,layoutService:i,dockService:o}=e,{orientation:a}=o.meta.major;return{type:"group-by-measure",data:{extract:{field:n.main.major}},measureCount:i.meta.groupSize,maxPxStep:Rd({layoutService:i,dockService:o}),invert:"horizontal"===a&&"rtl"===t.options.direction,range:r.query.getScaleRange,align:Id({models:e})}};function Ld({viewState:e,models:t,environment:n}){const{fieldModel:r,dockService:i}=t,{orientation:o}=i.meta.major;return{type:"linear",invert:"horizontal"===o&&"rtl"===n.options.direction,data:{extract:{field:r.main.majorNumeric}},ticks:{forceBounds:!0,count:e.get("zoom").min===e.get("zoom").max?1:void 0},minorTicks:{count:1},min:()=>e.get("zoom").min,max:()=>e.get("zoom").max}}function jd({viewCache:e,mainMajor:t}){return d(!0,{},t,{min:()=>e.get("continuousMin"),max:()=>e.get("continuousMax")})}function zd({viewState:e,viewCache:t,layoutService:n}){return t.set("qTimeAxisCache",[]),{get:(e,n=0)=>{const r=t.get("qTimeAxisCache");return r[n]&&r[n][0]===e?r[n][1]:void 0},set:(e,n,r=0)=>{t.get("qTimeAxisCache")[r]=[e,n]},key:({distance:r})=>{const{min:i,max:o}=e.get("zoom"),a=(o-i)/(t.get("continuousMax")-t.get("continuousMin")),s=n.getHyperCubeValue("qAxisData.qAxis",[]).map((e=>e.qName));return[r,Number.parseFloat(a).toFixed(12),...s].toString()}}}function Fd({picasso:e,viewState:t,viewCache:n,models:r,environment:i}){const{layoutService:o,fieldModel:a,appLayoutModel:s,themeService:l}=r,{measureText:u}=e.renderer("svg")(),{majorNumeric:c}=a.main,f=l.getStyles(),h={type:"time",data:{field:c},qAxis:()=>o.getHyperCubeValue("qAxisData.qAxis",[]),field:c,min:()=>t.get("zoom").min,max:()=>t.get("zoom").max,invert:"rtl"===i.options.direction,formatter:{fn:e.formatter("q-time"),localeInfo:s.qLocaleInfo,qNumFormat:o.getHyperCubeValue("qDimensionInfo.0",{}).qNumFormat,measureText:e=>u({text:e,fontFamily:f.axis.label.name.fontFamily,fontSize:f.axis.label.name.fontSize})},ticks:{generator:{type:"d3",initialMin:t.get("zoom").min},anchor:"start",clamp:!0},cache:zd({viewState:t,viewCache:n,layoutService:o})};return{[Vo.SCALE.MAJOR]:d(!0,{},h,{ticks:{level:"outer"}}),[Vo.SCALE.MAJOR_INNER]:d(!0,{},h,{ticks:{level:"inner"}})}}function Bd({picasso:e,models:t,viewState:n,viewCache:r,environment:i}){const{meta:o}=t.layoutService,a=o.isTime?{...Fd({picasso:e,viewState:n,viewCache:r,models:t,environment:i})}:o.isContinuous?{[Vo.SCALE.MAJOR]:Ld({models:t,viewState:n,environment:i})}:o.isBarSeriesGrouped?{[Vo.SCALE.MAJOR]:Pd({models:t,environment:i})}:{[Vo.SCALE.MAJOR]:o.isBarSeriesStackedInBothAxis?Pd({models:t,environment:i}):_d({models:t,environment:i})};return qd(t)?{...a,[Vo.SCALE.REDUCED]:jd({viewCache:r,mainMajor:a[Vo.SCALE.MAJOR]})}:a}function Vd({fields:e,tickModel:t,dockService:n,environment:r}){const i="rtl"===r.options.direction,{orientation:o}=n.meta.minor;return{data:{source:"qHyperCube",fields:e},invert:"vertical"===o||i,ticks:{values:t.query.getValues},min:t.query.getMin,max:t.query.getMax}}function Hd({layoutService:e,tickModel:t,dockService:n,environment:r}){if(!qd({layoutService:e}))return;const i="rtl"===r.options.direction,{orientation:o}=n.meta.minor;return{type:"linear",invert:"vertical"===o||i,min:t.query.getMin,max:t.query.getMax}}function $d({picasso:e,models:t,viewState:n,viewCache:r,environment:i}){const{layoutService:o,fieldModel:a,primaryTickModel:s,secondaryTickModel:l,colorService:u,dockService:c}=t;return{...Bd({picasso:e,models:t,viewState:n,viewCache:r,environment:i}),[Vo.SCALE.MINOR.PRIMARY]:Vd({fields:a.main.minorsPrimary,tickModel:s,dockService:c,environment:i}),[Vo.SCALE.MINOR.SECONDARY]:Vd({fields:a.main.minorsSecondary,tickModel:l,dockService:c,environment:i}),[Vo.SCALE.MINOR.REDUCED_PRIMARY]:Hd({layoutService:o,tickModel:s,dockService:c,environment:i}),[Vo.SCALE.MINOR.REDUCED_SECONDARY]:Hd({layoutService:o,tickModel:l,dockService:c,environment:i}),...u.custom.wrappedScales()}}var Ud={AXIS:{MAJOR:{HORIZONTAL:{width:"XSMALL",height:"SMALL"},VERTICAL:{width:"SMALL",height:"XSMALL"}},MINOR:"XSMALL"},AXIS_TITLE:{MAJOR:{HORIZONTAL:{width:"XSMALL",height:"MEDIUM"},VERTICAL:{width:"MEDIUM",height:"XSMALL"}},MINOR:"SMALL"},GRID_LINE:"XSMALL",VALUE_LABEL:"XSMALL",LABEL_SPACE:"XSMALL",OUT_OF_BOUNDS_MARKER:"XSMALL",REFERENCE_LINE:"SPARK"};const Wd=["all","labels"];function Yd({models:e}){const{layoutService:t,dockService:n,seriesModel:r,themeService:i}=e,o=t.getLayoutValue("measureAxes");if(!o||!o.length)return!1;const a=i.getStyles(),{measureAxes:s}=r.meta;return s.filter((e=>{const t=e.isPrimary?0:1;return Wd.some((e=>o[t].show===e))})).map((e=>({type:"axis",key:e.isPrimary?Vo.COMPONENT.AXIS.MINOR.PRIMARY:Vo.COMPONENT.AXIS.MINOR.SECONDARY,scale:e.scale,layout:{dock:e.isPrimary?n.meta.minor.dock:n.meta.minorSecondary.dock,minimumLayoutMode:Ud.AXIS.MINOR},settings:{labels:{show:!0,fontFamily:a.axis.label.name.fontFamily,fontSize:a.axis.label.name.fontSize,fill:a.axis.label.name.color},line:{stroke:a.axis.line.major.color},ticks:{stroke:a.axis.line.major.color},minorTicks:{stroke:a.axis.line.minor.color}}})))}var Xd=.5,Gd=3,Kd=13;function Jd({models:e,environment:t}){const{layoutService:n,dockService:r,themeService:i}=e,o="rtl"===t.options.direction,a=n.getLayoutValue("dimensionAxis"),s=i.getStyles(),l=(({layoutService:e})=>{const t=e.getHyperCubeValue("qDimensionInfo.0.qApprMaxGlyphCount"),[n]=e.getDataPages(),r=n?n.qMatrix:[];return A.getAdjustedMaxGlyphCount(t,r,0,"qText")})({layoutService:n}),{orientation:u}=r.meta.major,c="horizontal"===u?a.label:"auto";return{type:"axis",key:Vo.COMPONENT.AXIS.MAJOR,scale:Vo.SCALE.MAJOR,layout:{dock:r.meta.major.dock,minimumLayoutMode:Ud.AXIS.MAJOR[u.toUpperCase()]},settings:{labels:{mode:a.label,tiltAngle:o?-40:40,maxEdgeBleed:50,maxLengthPx:"horizontal"===c?void 0:r.meta.minor.size/4,maxGlyphCount:l,tiltThreshold:l>Gd&&l<Kd?1:void 0,fontFamily:s.axis.label.name.fontFamily,fontSize:s.axis.label.name.fontSize,fill:s.axis.label.name.color}},brush:{consume:[{context:"selection",style:{inactive:{opacity:Xd}}}]}}}function Zd({models:e}){const{dockService:t,themeService:n}=e,{orientation:r}=t.meta.major,i=n.getStyles();return{type:"axis",key:Vo.COMPONENT.AXIS.MAJOR_CONTINUOUS,scale:Vo.SCALE.MAJOR,layout:{dock:t.meta.major.dock,minimumLayoutMode:Ud.AXIS.MAJOR[r.toUpperCase()]},settings:{labels:{align:0,offset:4,fontFamily:i.axis.label.name.fontFamily,fontSize:i.axis.label.name.fontSize,fill:i.axis.label.name.color},line:{show:!1}}}}function Qd({models:e,environment:t}){const{layoutService:n}=e,r=n.getLayoutValue("dimensionAxis");if(!r)return[];const{show:i}=r;return"none"===i||"title"===i?[]:n.meta.isTime?function({models:e,environment:t}){const{dockService:n,themeService:r}=e,i="rtl"===t.options.direction,{orientation:o}=n.meta.major,a="bottom"===n.meta.major.dock?0:1,s=r.getStyles(),l=i?1:0,u={type:"time-axis",renderer:"svg",layout:{dock:n.meta.major.dock,minimumLayoutMode:Ud.AXIS.MAJOR[o]},preferredSize:()=>({size:2*parseFloat(s.axis.label.name.fontSize),edgeBleed:{left:1,right:1}}),settings:{anchor:i?"end":"start",label:{align:a,justify:l},guideLine:{major:{justify:l},minor:{align:a}},line:{show:!1}},style:{label:{fontFamily:s.axis.label.name.fontFamily,fontSize:s.axis.label.name.fontSize,fill:s.axis.label.name.color},majorGuideLine:{stroke:s.axis.line.major.color},minorGuideLine:{stroke:s.axis.line.minor.color}}};return[d(!0,{},u,{key:Vo.COMPONENT.AXIS.TIME_INNER,scale:Vo.SCALE.MAJOR_INNER,settings:{guideLine:{minor:{show:!0}}},style:{majorGuideLine:{stroke:s.axis.line.minor.color},minorGuideLine:{stroke:s.axis.line.major.color}}}),d(!0,{},u,{key:Vo.COMPONENT.AXIS.TIME_OUTER,scale:Vo.SCALE.MAJOR,settings:{guideLine:{minor:{show:!1}}}})]}({models:e,environment:t}):n.meta.isContinuous?[Zd({models:e})]:[Jd({models:e,environment:t})]}const ef=({layoutService:e,axis:t})=>e.meta.isBarSeriesGrouped?({scale:e,datum:t})=>e([t.value,t.typeIndex.value])+e.bandwidth()/2:e.meta.isBarSeriesStackedInBothAxis?({scale:e,datum:n})=>e([n.value,t])+e.bandwidth()/2:null,tf=({layoutService:e,seriesModel:t,rtl:n,orientation:r})=>e.meta.isContinuous?null:e.meta.isBarSeriesGrouped?({scale:e,datum:i})=>e([i.value,n&&"horizontal"===r?t.meta.barSeriesCount-1:0])+e.bandwidth()*t.meta.barSeriesCount/2:e.meta.isBarSeriesStackedInBothAxis?({scale:e,datum:t})=>e([t.value,n&&"horizontal"===r?1:0])+e.bandwidth():null;function nf({layoutService:e,active:t={},inactive:n={}}){return{consume:[{context:"selection",data:["selectionDimension","end","color","major"],style:{active:{strokeWidth:e.meta.isContinuous?0:2,stroke:"#000",opacity:e=>{var t,n;return!0===(null===(t=e.data)||void 0===t||null===(n=t.null)||void 0===n?void 0:n.value)?0:1},...t},inactive:{opacity:e=>{var t,n;return!0===(null===(t=e.data)||void 0===t||null===(n=t.null)||void 0===n?void 0:n.value)?0:Xd},...n}}}]}}var rf="max",of="min";function af(e,t){return function(e,t){const{hasExplicitMax:n}=t.meta,{max:r}=t.explicit;return!!n&&e>r}(e,t)||function(e,t){const{hasExplicitMin:n}=t.meta,{min:r}=t.explicit;return!!n&&e<r}(e,t)}const sf=(e,t)=>`${e}-${t.id}`,lf=4,uf=12,cf=4;function df({chart:e,layoutService:t,dockService:n,markerKey:r,markerType:i}){if(t.meta.isContinuous)return()=>cf+"px";const o={size:void 0},a="horizontal"===n.meta.major.orientation?"width":"height";return t=>{if(!o.size){const n=e.component(r),s=t.resources.scale(Vo.SCALE.MAJOR),l=n.rect[a]*s.bandwidth()*.25,u=Math.max(lf,Math.min(uf,l));o.size=("bar"===i?2*u:u)+"px"}return o.size}}const{isDark:ff}=De;const hf=({chart:e,models:t,series:n,environment:r})=>{const{layoutService:i,seriesModel:o,colorService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:u}=t,c=a.getColor(),{fill:d,marker:f}=n.options,{isContinuous:h}=i.meta,p="rtl"===r.options.direction,{orientation:m}=s.meta.major,y="horizontal"===m,g=(n.isPrimary?l:u).query.getExtrema(),v=({end:e})=>{const{value:t}=e;return af(t,g)},b=sf(Vo.COMPONENT.MARKER,n);return{type:"point",key:b,data:{filter:e=>n.ref===e.end.source.field,collection:n.collection},settings:{[y?"x":"y"]:{scale:Vo.SCALE.MAJOR,fn:tf({layoutService:i,seriesModel:o,rtl:p,orientation:m}),ref:h?"major":void 0},[y?"y":"x"]:{scale:n.scale,ref:"end",fn:e=>{var t;const n=!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)?e.scale.min():e.datum.end.value;return function(e){return Math.min(Math.max(0,e),1)}(e.scale(n))}},fill:d?c:"none",opacity:e=>{var t;return!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)||v(e.datum)?0:1},stroke:e=>{const t=c(e);return d?ff(t)?function(e){return ae(e).brighter(.5).toString()}(t):function(e){return ae(e).darker().toString()}(t):t},size:df({chart:e,layoutService:i,dockService:s,markerKey:b,markerType:f}),shape:()=>(({marker:e,horizontal:t,rtl:n})=>{let r;return"triangle"!==e||t||(r=n?"left":"right"),"bar"===e&&(r=t?"horizontal":"vertical"),r?{type:e,direction:r}:{type:e}})({marker:f,horizontal:y,rtl:p})},brush:nf({layoutService:i,active:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||v(e.data)?0:1}},inactive:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||v(e.data)?0:Xd}}})}};function pf({property:e="end",isHorizontal:t,isColor:n,fallback:r,rtl:i}){return function(o){const{datum:a,resources:{scale:s}}=o,l=s(Vo.SCALE.MAJOR),u=s(Vo.SCALE.COLOR),c=t&&i?[...a.points].reverse():a.points,d=c.reduce(((t,n,r)=>{const i="NaN"===n[e].value||Number.isNaN(n[e].value),o=c[r+1],a=o&&"NaN"!==o[e].value&&!Number.isNaN(o[e].value);return i?t.length&&a&&t.push(n):t.push(n),t}),[]),f="group-by-measure"===l.type?e=>l([e.major.value,e.typeIndex.value]):e=>l(e.major.value),h=d.map(f),p=Math.min(...h),m=Math.max(...h)-p,y=0===m?1:m,g=h.map(((e,t)=>0===t?0:t===h.length-1?1:(e-p)/y)),v=[];for(let t=0;t<d.length;t++){const i=d[t],o=i.color&&i.color.value,a=n?o||r:u(o)||r,s=0===t,l=t===d.length-1,c=g[t];if("NaN"===i[e].value||Number.isNaN(i[e].value))v[t-1].virtual||v.push({virtual:!0});else{const n=d[t-1];n&&"NaN"!==n[e].value&&!Number.isNaN(n[e].value)?v.push({color:a,offset:s?0:Math.max(0,parseFloat((c-(c-g[t-1])/2).toFixed(5)))}):v.push({color:a,offset:c});const r=d[t+1];r&&"NaN"!==r[e].value&&!Number.isNaN(r[e].value)?v.push({color:a,offset:l?1:Math.max(0,parseFloat((c+(g[t+1]-c)/2).toFixed(5)))}):v.push({color:a,offset:c})}}const b=v.reduce(((e,t,n)=>{if(t.virtual){const t=v[n-1],r=v[n+1],i=t.offset+(r.offset-t.offset)/2;e.push({color:t.color,offset:i},{color:r.color,offset:i})}else e.push(t);return e}),[]);return{type:"gradient",x1:0,x2:t?1:0,y1:0,y2:t?0:1,stops:b}}}function mf({environment:e,models:t,measureIndex:n}){const{layoutService:r,colorService:i,dockService:o}=t,a="rtl"===e.options.direction,{hasMultipleMeasures:s}=r.meta,{mode:l,type:u,nil:c}=i.getSettingsForMeasure(n),d="horizontal"===o.meta.major.orientation;if(!l||"constant"===u)return i.getColor();if("measure"===l&&"categorical"===u)return i.getColor();const f=r.getHyperCubeValue(`qMeasureInfo.${n}.color`);if(null!=f&&f.on)return"byExpression"===f.mode?pf({isHorizontal:d,isColor:!0,fallback:c,rtl:a}):i.getColor();const h=r.getLayoutValue("color",{}),p=!h.auto&&"byExpression"===h.mode,m=!!h.colorExpression;if(p&&!m)return c;const y=!h.auto&&"byMeasure"===h.mode&&h.byMeasureDef&&void 0!==h.byMeasureDef.activeMeasureIndex;return s||!y?pf({isHorizontal:d,isColor:"color"===u,fallback:c,rtl:a}):"continuous"===u?function({isHorizontal:e,rtl:t}){return function(n){const{datum:{points:r},resources:{scale:i}}=n,o=i(Vo.SCALE.COLOR),a=r.map((e=>e.end.value)).filter((e=>"NaN"!==e&&!Number.isNaN(e))),s=Math.min(...a),l=Math.max(...a),u=l-s,c=0===u?1:u,d=o.domain().map((e=>({color:o(Math.min(l,Math.max(s,e))),offset:Math.min(1,Math.max(0,(e-s)/c))})));return{type:"gradient",x1:!e&&t?1:0,x2:e||t?0:1,y1:e?1:0,y2:0,stops:d}}}({isHorizontal:d,rtl:a}):function({isHorizontal:e,isArea:t,fallback:n,rtl:r}){return function(i){const{datum:{points:o},resources:{scale:a}}=i,s=a(Vo.SCALE.COLOR),l=o.map((e=>e.end.value)).filter((e=>"NaN"!==e&&!Number.isNaN(e))),u=Math.min(...l),c=Math.max(...l),d=t?Math.min(0,u):u,f=(t?Math.max(0,c):c)-d,h=0===f?1:f,p=s.domain(),m=[];for(let e=0;e<p.length-1;e++){const t=p[e],r=s(t)||n;m.push({color:r,offset:Math.min(1,Math.max(0,(t-d)/h))});const i=p[e+1];m.push({color:r,offset:Math.min(1,Math.max(0,(i-d)/h))})}return{type:"gradient",x1:!e&&r?1:0,x2:e||r?0:1,y1:e?1:0,y2:0,stops:m}}}({isHorizontal:d,fallback:c,rtl:a})}const yf=({models:e,environment:t,series:n})=>{const{layoutService:r,seriesModel:i,dockService:o,styleModel:a}=e,s="rtl"===t.options.direction,{orientation:l}=o.meta.major,u=tf({layoutService:r,seriesModel:i,rtl:s,orientation:l});return{key:sf(Vo.COMPONENT.LINE,n),type:"line",data:{filter:e=>n.ref===e.end.source.field,collection:n.collection},settings:{coordinates:{major:{scale:Vo.SCALE.MAJOR,fn:u},minor:{scale:n.scale,ref:"end"}},layers:{curve:a.query.line.getCurveFn(),line:{stroke:mf({models:e,environment:t,measureIndex:n.refIndex}),strokeWidth:a.query.line.getStrokeWidthFn(),strokeDasharray:a.query.line.getStrokeDasharrayFn(),strokeLinejoin:"round"}},connect:n.options.showAsConnections,orientation:o.meta.major.orientation},brush:nf({layoutService:r,active:{stroke:void 0,strokeWidth:void 0,opacity:Xd},inactive:{opacity:Xd}})}};var gf={BAR:{STROKE:{COLOR:"#205891",WIDTH:{NONE:0,SMALL:1,MEDIUM:2,LARGE:4}}},LINE:{CURVE:{LINEAR:"linear",MONOTONE:"monotone",STEP:"step"},WIDTH:{FULL:{DEFAULT:2,ACTIVE:2},LESS:{DEFAULT:1,ACTIVE:1}},TYPE:{SOLID:void 0,DASHED:"5, 5"}},POINT:{SIZE:{DEFAULT:6,ACTIVE:4}}};function vf({series:e,layoutService:t}){const{showAsConnections:n}=e.options,r=function({layoutService:e}){const{isDiscrete:t}=e.meta;return({item:e})=>{if(e.dummy)return t;const{value:n}=e.end;return"NaN"===n||Number.isNaN(n)}}({layoutService:t}),i=n?(e,t)=>0!==e&&t.slice(0,e).reverse().some((e=>!r({item:e}))):(e,t)=>0!==e&&!r({item:t[e-1]}),o=n?(e,t)=>e!==t.length-1&&t.slice(e+1,t.length).some((e=>!r({item:e}))):(e,t)=>e!==t.length-1&&!r({item:t[e+1]});return({index:e,items:t})=>({before:i(e,t),after:o(e,t)})}const bf=3,xf=20;function Mf({models:e,series:t,environment:n}){const{layoutService:r,colorService:i,seriesModel:o,dockService:a,styleModel:s,primaryExtremumModel:l,secondaryExtremumModel:u,selectionService:c}=e,d=r.getLayoutValue("dataPoint.show",!1),{orientation:f}=a.meta.major,h="horizontal"===f,p="SPARK"===a.meta.chart.mode,m=i.getColor(),{POINT:y}=gf,g=function({layoutService:e,series:t}){const n={key:void 0,map:void 0},r=vf({series:t,layoutService:e});return({item:e,items:t})=>{n.key!==t&&(n.key=t,n.map=function({items:e}){return e.reduce(((e,t)=>{const{value:n}=t.line;return e[n]||(e[n]={items:[],keys:[]}),e[n].items.push(t),e[n].keys.push(`${t.major.value}-${t.line.value}`),e}),{})}({items:t}));const{value:i}=e.line,o=n.map[i],a=`${e.major.value}-${i}`,s=o.keys.indexOf(a),{before:l,after:u}=r({index:s,items:o.items});return!l&&!u}}({series:t,layoutService:r}),v="rtl"===n.options.direction,b=(t.isPrimary?l:u).query.getExtrema(),{isContinuous:x}=r.meta,M=({end:e})=>{const{value:t}=e;return af(t,b)};return{type:"point",key:sf(Vo.COMPONENT.POINT,t),data:{filter:e=>t.ref===e.end.source.field,collection:t.collection},preferredSize:()=>({edgeBleed:{top:h?y.SIZE.DEFAULT/2:0}}),settings:{[h?"y":"x"]:{scale:t.scale,ref:"end",fn:e=>{var t;const n=!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)?e.scale.min():e.datum.end.value;return function(e){return Math.min(Math.max(0,e),1)}(e.scale(n))}},[h?"x":"y"]:{scale:Vo.SCALE.MAJOR,fn:tf({layoutService:r,seriesModel:o,rtl:v,orientation:f}),ref:"major"},sizeLimits:{minPx:bf,maxPx:xf},size:e=>{const{value:t}=e.datum.line;return s.query.point.getSize(t)+"px"},fill:m,opacity:({datum:e,data:t})=>{var n;return null!==(n=e.null)&&void 0!==n&&n.value||M(e)?0:p?g({item:e,items:t.items})?1:0:d||g({item:e,items:t.items})?1:0}},brush:nf({layoutService:r,active:{r:e=>e.r+gf.POINT.SIZE.ACTIVE/2,strokeWidth:1.5,stroke:"#FFFFFF",opacity:e=>{var t;if(!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||M(e.data))return 0;if(!x||d)return 1;const{event:n,components:r=[]}=(null==c?void 0:c.getSelectionInfo())||{};if("continuousRange"===n)return 0;if("tap"!==n)return 1;return[Vo.COMPONENT.AXIS_OVERLAY.CONTINUOUS,Vo.COMPONENT.AXIS_OVERLAY.TIME_INNER,Vo.COMPONENT.AXIS_OVERLAY.TIME_OUTER].some((e=>r.indexOf(e)>=0))?0:1}},inactive:{opacity:e=>1===e.opacity?.5:0}})}}const Sf=(e,{dataset:t})=>{var n;if(null!==(n=e.null)&&void 0!==n&&n.value)return"-";const{value:r,label:i,source:o}=e.end,a=t(o.key).field(o.field);return a.raw().isCustomFormatted?i:a.formatter()(r)};function wf({chart:e,models:t,environment:n,series:r,lineSeries:i}){const{layoutService:o,dockService:a,themeService:s,primaryExtremumModel:l,secondaryExtremumModel:u}=t,{id:c}=r,d="rtl"===n.options.direction,f=o.getLayoutValue("dataPoint");if(!f)return!1;if(!f.show||!f.showLineLabels)return!1;const h=(r.isPrimary?l:u).query.getExtrema(),p=s.getStyles();return{type:"point-label",key:`${Vo.COMPONENT.POINT_LABEL}-${c}`,layout:{displayOrder:2,minimumLayoutMode:Ud.VALUE_LABEL},settings:{orientation:a.meta.major.orientation,rtl:d,connect:r.options.showAsConnections,label:t=>Sf(t,e),pointValue:e=>e.end.value,majorValue:e=>e.value,target:{labelSpace:Vo.COMPONENT.LABEL_SPACE,point:`${Vo.COMPONENT.POINT}-${c}`,allPoints:i.map((e=>`${Vo.COMPONENT.POINT}-${e.id}`))},lineIndex:"typeIndex",showLabel:e=>!(({end:e})=>af(e.value,h))(e.data)},style:{fontFamily:p.label.value.fontFamily,fontSize:p.label.value.fontSize,fill:p.label.value.color}}}const Ef=({chart:e,dock:t})=>{let n=t;const r=e.component(`${Vo.COMPONENT.SLICED_HAT}-${rf}`),i=e.component(`${Vo.COMPONENT.SLICED_HAT}-${rf}-${$o.PRIMARY}`),o=e.component(`${Vo.COMPONENT.SLICED_HAT}-${rf}-${$o.SECONDARY}`);return r?n=`@${Vo.COMPONENT.SLICED_HAT}-${rf}`:i?n=`@${Vo.COMPONENT.SLICED_HAT}-${rf}-${$o.PRIMARY}`:o&&(n=`@${Vo.COMPONENT.SLICED_HAT}-${rf}-${$o.SECONDARY}`),n},kf=({dockPosition:e,orientation:t,rtl:n})=>{let r=1;return e!==`@${Vo.COMPONENT.SLICED_HAT}-${rf}`&&e!==`@${Vo.COMPONENT.SLICED_HAT}-${rf}-${$o.PRIMARY}`&&e!==`@${Vo.COMPONENT.SLICED_HAT}-${rf}-${$o.SECONDARY}`||!("horizontal"===t||"vertical"===t&&n)||(r=4),e!==`@${Vo.COMPONENT.SLICED_HAT}-${of}`&&e!==`@${Vo.COMPONENT.SLICED_HAT}-${of}-${$o.PRIMARY}`&&e!==`@${Vo.COMPONENT.SLICED_HAT}-${of}-${$o.SECONDARY}`||"vertical"!==t||n||(r=4),r};function Cf({chart:e,models:t,environment:n,lineSeries:r}){const{layoutService:i,dockService:o,primaryExtremumModel:a,secondaryExtremumModel:s}=t,l=i.getLayoutValue("dataPoint",{}),u="rtl"===n.options.direction;if(!r.length)return!1;if(!l.show||!l.showLineLabels)return!1;const c="horizontal"===o.meta.major.orientation,{show:d}=i.getLayoutValue("dimensionAxis",{});if("none"!==d){const{dock:e}=o.meta.major;if(c&&"top"===e)return!1;if(!c&&e===(u?"left":"right"))return!1}const f=u?"left":"right";return{type:"label-space",key:Vo.COMPONENT.LABEL_SPACE,layout:{minimumLayoutMode:Ud.LABEL_SPACE,dock:Ef({chart:e,dock:c?"top":f})},settings:{size:10},show:()=>{const t=e.component(`${Vo.COMPONENT.LINE}-${r[0].id}`);if(!t||!t.rect)return!1;const n=(c?17:34)/t.rect[c?"height":"width"],i=a.query.getExtrema(),o=e.scale(Vo.SCALE.MINOR.PRIMARY)(i.implicit.line.max),l=c||u?o:1-o,d=r.filter((e=>e.isPrimary)).length>0,f=s.query.getExtrema(),h=e.scale(Vo.SCALE.MINOR.SECONDARY)(f.implicit.line.max),p=c||u?h:1-h,m=r.filter((e=>!e.isPrimary)).length>0;return d&&l<n||m&&p<n}}}const Of={min:"Min",max:"Max"};function Tf(e,t,n){const{hasExplicitMax:r}=n.meta,{max:i}=n.explicit;return!!r&&Math.max(e,t)>i&&i<=Math.min(e,t)}function Af(e,t,n){const{hasExplicitMin:r}=n.meta,{min:i}=n.explicit;return!!r&&Math.min(e,t)<i&&i>=Math.max(e,t)}function Nf(e,t,n){return Tf(e,t,n)||Af(e,t,n)}function qf(e,t){const{hasExplicitMax:n}=t.meta,{max:r}=t.explicit;return!!n&&e>r&&r<=0}function Df(e,t){const{hasExplicitMin:n}=t.meta,{min:r}=t.explicit;return!!n&&e<r&&r>=0}function Rf(e,t){return qf(e,t)||Df(e,t)}function If({extrema:e,type:t}){return!(function({extrema:e,type:t}){return!e.meta["hasExplicit"+Of[t]]}({extrema:e,type:t})||function({extrema:e,type:t}){const n=t===rf?e.implicit.bar.max:e.implicit.bar.min,r=Number(n.toFixed(13));return t===rf?!qf(r,e):!Df(r,e)}({extrema:e,type:t}))}var _f=Object.freeze({__proto__:null,isSegmentMaxOutOfBounds:Tf,isSegmentMinOutOfBounds:Af,isSegmentOutOfBounds:Nf,isMaxOutOfBounds:qf,isMinOutOfBounds:Df,isOutOfBounds:Rf,shouldShowOob:If});const Pf={min:"Min",max:"Max"},Lf=({chart:e,models:t,markerSeries:n,lineSeries:r,barSeries:i,environment:o,type:a})=>{const{dockService:s,primaryExtremumModel:l,secondaryExtremumModel:u,primaryTickModel:c,secondaryTickModel:d,layoutService:f,seriesModel:h,themeService:p,fieldModel:m}=t,y="rtl"===o.options.direction,{dock:g,opposite:v,orientation:b}=s.meta.major,x=l.query.getExtrema(),M=u.query.getExtrema(),S=a===rf,{isBarSeriesGrouped:w}=f.meta,E=(({chart:e,type:t,opposite:n,dock:r})=>{let i=t===rf?n:r;const o=e.component(`${Vo.COMPONENT.SLICED_HAT}-${t}`),a=e.component(`${Vo.COMPONENT.SLICED_HAT}-${t}-${$o.PRIMARY}`),s=e.component(`${Vo.COMPONENT.SLICED_HAT}-${t}-${$o.SECONDARY}`),l=e.component(Vo.COMPONENT.LABEL_SPACE),u=e.component(`${Vo.COMPONENT.BAR_OOB}-${t}`),c=e.component(`${Vo.COMPONENT.BAR_OOB}-${t}-${$o.PRIMARY}`),d=e.component(`${Vo.COMPONENT.BAR_OOB}-${t}-${$o.SECONDARY}`);return o?i=`@${Vo.COMPONENT.SLICED_HAT}-${t}`:a?i=`@${Vo.COMPONENT.SLICED_HAT}-${t}-${$o.PRIMARY}`:s?i=`@${Vo.COMPONENT.SLICED_HAT}-${t}-${$o.SECONDARY}`:u||c||d?l&&t===rf?i="@"+Vo.COMPONENT.LABEL_SPACE:u?i=`@${Vo.COMPONENT.BAR_OOB}-${t}`:c?i=`@${Vo.COMPONENT.BAR_OOB}-${t}-${$o.PRIMARY}`:d&&(i=`@${Vo.COMPONENT.BAR_OOB}-${t}-${$o.SECONDARY}`):l&&t===rf&&(i="@"+Vo.COMPONENT.LABEL_SPACE),i})({chart:e,type:a,opposite:v,dock:g}),k=tf({layoutService:f,seriesModel:h,rtl:y,orientation:b}),C=r.concat(n);if(!C.length)return!1;const O=S?x.implicit.bar.max:x.implicit.bar.min,T=Number(O.toFixed(13));if(!w&&i.length&&_f[`is${Pf[a]}OutOfBounds`](T,x))return!1;if(!x.meta.hasExplicit&&!M.meta.hasExplicit)return!1;const A=S?"max":"min",N=Math[A](Number(x.implicit.line[A].toFixed(13)),Number(x.implicit.marker[A].toFixed(13))),q=Math[A](Number(M.implicit.line[A].toFixed(13)),Number(M.implicit.marker[A].toFixed(13))),D=C.filter((e=>e.isPrimary)),R=C.filter((e=>!e.isPrimary)),I=D.length>0,_=R.length>0,{major:P,majorNumeric:L}=m.main,j=e=>"NaN"!==e.qNum?e.qNum:0,z=f.meta.isContinuous?L:P;return{type:"data-out-of-bounds-marker",key:`${Vo.COMPONENT.DATA_OOB_MARKER}-${a}`,layout:{dock:E,minimumLayoutMode:Ud.OUT_OF_BOUNDS_MARKER},data:{extract:C.map((({ref:e,typeIndex:t,options:n})=>({field:P,value:f.meta.isContinuous?e=>e.qNum:void 0,props:{major:{field:z},end:{field:e,value:n.showAsZeros?j:void 0},typeIndex:t,null:{field:e,value:e=>"NaN"===e.qNum}}})))},settings:{type:a,primaryExtremum:S?()=>c.query.getMax():()=>c.query.getMin(),secondaryExtremum:S?()=>d.query.getMax():()=>d.query.getMin(),primarySeries:D,secondarySeries:R,orientation:b,rtl:y,major:{scale:Vo.SCALE.MAJOR,fn:k},markerOffset:kf({dockPosition:E,orientation:b,rtl:y})},brush:nf({layoutService:f}),show:()=>{if(S){if(I&&N>c.query.getMax())return!0;if(_&&q>d.query.getMax())return!0}if(!S){if(I&&N<c.query.getMin())return!0;if(_&&q<d.query.getMin())return!0}return!1},style:{fill:p.getStyles().outOfRange.color}}},jf={FULL:16,MEDIUM:14,SMALL:12,XSMALL:8,SPARK:4};function zf({chart:e,models:t,viewState:n,viewCache:r,axis:i}){const o=ml(),{dockService:a}=t;return({data:t})=>(({items:t})=>{const{rect:n}=e.component(`${Vo.COMPONENT.BAR}-${i}`)||{};return(!t.length||!n)&&2})(t)||(()=>{const{min:e,max:t}=n.get("zoom");return o.get([e,t])||o.empty()&&!1})()||(()=>{const e=jf[a.meta.chart.mode];return 0===Math.abs(r.get("continuousMax")-r.get("continuousMin"))&&e})()||(()=>{const{min:e,max:t}=n.get("zoom"),i=Math.abs(r.get("continuousMax")-r.get("continuousMin")),s=Math.abs(t-e),l=jf[a.meta.chart.mode],u=function(e,t,n){return e*(1-n)+t*n}(2,l,1-Math.min(s/i/.2,1));return o.set([e,t],Math.max(2,Math.min(l,u)))})()}const Ff=({isContinuous:e,isBarSeriesGrouped:t,styleModel:n,discreteModel:r,isBarSeriesStackedInBothAxis:i})=>e?1:n.query.bar.getHasStyling()?n.query.bar.getHasStrokeWidth()?function(){const e=n.query.bar.getStrokeWidth()/r.query.getItemSize(),t=n.query.bar.getWidthFn()(),i=t+e;return i>1?t-(i-1):t}:n.query.bar.getWidthFn():t||i?.9:.7;function Bf(e){return Math.min(Math.max(0,e),1)}const Vf=({chart:e,models:t,viewState:n,viewCache:r,isPrimary:i})=>{const{layoutService:o,dockService:a,colorService:s,seriesModel:l,styleModel:u,discreteModel:c,primaryExtremumModel:d,secondaryExtremumModel:f}=t,{isContinuous:h,isBarSeriesStacked:p,isBarSeriesGrouped:m,isBarSeriesStackedInBothAxis:y}=o.meta,g=e=>e.datum.start?e.datum.start.value:e.scale.min(),v=i?$o.PRIMARY:$o.SECONDARY,b=i?Vo.SCALE.MINOR.PRIMARY:Vo.SCALE.MINOR.SECONDARY;if(!(i?l.meta.primaryBarSeriesCount:l.meta.secondaryBarSeriesCount))return!1;const x=p?{scale:b,start:{ref:"start",fn:e=>{const t=g(e);return Bf(e.scale(t))}},end:{ref:"end",fn:e=>{const t=(e=>e.datum.end?e.datum.end.value:g(e))(e);return Bf(e.scale(t))}}}:{scale:b,start:{ref:"start",fn:e=>{const t=g(e);return Bf(e.scale(t))}},end:{ref:"end",fn:e=>{var t;const n=!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)?g(e):e.datum.end.value;return Bf(e.scale(n))}}},M=(i?d:f).query.getExtrema(),S=p?({start:e,end:t})=>Nf(e.value,t.value,M):({end:e})=>Rf(e.value,M);return{type:"box",key:`${Vo.COMPONENT.BAR}-${v}`,data:{filter:(()=>{if(p)return;const e=l.query.series(Ho.BAR).filter((e=>e.isPrimary===i)).map((e=>e.ref));return t=>e.some((e=>e===t.end.source.field))})(),collection:p?i?Vo.COLLECTION.STACKED_PRIMARY:Vo.COLLECTION.STACKED_SECONDARY:i?Vo.COLLECTION.PRIMARY:Vo.COLLECTION.SECONDARY},preferredSize:h?()=>({size:0,edgeBleed:{left:1,right:1}}):void 0,settings:{orientation:a.meta.minor.orientation,major:{scale:Vo.SCALE.MAJOR,fn:ef({layoutService:o,axis:v}),ref:h?{start:"major",end:"major"}:void 0},minor:x,box:{width:Ff({isContinuous:h,isBarSeriesGrouped:m,styleModel:u,discreteModel:c,isBarSeriesStackedInBothAxis:y}),minWidthPx:h?zf({chart:e,models:t,viewState:n,viewCache:r,axis:v}):void 0,fill:s.getColor(),strokeWidth:u.query.bar.getStrokeWidth(),stroke:u.query.bar.getStrokeColor(),minHeightPx:.3,opacity:e=>{var t,n;return!0===(null===(t=e.datum)||void 0===t||null===(n=t.null)||void 0===n?void 0:n.value)||S(e.datum)?0:1}},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},brush:nf({layoutService:o,active:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||S(e.data)?0:1}},inactive:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||S(e.data)?0:Xd}}})}},Hf=({chart:e,models:t,viewState:n,viewCache:r,isPrimary:i})=>{const{layoutService:o,dockService:a,colorService:s,seriesModel:l,styleModel:u,discreteModel:c}=t,{isBarSeriesStacked:d,isContinuous:f,isBarSeriesGrouped:h,isBarSeriesStackedInBothAxis:p}=o.meta,m=i?$o.PRIMARY:$o.SECONDARY,y=i?l.meta.primaryBarSeriesCount:l.meta.secondaryBarSeriesCount;if(!d||0===y)return!1;return{key:`${Vo.COMPONENT.STACK_BAR}-${m}`,type:"box",data:{collection:i?Vo.COLLECTION.STACKED_TOTAL_PRIMARY:Vo.COLLECTION.STACKED_TOTAL_SECONDARY},settings:{major:{scale:Vo.SCALE.MAJOR,fn:ef({layoutService:o,axis:m}),ref:f?{start:"timeStart",end:"timeEnd"}:void 0},minor:{scale:i?Vo.SCALE.MINOR.PRIMARY:Vo.SCALE.MINOR.SECONDARY,start:{ref:"sumOfNegatives"},end:{ref:"sumOfPositives"}},orientation:a.meta.minor.orientation,box:{width:Ff({isContinuous:f,isBarSeriesGrouped:h,styleModel:u,discreteModel:c,isBarSeriesStackedInBothAxis:p}),minWidthPx:f?zf({chart:e,models:t,viewState:n,viewCache:r,axis:m}):2,opacity:0,fill:s.getColor()},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}}};function $f({style:e,simplifiedPlacement:t}){return n=>De.isDark(t.background?t.background.fill:n.node.attrs.fill)?e.lightColor:e.darkColor}function Uf(e,t){const n="horizontal"===e.dockService.meta.major.orientation;return{placements:t.simplifiedPlacements.map((e=>function({simplifiedPlacement:e,style:t,isHorizontal:n}){const r=e.padding||{left:n?0:4,right:n?0:4,top:n?4:0,bottom:n?4:0};return{position:e.position,justify:e.justify,fill:e.onBackground?t.color:$f({style:t,simplifiedPlacement:e}),overflow:e.overflow,background:e.background,padding:r}}({simplifiedPlacement:e,style:t.style,isHorizontal:n}))),label:t.label}}function Wf(e,t,n,r){const i=function(e,t){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)}(e,r);let o="up";return"vertical"===t&&i<0?o="down":"horizontal"===t&&(o=i>=0&&!n||i<0&&n?"right":"left"),o}const Yf=(e,t)=>{if(!e)return!1;const{isBarSeriesStacked:n,isContinuous:r}=t;return!n||!r},Xf=(e,t)=>{if(!e)return!1;const{isBarSeriesStacked:n,isContinuous:r}=t;return!!n&&(!!r||!1!==e)};function Gf(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}const Kf=({models:e,environment:t,isPrimary:n})=>{const{layoutService:r,seriesModel:i}=e,{meta:o}=r,a="rtl"===t.options.direction,s=e.themeService.getStyles(),l=e.layoutService.getLayoutValue("dataPoint.showBarLabels",!1),u=n?$o.PRIMARY:$o.SECONDARY;if(!(n?i.meta.primaryBarSeriesCount:i.meta.secondaryBarSeriesCount)||!Yf(l,o))return!1;let c;!o.isBarSeriesStacked&&(c=o.isBarSeriesStacked?1:0);const d={label:e=>Sf(e.data,e),simplifiedPlacements:Gf(c,0===c?1:0,o.isBarSeriesStacked?.5:1,o.isContinuous),style:s.label.value},f=[Uf(e,d)],h=[{component:`${Vo.COMPONENT.BAR}-${u}`,selector:"rect",strategy:{type:"bar",settings:{direction:t=>Wf(t.data.end.value,e.dockService.meta.minor.orientation,a,0),labels:f,fontSize:s.label.value.numFontSize,fontFamily:s.label.value.fontFamily}}}];return{type:"labels",key:`${Vo.COMPONENT.BAR_LABEL}-${u}`,layout:{minimumLayoutMode:Ud.VALUE_LABEL},settings:{sources:h}}};function Jf(e,t,n){const r=[{position:e,onBackground:!0,justify:0,overflow:n}];return t&&r.push({position:"inside",onBackground:!1,justify:"outside"===e?1:0,background:{fill:"#cce6e6e6",padding:{left:2,right:2,top:2,bottom:2}}}),r}function Zf({chart:e,models:t,environment:n,isPrimary:r}){const{meta:i}=t.layoutService,o="rtl"===n.options.direction,a=t.themeService.getStyles(),s=t.layoutService.getLayoutValue("dataPoint.showBarLabels",!1),l=r?$o.PRIMARY:$o.SECONDARY;if(0===(r?t.seriesModel.meta.primaryBarSeriesCount:t.seriesModel.meta.secondaryBarSeriesCount)||!Xf(s,i))return!1;const u=e.formatter(r?Vo.FORMATTER.PRIMARY:Vo.FORMATTER.SECONDARY)||(e=>e),c=e=>0===e?"":u(e),d={label:e=>c(e.data.sumOfPositives.value),simplifiedPlacements:Jf("outside",true,i.isContinuous),style:a.label.value},f={label:e=>c(e.data.sumOfNegatives.value),simplifiedPlacements:Jf("opposite",true,i.isContinuous),style:a.label.value},h=[Uf(t,d),Uf(t,f)];return{type:"labels",key:`${Vo.COMPONENT.STACK_BAR_LABEL}-${l}`,layout:{displayOrder:2,minimumLayoutMode:Ud.VALUE_LABEL},settings:{sources:[{component:`${Vo.COMPONENT.STACK_BAR}-${l}`,selector:"rect",strategy:{type:"bar",settings:{direction:e=>Wf(e.data.sumOfPositives.value,t.dockService.meta.minor.orientation,o),labels:h,fontSize:a.label.value.numFontSize,fontFamily:a.label.value.fontFamily}}}]}}}var Qf=Object.freeze({__proto__:null,hasMaxHat:function(e,t){const{hasExplicitMax:n}=t.meta,{max:r}=t.explicit;return!!n&&e>r&&r>0},hasMinHat:function(e,t){const{hasExplicitMin:n}=t.meta,{min:r}=t.explicit;return!!n&&e<r&&r<0}});const eh={min:"Min",max:"Max"};function th({chart:e,models:t,type:n,viewCache:r,viewState:i,isPrimary:o}){const{layoutService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:u,styleModel:c,discreteModel:f}=t,{isBarSeriesStacked:h,isContinuous:p,isBarSeriesGrouped:m,isBarSeriesStackedInBothAxis:y}=a.meta,g=h?Hf({chart:e,models:t,viewCache:r,viewState:i,isPrimary:o}):Vf({chart:e,models:t,viewCache:r,viewState:i,isPrimary:o}),v=o?l.query.getExtrema():u.query.getExtrema(),b=n===rf,x=o?$o.PRIMARY:$o.SECONDARY;if(!g)return!1;if(function(e,t){return!e.meta["hasExplicit"+eh[t]]}(v,n)||function(e,t,n){const r=n?e.implicit.bar.max:e.implicit.bar.min,i=Number(r.toFixed(13));return!Qf[`has${eh[t]}Hat`](i,e)}(v,n,b)||function(e,t,n){const r=n?e=>e<0:e=>e>0;return e.meta["hasExplicit"+eh[t]]&&r(e.explicit[t])}(v,n,b))return!1;let M="end";h&&(M=b?"sumOfPositives":"sumOfNegatives");const S=function(e){let t;return()=>(void 0===t&&(t=e()),t)}((()=>e.scale(o?Vo.SCALE.MINOR.PRIMARY:Vo.SCALE.MINOR.SECONDARY)[n]()));const w=(({chart:e,type:t,isPrimary:n,dock:r})=>{let i=r;const o=e.component(`${Vo.COMPONENT.SLICED_HAT}-${t}-${$o.PRIMARY}`),a=e.component(`${Vo.COMPONENT.SLICED_HAT}-${t}-${$o.SECONDARY}`);return o&&a&&(i=n?r:`@${Vo.COMPONENT.SLICED_HAT}-${t}-${$o.PRIMARY}`),i})({chart:e,type:n,isPrimary:o,dock:b?s.meta.minor.end:s.meta.minor.start});return{type:"box-sliced-hat",key:`${Vo.COMPONENT.SLICED_HAT}-${n}-${x}`,layout:{dock:w},data:g.data,settings:{orientation:g.settings.orientation,major:g.settings.major,minor:g.settings.minor,hat:d({},g.settings.box,{fill:h?"#999":g.settings.box.fill,alignment:1,opacity:1,show:function(e){const t=S(),n=function(e){if("number"!=typeof e)return e;const t=Math.round(e);return Math.abs(e-t)<1e-12?t:e}(e.datum[M].value);return b?n>t:n<t},width:Ff({isContinuous:p,isBarSeriesGrouped:m,styleModel:c,discreteModel:f,isBarSeriesStackedInBothAxis:y}),strokeWidth:c.query.bar.getStrokeWidth(),stroke:c.query.bar.getStrokeColor()})},brush:nf({layoutService:a})}}const nh={min:"Min",max:"Max"},rh={sumOfPositives:"sumOfNegatives",sumOfNegatives:"sumOfPositives"};function ih({chart:e,models:t,type:n,viewCache:r,viewState:i,isPrimary:o}){const{layoutService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:u,themeService:c}=t,{end:f,start:h}=s.meta.minor,{isBarSeriesStacked:p}=a.meta,m=p?Hf({chart:e,models:t,viewCache:r,viewState:i,isPrimary:o}):Vf({chart:e,models:t,viewCache:r,viewState:i,isPrimary:o}),y=o?l.query.getExtrema():u.query.getExtrema(),g=n===rf?y.implicit.bar.max:y.implicit.bar.min,v=Number(g.toFixed(13)),b=o?$o.PRIMARY:$o.SECONDARY;if(!m)return!1;if(!_f[`is${nh[n]}OutOfBounds`](v,y))return!1;const x=(({chart:e,type:t,end:n,start:r,isPrimary:i})=>{let o=t===rf?n:r;const a=e.component(Vo.COMPONENT.LABEL_SPACE),s=e.component(`${Vo.COMPONENT.SLICED_HAT}-${t}-${$o.PRIMARY}`),l=e.component(`${Vo.COMPONENT.SLICED_HAT}-${t}-${$o.SECONDARY}`),u=e.component(`${Vo.COMPONENT.BAR_OOB}-${t}-${$o.PRIMARY}`),c=e.component(`${Vo.COMPONENT.BAR_OOB}-${t}-${$o.SECONDARY}`);return s?o=`@${Vo.COMPONENT.SLICED_HAT}-${t}-${$o.PRIMARY}`:l?o=`@${Vo.COMPONENT.SLICED_HAT}-${t}-${$o.SECONDARY}`:u&&c&&!i?o=`@${Vo.COMPONENT.BAR_OOB}-${t}-${$o.PRIMARY}`:a&&t===rf&&(o="@"+Vo.COMPONENT.LABEL_SPACE),o})({chart:e,type:n,end:f,start:h,isPrimary:o});let M="end";p&&(M=n===rf?"sumOfPositives":"sumOfNegatives");return{type:"box-out-of-bounds",key:`${Vo.COMPONENT.BAR_OOB}-${n}-${b}`,layout:{dock:x},data:m.data,settings:{orientation:m.settings.orientation,major:m.settings.major,minor:m.settings.minor,dockValue:T.getDockValue(n===rf?f:h),oob:d({},m.settings.box,{fill:c.getStyles().outOfRange.color,alignment:1,opacity:1,show:function(e){var t;if(!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value))return!1;const r=p&&0===e.datum[M].value,i=_f[`is${nh[n]}OutOfBounds`](e.datum[M].value,y,n);return(!r||function({type:e,item:t,prop:n,extrema:r}){const i=t.datum[rh[n]].value;return 0!==i&&_f[`is${nh[e]}OutOfBounds`](i,r,e)}({type:n,item:e,prop:M,extrema:y}))&&i}})},brush:nf({layoutService:a})}}function oh(e){return Math.min(Math.max(0,e),1)}const ah=({chart:e,models:t,type:n,isPrimary:r})=>{const{discreteModel:i,styleModel:o,seriesModel:a,layoutService:s}=t;if(!(r?a.meta.primaryBarSeriesCount:a.meta.secondaryBarSeriesCount))return!1;const{isBarSeriesStacked:l,isContinuous:u,isBarSeriesGrouped:c,isBarSeriesStackedInBothAxis:d}=s.meta,f=e.scale(r?Vo.SCALE.MINOR.PRIMARY:Vo.SCALE.MINOR.SECONDARY),h=r?$o.PRIMARY:$o.SECONDARY,p=r?t.primaryExtremumModel.query.getExtrema():t.secondaryExtremumModel.query.getExtrema(),m=n===rf;if(!If({extrema:p,type:n}))return!1;const y=e=>e.datum.start?e.datum.start.value:e.scale.min(),g=(e,t="end")=>e.datum[t]?e.datum[t].value:y(e);return{type:"box",key:`${Vo.COMPONENT.GHOST_BAR_OOB}-${n}-${h}`,data:{filter:(()=>{if(l)return;const e=a.query.series(Ho.BAR).filter((e=>e.isPrimary===r)).map((e=>e.ref));return t=>e.some((e=>e===t.end.source.field))})(),collection:l?r?Vo.COLLECTION.STACKED_TOTAL_PRIMARY:Vo.COLLECTION.STACKED_TOTAL_SECONDARY:r?Vo.COLLECTION.PRIMARY:Vo.COLLECTION.SECONDARY},settings:{orientation:t.dockService.meta.minor.orientation,major:{scale:Vo.SCALE.MAJOR,fn:ef({layoutService:s,axis:h}),ref:u?{start:"major",end:"major"}:void 0},minor:{scale:r?Vo.SCALE.MINOR.PRIMARY:Vo.SCALE.MINOR.SECONDARY,start:{ref:"start",fn:e=>{const t=y(e);return oh(e.scale(t))}},end:l?"max"===n?{ref:"sumOfPositives",fn:e=>{const t=g(e,"sumOfPositives");return oh(e.scale(t))}}:{ref:"sumOfNegatives",fn:e=>{const t=g(e,"sumOfNegatives");return oh(e.scale(t))}}:{ref:"end",fn:e=>{const t=g(e);return oh(e.scale(t))}}},box:{width:Ff({isContinuous:u,isBarSeriesGrouped:c,styleModel:o,discreteModel:i,isBarSeriesStackedInBothAxis:d}),stroke:"transparent",fill:"none",opacity:0,show:e=>{let t="end";l&&(t=m?"sumOfPositives":"sumOfNegatives");const n=e.datum[t]?e.datum[t].value:f.max();return m?n>f.max():n<f.min()}},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}}};function sh(e,t,n,r,i){const o=[{position:e,justify:0,overflow:n,background:{padding:{left:1,right:1,top:1,bottom:1}}}];return t&&o.push({position:"inside",onBackground:!1,justify:r||i?0:1,background:{padding:{left:2,right:2,top:2,bottom:2}}}),o}const lh=({chart:e,models:t,type:n,environment:r,isPrimary:i})=>{const{layoutService:o,dockService:a,primaryExtremumModel:s,secondaryExtremumModel:l,themeService:u,seriesModel:c}=t,d=u.getStyles(),{meta:f}=o,{isBarSeriesStacked:h}=f,p=e.formatter(i?Vo.FORMATTER.PRIMARY:Vo.FORMATTER.SECONDARY),m=o.getLayoutValue("dataPoint.showBarLabels",!1),y="horizontal"===a.meta.major.orientation,g="rtl"===r.options.direction;if(!(i?c.meta.primaryBarSeriesCount:c.meta.secondaryBarSeriesCount)||!h&&!Yf(m,f)||h&&!Xf(m,f))return!1;const v=i?s.query.getExtrema():l.query.getExtrema();if(!v.meta.hasExplicit)return!1;const b=n===rf?v.implicit.bar.max:v.implicit.bar.min;if(!(n===rf?qf(b,v):Df(b,v)))return!1;let x=e=>Sf(e.data,e);f.isBarSeriesStacked&&(x=n===rf?function(e){var t;if(!0===(null===(t=e.data.null)||void 0===t?void 0:t.value))return"";if(qf(e.data.sumOfPositives.value,v)){const t=0===e.data.sumOfNegatives.value?e.data.sumOfPositives.value:e.data.sumOfNegatives.value;return p?p(t):t}return""}:function(e){var t;if(!0===(null===(t=e.data.null)||void 0===t?void 0:t.value))return"";if(Df(e.data.sumOfNegatives.value,v)){const t=0===e.data.sumOfPositives.value?e.data.sumOfNegatives.value:e.data.sumOfPositives.value;return p?p(t):t}return""});const M={label:x,simplifiedPlacements:sh("outside",true,f.isContinuous,y,g),style:d.label.value},S={label:x,simplifiedPlacements:sh("opposite",true,f.isContinuous,y,g),style:d.label.value},w=[Uf(t,M),Uf(t,S)],E=i?$o.PRIMARY:$o.SECONDARY,k="horizontal"===a.meta.major.orientation?"down":"right",C=[{component:`${Vo.COMPONENT.GHOST_BAR_OOB}-${n}-${E}`,selector:"rect",strategy:{type:"bar",settings:{direction:k,labels:w,fontSize:d.label.value.numFontSize,fontFamily:d.label.value.fontFamily}}}];return{key:`${Vo.COMPONENT.BAR_OOB_LABEL}-${n}-${E}`,type:"labels",layout:{minimumLayoutMode:Ud.VALUE_LABEL},settings:{sources:C}}},uh=({chart:e,models:t,viewState:n,viewCache:r})=>[Vf({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!0}),Vf({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!1})],ch=({chart:e,models:t,viewState:n,viewCache:r})=>[Hf({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!0}),Hf({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!1})],dh=({chart:e,models:t,environment:n})=>{const{isBarSeriesStacked:r}=t.layoutService.meta;if(r){return[Zf({chart:e,models:t,environment:n,isPrimary:!0}),Zf({chart:e,models:t,environment:n,isPrimary:!1})]}return[Kf({models:t,environment:n,isPrimary:!0}),Kf({models:t,environment:n,isPrimary:!1})]},fh=({chart:e,models:t,viewCache:n,viewState:r})=>[th({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!0}),th({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!0}),th({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!1}),th({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!1})],hh=({chart:e,models:t,viewCache:n,viewState:r})=>[ih({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!0}),ih({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!0}),ih({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!1}),ih({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!1})],ph=({chart:e,models:t})=>[ah({chart:e,models:t,type:"max",isPrimary:!0}),ah({chart:e,models:t,type:"min",isPrimary:!0}),ah({chart:e,models:t,type:"max",isPrimary:!1}),ah({chart:e,models:t,type:"min",isPrimary:!1})],mh=({chart:e,models:t,environment:n})=>[lh({chart:e,models:t,type:"max",environment:n,isPrimary:!0}),lh({chart:e,models:t,type:"min",environment:n,isPrimary:!0}),lh({chart:e,models:t,type:"max",environment:n,isPrimary:!1}),lh({chart:e,models:t,type:"min",environment:n,isPrimary:!1})],yh=({chart:e,environment:t,models:n,viewState:r,viewCache:i})=>{const{seriesModel:o}=n,a=o.query.series(Ho.BAR).slice(-1),s=o.query.series(Ho.LINE),l=o.query.series(Ho.MARKER);return[...uh({chart:e,models:n,viewState:r,viewCache:i}),...ch({chart:e,models:n,viewState:r,viewCache:i}),...s.map((e=>yf({models:n,environment:t,series:e}))),...s.map((e=>Mf({models:n,series:e,environment:t}))),...l.map((r=>hf({chart:e,models:n,series:r,environment:t}))),...s.map((r=>wf({chart:e,models:n,environment:t,series:r,lineSeries:s}))),...dh({chart:e,models:n,environment:t}),...fh({chart:e,models:n,viewCache:i,viewState:r}),...hh({chart:e,models:n,viewCache:i,viewState:r}),...ph({chart:e,models:n}),...mh({chart:e,models:n,environment:t}),Lf({chart:e,models:n,markerSeries:l,lineSeries:s,barSeries:a,environment:t,type:"max"}),Lf({chart:e,models:n,markerSeries:l,lineSeries:s,barSeries:a,environment:t,type:"min"}),Cf({chart:e,models:n,environment:t,lineSeries:s})]},gh=0,vh=1,bh=3;function xh({models:e}){const{dockService:t,seriesModel:n,layoutService:r,themeService:i}=e,{auto:o,spacing:a}=r.getLayoutValue("gridLine",{});if(!o&&a===gh)return!1;const s=i.getStyles(),l=n.meta.primarySeries.length>0;return{key:Vo.COMPONENT.GRID_LINE,type:"grid-line",layout:{minimumLayoutMode:Ud.GRID_LINE},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}),ticks:{show:!(!o&&a===vh)||((e,t)=>t%2==0),stroke:s.grid.line.major.color},minorTicks:{show:!o&&a===bh,stroke:s.grid.line.minor.color},["horizontal"===t.meta.major.orientation?"y":"x"]:l?Vo.SCALE.MINOR.PRIMARY:Vo.SCALE.MINOR.SECONDARY}}function Mh({models:e}){const{primaryExtremumModel:t,primaryTickModel:n,themeService:r,dockService:i,seriesModel:o}=e,a=t.query.getExtrema();return!!(o.meta.primarySeries.length>0&&a.meta.includesZero)&&{key:Vo.COMPONENT.ZERO_LINE,type:"ref-line",layout:{minimumLayoutMode:Ud.GRID_LINE},show:()=>n.query.getMin()<=0&&n.query.getMax()>=0,lines:{["horizontal"===i.meta.minor.orientation?"x":"y"]:[{value:0,scale:Vo.SCALE.MINOR.PRIMARY,line:{stroke:r.getStyles().grid.line.highContrast.color}}]}}}function Sh({models:e}){const{layoutService:t,themeService:n}=e,{isContinuous:r,isTime:i}=t.meta;if(!r)return[];const o=n.getStyles(),a={type:"grid-line",layout:{minimumLayoutMode:Ud.GRID_LINE},ticks:{stroke:o.grid.line.major.color},minorTicks:{show:!1,stroke:o.grid.line.minor.color}};return i?[d(!0,{},a,{key:"time-inner-grid",x:{scale:Vo.SCALE.MAJOR_INNER},ticks:{stroke:o.grid.line.minor.color}}),d(!0,{},a,{key:"time-outer-grid",x:{scale:Vo.SCALE.MAJOR}})]:[d(!0,{},a,{key:"continuous-grid",x:{scale:Vo.SCALE.MAJOR},minorTicks:{show:!0}})]}function wh({models:e}){return[xh({models:e}),Mh({models:e}),...Sh({models:e})]}function Eh({models:e,environment:t,actions:n}){const{layoutService:r,dockService:i,propertiesModel:o,appModel:a,genericObjectModel:s,themeService:l}=e,u=o.query.getProperties(),c=r.getLayoutValue("dimensionAxis");if(!c)return!1;const{show:d}=c;if("all"!==d&&"title"!==d)return!1;const{orientation:f}=i.meta.major,h=l.getStyles();return{type:"data-title",key:Vo.COMPONENT.AXIS_TITLE.MAJOR,layout:{dock:i.meta.major.dock,minimumLayoutMode:Ud.AXIS_TITLE.MAJOR[f.toUpperCase()]},settings:{hyperCube:r.getHyperCube(),hyperCubeDef:u&&u.qHyperCubeDef,isDimension:!0,disabled:()=>!n.interact.enabled(),model:s,app:a,translator:t.translator,rtl:"rtl"===t.options.direction,selections:void 0},style:{fontFamily:h.axis.title.fontFamily,fontSize:h.axis.title.fontSize,color:h.axis.title.color}}}const kh=(e,t,n)=>e.query.seriesByAxis(n).map((e=>({...t[e.refIndex],explicitColumn:e.refIndex})));function Ch({models:e,environment:t,actions:n}){const{layoutService:r,dockService:i,seriesModel:o,propertiesModel:a,appModel:s,genericObjectModel:l,themeService:u}=e,c=a.query.getProperties(),d=r.getLayoutValue("measureAxes");if(!d||!d.length)return!1;const f=u.getStyles(),{measureAxes:h}=o.meta;return h.filter((e=>e.isPrimary?"all"===d[0].show||"title"===d[0].show:"all"===d[1].show||"title"===d[1].show)).map((e=>{const a=r.getHyperCube(),{isPrimary:u}=e,d=o.query.seriesByAxis(u).length>1,h={type:"data-title",key:u?Vo.COMPONENT.AXIS_TITLE.MINOR.PRIMARY:Vo.COMPONENT.AXIS_TITLE.MINOR.SECONDARY,layout:{dock:u?i.meta.minor.dock:i.meta.minorSecondary.dock,minimumLayoutMode:Ud.AXIS_TITLE.MINOR},settings:{hyperCube:a,hyperCubeDef:c&&c.qHyperCubeDef,isDimension:!1,explicitItemInfos:kh(o,a.qMeasureInfo,u),onChangeToAlternative:({oldItem:e,newItem:t})=>{t.qDef.series=e.qDef.series;const n=e.qAttributeExpressions.findIndex((e=>"colorByExpression"===e.id));if(-1!==n){const r=e.qAttributeExpressions.splice(n,1)[0];t.qAttributeExpressions.unshift(r)}},disabled:()=>!n.interact.enabled(),model:l,app:s,translator:t.translator,rtl:"rtl"===t.options.direction,selections:void 0,skipAttributeExpressions:!0},style:{fontFamily:f.axis.title.fontFamily,fontSize:f.axis.title.fontSize,color:f.axis.title.color}};return d&&(h.settings.padding="0",h.settings.minWidth="auto"),h}))}function Oh({models:e,environment:t,actions:n}){return[Eh({models:e,environment:t,actions:n}),...Ch({models:e,environment:t,actions:n})]}function Th({models:e,environment:t,viewState:n,viewCache:r}){const{discreteModel:i,layoutService:o,dockService:a,continuousModel:s,themeService:l}=e,{isSnapshot:u,isDiscrete:c,isContinuous:d}=o.meta,f="rtl"===t.options.direction;return!(u&&!d)&&function({layoutService:e,dockService:t,discrete:n,continuousDataModel:r,viewState:i,viewCache:o,themeService:a,rtl:s,scrollbarOverride:l,visualizeCache:u=!1,deviceType:c}){const d=Qc({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:()=>Jc({layoutService:e,viewState:i,viewCache:o})}};d.bar&&(h.settings.style="slim",h.settings.size={area:"touch"===c?{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&&u&&(h.settings.injections=()=>[Kc({layoutService:e,discrete:n})]),h}({viewState:n,viewCache:r,discrete:i,continuousDataModel:s,layoutService:o,dockService:a,themeService:l,rtl:f,scrollbarOverride:{predicate:()=>c,value:Gc.OPTIONS.BAR.value},deviceType:t.deviceType})}function Ah({chart:e,models:t,viewState:n,viewCache:r,isPrimary:i}){const{layoutService:o}=t,a=Vf({chart:e,models:t,viewState:n,viewCache:r,isPrimary:i});if(!a)return!1;const s=i?$o.PRIMARY:$o.SECONDARY;return a.key=`${Vo.COMPONENT.MINI_CHART.BAR}-${s}`,a.data.collection=o.meta.isBarSeriesStacked?i?Vo.COLLECTION.REDUCED_STACKED_PRIMARY:Vo.COLLECTION.REDUCED_STACKED_SECONDARY:i?Vo.COLLECTION.REDUCED_PRIMARY:Vo.COLLECTION.REDUCED_SECONDARY,a.settings.box.minWidthPx=void 0,a.settings.minor.scale=i?Vo.SCALE.MINOR.REDUCED_PRIMARY:Vo.SCALE.MINOR.REDUCED_SECONDARY,a.settings.major.scale=Vo.SCALE.REDUCED,a.layout={dock:"@scrollbar"},a}function Nh({environment:e,models:t}){const n=t.styleModel.query.line.getStrokeDasharrayFn();return t.seriesModel.query.series(Ho.LINE).map((r=>{const i=yf({models:t,environment:e,series:r});return i.key=sf(Vo.COMPONENT.MINI_CHART.LINE,r),i.data.collection=Vo.COLLECTION.REDUCED,i.settings.coordinates.minor.scale=r.isPrimary?Vo.SCALE.MINOR.REDUCED_PRIMARY:Vo.SCALE.MINOR.REDUCED_SECONDARY,i.settings.coordinates.major.scale=Vo.SCALE.REDUCED,i.settings.layers.line.strokeWidth=1,i.settings.layers.line.strokeDasharray=(...e)=>void 0===n(...e)?void 0:"1, 1",i.layout={dock:"@scrollbar"},i}))}function qh({models:e,environment:t}){return e.seriesModel.query.series(Ho.MARKER).map((n=>{const r=hf({models:e,environment:t,series:n});return r.key=sf(Vo.COMPONENT.MINI_CHART.MARKER,n),r.data.collection=Vo.COLLECTION.REDUCED,r.settings.y.scale=n.isPrimary?Vo.SCALE.MINOR.REDUCED_PRIMARY:Vo.SCALE.MINOR.REDUCED_SECONDARY,r.settings.x.scale=Vo.SCALE.REDUCED,r.layout={dock:"@scrollbar"},r}))}function Dh({chart:e,models:t,viewState:n,viewCache:r,environment:i}){return qd(t)?[Ah({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!0}),Ah({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!1}),...Nh({environment:i,models:t}),...qh({models:t,environment:i})]:[]}function Rh({models:e,environment:t}){const{type:n}=e.colorService.getSettings();if("categorical"!==n)return!1;const r=D({key:Vo.COMPONENT.LEGEND_TOOLTIP,rtl:"rtl"===t.options.direction}),i=e.themeService.getStyles();return d(!0,r,{settings:{filter:e=>function({nodes:e}){return e.filter((e=>e.data&&e.key===Vo.COMPONENT.LEGEND_CATEGORICAL))}({nodes:e}),extract:e=>function({context:e}){return[[{content:e.node.data.label,style:{"font-weight":"bold","text-align":"left"},colspan:2}]]}({context:e}),placement:"pointer"},scale:Vo.SCALE.COLOR,style:{content:{fontFamily:i.fontFamily}}})}function Ih({colorSettings:e,nodes:t}){let n=t.filter((e=>e.data[Vo.SCALE.COLOR]&&(e=>e.data[Vo.SCALE.COLOR].value===e.data.end.value)(e)))[0];return n||(null!=e&&e.field&&([n]=t.filter((t=>{var n,r;return(null===(n=t.data[Vo.SCALE.COLOR])||void 0===n||null===(r=n.source)||void 0===r?void 0:r.field)===e.field}))),n||t[0])}const _h=({models:e,rtl:t})=>{const{detectTextDirection:n}=P,r=e.colorService.getSettings();return function({context:e,nodes:i}){const o=Ih({colorSettings:r,nodes:i}),a=function({colorSettings:e,context:t,node:n}){const{color:r}=n.data;if("color"===e.type||!r||!e.fieldType)return;const{value:i,label:o}=r,{key:a,field:s}=r.source,{dataset:l}=t.resources,u=l(a).field(s).formatter();if(u&&"measure"===e.fieldType)return Number.isNaN(i)?"-":u(r.value);const c=o||i;return Number.isNaN(c)||"NaN"===c?"-":c}({colorSettings:r,context:e,node:o});if(void 0===a)return!1;const s=function({colorSettings:e,context:t,node:n}){if(e.label)return e.label;const{color:r}=n.data;if("color"!==e.type&&r){const{dataset:e}=t.resources,{key:n,field:i}=r.source;return e(n).field(i).title()}}({colorSettings:r,context:e,node:o}),l=function({node:e}){const{data:t,attrs:n}=e;return t.fillColor?t.fillColor:n&&n.fill?n.fill:void 0}({node:o}),u=e.h("div",{style:{display:"inline-block",width:10,height:10,"background-color":l,margin:"0 8px"}});return{label:t?[":",s]:[s,":"],value:t?[a,u]:[u,a],labelDirection:n(s),valueDirection:n(a)}}};function Ph({chart:e,models:t,rtl:n,translator:r}){const{detectTextDirection:i}=P,{tooltipModel:o,layoutService:a}=t,s=_h({models:t,rtl:n}),l=function({rtl:e}){const{detectTextDirection:t}=P;return function({node:n,dataset:r}){var i,o;const{segment:a,end:s}=n.data,{value:l,label:u,source:c}=a||s,{key:d,field:f}=c,h=r(d).field(f),p=h.title();let m;return m=h.raw().isCustomFormatted?u:""===l||Number.isNaN(l)||!0===(null===(i=n.data)||void 0===i||null===(o=i.null)||void 0===o?void 0:o.value)?"-":h.formatter()(l),{label:e?[":",p]:[p,":"],value:m,labelDirection:t(p),valueDirection:t(l)}}}({rtl:n});return function({context:t}){const u=t.node.childrenNodes,{data:c}=u[0],{dataset:d}=t.resources,f=c.label,h=s({context:t,nodes:u}),p={dataId:c.value,title:{label:f,direction:i(f)},color:h},m=u.map((t=>l({chart:e,node:t,dataset:d}))).filter(((e,t,n)=>t===n.findIndex((t=>t.label[0]===e.label[0]&&t.value===e.value))));if(p.measures=h?m.filter((e=>e.label[0]!==h.label[0]||e.value!==h.value[1])):m,o.query.useCustomTooltip()){var y,g;const e=a.getLayout();e.tooltip.hideBasic&&(p.measures=[],p.color=void 0);const{customTooltipInfoAttrExpsArr:s,customTooltipAttrExpsArr:l}=la({nodes:[u[0]],layout:e,dataset:d});if([p.customTitle]=s.filter((e=>e.id===Wo.CUSTOM.TITLE)).map((e=>{const t=e;return t.direction=i(p.customTitle),t})),[p.customDescription]=s.filter((e=>e.id===Wo.CUSTOM.DESCRIPTION)).map((e=>{const t=e;return t.direction=i(p.customDescription),t})),p.customMeasures=l.map((e=>{const t=e;return t.label=n?[":",t.label]:[t.label,":"],t.value=""===t.value||"NaN"===t.value?"-":t.value,t.valueDirection=i(e.value),t.labelDirection=i(e.label),e})),null!==(y=(g=o.query).useTooltipChart)&&void 0!==y&&y.call(g))if(o.query.hasChartLimitation()){ea.destroyVisualization({customTooltipModel:o.query.getCustomTooltipModel()});const e=r.get("properties.tooltip.notselectedmessage");p.customLimitation=e}else{const n=ea.createContainer({ctx:t,layout:e});p.customChart=n}let c=[];u.forEach((e=>{var t,n;(null===(t=e.data)||void 0===t||null===(n=t.customTooltipImages)||void 0===n?void 0:n.length)>0&&!Array.isArray(e.data.customTooltipImages[0])&&(c=e.data.customTooltipImages)})),c.length>0&&(p.customImages=c)}return p}}function Lh(e){return(null==e?void 0:e.type)||Ho.BAR}const jh={circle:"circle",square:"rect",diamond:"path",triangle:"path",bar:"rect"},zh=[`${Vo.COMPONENT.BAR}-${$o.PRIMARY}`,`${Vo.COMPONENT.BAR}-${$o.SECONDARY}`];const Fh=({chart:e,seriesModel:t,value:n})=>{const r=function({value:e,chart:t,seriesModel:n}){const r=n.meta.allSeries,i=[];return r.forEach((n=>{const r=Lh(n);r===Ho.BAR?i.push(...t.findShapes("rect").filter((t=>-1!==zh.indexOf(t.key)&&t.data.typeIndex.value===n.typeIndex&&t.data.major.value===e))):r===Ho.LINE?i.push(...t.findShapes("circle").filter((t=>t.key===`${Vo.COMPONENT.POINT}-${n.id}`&&t.data.major.value===e))):i.push(...t.findShapes(jh[n.options.marker]).filter((t=>t.key===`${Vo.COMPONENT.MARKER}-${n.id}`&&t.data.major.value===e)))})),i}({chart:e,seriesModel:t,value:n});if(0===r.lenght)return null;return{bounds:Bo.combineBounds(r.map((e=>e.bounds))),data:r.map((e=>e.data)),childrenNodes:r,key:r[0].key}},Bh=[`${Vo.COMPONENT.BAR}-${$o.PRIMARY}`,`${Vo.COMPONENT.BAR}-${$o.SECONDARY}`,`${Vo.COMPONENT.BAR_OOB}-${rf}`,`${Vo.COMPONENT.BAR_OOB}-${of}`,`${Vo.COMPONENT.BAR_OOB}-${rf}-${$o.PRIMARY}`,`${Vo.COMPONENT.BAR_OOB}-${of}-${$o.PRIMARY}`,`${Vo.COMPONENT.BAR_OOB}-${rf}-${$o.SECONDARY}`,`${Vo.COMPONENT.BAR_OOB}-${of}-${$o.SECONDARY}`,`${Vo.COMPONENT.SLICED_HAT}-${rf}`,`${Vo.COMPONENT.SLICED_HAT}-${of}`,`${Vo.COMPONENT.SLICED_HAT}-${rf}-${$o.PRIMARY}`,`${Vo.COMPONENT.SLICED_HAT}-${of}-${$o.PRIMARY}`,`${Vo.COMPONENT.SLICED_HAT}-${rf}-${$o.SECONDARY}`,`${Vo.COMPONENT.SLICED_HAT}-${of}-${$o.SECONDARY}`,`${Vo.COMPONENT.DATA_OOB_MARKER}-${rf}`,`${Vo.COMPONENT.DATA_OOB_MARKER}-${of}`,Vo.COMPONENT.AXIS.MAJOR],Vh=({chart:e,models:t,nodes:n})=>{const{seriesModel:r}=t,{pointComponentKeys:i,markerComponentKeys:o}=r.meta,a=[...i,...o],s=[...Bh,...a];return n.length?(({chart:e,nodes:t,seriesModel:n})=>{const r=[],i=[];for(let o=0;o<t.length;++o){const{value:a}=t[o].data||{};if(void 0!==a&&-1===i.indexOf(a)){i.push(a);const t=Fh({chart:e,seriesModel:n,value:a});t&&r.push(t)}}return r})({chart:e,nodes:n.filter((e=>(({node:e})=>s.map((t=>-1!==e.key.indexOf(t))).some((e=>!0===e)))({node:e}))),seriesModel:r}):[]};function Hh({chart:e,models:t,environment:n}){const r=t.seriesModel.query.all(),i="rtl"===n.options.direction,{translator:o}=n,{appModel:a,tooltipModel:s,propertiesModel:l}=t,u=null==s?void 0:s.query.getCustomTooltipModel(),c=null==l?void 0:l.query.getProperties(),f=D({key:Vo.COMPONENT.TOOLTIP,rtl:i}),h=function({chart:e,models:t,rtl:n,translator:r}){const i=Ph({chart:e,models:t,rtl:n,translator:r});return function({context:e}){const t=i({context:e}),{dataId:r,title:o,color:a,measures:s,customTitle:l,customDescription:u,customMeasures:c,customImages:d,customChart:f,customLimitation:h}=t,p={dataId:r,title:[{content:o.label,style:{"font-weight":"bold","text-align":n?"right":"left",direction:o.direction},colspan:2}],color:void 0,measures:[]};return a&&(p.color=[{content:a.label,style:{"text-align":n?"right":"left",direction:a.labelDirection}},{content:a.value,style:{"text-align":n?"left":"right","vertical-align":"middle",direction:a.valueDirection}}]),p.measures=s.map((e=>[{content:e.label,style:{"text-align":n?"right":"left",direction:e.labelDirection}},{content:e.value,style:{"text-align":n?"left":"right","vertical-align":"middle",direction:e.valueDirection}}])),(l||u)&&0===c.length&&0===s.length&&(p.title=[]),l&&(p.customTitle=[{content:l.title,style:{"font-weight":"bold","text-align":n?"right":"left",direction:l.direction},colspan:2}]),u&&(p.customDescription=[{content:u.value,style:{"text-align":n?"right":"left",direction:u.direction},colspan:2}]),c&&(p.customMeasures=c.map((e=>[{content:e.label,style:{"text-align":n?"right":"left",direction:e.labelDirection}},{content:e.value,style:{"text-align":n?"left":"right","vertical-align":"middle",direction:e.valueDirection}}]))),f&&(p.customChart=f),h&&(p.customLimitation=ia.getFooterRow(h,e)),d&&(p.customImages=d.map((t=>ia.getImageRow(t,e)))),p}}({chart:e,models:t,rtl:i,translator:o,series:r});let p=[];return d(!0,f,{settings:{filter:n=>Vh({chart:e,models:t,nodes:n}),extract:e=>{var n,r,i;if(e&&(p=null!==(n=e.node)&&void 0!==n&&n.childrenNodes?[...e.node.childrenNodes]:[e.node],null!==(r=t.layoutService)&&void 0!==r&&null!==(i=r.meta)&&void 0!==i&&i.isContinuous)){const e=[];for(let t=0;t<p.length;t++){var o,a;null!==(o=p[t].data)&&void 0!==o&&null!==(a=o.selectionDimension)&&void 0!==a&&a.value&&(e[t]={data:{value:p[t].data.selectionDimension.value}})}p=e}return h({context:e})},content:({h:e,data:t,style:n})=>{const r=t,{visible:a,hidden:s}=function({sections:e}){const t={visible:[],hidden:[]};return e.reduce(((e,n)=>((e<7?t.visible:t.hidden).push(n),((e,t)=>{const n=void 0===t.color?0:1,{length:r}=t.measures;return e+1+n+r+(t.customLimitation||t.customChart||t.customImages&&t.customImages.length>0?7:0)})(e,n))),0),t}({sections:r}),l=a.reduce(((e,t)=>{const{title:n,color:r,measures:i,customTitle:o,customDescription:a,customMeasures:s,customImages:l,customChart:u,customLimitation:c}=t;return o&&e.push(o),a&&e.push(a),e.push(n),r&&e.push(r),e.push(...i),s&&e.push(...s),u&&e.push(u),c&&e.push(c),l&&e.push(...l),e}),[]);return s.length&&l.push(function({count:e,translator:t,rtl:n}){const{detectTextDirection:r}=P,i=t?t.get("Object.ChartTooltip.NMore",e):`+${e} more`;return[{content:i,style:{"font-weight":"bold","text-align":n?"right":"left",direction:r(i)},colspan:2}]}({count:s.length,rtl:i,translator:o})),l.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}))))},placement:"bounds",afterShow:()=>{s.query.useTooltipChart()&&s.query.useCustomTooltip()&&!s.query.hasChartLimitation()&&ea.show({app:a,properties:c,selectedNodes:p,customTooltipModel:u,rtl:i})}},style:{content:{fontFamily:t.themeService.getStyles().fontFamily}}})}function $h({chart:e,models:t,environment:n}){return[Rh({models:t,environment:n}),Hh({chart:e,models:t,environment:n})]}function Uh({models:e}){const{layoutService:t,dockService:n}=e,{isContinuous:r,isTime:i}=t.meta,o=t.getLayoutValue("dimensionAxis");if(!o||"none"===o.show||"title"===o.show)return[!1];if(!r)return[!1];const a=Ud.AXIS.MAJOR[n.meta.major.orientation.toUpperCase()];return i?[{type:"axis-overlay",key:Vo.COMPONENT.AXIS_OVERLAY.TIME_INNER,scale:Vo.SCALE.MAJOR_INNER,layout:{dock:"@"+Vo.COMPONENT.AXIS.TIME_INNER,minimumLayoutMode:a}},{type:"axis-overlay",key:Vo.COMPONENT.AXIS_OVERLAY.TIME_OUTER,scale:Vo.SCALE.MAJOR,layout:{dock:"@"+Vo.COMPONENT.AXIS.TIME_OUTER,minimumLayoutMode:a}}]:[{type:"axis-overlay",key:Vo.COMPONENT.AXIS_OVERLAY.CONTINUOUS,scale:Vo.SCALE.MAJOR,layout:{dock:"@"+Vo.COMPONENT.AXIS.MAJOR_CONTINUOUS,minimumLayoutMode:a}}]}function Wh({chart:e,models:t,environment:n}){const{refLineModel:r,layoutService:i,colorService:o,dockService:a,themeService:s,appLayoutModel:l,seriesModel:u}=t,c=l.qLocaleInfo,{options:d,theme:f}=n,h="rtl"===d.direction,p=u.query.series(Ho.BAR).filter((e=>e.isPrimary)),m=u.query.series(Ho.BAR).filter((e=>!e.isPrimary)),y=u.query.series(Ho.LINE),g=u.query.series(Ho.MARKER),v=u.query.all(),b=v.some((e=>e.isPrimary)),x=v.some((e=>!e.isPrimary)),M=b&&x,S={resolveUIColor:o.getPaletteColor},w=b?zo({refLineModel:r,layoutService:i,colorModel:S,dock:M?a.meta.minor.dock:a.meta.minor.opposite,scale:Vo.SCALE.MINOR.PRIMARY,style:s.getStyles(),formatter:Vo.FORMATTER.PRIMARY,theme:f,localeInfo:c,rtl:h,key:Vo.COMPONENT.PRIMARY_MEASURE_AXIS_REF_LINE_LABEL}):[],E=x?zo({refLineModel:r,layoutService:i,colorModel:S,dock:M?a.meta.minor.opposite:a.meta.minor.dock,scale:Vo.SCALE.MINOR.SECONDARY,style:s.getStyles(),formatter:Vo.FORMATTER.SECONDARY,theme:f,localeInfo:c,rtl:h,key:Vo.COMPONENT.SECONDARY_MEASURE_AXIS_REF_LINE_LABEL,path:"refLine.refLines2"}):[];return[!!b&&Lo({refLineModel:r,layoutService:i,colorModel:S,dockService:a,chart:e,scale:Vo.SCALE.MINOR.PRIMARY,axis:"horizontal"===a.meta.major.orientation?"y":"x",key:Vo.COMPONENT.PRIMARY_MEASURE_AXIS_REF_LINE,minimumLayoutMode:Ud.REFERENCE_LINE}),!!x&&Lo({refLineModel:r,layoutService:i,colorModel:S,dockService:a,chart:e,scale:Vo.SCALE.MINOR.SECONDARY,axis:"horizontal"===a.meta.major.orientation?"y":"x",key:Vo.COMPONENT.SECONDARY_MEASURE_AXIS_REF_LINE,path:"refLine.refLines2",minimumLayoutMode:Ud.REFERENCE_LINE}),Lo({isDimension:!0,refLineModel:r,layoutService:i,colorModel:S,dockService:a,chart:e,scale:Vo.SCALE.MAJOR,axis:"horizontal"===a.meta.major.orientation?"x":"y",rtl:h,key:Vo.COMPONENT.DIMENSION_REF_LINE,mainComponentKey:p.length?`${Vo.COMPONENT.BAR}-${$o.PRIMARY}`:m.length?`${Vo.COMPONENT.BAR}-${$o.SECONDARY}`:y.length?`${Vo.COMPONENT.LINE}-${y[0].id}`:g.length?`${Vo.COMPONENT.MARKER}-${g[0].id}`:`${Vo.COMPONENT.BAR}-${$o.PRIMARY}`,minimumLayoutMode:Ud.REFERENCE_LINE}),...w,...E,...zo({isDimension:!0,refLineModel:r,layoutService:i,colorModel:S,dock:a.meta.major.opposite,scale:Vo.SCALE.MAJOR,style:s.getStyles(),theme:f,localeInfo:c,rtl:h,key:Vo.COMPONENT.DIMENSION_REF_LINE_LABEL})]}function Yh(e){return"NaN"===e.qMin&&"NaN"===e.qMax}var Xh=[{key:"NoDataExist",alignment:"center",condition:({layoutService:e})=>{const{x:t,y:n}=e.meta.size;return t*n==0}},{key:"OnlyNanData",alignment:"center",condition:({layoutService:e})=>{const{isContinuous:t}=e.meta;if(!t)return!1;const n=e.getHyperCubeValue("qDimensionInfo.0");return n&&(n.qMax<n.qMin||"NaN"===n.qMax)}},{key:"OnlyNanData",alignment:"center",condition:({layoutService:e})=>e.getHyperCubeValue("qMeasureInfo").every(Yh)},{key:"DataRangeIncludingZero",alignment:"bottom",condition:({layoutService:e,primaryExtremumModel:t,secondaryExtremumModel:n,flags:r})=>{if(!1===e.getLayout().showDisclaimer&&r.isEnabled("SHOW_DISCLAIMER"))return!1;const i=e.getLayoutValue("measureAxis.logarithmic",!1),o=t.query.getExtrema(),a=n.query.getExtrema();return i&&(o.meta.includesZero||a.meta.includesZero)}}];function Gh({environment:e,models:t}){const{flags:n,translator:r,options:i}=e,{layoutService:o,primaryExtremumModel:a,secondaryExtremumModel:s}=t,l=function({layoutService:e,primaryExtremumModel:t,secondaryExtremumModel:n,flags:r}){let i,o;for(let a=0,s=Xh.length;a<s;a++){i=Xh[a];try{o=i.condition({layoutService:e,primaryExtremumModel:t,secondaryExtremumModel:n,flags:r})}catch(e){throw Error("failing disclaimer condition",e)}if(o)return i}return!1}({layoutService:o,primaryExtremumModel:a,secondaryExtremumModel:s,flags:n});if(!l)return!1;return function(e,t,n){if(!e)return!1;const{translator:r}=t,{rtl:i}=n;return{key:"disclaimer",type:"disclaimer",layout:{dock:p[e].alignment},settings:{label:r.get("Object.Disclaimer."+e),rtl:i}}}(l.key,{translator:r},{rtl:"rtl"===i.direction})}function Kh({layoutService:e}){return!!qd({layoutService:e})&&{type:"range",key:"range-brush-highlighter",layout:{dock:"@scrollbar"},settings:{scale:Vo.SCALE.REDUCED,brush:"selection",fill:"#6CB33F",opacity:.2}}}function Jh({models:e,environment:t}){const{layoutService:n,colorService:r,dockService:i,seriesModel:o,selectionService:a}=e,{hasLineSeries:s,isContinuous:l,hasMultipleMeasures:u,isGroupedByMeasure:c}=n.meta;if(!s)return!1;const{options:d}=t,f=n.getLayoutValue("color",{}),h=e=>e.filter((e=>Lh(e)===Ho.LINE)).map((e=>({key:sf(Vo.COMPONENT.LINE,e),typeIndex:e.typeIndex}))),p=!f.auto&&"byMeasure"===f.mode&&f.byMeasureDef&&void 0!==f.byMeasureDef.activeMeasureIndex,m=n.getHyperCubeValue("qMeasureInfo").map((e=>{var t;return null===(t=e.color)||void 0===t?void 0:t.on}));return{type:"brush-highlighter",key:"brush-highlighter",data:{collection:Vo.COLLECTION.LINE},settings:{getSelectionInfo:()=>{var e;return(null==a||null===(e=a.getSelectionInfo)||void 0===e?void 0:e.call(a))||{}},seriesInfo:{primary:h(o.meta.primarySeries),secondary:h(o.meta.secondarySeries)},selectionValues:{"qHyperCube/qDimensionInfo/0":l?e=>e.value:e=>e.major.value,"qHyperCube/qDimensionInfo/0:numeric":e=>e.major.value,"qHyperCube/qDimensionInfo/0/qAttrExprInfo/0":e=>e.end.value,"qHyperCube/qMeasureInfo/X":e=>e.end.value},colorSettings:e=>r.getSettingsForMeasure(e),colorByData:e=>!m[e]&&p,hasMultipleMeasures:u,groupedByMeasure:c,itemsPerGroup:o.meta.barSeriesCount,orientation:i.meta.major.orientation,rtl:"rtl"===d.direction}}}function Zh({models:{fieldModel:e}}){return{[Vo.FORMATTER.PRIMARY]:{data:{fields:e.main.minorsPrimary}},[Vo.FORMATTER.SECONDARY]:{data:{fields:e.main.minorsSecondary}}}}const Qh=2e3;function ep({model:e,layoutService:t,definitionPath:n="/qHyperCubeDef"}){return{fetch(t,r){const i={qStart:t,qEnd:r,qNbrPoints:this.computeNbrOfBins(),qMaxNbrTicks:300,qMaxNumberLines:this.computeMaxNumberLines()};return e.getHyperCubeContinuousData(n,i,!1)},shouldFetchReduced(){const{qHyperCube:e}=t.getLayout();return e.qSize.qcy*e.qMeasureInfo.length>=Qh},computeNbrOfBins(){const{qHyperCube:e}=t.getLayout();if(!this.shouldFetchReduced())return Qh;let n=e.qMeasureInfo.length||1,r=4+2*(n-1);return e.qDimensionInfo.length>1&&(n=Math.max(1,Math.min(12,t.meta.size.dimensions[1])),r=4),Math.ceil(Qh/(n*r))},computeMaxNumberLines(){const{qHyperCube:e}=t.getLayout();return e.qDimensionInfo.length>1&&!this.shouldFetchReduced()?t.meta.size.dimensions[1]+1:12}}}function tp(e={}){const{cache:t={}}=e;return{fetch:()=>Promise.resolve(t.merged)}}function np({layoutService:e,viewCache:t}){return{fetch:()=>{const{qAxisData:t,qDataPages:n}=e.getHyperCube();return Promise.resolve({qAxisData:t,qDataPages:n})},getSnapshotData(){const n=e.getLayoutValue("snapshotData.content.chartData",{});return"zoom"in n&&"min"in n.zoom&&"max"in n.zoom?function({zoom:e}){return{zoom:e}}(n):function({scrollOffset:e=0,viewRange:t=0},n){let r=n+e,i=r+t;return 1===t&&0===e&&(r=n-.5,i=n+.5),{zoom:{min:r,max:i}}}(n,t.get("continuousMin"))}}}function rp(){const e=()=>{},t=[],n={};return e.set=(e,r)=>{const i=t.indexOf(e);i>-1&&t.splice(i,1),t.push(e),n[e]=r},e.forEach=e=>{t.forEach(((t,r)=>e(n[t],r)))},e.has=e=>e in n,e}function ip(e,t,n){return n[0]&&n[0][1]&&n[0][1].qElemNumber>-1?function({start:e,end:t,matrix:n}){const r=[],i=rp(),o=rp();for(let a=0;a<n.length;a++){const s=n[a],l=s[1].qElemNumber.toString();s[0].qNum<e?i.set(l,s):s[0].qNum>t&&(o.has(l)||o.set(l,s)),s[0].qNum>=e&&s[0].qNum<=t&&r.push(s)}return i.forEach(((e,t)=>r.splice(t,0,e))),o.forEach((e=>r.push(e))),r}({start:e,end:t,matrix:n}):function({start:e,end:t,matrix:n}){const r=[];let i,o;for(let a=0;a<n.length;a++){const s=n[a];s[0].qNum<e?i=s:s[0].qNum>t&&(o||(o=s)),s[0].qNum>=e&&s[0].qNum<=t&&r.push(s)}return i&&r.unshift(i),o&&r.push(o),r}({start:e,end:t,matrix:n})}function op(e,t){return{...e,qWidth:t[0]?t[0].length:0,qHeight:t.length}}function ap(e,t,n){const r={qDataPages:(n.qDataPages||[]).map((n=>{const r=ip(e,t,n.qMatrix),i=op(n.qArea,r);return{...n,qArea:i,qMatrix:r}}))};return n.qAxisData&&n.qAxisData.qAxis&&(r.qAxisData=function(e,t,n){return{qAxis:n.qAxis.map((n=>({qName:n.qName,qTags:n.qTags,qTicks:n.qTicks.reduce(((n,r)=>((r.qStart>=e&&r.qStart<=t||r.qEnd>=e&&r.qEnd<=t||r.qStart<e&&r.qEnd>t)&&n.push(r),n)),[])})))}}(e,t,n.qAxisData)),r}const sp=2**.5,lp=1/sp;function up(e){return e.qIsOtherCell}function cp({qDataPages:e=[]}={},t={}){const n=e.length?e[0].qMatrix:[];return t.isStackedByDimension?function(e){const t={};return e.forEach((e=>{if(!e.some(up)){const n=e[0].qElemNumber;t[n]=void 0}})),Object.keys(t).length}(n):function(e){let t=0;return e.forEach((e=>{e.some(up)||t++})),t}(n)}const dp={command:{processDataPage:()=>{}}};var fp={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 hp(e,t=1){if(t%2==0)return e;let n=Math.round(e);return e-n>0?n+=.5:n-=.5,n}function pp(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:"",u=s(l);let{x:c,width:d}=r;e.start===e.end&&(d=u.width+2*i,1===e.end&&(c-=d));const f={x:c+i,y:i,width:d-2*i,height:t.height-2*i},h=s(l[0]+"…").width,p=Math.max(0,f.width-u.width),m=Math.max(0,f.height-u.height),y=o*p,g=a*m;return{show:f.width>=Math.min(h,u.width),text:l,dx:y,dy:g,rect:f,style:n.label,segment:{x:c+y,width:u.width+2*i}}}}}(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=hp(r.x+s,t.majorGuideLine.strokeWidth);return{show:n.value>=i&&n.value<=o,x1:l,y1:0,x2:l,y2:hp(e.height,t.majorGuideLine.strokeWidth),style:t.majorGuideLine}}}}(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&&(o=n.segment,a=i.segment,!(o.x<a.x?o.x+o.width>=a.x:a.x+a.width>=o.x))}var o,a}(e,a),a}function mp(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=hp(r.position*e.width,n.minorGuideLine.strokeWidth);return{guideLine:{show:!0,x1:o,y1:hp(i,n.minorGuideLine.strokeWidth),x2:o,y2:hp(t.guideLine.minor.size+i,n.minorGuideLine.strokeWidth),style:n.minorGuideLine}}}}}(t);return t.props.guideLine.minor.show?e.map(n.resolve):[]}function yp(e){return e.filter((e=>e.show)).map((e=>d({strokeWidth:1},e.style,{type:"line",x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2})))}var gp={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=hp(1,t.line.strokeWidth);return{show:n.line.show,x1:hp(0,t.line.strokeWidth),y1:r,x2:hp(e.width,t.line.strokeWidth),y2:r,style:t.line}}(this),this.state.major=pp(n,this),this.state.minor=mp(r,this)},render(){return[...yp([this.state.line]),...(e=this.state.major.map((e=>e.label)),e.filter((e=>e.show)).map((e=>d({},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"})))),...yp(this.state.major.map((e=>e.guideLine))),...yp(this.state.minor.map((e=>e.guideLine)))];var e}};function vp(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 bp(e){return e.qTags.indexOf("$qualified")>-1}function xp({qAxis:e}){const t=[],n=[];for(let r=0;r<e.length;r++){const i=r+1,o=e[r],a=e[i];vp(o,a)?(bp(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 Mp({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 u=e[l];if(u.queries.outer(n)){const e=t[l+1];if(i=u.index,r=l,u.attrs.isDayOrShorter()&&u.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 Sp({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 wp({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 Ep({qualified:e,nonQualified:t,qAxis:n,measureText:r,reqAutoFitWidth:i,scale:o},{attributesFactory:a=Sp,queryFactory:s=wp}={attributesFactory:Sp,queryFactory:wp}){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))),u=e.map((e=>l[e])),c=t.map((e=>l[e]));return{qAxisMeta:l,qualifiedMeta:u,nonQualifiedMeta:c}}function kp({qAxis:e=[],measureText:t=(()=>({width:0})),cache:n={},reqAutoFitWidth:r=0,scale:i},{metaFactory:o=Ep,mapper:a=xp,resolver:s=Mp}={metaFactory:Ep,mapper:xp,resolver:Mp}){const{qualified:l,nonQualified:u}=a({qAxis:e}),{qualifiedMeta:c,nonQualifiedMeta:d}=o({qAxis:e,qualified:l,nonQualified:u,measureText:t,reqAutoFitWidth:r,scale:i}),f=s({qualifiedMeta:c,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 Cp(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}const Op=Cp(0).getTime();function Tp(e){return(e.getTime()-Op)/86400/1e3}var Ap=new Date,Np=new Date;function qp(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 qp((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 Ap.setTime(+t),Np.setTime(+r),e(Ap),e(Np),Math.floor(n(Ap,Np))},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 Dp=36e5,Rp=qp((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()})),Ip=qp((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getUTCMinutes()})),_p=qp((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+t*Dp)}),(function(e,t){return(t-e)/Dp}),(function(e){return e.getUTCHours()})),Pp=qp((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/864e5}),(function(e){return e.getUTCDate()-1}));function Lp(e){return qp((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/6048e5}))}var jp=Lp(0);Lp(1),Lp(2),Lp(3),Lp(4),Lp(5),Lp(6);var zp=qp((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()})),Fp=qp((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()}));Fp.every=function(e){return isFinite(e=Math.floor(e))&&e>0?qp((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null};var Bp=Fp;const Vp=1,Hp=2,$p=3,Up=4,Wp=5,Yp=6;function Xp({timeScale:e,labels:t,distance:n,isDayOrShorter:r,cache:i,timeOnly:o,initialMin:a}){const[s,l]=e.domain(),u=i.key({distance:n});let c;i.get(u,1)?c=i.get(u,1):(c=function(e,t,n,r,i,o){function a(e){return Bp.filter((t=>(t.getUTCFullYear()-o.getUTCFullYear())%e==0))}const s=Rp.count(e,t),l=Ip.count(e,t),u=_p.count(e,t),c=Pp.count(e,t),d=jp.count(e,t),f=zp.count(e,t),h=Bp.count(e,t),p=n/r.second.width-1,m=n/r.minute.width-1,y=n/r.date.width-1,g=n/r.year.width-1,v={type:"year",desc:"year",count:h,interval:Bp.every(1),formatter:r.year.formatter,offset:e=>Bp.offset(e,-1),floor:Bp.floor};if(s<=p)v.type=Vp,v.desc="second",v.count=s,v.interval=Rp.every(1),v.formatter=r.second.formatter,v.offset=e=>Rp.offset(e,-1),v.floor=Rp.floor;else if(s/2<=p)v.type=Vp,v.desc="every other second",v.count=s/2,v.interval=Rp.every(2),v.formatter=r.second.formatter,v.offset=e=>Rp.offset(e,-2),v.floor=Rp.floor;else if(s/5<=p)v.type=Vp,v.desc="every 5 second",v.count=s/5,v.interval=Rp.every(5),v.formatter=r.second.formatter,v.offset=e=>Rp.offset(e,-5),v.floor=Rp.floor;else if(s/15<=p)v.type=Vp,v.desc="every 15 second",v.count=s/15,v.interval=Rp.every(15),v.formatter=r.second.formatter,v.offset=e=>Rp.offset(e,-15),v.floor=Rp.floor;else if(s/30<=p)v.type=Vp,v.desc="every 30 second",v.count=s/30,v.interval=Rp.every(30),v.formatter=r.second.formatter,v.offset=e=>Rp.offset(e,-30),v.floor=Rp.floor;else if(l<=m)v.type=Hp,v.desc="minute",v.count=l,v.interval=Ip.every(1),v.formatter=r.minute.formatter,v.offset=e=>Ip.offset(e,-1),v.floor=Ip.floor;else if(l/2<=m)v.type=Hp,v.desc="every 2 minute",v.count=l/2,v.interval=Ip.every(2),v.formatter=r.minute.formatter,v.offset=e=>Ip.offset(e,-2),v.floor=Ip.floor;else if(l/5<=m)v.type=Hp,v.desc="every 5 minute",v.count=l/5,v.interval=Ip.every(5),v.formatter=r.minute.formatter,v.offset=e=>Ip.offset(e,-5),v.floor=Ip.floor;else if(l/10<=m)v.type=Hp,v.desc="every 10 minute",v.count=l/10,v.interval=Ip.every(10),v.formatter=r.minute.formatter,v.offset=e=>Ip.offset(e,-10),v.floor=Ip.floor;else if(l/15<=m)v.type=Hp,v.desc="every 15 minute",v.count=l/15,v.interval=Ip.every(15),v.formatter=r.minute.formatter,v.offset=e=>Ip.offset(e,-15),v.floor=Ip.floor;else if(l/30<=m)v.type=Hp,v.desc="every 30 minute",v.count=l/30,v.interval=Ip.every(30),v.formatter=r.minute.formatter,v.offset=e=>Ip.offset(e,-30),v.floor=Ip.floor;else if(u<=m)v.type=$p,v.desc="hour",v.count=u,v.interval=_p.every(1),v.formatter=r.minute.formatter,v.offset=e=>_p.offset(e,-1),v.floor=_p.floor;else if(u/2<=m)v.type=$p,v.desc="every 2 hour",v.count=u/2,v.interval=_p.every(2),v.formatter=r.minute.formatter,v.offset=e=>_p.offset(e,-2),v.floor=_p.floor;else if(u/3<=m)v.type=$p,v.desc="every 3 hour",v.count=u/3,v.interval=_p.every(3),v.formatter=r.minute.formatter,v.offset=e=>_p.offset(e,-3),v.floor=_p.floor;else if(u/6<=m)v.type=$p,v.desc="every 6 hour",v.count=u/6,v.interval=_p.every(6),v.formatter=r.minute.formatter,v.offset=e=>_p.offset(e,-6),v.floor=_p.floor;else if(u/12<=m||i)v.type=$p,v.desc="every 12 hour",v.count=u/12,v.interval=_p.every(12),v.formatter=r.minute.formatter,v.offset=e=>_p.offset(e,-12),v.floor=_p.floor;else if(c<=y)v.type=Up,v.desc="day",v.count=c,v.interval=Pp.every(1),v.formatter=r.date.formatter,v.offset=e=>Pp.offset(e,-1),v.floor=Pp.floor;else if(c/2<=y)v.type=Up,v.desc="every 2 day",v.count=c/2,v.interval=Pp.every(2),v.formatter=r.date.formatter,v.offset=e=>Pp.offset(e,-2),v.floor=Pp.floor;else if(c/3<=y)v.type=Up,v.desc="every 3 day",v.count=c/3,v.interval=Pp.every(3),v.formatter=r.date.formatter,v.offset=e=>Pp.offset(e,-3),v.floor=Pp.floor;else if(d<=y)v.type=Up,v.desc="week",v.count=d,v.interval=jp.every(1),v.formatter=r.date.formatter,v.offset=e=>jp.offset(e,-1),v.floor=Pp.floor;else if(d/2<=y)v.type=Up,v.desc="every 2 week",v.count=d/2,v.interval=jp.every(2),v.formatter=r.date.formatter,v.offset=e=>jp.offset(e,-2),v.floor=Pp.floor;else if(f<=y)v.type=Wp,v.desc="month",v.count=f,v.interval=zp.every(1),v.formatter=r.date.formatter,v.offset=e=>zp.offset(e,-1),v.floor=Pp.floor;else if(f/3<=y)v.type=Wp,v.desc="quarter",v.count=f/3,v.interval=zp.every(3),v.formatter=r.date.formatter,v.offset=e=>zp.offset(e,-3),v.floor=Pp.floor;else if(f/6<=y)v.type=Wp,v.desc="half year",v.count=f/6,v.interval=zp.every(6),v.formatter=r.date.formatter,v.offset=e=>zp.offset(e,-6),v.floor=Pp.floor;else if(h<=g)v.type=Yp,v.desc="year",v.count=h,v.interval=Bp.every(1),v.formatter=r.year.formatter,v.offset=e=>Bp.offset(e,-1),v.floor=Bp.floor;else if(h/2<=g)v.type=Yp,v.desc="every 2 year",v.count=h/2,v.interval=a(2),v.formatter=r.year.formatter,v.offset=e=>Bp.offset(e,-2),v.floor=Bp.floor;else if(h/5<=g)v.type=Yp,v.desc="every 5 year",v.count=h/5,v.interval=a(5),v.formatter=r.year.formatter,v.offset=e=>Bp.offset(e,-5),v.floor=Bp.floor;else if(h/10<=g)v.type=Yp,v.desc="every 10 year",v.count=h/10,v.interval=a(10),v.formatter=r.year.formatter,v.offset=e=>Bp.offset(e,-10),v.floor=Bp.floor;else{const e=Math.floor(h/g);v.type=Yp,v.desc="every nth year",v.count=e,v.interval=a(e),v.formatter=r.year.formatter,v.offset=t=>Bp.offset(t,-e),v.floor=Bp.floor}return v}(s,l,n,t.all(),r,a),i.set(u,c,1));const d=e.ticks(c.interval);d.length?s.getTime()!==d[0].getTime()&&d.unshift(c.offset(d[0])):d.push(c.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:c.formatter}}));let h=[];if(!o&&c.type<=$p){const n=t.getFormat("date"),r=e.ticks(Pp.every(1));r.length&&s.getUTCDate()!==r[0].getUTCDate()&&r.unshift(Pp.offset(r[0],-1)),h=(r.length?r:[Pp.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 Gp=86400,Kp=1440,Jp={};function Zp(e,t,n,r){return{type:e,start:new Date(Date.UTC(...t)),end:new Date(Date.UTC(...n)),formatter:r}}function Qp(e,t,n){const{generator:r,anchor:i,clamp:o,level:a}=t.ticks,{qNumFormat:s}=t.formatter;e.clamp(o);const[l,u]=e.domain(),c=function(){return Be.apply(qi(or,ir,tr,Qn,Zn,Jn,$n,jn,cr).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}().domain([Cp(l),Cp(u)]);c.clamp(o),c.range(t.invert?[1,0]:[0,1]);const d="object"==typeof r?r:{type:r};let f;f="d3"===d.type?(e,i)=>Xp({timeScale:c,labels:n,distance:e,isDayOrShorter:i,cache:t.cache,timeOnly:"T"===s.qType,initialMin:void 0===d.initialMin?c.domain()[0]:Cp(r.initialMin)}):e=>function(e,t,n,r,i,o=!1){if(Jp[[t,n,r,r,o]])return Jp[[t,n,r,r,o]];const a={year:e.getFormat("year"),date:e.getFormat("date"),minute:e.getFormat("minute"),second:e.getFormat("second")},s=Cp(n),l=s.getFullYear(),u=s.getMonth(),c=s.getDate(),d=r-n,f=t/(i-r),h=f/1440,p=f/Gp,m=366*f,y=3*f*30,g=a.second.width/p,v=a.minute.width/h,b=a.date.width/y,x=a.year.width/m;let M,S,w,E=0,k=0,C=null,O=null,T=null,A=null,N=null,q=null;const D={outer:[],inner:[]};for(g<1?(C=1,k=1/Gp):g<2?(C=2,k=1/Gp*2):g<5?(C=5,k=1/Gp*5):g<10?(C=10,k=.00011574074074074073):g<30?(C=30,k=.0003472222222222222):v<1?(O=1,k=1/Kp):v<2?(O=2,k=1/Kp*2):v<5?(O=5,k=1/Kp*5):v<10?(O=10,k=.006944444444444445):v<30?(O=30,k=.020833333333333336):v<60?(T=1,k=1/24):v<120?(T=2,k=2/24):v<360?(T=6,k=.25):v<720?(T=12,k=.5):b<1/90?(k=1,A=1):b<2/90?(k=2,A=2):b<7/90?(k=7,A=7):b<31/90?(N=1,k=31):b<1?(N=3,k=90):x<1?(q=1,k=366):x<2?(q=2,k=732):x<5?(q=5,k=1826.25):(q=10,k=3652.5),S=Math.floor((d+n%1)/k);E<i;){w=S+1,M=q?Zp("year",[l+S*q,0,1],[l+w*q,0,1],a.year.formatter):N?Zp("month",[l,u+S*N,1],[l,u+w*N,1],a.date.formatter):A?Zp("day",[l,u,c+S*A],[l,u,c+w*A],a.date.formatter):T?Zp("hour",[l,u,c,0+S*T],[l,u,c,0+w*T],a.minute.formatter):O?Zp("minute",[l,u,c,0,0+S*O],[l,u,c,0,0+w*O],a.minute.formatter):Zp("second",[l,u,c,0,0,0+S*C],[l,u,c,0,0,0+w*C],a.second.formatter),E=Tp(M.start),D.inner.push(M);const e=Math.floor(E);if(!(o||q||N||A)){const t={type:"day",start:Cp(e),end:Cp(e+1),formatter:a.date.formatter,qStart:e};D.outer[D.outer.length-1]&&D.outer[D.outer.length-1].qStart===t.qStart||D.outer.push(t)}S++}return D.min=r,D.max=i,Jp[[t,n,r,r,o]]=D,D}(n,e,d.min,l,u,"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?Tp(t.start):"end"===i?Tp(t.end):(Tp(t.start)+Tp(t.end))/2,{position:c(t.start),start:c(t.start),end:c(t.end),value:n,label:t.formatter(n),isMinor:!1,data:{start:Tp(t.start),end:Tp(t.end),scaleStart:e.domain()[0]}}})).filter((e=>e.position>=0&&e.position<=1))};return h}const em=/t+/i;const tm={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 nm(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 rm="continuousPan";var im={model:function({model:e,layoutService:t,dataProcessorModel:n=dp,viewCache:r,viewState:i,definitionPath:o},a={}){const{engineFetcherFactory:s=ep,snapshotFetcherFactory:l=np,cacheFetcherFactory:u=tp,cache:c={initial:{},merged:{}}}=a,f=s({model:e,layoutService:t,definitionPath:o}),h=l({layoutService:t,viewCache:r}),p=u({cache:c}),m=e=>{throw e.isHandled=!0,e};let y,g,v;return{update(e){({initialMin:g,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])),r.set("continuousMin",g),r.set("continuousMax",v),r.set("minimiumZoomSpan",function(e,t){return Math.max(1e-6,2.3841857910156157e-7*(t-e))}(g,v)),y=t.meta.isSnapshot?h:f,t.meta.isSnapshot&&({zoom:{min:g,max:v}}=h.getSnapshotData()),i.preventSet("zoom",{min:g,max:v})},updateLayout(e){const{qDataPages:n,qAxisData:r}=e;return t.setHyperCubeValue("qDataPages",n),t.setHyperCubeValue("qAxisData",r),t.setHyperCubeValue("qMode","S"),e},initialFetch(){return y.fetch(g,v).then((e=>{const t=function(e){return{qDataPages:e.qDataPages.map((e=>{const t=op(e.qArea,e.qMatrix);return{...e,qArea:t}})),qAxisData:e.qAxisData}}(e);return n.command.processDataPage({dataPage:t.qDataPages.length?t.qDataPages[0]:[]}),c.initial=t,c.merged=t,e})).then((e=>ap(g,v,e))).then((e=>this.updateLayout(e))).catch(m)},fetch:(e,t)=>y.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=op(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}(c.initial,e))).then((e=>(n.command.processDataPage({dataPage:e.qDataPages.length?e.qDataPages[0]:[]}),c.merged=e,e))).then((n=>ap(e,t,n))).catch(m),fetchFromCache:(e,t)=>p.fetch(e,t).then((n=>ap(e,t,n))),fetchMinMaxData:()=>Promise.resolve(c.initial.qDataPages||[]),getInitialCube(){const e=t.getHyperCube();return d({},e,{...c.initial})},getInitialLayout(){const e=this.getInitialCube();return d({},t.getLayout(),{qHyperCube:e})},getDimensionCardinality:()=>cp(c.initial,t.meta),setSnapshotData(e){const{qHyperCube:t}=e;t.qDataPages=c.merged.qDataPages,t.qAxisData=c.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=yl(((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 gl(((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),u=i?1-o:o,{min:c,max:d}=t.get("zoom"),f=Math.abs(d-c),h=f-(r>0?lp:sp)*f,p=c+h*u,m=d-h*(1-u),y=p<a?a-p:0,g=m>s?m-s:0;t.set("zoom",{min:Math.max(p-g,a),max:Math.min(m+y,s)})}}),r)}},interactions:{areaPan:function({targetKey:e,chart:t,actions:n,viewState:r,viewCache:i}){return{type:"Pan",key:"continuous:pan",options:{event:rm,pointers:1,threshold:10,enable(r,i){return this.started===rm||!i||!!n.scroll.enabled()&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some((t=>t.key===e))}},events:{continuousPanstart(n){n.preventDefault(),this.started=rm;const{min:i,max:o}=r.get("zoom");this[rm]={min:i,max:o,size:t.component(e).rect.computedInner.width,span:o-i}},continuousPanmove(e){e.preventDefault();const{span:t,min:n,max:o,size:a}=this[rm],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)})},continuousPanend(e){e.preventDefault(),this.started=!1},continuousPancancel(e){e.preventDefault(),this.started=!1}}}}},picassoComponents:{axisOverlay:fp,timeAxis:gp},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]=d(!0,{},t[i],o)})),r}(t,tm,n),{qAxis:i}=r,o=In(),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 u,c,f=[];const h=function(e){return Number.isNaN(+e)?NaN:o(e)};h.ticks=({distance:e,resolve:t=u.resolve}={})=>{const n=t(e),o=n[r.ticks.level];if(Number.isNaN(+o)||(f=c.transform(i[o].qTicks,{isMinor:!1})),!Number.isNaN(+n.minor)){const e=c.transform(i[n.minor].qTicks,{isMinor:!0});f=f.concat(e)}return"auto"===o&&(f=c.generate(e,n.isDayOrShorter)),f},h.invert=e=>o.invert(e),h.domain=e=>Array.isArray(e)?o.domain(e):o.domain(),h.range=e=>Array.isArray(e)?o.range(e):o.range(),h.norm=e=>(nm(a,h),a.instance(e)),h.normInvert=e=>(nm(a,h),a.instance.invert(e)),h.copy=()=>e(t,n),h.clamp=(e=!0)=>(o.clamp(e),o.clamp()),h.min=()=>Math.min(s,l),h.max=()=>Math.max(s,l),o.range(r.invert?[1,0]:[0,1]),o.domain([s,l]),a.invert=r.invert;const p=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&&em.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=Cp(t[0].data.start),i=Cp(t[n-1].data.start);return Pp.count(r,i)/n>=1?o.date:_p.count(r,i)/n>0?o.minute:Ip.count(r,i)/n>0?o.second:o.date},t}(r);return c=Qp(o.copy(),r,p),u=kp({qAxis:i,measureText:r.formatter.measureText,reqAutoFitWidth:2*p.getFormat("minute").width,cache:r.cache,scale:h}),h.data=()=>({fields:[{formatter:h.formatter,id:()=>"qHyperCube/"+r.field,key:()=>r.field,raw:hl(n,"fields.0.raw",(()=>({})))}]}),h.formatter=()=>p.getFormatFromTicks(f).formatter,h}}};const om=e=>e.meta.seriesComponentKeys[0];const{event:{onZoom:am}}=im,sm=[`${Vo.COMPONENT.BAR}-${$o.PRIMARY}`,`${Vo.COMPONENT.BAR}-${$o.SECONDARY}`,`${Vo.COMPONENT.BAR_OOB}-${rf}`,`${Vo.COMPONENT.BAR_OOB}-${of}`,`${Vo.COMPONENT.BAR_OOB}-${rf}-${$o.PRIMARY}`,`${Vo.COMPONENT.BAR_OOB}-${of}-${$o.PRIMARY}`,`${Vo.COMPONENT.BAR_OOB}-${rf}-${$o.SECONDARY}`,`${Vo.COMPONENT.BAR_OOB}-${of}-${$o.SECONDARY}`,`${Vo.COMPONENT.SLICED_HAT}-${rf}`,`${Vo.COMPONENT.SLICED_HAT}-${of}`,`${Vo.COMPONENT.SLICED_HAT}-${rf}-${$o.PRIMARY}`,`${Vo.COMPONENT.SLICED_HAT}-${of}-${$o.PRIMARY}`,`${Vo.COMPONENT.SLICED_HAT}-${rf}-${$o.SECONDARY}`,`${Vo.COMPONENT.SLICED_HAT}-${of}-${$o.SECONDARY}`,`${Vo.COMPONENT.DATA_OOB_MARKER}-${rf}`,`${Vo.COMPONENT.DATA_OOB_MARKER}-${of}`,Vo.COMPONENT.AXIS.MAJOR];function lm({chart:e,models:t,actions:n,viewState:r,viewCache:i,environment:o}){const{appModel:a,layoutService:s,seriesModel:l,tooltipModel:u,flags:c}=t,{pointComponentKeys:d,markerComponentKeys:f,barComponentKeys:h}=l.meta,p=[...d,...f],m=[...h],y=[...sm,...p],g=u.query.getCustomTooltipModel(),v=om(l),b=g.utils,x=yl(b.displayTooltip,b.DEBOUNCE_THRESHOLD),M=s.meta.isContinuous?am({chart:e,viewState:r,viewCache:i},{rtl:"rtl"===o.options.direction,threshold:50,targetKey:v}):()=>{},S=()=>e.component(Vo.COMPONENT.LEGEND_TOOLTIP),w=()=>e.component(Vo.COMPONENT.TOOLTIP),E=()=>{(()=>{const e=S();e&&e.show&&e.emit("hide")})(),(()=>{const e=w();e&&e.show&&(e.emit("hide"),u.query.useCustomTooltip()&&x&&x({},e,{nodes:[],opts:{app:a,flags:c},customTooltipModel:g,hide:!0}))})()};return{type:"native",events:{wheel(t){const r={x:t.clientX,y:t.clientY},i=e.componentsFromPoint(r);if(n.interact.enabled()){const[e]=i.filter((e=>e.key===Vo.COMPONENT.LEGEND_CATEGORICAL));((e,t)=>{if(t){const n=Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY;t.emit(n>=0?"next":"prev"),e.preventDefault()}})(t,e)}if(n.scroll.enabled()){const[e]=i.filter((e=>e.key===v));e&&(M(r,Math.sign(-t.deltaY)),t.preventDefault())}E()},mousemove(r){if(!n.tooltip.enabled())return;const i=e.componentsFromPoint({x:r.clientX,y:r.clientY}),o=S();o&&o.show&&(i.some((e=>e.key===Vo.COMPONENT.LEGEND_CATEGORICAL))?o.emit("show",r):o.emit("hide"));const s=w();if(s&&s.show)if(i.some((e=>-1!==y.indexOf(e.key)))){const n=[],{x:o,y:d}=function({chart:e,e:t}){const{left:n,top:r}=e.element.getBoundingClientRect();return{x:(t.center?t.center.x:t.clientX)-n,y:(t.center?t.center.y:t.clientY)-r}}({chart:e,e:r});if(i.some((e=>p.indexOf(e.key)>-1))&&n.push(...e.shapesAt({cx:o,cy:d,r:3},{components:p.map((e=>({key:e})))})),i.some((e=>m.indexOf(e.key)>-1))&&n.push(...e.shapesAt({x:o,y:d},{components:m.map((e=>({key:e})))})),u.query.useCustomTooltip()&&b.checkIfPromisesExist({customTooltipModel:g})){let i=[];if(0===n.length&&(n.push(...b.getNodes(r,e)),1===n.length&&n[0].key===Vo.COMPONENT.AXIS.MAJOR)){var l;const r=Vh({chart:e,models:t,nodes:n});null!=r&&r.length&&null!==(l=r[0].childrenNodes)&&void 0!==l&&l.length&&(i=r[0].childrenNodes)}x(r,s,{nodes:n,extractedNodes:i,opts:{app:a,flags:c},customTooltipModel:g})}else s.emit("show",r,n.length?{nodes:n}:void 0)}else s.emit("hide")},mouseup(e){2===e.button&&E()},mouseleave(){E()}}}}const um="continuousPinchZoom";const cm=im.interactions.areaPan;function dm({chart:e,models:t,environment:n,viewState:r,viewCache:i,actions:o,selectables:a}){const{layoutService:s,dockService:l,discreteModel:u,colorService:c}=t,d="rtl"===n.options.direction,f=function({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){return{gestures:[...ud({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l})],native:cd({componentKey:e,chart:t,actions:n,layoutService:o})}}({componentKey:"scrollbar",chart:e,actions:o,viewState:r,viewCache:i,discrete:u,layoutService:s,dockService:l,rtl:d}),h={type:"hammer",enable:!0,gestures:[...c.custom.legendInteractions(),...a.gestures.sort(((e,t)=>(t.prio||0)-(e.prio||0))),...f.gestures]},p=[lm({chart:e,models:t,actions:o,viewState:r,viewCache:i,environment:n}),f.native];return s.meta.isDiscrete&&(h.gestures.push(...u.interactions.gestures),p.push(u.interactions.native)),s.meta.isContinuous&&h.gestures.push(cm({targetKey:om(t.seriesModel),chart:e,actions:o,viewState:r,viewCache:i}),function({targetKey:e,chart:t,actions:n,viewState:r,viewCache:i,rtl:o}){const a={last:0,diff:0},s=im.event.onZoom({viewCache:i,viewState:r,chart:t},{threshold:100,rtl:o,targetKey:e});return{type:"Pinch",key:"continuous:pinch-zoom",options:{event:um,pointers:2,threshold:0,enable:(r,i)=>!i||!!n.scroll.enabled()&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some((t=>t.key===e))},events:{[um+"start"](e){a.last=e.scale,e.preventDefault()},[um+"move"](e){const t=e.scale-a.last;Math.abs(t)>.01&&s(e.center,t>0?1:-1),a.last=e.scale,e.preventDefault()}}}}({targetKey:om(t.seriesModel),chart:e,actions:o,viewState:r,viewCache:i,rtl:d})),[h,...p]}const fm="lasso",hm=({key:e,componentTargetKey:t,requireFailure:n,recognizeWith:r},i)=>({key:"event:"+e,type:"Pan",requireFailure:n,recognizeWith:r,options:{event:fm,enable(e,n){if(this.started===fm||!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!==fm&&(i.actions.select.emit("start",fm),this.chart.component(e).emit("lassoStart",t),this.started=fm)},lassomove(t){t.preventDefault(),this.chart.component(e).emit("lassoMove",t)},lassoend(t){t.preventDefault(),this.started=!1,this.chart.component(e).emit("lassoEnd",t),i.actions.select.emit("end",fm)}}});const pm=({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),u=o.hitRadius?o.hitRadius(a):0,c=u>0?{cx:n.x,cy:n.y,r:u}:n,d=o.shapesAt?o.shapesAt(c):this.chart.shapesAt(c,{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)}}if(f&&o.actions.tooltip.enabled())if(d.length){const{customTooltipModel:e}=o;if(null!=e&&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 mm=({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 ym=({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)));return 0===a.length&&function(e,t){const{target:n}=e.srcEvent;return!(!n||0!==(n.getAttribute("data-key")||"").indexOf(t+"-"))}(i,t)?(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)},[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 gm(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:u=!1,multiple:c=!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:u?{context:"selection",observe:!0}:"selection",scale:s,multiple:c,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=ym(e,t,"range");return{interactions:[e.onEdited?mm(e,t):null,r].filter(Boolean),components:[n]}}const vm=/axis|legend/;function bm({actions:e,models:t}){const{seriesModel:n,layoutService:r,colorService:i,tooltipModel:o,flags:a}=t,s=r.getHyperCubeValue("qDimensionInfo.0.qIsOneAndOnlyOne",!1);return function(e,t){if(!e.targets)throw new Error("Missing 'targets' property");return{interactions:[pm(e,t)],components:[]}}({targets:[`${Vo.COMPONENT.BAR}-${$o.PRIMARY}`,`${Vo.COMPONENT.BAR}-${$o.SECONDARY}`,...n.query.series(Ho.MARKER).map((e=>sf(Vo.COMPONENT.MARKER,e))),...n.query.series(Ho.LINE).map((e=>sf(Vo.COMPONENT.POINT,e))),Vo.COMPONENT.AXIS.MAJOR,Vo.COMPONENT.AXIS_OVERLAY.TIME_INNER,Vo.COMPONENT.AXIS_OVERLAY.TIME_OUTER,Vo.COMPONENT.AXIS_OVERLAY.CONTINUOUS,Vo.COMPONENT.LEGEND_CATEGORICAL],components:(e,t)=>{const[n]=t,{key:r}=n,i={key:r,action:e.srcEvent.ctrlKey||s?"set":"toggle",contexts:["selection"]};return-1===[Vo.COMPONENT.AXIS.MAJOR,Vo.COMPONENT.AXIS_OVERLAY.TIME_INNER,Vo.COMPONENT.AXIS_OVERLAY.TIME_OUTER,Vo.COMPONENT.AXIS_OVERLAY.CONTINUOUS,Vo.COMPONENT.LEGEND_CATEGORICAL].indexOf(r)&&(i.data=["selectionDimension"]),[i]}},{actions:e,isLocked:e=>e.some((e=>"legend-cat"===e.type))?i.isSelectionLocked({isMeasureSelectionLocked:r.meta.isDimensionLocked}):r.meta.isDimensionLocked,hitRadius:e=>(e=>e.some((e=>vm.test(e.type))))(e)?0:3,customTooltipModel:o.query.getCustomTooltipModel(),debouncer:yl,flags:a})}function xm({actions:e,models:t}){const{layoutService:n,dockService:r,seriesModel:i}=t,{isDiscrete:o,isDimensionLocked:a}=n.meta;if(!o||a)return!1;const s=[...i.meta.seriesComponentKeys,Vo.COMPONENT.AXIS.MAJOR];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:[ym(e,t,"area")],components:[n]}}({eventName:"discreteRange",key:"discrete-range-brush",components:[{key:s[0],contexts:["selection"],action:"set",data:["selectionDimension"]}],targets:s,fillTargets:[Vo.COMPONENT.AXIS.MAJOR],dock:r.meta.major.dock},{actions:e})}const Mm={components:[],interactions:[]};function Sm({actions:e,chart:t,models:n}){const r=function({actions:e,models:t}){const{dockService:n,seriesModel:r,layoutService:i}=t;return!i.meta.isDimensionLocked&&!i.meta.isBarSeriesStacked&&gm({eventName:"minorRange",key:"minor-range-brush",targets:[Vo.COMPONENT.AXIS.MINOR.PRIMARY,`${Vo.COMPONENT.BAR}-${$o.PRIMARY}`,...r.query.series(Ho.MARKER).filter((e=>e.isPrimary)).map((e=>sf(Vo.COMPONENT.MARKER,e))),...r.query.series(Ho.LINE).filter((e=>e.isPrimary)).map((e=>sf(Vo.COMPONENT.POINT,e)))],fillTargets:[Vo.COMPONENT.AXIS.MINOR.PRIMARY],dock:n.meta.minor.dock,scale:Vo.SCALE.MINOR.PRIMARY,onEdited(){e.select.emit("end","minorRange")}},{actions:e})}({actions:e,models:n})||Mm,i=function({actions:e,models:t}){const{dockService:n,seriesModel:r,layoutService:i}=t;return!i.meta.isDimensionLocked&&!i.meta.isBarSeriesStacked&&gm({eventName:"minorRange-secondary",key:"minor-secondary-range-brush",targets:[Vo.COMPONENT.AXIS.MINOR.SECONDARY,`${Vo.COMPONENT.BAR}-${$o.SECONDARY}`,...r.query.series(Ho.MARKER).filter((e=>!e.isPrimary)).map((e=>sf(Vo.COMPONENT.MARKER,e))),...r.query.series(Ho.LINE).filter((e=>!e.isPrimary)).map((e=>sf(Vo.COMPONENT.POINT,e)))],fillTargets:[Vo.COMPONENT.AXIS.MINOR.SECONDARY],dock:n.meta.minorSecondary.dock,scale:Vo.SCALE.MINOR.SECONDARY,onEdited(){e.select.emit("end","minorRange-secondary")}},{actions:e})}({actions:e,models:n})||Mm,o=xm({actions:e,models:n})||Mm,a=function({actions:e,chart:t,models:n}){const{layoutService:r,dockService:i,seriesModel:o}=n,{isContinuous:a,isTime:s}=r.meta;if(!a)return!1;const l=s?[Vo.COMPONENT.AXIS_OVERLAY.TIME_INNER,Vo.COMPONENT.AXIS_OVERLAY.TIME_OUTER]:[Vo.COMPONENT.AXIS_OVERLAY.CONTINUOUS];return gm({eventName:"continuousRange",key:"continuous-range-brush",targets:[`${Vo.COMPONENT.BAR}-${$o.PRIMARY}`,`${Vo.COMPONENT.BAR}-${$o.SECONDARY}`,...o.query.series(Ho.MARKER).map((e=>sf(Vo.COMPONENT.MARKER,e))),...o.query.series(Ho.LINE).map((e=>sf(Vo.COMPONENT.POINT,e))),...l],fillTargets:l,dock:i.meta.major.dock,scale:s?Vo.SCALE.MAJOR_INNER:Vo.SCALE.MAJOR,observeBrush:!0,multiple:!0,toLabel({datum:e,data:n,scale:r}){const i=s?r.formatter():t.formatter(Vo.FORMATTER.PRIMARY),o=t.scale(Vo.SCALE.MAJOR).max(),a=t.brushSelectionIncludeMax&&e===o;return`${e!==Math.max(...n)||a?"":"<"}${i(e)}`}},{actions:e})}({actions:e,chart:t,models:n})||Mm,s=function({actions:e,models:t}){const{colorService:n,layoutService:r}=t,[i]=n.custom.legendComponents(),o=n.custom.wrappedScales(),{isDimensionLocked:a}=r.meta;if(a||!i)return!1;const s=Vo.SCALE.COLOR+"Range",{type:l,key:u}=i,c=o[s];return!("legend-seq"!==l||!c||c.min>=c.max)&&gm({eventName:"legendRange",key:"legend-range-brush",targets:[u],fillTargets:[u],targetSelector:'[id="legend-seq-target"]',targetFillSelector:'[id="legend-seq-ticks"]',dock:i.layout.dock,scale:s,bubblesPlacement:"outside",onEdited:()=>{e.select.emit("end","legendRange")}},{actions:e})}({actions:e,models:n})||Mm;return{components:[...r.components,...i.components,...o.components,...a.components,...s.components],interactions:[...r.interactions,...i.interactions,...o.interactions,...a.interactions,...s.interactions]}}function wm({actions:e,models:t}){const{layoutService:n,seriesModel:r}=t,{seriesComponentKeys:i}=r.meta;if(n.meta.isDimensionLocked)return{components:[],interactions:[]};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:[hm(n,t)],components:[r]}}({key:"lasso",componentTargetKey:i[0],components:i.map((e=>({key:e,action:"add",contexts:["selection"],data:["selectionDimension"]})))},{actions:e})}function Em({picasso:e,chart:t,models:n,environment:r,viewState:i,viewCache:o,actions:a}){const{colorService:s,pluginService:l}=n,u=n.layoutService.getLayout(),{options:c}=r,d=function(e,t){return{layoutModes:g.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}}(0,{logicalSize:function({layout:e,options:t={}}){return!(null==e||!e.snapshotData||t.freeResize)&&{width:e.snapshotData.content.size.w,height:e.snapshotData.content.size.h}}({layout:u,options:c}),minCenterRatio:0}),f=function({chart:e,models:t,environment:n,viewState:r,viewCache:i,actions:o}){var a;const{colorService:s,layoutService:l,dockService:u}=t,c=Gh({environment:n,models:t});return"center"===(null==c||null===(a=c.layout)||void 0===a?void 0:a.dock)?[c]:[...wh({models:t}),...Yd({models:t}),...yh({chart:e,models:t,environment:n,viewState:r,viewCache:i}),Jh({models:t,environment:n}),...Qd({models:t,environment:n}),...Oh({models:t,environment:n,actions:o}),_i({viewState:r,viewCache:i,layoutService:l,dockService:u}),...Uh({models:t}),...Wh({chart:e,models:t,environment:n}),Th({models:t,environment:n,viewState:r,viewCache:i}),...s.custom.legendComponents(),Kh(t),...Dh({chart:e,models:t,viewState:r,viewCache:i,environment:n}),...$h({chart:e,models:t,environment:n}),c].filter(Boolean)}({chart:t,models:n,environment:r,viewState:i,viewCache:o,actions:a}),h=function({actions:e,chart:t,models:n}){const{layoutService:r}=n,i=r.getHyperCubeValue("qDimensionInfo.0.qIsOneAndOnlyOne",!1),o=bm({actions:e,models:n});if(i)return{components:[...o.components],gestures:[...o.interactions]};const a=Sm({actions:e,chart:t,models:n}),s=wm({actions:e,models:n});return{components:[...o.components,...a.components,...s.components],gestures:[...o.interactions,...a.interactions,...s.interactions]}}({actions:a,chart:t,models:n}),p=l.extendComponents([...f,...h.components]);return{collections:Dd({models:n}),scales:$d({picasso:e,models:n,viewState:i,viewCache:o,environment:r}),components:p,formatters:Zh({models:n}),interactions:dm({chart:t,models:n,environment:r,viewState:i,viewCache:o,actions:a,selectables:h}),strategy:d,palettes:s.getPalettes()}}const km=({models:{layoutService:e,fieldModel:t,appLayoutModel:n}})=>({type:"q",key:Vo.DATA.MAIN,data:e.getHyperCube(),config:{virtualFields:t.virtuals,localeInfo:n.qLocaleInfo}}),Cm=({models:{layoutService:e,fieldModel:t,continuousModel:n,appLayoutModel:r}})=>e.meta.isContinuous?[{type:"q",key:Vo.DATA.REDUCED,data:n.getInitialCube(),config:{virtualFields:t.virtuals,localeInfo:r.qLocaleInfo}}]:[],{event:{onZoomIntercept:Om,onZoomChange:Tm}}=im,Am=[Vo.COMPONENT.AXIS_TITLE.MAJOR,Vo.COMPONENT.AXIS_TITLE.MINOR.PRIMARY,Vo.COMPONENT.AXIS_TITLE.MINOR.SECONDARY,Vo.COMPONENT.GRID_LINE,Vo.COMPONENT.ZERO_LINE],Nm=({picasso:t,chart:n,models:r,environment:i,viewState:o,viewCache:a,actions:s})=>{(({chart:t,models:n,viewState:r,viewCache:i})=>{e.useEffect((()=>{if(!n||!r||!i)return;const{layoutService:e,continuousModel:o,refLineModel:a,seriesModel:s}=n,{miniComponentKeys:l}=s.meta,u=()=>{a&&a.update(),t.update({partialData:!0,excludeFromUpdate:[...Am,...l]})};r.onChanged("scrollOffset",u),e.meta.isContinuous&&(r.onChanged("zoom",Tm({layoutService:e,continuousDataModel:o},u)),r.intercept("zoom",Om({viewCache:i})))}),[n,r,i])})({chart:n,models:r,viewState:o,viewCache:a}),(({picasso:t,chart:n,models:r,environment:i,viewState:o,viewCache:a,actions:s})=>{const[,l]=e.usePromise((async()=>{if(null==n||!n.update||!r||!i)return;const{layoutService:e,colorService:l,discreteModel:u}=r;function c(e=!1){n.update({settings:Em({picasso:t,chart:n,models:r,environment:i,viewState:o,viewCache:a,actions:s}),data:e&&[km({models:r}),...Cm({models:r}),...l.getData()]})}const d=e.getDataPages();e.setDataPages([]),c(!0),e.setDataPages(d),e.meta.isContinuous||await u.command.initialize(),c(!1)}),[null==n?void 0:n.update,r,i]);if(l)throw l})({picasso:t,chart:n,models:r,environment:i,viewState:o,viewCache:a,actions:s})};var qm={exports:{}};
|
|
10
10
|
/*! Hammer.JS - v2.0.7 - 2016-04-22
|
|
11
11
|
* http://hammerjs.github.io/
|
|
12
12
|
*
|
|
@@ -60,7 +60,7 @@ Object.defineProperty(YI,"__esModule",{value:!0});var XI="function"==typeof Symb
|
|
|
60
60
|
* This source code is licensed under the MIT license found in the
|
|
61
61
|
* LICENSE file in the root directory of this source tree.
|
|
62
62
|
*/
|
|
63
|
-
var xz=OR.exports,Mz=DR,Sz=vz.exports;function wz(e,t,n,r,i,o,a,s){if(!e){if(e=void 0,void 0===t)e=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,i,o,a,s],u=0;(e=Error(t.replace(/%s/g,(function(){return l[u++]})))).name="Invariant Violation"}throw e.framesToPop=1,e}}function Ez(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);wz(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}function kz(e,t,n,r,i,o,a,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(e){this.onError(e)}}xz||Ez("227");var Cz=!1,Oz=null,Tz=!1,Az=null,Nz={onError:function(e){Cz=!0,Oz=e}};function qz(e,t,n,r,i,o,a,s,l){Cz=!1,Oz=null,kz.apply(Nz,arguments)}var Dz=null,Rz={};function Iz(){if(Dz)for(var e in Rz){var t=Rz[e],n=Dz.indexOf(e);if(-1<n||Ez("96",e),!Pz[n])for(var r in t.extractEvents||Ez("97",e),Pz[n]=t,n=t.eventTypes){var i=void 0,o=n[r],a=t,s=r;Lz.hasOwnProperty(s)&&Ez("99",s),Lz[s]=o;var l=o.phasedRegistrationNames;if(l){for(i in l)l.hasOwnProperty(i)&&_z(l[i],a,s);i=!0}else o.registrationName?(_z(o.registrationName,a,s),i=!0):i=!1;i||Ez("98",r,e)}}}function _z(e,t,n){jz[e]&&Ez("100",e),jz[e]=t,zz[e]=t.eventTypes[n].dependencies}var Pz=[],Lz={},jz={},zz={},Fz=null,Bz=null,Vz=null;function Hz(e,t,n){var r=e.type||"unknown-event";e.currentTarget=Vz(n),function(e,t,n,r,i,o,a,s,l){if(qz.apply(this,arguments),Cz){if(Cz){var u=Oz;Cz=!1,Oz=null}else Ez("198"),u=void 0;Tz||(Tz=!0,Az=u)}}(r,t,void 0,e),e.currentTarget=null}function $z(e,t){return null==t&&Ez("30"),null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function Uz(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}var Wz=null;function Yz(e){if(e){var t=e._dispatchListeners,n=e._dispatchInstances;if(Array.isArray(t))for(var r=0;r<t.length&&!e.isPropagationStopped();r++)Hz(e,t[r],n[r]);else t&&Hz(e,t,n);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}var Xz={injectEventPluginOrder:function(e){Dz&&Ez("101"),Dz=Array.prototype.slice.call(e),Iz()},injectEventPluginsByName:function(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var r=e[t];Rz.hasOwnProperty(t)&&Rz[t]===r||(Rz[t]&&Ez("102",t),Rz[t]=r,n=!0)}n&&Iz()}};function Gz(e,t){var n=e.stateNode;if(!n)return null;var r=Fz(n);if(!r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}return e?null:(n&&"function"!=typeof n&&Ez("231",t,typeof n),n)}function Kz(e){if(null!==e&&(Wz=$z(Wz,e)),e=Wz,Wz=null,e&&(Uz(e,Yz),Wz&&Ez("95"),Tz))throw e=Az,Tz=!1,Az=null,e}var Jz=Math.random().toString(36).slice(2),Zz="__reactInternalInstance$"+Jz,Qz="__reactEventHandlers$"+Jz;function eF(e){if(e[Zz])return e[Zz];for(;!e[Zz];){if(!e.parentNode)return null;e=e.parentNode}return 5===(e=e[Zz]).tag||6===e.tag?e:null}function tF(e){return!(e=e[Zz])||5!==e.tag&&6!==e.tag?null:e}function nF(e){if(5===e.tag||6===e.tag)return e.stateNode;Ez("33")}function rF(e){return e[Qz]||null}function iF(e){do{e=e.return}while(e&&5!==e.tag);return e||null}function oF(e,t,n){(t=Gz(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=$z(n._dispatchListeners,t),n._dispatchInstances=$z(n._dispatchInstances,e))}function aF(e){if(e&&e.dispatchConfig.phasedRegistrationNames){for(var t=e._targetInst,n=[];t;)n.push(t),t=iF(t);for(t=n.length;0<t--;)oF(n[t],"captured",e);for(t=0;t<n.length;t++)oF(n[t],"bubbled",e)}}function sF(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=Gz(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=$z(n._dispatchListeners,t),n._dispatchInstances=$z(n._dispatchInstances,e))}function lF(e){e&&e.dispatchConfig.registrationName&&sF(e._targetInst,null,e)}function uF(e){Uz(e,aF)}var cF=!("undefined"==typeof window||!window.document||!window.document.createElement);function dF(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var fF={animationend:dF("Animation","AnimationEnd"),animationiteration:dF("Animation","AnimationIteration"),animationstart:dF("Animation","AnimationStart"),transitionend:dF("Transition","TransitionEnd")},hF={},pF={};function mF(e){if(hF[e])return hF[e];if(!fF[e])return e;var t,n=fF[e];for(t in n)if(n.hasOwnProperty(t)&&t in pF)return hF[e]=n[t];return e}cF&&(pF=document.createElement("div").style,"AnimationEvent"in window||(delete fF.animationend.animation,delete fF.animationiteration.animation,delete fF.animationstart.animation),"TransitionEvent"in window||delete fF.transitionend.transition);var yF=mF("animationend"),gF=mF("animationiteration"),vF=mF("animationstart"),bF=mF("transitionend"),xF="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),MF=null,SF=null,wF=null;function EF(){if(wF)return wF;var e,t,n=SF,r=n.length,i="value"in MF?MF.value:MF.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return wF=i.slice(e,1<t?1-t:void 0)}function kF(){return!0}function CF(){return!1}function OF(e,t,n,r){for(var i in this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface)e.hasOwnProperty(i)&&((t=e[i])?this[i]=t(n):"target"===i?this.target=r:this[i]=n[i]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?kF:CF,this.isPropagationStopped=CF,this}function TF(e,t,n,r){if(this.eventPool.length){var i=this.eventPool.pop();return this.call(i,e,t,n,r),i}return new this(e,t,n,r)}function AF(e){e instanceof this||Ez("279"),e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function NF(e){e.eventPool=[],e.getPooled=TF,e.release=AF}Mz(OF.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=kF)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=kF)},persist:function(){this.isPersistent=kF},isPersistent:CF,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=CF,this._dispatchInstances=this._dispatchListeners=null}}),OF.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},OF.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var i=new t;return Mz(i,n.prototype),n.prototype=i,n.prototype.constructor=n,n.Interface=Mz({},r.Interface,e),n.extend=r.extend,NF(n),n},NF(OF);var qF=OF.extend({data:null}),DF=OF.extend({data:null}),RF=[9,13,27,32],IF=cF&&"CompositionEvent"in window,_F=null;cF&&"documentMode"in document&&(_F=document.documentMode);var PF=cF&&"TextEvent"in window&&!_F,LF=cF&&(!IF||_F&&8<_F&&11>=_F),jF=String.fromCharCode(32),zF={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},FF=!1;function BF(e,t){switch(e){case"keyup":return-1!==RF.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function VF(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var HF=!1;var $F={eventTypes:zF,extractEvents:function(e,t,n,r){var i=void 0,o=void 0;if(IF)e:{switch(e){case"compositionstart":i=zF.compositionStart;break e;case"compositionend":i=zF.compositionEnd;break e;case"compositionupdate":i=zF.compositionUpdate;break e}i=void 0}else HF?BF(e,n)&&(i=zF.compositionEnd):"keydown"===e&&229===n.keyCode&&(i=zF.compositionStart);return i?(LF&&"ko"!==n.locale&&(HF||i!==zF.compositionStart?i===zF.compositionEnd&&HF&&(o=EF()):(SF="value"in(MF=r)?MF.value:MF.textContent,HF=!0)),i=qF.getPooled(i,t,n,r),o?i.data=o:null!==(o=VF(n))&&(i.data=o),uF(i),o=i):o=null,(e=PF?function(e,t){switch(e){case"compositionend":return VF(t);case"keypress":return 32!==t.which?null:(FF=!0,jF);case"textInput":return(e=t.data)===jF&&FF?null:e;default:return null}}(e,n):function(e,t){if(HF)return"compositionend"===e||!IF&&BF(e,t)?(e=EF(),wF=SF=MF=null,HF=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return LF&&"ko"!==t.locale?null:t.data;default:return null}}(e,n))?((t=DF.getPooled(zF.beforeInput,t,n,r)).data=e,uF(t)):t=null,null===o?t:null===t?o:[o,t]}},UF=null,WF=null,YF=null;function XF(e){if(e=Bz(e)){"function"!=typeof UF&&Ez("280");var t=Fz(e.stateNode);UF(e.stateNode,e.type,t)}}function GF(e){WF?YF?YF.push(e):YF=[e]:WF=e}function KF(){if(WF){var e=WF,t=YF;if(YF=WF=null,XF(e),t)for(e=0;e<t.length;e++)XF(t[e])}}function JF(e,t){return e(t)}function ZF(e,t,n){return e(t,n)}function QF(){}var eB=!1;function tB(e,t){if(eB)return e(t);eB=!0;try{return JF(e,t)}finally{eB=!1,(null!==WF||null!==YF)&&(QF(),KF())}}var nB={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function rB(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!nB[e.type]:"textarea"===t}function iB(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}function oB(e){if(!cF)return!1;var t=(e="on"+e)in document;return t||((t=document.createElement("div")).setAttribute(e,"return;"),t="function"==typeof t[e]),t}function aB(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function sB(e){e._valueTracker||(e._valueTracker=function(e){var t=aB(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function lB(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=aB(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}var uB=xz.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;uB.hasOwnProperty("ReactCurrentDispatcher")||(uB.ReactCurrentDispatcher={current:null});var cB=/^(.*)[\\\/]/,dB="function"==typeof Symbol&&Symbol.for,fB=dB?Symbol.for("react.element"):60103,hB=dB?Symbol.for("react.portal"):60106,pB=dB?Symbol.for("react.fragment"):60107,mB=dB?Symbol.for("react.strict_mode"):60108,yB=dB?Symbol.for("react.profiler"):60114,gB=dB?Symbol.for("react.provider"):60109,vB=dB?Symbol.for("react.context"):60110,bB=dB?Symbol.for("react.concurrent_mode"):60111,xB=dB?Symbol.for("react.forward_ref"):60112,MB=dB?Symbol.for("react.suspense"):60113,SB=dB?Symbol.for("react.memo"):60115,wB=dB?Symbol.for("react.lazy"):60116,EB="function"==typeof Symbol&&Symbol.iterator;function kB(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=EB&&e[EB]||e["@@iterator"])?e:null}function CB(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case bB:return"ConcurrentMode";case pB:return"Fragment";case hB:return"Portal";case yB:return"Profiler";case mB:return"StrictMode";case MB:return"Suspense"}if("object"==typeof e)switch(e.$$typeof){case vB:return"Context.Consumer";case gB:return"Context.Provider";case xB:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case SB:return CB(e.type);case wB:if(e=1===e._status?e._result:null)return CB(e)}return null}function OB(e){var t="";do{e:switch(e.tag){case 3:case 4:case 6:case 7:case 10:case 9:var n="";break e;default:var r=e._debugOwner,i=e._debugSource,o=CB(e.type);n=null,r&&(n=CB(r.type)),r=o,o="",i?o=" (at "+i.fileName.replace(cB,"")+":"+i.lineNumber+")":n&&(o=" (created by "+n+")"),n="\n in "+(r||"Unknown")+o}t+=n,e=e.return}while(e);return t}var TB=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,AB=Object.prototype.hasOwnProperty,NB={},qB={};function DB(e,t,n,r,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t}var RB={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){RB[e]=new DB(e,0,!1,e,null)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];RB[t]=new DB(t,1,!1,e[1],null)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){RB[e]=new DB(e,2,!1,e.toLowerCase(),null)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){RB[e]=new DB(e,2,!1,e,null)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){RB[e]=new DB(e,3,!1,e.toLowerCase(),null)})),["checked","multiple","muted","selected"].forEach((function(e){RB[e]=new DB(e,3,!0,e,null)})),["capture","download"].forEach((function(e){RB[e]=new DB(e,4,!1,e,null)})),["cols","rows","size","span"].forEach((function(e){RB[e]=new DB(e,6,!1,e,null)})),["rowSpan","start"].forEach((function(e){RB[e]=new DB(e,5,!1,e.toLowerCase(),null)}));var IB=/[\-:]([a-z])/g;function _B(e){return e[1].toUpperCase()}function PB(e,t,n,r){var i=RB.hasOwnProperty(t)?RB[t]:null;(null!==i?0===i.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!AB.call(qB,e)||!AB.call(NB,e)&&(TB.test(e)?qB[e]=!0:(NB[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}function LB(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function jB(e,t){var n=t.checked;return Mz({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function zB(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=LB(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function FB(e,t){null!=(t=t.checked)&&PB(e,"checked",t,!1)}function BB(e,t){FB(e,t);var n=LB(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?HB(e,t.type,n):t.hasOwnProperty("defaultValue")&&HB(e,t.type,LB(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function VB(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!e.defaultChecked,e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function HB(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(IB,_B);RB[t]=new DB(t,1,!1,e,null)})),"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(IB,_B);RB[t]=new DB(t,1,!1,e,"http://www.w3.org/1999/xlink")})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(IB,_B);RB[t]=new DB(t,1,!1,e,"http://www.w3.org/XML/1998/namespace")})),["tabIndex","crossOrigin"].forEach((function(e){RB[e]=new DB(e,1,!1,e.toLowerCase(),null)}));var $B={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function UB(e,t,n){return(e=OF.getPooled($B.change,e,t,n)).type="change",GF(n),uF(e),e}var WB=null,YB=null;function XB(e){Kz(e)}function GB(e){if(lB(nF(e)))return e}function KB(e,t){if("change"===e)return t}var JB=!1;function ZB(){WB&&(WB.detachEvent("onpropertychange",QB),YB=WB=null)}function QB(e){"value"===e.propertyName&&GB(YB)&&tB(XB,e=UB(YB,e,iB(e)))}function eV(e,t,n){"focus"===e?(ZB(),YB=n,(WB=t).attachEvent("onpropertychange",QB)):"blur"===e&&ZB()}function tV(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return GB(YB)}function nV(e,t){if("click"===e)return GB(t)}function rV(e,t){if("input"===e||"change"===e)return GB(t)}cF&&(JB=oB("input")&&(!document.documentMode||9<document.documentMode));var iV={eventTypes:$B,_isInputEventSupported:JB,extractEvents:function(e,t,n,r){var i=t?nF(t):window,o=void 0,a=void 0,s=i.nodeName&&i.nodeName.toLowerCase();if("select"===s||"input"===s&&"file"===i.type?o=KB:rB(i)?JB?o=rV:(o=tV,a=eV):(s=i.nodeName)&&"input"===s.toLowerCase()&&("checkbox"===i.type||"radio"===i.type)&&(o=nV),o&&(o=o(e,t)))return UB(o,n,r);a&&a(e,i,t),"blur"===e&&(e=i._wrapperState)&&e.controlled&&"number"===i.type&&HB(i,"number",i.value)}},oV=OF.extend({view:null,detail:null}),aV={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function sV(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=aV[e])&&!!t[e]}function lV(){return sV}var uV=0,cV=0,dV=!1,fV=!1,hV=oV.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:lV,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},movementX:function(e){if("movementX"in e)return e.movementX;var t=uV;return uV=e.screenX,dV?"mousemove"===e.type?e.screenX-t:0:(dV=!0,0)},movementY:function(e){if("movementY"in e)return e.movementY;var t=cV;return cV=e.screenY,fV?"mousemove"===e.type?e.screenY-t:0:(fV=!0,0)}}),pV=hV.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),mV={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},yV={eventTypes:mV,extractEvents:function(e,t,n,r){var i="mouseover"===e||"pointerover"===e,o="mouseout"===e||"pointerout"===e;if(i&&(n.relatedTarget||n.fromElement)||!o&&!i)return null;if(i=r.window===r?r:(i=r.ownerDocument)?i.defaultView||i.parentWindow:window,o?(o=t,t=(t=n.relatedTarget||n.toElement)?eF(t):null):o=null,o===t)return null;var a=void 0,s=void 0,l=void 0,u=void 0;"mouseout"===e||"mouseover"===e?(a=hV,s=mV.mouseLeave,l=mV.mouseEnter,u="mouse"):"pointerout"!==e&&"pointerover"!==e||(a=pV,s=mV.pointerLeave,l=mV.pointerEnter,u="pointer");var c=null==o?i:nF(o);if(i=null==t?i:nF(t),(e=a.getPooled(s,o,n,r)).type=u+"leave",e.target=c,e.relatedTarget=i,(n=a.getPooled(l,t,n,r)).type=u+"enter",n.target=i,n.relatedTarget=c,r=t,o&&r)e:{for(i=r,u=0,a=t=o;a;a=iF(a))u++;for(a=0,l=i;l;l=iF(l))a++;for(;0<u-a;)t=iF(t),u--;for(;0<a-u;)i=iF(i),a--;for(;u--;){if(t===i||t===i.alternate)break e;t=iF(t),i=iF(i)}t=null}else t=null;for(i=t,t=[];o&&o!==i&&(null===(u=o.alternate)||u!==i);)t.push(o),o=iF(o);for(o=[];r&&r!==i&&(null===(u=r.alternate)||u!==i);)o.push(r),r=iF(r);for(r=0;r<t.length;r++)sF(t[r],"bubbled",e);for(r=o.length;0<r--;)sF(o[r],"captured",n);return[e,n]}};function gV(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}var vV=Object.prototype.hasOwnProperty;function bV(e,t){if(gV(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!vV.call(t,n[r])||!gV(e[n[r]],t[n[r]]))return!1;return!0}function xV(e){var t=e;if(e.alternate)for(;t.return;)t=t.return;else{if(0!=(2&t.effectTag))return 1;for(;t.return;)if(0!=(2&(t=t.return).effectTag))return 1}return 3===t.tag?2:3}function MV(e){2!==xV(e)&&Ez("188")}function SV(e){if(!(e=function(e){var t=e.alternate;if(!t)return 3===(t=xV(e))&&Ez("188"),1===t?null:e;for(var n=e,r=t;;){var i=n.return,o=i?i.alternate:null;if(!i||!o)break;if(i.child===o.child){for(var a=i.child;a;){if(a===n)return MV(i),e;if(a===r)return MV(i),t;a=a.sibling}Ez("188")}if(n.return!==r.return)n=i,r=o;else{a=!1;for(var s=i.child;s;){if(s===n){a=!0,n=i,r=o;break}if(s===r){a=!0,r=i,n=o;break}s=s.sibling}if(!a){for(s=o.child;s;){if(s===n){a=!0,n=o,r=i;break}if(s===r){a=!0,r=o,n=i;break}s=s.sibling}a||Ez("189")}}n.alternate!==r&&Ez("190")}return 3!==n.tag&&Ez("188"),n.stateNode.current===n?e:t}(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}var wV=OF.extend({animationName:null,elapsedTime:null,pseudoElement:null}),EV=OF.extend({clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),kV=oV.extend({relatedTarget:null});function CV(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}var OV={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},TV={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},AV=oV.extend({key:function(e){if(e.key){var t=OV[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=CV(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?TV[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:lV,charCode:function(e){return"keypress"===e.type?CV(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?CV(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),NV=hV.extend({dataTransfer:null}),qV=oV.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:lV}),DV=OF.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),RV=hV.extend({deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null}),IV=[["abort","abort"],[yF,"animationEnd"],[gF,"animationIteration"],[vF,"animationStart"],["canplay","canPlay"],["canplaythrough","canPlayThrough"],["drag","drag"],["dragenter","dragEnter"],["dragexit","dragExit"],["dragleave","dragLeave"],["dragover","dragOver"],["durationchange","durationChange"],["emptied","emptied"],["encrypted","encrypted"],["ended","ended"],["error","error"],["gotpointercapture","gotPointerCapture"],["load","load"],["loadeddata","loadedData"],["loadedmetadata","loadedMetadata"],["loadstart","loadStart"],["lostpointercapture","lostPointerCapture"],["mousemove","mouseMove"],["mouseout","mouseOut"],["mouseover","mouseOver"],["playing","playing"],["pointermove","pointerMove"],["pointerout","pointerOut"],["pointerover","pointerOver"],["progress","progress"],["scroll","scroll"],["seeking","seeking"],["stalled","stalled"],["suspend","suspend"],["timeupdate","timeUpdate"],["toggle","toggle"],["touchmove","touchMove"],[bF,"transitionEnd"],["waiting","waiting"],["wheel","wheel"]],_V={},PV={};function LV(e,t){var n=e[0],r="on"+((e=e[1])[0].toUpperCase()+e.slice(1));t={phasedRegistrationNames:{bubbled:r,captured:r+"Capture"},dependencies:[n],isInteractive:t},_V[e]=t,PV[n]=t}[["blur","blur"],["cancel","cancel"],["click","click"],["close","close"],["contextmenu","contextMenu"],["copy","copy"],["cut","cut"],["auxclick","auxClick"],["dblclick","doubleClick"],["dragend","dragEnd"],["dragstart","dragStart"],["drop","drop"],["focus","focus"],["input","input"],["invalid","invalid"],["keydown","keyDown"],["keypress","keyPress"],["keyup","keyUp"],["mousedown","mouseDown"],["mouseup","mouseUp"],["paste","paste"],["pause","pause"],["play","play"],["pointercancel","pointerCancel"],["pointerdown","pointerDown"],["pointerup","pointerUp"],["ratechange","rateChange"],["reset","reset"],["seeked","seeked"],["submit","submit"],["touchcancel","touchCancel"],["touchend","touchEnd"],["touchstart","touchStart"],["volumechange","volumeChange"]].forEach((function(e){LV(e,!0)})),IV.forEach((function(e){LV(e,!1)}));var jV={eventTypes:_V,isInteractiveTopLevelEventType:function(e){return void 0!==(e=PV[e])&&!0===e.isInteractive},extractEvents:function(e,t,n,r){var i=PV[e];if(!i)return null;switch(e){case"keypress":if(0===CV(n))return null;case"keydown":case"keyup":e=AV;break;case"blur":case"focus":e=kV;break;case"click":if(2===n.button)return null;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":e=hV;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":e=NV;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":e=qV;break;case yF:case gF:case vF:e=wV;break;case bF:e=DV;break;case"scroll":e=oV;break;case"wheel":e=RV;break;case"copy":case"cut":case"paste":e=EV;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":e=pV;break;default:e=OF}return uF(t=e.getPooled(i,t,n,r)),t}},zV=jV.isInteractiveTopLevelEventType,FV=[];function BV(e){var t=e.targetInst,n=t;do{if(!n){e.ancestors.push(n);break}var r;for(r=n;r.return;)r=r.return;if(!(r=3!==r.tag?null:r.stateNode.containerInfo))break;e.ancestors.push(n),n=eF(r)}while(n);for(n=0;n<e.ancestors.length;n++){t=e.ancestors[n];var i=iB(e.nativeEvent);r=e.topLevelType;for(var o=e.nativeEvent,a=null,s=0;s<Pz.length;s++){var l=Pz[s];l&&(l=l.extractEvents(r,t,o,i))&&(a=$z(a,l))}Kz(a)}}var VV=!0;function HV(e,t){if(!t)return null;var n=(zV(e)?UV:WV).bind(null,e);t.addEventListener(e,n,!1)}function $V(e,t){if(!t)return null;var n=(zV(e)?UV:WV).bind(null,e);t.addEventListener(e,n,!0)}function UV(e,t){ZF(WV,e,t)}function WV(e,t){if(VV){var n=iB(t);if(null===(n=eF(n))||"number"!=typeof n.tag||2===xV(n)||(n=null),FV.length){var r=FV.pop();r.topLevelType=e,r.nativeEvent=t,r.targetInst=n,e=r}else e={topLevelType:e,nativeEvent:t,targetInst:n,ancestors:[]};try{tB(BV,e)}finally{e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,10>FV.length&&FV.push(e)}}}var YV={},XV=0,GV="_reactListenersID"+(""+Math.random()).slice(2);function KV(e){return Object.prototype.hasOwnProperty.call(e,GV)||(e[GV]=XV++,YV[e[GV]]={}),YV[e[GV]]}function JV(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function ZV(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function QV(e,t){var n,r=ZV(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ZV(r)}}function eH(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?eH(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function tH(){for(var e=window,t=JV();t instanceof e.HTMLIFrameElement;){try{e=t.contentDocument.defaultView}catch(e){break}t=JV(e.document)}return t}function nH(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function rH(e){var t=tH(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&eH(n.ownerDocument.documentElement,n)){if(null!==r&&nH(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=void 0===r.end?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=QV(n,o);var a=QV(n,r);i&&a&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var iH=cF&&"documentMode"in document&&11>=document.documentMode,oH={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},aH=null,sH=null,lH=null,uH=!1;function cH(e,t){var n=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;return uH||null==aH||aH!==JV(n)?null:("selectionStart"in(n=aH)&&nH(n)?n={start:n.selectionStart,end:n.selectionEnd}:n={anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},lH&&bV(lH,n)?null:(lH=n,(e=OF.getPooled(oH.select,sH,e,t)).type="select",e.target=aH,uF(e),e))}var dH={eventTypes:oH,extractEvents:function(e,t,n,r){var i,o=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;if(!(i=!o)){e:{o=KV(o),i=zz.onSelect;for(var a=0;a<i.length;a++){var s=i[a];if(!o.hasOwnProperty(s)||!o[s]){o=!1;break e}}o=!0}i=!o}if(i)return null;switch(o=t?nF(t):window,e){case"focus":(rB(o)||"true"===o.contentEditable)&&(aH=o,sH=t,lH=null);break;case"blur":lH=sH=aH=null;break;case"mousedown":uH=!0;break;case"contextmenu":case"mouseup":case"dragend":return uH=!1,cH(n,r);case"selectionchange":if(iH)break;case"keydown":case"keyup":return cH(n,r)}return null}};function fH(e,t){return e=Mz({children:void 0},t),(t=function(e){var t="";return xz.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function hH(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+LB(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function pH(e,t){return null!=t.dangerouslySetInnerHTML&&Ez("91"),Mz({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function mH(e,t){var n=t.value;null==n&&(n=t.defaultValue,null!=(t=t.children)&&(null!=n&&Ez("92"),Array.isArray(t)&&(1>=t.length||Ez("93"),t=t[0]),n=t),null==n&&(n="")),e._wrapperState={initialValue:LB(n)}}function yH(e,t){var n=LB(t.value),r=LB(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function gH(e){var t=e.textContent;t===e._wrapperState.initialValue&&(e.value=t)}Xz.injectEventPluginOrder("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),Fz=rF,Bz=tF,Vz=nF,Xz.injectEventPluginsByName({SimpleEventPlugin:jV,EnterLeaveEventPlugin:yV,ChangeEventPlugin:iV,SelectEventPlugin:dH,BeforeInputEventPlugin:$F});var vH="http://www.w3.org/1999/xhtml",bH="http://www.w3.org/2000/svg";function xH(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function MH(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?xH(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var SH=void 0,wH=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction((function(){return e(t,n)}))}:e}((function(e,t){if(e.namespaceURI!==bH||"innerHTML"in e)e.innerHTML=t;else{for((SH=SH||document.createElement("div")).innerHTML="<svg>"+t+"</svg>",t=SH.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}));function EH(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var kH={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},CH=["Webkit","ms","Moz","O"];function OH(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||kH.hasOwnProperty(e)&&kH[e]?(""+t).trim():t+"px"}function TH(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=OH(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(kH).forEach((function(e){CH.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),kH[t]=kH[e]}))}));var AH=Mz({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function NH(e,t){t&&(AH[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML)&&Ez("137",e,""),null!=t.dangerouslySetInnerHTML&&(null!=t.children&&Ez("60"),"object"==typeof t.dangerouslySetInnerHTML&&"__html"in t.dangerouslySetInnerHTML||Ez("61")),null!=t.style&&"object"!=typeof t.style&&Ez("62",""))}function qH(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function DH(e,t){var n=KV(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=zz[t];for(var r=0;r<t.length;r++){var i=t[r];if(!n.hasOwnProperty(i)||!n[i]){switch(i){case"scroll":$V("scroll",e);break;case"focus":case"blur":$V("focus",e),$V("blur",e),n.blur=!0,n.focus=!0;break;case"cancel":case"close":oB(i)&&$V(i,e);break;case"invalid":case"submit":case"reset":break;default:-1===xF.indexOf(i)&&HV(i,e)}n[i]=!0}}}function RH(){}var IH=null,_H=null;function PH(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function LH(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var jH="function"==typeof setTimeout?setTimeout:void 0,zH="function"==typeof clearTimeout?clearTimeout:void 0,FH=Sz.unstable_scheduleCallback,BH=Sz.unstable_cancelCallback;function VH(e){for(e=e.nextSibling;e&&1!==e.nodeType&&3!==e.nodeType;)e=e.nextSibling;return e}function HH(e){for(e=e.firstChild;e&&1!==e.nodeType&&3!==e.nodeType;)e=e.nextSibling;return e}var $H=[],UH=-1;function WH(e){0>UH||(e.current=$H[UH],$H[UH]=null,UH--)}function YH(e,t){UH++,$H[UH]=e.current,e.current=t}var XH={},GH={current:XH},KH={current:!1},JH=XH;function ZH(e,t){var n=e.type.contextTypes;if(!n)return XH;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function QH(e){return null!=(e=e.childContextTypes)}function e$(e){WH(KH),WH(GH)}function t$(e){WH(KH),WH(GH)}function n$(e,t,n){GH.current!==XH&&Ez("168"),YH(GH,t),YH(KH,n)}function r$(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())i in e||Ez("108",CB(t)||"Unknown",i);return Mz({},n,r)}function i$(e){var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||XH,JH=GH.current,YH(GH,t),YH(KH,KH.current),!0}function o$(e,t,n){var r=e.stateNode;r||Ez("169"),n?(t=r$(e,t,JH),r.__reactInternalMemoizedMergedChildContext=t,WH(KH),WH(GH),YH(GH,t)):WH(KH),YH(KH,n)}var a$=null,s$=null;function l$(e){return function(t){try{return e(t)}catch(e){}}}function u$(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.contextDependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function c$(e,t,n,r){return new u$(e,t,n,r)}function d$(e){return!(!(e=e.prototype)||!e.isReactComponent)}function f$(e,t){var n=e.alternate;return null===n?((n=c$(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.effectTag=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childExpirationTime=e.childExpirationTime,n.expirationTime=e.expirationTime,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,n.contextDependencies=e.contextDependencies,n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function h$(e,t,n,r,i,o){var a=2;if(r=e,"function"==typeof e)d$(e)&&(a=1);else if("string"==typeof e)a=5;else e:switch(e){case pB:return p$(n.children,i,o,t);case bB:return m$(n,3|i,o,t);case mB:return m$(n,2|i,o,t);case yB:return(e=c$(12,n,t,4|i)).elementType=yB,e.type=yB,e.expirationTime=o,e;case MB:return(e=c$(13,n,t,i)).elementType=MB,e.type=MB,e.expirationTime=o,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case gB:a=10;break e;case vB:a=9;break e;case xB:a=11;break e;case SB:a=14;break e;case wB:a=16,r=null;break e}Ez("130",null==e?e:typeof e,"")}return(t=c$(a,n,t,i)).elementType=e,t.type=r,t.expirationTime=o,t}function p$(e,t,n,r){return(e=c$(7,e,r,t)).expirationTime=n,e}function m$(e,t,n,r){return e=c$(8,e,r,t),t=0==(1&t)?mB:bB,e.elementType=t,e.type=t,e.expirationTime=n,e}function y$(e,t,n){return(e=c$(6,e,null,t)).expirationTime=n,e}function g$(e,t,n){return(t=c$(4,null!==e.children?e.children:[],e.key,t)).expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function v$(e,t){e.didError=!1;var n=e.earliestPendingTime;0===n?e.earliestPendingTime=e.latestPendingTime=t:n<t?e.earliestPendingTime=t:e.latestPendingTime>t&&(e.latestPendingTime=t),M$(t,e)}function b$(e,t){e.didError=!1,e.latestPingedTime>=t&&(e.latestPingedTime=0);var n=e.earliestPendingTime,r=e.latestPendingTime;n===t?e.earliestPendingTime=r===t?e.latestPendingTime=0:r:r===t&&(e.latestPendingTime=n),n=e.earliestSuspendedTime,r=e.latestSuspendedTime,0===n?e.earliestSuspendedTime=e.latestSuspendedTime=t:n<t?e.earliestSuspendedTime=t:r>t&&(e.latestSuspendedTime=t),M$(t,e)}function x$(e,t){var n=e.earliestPendingTime;return n>t&&(t=n),(e=e.earliestSuspendedTime)>t&&(t=e),t}function M$(e,t){var n=t.earliestSuspendedTime,r=t.latestSuspendedTime,i=t.earliestPendingTime,o=t.latestPingedTime;0===(i=0!==i?i:o)&&(0===e||r<e)&&(i=r),0!==(e=i)&&n>e&&(e=n),t.nextExpirationTimeToWorkOn=i,t.expirationTime=e}function S$(e,t){if(e&&e.defaultProps)for(var n in t=Mz({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}var w$=(new xz.Component).refs;function E$(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:Mz({},t,n),e.memoizedState=n,null!==(r=e.updateQueue)&&0===e.expirationTime&&(r.baseState=n)}var k$={isMounted:function(e){return!!(e=e._reactInternalFiber)&&2===xV(e)},enqueueSetState:function(e,t,n){e=e._reactInternalFiber;var r=DY(),i=iW(r=rY(r,e));i.payload=t,null!=n&&(i.callback=n),JW(),aW(e,i),sY(e,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternalFiber;var r=DY(),i=iW(r=rY(r,e));i.tag=QU,i.payload=t,null!=n&&(i.callback=n),JW(),aW(e,i),sY(e,r)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var n=DY(),r=iW(n=rY(n,e));r.tag=eW,null!=t&&(r.callback=t),JW(),aW(e,r),sY(e,n)}};function C$(e,t,n,r,i,o,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!bV(n,r)||!bV(i,o))}function O$(e,t,n){var r=!1,i=XH,o=t.contextType;return"object"==typeof o&&null!==o?o=ZU(o):(i=QH(t)?JH:GH.current,o=(r=null!=(r=t.contextTypes))?ZH(e,i):XH),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=k$,e.stateNode=t,t._reactInternalFiber=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function T$(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&k$.enqueueReplaceState(t,t.state,null)}function A$(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=w$;var o=t.contextType;"object"==typeof o&&null!==o?i.context=ZU(o):(o=QH(t)?JH:GH.current,i.context=ZH(e,o)),null!==(o=e.updateQueue)&&(cW(e,o,n,i,r),i.state=e.memoizedState),"function"==typeof(o=t.getDerivedStateFromProps)&&(E$(e,t,o,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&k$.enqueueReplaceState(i,i.state,null),null!==(o=e.updateQueue)&&(cW(e,o,n,i,r),i.state=e.memoizedState)),"function"==typeof i.componentDidMount&&(e.effectTag|=4)}var N$=Array.isArray;function q$(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){n=n._owner;var r=void 0;n&&(1!==n.tag&&Ez("309"),r=n.stateNode),r||Ez("147",e);var i=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===i?t.ref:((t=function(e){var t=r.refs;t===w$&&(t=r.refs={}),null===e?delete t[i]:t[i]=e})._stringRef=i,t)}"string"!=typeof e&&Ez("284"),n._owner||Ez("290",e)}return e}function D$(e,t){"textarea"!==e.type&&Ez("31","[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,"")}function R$(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t,n){return(e=f$(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.effectTag=2,n):r:(t.effectTag=2,n):n}function a(t){return e&&null===t.alternate&&(t.effectTag=2),t}function s(e,t,n,r){return null===t||6!==t.tag?((t=y$(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function l(e,t,n,r){return null!==t&&t.elementType===n.type?((r=i(t,n.props)).ref=q$(e,t,n),r.return=e,r):((r=h$(n.type,n.key,n.props,null,e.mode,r)).ref=q$(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=g$(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function c(e,t,n,r,o){return null===t||7!==t.tag?((t=p$(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=y$(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case fB:return(n=h$(t.type,t.key,t.props,null,e.mode,n)).ref=q$(e,null,t),n.return=e,n;case hB:return(t=g$(t,e.mode,n)).return=e,t}if(N$(t)||kB(t))return(t=p$(t,e.mode,n,null)).return=e,t;D$(e,t)}return null}function f(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==i?null:s(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case fB:return n.key===i?n.type===pB?c(e,t,n.props.children,r,i):l(e,t,n,r):null;case hB:return n.key===i?u(e,t,n,r):null}if(N$(n)||kB(n))return null!==i?null:c(e,t,n,r,null);D$(e,n)}return null}function h(e,t,n,r,i){if("string"==typeof r||"number"==typeof r)return s(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case fB:return e=e.get(null===r.key?n:r.key)||null,r.type===pB?c(t,e,r.props.children,i,r.key):l(t,e,r,i);case hB:return u(t,e=e.get(null===r.key?n:r.key)||null,r,i)}if(N$(r)||kB(r))return c(t,e=e.get(n)||null,r,i,null);D$(t,r)}return null}function p(i,a,s,l){for(var u=null,c=null,p=a,m=a=0,y=null;null!==p&&m<s.length;m++){p.index>m?(y=p,p=null):y=p.sibling;var g=f(i,p,s[m],l);if(null===g){null===p&&(p=y);break}e&&p&&null===g.alternate&&t(i,p),a=o(g,a,m),null===c?u=g:c.sibling=g,c=g,p=y}if(m===s.length)return n(i,p),u;if(null===p){for(;m<s.length;m++)(p=d(i,s[m],l))&&(a=o(p,a,m),null===c?u=p:c.sibling=p,c=p);return u}for(p=r(i,p);m<s.length;m++)(y=h(p,i,m,s[m],l))&&(e&&null!==y.alternate&&p.delete(null===y.key?m:y.key),a=o(y,a,m),null===c?u=y:c.sibling=y,c=y);return e&&p.forEach((function(e){return t(i,e)})),u}function m(i,a,s,l){var u=kB(s);"function"!=typeof u&&Ez("150"),null==(s=u.call(s))&&Ez("151");for(var c=u=null,p=a,m=a=0,y=null,g=s.next();null!==p&&!g.done;m++,g=s.next()){p.index>m?(y=p,p=null):y=p.sibling;var v=f(i,p,g.value,l);if(null===v){p||(p=y);break}e&&p&&null===v.alternate&&t(i,p),a=o(v,a,m),null===c?u=v:c.sibling=v,c=v,p=y}if(g.done)return n(i,p),u;if(null===p){for(;!g.done;m++,g=s.next())null!==(g=d(i,g.value,l))&&(a=o(g,a,m),null===c?u=g:c.sibling=g,c=g);return u}for(p=r(i,p);!g.done;m++,g=s.next())null!==(g=h(p,i,m,g.value,l))&&(e&&null!==g.alternate&&p.delete(null===g.key?m:g.key),a=o(g,a,m),null===c?u=g:c.sibling=g,c=g);return e&&p.forEach((function(e){return t(i,e)})),u}return function(e,r,o,s){var l="object"==typeof o&&null!==o&&o.type===pB&&null===o.key;l&&(o=o.props.children);var u="object"==typeof o&&null!==o;if(u)switch(o.$$typeof){case fB:e:{for(u=o.key,l=r;null!==l;){if(l.key===u){if(7===l.tag?o.type===pB:l.elementType===o.type){n(e,l.sibling),(r=i(l,o.type===pB?o.props.children:o.props)).ref=q$(e,l,o),r.return=e,e=r;break e}n(e,l);break}t(e,l),l=l.sibling}o.type===pB?((r=p$(o.props.children,e.mode,s,o.key)).return=e,e=r):((s=h$(o.type,o.key,o.props,null,e.mode,s)).ref=q$(e,r,o),s.return=e,e=s)}return a(e);case hB:e:{for(l=o.key;null!==r;){if(r.key===l){if(4===r.tag&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),(r=i(r,o.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=g$(o,e.mode,s)).return=e,e=r}return a(e)}if("string"==typeof o||"number"==typeof o)return o=""+o,null!==r&&6===r.tag?(n(e,r.sibling),(r=i(r,o)).return=e,e=r):(n(e,r),(r=y$(o,e.mode,s)).return=e,e=r),a(e);if(N$(o))return p(e,r,o,s);if(kB(o))return m(e,r,o,s);if(u&&D$(e,o),void 0===o&&!l)switch(e.tag){case 1:case 0:Ez("152",(s=e.type).displayName||s.name||"Component")}return n(e,r)}}var I$=R$(!0),_$=R$(!1),P$={},L$={current:P$},j$={current:P$},z$={current:P$};function F$(e){return e===P$&&Ez("174"),e}function B$(e,t){YH(z$,t),YH(j$,e),YH(L$,P$);var n=t.nodeType;switch(n){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:MH(null,"");break;default:t=MH(t=(n=8===n?t.parentNode:t).namespaceURI||null,n=n.tagName)}WH(L$),YH(L$,t)}function V$(e){WH(L$),WH(j$),WH(z$)}function H$(e){F$(z$.current);var t=F$(L$.current),n=MH(t,e.type);t!==n&&(YH(j$,e),YH(L$,n))}function $$(e){j$.current===e&&(WH(L$),WH(j$))}var U$=uB.ReactCurrentDispatcher,W$=0,Y$=null,X$=null,G$=null,K$=null,J$=null,Z$=null,Q$=0,eU=null,tU=0,nU=!1,rU=null,iU=0;function oU(){Ez("307")}function aU(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!gV(e[n],t[n]))return!1;return!0}function sU(e,t,n,r,i,o){if(W$=o,Y$=t,G$=null!==e?e.memoizedState:null,U$.current=null===G$?xU:MU,t=n(r,i),nU){do{nU=!1,iU+=1,G$=null!==e?e.memoizedState:null,Z$=K$,eU=J$=X$=null,U$.current=MU,t=n(r,i)}while(nU);rU=null,iU=0}return U$.current=bU,(e=Y$).memoizedState=K$,e.expirationTime=Q$,e.updateQueue=eU,e.effectTag|=tU,e=null!==X$&&null!==X$.next,W$=0,Z$=J$=K$=G$=X$=Y$=null,Q$=0,eU=null,tU=0,e&&Ez("300"),t}function lU(){U$.current=bU,W$=0,Z$=J$=K$=G$=X$=Y$=null,Q$=0,eU=null,tU=0,nU=!1,rU=null,iU=0}function uU(){var e={memoizedState:null,baseState:null,queue:null,baseUpdate:null,next:null};return null===J$?K$=J$=e:J$=J$.next=e,J$}function cU(){if(null!==Z$)Z$=(J$=Z$).next,G$=null!==(X$=G$)?X$.next:null;else{null===G$&&Ez("310");var e={memoizedState:(X$=G$).memoizedState,baseState:X$.baseState,queue:X$.queue,baseUpdate:X$.baseUpdate,next:null};J$=null===J$?K$=e:J$.next=e,G$=X$.next}return J$}function dU(e,t){return"function"==typeof t?t(e):t}function fU(e){var t=cU(),n=t.queue;if(null===n&&Ez("311"),0<iU){var r=n.dispatch;if(null!==rU){var i=rU.get(n);if(void 0!==i){rU.delete(n);var o=t.memoizedState;do{o=e(o,i.action),i=i.next}while(null!==i);return gV(o,t.memoizedState)||(DU=!0),t.memoizedState=o,t.baseUpdate===n.last&&(t.baseState=o),n.eagerReducer=e,n.eagerState=o,[o,r]}}return[t.memoizedState,r]}r=n.last;var a=t.baseUpdate;if(o=t.baseState,null!==a?(null!==r&&(r.next=null),r=a.next):r=null!==r?r.next:null,null!==r){var s=i=null,l=r,u=!1;do{var c=l.expirationTime;c<W$?(u||(u=!0,s=a,i=o),c>Q$&&(Q$=c)):o=l.eagerReducer===e?l.eagerState:e(o,l.action),a=l,l=l.next}while(null!==l&&l!==r);u||(s=a,i=o),gV(o,t.memoizedState)||(DU=!0),t.memoizedState=o,t.baseUpdate=s,t.baseState=i,n.eagerReducer=e,n.eagerState=o}return[t.memoizedState,n.dispatch]}function hU(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===eU?(eU={lastEffect:null}).lastEffect=e.next=e:null===(t=eU.lastEffect)?eU.lastEffect=e.next=e:(n=t.next,t.next=e,e.next=n,eU.lastEffect=e),e}function pU(e,t,n,r){var i=uU();tU|=e,i.memoizedState=hU(t,n,void 0,void 0===r?null:r)}function mU(e,t,n,r){var i=cU();r=void 0===r?null:r;var o=void 0;if(null!==X$){var a=X$.memoizedState;if(o=a.destroy,null!==r&&aU(r,a.deps))return void hU(0,n,o,r)}tU|=e,i.memoizedState=hU(t,n,o,r)}function yU(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function gU(){}function vU(e,t,n){25>iU||Ez("301");var r=e.alternate;if(e===Y$||null!==r&&r===Y$)if(nU=!0,e={expirationTime:W$,action:n,eagerReducer:null,eagerState:null,next:null},null===rU&&(rU=new Map),void 0===(n=rU.get(t)))rU.set(t,e);else{for(t=n;null!==t.next;)t=t.next;t.next=e}else{JW();var i=DY(),o={expirationTime:i=rY(i,e),action:n,eagerReducer:null,eagerState:null,next:null},a=t.last;if(null===a)o.next=o;else{var s=a.next;null!==s&&(o.next=s),a.next=o}if(t.last=o,0===e.expirationTime&&(null===r||0===r.expirationTime)&&null!==(r=t.eagerReducer))try{var l=t.eagerState,u=r(l,n);if(o.eagerReducer=r,o.eagerState=u,gV(u,l))return}catch(e){}sY(e,i)}}var bU={readContext:ZU,useCallback:oU,useContext:oU,useEffect:oU,useImperativeHandle:oU,useLayoutEffect:oU,useMemo:oU,useReducer:oU,useRef:oU,useState:oU,useDebugValue:oU},xU={readContext:ZU,useCallback:function(e,t){return uU().memoizedState=[e,void 0===t?null:t],e},useContext:ZU,useEffect:function(e,t){return pU(516,192,e,t)},useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,pU(4,36,yU.bind(null,t,e),n)},useLayoutEffect:function(e,t){return pU(4,36,e,t)},useMemo:function(e,t){var n=uU();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=uU();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={last:null,dispatch:null,eagerReducer:e,eagerState:t}).dispatch=vU.bind(null,Y$,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},uU().memoizedState=e},useState:function(e){var t=uU();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={last:null,dispatch:null,eagerReducer:dU,eagerState:e}).dispatch=vU.bind(null,Y$,e),[t.memoizedState,e]},useDebugValue:gU},MU={readContext:ZU,useCallback:function(e,t){var n=cU();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&aU(t,r[1])?r[0]:(n.memoizedState=[e,t],e)},useContext:ZU,useEffect:function(e,t){return mU(516,192,e,t)},useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,mU(4,36,yU.bind(null,t,e),n)},useLayoutEffect:function(e,t){return mU(4,36,e,t)},useMemo:function(e,t){var n=cU();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&aU(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)},useReducer:fU,useRef:function(){return cU().memoizedState},useState:function(e){return fU(dU)},useDebugValue:gU},SU=null,wU=null,EU=!1;function kU(e,t){var n=c$(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function CU(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);case 13:default:return!1}}function OU(e){if(EU){var t=wU;if(t){var n=t;if(!CU(e,t)){if(!(t=VH(n))||!CU(e,t))return e.effectTag|=2,EU=!1,void(SU=e);kU(SU,n)}SU=e,wU=HH(t)}else e.effectTag|=2,EU=!1,SU=e}}function TU(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&18!==e.tag;)e=e.return;SU=e}function AU(e){if(e!==SU)return!1;if(!EU)return TU(e),EU=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!LH(t,e.memoizedProps))for(t=wU;t;)kU(e,t),t=VH(t);return TU(e),wU=SU?VH(e.stateNode):null,!0}function NU(){wU=SU=null,EU=!1}var qU=uB.ReactCurrentOwner,DU=!1;function RU(e,t,n,r){t.child=null===e?_$(t,null,n,r):I$(t,e.child,n,r)}function IU(e,t,n,r,i){n=n.render;var o=t.ref;return JU(t,i),r=sU(e,t,n,r,o,i),null===e||DU?(t.effectTag|=1,RU(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=i&&(e.expirationTime=0),HU(e,t,i))}function _U(e,t,n,r,i,o){if(null===e){var a=n.type;return"function"!=typeof a||d$(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=h$(n.type,null,r,null,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,PU(e,t,a,r,i,o))}return a=e.child,i<o&&(i=a.memoizedProps,(n=null!==(n=n.compare)?n:bV)(i,r)&&e.ref===t.ref)?HU(e,t,o):(t.effectTag|=1,(e=f$(a,r)).ref=t.ref,e.return=t,t.child=e)}function PU(e,t,n,r,i,o){return null!==e&&bV(e.memoizedProps,r)&&e.ref===t.ref&&(DU=!1,i<o)?HU(e,t,o):jU(e,t,n,r,o)}function LU(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function jU(e,t,n,r,i){var o=QH(n)?JH:GH.current;return o=ZH(t,o),JU(t,i),n=sU(e,t,n,r,o,i),null===e||DU?(t.effectTag|=1,RU(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=i&&(e.expirationTime=0),HU(e,t,i))}function zU(e,t,n,r,i){if(QH(n)){var o=!0;i$(t)}else o=!1;if(JU(t,i),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),O$(t,n,r),A$(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,u=n.contextType;"object"==typeof u&&null!==u?u=ZU(u):u=ZH(t,u=QH(n)?JH:GH.current);var c=n.getDerivedStateFromProps,d="function"==typeof c||"function"==typeof a.getSnapshotBeforeUpdate;d||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||l!==u)&&T$(t,a,r,u),tW=!1;var f=t.memoizedState;l=a.state=f;var h=t.updateQueue;null!==h&&(cW(t,h,r,a,i),l=t.memoizedState),s!==r||f!==l||KH.current||tW?("function"==typeof c&&(E$(t,n,c,r),l=t.memoizedState),(s=tW||C$(t,n,s,r,f,l,u))?(d||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.effectTag|=4)):("function"==typeof a.componentDidMount&&(t.effectTag|=4),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=u,r=s):("function"==typeof a.componentDidMount&&(t.effectTag|=4),r=!1)}else a=t.stateNode,s=t.memoizedProps,a.props=t.type===t.elementType?s:S$(t.type,s),l=a.context,"object"==typeof(u=n.contextType)&&null!==u?u=ZU(u):u=ZH(t,u=QH(n)?JH:GH.current),(d="function"==typeof(c=n.getDerivedStateFromProps)||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||l!==u)&&T$(t,a,r,u),tW=!1,l=t.memoizedState,f=a.state=l,null!==(h=t.updateQueue)&&(cW(t,h,r,a,i),f=t.memoizedState),s!==r||l!==f||KH.current||tW?("function"==typeof c&&(E$(t,n,c,r),f=t.memoizedState),(c=tW||C$(t,n,s,r,l,f,u))?(d||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,f,u),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,f,u)),"function"==typeof a.componentDidUpdate&&(t.effectTag|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=256),t.memoizedProps=r,t.memoizedState=f),a.props=r,a.state=f,a.context=u,r=c):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=256),r=!1);return FU(e,t,n,r,o,i)}function FU(e,t,n,r,i,o){LU(e,t);var a=0!=(64&t.effectTag);if(!r&&!a)return i&&o$(t,n,!1),HU(e,t,o);r=t.stateNode,qU.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.effectTag|=1,null!==e&&a?(t.child=I$(t,e.child,null,o),t.child=I$(t,null,s,o)):RU(e,t,s,o),t.memoizedState=r.state,i&&o$(t,n,!0),t.child}function BU(e){var t=e.stateNode;t.pendingContext?n$(0,t.pendingContext,t.pendingContext!==t.context):t.context&&n$(0,t.context,!1),B$(e,t.containerInfo)}function VU(e,t,n){var r=t.mode,i=t.pendingProps,o=t.memoizedState;if(0==(64&t.effectTag)){o=null;var a=!1}else o={timedOutAt:null!==o?o.timedOutAt:0},a=!0,t.effectTag&=-65;if(null===e)if(a){var s=i.fallback;e=p$(null,r,0,null),0==(1&t.mode)&&(e.child=null!==t.memoizedState?t.child.child:t.child),r=p$(s,r,n,null),e.sibling=r,(n=e).return=r.return=t}else n=r=_$(t,null,i.children,n);else null!==e.memoizedState?(s=(r=e.child).sibling,a?(n=i.fallback,i=f$(r,r.pendingProps),0==(1&t.mode)&&((a=null!==t.memoizedState?t.child.child:t.child)!==r.child&&(i.child=a)),r=i.sibling=f$(s,n,s.expirationTime),n=i,i.childExpirationTime=0,n.return=r.return=t):n=r=I$(t,r.child,i.children,n)):(s=e.child,a?(a=i.fallback,(i=p$(null,r,0,null)).child=s,0==(1&t.mode)&&(i.child=null!==t.memoizedState?t.child.child:t.child),(r=i.sibling=p$(a,r,n,null)).effectTag|=2,n=i,i.childExpirationTime=0,n.return=r.return=t):r=n=I$(t,s,i.children,n)),t.stateNode=e.stateNode;return t.memoizedState=o,t.child=n,r}function HU(e,t,n){if(null!==e&&(t.contextDependencies=e.contextDependencies),t.childExpirationTime<n)return null;if(null!==e&&t.child!==e.child&&Ez("153"),null!==t.child){for(n=f$(e=t.child,e.pendingProps,e.expirationTime),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=f$(e,e.pendingProps,e.expirationTime)).return=t;n.sibling=null}return t.child}function $U(e,t,n){var r=t.expirationTime;if(null!==e){if(e.memoizedProps!==t.pendingProps||KH.current)DU=!0;else if(r<n){switch(DU=!1,t.tag){case 3:BU(t),NU();break;case 5:H$(t);break;case 1:QH(t.type)&&i$(t);break;case 4:B$(t,t.stateNode.containerInfo);break;case 10:GU(t,t.memoizedProps.value);break;case 13:if(null!==t.memoizedState)return 0!==(r=t.child.childExpirationTime)&&r>=n?VU(e,t,n):null!==(t=HU(e,t,n))?t.sibling:null}return HU(e,t,n)}}else DU=!1;switch(t.expirationTime=0,t.tag){case 2:r=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps;var i=ZH(t,GH.current);if(JU(t,n),i=sU(null,t,r,e,i,n),t.effectTag|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof){if(t.tag=1,lU(),QH(r)){var o=!0;i$(t)}else o=!1;t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null;var a=r.getDerivedStateFromProps;"function"==typeof a&&E$(t,r,a,e),i.updater=k$,t.stateNode=i,i._reactInternalFiber=t,A$(t,r,e,n),t=FU(null,t,r,!0,o,n)}else t.tag=0,RU(null,t,i,n),t=t.child;return t;case 16:switch(i=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),o=t.pendingProps,e=function(e){var t=e._result;switch(e._status){case 1:return t;case 2:case 0:throw t;default:switch(e._status=0,(t=(t=e._ctor)()).then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)})),e._status){case 1:return e._result;case 2:throw e._result}throw e._result=t,t}}(i),t.type=e,i=t.tag=function(e){if("function"==typeof e)return d$(e)?1:0;if(null!=e){if((e=e.$$typeof)===xB)return 11;if(e===SB)return 14}return 2}(e),o=S$(e,o),a=void 0,i){case 0:a=jU(null,t,e,o,n);break;case 1:a=zU(null,t,e,o,n);break;case 11:a=IU(null,t,e,o,n);break;case 14:a=_U(null,t,e,S$(e.type,o),r,n);break;default:Ez("306",e,"")}return a;case 0:return r=t.type,i=t.pendingProps,jU(e,t,r,i=t.elementType===r?i:S$(r,i),n);case 1:return r=t.type,i=t.pendingProps,zU(e,t,r,i=t.elementType===r?i:S$(r,i),n);case 3:return BU(t),null===(r=t.updateQueue)&&Ez("282"),i=null!==(i=t.memoizedState)?i.element:null,cW(t,r,t.pendingProps,null,n),(r=t.memoizedState.element)===i?(NU(),t=HU(e,t,n)):(i=t.stateNode,(i=(null===e||null===e.child)&&i.hydrate)&&(wU=HH(t.stateNode.containerInfo),SU=t,i=EU=!0),i?(t.effectTag|=2,t.child=_$(t,null,r,n)):(RU(e,t,r,n),NU()),t=t.child),t;case 5:return H$(t),null===e&&OU(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,a=i.children,LH(r,i)?a=null:null!==o&&LH(r,o)&&(t.effectTag|=16),LU(e,t),1!==n&&1&t.mode&&i.hidden?(t.expirationTime=t.childExpirationTime=1,t=null):(RU(e,t,a,n),t=t.child),t;case 6:return null===e&&OU(t),null;case 13:return VU(e,t,n);case 4:return B$(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=I$(t,null,r,n):RU(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,IU(e,t,r,i=t.elementType===r?i:S$(r,i),n);case 7:return RU(e,t,t.pendingProps,n),t.child;case 8:case 12:return RU(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,a=t.memoizedProps,GU(t,o=i.value),null!==a){var s=a.value;if(0===(o=gV(s,o)?0:0|("function"==typeof r._calculateChangedBits?r._calculateChangedBits(s,o):1073741823))){if(a.children===i.children&&!KH.current){t=HU(e,t,n);break e}}else for(null!==(s=t.child)&&(s.return=t);null!==s;){var l=s.contextDependencies;if(null!==l){a=s.child;for(var u=l.first;null!==u;){if(u.context===r&&0!=(u.observedBits&o)){1===s.tag&&((u=iW(n)).tag=eW,aW(s,u)),s.expirationTime<n&&(s.expirationTime=n),null!==(u=s.alternate)&&u.expirationTime<n&&(u.expirationTime=n),u=n;for(var c=s.return;null!==c;){var d=c.alternate;if(c.childExpirationTime<u)c.childExpirationTime=u,null!==d&&d.childExpirationTime<u&&(d.childExpirationTime=u);else{if(!(null!==d&&d.childExpirationTime<u))break;d.childExpirationTime=u}c=c.return}l.expirationTime<n&&(l.expirationTime=n);break}u=u.next}}else a=10===s.tag&&s.type===t.type?null:s.child;if(null!==a)a.return=s;else for(a=s;null!==a;){if(a===t){a=null;break}if(null!==(s=a.sibling)){s.return=a.return,a=s;break}a=a.return}s=a}}RU(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=(o=t.pendingProps).children,JU(t,n),r=r(i=ZU(i,o.unstable_observedBits)),t.effectTag|=1,RU(e,t,r,n),t.child;case 14:return o=S$(i=t.type,t.pendingProps),_U(e,t,i,o=S$(i.type,o),r,n);case 15:return PU(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:S$(r,i),null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),t.tag=1,QH(r)?(e=!0,i$(t)):e=!1,JU(t,n),O$(t,r,i),A$(t,r,i,n),FU(null,t,r,!0,e,n)}Ez("156")}var UU={current:null},WU=null,YU=null,XU=null;function GU(e,t){var n=e.type._context;YH(UU,n._currentValue),n._currentValue=t}function KU(e){var t=UU.current;WH(UU),e.type._context._currentValue=t}function JU(e,t){WU=e,XU=YU=null;var n=e.contextDependencies;null!==n&&n.expirationTime>=t&&(DU=!0),e.contextDependencies=null}function ZU(e,t){return XU!==e&&!1!==t&&0!==t&&("number"==typeof t&&1073741823!==t||(XU=e,t=1073741823),t={context:e,observedBits:t,next:null},null===YU?(null===WU&&Ez("308"),YU=t,WU.contextDependencies={first:t,expirationTime:0}):YU=YU.next=t),e._currentValue}var QU=1,eW=2,tW=!1;function nW(e){return{baseState:e,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function rW(e){return{baseState:e.baseState,firstUpdate:e.firstUpdate,lastUpdate:e.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function iW(e){return{expirationTime:e,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function oW(e,t){null===e.lastUpdate?e.firstUpdate=e.lastUpdate=t:(e.lastUpdate.next=t,e.lastUpdate=t)}function aW(e,t){var n=e.alternate;if(null===n){var r=e.updateQueue,i=null;null===r&&(r=e.updateQueue=nW(e.memoizedState))}else r=e.updateQueue,i=n.updateQueue,null===r?null===i?(r=e.updateQueue=nW(e.memoizedState),i=n.updateQueue=nW(n.memoizedState)):r=e.updateQueue=rW(i):null===i&&(i=n.updateQueue=rW(r));null===i||r===i?oW(r,t):null===r.lastUpdate||null===i.lastUpdate?(oW(r,t),oW(i,t)):(oW(r,t),i.lastUpdate=t)}function sW(e,t){var n=e.updateQueue;null===(n=null===n?e.updateQueue=nW(e.memoizedState):lW(e,n)).lastCapturedUpdate?n.firstCapturedUpdate=n.lastCapturedUpdate=t:(n.lastCapturedUpdate.next=t,n.lastCapturedUpdate=t)}function lW(e,t){var n=e.alternate;return null!==n&&t===n.updateQueue&&(t=e.updateQueue=rW(t)),t}function uW(e,t,n,r,i,o){switch(n.tag){case QU:return"function"==typeof(e=n.payload)?e.call(o,r,i):e;case 3:e.effectTag=-2049&e.effectTag|64;case 0:if(null==(i="function"==typeof(e=n.payload)?e.call(o,r,i):e))break;return Mz({},r,i);case eW:tW=!0}return r}function cW(e,t,n,r,i){tW=!1;for(var o=(t=lW(e,t)).baseState,a=null,s=0,l=t.firstUpdate,u=o;null!==l;){var c=l.expirationTime;c<i?(null===a&&(a=l,o=u),s<c&&(s=c)):(u=uW(e,0,l,u,n,r),null!==l.callback&&(e.effectTag|=32,l.nextEffect=null,null===t.lastEffect?t.firstEffect=t.lastEffect=l:(t.lastEffect.nextEffect=l,t.lastEffect=l))),l=l.next}for(c=null,l=t.firstCapturedUpdate;null!==l;){var d=l.expirationTime;d<i?(null===c&&(c=l,null===a&&(o=u)),s<d&&(s=d)):(u=uW(e,0,l,u,n,r),null!==l.callback&&(e.effectTag|=32,l.nextEffect=null,null===t.lastCapturedEffect?t.firstCapturedEffect=t.lastCapturedEffect=l:(t.lastCapturedEffect.nextEffect=l,t.lastCapturedEffect=l))),l=l.next}null===a&&(t.lastUpdate=null),null===c?t.lastCapturedUpdate=null:e.effectTag|=32,null===a&&null===c&&(o=u),t.baseState=o,t.firstUpdate=a,t.firstCapturedUpdate=c,e.expirationTime=s,e.memoizedState=u}function dW(e,t,n){null!==t.firstCapturedUpdate&&(null!==t.lastUpdate&&(t.lastUpdate.next=t.firstCapturedUpdate,t.lastUpdate=t.lastCapturedUpdate),t.firstCapturedUpdate=t.lastCapturedUpdate=null),fW(t.firstEffect,n),t.firstEffect=t.lastEffect=null,fW(t.firstCapturedEffect,n),t.firstCapturedEffect=t.lastCapturedEffect=null}function fW(e,t){for(;null!==e;){var n=e.callback;if(null!==n){e.callback=null;var r=t;"function"!=typeof n&&Ez("191",n),n.call(r)}e=e.nextEffect}}function hW(e,t){return{value:e,source:t,stack:OB(t)}}function pW(e){e.effectTag|=4}var mW,yW,gW;mW=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},yW=function(e,t,n,r,i){var o=e.memoizedProps;if(o!==r){var a=t.stateNode;switch(F$(L$.current),e=null,n){case"input":o=jB(a,o),r=jB(a,r),e=[];break;case"option":o=fH(a,o),r=fH(a,r),e=[];break;case"select":o=Mz({},o,{value:void 0}),r=Mz({},r,{value:void 0}),e=[];break;case"textarea":o=pH(a,o),r=pH(a,r),e=[];break;default:"function"!=typeof o.onClick&&"function"==typeof r.onClick&&(a.onclick=RH)}NH(n,r),a=n=void 0;var s=null;for(n in o)if(!r.hasOwnProperty(n)&&o.hasOwnProperty(n)&&null!=o[n])if("style"===n){var l=o[n];for(a in l)l.hasOwnProperty(a)&&(s||(s={}),s[a]="")}else"dangerouslySetInnerHTML"!==n&&"children"!==n&&"suppressContentEditableWarning"!==n&&"suppressHydrationWarning"!==n&&"autoFocus"!==n&&(jz.hasOwnProperty(n)?e||(e=[]):(e=e||[]).push(n,null));for(n in r){var u=r[n];if(l=null!=o?o[n]:void 0,r.hasOwnProperty(n)&&u!==l&&(null!=u||null!=l))if("style"===n)if(l){for(a in l)!l.hasOwnProperty(a)||u&&u.hasOwnProperty(a)||(s||(s={}),s[a]="");for(a in u)u.hasOwnProperty(a)&&l[a]!==u[a]&&(s||(s={}),s[a]=u[a])}else s||(e||(e=[]),e.push(n,s)),s=u;else"dangerouslySetInnerHTML"===n?(u=u?u.__html:void 0,l=l?l.__html:void 0,null!=u&&l!==u&&(e=e||[]).push(n,""+u)):"children"===n?l===u||"string"!=typeof u&&"number"!=typeof u||(e=e||[]).push(n,""+u):"suppressContentEditableWarning"!==n&&"suppressHydrationWarning"!==n&&(jz.hasOwnProperty(n)?(null!=u&&DH(i,n),e||l===u||(e=[])):(e=e||[]).push(n,u))}s&&(e=e||[]).push("style",s),i=e,(t.updateQueue=i)&&pW(t)}},gW=function(e,t,n,r){n!==r&&pW(t)};var vW="function"==typeof WeakSet?WeakSet:Set;function bW(e,t){var n=t.source,r=t.stack;null===r&&null!==n&&(r=OB(n)),null!==n&&CB(n.type),t=t.value,null!==e&&1===e.tag&&CB(e.type);try{console.error(t)}catch(e){setTimeout((function(){throw e}))}}function xW(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){nY(e,t)}else t.current=null}function MW(e,t,n){if(null!==(n=null!==(n=n.updateQueue)?n.lastEffect:null)){var r=n=n.next;do{if(0!=(r.tag&e)){var i=r.destroy;r.destroy=void 0,void 0!==i&&i()}0!=(r.tag&t)&&(i=r.create,r.destroy=i()),r=r.next}while(r!==n)}}function SW(e){switch("function"==typeof s$&&s$(e),e.tag){case 0:case 11:case 14:case 15:var t=e.updateQueue;if(null!==t&&null!==(t=t.lastEffect)){var n=t=t.next;do{var r=n.destroy;if(void 0!==r){var i=e;try{r()}catch(e){nY(i,e)}}n=n.next}while(n!==t)}break;case 1:if(xW(e),"function"==typeof(t=e.stateNode).componentWillUnmount)try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(t){nY(e,t)}break;case 5:xW(e);break;case 4:kW(e)}}function wW(e){return 5===e.tag||3===e.tag||4===e.tag}function EW(e){e:{for(var t=e.return;null!==t;){if(wW(t)){var n=t;break e}t=t.return}Ez("160"),n=void 0}var r=t=void 0;switch(n.tag){case 5:t=n.stateNode,r=!1;break;case 3:case 4:t=n.stateNode.containerInfo,r=!0;break;default:Ez("161")}16&n.effectTag&&(EH(t,""),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||wW(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}for(var i=e;;){if(5===i.tag||6===i.tag)if(n)if(r){var o=t,a=i.stateNode,s=n;8===o.nodeType?o.parentNode.insertBefore(a,s):o.insertBefore(a,s)}else t.insertBefore(i.stateNode,n);else r?(a=t,s=i.stateNode,8===a.nodeType?(o=a.parentNode).insertBefore(s,a):(o=a).appendChild(s),null!=(a=a._reactRootContainer)||null!==o.onclick||(o.onclick=RH)):t.appendChild(i.stateNode);else if(4!==i.tag&&null!==i.child){i.child.return=i,i=i.child;continue}if(i===e)break;for(;null===i.sibling;){if(null===i.return||i.return===e)return;i=i.return}i.sibling.return=i.return,i=i.sibling}}function kW(e){for(var t=e,n=!1,r=void 0,i=void 0;;){if(!n){n=t.return;e:for(;;){switch(null===n&&Ez("160"),n.tag){case 5:r=n.stateNode,i=!1;break e;case 3:case 4:r=n.stateNode.containerInfo,i=!0;break e}n=n.return}n=!0}if(5===t.tag||6===t.tag){e:for(var o=t,a=o;;)if(SW(a),null!==a.child&&4!==a.tag)a.child.return=a,a=a.child;else{if(a===o)break;for(;null===a.sibling;){if(null===a.return||a.return===o)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}i?(o=r,a=t.stateNode,8===o.nodeType?o.parentNode.removeChild(a):o.removeChild(a)):r.removeChild(t.stateNode)}else if(4===t.tag){if(null!==t.child){r=t.stateNode.containerInfo,i=!0,t.child.return=t,t=t.child;continue}}else if(SW(t),null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return;4===(t=t.return).tag&&(n=!1)}t.sibling.return=t.return,t=t.sibling}}function CW(e,t){switch(t.tag){case 0:case 11:case 14:case 15:MW(4,8,t);break;case 1:break;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps;e=null!==e?e.memoizedProps:r;var i=t.type,o=t.updateQueue;t.updateQueue=null,null!==o&&function(e,t,n,r,i){e[Qz]=i,"input"===n&&"radio"===i.type&&null!=i.name&&FB(e,i),qH(n,r),r=qH(n,i);for(var o=0;o<t.length;o+=2){var a=t[o],s=t[o+1];"style"===a?TH(e,s):"dangerouslySetInnerHTML"===a?wH(e,s):"children"===a?EH(e,s):PB(e,a,s,r)}switch(n){case"input":BB(e,i);break;case"textarea":yH(e,i);break;case"select":t=e._wrapperState.wasMultiple,e._wrapperState.wasMultiple=!!i.multiple,null!=(n=i.value)?hH(e,!!i.multiple,n,!1):t!==!!i.multiple&&(null!=i.defaultValue?hH(e,!!i.multiple,i.defaultValue,!0):hH(e,!!i.multiple,i.multiple?[]:"",!1))}}(n,o,i,e,r)}break;case 6:null===t.stateNode&&Ez("162"),t.stateNode.nodeValue=t.memoizedProps;break;case 3:case 12:break;case 13:if(n=t.memoizedState,r=void 0,e=t,null===n?r=!1:(r=!0,e=t.child,0===n.timedOutAt&&(n.timedOutAt=DY())),null!==e&&function(e,t){for(var n=e;;){if(5===n.tag){var r=n.stateNode;if(t)r.style.display="none";else{r=n.stateNode;var i=n.memoizedProps.style;i=null!=i&&i.hasOwnProperty("display")?i.display:null,r.style.display=OH("display",i)}}else if(6===n.tag)n.stateNode.nodeValue=t?"":n.memoizedProps;else{if(13===n.tag&&null!==n.memoizedState){(r=n.child.sibling).return=n,n=r;continue}if(null!==n.child){n.child.return=n,n=n.child;continue}}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}(e,r),null!==(n=t.updateQueue)){t.updateQueue=null;var a=t.stateNode;null===a&&(a=t.stateNode=new vW),n.forEach((function(e){var n=oY.bind(null,t,e);a.has(e)||(a.add(e),e.then(n,n))}))}break;case 17:break;default:Ez("163")}}var OW="function"==typeof WeakMap?WeakMap:Map;function TW(e,t,n){(n=iW(n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){VY(r),bW(e,t)},n}function AW(e,t,n){(n=iW(n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return r(i)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===UW?UW=new Set([this]):UW.add(this));var n=t.value,i=t.stack;bW(e,t),this.componentDidCatch(n,{componentStack:null!==i?i:""})}),n}function NW(e){switch(e.tag){case 1:QH(e.type)&&e$();var t=e.effectTag;return 2048&t?(e.effectTag=-2049&t|64,e):null;case 3:return V$(),t$(),0!=(64&(t=e.effectTag))&&Ez("285"),e.effectTag=-2049&t|64,e;case 5:return $$(e),null;case 13:return 2048&(t=e.effectTag)?(e.effectTag=-2049&t|64,e):null;case 18:return null;case 4:return V$(),null;case 10:return KU(e),null;default:return null}}var qW=uB.ReactCurrentDispatcher,DW=uB.ReactCurrentOwner,RW=1073741822,IW=!1,_W=null,PW=null,LW=0,jW=-1,zW=!1,FW=null,BW=!1,VW=null,HW=null,$W=null,UW=null;function WW(){if(null!==_W)for(var e=_W.return;null!==e;){var t=e;switch(t.tag){case 1:var n=t.type.childContextTypes;null!=n&&e$();break;case 3:V$(),t$();break;case 5:$$(t);break;case 4:V$();break;case 10:KU(t)}e=e.return}PW=null,LW=0,jW=-1,zW=!1,_W=null}function YW(){for(;null!==FW;){var e=FW.effectTag;if(16&e&&EH(FW.stateNode,""),128&e){var t=FW.alternate;null!==t&&(null!==(t=t.ref)&&("function"==typeof t?t(null):t.current=null))}switch(14&e){case 2:EW(FW),FW.effectTag&=-3;break;case 6:EW(FW),FW.effectTag&=-3,CW(FW.alternate,FW);break;case 4:CW(FW.alternate,FW);break;case 8:kW(e=FW),e.return=null,e.child=null,e.memoizedState=null,e.updateQueue=null,null!==(e=e.alternate)&&(e.return=null,e.child=null,e.memoizedState=null,e.updateQueue=null)}FW=FW.nextEffect}}function XW(){for(;null!==FW;){if(256&FW.effectTag)e:{var e=FW.alternate,t=FW;switch(t.tag){case 0:case 11:case 15:MW(2,0,t);break e;case 1:if(256&t.effectTag&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:S$(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}break e;case 3:case 5:case 6:case 4:case 17:break e;default:Ez("163")}}FW=FW.nextEffect}}function GW(e,t){for(;null!==FW;){var n=FW.effectTag;if(36&n){var r=FW.alternate,i=FW,o=t;switch(i.tag){case 0:case 11:case 15:MW(16,32,i);break;case 1:var a=i.stateNode;if(4&i.effectTag)if(null===r)a.componentDidMount();else{var s=i.elementType===i.type?r.memoizedProps:S$(i.type,r.memoizedProps);a.componentDidUpdate(s,r.memoizedState,a.__reactInternalSnapshotBeforeUpdate)}null!==(r=i.updateQueue)&&dW(0,r,a);break;case 3:if(null!==(r=i.updateQueue)){if(a=null,null!==i.child)switch(i.child.tag){case 5:a=i.child.stateNode;break;case 1:a=i.child.stateNode}dW(0,r,a)}break;case 5:o=i.stateNode,null===r&&4&i.effectTag&&PH(i.type,i.memoizedProps)&&o.focus();break;case 6:case 4:case 12:case 13:case 17:break;default:Ez("163")}}128&n&&(null!==(i=FW.ref)&&(o=FW.stateNode,"function"==typeof i?i(o):i.current=o)),512&n&&(VW=e),FW=FW.nextEffect}}function KW(e,t){$W=HW=VW=null;var n=hY;hY=!0;do{if(512&t.effectTag){var r=!1,i=void 0;try{var o=t;MW(128,0,o),MW(0,64,o)}catch(e){r=!0,i=e}r&&nY(t,i)}t=t.nextEffect}while(null!==t);hY=n,0!==(n=e.expirationTime)&&RY(e,n),bY||hY||jY(1073741823,!1)}function JW(){null!==HW&&BH(HW),null!==$W&&$W()}function ZW(e,t){BW=IW=!0,e.current===t&&Ez("177");var n=e.pendingCommitExpirationTime;0===n&&Ez("261"),e.pendingCommitExpirationTime=0;var r=t.expirationTime,i=t.childExpirationTime;for(function(e,t){if(e.didError=!1,0===t)e.earliestPendingTime=0,e.latestPendingTime=0,e.earliestSuspendedTime=0,e.latestSuspendedTime=0,e.latestPingedTime=0;else{t<e.latestPingedTime&&(e.latestPingedTime=0);var n=e.latestPendingTime;0!==n&&(n>t?e.earliestPendingTime=e.latestPendingTime=0:e.earliestPendingTime>t&&(e.earliestPendingTime=e.latestPendingTime)),0===(n=e.earliestSuspendedTime)?v$(e,t):t<e.latestSuspendedTime?(e.earliestSuspendedTime=0,e.latestSuspendedTime=0,e.latestPingedTime=0,v$(e,t)):t>n&&v$(e,t)}M$(0,e)}(e,i>r?i:r),DW.current=null,r=void 0,1<t.effectTag?null!==t.lastEffect?(t.lastEffect.nextEffect=t,r=t.firstEffect):r=t:r=t.firstEffect,IH=VV,_H=function(){var e=tH();if(nH(e)){if("selectionStart"in e)var t={start:e.selectionStart,end:e.selectionEnd};else e:{var n=(t=(t=e.ownerDocument)&&t.defaultView||window).getSelection&&t.getSelection();if(n&&0!==n.rangeCount){t=n.anchorNode;var r=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{t.nodeType,i.nodeType}catch(e){t=null;break e}var o=0,a=-1,s=-1,l=0,u=0,c=e,d=null;t:for(;;){for(var f;c!==t||0!==r&&3!==c.nodeType||(a=o+r),c!==i||0!==n&&3!==c.nodeType||(s=o+n),3===c.nodeType&&(o+=c.nodeValue.length),null!==(f=c.firstChild);)d=c,c=f;for(;;){if(c===e)break t;if(d===t&&++l===r&&(a=o),d===i&&++u===n&&(s=o),null!==(f=c.nextSibling))break;d=(c=d).parentNode}c=f}t=-1===a||-1===s?null:{start:a,end:s}}else t=null}t=t||{start:0,end:0}}else t=null;return{focusedElem:e,selectionRange:t}}(),VV=!1,FW=r;null!==FW;){i=!1;var o=void 0;try{XW()}catch(e){i=!0,o=e}i&&(null===FW&&Ez("178"),nY(FW,o),null!==FW&&(FW=FW.nextEffect))}for(FW=r;null!==FW;){i=!1,o=void 0;try{YW()}catch(e){i=!0,o=e}i&&(null===FW&&Ez("178"),nY(FW,o),null!==FW&&(FW=FW.nextEffect))}for(rH(_H),_H=null,VV=!!IH,IH=null,e.current=t,FW=r;null!==FW;){i=!1,o=void 0;try{GW(e,n)}catch(e){i=!0,o=e}i&&(null===FW&&Ez("178"),nY(FW,o),null!==FW&&(FW=FW.nextEffect))}if(null!==r&&null!==VW){var a=KW.bind(null,e,r);HW=Sz.unstable_runWithPriority(Sz.unstable_NormalPriority,(function(){return FH(a)})),$W=a}IW=BW=!1,"function"==typeof a$&&a$(t.stateNode),n=t.expirationTime,0===(t=(t=t.childExpirationTime)>n?t:n)&&(UW=null),function(e,t){e.expirationTime=t,e.finishedWork=null}(e,t)}function QW(e){for(;;){var t=e.alternate,n=e.return,r=e.sibling;if(0==(1024&e.effectTag)){_W=e;e:{var i=t,o=LW,a=(t=e).pendingProps;switch(t.tag){case 2:case 16:break;case 15:case 0:break;case 1:QH(t.type)&&e$();break;case 3:V$(),t$(),(a=t.stateNode).pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),null!==i&&null!==i.child||(AU(t),t.effectTag&=-3);break;case 5:$$(t);var s=F$(z$.current);if(o=t.type,null!==i&&null!=t.stateNode)yW(i,t,o,a,s),i.ref!==t.ref&&(t.effectTag|=128);else if(a){var l=F$(L$.current);if(AU(t)){i=(a=t).stateNode;var u=a.type,c=a.memoizedProps,d=s;switch(i[Zz]=a,i[Qz]=c,o=void 0,s=u){case"iframe":case"object":HV("load",i);break;case"video":case"audio":for(u=0;u<xF.length;u++)HV(xF[u],i);break;case"source":HV("error",i);break;case"img":case"image":case"link":HV("error",i),HV("load",i);break;case"form":HV("reset",i),HV("submit",i);break;case"details":HV("toggle",i);break;case"input":zB(i,c),HV("invalid",i),DH(d,"onChange");break;case"select":i._wrapperState={wasMultiple:!!c.multiple},HV("invalid",i),DH(d,"onChange");break;case"textarea":mH(i,c),HV("invalid",i),DH(d,"onChange")}for(o in NH(s,c),u=null,c)c.hasOwnProperty(o)&&(l=c[o],"children"===o?"string"==typeof l?i.textContent!==l&&(u=["children",l]):"number"==typeof l&&i.textContent!==""+l&&(u=["children",""+l]):jz.hasOwnProperty(o)&&null!=l&&DH(d,o));switch(s){case"input":sB(i),VB(i,c,!0);break;case"textarea":sB(i),gH(i);break;case"select":case"option":break;default:"function"==typeof c.onClick&&(i.onclick=RH)}o=u,a.updateQueue=o,(a=null!==o)&&pW(t)}else{c=t,i=o,d=a,u=9===s.nodeType?s:s.ownerDocument,l===vH&&(l=xH(i)),l===vH?"script"===i?((i=u.createElement("div")).innerHTML="<script><\/script>",u=i.removeChild(i.firstChild)):"string"==typeof d.is?u=u.createElement(i,{is:d.is}):(u=u.createElement(i),"select"===i&&d.multiple&&(u.multiple=!0)):u=u.createElementNS(l,i),(i=u)[Zz]=c,i[Qz]=a,mW(i,t),d=i;var f=s,h=qH(u=o,c=a);switch(u){case"iframe":case"object":HV("load",d),s=c;break;case"video":case"audio":for(s=0;s<xF.length;s++)HV(xF[s],d);s=c;break;case"source":HV("error",d),s=c;break;case"img":case"image":case"link":HV("error",d),HV("load",d),s=c;break;case"form":HV("reset",d),HV("submit",d),s=c;break;case"details":HV("toggle",d),s=c;break;case"input":zB(d,c),s=jB(d,c),HV("invalid",d),DH(f,"onChange");break;case"option":s=fH(d,c);break;case"select":d._wrapperState={wasMultiple:!!c.multiple},s=Mz({},c,{value:void 0}),HV("invalid",d),DH(f,"onChange");break;case"textarea":mH(d,c),s=pH(d,c),HV("invalid",d),DH(f,"onChange");break;default:s=c}NH(u,s),l=void 0;var p=u,m=d,y=s;for(l in y)if(y.hasOwnProperty(l)){var g=y[l];"style"===l?TH(m,g):"dangerouslySetInnerHTML"===l?null!=(g=g?g.__html:void 0)&&wH(m,g):"children"===l?"string"==typeof g?("textarea"!==p||""!==g)&&EH(m,g):"number"==typeof g&&EH(m,""+g):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&(jz.hasOwnProperty(l)?null!=g&&DH(f,l):null!=g&&PB(m,l,g,h))}switch(u){case"input":sB(d),VB(d,c,!1);break;case"textarea":sB(d),gH(d);break;case"option":null!=c.value&&d.setAttribute("value",""+LB(c.value));break;case"select":(s=d).multiple=!!c.multiple,null!=(d=c.value)?hH(s,!!c.multiple,d,!1):null!=c.defaultValue&&hH(s,!!c.multiple,c.defaultValue,!0);break;default:"function"==typeof s.onClick&&(d.onclick=RH)}(a=PH(o,a))&&pW(t),t.stateNode=i}null!==t.ref&&(t.effectTag|=128)}else null===t.stateNode&&Ez("166");break;case 6:i&&null!=t.stateNode?gW(0,t,i.memoizedProps,a):("string"!=typeof a&&(null===t.stateNode&&Ez("166")),i=F$(z$.current),F$(L$.current),AU(t)?(o=(a=t).stateNode,i=a.memoizedProps,o[Zz]=a,(a=o.nodeValue!==i)&&pW(t)):(o=t,(a=(9===i.nodeType?i:i.ownerDocument).createTextNode(a))[Zz]=t,o.stateNode=a));break;case 11:break;case 13:if(a=t.memoizedState,0!=(64&t.effectTag)){t.expirationTime=o,_W=t;break e}a=null!==a,o=null!==i&&null!==i.memoizedState,null!==i&&!a&&o&&(null!==(i=i.child.sibling)&&(null!==(s=t.firstEffect)?(t.firstEffect=i,i.nextEffect=s):(t.firstEffect=t.lastEffect=i,i.nextEffect=null),i.effectTag=8)),(a||o)&&(t.effectTag|=4);break;case 7:case 8:case 12:break;case 4:V$();break;case 10:KU(t);break;case 9:case 14:break;case 17:QH(t.type)&&e$();break;case 18:break;default:Ez("156")}_W=null}if(t=e,1===LW||1!==t.childExpirationTime){for(a=0,o=t.child;null!==o;)(i=o.expirationTime)>a&&(a=i),(s=o.childExpirationTime)>a&&(a=s),o=o.sibling;t.childExpirationTime=a}if(null!==_W)return _W;null!==n&&0==(1024&n.effectTag)&&(null===n.firstEffect&&(n.firstEffect=e.firstEffect),null!==e.lastEffect&&(null!==n.lastEffect&&(n.lastEffect.nextEffect=e.firstEffect),n.lastEffect=e.lastEffect),1<e.effectTag&&(null!==n.lastEffect?n.lastEffect.nextEffect=e:n.firstEffect=e,n.lastEffect=e))}else{if(null!==(e=NW(e)))return e.effectTag&=1023,e;null!==n&&(n.firstEffect=n.lastEffect=null,n.effectTag|=1024)}if(null!==r)return r;if(null===n)break;e=n}return null}function eY(e){var t=$U(e.alternate,e,LW);return e.memoizedProps=e.pendingProps,null===t&&(t=QW(e)),DW.current=null,t}function tY(e,t){IW&&Ez("243"),JW(),IW=!0;var n=qW.current;qW.current=bU;var r=e.nextExpirationTimeToWorkOn;r===LW&&e===PW&&null!==_W||(WW(),LW=r,_W=f$((PW=e).current,null),e.pendingCommitExpirationTime=0);for(var i=!1;;){try{if(t)for(;null!==_W&&!PY();)_W=eY(_W);else for(;null!==_W;)_W=eY(_W)}catch(t){if(XU=YU=WU=null,lU(),null===_W)i=!0,VY(t);else{null===_W&&Ez("271");var o=_W,a=o.return;if(null!==a){e:{var s=e,l=a,u=o,c=t;if(a=LW,u.effectTag|=1024,u.firstEffect=u.lastEffect=null,null!==c&&"object"==typeof c&&"function"==typeof c.then){var d=c;c=l;var f=-1,h=-1;do{if(13===c.tag){var p=c.alternate;if(null!==p&&null!==(p=p.memoizedState)){h=10*(1073741822-p.timedOutAt);break}"number"==typeof(p=c.pendingProps.maxDuration)&&(0>=p?f=0:(-1===f||p<f)&&(f=p))}c=c.return}while(null!==c);c=l;do{if((p=13===c.tag)&&(p=void 0!==c.memoizedProps.fallback&&null===c.memoizedState),p){if(null===(l=c.updateQueue)?((l=new Set).add(d),c.updateQueue=l):l.add(d),0==(1&c.mode)){c.effectTag|=64,u.effectTag&=-1957,1===u.tag&&(null===u.alternate?u.tag=17:((a=iW(1073741823)).tag=eW,aW(u,a))),u.expirationTime=1073741823;break e}l=a;var m=(u=s).pingCache;null===m?(m=u.pingCache=new OW,p=new Set,m.set(d,p)):void 0===(p=m.get(d))&&(p=new Set,m.set(d,p)),p.has(l)||(p.add(l),u=iY.bind(null,u,d,l),d.then(u,u)),-1===f?s=1073741823:(-1===h&&(h=10*(1073741822-x$(s,a))-5e3),s=h+f),0<=s&&jW<s&&(jW=s),c.effectTag|=2048,c.expirationTime=a;break e}c=c.return}while(null!==c);c=Error((CB(u.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+OB(u))}zW=!0,c=hW(c,u),s=l;do{switch(s.tag){case 3:s.effectTag|=2048,s.expirationTime=a,sW(s,a=TW(s,c,a));break e;case 1:if(f=c,h=s.type,u=s.stateNode,0==(64&s.effectTag)&&("function"==typeof h.getDerivedStateFromError||null!==u&&"function"==typeof u.componentDidCatch&&(null===UW||!UW.has(u)))){s.effectTag|=2048,s.expirationTime=a,sW(s,a=AW(s,f,a));break e}}s=s.return}while(null!==s)}_W=QW(o);continue}i=!0,VY(t)}}break}if(IW=!1,qW.current=n,XU=YU=WU=null,lU(),i)PW=null,e.finishedWork=null;else if(null!==_W)e.finishedWork=null;else{if(null===(n=e.current.alternate)&&Ez("281"),PW=null,zW){if(i=e.latestPendingTime,o=e.latestSuspendedTime,a=e.latestPingedTime,0!==i&&i<r||0!==o&&o<r||0!==a&&a<r)return b$(e,r),void NY(e,n,r,e.expirationTime,-1);if(!e.didError&&t)return e.didError=!0,r=e.nextExpirationTimeToWorkOn=r,t=e.expirationTime=1073741823,void NY(e,n,r,t,-1)}t&&-1!==jW?(b$(e,r),(t=10*(1073741822-x$(e,r)))<jW&&(jW=t),t=10*(1073741822-DY()),t=jW-t,NY(e,n,r,e.expirationTime,0>t?0:t)):(e.pendingCommitExpirationTime=r,e.finishedWork=n)}}function nY(e,t){for(var n=e.return;null!==n;){switch(n.tag){case 1:var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===UW||!UW.has(r)))return aW(n,e=AW(n,e=hW(t,e),1073741823)),void sY(n,1073741823);break;case 3:return aW(n,e=TW(n,e=hW(t,e),1073741823)),void sY(n,1073741823)}n=n.return}3===e.tag&&(aW(e,n=TW(e,n=hW(t,e),1073741823)),sY(e,1073741823))}function rY(e,t){var n=Sz.unstable_getCurrentPriorityLevel(),r=void 0;if(0==(1&t.mode))r=1073741823;else if(IW&&!BW)r=LW;else{switch(n){case Sz.unstable_ImmediatePriority:r=1073741823;break;case Sz.unstable_UserBlockingPriority:r=1073741822-10*(1+((1073741822-e+15)/10|0));break;case Sz.unstable_NormalPriority:r=1073741822-25*(1+((1073741822-e+500)/25|0));break;case Sz.unstable_LowPriority:case Sz.unstable_IdlePriority:r=1;break;default:Ez("313")}null!==PW&&r===LW&&--r}return n===Sz.unstable_UserBlockingPriority&&(0===yY||r<yY)&&(yY=r),r}function iY(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),null!==PW&&LW===n?PW=null:(t=e.earliestSuspendedTime,r=e.latestSuspendedTime,0!==t&&n<=t&&n>=r&&(e.didError=!1,(0===(t=e.latestPingedTime)||t>n)&&(e.latestPingedTime=n),M$(n,e),0!==(n=e.expirationTime)&&RY(e,n)))}function oY(e,t){var n=e.stateNode;null!==n&&n.delete(t),null!==(e=aY(e,t=rY(t=DY(),e)))&&(v$(e,t),0!==(t=e.expirationTime)&&RY(e,t))}function aY(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t);var r=e.return,i=null;if(null===r&&3===e.tag)i=e.stateNode;else for(;null!==r;){if(n=r.alternate,r.childExpirationTime<t&&(r.childExpirationTime=t),null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t),null===r.return&&3===r.tag){i=r.stateNode;break}r=r.return}return i}function sY(e,t){null!==(e=aY(e,t))&&(!IW&&0!==LW&&t>LW&&WW(),v$(e,t),IW&&!BW&&PW===e||RY(e,e.expirationTime),CY>kY&&(CY=0,Ez("185")))}function lY(e,t,n,r,i){return Sz.unstable_runWithPriority(Sz.unstable_ImmediatePriority,(function(){return e(t,n,r,i)}))}var uY=null,cY=null,dY=0,fY=void 0,hY=!1,pY=null,mY=0,yY=0,gY=!1,vY=null,bY=!1,xY=!1,MY=null,SY=Sz.unstable_now(),wY=1073741822-(SY/10|0),EY=wY,kY=50,CY=0,OY=null;function TY(){wY=1073741822-((Sz.unstable_now()-SY)/10|0)}function AY(e,t){if(0!==dY){if(t<dY)return;null!==fY&&Sz.unstable_cancelCallback(fY)}dY=t,e=Sz.unstable_now()-SY,fY=Sz.unstable_scheduleCallback(LY,{timeout:10*(1073741822-t)-e})}function NY(e,t,n,r,i){e.expirationTime=r,0!==i||PY()?0<i&&(e.timeoutHandle=jH(qY.bind(null,e,t,n),i)):(e.pendingCommitExpirationTime=n,e.finishedWork=t)}function qY(e,t,n){e.pendingCommitExpirationTime=n,e.finishedWork=t,TY(),EY=wY,zY(e,n)}function DY(){return hY||(IY(),0!==mY&&1!==mY||(TY(),EY=wY)),EY}function RY(e,t){null===e.nextScheduledRoot?(e.expirationTime=t,null===cY?(uY=cY=e,e.nextScheduledRoot=e):(cY=cY.nextScheduledRoot=e).nextScheduledRoot=uY):t>e.expirationTime&&(e.expirationTime=t),hY||(bY?xY&&(pY=e,mY=1073741823,FY(e,1073741823,!1)):1073741823===t?jY(1073741823,!1):AY(e,t))}function IY(){var e=0,t=null;if(null!==cY)for(var n=cY,r=uY;null!==r;){var i=r.expirationTime;if(0===i){if((null===n||null===cY)&&Ez("244"),r===r.nextScheduledRoot){uY=cY=r.nextScheduledRoot=null;break}if(r===uY)uY=i=r.nextScheduledRoot,cY.nextScheduledRoot=i,r.nextScheduledRoot=null;else{if(r===cY){(cY=n).nextScheduledRoot=uY,r.nextScheduledRoot=null;break}n.nextScheduledRoot=r.nextScheduledRoot,r.nextScheduledRoot=null}r=n.nextScheduledRoot}else{if(i>e&&(e=i,t=r),r===cY)break;if(1073741823===e)break;n=r,r=r.nextScheduledRoot}}pY=t,mY=e}var _Y=!1;function PY(){return!!_Y||!!Sz.unstable_shouldYield()&&(_Y=!0)}function LY(){try{if(!PY()&&null!==uY){TY();var e=uY;do{var t=e.expirationTime;0!==t&&wY<=t&&(e.nextExpirationTimeToWorkOn=wY),e=e.nextScheduledRoot}while(e!==uY)}jY(0,!0)}finally{_Y=!1}}function jY(e,t){if(IY(),t)for(TY(),EY=wY;null!==pY&&0!==mY&&e<=mY&&!(_Y&&wY>mY);)FY(pY,mY,wY>mY),IY(),TY(),EY=wY;else for(;null!==pY&&0!==mY&&e<=mY;)FY(pY,mY,!1),IY();if(t&&(dY=0,fY=null),0!==mY&&AY(pY,mY),CY=0,OY=null,null!==MY)for(e=MY,MY=null,t=0;t<e.length;t++){var n=e[t];try{n._onComplete()}catch(e){gY||(gY=!0,vY=e)}}if(gY)throw e=vY,vY=null,gY=!1,e}function zY(e,t){hY&&Ez("253"),pY=e,mY=t,FY(e,t,!1),jY(1073741823,!1)}function FY(e,t,n){if(hY&&Ez("245"),hY=!0,n){var r=e.finishedWork;null!==r?BY(e,r,t):(e.finishedWork=null,-1!==(r=e.timeoutHandle)&&(e.timeoutHandle=-1,zH(r)),tY(e,n),null!==(r=e.finishedWork)&&(PY()?e.finishedWork=r:BY(e,r,t)))}else null!==(r=e.finishedWork)?BY(e,r,t):(e.finishedWork=null,-1!==(r=e.timeoutHandle)&&(e.timeoutHandle=-1,zH(r)),tY(e,n),null!==(r=e.finishedWork)&&BY(e,r,t));hY=!1}function BY(e,t,n){var r=e.firstBatch;if(null!==r&&r._expirationTime>=n&&(null===MY?MY=[r]:MY.push(r),r._defer))return e.finishedWork=t,void(e.expirationTime=0);e.finishedWork=null,e===OY?CY++:(OY=e,CY=0),Sz.unstable_runWithPriority(Sz.unstable_ImmediatePriority,(function(){ZW(e,t)}))}function VY(e){null===pY&&Ez("246"),pY.expirationTime=0,gY||(gY=!0,vY=e)}function HY(e,t){var n=bY;bY=!0;try{return e(t)}finally{(bY=n)||hY||jY(1073741823,!1)}}function $Y(e,t){if(bY&&!xY){xY=!0;try{return e(t)}finally{xY=!1}}return e(t)}function UY(e,t,n){bY||hY||0===yY||(jY(yY,!1),yY=0);var r=bY;bY=!0;try{return Sz.unstable_runWithPriority(Sz.unstable_UserBlockingPriority,(function(){return e(t,n)}))}finally{(bY=r)||hY||jY(1073741823,!1)}}function WY(e,t,n,r,i){var o=t.current;e:if(n){t:{2===xV(n=n._reactInternalFiber)&&1===n.tag||Ez("170");var a=n;do{switch(a.tag){case 3:a=a.stateNode.context;break t;case 1:if(QH(a.type)){a=a.stateNode.__reactInternalMemoizedMergedChildContext;break t}}a=a.return}while(null!==a);Ez("171"),a=void 0}if(1===n.tag){var s=n.type;if(QH(s)){n=r$(n,s,a);break e}}n=a}else n=XH;return null===t.context?t.context=n:t.pendingContext=n,t=i,(i=iW(r)).payload={element:e},null!==(t=void 0===t?null:t)&&(i.callback=t),JW(),aW(o,i),sY(o,r),r}function YY(e,t,n,r){var i=t.current;return WY(e,t,n,i=rY(DY(),i),r)}function XY(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function GY(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:hB,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function KY(e){var t=1073741822-25*(1+((1073741822-DY()+500)/25|0));t>=RW&&(t=RW-1),this._expirationTime=RW=t,this._root=e,this._callbacks=this._next=null,this._hasChildren=this._didComplete=!1,this._children=null,this._defer=!0}function JY(){this._callbacks=null,this._didCommit=!1,this._onCommit=this._onCommit.bind(this)}function ZY(e,t,n){e={current:t=c$(3,null,null,t?3:0),containerInfo:e,pendingChildren:null,pingCache:null,earliestPendingTime:0,latestPendingTime:0,earliestSuspendedTime:0,latestSuspendedTime:0,latestPingedTime:0,didError:!1,pendingCommitExpirationTime:0,finishedWork:null,timeoutHandle:-1,context:null,pendingContext:null,hydrate:n,nextExpirationTimeToWorkOn:0,expirationTime:0,firstBatch:null,nextScheduledRoot:null},this._internalRoot=t.stateNode=e}function QY(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function eX(e,t,n,r,i){var o=n._reactRootContainer;if(o){if("function"==typeof i){var a=i;i=function(){var e=XY(o._internalRoot);a.call(e)}}null!=e?o.legacy_renderSubtreeIntoContainer(e,t,i):o.render(t,i)}else{if(o=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new ZY(e,!1,t)}(n,r),"function"==typeof i){var s=i;i=function(){var e=XY(o._internalRoot);s.call(e)}}$Y((function(){null!=e?o.legacy_renderSubtreeIntoContainer(e,t,i):o.render(t,i)}))}return XY(o._internalRoot)}function tX(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;return QY(t)||Ez("200"),GY(e,t,null,n)}UF=function(e,t,n){switch(t){case"input":if(BB(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=rF(r);i||Ez("90"),lB(r),BB(r,i)}}}break;case"textarea":yH(e,n);break;case"select":null!=(t=n.value)&&hH(e,!!n.multiple,t,!1)}},KY.prototype.render=function(e){this._defer||Ez("250"),this._hasChildren=!0,this._children=e;var t=this._root._internalRoot,n=this._expirationTime,r=new JY;return WY(e,t,null,n,r._onCommit),r},KY.prototype.then=function(e){if(this._didComplete)e();else{var t=this._callbacks;null===t&&(t=this._callbacks=[]),t.push(e)}},KY.prototype.commit=function(){var e=this._root._internalRoot,t=e.firstBatch;if(this._defer&&null!==t||Ez("251"),this._hasChildren){var n=this._expirationTime;if(t!==this){this._hasChildren&&(n=this._expirationTime=t._expirationTime,this.render(this._children));for(var r=null,i=t;i!==this;)r=i,i=i._next;null===r&&Ez("251"),r._next=i._next,this._next=t,e.firstBatch=this}this._defer=!1,zY(e,n),t=this._next,this._next=null,null!==(t=e.firstBatch=t)&&t._hasChildren&&t.render(t._children)}else this._next=null,this._defer=!1},KY.prototype._onComplete=function(){if(!this._didComplete){this._didComplete=!0;var e=this._callbacks;if(null!==e)for(var t=0;t<e.length;t++)(0,e[t])()}},JY.prototype.then=function(e){if(this._didCommit)e();else{var t=this._callbacks;null===t&&(t=this._callbacks=[]),t.push(e)}},JY.prototype._onCommit=function(){if(!this._didCommit){this._didCommit=!0;var e=this._callbacks;if(null!==e)for(var t=0;t<e.length;t++){var n=e[t];"function"!=typeof n&&Ez("191",n),n()}}},ZY.prototype.render=function(e,t){var n=this._internalRoot,r=new JY;return null!==(t=void 0===t?null:t)&&r.then(t),YY(e,n,null,r._onCommit),r},ZY.prototype.unmount=function(e){var t=this._internalRoot,n=new JY;return null!==(e=void 0===e?null:e)&&n.then(e),YY(null,t,null,n._onCommit),n},ZY.prototype.legacy_renderSubtreeIntoContainer=function(e,t,n){var r=this._internalRoot,i=new JY;return null!==(n=void 0===n?null:n)&&i.then(n),YY(t,r,e,i._onCommit),i},ZY.prototype.createBatch=function(){var e=new KY(this),t=e._expirationTime,n=this._internalRoot,r=n.firstBatch;if(null===r)n.firstBatch=e,e._next=null;else{for(n=null;null!==r&&r._expirationTime>=t;)n=r,r=r._next;e._next=r,null!==n&&(n._next=e)}return e},JF=HY,ZF=UY,QF=function(){hY||0===yY||(jY(yY,!1),yY=0)};var nX={createPortal:tX,findDOMNode:function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternalFiber;return void 0===t&&("function"==typeof e.render?Ez("188"):Ez("268",Object.keys(e))),e=null===(e=SV(t))?null:e.stateNode},hydrate:function(e,t,n){return QY(t)||Ez("200"),eX(null,e,t,!0,n)},render:function(e,t,n){return QY(t)||Ez("200"),eX(null,e,t,!1,n)},unstable_renderSubtreeIntoContainer:function(e,t,n,r){return QY(n)||Ez("200"),(null==e||void 0===e._reactInternalFiber)&&Ez("38"),eX(e,t,n,!1,r)},unmountComponentAtNode:function(e){return QY(e)||Ez("40"),!!e._reactRootContainer&&($Y((function(){eX(null,null,e,!1,(function(){e._reactRootContainer=null}))})),!0)},unstable_createPortal:function(){return tX.apply(void 0,arguments)},unstable_batchedUpdates:HY,unstable_interactiveUpdates:UY,flushSync:function(e,t){hY&&Ez("187");var n=bY;bY=!0;try{return lY(e,t)}finally{bY=n,jY(1073741823,!1)}},unstable_createRoot:function(e,t){return QY(e)||Ez("299","unstable_createRoot"),new ZY(e,!0,null!=t&&!0===t.hydrate)},unstable_flushControlled:function(e){var t=bY;bY=!0;try{lY(e)}finally{(bY=t)||hY||jY(1073741823,!1)}},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{Events:[tF,nF,rF,Xz.injectEventPluginsByName,Lz,uF,function(e){Uz(e,lF)},GF,KF,WV,Kz]}};!function(e){var t=e.findFiberByHostInstance;(function(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);a$=l$((function(e){return t.onCommitFiberRoot(n,e)})),s$=l$((function(e){return t.onCommitFiberUnmount(n,e)}))}catch(e){}})(Mz({},e,{overrideProps:null,currentDispatcherRef:uB.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=SV(e))?null:e.stateNode},findFiberByHostInstance:function(e){return t?t(e):null}}))}({findFiberByHostInstance:eF,bundleType:0,version:"16.8.4",rendererPackageName:"react-dom"});var rX={default:nX},iX=rX&&nX||rX,oX=iX.default||iX;!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),gz.exports=oX;var aX=gz.exports,sX=!1,lX=wI.createContext(null),uX="unmounted",cX="exited",dX="entering",fX="entered",hX="exiting",pX=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,o=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(i=cX,r.appearStatus=dX):i=fX:i=t.unmountOnExit||t.mountOnEnter?uX:cX,r.state={status:i},r.nextCallback=null,r}yz(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===uX?{status:cX}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==dX&&n!==fX&&(t=dX):n!==dX&&n!==fX||(t=hX)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t){this.cancelNextCallback();var n=aX.findDOMNode(this);t===dX?this.performEnter(n,e):this.performExit(n)}else this.props.unmountOnExit&&this.state.status===cX&&this.setState({status:uX})},n.performEnter=function(e,t){var n=this,r=this.props.enter,i=this.context?this.context.isMounting:t,o=this.getTimeouts(),a=i?o.appear:o.enter;!t&&!r||sX?this.safeSetState({status:fX},(function(){n.props.onEntered(e)})):(this.props.onEnter(e,i),this.safeSetState({status:dX},(function(){n.props.onEntering(e,i),n.onTransitionEnd(e,a,(function(){n.safeSetState({status:fX},(function(){n.props.onEntered(e,i)}))}))})))},n.performExit=function(e){var t=this,n=this.props.exit,r=this.getTimeouts();n&&!sX?(this.props.onExit(e),this.safeSetState({status:hX},(function(){t.props.onExiting(e),t.onTransitionEnd(e,r.exit,(function(){t.safeSetState({status:cX},(function(){t.props.onExited(e)}))}))}))):this.safeSetState({status:cX},(function(){t.props.onExited(e)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t,n){this.setNextCallback(n);var r=null==t&&!this.props.addEndListener;e&&!r?(this.props.addEndListener&&this.props.addEndListener(e,this.nextCallback),null!=t&&setTimeout(this.nextCallback,t)):setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===uX)return null;var t=this.props,n=t.children,r=mz(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"==typeof n)return wI.createElement(lX.Provider,{value:null},n(e,r));var i=wI.Children.only(n);return wI.createElement(lX.Provider,{value:null},wI.cloneElement(i,r))},t}(wI.Component);function mX(){}pX.contextType=lX,pX.propTypes={},pX.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:mX,onEntering:mX,onEntered:mX,onExit:mX,onExiting:mX,onExited:mX},pX.UNMOUNTED=0,pX.EXITED=1,pX.ENTERING=2,pX.ENTERED=3,pX.EXITING=4;var yX=pX;function gX(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vX(e,t){var n=Object.create(null);return e&&OR.exports.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&OR.exports.isValidElement(e)?t(e):e}(e)})),n}function bX(e,t,n){return null!=n[t]?n[t]:e.props[t]}function xX(e,t,n){var r=vX(e.children),i=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),o=[];for(var a in e)a in t?o.length&&(i[a]=o,o=[]):o.push(a);var s={};for(var l in t){if(i[l])for(r=0;r<i[l].length;r++){var u=i[l][r];s[i[l][r]]=n(u)}s[l]=n(l)}for(r=0;r<o.length;r++)s[o[r]]=n(o[r]);return s}(t,r);return Object.keys(i).forEach((function(o){var a=i[o];if(OR.exports.isValidElement(a)){var s=o in t,l=o in r,u=t[o],c=OR.exports.isValidElement(u)&&!u.props.in;!l||s&&!c?l||!s||c?l&&s&&OR.exports.isValidElement(u)&&(i[o]=OR.exports.cloneElement(a,{onExited:n.bind(null,a),in:u.props.in,exit:bX(a,"exit",e),enter:bX(a,"enter",e)})):i[o]=OR.exports.cloneElement(a,{in:!1}):i[o]=OR.exports.cloneElement(a,{onExited:n.bind(null,a),in:!0,exit:bX(a,"exit",e),enter:bX(a,"enter",e)})}})),i}var MX=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},SX=function(e){function t(t,n){var r,i=(r=e.call(this,t,n)||this).handleExited.bind(gX(gX(r)));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}yz(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,r,i=t.children,o=t.handleExited;return{children:t.firstRender?(n=e,r=o,vX(n.children,(function(e){return OR.exports.cloneElement(e,{onExited:r.bind(null,e),in:!0,appear:bX(e,"appear",n),enter:bX(e,"enter",n),exit:bX(e,"exit",n)})}))):xX(e,i,o),firstRender:!1}},n.handleExited=function(e,t){var n=vX(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=pz({},t.children);return delete n[e.key],{children:n}})))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=mz(e,["component","childFactory"]),i=this.state.contextValue,o=MX(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?wI.createElement(lX.Provider,{value:i},o):wI.createElement(lX.Provider,{value:i},wI.createElement(t,r,o))},t}(wI.Component);SX.propTypes={},SX.defaultProps={component:"div",childFactory:function(e){return e}};var wX=SX;function EX(e,t){var n=e.timeout,r=e.style,i=void 0===r?{}:r;return{duration:i.transitionDuration||"number"==typeof n?n:n[t.mode]||0,delay:i.transitionDelay}}function kX(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function CX(e,t){return wI.useMemo((function(){return null==e&&null==t?null:function(n){kX(e,n),kX(t,n)}}),[e,t])}var OX="undefined"!=typeof window?wI.useLayoutEffect:wI.useEffect;function TX(e){var t=wI.useRef(e);return OX((function(){t.current=e})),wI.useCallback((function(e){return(0,t.current)(e)}),[])}var AX="undefined"!=typeof window?wI.useLayoutEffect:wI.useEffect;function NX(e){var t=e.children,n=e.defer,r=void 0!==n&&n,i=e.fallback,o=void 0===i?null:i,a=wI.useState(!1),s=a[0],l=a[1];return AX((function(){r||l(!0)}),[r]),wI.useEffect((function(){r&&l(!0)}),[r]),wI.createElement(wI.Fragment,null,s?t:o)}var qX=!0,DX=!1,RX=null,IX={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function _X(e){e.metaKey||e.altKey||e.ctrlKey||(qX=!0)}function PX(){qX=!1}function LX(){"hidden"===this.visibilityState&&DX&&(qX=!0)}function jX(e){var t=e.target;try{return t.matches(":focus-visible")}catch(e){}return qX||function(e){var t=e.type,n=e.tagName;return!("INPUT"!==n||!IX[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}function zX(){DX=!0,window.clearTimeout(RX),RX=window.setTimeout((function(){DX=!1}),100)}function FX(){return{isFocusVisible:jX,onBlurVisible:zX,ref:wI.useCallback((function(e){var t=aX.findDOMNode(e);null!=t&&function(e){e.addEventListener("keydown",_X,!0),e.addEventListener("mousedown",PX,!0),e.addEventListener("pointerdown",PX,!0),e.addEventListener("touchstart",PX,!0),e.addEventListener("visibilitychange",LX,!0)}(t.ownerDocument)}),[])}}function BX(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var VX="undefined"==typeof window?wI.useEffect:wI.useLayoutEffect;function HX(e){var t=e.classes,n=e.pulsate,r=void 0!==n&&n,i=e.rippleX,o=e.rippleY,a=e.rippleSize,s=e.in,l=e.onExited,u=void 0===l?function(){}:l,c=e.timeout,d=wI.useState(!1),f=d[0],h=d[1],p=Yj(t.ripple,t.rippleVisible,r&&t.ripplePulsate),m={width:a,height:a,top:-a/2+o,left:-a/2+i},y=Yj(t.child,f&&t.childLeaving,r&&t.childPulsate),g=TX(u);return VX((function(){if(!s){h(!0);var e=setTimeout(g,c);return function(){clearTimeout(e)}}}),[g,s,c]),wI.createElement("span",{className:p,style:m},wI.createElement("span",{className:y}))}var $X=wI.forwardRef((function(e,t){var n=e.center,r=void 0!==n&&n,i=e.classes,o=e.className,a=FI(e,["center","classes","className"]),s=wI.useState([]),l=s[0],u=s[1],c=wI.useRef(0),d=wI.useRef(null);wI.useEffect((function(){d.current&&(d.current(),d.current=null)}),[l]);var f=wI.useRef(!1),h=wI.useRef(null),p=wI.useRef(null),m=wI.useRef(null);wI.useEffect((function(){return function(){clearTimeout(h.current)}}),[]);var y=wI.useCallback((function(e){var t=e.pulsate,n=e.rippleX,r=e.rippleY,o=e.rippleSize,a=e.cb;u((function(e){return[].concat(BX(e),[wI.createElement(HX,{key:c.current,classes:i,timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:o})])})),c.current+=1,d.current=a}),[i]),g=wI.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,i=t.pulsate,o=void 0!==i&&i,a=t.center,s=void 0===a?r||t.pulsate:a,l=t.fakeElement,u=void 0!==l&&l;if("mousedown"===e.type&&f.current)f.current=!1;else{"touchstart"===e.type&&(f.current=!0);var c,d,g,v=u?null:m.current,b=v?v.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(s||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(b.width/2),d=Math.round(b.height/2);else{var x=e.clientX?e.clientX:e.touches[0].clientX,M=e.clientY?e.clientY:e.touches[0].clientY;c=Math.round(x-b.left),d=Math.round(M-b.top)}if(s)(g=Math.sqrt((2*Math.pow(b.width,2)+Math.pow(b.height,2))/3))%2==0&&(g+=1);else{var S=2*Math.max(Math.abs((v?v.clientWidth:0)-c),c)+2,w=2*Math.max(Math.abs((v?v.clientHeight:0)-d),d)+2;g=Math.sqrt(Math.pow(S,2)+Math.pow(w,2))}e.touches?(p.current=function(){y({pulsate:o,rippleX:c,rippleY:d,rippleSize:g,cb:n})},h.current=setTimeout((function(){p.current&&(p.current(),p.current=null)}),80)):y({pulsate:o,rippleX:c,rippleY:d,rippleSize:g,cb:n})}}),[r,y]),v=wI.useCallback((function(){g({},{pulsate:!0})}),[g]),b=wI.useCallback((function(e,t){if(clearTimeout(h.current),"touchend"===e.type&&p.current)return e.persist(),p.current(),p.current=null,void(h.current=setTimeout((function(){b(e,t)})));p.current=null,u((function(e){return e.length>0?e.slice(1):e})),d.current=t}),[]);return wI.useImperativeHandle(t,(function(){return{pulsate:v,start:g,stop:b}}),[v,g,b]),wI.createElement("span",zI({className:Yj(i.root,o),ref:m},a),wI.createElement(wX,{component:null,exit:!0},l))}));var UX,WX=cz((function(e){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(e.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}}),{flip:!1,name:"MuiTouchRipple"})(((UX=wI.memo($X)).muiName="MuiTouchRipple",UX)),YX=wI.forwardRef((function(e,t){var n=e.action,r=e.buttonRef,i=e.centerRipple,o=void 0!==i&&i,a=e.children,s=e.classes,l=e.className,u=e.component,c=void 0===u?"button":u,d=e.disabled,f=void 0!==d&&d,h=e.disableRipple,p=void 0!==h&&h,m=e.disableTouchRipple,y=void 0!==m&&m,g=e.focusRipple,v=void 0!==g&&g,b=e.focusVisibleClassName,x=e.onBlur,M=e.onClick,S=e.onFocus,w=e.onFocusVisible,E=e.onKeyDown,k=e.onKeyUp,C=e.onMouseDown,O=e.onMouseLeave,T=e.onMouseUp,A=e.onTouchEnd,N=e.onTouchMove,q=e.onTouchStart,D=e.onDragLeave,R=e.tabIndex,I=void 0===R?0:R,_=e.TouchRippleProps,P=e.type,L=void 0===P?"button":P,j=FI(e,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),z=wI.useRef(null);var F=wI.useRef(null),B=wI.useState(!1),V=B[0],H=B[1];f&&V&&H(!1);var $=FX(),U=$.isFocusVisible,W=$.onBlurVisible,Y=$.ref;function X(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:y;return TX((function(r){return t&&t(r),!n&&F.current&&F.current[e](r),!0}))}wI.useImperativeHandle(n,(function(){return{focusVisible:function(){H(!0),z.current.focus()}}}),[]),wI.useEffect((function(){V&&v&&!p&&F.current.pulsate()}),[p,v,V]);var G=X("start",C),K=X("stop",D),J=X("stop",T),Z=X("stop",(function(e){V&&e.preventDefault(),O&&O(e)})),Q=X("start",q),ee=X("stop",A),te=X("stop",N),ne=X("stop",(function(e){V&&(W(e),H(!1)),x&&x(e)}),!1),re=TX((function(e){f||(z.current||(z.current=e.currentTarget),U(e)&&(H(!0),w&&w(e)),S&&S(e))})),ie=wI.useRef(!1),oe=TX((function(e){v&&!ie.current&&V&&F.current&&" "===e.key&&(ie.current=!0,e.persist(),F.current.stop(e,(function(){F.current.start(e)}))),E&&E(e);var t=aX.findDOMNode(z.current);e.target!==e.currentTarget||!c||"button"===c||" "!==e.key&&"Enter"!==e.key||"A"===t.tagName&&t.href||(e.preventDefault(),M&&M(e))})),ae=TX((function(e){v&&" "===e.key&&F.current&&V&&(ie.current=!1,e.persist(),F.current.stop(e,(function(){F.current.pulsate(e)}))),k&&k(e)})),se=c;"button"===se&&j.href&&(se="a");var le={};"button"===se?(le.type=L,le.disabled=f):("a"===se&&j.href||(le.role="button"),le["aria-disabled"]=f);var ue=CX(r,t),ce=CX(Y,z),de=CX(ue,ce);return wI.createElement(se,zI({className:Yj(s.root,l,V&&[s.focusVisible,b],f&&s.disabled),onBlur:ne,onClick:M,onFocus:re,onKeyDown:oe,onKeyUp:ae,onMouseDown:G,onMouseLeave:Z,onMouseUp:J,onDragLeave:K,onTouchEnd:ee,onTouchMove:te,onTouchStart:Q,ref:de,tabIndex:f?-1:I},le,j),a,p||f?null:wI.createElement(NX,null,wI.createElement(WX,zI({ref:F,center:o},_))))})),XX=cz({root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"}},disabled:{},focusVisible:{}},{name:"MuiButtonBase"})(YX),GX={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},KX=wI.forwardRef((function(e,t){var n=e.align,r=void 0===n?"inherit":n,i=e.classes,o=e.className,a=e.color,s=void 0===a?"initial":a,l=e.component,u=e.display,c=void 0===u?"initial":u,d=e.gutterBottom,f=void 0!==d&&d,h=e.noWrap,p=void 0!==h&&h,m=e.paragraph,y=void 0!==m&&m,g=e.variant,v=void 0===g?"body1":g,b=e.variantMapping,x=void 0===b?GX:b,M=FI(e,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),S=l||(y?"p":x[v]||GX[v])||"span";return wI.createElement(S,zI({className:Yj(i.root,o,"inherit"!==v&&i[v],"initial"!==s&&i["color".concat(dz(s))],p&&i.noWrap,f&&i.gutterBottom,y&&i.paragraph,"inherit"!==r&&i["align".concat(dz(r))],"initial"!==c&&i["display".concat(dz(c))]),ref:t},M))})),JX=cz((function(e){return{root:{margin:0},body2:e.typography.body2,body1:e.typography.body1,caption:e.typography.caption,button:e.typography.button,h1:e.typography.h1,h2:e.typography.h2,h3:e.typography.h3,h4:e.typography.h4,h5:e.typography.h5,h6:e.typography.h6,subtitle1:e.typography.subtitle1,subtitle2:e.typography.subtitle2,overline:e.typography.overline,srOnly:{position:"absolute",height:1,width:1,overflow:"hidden"},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right"},alignJustify:{textAlign:"justify"},noWrap:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},gutterBottom:{marginBottom:"0.35em"},paragraph:{marginBottom:16},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorTextPrimary:{color:e.palette.text.primary},colorTextSecondary:{color:e.palette.text.secondary},colorError:{color:e.palette.error.main},displayInline:{display:"inline"},displayBlock:{display:"block"}}}),{name:"MuiTypography"})(KX),ZX=wI.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.className,o=e.color,a=void 0===o?"default":o,s=e.component,l=void 0===s?"button":s,u=e.disabled,c=void 0!==u&&u,d=e.disableFocusRipple,f=void 0!==d&&d,h=e.endIcon,p=e.focusVisibleClassName,m=e.fullWidth,y=void 0!==m&&m,g=e.size,v=void 0===g?"medium":g,b=e.startIcon,x=e.type,M=void 0===x?"button":x,S=e.variant,w=void 0===S?"text":S,E=FI(e,["children","classes","className","color","component","disabled","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"]),k=b&&wI.createElement("span",{className:Yj(r.startIcon,r["iconSize".concat(dz(v))])},b),C=h&&wI.createElement("span",{className:Yj(r.endIcon,r["iconSize".concat(dz(v))])},h);return wI.createElement(XX,zI({className:Yj(r.root,r[w],i,"inherit"===a?r.colorInherit:"default"!==a&&r["".concat(w).concat(dz(a))],"medium"!==v&&[r["".concat(w,"Size").concat(dz(v))],r["size".concat(dz(v))]],c&&r.disabled,y&&r.fullWidth),component:l,disabled:c,focusRipple:!f,focusVisibleClassName:Yj(r.focusVisible,p),ref:t,type:M},E),wI.createElement("span",{className:r.label},k,n,C))})),QX=cz((function(e){return{root:zI({},e.typography.button,{boxSizing:"border-box",minWidth:64,padding:"6px 16px",borderRadius:e.shape.borderRadius,color:e.palette.text.primary,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none",backgroundColor:LI(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"},"&$disabled":{backgroundColor:"transparent"}},"&$disabled":{color:e.palette.action.disabled}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},text:{padding:"6px 8px"},textPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:LI(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},textSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:LI(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlined:{padding:"5px 15px",border:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"&$disabled":{border:"1px solid ".concat(e.palette.action.disabled)}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat(LI(e.palette.primary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.primary.main),backgroundColor:LI(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat(LI(e.palette.secondary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.secondary.main),backgroundColor:LI(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{border:"1px solid ".concat(e.palette.action.disabled)}},contained:{color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],boxShadow:e.shadows[2],"&:hover":{backgroundColor:e.palette.grey.A100,boxShadow:e.shadows[4],"@media (hover: none)":{boxShadow:e.shadows[2],backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},"&$focusVisible":{boxShadow:e.shadows[6]},"&:active":{boxShadow:e.shadows[8]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}},containedPrimary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},containedSecondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},focusVisible:{},disabled:{},colorInherit:{color:"inherit",borderColor:"currentColor"},textSizeSmall:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},textSizeLarge:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},outlinedSizeSmall:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},outlinedSizeLarge:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},containedSizeSmall:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},containedSizeLarge:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},sizeSmall:{},sizeLarge:{},fullWidth:{width:"100%"},startIcon:{display:"inherit",marginRight:8,marginLeft:-4,"&$iconSizeSmall":{marginLeft:-2}},endIcon:{display:"inherit",marginRight:-4,marginLeft:8,"&$iconSizeSmall":{marginRight:-2}},iconSizeSmall:{"& > *:first-child":{fontSize:18}},iconSizeMedium:{"& > *:first-child":{fontSize:20}},iconSizeLarge:{"& > *:first-child":{fontSize:22}}}}),{name:"MuiButton"})(ZX);function eG(e){return e&&e.ownerDocument||document}var tG="undefined"!=typeof window?wI.useLayoutEffect:wI.useEffect,nG=wI.forwardRef((function(e,t){var n=e.children,r=e.container,i=e.disablePortal,o=void 0!==i&&i,a=e.onRendered,s=wI.useState(null),l=s[0],u=s[1],c=CX(n.ref,t);return tG((function(){o||u(function(e){return e="function"==typeof e?e():e,aX.findDOMNode(e)}(r)||document.body)}),[r,o]),tG((function(){if(l&&!o)return kX(t,l),function(){kX(t,null)}}),[t,l,o]),tG((function(){a&&(l||o)&&a()}),[a,l,o]),o?(wI.Children.only(n),wI.cloneElement(n,{ref:c})):l?aX.createPortal(n,l):l}));function rG(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((function(e,t){return null==t?e:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r),t.apply(this,r)}}),(function(){}))}function iG(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function oG(e){return eG(e).defaultView||window}function aG(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function sG(e){return parseInt(window.getComputedStyle(e)["padding-right"],10)||0}function lG(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4?arguments[4]:void 0,o=[t,n].concat(BX(r)),a=["TEMPLATE","SCRIPT","STYLE"];[].forEach.call(e.children,(function(e){1===e.nodeType&&-1===o.indexOf(e)&&-1===a.indexOf(e.tagName)&&aG(e,i)}))}function uG(e,t){var n=-1;return e.some((function(e,r){return!!t(e)&&(n=r,!0)})),n}function cG(e,t){var n,r=[],i=[],o=e.container;if(!t.disableScrollLock){var a=function(e){var t=eG(e);return t.body===e?oG(t).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(o),s=o.parentElement,l="HTML"===s.nodeName?s:o;if(r.push({value:l.style.overflow,key:"overflow",el:l}),l.style.overflow="hidden",a){var u=function(){var e=document.createElement("div");e.style.width="99px",e.style.height="99px",e.style.position="absolute",e.style.top="-9999px",e.style.overflow="scroll",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}();r.push({value:o.style.paddingRight,key:"padding-right",el:o}),o.style["padding-right"]="".concat(sG(o)+u,"px"),n=eG(o).querySelectorAll(".mui-fixed"),[].forEach.call(n,(function(e){i.push(e.style.paddingRight),e.style.paddingRight="".concat(sG(e)+u,"px")}))}}return function(){n&&[].forEach.call(n,(function(e,t){i[t]?e.style.paddingRight=i[t]:e.style.removeProperty("padding-right")})),r.forEach((function(e){var t=e.value,n=e.el,r=e.key;t?n.style.setProperty(r,t):n.style.removeProperty(r)}))}}var dG=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.modals=[],this.containers=[]}var t,n,r;return t=e,(n=[{key:"add",value:function(e,t){var n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&aG(e.modalRef,!1);var r=function(e){var t=[];return[].forEach.call(e.children,(function(e){e.getAttribute&&"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);lG(t,e.mountNode,e.modalRef,r,!0);var i=uG(this.containers,(function(e){return e.container===t}));return-1!==i?(this.containers[i].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblingNodes:r}),n)}},{key:"mount",value:function(e,t){var n=uG(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];r.restore||(r.restore=cG(r,t))}},{key:"remove",value:function(e){var t=this.modals.indexOf(e);if(-1===t)return t;var n=uG(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];if(r.modals.splice(r.modals.indexOf(e),1),this.modals.splice(t,1),0===r.modals.length)r.restore&&r.restore(),e.modalRef&&aG(e.modalRef,!0),lG(r.container,e.mountNode,e.modalRef,r.hiddenSiblingNodes,!1),this.containers.splice(n,1);else{var i=r.modals[r.modals.length-1];i.modalRef&&aG(i.modalRef,!1)}return t}},{key:"isTopModal",value:function(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}])&&iG(t.prototype,n),r&&iG(t,r),e}();function fG(e){var t=e.children,n=e.disableAutoFocus,r=void 0!==n&&n,i=e.disableEnforceFocus,o=void 0!==i&&i,a=e.disableRestoreFocus,s=void 0!==a&&a,l=e.getDoc,u=e.isEnabled,c=e.open,d=wI.useRef(),f=wI.useRef(null),h=wI.useRef(null),p=wI.useRef(),m=wI.useRef(null),y=wI.useCallback((function(e){m.current=aX.findDOMNode(e)}),[]),g=CX(t.ref,y);return wI.useMemo((function(){c&&"undefined"!=typeof window&&(p.current=l().activeElement)}),[c]),wI.useEffect((function(){if(c){var e=eG(m.current);r||!m.current||m.current.contains(e.activeElement)||(m.current.hasAttribute("tabIndex")||m.current.setAttribute("tabIndex",-1),m.current.focus());var t=function(){o||!u()||d.current?d.current=!1:m.current&&!m.current.contains(e.activeElement)&&m.current.focus()},n=function(t){!o&&u()&&9===t.keyCode&&e.activeElement===m.current&&(d.current=!0,t.shiftKey?h.current.focus():f.current.focus())};e.addEventListener("focus",t,!0),e.addEventListener("keydown",n,!0);var i=setInterval((function(){t()}),50);return function(){clearInterval(i),e.removeEventListener("focus",t,!0),e.removeEventListener("keydown",n,!0),s||(p.current&&p.current.focus&&p.current.focus(),p.current=null)}}}),[r,o,s,u,c]),wI.createElement(wI.Fragment,null,wI.createElement("div",{tabIndex:0,ref:f,"data-test":"sentinelStart"}),wI.cloneElement(t,{ref:g}),wI.createElement("div",{tabIndex:0,ref:h,"data-test":"sentinelEnd"}))}var hG={root:{zIndex:-1,position:"fixed",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",touchAction:"none"},invisible:{backgroundColor:"transparent"}},pG=wI.forwardRef((function(e,t){var n=e.invisible,r=void 0!==n&&n,i=e.open,o=FI(e,["invisible","open"]);return i?wI.createElement("div",zI({"aria-hidden":!0,ref:t},o,{style:zI({},hG.root,{},r?hG.invisible:{},{},o.style)})):null}));var mG=new dG,yG=wI.forwardRef((function(e,t){var n=Nj(),r=j_({name:"MuiModal",props:zI({},e),theme:n}),i=r.BackdropComponent,o=void 0===i?pG:i,a=r.BackdropProps,s=r.children,l=r.closeAfterTransition,u=void 0!==l&&l,c=r.container,d=r.disableAutoFocus,f=void 0!==d&&d,h=r.disableBackdropClick,p=void 0!==h&&h,m=r.disableEnforceFocus,y=void 0!==m&&m,g=r.disableEscapeKeyDown,v=void 0!==g&&g,b=r.disablePortal,x=void 0!==b&&b,M=r.disableRestoreFocus,S=void 0!==M&&M,w=r.disableScrollLock,E=void 0!==w&&w,k=r.hideBackdrop,C=void 0!==k&&k,O=r.keepMounted,T=void 0!==O&&O,A=r.manager,N=void 0===A?mG:A,q=r.onBackdropClick,D=r.onClose,R=r.onEscapeKeyDown,I=r.onRendered,_=r.open,P=FI(r,["BackdropComponent","BackdropProps","children","closeAfterTransition","container","disableAutoFocus","disableBackdropClick","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onEscapeKeyDown","onRendered","open"]),L=wI.useState(!0),j=L[0],z=L[1],F=wI.useRef({}),B=wI.useRef(null),V=wI.useRef(null),H=CX(V,t),$=function(e){return!!e.children&&e.children.props.hasOwnProperty("in")}(r),U=function(){return eG(B.current)},W=function(){return F.current.modalRef=V.current,F.current.mountNode=B.current,F.current},Y=function(){N.mount(W(),{disableScrollLock:E}),V.current.scrollTop=0},X=TX((function(){var e=function(e){return e="function"==typeof e?e():e,aX.findDOMNode(e)}(c)||U().body;N.add(W(),e),V.current&&Y()})),G=wI.useCallback((function(){return N.isTopModal(W())}),[N]),K=TX((function(e){B.current=e,e&&(I&&I(),_&&G()?Y():aG(V.current,!0))})),J=wI.useCallback((function(){N.remove(W())}),[N]);if(wI.useEffect((function(){return function(){J()}}),[J]),wI.useEffect((function(){_?X():$&&u||J()}),[_,J,$,u,X]),!T&&!_&&(!$||j))return null;var Z=function(e){return{root:{position:"fixed",zIndex:e.zIndex.modal,right:0,bottom:0,top:0,left:0},hidden:{visibility:"hidden"}}}(n||{zIndex:R_}),Q={};return void 0===s.props.tabIndex&&(Q.tabIndex=s.props.tabIndex||"-1"),$&&(Q.onEnter=rG((function(){z(!1)}),s.props.onEnter),Q.onExited=rG((function(){z(!0),u&&J()}),s.props.onExited)),wI.createElement(nG,{ref:K,container:c,disablePortal:x},wI.createElement("div",zI({ref:H,onKeyDown:function(e){"Escape"===e.key&&G()&&(e.stopPropagation(),R&&R(e),!v&&D&&D(e,"escapeKeyDown"))},role:"presentation"},P,{style:zI({},Z.root,{},!_&&j?Z.hidden:{},{},P.style)}),C?null:wI.createElement(o,zI({open:_,onClick:function(e){e.target===e.currentTarget&&(q&&q(e),!p&&D&&D(e,"backdropClick"))}},a)),wI.createElement(fG,{disableEnforceFocus:y,disableAutoFocus:f,disableRestoreFocus:S,getDoc:U,isEnabled:G,open:_},wI.cloneElement(s,Q))))}));function gG(e){return"scale(".concat(e,", ").concat(Math.pow(e,2),")")}var vG={entering:{opacity:1,transform:gG(1)},entered:{opacity:1,transform:"none"}},bG=wI.forwardRef((function(e,t){var n=e.children,r=e.in,i=e.onEnter,o=e.onExit,a=e.style,s=e.timeout,l=void 0===s?"auto":s,u=FI(e,["children","in","onEnter","onExit","style","timeout"]),c=wI.useRef(),d=wI.useRef(),f=CX(n.ref,t),h=Nj()||uz;return wI.useEffect((function(){return function(){clearTimeout(c.current)}}),[]),wI.createElement(yX,zI({appear:!0,in:r,onEnter:function(e,t){!function(e){e.scrollTop}(e);var n,r=EX({style:a,timeout:l},{mode:"enter"}),o=r.duration,s=r.delay;"auto"===l?(n=h.transitions.getAutoHeightDuration(e.clientHeight),d.current=n):n=o,e.style.transition=[h.transitions.create("opacity",{duration:n,delay:s}),h.transitions.create("transform",{duration:.666*n,delay:s})].join(","),i&&i(e,t)},onExit:function(e){var t,n=EX({style:a,timeout:l},{mode:"exit"}),r=n.duration,i=n.delay;"auto"===l?(t=h.transitions.getAutoHeightDuration(e.clientHeight),d.current=t):t=r,e.style.transition=[h.transitions.create("opacity",{duration:t,delay:i}),h.transitions.create("transform",{duration:.666*t,delay:i||.333*t})].join(","),e.style.opacity="0",e.style.transform=gG(.75),o&&o(e)},addEndListener:function(e,t){"auto"===l&&(c.current=setTimeout(t,d.current||0))},timeout:"auto"===l?null:l},u),(function(e,t){return wI.cloneElement(n,zI({style:zI({opacity:0,transform:gG(.75),visibility:"exited"!==e||r?void 0:"hidden"},vG[e],{},a,{},n.props.style),ref:f},t))}))}));bG.muiSupportAuto=!0;var xG=bG,MG=wI.createContext({}),SG=wI.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.className,o=e.component,a=void 0===o?"ul":o,s=e.dense,l=void 0!==s&&s,u=e.disablePadding,c=void 0!==u&&u,d=e.subheader,f=FI(e,["children","classes","className","component","dense","disablePadding","subheader"]),h=wI.useMemo((function(){return{dense:l}}),[l]);return wI.createElement(MG.Provider,{value:h},wI.createElement(a,zI({className:Yj(r.root,i,l&&r.dense,!c&&r.padding,d&&r.subheader),ref:t},f),d,n))})),wG=cz({root:{listStyle:"none",margin:0,padding:0,position:"relative"},padding:{paddingTop:8,paddingBottom:8},dense:{},subheader:{paddingTop:0}},{name:"MuiList"})(SG),EG="undefined"==typeof window?wI.useEffect:wI.useLayoutEffect,kG=wI.forwardRef((function(e,t){var n=e.alignItems,r=void 0===n?"center":n,i=e.autoFocus,o=void 0!==i&&i,a=e.button,s=void 0!==a&&a,l=e.children,u=e.classes,c=e.className,d=e.component,f=e.ContainerComponent,h=void 0===f?"li":f,p=e.ContainerProps,m=(p=void 0===p?{}:p).className,y=FI(p,["className"]),g=e.dense,v=e.disabled,b=void 0!==v&&v,x=e.disableGutters,M=void 0!==x&&x,S=e.divider,w=void 0!==S&&S,E=e.focusVisibleClassName,k=e.selected,C=void 0!==k&&k,O=FI(e,["alignItems","autoFocus","button","children","classes","className","component","ContainerComponent","ContainerProps","dense","disabled","disableGutters","divider","focusVisibleClassName","selected"]),T=wI.useContext(MG),A={dense:g||T.dense||!1,alignItems:r},N=wI.useRef(null);EG((function(){o&&N.current&&N.current.focus()}),[o]);var q,D,R=wI.Children.toArray(l),I=R.length&&(q=R[R.length-1],D=["ListItemSecondaryAction"],wI.isValidElement(q)&&-1!==D.indexOf(q.type.muiName)),_=CX(wI.useCallback((function(e){N.current=aX.findDOMNode(e)}),[]),t),P=zI({className:Yj(u.root,c,A.dense&&u.dense,!M&&u.gutters,w&&u.divider,b&&u.disabled,s&&u.button,"center"!==r&&u.alignItemsFlexStart,I&&u.secondaryAction,C&&u.selected),disabled:b},O),L=d||"li";return s&&(P.component=d||"div",P.focusVisibleClassName=Yj(u.focusVisible,E),L=XX),I?(L=P.component||d?L:"div","li"===h&&("li"===L?L="div":"li"===P.component&&(P.component="div")),wI.createElement(MG.Provider,{value:A},wI.createElement(h,zI({className:Yj(u.container,m),ref:_},y),wI.createElement(L,P,R),R.pop()))):wI.createElement(MG.Provider,{value:A},wI.createElement(L,zI({ref:_},P),R))})),CG=cz((function(e){return{root:{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,"&$focusVisible":{backgroundColor:e.palette.action.selected},"&$selected, &$selected:hover":{backgroundColor:e.palette.action.selected},"&$disabled":{opacity:.5}},container:{position:"relative"},focusVisible:{},dense:{paddingTop:4,paddingBottom:4},alignItemsFlexStart:{alignItems:"flex-start"},disabled:{},divider:{borderBottom:"1px solid ".concat(e.palette.divider),backgroundClip:"padding-box"},gutters:{paddingLeft:16,paddingRight:16},button:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:e.palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}},secondaryAction:{paddingRight:48},selected:{}}}),{name:"MuiListItem"})(kG),OG=wI.forwardRef((function(e,t){var n=e.classes,r=e.className,i=FI(e,["classes","className"]),o=wI.useContext(MG);return wI.createElement("div",zI({className:Yj(n.root,r,"flex-start"===o.alignItems&&n.alignItemsFlexStart),ref:t},i))})),TG=cz((function(e){return{root:{minWidth:56,color:e.palette.action.active,flexShrink:0,display:"inline-flex"},alignItemsFlexStart:{marginTop:8}}}),{name:"MuiListItemIcon"})(OG),AG=wI.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.className,o=e.disableTypography,a=void 0!==o&&o,s=e.inset,l=void 0!==s&&s,u=e.primary,c=e.primaryTypographyProps,d=e.secondary,f=e.secondaryTypographyProps,h=FI(e,["children","classes","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"]),p=wI.useContext(MG).dense,m=null!=u?u:n;null==m||m.type===JX||a||(m=wI.createElement(JX,zI({variant:p?"body2":"body1",className:r.primary,component:"span"},c),m));var y=d;return null==y||y.type===JX||a||(y=wI.createElement(JX,zI({variant:"body2",className:r.secondary,color:"textSecondary"},f),y)),wI.createElement("div",zI({className:Yj(r.root,i,p&&r.dense,l&&r.inset,m&&y&&r.multiline),ref:t},h),m,y)})),NG=cz({root:{flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},multiline:{marginTop:6,marginBottom:6},dense:{},inset:{paddingLeft:56},primary:{},secondary:{}},{name:"MuiListItemText"})(AG);function qG(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function DG(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function RG(e){return[e.horizontal,e.vertical].map((function(e){return"number"==typeof e?"".concat(e,"px"):e})).join(" ")}function IG(e){return"function"==typeof e?e():e}var _G=wI.forwardRef((function(e,t){var n=e.action,r=e.anchorEl,i=e.anchorOrigin,o=void 0===i?{vertical:"top",horizontal:"left"}:i,a=e.anchorPosition,s=e.anchorReference,l=void 0===s?"anchorEl":s,u=e.children,c=e.classes,d=e.className,f=e.container,h=e.elevation,p=void 0===h?8:h,m=e.getContentAnchorEl,y=e.marginThreshold,g=void 0===y?16:y,v=e.onEnter,b=e.onEntered,x=e.onEntering,M=e.onExit,S=e.onExited,w=e.onExiting,E=e.open,k=e.PaperProps,C=void 0===k?{}:k,O=e.transformOrigin,T=void 0===O?{vertical:"top",horizontal:"left"}:O,A=e.TransitionComponent,N=void 0===A?xG:A,q=e.transitionDuration,D=void 0===q?"auto":q,R=e.TransitionProps,I=void 0===R?{}:R,_=FI(e,["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","classes","className","container","elevation","getContentAnchorEl","marginThreshold","onEnter","onEntered","onEntering","onExit","onExited","onExiting","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"]),P=wI.useRef(),L=wI.useCallback((function(e){if("anchorPosition"===l)return a;var t=IG(r),n=(t instanceof oG(t).Element?t:eG(P.current).body).getBoundingClientRect(),i=0===e?o.vertical:"center";return{top:n.top+qG(n,i),left:n.left+DG(n,o.horizontal)}}),[r,o.horizontal,o.vertical,a,l]),j=wI.useCallback((function(e){var t=0;if(m&&"anchorEl"===l){var n=m(e);if(n&&e.contains(n)){var r=function(e,t){for(var n=t,r=0;n&&n!==e;)r+=(n=n.parentElement).scrollTop;return r}(e,n);t=n.offsetTop+n.clientHeight/2-r||0}}return t}),[o.vertical,l,m]),z=wI.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{vertical:qG(e,T.vertical)+t,horizontal:DG(e,T.horizontal)}}),[T.horizontal,T.vertical]),F=wI.useCallback((function(e){var t=j(e),n={width:e.offsetWidth,height:e.offsetHeight},i=z(n,t);if("none"===l)return{top:null,left:null,transformOrigin:RG(i)};var o=L(t),a=o.top-i.vertical,s=o.left-i.horizontal,u=a+n.height,c=s+n.width,d=oG(IG(r)),f=d.innerHeight-g,h=d.innerWidth-g;if(a<g){var p=a-g;a-=p,i.vertical+=p}else if(u>f){var m=u-f;a-=m,i.vertical+=m}if(s<g){var y=s-g;s-=y,i.horizontal+=y}else if(c>h){var v=c-h;s-=v,i.horizontal+=v}return{top:"".concat(a,"px"),left:"".concat(s,"px"),transformOrigin:RG(i)}}),[r,l,L,j,z,g]),B=wI.useCallback((function(e){var t=F(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin}),[F]),V=wI.useCallback((function(e){P.current=aX.findDOMNode(e)}),[]),H=wI.useMemo((function(){if(E)return function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=this,s=function(){e.apply(a,i)};clearTimeout(t),t=setTimeout(s,n)}return r.clear=function(){clearTimeout(t)},r}((function(){B(P.current)}))}),[E,B]);wI.useImperativeHandle(n,(function(){return E?{updatePosition:H}:null}),[E,H]),wI.useEffect((function(){if(H)return window.addEventListener("resize",H),function(){window.removeEventListener("resize",H),H.clear()}}),[H]);var $=D;"auto"!==D||N.muiSupportAuto||($=void 0);var U=f||(r?eG(IG(r)).body:void 0);return wI.createElement(yG,zI({container:U,open:E,ref:t,BackdropProps:{invisible:!0},className:Yj(c.root,d)},_),wI.createElement(N,zI({appear:!0,in:E,onEnter:v,onEntered:b,onExit:M,onExited:S,onExiting:w,timeout:$},I,{onEntering:rG((function(e,t){x&&x(e,t),B(e)}),I.onEntering)}),wI.createElement(hz,zI({elevation:p,ref:V},C,{className:Yj(c.paper,C.className)}),u)))})),PG=cz({root:{},paper:{position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}},{name:"MuiPopover"})(_G);function LG(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function jG({d:e,size:t,style:n={},viewBox:r="0 0 16 16"}){const i={fontSize:LG(t),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",...n};return wI.createElement("i",{style:i},wI.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:r,fill:"currentColor"},wI.createElement("path",{d:e})))}const zG={d:"M15.9993744,3 L15.9993744,5 L4.99937445,5 L4.99937445,3 L15.9993744,3 Z M8.99937445,7 L15.9993744,7 L15.9993744,9 L8.99937445,9 L8.99937445,7 Z M11.9993744,11 L15.9993744,11 L15.9993744,13 L11.9993744,13 L11.9993744,11 Z M2.2,11 L7,11 L7,9.00369263 C7,8.89323568 7.08954305,8.80369263 7.2,8.80369263 C7.2549016,8.80369263 7.30738916,8.82626165 7.34515712,8.86610844 L10.1852182,11.8624926 C10.2583124,11.93961 10.258346,12.0604218 10.1852948,12.13758 L7.34523376,15.1373102 C7.2692928,15.2175206 7.14270711,15.2209817 7.06249671,15.1450407 C7.02260076,15.1072683 7,15.0547472 7,14.9998069 L7,12.9043747 C4.79351111,12.9043747 2.8018683,12.9266213 1.02507156,12.9711145 L1.02507252,12.9711526 C0.472939773,12.9849787 0.014139487,12.5485949 0.000313396522,11.9964622 C0.000104473692,11.988119 -1.32268838e-12,11.9797736 -1.3231638e-12,11.9714278 L-1.83320026e-12,3 L2,3 L2,10.8 C2,10.9104569 2.08954305,11 2.2,11 Z"},FG={d:"M13,7 L8,7 L13,7 L13,4.98151367 C13,2.23029964 10.7614237,0 8,0 C5.23857625,0 3,2.23029964 3,4.98151367 L3,7 L3.75,7 L3,7 L4.5,7 L4.5,5.33193359 C4.5,3.21561511 5.54860291,1.5 8,1.5 C10.4513971,1.5 11.5,3.21561511 11.5,5.33193359 L11.5,7 L12.25,7 L3,7 C2.44771525,7 2,7.44771525 2,8 L2,15 C2,15.5522847 2.44771525,16 3,16 L13,16 C13.5522847,16 14,15.5522847 14,15 L14,8 C14,7.44771525 13.5522847,7 13,7 L3,7 L13,7 Z"},BG="M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z",VG={d:"M2.4,4 L13.6,4 C13.7104569,4 13.8,4.08954305 13.8,4.2 C13.8,4.24327404 13.7859644,4.28538077 13.76,4.32 L8.16,11.7866667 C8.09372583,11.8750322 7.96836556,11.8929408 7.88,11.8266667 C7.86483887,11.8152958 7.85137085,11.8018278 7.84,11.7866667 L2.24,4.32 C2.17372583,4.23163444 2.19163444,4.10627417 2.28,4.04 C2.31461923,4.01403557 2.35672596,4 2.4,4 Z"},HG={d:"M4,13.6 L4,2.4 C4,2.28954305 4.08954305,2.2 4.2,2.2 C4.24327404,2.2 4.28538077,2.21403557 4.32,2.24 L11.7866667,7.84 C11.8750322,7.90627417 11.8929408,8.03163444 11.8266667,8.12 C11.8152958,8.13516113 11.8018278,8.14862915 11.7866667,8.16 L4.32,13.76 C4.23163444,13.8262742 4.10627417,13.8083656 4.04,13.72 C4.01403557,13.6853808 4,13.643274 4,13.6 Z"};function $G(e,t,n){(function({model:e,properties:t}){return e.modifiers?e.modifiers.apply({model:e,properties:t}):Promise.resolve()})({model:e,properties:n}).then((()=>{e.colorSupport&&e.colorSupport.colorByUpdater(n,"qHyperCubeDef.");let r=Bi.generate(t,n);r&&r.length&&(r=r.map((e=>({qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}))),e.applyPatches(r,!0))}))}function UG(e,t,n,r,i,o){e.getEffectiveProperties().then((a=>{const s=d(!0,{},a),l=s.qHyperCubeDef[r][t],u=s.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][n];u.qAttributeDimensions=l.qAttributeDimensions,l.qAttributeDimensions=[],o||(u.qAttributeExpressions=l.qAttributeExpressions,l.qAttributeExpressions=[]),s.qHyperCubeDef[r][t]=u,s.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][n]=l,i&&i({oldItem:l,newItem:u,oldProperties:a,newProperties:s,model:e}),$G(e,a,s)}))}function WG({dir:e,dock:t,altList:n,model:r,translator:i,app:o,onChange:a}){return 0===n.length?null:{dir:e,dock:t,getAlternatives(){const e=n.map((e=>function(e,t,n){if(e.qLibraryId)return t.getDimension(e.qLibraryId).then((e=>e.getLayout())).catch((()=>null)).then((e=>e?"H"!==e.qDim.qGrouping&&e.qDim.qLabelExpression?e.qDim.qLabelExpression:e.qDim.title:n.get("Object.ErrorMessage.MissingDimension")));const r=e.qDef.qLabelExpression;if(r)return t.evaluate(r);const i=e.qDef.qFieldLabels[0]||e.qDef.qFieldDefs[0];return Promise.resolve(i)}(e,o,i).then((t=>({id:e.qDef.cId,selected:!1,title:t})))));return Promise.all(e)},changeTo(e,t){UG(r,e,t,"qDimensions",a)}}}function YG(e,t,n,r="/qHyperCubeDef"){return{breadcrumbs:e.qGroupFallbackTitles.slice(0,e.qGroupPos),drilldown:"H"===e.qGrouping,index:t,locked:!!e.qLocked,text:"H"===e.qGrouping?e.qGroupFallbackTitles[e.qGroupPos]:e.qFallbackTitle,popoverText:(i=e,"H"===i.qGrouping?i.title||"":i.qFallbackTitle||""),drillUp(e){n.drillUp(r,t,e)}};var i}function XG({altList:e,app:t,dir:n,dock:r,model:i,onChange:o,skipAttributeExpressions:a,translator:s}){return 0===e.length?null:{dir:n,dock:r,getAlternatives(){const n=e.map((e=>function(e,t,n){if(e.qLibraryId)return t.getMeasure(e.qLibraryId).then((e=>e.getLayout())).catch((()=>null)).then((e=>e?e.qMeasure.qLabelExpression?e.qMeasure.qLabelExpression:e.qMeasure.qLabel||e.qMeasure.qDef:n.get("Object.ErrorMessage.MissingMeasure")));const r=e.qDef.qLabelExpression;if(r)return t.evaluate(r);const i=e.qDef.qLabel||e.qDef.qDef;return Promise.resolve(i)}(e,t,s).then((t=>({id:e.qDef.cId,selected:!1,title:t})))));return Promise.all(n)},changeTo(e,t){UG(i,e,t,"qMeasures",o,a)}}}function GG(e,t){return{breadcrumbs:[],drilldown:!1,index:t,locked:!1,text:e.qFallbackTitle,popoverText:e.qFallbackTitle}}const KG={bottom:{anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},top:{anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}},left:{anchorOrigin:{vertical:"center",horizontal:"left"},transformOrigin:{vertical:"center",horizontal:"right"}},right:{anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"}}},JG=({children:e,...t})=>wI.createElement(QX,CR({size:"small",disableRipple:!0,disableTouchRipple:!0},t),e);function ZG(){function e({title:e,selected:t,onClick:n}){const r=P.detectTextDirection(e);return wI.createElement(CG,{button:!0,onClick:n,style:{textAlign:"start"}},wI.createElement(TG,{style:{minWidth:32}},wI.createElement(jG,{d:t?BG:""})),wI.createElement(NG,{primaryTypographyProps:{dir:r}},e))}function t({alignTo:t,changeTo:n,current:r,dir:i,dock:o,list:a,onClose:s,show:l}){const u=a.map(((t,r)=>wI.createElement(e,{key:t.id,title:t.title,onClick:()=>n(r)})));return wI.createElement(PG,CR({anchorEl:t,open:l,onClose:s},KG[o],{PaperProps:{style:{minWidth:"250px",maxHeight:"300px"}}}),wI.createElement(wG,{dense:!0,dir:i,component:"nav"},wI.createElement(e,{title:r,selected:!0,onClick:s}),u))}e.propTypes={title:OI.string.isRequired,selected:OI.bool,onClick:OI.func.isRequired},e.defaultProps={selected:!1},t.propTypes={alignTo:OI.any,changeTo:OI.func.isRequired,current:OI.string.isRequired,dir:OI.string.isRequired,dock:OI.string.isRequired,list:OI.array,onClose:OI.func.isRequired,show:OI.bool.isRequired},t.defaultProps={list:[],alignTo:null};class n extends wI.Component{constructor(e){super(e),this.state={open:!1,inSelection:e.selections&&e.selections.isActive()},this.openPopover=this.openPopover.bind(this),this.closePopover=this.closePopover.bind(this),this.changeTo=this.changeTo.bind(this),this.alignToRef=wI.createRef()}componentDidMount(){const{selections:e}=this.props;e&&(this.onSelectionsActivated=()=>this.setState({inSelection:!0}),this.onSelectionsDeactivated=()=>this.setState({inSelection:!1}),e.addListener("activated",this.onSelectionsActivated),e.addListener("deactivated",this.onSelectionsDeactivated),e.addListener("canceled",this.onSelectionsDeactivated))}componentWillUnmount(){const{selections:e}=this.props;e&&(e.removeListener("activated",this.onSelectionsActivated),e.removeListener("deactivated",this.onSelectionsDeactivated),e.removeListener("canceled",this.onSelectionsDeactivated))}changeTo(e){this.props.popover.changeTo(this.props.titleData.index,e),this.closePopover()}openPopover(){this.state.closeTime&&Date.now()-this.state.closeTime<20||this.props.popover.getAlternatives().then((e=>{this.setState({open:!0,alternatives:e})}))}closePopover(){this.setState({open:!1,closeTime:Date.now()})}render(){const{titleData:e,popover:n,translator:r,disabled:i,isDimension:o,padding:a,minWidth:s,hasAlternative:l}=this.props,u={flex:"1 1 auto",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontWeight:"normal",...this.props.style},c=e.breadcrumbs.length,d=i||this.state.inSelection,f=e.breadcrumbs.map(((t,n)=>wI.createElement(JG,{style:{display:"flex",alignItems:"center",color:d&&"rgba(89, 89, 89, 0.8)",pointerEvents:d?"none":"auto"},key:n,onClick:()=>d?void 0:e.drillUp(c-n),title:t},wI.createElement("span",{style:u},t),wI.createElement(jG,CR({},HG,{size:"small",style:{margin:"0 8px"}}))))),h=n&&!this.state.open?this.openPopover:this.closePopover,p=!n||i||this.state.inSelection,m={display:"flex",alignItems:"center",width:"100%",color:p&&"rgba(89, 89, 89, 0.8)",height:!o&&p&&"20px",lineHeight:!o&&p&&"20px",border:!o&&p&&"none"};this.state.open&&(m.background="rgba(0,0,0,0.08)");a&&(m.padding=a),s&&(m.minWidth=s);const y=P.detectTextDirection(e.text),g=wI.createElement(JG,{style:m,onClick:p?void 0:h,title:e.text,tabIndex:p?-1:0,onFocus:p?void 0:e=>{this.state.closeTime&&Date.now()-this.state.closeTime<20||(e.currentTarget.style.boxShadow="0px 0px 0px 2px #177FE6 inset",e.currentTarget.style.borderRadius="2px")},onBlur:p?void 0:e=>{e.currentTarget.style.boxShadow="none",e.currentTarget.style.borderRadius="0px"},onMouseDown:e=>{e.preventDefault()}},e.locked&&wI.createElement(jG,CR({},FG,{size:"small",title:r.get("Tooltip.selections.locked")})),wI.createElement("span",{style:u,dir:y},e.text),n&&wI.createElement(jG,CR({},VG,{size:"small",style:{margin:"0 8px"}})));return wI.createElement(wI.Fragment,null,e.drilldown&&wI.createElement(jG,CR({},zG,{size:"small",title:r.get("Tooltip.dimensions.drilldown"),style:{margin:"0 4px 0 0"}})),f,wI.createElement("div",{ref:this.alignToRef,style:{overflow:"hidden",pointerEvents:l?"auto":"none"}},g),n&&wI.createElement(t,{dock:n.dock,dir:n.dir,current:e.popoverText,alignTo:this.alignToRef.current,show:this.state.open,list:this.state.alternatives,onClose:this.closePopover,changeTo:this.changeTo}))}}function r(e){return{top:"bottom",bottom:"top",left:"right",right:"left"}[e]}function i(e){return!e.isDimension&&M(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures.length")>0}return n.propTypes={disabled:OI.bool.isRequired,padding:OI.string,minWidth:OI.string,titleData:OI.shape({breadcrumbs:OI.arrayOf(OI.string).isRequired,drilldown:OI.bool.isRequired,index:OI.number.isRequired,locked:OI.bool.isRequired,text:OI.string.isRequired,popoverText:OI.string.isRequired,drillUp:OI.func}).isRequired,popover:OI.shape({dir:OI.string.isRequired,dock:OI.string.isRequired,changeTo:OI.func.isRequired,getAlternatives:OI.func.isRequired}),translator:OI.shape({get:OI.func.isRequired}).isRequired,selections:OI.shape({isActive:OI.func,addListener:OI.func,removeListener:OI.func}),style:OI.shape({fontSize:OI.string,color:OI.string,fontFamily:OI.string}).isRequired,isDimension:OI.bool.isRequired,hasAlternative:OI.bool.isRequired},n.defaultProps={popover:null,selections:null,padding:"",minWidth:""},{renderer:"react",disableTriggers:!0,preferredSize:function(){return this.settings.settings.isDimension||i(this.settings.settings)?28:20},render(){const{settings:{app:e,disabled:t,explicitItemInfos:o,hyperCube:a,hyperCubeDef:s,isDimension:l,minWidth:u,model:c,onChangeToAlternative:d,padding:f,rtl:h,selections:p,skipAttributeExpressions:m,translator:y},layout:{dock:g}}=this.settings,v="top"!==g&&"bottom"!==g||!h?"ltr":"rtl",b=function(e,t){const n={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center"};return"left"===e?(n.width=t.height+"px",n.transform=`rotate(-90deg) translate(-${t.height}px, 0)`,n.transformOrigin="top left"):"right"===e&&(n.width=t.height+"px",n.transform=`rotate(90deg) translate(0, -${t.width}px)`,n.transformOrigin="top left"),n}(g,this.rect),x=s&&s.qLayoutExclude&&s.qLayoutExclude.qHyperCubeDef,S=x&&x[l?"qDimensions":"qMeasures"]||[],w=o||a[l?"qDimensionInfo":"qMeasureInfo"],E=l?WG:XG,k=l?YG:GG,C=c&&c.colorSupport&&c.modifiers&&E({altList:S,app:e,dir:h?"rtl":"ltr",dock:r(g),model:c,onChange:d,skipAttributeExpressions:m,translator:y}),O=(T=this.settings.settings).isDimension&&M(T,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.length")>0||i(this.settings.settings);var T;const A=w.map(((e,r)=>{const i="number"==typeof e.explicitColumn?e.explicitColumn:r,o=k(e,i,c),a=r===w.length-1;return wI.createElement(wI.Fragment,{key:e.cId},wI.createElement(n,{popover:C,titleData:o,model:c,translator:y,selections:p,disabled:t(),style:this.style,isDimension:l,padding:f,minWidth:u,hasAlternative:O}),!a&&wI.createElement("span",null,", "))}));return wI.createElement("div",{style:b,dir:v},A)}}}const QG=I_({palette:{text:{primary:"rgba(89, 89, 89, 0.8)",secondary:"rgba(0, 0, 0, 0.55)",disabled:"rgba(0, 0, 0, 0.3)"},action:{disabled:"rgba(0, 0, 0, 0.3)"}},typography:{fontFamily:'"QlikView Sans", "Arial", sans-serif',button:{textTransform:"initial",fontWeight:400}},shape:{borderRadius:2},shadows:["none","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)"],props:{MuiButtonBase:{disableRipple:!0}}});const eK=L_({productionPrefix:"q699e",disableGlobal:!0,seed:""});function tK(){function e({x:e,y:t,width:n,height:r,scaleRatio:i,margin:o}={}){const a={x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1},margin:{left:0,top:0}};return a.x=Number.isNaN(e)?a.x:e,a.y=Number.isNaN(t)?a.y:t,a.width=Number.isNaN(n)?a.width:n,a.height=Number.isNaN(r)?a.height:r,void 0!==i&&(a.scaleRatio.x=Number.isNaN(i.x)?a.scaleRatio.x:i.x,a.scaleRatio.y=Number.isNaN(i.y)?a.scaleRatio.y:i.y),void 0!==o&&(a.margin.left=Number.isNaN(o.left)?0:o.left,a.margin.top=Number.isNaN(o.top)?0:o.top),a}return function(t={}){const{createElement:n=document.createElement.bind(document)}=t;let r,i=e();const o={element:()=>r,root:()=>r,appendTo:e=>(r||(r=n("div"),r.style.position="absolute",r.style["-webkit-font-smoothing"]="antialiased",r.style["-moz-osx-font-smoothing"]="antialiased",r.style.pointerEvents="none"),e.appendChild(r),r),render(e){if(!r)return!1;const t=i.scaleRatio.x,n=i.scaleRatio.y;return r.style.left=Math.round(i.margin.left+i.x*t)+"px",r.style.top=Math.round(i.margin.top+i.y*n)+"px",r.style.width=Math.round(i.width)+"px",r.style.height=Math.round(i.height)+"px",r.style.transform=`scale(${t}, ${n})`,r.style.transformOrigin="top left",aX.render(function(e,t){return wI.createElement(_j,{generateClassName:t},wI.createElement(sz,{theme:QG},e))}(e,eK),r),!0},itemsAt:()=>[],findShapes:()=>[],clear:()=>(r&&aX.unmountComponentAtNode(r),o),destroy(){r&&r.parentElement&&(aX.unmountComponentAtNode(r),r.parentElement.removeChild(r)),r=null},size:t=>(t&&(i=e(t)),i)};return o}}function nK(){return function(e){e.renderer("react",tK()),e.component("data-title",ZG()),e.component("disclaimer",function(){class e extends wI.Component{render(){const{label:e,spanStyle:t}=this.props;return wI.createElement(wI.Fragment,null,wI.createElement("span",{ref:this.alignToRef,style:t,title:e},e))}}return e.propTypes={label:OI.string.isRequired,spanStyle:OI.shape().isRequired},{renderer:"react",disableTriggers:!0,preferredSize:function(){return 22},render(){const{settings:{label:t,rtl:n},layout:{dock:r}}=this.settings,i="top"!==r&&"bottom"!==r||!n?"ltr":"rtl",o=function(e,t){const n={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",color:"#7b7a78",fontStyle:"italic",fontSize:"13px"};switch(e){case"left":n.width=t.height+"px",n.transform=`rotate(-90deg) translate(-${t.height}px, 0)`,n.transformOrigin="top left";break;case"right":n.width=t.height+"px",n.transform=`rotate(90deg) translate(0, -${t.width}px)`,n.transformOrigin="top left";break;case"center":n.width=t.width+"px",n.height=t.height+"px",n.color="#595959",n.fontStyle="normal",n.fontSize="1.2em",n.textAlign="center";break;default:case"top":case"bottom":n.justifyContent="flex-start",n.alignItems="flex-start"}return n}(r,this.rect),a="center"===r?t:"* "+t,s="center"!==r?{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}:{};return wI.createElement("div",{style:o,dir:i},wI.createElement(wI.Fragment,null,wI.createElement(e,{label:a,spanStyle:s})))}}}())}}function rK(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:rK(i,t,n)},i}function iK(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),rK(i,a,l,e.invert)}))}const oK={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",u=r,c=i,f=t<.5?90:-90;return o&&(s="y",l="x",u=i,c=r,f=t<.5?180:0),a(d({},e,{[s]:n*u,[l]:c-Math.max(e.size/2,Math.min(t*c,c-e.size/2)),startAngle:f}))}};function aK({i:e,width:t,height:n,resolved:r,keys:i,flipXY:o,calcKey:a="box"}){let s,l=null,u=null;void 0!==r.major.settings.binStart?(l=r.major.items[e].binStart,u=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 c=0;s?s.bandwidth?(c=s.bandwidth(),l-=c/2):c=u-l:c=1;const f=d({},{major:l,majorEnd:u},r.minor.items[e]);i.forEach((t=>{f[t]=r[t].items[e]}));const h=o?n:t,p=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:c,width:f[a].width,minWidthPx:f[a].minWidthPx,maxWidthPx:f[a].maxWidthPx,maxMajorWidth:h}),m=(c-p)/2,y=m+f.major+p/2;return{item:f,boxCenter:y,boxWidth:p,boxPadding:m,rendWidth:t,rendHeight:n}}function sK({keys:e,data:t,defaultSettings:n,style:r,settings:i,width:o,height:a,resolver:s}){const l=d(!0,{},n||{},r||{}),u={major:"horizontal"===i.orientation?a:o,minor:"horizontal"===i.orientation?o:a},c=i.major;let f;f="object"==typeof c&&"object"==typeof c.ref&&void 0!==c.ref.start&&void 0!==c.ref.end?s.resolve({data:t,defaults:{start:0,end:1},scaled:u,settings:d(!0,{},{binStart:{scale:i.major.scale,ref:i.major.ref.start},binEnd:{scale:i.major.scale,ref:i.major.ref.end}})}):"object"==typeof c&&void 0!==c.binStart&&void 0!==c.binEnd?s.resolve({data:t,defaults:{start:0,end:1},scaled:u,settings:d(!0,{},{binStart:{scale:i.major.scale,ref:"binStart"},binEnd:{scale:i.major.scale,ref:"binEnd"}},i.major)}):s.resolve({data:t,scaled:u,defaults:{major:.5},settings:{major:i.major}});const h=i.minor||{};let p;const m={major:f,minor:s.resolve({data:t,defaults:{start:0,end:1},scaled:u,settings:d(!0,{},{start:{scale:h.scale,ref:"start"},end:{scale:h.scale,ref:"end"},min:{scale:h.scale,ref:"min"},max:{scale:h.scale,ref:"max"},med:{scale:h.scale,ref:"med"}},h)})};for(let n=0,r=e.length;n<r;n++)p=e[n],m[p]=s.resolve({data:t,defaults:l[p],settings:i[p],scaled:u});return m}const lK=["oob"];const uK={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=sK({keys:lK,data:i,defaultSettings:{oob:oK.getDefaultSettings()},style:o,settings:this.settings.settings,width:e,height:t,resolver:a}),{settings:u,items:c}=l;return function({width:e,height:t,flipXY:n,resolved:r,keys:i,symbol:o,dockValue:a,_calcItemRenderingOpts:s=aK}){const l=[],{items:u}=r.major;for(let c=0,d=u.length;c<d;c++){const{item:d,boxCenter:f,rendWidth:h,rendHeight:p}=s({i:c,width:e,height:t,resolved:r,keys:i,flipXY:n,calcKey:"oob"}),m=u[c].data,y=[];if(d.oob.show){y.push(oK.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:y};l.push(e)}}return l}({items:c,settings:u,width:e,height:t,flipXY:r,resolved:l,keys:lK,symbol:s,dockValue:n})}},cK={size:25,hat:{show:!0,fill:"#999",stroke:"#000",strokeWidth:0,strokeLinejoin:"miter",width:1,maxWidthPx:void 0,minWidthPx:1,minHeightPx:1,alignment:0}},dK=["hat"];function fK(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 hK({item:e,boxWidth:t,boxPadding:n,rendWidth:r,rendHeight:i,flipXY:o}){let a="x",s="y",l=r,u=i,c=e.hat.alignment||0;o&&(a="y",s="x",l=i,u=r,c=1-c);const f=(n+e.major)*l;let h=[{[a]:f,[s]:0+u},{[a]:f+t*c*l,[s]:8},{[a]:f+t*l,[s]:0+u},{[a]:f+t*l,[s]:0+u+10},{[a]:f,[s]:0+u+10}];const p=d({},e.hat,{type:"path",d:fK(h)});h=[{[a]:f,[s]:0},{[a]:f+t*(1-c)*l,[s]:0+u-8},{[a]:f+t*l,[s]:0},{[a]:f+t*l,[s]:-10},{[a]:f,[s]:-10}];return[p,d({},e.hat,{type:"path",d:fK(h)})]}const pK={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=sK({keys:dK,data:r,defaultSettings:cK,style:i,settings:this.settings.settings,width:e,height:t,resolver:o}),{settings:s,items:l}=a;return function({width:e,height:t,flipXY:n,resolved:r,keys:i,_calcItemRenderingOpts:o=aK}){const a=[],{items:s}=r.major;for(let l=0,u=s.length;l<u;l++){const{item:u,boxWidth:c,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=[];u.hat.show&&m.push(...hK({item:u,boxWidth:c,boxPadding:d,rendWidth:f,rendHeight:h,flipXY:n}));const y={type:"container",data:p,collider:{type:"bounds"},children:m};a.push(y)}return a}({items:l,settings:s,width:e,height:t,flipXY:n,resolved:a,keys:dK})}};var mK="unclassified",yK="equal-equal",gK="equal-higher",vK="equal-lower",bK="equal-void",xK="higher-equal",MK="higher-higher-acute",SK="higher-higher-obtuse",wK="higher-lower-negative",EK="higher-lower-positive",kK="higher-void",CK="lower-equal",OK="lower-higher-negative",TK="lower-higher-positive",AK="lower-lower-acute",NK="lower-lower-obtuse",qK="lower-void",DK="void-equal",RK="void-higher",IK="void-lower",_K="void-void";function PK(e,t){return Math.atan2(t.y-e.y,t.x-e.x)*(180/Math.PI)}function LK(e,t,n){const r=Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),i=Math.sqrt((t.x-n.x)**2+(t.y-n.y)**2),o=Math.sqrt((n.x-e.x)**2+(n.y-e.y)**2);return Math.acos((i*i+r*r-o*o)/(2*i*r))*(180/Math.PI)}function jK({previous:e,current:t,next:n}){const r=e&&e.value,i=t&&t.value,o=n&&n.value;return e||n?e?n?r===i?i===o?yK:i<o?gK:vK:i===o?r>i?xK:CK:r>i?i<o?LK(e,t,n)>90?SK:MK:PK(e,t)>PK(e,n)?EK:wK:i>o?LK(e,t,n)>90?NK:AK:PK(e,t)>PK(e,n)?TK:OK:r===i?bK:r>i?kK:qK:i===o?DK:i<o?RK:IK:_K}function zK({bounds:e,size:t}){const{x:n,y:r,width:i,height:o}=e,{insideStrategy:a}=t;return"center"===a?Math.floor(n+i/2)>=0&&Math.ceil(n+i/2)<=t.width&&Math.floor(r+o/2)>=0&&Math.ceil(r+o/2)<=t.height:Math.floor(n+i)>0&&Math.ceil(n)<t.width&&Math.floor(r+o/2)>=0&&Math.ceil(r+o/2)<=t.height}const FK=1,BK=0;function VK({node:e,line:t,groupIndex:n,extract:r,style:i,measureText:o,size:a,horizontal:s,rtl:l,meta:u,showLabel:c}){const d=r.label(e.data);if("string"!=typeof d&&"number"!=typeof d||""===d)return!1;const f=o({fontFamily:i.fontFamily,fontSize:i.fontSize,text:d}),{localBounds:h}=e,{"stroke-width":p}=e.attrs,m=r.pointValue(e.data),y={x:h.x+h.width/2,y:h.y+h.height/2,width:f.width+2*FK,height:f.height+2*BK},g=`${y.x}-${y.y}`,v=!s&&!l,b=s?a.height:a.width,x=(s?y.y:y.x)/b,M=(v?1-x:x)<=(b<=200?.25:.1),S={key:g,node:e,line:t,group:n,value:m,labelMeasurements:f,bounds:y,inside:zK({bounds:h,size:a}),border:p?p/2:0,classification:mK,setClassification(e){S.classification=e},preferences:[],setPreferences(e){S.preferences.push(...e)},placement:void 0,setPlacement(e){S.placement=e},duplicate:!1,setDuplicate(){S.duplicate=!0},extreme:u.getExtreme(g),elite:M,show:c(e)};return S}function HK({nodes:e,extract:t,style:n,measureText:r,size:i,horizontal:o,rtl:a,showLabel:s}){const l=function({nodes:e}){const t={top:[],right:[],bottom:[],left:[]},n=e.map((e=>{const{localBounds:t}=e,n={x:t.x+t.width/2,y:t.y+t.height/2};return{key:`${n.x}-${n.y}`,center:n}})),r=n.reduce(((e,t)=>((!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((e=>e.center.y===r.top.center.y)).map((e=>e.key)),t.right=n.filter((e=>e.center.x===r.right.center.x)).map((e=>e.key)),t.bottom=n.filter((e=>e.center.y===r.bottom.center.y)).map((e=>e.key)),t.left=n.filter((e=>e.center.x===r.left.center.x)).map((e=>e.key)),{getExtrema:e=>({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:e=>{const{top:n,right:r,bottom:i,left:o}=t;return[n,r,i,o].some((t=>-1!==t.indexOf(e)))}}}({nodes:e});return function({nodes:e,by:t,lineIndex:n}){const r=e.reduce(((e,r,i)=>{const o=t(r.data);return e[o]||(e[o]={items:[],index:i}),e[o].items.push({node:r,line:r.data[n].value}),e}),{});return Object.keys(r).map((e=>r[e])).sort(((e,t)=>e.index-t.index)).map((e=>e.items))}({nodes:e,by:t.majorValue,lineIndex:t.lineIndex}).map(((e,u)=>e.map((e=>({line:e.line,item:VK({node:e.node,line:e.line,groupIndex:u,extract:t,style:n,measureText:r,size:i,horizontal:o,rtl:a,meta:l,showLabel:s})}))).filter((e=>e.item)).reduce(((e,t)=>(e[t.line]=t.item,e)),{}))).filter((e=>Object.keys(e).length))}var $K={TOP:"top",TOP_RIGHT:"top-right",RIGHT:"right",BOTTOM_RIGHT:"bottom-right",BOTTOM:"bottom",BOTTOM_LEFT:"bottom-left",LEFT:"left",TOP_LEFT:"top-left"},UK={[yK]:[$K.TOP,$K.BOTTOM],[gK]:[$K.BOTTOM,$K.BOTTOM_RIGHT],[vK]:[$K.TOP,$K.TOP_RIGHT],[bK]:[$K.TOP,$K.BOTTOM],[xK]:[$K.LEFT,$K.BOTTOM_LEFT,$K.TOP,$K.TOP_RIGHT],[MK]:[$K.BOTTOM,$K.BOTTOM_LEFT,$K.LEFT,$K.TOP_RIGHT],[SK]:[$K.BOTTOM,$K.TOP],[wK]:[$K.TOP,$K.TOP_RIGHT,$K.RIGHT],[EK]:[$K.BOTTOM,$K.BOTTOM_LEFT,$K.LEFT],[kK]:[$K.TOP],[CK]:[$K.TOP],[OK]:[$K.TOP,$K.TOP_LEFT],[TK]:[$K.BOTTOM_RIGHT],[AK]:[$K.TOP,$K.TOP_LEFT,$K.LEFT,$K.TOP_RIGHT,$K.RIGHT],[NK]:[$K.TOP,$K.BOTTOM],[qK]:[$K.TOP],[DK]:[$K.TOP],[RK]:[$K.TOP,$K.BOTTOM],[IK]:[$K.TOP,$K.BOTTOM,$K.LEFT],[_K]:[$K.TOP]};function WK({nodes:e,extract:t,style:n,measureText:r,size:i,horizontal:o,rtl:a,showLabel:s}){const l=HK({nodes:e,extract:t,style:n,measureText:r,size:i,horizontal:o,rtl:a,showLabel:s}),u=[...l.reduce(((e,t)=>(e.push(...Object.keys(t).map((e=>t[e]))),e)),[])],[c]=u,d=function({groups:e,threshold:t}){const n=e.map((e=>Object.keys(e).map((t=>e[t])))),r={};for(let e=0;e<=n.length;e++){const t=n[e];if(t)for(let e=0;e<t.length;e++){const n=t[e],{line:i}=n;r[i]||(r[i]=[]),r[i].push(n.bounds)}}const i=Object.keys(r).map((e=>r[e])),o=[];for(let e=0;e<i.length;e++)for(let n=0;n<i[e].length-1;n++){const r=i[e][n],a=i[e][n+1],s={x1:r.x,y1:r.y,x2:a.x,y2:a.y},l=s.x1-s.x2,u=s.y1-s.y2;Math.sqrt(l*l+u*u)>t&&o.push(s)}return o}({groups:l,threshold:c.node.localBounds.height}),f={getItems:()=>u,getLines:()=>d};return function({groups:e}){for(let t=0;t<e.length;t++){const n=Object.keys(e[t]).map((n=>e[t][n]));for(let r=0;r<n.length;r++){const i=n[r],o=jK({previous:e[t-1]&&e[t-1][i.line],current:i,next:e[t+1]&&e[t+1][i.line]});i.setClassification(o)}}}({groups:l}),f.getItems().forEach((e=>e.setPreferences(UK[e.classification]))),f}function YK({item:e,placement:t,size:n}){return t.x>=0-n.edgeBleed.left&&t.x<=n.width-e.bounds.width+n.edgeBleed.right&&t.y>=0-n.edgeBleed.top&&t.y<=n.height-e.bounds.height}function XK({line1:e,line2:t}){const n=(t.y2-t.y1)*(e.x2-e.x1)-(t.x2-t.x1)*(e.y2-e.y1);if(0===n)return!1;const r=((t.x2-t.x1)*(e.y1-t.y1)-(t.y2-t.y1)*(e.x1-t.x1))/n,i=((e.x2-e.x1)*(e.y1-t.y1)-(e.y2-e.y1)*(e.x1-t.x1))/n;return r>=0&&r<=1&&i>=0&&i<=1}function GK({candidate:e,lines:t,rects:n}){return!!n.some((t=>function({rect1:e,rect2:t}){return!(t.x>e.x+e.width||t.x+t.width<e.x||t.y>e.y+e.height||t.y+t.height<e.y)}({rect1:t,rect2:e})))||t.some((t=>function({line:e,rect:t}){const n={x:t.x,y:t.y},r={x:t.x+t.width,y:t.y},i={x:t.x+t.width,y:t.y+t.height},o={x:t.x,y:t.y+t.height},a={x1:r.x,y1:r.y,x2:i.x,y2:i.y},s={x1:i.x,y1:i.y,x2:o.x,y2:o.y},l={x1:o.x,y1:o.y,x2:n.x,y2:n.y};return XK({line1:e,line2:{x1:n.x,y1:n.y,x2:r.x,y2:r.y}})||XK({line1:e,line2:a})||XK({line1:e,line2:s})||XK({line1:e,line2:l})}({line:t,rect:e})))}const KK={x:0,width:0,y:0,height:0};const JK=({item:e})=>({x:e.bounds.x-e.bounds.width/2,y:e.bounds.y-e.bounds.height-e.node.localBounds.height/2-e.border}),ZK=({item:e})=>({x:e.bounds.x,y:e.bounds.y-e.bounds.height-e.node.localBounds.height/2-e.border}),QK=({item:e})=>({x:e.bounds.x+e.node.localBounds.width/2+e.border,y:e.bounds.y-e.bounds.height/2}),eJ=({item:e})=>({x:e.bounds.x,y:e.bounds.y+e.node.localBounds.height/2+e.border}),tJ=({item:e})=>({x:e.bounds.x-e.bounds.width/2,y:e.bounds.y+e.node.localBounds.height/2+e.border}),nJ=({item:e})=>({x:e.bounds.x-e.bounds.width,y:e.bounds.y+e.node.localBounds.height/2+e.border}),rJ=({item:e})=>({x:e.bounds.x-e.bounds.width-e.node.localBounds.width/2-e.border,y:e.bounds.y-e.bounds.height/2}),iJ=({item:e})=>({x:e.bounds.x-e.bounds.width,y:e.bounds.y-e.bounds.height-e.node.localBounds.height/2-e.border});var oJ=2.5,aJ=4;const sJ=[$K.TOP,$K.TOP_LEFT,$K.TOP_RIGHT],lJ=[$K.BOTTOM,$K.BOTTOM_LEFT,$K.BOTTOM_RIGHT];function uJ({position:e}){const t={x:oJ,width:-2*oJ,y:0,height:0},n=sJ.indexOf(e)>-1,r=lJ.indexOf(e)>-1;return n&&(t.y=aJ,t.height=-aJ),r&&(t.height=-aJ),t}function cJ({cx:e,cy:t,r:n,degrees:r}){const i=r*(Math.PI/180);return{x:Math.round(e+n*Math.sin(i)),y:Math.round(t+n*-Math.cos(i))}}function dJ({coordinates:e,degrees:t,item:n}){const r={x:e.x,y:e.y};return t<=90?r.y-=n.bounds.height:t>180&&t<=270?r.x-=n.bounds.width:t>270&&(r.y-=n.bounds.height,r.x-=n.bounds.width),r}function fJ({item:e,validator:t,force:n=!1}){const r=function({item:e}){return[e.node.localBounds.height/2*Math.sqrt(2)]}({item:e}),i=e.bounds.x,o=e.bounds.y;for(let a=0;a<r.length;a++){const s=r[a];for(let r=40;r<=180;r+=15){const a=dJ({coordinates:cJ({cx:i,cy:o,r:s,degrees:r}),degrees:r,item:e});if(t({item:e,placement:a,ignoreLines:n}).valid)return a}for(let r=320;r>180;r-=15){const a=dJ({coordinates:cJ({cx:i,cy:o,r:s,degrees:r}),degrees:r,item:e});if(t({item:e,placement:a,ignoreLines:n}).valid)return a}}return!1}const hJ=void 0;function pJ({item:e,validator:t,force:n=!1}){const r=[...e.preferences,...Object.keys($K).map((e=>$K[e])).filter((t=>-1===e.preferences.indexOf(t)))],i={[$K.TOP]:JK,[$K.TOP_RIGHT]:ZK,[$K.RIGHT]:QK,[$K.BOTTOM_RIGHT]:eJ,[$K.BOTTOM]:tJ,[$K.BOTTOM_LEFT]:nJ,[$K.LEFT]:rJ,[$K.TOP_LEFT]:iJ},o=[];for(let a=0;a<r.length;a++){const s=r[a],l=i[s]({item:e}),u=uJ({position:s}),c=t({item:e,placement:l,adjustment:u,ignoreLines:n});if(n&&c.inside&&o.push(l),c.valid)return l}const a=()=>fJ({item:e,validator:t,force:n});if(n){const e=a();return e||(o[0]||hJ)}return(e.extreme||e.elite)&&a()||hJ}function mJ({model:e,size:t,all:n}){const r={},i=e.getItems(),o=[...i.map((e=>({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})))],a=[],s=e.getLines();i.forEach((e=>{const{data:i}=e.node;if(!e.show||!e.inside||i.null&&i.null.value||i.interpolated&&i.interpolated.value)return;const{key:l}=e;if(r[l])return void e.setDuplicate();r[l]=!0;const u=function({size:e,lines:t,placements:n}){return function({item:r,placement:i,adjustment:o=KK,ignoreLines:a=!1}){const s={inside:YK({item:r,placement:i,size:e}),collides:!0,valid:!1};return s.inside?(s.collides=GK({candidate:{x:i.x+o.x,y:i.y+o.y,width:r.bounds.width+o.width,height:r.bounds.height+o.height},lines:a?[]:t,rects:n}),s.valid=!s.collides,s):s}}({size:t,lines:s,placements:o}),c=pJ({item:e,validator:u});c?(c.height=e.bounds.height,c.width=e.bounds.width,o.push(c),e.setPlacement(c)):n&&a.push({item:e,validator:u})})),a.forEach((e=>{const{item:t,validator:n}=e,r=pJ({item:t,validator:n,force:!0});r&&(r.height=t.bounds.height,r.width=t.bounds.width,o.push(r),t.setPlacement(r))}))}var yJ={require:["chart","renderer"],defaultSettings:{settings:{orientation:"horizontal",rtl:!1,connect:!1,all:!1,label:()=>{},showLabel:()=>!0,pointValue:()=>{},majorValue:()=>{},target:{labelSpace:"label-space-component",point:"point-component",allPoints:[]},lineIndex:"line",insideStrategy:"edge"},style:{fontFamily:"QlikView Sans, sans-serif",fontSize:"12px",fill:"#333"}},preferredSize(){const e={edgeBleed:{top:0,right:0,left:0}},t=this.chart.component(this.settings.settings.target.labelSpace);if(!t||!t.rect)return e;const{orientation:n,rtl:r}=this.settings.settings,i="horizontal"===n;if(t.show(r)){const{size:n}=t.settings.settings;e.edgeBleed.top=i?n:0,e.edgeBleed[r?"left":"right"]=i?0:n}return e},render(){if(!this.chart.component(this.settings.settings.target.point))return[];const{allPoints:e}=this.settings.settings.target,t=e.length?e=>this.settings.settings.target.allPoints.includes(e.key):e=>e.key===this.settings.settings.target.point,n=this.chart.findShapes("circle").filter(t);if(!n.length)return[];const{settings:r}=this.settings,i="horizontal"===r.orientation,o=i?"x":"y";n.sort(((e,t)=>e.localBounds[o]-t.localBounds[o]));const a={label:r.label,pointValue:r.pointValue,majorValue:r.majorValue,lineIndex:r.lineIndex},{height:s,width:l,edgeBleed:u}=this.rect,c={height:s,width:l,edgeBleed:u,insideStrategy:r.insideStrategy},{style:d}=this,f=WK({nodes:n,extract:a,style:d,measureText:this.renderer.measureText,size:c,horizontal:i,rtl:r.rtl,showLabel:r.showLabel});return function({model:e}){e.getItems().sort(((e,t)=>e.extreme===t.extreme?0:e.extreme&&!t.extreme?-1:1))}({model:f}),mJ({model:f,size:c,all:r.all}),f.getItems().filter((e=>e.placement&&e.node.key===this.settings.settings.target.point)).map((e=>({type:"text",x:e.placement.x+e.placement.width/2,y:e.placement.y+e.labelMeasurements.height/2,fontSize:d.fontSize,fontFamily:d.fontFamily,fill:d.fill,text:a.label(e.node.data),baseline:"central",anchor:"middle"})))}},gJ={defaultSettings:{settings:{size:10}},preferredSize(){return this.settings.settings.size},render:()=>[]};var vJ={require:["resolver","symbol"],defaultSettings:{settings:{type:"max",primaryExtremum:()=>{},secondaryExtremum:()=>{},primarySeries:[],secondarySeries:[],orientation:"horizontal",rtl:!1,major:{scale:"major-scale"},markerOffset:1,size:10},style:{fill:"#999"}},preferredSize(){return this.settings.settings.size},render(){const{items:e=[]}=this.data;if(!e.length)return[];const{type:t,orientation:n,rtl:r,markerOffset:i,size:o,major:a,primarySeries:s,secondarySeries:l}=this.settings.settings,u=this.settings.settings.primaryExtremum(),c=this.settings.settings.secondaryExtremum(),d=s.length&&void 0!==u,f=l.length&&void 0!==c;if(!d&&!f)return[];const h=s.map((e=>e.ref)),p=l.map((e=>e.ref)),m=function({type:e,primaryExtremum:t,secondaryExtremum:n,primaryItems:r=[],secondaryItems:i=[],primarySeries:o=[],secondarySeries:a=[]}){const s=[];return[...o,...a].forEach((o=>{const a=o.isPrimary?t:n,l=o.isPrimary?r:i;s.push((({type:e,extremum:t,separateStacking:n,items:r})=>{const i="max"===e?e=>e>t:e=>e<t,o=n?e=>i(e.point.value<0?e.start.value:e.end.value):e=>i(e.end.value);return r.filter(o)})({type:e,extremum:a,items:l}))})),(({items:e})=>{const t=[],n=[];return e.forEach((e=>{const{value:r}=e.major;t[r]||(t[r]=!0,n.push(e))})),n})({items:s.reduce(((e,t)=>e.concat(t)),[])})}({type:t,primaryExtremum:u,secondaryExtremum:c,primaryItems:e.filter((e=>h.includes(e.end.source.field))),secondaryItems:e.filter((e=>p.includes(e.end.source.field))),primarySeries:s,secondarySeries:l});if(!m.length)return[];const y="horizontal"===n,g=this.rect[y?"width":"height"],v=this.resolver.resolve({data:{items:m},settings:{major:a},scaled:{major:g}}),b=("max"===t?90:-90)-(y?0:90)-(!y&&r?180:0),x=o/2*i,{fill:M}=this.settings.style;return v.items.map((e=>function({symbol:e,size:t,fill:n,startAngle:r,x:i,y:o,data:a}){return e({type:"n-polygon",show:!0,size:t,fill:n,stroke:"#205891",strokeWidth:0,sides:3,startAngle:r,width:.7,x:i,y:o,data:a})}({symbol:this.symbol,size:o,fill:M,startAngle:b,x:y?g*e.major:x,y:y?x:g*e.major,data:e.data})))}};function bJ({x:e,y:t,size:n,stroke:r,strokeWidth:i,fill:o}){return{type:"container",children:[{type:"line",stroke:r||o,strokeWidth:i,x1:e-n/2,y1:t,x2:e+n/2,y2:t},{type:"circle",strokeWidth:0,fill:o,cx:e,cy:t,r:.25*n}]}}function xJ({chart:e,seriesInfo:t}){const n={primary:{paths:[],map:{}},secondary:{paths:[],map:{}}},r=[...t.primary.map((e=>e.key)),...t.secondary.map((e=>e.key))];return e.findShapes("path").filter((e=>r.some((t=>t===e.key)))).reduce(((e,n)=>((t.primary.some((e=>e.key===n.key))?e.primary:e.secondary).paths.push(n),e)),n),{getLine:(e,t)=>{const r=t?n.primary:n.secondary;if(!r.map[e]){const[t]=r.paths.filter((t=>t.data&&t.data.typeIndex.value===e));r.map[e]=t}return r.map[e]}}}function MJ({brush:e}){const t=e.brush.values();return function({value:e}){return-1!==t.indexOf(e)}}function SJ({brush:e,chart:t}){const n=e.brush.ranges();if(!n.length)return!1;const r=t&&t.scale(Vo.SCALE.MAJOR),i=r&&r.max&&r.max(),o="qHyperCube/qDimensionInfo/0:numeric"===e.id?(e,t)=>t===i?e<=t:e<t:(e,t)=>e<=t;return function({value:e}){return n.some((t=>t.min<=e&&o(e,t.max)))}}function wJ({brush:e,selectionInfo:t,items:n,selectionValues:r,colorByData:i,chart:o}){const a=e.brushes();if(!a.length)return[];const s=a[0],{minorRange:l,legendRange:u,legendTap:c}=t,d=0===s.id.indexOf("qHyperCube/qMeasureInfo/")?"qHyperCube/qMeasureInfo/X":s.id;let f=[u?e=>e.color.value:r[d]].filter(Boolean);if(i&&l&&f.push((e=>e.color.value)),!i&&c&&(f=[e=>e.color.value]),!f.length)return[];const h=function({brush:e,chart:t}){return("value"===e.type?MJ:SJ)({brush:e,chart:t})}({brush:s,chart:o});return h?n.reduce(((e,t,n)=>(f.some((e=>h({value:e(t)})))&&e.push({item:t,index:n}),e)),[]):[]}function EJ({chart:e,selected:t,connection:n,gradient:r,fallback:i}){const o=e.scale(Vo.SCALE.COLOR),a=t.filter((e=>-1!==n.indexOf(e.index))).map((e=>e.item.end.value)),s=Math.min(...a),l=Math.max(...a),u=l-s,c=0===u?1:u,d=o.domain().map((e=>({color:o(Math.min(l,Math.max(s,e)))||i,offset:Math.min(1,Math.max(0,(e-s)/c))}))),f=d.map((e=>e.offset)),h=f.lastIndexOf(0),p=f.indexOf(1),m=d.slice(-1===h?0:h,-1===p?d.length:p+1);return{type:"gradient",x1:r.x1,x2:r.x2,y1:r.y1,y2:r.y2,stops:m}}function kJ({chart:e,selected:t,connection:n,gradient:r,fallback:i}){const o=e.scale(Vo.SCALE.COLOR),a=t.filter((e=>-1!==n.indexOf(e.index))).map((e=>e.item.end.value)),s=Math.min(...a),l=Math.max(...a)-s,u=0===l?1:l,c=o.domain(),d=[];for(let e=0;e<c.length-1;e++){const t=c[e],n=o(t)||i;d.push({color:n,offset:Math.min(1,Math.max(0,(t-s)/u))});const r=c[e+1];d.push({color:n,offset:Math.min(1,Math.max(0,(r-s)/u))})}const f=d.map((e=>e.offset)),h=f.lastIndexOf(0),p=f.indexOf(1),m=d.slice(-1===h?0:h,-1===p?d.length:p+1);return{type:"gradient",x1:r.x1,x2:r.x2,y1:r.y1,y2:r.y2,stops:m}}function CJ({property:e,chart:t,connection:n,attrs:r,colorSettings:i,colorByData:o,selected:a,hasMultipleMeasures:s,groupedByMeasure:l,itemsPerGroup:u,orientation:c,rtl:d}){const f=r[e];if("gradient"!==f.type)return f;const{type:h,nil:p}=i;if(s||!o)return function({chart:e,selected:t,connection:n,gradient:r,fallback:i,orientation:o,isColorCode:a,groupedByMeasure:s,itemsPerGroup:l,rtl:u}){const c=e.scale(Vo.SCALE.MAJOR),d=e.scale(Vo.SCALE.COLOR),f=s?e=>c([e,0])+c.bandwidth()*l/2:e=>c(e),h=t.filter((e=>-1!==n.indexOf(e.index))),p=("vertical"===o&&u?h.reverse():h).map((e=>e.item)),m=p.map((e=>f(e.major.value))),y=Math.min(...m),g=Math.max(...m)-y,v=0===g?1:g,b=m.map(((e,t)=>0===t?0:t===m.length-1?1:(e-y)/v)),x=[];for(let e=0;e<p.length;e++){const t=p[e],n=a?t.color.value:d(t.color.value)||i,r=b[e];x.push({color:n,offset:0===e?0:Math.max(0,x[x.length-1].offset)}),x.push({color:n,offset:e===p.length-1?1:Math.max(0,parseFloat((r+(b[e+1]-r)/2).toFixed(5)))})}return{type:"gradient",x1:r.x1,x2:r.x2,y1:r.y1,y2:r.y2,stops:x}}({chart:t,selected:a,connection:n,gradient:f,fallback:p,orientation:c,isColorCode:"color"===h,groupedByMeasure:l,itemsPerGroup:u,rtl:d});return("continuous"===h?EJ:kJ)({chart:t,selected:a,connection:n,gradient:f,fallback:p})}function OJ({chart:e,pathModel:t,colorSettings:n,colorByData:r,hasMultipleMeasures:i,groupedByMeasure:o,itemsPerGroup:a,orientation:s,lineKey:l,primary:u,selected:c,connections:d,rtl:f,count:h}){const p=t.getLine(l,u),{attrs:m}=p,y=function({d:e}){return e.replace("Z","").split(/(?=[LMC])/).map((e=>{const t=e.substring(0,1),n={letter:t,x:0,y:0,raw:e},r=e.substring(1).split(",");return"M"===t||"L"===t?([n.x]=r,[,n.y]=r):"C"===t&&([,,,,n.x]=r,[,,,,,n.y]=r),n}))}({d:m.d});return d.map((t=>function({chart:e,colorSettings:t,colorByData:n,hasMultipleMeasures:r,groupedByMeasure:i,itemsPerGroup:o,orientation:a,selected:s,connection:l,commands:u,attrs:c,rtl:d,count:f}){return{path:l.map(((e,t)=>{const n=u[e];return 0!==t||"M"===n.letter?n.raw:`M${n.x},${n.y}`})).join(""),attrs:c,stroke:CJ({property:"stroke",chart:e,connection:l,attrs:c,selected:s,colorSettings:t,colorByData:n,hasMultipleMeasures:r,groupedByMeasure:i,itemsPerGroup:o,orientation:a,rtl:d,count:f})}}({chart:e,colorSettings:n,colorByData:r,hasMultipleMeasures:i,groupedByMeasure:o,itemsPerGroup:a,orientation:s,selected:c,connection:t,commands:y,attrs:m,rtl:f,count:h})))}function TJ({chart:e,pathModel:t,seriesInfo:n,brush:r,selectionInfo:i,items:o,selectionValues:a,colorSettings:s,colorByData:l,hasMultipleMeasures:u,groupedByMeasure:c,itemsPerGroup:d,orientation:f,rtl:h}){const p=function({items:e,seriesInfo:t}){const n=e.reduce(((e,n,r)=>{const i=n.typeIndex.value;var o;return e[i]||(e[i]={key:i,items:[],index:r,measureIx:null===(o=n.colorMeasureIdx)||void 0===o?void 0:o.value,primary:t.primary.some((e=>e.typeIndex===i))}),e[i].items.push(n),e}),{});return Object.keys(n).map((e=>n[e])).sort(((e,t)=>e.index-t.index)).map((e=>({lineKey:e.key,items:e.items,primary:e.primary,measureIx:e.measureIx})))}({items:function({items:e,selectionInfo:t,seriesInfo:n}){return e.filter((e=>{if("NaN"===e.end.value||Number.isNaN(e.end.value))return!1;const{minorRange:r,minorRangePrimary:i}=t;return!r||(i?n.primary:n.secondary).some((t=>t.typeIndex===e.typeIndex.value))}))}({items:o,selectionInfo:i,seriesInfo:n}),seriesInfo:n}),{lines:m}=p.reduce(((n,o)=>{const p=wJ({brush:r,selectionInfo:i,items:o.items,selectionValues:a,colorByData:l,chart:e});if(p.length<2)return n;const m=function({selected:e}){return e.reduce(((e,t)=>{const{index:n}=t;if(e.length){const t=e[e.length-1];n===t[t.length-1]+1?t.push(n):e.push([n])}else e.push([n]);return e}),[]).filter((e=>e.length>1))}({selected:p});return m.length?(n.lines.push(...OJ({chart:e,pathModel:t,colorSettings:s(o.measureIx),colorByData:l(o.measureIx),hasMultipleMeasures:u,groupedByMeasure:c,itemsPerGroup:d,orientation:f,lineKey:o.lineKey,primary:o.primary,selected:p,connections:m,rtl:h,count:o.items.length})),n):n}),{lines:[]}),y=[];return m.forEach((e=>y.push({type:"path",d:e.path,stroke:e.stroke,strokeLinejoin:e.attrs["stroke-linejoin"],strokeWidth:e.attrs["stroke-width"],strokeDasharray:e.attrs["stroke-dasharray"],fill:"none"}))),y}var AJ={require:["chart","renderer"],defaultSettings:{settings:{seriesInfo:{primary:[],secondary:[]},selectionValues:{},colorSettings:void 0,colorByData:!1,isColorCode:!1,hasMultipleMeasures:!1,groupedByMeasure:!1,itemsPerGroup:1,orientation:"vertical",rtl:!1}},addListener(e,t){this.state.brush.addListener(e,t),this.state.listeners.push({type:e,fn:t})},removeListeners(){this.state.listeners.forEach((e=>this.state.brush.removeListener(e.type,e.fn))),this.state.listeners.length=0},created(){this.state={pathModel:xJ({chart:this.chart,seriesInfo:this.settings.settings.seriesInfo}),brush:this.chart.brush("selection"),listeners:[],selectionInfo:{minorRange:!1,minorRangePrimary:!1,legendRange:!1,legendTap:!1}}},mounted(){this.addListener("update",(()=>{this.state.selectionInfo=this.settings.settings.getSelectionInfo();const e=TJ({chart:this.chart,pathModel:this.state.pathModel,seriesInfo:this.settings.settings.seriesInfo,brush:this.state.brush,selectionInfo:this.state.selectionInfo,items:this.data.items,selectionValues:this.settings.settings.selectionValues,colorSettings:this.settings.settings.colorSettings,colorByData:this.settings.settings.colorByData,isColorCode:this.settings.settings.isColorCode,hasMultipleMeasures:this.settings.settings.hasMultipleMeasures,groupedByMeasure:this.settings.settings.groupedByMeasure,itemsPerGroup:this.settings.settings.itemsPerGroup,orientation:this.settings.settings.orientation,rtl:this.settings.settings.rtl});this.renderer.render(e)})),this.addListener("end",(()=>{this.renderer.render([])}))},render(){this.state.pathModel=xJ({chart:this.chart,seriesInfo:this.settings.settings.seriesInfo}),this.state.selectionInfo=this.settings.settings.getSelectionInfo();return TJ({chart:this.chart,pathModel:this.state.pathModel,seriesInfo:this.settings.settings.seriesInfo,brush:this.state.brush,selectionInfo:this.state.selectionInfo,items:this.data.items,selectionValues:this.settings.settings.selectionValues,colorSettings:this.settings.settings.colorSettings,colorByData:this.settings.settings.colorByData,isColorCode:this.settings.settings.isColorCode,hasMultipleMeasures:this.settings.settings.hasMultipleMeasures,groupedByMeasure:this.settings.settings.groupedByMeasure,itemsPerGroup:this.settings.settings.itemsPerGroup,orientation:this.settings.settings.orientation,rtl:this.settings.settings.rtl})},destroyed(){this.removeListeners()}};const NJ=()=>{const e=Eq();return e.use(SR),e.use(function(e){if("function"!=typeof e.interaction)return function(t){t.interaction("hammer",kR(e))};e.interaction("hammer",kR(Hammer))}(Dm)),e.use(iK),e.use(nK()),e.component("scrollbar",Nd),e.component("point-label",yJ),e.component("label-space",gJ),e.component("time-axis",im.picassoComponents.timeAxis),e.component("axis-overlay",im.picassoComponents.axisOverlay),e.component("reference-line-labels",Do),e.component("box-sliced-hat",pK),e.component("box-out-of-bounds",uK),e.component("data-out-of-bounds-marker",vJ),e.component("scroll-hint",Ii),e.component("brush-highlighter",AJ),e.scale("time",im.picassoScales.time),e.symbol("line-point",bJ),e},qJ="QlikView Sans, sans-serif";var DJ=[["object.comboChart","","fontFamily"],["object.comboChart","outOfRange","color","#999"],["object.comboChart","axis.title","color"],["object.comboChart","axis.title","fontSize","13px"],["object.comboChart","axis.title","fontFamily",qJ],["object.comboChart","axis.label.name","color","#595959"],["object.comboChart","axis.label.name","fontSize","12px"],["object.comboChart","axis.label.name","fontFamily",qJ],["object.comboChart","axis.line.major","color","#cccccc"],["object.comboChart","axis.line.minor","color","#e6e6e6"],["object.comboChart","label.value","fontFamily",qJ],["object.comboChart","label.value","fontSize","12px"],["object.comboChart","label.value","numFontSize","12px",e=>parseInt(e,10)],["object.comboChart","label.value","color","#595959"],[!1,"label.value","lightColor","#E6E6E6"],[!1,"label.value","darkColor","#595959"]];const RJ={line:"bar",circle:"circle",diamond:"diamond",triangle:"triangle",rect:"square"},IJ=e=>void 0===e.marker?RJ.circle:RJ[e.marker],_J=e=>void 0===e.markerFill||e.markerFill;function PJ({series:e,layoutService:t}){switch(Lh(e)){case Ho.MARKER:return(e=>({marker:IJ(e),fill:_J(e)}))(e);case Ho.LINE:return(e=>{const t=e.getLayoutValue("nullMode","gap");return{showAsGaps:"gap"===t,showAsConnections:"connect"===t,showAsZeros:"zero"===t}})(t);default:return{}}}function LJ(e=Uo,t){return t?e.axis===$o.PRIMARY:e.axis===$o.PRIMARY||Lh(e)===Ho.BAR}var jJ={exports:{}};var zJ={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,MAX_SAFE_COMPONENT_LENGTH:16};var FJ="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};!function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n}=zJ,r=FJ,i=(t=e.exports={}).re=[],o=t.src=[],a=t.t={};let s=0;const l=(e,t,n)=>{const l=s++;r(l,t),a[e]=l,o[l]=t,i[l]=new RegExp(t,n?"g":void 0)};l("NUMERICIDENTIFIER","0|[1-9]\\d*"),l("NUMERICIDENTIFIERLOOSE","[0-9]+"),l("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),l("MAINVERSION",`(${o[a.NUMERICIDENTIFIER]})\\.(${o[a.NUMERICIDENTIFIER]})\\.(${o[a.NUMERICIDENTIFIER]})`),l("MAINVERSIONLOOSE",`(${o[a.NUMERICIDENTIFIERLOOSE]})\\.(${o[a.NUMERICIDENTIFIERLOOSE]})\\.(${o[a.NUMERICIDENTIFIERLOOSE]})`),l("PRERELEASEIDENTIFIER",`(?:${o[a.NUMERICIDENTIFIER]}|${o[a.NONNUMERICIDENTIFIER]})`),l("PRERELEASEIDENTIFIERLOOSE",`(?:${o[a.NUMERICIDENTIFIERLOOSE]}|${o[a.NONNUMERICIDENTIFIER]})`),l("PRERELEASE",`(?:-(${o[a.PRERELEASEIDENTIFIER]}(?:\\.${o[a.PRERELEASEIDENTIFIER]})*))`),l("PRERELEASELOOSE",`(?:-?(${o[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${o[a.PRERELEASEIDENTIFIERLOOSE]})*))`),l("BUILDIDENTIFIER","[0-9A-Za-z-]+"),l("BUILD",`(?:\\+(${o[a.BUILDIDENTIFIER]}(?:\\.${o[a.BUILDIDENTIFIER]})*))`),l("FULLPLAIN",`v?${o[a.MAINVERSION]}${o[a.PRERELEASE]}?${o[a.BUILD]}?`),l("FULL",`^${o[a.FULLPLAIN]}$`),l("LOOSEPLAIN",`[v=\\s]*${o[a.MAINVERSIONLOOSE]}${o[a.PRERELEASELOOSE]}?${o[a.BUILD]}?`),l("LOOSE",`^${o[a.LOOSEPLAIN]}$`),l("GTLT","((?:<|>)?=?)"),l("XRANGEIDENTIFIERLOOSE",o[a.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*"),l("XRANGEIDENTIFIER",o[a.NUMERICIDENTIFIER]+"|x|X|\\*"),l("XRANGEPLAIN",`[v=\\s]*(${o[a.XRANGEIDENTIFIER]})(?:\\.(${o[a.XRANGEIDENTIFIER]})(?:\\.(${o[a.XRANGEIDENTIFIER]})(?:${o[a.PRERELEASE]})?${o[a.BUILD]}?)?)?`),l("XRANGEPLAINLOOSE",`[v=\\s]*(${o[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[a.XRANGEIDENTIFIERLOOSE]})(?:${o[a.PRERELEASELOOSE]})?${o[a.BUILD]}?)?)?`),l("XRANGE",`^${o[a.GTLT]}\\s*${o[a.XRANGEPLAIN]}$`),l("XRANGELOOSE",`^${o[a.GTLT]}\\s*${o[a.XRANGEPLAINLOOSE]}$`),l("COERCE",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?(?:$|[^\\d])`),l("COERCERTL",o[a.COERCE],!0),l("LONETILDE","(?:~>?)"),l("TILDETRIM",`(\\s*)${o[a.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",l("TILDE",`^${o[a.LONETILDE]}${o[a.XRANGEPLAIN]}$`),l("TILDELOOSE",`^${o[a.LONETILDE]}${o[a.XRANGEPLAINLOOSE]}$`),l("LONECARET","(?:\\^)"),l("CARETTRIM",`(\\s*)${o[a.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",l("CARET",`^${o[a.LONECARET]}${o[a.XRANGEPLAIN]}$`),l("CARETLOOSE",`^${o[a.LONECARET]}${o[a.XRANGEPLAINLOOSE]}$`),l("COMPARATORLOOSE",`^${o[a.GTLT]}\\s*(${o[a.LOOSEPLAIN]})$|^$`),l("COMPARATOR",`^${o[a.GTLT]}\\s*(${o[a.FULLPLAIN]})$|^$`),l("COMPARATORTRIM",`(\\s*)${o[a.GTLT]}\\s*(${o[a.LOOSEPLAIN]}|${o[a.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",l("HYPHENRANGE",`^\\s*(${o[a.XRANGEPLAIN]})\\s+-\\s+(${o[a.XRANGEPLAIN]})\\s*$`),l("HYPHENRANGELOOSE",`^\\s*(${o[a.XRANGEPLAINLOOSE]})\\s+-\\s+(${o[a.XRANGEPLAINLOOSE]})\\s*$`),l("STAR","(<|>)?=?\\s*\\*"),l("GTE0","^\\s*>=\\s*0.0.0\\s*$"),l("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")}(jJ,jJ.exports);const BJ=["includePrerelease","loose","rtl"];var VJ=e=>e?"object"!=typeof e?{loose:!0}:BJ.filter((t=>e[t])).reduce(((e,t)=>(e[t]=!0,e)),{}):{};const HJ=/^[0-9]+$/,$J=(e,t)=>{const n=HJ.test(e),r=HJ.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e<t?-1:1};var UJ={compareIdentifiers:$J,rcompareIdentifiers:(e,t)=>$J(t,e)};const WJ=FJ,{MAX_LENGTH:YJ,MAX_SAFE_INTEGER:XJ}=zJ,{re:GJ,t:KJ}=jJ.exports,JJ=VJ,{compareIdentifiers:ZJ}=UJ;class QJ{constructor(e,t){if(t=JJ(t),e instanceof QJ){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>YJ)throw new TypeError(`version is longer than ${YJ} characters`);WJ("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?GJ[KJ.LOOSE]:GJ[KJ.FULL]);if(!n)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>XJ||this.major<0)throw new TypeError("Invalid major version");if(this.minor>XJ||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>XJ||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<XJ)return t}return e})):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version}toString(){return this.version}compare(e){if(WJ("SemVer.compare",this.version,this.options,e),!(e instanceof QJ)){if("string"==typeof e&&e===this.version)return 0;e=new QJ(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof QJ||(e=new QJ(e,this.options)),ZJ(this.major,e.major)||ZJ(this.minor,e.minor)||ZJ(this.patch,e.patch)}comparePre(e){if(e instanceof QJ||(e=new QJ(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const n=this.prerelease[t],r=e.prerelease[t];if(WJ("prerelease compare",t,n,r),void 0===n&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===n)return-1;if(n!==r)return ZJ(n,r)}while(++t)}compareBuild(e){e instanceof QJ||(e=new QJ(e,this.options));let t=0;do{const n=this.build[t],r=e.build[t];if(WJ("prerelease compare",t,n,r),void 0===n&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===n)return-1;if(n!==r)return ZJ(n,r)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{let e=this.prerelease.length;for(;--e>=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this}}var eZ=QJ;const{MAX_LENGTH:tZ}=zJ,{re:nZ,t:rZ}=jJ.exports,iZ=eZ,oZ=VJ;var aZ=(e,t)=>{if(t=oZ(t),e instanceof iZ)return e;if("string"!=typeof e)return null;if(e.length>tZ)return null;if(!(t.loose?nZ[rZ.LOOSE]:nZ[rZ.FULL]).test(e))return null;try{return new iZ(e,t)}catch(e){return null}};const sZ=aZ;var lZ=(e,t)=>{const n=sZ(e,t);return n?n.version:null};const uZ=aZ;var cZ=(e,t)=>{const n=uZ(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null};const dZ=eZ;var fZ=(e,t,n,r)=>{"string"==typeof n&&(r=n,n=void 0);try{return new dZ(e,n).inc(t,r).version}catch(e){return null}};const hZ=eZ;var pZ=(e,t,n)=>new hZ(e,n).compare(new hZ(t,n));const mZ=pZ;var yZ=(e,t,n)=>0===mZ(e,t,n);const gZ=aZ,vZ=yZ;var bZ=(e,t)=>{if(vZ(e,t))return null;{const n=gZ(e),r=gZ(t),i=n.prerelease.length||r.prerelease.length,o=i?"pre":"",a=i?"prerelease":"";for(const e in n)if(("major"===e||"minor"===e||"patch"===e)&&n[e]!==r[e])return o+e;return a}};const xZ=eZ;var MZ=(e,t)=>new xZ(e,t).major;const SZ=eZ;var wZ=(e,t)=>new SZ(e,t).minor;const EZ=eZ;var kZ=(e,t)=>new EZ(e,t).patch;const CZ=aZ;var OZ=(e,t)=>{const n=CZ(e,t);return n&&n.prerelease.length?n.prerelease:null};const TZ=pZ;var AZ=(e,t,n)=>TZ(t,e,n);const NZ=pZ;var qZ=(e,t)=>NZ(e,t,!0);const DZ=eZ;var RZ=(e,t,n)=>{const r=new DZ(e,n),i=new DZ(t,n);return r.compare(i)||r.compareBuild(i)};const IZ=RZ;var _Z=(e,t)=>e.sort(((e,n)=>IZ(e,n,t)));const PZ=RZ;var LZ=(e,t)=>e.sort(((e,n)=>PZ(n,e,t)));const jZ=pZ;var zZ=(e,t,n)=>jZ(e,t,n)>0;const FZ=pZ;var BZ=(e,t,n)=>FZ(e,t,n)<0;const VZ=pZ;var HZ=(e,t,n)=>0!==VZ(e,t,n);const $Z=pZ;var UZ=(e,t,n)=>$Z(e,t,n)>=0;const WZ=pZ;var YZ=(e,t,n)=>WZ(e,t,n)<=0;const XZ=yZ,GZ=HZ,KZ=zZ,JZ=UZ,ZZ=BZ,QZ=YZ;var eQ=(e,t,n,r)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return XZ(e,n,r);case"!=":return GZ(e,n,r);case">":return KZ(e,n,r);case">=":return JZ(e,n,r);case"<":return ZZ(e,n,r);case"<=":return QZ(e,n,r);default:throw new TypeError("Invalid operator: "+t)}};const tQ=eZ,nQ=aZ,{re:rQ,t:iQ}=jJ.exports;var oQ=(e,t)=>{if(e instanceof tQ)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let n=null;if((t=t||{}).rtl){let t;for(;(t=rQ[iQ.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&t.index+t[0].length===n.index+n[0].length||(n=t),rQ[iQ.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;rQ[iQ.COERCERTL].lastIndex=-1}else n=e.match(rQ[iQ.COERCE]);return null===n?null:nQ(`${n[2]}.${n[3]||"0"}.${n[4]||"0"}`,t)},aQ=sQ;function sQ(e){var t=this;if(t instanceof sQ||(t=new sQ),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var n=0,r=arguments.length;n<r;n++)t.push(arguments[n]);return t}function lQ(e,t,n){var r=t===e.head?new dQ(n,null,t,e):new dQ(n,t,t.next,e);return null===r.next&&(e.tail=r),null===r.prev&&(e.head=r),e.length++,r}function uQ(e,t){e.tail=new dQ(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function cQ(e,t){e.head=new dQ(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function dQ(e,t,n,r){if(!(this instanceof dQ))return new dQ(e,t,n,r);this.list=r,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,n?(n.prev=this,this.next=n):this.next=null}sQ.Node=dQ,sQ.create=sQ,sQ.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,n=e.prev;return t&&(t.prev=n),n&&(n.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=n),e.list.length--,e.next=null,e.prev=null,e.list=null,t},sQ.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},sQ.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},sQ.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)uQ(this,arguments[e]);return this.length},sQ.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)cQ(this,arguments[e]);return this.length},sQ.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},sQ.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},sQ.prototype.forEach=function(e,t){t=t||this;for(var n=this.head,r=0;null!==n;r++)e.call(t,n.value,r,this),n=n.next},sQ.prototype.forEachReverse=function(e,t){t=t||this;for(var n=this.tail,r=this.length-1;null!==n;r--)e.call(t,n.value,r,this),n=n.prev},sQ.prototype.get=function(e){for(var t=0,n=this.head;null!==n&&t<e;t++)n=n.next;if(t===e&&null!==n)return n.value},sQ.prototype.getReverse=function(e){for(var t=0,n=this.tail;null!==n&&t<e;t++)n=n.prev;if(t===e&&null!==n)return n.value},sQ.prototype.map=function(e,t){t=t||this;for(var n=new sQ,r=this.head;null!==r;)n.push(e.call(t,r.value,this)),r=r.next;return n},sQ.prototype.mapReverse=function(e,t){t=t||this;for(var n=new sQ,r=this.tail;null!==r;)n.push(e.call(t,r.value,this)),r=r.prev;return n},sQ.prototype.reduce=function(e,t){var n,r=this.head;if(arguments.length>1)n=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,n=this.head.value}for(var i=0;null!==r;i++)n=e(n,r.value,i),r=r.next;return n},sQ.prototype.reduceReverse=function(e,t){var n,r=this.tail;if(arguments.length>1)n=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,n=this.tail.value}for(var i=this.length-1;null!==r;i--)n=e(n,r.value,i),r=r.prev;return n},sQ.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;null!==n;t++)e[t]=n.value,n=n.next;return e},sQ.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;null!==n;t++)e[t]=n.value,n=n.prev;return e},sQ.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new sQ;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var r=0,i=this.head;null!==i&&r<e;r++)i=i.next;for(;null!==i&&r<t;r++,i=i.next)n.push(i.value);return n},sQ.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new sQ;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var r=this.length,i=this.tail;null!==i&&r>t;r--)i=i.prev;for(;null!==i&&r>e;r--,i=i.prev)n.push(i.value);return n},sQ.prototype.splice=function(e,t,...n){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var r=0,i=this.head;null!==i&&r<e;r++)i=i.next;var o=[];for(r=0;i&&r<t;r++)o.push(i.value),i=this.removeNode(i);null===i&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(r=0;r<n.length;r++)i=lQ(this,i,n[r]);return o},sQ.prototype.reverse=function(){for(var e=this.head,t=this.tail,n=e;null!==n;n=n.prev){var r=n.prev;n.prev=n.next,n.next=r}return this.head=t,this.tail=e,this};try{!function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}(sQ)}catch(Wu){}const fQ=aQ,hQ=Symbol("max"),pQ=Symbol("length"),mQ=Symbol("lengthCalculator"),yQ=Symbol("allowStale"),gQ=Symbol("maxAge"),vQ=Symbol("dispose"),bQ=Symbol("noDisposeOnSet"),xQ=Symbol("lruList"),MQ=Symbol("cache"),SQ=Symbol("updateAgeOnGet"),wQ=()=>1;const EQ=(e,t,n)=>{const r=e[MQ].get(t);if(r){const t=r.value;if(kQ(e,t)){if(OQ(e,r),!e[yQ])return}else n&&(e[SQ]&&(r.value.now=Date.now()),e[xQ].unshiftNode(r));return t.value}},kQ=(e,t)=>{if(!t||!t.maxAge&&!e[gQ])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[gQ]&&n>e[gQ]},CQ=e=>{if(e[pQ]>e[hQ])for(let t=e[xQ].tail;e[pQ]>e[hQ]&&null!==t;){const n=t.prev;OQ(e,t),t=n}},OQ=(e,t)=>{if(t){const n=t.value;e[vQ]&&e[vQ](n.key,n.value),e[pQ]-=n.length,e[MQ].delete(n.key),e[xQ].removeNode(t)}};class TQ{constructor(e,t,n,r,i){this.key=e,this.value=t,this.length=n,this.now=r,this.maxAge=i||0}}const AQ=(e,t,n,r)=>{let i=n.value;kQ(e,i)&&(OQ(e,n),e[yQ]||(i=void 0)),i&&t.call(r,i.value,i.key,e)};var NQ=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[hQ]=e.max||1/0;const t=e.length||wQ;if(this[mQ]="function"!=typeof t?wQ:t,this[yQ]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[gQ]=e.maxAge||0,this[vQ]=e.dispose,this[bQ]=e.noDisposeOnSet||!1,this[SQ]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[hQ]=e||1/0,CQ(this)}get max(){return this[hQ]}set allowStale(e){this[yQ]=!!e}get allowStale(){return this[yQ]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[gQ]=e,CQ(this)}get maxAge(){return this[gQ]}set lengthCalculator(e){"function"!=typeof e&&(e=wQ),e!==this[mQ]&&(this[mQ]=e,this[pQ]=0,this[xQ].forEach((e=>{e.length=this[mQ](e.value,e.key),this[pQ]+=e.length}))),CQ(this)}get lengthCalculator(){return this[mQ]}get length(){return this[pQ]}get itemCount(){return this[xQ].length}rforEach(e,t){t=t||this;for(let n=this[xQ].tail;null!==n;){const r=n.prev;AQ(this,e,n,t),n=r}}forEach(e,t){t=t||this;for(let n=this[xQ].head;null!==n;){const r=n.next;AQ(this,e,n,t),n=r}}keys(){return this[xQ].toArray().map((e=>e.key))}values(){return this[xQ].toArray().map((e=>e.value))}reset(){this[vQ]&&this[xQ]&&this[xQ].length&&this[xQ].forEach((e=>this[vQ](e.key,e.value))),this[MQ]=new Map,this[xQ]=new fQ,this[pQ]=0}dump(){return this[xQ].map((e=>!kQ(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[xQ]}set(e,t,n){if((n=n||this[gQ])&&"number"!=typeof n)throw new TypeError("maxAge must be a number");const r=n?Date.now():0,i=this[mQ](t,e);if(this[MQ].has(e)){if(i>this[hQ])return OQ(this,this[MQ].get(e)),!1;const o=this[MQ].get(e).value;return this[vQ]&&(this[bQ]||this[vQ](e,o.value)),o.now=r,o.maxAge=n,o.value=t,this[pQ]+=i-o.length,o.length=i,this.get(e),CQ(this),!0}const o=new TQ(e,t,i,r,n);return o.length>this[hQ]?(this[vQ]&&this[vQ](e,t),!1):(this[pQ]+=o.length,this[xQ].unshift(o),this[MQ].set(e,this[xQ].head),CQ(this),!0)}has(e){if(!this[MQ].has(e))return!1;const t=this[MQ].get(e).value;return!kQ(this,t)}get(e){return EQ(this,e,!0)}peek(e){return EQ(this,e,!1)}pop(){const e=this[xQ].tail;return e?(OQ(this,e),e.value):null}del(e){OQ(this,this[MQ].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const r=e[n],i=r.e||0;if(0===i)this.set(r.k,r.v);else{const e=i-t;e>0&&this.set(r.k,r.v,e)}}}prune(){this[MQ].forEach(((e,t)=>EQ(this,t,!1)))}};class qQ{constructor(e,t){if(t=IQ(t),e instanceof qQ)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new qQ(e.raw,t);if(e instanceof _Q)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!HQ(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&$Q(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();const t=`parseRange:${Object.keys(this.options).join(",")}:${e}`,n=RQ.get(t);if(n)return n;const r=this.options.loose,i=r?jQ[zQ.HYPHENRANGELOOSE]:jQ[zQ.HYPHENRANGE];e=e.replace(i,n0(this.options.includePrerelease)),PQ("hyphen replace",e),e=e.replace(jQ[zQ.COMPARATORTRIM],FQ),PQ("comparator trim",e,jQ[zQ.COMPARATORTRIM]),e=(e=(e=e.replace(jQ[zQ.TILDETRIM],BQ)).replace(jQ[zQ.CARETTRIM],VQ)).split(/\s+/).join(" ");const o=r?jQ[zQ.COMPARATORLOOSE]:jQ[zQ.COMPARATOR],a=e.split(" ").map((e=>WQ(e,this.options))).join(" ").split(/\s+/).map((e=>t0(e,this.options))).filter(this.options.loose?e=>!!e.match(o):()=>!0).map((e=>new _Q(e,this.options)));a.length;const s=new Map;for(const e of a){if(HQ(e))return[e];s.set(e.value,e)}s.size>1&&s.has("")&&s.delete("");const l=[...s.values()];return RQ.set(t,l),l}intersects(e,t){if(!(e instanceof qQ))throw new TypeError("a Range is required");return this.set.some((n=>UQ(n,t)&&e.set.some((e=>UQ(e,t)&&n.every((n=>e.every((e=>n.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new LQ(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(r0(this.set[t],e,this.options))return!0;return!1}}var DQ=qQ;const RQ=new NQ({max:1e3}),IQ=VJ,_Q=a0,PQ=FJ,LQ=eZ,{re:jQ,t:zQ,comparatorTrimReplace:FQ,tildeTrimReplace:BQ,caretTrimReplace:VQ}=jJ.exports,HQ=e=>"<0.0.0-0"===e.value,$Q=e=>""===e.value,UQ=(e,t)=>{let n=!0;const r=e.slice();let i=r.pop();for(;n&&r.length;)n=r.every((e=>i.intersects(e,t))),i=r.pop();return n},WQ=(e,t)=>(PQ("comp",e,t),e=KQ(e,t),PQ("caret",e),e=XQ(e,t),PQ("tildes",e),e=ZQ(e,t),PQ("xrange",e),e=e0(e,t),PQ("stars",e),e),YQ=e=>!e||"x"===e.toLowerCase()||"*"===e,XQ=(e,t)=>e.trim().split(/\s+/).map((e=>GQ(e,t))).join(" "),GQ=(e,t)=>{const n=t.loose?jQ[zQ.TILDELOOSE]:jQ[zQ.TILDE];return e.replace(n,((t,n,r,i,o)=>{let a;return PQ("tilde",e,t,n,r,i,o),YQ(n)?a="":YQ(r)?a=`>=${n}.0.0 <${+n+1}.0.0-0`:YQ(i)?a=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:o?(PQ("replaceTilde pr",o),a=`>=${n}.${r}.${i}-${o} <${n}.${+r+1}.0-0`):a=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,PQ("tilde return",a),a}))},KQ=(e,t)=>e.trim().split(/\s+/).map((e=>JQ(e,t))).join(" "),JQ=(e,t)=>{PQ("caret",e,t);const n=t.loose?jQ[zQ.CARETLOOSE]:jQ[zQ.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,i,o,a)=>{let s;return PQ("caret",e,t,n,i,o,a),YQ(n)?s="":YQ(i)?s=`>=${n}.0.0${r} <${+n+1}.0.0-0`:YQ(o)?s="0"===n?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:a?(PQ("replaceCaret pr",a),s="0"===n?"0"===i?`>=${n}.${i}.${o}-${a} <${n}.${i}.${+o+1}-0`:`>=${n}.${i}.${o}-${a} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${o}-${a} <${+n+1}.0.0-0`):(PQ("no pr"),s="0"===n?"0"===i?`>=${n}.${i}.${o}${r} <${n}.${i}.${+o+1}-0`:`>=${n}.${i}.${o}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${o} <${+n+1}.0.0-0`),PQ("caret return",s),s}))},ZQ=(e,t)=>(PQ("replaceXRanges",e,t),e.split(/\s+/).map((e=>QQ(e,t))).join(" ")),QQ=(e,t)=>{e=e.trim();const n=t.loose?jQ[zQ.XRANGELOOSE]:jQ[zQ.XRANGE];return e.replace(n,((n,r,i,o,a,s)=>{PQ("xRange",e,n,r,i,o,a,s);const l=YQ(i),u=l||YQ(o),c=u||YQ(a),d=c;return"="===r&&d&&(r=""),s=t.includePrerelease?"-0":"",l?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&d?(u&&(o=0),a=0,">"===r?(r=">=",u?(i=+i+1,o=0,a=0):(o=+o+1,a=0)):"<="===r&&(r="<",u?i=+i+1:o=+o+1),"<"===r&&(s="-0"),n=`${r+i}.${o}.${a}${s}`):u?n=`>=${i}.0.0${s} <${+i+1}.0.0-0`:c&&(n=`>=${i}.${o}.0${s} <${i}.${+o+1}.0-0`),PQ("xRange return",n),n}))},e0=(e,t)=>(PQ("replaceStars",e,t),e.trim().replace(jQ[zQ.STAR],"")),t0=(e,t)=>(PQ("replaceGTE0",e,t),e.trim().replace(jQ[t.includePrerelease?zQ.GTE0PRE:zQ.GTE0],"")),n0=e=>(t,n,r,i,o,a,s,l,u,c,d,f,h)=>`${n=YQ(r)?"":YQ(i)?`>=${r}.0.0${e?"-0":""}`:YQ(o)?`>=${r}.${i}.0${e?"-0":""}`:a?">="+n:`>=${n}${e?"-0":""}`} ${l=YQ(u)?"":YQ(c)?`<${+u+1}.0.0-0`:YQ(d)?`<${u}.${+c+1}.0-0`:f?`<=${u}.${c}.${d}-${f}`:e?`<${u}.${c}.${+d+1}-0`:"<="+l}`.trim(),r0=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(PQ(e[n].semver),e[n].semver!==_Q.ANY&&e[n].semver.prerelease.length>0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0},i0=Symbol("SemVer ANY");class o0{static get ANY(){return i0}constructor(e,t){if(t=s0(t),e instanceof o0){if(e.loose===!!t.loose)return e;e=e.value}d0("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===i0?this.value="":this.value=this.operator+this.semver.version,d0("comp",this)}parse(e){const t=this.options.loose?l0[u0.COMPARATORLOOSE]:l0[u0.COMPARATOR],n=e.match(t);if(!n)throw new TypeError("Invalid comparator: "+e);this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new f0(n[2],this.options.loose):this.semver=i0}toString(){return this.value}test(e){if(d0("Comparator.test",e,this.options.loose),this.semver===i0||e===i0)return!0;if("string"==typeof e)try{e=new f0(e,this.options)}catch(e){return!1}return c0(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof o0))throw new TypeError("a Comparator is required");if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||new h0(e.value,t).test(this.value);if(""===e.operator)return""===e.value||new h0(this.value,t).test(e.semver);const n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),r=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),i=this.semver.version===e.semver.version,o=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=c0(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),s=c0(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||r||i&&o||a||s}}var a0=o0;const s0=VJ,{re:l0,t:u0}=jJ.exports,c0=eQ,d0=FJ,f0=eZ,h0=DQ,p0=DQ;var m0=(e,t,n)=>{try{t=new p0(t,n)}catch(e){return!1}return t.test(e)};const y0=DQ;var g0=(e,t)=>new y0(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")));const v0=eZ,b0=DQ;var x0=(e,t,n)=>{let r=null,i=null,o=null;try{o=new b0(t,n)}catch(e){return null}return e.forEach((e=>{o.test(e)&&(r&&-1!==i.compare(e)||(r=e,i=new v0(r,n)))})),r};const M0=eZ,S0=DQ;var w0=(e,t,n)=>{let r=null,i=null,o=null;try{o=new S0(t,n)}catch(e){return null}return e.forEach((e=>{o.test(e)&&(r&&1!==i.compare(e)||(r=e,i=new M0(r,n)))})),r};const E0=eZ,k0=DQ,C0=zZ;var O0=(e,t)=>{e=new k0(e,t);let n=new E0("0.0.0");if(e.test(n))return n;if(n=new E0("0.0.0-0"),e.test(n))return n;n=null;for(let t=0;t<e.set.length;++t){const r=e.set[t];let i=null;r.forEach((e=>{const t=new E0(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":i&&!C0(t,i)||(i=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}})),!i||n&&!C0(n,i)||(n=i)}return n&&e.test(n)?n:null};const T0=DQ;var A0=(e,t)=>{try{return new T0(e,t).range||"*"}catch(e){return null}};const N0=eZ,q0=a0,{ANY:D0}=q0,R0=DQ,I0=m0,_0=zZ,P0=BZ,L0=YZ,j0=UZ;var z0=(e,t,n,r)=>{let i,o,a,s,l;switch(e=new N0(e,r),t=new R0(t,r),n){case">":i=_0,o=L0,a=P0,s=">",l=">=";break;case"<":i=P0,o=j0,a=_0,s="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(I0(e,t,r))return!1;for(let n=0;n<t.set.length;++n){const u=t.set[n];let c=null,d=null;if(u.forEach((e=>{e.semver===D0&&(e=new q0(">=0.0.0")),c=c||e,d=d||e,i(e.semver,c.semver,r)?c=e:a(e.semver,d.semver,r)&&(d=e)})),c.operator===s||c.operator===l)return!1;if((!d.operator||d.operator===s)&&o(e,d.semver))return!1;if(d.operator===l&&a(e,d.semver))return!1}return!0};const F0=z0;var B0=(e,t,n)=>F0(e,t,">",n);const V0=z0;var H0=(e,t,n)=>V0(e,t,"<",n);const $0=DQ;var U0=(e,t,n)=>(e=new $0(e,n),t=new $0(t,n),e.intersects(t));const W0=m0,Y0=pZ;const X0=DQ,G0=a0,{ANY:K0}=G0,J0=m0,Z0=pZ,Q0=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===K0){if(1===t.length&&t[0].semver===K0)return!0;e=n.includePrerelease?[new G0(">=0.0.0-0")]:[new G0(">=0.0.0")]}if(1===t.length&&t[0].semver===K0){if(n.includePrerelease)return!0;t=[new G0(">=0.0.0")]}const r=new Set;let i,o,a,s,l,u,c;for(const t of e)">"===t.operator||">="===t.operator?i=e1(i,t,n):"<"===t.operator||"<="===t.operator?o=t1(o,t,n):r.add(t.semver);if(r.size>1)return null;if(i&&o){if(a=Z0(i.semver,o.semver,n),a>0)return null;if(0===a&&(">="!==i.operator||"<="!==o.operator))return null}for(const e of r){if(i&&!J0(e,String(i),n))return null;if(o&&!J0(e,String(o),n))return null;for(const r of t)if(!J0(e,String(r),n))return!1;return!0}let d=!(!o||n.includePrerelease||!o.semver.prerelease.length)&&o.semver,f=!(!i||n.includePrerelease||!i.semver.prerelease.length)&&i.semver;d&&1===d.prerelease.length&&"<"===o.operator&&0===d.prerelease[0]&&(d=!1);for(const e of t){if(c=c||">"===e.operator||">="===e.operator,u=u||"<"===e.operator||"<="===e.operator,i)if(f&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===f.major&&e.semver.minor===f.minor&&e.semver.patch===f.patch&&(f=!1),">"===e.operator||">="===e.operator){if(s=e1(i,e,n),s===e&&s!==i)return!1}else if(">="===i.operator&&!J0(i.semver,String(e),n))return!1;if(o)if(d&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===d.major&&e.semver.minor===d.minor&&e.semver.patch===d.patch&&(d=!1),"<"===e.operator||"<="===e.operator){if(l=t1(o,e,n),l===e&&l!==o)return!1}else if("<="===o.operator&&!J0(o.semver,String(e),n))return!1;if(!e.operator&&(o||i)&&0!==a)return!1}return!(i&&u&&!o&&0!==a)&&(!(o&&c&&!i&&0!==a)&&(!f&&!d))},e1=(e,t,n)=>{if(!e)return t;const r=Z0(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},t1=(e,t,n)=>{if(!e)return t;const r=Z0(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};var n1=(e,t,n={})=>{if(e===t)return!0;e=new X0(e,n),t=new X0(t,n);let r=!1;e:for(const i of e.set){for(const e of t.set){const t=Q0(i,e,n);if(r=r||null!==t,t)continue e}if(r)return!1}return!0};const r1=jJ.exports;var i1={re:r1.re,src:r1.src,tokens:r1.t,SEMVER_SPEC_VERSION:zJ.SEMVER_SPEC_VERSION,SemVer:eZ,compareIdentifiers:UJ.compareIdentifiers,rcompareIdentifiers:UJ.rcompareIdentifiers,parse:aZ,valid:lZ,clean:cZ,inc:fZ,diff:bZ,major:MZ,minor:wZ,patch:kZ,prerelease:OZ,compare:pZ,rcompare:AZ,compareLoose:qZ,compareBuild:RZ,sort:_Z,rsort:LZ,gt:zZ,lt:BZ,eq:yZ,neq:HZ,gte:UZ,lte:YZ,cmp:eQ,coerce:oQ,Comparator:a0,Range:DQ,satisfies:m0,toComparators:g0,maxSatisfying:x0,minSatisfying:w0,minVersion:O0,validRange:A0,outside:z0,gtr:B0,ltr:H0,intersects:U0,simplifyRange:(e,t,n)=>{const r=[];let i=null,o=null;const a=e.sort(((e,t)=>Y0(e,t,n)));for(const e of a){W0(e,t,n)?(o=e,i||(i=e)):(o&&r.push([i,o]),o=null,i=null)}i&&r.push([i,null]);const s=[];for(const[e,t]of r)e===t?s.push(e):t||e!==a[0]?t?e===a[0]?s.push("<="+t):s.push(`${e} - ${t}`):s.push(">="+e):s.push("*");const l=s.join(" || "),u="string"==typeof t.raw?t.raw:String(t);return l.length<u.length?l:t},subset:n1},o1="0.23.1";const a1=e=>!e||i1.lt(i1.coerce(e),i1.coerce(o1)),s1=({layoutService:e,flags:t})=>{const n=t.isEnabled("BARS_IN_SECONDARY_AXIS")&&!a1(e.getLayoutValue("version")),r=e.getHyperCubeValue("qMeasureInfo").map(((e,t)=>{const n={[Ho.BAR]:0,[Ho.LINE]:0,[Ho.MARKER]:0};return({series:r=Uo},i)=>{const o=LJ(r,t),a=Lh(r);return{id:i,type:a,typeIndex:n[a]++,ref:"qMeasureInfo/"+i,refIndex:i,isPrimary:o,scale:o?Vo.SCALE.MINOR.PRIMARY:Vo.SCALE.MINOR.SECONDARY,collection:o?Vo.COLLECTION.PRIMARY:Vo.COLLECTION.SECONDARY,options:PJ({series:r,layoutService:e})}}})(e,n)),i=(e,t)=>e.filter((e=>Lh(e)===t)).length,o=r.filter((e=>e.isPrimary)),a=r.filter((e=>!e.isPrimary)),s=[!!o.length&&o[0],!!a.length&&a[0]].filter((e=>!!e)),l=i(r,Ho.BAR),u=i(o,Ho.BAR),c=i(a,Ho.BAR),d=e=>r.filter((t=>Lh(t)===e)),f=d(Ho.LINE).map((e=>sf(Vo.COMPONENT.POINT,e))),h=d(Ho.MARKER).map((e=>({key:sf(Vo.COMPONENT.MARKER,e),type:e.options.marker}))),p=h.map((e=>e.key)),m=[];u>0&&m.push(`${Vo.COMPONENT.BAR}-${$o.PRIMARY}`),c>0&&m.push(`${Vo.COMPONENT.BAR}-${$o.SECONDARY}`);const y=[...m,...f,...p],{MINI_CHART:g}=Vo.COMPONENT,v=d(Ho.LINE).map((e=>sf(g.LINE,e))),b=d(Ho.MARKER).map((e=>sf(g.MARKER,e))),x=e.meta.isContinuous?[`${g.BAR}-${$o.PRIMARY}`,`${g.BAR}-${$o.SECONDARY}`,...v,...b]:[];return{meta:{allSeries:r,primarySeries:o,secondarySeries:a,barSeriesCount:l,primaryBarSeriesCount:u,secondaryBarSeriesCount:c,measureAxes:s,pointComponentKeys:f,markerComponentKeys:p,barComponentKeys:m,seriesComponentKeys:y,miniComponentKeys:x,markers:h},query:{all:()=>r,seriesByAxis:e=>e?o:a,series:d,isPrimary:LJ}}};function l1(e){return function({layout:t}){var n,r,i;const o=hl(t,"qHyperCube.qMeasureInfo",[]),a=o.some((({series:e=Uo})=>Lh(e)===Ho.LINE)),s=k.continuous(t,(()=>a&&x.isTime(!0,t))),l=e.isEnabled("BARS_IN_SECONDARY_AXIS")&&!a1(hl(t,"version","")),u=o.filter((({series:e=Uo})=>Lh(e)===Ho.BAR)),c=u.length,d=u.filter((({series:e=Uo})=>e.axis===$o.PRIMARY)).length,f=u.filter((({series:e=Uo})=>e.axis===$o.SECONDARY)).length,h=l?d>1||f>1:c>1,p=("grouped"!==hl(t,"barGrouping.grouping")||s)&&h,m=!p&&c>1,y=l&&p&&(d>0&&f>1||d>1&&f>0),g=!(null==t||null===(n=t.qHyperCube)||void 0===n||null===(r=n.qDimensionInfo)||void 0===r||null===(i=r[0])||void 0===i||!i.qLocked);return{canBeContinuous:x.canBeContinuous(t),isDiscrete:!s,isContinuous:s,isTime:x.isTime(s,t),isSnapshot:k.snapshot(t),isBarSeriesStacked:p,isBarSeriesGrouped:m,isBarSeriesStackedInBothAxis:y,isGrouped:m||y,isGroupedByMeasure:m||y,isDimensionLocked:g,groupSize:y?2:c,hasLineSeries:a}}}function u1({layoutService:e}){const{dimensionCount:t,measureCount:n}=e.meta;return{qTop:0,qLeft:0,qWidth:t+n,qHeight:Math.min(2e3,1e4/(n+1))}}function c1({genericObjectModel:e,layoutService:t}){return function(){return function(e,t,n){return e.getHyperCubeReducedData(n.path,[n.rect],n.zoomLevel,n.filter).catch(O).then((e=>{var n;const r=t.getHyperCubeValue("qMode"),i=t.getHyperCubeValue("qDimensionInfo"),o="K"===r&&i.length>1&&(null===(n=e[0])||void 0===n?void 0:n.qIsReduced),a=e.slice(),s=t.getHyperCubeValue("qMeasureInfo");return{reducedCube:{qDataPages:a,qDimensionInfo:i.slice(),qEffectiveInterColumnSortOrder:[1,0],qMeasureInfo:o?[s[0],s[0]]:s.slice(),qStackedDataPages:[],qMode:"S",qHasOtherValues:t.getHyperCubeValue("qHasOtherValues"),qSize:t.getHyperCubeValue("qSize")}}}))}(e,t,{path:"/qHyperCubeDef",rect:u1({layoutService:t}),zoomLevel:-1,filter:"D1"})}}function d1({genericObjectModel:e,layoutService:t}){const{isSnapshot:n,isContinuous:r}=t.meta;return n?function({layoutService:e}){return function(){return Promise.resolve({reducedCube:e.getLayoutValue("reducedHyperCube")||e.getHyperCube()})}}({layoutService:t}):r?function({layoutService:e}){return function(){const t=e.getHyperCube();return Promise.resolve({reducedCube:{...t,qDataPages:[...t.qDataPages]}})}}({layoutService:t}):c1({genericObjectModel:e,layoutService:t})}const f1=e=>"number"==typeof e&&!Number.isNaN(e);function h1({isPrimary:e,layoutService:t,seriesModel:n}){return function(){const r=t.getHyperCubeValue("qMeasureInfo"),i=n.query.seriesByAxis(e).map((e=>r[e.refIndex])),o=i.filter((e=>Lh(e.series)===Ho.BAR)),a=i.filter((e=>Lh(e.series)===Ho.LINE)),s=i.filter((e=>Lh(e.series)===Ho.MARKER));return{min:Math.min(...i.filter((e=>f1(e.qMin))).map((e=>e.qMin))),max:Math.max(...i.filter((e=>f1(e.qMax))).map((e=>e.qMax))),bar:{min:Math.min(...o.filter((e=>f1(e.qMin))).map((e=>e.qMin))),max:Math.max(...o.filter((e=>f1(e.qMax))).map((e=>e.qMax)))},line:{min:Math.min(...a.filter((e=>f1(e.qMin))).map((e=>e.qMin))),max:Math.max(...a.filter((e=>f1(e.qMax))).map((e=>e.qMax)))},marker:{min:Math.min(...s.filter((e=>f1(e.qMin))).map((e=>e.qMin))),max:Math.max(...s.filter((e=>f1(e.qMax))).map((e=>e.qMax)))}}}}function p1({isPrimary:e,layoutService:t,seriesModel:n}){const r=h1({isPrimary:e,layoutService:t,seriesModel:n}),i=function({seriesModel:e,isPrimary:t}){return function({dataPage:n}){const r=e.query.series(Ho.BAR).filter((e=>e.isPrimary===t)).map((e=>e.refIndex)),{qMatrix:i}=n,o={min:NaN,max:NaN};return i.forEach((e=>{let t=0,n=0;e.slice(1).filter(((e,t)=>r.some((e=>e===t))&&"NaN"!==e.qNum)).forEach((e=>{e.qNum>=0?n+=e.qNum:t+=e.qNum})),o.min=Number.isNaN(o.min)?t:Math.min(t,o.min),o.max=Number.isNaN(o.max)?n:Math.max(n,o.max)})),o}}({seriesModel:n,isPrimary:e});return function({dataPage:e}){const t=r({dataPage:e});return t.bar=i({dataPage:e}),t.min=Math.min(t.bar.min,t.line.min,t.marker.min),t.max=Math.max(t.bar.max,t.line.max,t.marker.max),t}}function m1({isPrimary:e,continuousModel:t,layoutService:n,reducedModel:r,seriesModel:i}){const o={min:NaN,max:NaN,implicit:{min:NaN,max:NaN,bar:{min:NaN,max:NaN},line:{min:NaN,max:NaN},marker:{min:NaN,max:NaN}},explicit:{min:NaN,max:NaN},meta:{hasExplicit:!1,hasExplicitMin:!1,hasExplicitMax:!1,includesZero:!1}},a=function({isPrimary:e,layoutService:t,seriesModel:n}){const{isBarSeriesStacked:r}=t.meta;return r?p1({isPrimary:e,layoutService:t,seriesModel:n}):h1({isPrimary:e,layoutService:t,seriesModel:n})}({isPrimary:e,layoutService:n,seriesModel:i});return{query:{getExtrema:()=>o},command:{initialize:()=>{const{min:s,max:l}=function({isPrimary:e,layoutService:t}){const n={min:NaN,max:NaN},{getLayoutValue:r}=t,i=r("measureAxes."+(e?0:1),{});if(i.autoMinMax)return n;const{minMax:o,min:a,max:s}=i;return"min"!==o&&"minMax"!==o||(n.min=a),"max"!==o&&"minMax"!==o||(n.max=s),Number.isNaN(n.min)||Number.isNaN(n.max)||(n.min=Math.min(a,s),n.max=Math.max(a,s)),n}({isPrimary:e,layoutService:n});return o.explicit.min=s,o.explicit.max=l,o.meta.hasExplicitMin=!Number.isNaN(s),o.meta.hasExplicitMax=!Number.isNaN(l),o.meta.hasExplicit=o.meta.hasExplicitMin||o.meta.hasExplicitMax,function({continuousModel:e,layoutService:t,reducedModel:n}){const{isDiscrete:r}=t.meta;if(r){const e=n.query.getCube();return Promise.resolve({dataPage:e.qDataPages[0]})}return e.fetchMinMaxData().then((e=>({dataPage:e[0]})))}({continuousModel:t,layoutService:n,reducedModel:r}).then((({dataPage:t})=>{const{min:n,max:r,bar:s,line:l,marker:u}=a({dataPage:t}),c=i.query.seriesByAxis(e).some((e=>Lh(e)===Ho.BAR)),d=c?Math.min(n,0):n,f=c?Math.max(r,0):r,h=c?Math.min(s.min,0):s.min,p=c?Math.max(s.max,0):s.max,m=c?Math.min(l.min,0):l.min,y=c?Math.max(l.max,0):l.max,g=c?Math.min(u.min,0):u.min,v=c?Math.max(u.max,0):u.max;o.implicit.min=Number.isFinite(d)?d:0,o.implicit.max=Number.isFinite(f)?f:0,o.implicit.bar.min=Number.isFinite(h)?h:0,o.implicit.bar.max=Number.isFinite(p)?p:0,o.implicit.line.min=Number.isFinite(m)?m:0,o.implicit.line.max=Number.isFinite(y)?y:0,o.implicit.marker.min=Number.isFinite(g)?g:0,o.implicit.marker.max=Number.isFinite(v)?v:0,o.min=Number.isNaN(o.explicit.min)?o.implicit.min:o.explicit.min,o.max=Number.isNaN(o.explicit.max)?o.implicit.max:o.explicit.max,o.meta.hasExplicitMin&&!o.meta.hasExplicitMax&&(o.max=Math.max(o.min,o.max)),o.meta.hasExplicitMax&&!o.meta.hasExplicitMin&&(o.min=Math.min(o.min,o.max)),o.meta.includesZero=!!((0-o.min)*(0-o.max)<=0)}))}}}}function y1({extrema:e,ticks:t}){const n=e.meta.hasExplicit?2:3;return t.filter((t=>(t=>!e.meta.hasExplicitMin||t>=e.explicit.min)(t)&&(t=>!e.meta.hasExplicitMax||t<=e.explicit.max)(t))).length>=n}function g1({min:e,max:t,count:n,threshold:r,disable:i}){const o=function(e,t,n){const r=In().domain([e,t]);return r.nice(n),r}(e,t,n),a=function({min:e,max:t,threshold:n,scale:r,disable:i}){const o={start:!0,stop:!0};if(i)return o;const[a,s]=r.domain();return 0!==e&&0!==a&&(o.start=r(e)>n),0!==t&&0!==s&&(o.stop=r(t)<1-n),o}({min:e,max:t,threshold:r,scale:o,disable:i});if(!a.start||!a.stop){const[e,t]=o.domain(),r=o.ticks(n),i=r.length>=4?r[1]-r[0]:.1*e,s=r.length>=4?r[r.length-1]-r[r.length-2]:.1*t;o.domain([a.start?e:e-i,a.stop?t:t+s]),o.nice(n)}return o}const v1=50,b1=100,x1=200,M1=125;function S1({config:{measureAxesRef:e},layoutService:t,size:n}){const r=(e=>{switch(e){case.5:return v1;case 1:return b1;case 2:return x1;default:return e*M1}})(t.getLayoutValue(e+".spacing",1));return Math.max(1,Math.round(n/r))}function w1({config:e,chart:t,layoutService:n,dockService:r,measureText:i,size:o,min:a,max:s}){const l=S1({config:e,layoutService:n,size:o}),u=g1({min:a,max:s,count:l,threshold:.05,disable:!0}),c=u.domain(),d={roundedMin:c[0],roundedMax:c[1],ticks:u.ticks(l)},f="horizontal"===r.meta.major.orientation?"height":"width",h=e=>i(e)[f],p=t.formatter(e.formatter),m=()=>{const e=d.ticks.map(p);return!e.some(((t,n)=>e.indexOf(t)!==n))&&(e=>{const t=o/d.ticks.length;return Math.max(...e.map(h))<=t})(e)};for(let e=l-1;e>0&&!m();e--)u.domain([a,s]),u.nice(e),[d.roundedMin,d.roundedMax]=u.domain(),d.ticks=u.ticks(e);return d}function E1({tick:e,index:t,ticks:n}){return 0===t||t===n.length-1||0===e}function k1({index:e,ticks:t}){return 0===e||e===t.length-1||e===Math.floor((t.length-1)/2)}function C1({config:e,chart:t,extrema:n,min:r,max:i}){const o={roundedMin:0,roundedMax:0,ticks:[]},a=g1({min:r,max:i,count:10,threshold:.15,disable:!0});[o.roundedMin,o.roundedMax]=a.domain();const s=a.ticks(10),l=function({ticks:e}){const t=Math.round(.3*e.length),n=t,r=e.length-t;return e.slice(n,r).some((e=>0===e))}({ticks:s}),u=l?E1:k1;o.ticks=s.filter(((e,t,n)=>u({tick:e,index:t,ticks:n})));o.ticks.length%2==0&&!l&&!n.meta.hasExplicit&&s.length>1&&(o.ticks=[s[0],(s[0]+s[s.length-1])/2,s[s.length-1]]);const c=t.formatter(e.formatter),d=o.ticks.map(c);return d.some(((e,t)=>d.indexOf(e)!==t))&&(o.ticks=[o.ticks[0],o.ticks[o.ticks.length-1]]),o}function O1({ticks:e,extrema:t}){let n=[...e];return t.meta.hasExplicit&&e.length?(t.meta.hasExplicitMin&&!e.some((e=>e===t.explicit.min))&&(n.unshift(t.explicit.min),n=n.filter((e=>e>=t.explicit.min))),t.meta.hasExplicitMax&&!e.some((e=>e===t.explicit.max))&&(n.push(t.explicit.max),n=n.filter((e=>e<=t.explicit.max))),n):n}function T1({config:e,chart:t,layoutService:n,dockService:r,extrema:i,measureText:o,size:a,min:s,max:l}){const{ticks:u,roundedMin:c,roundedMax:d}=function({config:e,chart:t,layoutService:n,dockService:r,extrema:i,measureText:o,size:a,min:s,max:l}){if("SPARK"===r.meta.chart.mode)return function({min:e,max:t}){return{roundedMin:e,roundedMax:t,ticks:[]}}({min:s,max:l});const u=w1({config:e,chart:t,layoutService:n,dockService:r,measureText:o,size:a,min:s,max:l});return y1({extrema:i,ticks:u.ticks})?u:C1({config:e,chart:t,extrema:i,min:s,max:l})}({config:e,chart:t,layoutService:n,dockService:r,extrema:i,measureText:o,size:a,min:s,max:l}),f=function({ticks:e,count: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}({ticks:u,count:1});return{min:c,max:d,values:[...O1({ticks:u,extrema:i}).map((e=>({value:e,isMinor:!1}))),...f.map((e=>({value:e,isMinor:!0})))].sort(((e,t)=>e.value-t.value))}}function A1({config:e,chart:t,layoutService:n,dockService:r,measureText:i,extrema:o,size:a}){const{min:s,max:l}=function({extrema:e}){const{min:t,max:n}=e;return t!==n?{min:t,max:n}:0===t||1===t?{min:t-1,max:n+1}:{min:t-.2*t*Math.sign(t),max:n+.2*n*Math.sign(n)}}({extrema:o});return T1({config:e,chart:t,layoutService:n,dockService:r,extrema:o,measureText:i,size:a,min:s,max:l})}function N1({config:e,chart:t,layoutService:n,extremumModel:r,dockService:i,seriesModel:o,themeService:a}){const s={locked:!1,resolved:void 0},{getExtrema:l}=r.query,u=function({chart:e,config:t,dockService:n,extremumModel:r,layoutService:i,seriesModel:o,themeService:a}){const{measureText:s}=Eq.renderer("svg")();return()=>{const l=a.getStyles(),u=function({dockService:e,seriesModel:t,chart:n}){var r;const i=n.component(t.meta.seriesComponentKeys[0]),o=null!==(r=null==i?void 0:i.rect)&&void 0!==r?r:e.meta.chart.size;return"horizontal"===e.meta.major.orientation?o.height:o.width}({chart:e,dockService:n,seriesModel:o}),c=r.query.getExtrema();return A1({config:t,chart:e,layoutService:i,dockService:n,measureText:e=>s({text:e,fontFamily:l.axis.label.name.fontFamily,fontSize:l.axis.label.name.fontSize}),extrema:c,size:u})}}({config:e,chart:t,layoutService:n,extremumModel:r,dockService:i,seriesModel:o,themeService:a}),c=()=>(s.locked&&s.resolved||(s.resolved=u()),s.resolved);return{query:{getValues:()=>c().values,getMin:()=>l().meta.hasExplicitMin?l().explicit.min:c().min,getMax:()=>l().meta.hasExplicitMax?l().explicit.max:c().max},command:{lock:()=>{s.locked=!0},unlock:()=>{s.locked=!1}}}}function q1({genericObjectModel:e,layoutService:t}){const n={properties:void 0};return{query:{getProperties:()=>n.properties},command:{initialize:()=>function({layout:e,model:t}){return k.snapshot(e)?Promise.resolve(null):t.getEffectiveProperties().then((e=>({properties:e})))}({layout:t.getLayout(),model:e}).then((e=>{const{properties:t}=null!=e?e:{};n.properties=t}))}}}function D1({layoutService:e,seriesModel:t,colorService:n}){const{type:r,mode:i,fieldType:o}=n.getSettings();if("categorical"!==r)return;const a=e.getLayoutValue("dataPoint.show",!1)?"line-point":"line";let s;s="field"===i?"measure"===o?()=>({type:Ho.BAR}):()=>t.query.all()[0]:e=>t.query.all()[e.value];return{item:{shape:{type:({datum:e})=>{const{type:t,options:n}=s(e);switch(t){case"line":return a;case"marker":return n.marker;default:return"square"}},stroke:{},strokeWidth:({datum:e})=>{const{type:t,options:n}=s(e);return t===Ho.LINE?2:t!==Ho.MARKER||n.fill?0:1},size:10,fill:{fn:({datum:e,scale:t})=>{const{type:n,options:r}=s(e);return n!==Ho.MARKER||r.fill?t(e.value):"none"}}}}}}function R1({layout:e,defaultAuto:t}){const n=t(e),r=e.qHyperCube.qMeasureInfo.length>1;return{...n,useBaseColors:r?"measure":n.useBaseColors}}function I1({actions:e,appLayoutModel:t,appModel:n,chart:r,environment:i,flags:o,genericObjectModel:a,layoutService:s,picasso:l,seriesModel:u,viewState:c}){let d;const{theme:f,translator:h}=i,p={wrappedScales:void 0,legendComponents:void 0,legendInteractions:void 0};return d=nl({picasso:l,model:a,app:n,translator:h,layoutService:s,createConfig:()=>{let e;o.isEnabled("BASIC_COLOR_OPTIONS_PER_MEASURE")&&(e=s.getHyperCubeValue("qMeasureInfo").map((e=>e.color)));return{theme:f,colorProps:{measureOverrides:e},legendProps:s.getLayoutValue("legend"),hc:s.getHyperCube(),key:Vo.SCALE.COLOR}},config:{auto:R1,localeInfo:t.qLocaleInfo},custom:{wrappedScales:()=>p.wrappedScales,legendComponents:()=>p.legendComponents,legendInteractions:()=>p.legendInteractions,updateLegend:()=>{const{components:t,interactions:n,scales:o}=function({viewState:e,chart:t,layoutService:n,seriesModel:r,environment:i,colorService:o,actions:a}){const{options:s}=i,l={eventName:"legend-c",key:Vo.COMPONENT.LEGEND,viewState:e,chart:t,styleReference:"object.comboChart",rtl:"rtl"===s.direction,settings:D1({layoutService:n,seriesModel:r,colorService:o})},{components:u,interactions:c}=o.getLegend(l,{actions:a,navigationDisabled:!a.interact.enabled()}),d=o.getScales();return{components:u.filter(Boolean).map((e=>{const{layout:t}=e,{dock:n}=t,r=d[Vo.SCALE.COLOR+"Range"];return!r||"right"!==n&&"left"!==n||(r.invert=!0),"legend-cat"===e.type&&(e.settings.item.shape.fill.scale=e.scale,e.settings.item.shape.stroke.scale=e.scale),e})),interactions:c,scales:d}}({viewState:c,chart:r,environment:i,colorService:d,seriesModel:u,layoutService:s,actions:e});p.wrappedScales=o,p.legendComponents=t,p.legendInteractions=n}}}),d}const _1="REJECTED",P1=()=>{},L1=1e4,j1=2,z1=20,F1=200,B1=10;var V1={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),u=Math.min(o+r-e.qArea.qLeft,e.qArea.qWidth),c={qArea:{qHeight:s-a,qWidth:u-l,qTop:i,qLeft:o},qMatrix:[]};for(let t=a;t<s;t++)c.qMatrix.push(e.qMatrix[t].slice(l,u));return c},cacheWarden:function({bounds:e={width:0,height:0}}){return{release(t,n){const r=n.qTop-B1<=t.qTop,i=n.qLeft+n.qWidth+B1>=t.qLeft+t.qWidth,o=n.qTop+n.qHeight+B1>=t.qTop+t.qHeight,a=n.qLeft-B1<=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 H1={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-B1<=t.qTop,i=n.qTop+n.qHeight+B1>=t.qTop+t.qHeight;return r&&t.qTop>0||i&&t.qTop+t.qHeight<e.height}}},request:function({layoutService:e,definitionPath:t}){const n=e.getLayoutValue("dimensionAxis.axisDisplayMode","auto");return e=>{const r={method:"getHyperCubeStackData",args:[t,[e]]};return"auto"===n&&r.args.push(600),r}}};var $1={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 U1="pages";const W1="discretePan";function Y1({chart:e,actions:t,componentKey:n,dockService:r,rtl:i,scroller:o}){return{type:"Pan",key:"discrete:pan",options:{event:W1,pointers:1,threshold:10,enable(r,i){return this.started===W1||!i||!!t.scroll.enabled()&&e.componentsFromPoint({x:i.center.x,y:i.center.y}).some((e=>e.key===n))}},events:{discretePanstart(e){e.preventDefault(),this.started=W1;const t="horizontal"===r.meta.major.orientation?e.deltaX:e.deltaY;this.previousTotalDelta=t<0?-10:10},discretePanmove(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)},discretePanend(e){e.preventDefault(),this.started=!1},discretePancancel(e){e.preventDefault(),this.started=!1}}}}function X1({chart:e,componentKey:t,actions:n,scroller:r}){return function(i){if(!n.scroll.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 G1({layoutService:e,areaBuffer:t}){const n=void 0===t?function({layoutService:e}){const t=Math.floor(L1/(e.meta.dimensionCount+e.meta.measureCount));return function({width:e,height:n}){const r=Math.min(t,Math.max(F1,n));return{width:e,height:Math.max(z1,Math.min(n*j1,r))}}}({layoutService:e}):function({layoutService:e}){const t=Math.floor(L1/(e.meta.dimensionCount+e.meta.measureCount));return function({width:e,height:n}){return{width:e,height:Math.min(t,n)}}}({layoutService:e}),r={width:e.meta.size.x,height:e.meta.size.y};return function(e){const{width:t,height:i}=n({width:e.qWidth,height:e.qHeight}),o=i?Math.ceil((i-e.qHeight)/2):0,a=t?Math.ceil((t-e.qWidth)/2):0;return{qHeight:i?Math.min(i,r.height):e.qHeight,qWidth:t?Math.min(t,r.width):e.qWidth,qTop:i?Math.max(0,Math.min(e.qTop-o,r.height-i)):e.qTop,qLeft:t?Math.max(0,Math.min(e.qLeft-a,r.width-t)):e.qLeft}}}function K1(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(_1),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(_1),n=e})(a):r(a)}));return i.isProcessing=()=>!!t,i.hasQueued=()=>!!n,i.cancel=()=>{i.isProcessing()&&t.cancel(),i.hasQueued()&&(n.reject(_1),n=null)},i}const J1={command:{update:()=>{}}};function Z1({dataStore:e,composition:t,enigmaModel:n,layoutService:r,trendLineModel:i=J1,definitionPath:o,areaBuffer:a,processDataPage:s}){const{slicer:l,cacheWarden:u,request:c}=t,d=function({dataStore:e,slice:t,warden:n,expand:r,request:i,process:o,connectionless:a,processDataPage:s}){return(l,{onProcessing:u}={})=>{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()&&u&&u();const c=r(l);return o(i(c)).then((n=>(s(n),e.add(n),t(n,l))))}}({dataStore:e,slice:l,warden:u({bounds:{width:r.meta.size.x,height:r.meta.size.y}}),expand:G1({layoutService:r,areaBuffer:a}),request:c({layoutService:r,definitionPath:o}),process:K1(n),connectionless:r.meta.isSnapshot,processDataPage:s}),f=gl(((e,{onProcessing:t,onData:n})=>{d(e,{onProcessing:t}).then((e=>n(e))).catch((e=>{if(e!==_1)throw e}))}),50);return function(e,{onProcessing:t=P1,onDataPage:n=P1}={}){f(e,{onProcessing:t,onData:e=>{r.setDataPages(e?[e]:[]),i.command.update(),n(e)}})}}var Q1={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 e2={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 t2(e){const{groupSize:t,measureCount:n}=e.meta;return null!=t?t:n}function n2(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 r2(e){return n2(e.qMatrix,(e=>e[0].qElemNumber))-1}var i2={inTotal:function({layoutService:e}){const t=t2(e);return e.meta.size.y*t*(1+1/t)-1},area:function({layoutService:e,itemOffset:t,inView:n,areaBuffer:r}){const i=t2(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=t2(e),o=e.getDataPages()[0],a=r/n.inView,{pixel:s}=t,l=r2(o),u=o.qArea.qHeight*i+l,c=(s+(o.qArea.qTop*i+o.qArea.qTop)*a)/r;return[c,n.inView>=n.inTotal?c+1:c+u/n.inView]}};const o2=(e,t)=>t/(e.meta.size.y/e.meta.size.dimensions[0]+1);function a2(e){return{itemOffset(t,n){if(0!==t.qArea.qTop)return o2(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:o2(e,n)},area(t,n,r){if(0!==t.qArea.qTop)return o2(e,n);return n2(t.qMatrix.slice(0,r.qTop+1),(e=>e[0].qElemNumber))-1}}}var s2={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=a2(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:u}=n,c=a2(t).area(e(),l,a.qArea),d=r2(a),f=a.qArea.qHeight+d,h=u===o?(r.inView-f)*s/i:(u+(a.qArea.qTop+c)*s)/i;return[h,r.inView>=r.inTotal?h+1:h+f/r.inView]}};function l2({rect:e,dockService:t,itemWidths:n,dimensionAxis:r,inTotal:i,isMajorVisible:o,isMajorLabelless:a,maxDataRows:s}){const{DEFAULT:l,SQUEEZE:u,LABELLESS:c}=n[t.meta.chart.mode],{axisDisplayMode:d="auto",maxVisibleItems:f=10}=r,h="horizontal"===t.meta.major.orientation?e.width:e.height,p=h/i>=u;switch(d){case"max":return Math.min(i,s);case"custom":return Math.min(f,s);case"auto":default:return!o||a?h/c:p?i:h/l}}function u2({chart:e,getRect:t,getDataPages:n,layoutService:r,dockService:i,getItemWidths:o,axisKey:a,areaBuffer:s,rtl:l}){const{inTotal:u,area:c,scaleRange:d}=function({layoutService:e}){const{isDimensionless:t,isGrouped:n,isGroupedByMeasure:r}=e.meta;return t?Q1:n?r?i2:s2:e2}({layoutService:r}),f=()=>"horizontal"===i.meta.major.orientation?t().width:t().height,h=e=>e?f()/e:0,p=(e,t)=>-(e-t)*h(t);return{getItems(){const n=r.getLayoutValue("dimensionAxis"),s=u({layoutService:r}),l=e.component(a),c=!a||!l||l.isVisible();return{inTotal:s,inView:l2({rect:t(),dockService:i,itemWidths:o(),dimensionAxis:n,inTotal:s,isMajorVisible:c,isMajorLabelless:"none"===n.show||"title"===n.show,maxDataRows:Math.floor(L1/(r.meta.dimensionCount+r.meta.measureCount))})}},getItemSize({items:e}){const{inView:t}=e;return h(t)},getOffsets({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t,i=Math.min(0,Math.max(e,p(n,r)));return{pixel:i,item:r?Math.abs(r*i/f()):0}},getUpperBound({items:e}){const{inTotal:t,inView:n}=e;return p(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,o+e/i]}({viewSize:f(),inTotal:n,inView:r,pixelOffset:e})},getArea:({itemOffset:e,items:t})=>c({getDataPages:n,layoutService:r,itemOffset:e,inView:t.inView,areaBuffer:s}),getScaleRange({offsets:e,items:t}){const o=d({getDataPages:n,layoutService:r,offsets:e,items:t,viewSize:f(),upperBound:p(t.inTotal,t.inView)});return"horizontal"===i.meta.major.orientation&&l?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>=p(n,r)}},convert:{itemToPixelOffset({itemOffset:e,items:t}){const{inView:n}=t,r=e*h(n);return Number.isFinite(r)?-r:0},relativeToPixelOffset({relativeOffset:e,items:t}){const{inTotal:n,inView:r}=t;return-e*(h(r)*n)}}}}function c2({chart:e,componentKey:t,state:n,dataStore:r,pageData:i,layoutService:o,dockService:a,itemWidths:s,getRect:l,axisKey:u,areaBuffer:c,viewState:d,rtl:f}){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 h=u2({chart:e,getRect:()=>n.get("rect"),getDataPages:r.getCurrent,layoutService:o,dockService:a,getItemWidths:()=>n.get("itemWidths"),axisKey:u,areaBuffer:c,rtl:f}),p=()=>{const e=h.getItems();return n.set("items",e),e},m=({pixelOffset:e,items:t})=>{const r=h.getOffsets({pixelOffset:e,items:t});return n.set("offsets",r),r},y=e=>{const t=Date.now(),r=p(),a=m({pixelOffset:e,items:r}),s=h.getArea({itemOffset:a.item,items:r});if((e=>{const[{qArea:t}]=o.getDataPages();return!!t&&Object.keys(e).every((n=>e[n]===t[n]))})(s))return void((h.validate.offset({pixelOffset:e,items:r})||d.get("scrollOffset")!==a.item)&&(n.set("finished",t),n.set("scaleRange",h.getScaleRange({offsets:a,items:r})),d.preventSet("viewRange",h.getViewRange({pixelOffset:a.pixel,items:r})),d.set("scrollOffset",a.item)));d.preventSet("viewRange",h.getViewRange({pixelOffset:a.pixel,items:r}));const l=()=>{n.get("finished")>t||(n.set("finished",t),n.set("scaleRange",h.getScaleRange({offsets:a,items:r})),d.set("scrollOffset",a.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=p();n.set("itemSize",h.getItemSize({items:a}));const u=void 0===d.get("scrollOffset")?(({items:e})=>1===o.getLayoutValue("scrollStartPos")?h.getUpperBound({items:e}):0)({items:a}):h.convert.itemToPixelOffset({itemOffset:d.get("scrollOffset"),items:a}),c=m({pixelOffset:u,items:a});d.preventSet("viewRange",h.getViewRange({pixelOffset:c.pixel,items:a}));const f=h.getArea({itemOffset:c.item,items:a});return new Promise((e=>{i(f,{onDataPage:()=>{n.set("scaleRange",h.getScaleRange({offsets:c,items:a})),d.preventSet("scrollOffset",c.item),e()}})}))},scroll(e){const t=n.get("offsets").pixel+e;y(t)},scrollToRelative(e){const t=n.get("items"),r=h.convert.relativeToPixelOffset({relativeOffset:e,items:t});y(r)}}}function d2({chart:e,actions:t,componentKey:n,enigmaModel:r,layoutService:i,dockService:o,trendLineModel:a,itemWidths:s,viewState:l,rtl:u,options:{definitionPath:c="/qHyperCubeDef",getRect:d,axisKey:f,areaBuffer:h,processDataPage:p=(()=>{})}={}}){const m=ml(),y=function({qMode:e}){switch(e){case"S":default:return V1;case"K":return H1;case"T":return $1}}({qMode:i.getHyperCubeValue("qMode")}),g=function({state:e,contains:t}){return e.set(U1,[]),{add:t=>{const n=e.get(U1);n.length=0,n.push(t)},getCurrent:()=>e.get(U1)[0],getAll:()=>e.get(U1),contains:n=>t(e.get(U1)[0],n)}}({state:m,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:g,composition:y});const v=function({buffer:e}){return void 0===e?void 0:2*Math.round(e/2)}({buffer:h}),b=Z1({dataStore:g,composition:y,enigmaModel:r,layoutService:i,trendLineModel:a,definitionPath:c,areaBuffer:v,processDataPage:p}),x=c2({chart:e,componentKey:n,state:m,dataStore:g,pageData:b,layoutService:i,dockService:o,itemWidths:s,getRect:d,axisKey:f,areaBuffer:v,viewState:l,rtl:u}),M=function({layoutService:e,dataStore:t}){return function(n){const r=hl(n,""+e.refs.dataPages);r.length=0,r.push(t.getCurrent())}}({layoutService:i,dataStore:g});return{interactions:function({chart:e,actions:t,componentKey:n,dockService:r,rtl:i,scroller:o}){return{gestures:[Y1({chart:e,actions:t,componentKey:n,dockService:r,rtl:i,scroller:o})],native:{type:"native",events:{wheel:X1({chart:e,actions:t,componentKey:n,scroller:o})}}}}({chart:e,actions:t,componentKey:n,dockService:o,rtl:u,scroller:x}),query:{getCanScroll:()=>x.enabled(),getItemSize:()=>x.itemSize(),getScaleRange:()=>x.scaleRange(),getCurrentDataPage:()=>g.getCurrent()},command:{initialize:()=>x.initialize(),scrollTo:e=>x.scrollToRelative(e),setSnapshotData:e=>M(e)}}}var f2={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}};function h2({appLayoutModel:e,appModel:t,chart:n,environment:r,flags:i,genericObjectModel:o,layout:a,picasso:s}){const{translator:l,embed:u}=r,c=function({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:ia,miniChartToken:{},embed:s}}({layout:a,app:t,model:o,picasso:s,chart:n,translator:l,localeInfo:e.qLocaleInfo,embed:u});return{query:{useCustomTooltip:()=>c.useCustomTooltip,useTooltipChart:()=>{var e,t,n,r;return i.isEnabled("CUSTOM_TOOLTIP_CHART")&&(null===(e=a.tooltip)||void 0===e||null===(t=e.chart)||void 0===t||null===(n=t.object)||void 0===n?void 0:n.refId)&&c.embed&&"function"==typeof(null===(r=c.model)||void 0===r?void 0:r.getEffectiveProperties)},hasChartLimitation:()=>{var e;return null==t||null===(e=t.isInModalSelection)||void 0===e?void 0:e.call(t)},getCustomTooltipModel:()=>c}}}function p2({layoutService:e,key:t}){const{style:n}=e.getLayoutValue("components",[]).filter((e=>e.key===t))[0]||{};return({property:r,defaultValue:i,index:o})=>{const a=n&&Object.hasOwnProperty.call(n,r)?n[r]:i;if(void 0===o)return a;const{style:s}=e.getHyperCubeValue((e=>`qMeasureInfo.${e}.styling`)(o),[]).filter((e=>e.key===t))[0]||{};return s&&Object.hasOwnProperty.call(s,r)?s[r]:a}}function m2({layoutService:e,dockService:t}){const{BAR:n,LINE:r,POINT:i}=gf,o=p2({layoutService:e,key:"bar"}),a=p2({layoutService:e,key:"line"}),s=()=>{const e=o({property:"strokeWidth",defaultValue:"none"});return e?n.STROKE.WIDTH[e.toUpperCase()]:0};return{query:{bar:{getHasStyling:()=>!!e.getLayoutValue("components",[]).filter((e=>"bar"===e.key)).length,getWidthFn:()=>()=>o({property:"width",defaultValue:.7}),getHasStrokeWidth:()=>!!s(),getStrokeWidth:()=>s(),getStrokeColor:()=>o({property:"strokeColor",defaultValue:{index:-1,color:n.STROKE.COLOR}}).color},line:{getCurveFn:()=>(e,t)=>a({property:"lineCurve",defaultValue:r.CURVE.LINEAR,index:t}),getStrokeWidthFn:()=>(e,n)=>a({property:"lineThickness",defaultValue:"FULL"===t.meta.chart.mode?r.WIDTH.FULL.DEFAULT:r.WIDTH.LESS.DEFAULT,index:n}),getStrokeDasharrayFn:()=>(e,t)=>{const n=a({property:"lineType",defaultValue:r.TYPE.SOLID,index:t});return n&&r.TYPE[n.toUpperCase()]}},point:{getSize:e=>a({property:"dataPointSize",defaultValue:i.SIZE.DEFAULT,index:e})}}}}const{model:y2}=im,g2=({picasso:t,chart:n,environment:r,flags:i,viewState:o,viewCache:a,actions:s,selectionService:l})=>{const u=e.useStaleLayout(),{width:c,height:d}=e.useRect(),[f,h]=e.useState(),[p,m]=e.useState(),y=e.useModel(),g=e.useApp(),v=e.useAppLayout(),b=e.usePlugins();e.useEffect((()=>{if(!(u&&null!=n&&n.update&&r&&o))return;const e=function(e){var t=e.source,n=e.metaAdditionsFn,r=Ta(!0,{},t),i=bl(r),o=function(){return function(e){var t=e.layout,n=e.additionsFn,r=void 0===n?function(){return{}}:n,i=e.additionsProps,o=void 0===i?{}:i,a=t.qHyperCube,s=a.qDimensionInfo,l=a.qMeasureInfo,u=a.qMode,c=s.length,d=l.length,f=pa({mode:{S:"S"===u,P:"P"===u,K:"K"===u,T:"T"===u},dimensionCount:c,measureCount:d,hasMultipleDimensions:c>1,hasMultipleMeasures:d>1,isOneDimensional:1===c,isTwoDimensional:2===c},o);return pa(pa({},f),r({layout:t,meta:f}))}({layout:r,additionsFn:n,additionsProps:{size:i.size}})},a={refs:pa({},i.refs),meta:o(),getLayout:function(){return r},getLayoutValue:function(e,t){return hl(r,e,t)},setLayoutValue:function(e,t){pl(r,e,t),i=bl(r),a.meta=o()},getHyperCube:function(){return r.qHyperCube},getHyperCubeValue:function(e,t){return hl(r.qHyperCube,e,t)},setHyperCubeValue:function(e,t){pl(r.qHyperCube,e,t),i=bl(r),a.meta=o()},getDataPages:function(){return hl(r,i.refs.dataPages)},setDataPages:function(e){pl(r,i.refs.dataPages,e),a.meta=o()}};return a}({source:u,metaAdditionsFn:l1(i)}),{viewState:f={}}=r.options,{legendScrollOffset:p,scrollOffset:m}=e.meta.isSnapshot?e.getLayoutValue("snapshotData.content.chartData",{}):f;o.preventSet("scrollOffset",m),o.preventSet("legendScrollOffset",p),o.preventSet("title",e.getLayoutValue("title"));const x=function({genericObjectModel:e,layoutService:t}){const n={cube:void 0,on:!1},r=d1({genericObjectModel:e,layoutService:t});return{query:{getCube:()=>n.cube,getIsReduced:()=>n.on},command:{initialize:()=>r().then((({reducedCube:e})=>{n.cube=e,n.on=!!(n.cube&&n.cube.qDataPages[0]&&n.cube.qDataPages[0].qIsReduced)})),setSnapshotData:e=>{e.reducedHyperCube=n.cube}}}}({genericObjectModel:y,layoutService:e}),M=fl({chart:n,layoutService:e,config:{logicalSize:{width:c,height:d},rtl:"rtl"===r.options.direction},typeConfig:{type:"major-minor",fallback:"vertical",invert:!0,measureAxes:[{ref:"measureAxes.0",name:"minor"},{ref:"measureAxes.1",name:"minorSecondary"}]}}),S=m2({layoutService:e,dockService:M}),w=s1({layoutService:e,flags:i}),E=e.meta.isDiscrete?function({chart:e,genericObjectModel:t,layoutService:n,dockService:r,seriesModel:i,viewState:o,rtl:a,actions:s}){return d2({chart:e,actions:s,componentKey:om(i),enigmaModel:t,layoutService:n,dockService:r,viewState:o,rtl:a,itemWidths:f2,options:{axisKey:Vo.COMPONENT.AXIS.MAJOR}})}({chart:n,genericObjectModel:y,layoutService:e,dockService:M,seriesModel:w,viewState:o,rtl:"rtl"===r.options.direction,actions:s}):void 0,k=e.meta.isContinuous?y2({model:y,layoutService:e,viewState:o,viewCache:a}):void 0,C=I1({actions:s,appLayoutModel:v,appModel:g,chart:n,environment:r,flags:i,genericObjectModel:y,layoutService:e,picasso:t,seriesModel:w,viewState:o}),O=function(e){var t=e.theme,n=e.styleMatrix,r={theme:t,styleMatrix:Hc(void 0===n?[]:n),styles:void 0};return r.styles=$c(r.styleMatrix,t),{getStyles:function(){return r.styles},getTheme:function(){return r.theme},setTheme:function(e){r.theme=e,r.styles=$c(r.styleMatrix,e)}}}({theme:r.theme,styleMatrix:DJ}),T=function({layoutService:e,seriesModel:t}){const{isContinuous:n}=e.meta,r="qDimensionInfo/0",i=r+":numeric";return{main:{major:r,majorNumeric:i,minorsPrimary:t.meta.primarySeries.map((e=>e.ref)),minorsSecondary:t.meta.secondarySeries.map((e=>e.ref))},virtuals:n?[{key:i,from:r,override:{value:e=>e.qNum}}]:void 0}}({layoutService:e,seriesModel:w}),A=m1({isPrimary:!0,layoutService:e,reducedModel:x,seriesModel:w,continuousModel:k,flags:i}),N=m1({isPrimary:!1,layoutService:e,reducedModel:x,seriesModel:w,continuousModel:k,flags:i}),q=N1({config:{measureAxesRef:"measureAxes.0",formatter:Vo.FORMATTER.PRIMARY},chart:n,layoutService:e,extremumModel:A,dockService:M,seriesModel:w,themeService:O}),D=N1({config:{measureAxesRef:"measureAxes.1",formatter:Vo.FORMATTER.SECONDARY},chart:n,layoutService:e,extremumModel:N,dockService:M,seriesModel:w,themeService:O}),R=q1({genericObjectModel:y,layoutService:e}),I=h2({appLayoutModel:v,appModel:g,chart:n,environment:r,flags:i,genericObjectModel:y,layout:u,picasso:t}),_=Fo({layoutService:e,discreteModel:E}),P=function(e){return{layout:e.getLayout(),keys:{SCALE:{MAJOR:Vo.SCALE.MAJOR,MAJOR_INNER:Vo.SCALE.MAJOR_INNER,MINOR:{PRIMARY:Vo.SCALE.MINOR.PRIMARY,SECONDARY:Vo.SCALE.MINOR.SECONDARY}},COMPONENT:{BAR_PRIMARY:`${Vo.COMPONENT.BAR}-${$o.PRIMARY}`,BAR_SECONDARY:`${Vo.COMPONENT.BAR}-${$o.SECONDARY}`,AXIS:{MAJOR:Vo.COMPONENT.AXIS.MAJOR,MAJOR_CONTINUOUS:Vo.COMPONENT.AXIS.MAJOR_CONTINUOUS,TIME_INNER:Vo.COMPONENT.AXIS.TIME_INNER,MINOR:{PRIMARY:Vo.COMPONENT.AXIS.MINOR.PRIMARY,SECONDARY:Vo.COMPONENT.AXIS.MINOR.SECONDARY}},AXIS_TITLE:{MAJOR:Vo.COMPONENT.AXIS_TITLE.MAJOR,MINOR:{PRIMARY:Vo.COMPONENT.AXIS_TITLE.MINOR.PRIMARY,SECONDARY:Vo.COMPONENT.AXIS_TITLE.MINOR.SECONDARY}}},COLLECTION:{MAIN:Vo.COLLECTION.MAIN}}}}(e),L=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 da(regeneratorRuntime.mark((function e(){var r,a,s,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!o.initialized){e.next=2;break}return e.abrupt("return");case 2:return a=Promise.all(n.filter((function(e){return"custom-component"===e.info.type})).map(function(){var e=da(regeneratorRuntime.mark((function e(n){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.info.componentName){e.next=2;break}throw new Error("plugin-service: Custom component is missing componentName");case 2:return e.next=4,n.fn(pa({},i));case 4:if("object"===ua(r=e.sent)){e.next=7;break}throw new Error("plugin-service: Custom component needs to be an object");case 7:t.component(n.info.componentName,r);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())),s=Promise.all(n.filter((function(e){return"component-definition"===e.info.type})).map((function(e){return e.fn(pa({},i))}))),e.next=6,Promise.all([a,s]);case 6:l=e.sent,o.initialized=!0,(r=o.definitions).push.apply(r,ga(l[1]));case 9:case"end":return e.stop()}}),e)})))()},extendComponents:function(e){return o.initialized?(o.definitions.filter(Boolean).forEach((function(t){var n=ya(e.filter((function(e){return e.key&&e.key===t.key})),1)[0];if(n){var r=Ta(!0,{},n.brush);Ta(!0,n,t),t.brush&&(n.brush=function(e,t){return"object"===ua(e)&&Object.keys(e).length?(Array.isArray(t.consume)&&(e.consume=xl({originalArray:e.consume,newArray:t.consume,matchKey:"context"})),Array.isArray(t.trigger)&&(e.trigger=xl({originalArray:e.trigger,newArray:t.trigger,matchKey:"on"})),e):t}(r,t.brush))}else e.push(t)})),e):e}}}({picassoInstance:t,plugins:b,pluginArgs:P});h({selectionService:l,genericObjectModel:y,appModel:g,dockService:M,styleModel:S,layoutService:e,fieldModel:T,seriesModel:w,reducedModel:x,primaryExtremumModel:A,secondaryExtremumModel:N,primaryTickModel:q,secondaryTickModel:D,propertiesModel:R,colorService:C,themeService:O,appLayoutModel:v,tooltipModel:I,flags:i,...E&&{discreteModel:E},...k&&{continuousModel:k},refLineModel:_,pluginService:L})}),[u,y,g,v,r,null==n?void 0:n.update,o]);const[,x]=e.usePromise((()=>{if(!f)return Promise.resolve();const{layoutService:e,colorService:t,reducedModel:n,primaryExtremumModel:i,secondaryExtremumModel:a,propertiesModel:u,continuousModel:c,discreteModel:d,pluginService:h}=f,p=c?()=>{var t,n;c.update(e.getLayout());const i=c.initialFetch(),a=!e.meta.isSnapshot&&(null==r||null===(t=r.options)||void 0===t||null===(n=t.viewState)||void 0===n?void 0:n.zoom);return a&&o.preventSet("zoom",a),i}:()=>Promise.resolve(),g=t.initialize().then((()=>{const e=t.getSettings().field;l.setBrushAliases({colorField:e}),t.custom.updateLegend()}));return Promise.all([h.initialize(),n.command.initialize(),y?u.command.initialize():Promise.resolve(),g,p(),s.scroll.attachDiscreteModel(d)]).then((()=>Promise.all([i.command.initialize(),a.command.initialize()]).then((()=>m(f)))))}),[f]);if(x)throw x;return p};function v2(){const[t,n]=e.useState();return e.useEffect((()=>{n(function(e){var t=pa({},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}))}),[]),t}const b2={shapes:[{type:"path",attrs:{d:"M15.9488039,5.20769129 C16.0487326,6.70662306 15.3492311,8.30548361 14.050157,9.30477145 C12.651154,10.5039169 10.8524359,10.8037032 8.85386017,10.4039881 L7.3549284,10.0042729 L5.75606786,9.70448659 C5.75606786,9.90434416 5.65613907,10.0042729 5.4562815,10.2041305 C5.05656637,10.6038456 4.55692244,10.8037032 4.05727852,10.8037032 C3.75749217,10.8037032 3.45770582,10.7037744 3.15791946,10.6038456 C3.05799068,10.903632 3.15791946,11.2034184 3.45770582,11.7030623 C5.05656637,14.0014243 3.85742095,15.9000712 3.75749217,16 L2.2585604,15.3004985 C2.2585604,15.2005697 2.95806189,14.0014243 1.95877405,12.6024213 C1.6589877,12.0028486 1.15934378,11.0035608 1.55905891,10.0042729 C1.6589877,9.80441537 1.75891648,9.6045578 1.95877405,9.40470024 C1.6589877,8.90505631 1.55905891,8.30548361 1.85884527,7.7059109 C1.55905891,7.40612455 1.25927256,7.1063382 1.15934378,6.70662306 C0.859557424,5.90719279 0.959486209,4.5081898 1.6589877,3.30904439 C1.95877405,2.6095429 2.55834676,2.0099702 3.15791946,1.51032628 C3.95734974,0.91075357 4.95663758,0.610967217 6.15578299,0.311180864 C9.05371774,-0.388320626 11.9516525,0.111323295 13.9502282,1.61025506 C15.1493736,2.50961412 15.8488751,3.80868831 15.9488039,5.20769129 Z M13.0508691,8.10562604 C13.8502994,7.40612455 14.3499433,6.40683671 14.3499433,5.30762008 C14.2500145,4.20840345 13.550513,3.40897318 12.9509403,2.90932926 C12.1515101,2.40968533 11.252151,2.0099702 10.1529344,1.81011263 C8.95378895,1.61025506 7.75464354,1.71018384 6.45556935,1.91004141 C4.75678001,2.30975655 3.65756338,3.00925804 3.05799068,4.10847467 C2.55834676,5.00783373 2.65827554,5.90719279 2.75820433,6.20697914 C2.75820433,6.30690792 2.85813311,6.40683671 3.05799068,6.40683671 C3.15791946,6.40683671 3.25784825,6.40683671 3.35777703,6.40683671 C3.45770582,6.40683671 3.45770582,6.40683671 3.45770582,6.40683671 L3.5576346,6.40683671 L3.65756338,6.40683671 C4.65685123,6.40683671 5.4562815,6.90648063 5.85599664,7.80583969 L5.85599664,8.00569726 C6.35564056,8.10562604 7.05514205,8.30548361 7.75464354,8.50534118 L9.25357531,8.90505631 C10.0530056,9.0049851 10.7525071,9.0049851 11.4520086,8.80512753 C12.0515813,8.70519875 12.5512252,8.40541239 13.0508691,8.10562604 Z"}}]};const x2={query:{getCanScroll:()=>!0}};function M2(){const t=e.useConstraints(),[n,r]=e.useState(!1),[i,o]=e.useState(!1),[a,s]=e.useState(!1),l=function(){const t=e.useConstraints(),[n,r]=e.useState(!1),[i,o]=e.useState({}),[a,s]=e.useState();return e.useEffect((()=>()=>{o({})}),[]),e.useEffect((()=>{t&&r(!t.select&&!t.active)}),[t]),{enabled:()=>n,emit:(e,...t)=>i[e].forEach((e=>e(...t))),removeListener:(e,t)=>{var n;const r=null===(n=i[e])||void 0===n?void 0:n.indexOf(t);r>-1&&i[e].splice(r,1)},on:(e,t)=>{Array.isArray(i[e])?i[e].push(t):i[e]=[t]},get brushSelectionIncludeMax(){return a},set brushSelectionIncludeMax(e){s(e)},getBrushOptions:void 0}}(),u=function(){var t,n,r;const i=e.useConstraints(),[o,a]=e.useState(!1),[s,l]=e.useState(!1),u=e.useLayout(),c=!!u.qSelectionInfo.qInSelections,d=!(null===(t=u.qHyperCube)||void 0===t||null===(n=t.qDimensionInfo)||void 0===n||null===(r=n[0])||void 0===r||!r.qIsOneAndOnlyOne);e.useEffect((()=>{i&&a(!i.select&&!i.active)}),[i]);const f=e=>{l("boolean"==typeof e?e:!s)};return e.useAction((()=>({key:"lasso",label:"Lasso",icon:b2,hidden:!o||!c||d,active:s,action:f})),[c,d,s,o]),{action:f,enabled:()=>o,active:()=>s}}();let c=x2;e.useEffect((()=>{t&&(r(!t.active),o(!t.active),s(!t.passive))}),[t]);const[d]=e.useState({});return d.scroll={enabled:()=>n&&c.query.getCanScroll(),attachDiscreteModel:e=>{c=e||x2}},d.interact={enabled:()=>i},d.tooltip={enabled:()=>a},d.lasso=u,d.select=l,d}function S2({clearMinor:e,clearDiscrete:t,clearLegend:n}){e(),e({componentName:"minor-secondary-range-brush",eventName:"minorRange-secondary"}),t({brushName:!1}),n()}function w2({setSelectionInfo:e,event:t,components:n,clear:r}){const i=null!=n&&n.length?n.map((e=>e.key)).filter(Boolean):[];e({event:t,components:i,minorRangePrimary:"minorRange"===t,minorRange:["minorRange","minorRange-secondary"].includes(t),legendRange:"legendRange"===t,legendTap:"tap"===t&&i[0]===Vo.COMPONENT.LEGEND_CATEGORICAL}),r()}var E2={exports:{}};!function(e,t){!function(t,n){e.exports=n()}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/conversion/",n(n.s="./index.js")}({"../node_modules/extend/index.js":
|
|
63
|
+
var xz=OR.exports,Mz=DR,Sz=vz.exports;function wz(e,t,n,r,i,o,a,s){if(!e){if(e=void 0,void 0===t)e=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,i,o,a,s],u=0;(e=Error(t.replace(/%s/g,(function(){return l[u++]})))).name="Invariant Violation"}throw e.framesToPop=1,e}}function Ez(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);wz(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}function kz(e,t,n,r,i,o,a,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(e){this.onError(e)}}xz||Ez("227");var Cz=!1,Oz=null,Tz=!1,Az=null,Nz={onError:function(e){Cz=!0,Oz=e}};function qz(e,t,n,r,i,o,a,s,l){Cz=!1,Oz=null,kz.apply(Nz,arguments)}var Dz=null,Rz={};function Iz(){if(Dz)for(var e in Rz){var t=Rz[e],n=Dz.indexOf(e);if(-1<n||Ez("96",e),!Pz[n])for(var r in t.extractEvents||Ez("97",e),Pz[n]=t,n=t.eventTypes){var i=void 0,o=n[r],a=t,s=r;Lz.hasOwnProperty(s)&&Ez("99",s),Lz[s]=o;var l=o.phasedRegistrationNames;if(l){for(i in l)l.hasOwnProperty(i)&&_z(l[i],a,s);i=!0}else o.registrationName?(_z(o.registrationName,a,s),i=!0):i=!1;i||Ez("98",r,e)}}}function _z(e,t,n){jz[e]&&Ez("100",e),jz[e]=t,zz[e]=t.eventTypes[n].dependencies}var Pz=[],Lz={},jz={},zz={},Fz=null,Bz=null,Vz=null;function Hz(e,t,n){var r=e.type||"unknown-event";e.currentTarget=Vz(n),function(e,t,n,r,i,o,a,s,l){if(qz.apply(this,arguments),Cz){if(Cz){var u=Oz;Cz=!1,Oz=null}else Ez("198"),u=void 0;Tz||(Tz=!0,Az=u)}}(r,t,void 0,e),e.currentTarget=null}function $z(e,t){return null==t&&Ez("30"),null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function Uz(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}var Wz=null;function Yz(e){if(e){var t=e._dispatchListeners,n=e._dispatchInstances;if(Array.isArray(t))for(var r=0;r<t.length&&!e.isPropagationStopped();r++)Hz(e,t[r],n[r]);else t&&Hz(e,t,n);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}var Xz={injectEventPluginOrder:function(e){Dz&&Ez("101"),Dz=Array.prototype.slice.call(e),Iz()},injectEventPluginsByName:function(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var r=e[t];Rz.hasOwnProperty(t)&&Rz[t]===r||(Rz[t]&&Ez("102",t),Rz[t]=r,n=!0)}n&&Iz()}};function Gz(e,t){var n=e.stateNode;if(!n)return null;var r=Fz(n);if(!r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}return e?null:(n&&"function"!=typeof n&&Ez("231",t,typeof n),n)}function Kz(e){if(null!==e&&(Wz=$z(Wz,e)),e=Wz,Wz=null,e&&(Uz(e,Yz),Wz&&Ez("95"),Tz))throw e=Az,Tz=!1,Az=null,e}var Jz=Math.random().toString(36).slice(2),Zz="__reactInternalInstance$"+Jz,Qz="__reactEventHandlers$"+Jz;function eF(e){if(e[Zz])return e[Zz];for(;!e[Zz];){if(!e.parentNode)return null;e=e.parentNode}return 5===(e=e[Zz]).tag||6===e.tag?e:null}function tF(e){return!(e=e[Zz])||5!==e.tag&&6!==e.tag?null:e}function nF(e){if(5===e.tag||6===e.tag)return e.stateNode;Ez("33")}function rF(e){return e[Qz]||null}function iF(e){do{e=e.return}while(e&&5!==e.tag);return e||null}function oF(e,t,n){(t=Gz(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=$z(n._dispatchListeners,t),n._dispatchInstances=$z(n._dispatchInstances,e))}function aF(e){if(e&&e.dispatchConfig.phasedRegistrationNames){for(var t=e._targetInst,n=[];t;)n.push(t),t=iF(t);for(t=n.length;0<t--;)oF(n[t],"captured",e);for(t=0;t<n.length;t++)oF(n[t],"bubbled",e)}}function sF(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=Gz(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=$z(n._dispatchListeners,t),n._dispatchInstances=$z(n._dispatchInstances,e))}function lF(e){e&&e.dispatchConfig.registrationName&&sF(e._targetInst,null,e)}function uF(e){Uz(e,aF)}var cF=!("undefined"==typeof window||!window.document||!window.document.createElement);function dF(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var fF={animationend:dF("Animation","AnimationEnd"),animationiteration:dF("Animation","AnimationIteration"),animationstart:dF("Animation","AnimationStart"),transitionend:dF("Transition","TransitionEnd")},hF={},pF={};function mF(e){if(hF[e])return hF[e];if(!fF[e])return e;var t,n=fF[e];for(t in n)if(n.hasOwnProperty(t)&&t in pF)return hF[e]=n[t];return e}cF&&(pF=document.createElement("div").style,"AnimationEvent"in window||(delete fF.animationend.animation,delete fF.animationiteration.animation,delete fF.animationstart.animation),"TransitionEvent"in window||delete fF.transitionend.transition);var yF=mF("animationend"),gF=mF("animationiteration"),vF=mF("animationstart"),bF=mF("transitionend"),xF="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),MF=null,SF=null,wF=null;function EF(){if(wF)return wF;var e,t,n=SF,r=n.length,i="value"in MF?MF.value:MF.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return wF=i.slice(e,1<t?1-t:void 0)}function kF(){return!0}function CF(){return!1}function OF(e,t,n,r){for(var i in this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface)e.hasOwnProperty(i)&&((t=e[i])?this[i]=t(n):"target"===i?this.target=r:this[i]=n[i]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?kF:CF,this.isPropagationStopped=CF,this}function TF(e,t,n,r){if(this.eventPool.length){var i=this.eventPool.pop();return this.call(i,e,t,n,r),i}return new this(e,t,n,r)}function AF(e){e instanceof this||Ez("279"),e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function NF(e){e.eventPool=[],e.getPooled=TF,e.release=AF}Mz(OF.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=kF)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=kF)},persist:function(){this.isPersistent=kF},isPersistent:CF,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=CF,this._dispatchInstances=this._dispatchListeners=null}}),OF.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},OF.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var i=new t;return Mz(i,n.prototype),n.prototype=i,n.prototype.constructor=n,n.Interface=Mz({},r.Interface,e),n.extend=r.extend,NF(n),n},NF(OF);var qF=OF.extend({data:null}),DF=OF.extend({data:null}),RF=[9,13,27,32],IF=cF&&"CompositionEvent"in window,_F=null;cF&&"documentMode"in document&&(_F=document.documentMode);var PF=cF&&"TextEvent"in window&&!_F,LF=cF&&(!IF||_F&&8<_F&&11>=_F),jF=String.fromCharCode(32),zF={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},FF=!1;function BF(e,t){switch(e){case"keyup":return-1!==RF.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function VF(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var HF=!1;var $F={eventTypes:zF,extractEvents:function(e,t,n,r){var i=void 0,o=void 0;if(IF)e:{switch(e){case"compositionstart":i=zF.compositionStart;break e;case"compositionend":i=zF.compositionEnd;break e;case"compositionupdate":i=zF.compositionUpdate;break e}i=void 0}else HF?BF(e,n)&&(i=zF.compositionEnd):"keydown"===e&&229===n.keyCode&&(i=zF.compositionStart);return i?(LF&&"ko"!==n.locale&&(HF||i!==zF.compositionStart?i===zF.compositionEnd&&HF&&(o=EF()):(SF="value"in(MF=r)?MF.value:MF.textContent,HF=!0)),i=qF.getPooled(i,t,n,r),o?i.data=o:null!==(o=VF(n))&&(i.data=o),uF(i),o=i):o=null,(e=PF?function(e,t){switch(e){case"compositionend":return VF(t);case"keypress":return 32!==t.which?null:(FF=!0,jF);case"textInput":return(e=t.data)===jF&&FF?null:e;default:return null}}(e,n):function(e,t){if(HF)return"compositionend"===e||!IF&&BF(e,t)?(e=EF(),wF=SF=MF=null,HF=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return LF&&"ko"!==t.locale?null:t.data;default:return null}}(e,n))?((t=DF.getPooled(zF.beforeInput,t,n,r)).data=e,uF(t)):t=null,null===o?t:null===t?o:[o,t]}},UF=null,WF=null,YF=null;function XF(e){if(e=Bz(e)){"function"!=typeof UF&&Ez("280");var t=Fz(e.stateNode);UF(e.stateNode,e.type,t)}}function GF(e){WF?YF?YF.push(e):YF=[e]:WF=e}function KF(){if(WF){var e=WF,t=YF;if(YF=WF=null,XF(e),t)for(e=0;e<t.length;e++)XF(t[e])}}function JF(e,t){return e(t)}function ZF(e,t,n){return e(t,n)}function QF(){}var eB=!1;function tB(e,t){if(eB)return e(t);eB=!0;try{return JF(e,t)}finally{eB=!1,(null!==WF||null!==YF)&&(QF(),KF())}}var nB={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function rB(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!nB[e.type]:"textarea"===t}function iB(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}function oB(e){if(!cF)return!1;var t=(e="on"+e)in document;return t||((t=document.createElement("div")).setAttribute(e,"return;"),t="function"==typeof t[e]),t}function aB(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function sB(e){e._valueTracker||(e._valueTracker=function(e){var t=aB(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function lB(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=aB(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}var uB=xz.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;uB.hasOwnProperty("ReactCurrentDispatcher")||(uB.ReactCurrentDispatcher={current:null});var cB=/^(.*)[\\\/]/,dB="function"==typeof Symbol&&Symbol.for,fB=dB?Symbol.for("react.element"):60103,hB=dB?Symbol.for("react.portal"):60106,pB=dB?Symbol.for("react.fragment"):60107,mB=dB?Symbol.for("react.strict_mode"):60108,yB=dB?Symbol.for("react.profiler"):60114,gB=dB?Symbol.for("react.provider"):60109,vB=dB?Symbol.for("react.context"):60110,bB=dB?Symbol.for("react.concurrent_mode"):60111,xB=dB?Symbol.for("react.forward_ref"):60112,MB=dB?Symbol.for("react.suspense"):60113,SB=dB?Symbol.for("react.memo"):60115,wB=dB?Symbol.for("react.lazy"):60116,EB="function"==typeof Symbol&&Symbol.iterator;function kB(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=EB&&e[EB]||e["@@iterator"])?e:null}function CB(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case bB:return"ConcurrentMode";case pB:return"Fragment";case hB:return"Portal";case yB:return"Profiler";case mB:return"StrictMode";case MB:return"Suspense"}if("object"==typeof e)switch(e.$$typeof){case vB:return"Context.Consumer";case gB:return"Context.Provider";case xB:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case SB:return CB(e.type);case wB:if(e=1===e._status?e._result:null)return CB(e)}return null}function OB(e){var t="";do{e:switch(e.tag){case 3:case 4:case 6:case 7:case 10:case 9:var n="";break e;default:var r=e._debugOwner,i=e._debugSource,o=CB(e.type);n=null,r&&(n=CB(r.type)),r=o,o="",i?o=" (at "+i.fileName.replace(cB,"")+":"+i.lineNumber+")":n&&(o=" (created by "+n+")"),n="\n in "+(r||"Unknown")+o}t+=n,e=e.return}while(e);return t}var TB=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,AB=Object.prototype.hasOwnProperty,NB={},qB={};function DB(e,t,n,r,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t}var RB={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){RB[e]=new DB(e,0,!1,e,null)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];RB[t]=new DB(t,1,!1,e[1],null)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){RB[e]=new DB(e,2,!1,e.toLowerCase(),null)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){RB[e]=new DB(e,2,!1,e,null)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){RB[e]=new DB(e,3,!1,e.toLowerCase(),null)})),["checked","multiple","muted","selected"].forEach((function(e){RB[e]=new DB(e,3,!0,e,null)})),["capture","download"].forEach((function(e){RB[e]=new DB(e,4,!1,e,null)})),["cols","rows","size","span"].forEach((function(e){RB[e]=new DB(e,6,!1,e,null)})),["rowSpan","start"].forEach((function(e){RB[e]=new DB(e,5,!1,e.toLowerCase(),null)}));var IB=/[\-:]([a-z])/g;function _B(e){return e[1].toUpperCase()}function PB(e,t,n,r){var i=RB.hasOwnProperty(t)?RB[t]:null;(null!==i?0===i.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!AB.call(qB,e)||!AB.call(NB,e)&&(TB.test(e)?qB[e]=!0:(NB[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}function LB(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function jB(e,t){var n=t.checked;return Mz({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function zB(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=LB(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function FB(e,t){null!=(t=t.checked)&&PB(e,"checked",t,!1)}function BB(e,t){FB(e,t);var n=LB(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?HB(e,t.type,n):t.hasOwnProperty("defaultValue")&&HB(e,t.type,LB(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function VB(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!e.defaultChecked,e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function HB(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(IB,_B);RB[t]=new DB(t,1,!1,e,null)})),"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(IB,_B);RB[t]=new DB(t,1,!1,e,"http://www.w3.org/1999/xlink")})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(IB,_B);RB[t]=new DB(t,1,!1,e,"http://www.w3.org/XML/1998/namespace")})),["tabIndex","crossOrigin"].forEach((function(e){RB[e]=new DB(e,1,!1,e.toLowerCase(),null)}));var $B={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function UB(e,t,n){return(e=OF.getPooled($B.change,e,t,n)).type="change",GF(n),uF(e),e}var WB=null,YB=null;function XB(e){Kz(e)}function GB(e){if(lB(nF(e)))return e}function KB(e,t){if("change"===e)return t}var JB=!1;function ZB(){WB&&(WB.detachEvent("onpropertychange",QB),YB=WB=null)}function QB(e){"value"===e.propertyName&&GB(YB)&&tB(XB,e=UB(YB,e,iB(e)))}function eV(e,t,n){"focus"===e?(ZB(),YB=n,(WB=t).attachEvent("onpropertychange",QB)):"blur"===e&&ZB()}function tV(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return GB(YB)}function nV(e,t){if("click"===e)return GB(t)}function rV(e,t){if("input"===e||"change"===e)return GB(t)}cF&&(JB=oB("input")&&(!document.documentMode||9<document.documentMode));var iV={eventTypes:$B,_isInputEventSupported:JB,extractEvents:function(e,t,n,r){var i=t?nF(t):window,o=void 0,a=void 0,s=i.nodeName&&i.nodeName.toLowerCase();if("select"===s||"input"===s&&"file"===i.type?o=KB:rB(i)?JB?o=rV:(o=tV,a=eV):(s=i.nodeName)&&"input"===s.toLowerCase()&&("checkbox"===i.type||"radio"===i.type)&&(o=nV),o&&(o=o(e,t)))return UB(o,n,r);a&&a(e,i,t),"blur"===e&&(e=i._wrapperState)&&e.controlled&&"number"===i.type&&HB(i,"number",i.value)}},oV=OF.extend({view:null,detail:null}),aV={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function sV(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=aV[e])&&!!t[e]}function lV(){return sV}var uV=0,cV=0,dV=!1,fV=!1,hV=oV.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:lV,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},movementX:function(e){if("movementX"in e)return e.movementX;var t=uV;return uV=e.screenX,dV?"mousemove"===e.type?e.screenX-t:0:(dV=!0,0)},movementY:function(e){if("movementY"in e)return e.movementY;var t=cV;return cV=e.screenY,fV?"mousemove"===e.type?e.screenY-t:0:(fV=!0,0)}}),pV=hV.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),mV={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},yV={eventTypes:mV,extractEvents:function(e,t,n,r){var i="mouseover"===e||"pointerover"===e,o="mouseout"===e||"pointerout"===e;if(i&&(n.relatedTarget||n.fromElement)||!o&&!i)return null;if(i=r.window===r?r:(i=r.ownerDocument)?i.defaultView||i.parentWindow:window,o?(o=t,t=(t=n.relatedTarget||n.toElement)?eF(t):null):o=null,o===t)return null;var a=void 0,s=void 0,l=void 0,u=void 0;"mouseout"===e||"mouseover"===e?(a=hV,s=mV.mouseLeave,l=mV.mouseEnter,u="mouse"):"pointerout"!==e&&"pointerover"!==e||(a=pV,s=mV.pointerLeave,l=mV.pointerEnter,u="pointer");var c=null==o?i:nF(o);if(i=null==t?i:nF(t),(e=a.getPooled(s,o,n,r)).type=u+"leave",e.target=c,e.relatedTarget=i,(n=a.getPooled(l,t,n,r)).type=u+"enter",n.target=i,n.relatedTarget=c,r=t,o&&r)e:{for(i=r,u=0,a=t=o;a;a=iF(a))u++;for(a=0,l=i;l;l=iF(l))a++;for(;0<u-a;)t=iF(t),u--;for(;0<a-u;)i=iF(i),a--;for(;u--;){if(t===i||t===i.alternate)break e;t=iF(t),i=iF(i)}t=null}else t=null;for(i=t,t=[];o&&o!==i&&(null===(u=o.alternate)||u!==i);)t.push(o),o=iF(o);for(o=[];r&&r!==i&&(null===(u=r.alternate)||u!==i);)o.push(r),r=iF(r);for(r=0;r<t.length;r++)sF(t[r],"bubbled",e);for(r=o.length;0<r--;)sF(o[r],"captured",n);return[e,n]}};function gV(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}var vV=Object.prototype.hasOwnProperty;function bV(e,t){if(gV(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!vV.call(t,n[r])||!gV(e[n[r]],t[n[r]]))return!1;return!0}function xV(e){var t=e;if(e.alternate)for(;t.return;)t=t.return;else{if(0!=(2&t.effectTag))return 1;for(;t.return;)if(0!=(2&(t=t.return).effectTag))return 1}return 3===t.tag?2:3}function MV(e){2!==xV(e)&&Ez("188")}function SV(e){if(!(e=function(e){var t=e.alternate;if(!t)return 3===(t=xV(e))&&Ez("188"),1===t?null:e;for(var n=e,r=t;;){var i=n.return,o=i?i.alternate:null;if(!i||!o)break;if(i.child===o.child){for(var a=i.child;a;){if(a===n)return MV(i),e;if(a===r)return MV(i),t;a=a.sibling}Ez("188")}if(n.return!==r.return)n=i,r=o;else{a=!1;for(var s=i.child;s;){if(s===n){a=!0,n=i,r=o;break}if(s===r){a=!0,r=i,n=o;break}s=s.sibling}if(!a){for(s=o.child;s;){if(s===n){a=!0,n=o,r=i;break}if(s===r){a=!0,r=o,n=i;break}s=s.sibling}a||Ez("189")}}n.alternate!==r&&Ez("190")}return 3!==n.tag&&Ez("188"),n.stateNode.current===n?e:t}(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}var wV=OF.extend({animationName:null,elapsedTime:null,pseudoElement:null}),EV=OF.extend({clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),kV=oV.extend({relatedTarget:null});function CV(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}var OV={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},TV={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},AV=oV.extend({key:function(e){if(e.key){var t=OV[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=CV(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?TV[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:lV,charCode:function(e){return"keypress"===e.type?CV(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?CV(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),NV=hV.extend({dataTransfer:null}),qV=oV.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:lV}),DV=OF.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),RV=hV.extend({deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null}),IV=[["abort","abort"],[yF,"animationEnd"],[gF,"animationIteration"],[vF,"animationStart"],["canplay","canPlay"],["canplaythrough","canPlayThrough"],["drag","drag"],["dragenter","dragEnter"],["dragexit","dragExit"],["dragleave","dragLeave"],["dragover","dragOver"],["durationchange","durationChange"],["emptied","emptied"],["encrypted","encrypted"],["ended","ended"],["error","error"],["gotpointercapture","gotPointerCapture"],["load","load"],["loadeddata","loadedData"],["loadedmetadata","loadedMetadata"],["loadstart","loadStart"],["lostpointercapture","lostPointerCapture"],["mousemove","mouseMove"],["mouseout","mouseOut"],["mouseover","mouseOver"],["playing","playing"],["pointermove","pointerMove"],["pointerout","pointerOut"],["pointerover","pointerOver"],["progress","progress"],["scroll","scroll"],["seeking","seeking"],["stalled","stalled"],["suspend","suspend"],["timeupdate","timeUpdate"],["toggle","toggle"],["touchmove","touchMove"],[bF,"transitionEnd"],["waiting","waiting"],["wheel","wheel"]],_V={},PV={};function LV(e,t){var n=e[0],r="on"+((e=e[1])[0].toUpperCase()+e.slice(1));t={phasedRegistrationNames:{bubbled:r,captured:r+"Capture"},dependencies:[n],isInteractive:t},_V[e]=t,PV[n]=t}[["blur","blur"],["cancel","cancel"],["click","click"],["close","close"],["contextmenu","contextMenu"],["copy","copy"],["cut","cut"],["auxclick","auxClick"],["dblclick","doubleClick"],["dragend","dragEnd"],["dragstart","dragStart"],["drop","drop"],["focus","focus"],["input","input"],["invalid","invalid"],["keydown","keyDown"],["keypress","keyPress"],["keyup","keyUp"],["mousedown","mouseDown"],["mouseup","mouseUp"],["paste","paste"],["pause","pause"],["play","play"],["pointercancel","pointerCancel"],["pointerdown","pointerDown"],["pointerup","pointerUp"],["ratechange","rateChange"],["reset","reset"],["seeked","seeked"],["submit","submit"],["touchcancel","touchCancel"],["touchend","touchEnd"],["touchstart","touchStart"],["volumechange","volumeChange"]].forEach((function(e){LV(e,!0)})),IV.forEach((function(e){LV(e,!1)}));var jV={eventTypes:_V,isInteractiveTopLevelEventType:function(e){return void 0!==(e=PV[e])&&!0===e.isInteractive},extractEvents:function(e,t,n,r){var i=PV[e];if(!i)return null;switch(e){case"keypress":if(0===CV(n))return null;case"keydown":case"keyup":e=AV;break;case"blur":case"focus":e=kV;break;case"click":if(2===n.button)return null;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":e=hV;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":e=NV;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":e=qV;break;case yF:case gF:case vF:e=wV;break;case bF:e=DV;break;case"scroll":e=oV;break;case"wheel":e=RV;break;case"copy":case"cut":case"paste":e=EV;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":e=pV;break;default:e=OF}return uF(t=e.getPooled(i,t,n,r)),t}},zV=jV.isInteractiveTopLevelEventType,FV=[];function BV(e){var t=e.targetInst,n=t;do{if(!n){e.ancestors.push(n);break}var r;for(r=n;r.return;)r=r.return;if(!(r=3!==r.tag?null:r.stateNode.containerInfo))break;e.ancestors.push(n),n=eF(r)}while(n);for(n=0;n<e.ancestors.length;n++){t=e.ancestors[n];var i=iB(e.nativeEvent);r=e.topLevelType;for(var o=e.nativeEvent,a=null,s=0;s<Pz.length;s++){var l=Pz[s];l&&(l=l.extractEvents(r,t,o,i))&&(a=$z(a,l))}Kz(a)}}var VV=!0;function HV(e,t){if(!t)return null;var n=(zV(e)?UV:WV).bind(null,e);t.addEventListener(e,n,!1)}function $V(e,t){if(!t)return null;var n=(zV(e)?UV:WV).bind(null,e);t.addEventListener(e,n,!0)}function UV(e,t){ZF(WV,e,t)}function WV(e,t){if(VV){var n=iB(t);if(null===(n=eF(n))||"number"!=typeof n.tag||2===xV(n)||(n=null),FV.length){var r=FV.pop();r.topLevelType=e,r.nativeEvent=t,r.targetInst=n,e=r}else e={topLevelType:e,nativeEvent:t,targetInst:n,ancestors:[]};try{tB(BV,e)}finally{e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,10>FV.length&&FV.push(e)}}}var YV={},XV=0,GV="_reactListenersID"+(""+Math.random()).slice(2);function KV(e){return Object.prototype.hasOwnProperty.call(e,GV)||(e[GV]=XV++,YV[e[GV]]={}),YV[e[GV]]}function JV(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function ZV(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function QV(e,t){var n,r=ZV(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ZV(r)}}function eH(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?eH(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function tH(){for(var e=window,t=JV();t instanceof e.HTMLIFrameElement;){try{e=t.contentDocument.defaultView}catch(e){break}t=JV(e.document)}return t}function nH(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function rH(e){var t=tH(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&eH(n.ownerDocument.documentElement,n)){if(null!==r&&nH(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=void 0===r.end?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=QV(n,o);var a=QV(n,r);i&&a&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var iH=cF&&"documentMode"in document&&11>=document.documentMode,oH={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},aH=null,sH=null,lH=null,uH=!1;function cH(e,t){var n=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;return uH||null==aH||aH!==JV(n)?null:("selectionStart"in(n=aH)&&nH(n)?n={start:n.selectionStart,end:n.selectionEnd}:n={anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},lH&&bV(lH,n)?null:(lH=n,(e=OF.getPooled(oH.select,sH,e,t)).type="select",e.target=aH,uF(e),e))}var dH={eventTypes:oH,extractEvents:function(e,t,n,r){var i,o=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;if(!(i=!o)){e:{o=KV(o),i=zz.onSelect;for(var a=0;a<i.length;a++){var s=i[a];if(!o.hasOwnProperty(s)||!o[s]){o=!1;break e}}o=!0}i=!o}if(i)return null;switch(o=t?nF(t):window,e){case"focus":(rB(o)||"true"===o.contentEditable)&&(aH=o,sH=t,lH=null);break;case"blur":lH=sH=aH=null;break;case"mousedown":uH=!0;break;case"contextmenu":case"mouseup":case"dragend":return uH=!1,cH(n,r);case"selectionchange":if(iH)break;case"keydown":case"keyup":return cH(n,r)}return null}};function fH(e,t){return e=Mz({children:void 0},t),(t=function(e){var t="";return xz.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function hH(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+LB(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function pH(e,t){return null!=t.dangerouslySetInnerHTML&&Ez("91"),Mz({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function mH(e,t){var n=t.value;null==n&&(n=t.defaultValue,null!=(t=t.children)&&(null!=n&&Ez("92"),Array.isArray(t)&&(1>=t.length||Ez("93"),t=t[0]),n=t),null==n&&(n="")),e._wrapperState={initialValue:LB(n)}}function yH(e,t){var n=LB(t.value),r=LB(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function gH(e){var t=e.textContent;t===e._wrapperState.initialValue&&(e.value=t)}Xz.injectEventPluginOrder("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),Fz=rF,Bz=tF,Vz=nF,Xz.injectEventPluginsByName({SimpleEventPlugin:jV,EnterLeaveEventPlugin:yV,ChangeEventPlugin:iV,SelectEventPlugin:dH,BeforeInputEventPlugin:$F});var vH="http://www.w3.org/1999/xhtml",bH="http://www.w3.org/2000/svg";function xH(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function MH(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?xH(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var SH=void 0,wH=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction((function(){return e(t,n)}))}:e}((function(e,t){if(e.namespaceURI!==bH||"innerHTML"in e)e.innerHTML=t;else{for((SH=SH||document.createElement("div")).innerHTML="<svg>"+t+"</svg>",t=SH.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}));function EH(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var kH={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},CH=["Webkit","ms","Moz","O"];function OH(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||kH.hasOwnProperty(e)&&kH[e]?(""+t).trim():t+"px"}function TH(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=OH(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(kH).forEach((function(e){CH.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),kH[t]=kH[e]}))}));var AH=Mz({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function NH(e,t){t&&(AH[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML)&&Ez("137",e,""),null!=t.dangerouslySetInnerHTML&&(null!=t.children&&Ez("60"),"object"==typeof t.dangerouslySetInnerHTML&&"__html"in t.dangerouslySetInnerHTML||Ez("61")),null!=t.style&&"object"!=typeof t.style&&Ez("62",""))}function qH(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function DH(e,t){var n=KV(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=zz[t];for(var r=0;r<t.length;r++){var i=t[r];if(!n.hasOwnProperty(i)||!n[i]){switch(i){case"scroll":$V("scroll",e);break;case"focus":case"blur":$V("focus",e),$V("blur",e),n.blur=!0,n.focus=!0;break;case"cancel":case"close":oB(i)&&$V(i,e);break;case"invalid":case"submit":case"reset":break;default:-1===xF.indexOf(i)&&HV(i,e)}n[i]=!0}}}function RH(){}var IH=null,_H=null;function PH(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function LH(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var jH="function"==typeof setTimeout?setTimeout:void 0,zH="function"==typeof clearTimeout?clearTimeout:void 0,FH=Sz.unstable_scheduleCallback,BH=Sz.unstable_cancelCallback;function VH(e){for(e=e.nextSibling;e&&1!==e.nodeType&&3!==e.nodeType;)e=e.nextSibling;return e}function HH(e){for(e=e.firstChild;e&&1!==e.nodeType&&3!==e.nodeType;)e=e.nextSibling;return e}var $H=[],UH=-1;function WH(e){0>UH||(e.current=$H[UH],$H[UH]=null,UH--)}function YH(e,t){UH++,$H[UH]=e.current,e.current=t}var XH={},GH={current:XH},KH={current:!1},JH=XH;function ZH(e,t){var n=e.type.contextTypes;if(!n)return XH;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function QH(e){return null!=(e=e.childContextTypes)}function e$(e){WH(KH),WH(GH)}function t$(e){WH(KH),WH(GH)}function n$(e,t,n){GH.current!==XH&&Ez("168"),YH(GH,t),YH(KH,n)}function r$(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())i in e||Ez("108",CB(t)||"Unknown",i);return Mz({},n,r)}function i$(e){var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||XH,JH=GH.current,YH(GH,t),YH(KH,KH.current),!0}function o$(e,t,n){var r=e.stateNode;r||Ez("169"),n?(t=r$(e,t,JH),r.__reactInternalMemoizedMergedChildContext=t,WH(KH),WH(GH),YH(GH,t)):WH(KH),YH(KH,n)}var a$=null,s$=null;function l$(e){return function(t){try{return e(t)}catch(e){}}}function u$(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.contextDependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function c$(e,t,n,r){return new u$(e,t,n,r)}function d$(e){return!(!(e=e.prototype)||!e.isReactComponent)}function f$(e,t){var n=e.alternate;return null===n?((n=c$(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.effectTag=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childExpirationTime=e.childExpirationTime,n.expirationTime=e.expirationTime,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,n.contextDependencies=e.contextDependencies,n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function h$(e,t,n,r,i,o){var a=2;if(r=e,"function"==typeof e)d$(e)&&(a=1);else if("string"==typeof e)a=5;else e:switch(e){case pB:return p$(n.children,i,o,t);case bB:return m$(n,3|i,o,t);case mB:return m$(n,2|i,o,t);case yB:return(e=c$(12,n,t,4|i)).elementType=yB,e.type=yB,e.expirationTime=o,e;case MB:return(e=c$(13,n,t,i)).elementType=MB,e.type=MB,e.expirationTime=o,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case gB:a=10;break e;case vB:a=9;break e;case xB:a=11;break e;case SB:a=14;break e;case wB:a=16,r=null;break e}Ez("130",null==e?e:typeof e,"")}return(t=c$(a,n,t,i)).elementType=e,t.type=r,t.expirationTime=o,t}function p$(e,t,n,r){return(e=c$(7,e,r,t)).expirationTime=n,e}function m$(e,t,n,r){return e=c$(8,e,r,t),t=0==(1&t)?mB:bB,e.elementType=t,e.type=t,e.expirationTime=n,e}function y$(e,t,n){return(e=c$(6,e,null,t)).expirationTime=n,e}function g$(e,t,n){return(t=c$(4,null!==e.children?e.children:[],e.key,t)).expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function v$(e,t){e.didError=!1;var n=e.earliestPendingTime;0===n?e.earliestPendingTime=e.latestPendingTime=t:n<t?e.earliestPendingTime=t:e.latestPendingTime>t&&(e.latestPendingTime=t),M$(t,e)}function b$(e,t){e.didError=!1,e.latestPingedTime>=t&&(e.latestPingedTime=0);var n=e.earliestPendingTime,r=e.latestPendingTime;n===t?e.earliestPendingTime=r===t?e.latestPendingTime=0:r:r===t&&(e.latestPendingTime=n),n=e.earliestSuspendedTime,r=e.latestSuspendedTime,0===n?e.earliestSuspendedTime=e.latestSuspendedTime=t:n<t?e.earliestSuspendedTime=t:r>t&&(e.latestSuspendedTime=t),M$(t,e)}function x$(e,t){var n=e.earliestPendingTime;return n>t&&(t=n),(e=e.earliestSuspendedTime)>t&&(t=e),t}function M$(e,t){var n=t.earliestSuspendedTime,r=t.latestSuspendedTime,i=t.earliestPendingTime,o=t.latestPingedTime;0===(i=0!==i?i:o)&&(0===e||r<e)&&(i=r),0!==(e=i)&&n>e&&(e=n),t.nextExpirationTimeToWorkOn=i,t.expirationTime=e}function S$(e,t){if(e&&e.defaultProps)for(var n in t=Mz({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}var w$=(new xz.Component).refs;function E$(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:Mz({},t,n),e.memoizedState=n,null!==(r=e.updateQueue)&&0===e.expirationTime&&(r.baseState=n)}var k$={isMounted:function(e){return!!(e=e._reactInternalFiber)&&2===xV(e)},enqueueSetState:function(e,t,n){e=e._reactInternalFiber;var r=DY(),i=iW(r=rY(r,e));i.payload=t,null!=n&&(i.callback=n),JW(),aW(e,i),sY(e,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternalFiber;var r=DY(),i=iW(r=rY(r,e));i.tag=QU,i.payload=t,null!=n&&(i.callback=n),JW(),aW(e,i),sY(e,r)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var n=DY(),r=iW(n=rY(n,e));r.tag=eW,null!=t&&(r.callback=t),JW(),aW(e,r),sY(e,n)}};function C$(e,t,n,r,i,o,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!bV(n,r)||!bV(i,o))}function O$(e,t,n){var r=!1,i=XH,o=t.contextType;return"object"==typeof o&&null!==o?o=ZU(o):(i=QH(t)?JH:GH.current,o=(r=null!=(r=t.contextTypes))?ZH(e,i):XH),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=k$,e.stateNode=t,t._reactInternalFiber=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function T$(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&k$.enqueueReplaceState(t,t.state,null)}function A$(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=w$;var o=t.contextType;"object"==typeof o&&null!==o?i.context=ZU(o):(o=QH(t)?JH:GH.current,i.context=ZH(e,o)),null!==(o=e.updateQueue)&&(cW(e,o,n,i,r),i.state=e.memoizedState),"function"==typeof(o=t.getDerivedStateFromProps)&&(E$(e,t,o,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&k$.enqueueReplaceState(i,i.state,null),null!==(o=e.updateQueue)&&(cW(e,o,n,i,r),i.state=e.memoizedState)),"function"==typeof i.componentDidMount&&(e.effectTag|=4)}var N$=Array.isArray;function q$(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){n=n._owner;var r=void 0;n&&(1!==n.tag&&Ez("309"),r=n.stateNode),r||Ez("147",e);var i=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===i?t.ref:((t=function(e){var t=r.refs;t===w$&&(t=r.refs={}),null===e?delete t[i]:t[i]=e})._stringRef=i,t)}"string"!=typeof e&&Ez("284"),n._owner||Ez("290",e)}return e}function D$(e,t){"textarea"!==e.type&&Ez("31","[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,"")}function R$(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t,n){return(e=f$(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.effectTag=2,n):r:(t.effectTag=2,n):n}function a(t){return e&&null===t.alternate&&(t.effectTag=2),t}function s(e,t,n,r){return null===t||6!==t.tag?((t=y$(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function l(e,t,n,r){return null!==t&&t.elementType===n.type?((r=i(t,n.props)).ref=q$(e,t,n),r.return=e,r):((r=h$(n.type,n.key,n.props,null,e.mode,r)).ref=q$(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=g$(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function c(e,t,n,r,o){return null===t||7!==t.tag?((t=p$(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=y$(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case fB:return(n=h$(t.type,t.key,t.props,null,e.mode,n)).ref=q$(e,null,t),n.return=e,n;case hB:return(t=g$(t,e.mode,n)).return=e,t}if(N$(t)||kB(t))return(t=p$(t,e.mode,n,null)).return=e,t;D$(e,t)}return null}function f(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==i?null:s(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case fB:return n.key===i?n.type===pB?c(e,t,n.props.children,r,i):l(e,t,n,r):null;case hB:return n.key===i?u(e,t,n,r):null}if(N$(n)||kB(n))return null!==i?null:c(e,t,n,r,null);D$(e,n)}return null}function h(e,t,n,r,i){if("string"==typeof r||"number"==typeof r)return s(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case fB:return e=e.get(null===r.key?n:r.key)||null,r.type===pB?c(t,e,r.props.children,i,r.key):l(t,e,r,i);case hB:return u(t,e=e.get(null===r.key?n:r.key)||null,r,i)}if(N$(r)||kB(r))return c(t,e=e.get(n)||null,r,i,null);D$(t,r)}return null}function p(i,a,s,l){for(var u=null,c=null,p=a,m=a=0,y=null;null!==p&&m<s.length;m++){p.index>m?(y=p,p=null):y=p.sibling;var g=f(i,p,s[m],l);if(null===g){null===p&&(p=y);break}e&&p&&null===g.alternate&&t(i,p),a=o(g,a,m),null===c?u=g:c.sibling=g,c=g,p=y}if(m===s.length)return n(i,p),u;if(null===p){for(;m<s.length;m++)(p=d(i,s[m],l))&&(a=o(p,a,m),null===c?u=p:c.sibling=p,c=p);return u}for(p=r(i,p);m<s.length;m++)(y=h(p,i,m,s[m],l))&&(e&&null!==y.alternate&&p.delete(null===y.key?m:y.key),a=o(y,a,m),null===c?u=y:c.sibling=y,c=y);return e&&p.forEach((function(e){return t(i,e)})),u}function m(i,a,s,l){var u=kB(s);"function"!=typeof u&&Ez("150"),null==(s=u.call(s))&&Ez("151");for(var c=u=null,p=a,m=a=0,y=null,g=s.next();null!==p&&!g.done;m++,g=s.next()){p.index>m?(y=p,p=null):y=p.sibling;var v=f(i,p,g.value,l);if(null===v){p||(p=y);break}e&&p&&null===v.alternate&&t(i,p),a=o(v,a,m),null===c?u=v:c.sibling=v,c=v,p=y}if(g.done)return n(i,p),u;if(null===p){for(;!g.done;m++,g=s.next())null!==(g=d(i,g.value,l))&&(a=o(g,a,m),null===c?u=g:c.sibling=g,c=g);return u}for(p=r(i,p);!g.done;m++,g=s.next())null!==(g=h(p,i,m,g.value,l))&&(e&&null!==g.alternate&&p.delete(null===g.key?m:g.key),a=o(g,a,m),null===c?u=g:c.sibling=g,c=g);return e&&p.forEach((function(e){return t(i,e)})),u}return function(e,r,o,s){var l="object"==typeof o&&null!==o&&o.type===pB&&null===o.key;l&&(o=o.props.children);var u="object"==typeof o&&null!==o;if(u)switch(o.$$typeof){case fB:e:{for(u=o.key,l=r;null!==l;){if(l.key===u){if(7===l.tag?o.type===pB:l.elementType===o.type){n(e,l.sibling),(r=i(l,o.type===pB?o.props.children:o.props)).ref=q$(e,l,o),r.return=e,e=r;break e}n(e,l);break}t(e,l),l=l.sibling}o.type===pB?((r=p$(o.props.children,e.mode,s,o.key)).return=e,e=r):((s=h$(o.type,o.key,o.props,null,e.mode,s)).ref=q$(e,r,o),s.return=e,e=s)}return a(e);case hB:e:{for(l=o.key;null!==r;){if(r.key===l){if(4===r.tag&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),(r=i(r,o.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=g$(o,e.mode,s)).return=e,e=r}return a(e)}if("string"==typeof o||"number"==typeof o)return o=""+o,null!==r&&6===r.tag?(n(e,r.sibling),(r=i(r,o)).return=e,e=r):(n(e,r),(r=y$(o,e.mode,s)).return=e,e=r),a(e);if(N$(o))return p(e,r,o,s);if(kB(o))return m(e,r,o,s);if(u&&D$(e,o),void 0===o&&!l)switch(e.tag){case 1:case 0:Ez("152",(s=e.type).displayName||s.name||"Component")}return n(e,r)}}var I$=R$(!0),_$=R$(!1),P$={},L$={current:P$},j$={current:P$},z$={current:P$};function F$(e){return e===P$&&Ez("174"),e}function B$(e,t){YH(z$,t),YH(j$,e),YH(L$,P$);var n=t.nodeType;switch(n){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:MH(null,"");break;default:t=MH(t=(n=8===n?t.parentNode:t).namespaceURI||null,n=n.tagName)}WH(L$),YH(L$,t)}function V$(e){WH(L$),WH(j$),WH(z$)}function H$(e){F$(z$.current);var t=F$(L$.current),n=MH(t,e.type);t!==n&&(YH(j$,e),YH(L$,n))}function $$(e){j$.current===e&&(WH(L$),WH(j$))}var U$=uB.ReactCurrentDispatcher,W$=0,Y$=null,X$=null,G$=null,K$=null,J$=null,Z$=null,Q$=0,eU=null,tU=0,nU=!1,rU=null,iU=0;function oU(){Ez("307")}function aU(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!gV(e[n],t[n]))return!1;return!0}function sU(e,t,n,r,i,o){if(W$=o,Y$=t,G$=null!==e?e.memoizedState:null,U$.current=null===G$?xU:MU,t=n(r,i),nU){do{nU=!1,iU+=1,G$=null!==e?e.memoizedState:null,Z$=K$,eU=J$=X$=null,U$.current=MU,t=n(r,i)}while(nU);rU=null,iU=0}return U$.current=bU,(e=Y$).memoizedState=K$,e.expirationTime=Q$,e.updateQueue=eU,e.effectTag|=tU,e=null!==X$&&null!==X$.next,W$=0,Z$=J$=K$=G$=X$=Y$=null,Q$=0,eU=null,tU=0,e&&Ez("300"),t}function lU(){U$.current=bU,W$=0,Z$=J$=K$=G$=X$=Y$=null,Q$=0,eU=null,tU=0,nU=!1,rU=null,iU=0}function uU(){var e={memoizedState:null,baseState:null,queue:null,baseUpdate:null,next:null};return null===J$?K$=J$=e:J$=J$.next=e,J$}function cU(){if(null!==Z$)Z$=(J$=Z$).next,G$=null!==(X$=G$)?X$.next:null;else{null===G$&&Ez("310");var e={memoizedState:(X$=G$).memoizedState,baseState:X$.baseState,queue:X$.queue,baseUpdate:X$.baseUpdate,next:null};J$=null===J$?K$=e:J$.next=e,G$=X$.next}return J$}function dU(e,t){return"function"==typeof t?t(e):t}function fU(e){var t=cU(),n=t.queue;if(null===n&&Ez("311"),0<iU){var r=n.dispatch;if(null!==rU){var i=rU.get(n);if(void 0!==i){rU.delete(n);var o=t.memoizedState;do{o=e(o,i.action),i=i.next}while(null!==i);return gV(o,t.memoizedState)||(DU=!0),t.memoizedState=o,t.baseUpdate===n.last&&(t.baseState=o),n.eagerReducer=e,n.eagerState=o,[o,r]}}return[t.memoizedState,r]}r=n.last;var a=t.baseUpdate;if(o=t.baseState,null!==a?(null!==r&&(r.next=null),r=a.next):r=null!==r?r.next:null,null!==r){var s=i=null,l=r,u=!1;do{var c=l.expirationTime;c<W$?(u||(u=!0,s=a,i=o),c>Q$&&(Q$=c)):o=l.eagerReducer===e?l.eagerState:e(o,l.action),a=l,l=l.next}while(null!==l&&l!==r);u||(s=a,i=o),gV(o,t.memoizedState)||(DU=!0),t.memoizedState=o,t.baseUpdate=s,t.baseState=i,n.eagerReducer=e,n.eagerState=o}return[t.memoizedState,n.dispatch]}function hU(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===eU?(eU={lastEffect:null}).lastEffect=e.next=e:null===(t=eU.lastEffect)?eU.lastEffect=e.next=e:(n=t.next,t.next=e,e.next=n,eU.lastEffect=e),e}function pU(e,t,n,r){var i=uU();tU|=e,i.memoizedState=hU(t,n,void 0,void 0===r?null:r)}function mU(e,t,n,r){var i=cU();r=void 0===r?null:r;var o=void 0;if(null!==X$){var a=X$.memoizedState;if(o=a.destroy,null!==r&&aU(r,a.deps))return void hU(0,n,o,r)}tU|=e,i.memoizedState=hU(t,n,o,r)}function yU(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function gU(){}function vU(e,t,n){25>iU||Ez("301");var r=e.alternate;if(e===Y$||null!==r&&r===Y$)if(nU=!0,e={expirationTime:W$,action:n,eagerReducer:null,eagerState:null,next:null},null===rU&&(rU=new Map),void 0===(n=rU.get(t)))rU.set(t,e);else{for(t=n;null!==t.next;)t=t.next;t.next=e}else{JW();var i=DY(),o={expirationTime:i=rY(i,e),action:n,eagerReducer:null,eagerState:null,next:null},a=t.last;if(null===a)o.next=o;else{var s=a.next;null!==s&&(o.next=s),a.next=o}if(t.last=o,0===e.expirationTime&&(null===r||0===r.expirationTime)&&null!==(r=t.eagerReducer))try{var l=t.eagerState,u=r(l,n);if(o.eagerReducer=r,o.eagerState=u,gV(u,l))return}catch(e){}sY(e,i)}}var bU={readContext:ZU,useCallback:oU,useContext:oU,useEffect:oU,useImperativeHandle:oU,useLayoutEffect:oU,useMemo:oU,useReducer:oU,useRef:oU,useState:oU,useDebugValue:oU},xU={readContext:ZU,useCallback:function(e,t){return uU().memoizedState=[e,void 0===t?null:t],e},useContext:ZU,useEffect:function(e,t){return pU(516,192,e,t)},useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,pU(4,36,yU.bind(null,t,e),n)},useLayoutEffect:function(e,t){return pU(4,36,e,t)},useMemo:function(e,t){var n=uU();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=uU();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={last:null,dispatch:null,eagerReducer:e,eagerState:t}).dispatch=vU.bind(null,Y$,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},uU().memoizedState=e},useState:function(e){var t=uU();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={last:null,dispatch:null,eagerReducer:dU,eagerState:e}).dispatch=vU.bind(null,Y$,e),[t.memoizedState,e]},useDebugValue:gU},MU={readContext:ZU,useCallback:function(e,t){var n=cU();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&aU(t,r[1])?r[0]:(n.memoizedState=[e,t],e)},useContext:ZU,useEffect:function(e,t){return mU(516,192,e,t)},useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,mU(4,36,yU.bind(null,t,e),n)},useLayoutEffect:function(e,t){return mU(4,36,e,t)},useMemo:function(e,t){var n=cU();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&aU(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)},useReducer:fU,useRef:function(){return cU().memoizedState},useState:function(e){return fU(dU)},useDebugValue:gU},SU=null,wU=null,EU=!1;function kU(e,t){var n=c$(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function CU(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);case 13:default:return!1}}function OU(e){if(EU){var t=wU;if(t){var n=t;if(!CU(e,t)){if(!(t=VH(n))||!CU(e,t))return e.effectTag|=2,EU=!1,void(SU=e);kU(SU,n)}SU=e,wU=HH(t)}else e.effectTag|=2,EU=!1,SU=e}}function TU(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&18!==e.tag;)e=e.return;SU=e}function AU(e){if(e!==SU)return!1;if(!EU)return TU(e),EU=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!LH(t,e.memoizedProps))for(t=wU;t;)kU(e,t),t=VH(t);return TU(e),wU=SU?VH(e.stateNode):null,!0}function NU(){wU=SU=null,EU=!1}var qU=uB.ReactCurrentOwner,DU=!1;function RU(e,t,n,r){t.child=null===e?_$(t,null,n,r):I$(t,e.child,n,r)}function IU(e,t,n,r,i){n=n.render;var o=t.ref;return JU(t,i),r=sU(e,t,n,r,o,i),null===e||DU?(t.effectTag|=1,RU(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=i&&(e.expirationTime=0),HU(e,t,i))}function _U(e,t,n,r,i,o){if(null===e){var a=n.type;return"function"!=typeof a||d$(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=h$(n.type,null,r,null,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,PU(e,t,a,r,i,o))}return a=e.child,i<o&&(i=a.memoizedProps,(n=null!==(n=n.compare)?n:bV)(i,r)&&e.ref===t.ref)?HU(e,t,o):(t.effectTag|=1,(e=f$(a,r)).ref=t.ref,e.return=t,t.child=e)}function PU(e,t,n,r,i,o){return null!==e&&bV(e.memoizedProps,r)&&e.ref===t.ref&&(DU=!1,i<o)?HU(e,t,o):jU(e,t,n,r,o)}function LU(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function jU(e,t,n,r,i){var o=QH(n)?JH:GH.current;return o=ZH(t,o),JU(t,i),n=sU(e,t,n,r,o,i),null===e||DU?(t.effectTag|=1,RU(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=i&&(e.expirationTime=0),HU(e,t,i))}function zU(e,t,n,r,i){if(QH(n)){var o=!0;i$(t)}else o=!1;if(JU(t,i),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),O$(t,n,r),A$(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,u=n.contextType;"object"==typeof u&&null!==u?u=ZU(u):u=ZH(t,u=QH(n)?JH:GH.current);var c=n.getDerivedStateFromProps,d="function"==typeof c||"function"==typeof a.getSnapshotBeforeUpdate;d||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||l!==u)&&T$(t,a,r,u),tW=!1;var f=t.memoizedState;l=a.state=f;var h=t.updateQueue;null!==h&&(cW(t,h,r,a,i),l=t.memoizedState),s!==r||f!==l||KH.current||tW?("function"==typeof c&&(E$(t,n,c,r),l=t.memoizedState),(s=tW||C$(t,n,s,r,f,l,u))?(d||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.effectTag|=4)):("function"==typeof a.componentDidMount&&(t.effectTag|=4),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=u,r=s):("function"==typeof a.componentDidMount&&(t.effectTag|=4),r=!1)}else a=t.stateNode,s=t.memoizedProps,a.props=t.type===t.elementType?s:S$(t.type,s),l=a.context,"object"==typeof(u=n.contextType)&&null!==u?u=ZU(u):u=ZH(t,u=QH(n)?JH:GH.current),(d="function"==typeof(c=n.getDerivedStateFromProps)||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||l!==u)&&T$(t,a,r,u),tW=!1,l=t.memoizedState,f=a.state=l,null!==(h=t.updateQueue)&&(cW(t,h,r,a,i),f=t.memoizedState),s!==r||l!==f||KH.current||tW?("function"==typeof c&&(E$(t,n,c,r),f=t.memoizedState),(c=tW||C$(t,n,s,r,l,f,u))?(d||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,f,u),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,f,u)),"function"==typeof a.componentDidUpdate&&(t.effectTag|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=256),t.memoizedProps=r,t.memoizedState=f),a.props=r,a.state=f,a.context=u,r=c):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=256),r=!1);return FU(e,t,n,r,o,i)}function FU(e,t,n,r,i,o){LU(e,t);var a=0!=(64&t.effectTag);if(!r&&!a)return i&&o$(t,n,!1),HU(e,t,o);r=t.stateNode,qU.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.effectTag|=1,null!==e&&a?(t.child=I$(t,e.child,null,o),t.child=I$(t,null,s,o)):RU(e,t,s,o),t.memoizedState=r.state,i&&o$(t,n,!0),t.child}function BU(e){var t=e.stateNode;t.pendingContext?n$(0,t.pendingContext,t.pendingContext!==t.context):t.context&&n$(0,t.context,!1),B$(e,t.containerInfo)}function VU(e,t,n){var r=t.mode,i=t.pendingProps,o=t.memoizedState;if(0==(64&t.effectTag)){o=null;var a=!1}else o={timedOutAt:null!==o?o.timedOutAt:0},a=!0,t.effectTag&=-65;if(null===e)if(a){var s=i.fallback;e=p$(null,r,0,null),0==(1&t.mode)&&(e.child=null!==t.memoizedState?t.child.child:t.child),r=p$(s,r,n,null),e.sibling=r,(n=e).return=r.return=t}else n=r=_$(t,null,i.children,n);else null!==e.memoizedState?(s=(r=e.child).sibling,a?(n=i.fallback,i=f$(r,r.pendingProps),0==(1&t.mode)&&((a=null!==t.memoizedState?t.child.child:t.child)!==r.child&&(i.child=a)),r=i.sibling=f$(s,n,s.expirationTime),n=i,i.childExpirationTime=0,n.return=r.return=t):n=r=I$(t,r.child,i.children,n)):(s=e.child,a?(a=i.fallback,(i=p$(null,r,0,null)).child=s,0==(1&t.mode)&&(i.child=null!==t.memoizedState?t.child.child:t.child),(r=i.sibling=p$(a,r,n,null)).effectTag|=2,n=i,i.childExpirationTime=0,n.return=r.return=t):r=n=I$(t,s,i.children,n)),t.stateNode=e.stateNode;return t.memoizedState=o,t.child=n,r}function HU(e,t,n){if(null!==e&&(t.contextDependencies=e.contextDependencies),t.childExpirationTime<n)return null;if(null!==e&&t.child!==e.child&&Ez("153"),null!==t.child){for(n=f$(e=t.child,e.pendingProps,e.expirationTime),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=f$(e,e.pendingProps,e.expirationTime)).return=t;n.sibling=null}return t.child}function $U(e,t,n){var r=t.expirationTime;if(null!==e){if(e.memoizedProps!==t.pendingProps||KH.current)DU=!0;else if(r<n){switch(DU=!1,t.tag){case 3:BU(t),NU();break;case 5:H$(t);break;case 1:QH(t.type)&&i$(t);break;case 4:B$(t,t.stateNode.containerInfo);break;case 10:GU(t,t.memoizedProps.value);break;case 13:if(null!==t.memoizedState)return 0!==(r=t.child.childExpirationTime)&&r>=n?VU(e,t,n):null!==(t=HU(e,t,n))?t.sibling:null}return HU(e,t,n)}}else DU=!1;switch(t.expirationTime=0,t.tag){case 2:r=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps;var i=ZH(t,GH.current);if(JU(t,n),i=sU(null,t,r,e,i,n),t.effectTag|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof){if(t.tag=1,lU(),QH(r)){var o=!0;i$(t)}else o=!1;t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null;var a=r.getDerivedStateFromProps;"function"==typeof a&&E$(t,r,a,e),i.updater=k$,t.stateNode=i,i._reactInternalFiber=t,A$(t,r,e,n),t=FU(null,t,r,!0,o,n)}else t.tag=0,RU(null,t,i,n),t=t.child;return t;case 16:switch(i=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),o=t.pendingProps,e=function(e){var t=e._result;switch(e._status){case 1:return t;case 2:case 0:throw t;default:switch(e._status=0,(t=(t=e._ctor)()).then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)})),e._status){case 1:return e._result;case 2:throw e._result}throw e._result=t,t}}(i),t.type=e,i=t.tag=function(e){if("function"==typeof e)return d$(e)?1:0;if(null!=e){if((e=e.$$typeof)===xB)return 11;if(e===SB)return 14}return 2}(e),o=S$(e,o),a=void 0,i){case 0:a=jU(null,t,e,o,n);break;case 1:a=zU(null,t,e,o,n);break;case 11:a=IU(null,t,e,o,n);break;case 14:a=_U(null,t,e,S$(e.type,o),r,n);break;default:Ez("306",e,"")}return a;case 0:return r=t.type,i=t.pendingProps,jU(e,t,r,i=t.elementType===r?i:S$(r,i),n);case 1:return r=t.type,i=t.pendingProps,zU(e,t,r,i=t.elementType===r?i:S$(r,i),n);case 3:return BU(t),null===(r=t.updateQueue)&&Ez("282"),i=null!==(i=t.memoizedState)?i.element:null,cW(t,r,t.pendingProps,null,n),(r=t.memoizedState.element)===i?(NU(),t=HU(e,t,n)):(i=t.stateNode,(i=(null===e||null===e.child)&&i.hydrate)&&(wU=HH(t.stateNode.containerInfo),SU=t,i=EU=!0),i?(t.effectTag|=2,t.child=_$(t,null,r,n)):(RU(e,t,r,n),NU()),t=t.child),t;case 5:return H$(t),null===e&&OU(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,a=i.children,LH(r,i)?a=null:null!==o&&LH(r,o)&&(t.effectTag|=16),LU(e,t),1!==n&&1&t.mode&&i.hidden?(t.expirationTime=t.childExpirationTime=1,t=null):(RU(e,t,a,n),t=t.child),t;case 6:return null===e&&OU(t),null;case 13:return VU(e,t,n);case 4:return B$(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=I$(t,null,r,n):RU(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,IU(e,t,r,i=t.elementType===r?i:S$(r,i),n);case 7:return RU(e,t,t.pendingProps,n),t.child;case 8:case 12:return RU(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,a=t.memoizedProps,GU(t,o=i.value),null!==a){var s=a.value;if(0===(o=gV(s,o)?0:0|("function"==typeof r._calculateChangedBits?r._calculateChangedBits(s,o):1073741823))){if(a.children===i.children&&!KH.current){t=HU(e,t,n);break e}}else for(null!==(s=t.child)&&(s.return=t);null!==s;){var l=s.contextDependencies;if(null!==l){a=s.child;for(var u=l.first;null!==u;){if(u.context===r&&0!=(u.observedBits&o)){1===s.tag&&((u=iW(n)).tag=eW,aW(s,u)),s.expirationTime<n&&(s.expirationTime=n),null!==(u=s.alternate)&&u.expirationTime<n&&(u.expirationTime=n),u=n;for(var c=s.return;null!==c;){var d=c.alternate;if(c.childExpirationTime<u)c.childExpirationTime=u,null!==d&&d.childExpirationTime<u&&(d.childExpirationTime=u);else{if(!(null!==d&&d.childExpirationTime<u))break;d.childExpirationTime=u}c=c.return}l.expirationTime<n&&(l.expirationTime=n);break}u=u.next}}else a=10===s.tag&&s.type===t.type?null:s.child;if(null!==a)a.return=s;else for(a=s;null!==a;){if(a===t){a=null;break}if(null!==(s=a.sibling)){s.return=a.return,a=s;break}a=a.return}s=a}}RU(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=(o=t.pendingProps).children,JU(t,n),r=r(i=ZU(i,o.unstable_observedBits)),t.effectTag|=1,RU(e,t,r,n),t.child;case 14:return o=S$(i=t.type,t.pendingProps),_U(e,t,i,o=S$(i.type,o),r,n);case 15:return PU(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:S$(r,i),null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),t.tag=1,QH(r)?(e=!0,i$(t)):e=!1,JU(t,n),O$(t,r,i),A$(t,r,i,n),FU(null,t,r,!0,e,n)}Ez("156")}var UU={current:null},WU=null,YU=null,XU=null;function GU(e,t){var n=e.type._context;YH(UU,n._currentValue),n._currentValue=t}function KU(e){var t=UU.current;WH(UU),e.type._context._currentValue=t}function JU(e,t){WU=e,XU=YU=null;var n=e.contextDependencies;null!==n&&n.expirationTime>=t&&(DU=!0),e.contextDependencies=null}function ZU(e,t){return XU!==e&&!1!==t&&0!==t&&("number"==typeof t&&1073741823!==t||(XU=e,t=1073741823),t={context:e,observedBits:t,next:null},null===YU?(null===WU&&Ez("308"),YU=t,WU.contextDependencies={first:t,expirationTime:0}):YU=YU.next=t),e._currentValue}var QU=1,eW=2,tW=!1;function nW(e){return{baseState:e,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function rW(e){return{baseState:e.baseState,firstUpdate:e.firstUpdate,lastUpdate:e.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function iW(e){return{expirationTime:e,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function oW(e,t){null===e.lastUpdate?e.firstUpdate=e.lastUpdate=t:(e.lastUpdate.next=t,e.lastUpdate=t)}function aW(e,t){var n=e.alternate;if(null===n){var r=e.updateQueue,i=null;null===r&&(r=e.updateQueue=nW(e.memoizedState))}else r=e.updateQueue,i=n.updateQueue,null===r?null===i?(r=e.updateQueue=nW(e.memoizedState),i=n.updateQueue=nW(n.memoizedState)):r=e.updateQueue=rW(i):null===i&&(i=n.updateQueue=rW(r));null===i||r===i?oW(r,t):null===r.lastUpdate||null===i.lastUpdate?(oW(r,t),oW(i,t)):(oW(r,t),i.lastUpdate=t)}function sW(e,t){var n=e.updateQueue;null===(n=null===n?e.updateQueue=nW(e.memoizedState):lW(e,n)).lastCapturedUpdate?n.firstCapturedUpdate=n.lastCapturedUpdate=t:(n.lastCapturedUpdate.next=t,n.lastCapturedUpdate=t)}function lW(e,t){var n=e.alternate;return null!==n&&t===n.updateQueue&&(t=e.updateQueue=rW(t)),t}function uW(e,t,n,r,i,o){switch(n.tag){case QU:return"function"==typeof(e=n.payload)?e.call(o,r,i):e;case 3:e.effectTag=-2049&e.effectTag|64;case 0:if(null==(i="function"==typeof(e=n.payload)?e.call(o,r,i):e))break;return Mz({},r,i);case eW:tW=!0}return r}function cW(e,t,n,r,i){tW=!1;for(var o=(t=lW(e,t)).baseState,a=null,s=0,l=t.firstUpdate,u=o;null!==l;){var c=l.expirationTime;c<i?(null===a&&(a=l,o=u),s<c&&(s=c)):(u=uW(e,0,l,u,n,r),null!==l.callback&&(e.effectTag|=32,l.nextEffect=null,null===t.lastEffect?t.firstEffect=t.lastEffect=l:(t.lastEffect.nextEffect=l,t.lastEffect=l))),l=l.next}for(c=null,l=t.firstCapturedUpdate;null!==l;){var d=l.expirationTime;d<i?(null===c&&(c=l,null===a&&(o=u)),s<d&&(s=d)):(u=uW(e,0,l,u,n,r),null!==l.callback&&(e.effectTag|=32,l.nextEffect=null,null===t.lastCapturedEffect?t.firstCapturedEffect=t.lastCapturedEffect=l:(t.lastCapturedEffect.nextEffect=l,t.lastCapturedEffect=l))),l=l.next}null===a&&(t.lastUpdate=null),null===c?t.lastCapturedUpdate=null:e.effectTag|=32,null===a&&null===c&&(o=u),t.baseState=o,t.firstUpdate=a,t.firstCapturedUpdate=c,e.expirationTime=s,e.memoizedState=u}function dW(e,t,n){null!==t.firstCapturedUpdate&&(null!==t.lastUpdate&&(t.lastUpdate.next=t.firstCapturedUpdate,t.lastUpdate=t.lastCapturedUpdate),t.firstCapturedUpdate=t.lastCapturedUpdate=null),fW(t.firstEffect,n),t.firstEffect=t.lastEffect=null,fW(t.firstCapturedEffect,n),t.firstCapturedEffect=t.lastCapturedEffect=null}function fW(e,t){for(;null!==e;){var n=e.callback;if(null!==n){e.callback=null;var r=t;"function"!=typeof n&&Ez("191",n),n.call(r)}e=e.nextEffect}}function hW(e,t){return{value:e,source:t,stack:OB(t)}}function pW(e){e.effectTag|=4}var mW,yW,gW;mW=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},yW=function(e,t,n,r,i){var o=e.memoizedProps;if(o!==r){var a=t.stateNode;switch(F$(L$.current),e=null,n){case"input":o=jB(a,o),r=jB(a,r),e=[];break;case"option":o=fH(a,o),r=fH(a,r),e=[];break;case"select":o=Mz({},o,{value:void 0}),r=Mz({},r,{value:void 0}),e=[];break;case"textarea":o=pH(a,o),r=pH(a,r),e=[];break;default:"function"!=typeof o.onClick&&"function"==typeof r.onClick&&(a.onclick=RH)}NH(n,r),a=n=void 0;var s=null;for(n in o)if(!r.hasOwnProperty(n)&&o.hasOwnProperty(n)&&null!=o[n])if("style"===n){var l=o[n];for(a in l)l.hasOwnProperty(a)&&(s||(s={}),s[a]="")}else"dangerouslySetInnerHTML"!==n&&"children"!==n&&"suppressContentEditableWarning"!==n&&"suppressHydrationWarning"!==n&&"autoFocus"!==n&&(jz.hasOwnProperty(n)?e||(e=[]):(e=e||[]).push(n,null));for(n in r){var u=r[n];if(l=null!=o?o[n]:void 0,r.hasOwnProperty(n)&&u!==l&&(null!=u||null!=l))if("style"===n)if(l){for(a in l)!l.hasOwnProperty(a)||u&&u.hasOwnProperty(a)||(s||(s={}),s[a]="");for(a in u)u.hasOwnProperty(a)&&l[a]!==u[a]&&(s||(s={}),s[a]=u[a])}else s||(e||(e=[]),e.push(n,s)),s=u;else"dangerouslySetInnerHTML"===n?(u=u?u.__html:void 0,l=l?l.__html:void 0,null!=u&&l!==u&&(e=e||[]).push(n,""+u)):"children"===n?l===u||"string"!=typeof u&&"number"!=typeof u||(e=e||[]).push(n,""+u):"suppressContentEditableWarning"!==n&&"suppressHydrationWarning"!==n&&(jz.hasOwnProperty(n)?(null!=u&&DH(i,n),e||l===u||(e=[])):(e=e||[]).push(n,u))}s&&(e=e||[]).push("style",s),i=e,(t.updateQueue=i)&&pW(t)}},gW=function(e,t,n,r){n!==r&&pW(t)};var vW="function"==typeof WeakSet?WeakSet:Set;function bW(e,t){var n=t.source,r=t.stack;null===r&&null!==n&&(r=OB(n)),null!==n&&CB(n.type),t=t.value,null!==e&&1===e.tag&&CB(e.type);try{console.error(t)}catch(e){setTimeout((function(){throw e}))}}function xW(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){nY(e,t)}else t.current=null}function MW(e,t,n){if(null!==(n=null!==(n=n.updateQueue)?n.lastEffect:null)){var r=n=n.next;do{if(0!=(r.tag&e)){var i=r.destroy;r.destroy=void 0,void 0!==i&&i()}0!=(r.tag&t)&&(i=r.create,r.destroy=i()),r=r.next}while(r!==n)}}function SW(e){switch("function"==typeof s$&&s$(e),e.tag){case 0:case 11:case 14:case 15:var t=e.updateQueue;if(null!==t&&null!==(t=t.lastEffect)){var n=t=t.next;do{var r=n.destroy;if(void 0!==r){var i=e;try{r()}catch(e){nY(i,e)}}n=n.next}while(n!==t)}break;case 1:if(xW(e),"function"==typeof(t=e.stateNode).componentWillUnmount)try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(t){nY(e,t)}break;case 5:xW(e);break;case 4:kW(e)}}function wW(e){return 5===e.tag||3===e.tag||4===e.tag}function EW(e){e:{for(var t=e.return;null!==t;){if(wW(t)){var n=t;break e}t=t.return}Ez("160"),n=void 0}var r=t=void 0;switch(n.tag){case 5:t=n.stateNode,r=!1;break;case 3:case 4:t=n.stateNode.containerInfo,r=!0;break;default:Ez("161")}16&n.effectTag&&(EH(t,""),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||wW(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}for(var i=e;;){if(5===i.tag||6===i.tag)if(n)if(r){var o=t,a=i.stateNode,s=n;8===o.nodeType?o.parentNode.insertBefore(a,s):o.insertBefore(a,s)}else t.insertBefore(i.stateNode,n);else r?(a=t,s=i.stateNode,8===a.nodeType?(o=a.parentNode).insertBefore(s,a):(o=a).appendChild(s),null!=(a=a._reactRootContainer)||null!==o.onclick||(o.onclick=RH)):t.appendChild(i.stateNode);else if(4!==i.tag&&null!==i.child){i.child.return=i,i=i.child;continue}if(i===e)break;for(;null===i.sibling;){if(null===i.return||i.return===e)return;i=i.return}i.sibling.return=i.return,i=i.sibling}}function kW(e){for(var t=e,n=!1,r=void 0,i=void 0;;){if(!n){n=t.return;e:for(;;){switch(null===n&&Ez("160"),n.tag){case 5:r=n.stateNode,i=!1;break e;case 3:case 4:r=n.stateNode.containerInfo,i=!0;break e}n=n.return}n=!0}if(5===t.tag||6===t.tag){e:for(var o=t,a=o;;)if(SW(a),null!==a.child&&4!==a.tag)a.child.return=a,a=a.child;else{if(a===o)break;for(;null===a.sibling;){if(null===a.return||a.return===o)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}i?(o=r,a=t.stateNode,8===o.nodeType?o.parentNode.removeChild(a):o.removeChild(a)):r.removeChild(t.stateNode)}else if(4===t.tag){if(null!==t.child){r=t.stateNode.containerInfo,i=!0,t.child.return=t,t=t.child;continue}}else if(SW(t),null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return;4===(t=t.return).tag&&(n=!1)}t.sibling.return=t.return,t=t.sibling}}function CW(e,t){switch(t.tag){case 0:case 11:case 14:case 15:MW(4,8,t);break;case 1:break;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps;e=null!==e?e.memoizedProps:r;var i=t.type,o=t.updateQueue;t.updateQueue=null,null!==o&&function(e,t,n,r,i){e[Qz]=i,"input"===n&&"radio"===i.type&&null!=i.name&&FB(e,i),qH(n,r),r=qH(n,i);for(var o=0;o<t.length;o+=2){var a=t[o],s=t[o+1];"style"===a?TH(e,s):"dangerouslySetInnerHTML"===a?wH(e,s):"children"===a?EH(e,s):PB(e,a,s,r)}switch(n){case"input":BB(e,i);break;case"textarea":yH(e,i);break;case"select":t=e._wrapperState.wasMultiple,e._wrapperState.wasMultiple=!!i.multiple,null!=(n=i.value)?hH(e,!!i.multiple,n,!1):t!==!!i.multiple&&(null!=i.defaultValue?hH(e,!!i.multiple,i.defaultValue,!0):hH(e,!!i.multiple,i.multiple?[]:"",!1))}}(n,o,i,e,r)}break;case 6:null===t.stateNode&&Ez("162"),t.stateNode.nodeValue=t.memoizedProps;break;case 3:case 12:break;case 13:if(n=t.memoizedState,r=void 0,e=t,null===n?r=!1:(r=!0,e=t.child,0===n.timedOutAt&&(n.timedOutAt=DY())),null!==e&&function(e,t){for(var n=e;;){if(5===n.tag){var r=n.stateNode;if(t)r.style.display="none";else{r=n.stateNode;var i=n.memoizedProps.style;i=null!=i&&i.hasOwnProperty("display")?i.display:null,r.style.display=OH("display",i)}}else if(6===n.tag)n.stateNode.nodeValue=t?"":n.memoizedProps;else{if(13===n.tag&&null!==n.memoizedState){(r=n.child.sibling).return=n,n=r;continue}if(null!==n.child){n.child.return=n,n=n.child;continue}}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}(e,r),null!==(n=t.updateQueue)){t.updateQueue=null;var a=t.stateNode;null===a&&(a=t.stateNode=new vW),n.forEach((function(e){var n=oY.bind(null,t,e);a.has(e)||(a.add(e),e.then(n,n))}))}break;case 17:break;default:Ez("163")}}var OW="function"==typeof WeakMap?WeakMap:Map;function TW(e,t,n){(n=iW(n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){VY(r),bW(e,t)},n}function AW(e,t,n){(n=iW(n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return r(i)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===UW?UW=new Set([this]):UW.add(this));var n=t.value,i=t.stack;bW(e,t),this.componentDidCatch(n,{componentStack:null!==i?i:""})}),n}function NW(e){switch(e.tag){case 1:QH(e.type)&&e$();var t=e.effectTag;return 2048&t?(e.effectTag=-2049&t|64,e):null;case 3:return V$(),t$(),0!=(64&(t=e.effectTag))&&Ez("285"),e.effectTag=-2049&t|64,e;case 5:return $$(e),null;case 13:return 2048&(t=e.effectTag)?(e.effectTag=-2049&t|64,e):null;case 18:return null;case 4:return V$(),null;case 10:return KU(e),null;default:return null}}var qW=uB.ReactCurrentDispatcher,DW=uB.ReactCurrentOwner,RW=1073741822,IW=!1,_W=null,PW=null,LW=0,jW=-1,zW=!1,FW=null,BW=!1,VW=null,HW=null,$W=null,UW=null;function WW(){if(null!==_W)for(var e=_W.return;null!==e;){var t=e;switch(t.tag){case 1:var n=t.type.childContextTypes;null!=n&&e$();break;case 3:V$(),t$();break;case 5:$$(t);break;case 4:V$();break;case 10:KU(t)}e=e.return}PW=null,LW=0,jW=-1,zW=!1,_W=null}function YW(){for(;null!==FW;){var e=FW.effectTag;if(16&e&&EH(FW.stateNode,""),128&e){var t=FW.alternate;null!==t&&(null!==(t=t.ref)&&("function"==typeof t?t(null):t.current=null))}switch(14&e){case 2:EW(FW),FW.effectTag&=-3;break;case 6:EW(FW),FW.effectTag&=-3,CW(FW.alternate,FW);break;case 4:CW(FW.alternate,FW);break;case 8:kW(e=FW),e.return=null,e.child=null,e.memoizedState=null,e.updateQueue=null,null!==(e=e.alternate)&&(e.return=null,e.child=null,e.memoizedState=null,e.updateQueue=null)}FW=FW.nextEffect}}function XW(){for(;null!==FW;){if(256&FW.effectTag)e:{var e=FW.alternate,t=FW;switch(t.tag){case 0:case 11:case 15:MW(2,0,t);break e;case 1:if(256&t.effectTag&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:S$(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}break e;case 3:case 5:case 6:case 4:case 17:break e;default:Ez("163")}}FW=FW.nextEffect}}function GW(e,t){for(;null!==FW;){var n=FW.effectTag;if(36&n){var r=FW.alternate,i=FW,o=t;switch(i.tag){case 0:case 11:case 15:MW(16,32,i);break;case 1:var a=i.stateNode;if(4&i.effectTag)if(null===r)a.componentDidMount();else{var s=i.elementType===i.type?r.memoizedProps:S$(i.type,r.memoizedProps);a.componentDidUpdate(s,r.memoizedState,a.__reactInternalSnapshotBeforeUpdate)}null!==(r=i.updateQueue)&&dW(0,r,a);break;case 3:if(null!==(r=i.updateQueue)){if(a=null,null!==i.child)switch(i.child.tag){case 5:a=i.child.stateNode;break;case 1:a=i.child.stateNode}dW(0,r,a)}break;case 5:o=i.stateNode,null===r&&4&i.effectTag&&PH(i.type,i.memoizedProps)&&o.focus();break;case 6:case 4:case 12:case 13:case 17:break;default:Ez("163")}}128&n&&(null!==(i=FW.ref)&&(o=FW.stateNode,"function"==typeof i?i(o):i.current=o)),512&n&&(VW=e),FW=FW.nextEffect}}function KW(e,t){$W=HW=VW=null;var n=hY;hY=!0;do{if(512&t.effectTag){var r=!1,i=void 0;try{var o=t;MW(128,0,o),MW(0,64,o)}catch(e){r=!0,i=e}r&&nY(t,i)}t=t.nextEffect}while(null!==t);hY=n,0!==(n=e.expirationTime)&&RY(e,n),bY||hY||jY(1073741823,!1)}function JW(){null!==HW&&BH(HW),null!==$W&&$W()}function ZW(e,t){BW=IW=!0,e.current===t&&Ez("177");var n=e.pendingCommitExpirationTime;0===n&&Ez("261"),e.pendingCommitExpirationTime=0;var r=t.expirationTime,i=t.childExpirationTime;for(function(e,t){if(e.didError=!1,0===t)e.earliestPendingTime=0,e.latestPendingTime=0,e.earliestSuspendedTime=0,e.latestSuspendedTime=0,e.latestPingedTime=0;else{t<e.latestPingedTime&&(e.latestPingedTime=0);var n=e.latestPendingTime;0!==n&&(n>t?e.earliestPendingTime=e.latestPendingTime=0:e.earliestPendingTime>t&&(e.earliestPendingTime=e.latestPendingTime)),0===(n=e.earliestSuspendedTime)?v$(e,t):t<e.latestSuspendedTime?(e.earliestSuspendedTime=0,e.latestSuspendedTime=0,e.latestPingedTime=0,v$(e,t)):t>n&&v$(e,t)}M$(0,e)}(e,i>r?i:r),DW.current=null,r=void 0,1<t.effectTag?null!==t.lastEffect?(t.lastEffect.nextEffect=t,r=t.firstEffect):r=t:r=t.firstEffect,IH=VV,_H=function(){var e=tH();if(nH(e)){if("selectionStart"in e)var t={start:e.selectionStart,end:e.selectionEnd};else e:{var n=(t=(t=e.ownerDocument)&&t.defaultView||window).getSelection&&t.getSelection();if(n&&0!==n.rangeCount){t=n.anchorNode;var r=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{t.nodeType,i.nodeType}catch(e){t=null;break e}var o=0,a=-1,s=-1,l=0,u=0,c=e,d=null;t:for(;;){for(var f;c!==t||0!==r&&3!==c.nodeType||(a=o+r),c!==i||0!==n&&3!==c.nodeType||(s=o+n),3===c.nodeType&&(o+=c.nodeValue.length),null!==(f=c.firstChild);)d=c,c=f;for(;;){if(c===e)break t;if(d===t&&++l===r&&(a=o),d===i&&++u===n&&(s=o),null!==(f=c.nextSibling))break;d=(c=d).parentNode}c=f}t=-1===a||-1===s?null:{start:a,end:s}}else t=null}t=t||{start:0,end:0}}else t=null;return{focusedElem:e,selectionRange:t}}(),VV=!1,FW=r;null!==FW;){i=!1;var o=void 0;try{XW()}catch(e){i=!0,o=e}i&&(null===FW&&Ez("178"),nY(FW,o),null!==FW&&(FW=FW.nextEffect))}for(FW=r;null!==FW;){i=!1,o=void 0;try{YW()}catch(e){i=!0,o=e}i&&(null===FW&&Ez("178"),nY(FW,o),null!==FW&&(FW=FW.nextEffect))}for(rH(_H),_H=null,VV=!!IH,IH=null,e.current=t,FW=r;null!==FW;){i=!1,o=void 0;try{GW(e,n)}catch(e){i=!0,o=e}i&&(null===FW&&Ez("178"),nY(FW,o),null!==FW&&(FW=FW.nextEffect))}if(null!==r&&null!==VW){var a=KW.bind(null,e,r);HW=Sz.unstable_runWithPriority(Sz.unstable_NormalPriority,(function(){return FH(a)})),$W=a}IW=BW=!1,"function"==typeof a$&&a$(t.stateNode),n=t.expirationTime,0===(t=(t=t.childExpirationTime)>n?t:n)&&(UW=null),function(e,t){e.expirationTime=t,e.finishedWork=null}(e,t)}function QW(e){for(;;){var t=e.alternate,n=e.return,r=e.sibling;if(0==(1024&e.effectTag)){_W=e;e:{var i=t,o=LW,a=(t=e).pendingProps;switch(t.tag){case 2:case 16:break;case 15:case 0:break;case 1:QH(t.type)&&e$();break;case 3:V$(),t$(),(a=t.stateNode).pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),null!==i&&null!==i.child||(AU(t),t.effectTag&=-3);break;case 5:$$(t);var s=F$(z$.current);if(o=t.type,null!==i&&null!=t.stateNode)yW(i,t,o,a,s),i.ref!==t.ref&&(t.effectTag|=128);else if(a){var l=F$(L$.current);if(AU(t)){i=(a=t).stateNode;var u=a.type,c=a.memoizedProps,d=s;switch(i[Zz]=a,i[Qz]=c,o=void 0,s=u){case"iframe":case"object":HV("load",i);break;case"video":case"audio":for(u=0;u<xF.length;u++)HV(xF[u],i);break;case"source":HV("error",i);break;case"img":case"image":case"link":HV("error",i),HV("load",i);break;case"form":HV("reset",i),HV("submit",i);break;case"details":HV("toggle",i);break;case"input":zB(i,c),HV("invalid",i),DH(d,"onChange");break;case"select":i._wrapperState={wasMultiple:!!c.multiple},HV("invalid",i),DH(d,"onChange");break;case"textarea":mH(i,c),HV("invalid",i),DH(d,"onChange")}for(o in NH(s,c),u=null,c)c.hasOwnProperty(o)&&(l=c[o],"children"===o?"string"==typeof l?i.textContent!==l&&(u=["children",l]):"number"==typeof l&&i.textContent!==""+l&&(u=["children",""+l]):jz.hasOwnProperty(o)&&null!=l&&DH(d,o));switch(s){case"input":sB(i),VB(i,c,!0);break;case"textarea":sB(i),gH(i);break;case"select":case"option":break;default:"function"==typeof c.onClick&&(i.onclick=RH)}o=u,a.updateQueue=o,(a=null!==o)&&pW(t)}else{c=t,i=o,d=a,u=9===s.nodeType?s:s.ownerDocument,l===vH&&(l=xH(i)),l===vH?"script"===i?((i=u.createElement("div")).innerHTML="<script><\/script>",u=i.removeChild(i.firstChild)):"string"==typeof d.is?u=u.createElement(i,{is:d.is}):(u=u.createElement(i),"select"===i&&d.multiple&&(u.multiple=!0)):u=u.createElementNS(l,i),(i=u)[Zz]=c,i[Qz]=a,mW(i,t),d=i;var f=s,h=qH(u=o,c=a);switch(u){case"iframe":case"object":HV("load",d),s=c;break;case"video":case"audio":for(s=0;s<xF.length;s++)HV(xF[s],d);s=c;break;case"source":HV("error",d),s=c;break;case"img":case"image":case"link":HV("error",d),HV("load",d),s=c;break;case"form":HV("reset",d),HV("submit",d),s=c;break;case"details":HV("toggle",d),s=c;break;case"input":zB(d,c),s=jB(d,c),HV("invalid",d),DH(f,"onChange");break;case"option":s=fH(d,c);break;case"select":d._wrapperState={wasMultiple:!!c.multiple},s=Mz({},c,{value:void 0}),HV("invalid",d),DH(f,"onChange");break;case"textarea":mH(d,c),s=pH(d,c),HV("invalid",d),DH(f,"onChange");break;default:s=c}NH(u,s),l=void 0;var p=u,m=d,y=s;for(l in y)if(y.hasOwnProperty(l)){var g=y[l];"style"===l?TH(m,g):"dangerouslySetInnerHTML"===l?null!=(g=g?g.__html:void 0)&&wH(m,g):"children"===l?"string"==typeof g?("textarea"!==p||""!==g)&&EH(m,g):"number"==typeof g&&EH(m,""+g):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&(jz.hasOwnProperty(l)?null!=g&&DH(f,l):null!=g&&PB(m,l,g,h))}switch(u){case"input":sB(d),VB(d,c,!1);break;case"textarea":sB(d),gH(d);break;case"option":null!=c.value&&d.setAttribute("value",""+LB(c.value));break;case"select":(s=d).multiple=!!c.multiple,null!=(d=c.value)?hH(s,!!c.multiple,d,!1):null!=c.defaultValue&&hH(s,!!c.multiple,c.defaultValue,!0);break;default:"function"==typeof s.onClick&&(d.onclick=RH)}(a=PH(o,a))&&pW(t),t.stateNode=i}null!==t.ref&&(t.effectTag|=128)}else null===t.stateNode&&Ez("166");break;case 6:i&&null!=t.stateNode?gW(0,t,i.memoizedProps,a):("string"!=typeof a&&(null===t.stateNode&&Ez("166")),i=F$(z$.current),F$(L$.current),AU(t)?(o=(a=t).stateNode,i=a.memoizedProps,o[Zz]=a,(a=o.nodeValue!==i)&&pW(t)):(o=t,(a=(9===i.nodeType?i:i.ownerDocument).createTextNode(a))[Zz]=t,o.stateNode=a));break;case 11:break;case 13:if(a=t.memoizedState,0!=(64&t.effectTag)){t.expirationTime=o,_W=t;break e}a=null!==a,o=null!==i&&null!==i.memoizedState,null!==i&&!a&&o&&(null!==(i=i.child.sibling)&&(null!==(s=t.firstEffect)?(t.firstEffect=i,i.nextEffect=s):(t.firstEffect=t.lastEffect=i,i.nextEffect=null),i.effectTag=8)),(a||o)&&(t.effectTag|=4);break;case 7:case 8:case 12:break;case 4:V$();break;case 10:KU(t);break;case 9:case 14:break;case 17:QH(t.type)&&e$();break;case 18:break;default:Ez("156")}_W=null}if(t=e,1===LW||1!==t.childExpirationTime){for(a=0,o=t.child;null!==o;)(i=o.expirationTime)>a&&(a=i),(s=o.childExpirationTime)>a&&(a=s),o=o.sibling;t.childExpirationTime=a}if(null!==_W)return _W;null!==n&&0==(1024&n.effectTag)&&(null===n.firstEffect&&(n.firstEffect=e.firstEffect),null!==e.lastEffect&&(null!==n.lastEffect&&(n.lastEffect.nextEffect=e.firstEffect),n.lastEffect=e.lastEffect),1<e.effectTag&&(null!==n.lastEffect?n.lastEffect.nextEffect=e:n.firstEffect=e,n.lastEffect=e))}else{if(null!==(e=NW(e)))return e.effectTag&=1023,e;null!==n&&(n.firstEffect=n.lastEffect=null,n.effectTag|=1024)}if(null!==r)return r;if(null===n)break;e=n}return null}function eY(e){var t=$U(e.alternate,e,LW);return e.memoizedProps=e.pendingProps,null===t&&(t=QW(e)),DW.current=null,t}function tY(e,t){IW&&Ez("243"),JW(),IW=!0;var n=qW.current;qW.current=bU;var r=e.nextExpirationTimeToWorkOn;r===LW&&e===PW&&null!==_W||(WW(),LW=r,_W=f$((PW=e).current,null),e.pendingCommitExpirationTime=0);for(var i=!1;;){try{if(t)for(;null!==_W&&!PY();)_W=eY(_W);else for(;null!==_W;)_W=eY(_W)}catch(t){if(XU=YU=WU=null,lU(),null===_W)i=!0,VY(t);else{null===_W&&Ez("271");var o=_W,a=o.return;if(null!==a){e:{var s=e,l=a,u=o,c=t;if(a=LW,u.effectTag|=1024,u.firstEffect=u.lastEffect=null,null!==c&&"object"==typeof c&&"function"==typeof c.then){var d=c;c=l;var f=-1,h=-1;do{if(13===c.tag){var p=c.alternate;if(null!==p&&null!==(p=p.memoizedState)){h=10*(1073741822-p.timedOutAt);break}"number"==typeof(p=c.pendingProps.maxDuration)&&(0>=p?f=0:(-1===f||p<f)&&(f=p))}c=c.return}while(null!==c);c=l;do{if((p=13===c.tag)&&(p=void 0!==c.memoizedProps.fallback&&null===c.memoizedState),p){if(null===(l=c.updateQueue)?((l=new Set).add(d),c.updateQueue=l):l.add(d),0==(1&c.mode)){c.effectTag|=64,u.effectTag&=-1957,1===u.tag&&(null===u.alternate?u.tag=17:((a=iW(1073741823)).tag=eW,aW(u,a))),u.expirationTime=1073741823;break e}l=a;var m=(u=s).pingCache;null===m?(m=u.pingCache=new OW,p=new Set,m.set(d,p)):void 0===(p=m.get(d))&&(p=new Set,m.set(d,p)),p.has(l)||(p.add(l),u=iY.bind(null,u,d,l),d.then(u,u)),-1===f?s=1073741823:(-1===h&&(h=10*(1073741822-x$(s,a))-5e3),s=h+f),0<=s&&jW<s&&(jW=s),c.effectTag|=2048,c.expirationTime=a;break e}c=c.return}while(null!==c);c=Error((CB(u.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+OB(u))}zW=!0,c=hW(c,u),s=l;do{switch(s.tag){case 3:s.effectTag|=2048,s.expirationTime=a,sW(s,a=TW(s,c,a));break e;case 1:if(f=c,h=s.type,u=s.stateNode,0==(64&s.effectTag)&&("function"==typeof h.getDerivedStateFromError||null!==u&&"function"==typeof u.componentDidCatch&&(null===UW||!UW.has(u)))){s.effectTag|=2048,s.expirationTime=a,sW(s,a=AW(s,f,a));break e}}s=s.return}while(null!==s)}_W=QW(o);continue}i=!0,VY(t)}}break}if(IW=!1,qW.current=n,XU=YU=WU=null,lU(),i)PW=null,e.finishedWork=null;else if(null!==_W)e.finishedWork=null;else{if(null===(n=e.current.alternate)&&Ez("281"),PW=null,zW){if(i=e.latestPendingTime,o=e.latestSuspendedTime,a=e.latestPingedTime,0!==i&&i<r||0!==o&&o<r||0!==a&&a<r)return b$(e,r),void NY(e,n,r,e.expirationTime,-1);if(!e.didError&&t)return e.didError=!0,r=e.nextExpirationTimeToWorkOn=r,t=e.expirationTime=1073741823,void NY(e,n,r,t,-1)}t&&-1!==jW?(b$(e,r),(t=10*(1073741822-x$(e,r)))<jW&&(jW=t),t=10*(1073741822-DY()),t=jW-t,NY(e,n,r,e.expirationTime,0>t?0:t)):(e.pendingCommitExpirationTime=r,e.finishedWork=n)}}function nY(e,t){for(var n=e.return;null!==n;){switch(n.tag){case 1:var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===UW||!UW.has(r)))return aW(n,e=AW(n,e=hW(t,e),1073741823)),void sY(n,1073741823);break;case 3:return aW(n,e=TW(n,e=hW(t,e),1073741823)),void sY(n,1073741823)}n=n.return}3===e.tag&&(aW(e,n=TW(e,n=hW(t,e),1073741823)),sY(e,1073741823))}function rY(e,t){var n=Sz.unstable_getCurrentPriorityLevel(),r=void 0;if(0==(1&t.mode))r=1073741823;else if(IW&&!BW)r=LW;else{switch(n){case Sz.unstable_ImmediatePriority:r=1073741823;break;case Sz.unstable_UserBlockingPriority:r=1073741822-10*(1+((1073741822-e+15)/10|0));break;case Sz.unstable_NormalPriority:r=1073741822-25*(1+((1073741822-e+500)/25|0));break;case Sz.unstable_LowPriority:case Sz.unstable_IdlePriority:r=1;break;default:Ez("313")}null!==PW&&r===LW&&--r}return n===Sz.unstable_UserBlockingPriority&&(0===yY||r<yY)&&(yY=r),r}function iY(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),null!==PW&&LW===n?PW=null:(t=e.earliestSuspendedTime,r=e.latestSuspendedTime,0!==t&&n<=t&&n>=r&&(e.didError=!1,(0===(t=e.latestPingedTime)||t>n)&&(e.latestPingedTime=n),M$(n,e),0!==(n=e.expirationTime)&&RY(e,n)))}function oY(e,t){var n=e.stateNode;null!==n&&n.delete(t),null!==(e=aY(e,t=rY(t=DY(),e)))&&(v$(e,t),0!==(t=e.expirationTime)&&RY(e,t))}function aY(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t);var r=e.return,i=null;if(null===r&&3===e.tag)i=e.stateNode;else for(;null!==r;){if(n=r.alternate,r.childExpirationTime<t&&(r.childExpirationTime=t),null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t),null===r.return&&3===r.tag){i=r.stateNode;break}r=r.return}return i}function sY(e,t){null!==(e=aY(e,t))&&(!IW&&0!==LW&&t>LW&&WW(),v$(e,t),IW&&!BW&&PW===e||RY(e,e.expirationTime),CY>kY&&(CY=0,Ez("185")))}function lY(e,t,n,r,i){return Sz.unstable_runWithPriority(Sz.unstable_ImmediatePriority,(function(){return e(t,n,r,i)}))}var uY=null,cY=null,dY=0,fY=void 0,hY=!1,pY=null,mY=0,yY=0,gY=!1,vY=null,bY=!1,xY=!1,MY=null,SY=Sz.unstable_now(),wY=1073741822-(SY/10|0),EY=wY,kY=50,CY=0,OY=null;function TY(){wY=1073741822-((Sz.unstable_now()-SY)/10|0)}function AY(e,t){if(0!==dY){if(t<dY)return;null!==fY&&Sz.unstable_cancelCallback(fY)}dY=t,e=Sz.unstable_now()-SY,fY=Sz.unstable_scheduleCallback(LY,{timeout:10*(1073741822-t)-e})}function NY(e,t,n,r,i){e.expirationTime=r,0!==i||PY()?0<i&&(e.timeoutHandle=jH(qY.bind(null,e,t,n),i)):(e.pendingCommitExpirationTime=n,e.finishedWork=t)}function qY(e,t,n){e.pendingCommitExpirationTime=n,e.finishedWork=t,TY(),EY=wY,zY(e,n)}function DY(){return hY||(IY(),0!==mY&&1!==mY||(TY(),EY=wY)),EY}function RY(e,t){null===e.nextScheduledRoot?(e.expirationTime=t,null===cY?(uY=cY=e,e.nextScheduledRoot=e):(cY=cY.nextScheduledRoot=e).nextScheduledRoot=uY):t>e.expirationTime&&(e.expirationTime=t),hY||(bY?xY&&(pY=e,mY=1073741823,FY(e,1073741823,!1)):1073741823===t?jY(1073741823,!1):AY(e,t))}function IY(){var e=0,t=null;if(null!==cY)for(var n=cY,r=uY;null!==r;){var i=r.expirationTime;if(0===i){if((null===n||null===cY)&&Ez("244"),r===r.nextScheduledRoot){uY=cY=r.nextScheduledRoot=null;break}if(r===uY)uY=i=r.nextScheduledRoot,cY.nextScheduledRoot=i,r.nextScheduledRoot=null;else{if(r===cY){(cY=n).nextScheduledRoot=uY,r.nextScheduledRoot=null;break}n.nextScheduledRoot=r.nextScheduledRoot,r.nextScheduledRoot=null}r=n.nextScheduledRoot}else{if(i>e&&(e=i,t=r),r===cY)break;if(1073741823===e)break;n=r,r=r.nextScheduledRoot}}pY=t,mY=e}var _Y=!1;function PY(){return!!_Y||!!Sz.unstable_shouldYield()&&(_Y=!0)}function LY(){try{if(!PY()&&null!==uY){TY();var e=uY;do{var t=e.expirationTime;0!==t&&wY<=t&&(e.nextExpirationTimeToWorkOn=wY),e=e.nextScheduledRoot}while(e!==uY)}jY(0,!0)}finally{_Y=!1}}function jY(e,t){if(IY(),t)for(TY(),EY=wY;null!==pY&&0!==mY&&e<=mY&&!(_Y&&wY>mY);)FY(pY,mY,wY>mY),IY(),TY(),EY=wY;else for(;null!==pY&&0!==mY&&e<=mY;)FY(pY,mY,!1),IY();if(t&&(dY=0,fY=null),0!==mY&&AY(pY,mY),CY=0,OY=null,null!==MY)for(e=MY,MY=null,t=0;t<e.length;t++){var n=e[t];try{n._onComplete()}catch(e){gY||(gY=!0,vY=e)}}if(gY)throw e=vY,vY=null,gY=!1,e}function zY(e,t){hY&&Ez("253"),pY=e,mY=t,FY(e,t,!1),jY(1073741823,!1)}function FY(e,t,n){if(hY&&Ez("245"),hY=!0,n){var r=e.finishedWork;null!==r?BY(e,r,t):(e.finishedWork=null,-1!==(r=e.timeoutHandle)&&(e.timeoutHandle=-1,zH(r)),tY(e,n),null!==(r=e.finishedWork)&&(PY()?e.finishedWork=r:BY(e,r,t)))}else null!==(r=e.finishedWork)?BY(e,r,t):(e.finishedWork=null,-1!==(r=e.timeoutHandle)&&(e.timeoutHandle=-1,zH(r)),tY(e,n),null!==(r=e.finishedWork)&&BY(e,r,t));hY=!1}function BY(e,t,n){var r=e.firstBatch;if(null!==r&&r._expirationTime>=n&&(null===MY?MY=[r]:MY.push(r),r._defer))return e.finishedWork=t,void(e.expirationTime=0);e.finishedWork=null,e===OY?CY++:(OY=e,CY=0),Sz.unstable_runWithPriority(Sz.unstable_ImmediatePriority,(function(){ZW(e,t)}))}function VY(e){null===pY&&Ez("246"),pY.expirationTime=0,gY||(gY=!0,vY=e)}function HY(e,t){var n=bY;bY=!0;try{return e(t)}finally{(bY=n)||hY||jY(1073741823,!1)}}function $Y(e,t){if(bY&&!xY){xY=!0;try{return e(t)}finally{xY=!1}}return e(t)}function UY(e,t,n){bY||hY||0===yY||(jY(yY,!1),yY=0);var r=bY;bY=!0;try{return Sz.unstable_runWithPriority(Sz.unstable_UserBlockingPriority,(function(){return e(t,n)}))}finally{(bY=r)||hY||jY(1073741823,!1)}}function WY(e,t,n,r,i){var o=t.current;e:if(n){t:{2===xV(n=n._reactInternalFiber)&&1===n.tag||Ez("170");var a=n;do{switch(a.tag){case 3:a=a.stateNode.context;break t;case 1:if(QH(a.type)){a=a.stateNode.__reactInternalMemoizedMergedChildContext;break t}}a=a.return}while(null!==a);Ez("171"),a=void 0}if(1===n.tag){var s=n.type;if(QH(s)){n=r$(n,s,a);break e}}n=a}else n=XH;return null===t.context?t.context=n:t.pendingContext=n,t=i,(i=iW(r)).payload={element:e},null!==(t=void 0===t?null:t)&&(i.callback=t),JW(),aW(o,i),sY(o,r),r}function YY(e,t,n,r){var i=t.current;return WY(e,t,n,i=rY(DY(),i),r)}function XY(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function GY(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:hB,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function KY(e){var t=1073741822-25*(1+((1073741822-DY()+500)/25|0));t>=RW&&(t=RW-1),this._expirationTime=RW=t,this._root=e,this._callbacks=this._next=null,this._hasChildren=this._didComplete=!1,this._children=null,this._defer=!0}function JY(){this._callbacks=null,this._didCommit=!1,this._onCommit=this._onCommit.bind(this)}function ZY(e,t,n){e={current:t=c$(3,null,null,t?3:0),containerInfo:e,pendingChildren:null,pingCache:null,earliestPendingTime:0,latestPendingTime:0,earliestSuspendedTime:0,latestSuspendedTime:0,latestPingedTime:0,didError:!1,pendingCommitExpirationTime:0,finishedWork:null,timeoutHandle:-1,context:null,pendingContext:null,hydrate:n,nextExpirationTimeToWorkOn:0,expirationTime:0,firstBatch:null,nextScheduledRoot:null},this._internalRoot=t.stateNode=e}function QY(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function eX(e,t,n,r,i){var o=n._reactRootContainer;if(o){if("function"==typeof i){var a=i;i=function(){var e=XY(o._internalRoot);a.call(e)}}null!=e?o.legacy_renderSubtreeIntoContainer(e,t,i):o.render(t,i)}else{if(o=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new ZY(e,!1,t)}(n,r),"function"==typeof i){var s=i;i=function(){var e=XY(o._internalRoot);s.call(e)}}$Y((function(){null!=e?o.legacy_renderSubtreeIntoContainer(e,t,i):o.render(t,i)}))}return XY(o._internalRoot)}function tX(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;return QY(t)||Ez("200"),GY(e,t,null,n)}UF=function(e,t,n){switch(t){case"input":if(BB(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=rF(r);i||Ez("90"),lB(r),BB(r,i)}}}break;case"textarea":yH(e,n);break;case"select":null!=(t=n.value)&&hH(e,!!n.multiple,t,!1)}},KY.prototype.render=function(e){this._defer||Ez("250"),this._hasChildren=!0,this._children=e;var t=this._root._internalRoot,n=this._expirationTime,r=new JY;return WY(e,t,null,n,r._onCommit),r},KY.prototype.then=function(e){if(this._didComplete)e();else{var t=this._callbacks;null===t&&(t=this._callbacks=[]),t.push(e)}},KY.prototype.commit=function(){var e=this._root._internalRoot,t=e.firstBatch;if(this._defer&&null!==t||Ez("251"),this._hasChildren){var n=this._expirationTime;if(t!==this){this._hasChildren&&(n=this._expirationTime=t._expirationTime,this.render(this._children));for(var r=null,i=t;i!==this;)r=i,i=i._next;null===r&&Ez("251"),r._next=i._next,this._next=t,e.firstBatch=this}this._defer=!1,zY(e,n),t=this._next,this._next=null,null!==(t=e.firstBatch=t)&&t._hasChildren&&t.render(t._children)}else this._next=null,this._defer=!1},KY.prototype._onComplete=function(){if(!this._didComplete){this._didComplete=!0;var e=this._callbacks;if(null!==e)for(var t=0;t<e.length;t++)(0,e[t])()}},JY.prototype.then=function(e){if(this._didCommit)e();else{var t=this._callbacks;null===t&&(t=this._callbacks=[]),t.push(e)}},JY.prototype._onCommit=function(){if(!this._didCommit){this._didCommit=!0;var e=this._callbacks;if(null!==e)for(var t=0;t<e.length;t++){var n=e[t];"function"!=typeof n&&Ez("191",n),n()}}},ZY.prototype.render=function(e,t){var n=this._internalRoot,r=new JY;return null!==(t=void 0===t?null:t)&&r.then(t),YY(e,n,null,r._onCommit),r},ZY.prototype.unmount=function(e){var t=this._internalRoot,n=new JY;return null!==(e=void 0===e?null:e)&&n.then(e),YY(null,t,null,n._onCommit),n},ZY.prototype.legacy_renderSubtreeIntoContainer=function(e,t,n){var r=this._internalRoot,i=new JY;return null!==(n=void 0===n?null:n)&&i.then(n),YY(t,r,e,i._onCommit),i},ZY.prototype.createBatch=function(){var e=new KY(this),t=e._expirationTime,n=this._internalRoot,r=n.firstBatch;if(null===r)n.firstBatch=e,e._next=null;else{for(n=null;null!==r&&r._expirationTime>=t;)n=r,r=r._next;e._next=r,null!==n&&(n._next=e)}return e},JF=HY,ZF=UY,QF=function(){hY||0===yY||(jY(yY,!1),yY=0)};var nX={createPortal:tX,findDOMNode:function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternalFiber;return void 0===t&&("function"==typeof e.render?Ez("188"):Ez("268",Object.keys(e))),e=null===(e=SV(t))?null:e.stateNode},hydrate:function(e,t,n){return QY(t)||Ez("200"),eX(null,e,t,!0,n)},render:function(e,t,n){return QY(t)||Ez("200"),eX(null,e,t,!1,n)},unstable_renderSubtreeIntoContainer:function(e,t,n,r){return QY(n)||Ez("200"),(null==e||void 0===e._reactInternalFiber)&&Ez("38"),eX(e,t,n,!1,r)},unmountComponentAtNode:function(e){return QY(e)||Ez("40"),!!e._reactRootContainer&&($Y((function(){eX(null,null,e,!1,(function(){e._reactRootContainer=null}))})),!0)},unstable_createPortal:function(){return tX.apply(void 0,arguments)},unstable_batchedUpdates:HY,unstable_interactiveUpdates:UY,flushSync:function(e,t){hY&&Ez("187");var n=bY;bY=!0;try{return lY(e,t)}finally{bY=n,jY(1073741823,!1)}},unstable_createRoot:function(e,t){return QY(e)||Ez("299","unstable_createRoot"),new ZY(e,!0,null!=t&&!0===t.hydrate)},unstable_flushControlled:function(e){var t=bY;bY=!0;try{lY(e)}finally{(bY=t)||hY||jY(1073741823,!1)}},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{Events:[tF,nF,rF,Xz.injectEventPluginsByName,Lz,uF,function(e){Uz(e,lF)},GF,KF,WV,Kz]}};!function(e){var t=e.findFiberByHostInstance;(function(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);a$=l$((function(e){return t.onCommitFiberRoot(n,e)})),s$=l$((function(e){return t.onCommitFiberUnmount(n,e)}))}catch(e){}})(Mz({},e,{overrideProps:null,currentDispatcherRef:uB.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=SV(e))?null:e.stateNode},findFiberByHostInstance:function(e){return t?t(e):null}}))}({findFiberByHostInstance:eF,bundleType:0,version:"16.8.4",rendererPackageName:"react-dom"});var rX={default:nX},iX=rX&&nX||rX,oX=iX.default||iX;!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),gz.exports=oX;var aX=gz.exports,sX=!1,lX=wI.createContext(null),uX="unmounted",cX="exited",dX="entering",fX="entered",hX="exiting",pX=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,o=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(i=cX,r.appearStatus=dX):i=fX:i=t.unmountOnExit||t.mountOnEnter?uX:cX,r.state={status:i},r.nextCallback=null,r}yz(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===uX?{status:cX}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==dX&&n!==fX&&(t=dX):n!==dX&&n!==fX||(t=hX)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t){this.cancelNextCallback();var n=aX.findDOMNode(this);t===dX?this.performEnter(n,e):this.performExit(n)}else this.props.unmountOnExit&&this.state.status===cX&&this.setState({status:uX})},n.performEnter=function(e,t){var n=this,r=this.props.enter,i=this.context?this.context.isMounting:t,o=this.getTimeouts(),a=i?o.appear:o.enter;!t&&!r||sX?this.safeSetState({status:fX},(function(){n.props.onEntered(e)})):(this.props.onEnter(e,i),this.safeSetState({status:dX},(function(){n.props.onEntering(e,i),n.onTransitionEnd(e,a,(function(){n.safeSetState({status:fX},(function(){n.props.onEntered(e,i)}))}))})))},n.performExit=function(e){var t=this,n=this.props.exit,r=this.getTimeouts();n&&!sX?(this.props.onExit(e),this.safeSetState({status:hX},(function(){t.props.onExiting(e),t.onTransitionEnd(e,r.exit,(function(){t.safeSetState({status:cX},(function(){t.props.onExited(e)}))}))}))):this.safeSetState({status:cX},(function(){t.props.onExited(e)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t,n){this.setNextCallback(n);var r=null==t&&!this.props.addEndListener;e&&!r?(this.props.addEndListener&&this.props.addEndListener(e,this.nextCallback),null!=t&&setTimeout(this.nextCallback,t)):setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===uX)return null;var t=this.props,n=t.children,r=mz(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"==typeof n)return wI.createElement(lX.Provider,{value:null},n(e,r));var i=wI.Children.only(n);return wI.createElement(lX.Provider,{value:null},wI.cloneElement(i,r))},t}(wI.Component);function mX(){}pX.contextType=lX,pX.propTypes={},pX.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:mX,onEntering:mX,onEntered:mX,onExit:mX,onExiting:mX,onExited:mX},pX.UNMOUNTED=0,pX.EXITED=1,pX.ENTERING=2,pX.ENTERED=3,pX.EXITING=4;var yX=pX;function gX(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vX(e,t){var n=Object.create(null);return e&&OR.exports.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&OR.exports.isValidElement(e)?t(e):e}(e)})),n}function bX(e,t,n){return null!=n[t]?n[t]:e.props[t]}function xX(e,t,n){var r=vX(e.children),i=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),o=[];for(var a in e)a in t?o.length&&(i[a]=o,o=[]):o.push(a);var s={};for(var l in t){if(i[l])for(r=0;r<i[l].length;r++){var u=i[l][r];s[i[l][r]]=n(u)}s[l]=n(l)}for(r=0;r<o.length;r++)s[o[r]]=n(o[r]);return s}(t,r);return Object.keys(i).forEach((function(o){var a=i[o];if(OR.exports.isValidElement(a)){var s=o in t,l=o in r,u=t[o],c=OR.exports.isValidElement(u)&&!u.props.in;!l||s&&!c?l||!s||c?l&&s&&OR.exports.isValidElement(u)&&(i[o]=OR.exports.cloneElement(a,{onExited:n.bind(null,a),in:u.props.in,exit:bX(a,"exit",e),enter:bX(a,"enter",e)})):i[o]=OR.exports.cloneElement(a,{in:!1}):i[o]=OR.exports.cloneElement(a,{onExited:n.bind(null,a),in:!0,exit:bX(a,"exit",e),enter:bX(a,"enter",e)})}})),i}var MX=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},SX=function(e){function t(t,n){var r,i=(r=e.call(this,t,n)||this).handleExited.bind(gX(gX(r)));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}yz(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,r,i=t.children,o=t.handleExited;return{children:t.firstRender?(n=e,r=o,vX(n.children,(function(e){return OR.exports.cloneElement(e,{onExited:r.bind(null,e),in:!0,appear:bX(e,"appear",n),enter:bX(e,"enter",n),exit:bX(e,"exit",n)})}))):xX(e,i,o),firstRender:!1}},n.handleExited=function(e,t){var n=vX(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=pz({},t.children);return delete n[e.key],{children:n}})))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=mz(e,["component","childFactory"]),i=this.state.contextValue,o=MX(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?wI.createElement(lX.Provider,{value:i},o):wI.createElement(lX.Provider,{value:i},wI.createElement(t,r,o))},t}(wI.Component);SX.propTypes={},SX.defaultProps={component:"div",childFactory:function(e){return e}};var wX=SX;function EX(e,t){var n=e.timeout,r=e.style,i=void 0===r?{}:r;return{duration:i.transitionDuration||"number"==typeof n?n:n[t.mode]||0,delay:i.transitionDelay}}function kX(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function CX(e,t){return wI.useMemo((function(){return null==e&&null==t?null:function(n){kX(e,n),kX(t,n)}}),[e,t])}var OX="undefined"!=typeof window?wI.useLayoutEffect:wI.useEffect;function TX(e){var t=wI.useRef(e);return OX((function(){t.current=e})),wI.useCallback((function(e){return(0,t.current)(e)}),[])}var AX="undefined"!=typeof window?wI.useLayoutEffect:wI.useEffect;function NX(e){var t=e.children,n=e.defer,r=void 0!==n&&n,i=e.fallback,o=void 0===i?null:i,a=wI.useState(!1),s=a[0],l=a[1];return AX((function(){r||l(!0)}),[r]),wI.useEffect((function(){r&&l(!0)}),[r]),wI.createElement(wI.Fragment,null,s?t:o)}var qX=!0,DX=!1,RX=null,IX={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function _X(e){e.metaKey||e.altKey||e.ctrlKey||(qX=!0)}function PX(){qX=!1}function LX(){"hidden"===this.visibilityState&&DX&&(qX=!0)}function jX(e){var t=e.target;try{return t.matches(":focus-visible")}catch(e){}return qX||function(e){var t=e.type,n=e.tagName;return!("INPUT"!==n||!IX[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}function zX(){DX=!0,window.clearTimeout(RX),RX=window.setTimeout((function(){DX=!1}),100)}function FX(){return{isFocusVisible:jX,onBlurVisible:zX,ref:wI.useCallback((function(e){var t=aX.findDOMNode(e);null!=t&&function(e){e.addEventListener("keydown",_X,!0),e.addEventListener("mousedown",PX,!0),e.addEventListener("pointerdown",PX,!0),e.addEventListener("touchstart",PX,!0),e.addEventListener("visibilitychange",LX,!0)}(t.ownerDocument)}),[])}}function BX(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var VX="undefined"==typeof window?wI.useEffect:wI.useLayoutEffect;function HX(e){var t=e.classes,n=e.pulsate,r=void 0!==n&&n,i=e.rippleX,o=e.rippleY,a=e.rippleSize,s=e.in,l=e.onExited,u=void 0===l?function(){}:l,c=e.timeout,d=wI.useState(!1),f=d[0],h=d[1],p=Yj(t.ripple,t.rippleVisible,r&&t.ripplePulsate),m={width:a,height:a,top:-a/2+o,left:-a/2+i},y=Yj(t.child,f&&t.childLeaving,r&&t.childPulsate),g=TX(u);return VX((function(){if(!s){h(!0);var e=setTimeout(g,c);return function(){clearTimeout(e)}}}),[g,s,c]),wI.createElement("span",{className:p,style:m},wI.createElement("span",{className:y}))}var $X=wI.forwardRef((function(e,t){var n=e.center,r=void 0!==n&&n,i=e.classes,o=e.className,a=FI(e,["center","classes","className"]),s=wI.useState([]),l=s[0],u=s[1],c=wI.useRef(0),d=wI.useRef(null);wI.useEffect((function(){d.current&&(d.current(),d.current=null)}),[l]);var f=wI.useRef(!1),h=wI.useRef(null),p=wI.useRef(null),m=wI.useRef(null);wI.useEffect((function(){return function(){clearTimeout(h.current)}}),[]);var y=wI.useCallback((function(e){var t=e.pulsate,n=e.rippleX,r=e.rippleY,o=e.rippleSize,a=e.cb;u((function(e){return[].concat(BX(e),[wI.createElement(HX,{key:c.current,classes:i,timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:o})])})),c.current+=1,d.current=a}),[i]),g=wI.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,i=t.pulsate,o=void 0!==i&&i,a=t.center,s=void 0===a?r||t.pulsate:a,l=t.fakeElement,u=void 0!==l&&l;if("mousedown"===e.type&&f.current)f.current=!1;else{"touchstart"===e.type&&(f.current=!0);var c,d,g,v=u?null:m.current,b=v?v.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(s||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(b.width/2),d=Math.round(b.height/2);else{var x=e.clientX?e.clientX:e.touches[0].clientX,M=e.clientY?e.clientY:e.touches[0].clientY;c=Math.round(x-b.left),d=Math.round(M-b.top)}if(s)(g=Math.sqrt((2*Math.pow(b.width,2)+Math.pow(b.height,2))/3))%2==0&&(g+=1);else{var S=2*Math.max(Math.abs((v?v.clientWidth:0)-c),c)+2,w=2*Math.max(Math.abs((v?v.clientHeight:0)-d),d)+2;g=Math.sqrt(Math.pow(S,2)+Math.pow(w,2))}e.touches?(p.current=function(){y({pulsate:o,rippleX:c,rippleY:d,rippleSize:g,cb:n})},h.current=setTimeout((function(){p.current&&(p.current(),p.current=null)}),80)):y({pulsate:o,rippleX:c,rippleY:d,rippleSize:g,cb:n})}}),[r,y]),v=wI.useCallback((function(){g({},{pulsate:!0})}),[g]),b=wI.useCallback((function(e,t){if(clearTimeout(h.current),"touchend"===e.type&&p.current)return e.persist(),p.current(),p.current=null,void(h.current=setTimeout((function(){b(e,t)})));p.current=null,u((function(e){return e.length>0?e.slice(1):e})),d.current=t}),[]);return wI.useImperativeHandle(t,(function(){return{pulsate:v,start:g,stop:b}}),[v,g,b]),wI.createElement("span",zI({className:Yj(i.root,o),ref:m},a),wI.createElement(wX,{component:null,exit:!0},l))}));var UX,WX=cz((function(e){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(e.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}}),{flip:!1,name:"MuiTouchRipple"})(((UX=wI.memo($X)).muiName="MuiTouchRipple",UX)),YX=wI.forwardRef((function(e,t){var n=e.action,r=e.buttonRef,i=e.centerRipple,o=void 0!==i&&i,a=e.children,s=e.classes,l=e.className,u=e.component,c=void 0===u?"button":u,d=e.disabled,f=void 0!==d&&d,h=e.disableRipple,p=void 0!==h&&h,m=e.disableTouchRipple,y=void 0!==m&&m,g=e.focusRipple,v=void 0!==g&&g,b=e.focusVisibleClassName,x=e.onBlur,M=e.onClick,S=e.onFocus,w=e.onFocusVisible,E=e.onKeyDown,k=e.onKeyUp,C=e.onMouseDown,O=e.onMouseLeave,T=e.onMouseUp,A=e.onTouchEnd,N=e.onTouchMove,q=e.onTouchStart,D=e.onDragLeave,R=e.tabIndex,I=void 0===R?0:R,_=e.TouchRippleProps,P=e.type,L=void 0===P?"button":P,j=FI(e,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),z=wI.useRef(null);var F=wI.useRef(null),B=wI.useState(!1),V=B[0],H=B[1];f&&V&&H(!1);var $=FX(),U=$.isFocusVisible,W=$.onBlurVisible,Y=$.ref;function X(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:y;return TX((function(r){return t&&t(r),!n&&F.current&&F.current[e](r),!0}))}wI.useImperativeHandle(n,(function(){return{focusVisible:function(){H(!0),z.current.focus()}}}),[]),wI.useEffect((function(){V&&v&&!p&&F.current.pulsate()}),[p,v,V]);var G=X("start",C),K=X("stop",D),J=X("stop",T),Z=X("stop",(function(e){V&&e.preventDefault(),O&&O(e)})),Q=X("start",q),ee=X("stop",A),te=X("stop",N),ne=X("stop",(function(e){V&&(W(e),H(!1)),x&&x(e)}),!1),re=TX((function(e){f||(z.current||(z.current=e.currentTarget),U(e)&&(H(!0),w&&w(e)),S&&S(e))})),ie=wI.useRef(!1),oe=TX((function(e){v&&!ie.current&&V&&F.current&&" "===e.key&&(ie.current=!0,e.persist(),F.current.stop(e,(function(){F.current.start(e)}))),E&&E(e);var t=aX.findDOMNode(z.current);e.target!==e.currentTarget||!c||"button"===c||" "!==e.key&&"Enter"!==e.key||"A"===t.tagName&&t.href||(e.preventDefault(),M&&M(e))})),ae=TX((function(e){v&&" "===e.key&&F.current&&V&&(ie.current=!1,e.persist(),F.current.stop(e,(function(){F.current.pulsate(e)}))),k&&k(e)})),se=c;"button"===se&&j.href&&(se="a");var le={};"button"===se?(le.type=L,le.disabled=f):("a"===se&&j.href||(le.role="button"),le["aria-disabled"]=f);var ue=CX(r,t),ce=CX(Y,z),de=CX(ue,ce);return wI.createElement(se,zI({className:Yj(s.root,l,V&&[s.focusVisible,b],f&&s.disabled),onBlur:ne,onClick:M,onFocus:re,onKeyDown:oe,onKeyUp:ae,onMouseDown:G,onMouseLeave:Z,onMouseUp:J,onDragLeave:K,onTouchEnd:ee,onTouchMove:te,onTouchStart:Q,ref:de,tabIndex:f?-1:I},le,j),a,p||f?null:wI.createElement(NX,null,wI.createElement(WX,zI({ref:F,center:o},_))))})),XX=cz({root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"}},disabled:{},focusVisible:{}},{name:"MuiButtonBase"})(YX),GX={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},KX=wI.forwardRef((function(e,t){var n=e.align,r=void 0===n?"inherit":n,i=e.classes,o=e.className,a=e.color,s=void 0===a?"initial":a,l=e.component,u=e.display,c=void 0===u?"initial":u,d=e.gutterBottom,f=void 0!==d&&d,h=e.noWrap,p=void 0!==h&&h,m=e.paragraph,y=void 0!==m&&m,g=e.variant,v=void 0===g?"body1":g,b=e.variantMapping,x=void 0===b?GX:b,M=FI(e,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),S=l||(y?"p":x[v]||GX[v])||"span";return wI.createElement(S,zI({className:Yj(i.root,o,"inherit"!==v&&i[v],"initial"!==s&&i["color".concat(dz(s))],p&&i.noWrap,f&&i.gutterBottom,y&&i.paragraph,"inherit"!==r&&i["align".concat(dz(r))],"initial"!==c&&i["display".concat(dz(c))]),ref:t},M))})),JX=cz((function(e){return{root:{margin:0},body2:e.typography.body2,body1:e.typography.body1,caption:e.typography.caption,button:e.typography.button,h1:e.typography.h1,h2:e.typography.h2,h3:e.typography.h3,h4:e.typography.h4,h5:e.typography.h5,h6:e.typography.h6,subtitle1:e.typography.subtitle1,subtitle2:e.typography.subtitle2,overline:e.typography.overline,srOnly:{position:"absolute",height:1,width:1,overflow:"hidden"},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right"},alignJustify:{textAlign:"justify"},noWrap:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},gutterBottom:{marginBottom:"0.35em"},paragraph:{marginBottom:16},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorTextPrimary:{color:e.palette.text.primary},colorTextSecondary:{color:e.palette.text.secondary},colorError:{color:e.palette.error.main},displayInline:{display:"inline"},displayBlock:{display:"block"}}}),{name:"MuiTypography"})(KX),ZX=wI.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.className,o=e.color,a=void 0===o?"default":o,s=e.component,l=void 0===s?"button":s,u=e.disabled,c=void 0!==u&&u,d=e.disableFocusRipple,f=void 0!==d&&d,h=e.endIcon,p=e.focusVisibleClassName,m=e.fullWidth,y=void 0!==m&&m,g=e.size,v=void 0===g?"medium":g,b=e.startIcon,x=e.type,M=void 0===x?"button":x,S=e.variant,w=void 0===S?"text":S,E=FI(e,["children","classes","className","color","component","disabled","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"]),k=b&&wI.createElement("span",{className:Yj(r.startIcon,r["iconSize".concat(dz(v))])},b),C=h&&wI.createElement("span",{className:Yj(r.endIcon,r["iconSize".concat(dz(v))])},h);return wI.createElement(XX,zI({className:Yj(r.root,r[w],i,"inherit"===a?r.colorInherit:"default"!==a&&r["".concat(w).concat(dz(a))],"medium"!==v&&[r["".concat(w,"Size").concat(dz(v))],r["size".concat(dz(v))]],c&&r.disabled,y&&r.fullWidth),component:l,disabled:c,focusRipple:!f,focusVisibleClassName:Yj(r.focusVisible,p),ref:t,type:M},E),wI.createElement("span",{className:r.label},k,n,C))})),QX=cz((function(e){return{root:zI({},e.typography.button,{boxSizing:"border-box",minWidth:64,padding:"6px 16px",borderRadius:e.shape.borderRadius,color:e.palette.text.primary,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none",backgroundColor:LI(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"},"&$disabled":{backgroundColor:"transparent"}},"&$disabled":{color:e.palette.action.disabled}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},text:{padding:"6px 8px"},textPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:LI(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},textSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:LI(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlined:{padding:"5px 15px",border:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"&$disabled":{border:"1px solid ".concat(e.palette.action.disabled)}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat(LI(e.palette.primary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.primary.main),backgroundColor:LI(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat(LI(e.palette.secondary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.secondary.main),backgroundColor:LI(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{border:"1px solid ".concat(e.palette.action.disabled)}},contained:{color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],boxShadow:e.shadows[2],"&:hover":{backgroundColor:e.palette.grey.A100,boxShadow:e.shadows[4],"@media (hover: none)":{boxShadow:e.shadows[2],backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},"&$focusVisible":{boxShadow:e.shadows[6]},"&:active":{boxShadow:e.shadows[8]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}},containedPrimary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},containedSecondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},focusVisible:{},disabled:{},colorInherit:{color:"inherit",borderColor:"currentColor"},textSizeSmall:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},textSizeLarge:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},outlinedSizeSmall:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},outlinedSizeLarge:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},containedSizeSmall:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},containedSizeLarge:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},sizeSmall:{},sizeLarge:{},fullWidth:{width:"100%"},startIcon:{display:"inherit",marginRight:8,marginLeft:-4,"&$iconSizeSmall":{marginLeft:-2}},endIcon:{display:"inherit",marginRight:-4,marginLeft:8,"&$iconSizeSmall":{marginRight:-2}},iconSizeSmall:{"& > *:first-child":{fontSize:18}},iconSizeMedium:{"& > *:first-child":{fontSize:20}},iconSizeLarge:{"& > *:first-child":{fontSize:22}}}}),{name:"MuiButton"})(ZX);function eG(e){return e&&e.ownerDocument||document}var tG="undefined"!=typeof window?wI.useLayoutEffect:wI.useEffect,nG=wI.forwardRef((function(e,t){var n=e.children,r=e.container,i=e.disablePortal,o=void 0!==i&&i,a=e.onRendered,s=wI.useState(null),l=s[0],u=s[1],c=CX(n.ref,t);return tG((function(){o||u(function(e){return e="function"==typeof e?e():e,aX.findDOMNode(e)}(r)||document.body)}),[r,o]),tG((function(){if(l&&!o)return kX(t,l),function(){kX(t,null)}}),[t,l,o]),tG((function(){a&&(l||o)&&a()}),[a,l,o]),o?(wI.Children.only(n),wI.cloneElement(n,{ref:c})):l?aX.createPortal(n,l):l}));function rG(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((function(e,t){return null==t?e:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r),t.apply(this,r)}}),(function(){}))}function iG(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function oG(e){return eG(e).defaultView||window}function aG(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function sG(e){return parseInt(window.getComputedStyle(e)["padding-right"],10)||0}function lG(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4?arguments[4]:void 0,o=[t,n].concat(BX(r)),a=["TEMPLATE","SCRIPT","STYLE"];[].forEach.call(e.children,(function(e){1===e.nodeType&&-1===o.indexOf(e)&&-1===a.indexOf(e.tagName)&&aG(e,i)}))}function uG(e,t){var n=-1;return e.some((function(e,r){return!!t(e)&&(n=r,!0)})),n}function cG(e,t){var n,r=[],i=[],o=e.container;if(!t.disableScrollLock){var a=function(e){var t=eG(e);return t.body===e?oG(t).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(o),s=o.parentElement,l="HTML"===s.nodeName?s:o;if(r.push({value:l.style.overflow,key:"overflow",el:l}),l.style.overflow="hidden",a){var u=function(){var e=document.createElement("div");e.style.width="99px",e.style.height="99px",e.style.position="absolute",e.style.top="-9999px",e.style.overflow="scroll",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}();r.push({value:o.style.paddingRight,key:"padding-right",el:o}),o.style["padding-right"]="".concat(sG(o)+u,"px"),n=eG(o).querySelectorAll(".mui-fixed"),[].forEach.call(n,(function(e){i.push(e.style.paddingRight),e.style.paddingRight="".concat(sG(e)+u,"px")}))}}return function(){n&&[].forEach.call(n,(function(e,t){i[t]?e.style.paddingRight=i[t]:e.style.removeProperty("padding-right")})),r.forEach((function(e){var t=e.value,n=e.el,r=e.key;t?n.style.setProperty(r,t):n.style.removeProperty(r)}))}}var dG=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.modals=[],this.containers=[]}var t,n,r;return t=e,(n=[{key:"add",value:function(e,t){var n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&aG(e.modalRef,!1);var r=function(e){var t=[];return[].forEach.call(e.children,(function(e){e.getAttribute&&"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);lG(t,e.mountNode,e.modalRef,r,!0);var i=uG(this.containers,(function(e){return e.container===t}));return-1!==i?(this.containers[i].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblingNodes:r}),n)}},{key:"mount",value:function(e,t){var n=uG(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];r.restore||(r.restore=cG(r,t))}},{key:"remove",value:function(e){var t=this.modals.indexOf(e);if(-1===t)return t;var n=uG(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];if(r.modals.splice(r.modals.indexOf(e),1),this.modals.splice(t,1),0===r.modals.length)r.restore&&r.restore(),e.modalRef&&aG(e.modalRef,!0),lG(r.container,e.mountNode,e.modalRef,r.hiddenSiblingNodes,!1),this.containers.splice(n,1);else{var i=r.modals[r.modals.length-1];i.modalRef&&aG(i.modalRef,!1)}return t}},{key:"isTopModal",value:function(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}])&&iG(t.prototype,n),r&&iG(t,r),e}();function fG(e){var t=e.children,n=e.disableAutoFocus,r=void 0!==n&&n,i=e.disableEnforceFocus,o=void 0!==i&&i,a=e.disableRestoreFocus,s=void 0!==a&&a,l=e.getDoc,u=e.isEnabled,c=e.open,d=wI.useRef(),f=wI.useRef(null),h=wI.useRef(null),p=wI.useRef(),m=wI.useRef(null),y=wI.useCallback((function(e){m.current=aX.findDOMNode(e)}),[]),g=CX(t.ref,y);return wI.useMemo((function(){c&&"undefined"!=typeof window&&(p.current=l().activeElement)}),[c]),wI.useEffect((function(){if(c){var e=eG(m.current);r||!m.current||m.current.contains(e.activeElement)||(m.current.hasAttribute("tabIndex")||m.current.setAttribute("tabIndex",-1),m.current.focus());var t=function(){o||!u()||d.current?d.current=!1:m.current&&!m.current.contains(e.activeElement)&&m.current.focus()},n=function(t){!o&&u()&&9===t.keyCode&&e.activeElement===m.current&&(d.current=!0,t.shiftKey?h.current.focus():f.current.focus())};e.addEventListener("focus",t,!0),e.addEventListener("keydown",n,!0);var i=setInterval((function(){t()}),50);return function(){clearInterval(i),e.removeEventListener("focus",t,!0),e.removeEventListener("keydown",n,!0),s||(p.current&&p.current.focus&&p.current.focus(),p.current=null)}}}),[r,o,s,u,c]),wI.createElement(wI.Fragment,null,wI.createElement("div",{tabIndex:0,ref:f,"data-test":"sentinelStart"}),wI.cloneElement(t,{ref:g}),wI.createElement("div",{tabIndex:0,ref:h,"data-test":"sentinelEnd"}))}var hG={root:{zIndex:-1,position:"fixed",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",touchAction:"none"},invisible:{backgroundColor:"transparent"}},pG=wI.forwardRef((function(e,t){var n=e.invisible,r=void 0!==n&&n,i=e.open,o=FI(e,["invisible","open"]);return i?wI.createElement("div",zI({"aria-hidden":!0,ref:t},o,{style:zI({},hG.root,{},r?hG.invisible:{},{},o.style)})):null}));var mG=new dG,yG=wI.forwardRef((function(e,t){var n=Nj(),r=j_({name:"MuiModal",props:zI({},e),theme:n}),i=r.BackdropComponent,o=void 0===i?pG:i,a=r.BackdropProps,s=r.children,l=r.closeAfterTransition,u=void 0!==l&&l,c=r.container,d=r.disableAutoFocus,f=void 0!==d&&d,h=r.disableBackdropClick,p=void 0!==h&&h,m=r.disableEnforceFocus,y=void 0!==m&&m,g=r.disableEscapeKeyDown,v=void 0!==g&&g,b=r.disablePortal,x=void 0!==b&&b,M=r.disableRestoreFocus,S=void 0!==M&&M,w=r.disableScrollLock,E=void 0!==w&&w,k=r.hideBackdrop,C=void 0!==k&&k,O=r.keepMounted,T=void 0!==O&&O,A=r.manager,N=void 0===A?mG:A,q=r.onBackdropClick,D=r.onClose,R=r.onEscapeKeyDown,I=r.onRendered,_=r.open,P=FI(r,["BackdropComponent","BackdropProps","children","closeAfterTransition","container","disableAutoFocus","disableBackdropClick","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onEscapeKeyDown","onRendered","open"]),L=wI.useState(!0),j=L[0],z=L[1],F=wI.useRef({}),B=wI.useRef(null),V=wI.useRef(null),H=CX(V,t),$=function(e){return!!e.children&&e.children.props.hasOwnProperty("in")}(r),U=function(){return eG(B.current)},W=function(){return F.current.modalRef=V.current,F.current.mountNode=B.current,F.current},Y=function(){N.mount(W(),{disableScrollLock:E}),V.current.scrollTop=0},X=TX((function(){var e=function(e){return e="function"==typeof e?e():e,aX.findDOMNode(e)}(c)||U().body;N.add(W(),e),V.current&&Y()})),G=wI.useCallback((function(){return N.isTopModal(W())}),[N]),K=TX((function(e){B.current=e,e&&(I&&I(),_&&G()?Y():aG(V.current,!0))})),J=wI.useCallback((function(){N.remove(W())}),[N]);if(wI.useEffect((function(){return function(){J()}}),[J]),wI.useEffect((function(){_?X():$&&u||J()}),[_,J,$,u,X]),!T&&!_&&(!$||j))return null;var Z=function(e){return{root:{position:"fixed",zIndex:e.zIndex.modal,right:0,bottom:0,top:0,left:0},hidden:{visibility:"hidden"}}}(n||{zIndex:R_}),Q={};return void 0===s.props.tabIndex&&(Q.tabIndex=s.props.tabIndex||"-1"),$&&(Q.onEnter=rG((function(){z(!1)}),s.props.onEnter),Q.onExited=rG((function(){z(!0),u&&J()}),s.props.onExited)),wI.createElement(nG,{ref:K,container:c,disablePortal:x},wI.createElement("div",zI({ref:H,onKeyDown:function(e){"Escape"===e.key&&G()&&(e.stopPropagation(),R&&R(e),!v&&D&&D(e,"escapeKeyDown"))},role:"presentation"},P,{style:zI({},Z.root,{},!_&&j?Z.hidden:{},{},P.style)}),C?null:wI.createElement(o,zI({open:_,onClick:function(e){e.target===e.currentTarget&&(q&&q(e),!p&&D&&D(e,"backdropClick"))}},a)),wI.createElement(fG,{disableEnforceFocus:y,disableAutoFocus:f,disableRestoreFocus:S,getDoc:U,isEnabled:G,open:_},wI.cloneElement(s,Q))))}));function gG(e){return"scale(".concat(e,", ").concat(Math.pow(e,2),")")}var vG={entering:{opacity:1,transform:gG(1)},entered:{opacity:1,transform:"none"}},bG=wI.forwardRef((function(e,t){var n=e.children,r=e.in,i=e.onEnter,o=e.onExit,a=e.style,s=e.timeout,l=void 0===s?"auto":s,u=FI(e,["children","in","onEnter","onExit","style","timeout"]),c=wI.useRef(),d=wI.useRef(),f=CX(n.ref,t),h=Nj()||uz;return wI.useEffect((function(){return function(){clearTimeout(c.current)}}),[]),wI.createElement(yX,zI({appear:!0,in:r,onEnter:function(e,t){!function(e){e.scrollTop}(e);var n,r=EX({style:a,timeout:l},{mode:"enter"}),o=r.duration,s=r.delay;"auto"===l?(n=h.transitions.getAutoHeightDuration(e.clientHeight),d.current=n):n=o,e.style.transition=[h.transitions.create("opacity",{duration:n,delay:s}),h.transitions.create("transform",{duration:.666*n,delay:s})].join(","),i&&i(e,t)},onExit:function(e){var t,n=EX({style:a,timeout:l},{mode:"exit"}),r=n.duration,i=n.delay;"auto"===l?(t=h.transitions.getAutoHeightDuration(e.clientHeight),d.current=t):t=r,e.style.transition=[h.transitions.create("opacity",{duration:t,delay:i}),h.transitions.create("transform",{duration:.666*t,delay:i||.333*t})].join(","),e.style.opacity="0",e.style.transform=gG(.75),o&&o(e)},addEndListener:function(e,t){"auto"===l&&(c.current=setTimeout(t,d.current||0))},timeout:"auto"===l?null:l},u),(function(e,t){return wI.cloneElement(n,zI({style:zI({opacity:0,transform:gG(.75),visibility:"exited"!==e||r?void 0:"hidden"},vG[e],{},a,{},n.props.style),ref:f},t))}))}));bG.muiSupportAuto=!0;var xG=bG,MG=wI.createContext({}),SG=wI.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.className,o=e.component,a=void 0===o?"ul":o,s=e.dense,l=void 0!==s&&s,u=e.disablePadding,c=void 0!==u&&u,d=e.subheader,f=FI(e,["children","classes","className","component","dense","disablePadding","subheader"]),h=wI.useMemo((function(){return{dense:l}}),[l]);return wI.createElement(MG.Provider,{value:h},wI.createElement(a,zI({className:Yj(r.root,i,l&&r.dense,!c&&r.padding,d&&r.subheader),ref:t},f),d,n))})),wG=cz({root:{listStyle:"none",margin:0,padding:0,position:"relative"},padding:{paddingTop:8,paddingBottom:8},dense:{},subheader:{paddingTop:0}},{name:"MuiList"})(SG),EG="undefined"==typeof window?wI.useEffect:wI.useLayoutEffect,kG=wI.forwardRef((function(e,t){var n=e.alignItems,r=void 0===n?"center":n,i=e.autoFocus,o=void 0!==i&&i,a=e.button,s=void 0!==a&&a,l=e.children,u=e.classes,c=e.className,d=e.component,f=e.ContainerComponent,h=void 0===f?"li":f,p=e.ContainerProps,m=(p=void 0===p?{}:p).className,y=FI(p,["className"]),g=e.dense,v=e.disabled,b=void 0!==v&&v,x=e.disableGutters,M=void 0!==x&&x,S=e.divider,w=void 0!==S&&S,E=e.focusVisibleClassName,k=e.selected,C=void 0!==k&&k,O=FI(e,["alignItems","autoFocus","button","children","classes","className","component","ContainerComponent","ContainerProps","dense","disabled","disableGutters","divider","focusVisibleClassName","selected"]),T=wI.useContext(MG),A={dense:g||T.dense||!1,alignItems:r},N=wI.useRef(null);EG((function(){o&&N.current&&N.current.focus()}),[o]);var q,D,R=wI.Children.toArray(l),I=R.length&&(q=R[R.length-1],D=["ListItemSecondaryAction"],wI.isValidElement(q)&&-1!==D.indexOf(q.type.muiName)),_=CX(wI.useCallback((function(e){N.current=aX.findDOMNode(e)}),[]),t),P=zI({className:Yj(u.root,c,A.dense&&u.dense,!M&&u.gutters,w&&u.divider,b&&u.disabled,s&&u.button,"center"!==r&&u.alignItemsFlexStart,I&&u.secondaryAction,C&&u.selected),disabled:b},O),L=d||"li";return s&&(P.component=d||"div",P.focusVisibleClassName=Yj(u.focusVisible,E),L=XX),I?(L=P.component||d?L:"div","li"===h&&("li"===L?L="div":"li"===P.component&&(P.component="div")),wI.createElement(MG.Provider,{value:A},wI.createElement(h,zI({className:Yj(u.container,m),ref:_},y),wI.createElement(L,P,R),R.pop()))):wI.createElement(MG.Provider,{value:A},wI.createElement(L,zI({ref:_},P),R))})),CG=cz((function(e){return{root:{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,"&$focusVisible":{backgroundColor:e.palette.action.selected},"&$selected, &$selected:hover":{backgroundColor:e.palette.action.selected},"&$disabled":{opacity:.5}},container:{position:"relative"},focusVisible:{},dense:{paddingTop:4,paddingBottom:4},alignItemsFlexStart:{alignItems:"flex-start"},disabled:{},divider:{borderBottom:"1px solid ".concat(e.palette.divider),backgroundClip:"padding-box"},gutters:{paddingLeft:16,paddingRight:16},button:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:e.palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}},secondaryAction:{paddingRight:48},selected:{}}}),{name:"MuiListItem"})(kG),OG=wI.forwardRef((function(e,t){var n=e.classes,r=e.className,i=FI(e,["classes","className"]),o=wI.useContext(MG);return wI.createElement("div",zI({className:Yj(n.root,r,"flex-start"===o.alignItems&&n.alignItemsFlexStart),ref:t},i))})),TG=cz((function(e){return{root:{minWidth:56,color:e.palette.action.active,flexShrink:0,display:"inline-flex"},alignItemsFlexStart:{marginTop:8}}}),{name:"MuiListItemIcon"})(OG),AG=wI.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.className,o=e.disableTypography,a=void 0!==o&&o,s=e.inset,l=void 0!==s&&s,u=e.primary,c=e.primaryTypographyProps,d=e.secondary,f=e.secondaryTypographyProps,h=FI(e,["children","classes","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"]),p=wI.useContext(MG).dense,m=null!=u?u:n;null==m||m.type===JX||a||(m=wI.createElement(JX,zI({variant:p?"body2":"body1",className:r.primary,component:"span"},c),m));var y=d;return null==y||y.type===JX||a||(y=wI.createElement(JX,zI({variant:"body2",className:r.secondary,color:"textSecondary"},f),y)),wI.createElement("div",zI({className:Yj(r.root,i,p&&r.dense,l&&r.inset,m&&y&&r.multiline),ref:t},h),m,y)})),NG=cz({root:{flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},multiline:{marginTop:6,marginBottom:6},dense:{},inset:{paddingLeft:56},primary:{},secondary:{}},{name:"MuiListItemText"})(AG);function qG(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function DG(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function RG(e){return[e.horizontal,e.vertical].map((function(e){return"number"==typeof e?"".concat(e,"px"):e})).join(" ")}function IG(e){return"function"==typeof e?e():e}var _G=wI.forwardRef((function(e,t){var n=e.action,r=e.anchorEl,i=e.anchorOrigin,o=void 0===i?{vertical:"top",horizontal:"left"}:i,a=e.anchorPosition,s=e.anchorReference,l=void 0===s?"anchorEl":s,u=e.children,c=e.classes,d=e.className,f=e.container,h=e.elevation,p=void 0===h?8:h,m=e.getContentAnchorEl,y=e.marginThreshold,g=void 0===y?16:y,v=e.onEnter,b=e.onEntered,x=e.onEntering,M=e.onExit,S=e.onExited,w=e.onExiting,E=e.open,k=e.PaperProps,C=void 0===k?{}:k,O=e.transformOrigin,T=void 0===O?{vertical:"top",horizontal:"left"}:O,A=e.TransitionComponent,N=void 0===A?xG:A,q=e.transitionDuration,D=void 0===q?"auto":q,R=e.TransitionProps,I=void 0===R?{}:R,_=FI(e,["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","classes","className","container","elevation","getContentAnchorEl","marginThreshold","onEnter","onEntered","onEntering","onExit","onExited","onExiting","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"]),P=wI.useRef(),L=wI.useCallback((function(e){if("anchorPosition"===l)return a;var t=IG(r),n=(t instanceof oG(t).Element?t:eG(P.current).body).getBoundingClientRect(),i=0===e?o.vertical:"center";return{top:n.top+qG(n,i),left:n.left+DG(n,o.horizontal)}}),[r,o.horizontal,o.vertical,a,l]),j=wI.useCallback((function(e){var t=0;if(m&&"anchorEl"===l){var n=m(e);if(n&&e.contains(n)){var r=function(e,t){for(var n=t,r=0;n&&n!==e;)r+=(n=n.parentElement).scrollTop;return r}(e,n);t=n.offsetTop+n.clientHeight/2-r||0}}return t}),[o.vertical,l,m]),z=wI.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{vertical:qG(e,T.vertical)+t,horizontal:DG(e,T.horizontal)}}),[T.horizontal,T.vertical]),F=wI.useCallback((function(e){var t=j(e),n={width:e.offsetWidth,height:e.offsetHeight},i=z(n,t);if("none"===l)return{top:null,left:null,transformOrigin:RG(i)};var o=L(t),a=o.top-i.vertical,s=o.left-i.horizontal,u=a+n.height,c=s+n.width,d=oG(IG(r)),f=d.innerHeight-g,h=d.innerWidth-g;if(a<g){var p=a-g;a-=p,i.vertical+=p}else if(u>f){var m=u-f;a-=m,i.vertical+=m}if(s<g){var y=s-g;s-=y,i.horizontal+=y}else if(c>h){var v=c-h;s-=v,i.horizontal+=v}return{top:"".concat(a,"px"),left:"".concat(s,"px"),transformOrigin:RG(i)}}),[r,l,L,j,z,g]),B=wI.useCallback((function(e){var t=F(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin}),[F]),V=wI.useCallback((function(e){P.current=aX.findDOMNode(e)}),[]),H=wI.useMemo((function(){if(E)return function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=this,s=function(){e.apply(a,i)};clearTimeout(t),t=setTimeout(s,n)}return r.clear=function(){clearTimeout(t)},r}((function(){B(P.current)}))}),[E,B]);wI.useImperativeHandle(n,(function(){return E?{updatePosition:H}:null}),[E,H]),wI.useEffect((function(){if(H)return window.addEventListener("resize",H),function(){window.removeEventListener("resize",H),H.clear()}}),[H]);var $=D;"auto"!==D||N.muiSupportAuto||($=void 0);var U=f||(r?eG(IG(r)).body:void 0);return wI.createElement(yG,zI({container:U,open:E,ref:t,BackdropProps:{invisible:!0},className:Yj(c.root,d)},_),wI.createElement(N,zI({appear:!0,in:E,onEnter:v,onEntered:b,onExit:M,onExited:S,onExiting:w,timeout:$},I,{onEntering:rG((function(e,t){x&&x(e,t),B(e)}),I.onEntering)}),wI.createElement(hz,zI({elevation:p,ref:V},C,{className:Yj(c.paper,C.className)}),u)))})),PG=cz({root:{},paper:{position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}},{name:"MuiPopover"})(_G);function LG(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function jG({d:e,size:t,style:n={},viewBox:r="0 0 16 16"}){const i={fontSize:LG(t),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",...n};return wI.createElement("i",{style:i},wI.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:r,fill:"currentColor"},wI.createElement("path",{d:e})))}const zG={d:"M15.9993744,3 L15.9993744,5 L4.99937445,5 L4.99937445,3 L15.9993744,3 Z M8.99937445,7 L15.9993744,7 L15.9993744,9 L8.99937445,9 L8.99937445,7 Z M11.9993744,11 L15.9993744,11 L15.9993744,13 L11.9993744,13 L11.9993744,11 Z M2.2,11 L7,11 L7,9.00369263 C7,8.89323568 7.08954305,8.80369263 7.2,8.80369263 C7.2549016,8.80369263 7.30738916,8.82626165 7.34515712,8.86610844 L10.1852182,11.8624926 C10.2583124,11.93961 10.258346,12.0604218 10.1852948,12.13758 L7.34523376,15.1373102 C7.2692928,15.2175206 7.14270711,15.2209817 7.06249671,15.1450407 C7.02260076,15.1072683 7,15.0547472 7,14.9998069 L7,12.9043747 C4.79351111,12.9043747 2.8018683,12.9266213 1.02507156,12.9711145 L1.02507252,12.9711526 C0.472939773,12.9849787 0.014139487,12.5485949 0.000313396522,11.9964622 C0.000104473692,11.988119 -1.32268838e-12,11.9797736 -1.3231638e-12,11.9714278 L-1.83320026e-12,3 L2,3 L2,10.8 C2,10.9104569 2.08954305,11 2.2,11 Z"},FG={d:"M13,7 L8,7 L13,7 L13,4.98151367 C13,2.23029964 10.7614237,0 8,0 C5.23857625,0 3,2.23029964 3,4.98151367 L3,7 L3.75,7 L3,7 L4.5,7 L4.5,5.33193359 C4.5,3.21561511 5.54860291,1.5 8,1.5 C10.4513971,1.5 11.5,3.21561511 11.5,5.33193359 L11.5,7 L12.25,7 L3,7 C2.44771525,7 2,7.44771525 2,8 L2,15 C2,15.5522847 2.44771525,16 3,16 L13,16 C13.5522847,16 14,15.5522847 14,15 L14,8 C14,7.44771525 13.5522847,7 13,7 L3,7 L13,7 Z"},BG="M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z",VG={d:"M2.4,4 L13.6,4 C13.7104569,4 13.8,4.08954305 13.8,4.2 C13.8,4.24327404 13.7859644,4.28538077 13.76,4.32 L8.16,11.7866667 C8.09372583,11.8750322 7.96836556,11.8929408 7.88,11.8266667 C7.86483887,11.8152958 7.85137085,11.8018278 7.84,11.7866667 L2.24,4.32 C2.17372583,4.23163444 2.19163444,4.10627417 2.28,4.04 C2.31461923,4.01403557 2.35672596,4 2.4,4 Z"},HG={d:"M4,13.6 L4,2.4 C4,2.28954305 4.08954305,2.2 4.2,2.2 C4.24327404,2.2 4.28538077,2.21403557 4.32,2.24 L11.7866667,7.84 C11.8750322,7.90627417 11.8929408,8.03163444 11.8266667,8.12 C11.8152958,8.13516113 11.8018278,8.14862915 11.7866667,8.16 L4.32,13.76 C4.23163444,13.8262742 4.10627417,13.8083656 4.04,13.72 C4.01403557,13.6853808 4,13.643274 4,13.6 Z"};function $G(e,t,n){(function({model:e,properties:t}){return e.modifiers?e.modifiers.apply({model:e,properties:t}):Promise.resolve()})({model:e,properties:n}).then((()=>{e.colorSupport&&e.colorSupport.colorByUpdater(n,"qHyperCubeDef.");let r=Bi.generate(t,n);r&&r.length&&(r=r.map((e=>({qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}))),e.applyPatches(r,!0))}))}function UG(e,t,n,r,i,o){e.getEffectiveProperties().then((a=>{const s=d(!0,{},a),l=s.qHyperCubeDef[r][t],u=s.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][n];u.qAttributeDimensions=l.qAttributeDimensions,l.qAttributeDimensions=[],o||(u.qAttributeExpressions=l.qAttributeExpressions,l.qAttributeExpressions=[]),s.qHyperCubeDef[r][t]=u,s.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][n]=l,i&&i({oldItem:l,newItem:u,oldProperties:a,newProperties:s,model:e}),$G(e,a,s)}))}function WG({dir:e,dock:t,altList:n,model:r,translator:i,app:o,onChange:a}){return 0===n.length?null:{dir:e,dock:t,getAlternatives(){const e=n.map((e=>function(e,t,n){if(e.qLibraryId)return t.getDimension(e.qLibraryId).then((e=>e.getLayout())).catch((()=>null)).then((e=>e?"H"!==e.qDim.qGrouping&&e.qDim.qLabelExpression?e.qDim.qLabelExpression:e.qDim.title:n.get("Object.ErrorMessage.MissingDimension")));const r=e.qDef.qLabelExpression;if(r)return t.evaluate(r);const i=e.qDef.qFieldLabels[0]||e.qDef.qFieldDefs[0];return Promise.resolve(i)}(e,o,i).then((t=>({id:e.qDef.cId,selected:!1,title:t})))));return Promise.all(e)},changeTo(e,t){UG(r,e,t,"qDimensions",a)}}}function YG(e,t,n,r="/qHyperCubeDef"){return{breadcrumbs:e.qGroupFallbackTitles.slice(0,e.qGroupPos),drilldown:"H"===e.qGrouping,index:t,locked:!!e.qLocked,text:"H"===e.qGrouping?e.qGroupFallbackTitles[e.qGroupPos]:e.qFallbackTitle,popoverText:(i=e,"H"===i.qGrouping?i.title||"":i.qFallbackTitle||""),drillUp(e){n.drillUp(r,t,e)}};var i}function XG({altList:e,app:t,dir:n,dock:r,model:i,onChange:o,skipAttributeExpressions:a,translator:s}){return 0===e.length?null:{dir:n,dock:r,getAlternatives(){const n=e.map((e=>function(e,t,n){if(e.qLibraryId)return t.getMeasure(e.qLibraryId).then((e=>e.getLayout())).catch((()=>null)).then((e=>e?e.qMeasure.qLabelExpression?e.qMeasure.qLabelExpression:e.qMeasure.qLabel||e.qMeasure.qDef:n.get("Object.ErrorMessage.MissingMeasure")));const r=e.qDef.qLabelExpression;if(r)return t.evaluate(r);const i=e.qDef.qLabel||e.qDef.qDef;return Promise.resolve(i)}(e,t,s).then((t=>({id:e.qDef.cId,selected:!1,title:t})))));return Promise.all(n)},changeTo(e,t){UG(i,e,t,"qMeasures",o,a)}}}function GG(e,t){return{breadcrumbs:[],drilldown:!1,index:t,locked:!1,text:e.qFallbackTitle,popoverText:e.qFallbackTitle}}const KG={bottom:{anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},top:{anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}},left:{anchorOrigin:{vertical:"center",horizontal:"left"},transformOrigin:{vertical:"center",horizontal:"right"}},right:{anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"}}},JG=({children:e,...t})=>wI.createElement(QX,CR({size:"small",disableRipple:!0,disableTouchRipple:!0},t),e);function ZG(){function e({title:e,selected:t,onClick:n}){const r=P.detectTextDirection(e);return wI.createElement(CG,{button:!0,onClick:n,style:{textAlign:"start"}},wI.createElement(TG,{style:{minWidth:32}},wI.createElement(jG,{d:t?BG:""})),wI.createElement(NG,{primaryTypographyProps:{dir:r}},e))}function t({alignTo:t,changeTo:n,current:r,dir:i,dock:o,list:a,onClose:s,show:l}){const u=a.map(((t,r)=>wI.createElement(e,{key:t.id,title:t.title,onClick:()=>n(r)})));return wI.createElement(PG,CR({anchorEl:t,open:l,onClose:s},KG[o],{PaperProps:{style:{minWidth:"250px",maxHeight:"300px"}}}),wI.createElement(wG,{dense:!0,dir:i,component:"nav"},wI.createElement(e,{title:r,selected:!0,onClick:s}),u))}e.propTypes={title:OI.string.isRequired,selected:OI.bool,onClick:OI.func.isRequired},e.defaultProps={selected:!1},t.propTypes={alignTo:OI.any,changeTo:OI.func.isRequired,current:OI.string.isRequired,dir:OI.string.isRequired,dock:OI.string.isRequired,list:OI.array,onClose:OI.func.isRequired,show:OI.bool.isRequired},t.defaultProps={list:[],alignTo:null};class n extends wI.Component{constructor(e){super(e),this.state={open:!1,inSelection:e.selections&&e.selections.isActive()},this.openPopover=this.openPopover.bind(this),this.closePopover=this.closePopover.bind(this),this.changeTo=this.changeTo.bind(this),this.alignToRef=wI.createRef()}componentDidMount(){const{selections:e}=this.props;e&&(this.onSelectionsActivated=()=>this.setState({inSelection:!0}),this.onSelectionsDeactivated=()=>this.setState({inSelection:!1}),e.addListener("activated",this.onSelectionsActivated),e.addListener("deactivated",this.onSelectionsDeactivated),e.addListener("canceled",this.onSelectionsDeactivated))}componentWillUnmount(){const{selections:e}=this.props;e&&(e.removeListener("activated",this.onSelectionsActivated),e.removeListener("deactivated",this.onSelectionsDeactivated),e.removeListener("canceled",this.onSelectionsDeactivated))}changeTo(e){this.props.popover.changeTo(this.props.titleData.index,e),this.closePopover()}openPopover(){this.state.closeTime&&Date.now()-this.state.closeTime<20||this.props.popover.getAlternatives().then((e=>{this.setState({open:!0,alternatives:e})}))}closePopover(){this.setState({open:!1,closeTime:Date.now()})}render(){const{titleData:e,popover:n,translator:r,disabled:i,isDimension:o,padding:a,minWidth:s,hasAlternative:l}=this.props,u={flex:"1 1 auto",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontWeight:"normal",...this.props.style},c=e.breadcrumbs.length,d=i||this.state.inSelection,f=e.breadcrumbs.map(((t,n)=>wI.createElement(JG,{style:{display:"flex",alignItems:"center",color:d&&"rgba(89, 89, 89, 0.8)",pointerEvents:d?"none":"auto"},key:n,onClick:()=>d?void 0:e.drillUp(c-n),title:t},wI.createElement("span",{style:u},t),wI.createElement(jG,CR({},HG,{size:"small",style:{margin:"0 8px"}}))))),h=n&&!this.state.open?this.openPopover:this.closePopover,p=!n||i||this.state.inSelection,m={display:"flex",alignItems:"center",width:"100%",color:p&&"rgba(89, 89, 89, 0.8)",height:!o&&p&&"20px",lineHeight:!o&&p&&"20px",border:!o&&p&&"none"};this.state.open&&(m.background="rgba(0,0,0,0.08)");a&&(m.padding=a),s&&(m.minWidth=s);const y=P.detectTextDirection(e.text),g=wI.createElement(JG,{style:m,onClick:p?void 0:h,title:e.text,tabIndex:p?-1:0,onFocus:p?void 0:e=>{this.state.closeTime&&Date.now()-this.state.closeTime<20||(e.currentTarget.style.boxShadow="0px 0px 0px 2px #177FE6 inset",e.currentTarget.style.borderRadius="2px")},onBlur:p?void 0:e=>{e.currentTarget.style.boxShadow="none",e.currentTarget.style.borderRadius="0px"},onMouseDown:e=>{e.preventDefault()}},e.locked&&wI.createElement(jG,CR({},FG,{size:"small",title:r.get("Tooltip.selections.locked")})),wI.createElement("span",{style:u,dir:y},e.text),n&&wI.createElement(jG,CR({},VG,{size:"small",style:{margin:"0 8px"}})));return wI.createElement(wI.Fragment,null,e.drilldown&&wI.createElement(jG,CR({},zG,{size:"small",title:r.get("Tooltip.dimensions.drilldown"),style:{margin:"0 4px 0 0"}})),f,wI.createElement("div",{ref:this.alignToRef,style:{overflow:"hidden",pointerEvents:l?"auto":"none"}},g),n&&wI.createElement(t,{dock:n.dock,dir:n.dir,current:e.popoverText,alignTo:this.alignToRef.current,show:this.state.open,list:this.state.alternatives,onClose:this.closePopover,changeTo:this.changeTo}))}}function r(e){return{top:"bottom",bottom:"top",left:"right",right:"left"}[e]}function i(e){return!e.isDimension&&M(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures.length")>0}return n.propTypes={disabled:OI.bool.isRequired,padding:OI.string,minWidth:OI.string,titleData:OI.shape({breadcrumbs:OI.arrayOf(OI.string).isRequired,drilldown:OI.bool.isRequired,index:OI.number.isRequired,locked:OI.bool.isRequired,text:OI.string.isRequired,popoverText:OI.string.isRequired,drillUp:OI.func}).isRequired,popover:OI.shape({dir:OI.string.isRequired,dock:OI.string.isRequired,changeTo:OI.func.isRequired,getAlternatives:OI.func.isRequired}),translator:OI.shape({get:OI.func.isRequired}).isRequired,selections:OI.shape({isActive:OI.func,addListener:OI.func,removeListener:OI.func}),style:OI.shape({fontSize:OI.string,color:OI.string,fontFamily:OI.string}).isRequired,isDimension:OI.bool.isRequired,hasAlternative:OI.bool.isRequired},n.defaultProps={popover:null,selections:null,padding:"",minWidth:""},{renderer:"react",disableTriggers:!0,preferredSize:function(){return this.settings.settings.isDimension||i(this.settings.settings)?28:20},render(){const{settings:{app:e,disabled:t,explicitItemInfos:o,hyperCube:a,hyperCubeDef:s,isDimension:l,minWidth:u,model:c,onChangeToAlternative:d,padding:f,rtl:h,selections:p,skipAttributeExpressions:m,translator:y},layout:{dock:g}}=this.settings,v="top"!==g&&"bottom"!==g||!h?"ltr":"rtl",b=function(e,t){const n={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center"};return"left"===e?(n.width=t.height+"px",n.transform=`rotate(-90deg) translate(-${t.height}px, 0)`,n.transformOrigin="top left"):"right"===e&&(n.width=t.height+"px",n.transform=`rotate(90deg) translate(0, -${t.width}px)`,n.transformOrigin="top left"),n}(g,this.rect),x=s&&s.qLayoutExclude&&s.qLayoutExclude.qHyperCubeDef,S=x&&x[l?"qDimensions":"qMeasures"]||[],w=o||a[l?"qDimensionInfo":"qMeasureInfo"],E=l?WG:XG,k=l?YG:GG,C=c&&c.colorSupport&&c.modifiers&&E({altList:S,app:e,dir:h?"rtl":"ltr",dock:r(g),model:c,onChange:d,skipAttributeExpressions:m,translator:y}),O=(T=this.settings.settings).isDimension&&M(T,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.length")>0||i(this.settings.settings);var T;const A=w.map(((e,r)=>{const i="number"==typeof e.explicitColumn?e.explicitColumn:r,o=k(e,i,c),a=r===w.length-1;return wI.createElement(wI.Fragment,{key:e.cId},wI.createElement(n,{popover:C,titleData:o,model:c,translator:y,selections:p,disabled:t(),style:this.style,isDimension:l,padding:f,minWidth:u,hasAlternative:O}),!a&&wI.createElement("span",null,", "))}));return wI.createElement("div",{style:b,dir:v},A)}}}const QG=I_({palette:{text:{primary:"rgba(89, 89, 89, 0.8)",secondary:"rgba(0, 0, 0, 0.55)",disabled:"rgba(0, 0, 0, 0.3)"},action:{disabled:"rgba(0, 0, 0, 0.3)"}},typography:{fontFamily:'"QlikView Sans", "Arial", sans-serif',button:{textTransform:"initial",fontWeight:400}},shape:{borderRadius:2},shadows:["none","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)"],props:{MuiButtonBase:{disableRipple:!0}}});const eK=L_({productionPrefix:"qacc5",disableGlobal:!0,seed:""});function tK(){function e({x:e,y:t,width:n,height:r,scaleRatio:i,margin:o}={}){const a={x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1},margin:{left:0,top:0}};return a.x=Number.isNaN(e)?a.x:e,a.y=Number.isNaN(t)?a.y:t,a.width=Number.isNaN(n)?a.width:n,a.height=Number.isNaN(r)?a.height:r,void 0!==i&&(a.scaleRatio.x=Number.isNaN(i.x)?a.scaleRatio.x:i.x,a.scaleRatio.y=Number.isNaN(i.y)?a.scaleRatio.y:i.y),void 0!==o&&(a.margin.left=Number.isNaN(o.left)?0:o.left,a.margin.top=Number.isNaN(o.top)?0:o.top),a}return function(t={}){const{createElement:n=document.createElement.bind(document)}=t;let r,i=e();const o={element:()=>r,root:()=>r,appendTo:e=>(r||(r=n("div"),r.style.position="absolute",r.style["-webkit-font-smoothing"]="antialiased",r.style["-moz-osx-font-smoothing"]="antialiased",r.style.pointerEvents="none"),e.appendChild(r),r),render(e){if(!r)return!1;const t=i.scaleRatio.x,n=i.scaleRatio.y;return r.style.left=Math.round(i.margin.left+i.x*t)+"px",r.style.top=Math.round(i.margin.top+i.y*n)+"px",r.style.width=Math.round(i.width)+"px",r.style.height=Math.round(i.height)+"px",r.style.transform=`scale(${t}, ${n})`,r.style.transformOrigin="top left",aX.render(function(e,t){return wI.createElement(_j,{generateClassName:t},wI.createElement(sz,{theme:QG},e))}(e,eK),r),!0},itemsAt:()=>[],findShapes:()=>[],clear:()=>(r&&aX.unmountComponentAtNode(r),o),destroy(){r&&r.parentElement&&(aX.unmountComponentAtNode(r),r.parentElement.removeChild(r)),r=null},size:t=>(t&&(i=e(t)),i)};return o}}function nK(){return function(e){e.renderer("react",tK()),e.component("data-title",ZG()),e.component("disclaimer",function(){class e extends wI.Component{render(){const{label:e,spanStyle:t}=this.props;return wI.createElement(wI.Fragment,null,wI.createElement("span",{ref:this.alignToRef,style:t,title:e},e))}}return e.propTypes={label:OI.string.isRequired,spanStyle:OI.shape().isRequired},{renderer:"react",disableTriggers:!0,preferredSize:function(){return 22},render(){const{settings:{label:t,rtl:n},layout:{dock:r}}=this.settings,i="top"!==r&&"bottom"!==r||!n?"ltr":"rtl",o=function(e,t){const n={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",color:"#7b7a78",fontStyle:"italic",fontSize:"13px"};switch(e){case"left":n.width=t.height+"px",n.transform=`rotate(-90deg) translate(-${t.height}px, 0)`,n.transformOrigin="top left";break;case"right":n.width=t.height+"px",n.transform=`rotate(90deg) translate(0, -${t.width}px)`,n.transformOrigin="top left";break;case"center":n.width=t.width+"px",n.height=t.height+"px",n.color="#595959",n.fontStyle="normal",n.fontSize="1.2em",n.textAlign="center";break;default:case"top":case"bottom":n.justifyContent="flex-start",n.alignItems="flex-start"}return n}(r,this.rect),a="center"===r?t:"* "+t,s="center"!==r?{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}:{};return wI.createElement("div",{style:o,dir:i},wI.createElement(wI.Fragment,null,wI.createElement(e,{label:a,spanStyle:s})))}}}())}}function rK(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:rK(i,t,n)},i}function iK(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),rK(i,a,l,e.invert)}))}const oK={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",u=r,c=i,f=t<.5?90:-90;return o&&(s="y",l="x",u=i,c=r,f=t<.5?180:0),a(d({},e,{[s]:n*u,[l]:c-Math.max(e.size/2,Math.min(t*c,c-e.size/2)),startAngle:f}))}};function aK({i:e,width:t,height:n,resolved:r,keys:i,flipXY:o,calcKey:a="box"}){let s,l=null,u=null;void 0!==r.major.settings.binStart?(l=r.major.items[e].binStart,u=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 c=0;s?s.bandwidth?(c=s.bandwidth(),l-=c/2):c=u-l:c=1;const f=d({},{major:l,majorEnd:u},r.minor.items[e]);i.forEach((t=>{f[t]=r[t].items[e]}));const h=o?n:t,p=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:c,width:f[a].width,minWidthPx:f[a].minWidthPx,maxWidthPx:f[a].maxWidthPx,maxMajorWidth:h}),m=(c-p)/2,y=m+f.major+p/2;return{item:f,boxCenter:y,boxWidth:p,boxPadding:m,rendWidth:t,rendHeight:n}}function sK({keys:e,data:t,defaultSettings:n,style:r,settings:i,width:o,height:a,resolver:s}){const l=d(!0,{},n||{},r||{}),u={major:"horizontal"===i.orientation?a:o,minor:"horizontal"===i.orientation?o:a},c=i.major;let f;f="object"==typeof c&&"object"==typeof c.ref&&void 0!==c.ref.start&&void 0!==c.ref.end?s.resolve({data:t,defaults:{start:0,end:1},scaled:u,settings:d(!0,{},{binStart:{scale:i.major.scale,ref:i.major.ref.start},binEnd:{scale:i.major.scale,ref:i.major.ref.end}})}):"object"==typeof c&&void 0!==c.binStart&&void 0!==c.binEnd?s.resolve({data:t,defaults:{start:0,end:1},scaled:u,settings:d(!0,{},{binStart:{scale:i.major.scale,ref:"binStart"},binEnd:{scale:i.major.scale,ref:"binEnd"}},i.major)}):s.resolve({data:t,scaled:u,defaults:{major:.5},settings:{major:i.major}});const h=i.minor||{};let p;const m={major:f,minor:s.resolve({data:t,defaults:{start:0,end:1},scaled:u,settings:d(!0,{},{start:{scale:h.scale,ref:"start"},end:{scale:h.scale,ref:"end"},min:{scale:h.scale,ref:"min"},max:{scale:h.scale,ref:"max"},med:{scale:h.scale,ref:"med"}},h)})};for(let n=0,r=e.length;n<r;n++)p=e[n],m[p]=s.resolve({data:t,defaults:l[p],settings:i[p],scaled:u});return m}const lK=["oob"];const uK={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=sK({keys:lK,data:i,defaultSettings:{oob:oK.getDefaultSettings()},style:o,settings:this.settings.settings,width:e,height:t,resolver:a}),{settings:u,items:c}=l;return function({width:e,height:t,flipXY:n,resolved:r,keys:i,symbol:o,dockValue:a,_calcItemRenderingOpts:s=aK}){const l=[],{items:u}=r.major;for(let c=0,d=u.length;c<d;c++){const{item:d,boxCenter:f,rendWidth:h,rendHeight:p}=s({i:c,width:e,height:t,resolved:r,keys:i,flipXY:n,calcKey:"oob"}),m=u[c].data,y=[];if(d.oob.show){y.push(oK.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:y};l.push(e)}}return l}({items:c,settings:u,width:e,height:t,flipXY:r,resolved:l,keys:lK,symbol:s,dockValue:n})}},cK={size:25,hat:{show:!0,fill:"#999",stroke:"#000",strokeWidth:0,strokeLinejoin:"miter",width:1,maxWidthPx:void 0,minWidthPx:1,minHeightPx:1,alignment:0}},dK=["hat"];function fK(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 hK({item:e,boxWidth:t,boxPadding:n,rendWidth:r,rendHeight:i,flipXY:o}){let a="x",s="y",l=r,u=i,c=e.hat.alignment||0;o&&(a="y",s="x",l=i,u=r,c=1-c);const f=(n+e.major)*l;let h=[{[a]:f,[s]:0+u},{[a]:f+t*c*l,[s]:8},{[a]:f+t*l,[s]:0+u},{[a]:f+t*l,[s]:0+u+10},{[a]:f,[s]:0+u+10}];const p=d({},e.hat,{type:"path",d:fK(h)});h=[{[a]:f,[s]:0},{[a]:f+t*(1-c)*l,[s]:0+u-8},{[a]:f+t*l,[s]:0},{[a]:f+t*l,[s]:-10},{[a]:f,[s]:-10}];return[p,d({},e.hat,{type:"path",d:fK(h)})]}const pK={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=sK({keys:dK,data:r,defaultSettings:cK,style:i,settings:this.settings.settings,width:e,height:t,resolver:o}),{settings:s,items:l}=a;return function({width:e,height:t,flipXY:n,resolved:r,keys:i,_calcItemRenderingOpts:o=aK}){const a=[],{items:s}=r.major;for(let l=0,u=s.length;l<u;l++){const{item:u,boxWidth:c,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=[];u.hat.show&&m.push(...hK({item:u,boxWidth:c,boxPadding:d,rendWidth:f,rendHeight:h,flipXY:n}));const y={type:"container",data:p,collider:{type:"bounds"},children:m};a.push(y)}return a}({items:l,settings:s,width:e,height:t,flipXY:n,resolved:a,keys:dK})}};var mK="unclassified",yK="equal-equal",gK="equal-higher",vK="equal-lower",bK="equal-void",xK="higher-equal",MK="higher-higher-acute",SK="higher-higher-obtuse",wK="higher-lower-negative",EK="higher-lower-positive",kK="higher-void",CK="lower-equal",OK="lower-higher-negative",TK="lower-higher-positive",AK="lower-lower-acute",NK="lower-lower-obtuse",qK="lower-void",DK="void-equal",RK="void-higher",IK="void-lower",_K="void-void";function PK(e,t){return Math.atan2(t.y-e.y,t.x-e.x)*(180/Math.PI)}function LK(e,t,n){const r=Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),i=Math.sqrt((t.x-n.x)**2+(t.y-n.y)**2),o=Math.sqrt((n.x-e.x)**2+(n.y-e.y)**2);return Math.acos((i*i+r*r-o*o)/(2*i*r))*(180/Math.PI)}function jK({previous:e,current:t,next:n}){const r=e&&e.value,i=t&&t.value,o=n&&n.value;return e||n?e?n?r===i?i===o?yK:i<o?gK:vK:i===o?r>i?xK:CK:r>i?i<o?LK(e,t,n)>90?SK:MK:PK(e,t)>PK(e,n)?EK:wK:i>o?LK(e,t,n)>90?NK:AK:PK(e,t)>PK(e,n)?TK:OK:r===i?bK:r>i?kK:qK:i===o?DK:i<o?RK:IK:_K}function zK({bounds:e,size:t}){const{x:n,y:r,width:i,height:o}=e,{insideStrategy:a}=t;return"center"===a?Math.floor(n+i/2)>=0&&Math.ceil(n+i/2)<=t.width&&Math.floor(r+o/2)>=0&&Math.ceil(r+o/2)<=t.height:Math.floor(n+i)>0&&Math.ceil(n)<t.width&&Math.floor(r+o/2)>=0&&Math.ceil(r+o/2)<=t.height}const FK=1,BK=0;function VK({node:e,line:t,groupIndex:n,extract:r,style:i,measureText:o,size:a,horizontal:s,rtl:l,meta:u,showLabel:c}){const d=r.label(e.data);if("string"!=typeof d&&"number"!=typeof d||""===d)return!1;const f=o({fontFamily:i.fontFamily,fontSize:i.fontSize,text:d}),{localBounds:h}=e,{"stroke-width":p}=e.attrs,m=r.pointValue(e.data),y={x:h.x+h.width/2,y:h.y+h.height/2,width:f.width+2*FK,height:f.height+2*BK},g=`${y.x}-${y.y}`,v=!s&&!l,b=s?a.height:a.width,x=(s?y.y:y.x)/b,M=(v?1-x:x)<=(b<=200?.25:.1),S={key:g,node:e,line:t,group:n,value:m,labelMeasurements:f,bounds:y,inside:zK({bounds:h,size:a}),border:p?p/2:0,classification:mK,setClassification(e){S.classification=e},preferences:[],setPreferences(e){S.preferences.push(...e)},placement:void 0,setPlacement(e){S.placement=e},duplicate:!1,setDuplicate(){S.duplicate=!0},extreme:u.getExtreme(g),elite:M,show:c(e)};return S}function HK({nodes:e,extract:t,style:n,measureText:r,size:i,horizontal:o,rtl:a,showLabel:s}){const l=function({nodes:e}){const t={top:[],right:[],bottom:[],left:[]},n=e.map((e=>{const{localBounds:t}=e,n={x:t.x+t.width/2,y:t.y+t.height/2};return{key:`${n.x}-${n.y}`,center:n}})),r=n.reduce(((e,t)=>((!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((e=>e.center.y===r.top.center.y)).map((e=>e.key)),t.right=n.filter((e=>e.center.x===r.right.center.x)).map((e=>e.key)),t.bottom=n.filter((e=>e.center.y===r.bottom.center.y)).map((e=>e.key)),t.left=n.filter((e=>e.center.x===r.left.center.x)).map((e=>e.key)),{getExtrema:e=>({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:e=>{const{top:n,right:r,bottom:i,left:o}=t;return[n,r,i,o].some((t=>-1!==t.indexOf(e)))}}}({nodes:e});return function({nodes:e,by:t,lineIndex:n}){const r=e.reduce(((e,r,i)=>{const o=t(r.data);return e[o]||(e[o]={items:[],index:i}),e[o].items.push({node:r,line:r.data[n].value}),e}),{});return Object.keys(r).map((e=>r[e])).sort(((e,t)=>e.index-t.index)).map((e=>e.items))}({nodes:e,by:t.majorValue,lineIndex:t.lineIndex}).map(((e,u)=>e.map((e=>({line:e.line,item:VK({node:e.node,line:e.line,groupIndex:u,extract:t,style:n,measureText:r,size:i,horizontal:o,rtl:a,meta:l,showLabel:s})}))).filter((e=>e.item)).reduce(((e,t)=>(e[t.line]=t.item,e)),{}))).filter((e=>Object.keys(e).length))}var $K={TOP:"top",TOP_RIGHT:"top-right",RIGHT:"right",BOTTOM_RIGHT:"bottom-right",BOTTOM:"bottom",BOTTOM_LEFT:"bottom-left",LEFT:"left",TOP_LEFT:"top-left"},UK={[yK]:[$K.TOP,$K.BOTTOM],[gK]:[$K.BOTTOM,$K.BOTTOM_RIGHT],[vK]:[$K.TOP,$K.TOP_RIGHT],[bK]:[$K.TOP,$K.BOTTOM],[xK]:[$K.LEFT,$K.BOTTOM_LEFT,$K.TOP,$K.TOP_RIGHT],[MK]:[$K.BOTTOM,$K.BOTTOM_LEFT,$K.LEFT,$K.TOP_RIGHT],[SK]:[$K.BOTTOM,$K.TOP],[wK]:[$K.TOP,$K.TOP_RIGHT,$K.RIGHT],[EK]:[$K.BOTTOM,$K.BOTTOM_LEFT,$K.LEFT],[kK]:[$K.TOP],[CK]:[$K.TOP],[OK]:[$K.TOP,$K.TOP_LEFT],[TK]:[$K.BOTTOM_RIGHT],[AK]:[$K.TOP,$K.TOP_LEFT,$K.LEFT,$K.TOP_RIGHT,$K.RIGHT],[NK]:[$K.TOP,$K.BOTTOM],[qK]:[$K.TOP],[DK]:[$K.TOP],[RK]:[$K.TOP,$K.BOTTOM],[IK]:[$K.TOP,$K.BOTTOM,$K.LEFT],[_K]:[$K.TOP]};function WK({nodes:e,extract:t,style:n,measureText:r,size:i,horizontal:o,rtl:a,showLabel:s}){const l=HK({nodes:e,extract:t,style:n,measureText:r,size:i,horizontal:o,rtl:a,showLabel:s}),u=[...l.reduce(((e,t)=>(e.push(...Object.keys(t).map((e=>t[e]))),e)),[])],[c]=u,d=function({groups:e,threshold:t}){const n=e.map((e=>Object.keys(e).map((t=>e[t])))),r={};for(let e=0;e<=n.length;e++){const t=n[e];if(t)for(let e=0;e<t.length;e++){const n=t[e],{line:i}=n;r[i]||(r[i]=[]),r[i].push(n.bounds)}}const i=Object.keys(r).map((e=>r[e])),o=[];for(let e=0;e<i.length;e++)for(let n=0;n<i[e].length-1;n++){const r=i[e][n],a=i[e][n+1],s={x1:r.x,y1:r.y,x2:a.x,y2:a.y},l=s.x1-s.x2,u=s.y1-s.y2;Math.sqrt(l*l+u*u)>t&&o.push(s)}return o}({groups:l,threshold:c.node.localBounds.height}),f={getItems:()=>u,getLines:()=>d};return function({groups:e}){for(let t=0;t<e.length;t++){const n=Object.keys(e[t]).map((n=>e[t][n]));for(let r=0;r<n.length;r++){const i=n[r],o=jK({previous:e[t-1]&&e[t-1][i.line],current:i,next:e[t+1]&&e[t+1][i.line]});i.setClassification(o)}}}({groups:l}),f.getItems().forEach((e=>e.setPreferences(UK[e.classification]))),f}function YK({item:e,placement:t,size:n}){return t.x>=0-n.edgeBleed.left&&t.x<=n.width-e.bounds.width+n.edgeBleed.right&&t.y>=0-n.edgeBleed.top&&t.y<=n.height-e.bounds.height}function XK({line1:e,line2:t}){const n=(t.y2-t.y1)*(e.x2-e.x1)-(t.x2-t.x1)*(e.y2-e.y1);if(0===n)return!1;const r=((t.x2-t.x1)*(e.y1-t.y1)-(t.y2-t.y1)*(e.x1-t.x1))/n,i=((e.x2-e.x1)*(e.y1-t.y1)-(e.y2-e.y1)*(e.x1-t.x1))/n;return r>=0&&r<=1&&i>=0&&i<=1}function GK({candidate:e,lines:t,rects:n}){return!!n.some((t=>function({rect1:e,rect2:t}){return!(t.x>e.x+e.width||t.x+t.width<e.x||t.y>e.y+e.height||t.y+t.height<e.y)}({rect1:t,rect2:e})))||t.some((t=>function({line:e,rect:t}){const n={x:t.x,y:t.y},r={x:t.x+t.width,y:t.y},i={x:t.x+t.width,y:t.y+t.height},o={x:t.x,y:t.y+t.height},a={x1:r.x,y1:r.y,x2:i.x,y2:i.y},s={x1:i.x,y1:i.y,x2:o.x,y2:o.y},l={x1:o.x,y1:o.y,x2:n.x,y2:n.y};return XK({line1:e,line2:{x1:n.x,y1:n.y,x2:r.x,y2:r.y}})||XK({line1:e,line2:a})||XK({line1:e,line2:s})||XK({line1:e,line2:l})}({line:t,rect:e})))}const KK={x:0,width:0,y:0,height:0};const JK=({item:e})=>({x:e.bounds.x-e.bounds.width/2,y:e.bounds.y-e.bounds.height-e.node.localBounds.height/2-e.border}),ZK=({item:e})=>({x:e.bounds.x,y:e.bounds.y-e.bounds.height-e.node.localBounds.height/2-e.border}),QK=({item:e})=>({x:e.bounds.x+e.node.localBounds.width/2+e.border,y:e.bounds.y-e.bounds.height/2}),eJ=({item:e})=>({x:e.bounds.x,y:e.bounds.y+e.node.localBounds.height/2+e.border}),tJ=({item:e})=>({x:e.bounds.x-e.bounds.width/2,y:e.bounds.y+e.node.localBounds.height/2+e.border}),nJ=({item:e})=>({x:e.bounds.x-e.bounds.width,y:e.bounds.y+e.node.localBounds.height/2+e.border}),rJ=({item:e})=>({x:e.bounds.x-e.bounds.width-e.node.localBounds.width/2-e.border,y:e.bounds.y-e.bounds.height/2}),iJ=({item:e})=>({x:e.bounds.x-e.bounds.width,y:e.bounds.y-e.bounds.height-e.node.localBounds.height/2-e.border});var oJ=2.5,aJ=4;const sJ=[$K.TOP,$K.TOP_LEFT,$K.TOP_RIGHT],lJ=[$K.BOTTOM,$K.BOTTOM_LEFT,$K.BOTTOM_RIGHT];function uJ({position:e}){const t={x:oJ,width:-2*oJ,y:0,height:0},n=sJ.indexOf(e)>-1,r=lJ.indexOf(e)>-1;return n&&(t.y=aJ,t.height=-aJ),r&&(t.height=-aJ),t}function cJ({cx:e,cy:t,r:n,degrees:r}){const i=r*(Math.PI/180);return{x:Math.round(e+n*Math.sin(i)),y:Math.round(t+n*-Math.cos(i))}}function dJ({coordinates:e,degrees:t,item:n}){const r={x:e.x,y:e.y};return t<=90?r.y-=n.bounds.height:t>180&&t<=270?r.x-=n.bounds.width:t>270&&(r.y-=n.bounds.height,r.x-=n.bounds.width),r}function fJ({item:e,validator:t,force:n=!1}){const r=function({item:e}){return[e.node.localBounds.height/2*Math.sqrt(2)]}({item:e}),i=e.bounds.x,o=e.bounds.y;for(let a=0;a<r.length;a++){const s=r[a];for(let r=40;r<=180;r+=15){const a=dJ({coordinates:cJ({cx:i,cy:o,r:s,degrees:r}),degrees:r,item:e});if(t({item:e,placement:a,ignoreLines:n}).valid)return a}for(let r=320;r>180;r-=15){const a=dJ({coordinates:cJ({cx:i,cy:o,r:s,degrees:r}),degrees:r,item:e});if(t({item:e,placement:a,ignoreLines:n}).valid)return a}}return!1}const hJ=void 0;function pJ({item:e,validator:t,force:n=!1}){const r=[...e.preferences,...Object.keys($K).map((e=>$K[e])).filter((t=>-1===e.preferences.indexOf(t)))],i={[$K.TOP]:JK,[$K.TOP_RIGHT]:ZK,[$K.RIGHT]:QK,[$K.BOTTOM_RIGHT]:eJ,[$K.BOTTOM]:tJ,[$K.BOTTOM_LEFT]:nJ,[$K.LEFT]:rJ,[$K.TOP_LEFT]:iJ},o=[];for(let a=0;a<r.length;a++){const s=r[a],l=i[s]({item:e}),u=uJ({position:s}),c=t({item:e,placement:l,adjustment:u,ignoreLines:n});if(n&&c.inside&&o.push(l),c.valid)return l}const a=()=>fJ({item:e,validator:t,force:n});if(n){const e=a();return e||(o[0]||hJ)}return(e.extreme||e.elite)&&a()||hJ}function mJ({model:e,size:t,all:n}){const r={},i=e.getItems(),o=[...i.map((e=>({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})))],a=[],s=e.getLines();i.forEach((e=>{const{data:i}=e.node;if(!e.show||!e.inside||i.null&&i.null.value||i.interpolated&&i.interpolated.value)return;const{key:l}=e;if(r[l])return void e.setDuplicate();r[l]=!0;const u=function({size:e,lines:t,placements:n}){return function({item:r,placement:i,adjustment:o=KK,ignoreLines:a=!1}){const s={inside:YK({item:r,placement:i,size:e}),collides:!0,valid:!1};return s.inside?(s.collides=GK({candidate:{x:i.x+o.x,y:i.y+o.y,width:r.bounds.width+o.width,height:r.bounds.height+o.height},lines:a?[]:t,rects:n}),s.valid=!s.collides,s):s}}({size:t,lines:s,placements:o}),c=pJ({item:e,validator:u});c?(c.height=e.bounds.height,c.width=e.bounds.width,o.push(c),e.setPlacement(c)):n&&a.push({item:e,validator:u})})),a.forEach((e=>{const{item:t,validator:n}=e,r=pJ({item:t,validator:n,force:!0});r&&(r.height=t.bounds.height,r.width=t.bounds.width,o.push(r),t.setPlacement(r))}))}var yJ={require:["chart","renderer"],defaultSettings:{settings:{orientation:"horizontal",rtl:!1,connect:!1,all:!1,label:()=>{},showLabel:()=>!0,pointValue:()=>{},majorValue:()=>{},target:{labelSpace:"label-space-component",point:"point-component",allPoints:[]},lineIndex:"line",insideStrategy:"edge"},style:{fontFamily:"QlikView Sans, sans-serif",fontSize:"12px",fill:"#333"}},preferredSize(){const e={edgeBleed:{top:0,right:0,left:0}},t=this.chart.component(this.settings.settings.target.labelSpace);if(!t||!t.rect)return e;const{orientation:n,rtl:r}=this.settings.settings,i="horizontal"===n;if(t.show(r)){const{size:n}=t.settings.settings;e.edgeBleed.top=i?n:0,e.edgeBleed[r?"left":"right"]=i?0:n}return e},render(){if(!this.chart.component(this.settings.settings.target.point))return[];const{allPoints:e}=this.settings.settings.target,t=e.length?e=>this.settings.settings.target.allPoints.includes(e.key):e=>e.key===this.settings.settings.target.point,n=this.chart.findShapes("circle").filter(t);if(!n.length)return[];const{settings:r}=this.settings,i="horizontal"===r.orientation,o=i?"x":"y";n.sort(((e,t)=>e.localBounds[o]-t.localBounds[o]));const a={label:r.label,pointValue:r.pointValue,majorValue:r.majorValue,lineIndex:r.lineIndex},{height:s,width:l,edgeBleed:u}=this.rect,c={height:s,width:l,edgeBleed:u,insideStrategy:r.insideStrategy},{style:d}=this,f=WK({nodes:n,extract:a,style:d,measureText:this.renderer.measureText,size:c,horizontal:i,rtl:r.rtl,showLabel:r.showLabel});return function({model:e}){e.getItems().sort(((e,t)=>e.extreme===t.extreme?0:e.extreme&&!t.extreme?-1:1))}({model:f}),mJ({model:f,size:c,all:r.all}),f.getItems().filter((e=>e.placement&&e.node.key===this.settings.settings.target.point)).map((e=>({type:"text",x:e.placement.x+e.placement.width/2,y:e.placement.y+e.labelMeasurements.height/2,fontSize:d.fontSize,fontFamily:d.fontFamily,fill:d.fill,text:a.label(e.node.data),baseline:"central",anchor:"middle"})))}},gJ={defaultSettings:{settings:{size:10}},preferredSize(){return this.settings.settings.size},render:()=>[]};var vJ={require:["resolver","symbol"],defaultSettings:{settings:{type:"max",primaryExtremum:()=>{},secondaryExtremum:()=>{},primarySeries:[],secondarySeries:[],orientation:"horizontal",rtl:!1,major:{scale:"major-scale"},markerOffset:1,size:10},style:{fill:"#999"}},preferredSize(){return this.settings.settings.size},render(){const{items:e=[]}=this.data;if(!e.length)return[];const{type:t,orientation:n,rtl:r,markerOffset:i,size:o,major:a,primarySeries:s,secondarySeries:l}=this.settings.settings,u=this.settings.settings.primaryExtremum(),c=this.settings.settings.secondaryExtremum(),d=s.length&&void 0!==u,f=l.length&&void 0!==c;if(!d&&!f)return[];const h=s.map((e=>e.ref)),p=l.map((e=>e.ref)),m=function({type:e,primaryExtremum:t,secondaryExtremum:n,primaryItems:r=[],secondaryItems:i=[],primarySeries:o=[],secondarySeries:a=[]}){const s=[];return[...o,...a].forEach((o=>{const a=o.isPrimary?t:n,l=o.isPrimary?r:i;s.push((({type:e,extremum:t,separateStacking:n,items:r})=>{const i="max"===e?e=>e>t:e=>e<t,o=n?e=>i(e.point.value<0?e.start.value:e.end.value):e=>i(e.end.value);return r.filter(o)})({type:e,extremum:a,items:l}))})),(({items:e})=>{const t=[],n=[];return e.forEach((e=>{const{value:r}=e.major;t[r]||(t[r]=!0,n.push(e))})),n})({items:s.reduce(((e,t)=>e.concat(t)),[])})}({type:t,primaryExtremum:u,secondaryExtremum:c,primaryItems:e.filter((e=>h.includes(e.end.source.field))),secondaryItems:e.filter((e=>p.includes(e.end.source.field))),primarySeries:s,secondarySeries:l});if(!m.length)return[];const y="horizontal"===n,g=this.rect[y?"width":"height"],v=this.resolver.resolve({data:{items:m},settings:{major:a},scaled:{major:g}}),b=("max"===t?90:-90)-(y?0:90)-(!y&&r?180:0),x=o/2*i,{fill:M}=this.settings.style;return v.items.map((e=>function({symbol:e,size:t,fill:n,startAngle:r,x:i,y:o,data:a}){return e({type:"n-polygon",show:!0,size:t,fill:n,stroke:"#205891",strokeWidth:0,sides:3,startAngle:r,width:.7,x:i,y:o,data:a})}({symbol:this.symbol,size:o,fill:M,startAngle:b,x:y?g*e.major:x,y:y?x:g*e.major,data:e.data})))}};function bJ({x:e,y:t,size:n,stroke:r,strokeWidth:i,fill:o}){return{type:"container",children:[{type:"line",stroke:r||o,strokeWidth:i,x1:e-n/2,y1:t,x2:e+n/2,y2:t},{type:"circle",strokeWidth:0,fill:o,cx:e,cy:t,r:.25*n}]}}function xJ({chart:e,seriesInfo:t}){const n={primary:{paths:[],map:{}},secondary:{paths:[],map:{}}},r=[...t.primary.map((e=>e.key)),...t.secondary.map((e=>e.key))];return e.findShapes("path").filter((e=>r.some((t=>t===e.key)))).reduce(((e,n)=>((t.primary.some((e=>e.key===n.key))?e.primary:e.secondary).paths.push(n),e)),n),{getLine:(e,t)=>{const r=t?n.primary:n.secondary;if(!r.map[e]){const[t]=r.paths.filter((t=>t.data&&t.data.typeIndex.value===e));r.map[e]=t}return r.map[e]}}}function MJ({brush:e}){const t=e.brush.values();return function({value:e}){return-1!==t.indexOf(e)}}function SJ({brush:e,chart:t}){const n=e.brush.ranges();if(!n.length)return!1;const r=t&&t.scale(Vo.SCALE.MAJOR),i=r&&r.max&&r.max(),o="qHyperCube/qDimensionInfo/0:numeric"===e.id?(e,t)=>t===i?e<=t:e<t:(e,t)=>e<=t;return function({value:e}){return n.some((t=>t.min<=e&&o(e,t.max)))}}function wJ({brush:e,selectionInfo:t,items:n,selectionValues:r,colorByData:i,chart:o}){const a=e.brushes();if(!a.length)return[];const s=a[0],{minorRange:l,legendRange:u,legendTap:c}=t,d=0===s.id.indexOf("qHyperCube/qMeasureInfo/")?"qHyperCube/qMeasureInfo/X":s.id;let f=[u?e=>e.color.value:r[d]].filter(Boolean);if(i&&l&&f.push((e=>e.color.value)),!i&&c&&(f=[e=>e.color.value]),!f.length)return[];const h=function({brush:e,chart:t}){return("value"===e.type?MJ:SJ)({brush:e,chart:t})}({brush:s,chart:o});return h?n.reduce(((e,t,n)=>(f.some((e=>h({value:e(t)})))&&e.push({item:t,index:n}),e)),[]):[]}function EJ({chart:e,selected:t,connection:n,gradient:r,fallback:i}){const o=e.scale(Vo.SCALE.COLOR),a=t.filter((e=>-1!==n.indexOf(e.index))).map((e=>e.item.end.value)),s=Math.min(...a),l=Math.max(...a),u=l-s,c=0===u?1:u,d=o.domain().map((e=>({color:o(Math.min(l,Math.max(s,e)))||i,offset:Math.min(1,Math.max(0,(e-s)/c))}))),f=d.map((e=>e.offset)),h=f.lastIndexOf(0),p=f.indexOf(1),m=d.slice(-1===h?0:h,-1===p?d.length:p+1);return{type:"gradient",x1:r.x1,x2:r.x2,y1:r.y1,y2:r.y2,stops:m}}function kJ({chart:e,selected:t,connection:n,gradient:r,fallback:i}){const o=e.scale(Vo.SCALE.COLOR),a=t.filter((e=>-1!==n.indexOf(e.index))).map((e=>e.item.end.value)),s=Math.min(...a),l=Math.max(...a)-s,u=0===l?1:l,c=o.domain(),d=[];for(let e=0;e<c.length-1;e++){const t=c[e],n=o(t)||i;d.push({color:n,offset:Math.min(1,Math.max(0,(t-s)/u))});const r=c[e+1];d.push({color:n,offset:Math.min(1,Math.max(0,(r-s)/u))})}const f=d.map((e=>e.offset)),h=f.lastIndexOf(0),p=f.indexOf(1),m=d.slice(-1===h?0:h,-1===p?d.length:p+1);return{type:"gradient",x1:r.x1,x2:r.x2,y1:r.y1,y2:r.y2,stops:m}}function CJ({property:e,chart:t,connection:n,attrs:r,colorSettings:i,colorByData:o,selected:a,hasMultipleMeasures:s,groupedByMeasure:l,itemsPerGroup:u,orientation:c,rtl:d}){const f=r[e];if("gradient"!==f.type)return f;const{type:h,nil:p}=i;if(s||!o)return function({chart:e,selected:t,connection:n,gradient:r,fallback:i,orientation:o,isColorCode:a,groupedByMeasure:s,itemsPerGroup:l,rtl:u}){const c=e.scale(Vo.SCALE.MAJOR),d=e.scale(Vo.SCALE.COLOR),f=s?e=>c([e,0])+c.bandwidth()*l/2:e=>c(e),h=t.filter((e=>-1!==n.indexOf(e.index))),p=("vertical"===o&&u?h.reverse():h).map((e=>e.item)),m=p.map((e=>f(e.major.value))),y=Math.min(...m),g=Math.max(...m)-y,v=0===g?1:g,b=m.map(((e,t)=>0===t?0:t===m.length-1?1:(e-y)/v)),x=[];for(let e=0;e<p.length;e++){const t=p[e],n=a?t.color.value:d(t.color.value)||i,r=b[e];x.push({color:n,offset:0===e?0:Math.max(0,x[x.length-1].offset)}),x.push({color:n,offset:e===p.length-1?1:Math.max(0,parseFloat((r+(b[e+1]-r)/2).toFixed(5)))})}return{type:"gradient",x1:r.x1,x2:r.x2,y1:r.y1,y2:r.y2,stops:x}}({chart:t,selected:a,connection:n,gradient:f,fallback:p,orientation:c,isColorCode:"color"===h,groupedByMeasure:l,itemsPerGroup:u,rtl:d});return("continuous"===h?EJ:kJ)({chart:t,selected:a,connection:n,gradient:f,fallback:p})}function OJ({chart:e,pathModel:t,colorSettings:n,colorByData:r,hasMultipleMeasures:i,groupedByMeasure:o,itemsPerGroup:a,orientation:s,lineKey:l,primary:u,selected:c,connections:d,rtl:f,count:h}){const p=t.getLine(l,u),{attrs:m}=p,y=function({d:e}){return e.replace("Z","").split(/(?=[LMC])/).map((e=>{const t=e.substring(0,1),n={letter:t,x:0,y:0,raw:e},r=e.substring(1).split(",");return"M"===t||"L"===t?([n.x]=r,[,n.y]=r):"C"===t&&([,,,,n.x]=r,[,,,,,n.y]=r),n}))}({d:m.d});return d.map((t=>function({chart:e,colorSettings:t,colorByData:n,hasMultipleMeasures:r,groupedByMeasure:i,itemsPerGroup:o,orientation:a,selected:s,connection:l,commands:u,attrs:c,rtl:d,count:f}){return{path:l.map(((e,t)=>{const n=u[e];return 0!==t||"M"===n.letter?n.raw:`M${n.x},${n.y}`})).join(""),attrs:c,stroke:CJ({property:"stroke",chart:e,connection:l,attrs:c,selected:s,colorSettings:t,colorByData:n,hasMultipleMeasures:r,groupedByMeasure:i,itemsPerGroup:o,orientation:a,rtl:d,count:f})}}({chart:e,colorSettings:n,colorByData:r,hasMultipleMeasures:i,groupedByMeasure:o,itemsPerGroup:a,orientation:s,selected:c,connection:t,commands:y,attrs:m,rtl:f,count:h})))}function TJ({chart:e,pathModel:t,seriesInfo:n,brush:r,selectionInfo:i,items:o,selectionValues:a,colorSettings:s,colorByData:l,hasMultipleMeasures:u,groupedByMeasure:c,itemsPerGroup:d,orientation:f,rtl:h}){const p=function({items:e,seriesInfo:t}){const n=e.reduce(((e,n,r)=>{const i=n.typeIndex.value;var o;return e[i]||(e[i]={key:i,items:[],index:r,measureIx:null===(o=n.colorMeasureIdx)||void 0===o?void 0:o.value,primary:t.primary.some((e=>e.typeIndex===i))}),e[i].items.push(n),e}),{});return Object.keys(n).map((e=>n[e])).sort(((e,t)=>e.index-t.index)).map((e=>({lineKey:e.key,items:e.items,primary:e.primary,measureIx:e.measureIx})))}({items:function({items:e,selectionInfo:t,seriesInfo:n}){return e.filter((e=>{if("NaN"===e.end.value||Number.isNaN(e.end.value))return!1;const{minorRange:r,minorRangePrimary:i}=t;return!r||(i?n.primary:n.secondary).some((t=>t.typeIndex===e.typeIndex.value))}))}({items:o,selectionInfo:i,seriesInfo:n}),seriesInfo:n}),{lines:m}=p.reduce(((n,o)=>{const p=wJ({brush:r,selectionInfo:i,items:o.items,selectionValues:a,colorByData:l,chart:e});if(p.length<2)return n;const m=function({selected:e}){return e.reduce(((e,t)=>{const{index:n}=t;if(e.length){const t=e[e.length-1];n===t[t.length-1]+1?t.push(n):e.push([n])}else e.push([n]);return e}),[]).filter((e=>e.length>1))}({selected:p});return m.length?(n.lines.push(...OJ({chart:e,pathModel:t,colorSettings:s(o.measureIx),colorByData:l(o.measureIx),hasMultipleMeasures:u,groupedByMeasure:c,itemsPerGroup:d,orientation:f,lineKey:o.lineKey,primary:o.primary,selected:p,connections:m,rtl:h,count:o.items.length})),n):n}),{lines:[]}),y=[];return m.forEach((e=>y.push({type:"path",d:e.path,stroke:e.stroke,strokeLinejoin:e.attrs["stroke-linejoin"],strokeWidth:e.attrs["stroke-width"],strokeDasharray:e.attrs["stroke-dasharray"],fill:"none"}))),y}var AJ={require:["chart","renderer"],defaultSettings:{settings:{seriesInfo:{primary:[],secondary:[]},selectionValues:{},colorSettings:void 0,colorByData:!1,isColorCode:!1,hasMultipleMeasures:!1,groupedByMeasure:!1,itemsPerGroup:1,orientation:"vertical",rtl:!1}},addListener(e,t){this.state.brush.addListener(e,t),this.state.listeners.push({type:e,fn:t})},removeListeners(){this.state.listeners.forEach((e=>this.state.brush.removeListener(e.type,e.fn))),this.state.listeners.length=0},created(){this.state={pathModel:xJ({chart:this.chart,seriesInfo:this.settings.settings.seriesInfo}),brush:this.chart.brush("selection"),listeners:[],selectionInfo:{minorRange:!1,minorRangePrimary:!1,legendRange:!1,legendTap:!1}}},mounted(){this.addListener("update",(()=>{this.state.selectionInfo=this.settings.settings.getSelectionInfo();const e=TJ({chart:this.chart,pathModel:this.state.pathModel,seriesInfo:this.settings.settings.seriesInfo,brush:this.state.brush,selectionInfo:this.state.selectionInfo,items:this.data.items,selectionValues:this.settings.settings.selectionValues,colorSettings:this.settings.settings.colorSettings,colorByData:this.settings.settings.colorByData,isColorCode:this.settings.settings.isColorCode,hasMultipleMeasures:this.settings.settings.hasMultipleMeasures,groupedByMeasure:this.settings.settings.groupedByMeasure,itemsPerGroup:this.settings.settings.itemsPerGroup,orientation:this.settings.settings.orientation,rtl:this.settings.settings.rtl});this.renderer.render(e)})),this.addListener("end",(()=>{this.renderer.render([])}))},render(){this.state.pathModel=xJ({chart:this.chart,seriesInfo:this.settings.settings.seriesInfo}),this.state.selectionInfo=this.settings.settings.getSelectionInfo();return TJ({chart:this.chart,pathModel:this.state.pathModel,seriesInfo:this.settings.settings.seriesInfo,brush:this.state.brush,selectionInfo:this.state.selectionInfo,items:this.data.items,selectionValues:this.settings.settings.selectionValues,colorSettings:this.settings.settings.colorSettings,colorByData:this.settings.settings.colorByData,isColorCode:this.settings.settings.isColorCode,hasMultipleMeasures:this.settings.settings.hasMultipleMeasures,groupedByMeasure:this.settings.settings.groupedByMeasure,itemsPerGroup:this.settings.settings.itemsPerGroup,orientation:this.settings.settings.orientation,rtl:this.settings.settings.rtl})},destroyed(){this.removeListeners()}};const NJ=()=>{const e=Eq();return e.use(SR),e.use(function(e){if("function"!=typeof e.interaction)return function(t){t.interaction("hammer",kR(e))};e.interaction("hammer",kR(Hammer))}(Dm)),e.use(iK),e.use(nK()),e.component("scrollbar",Nd),e.component("point-label",yJ),e.component("label-space",gJ),e.component("time-axis",im.picassoComponents.timeAxis),e.component("axis-overlay",im.picassoComponents.axisOverlay),e.component("reference-line-labels",Do),e.component("box-sliced-hat",pK),e.component("box-out-of-bounds",uK),e.component("data-out-of-bounds-marker",vJ),e.component("scroll-hint",Ii),e.component("brush-highlighter",AJ),e.scale("time",im.picassoScales.time),e.symbol("line-point",bJ),e},qJ="QlikView Sans, sans-serif";var DJ=[["object.comboChart","","fontFamily"],["object.comboChart","outOfRange","color","#999"],["object.comboChart","axis.title","color"],["object.comboChart","axis.title","fontSize","13px"],["object.comboChart","axis.title","fontFamily",qJ],["object.comboChart","axis.label.name","color","#595959"],["object.comboChart","axis.label.name","fontSize","12px"],["object.comboChart","axis.label.name","fontFamily",qJ],["object.comboChart","axis.line.major","color","#cccccc"],["object.comboChart","axis.line.minor","color","#e6e6e6"],["object.comboChart","label.value","fontFamily",qJ],["object.comboChart","label.value","fontSize","12px"],["object.comboChart","label.value","numFontSize","12px",e=>parseInt(e,10)],["object.comboChart","label.value","color","#595959"],[!1,"label.value","lightColor","#E6E6E6"],[!1,"label.value","darkColor","#595959"]];const RJ={line:"bar",circle:"circle",diamond:"diamond",triangle:"triangle",rect:"square"},IJ=e=>void 0===e.marker?RJ.circle:RJ[e.marker],_J=e=>void 0===e.markerFill||e.markerFill;function PJ({series:e,layoutService:t}){switch(Lh(e)){case Ho.MARKER:return(e=>({marker:IJ(e),fill:_J(e)}))(e);case Ho.LINE:return(e=>{const t=e.getLayoutValue("nullMode","gap");return{showAsGaps:"gap"===t,showAsConnections:"connect"===t,showAsZeros:"zero"===t}})(t);default:return{}}}function LJ(e=Uo,t){return t?e.axis===$o.PRIMARY:e.axis===$o.PRIMARY||Lh(e)===Ho.BAR}var jJ={exports:{}};var zJ={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,MAX_SAFE_COMPONENT_LENGTH:16};var FJ="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};!function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n}=zJ,r=FJ,i=(t=e.exports={}).re=[],o=t.src=[],a=t.t={};let s=0;const l=(e,t,n)=>{const l=s++;r(l,t),a[e]=l,o[l]=t,i[l]=new RegExp(t,n?"g":void 0)};l("NUMERICIDENTIFIER","0|[1-9]\\d*"),l("NUMERICIDENTIFIERLOOSE","[0-9]+"),l("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),l("MAINVERSION",`(${o[a.NUMERICIDENTIFIER]})\\.(${o[a.NUMERICIDENTIFIER]})\\.(${o[a.NUMERICIDENTIFIER]})`),l("MAINVERSIONLOOSE",`(${o[a.NUMERICIDENTIFIERLOOSE]})\\.(${o[a.NUMERICIDENTIFIERLOOSE]})\\.(${o[a.NUMERICIDENTIFIERLOOSE]})`),l("PRERELEASEIDENTIFIER",`(?:${o[a.NUMERICIDENTIFIER]}|${o[a.NONNUMERICIDENTIFIER]})`),l("PRERELEASEIDENTIFIERLOOSE",`(?:${o[a.NUMERICIDENTIFIERLOOSE]}|${o[a.NONNUMERICIDENTIFIER]})`),l("PRERELEASE",`(?:-(${o[a.PRERELEASEIDENTIFIER]}(?:\\.${o[a.PRERELEASEIDENTIFIER]})*))`),l("PRERELEASELOOSE",`(?:-?(${o[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${o[a.PRERELEASEIDENTIFIERLOOSE]})*))`),l("BUILDIDENTIFIER","[0-9A-Za-z-]+"),l("BUILD",`(?:\\+(${o[a.BUILDIDENTIFIER]}(?:\\.${o[a.BUILDIDENTIFIER]})*))`),l("FULLPLAIN",`v?${o[a.MAINVERSION]}${o[a.PRERELEASE]}?${o[a.BUILD]}?`),l("FULL",`^${o[a.FULLPLAIN]}$`),l("LOOSEPLAIN",`[v=\\s]*${o[a.MAINVERSIONLOOSE]}${o[a.PRERELEASELOOSE]}?${o[a.BUILD]}?`),l("LOOSE",`^${o[a.LOOSEPLAIN]}$`),l("GTLT","((?:<|>)?=?)"),l("XRANGEIDENTIFIERLOOSE",o[a.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*"),l("XRANGEIDENTIFIER",o[a.NUMERICIDENTIFIER]+"|x|X|\\*"),l("XRANGEPLAIN",`[v=\\s]*(${o[a.XRANGEIDENTIFIER]})(?:\\.(${o[a.XRANGEIDENTIFIER]})(?:\\.(${o[a.XRANGEIDENTIFIER]})(?:${o[a.PRERELEASE]})?${o[a.BUILD]}?)?)?`),l("XRANGEPLAINLOOSE",`[v=\\s]*(${o[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[a.XRANGEIDENTIFIERLOOSE]})(?:${o[a.PRERELEASELOOSE]})?${o[a.BUILD]}?)?)?`),l("XRANGE",`^${o[a.GTLT]}\\s*${o[a.XRANGEPLAIN]}$`),l("XRANGELOOSE",`^${o[a.GTLT]}\\s*${o[a.XRANGEPLAINLOOSE]}$`),l("COERCE",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?(?:$|[^\\d])`),l("COERCERTL",o[a.COERCE],!0),l("LONETILDE","(?:~>?)"),l("TILDETRIM",`(\\s*)${o[a.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",l("TILDE",`^${o[a.LONETILDE]}${o[a.XRANGEPLAIN]}$`),l("TILDELOOSE",`^${o[a.LONETILDE]}${o[a.XRANGEPLAINLOOSE]}$`),l("LONECARET","(?:\\^)"),l("CARETTRIM",`(\\s*)${o[a.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",l("CARET",`^${o[a.LONECARET]}${o[a.XRANGEPLAIN]}$`),l("CARETLOOSE",`^${o[a.LONECARET]}${o[a.XRANGEPLAINLOOSE]}$`),l("COMPARATORLOOSE",`^${o[a.GTLT]}\\s*(${o[a.LOOSEPLAIN]})$|^$`),l("COMPARATOR",`^${o[a.GTLT]}\\s*(${o[a.FULLPLAIN]})$|^$`),l("COMPARATORTRIM",`(\\s*)${o[a.GTLT]}\\s*(${o[a.LOOSEPLAIN]}|${o[a.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",l("HYPHENRANGE",`^\\s*(${o[a.XRANGEPLAIN]})\\s+-\\s+(${o[a.XRANGEPLAIN]})\\s*$`),l("HYPHENRANGELOOSE",`^\\s*(${o[a.XRANGEPLAINLOOSE]})\\s+-\\s+(${o[a.XRANGEPLAINLOOSE]})\\s*$`),l("STAR","(<|>)?=?\\s*\\*"),l("GTE0","^\\s*>=\\s*0.0.0\\s*$"),l("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")}(jJ,jJ.exports);const BJ=["includePrerelease","loose","rtl"];var VJ=e=>e?"object"!=typeof e?{loose:!0}:BJ.filter((t=>e[t])).reduce(((e,t)=>(e[t]=!0,e)),{}):{};const HJ=/^[0-9]+$/,$J=(e,t)=>{const n=HJ.test(e),r=HJ.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e<t?-1:1};var UJ={compareIdentifiers:$J,rcompareIdentifiers:(e,t)=>$J(t,e)};const WJ=FJ,{MAX_LENGTH:YJ,MAX_SAFE_INTEGER:XJ}=zJ,{re:GJ,t:KJ}=jJ.exports,JJ=VJ,{compareIdentifiers:ZJ}=UJ;class QJ{constructor(e,t){if(t=JJ(t),e instanceof QJ){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>YJ)throw new TypeError(`version is longer than ${YJ} characters`);WJ("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?GJ[KJ.LOOSE]:GJ[KJ.FULL]);if(!n)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>XJ||this.major<0)throw new TypeError("Invalid major version");if(this.minor>XJ||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>XJ||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<XJ)return t}return e})):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version}toString(){return this.version}compare(e){if(WJ("SemVer.compare",this.version,this.options,e),!(e instanceof QJ)){if("string"==typeof e&&e===this.version)return 0;e=new QJ(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof QJ||(e=new QJ(e,this.options)),ZJ(this.major,e.major)||ZJ(this.minor,e.minor)||ZJ(this.patch,e.patch)}comparePre(e){if(e instanceof QJ||(e=new QJ(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const n=this.prerelease[t],r=e.prerelease[t];if(WJ("prerelease compare",t,n,r),void 0===n&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===n)return-1;if(n!==r)return ZJ(n,r)}while(++t)}compareBuild(e){e instanceof QJ||(e=new QJ(e,this.options));let t=0;do{const n=this.build[t],r=e.build[t];if(WJ("prerelease compare",t,n,r),void 0===n&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===n)return-1;if(n!==r)return ZJ(n,r)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{let e=this.prerelease.length;for(;--e>=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this}}var eZ=QJ;const{MAX_LENGTH:tZ}=zJ,{re:nZ,t:rZ}=jJ.exports,iZ=eZ,oZ=VJ;var aZ=(e,t)=>{if(t=oZ(t),e instanceof iZ)return e;if("string"!=typeof e)return null;if(e.length>tZ)return null;if(!(t.loose?nZ[rZ.LOOSE]:nZ[rZ.FULL]).test(e))return null;try{return new iZ(e,t)}catch(e){return null}};const sZ=aZ;var lZ=(e,t)=>{const n=sZ(e,t);return n?n.version:null};const uZ=aZ;var cZ=(e,t)=>{const n=uZ(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null};const dZ=eZ;var fZ=(e,t,n,r)=>{"string"==typeof n&&(r=n,n=void 0);try{return new dZ(e,n).inc(t,r).version}catch(e){return null}};const hZ=eZ;var pZ=(e,t,n)=>new hZ(e,n).compare(new hZ(t,n));const mZ=pZ;var yZ=(e,t,n)=>0===mZ(e,t,n);const gZ=aZ,vZ=yZ;var bZ=(e,t)=>{if(vZ(e,t))return null;{const n=gZ(e),r=gZ(t),i=n.prerelease.length||r.prerelease.length,o=i?"pre":"",a=i?"prerelease":"";for(const e in n)if(("major"===e||"minor"===e||"patch"===e)&&n[e]!==r[e])return o+e;return a}};const xZ=eZ;var MZ=(e,t)=>new xZ(e,t).major;const SZ=eZ;var wZ=(e,t)=>new SZ(e,t).minor;const EZ=eZ;var kZ=(e,t)=>new EZ(e,t).patch;const CZ=aZ;var OZ=(e,t)=>{const n=CZ(e,t);return n&&n.prerelease.length?n.prerelease:null};const TZ=pZ;var AZ=(e,t,n)=>TZ(t,e,n);const NZ=pZ;var qZ=(e,t)=>NZ(e,t,!0);const DZ=eZ;var RZ=(e,t,n)=>{const r=new DZ(e,n),i=new DZ(t,n);return r.compare(i)||r.compareBuild(i)};const IZ=RZ;var _Z=(e,t)=>e.sort(((e,n)=>IZ(e,n,t)));const PZ=RZ;var LZ=(e,t)=>e.sort(((e,n)=>PZ(n,e,t)));const jZ=pZ;var zZ=(e,t,n)=>jZ(e,t,n)>0;const FZ=pZ;var BZ=(e,t,n)=>FZ(e,t,n)<0;const VZ=pZ;var HZ=(e,t,n)=>0!==VZ(e,t,n);const $Z=pZ;var UZ=(e,t,n)=>$Z(e,t,n)>=0;const WZ=pZ;var YZ=(e,t,n)=>WZ(e,t,n)<=0;const XZ=yZ,GZ=HZ,KZ=zZ,JZ=UZ,ZZ=BZ,QZ=YZ;var eQ=(e,t,n,r)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return XZ(e,n,r);case"!=":return GZ(e,n,r);case">":return KZ(e,n,r);case">=":return JZ(e,n,r);case"<":return ZZ(e,n,r);case"<=":return QZ(e,n,r);default:throw new TypeError("Invalid operator: "+t)}};const tQ=eZ,nQ=aZ,{re:rQ,t:iQ}=jJ.exports;var oQ=(e,t)=>{if(e instanceof tQ)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let n=null;if((t=t||{}).rtl){let t;for(;(t=rQ[iQ.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&t.index+t[0].length===n.index+n[0].length||(n=t),rQ[iQ.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;rQ[iQ.COERCERTL].lastIndex=-1}else n=e.match(rQ[iQ.COERCE]);return null===n?null:nQ(`${n[2]}.${n[3]||"0"}.${n[4]||"0"}`,t)},aQ=sQ;function sQ(e){var t=this;if(t instanceof sQ||(t=new sQ),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var n=0,r=arguments.length;n<r;n++)t.push(arguments[n]);return t}function lQ(e,t,n){var r=t===e.head?new dQ(n,null,t,e):new dQ(n,t,t.next,e);return null===r.next&&(e.tail=r),null===r.prev&&(e.head=r),e.length++,r}function uQ(e,t){e.tail=new dQ(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function cQ(e,t){e.head=new dQ(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function dQ(e,t,n,r){if(!(this instanceof dQ))return new dQ(e,t,n,r);this.list=r,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,n?(n.prev=this,this.next=n):this.next=null}sQ.Node=dQ,sQ.create=sQ,sQ.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,n=e.prev;return t&&(t.prev=n),n&&(n.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=n),e.list.length--,e.next=null,e.prev=null,e.list=null,t},sQ.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},sQ.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},sQ.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)uQ(this,arguments[e]);return this.length},sQ.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)cQ(this,arguments[e]);return this.length},sQ.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},sQ.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},sQ.prototype.forEach=function(e,t){t=t||this;for(var n=this.head,r=0;null!==n;r++)e.call(t,n.value,r,this),n=n.next},sQ.prototype.forEachReverse=function(e,t){t=t||this;for(var n=this.tail,r=this.length-1;null!==n;r--)e.call(t,n.value,r,this),n=n.prev},sQ.prototype.get=function(e){for(var t=0,n=this.head;null!==n&&t<e;t++)n=n.next;if(t===e&&null!==n)return n.value},sQ.prototype.getReverse=function(e){for(var t=0,n=this.tail;null!==n&&t<e;t++)n=n.prev;if(t===e&&null!==n)return n.value},sQ.prototype.map=function(e,t){t=t||this;for(var n=new sQ,r=this.head;null!==r;)n.push(e.call(t,r.value,this)),r=r.next;return n},sQ.prototype.mapReverse=function(e,t){t=t||this;for(var n=new sQ,r=this.tail;null!==r;)n.push(e.call(t,r.value,this)),r=r.prev;return n},sQ.prototype.reduce=function(e,t){var n,r=this.head;if(arguments.length>1)n=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,n=this.head.value}for(var i=0;null!==r;i++)n=e(n,r.value,i),r=r.next;return n},sQ.prototype.reduceReverse=function(e,t){var n,r=this.tail;if(arguments.length>1)n=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,n=this.tail.value}for(var i=this.length-1;null!==r;i--)n=e(n,r.value,i),r=r.prev;return n},sQ.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;null!==n;t++)e[t]=n.value,n=n.next;return e},sQ.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;null!==n;t++)e[t]=n.value,n=n.prev;return e},sQ.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new sQ;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var r=0,i=this.head;null!==i&&r<e;r++)i=i.next;for(;null!==i&&r<t;r++,i=i.next)n.push(i.value);return n},sQ.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new sQ;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var r=this.length,i=this.tail;null!==i&&r>t;r--)i=i.prev;for(;null!==i&&r>e;r--,i=i.prev)n.push(i.value);return n},sQ.prototype.splice=function(e,t,...n){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var r=0,i=this.head;null!==i&&r<e;r++)i=i.next;var o=[];for(r=0;i&&r<t;r++)o.push(i.value),i=this.removeNode(i);null===i&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(r=0;r<n.length;r++)i=lQ(this,i,n[r]);return o},sQ.prototype.reverse=function(){for(var e=this.head,t=this.tail,n=e;null!==n;n=n.prev){var r=n.prev;n.prev=n.next,n.next=r}return this.head=t,this.tail=e,this};try{!function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}(sQ)}catch(Wu){}const fQ=aQ,hQ=Symbol("max"),pQ=Symbol("length"),mQ=Symbol("lengthCalculator"),yQ=Symbol("allowStale"),gQ=Symbol("maxAge"),vQ=Symbol("dispose"),bQ=Symbol("noDisposeOnSet"),xQ=Symbol("lruList"),MQ=Symbol("cache"),SQ=Symbol("updateAgeOnGet"),wQ=()=>1;const EQ=(e,t,n)=>{const r=e[MQ].get(t);if(r){const t=r.value;if(kQ(e,t)){if(OQ(e,r),!e[yQ])return}else n&&(e[SQ]&&(r.value.now=Date.now()),e[xQ].unshiftNode(r));return t.value}},kQ=(e,t)=>{if(!t||!t.maxAge&&!e[gQ])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[gQ]&&n>e[gQ]},CQ=e=>{if(e[pQ]>e[hQ])for(let t=e[xQ].tail;e[pQ]>e[hQ]&&null!==t;){const n=t.prev;OQ(e,t),t=n}},OQ=(e,t)=>{if(t){const n=t.value;e[vQ]&&e[vQ](n.key,n.value),e[pQ]-=n.length,e[MQ].delete(n.key),e[xQ].removeNode(t)}};class TQ{constructor(e,t,n,r,i){this.key=e,this.value=t,this.length=n,this.now=r,this.maxAge=i||0}}const AQ=(e,t,n,r)=>{let i=n.value;kQ(e,i)&&(OQ(e,n),e[yQ]||(i=void 0)),i&&t.call(r,i.value,i.key,e)};var NQ=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[hQ]=e.max||1/0;const t=e.length||wQ;if(this[mQ]="function"!=typeof t?wQ:t,this[yQ]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[gQ]=e.maxAge||0,this[vQ]=e.dispose,this[bQ]=e.noDisposeOnSet||!1,this[SQ]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[hQ]=e||1/0,CQ(this)}get max(){return this[hQ]}set allowStale(e){this[yQ]=!!e}get allowStale(){return this[yQ]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[gQ]=e,CQ(this)}get maxAge(){return this[gQ]}set lengthCalculator(e){"function"!=typeof e&&(e=wQ),e!==this[mQ]&&(this[mQ]=e,this[pQ]=0,this[xQ].forEach((e=>{e.length=this[mQ](e.value,e.key),this[pQ]+=e.length}))),CQ(this)}get lengthCalculator(){return this[mQ]}get length(){return this[pQ]}get itemCount(){return this[xQ].length}rforEach(e,t){t=t||this;for(let n=this[xQ].tail;null!==n;){const r=n.prev;AQ(this,e,n,t),n=r}}forEach(e,t){t=t||this;for(let n=this[xQ].head;null!==n;){const r=n.next;AQ(this,e,n,t),n=r}}keys(){return this[xQ].toArray().map((e=>e.key))}values(){return this[xQ].toArray().map((e=>e.value))}reset(){this[vQ]&&this[xQ]&&this[xQ].length&&this[xQ].forEach((e=>this[vQ](e.key,e.value))),this[MQ]=new Map,this[xQ]=new fQ,this[pQ]=0}dump(){return this[xQ].map((e=>!kQ(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[xQ]}set(e,t,n){if((n=n||this[gQ])&&"number"!=typeof n)throw new TypeError("maxAge must be a number");const r=n?Date.now():0,i=this[mQ](t,e);if(this[MQ].has(e)){if(i>this[hQ])return OQ(this,this[MQ].get(e)),!1;const o=this[MQ].get(e).value;return this[vQ]&&(this[bQ]||this[vQ](e,o.value)),o.now=r,o.maxAge=n,o.value=t,this[pQ]+=i-o.length,o.length=i,this.get(e),CQ(this),!0}const o=new TQ(e,t,i,r,n);return o.length>this[hQ]?(this[vQ]&&this[vQ](e,t),!1):(this[pQ]+=o.length,this[xQ].unshift(o),this[MQ].set(e,this[xQ].head),CQ(this),!0)}has(e){if(!this[MQ].has(e))return!1;const t=this[MQ].get(e).value;return!kQ(this,t)}get(e){return EQ(this,e,!0)}peek(e){return EQ(this,e,!1)}pop(){const e=this[xQ].tail;return e?(OQ(this,e),e.value):null}del(e){OQ(this,this[MQ].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const r=e[n],i=r.e||0;if(0===i)this.set(r.k,r.v);else{const e=i-t;e>0&&this.set(r.k,r.v,e)}}}prune(){this[MQ].forEach(((e,t)=>EQ(this,t,!1)))}};class qQ{constructor(e,t){if(t=IQ(t),e instanceof qQ)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new qQ(e.raw,t);if(e instanceof _Q)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!HQ(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&$Q(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();const t=`parseRange:${Object.keys(this.options).join(",")}:${e}`,n=RQ.get(t);if(n)return n;const r=this.options.loose,i=r?jQ[zQ.HYPHENRANGELOOSE]:jQ[zQ.HYPHENRANGE];e=e.replace(i,n0(this.options.includePrerelease)),PQ("hyphen replace",e),e=e.replace(jQ[zQ.COMPARATORTRIM],FQ),PQ("comparator trim",e,jQ[zQ.COMPARATORTRIM]),e=(e=(e=e.replace(jQ[zQ.TILDETRIM],BQ)).replace(jQ[zQ.CARETTRIM],VQ)).split(/\s+/).join(" ");const o=r?jQ[zQ.COMPARATORLOOSE]:jQ[zQ.COMPARATOR],a=e.split(" ").map((e=>WQ(e,this.options))).join(" ").split(/\s+/).map((e=>t0(e,this.options))).filter(this.options.loose?e=>!!e.match(o):()=>!0).map((e=>new _Q(e,this.options)));a.length;const s=new Map;for(const e of a){if(HQ(e))return[e];s.set(e.value,e)}s.size>1&&s.has("")&&s.delete("");const l=[...s.values()];return RQ.set(t,l),l}intersects(e,t){if(!(e instanceof qQ))throw new TypeError("a Range is required");return this.set.some((n=>UQ(n,t)&&e.set.some((e=>UQ(e,t)&&n.every((n=>e.every((e=>n.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new LQ(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(r0(this.set[t],e,this.options))return!0;return!1}}var DQ=qQ;const RQ=new NQ({max:1e3}),IQ=VJ,_Q=a0,PQ=FJ,LQ=eZ,{re:jQ,t:zQ,comparatorTrimReplace:FQ,tildeTrimReplace:BQ,caretTrimReplace:VQ}=jJ.exports,HQ=e=>"<0.0.0-0"===e.value,$Q=e=>""===e.value,UQ=(e,t)=>{let n=!0;const r=e.slice();let i=r.pop();for(;n&&r.length;)n=r.every((e=>i.intersects(e,t))),i=r.pop();return n},WQ=(e,t)=>(PQ("comp",e,t),e=KQ(e,t),PQ("caret",e),e=XQ(e,t),PQ("tildes",e),e=ZQ(e,t),PQ("xrange",e),e=e0(e,t),PQ("stars",e),e),YQ=e=>!e||"x"===e.toLowerCase()||"*"===e,XQ=(e,t)=>e.trim().split(/\s+/).map((e=>GQ(e,t))).join(" "),GQ=(e,t)=>{const n=t.loose?jQ[zQ.TILDELOOSE]:jQ[zQ.TILDE];return e.replace(n,((t,n,r,i,o)=>{let a;return PQ("tilde",e,t,n,r,i,o),YQ(n)?a="":YQ(r)?a=`>=${n}.0.0 <${+n+1}.0.0-0`:YQ(i)?a=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:o?(PQ("replaceTilde pr",o),a=`>=${n}.${r}.${i}-${o} <${n}.${+r+1}.0-0`):a=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,PQ("tilde return",a),a}))},KQ=(e,t)=>e.trim().split(/\s+/).map((e=>JQ(e,t))).join(" "),JQ=(e,t)=>{PQ("caret",e,t);const n=t.loose?jQ[zQ.CARETLOOSE]:jQ[zQ.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,i,o,a)=>{let s;return PQ("caret",e,t,n,i,o,a),YQ(n)?s="":YQ(i)?s=`>=${n}.0.0${r} <${+n+1}.0.0-0`:YQ(o)?s="0"===n?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:a?(PQ("replaceCaret pr",a),s="0"===n?"0"===i?`>=${n}.${i}.${o}-${a} <${n}.${i}.${+o+1}-0`:`>=${n}.${i}.${o}-${a} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${o}-${a} <${+n+1}.0.0-0`):(PQ("no pr"),s="0"===n?"0"===i?`>=${n}.${i}.${o}${r} <${n}.${i}.${+o+1}-0`:`>=${n}.${i}.${o}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${o} <${+n+1}.0.0-0`),PQ("caret return",s),s}))},ZQ=(e,t)=>(PQ("replaceXRanges",e,t),e.split(/\s+/).map((e=>QQ(e,t))).join(" ")),QQ=(e,t)=>{e=e.trim();const n=t.loose?jQ[zQ.XRANGELOOSE]:jQ[zQ.XRANGE];return e.replace(n,((n,r,i,o,a,s)=>{PQ("xRange",e,n,r,i,o,a,s);const l=YQ(i),u=l||YQ(o),c=u||YQ(a),d=c;return"="===r&&d&&(r=""),s=t.includePrerelease?"-0":"",l?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&d?(u&&(o=0),a=0,">"===r?(r=">=",u?(i=+i+1,o=0,a=0):(o=+o+1,a=0)):"<="===r&&(r="<",u?i=+i+1:o=+o+1),"<"===r&&(s="-0"),n=`${r+i}.${o}.${a}${s}`):u?n=`>=${i}.0.0${s} <${+i+1}.0.0-0`:c&&(n=`>=${i}.${o}.0${s} <${i}.${+o+1}.0-0`),PQ("xRange return",n),n}))},e0=(e,t)=>(PQ("replaceStars",e,t),e.trim().replace(jQ[zQ.STAR],"")),t0=(e,t)=>(PQ("replaceGTE0",e,t),e.trim().replace(jQ[t.includePrerelease?zQ.GTE0PRE:zQ.GTE0],"")),n0=e=>(t,n,r,i,o,a,s,l,u,c,d,f,h)=>`${n=YQ(r)?"":YQ(i)?`>=${r}.0.0${e?"-0":""}`:YQ(o)?`>=${r}.${i}.0${e?"-0":""}`:a?">="+n:`>=${n}${e?"-0":""}`} ${l=YQ(u)?"":YQ(c)?`<${+u+1}.0.0-0`:YQ(d)?`<${u}.${+c+1}.0-0`:f?`<=${u}.${c}.${d}-${f}`:e?`<${u}.${c}.${+d+1}-0`:"<="+l}`.trim(),r0=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(PQ(e[n].semver),e[n].semver!==_Q.ANY&&e[n].semver.prerelease.length>0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0},i0=Symbol("SemVer ANY");class o0{static get ANY(){return i0}constructor(e,t){if(t=s0(t),e instanceof o0){if(e.loose===!!t.loose)return e;e=e.value}d0("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===i0?this.value="":this.value=this.operator+this.semver.version,d0("comp",this)}parse(e){const t=this.options.loose?l0[u0.COMPARATORLOOSE]:l0[u0.COMPARATOR],n=e.match(t);if(!n)throw new TypeError("Invalid comparator: "+e);this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new f0(n[2],this.options.loose):this.semver=i0}toString(){return this.value}test(e){if(d0("Comparator.test",e,this.options.loose),this.semver===i0||e===i0)return!0;if("string"==typeof e)try{e=new f0(e,this.options)}catch(e){return!1}return c0(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof o0))throw new TypeError("a Comparator is required");if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||new h0(e.value,t).test(this.value);if(""===e.operator)return""===e.value||new h0(this.value,t).test(e.semver);const n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),r=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),i=this.semver.version===e.semver.version,o=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=c0(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),s=c0(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||r||i&&o||a||s}}var a0=o0;const s0=VJ,{re:l0,t:u0}=jJ.exports,c0=eQ,d0=FJ,f0=eZ,h0=DQ,p0=DQ;var m0=(e,t,n)=>{try{t=new p0(t,n)}catch(e){return!1}return t.test(e)};const y0=DQ;var g0=(e,t)=>new y0(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")));const v0=eZ,b0=DQ;var x0=(e,t,n)=>{let r=null,i=null,o=null;try{o=new b0(t,n)}catch(e){return null}return e.forEach((e=>{o.test(e)&&(r&&-1!==i.compare(e)||(r=e,i=new v0(r,n)))})),r};const M0=eZ,S0=DQ;var w0=(e,t,n)=>{let r=null,i=null,o=null;try{o=new S0(t,n)}catch(e){return null}return e.forEach((e=>{o.test(e)&&(r&&1!==i.compare(e)||(r=e,i=new M0(r,n)))})),r};const E0=eZ,k0=DQ,C0=zZ;var O0=(e,t)=>{e=new k0(e,t);let n=new E0("0.0.0");if(e.test(n))return n;if(n=new E0("0.0.0-0"),e.test(n))return n;n=null;for(let t=0;t<e.set.length;++t){const r=e.set[t];let i=null;r.forEach((e=>{const t=new E0(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":i&&!C0(t,i)||(i=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}})),!i||n&&!C0(n,i)||(n=i)}return n&&e.test(n)?n:null};const T0=DQ;var A0=(e,t)=>{try{return new T0(e,t).range||"*"}catch(e){return null}};const N0=eZ,q0=a0,{ANY:D0}=q0,R0=DQ,I0=m0,_0=zZ,P0=BZ,L0=YZ,j0=UZ;var z0=(e,t,n,r)=>{let i,o,a,s,l;switch(e=new N0(e,r),t=new R0(t,r),n){case">":i=_0,o=L0,a=P0,s=">",l=">=";break;case"<":i=P0,o=j0,a=_0,s="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(I0(e,t,r))return!1;for(let n=0;n<t.set.length;++n){const u=t.set[n];let c=null,d=null;if(u.forEach((e=>{e.semver===D0&&(e=new q0(">=0.0.0")),c=c||e,d=d||e,i(e.semver,c.semver,r)?c=e:a(e.semver,d.semver,r)&&(d=e)})),c.operator===s||c.operator===l)return!1;if((!d.operator||d.operator===s)&&o(e,d.semver))return!1;if(d.operator===l&&a(e,d.semver))return!1}return!0};const F0=z0;var B0=(e,t,n)=>F0(e,t,">",n);const V0=z0;var H0=(e,t,n)=>V0(e,t,"<",n);const $0=DQ;var U0=(e,t,n)=>(e=new $0(e,n),t=new $0(t,n),e.intersects(t));const W0=m0,Y0=pZ;const X0=DQ,G0=a0,{ANY:K0}=G0,J0=m0,Z0=pZ,Q0=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===K0){if(1===t.length&&t[0].semver===K0)return!0;e=n.includePrerelease?[new G0(">=0.0.0-0")]:[new G0(">=0.0.0")]}if(1===t.length&&t[0].semver===K0){if(n.includePrerelease)return!0;t=[new G0(">=0.0.0")]}const r=new Set;let i,o,a,s,l,u,c;for(const t of e)">"===t.operator||">="===t.operator?i=e1(i,t,n):"<"===t.operator||"<="===t.operator?o=t1(o,t,n):r.add(t.semver);if(r.size>1)return null;if(i&&o){if(a=Z0(i.semver,o.semver,n),a>0)return null;if(0===a&&(">="!==i.operator||"<="!==o.operator))return null}for(const e of r){if(i&&!J0(e,String(i),n))return null;if(o&&!J0(e,String(o),n))return null;for(const r of t)if(!J0(e,String(r),n))return!1;return!0}let d=!(!o||n.includePrerelease||!o.semver.prerelease.length)&&o.semver,f=!(!i||n.includePrerelease||!i.semver.prerelease.length)&&i.semver;d&&1===d.prerelease.length&&"<"===o.operator&&0===d.prerelease[0]&&(d=!1);for(const e of t){if(c=c||">"===e.operator||">="===e.operator,u=u||"<"===e.operator||"<="===e.operator,i)if(f&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===f.major&&e.semver.minor===f.minor&&e.semver.patch===f.patch&&(f=!1),">"===e.operator||">="===e.operator){if(s=e1(i,e,n),s===e&&s!==i)return!1}else if(">="===i.operator&&!J0(i.semver,String(e),n))return!1;if(o)if(d&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===d.major&&e.semver.minor===d.minor&&e.semver.patch===d.patch&&(d=!1),"<"===e.operator||"<="===e.operator){if(l=t1(o,e,n),l===e&&l!==o)return!1}else if("<="===o.operator&&!J0(o.semver,String(e),n))return!1;if(!e.operator&&(o||i)&&0!==a)return!1}return!(i&&u&&!o&&0!==a)&&(!(o&&c&&!i&&0!==a)&&(!f&&!d))},e1=(e,t,n)=>{if(!e)return t;const r=Z0(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},t1=(e,t,n)=>{if(!e)return t;const r=Z0(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};var n1=(e,t,n={})=>{if(e===t)return!0;e=new X0(e,n),t=new X0(t,n);let r=!1;e:for(const i of e.set){for(const e of t.set){const t=Q0(i,e,n);if(r=r||null!==t,t)continue e}if(r)return!1}return!0};const r1=jJ.exports;var i1={re:r1.re,src:r1.src,tokens:r1.t,SEMVER_SPEC_VERSION:zJ.SEMVER_SPEC_VERSION,SemVer:eZ,compareIdentifiers:UJ.compareIdentifiers,rcompareIdentifiers:UJ.rcompareIdentifiers,parse:aZ,valid:lZ,clean:cZ,inc:fZ,diff:bZ,major:MZ,minor:wZ,patch:kZ,prerelease:OZ,compare:pZ,rcompare:AZ,compareLoose:qZ,compareBuild:RZ,sort:_Z,rsort:LZ,gt:zZ,lt:BZ,eq:yZ,neq:HZ,gte:UZ,lte:YZ,cmp:eQ,coerce:oQ,Comparator:a0,Range:DQ,satisfies:m0,toComparators:g0,maxSatisfying:x0,minSatisfying:w0,minVersion:O0,validRange:A0,outside:z0,gtr:B0,ltr:H0,intersects:U0,simplifyRange:(e,t,n)=>{const r=[];let i=null,o=null;const a=e.sort(((e,t)=>Y0(e,t,n)));for(const e of a){W0(e,t,n)?(o=e,i||(i=e)):(o&&r.push([i,o]),o=null,i=null)}i&&r.push([i,null]);const s=[];for(const[e,t]of r)e===t?s.push(e):t||e!==a[0]?t?e===a[0]?s.push("<="+t):s.push(`${e} - ${t}`):s.push(">="+e):s.push("*");const l=s.join(" || "),u="string"==typeof t.raw?t.raw:String(t);return l.length<u.length?l:t},subset:n1},o1="0.23.1";const a1=e=>!e||i1.lt(i1.coerce(e),i1.coerce(o1)),s1=({layoutService:e,flags:t})=>{const n=t.isEnabled("BARS_IN_SECONDARY_AXIS")&&!a1(e.getLayoutValue("version")),r=e.getHyperCubeValue("qMeasureInfo").map(((e,t)=>{const n={[Ho.BAR]:0,[Ho.LINE]:0,[Ho.MARKER]:0};return({series:r=Uo},i)=>{const o=LJ(r,t),a=Lh(r);return{id:i,type:a,typeIndex:n[a]++,ref:"qMeasureInfo/"+i,refIndex:i,isPrimary:o,scale:o?Vo.SCALE.MINOR.PRIMARY:Vo.SCALE.MINOR.SECONDARY,collection:o?Vo.COLLECTION.PRIMARY:Vo.COLLECTION.SECONDARY,options:PJ({series:r,layoutService:e})}}})(e,n)),i=(e,t)=>e.filter((e=>Lh(e)===t)).length,o=r.filter((e=>e.isPrimary)),a=r.filter((e=>!e.isPrimary)),s=[!!o.length&&o[0],!!a.length&&a[0]].filter((e=>!!e)),l=i(r,Ho.BAR),u=i(o,Ho.BAR),c=i(a,Ho.BAR),d=e=>r.filter((t=>Lh(t)===e)),f=d(Ho.LINE).map((e=>sf(Vo.COMPONENT.POINT,e))),h=d(Ho.MARKER).map((e=>({key:sf(Vo.COMPONENT.MARKER,e),type:e.options.marker}))),p=h.map((e=>e.key)),m=[];u>0&&m.push(`${Vo.COMPONENT.BAR}-${$o.PRIMARY}`),c>0&&m.push(`${Vo.COMPONENT.BAR}-${$o.SECONDARY}`);const y=[...m,...f,...p],{MINI_CHART:g}=Vo.COMPONENT,v=d(Ho.LINE).map((e=>sf(g.LINE,e))),b=d(Ho.MARKER).map((e=>sf(g.MARKER,e))),x=e.meta.isContinuous?[`${g.BAR}-${$o.PRIMARY}`,`${g.BAR}-${$o.SECONDARY}`,...v,...b]:[];return{meta:{allSeries:r,primarySeries:o,secondarySeries:a,barSeriesCount:l,primaryBarSeriesCount:u,secondaryBarSeriesCount:c,measureAxes:s,pointComponentKeys:f,markerComponentKeys:p,barComponentKeys:m,seriesComponentKeys:y,miniComponentKeys:x,markers:h},query:{all:()=>r,seriesByAxis:e=>e?o:a,series:d,isPrimary:LJ}}};function l1(e){return function({layout:t}){var n,r,i;const o=hl(t,"qHyperCube.qMeasureInfo",[]),a=o.some((({series:e=Uo})=>Lh(e)===Ho.LINE)),s=k.continuous(t,(()=>a&&x.isTime(!0,t))),l=e.isEnabled("BARS_IN_SECONDARY_AXIS")&&!a1(hl(t,"version","")),u=o.filter((({series:e=Uo})=>Lh(e)===Ho.BAR)),c=u.length,d=u.filter((({series:e=Uo})=>e.axis===$o.PRIMARY)).length,f=u.filter((({series:e=Uo})=>e.axis===$o.SECONDARY)).length,h=l?d>1||f>1:c>1,p=("grouped"!==hl(t,"barGrouping.grouping")||s)&&h,m=!p&&c>1,y=l&&p&&(d>0&&f>1||d>1&&f>0),g=!(null==t||null===(n=t.qHyperCube)||void 0===n||null===(r=n.qDimensionInfo)||void 0===r||null===(i=r[0])||void 0===i||!i.qLocked);return{canBeContinuous:x.canBeContinuous(t),isDiscrete:!s,isContinuous:s,isTime:x.isTime(s,t),isSnapshot:k.snapshot(t),isBarSeriesStacked:p,isBarSeriesGrouped:m,isBarSeriesStackedInBothAxis:y,isGrouped:m||y,isGroupedByMeasure:m||y,isDimensionLocked:g,groupSize:y?2:c,hasLineSeries:a}}}function u1({layoutService:e}){const{dimensionCount:t,measureCount:n}=e.meta;return{qTop:0,qLeft:0,qWidth:t+n,qHeight:Math.min(2e3,1e4/(n+1))}}function c1({genericObjectModel:e,layoutService:t}){return function(){return function(e,t,n){return e.getHyperCubeReducedData(n.path,[n.rect],n.zoomLevel,n.filter).catch(O).then((e=>{var n;const r=t.getHyperCubeValue("qMode"),i=t.getHyperCubeValue("qDimensionInfo"),o="K"===r&&i.length>1&&(null===(n=e[0])||void 0===n?void 0:n.qIsReduced),a=e.slice(),s=t.getHyperCubeValue("qMeasureInfo");return{reducedCube:{qDataPages:a,qDimensionInfo:i.slice(),qEffectiveInterColumnSortOrder:[1,0],qMeasureInfo:o?[s[0],s[0]]:s.slice(),qStackedDataPages:[],qMode:"S",qHasOtherValues:t.getHyperCubeValue("qHasOtherValues"),qSize:t.getHyperCubeValue("qSize")}}}))}(e,t,{path:"/qHyperCubeDef",rect:u1({layoutService:t}),zoomLevel:-1,filter:"D1"})}}function d1({genericObjectModel:e,layoutService:t}){const{isSnapshot:n,isContinuous:r}=t.meta;return n?function({layoutService:e}){return function(){return Promise.resolve({reducedCube:e.getLayoutValue("reducedHyperCube")||e.getHyperCube()})}}({layoutService:t}):r?function({layoutService:e}){return function(){const t=e.getHyperCube();return Promise.resolve({reducedCube:{...t,qDataPages:[...t.qDataPages]}})}}({layoutService:t}):c1({genericObjectModel:e,layoutService:t})}const f1=e=>"number"==typeof e&&!Number.isNaN(e);function h1({isPrimary:e,layoutService:t,seriesModel:n}){return function(){const r=t.getHyperCubeValue("qMeasureInfo"),i=n.query.seriesByAxis(e).map((e=>r[e.refIndex])),o=i.filter((e=>Lh(e.series)===Ho.BAR)),a=i.filter((e=>Lh(e.series)===Ho.LINE)),s=i.filter((e=>Lh(e.series)===Ho.MARKER));return{min:Math.min(...i.filter((e=>f1(e.qMin))).map((e=>e.qMin))),max:Math.max(...i.filter((e=>f1(e.qMax))).map((e=>e.qMax))),bar:{min:Math.min(...o.filter((e=>f1(e.qMin))).map((e=>e.qMin))),max:Math.max(...o.filter((e=>f1(e.qMax))).map((e=>e.qMax)))},line:{min:Math.min(...a.filter((e=>f1(e.qMin))).map((e=>e.qMin))),max:Math.max(...a.filter((e=>f1(e.qMax))).map((e=>e.qMax)))},marker:{min:Math.min(...s.filter((e=>f1(e.qMin))).map((e=>e.qMin))),max:Math.max(...s.filter((e=>f1(e.qMax))).map((e=>e.qMax)))}}}}function p1({isPrimary:e,layoutService:t,seriesModel:n}){const r=h1({isPrimary:e,layoutService:t,seriesModel:n}),i=function({seriesModel:e,isPrimary:t}){return function({dataPage:n}){const r=e.query.series(Ho.BAR).filter((e=>e.isPrimary===t)).map((e=>e.refIndex)),{qMatrix:i}=n,o={min:NaN,max:NaN};return i.forEach((e=>{let t=0,n=0;e.slice(1).filter(((e,t)=>r.some((e=>e===t))&&"NaN"!==e.qNum)).forEach((e=>{e.qNum>=0?n+=e.qNum:t+=e.qNum})),o.min=Number.isNaN(o.min)?t:Math.min(t,o.min),o.max=Number.isNaN(o.max)?n:Math.max(n,o.max)})),o}}({seriesModel:n,isPrimary:e});return function({dataPage:e}){const t=r({dataPage:e});return t.bar=i({dataPage:e}),t.min=Math.min(t.bar.min,t.line.min,t.marker.min),t.max=Math.max(t.bar.max,t.line.max,t.marker.max),t}}function m1({isPrimary:e,continuousModel:t,layoutService:n,reducedModel:r,seriesModel:i}){const o={min:NaN,max:NaN,implicit:{min:NaN,max:NaN,bar:{min:NaN,max:NaN},line:{min:NaN,max:NaN},marker:{min:NaN,max:NaN}},explicit:{min:NaN,max:NaN},meta:{hasExplicit:!1,hasExplicitMin:!1,hasExplicitMax:!1,includesZero:!1}},a=function({isPrimary:e,layoutService:t,seriesModel:n}){const{isBarSeriesStacked:r}=t.meta;return r?p1({isPrimary:e,layoutService:t,seriesModel:n}):h1({isPrimary:e,layoutService:t,seriesModel:n})}({isPrimary:e,layoutService:n,seriesModel:i});return{query:{getExtrema:()=>o},command:{initialize:()=>{const{min:s,max:l}=function({isPrimary:e,layoutService:t}){const n={min:NaN,max:NaN},{getLayoutValue:r}=t,i=r("measureAxes."+(e?0:1),{});if(i.autoMinMax)return n;const{minMax:o,min:a,max:s}=i;return"min"!==o&&"minMax"!==o||(n.min=a),"max"!==o&&"minMax"!==o||(n.max=s),Number.isNaN(n.min)||Number.isNaN(n.max)||(n.min=Math.min(a,s),n.max=Math.max(a,s)),n}({isPrimary:e,layoutService:n});return o.explicit.min=s,o.explicit.max=l,o.meta.hasExplicitMin=!Number.isNaN(s),o.meta.hasExplicitMax=!Number.isNaN(l),o.meta.hasExplicit=o.meta.hasExplicitMin||o.meta.hasExplicitMax,function({continuousModel:e,layoutService:t,reducedModel:n}){const{isDiscrete:r}=t.meta;if(r){const e=n.query.getCube();return Promise.resolve({dataPage:e.qDataPages[0]})}return e.fetchMinMaxData().then((e=>({dataPage:e[0]})))}({continuousModel:t,layoutService:n,reducedModel:r}).then((({dataPage:t})=>{const{min:n,max:r,bar:s,line:l,marker:u}=a({dataPage:t}),c=i.query.seriesByAxis(e).some((e=>Lh(e)===Ho.BAR)),d=c?Math.min(n,0):n,f=c?Math.max(r,0):r,h=c?Math.min(s.min,0):s.min,p=c?Math.max(s.max,0):s.max,m=c?Math.min(l.min,0):l.min,y=c?Math.max(l.max,0):l.max,g=c?Math.min(u.min,0):u.min,v=c?Math.max(u.max,0):u.max;o.implicit.min=Number.isFinite(d)?d:0,o.implicit.max=Number.isFinite(f)?f:0,o.implicit.bar.min=Number.isFinite(h)?h:0,o.implicit.bar.max=Number.isFinite(p)?p:0,o.implicit.line.min=Number.isFinite(m)?m:0,o.implicit.line.max=Number.isFinite(y)?y:0,o.implicit.marker.min=Number.isFinite(g)?g:0,o.implicit.marker.max=Number.isFinite(v)?v:0,o.min=Number.isNaN(o.explicit.min)?o.implicit.min:o.explicit.min,o.max=Number.isNaN(o.explicit.max)?o.implicit.max:o.explicit.max,o.meta.hasExplicitMin&&!o.meta.hasExplicitMax&&(o.max=Math.max(o.min,o.max)),o.meta.hasExplicitMax&&!o.meta.hasExplicitMin&&(o.min=Math.min(o.min,o.max)),o.meta.includesZero=!!((0-o.min)*(0-o.max)<=0)}))}}}}function y1({extrema:e,ticks:t}){const n=e.meta.hasExplicit?2:3;return t.filter((t=>(t=>!e.meta.hasExplicitMin||t>=e.explicit.min)(t)&&(t=>!e.meta.hasExplicitMax||t<=e.explicit.max)(t))).length>=n}function g1({min:e,max:t,count:n,threshold:r,disable:i}){const o=function(e,t,n){const r=In().domain([e,t]);return r.nice(n),r}(e,t,n),a=function({min:e,max:t,threshold:n,scale:r,disable:i}){const o={start:!0,stop:!0};if(i)return o;const[a,s]=r.domain();return 0!==e&&0!==a&&(o.start=r(e)>n),0!==t&&0!==s&&(o.stop=r(t)<1-n),o}({min:e,max:t,threshold:r,scale:o,disable:i});if(!a.start||!a.stop){const[e,t]=o.domain(),r=o.ticks(n),i=r.length>=4?r[1]-r[0]:.1*e,s=r.length>=4?r[r.length-1]-r[r.length-2]:.1*t;o.domain([a.start?e:e-i,a.stop?t:t+s]),o.nice(n)}return o}const v1=50,b1=100,x1=200,M1=125;function S1({config:{measureAxesRef:e},layoutService:t,size:n}){const r=(e=>{switch(e){case.5:return v1;case 1:return b1;case 2:return x1;default:return e*M1}})(t.getLayoutValue(e+".spacing",1));return Math.max(1,Math.round(n/r))}function w1({config:e,chart:t,layoutService:n,dockService:r,measureText:i,size:o,min:a,max:s}){const l=S1({config:e,layoutService:n,size:o}),u=g1({min:a,max:s,count:l,threshold:.05,disable:!0}),c=u.domain(),d={roundedMin:c[0],roundedMax:c[1],ticks:u.ticks(l)},f="horizontal"===r.meta.major.orientation?"height":"width",h=e=>i(e)[f],p=t.formatter(e.formatter),m=()=>{const e=d.ticks.map(p);return!e.some(((t,n)=>e.indexOf(t)!==n))&&(e=>{const t=o/d.ticks.length;return Math.max(...e.map(h))<=t})(e)};for(let e=l-1;e>0&&!m();e--)u.domain([a,s]),u.nice(e),[d.roundedMin,d.roundedMax]=u.domain(),d.ticks=u.ticks(e);return d}function E1({tick:e,index:t,ticks:n}){return 0===t||t===n.length-1||0===e}function k1({index:e,ticks:t}){return 0===e||e===t.length-1||e===Math.floor((t.length-1)/2)}function C1({config:e,chart:t,extrema:n,min:r,max:i}){const o={roundedMin:0,roundedMax:0,ticks:[]},a=g1({min:r,max:i,count:10,threshold:.15,disable:!0});[o.roundedMin,o.roundedMax]=a.domain();const s=a.ticks(10),l=function({ticks:e}){const t=Math.round(.3*e.length),n=t,r=e.length-t;return e.slice(n,r).some((e=>0===e))}({ticks:s}),u=l?E1:k1;o.ticks=s.filter(((e,t,n)=>u({tick:e,index:t,ticks:n})));o.ticks.length%2==0&&!l&&!n.meta.hasExplicit&&s.length>1&&(o.ticks=[s[0],(s[0]+s[s.length-1])/2,s[s.length-1]]);const c=t.formatter(e.formatter),d=o.ticks.map(c);return d.some(((e,t)=>d.indexOf(e)!==t))&&(o.ticks=[o.ticks[0],o.ticks[o.ticks.length-1]]),o}function O1({ticks:e,extrema:t}){let n=[...e];return t.meta.hasExplicit&&e.length?(t.meta.hasExplicitMin&&!e.some((e=>e===t.explicit.min))&&(n.unshift(t.explicit.min),n=n.filter((e=>e>=t.explicit.min))),t.meta.hasExplicitMax&&!e.some((e=>e===t.explicit.max))&&(n.push(t.explicit.max),n=n.filter((e=>e<=t.explicit.max))),n):n}function T1({config:e,chart:t,layoutService:n,dockService:r,extrema:i,measureText:o,size:a,min:s,max:l}){const{ticks:u,roundedMin:c,roundedMax:d}=function({config:e,chart:t,layoutService:n,dockService:r,extrema:i,measureText:o,size:a,min:s,max:l}){if("SPARK"===r.meta.chart.mode)return function({min:e,max:t}){return{roundedMin:e,roundedMax:t,ticks:[]}}({min:s,max:l});const u=w1({config:e,chart:t,layoutService:n,dockService:r,measureText:o,size:a,min:s,max:l});return y1({extrema:i,ticks:u.ticks})?u:C1({config:e,chart:t,extrema:i,min:s,max:l})}({config:e,chart:t,layoutService:n,dockService:r,extrema:i,measureText:o,size:a,min:s,max:l}),f=function({ticks:e,count: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}({ticks:u,count:1});return{min:c,max:d,values:[...O1({ticks:u,extrema:i}).map((e=>({value:e,isMinor:!1}))),...f.map((e=>({value:e,isMinor:!0})))].sort(((e,t)=>e.value-t.value))}}function A1({config:e,chart:t,layoutService:n,dockService:r,measureText:i,extrema:o,size:a}){const{min:s,max:l}=function({extrema:e}){const{min:t,max:n}=e;return t!==n?{min:t,max:n}:0===t||1===t?{min:t-1,max:n+1}:{min:t-.2*t*Math.sign(t),max:n+.2*n*Math.sign(n)}}({extrema:o});return T1({config:e,chart:t,layoutService:n,dockService:r,extrema:o,measureText:i,size:a,min:s,max:l})}function N1({config:e,chart:t,layoutService:n,extremumModel:r,dockService:i,seriesModel:o,themeService:a}){const s={locked:!1,resolved:void 0},{getExtrema:l}=r.query,u=function({chart:e,config:t,dockService:n,extremumModel:r,layoutService:i,seriesModel:o,themeService:a}){const{measureText:s}=Eq.renderer("svg")();return()=>{const l=a.getStyles(),u=function({dockService:e,seriesModel:t,chart:n}){var r;const i=n.component(t.meta.seriesComponentKeys[0]),o=null!==(r=null==i?void 0:i.rect)&&void 0!==r?r:e.meta.chart.size;return"horizontal"===e.meta.major.orientation?o.height:o.width}({chart:e,dockService:n,seriesModel:o}),c=r.query.getExtrema();return A1({config:t,chart:e,layoutService:i,dockService:n,measureText:e=>s({text:e,fontFamily:l.axis.label.name.fontFamily,fontSize:l.axis.label.name.fontSize}),extrema:c,size:u})}}({config:e,chart:t,layoutService:n,extremumModel:r,dockService:i,seriesModel:o,themeService:a}),c=()=>(s.locked&&s.resolved||(s.resolved=u()),s.resolved);return{query:{getValues:()=>c().values,getMin:()=>l().meta.hasExplicitMin?l().explicit.min:c().min,getMax:()=>l().meta.hasExplicitMax?l().explicit.max:c().max},command:{lock:()=>{s.locked=!0},unlock:()=>{s.locked=!1}}}}function q1({genericObjectModel:e,layoutService:t}){const n={properties:void 0};return{query:{getProperties:()=>n.properties},command:{initialize:()=>function({layout:e,model:t}){return k.snapshot(e)?Promise.resolve(null):t.getEffectiveProperties().then((e=>({properties:e})))}({layout:t.getLayout(),model:e}).then((e=>{const{properties:t}=null!=e?e:{};n.properties=t}))}}}function D1({layoutService:e,seriesModel:t,colorService:n}){const{type:r,mode:i,fieldType:o}=n.getSettings();if("categorical"!==r)return;const a=e.getLayoutValue("dataPoint.show",!1)?"line-point":"line";let s;s="field"===i?"measure"===o?()=>({type:Ho.BAR}):()=>t.query.all()[0]:e=>t.query.all()[e.value];return{item:{shape:{type:({datum:e})=>{const{type:t,options:n}=s(e);switch(t){case"line":return a;case"marker":return n.marker;default:return"square"}},stroke:{},strokeWidth:({datum:e})=>{const{type:t,options:n}=s(e);return t===Ho.LINE?2:t!==Ho.MARKER||n.fill?0:1},size:10,fill:{fn:({datum:e,scale:t})=>{const{type:n,options:r}=s(e);return n!==Ho.MARKER||r.fill?t(e.value):"none"}}}}}}function R1({layout:e,defaultAuto:t}){const n=t(e),r=e.qHyperCube.qMeasureInfo.length>1;return{...n,useBaseColors:r?"measure":n.useBaseColors}}function I1({actions:e,appLayoutModel:t,appModel:n,chart:r,environment:i,flags:o,genericObjectModel:a,layoutService:s,picasso:l,seriesModel:u,viewState:c}){let d;const{theme:f,translator:h}=i,p={wrappedScales:void 0,legendComponents:void 0,legendInteractions:void 0};return d=nl({picasso:l,model:a,app:n,translator:h,layoutService:s,createConfig:()=>{let e;o.isEnabled("BASIC_COLOR_OPTIONS_PER_MEASURE")&&(e=s.getHyperCubeValue("qMeasureInfo").map((e=>e.color)));return{theme:f,colorProps:{measureOverrides:e},legendProps:s.getLayoutValue("legend"),hc:s.getHyperCube(),key:Vo.SCALE.COLOR}},config:{auto:R1,localeInfo:t.qLocaleInfo},custom:{wrappedScales:()=>p.wrappedScales,legendComponents:()=>p.legendComponents,legendInteractions:()=>p.legendInteractions,updateLegend:()=>{const{components:t,interactions:n,scales:o}=function({viewState:e,chart:t,layoutService:n,seriesModel:r,environment:i,colorService:o,actions:a}){const{options:s}=i,l={eventName:"legend-c",key:Vo.COMPONENT.LEGEND,viewState:e,chart:t,styleReference:"object.comboChart",rtl:"rtl"===s.direction,settings:D1({layoutService:n,seriesModel:r,colorService:o})},{components:u,interactions:c}=o.getLegend(l,{actions:a,navigationDisabled:!a.interact.enabled()}),d=o.getScales();return{components:u.filter(Boolean).map((e=>{const{layout:t}=e,{dock:n}=t,r=d[Vo.SCALE.COLOR+"Range"];return!r||"right"!==n&&"left"!==n||(r.invert=!0),"legend-cat"===e.type&&(e.settings.item.shape.fill.scale=e.scale,e.settings.item.shape.stroke.scale=e.scale),e})),interactions:c,scales:d}}({viewState:c,chart:r,environment:i,colorService:d,seriesModel:u,layoutService:s,actions:e});p.wrappedScales=o,p.legendComponents=t,p.legendInteractions=n}}}),d}const _1="REJECTED",P1=()=>{},L1=1e4,j1=2,z1=20,F1=200,B1=10;var V1={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),u=Math.min(o+r-e.qArea.qLeft,e.qArea.qWidth),c={qArea:{qHeight:s-a,qWidth:u-l,qTop:i,qLeft:o},qMatrix:[]};for(let t=a;t<s;t++)c.qMatrix.push(e.qMatrix[t].slice(l,u));return c},cacheWarden:function({bounds:e={width:0,height:0}}){return{release(t,n){const r=n.qTop-B1<=t.qTop,i=n.qLeft+n.qWidth+B1>=t.qLeft+t.qWidth,o=n.qTop+n.qHeight+B1>=t.qTop+t.qHeight,a=n.qLeft-B1<=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 H1={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-B1<=t.qTop,i=n.qTop+n.qHeight+B1>=t.qTop+t.qHeight;return r&&t.qTop>0||i&&t.qTop+t.qHeight<e.height}}},request:function({layoutService:e,definitionPath:t}){const n=e.getLayoutValue("dimensionAxis.axisDisplayMode","auto");return e=>{const r={method:"getHyperCubeStackData",args:[t,[e]]};return"auto"===n&&r.args.push(600),r}}};var $1={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 U1="pages";const W1="discretePan";function Y1({chart:e,actions:t,componentKey:n,dockService:r,rtl:i,scroller:o}){return{type:"Pan",key:"discrete:pan",options:{event:W1,pointers:1,threshold:10,enable(r,i){return this.started===W1||!i||!!t.scroll.enabled()&&e.componentsFromPoint({x:i.center.x,y:i.center.y}).some((e=>e.key===n))}},events:{discretePanstart(e){e.preventDefault(),this.started=W1;const t="horizontal"===r.meta.major.orientation?e.deltaX:e.deltaY;this.previousTotalDelta=t<0?-10:10},discretePanmove(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)},discretePanend(e){e.preventDefault(),this.started=!1},discretePancancel(e){e.preventDefault(),this.started=!1}}}}function X1({chart:e,componentKey:t,actions:n,scroller:r}){return function(i){if(!n.scroll.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 G1({layoutService:e,areaBuffer:t}){const n=void 0===t?function({layoutService:e}){const t=Math.floor(L1/(e.meta.dimensionCount+e.meta.measureCount));return function({width:e,height:n}){const r=Math.min(t,Math.max(F1,n));return{width:e,height:Math.max(z1,Math.min(n*j1,r))}}}({layoutService:e}):function({layoutService:e}){const t=Math.floor(L1/(e.meta.dimensionCount+e.meta.measureCount));return function({width:e,height:n}){return{width:e,height:Math.min(t,n)}}}({layoutService:e}),r={width:e.meta.size.x,height:e.meta.size.y};return function(e){const{width:t,height:i}=n({width:e.qWidth,height:e.qHeight}),o=i?Math.ceil((i-e.qHeight)/2):0,a=t?Math.ceil((t-e.qWidth)/2):0;return{qHeight:i?Math.min(i,r.height):e.qHeight,qWidth:t?Math.min(t,r.width):e.qWidth,qTop:i?Math.max(0,Math.min(e.qTop-o,r.height-i)):e.qTop,qLeft:t?Math.max(0,Math.min(e.qLeft-a,r.width-t)):e.qLeft}}}function K1(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(_1),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(_1),n=e})(a):r(a)}));return i.isProcessing=()=>!!t,i.hasQueued=()=>!!n,i.cancel=()=>{i.isProcessing()&&t.cancel(),i.hasQueued()&&(n.reject(_1),n=null)},i}const J1={command:{update:()=>{}}};function Z1({dataStore:e,composition:t,enigmaModel:n,layoutService:r,trendLineModel:i=J1,definitionPath:o,areaBuffer:a,processDataPage:s}){const{slicer:l,cacheWarden:u,request:c}=t,d=function({dataStore:e,slice:t,warden:n,expand:r,request:i,process:o,connectionless:a,processDataPage:s}){return(l,{onProcessing:u}={})=>{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()&&u&&u();const c=r(l);return o(i(c)).then((n=>(s(n),e.add(n),t(n,l))))}}({dataStore:e,slice:l,warden:u({bounds:{width:r.meta.size.x,height:r.meta.size.y}}),expand:G1({layoutService:r,areaBuffer:a}),request:c({layoutService:r,definitionPath:o}),process:K1(n),connectionless:r.meta.isSnapshot,processDataPage:s}),f=gl(((e,{onProcessing:t,onData:n})=>{d(e,{onProcessing:t}).then((e=>n(e))).catch((e=>{if(e!==_1)throw e}))}),50);return function(e,{onProcessing:t=P1,onDataPage:n=P1}={}){f(e,{onProcessing:t,onData:e=>{r.setDataPages(e?[e]:[]),i.command.update(),n(e)}})}}var Q1={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 e2={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 t2(e){const{groupSize:t,measureCount:n}=e.meta;return null!=t?t:n}function n2(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 r2(e){return n2(e.qMatrix,(e=>e[0].qElemNumber))-1}var i2={inTotal:function({layoutService:e}){const t=t2(e);return e.meta.size.y*t*(1+1/t)-1},area:function({layoutService:e,itemOffset:t,inView:n,areaBuffer:r}){const i=t2(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=t2(e),o=e.getDataPages()[0],a=r/n.inView,{pixel:s}=t,l=r2(o),u=o.qArea.qHeight*i+l,c=(s+(o.qArea.qTop*i+o.qArea.qTop)*a)/r;return[c,n.inView>=n.inTotal?c+1:c+u/n.inView]}};const o2=(e,t)=>t/(e.meta.size.y/e.meta.size.dimensions[0]+1);function a2(e){return{itemOffset(t,n){if(0!==t.qArea.qTop)return o2(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:o2(e,n)},area(t,n,r){if(0!==t.qArea.qTop)return o2(e,n);return n2(t.qMatrix.slice(0,r.qTop+1),(e=>e[0].qElemNumber))-1}}}var s2={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=a2(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:u}=n,c=a2(t).area(e(),l,a.qArea),d=r2(a),f=a.qArea.qHeight+d,h=u===o?(r.inView-f)*s/i:(u+(a.qArea.qTop+c)*s)/i;return[h,r.inView>=r.inTotal?h+1:h+f/r.inView]}};function l2({rect:e,dockService:t,itemWidths:n,dimensionAxis:r,inTotal:i,isMajorVisible:o,isMajorLabelless:a,maxDataRows:s}){const{DEFAULT:l,SQUEEZE:u,LABELLESS:c}=n[t.meta.chart.mode],{axisDisplayMode:d="auto",maxVisibleItems:f=10}=r,h="horizontal"===t.meta.major.orientation?e.width:e.height,p=h/i>=u;switch(d){case"max":return Math.min(i,s);case"custom":return Math.min(f,s);case"auto":default:return!o||a?h/c:p?i:h/l}}function u2({chart:e,getRect:t,getDataPages:n,layoutService:r,dockService:i,getItemWidths:o,axisKey:a,areaBuffer:s,rtl:l}){const{inTotal:u,area:c,scaleRange:d}=function({layoutService:e}){const{isDimensionless:t,isGrouped:n,isGroupedByMeasure:r}=e.meta;return t?Q1:n?r?i2:s2:e2}({layoutService:r}),f=()=>"horizontal"===i.meta.major.orientation?t().width:t().height,h=e=>e?f()/e:0,p=(e,t)=>-(e-t)*h(t);return{getItems(){const n=r.getLayoutValue("dimensionAxis"),s=u({layoutService:r}),l=e.component(a),c=!a||!l||l.isVisible();return{inTotal:s,inView:l2({rect:t(),dockService:i,itemWidths:o(),dimensionAxis:n,inTotal:s,isMajorVisible:c,isMajorLabelless:"none"===n.show||"title"===n.show,maxDataRows:Math.floor(L1/(r.meta.dimensionCount+r.meta.measureCount))})}},getItemSize({items:e}){const{inView:t}=e;return h(t)},getOffsets({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t,i=Math.min(0,Math.max(e,p(n,r)));return{pixel:i,item:r?Math.abs(r*i/f()):0}},getUpperBound({items:e}){const{inTotal:t,inView:n}=e;return p(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,o+e/i]}({viewSize:f(),inTotal:n,inView:r,pixelOffset:e})},getArea:({itemOffset:e,items:t})=>c({getDataPages:n,layoutService:r,itemOffset:e,inView:t.inView,areaBuffer:s}),getScaleRange({offsets:e,items:t}){const o=d({getDataPages:n,layoutService:r,offsets:e,items:t,viewSize:f(),upperBound:p(t.inTotal,t.inView)});return"horizontal"===i.meta.major.orientation&&l?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>=p(n,r)}},convert:{itemToPixelOffset({itemOffset:e,items:t}){const{inView:n}=t,r=e*h(n);return Number.isFinite(r)?-r:0},relativeToPixelOffset({relativeOffset:e,items:t}){const{inTotal:n,inView:r}=t;return-e*(h(r)*n)}}}}function c2({chart:e,componentKey:t,state:n,dataStore:r,pageData:i,layoutService:o,dockService:a,itemWidths:s,getRect:l,axisKey:u,areaBuffer:c,viewState:d,rtl:f}){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 h=u2({chart:e,getRect:()=>n.get("rect"),getDataPages:r.getCurrent,layoutService:o,dockService:a,getItemWidths:()=>n.get("itemWidths"),axisKey:u,areaBuffer:c,rtl:f}),p=()=>{const e=h.getItems();return n.set("items",e),e},m=({pixelOffset:e,items:t})=>{const r=h.getOffsets({pixelOffset:e,items:t});return n.set("offsets",r),r},y=e=>{const t=Date.now(),r=p(),a=m({pixelOffset:e,items:r}),s=h.getArea({itemOffset:a.item,items:r});if((e=>{const[{qArea:t}]=o.getDataPages();return!!t&&Object.keys(e).every((n=>e[n]===t[n]))})(s))return void((h.validate.offset({pixelOffset:e,items:r})||d.get("scrollOffset")!==a.item)&&(n.set("finished",t),n.set("scaleRange",h.getScaleRange({offsets:a,items:r})),d.preventSet("viewRange",h.getViewRange({pixelOffset:a.pixel,items:r})),d.set("scrollOffset",a.item)));d.preventSet("viewRange",h.getViewRange({pixelOffset:a.pixel,items:r}));const l=()=>{n.get("finished")>t||(n.set("finished",t),n.set("scaleRange",h.getScaleRange({offsets:a,items:r})),d.set("scrollOffset",a.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=p();n.set("itemSize",h.getItemSize({items:a}));const u=void 0===d.get("scrollOffset")?(({items:e})=>1===o.getLayoutValue("scrollStartPos")?h.getUpperBound({items:e}):0)({items:a}):h.convert.itemToPixelOffset({itemOffset:d.get("scrollOffset"),items:a}),c=m({pixelOffset:u,items:a});d.preventSet("viewRange",h.getViewRange({pixelOffset:c.pixel,items:a}));const f=h.getArea({itemOffset:c.item,items:a});return new Promise((e=>{i(f,{onDataPage:()=>{n.set("scaleRange",h.getScaleRange({offsets:c,items:a})),d.preventSet("scrollOffset",c.item),e()}})}))},scroll(e){const t=n.get("offsets").pixel+e;y(t)},scrollToRelative(e){const t=n.get("items"),r=h.convert.relativeToPixelOffset({relativeOffset:e,items:t});y(r)}}}function d2({chart:e,actions:t,componentKey:n,enigmaModel:r,layoutService:i,dockService:o,trendLineModel:a,itemWidths:s,viewState:l,rtl:u,options:{definitionPath:c="/qHyperCubeDef",getRect:d,axisKey:f,areaBuffer:h,processDataPage:p=(()=>{})}={}}){const m=ml(),y=function({qMode:e}){switch(e){case"S":default:return V1;case"K":return H1;case"T":return $1}}({qMode:i.getHyperCubeValue("qMode")}),g=function({state:e,contains:t}){return e.set(U1,[]),{add:t=>{const n=e.get(U1);n.length=0,n.push(t)},getCurrent:()=>e.get(U1)[0],getAll:()=>e.get(U1),contains:n=>t(e.get(U1)[0],n)}}({state:m,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:g,composition:y});const v=function({buffer:e}){return void 0===e?void 0:2*Math.round(e/2)}({buffer:h}),b=Z1({dataStore:g,composition:y,enigmaModel:r,layoutService:i,trendLineModel:a,definitionPath:c,areaBuffer:v,processDataPage:p}),x=c2({chart:e,componentKey:n,state:m,dataStore:g,pageData:b,layoutService:i,dockService:o,itemWidths:s,getRect:d,axisKey:f,areaBuffer:v,viewState:l,rtl:u}),M=function({layoutService:e,dataStore:t}){return function(n){const r=hl(n,""+e.refs.dataPages);r.length=0,r.push(t.getCurrent())}}({layoutService:i,dataStore:g});return{interactions:function({chart:e,actions:t,componentKey:n,dockService:r,rtl:i,scroller:o}){return{gestures:[Y1({chart:e,actions:t,componentKey:n,dockService:r,rtl:i,scroller:o})],native:{type:"native",events:{wheel:X1({chart:e,actions:t,componentKey:n,scroller:o})}}}}({chart:e,actions:t,componentKey:n,dockService:o,rtl:u,scroller:x}),query:{getCanScroll:()=>x.enabled(),getItemSize:()=>x.itemSize(),getScaleRange:()=>x.scaleRange(),getCurrentDataPage:()=>g.getCurrent()},command:{initialize:()=>x.initialize(),scrollTo:e=>x.scrollToRelative(e),setSnapshotData:e=>M(e)}}}var f2={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}};function h2({appLayoutModel:e,appModel:t,chart:n,environment:r,flags:i,genericObjectModel:o,layout:a,picasso:s}){const{translator:l,embed:u}=r,c=function({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:ia,miniChartToken:{},embed:s}}({layout:a,app:t,model:o,picasso:s,chart:n,translator:l,localeInfo:e.qLocaleInfo,embed:u});return{query:{useCustomTooltip:()=>c.useCustomTooltip,useTooltipChart:()=>{var e,t,n,r;return i.isEnabled("CUSTOM_TOOLTIP_CHART")&&(null===(e=a.tooltip)||void 0===e||null===(t=e.chart)||void 0===t||null===(n=t.object)||void 0===n?void 0:n.refId)&&c.embed&&"function"==typeof(null===(r=c.model)||void 0===r?void 0:r.getEffectiveProperties)},hasChartLimitation:()=>{var e;return null==t||null===(e=t.isInModalSelection)||void 0===e?void 0:e.call(t)},getCustomTooltipModel:()=>c}}}function p2({layoutService:e,key:t}){const{style:n}=e.getLayoutValue("components",[]).filter((e=>e.key===t))[0]||{};return({property:r,defaultValue:i,index:o})=>{const a=n&&Object.hasOwnProperty.call(n,r)?n[r]:i;if(void 0===o)return a;const{style:s}=e.getHyperCubeValue((e=>`qMeasureInfo.${e}.styling`)(o),[]).filter((e=>e.key===t))[0]||{};return s&&Object.hasOwnProperty.call(s,r)?s[r]:a}}function m2({layoutService:e,dockService:t}){const{BAR:n,LINE:r,POINT:i}=gf,o=p2({layoutService:e,key:"bar"}),a=p2({layoutService:e,key:"line"}),s=()=>{const e=o({property:"strokeWidth",defaultValue:"none"});return e?n.STROKE.WIDTH[e.toUpperCase()]:0};return{query:{bar:{getHasStyling:()=>!!e.getLayoutValue("components",[]).filter((e=>"bar"===e.key)).length,getWidthFn:()=>()=>o({property:"width",defaultValue:.7}),getHasStrokeWidth:()=>!!s(),getStrokeWidth:()=>s(),getStrokeColor:()=>o({property:"strokeColor",defaultValue:{index:-1,color:n.STROKE.COLOR}}).color},line:{getCurveFn:()=>(e,t)=>a({property:"lineCurve",defaultValue:r.CURVE.LINEAR,index:t}),getStrokeWidthFn:()=>(e,n)=>a({property:"lineThickness",defaultValue:"FULL"===t.meta.chart.mode?r.WIDTH.FULL.DEFAULT:r.WIDTH.LESS.DEFAULT,index:n}),getStrokeDasharrayFn:()=>(e,t)=>{const n=a({property:"lineType",defaultValue:r.TYPE.SOLID,index:t});return n&&r.TYPE[n.toUpperCase()]}},point:{getSize:e=>a({property:"dataPointSize",defaultValue:i.SIZE.DEFAULT,index:e})}}}}const{model:y2}=im,g2=({picasso:t,chart:n,environment:r,flags:i,viewState:o,viewCache:a,actions:s,selectionService:l})=>{const u=e.useStaleLayout(),{width:c,height:d}=e.useRect(),[f,h]=e.useState(),[p,m]=e.useState(),y=e.useModel(),g=e.useApp(),v=e.useAppLayout(),b=e.usePlugins();e.useEffect((()=>{if(!(u&&null!=n&&n.update&&r&&o))return;const e=function(e){var t=e.source,n=e.metaAdditionsFn,r=Ta(!0,{},t),i=bl(r),o=function(){return function(e){var t=e.layout,n=e.additionsFn,r=void 0===n?function(){return{}}:n,i=e.additionsProps,o=void 0===i?{}:i,a=t.qHyperCube,s=a.qDimensionInfo,l=a.qMeasureInfo,u=a.qMode,c=s.length,d=l.length,f=pa({mode:{S:"S"===u,P:"P"===u,K:"K"===u,T:"T"===u},dimensionCount:c,measureCount:d,hasMultipleDimensions:c>1,hasMultipleMeasures:d>1,isOneDimensional:1===c,isTwoDimensional:2===c},o);return pa(pa({},f),r({layout:t,meta:f}))}({layout:r,additionsFn:n,additionsProps:{size:i.size}})},a={refs:pa({},i.refs),meta:o(),getLayout:function(){return r},getLayoutValue:function(e,t){return hl(r,e,t)},setLayoutValue:function(e,t){pl(r,e,t),i=bl(r),a.meta=o()},getHyperCube:function(){return r.qHyperCube},getHyperCubeValue:function(e,t){return hl(r.qHyperCube,e,t)},setHyperCubeValue:function(e,t){pl(r.qHyperCube,e,t),i=bl(r),a.meta=o()},getDataPages:function(){return hl(r,i.refs.dataPages)},setDataPages:function(e){pl(r,i.refs.dataPages,e),a.meta=o()}};return a}({source:u,metaAdditionsFn:l1(i)}),{viewState:f={}}=r.options,{legendScrollOffset:p,scrollOffset:m}=e.meta.isSnapshot?e.getLayoutValue("snapshotData.content.chartData",{}):f;o.preventSet("scrollOffset",m),o.preventSet("legendScrollOffset",p),o.preventSet("title",e.getLayoutValue("title"));const x=function({genericObjectModel:e,layoutService:t}){const n={cube:void 0,on:!1},r=d1({genericObjectModel:e,layoutService:t});return{query:{getCube:()=>n.cube,getIsReduced:()=>n.on},command:{initialize:()=>r().then((({reducedCube:e})=>{n.cube=e,n.on=!!(n.cube&&n.cube.qDataPages[0]&&n.cube.qDataPages[0].qIsReduced)})),setSnapshotData:e=>{e.reducedHyperCube=n.cube}}}}({genericObjectModel:y,layoutService:e}),M=fl({chart:n,layoutService:e,config:{logicalSize:{width:c,height:d},rtl:"rtl"===r.options.direction},typeConfig:{type:"major-minor",fallback:"vertical",invert:!0,measureAxes:[{ref:"measureAxes.0",name:"minor"},{ref:"measureAxes.1",name:"minorSecondary"}]}}),S=m2({layoutService:e,dockService:M}),w=s1({layoutService:e,flags:i}),E=e.meta.isDiscrete?function({chart:e,genericObjectModel:t,layoutService:n,dockService:r,seriesModel:i,viewState:o,rtl:a,actions:s}){return d2({chart:e,actions:s,componentKey:om(i),enigmaModel:t,layoutService:n,dockService:r,viewState:o,rtl:a,itemWidths:f2,options:{axisKey:Vo.COMPONENT.AXIS.MAJOR}})}({chart:n,genericObjectModel:y,layoutService:e,dockService:M,seriesModel:w,viewState:o,rtl:"rtl"===r.options.direction,actions:s}):void 0,k=e.meta.isContinuous?y2({model:y,layoutService:e,viewState:o,viewCache:a}):void 0,C=I1({actions:s,appLayoutModel:v,appModel:g,chart:n,environment:r,flags:i,genericObjectModel:y,layoutService:e,picasso:t,seriesModel:w,viewState:o}),O=function(e){var t=e.theme,n=e.styleMatrix,r={theme:t,styleMatrix:Hc(void 0===n?[]:n),styles:void 0};return r.styles=$c(r.styleMatrix,t),{getStyles:function(){return r.styles},getTheme:function(){return r.theme},setTheme:function(e){r.theme=e,r.styles=$c(r.styleMatrix,e)}}}({theme:r.theme,styleMatrix:DJ}),T=function({layoutService:e,seriesModel:t}){const{isContinuous:n}=e.meta,r="qDimensionInfo/0",i=r+":numeric";return{main:{major:r,majorNumeric:i,minorsPrimary:t.meta.primarySeries.map((e=>e.ref)),minorsSecondary:t.meta.secondarySeries.map((e=>e.ref))},virtuals:n?[{key:i,from:r,override:{value:e=>e.qNum}}]:void 0}}({layoutService:e,seriesModel:w}),A=m1({isPrimary:!0,layoutService:e,reducedModel:x,seriesModel:w,continuousModel:k,flags:i}),N=m1({isPrimary:!1,layoutService:e,reducedModel:x,seriesModel:w,continuousModel:k,flags:i}),q=N1({config:{measureAxesRef:"measureAxes.0",formatter:Vo.FORMATTER.PRIMARY},chart:n,layoutService:e,extremumModel:A,dockService:M,seriesModel:w,themeService:O}),D=N1({config:{measureAxesRef:"measureAxes.1",formatter:Vo.FORMATTER.SECONDARY},chart:n,layoutService:e,extremumModel:N,dockService:M,seriesModel:w,themeService:O}),R=q1({genericObjectModel:y,layoutService:e}),I=h2({appLayoutModel:v,appModel:g,chart:n,environment:r,flags:i,genericObjectModel:y,layout:u,picasso:t}),_=Fo({layoutService:e,discreteModel:E}),P=function(e){return{layout:e.getLayout(),keys:{SCALE:{MAJOR:Vo.SCALE.MAJOR,MAJOR_INNER:Vo.SCALE.MAJOR_INNER,MINOR:{PRIMARY:Vo.SCALE.MINOR.PRIMARY,SECONDARY:Vo.SCALE.MINOR.SECONDARY}},COMPONENT:{BAR_PRIMARY:`${Vo.COMPONENT.BAR}-${$o.PRIMARY}`,BAR_SECONDARY:`${Vo.COMPONENT.BAR}-${$o.SECONDARY}`,AXIS:{MAJOR:Vo.COMPONENT.AXIS.MAJOR,MAJOR_CONTINUOUS:Vo.COMPONENT.AXIS.MAJOR_CONTINUOUS,TIME_INNER:Vo.COMPONENT.AXIS.TIME_INNER,MINOR:{PRIMARY:Vo.COMPONENT.AXIS.MINOR.PRIMARY,SECONDARY:Vo.COMPONENT.AXIS.MINOR.SECONDARY}},AXIS_TITLE:{MAJOR:Vo.COMPONENT.AXIS_TITLE.MAJOR,MINOR:{PRIMARY:Vo.COMPONENT.AXIS_TITLE.MINOR.PRIMARY,SECONDARY:Vo.COMPONENT.AXIS_TITLE.MINOR.SECONDARY}}},COLLECTION:{MAIN:Vo.COLLECTION.MAIN}}}}(e),L=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 da(regeneratorRuntime.mark((function e(){var r,a,s,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!o.initialized){e.next=2;break}return e.abrupt("return");case 2:return a=Promise.all(n.filter((function(e){return"custom-component"===e.info.type})).map(function(){var e=da(regeneratorRuntime.mark((function e(n){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.info.componentName){e.next=2;break}throw new Error("plugin-service: Custom component is missing componentName");case 2:return e.next=4,n.fn(pa({},i));case 4:if("object"===ua(r=e.sent)){e.next=7;break}throw new Error("plugin-service: Custom component needs to be an object");case 7:t.component(n.info.componentName,r);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())),s=Promise.all(n.filter((function(e){return"component-definition"===e.info.type})).map((function(e){return e.fn(pa({},i))}))),e.next=6,Promise.all([a,s]);case 6:l=e.sent,o.initialized=!0,(r=o.definitions).push.apply(r,ga(l[1]));case 9:case"end":return e.stop()}}),e)})))()},extendComponents:function(e){return o.initialized?(o.definitions.filter(Boolean).forEach((function(t){var n=ya(e.filter((function(e){return e.key&&e.key===t.key})),1)[0];if(n){var r=Ta(!0,{},n.brush);Ta(!0,n,t),t.brush&&(n.brush=function(e,t){return"object"===ua(e)&&Object.keys(e).length?(Array.isArray(t.consume)&&(e.consume=xl({originalArray:e.consume,newArray:t.consume,matchKey:"context"})),Array.isArray(t.trigger)&&(e.trigger=xl({originalArray:e.trigger,newArray:t.trigger,matchKey:"on"})),e):t}(r,t.brush))}else e.push(t)})),e):e}}}({picassoInstance:t,plugins:b,pluginArgs:P});h({selectionService:l,genericObjectModel:y,appModel:g,dockService:M,styleModel:S,layoutService:e,fieldModel:T,seriesModel:w,reducedModel:x,primaryExtremumModel:A,secondaryExtremumModel:N,primaryTickModel:q,secondaryTickModel:D,propertiesModel:R,colorService:C,themeService:O,appLayoutModel:v,tooltipModel:I,flags:i,...E&&{discreteModel:E},...k&&{continuousModel:k},refLineModel:_,pluginService:L})}),[u,y,g,v,r,null==n?void 0:n.update,o]);const[,x]=e.usePromise((()=>{if(!f)return Promise.resolve();const{layoutService:e,colorService:t,reducedModel:n,primaryExtremumModel:i,secondaryExtremumModel:a,propertiesModel:u,continuousModel:c,discreteModel:d,pluginService:h}=f,p=c?()=>{var t,n;c.update(e.getLayout());const i=c.initialFetch(),a=!e.meta.isSnapshot&&(null==r||null===(t=r.options)||void 0===t||null===(n=t.viewState)||void 0===n?void 0:n.zoom);return a&&o.preventSet("zoom",a),i}:()=>Promise.resolve(),g=t.initialize().then((()=>{const e=t.getSettings().field;l.setBrushAliases({colorField:e}),t.custom.updateLegend()}));return Promise.all([h.initialize(),n.command.initialize(),y?u.command.initialize():Promise.resolve(),g,p(),s.scroll.attachDiscreteModel(d)]).then((()=>Promise.all([i.command.initialize(),a.command.initialize()]).then((()=>m(f)))))}),[f]);if(x)throw x;return p};function v2(){const[t,n]=e.useState();return e.useEffect((()=>{n(function(e){var t=pa({},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}))}),[]),t}const b2={shapes:[{type:"path",attrs:{d:"M15.9488039,5.20769129 C16.0487326,6.70662306 15.3492311,8.30548361 14.050157,9.30477145 C12.651154,10.5039169 10.8524359,10.8037032 8.85386017,10.4039881 L7.3549284,10.0042729 L5.75606786,9.70448659 C5.75606786,9.90434416 5.65613907,10.0042729 5.4562815,10.2041305 C5.05656637,10.6038456 4.55692244,10.8037032 4.05727852,10.8037032 C3.75749217,10.8037032 3.45770582,10.7037744 3.15791946,10.6038456 C3.05799068,10.903632 3.15791946,11.2034184 3.45770582,11.7030623 C5.05656637,14.0014243 3.85742095,15.9000712 3.75749217,16 L2.2585604,15.3004985 C2.2585604,15.2005697 2.95806189,14.0014243 1.95877405,12.6024213 C1.6589877,12.0028486 1.15934378,11.0035608 1.55905891,10.0042729 C1.6589877,9.80441537 1.75891648,9.6045578 1.95877405,9.40470024 C1.6589877,8.90505631 1.55905891,8.30548361 1.85884527,7.7059109 C1.55905891,7.40612455 1.25927256,7.1063382 1.15934378,6.70662306 C0.859557424,5.90719279 0.959486209,4.5081898 1.6589877,3.30904439 C1.95877405,2.6095429 2.55834676,2.0099702 3.15791946,1.51032628 C3.95734974,0.91075357 4.95663758,0.610967217 6.15578299,0.311180864 C9.05371774,-0.388320626 11.9516525,0.111323295 13.9502282,1.61025506 C15.1493736,2.50961412 15.8488751,3.80868831 15.9488039,5.20769129 Z M13.0508691,8.10562604 C13.8502994,7.40612455 14.3499433,6.40683671 14.3499433,5.30762008 C14.2500145,4.20840345 13.550513,3.40897318 12.9509403,2.90932926 C12.1515101,2.40968533 11.252151,2.0099702 10.1529344,1.81011263 C8.95378895,1.61025506 7.75464354,1.71018384 6.45556935,1.91004141 C4.75678001,2.30975655 3.65756338,3.00925804 3.05799068,4.10847467 C2.55834676,5.00783373 2.65827554,5.90719279 2.75820433,6.20697914 C2.75820433,6.30690792 2.85813311,6.40683671 3.05799068,6.40683671 C3.15791946,6.40683671 3.25784825,6.40683671 3.35777703,6.40683671 C3.45770582,6.40683671 3.45770582,6.40683671 3.45770582,6.40683671 L3.5576346,6.40683671 L3.65756338,6.40683671 C4.65685123,6.40683671 5.4562815,6.90648063 5.85599664,7.80583969 L5.85599664,8.00569726 C6.35564056,8.10562604 7.05514205,8.30548361 7.75464354,8.50534118 L9.25357531,8.90505631 C10.0530056,9.0049851 10.7525071,9.0049851 11.4520086,8.80512753 C12.0515813,8.70519875 12.5512252,8.40541239 13.0508691,8.10562604 Z"}}]};const x2={query:{getCanScroll:()=>!0}};function M2(){const t=e.useConstraints(),[n,r]=e.useState(!1),[i,o]=e.useState(!1),[a,s]=e.useState(!1),l=function(){const t=e.useConstraints(),[n,r]=e.useState(!1),[i,o]=e.useState({}),[a,s]=e.useState();return e.useEffect((()=>()=>{o({})}),[]),e.useEffect((()=>{t&&r(!t.select&&!t.active)}),[t]),{enabled:()=>n,emit:(e,...t)=>i[e].forEach((e=>e(...t))),removeListener:(e,t)=>{var n;const r=null===(n=i[e])||void 0===n?void 0:n.indexOf(t);r>-1&&i[e].splice(r,1)},on:(e,t)=>{Array.isArray(i[e])?i[e].push(t):i[e]=[t]},get brushSelectionIncludeMax(){return a},set brushSelectionIncludeMax(e){s(e)},getBrushOptions:void 0}}(),u=function(){var t,n,r;const i=e.useConstraints(),[o,a]=e.useState(!1),[s,l]=e.useState(!1),u=e.useLayout(),c=!!u.qSelectionInfo.qInSelections,d=!(null===(t=u.qHyperCube)||void 0===t||null===(n=t.qDimensionInfo)||void 0===n||null===(r=n[0])||void 0===r||!r.qIsOneAndOnlyOne);e.useEffect((()=>{i&&a(!i.select&&!i.active)}),[i]);const f=e=>{l("boolean"==typeof e?e:!s)};return e.useAction((()=>({key:"lasso",label:"Lasso",icon:b2,hidden:!o||!c||d,active:s,action:f})),[c,d,s,o]),{action:f,enabled:()=>o,active:()=>s}}();let c=x2;e.useEffect((()=>{t&&(r(!t.active),o(!t.active),s(!t.passive))}),[t]);const[d]=e.useState({});return d.scroll={enabled:()=>n&&c.query.getCanScroll(),attachDiscreteModel:e=>{c=e||x2}},d.interact={enabled:()=>i},d.tooltip={enabled:()=>a},d.lasso=u,d.select=l,d}function S2({clearMinor:e,clearDiscrete:t,clearLegend:n}){e(),e({componentName:"minor-secondary-range-brush",eventName:"minorRange-secondary"}),t({brushName:!1}),n()}function w2({setSelectionInfo:e,event:t,components:n,clear:r}){const i=null!=n&&n.length?n.map((e=>e.key)).filter(Boolean):[];e({event:t,components:i,minorRangePrimary:"minorRange"===t,minorRange:["minorRange","minorRange-secondary"].includes(t),legendRange:"legendRange"===t,legendTap:"tap"===t&&i[0]===Vo.COMPONENT.LEGEND_CATEGORICAL}),r()}var E2={exports:{}};!function(e,t){!function(t,n){e.exports=n()}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/conversion/",n(n.s="./index.js")}({"../node_modules/extend/index.js":
|
|
64
64
|
/*!***************************************!*\
|
|
65
65
|
!*** ../node_modules/extend/index.js ***!
|
|
66
66
|
\***************************************/
|
|
@@ -1025,4 +1025,4 @@ function(e,t,n){n.r(t),t.default={useMasterNumberFormat:function(e){e.quarantine
|
|
|
1025
1025
|
!*** ./utils/wrap-file-name.js ***!
|
|
1026
1026
|
\*********************************/
|
|
1027
1027
|
/*! exports provided: default */
|
|
1028
|
-
function(e,t,n){function r(e){return e.split(" ").length>1&&"="!==e[0]&&"["!==e[0]?"[".concat(e,"]"):e}n.r(t),n.d(t,"default",(function(){return r}))}})}))}(E2);var k2=n(E2.exports);const C2={version:"1.8.13",qHyperCubeDef:{qAlwaysFullyExpanded:!0,qDimensions:[],qMeasures:[],qInitialDataFetch:[{qWidth:17,qHeight:500}],qSuppressMissing:!0,qSuppressZero:!1},showTitles:!0,subtitle:"",title:"",footnote:"",barGrouping:{grouping:"grouped"},orientation:"vertical",scrollStartPos:0,nullMode:"gap",dataPoint:{show:!1,showLineLabels:!1,showBarLabels:!1},color:{auto:!0,mode:"primary",useBaseColors:"off",paletteColor:{index:6},useDimColVal:!0,useMeasureGradient:!0,persistent:!1,expressionIsColor:!0,expressionLabel:"",measureScheme:"sg",reverseScheme:!1,dimensionScheme:"12",autoMinMax:!0,measureMin:0,measureMax:10},legend:{dock:"auto",show:!0,showTitle:!0},components:[],dimensionAxis:{axisDisplayMode:"auto",continuousAuto:!0,dock:"near",label:"auto",maxVisibleItems:10,show:"all"},measureAxes:[{show:"all",dock:"near",spacing:1,autoMinMax:!0,minMax:"min",min:0,max:10},{show:"all",dock:"far",spacing:1,autoMinMax:!0,minMax:"min",min:0,max:10}],refLine:{refLines:[],refLines2:[],dimRefLines:[]},preferContinuousAxis:!0,showMiniChartForContinuousAxis:!0,tooltip:{auto:!0,hideBasic:!1,title:"",description:"",chart:void 0,imageComponents:void 0}};var O2=e=>t=>{const n=t.qHyperCubeDef.qMeasures,r=[0,0,0];let i;if(!n.length)return e.get("Visualizations.Descriptions.Bars");for(let e=0;e<n.length;++e)i=Lh(n[e].qDef.series),i===Ho.BAR?r[0]=1:i===Ho.LINE?r[1]=1:r[2]=1;const o=["Visualizations.Descriptions.Marker","Visualizations.Descriptions.Line","Visualizations.Descriptions.ComboChart.Dimension.LineMarker","Visualizations.Descriptions.Bars","Visualizations.Descriptions.ComboChart.Dimension.BarMarker","Visualizations.Descriptions.ComboChart.Dimension.BarLine","Visualizations.Descriptions.ComboChart.Dimension.BarLineMarker"][parseInt(r.join(""),2)-1];return e.get(o)},T2=e=>(t,n)=>{let r;const i=t.qHyperCubeDef.qMeasures[n];if(i){const{type:e}=i.qDef.series;r=e===Ho.LINE?"Visualizations.Descriptions.HeightLine":e===Ho.BAR?"Visualizations.Descriptions.LengthBars":"Visualizations.Descriptions.ComboChart.Measure.HeightMarker"}else r=n?"Visualizations.Descriptions.HeightLine":"Visualizations.Descriptions.LengthBars";return e.get(r)};function A2(e){var t,n;const r=e.qHyperCubeDef.qMeasures,i=null===(t=e.color)||void 0===t?void 0:t.mode;"byDimension"===i&&1===r.length&&Lh(null===(n=r[0].qDef)||void 0===n?void 0:n.series)===Ho.LINE?e.color.mode="primary":"byDimension"===i&&r.length>1&&(e.color.mode="byMultiple")}function N2(e){const{translator:t}=e;return{dimensions:{min:1,max:1,description:O2(t)},measures:{min:1,max:15,description:T2(t),added({qDef:e},t){var n;A2(t),null!==(n=e.series)&&void 0!==n&&n.type||(t.qHyperCubeDef.qMeasures.length>1?e.series={type:Ho.LINE,axis:$o.SECONDARY}:e.series={type:Ho.BAR,axis:$o.PRIMARY})},moved(e,t){A2(t)}}}}function q2(e){const t=N2(e);return{properties:C2,data:{targets:[{path:"/qHyperCubeDef",...t}]},importProperties:({exportFormat:e,initialProperties:n,hypercubePath:r})=>{const i=k2.axisChart.importProperties({exportFormat:e,initialProperties:n,dataDefinition:t,hypercubePath:r}),o="linechart"===e.properties.visualization,a=[];i.qProperty.qHyperCubeDef.qMeasures.forEach((e=>{e.qDef.series||(e.qDef.series={type:o?"line":"bar",axis:0,marker:"circle",markerFill:!0}),a.indexOf(e.qDef.series.axis)<0&&a.push(e.qDef.series.axis)}));const s=a.sort().shift();return i.qProperty.measureAxes[s]&&e.properties.measureAxis&&void 0!==e.properties.measureAxis.autoMinMax&&d(!0,i.qProperty.measureAxes[s],e.properties.measureAxis,{logarithmic:!1}),i},exportProperties:({propertyTree:e,hyperCubePath:t,viewDataMode:n})=>k2.axisChart.exportProperties({propertyTree:e,hyperCubePath:t,viewDataMode:n})}}function D2(){const e={component:"dropdown",type:"string",expression:"optional",baseRef:"style.strokeWidth",translation:"LayerStyleEditor.style.strokeWidth",show:!0,defaultValue:"none",options:[{value:"none",translation:"LayerStyleEditor.style.strokeWidth.none"},{value:"small",translation:"LayerStyleEditor.style.strokeWidth.small"},{value:"medium",translation:"LayerStyleEditor.style.strokeWidth.medium"},{value:"large",translation:"LayerStyleEditor.style.strokeWidth.large"}]},t={component:"color-picker",type:"object",baseRef:"style.strokeColor",translation:"LayerStyleEditor.style.strokeColor",dualOutput:!0,show:t=>"none"!==hl(t,`${((e,t)=>{let n=-1;for(let r=0;r<e.length;r++)if(e[r].key===t){n=r;break}return n})(t,"bar")}.${e.baseRef}`),defaultValue:()=>({index:-1,color:"#205891"})},n={component:"slider",type:"number",expression:"optional",baseRef:"style.dataPointSize",translation:"LayerStyleEditor.style.dataPointSize",show:!0,defaultValue:6,min:3,max:20,step:1},r={component:"slider",type:"number",expression:"optional",baseRef:"style.lineThickness",translation:"LayerStyleEditor.style.lineThickness",show:!0,defaultValue:1,min:1,max:5,step:1},i={component:"dropdown",type:"string",expression:"optional",baseRef:"style.lineType",translation:"LayerStyleEditor.style.lineType",show:!0,defaultValue:"solid",options:[{value:"solid",translation:"LayerStyleEditor.style.solid"},{value:"dashed",translation:"LayerStyleEditor.style.dashed"}]},o={component:"dropdown",type:"string",expression:"optional",baseRef:"style.lineCurve",translation:"LayerStyleEditor.style.lineCurve",show:!0,defaultValue:"linear",options:[{value:"linear",translation:"LayerStyleEditor.style.linear"},{value:"monotone",translation:"LayerStyleEditor.style.monotone"}]};return{component:"style-editor",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",resetBtnTranslation:"LayerStyleEditor.component.resetAll",key:["bar","line"],ref:"components",defaultValue:[],defaultValues(a){const s="grouped"===a.barGrouping.grouping,l=a.qHyperCubeDef.qMeasures.filter((e=>Lh(e.qDef.series)===Ho.BAR)).length,u=s&&l>1;return[{key:"bar",style:{strokeWidth:e.defaultValue,strokeColor:t.defaultValue(),width:u?.9:.7}},{key:"line",style:{dataPointSize:n.defaultValue,lineThickness:r.defaultValue,lineType:i.defaultValue,lineCurve:o.defaultValue}}]},items:{list:{type:"items",component:"expandable-items",items:{bar:{type:"items",translation:"Visualizations.Descriptions.Bar",expanded:!0,styleKey:"bar",items:{barStrokeWidth:e,barStrokeColor:t,barWidth:{component:"slider",type:"number",expression:"optional",baseRef:"style.width",translation:"LayerStyleEditor.style.barWidth",show:(e,t,n)=>{const r=t.getMeasures().some((e=>Lh(e.qDef.series)===Ho.LINE));return!k.continuous(n.layout,r&&x.isTime(!0,n.layout))},defaultValue:.7,min:.01,max:1,step:.01}}},line:{type:"items",translation:"Visualizations.Descriptions.Line",expanded:!0,styleKey:"line",items:{dataPointSize:n,lineThickness:r,lineType:i,lineCurve:o}}}}}}}function R2(e){const t=hl(e,"qHyperCube.qMeasureInfo",[]).some((({series:e=Uo})=>Lh(e)===Ho.LINE));return k.continuous(e,(()=>t&&x.isTime(!0,e)))}function I2(e){var t,n;return!(null===(t=e.qDef)||void 0===t||null===(n=t.color)||void 0===n||!n.on)}function _2(e){var t,n,r;return I2(e)&&"primary"===(null!==(t=null===(n=e.qDef)||void 0===n||null===(r=n.color)||void 0===r?void 0:r.mode)&&void 0!==t?t:"primary")}function P2(e){var t,n;return I2(e)&&"byExpression"===(null===(t=e.qDef)||void 0===t||null===(n=t.color)||void 0===n?void 0:n.mode)}function L2(e){var t,n,r,i,o;if(null!=e&&null!==(t=e.color)&&void 0!==t&&t.auto||"byExpression"!==(null==e||null===(n=e.color)||void 0===n?void 0:n.mode))return[];const a=null==e||null===(r=e.color)||void 0===r?void 0:r.colorExpression,s=null!==(i=null==e||null===(o=e.color)||void 0===o?void 0:o.expressionLabel)&&void 0!==i?i:"";return a?[{qExpression:a,label:s,id:"colorByExpression"}]:[]}function j2(e){return P2(e)?[{qExpression:e.qDef.color.colorExpression,id:"colorByMeasureExpression"}]:[]}function z2(e){var t,n;(null!==(t=null==e||null===(n=e.qHyperCubeDef)||void 0===n?void 0:n.qMeasures)&&void 0!==t?t:[]).forEach(((t,n)=>function(e,t,n){e.qAttributeExpressions=0===t?[...L2(n),...j2(e)]:j2(e)}(t,n,e)))}function F2(e){const{flags:t}=e,n={ref:"qDef.series.type",type:"string",component:"item-selection-list",defaultValue:"bar",schemaIgnore:!0,horizontal:!0,items:[{icon:e=>"stacked"===e.barGrouping.grouping||R2(e)?"stacked":"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.bar",value:"bar"},{icon:"line_chart_line",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.line",value:"line"},{icon:"shapes",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.marker",value:"marker"}],change:e=>(e.qDef.series.type!==Ho.BAR||t.isEnabled("BARS_IN_SECONDARY_AXIS")||(e.qDef.series.axis=0),e)},r={ref:"qDef.series.axis",type:"integer",component:"dropdown",defaultValue:0,options:[{translation:"properties.axis.primary",value:0},{translation:"properties.axis.secondary",value:1}],show(e){var n;return!!t.isEnabled("BARS_IN_SECONDARY_AXIS")||Lh(null===(n=e.qDef)||void 0===n?void 0:n.series)!==Ho.BAR}},i={ref:"qDef.series.marker",type:"string",component:"dropdown",defaultValue:"circle",options:[{translation:"properties.marker.circle",value:"circle"},{translation:"properties.marker.rect",value:"rect"},{translation:"properties.marker.diamond",value:"diamond"},{translation:"properties.marker.triangle",value:"triangle"},{translation:"properties.marker.line",value:"line"}],show(e){var t;return Lh(null===(t=e.qDef)||void 0===t?void 0:t.series)===Ho.MARKER}},o={ref:"qDef.series.markerFill",translation:"properties.series.fill",type:"boolean",defaultValue:!0,show(e){var t;return Lh(null===(t=e.qDef)||void 0===t?void 0:t.series)===Ho.MARKER&&!["line"].includes(e.qDef.series.marker)}};let a;if(t.isEnabled("BASIC_COLOR_OPTIONS_PER_MEASURE")){var s,l;const t={ref:"qDef.color.on",translation:"properties.colors",type:"boolean",component:"switch",defaultValue:!1,trueOption:{value:!1,translation:"Common.Auto"},falseOption:{value:!0,translation:"Common.Custom"}},u={ref:"qDef.color.mode",type:"string",component:"dropdown",options:[{value:"primary",translation:"properties.colorMode.primary"},{value:"byExpression",translation:"properties.colorMode.byExpression"}],defaultValue:"primary",show:(...e)=>I2(...e)},c=null===(s=e.anything)||void 0===s||null===(l=s.sense)||void 0===l?void 0:l.theme;a={supPanel:{translation:"properties.measure.moreProperties",title:"properties.measure.moreProperties",subTitle:(e,t,n)=>{var r;return null===(r=n.measureTitle)||void 0===r?void 0:r.call(n)},component:"sub-panel",type:"items",items:{groups:{type:"items",component:"expandable-items",items:{presentation:{type:"items",translation:"properties.presentation",items:{seriesType:n,seriesAxis:r,seriesMarker:i,seriesMarkerFill:o}},color:{type:"items",translation:"properties.color",items:{customColor:t,colorMode:u,paletteColor:{ref:"qDef.color.paletteColor",translation:"properties.color",type:"object",component:"color-picker",dualOutput:!0,defaultValue:()=>{var e;const{primary:t}=c.getDataColorSpecials(),n=null===(e=c.getDataColorPickerPalettes()[0])||void 0===e?void 0:e.colors,r=n.indexOf(t);return{index:-1===r?Math.min(6,n.length-1):r}},show:_2},attributeExpression:{type:"string",component:"expression",expressionType:"measure",schemaIgnore:!0,ref:"qDef.color.colorExpression",translation:"Common.Expression",show:P2}}}}}}}}}else a={seriesType:n,seriesAxis:r,seriesMarker:i,seriesMarkerFill:o};return{items:{series:{type:"items",items:a}}}}function B2(e,t,n,r){let i;const o=n||0;var a,s;t?i=t.getMeasureLayouts():i=null!==(a=null==e||null===(s=e.qHyperCubeDef)||void 0===s?void 0:s.qMeasures)&&void 0!==a?a:[];return i.filter((e=>{const{series:t}=e||{};return 0===o?LJ(t,r):!LJ(t,r)}))}function V2(e,t){return t.getMeasures().filter((e=>Lh(e.qDef.series)===Ho.LINE)).length>0}function H2(e,t,n,r){const i=t.getMeasures().filter((e=>Lh(e.qDef.series)===Ho.BAR));return r?i.filter((e=>e.qDef.series.axis===$o.PRIMARY)).length>n||i.filter((e=>e.qDef.series.axis===$o.SECONDARY)).length>n:i.length>n}function $2(e){const{translator:t,flags:n}=e,r=n.isEnabled("BARS_IN_SECONDARY_AXIS"),i={items:{attributeExpression:{ref:"color.colorExpression",change:null,globalChange:e=>z2(e)},expressionLabel:{change:null},disclaimer:{component:"text",translation:"properties.color.colorOnMeasureDisclaimer",style:"hint",show:e=>n.isEnabled("BASIC_COLOR_OPTIONS_PER_MEASURE")&&e.qHyperCubeDef.qMeasures.some((e=>I2(e)))}}},o={uses:"settings",items:{presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:{comboStyling:D2(),grouping:{ref:"barGrouping.grouping",type:"string",component:"item-selection-list",defaultValue:"grouped",horizontal:!0,items:[{icon:"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.grouped",value:"grouped"},{icon:"stacked",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.stacked",value:"stacked"}],show:(e,t,n)=>H2(0,t,1,r)&&!R2(n.layout)},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)=>R2(n.layout),convertFunctions:(a="vertical",{get:(e,t,n)=>R2(n.layout)?a:e(t.type),set(e,t,n,r){t(n.type,R2(r.layout)?a:e,a)}})},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)=>!R2(n.layout)},nullMode:{type:"string",component:"dropdown",ref:"nullMode",translation:"properties.nullMode",options:[{value:"gap",translation:"properties.nullMode.gap"},{value:"connect",translation:"properties.nullMode.connect"},{value:"zero",translation:"properties.nullMode.zero"}],defaultValue:"gap",show:(e,t)=>V2(0,t)},dataPointSettings:{type:"items",grouped:!1,snapshot:{tid:"property-dataPoint"},show:(e,t)=>V2(0,t),items:{dataPoints:{ref:"dataPoint.show",translation:"properties.dataPoints.showDataPoints",type:"boolean",defaultValue:!1},showLineDataPointLabels:{ref:"dataPoint.showLineLabels",translation:"properties.dataPoints.linelabelmode",type:"boolean",component:"switch",defaultValue:!1,show:e=>e.dataPoint&&e.dataPoint.show,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]}}},showBarLabels:{ref:"dataPoint.showBarLabels",type:"boolean",translation:"properties.dataPoints.barlabelmode",component:"switch",show:(e,t)=>H2(0,t,0,r),defaultValue:!1,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]}}},colorsAndLegend:{uses:"colorsAndLegend",items:{colors:i,legend:{items:{show:{snapshot:{tid:"property-legend"}}}}}},dimensionAxis:{uses:"axis.dimensionAxis",label(e,n){const r="vertical"===n.layout.orientation||R2(n.layout)?"x":"y",i=function(e,t){return t?t.getDimensionLayouts():e.qHyperCubeDef.qDimensions.map((e=>e.qDef))}(e,n).map((e=>e.qFallbackTitle||"")).join(", ");let o;return o=i?t.get(`properties.${r}AxisWithInfo`,[i]):t.get(`properties.${r}Axis`),o},items:{othersGroup:{items:{dock:{options(e,t,n){let r="Common.Bottom",i="Common.Top";return"vertical"===n.layout.orientation||R2(n.layout)||(r=n.yMirrorMode?"properties.dock.right":"properties.dock.left",i=n.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:r},{value:"far",translation:i}]}}}},axisDisplaySettings:{type:"items",components:"items",show:(e,t,n)=>!R2(n.layout),items:{axisDisplayMode:{type:"string",translation:"properties.axis.displaymode",ref:"dimensionAxis.axisDisplayMode",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:{type:"integer",translation:"properties.axis.maxvisiblevalues",ref:"dimensionAxis.maxVisibleItems",expression:"optional",defaultValue:10,show:e=>"custom"===e.dimensionAxis.axisDisplayMode,invalid(e){const{qDimensions:t,qMeasures:n}=e.qHyperCubeDef,{maxVisibleItems:r}=e.dimensionAxis;return r<0||r>1e4/(t.length+n.length)},globalChange(e){if("custom"===e.dimensionAxis.axisDisplayMode){const{qDimensions:t,qMeasures:n}=e.qHyperCubeDef,{maxVisibleItems:r}=e.dimensionAxis;r<1?e.dimensionAxis.maxVisibleItems=10:r>1e4/(t.length+n.length)&&(e.dimensionAxis.maxVisibleItems=Math.min(r,Math.floor(1e4/(t.length+n.length))))}}},hint:{component:"text",translation:"properties.axis.maxvisiblevalues.hint.combochart",style:"hint",show:e=>["custom","max"].indexOf(e.dimensionAxis.axisDisplayMode)>-1}}}}},measureAxis:{uses:"axis.measureAxis",label(e,n){const i="vertical"===n.layout.orientation||R2(n.layout)?"y":"x",o=B2(e,n,0,r).map((e=>e.qFallbackTitle));let a;return a=o.length?t.get(`properties.${i}AxisWithInfo`,[o.join(",")]):t.get(`properties.${i}Axis`),a},show:(e,t)=>B2(e,t,0,r).length>0,items:{axis:{items:{show:{ref:"measureAxes.0.show",snapshot:{title:"properties.axis.primary",tid:"property-primary-axis",show(e){var t;return((null==e||null===(t=e.qHyperCube)||void 0===t?void 0:t.qMeasureInfo)||[]).some((e=>(null==e?void 0:e.series)&&LJ(null==e?void 0:e.series,r)))}}},dock:{ref:"measureAxes.0.dock",show:e=>"none"!==e.measureAxes[0].show,options(e,t,n){let r="Common.Bottom",i="Common.Top";return("vertical"===n.layout.orientation||R2(n.layout))&&(r=n.yMirrorMode?"properties.dock.right":"properties.dock.left",i=n.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:r},{value:"far",translation:i}]}},spacing:{ref:"measureAxes.0.spacing",show:e=>e.measureAxes[0]&&"none"!==e.measureAxes[0].show}}},minMax:{items:{autoMinMax:{ref:"measureAxes.0.autoMinMax"},minMax:{ref:"measureAxes.0.minMax",defaultValue:"min",show:e=>!e.measureAxes[0].autoMinMax},min:{ref:"measureAxes.0.min",show:e=>["min","minMax"].includes(e.measureAxes[0].minMax)&&!e.measureAxes[0].autoMinMax,invalid:e=>"minMax"===e.measureAxes[0].minMax&&e.measureAxes[0].min>=e.measureAxes[0].max},max:{ref:"measureAxes.0.max",show:e=>["max","minMax"].includes(e.measureAxes[0].minMax)&&!e.measureAxes[0].autoMinMax,invalid:e=>"minMax"===e.measureAxes[0].minMax&&e.measureAxes[0].min>=e.measureAxes[0].max}}}}},secondaryMeasureAxis:{uses:"axis.measureAxis",label(e,n){const i="vertical"===n.layout.orientation||R2(n.layout)?"y":"x",o=B2(e,n,1,r).map((e=>e.qFallbackTitle));let a;return a=o.length?t.get(`properties.${i}AxisWithInfo`,[o.join(",")]):t.get(`properties.${i}Axis`),a},show:(e,t)=>B2(e,t,1,r).length>0,items:{axis:{items:{show:{ref:"measureAxes.1.show",snapshot:{title:"properties.axis.secondary",tid:"property-secondary-Axis",show(e){var t;return((null==e||null===(t=e.qHyperCube)||void 0===t?void 0:t.qMeasureInfo)||[]).some((e=>(null==e?void 0:e.series)&&!LJ(null==e?void 0:e.series,r)))}}},dock:{ref:"measureAxes.1.dock",defaultValue:"far",show:e=>"none"!==e.measureAxes[1].show,options(e,t,n){let r="Common.Bottom",i="Common.Top";return("vertical"===n.layout.orientation||R2(n.layout))&&(r=n.yMirrorMode?"properties.dock.right":"properties.dock.left",i=n.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:r},{value:"far",translation:i}]}},spacing:{ref:"measureAxes.1.spacing",show:e=>e.measureAxes[1]&&"none"!==e.measureAxes[1].show}}},minMax:{type:"items",items:{autoMinMax:{ref:"measureAxes.1.autoMinMax"},minMax:{ref:"measureAxes.1.minMax",defaultValue:"min",show:e=>!e.measureAxes[1].autoMinMax},min:{ref:"measureAxes.1.min",show:e=>["min","minMax"].includes(e.measureAxes[1].minMax)&&!e.measureAxes[1].autoMinMax,invalid:e=>"minMax"===e.measureAxes[1].minMax&&e.measureAxes[1].min>=e.measureAxes[1].max},max:{ref:"measureAxes.1.max",show:e=>["max","minMax"].includes(e.measureAxes[1].minMax)&&!e.measureAxes[1].autoMinMax,invalid:e=>"minMax"===e.measureAxes[1].minMax&&e.measureAxes[1].min>=e.measureAxes[1].max}}}}},tooltips:{uses:"tooltip"}}};var a;n.isEnabled("SENSECLIENT_LAYERED_LABELS")&&(o.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"}]});return{type:"items",component:"accordion",items:{data:{uses:"data",items:{dimensions:{items:{nullSuppression:{show:(e,t,n)=>!R2(n.layout)}}},measures:F2(e)}},sorting:{uses:"sortingWithDisclaimer"},addons:{type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}},primaryMeasureAxisRefLines:{uses:"reflines",ref:"refLine.refLines",translation:"properties.primaryMeasureAxisReferenceLines",title:{translation:"properties.primaryMeasureAxisReferenceLines.tooltip"},show:e=>function(e,t){return e.some((e=>LJ(e.qDef.series,t)))}(e.qHyperCubeDef.qMeasures,r)},secondaryMeasureAxisRefLines:{uses:"reflines",ref:"refLine.refLines2",translation:"properties.secondaryMeasureAxisReferenceLines",title:{translation:"properties.secondaryMeasureAxisReferenceLines.tooltip"},show:e=>function(e,t){return e.some((e=>!LJ(e.qDef.series,t)))}(e.qHyperCubeDef.qMeasures,r)},dimRefLines:{uses:"dimReflines"}}},settings:o}}}function U2(e){return e.qHyperCubeDef.qMeasures.filter((e=>Lh(e.qDef.series)===Ho.LINE)).length>0}function W2(e){const{flags:t}=e,n=e.flags.isEnabled("BARS_IN_SECONDARY_AXIS");return{type:"items",component:"accordion",items:{data:{uses:"data"},sort:{uses:"sortWithDisclaimer"},presentation:{uses:"presentation",type:"items",translation:"properties.presentation",grouped:!0,show:(e,t)=>U2(e)||!R2(t),items:{grouping:{ref:"barGrouping.grouping",type:"string",component:"item-selection-list",horizontal:!0,items:[{icon:"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.grouped",value:"grouped"},{icon:"stacked",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.stacked",value:"stacked"}],show:(e,t)=>function(e,t){const n=e.qHyperCubeDef.qMeasures.filter((e=>Lh(e.qDef.series)===Ho.BAR));return t?n.filter((e=>e.qDef.series.axis===$o.PRIMARY)).length>1||n.filter((e=>e.qDef.series.axis===$o.SECONDARY)).length>1:n.length>1}(e,n)&&!R2(t)},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)=>!R2(t)},nullMode:{type:"string",component:"radio-list",ref:"nullMode",translation:"properties.nullMode",options:()=>[{value:"gap",translation:"properties.nullMode.gap"},{value:"connect",translation:"properties.nullMode.connect"},{value:"zero",translation:"properties.nullMode.zero"}],show:e=>U2(e)&&e.qHyperCubeDef.qMeasures.length>1},dataPoints:{ref:"dataPoint.show",translation:"properties.dataPoints.showDataPoints",type:"boolean",show:e=>U2(e)}}},color:{uses:"color",items:{disclaimer:{component:"text",translation:"properties.color.colorOnMeasureDisclaimer",style:"hint",show:e=>t.isEnabled("BASIC_COLOR_OPTIONS_PER_MEASURE")&&e.qHyperCubeDef.qMeasures.some((e=>I2(e)))}}}}}}const Y2={bar:{axis:0,icon:"bar-chart",tid:"as-bar",translation:"contextMenu.asBar"},line:{axis:1,icon:"line-chart",tid:"as-line",translation:"contextMenu.asLine"},marker:{axis:1,icon:"shapes",tid:"as-marker",translation:"contextMenu.asMarker"}};function X2(e,t,n,r,i){const{axis:o,icon:a,tid:s,translation:l}=Y2[i];t.addItem({icon:a,tid:s,translation:l,async select(){let t;t="measure"===e.type?await r.addLibraryMeasure(e.id):await r.addExpressionMeasure(e.name,""),t.qDef.series.type=i,t.qDef.series.axis=o,r.updateGlobalChangeListeners(),n.setProperties(r.properties),window.qvangularGlobal.$rootScope.$broadcast("pp-open-path","data."+t.qDef.cId)}})}function G2(e,t,n,r,i){!function(e,t,n){const{item:r}=e,i=["contextMenu.add",r.name];if(n.canAddMeasure()){const o=e.menu.addItem({translation:i,tid:"add-as"});X2(r,o,t,n,"bar"),X2(r,o,t,n,"line"),X2(r,o,t,n,"marker")}}(e,n,t),t.getMeasures().length>=t.minMeasures()&&e.ReplaceMeasures(n,t,i),e.ColorBy(n,t,i),r()}function K2(e){const t={},{tooltip:n}=e;if(n){var r,i;t.chart_tooltip_custom=!n.auto;const e=null===(r=n.chart)||void 0===r||null===(i=r.object)||void 0===i?void 0:i.refId;!n.auto&&e&&(t.chart_tooltip_custom_mini_chart=e)}return t}const J2=e=>!!(e&&e.qHyperCube.qSize.qcy>0);function Z2(e){return{definition:$2(e),softDefinition:W2(e),support:{snapshot:J2,export:!0,exportData:!0,sharing:!1,viewData:!0,modifiers:["accumulation","movingAverage","difference","normalization"]},getDropMeasureOptions:G2,extendMetrics:K2,importProperties:(t,n,r,i)=>{const o={layout:{templateId:n.templateId}};r.mapProperties(o);const a={defaultDimension:r.getDefaultDimensionProperties(),defaultMeasure:r.getDefaultMeasureProperties()},s=k2.axisChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:N2(e),defaultPropertyValues:a,hypercubePath:i});return function(e,t,n){const r="linechart"===n.properties.visualization,i=[];e.qProperty.qHyperCubeDef.qMeasures.forEach((e=>{e.qDef.series||(e.qDef.series={type:r?"line":"bar",axis:0,marker:"circle",markerFill:!0}),i.indexOf(e.qDef.series.axis)<0&&i.push(e.qDef.series.axis)}));const o=i.sort().shift();e.qProperty.measureAxes[o]&&n.properties.measureAxis&&void 0!==n.properties.measureAxis.autoMinMax&&d(!0,e.qProperty.measureAxes[o],n.properties.measureAxis,{logarithmic:!1}),t.flags.isEnabled("BASIC_COLOR_OPTIONS_PER_MEASURE")&&z2(e.qProperty)}(s,e,t),s},exportProperties:(e,t,n)=>{!function(e){e.qProperty.qHyperCubeDef.qMeasures.forEach((e=>{e.qAttributeExpressions=[]}))}(e);return k2.axisChart.exportProperties({propertyTree:e,hyperCubePath:t,viewDataMode:n})},migrate:{properties:e=>e.qExtendsId?e:function(e){return a1(e.version)&&(e.qHyperCubeDef.qMeasures.forEach((e=>{const{qDef:t}=e;void 0===t.series&&(t.series=Uo),void 0===t.series.type&&(t.series.type=Uo.type),void 0===t.series.axis&&(t.series.axis=t.series.type===Ho.BAR?$o.PRIMARY:$o.SECONDARY),t.series.type===Ho.BAR&&t.series.axis===$o.SECONDARY&&(t.series.axis=$o.PRIMARY)})),e.version=o1),e}(e)}}}return function(t){const{flags:n}=t,r=NJ();return{qae:q2(t),ext:Z2(t),component(){const t=function(){const[t,n]=e.useState();return e.useEffect((()=>n(ml())),[]),t}(),i=v2(),o=function(){const t=e.useOptions(),n=e.useTranslator(),r=e.useEmbed(),i=e.useTheme(),[o,a]=e.useState(),s=e.useDeviceType();return e.useEffect((()=>{a({options:{direction:"ltr",...t},translator:n,theme:i,embed:r,deviceType:s})}),[t.direction,t.freeResize,n.language(),i.name(),s]),o}(),a=M2(),s=function({picasso:t,environment:n}){const r=e.useElement(),[i,o]=e.useState();return e.useEffect((()=>{if(!n)return;r.style.overflow="hidden";const e=t({renderer:{prio:[n.options.renderer||"canvas"]}}).chart({element:r,data:[],settings:{}});o(e);const{destroy:i}=e;return()=>{i()}}),[n]),i}({picasso:r,environment:o}),l=function({chart:t,actions:n}){const r=e.useSelections(),i=e.useStaleLayout(),[o,a]=e.useState();return e.useEffect((()=>{if(null==t||!t.update||!t.scale||!r)return null;const e=t.scale(Vo.SCALE.MAJOR),o=jc({chart:t,actions:n,selections:r,config:{allowSimultaneous:!0,brushRanges:!0,majorScale:e,selectionActions:{clear:S2},selectionEvents:{start:w2}}});o.setLayout(i);const{destroy:s}=o;return a(o),()=>{s()}}),[r,null==t?void 0:t.update,null==t?void 0:t.scale]),e.useEffect((()=>{null!=o&&o.setLayout&&i&&o.setLayout(i)}),[i]),o}({chart:s,actions:a}),u=g2({picasso:r,chart:s,environment:o,flags:n,viewState:i,viewCache:t,actions:a,selectionService:l});Nm({picasso:r,chart:s,models:u,environment:o,viewState:i,viewCache:t,actions:a}),(({picasso:t,chart:n,models:r,environment:i,viewState:o,viewCache:a,actions:s})=>{const{width:l,height:u}=e.useRect(),[,c]=e.usePromise((async()=>{if(!(null!=n&&n.update&&r&&i&&o))return;const{colorService:e,discreteModel:c,dockService:d,layoutService:f,refLineModel:h}=r;function p(){n.update({settings:Em({picasso:t,chart:n,models:r,environment:i,viewState:o,viewCache:a,actions:s})})}d.update({width:l,height:u}),e.custom.updateLegend(),h.update({picasso:t,chart:n,models:r,environment:i,viewState:o,viewCache:a,actions:s});const m=f.getDataPages();f.setDataPages([]),p(),f.setDataPages(m),f.meta.isContinuous||await c.command.initialize(),p()}),[l,u]);if(c)throw c})({picasso:r,chart:s,models:u,environment:o,viewState:i,viewCache:t,actions:a}),(({models:t,chart:n,viewState:r})=>{e.onTakeSnapshot((e=>{if(!t)return;const{layoutService:i,dockService:o,colorService:a,discreteModel:s,continuousModel:l,reducedModel:u}=t,{width:c,height:d}=o.meta.chart.size;return e.snapshotData=e.snapshotData||{},e.snapshotData.content={size:{w:c,h:d}},i.meta.isSnapshot?Promise.resolve():(e.snapshotData.content.chartData={scrollOffset:r.get("scrollOffset"),zoom:r.get("zoom"),legendScrollOffset:C(n,Vo.COMPONENT.LEGEND_CATEGORICAL)},i.meta.isDiscrete?(s.command.setSnapshotData(e),u.command.setSnapshotData(e)):l.setSnapshotData(e),a.getSnapshotData().then((t=>{e.snapshotData.content.chartData={...e.snapshotData.content.chartData,...t}})).catch((()=>{})))})),e.useImperativeHandle((()=>({getViewState(){if(r&&n)return{scrollOffset:r.get("scrollOffset"),zoom:r.get("zoom"),legendScrollOffset:C(n,Vo.COMPONENT.LEGEND_CATEGORICAL)}}})),[r,n])})({models:u,chart:s,viewState:i})}}}}));
|
|
1028
|
+
function(e,t,n){function r(e){return e.split(" ").length>1&&"="!==e[0]&&"["!==e[0]?"[".concat(e,"]"):e}n.r(t),n.d(t,"default",(function(){return r}))}})}))}(E2);var k2=n(E2.exports);const C2={version:"1.8.14",qHyperCubeDef:{qAlwaysFullyExpanded:!0,qDimensions:[],qMeasures:[],qInitialDataFetch:[{qWidth:17,qHeight:500}],qSuppressMissing:!0,qSuppressZero:!1},showTitles:!0,subtitle:"",title:"",footnote:"",barGrouping:{grouping:"grouped"},orientation:"vertical",scrollStartPos:0,nullMode:"gap",dataPoint:{show:!1,showLineLabels:!1,showBarLabels:!1},color:{auto:!0,mode:"primary",useBaseColors:"off",paletteColor:{index:6},useDimColVal:!0,useMeasureGradient:!0,persistent:!1,expressionIsColor:!0,expressionLabel:"",measureScheme:"sg",reverseScheme:!1,dimensionScheme:"12",autoMinMax:!0,measureMin:0,measureMax:10},legend:{dock:"auto",show:!0,showTitle:!0},components:[],dimensionAxis:{axisDisplayMode:"auto",continuousAuto:!0,dock:"near",label:"auto",maxVisibleItems:10,show:"all"},measureAxes:[{show:"all",dock:"near",spacing:1,autoMinMax:!0,minMax:"min",min:0,max:10},{show:"all",dock:"far",spacing:1,autoMinMax:!0,minMax:"min",min:0,max:10}],refLine:{refLines:[],refLines2:[],dimRefLines:[]},preferContinuousAxis:!0,showMiniChartForContinuousAxis:!0,tooltip:{auto:!0,hideBasic:!1,title:"",description:"",chart:void 0,imageComponents:void 0}};var O2=e=>t=>{const n=t.qHyperCubeDef.qMeasures,r=[0,0,0];let i;if(!n.length)return e.get("Visualizations.Descriptions.Bars");for(let e=0;e<n.length;++e)i=Lh(n[e].qDef.series),i===Ho.BAR?r[0]=1:i===Ho.LINE?r[1]=1:r[2]=1;const o=["Visualizations.Descriptions.Marker","Visualizations.Descriptions.Line","Visualizations.Descriptions.ComboChart.Dimension.LineMarker","Visualizations.Descriptions.Bars","Visualizations.Descriptions.ComboChart.Dimension.BarMarker","Visualizations.Descriptions.ComboChart.Dimension.BarLine","Visualizations.Descriptions.ComboChart.Dimension.BarLineMarker"][parseInt(r.join(""),2)-1];return e.get(o)},T2=e=>(t,n)=>{let r;const i=t.qHyperCubeDef.qMeasures[n];if(i){const{type:e}=i.qDef.series;r=e===Ho.LINE?"Visualizations.Descriptions.HeightLine":e===Ho.BAR?"Visualizations.Descriptions.LengthBars":"Visualizations.Descriptions.ComboChart.Measure.HeightMarker"}else r=n?"Visualizations.Descriptions.HeightLine":"Visualizations.Descriptions.LengthBars";return e.get(r)};function A2(e){var t,n;const r=e.qHyperCubeDef.qMeasures,i=null===(t=e.color)||void 0===t?void 0:t.mode;"byDimension"===i&&1===r.length&&Lh(null===(n=r[0].qDef)||void 0===n?void 0:n.series)===Ho.LINE?e.color.mode="primary":"byDimension"===i&&r.length>1&&(e.color.mode="byMultiple")}function N2(e){const{translator:t}=e;return{dimensions:{min:1,max:1,description:O2(t)},measures:{min:1,max:15,description:T2(t),added({qDef:e},t){var n;A2(t),null!==(n=e.series)&&void 0!==n&&n.type||(t.qHyperCubeDef.qMeasures.length>1?e.series={type:Ho.LINE,axis:$o.SECONDARY}:e.series={type:Ho.BAR,axis:$o.PRIMARY})},moved(e,t){A2(t)}}}}function q2(e){const t=N2(e);return{properties:C2,data:{targets:[{path:"/qHyperCubeDef",...t}]},importProperties:({exportFormat:e,initialProperties:n,hypercubePath:r})=>{const i=k2.axisChart.importProperties({exportFormat:e,initialProperties:n,dataDefinition:t,hypercubePath:r}),o="linechart"===e.properties.visualization,a=[];i.qProperty.qHyperCubeDef.qMeasures.forEach((e=>{e.qDef.series||(e.qDef.series={type:o?"line":"bar",axis:0,marker:"circle",markerFill:!0}),a.indexOf(e.qDef.series.axis)<0&&a.push(e.qDef.series.axis)}));const s=a.sort().shift();return i.qProperty.measureAxes[s]&&e.properties.measureAxis&&void 0!==e.properties.measureAxis.autoMinMax&&d(!0,i.qProperty.measureAxes[s],e.properties.measureAxis,{logarithmic:!1}),i},exportProperties:({propertyTree:e,hyperCubePath:t,viewDataMode:n})=>k2.axisChart.exportProperties({propertyTree:e,hyperCubePath:t,viewDataMode:n})}}function D2(){const e={component:"dropdown",type:"string",expression:"optional",baseRef:"style.strokeWidth",translation:"LayerStyleEditor.style.strokeWidth",show:!0,defaultValue:"none",options:[{value:"none",translation:"LayerStyleEditor.style.strokeWidth.none"},{value:"small",translation:"LayerStyleEditor.style.strokeWidth.small"},{value:"medium",translation:"LayerStyleEditor.style.strokeWidth.medium"},{value:"large",translation:"LayerStyleEditor.style.strokeWidth.large"}]},t={component:"color-picker",type:"object",baseRef:"style.strokeColor",translation:"LayerStyleEditor.style.strokeColor",dualOutput:!0,show:t=>"none"!==hl(t,`${((e,t)=>{let n=-1;for(let r=0;r<e.length;r++)if(e[r].key===t){n=r;break}return n})(t,"bar")}.${e.baseRef}`),defaultValue:()=>({index:-1,color:"#205891"})},n={component:"slider",type:"number",expression:"optional",baseRef:"style.dataPointSize",translation:"LayerStyleEditor.style.dataPointSize",show:!0,defaultValue:6,min:3,max:20,step:1},r={component:"slider",type:"number",expression:"optional",baseRef:"style.lineThickness",translation:"LayerStyleEditor.style.lineThickness",show:!0,defaultValue:1,min:1,max:5,step:1},i={component:"dropdown",type:"string",expression:"optional",baseRef:"style.lineType",translation:"LayerStyleEditor.style.lineType",show:!0,defaultValue:"solid",options:[{value:"solid",translation:"LayerStyleEditor.style.solid"},{value:"dashed",translation:"LayerStyleEditor.style.dashed"}]},o={component:"dropdown",type:"string",expression:"optional",baseRef:"style.lineCurve",translation:"LayerStyleEditor.style.lineCurve",show:!0,defaultValue:"linear",options:[{value:"linear",translation:"LayerStyleEditor.style.linear"},{value:"monotone",translation:"LayerStyleEditor.style.monotone"}]};return{component:"style-editor",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",resetBtnTranslation:"LayerStyleEditor.component.resetAll",key:["bar","line"],ref:"components",defaultValue:[],defaultValues(a){const s="grouped"===a.barGrouping.grouping,l=a.qHyperCubeDef.qMeasures.filter((e=>Lh(e.qDef.series)===Ho.BAR)).length,u=s&&l>1;return[{key:"bar",style:{strokeWidth:e.defaultValue,strokeColor:t.defaultValue(),width:u?.9:.7}},{key:"line",style:{dataPointSize:n.defaultValue,lineThickness:r.defaultValue,lineType:i.defaultValue,lineCurve:o.defaultValue}}]},items:{list:{type:"items",component:"expandable-items",items:{bar:{type:"items",translation:"Visualizations.Descriptions.Bar",expanded:!0,styleKey:"bar",items:{barStrokeWidth:e,barStrokeColor:t,barWidth:{component:"slider",type:"number",expression:"optional",baseRef:"style.width",translation:"LayerStyleEditor.style.barWidth",show:(e,t,n)=>{const r=t.getMeasures().some((e=>Lh(e.qDef.series)===Ho.LINE));return!k.continuous(n.layout,r&&x.isTime(!0,n.layout))},defaultValue:.7,min:.01,max:1,step:.01}}},line:{type:"items",translation:"Visualizations.Descriptions.Line",expanded:!0,styleKey:"line",items:{dataPointSize:n,lineThickness:r,lineType:i,lineCurve:o}}}}}}}function R2(e){const t=hl(e,"qHyperCube.qMeasureInfo",[]).some((({series:e=Uo})=>Lh(e)===Ho.LINE));return k.continuous(e,(()=>t&&x.isTime(!0,e)))}function I2(e){var t,n;return!(null===(t=e.qDef)||void 0===t||null===(n=t.color)||void 0===n||!n.on)}function _2(e){var t,n,r;return I2(e)&&"primary"===(null!==(t=null===(n=e.qDef)||void 0===n||null===(r=n.color)||void 0===r?void 0:r.mode)&&void 0!==t?t:"primary")}function P2(e){var t,n;return I2(e)&&"byExpression"===(null===(t=e.qDef)||void 0===t||null===(n=t.color)||void 0===n?void 0:n.mode)}function L2(e){var t,n,r,i,o;if(null!=e&&null!==(t=e.color)&&void 0!==t&&t.auto||"byExpression"!==(null==e||null===(n=e.color)||void 0===n?void 0:n.mode))return[];const a=null==e||null===(r=e.color)||void 0===r?void 0:r.colorExpression,s=null!==(i=null==e||null===(o=e.color)||void 0===o?void 0:o.expressionLabel)&&void 0!==i?i:"";return a?[{qExpression:a,label:s,id:"colorByExpression"}]:[]}function j2(e){return P2(e)?[{qExpression:e.qDef.color.colorExpression,id:"colorByMeasureExpression"}]:[]}function z2(e){var t,n;(null!==(t=null==e||null===(n=e.qHyperCubeDef)||void 0===n?void 0:n.qMeasures)&&void 0!==t?t:[]).forEach(((t,n)=>function(e,t,n){e.qAttributeExpressions=0===t?[...L2(n),...j2(e)]:j2(e)}(t,n,e)))}function F2(e){const{flags:t}=e,n={ref:"qDef.series.type",type:"string",component:"item-selection-list",defaultValue:"bar",schemaIgnore:!0,horizontal:!0,items:[{icon:e=>"stacked"===e.barGrouping.grouping||R2(e)?"stacked":"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.bar",value:"bar"},{icon:"line_chart_line",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.line",value:"line"},{icon:"shapes",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.marker",value:"marker"}],change:e=>(e.qDef.series.type!==Ho.BAR||t.isEnabled("BARS_IN_SECONDARY_AXIS")||(e.qDef.series.axis=0),e)},r={ref:"qDef.series.axis",type:"integer",component:"dropdown",defaultValue:0,options:[{translation:"properties.axis.primary",value:0},{translation:"properties.axis.secondary",value:1}],show(e){var n;return!!t.isEnabled("BARS_IN_SECONDARY_AXIS")||Lh(null===(n=e.qDef)||void 0===n?void 0:n.series)!==Ho.BAR}},i={ref:"qDef.series.marker",type:"string",component:"dropdown",defaultValue:"circle",options:[{translation:"properties.marker.circle",value:"circle"},{translation:"properties.marker.rect",value:"rect"},{translation:"properties.marker.diamond",value:"diamond"},{translation:"properties.marker.triangle",value:"triangle"},{translation:"properties.marker.line",value:"line"}],show(e){var t;return Lh(null===(t=e.qDef)||void 0===t?void 0:t.series)===Ho.MARKER}},o={ref:"qDef.series.markerFill",translation:"properties.series.fill",type:"boolean",defaultValue:!0,show(e){var t;return Lh(null===(t=e.qDef)||void 0===t?void 0:t.series)===Ho.MARKER&&!["line"].includes(e.qDef.series.marker)}};let a;if(t.isEnabled("BASIC_COLOR_OPTIONS_PER_MEASURE")){var s,l;const t={ref:"qDef.color.on",translation:"properties.colors",type:"boolean",component:"switch",defaultValue:!1,trueOption:{value:!1,translation:"Common.Auto"},falseOption:{value:!0,translation:"Common.Custom"}},u={ref:"qDef.color.mode",type:"string",component:"dropdown",options:[{value:"primary",translation:"properties.colorMode.primary"},{value:"byExpression",translation:"properties.colorMode.byExpression"}],defaultValue:"primary",show:(...e)=>I2(...e)},c=null===(s=e.anything)||void 0===s||null===(l=s.sense)||void 0===l?void 0:l.theme;a={supPanel:{translation:"properties.measure.moreProperties",title:"properties.measure.moreProperties",subTitle:(e,t,n)=>{var r;return null===(r=n.measureTitle)||void 0===r?void 0:r.call(n)},component:"sub-panel",type:"items",items:{groups:{type:"items",component:"expandable-items",items:{presentation:{type:"items",translation:"properties.presentation",items:{seriesType:n,seriesAxis:r,seriesMarker:i,seriesMarkerFill:o}},color:{type:"items",translation:"properties.color",items:{customColor:t,colorMode:u,paletteColor:{ref:"qDef.color.paletteColor",translation:"properties.color",type:"object",component:"color-picker",dualOutput:!0,defaultValue:()=>{var e;const{primary:t}=c.getDataColorSpecials(),n=null===(e=c.getDataColorPickerPalettes()[0])||void 0===e?void 0:e.colors,r=n.indexOf(t);return{index:-1===r?Math.min(6,n.length-1):r}},show:_2},attributeExpression:{type:"string",component:"expression",expressionType:"measure",schemaIgnore:!0,ref:"qDef.color.colorExpression",translation:"Common.Expression",show:P2}}}}}}}}}else a={seriesType:n,seriesAxis:r,seriesMarker:i,seriesMarkerFill:o};return{items:{series:{type:"items",items:a}}}}function B2(e,t,n,r){let i;const o=n||0;var a,s;t?i=t.getMeasureLayouts():i=null!==(a=null==e||null===(s=e.qHyperCubeDef)||void 0===s?void 0:s.qMeasures)&&void 0!==a?a:[];return i.filter((e=>{const{series:t}=e||{};return 0===o?LJ(t,r):!LJ(t,r)}))}function V2(e,t){return t.getMeasures().filter((e=>Lh(e.qDef.series)===Ho.LINE)).length>0}function H2(e,t,n,r){const i=t.getMeasures().filter((e=>Lh(e.qDef.series)===Ho.BAR));return r?i.filter((e=>e.qDef.series.axis===$o.PRIMARY)).length>n||i.filter((e=>e.qDef.series.axis===$o.SECONDARY)).length>n:i.length>n}function $2(e){const{translator:t,flags:n}=e,r=n.isEnabled("BARS_IN_SECONDARY_AXIS"),i={items:{attributeExpression:{ref:"color.colorExpression",change:null,globalChange:e=>z2(e)},expressionLabel:{change:null},disclaimer:{component:"text",translation:"properties.color.colorOnMeasureDisclaimer",style:"hint",show:e=>n.isEnabled("BASIC_COLOR_OPTIONS_PER_MEASURE")&&e.qHyperCubeDef.qMeasures.some((e=>I2(e)))}}},o={uses:"settings",items:{presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:{comboStyling:D2(),grouping:{ref:"barGrouping.grouping",type:"string",component:"item-selection-list",defaultValue:"grouped",horizontal:!0,items:[{icon:"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.grouped",value:"grouped"},{icon:"stacked",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.stacked",value:"stacked"}],show:(e,t,n)=>H2(0,t,1,r)&&!R2(n.layout)},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)=>R2(n.layout),convertFunctions:(a="vertical",{get:(e,t,n)=>R2(n.layout)?a:e(t.type),set(e,t,n,r){t(n.type,R2(r.layout)?a:e,a)}})},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)=>!R2(n.layout)},nullMode:{type:"string",component:"dropdown",ref:"nullMode",translation:"properties.nullMode",options:[{value:"gap",translation:"properties.nullMode.gap"},{value:"connect",translation:"properties.nullMode.connect"},{value:"zero",translation:"properties.nullMode.zero"}],defaultValue:"gap",show:(e,t)=>V2(0,t)},dataPointSettings:{type:"items",grouped:!1,snapshot:{tid:"property-dataPoint"},show:(e,t)=>V2(0,t),items:{dataPoints:{ref:"dataPoint.show",translation:"properties.dataPoints.showDataPoints",type:"boolean",defaultValue:!1},showLineDataPointLabels:{ref:"dataPoint.showLineLabels",translation:"properties.dataPoints.linelabelmode",type:"boolean",component:"switch",defaultValue:!1,show:e=>e.dataPoint&&e.dataPoint.show,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]}}},showBarLabels:{ref:"dataPoint.showBarLabels",type:"boolean",translation:"properties.dataPoints.barlabelmode",component:"switch",show:(e,t)=>H2(0,t,0,r),defaultValue:!1,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]}}},colorsAndLegend:{uses:"colorsAndLegend",items:{colors:i,legend:{items:{show:{snapshot:{tid:"property-legend"}}}}}},dimensionAxis:{uses:"axis.dimensionAxis",label(e,n){const r="vertical"===n.layout.orientation||R2(n.layout)?"x":"y",i=function(e,t){return t?t.getDimensionLayouts():e.qHyperCubeDef.qDimensions.map((e=>e.qDef))}(e,n).map((e=>e.qFallbackTitle||"")).join(", ");let o;return o=i?t.get(`properties.${r}AxisWithInfo`,[i]):t.get(`properties.${r}Axis`),o},items:{othersGroup:{items:{dock:{options(e,t,n){let r="Common.Bottom",i="Common.Top";return"vertical"===n.layout.orientation||R2(n.layout)||(r=n.yMirrorMode?"properties.dock.right":"properties.dock.left",i=n.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:r},{value:"far",translation:i}]}}}},axisDisplaySettings:{type:"items",components:"items",show:(e,t,n)=>!R2(n.layout),items:{axisDisplayMode:{type:"string",translation:"properties.axis.displaymode",ref:"dimensionAxis.axisDisplayMode",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:{type:"integer",translation:"properties.axis.maxvisiblevalues",ref:"dimensionAxis.maxVisibleItems",expression:"optional",defaultValue:10,show:e=>"custom"===e.dimensionAxis.axisDisplayMode,invalid(e){const{qDimensions:t,qMeasures:n}=e.qHyperCubeDef,{maxVisibleItems:r}=e.dimensionAxis;return r<0||r>1e4/(t.length+n.length)},globalChange(e){if("custom"===e.dimensionAxis.axisDisplayMode){const{qDimensions:t,qMeasures:n}=e.qHyperCubeDef,{maxVisibleItems:r}=e.dimensionAxis;r<1?e.dimensionAxis.maxVisibleItems=10:r>1e4/(t.length+n.length)&&(e.dimensionAxis.maxVisibleItems=Math.min(r,Math.floor(1e4/(t.length+n.length))))}}},hint:{component:"text",translation:"properties.axis.maxvisiblevalues.hint.combochart",style:"hint",show:e=>["custom","max"].indexOf(e.dimensionAxis.axisDisplayMode)>-1}}}}},measureAxis:{uses:"axis.measureAxis",label(e,n){const i="vertical"===n.layout.orientation||R2(n.layout)?"y":"x",o=B2(e,n,0,r).map((e=>e.qFallbackTitle));let a;return a=o.length?t.get(`properties.${i}AxisWithInfo`,[o.join(",")]):t.get(`properties.${i}Axis`),a},show:(e,t)=>B2(e,t,0,r).length>0,items:{axis:{items:{show:{ref:"measureAxes.0.show",snapshot:{title:"properties.axis.primary",tid:"property-primary-axis",show(e){var t;return((null==e||null===(t=e.qHyperCube)||void 0===t?void 0:t.qMeasureInfo)||[]).some((e=>(null==e?void 0:e.series)&&LJ(null==e?void 0:e.series,r)))}}},dock:{ref:"measureAxes.0.dock",show:e=>"none"!==e.measureAxes[0].show,options(e,t,n){let r="Common.Bottom",i="Common.Top";return("vertical"===n.layout.orientation||R2(n.layout))&&(r=n.yMirrorMode?"properties.dock.right":"properties.dock.left",i=n.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:r},{value:"far",translation:i}]}},spacing:{ref:"measureAxes.0.spacing",show:e=>e.measureAxes[0]&&"none"!==e.measureAxes[0].show}}},minMax:{items:{autoMinMax:{ref:"measureAxes.0.autoMinMax"},minMax:{ref:"measureAxes.0.minMax",defaultValue:"min",show:e=>!e.measureAxes[0].autoMinMax},min:{ref:"measureAxes.0.min",show:e=>["min","minMax"].includes(e.measureAxes[0].minMax)&&!e.measureAxes[0].autoMinMax,invalid:e=>"minMax"===e.measureAxes[0].minMax&&e.measureAxes[0].min>=e.measureAxes[0].max},max:{ref:"measureAxes.0.max",show:e=>["max","minMax"].includes(e.measureAxes[0].minMax)&&!e.measureAxes[0].autoMinMax,invalid:e=>"minMax"===e.measureAxes[0].minMax&&e.measureAxes[0].min>=e.measureAxes[0].max}}}}},secondaryMeasureAxis:{uses:"axis.measureAxis",label(e,n){const i="vertical"===n.layout.orientation||R2(n.layout)?"y":"x",o=B2(e,n,1,r).map((e=>e.qFallbackTitle));let a;return a=o.length?t.get(`properties.${i}AxisWithInfo`,[o.join(",")]):t.get(`properties.${i}Axis`),a},show:(e,t)=>B2(e,t,1,r).length>0,items:{axis:{items:{show:{ref:"measureAxes.1.show",snapshot:{title:"properties.axis.secondary",tid:"property-secondary-Axis",show(e){var t;return((null==e||null===(t=e.qHyperCube)||void 0===t?void 0:t.qMeasureInfo)||[]).some((e=>(null==e?void 0:e.series)&&!LJ(null==e?void 0:e.series,r)))}}},dock:{ref:"measureAxes.1.dock",defaultValue:"far",show:e=>"none"!==e.measureAxes[1].show,options(e,t,n){let r="Common.Bottom",i="Common.Top";return("vertical"===n.layout.orientation||R2(n.layout))&&(r=n.yMirrorMode?"properties.dock.right":"properties.dock.left",i=n.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:r},{value:"far",translation:i}]}},spacing:{ref:"measureAxes.1.spacing",show:e=>e.measureAxes[1]&&"none"!==e.measureAxes[1].show}}},minMax:{type:"items",items:{autoMinMax:{ref:"measureAxes.1.autoMinMax"},minMax:{ref:"measureAxes.1.minMax",defaultValue:"min",show:e=>!e.measureAxes[1].autoMinMax},min:{ref:"measureAxes.1.min",show:e=>["min","minMax"].includes(e.measureAxes[1].minMax)&&!e.measureAxes[1].autoMinMax,invalid:e=>"minMax"===e.measureAxes[1].minMax&&e.measureAxes[1].min>=e.measureAxes[1].max},max:{ref:"measureAxes.1.max",show:e=>["max","minMax"].includes(e.measureAxes[1].minMax)&&!e.measureAxes[1].autoMinMax,invalid:e=>"minMax"===e.measureAxes[1].minMax&&e.measureAxes[1].min>=e.measureAxes[1].max}}}}},tooltips:{uses:"tooltip"}}};var a;n.isEnabled("SENSECLIENT_LAYERED_LABELS")&&(o.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"}]});return{type:"items",component:"accordion",items:{data:{uses:"data",items:{dimensions:{items:{nullSuppression:{show:(e,t,n)=>!R2(n.layout)}}},measures:F2(e)}},sorting:{uses:"sortingWithDisclaimer"},addons:{type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}},primaryMeasureAxisRefLines:{uses:"reflines",ref:"refLine.refLines",translation:"properties.primaryMeasureAxisReferenceLines",title:{translation:"properties.primaryMeasureAxisReferenceLines.tooltip"},show:e=>function(e,t){return e.some((e=>LJ(e.qDef.series,t)))}(e.qHyperCubeDef.qMeasures,r)},secondaryMeasureAxisRefLines:{uses:"reflines",ref:"refLine.refLines2",translation:"properties.secondaryMeasureAxisReferenceLines",title:{translation:"properties.secondaryMeasureAxisReferenceLines.tooltip"},show:e=>function(e,t){return e.some((e=>!LJ(e.qDef.series,t)))}(e.qHyperCubeDef.qMeasures,r)},dimRefLines:{uses:"dimReflines"}}},settings:o}}}function U2(e){return e.qHyperCubeDef.qMeasures.filter((e=>Lh(e.qDef.series)===Ho.LINE)).length>0}function W2(e){const{flags:t}=e,n=e.flags.isEnabled("BARS_IN_SECONDARY_AXIS");return{type:"items",component:"accordion",items:{data:{uses:"data"},sort:{uses:"sortWithDisclaimer"},presentation:{uses:"presentation",type:"items",translation:"properties.presentation",grouped:!0,show:(e,t)=>U2(e)||!R2(t),items:{grouping:{ref:"barGrouping.grouping",type:"string",component:"item-selection-list",horizontal:!0,items:[{icon:"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.grouped",value:"grouped"},{icon:"stacked",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.stacked",value:"stacked"}],show:(e,t)=>function(e,t){const n=e.qHyperCubeDef.qMeasures.filter((e=>Lh(e.qDef.series)===Ho.BAR));return t?n.filter((e=>e.qDef.series.axis===$o.PRIMARY)).length>1||n.filter((e=>e.qDef.series.axis===$o.SECONDARY)).length>1:n.length>1}(e,n)&&!R2(t)},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)=>!R2(t)},nullMode:{type:"string",component:"radio-list",ref:"nullMode",translation:"properties.nullMode",options:()=>[{value:"gap",translation:"properties.nullMode.gap"},{value:"connect",translation:"properties.nullMode.connect"},{value:"zero",translation:"properties.nullMode.zero"}],show:e=>U2(e)&&e.qHyperCubeDef.qMeasures.length>1},dataPoints:{ref:"dataPoint.show",translation:"properties.dataPoints.showDataPoints",type:"boolean",show:e=>U2(e)}}},color:{uses:"color",items:{disclaimer:{component:"text",translation:"properties.color.colorOnMeasureDisclaimer",style:"hint",show:e=>t.isEnabled("BASIC_COLOR_OPTIONS_PER_MEASURE")&&e.qHyperCubeDef.qMeasures.some((e=>I2(e)))}}}}}}const Y2={bar:{axis:0,icon:"bar-chart",tid:"as-bar",translation:"contextMenu.asBar"},line:{axis:1,icon:"line-chart",tid:"as-line",translation:"contextMenu.asLine"},marker:{axis:1,icon:"shapes",tid:"as-marker",translation:"contextMenu.asMarker"}};function X2(e,t,n,r,i){const{axis:o,icon:a,tid:s,translation:l}=Y2[i];t.addItem({icon:a,tid:s,translation:l,async select(){let t;t="measure"===e.type?await r.addLibraryMeasure(e.id):await r.addExpressionMeasure(e.name,""),t.qDef.series.type=i,t.qDef.series.axis=o,r.updateGlobalChangeListeners(),n.setProperties(r.properties),window.qvangularGlobal.$rootScope.$broadcast("pp-open-path","data."+t.qDef.cId)}})}function G2(e,t,n,r,i){!function(e,t,n){const{item:r}=e,i=["contextMenu.add",r.name];if(n.canAddMeasure()){const o=e.menu.addItem({translation:i,tid:"add-as"});X2(r,o,t,n,"bar"),X2(r,o,t,n,"line"),X2(r,o,t,n,"marker")}}(e,n,t),t.getMeasures().length>=t.minMeasures()&&e.ReplaceMeasures(n,t,i),e.ColorBy(n,t,i),r()}function K2(e){const t={},{tooltip:n}=e;if(n){var r,i;t.chart_tooltip_custom=!n.auto;const e=null===(r=n.chart)||void 0===r||null===(i=r.object)||void 0===i?void 0:i.refId;!n.auto&&e&&(t.chart_tooltip_custom_mini_chart=e)}return t}const J2=e=>!!(e&&e.qHyperCube.qSize.qcy>0);function Z2(e){return{definition:$2(e),softDefinition:W2(e),support:{snapshot:J2,export:!0,exportData:!0,sharing:!1,viewData:!0,modifiers:["accumulation","movingAverage","difference","normalization"]},getDropMeasureOptions:G2,extendMetrics:K2,importProperties:(t,n,r,i)=>{const o={layout:{templateId:n.templateId}};r.mapProperties(o);const a={defaultDimension:r.getDefaultDimensionProperties(),defaultMeasure:r.getDefaultMeasureProperties()},s=k2.axisChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:N2(e),defaultPropertyValues:a,hypercubePath:i});return function(e,t,n){const r="linechart"===n.properties.visualization,i=[];e.qProperty.qHyperCubeDef.qMeasures.forEach((e=>{e.qDef.series||(e.qDef.series={type:r?"line":"bar",axis:0,marker:"circle",markerFill:!0}),i.indexOf(e.qDef.series.axis)<0&&i.push(e.qDef.series.axis)}));const o=i.sort().shift();e.qProperty.measureAxes[o]&&n.properties.measureAxis&&void 0!==n.properties.measureAxis.autoMinMax&&d(!0,e.qProperty.measureAxes[o],n.properties.measureAxis,{logarithmic:!1}),t.flags.isEnabled("BASIC_COLOR_OPTIONS_PER_MEASURE")&&z2(e.qProperty)}(s,e,t),s},exportProperties:(e,t,n)=>{!function(e){e.qProperty.qHyperCubeDef.qMeasures.forEach((e=>{e.qAttributeExpressions=[]}))}(e);return k2.axisChart.exportProperties({propertyTree:e,hyperCubePath:t,viewDataMode:n})},migrate:{properties:e=>e.qExtendsId?e:function(e){return a1(e.version)&&(e.qHyperCubeDef.qMeasures.forEach((e=>{const{qDef:t}=e;void 0===t.series&&(t.series=Uo),void 0===t.series.type&&(t.series.type=Uo.type),void 0===t.series.axis&&(t.series.axis=t.series.type===Ho.BAR?$o.PRIMARY:$o.SECONDARY),t.series.type===Ho.BAR&&t.series.axis===$o.SECONDARY&&(t.series.axis=$o.PRIMARY)})),e.version=o1),e}(e)}}}return function(t){const{flags:n}=t,r=NJ();return{qae:q2(t),ext:Z2(t),component(){const t=function(){const[t,n]=e.useState();return e.useEffect((()=>n(ml())),[]),t}(),i=v2(),o=function(){const t=e.useOptions(),n=e.useTranslator(),r=e.useEmbed(),i=e.useTheme(),[o,a]=e.useState(),s=e.useDeviceType();return e.useEffect((()=>{a({options:{direction:"ltr",...t},translator:n,theme:i,embed:r,deviceType:s})}),[t.direction,t.freeResize,n.language(),i.name(),s]),o}(),a=M2(),s=function({picasso:t,environment:n}){const r=e.useElement(),[i,o]=e.useState();return e.useEffect((()=>{if(!n)return;r.style.overflow="hidden";const e=t({renderer:{prio:[n.options.renderer||"canvas"]}}).chart({element:r,data:[],settings:{}});o(e);const{destroy:i}=e;return()=>{i()}}),[n]),i}({picasso:r,environment:o}),l=function({chart:t,actions:n}){const r=e.useSelections(),i=e.useStaleLayout(),[o,a]=e.useState();return e.useEffect((()=>{if(null==t||!t.update||!t.scale||!r)return null;const e=t.scale(Vo.SCALE.MAJOR),o=jc({chart:t,actions:n,selections:r,config:{allowSimultaneous:!0,brushRanges:!0,majorScale:e,selectionActions:{clear:S2},selectionEvents:{start:w2}}});o.setLayout(i);const{destroy:s}=o;return a(o),()=>{s()}}),[r,null==t?void 0:t.update,null==t?void 0:t.scale]),e.useEffect((()=>{null!=o&&o.setLayout&&i&&o.setLayout(i)}),[i]),o}({chart:s,actions:a}),u=g2({picasso:r,chart:s,environment:o,flags:n,viewState:i,viewCache:t,actions:a,selectionService:l});Nm({picasso:r,chart:s,models:u,environment:o,viewState:i,viewCache:t,actions:a}),(({picasso:t,chart:n,models:r,environment:i,viewState:o,viewCache:a,actions:s})=>{const{width:l,height:u}=e.useRect(),[,c]=e.usePromise((async()=>{if(!(null!=n&&n.update&&r&&i&&o))return;const{colorService:e,discreteModel:c,dockService:d,layoutService:f,refLineModel:h}=r;function p(){n.update({settings:Em({picasso:t,chart:n,models:r,environment:i,viewState:o,viewCache:a,actions:s})})}d.update({width:l,height:u}),e.custom.updateLegend(),h.update({picasso:t,chart:n,models:r,environment:i,viewState:o,viewCache:a,actions:s});const m=f.getDataPages();f.setDataPages([]),p(),f.setDataPages(m),f.meta.isContinuous||await c.command.initialize(),p()}),[l,u]);if(c)throw c})({picasso:r,chart:s,models:u,environment:o,viewState:i,viewCache:t,actions:a}),(({models:t,chart:n,viewState:r})=>{e.onTakeSnapshot((e=>{if(!t)return;const{layoutService:i,dockService:o,colorService:a,discreteModel:s,continuousModel:l,reducedModel:u}=t,{width:c,height:d}=o.meta.chart.size;return e.snapshotData=e.snapshotData||{},e.snapshotData.content={size:{w:c,h:d}},i.meta.isSnapshot?Promise.resolve():(e.snapshotData.content.chartData={scrollOffset:r.get("scrollOffset"),zoom:r.get("zoom"),legendScrollOffset:C(n,Vo.COMPONENT.LEGEND_CATEGORICAL)},i.meta.isDiscrete?(s.command.setSnapshotData(e),u.command.setSnapshotData(e)):l.setSnapshotData(e),a.getSnapshotData().then((t=>{e.snapshotData.content.chartData={...e.snapshotData.content.chartData,...t}})).catch((()=>{})))})),e.useImperativeHandle((()=>({getViewState(){if(r&&n)return{scrollOffset:r.get("scrollOffset"),zoom:r.get("zoom"),legendScrollOffset:C(n,Vo.COMPONENT.LEGEND_CATEGORICAL)}}})),[r,n])})({models:u,chart:s,viewState:i})}}}}));
|