@nebula.js/sn-pivot-table 6.0.20 → 6.0.21
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/core/esm/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @nebula.js/sn-pivot-table v6.0.
|
|
3
|
-
* Copyright (c)
|
|
2
|
+
* @nebula.js/sn-pivot-table v6.0.21
|
|
3
|
+
* Copyright (c) 2026 QlikTech International AB
|
|
4
4
|
* Released under the MIT license.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -179,6 +179,6 @@ function br(e,t){let n;return n=t?ur(e).withConfig({displayName:t.label,shouldFo
|
|
|
179
179
|
/*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
|
|
180
180
|
e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,o,i,a,s,l,c,u,d,p=e.length,h=e.search(/[0-9\-\+#]/),f=h>0?e.substring(0,h):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),y=p-g,_=e.substring(y,y+1),b=y+("."===_||","===_?1:0),x=g>0?e.substring(b,p):"";if(n=(t="-"===(e=e.substring(h,b)).charAt(0)?-t:+t)<0?t=-t:0,o=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",i=r&&r[1]&&r[0]||",",e=e.split(o),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(c=t.split("."))[1]||c[1]&&c[1].length<=s)&&(t=(+t).toFixed(s+1)),u=e[0].split(i),e[0]=u.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;c[0].length<e[0].length-a;)c[0]="0"+c[0];else 0==+c[0]&&(c[0]="");if((t=t.split("."))[0]=c[0],l=u[1]&&u[u.length-1].length){for(m="",y=(d=t[0]).length%l,p=d.length,b=0;b<p;b++)m+=d.charAt(b),!((b-y+1)%l)&&b<p-l&&(m+=i);t[0]=m}return t[1]=e[1]&&t[1]?o+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),f+(n?"-":"")+r+x}},PF({exports:{}});const BF="qHyperCubeDef.qDimensions",$F="dimensions",HF="qOtherTotalSpec.qTotalMode",VF="totalMode",GF={quarantine(e){ZN.quarantineArrayProp({properties:e,arrayPath:BF,quarantineName:VF,arrayName:$F,itemPath:HF})},unquarantine(e){ZN.unquarantineArrayProp({properties:e,arrayPath:BF,quarantineName:VF,arrayName:$F,itemPath:HF})}};function UF(e){const t=WF(e);return(e,n,r,o)=>{const i=ZN.hypercube.importProperties({exportFormat:e,initialProperties:n,dataDefinition:t.targets[0],hypercubePath:o}),a=i.qProperty.qHyperCubeDef.qDimensions.length,s=i.qProperty.qHyperCubeDef.qMeasures.length;let l,c=i.qProperty.qHyperCubeDef.qInterColumnSortOrder,u=!0;a+s===c.length&&LF(i,"qProperty.qLayoutExclude.quarantine.interColSortOrder",c.concat());const d=i.qProperty.qLayoutExclude.quarantine?.pivotInterColSortOrder;d?(c=d,l=[...d],LF(i,"qProperty.qHyperCubeDef.qInterColumnSortOrder",c),i.qProperty.qLayoutExclude.quarantine&&delete i.qProperty.qLayoutExclude.quarantine.pivotInterColSortOrder):c.length=0;const p=+(c.indexOf(-1)>-1),h=a+p;if(h>c.length)for(let e=c.length;e<h;e++)c.indexOf(e)<0&&c.push(e-p);for(let e=c.length-1;e>=0;e--)c[e]>=a&&c.splice(e,1);s>1&&c.indexOf(-1)<0?c.push(-1):s<2&&c.indexOf(-1)>-1&&c.splice(c.indexOf(-1),1);const f=i.qProperty.qHyperCubeDef.qNoOfLeftDims??-1;if(a>0&&-1===f&&LF(i,"qProperty.qHyperCubeDef.qNoOfLeftDims",a),l?.length===c.length){for(let e=0;e<l.length;e++)if(l[e]!==c[e]){u=!1;break}u&&(ZN.unquarantineProperty(i.qProperty,"noOfLeftDims"),ZN.unquarantineProperty(i.qProperty,"exludedNoOfLeftDims"))}return ZN.conditionalShow.unquarantine(i.qProperty),GF.unquarantine(i.qProperty),(e=>{ZN.unquarantineArrayProp({properties:e,arrayPath:tq,itemPath:rq,arrayName:nq,quarantineName:oq}),ZN.unquarantineArrayProp({properties:e,arrayPath:QN,itemPath:rq,arrayName:eq,quarantineName:oq}),ZN.unquarantineArrayProp({properties:e,arrayPath:QN,itemPath:iq,arrayName:eq,quarantineName:aq}),ZN.unquarantineArrayProp({properties:e,arrayPath:QN,itemPath:sq,arrayName:eq,quarantineName:lq})})(i.qProperty),ZN.unquarantineProperty(i.qProperty,"pivotTableIndentMode"),i}}function YF(e,t){const n=e.qProperty.qHyperCubeDef.qInterColumnSortOrder,r=n.slice(),o=n.indexOf(-1);o>-1&&n.splice(o,1);const i=ZN.hypercube.exportProperties({propertyTree:e,hyperCubePath:t}),a=i.properties.qHyperCubeDef,s=a.qDimensions.length,l=a.qMeasures.length;let c=a.qInterColumnSortOrder;LF(i,"properties.qLayoutExclude.quarantine.pivotInterColSortOrder",r),ZN.quarantineProperty(i.properties,"qHyperCubeDef.qNoOfLeftDims","noOfLeftDims"),delete i.properties.qHyperCubeDef.qNoOfLeftDims;const u=i.properties.qLayoutExclude.quarantine?.interColSortOrder;u&&(c=u,LF(i,"properties.qHyperCubeDef.qInterColumnSortOrder",c),LF(i,"data.0.interColumnSortOrder",c),i.properties.qLayoutExclude.quarantine&&delete i.properties.qLayoutExclude.quarantine.interColSortOrder);for(let e=c.length;e<s+l;e++)c.length<=e&&c.push(e);return ZN.quarantineProperty(i.properties,"qHyperCubeDef.qIndentMode","pivotTableIndentMode"),ZN.quarantineProperty(i.properties,"qHyperCubeDef.exludedNoOfLeftDims","exludedNoOfLeftDims"),ZN.conditionalShow.quarantine(i.properties),GF.quarantine(i.properties),(e=>{ZN.quarantineArrayProp({properties:e,arrayPath:tq,itemPath:rq,arrayName:nq,quarantineName:oq}),ZN.quarantineArrayProp({properties:e,arrayPath:QN,itemPath:rq,arrayName:eq,quarantineName:oq}),ZN.quarantineArrayProp({properties:e,arrayPath:QN,itemPath:iq,arrayName:eq,quarantineName:aq}),ZN.quarantineArrayProp({properties:e,arrayPath:QN,itemPath:sq,arrayName:eq,quarantineName:lq})})(i.properties),i}const KF={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}}}};let XF=function(e){return e.Text="text",e.Link="link",e.Image="image",e.ImagesInIndentMode="imagesInIndentMode",e.Indicator="indicator",e.MiniChart="miniChart",e.EditableText="editableText",e.EditableSelector="editableSelector",e}({}),JF=function(e){return e.Attribute="attribute",e.Dimension="dimension",e}({});const ZF=e=>{switch(e?.type){case"url":return XF.Link;case"image":return XF.Image;case"indicator":return XF.Indicator;case"miniChart":return XF.MiniChart;default:return XF.Text}},QF=({isImagesEnabled:e})=>({uses:"dimensionRepresentationItems.representationType",options(t,n,r){const{qIndentMode:o}=r.properties.qHyperCubeDef,i=[{value:"text",translation:"Object.Table.Representation.Text"},{value:"url",translation:"Object.Table.Representation.Link"}];return(!o&&e||o)&&i.push({value:"image",translation:"Object.Table.Representation.Image"}),i}}),eW=e=>{if(e)return{representationImage:{uses:"dimensionRepresentationItems.representationImage",show:e=>ZF(e.qDef.representation)===XF.Image,items:{imageSize:{options:[{value:"alwaysFit",translation:"properties.backgroundImage.sizeAlwaysFit"},{value:"fitWidth",translation:"properties.backgroundImage.sizeFitWidth"},{value:"fitHeight",translation:"properties.backgroundImage.sizeFitHeight"},{value:"fill",translation:"properties.backgroundImage.sizeStretch"},{value:"originalSize",translation:"properties.backgroundImage.originalSize"}]},imageBoxWidth:{ref:"qDef.representation.imageBox.width",translation:"properties.pivot.representation.image.imageBox.width",type:"number",expression:"optional",defaultValue:24,show:(e,t,n)=>{if(!n.properties.qHyperCubeDef)return!1;const{qInterColumnSortOrder:r,qNoOfLeftDims:o,qDimensions:i,qIndentMode:a}=n.properties.qHyperCubeDef;let s=!1;r?.indexOf(-1);const l=i?.indexOf(e)??1/0;return(r?.slice(0,o)??[]).indexOf(l)>-1&&(s=!0),s&&a}}}}}},tW=e=>{const{anything:t}=e,n=!t.sense?.isUnsupportedFeature?.("tableImages");return{representationType:QF({isImagesEnabled:n}),representationUrlPosition:{uses:"dimensionRepresentationItems.representationUrlPosition",show:e=>ZF(e.qDef.representation)===XF.Link},representationUrlLabel:{uses:"dimensionRepresentationItems.representationUrlLabel",show:e=>ZF(e.qDef.representation)===XF.Link&&e.qDef.representation?.urlPosition===JF.Dimension},representationLinkUrl:{uses:"dimensionRepresentationItems.representationLinkUrl",show:e=>ZF(e.qDef.representation)===XF.Link&&e.qDef.representation?.urlPosition===JF.Attribute},...eW(n)}},nW=(e,t)=>{const{anything:n}=e,r=n.sense?.isUnsupportedFeature,o=!r?.("tableImages")&&t[XF.Image],i=!r?.("qMiniChartDef")&&t[XF.MiniChart],a=!r?.("tableIndicators")&&t[XF.Indicator],s=o&&t[XF.ImagesInIndentMode];return{representationType:{uses:"measureRepresentationItems.representationType",options:(e,t,n)=>(e=>{const{qIndentMode:t}=e.properties.qHyperCubeDef??{},n=[{value:"text",translation:"Object.Table.Representation.Text"}];return(!t&&o||t&&s)&&n.push({value:"image",translation:"Object.Table.Representation.Image"}),a&&n.push({value:"indicator",translation:"Object.Table.Representation.Indicator"}),i&&n.push({value:"miniChart",translation:"Common.MiniChart"}),n})(n)},representationImage:o?{uses:"measureRepresentationItems.representationImage",show:e=>ZF(e.qDef.representation)===XF.Image,items:{imageSize:{options:[{value:"alwaysFit",translation:"properties.backgroundImage.sizeAlwaysFit"},{value:"fitWidth",translation:"properties.backgroundImage.sizeFitWidth"},{value:"fitHeight",translation:"properties.backgroundImage.sizeFitHeight"},{value:"fill",translation:"properties.backgroundImage.sizeStretch"},{value:"originalSize",translation:"properties.backgroundImage.originalSize"}]}}}:void 0,representationIndicator:a?{uses:"measureRepresentationItems.representationIndicator"}:void 0,representationMiniChart:i?{uses:"measureRepresentationItems.representationMiniChart"}:void 0}};let rW=function(e){return e.Dimension="dimensions",e.Measures="measures",e.Pivot="pivot",e}({}),oW=function(e){return e.CellForegroundColor="cellForegroundColor",e.CellBackgroundColor="cellBackgroundColor",e.ImageUrl="imageUrl",e.ImageLabel="imageLabel",e.Link="url",e.LinkLabel="urlLabel",e}({}),iW=function(e){return e.TopGrid="topGrid",e.LeftGrid="leftGrid",e.DataGrid="dataGrid",e}({}),aW=function(e){return e.Forward="forward",e.Backward="backward",e.None="none",e}({});const sW="image",lW=(e,t,n)=>{if(!n.properties.qHyperCubeDef.qIndentMode)return!0;const r=n.properties.qHyperCubeDef.qInterColumnSortOrder?.indexOf(-1)??-1;let o=n.properties.qHyperCubeDef.qNoOfLeftDims??-1;r>-1&&r<o&&(o-=1);const i=n.properties.qHyperCubeDef.qDimensions.indexOf(e);return 0===i||i>=o},cW=()=>({type:{type:"string",component:"dropdown",ref:"qDef.columnWidth.type",translation:"Object.Table.Column.Width",options:[{value:gN.Auto,translation:"Common.Auto"},{value:gN.FitToContent,translation:"Object.Table.Column.FitToContent"},{value:gN.Pixels,translation:"Object.Table.Column.Pixels"},{value:gN.Percentage,translation:"Object.Table.Column.Percentage"}],defaultValue:gN.Auto},sizePixels:{ref:"qDef.columnWidth.pixels",translation:"Object.Table.Column.Pixels",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:mN.PixelsDefault,show:e=>e.qDef.columnWidth?.type===gN.Pixels},sizePercentage:{ref:"qDef.columnWidth.percentage",translation:"Object.Table.Column.Percentage",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:mN.PercentageDefault,show:e=>e.qDef.columnWidth?.type===gN.Percentage}}),uW=({key:e,translation:t,env:n})=>{const r=!n.anything.sense?.isUnsupportedFeature?.("tableImages");return{[`${e}Auto`]:{ref:`qDef.${e}.auto`,type:"boolean",component:"switch",translation:t,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}],defaultValue:!0,show:t=>!r||"labelTextAlign"===e||t.qDef.representation?.type!==sW},[e]:{ref:`qDef.${e}.align`,type:"string",component:"item-selection-list",horizontal:!0,items:[{component:"icon-item",icon:"align_left",labelPlacement:"bottom",value:"left",translation:"properties.dock.left"},{component:"icon-item",icon:"align_center",labelPlacement:"bottom",value:"center",translation:"Common.Center"},{component:"icon-item",icon:"align_right",labelPlacement:"bottom",value:"right",translation:"properties.dock.right"}],defaultValue:"left",show:t=>void 0!==t.qDef[e]&&!t.qDef[e].auto&&(!r||"labelTextAlign"===e||t.qDef.representation?.type!==sW)}}},dW="TOTAL_OFF",pW={component:"attribute-expression-reference",defaultValue:[],ref:"qAttributeExpressions",items:[{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.BackgroundExpression",defaultValue:"",id:oW.CellBackgroundColor},{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.ForegroundExpression",defaultValue:"",id:oW.CellForegroundColor},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:oW.LinkLabel,tid:"URLLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:oW.Link,tid:"URLByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:oW.ImageLabel,tid:"ImageLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:oW.ImageUrl,tid:"ImageUrlByExpression",show:!1}]},hW="TOTAL_OFF",fW={component:"attribute-expression-reference",defaultValue:[],ref:"qAttributeExpressions",items:[{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.BackgroundExpression",defaultValue:"",id:oW.CellBackgroundColor},{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.ForegroundExpression",defaultValue:"",id:oW.CellForegroundColor},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:oW.LinkLabel,tid:"URLLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:oW.Link,tid:"URLByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:oW.ImageLabel,tid:"ImageLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:oW.ImageUrl,tid:"ImageUrlByExpression",show:!1}]},mW=e=>{const{translator:t,anything:n,flags:r}=e,o=(e=>{const{translator:t,anything:n}=e;return{type:"items",component:"data-assets-panel-pivot",translation:"Common.Data",items:{dimensions:{type:"array",component:"expandable-items",ref:"qHyperCubeDef.qDimensions",items:{field:{type:"items",translation:"Common.Field",items:{libraryId:{type:"string",component:"library-item",libraryItemType:"dimension",ref:"qLibraryId",translation:"Common.Dimension",show:e=>!!e.qLibraryId},inlineDimension:{component:"inline-dimension",show:e=>!e.qLibraryId},autoSort:{ref:"qDef.autoSort",type:"boolean",defaultValue:!0,show:!1},cId:{ref:"qDef.cId",type:"string",show:!1},nullSuppression:{type:"boolean",ref:"qNullSuppression",defaultValue:!1,translation:"properties.dimensions.showNull",inverted:!0},totalMode:{type:"string",component:"switch",translation:"properties.showTotals",ref:"qOtherTotalSpec.qTotalMode",defaultValue:dW,trueOption:{value:"TOTAL_EXPR",translation:"properties.on"},falseOption:{value:dW,translation:"properties.off"},show:!n.sense?.isUnsupportedFeature?.("totals")&&lW},totalsLabel:{type:"string",component:"expression",expressionType:"StringExpr",ref:"qTotalLabel",translation:"properties.totals.label",defaultValue:()=>t.get("Object.Table.Totals"),show:(e,t,r)=>!n.sense?.isUnsupportedFeature?.("totals")&&e.qOtherTotalSpec?.qTotalMode!==dW&&lW(e,0,r)},dimensionLimits:{uses:"dimensions.items.dimensionLimits"},showOthers:{uses:"dimensions.items.others"},globalGrouping:{type:"boolean",translation:"properties.dimensionLimits.globalGrouping",ref:"qOtherTotalSpec.qGlobalOtherGrouping",defaultValue:!1,show:e=>"OTHER_OFF"!==e.qOtherTotalSpec?.qOtherMode}}},presentation:{type:"items",translation:"properties.presentation",items:{visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Table.Columns.VisibilityCondition",defaultValue:{qv:""},isExpression:e=>"string"==typeof e&&e.trim().length>0},cellColoring:pW,...uW({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...uW({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...tW(e),...cW()}}}},measures:{type:"array",component:"expandable-items",ref:"qHyperCubeDef.qMeasures",items:{field:{type:"items",translation:"Common.Field",items:{libraryId:{type:"string",component:"library-item",libraryItemType:"measure",ref:"qLibraryId",translation:"Common.Measure",show:e=>!!e.qLibraryId},inlineMeasure:{component:"inline-measure",show:e=>!e.qLibraryId},autoSort:{ref:"qDef.autoSort",type:"boolean",defaultValue:!0,show:!1},cId:{ref:"qDef.cId",type:"string",show:!1},numberFormatting:{uses:"measures.items.numberFormatting"}}},presentation:{type:"items",translation:"properties.presentation",items:{visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Table.Columns.VisibilityCondition",defaultValue:{qv:""},isExpression:e=>"string"==typeof e&&e.trim().length>0},cellColoring:pW,...uW({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...uW({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...nW(e,{[XF.Image]:!0,[XF.Indicator]:!0}),...cW()}}}}}}})(e);return r.isEnabled("CLIENT_IM5974_PIVOT_DATA_PROPERTIES")?o:{type:"items",component:"pivot-data",translation:"properties.data",addTranslation:"Property.AddData",items:{dimensions:{type:"array",component:"dimensions",translation:"Common.Dimensions",alternativeTranslation:"properties.alternative.dimensions",ref:"qHyperCubeDef.qDimensions",disabledRef:"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",min:1,allowAdd:!0,allowRemove:!0,allowMove:!0,addTranslation:"properties.dimensions.add",grouped:!0,items:{libraryId:{type:"string",component:"library-item",libraryItemType:"dimension",ref:"qLibraryId",translation:"Common.Dimension",show:e=>!!e.qLibraryId},inlineDimension:{component:"inline-dimension",show:e=>!e.qLibraryId},autoSort:{ref:"qDef.autoSort",type:"boolean",defaultValue:!0,show:!1},cId:{ref:"qDef.cId",type:"string",show:!1},nullSuppression:{type:"boolean",ref:"qNullSuppression",defaultValue:!1,translation:"properties.dimensions.showNull",inverted:!0},totalMode:{type:"string",component:"switch",translation:"properties.showTotals",ref:"qOtherTotalSpec.qTotalMode",defaultValue:hW,trueOption:{value:"TOTAL_EXPR",translation:"properties.on"},falseOption:{value:hW,translation:"properties.off"},show:!n.sense?.isUnsupportedFeature?.("totals")&&lW},totalsLabel:{type:"string",component:"expression",expressionType:"StringExpr",ref:"qTotalLabel",translation:"properties.totals.label",defaultValue:()=>t.get("Object.Table.Totals"),show:(e,t,r)=>!n.sense?.isUnsupportedFeature?.("totals")&&e.qOtherTotalSpec?.qTotalMode!==hW&&lW(e,0,r)},dimensionLimits:{uses:"dimensions.items.dimensionLimits"},showOthers:{uses:"dimensions.items.others"},globalGrouping:{type:"boolean",translation:"properties.dimensionLimits.globalGrouping",ref:"qOtherTotalSpec.qGlobalOtherGrouping",defaultValue:!1,show:e=>"OTHER_OFF"!==e.qOtherTotalSpec?.qOtherMode},visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Table.Columns.VisibilityCondition",defaultValue:{qv:""},isExpression:e=>"string"==typeof e&&e.trim().length>0},cellColoring:fW,...uW({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...uW({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...tW(e),...cW()}},measures:{type:"array",component:"measures",translation:"Common.Measures",ref:"qHyperCubeDef.qMeasures",disabledRef:"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",min:1,allowAdd:!0,allowRemove:!0,allowMove:!0,addTranslation:"properties.measures.add",grouped:!0,items:{libraryId:{type:"string",component:"library-item",libraryItemType:"measure",ref:"qLibraryId",translation:"Common.Measure",show:e=>!!e.qLibraryId},inlineMeasure:{component:"inline-measure",show:e=>!e.qLibraryId},autoSort:{ref:"qDef.autoSort",type:"boolean",defaultValue:!0,show:!1},cId:{ref:"qDef.cId",type:"string",show:!1},numberFormatting:{uses:"measures.items.numberFormatting"},visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Table.Columns.VisibilityCondition",defaultValue:{qv:""},isExpression:e=>"string"==typeof e&&e.trim().length>0},cellColoring:fW,...uW({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...uW({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...nW(e,{[XF.Image]:!0,[XF.ImagesInIndentMode]:!0,[XF.Indicator]:!0}),...cW()}},filters:{type:"items",translation:"SimpleProperties.Filters.Filters",ref:"filters",allowAdd:!0,allowRemove:!0,allowMove:!1,addTranslation:"properties.filters.add",grouped:!0,items:{filter:{type:"object",component:"filter-item",ref:"filter"}}}}}},gW=((e="light",t=!1)=>zb(0,t))().palette,yW={TEXT:gW.text.primary,DISABLED:gW.text.disabled,HOVER:gW.action.hover,WHITE:jb.GREYSCALE_100,BORDER_LIGHT:jb.GREYSCALE_90,BORDER_MEDIUM:jb.GREYSCALE_85,BORDER_HEAVY:jb.GREYSCALE_50,DARK_MODE_TEXT:jb.GREYSCALE_95,DARK_MODE_BORDER:jb.GREYSCALE_95,DARK_MODE_DISABLED:jb.GREYSCALE_70,DARK_MODE_BACKGROUND:jb.GREYSCALE_20,TRANSPARENT:"transparent",NULL_VALUE_BACKGROUND:jb.GREYSCALE_95,SELECTED:gW.primary.main,LINK:gW.info.main,BACKGROUND_EDITABLE_COLUMN:jb.GREYSCALE_98};function _W(e){return null!==e&&"object"==typeof e&&"r"in e&&"number"==typeof e.r&&"g"in e&&"number"==typeof e.g&&"b"in e&&"number"==typeof e.b&&("number"==typeof e.a||void 0===e.a)}function bW(e){if("object"==typeof e&&_W(e))return(e.r<<16)+(e.g<<8)+e.b;let t=0,n=0,r=0;if("string"==typeof e){let o;(o=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e))?(t=parseInt(o[1],10),n=parseInt(o[2],10),r=parseInt(o[3],10)):(o=/^#([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})$/i.exec(e))?(t=parseInt(o[1],16),n=parseInt(o[2],16),r=parseInt(o[3],16)):(o=/^#([A-Fa-f0-9])([A-Fa-f0-9])([A-Fa-f0-9])$/i.exec(e))&&(t=parseInt(o[1]+o[1],16),n=parseInt(o[2]+o[2],16),r=parseInt(o[3]+o[3],16))}return(t<<16)+(n<<8)+r}const xW={aliceblue:{r:240,g:248,b:255},antiquewhite:{r:250,g:235,b:215},aqua:{r:0,g:255,b:255},aquamarine:{r:127,g:255,b:212},azure:{r:240,g:255,b:255},beige:{r:245,g:245,b:220},bisque:{r:255,g:228,b:196},black:{r:0,g:0,b:0},blanchedalmond:{r:255,g:235,b:205},blue:{r:0,g:0,b:255},blueviolet:{r:138,g:43,b:226},brown:{r:165,g:42,b:42},burlywood:{r:222,g:184,b:135},cadetblue:{r:95,g:158,b:160},chartreuse:{r:127,g:255,b:0},chocolate:{r:210,g:105,b:30},coral:{r:255,g:127,b:80},cornflowerblue:{r:100,g:149,b:237},cornsilk:{r:255,g:248,b:220},crimson:{r:220,g:20,b:60},cyan:{r:0,g:255,b:255},darkblue:{r:0,g:0,b:139},darkcyan:{r:0,g:139,b:139},darkgoldenrod:{r:184,g:134,b:11},darkgray:{r:169,g:169,b:169},darkgreen:{r:0,g:100,b:0},darkgrey:{r:169,g:169,b:169},darkkhaki:{r:189,g:183,b:107},darkmagenta:{r:139,g:0,b:139},darkolivegreen:{r:85,g:107,b:47},darkorange:{r:255,g:140,b:0},darkorchid:{r:153,g:50,b:204},darkred:{r:139,g:0,b:0},darksalmon:{r:233,g:150,b:122},darkseagreen:{r:143,g:188,b:143},darkslateblue:{r:72,g:61,b:139},darkslategray:{r:47,g:79,b:79},darkslategrey:{r:47,g:79,b:79},darkturquoise:{r:0,g:206,b:209},darkviolet:{r:148,g:0,b:211},deeppink:{r:255,g:20,b:147},deepskyblue:{r:0,g:191,b:255},dimgray:{r:105,g:105,b:105},dimgrey:{r:105,g:105,b:105},dodgerblue:{r:30,g:144,b:255},firebrick:{r:178,g:34,b:34},floralwhite:{r:255,g:250,b:240},forestgreen:{r:34,g:139,b:34},fuchsia:{r:255,g:0,b:255},gainsboro:{r:220,g:220,b:220},ghostwhite:{r:248,g:248,b:255},gold:{r:255,g:215,b:0},goldenrod:{r:218,g:165,b:32},gray:{r:128,g:128,b:128},green:{r:0,g:128,b:0},greenyellow:{r:173,g:255,b:47},grey:{r:128,g:128,b:128},honeydew:{r:240,g:255,b:240},hotpink:{r:255,g:105,b:180},indianred:{r:205,g:92,b:92},indigo:{r:75,g:0,b:130},ivory:{r:255,g:255,b:240},khaki:{r:240,g:230,b:140},lavender:{r:230,g:230,b:250},lavenderblush:{r:255,g:240,b:245},lawngreen:{r:124,g:252,b:0},lemonchiffon:{r:255,g:250,b:205},lightblue:{r:173,g:216,b:230},lightcoral:{r:240,g:128,b:128},lightcyan:{r:224,g:255,b:255},lightgoldenrodyellow:{r:250,g:250,b:210},lightgray:{r:211,g:211,b:211},lightgreen:{r:144,g:238,b:144},lightgrey:{r:211,g:211,b:211},lightpink:{r:255,g:182,b:193},lightsalmon:{r:255,g:160,b:122},lightseagreen:{r:32,g:178,b:170},lightskyblue:{r:135,g:206,b:250},lightslategray:{r:119,g:136,b:153},lightslategrey:{r:119,g:136,b:153},lightsteelblue:{r:176,g:196,b:222},lightyellow:{r:255,g:255,b:224},lime:{r:0,g:255,b:0},limegreen:{r:50,g:205,b:50},linen:{r:250,g:240,b:230},magenta:{r:255,g:0,b:255},maroon:{r:128,g:0,b:0},mediumaquamarine:{r:102,g:205,b:170},mediumblue:{r:0,g:0,b:205},mediumorchid:{r:186,g:85,b:211},mediumpurple:{r:147,g:112,b:219},mediumseagreen:{r:60,g:179,b:113},mediumslateblue:{r:123,g:104,b:238},mediumspringgreen:{r:0,g:250,b:154},mediumturquoise:{r:72,g:209,b:204},mediumvioletred:{r:199,g:21,b:133},midnightblue:{r:25,g:25,b:112},mintcream:{r:245,g:255,b:250},mistyrose:{r:255,g:228,b:225},moccasin:{r:255,g:228,b:181},navajowhite:{r:255,g:222,b:173},navy:{r:0,g:0,b:128},oldlace:{r:253,g:245,b:230},olive:{r:128,g:128,b:0},olivedrab:{r:107,g:142,b:35},orange:{r:255,g:165,b:0},orangered:{r:255,g:69,b:0},orchid:{r:218,g:112,b:214},palegoldenrod:{r:238,g:232,b:170},palegreen:{r:152,g:251,b:152},paleturquoise:{r:175,g:238,b:238},palevioletred:{r:219,g:112,b:147},papayawhip:{r:255,g:239,b:213},peachpuff:{r:255,g:218,b:185},peru:{r:205,g:133,b:63},pink:{r:255,g:192,b:203},plum:{r:221,g:160,b:221},powderblue:{r:176,g:224,b:230},purple:{r:128,g:0,b:128},red:{r:255,g:0,b:0},rosybrown:{r:188,g:143,b:143},royalblue:{r:65,g:105,b:225},saddlebrown:{r:139,g:69,b:19},salmon:{r:250,g:128,b:114},sandybrown:{r:244,g:164,b:96},seagreen:{r:46,g:139,b:87},seashell:{r:255,g:245,b:238},sienna:{r:160,g:82,b:45},silver:{r:192,g:192,b:192},skyblue:{r:135,g:206,b:235},slateblue:{r:106,g:90,b:205},slategray:{r:112,g:128,b:144},slategrey:{r:112,g:128,b:144},snow:{r:255,g:250,b:250},springgreen:{r:0,g:255,b:127},steelblue:{r:70,g:130,b:180},tan:{r:210,g:180,b:140},teal:{r:0,g:128,b:128},thistle:{r:216,g:191,b:216},tomato:{r:255,g:99,b:71},transparent:{r:0,g:0,b:0,a:0},turquoise:{r:64,g:224,b:208},violet:{r:238,g:130,b:238},wheat:{r:245,g:222,b:179},white:{r:255,g:255,b:255},whitesmoke:{r:245,g:245,b:245},yellow:{r:255,g:255,b:0},yellowgreen:{r:154,g:205,b:50}};function vW(...e){const t={type:"qcm-color",r:0,g:0,b:0,a:1,invalid:!1,spaces:{}};let n=0,r=0,o=0,i=1;if(null!==(a=e[0])&&"object"==typeof a&&"type"in a&&"qcm-color"===a.type)({r:n,g:r,b:o,a:i}=e[0]),t.invalid=e[0].invalid,t.spaces={...e[0].spaces};else if(_W(e[0]))({r:n,g:r,b:o}=e[0]),"a"in e[0]&&({a:i}=e[0]);else if(e.length<3)if("string"==typeof e[0]){const a=e[0];let s;if(s=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(a))n=parseInt(s[1],10),r=parseInt(s[2],10),o=parseInt(s[3],10);else if(s=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(a))n=parseInt(s[1],10),r=parseInt(s[2],10),o=parseInt(s[3],10),i=parseFloat(s[4]);else if(s=/^ARGB\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(a))i=parseInt(s[1],10)/255,n=parseInt(s[2],10),r=parseInt(s[3],10),o=parseInt(s[4],10);else if(s=/^#([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})$/i.exec(a))n=parseInt(s[1],16),r=parseInt(s[2],16),o=parseInt(s[3],16),i=1;else if(s=/^#([A-Fa-f0-9])([A-Fa-f0-9])([A-Fa-f0-9])$/i.exec(a))n=parseInt(s[1]+s[1],16),r=parseInt(s[2]+s[2],16),o=parseInt(s[3]+s[3],16),i=1;else if(s=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(a)){let e=parseFloat(s[1]),t=parseFloat(s[3]),a=parseFloat(s[5]);e%=360,t/=100,a/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,a=a<0?0:a>1?1:a;const l=a<=.5?2*a*t:(2-2*a)*t;let c=e/60;const u=l*(1-Math.abs(c%2-1));let d=[];switch(c=Math.floor(c),c){case 0:d=[l,u,0];break;case 1:d=[u,l,0];break;case 2:d=[0,l,u];break;case 3:d=[0,u,l];break;case 4:d=[u,0,l];break;case 5:d=[l,0,u];break;default:d=[0,0,0]}const p=a-.5*l;n=d[0]+p,r=d[1]+p,o=d[2]+p,n=Math.round(255*n),r=Math.round(255*r),o=Math.round(255*o),i=1}else if(s=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(a)){let e=parseFloat(s[1]),t=parseFloat(s[3]),a=parseFloat(s[5]);i=parseFloat(s[7]),e%=360,t/=100,a/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,a=a<0?0:a>1?1:a;const l=a<=.5?2*a*t:(2-2*a)*t;let c=e/60;const u=l*(1-Math.abs(c%2-1));let d=[];switch(c=Math.floor(c),c){case 0:d=[l,u,0];break;case 1:d=[u,l,0];break;case 2:d=[0,l,u];break;case 3:d=[0,u,l];break;case 4:d=[u,0,l];break;case 5:d=[l,0,u];break;default:d=[0,0,0]}const p=a-.5*l;n=d[0]+p,r=d[1]+p,o=d[2]+p,n=Math.round(255*n),r=Math.round(255*r),o=Math.round(255*o)}else if(s=/^hsv\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(a)){let e=parseFloat(s[1]),t=parseFloat(s[3]),a=parseFloat(s[5]);e%=360,t/=100,a/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,a=a<0?0:a>1?1:a;const l=a*t;let c=e/60;const u=l*(1-Math.abs(c%2-1));let d=[];switch(c=Math.floor(c),c){case 0:d=[l,u,0];break;case 1:d=[u,l,0];break;case 2:d=[0,l,u];break;case 3:d=[0,u,l];break;case 4:d=[u,0,l];break;case 5:d=[l,0,u];break;default:d=[0,0,0]}const p=a-l;n=d[0]+p,r=d[1]+p,o=d[2]+p,n=Math.round(255*n),r=Math.round(255*r),o=Math.round(255*o),i=1}else{const e=a.toLowerCase();if(function(e){return e in xW}(e)){const t=xW[e];({r:n,g:r,b:o}=t),i="a"in t?t.a:1}else t.invalid=!0}}else"number"==typeof e[0]&&e[0]>=0&&"argb"===e[1]?(i=(4278190080&e[0])>>>24,i/=255,n=(16711680&e[0])>>16,r=(65280&e[0])>>8,o=255&e[0]):"number"==typeof e[0]&&e[0]>=0?(n=(16711680&e[0])>>16,r=(65280&e[0])>>8,o=255&e[0]):t.invalid=!0;else 3===e.length||4===e.length?(n=e[0],r=e[1],o=e[2],i=4===e.length?e[3]:1):t.invalid=!0;var a;return Number.isNaN(+n+r+o+i)&&(t.invalid=!0),t.r=Math.floor(n),t.g=Math.floor(r),t.b=Math.floor(o),t.a=i,t}function wW(e){let t,n,r;if(_W(e))return t=e.r.toString(16),n=e.g.toString(16),r=e.b.toString(16),1===t.length&&(t=`0${t}`),1===n.length&&(n=`0${n}`),1===r.length&&(r=`0${r}`),`#${[t,n,r].join("")}`;const o="string"==typeof e?bW(e):e;return t=((16711680&o)>>16).toString(16),n=((65280&o)>>8).toString(16),r=(255&o).toString(16),1===t.length&&(t=`0${t}`),1===n.length&&(n=`0${n}`),1===r.length&&(r=`0${r}`),`#${t}${n}${r}`}function SW(e){let t,n,r=0;const o="string"==typeof e?vW(e):e,i=o.r/255,a=o.g/255,s=o.b/255,{a:l}=o,c=Math.max(i,a,s),u=Math.min(i,a,s),d=(c+u)/2;if(c===u)t=0,r=0;else{switch(n=c-u,t=d>.5?n/(2-c-u):n/(c+u),c){case i:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-i)/n+2;break;case s:r=(i-a)/n+4}r/=6}return{h:360*r,s:100*t,l:100*d,a:l}}function CW(e){let t,n,r=0;const o="string"==typeof e?vW(e):e,i=o.r/255,a=o.g/255,s=o.b/255,l=Math.max(i,a,s),c=Math.min(i,a,s),u=l;if(l===c)t=0,r=0;else{switch(n=l-c,t=0===n?0:n/u,l){case i:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-i)/n+2;break;case s:r=(i-a)/n+4}r/=6}return{h:360*r%360,s:100*t,v:100*u}}function EW(e){if(_W(e))return`rgb(${e.r}, ${e.g}, ${e.b})`;const t="string"==typeof e?bW(e):e;return`rgb(${(16711680&t)>>16}, ${(65280&t)>>8}, ${255&t})`}function kW(e,t){return _W(e)?`rgba(${e.r}, ${e.g}, ${e.b}, ${e.a})`:kW(vW(e))}function MW(e){return _W(e)?1===e.a?EW(e):kW(e):MW(vW(e))}const RW=e=>{const t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};function AW(e){return.2126*RW(e.r)+.7152*RW(e.g)+.0722*RW(e.b)}function IW(...e){const t=vW(...e),n={type:t.type,r:t.r,g:t.g,b:t.b,a:t.a,invalid:t.invalid,spaces:t.spaces},r=()=>(n.spaces.hslaObject||(n.spaces.hslaObject=SW(n)),n.spaces.hslaObject),o=e=>{const t=r(),{h:n,s:o,l:i,a:a}=t;return`hsla(${n}, ${o}, ${Math.max(0,Math.min(i+e,100))}, ${a})`};return{get type(){return n.type},isInvalid:()=>n.invalid,get r(){return n.r},get g(){return n.g},get b(){return n.b},get a(){return n.a},getR:()=>n.r,getG:()=>n.g,getB:()=>n.b,getAlpha:()=>n.a,setAlpha:e=>{n.a=e,n.spaces={}},isEqualTo:e=>{let t;if("string"==typeof e)t=vW(e);else{if(e.type!==n.type)return!1;t=e}return t.r===n.r&&t.g===n.g&&t.b===n.b&&t.a===n.a},isDark:()=>function(...e){const t=vW(...e);return t.invalid||AW(t)<.4}(n),getRGB:()=>(n.spaces.rgb||(n.spaces.rgb=EW(n)),n.spaces.rgb),getRGBA:()=>(n.spaces.rgba||(n.spaces.rgba=kW(n)),n.spaces.rgba),getString:()=>(n.spaces.string||(n.spaces.string=MW(n)),n.spaces.string),getHex:()=>(n.spaces.hex||(n.spaces.hex=wW(n)),n.spaces.hex),getHSL:()=>(n.spaces.hsl||(n.spaces.hsl=function(e){let t,n,r=0;const o="string"==typeof e?vW(e):e,i=o.r/255,a=o.g/255,s=o.b/255,l=Math.max(i,a,s),c=Math.min(i,a,s),u=(l+c)/2;if(l===c)t=0,r=0;else{switch(n=l-c,t=u>.5?n/(2-l-c):n/(l+c),l){case i:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-i)/n+2;break;case s:r=(i-a)/n+4}r/=6}return`hsl(${360*r}, ${100*t}, ${100*u})`}(n)),n.spaces.hsl),getHSLA:()=>(n.spaces.hsla||(n.spaces.hsla=function(e){const{h:t,s:n,l:r,a:o}=SW(e);return`hsla(${t}, ${n}, ${r}, ${o})`}(n)),n.spaces.hsla),getHSLAObject:r,getShiftedHSLA:o,getHSV:()=>(n.spaces.hsv||(n.spaces.hsv=function(e){const{h:t,s:n,v:r}=CW(e);return`hsv(${t}, ${n}, ${r})`}(n)),n.spaces.hsv),getHSVObject:()=>(n.spaces.hsvObject||(n.spaces.hsvObject=CW(n)),n.spaces.hsvObject),blend:(e,t)=>`rgba(${Math.floor(n.r+(e.r-n.r)*t)}, ${Math.floor(n.g+(e.g-n.g)*t)}, ${Math.floor(n.b+(e.b-n.b)*t)}, ${Math.floor(n.a+(e.getAlpha()-n.a)*t)})`,getBrightenedColor:(e=1)=>IW(o(18*e)),getDarkenedColor:(e=1)=>IW(o(18*-e))}}function PW(e,t){if(!e||!t)return;const n=AW(e),r=AW(t);return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)}var OW,LW,DW=["American Typewriter, serif","Andalé Mono, monospace","Arial Black, sans-serif","Arial, sans-serif","Bradley Hand, cursive","Brush Script MT, cursive","Comic Sans MS, cursive","Courier, monospace","Didot, serif","Georgia, serif","Impact, sans-serif","Lucida Console, monospace","Luminari, fantasy","Monaco, monospace","QlikView Sans, sans-serif","Source Sans Pro, sans-serif","Tahoma, sans-serif","Times New Roman, serif","Trebuchet MS, sans-serif","Verdana, sans-serif"],TW=["Abril Fatface, serif","Bangers, fantasy","Bebas Neue, sans serif","EB Garamond, serif","Fredoka One, fantasy","Graduate, fantasy","Gravitas One, serif","Indie Flower, fantasy","Inter, sans-serif","Lobster, fantasy","Montserrat, sans-serif","Nixie One, sans-serif","Noto Sans, sans-serif","Open Sans, sans-serif","PT Serif, serif","Pacifico, cursive","Permanent Marker, fantasy","QlikView Sans, sans-serif","Raleway, sans-serif","Rammetto One, fantasy","Roboto, sans-serif","Source Sans Pro, sans-serif","Titan One, fantasy","Yanone Kaffeesatz, sans-serif"];function zW(e){return null!=e&&e.isEnabled("PS_20852_WYSIWYG_FONT_SUPPORT")?TW:DW}var jW=function(){if(LW)return OW;LW=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},i=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,o=e.call(n,"constructor"),i=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!o&&!i)return!1;for(r in n);return void 0===r||e.call(n,r)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return OW=function e(){var t,n,r,l,c,u,d=arguments[0],p=1,h=arguments.length,f=!1;for("boolean"==typeof d&&(f=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<h;++p)if(null!=(t=arguments[p]))for(n in t)r=s(d,n),d!==(l=s(t,n))&&(f&&l&&(i(l)||(c=o(l)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&i(r)?r:{},a(d,{name:n,newValue:e(f,u,l)})):void 0!==l&&a(d,{name:n,newValue:l}));return d},OW}();function NW(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function qW(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function FW(){}!function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")&&e.default}(jW);var WW=1/.7,BW="\\s*([+-]?\\d+)\\s*",$W="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",HW="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",VW=/^#([0-9a-f]{3,8})$/,GW=new RegExp(`^rgb\\(${BW},${BW},${BW}\\)$`),UW=new RegExp(`^rgb\\(${HW},${HW},${HW}\\)$`),YW=new RegExp(`^rgba\\(${BW},${BW},${BW},${$W}\\)$`),KW=new RegExp(`^rgba\\(${HW},${HW},${HW},${$W}\\)$`),XW=new RegExp(`^hsl\\(${$W},${HW},${HW}\\)$`),JW=new RegExp(`^hsla\\(${$W},${HW},${HW},${$W}\\)$`),ZW={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 QW(){return this.rgb().formatHex()}function eB(){return this.rgb().formatRgb()}function tB(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=VW.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?nB(t):3===n?new aB(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?rB(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?rB(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=GW.exec(e))?new aB(t[1],t[2],t[3],1):(t=UW.exec(e))?new aB(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=YW.exec(e))?rB(t[1],t[2],t[3],t[4]):(t=KW.exec(e))?rB(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=XW.exec(e))?pB(t[1],t[2]/100,t[3]/100,1):(t=JW.exec(e))?pB(t[1],t[2]/100,t[3]/100,t[4]):ZW.hasOwnProperty(e)?nB(ZW[e]):"transparent"===e?new aB(NaN,NaN,NaN,0):null}function nB(e){return new aB(e>>16&255,e>>8&255,255&e,1)}function rB(e,t,n,r){return r<=0&&(e=t=n=NaN),new aB(e,t,n,r)}function oB(e){return e instanceof FW||(e=tB(e)),e?new aB((e=e.rgb()).r,e.g,e.b,e.opacity):new aB}function iB(e,t,n,r){return 1===arguments.length?oB(e):new aB(e,t,n,null==r?1:r)}function aB(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function sB(){return`#${dB(this.r)}${dB(this.g)}${dB(this.b)}`}function lB(){const e=cB(this.opacity);return`${1===e?"rgb(":"rgba("}${uB(this.r)}, ${uB(this.g)}, ${uB(this.b)}${1===e?")":`, ${e})`}`}function cB(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function uB(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function dB(e){return((e=uB(e))<16?"0":"")+e.toString(16)}function pB(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new fB(e,t,n,r)}function hB(e){if(e instanceof fB)return new fB(e.h,e.s,e.l,e.opacity);if(e instanceof FW||(e=tB(e)),!e)return new fB;if(e instanceof fB)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new fB(a,s,l,e.opacity)}function fB(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function mB(e){return(e=(e||0)%360)<0?e+360:e}function gB(e){return Math.max(0,Math.min(1,e||0))}function yB(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}NW(FW,tB,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:QW,formatHex:QW,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return hB(this).formatHsl()},formatRgb:eB,toString:eB}),NW(aB,iB,qW(FW,{brighter(e){return e=null==e?WW:Math.pow(WW,e),new aB(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new aB(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new aB(uB(this.r),uB(this.g),uB(this.b),cB(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:sB,formatHex:sB,formatHex8:function(){return`#${dB(this.r)}${dB(this.g)}${dB(this.b)}${dB(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:lB,toString:lB})),NW(fB,(function(e,t,n,r){return 1===arguments.length?hB(e):new fB(e,t,n,null==r?1:r)}),qW(FW,{brighter(e){return e=null==e?WW:Math.pow(WW,e),new fB(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new fB(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new aB(yB(e>=240?e-240:e+120,o,r),yB(e,o,r),yB(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new fB(mB(this.h),gB(this.s),gB(this.l),cB(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=cB(this.opacity);return`${1===e?"hsl(":"hsla("}${mB(this.h)}, ${100*gB(this.s)}%, ${100*gB(this.l)}%${1===e?")":`, ${e})`}`}}));const _B=Math.PI/180,bB=180/Math.PI,xB=4/29,vB=6/29,wB=3*vB*vB;function SB(e){if(e instanceof CB)return new CB(e.l,e.a,e.b,e.opacity);if(e instanceof AB)return IB(e);e instanceof aB||(e=oB(e));var t,n,r=RB(e.r),o=RB(e.g),i=RB(e.b),a=EB((.2225045*r+.7168786*o+.0606169*i)/1);return r===o&&o===i?t=n=a:(t=EB((.4360747*r+.3850649*o+.1430804*i)/.96422),n=EB((.0139322*r+.0971045*o+.7141733*i)/.82521)),new CB(116*a-16,500*(t-a),200*(a-n),e.opacity)}function CB(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function EB(e){return e>.008856451679035631?Math.pow(e,1/3):e/wB+xB}function kB(e){return e>vB?e*e*e:wB*(e-xB)}function MB(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function RB(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function AB(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function IB(e){if(isNaN(e.h))return new CB(e.l,0,0,e.opacity);var t=e.h*_B;return new CB(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}NW(CB,(function(e,t,n,r){return 1===arguments.length?SB(e):new CB(e,t,n,null==r?1:r)}),qW(FW,{brighter(e){return new CB(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new CB(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new aB(MB(3.1338561*(t=.96422*kB(t))-1.6168667*(e=1*kB(e))-.4906146*(n=.82521*kB(n))),MB(-.9787684*t+1.9161415*e+.033454*n),MB(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),NW(AB,(function(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof AB)return new AB(e.h,e.c,e.l,e.opacity);if(e instanceof CB||(e=SB(e)),0===e.a&&0===e.b)return new AB(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*bB;return new AB(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new AB(e,t,n,null==r?1:r)}),qW(FW,{brighter(e){return new AB(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new AB(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return IB(this).rgb()}}));var PB=e=>()=>e;function OB(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):PB(isNaN(e)?t:e)}!function e(t){var n=function(e){return 1==(e=+e)?OB: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):PB(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=iB(e)).r,(t=iB(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=OB(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=i(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);var LB,DB="center",TB="bottom";function zB(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return e},n=function(){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={}}}}();return function(r){var o=t(r);return n.has(o)?n.get(o):n.set(o,e(r))}}function jB(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 NB(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=FB)):void 0===t&&(t=qB);for(var n,r,o,i,a,s=new $B(e),l=[s];n=l.pop();)if((o=t(n.data))&&(a=(o=Array.from(o)).length))for(n.children=o,i=a-1;i>=0;--i)l.push(r=o[i]=new $B(o[i])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(BB)}function qB(e){return e.children}function FB(e){return Array.isArray(e)?e[1]:null}function WB(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function BB(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function $B(e){this.data=e,this.depth=this.height=0,this.parent=null}[{key:"NoDataExist",alignment:DB,condition:function(e){var t=e.layoutService;if(!t)return!1;var n=t.meta.size;return n.x*n.y==0}},{key:"OnlyNanDataMeasure",translationKey:"OnlyNanData",alignment:DB,condition:function(e){var t=e.layoutService;return!!t&&t.getHyperCubeValue("qMeasureInfo").every((function(e){return"NaN"===e.qMin&&"NaN"===e.qMax}))}},{key:"OnlyNanDataDimensionContinuous",translationKey:"OnlyNanData",alignment:DB,condition:function(e){var t=e.layoutService;if(!t)return!1;if(!t.meta.isContinuous)return!1;var n=t.getHyperCubeValue("qDimensionInfo.0");return n&&(n.qMax<n.qMin||"NaN"===n.qMax)}},{key:"OnlyNegativeOrZeroValues",alignment:DB},{key:"DataRangeIncludingZero",alignment:TB},{key:"LimitedData",alignment:TB},{key:"NegativeOrZeroValues",alignment:TB}].reduce((function(e,t){return e[t.key]=t,e}),{}),$B.prototype=NB.prototype={constructor:$B,count:function(){return this.eachAfter(jB)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,o,i=this,a=[i],s=[],l=-1;i=a.pop();)if(s.push(i),n=i.children)for(r=0,o=n.length;r<o;++r)a.push(n[r]);for(;i=s.pop();)e.call(t,i,++l,this);return this},eachBefore:function(e,t){for(var n,r,o=this,i=[o],a=-1;o=i.pop();)if(e.call(t,o,++a,this),n=o.children)for(r=n.length-1;r>=0;--r)i.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,o=r&&r.length;--o>=0;)n+=r[o].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(),o=null;for(e=n.pop(),t=r.pop();e===t;)o=e,e=n.pop(),t=r.pop();return o}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var o=r.length;e!==n;)r.splice(o,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return NB(this).eachBefore(WB)},[Symbol.iterator]:function*(){var e,t,n,r,o=this,i=[o];do{for(e=i.reverse(),i=[];o=e.pop();)if(yield o,t=o.children)for(n=0,r=t.length;n<r;++n)i.push(t[n])}while(i.length)}},LB=function(e){
|
|
181
181
|
/*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
|
|
182
|
-
e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,o,i,a,s,l,c,u,d,p=e.length,h=e.search(/[0-9\-\+#]/),f=h>0?e.substring(0,h):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),y=p-g,_=e.substring(y,y+1),b=y+("."===_||","===_?1:0),x=g>0?e.substring(b,p):"";if(n=(t="-"===(e=e.substring(h,b)).charAt(0)?-t:+t)<0?t=-t:0,o=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",i=r&&r[1]&&r[0]||",",e=e.split(o),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(c=t.split("."))[1]||c[1]&&c[1].length<=s)&&(t=(+t).toFixed(s+1)),u=e[0].split(i),e[0]=u.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;c[0].length<e[0].length-a;)c[0]="0"+c[0];else 0==+c[0]&&(c[0]="");if((t=t.split("."))[0]=c[0],l=u[1]&&u[u.length-1].length){for(m="",y=(d=t[0]).length%l,p=d.length,b=0;b<p;b++)m+=d.charAt(b),!((b-y+1)%l)&&b<p-l&&(m+=i);t[0]=m}return t[1]=e[1]&&t[1]?o+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),f+(n?"-":"")+r+x}},LB({exports:{}});const HB=(e,t=yW.TEXT,n=yW.WHITE)=>{const r=IW(e),o=IW(t),i=IW(n);return r.isInvalid()?t:function(e,t,n){const r=PW(e,t),o=PW(e,n);if(void 0!==r&&void 0!==o)return r>o?t:n}(r,i,o).getRGB()},VB=e=>{const t=e.getStyle("","","dataColors.selected")||yW.SELECTED,n=function(e,t){const n=IW("#FFFFFF"),r=IW(e),o=IW(t);if(r.isInvalid()||o.isInvalid()||r.getAlpha()<1||o.getAlpha()<1)return t;const i=PW(n,r),a=PW(o,r),s=i>a||i>4.5;return!s&&a>3?o.getHex():s?"#FFFFFF":"#000000"}(t,yW.TEXT);return{background:t,color:n}},GB=(e,t)=>{const n=IW(e);return 0===n.a?(n.setAlpha(t.opacity),n.getString()):n.isDark()?n.getBrightenedColor(t.brighter).getString():n.getDarkenedColor(t.darker).getString()},UB=e=>{const t=IW(e);return t.isInvalid()?null:1===t.a?t.getRGB():t.getRGBA()},YB=e=>{e.stopPropagation(),e.preventDefault()},KB=(e,t,n,r)=>({ref:e,translation:t,dualOutput:!0,type:"object",component:"color-picker",width:"auto",disableNone:r??!1,defaultValue(e,t,o){const i=r?.(e,t,o)??!1,a=o.theme.current(),s=n(a,i);return{color:"transparent"===s?"none":s}}}),XB=(e,t=!1)=>{return{value:e,label:t?(n=e,n.charAt(0).toUpperCase()+n.slice(1)):e,groupHeader:!1,disabled:!1,styles:t?{fontFamily:e}:void 0};var n},JB=({ref:e,themeAccessor:t,translator:n,flags:r})=>({component:"dropdown",ref:e,options:(e,o,i)=>{const a=i.theme.current();return((e,t,n,r)=>{const o=t.fontFamily??"Source Sans Pro, sans-serif",i=t.fontFamilies??[],a=Array.from(new Set([e,o,...i])),s=[{value:"ThemeHeader",label:n.get("properties.themeFonts"),metaText:n.get("properties.theme"),groupHeader:!0},...a.sort().map((e=>XB(e,!0)))],l=[{value:"DefaultHeader",label:n.get("properties.allFonts"),metaText:n.get("properties.default"),groupHeader:!0},...zW(r).filter((e=>!a.includes(e))).map((e=>XB(e,!0)))];return[...s,...l.length>1?l:[]]})(t(a),a,n,r)},defaultValue:(e,n,r)=>t(r.theme.current())}),ZB=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],QB=({ref:e,themeAccessor:t,translator:n})=>({component:"dropdown",ref:e,options:(e,r,o)=>{const i=o.theme.current();return((e,t,n)=>{const r=t.fontSize,o=t.fontSizes??[],i=Array.from(new Set([e,r,...o])),a=[{value:"ThemeHeader",label:n.get("properties.themeFontSizes"),metaText:n.get("properties.theme"),groupHeader:!0},...i.sort(((e,t)=>parseInt(e,10)-parseInt(t,10))).map((e=>XB(e,!1)))],s=[{value:"DefaultHeader",label:n.get("properties.allFontSizes"),metaText:n.get("properties.default"),groupHeader:!0},...ZB.filter((e=>!i.includes(e))).map((e=>XB(e,!1)))];return[...a,...s.length>1?s:[]]})(t(i),i,n)},defaultValue:(e,n,r)=>t(r.theme.current())}),e$=({section:e,defaultFontStyle:t,translator:n,flags:r,getThemeValue:o,translation:i,disableNoneCallback:a})=>({component:"panel-section",translation:i??`properties.pivot.${e}`,items:{content:{component:"items",ref:"components",key:"theme",items:{fontFamily:JB({ref:`${e}.fontFamily`,themeAccessor:t=>o(t,e,"fontFamily")??t.fontFamily,translator:n,flags:r}),fontWrapperItem:{component:"inline-wrapper",items:{fontStyle:{component:"font-style-buttons",width:!1,ref:`${e}.fontStyle`,defaultValue:t??[]},fontSize:QB({ref:`${e}.fontSize`,themeAccessor:t=>o(t,e,"fontSize")??t.fontSize,translator:n}),fontColor:KB(`${e}.fontColor`,void 0,(t=>o(t,e,"color")??t.color))}},background:KB(`${e}.background`,"properties.background",((t,n)=>{const r=n?yW.WHITE:yW.TRANSPARENT;return o(t,e,"backgroundColor")??r}),a)}}}}),t$=({section:e,defaultFontStyle:t,fallbackBackground:n,getThemeValue:r})=>({component:"panel-section",translation:`properties.pivot.${e}`,items:{content:{component:"items",ref:"components",key:"theme",items:{fontWrapperItem:{component:"inline-wrapper",items:{fontStyle:{component:"font-style-buttons",fullWidth:!0,ref:`${e}.fontStyle`,defaultValue:t??[]},fontColor:KB(`${e}.fontColor`,void 0,(t=>r(t,e,"color")??t.color))}},background:KB(`${e}.background`,"properties.background",(t=>r(t,e,"backgroundColor")??n??"transparent"))}}}}),n$=(e,t)=>({component:"dropdown",ref:e,translation:t,options:[...Array(10).keys()].map((e=>({value:e+1,translation:e+1}))),defaultValue:1}),r$="12px",o$="Source Sans Pro, sans-serif",i$="600",a$=15e3,s$=4/3;let l$=function(e){return e.Transparent="transparent",e.FontSecondary="#737373",e.DividerDark="#595959",e.DividerLight="#D9D9D9",e.NullValueBackground="#F2F2F2",e}({}),c$=function(e){return e.Solid="solid",e.None="none",e}({});const u$={display:"flex",justifyContent:"center",alignItems:"center"},d$={borderStyle:"solid"},p$={boxSizing:"border-box",padding:"4px 8px",userSelect:"none",WebkitUserSelect:"none"},h$={lineHeight:s$,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},f$=e=>({whiteSpace:"unset",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",wordBreak:e>1?"break-word":"break-all"}),m$=(e,t)=>e>0?`${e}px ${c$.Solid} ${t}`:c$.None,g$=(e,t,n,r,o)=>{const i=Number(!t||o?.right),a=Number(!e||o?.bottom);return{borderRight:"rtl"!==r?m$(i,n):c$.None,borderBottom:m$(a,n),borderLeft:"rtl"===r?m$(i,n):c$.None,borderTop:c$.None}},y$=(e,t,n,r,o,i,a)=>{const s=g$(t,r,o,i,a);return e.isLeftDimension||(e.isLastDimension&&!t&&(s.borderBottom=m$(2,o)),n||(s.borderLeft="rtl"!==i?m$(1,o):"none",s.borderRight="rtl"===i?m$(1,o):"none")),s},_$=({bottomDivider:e,rightDivider:t,borderColor:n})=>{const r={};return e&&(r.borderBottom=m$(1,n)),t&&(r.borderRight=m$(1,n)),r},b$=(e,t,n)=>{switch(t){case"header":return e.object?.pivotTableV2?.dimension?.label?.name?.[n];case"dimensionValues":return e.object?.pivotTableV2?.dimension?.label?.value?.[n];case"measureLabels":return e.object?.pivotTableV2?.measure?.label?.name?.[n];case"measureValues":return e.object?.pivotTableV2?.measure?.label?.value?.[n];case"totalValues":return e.object?.pivotTableV2?.total?.label?.value?.[n];case"nullValues":return e.object?.pivotTableV2?.null?.label?.value?.[n];default:return}},x$=(e,t)=>({type:"items",items:[{component:"styling-panel",chartTitle:"Object.PivotTable",subtitle:"LayerStyleEditor.component.styling",translation:"LayerStyleEditor.component.styling",ref:"components",useGeneral:!0,useBackground:!0,defaultValue:[],items:{headerSection:e$({section:"header",defaultFontStyle:["bold"],translator:e,flags:t,getThemeValue:b$}),dimensionValueSection:e$({section:"dimensionValues",translator:e,flags:t,getThemeValue:b$}),measureValueSection:e$({section:"measureValues",translator:e,flags:t,getThemeValue:b$}),measureLabelSection:t$({section:"measureLabels",getThemeValue:b$}),totalValuesSection:t$({section:"totalValues",defaultFontStyle:["bold"],getThemeValue:b$}),nullValuesSection:t$({section:"nullValues",fallbackBackground:l$.NullValueBackground,getThemeValue:b$}),gridSection:{translation:"properties.pivot.grid",component:"panel-section",items:{gridItems:{component:"items",ref:"components",key:"theme",items:{lineClamp:n$("grid.lineClamp","ThemeStyleEditor.style.rowHeight"),columnLineClamp:n$("grid.columnLineClamp","ThemeStyleEditor.style.columnHeight"),border:KB("grid.border","properties.border",(e=>e.object?.pivotTableV2?.grid?.borderColor??l$.DividerLight)),divider:KB("grid.divider","properties.pivot.divider",(e=>e.object?.pivotTableV2?.grid?.divider?.borderColor??l$.DividerDark)),background:KB("grid.background","properties.background",(e=>e.object?.pivotTableV2?.grid?.backgroundColor??l$.Transparent))}}}}}}]}),v$=e=>{if(e.isEnabled("CLIENT_IM_5973_PIVOT_TABLE_EXPLORATION"))return{chartExploration:{type:"items",translation:"properties.chartExploration",items:{chartExplorationToggler:{type:"items",component:"chart-exploration-toggler",translation:"properties.enableChartExploration",ref:"enableChartExploration"},visibilityToggler:{show:e=>e.enableChartExploration,component:"buttongroup",translation:"properties.ChartExploration.VisibilityOption",ref:"chartExploration.menuVisibility",options:[{value:"auto",translation:"Common.Auto"},{value:"minimized",translation:"properties.ChartExploration.Minimized"}]}},show:e=>!e.insideContainer}}},w$=(e,t)=>({uses:"settings",items:{presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:[x$(e,t),{type:"items",items:{nullValueText:{ref:"nullValueRepresentation.text",type:"string",translation:"properties.pivot.nullValueText",defaultValue:"-"},alwaysFullyExpanded:{ref:"qHyperCubeDef.qAlwaysFullyExpanded",type:"boolean",translation:"properties.pivot.fullyExpanded",defaultValue:!1},indentMode:{ref:"qHyperCubeDef.qIndentMode",type:"boolean",translation:"properties.pivot.indentMode",defaultValue:!1,change(e){e.qHyperCubeDef.qShowTotalsAbove=!0}},type:{type:"string",component:"dropdown",ref:"qHyperCubeDef.indentModeColumnWidth.type",translation:"Object.Table.Column.Width",options:[{value:gN.Auto,translation:"Common.Auto"},{value:gN.Pixels,translation:"Object.Table.Column.Pixels"},{value:gN.Percentage,translation:"Object.Table.Column.Percentage"}],defaultValue:gN.Auto,show:e=>!!e.qHyperCubeDef.qIndentMode},sizePixels:{ref:"qHyperCubeDef.indentModeColumnWidth.pixels",translation:"Object.Table.Column.Pixels",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:mN.PixelsDefault,show:e=>{const t=e.qHyperCubeDef;return t.qIndentMode&&t.indentModeColumnWidth?.type===gN.Pixels}},sizePercentage:{ref:"qHyperCubeDef.indentModeColumnWidth.percentage",translation:"Object.Table.Column.Percentage",component:"expression",expressionType:"ValueExpression",expression:"optional",defaultValue:mN.PercentageDefault,show:e=>{const t=e.qHyperCubeDef;return t.qIndentMode&&t.indentModeColumnWidth?.type===gN.Percentage}},showTotalsAbove:{ref:"qHyperCubeDef.qShowTotalsAbove",type:"boolean",translation:"properties.pivot.showTotalsAbove",defaultValue:!0,show(e){const{qIndentMode:t}=e.qHyperCubeDef;return!t&&!!e.qHyperCubeDef.qDimensions.some((e=>"TOTAL_EXPR"===e.qOtherTotalSpec?.qTotalMode))}},resetProperties:{type:"object",component:"button",translation:"properties.pivot.resetExpansionButton",disabled:e=>!!e.qHyperCubeDef.qAlwaysFullyExpanded,action(e,t,n,r){e.qHyperCubeDef.qExpansionState=[],r.$emit("saveProperties",e)}}}}]},...v$(t)}}),S$="auto",C$={type:"items",translation:"properties.sorting",items:{sortbyY:{type:"items",items:{sortbyYToggle:{ref:"qHyperCubeDef.qSortbyYValue",type:"boolean",component:"switch",translation:"properties.sorting.sortByY.label",convertFunctions:{get:e=>!!e("integer"),set:(e,t)=>{t("integer",e?-1:0)}},options:[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}]},sortbyYOrder:{ref:"qHyperCubeDef.qSortbyYValue",type:"string",component:"dropdown",defaultValue:0,options:[{value:1,translation:"properties.sorting.ascending"},{value:-1,translation:"properties.sorting.descending"}],show:e=>!!e.qHyperCubeDef.qSortbyYValue}}},defaultSorting:{uses:"sorting",items:{dimensions:{showPriority:!1,allowMove:!1},measures:{included:!1}}},searchSorting:{ref:"search.sorting",type:"string",component:"dropdown",defaultValue:S$,translation:"Object.Table.SortingInSearch",options:[{value:S$,translation:"Common.Auto"},{value:"inherit",translation:"Object.Table.SortingInSearch.InheritFromDimension"}]}}};function E$(e){const{translator:t,flags:n}=e;return{type:"items",component:"accordion",items:{data:mW(e),sorting:C$,addons:KF,settings:w$(t,n)}}}function k$(e){return{support:{cssScaling:!0,snapshot:!0,export:!0,exploration:e.flags.isEnabled("CLIENT_IM_5973_PIVOT_TABLE_EXPLORATION"),sharing:!1,exportData:!0,viewData:!0},usePropertyHandler:"pivot-data",definition:E$(e),importProperties:UF(e),exportProperties:YF,exploration:XN(e)}}const M$=()=>{let e;const t=new Promise((t=>{e=t}));return{promise:t,resolve:e}};function R$(e,t){return C((()=>e),t)}const A$={},I$=e=>{const t=C((()=>({current:A$})),[]);return t.current=t.current===A$?e:t.current,t},P$=()=>{const{viewState:e}=E(),t=I$(new Set),n=void 0!==window.qlikprinting,{promise:r,resolve:o}=C((()=>M$()),[]),i=R$((e=>{n&&t.current.add(e)}),[t]),a=R$(function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return function(){for(var r=this,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];clearTimeout(t),t=setTimeout((function(){return e.apply(r,i)}),n)}}((async()=>{await Promise.all(t.current),t.current.clear(),o()}),1e3),[o,t]);return k((async()=>{n&&await r}),[r,n]),C((()=>({viewState:e,isDownloadedAsPDForImage:n,notifyIsDoneRendering:a,waitForPromise:i})),[a,n,e,i])},O$=e=>!!e&&0===IW(e).a,L$="#grid",D$=(e,t)=>{const n=t?.closest(e);return n&&window.getComputedStyle(n).backgroundColor},T$=(e,t,n,r,o)=>{const i=D$(".qv-object .qv-inner-object",n),a=D$(".qv-panel-sheet",n),s=D$(L$,n)??a,l=(e=>{const t=e.components?.find((e=>"general"===e.key)),n=t?.bgColor?.colorExpression,r=t?.bgColor?.color?.color,o=t?.bgColor?.useColorExpression;if(o&&n)return UB(n);if("none"===r)return"transparent";if(void 0===r)return;const i=IW(r);return i.setAlpha(t?.bgColor?.color?.alpha??i.a),i.getRGBA()})(e),c=r?.(t),u=o?.(t),d=l||c||i||u,p=O$(d),h=!O$(f=p?s:d)&&HB(f,yW.TEXT,yW.DARK_MODE_TEXT)===EW(yW.DARK_MODE_TEXT);var f;const m=((e,t,n,r=yW.WHITE)=>e&&!O$(e)?e:O$(t)?n&&!O$(n)?n:r:t)(l,d,s);return{color:d,headerColor:m,isDark:h}},z$=(e,t,n,r)=>{const o=A(),i=((e,t={attributeFilter:["style"],childList:!1,subtree:!1})=>{const[n,r]=M([]);return R((()=>{let n;return e&&(n=new MutationObserver((e=>{r(e)})),n.observe(e,t)),()=>{n?.disconnect()}}),[e,t]),n})(t.closest(L$),{attributeFilter:["style"],childList:!1,subtree:!1,attributeOldValue:!0}).filter((({oldValue:e})=>e?.includes("background"))).map((({oldValue:e})=>e)).join(",");return C((()=>({...o,background:T$(e,o,t,n,r)})),[o.name(),t,n,r,e,i])};function j$(e,t){const n=C((()=>({isLoading:!0})),t),[r,o]=k((async()=>{try{return await e()}finally{n.isLoading=!1}}),t);return[r,n.isLoading,o]}const N$=3;function q$(e,t,n){let r=0,o=e.length;if(e.length<=1)return null;if(n(e)<=t)return null;for(;r<=o;){const i=Math.floor((r+o)/2),a=e.slice(0,i),s=e.slice(0,i-1),l=n(a),c=n(s);if(l>t&&c<=t)return e.slice(i-1)||null;if(l===t)return e.slice(i)||null;l<t?r=i+1:o=i}return null}function F$({fontSize:e="12px",fontFamily:t="Source Sans Pro, Arial, sans-serif",fontStyle:n="normal",fontWeight:r="normal"},o){const{maxNbrLinesOfText:i=N$}={},{estimateWidth:a,measureText:s,estimateLineCount:l}=f((()=>{const o=document.createElement("canvas").getContext("2d");o.font=`${n} ${r} ${e} ${t}`;const a=zB(o.measureText.bind(o)),s=e=>+a(e).width.toFixed(2),l=zB((({text:e,maxWidth:t,isNumeric:n=!1})=>{if(n)return 1;let r=0,o=e;do{r+=1,o=q$(o,t,s)}while(null!==o&&r<i);return r}),(({text:e,maxWidth:t,isNumeric:n})=>`${e}-${t}-${n?"true":"false"}`));return{measureText:e=>a(e).width,estimateWidth:e=>a("N").width*e,estimateLineCount:l}}),[n,r,e,t,i]);return{estimateWidth:a,measureText:s,estimateLineCount:l}}var W$,B$=w;W$=B$.createRoot,B$.hydrateRoot;const $$="Source Sans Pro, sans-serif";function H$(e,t){const[n,r]=m(t),o=n.some(((e,n)=>e!==t[n]));o&&(r(t),e())}var V$={NebulaTableUtils_ColumnAdjuster_ColumnNameLabel:{id:"NebulaTableUtils.ColumnAdjuster.ColumnNameLabel",locale:{"de-DE":"Breite von {0}","en-US":"Width of {0}","es-ES":"Ancho de {0}","fr-FR":"Largeur de {0}","it-IT":"Larghezza di {0}","ja-JP":"{0} の幅","ko-KR":"{0}의 너비","nl-NL":"Breedte van {0}","pl-PL":"Szerokość kolumny {0}","pt-BR":"Comprimento de {0}","ru-RU":'Ширина столбца "{0}"',"sv-SE":"Bredd på {0}","tr-TR":"{0} genişliği","zh-CN":"{0} 的宽度","zh-TW":"{0} 的寬度"}},NebulaTableUtils_MenuGroupLabel_Sorting:{id:"NebulaTableUtils.MenuGroupLabel.Sorting",locale:{"de-DE":"Sortierung","en-US":"Sorting","es-ES":"Ordenación","fr-FR":"Tri","it-IT":"Ordinamento","ja-JP":"ソート","ko-KR":"정렬","nl-NL":"Sorteren","pl-PL":"Sortowanie","pt-BR":"Classificação","ru-RU":"Сортировка","sv-SE":"Sortering","tr-TR":"Sıralama","zh-CN":"排序","zh-TW":"排序"}},NebulaTableUtils_MenuItemLabel_AdjustColumnSize:{id:"NebulaTableUtils.MenuItemLabel.AdjustColumnSize",locale:{"de-DE":"Spaltengröße anpassen","en-US":"Adjust column size","es-ES":"Ajustar el tamaño de columna","fr-FR":"Ajuster la taille de colonne","it-IT":"Regola dimensioni colonna","ja-JP":"列サイズを調整","ko-KR":"열 크기 조정","nl-NL":"Kolomgrootte aanpassen","pl-PL":"Dostosuj rozmiar kolumny","pt-BR":"Ajustar tamanho da coluna","ru-RU":"Настроить размер столбца","sv-SE":"Justera kolumnens storlek","tr-TR":"Sütun boyutunu ayarla","zh-CN":"调节列大小","zh-TW":"調整欄大小"}},NebulaTableUtils_MenuItemLabel_ClearSelections:{id:"NebulaTableUtils.MenuItemLabel.ClearSelections",locale:{"de-DE":"Auswahlen löschen","en-US":"Clear selections","es-ES":"Borrar selecciones","fr-FR":"Effacer les sélections","it-IT":"Cancella selezioni","ja-JP":"選択をクリア","ko-KR":"선택 지우기","nl-NL":"Geselecteerde waarden wissen","pl-PL":"Wyczyść wybory","pt-BR":"Limpar seleções","ru-RU":"Очистить выбранные","sv-SE":"Radera urval","tr-TR":"Seçimleri temizle","zh-CN":"清除选择项","zh-TW":"清除選項"}},NebulaTableUtils_MenuItemLabel_Collapse:{id:"NebulaTableUtils.MenuItemLabel.Collapse",locale:{"de-DE":"Reduzieren","en-US":"Collapse","es-ES":"Contraer","fr-FR":"Réduire","it-IT":"Comprimi","ja-JP":"折りたたむ","ko-KR":"축소","nl-NL":"Samenvouwen","pl-PL":"Zwiń","pt-BR":"Recolher","ru-RU":"Свернуть","sv-SE":"Dölj","tr-TR":"Daralt","zh-CN":"折叠","zh-TW":"收合"}},NebulaTableUtils_MenuItemLabel_ColumnOptions:{id:"NebulaTableUtils.MenuItemLabel.ColumnOptions",locale:{"de-DE":"Spaltenoptionen","en-US":"Column options","es-ES":"Opciones de columna","fr-FR":"Options de colonne","it-IT":"Opzioni colonna","ja-JP":"列オプション","ko-KR":"열 옵션","nl-NL":"Kolomopties","pl-PL":"Opcje kolumny","pt-BR":"Opções da coluna","ru-RU":"Параметры столбца","sv-SE":"Alternativ för kolumn","tr-TR":"Sütun seçenekleri","zh-CN":"列选项","zh-TW":"欄選項"}},NebulaTableUtils_MenuItemLabel_Expand:{id:"NebulaTableUtils.MenuItemLabel.Expand",locale:{"de-DE":"Erweitern","en-US":"Expand","es-ES":"Expandir","fr-FR":"Développer","it-IT":"Espandi","ja-JP":"展開","ko-KR":"확장","nl-NL":"Uitvouwen","pl-PL":"Rozwiń","pt-BR":"Expandir","ru-RU":"Развернуть","sv-SE":"Utöka","tr-TR":"Genişlet","zh-CN":"展开","zh-TW":"展開"}},NebulaTableUtils_MenuItemLabel_Search:{id:"NebulaTableUtils.MenuItemLabel.Search",locale:{"de-DE":"Suchen","en-US":"Search","es-ES":"Buscar","fr-FR":"Rechercher","it-IT":"Cerca","ja-JP":"検索","ko-KR":"검색","nl-NL":"Zoeken","pl-PL":"Wyszukaj","pt-BR":"Pesquisar","ru-RU":"Поиск","sv-SE":"Sök","tr-TR":"Ara","zh-CN":"搜索","zh-TW":"搜尋"}},NebulaTableUtils_MenuItemLabel_SelectAll:{id:"NebulaTableUtils.MenuItemLabel.SelectAll",locale:{"de-DE":"Alle auswählen","en-US":"Select all","es-ES":"Seleccionar todo","fr-FR":"Sélectionner tout","it-IT":"Seleziona tutti","ja-JP":"すべて選択","ko-KR":"모두 선택","nl-NL":"Alles selecteren","pl-PL":"Wybierz wszystko","pt-BR":"Selecionar tudo","ru-RU":"Выбрать все","sv-SE":"Välj alla","tr-TR":"Tümünü seç","zh-CN":"全选","zh-TW":"全選"}},NebulaTableUtils_MenuItemLabel_SelectAlternative:{id:"NebulaTableUtils.MenuItemLabel.SelectAlternative",locale:{"de-DE":"Alternative Werte auswählen","en-US":"Select alternative","es-ES":"Seleccionar alternativos","fr-FR":"Sélectionner des valeurs alternatives","it-IT":"Seleziona alternativi","ja-JP":"代替項目を選択","ko-KR":"대체 가능 값 선택","nl-NL":"Alternatief selecteren","pl-PL":"Wybierz alternatywę","pt-BR":"Selecionar alternativa","ru-RU":"Выбрать альтернативные","sv-SE":"Välj alternativ","tr-TR":"Alternatifi seç","zh-CN":"选择替代项","zh-TW":"選取替代選項"}},NebulaTableUtils_MenuItemLabel_SelectExcluded:{id:"NebulaTableUtils.MenuItemLabel.SelectExcluded",locale:{"de-DE":"Ausgeschlossene Werte auswählen","en-US":"Select excluded","es-ES":"Seleccionar excluidos","fr-FR":"Sélectionner les valeurs exclues","it-IT":"Seleziona esclusi","ja-JP":"除外項目を選択","ko-KR":"제외 항목 선택","nl-NL":"Uitgesloten waarden selecteren","pl-PL":"Wybierz wykluczone","pt-BR":"Selecionar excluídos","ru-RU":"Выбрать исключенные","sv-SE":"Välj uteslutna","tr-TR":"Hariç tutulanı seç","zh-CN":"选择排除项","zh-TW":"選取排除值"}},NebulaTableUtils_MenuItemLabel_SelectPossible:{id:"NebulaTableUtils.MenuItemLabel.SelectPossible",locale:{"de-DE":"Wählbare Werte auswählen","en-US":"Select possible","es-ES":"Seleccionar posibles","fr-FR":"Sélectionner les valeurs possibles","it-IT":"Seleziona possibili","ja-JP":"絞込項目を選択","ko-KR":"사용 가능 항목 선택","nl-NL":"Mogelijke waarden selecteren","pl-PL":"Wybierz możliwe","pt-BR":"Selecionar possíveis","ru-RU":"Выбрать возможные","sv-SE":"Välj möjliga","tr-TR":"Olası olanı seç","zh-CN":"选择可能值","zh-TW":"選取可能值"}},NebulaTableUtils_MenuItemLabel_Selections:{id:"NebulaTableUtils.MenuItemLabel.Selections",locale:{"de-DE":"Auswahlen","en-US":"Selections","es-ES":"Selecciones","fr-FR":"Sélections","it-IT":"Selezioni","ja-JP":"選択","ko-KR":"선택 내용","nl-NL":"Selecties","pl-PL":"Wybory","pt-BR":"Seleções","ru-RU":"Выборки","sv-SE":"Urval","tr-TR":"Seçimler","zh-CN":"选择项","zh-TW":"選項"}},NebulaTableUtils_MenuItemLabel_SortAscending:{id:"NebulaTableUtils.MenuItemLabel.SortAscending",locale:{"de-DE":"In aufsteigender Reihenfolge sortieren","en-US":"Sort ascending","es-ES":"Orden ascendente","fr-FR":"Trier par ordre croissant","it-IT":"Ordinamento crescente","ja-JP":"昇順でソート","ko-KR":"오름차순으로 정렬","nl-NL":"Oplopend sorteren","pl-PL":"Sortuj rosnąco","pt-BR":"Classificar em ordem crescente","ru-RU":"Сортировка по возрастанию","sv-SE":"Sortera stigande","tr-TR":"Artan sıralama","zh-CN":"升序排序","zh-TW":"以遞增方式排序"}},NebulaTableUtils_MenuItemLabel_SortDescending:{id:"NebulaTableUtils.MenuItemLabel.SortDescending",locale:{"de-DE":"In absteigender Reihenfolge sortieren","en-US":"Sort descending","es-ES":"Orden descendente","fr-FR":"Trier par ordre décroissant","it-IT":"Ordinamento decrescente","ja-JP":"降順でソート","ko-KR":"내림차순으로 정렬","nl-NL":"Aflopend sorteren","pl-PL":"Sortuj malejąco","pt-BR":"Classificar em ordem decrescente","ru-RU":"Сортировка по убыванию","sv-SE":"Sortera fallande","tr-TR":"Azalan sıralama","zh-CN":"降序排序","zh-TW":"以遞減方式排序"}},NebulaTableUtils_Pagination_DisplayedRowsLabel:{id:"NebulaTableUtils.Pagination.DisplayedRowsLabel",locale:{"de-DE":"{0} von {1}","en-US":"{0} of {1}","es-ES":"{0} de {1}","fr-FR":"{0} sur {1}","it-IT":"{0} di {1}","ja-JP":"{0} / {1}","ko-KR":"{0}/{1}","nl-NL":"{0} van {1}","pl-PL":"{0} z {1}","pt-BR":"{0} de {1}","ru-RU":"{0} из {1}","sv-SE":"{0} av {1}","tr-TR":"{0} / {1}","zh-CN":"{0} / {1}","zh-TW":"{0} / {1}"}},NebulaTableUtils_Pagination_FirstPage:{id:"NebulaTableUtils.Pagination.FirstPage",locale:{"de-DE":"Zur ersten Seite","en-US":"Go to the first page","es-ES":"Ir a la primera página","fr-FR":"Accéder à la première page","it-IT":"Vai alla prima pagina","ja-JP":"最初のページに移動","ko-KR":"첫 페이지로 이동","nl-NL":"Ga naar de eerste pagina","pl-PL":"Przejdź do pierwszej strony","pt-BR":"Ir para a primeira página","ru-RU":"Перейти к первой странице","sv-SE":"Gå till första sidan","tr-TR":"İlk sayfaya git","zh-CN":"转到第一页","zh-TW":"移至第一頁"}},NebulaTableUtils_Pagination_LastPage:{id:"NebulaTableUtils.Pagination.LastPage",locale:{"de-DE":"Zur letzten Seite","en-US":"Go to the last page","es-ES":"Ir a la última página","fr-FR":"Accéder à la dernière page","it-IT":"Vai all'ultima pagina","ja-JP":"最後のページに移動","ko-KR":"마지막 페이지로 이동","nl-NL":"Ga naar de laatste pagina","pl-PL":"Przejdź do ostatniej strony","pt-BR":"Ir para a última página","ru-RU":"Перейти к последней странице","sv-SE":"Gå till sista sidan","tr-TR":"Son sayfaya git","zh-CN":"转到最后一页","zh-TW":"移至最後一頁"}},NebulaTableUtils_Pagination_NextPage:{id:"NebulaTableUtils.Pagination.NextPage",locale:{"de-DE":"Zur nächsten Seite","en-US":"Go to the next page","es-ES":"Ir a la página siguiente","fr-FR":"Accéder à la page suivante","it-IT":"Vai alla pagina successiva","ja-JP":"次のページに移動","ko-KR":"다음 페이지로 이동","nl-NL":"Ga naar de volgende pagina","pl-PL":"Przejdź do następnej strony","pt-BR":"Ir para a próxima página","ru-RU":"Перейти к следующей странице","sv-SE":"Gå till nästa sida","tr-TR":"Sonraki sayfaya git","zh-CN":"转到下一页","zh-TW":"移至下一頁"}},NebulaTableUtils_Pagination_PreviousPage:{id:"NebulaTableUtils.Pagination.PreviousPage",locale:{"de-DE":"Zur vorherigen Seite","en-US":"Go to the previous page","es-ES":"Ir a la página anterior","fr-FR":"Accéder à la page précédente","it-IT":"Vai alla pagina precedente","ja-JP":"前のページに移動","ko-KR":"이전 페이지로 이동","nl-NL":"Ga naar de vorige pagina","pl-PL":"Przejdź do poprzedniej strony","pt-BR":"Ir para a página anterior","ru-RU":"Перейти к предыдущей странице","sv-SE":"Gå till föregående sida","tr-TR":"Önceki sayfaya git","zh-CN":"转到前一页","zh-TW":"移至上一頁"}},NebulaTableUtils_Pagination_RowsPerPage:{id:"NebulaTableUtils.Pagination.RowsPerPage",locale:{"de-DE":"Zeilen pro Seite","en-US":"Rows per page","es-ES":"Filas por página","fr-FR":"Lignes par page","it-IT":"Righe per pagina","ja-JP":"ページあたりの行数","ko-KR":"페이지별 행 수","nl-NL":"Rijen per pagina","pl-PL":"Wierszy na stronę","pt-BR":"Linhas por página","ru-RU":"Строк на странице","sv-SE":"Rader per sida","tr-TR":"Sayfa başına satır sayısı","zh-CN":"每页行数","zh-TW":"每頁列數"}},NebulaTableUtils_Pagination_SelectPage:{id:"NebulaTableUtils.Pagination.SelectPage",locale:{"de-DE":"Seite auswählen","en-US":"Select page","es-ES":"Seleccionar página","fr-FR":"Sélectionner une page","it-IT":"Seleziona pagina","ja-JP":"ページを選択","ko-KR":"페이지 선택","nl-NL":"Pagina selecteren","pl-PL":"Wybierz stronę","pt-BR":"Selecionar página","ru-RU":"Выберите страницу","sv-SE":"Välj sida","tr-TR":"Sayfa seç","zh-CN":"选择页面","zh-TW":"選取頁面"}}};const G$=({translator:e})=>(f((()=>{!function(e){if(e&&e.get&&e.add){const t="NebulaTableUtils.MenuGroupLabel.Sorting";if(e.get(t)!==t)return;Object.keys(V$).forEach((t=>{e.add(V$[t])}))}}(e)}),[e]),e),U$={width:"100%",height:"100%",color:"transparent",background:"transparent",borderColor:"transparent"},Y$={border:0,boxShadow:"none",borderRadius:0,outline:0,width:0,height:0,background:"transparent",cursor:"pointer",visibility:"hidden"},K$=Qs("input",{shouldForwardProp:e=>"isLastColumn"!==e&&"hoverColor"!==e})((({isLastColumn:e,hoverColor:t,dir:n})=>({position:"absolute",display:"flex",height:"100%",top:0,marginLeft:"-4px",marginRight:"rtl"===n?"-4px":void 0,touchAction:"none",cursor:"col-resize",pointerEvents:"auto",width:(e?4:9)+"px",justifyContent:e?"flex-end":"center",outline:"none",appearance:"none",WebkitAppearance:"none",backgroundColor:"transparent","&::-webkit-slider-runnable-track":{...U$},"&::-moz-range-track":{...U$},"&::-ms-track":{...U$},"&::-webkit-slider-thumb":{appearance:"none",WebkitAppearance:"none",...Y$},"&::-moz-range-thumb":{...Y$},"&::-ms-thumb":{...Y$},"&:hover:not(:focus, :active)":{"&::after":{backgroundColor:t||"#D9D9D9","@media (hover: none)":{backgroundColor:"none"}}},"&:focus-visible, &:active":{"&::after":{backgroundColor:"#177fe6",borderLeft:"1px solid #fff",borderRight:e?void 0:"1px solid #fff"}},"&::after":{content:'""',height:"100%",width:"3px",position:"absolute"}}))),X$=({columnWidth:e,keyValue:t,isLastColumn:n,isPivot:r,hoverColor:o,updateWidthCallback:i,confirmWidthCallback:a,handleBlur:l,setIsAdjustingWidth:c,isLeftColumn:u,accessibilityRelatedArgs:d,direction:p="ltr"})=>{const h=G$({translator:d.translator}),f=s({initWidth:e,columnWidth:e,initX:0}),m=n?0:1,g=r&&!u,y=()=>g?f.current.columnWidth-m:"100%",_={left:"rtl"!==p?y():void 0,right:"rtl"===p?y():void 0},b=t=>{f.current={initWidth:e,columnWidth:e,initX:t??f.current.initX}};H$((()=>{g&&b()}),[e]);const x=e=>{const t=Math.max(e,mN.PixelsMin);f.current.columnWidth=t,i(t)},v=()=>{if(f.current.columnWidth!==f.current.initWidth){const e={type:gN.Pixels,pixels:f.current.columnWidth};a(e)}else c?.(!1)},w=e=>{const t="rtl"===p?f.current.initWidth+f.current.initX-e.clientX:f.current.initWidth+e.clientX-f.current.initX;x(t)},S=e=>{YB(e),document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",S),v()},C=e=>{const t="rtl"===p?f.current.initWidth+-f.current.initX-e.touches[0].clientX:f.current.initWidth+e.touches[0].clientX-f.current.initX;x(t)},E=e=>{YB(e),document.removeEventListener("touchmove",C),document.removeEventListener("touchend",E),v()},k=!r&&l?e=>{if(e.key===hN.Left||e.key===hN.Right){YB(e);const t=5,n=e.key===hN.Left?t:-t,r="rtl"===p?n:-n;x(f.current.columnWidth+r)}else e.key===hN.Space||e.key===hN.Enter?(YB(e),l(e),v()):e.key===hN.Esc&&(YB(e),l(e),x(f.current.initWidth))}:void 0,M=h.get("NebulaTableUtils.ColumnAdjuster.ColumnNameLabel",[String(d.columnLabel)]);return Uo.jsx(K$,{style:_,hoverColor:o,isLastColumn:n,className:fN,"data-testid":fN,onMouseDown:e=>{YB(e),document.addEventListener("mousemove",w),document.addEventListener("mouseup",S),c?.(!0),b(e.clientX)},onDoubleClick:()=>{a({type:gN.FitToContent})},onTouchStart:e=>{1===e.touches.length&&(YB(e),document.addEventListener("touchmove",C),document.addEventListener("touchend",E),c?.(!0),b(e.touches[0].clientX))},onKeyDown:k,onBlur:l,onFocus:()=>{b()},type:"range",tabIndex:-1,"aria-label":M,"aria-valuemin":mN.PixelsMin,"aria-valuemax":mN.PixelsMax,"aria-valuenow":Number(e.toFixed(1)),dir:p},t)},J$=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M15 4H1V2h14zm0 10H1v-2h14zm0-5H1V7h14z"})}))),Z$=Qs(Wc,{shouldForwardProp:e=>"rightAligned"!==e&&"shouldShowMenuIcon"!==e})((({rightAligned:e,shouldShowMenuIcon:t})=>({...e?{marginRight:"auto"}:{marginLeft:"auto"},height:24,display:t?"flex":"none",fontWeight:"bold",width:"100%",alignItems:"center",justifyContent:"center"}))),Q$=Qs(J$,{shouldForwardProp:e=>"isInteractionsActive"!==e})((({isInteractionsActive:e})=>({minWidth:"unset",position:"relative",cursor:e?"pointer":"default"}))),eH=Qs(Hd)((({theme:e})=>({".MuiList-root":{padding:e.spacing(.5,0)}}))),tH=Qs(Tu)((({theme:e})=>({"&.MuiDivider-root":{margin:e.spacing(.5)}}))),nH=Qs(Kd)((({theme:e})=>({fontSize:"12px",height:24,fontWeight:"bold",padding:`${e.spacing(.25,2)} !important`,marginBottom:e.spacing(.5)}))),rH=Qs(Kd,{shouldForwardProp:e=>"isSubMenu"!==e&&"isActive"!==e})((({theme:e,isSubMenu:t,isActive:n})=>({width:`calc(220px - ${e.spacing(1)} - ${t?10:0}px)`,maxHeight:32,borderRadius:`${e.spacing(.5)} !important`,margin:`${e.spacing(.25,.5)} !important`,padding:`${e.spacing(1,1.5)} !important`,display:"flex !important",justifyContent:"space-between !important","&&:focus":{boxShadow:"rgb(23, 127, 230) 0px 0px 0px 2px"},position:"relative !important",overflow:"hidden",boxSizing:"border-box !important",background:n?"rgba(0, 0, 0, 0.05)":"transparent"}))),oH=Qs("div",{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})((({theme:e,direction:t,isPagination:n})=>({position:"absolute",width:e.spacing(.5),height:16,left:0,right:n||"rtl"!==t?void 0:0,top:"50%",transform:"TranslateY(-50%)",borderRadius:"0 2px 2px 0",background:"#01873d"}))),iH=Qs("div")((()=>({display:"flex",justifyContent:"space-between",alignItems:"center",maxWidth:"100%"}))),aH=Qs(rc)((()=>({fontFamily:'"Source Sans Pro", HelveticaNeue, "Helvetica Neue", Helvetica, Arial, sans-serif',fontSize:"14px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}))),sH=Qs(yd,{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})((({theme:e,direction:t,isPagination:n})=>({width:16,minWidth:"unset !important",marginRight:n||"rtl"!==t?e.spacing(1.5):0,marginLeft:n||"rtl"!==t?void 0:e.spacing(1.5),lineHeight:0}))),lH=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M8.5 8 4 3.5 5.5 2l6 6-6 6L4 12.5z"})}))),cH=e=>{const t=e.nextElementSibling;return t?"HR"===t.tagName?cH(t):t:e.parentElement?.children?.[0]},uH=e=>{const t=e.previousElementSibling;if(!t){const t=e.parentElement?.children?.length;return e.parentElement?.children?.[t-1]}return"HR"===t.tagName?uH(t):t},dH=e=>{const{key:t,currentTarget:n}=e,r=document.activeElement??n;if(t===hN.Down||t===hN.Up){const n=e=>t===hN.Down?cH(e):uH(e);e.preventDefault(),e.stopPropagation();let o=n(r);for(;o;){if("true"!==o.ariaDisabled){o.focus();break}o=n(o)}}},pH=(e,t)=>e.map((e=>e.map((e=>({...e.groupHeading?{groupHeading:e.groupHeading}:{},items:e.items.map((({onClick:e,...n})=>({...n,...e?{onClick:async n=>{Object.entries(t).forEach((([,e])=>{e(!1)})),await e(n)}}:{}})))})))));let hH={};const fH=({autoFocus:e,id:t,onClick:n,itemTitle:r,icon:o,enabled:i,subMenus:a,isSubMenu:l,isActive:c,direction:u,isPagination:d})=>{const[h,f]=m(!1),g=s(null),y=p((e=>{e.stopPropagation(),f(!1)}),[f]);return Uo.jsxs(Uo.Fragment,{children:[Uo.jsxs(rH,{ref:a?g:null,"data-testid":`menu-item-${t}`,className:"nebula-table-utils-head-menu-item",onClick:async e=>{"keyup"!==e.type&&(n&&(await n(e),hH={}),a?.length&&(f(!0),hH[r]=f))},disabled:!i,autoFocus:e,isSubMenu:!!l,isActive:!!c,onKeyDown:dH,children:[c?Uo.jsx(oH,{direction:u,isPagination:d}):null,Uo.jsxs(iH,{children:[Uo.jsx(sH,{direction:u,isPagination:d,children:Uo.jsx(o,{})}),Uo.jsx(aH,{variant:"body2",children:r})]}),a?.length?Uo.jsx(lH,{}):null]},t),a?.length?Uo.jsx(_H,{isSubMenu:!0,open:h,anchorEl:g.current,onClose:y,menuGroups:pH(a,hH),transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},direction:u,isPagination:d}):null]})},mH=({menuGroup:e,isSubMenu:t,direction:n,isPagination:r})=>e.map((e=>[[e.groupHeading&&Uo.jsx(nH,{disabled:!0,style:{opacity:1},children:e.groupHeading},e.groupHeading),e.items.map((e=>Uo.jsx(fH,{...e,isSubMenu:t,direction:n,isPagination:r},e.id)))].filter(Boolean)])),gH=({itemGroups:e,isSubMenu:t,direction:n,isPagination:r})=>e.map(((o,i)=>[mH({menuGroup:o,isSubMenu:t,direction:n,isPagination:r}),i<e.length-1?Uo.jsx(tH,{"data-testid":"group-divider",variant:"middle"}):void 0])),yH={appear:0,enter:0,exit:0},_H=({anchorEl:e,open:t,onClose:n,menuGroups:r,transformOrigin:o,anchorOrigin:i,isSubMenu:a,direction:s,isPagination:l})=>r.length?Uo.jsx(eH,{className:"nebula-table-utils-head-menu",open:t,anchorEl:e,onClose:n,transitionDuration:yH,MenuListProps:{id:"nebula-table-utils-head-menu-list-id"},...i?{anchorOrigin:i}:{},...o?{transformOrigin:o}:{},dir:s,children:gH({itemGroups:r,isSubMenu:a,direction:s,isPagination:l})}):null,bH=(e,t)=>e.some((e=>t[e]>0)),xH={canSelectAll:!1,canClearSelections:!1,canSelectPossible:!1,canSelectAlternative:!1,canSelectExcluded:!1},vH=({open:e,qStateName:t="$",headerData:n,app:r})=>{const[o,i]=m(null),[a,s]=m(xH);return H$((()=>{e||(s(xH),i(null))}),[e]),u((()=>{if(!r?.createSessionObject||!n.isDim||!e)return()=>{};let o,a=!1;const l=()=>{o&&r.destroySessionObject(o)};return(async()=>{try{const e=((e,t)=>({qInfo:{qType:"tableListbox"},qListObjectDef:Boolean(t.qLibraryId)?{qLibraryId:t.qLibraryId,qStateName:e}:{qDef:{qFieldDefs:[t.fieldId]},qStateName:e}}))(t,n),c=await r.createSessionObject(e),u=await c.getLayout(),{qStateCounts:d}=u.qListObject?.qDimensionInfo??{};o=u.qInfo?.qId,a?l():(i(c),d&&s((e=>({canSelectAll:bH(["qOption","qAlternative","qExcluded","qDeselected"],e),canClearSelections:bH(["qSelected"],e),canSelectPossible:bH(["qOption"],e),canSelectAlternative:bH(["qAlternative"],e),canSelectExcluded:bH(["qAlternative","qExcluded"],e)}))(d)))}catch(e){console.error(e)}})(),()=>{a=!0,l()}}),[e,r,n,t]),{fieldInstance:o,selectionActionsEnabledStatus:a}},wH=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M3.5 1.793 6.207 4.5l-.707.707-1.5-1.5V14H3V3.707l-1.5 1.5L.793 4.5zM8 4h5v1H8zm0 3h6v1H8zm0 3h7v1H8z"})}))),SH=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m0-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m-1-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M9.166 6.166c1.555-1.555 4.113-1.555 5.668 0s1.555 4.113 0 5.668-4.113 1.555-5.668 0-1.555-4.063 0-5.668m4.966 1.555a.56.56 0 0 0 0-.803.56.56 0 0 0-.803 0l-1.304 1.305-1.304-1.305a.522.522 0 0 0-.803 0 .524.524 0 0 0 0 .803l1.305 1.304-1.305 1.304c-.25.2-.25.552 0 .803.251.25.602.25.803 0l1.304-1.304 1.304 1.304c.2.25.552.25.803 0 .2-.201.25-.602 0-.803l-1.304-1.304z"})}))),CH=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M3.914 8h8.207L10.5 6.379l.707-.708L14.036 8.5l-2.829 2.828-.707-.707L12.12 9H3.914l1.621 1.621-.707.707L2 8.5l2.828-2.828.707.707zM15 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zm0 13V2h-2v3h-1V2H4v3H3V2H1v12h2v-2h1v2h8v-2h1v2z"})}))),EH=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M3 2h1v10.293l1.5-1.5.707.707L3.5 14.207.793 11.5l.707-.707 1.5 1.5zm12 2H8v1h7zM8 7h6v1H8zm5 3H8v1h5z"})}))),kH=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M8 15c-3.848 0-7-3.152-7-7s3.152-7 7-7 7 3.152 7 7-3.152 7-7 7m0 1c4.4 0 8-3.6 8-8s-3.6-8-8-8-8 3.6-8 8 3.6 8 8 8m4-7.5H4v-1h8z"})}))),MH=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M8 15c-3.848 0-7-3.152-7-7s3.152-7 7-7 7 3.152 7 7-3.152 7-7 7m0 1c4.4 0 8-3.6 8-8s-3.6-8-8-8-8 3.6-8 8 3.6 8 8 8m4-7.5H4v-1h8zM8.5 4v8h-1V4z"})}))),RH=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M1 8a7 7 0 1 1 10 6.326V11h-1v5h5v-1h-3.124A8 8 0 1 0 8 16v-1a7 7 0 0 1-7-7"})}))),AH=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M9.057 11.164a6 6 0 1 1 2.112-2.116 1 1 0 0 1 .052.044l4.176 4.08a1 1 0 0 1 .009 1.422l-.707.707a1 1 0 0 1-1.406.008l-4.185-4.087a1 1 0 0 1-.05-.058ZM10.5 6a4.5 4.5 0 1 0-9 0 4.5 4.5 0 0 0 9 0"})}))),IH=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M3 4v1H1v10h10v-2h1v2a1 1 0 0 1-.883.993L11 16H1a1 1 0 0 1-.993-.883L0 15V5a1 1 0 0 1 .883-.993L1 4zm12-4a1 1 0 0 1 .993.883L16 1v10a1 1 0 0 1-.883.993L15 12H5a1 1 0 0 1-.993-.883L4 11V1a1 1 0 0 1 .883-.993L5 0zm0 1H5v10h10zm-2.36 2.653.72.694L9.143 8.72 6.64 6.125l.72-.694L9.143 7.28z"})}))),PH=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M4 4v8l8-8zm0-1h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})}))),OH=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M4 3h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})}))),LH=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M4 4v8h8V4zm0-1h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})}))),DH=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M1 1.5a.5.5 0 0 1 .5-.5H3V0H1.5A1.5 1.5 0 0 0 0 1.5V3h1zM14.5 1a.5.5 0 0 1 .5.5V3h1V1.5A1.5 1.5 0 0 0 14.5 0H13v1zM1 14.5a.5.5 0 0 0 .5.5H3v1H1.5A1.5 1.5 0 0 1 0 14.5V13h1zm14 0a.5.5 0 0 1-.5.5H13v1h1.5a1.5 1.5 0 0 0 1.5-1.5V13h-1zM6 0h4v1H6zM0 6h1v4H0zm15 0h1v4h-1zm-9 9h4v1H6z"})})));let TH=function(e){return e.Sorting="sorting",e.Searching="searching",e.Selections="selections",e.AdjusterHeaderSize="adjustHeaderSize",e}({});const zH="/qListObjectDef",jH=({headerData:e,translator:t,menuAvailabilityFlags:n,setOpen:r,sortFromMenu:o,interactions:i,embedListbox:a,fieldInstance:s,selectionActionsEnabledStatus:l,anchorRef:c,focusColumnAdjuster:u,setActiveFieldCallback:d,expandOrCollapseArgs:p})=>{const h=[];if(n[TH.Sorting]){const{isActivelySorted:n,sortDirection:i}=e,{ascendingEnabled:a,descendingEnabled:s}=(({isActivelySorted:e,sortDirection:t,isPivot:n,isSortedByFirstMeasure:r})=>{let o=!n&&!e||"D"===t,i=!n&&!e||"A"===t;return r&&(o=!1,i=!1),{ascendingEnabled:o,descendingEnabled:i}})(e);h.push([{groupHeading:t.get("NebulaTableUtils.MenuGroupLabel.Sorting"),items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortAscending"),onClick:async e=>{e.stopPropagation(),await(o?.(e,"A")),r(!1)},icon:wH,enabled:a,isActive:!!n&&"A"===i,autoFocus:a},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortDescending"),onClick:async e=>{e.stopPropagation(),await(o?.(e,"D")),r(!1)},icon:EH,enabled:s,isActive:!!n&&"D"===i,autoFocus:!a&&s}]}])}if(e.isCyclic&&d){const t=[];t.push([{items:[{id:1,itemTitle:e.groupDimensionLabels[e.groupDimensionPos],enabled:!0,icon:RH,subMenus:[[{items:e.groupDimensionLabels.map(((t,n)=>({id:n+1,itemTitle:t,onClick:async e=>{e.stopPropagation(),r(!1),d(n)},enabled:!0,icon:ON,isActive:e.groupDimensionPos===n})))}]]}]}]),t.length>0&&h.push(...t)}if(e.isDim&&i?.select){const e=[];n[TH.Searching]&&e.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Search"),onClick:e=>{e.stopPropagation(),r(!1),a()},icon:AH,enabled:!0}]}]),n[TH.Selections]&&e.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Selections"),icon:DH,enabled:!!s,subMenus:[[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAll"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectAll(zH))},icon:IH,enabled:l.canSelectAll},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectPossible"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectPossible(zH))},icon:LH,enabled:l.canSelectPossible},{id:3,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAlternative"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectAlternative(zH))},icon:PH,enabled:l.canSelectAlternative},{id:4,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectExcluded"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectExcluded(zH))},icon:OH,enabled:l.canSelectExcluded}]}],[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.ClearSelections"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.clearSelections(zH))},icon:SH,enabled:l.canClearSelections}]}]]}]}]),p&&!p.alwaysFullyExpanded&&h.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Expand"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),r(!1),await p.expandCallback()},icon:MH,enabled:!0},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Collapse"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),r(!1),await p.collapseCallback()},icon:kH,enabled:!0}]}]),e.length>0&&h.push(...e)}return n[TH.AdjusterHeaderSize]&&h.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.AdjustColumnSize"),onClick:e=>{e.stopPropagation(),e.preventDefault(),r(!1),u?.(c)},icon:CH,enabled:!0}]}]),h},NH=({open:e,setOpen:t,anchorRef:n,headerData:r,translator:o,interactions:i,menuAvailabilityFlags:a,shouldShowMenuIcon:l=!0,sortRelatedArgs:c,searchRelatedArgs:u,selectionRelatedArgs:d,adjustHeaderSizeRelatedArgs:h,expandOrCollapseArgs:f,model:m,direction:g="ltr",isPagination:y,isAccessibleHeader:_})=>{const b=s(null),x=G$({translator:o}),{qLibraryId:v,fieldId:w,headTextAlign:S}=r,C=d?.app,{fieldInstance:E,selectionActionsEnabledStatus:k}=vH({open:e,headerData:r,app:C,qStateName:d?.qStateName});let M=null;if(m&&"setActiveField"in m&&void 0!==r.dimensionInfoIndex){const e=r.dimensionInfoIndex;M=async t=>{try{await m.setActiveField("/qHyperCubeDef",e,t)}catch(e){console.error(e)}}}const R=p((()=>{const e=v?{qLibraryId:v,type:"dimension"}:w;if(u?.embed){const{embed:t,listboxRef:n}=u;t.__DO_NOT_USE__.popover(n.current,e,{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"rtl"===g?"right":"left"},sortCriteria:u.sortCriteria,stateName:d?.qStateName,direction:g})}}),[v,w,u,d?.qStateName,g]),A=p((e=>{e.stopPropagation(),t(!1)}),[t]),I=p((e=>{e.stopPropagation(),t((e=>!e))}),[t]);return i.active?Uo.jsxs(Z$,{rightAligned:"right"===S,shouldShowMenuIcon:l,className:"nebula-table-utils-head-menu-wrapper",onClick:!1===_?I:void 0,ref:b,children:[l?Uo.jsx(Q$,{height:cN,className:uN,"data-testid":uN,isInteractionsActive:i.active??!1,children:Uo.jsx(J$,{})}):null,Uo.jsx(_H,{open:e,anchorEl:!1===_?b.current:n.current,onClose:A,menuGroups:jH({headerData:r,translator:x,menuAvailabilityFlags:a,setOpen:t,...c,embedListbox:R,interactions:i,fieldInstance:E,selectionActionsEnabledStatus:k,anchorRef:n,focusColumnAdjuster:h?.focusColumnAdjuster,setActiveFieldCallback:M,expandOrCollapseArgs:f}),direction:g,isPagination:y})]}):null},qH=e=>e.isDark?{background:e.color,borderColor:yW.DARK_MODE_BORDER,color:yW.DARK_MODE_TEXT,disabledColor:yW.DARK_MODE_DISABLED,iconColor:yW.DARK_MODE_TEXT}:{background:e.color,borderColor:yW.BORDER_MEDIUM,color:yW.TEXT,disabledColor:yW.DISABLED},FH=Qs(Wc,{shouldForwardProp:e=>"footerStyle"!==e})((({footerStyle:e,theme:t})=>({height:40,display:"flex",justifyContent:"flex-end",alignItems:"center",padding:t.spacing(0,1,0,1),color:e.color,background:e.background,borderTop:`1px solid ${e.borderColor}`}))),WH=Qs(Ap,{shouldForwardProp:e=>"footerStyle"!==e})((({footerStyle:e,theme:t})=>({background:"inherit",marginRight:t.spacing(1),color:e.color,"& .MuiNativeSelect-icon, .MuiNativeSelect-select":{color:e.iconColor}}))),BH=Qs(Jc,{shouldForwardProp:e=>"disabledCondition"!==e&&"footerStyle"!==e})((({disabledCondition:e,footerStyle:t,theme:n})=>({color:e?t.disabledColor:t.color,cursor:e?"default":"pointer",marginLeft:n.spacing(1)}))),$H=Qs(rc)((({theme:e})=>({color:"inherit",margin:e.spacing(0,1,0,1)}))),HH=({children:e,footerContainer:t,interactions:n,theme:r,paginationNeeded:o=!0})=>{const i=f((()=>qH(r.background)),[r]);if(!n.active)return null;const a=o?Uo.jsx(FH,{footerStyle:i,children:e}):null;return t?w.createPortal(e,t):a},VH=l({}),GH=()=>n(VH),UH=({children:e,direction:t,pageInfo:n,handleChangeRowsPerPage:r,footerContainer:o,isSelectionMode:i,handleChangePage:a,totalRowCount:s,totalColumnCount:l,totalPages:c,keyboard:u,translator:d,theme:p,interactions:h,rect:m,layout:g})=>{const y=(e=>!e.enabled||e.active)(u)?0:-1,_=f((()=>qH(p.background)),[p]),b=o?o.getBoundingClientRect().width:m.width,x=G$({translator:d}),v=f((()=>({direction:t,pageInfo:n,handleChangeRowsPerPage:r,footerContainer:o,isSelectionMode:i,handleChangePage:a,totalRowCount:s,totalColumnCount:l,totalPages:c,keyboard:u,translator:x,theme:p,interactions:h,rect:m,layout:g,footerStyle:_,tabIndex:y,width:b})),[t,n,r,o,i,a,s,l,c,u,x,p,h,m,g,_,y,b]);return Uo.jsx(VH.Provider,{value:v,children:e})};let YH=function(e){return e.FirstPage="FirstPage",e.LastPage="LastPage",e.NextPage="NextPage",e.PreviousPage="PreviousPage",e}({}),KH=function(e){return e[e.DisplayedRowsLabel=250]="DisplayedRowsLabel",e[e.FirstPage=350]="FirstPage",e[e.LastPage=350]="LastPage",e[e.RowsPerPage=550]="RowsPerPage",e[e.SelectPage=700]="SelectPage",e}({});const XH=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"m7 8 4.5 4.5L10 14 4 8l6-6 1.5 1.5z"})}))),JH=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"m12 2 1.5 1.5L9 8l4.5 4.5L12 14 6 8zM4 2v12H2V2z"})}))),ZH=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"m3.5 2 6 6-6 6L2 12.5 6.5 8 2 3.5zM14 2v12h-2V2z"})}))),QH={FirstPage:JH,PreviousPage:XH,NextPage:lH,LastPage:ZH,FirstPageRTL:ZH,PreviousPageRTL:lH,NextPageRTL:XH,LastPageRTL:JH},eV=({disabledCondition:e,pageNumber:t,type:n})=>{const{direction:r,footerStyle:o,handleChangePage:i,translator:a,interactions:s,tabIndex:l}=GH(),c=n.concat("rtl"===r?"RTL":""),u=QH[c];return{styledProps:{footerStyle:o,disabledCondition:e,size:"small","data-testid":"pagination-action-icon-button","aria-disabled":e,"aria-label":a.get(`NebulaTableUtils.Pagination.${n}`),title:s.passive?a.get(`NebulaTableUtils.Pagination.${n}`):void 0,tabIndex:l,onClick:e?void 0:()=>{i(t)}},IconComponent:u}},tV=()=>{const{pageInfo:e,width:t,interactions:n}=GH(),r=0===e.page,{IconComponent:o,styledProps:i}=eV({type:YH.FirstPage,disabledCondition:r,pageNumber:0});return t<=KH.FirstPage?null:Uo.jsx(BH,{...i,disabled:!n.active,children:Uo.jsx(o,{height:cN})})},nV=(e,t,n=!1)=>{n&&e.key===hN.Tab&&!e.shiftKey&&(YB(e),((e,t,n)=>{const r=e.closest(".qv-object-wrapper")?.querySelector(".sel-toolbar-confirm")?.parentElement??document.querySelector("#qv-selection-toolbar-popover .sel-toolbar-confirm")?.parentElement;r?r.focus():t.focusSelection?.(n)})(e.target,t,!1))},rV=()=>{const{pageInfo:e,keyboard:t,totalPages:n,isSelectionMode:r,width:o,interactions:i}=GH(),a=e.page>=n-1,{IconComponent:s,styledProps:l}=eV({type:YH.LastPage,disabledCondition:a,pageNumber:n-1}),c=t.enabled?e=>{nV(e,t,r)}:void 0;return o<=KH.LastPage?null:Uo.jsx(BH,{...l,onKeyDown:c,disabled:!i.active,children:Uo.jsx(s,{height:cN})})},oV=()=>{const{pageInfo:e,keyboard:t,totalPages:n,isSelectionMode:r,width:o,interactions:i}=GH(),a=e.page>=n-1,{IconComponent:s,styledProps:l}=eV({type:YH.NextPage,disabledCondition:a,pageNumber:e.page+1}),c=!(o>KH.FirstPage&&o>KH.LastPage)&&t.enabled?e=>{nV(e,t,r)}:void 0;return Uo.jsx(BH,{...l,onKeyDown:c,disabled:!i.active,children:Uo.jsx(s,{height:cN})})},iV=()=>{const{pageInfo:e,interactions:t}=GH(),n=0===e.page,{IconComponent:r,styledProps:o}=eV({type:YH.PreviousPage,disabledCondition:n,pageNumber:e.page-1});return Uo.jsx(BH,{...o,disabled:!t.active,children:Uo.jsx(r,{height:cN})})},aV=()=>{const{translator:e,width:t,pageInfo:n,totalRowCount:r}=GH(),{page:o,rowsPerPage:i}=n;if(t<=KH.DisplayedRowsLabel)return null;const a=e.get("NebulaTableUtils.Pagination.DisplayedRowsLabel",[`${o*i+1} - ${Math.min((o+1)*i,r)}`,r.toString()]);return Uo.jsx($H,{variant:"caption",dir:"ltr",children:a})},sV=({name:e,value:t,options:n,handleChange:r})=>{const{layout:o,footerStyle:i,translator:a,tabIndex:s,interactions:l}=GH(),c=o.qInfo.qId,u=a.get(`NebulaTableUtils.Pagination.${e}`),d=`${e}-dropdown`,p=`${d}-label-${c}`,h={tabIndex:s,id:`${d}-${c}`,"data-testid":d,"aria-labelledby":p};return Uo.jsxs(Uo.Fragment,{children:[Uo.jsxs($H,{variant:"caption",id:p,children:[u,":"]}),Uo.jsx(WH,{footerStyle:i,size:"small",native:!0,value:t,onChange:r,inputProps:h,disabled:!l.active,children:n})]})},lV=()=>{const{pageInfo:e,isSelectionMode:t,totalColumnCount:n,width:r,handleChangeRowsPerPage:o}=GH();if(!(!!e.rowsPerPageOptions?.length&&!t&&r>KH.RowsPerPage&&n<=100)||void 0===e.rowsPerPageOptions)return null;const i=Uo.jsx(Uo.Fragment,{children:e.rowsPerPageOptions.map((e=>Uo.jsx("option",{value:e,children:e},e)))});return Uo.jsx(sV,{name:"RowsPerPage",value:e.rowsPerPage,options:i,handleChange:e=>{o?.(+e.target.value)}})},cV=1e3,uV="…",dV=({totalPages:e,page:t})=>{const n=Math.min(e,cV),r=n<e&&t>500,o=r?Math.min(500+t,e):n,i=r?Math.max(0,o-cV):0,a=Array.from(Array(n).keys()).map((e=>{const t=e+i;return Uo.jsx("option",{value:t,children:t+1},t)}));return i>0&&a.unshift(Uo.jsx("option",{value:uV,disabled:!0,children:uV},"startMoreOptions")),o<e-1&&a.push(Uo.jsx("option",{value:uV,disabled:!0,children:uV},"endMoreOptions")),Uo.jsx(Uo.Fragment,{children:a})},pV=()=>{const{pageInfo:e,width:t,totalPages:n,handleChangePage:r}=GH(),{page:o}=e;if(t<=KH.SelectPage)return null;const i=Uo.jsx(dV,{totalPages:n,page:o});return Uo.jsx(sV,{name:"SelectPage",value:o,options:i,handleChange:e=>{r(+e.target.value)}})};var hV=y((e=>Uo.jsxs(UH,{...e,children:[Uo.jsx(lV,{}),Uo.jsx(pV,{}),Uo.jsx(aV,{}),Uo.jsx(tV,{}),Uo.jsx(iV,{}),Uo.jsx(oV,{}),Uo.jsx(rV,{})]})));const fV=e=>Uo.jsx(HH,{...e,children:Uo.jsx(hV,{...e})}),mV=l({}),gV=()=>n(mV),yV=({rect:e,pageInfo:t,qPivotDataPages:n,updatePageInfo:r,direction:o,children:i})=>{const a=f((()=>({rect:e,pageInfo:t,qPivotDataPages:n,updatePageInfo:r,direction:o})),[e,t,n,r,o]);return Uo.jsx(mV.Provider,{value:a,children:i})},_V=l({}),bV=()=>n(_V),xV=({app:e,model:t,theme:n,embed:r,keyboard:o,translator:i,interactions:a,env:s,children:l})=>{const c=f((()=>({model:t,app:e,interactions:a,embed:r,theme:n,keyboard:o,env:s,translator:i})),[e,a,t,r,n,o,s,i]);return Uo.jsx(_V.Provider,{value:c,children:l})},vV=l({}),wV=()=>n(vV),SV=({children:e,...t})=>Uo.jsx(vV.Provider,{value:t,children:e}),CV=()=>{const{text:e,fontFamily:t,fontSize:n,justifyContent:r,alignItems:o,height:i}=(()=>{const{theme:e,translator:t}=bV(),{layoutService:n}=wV(),r=e.getStyle("","","fontFamily")??o$;return n.hasData?n.hasLimitedData?{text:t.get("SNPivotTable.LimitedData"),fontSize:"13px",fontFamily:r,alignItems:"center",height:"22px"}:{}:{text:t.get("SNPivotTable.NoData"),fontSize:"16px",fontFamily:r,justifyContent:"center",alignItems:"center",height:"100%"}})();return void 0===e?null:Uo.jsx("div",{style:{display:"flex",justifyContent:r,alignItems:o,width:"100%",height:i},children:Uo.jsx("span",{style:{...h$,fontFamily:t,fontSize:n,fontStyle:"italic",color:"#7b7a78"},children:e})})},EV="/qHyperCubeDef",kV=-1,MV="PSEUDO-DIM",RV=[];for(let e=0;e<256;++e)RV.push((e+256).toString(16).slice(1));let AV;const IV=new Uint8Array(16);var PV={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function OV(e,t,n){const r=(e=e||{}).random??e.rng?.()??function(){if(!AV){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");AV=crypto.getRandomValues.bind(crypto)}return AV(IV)}();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=15&r[6]|64,r[8]=63&r[8]|128,function(e,t=0){return(RV[e[t+0]]+RV[e[t+1]]+RV[e[t+2]]+RV[e[t+3]]+"-"+RV[e[t+4]]+RV[e[t+5]]+"-"+RV[e[t+6]]+RV[e[t+7]]+"-"+RV[e[t+8]]+RV[e[t+9]]+"-"+RV[e[t+10]]+RV[e[t+11]]+RV[e[t+12]]+RV[e[t+13]]+RV[e[t+14]]+RV[e[t+15]]).toLowerCase()}(r)}const LV=()=>crypto?.randomUUID?.()??function(e){return PV.randomUUID&&!e?PV.randomUUID():OV(e)}(),DV=e=>e===kV?MV:(({qLibraryId:e,cId:t})=>e??t??LV())(e),TV=({layoutService:e,visibleLeftDimensionInfos:t,cell:n,colIdx:r})=>{n&&(n.canBeResized=!0,n.colIdx=n.colIdx||r,n.dimensionInfoIndex===kV?n.columnWidthLocation=rW.Measures:n.isLeftDimension?n.columnWidthLocation=rW.Dimension:t.at(-1)===kV?n.columnWidthLocation=rW.Measures:e.hasPseudoDimOnLeft&&(n.columnWidthLocation=rW.Pivot))},zV=(e,t,n,r)=>{const o=DV(n),i=e.getDimensionInfoIndex(n),a=e.isLeftDimension(i);return n===kV?{id:o,colIdx:-1,label:"",sortDirection:"A",fieldId:"",isLocked:!1,isDim:!1,isCyclic:!1,groupDimensionPos:0,groupDimensionLabels:[],headTextAlign:"left",dimensionInfoIndex:i,canBeResized:!1,isLeftDimension:a,isLastDimension:r,columnWidthLocation:rW.Measures,isPivot:!0,qEffectiveDimensionName:void 0}:{id:o,colIdx:0,label:n.qFallbackTitle,qReverseSort:n.qReverseSort,sortDirection:n.qSortIndicator&&"N"!==n.qSortIndicator?n.qSortIndicator:"A",qLibraryId:n.qLibraryId,fieldId:n.qGroupFieldDefs[n.qGroupPos],isLocked:n.qLocked??!1,columnWidth:n.columnWidth,qApprMaxGlyphCount:n.qApprMaxGlyphCount,isDim:!0,isCyclic:n.qGrouping===bN.Cyclic,groupDimensionPos:n.qGroupPos,groupDimensionLabels:n.qGroupFallbackTitles,headTextAlign:"left",dimensionInfoIndex:i,canBeResized:!1,isLeftDimension:a,isLastDimension:r,columnWidthLocation:rW.Dimension,isPivot:!0,isSortedByFirstMeasure:t.isSortedByFirstMeasure,qEffectiveDimensionName:n.qEffectiveDimensionName}},jV=({layoutService:e,effectivePropertiesService:t,lastRow:n,lastCol:r})=>{let o=r;var i;n.length>0&&(o=(i=r).at(-1)===kV?i.slice(0,-1):i);const a=o.length+(n.length?1:0),s=Math.max(1,n.length),l=((e,t)=>Array(e).fill(null).map((()=>Array.from({length:t},(()=>null)))))(a,s);return n.forEach(((n,r,o)=>{const i=r===o.length-1;l[a-1][r]=zV(e,t,n,i)})),o.forEach(((n,r,o)=>{const i=r===o.length-1;l[r][s-1]=zV(e,t,n,i)})),l},NV=(e,t,n,r)=>{const o=((e,t,n,r)=>{let o;return o=0===n.length||n.includes(kV)?jV({layoutService:e,effectivePropertiesService:t,lastRow:r,lastCol:n}):(e=>e[0].map(((t,n)=>e.map((e=>e[n])))))(jV({layoutService:e,effectivePropertiesService:t,lastRow:n,lastCol:r})),e.isIndentModeEnabled&&o[o.length-1].length>1&&(o[o.length-1]=[o.at(-1),...new Array(o[0]?o[0].length-1:0).fill(null)]),o.length&&o.at(-1)?.forEach(((t,n)=>{Array.isArray(t)?t.forEach(((t,n)=>{TV({layoutService:e,visibleLeftDimensionInfos:r,cell:t,colIdx:n})})):TV({layoutService:e,visibleLeftDimensionInfos:r,cell:t,colIdx:n})})),o})(e,t,n,r);return{data:o,size:{x:o[0]?.length??0,y:o.length}}};function qV(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function FV(e,t,n){return t=HV(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,GV()?Reflect.construct(t,n||[],HV(e).constructor):t.apply(e,n))}function WV(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BV(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,KV(r.key),r)}}function $V(e,t,n){return t&&BV(e.prototype,t),n&&BV(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function HV(e){return HV=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},HV(e)}function VV(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&UV(e,t)}function GV(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(GV=function(){return!!e})()}function UV(e,t){return UV=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},UV(e,t)}function YV(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t);else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return qV(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qV(e,t):void 0}}(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 KV(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}function XV(e){return XV="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},XV(e)}var JV={fromSearchString:function(e){if(!e)return[];"?"===e[0]&&(e=e.substr(1));var t=[];return e.split("&").forEach((function(e){if(e){var n,r=e.indexOf("="),o="",i=!1;-1===r?n=e:(n=e.slice(0,r),o=e.slice(r+1),i=!0),t.push(function(e,t,n){return{key:ZV(e),value:ZV(t),useEqualSign:n}}(n,o,i))}})),t}};function ZV(e){try{return decodeURIComponent(e)}catch(t){return e}}function QV(e){if(!(this instanceof QV))throw new Error("Url needs to be called with the new keyword");if(!e)throw new Error("Url needs a string to operate on");var t=function(e){var t={authorityAndPath:"",search:"",hash:""},n=e.indexOf("#");-1!==n&&(t.hash=e.substr(n),e=e.substr(0,n));n=e.indexOf("?"),-1!==n&&(t.search=e.substr(n),e=e.substr(0,n));return t.authorityAndPath=e,t}(e);Object.defineProperties(this,{authorityAndPath:{value:t.authorityAndPath},search:{value:t.search},hash:{value:t.hash},searchParams:{get:function(){return JV.fromSearchString(t.search)}}})}function eG(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";")}QV.encodeAuthorityAndPath=function(e){return encodeURI(e).replace(/%5B/gi,"[").replace(/%5D/gi,"]").replace(/%25/gi,"%")},QV.encodeSearchParams=function(e){for(var t,n="",r=0;r<e.length;r++)n+=0===r?"?":"&",n+=eG((t=e[r]).key),t.value?n+="=".concat(eG(t.value)):n+=t.useEqualSign?"=":"";return n};var tG,nG=function(){return $V((function e(t){WV(this,e),this._input=t,this._pushback=null,this._temp=null,this._index=0,this._mark=0}),[{key:"_hasNext",value:function(){return null!=this._input&&(0!==this._input.length&&this._index<this._input.length)}},{key:"pushback",value:function(e){this._pushback=e}},{key:"index",value:function(){return this._index}},{key:"hasNext",value:function(){return null!=this._pushback||this._hasNext()}},{key:"next",value:function(){if(null!=this._pushback){var e=this._pushback;return this._pushback=null,e}return this._hasNext()?this._input.charAt(this._index++):null}},{key:"nextHex",value:function(){var e=this.next();return null==e?null:e.match(/[0-9A-Fa-f]/)?e:null}},{key:"peek",value:function(e){return e?!(!this._pushback||this._pushback!==e)||!!this._hasNext()&&this._input.charAt(this._index)===e:this._pushback?this._pushback:this._hasNext()?this._input.charAt(this._index):null}},{key:"mark",value:function(){this._temp=this._pushback,this._mark=this._index}},{key:"reset",value:function(){this._pushback=this._temp,this._index=this._mark}},{key:"remainder",value:function(){var e=this._input.substr(this._index);return null!=this._pushback&&(e=this._pushback+e),e}}])}(),rG=function(){return $V((function e(){WV(this,e)}),[{key:"decode",value:function(e){for(var t,n="",r=new nG(e);r.hasNext();)n+=null!=(t=this.decodeCharacter(r))?t:r.next();return n}},{key:"decodeCharacter",value:function(e){return e.next()}}])}(),oG=function(e){return e>=0&&e<=1114111},iG=function(e){return e.match(/[\s]/)},aG=function(){function e(){return WV(this,e),FV(this,e,arguments)}return VV(e,rG),$V(e,[{key:"decodeCharacter",value:function(e){e.mark();var t,n,r,o=e.next();if(null==o||"\\"!==o)return e.reset(),null;var i=e.next();if(null==i)return e.reset(),null;switch(i){case"\r":e.peek("\n")&&e.next();case"\n":case"\f":case"\0":return this.decodeCharacter(e)}if("NaN"===parseInt(i,16))return i;for(t=i,n=0;n<5&&(null!=(r=e.next())&&!iG(r));n++){if("NaN"===parseInt(r,16)){e.pushback(r);break}t+=r}var a=parseInt(t,16);return oG(a)?String.fromCharCode(a):"�"}}])}(),sG=function(){function e(t,n){WV(this,e),this._key=t,this._value=n}return $V(e,[{key:"getKey",value:function(){return this._key}},{key:"getValue",value:function(){return this._value}},{key:"equals",value:function(t){return t instanceof e&&(this._key===t._key&&this._value===t._value)}}],[{key:"newInstanceIfNeeded",value:function(){var t,n,r=arguments[0];return"string"==typeof arguments[1]?(t=arguments[1],n=r.length):(n=arguments[1],t=arguments[2]),t&&r?(r.length>n&&(r=r.substr(0,n)),new e(r,t)):null}}])}(),lG=function(){function e(){WV(this,e)}return $V(e,[{key:"setValue",value:function(e){this._nextMap=null,this._value=e}},{key:"getNextNode",value:function(e){return this._nextMap?this._nextMap[e]:null}},{key:"put",value:function(t,n,r){var o,i;if(t.length===n)return i=this._value,this.setValue(r),i;var a=t.charAt(n);return this._nextMap?(o=this._nextMap[a])||(o=new e,this._nextMap[a]=o):(this._nextMap={},o=new e,this._nextMap[a]=o),o.put(t,n+1,r)}},{key:"get",value:function(e,t){if(e.length<=t)return this._value;var n=this.getNextNode(e.charAt(t));return n?n.get(e,t+1):null}},{key:"getLongestMatch",value:function(e,t){if(e.length<=t)return sG.newInstanceIfNeeded(e,this._value);var n=this.getNextNode(e.charAt(t));if(!n)return sG.newInstanceIfNeeded(e,t,this._value);var r=n.getLongestMatch(e,t+1);return r||sG.newInstanceIfNeeded(e,t,this._value)}}])}(),cG=function(){return $V((function e(){WV(this,e),this.clear()}),[{key:"getLongestMatch",value:function(e){return this.root&&e?this.root.getLongestMatch(e,0):null}},{key:"getMaxKeyLength",value:function(){return this.maxKeyLen}},{key:"clear",value:function(){this.root=null,this.maxKeyLen=0,this.size=0}},{key:"put",value:function(e,t){this.root||(this.root=new lG);var n=this.root.put(e,0,t);return n||(e.length>this.maxKeyLen&&(this.maxKeyLen=e.length),this.size++,null)}}])}(),uG=function(){var e,t,n,r=[],o=[],i=new cG;for(e in r["""]="34",r["&"]="38",r["<"]="60",r[">"]="62",r[" "]="160",r["¡"]="161",r["¢"]="162",r["£"]="163",r["¤"]="164",r["¥"]="165",r["¦"]="166",r["§"]="167",r["¨"]="168",r["©"]="169",r["ª"]="170",r["«"]="171",r["¬"]="172",r["­"]="173",r["®"]="174",r["¯"]="175",r["°"]="176",r["±"]="177",r["²"]="178",r["³"]="179",r["´"]="180",r["µ"]="181",r["¶"]="182",r["·"]="183",r["¸"]="184",r["¹"]="185",r["º"]="186",r["»"]="187",r["¼"]="188",r["½"]="189",r["¾"]="190",r["¿"]="191",r["À"]="192",r["Á"]="193",r["Â"]="194",r["Ã"]="195",r["Ä"]="196",r["Å"]="197",r["Æ"]="198",r["Ç"]="199",r["È"]="200",r["É"]="201",r["Ê"]="202",r["Ë"]="203",r["Ì"]="204",r["Í"]="205",r["Î"]="206",r["Ï"]="207",r["Ð"]="208",r["Ñ"]="209",r["Ò"]="210",r["Ó"]="211",r["Ô"]="212",r["Õ"]="213",r["Ö"]="214",r["×"]="215",r["Ø"]="216",r["Ù"]="217",r["Ú"]="218",r["Û"]="219",r["Ü"]="220",r["Ý"]="221",r["Þ"]="222",r["ß"]="223",r["à"]="224",r["á"]="225",r["â"]="226",r["ã"]="227",r["ä"]="228",r["å"]="229",r["æ"]="230",r["ç"]="231",r["è"]="232",r["é"]="233",r["ê"]="234",r["ë"]="235",r["ì"]="236",r["í"]="237",r["î"]="238",r["ï"]="239",r["ð"]="240",r["ñ"]="241",r["ò"]="242",r["ó"]="243",r["ô"]="244",r["õ"]="245",r["ö"]="246",r["÷"]="247",r["ø"]="248",r["ù"]="249",r["ú"]="250",r["û"]="251",r["ü"]="252",r["ý"]="253",r["þ"]="254",r["ÿ"]="255",r["&OElig"]="338",r["&oelig"]="339",r["&Scaron"]="352",r["&scaron"]="353",r["&Yuml"]="376",r["&fnof"]="402",r["&circ"]="710",r["&tilde"]="732",r["&Alpha"]="913",r["&Beta"]="914",r["&Gamma"]="915",r["&Delta"]="916",r["&Epsilon"]="917",r["&Zeta"]="918",r["&Eta"]="919",r["&Theta"]="920",r["&Iota"]="921",r["&Kappa"]="922",r["&Lambda"]="923",r["&Mu"]="924",r["&Nu"]="925",r["&Xi"]="926",r["&Omicron"]="927",r["&Pi"]="928",r["&Rho"]="929",r["&Sigma"]="931",r["&Tau"]="932",r["&Upsilon"]="933",r["&Phi"]="934",r["&Chi"]="935",r["&Psi"]="936",r["&Omega"]="937",r["&alpha"]="945",r["&beta"]="946",r["&gamma"]="947",r["&delta"]="948",r["&epsilon"]="949",r["&zeta"]="950",r["&eta"]="951",r["&theta"]="952",r["&iota"]="953",r["&kappa"]="954",r["&lambda"]="955",r["&mu"]="956",r["&nu"]="957",r["&xi"]="958",r["&omicron"]="959",r["&pi"]="960",r["&rho"]="961",r["&sigmaf"]="962",r["&sigma"]="963",r["&tau"]="964",r["&upsilon"]="965",r["&phi"]="966",r["&chi"]="967",r["&psi"]="968",r["&omega"]="969",r["&thetasym"]="977",r["&upsih"]="978",r["&piv"]="982",r["&ensp"]="8194",r["&emsp"]="8195",r["&thinsp"]="8201",r["&zwnj"]="8204",r["&zwj"]="8205",r["&lrm"]="8206",r["&rlm"]="8207",r["&ndash"]="8211",r["&mdash"]="8212",r["&lsquo"]="8216",r["&rsquo"]="8217",r["&sbquo"]="8218",r["&ldquo"]="8220",r["&rdquo"]="8221",r["&bdquo"]="8222",r["&dagger"]="8224",r["&Dagger"]="8225",r["&bull"]="8226",r["&hellip"]="8230",r["&permil"]="8240",r["&prime"]="8242",r["&Prime"]="8243",r["&lsaquo"]="8249",r["&rsaquo"]="8250",r["&oline"]="8254",r["&frasl"]="8260",r["&euro"]="8364",r["&image"]="8365",r["&weierp"]="8472",r["&real"]="8476",r["&trade"]="8482",r["&alefsym"]="8501",r["&larr"]="8592",r["&uarr"]="8593",r["&rarr"]="8594",r["&darr"]="8595",r["&harr"]="8596",r["&crarr"]="8629",r["&lArr"]="8656",r["&uArr"]="8657",r["&rArr"]="8658",r["&dArr"]="8659",r["&hArr"]="8660",r["&forall"]="8704",r["&part"]="8706",r["&exist"]="8707",r["&empty"]="8709",r["&nabla"]="8711",r["&isin"]="8712",r["¬in"]="8713",r["&ni"]="8715",r["&prod"]="8719",r["&sum"]="8721",r["&minus"]="8722",r["&lowast"]="8727",r["&radic"]="8730",r["&prop"]="8733",r["&infin"]="8734",r["&ang"]="8736",r["&and"]="8743",r["&or"]="8744",r["&cap"]="8745",r["&cup"]="8746",r["&int"]="8747",r["&there4"]="8756",r["&sim"]="8764",r["&cong"]="8773",r["&asymp"]="8776",r["&ne"]="8800",r["&equiv"]="8801",r["&le"]="8804",r["&ge"]="8805",r["&sub"]="8834",r["&sup"]="8835",r["&nsub"]="8836",r["&sube"]="8838",r["&supe"]="8839",r["&oplus"]="8853",r["&otimes"]="8855",r["&perp"]="8869",r["&sdot"]="8901",r["&lceil"]="8968",r["&rceil"]="8969",r["&lfloor"]="8970",r["&rfloor"]="8971",r["&lang"]="9001",r["&rang"]="9002",r["&loz"]="9674",r["&spades"]="9824",r["&clubs"]="9827",r["&hearts"]="9829",r["&diams"]="9830",r)"function"!=typeof r[e]&&r.hasOwnProperty(e)&&(o[r[e]]=e);for(t in o)"function"!=typeof o[t]&&o.hasOwnProperty(t)&&(n=o[t].toLowerCase().substr(1),i.put(n,String.fromCharCode(t)));return i}(),dG=function(){function e(){return WV(this,e),FV(this,e,arguments)}return VV(e,rG),$V(e,[{key:"decodeCharacter",value:function(e){var t;e.mark();var n=e.next();if(null==n||"&"!==n)return e.reset(),null;var r=e.next();if(null==r)return e.reset(),null;if("#"===r){if(null!=(t=this._getNumericEntity(e)))return t}else if(r.match(/[A-Za-z]/)&&(e.pushback(r),null!=(t=this._getNamedEntity(e))))return t;return e.reset(),null}},{key:"_getNamedEntity",value:function(e){var t,n,r,o="";for(t=Math.min(e.remainder().length,uG.getMaxKeyLength()),r=0;r<t;r++)o+=e.next().toLowerCase();var i=uG.getLongestMatch(o);if(null==i)return null;for(e.reset(),e.next(),t=i.getKey().length,n=0;n<t;n++)e.next();return e.peek(";")&&e.next(),i.getValue()}},{key:"_getNumericEntity",value:function(e){var t=e.peek();return null==t?null:"x"===t||"X"===t?(e.next(),this._parseHex(e)):this._parseNumber(e)}},{key:"_parseHex",value:function(e){for(var t,n="";e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,16))){if(";"===t){e.next();break}break}n+=t,e.next()}var r=parseInt(n,16);return!Number.isNaN(+r)&&oG(r)?String.fromCharCode(r):null}},{key:"_parseNumber",value:function(e){for(var t,n="";e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,10))){if(";"===t){e.next();break}break}n+=t,e.next()}var r=parseInt(n,10);return!Number.isNaN(+r)&&oG(r)?String.fromCharCode(r):null}}])}(),pG=function(){function e(){return WV(this,e),FV(this,e,arguments)}return VV(e,rG),$V(e,[{key:"decodeCharacter",value:function(e){e.mark();var t,n,r,o,i=e.next();if(null==i)return e.reset(),null;if("%"!==i)return e.reset(),null;for(t="",n=0;n<2;n++)null!=(r=e.nextHex())&&(t+=r);return 2===t.length&&(o=parseInt(t,16),oG(o))?String.fromCharCode(o):(e.reset(),null)}}])}(),hG=/^data:(?<!\s)\s*(image\/[\w+-.]+)(?<!\s)\s*(;.*?){0,1}(?<!\s)\s*,(.*)/i;"undefined"!=typeof document&&(tG=document.createElement("div"));var fG=Array.prototype.indexOf,mG=[",",".","_"," "],gG=[",",".","-","_"," "],yG={width:["%"],height:["%"]},_G={default:["-"," ","%"],color:["#"," ","(",")"],image:["(",")",":","/","?","&","-",".",'"',"="," "]},bG={background:["(",")",":","%","/","?","&","-"," ",".",'"',"=","#"],"background-image":_G.image,"background-color":_G.color,"border-color":_G.color,"border-image":_G.image,color:_G.color,icon:_G.image,"list-style-image":_G.image,"outline-color":_G.color},xG={attr_name:["^on[a-z]{1,}","style","href","src"],attr_val:["javascript:","data:"],css_key:["behavior","-moz-behavior","-ms-behavior"],css_val:["expression"]};function vG(e,t,n){var r;if(t){if(fG)return fG.call(t,e,n);for(r=t.length,n=n?n<0?Math.max(0,r+n):n:0;n<r;n++)if(n in t&&t[n]===e)return n}return-1}function wG(e){if(null==e)return"";var t,n=document.createTextNode(e);return tG.appendChild(n),t=tG.innerHTML,tG.removeChild(n),t}function SG(e,t,n){var r,o,i,a,s,l,c,u,d;for(e=EG(e).toLowerCase(),t=EG(t),i=0;i<xG.attr_name.length;i++)if(e.match(xG.attr_name[i]))throw new Error("Unsafe attribute name used: ".concat(e));for(i=0;i<xG.attr_val.length;i++)if(t.toLowerCase().match(xG.attr_val[i]))throw new Error("Unsafe attribute value used: ".concat(t));if((r=yG[e])||(r=gG),o="",!n){for(a=0;a<e.length;a++){if(!(s=e.charAt(a)).match(/[a-zA-Z\-0-9]/))throw new Error("Invalid attribute name specified");o+=s}o+='="'}for(l=0;l<t.length;l++)c=t.charAt(l),u=t.charCodeAt(l),!c.match(/[a-zA-Z0-9]/)&&vG(c,r)<0?(d=u.toString(16),o+="&#x".concat(d,";")):o+=c;return n||(o+='"'),o}function CG(e,t,n){var r,o,i,a,s,l,c,u,d,p;if(e=EG(e).toLowerCase(),t=EG(t),vG(e,xG.css_key)>=0)throw new Error("Unsafe property name used: ".concat(e));for(r=0;r<xG.css_val.length;r++)if(t.toLowerCase().indexOf(xG.css_val[r])>=0)throw new Error("Unsafe property value used: ".concat(t));if((o=bG[e])||(o=_G.default),i="",!n){for(a=0;a<e.length;a++){if(!(s=e.charAt(a)).match(/[a-zA-Z-]/))throw new Error("Invalid Property Name specified");i+=s}i+=": "}for(l=0;l<t.length;l++)c=t.charAt(l),u=t.charCodeAt(l),!c.match(/[a-zA-Z0-9]/)&&vG(c,o)<0?(d=u.toString(16),p="000000".substr(d.length),i+="\\".concat(p).concat(d)):i+=c;return i}function EG(e,t){var n,r,o,i,a=!1;if(null===e)return null;n=e,r=e,o=0;for(var s=[new dG,new pG,new aG];!a;){r=n;for(var l=0;l<s.length;l++)(i=s[l].decode(n))!==n&&(o++,n=i);r!==n||(a=!0)}if(t&&o>1)throw new Error("Attack Detected - Multiple/Double Encodings used in input");return n}for(var kG=[],MG=0;MG<255;MG++)kG[MG]=MG>=48&&MG<=57||MG>=65&&MG<=90||MG>=97&&MG<=122?null:MG.toString(16);var RG=function(e){return wG(e.unsafe)},AG=function(e){var t,n=[],r=[],o={},i="";for(t in e.map?n=e.map:n[e.name]=e.unsafe,n)"function"!=typeof n[t]&&n.hasOwnProperty(t)&&(r[t]=CG(t,n[t],!0),i+=CG(t,n[t],!0),o[t]=r[t]);return e.map?o:i},IG=function(e){var t=[],n=[],r={},o="";for(var i in e.map?t=e.map:t[e.name]=e.unsafe,t)"function"!=typeof t[i]&&t.hasOwnProperty(i)&&(n[i]=SG(i,t[i],!0),o+=SG(i,t[i],!0),r[i]=n[i]);return e.map?r:o};function PG(e,t){throw new Error(t)}var OG={canonicalize:EG,encode:function(){var e={context:"html",unsafe:null,name:null,map:null,setter:null,strict:!0};return 1===arguments.length&&"object"===XV(arguments[0])?function(){for(var e,t,n,r=arguments[0]||{},o=1,i=arguments.length;o<i;o++)if(null!=(e=arguments[o]))for(t in e)if(e.hasOwnProperty(t)){if(r===(n=e[t]))continue;void 0!==n&&(r[t]=n)}}(e,arguments[0]):(e.context=arguments[0],2===arguments.length?"html"===e.context?e.unsafe=arguments[1]:"attr"!==e.context&&"css"!==e.context||(e.map=arguments[1]):(e.name=arguments[2],e.unsafe=arguments[1])),"html"===e.context?RG(e):"css"===e.context?(null!=e.map&&"object"!==XV(e.map)&&PG(this,"Invalid parameter type"),AG(e)):"attr"===e.context?(null!=e.map&&"object"!==XV(e.map)&&PG(this,"Invalid parameter type"),IG(e)):void PG(this,"Invalid parameter type")},encodeForAttr:SG,encodeForAttr2:function(e){return SG("nonsens",e,!0)},encodeForCSS:CG,encodeForHref:function(e){EG(e),0!==e.search("[a-zA-Z0-9]+:")&&(e="http://".concat(e));var t=new QV(e),n=QV.encodeAuthorityAndPath(decodeURI(t.authorityAndPath)),r=t.searchParams,o=(e=n+QV.encodeSearchParams(r)+t.hash).toLowerCase();if(-1!==o.indexOf("javascript:"))throw new Error("Attack Detected - Javascript in input");if(-1!==o.indexOf("data:"))throw new Error("Attack Detected - data in input");return e},encodeForJS:function(e,t){var n,r,o,i,a,s;for(t||(t=mG),s="",n=0;n<e.length;n++)o=e.charAt(n),i=e.charCodeAt(n),vG(o,t)>=0||null==kG[i]?s+=o:(r=i.toString(16),i<256?(a="00".substr(r.length),s+="\\x".concat(a).concat(r.toUpperCase())):(a="0000".substr(r.length),s+="\\u".concat(a).concat(r.toUpperCase())));return s},encodeForHTML:wG,encodeForURL:function(e,t){var n="";return t&&(t.match(/^[A-Za-z\-0-9]{1,}$/)?n+=EG(t).toLowerCase():PG(this,"Illegal Attribute Name Specified"),n+='="'),n+=encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A"),n+=t?'"':""},isSafeDataURL:function(e,t){var n=null!=t?t:{},r=n.maxByteSizeSvg,o=void 0===r?5e5:r,i=n.maxByteSizeImage,a=void 0===i?5e6:i,s=function(e){var t,n=YV(null!==(t=hG.exec(e.trim()))&&void 0!==t?t:[],4),r=n[1];return{encoding:n[2],data:n[3],mimeType:null==r?void 0:r.toLocaleLowerCase()}}(e),l=s.mimeType,c=s.encoding,u=s.data;if(!u)return!0;var d=function(e,t,n){var r={type:e};if(null!=t&&t.includes(";base64"))try{return new Blob([atob(n)],r).size}catch(e){return new Blob([n],r).size}return"image/svg+xml"===e?new Blob([n],r).size:0}(l,c,u);return"image/svg+xml"===l?d<=o:d<=a},validateURI:function(e){if(""===e||function(e){if("canParse"in URL)return URL.canParse(e);try{return new URL(e),!0}catch(e){return!1}}(e))return!1;var t=e.replace(/%2E/gi,".");if(t.match(/[#&=: ]/))return!1;var n=function(e){for(var t=e,n="";t.length>0;)if(t.startsWith("../")||t.startsWith("./"))t=t.replace(/^\.\.?\//,"");else if(t.startsWith("/./"))t=t.replace(/^\/\.\//,"/");else if("/."===t)t="/";else if(t.startsWith("/../")){t=t.replace(/^\/\.\.\//,"/");var r=n.lastIndexOf("/");-1!==r&&(n=n.slice(0,r))}else if("/.."===t){t="/";var o=n.lastIndexOf("/");-1!==o&&(n=n.slice(0,o))}else if("."===t||".."===t)t="";else{var i=t.match(/^\/?[^/]*/),a=i?i[0]:"";t=t.slice(a.length),n+=a}return n}(t);return""!==n&&"/"!==n&&n}};const LG=(e,t)=>t.qAttrExps?.qValues?.[e],DG=(e,t)=>{switch(e){case"topLeft":default:return{horizontal:"rtl"===t?"flex-end":"flex-start",vertical:"flex-start"};case"centerLeft":return{horizontal:"center",vertical:"flex-start"};case"bottomLeft":return{horizontal:"rtl"===t?"flex-start":"flex-end",vertical:"flex-start"};case"topCenter":return{horizontal:"rtl"===t?"flex-end":"flex-start",vertical:"center"};case"centerCenter":return{horizontal:"center",vertical:"center"};case"bottomCenter":return{horizontal:"rtl"===t?"flex-start":"flex-end",vertical:"center"};case"topRight":return{horizontal:"rtl"===t?"flex-end":"flex-start",vertical:"flex-end"};case"centerRight":return{horizontal:"center",vertical:"flex-end"};case"bottomRight":return{horizontal:"rtl"===t?"flex-start":"flex-end",vertical:"flex-end"}}},TG=({text:e,url:t,imageSize:n,imagePosition:r,labelStructure:o,imageBox:i,direction:a})=>r&&t&&!t.toLowerCase().includes("javascript:")&&OG.isSafeDataURL(t)?{type:XF.Image,url:t,text:e,imageSize:n,resolvedImagePosition:DG(r,a),labelStructure:o,imageBox:i}:{type:XF.Text,url:void 0,text:e,labelStructure:o},zG=(e,t,n,r)=>{if(!e.qMiniChart||!t?.miniChart||!n)return{type:XF.Text,text:r};const{minY:o,maxY:i}=((e,t,n)=>{const r="global"===t.yAxis?.scale,o="zeroCenter"===t.yAxis?.position,i=r?n.qYMin:e.qMiniChart.qMin,a=r?n.qYMax:e.qMiniChart.qMax;if(o){const e=Math.max(Math.abs(i),Math.abs(a));return{minY:-e,maxY:e}}return(e=>"zeroBaseline"===e.yAxis?.position||"bars"===e.type&&"auto"===e.yAxis?.position)(t)?{minY:Math.min(0,i),maxY:Math.max(0,a)}:{minY:i,maxY:a}})(e,t.miniChart,n),a={type:t.miniChart.type,qMatrix:e.qMiniChart.qMatrix,minY:o,maxY:i,showDots:!!t.miniChart.showDots,colors:t.miniChart.colors,colorMin:e.qMiniChart.qMin,colorMax:e.qMiniChart.qMax};return{type:XF.MiniChart,text:r,miniChart:a}},jG=(e,t,n)=>{const r=Array.isArray(t.qAttrExps)?t.qAttrExps[0]:t.qAttrExps,o=r?.qValues?.[e];if(o){const e=Number.isNaN(+o.qNum)?void 0:`${o.qNum}`;return o.qText||e}return n?.urlPosition===JF.Attribute?void 0:n?.urlLabel},NG=({labelStructure:e,text:t,url:n})=>{try{if(!n)throw Error("Invalid url");return{type:XF.Link,url:OG.encodeForHref(n),text:t,labelStructure:e}}catch{return{type:XF.Text,url:void 0,text:t,labelStructure:e}}},qG=({cell:e,representationProperties:t,attrExprInfoIndex:n,env:r,conditionalColoring:o,miniChartOnMeasure:i,labelStructure:a,getText:s=e=>e.qText,direction:l,enabledFeatures:c})=>{const u=ZF(t),d=s(e);return u===XF.Image&&c[XF.Image]&&!r.anything.sense?.isUnsupportedFeature?.("tableImages")?((e,t,n,r,o,i)=>{const{imageSize:a,imagePosition:s,imageSetting:l,imageLabel:c,imageBox:u}=t??{};if("url"===l){const t=LG(n.imageUrl??-1,e)?.qText;return i&&(i.maskedValue=t??""),TG({text:r,url:t,imageSize:a,imagePosition:s,labelStructure:i,imageBox:u,direction:o})}if("label"===l){const t=i?i.originalValue:r;if(-1===n.imageLabel)return TG({text:c||t||"",url:t,imageSize:a,imagePosition:s,labelStructure:i,imageBox:u,direction:o});const l=LG(n.imageLabel??-1,e)?.qText??r;return TG({text:l,url:t,imageSize:a,imagePosition:s,labelStructure:i,imageBox:u,direction:o})}return{type:XF.Text,url:void 0,labelStructure:i,text:r}})(e,t,n,d,l,a):u===XF.Link?((e,t,n,r,o)=>{const{urlPosition:i}=t??{};if(i===JF.Attribute){const i=jG(n.url??-1,e,t);return NG({labelStructure:r,text:o||i||"",url:i})}if(i===JF.Dimension){const i=jG(n.urlLabel??-1,e,t)||o;return r&&(r.maskedValue=i),NG({text:i,labelStructure:r,url:r?.originalValue??o})}return{type:XF.Text,url:void 0,text:o,labelStructure:r}})(e,t,n,a,d):u===XF.Indicator&&c[XF.Indicator]&&!r.anything.sense?.isUnsupportedFeature?.("tableIndicators")?((e,t,n)=>{const{indicator:r}=e??{};return{type:XF.Indicator,url:void 0,text:n,indicator:{applySegmentColors:r?.applySegmentColors,position:r?.position,showTextValues:r?.showTextValues},indicatorConditionalColoring:t}})(t,o,d):u===XF.MiniChart&&c[XF.MiniChart]&&!r.anything.sense?.isUnsupportedFeature?.("qMiniChartDef")?zG(e,t,i,d):{type:XF.Text,url:void 0,text:d,labelStructure:a}},FG=(e,t)=>{const n=t.qAttrExps,r=n?.qValues?.[e?.cellForegroundColor??-1]?.qText,o=n?.qValues?.[e?.cellBackgroundColor??-1]?.qText,i=o?UB(o):null,a=r?UB(r):null,s=((e,t)=>e||!t?null:HB(t))(a,i);return{color:s??a,background:i}},WG=(e,t)=>t.qSubNodes.reduce(((e,t)=>0===t.qSubNodes.length?e+1:WG(e,t)),e),BG=(e,t,n,r,o,i)=>{const a=o?i.rowsPerPage-n:a$-r;let s=e.qUp+e.qDown;if(o&&0===n){const n=(t+e.qUp)%i.rowsPerPage;s=e.qDown+n}return Math.min(a,WG(s,e))},$G=({node:e,parent:t,root:n,x:r,y:o,pageY:i,layoutService:a,dimensionInfo:s,attrExprInfoIndex:l,isLeftColumn:c=!0,isIndentModeEnabled:u=!1,indentLevel:d,labelStructure:p,env:h,pageInfo:f,direction:m="ltr"})=>{const g=(!u||!c)&&"P"===e.qType,y=((e,t)=>{if(e!==kV){if(t){const t=ZF(e.representation);return t===XF.Link||t===XF.Image?e.representation:{type:XF.Text}}return e.representation}})(s,u),_=(({node:e,isLeftColumn:t,isIndentModeEnabled:n,labelStructure:r,representationType:o,parentOrRootOriginalValue:i})=>{let a=e.qText;if(t&&n&&r){const{originalValue:t,delimeter:n,suffix:s}=r;a=o===XF.Link?"P"===e.qType?i:t:`${t} ${!s||!t&&s?"":n} ${s}`.trim()}return a})({node:e,isLeftColumn:c,isIndentModeEnabled:u,labelStructure:p,representationType:ZF(y),parentOrRootOriginalValue:(t||n)?.representation?.labelStructure?.originalValue??""}),b=qG({cell:{...e,qText:_},representationProperties:y,attrExprInfoIndex:l,env:h,labelStructure:p,direction:m,enabledFeatures:{[XF.Image]:!0,[XF.Indicator]:!0}}),x={id:LV(),ref:e,x:r,y:o,pageX:r,pageY:i,mainAxisPageCoord:c?i:r,isLeftColumn:c,parent:t,root:n,children:[],isLeafNode:0===e.qSubNodes.length,leafCount:BG(e,o,i,r,c,f),distanceToNextCell:0,isLockedByDimension:!("object"!=typeof s||!s.qLocked),isTotal:"T"===e.qType||!!t?.isTotal,isEmpty:"E"===e.qType||-4===e.qElemNo,isNull:"U"===e.qType,isPseudoDimension:g,expressionColor:FG(l,e),selectionCellType:c?"L":"T",dimensionInfoIndex:a.getDimensionInfoIndex(s),canBeResized:0===e.qSubNodes.length&&!c,visibleMeasureInfoIndex:g?e.qElemNo:t?.visibleMeasureInfoIndex,representation:b,...void 0!==d&&{indentLevel:d}};return t&&(t.children[x.mainAxisPageCoord-t.mainAxisPageCoord]=x),x},HG=(e,t,n,r,o,i,a,s,l)=>{const{isIndentModeEnabled:c}=o;if(!t.length)return e;let u=0;return function t(d,p,h,f=0,m=-1){e[f]||(e[f]={}),c&&m++;const g=o.leftDimensionInfoIndexes.indexOf(kV);h.forEach(((h,y)=>{const _={originalValue:h.qText??"",maskedValue:"",delimeter:"-",suffix:""};u+=0===y?0:1;const b=n.qTop-r.page*r.rowsPerPage,x=Math.max(0,b+u-h.qUp),v=n.qTop+u-h.qUp;if(c){if(o.hasPseudoDimOnLeft&&m<=g)if(_.originalValue=h.qText??"",_.maskedValue=h.qText??"","N"===h.qType||"U"===h.qType||"T"===h.qType)"U"===h.qType&&(_.originalValue=o.getNullValueText()),m<g&&(_.suffix=o.visibleMeasureInfo[0].qFallbackTitle);else if("P"===h.qType){_.originalValue=(p||d)?.representation.labelStructure?.originalValue??"",_.maskedValue=(p||d)?.representation.labelStructure?.originalValue??"",_.suffix=h.qText??"";const e=h.qSubNodes;h={...(p||d)?.ref,...h.qText?{qText:h.qText}:{},qSubNodes:e},m=(p||d)?.indentLevel??0}"U"===h.qType&&(_.originalValue=o.getNullValueText())}let w=f;c&&(w=g>=1&&m>=g?m+1:m,0===m&&0===g&&0===h.qSubNodes.length&&(w=0));const S=e.at(f)?.[x],C=c&&void 0===S?.ref.qText||!S?$G({node:h,parent:p,root:d,x:w,y:v,pageY:x,layoutService:o,dimensionInfo:i[w],attrExprInfoIndex:a[w],isLeftColumn:!0,...c&&{isIndentModeEnabled:c,indentLevel:m},env:s,pageInfo:r,labelStructure:_,direction:l}):e[f][x];if(e[f][x]=C,h.qSubNodes.length){const e=c?0:f+1;t(d||C,C,h.qSubNodes,e,m)}}))}(null,null,t,0,-1),e},VG=(e,t)=>{e.slice(0,-1).forEach((e=>{Object.values(e).forEach(((e,n,r)=>{const o=r.at(n+1);e.distanceToNextCell=o?o.mainAxisPageCoord-(e.mainAxisPageCoord+e.leafCount):t-(e.mainAxisPageCoord+e.leafCount)}))}))},GG=(e,t)=>{const n=e[0],r=n?Object.values(n):[],o=t?.isIndentModeEnabled&&t.hasPseudoDimOnLeft?t.visibleMeasureInfo.length-1:0,i=n?.[o],a=r.at(-1);return i?.isTotal?i.isLeafNode?i.mainAxisPageCoord:i.mainAxisPageCoord+i.leafCount-1:a?.isTotal?a.mainAxisPageCoord-1:-1},UG=({prevData:e,nextDataPage:t,pageInfo:n,layoutService:r,visibleLeftDimensionInfo:o,attrExprInfoIndexes:i,env:a,direction:s})=>{const{qLeft:l,qArea:c}=t;if(!l.length)return e;const u=HG(e.grid,l,c,n,r,o,i,a,s);VG(u,n.rowsOnCurrentPage);const d=GG(u,r);return{...e,grid:u,columnCount:u.length,totalDividerIndex:d}},YG=({qArea:e,prevData:t,pivotValuePoints:n,pageInfo:r})=>{const o=[...t];return n.forEach(((t,n)=>{t.forEach(((t,i)=>{const a=e.qTop-r.page*r.rowsPerPage+n,s=e.qLeft+i;Array.isArray(o[a])||(o[a]=[]);const l="U"===t.qType;o[a][s]=o[a][s]??{id:LV(),ref:t,isNull:l}}))})),o},KG=({prevData:e,dataPage:t,pageInfo:n})=>{const{qData:r,qArea:o}=t;return r?.length?YG({qArea:o,prevData:e,pivotValuePoints:r,pageInfo:n}):e},XG=(e,t,n,r,o,i,a,s,l,c)=>{const{isIndentModeEnabled:u}=r;if(!t.length)return e;let d=0;!function t(a,p,h,f=0){e[f]||(e[f]={}),h.forEach(((h,m)=>{d+=0===m?0:1;const g=n.qLeft+d-h.qUp,y=e[f][g]??$G({node:h,parent:p,root:a,x:g,y:f,pageY:f,layoutService:r,dimensionInfo:o[f],attrExprInfoIndex:i[f],isLeftColumn:!1,...u&&{isIndentModeEnabled:u},env:s,pageInfo:l,direction:c});e[f][g]=y,h.qSubNodes.length&&t(a||y,y,h.qSubNodes,f+1)}))}(null,null,t);for(let t=0;t<a-e.length;t++)e.push({});return e},JG=({prevData:e,nextDataPage:t,layoutService:n,visibleTopDimensionInfo:r,attrExprInfoIndexes:o,headerRows:i,env:a,pageInfo:s,direction:l})=>{const{qTop:c,qArea:u}=t;if(!c.length)return e;const d=XG(e.grid,c,u,n,r,o,i,a,s,l);VG(d,n.size.x);const p=GG(d);return{...e,grid:d,rowCount:d.length,totalDividerIndex:p}},ZG=e=>-1===e?{}:e.qAttrExprInfo.reduce(((e,{id:t},n)=>(e[t]=n,e)),{}),QG=(e,t)=>{const{env:n}=bV(),{direction:r}=gV(),{layoutService:o,effectivePropertiesService:i}=wV(),{qPivotDataPages:a,pageInfo:s}=gV(),[l,c]=m(null),u=((e,t,n)=>f((()=>({left:e.map(ZG),top:t.map(ZG),measures:n.map(ZG)})),[n,e,t]))(e,t,o.visibleMeasureInfo),d=f((()=>NV(o,i,t,e)),[o,i,t,e]),h=p((()=>a.slice(1).reduce(((e,t)=>KG({prevData:e,dataPage:t,pageInfo:s})),((e,t)=>{const{qData:n,qArea:r}=e;return YG({qArea:r,prevData:[],pivotValuePoints:n,pageInfo:t})})(a[0],s))),[a,s]),g=p((()=>a.slice(1).reduce(((e,i)=>JG({prevData:e,nextDataPage:i,layoutService:o,visibleTopDimensionInfo:t,attrExprInfoIndexes:u.top,headerRows:d.size.y,env:n,pageInfo:s,direction:r})),((e,t,n,r,o,i,a,s)=>{const{qArea:l,qTop:c}=e,u=XG([],c,l,t,n,r,o,i,a,s);VG(u,t.size.x);const d=GG(u);return{grid:u,rowCount:u.length,layoutSize:t.size,totalDividerIndex:d}})(a[0],o,t,u.top,d.size.y,n,s,r))),[a,o,t,u.top,d.size.y,n,s,r]),y=p((()=>a.slice(1).reduce(((t,i)=>UG({prevData:t,nextDataPage:i,pageInfo:s,layoutService:o,visibleLeftDimensionInfo:e,attrExprInfoIndexes:u.left,env:n,direction:r})),((e,t,n,r,o,i,a)=>{const{qArea:s,qLeft:l}=e,c=HG([],l,s,n,t,r,o,i,a);VG(c,n.rowsOnCurrentPage);const u=GG(c,t);return{grid:c,columnCount:c.length,layoutSize:t.size,totalDividerIndex:u}})(a[0],o,s,e,u.left,n,r))),[a,o,s,e,u,n,r]),[_,b]=m((()=>h())),[x,v]=m((()=>g())),[w,S]=m((()=>y()));H$((()=>{b(h())}),[h]),H$((()=>{v(g())}),[g]),H$((()=>{S(y())}),[y]),H$((()=>{l&&l.forEach((i=>{b((e=>KG({prevData:e,dataPage:i,pageInfo:s}))),v((e=>JG({prevData:e,nextDataPage:i,layoutService:o,visibleTopDimensionInfo:t,attrExprInfoIndexes:u.top,headerRows:d.size.y,env:n,pageInfo:s,direction:r}))),S((t=>UG({prevData:t,nextDataPage:i,pageInfo:s,layoutService:o,visibleLeftDimensionInfo:e,attrExprInfoIndexes:u.left,env:n,direction:r})))}))}),[l]);const C=p((e=>{c(e)}),[]);return{headersData:d,measureData:_,topDimensionData:x,leftDimensionData:w,attrExprInfoIndexes:u,nextPageHandler:C}},eU=Math.sqrt(1e4),tU=e=>({maxNumberOfVisibleRows:Math.ceil(e.height/24),maxNumberOfVisibleColumns:Math.ceil(e.width/mN.PixelsMin)}),nU=e=>{if(null===e)return[];if(e.qWidth*e.qHeight<1e4)return[e];const t=[],n=Math.ceil(e.qWidth/eU),r=Math.ceil(e.qHeight/eU);for(let o=0;o<n;o++)for(let n=0;n<r;n++)t.push({qLeft:e.qLeft+o*eU,qTop:e.qTop+n*eU,qWidth:Math.min(eU,e.qWidth-o*eU),qHeight:Math.min(eU,e.qHeight-n*eU)});return t};function rU({nextPageHandler:e}){const{model:t}=bV(),{pageInfo:n}=gV(),{layoutService:r}=wV(),o=(e=>{const t=s(e);return t.current=e,t})(n.page),i=t,a=p((async(e,t)=>{await(i?.collapseLeft(EV,e,t,!1))}),[i]),l=p((async(e,t)=>{await(i?.collapseTop(EV,e,t,!1))}),[i]),c=p((async(e,t)=>{await(i?.expandLeft(EV,e,t,!1))}),[i]),u=p((async(e,t)=>{await(i?.expandTop(EV,e,t,!1))}),[i]),d=p((async t=>{if(i?.getHyperCubePivotData&&0!==t.length)try{const r=await i.getHyperCubePivotData(EV,t.reduce(((e,t)=>[...e,...nU(t)]),[]));o.current===n.page&&e(r)}catch(e){console.error(e)}}),[i,e,n,o]),h=p(((e,{dimensionInfoIndex:n,isLeftColumn:o,x:i=0,columnWidthLocation:a})=>{const{qMeasureInfo:s,qDimensionInfo:l,topHeadersColumnWidth:c}=r.layout.qHyperCube;let u=[];switch(a){case rW.Dimension:u=[{qPath:`${EV}/qDimensions/${n}/qDef/columnWidth`,oldValue:l[n].columnWidth}];break;case rW.Measures:if(o)u=s.map(((e,t)=>({qPath:`${EV}/qMeasures/${t}/qDef/columnWidth`,oldValue:e.columnWidth})));else{const e=r.getMeasureInfoIndexFromCellIndex(i);u=[{qPath:`${EV}/qMeasures/${e}/qDef/columnWidth`,oldValue:s[e].columnWidth}]}break;case rW.Pivot:u=[{qPath:`${EV}/topHeadersColumnWidth`,oldValue:c}]}const d=u.map((t=>{const{qPath:n,oldValue:r}=t;return{qPath:n,qOp:r?"Replace":"Add",qValue:JSON.stringify({...r,...e})}}));t?.applyPatches(d,!0)}),[t,r]),m=p((async e=>{await(i?.applyPatches([{qPath:`${EV}/indentModeColumnWidth`,qOp:r.layout.qHyperCube.indentModeColumnWidth?"Replace":"Add",qValue:JSON.stringify({...r.indentModeColumnWidth,...e})}],!0))}),[i,r]);return f((()=>({collapseLeft:a,collapseTop:l,expandLeft:c,expandTop:u,applyColumnWidth:h,applyIndentModeColumnWidth:m,fetchPages:d})),[a,l,c,u,h,m,d])}const oU=(e,t,n)=>(r,o)=>{if("P"===r)return kV;const i=t[n+o];return e[i]},iU=e=>{const t=[],n=(e,r=0)=>{e.slice(0,1).forEach((e=>{t[r]=e.qType,e.qSubNodes.length&&n(e.qSubNodes,r+1)}))};return n(e),t},aU=l({}),sU=()=>n(aU),lU=({children:e})=>{const{visibleLeftDimensionInfo:t,visibleTopDimensionInfo:n}=(()=>{const{layoutService:{layout:{qHyperCube:{qNoOfLeftDims:e,qEffectiveInterColumnSortOrder:t,qDimensionInfo:n}}}}=wV(),{qPivotDataPages:r}=gV();return f((()=>{const o=iU(r[0]?.qLeft??[]),i=iU(r[0]?.qTop??[]);return{visibleLeftDimensionInfo:o.map(oU(n,t,0)),visibleTopDimensionInfo:i.map(oU(n,t,e))}}),[n,t,e,r])})(),{headersData:r,measureData:o,topDimensionData:i,leftDimensionData:a,attrExprInfoIndexes:s,nextPageHandler:l}=QG(t,n),c=rU({nextPageHandler:l}),u=f((()=>({gridSectionsData:{headersData:r,topDimensionData:i,leftDimensionData:a,measureData:o},visibleDimensionsInfo:{visibleLeftDimensionInfo:t,visibleTopDimensionInfo:n},attrExprInfoIndexes:s,dataModel:c})),[t,n,r,o,i,a,s,c]);return Uo.jsx(aU.Provider,{value:u,children:e})},cU=20,uU=18,dU=.75,pU=e=>-1!==e&&e?.representation?.type===XF.Image,hU=({isLeftColumn:e,layoutService:t,representation:n})=>Boolean(e)&&t.isIndentModeEnabled&&n.type===XF.Image,fU=e=>void 0===e?i$:e,mU=(e,t)=>void 0===e||Number.isNaN(+e)?t:+e,gU=e=>mU(e,mN.PixelsDefault),yU=(e,t)=>mU(e,mN.PercentageDefault)*t/100,_U=(e,t,n)=>{switch(t?.type){case gN.Pixels:return gU(t.pixels);case gN.Percentage:return yU(t.percentage,e);case gN.FitToContent:case gN.Auto:default:return n}},bU=({headers:e,layoutService:t,effectivePropertiesService:n,estimateWidthForDimensionValue:r,shouldConsiderCombinatedLength:o,measureTextForHeader:i,longestMeasureValuePossible:a})=>e.reduce(((e,s,l)=>{const{layout:{qHyperCube:{qNoOfLeftDims:c,qDimensionInfo:u}}}=t,{id:d,colIdx:p,qApprMaxGlyphCount:h,isLeftDimension:f}=s,m=u.find((e=>e.cId===d)),g={width:24,...m?.representation?.imageBox};if(!f)return e+0;if(d===MV)return e+0;const y=hU({isLeftColumn:f,layoutService:t,representation:m?.representation||{type:XF.Text}})?g.width+8+4:r(h),_=!n.qAlwaysFullyExpanded&&p<c-1?21:0;let b=0;if(o&&i&&a){b=i("- ")+a}return Math.max(e,24*l+uU+_+y+b)}),0),xU=(e,t,n)=>e.reduce(((e,r)=>{const o=(n?0:1)*uU;return Math.max(e,o+t(r.qFallbackTitle))}),0),vU=(e,t,n,r)=>{const o=100*e/t,i=r*dU*(o/100),a=o/100*+n;return Math.min(a,i)},wU=(e,t,n,r)=>r*(+n/100)*(100*e/t/100),SU=(e,t)=>e.some((e=>e>=t*dU)),CU=({layoutService:e,effectivePropertiesService:t,headersData:n,columnWidths:r,tableWidth:o,widthOverride:i,measureTextForHeader:a,estimateWidthForDimensionValue:s,measureTextWidthForMeasuresCombinedWithDimensions:l,translator:c})=>{let u=[];const d=o*dU,p=n.data[n.data.length-1][0];if(!Array.isArray(p))return{leftGridWidth:0,leftGridColumnWidths:[],leftGridFullWidth:0};const h=Math.min(d,r.at(-1)),f=Math.min(d,bU({headers:p,layoutService:e,effectivePropertiesService:t,estimateWidthForDimensionValue:s})),m=Math.min(d,xU(e.visibleMeasureInfo,a));let g=0;const y=p.findIndex((e=>e.id===MV)),_=(({layoutService:e,measureTextForHeader:t,translator:n,headersData:r})=>{const{type:o}=e.indentModeColumnWidth;return o===gN.Auto&&r.size.y<=1?t(n.get("SNPivotTable.IndentMode.Rows"))+8+uU+16:24})({layoutService:e,measureTextForHeader:a,translator:c,headersData:n});if(e.hasPseudoDimOnLeft)if(0===y){const e=Math.max(h,f,m);u=[Math.max(_,e-h),h]}else{const n=Math.min(d,xU(e.visibleMeasureInfo,l,!0));g=Math.min(d,bU({headers:p.slice(0,y),layoutService:e,effectivePropertiesService:t,estimateWidthForDimensionValue:s,shouldConsiderCombinatedLength:!0,measureTextForHeader:a,longestMeasureValuePossible:n}));const r=Math.max(h,f,g);u=[Math.max(_,r-h),h]}else u=[Math.max(_,f-h),h];const b=Math.min(d,u.reduce(((e,t)=>e+t),0)),{indentModeColumnWidth:x}=e;i&&i<=d&&(x.type=gN.Pixels,x.pixels=i);return[gN.Pixels,gN.Percentage].includes(x.type)||SU(u,o)?((e,t,n,r)=>{let o=e[0],i=e[1],a=[];const s=e.reduce(((e,t)=>e+t),0),{type:l,pixels:c,percentage:u}=t,d=SU(e,n);l===gN.Auto&&d&&(o>i?o-=i:i-=o),l===gN.Pixels&&c&&(o=vU(e[0],s,c,n),i=vU(e[1],s,c,n)),l===gN.Percentage&&u&&(o=wU(e[0],s,u,n),i=wU(e[1],s,u,n));let p=0;i<=r&&(p=o-5,p>0&&(o-=p,i+=p)),p=i-r,p>0&&(o+=p,i-=p),a=[o,i];const h=a.reduce(((e,t)=>e+t),0);return{leftGridColumnWidths:a,leftGridWidth:h,leftGridFullWidth:h}})(u,x,o,h):{leftGridWidth:b,leftGridColumnWidths:u,leftGridFullWidth:b}};function EU({tableWidth:e}){const t=e*dU,{styleService:n,layoutService:r,effectivePropertiesService:o}=wV(),{translator:i}=bV(),{gridSectionsData:{headersData:a}}=sU(),{measureText:s}=F$(n.header),{estimateWidth:l,measureText:c}=F$({...n.dimensionValues,fontWeight:fU(n.dimensionValues.fontWeight)}),{measureText:u}=F$({...n.dimensionValues,...n.measureLabels}),d=p(((n,d)=>{const{layout:{qHyperCube:{qNoOfLeftDims:p,topHeadersColumnWidth:h}},visibleMeasureInfo:f,isIndentModeEnabled:m,hasPseudoDimOnLeft:g}=r,y=(t=0)=>f.reduce(((n,{qFallbackTitle:r,columnWidth:o})=>{const i=u(r)+uU,a=Math.max(i,t);return Math.max(n,m?a:_U(e,o,a))}),0),_=e=>a.data.reduce(((t,n)=>{const r=n.at(e);if(!r||Array.isArray(r))return t;if(r.id===MV)return t;const o=(e=>{const{label:t,isLocked:n}=e,r=n?cU:0;return uU+s(t)+cU+r})(r);return Math.max(o,t)}),0);let b=0,x=a.data.at(-1);m&&a.size.x>1&&x&&x[0]&&(x=x[0]);const v=x.map(((i,s)=>{let c=uU;if(m&&1!==a.size.x||!n||void 0===d||d!==i.colIdx){let t;i.columnWidthLocation===rW.Pivot?t=m?void 0:h:i.columnWidthLocation===rW.Dimension&&({columnWidth:t}=i);let n=0;if(i.isLeftDimension)if(i.id===MV)n=y();else{const e=_(s),t=((e,t)=>{const{qApprMaxGlyphCount:n,isLeftDimension:i,dimensionInfoIndex:a}=e,s=r.getDimensionInfo(a);if(pU(s))return mN.PixelsDefault;const c=!o.qAlwaysFullyExpanded&&i&&t<p-1?21:0;return uU+l(n)+c})(i,s);n=Math.max(e,t),m&&!g&&s+1===p&&i.columnWidthLocation===rW.Dimension&&a.size.x>1&&(n=e)}else n=_(s),i.columnWidthLocation===rW.Measures&&(n=y(n));m&&1===a.size.x&&(t=r.indentModeColumnWidth),c=m&&!g&&a.size.x>1?n:_U(e,t,n)}else c=m?Math.min(t,n):n;return b+=c,c}));return m&&a.size.x>1?CU({layoutService:r,effectivePropertiesService:o,headersData:a,columnWidths:v,tableWidth:e,widthOverride:n,measureTextForHeader:s,estimateWidthForDimensionValue:l,measureTextWidthForMeasuresCombinedWithDimensions:c,translator:i}):{leftGridWidth:Math.min(t,b),leftGridColumnWidths:v,leftGridFullWidth:b}}),[e,a,r,t,s,u,l,c,i,o]),[h,f]=m(d);H$((()=>{f(d())}),[d]);const g=p(((e,t)=>{f(d(e,t))}),[d]);return{...h,overrideLeftGridWidth:g}}function kU({tableWidth:e,verticalScrollbarWidth:t,leftGridWidth:n}){const{styleService:r,layoutService:o}=wV(),{visibleDimensionsInfo:{visibleTopDimensionInfo:i}}=sU(),{layout:{qHyperCube:{qNoOfLeftDims:a,qEffectiveInterColumnSortOrder:s}},size:l,visibleMeasureInfo:c}=o,{estimateWidth:u,measureText:d}=F$(r.measureValues),{estimateWidth:h}=F$({...r.dimensionValues,fontWeight:fU(r.dimensionValues.fontWeight)}),m=e-n-1,g=i.at(-1),y=g===kV,_=s.length-a>i.length?21:0,b=f((()=>{const e=y?c:[g],t=l.x/e.length,n=[],r=[];let o=m;const i=(e,r)=>{n[e]=Math.min(mN.PixelsMax,Math.max(mN.PixelsMin,r)),o-=n[e]*t};if(e.forEach(((e,t)=>{if(e?.columnWidth){const{columnWidth:{type:n,pixels:o,percentage:a},qApprMaxGlyphCount:s,qFallbackTitle:l}=e;switch(n){case gN.Pixels:i(t,gU(o));break;case gN.Percentage:i(t,yU(a,m));break;case gN.FitToContent:i(t,((e,t,n)=>n?mN.PixelsDefault:uU+(y?Math.max(u(e),d(t)):Math.max(Math.max(...c.map((e=>u(e.qApprMaxGlyphCount)))),h(e)+_)))(s,l,pU(e)));break;case gN.Auto:default:r.push(t)}}else r.push(t)})),r.length){const e=r.length*t,i=o/e;r.forEach((e=>{n[e]=Math.max(mN.AutoMinPivot,i)}))}return n}),[y,c,g,l.x,m,u,d,h,_]),x=f((()=>{if(y){const e=c.reduce(((e,t,n)=>e+b[n]),0);return e/c.length}return b[0]}),[y,b,c]),v=parseFloat((t/o.size.x).toFixed(12)),w=p((e=>(y&&void 0!==e?b[o.getMeasureInfoIndexFromCellIndex(e,!0)]:x)-v),[y,b,o,x,v]),S=l.x*x;return{rightGridFullWidth:S,rightGridWidth:Math.min(S,m),getRightGridColumnWidth:w}}const MU=`scrollable-container--${iW.TopGrid}`,RU=`scrollable-container--${iW.LeftGrid}`,AU=`scrollable-container--${iW.DataGrid}`,IU=e=>e&&e instanceof HTMLDivElement?{width:e.offsetWidth-e.clientWidth,height:e.offsetHeight-e.clientHeight}:{width:0,height:0},PU=(e,t)=>e>t?aW.Forward:e<t?aW.Backward:aW.None,OU=({gridRefs:{topGridRef:e,leftGridRef:t,dataGridRef:n},getWrapperElements:r,updateViewService:o,trackScrollDirection:i,interactions:a})=>{const{direction:s}=gV();u((()=>{const{headerGridWrapperElement:l,topGridWrapperElement:c,leftGridWrapperElement:u,dataGridWrapperElement:d}=r(),p=e=>{const t=e.target;l.scrollLeft=t.scrollLeft,i(e),o?.(e)},h=e=>{const t=e.target;l.scrollTop=t.scrollTop,i(e),o?.(e)},f=r=>{const a=r.target,l=((e,t)=>{const{scrollWidth:n,clientWidth:r,scrollLeft:o}=e,i=n-r;if("rtl"===t){if(o>i)return i;if(o<0)return Math.abs(o)}return o})(a,s);n.current?.scrollTo({scrollLeft:l,scrollTop:a.scrollTop}),c.scrollLeft=l,e.current?.forEach((e=>{e?.scrollTo(l)})),u.scrollTop=d.scrollTop,t.current?.forEach((e=>{e?.scrollTo(a.scrollTop)})),i(r),o?.(r)};return u.addEventListener("scroll",p),c.addEventListener("scroll",h),d.addEventListener("scroll",f),a.scroll||setTimeout((()=>{u.removeEventListener("scroll",p),c.removeEventListener("scroll",h),d.removeEventListener("scroll",f)}),0),()=>{u.removeEventListener("scroll",p),c.removeEventListener("scroll",h),d.removeEventListener("scroll",f)}}),[i,o,a,e,t,n,r,s])},LU=()=>{const{interactions:e}=bV(),t=s(null),n=s(null),r=s(null),o=s(null),i=s([]),a=s([]),l=s(null),{scrollbarsDimensions:{verticalScrollbarWidth:c,horizontalScrollbarHeight:d},resetHorizontalScrollbarHeight:f}=(({topGridWrapperRef:e,leftGridWrapperRef:t,dataGridWrapperRef:n})=>{const[r,o]=m(0),[i,a]=m(0);return h((()=>{(e.current||n.current)&&o(Math.max(IU(e.current).width,IU(n.current).width))})),h((()=>{(t.current||n.current)&&a(Math.max(IU(t.current).height,IU(n.current).height))})),{scrollbarsDimensions:{verticalScrollbarWidth:r,horizontalScrollbarHeight:i},resetHorizontalScrollbarHeight:()=>{a(0)}}})({topGridWrapperRef:n,leftGridWrapperRef:r,dataGridWrapperRef:o});(({gridSectionsWrapperRefs:{headerGridWrapperRef:e,topGridWrapperRef:t,leftGridWrapperRef:n,dataGridWrapperRef:r},gridRefs:{topGridRef:o,leftGridRef:i,dataGridRef:a}})=>{const{pageInfo:s}=gV(),{downloadService:l,viewService:c,layoutService:u}=wV(),d=p((()=>{const o={left:0,top:0};e.current?.scrollTo(o),t.current?.scrollTo(o),n.current?.scrollTo(o),r.current?.scrollTo(o)}),[e,t,n,r]);h((()=>{d()}),[s.page,d]),h((()=>{u.triggerdByExpandOrCollapse||d()}),[u,d]),h((()=>{if(u.triggerdByExpandOrCollapse){const e=r.current?.scrollLeft??0,t=r.current?.scrollTop??0;i.current?.forEach((e=>{e?.scrollTo(t)})),o.current?.forEach((t=>{t?.scrollTo(e)})),a.current?.scrollTo({scrollTop:t,scrollLeft:e})}}),[u,r,a,i,o]),h((()=>{(l.isDownloadedAsPDForImage||u.isSnapshot)&&r.current&&n.current&&t.current&&(r.current.scrollTop=c.scrollTop,r.current.scrollLeft=c.scrollLeft,n.current.scrollLeft=c.leftGridScrollLeft,t.current.scrollTop=c.topGridScrollTop)}),[c,l,u,r,n,t])})({gridSectionsWrapperRefs:{headerGridWrapperRef:t,topGridWrapperRef:n,leftGridWrapperRef:r,dataGridWrapperRef:o},gridRefs:{topGridRef:i,leftGridRef:a,dataGridRef:l}});const{trackScrollDirection:g,scrollDirectionRefs:{verticalScrollDirection:y,horizontalScrollDirection:_}}=(()=>{const e=s(aW.None),t=s(aW.None),n=s({prevScrollTop:0,prevScrollLeft:0}),r=p((r=>{if(r instanceof WheelEvent&&(e.current=PU(r.deltaY,0),t.current=PU(r.deltaX,0)),r instanceof Event&&!(r instanceof WheelEvent)){const o=r.target;e.current=PU(o.scrollTop,n.current.prevScrollTop),n.current.prevScrollTop=o.scrollTop,t.current=PU(o.scrollLeft,n.current.prevScrollLeft),n.current.prevScrollLeft=o.scrollLeft}}),[e,t,n]);return{trackScrollDirection:r,scrollDirectionRefs:{verticalScrollDirection:e,horizontalScrollDirection:t}}})(),b=(()=>{const{viewService:e}=wV();return p((t=>{const n=t.target,r=t.currentTarget,o=n.dataset.key;o===RU&&(e.leftGridScrollLeft=r.scrollLeft),o===AU&&(e.scrollLeft=r.scrollLeft),o===MU&&(e.topGridScrollTop=r.scrollTop),o!==RU&&o!==AU||(e.scrollTop=r.scrollTop)}),[e])})(),x={gridRefs:{topGridRef:i,leftGridRef:a,dataGridRef:l},getWrapperElements:p((()=>({headerGridWrapperElement:t.current,topGridWrapperElement:n.current,leftGridWrapperElement:r.current,dataGridWrapperElement:o.current})),[t,n,r,o]),updateViewService:b,trackScrollDirection:g,interactions:e};return(({gridRefs:{topGridRef:e,leftGridRef:t,dataGridRef:n},getWrapperElements:r,updateViewService:o,trackScrollDirection:i,interactions:a})=>{u((()=>{const{headerGridWrapperElement:o,topGridWrapperElement:s,leftGridWrapperElement:l,dataGridWrapperElement:c}=r(),u=e=>{o.scrollLeft+=e.deltaX,o.scrollTop+=e.deltaY,l.scrollLeft=o.scrollLeft,s.scrollTop=o.scrollTop,i(e)},d=e=>{l.scrollTop+=e.deltaY,t.current?.forEach((e=>{e?.scrollTo(l.scrollTop)})),o.scrollLeft+=e.deltaX,l.scrollLeft=o.scrollLeft,c.scrollTop=l.scrollTop,n.current?.scrollTo({scrollTop:l.scrollTop}),i(e)},p=t=>{s.scrollLeft+=t.deltaX,e.current?.forEach((e=>{e?.scrollTo(s.scrollLeft)})),o.scrollTop+=t.deltaY,s.scrollTop=o.scrollTop,c.scrollLeft=s.scrollLeft,n.current?.scrollTo({scrollLeft:s.scrollLeft}),i(t)},h=r=>{c.scrollLeft+=r.deltaX,c.scrollTop+=r.deltaY,n.current?.scrollTo({scrollLeft:c.scrollLeft,scrollTop:c.scrollTop}),s.scrollLeft=c.scrollLeft,e.current?.forEach((e=>{e?.scrollTo(c.scrollLeft)})),l.scrollTop=c.scrollTop,t.current?.forEach((e=>{e?.scrollTo(c.scrollTop)})),i(r)};return o.addEventListener("wheel",u),l.addEventListener("wheel",d),s.addEventListener("wheel",p),c.addEventListener("wheel",h),a.scroll||setTimeout((()=>{o.removeEventListener("wheel",u),l.removeEventListener("wheel",d),s.removeEventListener("wheel",p),c.removeEventListener("wheel",h)}),0),()=>{o.removeEventListener("wheel",u),l.removeEventListener("wheel",d),s.removeEventListener("wheel",p),c.removeEventListener("wheel",h)}}),[i,o,a,e,t,n,r])})(x),OU(x),{gridSectionsWrapperRefs:{headerGridWrapperRef:t,topGridWrapperRef:n,leftGridWrapperRef:r,dataGridWrapperRef:o},gridRefs:{topGridRef:i,leftGridRef:a,dataGridRef:l},scrollDirectionRefs:{verticalScrollDirection:y,horizontalScrollDirection:_},scrollbarsDimensions:{verticalScrollbarWidth:c,horizontalScrollbarHeight:d,resetHorizontalScrollbarHeight:f}}},DU=()=>{const{layoutService:e}=wV(),{rect:t,pageInfo:n}=gV();return f((()=>{let{height:r}=t;return e.hasLimitedData&&(r-=22),n.shouldShowPagination&&(r-=41),{...t,height:r}}),[t,e,n.shouldShowPagination])},TU=({children:e,style:t})=>Uo.jsx("div",{"data-testid":"fullSize",style:t,children:e}),zU=({children:e,style:t})=>{const{direction:n}=gV();return Uo.jsx("div",{"data-section-id":"GRID",style:{direction:n,display:"grid",...t},children:e})},jU=e=>e&&`scrollable-container--${e}`,NU=({children:e,style:t,origin:n},r)=>{const{interactions:o}=bV(),i=o.scroll?t:{overflow:"hidden"};return Uo.jsx("div",{"data-testid":"scrollable","data-key":jU(n),style:i,ref:r,children:e})};var qU=t.forwardRef(NU);const FU=({children:e,style:t})=>{const{direction:n}=gV();return Uo.jsx("div",{"data-testid":"sticky",style:{position:"sticky",top:0,["rtl"===n?"right":"left"]:0,...t},children:e})};var WU=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function BU(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(r=e[n],o=t[n],!(r===o||WU(r)&&WU(o)))return!1;var r,o;return!0}function $U(e,t){var n;void 0===t&&(t=BU);var r,o=[],i=!1;return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return i&&n===this&&t(a,o)||(r=e.apply(this,a),i=!0,n=this,o=a),r}}var HU="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function VU(e){cancelAnimationFrame(e.id)}function GU(e,t){var n=HU();var r={id:requestAnimationFrame((function o(){HU()-n>=t?e.call(null):r.id=requestAnimationFrame(o)}))};return r}var UU=-1;function YU(e){if(void 0===e&&(e=!1),-1===UU||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),UU=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return UU}var KU=null;function XU(e){if(void 0===e&&(e=!1),null===KU||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),o=r.style;return o.width="100px",o.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?KU="positive-descending":(t.scrollLeft=1,KU=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),KU}return KU}var JU=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function ZU(e){var t,n=e.getColumnOffset,o=e.getColumnStartIndexForOffset,i=e.getColumnStopIndexForStartIndex,a=e.getColumnWidth,s=e.getEstimatedTotalHeight,l=e.getEstimatedTotalWidth,c=e.getOffsetForColumnAndAlignment,u=e.getOffsetForRowAndAlignment,d=e.getRowHeight,p=e.getRowOffset,h=e.getRowStartIndexForOffset,f=e.getRowStopIndexForStartIndex,m=e.initInstanceProps,g=e.shouldResetStyleCacheOnItemSizeChange,y=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=m(r.props,wl(r)),r._resetIsScrollingTimeoutId=null,r._outerRef=void 0,r.state={instance:wl(r),isScrolling:!1,horizontalScrollDirection:"forward",scrollLeft:"number"==typeof r.props.initialScrollLeft?r.props.initialScrollLeft:0,scrollTop:"number"==typeof r.props.initialScrollTop?r.props.initialScrollTop:0,scrollUpdateWasRequested:!1,verticalScrollDirection:"forward"},r._callOnItemsRendered=void 0,r._callOnItemsRendered=$U((function(e,t,n,o,i,a,s,l){return r.props.onItemsRendered({overscanColumnStartIndex:e,overscanColumnStopIndex:t,overscanRowStartIndex:n,overscanRowStopIndex:o,visibleColumnStartIndex:i,visibleColumnStopIndex:a,visibleRowStartIndex:s,visibleRowStopIndex:l})})),r._callOnScroll=void 0,r._callOnScroll=$U((function(e,t,n,o,i){return r.props.onScroll({horizontalScrollDirection:n,scrollLeft:e,scrollTop:t,verticalScrollDirection:o,scrollUpdateWasRequested:i})})),r._getItemStyle=void 0,r._getItemStyle=function(e,t){var o,i=r.props,s=i.columnWidth,l=i.direction,c=i.rowHeight,u=r._getItemStyleCache(g&&s,g&&l,g&&c),h=e+":"+t;if(u.hasOwnProperty(h))o=u[h];else{var f=n(r.props,t,r._instanceProps),m="rtl"===l;u[h]=o={position:"absolute",left:m?void 0:f,right:m?f:void 0,top:p(r.props,e,r._instanceProps),height:d(r.props,e,r._instanceProps),width:a(r.props,t,r._instanceProps)}}return o},r._getItemStyleCache=void 0,r._getItemStyleCache=$U((function(e,t,n){return{}})),r._onScroll=function(e){var t=e.currentTarget,n=t.clientHeight,o=t.clientWidth,i=t.scrollLeft,a=t.scrollTop,s=t.scrollHeight,l=t.scrollWidth;r.setState((function(e){if(e.scrollLeft===i&&e.scrollTop===a)return null;var t=r.props.direction,c=i;if("rtl"===t)switch(XU()){case"negative":c=-i;break;case"positive-descending":c=l-o-i}c=Math.max(0,Math.min(c,l-o));var u=Math.max(0,Math.min(a,s-n));return{isScrolling:!0,horizontalScrollDirection:e.scrollLeft<i?"forward":"backward",scrollLeft:c,scrollTop:u,verticalScrollDirection:e.scrollTop<a?"forward":"backward",scrollUpdateWasRequested:!1}}),r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&VU(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=GU(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},(function(){r._getItemStyleCache(-1)}))},r}pl(t,e),t.getDerivedStateFromProps=function(e,t){return QU(e,t),y(e),null};var _=t.prototype;return _.scrollTo=function(e){var t=e.scrollLeft,n=e.scrollTop;void 0!==t&&(t=Math.max(0,t)),void 0!==n&&(n=Math.max(0,n)),this.setState((function(e){return void 0===t&&(t=e.scrollLeft),void 0===n&&(n=e.scrollTop),e.scrollLeft===t&&e.scrollTop===n?null:{horizontalScrollDirection:e.scrollLeft<t?"forward":"backward",scrollLeft:t,scrollTop:n,scrollUpdateWasRequested:!0,verticalScrollDirection:e.scrollTop<n?"forward":"backward"}}),this._resetIsScrollingDebounced)},_.scrollToItem=function(e){var t=e.align,n=void 0===t?"auto":t,r=e.columnIndex,o=e.rowIndex,i=this.props,a=i.columnCount,d=i.height,p=i.rowCount,h=i.width,f=this.state,m=f.scrollLeft,g=f.scrollTop,y=YU();void 0!==r&&(r=Math.max(0,Math.min(r,a-1))),void 0!==o&&(o=Math.max(0,Math.min(o,p-1)));var _=s(this.props,this._instanceProps),b=l(this.props,this._instanceProps)>h?y:0,x=_>d?y:0;this.scrollTo({scrollLeft:void 0!==r?c(this.props,r,n,m,this._instanceProps,x):m,scrollTop:void 0!==o?u(this.props,o,n,g,this._instanceProps,b):g})},_.componentDidMount=function(){var e=this.props,t=e.initialScrollLeft,n=e.initialScrollTop;if(null!=this._outerRef){var r=this._outerRef;"number"==typeof t&&(r.scrollLeft=t),"number"==typeof n&&(r.scrollTop=n)}this._callPropsCallbacks()},_.componentDidUpdate=function(){var e=this.props.direction,t=this.state,n=t.scrollLeft,r=t.scrollTop;if(t.scrollUpdateWasRequested&&null!=this._outerRef){var o=this._outerRef;if("rtl"===e)switch(XU()){case"negative":o.scrollLeft=-n;break;case"positive-ascending":o.scrollLeft=n;break;default:var i=o.clientWidth,a=o.scrollWidth;o.scrollLeft=a-i-n}else o.scrollLeft=Math.max(0,n);o.scrollTop=Math.max(0,r)}this._callPropsCallbacks()},_.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&VU(this._resetIsScrollingTimeoutId)},_.render=function(){var e=this.props,t=e.children,n=e.className,o=e.columnCount,i=e.direction,a=e.height,c=e.innerRef,u=e.innerElementType,d=e.innerTagName,p=e.itemData,h=e.itemKey,f=void 0===h?JU:h,m=e.outerElementType,g=e.outerTagName,y=e.rowCount,_=e.style,b=e.useIsScrolling,x=e.width,v=this.state.isScrolling,w=this._getHorizontalRangeToRender(),S=w[0],C=w[1],E=this._getVerticalRangeToRender(),k=E[0],M=E[1],R=[];if(o>0&&y)for(var A=k;A<=M;A++)for(var I=S;I<=C;I++)R.push(r(t,{columnIndex:I,data:p,isScrolling:b?v:void 0,key:f({columnIndex:I,data:p,rowIndex:A}),rowIndex:A,style:this._getItemStyle(A,I)}));var P=s(this.props,this._instanceProps),O=l(this.props,this._instanceProps);return r(m||g||"div",{className:n,onScroll:this._onScroll,ref:this._outerRefSetter,style:Sr({position:"relative",height:a,width:x,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:i},_)},r(u||d||"div",{children:R,ref:c,style:{height:P,pointerEvents:v?"none":void 0,width:O}}))},_._callPropsCallbacks=function(){var e=this.props,t=e.columnCount,n=e.onItemsRendered,r=e.onScroll,o=e.rowCount;if("function"==typeof n&&t>0&&o>0){var i=this._getHorizontalRangeToRender(),a=i[0],s=i[1],l=i[2],c=i[3],u=this._getVerticalRangeToRender(),d=u[0],p=u[1],h=u[2],f=u[3];this._callOnItemsRendered(a,s,d,p,l,c,h,f)}if("function"==typeof r){var m=this.state,g=m.horizontalScrollDirection,y=m.scrollLeft,_=m.scrollTop,b=m.scrollUpdateWasRequested,x=m.verticalScrollDirection;this._callOnScroll(y,_,g,x,b)}},_._getHorizontalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanColumnCount,r=e.overscanColumnsCount,a=e.overscanCount,s=e.rowCount,l=this.state,c=l.horizontalScrollDirection,u=l.isScrolling,d=l.scrollLeft,p=n||r||a||1;if(0===t||0===s)return[0,0,0,0];var h=o(this.props,d,this._instanceProps),f=i(this.props,h,d,this._instanceProps),m=u&&"backward"!==c?1:Math.max(1,p),g=u&&"forward"!==c?1:Math.max(1,p);return[Math.max(0,h-m),Math.max(0,Math.min(t-1,f+g)),h,f]},_._getVerticalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanCount,r=e.overscanRowCount,o=e.overscanRowsCount,i=e.rowCount,a=this.state,s=a.isScrolling,l=a.verticalScrollDirection,c=a.scrollTop,u=r||o||n||1;if(0===t||0===i)return[0,0,0,0];var d=h(this.props,c,this._instanceProps),p=f(this.props,d,c,this._instanceProps),m=s&&"backward"!==l?1:Math.max(1,u),g=s&&"forward"!==l?1:Math.max(1,u);return[Math.max(0,d-m),Math.max(0,Math.min(i-1,p+g)),d,p]},t}(x),t.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},t}var QU=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},eY=function(e,t){var n=e.rowCount,r=t.rowMetadataMap,o=t.estimatedRowHeight,i=t.lastMeasuredRowIndex,a=0;if(i>=n&&(i=n-1),i>=0){var s=r[i];a=s.offset+s.size}return a+(n-i-1)*o},tY=function(e,t){var n=e.columnCount,r=t.columnMetadataMap,o=t.estimatedColumnWidth,i=t.lastMeasuredColumnIndex,a=0;if(i>=n&&(i=n-1),i>=0){var s=r[i];a=s.offset+s.size}return a+(n-i-1)*o},nY=function(e,t,n,r){var o,i,a;if("column"===e?(o=r.columnMetadataMap,i=t.columnWidth,a=r.lastMeasuredColumnIndex):(o=r.rowMetadataMap,i=t.rowHeight,a=r.lastMeasuredRowIndex),n>a){var s=0;if(a>=0){var l=o[a];s=l.offset+l.size}for(var c=a+1;c<=n;c++){var u=i(c);o[c]={offset:s,size:u},s+=u}"column"===e?r.lastMeasuredColumnIndex=n:r.lastMeasuredRowIndex=n}return o[n]},rY=function(e,t,n,r){var o,i;return"column"===e?(o=n.columnMetadataMap,i=n.lastMeasuredColumnIndex):(o=n.rowMetadataMap,i=n.lastMeasuredRowIndex),(i>0?o[i].offset:0)>=r?oY(e,t,n,i,0,r):iY(e,t,n,Math.max(0,i),r)},oY=function(e,t,n,r,o,i){for(;o<=r;){var a=o+Math.floor((r-o)/2),s=nY(e,t,a,n).offset;if(s===i)return a;s<i?o=a+1:s>i&&(r=a-1)}return o>0?o-1:0},iY=function(e,t,n,r,o){for(var i="column"===e?t.columnCount:t.rowCount,a=1;r<i&&nY(e,t,r,n).offset<o;)r+=a,a*=2;return oY(e,t,n,Math.min(r,i-1),Math.floor(r/2),o)},aY=function(e,t,n,r,o,i,a){var s="column"===e?t.width:t.height,l=nY(e,t,n,i),c="column"===e?tY(t,i):eY(t,i),u=Math.max(0,Math.min(c-s,l.offset)),d=Math.max(0,l.offset-s+a+l.size);switch("smart"===r&&(r=o>=d-s&&o<=u+s?"auto":"center"),r){case"start":return u;case"end":return d;case"center":return Math.round(d+(u-d)/2);default:return o>=d&&o<=u?o:d>u||o<d?d:u}},sY=ZU({getColumnOffset:function(e,t,n){return nY("column",e,t,n).offset},getColumnStartIndexForOffset:function(e,t,n){return rY("column",e,n,t)},getColumnStopIndexForStartIndex:function(e,t,n,r){for(var o=e.columnCount,i=e.width,a=nY("column",e,t,r),s=n+i,l=a.offset+a.size,c=t;c<o-1&&l<s;)c++,l+=nY("column",e,c,r).size;return c},getColumnWidth:function(e,t,n){return n.columnMetadataMap[t].size},getEstimatedTotalHeight:eY,getEstimatedTotalWidth:tY,getOffsetForColumnAndAlignment:function(e,t,n,r,o,i){return aY("column",e,t,n,r,o,i)},getOffsetForRowAndAlignment:function(e,t,n,r,o,i){return aY("row",e,t,n,r,o,i)},getRowOffset:function(e,t,n){return nY("row",e,t,n).offset},getRowHeight:function(e,t,n){return n.rowMetadataMap[t].size},getRowStartIndexForOffset:function(e,t,n){return rY("row",e,n,t)},getRowStopIndexForStartIndex:function(e,t,n,r){for(var o=e.rowCount,i=e.height,a=nY("row",e,t,r),s=n+i,l=a.offset+a.size,c=t;c<o-1&&l<s;)c++,l+=nY("row",e,c,r).size;return c},initInstanceProps:function(e,t){var n=e,r={columnMetadataMap:{},estimatedColumnWidth:n.estimatedColumnWidth||50,estimatedRowHeight:n.estimatedRowHeight||50,lastMeasuredColumnIndex:-1,lastMeasuredRowIndex:-1,rowMetadataMap:{}};return t.resetAfterColumnIndex=function(e,n){void 0===n&&(n=!0),t.resetAfterIndices({columnIndex:e,shouldForceUpdate:n})},t.resetAfterRowIndex=function(e,n){void 0===n&&(n=!0),t.resetAfterIndices({rowIndex:e,shouldForceUpdate:n})},t.resetAfterIndices=function(e){var n=e.columnIndex,o=e.rowIndex,i=e.shouldForceUpdate,a=void 0===i||i;"number"==typeof n&&(r.lastMeasuredColumnIndex=Math.min(r.lastMeasuredColumnIndex,n-1)),"number"==typeof o&&(r.lastMeasuredRowIndex=Math.min(r.lastMeasuredRowIndex,o-1)),t._getItemStyleCache(-1),a&&t.forceUpdate()},r},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.columnWidth,e.rowHeight}}),lY=function(e,t){return e};function cY(e){var t,n=e.getItemOffset,o=e.getEstimatedTotalSize,i=e.getItemSize,a=e.getOffsetForIndexAndAlignment,s=e.getStartIndexForOffset,l=e.getStopIndexForStartIndex,c=e.initInstanceProps,u=e.shouldResetStyleCacheOnItemSizeChange,d=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=c(r.props,wl(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:wl(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=$U((function(e,t,n,o){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:o})})),r._callOnScroll=void 0,r._callOnScroll=$U((function(e,t,n){return r.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n})})),r._getItemStyle=void 0,r._getItemStyle=function(e){var t,o=r.props,a=o.direction,s=o.itemSize,l=o.layout,c=r._getItemStyleCache(u&&s,u&&l,u&&a);if(c.hasOwnProperty(e))t=c[e];else{var d=n(r.props,e,r._instanceProps),p=i(r.props,e,r._instanceProps),h="horizontal"===a||"horizontal"===l,f="rtl"===a,m=h?d:0;c[e]=t={position:"absolute",left:f?void 0:m,right:f?m:void 0,top:h?0:d,height:h?"100%":p,width:h?p:"100%"}}return t},r._getItemStyleCache=void 0,r._getItemStyleCache=$U((function(e,t,n){return{}})),r._onScrollHorizontal=function(e){var t=e.currentTarget,n=t.clientWidth,o=t.scrollLeft,i=t.scrollWidth;r.setState((function(e){if(e.scrollOffset===o)return null;var t=r.props.direction,a=o;if("rtl"===t)switch(XU()){case"negative":a=-o;break;case"positive-descending":a=i-n-o}return a=Math.max(0,Math.min(a,i-n)),{isScrolling:!0,scrollDirection:e.scrollOffset<a?"forward":"backward",scrollOffset:a,scrollUpdateWasRequested:!1}}),r._resetIsScrollingDebounced)},r._onScrollVertical=function(e){var t=e.currentTarget,n=t.clientHeight,o=t.scrollHeight,i=t.scrollTop;r.setState((function(e){if(e.scrollOffset===i)return null;var t=Math.max(0,Math.min(i,o-n));return{isScrolling:!0,scrollDirection:e.scrollOffset<t?"forward":"backward",scrollOffset:t,scrollUpdateWasRequested:!1}}),r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&VU(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=GU(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},(function(){r._getItemStyleCache(-1,null)}))},r}pl(t,e),t.getDerivedStateFromProps=function(e,t){return uY(e,t),d(e),null};var p=t.prototype;return p.scrollTo=function(e){e=Math.max(0,e),this.setState((function(t){return t.scrollOffset===e?null:{scrollDirection:t.scrollOffset<e?"forward":"backward",scrollOffset:e,scrollUpdateWasRequested:!0}}),this._resetIsScrollingDebounced)},p.scrollToItem=function(e,t){void 0===t&&(t="auto");var n=this.props,r=n.itemCount,o=n.layout,i=this.state.scrollOffset;e=Math.max(0,Math.min(e,r-1));var s=0;if(this._outerRef){var l=this._outerRef;s="vertical"===o?l.scrollWidth>l.clientWidth?YU():0:l.scrollHeight>l.clientHeight?YU():0}this.scrollTo(a(this.props,e,t,i,this._instanceProps,s))},p.componentDidMount=function(){var e=this.props,t=e.direction,n=e.initialScrollOffset,r=e.layout;if("number"==typeof n&&null!=this._outerRef){var o=this._outerRef;"horizontal"===t||"horizontal"===r?o.scrollLeft=n:o.scrollTop=n}this._callPropsCallbacks()},p.componentDidUpdate=function(){var e=this.props,t=e.direction,n=e.layout,r=this.state,o=r.scrollOffset;if(r.scrollUpdateWasRequested&&null!=this._outerRef){var i=this._outerRef;if("horizontal"===t||"horizontal"===n)if("rtl"===t)switch(XU()){case"negative":i.scrollLeft=-o;break;case"positive-ascending":i.scrollLeft=o;break;default:var a=i.clientWidth,s=i.scrollWidth;i.scrollLeft=s-a-o}else i.scrollLeft=o;else i.scrollTop=o}this._callPropsCallbacks()},p.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&VU(this._resetIsScrollingTimeoutId)},p.render=function(){var e=this.props,t=e.children,n=e.className,i=e.direction,a=e.height,s=e.innerRef,l=e.innerElementType,c=e.innerTagName,u=e.itemCount,d=e.itemData,p=e.itemKey,h=void 0===p?lY:p,f=e.layout,m=e.outerElementType,g=e.outerTagName,y=e.style,_=e.useIsScrolling,b=e.width,x=this.state.isScrolling,v="horizontal"===i||"horizontal"===f,w=v?this._onScrollHorizontal:this._onScrollVertical,S=this._getRangeToRender(),C=S[0],E=S[1],k=[];if(u>0)for(var M=C;M<=E;M++)k.push(r(t,{data:d,key:h(M,d),index:M,isScrolling:_?x:void 0,style:this._getItemStyle(M)}));var R=o(this.props,this._instanceProps);return r(m||g||"div",{className:n,onScroll:w,ref:this._outerRefSetter,style:Sr({position:"relative",height:a,width:b,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:i},y)},r(l||c||"div",{children:k,ref:s,style:{height:v?"100%":R,pointerEvents:x?"none":void 0,width:v?R:"100%"}}))},p._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],n=e[1],r=e[2],o=e[3];this._callOnItemsRendered(t,n,r,o)}if("function"==typeof this.props.onScroll){var i=this.state,a=i.scrollDirection,s=i.scrollOffset,l=i.scrollUpdateWasRequested;this._callOnScroll(a,s,l)}},p._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,o=r.isScrolling,i=r.scrollDirection,a=r.scrollOffset;if(0===t)return[0,0,0,0];var c=s(this.props,a,this._instanceProps),u=l(this.props,c,a,this._instanceProps),d=o&&"backward"!==i?1:Math.max(1,n),p=o&&"forward"!==i?1:Math.max(1,n);return[Math.max(0,c-d),Math.max(0,Math.min(t-1,u+p)),c,u]},t}(x),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var uY=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},dY=function(e,t,n){var r=e.itemSize,o=n.itemMetadataMap,i=n.lastMeasuredIndex;if(t>i){var a=0;if(i>=0){var s=o[i];a=s.offset+s.size}for(var l=i+1;l<=t;l++){var c=r(l);o[l]={offset:a,size:c},a+=c}n.lastMeasuredIndex=t}return o[t]},pY=function(e,t,n,r,o){for(;r<=n;){var i=r+Math.floor((n-r)/2),a=dY(e,i,t).offset;if(a===o)return i;a<o?r=i+1:a>o&&(n=i-1)}return r>0?r-1:0},hY=function(e,t,n,r){for(var o=e.itemCount,i=1;n<o&&dY(e,n,t).offset<r;)n+=i,i*=2;return pY(e,t,Math.min(n,o-1),Math.floor(n/2),r)},fY=function(e,t){var n=e.itemCount,r=t.itemMetadataMap,o=t.estimatedItemSize,i=t.lastMeasuredIndex,a=0;if(i>=n&&(i=n-1),i>=0){var s=r[i];a=s.offset+s.size}return a+(n-i-1)*o},mY=cY({getItemOffset:function(e,t,n){return dY(e,t,n).offset},getItemSize:function(e,t,n){return n.itemMetadataMap[t].size},getEstimatedTotalSize:fY,getOffsetForIndexAndAlignment:function(e,t,n,r,o,i){var a=e.direction,s=e.height,l=e.layout,c=e.width,u="horizontal"===a||"horizontal"===l?c:s,d=dY(e,t,o),p=fY(e,o),h=Math.max(0,Math.min(p-u,d.offset)),f=Math.max(0,d.offset-u+d.size+i);switch("smart"===n&&(n=r>=f-u&&r<=h+u?"auto":"center"),n){case"start":return h;case"end":return f;case"center":return Math.round(f+(h-f)/2);default:return r>=f&&r<=h?r:r<f?f:h}},getStartIndexForOffset:function(e,t,n){return function(e,t,n){var r=t.itemMetadataMap,o=t.lastMeasuredIndex;return(o>0?r[o].offset:0)>=n?pY(e,t,o,0,n):hY(e,t,Math.max(0,o),n)}(e,n,t)},getStopIndexForStartIndex:function(e,t,n,r){for(var o=e.direction,i=e.height,a=e.itemCount,s=e.layout,l=e.width,c="horizontal"===o||"horizontal"===s?l:i,u=dY(e,t,r),d=n+c,p=u.offset+u.size,h=t;h<a-1&&p<d;)h++,p+=dY(e,h,r).size;return h},initInstanceProps:function(e,t){var n={itemMetadataMap:{},estimatedItemSize:e.estimatedItemSize||50,lastMeasuredIndex:-1};return t.resetAfterIndex=function(e,r){void 0===r&&(r=!0),n.lastMeasuredIndex=Math.min(n.lastMeasuredIndex,e-1),t._getItemStyleCache(-1),r&&t.forceUpdate()},n},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.itemSize}});function gY(e,t){for(var n in e)if(!(n in t))return!0;for(var r in t)if(e[r]!==t[r])return!0;return!1}var yY=["style"],_Y=["style"];function bY(e,t){var n=e.style,r=Cr(e,yY),o=t.style,i=Cr(t,_Y);return!gY(n,o)&&!gY(r,i)}const xY=10,vY=(e,t)=>e.current===aW.Backward?t:0,wY=(e,t,n,r)=>{for(let o=n;o<n+r;o++){const n=e.at(o);if(void 0===n||void 0===n.at(t))return!0}return!1},SY=(e,t)=>e.qLeft+e.qWidth===t.qLeft&&e.qTop===t.qTop&&e.qHeight===t.qHeight,CY=({pageInfo:e,measureData:t,pageTop:n,qHeight:r,startLeft:o,endLeft:i})=>{const a=[],s=e.page*e.rowsPerPage;for(let e=o;e<i;e++)if(wY(t,e,n,r)){const t=a[a.length-1],o={qLeft:e,qTop:n+s,qWidth:1,qHeight:r};void 0!==t&&SY(t,o)?t.qWidth+=o.qWidth:a.push(o)}return a},EY=({pageInfo:e,measureData:t,scrollDirection:n,viewService:r,minBufferStartLeft:o,minBufferEndLeft:i,columnEndIndex:a})=>{const{gridRowStartIndex:s,gridHeight:l}=r,c=n.current===aW.Backward?Math.max(0,o-25):i,u=Math.min(c+25,a);return CY({pageInfo:e,measureData:t,startLeft:c,endLeft:u,pageTop:s,qHeight:l})},kY=({pageInfo:e,measureData:t,scrollDirection:n,layoutService:r,viewService:o})=>{const{startLeft:i,endLeft:a,pageTop:s,qHeight:l}=((e,t,n)=>{const{gridColumnStartIndex:r,gridRowStartIndex:o,gridWidth:i,gridHeight:a}=t,s=e.size.x,l=vY(n,xY),c=Math.max(r-l,0);return{startLeft:c,endLeft:c+Math.min(i+xY,s-c),pageTop:o,qHeight:a}})(r,o,n),c=CY({pageInfo:e,measureData:t,startLeft:i,endLeft:a,pageTop:s,qHeight:l});return c.length>0?[...c,...EY({pageInfo:e,measureData:t,scrollDirection:n,viewService:o,minBufferStartLeft:i,minBufferEndLeft:a,columnEndIndex:r.size.x})]:c},MY=(e,t,n,r)=>{const o=e[n];if(void 0===o)return!0;for(let e=t;e<t+r;e++){if(void 0===o[e])return!0}return!1},RY=(e,t)=>e.qTop+e.qHeight===t.qTop&&e.qLeft===t.qLeft&&e.qWidth===t.qWidth,AY=({startTop:e,endTop:t,qLeft:n,qWidth:r,measureData:o,pageInfo:i})=>{const a=[],s=i.page*i.rowsPerPage;for(let i=e;i<t;i++)if(MY(o,n,i,r)){const e=a.at(-1),t={qLeft:n,qTop:i+s,qWidth:r,qHeight:1};void 0!==e&&RY(e,t)?e.qHeight+=t.qHeight:a.push(t)}return a},IY=({pageInfo:e,measureData:t,scrollDirection:n,viewService:r})=>{const{startTop:o,endTop:i,qLeft:a,qWidth:s}=((e,t,n)=>{const{gridColumnStartIndex:r,gridRowStartIndex:o,gridWidth:i,gridHeight:a}=t,s=vY(n,xY),l=Math.max(o-s,0);return{startTop:l,endTop:l+Math.min(a+xY,e.rowsOnCurrentPage-l),qLeft:r,qWidth:i}})(e,r,n),l=AY({startTop:o,endTop:i,qLeft:a,qWidth:s,measureData:t,pageInfo:e});if(l.length>0){const r=n.current===aW.Backward?Math.max(0,o-25):i,c=Math.min(r+25,e.rowsOnCurrentPage),u=AY({startTop:r,endTop:c,qLeft:a,qWidth:s,measureData:t,pageInfo:e});return[...l,...u]}return l},PY=async(e,t,n,r,o,i,a,s)=>{const{gridColumnStartIndex:l,gridRowStartIndex:c,gridWidth:u,gridHeight:d}=o;let p=[],h=[];i.current!==aW.None&&(p=IY({pageInfo:r,measureData:n,scrollDirection:i,viewService:o})),a.current!==aW.None&&(h=kY({pageInfo:r,measureData:n,scrollDirection:a,layoutService:t,viewService:o})),i.current===aW.None&&a.current===aW.None&&(p=AY({measureData:n,pageInfo:r,qLeft:l,qWidth:u,startTop:c,endTop:c+d}));const f=e.fetchPages([...p,...h]);s.isDownloadedAsPDForImage&&s.waitForPromise(f)},OY=function(e){var t,n,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50,i=0;return function(){t=this;for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];n=s;var c=Date.now()-i,u=function(){i=Date.now(),r=0,e.apply(t,n)};r||(c>=o?u():r=setTimeout(u,o-c))}}(PY,100),LY=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return function(){for(var r=this,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];clearTimeout(t),t=setTimeout((function(){return e.apply(r,i)}),n)}}(PY,75),DY=(e,t,n=!1)=>void 0!==e&&(e.isLeafNode||n&&e.isLeftColumn?e.mainAxisPageCoord===t:e.mainAxisPageCoord+e.leafCount-1===t),TY=({style:e,index:t,isLastRow:n,isLastColumn:r,showLastBorder:o,isLeftColumn:i,showTotalCellDivider:a})=>{const{direction:s}=gV(),{styleService:{grid:{border:l,divider:c}}}=wV();return Uo.jsx("div",{style:{...e,...p$,...g$(n,r,l,s,o),..._$({bottomDivider:a&&i,rightDivider:a&&!i,borderColor:c})},"data-testid":"empty-cell","data-index":t})},zY=({children:e,verticalAlign:t,width:n,right:r,isLeftColumn:o})=>{const{layoutService:{isIndentModeEnabled:i}}=wV(),a=o&&i;return Uo.jsx("div",{"data-key":"sticky-cell-container",style:{display:"flex",flexDirection:"row",width:n,maxWidth:"100%",maxHeight:"100%",position:"sticky",left:4,top:0,bottom:0,right:r,...!a&&{alignItems:t,alignSelf:t,overflow:"hidden"}},children:e})},jY=e=>{const{type:t,imageSize:n}=e;return t!==XF.Image||"fill"!==n&&"fitWidth"!==n?"fit-content":"100%"},NY=e=>"number"==typeof e&&!Number.isNaN(+e),qY=e=>"string"==typeof e&&e.length>0||"number"==typeof e?+e:NaN,FY=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M9 7V2H7v5H2v2h5v5h2V9h5V7z"})}))),WY=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M8 0c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8"})}))),BY=_(((e,t)=>Uo.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:[Uo.jsx("path",{d:"M3 9v6.5a.5.5 0 1 1-1 0V.5a.5.5 0 0 1 1 0V1q2.441.639 3.667.639c1.225 0 1.774-.995 3.87-1.196q1.972-.19 3.297.47A.3.3 0 0 1 14 1.18v7.344a.3.3 0 0 1-.417.277q-1.338-.565-3.045-.416c-1.98.172-2.083 1.107-3.871 1.253Q4.879 9.785 3 9"}),Uo.jsx("use",{fillRule:"evenodd"})]}))),$Y=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M13.9 7.4c-1 1.3-.6 1.5-1.5 4.1-.5 1.8-1.2 2.9-1.7 3.6q-.45.6-.9.9H4.2c-1 0-1.6-.5-1.9-1-.2-.3-.3-.6-.3-1V4.2c0-.4.3-.7.7-.7s.7.3.7.7v3.6l.9-.1V1.6c0-.4.3-.7.7-.7s.7.3.7.7v5.1l1.1-.2V.7C6.7.3 7 0 7.4 0s.7.3.7.7v5.9l1.1.1V1.6c0-.4.3-.7.7-.7s.7.3.7.7v7.7s.1 0 .1-.2l.6-1.4c1.1-2.1 3.1-1.1 2.6-.3"})}))),HY=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M5 13h6v1.5c0 .3-.2.5-.5.5H10v.5c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5V15h-.5c-.3 0-.5-.2-.5-.5zm0-1c0-2-3-3-3-7 0-3 3-5 6-5s6 2 6 5c0 4-3 4-3 7H5m-.5-7c.3 0 .5-.2.5-.5s.2-.7.5-1 .6-.5 1-.5c.3 0 .5-.2.5-.5S6.8 2 6.5 2c-.6 0-1.2.3-1.7.8S4 3.9 4 4.5c0 .3.2.5.5.5"})}))),VY=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M8 0c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8m4.5 9c.25 0 .5-.3.5-.6v-.8c0-.3-.25-.6-.5-.6h-9c-.25 0-.5.3-.5.6v.7c0 .4.25.7.5.7z"})}))),GY=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M2 7h12v2H2z"})}))),UY=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M9 7h7a7.004 7.004 0 0 0-7-7zm1-5.917A6.005 6.005 0 0 1 14.917 6H10zM14 9H7V2a7.002 7.002 0 0 0 0 14 7 7 0 0 0 7-7m-8 1h6.917A6.002 6.002 0 0 1 1 9a6 6 0 0 1 5-5.917z"})}))),YY=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M9 9h3.5c.25 0 .5-.3.5-.6v-.8c0-.3-.25-.6-.5-.6H9V3.5c0-.25-.3-.5-.6-.5h-.7c-.4 0-.7.25-.7.5V7H3.5c-.25 0-.5.3-.5.6v.7c0 .4.25.7.5.7H7v3.5c0 .25.3.5.6.5h.8c.3 0 .6-.25.6-.5zM8 0c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8"})}))),KY=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"m8.418 1.007.042.08 1.788 4.217 4.571.388a.5.5 0 0 1 .348.811l-.063.065-3.472 3.008 1.043 4.47a.5.5 0 0 1-.664.581l-.081-.04L8 12.217l-3.93 2.372a.5.5 0 0 1-.757-.453l.012-.089 1.043-4.47L.896 6.568a.5.5 0 0 1 .196-.86l.089-.016 4.571-.388L7.54 1.086a.5.5 0 0 1 .878-.08Z"})}))),XY=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M13 14H3a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1"})}))),JY=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"m6 10 7-7 2 2-7 7-2 2-5-5 2-2z"})}))),ZY=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M2.4 4h11.2a.2.2 0 0 1 .16.32l-5.6 7.467a.2.2 0 0 1-.32 0L2.24 4.32A.2.2 0 0 1 2.4 4"})}))),QY=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M11 2.4v11.2a.2.2 0 0 1-.32.16l-7.467-5.6a.2.2 0 0 1 0-.32l7.467-5.6a.2.2 0 0 1 .32.16"})}))),eK=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M4 13.6V2.4a.2.2 0 0 1 .32-.16l7.467 5.6a.2.2 0 0 1 0 .32l-7.467 5.6A.2.2 0 0 1 4 13.6"})}))),tK={m:JY,"ï":KY,R:_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M13.6 11H2.4a.2.2 0 0 1-.16-.32l5.6-7.467a.2.2 0 0 1 .32 0l5.6 7.467a.2.2 0 0 1-.16.32"})}))),S:ZY,T:QY,U:eK,P:YY,Q:VY,"è":_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M14.98 15H1.04c-1.002 0-1.303-.7-.802-1.5l6.82-11.9c.5-.8 1.303-.8 1.804 0l6.92 11.9c.501.8.1 1.5-.803 1.5M8.5 5h-1c-.3 0-.5.2-.5.5V9c0 .3.2.5.5.5h1c.3 0 .5-.2.5-.5V5.5c0-.3-.2-.5-.5-.5m-1 6c-.3 0-.5.2-.5.5v1c0 .3.2.5.5.5h1c.3 0 .5-.2.5-.5v-1c0-.3-.2-.5-.5-.5z"})}))),"¢":$Y,"©":BY,"23F4":HY,2013:XY,"&":UY,add:FY,"minus-2":GY,dot:WY},nK=({size:e,iconKey:t,color:n,pvStyle:r})=>{const o=t&&tK[t];return o&&Uo.jsx("div",{"data-testid":"representation-indicator-icon",style:{color:n,height:e,...r},children:Uo.jsx(o,{style:{height:e}})})},rK=(e,t)=>e.max===e.min?.5:(t-e.min)/(e.max-e.min),oK=(e,t,n)=>{const r=e.paletteColors?e.paletteColors[t]:e.localPaletteColors[t];return n.getColorPickerColor(r)},iK=(e,t,n)=>{const r={previousColor:(o=e.localPaletteColors)[(i=t)-(i>0?1:0)],nextColor:o[i+(i<o.length-1?1:0)]};var o,i;const a=((e,t)=>{const n=e.limits&&e.limits.concat().sort(((e,t)=>e.value-t.value));return{lowerLimit:n&&t>0?n[t-1]:{value:0,gradient:!1},upperLimit:n&&n[t]?n[t]:{value:1,gradient:!1}}})(e,t),s=((e,t,n,r,o)=>{const{upperLimit:i,lowerLimit:a}=e,{previousColor:s,nextColor:l}=t,c=r===i.value?1:(r-a.value)/(i.value-a.value);return a.gradient&&i.gradient?r-a.value<i.value-r?{color:s.color,t:.5-c}:{color:l.color,t:c-.5}:a.gradient?{color:s.color,t:1-(.5+c/2)}:i.gradient?{color:l.color,t:c/2}:{color:o.localPaletteColors[n].color,t:r}})(a,r,t,n,e);return s&&IW(e.localPaletteColors[t].color).blend(IW(s.color),s.t)},aK=(e,t,n)=>{const r=((e,t)=>{const{limits:n}=e;return n&&(e.limits=n.sort(((e,t)=>e.value-t.value)),e.limits=n.map((e=>({...e,value:rK(t,e.value)})))),e})({...e},t),o=r.paletteColors||r.localPaletteColors;return o&&(r.localPaletteColors=o.concat().map(((e,t)=>({color:oK(r,t,n)})))),r},sK=(e,t,n,r)=>{const o=aK(e,n,r),{localPaletteColors:i}=o;if(t<=0)return i[0].color;if(t>=1)return i[i.length-1].color;const a=((e,t)=>{let n="",r=0;const{limits:o,localPaletteColors:i}=e;for(let a=0;a<i.length;a++){const i=o&&o[a]?o[a].value:1;if(t>=r&&t<i){n=iK(e,a,t);break}r=i}return n})(o,t);return a},lK=(e,t)=>{const n=(e=>e.map((e=>e.value??e)).sort(((e,t)=>e-t)))(e),r=n.some((e=>!NY(e)));return 0===n.length||r?(e=>{const t=0===e?0:.5*e;return{min:e-t,max:e+t}})(t):1===n.length?((e,t)=>{const n=e[0]-t;if(0===n||!NY(n)){const e=0===t?.5:Math.abs(.5*t);return{min:t-e,max:t+e}}return n>0?{min:t-.5*Math.abs(t),max:e[0]+2*n}:{min:e[0]+2*n,max:t+.5*Math.abs(t)}})(n,t):((e,t)=>{let n=e[e.length-1]-e[0];return n=n>0?n:1,{min:Math.min(t,e[0])-n/2,max:Math.max(t,e[e.length-1])+n/2}})(n,t)},cK=(e,t)=>{const{limits:n}=e.segments;if(!n)return;const r=((e,t)=>{const{min:n,max:r}=lK(e,t),o=Math.abs(t);return{min:n??t-o,max:r??t+o}})(n,t),o=((e,t,n)=>{const{limits:r,paletteColors:o,localPaletteColors:i}=e.segments;if(!r||!NY(t))return 0;let a=n&&NY(n)?Math.min(n,t):0;const s=r.sort(((e,t)=>e.value-t.value)),l=o||i;for(let e=0;e<l.length;e++){if(e===l.length-1||t<s[e].value&&t>=a)return e;a=s[e].value}return 0})(e,t,r.min);return{limitRange:r,limitPaletteColorIndex:o}},uK=e=>"flex-start"===e?"flex-end":"flex-start",dK=(e,t,n,r)=>{const o=e.indicatorConditionalColoring;if(!o)return;const i=cK(o,t),a=((e,t,n,r)=>{const{segments:o}=e;if(!o||!n)return;const{limits:i}=o;if(!i?.length||!((e,t)=>!(!e||0===e.length||!(e[t]?.gradient??e[t-1]?.gradient)))(i,n.limitPaletteColorIndex))return oK(o,n.limitPaletteColorIndex,r);const a=rK(n.limitRange,t);return sK(o,a,n.limitRange,r)})(o,t,i,r),s=o.segments.paletteColors[i?.limitPaletteColorIndex||0].icon,{indicator:l}=e;let c=l?.position||"right";return"rtl"===n&&(c="right"===c?"left":"right"),{color:a,iconKey:s,position:c}},pK=({representation:e,cellValue:t,textStyle:n})=>{const{styleService:r}=wV(),{theme:o}=bV(),{direction:i}=gV(),{text:a,indicator:s}=e,{showTextValues:l,applySegmentColors:c}=s??{},u=dK(e,t,i,o),{fontSize:d,fontFamily:p,fontStyle:h,fontWeight:f,textDecoration:m}=r.measureValues,g={fontSize:d,fontFamily:p,fontStyle:h,fontWeight:f,textDecoration:m},y=parseInt(d||r$,10),{iconKey:_,color:b,position:x}=u||{},v={display:"flex",paddingTop:2};return l?Uo.jsxs("div",{"data-key":"representation-indicator",style:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"4px",overflow:n?.overflow,color:c?b:n?.color},children:["left"===x&&nK({size:y,iconKey:_,color:b,pvStyle:v}),Uo.jsx("span",{style:{paddingTop:4,overflow:n?.overflow,textOverflow:n?.textOverflow,whiteSpace:"nowrap",direction:t<0?"ltr":void 0,...g},children:a}),"right"===x&&nK({size:y,iconKey:_,color:b,pvStyle:v})]}):(v.paddingTop=5,nK({size:y,iconKey:_,color:b,pvStyle:v}))},hK=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M8 15c-3.848 0-7-3.152-7-7s3.152-7 7-7 7 3.152 7 7-3.152 7-7 7m0 1c4.4 0 8-3.6 8-8s-3.6-8-8-8-8 3.6-8 8 3.6 8 8 8m4-7.5H4v-1h8z"})}))),fK=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M8 15c-3.848 0-7-3.152-7-7s3.152-7 7-7 7 3.152 7 7-3.152 7-7 7m0 1c4.4 0 8-3.6 8-8s-3.6-8-8-8-8 3.6-8 8 3.6 8 8 8m4-7.5H4v-1h8zM8.5 4v8h-1V4z"})}))),mK=e=>!!e.target?.getAttribute("class")?.includes(fN),gK=(e,t)=>{switch(t.type){case"clearSelections":return{engineSelectedCells:null,activeSelection:null,selectedField:null};case"mouseup":return{...e,activeSelection:null,engineSelectedCells:t.payload.engineSelectedCells};case"mousedown":return{...e,activeSelection:t.payload.activeSelection,selectedField:t.payload.selectedField};case"mouseover":{if(!e.activeSelection)return e;const{index:n}=t.payload,r=Math.min(n,e.activeSelection.startIndex),o=Math.max(n,e.activeSelection.endIndex);if(r===e.activeSelection.startIndex&&o===e.activeSelection.endIndex)return e;const i={...e.activeSelection,startIndex:r,endIndex:o};return i.clientSelectedCells=(e=>{const{getCellFromIndex:t,startIndex:n,endIndex:r,clientSelectedCells:o}=e,i=new Map(o);for(let e=n;e<=r;e++){const n=t(e);"N"===n?.ref.qType&&i.set(n.ref.qElemNo,n)}return i})(i),{...e,activeSelection:i}}default:return e}},yK=e=>null!==e.target?.closest("[data-prevent-selection]"),_K=e=>"A"===e.target?.tagName,bK=({startIndex:e,getCellFromIndex:t,cell:n})=>({type:"mousedown",payload:{activeSelection:{startIndex:e,endIndex:e,getCellFromIndex:t,clientSelectedCells:(new Map).set(n.ref.qElemNo,n)},selectedField:{selectionCellType:n.selectionCellType,index:"L"===n.selectionCellType?n.x:n.y}}});const xK=l({createMouseDownHandler:()=>()=>{},createMouseOverHandler:()=>()=>{},createPointerUpHandler:()=>()=>{},isSelected:()=>!1,isActive:!1,isLocked:()=>!1}),vK=()=>n(xK),wK=({children:e,selections:t})=>{const n=function(e){const{updatePageInfo:t}=gV(),n=e.isActive(),[r,o]=c(gK,{engineSelectedCells:null,selectedField:null,activeSelection:null});u((()=>{const n=()=>{o({type:"clearSelections"})},r=()=>{n(),t({page:0})};return e.on("deactivated",n),e.on("canceled",n),e.on("confirmed",r),e.on("cleared",n),()=>{e.removeListener("deactivated",n),e.removeListener("canceled",n),e.removeListener("confirmed",r),e.removeListener("cleared",n)}}),[e,t]);const i=p((async()=>{if(!r.activeSelection)return;var t,n;1===r.activeSelection.clientSelectedCells.size&&(t=r.engineSelectedCells,(n=r.activeSelection).clientSelectedCells.forEach(((e,r)=>{t?.has(r)&&(n.clientSelectedCells.delete(r),t.delete(r))})));const i=new Map([...r.engineSelectedCells??new Map,...r.activeSelection.clientSelectedCells]);try{o({type:"mouseup",payload:{engineSelectedCells:i}}),await e.select({method:"selectPivotCells",params:[EV,Array.from(i,(([,e])=>({qType:e.selectionCellType,qRow:e.y,qCol:e.x})))]})}catch(e){console.error(e),o({type:"mouseup",payload:{engineSelectedCells:r.engineSelectedCells}})}}),[r,e]);u((()=>{if(r.activeSelection)return document.addEventListener("mouseup",i),()=>{document.removeEventListener("mouseup",i)}}),[i,r.activeSelection]);const a=p(((e,t)=>n=>{const r=t(e);mK(n)||yK(n)||_K(n)||!(e=>1===e.buttons)(n)||!r||o(bK({startIndex:e,getCellFromIndex:t,cell:r}))}),[]),s=p((t=>async()=>{r.activeSelection&&(e.isActive()||await e.begin([EV]),o({type:"mouseover",payload:{index:t}}))}),[r.activeSelection,e]),l=p(((e,t)=>n=>{if("touch"!==n.pointerType)return;const r=t(e);mK(n)||yK(n)||_K(n)||!r||(o(bK({startIndex:e,getCellFromIndex:t,cell:r})),i())}),[i]),d=p((e=>!(!r.engineSelectedCells?.size&&!r.activeSelection?.clientSelectedCells.size||!r.selectedField||e.selectionCellType===r.selectedField.selectionCellType&&("L"===e.selectionCellType?r.selectedField.index===e.x:r.selectedField.index===e.y))),[r.activeSelection?.clientSelectedCells.size,r.engineSelectedCells?.size,r.selectedField]),h=p((e=>!d(e)&&(r.engineSelectedCells?.has(e.ref.qElemNo)||!!r.activeSelection?.clientSelectedCells.has(e.ref.qElemNo))),[d,r.activeSelection?.clientSelectedCells,r.engineSelectedCells]);return f((()=>({isSelected:h,isActive:n,isLocked:d,createMouseDownHandler:a,createMouseOverHandler:s,createPointerUpHandler:l})),[h,n,d,a,s,l])}(t);return Uo.jsx(xK.Provider,{value:n,children:e})},SK=e=>"fill"===e.representation.imageSize,CK=(e,t)=>{let n=e.isLeftColumn?"flex-start":"center";return e.isLeftColumn&&SK(e)&&t&&(n="center"),e.representation.type!==XF.Image||SK(e)?n:e.representation.resolvedImagePosition?.vertical};var EK=function(e){return e.Background="background",e.Color="color",e.FontWeight="fontWeight",e.FontStyle="fontStyle",e.TextDecoration="textDecoration",e}(EK||{});const kK={brighter:.5,darker:.3,opacity:.03},MK=(e,{cell:t,styleService:n})=>{if(e===EK.Background||e===EK.Color){const n=t.expressionColor[e];if(n)return n}return t.isNull?n.nullValues[e]:t.isPseudoDimension?n.measureLabels[e]:t.isTotal?n.totalValues[e]:n.dimensionValues[e]},RK=({styleService:e,isCellSelected:t,cell:n,isCellLocked:r})=>{if(t)return e.selectedColors.background;const o=MK(EK.Background,{cell:n,styleService:e});return!r||!o||n.isPseudoDimension||n.isEmpty||n.isNull||n.isTotal?MK(EK.Background,{cell:n,styleService:e}):`repeating-linear-gradient(\n -45deg,\n ${GB(i=o,kK)} 0px 2px,\n ${i} 0px 4px\n ) border-box`;var i},AK=({cell:e,styleService:t,isCellSelected:n})=>n?t.selectedColors.color:MK(EK.Color,{cell:e,styleService:t}),IK=({cell:e,styleService:t})=>{const{qCanCollapse:n,qCanExpand:r}=e.ref,o=MK(EK.FontWeight,{cell:e,styleService:t});return void 0===o&&(r||n)?i$:o},PK=({cell:e,styleService:t})=>MK(EK.FontStyle,{cell:e,styleService:t}),OK=({cell:e,styleService:t})=>MK(EK.TextDecoration,{cell:e,styleService:t}),LK=e=>e?"pointer":"default",DK=({expandOrCollapse:e,cell:t})=>n=>{e?.(t.y,t.x),n.stopPropagation()},TK=(e,t)=>{if(!e.isLeftColumn||e.representation.type===XF.Image)return{padding:4};return{padding:4,marginTop:t.dimensionValueTextHeight/2-6.5-4}},zK=({cell:e,isLeftColumn:t,isCellSelected:n})=>{const{styleService:r,layoutService:o}=wV(),{interactions:i}=bV(),{isActive:a}=vK(),{dataModel:s}=sU();if(!e.ref.qCanExpand&&!e.ref.qCanCollapse)return null;const l=!i.active||a||!s,c=AK({cell:e,styleService:r,isCellSelected:n}),u=a?.4:1,d=e.ref.qCanExpand?fK:hK;let p;p=e.ref.qCanExpand?t?s.expandLeft:s.expandTop:t?s.collapseLeft:s.collapseTop;const h=hU({isLeftColumn:t,layoutService:o,representation:e.representation});return Uo.jsx(d,{opacity:u,color:c,"data-prevent-selection":!l||void 0,"data-testid":e.ref.qCanExpand?"expand-icon":"collapse-icon",height:13,style:{flexShrink:0,cursor:l?"default":"pointer",position:"sticky",top:0,...TK(e,r),...h&&{alignSelf:CK(e)}},onClick:l?void 0:DK({cell:e,expandOrCollapse:p})})},jK=e=>{switch(e){case"fitHeight":case"fill":case"alwaysFit":return"100%";case"originalSize":return"fit-content";default:return"auto"}},NK=(e,t,n)=>{if("alwaysFit"===e&&t&&!n)return"fit-content";switch(e){case"fitHeight":return"auto";case"originalSize":return"fit-content";case"alwaysFit":return n?"unset":"100%";default:return"100%"}},qK=(e,t)=>{if("alwaysFit"===e)switch(t?.vertical){case"flex-start":return"center top";case"flex-end":return"center bottom";default:return"center center"}},FK=({representation:e,canExpandOrCollapse:t,leafCount:n,isLeftColumn:r,styleService:o,layoutService:i,isMeasureCell:a})=>{const{isIndentModeEnabled:s}=i,l=hU({isLeftColumn:r,layoutService:i,representation:e}),c=t?21:0,u=e.imageBox?.width??24;let d=`calc(100% - ${c}px)`,p=o.headerCellHeight;r&&l&&(d=u),(a||r)&&(p=o.contentCellHeight);let h=p;switch(r&&void 0!==n&&!s&&(h=p*Math.max(n,1)),e.imageSize){case"originalSize":return{maxWidth:d,maxHeight:h,...l?{width:d}:{}};case"fitWidth":return{width:d,maxHeight:h};case"fitHeight":return{height:h,maxWidth:d,...l?{width:d}:{}};case"fill":return{height:h,width:d};default:return{width:d,height:p}}},WK=e=>{if("alwaysFit"===e)return"contain"},BK=({suffix:e,delimeter:t})=>` ${e?t:""} ${e}`.trim(),$K=({imageSize:e,resolvedImagePosition:t,isImagesInIndentModeEnabled:n,isMeasureCell:r})=>({width:NK(e,n,r),height:jK(e),objectFit:WK(e),objectPosition:qK(e,t),...n&&"alwaysFit"===e?{"max-width":"100%"}:{}}),HK=({representation:e,textStyle:t,isMeasureCell:n})=>{const{imageRef:r,onLoad:o}=(()=>{const{downloadService:e}=wV(),t=s(null),{promise:n,resolve:r}=f((()=>M$()),[]);return u((()=>(e.isDownloadedAsPDForImage&&(e.waitForPromise(n),t.current?.complete&&r()),()=>{r()})),[t,e,n,r]),{onLoad:p((()=>{r()}),[r]),imageRef:t}})(),{layoutService:{isIndentModeEnabled:i}}=wV(),{url:a,text:l,imageSize:c,resolvedImagePosition:d}=e,{overflow:h,...m}=t;return Uo.jsx("img",{src:a,alt:l,style:{...$K({imageSize:c,resolvedImagePosition:d,isImagesInIndentModeEnabled:i,isMeasureCell:n}),...m},onLoad:o,ref:r})},VK=({representation:e,textStyle:t,canExpandOrCollapse:n,leafCount:r,isLeftColumn:o=!1,imageContainerHorizontalAlignment:i,isMeasureCell:a})=>{const{styleService:s,layoutService:l}=wV(),{resolvedImagePosition:c}=e;return Uo.jsx("div",{"data-key":"image-container--image",style:{display:"flex",flexDirection:"column",justifyContent:c?.vertical,alignItems:i,overflow:"hidden",boxSizing:"border-box",border:"4px solid transparent",...FK({representation:e,canExpandOrCollapse:n,leafCount:r,styleService:s,layoutService:l,isLeftColumn:o,isMeasureCell:a})},children:Uo.jsx(HK,{representation:e,textStyle:t,isMeasureCell:!0})})},GK=(e,t,n)=>{if(e?.auto)return t;switch(e?.align){case"center":return"center";case"left":return"rtl"===n?"flex-end":"flex-start";case"right":return"rtl"===n?"flex-start":"flex-end";default:return t}},UK=(e,t)=>{let{textAlign:n}=t.getDimensionInfo(e.dimensionInfoIndex)??{};return e.isPseudoDimension&&void 0!==e.visibleMeasureInfoIndex&&({labelTextAlign:n}=t.visibleMeasureInfo.at(e.visibleMeasureInfoIndex)??{}),n?.auto||void 0===n?"left":n.align},YK={display:"flex",flexDirection:"row",alignItems:"center"},KK={alignItems:"center",display:"flex",flexDirection:"row",backgroundClip:"padding-box"},XK=(e,t,n,r)=>t?{...KK,...e.nullValues}:n?{...YK,color:e.totalValues.color,background:r??e.totalValues.background}:{...YK,color:e.measureValues.color,background:r??e.measureValues.background},JK=(e,t,n,r,o)=>{const{fontFamily:i,fontSize:a}=e.measureValues,s={...h$,...!n&&f$(e.grid.lineClamp),...t&&{color:t},fontFamily:i,fontSize:a};if(o){const{fontWeight:t,fontStyle:n,textDecoration:r}=e.nullValues;return{...s,fontWeight:t,fontStyle:n,textDecoration:r}}if(r){const{fontWeight:t,fontStyle:n,textDecoration:r}=e.totalValues;return{...s,fontWeight:t,fontStyle:n,textDecoration:r}}const{fontWeight:l,fontStyle:c,textDecoration:u}=e.measureValues;return{...s,fontWeight:void 0===l?i$:l,fontStyle:c,textDecoration:u}},ZK=({cell:e,representation:t,color:n,isTotalValueCell:r,cellHorizontalAlignment:o})=>{const{layoutService:i,styleService:a}=wV(),{isIndentModeEnabled:s}=i,l=e.isNull?i.getNullValueText():t.text,c=t.type===XF.Image,u=t.type===XF.Indicator,d=NY(qY(l)),p=JK(a,n,d,r,e.isNull);if(!s&&c&&!e.isNull||s&&c&&!e.isNull)return Uo.jsx(VK,{isMeasureCell:!0,textStyle:p,representation:t,imageContainerHorizontalAlignment:o});const h=qY(e.isNull?t.text:e.ref.qNum);return u&&NY(h)?Uo.jsx(pK,{representation:t,cellValue:h,textStyle:p}):Uo.jsx("span",{style:{padding:4,direction:d?"ltr":void 0,...p},children:l})},QK=(e,t)=>e?.[t]?.visibleMeasureInfoIndex??0,eX="flex-start",tX=(e,t)=>e.isNull?eX:t.type===XF.Image&&"fill"!==t.imageSize?t.resolvedImagePosition?.vertical:eX,nX=({columnIndex:e,rowIndex:t,style:n,data:r})=>{const{env:o}=bV(),{pageInfo:i,direction:a}=gV(),{styleService:s,layoutService:l}=wV(),{attrExprInfoIndexes:c,gridSectionsData:{measureData:u,leftDimensionData:d,topDimensionData:h},visibleDimensionsInfo:{visibleLeftDimensionInfo:f,visibleTopDimensionInfo:m}}=sU(),g=(()=>{const{layoutService:{isIndentModeEnabled:e}}=wV(),{gridSectionsData:{leftDimensionData:t,topDimensionData:n},visibleDimensionsInfo:{visibleLeftDimensionInfo:r,visibleTopDimensionInfo:o}}=sU(),i=r.length,a=o.length;return p(((r,o)=>!(!n.grid.at(a-1)?.[r]?.isTotal&&!t.grid.at(e?0:i-1)?.[o]?.isTotal)),[n,t,i,a,e])})(),y=(()=>{const{gridSectionsData:{topDimensionData:e},visibleDimensionsInfo:{visibleTopDimensionInfo:t}}=sU(),n=t.length;return p((t=>{const r=e.grid.at(n-1)?.[t];return DY(r,e.totalDividerIndex)}),[e,n])})(),_=(()=>{const{layoutService:{isIndentModeEnabled:e}}=wV(),{gridSectionsData:{leftDimensionData:t},visibleDimensionsInfo:{visibleLeftDimensionInfo:n}}=sU(),r=n.length;return p((n=>{const o=e?0:r-1,i=t.grid.at(o)?.[n];return DY(i,t.totalDividerIndex,e)}),[t,e,r])})(),{showLastBorder:b}=r,x=h.grid.at(m.length-1),v=d.grid.at(f.length-1),{background:w}=s.measureValues,S=u[t]?.[e],C=t===i.rowsOnCurrentPage-1,E=e===l.size.x-1;if(!S)return Uo.jsx(TY,{style:{...n,background:w},isLastRow:C,isLastColumn:E,showLastBorder:b,index:t,isLeftColumn:!1,showTotalCellDivider:!1});const k=l.hasPseudoDimOnLeft?QK(v,t):QK(x,e),M=l.visibleMeasureInfo[k],R=qG({cell:S.ref,representationProperties:M.representation,attrExprInfoIndex:c.measures[k],env:o,direction:a,conditionalColoring:M.conditionalColoring,enabledFeatures:{[XF.Image]:!0,[XF.Indicator]:!0}}),A=!S.isNull&&g(e,t),I=S.isNull?l.getNullValueText():R.text,P=!S.isNull||!Number.isNaN(+I),O=FG(c.measures[k],S.ref),L=((e,t,n,r,o)=>{const{textAlign:i}=t,a=r?"flex-end":"center";return e.isNull||n.type!==XF.Image?GK(i,a,o):n.resolvedImagePosition?.horizontal??"center"})(S,M,R,P,a),D={...XK(s,S.isNull,A,O.background),...g$(C,E,s.grid.border,a,b),..._$({bottomDivider:_(t),rightDivider:y(e),borderColor:s.grid.divider}),...p$,padding:"0px 4px",display:"flex",justifyContent:L};return Uo.jsx("div",{className:dN,title:I,style:{...D,...n},"data-testid":"measure-value","data-row-index":t,"data-col-index":e,children:Uo.jsx(zY,{width:jY(R),verticalAlign:tX(S,R),children:Uo.jsx(ZK,{cell:S,representation:R,isTotalValueCell:A,color:O.color,cellHorizontalAlignment:L})})})};var rX=t.memo(nX,bY);const oX=(e,t)=>t.list[e]?.id??e.toString(),iX=({columnIndex:e,rowIndex:t,data:n})=>n.grid[t]?.[e]?.id??`${t}-${e}`,aX=e=>({...d$,overflow:"hidden",boxSizing:"content-box",borderWidth:"rtl"===e?"1px 1px 0px 0px":"1px 0px 0px 1px"}),sX=({dataGridRef:e,height:t,rowHightCallback:n,width:r,showLastBorder:o,getRightGridColumnWidth:i,verticalScrollDirection:a,horizontalScrollDirection:s})=>{const{pageInfo:l,direction:c}=gV(),{layoutService:u,styleService:{grid:{divider:d},contentCellHeight:f}}=wV(),{dataModel:m,gridSectionsData:{measureData:g}}=sU(),y={...aX(c),borderColor:d,willChange:"auto",userSelect:"none",WebkitUserSelect:"none"},_=(({verticalScrollDirection:e,horizontalScrollDirection:t})=>{const{pageInfo:n}=gV(),{downloadService:r,viewService:o,layoutService:i}=wV(),{dataModel:a,gridSectionsData:{leftDimensionData:s,topDimensionData:l,measureData:c}}=sU(),u=s.columnCount,d=l.rowCount;return p((async({overscanColumnStartIndex:s,overscanColumnStopIndex:l,overscanRowStartIndex:p,overscanRowStopIndex:h})=>{o.gridColumnStartIndex=s,o.gridRowStartIndex=p,o.gridWidth=l-s+1,o.gridHeight=h-p+1;const f=o.gridWidth+u+(t.current===aW.None?0:xY),m=o.gridHeight+d+(e.current===aW.None?0:xY);let g=OY;m*f>1500&&(g=LY),g(a,i,c,n,o,e,t,r)}),[o,i,a,c,e,t,n,u,d,r])})({verticalScrollDirection:a,horizontalScrollDirection:s});return H$((()=>{e.current&&e.current.resetAfterColumnIndex(0,!1)}),[e,m,g]),h((()=>{e.current&&e.current.resetAfterIndices({columnIndex:0,rowIndex:0,shouldForceUpdate:!0})}),[r,t,e,f,c]),0===u.size.x?null:Uo.jsx(sY,{"data-section-id":"DATA_GRID",ref:e,style:y,columnCount:u.size.x,columnWidth:i,height:t,rowCount:l.rowsOnCurrentPage,rowHeight:n,width:r,itemData:{showLastBorder:o,grid:g},onItemsRendered:_,estimatedRowHeight:n(),estimatedColumnWidth:i(),itemKey:iX,direction:c,children:rX})};var lX=y(sX);const cX=_(((e,t)=>Uo.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:[Uo.jsx("path",{d:"M13 7H8zV4.982C13 2.23 10.761 0 8 0S3 2.23 3 4.982V7h.75H3h1.5V5.332C4.5 3.216 5.549 1.5 8 1.5s3.5 1.716 3.5 3.832V7h.75H3a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1H3z"}),Uo.jsx("use",{fillRule:"evenodd"})]}))),uX=e=>{const[t,n]=m(!1);return H$((()=>{n(!1)}),e),{isAdjustingWidth:t,setIsAdjustingWidth:n}},dX=()=>{const[e,t]=m(!1),{dataModel:n}=sU(),{interactions:r}=bV(),{isAdjustingWidth:o,setIsAdjustingWidth:i}=uX([n]);return{open:e,setOpen:t,handleOpenMenu:e=>{!r.active||mK(e)||o||t(!0)},setIsAdjustingWidth:i}};function pX(e,t){const n=t.expressionColor?.background??e.dimensionValues.background,r=t.isLeftColumn?e.header.background:n,o=r===l$.Transparent?yW.WHITE:r,i=xq(e.grid.border),a=xq(o);return a.isInvalid()||i.isInvalid()||1===i.a?e.grid.border:function(e,t,n){return xq(e.r+(t.r-e.r)*n,e.g+(t.g-e.g)*n,e.b+(t.b-e.b)*n,e.a+(t.a-e.a)*n)}(a,i,i.a).getRGB()}const hX=({cellInfo:e,columnWidth:t,isLastColumn:n,overrideLeftGridWidth:r,setIsAdjustingWidth:o,shouldApplyIndentModeColumnWidth:i,tableWidth:a})=>{const{direction:s}=gV(),{interactions:l,translator:c}=bV(),{isActive:u}=vK(),{dataModel:d}=sU(),{styleService:p}=wV(),[,h]=m({});if(!(e.canBeResized&&!!l.active&&!u))return null;const f=pX(p,e);return Uo.jsx(X$,{isPivot:!0,columnWidth:t,isLastColumn:n,keyValue:`adjuster-${e.dimensionInfoIndex}`,hoverColor:f,updateWidthCallback:t=>{h({}),r&&void 0!==e.colIdx&&r(t,e.colIdx)},confirmWidthCallback:t=>{i?d.applyIndentModeColumnWidth({...t,pixels:Math.min((a??0)*dU,t.pixels??0)}):d.applyColumnWidth(t,e)},setIsAdjustingWidth:o,isLeftColumn:e.isLeftColumn,accessibilityRelatedArgs:{translator:c,columnLabel:e.label??""},direction:s})},fX=ID(vT,{shouldForwardProp:e=>!["interactions","hoverBackground","background","shouldShowMenuIcon","isDimension"].includes(e)})((({interactions:e,background:t,hoverBackground:n,shouldShowMenuIcon:r,isDimension:o})=>({pointerEvents:o?"all":"none",position:"relative",display:"grid",gridTemplateColumns:r?"1fr 12px":"1fr",gap:8,alignItems:"center",cursor:e.active?"pointer":"default",background:t,"&&:hover":{background:e.active&&o?n:t}}))),mX=ID("div",{shouldForwardProp:e=>!["direction"].includes(e)})((({direction:e})=>({position:"absolute",left:"rtl"!==e?0:void 0,bottom:0}))),gX=ID("div",{shouldForwardProp:e=>"justifyContent"!==e})((({justifyContent:e})=>({...u$,justifyContent:e??u$.justifyContent,flexDirection:"row",overflow:"hidden",position:"relative",gap:8}))),yX=ID("div")((()=>({...u$}))),_X=ID("div",{shouldForwardProp:e=>!["fontSize","fontFamily","fontWeight","fontStyle","textDecoration","justifyContent"].includes(e)})((({fontSize:e,fontFamily:t,fontWeight:n,fontStyle:r,textDecoration:o,justifyContent:i})=>({display:"flex",justifyContent:i,alignSelf:"center",flexGrow:1,maxWidth:"100%",fontWeight:n,fontSize:e,fontFamily:t,fontStyle:r,textDecoration:o}))),bX=ID(Gz)((({theme:e})=>({".MuiList-root":{padding:e.spacing(.5,0)}}))),xX=ID(Jz,{shouldForwardProp:e=>!["isActive"].includes(e)})((({theme:e,isActive:t})=>({width:220,maxHeight:32,borderRadius:e.spacing(.5),margin:e.spacing(.25,.5),padding:e.spacing(1,1.5),display:"flex",justifyContent:"space-between",position:"relative",overflow:"hidden ",boxSizing:"border-box",background:t?"rgba(0, 0, 0, 0.05)":"transparent","&:hover":{".indent-mode-dropdown-more":{opacity:1}}}))),vX=ID("span")({textOverflow:"ellipsis",overflow:"hidden"}),wX=ID("div",{shouldForwardProp:e=>"visible"!==e})((({visible:e})=>({opacity:e?1:0,width:cU,display:"flex",justifyContent:"center",alignItems:"center",position:"relative"}))),SX=ID("span",{shouldForwardProp:e=>!["padding","alignSelf"].includes(e)})((({padding:e,alignSelf:t})=>({padding:e,alignSelf:t,position:"sticky",top:0})));let CX=function(e){return e.Expand="Expand",e.Collapse="Collapse",e}({});const EX=(e,t)=>({qExcludeList:t===CX.Expand,qPos:{qDimName:e,qElemNo:[]}}),kX=`${EV}/qExpansionState`,MX=({model:e,qExpansionState:t,qEffectiveDimensionName:n,action:r})=>async()=>{const o=(({qEffectiveDimensionName:e,oldExpansionState:t,action:n})=>{const r=t?.findIndex((t=>t.qPos?.qDimName===e));return{expansionData:EX(e,n),index:r}})({qEffectiveDimensionName:n,oldExpansionState:t,action:r});await(async({model:e,newExpansionState:t,errorMsg:n})=>{const{index:r,expansionData:o}=t;try{let t,n=kX,i="Add";void 0===r?t=JSON.stringify([o]):-1===r?(n=`${kX}/-`,t=JSON.stringify(o)):(n=`${kX}/${r}`,i="Replace",t=JSON.stringify(o)),await e.applyPatches([{qPath:n,qOp:i,qValue:t}],!0)}catch(e){console.error(n,e)}})({model:e,newExpansionState:o,errorMsg:`Failed to ${r} dimension`})},RX=({model:e,effectivePropertiesService:t,cell:n})=>{if(void 0===n.qEffectiveDimensionName)return;const r={model:e,qExpansionState:t.qExpansionState,qEffectiveDimensionName:n.qEffectiveDimensionName};return{expandCallback:MX({...r,action:CX.Expand}),collapseCallback:MX({...r,action:CX.Collapse}),alwaysFullyExpanded:t.qAlwaysFullyExpanded}},AX={[TH.Sorting]:!0,[TH.Selections]:!0,[TH.Searching]:!0},IX=({cell:e,style:t,isFirstColumn:n,isLastColumn:r,isLastRow:o,changeSortOrder:i,iconsVisibilityStatus:a,columnWidth:l,overrideLeftGridWidth:c,shouldApplyIndentModeColumnWidth:u,tableWidth:d})=>{const p=s(null),{styleService:h,layoutService:f,effectivePropertiesService:m}=wV(),{app:g,interactions:y,embed:_,translator:b,model:x}=bV(),{fontSize:v,fontFamily:w,fontStyle:S,fontWeight:C,textDecoration:E,color:k,background:M,hoverBackground:R,activeBackground:A}=h.header,I=s(null),{shouldShowLockIcon:P,shouldShowMenuIcon:O}=a,{open:L,setOpen:D,handleOpenMenu:T,setIsAdjustingWidth:z}=dX(),{direction:j}=gV(),N={sortFromMenu:async(t,n)=>{t.stopPropagation(),await i(e,n)}},q={embed:_,listboxRef:p,sortCriteria:f.searchSortFromDimension&&e.isDim?m.getSortCriteriaForDimension(e.dimensionInfoIndex):void 0},F={app:g,qStateName:f.layout.qStateName},{labelTextAlign:W}=f.getDimensionInfo(e.dimensionInfoIndex)??{},B=GK(W,"flex-start",j);return Uo.jsxs(fX,{className:dN,title:e.label,interactions:y,background:L?A:M,hoverBackground:R,shouldShowMenuIcon:O,isDimension:e.isDim,style:{...t,...p$,...y$(e,o,n,r,h.grid.border,j),color:k},"data-testid":"title-cell",onClick:T,children:[Uo.jsxs(gX,{children:[P?Uo.jsx(yX,{children:Uo.jsx(cX,{height:12})}):null,Uo.jsx(_X,{fontFamily:w,fontSize:v,fontStyle:S,fontWeight:C,textDecoration:E,justifyContent:B,children:Uo.jsx("span",{style:h$,children:e.label})})]}),e.isDim?Uo.jsxs(Uo.Fragment,{children:[Uo.jsx(NH,{headerData:e,translator:b,anchorRef:I,open:L,setOpen:D,interactions:y,menuAvailabilityFlags:AX,sortRelatedArgs:N,searchRelatedArgs:q,selectionRelatedArgs:F,expandOrCollapseArgs:RX({model:x,effectivePropertiesService:m,cell:e}),shouldShowMenuIcon:O,model:x&&"setActiveField"in x?x:void 0,direction:j}),Uo.jsx(mX,{ref:p,direction:j}),Uo.jsx(mX,{ref:I,direction:j})]}):null,Uo.jsx(hX,{cellInfo:{...e,isLeftColumn:!0},columnWidth:l,isLastColumn:r,overrideLeftGridWidth:c,setIsAdjustingWidth:z,shouldApplyIndentModeColumnWidth:u,tableWidth:d})]})},PX=({rowSpan:e,columnSpan:t})=>{const{styleService:n}=wV(),{direction:r}=gV();return e>0&&t>0?Uo.jsx("div",{style:{...d$,gridRowStart:1,gridRowEnd:`span ${e}`,gridColumnStart:1,gridColumnEnd:`span ${t}`,borderWidth:"rtl"===r?"0px 0px 0px 1px":"0px 1px 0px 0px",borderColor:n.grid.border,background:n.grid.background},"data-testid":"empty-header-cell"}):null},OX=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"m7.999 9.001-2.858-2.86a.2.2 0 0 0-.282 0l-.718.719a.2.2 0 0 0 0 .282L7 10.001l.859.858a.2.2 0 0 0 .282 0L9 10l2.859-2.859a.2.2 0 0 0 0-.282l-.718-.718a.2.2 0 0 0-.283 0z"})}))),LX=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"m7.999 6.999-2.858 2.86a.2.2 0 0 1-.282 0L4.14 9.14a.2.2 0 0 1 0-.282L7 5.999l.859-.858a.2.2 0 0 1 .282 0L9 6l2.859 2.859a.2.2 0 0 1 0 .282l-.718.718a.2.2 0 0 1-.283 0z"})}))),DX=({tableWidth:e,leftGridWidth:t,overrideLeftGridWidth:n})=>{const{direction:r}=gV(),{styleService:o}=wV(),{interactions:i,translator:a}=bV(),{isActive:s}=vK(),{dataModel:l}=sU(),{setIsAdjustingWidth:c}=uX([l]);if(!(!!i.active&&!s))return null;const u=pX(o,{isLeftColumn:!0});return Uo.jsx(X$,{isPivot:!0,isLastColumn:!0,isLeftColumn:!0,keyValue:"adjuster-indent-row",hoverColor:u,columnWidth:t,updateWidthCallback:t=>{n(Math.min(t,e*dU))},confirmWidthCallback:r=>{if(r.type===gN.FitToContent)return void l.applyIndentModeColumnWidth({type:gN.Auto});const o=Math.min(r.pixels??t,e*dU);n(o),l.applyIndentModeColumnWidth({type:gN.Pixels,pixels:o})},setIsAdjustingWidth:c,accessibilityRelatedArgs:{translator:a,columnLabel:a.get("SNPivotTable.IndentMode.Rows")},direction:r})},TX=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M3 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0m6 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0m5 1a1 1 0 1 0 0-2 1 1 0 0 0 0 2"})}))),zX=({cell:e,changeSortOrder:t})=>{const n=s(null),r=s(null),{app:o,interactions:i,embed:a,translator:l,model:c}=bV(),{layoutService:u,effectivePropertiesService:d}=wV(),{open:p,setOpen:h,handleOpenMenu:f}=dX();return Uo.jsxs(xX,{onClick:f,isActive:p,children:[Uo.jsx(vX,{children:e.label}),Uo.jsxs(wX,{className:"indent-mode-dropdown-more",visible:p,children:[Uo.jsx(TX,{}),e.isDim?Uo.jsxs(Uo.Fragment,{children:[Uo.jsx(NH,{headerData:e,translator:l,anchorRef:n,open:p,setOpen:h,interactions:i,menuAvailabilityFlags:AX,sortRelatedArgs:{sortFromMenu:async(n,r)=>{n.stopPropagation(),await t(e,r)}},searchRelatedArgs:{embed:a,listboxRef:r},selectionRelatedArgs:{app:o,qStateName:u.layout.qStateName},expandOrCollapseArgs:RX({model:c,effectivePropertiesService:d,cell:e}),shouldShowMenuIcon:!1,model:c&&"setActiveField"in c?c:void 0}),Uo.jsx(mX,{ref:r}),Uo.jsx(mX,{ref:n})]}):null]})]})},jX=({idx:e,menu:t,menuItems:n,isOnlyOneRow:r})=>{const o=n.at(-1)?.id===MV,i=e+1<n.length&&n[e+1]?.id===MV;return!(r&&o&&i)&&(t?.id!==MV&&e<n.length-1)},NX=({menuItems:e,changeSortOrder:t,overrideLeftGridWidth:n,leftGridWidth:r,tableWidth:o})=>{const{styleService:i}=wV(),{interactions:a,translator:l}=bV(),{dataModel:c,gridSectionsData:{headersData:u}}=sU(),[d,p]=m(!1),h=s(null),{headerCellHeight:f}=i,{color:g,background:y,hoverBackground:_,activeBackground:b,fontFamily:x,fontSize:v,fontStyle:w,fontWeight:S,textDecoration:C}=i.header,{isAdjustingWidth:E}=uX([c]),k=e=>{e.stopPropagation()},M={height:f,gridColumn:`1 / span ${u.size.x}`,gridRow:u.size.y,zIndex:u.size.x-0};return Uo.jsxs(fX,{isDimension:!0,background:d?b:y,interactions:a,hoverBackground:_,style:{...M,...p$,color:g},onClick:e=>{!a.active||mK(e)||E||p(!d)},"data-testid":"indentModeHeaderCellWrapper",children:[Uo.jsxs(gX,{justifyContent:"flex-start",children:[Uo.jsx(_X,{fontFamily:x,fontSize:v,fontStyle:w,fontWeight:S,textDecoration:C,justifyContent:"flex-start",children:Uo.jsx("span",{style:h$,children:l.get("SNPivotTable.IndentMode.Rows")})}),d?Uo.jsx(LX,{}):Uo.jsx(OX,{}),Uo.jsx(mX,{ref:h})]}),Uo.jsx(bX,{open:d,anchorEl:h.current,disableEnforceFocus:!0,children:e.map(((n,r)=>[n&&n.id!==MV&&Uo.jsx("li",{role:"presentation",onClick:k,onKeyDown:k,children:Uo.jsx(zX,{cell:n,changeSortOrder:t})}),jX({idx:r,menu:n,menuItems:e,isOnlyOneRow:1===u.size.y})&&Uo.jsx(tH,{"data-testid":"group-divider",variant:"middle"})]))}),Uo.jsx(DX,{tableWidth:o,leftGridWidth:r,overrideLeftGridWidth:n})]})},qX=({layoutService:e,headersData:t,topRowIndex:n})=>e.isIndentModeEnabled&&t.size.x>1&&n+1===t.size.y,FX={display:"grid",width:"fit-content"},WX=({tableWidth:e,leftGridWidth:t,columnWidths:n,rowHight:r,changeSortOrder:o,getHeaderCellsIconsVisibilityStatus:i,height:a,overrideLeftGridWidth:s})=>{const{layoutService:l}=wV(),{gridSectionsData:{headersData:c}}=sU();return Uo.jsxs("div",{"data-testid":"HEADER_GRID",style:{...FX,gridTemplateColumns:n.map((e=>`${e}px`)).join(" "),gridTemplateRows:c.data.map((()=>`${r}px`)).join(" "),height:a},children:[c.size.y>1&&Uo.jsx(PX,{columnSpan:c.size.x-1,rowSpan:c.size.y-1}),c.data.map(((a,u)=>{let d=[];if(qX({layoutService:l,headersData:c,topRowIndex:u})){const n=a.at(0);return Array.isArray(n)&&d.push(Uo.jsx(NX,{menuItems:n,changeSortOrder:o,overrideLeftGridWidth:s,leftGridWidth:t,tableWidth:e},n.at(0)?.id)),d}return d=a.reduce(((t,a,d)=>{if(a&&!Array.isArray(a)){const p=i(d,a.isLocked,a.label),h=l.isIndentModeEnabled&&1===c.size.x;t.push(Uo.jsx(IX,{style:{width:n[d],height:r,gridColumn:l.isIndentModeEnabled&&c.size.x>1?2:d+1,gridRow:u+1,zIndex:c.size.x-d},isLastRow:u===c.size.y-1,isFirstColumn:0===d,isLastColumn:d===c.size.x-1,changeSortOrder:o,cell:a,iconsVisibilityStatus:p,columnWidth:n[d],overrideLeftGridWidth:s,shouldApplyIndentModeColumnWidth:h,tableWidth:e},a.id))}return t}),[]),d}))]})};var BX=y(WX);const $X=(e,t,n,r)=>{const{layoutService:o}=wV();h((()=>{e.current?.forEach((e=>e?.resetAfterIndex(0,!0)))}),[e,t,n,r,o])},HX=(e,t)=>{H$((()=>{e.current?.forEach((e=>e?.resetAfterIndex(0,!1)))}),[e,t])},VX=(e,t)=>{const{isLast:n,list:r,listValues:o}=t;return n?r[e]:o[e]},GX=(e,t,n,r,o)=>{if(o)return;const i=e.representation,a=hU({isLeftColumn:n,layoutService:t,representation:i}),s=n?"flex-start":"center",l=e.representation.resolvedImagePosition?.horizontal;if(e.representation.type===XF.Image)return a&&l&&"center"!==l&&"rtl"===r?uK(l):l??s;if(e.isPseudoDimension&&void 0!==e.visibleMeasureInfoIndex){const{labelTextAlign:n}=t.visibleMeasureInfo[e.visibleMeasureInfoIndex]??{};return GK(n,s,r)}const{textAlign:c}=t.getDimensionInfo(e.dimensionInfoIndex)??{};return GK(c,s,r)},UX=()=>{},YX=({children:e,reactWindowStyle:t,cell:n,data:r,showTotalCellDivider:o,isLastRow:i,isLastColumn:a,isLeftColumn:s,isCellSelected:l,isAdjustingWidth:c,index:u})=>{const{styleService:d,layoutService:p}=wV(),{interactions:h}=bV(),{direction:f}=gV(),{isLocked:m,createMouseDownHandler:g,createMouseOverHandler:y,createPointerUpHandler:_}=vK(),{showLastBorder:b}=r,x=m(n)||n.isLockedByDimension,v=!(x||!h.active||!h.select||n.isEmpty||n.isNull||n.isPseudoDimension||n.isTotal||c),w=v?g(u,(e=>VX(e,r))):void 0,S=v?y(u):void 0,C=v?_(u,(e=>VX(e,r))):void 0,E=hU({isLeftColumn:s,layoutService:p,representation:n.representation});return Uo.jsx("div",{className:dN,title:h.passive?n.representation.text:void 0,style:{...t,...g$(i,a,d.grid.border,f,b),..._$({bottomDivider:o&&s,rightDivider:o&&!s,borderColor:d.grid.divider}),...p$,padding:"rtl"===f?"0px 0px 0px 4px":"0px 4px",cursor:LK(v),background:RK({styleService:d,isCellSelected:l,cell:n,isCellLocked:x}),zIndex:s?void 0:p.size.x-n.x,justifyContent:GX(n,p,s,f,E),display:"flex",...p.isIndentModeEnabled&&s&&{["rtl"===f?"paddingRight":"paddingLeft"]:Math.max(4,24*(n.indentLevel??0))},textAlign:UK(n,p)},"aria-hidden":"true",onMouseDown:w,onMouseOver:S,onPointerUp:C,onKeyUp:UX,role:"button",tabIndex:-1,"data-testid":"dimension-cell","data-x":n.x,"data-page-x":n.pageX,"data-y":n.y,"data-page-y":n.pageY,"data-cell-type":n.ref.qType,"data-dimension-info-index":n.dimensionInfoIndex,children:e})},KX=e=>{e.stopPropagation()},XX=({href:e,text:t,interactions:n,color:r})=>({href:e,title:t,rel:"noreferrer",target:"_blank",underline:"hover",onClick:KX,color:yW.LINK,style:{pointerEvents:n.active?"auto":"none",color:r??void 0,opacity:n.active&&n.passive||r?void 0:.4}}),JX=({href:e,text:t,interactions:n,color:r})=>Uo.jsx(sd,{...XX({href:e,text:t,interactions:n,color:r}),children:t});function ZX(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QX(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 eJ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?QX(Object(n),!0).forEach((function(t){ZX(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QX(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var tJ=Object.prototype.hasOwnProperty,nJ=Object.prototype.toString,rJ=Object.defineProperty,oJ=Object.getOwnPropertyDescriptor,iJ=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===nJ.call(e)},aJ=function(e){if(!e||"[object Object]"!==nJ.call(e))return!1;var t,n=tJ.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&tJ.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||tJ.call(e,t)},sJ=function(e,t){rJ&&"__proto__"===t.name?rJ(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},lJ=function(e,t){if("__proto__"===t){if(!tJ.call(e,t))return;if(oJ)return oJ(e,t).value}return e[t]},cJ=function e(){var t,n,r,o,i,a,s=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)r=lJ(s,n),s!==(o=lJ(t,n))&&(u&&o&&(aJ(o)||(i=iJ(o)))?(i?(i=!1,a=r&&iJ(r)?r:[]):a=r&&aJ(r)?r:{},sJ(s,{name:n,newValue:e(u,a,o)})):void 0!==o&&sJ(s,{name:n,newValue:o}));return s};function uJ(e,t,n,r){if(!e)return-1;const o=n.cache,i=e.origin?e.origin():null;i&&(e=i);let a=o.fields.indexOf(e),s=-1,l=-1;if(-1===a)for(let t=0;t<o.wrappedFields.length;t++)if(l=o.wrappedFields[t].attrDims.map((e=>e.instance)).indexOf(e),s=o.wrappedFields[t].attrExps.map((e=>e.instance)).indexOf(e),-1!==l||-1!==s){a=t;break}if(Array.isArray(r)&&r.some(((e,t)=>e!==t))){const e=r.indexOf(a);-1!==e&&(a=e)}return a-=t.qArea.qLeft,a<0||a>=t.qArea.qWidth?-1:l>=0?e=>e[a].qAttrDims.qValues[l]:s>=0?e=>e[a].qAttrExps.qValues[s]:e=>e[a]}function dJ(e,t,n){let{key:r}=n;const o={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return o.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(o.value),e.field&&(o.source={key:r,field:e.field.key()}),o}function pJ(e){let{cache:t,f:n,mainCell:r,p:o,page:i,rowIdx:a,row:s,sourceKey:l,target:c,targetProp:u,columnOrder:d}=e,p=r;if(o.field&&o.field!==n){const e=uJ(o.field,i,{cache:t},d);if(-1===e)return;p=cJ({qRow:a},e(s))}c[u]=dJ(o,p,{key:l})}function hJ(e,t,n,r){const o=Array.isArray(e)?e:[e];let i=[];for(let e=0;e<o.length;e++)if(void 0!==o[e].field){const a=t.raw(),s=t.key(),l="object"==typeof o[e].field?o[e].field:t.field(o[e].field),{props:c,main:u}=r.normalizeConfig(o[e],t),d=Object.keys(c),p=!!o[e].trackBy,h=typeof o[e].trackBy,f={},m=[],g=[];for(let t=0;t<a.qDataPages.length;t++){const i=uJ(l,a.qDataPages[t],{cache:n},a.qColumnOrder);if(-1!==i)for(let y=0;y<a.qDataPages[t].qMatrix.length;y++){const _=a.qDataPages[t].qArea.qTop+y,b=cJ({qRow:_},i(a.qDataPages[t].qMatrix[y])),x=dJ(u,b,{key:s});if(!(u.filter&&!u.filter(b))){for(let e=0;e<d.length;e++){const r=c[d[e]];let o=r.fields||[r];r.fields&&(x[d[e]]=[]);for(let i=0;i<o.length;i++)pJ({cache:n,f:l,mainCell:b,p:o[i],prop:d[e],page:a.qDataPages[t],rowIdx:_,row:a.qDataPages[t].qMatrix[y],sourceKey:s,target:r.fields?x[d[e]]:x,targetProp:r.fields?i:d[e],columnOrder:a.qColumnOrder});if(r.fields){const t=x[d[e]].map((e=>e.value)),n=x[d[e]].map((e=>e.label));x[d[e]]={value:"function"==typeof r.value?r.value(t):void 0!==r.value?r.value:t,label:"function"==typeof r.label?r.label(n):void 0!==r.label?String(r.label):String(x[d[e]].value)}}}p&&r.track({cfg:o[e],itemData:b,obj:x,target:m,tracker:f,trackType:h}),g.push(x)}}}const y=p?r.collect(m,{main:u,propsArr:d,props:c}):g;i=[...i,...y]}return i}function fJ(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 mJ(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=yJ)):void 0===t&&(t=gJ);for(var n,r,o,i,a,s=new xJ(e),l=[s];n=l.pop();)if((o=t(n.data))&&(a=(o=Array.from(o)).length))for(n.children=o,i=a-1;i>=0;--i)l.push(r=o[i]=new xJ(o[i])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(bJ)}function gJ(e){return e.children}function yJ(e){return Array.isArray(e)?e[1]:null}function _J(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function bJ(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function xJ(e){this.data=e,this.depth=this.height=0,this.parent=null}function vJ(e){return null==e?null:function(e){if("function"!=typeof e)throw new Error;return e}(e)}xJ.prototype=mJ.prototype={constructor:xJ,count:function(){return this.eachAfter(fJ)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,o,i=this,a=[i],s=[],l=-1;i=a.pop();)if(s.push(i),n=i.children)for(r=0,o=n.length;r<o;++r)a.push(n[r]);for(;i=s.pop();)e.call(t,i,++l,this);return this},eachBefore:function(e,t){for(var n,r,o=this,i=[o],a=-1;o=i.pop();)if(e.call(t,o,++a,this),n=o.children)for(r=n.length-1;r>=0;--r)i.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,o=r&&r.length;--o>=0;)n+=r[o].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(),o=null;e=n.pop(),t=r.pop();for(;e===t;)o=e,e=n.pop(),t=r.pop();return o}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var o=r.length;e!==n;)r.splice(o,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return mJ(this).eachBefore(_J)},[Symbol.iterator]:function*(){var e,t,n,r,o=this,i=[o];do{for(e=i.reverse(),i=[];o=e.pop();)if(yield o,t=o.children)for(n=0,r=t.length;n<r;++n)i.push(t[n])}while(i.length)}};var wJ={depth:-1},SJ={},CJ={};function EJ(e){return e.id}function kJ(e){return e.parentId}function MJ(){var e,t=EJ,n=kJ;function r(r){var o,i,a,s,l,c,u,d,p=Array.from(r),h=t,f=n,m=new Map;if(null!=e){const t=p.map(((t,n)=>function(e){e=`${e}`;let t=e.length;AJ(e,t-1)&&!AJ(e,t-2)&&(e=e.slice(0,-1));return"/"===e[0]?e:`/${e}`}(e(t,n,r)))),n=t.map(RJ),o=new Set(t).add("");for(const e of n)o.has(e)||(o.add(e),t.push(e),n.push(RJ(e)),p.push(CJ));h=(e,n)=>t[n],f=(e,t)=>n[t]}for(a=0,o=p.length;a<o;++a)i=p[a],c=p[a]=new xJ(i),null!=(u=h(i,a,r))&&(u+="")&&(d=c.id=u,m.set(d,m.has(d)?SJ:c)),null!=(u=f(i,a,r))&&(u+="")&&(c.parent=u);for(a=0;a<o;++a)if(u=(c=p[a]).parent){if(!(l=m.get(u)))throw new Error("missing: "+u);if(l===SJ)throw new Error("ambiguous: "+u);l.children?l.children.push(c):l.children=[c],c.parent=l}else{if(s)throw new Error("multiple roots");s=c}if(!s)throw new Error("no root");if(null!=e){for(;s.data===CJ&&1===s.children.length;)s=s.children[0],--o;for(let e=p.length-1;e>=0&&(c=p[e]).data===CJ;--e)c.data=null}if(s.parent=wJ,s.eachBefore((function(e){e.depth=e.parent.depth+1,--o})).eachBefore(bJ),s.parent=null,o>0)throw new Error("cycle");return s}return r.id=function(e){return arguments.length?(t=vJ(e),r):t},r.parentId=function(e){return arguments.length?(n=vJ(e),r):n},r.path=function(t){return arguments.length?(e=vJ(t),r):e},r}function RJ(e){let t=e.length;if(t<2)return"";for(;--t>1&&!AJ(e,t););return e.slice(0,t)}function AJ(e,t){if("/"===e[t]){let n=0;for(;t>0&&"\\"===e[--t];)++n;if(!(1&n))return!0}return!1}function IJ(e,t){"/"===e.charAt(0)&&(e=e.substring(1));const n=e.split("/");let r,o=t;for(let e=0;e<n.length;e++){if("*"===n[e]&&Array.isArray(o)){const t=[];r=n.slice(e+1).join("/");for(let e=0;e<o.length;e++){let n=IJ(r,o[e]);Array.isArray(n)?t.push(...n):t.push(n)}return t}if(!n[e]&&Array.isArray(o)){const t=new Array(o.length);r=n.slice(e+1).join("/");for(let e=0;e<o.length;e++)t[e]=IJ(r,o[e]);return t}n[e]in o&&(o=o[n[e]])}return o}function PJ(e,t,n){let r=[];if(!e||!e.length)return r;if(t<=0){const t=n>=0?[e[n]]:e;r=[...r,...t]}else for(let o=0;o<e.length;o++)e[o].children&&e[o].children.length&&(r=[...r,...PJ(e[o].children,t-1,n)]);return r}function OJ(e,t,n){if(e===t)return e=>e;if(e>t){const n=Math.max(0,Math.min(100,e-t));return e=>{let t=e;for(let e=0;e<n;++e)t=t.parent;return t}}if(t>e){const r=Math.max(0,Math.min(100,t-e));return e=>PJ(e.children,r-1,n)}return!1}const LJ=/^qDimensionInfo(?:\/(\d+))?/,DJ=/^\/?qMeasureInfo\/(\d+)/,TJ=/\/qAttrExprInfo\/(\d+)/,zJ=/\/qAttrDimInfo\/(\d+)/;function jJ(e){return(e.qColumnOrder&&e.qColumnOrder.length?e.qColumnOrder:e.qDimensionInfo.map(((e,t)=>t))).filter((t=>t<e.qDimensionInfo.length))}function NJ(e,t){let{cube:n}=t;if(!e)return-1;let r=e.origin&&e.origin()?e.origin().key():e.key(),o=!1,i=-1,a=-1,s=-1,l=-1,c=-1,u=-1,d=r;const p=n.qEffectiveInterColumnSortOrder,h=jJ(n);return LJ.test(d)&&(o=!0,i=+LJ.exec(d)[1],d=r.replace(LJ,"")),DJ.test(d)&&("K"===n.qMode?c=+DJ.exec(d)[1]:p&&-1!==p.indexOf(-1)?(c=+DJ.exec(d)[1],u=0):u=+DJ.exec(d)[1],d=d.replace(DJ,"")),d&&(zJ.exec(d)?s=+zJ.exec(d)[1]:TJ.exec(d)&&(a=+TJ.exec(d)[1])),l=o?"S"===n.qMode?h[i]:p?p.indexOf(i):i:p&&-1!==p.indexOf(-1)?p.indexOf(-1):n.qDimensionInfo.length-("K"===n.qMode?0:1),{fieldDepth:l+1,pseudoMeasureIndex:c,measureIdx:u,attrDimIdx:s,attrIdx:a}}function qJ(e,t){let n,r,o=OJ(e.fieldDepth,t.fieldDepth,t.pseudoMeasureIndex);return n=t.measureIdx>=0?e=>e.data.qValues[t.measureIdx]:e=>e.data,t.attrDimIdx>=0?r=e=>{var n;return null==e||null===(n=e.qAttrDims)||void 0===n?void 0:n.qValues[t.attrDimIdx]}:t.attrIdx>=0&&(r=e=>{var n;return null==e||null===(n=e.qAttrExps)||void 0===n?void 0:n.qValues[t.attrIdx]}),{nodeFn:o,attrFn:r,valueFn:n}}function FJ(e,t,n){let{key:r}=n;const o={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return o.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(o.value),e.field&&(o.source={key:r,field:e.field.key()}),o}function WJ(e){let{propsArr:t,props:n,item:r,itemData:o,ret:i,sourceKey:a}=e;for(let e=0;e<t.length;e++){const s=n[t[e]],l=s.fields||[s];let c,u;s.fields&&(c=[],u=[]);for(let n=0;n<l.length;n++){const d=l[n];let p,h,f,m,g,y;if("primitive"===d.type?(f=d.value,y=String(d.value)):("function"==typeof d.value&&(p=e=>d.value(e,r)),"function"==typeof d.label&&(h=e=>d.label(e,r)),d.accessor?(m=d.accessor(r),Array.isArray(m)?(g=m.map(d.valueAccessor),d.attrAccessor&&(g=g.map(d.attrAccessor)),p&&(f=g.map(p),p=null),h&&(y=g.map(h),h=null),f=d.reduce?d.reduce(f):f,y=d.reduceLabel?d.reduceLabel(y,f):String(f)):(f=d.attrAccessor?d.attrAccessor(d.valueAccessor(m)):d.valueAccessor(m),y=f)):(f=o,y=o)),s.fields){const e=p?p(f):f;c.push(e),u.push(h&&null!=y?h(y):null!=y?y:String(e))}else{const n=p?p(f):f;i[t[e]]={value:n,label:h?h(y):null!=y?y:String(n)},d.field&&(i[t[e]].source={field:d.field.key(),key:a})}}c&&(i[t[e]]={value:"function"==typeof s.value?s.value(c,r):c,label:"function"==typeof s.label?s.label(u,r):u})}}const BJ=(e,t,n)=>{const r="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",o="K"===e.qMode?"qSubNodes":"qNodes",i=IJ(r,e);return i&&i[0]?(t.tree=mJ(i[0],n.children||(e=>e[o])),t.tree):null};const $J=e=>{let{propsArr:t,props:n,cube:r,cache:o,itemDepthObject:i,f:a}=e;for(let e=0;e<t.length;e++){const o=n[t[e]],s=o.fields?o.fields:[o];for(let e=0;e<s.length;e++){const t=s[e];if(t.field!==a){const e=qJ(i,NJ(t.field,{cube:r}));t.accessor=e.nodeFn,t.valueAccessor=e.valueFn,t.attrAccessor=e.attrFn}}}};function HJ(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;const o=t.raw(),i=t.key(),a="S"===o.qMode?function(e){const t=e.raw().qDataPages.length?e.raw().qDataPages[0].qMatrix:[],n=function(e){const t=e.raw().qColumnOrder,n=e.fields();return t&&t.length===n.length?t:n.map(((e,t)=>t))}(e),r=e.fields(),o=e.fields().filter((e=>"dimension"===e.type())).map((e=>n.indexOf(r.indexOf(e)))),i=e.fields().filter((e=>"measure"===e.type())).map((e=>n.indexOf(r.indexOf(e)))),a={__root:{__id:"__root",qValues:[]}};for(let e=0;e<t.length;e++){const n=t[e];let r="__root",l=!1;for(let e=0;e<o.length;e++){var s;const t=n[o[e]],i="".concat(r,"__").concat(null!==(s=t.qElemNumber)&&void 0!==s?s:t.qElemNo);a[i]||(a[i]=eJ({__id:i,__parent:r,qValues:[]},t),l=!0),r=i}if(l)for(let e=0;e<i.length;e++){const t=n[i[e]];a[r].qValues.push(t)}}const l=Object.keys(a).map((e=>a[e])),c=MJ().id((e=>e.__id)).parentId((e=>e.__parent))(l);return c}(t):BJ(o,n,e);if(!a)return null;const s=a.height,l=[];for(let i=0;i<=s;i++){let a=null;if(i>0)if("S"===o.qMode){let e=jJ(o)[i-1];a=n.fields[e]}else{let e=o.qEffectiveInterColumnSortOrder[i-1];i>o.qEffectiveInterColumnSortOrder.length&&(e=o.qDimensionInfo.length),a=n.fields[e]}const{props:s,main:c}=r.normalizeConfig(eJ(eJ({},e),{},{field:a?a.key():void 0}),t),u=Object.keys(s);l[i]={propsArr:u,props:s,main:c};const d=a?NJ(a,{cube:o}):{fieldDepth:0};$J({propsArr:u,props:s,cube:o,cache:n,itemDepthObject:d,f:a})}const c=a.copy().descendants(),u=a.descendants();for(let e=0;e<u.length;e++){const t=l[u[e].depth].propsArr,n=l[u[e].depth].props,r=l[u[e].depth].main,o=c[e],a=o.data,s=FJ(r,a,{key:i});WJ({propsArr:t,props:n,item:o,itemData:a,ret:s,sourceKey:i}),u[e].data=s}return a}function VJ(e,t,n,r){const o=Array.isArray(e)?e:[e];let i=[];for(let a=0;a<o.length;a++)if(void 0!==o[a].field){const s=t.raw(),l=t.key();if(!BJ(s,n,e))continue;const c="object"==typeof o[a].field?o[a].field:t.field(o[a].field),{props:u,main:d}=r.normalizeConfig(o[a],t),p=Object.keys(u),h=NJ(c,{cube:s}),{nodeFn:f,attrFn:m,valueFn:g}=qJ({fieldDepth:0},h);$J({propsArr:p,props:u,cube:s,cache:n,itemDepthObject:h,f:c});const y=!!o[a].trackBy,_=typeof o[a].trackBy,b={},x=[],v=f(n.tree),w=[];for(let e=0;e<v.length;e++){const t=v[e],n=m?m(g(t)):g(t);if(d.filter&&!d.filter(n))continue;const i=FJ(d,n,{key:l});WJ({propsArr:p,props:u,item:t,itemData:n,ret:i,sourceKey:l}),y&&r.track({cfg:o[a],itemData:n,obj:i,target:x,tracker:b,trackType:_}),w.push(i)}const S=y?r.collect(x,{main:d,propsArr:p,props:u}):w;i=[...i,...S]}return i}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var GJ=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){
|
|
182
|
+
e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,o,i,a,s,l,c,u,d,p=e.length,h=e.search(/[0-9\-\+#]/),f=h>0?e.substring(0,h):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),y=p-g,_=e.substring(y,y+1),b=y+("."===_||","===_?1:0),x=g>0?e.substring(b,p):"";if(n=(t="-"===(e=e.substring(h,b)).charAt(0)?-t:+t)<0?t=-t:0,o=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",i=r&&r[1]&&r[0]||",",e=e.split(o),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(c=t.split("."))[1]||c[1]&&c[1].length<=s)&&(t=(+t).toFixed(s+1)),u=e[0].split(i),e[0]=u.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;c[0].length<e[0].length-a;)c[0]="0"+c[0];else 0==+c[0]&&(c[0]="");if((t=t.split("."))[0]=c[0],l=u[1]&&u[u.length-1].length){for(m="",y=(d=t[0]).length%l,p=d.length,b=0;b<p;b++)m+=d.charAt(b),!((b-y+1)%l)&&b<p-l&&(m+=i);t[0]=m}return t[1]=e[1]&&t[1]?o+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),f+(n?"-":"")+r+x}},LB({exports:{}});const HB=(e,t=yW.TEXT,n=yW.WHITE)=>{const r=IW(e),o=IW(t),i=IW(n);return r.isInvalid()?t:function(e,t,n){const r=PW(e,t),o=PW(e,n);if(void 0!==r&&void 0!==o)return r>o?t:n}(r,i,o).getRGB()},VB=e=>{const t=e.getStyle("","","dataColors.selected")||yW.SELECTED,n=function(e,t){const n=IW("#FFFFFF"),r=IW(e),o=IW(t);if(r.isInvalid()||o.isInvalid()||r.getAlpha()<1||o.getAlpha()<1)return t;const i=PW(n,r),a=PW(o,r),s=i>a||i>4.5;return!s&&a>3?o.getHex():s?"#FFFFFF":"#000000"}(t,yW.TEXT);return{background:t,color:n}},GB=(e,t)=>{const n=IW(e);return 0===n.a?(n.setAlpha(t.opacity),n.getString()):n.isDark()?n.getBrightenedColor(t.brighter).getString():n.getDarkenedColor(t.darker).getString()},UB=e=>{const t=IW(e);return t.isInvalid()?null:1===t.a?t.getRGB():t.getRGBA()},YB=e=>{e.stopPropagation(),e.preventDefault()},KB=(e,t,n,r)=>({ref:e,translation:t,dualOutput:!0,type:"object",component:"color-picker",width:"auto",disableNone:r??!1,defaultValue(e,t,o){const i=r?.(e,t,o)??!1,a=o.theme.current(),s=n(a,i);return{color:"transparent"===s?"none":s}}}),XB=(e,t=!1)=>{return{value:e,label:t?(n=e,n.charAt(0).toUpperCase()+n.slice(1)):e,groupHeader:!1,disabled:!1,styles:t?{fontFamily:e}:void 0};var n},JB=({ref:e,themeAccessor:t,translator:n,flags:r})=>({component:"dropdown",ref:e,options:(e,o,i)=>{const a=i.theme.current();return((e,t,n,r)=>{const o=t.fontFamily??"Source Sans Pro, sans-serif",i=t.fontFamilies??[],a=Array.from(new Set([e,o,...i])),s=[{value:"ThemeHeader",label:n.get("properties.themeFonts"),metaText:n.get("properties.theme"),groupHeader:!0},...a.sort().map((e=>XB(e,!0)))],l=[{value:"DefaultHeader",label:n.get("properties.allFonts"),metaText:n.get("properties.default"),groupHeader:!0},...zW(r).filter((e=>!a.includes(e))).map((e=>XB(e,!0)))];return[...s,...l.length>1?l:[]]})(t(a),a,n,r)},defaultValue:(e,n,r)=>t(r.theme.current())}),ZB=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],QB=({ref:e,themeAccessor:t,translator:n})=>({component:"dropdown",ref:e,options:(e,r,o)=>{const i=o.theme.current();return((e,t,n)=>{const r=t.fontSize,o=t.fontSizes??[],i=Array.from(new Set([e,r,...o])),a=[{value:"ThemeHeader",label:n.get("properties.themeFontSizes"),metaText:n.get("properties.theme"),groupHeader:!0},...i.sort(((e,t)=>parseInt(e,10)-parseInt(t,10))).map((e=>XB(e,!1)))],s=[{value:"DefaultHeader",label:n.get("properties.allFontSizes"),metaText:n.get("properties.default"),groupHeader:!0},...ZB.filter((e=>!i.includes(e))).map((e=>XB(e,!1)))];return[...a,...s.length>1?s:[]]})(t(i),i,n)},defaultValue:(e,n,r)=>t(r.theme.current())}),e$=({section:e,defaultFontStyle:t,translator:n,flags:r,getThemeValue:o,translation:i,disableNoneCallback:a})=>({component:"panel-section",translation:i??`properties.pivot.${e}`,items:{content:{component:"items",ref:"components",key:"theme",items:{fontFamily:JB({ref:`${e}.fontFamily`,themeAccessor:t=>o(t,e,"fontFamily")??t.fontFamily,translator:n,flags:r}),fontWrapperItem:{component:"inline-wrapper",items:{fontStyle:{component:"font-style-buttons",width:!1,ref:`${e}.fontStyle`,defaultValue:t??[]},fontSize:QB({ref:`${e}.fontSize`,themeAccessor:t=>o(t,e,"fontSize")??t.fontSize,translator:n}),fontColor:KB(`${e}.fontColor`,void 0,(t=>o(t,e,"color")??t.color))}},background:KB(`${e}.background`,"properties.background",((t,n)=>{const r=n?yW.WHITE:yW.TRANSPARENT;return o(t,e,"backgroundColor")??r}),a)}}}}),t$=({section:e,defaultFontStyle:t,fallbackBackground:n,getThemeValue:r})=>({component:"panel-section",translation:`properties.pivot.${e}`,items:{content:{component:"items",ref:"components",key:"theme",items:{fontWrapperItem:{component:"inline-wrapper",items:{fontStyle:{component:"font-style-buttons",fullWidth:!0,ref:`${e}.fontStyle`,defaultValue:t??[]},fontColor:KB(`${e}.fontColor`,void 0,(t=>r(t,e,"color")??t.color))}},background:KB(`${e}.background`,"properties.background",(t=>r(t,e,"backgroundColor")??n??"transparent"))}}}}),n$=(e,t)=>({component:"dropdown",ref:e,translation:t,options:[...Array(10).keys()].map((e=>({value:e+1,translation:e+1}))),defaultValue:1}),r$="12px",o$="Source Sans Pro, sans-serif",i$="600",a$=15e3,s$=4/3;let l$=function(e){return e.Transparent="transparent",e.FontSecondary="#737373",e.DividerDark="#595959",e.DividerLight="#D9D9D9",e.NullValueBackground="#F2F2F2",e}({}),c$=function(e){return e.Solid="solid",e.None="none",e}({});const u$={display:"flex",justifyContent:"center",alignItems:"center"},d$={borderStyle:"solid"},p$={boxSizing:"border-box",padding:"4px 8px",userSelect:"none",WebkitUserSelect:"none"},h$={lineHeight:s$,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},f$=e=>({whiteSpace:"unset",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",wordBreak:e>1?"break-word":"break-all"}),m$=(e,t)=>e>0?`${e}px ${c$.Solid} ${t}`:c$.None,g$=(e,t,n,r,o)=>{const i=Number(!t||o?.right),a=Number(!e||o?.bottom);return{borderRight:"rtl"!==r?m$(i,n):c$.None,borderBottom:m$(a,n),borderLeft:"rtl"===r?m$(i,n):c$.None,borderTop:c$.None}},y$=(e,t,n,r,o,i,a)=>{const s=g$(t,r,o,i,a);return e.isLeftDimension||(e.isLastDimension&&!t&&(s.borderBottom=m$(2,o)),n||(s.borderLeft="rtl"!==i?m$(1,o):"none",s.borderRight="rtl"===i?m$(1,o):"none")),s},_$=({bottomDivider:e,rightDivider:t,borderColor:n})=>{const r={};return e&&(r.borderBottom=m$(1,n)),t&&(r.borderRight=m$(1,n)),r},b$=(e,t,n)=>{switch(t){case"header":return e.object?.pivotTableV2?.dimension?.label?.name?.[n];case"dimensionValues":return e.object?.pivotTableV2?.dimension?.label?.value?.[n];case"measureLabels":return e.object?.pivotTableV2?.measure?.label?.name?.[n];case"measureValues":return e.object?.pivotTableV2?.measure?.label?.value?.[n];case"totalValues":return e.object?.pivotTableV2?.total?.label?.value?.[n];case"nullValues":return e.object?.pivotTableV2?.null?.label?.value?.[n];default:return}},x$=(e,t)=>({type:"items",items:[{component:"styling-panel",chartTitle:"Object.PivotTable",subtitle:"LayerStyleEditor.component.styling",translation:"LayerStyleEditor.component.styling",ref:"components",useGeneral:!0,useBackground:!0,defaultValue:[],items:{headerSection:e$({section:"header",defaultFontStyle:["bold"],translator:e,flags:t,getThemeValue:b$}),dimensionValueSection:e$({section:"dimensionValues",translator:e,flags:t,getThemeValue:b$}),measureValueSection:e$({section:"measureValues",translator:e,flags:t,getThemeValue:b$}),measureLabelSection:t$({section:"measureLabels",getThemeValue:b$}),totalValuesSection:t$({section:"totalValues",defaultFontStyle:["bold"],getThemeValue:b$}),nullValuesSection:t$({section:"nullValues",fallbackBackground:l$.NullValueBackground,getThemeValue:b$}),gridSection:{translation:"properties.pivot.grid",component:"panel-section",items:{gridItems:{component:"items",ref:"components",key:"theme",items:{lineClamp:n$("grid.lineClamp","ThemeStyleEditor.style.rowHeight"),columnLineClamp:n$("grid.columnLineClamp","ThemeStyleEditor.style.columnHeight"),border:KB("grid.border","properties.border",(e=>e.object?.pivotTableV2?.grid?.borderColor??l$.DividerLight)),divider:KB("grid.divider","properties.pivot.divider",(e=>e.object?.pivotTableV2?.grid?.divider?.borderColor??l$.DividerDark)),background:KB("grid.background","properties.background",(e=>e.object?.pivotTableV2?.grid?.backgroundColor??l$.Transparent))}}}}}}]}),v$=e=>{if(e.isEnabled("CLIENT_IM_5973_PIVOT_TABLE_EXPLORATION"))return{chartExploration:{type:"items",translation:"properties.chartExploration",items:{chartExplorationToggler:{type:"items",component:"chart-exploration-toggler",translation:"properties.enableChartExploration",ref:"enableChartExploration"},visibilityToggler:{show:e=>e.enableChartExploration,component:"buttongroup",translation:"properties.ChartExploration.VisibilityOption",ref:"chartExploration.menuVisibility",options:[{value:"auto",translation:"Common.Auto"},{value:"minimized",translation:"properties.ChartExploration.Minimized"}]}},show:e=>!e.insideContainer}}},w$=(e,t)=>({uses:"settings",items:{presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:[x$(e,t),{type:"items",items:{nullValueText:{ref:"nullValueRepresentation.text",type:"string",translation:"properties.pivot.nullValueText",defaultValue:"-"},alwaysFullyExpanded:{ref:"qHyperCubeDef.qAlwaysFullyExpanded",type:"boolean",translation:"properties.pivot.fullyExpanded",defaultValue:!1},indentMode:{ref:"qHyperCubeDef.qIndentMode",type:"boolean",translation:"properties.pivot.indentMode",defaultValue:!1,change(e){e.qHyperCubeDef.qShowTotalsAbove=!0}},type:{type:"string",component:"dropdown",ref:"qHyperCubeDef.indentModeColumnWidth.type",translation:"Object.Table.Column.Width",options:[{value:gN.Auto,translation:"Common.Auto"},{value:gN.Pixels,translation:"Object.Table.Column.Pixels"},{value:gN.Percentage,translation:"Object.Table.Column.Percentage"}],defaultValue:gN.Auto,show:e=>!!e.qHyperCubeDef.qIndentMode},sizePixels:{ref:"qHyperCubeDef.indentModeColumnWidth.pixels",translation:"Object.Table.Column.Pixels",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:mN.PixelsDefault,show:e=>{const t=e.qHyperCubeDef;return t.qIndentMode&&t.indentModeColumnWidth?.type===gN.Pixels}},sizePercentage:{ref:"qHyperCubeDef.indentModeColumnWidth.percentage",translation:"Object.Table.Column.Percentage",component:"expression",expressionType:"ValueExpression",expression:"optional",defaultValue:mN.PercentageDefault,show:e=>{const t=e.qHyperCubeDef;return t.qIndentMode&&t.indentModeColumnWidth?.type===gN.Percentage}},showTotalsAbove:{ref:"qHyperCubeDef.qShowTotalsAbove",type:"boolean",translation:"properties.pivot.showTotalsAbove",defaultValue:!0,show(e){const{qIndentMode:t}=e.qHyperCubeDef;return!t&&!!e.qHyperCubeDef.qDimensions.some((e=>"TOTAL_EXPR"===e.qOtherTotalSpec?.qTotalMode))}},resetProperties:{type:"object",component:"button",translation:"properties.pivot.resetExpansionButton",disabled:e=>!!e.qHyperCubeDef.qAlwaysFullyExpanded,action(e,t,n,r){e.qHyperCubeDef.qExpansionState=[],r.$emit("saveProperties",e)}}}}]},...v$(t)}}),S$="auto",C$={type:"items",translation:"properties.sorting",items:{sortbyY:{type:"items",items:{sortbyYToggle:{ref:"qHyperCubeDef.qSortbyYValue",type:"boolean",component:"switch",translation:"properties.sorting.sortByY.label",convertFunctions:{get:e=>!!e("integer"),set:(e,t)=>{t("integer",e?-1:0)}},options:[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}]},sortbyYOrder:{ref:"qHyperCubeDef.qSortbyYValue",type:"string",component:"dropdown",defaultValue:0,options:[{value:1,translation:"properties.sorting.ascending"},{value:-1,translation:"properties.sorting.descending"}],show:e=>!!e.qHyperCubeDef.qSortbyYValue}}},defaultSorting:{uses:"sorting",items:{dimensions:{showPriority:!1,allowMove:!1},measures:{included:!1}}},searchSorting:{ref:"search.sorting",type:"string",component:"dropdown",defaultValue:S$,translation:"Object.Table.SortingInSearch",options:[{value:S$,translation:"Common.Auto"},{value:"inherit",translation:"Object.Table.SortingInSearch.InheritFromDimension"}]}}};function E$(e){const{translator:t,flags:n}=e;return{type:"items",component:"accordion",items:{data:mW(e),sorting:C$,addons:KF,settings:w$(t,n)}}}function k$(e){return{support:{cssScaling:!0,snapshot:!0,export:!0,exploration:e.flags.isEnabled("CLIENT_IM_5973_PIVOT_TABLE_EXPLORATION"),sharing:!1,exportData:!0,viewData:!0},usePropertyHandler:"pivot-data",definition:E$(e),importProperties:UF(e),exportProperties:YF,exploration:XN(e)}}const M$=()=>{let e;const t=new Promise((t=>{e=t}));return{promise:t,resolve:e}};function R$(e,t){return C((()=>e),t)}const A$={},I$=e=>{const t=C((()=>({current:A$})),[]);return t.current=t.current===A$?e:t.current,t},P$=()=>{const{viewState:e}=E(),t=I$(new Set),n=void 0!==window.qlikprinting,{promise:r,resolve:o}=C((()=>M$()),[]),i=R$((e=>{n&&t.current.add(e)}),[t]),a=R$(function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return function(){for(var r=this,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];clearTimeout(t),t=setTimeout((function(){return e.apply(r,i)}),n)}}((async()=>{await Promise.all(t.current),t.current.clear(),o()}),1e3),[o,t]);return k((async()=>{n&&await r}),[r,n]),C((()=>({viewState:e,isDownloadedAsPDForImage:n,notifyIsDoneRendering:a,waitForPromise:i})),[a,n,e,i])},O$=e=>!!e&&0===IW(e).a,L$="#grid",D$=(e,t)=>{const n=t?.closest(e);return n&&window.getComputedStyle(n).backgroundColor},T$=(e,t,n,r,o)=>{const i=D$(".qv-object .qv-inner-object",n),a=D$(".qv-panel-sheet",n),s=D$(L$,n)??a,l=(e=>{const t=e.components?.find((e=>"general"===e.key)),n=t?.bgColor?.colorExpression,r=t?.bgColor?.color?.color,o=t?.bgColor?.useColorExpression;if(o&&n)return UB(n);if("none"===r)return"transparent";if(void 0===r)return;const i=IW(r);return i.setAlpha(t?.bgColor?.color?.alpha??i.a),i.getRGBA()})(e),c=r?.(t),u=o?.(t),d=l||c||i||u,p=O$(d),h=!O$(f=p?s:d)&&HB(f,yW.TEXT,yW.DARK_MODE_TEXT)===EW(yW.DARK_MODE_TEXT);var f;const m=((e,t,n,r=yW.WHITE)=>e&&!O$(e)?e:O$(t)?n&&!O$(n)?n:r:t)(l,d,s);return{color:d,headerColor:m,isDark:h}},z$=(e,t,n,r)=>{const o=A(),i=((e,t={attributeFilter:["style"],childList:!1,subtree:!1})=>{const[n,r]=M([]);return R((()=>{let n;return e&&(n=new MutationObserver((e=>{r(e)})),n.observe(e,t)),()=>{n?.disconnect()}}),[e,t]),n})(t.closest(L$),{attributeFilter:["style"],childList:!1,subtree:!1,attributeOldValue:!0}).filter((({oldValue:e})=>e?.includes("background"))).map((({oldValue:e})=>e)).join(",");return C((()=>({...o,background:T$(e,o,t,n,r)})),[o.name(),t,n,r,e,i])};function j$(e,t){const n=C((()=>({isLoading:!0})),t),[r,o]=k((async()=>{try{return await e()}finally{n.isLoading=!1}}),t);return[r,n.isLoading,o]}const N$=3;function q$(e,t,n){let r=0,o=e.length;if(e.length<=1)return null;if(n(e)<=t)return null;for(;r<=o;){const i=Math.floor((r+o)/2),a=e.slice(0,i),s=e.slice(0,i-1),l=n(a),c=n(s);if(l>t&&c<=t)return e.slice(i-1)||null;if(l===t)return e.slice(i)||null;l<t?r=i+1:o=i}return null}function F$({fontSize:e="12px",fontFamily:t="Source Sans Pro, Arial, sans-serif",fontStyle:n="normal",fontWeight:r="normal"},o){const{maxNbrLinesOfText:i=N$}={},{estimateWidth:a,measureText:s,estimateLineCount:l}=f((()=>{const o=document.createElement("canvas").getContext("2d");o.font=`${n} ${r} ${e} ${t}`;const a=zB(o.measureText.bind(o)),s=e=>+a(e).width.toFixed(2),l=zB((({text:e,maxWidth:t,isNumeric:n=!1})=>{if(n)return 1;let r=0,o=e;do{r+=1,o=q$(o,t,s)}while(null!==o&&r<i);return r}),(({text:e,maxWidth:t,isNumeric:n})=>`${e}-${t}-${n?"true":"false"}`));return{measureText:e=>a(e).width,estimateWidth:e=>a("N").width*e,estimateLineCount:l}}),[n,r,e,t,i]);return{estimateWidth:a,measureText:s,estimateLineCount:l}}var W$,B$=w;W$=B$.createRoot,B$.hydrateRoot;const $$="Source Sans Pro, sans-serif";function H$(e,t){const[n,r]=m(t),o=n.some(((e,n)=>e!==t[n]));o&&(r(t),e())}var V$={NebulaTableUtils_ColumnAdjuster_ColumnNameLabel:{id:"NebulaTableUtils.ColumnAdjuster.ColumnNameLabel",locale:{"de-DE":"Breite von {0}","en-US":"Width of {0}","es-ES":"Ancho de {0}","fr-FR":"Largeur de {0}","it-IT":"Larghezza di {0}","ja-JP":"{0} の幅","ko-KR":"{0}의 너비","nl-NL":"Breedte van {0}","pl-PL":"Szerokość kolumny {0}","pt-BR":"Comprimento de {0}","ru-RU":'Ширина столбца "{0}"',"sv-SE":"Bredd på {0}","tr-TR":"{0} genişliği","zh-CN":"{0} 的宽度","zh-TW":"{0} 的寬度"}},NebulaTableUtils_MenuGroupLabel_Sorting:{id:"NebulaTableUtils.MenuGroupLabel.Sorting",locale:{"de-DE":"Sortierung","en-US":"Sorting","es-ES":"Ordenación","fr-FR":"Tri","it-IT":"Ordinamento","ja-JP":"ソート","ko-KR":"정렬","nl-NL":"Sorteren","pl-PL":"Sortowanie","pt-BR":"Classificação","ru-RU":"Сортировка","sv-SE":"Sortering","tr-TR":"Sıralama","zh-CN":"排序","zh-TW":"排序"}},NebulaTableUtils_MenuItemLabel_AdjustColumnSize:{id:"NebulaTableUtils.MenuItemLabel.AdjustColumnSize",locale:{"de-DE":"Spaltengröße anpassen","en-US":"Adjust column size","es-ES":"Ajustar el tamaño de columna","fr-FR":"Ajuster la taille de colonne","it-IT":"Regola dimensioni colonna","ja-JP":"列サイズを調整","ko-KR":"열 크기 조정","nl-NL":"Kolomgrootte aanpassen","pl-PL":"Dostosuj rozmiar kolumny","pt-BR":"Ajustar tamanho da coluna","ru-RU":"Настроить размер столбца","sv-SE":"Justera kolumnens storlek","tr-TR":"Sütun boyutunu ayarla","zh-CN":"调节列大小","zh-TW":"調整欄大小"}},NebulaTableUtils_MenuItemLabel_ClearSelections:{id:"NebulaTableUtils.MenuItemLabel.ClearSelections",locale:{"de-DE":"Auswahlen löschen","en-US":"Clear selections","es-ES":"Borrar selecciones","fr-FR":"Effacer les sélections","it-IT":"Cancella selezioni","ja-JP":"選択をクリア","ko-KR":"선택 지우기","nl-NL":"Geselecteerde waarden wissen","pl-PL":"Wyczyść wybory","pt-BR":"Limpar seleções","ru-RU":"Очистить выбранные","sv-SE":"Radera urval","tr-TR":"Seçimleri temizle","zh-CN":"清除选择项","zh-TW":"清除選項"}},NebulaTableUtils_MenuItemLabel_Collapse:{id:"NebulaTableUtils.MenuItemLabel.Collapse",locale:{"de-DE":"Reduzieren","en-US":"Collapse","es-ES":"Contraer","fr-FR":"Réduire","it-IT":"Comprimi","ja-JP":"折りたたむ","ko-KR":"축소","nl-NL":"Samenvouwen","pl-PL":"Zwiń","pt-BR":"Recolher","ru-RU":"Свернуть","sv-SE":"Dölj","tr-TR":"Daralt","zh-CN":"折叠","zh-TW":"收合"}},NebulaTableUtils_MenuItemLabel_ColumnOptions:{id:"NebulaTableUtils.MenuItemLabel.ColumnOptions",locale:{"de-DE":"Spaltenoptionen","en-US":"Column options","es-ES":"Opciones de columna","fr-FR":"Options de colonne","it-IT":"Opzioni colonna","ja-JP":"列オプション","ko-KR":"열 옵션","nl-NL":"Kolomopties","pl-PL":"Opcje kolumny","pt-BR":"Opções da coluna","ru-RU":"Параметры столбца","sv-SE":"Alternativ för kolumn","tr-TR":"Sütun seçenekleri","zh-CN":"列选项","zh-TW":"欄選項"}},NebulaTableUtils_MenuItemLabel_Expand:{id:"NebulaTableUtils.MenuItemLabel.Expand",locale:{"de-DE":"Erweitern","en-US":"Expand","es-ES":"Expandir","fr-FR":"Développer","it-IT":"Espandi","ja-JP":"展開","ko-KR":"확장","nl-NL":"Uitvouwen","pl-PL":"Rozwiń","pt-BR":"Expandir","ru-RU":"Развернуть","sv-SE":"Utöka","tr-TR":"Genişlet","zh-CN":"展开","zh-TW":"展開"}},NebulaTableUtils_MenuItemLabel_Search:{id:"NebulaTableUtils.MenuItemLabel.Search",locale:{"de-DE":"Suchen","en-US":"Search","es-ES":"Buscar","fr-FR":"Rechercher","it-IT":"Cerca","ja-JP":"検索","ko-KR":"검색","nl-NL":"Zoeken","pl-PL":"Wyszukaj","pt-BR":"Pesquisar","ru-RU":"Поиск","sv-SE":"Sök","tr-TR":"Ara","zh-CN":"搜索","zh-TW":"搜尋"}},NebulaTableUtils_MenuItemLabel_SelectAll:{id:"NebulaTableUtils.MenuItemLabel.SelectAll",locale:{"de-DE":"Alle auswählen","en-US":"Select all","es-ES":"Seleccionar todo","fr-FR":"Sélectionner tout","it-IT":"Seleziona tutti","ja-JP":"すべて選択","ko-KR":"모두 선택","nl-NL":"Alles selecteren","pl-PL":"Wybierz wszystko","pt-BR":"Selecionar tudo","ru-RU":"Выбрать все","sv-SE":"Välj alla","tr-TR":"Tümünü seç","zh-CN":"全选","zh-TW":"全選"}},NebulaTableUtils_MenuItemLabel_SelectAlternative:{id:"NebulaTableUtils.MenuItemLabel.SelectAlternative",locale:{"de-DE":"Alternative Werte auswählen","en-US":"Select alternative","es-ES":"Seleccionar alternativos","fr-FR":"Sélectionner des valeurs alternatives","it-IT":"Seleziona alternativi","ja-JP":"代替項目を選択","ko-KR":"대체 가능 값 선택","nl-NL":"Alternatief selecteren","pl-PL":"Wybierz alternatywę","pt-BR":"Selecionar alternativa","ru-RU":"Выбрать альтернативные","sv-SE":"Välj alternativ","tr-TR":"Alternatifi seç","zh-CN":"选择替代项","zh-TW":"選取替代選項"}},NebulaTableUtils_MenuItemLabel_SelectExcluded:{id:"NebulaTableUtils.MenuItemLabel.SelectExcluded",locale:{"de-DE":"Ausgeschlossene Werte auswählen","en-US":"Select excluded","es-ES":"Seleccionar excluidos","fr-FR":"Sélectionner les valeurs exclues","it-IT":"Seleziona esclusi","ja-JP":"除外項目を選択","ko-KR":"제외 항목 선택","nl-NL":"Uitgesloten waarden selecteren","pl-PL":"Wybierz wykluczone","pt-BR":"Selecionar excluídos","ru-RU":"Выбрать исключенные","sv-SE":"Välj uteslutna","tr-TR":"Hariç tutulanı seç","zh-CN":"选择排除项","zh-TW":"選取排除值"}},NebulaTableUtils_MenuItemLabel_SelectPossible:{id:"NebulaTableUtils.MenuItemLabel.SelectPossible",locale:{"de-DE":"Wählbare Werte auswählen","en-US":"Select possible","es-ES":"Seleccionar posibles","fr-FR":"Sélectionner les valeurs possibles","it-IT":"Seleziona possibili","ja-JP":"絞込項目を選択","ko-KR":"사용 가능 항목 선택","nl-NL":"Mogelijke waarden selecteren","pl-PL":"Wybierz możliwe","pt-BR":"Selecionar possíveis","ru-RU":"Выбрать возможные","sv-SE":"Välj möjliga","tr-TR":"Olası olanı seç","zh-CN":"选择可能值","zh-TW":"選取可能值"}},NebulaTableUtils_MenuItemLabel_Selections:{id:"NebulaTableUtils.MenuItemLabel.Selections",locale:{"de-DE":"Auswahlen","en-US":"Selections","es-ES":"Selecciones","fr-FR":"Sélections","it-IT":"Selezioni","ja-JP":"選択","ko-KR":"선택 내용","nl-NL":"Selecties","pl-PL":"Wybory","pt-BR":"Seleções","ru-RU":"Выборки","sv-SE":"Urval","tr-TR":"Seçimler","zh-CN":"选择项","zh-TW":"選項"}},NebulaTableUtils_MenuItemLabel_SortAscending:{id:"NebulaTableUtils.MenuItemLabel.SortAscending",locale:{"de-DE":"In aufsteigender Reihenfolge sortieren","en-US":"Sort ascending","es-ES":"Orden ascendente","fr-FR":"Trier par ordre croissant","it-IT":"Ordinamento crescente","ja-JP":"昇順でソート","ko-KR":"오름차순으로 정렬","nl-NL":"Oplopend sorteren","pl-PL":"Sortuj rosnąco","pt-BR":"Classificar em ordem crescente","ru-RU":"Сортировка по возрастанию","sv-SE":"Sortera stigande","tr-TR":"Artan sıralama","zh-CN":"升序排序","zh-TW":"以遞增方式排序"}},NebulaTableUtils_MenuItemLabel_SortDescending:{id:"NebulaTableUtils.MenuItemLabel.SortDescending",locale:{"de-DE":"In absteigender Reihenfolge sortieren","en-US":"Sort descending","es-ES":"Orden descendente","fr-FR":"Trier par ordre décroissant","it-IT":"Ordinamento decrescente","ja-JP":"降順でソート","ko-KR":"내림차순으로 정렬","nl-NL":"Aflopend sorteren","pl-PL":"Sortuj malejąco","pt-BR":"Classificar em ordem decrescente","ru-RU":"Сортировка по убыванию","sv-SE":"Sortera fallande","tr-TR":"Azalan sıralama","zh-CN":"降序排序","zh-TW":"以遞減方式排序"}},NebulaTableUtils_Pagination_DisplayedRowsLabel:{id:"NebulaTableUtils.Pagination.DisplayedRowsLabel",locale:{"de-DE":"{0} von {1}","en-US":"{0} of {1}","es-ES":"{0} de {1}","fr-FR":"{0} sur {1}","it-IT":"{0} di {1}","ja-JP":"{0} / {1}","ko-KR":"{0}/{1}","nl-NL":"{0} van {1}","pl-PL":"{0} z {1}","pt-BR":"{0} de {1}","ru-RU":"{0} из {1}","sv-SE":"{0} av {1}","tr-TR":"{0} / {1}","zh-CN":"{0} / {1}","zh-TW":"{0} / {1}"}},NebulaTableUtils_Pagination_FirstPage:{id:"NebulaTableUtils.Pagination.FirstPage",locale:{"de-DE":"Zur ersten Seite","en-US":"Go to the first page","es-ES":"Ir a la primera página","fr-FR":"Accéder à la première page","it-IT":"Vai alla prima pagina","ja-JP":"最初のページに移動","ko-KR":"첫 페이지로 이동","nl-NL":"Ga naar de eerste pagina","pl-PL":"Przejdź do pierwszej strony","pt-BR":"Ir para a primeira página","ru-RU":"Перейти к первой странице","sv-SE":"Gå till första sidan","tr-TR":"İlk sayfaya git","zh-CN":"转到第一页","zh-TW":"移至第一頁"}},NebulaTableUtils_Pagination_LastPage:{id:"NebulaTableUtils.Pagination.LastPage",locale:{"de-DE":"Zur letzten Seite","en-US":"Go to the last page","es-ES":"Ir a la última página","fr-FR":"Accéder à la dernière page","it-IT":"Vai all'ultima pagina","ja-JP":"最後のページに移動","ko-KR":"마지막 페이지로 이동","nl-NL":"Ga naar de laatste pagina","pl-PL":"Przejdź do ostatniej strony","pt-BR":"Ir para a última página","ru-RU":"Перейти к последней странице","sv-SE":"Gå till sista sidan","tr-TR":"Son sayfaya git","zh-CN":"转到最后一页","zh-TW":"移至最後一頁"}},NebulaTableUtils_Pagination_NextPage:{id:"NebulaTableUtils.Pagination.NextPage",locale:{"de-DE":"Zur nächsten Seite","en-US":"Go to the next page","es-ES":"Ir a la página siguiente","fr-FR":"Accéder à la page suivante","it-IT":"Vai alla pagina successiva","ja-JP":"次のページに移動","ko-KR":"다음 페이지로 이동","nl-NL":"Ga naar de volgende pagina","pl-PL":"Przejdź do następnej strony","pt-BR":"Ir para a próxima página","ru-RU":"Перейти к следующей странице","sv-SE":"Gå till nästa sida","tr-TR":"Sonraki sayfaya git","zh-CN":"转到下一页","zh-TW":"移至下一頁"}},NebulaTableUtils_Pagination_PreviousPage:{id:"NebulaTableUtils.Pagination.PreviousPage",locale:{"de-DE":"Zur vorherigen Seite","en-US":"Go to the previous page","es-ES":"Ir a la página anterior","fr-FR":"Accéder à la page précédente","it-IT":"Vai alla pagina precedente","ja-JP":"前のページに移動","ko-KR":"이전 페이지로 이동","nl-NL":"Ga naar de vorige pagina","pl-PL":"Przejdź do poprzedniej strony","pt-BR":"Ir para a página anterior","ru-RU":"Перейти к предыдущей странице","sv-SE":"Gå till föregående sida","tr-TR":"Önceki sayfaya git","zh-CN":"转到前一页","zh-TW":"移至上一頁"}},NebulaTableUtils_Pagination_RowsPerPage:{id:"NebulaTableUtils.Pagination.RowsPerPage",locale:{"de-DE":"Zeilen pro Seite","en-US":"Rows per page","es-ES":"Filas por página","fr-FR":"Lignes par page","it-IT":"Righe per pagina","ja-JP":"ページあたりの行数","ko-KR":"페이지별 행 수","nl-NL":"Rijen per pagina","pl-PL":"Wierszy na stronę","pt-BR":"Linhas por página","ru-RU":"Строк на странице","sv-SE":"Rader per sida","tr-TR":"Sayfa başına satır sayısı","zh-CN":"每页行数","zh-TW":"每頁列數"}},NebulaTableUtils_Pagination_SelectPage:{id:"NebulaTableUtils.Pagination.SelectPage",locale:{"de-DE":"Seite auswählen","en-US":"Select page","es-ES":"Seleccionar página","fr-FR":"Sélectionner une page","it-IT":"Seleziona pagina","ja-JP":"ページを選択","ko-KR":"페이지 선택","nl-NL":"Pagina selecteren","pl-PL":"Wybierz stronę","pt-BR":"Selecionar página","ru-RU":"Выберите страницу","sv-SE":"Välj sida","tr-TR":"Sayfa seç","zh-CN":"选择页面","zh-TW":"選取頁面"}}};const G$=({translator:e})=>(f((()=>{!function(e){if(e&&e.get&&e.add){const t="NebulaTableUtils.MenuGroupLabel.Sorting";if(e.get(t)!==t)return;Object.keys(V$).forEach((t=>{e.add(V$[t])}))}}(e)}),[e]),e),U$={width:"100%",height:"100%",color:"transparent",background:"transparent",borderColor:"transparent"},Y$={border:0,boxShadow:"none",borderRadius:0,outline:0,width:0,height:0,background:"transparent",cursor:"pointer",visibility:"hidden"},K$=Qs("input",{shouldForwardProp:e=>"isLastColumn"!==e&&"hoverColor"!==e})((({isLastColumn:e,hoverColor:t,dir:n})=>({position:"absolute",display:"flex",height:"100%",top:0,marginLeft:"-4px",marginRight:"rtl"===n?"-4px":void 0,touchAction:"none",cursor:"col-resize",pointerEvents:"auto",width:(e?4:9)+"px",justifyContent:e?"flex-end":"center",outline:"none",appearance:"none",WebkitAppearance:"none",backgroundColor:"transparent","&::-webkit-slider-runnable-track":{...U$},"&::-moz-range-track":{...U$},"&::-ms-track":{...U$},"&::-webkit-slider-thumb":{appearance:"none",WebkitAppearance:"none",...Y$},"&::-moz-range-thumb":{...Y$},"&::-ms-thumb":{...Y$},"&:hover:not(:focus, :active)":{"&::after":{backgroundColor:t||"#D9D9D9","@media (hover: none)":{backgroundColor:"none"}}},"&:focus-visible, &:active":{"&::after":{backgroundColor:"#177fe6",borderLeft:"1px solid #fff",borderRight:e?void 0:"1px solid #fff"}},"&::after":{content:'""',height:"100%",width:"3px",position:"absolute"}}))),X$=({columnWidth:e,keyValue:t,isLastColumn:n,isPivot:r,hoverColor:o,updateWidthCallback:i,confirmWidthCallback:a,handleBlur:l,setIsAdjustingWidth:c,isLeftColumn:u,accessibilityRelatedArgs:d,direction:p="ltr"})=>{const h=G$({translator:d.translator}),f=s({initWidth:e,columnWidth:e,initX:0}),m=n?0:1,g=r&&!u,y=()=>g?f.current.columnWidth-m:"100%",_={left:"rtl"!==p?y():void 0,right:"rtl"===p?y():void 0},b=t=>{f.current={initWidth:e,columnWidth:e,initX:t??f.current.initX}};H$((()=>{g&&b()}),[e]);const x=e=>{const t=Math.max(e,mN.PixelsMin);f.current.columnWidth=t,i(t)},v=()=>{if(f.current.columnWidth!==f.current.initWidth){const e={type:gN.Pixels,pixels:f.current.columnWidth};a(e)}else c?.(!1)},w=e=>{const t="rtl"===p?f.current.initWidth+f.current.initX-e.clientX:f.current.initWidth+e.clientX-f.current.initX;x(t)},S=e=>{YB(e),document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",S),v()},C=e=>{const t="rtl"===p?f.current.initWidth+-f.current.initX-e.touches[0].clientX:f.current.initWidth+e.touches[0].clientX-f.current.initX;x(t)},E=e=>{YB(e),document.removeEventListener("touchmove",C),document.removeEventListener("touchend",E),v()},k=!r&&l?e=>{if(e.key===hN.Left||e.key===hN.Right){YB(e);const t=5,n=e.key===hN.Left?t:-t,r="rtl"===p?n:-n;x(f.current.columnWidth+r)}else e.key===hN.Space||e.key===hN.Enter?(YB(e),l(e),v()):e.key===hN.Esc&&(YB(e),l(e),x(f.current.initWidth))}:void 0,M=h.get("NebulaTableUtils.ColumnAdjuster.ColumnNameLabel",[String(d.columnLabel)]);return Uo.jsx(K$,{style:_,hoverColor:o,isLastColumn:n,className:fN,"data-testid":fN,onMouseDown:e=>{YB(e),document.addEventListener("mousemove",w),document.addEventListener("mouseup",S),c?.(!0),b(e.clientX)},onDoubleClick:()=>{a({type:gN.FitToContent})},onTouchStart:e=>{1===e.touches.length&&(YB(e),document.addEventListener("touchmove",C),document.addEventListener("touchend",E),c?.(!0),b(e.touches[0].clientX))},onKeyDown:k,onBlur:l,onFocus:()=>{b()},type:"range",tabIndex:-1,"aria-label":M,"aria-valuemin":mN.PixelsMin,"aria-valuemax":mN.PixelsMax,"aria-valuenow":Number(e.toFixed(1)),dir:p},t)},J$=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M15 4H1V2h14zm0 10H1v-2h14zm0-5H1V7h14z"})}))),Z$=Qs(Wc,{shouldForwardProp:e=>"rightAligned"!==e&&"shouldShowMenuIcon"!==e})((({rightAligned:e,shouldShowMenuIcon:t})=>({...e?{marginRight:"auto"}:{marginLeft:"auto"},height:24,display:t?"flex":"none",fontWeight:"bold",width:"100%",alignItems:"center",justifyContent:"center"}))),Q$=Qs(J$,{shouldForwardProp:e=>"isInteractionsActive"!==e})((({isInteractionsActive:e})=>({minWidth:"unset",position:"relative",cursor:e?"pointer":"default"}))),eH=Qs(Hd)((({theme:e})=>({".MuiList-root":{padding:e.spacing(.5,0)}}))),tH=Qs(Tu)((({theme:e})=>({"&.MuiDivider-root":{margin:e.spacing(.5)}}))),nH=Qs(Kd)((({theme:e})=>({fontSize:"12px",height:24,fontWeight:"bold",padding:`${e.spacing(.25,2)} !important`,marginBottom:e.spacing(.5)}))),rH=Qs(Kd,{shouldForwardProp:e=>"isSubMenu"!==e&&"isActive"!==e})((({theme:e,isSubMenu:t,isActive:n})=>({width:`calc(220px - ${e.spacing(1)} - ${t?10:0}px)`,maxHeight:32,borderRadius:`${e.spacing(.5)} !important`,margin:`${e.spacing(.25,.5)} !important`,padding:`${e.spacing(1,1.5)} !important`,display:"flex !important",justifyContent:"space-between !important","&&:focus":{boxShadow:"rgb(23, 127, 230) 0px 0px 0px 2px"},position:"relative !important",overflow:"hidden",boxSizing:"border-box !important",background:n?"rgba(0, 0, 0, 0.05)":"transparent"}))),oH=Qs("div",{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})((({theme:e,direction:t,isPagination:n})=>({position:"absolute",width:e.spacing(.5),height:16,left:0,right:n||"rtl"!==t?void 0:0,top:"50%",transform:"TranslateY(-50%)",borderRadius:"0 2px 2px 0",background:"#01873d"}))),iH=Qs("div")((()=>({display:"flex",justifyContent:"space-between",alignItems:"center",maxWidth:"100%"}))),aH=Qs(rc)((()=>({fontFamily:'"Source Sans Pro", HelveticaNeue, "Helvetica Neue", Helvetica, Arial, sans-serif',fontSize:"14px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}))),sH=Qs(yd,{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})((({theme:e,direction:t,isPagination:n})=>({width:16,minWidth:"unset !important",marginRight:n||"rtl"!==t?e.spacing(1.5):0,marginLeft:n||"rtl"!==t?void 0:e.spacing(1.5),lineHeight:0}))),lH=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M8.5 8 4 3.5 5.5 2l6 6-6 6L4 12.5z"})}))),cH=e=>{const t=e.nextElementSibling;return t?"HR"===t.tagName?cH(t):t:e.parentElement?.children?.[0]},uH=e=>{const t=e.previousElementSibling;if(!t){const t=e.parentElement?.children?.length;return e.parentElement?.children?.[t-1]}return"HR"===t.tagName?uH(t):t},dH=e=>{const{key:t,currentTarget:n}=e,r=document.activeElement??n;if(t===hN.Down||t===hN.Up){const n=e=>t===hN.Down?cH(e):uH(e);e.preventDefault(),e.stopPropagation();let o=n(r);for(;o;){if("true"!==o.ariaDisabled){o.focus();break}o=n(o)}}},pH=(e,t)=>e.map((e=>e.map((e=>({...e.groupHeading?{groupHeading:e.groupHeading}:{},items:e.items.map((({onClick:e,...n})=>({...n,...e?{onClick:async n=>{Object.entries(t).forEach((([,e])=>{e(!1)})),await e(n)}}:{}})))})))));let hH={};const fH=({autoFocus:e,id:t,onClick:n,itemTitle:r,icon:o,enabled:i,subMenus:a,isSubMenu:l,isActive:c,direction:u,isPagination:d})=>{const[h,f]=m(!1),g=s(null),y=p((e=>{e.stopPropagation(),f(!1)}),[f]);return Uo.jsxs(Uo.Fragment,{children:[Uo.jsxs(rH,{ref:a?g:null,"data-testid":`menu-item-${t}`,className:"nebula-table-utils-head-menu-item",onClick:async e=>{"keyup"!==e.type&&(n&&(await n(e),hH={}),a?.length&&(f(!0),hH[r]=f))},disabled:!i,autoFocus:e,isSubMenu:!!l,isActive:!!c,onKeyDown:dH,children:[c?Uo.jsx(oH,{direction:u,isPagination:d}):null,Uo.jsxs(iH,{children:[Uo.jsx(sH,{direction:u,isPagination:d,children:Uo.jsx(o,{})}),Uo.jsx(aH,{variant:"body2",children:r})]}),a?.length?Uo.jsx(lH,{}):null]},t),a?.length?Uo.jsx(_H,{isSubMenu:!0,open:h,anchorEl:g.current,onClose:y,menuGroups:pH(a,hH),transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},direction:u,isPagination:d}):null]})},mH=({menuGroup:e,isSubMenu:t,direction:n,isPagination:r})=>e.map((e=>[[e.groupHeading&&Uo.jsx(nH,{disabled:!0,style:{opacity:1},children:e.groupHeading},e.groupHeading),e.items.map((e=>Uo.jsx(fH,{...e,isSubMenu:t,direction:n,isPagination:r},e.id)))].filter(Boolean)])),gH=({itemGroups:e,isSubMenu:t,direction:n,isPagination:r})=>e.map(((o,i)=>[mH({menuGroup:o,isSubMenu:t,direction:n,isPagination:r}),i<e.length-1?Uo.jsx(tH,{"data-testid":"group-divider",variant:"middle"}):void 0])),yH={appear:0,enter:0,exit:0},_H=({anchorEl:e,open:t,onClose:n,menuGroups:r,transformOrigin:o,anchorOrigin:i,isSubMenu:a,direction:s,isPagination:l})=>r.length?Uo.jsx(eH,{className:"nebula-table-utils-head-menu",open:t,anchorEl:e,onClose:n,transitionDuration:yH,MenuListProps:{id:"nebula-table-utils-head-menu-list-id"},...i?{anchorOrigin:i}:{},...o?{transformOrigin:o}:{},dir:s,children:gH({itemGroups:r,isSubMenu:a,direction:s,isPagination:l})}):null,bH=(e,t)=>e.some((e=>t[e]>0)),xH={canSelectAll:!1,canClearSelections:!1,canSelectPossible:!1,canSelectAlternative:!1,canSelectExcluded:!1},vH=({open:e,qStateName:t="$",headerData:n,app:r})=>{const[o,i]=m(null),[a,s]=m(xH);return H$((()=>{e||(s(xH),i(null))}),[e]),u((()=>{if(!r?.createSessionObject||!n.isDim||!e)return()=>{};let o,a=!1;const l=()=>{o&&r.destroySessionObject(o)};return(async()=>{try{const e=((e,t)=>({qInfo:{qType:"tableListbox"},qListObjectDef:Boolean(t.qLibraryId)?{qLibraryId:t.qLibraryId,qStateName:e}:{qDef:{qFieldDefs:[t.fieldId]},qStateName:e}}))(t,n),c=await r.createSessionObject(e),u=await c.getLayout(),{qStateCounts:d}=u.qListObject?.qDimensionInfo??{};o=u.qInfo?.qId,a?l():(i(c),d&&s((e=>({canSelectAll:bH(["qOption","qAlternative","qExcluded","qDeselected"],e),canClearSelections:bH(["qSelected"],e),canSelectPossible:bH(["qOption"],e),canSelectAlternative:bH(["qAlternative"],e),canSelectExcluded:bH(["qAlternative","qExcluded"],e)}))(d)))}catch(e){console.error(e)}})(),()=>{a=!0,l()}}),[e,r,n,t]),{fieldInstance:o,selectionActionsEnabledStatus:a}},wH=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M3.5 1.793 6.207 4.5l-.707.707-1.5-1.5V14H3V3.707l-1.5 1.5L.793 4.5zM8 4h5v1H8zm0 3h6v1H8zm0 3h7v1H8z"})}))),SH=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m0-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m-1-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M9.166 6.166c1.555-1.555 4.113-1.555 5.668 0s1.555 4.113 0 5.668-4.113 1.555-5.668 0-1.555-4.063 0-5.668m4.966 1.555a.56.56 0 0 0 0-.803.56.56 0 0 0-.803 0l-1.304 1.305-1.304-1.305a.522.522 0 0 0-.803 0 .524.524 0 0 0 0 .803l1.305 1.304-1.305 1.304c-.25.2-.25.552 0 .803.251.25.602.25.803 0l1.304-1.304 1.304 1.304c.2.25.552.25.803 0 .2-.201.25-.602 0-.803l-1.304-1.304z"})}))),CH=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M3.914 8h8.207L10.5 6.379l.707-.708L14.036 8.5l-2.829 2.828-.707-.707L12.12 9H3.914l1.621 1.621-.707.707L2 8.5l2.828-2.828.707.707zM15 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zm0 13V2h-2v3h-1V2H4v3H3V2H1v12h2v-2h1v2h8v-2h1v2z"})}))),EH=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M3 2h1v10.293l1.5-1.5.707.707L3.5 14.207.793 11.5l.707-.707 1.5 1.5zm12 2H8v1h7zM8 7h6v1H8zm5 3H8v1h5z"})}))),kH=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M8 15c-3.848 0-7-3.152-7-7s3.152-7 7-7 7 3.152 7 7-3.152 7-7 7m0 1c4.4 0 8-3.6 8-8s-3.6-8-8-8-8 3.6-8 8 3.6 8 8 8m4-7.5H4v-1h8z"})}))),MH=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M8 15c-3.848 0-7-3.152-7-7s3.152-7 7-7 7 3.152 7 7-3.152 7-7 7m0 1c4.4 0 8-3.6 8-8s-3.6-8-8-8-8 3.6-8 8 3.6 8 8 8m4-7.5H4v-1h8zM8.5 4v8h-1V4z"})}))),RH=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M1 8a7 7 0 1 1 10 6.326V11h-1v5h5v-1h-3.124A8 8 0 1 0 8 16v-1a7 7 0 0 1-7-7"})}))),AH=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M9.057 11.164a6 6 0 1 1 2.112-2.116 1 1 0 0 1 .052.044l4.176 4.08a1 1 0 0 1 .009 1.422l-.707.707a1 1 0 0 1-1.406.008l-4.185-4.087a1 1 0 0 1-.05-.058ZM10.5 6a4.5 4.5 0 1 0-9 0 4.5 4.5 0 0 0 9 0"})}))),IH=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M3 4v1H1v10h10v-2h1v2a1 1 0 0 1-.883.993L11 16H1a1 1 0 0 1-.993-.883L0 15V5a1 1 0 0 1 .883-.993L1 4zm12-4a1 1 0 0 1 .993.883L16 1v10a1 1 0 0 1-.883.993L15 12H5a1 1 0 0 1-.993-.883L4 11V1a1 1 0 0 1 .883-.993L5 0zm0 1H5v10h10zm-2.36 2.653.72.694L9.143 8.72 6.64 6.125l.72-.694L9.143 7.28z"})}))),PH=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M4 4v8l8-8zm0-1h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})}))),OH=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M4 3h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})}))),LH=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M4 4v8h8V4zm0-1h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})}))),DH=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M1 1.5a.5.5 0 0 1 .5-.5H3V0H1.5A1.5 1.5 0 0 0 0 1.5V3h1zM14.5 1a.5.5 0 0 1 .5.5V3h1V1.5A1.5 1.5 0 0 0 14.5 0H13v1zM1 14.5a.5.5 0 0 0 .5.5H3v1H1.5A1.5 1.5 0 0 1 0 14.5V13h1zm14 0a.5.5 0 0 1-.5.5H13v1h1.5a1.5 1.5 0 0 0 1.5-1.5V13h-1zM6 0h4v1H6zM0 6h1v4H0zm15 0h1v4h-1zm-9 9h4v1H6z"})})));let TH=function(e){return e.Sorting="sorting",e.Searching="searching",e.Selections="selections",e.AdjusterHeaderSize="adjustHeaderSize",e}({});const zH="/qListObjectDef",jH=({headerData:e,translator:t,menuAvailabilityFlags:n,setOpen:r,sortFromMenu:o,interactions:i,embedListbox:a,fieldInstance:s,selectionActionsEnabledStatus:l,anchorRef:c,focusColumnAdjuster:u,setActiveFieldCallback:d,expandOrCollapseArgs:p})=>{const h=[];if(n[TH.Sorting]){const{isActivelySorted:n,sortDirection:i}=e,{ascendingEnabled:a,descendingEnabled:s}=(({isActivelySorted:e,sortDirection:t,isPivot:n,isSortedByFirstMeasure:r})=>{let o=!n&&!e||"D"===t,i=!n&&!e||"A"===t;return r&&(o=!1,i=!1),{ascendingEnabled:o,descendingEnabled:i}})(e);h.push([{groupHeading:t.get("NebulaTableUtils.MenuGroupLabel.Sorting"),items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortAscending"),onClick:async e=>{e.stopPropagation(),await(o?.(e,"A")),r(!1)},icon:wH,enabled:a,isActive:!!n&&"A"===i,autoFocus:a},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortDescending"),onClick:async e=>{e.stopPropagation(),await(o?.(e,"D")),r(!1)},icon:EH,enabled:s,isActive:!!n&&"D"===i,autoFocus:!a&&s}]}])}if(e.isCyclic&&d){const t=[];t.push([{items:[{id:1,itemTitle:e.groupDimensionLabels[e.groupDimensionPos],enabled:!0,icon:RH,subMenus:[[{items:e.groupDimensionLabels.map(((t,n)=>({id:n+1,itemTitle:t,onClick:async e=>{e.stopPropagation(),r(!1),d(n)},enabled:!0,icon:ON,isActive:e.groupDimensionPos===n})))}]]}]}]),t.length>0&&h.push(...t)}if(e.isDim&&i?.select){const e=[];n[TH.Searching]&&e.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Search"),onClick:e=>{e.stopPropagation(),r(!1),a()},icon:AH,enabled:!0}]}]),n[TH.Selections]&&e.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Selections"),icon:DH,enabled:!!s,subMenus:[[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAll"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectAll(zH))},icon:IH,enabled:l.canSelectAll},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectPossible"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectPossible(zH))},icon:LH,enabled:l.canSelectPossible},{id:3,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAlternative"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectAlternative(zH))},icon:PH,enabled:l.canSelectAlternative},{id:4,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectExcluded"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectExcluded(zH))},icon:OH,enabled:l.canSelectExcluded}]}],[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.ClearSelections"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.clearSelections(zH))},icon:SH,enabled:l.canClearSelections}]}]]}]}]),p&&!p.alwaysFullyExpanded&&h.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Expand"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),r(!1),await p.expandCallback()},icon:MH,enabled:!0},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Collapse"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),r(!1),await p.collapseCallback()},icon:kH,enabled:!0}]}]),e.length>0&&h.push(...e)}return n[TH.AdjusterHeaderSize]&&h.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.AdjustColumnSize"),onClick:e=>{e.stopPropagation(),e.preventDefault(),r(!1),u?.(c)},icon:CH,enabled:!0}]}]),h},NH=({open:e,setOpen:t,anchorRef:n,headerData:r,translator:o,interactions:i,menuAvailabilityFlags:a,shouldShowMenuIcon:l=!0,sortRelatedArgs:c,searchRelatedArgs:u,selectionRelatedArgs:d,adjustHeaderSizeRelatedArgs:h,expandOrCollapseArgs:f,model:m,direction:g="ltr",isPagination:y,isAccessibleHeader:_})=>{const b=s(null),x=G$({translator:o}),{qLibraryId:v,fieldId:w,headTextAlign:S}=r,C=d?.app,{fieldInstance:E,selectionActionsEnabledStatus:k}=vH({open:e,headerData:r,app:C,qStateName:d?.qStateName});let M=null;if(m&&"setActiveField"in m&&void 0!==r.dimensionInfoIndex){const e=r.dimensionInfoIndex;M=async t=>{try{await m.setActiveField("/qHyperCubeDef",e,t)}catch(e){console.error(e)}}}const R=p((()=>{const e=v?{qLibraryId:v,type:"dimension"}:w;if(u?.embed){const{embed:t,listboxRef:n}=u;t.__DO_NOT_USE__.popover(n.current,e,{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"rtl"===g?"right":"left"},sortCriteria:u.sortCriteria,stateName:d?.qStateName,direction:g})}}),[v,w,u,d?.qStateName,g]),A=p((e=>{e.stopPropagation(),t(!1)}),[t]),I=p((e=>{e.stopPropagation(),t((e=>!e))}),[t]);return i.active?Uo.jsxs(Z$,{rightAligned:"right"===S,shouldShowMenuIcon:l,className:"nebula-table-utils-head-menu-wrapper",onClick:!1===_?I:void 0,ref:b,children:[l?Uo.jsx(Q$,{height:cN,className:uN,"data-testid":uN,isInteractionsActive:i.active??!1,children:Uo.jsx(J$,{})}):null,Uo.jsx(_H,{open:e,anchorEl:!1===_?b.current:n.current,onClose:A,menuGroups:jH({headerData:r,translator:x,menuAvailabilityFlags:a,setOpen:t,...c,embedListbox:R,interactions:i,fieldInstance:E,selectionActionsEnabledStatus:k,anchorRef:n,focusColumnAdjuster:h?.focusColumnAdjuster,setActiveFieldCallback:M,expandOrCollapseArgs:f}),direction:g,isPagination:y})]}):null},qH=e=>e.isDark?{background:e.color,borderColor:yW.DARK_MODE_BORDER,color:yW.DARK_MODE_TEXT,disabledColor:yW.DARK_MODE_DISABLED,iconColor:yW.DARK_MODE_TEXT}:{background:e.color,borderColor:yW.BORDER_MEDIUM,color:yW.TEXT,disabledColor:yW.DISABLED},FH=Qs(Wc,{shouldForwardProp:e=>"footerStyle"!==e})((({footerStyle:e,theme:t})=>({height:40,display:"flex",justifyContent:"flex-end",alignItems:"center",padding:t.spacing(0,1,0,1),color:e.color,background:e.background,borderTop:`1px solid ${e.borderColor}`}))),WH=Qs(Ap,{shouldForwardProp:e=>"footerStyle"!==e})((({footerStyle:e,theme:t})=>({background:"inherit",marginRight:t.spacing(1),color:e.color,"& .MuiNativeSelect-icon, .MuiNativeSelect-select":{color:e.iconColor}}))),BH=Qs(Jc,{shouldForwardProp:e=>"disabledCondition"!==e&&"footerStyle"!==e})((({disabledCondition:e,footerStyle:t,theme:n})=>({color:e?t.disabledColor:t.color,cursor:e?"default":"pointer",marginLeft:n.spacing(1)}))),$H=Qs(rc)((({theme:e})=>({color:"inherit",margin:e.spacing(0,1,0,1)}))),HH=({children:e,footerContainer:t,interactions:n,theme:r,paginationNeeded:o=!0})=>{const i=f((()=>qH(r.background)),[r]);if(!n.active)return null;const a=o?Uo.jsx(FH,{footerStyle:i,children:e}):null;return t?w.createPortal(e,t):a},VH=l({}),GH=()=>n(VH),UH=({children:e,direction:t,pageInfo:n,handleChangeRowsPerPage:r,footerContainer:o,isSelectionMode:i,handleChangePage:a,totalRowCount:s,totalColumnCount:l,totalPages:c,keyboard:u,translator:d,theme:p,interactions:h,rect:m,layout:g})=>{const y=(e=>!e.enabled||e.active)(u)?0:-1,_=f((()=>qH(p.background)),[p]),b=o?o.getBoundingClientRect().width:m.width,x=G$({translator:d}),v=f((()=>({direction:t,pageInfo:n,handleChangeRowsPerPage:r,footerContainer:o,isSelectionMode:i,handleChangePage:a,totalRowCount:s,totalColumnCount:l,totalPages:c,keyboard:u,translator:x,theme:p,interactions:h,rect:m,layout:g,footerStyle:_,tabIndex:y,width:b})),[t,n,r,o,i,a,s,l,c,u,x,p,h,m,g,_,y,b]);return Uo.jsx(VH.Provider,{value:v,children:e})};let YH=function(e){return e.FirstPage="FirstPage",e.LastPage="LastPage",e.NextPage="NextPage",e.PreviousPage="PreviousPage",e}({}),KH=function(e){return e[e.DisplayedRowsLabel=250]="DisplayedRowsLabel",e[e.FirstPage=350]="FirstPage",e[e.LastPage=350]="LastPage",e[e.RowsPerPage=550]="RowsPerPage",e[e.SelectPage=700]="SelectPage",e}({});const XH=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"m7 8 4.5 4.5L10 14 4 8l6-6 1.5 1.5z"})}))),JH=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"m12 2 1.5 1.5L9 8l4.5 4.5L12 14 6 8zM4 2v12H2V2z"})}))),ZH=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"m3.5 2 6 6-6 6L2 12.5 6.5 8 2 3.5zM14 2v12h-2V2z"})}))),QH={FirstPage:JH,PreviousPage:XH,NextPage:lH,LastPage:ZH,FirstPageRTL:ZH,PreviousPageRTL:lH,NextPageRTL:XH,LastPageRTL:JH},eV=({disabledCondition:e,pageNumber:t,type:n})=>{const{direction:r,footerStyle:o,handleChangePage:i,translator:a,interactions:s,tabIndex:l}=GH(),c=n.concat("rtl"===r?"RTL":""),u=QH[c];return{styledProps:{footerStyle:o,disabledCondition:e,size:"small","data-testid":"pagination-action-icon-button","aria-disabled":e,"aria-label":a.get(`NebulaTableUtils.Pagination.${n}`),title:s.passive?a.get(`NebulaTableUtils.Pagination.${n}`):void 0,tabIndex:l,onClick:e?void 0:()=>{i(t)}},IconComponent:u}},tV=()=>{const{pageInfo:e,width:t,interactions:n}=GH(),r=0===e.page,{IconComponent:o,styledProps:i}=eV({type:YH.FirstPage,disabledCondition:r,pageNumber:0});return t<=KH.FirstPage?null:Uo.jsx(BH,{...i,disabled:!n.active,children:Uo.jsx(o,{height:cN})})},nV=(e,t,n=!1)=>{n&&e.key===hN.Tab&&!e.shiftKey&&(YB(e),((e,t,n)=>{const r=e.closest(".qv-object-wrapper")?.querySelector(".sel-toolbar-confirm")?.parentElement??document.querySelector("#qv-selection-toolbar-popover .sel-toolbar-confirm")?.parentElement;r?r.focus():t.focusSelection?.(n)})(e.target,t,!1))},rV=()=>{const{pageInfo:e,keyboard:t,totalPages:n,isSelectionMode:r,width:o,interactions:i}=GH(),a=e.page>=n-1,{IconComponent:s,styledProps:l}=eV({type:YH.LastPage,disabledCondition:a,pageNumber:n-1}),c=t.enabled?e=>{nV(e,t,r)}:void 0;return o<=KH.LastPage?null:Uo.jsx(BH,{...l,onKeyDown:c,disabled:!i.active,children:Uo.jsx(s,{height:cN})})},oV=()=>{const{pageInfo:e,keyboard:t,totalPages:n,isSelectionMode:r,width:o,interactions:i}=GH(),a=e.page>=n-1,{IconComponent:s,styledProps:l}=eV({type:YH.NextPage,disabledCondition:a,pageNumber:e.page+1}),c=!(o>KH.FirstPage&&o>KH.LastPage)&&t.enabled?e=>{nV(e,t,r)}:void 0;return Uo.jsx(BH,{...l,onKeyDown:c,disabled:!i.active,children:Uo.jsx(s,{height:cN})})},iV=()=>{const{pageInfo:e,interactions:t}=GH(),n=0===e.page,{IconComponent:r,styledProps:o}=eV({type:YH.PreviousPage,disabledCondition:n,pageNumber:e.page-1});return Uo.jsx(BH,{...o,disabled:!t.active,children:Uo.jsx(r,{height:cN})})},aV=()=>{const{translator:e,width:t,pageInfo:n,totalRowCount:r}=GH(),{page:o,rowsPerPage:i}=n;if(t<=KH.DisplayedRowsLabel)return null;const a=e.get("NebulaTableUtils.Pagination.DisplayedRowsLabel",[`${o*i+1} - ${Math.min((o+1)*i,r)}`,r.toString()]);return Uo.jsx($H,{variant:"caption",dir:"ltr",children:a})},sV=({name:e,value:t,options:n,handleChange:r})=>{const{layout:o,footerStyle:i,translator:a,tabIndex:s,interactions:l}=GH(),c=o.qInfo.qId,u=a.get(`NebulaTableUtils.Pagination.${e}`),d=`${e}-dropdown`,p=`${d}-label-${c}`,h={tabIndex:s,id:`${d}-${c}`,"data-testid":d,"aria-labelledby":p};return Uo.jsxs(Uo.Fragment,{children:[Uo.jsxs($H,{variant:"caption",id:p,children:[u,":"]}),Uo.jsx(WH,{footerStyle:i,size:"small",native:!0,value:t,onChange:r,inputProps:h,disabled:!l.active,children:n})]})},lV=()=>{const{pageInfo:e,isSelectionMode:t,totalColumnCount:n,width:r,handleChangeRowsPerPage:o}=GH();if(!(!!e.rowsPerPageOptions?.length&&!t&&r>KH.RowsPerPage&&n<=100)||void 0===e.rowsPerPageOptions)return null;const i=Uo.jsx(Uo.Fragment,{children:e.rowsPerPageOptions.map((e=>Uo.jsx("option",{value:e,children:e},e)))});return Uo.jsx(sV,{name:"RowsPerPage",value:e.rowsPerPage,options:i,handleChange:e=>{o?.(+e.target.value)}})},cV=1e3,uV="…",dV=({totalPages:e,page:t})=>{const n=Math.min(e,cV),r=n<e&&t>500,o=r?Math.min(500+t,e):n,i=r?Math.max(0,o-cV):0,a=Array.from(Array(n).keys()).map((e=>{const t=e+i;return Uo.jsx("option",{value:t,children:t+1},t)}));return i>0&&a.unshift(Uo.jsx("option",{value:uV,disabled:!0,children:uV},"startMoreOptions")),o<e-1&&a.push(Uo.jsx("option",{value:uV,disabled:!0,children:uV},"endMoreOptions")),Uo.jsx(Uo.Fragment,{children:a})},pV=()=>{const{pageInfo:e,width:t,totalPages:n,handleChangePage:r}=GH(),{page:o}=e;if(t<=KH.SelectPage)return null;const i=Uo.jsx(dV,{totalPages:n,page:o});return Uo.jsx(sV,{name:"SelectPage",value:o,options:i,handleChange:e=>{r(+e.target.value)}})};var hV=y((e=>Uo.jsxs(UH,{...e,children:[Uo.jsx(lV,{}),Uo.jsx(pV,{}),Uo.jsx(aV,{}),Uo.jsx(tV,{}),Uo.jsx(iV,{}),Uo.jsx(oV,{}),Uo.jsx(rV,{})]})));const fV=e=>Uo.jsx(HH,{...e,children:Uo.jsx(hV,{...e})}),mV=l({}),gV=()=>n(mV),yV=({rect:e,pageInfo:t,qPivotDataPages:n,updatePageInfo:r,direction:o,children:i})=>{const a=f((()=>({rect:e,pageInfo:t,qPivotDataPages:n,updatePageInfo:r,direction:o})),[e,t,n,r,o]);return Uo.jsx(mV.Provider,{value:a,children:i})},_V=l({}),bV=()=>n(_V),xV=({app:e,model:t,theme:n,embed:r,keyboard:o,translator:i,interactions:a,env:s,children:l})=>{const c=f((()=>({model:t,app:e,interactions:a,embed:r,theme:n,keyboard:o,env:s,translator:i})),[e,a,t,r,n,o,s,i]);return Uo.jsx(_V.Provider,{value:c,children:l})},vV=l({}),wV=()=>n(vV),SV=({children:e,...t})=>Uo.jsx(vV.Provider,{value:t,children:e}),CV=()=>{const{text:e,fontFamily:t,fontSize:n,justifyContent:r,alignItems:o,height:i}=(()=>{const{theme:e,translator:t}=bV(),{layoutService:n}=wV(),r=e.getStyle("","","fontFamily")??o$;return n.hasData?n.hasLimitedData?{text:t.get("SNPivotTable.LimitedData"),fontSize:"13px",fontFamily:r,alignItems:"center",height:"22px"}:{}:{text:t.get("SNPivotTable.NoData"),fontSize:"16px",fontFamily:r,justifyContent:"center",alignItems:"center",height:"100%"}})();return void 0===e?null:Uo.jsx("div",{style:{display:"flex",justifyContent:r,alignItems:o,width:"100%",height:i},children:Uo.jsx("span",{style:{...h$,fontFamily:t,fontSize:n,fontStyle:"italic",color:"#7b7a78"},children:e})})},EV="/qHyperCubeDef",kV=-1,MV="PSEUDO-DIM",RV=[];for(let e=0;e<256;++e)RV.push((e+256).toString(16).slice(1));let AV;const IV=new Uint8Array(16);var PV={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function OV(e,t,n){const r=(e=e||{}).random??e.rng?.()??function(){if(!AV){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");AV=crypto.getRandomValues.bind(crypto)}return AV(IV)}();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=15&r[6]|64,r[8]=63&r[8]|128,function(e,t=0){return(RV[e[t+0]]+RV[e[t+1]]+RV[e[t+2]]+RV[e[t+3]]+"-"+RV[e[t+4]]+RV[e[t+5]]+"-"+RV[e[t+6]]+RV[e[t+7]]+"-"+RV[e[t+8]]+RV[e[t+9]]+"-"+RV[e[t+10]]+RV[e[t+11]]+RV[e[t+12]]+RV[e[t+13]]+RV[e[t+14]]+RV[e[t+15]]).toLowerCase()}(r)}const LV=()=>crypto?.randomUUID?.()??function(e){return PV.randomUUID&&!e?PV.randomUUID():OV(e)}(),DV=e=>e===kV?MV:(({qLibraryId:e,cId:t})=>e??t??LV())(e),TV=({layoutService:e,visibleLeftDimensionInfos:t,cell:n,colIdx:r})=>{n&&(n.canBeResized=!0,n.colIdx=n.colIdx||r,n.dimensionInfoIndex===kV?n.columnWidthLocation=rW.Measures:n.isLeftDimension?n.columnWidthLocation=rW.Dimension:t.at(-1)===kV?n.columnWidthLocation=rW.Measures:e.hasPseudoDimOnLeft&&(n.columnWidthLocation=rW.Pivot))},zV=(e,t,n,r)=>{const o=DV(n),i=e.getDimensionInfoIndex(n),a=e.isLeftDimension(i);return n===kV?{id:o,colIdx:-1,label:"",sortDirection:"A",fieldId:"",isLocked:!1,isDim:!1,isCyclic:!1,groupDimensionPos:0,groupDimensionLabels:[],headTextAlign:"left",dimensionInfoIndex:i,canBeResized:!1,isLeftDimension:a,isLastDimension:r,columnWidthLocation:rW.Measures,isPivot:!0,qEffectiveDimensionName:void 0}:{id:o,colIdx:0,label:n.qFallbackTitle,qReverseSort:n.qReverseSort,sortDirection:n.qSortIndicator&&"N"!==n.qSortIndicator?n.qSortIndicator:"A",qLibraryId:n.qLibraryId,fieldId:n.qGroupFieldDefs[n.qGroupPos],isLocked:n.qLocked??!1,columnWidth:n.columnWidth,qApprMaxGlyphCount:n.qApprMaxGlyphCount,isDim:!0,isCyclic:n.qGrouping===bN.Cyclic,groupDimensionPos:n.qGroupPos,groupDimensionLabels:n.qGroupFallbackTitles,headTextAlign:"left",dimensionInfoIndex:i,canBeResized:!1,isLeftDimension:a,isLastDimension:r,columnWidthLocation:rW.Dimension,isPivot:!0,isSortedByFirstMeasure:t.isSortedByFirstMeasure,qEffectiveDimensionName:n.qEffectiveDimensionName}},jV=({layoutService:e,effectivePropertiesService:t,lastRow:n,lastCol:r})=>{let o=r;var i;n.length>0&&(o=(i=r).at(-1)===kV?i.slice(0,-1):i);const a=o.length+(n.length?1:0),s=Math.max(1,n.length),l=((e,t)=>Array(e).fill(null).map((()=>Array.from({length:t},(()=>null)))))(a,s);return n.forEach(((n,r,o)=>{const i=r===o.length-1;l[a-1][r]=zV(e,t,n,i)})),o.forEach(((n,r,o)=>{const i=r===o.length-1;l[r][s-1]=zV(e,t,n,i)})),l},NV=(e,t,n,r)=>{const o=((e,t,n,r)=>{let o;return o=0===n.length||n.includes(kV)?jV({layoutService:e,effectivePropertiesService:t,lastRow:r,lastCol:n}):(e=>e[0].map(((t,n)=>e.map((e=>e[n])))))(jV({layoutService:e,effectivePropertiesService:t,lastRow:n,lastCol:r})),e.isIndentModeEnabled&&o[o.length-1].length>1&&(o[o.length-1]=[o.at(-1),...new Array(o[0]?o[0].length-1:0).fill(null)]),o.length&&o.at(-1)?.forEach(((t,n)=>{Array.isArray(t)?t.forEach(((t,n)=>{TV({layoutService:e,visibleLeftDimensionInfos:r,cell:t,colIdx:n})})):TV({layoutService:e,visibleLeftDimensionInfos:r,cell:t,colIdx:n})})),o})(e,t,n,r);return{data:o,size:{x:o[0]?.length??0,y:o.length}}};function qV(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function FV(e,t,n){return t=HV(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,GV()?Reflect.construct(t,n||[],HV(e).constructor):t.apply(e,n))}function WV(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BV(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,KV(r.key),r)}}function $V(e,t,n){return t&&BV(e.prototype,t),n&&BV(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function HV(e){return HV=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},HV(e)}function VV(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&UV(e,t)}function GV(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(GV=function(){return!!e})()}function UV(e,t){return UV=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},UV(e,t)}function YV(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t);else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return qV(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qV(e,t):void 0}}(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 KV(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}function XV(e){return XV="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},XV(e)}var JV={fromSearchString:function(e){if(!e)return[];"?"===e[0]&&(e=e.substr(1));var t=[];return e.split("&").forEach((function(e){if(e){var n,r=e.indexOf("="),o="",i=!1;-1===r?n=e:(n=e.slice(0,r),o=e.slice(r+1),i=!0),t.push(function(e,t,n){return{key:ZV(e),value:ZV(t),useEqualSign:n}}(n,o,i))}})),t}};function ZV(e){try{return decodeURIComponent(e)}catch(t){return e}}function QV(e){if(!(this instanceof QV))throw new Error("Url needs to be called with the new keyword");if(!e)throw new Error("Url needs a string to operate on");var t=function(e){var t={authorityAndPath:"",search:"",hash:""},n=e.indexOf("#");-1!==n&&(t.hash=e.substr(n),e=e.substr(0,n));n=e.indexOf("?"),-1!==n&&(t.search=e.substr(n),e=e.substr(0,n));return t.authorityAndPath=e,t}(e);Object.defineProperties(this,{authorityAndPath:{value:t.authorityAndPath},search:{value:t.search},hash:{value:t.hash},searchParams:{get:function(){return JV.fromSearchString(t.search)}}})}function eG(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";")}QV.encodeAuthorityAndPath=function(e){return encodeURI(e).replace(/%5B/gi,"[").replace(/%5D/gi,"]").replace(/%25/gi,"%")},QV.encodeSearchParams=function(e){for(var t,n="",r=0;r<e.length;r++)n+=0===r?"?":"&",n+=eG((t=e[r]).key),t.value?n+="=".concat(eG(t.value)):n+=t.useEqualSign?"=":"";return n};var tG,nG=function(){return $V((function e(t){WV(this,e),this._input=t,this._pushback=null,this._temp=null,this._index=0,this._mark=0}),[{key:"_hasNext",value:function(){return null!=this._input&&(0!==this._input.length&&this._index<this._input.length)}},{key:"pushback",value:function(e){this._pushback=e}},{key:"index",value:function(){return this._index}},{key:"hasNext",value:function(){return null!=this._pushback||this._hasNext()}},{key:"next",value:function(){if(null!=this._pushback){var e=this._pushback;return this._pushback=null,e}return this._hasNext()?this._input.charAt(this._index++):null}},{key:"nextHex",value:function(){var e=this.next();return null==e?null:e.match(/[0-9A-Fa-f]/)?e:null}},{key:"peek",value:function(e){return e?!(!this._pushback||this._pushback!==e)||!!this._hasNext()&&this._input.charAt(this._index)===e:this._pushback?this._pushback:this._hasNext()?this._input.charAt(this._index):null}},{key:"mark",value:function(){this._temp=this._pushback,this._mark=this._index}},{key:"reset",value:function(){this._pushback=this._temp,this._index=this._mark}},{key:"remainder",value:function(){var e=this._input.substr(this._index);return null!=this._pushback&&(e=this._pushback+e),e}}])}(),rG=function(){return $V((function e(){WV(this,e)}),[{key:"decode",value:function(e){for(var t,n="",r=new nG(e);r.hasNext();)n+=null!=(t=this.decodeCharacter(r))?t:r.next();return n}},{key:"decodeCharacter",value:function(e){return e.next()}}])}(),oG=function(e){return e>=0&&e<=1114111},iG=function(e){return e.match(/[\s]/)},aG=function(){function e(){return WV(this,e),FV(this,e,arguments)}return VV(e,rG),$V(e,[{key:"decodeCharacter",value:function(e){e.mark();var t,n,r,o=e.next();if(null==o||"\\"!==o)return e.reset(),null;var i=e.next();if(null==i)return e.reset(),null;switch(i){case"\r":e.peek("\n")&&e.next();case"\n":case"\f":case"\0":return this.decodeCharacter(e)}if("NaN"===parseInt(i,16))return i;for(t=i,n=0;n<5&&(null!=(r=e.next())&&!iG(r));n++){if("NaN"===parseInt(r,16)){e.pushback(r);break}t+=r}var a=parseInt(t,16);return oG(a)?String.fromCharCode(a):"�"}}])}(),sG=function(){function e(t,n){WV(this,e),this._key=t,this._value=n}return $V(e,[{key:"getKey",value:function(){return this._key}},{key:"getValue",value:function(){return this._value}},{key:"equals",value:function(t){return t instanceof e&&(this._key===t._key&&this._value===t._value)}}],[{key:"newInstanceIfNeeded",value:function(){var t,n,r=arguments[0];return"string"==typeof arguments[1]?(t=arguments[1],n=r.length):(n=arguments[1],t=arguments[2]),t&&r?(r.length>n&&(r=r.substr(0,n)),new e(r,t)):null}}])}(),lG=function(){function e(){WV(this,e)}return $V(e,[{key:"setValue",value:function(e){this._nextMap=null,this._value=e}},{key:"getNextNode",value:function(e){return this._nextMap?this._nextMap[e]:null}},{key:"put",value:function(t,n,r){var o,i;if(t.length===n)return i=this._value,this.setValue(r),i;var a=t.charAt(n);return this._nextMap?(o=this._nextMap[a])||(o=new e,this._nextMap[a]=o):(this._nextMap={},o=new e,this._nextMap[a]=o),o.put(t,n+1,r)}},{key:"get",value:function(e,t){if(e.length<=t)return this._value;var n=this.getNextNode(e.charAt(t));return n?n.get(e,t+1):null}},{key:"getLongestMatch",value:function(e,t){if(e.length<=t)return sG.newInstanceIfNeeded(e,this._value);var n=this.getNextNode(e.charAt(t));if(!n)return sG.newInstanceIfNeeded(e,t,this._value);var r=n.getLongestMatch(e,t+1);return r||sG.newInstanceIfNeeded(e,t,this._value)}}])}(),cG=function(){return $V((function e(){WV(this,e),this.clear()}),[{key:"getLongestMatch",value:function(e){return this.root&&e?this.root.getLongestMatch(e,0):null}},{key:"getMaxKeyLength",value:function(){return this.maxKeyLen}},{key:"clear",value:function(){this.root=null,this.maxKeyLen=0,this.size=0}},{key:"put",value:function(e,t){this.root||(this.root=new lG);var n=this.root.put(e,0,t);return n||(e.length>this.maxKeyLen&&(this.maxKeyLen=e.length),this.size++,null)}}])}(),uG=function(){var e,t,n,r=[],o=[],i=new cG;for(e in r["""]="34",r["&"]="38",r["<"]="60",r[">"]="62",r[" "]="160",r["¡"]="161",r["¢"]="162",r["£"]="163",r["¤"]="164",r["¥"]="165",r["¦"]="166",r["§"]="167",r["¨"]="168",r["©"]="169",r["ª"]="170",r["«"]="171",r["¬"]="172",r["­"]="173",r["®"]="174",r["¯"]="175",r["°"]="176",r["±"]="177",r["²"]="178",r["³"]="179",r["´"]="180",r["µ"]="181",r["¶"]="182",r["·"]="183",r["¸"]="184",r["¹"]="185",r["º"]="186",r["»"]="187",r["¼"]="188",r["½"]="189",r["¾"]="190",r["¿"]="191",r["À"]="192",r["Á"]="193",r["Â"]="194",r["Ã"]="195",r["Ä"]="196",r["Å"]="197",r["Æ"]="198",r["Ç"]="199",r["È"]="200",r["É"]="201",r["Ê"]="202",r["Ë"]="203",r["Ì"]="204",r["Í"]="205",r["Î"]="206",r["Ï"]="207",r["Ð"]="208",r["Ñ"]="209",r["Ò"]="210",r["Ó"]="211",r["Ô"]="212",r["Õ"]="213",r["Ö"]="214",r["×"]="215",r["Ø"]="216",r["Ù"]="217",r["Ú"]="218",r["Û"]="219",r["Ü"]="220",r["Ý"]="221",r["Þ"]="222",r["ß"]="223",r["à"]="224",r["á"]="225",r["â"]="226",r["ã"]="227",r["ä"]="228",r["å"]="229",r["æ"]="230",r["ç"]="231",r["è"]="232",r["é"]="233",r["ê"]="234",r["ë"]="235",r["ì"]="236",r["í"]="237",r["î"]="238",r["ï"]="239",r["ð"]="240",r["ñ"]="241",r["ò"]="242",r["ó"]="243",r["ô"]="244",r["õ"]="245",r["ö"]="246",r["÷"]="247",r["ø"]="248",r["ù"]="249",r["ú"]="250",r["û"]="251",r["ü"]="252",r["ý"]="253",r["þ"]="254",r["ÿ"]="255",r["&OElig"]="338",r["&oelig"]="339",r["&Scaron"]="352",r["&scaron"]="353",r["&Yuml"]="376",r["&fnof"]="402",r["&circ"]="710",r["&tilde"]="732",r["&Alpha"]="913",r["&Beta"]="914",r["&Gamma"]="915",r["&Delta"]="916",r["&Epsilon"]="917",r["&Zeta"]="918",r["&Eta"]="919",r["&Theta"]="920",r["&Iota"]="921",r["&Kappa"]="922",r["&Lambda"]="923",r["&Mu"]="924",r["&Nu"]="925",r["&Xi"]="926",r["&Omicron"]="927",r["&Pi"]="928",r["&Rho"]="929",r["&Sigma"]="931",r["&Tau"]="932",r["&Upsilon"]="933",r["&Phi"]="934",r["&Chi"]="935",r["&Psi"]="936",r["&Omega"]="937",r["&alpha"]="945",r["&beta"]="946",r["&gamma"]="947",r["&delta"]="948",r["&epsilon"]="949",r["&zeta"]="950",r["&eta"]="951",r["&theta"]="952",r["&iota"]="953",r["&kappa"]="954",r["&lambda"]="955",r["&mu"]="956",r["&nu"]="957",r["&xi"]="958",r["&omicron"]="959",r["&pi"]="960",r["&rho"]="961",r["&sigmaf"]="962",r["&sigma"]="963",r["&tau"]="964",r["&upsilon"]="965",r["&phi"]="966",r["&chi"]="967",r["&psi"]="968",r["&omega"]="969",r["&thetasym"]="977",r["&upsih"]="978",r["&piv"]="982",r["&ensp"]="8194",r["&emsp"]="8195",r["&thinsp"]="8201",r["&zwnj"]="8204",r["&zwj"]="8205",r["&lrm"]="8206",r["&rlm"]="8207",r["&ndash"]="8211",r["&mdash"]="8212",r["&lsquo"]="8216",r["&rsquo"]="8217",r["&sbquo"]="8218",r["&ldquo"]="8220",r["&rdquo"]="8221",r["&bdquo"]="8222",r["&dagger"]="8224",r["&Dagger"]="8225",r["&bull"]="8226",r["&hellip"]="8230",r["&permil"]="8240",r["&prime"]="8242",r["&Prime"]="8243",r["&lsaquo"]="8249",r["&rsaquo"]="8250",r["&oline"]="8254",r["&frasl"]="8260",r["&euro"]="8364",r["&image"]="8365",r["&weierp"]="8472",r["&real"]="8476",r["&trade"]="8482",r["&alefsym"]="8501",r["&larr"]="8592",r["&uarr"]="8593",r["&rarr"]="8594",r["&darr"]="8595",r["&harr"]="8596",r["&crarr"]="8629",r["&lArr"]="8656",r["&uArr"]="8657",r["&rArr"]="8658",r["&dArr"]="8659",r["&hArr"]="8660",r["&forall"]="8704",r["&part"]="8706",r["&exist"]="8707",r["&empty"]="8709",r["&nabla"]="8711",r["&isin"]="8712",r["¬in"]="8713",r["&ni"]="8715",r["&prod"]="8719",r["&sum"]="8721",r["&minus"]="8722",r["&lowast"]="8727",r["&radic"]="8730",r["&prop"]="8733",r["&infin"]="8734",r["&ang"]="8736",r["&and"]="8743",r["&or"]="8744",r["&cap"]="8745",r["&cup"]="8746",r["&int"]="8747",r["&there4"]="8756",r["&sim"]="8764",r["&cong"]="8773",r["&asymp"]="8776",r["&ne"]="8800",r["&equiv"]="8801",r["&le"]="8804",r["&ge"]="8805",r["&sub"]="8834",r["&sup"]="8835",r["&nsub"]="8836",r["&sube"]="8838",r["&supe"]="8839",r["&oplus"]="8853",r["&otimes"]="8855",r["&perp"]="8869",r["&sdot"]="8901",r["&lceil"]="8968",r["&rceil"]="8969",r["&lfloor"]="8970",r["&rfloor"]="8971",r["&lang"]="9001",r["&rang"]="9002",r["&loz"]="9674",r["&spades"]="9824",r["&clubs"]="9827",r["&hearts"]="9829",r["&diams"]="9830",r)"function"!=typeof r[e]&&r.hasOwnProperty(e)&&(o[r[e]]=e);for(t in o)"function"!=typeof o[t]&&o.hasOwnProperty(t)&&(n=o[t].toLowerCase().substr(1),i.put(n,String.fromCharCode(t)));return i}(),dG=function(){function e(){return WV(this,e),FV(this,e,arguments)}return VV(e,rG),$V(e,[{key:"decodeCharacter",value:function(e){var t;e.mark();var n=e.next();if(null==n||"&"!==n)return e.reset(),null;var r=e.next();if(null==r)return e.reset(),null;if("#"===r){if(null!=(t=this._getNumericEntity(e)))return t}else if(r.match(/[A-Za-z]/)&&(e.pushback(r),null!=(t=this._getNamedEntity(e))))return t;return e.reset(),null}},{key:"_getNamedEntity",value:function(e){var t,n,r,o="";for(t=Math.min(e.remainder().length,uG.getMaxKeyLength()),r=0;r<t;r++)o+=e.next().toLowerCase();var i=uG.getLongestMatch(o);if(null==i)return null;for(e.reset(),e.next(),t=i.getKey().length,n=0;n<t;n++)e.next();return e.peek(";")&&e.next(),i.getValue()}},{key:"_getNumericEntity",value:function(e){var t=e.peek();return null==t?null:"x"===t||"X"===t?(e.next(),this._parseHex(e)):this._parseNumber(e)}},{key:"_parseHex",value:function(e){for(var t,n="";e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,16))){if(";"===t){e.next();break}break}n+=t,e.next()}var r=parseInt(n,16);return!Number.isNaN(+r)&&oG(r)?String.fromCharCode(r):null}},{key:"_parseNumber",value:function(e){for(var t,n="";e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,10))){if(";"===t){e.next();break}break}n+=t,e.next()}var r=parseInt(n,10);return!Number.isNaN(+r)&&oG(r)?String.fromCharCode(r):null}}])}(),pG=function(){function e(){return WV(this,e),FV(this,e,arguments)}return VV(e,rG),$V(e,[{key:"decodeCharacter",value:function(e){e.mark();var t,n,r,o,i=e.next();if(null==i)return e.reset(),null;if("%"!==i)return e.reset(),null;for(t="",n=0;n<2;n++)null!=(r=e.nextHex())&&(t+=r);return 2===t.length&&(o=parseInt(t,16),oG(o))?String.fromCharCode(o):(e.reset(),null)}}])}(),hG=/^data:(?<!\s)\s*(image\/[\w+-.]+)(?<!\s)\s*(;.*?){0,1}(?<!\s)\s*,(.*)/i;"undefined"!=typeof document&&(tG=document.createElement("div"));var fG=Array.prototype.indexOf,mG=[",",".","_"," "],gG=[",",".","-","_"," "],yG={width:["%"],height:["%"]},_G={default:["-"," ","%"],color:["#"," ","(",")"],image:["(",")",":","/","?","&","-",".",'"',"="," "]},bG={background:["(",")",":","%","/","?","&","-"," ",".",'"',"=","#"],"background-image":_G.image,"background-color":_G.color,"border-color":_G.color,"border-image":_G.image,color:_G.color,icon:_G.image,"list-style-image":_G.image,"outline-color":_G.color},xG={attr_name:["^on[a-z]{1,}","style","href","src"],attr_val:["javascript:","data:"],css_key:["behavior","-moz-behavior","-ms-behavior"],css_val:["expression"]};function vG(e,t,n){var r;if(t){if(fG)return fG.call(t,e,n);for(r=t.length,n=n?n<0?Math.max(0,r+n):n:0;n<r;n++)if(n in t&&t[n]===e)return n}return-1}function wG(e){if(null==e)return"";var t,n=document.createTextNode(e);return tG.appendChild(n),t=tG.innerHTML,tG.removeChild(n),t}function SG(e,t,n){var r,o,i,a,s,l,c,u,d;for(e=EG(e).toLowerCase(),t=EG(t),i=0;i<xG.attr_name.length;i++)if(e.match(xG.attr_name[i]))throw new Error("Unsafe attribute name used: ".concat(e));for(i=0;i<xG.attr_val.length;i++)if(t.toLowerCase().match(xG.attr_val[i]))throw new Error("Unsafe attribute value used: ".concat(t));if((r=yG[e])||(r=gG),o="",!n){for(a=0;a<e.length;a++){if(!(s=e.charAt(a)).match(/[a-zA-Z\-0-9]/))throw new Error("Invalid attribute name specified");o+=s}o+='="'}for(l=0;l<t.length;l++)c=t.charAt(l),u=t.charCodeAt(l),!c.match(/[a-zA-Z0-9]/)&&vG(c,r)<0?(d=u.toString(16),o+="&#x".concat(d,";")):o+=c;return n||(o+='"'),o}function CG(e,t,n){var r,o,i,a,s,l,c,u,d,p;if(e=EG(e).toLowerCase(),t=EG(t),vG(e,xG.css_key)>=0)throw new Error("Unsafe property name used: ".concat(e));for(r=0;r<xG.css_val.length;r++)if(t.toLowerCase().indexOf(xG.css_val[r])>=0)throw new Error("Unsafe property value used: ".concat(t));if((o=bG[e])||(o=_G.default),i="",!n){for(a=0;a<e.length;a++){if(!(s=e.charAt(a)).match(/[a-zA-Z-]/))throw new Error("Invalid Property Name specified");i+=s}i+=": "}for(l=0;l<t.length;l++)c=t.charAt(l),u=t.charCodeAt(l),!c.match(/[a-zA-Z0-9]/)&&vG(c,o)<0?(d=u.toString(16),p="000000".substr(d.length),i+="\\".concat(p).concat(d)):i+=c;return i}function EG(e,t){var n,r,o,i,a=!1;if(null===e)return null;n=e,r=e,o=0;for(var s=[new dG,new pG,new aG];!a;){r=n;for(var l=0;l<s.length;l++)(i=s[l].decode(n))!==n&&(o++,n=i);r!==n||(a=!0)}if(t&&o>1)throw new Error("Attack Detected - Multiple/Double Encodings used in input");return n}for(var kG=[],MG=0;MG<255;MG++)kG[MG]=MG>=48&&MG<=57||MG>=65&&MG<=90||MG>=97&&MG<=122?null:MG.toString(16);var RG=function(e){return wG(e.unsafe)},AG=function(e){var t,n=[],r=[],o={},i="";for(t in e.map?n=e.map:n[e.name]=e.unsafe,n)"function"!=typeof n[t]&&n.hasOwnProperty(t)&&(r[t]=CG(t,n[t],!0),i+=CG(t,n[t],!0),o[t]=r[t]);return e.map?o:i},IG=function(e){var t=[],n=[],r={},o="";for(var i in e.map?t=e.map:t[e.name]=e.unsafe,t)"function"!=typeof t[i]&&t.hasOwnProperty(i)&&(n[i]=SG(i,t[i],!0),o+=SG(i,t[i],!0),r[i]=n[i]);return e.map?r:o};function PG(e,t){throw new Error(t)}var OG={canonicalize:EG,encode:function(){var e={context:"html",unsafe:null,name:null,map:null,setter:null,strict:!0};return 1===arguments.length&&"object"===XV(arguments[0])?function(){for(var e,t,n,r=arguments[0]||{},o=1,i=arguments.length;o<i;o++)if(null!=(e=arguments[o]))for(t in e)if(e.hasOwnProperty(t)){if(r===(n=e[t]))continue;void 0!==n&&(r[t]=n)}}(e,arguments[0]):(e.context=arguments[0],2===arguments.length?"html"===e.context?e.unsafe=arguments[1]:"attr"!==e.context&&"css"!==e.context||(e.map=arguments[1]):(e.name=arguments[2],e.unsafe=arguments[1])),"html"===e.context?RG(e):"css"===e.context?(null!=e.map&&"object"!==XV(e.map)&&PG(this,"Invalid parameter type"),AG(e)):"attr"===e.context?(null!=e.map&&"object"!==XV(e.map)&&PG(this,"Invalid parameter type"),IG(e)):void PG(this,"Invalid parameter type")},encodeForAttr:SG,encodeForAttr2:function(e){return SG("nonsens",e,!0)},encodeForCSS:CG,encodeForHref:function(e){EG(e),0!==e.search("[a-zA-Z0-9]+:")&&(e="http://".concat(e));var t=new QV(e),n=QV.encodeAuthorityAndPath(decodeURI(t.authorityAndPath)),r=t.searchParams,o=(e=n+QV.encodeSearchParams(r)+t.hash).toLowerCase();if(-1!==o.indexOf("javascript:"))throw new Error("Attack Detected - Javascript in input");if(-1!==o.indexOf("data:"))throw new Error("Attack Detected - data in input");return e},encodeForJS:function(e,t){var n,r,o,i,a,s;for(t||(t=mG),s="",n=0;n<e.length;n++)o=e.charAt(n),i=e.charCodeAt(n),vG(o,t)>=0||null==kG[i]?s+=o:(r=i.toString(16),i<256?(a="00".substr(r.length),s+="\\x".concat(a).concat(r.toUpperCase())):(a="0000".substr(r.length),s+="\\u".concat(a).concat(r.toUpperCase())));return s},encodeForHTML:wG,encodeForURL:function(e,t){var n="";return t&&(t.match(/^[A-Za-z\-0-9]{1,}$/)?n+=EG(t).toLowerCase():PG(this,"Illegal Attribute Name Specified"),n+='="'),n+=encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A"),n+=t?'"':""},isSafeDataURL:function(e,t){var n=null!=t?t:{},r=n.maxByteSizeSvg,o=void 0===r?5e5:r,i=n.maxByteSizeImage,a=void 0===i?5e6:i,s=function(e){var t,n=YV(null!==(t=hG.exec(e.trim()))&&void 0!==t?t:[],4),r=n[1];return{encoding:n[2],data:n[3],mimeType:null==r?void 0:r.toLocaleLowerCase()}}(e),l=s.mimeType,c=s.encoding,u=s.data;if(!u)return!0;var d=function(e,t,n){var r={type:e};if(null!=t&&t.includes(";base64"))try{return new Blob([atob(n)],r).size}catch(e){return new Blob([n],r).size}return"image/svg+xml"===e?new Blob([n],r).size:0}(l,c,u);return"image/svg+xml"===l?d<=o:d<=a},validateURI:function(e){if(""===e||function(e){if("canParse"in URL)return URL.canParse(e);try{return new URL(e),!0}catch(e){return!1}}(e))return!1;var t=e.replace(/%2E/gi,".");if(t.match(/[#&=: ]/))return!1;var n=function(e){for(var t=e,n="";t.length>0;)if(t.startsWith("../")||t.startsWith("./"))t=t.replace(/^\.\.?\//,"");else if(t.startsWith("/./"))t=t.replace(/^\/\.\//,"/");else if("/."===t)t="/";else if(t.startsWith("/../")){t=t.replace(/^\/\.\.\//,"/");var r=n.lastIndexOf("/");-1!==r&&(n=n.slice(0,r))}else if("/.."===t){t="/";var o=n.lastIndexOf("/");-1!==o&&(n=n.slice(0,o))}else if("."===t||".."===t)t="";else{var i=t.match(/^\/?[^/]*/),a=i?i[0]:"";t=t.slice(a.length),n+=a}return n}(t);return""!==n&&"/"!==n&&n}};const LG=(e,t)=>t.qAttrExps?.qValues?.[e],DG=(e,t)=>{switch(e){case"topLeft":default:return{horizontal:"rtl"===t?"flex-end":"flex-start",vertical:"flex-start"};case"centerLeft":return{horizontal:"center",vertical:"flex-start"};case"bottomLeft":return{horizontal:"rtl"===t?"flex-start":"flex-end",vertical:"flex-start"};case"topCenter":return{horizontal:"rtl"===t?"flex-end":"flex-start",vertical:"center"};case"centerCenter":return{horizontal:"center",vertical:"center"};case"bottomCenter":return{horizontal:"rtl"===t?"flex-start":"flex-end",vertical:"center"};case"topRight":return{horizontal:"rtl"===t?"flex-end":"flex-start",vertical:"flex-end"};case"centerRight":return{horizontal:"center",vertical:"flex-end"};case"bottomRight":return{horizontal:"rtl"===t?"flex-start":"flex-end",vertical:"flex-end"}}},TG=({text:e,url:t,imageSize:n,imagePosition:r,labelStructure:o,imageBox:i,direction:a})=>r&&t&&!t.toLowerCase().includes("javascript:")&&OG.isSafeDataURL(t)?{type:XF.Image,url:t,text:e,imageSize:n,resolvedImagePosition:DG(r,a),labelStructure:o,imageBox:i}:{type:XF.Text,url:void 0,text:e,labelStructure:o},zG=(e,t,n,r)=>{if(!e.qMiniChart||!t?.miniChart||!n)return{type:XF.Text,text:r};const{minY:o,maxY:i}=((e,t,n)=>{const r="global"===t.yAxis?.scale,o="zeroCenter"===t.yAxis?.position,i=r?n.qYMin:e.qMiniChart.qMin,a=r?n.qYMax:e.qMiniChart.qMax;if(o){const e=Math.max(Math.abs(i),Math.abs(a));return{minY:-e,maxY:e}}return(e=>"zeroBaseline"===e.yAxis?.position||"bars"===e.type&&"auto"===e.yAxis?.position)(t)?{minY:Math.min(0,i),maxY:Math.max(0,a)}:{minY:i,maxY:a}})(e,t.miniChart,n),a={type:t.miniChart.type,qMatrix:e.qMiniChart.qMatrix,minY:o,maxY:i,showDots:!!t.miniChart.showDots,colors:t.miniChart.colors,colorMin:e.qMiniChart.qMin,colorMax:e.qMiniChart.qMax};return{type:XF.MiniChart,text:r,miniChart:a}},jG=(e,t,n)=>{const r=Array.isArray(t.qAttrExps)?t.qAttrExps[0]:t.qAttrExps,o=r?.qValues?.[e];if(o){const e=Number.isNaN(+o.qNum)?void 0:`${o.qNum}`;return o.qText||e}return n?.urlPosition===JF.Attribute?void 0:n?.urlLabel},NG=({labelStructure:e,text:t,url:n})=>{try{if(!n)throw Error("Invalid url");return{type:XF.Link,url:OG.encodeForHref(n),text:t,labelStructure:e}}catch{return{type:XF.Text,url:void 0,text:t,labelStructure:e}}},qG=({cell:e,representationProperties:t,attrExprInfoIndex:n,env:r,conditionalColoring:o,miniChartOnMeasure:i,labelStructure:a,getText:s=e=>e.qText,direction:l,enabledFeatures:c})=>{const u=ZF(t),d=s(e);return u===XF.Image&&c[XF.Image]&&!r.anything.sense?.isUnsupportedFeature?.("tableImages")?((e,t,n,r,o,i)=>{const{imageSize:a,imagePosition:s,imageSetting:l,imageLabel:c,imageBox:u}=t??{};if("url"===l){const t=LG(n.imageUrl??-1,e)?.qText;return i&&(i.maskedValue=t??""),TG({text:r,url:t,imageSize:a,imagePosition:s,labelStructure:i,imageBox:u,direction:o})}if("label"===l){const t=i?i.originalValue:r;if(-1===n.imageLabel)return TG({text:c||t||"",url:t,imageSize:a,imagePosition:s,labelStructure:i,imageBox:u,direction:o});const l=LG(n.imageLabel??-1,e)?.qText??r;return TG({text:l,url:t,imageSize:a,imagePosition:s,labelStructure:i,imageBox:u,direction:o})}return{type:XF.Text,url:void 0,labelStructure:i,text:r}})(e,t,n,d,l,a):u===XF.Link?((e,t,n,r,o)=>{const{urlPosition:i}=t??{};if(i===JF.Attribute){const i=jG(n.url??-1,e,t);return NG({labelStructure:r,text:o||i||"",url:i})}if(i===JF.Dimension){const i=jG(n.urlLabel??-1,e,t)||o;return r&&(r.maskedValue=i),NG({text:i,labelStructure:r,url:r?.originalValue??o})}return{type:XF.Text,url:void 0,text:o,labelStructure:r}})(e,t,n,a,d):u===XF.Indicator&&c[XF.Indicator]&&!r.anything.sense?.isUnsupportedFeature?.("tableIndicators")?((e,t,n)=>{const{indicator:r}=e??{};return{type:XF.Indicator,url:void 0,text:n,indicator:{applySegmentColors:r?.applySegmentColors,position:r?.position,showTextValues:r?.showTextValues},indicatorConditionalColoring:t}})(t,o,d):u===XF.MiniChart&&c[XF.MiniChart]&&!r.anything.sense?.isUnsupportedFeature?.("qMiniChartDef")?zG(e,t,i,d):{type:XF.Text,url:void 0,text:d,labelStructure:a}},FG=(e,t)=>{const n=t.qAttrExps,r=n?.qValues?.[e?.cellForegroundColor??-1]?.qText,o=n?.qValues?.[e?.cellBackgroundColor??-1]?.qText,i=o?UB(o):null,a=r?UB(r):null,s=((e,t)=>e||!t?null:HB(t))(a,i);return{color:s??a,background:i}},WG=(e,t)=>t.qSubNodes.reduce(((e,t)=>0===t.qSubNodes.length?e+1:WG(e,t)),e),BG=(e,t,n,r,o,i)=>{const a=o?i.rowsPerPage-n:a$-r;let s=e.qUp+e.qDown;if(o&&0===n){const n=(t+e.qUp)%i.rowsPerPage;s=e.qDown+n}return Math.min(a,WG(s,e))},$G=({node:e,parent:t,root:n,x:r,y:o,pageY:i,layoutService:a,dimensionInfo:s,attrExprInfoIndex:l,isLeftColumn:c=!0,isIndentModeEnabled:u=!1,pseudoDimMeasureIndex:d,indentLevel:p,labelStructure:h,env:f,pageInfo:m,direction:g="ltr"})=>{const y=(!u||!c)&&"P"===e.qType,_=((e,t)=>{if(e!==kV){if(t){const t=ZF(e.representation);return t===XF.Link||t===XF.Image?e.representation:{type:XF.Text}}return e.representation}})(s,u),b=(({node:e,isLeftColumn:t,isIndentModeEnabled:n,labelStructure:r,representationType:o,parentOrRootOriginalValue:i})=>{let a=e.qText;if(t&&n&&r){const{originalValue:t,delimeter:n,suffix:s}=r;a=o===XF.Link?"P"===e.qType?i:t:`${t} ${!s||!t&&s?"":n} ${s}`.trim()}return a})({node:e,isLeftColumn:c,isIndentModeEnabled:u,labelStructure:h,representationType:ZF(_),parentOrRootOriginalValue:(t||n)?.representation?.labelStructure?.originalValue??""}),x=qG({cell:{...e,qText:b},representationProperties:_,attrExprInfoIndex:l,env:f,labelStructure:h,direction:g,enabledFeatures:{[XF.Image]:!0,[XF.Indicator]:!0}}),v={id:LV(),ref:e,x:r,y:o,pageX:r,pageY:i,mainAxisPageCoord:c?i:r,isLeftColumn:c,parent:t,root:n,children:[],isLeafNode:0===e.qSubNodes.length,leafCount:BG(e,o,i,r,c,m),distanceToNextCell:0,isLockedByDimension:!("object"!=typeof s||!s.qLocked),isTotal:"T"===e.qType||!!t?.isTotal,isEmpty:"E"===e.qType||-4===e.qElemNo,isNull:"U"===e.qType,isPseudoDimension:y,expressionColor:FG(l,e),selectionCellType:c?"L":"T",dimensionInfoIndex:a.getDimensionInfoIndex(s),canBeResized:0===e.qSubNodes.length&&!c,visibleMeasureInfoIndex:d??(y?e.qElemNo:t?.visibleMeasureInfoIndex),representation:x,...void 0!==p&&{indentLevel:p}};return t&&(t.children[v.mainAxisPageCoord-t.mainAxisPageCoord]=v),v},HG=(e,t,n,r,o,i,a,s,l)=>{const{isIndentModeEnabled:c}=o;if(!t.length)return e;let u=0;return function t(d,p,h,f=0,m=-1){e[f]||(e[f]={}),c&&m++;const g=o.leftDimensionInfoIndexes.indexOf(kV);h.forEach(((h,y)=>{const _={originalValue:h.qText??"",maskedValue:"",delimeter:"-",suffix:""};u+=0===y?0:1;const b=n.qTop-r.page*r.rowsPerPage,x=Math.max(0,b+u-h.qUp),v=n.qTop+u-h.qUp;let w;if(c){if(o.hasPseudoDimOnLeft&&m<=g)if(_.originalValue=h.qText??"",_.maskedValue=h.qText??"","N"===h.qType||"U"===h.qType||"T"===h.qType)"U"===h.qType&&(_.originalValue=o.getNullValueText()),m<g&&(_.suffix=o.visibleMeasureInfo[0].qFallbackTitle);else if("P"===h.qType){_.originalValue=(p||d)?.representation.labelStructure?.originalValue??"",_.maskedValue=(p||d)?.representation.labelStructure?.originalValue??"",_.suffix=h.qText??"";const e=h.qSubNodes;w=h.qElemNo,h={...(p||d)?.ref,...h.qText?{qText:h.qText}:{},qSubNodes:e},m=(p||d)?.indentLevel??0}"U"===h.qType&&(_.originalValue=o.getNullValueText())}let S=f;c&&(S=g>=1&&m>=g?m+1:m,0===m&&0===g&&0===h.qSubNodes.length&&(S=0));const C=e.at(f)?.[x],E=c&&void 0===C?.ref.qText||!C?$G({node:h,parent:p,root:d,x:S,y:v,pageY:x,layoutService:o,dimensionInfo:i[S],attrExprInfoIndex:a[S],isLeftColumn:!0,...c&&{isIndentModeEnabled:c,indentLevel:m},env:s,pageInfo:r,labelStructure:_,direction:l,pseudoDimMeasureIndex:w}):e[f][x];if(e[f][x]=E,h.qSubNodes.length){const e=c?0:f+1;t(d||E,E,h.qSubNodes,e,m)}}))}(null,null,t,0,-1),e},VG=(e,t)=>{e.slice(0,-1).forEach((e=>{Object.values(e).forEach(((e,n,r)=>{const o=r.at(n+1);e.distanceToNextCell=o?o.mainAxisPageCoord-(e.mainAxisPageCoord+e.leafCount):t-(e.mainAxisPageCoord+e.leafCount)}))}))},GG=(e,t)=>{const n=e[0],r=n?Object.values(n):[],o=t?.isIndentModeEnabled&&t.hasPseudoDimOnLeft?t.visibleMeasureInfo.length-1:0,i=n?.[o],a=r.at(-1);return i?.isTotal?i.isLeafNode?i.mainAxisPageCoord:i.mainAxisPageCoord+i.leafCount-1:a?.isTotal?a.mainAxisPageCoord-1:-1},UG=({prevData:e,nextDataPage:t,pageInfo:n,layoutService:r,visibleLeftDimensionInfo:o,attrExprInfoIndexes:i,env:a,direction:s})=>{const{qLeft:l,qArea:c}=t;if(!l.length)return e;const u=HG(e.grid,l,c,n,r,o,i,a,s);VG(u,n.rowsOnCurrentPage);const d=GG(u,r);return{...e,grid:u,columnCount:u.length,totalDividerIndex:d}},YG=({qArea:e,prevData:t,pivotValuePoints:n,pageInfo:r})=>{const o=[...t];return n.forEach(((t,n)=>{t.forEach(((t,i)=>{const a=e.qTop-r.page*r.rowsPerPage+n,s=e.qLeft+i;Array.isArray(o[a])||(o[a]=[]);const l="U"===t.qType;o[a][s]=o[a][s]??{id:LV(),ref:t,isNull:l}}))})),o},KG=({prevData:e,dataPage:t,pageInfo:n})=>{const{qData:r,qArea:o}=t;return r?.length?YG({qArea:o,prevData:e,pivotValuePoints:r,pageInfo:n}):e},XG=(e,t,n,r,o,i,a,s,l,c)=>{const{isIndentModeEnabled:u}=r;if(!t.length)return e;let d=0;!function t(a,p,h,f=0){e[f]||(e[f]={}),h.forEach(((h,m)=>{d+=0===m?0:1;const g=n.qLeft+d-h.qUp,y=e[f][g]??$G({node:h,parent:p,root:a,x:g,y:f,pageY:f,layoutService:r,dimensionInfo:o[f],attrExprInfoIndex:i[f],isLeftColumn:!1,...u&&{isIndentModeEnabled:u},env:s,pageInfo:l,direction:c});e[f][g]=y,h.qSubNodes.length&&t(a||y,y,h.qSubNodes,f+1)}))}(null,null,t);for(let t=0;t<a-e.length;t++)e.push({});return e},JG=({prevData:e,nextDataPage:t,layoutService:n,visibleTopDimensionInfo:r,attrExprInfoIndexes:o,headerRows:i,env:a,pageInfo:s,direction:l})=>{const{qTop:c,qArea:u}=t;if(!c.length)return e;const d=XG(e.grid,c,u,n,r,o,i,a,s,l);VG(d,n.size.x);const p=GG(d);return{...e,grid:d,rowCount:d.length,totalDividerIndex:p}},ZG=e=>-1===e?{}:e.qAttrExprInfo.reduce(((e,{id:t},n)=>(e[t]=n,e)),{}),QG=(e,t)=>{const{env:n}=bV(),{direction:r}=gV(),{layoutService:o,effectivePropertiesService:i}=wV(),{qPivotDataPages:a,pageInfo:s}=gV(),[l,c]=m(null),u=((e,t,n)=>f((()=>({left:e.map(ZG),top:t.map(ZG),measures:n.map(ZG)})),[n,e,t]))(e,t,o.visibleMeasureInfo),d=f((()=>NV(o,i,t,e)),[o,i,t,e]),h=p((()=>a.slice(1).reduce(((e,t)=>KG({prevData:e,dataPage:t,pageInfo:s})),((e,t)=>{const{qData:n,qArea:r}=e;return YG({qArea:r,prevData:[],pivotValuePoints:n,pageInfo:t})})(a[0],s))),[a,s]),g=p((()=>a.slice(1).reduce(((e,i)=>JG({prevData:e,nextDataPage:i,layoutService:o,visibleTopDimensionInfo:t,attrExprInfoIndexes:u.top,headerRows:d.size.y,env:n,pageInfo:s,direction:r})),((e,t,n,r,o,i,a,s)=>{const{qArea:l,qTop:c}=e,u=XG([],c,l,t,n,r,o,i,a,s);VG(u,t.size.x);const d=GG(u);return{grid:u,rowCount:u.length,layoutSize:t.size,totalDividerIndex:d}})(a[0],o,t,u.top,d.size.y,n,s,r))),[a,o,t,u.top,d.size.y,n,s,r]),y=p((()=>a.slice(1).reduce(((t,i)=>UG({prevData:t,nextDataPage:i,pageInfo:s,layoutService:o,visibleLeftDimensionInfo:e,attrExprInfoIndexes:u.left,env:n,direction:r})),((e,t,n,r,o,i,a)=>{const{qArea:s,qLeft:l}=e,c=HG([],l,s,n,t,r,o,i,a);VG(c,n.rowsOnCurrentPage);const u=GG(c,t);return{grid:c,columnCount:c.length,layoutSize:t.size,totalDividerIndex:u}})(a[0],o,s,e,u.left,n,r))),[a,o,s,e,u,n,r]),[_,b]=m((()=>h())),[x,v]=m((()=>g())),[w,S]=m((()=>y()));H$((()=>{b(h())}),[h]),H$((()=>{v(g())}),[g]),H$((()=>{S(y())}),[y]),H$((()=>{l&&l.forEach((i=>{b((e=>KG({prevData:e,dataPage:i,pageInfo:s}))),v((e=>JG({prevData:e,nextDataPage:i,layoutService:o,visibleTopDimensionInfo:t,attrExprInfoIndexes:u.top,headerRows:d.size.y,env:n,pageInfo:s,direction:r}))),S((t=>UG({prevData:t,nextDataPage:i,pageInfo:s,layoutService:o,visibleLeftDimensionInfo:e,attrExprInfoIndexes:u.left,env:n,direction:r})))}))}),[l]);const C=p((e=>{c(e)}),[]);return{headersData:d,measureData:_,topDimensionData:x,leftDimensionData:w,attrExprInfoIndexes:u,nextPageHandler:C}},eU=Math.sqrt(1e4),tU=e=>({maxNumberOfVisibleRows:Math.ceil(e.height/24),maxNumberOfVisibleColumns:Math.ceil(e.width/mN.PixelsMin)}),nU=e=>{if(null===e)return[];if(e.qWidth*e.qHeight<1e4)return[e];const t=[],n=Math.ceil(e.qWidth/eU),r=Math.ceil(e.qHeight/eU);for(let o=0;o<n;o++)for(let n=0;n<r;n++)t.push({qLeft:e.qLeft+o*eU,qTop:e.qTop+n*eU,qWidth:Math.min(eU,e.qWidth-o*eU),qHeight:Math.min(eU,e.qHeight-n*eU)});return t};function rU({nextPageHandler:e}){const{model:t}=bV(),{pageInfo:n}=gV(),{layoutService:r}=wV(),o=(e=>{const t=s(e);return t.current=e,t})(n.page),i=t,a=p((async(e,t)=>{await(i?.collapseLeft(EV,e,t,!1))}),[i]),l=p((async(e,t)=>{await(i?.collapseTop(EV,e,t,!1))}),[i]),c=p((async(e,t)=>{await(i?.expandLeft(EV,e,t,!1))}),[i]),u=p((async(e,t)=>{await(i?.expandTop(EV,e,t,!1))}),[i]),d=p((async t=>{if(i?.getHyperCubePivotData&&0!==t.length)try{const r=await i.getHyperCubePivotData(EV,t.reduce(((e,t)=>[...e,...nU(t)]),[]));o.current===n.page&&e(r)}catch(e){console.error(e)}}),[i,e,n,o]),h=p(((e,{dimensionInfoIndex:n,isLeftColumn:o,x:i=0,columnWidthLocation:a})=>{const{qMeasureInfo:s,qDimensionInfo:l,topHeadersColumnWidth:c}=r.layout.qHyperCube;let u=[];switch(a){case rW.Dimension:u=[{qPath:`${EV}/qDimensions/${n}/qDef/columnWidth`,oldValue:l[n].columnWidth}];break;case rW.Measures:if(o)u=s.map(((e,t)=>({qPath:`${EV}/qMeasures/${t}/qDef/columnWidth`,oldValue:e.columnWidth})));else{const e=r.getMeasureInfoIndexFromCellIndex(i);u=[{qPath:`${EV}/qMeasures/${e}/qDef/columnWidth`,oldValue:s[e].columnWidth}]}break;case rW.Pivot:u=[{qPath:`${EV}/topHeadersColumnWidth`,oldValue:c}]}const d=u.map((t=>{const{qPath:n,oldValue:r}=t;return{qPath:n,qOp:r?"Replace":"Add",qValue:JSON.stringify({...r,...e})}}));t?.applyPatches(d,!0)}),[t,r]),m=p((async e=>{await(i?.applyPatches([{qPath:`${EV}/indentModeColumnWidth`,qOp:r.layout.qHyperCube.indentModeColumnWidth?"Replace":"Add",qValue:JSON.stringify({...r.indentModeColumnWidth,...e})}],!0))}),[i,r]);return f((()=>({collapseLeft:a,collapseTop:l,expandLeft:c,expandTop:u,applyColumnWidth:h,applyIndentModeColumnWidth:m,fetchPages:d})),[a,l,c,u,h,m,d])}const oU=(e,t,n)=>(r,o)=>{if("P"===r)return kV;const i=t[n+o];return e[i]},iU=e=>{const t=[],n=(e,r=0)=>{e.slice(0,1).forEach((e=>{t[r]=e.qType,e.qSubNodes.length&&n(e.qSubNodes,r+1)}))};return n(e),t},aU=l({}),sU=()=>n(aU),lU=({children:e})=>{const{visibleLeftDimensionInfo:t,visibleTopDimensionInfo:n}=(()=>{const{layoutService:{layout:{qHyperCube:{qNoOfLeftDims:e,qEffectiveInterColumnSortOrder:t,qDimensionInfo:n}}}}=wV(),{qPivotDataPages:r}=gV();return f((()=>{const o=iU(r[0]?.qLeft??[]),i=iU(r[0]?.qTop??[]);return{visibleLeftDimensionInfo:o.map(oU(n,t,0)),visibleTopDimensionInfo:i.map(oU(n,t,e))}}),[n,t,e,r])})(),{headersData:r,measureData:o,topDimensionData:i,leftDimensionData:a,attrExprInfoIndexes:s,nextPageHandler:l}=QG(t,n),c=rU({nextPageHandler:l}),u=f((()=>({gridSectionsData:{headersData:r,topDimensionData:i,leftDimensionData:a,measureData:o},visibleDimensionsInfo:{visibleLeftDimensionInfo:t,visibleTopDimensionInfo:n},attrExprInfoIndexes:s,dataModel:c})),[t,n,r,o,i,a,s,c]);return Uo.jsx(aU.Provider,{value:u,children:e})},cU=20,uU=18,dU=.75,pU=e=>-1!==e&&e?.representation?.type===XF.Image,hU=({isLeftColumn:e,layoutService:t,representation:n})=>Boolean(e)&&t.isIndentModeEnabled&&n.type===XF.Image,fU=e=>void 0===e?i$:e,mU=(e,t)=>void 0===e||Number.isNaN(+e)?t:+e,gU=e=>mU(e,mN.PixelsDefault),yU=(e,t)=>mU(e,mN.PercentageDefault)*t/100,_U=(e,t,n)=>{switch(t?.type){case gN.Pixels:return gU(t.pixels);case gN.Percentage:return yU(t.percentage,e);case gN.FitToContent:case gN.Auto:default:return n}},bU=({headers:e,layoutService:t,effectivePropertiesService:n,estimateWidthForDimensionValue:r,shouldConsiderCombinatedLength:o,measureTextForHeader:i,longestMeasureValuePossible:a})=>e.reduce(((e,s,l)=>{const{layout:{qHyperCube:{qNoOfLeftDims:c,qDimensionInfo:u}}}=t,{id:d,colIdx:p,qApprMaxGlyphCount:h,isLeftDimension:f}=s,m=u.find((e=>e.cId===d)),g={width:24,...m?.representation?.imageBox};if(!f)return e+0;if(d===MV)return e+0;const y=hU({isLeftColumn:f,layoutService:t,representation:m?.representation||{type:XF.Text}})?g.width+8+4:r(h),_=!n.qAlwaysFullyExpanded&&p<c-1?21:0;let b=0;if(o&&i&&a){b=i("- ")+a}return Math.max(e,24*l+uU+_+y+b)}),0),xU=(e,t,n)=>e.reduce(((e,r)=>{const o=(n?0:1)*uU;return Math.max(e,o+t(r.qFallbackTitle))}),0),vU=(e,t,n,r)=>{const o=100*e/t,i=r*dU*(o/100),a=o/100*+n;return Math.min(a,i)},wU=(e,t,n,r)=>r*(+n/100)*(100*e/t/100),SU=(e,t)=>e.some((e=>e>=t*dU)),CU=({layoutService:e,effectivePropertiesService:t,headersData:n,columnWidths:r,tableWidth:o,widthOverride:i,measureTextForHeader:a,estimateWidthForDimensionValue:s,measureTextWidthForMeasuresCombinedWithDimensions:l,translator:c})=>{let u=[];const d=o*dU,p=n.data[n.data.length-1][0];if(!Array.isArray(p))return{leftGridWidth:0,leftGridColumnWidths:[],leftGridFullWidth:0};const h=Math.min(d,r.at(-1)),f=Math.min(d,bU({headers:p,layoutService:e,effectivePropertiesService:t,estimateWidthForDimensionValue:s})),m=Math.min(d,xU(e.visibleMeasureInfo,a));let g=0;const y=p.findIndex((e=>e.id===MV)),_=(({layoutService:e,measureTextForHeader:t,translator:n,headersData:r})=>{const{type:o}=e.indentModeColumnWidth;return o===gN.Auto&&r.size.y<=1?t(n.get("SNPivotTable.IndentMode.Rows"))+8+uU+16:24})({layoutService:e,measureTextForHeader:a,translator:c,headersData:n});if(e.hasPseudoDimOnLeft)if(0===y){const e=Math.max(h,f,m);u=[Math.max(_,e-h),h]}else{const n=Math.min(d,xU(e.visibleMeasureInfo,l,!0));g=Math.min(d,bU({headers:p.slice(0,y),layoutService:e,effectivePropertiesService:t,estimateWidthForDimensionValue:s,shouldConsiderCombinatedLength:!0,measureTextForHeader:a,longestMeasureValuePossible:n}));const r=Math.max(h,f,g);u=[Math.max(_,r-h),h]}else u=[Math.max(_,f-h),h];const b=Math.min(d,u.reduce(((e,t)=>e+t),0)),{indentModeColumnWidth:x}=e;i&&i<=d&&(x.type=gN.Pixels,x.pixels=i);return[gN.Pixels,gN.Percentage].includes(x.type)||SU(u,o)?((e,t,n,r)=>{let o=e[0],i=e[1],a=[];const s=e.reduce(((e,t)=>e+t),0),{type:l,pixels:c,percentage:u}=t,d=SU(e,n);l===gN.Auto&&d&&(o>i?o-=i:i-=o),l===gN.Pixels&&c&&(o=vU(e[0],s,c,n),i=vU(e[1],s,c,n)),l===gN.Percentage&&u&&(o=wU(e[0],s,u,n),i=wU(e[1],s,u,n));let p=0;i<=r&&(p=o-5,p>0&&(o-=p,i+=p)),p=i-r,p>0&&(o+=p,i-=p),a=[o,i];const h=a.reduce(((e,t)=>e+t),0);return{leftGridColumnWidths:a,leftGridWidth:h,leftGridFullWidth:h}})(u,x,o,h):{leftGridWidth:b,leftGridColumnWidths:u,leftGridFullWidth:b}};function EU({tableWidth:e}){const t=e*dU,{styleService:n,layoutService:r,effectivePropertiesService:o}=wV(),{translator:i}=bV(),{gridSectionsData:{headersData:a}}=sU(),{measureText:s}=F$(n.header),{estimateWidth:l,measureText:c}=F$({...n.dimensionValues,fontWeight:fU(n.dimensionValues.fontWeight)}),{measureText:u}=F$({...n.dimensionValues,...n.measureLabels}),d=p(((n,d)=>{const{layout:{qHyperCube:{qNoOfLeftDims:p,topHeadersColumnWidth:h}},visibleMeasureInfo:f,isIndentModeEnabled:m,hasPseudoDimOnLeft:g}=r,y=(t=0)=>f.reduce(((n,{qFallbackTitle:r,columnWidth:o})=>{const i=u(r)+uU,a=Math.max(i,t);return Math.max(n,m?a:_U(e,o,a))}),0),_=e=>a.data.reduce(((t,n)=>{const r=n.at(e);if(!r||Array.isArray(r))return t;if(r.id===MV)return t;const o=(e=>{const{label:t,isLocked:n}=e,r=n?cU:0;return uU+s(t)+cU+r})(r);return Math.max(o,t)}),0);let b=0,x=a.data.at(-1);m&&a.size.x>1&&x&&x[0]&&(x=x[0]);const v=x.map(((i,s)=>{let c=uU;if(m&&1!==a.size.x||!n||void 0===d||d!==i.colIdx){let t;i.columnWidthLocation===rW.Pivot?t=m?void 0:h:i.columnWidthLocation===rW.Dimension&&({columnWidth:t}=i);let n=0;if(i.isLeftDimension)if(i.id===MV)n=y();else{const e=_(s),t=((e,t)=>{const{qApprMaxGlyphCount:n,isLeftDimension:i,dimensionInfoIndex:a}=e,s=r.getDimensionInfo(a);if(pU(s))return mN.PixelsDefault;const c=!o.qAlwaysFullyExpanded&&i&&t<p-1?21:0;return uU+l(n)+c})(i,s);n=Math.max(e,t),m&&!g&&s+1===p&&i.columnWidthLocation===rW.Dimension&&a.size.x>1&&(n=e)}else n=_(s),i.columnWidthLocation===rW.Measures&&(n=y(n));m&&1===a.size.x&&(t=r.indentModeColumnWidth),c=m&&!g&&a.size.x>1?n:_U(e,t,n)}else c=m?Math.min(t,n):n;return b+=c,c}));return m&&a.size.x>1?CU({layoutService:r,effectivePropertiesService:o,headersData:a,columnWidths:v,tableWidth:e,widthOverride:n,measureTextForHeader:s,estimateWidthForDimensionValue:l,measureTextWidthForMeasuresCombinedWithDimensions:c,translator:i}):{leftGridWidth:Math.min(t,b),leftGridColumnWidths:v,leftGridFullWidth:b}}),[e,a,r,t,s,u,l,c,i,o]),[h,f]=m(d);H$((()=>{f(d())}),[d]);const g=p(((e,t)=>{f(d(e,t))}),[d]);return{...h,overrideLeftGridWidth:g}}function kU({tableWidth:e,verticalScrollbarWidth:t,leftGridWidth:n}){const{styleService:r,layoutService:o}=wV(),{visibleDimensionsInfo:{visibleTopDimensionInfo:i}}=sU(),{layout:{qHyperCube:{qNoOfLeftDims:a,qEffectiveInterColumnSortOrder:s}},size:l,visibleMeasureInfo:c}=o,{estimateWidth:u,measureText:d}=F$(r.measureValues),{estimateWidth:h}=F$({...r.dimensionValues,fontWeight:fU(r.dimensionValues.fontWeight)}),m=e-n-1,g=i.at(-1),y=g===kV,_=s.length-a>i.length?21:0,b=f((()=>{const e=y?c:[g],t=l.x/e.length,n=[],r=[];let o=m;const i=(e,r)=>{n[e]=Math.min(mN.PixelsMax,Math.max(mN.PixelsMin,r)),o-=n[e]*t};if(e.forEach(((e,t)=>{if(e?.columnWidth){const{columnWidth:{type:n,pixels:o,percentage:a},qApprMaxGlyphCount:s,qFallbackTitle:l}=e;switch(n){case gN.Pixels:i(t,gU(o));break;case gN.Percentage:i(t,yU(a,m));break;case gN.FitToContent:i(t,((e,t,n)=>n?mN.PixelsDefault:uU+(y?Math.max(u(e),d(t)):Math.max(Math.max(...c.map((e=>u(e.qApprMaxGlyphCount)))),h(e)+_)))(s,l,pU(e)));break;case gN.Auto:default:r.push(t)}}else r.push(t)})),r.length){const e=r.length*t,i=o/e;r.forEach((e=>{n[e]=Math.max(mN.AutoMinPivot,i)}))}return n}),[y,c,g,l.x,m,u,d,h,_]),x=f((()=>{if(y){const e=c.reduce(((e,t,n)=>e+b[n]),0);return e/c.length}return b[0]}),[y,b,c]),v=parseFloat((t/o.size.x).toFixed(12)),w=p((e=>(y&&void 0!==e?b[o.getMeasureInfoIndexFromCellIndex(e,!0)]:x)-v),[y,b,o,x,v]),S=l.x*x;return{rightGridFullWidth:S,rightGridWidth:Math.min(S,m),getRightGridColumnWidth:w}}const MU=`scrollable-container--${iW.TopGrid}`,RU=`scrollable-container--${iW.LeftGrid}`,AU=`scrollable-container--${iW.DataGrid}`,IU=e=>e&&e instanceof HTMLDivElement?{width:e.offsetWidth-e.clientWidth,height:e.offsetHeight-e.clientHeight}:{width:0,height:0},PU=(e,t)=>e>t?aW.Forward:e<t?aW.Backward:aW.None,OU=({gridRefs:{topGridRef:e,leftGridRef:t,dataGridRef:n},getWrapperElements:r,updateViewService:o,trackScrollDirection:i,interactions:a})=>{const{direction:s}=gV();u((()=>{const{headerGridWrapperElement:l,topGridWrapperElement:c,leftGridWrapperElement:u,dataGridWrapperElement:d}=r(),p=e=>{const t=e.target;l.scrollLeft=t.scrollLeft,i(e),o?.(e)},h=e=>{const t=e.target;l.scrollTop=t.scrollTop,i(e),o?.(e)},f=r=>{const a=r.target,l=((e,t)=>{const{scrollWidth:n,clientWidth:r,scrollLeft:o}=e,i=n-r;if("rtl"===t){if(o>i)return i;if(o<0)return Math.abs(o)}return o})(a,s);n.current?.scrollTo({scrollLeft:l,scrollTop:a.scrollTop}),c.scrollLeft=l,e.current?.forEach((e=>{e?.scrollTo(l)})),u.scrollTop=d.scrollTop,t.current?.forEach((e=>{e?.scrollTo(a.scrollTop)})),i(r),o?.(r)};return u.addEventListener("scroll",p),c.addEventListener("scroll",h),d.addEventListener("scroll",f),a.scroll||setTimeout((()=>{u.removeEventListener("scroll",p),c.removeEventListener("scroll",h),d.removeEventListener("scroll",f)}),0),()=>{u.removeEventListener("scroll",p),c.removeEventListener("scroll",h),d.removeEventListener("scroll",f)}}),[i,o,a,e,t,n,r,s])},LU=()=>{const{interactions:e}=bV(),t=s(null),n=s(null),r=s(null),o=s(null),i=s([]),a=s([]),l=s(null),{scrollbarsDimensions:{verticalScrollbarWidth:c,horizontalScrollbarHeight:d},resetHorizontalScrollbarHeight:f}=(({topGridWrapperRef:e,leftGridWrapperRef:t,dataGridWrapperRef:n})=>{const[r,o]=m(0),[i,a]=m(0);return h((()=>{(e.current||n.current)&&o(Math.max(IU(e.current).width,IU(n.current).width))})),h((()=>{(t.current||n.current)&&a(Math.max(IU(t.current).height,IU(n.current).height))})),{scrollbarsDimensions:{verticalScrollbarWidth:r,horizontalScrollbarHeight:i},resetHorizontalScrollbarHeight:()=>{a(0)}}})({topGridWrapperRef:n,leftGridWrapperRef:r,dataGridWrapperRef:o});(({gridSectionsWrapperRefs:{headerGridWrapperRef:e,topGridWrapperRef:t,leftGridWrapperRef:n,dataGridWrapperRef:r},gridRefs:{topGridRef:o,leftGridRef:i,dataGridRef:a}})=>{const{pageInfo:s}=gV(),{downloadService:l,viewService:c,layoutService:u}=wV(),d=p((()=>{const o={left:0,top:0};e.current?.scrollTo(o),t.current?.scrollTo(o),n.current?.scrollTo(o),r.current?.scrollTo(o)}),[e,t,n,r]);h((()=>{d()}),[s.page,d]),h((()=>{u.triggerdByExpandOrCollapse||d()}),[u,d]),h((()=>{if(u.triggerdByExpandOrCollapse){const e=r.current?.scrollLeft??0,t=r.current?.scrollTop??0;i.current?.forEach((e=>{e?.scrollTo(t)})),o.current?.forEach((t=>{t?.scrollTo(e)})),a.current?.scrollTo({scrollTop:t,scrollLeft:e})}}),[u,r,a,i,o]),h((()=>{(l.isDownloadedAsPDForImage||u.isSnapshot)&&r.current&&n.current&&t.current&&(r.current.scrollTop=c.scrollTop,r.current.scrollLeft=c.scrollLeft,n.current.scrollLeft=c.leftGridScrollLeft,t.current.scrollTop=c.topGridScrollTop)}),[c,l,u,r,n,t])})({gridSectionsWrapperRefs:{headerGridWrapperRef:t,topGridWrapperRef:n,leftGridWrapperRef:r,dataGridWrapperRef:o},gridRefs:{topGridRef:i,leftGridRef:a,dataGridRef:l}});const{trackScrollDirection:g,scrollDirectionRefs:{verticalScrollDirection:y,horizontalScrollDirection:_}}=(()=>{const e=s(aW.None),t=s(aW.None),n=s({prevScrollTop:0,prevScrollLeft:0}),r=p((r=>{if(r instanceof WheelEvent&&(e.current=PU(r.deltaY,0),t.current=PU(r.deltaX,0)),r instanceof Event&&!(r instanceof WheelEvent)){const o=r.target;e.current=PU(o.scrollTop,n.current.prevScrollTop),n.current.prevScrollTop=o.scrollTop,t.current=PU(o.scrollLeft,n.current.prevScrollLeft),n.current.prevScrollLeft=o.scrollLeft}}),[e,t,n]);return{trackScrollDirection:r,scrollDirectionRefs:{verticalScrollDirection:e,horizontalScrollDirection:t}}})(),b=(()=>{const{viewService:e}=wV();return p((t=>{const n=t.target,r=t.currentTarget,o=n.dataset.key;o===RU&&(e.leftGridScrollLeft=r.scrollLeft),o===AU&&(e.scrollLeft=r.scrollLeft),o===MU&&(e.topGridScrollTop=r.scrollTop),o!==RU&&o!==AU||(e.scrollTop=r.scrollTop)}),[e])})(),x={gridRefs:{topGridRef:i,leftGridRef:a,dataGridRef:l},getWrapperElements:p((()=>({headerGridWrapperElement:t.current,topGridWrapperElement:n.current,leftGridWrapperElement:r.current,dataGridWrapperElement:o.current})),[t,n,r,o]),updateViewService:b,trackScrollDirection:g,interactions:e};return(({gridRefs:{topGridRef:e,leftGridRef:t,dataGridRef:n},getWrapperElements:r,updateViewService:o,trackScrollDirection:i,interactions:a})=>{u((()=>{const{headerGridWrapperElement:o,topGridWrapperElement:s,leftGridWrapperElement:l,dataGridWrapperElement:c}=r(),u=e=>{o.scrollLeft+=e.deltaX,o.scrollTop+=e.deltaY,l.scrollLeft=o.scrollLeft,s.scrollTop=o.scrollTop,i(e)},d=e=>{l.scrollTop+=e.deltaY,t.current?.forEach((e=>{e?.scrollTo(l.scrollTop)})),o.scrollLeft+=e.deltaX,l.scrollLeft=o.scrollLeft,c.scrollTop=l.scrollTop,n.current?.scrollTo({scrollTop:l.scrollTop}),i(e)},p=t=>{s.scrollLeft+=t.deltaX,e.current?.forEach((e=>{e?.scrollTo(s.scrollLeft)})),o.scrollTop+=t.deltaY,s.scrollTop=o.scrollTop,c.scrollLeft=s.scrollLeft,n.current?.scrollTo({scrollLeft:s.scrollLeft}),i(t)},h=r=>{c.scrollLeft+=r.deltaX,c.scrollTop+=r.deltaY,n.current?.scrollTo({scrollLeft:c.scrollLeft,scrollTop:c.scrollTop}),s.scrollLeft=c.scrollLeft,e.current?.forEach((e=>{e?.scrollTo(c.scrollLeft)})),l.scrollTop=c.scrollTop,t.current?.forEach((e=>{e?.scrollTo(c.scrollTop)})),i(r)};return o.addEventListener("wheel",u),l.addEventListener("wheel",d),s.addEventListener("wheel",p),c.addEventListener("wheel",h),a.scroll||setTimeout((()=>{o.removeEventListener("wheel",u),l.removeEventListener("wheel",d),s.removeEventListener("wheel",p),c.removeEventListener("wheel",h)}),0),()=>{o.removeEventListener("wheel",u),l.removeEventListener("wheel",d),s.removeEventListener("wheel",p),c.removeEventListener("wheel",h)}}),[i,o,a,e,t,n,r])})(x),OU(x),{gridSectionsWrapperRefs:{headerGridWrapperRef:t,topGridWrapperRef:n,leftGridWrapperRef:r,dataGridWrapperRef:o},gridRefs:{topGridRef:i,leftGridRef:a,dataGridRef:l},scrollDirectionRefs:{verticalScrollDirection:y,horizontalScrollDirection:_},scrollbarsDimensions:{verticalScrollbarWidth:c,horizontalScrollbarHeight:d,resetHorizontalScrollbarHeight:f}}},DU=()=>{const{layoutService:e}=wV(),{rect:t,pageInfo:n}=gV();return f((()=>{let{height:r}=t;return e.hasLimitedData&&(r-=22),n.shouldShowPagination&&(r-=41),{...t,height:r}}),[t,e,n.shouldShowPagination])},TU=({children:e,style:t})=>Uo.jsx("div",{"data-testid":"fullSize",style:t,children:e}),zU=({children:e,style:t})=>{const{direction:n}=gV();return Uo.jsx("div",{"data-section-id":"GRID",style:{direction:n,display:"grid",...t},children:e})},jU=e=>e&&`scrollable-container--${e}`,NU=({children:e,style:t,origin:n},r)=>{const{interactions:o}=bV(),i=o.scroll?t:{overflow:"hidden"};return Uo.jsx("div",{"data-testid":"scrollable","data-key":jU(n),style:i,ref:r,children:e})};var qU=t.forwardRef(NU);const FU=({children:e,style:t})=>{const{direction:n}=gV();return Uo.jsx("div",{"data-testid":"sticky",style:{position:"sticky",top:0,["rtl"===n?"right":"left"]:0,...t},children:e})};var WU=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function BU(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(r=e[n],o=t[n],!(r===o||WU(r)&&WU(o)))return!1;var r,o;return!0}function $U(e,t){var n;void 0===t&&(t=BU);var r,o=[],i=!1;return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return i&&n===this&&t(a,o)||(r=e.apply(this,a),i=!0,n=this,o=a),r}}var HU="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function VU(e){cancelAnimationFrame(e.id)}function GU(e,t){var n=HU();var r={id:requestAnimationFrame((function o(){HU()-n>=t?e.call(null):r.id=requestAnimationFrame(o)}))};return r}var UU=-1;function YU(e){if(void 0===e&&(e=!1),-1===UU||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),UU=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return UU}var KU=null;function XU(e){if(void 0===e&&(e=!1),null===KU||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),o=r.style;return o.width="100px",o.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?KU="positive-descending":(t.scrollLeft=1,KU=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),KU}return KU}var JU=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function ZU(e){var t,n=e.getColumnOffset,o=e.getColumnStartIndexForOffset,i=e.getColumnStopIndexForStartIndex,a=e.getColumnWidth,s=e.getEstimatedTotalHeight,l=e.getEstimatedTotalWidth,c=e.getOffsetForColumnAndAlignment,u=e.getOffsetForRowAndAlignment,d=e.getRowHeight,p=e.getRowOffset,h=e.getRowStartIndexForOffset,f=e.getRowStopIndexForStartIndex,m=e.initInstanceProps,g=e.shouldResetStyleCacheOnItemSizeChange,y=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=m(r.props,wl(r)),r._resetIsScrollingTimeoutId=null,r._outerRef=void 0,r.state={instance:wl(r),isScrolling:!1,horizontalScrollDirection:"forward",scrollLeft:"number"==typeof r.props.initialScrollLeft?r.props.initialScrollLeft:0,scrollTop:"number"==typeof r.props.initialScrollTop?r.props.initialScrollTop:0,scrollUpdateWasRequested:!1,verticalScrollDirection:"forward"},r._callOnItemsRendered=void 0,r._callOnItemsRendered=$U((function(e,t,n,o,i,a,s,l){return r.props.onItemsRendered({overscanColumnStartIndex:e,overscanColumnStopIndex:t,overscanRowStartIndex:n,overscanRowStopIndex:o,visibleColumnStartIndex:i,visibleColumnStopIndex:a,visibleRowStartIndex:s,visibleRowStopIndex:l})})),r._callOnScroll=void 0,r._callOnScroll=$U((function(e,t,n,o,i){return r.props.onScroll({horizontalScrollDirection:n,scrollLeft:e,scrollTop:t,verticalScrollDirection:o,scrollUpdateWasRequested:i})})),r._getItemStyle=void 0,r._getItemStyle=function(e,t){var o,i=r.props,s=i.columnWidth,l=i.direction,c=i.rowHeight,u=r._getItemStyleCache(g&&s,g&&l,g&&c),h=e+":"+t;if(u.hasOwnProperty(h))o=u[h];else{var f=n(r.props,t,r._instanceProps),m="rtl"===l;u[h]=o={position:"absolute",left:m?void 0:f,right:m?f:void 0,top:p(r.props,e,r._instanceProps),height:d(r.props,e,r._instanceProps),width:a(r.props,t,r._instanceProps)}}return o},r._getItemStyleCache=void 0,r._getItemStyleCache=$U((function(e,t,n){return{}})),r._onScroll=function(e){var t=e.currentTarget,n=t.clientHeight,o=t.clientWidth,i=t.scrollLeft,a=t.scrollTop,s=t.scrollHeight,l=t.scrollWidth;r.setState((function(e){if(e.scrollLeft===i&&e.scrollTop===a)return null;var t=r.props.direction,c=i;if("rtl"===t)switch(XU()){case"negative":c=-i;break;case"positive-descending":c=l-o-i}c=Math.max(0,Math.min(c,l-o));var u=Math.max(0,Math.min(a,s-n));return{isScrolling:!0,horizontalScrollDirection:e.scrollLeft<i?"forward":"backward",scrollLeft:c,scrollTop:u,verticalScrollDirection:e.scrollTop<a?"forward":"backward",scrollUpdateWasRequested:!1}}),r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&VU(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=GU(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},(function(){r._getItemStyleCache(-1)}))},r}pl(t,e),t.getDerivedStateFromProps=function(e,t){return QU(e,t),y(e),null};var _=t.prototype;return _.scrollTo=function(e){var t=e.scrollLeft,n=e.scrollTop;void 0!==t&&(t=Math.max(0,t)),void 0!==n&&(n=Math.max(0,n)),this.setState((function(e){return void 0===t&&(t=e.scrollLeft),void 0===n&&(n=e.scrollTop),e.scrollLeft===t&&e.scrollTop===n?null:{horizontalScrollDirection:e.scrollLeft<t?"forward":"backward",scrollLeft:t,scrollTop:n,scrollUpdateWasRequested:!0,verticalScrollDirection:e.scrollTop<n?"forward":"backward"}}),this._resetIsScrollingDebounced)},_.scrollToItem=function(e){var t=e.align,n=void 0===t?"auto":t,r=e.columnIndex,o=e.rowIndex,i=this.props,a=i.columnCount,d=i.height,p=i.rowCount,h=i.width,f=this.state,m=f.scrollLeft,g=f.scrollTop,y=YU();void 0!==r&&(r=Math.max(0,Math.min(r,a-1))),void 0!==o&&(o=Math.max(0,Math.min(o,p-1)));var _=s(this.props,this._instanceProps),b=l(this.props,this._instanceProps)>h?y:0,x=_>d?y:0;this.scrollTo({scrollLeft:void 0!==r?c(this.props,r,n,m,this._instanceProps,x):m,scrollTop:void 0!==o?u(this.props,o,n,g,this._instanceProps,b):g})},_.componentDidMount=function(){var e=this.props,t=e.initialScrollLeft,n=e.initialScrollTop;if(null!=this._outerRef){var r=this._outerRef;"number"==typeof t&&(r.scrollLeft=t),"number"==typeof n&&(r.scrollTop=n)}this._callPropsCallbacks()},_.componentDidUpdate=function(){var e=this.props.direction,t=this.state,n=t.scrollLeft,r=t.scrollTop;if(t.scrollUpdateWasRequested&&null!=this._outerRef){var o=this._outerRef;if("rtl"===e)switch(XU()){case"negative":o.scrollLeft=-n;break;case"positive-ascending":o.scrollLeft=n;break;default:var i=o.clientWidth,a=o.scrollWidth;o.scrollLeft=a-i-n}else o.scrollLeft=Math.max(0,n);o.scrollTop=Math.max(0,r)}this._callPropsCallbacks()},_.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&VU(this._resetIsScrollingTimeoutId)},_.render=function(){var e=this.props,t=e.children,n=e.className,o=e.columnCount,i=e.direction,a=e.height,c=e.innerRef,u=e.innerElementType,d=e.innerTagName,p=e.itemData,h=e.itemKey,f=void 0===h?JU:h,m=e.outerElementType,g=e.outerTagName,y=e.rowCount,_=e.style,b=e.useIsScrolling,x=e.width,v=this.state.isScrolling,w=this._getHorizontalRangeToRender(),S=w[0],C=w[1],E=this._getVerticalRangeToRender(),k=E[0],M=E[1],R=[];if(o>0&&y)for(var A=k;A<=M;A++)for(var I=S;I<=C;I++)R.push(r(t,{columnIndex:I,data:p,isScrolling:b?v:void 0,key:f({columnIndex:I,data:p,rowIndex:A}),rowIndex:A,style:this._getItemStyle(A,I)}));var P=s(this.props,this._instanceProps),O=l(this.props,this._instanceProps);return r(m||g||"div",{className:n,onScroll:this._onScroll,ref:this._outerRefSetter,style:Sr({position:"relative",height:a,width:x,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:i},_)},r(u||d||"div",{children:R,ref:c,style:{height:P,pointerEvents:v?"none":void 0,width:O}}))},_._callPropsCallbacks=function(){var e=this.props,t=e.columnCount,n=e.onItemsRendered,r=e.onScroll,o=e.rowCount;if("function"==typeof n&&t>0&&o>0){var i=this._getHorizontalRangeToRender(),a=i[0],s=i[1],l=i[2],c=i[3],u=this._getVerticalRangeToRender(),d=u[0],p=u[1],h=u[2],f=u[3];this._callOnItemsRendered(a,s,d,p,l,c,h,f)}if("function"==typeof r){var m=this.state,g=m.horizontalScrollDirection,y=m.scrollLeft,_=m.scrollTop,b=m.scrollUpdateWasRequested,x=m.verticalScrollDirection;this._callOnScroll(y,_,g,x,b)}},_._getHorizontalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanColumnCount,r=e.overscanColumnsCount,a=e.overscanCount,s=e.rowCount,l=this.state,c=l.horizontalScrollDirection,u=l.isScrolling,d=l.scrollLeft,p=n||r||a||1;if(0===t||0===s)return[0,0,0,0];var h=o(this.props,d,this._instanceProps),f=i(this.props,h,d,this._instanceProps),m=u&&"backward"!==c?1:Math.max(1,p),g=u&&"forward"!==c?1:Math.max(1,p);return[Math.max(0,h-m),Math.max(0,Math.min(t-1,f+g)),h,f]},_._getVerticalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanCount,r=e.overscanRowCount,o=e.overscanRowsCount,i=e.rowCount,a=this.state,s=a.isScrolling,l=a.verticalScrollDirection,c=a.scrollTop,u=r||o||n||1;if(0===t||0===i)return[0,0,0,0];var d=h(this.props,c,this._instanceProps),p=f(this.props,d,c,this._instanceProps),m=s&&"backward"!==l?1:Math.max(1,u),g=s&&"forward"!==l?1:Math.max(1,u);return[Math.max(0,d-m),Math.max(0,Math.min(i-1,p+g)),d,p]},t}(x),t.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},t}var QU=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},eY=function(e,t){var n=e.rowCount,r=t.rowMetadataMap,o=t.estimatedRowHeight,i=t.lastMeasuredRowIndex,a=0;if(i>=n&&(i=n-1),i>=0){var s=r[i];a=s.offset+s.size}return a+(n-i-1)*o},tY=function(e,t){var n=e.columnCount,r=t.columnMetadataMap,o=t.estimatedColumnWidth,i=t.lastMeasuredColumnIndex,a=0;if(i>=n&&(i=n-1),i>=0){var s=r[i];a=s.offset+s.size}return a+(n-i-1)*o},nY=function(e,t,n,r){var o,i,a;if("column"===e?(o=r.columnMetadataMap,i=t.columnWidth,a=r.lastMeasuredColumnIndex):(o=r.rowMetadataMap,i=t.rowHeight,a=r.lastMeasuredRowIndex),n>a){var s=0;if(a>=0){var l=o[a];s=l.offset+l.size}for(var c=a+1;c<=n;c++){var u=i(c);o[c]={offset:s,size:u},s+=u}"column"===e?r.lastMeasuredColumnIndex=n:r.lastMeasuredRowIndex=n}return o[n]},rY=function(e,t,n,r){var o,i;return"column"===e?(o=n.columnMetadataMap,i=n.lastMeasuredColumnIndex):(o=n.rowMetadataMap,i=n.lastMeasuredRowIndex),(i>0?o[i].offset:0)>=r?oY(e,t,n,i,0,r):iY(e,t,n,Math.max(0,i),r)},oY=function(e,t,n,r,o,i){for(;o<=r;){var a=o+Math.floor((r-o)/2),s=nY(e,t,a,n).offset;if(s===i)return a;s<i?o=a+1:s>i&&(r=a-1)}return o>0?o-1:0},iY=function(e,t,n,r,o){for(var i="column"===e?t.columnCount:t.rowCount,a=1;r<i&&nY(e,t,r,n).offset<o;)r+=a,a*=2;return oY(e,t,n,Math.min(r,i-1),Math.floor(r/2),o)},aY=function(e,t,n,r,o,i,a){var s="column"===e?t.width:t.height,l=nY(e,t,n,i),c="column"===e?tY(t,i):eY(t,i),u=Math.max(0,Math.min(c-s,l.offset)),d=Math.max(0,l.offset-s+a+l.size);switch("smart"===r&&(r=o>=d-s&&o<=u+s?"auto":"center"),r){case"start":return u;case"end":return d;case"center":return Math.round(d+(u-d)/2);default:return o>=d&&o<=u?o:d>u||o<d?d:u}},sY=ZU({getColumnOffset:function(e,t,n){return nY("column",e,t,n).offset},getColumnStartIndexForOffset:function(e,t,n){return rY("column",e,n,t)},getColumnStopIndexForStartIndex:function(e,t,n,r){for(var o=e.columnCount,i=e.width,a=nY("column",e,t,r),s=n+i,l=a.offset+a.size,c=t;c<o-1&&l<s;)c++,l+=nY("column",e,c,r).size;return c},getColumnWidth:function(e,t,n){return n.columnMetadataMap[t].size},getEstimatedTotalHeight:eY,getEstimatedTotalWidth:tY,getOffsetForColumnAndAlignment:function(e,t,n,r,o,i){return aY("column",e,t,n,r,o,i)},getOffsetForRowAndAlignment:function(e,t,n,r,o,i){return aY("row",e,t,n,r,o,i)},getRowOffset:function(e,t,n){return nY("row",e,t,n).offset},getRowHeight:function(e,t,n){return n.rowMetadataMap[t].size},getRowStartIndexForOffset:function(e,t,n){return rY("row",e,n,t)},getRowStopIndexForStartIndex:function(e,t,n,r){for(var o=e.rowCount,i=e.height,a=nY("row",e,t,r),s=n+i,l=a.offset+a.size,c=t;c<o-1&&l<s;)c++,l+=nY("row",e,c,r).size;return c},initInstanceProps:function(e,t){var n=e,r={columnMetadataMap:{},estimatedColumnWidth:n.estimatedColumnWidth||50,estimatedRowHeight:n.estimatedRowHeight||50,lastMeasuredColumnIndex:-1,lastMeasuredRowIndex:-1,rowMetadataMap:{}};return t.resetAfterColumnIndex=function(e,n){void 0===n&&(n=!0),t.resetAfterIndices({columnIndex:e,shouldForceUpdate:n})},t.resetAfterRowIndex=function(e,n){void 0===n&&(n=!0),t.resetAfterIndices({rowIndex:e,shouldForceUpdate:n})},t.resetAfterIndices=function(e){var n=e.columnIndex,o=e.rowIndex,i=e.shouldForceUpdate,a=void 0===i||i;"number"==typeof n&&(r.lastMeasuredColumnIndex=Math.min(r.lastMeasuredColumnIndex,n-1)),"number"==typeof o&&(r.lastMeasuredRowIndex=Math.min(r.lastMeasuredRowIndex,o-1)),t._getItemStyleCache(-1),a&&t.forceUpdate()},r},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.columnWidth,e.rowHeight}}),lY=function(e,t){return e};function cY(e){var t,n=e.getItemOffset,o=e.getEstimatedTotalSize,i=e.getItemSize,a=e.getOffsetForIndexAndAlignment,s=e.getStartIndexForOffset,l=e.getStopIndexForStartIndex,c=e.initInstanceProps,u=e.shouldResetStyleCacheOnItemSizeChange,d=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=c(r.props,wl(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:wl(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=$U((function(e,t,n,o){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:o})})),r._callOnScroll=void 0,r._callOnScroll=$U((function(e,t,n){return r.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n})})),r._getItemStyle=void 0,r._getItemStyle=function(e){var t,o=r.props,a=o.direction,s=o.itemSize,l=o.layout,c=r._getItemStyleCache(u&&s,u&&l,u&&a);if(c.hasOwnProperty(e))t=c[e];else{var d=n(r.props,e,r._instanceProps),p=i(r.props,e,r._instanceProps),h="horizontal"===a||"horizontal"===l,f="rtl"===a,m=h?d:0;c[e]=t={position:"absolute",left:f?void 0:m,right:f?m:void 0,top:h?0:d,height:h?"100%":p,width:h?p:"100%"}}return t},r._getItemStyleCache=void 0,r._getItemStyleCache=$U((function(e,t,n){return{}})),r._onScrollHorizontal=function(e){var t=e.currentTarget,n=t.clientWidth,o=t.scrollLeft,i=t.scrollWidth;r.setState((function(e){if(e.scrollOffset===o)return null;var t=r.props.direction,a=o;if("rtl"===t)switch(XU()){case"negative":a=-o;break;case"positive-descending":a=i-n-o}return a=Math.max(0,Math.min(a,i-n)),{isScrolling:!0,scrollDirection:e.scrollOffset<a?"forward":"backward",scrollOffset:a,scrollUpdateWasRequested:!1}}),r._resetIsScrollingDebounced)},r._onScrollVertical=function(e){var t=e.currentTarget,n=t.clientHeight,o=t.scrollHeight,i=t.scrollTop;r.setState((function(e){if(e.scrollOffset===i)return null;var t=Math.max(0,Math.min(i,o-n));return{isScrolling:!0,scrollDirection:e.scrollOffset<t?"forward":"backward",scrollOffset:t,scrollUpdateWasRequested:!1}}),r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&VU(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=GU(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},(function(){r._getItemStyleCache(-1,null)}))},r}pl(t,e),t.getDerivedStateFromProps=function(e,t){return uY(e,t),d(e),null};var p=t.prototype;return p.scrollTo=function(e){e=Math.max(0,e),this.setState((function(t){return t.scrollOffset===e?null:{scrollDirection:t.scrollOffset<e?"forward":"backward",scrollOffset:e,scrollUpdateWasRequested:!0}}),this._resetIsScrollingDebounced)},p.scrollToItem=function(e,t){void 0===t&&(t="auto");var n=this.props,r=n.itemCount,o=n.layout,i=this.state.scrollOffset;e=Math.max(0,Math.min(e,r-1));var s=0;if(this._outerRef){var l=this._outerRef;s="vertical"===o?l.scrollWidth>l.clientWidth?YU():0:l.scrollHeight>l.clientHeight?YU():0}this.scrollTo(a(this.props,e,t,i,this._instanceProps,s))},p.componentDidMount=function(){var e=this.props,t=e.direction,n=e.initialScrollOffset,r=e.layout;if("number"==typeof n&&null!=this._outerRef){var o=this._outerRef;"horizontal"===t||"horizontal"===r?o.scrollLeft=n:o.scrollTop=n}this._callPropsCallbacks()},p.componentDidUpdate=function(){var e=this.props,t=e.direction,n=e.layout,r=this.state,o=r.scrollOffset;if(r.scrollUpdateWasRequested&&null!=this._outerRef){var i=this._outerRef;if("horizontal"===t||"horizontal"===n)if("rtl"===t)switch(XU()){case"negative":i.scrollLeft=-o;break;case"positive-ascending":i.scrollLeft=o;break;default:var a=i.clientWidth,s=i.scrollWidth;i.scrollLeft=s-a-o}else i.scrollLeft=o;else i.scrollTop=o}this._callPropsCallbacks()},p.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&VU(this._resetIsScrollingTimeoutId)},p.render=function(){var e=this.props,t=e.children,n=e.className,i=e.direction,a=e.height,s=e.innerRef,l=e.innerElementType,c=e.innerTagName,u=e.itemCount,d=e.itemData,p=e.itemKey,h=void 0===p?lY:p,f=e.layout,m=e.outerElementType,g=e.outerTagName,y=e.style,_=e.useIsScrolling,b=e.width,x=this.state.isScrolling,v="horizontal"===i||"horizontal"===f,w=v?this._onScrollHorizontal:this._onScrollVertical,S=this._getRangeToRender(),C=S[0],E=S[1],k=[];if(u>0)for(var M=C;M<=E;M++)k.push(r(t,{data:d,key:h(M,d),index:M,isScrolling:_?x:void 0,style:this._getItemStyle(M)}));var R=o(this.props,this._instanceProps);return r(m||g||"div",{className:n,onScroll:w,ref:this._outerRefSetter,style:Sr({position:"relative",height:a,width:b,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:i},y)},r(l||c||"div",{children:k,ref:s,style:{height:v?"100%":R,pointerEvents:x?"none":void 0,width:v?R:"100%"}}))},p._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],n=e[1],r=e[2],o=e[3];this._callOnItemsRendered(t,n,r,o)}if("function"==typeof this.props.onScroll){var i=this.state,a=i.scrollDirection,s=i.scrollOffset,l=i.scrollUpdateWasRequested;this._callOnScroll(a,s,l)}},p._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,o=r.isScrolling,i=r.scrollDirection,a=r.scrollOffset;if(0===t)return[0,0,0,0];var c=s(this.props,a,this._instanceProps),u=l(this.props,c,a,this._instanceProps),d=o&&"backward"!==i?1:Math.max(1,n),p=o&&"forward"!==i?1:Math.max(1,n);return[Math.max(0,c-d),Math.max(0,Math.min(t-1,u+p)),c,u]},t}(x),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var uY=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},dY=function(e,t,n){var r=e.itemSize,o=n.itemMetadataMap,i=n.lastMeasuredIndex;if(t>i){var a=0;if(i>=0){var s=o[i];a=s.offset+s.size}for(var l=i+1;l<=t;l++){var c=r(l);o[l]={offset:a,size:c},a+=c}n.lastMeasuredIndex=t}return o[t]},pY=function(e,t,n,r,o){for(;r<=n;){var i=r+Math.floor((n-r)/2),a=dY(e,i,t).offset;if(a===o)return i;a<o?r=i+1:a>o&&(n=i-1)}return r>0?r-1:0},hY=function(e,t,n,r){for(var o=e.itemCount,i=1;n<o&&dY(e,n,t).offset<r;)n+=i,i*=2;return pY(e,t,Math.min(n,o-1),Math.floor(n/2),r)},fY=function(e,t){var n=e.itemCount,r=t.itemMetadataMap,o=t.estimatedItemSize,i=t.lastMeasuredIndex,a=0;if(i>=n&&(i=n-1),i>=0){var s=r[i];a=s.offset+s.size}return a+(n-i-1)*o},mY=cY({getItemOffset:function(e,t,n){return dY(e,t,n).offset},getItemSize:function(e,t,n){return n.itemMetadataMap[t].size},getEstimatedTotalSize:fY,getOffsetForIndexAndAlignment:function(e,t,n,r,o,i){var a=e.direction,s=e.height,l=e.layout,c=e.width,u="horizontal"===a||"horizontal"===l?c:s,d=dY(e,t,o),p=fY(e,o),h=Math.max(0,Math.min(p-u,d.offset)),f=Math.max(0,d.offset-u+d.size+i);switch("smart"===n&&(n=r>=f-u&&r<=h+u?"auto":"center"),n){case"start":return h;case"end":return f;case"center":return Math.round(f+(h-f)/2);default:return r>=f&&r<=h?r:r<f?f:h}},getStartIndexForOffset:function(e,t,n){return function(e,t,n){var r=t.itemMetadataMap,o=t.lastMeasuredIndex;return(o>0?r[o].offset:0)>=n?pY(e,t,o,0,n):hY(e,t,Math.max(0,o),n)}(e,n,t)},getStopIndexForStartIndex:function(e,t,n,r){for(var o=e.direction,i=e.height,a=e.itemCount,s=e.layout,l=e.width,c="horizontal"===o||"horizontal"===s?l:i,u=dY(e,t,r),d=n+c,p=u.offset+u.size,h=t;h<a-1&&p<d;)h++,p+=dY(e,h,r).size;return h},initInstanceProps:function(e,t){var n={itemMetadataMap:{},estimatedItemSize:e.estimatedItemSize||50,lastMeasuredIndex:-1};return t.resetAfterIndex=function(e,r){void 0===r&&(r=!0),n.lastMeasuredIndex=Math.min(n.lastMeasuredIndex,e-1),t._getItemStyleCache(-1),r&&t.forceUpdate()},n},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.itemSize}});function gY(e,t){for(var n in e)if(!(n in t))return!0;for(var r in t)if(e[r]!==t[r])return!0;return!1}var yY=["style"],_Y=["style"];function bY(e,t){var n=e.style,r=Cr(e,yY),o=t.style,i=Cr(t,_Y);return!gY(n,o)&&!gY(r,i)}const xY=10,vY=(e,t)=>e.current===aW.Backward?t:0,wY=(e,t,n,r)=>{for(let o=n;o<n+r;o++){const n=e.at(o);if(void 0===n||void 0===n.at(t))return!0}return!1},SY=(e,t)=>e.qLeft+e.qWidth===t.qLeft&&e.qTop===t.qTop&&e.qHeight===t.qHeight,CY=({pageInfo:e,measureData:t,pageTop:n,qHeight:r,startLeft:o,endLeft:i})=>{const a=[],s=e.page*e.rowsPerPage;for(let e=o;e<i;e++)if(wY(t,e,n,r)){const t=a[a.length-1],o={qLeft:e,qTop:n+s,qWidth:1,qHeight:r};void 0!==t&&SY(t,o)?t.qWidth+=o.qWidth:a.push(o)}return a},EY=({pageInfo:e,measureData:t,scrollDirection:n,viewService:r,minBufferStartLeft:o,minBufferEndLeft:i,columnEndIndex:a})=>{const{gridRowStartIndex:s,gridHeight:l}=r,c=n.current===aW.Backward?Math.max(0,o-25):i,u=Math.min(c+25,a);return CY({pageInfo:e,measureData:t,startLeft:c,endLeft:u,pageTop:s,qHeight:l})},kY=({pageInfo:e,measureData:t,scrollDirection:n,layoutService:r,viewService:o})=>{const{startLeft:i,endLeft:a,pageTop:s,qHeight:l}=((e,t,n)=>{const{gridColumnStartIndex:r,gridRowStartIndex:o,gridWidth:i,gridHeight:a}=t,s=e.size.x,l=vY(n,xY),c=Math.max(r-l,0);return{startLeft:c,endLeft:c+Math.min(i+xY,s-c),pageTop:o,qHeight:a}})(r,o,n),c=CY({pageInfo:e,measureData:t,startLeft:i,endLeft:a,pageTop:s,qHeight:l});return c.length>0?[...c,...EY({pageInfo:e,measureData:t,scrollDirection:n,viewService:o,minBufferStartLeft:i,minBufferEndLeft:a,columnEndIndex:r.size.x})]:c},MY=(e,t,n,r)=>{const o=e[n];if(void 0===o)return!0;for(let e=t;e<t+r;e++){if(void 0===o[e])return!0}return!1},RY=(e,t)=>e.qTop+e.qHeight===t.qTop&&e.qLeft===t.qLeft&&e.qWidth===t.qWidth,AY=({startTop:e,endTop:t,qLeft:n,qWidth:r,measureData:o,pageInfo:i})=>{const a=[],s=i.page*i.rowsPerPage;for(let i=e;i<t;i++)if(MY(o,n,i,r)){const e=a.at(-1),t={qLeft:n,qTop:i+s,qWidth:r,qHeight:1};void 0!==e&&RY(e,t)?e.qHeight+=t.qHeight:a.push(t)}return a},IY=({pageInfo:e,measureData:t,scrollDirection:n,viewService:r})=>{const{startTop:o,endTop:i,qLeft:a,qWidth:s}=((e,t,n)=>{const{gridColumnStartIndex:r,gridRowStartIndex:o,gridWidth:i,gridHeight:a}=t,s=vY(n,xY),l=Math.max(o-s,0);return{startTop:l,endTop:l+Math.min(a+xY,e.rowsOnCurrentPage-l),qLeft:r,qWidth:i}})(e,r,n),l=AY({startTop:o,endTop:i,qLeft:a,qWidth:s,measureData:t,pageInfo:e});if(l.length>0){const r=n.current===aW.Backward?Math.max(0,o-25):i,c=Math.min(r+25,e.rowsOnCurrentPage),u=AY({startTop:r,endTop:c,qLeft:a,qWidth:s,measureData:t,pageInfo:e});return[...l,...u]}return l},PY=async(e,t,n,r,o,i,a,s)=>{const{gridColumnStartIndex:l,gridRowStartIndex:c,gridWidth:u,gridHeight:d}=o;let p=[],h=[];i.current!==aW.None&&(p=IY({pageInfo:r,measureData:n,scrollDirection:i,viewService:o})),a.current!==aW.None&&(h=kY({pageInfo:r,measureData:n,scrollDirection:a,layoutService:t,viewService:o})),i.current===aW.None&&a.current===aW.None&&(p=AY({measureData:n,pageInfo:r,qLeft:l,qWidth:u,startTop:c,endTop:c+d}));const f=e.fetchPages([...p,...h]);s.isDownloadedAsPDForImage&&s.waitForPromise(f)},OY=function(e){var t,n,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50,i=0;return function(){t=this;for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];n=s;var c=Date.now()-i,u=function(){i=Date.now(),r=0,e.apply(t,n)};r||(c>=o?u():r=setTimeout(u,o-c))}}(PY,100),LY=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return function(){for(var r=this,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];clearTimeout(t),t=setTimeout((function(){return e.apply(r,i)}),n)}}(PY,75),DY=(e,t,n=!1)=>void 0!==e&&(e.isLeafNode||n&&e.isLeftColumn?e.mainAxisPageCoord===t:e.mainAxisPageCoord+e.leafCount-1===t),TY=({style:e,index:t,isLastRow:n,isLastColumn:r,showLastBorder:o,isLeftColumn:i,showTotalCellDivider:a})=>{const{direction:s}=gV(),{styleService:{grid:{border:l,divider:c}}}=wV();return Uo.jsx("div",{style:{...e,...p$,...g$(n,r,l,s,o),..._$({bottomDivider:a&&i,rightDivider:a&&!i,borderColor:c})},"data-testid":"empty-cell","data-index":t})},zY=({children:e,verticalAlign:t,width:n,right:r,isLeftColumn:o})=>{const{layoutService:{isIndentModeEnabled:i}}=wV(),a=o&&i;return Uo.jsx("div",{"data-key":"sticky-cell-container",style:{display:"flex",flexDirection:"row",width:n,maxWidth:"100%",maxHeight:"100%",position:"sticky",left:4,top:0,bottom:0,right:r,...!a&&{alignItems:t,alignSelf:t,overflow:"hidden"}},children:e})},jY=e=>{const{type:t,imageSize:n}=e;return t!==XF.Image||"fill"!==n&&"fitWidth"!==n?"fit-content":"100%"},NY=e=>"number"==typeof e&&!Number.isNaN(+e),qY=e=>"string"==typeof e&&e.length>0||"number"==typeof e?+e:NaN,FY=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M9 7V2H7v5H2v2h5v5h2V9h5V7z"})}))),WY=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M8 0c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8"})}))),BY=_(((e,t)=>Uo.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:[Uo.jsx("path",{d:"M3 9v6.5a.5.5 0 1 1-1 0V.5a.5.5 0 0 1 1 0V1q2.441.639 3.667.639c1.225 0 1.774-.995 3.87-1.196q1.972-.19 3.297.47A.3.3 0 0 1 14 1.18v7.344a.3.3 0 0 1-.417.277q-1.338-.565-3.045-.416c-1.98.172-2.083 1.107-3.871 1.253Q4.879 9.785 3 9"}),Uo.jsx("use",{fillRule:"evenodd"})]}))),$Y=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M13.9 7.4c-1 1.3-.6 1.5-1.5 4.1-.5 1.8-1.2 2.9-1.7 3.6q-.45.6-.9.9H4.2c-1 0-1.6-.5-1.9-1-.2-.3-.3-.6-.3-1V4.2c0-.4.3-.7.7-.7s.7.3.7.7v3.6l.9-.1V1.6c0-.4.3-.7.7-.7s.7.3.7.7v5.1l1.1-.2V.7C6.7.3 7 0 7.4 0s.7.3.7.7v5.9l1.1.1V1.6c0-.4.3-.7.7-.7s.7.3.7.7v7.7s.1 0 .1-.2l.6-1.4c1.1-2.1 3.1-1.1 2.6-.3"})}))),HY=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M5 13h6v1.5c0 .3-.2.5-.5.5H10v.5c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5V15h-.5c-.3 0-.5-.2-.5-.5zm0-1c0-2-3-3-3-7 0-3 3-5 6-5s6 2 6 5c0 4-3 4-3 7H5m-.5-7c.3 0 .5-.2.5-.5s.2-.7.5-1 .6-.5 1-.5c.3 0 .5-.2.5-.5S6.8 2 6.5 2c-.6 0-1.2.3-1.7.8S4 3.9 4 4.5c0 .3.2.5.5.5"})}))),VY=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M8 0c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8m4.5 9c.25 0 .5-.3.5-.6v-.8c0-.3-.25-.6-.5-.6h-9c-.25 0-.5.3-.5.6v.7c0 .4.25.7.5.7z"})}))),GY=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M2 7h12v2H2z"})}))),UY=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M9 7h7a7.004 7.004 0 0 0-7-7zm1-5.917A6.005 6.005 0 0 1 14.917 6H10zM14 9H7V2a7.002 7.002 0 0 0 0 14 7 7 0 0 0 7-7m-8 1h6.917A6.002 6.002 0 0 1 1 9a6 6 0 0 1 5-5.917z"})}))),YY=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M9 9h3.5c.25 0 .5-.3.5-.6v-.8c0-.3-.25-.6-.5-.6H9V3.5c0-.25-.3-.5-.6-.5h-.7c-.4 0-.7.25-.7.5V7H3.5c-.25 0-.5.3-.5.6v.7c0 .4.25.7.5.7H7v3.5c0 .25.3.5.6.5h.8c.3 0 .6-.25.6-.5zM8 0c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8"})}))),KY=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"m8.418 1.007.042.08 1.788 4.217 4.571.388a.5.5 0 0 1 .348.811l-.063.065-3.472 3.008 1.043 4.47a.5.5 0 0 1-.664.581l-.081-.04L8 12.217l-3.93 2.372a.5.5 0 0 1-.757-.453l.012-.089 1.043-4.47L.896 6.568a.5.5 0 0 1 .196-.86l.089-.016 4.571-.388L7.54 1.086a.5.5 0 0 1 .878-.08Z"})}))),XY=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M13 14H3a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1"})}))),JY=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"m6 10 7-7 2 2-7 7-2 2-5-5 2-2z"})}))),ZY=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M2.4 4h11.2a.2.2 0 0 1 .16.32l-5.6 7.467a.2.2 0 0 1-.32 0L2.24 4.32A.2.2 0 0 1 2.4 4"})}))),QY=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M11 2.4v11.2a.2.2 0 0 1-.32.16l-7.467-5.6a.2.2 0 0 1 0-.32l7.467-5.6a.2.2 0 0 1 .32.16"})}))),eK=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M4 13.6V2.4a.2.2 0 0 1 .32-.16l7.467 5.6a.2.2 0 0 1 0 .32l-7.467 5.6A.2.2 0 0 1 4 13.6"})}))),tK={m:JY,"ï":KY,R:_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M13.6 11H2.4a.2.2 0 0 1-.16-.32l5.6-7.467a.2.2 0 0 1 .32 0l5.6 7.467a.2.2 0 0 1-.16.32"})}))),S:ZY,T:QY,U:eK,P:YY,Q:VY,"è":_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M14.98 15H1.04c-1.002 0-1.303-.7-.802-1.5l6.82-11.9c.5-.8 1.303-.8 1.804 0l6.92 11.9c.501.8.1 1.5-.803 1.5M8.5 5h-1c-.3 0-.5.2-.5.5V9c0 .3.2.5.5.5h1c.3 0 .5-.2.5-.5V5.5c0-.3-.2-.5-.5-.5m-1 6c-.3 0-.5.2-.5.5v1c0 .3.2.5.5.5h1c.3 0 .5-.2.5-.5v-1c0-.3-.2-.5-.5-.5z"})}))),"¢":$Y,"©":BY,"23F4":HY,2013:XY,"&":UY,add:FY,"minus-2":GY,dot:WY},nK=({size:e,iconKey:t,color:n,pvStyle:r})=>{const o=t&&tK[t];return o&&Uo.jsx("div",{"data-testid":"representation-indicator-icon",style:{color:n,height:e,...r},children:Uo.jsx(o,{style:{height:e}})})},rK=(e,t)=>e.max===e.min?.5:(t-e.min)/(e.max-e.min),oK=(e,t,n)=>{const r=e.paletteColors?e.paletteColors[t]:e.localPaletteColors[t];return n.getColorPickerColor(r)},iK=(e,t,n)=>{const r={previousColor:(o=e.localPaletteColors)[(i=t)-(i>0?1:0)],nextColor:o[i+(i<o.length-1?1:0)]};var o,i;const a=((e,t)=>{const n=e.limits&&e.limits.concat().sort(((e,t)=>e.value-t.value));return{lowerLimit:n&&t>0?n[t-1]:{value:0,gradient:!1},upperLimit:n&&n[t]?n[t]:{value:1,gradient:!1}}})(e,t),s=((e,t,n,r,o)=>{const{upperLimit:i,lowerLimit:a}=e,{previousColor:s,nextColor:l}=t,c=r===i.value?1:(r-a.value)/(i.value-a.value);return a.gradient&&i.gradient?r-a.value<i.value-r?{color:s.color,t:.5-c}:{color:l.color,t:c-.5}:a.gradient?{color:s.color,t:1-(.5+c/2)}:i.gradient?{color:l.color,t:c/2}:{color:o.localPaletteColors[n].color,t:r}})(a,r,t,n,e);return s&&IW(e.localPaletteColors[t].color).blend(IW(s.color),s.t)},aK=(e,t,n)=>{const r=((e,t)=>{const{limits:n}=e;return n&&(e.limits=n.sort(((e,t)=>e.value-t.value)),e.limits=n.map((e=>({...e,value:rK(t,e.value)})))),e})({...e},t),o=r.paletteColors||r.localPaletteColors;return o&&(r.localPaletteColors=o.concat().map(((e,t)=>({color:oK(r,t,n)})))),r},sK=(e,t,n,r)=>{const o=aK(e,n,r),{localPaletteColors:i}=o;if(t<=0)return i[0].color;if(t>=1)return i[i.length-1].color;const a=((e,t)=>{let n="",r=0;const{limits:o,localPaletteColors:i}=e;for(let a=0;a<i.length;a++){const i=o&&o[a]?o[a].value:1;if(t>=r&&t<i){n=iK(e,a,t);break}r=i}return n})(o,t);return a},lK=(e,t)=>{const n=(e=>e.map((e=>e.value??e)).sort(((e,t)=>e-t)))(e),r=n.some((e=>!NY(e)));return 0===n.length||r?(e=>{const t=0===e?0:.5*e;return{min:e-t,max:e+t}})(t):1===n.length?((e,t)=>{const n=e[0]-t;if(0===n||!NY(n)){const e=0===t?.5:Math.abs(.5*t);return{min:t-e,max:t+e}}return n>0?{min:t-.5*Math.abs(t),max:e[0]+2*n}:{min:e[0]+2*n,max:t+.5*Math.abs(t)}})(n,t):((e,t)=>{let n=e[e.length-1]-e[0];return n=n>0?n:1,{min:Math.min(t,e[0])-n/2,max:Math.max(t,e[e.length-1])+n/2}})(n,t)},cK=(e,t)=>{const{limits:n}=e.segments;if(!n)return;const r=((e,t)=>{const{min:n,max:r}=lK(e,t),o=Math.abs(t);return{min:n??t-o,max:r??t+o}})(n,t),o=((e,t,n)=>{const{limits:r,paletteColors:o,localPaletteColors:i}=e.segments;if(!r||!NY(t))return 0;let a=n&&NY(n)?Math.min(n,t):0;const s=r.sort(((e,t)=>e.value-t.value)),l=o||i;for(let e=0;e<l.length;e++){if(e===l.length-1||t<s[e].value&&t>=a)return e;a=s[e].value}return 0})(e,t,r.min);return{limitRange:r,limitPaletteColorIndex:o}},uK=e=>"flex-start"===e?"flex-end":"flex-start",dK=(e,t,n,r)=>{const o=e.indicatorConditionalColoring;if(!o)return;const i=cK(o,t),a=((e,t,n,r)=>{const{segments:o}=e;if(!o||!n)return;const{limits:i}=o;if(!i?.length||!((e,t)=>!(!e||0===e.length||!(e[t]?.gradient??e[t-1]?.gradient)))(i,n.limitPaletteColorIndex))return oK(o,n.limitPaletteColorIndex,r);const a=rK(n.limitRange,t);return sK(o,a,n.limitRange,r)})(o,t,i,r),s=o.segments.paletteColors[i?.limitPaletteColorIndex||0].icon,{indicator:l}=e;let c=l?.position||"right";return"rtl"===n&&(c="right"===c?"left":"right"),{color:a,iconKey:s,position:c}},pK=({representation:e,cellValue:t,textStyle:n})=>{const{styleService:r}=wV(),{theme:o}=bV(),{direction:i}=gV(),{text:a,indicator:s}=e,{showTextValues:l,applySegmentColors:c}=s??{},u=dK(e,t,i,o),{fontSize:d,fontFamily:p,fontStyle:h,fontWeight:f,textDecoration:m}=r.measureValues,g={fontSize:d,fontFamily:p,fontStyle:h,fontWeight:f,textDecoration:m},y=parseInt(d||r$,10),{iconKey:_,color:b,position:x}=u||{},v={display:"flex",paddingTop:2};return l?Uo.jsxs("div",{"data-key":"representation-indicator",style:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"4px",overflow:n?.overflow,color:c?b:n?.color},children:["left"===x&&nK({size:y,iconKey:_,color:b,pvStyle:v}),Uo.jsx("span",{style:{paddingTop:4,overflow:n?.overflow,textOverflow:n?.textOverflow,whiteSpace:"nowrap",direction:t<0?"ltr":void 0,...g},children:a}),"right"===x&&nK({size:y,iconKey:_,color:b,pvStyle:v})]}):(v.paddingTop=5,nK({size:y,iconKey:_,color:b,pvStyle:v}))},hK=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M8 15c-3.848 0-7-3.152-7-7s3.152-7 7-7 7 3.152 7 7-3.152 7-7 7m0 1c4.4 0 8-3.6 8-8s-3.6-8-8-8-8 3.6-8 8 3.6 8 8 8m4-7.5H4v-1h8z"})}))),fK=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M8 15c-3.848 0-7-3.152-7-7s3.152-7 7-7 7 3.152 7 7-3.152 7-7 7m0 1c4.4 0 8-3.6 8-8s-3.6-8-8-8-8 3.6-8 8 3.6 8 8 8m4-7.5H4v-1h8zM8.5 4v8h-1V4z"})}))),mK=e=>!!e.target?.getAttribute("class")?.includes(fN),gK=(e,t)=>{switch(t.type){case"clearSelections":return{engineSelectedCells:null,activeSelection:null,selectedField:null};case"mouseup":return{...e,activeSelection:null,engineSelectedCells:t.payload.engineSelectedCells};case"mousedown":return{...e,activeSelection:t.payload.activeSelection,selectedField:t.payload.selectedField};case"mouseover":{if(!e.activeSelection)return e;const{index:n}=t.payload,r=Math.min(n,e.activeSelection.startIndex),o=Math.max(n,e.activeSelection.endIndex);if(r===e.activeSelection.startIndex&&o===e.activeSelection.endIndex)return e;const i={...e.activeSelection,startIndex:r,endIndex:o};return i.clientSelectedCells=(e=>{const{getCellFromIndex:t,startIndex:n,endIndex:r,clientSelectedCells:o}=e,i=new Map(o);for(let e=n;e<=r;e++){const n=t(e);"N"===n?.ref.qType&&i.set(n.ref.qElemNo,n)}return i})(i),{...e,activeSelection:i}}default:return e}},yK=e=>null!==e.target?.closest("[data-prevent-selection]"),_K=e=>"A"===e.target?.tagName,bK=({startIndex:e,getCellFromIndex:t,cell:n})=>({type:"mousedown",payload:{activeSelection:{startIndex:e,endIndex:e,getCellFromIndex:t,clientSelectedCells:(new Map).set(n.ref.qElemNo,n)},selectedField:{selectionCellType:n.selectionCellType,index:"L"===n.selectionCellType?n.x:n.y}}});const xK=l({createMouseDownHandler:()=>()=>{},createMouseOverHandler:()=>()=>{},createPointerUpHandler:()=>()=>{},isSelected:()=>!1,isActive:!1,isLocked:()=>!1}),vK=()=>n(xK),wK=({children:e,selections:t})=>{const n=function(e){const{updatePageInfo:t}=gV(),n=e.isActive(),[r,o]=c(gK,{engineSelectedCells:null,selectedField:null,activeSelection:null});u((()=>{const n=()=>{o({type:"clearSelections"})},r=()=>{n(),t({page:0})};return e.on("deactivated",n),e.on("canceled",n),e.on("confirmed",r),e.on("cleared",n),()=>{e.removeListener("deactivated",n),e.removeListener("canceled",n),e.removeListener("confirmed",r),e.removeListener("cleared",n)}}),[e,t]);const i=p((async()=>{if(!r.activeSelection)return;var t,n;1===r.activeSelection.clientSelectedCells.size&&(t=r.engineSelectedCells,(n=r.activeSelection).clientSelectedCells.forEach(((e,r)=>{t?.has(r)&&(n.clientSelectedCells.delete(r),t.delete(r))})));const i=new Map([...r.engineSelectedCells??new Map,...r.activeSelection.clientSelectedCells]);try{o({type:"mouseup",payload:{engineSelectedCells:i}}),await e.select({method:"selectPivotCells",params:[EV,Array.from(i,(([,e])=>({qType:e.selectionCellType,qRow:e.y,qCol:e.x})))]})}catch(e){console.error(e),o({type:"mouseup",payload:{engineSelectedCells:r.engineSelectedCells}})}}),[r,e]);u((()=>{if(r.activeSelection)return document.addEventListener("mouseup",i),()=>{document.removeEventListener("mouseup",i)}}),[i,r.activeSelection]);const a=p(((e,t)=>n=>{const r=t(e);mK(n)||yK(n)||_K(n)||!(e=>1===e.buttons)(n)||!r||o(bK({startIndex:e,getCellFromIndex:t,cell:r}))}),[]),s=p((t=>async()=>{r.activeSelection&&(e.isActive()||await e.begin([EV]),o({type:"mouseover",payload:{index:t}}))}),[r.activeSelection,e]),l=p(((e,t)=>n=>{if("touch"!==n.pointerType)return;const r=t(e);mK(n)||yK(n)||_K(n)||!r||(o(bK({startIndex:e,getCellFromIndex:t,cell:r})),i())}),[i]),d=p((e=>!(!r.engineSelectedCells?.size&&!r.activeSelection?.clientSelectedCells.size||!r.selectedField||e.selectionCellType===r.selectedField.selectionCellType&&("L"===e.selectionCellType?r.selectedField.index===e.x:r.selectedField.index===e.y))),[r.activeSelection?.clientSelectedCells.size,r.engineSelectedCells?.size,r.selectedField]),h=p((e=>!d(e)&&(r.engineSelectedCells?.has(e.ref.qElemNo)||!!r.activeSelection?.clientSelectedCells.has(e.ref.qElemNo))),[d,r.activeSelection?.clientSelectedCells,r.engineSelectedCells]);return f((()=>({isSelected:h,isActive:n,isLocked:d,createMouseDownHandler:a,createMouseOverHandler:s,createPointerUpHandler:l})),[h,n,d,a,s,l])}(t);return Uo.jsx(xK.Provider,{value:n,children:e})},SK=e=>"fill"===e.representation.imageSize,CK=(e,t)=>{let n=e.isLeftColumn?"flex-start":"center";return e.isLeftColumn&&SK(e)&&t&&(n="center"),e.representation.type!==XF.Image||SK(e)?n:e.representation.resolvedImagePosition?.vertical};var EK=function(e){return e.Background="background",e.Color="color",e.FontWeight="fontWeight",e.FontStyle="fontStyle",e.TextDecoration="textDecoration",e}(EK||{});const kK={brighter:.5,darker:.3,opacity:.03},MK=(e,{cell:t,styleService:n})=>{if(e===EK.Background||e===EK.Color){const n=t.expressionColor[e];if(n)return n}return t.isNull?n.nullValues[e]:t.isPseudoDimension?n.measureLabels[e]:t.isTotal?n.totalValues[e]:n.dimensionValues[e]},RK=({styleService:e,isCellSelected:t,cell:n,isCellLocked:r})=>{if(t)return e.selectedColors.background;const o=MK(EK.Background,{cell:n,styleService:e});return!r||!o||n.isPseudoDimension||n.isEmpty||n.isNull||n.isTotal?MK(EK.Background,{cell:n,styleService:e}):`repeating-linear-gradient(\n -45deg,\n ${GB(i=o,kK)} 0px 2px,\n ${i} 0px 4px\n ) border-box`;var i},AK=({cell:e,styleService:t,isCellSelected:n})=>n?t.selectedColors.color:MK(EK.Color,{cell:e,styleService:t}),IK=({cell:e,styleService:t})=>{const{qCanCollapse:n,qCanExpand:r}=e.ref,o=MK(EK.FontWeight,{cell:e,styleService:t});return void 0===o&&(r||n)?i$:o},PK=({cell:e,styleService:t})=>MK(EK.FontStyle,{cell:e,styleService:t}),OK=({cell:e,styleService:t})=>MK(EK.TextDecoration,{cell:e,styleService:t}),LK=e=>e?"pointer":"default",DK=({expandOrCollapse:e,cell:t})=>n=>{e?.(t.y,t.x),n.stopPropagation()},TK=(e,t)=>{if(!e.isLeftColumn||e.representation.type===XF.Image)return{padding:4};return{padding:4,marginTop:t.dimensionValueTextHeight/2-6.5-4}},zK=({cell:e,isLeftColumn:t,isCellSelected:n})=>{const{styleService:r,layoutService:o}=wV(),{interactions:i}=bV(),{isActive:a}=vK(),{dataModel:s}=sU();if(!e.ref.qCanExpand&&!e.ref.qCanCollapse)return null;const l=!i.active||a||!s,c=AK({cell:e,styleService:r,isCellSelected:n}),u=a?.4:1,d=e.ref.qCanExpand?fK:hK;let p;p=e.ref.qCanExpand?t?s.expandLeft:s.expandTop:t?s.collapseLeft:s.collapseTop;const h=hU({isLeftColumn:t,layoutService:o,representation:e.representation});return Uo.jsx(d,{opacity:u,color:c,"data-prevent-selection":!l||void 0,"data-testid":e.ref.qCanExpand?"expand-icon":"collapse-icon",height:13,style:{flexShrink:0,cursor:l?"default":"pointer",position:"sticky",top:0,...TK(e,r),...h&&{alignSelf:CK(e)}},onClick:l?void 0:DK({cell:e,expandOrCollapse:p})})},jK=e=>{switch(e){case"fitHeight":case"fill":case"alwaysFit":return"100%";case"originalSize":return"fit-content";default:return"auto"}},NK=(e,t,n)=>{if("alwaysFit"===e&&t&&!n)return"fit-content";switch(e){case"fitHeight":return"auto";case"originalSize":return"fit-content";case"alwaysFit":return n?"unset":"100%";default:return"100%"}},qK=(e,t)=>{if("alwaysFit"===e)switch(t?.vertical){case"flex-start":return"center top";case"flex-end":return"center bottom";default:return"center center"}},FK=({representation:e,canExpandOrCollapse:t,leafCount:n,isLeftColumn:r,styleService:o,layoutService:i,isMeasureCell:a})=>{const{isIndentModeEnabled:s}=i,l=hU({isLeftColumn:r,layoutService:i,representation:e}),c=t?21:0,u=e.imageBox?.width??24;let d=`calc(100% - ${c}px)`,p=o.headerCellHeight;r&&l&&(d=u),(a||r)&&(p=o.contentCellHeight);let h=p;switch(r&&void 0!==n&&!s&&(h=p*Math.max(n,1)),e.imageSize){case"originalSize":return{maxWidth:d,maxHeight:h,...l?{width:d}:{}};case"fitWidth":return{width:d,maxHeight:h};case"fitHeight":return{height:h,maxWidth:d,...l?{width:d}:{}};case"fill":return{height:h,width:d};default:return{width:d,height:p}}},WK=e=>{if("alwaysFit"===e)return"contain"},BK=({suffix:e,delimeter:t})=>` ${e?t:""} ${e}`.trim(),$K=({imageSize:e,resolvedImagePosition:t,isImagesInIndentModeEnabled:n,isMeasureCell:r})=>({width:NK(e,n,r),height:jK(e),objectFit:WK(e),objectPosition:qK(e,t),...n&&"alwaysFit"===e?{"max-width":"100%"}:{}}),HK=({representation:e,textStyle:t,isMeasureCell:n})=>{const{imageRef:r,onLoad:o}=(()=>{const{downloadService:e}=wV(),t=s(null),{promise:n,resolve:r}=f((()=>M$()),[]);return u((()=>(e.isDownloadedAsPDForImage&&(e.waitForPromise(n),t.current?.complete&&r()),()=>{r()})),[t,e,n,r]),{onLoad:p((()=>{r()}),[r]),imageRef:t}})(),{layoutService:{isIndentModeEnabled:i}}=wV(),{url:a,text:l,imageSize:c,resolvedImagePosition:d}=e,{overflow:h,...m}=t;return Uo.jsx("img",{src:a,alt:l,style:{...$K({imageSize:c,resolvedImagePosition:d,isImagesInIndentModeEnabled:i,isMeasureCell:n}),...m},onLoad:o,ref:r})},VK=({representation:e,textStyle:t,canExpandOrCollapse:n,leafCount:r,isLeftColumn:o=!1,imageContainerHorizontalAlignment:i,isMeasureCell:a})=>{const{styleService:s,layoutService:l}=wV(),{resolvedImagePosition:c}=e;return Uo.jsx("div",{"data-key":"image-container--image",style:{display:"flex",flexDirection:"column",justifyContent:c?.vertical,alignItems:i,overflow:"hidden",boxSizing:"border-box",border:"4px solid transparent",...FK({representation:e,canExpandOrCollapse:n,leafCount:r,styleService:s,layoutService:l,isLeftColumn:o,isMeasureCell:a})},children:Uo.jsx(HK,{representation:e,textStyle:t,isMeasureCell:!0})})},GK=(e,t,n)=>{if(e?.auto)return t;switch(e?.align){case"center":return"center";case"left":return"rtl"===n?"flex-end":"flex-start";case"right":return"rtl"===n?"flex-start":"flex-end";default:return t}},UK=(e,t)=>{let{textAlign:n}=t.getDimensionInfo(e.dimensionInfoIndex)??{};return e.isPseudoDimension&&void 0!==e.visibleMeasureInfoIndex&&({labelTextAlign:n}=t.visibleMeasureInfo.at(e.visibleMeasureInfoIndex)??{}),n?.auto||void 0===n?"left":n.align},YK={display:"flex",flexDirection:"row",alignItems:"center"},KK={alignItems:"center",display:"flex",flexDirection:"row",backgroundClip:"padding-box"},XK=(e,t,n,r)=>t?{...KK,...e.nullValues}:n?{...YK,color:e.totalValues.color,background:r??e.totalValues.background}:{...YK,color:e.measureValues.color,background:r??e.measureValues.background},JK=(e,t,n,r,o)=>{const{fontFamily:i,fontSize:a}=e.measureValues,s={...h$,...!n&&f$(e.grid.lineClamp),...t&&{color:t},fontFamily:i,fontSize:a};if(o){const{fontWeight:t,fontStyle:n,textDecoration:r}=e.nullValues;return{...s,fontWeight:t,fontStyle:n,textDecoration:r}}if(r){const{fontWeight:t,fontStyle:n,textDecoration:r}=e.totalValues;return{...s,fontWeight:t,fontStyle:n,textDecoration:r}}const{fontWeight:l,fontStyle:c,textDecoration:u}=e.measureValues;return{...s,fontWeight:void 0===l?i$:l,fontStyle:c,textDecoration:u}},ZK=({cell:e,representation:t,color:n,isTotalValueCell:r,cellHorizontalAlignment:o})=>{const{layoutService:i,styleService:a}=wV(),{isIndentModeEnabled:s}=i,l=e.isNull?i.getNullValueText():t.text,c=t.type===XF.Image,u=t.type===XF.Indicator,d=NY(qY(l)),p=JK(a,n,d,r,e.isNull);if(!s&&c&&!e.isNull||s&&c&&!e.isNull)return Uo.jsx(VK,{isMeasureCell:!0,textStyle:p,representation:t,imageContainerHorizontalAlignment:o});const h=qY(e.isNull?t.text:e.ref.qNum);return u&&NY(h)?Uo.jsx(pK,{representation:t,cellValue:h,textStyle:p}):Uo.jsx("span",{style:{padding:4,direction:d?"ltr":void 0,...p},children:l})},QK=(e,t)=>e?.[t]?.visibleMeasureInfoIndex??0,eX="flex-start",tX=(e,t)=>e.isNull?eX:t.type===XF.Image&&"fill"!==t.imageSize?t.resolvedImagePosition?.vertical:eX,nX=({columnIndex:e,rowIndex:t,style:n,data:r})=>{const{env:o}=bV(),{pageInfo:i,direction:a}=gV(),{styleService:s,layoutService:l}=wV(),{attrExprInfoIndexes:c,gridSectionsData:{measureData:u,leftDimensionData:d,topDimensionData:h},visibleDimensionsInfo:{visibleTopDimensionInfo:f}}=sU(),m=(()=>{const{layoutService:{isIndentModeEnabled:e}}=wV(),{gridSectionsData:{leftDimensionData:t,topDimensionData:n},visibleDimensionsInfo:{visibleLeftDimensionInfo:r,visibleTopDimensionInfo:o}}=sU(),i=r.length,a=o.length;return p(((r,o)=>!(!n.grid.at(a-1)?.[r]?.isTotal&&!t.grid.at(e?0:i-1)?.[o]?.isTotal)),[n,t,i,a,e])})(),g=(()=>{const{gridSectionsData:{topDimensionData:e},visibleDimensionsInfo:{visibleTopDimensionInfo:t}}=sU(),n=t.length;return p((t=>{const r=e.grid.at(n-1)?.[t];return DY(r,e.totalDividerIndex)}),[e,n])})(),y=(()=>{const{layoutService:{isIndentModeEnabled:e}}=wV(),{gridSectionsData:{leftDimensionData:t},visibleDimensionsInfo:{visibleLeftDimensionInfo:n}}=sU(),r=n.length;return p((n=>{const o=e?0:r-1,i=t.grid.at(o)?.[n];return DY(i,t.totalDividerIndex,e)}),[t,e,r])})(),{showLastBorder:_}=r,b=h.grid.at(f.length-1),x=d.grid.at(-1),{background:v}=s.measureValues,w=u[t]?.[e],S=t===i.rowsOnCurrentPage-1,C=e===l.size.x-1;if(!w)return Uo.jsx(TY,{style:{...n,background:v},isLastRow:S,isLastColumn:C,showLastBorder:_,index:t,isLeftColumn:!1,showTotalCellDivider:!1});const E=l.hasPseudoDimOnLeft?QK(x,t):QK(b,e),k=l.visibleMeasureInfo[E],M=qG({cell:w.ref,representationProperties:k.representation,attrExprInfoIndex:c.measures[E],env:o,direction:a,conditionalColoring:k.conditionalColoring,enabledFeatures:{[XF.Image]:!0,[XF.Indicator]:!0}}),R=!w.isNull&&m(e,t),A=w.isNull?l.getNullValueText():M.text,I=!w.isNull||!Number.isNaN(+A),P=FG(c.measures[E],w.ref),O=((e,t,n,r,o)=>{const{textAlign:i}=t,a=r?"flex-end":"center";return e.isNull||n.type!==XF.Image?GK(i,a,o):n.resolvedImagePosition?.horizontal??"center"})(w,k,M,I,a),L={...XK(s,w.isNull,R,P.background),...g$(S,C,s.grid.border,a,_),..._$({bottomDivider:y(t),rightDivider:g(e),borderColor:s.grid.divider}),...p$,padding:"0px 4px",display:"flex",justifyContent:O};return Uo.jsx("div",{className:dN,title:A,style:{...L,...n},"data-testid":"measure-value","data-row-index":t,"data-col-index":e,children:Uo.jsx(zY,{width:jY(M),verticalAlign:tX(w,M),children:Uo.jsx(ZK,{cell:w,representation:M,isTotalValueCell:R,color:P.color,cellHorizontalAlignment:O})})})};var rX=t.memo(nX,bY);const oX=(e,t)=>t.list[e]?.id??e.toString(),iX=({columnIndex:e,rowIndex:t,data:n})=>n.grid[t]?.[e]?.id??`${t}-${e}`,aX=e=>({...d$,overflow:"hidden",boxSizing:"content-box",borderWidth:"rtl"===e?"1px 1px 0px 0px":"1px 0px 0px 1px"}),sX=({dataGridRef:e,height:t,rowHightCallback:n,width:r,showLastBorder:o,getRightGridColumnWidth:i,verticalScrollDirection:a,horizontalScrollDirection:s})=>{const{pageInfo:l,direction:c}=gV(),{layoutService:u,styleService:{grid:{divider:d},contentCellHeight:f}}=wV(),{dataModel:m,gridSectionsData:{measureData:g}}=sU(),y={...aX(c),borderColor:d,willChange:"auto",userSelect:"none",WebkitUserSelect:"none"},_=(({verticalScrollDirection:e,horizontalScrollDirection:t})=>{const{pageInfo:n}=gV(),{downloadService:r,viewService:o,layoutService:i}=wV(),{dataModel:a,gridSectionsData:{leftDimensionData:s,topDimensionData:l,measureData:c}}=sU(),u=s.columnCount,d=l.rowCount;return p((async({overscanColumnStartIndex:s,overscanColumnStopIndex:l,overscanRowStartIndex:p,overscanRowStopIndex:h})=>{o.gridColumnStartIndex=s,o.gridRowStartIndex=p,o.gridWidth=l-s+1,o.gridHeight=h-p+1;const f=o.gridWidth+u+(t.current===aW.None?0:xY),m=o.gridHeight+d+(e.current===aW.None?0:xY);let g=OY;m*f>1500&&(g=LY),g(a,i,c,n,o,e,t,r)}),[o,i,a,c,e,t,n,u,d,r])})({verticalScrollDirection:a,horizontalScrollDirection:s});return H$((()=>{e.current&&e.current.resetAfterColumnIndex(0,!1)}),[e,m,g]),h((()=>{e.current&&e.current.resetAfterIndices({columnIndex:0,rowIndex:0,shouldForceUpdate:!0})}),[r,t,e,f,c]),0===u.size.x?null:Uo.jsx(sY,{"data-section-id":"DATA_GRID",ref:e,style:y,columnCount:u.size.x,columnWidth:i,height:t,rowCount:l.rowsOnCurrentPage,rowHeight:n,width:r,itemData:{showLastBorder:o,grid:g},onItemsRendered:_,estimatedRowHeight:n(),estimatedColumnWidth:i(),itemKey:iX,direction:c,children:rX})};var lX=y(sX);const cX=_(((e,t)=>Uo.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:[Uo.jsx("path",{d:"M13 7H8zV4.982C13 2.23 10.761 0 8 0S3 2.23 3 4.982V7h.75H3h1.5V5.332C4.5 3.216 5.549 1.5 8 1.5s3.5 1.716 3.5 3.832V7h.75H3a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1H3z"}),Uo.jsx("use",{fillRule:"evenodd"})]}))),uX=e=>{const[t,n]=m(!1);return H$((()=>{n(!1)}),e),{isAdjustingWidth:t,setIsAdjustingWidth:n}},dX=()=>{const[e,t]=m(!1),{dataModel:n}=sU(),{interactions:r}=bV(),{isAdjustingWidth:o,setIsAdjustingWidth:i}=uX([n]);return{open:e,setOpen:t,handleOpenMenu:e=>{!r.active||mK(e)||o||t(!0)},setIsAdjustingWidth:i}};function pX(e,t){const n=t.expressionColor?.background??e.dimensionValues.background,r=t.isLeftColumn?e.header.background:n,o=r===l$.Transparent?yW.WHITE:r,i=xq(e.grid.border),a=xq(o);return a.isInvalid()||i.isInvalid()||1===i.a?e.grid.border:function(e,t,n){return xq(e.r+(t.r-e.r)*n,e.g+(t.g-e.g)*n,e.b+(t.b-e.b)*n,e.a+(t.a-e.a)*n)}(a,i,i.a).getRGB()}const hX=({cellInfo:e,columnWidth:t,isLastColumn:n,overrideLeftGridWidth:r,setIsAdjustingWidth:o,shouldApplyIndentModeColumnWidth:i,tableWidth:a})=>{const{direction:s}=gV(),{interactions:l,translator:c}=bV(),{isActive:u}=vK(),{dataModel:d}=sU(),{styleService:p}=wV(),[,h]=m({});if(!(e.canBeResized&&!!l.active&&!u))return null;const f=pX(p,e);return Uo.jsx(X$,{isPivot:!0,columnWidth:t,isLastColumn:n,keyValue:`adjuster-${e.dimensionInfoIndex}`,hoverColor:f,updateWidthCallback:t=>{h({}),r&&void 0!==e.colIdx&&r(t,e.colIdx)},confirmWidthCallback:t=>{i?d.applyIndentModeColumnWidth({...t,pixels:Math.min((a??0)*dU,t.pixels??0)}):d.applyColumnWidth(t,e)},setIsAdjustingWidth:o,isLeftColumn:e.isLeftColumn,accessibilityRelatedArgs:{translator:c,columnLabel:e.label??""},direction:s})},fX=ID(vT,{shouldForwardProp:e=>!["interactions","hoverBackground","background","shouldShowMenuIcon","isDimension"].includes(e)})((({interactions:e,background:t,hoverBackground:n,shouldShowMenuIcon:r,isDimension:o})=>({pointerEvents:o?"all":"none",position:"relative",display:"grid",gridTemplateColumns:r?"1fr 12px":"1fr",gap:8,alignItems:"center",cursor:e.active?"pointer":"default",background:t,"&&:hover":{background:e.active&&o?n:t}}))),mX=ID("div",{shouldForwardProp:e=>!["direction"].includes(e)})((({direction:e})=>({position:"absolute",left:"rtl"!==e?0:void 0,bottom:0}))),gX=ID("div",{shouldForwardProp:e=>"justifyContent"!==e})((({justifyContent:e})=>({...u$,justifyContent:e??u$.justifyContent,flexDirection:"row",overflow:"hidden",position:"relative",gap:8}))),yX=ID("div")((()=>({...u$}))),_X=ID("div",{shouldForwardProp:e=>!["fontSize","fontFamily","fontWeight","fontStyle","textDecoration","justifyContent"].includes(e)})((({fontSize:e,fontFamily:t,fontWeight:n,fontStyle:r,textDecoration:o,justifyContent:i})=>({display:"flex",justifyContent:i,alignSelf:"center",flexGrow:1,maxWidth:"100%",fontWeight:n,fontSize:e,fontFamily:t,fontStyle:r,textDecoration:o}))),bX=ID(Gz)((({theme:e})=>({".MuiList-root":{padding:e.spacing(.5,0)}}))),xX=ID(Jz,{shouldForwardProp:e=>!["isActive"].includes(e)})((({theme:e,isActive:t})=>({width:220,maxHeight:32,borderRadius:e.spacing(.5),margin:e.spacing(.25,.5),padding:e.spacing(1,1.5),display:"flex",justifyContent:"space-between",position:"relative",overflow:"hidden ",boxSizing:"border-box",background:t?"rgba(0, 0, 0, 0.05)":"transparent","&:hover":{".indent-mode-dropdown-more":{opacity:1}}}))),vX=ID("span")({textOverflow:"ellipsis",overflow:"hidden"}),wX=ID("div",{shouldForwardProp:e=>"visible"!==e})((({visible:e})=>({opacity:e?1:0,width:cU,display:"flex",justifyContent:"center",alignItems:"center",position:"relative"}))),SX=ID("span",{shouldForwardProp:e=>!["padding","alignSelf"].includes(e)})((({padding:e,alignSelf:t})=>({padding:e,alignSelf:t,position:"sticky",top:0})));let CX=function(e){return e.Expand="Expand",e.Collapse="Collapse",e}({});const EX=(e,t)=>({qExcludeList:t===CX.Expand,qPos:{qDimName:e,qElemNo:[]}}),kX=`${EV}/qExpansionState`,MX=({model:e,qExpansionState:t,qEffectiveDimensionName:n,action:r})=>async()=>{const o=(({qEffectiveDimensionName:e,oldExpansionState:t,action:n})=>{const r=t?.findIndex((t=>t.qPos?.qDimName===e));return{expansionData:EX(e,n),index:r}})({qEffectiveDimensionName:n,oldExpansionState:t,action:r});await(async({model:e,newExpansionState:t,errorMsg:n})=>{const{index:r,expansionData:o}=t;try{let t,n=kX,i="Add";void 0===r?t=JSON.stringify([o]):-1===r?(n=`${kX}/-`,t=JSON.stringify(o)):(n=`${kX}/${r}`,i="Replace",t=JSON.stringify(o)),await e.applyPatches([{qPath:n,qOp:i,qValue:t}],!0)}catch(e){console.error(n,e)}})({model:e,newExpansionState:o,errorMsg:`Failed to ${r} dimension`})},RX=({model:e,effectivePropertiesService:t,cell:n})=>{if(void 0===n.qEffectiveDimensionName)return;const r={model:e,qExpansionState:t.qExpansionState,qEffectiveDimensionName:n.qEffectiveDimensionName};return{expandCallback:MX({...r,action:CX.Expand}),collapseCallback:MX({...r,action:CX.Collapse}),alwaysFullyExpanded:t.qAlwaysFullyExpanded}},AX={[TH.Sorting]:!0,[TH.Selections]:!0,[TH.Searching]:!0},IX=({cell:e,style:t,isFirstColumn:n,isLastColumn:r,isLastRow:o,changeSortOrder:i,iconsVisibilityStatus:a,columnWidth:l,overrideLeftGridWidth:c,shouldApplyIndentModeColumnWidth:u,tableWidth:d})=>{const p=s(null),{styleService:h,layoutService:f,effectivePropertiesService:m}=wV(),{app:g,interactions:y,embed:_,translator:b,model:x}=bV(),{fontSize:v,fontFamily:w,fontStyle:S,fontWeight:C,textDecoration:E,color:k,background:M,hoverBackground:R,activeBackground:A}=h.header,I=s(null),{shouldShowLockIcon:P,shouldShowMenuIcon:O}=a,{open:L,setOpen:D,handleOpenMenu:T,setIsAdjustingWidth:z}=dX(),{direction:j}=gV(),N={sortFromMenu:async(t,n)=>{t.stopPropagation(),await i(e,n)}},q={embed:_,listboxRef:p,sortCriteria:f.searchSortFromDimension&&e.isDim?m.getSortCriteriaForDimension(e.dimensionInfoIndex):void 0},F={app:g,qStateName:f.layout.qStateName},{labelTextAlign:W}=f.getDimensionInfo(e.dimensionInfoIndex)??{},B=GK(W,"flex-start",j);return Uo.jsxs(fX,{className:dN,title:e.label,interactions:y,background:L?A:M,hoverBackground:R,shouldShowMenuIcon:O,isDimension:e.isDim,style:{...t,...p$,...y$(e,o,n,r,h.grid.border,j),color:k},"data-testid":"title-cell",onClick:T,children:[Uo.jsxs(gX,{children:[P?Uo.jsx(yX,{children:Uo.jsx(cX,{height:12})}):null,Uo.jsx(_X,{fontFamily:w,fontSize:v,fontStyle:S,fontWeight:C,textDecoration:E,justifyContent:B,children:Uo.jsx("span",{style:h$,children:e.label})})]}),e.isDim?Uo.jsxs(Uo.Fragment,{children:[Uo.jsx(NH,{headerData:e,translator:b,anchorRef:I,open:L,setOpen:D,interactions:y,menuAvailabilityFlags:AX,sortRelatedArgs:N,searchRelatedArgs:q,selectionRelatedArgs:F,expandOrCollapseArgs:RX({model:x,effectivePropertiesService:m,cell:e}),shouldShowMenuIcon:O,model:x&&"setActiveField"in x?x:void 0,direction:j}),Uo.jsx(mX,{ref:p,direction:j}),Uo.jsx(mX,{ref:I,direction:j})]}):null,Uo.jsx(hX,{cellInfo:{...e,isLeftColumn:!0},columnWidth:l,isLastColumn:r,overrideLeftGridWidth:c,setIsAdjustingWidth:z,shouldApplyIndentModeColumnWidth:u,tableWidth:d})]})},PX=({rowSpan:e,columnSpan:t})=>{const{styleService:n}=wV(),{direction:r}=gV();return e>0&&t>0?Uo.jsx("div",{style:{...d$,gridRowStart:1,gridRowEnd:`span ${e}`,gridColumnStart:1,gridColumnEnd:`span ${t}`,borderWidth:"rtl"===r?"0px 0px 0px 1px":"0px 1px 0px 0px",borderColor:n.grid.border,background:n.grid.background},"data-testid":"empty-header-cell"}):null},OX=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"m7.999 9.001-2.858-2.86a.2.2 0 0 0-.282 0l-.718.719a.2.2 0 0 0 0 .282L7 10.001l.859.858a.2.2 0 0 0 .282 0L9 10l2.859-2.859a.2.2 0 0 0 0-.282l-.718-.718a.2.2 0 0 0-.283 0z"})}))),LX=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"m7.999 6.999-2.858 2.86a.2.2 0 0 1-.282 0L4.14 9.14a.2.2 0 0 1 0-.282L7 5.999l.859-.858a.2.2 0 0 1 .282 0L9 6l2.859 2.859a.2.2 0 0 1 0 .282l-.718.718a.2.2 0 0 1-.283 0z"})}))),DX=({tableWidth:e,leftGridWidth:t,overrideLeftGridWidth:n})=>{const{direction:r}=gV(),{styleService:o}=wV(),{interactions:i,translator:a}=bV(),{isActive:s}=vK(),{dataModel:l}=sU(),{setIsAdjustingWidth:c}=uX([l]);if(!(!!i.active&&!s))return null;const u=pX(o,{isLeftColumn:!0});return Uo.jsx(X$,{isPivot:!0,isLastColumn:!0,isLeftColumn:!0,keyValue:"adjuster-indent-row",hoverColor:u,columnWidth:t,updateWidthCallback:t=>{n(Math.min(t,e*dU))},confirmWidthCallback:r=>{if(r.type===gN.FitToContent)return void l.applyIndentModeColumnWidth({type:gN.Auto});const o=Math.min(r.pixels??t,e*dU);n(o),l.applyIndentModeColumnWidth({type:gN.Pixels,pixels:o})},setIsAdjustingWidth:c,accessibilityRelatedArgs:{translator:a,columnLabel:a.get("SNPivotTable.IndentMode.Rows")},direction:r})},TX=_(((e,t)=>Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:Uo.jsx("path",{d:"M3 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0m6 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0m5 1a1 1 0 1 0 0-2 1 1 0 0 0 0 2"})}))),zX=({cell:e,changeSortOrder:t})=>{const n=s(null),r=s(null),{app:o,interactions:i,embed:a,translator:l,model:c}=bV(),{layoutService:u,effectivePropertiesService:d}=wV(),{open:p,setOpen:h,handleOpenMenu:f}=dX();return Uo.jsxs(xX,{onClick:f,isActive:p,children:[Uo.jsx(vX,{children:e.label}),Uo.jsxs(wX,{className:"indent-mode-dropdown-more",visible:p,children:[Uo.jsx(TX,{}),e.isDim?Uo.jsxs(Uo.Fragment,{children:[Uo.jsx(NH,{headerData:e,translator:l,anchorRef:n,open:p,setOpen:h,interactions:i,menuAvailabilityFlags:AX,sortRelatedArgs:{sortFromMenu:async(n,r)=>{n.stopPropagation(),await t(e,r)}},searchRelatedArgs:{embed:a,listboxRef:r},selectionRelatedArgs:{app:o,qStateName:u.layout.qStateName},expandOrCollapseArgs:RX({model:c,effectivePropertiesService:d,cell:e}),shouldShowMenuIcon:!1,model:c&&"setActiveField"in c?c:void 0}),Uo.jsx(mX,{ref:r}),Uo.jsx(mX,{ref:n})]}):null]})]})},jX=({idx:e,menu:t,menuItems:n,isOnlyOneRow:r})=>{const o=n.at(-1)?.id===MV,i=e+1<n.length&&n[e+1]?.id===MV;return!(r&&o&&i)&&(t?.id!==MV&&e<n.length-1)},NX=({menuItems:e,changeSortOrder:t,overrideLeftGridWidth:n,leftGridWidth:r,tableWidth:o})=>{const{styleService:i}=wV(),{interactions:a,translator:l}=bV(),{dataModel:c,gridSectionsData:{headersData:u}}=sU(),[d,p]=m(!1),h=s(null),{headerCellHeight:f}=i,{color:g,background:y,hoverBackground:_,activeBackground:b,fontFamily:x,fontSize:v,fontStyle:w,fontWeight:S,textDecoration:C}=i.header,{isAdjustingWidth:E}=uX([c]),k=e=>{e.stopPropagation()},M={height:f,gridColumn:`1 / span ${u.size.x}`,gridRow:u.size.y,zIndex:u.size.x-0};return Uo.jsxs(fX,{isDimension:!0,background:d?b:y,interactions:a,hoverBackground:_,style:{...M,...p$,color:g},onClick:e=>{!a.active||mK(e)||E||p(!d)},"data-testid":"indentModeHeaderCellWrapper",children:[Uo.jsxs(gX,{justifyContent:"flex-start",children:[Uo.jsx(_X,{fontFamily:x,fontSize:v,fontStyle:w,fontWeight:S,textDecoration:C,justifyContent:"flex-start",children:Uo.jsx("span",{style:h$,children:l.get("SNPivotTable.IndentMode.Rows")})}),d?Uo.jsx(LX,{}):Uo.jsx(OX,{}),Uo.jsx(mX,{ref:h})]}),Uo.jsx(bX,{open:d,anchorEl:h.current,disableEnforceFocus:!0,children:e.map(((n,r)=>[n&&n.id!==MV&&Uo.jsx("li",{role:"presentation",onClick:k,onKeyDown:k,children:Uo.jsx(zX,{cell:n,changeSortOrder:t})}),jX({idx:r,menu:n,menuItems:e,isOnlyOneRow:1===u.size.y})&&Uo.jsx(tH,{"data-testid":"group-divider",variant:"middle"})]))}),Uo.jsx(DX,{tableWidth:o,leftGridWidth:r,overrideLeftGridWidth:n})]})},qX=({layoutService:e,headersData:t,topRowIndex:n})=>e.isIndentModeEnabled&&t.size.x>1&&n+1===t.size.y,FX={display:"grid",width:"fit-content"},WX=({tableWidth:e,leftGridWidth:t,columnWidths:n,rowHight:r,changeSortOrder:o,getHeaderCellsIconsVisibilityStatus:i,height:a,overrideLeftGridWidth:s})=>{const{layoutService:l}=wV(),{gridSectionsData:{headersData:c}}=sU();return Uo.jsxs("div",{"data-testid":"HEADER_GRID",style:{...FX,gridTemplateColumns:n.map((e=>`${e}px`)).join(" "),gridTemplateRows:c.data.map((()=>`${r}px`)).join(" "),height:a},children:[c.size.y>1&&Uo.jsx(PX,{columnSpan:c.size.x-1,rowSpan:c.size.y-1}),c.data.map(((a,u)=>{let d=[];if(qX({layoutService:l,headersData:c,topRowIndex:u})){const n=a.at(0);return Array.isArray(n)&&d.push(Uo.jsx(NX,{menuItems:n,changeSortOrder:o,overrideLeftGridWidth:s,leftGridWidth:t,tableWidth:e},n.at(0)?.id)),d}return d=a.reduce(((t,a,d)=>{if(a&&!Array.isArray(a)){const p=i(d,a.isLocked,a.label),h=l.isIndentModeEnabled&&1===c.size.x;t.push(Uo.jsx(IX,{style:{width:n[d],height:r,gridColumn:l.isIndentModeEnabled&&c.size.x>1?2:d+1,gridRow:u+1,zIndex:c.size.x-d},isLastRow:u===c.size.y-1,isFirstColumn:0===d,isLastColumn:d===c.size.x-1,changeSortOrder:o,cell:a,iconsVisibilityStatus:p,columnWidth:n[d],overrideLeftGridWidth:s,shouldApplyIndentModeColumnWidth:h,tableWidth:e},a.id))}return t}),[]),d}))]})};var BX=y(WX);const $X=(e,t,n,r)=>{const{layoutService:o}=wV();h((()=>{e.current?.forEach((e=>e?.resetAfterIndex(0,!0)))}),[e,t,n,r,o])},HX=(e,t)=>{H$((()=>{e.current?.forEach((e=>e?.resetAfterIndex(0,!1)))}),[e,t])},VX=(e,t)=>{const{isLast:n,list:r,listValues:o}=t;return n?r[e]:o[e]},GX=(e,t,n,r,o)=>{if(o)return;const i=e.representation,a=hU({isLeftColumn:n,layoutService:t,representation:i}),s=n?"flex-start":"center",l=e.representation.resolvedImagePosition?.horizontal;if(e.representation.type===XF.Image)return a&&l&&"center"!==l&&"rtl"===r?uK(l):l??s;if(e.isPseudoDimension&&void 0!==e.visibleMeasureInfoIndex){const{labelTextAlign:n}=t.visibleMeasureInfo[e.visibleMeasureInfoIndex]??{};return GK(n,s,r)}const{textAlign:c}=t.getDimensionInfo(e.dimensionInfoIndex)??{};return GK(c,s,r)},UX=()=>{},YX=({children:e,reactWindowStyle:t,cell:n,data:r,showTotalCellDivider:o,isLastRow:i,isLastColumn:a,isLeftColumn:s,isCellSelected:l,isAdjustingWidth:c,index:u})=>{const{styleService:d,layoutService:p}=wV(),{interactions:h}=bV(),{direction:f}=gV(),{isLocked:m,createMouseDownHandler:g,createMouseOverHandler:y,createPointerUpHandler:_}=vK(),{showLastBorder:b}=r,x=m(n)||n.isLockedByDimension,v=!(x||!h.active||!h.select||n.isEmpty||n.isNull||n.isPseudoDimension||n.isTotal||c),w=v?g(u,(e=>VX(e,r))):void 0,S=v?y(u):void 0,C=v?_(u,(e=>VX(e,r))):void 0,E=hU({isLeftColumn:s,layoutService:p,representation:n.representation});return Uo.jsx("div",{className:dN,title:h.passive?n.representation.text:void 0,style:{...t,...g$(i,a,d.grid.border,f,b),..._$({bottomDivider:o&&s,rightDivider:o&&!s,borderColor:d.grid.divider}),...p$,padding:"rtl"===f?"0px 0px 0px 4px":"0px 4px",cursor:LK(v),background:RK({styleService:d,isCellSelected:l,cell:n,isCellLocked:x}),zIndex:s?void 0:p.size.x-n.x,justifyContent:GX(n,p,s,f,E),display:"flex",...p.isIndentModeEnabled&&s&&{["rtl"===f?"paddingRight":"paddingLeft"]:Math.max(4,24*(n.indentLevel??0))},textAlign:UK(n,p)},"aria-hidden":"true",onMouseDown:w,onMouseOver:S,onPointerUp:C,onKeyUp:UX,role:"button",tabIndex:-1,"data-testid":"dimension-cell","data-x":n.x,"data-page-x":n.pageX,"data-y":n.y,"data-page-y":n.pageY,"data-cell-type":n.ref.qType,"data-dimension-info-index":n.dimensionInfoIndex,children:e})},KX=e=>{e.stopPropagation()},XX=({href:e,text:t,interactions:n,color:r})=>({href:e,title:t,rel:"noreferrer",target:"_blank",underline:"hover",onClick:KX,color:yW.LINK,style:{pointerEvents:n.active?"auto":"none",color:r??void 0,opacity:n.active&&n.passive||r?void 0:.4}}),JX=({href:e,text:t,interactions:n,color:r})=>Uo.jsx(sd,{...XX({href:e,text:t,interactions:n,color:r}),children:t});function ZX(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QX(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 eJ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?QX(Object(n),!0).forEach((function(t){ZX(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QX(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var tJ=Object.prototype.hasOwnProperty,nJ=Object.prototype.toString,rJ=Object.defineProperty,oJ=Object.getOwnPropertyDescriptor,iJ=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===nJ.call(e)},aJ=function(e){if(!e||"[object Object]"!==nJ.call(e))return!1;var t,n=tJ.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&tJ.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||tJ.call(e,t)},sJ=function(e,t){rJ&&"__proto__"===t.name?rJ(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},lJ=function(e,t){if("__proto__"===t){if(!tJ.call(e,t))return;if(oJ)return oJ(e,t).value}return e[t]},cJ=function e(){var t,n,r,o,i,a,s=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)r=lJ(s,n),s!==(o=lJ(t,n))&&(u&&o&&(aJ(o)||(i=iJ(o)))?(i?(i=!1,a=r&&iJ(r)?r:[]):a=r&&aJ(r)?r:{},sJ(s,{name:n,newValue:e(u,a,o)})):void 0!==o&&sJ(s,{name:n,newValue:o}));return s};function uJ(e,t,n,r){if(!e)return-1;const o=n.cache,i=e.origin?e.origin():null;i&&(e=i);let a=o.fields.indexOf(e),s=-1,l=-1;if(-1===a)for(let t=0;t<o.wrappedFields.length;t++)if(l=o.wrappedFields[t].attrDims.map((e=>e.instance)).indexOf(e),s=o.wrappedFields[t].attrExps.map((e=>e.instance)).indexOf(e),-1!==l||-1!==s){a=t;break}if(Array.isArray(r)&&r.some(((e,t)=>e!==t))){const e=r.indexOf(a);-1!==e&&(a=e)}return a-=t.qArea.qLeft,a<0||a>=t.qArea.qWidth?-1:l>=0?e=>e[a].qAttrDims.qValues[l]:s>=0?e=>e[a].qAttrExps.qValues[s]:e=>e[a]}function dJ(e,t,n){let{key:r}=n;const o={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return o.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(o.value),e.field&&(o.source={key:r,field:e.field.key()}),o}function pJ(e){let{cache:t,f:n,mainCell:r,p:o,page:i,rowIdx:a,row:s,sourceKey:l,target:c,targetProp:u,columnOrder:d}=e,p=r;if(o.field&&o.field!==n){const e=uJ(o.field,i,{cache:t},d);if(-1===e)return;p=cJ({qRow:a},e(s))}c[u]=dJ(o,p,{key:l})}function hJ(e,t,n,r){const o=Array.isArray(e)?e:[e];let i=[];for(let e=0;e<o.length;e++)if(void 0!==o[e].field){const a=t.raw(),s=t.key(),l="object"==typeof o[e].field?o[e].field:t.field(o[e].field),{props:c,main:u}=r.normalizeConfig(o[e],t),d=Object.keys(c),p=!!o[e].trackBy,h=typeof o[e].trackBy,f={},m=[],g=[];for(let t=0;t<a.qDataPages.length;t++){const i=uJ(l,a.qDataPages[t],{cache:n},a.qColumnOrder);if(-1!==i)for(let y=0;y<a.qDataPages[t].qMatrix.length;y++){const _=a.qDataPages[t].qArea.qTop+y,b=cJ({qRow:_},i(a.qDataPages[t].qMatrix[y])),x=dJ(u,b,{key:s});if(!(u.filter&&!u.filter(b))){for(let e=0;e<d.length;e++){const r=c[d[e]];let o=r.fields||[r];r.fields&&(x[d[e]]=[]);for(let i=0;i<o.length;i++)pJ({cache:n,f:l,mainCell:b,p:o[i],prop:d[e],page:a.qDataPages[t],rowIdx:_,row:a.qDataPages[t].qMatrix[y],sourceKey:s,target:r.fields?x[d[e]]:x,targetProp:r.fields?i:d[e],columnOrder:a.qColumnOrder});if(r.fields){const t=x[d[e]].map((e=>e.value)),n=x[d[e]].map((e=>e.label));x[d[e]]={value:"function"==typeof r.value?r.value(t):void 0!==r.value?r.value:t,label:"function"==typeof r.label?r.label(n):void 0!==r.label?String(r.label):String(x[d[e]].value)}}}p&&r.track({cfg:o[e],itemData:b,obj:x,target:m,tracker:f,trackType:h}),g.push(x)}}}const y=p?r.collect(m,{main:u,propsArr:d,props:c}):g;i=[...i,...y]}return i}function fJ(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 mJ(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=yJ)):void 0===t&&(t=gJ);for(var n,r,o,i,a,s=new xJ(e),l=[s];n=l.pop();)if((o=t(n.data))&&(a=(o=Array.from(o)).length))for(n.children=o,i=a-1;i>=0;--i)l.push(r=o[i]=new xJ(o[i])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(bJ)}function gJ(e){return e.children}function yJ(e){return Array.isArray(e)?e[1]:null}function _J(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function bJ(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function xJ(e){this.data=e,this.depth=this.height=0,this.parent=null}function vJ(e){return null==e?null:function(e){if("function"!=typeof e)throw new Error;return e}(e)}xJ.prototype=mJ.prototype={constructor:xJ,count:function(){return this.eachAfter(fJ)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,o,i=this,a=[i],s=[],l=-1;i=a.pop();)if(s.push(i),n=i.children)for(r=0,o=n.length;r<o;++r)a.push(n[r]);for(;i=s.pop();)e.call(t,i,++l,this);return this},eachBefore:function(e,t){for(var n,r,o=this,i=[o],a=-1;o=i.pop();)if(e.call(t,o,++a,this),n=o.children)for(r=n.length-1;r>=0;--r)i.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,o=r&&r.length;--o>=0;)n+=r[o].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(),o=null;e=n.pop(),t=r.pop();for(;e===t;)o=e,e=n.pop(),t=r.pop();return o}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var o=r.length;e!==n;)r.splice(o,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return mJ(this).eachBefore(_J)},[Symbol.iterator]:function*(){var e,t,n,r,o=this,i=[o];do{for(e=i.reverse(),i=[];o=e.pop();)if(yield o,t=o.children)for(n=0,r=t.length;n<r;++n)i.push(t[n])}while(i.length)}};var wJ={depth:-1},SJ={},CJ={};function EJ(e){return e.id}function kJ(e){return e.parentId}function MJ(){var e,t=EJ,n=kJ;function r(r){var o,i,a,s,l,c,u,d,p=Array.from(r),h=t,f=n,m=new Map;if(null!=e){const t=p.map(((t,n)=>function(e){e=`${e}`;let t=e.length;AJ(e,t-1)&&!AJ(e,t-2)&&(e=e.slice(0,-1));return"/"===e[0]?e:`/${e}`}(e(t,n,r)))),n=t.map(RJ),o=new Set(t).add("");for(const e of n)o.has(e)||(o.add(e),t.push(e),n.push(RJ(e)),p.push(CJ));h=(e,n)=>t[n],f=(e,t)=>n[t]}for(a=0,o=p.length;a<o;++a)i=p[a],c=p[a]=new xJ(i),null!=(u=h(i,a,r))&&(u+="")&&(d=c.id=u,m.set(d,m.has(d)?SJ:c)),null!=(u=f(i,a,r))&&(u+="")&&(c.parent=u);for(a=0;a<o;++a)if(u=(c=p[a]).parent){if(!(l=m.get(u)))throw new Error("missing: "+u);if(l===SJ)throw new Error("ambiguous: "+u);l.children?l.children.push(c):l.children=[c],c.parent=l}else{if(s)throw new Error("multiple roots");s=c}if(!s)throw new Error("no root");if(null!=e){for(;s.data===CJ&&1===s.children.length;)s=s.children[0],--o;for(let e=p.length-1;e>=0&&(c=p[e]).data===CJ;--e)c.data=null}if(s.parent=wJ,s.eachBefore((function(e){e.depth=e.parent.depth+1,--o})).eachBefore(bJ),s.parent=null,o>0)throw new Error("cycle");return s}return r.id=function(e){return arguments.length?(t=vJ(e),r):t},r.parentId=function(e){return arguments.length?(n=vJ(e),r):n},r.path=function(t){return arguments.length?(e=vJ(t),r):e},r}function RJ(e){let t=e.length;if(t<2)return"";for(;--t>1&&!AJ(e,t););return e.slice(0,t)}function AJ(e,t){if("/"===e[t]){let n=0;for(;t>0&&"\\"===e[--t];)++n;if(!(1&n))return!0}return!1}function IJ(e,t){"/"===e.charAt(0)&&(e=e.substring(1));const n=e.split("/");let r,o=t;for(let e=0;e<n.length;e++){if("*"===n[e]&&Array.isArray(o)){const t=[];r=n.slice(e+1).join("/");for(let e=0;e<o.length;e++){let n=IJ(r,o[e]);Array.isArray(n)?t.push(...n):t.push(n)}return t}if(!n[e]&&Array.isArray(o)){const t=new Array(o.length);r=n.slice(e+1).join("/");for(let e=0;e<o.length;e++)t[e]=IJ(r,o[e]);return t}n[e]in o&&(o=o[n[e]])}return o}function PJ(e,t,n){let r=[];if(!e||!e.length)return r;if(t<=0){const t=n>=0?[e[n]]:e;r=[...r,...t]}else for(let o=0;o<e.length;o++)e[o].children&&e[o].children.length&&(r=[...r,...PJ(e[o].children,t-1,n)]);return r}function OJ(e,t,n){if(e===t)return e=>e;if(e>t){const n=Math.max(0,Math.min(100,e-t));return e=>{let t=e;for(let e=0;e<n;++e)t=t.parent;return t}}if(t>e){const r=Math.max(0,Math.min(100,t-e));return e=>PJ(e.children,r-1,n)}return!1}const LJ=/^qDimensionInfo(?:\/(\d+))?/,DJ=/^\/?qMeasureInfo\/(\d+)/,TJ=/\/qAttrExprInfo\/(\d+)/,zJ=/\/qAttrDimInfo\/(\d+)/;function jJ(e){return(e.qColumnOrder&&e.qColumnOrder.length?e.qColumnOrder:e.qDimensionInfo.map(((e,t)=>t))).filter((t=>t<e.qDimensionInfo.length))}function NJ(e,t){let{cube:n}=t;if(!e)return-1;let r=e.origin&&e.origin()?e.origin().key():e.key(),o=!1,i=-1,a=-1,s=-1,l=-1,c=-1,u=-1,d=r;const p=n.qEffectiveInterColumnSortOrder,h=jJ(n);return LJ.test(d)&&(o=!0,i=+LJ.exec(d)[1],d=r.replace(LJ,"")),DJ.test(d)&&("K"===n.qMode?c=+DJ.exec(d)[1]:p&&-1!==p.indexOf(-1)?(c=+DJ.exec(d)[1],u=0):u=+DJ.exec(d)[1],d=d.replace(DJ,"")),d&&(zJ.exec(d)?s=+zJ.exec(d)[1]:TJ.exec(d)&&(a=+TJ.exec(d)[1])),l=o?"S"===n.qMode?h[i]:p?p.indexOf(i):i:p&&-1!==p.indexOf(-1)?p.indexOf(-1):n.qDimensionInfo.length-("K"===n.qMode?0:1),{fieldDepth:l+1,pseudoMeasureIndex:c,measureIdx:u,attrDimIdx:s,attrIdx:a}}function qJ(e,t){let n,r,o=OJ(e.fieldDepth,t.fieldDepth,t.pseudoMeasureIndex);return n=t.measureIdx>=0?e=>e.data.qValues[t.measureIdx]:e=>e.data,t.attrDimIdx>=0?r=e=>{var n;return null==e||null===(n=e.qAttrDims)||void 0===n?void 0:n.qValues[t.attrDimIdx]}:t.attrIdx>=0&&(r=e=>{var n;return null==e||null===(n=e.qAttrExps)||void 0===n?void 0:n.qValues[t.attrIdx]}),{nodeFn:o,attrFn:r,valueFn:n}}function FJ(e,t,n){let{key:r}=n;const o={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return o.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(o.value),e.field&&(o.source={key:r,field:e.field.key()}),o}function WJ(e){let{propsArr:t,props:n,item:r,itemData:o,ret:i,sourceKey:a}=e;for(let e=0;e<t.length;e++){const s=n[t[e]],l=s.fields||[s];let c,u;s.fields&&(c=[],u=[]);for(let n=0;n<l.length;n++){const d=l[n];let p,h,f,m,g,y;if("primitive"===d.type?(f=d.value,y=String(d.value)):("function"==typeof d.value&&(p=e=>d.value(e,r)),"function"==typeof d.label&&(h=e=>d.label(e,r)),d.accessor?(m=d.accessor(r),Array.isArray(m)?(g=m.map(d.valueAccessor),d.attrAccessor&&(g=g.map(d.attrAccessor)),p&&(f=g.map(p),p=null),h&&(y=g.map(h),h=null),f=d.reduce?d.reduce(f):f,y=d.reduceLabel?d.reduceLabel(y,f):String(f)):(f=d.attrAccessor?d.attrAccessor(d.valueAccessor(m)):d.valueAccessor(m),y=f)):(f=o,y=o)),s.fields){const e=p?p(f):f;c.push(e),u.push(h&&null!=y?h(y):null!=y?y:String(e))}else{const n=p?p(f):f;i[t[e]]={value:n,label:h?h(y):null!=y?y:String(n)},d.field&&(i[t[e]].source={field:d.field.key(),key:a})}}c&&(i[t[e]]={value:"function"==typeof s.value?s.value(c,r):c,label:"function"==typeof s.label?s.label(u,r):u})}}const BJ=(e,t,n)=>{const r="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",o="K"===e.qMode?"qSubNodes":"qNodes",i=IJ(r,e);return i&&i[0]?(t.tree=mJ(i[0],n.children||(e=>e[o])),t.tree):null};const $J=e=>{let{propsArr:t,props:n,cube:r,cache:o,itemDepthObject:i,f:a}=e;for(let e=0;e<t.length;e++){const o=n[t[e]],s=o.fields?o.fields:[o];for(let e=0;e<s.length;e++){const t=s[e];if(t.field!==a){const e=qJ(i,NJ(t.field,{cube:r}));t.accessor=e.nodeFn,t.valueAccessor=e.valueFn,t.attrAccessor=e.attrFn}}}};function HJ(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;const o=t.raw(),i=t.key(),a="S"===o.qMode?function(e){const t=e.raw().qDataPages.length?e.raw().qDataPages[0].qMatrix:[],n=function(e){const t=e.raw().qColumnOrder,n=e.fields();return t&&t.length===n.length?t:n.map(((e,t)=>t))}(e),r=e.fields(),o=e.fields().filter((e=>"dimension"===e.type())).map((e=>n.indexOf(r.indexOf(e)))),i=e.fields().filter((e=>"measure"===e.type())).map((e=>n.indexOf(r.indexOf(e)))),a={__root:{__id:"__root",qValues:[]}};for(let e=0;e<t.length;e++){const n=t[e];let r="__root",l=!1;for(let e=0;e<o.length;e++){var s;const t=n[o[e]],i="".concat(r,"__").concat(null!==(s=t.qElemNumber)&&void 0!==s?s:t.qElemNo);a[i]||(a[i]=eJ({__id:i,__parent:r,qValues:[]},t),l=!0),r=i}if(l)for(let e=0;e<i.length;e++){const t=n[i[e]];a[r].qValues.push(t)}}const l=Object.keys(a).map((e=>a[e])),c=MJ().id((e=>e.__id)).parentId((e=>e.__parent))(l);return c}(t):BJ(o,n,e);if(!a)return null;const s=a.height,l=[];for(let i=0;i<=s;i++){let a=null;if(i>0)if("S"===o.qMode){let e=jJ(o)[i-1];a=n.fields[e]}else{let e=o.qEffectiveInterColumnSortOrder[i-1];i>o.qEffectiveInterColumnSortOrder.length&&(e=o.qDimensionInfo.length),a=n.fields[e]}const{props:s,main:c}=r.normalizeConfig(eJ(eJ({},e),{},{field:a?a.key():void 0}),t),u=Object.keys(s);l[i]={propsArr:u,props:s,main:c};const d=a?NJ(a,{cube:o}):{fieldDepth:0};$J({propsArr:u,props:s,cube:o,cache:n,itemDepthObject:d,f:a})}const c=a.copy().descendants(),u=a.descendants();for(let e=0;e<u.length;e++){const t=l[u[e].depth].propsArr,n=l[u[e].depth].props,r=l[u[e].depth].main,o=c[e],a=o.data,s=FJ(r,a,{key:i});WJ({propsArr:t,props:n,item:o,itemData:a,ret:s,sourceKey:i}),u[e].data=s}return a}function VJ(e,t,n,r){const o=Array.isArray(e)?e:[e];let i=[];for(let a=0;a<o.length;a++)if(void 0!==o[a].field){const s=t.raw(),l=t.key();if(!BJ(s,n,e))continue;const c="object"==typeof o[a].field?o[a].field:t.field(o[a].field),{props:u,main:d}=r.normalizeConfig(o[a],t),p=Object.keys(u),h=NJ(c,{cube:s}),{nodeFn:f,attrFn:m,valueFn:g}=qJ({fieldDepth:0},h);$J({propsArr:p,props:u,cube:s,cache:n,itemDepthObject:h,f:c});const y=!!o[a].trackBy,_=typeof o[a].trackBy,b={},x=[],v=f(n.tree),w=[];for(let e=0;e<v.length;e++){const t=v[e],n=m?m(g(t)):g(t);if(d.filter&&!d.filter(n))continue;const i=FJ(d,n,{key:l});WJ({propsArr:p,props:u,item:t,itemData:n,ret:i,sourceKey:l}),y&&r.track({cfg:o[a],itemData:n,obj:i,target:x,tracker:b,trackType:_}),w.push(i)}const S=y?r.collect(x,{main:d,propsArr:p,props:u}):w;i=[...i,...S]}return i}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var GJ=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){
|
|
183
183
|
/*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
|
|
184
|
-
e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,o,i,a,s,l,c,u,d,p=e.length,h=e.search(/[0-9\-\+#]/),f=h>0?e.substring(0,h):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),y=p-g,_=e.substring(y,y+1),b=y+("."===_||","===_?1:0),x=g>0?e.substring(b,p):"";if(n=(t="-"===(e=e.substring(h,b)).charAt(0)?-t:+t)<0?t=-t:0,o=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",i=r&&r[1]&&r[0]||",",e=e.split(o),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(c=t.split("."))[1]||c[1]&&c[1].length<=s)&&(t=(+t).toFixed(s+1)),u=e[0].split(i),e[0]=u.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;c[0].length<e[0].length-a;)c[0]="0"+c[0];else 0==+c[0]&&(c[0]="");if((t=t.split("."))[0]=c[0],l=u[1]&&u[u.length-1].length){for(m="",y=(d=t[0]).length%l,p=d.length,b=0;b<p;b++)m+=d.charAt(b),!((b-y+1)%l)&&b<p-l&&(m+=i);t[0]=m}return t[1]=e[1]&&t[1]?o+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),f+(n?"-":"")+r+x}}));function UJ(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}const YJ={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"},KJ=/%\)?$/,XJ=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,JJ=/^\(oct\)/i,ZJ=/^\(dec\)/i,QJ=/^\(hex\)/i,eZ=/^\(bin\)/i,tZ=/^\(rom\)/i,nZ=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,rZ=/#|0/g;function oZ(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 iZ(e,t,n){let r;return XJ.test(t)?e=oZ(e,Number(/\d{2}/.exec(t)[0]),t,n):JJ.test(t)?e=oZ(e,8,t,n):ZJ.test(t)?e=oZ(e,10,t,n):QJ.test(t)?e=oZ(e,16,t,n):eZ.test(t)?e=oZ(e,2,t,n):tZ.test(t)&&(r="",e<0&&(r="-",e=-e),0===(e=Math.floor(e))?e="0":e<=5e5?(e=function(e,t){let n,r="",o=Number(String(e).slice(-3)),i=(e-o)/1e3,a=[0,1,4,5,9,10,40,50,90,100,400,500,900].reverse(),s=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();for(;o>0;)for(n=0;n<a.length;n++)if(a[n]<=o){r+=s[n],o-=a[n];break}for(n=0;n<i;n++)r="M".concat(r);return t[1]!==t[1].toUpperCase()&&(r=r.toLowerCase()),r}(e,t),e=r+e):e=t+r+e.toExponential(0)),e}function aZ(e,t,n){const r=UJ(e);return n?r:new RegExp(r||"",t)}function sZ(e,t,n,r){let o,i,a,s,l,c,u,d,p,h=e.pattern;var f,m;r&&(e.abbreviate=!0),f=t,(m=n)&&(m=UJ(m)),f&&(f=UJ(f)),p=new RegExp("(?:[#0]+".concat(f,")?[#0]+(?:").concat(m,"[#0]+)?")),a=h.match(p),a=a?a[0]:"",s=a?h.substr(0,h.indexOf(a)):h,l=a?h.substring(h.indexOf(a)+a.length):"",a||(a=h?"#":"##########"),t&&t===n&&(o=a.split(n),i=o.pop(),a=o.join("")+n+i,t=""),c=t,t=/,/.test(n)?"¤":",",c&&(a=a.replace(aZ(c,"g"),t)),u=n,n=".",u&&(a=a.replace(aZ(u,"g"),n)),d=a.match(/#/g),d=d?d.length:0;const g=h.split(u);let y;g[1]&&(y=g[1].match(rZ)),e.prefix=s||"",e.postfix=l||"",e.pattern=h,e.maxPrecision=y?y.length:2,e.percentage=KJ.test(h),e.numericPattern=a||"",e.numericRegex=new RegExp("".concat(aZ(t,null,!0),"|").concat(aZ(n,null,!0)),"g"),e.groupTemp=c,e.decTemp=u,e.t=t,e.d=n,e.temp=d}class lZ{constructor(e,t,n,r,o){this.localeInfo=e,this.pattern=t,this.thousandDelimiter=n||",",this.decimalDelimiter=r||".",this.type=o||"numeric",this.patternSeparator=";",this.abbreviations=function(e,t){if(!e||!e.qNumericalAbbreviation)return YJ;const n={};return e.qNumericalAbbreviation.split(t).forEach((e=>{let t=e.split(":");2===t.length&&(n[t[0]]=t[1])})),n}(e,this.patternSeparator),this.prepare()}clone(){const e=new lZ(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return e.subtype=this.subtype,e}format(e,t,n,r){return this.prepare(t,n,r),this.formatValue(e)}prepare(e,t,n){let r;if(void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===n&&(n=this.decimalDelimiter),!e)return void(this._prepared={pattern:!1});this._prepared={positive:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},negative:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},zero:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""}},r=this._prepared,e=e.split(this.patternSeparator),r.positive.pattern=e[0],r.negative.pattern=e[1],r.zero.pattern=e[2],nZ.test(e[0])&&(r.positive.isFunctional=!0),e[1]?nZ.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?nZ.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1;const o="U"===this.type;r.positive.isFunctional||sZ(r.positive,t,n,o),r.negative&&!r.negative.isFunctional&&sZ(r.negative,t,n,o),r.zero&&!r.zero.isFunctional&&sZ(r.zero,t,n,o)}formatValue(e){let t,n,r,o,i,a,s,l,c,u=this._prepared,d="",p="",h=e;if(isNaN(e))return"".concat(h);if(e=+e,!1===u.pattern)return e.toString();if(0===e&&u.zero)return u=u.zero,u.pattern;if(e<0&&u.negative?(u=u.negative,e=-e):u=u.positive,i=u.d,a=u.t,u.isFunctional)e=iZ(e,u.pattern,i);else{if(u.percentage&&(e*=100),u.abbreviate){const t=Object.keys(this.abbreviations).map((e=>parseInt(e,10))).sort(((e,t)=>e-t));let r,o,i=t[0];for(s=0,n=Number(Number(e).toExponential().split("e")[1]);i<=n&&s<t.length;)s++,i=t[s];s>0&&(r=t[s-1]),r&&n>0&&r>0?o=r:(n<0&&r<0||!r)&&(i<0&&i-n<=u.maxPrecision?o=i:r<=n&&!(i>0&&-n<=u.maxPrecision)&&(o=r)),o&&(d=this.abbreviations[o],e/=10**o)}if(r=Math.abs(e),t=u.temp,l=u.numericPattern,c=l.split(i)[1],"I"===this.type&&(e=Math.round(e)),o=e,c||"#"!==l.slice(-1)[0])if(r>=1e15||r>0&&r<=1e-14)e=r?r.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{const t=Number((e+1e-15*(e<0?-1:1)).toFixed(Math.min(20,c?c.length:0)).split(".")[0]);let n=l.split(i)[0];if(n+=i,e=GJ(n,t)||"0",c){const t=Math.max(0,Math.min(14,c.length)),n=c.replace(/#+$/,"").length;let o=("I"===this.type?0:r%1+1e-15).toFixed(t).slice(2).replace(/0+$/,"");for(s=o.length;s<n;s++)o+="0";o&&(e+=i+o)}else 0===t&&(o=0)}else if(r>=10**t||r<1||r<1e-4)0===e?e="0":r<1e-4||r>=1e20?(e=(e=o.toExponential(Math.max(1,Math.min(14,t))-1)).replace(/\.?0+(?=e)/,""),p=""):(e=e.toPrecision(Math.max(1,Math.min(14,t)))).indexOf(".")>=0&&(e=(e=e.replace(e.indexOf("e")<0?/0+$/:/\.?0+(?=e)/,"")).replace(".",i));else{for(l+=i,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(r)/Math.log(10)))),s=0;s<t;s++)l+="#";e=GJ(l,e)}e=e.replace(u.numericRegex,(e=>e===a?u.groupTemp:e===i?u.decTemp:"")),o<0&&!/^-/.test(e)&&(e="-".concat(e))}return u.prefix+e+p+d+u.postfix}static getStaticFormatter(){return{prepare(){},formatValue:e=>"".concat(e)}}}function cZ(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{size:n=5e3,multipleArguments:r=!1,toKey:o=e=>e}=t;let i,a,s=Object.create(null),l=Object.create(null),c=0,u=0;return i=r?function(){return a=o(...arguments),i.has(a)?i.get(a):i.set(a,e(...arguments))}:t=>(a=o(t),i.has(a)?i.get(a):i.set(a,e(t))),i.set=(e,t)=>(c>=n&&(delete s[l[u]],delete l[u],c--,u++),s[e]=t,l[c]=e,c++,t),i.get=e=>s[e],i.has=e=>e in s,i.clear=()=>{s=Object.create(null),l=Object.create(null),c=0,u=0},i.size=()=>c,i}function uZ(e,t,n,r,o){const i=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new lZ(...t)}(o,e,t,n,r),a=cZ(i.formatValue.bind(i),{toKey:e=>isNaN(e)?e:+e});function s(e){return a(e)}return s.format=function(e,t,n,r){return a.clear(),i.format(t,e,n,r)},s.pattern=function(e){return e&&(a.clear(),i.pattern=e,i.prepare()),i.pattern},s}const dZ="D",pZ="T",hZ="TS",fZ="IV",mZ=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],gZ=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],yZ=["January","February","March","April","May","June","July","August","September","October","November","December"],_Z=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function bZ(e,t){for(let n=e.length;n<t;n++)e="0".concat(e);return e}function xZ(e){let t=e.toString().split(".");return t[1]?(t=Number("0.".concat(t[1])),t):0}function vZ(e,t){let n,r=function(e){const t=e,n=24*xZ(t),r=60*xZ(n),o=60*xZ(r),i=1e3*xZ(o);return{d:Math.floor(t),h:Math.floor(n),m:Math.floor(r),s:Math.floor(o),f:Math.round(i)}}(e),o=r.d,i=r.h,a=r.m,s=r.s,l=r.f,c=0;/w+|t+/gi.test(t)&&(n=new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,Math.round(86400*(e-Math.floor(e))))),isNaN(n.getTime())&&(n=null)),/D+/gi.test(t)||(i+=24*o),/h+/gi.test(t)||(a+=60*i),/m+/gi.test(t)||(s+=60*a),/w+/gi.test(t)&&(c=n?n.getDay()-1:0,c<0&&(c=6));let u="";return n&&(u=n.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:c,date:o,h:i,m:a,s:s,f:l,t:u}}class wZ{constructor(e,t,n){const r=e||{};if(r.qCalendarStrings||(r.qCalendarStrings={qLongDayNames:mZ,qDayNames:gZ,qLongMonthNames:yZ,qMonthNames:_Z}),this.localeInfo=r,this.locale_days=r.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=r.qCalendarStrings.qDayNames.slice(),this.locale_months=r.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=r.qCalendarStrings.qMonthNames.slice(),!t){t={[pZ]:r.qTimeFmt||"hh:mm:ss",[dZ]:r.qDateFmt||"YYYY-MM-DD",[hZ]:r.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"}[n]}this.pattern=t}clone(){const e=new wZ(this.localeInfo,this.pattern);return e.subtype=this.subtype,e}format(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+]|\[|]/g,"");const n=/t+/gi.test(t);let r;e instanceof Date?r=function(e,t){let n=e.getUTCHours(),r=e.getUTCDay()-1;return t&&(n%=12,n||(n=12)),r<0&&(r=6),{year:e.getUTCFullYear(),month:e.getUTCMonth(),day:r,date:e.getUTCDate(),h:n,m:e.getUTCMinutes(),s:e.getUTCSeconds(),f:e.getUTCMilliseconds(),t:e.getUTCHours()>=12?"pm":"am"}}(e,n):(e<0&&(e=-e,t="-".concat(t)),r=vZ(e,t));const o=function(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:bZ("".concat(t.year).slice(-2),2),YYY:bZ("".concat(t.year).slice(-3),3),def:e=>bZ("".concat(t.year),e.length)},"M+":{M:t.month+1,MM:bZ("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:bZ("".concat(t.day),2),WWW:e.locale_days_abbr[t.day],def:e.locale_days[t.day]},"D+|d+":{D:t.date,def:e=>bZ("".concat(t.date),e.length)},"h+|H+":{h:t.h,def:e=>bZ("".concat(t.h),e.length)},"m+":{m:t.m,def:e=>bZ("".concat(t.m),e.length)},"s+|S+":{s:t.s,def:e=>bZ("".concat(t.s),e.length)},"f+|F+":{def(e){let n="".concat(t.f),r=e.length-n.length;if(r>0)for(let e=0;e<r;e++)n+="0";else r<0&&(n=n.slice(0,e.length));return n}},"t{1,2}|T{1,2}":{def(e){let n=t.t;return e[0].toUpperCase()===e[0]&&(n=n.toUpperCase()),n=n.slice(0,e.length),n}}}}(this,r),i=[];for(const e in o)Object.prototype.hasOwnProperty.call(o,e)&&i.push(e);const a=new RegExp(i.join("|"),"g"),s=t.replace(a,(e=>{let t,n,r;for(n in o)if(Object.prototype.hasOwnProperty.call(o,n)&&(t=new RegExp(n),t.test(e)))break;if(!t)return"";for(const t in o[n])if(t===e||t.toLowerCase()===e){r=o[n][t],void 0===r&&(r=o[n][t.toLowerCase()]);break}return void 0===r&&(r=o[n].def),"function"==typeof r&&(r=r(e)),r}));return s}}function SZ(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new wZ(...t)}function CZ(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=SZ(arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,e,t),r=cZ(n.format.bind(n),{toKey:e=>"object"==typeof e&&"function"==typeof e.getTime?e.getTime():e});function o(e){return t!==fZ?function(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}(e):e}function i(e){return e=o(e),r(e)}return i.format=function(e,t){return r.clear(),t=o(t),n.format(t,e)},i.locale=function(o){return n=SZ(o,e,t),r=cZ(n.format.bind(n),{toKey:e=>"object"==typeof e?e.getTime():e}),this},i.qtype=function(e){return void 0!==e&&(t=e,r.clear()),t},i}function EZ(){let e,{meta:t,id:n,key:r,localeInfo:o,fieldExtractor:i,value:a,type:s,sourceField:l}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const c=a||("dimension"===s?e=>null==e?void 0:e.qElemNo:e=>null==e?void 0:e.qValue),u="dimension"===s?"first":"avg",d=function(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return CZ(e.qNumFormat.qFmt,e.qNumFormat.qType,t);let n="#",r=t&&void 0!==t.qThousandSep?t.qThousandSep:",",o=t&&void 0!==t.qDecimalSep?t.qDecimalSep:".",i="U",a=e&&!!e.qIsAutoFormat;return e&&e.qNumFormat?(n=e.qNumFormat.qFmt||n,r=e.qNumFormat.qThou||r,o=e.qNumFormat.qDec||o,i=e.qNumFormat.qType||i,a=a&&-1===["M"].indexOf(e.qNumFormat.qType)):a=!0,(a||"U"===i)&&(n="#".concat(o,"##"),i="U"),uZ(n,r,o,i,t)}(t,o),p="dimension"===s?"first":(e,t)=>d(t),h={id:()=>n,key:()=>r,raw:()=>t,title:()=>t.qFallbackTitle||t.label,type:()=>s,origin:()=>l,items:()=>(e||(e=i(h)),e),min:()=>t.qMin,max:()=>t.qMax,value:c,label:e=>(null==e?void 0:e.qText)||"",reduce:u,reduceLabel:p,formatter:()=>d,tags:()=>t.qTags};return h}function kZ(e,t,n,r,o){return(t[e]||[]).map(((t,i)=>{const a="".concat(r?"".concat(r,"/"):"").concat(e,"/").concat(i),s={instance:EZ(cJ({id:"".concat(n?"".concat(n,"/"):"").concat(a),key:a,meta:t},o))};return s.attrDims=kZ("qAttrDimInfo",t,n,a,cJ({},o,{value:e=>null==e?void 0:e.qElemNo,type:"dimension"})),s.attrExps=kZ("qAttrExprInfo",t,n,a,cJ({},o,{value:e=>null==e?void 0:e.qNum,type:"measure"})),s.measures=kZ("qMeasureInfo",t,n,a,cJ({},o,{value:e=>null==e?void 0:e.qValue,type:"measure"})),s}))}function MZ(){let{key:e,data:t,config:n={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},o=t;if(!o)throw new Error('Missing "data" input');if(!o.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');const i=MZ.util,a={cache:r,cube:o,localeInfo:n.localeInfo,fieldExtractor:null,pages:null,hierarchy:()=>null,virtualFields:n.virtualFields},s={key:()=>e,raw:()=>o,field:e=>function(e,t){let{cache:n}=t;if("number"==typeof e)return n.fields[e];const r=n.allFields;if("function"==typeof e){for(let t=0;t<r.length;t++)if(e(r[t]))return r[t];return!1}if("string"==typeof e){for(let t=0;t<r.length;t++)if(r[t].key()===e||r[t].title()===e)return r[t]}else if(e&&-1!==r.indexOf(e))return e;throw Error("Field not found: ".concat(e))}(e,a),fields:()=>r.fields.slice(),extract:e=>a.extractor(e,s,r,i),hierarchy:e=>a.hierarchy(e,s,r,i),_cache:()=>r};"K"===o.qMode||"T"===o.qMode||!o.qMode&&o.qNodesOnDim?(a.extractor=VJ,a.hierarchy=HJ,a.pages="K"===o.qMode?o.qStackedDataPages:o.qTreeDataPages):"S"===o.qMode?(a.extractor=hJ,a.pages=o.qDataPages,a.hierarchy=HJ):a.extractor=()=>[],a.fieldExtractor=e=>a.extractor({field:e},s,r,i);const l="S"===o.qMode?e=>e.qElemNumber:void 0,c="S"===o.qMode?e=>e.qNum:void 0;r.wrappedFields.push(...kZ("qDimensionInfo",o,e,"",cJ({},a,{value:l,type:"dimension"}))),r.wrappedFields.push(...kZ("qMeasureInfo",o,e,"",cJ({},a,{value:c,type:"measure"}))),r.fields=r.wrappedFields.map((e=>e.instance));const u=e=>{e.forEach((e=>{r.allFields.push(e.instance),u(e.measures),u(e.attrDims),u(e.attrExps)}))};return u(r.wrappedFields),(n.virtualFields||[]).forEach((t=>{const n=s.field(t.from),o=EZ(eJ({meta:n.raw(),id:"".concat(e,"/").concat(t.key),sourceField:n,fieldExtractor:e=>a.extractor({field:e},s,r,i),key:t.key,type:n.type(),localeInfo:a.localeInfo,value:n.value},t.override||{}));r.virtualFields.push(o)})),r.allFields.push(...r.virtualFields),s}const RZ=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],AZ=/\/qDimensionInfo(?:\/(\d+))?/,IZ=/\/qMeasureInfo\/(\d+)/,PZ=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,OZ=/\/qAttrExprInfo\/(\d+)/,LZ=/\/?qHyperCube/,DZ=/\/?qTreeData/,TZ=e=>"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14)),zZ=e=>"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13));function jZ(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r=t.byCells,o=t.primarySource,i=[],a={},s=e.isActive();let l=!1;if(e.brushes().forEach((e=>{const t=function(e,t){let n=e,r=-1,o=-1,i="",a=e=>e;LZ.test(e)?(i="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),a=TZ):DZ.test(e)&&(i="".concat(n.substr(0,n.indexOf("qTreeData")+9)),a=zZ);let s=!0;if(AZ.test(e)&&(r=+AZ.exec(e)[1]),IZ.test(e)&&(o=+IZ.exec(e)[1]),PZ.test(e)){o=-1,r=0;const e=+PZ.exec(n)[2];isNaN(e)||(r=e,n=n.replace(/\/\d+$/,"")),s=!1}if(OZ.test(e)){const e=o;if(t){o=0;const a=IJ(i,t);o+=(a.qMeasureInfo||[]).length,r>-1?(o=a.qDimensionInfo.slice(0,r).reduce(((e,t)=>e+t.qAttrExprInfo.length),o),r=-1):(o=a.qDimensionInfo.reduce(((e,t)=>e+t.qAttrExprInfo.length),o),o=a.qMeasureInfo.slice(0,e).reduce(((e,t)=>e+t.qAttrExprInfo.length),o)),o+=+OZ.exec(n)[1]}else r>-1?(r=-1,o=+OZ.exec(n)[1]):o+=+OZ.exec(n)[1]+1}return RZ.forEach((e=>{let[t,r]=e;n=n.replace(t,r)})),s&&(n=a(n)),n&&"/"!==n[0]&&(n="/".concat(n)),{measureIdx:o,dimensionIdx:r,path:n}}(e.id,n);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.multiRangeSelectTreeDataValues||(a.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),n.forEach((e=>a.multiRangeSelectTreeDataValues.ranges.push({qMeasureIx:t.measureIdx,qDimensionIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}}))))}else{if("range"===e.type&&t.measureIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.rangeSelectHyperCubeValues||(a.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),n.forEach((e=>a.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:t.measureIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}}))))}if("range"===e.type&&t.dimensionIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.selectHyperCubeContinuousRange||(a.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),n.forEach((e=>a.selectHyperCubeContinuousRange.ranges.push({qDimIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!1}}))))}if("value"===e.type&&t.dimensionIdx>-1)if(r)if(n&&n.qHyperCube&&("P"===n.qHyperCube.qMode||"T"===n.qHyperCube.qMode||"K"===n.qHyperCube.qMode)){const r=n.qHyperCube,i=r.qNoOfLeftDims,s=r.qEffectiveInterColumnSortOrder.indexOf(t.dimensionIdx);if(a.selectPivotCells||(a.selectPivotCells={path:t.path,cells:[]}),e.id===o||!o){const n=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e)));(0===i||s>=i)&&i>-1?n.forEach((e=>{a.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:s-i})})):n.forEach((e=>{a.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})})),l=!!a.selectPivotCells.cells.length}}else a.selectHyperCubeCells||(a.selectHyperCubeCells={path:t.path,cols:[]}),a.selectHyperCubeCells.cols.push(t.dimensionIdx),e.id!==o&&(o||a.selectHyperCubeCells.values)||(a.selectHyperCubeCells.values=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e))),l=!!a.selectHyperCubeCells.values.length);else{const n=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e)));l=!!n.length,i.push({params:[t.path,t.dimensionIdx,n,!1],method:"selectHyperCubeValues"})}}})),!l&&s)return[{method:"resetMadeSelections",params:[]}];var c;a.rangeSelectHyperCubeValues&&i.push({method:"rangeSelectHyperCubeValues",params:[a.rangeSelectHyperCubeValues.path,a.rangeSelectHyperCubeValues.ranges,[],null===(c=t.orMode)||void 0===c||c]});return a.selectHyperCubeContinuousRange&&i.push({method:"selectHyperCubeContinuousRange",params:[a.selectHyperCubeContinuousRange.path,a.selectHyperCubeContinuousRange.ranges]}),a.selectHyperCubeCells&&i.push({method:"selectHyperCubeCells",params:[a.selectHyperCubeCells.path,a.selectHyperCubeCells.values,a.selectHyperCubeCells.cols]}),a.selectPivotCells&&i.push({method:"selectPivotCells",params:[a.selectPivotCells.path,a.selectPivotCells.cells]}),a.multiRangeSelectTreeDataValues&&i.push({method:"multiRangeSelectTreeDataValues",params:[a.multiRangeSelectTreeDataValues.path,a.multiRangeSelectTreeDataValues.ranges]}),i}function NZ(e){MZ.util=e.data("matrix").util,e.data("q",MZ),e.formatter("q-number",uZ),e.formatter("q-time",CZ)}NZ.qBrushHelper=jZ,NZ.selections=jZ;var qZ=Object.prototype.hasOwnProperty,FZ=Object.prototype.toString,WZ=Object.defineProperty,BZ=Object.getOwnPropertyDescriptor,$Z=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===FZ.call(e)},HZ=function(e){if(!e||"[object Object]"!==FZ.call(e))return!1;var t,n=qZ.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&qZ.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||qZ.call(e,t)},VZ=function(e,t){WZ&&"__proto__"===t.name?WZ(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},GZ=function(e,t){if("__proto__"===t){if(!qZ.call(e,t))return;if(BZ)return BZ(e,t).value}return e[t]},UZ=function e(){var t,n,r,o,i,a,s=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)r=GZ(s,n),s!==(o=GZ(t,n))&&(u&&o&&(HZ(o)||(i=$Z(o)))?(i?(i=!1,a=r&&$Z(r)?r:[]):a=r&&HZ(r)?r:{},VZ(s,{name:n,newValue:e(u,a,o)})):void 0!==o&&VZ(s,{name:n,newValue:o}));return s},YZ="2.8.2";function KZ(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function XZ(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 JZ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?XZ(Object(n),!0).forEach((function(t){KZ(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XZ(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ZZ(e){return!!e.changedTouches}function QZ(e){return"number"==typeof e&&!isNaN(e)}function eQ(e){return"number"!=typeof e||isNaN(e)}function tQ(e){const t=e.length;let n=NaN,r=NaN,o=NaN,i=NaN;for(let a=0;a<t;a++)n=isNaN(n)?e[a].x:Math.min(n,e[a].x),r=isNaN(r)?e[a].x:Math.max(r,e[a].x),o=isNaN(o)?e[a].y:Math.min(o,e[a].y),i=isNaN(i)?e[a].y:Math.max(i,e[a].y);return[n,o,r,i]}function nQ(e){return[{x:e.x1||0,y:e.y1||0},{x:e.x2||0,y:e.y2||0}]}function rQ(e){return[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}]}function oQ(e){const[t,n,r,o]=tQ(e);return{x:t,y:n,width:r-t,height:o-n}}function iQ(e){return{x1:e[0].x,y1:e[0].y,x2:e[1].x,y2:e[1].y}}function aQ(e){const{x:t,y:n,width:r,height:o,x1:i,x2:a,y1:s,y2:l,cx:c,cy:u,r:d,vertices:p}=e||{};return QZ(c)&&QZ(u)&&QZ(d)?"circle":QZ(i)&&QZ(a)&&QZ(s)&&QZ(l)?"line":QZ(t)&&QZ(n)&&QZ(r)&&QZ(o)?"rect":QZ(t)&&QZ(n)?"point":Array.isArray(p)?p.every((e=>Array.isArray(e)))?"geopolygon":"polygon":null}function sQ(e,t){return{x:t.x-e,y:t.y-e,width:t.width+e,height:t.height+e}}var lQ=Math.PI,cQ=2*lQ,uQ=1e-6,dQ=cQ-uQ;function pQ(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function hQ(){return new pQ}function fQ(e){return function(){return e}}pQ.prototype=hQ.prototype={constructor:pQ,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,o,i){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+o)+","+(this._y1=+i)},arcTo:function(e,t,n,r,o){e=+e,t=+t,n=+n,r=+r,o=+o;var i=this._x1,a=this._y1,s=n-e,l=r-t,c=i-e,u=a-t,d=c*c+u*u;if(o<0)throw new Error("negative radius: "+o);if(null===this._x1)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(d>uQ)if(Math.abs(u*s-l*c)>uQ&&o){var p=n-i,h=r-a,f=s*s+l*l,m=p*p+h*h,g=Math.sqrt(f),y=Math.sqrt(d),_=o*Math.tan((lQ-Math.acos((f+d-m)/(2*g*y)))/2),b=_/y,x=_/g;Math.abs(b-1)>uQ&&(this._+="L"+(e+b*c)+","+(t+b*u)),this._+="A"+o+","+o+",0,0,"+ +(u*p>c*h)+","+(this._x1=e+x*s)+","+(this._y1=t+x*l)}else this._+="L"+(this._x1=e)+","+(this._y1=t);else;},arc:function(e,t,n,r,o,i){e=+e,t=+t,i=!!i;var a=(n=+n)*Math.cos(r),s=n*Math.sin(r),l=e+a,c=t+s,u=1^i,d=i?r-o:o-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>uQ||Math.abs(this._y1-c)>uQ)&&(this._+="L"+l+","+c),n&&(d<0&&(d=d%cQ+cQ),d>dQ?this._+="A"+n+","+n+",0,1,"+u+","+(e-a)+","+(t-s)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):d>uQ&&(this._+="A"+n+","+n+",0,"+ +(d>=lQ)+","+u+","+(this._x1=e+n*Math.cos(o))+","+(this._y1=t+n*Math.sin(o))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var mQ=Math.abs,gQ=Math.atan2,yQ=Math.cos,_Q=Math.max,bQ=Math.min,xQ=Math.sin,vQ=Math.sqrt,wQ=1e-12,SQ=Math.PI,CQ=SQ/2,EQ=2*SQ;function kQ(e){return e>=1?CQ:e<=-1?-CQ:Math.asin(e)}function MQ(e){return e.innerRadius}function RQ(e){return e.outerRadius}function AQ(e){return e.startAngle}function IQ(e){return e.endAngle}function PQ(e){return e&&e.padAngle}function OQ(e,t,n,r,o,i,a){var s=e-n,l=t-r,c=(a?i:-i)/vQ(s*s+l*l),u=c*l,d=-c*s,p=e+u,h=t+d,f=n+u,m=r+d,g=(p+f)/2,y=(h+m)/2,_=f-p,b=m-h,x=_*_+b*b,v=o-i,w=p*m-f*h,S=(b<0?-1:1)*vQ(_Q(0,v*v*x-w*w)),C=(w*b-_*S)/x,E=(-w*_-b*S)/x,k=(w*b+_*S)/x,M=(-w*_+b*S)/x,R=C-g,A=E-y,I=k-g,P=M-y;return R*R+A*A>I*I+P*P&&(C=k,E=M),{cx:C,cy:E,x01:-u,y01:-d,x11:C*(o/v-1),y11:E*(o/v-1)}}function LQ(){var e=MQ,t=RQ,n=fQ(0),r=null,o=AQ,i=IQ,a=PQ,s=null;function l(){var l,c,u=+e.apply(this,arguments),d=+t.apply(this,arguments),p=o.apply(this,arguments)-CQ,h=i.apply(this,arguments)-CQ,f=mQ(h-p),m=h>p;if(s||(s=l=hQ()),d<u&&(c=d,d=u,u=c),d>wQ)if(f>EQ-wQ)s.moveTo(d*yQ(p),d*xQ(p)),s.arc(0,0,d,p,h,!m),u>wQ&&(s.moveTo(u*yQ(h),u*xQ(h)),s.arc(0,0,u,h,p,m));else{var g,y,_=p,b=h,x=p,v=h,w=f,S=f,C=a.apply(this,arguments)/2,E=C>wQ&&(r?+r.apply(this,arguments):vQ(u*u+d*d)),k=bQ(mQ(d-u)/2,+n.apply(this,arguments)),M=k,R=k;if(E>wQ){var A=kQ(E/u*xQ(C)),I=kQ(E/d*xQ(C));(w-=2*A)>wQ?(x+=A*=m?1:-1,v-=A):(w=0,x=v=(p+h)/2),(S-=2*I)>wQ?(_+=I*=m?1:-1,b-=I):(S=0,_=b=(p+h)/2)}var P=d*yQ(_),O=d*xQ(_),L=u*yQ(v),D=u*xQ(v);if(k>wQ){var T,z=d*yQ(b),j=d*xQ(b),N=u*yQ(x),q=u*xQ(x);if(f<SQ&&(T=function(e,t,n,r,o,i,a,s){var l=n-e,c=r-t,u=a-o,d=s-i,p=d*l-u*c;if(!(p*p<wQ))return[e+(p=(u*(t-i)-d*(e-o))/p)*l,t+p*c]}(P,O,N,q,z,j,L,D))){var F=P-T[0],W=O-T[1],B=z-T[0],$=j-T[1],H=1/xQ(function(e){return e>1?0:e<-1?SQ:Math.acos(e)}((F*B+W*$)/(vQ(F*F+W*W)*vQ(B*B+$*$)))/2),V=vQ(T[0]*T[0]+T[1]*T[1]);M=bQ(k,(u-V)/(H-1)),R=bQ(k,(d-V)/(H+1))}}S>wQ?R>wQ?(g=OQ(N,q,P,O,d,R,m),y=OQ(z,j,L,D,d,R,m),s.moveTo(g.cx+g.x01,g.cy+g.y01),R<k?s.arc(g.cx,g.cy,R,gQ(g.y01,g.x01),gQ(y.y01,y.x01),!m):(s.arc(g.cx,g.cy,R,gQ(g.y01,g.x01),gQ(g.y11,g.x11),!m),s.arc(0,0,d,gQ(g.cy+g.y11,g.cx+g.x11),gQ(y.cy+y.y11,y.cx+y.x11),!m),s.arc(y.cx,y.cy,R,gQ(y.y11,y.x11),gQ(y.y01,y.x01),!m))):(s.moveTo(P,O),s.arc(0,0,d,_,b,!m)):s.moveTo(P,O),u>wQ&&w>wQ?M>wQ?(g=OQ(L,D,z,j,u,-M,m),y=OQ(P,O,N,q,u,-M,m),s.lineTo(g.cx+g.x01,g.cy+g.y01),M<k?s.arc(g.cx,g.cy,M,gQ(g.y01,g.x01),gQ(y.y01,y.x01),!m):(s.arc(g.cx,g.cy,M,gQ(g.y01,g.x01),gQ(g.y11,g.x11),!m),s.arc(0,0,u,gQ(g.cy+g.y11,g.cx+g.x11),gQ(y.cy+y.y11,y.cx+y.x11),m),s.arc(y.cx,y.cy,M,gQ(y.y11,y.x11),gQ(y.y01,y.x01),!m))):s.arc(0,0,u,v,x,m):s.lineTo(L,D)}else s.moveTo(0,0);if(s.closePath(),l)return s=null,l+""||null}return l.centroid=function(){var n=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,r=(+o.apply(this,arguments)+ +i.apply(this,arguments))/2-SQ/2;return[yQ(r)*n,xQ(r)*n]},l.innerRadius=function(t){return arguments.length?(e="function"==typeof t?t:fQ(+t),l):e},l.outerRadius=function(e){return arguments.length?(t="function"==typeof e?e:fQ(+e),l):t},l.cornerRadius=function(e){return arguments.length?(n="function"==typeof e?e:fQ(+e),l):n},l.padRadius=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:fQ(+e),l):r},l.startAngle=function(e){return arguments.length?(o="function"==typeof e?e:fQ(+e),l):o},l.endAngle=function(e){return arguments.length?(i="function"==typeof e?e:fQ(+e),l):i},l.padAngle=function(e){return arguments.length?(a="function"==typeof e?e:fQ(+e),l):a},l.context=function(e){return arguments.length?(s=null==e?null:e,l):s},l}function DQ(e){this._context=e}function TQ(e){return new DQ(e)}function zQ(e){return e[0]}function jQ(e){return e[1]}function NQ(){var e=zQ,t=null,n=fQ(0),r=jQ,o=fQ(!0),i=null,a=TQ,s=null;function l(l){var c,u,d,p,h,f=l.length,m=!1,g=new Array(f),y=new Array(f);for(null==i&&(s=a(h=hQ())),c=0;c<=f;++c){if(!(c<f&&o(p=l[c],c,l))===m)if(m=!m)u=c,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),d=c-1;d>=u;--d)s.point(g[d],y[d]);s.lineEnd(),s.areaEnd()}m&&(g[c]=+e(p,c,l),y[c]=+n(p,c,l),s.point(t?+t(p,c,l):g[c],r?+r(p,c,l):y[c]))}if(h)return s=null,h+""||null}function c(){return function(){var e=zQ,t=jQ,n=fQ(!0),r=null,o=TQ,i=null;function a(a){var s,l,c,u=a.length,d=!1;for(null==r&&(i=o(c=hQ())),s=0;s<=u;++s)!(s<u&&n(l=a[s],s,a))===d&&((d=!d)?i.lineStart():i.lineEnd()),d&&i.point(+e(l,s,a),+t(l,s,a));if(c)return i=null,c+""||null}return a.x=function(t){return arguments.length?(e="function"==typeof t?t:fQ(+t),a):e},a.y=function(e){return arguments.length?(t="function"==typeof e?e:fQ(+e),a):t},a.defined=function(e){return arguments.length?(n="function"==typeof e?e:fQ(!!e),a):n},a.curve=function(e){return arguments.length?(o=e,null!=r&&(i=o(r)),a):o},a.context=function(e){return arguments.length?(null==e?r=i=null:i=o(r=e),a):r},a}().defined(o).curve(a).context(i)}return l.x=function(n){return arguments.length?(e="function"==typeof n?n:fQ(+n),t=null,l):e},l.x0=function(t){return arguments.length?(e="function"==typeof t?t:fQ(+t),l):e},l.x1=function(e){return arguments.length?(t=null==e?null:"function"==typeof e?e:fQ(+e),l):t},l.y=function(e){return arguments.length?(n="function"==typeof e?e:fQ(+e),r=null,l):n},l.y0=function(e){return arguments.length?(n="function"==typeof e?e:fQ(+e),l):n},l.y1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:fQ(+e),l):r},l.lineX0=l.lineY0=function(){return c().x(e).y(n)},l.lineY1=function(){return c().x(e).y(r)},l.lineX1=function(){return c().x(t).y(n)},l.defined=function(e){return arguments.length?(o="function"==typeof e?e:fQ(!!e),l):o},l.curve=function(e){return arguments.length?(a=e,null!=i&&(s=a(i)),l):a},l.context=function(e){return arguments.length?(null==e?i=s=null:s=a(i=e),l):i},l}function qQ(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function FQ(e){return e}DQ.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};var WQ=Array.prototype.slice;function BQ(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function $Q(e){this._context=e}function HQ(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function VQ(e,t){this._context=e,this._k=(1-t)/6}$Q.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:BQ(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:BQ(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},VQ.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:HQ(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:HQ(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var GQ=function e(t){function n(e){return new VQ(e,t)}return n.tension=function(t){return e(+t)},n}(0);function UQ(e,t){this._context=e,this._alpha=t}UQ.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:!function(e,t,n){var r=e._x1,o=e._y1,i=e._x2,a=e._y2;if(e._l01_a>wQ){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,o=(o*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>wQ){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);i=(i*c+e._x1*e._l23_2a-t*e._l12_2a)/u,a=(a*c+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,o,i,a,e._x2,e._y2)}(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var YQ=function e(t){function n(e){return t?new UQ(e,t):new VQ(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function KQ(e){return e<0?-1:1}function XQ(e,t,n){var r=e._x1-e._x0,o=t-e._x1,i=(e._y1-e._y0)/(r||o<0&&-0),a=(n-e._y1)/(o||r<0&&-0),s=(i*o+a*r)/(r+o);return(KQ(i)+KQ(a))*Math.min(Math.abs(i),Math.abs(a),.5*Math.abs(s))||0}function JQ(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function ZQ(e,t,n){var r=e._x0,o=e._y0,i=e._x1,a=e._y1,s=(i-r)/3;e._context.bezierCurveTo(r+s,o+s*t,i-s,a-s*n,i,a)}function QQ(e){this._context=e}function e0(e){this._context=new t0(e)}function t0(e){this._context=e}function n0(e){this._context=e}function r0(e){var t,n,r=e.length-1,o=new Array(r),i=new Array(r),a=new Array(r);for(o[0]=0,i[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)o[t]=1,i[t]=4,a[t]=4*e[t]+2*e[t+1];for(o[r-1]=2,i[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=o[t]/i[t-1],i[t]-=n,a[t]-=n*a[t-1];for(o[r-1]=a[r-1]/i[r-1],t=r-2;t>=0;--t)o[t]=(a[t]-o[t+1])/i[t];for(i[r-1]=(e[r]+o[r-1])/2,t=0;t<r-1;++t)i[t]=2*e[t+1]-o[t+1];return[o,i]}function o0(e,t){this._context=e,this._t=t}function i0(e,t){if((o=e.length)>1)for(var n,r,o,i=1,a=e[t[0]],s=a.length;i<o;++i)for(r=a,a=e[t[i]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function a0(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function s0(e,t){return e[t]}function l0(e){for(var t,n=-1,r=0,o=e.length,i=-1/0;++n<o;)(t=+e[n][1])>i&&(i=t,r=n);return r}function c0(e){for(var t,n=0,r=-1,o=e.length;++r<o;)(t=+e[r][1])&&(n+=t);return n}function u0(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"unspecified",r=arguments.length>2?arguments[2]:void 0;const o={},i=e||{get:()=>{},has:()=>!1,default:()=>{}};function a(e,t){if(!e||"string"!=typeof e)throw new TypeError("Invalid argument: key must be a non-empty string");return!(e in o)&&(o[e]=t,!0)}function s(e){return o[e]||i.get(e)}function l(e,o){if(void 0!==o)return a(e,o);const i=s(e);return r&&void 0===i&&r.warn("".concat(e," does not exist in ").concat(n," registry")),i||s(t)}return t=i.default(),l.add=a,l.get=s,l.has=function(e){return!!o[e]||i.has(e)},l.remove=function(e){const t=o[e];return delete o[e],t},l.getKeys=function(){return Object.keys(o)},l.getValues=function(){return Object.keys(o).map((e=>o[e]))},l.default=function(e){return void 0!==e&&(t=e),t},l.register=a,l}function d0(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 p0(e){return(e=d0(Math.abs(e)))?e[1]:NaN}QQ.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:ZQ(this,this._t0,JQ(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,ZQ(this,JQ(this,n=XQ(this,e,t)),n);break;default:ZQ(this,this._t0,n=XQ(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(e0.prototype=Object.create(QQ.prototype)).point=function(e,t){QQ.prototype.point.call(this,t,e)},t0.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,o,i){this._context.bezierCurveTo(t,e,r,n,i,o)}},n0.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=r0(e),o=r0(t),i=0,a=1;a<n;++i,++a)this._context.bezierCurveTo(r[0][i],o[0][i],r[1][i],o[1][i],e[a],t[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},o0.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};var h0,f0=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function m0(e){if(!(t=f0.exec(e)))throw new Error("invalid format: "+e);var t;return new g0({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function g0(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function y0(e,t){var n=d0(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}m0.prototype=g0.prototype,g0.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var _0={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>y0(100*e,t),r:y0,s:function(e,t){var n=d0(e,t);if(!n)return e+"";var r=n[0],o=n[1],i=o-(h0=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,a=r.length;return i===a?r:i>a?r+new Array(i-a+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+d0(e,Math.max(0,t+i-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function b0(e){return e}var x0,v0,w0,S0=Array.prototype.map,C0=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function E0(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?b0:(t=S0.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var o=e.length,i=[],a=0,s=t[0],l=0;o>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),i.push(e.substring(o-=s,o+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return i.reverse().join(n)}),o=void 0===e.currency?"":e.currency[0]+"",i=void 0===e.currency?"":e.currency[1]+"",a=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?b0:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(S0.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"−":e.minus+"",u=void 0===e.nan?"NaN":e.nan+"";function d(e){var t=(e=m0(e)).fill,n=e.align,d=e.sign,p=e.symbol,h=e.zero,f=e.width,m=e.comma,g=e.precision,y=e.trim,_=e.type;"n"===_?(m=!0,_="g"):_0[_]||(void 0===g&&(g=12),y=!0,_="g"),(h||"0"===t&&"="===n)&&(h=!0,t="0",n="=");var b="$"===p?o:"#"===p&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",x="$"===p?i:/[%p]/.test(_)?l:"",v=_0[_],w=/[defgprs%]/.test(_);function S(e){var o,i,l,p=b,S=x;if("c"===_)S=v(e)+S,e="";else{var C=(e=+e)<0||1/e<0;if(e=isNaN(e)?u:v(Math.abs(e),g),y&&(e=function(e){e:for(var t,n=e.length,r=1,o=-1;r<n;++r)switch(e[r]){case".":o=t=r;break;case"0":0===o&&(o=r),t=r;break;default:if(!+e[r])break e;o>0&&(o=0)}return o>0?e.slice(0,o)+e.slice(t+1):e}(e)),C&&0==+e&&"+"!==d&&(C=!1),p=(C?"("===d?d:c:"-"===d||"("===d?"":d)+p,S=("s"===_?C0[8+h0/3]:"")+S+(C&&"("===d?")":""),w)for(o=-1,i=e.length;++o<i;)if(48>(l=e.charCodeAt(o))||l>57){S=(46===l?a+e.slice(o+1):e.slice(o))+S,e=e.slice(0,o);break}}m&&!h&&(e=r(e,1/0));var E=p.length+e.length+S.length,k=E<f?new Array(f-E+1).join(t):"";switch(m&&h&&(e=r(k+e,k.length?f-S.length:1/0),k=""),n){case"<":e=p+e+S+k;break;case"=":e=p+k+e+S;break;case"^":e=k.slice(0,E=k.length>>1)+p+e+S+k.slice(E);break;default:e=k+p+e+S}return s(e)}return g=void 0===g?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),S.toString=function(){return e+""},S}return{format:d,formatPrefix:function(e,t){var n=d(((e=m0(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(p0(t)/3))),o=Math.pow(10,-r),i=C0[8+r/3];return function(e){return n(o*e)+i}}}}!function(e){x0=E0(e),v0=x0.format,w0=x0.formatPrefix}({thousands:",",grouping:[3],currency:["$",""]});const k0=new Date,M0=new Date;function R0(e,t,n,r){function o(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return o.floor=t=>(e(t=new Date(+t)),t),o.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),o.round=e=>{const t=o(e),n=o.ceil(e);return e-t<n-e?t:n},o.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),o.range=(n,r,i)=>{const a=[];if(n=o.ceil(n),i=null==i?1:Math.floor(i),!(n<r&&i>0))return a;let s;do{a.push(s=new Date(+n)),t(n,i),e(n)}while(s<n&&n<r);return a},o.filter=n=>R0((t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),((e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););})),n&&(o.count=(t,r)=>(k0.setTime(+t),M0.setTime(+r),e(k0),e(M0),Math.floor(n(k0,M0))),o.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?o.filter(r?t=>r(t)%e==0:t=>o.count(0,t)%e==0):o:null)),o}const A0=6e4,I0=864e5,P0=6048e5,O0=R0((e=>e.setHours(0,0,0,0)),((e,t)=>e.setDate(e.getDate()+t)),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*A0)/I0),(e=>e.getDate()-1));O0.range;const L0=R0((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/I0),(e=>e.getUTCDate()-1));L0.range;const D0=R0((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/I0),(e=>Math.floor(e/I0)));function T0(e){return R0((t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),((e,t)=>{e.setDate(e.getDate()+7*t)}),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*A0)/P0))}D0.range;const z0=T0(0),j0=T0(1),N0=T0(2),q0=T0(3),F0=T0(4),W0=T0(5),B0=T0(6);function $0(e){return R0((t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)}),((e,t)=>(t-e)/P0))}z0.range,j0.range,N0.range,q0.range,F0.range,W0.range,B0.range;const H0=$0(0),V0=$0(1),G0=$0(2),U0=$0(3),Y0=$0(4),K0=$0(5),X0=$0(6);H0.range,V0.range,G0.range,U0.range,Y0.range,K0.range,X0.range;const J0=R0((e=>{e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,t)=>{e.setFullYear(e.getFullYear()+t)}),((e,t)=>t.getFullYear()-e.getFullYear()),(e=>e.getFullYear()));J0.every=e=>isFinite(e=Math.floor(e))&&e>0?R0((t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,n)=>{t.setFullYear(t.getFullYear()+n*e)})):null,J0.range;const Z0=R0((e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)}),((e,t)=>t.getUTCFullYear()-e.getUTCFullYear()),(e=>e.getUTCFullYear()));function Q0(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function e1(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function t1(e){let t,n,r;function o(e,r,o=0,i=e.length){if(o<i){if(0!==t(r,r))return i;do{const t=o+i>>>1;n(e[t],r)<0?o=t+1:i=t}while(o<i)}return o}return 2!==e.length?(t=Q0,n=(t,n)=>Q0(e(t),n),r=(t,n)=>e(t)-n):(t=e===Q0||e===e1?e:n1,n=e,r=e),{left:o,center:function(e,t,n=0,i=e.length){const a=o(e,t,n,i-1);return a>n&&r(e[a-1],t)>-r(e[a],t)?a-1:a},right:function(e,r,o=0,i=e.length){if(o<i){if(0!==t(r,r))return i;do{const t=o+i>>>1;n(e[t],r)<=0?o=t+1:i=t}while(o<i)}return o}}}function n1(){return 0}Z0.every=e=>isFinite(e=Math.floor(e))&&e>0?R0((t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null,Z0.range;const r1=t1(Q0).right;t1((function(e){return null===e?NaN:+e})).center;var o1=r1;class i1 extends Map{constructor(e,t=s1){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,n]of e)this.set(t,n)}get(e){return super.get(a1(this,e))}has(e){return super.has(a1(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},n){const r=t(n);e.has(r)&&(n=e.get(r),e.delete(r));return n}(this,e))}}function a1({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function s1(e){return null!==e&&"object"==typeof e?e.valueOf():e}const l1=Math.sqrt(50),c1=Math.sqrt(10),u1=Math.sqrt(2);function d1(e,t,n){const r=(t-e)/Math.max(0,n),o=Math.floor(Math.log10(r)),i=r/Math.pow(10,o),a=i>=l1?10:i>=c1?5:i>=u1?2:1;let s,l,c;return o<0?(c=Math.pow(10,-o)/a,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,o)*a,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=n&&n<2?d1(e,t,2*n):[s,l,c]}function p1(e,t,n){return d1(e=+e,t=+t,n=+n)[2]}function h1(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 f1(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 m1(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function g1(e){var t=e.dateTime,n=e.date,r=e.time,o=e.periods,i=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=S1(o),u=C1(o),d=S1(i),p=C1(i),h=S1(a),f=C1(a),m=S1(s),g=C1(s),y=S1(l),_=C1(l),b={a:function(e){return a[e.getDay()]},A:function(e){return i[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:V1,e:V1,f:X1,g:s2,G:c2,H:G1,I:U1,j:Y1,L:K1,m:J1,M:Z1,p:function(e){return o[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:O2,s:L2,S:Q1,u:e2,U:t2,V:r2,w:o2,W:i2,x:null,X:null,y:a2,Y:l2,Z:u2,"%":P2},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return i[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:d2,e:d2,f:g2,g:M2,G:A2,H:p2,I:h2,j:f2,L:m2,m:y2,M:_2,p:function(e){return o[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:O2,s:L2,S:b2,u:x2,U:v2,V:S2,w:C2,W:E2,x:null,X:null,y:k2,Y:R2,Z:I2,"%":P2},v={a:function(e,t,n){var r=h.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=y.exec(t.slice(n));return r?(e.m=_.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return C(e,t,n,r)},d:T1,e:T1,f:W1,g:P1,G:I1,H:j1,I:j1,j:z1,L:F1,m:D1,M:N1,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1},q:L1,Q:$1,s:H1,S:q1,u:k1,U:M1,V:R1,w:E1,W:A1,x:function(e,t,r){return C(e,n,t,r)},X:function(e,t,n){return C(e,r,t,n)},y:P1,Y:I1,Z:O1,"%":B1};function w(e,t){return function(n){var r,o,i,a=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(o=y1[r=e.charAt(++s)])?r=e.charAt(++s):o="e"===r?" ":"0",(i=t[r])&&(r=i(n,o)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function S(e,t){return function(n){var r,o,i=m1(1900,void 0,1);if(C(i,e,n+="",0)!=n.length)return null;if("Q"in i)return new Date(i.Q);if("s"in i)return new Date(1e3*i.s+("L"in i?i.L:0));if(t&&!("Z"in i)&&(i.Z=0),"p"in i&&(i.H=i.H%12+12*i.p),void 0===i.m&&(i.m="q"in i?i.q:0),"V"in i){if(i.V<1||i.V>53)return null;"w"in i||(i.w=1),"Z"in i?(o=(r=f1(m1(i.y,0,1))).getUTCDay(),r=o>4||0===o?V0.ceil(r):V0(r),r=L0.offset(r,7*(i.V-1)),i.y=r.getUTCFullYear(),i.m=r.getUTCMonth(),i.d=r.getUTCDate()+(i.w+6)%7):(o=(r=h1(m1(i.y,0,1))).getDay(),r=o>4||0===o?j0.ceil(r):j0(r),r=O0.offset(r,7*(i.V-1)),i.y=r.getFullYear(),i.m=r.getMonth(),i.d=r.getDate()+(i.w+6)%7)}else("W"in i||"U"in i)&&("w"in i||(i.w="u"in i?i.u%7:"W"in i?1:0),o="Z"in i?f1(m1(i.y,0,1)).getUTCDay():h1(m1(i.y,0,1)).getDay(),i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(o+5)%7:i.w+7*i.U-(o+6)%7);return"Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,f1(i)):h1(i)}}function C(e,t,n,r){for(var o,i,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(o=t.charCodeAt(a++))){if(o=t.charAt(a++),!(i=v[o in y1?t.charAt(a++):o])||(r=i(e,n,r))<0)return-1}else if(o!=n.charCodeAt(r++))return-1}return r}return b.x=w(n,b),b.X=w(r,b),b.c=w(t,b),x.x=w(n,x),x.X=w(r,x),x.c=w(t,x),{format:function(e){var t=w(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=S(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=w(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=S(e+="",!0);return t.toString=function(){return e},t}}}var y1={"-":"",_:" ",0:"0"},_1=/^\s*\d+/,b1=/^%/,x1=/[\\^$*+?|[\]().{}]/g;function v1(e,t,n){var r=e<0?"-":"",o=(r?-e:e)+"",i=o.length;return r+(i<n?new Array(n-i+1).join(t)+o:o)}function w1(e){return e.replace(x1,"\\$&")}function S1(e){return new RegExp("^(?:"+e.map(w1).join("|")+")","i")}function C1(e){return new Map(e.map(((e,t)=>[e.toLowerCase(),t])))}function E1(e,t,n){var r=_1.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function k1(e,t,n){var r=_1.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function M1(e,t,n){var r=_1.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function R1(e,t,n){var r=_1.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function A1(e,t,n){var r=_1.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function I1(e,t,n){var r=_1.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function P1(e,t,n){var r=_1.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function O1(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 L1(e,t,n){var r=_1.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function D1(e,t,n){var r=_1.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function T1(e,t,n){var r=_1.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function z1(e,t,n){var r=_1.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function j1(e,t,n){var r=_1.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function N1(e,t,n){var r=_1.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function q1(e,t,n){var r=_1.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function F1(e,t,n){var r=_1.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function W1(e,t,n){var r=_1.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function B1(e,t,n){var r=b1.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function $1(e,t,n){var r=_1.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function H1(e,t,n){var r=_1.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function V1(e,t){return v1(e.getDate(),t,2)}function G1(e,t){return v1(e.getHours(),t,2)}function U1(e,t){return v1(e.getHours()%12||12,t,2)}function Y1(e,t){return v1(1+O0.count(J0(e),e),t,3)}function K1(e,t){return v1(e.getMilliseconds(),t,3)}function X1(e,t){return K1(e,t)+"000"}function J1(e,t){return v1(e.getMonth()+1,t,2)}function Z1(e,t){return v1(e.getMinutes(),t,2)}function Q1(e,t){return v1(e.getSeconds(),t,2)}function e2(e){var t=e.getDay();return 0===t?7:t}function t2(e,t){return v1(z0.count(J0(e)-1,e),t,2)}function n2(e){var t=e.getDay();return t>=4||0===t?F0(e):F0.ceil(e)}function r2(e,t){return e=n2(e),v1(F0.count(J0(e),e)+(4===J0(e).getDay()),t,2)}function o2(e){return e.getDay()}function i2(e,t){return v1(j0.count(J0(e)-1,e),t,2)}function a2(e,t){return v1(e.getFullYear()%100,t,2)}function s2(e,t){return v1((e=n2(e)).getFullYear()%100,t,2)}function l2(e,t){return v1(e.getFullYear()%1e4,t,4)}function c2(e,t){var n=e.getDay();return v1((e=n>=4||0===n?F0(e):F0.ceil(e)).getFullYear()%1e4,t,4)}function u2(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+v1(t/60|0,"0",2)+v1(t%60,"0",2)}function d2(e,t){return v1(e.getUTCDate(),t,2)}function p2(e,t){return v1(e.getUTCHours(),t,2)}function h2(e,t){return v1(e.getUTCHours()%12||12,t,2)}function f2(e,t){return v1(1+L0.count(Z0(e),e),t,3)}function m2(e,t){return v1(e.getUTCMilliseconds(),t,3)}function g2(e,t){return m2(e,t)+"000"}function y2(e,t){return v1(e.getUTCMonth()+1,t,2)}function _2(e,t){return v1(e.getUTCMinutes(),t,2)}function b2(e,t){return v1(e.getUTCSeconds(),t,2)}function x2(e){var t=e.getUTCDay();return 0===t?7:t}function v2(e,t){return v1(H0.count(Z0(e)-1,e),t,2)}function w2(e){var t=e.getUTCDay();return t>=4||0===t?Y0(e):Y0.ceil(e)}function S2(e,t){return e=w2(e),v1(Y0.count(Z0(e),e)+(4===Z0(e).getUTCDay()),t,2)}function C2(e){return e.getUTCDay()}function E2(e,t){return v1(V0.count(Z0(e)-1,e),t,2)}function k2(e,t){return v1(e.getUTCFullYear()%100,t,2)}function M2(e,t){return v1((e=w2(e)).getUTCFullYear()%100,t,2)}function R2(e,t){return v1(e.getUTCFullYear()%1e4,t,4)}function A2(e,t){var n=e.getUTCDay();return v1((e=n>=4||0===n?Y0(e):Y0.ceil(e)).getUTCFullYear()%1e4,t,4)}function I2(){return"+0000"}function P2(){return"%"}function O2(e){return+e}function L2(e){return Math.floor(+e/1e3)}const D2=u0();D2("d3-number",(function(e,t,n){let r,o;function i(e){return o(e)}function a(){i.locale({decimal:n||".",thousands:t||",",grouping:[3],currency:["$",""]})}return i.locale=function(t){return r=E0(t),o=r.format(e),this},a(),i.format=function(e,o,i,s){return(i||s)&&(t=i,n=s,a()),r.format(e)(o)},i.pattern=function(t){return t&&(e=t,o=r.format(t)),e},i})),D2("d3-time",(function(e){let t=g1({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),n=t.format(e);function r(e){return n(e)}return r.format=function(e,n){return t.format(e)(n)},r.locale=function(){return t=g1(...arguments),n=t.format(e),this},r.parse=function(e,n){return t.parse(e)(n)},r.parsePattern=function(e){return t.parse(e)},r}));const T2={id:e=>"".concat(e.source,"/").concat(e.key||e.title),key:e=>String(e.key||e.title),tags:e=>e.tags,min:e=>e.min,max:e=>e.max,type:e=>e.type,title:e=>String(e.title),values:e=>e.values,value:e=>e,label:e=>e,formatter:e=>(e=>{if("function"==typeof e.formatter)return e.formatter();const t=e.formatter||{};return D2(t.type||"d3-number")(t.format||"")})(e)};function z2(e){let{id:t=T2.id,key:n=T2.key,min:r=T2.min,max:o=T2.max,type:i=T2.type,tags:a=T2.tags,title:s=T2.title,values:l=T2.values,value:c=T2.value,label:u=T2.label,formatter:d=T2.formatter}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{id:()=>t(e),key:()=>n(e),raw:()=>e,tags:()=>a(e),type:()=>i(e),min:()=>r(e),max:()=>o(e),title:()=>s(e),items:()=>l(e),formatter:()=>d(e),value:c,label:u}}const j2=e=>e.filter((e=>"number"==typeof e&&!isNaN(e))),N2=e=>e.reduce(((e,t)=>e+t),0),q2={first:e=>e[0],last:e=>e[e.length-1],min:e=>{const t=j2(e);return t.length?Math.min.apply(null,t):NaN},max:e=>{const t=j2(e);return t.length?Math.max.apply(null,t):NaN},sum:e=>{const t=j2(e);return t.length?t.reduce(((e,t)=>e+t),0):NaN},avg:e=>{const t=j2(e),n=t.length;return n?N2(t)/n:NaN}};function F2(e,t,n,r){const o={},i=r.field||(void 0!==e.field?t.field(e.field):null);return Object.keys(n).forEach((a=>{const s=n[a],l=o[a]={};-1!==["number","string","boolean"].indexOf(typeof s)?(l.type="primitive",l.value=s):"function"==typeof s?(l.type="function",l.value=s,l.label=s,l.field=i):"object"==typeof s&&(s.fields?l.fields=s.fields.map((n=>F2(e,t,{main:n},r).main)):void 0!==s.field?(l.type="field",l.field=t.field(s.field),l.value=l.field.value,l.label=l.field.label):i&&(l.value=i.value,l.label=i.label,l.field=i),"function"==typeof s.filter&&(l.filter=s.filter),void 0!==s.value&&(l.value=s.value),void 0!==s.label&&(l.label=s.label),"function"==typeof s.reduce?l.reduce=s.reduce:s.reduce?l.reduce=q2[s.reduce]:l.field&&l.field.reduce&&(l.reduce="string"==typeof l.field.reduce?q2[l.field.reduce]:l.field.reduce),"function"==typeof s.reduceLabel?l.reduceLabel=s.reduceLabel:s.reduceLabel?l.reduceLabel=q2[s.reduceLabel]:l.field&&l.field.reduceLabel&&(l.reduceLabel="string"==typeof l.field.reduceLabel?q2[l.field.reduceLabel]:l.field.reduceLabel))})),o}function W2(e,t){const{main:n}=F2(e,t,{main:{value:e.value,label:e.label,reduce:e.reduce,filter:e.filter}},{});return{props:F2(e,t,e.props||{},n),main:n}}function B2(e,t,n,r){const o=Array(e.length),i=Array(e.length);let a;for(let t=0;t<e.length;t++)a=r?e[t][r]:e[t],o[t]=a.value,i[t]=a.label;const s=t.reduce,l=t.reduceLabel,c=s?s(o):o,u={value:c,label:l?l(i,c):n?n(c):String(c)};return r&&e[0][r].source?(u.source=e[0][r].source,u):!r&&e[0].source?(u.source=e[0].source,u):u}function $2(e,t){let{main:n,propsArr:r,props:o}=t,i=[];const a=n.field.formatter(),s={};return r.forEach((e=>{s[e]=o[e].field?o[e].field.formatter():e=>e})),i.push(...e.map((e=>{const t=B2(e.items,n,a);return r.forEach((n=>{t[n]=B2(e.items,o[n],s[n],n)})),t}))),i}function H2(e){let{cfg:t,itemData:n,obj:r,target:o,tracker:i,trackType:a}=e;const s="function"===a?t.trackBy(n):n[t.trackBy];let l=i[s];l||(l=i[s]={items:[],id:s},o.push(l)),l.items.push(r)}function V2(e){if(e.length<1e4)return Math.max(...e);let t=-1/0;const n=e.length;for(let r=0;r<n;r++)t<e[r]&&(t=e[r]);return t}function G2(e){if(e.length<1e4)return Math.min(...e);let t=1/0;const n=e.length;for(let r=0;r<n;r++)t>e[r]&&(t=e[r]);return t}const U2={diverging:function(e,t){if((s=e.length)>0)for(var n,r,o,i,a,s,l=0,c=e[t[0]].length;l<c;++l)for(i=a=0,n=0;n<s;++n)(o=(r=e[t[n]][l])[1]-r[0])>=0?(r[0]=i,r[1]=i+=o):o<0?(r[1]=a,r[0]=a+=o):r[0]=i},none:i0,silhouette:function(e,t){if((n=e.length)>0){for(var n,r=0,o=e[t[0]],i=o.length;r<i;++r){for(var a=0,s=0;a<n;++a)s+=e[a][r][1]||0;o[r][1]+=o[r][0]=-s/2}i0(e,t)}},expand:function(e,t){if((r=e.length)>0){for(var n,r,o,i=0,a=e[0].length;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}i0(e,t)}},wiggle:function(e,t){if((o=e.length)>0&&(r=(n=e[t[0]]).length)>0){for(var n,r,o,i=0,a=1;a<r;++a){for(var s=0,l=0,c=0;s<o;++s){for(var u=e[t[s]],d=u[a][1]||0,p=(d-(u[a-1][1]||0))/2,h=0;h<s;++h){var f=e[t[h]];p+=(f[a][1]||0)-(f[a-1][1]||0)}l+=d,c+=p*d}n[a-1][1]+=n[a-1][0]=i,l&&(i-=c/l)}n[a-1][1]+=n[a-1][0]=i,i0(e,t)}}},Y2={ascending:function(e){var t=e.map(c0);return a0(e).sort((function(e,n){return t[e]-t[n]}))},insideout:function(e){var t,n,r=e.length,o=e.map(c0),i=function(e){var t=e.map(l0);return a0(e).sort((function(e,n){return t[e]-t[n]}))}(e),a=0,s=0,l=[],c=[];for(t=0;t<r;++t)n=i[t],a<s?(a+=o[n],l.push(n)):(s+=o[n],c.push(n));return c.reverse().concat(l)},none:a0,reverse:function(e){return a0(e).reverse()}};function K2(e,t,n){const r={},o=t.stackKey,i=t.value,a=t.startProp||"start",s=t.endProp||"end",l=t.offset||"none",c=t.order||"none",u=t.valueRef||"";let d=0,p={};for(let t=0;t<e.items.length;t++){let n=e.items[t],i=u?n[u]:null;if(i&&i.source){let e="".concat(i.source.key||"","/").concat(i.source.field);p[e]||(p[e]=i.source)}let a=o(n);r[a]=r[a]||{items:[]},r[a].items.push(n),d=Math.max(d,r[a].items.length)}const h=Array.apply(null,{length:d}).map(Number.call,Number),f=Object.keys(r).map((e=>r[e].items)),m=function(){var e=fQ([]),t=a0,n=i0,r=s0;function o(o){var i,a,s=e.apply(this,arguments),l=o.length,c=s.length,u=new Array(c);for(i=0;i<c;++i){for(var d,p=s[i],h=u[i]=new Array(l),f=0;f<l;++f)h[f]=d=[0,+r(o[f],p,f,o)],d.data=o[f];h.key=p}for(i=0,a=t(u);i<c;++i)u[a[i]].index=i;return n(u,a),u}return o.keys=function(t){return arguments.length?(e="function"==typeof t?t:fQ(WQ.call(t)),o):e},o.value=function(e){return arguments.length?(r="function"==typeof e?e:fQ(+e),o):r},o.order=function(e){return arguments.length?(t=null==e?a0:"function"==typeof e?e:fQ(WQ.call(e)),o):t},o.offset=function(e){return arguments.length?(n=null==e?i0:e,o):n},o}().keys(h).value(((e,t)=>e[t]?i(e[t]):0)).order(Y2[c]).offset(U2[l]);let g=m(f),y=[];for(let e=0;e<g.length;e++){let t=g[e];for(let e=0;e<t.length;e++){let n=t[e],r=t[e].data[t.key];r&&(r[a]={value:n[0]},r[s]={value:n[1]},y.push(n[0],n[1]))}}let _=Object.keys(p).map((e=>{let t=n(p[e].key);return t?t.field(p[e].field):null})).filter((e=>!!e));const b=z2({title:_.map((e=>e.title())).join(", "),min:G2(y),max:V2(y),type:"measure",formatter:_[0]?_[0].formatter:void 0});e.fields.push(b)}function X2(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={};const r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).logger;if(Array.isArray(e))n.items=e.map((e=>({value:e,label:String(e)})));else if(e){if("collection"in e)n=JZ({},t.collection(e.collection));else{const o=t.dataset?t.dataset(e.source):null;let i=e.value||(e=>e),a=e.label||(e=>e);if(e.groupBy||e.mapTo)r.warn('Deprecated "data" configuration',e),n.items=[];else if(e.hierarchy)n.root=o.hierarchy?o.hierarchy(e.hierarchy):null,n.fields=o.fields();else if(e.items)n.items=e.skipNormalize?e.items:e.items.map((e=>({value:i(e),label:String(a(e))})));else if(e.extract){const r=Array.isArray(e.extract)?e.extract:[e.extract];n.items=[];const i=[];r.forEach((e=>{const r=e.source?t.dataset(e.source):o;r&&(n.items=[...n.items,...r.extract(e)],void 0!==e.field&&i.push(r.field(e.field)))})),i.length&&(n.fields=i),e.amend&&Array.isArray(e.amend)&&(n.items=[...n.items,...e.amend])}else if(void 0!==e.field&&o){const t=o.field(e.field);t&&(n.fields||(n.fields=[]),n.fields.push(t),"value"in e||(i=t.value||(e=>e),a=t.label||(e=>e),n.value=i),n.items=t.items().map((t=>({value:i(t),label:String(a(t)),source:{field:e.field}}))))}else e.fields&&e.fields.forEach((e=>{const r="object"==typeof e&&e.source?t.dataset(e.source):o;if(!r)return;let i;i="object"==typeof e&&void 0!==e.field?r.field(e.field):r.field(e),i&&(n.fields||(n.fields=[]),n.fields.push(i))}));n.items&&e.map&&(n.items=n.items.map(e.map))}e&&e.stack&&K2(n,e.stack,t.dataset)}return e&&!Array.isArray(e)&&"function"==typeof e.filter&&n.items&&(n.items=n.items.filter(e.filter)),e&&!Array.isArray(e)&&"function"==typeof e.sort&&n.items&&(n.items=n.items.sort(e.sort)),n}function J2(e,t,n){let r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:X2;if(e.data){const r=o(e.data,t,n);if(r&&r.fields&&r.fields[0])return r.fields[0].formatter()}if(r=e.formatter?"".concat(e.formatter,"-").concat(e.type||"number"):e.type||"d3-number",n.formatter.has(r)){return n.formatter.get(r)(e.format||"")}throw new Error("Formatter of type '".concat(r,"' was not found"))}function Z2(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}const Q2=Symbol("implicit");function e5(){var e=new i1,t=[],n=[],r=Q2;function o(o){let i=e.get(o);if(void 0===i){if(r!==Q2)return r;e.set(o,i=t.push(o)-1)}return n[i%n.length]}return o.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new i1;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return o},o.range=function(e){return arguments.length?(n=Array.from(e),o):n.slice()},o.unknown=function(e){return arguments.length?(r=e,o):r},o.copy=function(){return e5(t,n).unknown(r)},Z2.apply(o,arguments),o}function t5(){var e,t,n=e5().unknown(void 0),r=n.domain,o=n.range,i=0,a=1,s=!1,l=0,c=0,u=.5;function d(){var n=r().length,d=a<i,p=d?a:i,h=d?i:a;e=(h-p)/Math.max(1,n-l+2*c),s&&(e=Math.floor(e)),p+=(h-p-e*(n-l))*u,t=e*(1-l),s&&(p=Math.round(p),t=Math.round(t));var f=function(e,t,n){e=+e,t=+t,n=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+n;for(var r=-1,o=0|Math.max(0,Math.ceil((t-e)/n)),i=new Array(o);++r<o;)i[r]=e+r*n;return i}(n).map((function(t){return p+e*t}));return o(d?f.reverse():f)}return delete n.unknown,n.domain=function(e){return arguments.length?(r(e),d()):r()},n.range=function(e){return arguments.length?([i,a]=e,i=+i,a=+a,d()):[i,a]},n.rangeRound=function(e){return[i,a]=e,i=+i,a=+a,s=!0,d()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(s=!!e,d()):s},n.padding=function(e){return arguments.length?(l=Math.min(1,c=+e),d()):l},n.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),d()):l},n.paddingOuter=function(e){return arguments.length?(c=+e,d()):c},n.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},n.copy=function(){return t5(r(),[i,a]).round(s).paddingInner(l).paddingOuter(c).align(u)},Z2.apply(d(),arguments)}function n5(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function r5(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function o5(){}var i5=.7,a5=1/i5,s5="\\s*([+-]?\\d+)\\s*",l5="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",c5="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",u5=/^#([0-9a-f]{3,8})$/,d5=new RegExp(`^rgb\\(${s5},${s5},${s5}\\)$`),p5=new RegExp(`^rgb\\(${c5},${c5},${c5}\\)$`),h5=new RegExp(`^rgba\\(${s5},${s5},${s5},${l5}\\)$`),f5=new RegExp(`^rgba\\(${c5},${c5},${c5},${l5}\\)$`),m5=new RegExp(`^hsl\\(${l5},${c5},${c5}\\)$`),g5=new RegExp(`^hsla\\(${l5},${c5},${c5},${l5}\\)$`),y5={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 _5(){return this.rgb().formatHex()}function b5(){return this.rgb().formatRgb()}function x5(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=u5.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?v5(t):3===n?new C5(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?w5(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?w5(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=d5.exec(e))?new C5(t[1],t[2],t[3],1):(t=p5.exec(e))?new C5(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=h5.exec(e))?w5(t[1],t[2],t[3],t[4]):(t=f5.exec(e))?w5(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=m5.exec(e))?I5(t[1],t[2]/100,t[3]/100,1):(t=g5.exec(e))?I5(t[1],t[2]/100,t[3]/100,t[4]):y5.hasOwnProperty(e)?v5(y5[e]):"transparent"===e?new C5(NaN,NaN,NaN,0):null}function v5(e){return new C5(e>>16&255,e>>8&255,255&e,1)}function w5(e,t,n,r){return r<=0&&(e=t=n=NaN),new C5(e,t,n,r)}function S5(e,t,n,r){return 1===arguments.length?function(e){return e instanceof o5||(e=x5(e)),e?new C5((e=e.rgb()).r,e.g,e.b,e.opacity):new C5}(e):new C5(e,t,n,null==r?1:r)}function C5(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function E5(){return`#${A5(this.r)}${A5(this.g)}${A5(this.b)}`}function k5(){const e=M5(this.opacity);return`${1===e?"rgb(":"rgba("}${R5(this.r)}, ${R5(this.g)}, ${R5(this.b)}${1===e?")":`, ${e})`}`}function M5(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function R5(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function A5(e){return((e=R5(e))<16?"0":"")+e.toString(16)}function I5(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new O5(e,t,n,r)}function P5(e){if(e instanceof O5)return new O5(e.h,e.s,e.l,e.opacity);if(e instanceof o5||(e=x5(e)),!e)return new O5;if(e instanceof O5)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new O5(a,s,l,e.opacity)}function O5(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function L5(e){return(e=(e||0)%360)<0?e+360:e}function D5(e){return Math.max(0,Math.min(1,e||0))}function T5(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}n5(o5,x5,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:_5,formatHex:_5,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return P5(this).formatHsl()},formatRgb:b5,toString:b5}),n5(C5,S5,r5(o5,{brighter(e){return e=null==e?a5:Math.pow(a5,e),new C5(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?i5:Math.pow(i5,e),new C5(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new C5(R5(this.r),R5(this.g),R5(this.b),M5(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:E5,formatHex:E5,formatHex8:function(){return`#${A5(this.r)}${A5(this.g)}${A5(this.b)}${A5(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:k5,toString:k5})),n5(O5,(function(e,t,n,r){return 1===arguments.length?P5(e):new O5(e,t,n,null==r?1:r)}),r5(o5,{brighter(e){return e=null==e?a5:Math.pow(a5,e),new O5(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?i5:Math.pow(i5,e),new O5(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new C5(T5(e>=240?e-240:e+120,o,r),T5(e,o,r),T5(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new O5(L5(this.h),D5(this.s),D5(this.l),M5(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=M5(this.opacity);return`${1===e?"hsl(":"hsla("}${L5(this.h)}, ${100*D5(this.s)}%, ${100*D5(this.l)}%${1===e?")":`, ${e})`}`}}));var z5=e=>()=>e;function j5(e){return 1==(e=+e)?N5: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):z5(isNaN(t)?n:t)}}function N5(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):z5(isNaN(e)?t:e)}var q5=function e(t){var n=j5(t);function r(e,t){var r=n((e=S5(e)).r,(t=S5(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=N5(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=i(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function F5(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,o=t.slice();return function(i){for(n=0;n<r;++n)o[n]=e[n]*(1-i)+t[n]*i;return o}}function W5(e,t){var n,r=t?t.length:0,o=e?Math.min(r,e.length):0,i=new Array(o),a=new Array(r);for(n=0;n<o;++n)i[n]=Y5(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<o;++n)a[n]=i[n](e);return a}}function B5(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function $5(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function H5(e,t){var n,r={},o={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=Y5(e[n],t[n]):o[n]=t[n];return function(e){for(n in r)o[n]=r[n](e);return o}}var V5=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,G5=new RegExp(V5.source,"g");function U5(e,t){var n,r,o,i=V5.lastIndex=G5.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=V5.exec(e))&&(r=G5.exec(t));)(o=r.index)>i&&(o=t.slice(i,o),s[a]?s[a]+=o:s[++a]=o),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:$5(n,r)})),i=G5.lastIndex;return i<t.length&&(o=t.slice(i),s[a]?s[a]+=o:s[++a]=o),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 Y5(e,t){var n,r=typeof t;return null==t||"boolean"===r?z5(t):("number"===r?$5:"string"===r?(n=x5(t))?(t=n,q5):U5:t instanceof x5?q5:t instanceof Date?B5:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?F5:Array.isArray(t)?W5:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?H5:$5)(e,t)}function K5(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function X5(e){return+e}var J5=[0,1];function Z5(e){return e}function Q5(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function e3(e,t,n){var r=e[0],o=e[1],i=t[0],a=t[1];return o<r?(r=Q5(o,r),i=n(a,i)):(r=Q5(r,o),i=n(i,a)),function(e){return i(r(e))}}function t3(e,t,n){var r=Math.min(e.length,t.length)-1,o=new Array(r),i=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)o[a]=Q5(e[a],e[a+1]),i[a]=n(t[a],t[a+1]);return function(t){var n=o1(e,t,1,r)-1;return i[n](o[n](t))}}function n3(){var e,t,n,r,o,i,a=J5,s=J5,l=Y5,c=Z5;function u(){var e=Math.min(a.length,s.length);return c!==Z5&&(c=function(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(a[0],a[e-1])),r=e>2?t3:e3,o=i=null,d}function d(t){return null==t||isNaN(t=+t)?n:(o||(o=r(a.map(e),s,l)))(e(c(t)))}return d.invert=function(n){return c(t((i||(i=r(s,a.map(e),$5)))(n)))},d.domain=function(e){return arguments.length?(a=Array.from(e,X5),u()):a.slice()},d.range=function(e){return arguments.length?(s=Array.from(e),u()):s.slice()},d.rangeRound=function(e){return s=Array.from(e),l=K5,u()},d.clamp=function(e){return arguments.length?(c=!!e||Z5,u()):c!==Z5},d.interpolate=function(e){return arguments.length?(l=e,u()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,u()}}function r3(e,t,n,r){var o,i=function(e,t,n){n=+n;const r=(t=+t)<(e=+e),o=r?p1(t,e,n):p1(e,t,n);return(r?-1:1)*(o<0?1/-o:o)}(e,t,n);switch((r=m0(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(o=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(p0(t)/3)))-p0(Math.abs(e)))}(i,a))||(r.precision=o),w0(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(o=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,p0(t)-p0(e))+1}(i,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=o-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(o=function(e){return Math.max(0,-p0(Math.abs(e)))}(i))||(r.precision=o-2*("%"===r.type))}return v0(r)}function o3(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){if(!((n=+n)>0))return[];if((e=+e)==(t=+t))return[e];const r=t<e,[o,i,a]=r?d1(t,e,n):d1(e,t,n);if(!(i>=o))return[];const s=i-o+1,l=new Array(s);if(r)if(a<0)for(let e=0;e<s;++e)l[e]=(i-e)/-a;else for(let e=0;e<s;++e)l[e]=(i-e)*a;else if(a<0)for(let e=0;e<s;++e)l[e]=(o+e)/-a;else for(let e=0;e<s;++e)l[e]=(o+e)*a;return l}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return r3(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,o,i=t(),a=0,s=i.length-1,l=i[a],c=i[s],u=10;for(c<l&&(o=l,l=c,c=o,o=a,a=s,s=o);u-- >0;){if((o=p1(l,c,n))===r)return i[a]=l,i[s]=c,t(i);if(o>0)l=Math.floor(l/o)*o,c=Math.ceil(c/o)*o;else{if(!(o<0))break;l=Math.ceil(l*o)/o,c=Math.floor(c*o)/o}r=o}return e},e}function i3(){var e=n3()(Z5,Z5);return e.copy=function(){return function(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}(e,i3())},Z2.apply(e,arguments),o3(e)}function a3(){var e,t=[.5],n=[0,1],r=1;function o(o){return null!=o&&o<=o?n[o1(t,o,0,r)]:e}return o.domain=function(e){return arguments.length?(t=Array.from(e),r=Math.min(t.length,n.length-1),o):t.slice()},o.range=function(e){return arguments.length?(n=Array.from(e),r=Math.min(t.length,n.length-1),o):n.slice()},o.invertExtent=function(e){var r=n.indexOf(e);return[t[r-1],t[r]]},o.unknown=function(t){return arguments.length?(e=t,o):e},o.copy=function(){return a3().domain(t).range(n).unknown(e)},Z2.apply(o,arguments)}function s3(e){return void 0===e?e=>e:t=>e(t)}function l3(e){return Math.max(0,Math.min(1,e))}function c3(e){return"object"==typeof e}function u3(e,t,n){const r=Math.abs(t-n)/(e+1),o=[];for(let i=1;i<=e;i++){const e=i*r;o.push(t<n?t+e:t-e)}return o}function d3(e,t,n){if(1===e.length)return e;const r=e.concat([]);for(let o=0;o<e.length;o++){let i=e[o],a=e[o+1];0===o&&i!==n.start()?(r.push(...u3(t,i,a)),i-=a-i,a=e[o],r.push(...u3(t,i,a))):o===e.length-1&&a!==n.end()?(a=i+(i-e[o-1]),r.push(...u3(t,i,a))):r.push(...u3(t,i,a))}return r.filter((e=>e>=n.min()&&e<=n.max()))}function p3(e){let{distance:t,scale:n,minorCount:r=0,unitDivider:o=100,formatter:i}=e;const a=eQ(o)||eQ(t)?2:Math.max(t/o,2),s=Math.min(1e3,Math.round(a));let l=n.ticks(s);l.length<=1&&(l=n.ticks(s+1));const c=r>0?d3(l,r,n):l;c.sort(((e,t)=>e-t));const u=c.map(s3(i));return c.map(((e,t)=>{const r=n(e);return{position:r,start:r,end:r,label:u[t],value:e,isMinor:-1===l.indexOf(e)}}))}function h3(e){let{distance:t,scale:n,minorCount:r=0,unitDivider:o=100,formatter:i}=e;const a=eQ(o)||eQ(t)?2:Math.max(t/o,2),s=Math.min(1e3,Math.round(a)),l=s>10?10:s;n.nice(l);const c=n.ticks(s),u=r>0?d3(c,r,n):c;u.sort(((e,t)=>e-t));const d=u.map(s3(i));return u.map(((e,t)=>{const r=n(e);return{position:r,start:r,end:r,label:d[t],value:e,isMinor:-1===c.indexOf(e)}}))}function f3(e){let t,{settings:n,scale:r,distance:o,formatter:i=e=>e}=e;const a=n.minorTicks&&!eQ(n.minorTicks.count)?Math.min(100,n.minorTicks.count):0;if(Array.isArray(n.ticks.values)){const e=n.ticks.values.filter((e=>"object"==typeof e?!eQ(e.value):!eQ(e)));t=function(e){let{values:t,scale:n,formatter:r=e=>e}=e;return t.sort(((e,t)=>(c3(e)?e.value:e)-(c3(t)?t.value:t))).filter(((e,t,r)=>{const o=c3(e)?e.value:e;return o<=n.max()&&o>=n.min()&&r.indexOf(e)===t})).map((e=>{const t=c3(e),o=t?e.value:e,i=n(o);return{position:i,value:o,label:t&&void 0!==e.label?e.label:r(o),isMinor:!!t&&!!e.isMinor,start:t&&!isNaN(e.start)?l3(n(e.start)):i,end:t&&!isNaN(e.end)?l3(n(e.end)):i}}))}({values:e,scale:r.copy(),formatter:i})}else if(eQ(n.ticks.count)){t=(n.ticks.tight?h3:p3)({distance:o,minorCount:a,unitDivider:n.ticks.distance,scale:r,formatter:i}),n.ticks.forceBounds&&function(e,t,n){const r=e.map((e=>e.position)),o=t.range();-1===r.indexOf(o[0])?e.splice(0,0,{position:o[0],start:o[0],end:o[0],label:n(t.start()),isMinor:!1,value:t.start()}):e[0]&&e[0].isMinor&&(e[0].isMinor=!1);const i=e[e.length-1];-1===r.indexOf(o[1])?e.push({position:o[1],start:o[1],end:o[1],label:n(t.end()),isMinor:!1,value:t.end()}):i&&i.isMinor&&(i.isMinor=!1)}(t,r,i)}else{t=function(e){let{count:t,minorCount:n,scale:r,formatter:o}=e;return r.ticks((t-1)*n+t).map(((e,t)=>{const i=r(e);return{position:i,start:i,end:i,label:o(e),isMinor:t%(n+1)!=0,value:e}}))}({count:Math.min(1e3,n.ticks.count),minorCount:a,scale:r.copy(),formatter:i})}return t}function m3(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r={};return Object.keys(t).forEach((o=>{const i=typeof e[o];r[o]="function"===i?e[o](n):"undefined"===i?t[o]:e[o]})),r}const g3={min:NaN,max:NaN,expand:NaN,include:[],invert:!1},y3={tight:!1,forceBounds:!1,values:void 0,count:NaN,distance:100},_3={count:NaN};function b3(e,t){e.instance||(e.instance=t.copy(),e.instance.domain([t.start(),t.end()]),e.instance.clamp(!0),e.instance.range(e.invert?[1,0]:[0,1]))}function x3(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=i3(),o={instance:null,invert:!1},i={data:t,resources:n},a=m3(e,g3,i);let s;function l(e){return eQ(e)?NaN:r(e)}a.ticks=m3(e.ticks,y3,i),a.minorTicks=m3(e.minorTicks,_3,i),l.data=()=>t,l.invert=function(e){return r.invert(e)},l.rangeRound=function(e){return r.rangeRound(e),l},l.clamp=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return r.clamp(e),l},l.cachedTicks=function(){return s},l.clearTicksCache=function(){return s=void 0,this},l.ticks=function(e){return null!==e&&"object"==typeof e?(e.settings=e.settings||{},e.settings=UZ(!0,{},a,e.settings),e.scale=l,s=f3(e),s):(s=r.ticks(e),s)},l.nice=function(e){return r.nice(e),l},l.tickFormat=function(e,t){return r.tickFormat(e,t)},l.interpolate=function(e){return r.interpolate(e),l},l.domain=function(e){return arguments.length?(r.domain(e),o.instance&&o.instance.domain([l.start(),l.end()]),l):r.domain()},l.range=function(e){return arguments.length?(r.range(e),l):r.range()},l.start=function(){return l.domain()[0]},l.end=function(){return l.domain()[this.domain().length-1]},l.min=function(){return Math.min(this.start(),this.end())},l.max=function(){return Math.max(this.start(),this.end())},l.classify=function(e){let t=(l.start()-l.end())/e,n=[l.end()],r=[],o=t/2;for(let i=0;i<e;i++){let e=n[n.length-1]||0,i=e+t,a=l(e+o);n.push(i,i),r.push(a,a)}return n.pop(),l.domain(n),l.range(r),l},l.copy=function(){const o=x3(e,t,n);return o.domain(l.domain()),o.range(l.range()),o.clamp(r.clamp()),o},l.norm=function(e){return b3(o,l),o.instance(e)},l.normInvert=function(e){return b3(o,l),o.instance.invert(e)};const{mini:c,maxi:u}=function(e,t){const n=+e.min,r=+e.max;let o=0,i=1;if(t&&t[0]){const n=t.map((e=>e.min())).filter((e=>!isNaN(e))),r=t.map((e=>e.max())).filter((e=>!isNaN(e)));if(o=n.length?Math.min(...n):Number.NaN,i=r.length?Math.max(...r):Number.NaN,isNaN(o)||isNaN(i))o=-1,i=1;else if(o===i&&0===o)o=-1,i=1;else if(o===i&&o)o-=Math.abs(.1*o),i+=Math.abs(.1*i);else if(!isNaN(e.expand)){const t=i-o;o-=t*e.expand,i+=t*e.expand}if(Array.isArray(e.include)){const t=e.include.filter((e=>!isNaN(e)));o=Math.min(...t,o),i=Math.max(...t,i)}}return{mini:isNaN(n)?o:n,maxi:isNaN(r)?i:r}}(a,t?t.fields:[]);return l.domain([c,u]),l.range(a.invert?[1,0]:[0,1]),o.invert=a.invert,l}const v3={padding:0,paddingInner:NaN,paddingOuter:NaN,align:.5,invert:!1,maxPxStep:NaN,range:[0,1]};function w3(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={data:t,resources:arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}},r=m3(e,v3,n),o=t.items||[],i={},a=[],s=[];function l(e,n){e.data=()=>t,e.datum=e=>o[i[e]],e.start=function(){return e.domain()[0]},e.end=function(){return e.domain()[e.domain().length-1]},e.labels=()=>s,e.ticks=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.scale=e,function(e){let{scale:t}=e;const n=t.domain(),r=t.data().items,o=t.labels?t.labels():n,i=t.bandwidth();return n.map(((e,n)=>{const a=t(e);return{position:a+i/2,label:"".concat(o[n]),data:r?r[n]:void 0,start:a,end:a+i}}))}(t,n.trackBy)}}const c=t5();l(c,e),c.pxScale=function(t){const n=r.maxPxStep;if(isNaN(n))return c;const o=c.domain().length,i=Math.max(1,o-c.paddingInner()+2*c.paddingOuter());if(i*n>=t)return c;const a=c.copy();a.type=c.type,l(a,e);const s=i*n/t,u=(1-s)*c.align();return a.range(r.invert?[s+u,u]:[u,s+u]),a};const u="function"==typeof e.value?e.value:e=>e.datum.value,d="function"==typeof e.label?e.label:e=>e.datum.label;for(let e=0;e<o.length;e++){const t=UZ({datum:o[e]},n),r=u(t,e);-1===a.indexOf(r)&&(a.push(r),s.push(d(t,e)),i[r]=e)}return c.domain(a),c.range(r.invert?r.range.slice().reverse():r.range),c.padding(isNaN(r.padding)?0:r.padding),isNaN(r.paddingInner)||c.paddingInner(r.paddingInner),isNaN(r.paddingOuter)||c.paddingOuter(r.paddingOuter),c.align(isNaN(r.align)?.5:r.align),c}const S3={depth:0};function C3(e,t,n){return e.ancestors().map((e=>t(UZ({datum:e.data},n)))).reverse().slice(1).toString()}const E3=e=>e.min(),k3=e=>e.max();function M3(e,t){const n=e&&!isNaN(e.min),r=e&&!isNaN(e.max);let o=n?+e.min:0,i=r?+e.max:1;if(t&&t.length){if(!n){const e=t.map(E3).filter(QZ);o=e.length?Math.min(...e):o}if(!r){const e=t.map(k3).filter(QZ);i=e.length?Math.max(...e):i}}return[o,i]}const R3={domain:[],range:[],invert:!1,min:NaN,max:NaN};function A3(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=x3(e,t,n).clamp(!0).interpolate(q5),o=m3(e,R3,{data:t,resources:n}),i=Array.isArray(o.domain)&&o.domain.length,a=Array.isArray(o.range)&&o.range.length,s=r;UZ(!0,s,r);const[l,c]=M3(o,t?t.fields:[]),u=i?o.domain.length:-1,d=n.theme?n.theme.palette("sequential",u>0?u:2):[],p=a?o.range:d;return s.range(o.invert?p.slice().reverse():p.slice()),s.domain(i?o.domain:function(e,t,n){const r=e.length;if(2===r)return[t,n];const o=[],i=(n-t)/(r-1);o.push(t);for(let e=1;e<r-1;e++)o.push(t+i*e);return o.push(n),o}(s.range(),l,c)),s}const I3={domain:[],range:[],invert:!1,min:NaN,max:NaN,nice:!1};function P3(e){const t=[];for(let n=0;n<e.length-1;n++)t.push((e[n]+e[n+1])/2);return t}const O3={domain:[],range:[]};const L3={domain:[],range:[],unknown:void 0},D3={domain:[],range:[],override:!1};const T3=u0();function z3(e,t,n){let r=e.data;e.source&&(n.logger.warn("Deprecated: Scale data source configuration"),r={extract:[]},(Array.isArray(e.source)?e.source:[e.source]).forEach((e=>{r.extract.push({field:e})})));const o=X2(r,t,n);let i,a=e.type||function(e){return e.root?"h-band":e.fields&&e.fields[0]?function(e){const t=e.map((e=>"dimension"===e.type()?"band":"linear"));return-1!==t.indexOf("linear")?"linear":"band"}(e.fields):"linear"}(o);return"color"===a&&(a=o.fields&&o.fields[0]&&"dimension"===o.fields[0].type()?"categorical-color":"sequential-color"),n.scale.has(a)&&(i=n.scale.get(a),i=i(e,o,{theme:n.theme,logger:n.logger}),i.type=a),i}T3("linear",x3),T3("band",w3),T3("h-band",(function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const o={data:n,resources:r},i=m3(t,v3,o);i.ticks=m3(t.ticks,S3,o),i.value="function"==typeof t.value?t.value:e=>e.datum.value,i.label="function"==typeof t.label?t.label:e=>e.datum.value;let a=w3(i);const{values:s,labels:l,items:c,ticks:u}=function(e,t,n){const r=t.ticks.depth,o=t.value,i=t.label,a=[],s=[],l={},c=[];let u=0;if(!e)return{values:a,labels:s,items:l,ticks:c};e.eachAfter((e=>{if(e.depth>0){const t=C3(e,o,n),d=e.leaves()||[e],p=o(UZ({datum:e.data},n)),h=i(UZ({datum:e.data},n)),f=Array.isArray(e.children),m={key:t,count:d.length,value:p,label:h,leftEdge:C3(d[0],o,n),rightEdge:C3(d[Math.max(d.length-1,0)],o,n),node:e};f?(a.push("SPACER_".concat(u,"_SPACER")),u++):(a.push(t),s.push(h)),(r<=0&&!f||e.depth===r)&&c.push(m),l[t]=m}}));const d=e.height-1;return d>0&&a.splice(-d),{values:a,labels:s,items:l,ticks:c}}(n.root,i,o),d=function(e){const t=String(e),n=c[t];return a(n?i.invert?n.rightEdge:n.leftEdge:t)};UZ(!0,d,a),d.bandwidth=function(e){const t=c[String(e)],n=a.bandwidth();if(t&&!t.isLeaf){const e=d(t.leftEdge),r=d(t.rightEdge);return Math.abs(e-r)+n}return n},d.step=function(e){const t=c[String(e)],n=t?t.count:1;let r=a.step();return r*=n,r},d.data=()=>n,d.datum=e=>{const t=c[String(e)];return t?t.node.data:null},d.copy=()=>e(t,n,r),d.labels=()=>l,d.ticks=()=>u.map((e=>{const t=d(e.key),n=d.bandwidth(e.key);return{position:t+n/2,label:e.label,data:e.node.data,start:t,end:t+n}}));const p=a.pxScale;return d.pxScale=function(e){return a=p(e),d},d.domain(s),d})),T3("sequential-color",A3),T3("threshold-color",(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=a3(),o=m3(e,I3,{data:t,resources:n}),i=Array.isArray(o.domain)&&o.domain.length,a=Array.isArray(o.range)&&o.range.length;function s(e){return eQ(e)?NaN:r(e)}Object.keys(r).forEach((e=>s[e]=r[e]));const l=t.fields,[c,u]=M3(o,l),d=i?o.domain.length:-1,p=n.theme?n.theme.palette("sequential",d>0?d:2):[];let h=a?o.range:p,f=[];return f=i?o.domain:o.nice?function(e,t,n){const r=2===e.length?10:Math.max(1,e.length),o=i3().domain([t,n]).nice(r).ticks(r);if(!e||!e.length)return o;const i=Math.max(0,e.length-1);for(;o.length>i;)o[0]-t<=n-o[o.length-1]?o.shift():o.pop();return o}(h,c,u):[c+(u-c)/2],h.length>f.length+1?f=function(e,t,n){const r=e.length;if(2===r)return[t+(n-t)/2];const o=[],i=(n-t)/r;for(let e=1;e<r;e++)o.push(t+i*e);return o}(h,c,u):h.length<f.length+1&&(h=function(e,t,n,r){n=e[0],r=e&&e.length>=2?e[e.length-1]:r;const o=A3().domain([n,r]).range(t);return[n,...P3(e),r].map((e=>o(e)))}(f,h,c,u)),s.data=()=>t,s.range(o.invert?h.slice().reverse():h),s.domain(f),s})),T3("categorical-color",(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=e5(),o={data:t,resources:n},i=m3(e,O3,o),a="function"==typeof e.value?e.value:e=>e.datum.value,s="function"==typeof e.label?e.label:e=>e.datum.label,l=t.items||[],c={},u=[],d=[];for(let e=0;e<l.length;e++){const t=UZ({datum:l[e]},o),n=a(t,e);-1===u.indexOf(n)&&(u.push(n),d.push(s(t,e)),c[n]=e)}return r.data=()=>t,r.labels=()=>d,r.label=e=>d[u.indexOf(e)],r.datum=e=>l[c[e]],r.range(i.range),Array.isArray(i.domain)&&i.domain.length?r.domain(i.domain):r.domain(u),r}(e,t,n),o=n.theme,i=m3(e,L3,{data:t,resources:n});let a;if(i.explicit=m3(e.explicit,D3,{data:t,resources:n}),a=Array.isArray(i.range)&&0!==i.range.length?i.range.slice():o?o.palette("categorical",r.domain().length).slice():[],i.unknown)r.unknown(i.unknown);else if(o&&o.palette("unknown")){let e=o.palette("unknown");r.unknown(e[0])}if(Array.isArray(i.explicit.domain)&&i.explicit.domain.length){const e=r.domain().slice(),t=i.explicit.domain,n=Array.isArray(i.explicit.range)?i.explicit.range:[],o=Math.floor(e.length/a.length);for(let e=1;e<o+1;e*=2)a=a.concat(a);if(i.explicit.override)for(let r=0;r<t.length;r++){const o=e.indexOf(t[r]);o>-1&&(a[o]=n[r])}else{const r=t.map(((t,r)=>[e.indexOf(t),t,n[r]])).sort(((e,t)=>e[0]-t[0]));r.forEach((t=>{const n=e.indexOf(t[1]);-1!==n&&a.splice(n,0,t[2])}))}a.length=e.length}return r.range(a),r}));var j3={};function N3(){N3.init.call(this)}j3.isObject=function(e){return"object"==typeof e&&null!==e},j3.isNumber=function(e){return"number"==typeof e},j3.isUndefined=function(e){return void 0===e},j3.isFunction=function(e){return"function"==typeof e};var q3=N3;N3.EventEmitter=N3,N3.prototype._events=void 0,N3.prototype._maxListeners=void 0,N3.defaultMaxListeners=10,N3.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},N3.prototype.setMaxListeners=function(e){if(!j3.isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},N3.prototype.emit=function(e){var t,n,r,o,i,a;if(this._events||(this._events={}),"error"===e&&!this._events.error)throw(t=arguments[1])instanceof Error?t:Error('Uncaught, unspecified "error" event.');if(n=this._events[e],j3.isUndefined(n))return!1;if(j3.isFunction(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(r=arguments.length,o=new Array(r-1),i=1;i<r;i++)o[i-1]=arguments[i];n.apply(this,o)}else if(j3.isObject(n)){for(r=arguments.length,o=new Array(r-1),i=1;i<r;i++)o[i-1]=arguments[i];for(r=(a=n.slice()).length,i=0;i<r;i++)a[i].apply(this,o)}return!0},N3.prototype.addListener=function(e,t){var n;if(!j3.isFunction(t))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,j3.isFunction(t.listener)?t.listener:t),this._events[e]?j3.isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,j3.isObject(this._events[e])&&!this._events[e].warned)&&((n=j3.isUndefined(this._maxListeners)?N3.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,j3.isFunction(console.error)&&console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),j3.isFunction(console.trace)&&console.trace()));return this},N3.prototype.on=N3.prototype.addListener,N3.prototype.once=function(e,t){if(!j3.isFunction(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},N3.prototype.removeListener=function(e,t){var n,r,o,i;if(!j3.isFunction(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(o=(n=this._events[e]).length,r=-1,n===t||j3.isFunction(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(j3.isObject(n)){for(i=o;i-- >0;)if(n[i]===t||n[i].listener&&n[i].listener===t){r=i;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},N3.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],j3.isFunction(n))this.removeListener(e,n);else if(Array.isArray(n))for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},N3.prototype.listeners=function(e){return this._events&&this._events[e]?j3.isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},N3.listenerCount=function(e,t){return e._events&&e._events[t]?j3.isFunction(e._events[t])?1:e._events[t].length:0};var F3={mixin:e=>(Object.keys(q3.prototype).forEach((t=>{e[t]=q3.prototype[t]})),q3.init(e),e)};function W3(){let e=0,t=0,n=0,r=0;n=n||e;const o={move(e){this.moveTo(n+e)},moveTo(i){const a=Math.max(e,Math.min(t-r,i));n!==a&&(n=a,o.emit("update"))},update(i){let a=!1;({min:e=e,max:t=t}=i),void 0!==i.viewSize&&i.viewSize!==r&&(r=i.viewSize,a=!0);const s=Math.max(e,Math.min(t-r,n));n!==s&&(n=s,a=!0),a&&o.emit("update")},getState:()=>({min:e,max:t,start:n,viewSize:r})};return F3.mixin(o),o}function B3(e,t){const n=e.min||0,r=e.max||0,o=e.viewSize||0,i=t||W3();return i.update({min:n,max:r,viewSize:o}),i}function $3(e,t){return e<=t}function H3(e,t){return e<t}function V3(e,t,n){let r=0;for(;r<e.length&&t>e[r];)++r;return e[r]===t&&n&&++r,r}function G3(){let e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=[];function o(){}return o.configure=function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{includeMax:r=!0,includeMin:o=!0}=n;e=r?$3:H3,t=o?$3:H3},o.add=e=>{let{min:t,max:n}=e;const o=V3(r,t),i=V3(r,n,!0),a=[o,i-o];o%2==0&&a.push(t),i%2==0&&a.push(n);const s=r.join(",");r.splice(...a);return s!==r.join(",")},o.remove=e=>{let{min:t,max:n}=e;const o=V3(r,t),i=V3(r,n,!0),a=[o,i-o];o%2==1&&a.push(t),i%2==1&&a.push(n);const s=r.join(",");r.splice(...a);return s!==r.join(",")},o.set=e=>{const t=r.join(",");r=[],Array.isArray(e)?e.forEach(o.add):o.add(e);return t!==r.join(",")},o.clear=()=>{const e=r.length>0;return r=[],e},o.containsValue=n=>function(e,t,n,r){const o=e.length;for(let i=1;i<o;i+=2)if(n(e[i-1],t)&&r(t,e[i]))return!0;return!1}(r,n,t,e),o.containsRange=e=>{let{min:t,max:n}=e;const o=V3(r,t,!0),i=V3(r,n);return o===i&&i%2==1},o.toggle=e=>o.containsRange(e)?o.remove(e):o.add(e),o.ranges=()=>{const e=[];for(let t=1;t<r.length;t+=2)e.push({min:r[t-1],max:r[t]});return e},o.configure(n),o}function U3(){let e=[];function t(){}return t.add=t=>-1===e.indexOf(t)&&(e.push(t),!0),t.remove=t=>{const n=e.indexOf(t);return-1!==n&&(e.splice(n,1),!0)},t.contains=t=>-1!==e.indexOf(t),t.values=()=>e.slice(),t.clear=()=>e=[],t.toString=()=>e.join(";"),t}const Y3={key:void 0,includeMin:!0,includeMax:!0};function K3(e){let{items:t,collection:n,vc:r}=e;const o={},i=[];let a,s;for(let e=0,i=t.length;e<i;e++){a=t[e].key,n[a]||(n[a]=r()),s=t[e].values||[t[e].value];for(let e=0;e<s.length;e++)n[a].add(s[e])&&(o[a]=o[a]||[],o[a].push(s[e]))}const l=Object.keys(o);for(let e=0,t=l.length;e<t;e++)a=l[e],i.push({id:a,values:o[a]});return i}function X3(e){let{items:t,collection:n}=e;const r={},o=[];let i,a;for(let e=0,o=t.length;e<o;e++)if(i=t[e].key,n[i]){a=t[e].values||[t[e].value];for(let e=0;e<a.length;e++)n[i].remove(a[e])&&(r[i]=r[i]||[],r[i].push(a[e]))}const s=Object.keys(r);for(let e=0,t=s.length;e<t;e++)i=s[e],o.push({id:i,values:r[i]});return o}function J3(e){const t={};let n,r;for(let o=0,i=e.length;o<i;o++){n=e[o].key,r=e[o].values||[e[o].value],t[n]||(t[n]=[]);for(let e=0;e<r.length;e++){-1===t[n].indexOf(r[e])&&t[n].push(r[e])}}return t}function Z3(e){let{key:t,collection:n,obj:r,fn:o,value:i}=e;n[t]||(n[t]=o()),r[t]=r[t]||[],r[t].push(i),n[t].add(i)}function Q3(e,t){const n=[],r=Object.keys(e);let o,i;const a=e=>-1===t[o].indexOf(e);for(let s=0,l=r.length;s<l;s++)o=r[s],t[o]?(i=e[o].filter(a),i.length&&n.push({id:o,values:i})):n.push({id:o,values:e[o]});return n}function e6(e,t,n){const r=function(e,t){if(!Object.keys(t).length)return e;const n=e.length,r=Array(n);for(let o=0;o<n;o++)r[o]=e[o].key in t?UZ({},e[o],{key:t[e[o].key]}):e[o];return r}(t,n);return e&&e.length?e.reduce(((e,t)=>t(e)),r):r}function t6(e){return e.replace(/(-[a-z])/g,(e=>e.toUpperCase().replace("-","")))}function n6(e){return e.replace(/([A-Z])/g,(e=>"-".concat(e.toLowerCase())))}function r6(e,t,n){let{ranges:r,interceptors:o,rc:i,aliases:a,rangeConfig:s}=n;const l=e6(o["".concat(t,"Ranges")],e,a);let c=!1;return l.forEach((e=>{const n=e.key;if(r[n]||(r[n]=i(s.sources[n]||s.default)),"set"===t)c=r[n][t](e.ranges||e.range)||c;else{const o=e.ranges||[e.range];for(let e=0;e<o.length;e++)c=r[n][t](o[e])||c}})),c}function o6(){let{vc:e=U3,rc:t=G3}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=!1,r={},o={},i={},a={sources:{},default:UZ({},Y3)};const s={addValues:[],removeValues:[],toggleValues:[],setValues:[],addRanges:[],setRanges:[],removeRanges:[],toggleRanges:[]},l=()=>{const e={values:{},ranges:{}};return Object.keys(o).forEach((t=>{e.values[t]=o[t].values()})),Object.keys(r).forEach((t=>{e.ranges[t]=r[t].ranges()})),e},c={ls:[],clear(){this.ls.forEach((e=>e.clear()))},start(){this.ls.forEach((e=>e.start()))},end(){this.ls.forEach((e=>e.end()))},update(){const e=l();this.ls.forEach((t=>t._state(e)))},updateValues(){const e=l();this.ls.forEach((t=>t._state({values:e.values})))},updateRanges(){const e=l();this.ls.forEach((t=>t._state({ranges:e.ranges})))}},u={configure:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Array.isArray(e.ranges)&&e.ranges.length&&(a={sources:{},default:UZ({},Y3)},e.ranges.forEach((e=>{const t={};Object.keys(Y3).filter((e=>"key"!==e)).forEach((n=>{t[n]=void 0!==e[n]?e[n]:Y3[n]})),void 0!==e.key?a.sources[e.key]=t:a.default=t})),Object.keys(r).forEach((e=>r[e].configure(a.sources[e]||a.default))),u.emit("update",[],[]))},link:e=>{if(u===e)throw new Error("Can't link to self");c.ls.push(e),e._state(l())},_state:e=>{if(!e)return l();if(e.values){const t=[];Object.keys(e.values).forEach((n=>{o[n]&&e.values[n].join(";")===o[n].toString()||t.push({key:n,values:e.values[n]})})),Object.keys(o).forEach((n=>{e.values[n]||t.push({key:n,values:[]})})),t.length&&u.setValues(t)}if(e.ranges){const t=[];Object.keys(e.ranges).forEach((n=>{r[n]&&e.ranges[n].join(";")===r[n].toString()||t.push({key:n,ranges:e.ranges[n]})})),Object.keys(r).forEach((n=>{e.ranges[n]||t.push({key:n,ranges:[]})})),t.length&&u.setRanges(t)}},start:function(){if(!n){n=!0;for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];u.emit("start",...t),c.start()}},end:function(){if(n){n=!1,r={},o={};for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];u.emit("end",...t),c.end()}},isActive:()=>n,clear:()=>{const e=u.brushes().filter((e=>"value"===e.type&&e.brush.values().length)).map((e=>({id:e.id,values:e.brush.values()}))),t=Object.keys(r).length>0||e.length;r={},o={},t&&(u.emit("update",[],e),c.clear())},brushes:()=>{let e=[];return e=e.concat(Object.keys(r).map((e=>({type:"range",id:e,brush:r[e]})))),e=e.concat(Object.keys(o).map((e=>({type:"value",id:e,brush:o[e]})))),e},addValue:(e,t)=>{u.addValues([{key:e,value:t}])},addValues:t=>{const r=e6(s.addValues,t,i),a=K3({vc:e,collection:o,items:r});u.emit("add-values",r),a.length&&(n||(n=!0,u.emit("start")),u.emit("update",a,[]),c.updateValues())}};return u.setValues=t=>{const r=e6(s.setValues,t,i),a=function(e){let{items:t,vCollection:n,vc:r}=e;const o={},i=J3(t);let a,s=[],l=[];const c={},u=Object.keys(n);for(let e=0,t=u.length;e<t;e++)a=u[e],c[a]=n[a].values().slice(),delete n[a];const d=e=>{n[a]&&n[a].contains(e)||Z3({key:a,value:e,collection:n,obj:o,fn:r})},p=Object.keys(i);for(let e=0,t=p.length;e<t;e++)a=p[e],i[a].forEach(d);return l=Q3(c,o),s=Q3(o,c),[s,l]}({items:r,vCollection:o,vc:e});u.emit("set-values",r),(a[0].length>0||a[1].length>0)&&(n||(n=!0,u.emit("start")),u.emit("update",a[0],a[1]),c.updateValues())},u.removeValue=(e,t)=>{u.removeValues([{key:e,value:t}])},u.removeValues=e=>{const t=e6(s.removeValues,e,i),n=X3({collection:o,items:t});u.emit("remove-values",t),n.length&&(u.emit("update",[],n),c.updateValues())},u.addAndRemoveValues=(t,r)=>{const a=e6(s.addValues,t,i),l=e6(s.removeValues,r,i),d=K3({vc:e,collection:o,items:a}),p=X3({collection:o,items:l});u.emit("add-values",a),u.emit("remove-values",l),(d.length||p.length)&&(n||(n=!0,u.emit("start")),u.emit("update",d,p),c.updateValues())},u.toggleValue=(e,t)=>{u.toggleValues([{key:e,value:t}])},u.toggleValues=t=>{const r=e6(s.toggleValues,t,i),a=function(e){let{items:t,values:n,vc:r}=e;const o={},i={},a=[],s=[],l=J3(t);let c,u,d;const p=Object.keys(l);for(let e=0,t=p.length;e<t;e++){c=p[e],d=l[c];for(let e=0,t=d.length;e<t;e++)u=d[e],n[c]&&n[c].contains(u)?n[c]&&n[c].contains(u)&&(i[c]=i[c]||[],i[c].push(u),n[c].remove(u)):Z3({key:c,value:u,collection:n,obj:o,fn:r})}const h=Object.keys(o);for(let e=0,t=h.length;e<t;e++)c=h[e],a.push({id:c,values:o[c]});const f=Object.keys(i);for(let e=0,t=f.length;e<t;e++)c=f[e],s.push({id:c,values:i[c]});return[a,s]}({items:r,values:o,vc:e});u.emit("toggle-values",r),(a[0].length>0||a[1].length>0)&&(n||(n=!0,u.emit("start")),u.emit("update",a[0],a[1]),c.updateValues())},u.containsValue=(e,t)=>{let n=i[e]||e;return!!o[n]&&o[n].contains(t)},u.addRange=(e,t)=>{u.addRanges([{key:e,range:t}])},u.addRanges=e=>{r6(e,"add",{ranges:r,rc:t,interceptors:s,aliases:i,rangeConfig:a})&&(n||(n=!0,u.emit("start")),u.emit("update",[],[]),c.updateRanges())},u.removeRange=(e,t)=>{u.removeRanges([{key:e,range:t}])},u.removeRanges=e=>{r6(e,"remove",{ranges:r,rc:t,interceptors:s,aliases:i,rangeConfig:a})&&(n||(n=!0,u.emit("start")),u.emit("update",[],[]),c.updateRanges())},u.setRange=(e,t)=>{u.setRanges([{key:e,range:t}])},u.setRanges=e=>{r6(e,"set",{ranges:r,rc:t,interceptors:s,aliases:i,rangeConfig:a})&&(n||(n=!0,u.emit("start")),u.emit("update",[],[]),c.updateRanges())},u.toggleRange=(e,t)=>{u.toggleRanges([{key:e,range:t}])},u.toggleRanges=e=>{r6(e,"toggle",{ranges:r,rc:t,interceptors:s,aliases:i,rangeConfig:a})&&(n||(n=!0,u.emit("start")),u.emit("update",[],[]),c.updateRanges())},u.containsRangeValue=(e,t)=>{let n=i[e]||e;return!!r[n]&&r[n].containsValue(t)},u.containsRange=(e,t)=>{let n=i[e]||e;return!!r[n]&&r[n].containsRange(t)},u.containsMappedData=(e,t,n)=>{let a=[];const s=Object.keys(e);let l,c,u,d;for(let t=0,n=s.length;t<n;t++){if(l=s[t],"value"===l)c=e,a[t]={key:"",i:t,bool:!1};else{if("source"===l)continue;c=e[l],a[t]={key:l,i:t,bool:!1}}u=c.source&&c.source.field,void 0!==u&&(void 0!==c.source.key&&(u="".concat(c.source.key,"/").concat(u)),u in i&&(u=i[u]),d=c.value,r[u]?a[t].bool=Array.isArray(d)?r[u].containsRange({min:d[0],max:d[1]}):r[u].containsValue(d):o[u]&&o[u].contains(d)&&(a[t].bool=!0))}return t?(a=a.filter((e=>-1!==t.indexOf(e.key))),"and"===n?!!a.length&&!a.some((e=>!1===e.bool)):"xor"===n?!!a.length&&a.some((e=>e.bool))&&a.some((e=>!1===e.bool)):a.some((e=>e.bool))):a.some((e=>e.bool))},u.intercept=(e,t)=>{const n=t6(e);s[n]&&s[n].push(t)},u.removeInterceptor=(e,t)=>{const n=t6(e);if(!s[n])return;const r=s[n].indexOf(t);-1!==r&&s[n].splice(r,1)},u.removeAllInterceptors=e=>{const t=[];if(e){const n=t6(e);s[n]&&s[n].length&&t.push({name:e,handlers:s[n]})}else Object.keys(s).forEach((e=>{s[e].length&&t.push({name:n6(e),handlers:s[e]})}));t.forEach((e=>{e.handlers.slice().forEach((t=>u.removeInterceptor(e.name,t)))}))},u.addKeyAlias=(e,t)=>{i[e]=t},u.removeKeyAlias=e=>{delete i[e]},F3.mixin(u),u}function i6(e){return e*e*e}function a6(e){return--e*e*e+1}function s6(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}u0();const l6=["stroke","fill","color","backgroundColor","thumbColor"];function c6(e,t){const n=t?t.length:0,r=e?Math.min(n,e.length):0,o=new Array(r),i=new Array(n);let a;for(a=0;a<r;++a)o[a]=u6(e[a],t[a]);for(;a<n;++a)i[a]=t[a];return function(e){for(a=0;a<r;++a)i[a]=o[a](e);return i}}function u6(e,t,n){const r=typeof t;let o;return null==t||"boolean"===r?function(e){return()=>e}(t):("number"===r?$5:"string"===r?(o=x5(t))&&l6.includes(n)?(t=o,q5):U5:t instanceof x5?q5:t instanceof Date?B5:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?F5:Array.isArray(t)?c6:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?d6:$5)(e,t)}function d6(e,t){const n={},r={};let o;for(o in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)o in e?n[o]=u6(e[o],t[o],o):r[o]=t[o];return function(e){for(o in n)r[o]=n[o](e);return r}}function p6(e,t){return e.data?e.data.value:"text"===e.type?e.text:t}const h6={fontFamily:"Arial",fontSize:"13px",color:"#595959",backgroundColor:"#ffffff",stroke:"#000000",strokeWidth:0,$fill:"#333333"},f6=/^\$/;function m6(e){const t=typeof e;return"object"!==t&&"function"!==t&&"undefined"!==t}function g6(e,t,n){const r=e[t];r&&r.scale&&r.scale.pxScale?r.scale=r.scale.pxScale(n):r&&r.pxScale&&(e[t]=r.pxScale(n))}function y6(e,t){return e.pxScale?e.pxScale(t):e}const _6={normalizeSettings:function(e,t,n){const r=UZ({},e),o=UZ({},t);return Object.keys(r).forEach((e=>{o[e]={};const i=r[e],a=typeof i;if("function"==typeof i)o[e].fn=i;else if(m6(i)){let n=t[e];"string"==typeof n&&f6.test(n)&&(n=h6[n]);const r=typeof n;o[e]="undefined"===r||r===a?i:n}else i&&"object"==typeof i&&("function"==typeof i.fn&&(o[e].fn=i.fn),void 0!==i.scale&&(o[e].scale=n.scale(i.scale)),"string"==typeof i.ref&&(o[e].ref=i.ref))})),Object.keys(t).forEach((e=>{if(e in r)return;const n=t[e];"string"===typeof n&&f6.test(n)?o[e]=h6[n]:o[e]=n})),o},resolveForItem:function(e,t,n){const r={},o=Object.keys(t),i=o.length,a=e.datum,s=e.datum;for(let l=0;l<i;l++){const i=o[l],c=t[i],u="object"==typeof s&&void 0!==c,d=u&&"string"==typeof c.ref,p=u&&i in s,h=d?s[c.ref]:p?s[i]:a;m6(c)?r[i]=c:u&&c.fn?(c.scale&&(e.scale=c.scale),r[i]=c.fn.call(null,e,n)):u&&c.scale&&h?(r[i]=c.scale(h.value),c.scale.bandwidth&&(r[i]+=c.scale.bandwidth()/2)):d&&h?r[i]=h.value:c.fn?r[i]=c.fn.call(null,e,n):r[i]=c}return r},updateScaleSize:g6};function b6(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce(((e,t)=>Array.isArray(t.children)?(e.push(...b6(t.children)),e):(e.push(t),e)),[])}function x6(e,t){let{context:n,data:r,style:o,filter:i,mode:a}=t;const s=e.chart.brush(n),l=r,c=o.active||{},u=o.inactive||{},d=[];Object.keys(c).forEach((e=>{d.push(e)})),Object.keys(u).forEach((e=>{-1===d.indexOf(e)&&d.push(e)}));const p=[];let h=!1;const f=()=>{let t=b6(e.nodes);return"function"==typeof i&&(t=t.filter(i)),t},m=()=>{const e=f(),t=e.length;let n,r=!1;const o="function"==typeof l?l({brush:s}):l;for(let r=0;r<t;r++){if(n=e[r].data,!n)continue;e[r].__style||(e[r].__style={},d.forEach((t=>{e[r].__style[t]=e[r][t]})));const t=s.containsMappedData(n,o,a),i=p.indexOf(e[r]);let l=!1;t&&-1===i?(p.push(e[r]),l=!0):t||-1===i||(p.splice(i,1),l=!0),e[r].needToUpdate=l||h,e[r].isActive=t}for(let o=0;o<t;o++)if(n=e[o].data,n){if(e[o].needToUpdate){const t=UZ({},e[o],e[o].__style),n=e[o].isActive;d.forEach((r=>{e[o][r]=n&&r in c?"function"==typeof c[r]?c[r].call(null,t,p):c[r]:!n&&r in u?"function"==typeof u[r]?u[r].call(null,t,p):u[r]:e[o].__style[r]})),r=!0}delete e[o].needToUpdate}return h=!1,r},g=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{suppressRender:!1};const{suppressRender:n}=t,r=f(),o=r.length;for(let e=0;e<o;e++)r[e].data&&(r[e].__style=r[e].__style||{},d.forEach((t=>{r[e].__style[t]=r[e][t],t in u&&(r[e][t]="function"==typeof u[t]?u[t].call(null,r[e]):u[t])})));h=!0,p.length=0,n||e.renderer.render(e.nodes)},y=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{suppressRender:!1};const{suppressRender:n}=t,r=f(),o=r.length;for(let e=0;e<o;e++)r[e].__style&&(Object.keys(r[e].__style).forEach((t=>{r[e][t]=r[e].__style[t]})),r[e].__style=void 0);p.length=0,n||e.renderer.render(e.nodes)},_=()=>{if(m()){const t="function"==typeof e.config.sortNodes?e.config.sortNodes(e):e.nodes;"function"==typeof e.config.customRender?e.config.customRender({render:e.renderer.render,nodes:t}):e.renderer.render(t)}};return s.on("start",g),s.on("end",y),s.on("update",_),{isActive:()=>s.isActive(),update:()=>{p.length=0,h=!0,m()},cleanUp:function(){s.removeListener("start",g),s.removeListener("end",y),s.removeListener("update",_)}}}function v6(e){let{nodes:t,action:n,chart:r,trigger:o}=e;const i=[];for(let e=0;e<t.length;e++){let n=t[e].data;null!==n&&i.push(n)}!function(e){let{dataPoints:t,action:n,chart:r,trigger:o}=e;if(!o)return;const i=o.data||[""];let a={items:[],actionFn:"toggleRanges"},s={items:[],actionFn:"toggleValues"};-1!==["add","remove","set","toggle"].indexOf(n)&&(a.actionFn="".concat(n,"Ranges"),s.actionFn="".concat(n,"Values"));for(let e=0;e<t.length;e++){const n=t[e];n&&i.forEach((e=>{let t=n&&!e?n:n[e];if(t){let e={key:t.source.field};void 0!==t.source.key&&(e.key="".concat(t.source.key,"/").concat(t.source.field)),Array.isArray(t.value)?(e.range={min:t.value[0],max:t.value[1]},a.items.push(e)):(e.value=t.value,s.items.push(e))}}))}o.contexts.forEach((e=>{a.items.length?r.brush(e)[a.actionFn](a.items):r.brush(e)[s.actionFn](s.items)}))}({dataPoints:i,action:n,chart:r,trigger:o})}function w6(e){let{collisions:t,t:n,config:r,action:o}=e,i=[],a=!1;t.length>0&&(i=t,a=!0,"stop"===n.propagation&&(i=[t[t.length-1]]));const s=i.map((e=>e.node));return v6({nodes:s,action:o,chart:r.chart,data:r.data,trigger:n}),a}function S6(e,t,n){const r=n.element().getBoundingClientRect();let o=ZZ(e)?function(e,t){return 1!==e.changedTouches.length?null:{x:e.changedTouches[0].clientX-t.left,y:e.changedTouches[0].clientY-t.top}}(e,r):function(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}(e,r);return null===o||o.x<0||o.y<0||o.x>r.width||o.y>r.height?[]:(t.touchRadius>0&&ZZ(e)?o={cx:o.x,cy:o.y,r:t.touchRadius}:t.mouseRadius>0&&!ZZ(e)&&(o={cx:o.x,cy:o.y,r:t.mouseRadius}),n.itemsAt(o))}function C6(e,t,n){return e?"function"==typeof e?e(t):e:n}const E6={fill:"fill",stroke:"stroke",opacity:"opacity",strokeWidth:"stroke-width",strokeLinejoin:"stroke-linejoin",fontFamily:"font-family",fontSize:"font-size",fontStyle:"font-style",textDecoration:"text-decoration",fontWeight:"font-weight",baseline:"dominant-baseline",dominantBaseline:"dominant-baseline",anchor:"text-anchor",textAnchor:"text-anchor",maxWidth:"maxWidth",transform:"transform",strokeDasharray:"stroke-dasharray",id:"id"};function k6(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n="";for(let t=0;t<e.length;t++){const r=e[t];n+=0===t?"M".concat(r.x," ").concat(r.y):"L".concat(r.x," ").concat(r.y),n+=" "}return t&&(n+="Z"),n}function M6(e,t,n,r){const o=n/2,i=e-r/2,a=t-r/2,s=e-o,l=t-o;return[{x:i,y:a},{x:i,y:l},{x:i+r,y:l},{x:i+r,y:a},{x:s+n,y:a},{x:s+n,y:a+r},{x:i+r,y:a+r},{x:i+r,y:l+n},{x:i,y:l+n},{x:i,y:a+r},{x:s,y:a+r},{x:s,y:a}]}function R6(e){return-e/180*Math.PI}function A6(e){return function(e){let t=(.5*(Math.floor(e/Math.PI*2)+2)+.25)*Math.PI,n=Math.cos(Math.abs(t-e))*Math.sqrt(2),r=n*Math.cos(e),o=n*Math.sin(e);return{x1:r<0?1:0,y1:o<0?1:0,x2:r>=0?r:r+1,y2:o>=0?o:o+1}}(R6(e))}function I6(e,t){return{x:e.x+t.x,y:e.y+t.y}}function P6(e,t){return{x:e.x-t.x,y:e.y-t.y}}function O6(e,t){return{x:e.x*t,y:e.y*t}}function L6(e,t){return e.x-t.x}function D6(e,t){return e.y-t.y}function T6(e,t){return L6(e,t)**2+D6(e,t)**2}function z6(e,t){return Math.sqrt(T6(e,t))}function j6(e,t){return e.x*t.x+e.y*t.y}function N6(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{x:0,y:0};const r=Math.cos(t),o=Math.sin(t),i=P6(e,n);return I6({x:r*i.x-o*i.y,y:o*i.x+r*i.y},n)}const q6={up:0,down:180,left:90,right:-90};function F6(e){let{x:t,y:n,size:r}=e;const o=r/2;return{type:"rect",x:t-o,y:n-o,width:r,height:r}}const W6=u0();W6.add("circle",(function(e){return{type:"circle",fill:"black",cx:e.x,cy:e.y,r:e.size/2}})),W6.add("diamond",(function(e){const t=e.size,n=e.x-t/2,r=e.y-t/2;return{type:"path",fill:"black",d:k6([{x:n,y:r+t/2},{x:n+t/2,y:r},{x:n+t,y:r+t/2},{x:n+t/2,y:r+t},{x:n,y:r+t/2}])}})),W6.add("saltire",(function(e){const t=R6(45),n=e.size/2,r=isNaN(e.width)?n/2:e.width,o=Math.min(r,n);let i=e.size;const a=Math.sin(Math.asin(-t))*(o/2);i+=2*(n/Math.sin(-t)-n),i-=2*a;const s={x:e.x,y:e.y},l=M6(e.x,e.y,i,o).map((e=>N6(e,t,s)));return{type:"path",fill:"black",d:k6(l)}})),W6.add("square",(function(e){const t=e.size;return{type:"rect",fill:"black",x:e.x-t/2,y:e.y-t/2,width:t,height:t}})),W6.add("triangle",(function(e){const t=e.size,n={x:e.x,y:e.y},r=q6[e.direction]||0,o=t/2,i=e.x-o,a=e.y-o;let s=[{x:i,y:a+t},{x:i+o,y:a},{x:i+t,y:a+t},{x:i,y:a+t}];const l=R6(r);return s=s.map((e=>N6(e,l,n))),{type:"path",fill:"black",d:k6(s)}})),W6.add("line",(function(e){const t="vertical"===e.direction,n=e.size/2,r=e.x,o=e.y;return{type:"line",stroke:"black",strokeWidth:1,x1:r-(t?0:n),y1:o-(t?n:0),x2:r+(t?0:n),y2:o+(t?n:0),collider:F6(e)}})),W6.add("star",(function(e){const t=e.size,n=[],r=t/2,o=e.points||5,i=Math.min(e.innerRadius||t/2,t)/2,a=isNaN(e.startAngle)?90:e.startAngle,s=360/o;for(let t=1;t<=o;t++){const o=s*t+a,l=R6(o),c=R6(o+s/2),u=Math.sin(l),d=Math.cos(l),p=Math.sin(c),h=Math.cos(c);n.push({x:e.x+d*r,y:e.y+u*r}),n.push({x:e.x+h*i,y:e.y+p*i})}return{type:"path",fill:"black",d:k6(n)}})),W6.add("n-polygon",(function(e){const t=[],n=e.size/2,r=Math.max(isNaN(e.sides)?6:e.sides,3),o=360/r,i=isNaN(e.startAngle)?0:e.startAngle;for(let a=1;a<=r;a++){const r=R6(o*a+i),s=Math.sin(r),l=Math.cos(r);t.push({x:e.x+l*n,y:e.y+s*n})}return{type:"path",fill:"black",d:k6(t)}})),W6.add("cross",(function(e){const t=e.x,n=e.y,r=e.size/2,o=isNaN(e.width)?r/2:e.width,i=Math.min(o,r);return{type:"path",fill:"black",d:k6(M6(t,n,e.size,i))}})),W6.add("bar",(function(e){const t={x:e.x,y:e.y},n="vertical"===e.direction,r=e.size/2,o=r/2/2;let i=[{x:t.x-r,y:t.y+o},{x:t.x-r,y:t.y-o},{x:t.x+r,y:t.y-o},{x:t.x+r,y:t.y+o}];if(n){const e=R6(90);i=i.map((n=>N6(n,e,t)))}const a=oQ(i);return a.type="rect",a.fill="black",a})),W6.add("rect",(function(e){const{x:t,y:n,size:r}=e,o=void 0===e.width?r:e.width,i=void 0===e.height?r:e.height;return{type:"rect",fill:"black",x:t-o/2,y:n-i/2,width:o,height:i}}));const B6=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:W6;return function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=e.get(t.type);if(n){const e=n(t);return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object.keys(t).forEach((n=>{void 0!==E6[n]&&"transform"!==n&&(e[n]=t[n])}))}(e,t),void 0!==t.data&&(e.data=t.data),e}return n}};function $6(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{dock:n="center",displayOrder:r=0,prioOrder:o=0,preferredSize:i=0,minimumLayoutMode:a,show:s=!0}=e;n=n||"center";return{computePreferredSize(e){let{inner:n,outer:r,children:o}=e;return"function"==typeof i?i({inner:n,outer:r,children:o,dock:this.dock()},t):i},dock(e){return void 0!==e?(n=e,this):"function"==typeof n?n(t):n},displayOrder(e){return void 0!==e?(r=e,this):"function"==typeof r?r(t):r},prioOrder(e){return void 0!==e?(o=e,this):"function"==typeof o?o(t):o},minimumLayoutMode(e){return void 0!==e?(a=e,this):"function"==typeof a?a(t):a},show(e){return void 0!==e?(s=e,this):"function"==typeof s?s(t):s}}}function H6(e,t,n){const{require:r=[]}=t,o=t.mediator||{},{settings:i,formatter:a,scale:s,data:l,renderer:c,chart:u,dockConfig:d,mediator:p,instance:h,rect:f,style:m,registries:g,resolver:y,update:_,_DO_NOT_USE_getInfo:b,symbol:x,isVisible:v}=n;e.emit=()=>{},v&&(e.isVisible=v),Object.defineProperty(e,"settings",{get:i}),Object.defineProperty(e,"data",{get:l}),Object.defineProperty(e,"formatter",{get:a}),Object.defineProperty(e,"scale",{get:s}),Object.defineProperty(e,"mediator",{get:p}),Object.defineProperty(e,"style",{get:m}),Object.defineProperty(e,"registries",{get:g}),f&&Object.defineProperty(e,"rect",{get:f}),b&&(e._DO_NOT_USE_getInfo=b),Object.keys(t).forEach((n=>{var r;r=n,["on","preferredSize","created","beforeMount","mounted","resize","beforeUpdate","updated","beforeRender","render","beforeUnmount","beforeDestroy","destroyed","defaultSettings","data","settings","formatter","scale","chart","dockConfig","mediator","style","resolver","registries","_DO_NOT_USE_getInfo","symbol","isVisible"].some((e=>e===r))||("function"==typeof t[n]?e[n]=t[n].bind(e):e[n]=t[n])})),r.forEach((t=>{"renderer"===t?Object.defineProperty(e,"renderer",{get:c}):"chart"===t?Object.defineProperty(e,"chart",{get:u}):"dockConfig"===t?Object.defineProperty(e,"dockConfig",{get:d}):"instance"===t?Object.defineProperty(e,"instance",{get:h}):"update"===t&&_?Object.defineProperty(e,"update",{get:_}):"resolver"===t?Object.defineProperty(e,"resolver",{get:y}):"symbol"===t&&Object.defineProperty(e,"symbol",{get:x})})),Object.keys(o).forEach((t=>{e.mediator.on(t,o[t].bind(e))}))}function V6(e,t,n){const r=t=>e[t]?(n.warn("Deprecation Warning the ".concat(t," property should be moved into layout: {} property")),e[t]):e.layout?e.layout[t]:void 0,o={};return o.displayOrder=r("displayOrder"),o.dock=r("dock"),o.prioOrder=r("prioOrder"),o.minimumLayoutMode=r("minimumLayoutMode"),e.layout=e.layout||{},e.layout.displayOrder=void 0!==o.displayOrder?o.displayOrder:e.layout.displayOrder,e.layout.prioOrder=void 0!==o.prioOrder?o.prioOrder:e.layout.prioOrder,e.layout.dock=o.dock||e.layout.dock,e.layout.minimumLayoutMode=o.minimumLayoutMode||e.layout.minimumLayoutMode,o.show=e.show,o.preferredSize=t,o}function G6(e,t,n){Object.keys(n.on||{}).forEach((r=>{e.eventListeners=e.eventListeners||[];const o=n.on[r].bind(e);e.eventListeners.push({event:r,listener:o}),t.on(r,o)})),e.emit=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.emit(e,...r)}}function U6(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{defaultSettings:n={},_DO_NOT_USE_getInfo:r=()=>({})}=e,{chart:o,container:i,mediator:a,registries:s,theme:l,renderer:c}=t,u=F3.mixin({});let d,p,h,f,m,g=t.settings||{},y=UZ(!0,{},n,g),_=[],b=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_6,n={};return{resolve:function(r){let{data:o,settings:i,defaults:a={},scaled:s}=r;const l=n.norm=t.normalizeSettings(i,a,e.chart),c={scale:e.chart.scale,formatter:e.chart.formatter};s&&Object.keys(s).forEach((e=>{l[e]&&t.updateScaleSize(l,e,s[e])}));const u=[];if(!o||!Array.isArray(o.items)){const e={data:o,resources:c};let r=t.resolveForItem(e,n.norm,-1);return{settings:n.norm,item:r}}{let e;for(let r=0,i=o.items.length;r<i;r++){e={datum:o.items[r],data:o,resources:c};let i=t.resolveForItem(e,n.norm,r);i.data=o.items[r],u.push(i)}}return{settings:n.norm,items:u}}}}({chart:o}),x=!1;const v={nodes:[],chart:o,config:y.brush||{},renderer:null},w={tap:[],over:[]},S=[],C={},E=UZ({},g);function k(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(){const o=void 0!==e[t],i=void 0!==g[t];let a;for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];return o&&("function"==typeof e[t]?a=e[t].call(C,...l):r&&(a=e[t])),i&&("function"==typeof g[t]?a=g[t].call(E,...l):r&&(a=g[t])),o||i||(a=n.call(C,...l)),a}}const M=k("preferredSize",(()=>0),!0),R=k("resize",(e=>{let{inner:t}=e;return t})),A=k("created"),I=k("beforeMount"),P=k("mounted"),O=k("beforeUnmount"),L=k("beforeUpdate"),D=k("updated"),T=k("beforeRender"),z=k("beforeDestroy"),j=k("destroyed"),N=e.render,q=()=>{y.brush&&(y.brush.consume||[]).forEach((e=>{e.context&&e.style&&S.push(x6(v,e))}))},F=()=>{y.brush&&(y.brush.trigger||[]).forEach((e=>{"over"===e.on?w.over.push(e):w.tap.push(e)}))};Object.defineProperty(v,"data",{get:()=>_});const W=y.renderer||e.renderer,B=W?c||s.renderer(W)():c||s.renderer()();"function"==typeof B.settings&&B.settings(y.rendererSettings),v.renderer=B;const $={resources:o.logger?{logger:o.logger()}:{}};let H=$6(V6(y,M,o.logger()),$);const V=e=>{e.key=y.key,e.element=B.element()},G=()=>{};G.dockConfig=()=>H,G.set=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e.settings&&(g=e.settings,y=UZ(!0,{},n,e.settings),H=$6(V6(y,M,o.logger()),$),v.config=y.brush||{}),y.scale&&(d=o.scale(y.scale)),y.data){const{rendererSettings:e}=y,t="function"==typeof(null==e?void 0:e.progressive)&&e.progressive(),n=X2(y.data,{dataset:o.dataset,collection:o.dataCollection},{logger:o.logger()},o.dataCollection);t?t.isFirst?(_=n,_.items&&(_.items=[...n.items])):_.items&&(_.items=[..._.items,...n.items||[]]):_=n}else _=d?d.data():[];"string"==typeof y.formatter||"object"==typeof y.formatter?p=o.formatter(y.formatter):d&&d.data().fields&&(p=d.data().fields[0].formatter()),m=l.style(y.style||{})},G.resize=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=R({inner:e,outer:t});f=n?B.size(n):B.size(e),E.rect=UZ(!0,{computedPhysical:f.computedPhysical,computedOuter:t.computed||t,computedInner:e.computed||e},e),f=UZ(!0,{computedOuter:t.computed||t,computedInner:e.computed||e},f)},G.getRect=()=>E.rect;const U=()=>{const e=B.renderArgs?B.renderArgs.slice(0):[],{rendererSettings:t}=y;let n=_;const r="function"==typeof(null==t?void 0:t.progressive)&&t.progressive();return _.items&&r&&(n=JZ(JZ({},_),{},{items:_.items.slice(r.start,r.end)})),e.push({data:n}),e};let Y,K,X;function J(e){const{rendererSettings:t}=y,n="function"==typeof(null==t?void 0:t.progressive)&&t.progressive();n?n.isFirst?v.nodes=[...e||[]]:v.nodes&&(v.nodes=[...v.nodes,...e||[]]):v.nodes=e}G.beforeMount=I,G.beforeRender=()=>{T({size:f})},G.render=()=>{const e=N.call(C,...U());J(e),B.render(e),Y=e,K=E.rect.computed},G.hide=()=>{G.unmount(),B.size({x:0,y:0,width:0,height:0}),B.clear()},G.beforeUpdate=()=>{L({settings:y,data:_})},G.update=()=>{X&&X.stop();const{rendererSettings:e,brush:t,animations:n}=y;if("function"==typeof(null==e?void 0:e.transform)&&e.transform())return B.render(),void(Y=null);const r=N.call(C,...U());J(r),S.forEach((e=>e.cleanUp())),S.length=0,w.tap=[],w.over=[],t&&(q(),F()),S.forEach((e=>{e.isActive()&&e.update()})),Y&&n&&("function"==typeof n.enabled?n.enabled():n.enabled)?(n.compensateForLayoutChanges&&n.compensateForLayoutChanges({currentNodes:Y,currentRect:E.rect.computed,previousRect:K}),X=function(e,t,n,r){let o,{old:i,current:a}=e,{renderer:s}=t,l=[],c={nodes:[],ips:[]},u={nodes:[],ips:[]},d={nodes:[],ips:[]},p=[],h=null;const f=n.trackBy||p6,m={start(){let e={};if(i.forEach(((t,n)=>{let r=f(t,n);e[r]=t})),a.forEach(((t,n)=>{let r=f(t,n);if(e[r]){if("path"===t.type&&t.points&&t.points.length>0&&"trend"!==t.data.source.key){const n=function(e,t){const n=e.points.filter((e=>!e.dummy)),r=t.points.filter((e=>!e.dummy)),o=r.map((e=>e.data.major.value)),i=n.filter((e=>o.includes(e.data.major.value))).map((e=>e.data.major.value)),a=n.filter((e=>i.includes(e.data.major.value))),s=r.filter((e=>i.includes(e.data.major.value)));return{old:a,current:s}}(e[r],t);d.ips.push(d6(UZ({},e[r],{points:n.old}),UZ({},t,{points:n.current}))),l.push(UZ({},e[r],{commonPoints:n.old}))}else d.ips.push(d6(e[r],t)),l.push(e[r]);d.nodes.push(t),e[r]=!1}else c.nodes.push(t),c.ips.push(d6(UZ({},t,{r:.001,opacity:0}),t))})),Object.keys(e).forEach((t=>{e[t]&&(u.nodes.push(e[t]),u.ips.push(d6(e[t],UZ({},e[t],{r:1e-4,opacity:0}))))})),p.push({name:"exiting",easing:i6,duration:200,tweens:u.ips,nodes:[...l]}),p.push({name:"updating",easing:s6,duration:400,tweens:d.ips,nodes:[]}),p.push({name:"entering",easing:a6,duration:200,tweens:c.ips,nodes:[...d.nodes]}),n.isMainComponent){var t;const e=null===(t=n.isMainComponent)||void 0===t?void 0:t.filterFn,o=e?l.filter(e).length:l.length,{isInit:i,shouldBeRemoved:a}=r.getValue("animations.updatingStageMeta");!1===i?(r.setValue("animations.updatingStageMeta.shouldBeRemoved",0===o),r.setValue("animations.updatingStageMeta.isInit",!0)):r.setValue("animations.updatingStageMeta.shouldBeRemoved",a&&0===o)}p.length&&(h=s.getScene(a),p[0].started=Date.now(),"undefined"!=typeof window&&(o=window.requestAnimationFrame(m.tick)))},tick(){let e=p[0];e||m.stop(),e.started||(e.started=Date.now());let t=(Date.now()-e.started)/e.duration,i=[],a=e.tweens.map((n=>n(e.easing(Math.min(1,t)))));const{adjustTweenedNodes:l}=n;if(l&&l(a),i.push(...a),i.push(...e.nodes),s.render(i),t>=1){p.shift();const{isInit:e,shouldBeRemoved:t}=r.getValue("animations.updatingStageMeta");p.length?"updating"===p[0].name&&t&&p.shift():(!0===e&&r.setValue("animations.updatingStageMeta.isInit",!1),m.stop())}o&&(o=window.requestAnimationFrame(m.tick))},stop(){o&&(window.cancelAnimationFrame(o),o=!1)},inProgress:()=>!!o,get targetScene(){return h}};return m}({old:Y,current:r},{renderer:B},n,o.storage),X.start()):B.render(r),Y=r,K=E.rect.computed,B.setKey&&"string"==typeof g.key&&B.setKey(g.key)},G.updated=D,G.destroy=()=>{G.unmount(),z(h),B.destroy(),j(),h=null};const Z=e=>{v.nodes=e,S.forEach((e=>{e.isActive()&&e.update()})),B.render(e)};return H6(C,e,{settings:()=>y,data:()=>_,scale:()=>d,formatter:()=>p,renderer:()=>B,chart:()=>o,dockConfig:()=>H,mediator:()=>a,instance:()=>E,rect:()=>E.rect,style:()=>m,update:()=>Z,registries:()=>s,resolver:()=>b,symbol:()=>B6(s.symbol)}),H6(E,g,{settings:()=>y,data:()=>_,scale:()=>d,formatter:()=>p,renderer:()=>B,chart:()=>o,dockConfig:()=>H,mediator:()=>a,style:()=>m,_DO_NOT_USE_getInfo:r.bind(C),isVisible:()=>x}),G.getBrushedShapes=function(e,t,n){const r=[];if(y.brush&&y.brush.consume){const i=o.brush(e),a=B.findShapes("*");y.brush.consume.filter((t=>t.context===e)).forEach((e=>{for(let o=0;o<a.length;o++){const s=a[o];s.data&&i.containsMappedData(s.data,n||e.data,t)&&(V(s),r.push(s),a.splice(o,1),o--)}}))}return r},G.findShapes=e=>{var t;const n=(null!==(t=X)&&void 0!==t&&t.inProgress()?X.targetScene:B).findShapes(e);for(let e=0,t=n.length;e<t;e++)V(n[e]);return n},G.shapesAt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=B.itemsAt(e);let r;r=t&&"stop"===t.propagation&&n.length>0?[n.pop().node]:n.map((e=>e.node));for(let e=0,t=r.length;e<t;e++)V(r[e]);return r},G.brushFromShapes=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.contexts=Array.isArray(t.contexts)?t.contexts:[];v6({nodes:e,action:t.action||"toggle",trigger:t,chart:o,data:v.data})},G.mount=()=>{h=B.element&&B.element()?h:B.appendTo(i),B.setKey&&"string"==typeof g.key&&B.setKey(g.key),y.brush&&(q(),F()),G6(E,u,g),G6(C,u,e),x=!0},G.mounted=()=>P(h),G.unmount=()=>{[E,C].forEach((e=>{!function(e,t){e.eventListeners&&(e.eventListeners.forEach((e=>{let{event:n,listener:r}=e;t.removeListener(n,r)})),e.eventListeners.length=0),e.emit=()=>{}}(e,u)})),w.tap=[],w.over=[],S.forEach((e=>{e.cleanUp()})),S.length=0,O(),x=!1},G.onBrushTap=e=>{w.tap.forEach((t=>{(function(e){let{e:t,t:n,config:r}=e;return w6({collisions:S6(t,n,r.renderer),t:n,config:r,action:C6(n.action,t,"toggle")})})({e:e,t:t,config:v})&&"stop"===t.globalPropagation&&o.toggleBrushing(!0)}))},G.onBrushOver=e=>{w.over.forEach((t=>{(function(e){let{e:t,t:n,config:r}=e;return w6({collisions:S6(t,n,r.renderer),t:n,config:r,action:C6(n.action,t,"set")})})({e:e,t:t,config:v})&&"stop"===t.globalPropagation&&o.toggleBrushing(!0)}))},G.def=C,G.ctx=E,G.renderer=()=>B,G.set({settings:g}),A(),G}function Y6(e){const t=UZ(!0,{},e),n={getAll:()=>t,getValue:(e,n)=>function(e,t,n){if(void 0===e||void 0===t)return n;const r=t.split(".");let o=e;for(let e=0;e<r.length;++e){const t=r[e];if(void 0===o[t])return n;o=o[t]}return o}(t,e,n),setValue:(e,n)=>function(e,t,n){if(void 0===e||void 0===t)return;const r=t.split("."),o=r[r.length-1];let i=e;for(let e=0;e<r.length-1;++e){const t=r[e];void 0===i[t]&&(i[t]=Number.isNaN(+r[e+1])?{}:[]),i=i[t]}void 0!==n?i[o]=n:delete i[o]}(t,e,n)};return n}function K6(e,t,n){const r=I6(function(e,t){const n=j6(e,t)/j6(t,t)||1;return{x:t.x*n,y:t.y*n}}(P6(n,e),P6(t,e)),e);return r}function X6(e,t,n){return z6(e,n)+z6(t,n)-z6(e,t)<1e-12}function J6(e,t){return e.x>=t.x&&e.x+e.width<=t.x+t.width&&e.y>=t.y&&e.y+e.height<=t.y+t.height}function Z6(e){return e.x1===e.x2&&e.y1===e.y2}function Q6(e){return e.width<=0||e.height<=0}function e4(e){return e.r<=0}function t4(e){return e.edges.length<=2}function n4(e,t){let n=!1;for(let r=0,o=t.edges.length;r<o;r++)if(n=c4(e,iQ(t.edges[r])),!0===n)return!0;return!1}function r4(e,t){let n=!1;const{numPolygons:r,polygons:o}=t;for(let t=0;t<r;t++){if(n=_4(e,o[t]),!0===n)return!0}return!1}function o4(e,t){if(e4(e))return!1;return T6({x:e.cx,y:e.cy},t)<=e.r**2}function i4(e,t){if(Q6(t)||e4(e))return!1;const n=t.width/2,r=t.height/2,o=t.x+n,i=t.y+r,a=e.r,s=e.cx,l=e.cy,c=Math.abs(s-o),u=Math.abs(l-i);if(c>n+a||u>r+a)return!1;if(c<=n||u<=r)return!0;return(c-n)**2+(u-r)**2<=a**2}function a4(e,t){if(e4(e)||Z6(t))return!1;const[n,r]=nQ(t);if(o4(e,n)||o4(e,r))return!0;const o={x:e.cx,y:e.cy},i=K6(n,r,o);return T6(i,o)<=e.r**2&&X6(n,r,i)}function s4(e,t){if(t4(t)||e4(e))return!1;if(l4(t,{x:e.cx,y:e.cy}))return!0;const n=t.edges.length;for(let r=0;r<n;r++){if(a4(e,iQ(t.edges[r])))return!0}return!1}function l4(e,t){if(t4(e)||!h4(e.boundingRect(),t))return!1;const{x:n,y:r}=t,o=e.vertices;let i,a,s,l,c;for(i=!1,l=-1,a=o.length,s=a-1;++l<a;s=l){if(o[l].x===n&&o[l].y===r)return!0;if(o[l].y===o[s].y&&o[l].y===r&&(n-o[l].x)*(n-o[s].x)<=0)return!0;if(o[l].y<r&&r<=o[s].y||o[s].y<r&&r<=o[l].y){if(c=(o[s].x-o[l].x)*(r-o[l].y)/(o[s].y-o[l].y)+o[l].x,n===c)return!0;n<c&&(i=!i)}}return i}function c4(e,t){if(t4(e))return!1;for(let n=0,r=e.edges.length;n<r;n++){if(m4(t,iQ(e.edges[n])))return!0}const[n,r]=nQ(t);return l4(e,n)||l4(e,r)}function u4(e,t){if(t4(e))return!1;for(let n=0,r=e.edges.length;n<r;n++){if(f4(t,iQ(e.edges[n])))return!0}const[n,r,o,i]=rQ(t);return l4(e,n)||l4(e,r)||l4(e,o)||l4(e,i)}function d4(e,t){return!Q6(e)&&!Q6(t)&&(e.x<=t.x+t.width&&t.x<=e.x+e.width&&e.y<=t.y+t.height&&t.y<=e.y+e.height)}function p4(e,t){if(Q6(e)||Q6(t))return!1;return[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}].every((t=>h4(e,t)))}function h4(e,t){return!Q6(e)&&(t.x>=e.x&&t.x<=e.x+e.width&&t.y>=e.y&&t.y<=e.y+e.height)}function f4(e,t){if(Z6(t)||Q6(e))return!1;const[n,r]=nQ(t);if(h4(e,n)||h4(e,r))return!0;const o=rQ(e);let i=o.length;for(let e=0;e<i;e++){if(m4(iQ([o[e],o[3!==e?e+1:0]]),t))return!0}return!1}function m4(e,t){const[n,r]=nQ(e),[o,i]=nQ(t),a=L6(r,n),s=D6(r,n),l=L6(i,o),c=D6(i,o),u=L6(n,o),d=D6(n,o);let p=c*a-l*s;const h=l*d-c*u,f=a*d-s*u;let m,g;if(0===a&&0===s)return!1;if(0===l&&0===c)return!1;if(0===p){if(0===h&&0===f){if(0===a){if(0===s)return n.x===r.x&&n.y===r.y;m=D6(o,n)/s,g=D6(i,n)/s}else m=(o.x-n.x)/a,g=(i.x-n.x)/a;return!(m<0&&g<0||m>1&&g>1)}return!1}const y=h/p;return p=f/p,y>=0&&y<=1&&p>=0&&p<=1}function g4(e,t){if(Z6(e))return!1;const[n,r]=nQ(e);return X6(n,r,t)}function y4(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!d4(n,r)&&(p4(n,r)?n4(e,t):n4(t,e))}function _4(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!d4(n,r)&&(p4(r,n)?function(e,t){let n=!1;const{numPolygons:r,polygons:o}=e;for(let e=0;e<r;e++)if(n=y4(t,o[e]),!0===n)return!0;return!1}(e,t):function(e,t){let n=!1;for(let r=0,o=t.edges.length;r<o;r++)if(n=v4(e,iQ(t.edges[r])),!0===n)return!0;return!1}(e,t))}function b4(e,t){if(e4(e))return!1;if(x4(t,{x:e.cx,y:e.cy}))return!0;const{numPolygons:n,polygons:r}=t;for(let t=0;t<n;t++){const n=r[t],o=n.edges.length;for(let t=0;t<o;t++){if(a4(e,iQ(n.edges[t])))return!0}}return!1}function x4(e,t){if(!h4(e.boundingRect(),t))return!1;const{x:n,y:r}=t,o=e.numPolygons;let i,a,s,l,c,u,d=!1;for(a=0;a<o;a++)for(i=e.vertices[a],c=-1,s=i.length,l=s-1;++c<s;l=c){if(i[c].x===n&&i[c].y===r)return!0;if(i[c].y===i[l].y&&i[c].y===r&&(n-i[c].x)*(n-i[l].x)<=0)return!0;if(i[c].y<r&&r<=i[l].y||i[l].y<r&&r<=i[c].y){if(u=(i[l].x-i[c].x)*(r-i[c].y)/(i[l].y-i[c].y)+i[c].x,n===u)return!0;n<u&&(d=!d)}}return d}function v4(e,t){const[n,r]=nQ(t);if(x4(e,n)||x4(e,r))return!0;const{numPolygons:o,polygons:i}=e;for(let e=0;e<o;e++){const n=i[e];for(let e=0,r=n.edges.length;e<r;e++){if(m4(t,iQ(n.edges[e])))return!0}}return!1}function w4(e,t){const[n,r,o,i]=rQ(t);if(x4(e,n)||x4(e,r)||x4(e,o)||x4(e,i))return!0;const{numPolygons:a,polygons:s}=e;for(let e=0;e<a;e++){const n=s[e];for(let e=0,r=n.edges.length;e<r;e++){if(f4(t,iQ(n.edges[e])))return!0}}return!1}const S4=/^\$/,C4="@extend";function E4(e){throw new Error('Cyclical reference for "'.concat(e,'"'))}function k4(e,t,n){if("string"==typeof e){let r=t[e];return-1!==n.indexOf(e)&&E4(e),S4.test(r)?(n.push(e),k4(r,t,n)):r}let r=e;const o=UZ(!0,{},t,e),i={};if(e[C4]){const i=e[C4];-1!==n.indexOf(i)&&E4(i);let a=n.slice();a.push(i),r=UZ(!0,{},k4(o[i],t,a),e)}return Object.keys(r).forEach((e=>{let t=n.slice();if(e===C4||S4.test(e))return;i[e]=r[e];let a=i[e];S4.test(a)&&a in o?(-1!==n.indexOf(a)&&E4(a),t.push(a),a=o[a],"object"==typeof a||S4.test(a)&&a in o?i[e]=k4(a,o,t):i[e]=a):"object"==typeof a&&(i[e]=k4(a,o,t))})),i}function M4(e,t){return k4(e,t,[])}function R4(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={},n=e;const r=e=>{e.forEach((e=>{const n=Array.isArray(e.colors[0])?e.colors:[e.colors];t[e.key]={colors:n,sizes:n.map((e=>e?e.length:0))}}))},o={palette:(e,n)=>((e,n)=>{const r=t[e];if(!r)return[];const o=r.sizes;for(let e=0;e<o.length;e++)if(n<=o[e])return r.colors[e];return r.colors[o.length-1]})(e,n),setPalettes:r,style:e=>M4(e,n),setStyle:t=>{n=UZ({},e,t)}};return r(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]),o}function A4(e){e.x=Math.floor(e.x),e.y=Math.floor(e.y),e.width=Math.floor(e.width),e.height=Math.floor(e.height)}function I4(e){const t={center:{minWidthRatio:.5,minHeightRatio:.5,minWidth:0,minHeight:0}};return UZ(!0,t,e),t.center.minWidthRatio=Math.min(Math.max(t.center.minWidthRatio,0),1),t.center.minHeightRatio=Math.min(Math.max(t.center.minHeightRatio,0),1),t.center.minWidth=Math.max(t.center.minWidth,0),t.center.minHeight=Math.max(t.center.minHeight,0),t}function P4(e,t,n,r,o){return{x:isNaN(e)?0:e,y:isNaN(e)?0:t,width:isNaN(e)?0:n,height:isNaN(e)?0:r,margin:isNaN(o)?0:o}}function O4(e,t,n){if(void 0===e.cachedSize){const r=e.config.dock();let o,i=e.comp.preferredSize({inner:t,outer:n,dock:r});isNaN(i)?i&&!isNaN(i.size)&&(i.width=i.size,i.height=i.size):i={width:i,height:i},o="top"===r||"bottom"===r?i.height:"right"===r||"left"===r?i.width:Math.max(i.width,i.height),e.cachedSize=Math.ceil(o),e.edgeBleed=i.edgeBleed||0}return e.cachedSize}function L4(e,t){switch(t.config.dock()){case"top":e.y+=t.cachedSize,e.height-=t.cachedSize;break;case"bottom":e.height-=t.cachedSize;break;case"left":e.x+=t.cachedSize,e.width-=t.cachedSize;break;case"right":e.width-=t.cachedSize}}function D4(e,t){const n=t.edgeBleed;n&&(e.left=Math.max(e.left,n.left||0),e.right=Math.max(e.right,n.right||0),e.top=Math.max(e.top,n.top||0),e.bottom=Math.max(e.bottom,n.bottom||0))}function T4(e,t,n){t.x<n.left&&(t.width-=n.left-t.x,t.x=n.left);const r=e.width-(t.x+t.width);r<n.right&&(t.width-=n.right-r),t.y<n.top&&(t.height-=n.top-t.y,t.y=n.top);const o=e.height-(t.y+t.height);o<n.bottom&&(t.height-=n.bottom-o)}function z4(e,t,n,r,o){const i=UZ({},t),a=UZ({},n);L4(i,r),D4(a,r),T4(e,i,a);const s=function(e,t,n){const r=Math.min(n.center.minWidth,e.width)||Math.max(e.width*n.center.minWidthRatio,1),o=Math.min(n.center.minHeight,e.height)||Math.max(e.height*n.center.minHeightRatio,1);return t.width>=r&&t.height>=o}(e,i,o);return!!s&&(L4(t,r),D4(n,r),!0)}function j4(e){return{x:e.margin.left+e.x*e.scaleRatio.x,y:e.margin.top+e.y*e.scaleRatio.y,width:e.width*e.scaleRatio.x,height:e.height*e.scaleRatio.y}}function N4(e){return oQ([].concat(...e.map(rQ)))}function q4(e){let{visible:t,layoutRect:n,reducedRect:r,containerRect:o,translation:i}=e;const a=P4(r.x,r.y,r.width,r.height),s=P4(r.x,r.y,r.width,r.height),l={},c=t.slice(),u=c.slice().sort(((e,t)=>e.config.displayOrder()-t.config.displayOrder()));return t.sort(((e,t)=>{if(e.referencedDocks.length>0&&t.referencedDocks.length>0)return 0;if(t.referencedDocks.length>0)return-1;if(e.referencedDocks.length>0)return 1;const n=e.config.displayOrder()-t.config.displayOrder();return 0===n?c.indexOf(e)-c.indexOf(t):n})).forEach((e=>{let t={},c={};switch(e.config.dock()){case"top":t.height=c.height=e.cachedSize,t.width=n.width,c.width=a.width,t.x=n.x,c.x=a.x,t.y=c.y=a.y-e.cachedSize,a.y-=e.cachedSize,a.height+=e.cachedSize;break;case"bottom":t.x=n.x,c.x=a.x,t.y=c.y=a.y+a.height,t.width=n.width,c.width=a.width,t.height=c.height=e.cachedSize,a.height+=e.cachedSize;break;case"left":t.x=c.x=s.x-e.cachedSize,t.y=n.y,c.y=s.y,t.width=c.width=e.cachedSize,t.height=n.height,c.height=s.height,s.x-=e.cachedSize,s.width+=e.cachedSize;break;case"right":t.x=c.x=s.x+s.width,t.y=n.y,c.y=s.y,t.width=c.width=e.cachedSize,t.height=n.height,c.height=s.height,s.width+=e.cachedSize;break;case"center":t.x=c.x=r.x,t.y=c.y=r.y,t.width=c.width=r.width,t.height=c.height=r.height;break;default:if(e.referencedDocks.length>0){const n=e.referencedDocks.map((e=>l[e])).filter((e=>!!e));n.length>0&&(t=N4(n.map((e=>e.outerRect))),c=N4(n.map((e=>e.r))))}}e.key&&(l[e.key]={r:c,outerRect:t}),function(e,t,n,r){const o={x:r.width/n.width,y:r.height/n.height},i={left:0,top:0};if(n.preserveAspectRatio){const e=o.x<o.y,t=Math.min(o.x,o.y);o.x=t,o.y=t;const a=e?"height":"width",s=(r[a]-n[a]*o.x)*n.align;i.left=e?0:s,i.top=e?s:0}e.scaleRatio=o,e.margin=i,t.scaleRatio=o,t.margin=i,n.scaleRatio=o,n.margin=i}(c,t,n,o),c.edgeBleed=e.edgeBleed,c.computed=j4(c),t.edgeBleed=e.edgeBleed,t.computed=j4(t),c.x+=i.x,c.y+=i.y,t.x+=i.x,t.y+=i.y,e.comp.resize(c,t),e.cachedSize=void 0,e.edgeBleed=void 0})),u}function F4(e,t,n){const r=e.layoutModes||{},o=t.minimumLayoutMode();let i=t.show();return i&&"object"==typeof o?i=r[o.width]&&r[o.height]&&n.width>=r[o.width].width&&n.height>=r[o.height].height:i&&void 0!==o&&(i=r[o]&&n.width>=r[o].width&&n.height>=r[o].height),i}function W4(e){if(!e.resize||"function"!=typeof e.resize)throw new Error("Component is missing resize function");if(!e.dockConfig&&!e.preferredSize)throw new Error("Component is missing preferredSize function")}function B4(e){let t=I4(e);const n={};return n.layout=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!e||isNaN(e.x)||isNaN(e.y)||isNaN(e.width)||isNaN(e.height))throw new Error("Invalid rect");if(!n.length)return{visible:[],hidden:[],ordered:[]};const{logicalContainerRect:r,containerRect:o}=function(e,t){const n={x:0,y:0,width:0,height:0},r={x:0,y:0,width:0,height:0};return n.width=e.width||0,n.height=e.height||0,void 0!==t.size&&(n.width=isNaN(t.size.width)?n.width:t.size.width,n.height=isNaN(t.size.height)?n.height:t.size.height),void 0!==t.logicalSize?(r.width=isNaN(t.logicalSize.width)?n.width:t.logicalSize.width,r.height=isNaN(t.logicalSize.height)?n.height:t.logicalSize.height,r.align=isNaN(t.logicalSize.align)?.5:Math.min(Math.max(t.logicalSize.align,0),1),r.preserveAspectRatio=t.logicalSize.preserveAspectRatio):(r.width=n.width,r.height=n.height,r.preserveAspectRatio=!1),A4(r),A4(n),{logicalContainerRect:r,containerRect:n}}(e,t),[i,a]=function(e,t,n){const r=[],o=[];for(let i=0;i<e.length;++i){const a=e[i];W4(a);let s=a.dockConfig;const l=a.key,c=s.dock(),u=/@/.test(c)?c.split(",").map((e=>e.replace(/^\s*@/,""))):[];F4(t,s,n)?r.push({comp:a,key:l,config:s,referencedDocks:u}):o.push({comp:a,key:l,config:s,referencedDocks:u})}return[r,o]}(n,t,r),s=function(e){let{layoutRect:t,visible:n,hidden:r,settings:o}=e;const i=P4(t.x,t.y,t.width,t.height),a={left:0,right:0,top:0,bottom:0},s=n.slice();s.sort(((e,t)=>e.config.prioOrder()-t.config.prioOrder()));for(let e=0;e<s.length;++e){const n=s[e];O4(n,i,t),z4(t,i,a,n,o)||(r.push(s.splice(e,1)[0]),--e)}!function(e,t){if(0!==t.length)for(let n=0;n<e.length;++n){let r=e[n];if(r.referencedDocks.length){const o=r.referencedDocks.every((e=>t.some((t=>t.key===e))));o&&t.push(e.splice(n,1)[0])}}}(n,r);const l=n.filter((e=>-1!==s.indexOf(e)));return n.length=0,n.push(...l),T4(t,i,a),i}({layoutRect:r,visible:i,hidden:a,settings:t}),l=q4({visible:i,layoutRect:r,reducedRect:s,containerRect:o,translation:{x:e.x,y:e.y}});return a.forEach((e=>{e.comp.visible=!1;const t=P4();e.comp.resize(t,t)})),{visible:i.map((e=>e.comp)),hidden:a.map((e=>e.comp)),ordered:l.map((e=>e.comp))}},n.settings=function(e){t=I4(e)},n}const $4=(e,t)=>{for(let n=0;n<e.length;n++){const r=e[n];if(r.hasKey&&r.key===t)return e[n]}return null},H4=e=>null==e?void 0:e.map((e=>{const t=e.instance.dockConfig();return{preferredSize:n=>t.computePreferredSize(JZ(JZ({},n),{},{children:H4(e.children)}))}})),V4=(e,t)=>({visible:[],hidden:t,ordered:[]}),G4=e=>(t,n)=>{var r;const o=n.map(((e,t)=>{const n=e.instance.dockConfig();return{index:t,key:e.key,dockConfig:n,resize:e.instance.resize,preferredSize:t=>n.computePreferredSize(JZ(JZ({},t),{},{children:H4(e.children)}))}})),i=e=>n[e.index],{visible:a=o,hidden:s=[],ordered:l=a}=null!==(r=e(t,o))&&void 0!==r?r:{};return{visible:a.map(i),hidden:s.map(i),ordered:l.map(i)}},U4=e=>"function"==typeof e?G4(e):(e=>{const t=B4(e);return G4(((e,n)=>t.layout(e,n)))})(e);function Y4(e,t,n){const r=t.left-n.left,o=t.top-n.top,i=aQ(e),a=UZ(!0,{},e);switch(i){case"circle":a.cx+=r,a.cy+=o;break;case"polygon":for(let e=0,t=a.vertices.length;e<t;e++){const t=a.vertices[e];t.x+=r,t.y+=o}break;case"geopolygon":for(let e=0;e<a.vertices.length;e++){const t=a.vertices[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n.x+=r,n.y+=o}}break;case"line":a.x1+=r,a.y1+=o,a.x2+=r,a.y2+=o;break;case"point":case"rect":a.x+=r,a.y+=o}return a}function K4(e,t){const n=[];let r=0;t.forEach((e=>{n.push(r),r++;const t=e.instance.def.additionalElements&&e.instance.def.additionalElements();t&&(r+=t.length)})),t.forEach(((t,r)=>((e,t,n)=>{const r=t.instance.renderer().element();if(isNaN(n)||!r||!e||!e.children)return;const o=e.children[Math.max(0,n)];if(r===o)return;const i=t.instance.def.additionalElements&&t.instance.def.additionalElements().filter(Boolean);e.insertBefore&&void 0!==o?(e.insertBefore(r,o),i&&i.forEach((t=>{e.insertBefore(t,r)}))):(i&&i.forEach((t=>{e.appendChild(t,r)})),e.appendChild(r))})(e,t,n[r])))}function X4(e,t){let{element:n,data:r=[],settings:o={},on:i={}}=e;const a=t.registries,s=t.logger,l=R4(t.style,t.palettes),c=[],u=UZ({},e),d=function(){const e={};return F3.mixin(e),e}();let p=[],h=null,f=null,m=null,g=[],y=()=>{},_=()=>{};const b={};let x=!1;const v=function(e){let{createComponent:t}=e;const n={};let r=[],o=[];const i=e=>{const n=t(e);return n&&(r.push(n),e.components&&(n.children=e.components.map((e=>i(e))).filter((e=>!!e)))),n},a=e=>{const t=r.indexOf(e);-1!==t&&r.splice(t,1)},s=(e,t)=>{for(let n=e.length-1;n>=0;n--){const r=e[n],o=t.find((e=>r.hasKey&&r.key===e.key));o?r.children&&o.components&&s(r.children,o.components):(e.splice(n,1),a(r),r.children&&s(r.children,[]),r.instance.destroy())}},l=e=>{let{compList:t,data:n,excludeFromUpdate:r,formatters:o,scales:a,settingsList:s}=e;return s.map((e=>{const s=$4(t,e.key);return r.indexOf(e.key)>-1?(delete s.updateWith,s):s?(e.rendererSettings&&"function"==typeof s.instance.renderer().settings&&s.instance.renderer().settings(e.rendererSettings),e.rendererSettings&&"function"==typeof e.rendererSettings.transform&&e.rendererSettings.transform()?(s.applyTransform=!0,s):(s.updateWith={formatters:o,scales:a,data:n,settings:e},e.components&&(s.children=l({compList:s.children||[],data:n,excludeFromUpdate:r,formatters:o,scales:a,settingsList:e.components})),s)):i(e)})).filter((e=>!!e))},c=e=>{let{components:t,hidden:n,layoutFn:r,ordered:o,rect:i,visible:a}=e;const{visible:s,hidden:l,ordered:u}=r(i,t);a.push(...s),n.push(...l),o.push(...u),s.forEach((e=>{if(e.children){var t,r;const i=U4(null!==(t=null===(r=e.settings)||void 0===r?void 0:r.strategy)&&void 0!==t?t:{});c({components:e.children,hidden:n,layoutFn:i,ordered:o,rect:e.instance.getRect(),visible:a})}})),l.forEach((e=>{e.children&&c({components:e.children,hidden:n,layoutFn:V4,ordered:o,rect:null,visible:a})}))};return n.destroy=()=>{r.forEach((e=>e.instance.destroy())),r=[],o=[]},n.findComponentByKey=e=>$4(r,e),n.forEach=e=>{r.forEach(e)},n.layout=e=>{let{layoutSettings:t,rect:n}=e;const r=[],i=[],a=[],s=U4(t);return c({components:o,hidden:i,layoutFn:s,ordered:a,rect:n,visible:r}),{visible:r,hidden:i,ordered:a}},n.set=e=>{let{components:t}=e;o=t.map((e=>i(e))).filter((e=>!!e))},n.update=e=>{let{components:t,data:n,excludeFromUpdate:r,formatters:i,scales:a}=e;s(o,t),o=l({compList:o,data:n,excludeFromUpdate:r,formatters:i,scales:a,settingsList:t})},n}({createComponent:e=>{if(!a.component.has(e.type))return s.warn("Unknown component: ".concat(e.type)),!1;return{instance:U6(a.component(e.type),{settings:e,chart:u,mediator:d,registries:a,theme:l,container:n}),settings:UZ(!0,{},e),key:e.key,hasKey:void 0!==e.key}}});function w(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};return function(){const r="function"==typeof e[t];let o;for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return o=r?e[t].call(u,...a):n.call(u,...a),o}}const S=()=>{let e;o.dockLayout?(s.warn('Deprecation Warning: "dockLayout" property should be renamed to "strategy"'),e=o.dockLayout):e=o.strategy;const t=function(e){if("function"==typeof e.getBoundingClientRect){const{width:t,height:n}=e.getBoundingClientRect();return{x:0,y:0,width:t,height:n}}return{x:0,y:0,width:0,height:0}}(n);return v.layout({layoutSettings:e,rect:t})},C=w("created"),E=w("beforeMount"),k=w("mounted"),M=w("beforeUpdate"),R=w("updated"),A=w("beforeRender"),I=w("beforeDestroy"),P=w("destroyed"),O=function(e,t){let{partialData:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{formatters:r={},scales:o={},scroll:i={}}=t;y=function(e,t){let{types:n,logger:r}=t;const o={},i=[];return Array.isArray(e)?i.push(...e):(r.warn('Deprecated: "data-source" configuration"'),i.push(e)),i.forEach(((e,t)=>{let i=n(e.type);if(i){let n=e.key;void 0===e.key&&(r.warn("Missing key for dataset. Using index '".concat(t,"' as key.")),n=t);let a=i({key:n,data:e.data,config:e.config});o[n]=a}})),e=>e?o[e]:o[Object.keys(o)[0]]}(e,{logger:s,types:a.data}),n||Object.keys(b).forEach((e=>b[e].clear())),t.palettes&&l.setPalettes(t.palettes),t.style&&l.setStyle(t.style),_=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:X2;const o={};return(e||[]).forEach((e=>{if(!e.key)throw new Error('Data collection is missing "key" property');if("object"==typeof e.data&&"collection"in e.data)throw new Error("Data config for collections may not reference other collections");o[e.key]=()=>r(e.data,t,n)})),e=>{let t,n;if("string"==typeof e?t=e:"object"==typeof e&&(t=e.key,n=e),!(t in o))throw new Error("Unknown data collection: ".concat(t));"function"==typeof o[t]&&(o[t]=o[t]());let r=o[t];if(n&&n.fields&&n.fields.filter){let e=r.fields.filter(n.fields.filter);r.fields.length!==e.length&&(r=UZ(r,{fields:e}))}return r}}(t.collections,{dataset:y},{logger:s});const c={theme:l,logger:s};h=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:z3;const o={};return{get(i){let a;return"string"==typeof i&&e[i]?a=i:"object"==typeof i&&"scale"in i&&e[i.scale]&&(a=i.scale),a?(o[a]=o[a]||r(e[a],t,n),o[a]):r(i,t,n)},all(){return Object.keys(e).forEach(this.get),o}}}(o,{dataset:y,collection:_},JZ(JZ({},c),{},{scale:a.scale})),f=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:J2;const o={};return{get(i){let a;return"string"==typeof i&&e[i]?a=i:"object"==typeof i&&"formatter"in i&&e[i.formatter]?a=i.formatter:"object"==typeof i&&"type"in i&&e[i.type]&&(a=i.type),a?(o[a]=o[a]||r(e[a],t,n),o[a]):r(i||{},t,n)},all(){return Object.keys(e).forEach(this.get),o}}}(r,{dataset:y,collection:_},JZ(JZ({},c),{},{formatter:a.formatter})),m=function(e,t){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=B3(e[r],t?t[r]:null));return n}(i,m)};function L(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={},r=e.filter((e=>!!e.key)).map((e=>e.key));g.forEach((e=>{e.key&&-1!==r.indexOf(e.key)?t[e.key]=e:e.destroy()})),g=e.map((e=>{const r=e.key&&t[e.key]?t[e.key]:a.interaction(e.type)(u,d,n);return r.set(e),r}))}const D=e=>{const t=n.getBoundingClientRect(),r="clientX"in e?e.clientX:e.x,o="clientY"in e?e.clientY:e.y,i={x:r-t.left,y:o-t.top},a=[];return p.forEach((e=>{const t=e.instance.getRect();h4(t.computedPhysical?t.computedPhysical:{x:t.margin.left+t.x*t.scaleRatio.x,y:t.margin.top+t.y*t.scaleRatio.y,width:t.width*t.scaleRatio.x,height:t.height*t.scaleRatio.y},i)&&a.push(e)})),a},T=()=>{if(c.length||!n)return;Object.keys(i).forEach((e=>{const t=i[e].bind(u);n.addEventListener(e,t),c.push({key:e,listener:t})}));const e={},t=t=>{t.touches?(e.x=t.touches[0].clientX,e.y=t.touches[0].clientY,e.multiTouch=t.touches.length>1):(e.x=t.clientX,e.y=t.clientY,e.multiTouch=!1),e.time=Date.now(),e.comps=D(e)},r=t=>{const n=e.comps||D(t);if(!n.every((e=>e.instance.def.disableTriggers))&&("touchend"===t.type&&t.preventDefault(),function(e,t){const n=ZZ(e),r=n?e.changedTouches[0]:e,o=Date.now()-t.time,i=isNaN(t.x)?0:Math.abs(r.clientX-t.x),a=isNaN(t.y)?0:Math.abs(r.clientY-t.y);return(0===e.button||n)&&!t.multiTouch&&i<=12&&a<=12&&o<=300}(t,e)))for(let e=n.length-1;e>=0;e--){if(n[e].instance.onBrushTap(t),x){x=!1;break}}},o=[];o.push({key:"mousedown",listener:t}),o.push({key:"mouseup",listener:r}),function(e){return"ontouchstart"in e&&"ontouchend"in e||navigator.maxTouchPoints>1}(n)&&(o.push({key:"touchstart",listener:t}),o.push({key:"touchend",listener:r})),o.push({key:"mousemove",listener:e=>{const t=D(e);for(let n=t.length-1;n>=0;n--){if(t[n].instance.onBrushOver(e),x){x=!1;break}}}}),o.forEach((e=>{n.addEventListener(e.key,e.listener),c.push(e)}))},z=()=>{c.forEach((e=>{let{key:t,listener:r}=e;return n.removeEventListener(t,r)})),c.length=0},j=()=>{n.innerHTML="",(()=>{const{components:e=[]}=o;A(),O(r,o),v.set({components:e});const{visible:t,hidden:i,ordered:a}=S();p=t,i.forEach((e=>{e.instance.hide(),e.visible=!1})),t.forEach((e=>e.instance.beforeMount())),t.forEach((e=>e.instance.mount())),t.forEach((e=>e.instance.beforeRender())),t.forEach((e=>e.instance.render())),t.forEach((e=>e.instance.mounted())),t.forEach((e=>{e.visible=!0})),K4(n,a)})(),T(),L(o.interactions)};return u.layoutComponents=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{excludeFromUpdate:t=[]}=e;e.data&&(r=e.data),e.settings&&(o=e.settings,L(e.settings.interactions)),M(),O(r,o);const{formatters:n,scales:i,components:a=[]}=o;v.update({components:a,data:r,excludeFromUpdate:t,formatters:n,scales:i}),v.forEach((e=>{e.updateWith&&e.instance.set(e.updateWith)})),v.forEach((e=>{e.updateWith&&e.instance.beforeUpdate()})),S()},u.update=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{partialData:t,excludeFromUpdate:i=[]}=e;let a;e.data&&(r=e.data),e.settings&&(o=e.settings,L(e.settings.interactions)),M(),O(r,o,{partialData:t});const{formatters:s,scales:l,components:c=[]}=o;v.update({components:c,data:r,excludeFromUpdate:i,formatters:s,scales:l}),v.forEach((e=>{e.updateWith&&e.instance.set(e.updateWith)})),v.forEach((e=>{e.updateWith&&e.instance.beforeUpdate()}));const u=[],d=[];let h;if(t)v.forEach((e=>{(e.updateWith||e.applyTransform)&&e.visible&&u.push(e)})),h=u;else{const{visible:e,hidden:t,ordered:n}=S();p=e,h=e,a=n,e.forEach((e=>{e.updateWith&&e.visible?u.push(e):d.push(e)})),t.forEach((e=>{e.instance.hide(),e.visible=!1,delete e.updateWith,e.applyTransform=!1}))}d.forEach((e=>e.instance.beforeMount())),d.forEach((e=>e.instance.mount())),h.forEach((e=>e.instance.beforeRender())),h.forEach((e=>{(e.updateWith||e.applyTransform)&&e.visible?e.instance.update():e.instance.render()})),t||K4(n,a),d.forEach((e=>e.instance.mounted())),u.forEach((e=>e.instance.updated())),p.forEach((e=>{delete e.updateWith,e.visible=!0,e.applyTransform=!1})),R()},u.destroy=()=>{I(),v.destroy(),z(),L(),delete u.update,delete u.destroy,P()},u.getAffectedShapes=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"and",n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=[];return p.filter((e=>null==r||e.key===r)).forEach((r=>{const i=r.instance.getBrushedShapes(e,t,n);o=[...o,...i]})),o},u.findShapes=e=>{let t=[];return p.forEach((n=>{const r=n.instance.findShapes(e);t=[...t,...r]})),t},u.componentsFromPoint=e=>D(e).map((e=>e.instance.ctx)),u.shapesAt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=[];const o=n.getBoundingClientRect();let i=p;if(Array.isArray(t.components)&&t.components.length>0){const e=t.components.map((e=>e.key));i=p.filter((t=>-1!==e.indexOf(t.key))).map((n=>({instance:n.instance,opts:t.components[e.indexOf(n.key)]})))}for(let n=i.length-1;n>=0;n--){const a=i[n],s=Y4(e,o,a.instance.renderer().element().getBoundingClientRect()),l=a.instance.shapesAt(s,a.opts),c=l.length>0&&"stop"===t.propagation;if(r=[...r,...l],r.length>0&&c)return r}return r},u.brushFromShapes=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{components:[]};for(let n=0;n<t.components.length;n++){const r=t.components[n].key;p.filter((e=>r===e.key)).forEach((r=>{let o=e.filter((e=>e.key===r.key));r.instance.brushFromShapes(o,t.components[n])}))}},u.scroll=function(){return function(e,t){return t[e]||(t[e]=W3()),t[e]}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",m)},u.dataset=e=>y(e),u.dataCollection=e=>_(e),u.scales=function(){return h.all()},u.formatters=function(){return f.all()},u.brush=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return b[e]||(b[e]=o6()),b[e]},u.scale=function(e){return h.get(e)},u.formatter=function(e){return f.get(e)},u.toggleBrushing=function(e){x=void 0!==e?e:!x},u.component=e=>{const t=v.findComponentByKey(e);return null==t?void 0:t.instance.ctx},u.logger=()=>s,u.theme=()=>l,u.storage=Y6({animations:{updatingStageMeta:{isInit:!1,shouldBeRemoved:!1}}}),Object.defineProperty(u,"interactions",{get:()=>({instances:g,on(){T(),g.forEach((e=>e.on()))},off(){z(),g.forEach((e=>e.off()))}})}),C(),n&&(E(),j(),k(n),u.element=n),u}const J4=e=>{let t=u0(e);return t.prio=e=>e?t.default(e[0]):[t.default()],t.types=()=>t.getKeys(),t};var Z4=u0();function Q4(e,t,n){let{key:r}=n;const o={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return o.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(o.value),e.field&&(o.source={key:r,field:e.field.key()}),o}const e8=e=>e.filter((e=>"number"==typeof e&&!isNaN(e)));const t8=e=>{let{key:t,data:n,cache:r,config:o}=e;if(!n)return;let i=n;"string"==typeof i&&(i=(e=>{let{data:t,config:n}=e;const r=t.split("\n"),o=r[0],i=r[1];let a=",";if(n&&n.parse&&n.parse.delimiter)a=n.parse.delimiter;else if(o){const e=[/,/,/\t/,/;/];for(let t=0;t<e.length;t++){const n=e[t];if(o&&i){if(n.test(o)&&n.test(i)&&o.split(n).length===i.split(n).length){a=n;break}}else n.test(o)&&(a=n)}}return r.map((e=>e.split(a)))})({data:n,config:o})),Array.isArray(i)&&function(e){let t,{source:n,data:r,cache:o,config:i}=e,a=r;const s=i&&i.parse;Array.isArray(r[0])?s&&!1===s.headers?t=r[0].map(((e,t)=>t)):(t=r[0],a=r.slice(1)):t=Object.keys(r[0]);const l=!!s&&"function"==typeof s.row&&s.row;let c,u=t;u=s&&"function"==typeof s.fields?s.fields(u.slice()):t.map((e=>({key:e,title:e}))),Array.isArray(r[0])?c=u.map((()=>[])):(c={},u.forEach((e=>{c[e.key]=[]})));for(let e=0;e<a.length;e++){const t=l?l(a[e],e,u):a[e];if(t)if(Array.isArray(t))for(let e=0;e<u.length;e++)c[e].push(t[e]);else for(let e=0;e<u.length;e++)c[u[e].key].push(t[u[e].key])}const d=Array.isArray(c)?e=>c[e]:e=>c[u[e].key];for(let e=0;e<u.length;e++){const t=d(e),r=e8(t),i=r.length>0,a=i?"measure":"dimension",s=i?Math.min(...r):NaN,l=i?Math.max(...r):NaN;o.fields.push(z2(UZ({source:n,key:e,title:u[e].title,values:t,min:s,max:l,type:a},u[e]),{value:u[e].value,label:u[e].label}))}}({data:i,cache:r,source:t,config:o})};function n8(){let{key:e,data:t,config:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r={fields:[]},o={key:()=>e,raw:()=>t,field:e=>function(e,t){let{cache:n}=t;if("number"==typeof e)return n.fields[e];for(let t=0;t<n.fields.length;t++)if(n.fields[t].key()===e)return n.fields[t];for(let t=0;t<n.fields.length;t++)if(n.fields[t].title()===e)return n.fields[t];return null}(e,{cache:r}),fields:()=>r.fields.slice(),extract:e=>function(e,t){const n=Array.isArray(e)?e:[e];let r=[];return n.forEach((e=>{if(void 0!==e.field){const n=t.field(e.field),o=t.key();if(!n)throw Error("Field '".concat(e.field,"' not found"));const{props:i,main:a}=W2(e,t),s=Object.keys(i),l=!!e.trackBy,c=typeof e.trackBy,u={},d=[],p=n.items(),h=[];for(let t=0;t<p.length;t++){const n=p[t];if(a.filter&&!a.filter(n))continue;const r=Q4(a,n,{key:o});s.forEach((e=>{const a=i[e];let s=a.field?a.field.items()[t]:n;r[e]=Q4(a,s,{key:o})})),l&&H2({cfg:e,itemData:n,obj:r,target:d,tracker:u,trackType:c}),h.push(r)}r=l?[...r,...$2(d,{main:a,propsArr:s,props:i})]:[...r,...h]}})),r}(e,o),hierarchy:()=>null};return t8({key:e,data:t,config:n,cache:r}),o}n8.util={normalizeConfig:W2,collect:$2,track:H2};const r8=u0();r8.default("matrix"),r8("matrix",n8),r8("default",n8);const o8=u0();function i8(e,t,n){return Math.max(e,Math.min(t,n))}function a8(e){let{item:t,value:n,boxCenter:r,rendWidth:o,rendHeight:i,flipXY:a,symbol:s}=e,l="x",c="y",u=o,d=i,p=n<.5?90:-90;return a&&(l="y",c="x",u=i,d=o,p=n<.5?180:0),s(UZ({},t.oob,{[l]:r*u,[c]:Math.max(t.oob.size/2,Math.min(n*d,d-t.oob.size/2)),startAngle:p}))}function s8(e){let{item:t,boxWidth:n,boxPadding:r,rendWidth:o,rendHeight:i,flipXY:a}=e,s="x",l="y",c="width",u="height",d=o,p=i;a&&(s="y",l="x",c="height",u="width",d=i,p=o);const{actualDiff:h,actualLow:f}=function(e){let{start:t,end:n,minPx:r=.1,maxPx:o=1}=e;const i=Math.max(t,n),a=Math.min(t,n),s=i8(-.1,1.2,i),l=i8(-.1,1.2,a),c=s*o-l*o,u=Math.max(r,c),d=(u-c)/2;return{actualDiff:u,startModifier:d,actualLow:l*o-d}}({start:t.start,end:t.end,minPx:t.box.minHeightPx,maxPx:p});return UZ({},t.box,{type:"rect",[s]:(r+t.major)*d,[l]:f,[u]:h,[c]:n*d,data:t.data||{},collider:{type:null}})}function l8(e){let{item:t,from:n,to:r,boxCenter:o,rendWidth:i,rendHeight:a,flipXY:s}=e,l="x1",c="y1",u="x2",d="y2",p=i,h=a;return s&&(l="y1",c="x1",u="y2",d="x2",p=a,h=i),UZ({},t.line,{type:"line",[d]:Math.floor(n*h),[l]:o*p,[c]:Math.floor(r*h),[u]:o*p,data:t.data||{},collider:{type:null}})}function c8(e){let{item:t,key:n,position:r,width:o,boxCenter:i,rendWidth:a,rendHeight:s,flipXY:l}=e,c="x1",u="y1",d="x2",p="y2",h=a,f=s;l&&(c="y1",u="x1",d="y2",p="x2",h=s,f=a);const m=o/2;return UZ({type:"line"},t[n],{[u]:Math.floor(r*f),[c]:(i-m)*h,[p]:Math.floor(r*f),[d]:(i+m)*h,r:m*h,cx:i*h,cy:r*f,width:o*h,data:t.data||{},collider:{type:null}})}function u8(e,t,n){const{width:r,maxWidthPx:o,minWidthPx:i}=t.box,a=e>=0?1:-1;let s=Math.min(a*e*r,isNaN(o)?n:o/n);return s=isNaN(i)?s:Math.max(i/n,s),s*a}o8("native",(function(e,t,n){let r,o,i={chart:e,mediator:t,element:n},a=[],s=!0;function l(){"function"==typeof r.enable&&(r.enable=r.enable.bind(i)()),r.enable&&Object.keys(r.events).forEach((e=>{const t=r.events[e].bind(i);n.addEventListener(e,t),a.push({key:e,listener:t})}))}function c(){a.forEach((e=>{let{key:t,listener:r}=e;n.removeEventListener(t,r)})),a=[]}return{get key(){return o},set(e){!function(e){o=e.key,r=e,r.events=r.events||[],void 0===r.enable&&(r.enable=!0)}(e),c(),s&&l()},off(){s=!1,c()},on(){s=!0,0===a.length&&l()},destroy(){c(),i=null,r=null}}}));const d8={oob:{show:!0,type:"n-polygon",fill:"#999",stroke:"#000",strokeWidth:0,size:10,sides:3,startAngle:-90},box:{show:!0,fill:"#fff",stroke:"#000",strokeWidth:1,strokeLinejoin:"miter",width:1,maxWidthPx:void 0,minWidthPx:1,minHeightPx:1},line:{show:!0,stroke:"#000",strokeWidth:1},median:{show:!0,stroke:"#000",strokeWidth:1},whisker:{show:!0,stroke:"#000",strokeWidth:1,fill:"",type:"line",width:1}},p8=Object.keys(d8),h8={require:["chart","resolver","symbol"],defaultSettings:{settings:{},data:{},style:{box:"$shape",line:"$shape-guide",whisker:"$shape-guide",median:"$shape-guide--inverted"}},created(){this.state={}},render(e){let{data:t}=e;const{width:n,height:r}=this.rect,o="horizontal"===this.settings.settings.orientation,{style:i,resolver:a,symbol:s}=this,l=p8.filter((e=>!this.settings.settings[e]||!1!==this.settings.settings[e].show)),c={};l.forEach((e=>c[e]=d8[e]));const u=function(e){let{keys:t,data:n,defaultSettings:r,style:o,settings:i,width:a,height:s,resolver:l}=e;const c=UZ(!0,{},r||{},o||{}),u={major:"horizontal"===i.orientation?s:a,minor:"horizontal"===i.orientation?a:s},d=i.major;let p;p="object"==typeof d&&"object"==typeof d.ref&&void 0!==d.ref.start&&void 0!==d.ref.end?l.resolve({data:n,defaults:{start:0,end:1},scaled:u,settings:UZ(!0,{},{binStart:{scale:i.major.scale,ref:i.major.ref.start},binEnd:{scale:i.major.scale,ref:i.major.ref.end}})}):"object"==typeof d&&void 0!==d.binStart&&void 0!==d.binEnd?l.resolve({data:n,defaults:{start:0,end:1},scaled:u,settings:UZ(!0,{},{binStart:{scale:i.major.scale,ref:"binStart"},binEnd:{scale:i.major.scale,ref:"binEnd"}},i.major)}):l.resolve({data:n,scaled:u,defaults:{major:.5},settings:{major:i.major}});const h=i.minor||{},f={};["start","end","min","max","med"].forEach((e=>{(h[e]||n.items&&n.items.length&&n.items[0][e])&&(f[e]={scale:h.scale,ref:e})}));let m,g={major:p,minor:l.resolve({data:n,defaults:{start:0,end:1},scaled:u,settings:UZ(!0,{},f,h)})};for(let e=0,r=t.length;e<r;e++)i[m]&&!1===i[m].show||(m=t[e],g[m]=l.resolve({data:n,defaults:c[m],settings:i[m],scaled:u}));return g}({keys:l,data:t,defaultSettings:c,style:i,settings:this.settings.settings,width:n,height:r,resolver:a}),{settings:d,items:p}=u,h=function(e){let{width:t,height:n,flipXY:r,resolved:o,keys:i,symbol:a}=e;const s=[],l=o.major.items;if(!l.length)return s;const c=t,u=n,d=r?n:t,p=o.major.settings,h=["start","end","min","max","med"].filter((e=>void 0!==o.minor.settings[e])),f=h.length,m=i.filter((e=>"oob"!==e));let g,y,_,b,x,v,w,S,C;const E=i?i.length:0,k=m?m.length:0,M={box:function(){_.box&&QZ(_.start)&&QZ(_.end)&&g.push(s8({item:_,boxWidth:b,boxPadding:x,rendWidth:c,rendHeight:u,flipXY:r}))},line:function(){QZ(_.min)&&QZ(_.start)&&g.push(l8({item:_,from:_.min,to:_.start,boxCenter:v,rendWidth:c,rendHeight:u,flipXY:r})),QZ(_.max)&&QZ(_.end)&&g.push(l8({item:_,from:_.max,to:_.end,boxCenter:v,rendWidth:c,rendHeight:u,flipXY:r}))},median:function(){_.median&&QZ(_.med)&&g.push(c8({item:_,key:"median",position:_.med,width:b,boxCenter:v,rendWidth:c,rendHeight:u,flipXY:r}))},whisker:function(){if(_.whisker){const e=b*_.whisker.width;QZ(_.min)&&g.push(c8({item:_,key:"whisker",position:_.min,width:e,boxCenter:v,rendWidth:c,rendHeight:u,flipXY:r})),QZ(_.max)&&g.push(c8({item:_,key:"whisker",position:_.max,width:e,boxCenter:v,rendWidth:c,rendHeight:u,flipXY:r}))}}};function R(){let e,t=-Number.MAX_VALUE,n=Number.MAX_VALUE;for(let r=0;r<f;r++)e=_[h[r]],QZ(e)&&(t<e&&(t=e),n>e&&(n=e));w=t<0&&t!==-Number.MAX_VALUE,S=n>1&&n!==Number.MAX_VALUE,C=w||S}for(let e=0,t=l.length;e<t;e++){g=[],y=null;const t=l[e],n=t.data;let h=null,f=null;void 0!==p.binStart?(h=t.binStart,f=t.binEnd,y=p.binStart.scale):(y=p.major.scale,h=y?t.major:0);let A=0;y?y.bandwidth?(A=y.bandwidth(),h-=A/2):A=f-h:A=1,_=UZ({},{major:h,majorEnd:f},o.minor.items[e]);for(let t=0;t<E;t++)_[i[t]]=o[i[t]].items[e];if(b=u8(A,_,d),x=(A-b)/2,v=x+_.major+b/2,R(),C)_.oob&&(w?g.push(a8({item:_,value:0,boxCenter:v,rendWidth:c,rendHeight:u,flipXY:r,symbol:a})):S&&g.push(a8({item:_,value:1,boxCenter:v,rendWidth:c,rendHeight:u,flipXY:r,symbol:a})));else for(let e=0;e<k;e++)_[m[e]]&&!1===_[m[e]].show||M[m[e]]();const I={type:"container",data:n,collider:{type:"bounds"},children:g};s.push(I)}return s}({width:n,height:r,flipXY:o,resolved:u,keys:l,symbol:s});return h}};const f8={shape:"saltire",width:2,size:.5,fill:"#333",stroke:"#333",strokeWidth:0},m8=/px$/,g8={shape:"circle",label:"",fill:"#333",stroke:"#ccc",strokeDasharray:"",strokeWidth:0,strokeLinejoin:"miter",opacity:1,x:.5,y:.5,size:1,show:!0},y8={maxPx:1e4,minPx:1,maxRelExtent:.1,minRelExtent:.01,maxRelDiscrete:1,minRelDiscrete:.1};function _8(e,t){return e&&"function"==typeof e.bandwidth?{isBandwidth:!0,value:Math.max(1,e.bandwidth()*t)}:{isBandwidth:!1,value:Math.max(1,t)}}function b8(e,t,n,r){let{width:o,height:i}=t;return e.filter((e=>!1!==e.show&&!isNaN(e.x+e.y))).map((e=>{let t=e,a=m8.test(e.size)?parseInt(e.size,10):n.min+t.size*(n.max-n.min);eQ(a)&&(t=f8,a=n.min+t.size*(n.max-n.min));const[s,l]=function(e){let t=g8.shape,n={};return"object"==typeof e.shape&&"string"==typeof e.shape.type?(t=e.shape.type,n=e.shape):"string"==typeof e.shape&&(t=e.shape),[t,n]}(t),c=JZ(JZ({},l),{},{type:s,label:e.label,x:e.x*o,y:e.y*i,fill:t.fill,size:Math.min(n.maxGlobal,Math.max(n.minGlobal,a)),stroke:t.stroke,strokeWidth:t.strokeWidth,strokeDasharray:t.strokeDasharray,opacity:t.opacity});t===e.errorShape&&(c.width=t.width);const u=r(c);return u.data=e.data,u}))}const x8={require:["chart","resolver","symbol"],defaultSettings:{settings:{},data:{},animations:{enabled:!1,trackBy:e=>e.data.value},style:{item:"$shape"}},render(e){let{data:t}=e;const n=this.resolver.resolve({data:t,defaults:UZ({},g8,this.style.item),settings:this.settings.settings,scaled:{x:this.rect.width,y:this.rect.height}}),{width:r,height:o}=this.rect,i=UZ({},y8,this.settings.settings.sizeLimits),a=n.items,s=function(e,t,n,r,o){const i=_8(e?e.scale:void 0,n),a=_8(t?t.scale:void 0,r);let s=Math.min(i.value*o[i.isBandwidth?"maxRelDiscrete":"maxRelExtent"],a.value*o[a.isBandwidth?"maxRelDiscrete":"maxRelExtent"]),l=Math.min(i.value*o[i.isBandwidth?"minRelDiscrete":"minRelExtent"],a.value*o[a.isBandwidth?"minRelDiscrete":"minRelExtent"]);return{min:Math.max(1,Math.floor(l)),max:Math.max(1,Math.floor(s)),maxGlobal:o.maxPx,minGlobal:o.minPx}}(n.settings.x,n.settings.y,r,o,i);return b8(a,this.rect,s,this.settings.shapeFn||this.symbol)}};const v8={label:"",arc:1,show:!0,fill:"#333",stroke:"#ccc",strokeWidth:1,strokeLinejoin:"round",opacity:1,innerRadius:0,outerRadius:.8,cornerRadius:0,offset:0};function w8(e,t,n,r){let{x:o,y:i,width:a,height:s}=t;const l=LQ(),c={x:o+a/2,y:i+s/2},u=Math.min(a,s)/2,d=Math.min(a,s)/2,p=d/100;return e.map(((e,t)=>{const o=n[t];o.type="path";const i=d*o.outerRadius,a=u*o.innerRadius,s=p*o.cornerRadius;l.innerRadius(a),l.outerRadius(i),l.cornerRadius(s),o.arcDatum=e;const h=l.centroid(e),f=o.offset?function(e,t,n,r){let[o,i]=e;const a=Math.sqrt(o*o+i*i);o/=a,i/=a;const s=n-r;return{x:o*t*s,y:i*t*s}}(h,o.offset,i,a):{x:0,y:0};return o.transform="translate(".concat(f.x,", ").concat(f.y,") translate(").concat(c.x,", ").concat(c.y,")"),o.desc={share:e.value/r,slice:{start:e.startAngle,end:e.endAngle,innerRadius:a,outerRadius:i,cornerRadius:s,offset:{x:c.x+f.x,y:c.y+f.y}}},o}))}function S8(e,t){return e.slice&&"arc"in e.slice?t.arc:t.data.value}const C8={require:["chart","resolver"],defaultSettings:{settings:{startAngle:0,endAngle:2*Math.PI,padAngle:0,slice:{}},style:{slice:"$shape"},data:{}},render(e){let{data:t}=e;const n=[],r=[],o=this.settings.settings,{items:i}=this.resolver.resolve({data:t,defaults:UZ({},v8,this.style.slice),settings:o.slice});let a=0;for(let e=0,t=i.length;e<t;e++){const t=S8(o,i[e]);t>0&&i[e].outerRadius>=i[e].innerRadius&&(n.push(t),r.push(i[e]),a+=t)}const s=function(){var e=FQ,t=qQ,n=null,r=fQ(0),o=fQ(EQ),i=fQ(0);function a(a){var s,l,c,u,d,p=a.length,h=0,f=new Array(p),m=new Array(p),g=+r.apply(this,arguments),y=Math.min(EQ,Math.max(-EQ,o.apply(this,arguments)-g)),_=Math.min(Math.abs(y)/p,i.apply(this,arguments)),b=_*(y<0?-1:1);for(s=0;s<p;++s)(d=m[f[s]=s]=+e(a[s],s,a))>0&&(h+=d);for(null!=t?f.sort((function(e,n){return t(m[e],m[n])})):null!=n&&f.sort((function(e,t){return n(a[e],a[t])})),s=0,c=h?(y-p*b)/h:0;s<p;++s,g=u)l=f[s],u=g+((d=m[l])>0?d*c:0)+b,m[l]={data:a[l],index:s,value:d,startAngle:g,endAngle:u,padAngle:_};return m}return a.value=function(t){return arguments.length?(e="function"==typeof t?t:fQ(+t),a):e},a.sortValues=function(e){return arguments.length?(t=e,n=null,a):t},a.sort=function(e){return arguments.length?(n=e,t=null,a):n},a.startAngle=function(e){return arguments.length?(r="function"==typeof e?e:fQ(+e),a):r},a.endAngle=function(e){return arguments.length?(o="function"==typeof e?e:fQ(+e),a):o},a.padAngle=function(e){return arguments.length?(i="function"==typeof e?e:fQ(+e),a):i},a}().sortValues(null);s.startAngle(o.startAngle),s.endAngle(o.endAngle),s.padAngle(o.padAngle);return w8(s(n),UZ({},this.rect,{x:0,y:0}),r,a)}};const E8=function(e){function t(t){if(e[t.type]&&e[t.type].condition(t)){const n=e[t.type],r=void 0===n.conditionAppend||n.conditionAppend(t);n.items.forEach((e=>{const n=Math.round(t[e.key]),o=t[e.key]-n;t[e.key]=n,r&&"append"===e.type&&(o>0?t[e.key]+=.5:t[e.key]-=.5)}))}}return void 0===e&&((e={}).line={append:["x1","x2","y1","y2"],round:[],condition:e=>e.x1===e.x2||e.y1===e.y2,conditionAppend:e=>e.strokeWidth%2!=0},e.rect={append:["x","y"],round:["width","height"],condition:()=>!0,conditionAppend:e=>e.strokeWidth%2!=0}),Object.keys(e).forEach((t=>{const n=e[t];n.items=[],n.append.forEach((e=>{n.items.push({key:e,type:"append"})})),n.round.forEach((e=>{n.items.push({key:e,type:"round"})}))})),t.multiple=e=>e.forEach((e=>t(e))),t}();class k8{constructor(){this.reset(),this.push(...arguments)}static evaluateKey(e,t){if(t){const t=e.substring(0,1),n=e.substring(1);if("x"===t)return"y".concat(n);if("y"===t)return"x".concat(n);if("cx"===e)return"cy";if("cy"===e)return"cx";if("width"===e)return"height";if("height"===e)return"width"}return e}transposeCoordinate(e,t,n){if("number"==typeof t&&isFinite(t)){const r=e.substring(0,1);if("x"===r||"cx"===e)return t*this.width;if("width"===e)return t*this.width;if("r"===e)return t*(n?this.height:this.width);if("y"===r||"cy"===e)return t*this.height;if("height"===e)return t*this.height}return t}push(){return this.storage.push(...arguments),this}processItem(e){let t={};const n=void 0!==e.flipXY?e.flipXY:this.flipXY,r=void 0!==e.crisp?e.crisp:this.crisp;if(e.fn&&"function"==typeof e.fn){let r=n?this.height:this.width,o=n?this.width:this.height;e=e.fn({width:r,height:o,flipXY:n});const i=Object.keys(e);for(let r=0,o=i.length;r<o;r++){let o=i[r];t[k8.evaluateKey(o,n)]=e[o]}}else{const r=Object.keys(e);for(let o=0,i=r.length;o<i;o++){let i=r[o];const a=k8.evaluateKey(i,n),s=this.transposeCoordinate(a,e[i],n);t[a]=s}}return r&&E8(t),t}output(){let e=[];for(let t=0,n=this.storage.length;t<n;t++){let n=this.processItem(this.storage[t]);e.push(n)}return e}reset(){this.storage=[],this.flipXY=!1,this.crisp=!1,this.width=0,this.height=0}}function M8(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new k8(...t)}function R8(e,t){return e&&t?e.cachedTicks&&e.cachedTicks()||e.ticks({distance:t}):[]}const A8={created(){},require:["chart","renderer","resolver"],defaultSettings:{layout:{displayOrder:0},style:{ticks:"$guide-line",minorTicks:"$guide-line--minor"}},beforeRender(){this.blueprint=M8(),this.blueprint.width=this.rect.width,this.blueprint.height=this.rect.height,this.blueprint.x=this.rect.x,this.blueprint.y=this.rect.y,this.blueprint.crisp=!0},render(){if(this.x=this.settings.x?this.chart.scale(this.settings.x):null,this.y=this.settings.y?this.chart.scale(this.settings.y):null,g6(this,"x",this.rect.width),g6(this,"y",this.rect.height),!this.x&&!this.y)return[];this.settings.ticks=UZ({show:!0},this.style.ticks,this.settings.ticks||{}),this.settings.minorTicks=UZ({show:!1},this.style.minorTicks,this.settings.minorTicks||{}),this.lines={x:[],y:[]},this.lines.x=R8(this.x,this.rect.width),this.lines.y=R8(this.y,this.rect.height),this.lines.y=this.lines.y.map((e=>UZ(e,{flipXY:!0})));let e=e=>{let{dir:t,isMinor:n}=e,r=this.lines[t].filter((e=>!!e.isMinor===n)),o=n?this.settings.minorTicks:this.settings.ticks;this.resolver.resolve({settings:o,data:{items:r,dir:t}}).items.forEach((e=>{let n=e.data;var r,o;e.show&&this.blueprint.push({type:"line",x1:n.position,y1:0,x2:n.position,y2:1,stroke:e.stroke||"black",strokeWidth:void 0!==e.strokeWidth?e.strokeWidth:1,strokeDasharray:void 0!==e.strokeDasharray?e.strokeDasharray:void 0,flipXY:n.flipXY||!1,value:null!==(r=n.value)&&void 0!==r?r:null===(o=n.data)||void 0===o?void 0:o.value,dir:t})}))};return e({dir:"x",isMinor:!1}),e({dir:"x",isMinor:!0}),e({dir:"y",isMinor:!1}),e({dir:"y",isMinor:!0}),this.blueprint.output()}};function I8(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"bottom";if(n*=.8,"left"===r||"right"===r){let o="right"===r;return"\n M ".concat(e," ").concat(t-n,"\n A ").concat(1.25*n," ").concat(1.25*n,", 0, 1, ").concat(o?0:1,", ").concat(e," ").concat(t+n,"\n L ").concat(o?e+n:e-n," ").concat(t," Z\n ")}let o="bottom"===r;return"\n M ".concat(e-n," ").concat(t,"\n A ").concat(1.25*n," ").concat(1.25*n,", 0, 1, ").concat(o?1:0,", ").concat(e+n," ").concat(t,"\n L ").concat(e," ").concat(o?t+n:t-n," Z\n ")}function P8(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"bottom";if(n*=.75,"left"===r||"right"===r){let o="right"===r;return"\n M ".concat(e+=o?1.5*n:-1.5*n," ").concat(t-n,"\n L ").concat(e," ").concat(t+n,"\n L ").concat(o?e+n:e-n," ").concat(t," Z\n ")}let o="bottom"===r;return t+=o?1.5*n:-1.5*n,"\n M ".concat(e-n," ").concat(t,"\n L ").concat(e+n," ").concat(t,"\n L ").concat(e," ").concat(o?t+n:t-n," Z\n ")}function O8(e,t,n){return e<t||e>n}function L8(e,t){if("string"==typeof e.formatter)return t.formatter(e.formatter);if("object"==typeof e.formatter)return t.formatter(e.formatter);if(void 0!==e.scale&&e.scale.data){const t=e.scale.data()&&e.scale.data().fields;return t&&t[0]?t[0].formatter():null}return null}function D8(e){if(void 0===e)return 0;if("number"==typeof e&&isFinite(e))return e;if("string"==typeof e)switch(e){case"center":case"middle":return.5;case"bottom":case"right":return 1;default:return 0}return 0}function T8(e){var t,n;let{chart:r,blueprint:o,renderer:i,p:a,settings:s,items:l,slopeLine:c}=e,u=!0,d=!1,p=!1,h=!1,f=!1,m=UZ(!0,{},s.style.line,a.line||{}),g=UZ(!0,{fill:"#000",fontFamily:"Arial",fontSize:"12px",opacity:1,maxWidth:1,maxWidthPx:9999,padding:5,background:{fill:"#fff",stroke:"transparent",strokeWidth:0,opacity:.5}},s.style.label||{},{fill:m.stroke});if(d=c?o.processItem({type:"line",x1:c.x1,y1:c.y1,x2:c.x2,y2:c.y2,stroke:m.stroke||"black",strokeWidth:m.strokeWidth||1,strokeDasharray:m.strokeDasharray,flipXY:!1,value:a.valueInfo?a.valueInfo.id:a.value}):o.processItem({type:"line",x1:a.position,y1:0,x2:a.position,y2:1,stroke:m.stroke||"black",strokeWidth:m.strokeWidth||1,strokeDasharray:m.strokeDasharray,flipXY:a.flipXY||!1,value:a.valueInfo?a.valueInfo.id:a.value}),a.label&&!1!==a.label.show&&(null==c||!c.slope||0===c.slope)){const e=UZ(!0,{fill:"#000",fontFamily:"Arial",fontSize:"12px",opacity:1,maxWidth:1,maxWidthPx:9999,padding:5,background:{fill:"#fff",stroke:"transparent",strokeWidth:0,opacity:.5}},s.style.label||{},{fill:m.stroke},a.label);let t,n={width:0,height:0},c="";t=L8(a,r),!1!==a.label.showValue&&(t?c=" (".concat(t(a.value),")"):a.scale&&(c=" (".concat(a.value,")"))),c&&(n=i.measureText({text:c,fontFamily:e.fontFamily,fontSize:e.fontSize}));let d=i.measureText({text:e.text||"",fontFamily:e.fontFamily,fontSize:e.fontSize}),g={width:d.width+n.width,height:Math.max(d.height,n.height)},y=e.padding,_=D8(a.flipXY?e.vAlign:e.align),b=D8(a.flipXY?e.align:e.vAlign),x=Math.min(1+g.width+2*y,e.maxWidth*o.width,e.maxWidthPx),v=g.height+2*y,w=a.flipXY?v:x,S=a.flipXY?x:v;if(p=o.processItem({fn:t=>{let{width:n,height:r}=t,i=a.position*n-(a.flipXY?v:x)*(1-_);i=a.flipXY?i:Math.max(i,0);return{type:"rect",x:i,y:Math.max(Math.abs(b*r-S*b),0),width:a.flipXY?w:Math.min(w,o.width-i),height:S,stroke:e.background.stroke,strokeWidth:e.background.strokeWidth,fill:e.background.fill,opacity:e.background.opacity}},flipXY:a.flipXY||!1}),p.x<-1||p.x+p.width>o.width+1||p.y<-1||p.y+p.height>o.height+1)p=void 0;else{h={type:"text",text:e.text||"",fill:e.fill,opacity:e.opacity,fontFamily:e.fontFamily,fontSize:e.fontSize,x:p.x+y,y:p.y+p.height/2+g.height/3,maxWidth:p.width-2*y-n.width,anchor:"start"},c&&(f={type:"text",text:c||"",fill:e.fill,opacity:e.opacity,fontFamily:e.fontFamily,fontSize:e.fontSize,x:h.x+3+(p.width-(n.width+2*y)),y:h.y});for(let e=0,t=l.length;e<t;e++){let t=l[e];"rect"===t.type?d4(p,t)&&(u=!1):"line"===t.type&&a.flipXY===t.flipXY&&f4(p,t)&&(u=!1)}}}if(d&&l.push(d),c&&0!==c.slope&&(!1!==(null===(t=c.label)||void 0===t?void 0:t.show)||!1!==(null===(n=c.label)||void 0===n?void 0:n.showValue))){var y,_,b;let e,t;const n=120;let s=!1!==(null===(y=c.label)||void 0===y?void 0:y.show)?null===(_=c.label)||void 0===_?void 0:_.text:"";if(!1!==(null===(b=c.label)||void 0===b?void 0:b.showValue)){var x;const t=L8(a,r),n=t?t(c.value):c.value;e="(".concat(c.slope,"x + ").concat(n,")"),s+=null!==(x=c.label)&&void 0!==x&&x.text?" ".concat(e):e}if(s.length>1){var v,w,S;const e=i.measureText({text:s,fontFamily:g.fontFamily,fontSize:g.fontSize});e.width=e.width>n?n:e.width;const a=function(e,t,n){const r=e.scale({scale:"x"}),o=e.scale({scale:"y"});if(t>0){if(r.max()*t+n>=o.max())return!0}else if(t<0&&r.min()*t+n>=o.max())return!0;return!1}(r,c.slope,c.value)?function(e,t,n){const r=e.scale({scale:"x"}),o=e.scale({scale:"y"});return r((o.max()-n)/t)}(r,c.slope,c.value):void 0,u=void 0===a||c.isRtl?g.padding:3*g.padding,p=void 0!==a||c.slope>0?3*g.padding:g.padding,h=function(e,t,n,r,o,i){let a=0;if(void 0!==n){if(n<.8)return a=e.slope<0||e.isRtl?3*i.padding:2*i.padding,e.isRtl,n*o.width+a;if(1===n)return e.isRtl?n*o.width-(r.width+3*i.padding):n*o.width-(r.width+6*i.padding);if(n>.8)return e.isRtl?n*o.width-(r.width+3*i.padding):n*o.width-(r.width+6*i.padding)}else if(e.slope>0)return t.x2-(r.width+2*i.padding);return e.isRtl?t.x1-(r.width+2*i.padding):t.x1}(c,d,a,e,o,g),f=Math.min(d.y1,d.y2);null!==(v=c.label)&&void 0!==v&&v.stroke&&(t={type:"rect",x:c.isRtl?Math.max(h,u)-2:Math.max(h,u)+2,y:Math.abs(Math.max(f,p)-e.height),rx:3,ry:3,width:e.width+g.padding,height:e.height-2,stroke:m.stroke,fill:m.stroke});const y={type:"text",text:s,fill:null!==(w=null===(S=c.label)||void 0===S?void 0:S.stroke)&&void 0!==w?w:m.stroke,opacity:g.opacity,fontFamily:g.fontFamily,fontSize:g.fontSize,x:t?t.x+2:Math.max(h,u)+2,y:t?t.y+e.height-g.padding:Math.abs(Math.max(f,p)-g.padding/2),anchor:"start",title:s,maxWidth:n,width:e.width};(function(e,t,n,r,o){for(let i=0,a=e.length;i<a;i++){const a=e[i];if("text"===(null==a?void 0:a.type)&&Math.abs(a.x-t.x)<Math.max(a.width+r,t.width+r)&&Math.abs(a.y-t.y)<n.height+o)return!0}return!1})(l,y,e,u,p)||(t&&l.push(t),l.push(y))}}u&&p&&h&&(l.push(p,h),f&&l.push(f))}function z8(e){const t={value:e.value};return e.label&&(t.label=e.label.text),t}function j8(e){return void 0!==("function"==typeof e.value?e.value():e.value)}function N8(e,t){const n=e.min();if(n===e.max()){const r=function(e){const t=e.range();return 2===(null==t?void 0:t.length)&&t[0]>t[1]}(e);if(t<n)return r?2:-1;if(t>n)return r?-1:2}return e(t)}function q8(e,t){return e&&t&&Math.abs(e.x-t.x)<1e-15&&Math.abs(e.y-t.y)<1e-15}const F8={require:["chart","renderer"],defaultSettings:{layout:{displayOrder:0},style:{oob:{show:!0,width:10,fill:"#1A1A1A",stroke:"transparent",strokeWidth:0,opacity:1,text:{fontFamily:"Arial",stroke:"transparent",fill:"#fff",strokeWidth:0,opacity:1},triangle:{fill:"#4D4D4D",stroke:"transparent",strokeWidth:0,opacity:1},padding:{x:28,y:5}},line:{stroke:"#000"},label:{strokeWidth:0}}},preferredSize:()=>30,beforeRender(){this.blueprint=M8(),this.blueprint.width=this.rect.width,this.blueprint.height=this.rect.height,this.blueprint.x=this.rect.x,this.blueprint.y=this.rect.y,this.blueprint.crisp=!0},render(){let e=this.settings;if(this.lines={x:[],y:[]},this.lines.x=e.lines&&e.lines.x||[],this.lines.y=e.lines&&e.lines.y||[],0===this.lines.x.length&&0===this.lines.y.length)return[];const t={x0:[],x1:[],y0:[],y1:[]};this.lines.x=this.lines.x.filter(j8).map((e=>{if("function"==typeof e.value&&(e.value=e.value()),e.scale){let t=this.chart.scale(e.scale);const n=N8(t,e.value);return UZ(e,{scale:t,position:n})}return UZ(e,{position:e.value})})),this.lines.y=this.lines.y.filter(j8).map((e=>{if("function"==typeof e.value&&(e.value=e.value()),e.scale){let t=this.chart.scale(e.scale);const n=N8(t,e.value);return UZ(e,{scale:t,position:n,flipXY:!0})}return UZ(e,{position:e.value,flipXY:!0})})),this.lines.x=this.lines.x.filter((e=>!(e.position<0||e.position>1)||(t["x".concat(e.position>1?1:0)].push(z8(e)),!1))),this.lines.y=this.lines.y.filter((e=>!(!e.slope||0===e.slope)||(!(e.position<0||e.position>1)||(t["y".concat(e.position>1?1:0)].push(z8(e)),!1))));let n=[];return[...this.lines.x,...this.lines.y].forEach((r=>{if(!0===r.show||void 0===r.show){let o;if(r.slope&&0!==r.slope){const e=this.chart.scale({scale:"x"}),n=this.chart.scale({scale:"y"}),i=e.min(),a=e.max(),s=n.min(),l=n.max();o=JZ(JZ({},r),{},{x1:void 0,y1:void 0,x2:void 0,y2:void 0});const c=i*r.slope+r.value,u=a*r.slope+r.value,d=(s-r.value)/r.slope,p=(l-r.value)/r.slope;let h=[];O8(c,s,l)||(h[0]={x:N8(e,i),y:N8(n,c)}),O8(d,i,a)||(h[1]={x:N8(e,d),y:1}),O8(u,s,l)||(h[2]={x:N8(e,a),y:N8(n,u)}),O8(p,i,a)||(h[3]={x:N8(e,p),y:0});const f=h.filter((e=>!!e)).length;if(f>2&&function(e){q8(e[0],e[1])&&(e[1]=void 0),q8(e[1],e[2])&&(e[2]=void 0),q8(e[2],e[3])&&(e[3]=void 0),q8(e[3],e[0])&&(e[3]=void 0)}(h),h=h.filter((e=>!!e)),h.length<2)return void t["y".concat(c>l?0:1)].push(z8(r));o.x1=h[0].x,o.y1=h[0].y,o.x2=h[1].x,o.y2=h[1].y}else o=void 0;T8({chart:this.chart,blueprint:this.blueprint,renderer:this.renderer,p:r,settings:e,items:n,slopeLine:o})}})),e.style.oob.show&&function(e){let{blueprint:t,oob:n,settings:r,items:o}=e;const i=Object.keys(n);let a=r.style.oob||{};for(let e=0,r=i.length;e<r;e++){const r=i[e],s=n[r];if(s.length>0){let e=r.charAt(1),n="y"===r.charAt(0),i=a.padding.x+a.width,l=a.padding.y+a.width,c="bottom";c=n?"1"===e?"bottom":"top":"1"===e?"right":"left";let u=t.processItem({fn:t=>{let{width:r,height:o}=t,u=e*r+("1"===e?-i:i),d=n?l:o-l;return"arc"===a.type?{type:"path",d:I8(n?d:u,n?u:d,a.width,c),x:u,y:d,stroke:a.stroke,fill:a.fill,strokeWidth:a.strokeWidth||0}:{type:"circle",cx:u,cy:d,r:a.width,stroke:a.stroke,fill:a.fill,strokeWidth:a.strokeWidth||0,opacity:a.opacity,data:s}},flipXY:n}),d=u.cx||u.x,p=u.cy||u.y;const h=s.map((e=>e.label?"".concat(e.label," (").concat(e.value,")"):"(".concat(e.value,")"))),f=h.reduce(((e,t,n)=>0===n?t:"".concat(e,"\n\n").concat(t)),"");let m={type:"text",text:s.length||"",title:f,x:d-.4*a.width,y:p+.4*a.width,fontFamily:a.text.fontFamily,fontSize:"".concat(1.3*a.width,"px"),stroke:a.text.stroke,fill:a.text.fill,strokeWidth:a.text.strokeWidth||0,opacity:a.text.opacity},g={type:"path",d:P8(d,p,a.width,c),x:d,y:p,stroke:a.triangle.stroke,fill:a.triangle.fill,strokeWidth:a.triangle.strokeWidth||0,opacity:a.triangle.opacity};o.push(u,m,g)}}}({blueprint:this.blueprint,oob:t,settings:e,items:n}),n}};function W8(e){const t={type:"line",x1:0,x2:0,y1:0,y2:0,collider:{type:null}};return"top"===e.align||"bottom"===e.align?(t.x1=e.innerRect.x-e.outerRect.x,t.x2=t.x1+e.innerRect.width,t.y1=t.y2="top"===e.align?e.innerRect.height-e.padding:e.padding):(t.x1=t.x2="left"===e.align?e.innerRect.width-e.padding:e.padding,t.y1=e.innerRect.y-e.outerRect.y,t.y2=t.y1+e.innerRect.height),function(e,t){UZ(e,t.style)}(t,e),t}function B8(e){return"string"==typeof e||"number"==typeof e?e:"-"}function $8(e,t,n){n.layered||!n.stepSize?function(e,t){t.collider={type:"polygon",vertices:[{x:t.boundingRect.x,y:t.boundingRect.y},{x:t.boundingRect.x+t.boundingRect.width,y:t.boundingRect.y},{x:t.boundingRect.x+t.boundingRect.width,y:t.boundingRect.y+t.boundingRect.height},{x:t.boundingRect.x,y:t.boundingRect.y+t.boundingRect.height}]}}(0,t):n.tilted?function(e,t,n){const r=n.angle*(Math.PI/180),o=Math.max(n.stepSize/2,t.boundingRect.height/2),i="start"===t.anchor,a="end"===t.anchor&&r<0,s="start"===t.anchor&&r>=0,l=t.boundingRect.y+(s||a?t.boundingRect.height:0),c=[{x:t.x-o,y:l},{x:t.x+o,y:l}].map((e=>N6(e,r,{x:t.x,y:t.y}))),u={x:i?t.boundingRect.x+t.boundingRect.width+10:t.boundingRect.x-10,y:t.boundingRect.y+t.boundingRect.height},d={x:i?t.boundingRect.x+t.boundingRect.width+10:t.boundingRect.x-10,y:t.boundingRect.y},p=r>=0?[u,d]:[d,u];c.push(...p),t.collider={type:"polygon",vertices:c}}(0,t,n):function(e,t,n){if("bottom"===n.align||"top"===n.align){const r=e.position*n.innerRect.width+(n.innerRect.x-n.outerRect.x-n.stepSize/2);t.collider={type:"rect",x:r,y:0,width:r<0?n.stepSize+r:n.stepSize,height:n.innerRect.height}}else{const r=e.position*n.innerRect.height+(n.innerRect.y-n.outerRect.y-n.stepSize/2);t.collider={type:"rect",x:0,y:r,width:n.innerRect.width,height:r<0?n.stepSize+r:n.stepSize}}const r=t.collider;r.x=Math.max(r.x,0),r.y=Math.max(r.y,0);const o=r.x+r.width-(n.outerRect.x+n.outerRect.width);r.width=o>0?r.width-o:r.width;const i=r.y+r.height-(n.outerRect.y+n.outerRect.height);r.height=i>0?r.height-i:r.height}(e,t,n)}function H8(e,t){const n=isNaN(e.style.align)?.5:Math.min(Math.max(e.style.align,0),1);let r=0;if(e.tilted)r=e.stepSize*n;else{const o=t?e.textRect.height:e.textRect.width;r=Math.max(0,e.stepSize-o)*n}return r}function V8(e,t){var n,r;const o={type:"text",text:B8(e.label),x:0,y:0,maxWidth:t.maxWidth,maxHeight:t.maxHeight,tickValue:null!==(n=e.value)&&void 0!==n?n:null===(r=e.data)||void 0===r?void 0:r.value};return"top"===t.align||"bottom"===t.align?(o.x=e.start*t.innerRect.width+(t.innerRect.x-t.outerRect.x)+H8(t,!1),o.y="top"===t.align?t.innerRect.height:0,o.anchor=t.stepSize?"start":"middle",o.x+=isNaN(t.style.offset)?0:+t.style.offset):(o.y=e.start*t.innerRect.height+(t.innerRect.y-t.outerRect.y)+H8(t,!0),o.x="left"===t.align?t.innerRect.width:0,o.anchor="left"===t.align?"end":"start",o.baseline=t.stepSize?"text-before-edge":"central",o.y+=isNaN(t.style.offset)?0:+t.style.offset),function(e,t){["fill","fontSize","fontFamily"].forEach((n=>{e[n]=t.style[n]}))}(o,t),function(e,t){if(!t.tilted&&!t.stepSize)if("top"===t.align||"bottom"===t.align){const n=0,r=t.outerRect.width,o=Math.min(t.maxWidth/2,t.textRect.width/2),i=e.x-o,a=e.x+o;i<n?(e.anchor="start",e.x=t.innerRect.x-t.outerRect.x):a>r&&(e.anchor="end",e.x=t.innerRect.width+t.innerRect.x)}else{const n=0,r=t.outerRect.height,o=t.maxHeight/2,i=e.y-o,a=e.y+o;i<n?(e.y=t.innerRect.y-t.outerRect.y,e.baseline="text-before-edge"):a>r&&(e.y=t.innerRect.height+(t.innerRect.y-t.outerRect.y),e.baseline="text-after-edge")}}(o,t),function(e,t){"top"===t.align?e.y-=t.padding:"bottom"===t.align?e.y+=t.padding+t.maxHeight:"left"===t.align?e.x-=t.padding:"right"===t.align&&(e.x+=t.padding)}(o,t),function(e,t){if(t.tilted){const n=-t.angle,r=n*(Math.PI/180);"bottom"===t.align?(e.x-=t.maxHeight*Math.sin(r)/2,e.y-=t.maxHeight,e.y+=t.maxHeight*Math.cos(r)/2):e.x-=t.maxHeight*Math.sin(r)/3,e.transform="rotate(".concat(n,", ").concat(e.x,", ").concat(e.y,")"),e.anchor="bottom"===t.align==t.angle<0?"start":"end";const o=Math.cos(r)*t.maxWidth;if("bottom"===t.align==t.angle<0){const n=t.outerRect.width-t.paddingEnd;e.x+o>n&&(e.maxWidth=(n-e.x-10)/Math.cos(r))}else{const n=t.paddingEnd;e.x-o<n&&(e.maxWidth=(e.x-n-10)/Math.cos(r))}}}(o,t),function(e,t){e.boundingRect=t.textBounds(e)}(o,t),$8(e,o,t),o}function G8(e,t){const n={type:"line",x1:0,x2:0,y1:0,y2:0,collider:{type:null},tickValue:e.value};return"top"===t.align||"bottom"===t.align?(n.x1=n.x2=e.position*t.innerRect.width+(t.innerRect.x-t.outerRect.x),n.y1="top"===t.align?t.innerRect.height:0,n.y2="top"===t.align?n.y1-t.tickSize:n.y1+t.tickSize):(n.y1=n.y2=e.position*t.innerRect.height+(t.innerRect.y-t.outerRect.y),n.x1="left"===t.align?t.innerRect.width:0,n.x2="left"===t.align?n.x1-t.tickSize:n.x1+t.tickSize),function(e,t){UZ(e,t.style)}(n,t),function(e,t){"top"===t.align?(e.y1-=t.padding,e.y2-=t.padding):"bottom"===t.align?(e.y1+=t.padding,e.y2+=t.padding):"left"===t.align?(e.x1-=t.padding,e.x2-=t.padding):"right"===t.align&&(e.x1+=t.padding,e.x2+=t.padding)}(n,t),function(e,t){const n=e.strokeWidth/2;e.x1===t.innerRect.width?(e.x1-=n,e.x2-=n):0===e.x1?(e.x1+=n,e.x2+=n):e.y1===t.innerRect.height?(e.y1-=n,e.y2-=n):0===e.y1&&(e.y1+=n,e.y2+=n)}(n,t),n}function U8(e){return!e.isMinor&&e.position>=0&&e.position<=1}function Y8(e){let{rect:t,state:n,majorTicks:r,measure:o,horizontal:i}=e;return i?function(e){let{majorTicks:t,measureText:n,rect:r,state:o}=e;const i="layered"===o.labels.activeMode?2:1,a=r.width,s=t.map((e=>e.label)).map((e=>"".concat(e.slice(0,1)).concat(e.length>1?"…":""))).map(n).map((e=>e.width));for(let e=0;e<t.length;++e){const n=t[e];if(i*a*Math.abs(n.start-n.end)<s[e])return!0}return!1}({majorTicks:r,measureText:o,rect:t,state:n}):function(e){let{majorTicks:t,measureText:n,rect:r}=e;const o=r.height,i=n("M").height;return!(t.length<2)&&o*Math.abs(t[0].position-t[1].position)<i}({majorTicks:r,measureText:o,rect:t})}function K8(e){let{value:t,maxValue:n,minValue:r,range:o,modifier:i}=e;return isNaN(o)||isNaN(i)||(t=o*i),t>n&&(t=n),t<r&&(t=r),t}function X8(e){let{isDiscrete:t,rect:n,formatter:r,measureText:o,scale:i,settings:a,state:s}=e,l=0;const c={left:0,top:0,right:0,bottom:0},{maxLengthPx:u,minLengthPx:d}=a.labels;if(a.labels.show){const e=a.align,p="top"===e||"bottom"===e,h=p?n.inner.width:n.inner.height,f=i.ticks({settings:a,distance:h,formatter:r}).filter(U8),m=e=>{const t=o({text:e,fontSize:a.labels.fontSize,fontFamily:a.labels.fontFamily});return t.width=K8({value:t.width,maxValue:u,minValue:d}),t};if(t&&p&&"auto"===a.labels.mode&&(!function(e){let{majorTicks:t,measure:n,rect:r,state:o,settings:i}=e;const a=i.labels.maxGlyphCount,s="layered"===o.labels.activeMode?2:1,l=i.labels.tiltThreshold?i.labels.tiltThreshold:.7,c=n("…").width,u=r.width;let d=0,p=0;if(isNaN(a))for(let e=0;e<t.length;e++){const r=t[e],o=r.label,i=n(o).width*(o.length>1?l:1);if(p=s*u*Math.abs(r.start-r.end),i+c>p)return!0}else{const e=t.reduce(((e,t)=>Math.min(Math.abs(t.start-t.end),e)),1/0);if(p=s*u*e,d=n("M").width*l*a,d+c>p)return!0}return!1}({majorTicks:f,measure:m,rect:n.inner,state:s,settings:a})?s.labels.activeMode="horizontal":s.labels.activeMode="tilted"),!a.labels.filterOverlapping&&"tilted"!==s.labels.activeMode&&Y8({rect:n.inner,state:s,majorTicks:f,measure:m,horizontal:p})){return{size:Math.max(n.outer.width,n.outer.height),isToLarge:!0}}let g,y;if("tilted"===s.labels.activeMode){const e=Math.abs(a.labels.tiltAngle)*(Math.PI/180);g=t=>K8({value:t.width,maxValue:u,minValue:d})*Math.sin(e)+t.height*Math.cos(e)}else g=p?e=>e.height:e=>K8({value:e.width,maxValue:u,minValue:d});if(p&&"tilted"!==s.labels.activeMode)y=["M"];else if(isNaN(a.labels.maxGlyphCount))y=f.map((e=>e.label));else{let e="";for(let t=0;t<a.labels.maxGlyphCount;t++)e+="M";y=[e]}const _=y.map(m),b=_.map(g),x=Math.max(...b,0);if(l+=x,l+=a.labels.margin,"layered"===s.labels.activeMode&&(l*=2),"tilted"===s.labels.activeMode){const e="bottom"===a.align==a.labels.tiltAngle>=0,t=Math.abs(a.labels.tiltAngle)*(Math.PI/180),r=(x-m("M").height*Math.cos(t))/Math.sin(t),o=e=>Math.min(r,e.width)*Math.cos(t)+e.height,i=(t,r)=>{const o=f[r]?f[r].position:0;return e?t-o*n.inner.width:t-(1-o)*n.inner.width},s=Math.min(a.labels.maxEdgeBleed,Math.max(..._.map(o).map(i),0))+a.paddingEnd;if(c[e?"left":"right"]=s,!a.labels.filterOverlapping&&function(e){let{majorTicks:t,measureText:n,rect:r,bleedSize:o,angle:i}=e;if(t.length<2)return!1;if(0===i)return!0;const a=Math.abs(i),s=1/(Math.min(r.outer.width-o,r.inner.width)*Math.abs(t[0].position-t[1].position));return n("M").height>Math.sin(a*(Math.PI/180))/s}({majorTicks:f,measureText:m,rect:n,bleedSize:s,angle:a.labels.tiltAngle})){return{size:Math.max(n.outer.width,n.outer.height),isToLarge:!0}}}}return{size:l,edgeBleed:c}}const J8=(e,t,n)=>e.width*Math.abs(t.position-n.position);function Z8(e){let{layered:t,major:n,innerRect:r,outerRect:o,tick:i,index:a}=e;const s=t?2:1,l=n[a-s],c=n[a+s],u=l?J8(r,i,l)/2-2:1/0,d=c?J8(r,i,c)/2-2:1/0;return n.length<2?r.width:l?c?2*Math.min(u,d):(e=>{let{innerRect:t,outerRect:n,tick:r,prevWidth:o}=e;const i=t.x-n.x,a=n.width-t.width-i,s=t.width-t.width*r.position+a,l=2*Math.min(o,s),c=1===r.position?t.width/2-2:0;return Math.max(o,l,c)})({innerRect:r,outerRect:o,tick:i,prevWidth:u}):(e=>{let{innerRect:t,outerRect:n,tick:r,nextWidth:o}=e;const i=t.x-n.x,a=t.width*r.position+i,s=2*Math.min(o,a),l=0===r.position?t.width/2-2:0;return Math.max(o,s,l)})({innerRect:r,outerRect:o,tick:i,nextWidth:d})}function Q8(e){const t=e.innerRect,n={cx:t.width/2,cy:t.height/2},r=Math.min(t.height,t.width)/2*e.radius,o=r+e.style.strokeWidth,i={visible:!0,type:"path",arcDatum:{startAngle:e.startAngle,endAngle:e.endAngle},transform:"translate(0, 0) translate(".concat(n.cx,", ").concat(n.cy,")"),desc:{share:1,slice:{cornerRadius:0,innerRadius:r,outerRadius:o}},ticks:[]};return function(e,t){UZ(e,t.style)}(i,e),i}function e7(e,t,n,r){return{x:e+n*Math.cos(r),y:t+n*Math.sin(r)}}function t7(e,t){const n=t.innerRect,r={cx:n.width/2,cy:n.height/2},o=Math.min(n.height,n.width)/2*t.radius+t.padding,i=t.startAngle,a=t.endAngle,s=t.tickSize,l=a-i;let c=a-e.position*l;c-=Math.PI/2;const u=e7(r.cx,r.cy,o+s,c),d=e7(r.cx,r.cy,o,c),p={type:"line",x1:u.x,y1:u.y,x2:d.x,y2:d.y,value:e.value};return function(e,t){const n=JZ({},t.style);UZ(e,n)}(p,t),p}function n7(e){return"string"==typeof e||"number"==typeof e?e:"-"}function r7(e,t,n){let r;return r="left"===t?n.x:"right"===t?e.outerRect.width-n.x:Math.max(n.x,e.outerRect.width-n.x),r}function o7(e,t){const n=t.innerRect,r={cx:n.width/2,cy:n.height/2},o=Math.min(n.height,n.width)/2*t.radius+t.padding,i=t.startAngle,a=t.endAngle,s=t.tickSize,l=a-i,c=.2;let u,d;u="top"===t.align||"bottom"===t.align?a-e.position*l:i+e.position*l,d=u<-.2&&u>-Math.PI+c?"left":u>.2&&u<Math.PI-c?"right":"center",u-=Math.PI/2;const p=function(e,t,n,r){return{x:e+n*Math.cos(r),y:t+n*Math.sin(r)}}(r.cx,r.cy,o+s+6,u);let h;h="left"===d?"end":"right"===d?"start":"middle";const f={type:"text",text:n7(e.label),align:d,x:p.x,y:p.y,maxHeight:t.maxHeight,maxWidth:r7(t,d,p),anchor:h,baseline:"middle"};return function(e,t){["fill","fontSize","fontFamily"].forEach((n=>{e[n]=t.style[n]}))}(f,t),function(e,t){e.boundingRect=t.textBounds(e)}(f,t),function(e,t,n){let r,o;const i=parseFloat(n.fontSize)||0;r=t.y-i/2,o=e.innerRect.height-(t.y+i/2),(r<0||o<0)&&(n.text="")}(t,p,f),f}function i7(e){let t=0;return t+=e.paddingStart,t+=e.line.show?e.line.strokeWidth/2:0,t+=e.ticks.show?e.ticks.margin:0,t}function a7(e){let t=0;return t+=e.line.show?e.line.strokeWidth/2:0,t+=e.ticks.show?e.ticks.margin:0,t}function s7(e){let t=0;return t+=e.ticks.show?e.ticks.tickSize:0,t+=i7(e)+e.labels.margin,t}function l7(e,t){return e.map((e=>G8(e,t)))}function c7(e,t){return t?Math.abs(t.end-t.start):e.bandwidth()}function u7(e){let{textMetrics:t,settings:n,innerRect:r,scale:o,tilted:i,layered:a,tick:s}=e;const l=t.height,c=c7(o,s),u={width:0,height:l};if("left"===n.align||"right"===n.align)u.width=r.width-s7(n)-n.paddingEnd;else if(a)u.width=c*r.width*2;else if(i){const e=Math.abs(n.labels.tiltAngle)*(Math.PI/180);u.width=(r.height-s7(n)-n.paddingEnd-l*Math.cos(e))/Math.sin(e)}else u.width=c*r.width;return u.width=K8({value:u.width,maxValue:n.labels.maxLengthPx,minValue:n.labels.minLengthPx}),u}function d7(e){let{textMetrics:t,settings:n,innerRect:r,outerRect:o,tilted:i,layered:a,tick:s,index:l,major:c}=e;const u=t.height,d={width:0,height:u};if("left"===n.align||"right"===n.align)d.width=r.width-s7(n)-n.paddingEnd;else if(i){const e=Math.abs(n.labels.tiltAngle)*(Math.PI/180);d.width=(r.height-s7(n)-n.paddingEnd-u*Math.cos(e))/Math.sin(e)}else d.width=Z8({layered:a,major:c,innerRect:r,outerRect:o,tick:s,index:l});return d.width=K8({value:d.width,maxValue:n.labels.maxLengthPx,minValue:n.labels.minLengthPx}),d}function p7(e){let t;function n(){return t=d7,n}function r(){return t=u7,r}function o(e){let{settings:n,scale:r,innerRect:o,outerRect:i,measureText:a,ticks:s,state:l,textBounds:c}=e;const u=[],d=function(e){return e.filter((e=>!e.isMinor))}(s),p=function(e){return e.filter((e=>e.isMinor))}(s),h={innerRect:o,align:n.align,outerRect:i},f="tilted"===l.labels.activeMode,m="layered"===l.labels.activeMode;let g;if(n.arc&&(h.startAngle=n.arc.startAngle,h.endAngle=n.arc.endAngle,h.radius=n.arc.radius),n.line.show&&(h.style=n.line,h.padding=n.paddingStart,n.arc?u.push(Q8(h)):u.push(W8(h))),n.ticks.show&&(h.style=n.ticks,h.tickSize=n.ticks.tickSize,h.padding=i7(n),n.arc?(h.padding=a7(n),g=function(e,t){return e.map((e=>t7(e,t)))}(d,h)):g=l7(d,h)),n.labels.show){const e=s7(n);h.style=n.labels,h.padding=e,h.tilted=f,h.layered=m,h.angle=n.labels.tiltAngle,h.paddingEnd=n.paddingEnd,h.textBounds=c;const s=(e,s)=>{h.textRect=function(e){let{style:t,measureText:n,tick:r}=e;return n({text:r.label,fontSize:t.fontSize,fontFamily:t.fontFamily})}({tick:e,measureText:a,style:h.style});const l=t({textMetrics:h.textRect,settings:n,innerRect:o,outerRect:i,scale:r,tilted:f,layered:m,tick:e,major:d,index:s});h.maxWidth=l.width,h.maxHeight=l.height,h.stepSize=function(e){let{innerRect:t,scale:n,settings:r,tick:o}=e;return("top"===r.align||"bottom"===r.align?t.width:t.height)*c7(n,o)}({innerRect:o,scale:r,settings:n,tick:e})};let l=[];n.arc?(h.padding=function(e){let t=0;return t+=e.ticks.show?e.ticks.tickSize:0,t+=a7(e)+e.labels.margin,t}(n),l=function(e,t,n){return e.map(((e,r)=>{n(e,r);const o=o7(e,t);return o.data=e.data,o}))}(d,h,s)):l=!m||"top"!==n.align&&"bottom"!==n.align?function(e,t,n){return e.map(((e,r)=>{n(e,r);const o=V8(e,t);return o.data=e.data,o}))}(d,h,s):function(e,t,n,r){const o=t.padding,i=s7(n);return e.map(((e,a)=>{r(e,a);const s=i+t.maxHeight+n.labels.margin;t.layer=a%2,t.padding=a%2==0?o:s;const l=V8(e,t);return l.data=e.data,l}))}(d,h,n,s),n.labels.filterOverlapping&&function(e,t,n){let r=(t,n)=>d4(sQ(1,e[t].boundingRect),sQ(1,e[n].boundingRect));if(n&&n.tilted){const t=Math.abs(n.angle);r=(n,r)=>{const o=1/Math.abs(e[n].x-e[r].x),i=Math.sin(t*(Math.PI/180))/o;return e[n].boundingRect.height>i}}for(let n=0;n<=e.length-1;n++)for(let o=n+1;o<=Math.min(n+5,n+(e.length-1));o++)e[n]&&e[o]&&r(n,o)&&(o===e.length-1?(e.splice(n,1),t&&t.splice(n,1)):(e.splice(o,1),t&&t.splice(o,1)),o--,n--)}(l,g,h),u.push(...l)}return n.minorTicks&&n.minorTicks.show&&p.length>0&&(h.style=n.minorTicks,h.tickSize=n.minorTicks.tickSize,h.padding=function(e){return e.line.strokeWidth+e.minorTicks.margin}(n),u.push(...l7(p,h))),g&&u.push(...g),u}return n.build=o,r.build=o,e?r():n()}const h7={labels:{show:!0,tiltAngle:40,tiltThreshold:.7,maxEdgeBleed:1/0,margin:4,maxLengthPx:150,minLengthPx:0,mode:"auto",maxGlyphCount:NaN,align:.5,offset:0,filterOverlapping:!1},ticks:{show:!1,margin:0,tickSize:4},line:{show:!1},paddingStart:0,paddingEnd:10,align:"auto"},f7={labels:{show:!0,margin:4,maxLengthPx:150,minLengthPx:0,align:.5,offset:0,filterOverlapping:!0},ticks:{show:!0,margin:0,tickSize:8},minorTicks:{show:!1,tickSize:3,margin:0},line:{show:!0},paddingStart:0,paddingEnd:10,align:"auto"};const m7={require:["chart","renderer","dockConfig"],defaultSettings:{layout:{displayOrder:0,prioOrder:0},settings:{},style:{labels:"$label",ticks:"$guide-line",minorTicks:"$guide-line--minor",line:"$guide-line"}},created(){this.state={isDiscrete:!!this.scale.bandwidth,isHorizontal:!1,labels:{activeMode:"horizontal"},ticks:[],innerRect:{width:0,height:0,x:0,y:0},outerRect:{width:0,height:0,x:0,y:0},defaultDock:void 0,concreteNodeBuilder:void 0,settings:void 0},this.state.isDiscrete?this.state.defaultDock="bottom":this.state.defaultDock="left",this.setState(this.settings)},setState(){this.state.isDiscrete=!!this.scale.bandwidth,this.state.settings=function(e){let{state:t,style:n,settings:r}=e;const o=UZ(!0,{},t.isDiscrete?h7:f7,n),i=UZ(!0,{},o,r.settings),a=r.layout.dock||t.defaultDock;i.dock=a,i.align=function(e,t){const n=["top","bottom"],r=["left","right"];return-1!==n.indexOf(e)&&-1===r.indexOf(t)||-1!==r.indexOf(e)&&-1===n.indexOf(t)?e:t}(r.settings.align,a),i.labels.tiltAngle=Math.max(-90,Math.min(i.labels.tiltAngle,90));const{paddingStart:s,paddingEnd:l}=i;return i.paddingStart="function"==typeof s?s.call(null):s,i.paddingEnd="function"==typeof l?l.call(null):l,i}(this),this.state.concreteNodeBuilder=p7(this.state.isDiscrete),this.dockConfig.dock(this.state.settings.dock),this.state.isHorizontal="top"===this.state.settings.align||"bottom"===this.state.settings.align,this.state.labels.activeMode=function(e,t,n){const r=t.labels.mode;return n&&e.isHorizontal?"auto"===r?e.labels.activeMode:-1!==["layered","tilted"].indexOf(t.labels.mode)&&-1!==["top","bottom"].indexOf(t.dock)?r:"horizontal":"horizontal"}(this.state,this.state.settings,this.state.isDiscrete)},preferredSize(e){const{formatter:t,state:n,scale:r}=this,o=this.state.isHorizontal?e.inner.width:e.inner.height;this.state.pxScale=y6(r,o);const i=function(e){let{isDiscrete:t,rect:n,formatter:r,measureText:o,scale:i,settings:a,state:s}=e,l=0;const{size:c,edgeBleed:u,isToLarge:d}=X8({isDiscrete:t,rect:n,formatter:r,measureText:o,scale:i,settings:a,state:s});if(l+=c,d)return{size:l};if(a.ticks.show&&(l+=a.ticks.margin,l+=a.ticks.tickSize),a.minorTicks&&a.minorTicks.show){const e=a.minorTicks.margin+a.minorTicks.tickSize;e>l&&(l=e)}if(a.line.show){const e=a.line.strokeWidth/2;l+=e,u[function(e){switch(e){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left";default:return e}}(a.align)]=Math.ceil(e)}return l+=a.paddingStart,l+=a.paddingEnd,{size:l,edgeBleed:u}}({isDiscrete:this.state.isDiscrete,rect:{inner:e.inner,outer:e.outer},formatter:t,measureText:this.renderer.measureText,scale:this.state.pxScale,settings:this.state.settings,state:n});return i},beforeUpdate(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{settings:t}=e;this.setState(t)},resize(e){const{inner:t,outer:n}=e,r=UZ({},t,function(e){let{align:t,inner:n}=e;return"left"===t?{x:n.width+n.x}:"right"===t||"bottom"===t?n:{y:n.y+n.height}}({align:this.state.settings.align,inner:t})),o=n||r;return UZ(this.state.innerRect,r),UZ(this.state.outerRect,o),n},beforeRender(){const{scale:e,formatter:t}=this,n=this.state.isHorizontal?this.state.innerRect.width:this.state.innerRect.height;this.state.pxScale=y6(e,n),this.state.ticks=this.state.pxScale.ticks({distance:n,formatter:t}).filter((e=>e.position>=0&&e.position<=1))},render(){const{state:e}=this,t=[];return t.push(...this.state.concreteNodeBuilder.build({settings:this.state.settings,scale:this.state.pxScale,innerRect:this.state.innerRect,outerRect:this.state.outerRect,measureText:this.renderer.measureText,textBounds:this.renderer.textBounds,ticks:this.state.ticks,state:e})),E8.multiple(t),t}};const g7={render:()=>[]};function y7(e,t,n){let r="";if("function"==typeof e)r=e();else if("string"==typeof e)r=e;else if(n){const e=(n.data().fields||[]).map((e=>e.title()));r=e.join(t)}return r}function _7(e,t){let n="middle";return"left"===e?"top"===t?n="end":"bottom"===t&&(n="start"):"right"===e?"top"===t?n="start":"bottom"===t&&(n="end"):"left"===t?n="start":"right"===t&&(n="end"),n}const b7={require:["renderer","chart"],defaultSettings:{layout:{dock:"bottom",displayOrder:0,prioOrder:0},settings:{paddingStart:5,paddingEnd:5,paddingLeft:0,paddingRight:0,anchor:"center",join:", ",maxLengthPx:NaN},style:{text:"$title"}},created(){this.definitionSettings=this.settings.settings;const e=this.settings.text,t=this.definitionSettings.join;this.title=y7(e,t,this.scale)},preferredSize(){return this.renderer.measureText({text:this.title,fontSize:this.style.text.fontSize,fontFamily:this.style.text.fontFamily}).height+this.definitionSettings.paddingStart+this.definitionSettings.paddingEnd},render(){const{title:e,definitionSettings:t,rect:n}=this,r=[];return r.push(function(e){let{title:t,definitionSettings:n,dock:r,rect:o,measureText:i,style:a}=e;const s={type:"text",text:t,x:0,y:0,dx:0,dy:0,anchor:_7(r,n.anchor),baseline:"alphabetical",stroke:"transparent",strokeWidth:0,fontWeight:"normal"};UZ(s,a.text);const l=i(s);if("top"===r||"bottom"===r){let e=o.width/2;"left"===n.anchor?e=n.paddingLeft||0:"right"===n.anchor&&(e=o.width-(n.paddingRight||0)),s.x=e,s.y="top"===r?o.height-n.paddingStart:n.paddingStart+l.height,s.dy="top"===r?-l.height/6:-l.height/3,s.maxWidth=.8*o.width}else{let e=o.height/2;"top"===n.anchor?e=n.paddingStart:"bottom"===n.anchor&&(e=o.height-n.paddingStart),s.y=e,s.x="left"===r?o.width-n.paddingStart:n.paddingStart,s.dx="left"===r?-l.height/3:l.height/3;const t="left"===r?270:90;s.transform="rotate(".concat(t,", ").concat(s.x+s.dx,", ").concat(s.y+s.dy,")"),s.maxWidth=.8*o.height}return isNaN(n.maxLengthPx)||(s.maxWidth=Math.min(s.maxWidth,n.maxLengthPx)),s}({title:e,dock:this.settings.layout.dock,definitionSettings:t,rect:n,measureText:this.renderer.measureText,style:this.style})),r},beforeUpdate(e){e.settings&&(UZ(this.settings,e.settings),this.definitionSettings=e.settings.settings);const t=this.settings.text,n=this.definitionSettings.join;this.title=y7(t,n,this.scale)}};function x7(e,t){const n=e.settings.layout.dock,r=e.settings.settings.invert,o="top"===n||"bottom"===n,i=o?"width":"height",a=e.rect[i],s=e.chart.scroll(e.settings.scroll);let l;{let e=t[o?"x":"y"];r&&(e=a-e);const n=s.getState();l={startOffset:e,startScroll:n.start,swipe:!1};const i=e/a*(n.max-n.min)+n.min;i<n.start?l.startScroll=i:i>n.start+n.viewSize&&(l.startScroll=i-n.viewSize)}return{update:e=>{let t=e[o?"x":"y"];if(r&&(t=a-t),!l.swipe){if(Math.abs(l.startOffset-t)<=1)return;l.swipe=!0}const n=s.getState(),i=(t-l.startOffset)/a*(n.max-n.min),c=l.startScroll+i;s.moveTo(c)},end:e=>{let t=e[o?"x":"y"];r&&(t=a-t);const n=s.getState();if(l.swipe){const e=(t-l.startOffset)/a*(n.max-n.min),r=l.startScroll+e;s.moveTo(r)}else{const e=t/a*(n.max-n.min)+n.min-n.viewSize/2;s.moveTo(e)}}}}function v7(e,t){const n=t.element().getBoundingClientRect();return{x:e.center.x-n.left,y:e.center.y-n.top}}const w7={require:["chart","renderer"],on:{panStart(e){const t=v7(e,this.renderer),n={x:t.x-e.deltaX,y:t.y-e.deltaY};this.currentMove=x7(this,n),this.currentMove.update(t)},panMove(e){if(!this.currentMove)return;const t=v7(e,this.renderer);this.currentMove.update(t)},panEnd(e){if(!this.currentMove)return;const t=v7(e,this.renderer);this.currentMove.end(t),this.currentMove=null},panCancel(){this.currentMove=null},tap(e){const t=v7(e,this.renderer);x7(this,t).end(t)}},defaultSettings:{settings:{backgroundColor:"#eee",thumbColor:"#ccc",width:16}},preferredSize:function(e){const t=this.chart.scroll(this.settings.scroll).getState();if(t.viewSize>=t.max-t.min){return Math.max(e.width,e.height)}return this.settings.settings.width},render:function(e){const t=this.settings.layout.dock,n=this.settings.settings.invert,r="top"===t||"bottom"===t,o=r?"width":"height",i=this.rect[o],a=this.chart.scroll(this.settings.scroll).getState();let s=i*(a.start-a.min)/(a.max-a.min);const l=i*a.viewSize/(a.max-a.min);return n&&(s=i-s-l),e("div",{style:{position:"relative",width:"100%",height:"100%",background:this.settings.settings.backgroundColor,pointerEvents:"auto"}},[].concat(e("div",{class:"scroller",style:{position:"absolute",[r?"left":"top"]:"".concat(s,"px"),[r?"top":"left"]:"25%",[r?"height":"width"]:"50%",[o]:"".concat(Math.max(1,l),"px"),background:this.settings.settings.thumbColor}})))},renderer:"dom"};function S7(e){let{h:t,isVertical:n,value:r,pos:o,align:i,borderHit:a,state:s,idx:l}=e;const c="end"!==i,u=c?{left:"0",top:"0"}:{right:"0",bottom:"0"};let d=0,p="100%",h="100%";return s.targetRect&&"start"===s.settings.bubbles.align?(p="".concat(s.targetRect.x+s.targetRect.width,"px"),h="".concat(s.targetRect.y+s.targetRect.height,"px")):s.targetRect&&"end"===s.settings.bubbles.align&&(d=n?s.targetRect.x:s.targetRect.y,p="".concat(s.rect.width-d,"px"),h="".concat(s.rect.height-d,"px")),c||(o-=a),t("div",{onmouseover(e){e.srcElement.children[0].style.backgroundColor="#000",e.srcElement.children[0].style[n?"height":"width"]="2px"},onmouseout(e){e.srcElement.children[0].style.backgroundColor=s.style.line.stroke,e.srcElement.children[0].style[n?"height":"width"]="1px"},"data-value":r,"data-key":[s.key,"edge",l].join("-"),style:{cursor:n?"ns-resize":"ew-resize",position:"absolute",left:"".concat(n?d:o,"px"),top:"".concat(n?o:d,"px"),height:n?"".concat(a,"px"):h,width:n?p:"".concat(a,"px"),pointerEvents:"auto"}},[t("div",{style:UZ({backgroundColor:s.style.line.stroke,position:"absolute",height:n?"".concat(1,"px"):"100%",width:n?"100%":"".concat(1,"px"),pointerEvents:"none"},u)})])}function C7(e){let{h:t,isVertical:n,label:r,otherValue:o,rangeIdx:i,idx:a,pos:s,align:l,state:c,value:u}=e;const d="end"!==l,p="outside"===c.settings.bubbles.placement;let h,f="none";n?(h=d?"left":"right",p&&(f=d?"translate(-100%, 0px)":"translate(100%, 0px)")):(h=d?"top":"bottom",p&&(f=d?"translate(0px, -100%)":"translate(0px, 100%)"));let m=c.edit&&c.edit.rangeIdx===i&&c.edit.bubbleIdx===a;const g={position:"relative",borderRadius:"".concat(c.style.bubble.borderRadius,"px"),border:"".concat(c.style.bubble.strokeWidth,"px solid ").concat(c.style.bubble.stroke),backgroundColor:c.style.bubble.fill,color:c.style.bubble.color,fontFamily:c.style.bubble.fontFamily,fontSize:c.style.bubble.fontSize,padding:"4px 8px",textAlign:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"150px",minWidth:"50px",minHeight:"1em",pointerEvents:"auto",transform:n?"translate(0,-50%)":"translate(-50%,0)",cursor:n?"ns-resize":"ew-resize"};let y=c.style.bubble.stroke;const _=m?t("input",{type:"text",value:u,style:JZ(JZ({},g),{},{textAlign:"start",textOverflow:"",fontSize:"13px"}),onkeyup(e){if("Enter"===e.key){e.preventDefault(),e.stopPropagation();const t=parseFloat(e.target.value);isNaN(t)?(y="rgba(230, 78, 78, 0.6)",e.target.style.border="".concat(c.style.bubble.strokeWidth,"px solid ").concat(y)):c.onEditConfirmed(i,t,o)}else"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),c.onEditCanceled())}}):t("div",{"data-key":[c.key,"bubble",i,a].join("-"),"data-other-value":o,"data-idx":i,"data-bidx":a,style:g},[r]);return t("div",{style:{position:"absolute",[h]:"0",[n?"top":"left"]:"".concat(s,"px"),transform:f}},[_])}function E7(e){let{h:t,isVertical:n,top:r,height:o,color:i,on:a,opacity:s}=e;return t("div",UZ({style:{backgroundColor:i,opacity:s,position:"absolute",left:n?0:"".concat(r,"px"),top:n?"".concat(r,"px"):0,height:n?"".concat(o,"px"):"100%",width:n?"100%":"".concat(o,"px"),pointerEvents:"auto"}},a),[])}function k7(e){let{borderHit:t,els:n,isVertical:r,state:o,vStart:i,vEnd:a,idx:s}=e,l=0;o.targetRect&&(l=r?o.targetRect.y:o.targetRect.x);const c=!!o.scale,u=c?o.scale.norm(i)*o.size:i,d=c?o.scale.norm(a)*o.size:a,p=Math.abs(u-d),h=Math.min(u,d)+l,f=h+p;if(o.targetRect){const e=o.targetFillRect||o.targetRect,t=r?e.height:e.width,s=c?o.scale.norm(i)*t:i,l=c?o.scale.norm(a)*t:a,u=Math.abs(s-l),d=Math.min(s,l),p={h:o.h,isVertical:r,top:d,height:u,color:o.style.target.fill,opacity:o.style.target.opacity};o.style.target.opacity<.8&&(p.on={onmouseover(e){e.srcElement.style.opacity=o.style.target.opacity+.1},onmouseout(e){e.srcElement.style.opacity=o.style.target.opacity}}),n.push(o.h("div",{style:{position:"absolute",left:"".concat(e.x,"px"),top:"".concat(e.y,"px"),height:"".concat(e.height,"px"),width:"".concat(e.width,"px")}},[E7(p)]))}const m=u<d?i:a,g=u<d?a:i,[y,_]=c?o.scale.domain():[Math.min(i,a),Math.max(i,a)],b=m+1e-5>=y&&m-1e-5<=_,x=g-1e-5<=_&&g+1e-5>=y;b&&n.push(S7({h:o.h,isVertical:r,borderHit:t,value:m,pos:h,align:"start",state:o,idx:s})),x&&n.push(S7({h:o.h,isVertical:r,borderHit:t,value:g,pos:f,align:"end",state:o,idx:s}));const v=o.settings.bubbles;if(v&&v.show){v.fontSize,v.fontFamily,v.fill;const e=[i,a];b&&n.push(C7({h:o.h,isVertical:r,align:v.align,rangeIdx:s,idx:0,otherValue:g,value:m,label:"".concat(o.format(m,e)),pos:h,state:o})),x&&n.push(C7({h:o.h,isVertical:r,align:v.align,rangeIdx:s,idx:1,otherValue:m,value:g,label:"".concat(o.format(g,e)),pos:f,state:o}))}}function M7(e){const t=e.active.limitHigh-e.active.end,n=e.active.limitLow-e.active.start;let r=e.current-e.start;return r=r<0?Math.max(r,n):Math.min(r,t),r}function R7(e){let t=[];const n=0===e.direction;if(Array.isArray(e.ranges)&&e.ranges.forEach(((r,o)=>{e.active&&o===e.active.idx||k7({borderHit:5,els:t,isVertical:n,state:e,vStart:Math.min(r.min,r.max),vEnd:Math.max(r.min,r.max),idx:o})})),e.active){let r=e.start,o=e.current;if(-1!==e.active.idx)if("foo"===e.active.mode)r=Math.min(e.active.start,e.active.end),o=Math.max(e.active.start,e.active.end);else if("modify"===e.active.mode)r=Math.min(e.start,e.current),o=Math.max(e.start,e.current);else{const t=M7(e);r=e.active.start+t,o=e.active.end+t}k7({borderHit:5,els:t,isVertical:n,state:e,vStart:r,vEnd:o,idx:e.active.idx})}return t}function A7(e){return{min:e.scale.min(),max:e.scale.max()}}function I7(e){return{min:0,max:e.direction?e.rect.width:e.rect.height}}function P7(e,t,n){let r,o,i=e.ranges,a=-1;for(r=0;r<i.length;r++){if(i[r].min<=t&&t<=i[r].max){a=r,n.min=r?i[r-1].max:n.min,n.max=r+1<i.length?i[r+1].min:n.max;break}if(t<i[r].min){n.max=i[r].min,n.min=r?i[r-1].max:n.min;break}}-1===a&&i.length&&r>=i.length&&(n.min=i[i.length-1].max),-1!==a&&(o={idx:a,start:i[a].min,end:i[a].max,limitLow:n.min,limitHigh:n.max,mode:"foo"}),e.active=o}function O7(e){e.renderer.render(R7(e))}function L7(e,t){if(!t||!t.isActive())return[];const n=e.scale.data(),r=(n&&n.fields||[]).map((e=>e.id())),o=t.brushes().filter((e=>"range"===e.type&&-1!==r.indexOf(e.id)))[0];return o?o.brush.ranges():[]}function D7(e,t){let n,r=1/0;const o=t.domain(),i=t.bandwidth()/2;for(let a=0;a<o.length;++a){const s=Math.abs(e-i-t(o[a]));s<r&&(r=s,n=o[a])}return n}function T7(e,t){return Math.min(...e)<=Math.max(...t)&&Math.max(...e)>=Math.min(...t)}function z7(e){const t=e.reduce(((e,t)=>(e.push(...rQ(t.bounds)),e)),[]);return oQ(t)}const j7={require:["chart","settings","renderer"],defaultSettings:{settings:{bubbles:{show:!0,align:"start"}},style:{bubble:"$label-overlay",line:"$shape-guide--inverted",target:"$selection-area-target"}},renderer:"dom",on:{rangeStart(e){this.start(e)},rangeMove(e){this.move(e)},rangeEnd(e){this.end(e)},rangeClear(e){this.clear(e)},bubbleStart(e){this.bubbleStart(e)}},created(){this.state={key:this.settings.key||"brush-range"}},beforeRender(e){this.state.rect=e.size.computedInner},renderRanges(){this.state.started||(this.state.ranges=L7(this.state,this.state.brushInstance),this.state.active=null,O7(this.state))},render(e){const t=this.settings.settings;this.state.direction="vertical"===t.direction?0:1;const n=this.renderer.element().getBoundingClientRect(),r=this.state.rect[0===this.state.direction?"height":"width"];let o=y6(this.chart.scale(t.scale),r);const i=function(e){const t={targetRect:null,targetFillRect:null,scale:null,size:null},n=e.settings.settings,r=n.target&&(n.target.components||(n.target.component?[n.target.component]:[])).map((t=>e.chart.component(t))).filter((e=>!!e&&!!e.rect)),o=n.target&&n.target.selector?e.chart.findShapes(n.target.selector):[],i=n.target&&n.target.fillSelector?e.chart.findShapes(n.target.fillSelector):[];if(o.length>0){const r=z7(o);if(t.size=r[0===e.state.direction?"height":"width"],t.scale=y6(e.chart.scale(n.scale),t.size),t.targetRect=r,i.length>0){const e=z7(i);t.targetFillRect=e}}else if(r&&r.length>0){const n=r.slice(1).reduce(((e,t)=>({x0:Math.min(e.x0,t.rect.computedInner.x),y0:Math.min(e.y0,t.rect.computedInner.y),x1:Math.max(e.x1,t.rect.computedInner.x+t.rect.computedInner.width),y1:Math.max(e.y1,t.rect.computedInner.y+t.rect.computedInner.height)})),{x0:r[0].rect.computedInner.x,y0:r[0].rect.computedInner.y,x1:r[0].rect.computedInner.x+r[0].rect.computedInner.width,y1:r[0].rect.computedInner.y+r[0].rect.computedInner.height});t.targetRect={x:n.x0-e.state.rect.x,y:n.y0-e.state.rect.y,width:n.x1-n.x0,height:n.y1-n.y0}}return t}(this);if(o=i.scale?i.scale:o,this.state.targetRect=i.targetRect,this.state.targetFillRect=i.targetFillRect,this.state.size=null===i.size?r:i.size,this.state.settings=t,this.state.style=this.style,this.state.offset=n,this.state.brush="object"==typeof t.brush?t.brush.context:t.brush,this.state.brushInstance=this.chart.brush(this.state.brush),this.state.renderer=this.renderer,this.state.multi=!!t.multiple,this.state.h=e,this.state.onEditConfirmed=(e,t,n)=>{this.state.edit=null,function(e,t,n,r){let o=e.ranges.map((e=>({min:e.min,max:e.max})));const i=e.scale.min(),a=e.scale.max();o[t]={min:Math.max(i,Math.min(n,r)),max:Math.min(a,Math.max(n,r))},e.ranges[t]=JZ({},o[t]);const s=e.scale.data();s&&s.fields&&s.fields.forEach((t=>{e.fauxBrushInstance||e.brushInstance.setRange(t.id(),o)}))}(this.state,e,t,n),this.emit("bubbleEnd"),O7(this.state)},this.state.onEditCanceled=()=>{this.state.edit=null,O7(this.state)},this.state.cssCoord={offset:0===this.state.direction?"top":"left",coord:0===this.state.direction?"y":"x",pos:0===this.state.direction?"deltaY":"deltaX"},this.state.format="function"==typeof t.bubbles.label&&((e,n)=>t.bubbles.label.call(void 0,{datum:e,data:n,scale:o,resources:{scale:this.chart.scale,formatter:this.chart.formatter}})),{}.hasOwnProperty.call(o,"norm")){this.state.editable=!0,this.state.observeBrush="object"==typeof t.brush&&t.brush.observe,this.state.fauxBrushInstance=null,this.state.findValues=null,this.state.scale=o;const e=this.state.scale.data();!this.state.format&&e&&e.fields&&e.fields[0]&&(this.state.format=e.fields[0].formatter())}else this.state.editable=!1,this.state.scale=x3(),this.state.scale.data=o.data,this.state.format||(this.state.format=(e,t)=>T7(o.range(),t)?function(e,t){const n=t.ticks(),r=t.domain().indexOf(D7(e,t));return-1!==r?n[r].label:"-"}(e,o):"-"),this.state.fauxBrushInstance=o6(),this.state.findValues=e=>function(e,t){const n=t.domain(),r=t.range(),o=[];return e.forEach((e=>{if(!T7(r,[e.min,e.max]))return;const i=n.indexOf(D7(e.min,t)),a=n.indexOf(D7(e.max,t));o.push.apply(o,n.slice(Math.min(i,a),Math.max(i,a)+1))})),o}(e,o);return this.state.ranges=L7(this.state,this.state.brushInstance),this.state.observeBrush||this.state.sourcedFromThisComponent?[R7(this.state)]:[]},mounted(){this.state.observeBrush&&this.state.brushInstance&&this.state.brushInstance.on("update",this.renderRanges)},beforeDestroy(){this.state.observeBrush&&this.state.brushInstance&&this.state.brushInstance.removeListener("update",this.renderRanges)},start(e){!function(e){let{state:t,e:n,renderer:r,ranges:o,targetSize:i}=e;if(t.started)return;t.edit=null;const a=n.center.x-n.deltaX,s=n.center.y-n.deltaY;let l=document.elementFromPoint(a,s);r.element().contains(l)||(l=null);const c={started:!0};t.offset=UZ({},r.element().getBoundingClientRect());const u=a-t.offset.left,d=s-t.offset.top;t.offset.left+=t.targetRect?t.targetRect.x:0,t.offset.top+=t.targetRect?t.targetRect.y:0,t.ranges=o(t,t.fauxBrushInstance||t.brushInstance);const p=n.center[t.cssCoord.coord]-n[t.cssCoord.pos]-t.offset[t.cssCoord.offset],h=n.center[t.cssCoord.coord]-t.offset[t.cssCoord.offset];c.current=t.scale.normInvert(h/t.size),c.start=t.scale.normInvert(p/t.size);let f=t.ranges;const m=A7(t);let g,y,_=-1;if(l&&l.hasAttribute("data-idx"))_=parseInt(l.getAttribute("data-idx"),10),m.min=_>0?f[_-1].max:m.min,m.max=_+1<f.length?f[_+1].min:m.max;else{for(g=0;g<f.length;g++){if(f[g].min<=c.start&&c.start<=f[g].max){_=g,m.min=g?f[g-1].max:m.min,m.max=g+1<f.length?f[g+1].min:m.max;break}if(c.start<f[g].min){m.max=f[g].min,m.min=g?f[g-1].max:m.min;break}}-1===_&&f.length&&g>=f.length&&(m.min=f[f.length-1].max)}if(-1!==_||t.multi||(c.ranges=[],m.min=t.scale.min(),m.max=t.scale.max()),-1!==_)if(y={idx:_,start:f[_].min,end:f[_].max,limitLow:m.min,limitHigh:m.max,mode:"move"},l&&l.hasAttribute("data-other-value"))c.start=parseFloat(l.getAttribute("data-other-value")),y.mode="modify";else{let e=t.scale.norm(y.start)*t.size,n=t.scale.norm(y.end)*t.size;Math.abs(p-e)<=i?(c.start=y.end,y.mode="modify"):Math.abs(p-n)<=i&&(c.start=y.start,y.mode="modify")}else y={idx:-1,start:c.start,end:c.current,limitLow:m.min,limitHigh:m.max,mode:"current"};c.active=y,"modify"!==y.mode&&t.targetRect&&!h4(t.targetRect,{x:u,y:d})||Object.keys(c).forEach((e=>t[e]=c[e]))}({e:e,state:this.state,renderer:this.renderer,ranges:L7,targetSize:5})},end(){this.state.started&&(!function(e,t){e.started=!1,e.ranges=t(e,e.fauxBrushInstance||e.brushInstance);const n=A7(e);P7(e,e.current,n)}(this.state,L7),O7(this.state),this.state.sourcedFromThisComponent=!0,this.state.active=null)},move(e){this.state.started&&(!function(e,t){const n=(t.center[e.cssCoord.coord]-e.offset[e.cssCoord.offset])/e.size,r=e.scale.normInvert(n);e.current=Math.max(Math.min(r,e.active.limitHigh),e.active.limitLow)}(this.state,e),function(e){let t=e.ranges.map((e=>({min:e.min,max:e.max})));if(-1!==e.active.idx)if("modify"===e.active.mode)t[e.active.idx].min=Math.min(e.start,e.current),t[e.active.idx].max=Math.max(e.start,e.current);else{const n=M7(e);t[e.active.idx].min+=n,t[e.active.idx].max+=n}else t.push({min:Math.min(e.start,e.current),max:Math.max(e.start,e.current)});const n=e.scale.data();n&&n.fields&&n.fields.forEach((n=>{if(e.fauxBrushInstance){let r=L7(e,e.fauxBrushInstance),o=e.findValues(r),i=e.findValues(t),a=i.filter((e=>-1===o.indexOf(e))),s=o.filter((e=>-1===i.indexOf(e))),l=a.map((e=>({key:n.id(),value:e}))),c=s.map((e=>({key:n.id(),value:e})));e.brushInstance.addAndRemoveValues(l,c),e.fauxBrushInstance.setRange(n.id(),t)}else e.brushInstance.setRange(n.id(),t)}))}(this.state),O7(this.state))},clear(){this.state.fauxBrushInstance&&this.state.fauxBrushInstance.clear(),this.state.renderer.render([]),this.state.started=!1,this.state.active=null,this.state.sourcedFromThisComponent=!1},bubbleStart(e){if(!this.state.editable)return;const t=e.srcEvent||e,n=t.target,r={rangeIdx:parseInt(n.getAttribute("data-idx"),10),bubbleIdx:parseInt(n.getAttribute("data-bidx"),10)};if(isNaN(r.rangeIdx)||JSON.stringify(r)===JSON.stringify(this.state.edit))return;this.state.edit=r,t.stopPropagation(),t.stopImmediatePropagation(),t.preventDefault();const o=n.parentNode;O7(this.state);const i=o.querySelector("input");i.focus(),i.select()}};function N7(e){e.renderer.render(R7(e))}function q7(e){return e.rc.ranges()}function F7(e,t){const n={x:e.direction?t.min+e.rect.x:e.rect.x,y:e.direction?e.rect.y:t.min+e.rect.y,width:e.direction?t.max-t.min:e.rect.width+e.rect.x,height:e.direction?e.rect.height+e.rect.y:t.max-t.min};return e.chart.shapesAt(n,e.settings.brush)}const W7={require:["chart","settings","renderer"],defaultSettings:{settings:{bubbles:{show:!0,align:"start"}},style:{bubble:"$label-overlay",line:"$shape-guide--inverted",target:"$selection-area-target"}},renderer:"dom",on:{areaStart(e){this.start(e)},areaMove(e){this.move(e)},areaEnd(e){this.end(e)},areaClear(e){this.clear(e)}},created(){this.state={key:this.settings.key||"brush-area-dir"}},render(e){this.state.rect=this.rect;const t=this.settings.settings,n="vertical"===t.direction?0:1,r=this.state.rect[0===n?"height":"width"],o=this.renderer.element().getBoundingClientRect(),i=(t.target?t.target.components||[t.target.component]:[]).map((e=>this.chart.component(e))).filter((e=>!!e&&!!e.rect)),a=i[0]?i.slice(1).reduce(((e,t)=>({x0:Math.min(e.x0,t.rect.x),y0:Math.min(e.y0,t.rect.y),x1:Math.max(e.x1,t.rect.x+t.rect.width),y1:Math.max(e.y1,t.rect.y+t.rect.height)})),{x0:i[0].rect.x,y0:i[0].rect.y,x1:i[0].rect.x+i[0].rect.width,y1:i[0].rect.y+i[0].rect.height}):null;return this.state.targetRect=a?{x:a.x0-this.rect.x,y:a.y0-this.rect.y,width:a.x1-a.x0,height:a.y1-a.y0}:null,this.state.style=this.style,this.state.chart=this.chart,this.state.direction=n,this.state.settings=t,this.state.offset=o,this.state.rc=G3(),this.state.renderer=this.renderer,this.state.multi=!!t.multiple,this.state.h=e,this.state.size=r,this.state.cssCoord={offset:0===this.state.direction?"top":"left",coord:0===this.state.direction?"y":"x",pos:0===this.state.direction?"deltaY":"deltaX",area:0===this.state.direction?"height":"width"},this.state.format=function(e,t){return function(e,t,n){const r=Math.min(...n),o=Math.max(...n),i={x:e.direction?r+e.rect.x:e.rect.x,y:e.direction?e.rect.y:r+e.rect.y,width:e.direction?o-r:e.rect.width+e.rect.x,height:e.direction?e.rect.height+e.rect.y:o-r},a=e.chart.shapesAt(i,e.settings.brush);if(0===a.length)return"-";const s=a.reduce(((n,o)=>{const i=n.bounds,a=o.bounds;return t===r?i[e.cssCoord.coord]<=a[e.cssCoord.coord]?n:o:i[e.cssCoord.coord]+i[e.cssCoord.area]>=a[e.cssCoord.coord]+a[e.cssCoord.area]?n:o})),l=e.settings.brush.components.reduce(((e,t)=>e.key===s.key?e:t));return"function"==typeof e.settings.bubbles.label?e.settings.bubbles.label(s.data):Array.isArray(l.data)&&l.data.length?s.data[l.data[0]].label:s.data&&s.data.label?s.data.label:"-"}(this,e,t)},[]},start(e){!function(e){let{state:t,e:n,renderer:r,ranges:o,targetSize:i}=e;if(t.started)return;const a=n.center.x-n.deltaX,s=n.center.y-n.deltaY;let l=document.elementFromPoint(a,s);r.element().contains(l)||(l=null);const c={started:!0};t.offset=r.element().getBoundingClientRect(),t.ranges=o(t);const u=a-t.offset.left,d=s-t.offset.top,p=n.center[t.cssCoord.coord]-n[t.cssCoord.pos]-t.offset[t.cssCoord.offset],h=n.center[t.cssCoord.coord]-t.offset[t.cssCoord.offset];let f=h,m=p;c.start=p,c.current=h;let g=t.ranges;const y=I7(t);let _,b,x=-1;if(l&&l.hasAttribute("data-idx"))x=parseInt(l.getAttribute("data-idx"),10),y.min=x>0?g[x-1].max:y.min,y.max=x+1<g.length?g[x+1].min:y.max;else{for(_=0;_<g.length;_++){if(g[_].min<=m&&m<=g[_].max){x=_,y.min=_?g[_-1].max:y.min,y.max=_+1<g.length?g[_+1].min:y.max;break}if(m<g[_].min){y.max=g[_].min,y.min=_?g[_-1].max:y.min;break}}-1===x&&g.length&&_>=g.length&&(y.min=g[g.length-1].max)}if(-1!==x||t.multi||(c.ranges=[],y.min=0,y.max=t.direction?t.rect.width:t.rect.height),-1!==x)if(b={idx:x,start:g[x].min,end:g[x].max,limitLow:y.min,limitHigh:y.max,mode:"move"},l&&l.hasAttribute("data-other-value"))c.start=parseFloat(l.getAttribute("data-other-value")),b.mode="modify";else{let e=b.start,t=b.end;Math.abs(p-e)<=i?(c.start=b.end,b.mode="modify"):Math.abs(p-t)<=i&&(c.start=b.start,b.mode="modify")}else b={idx:-1,start:m,end:f,limitLow:y.min,limitHigh:y.max,mode:"current"};c.active=b,"modify"!==b.mode&&t.targetRect&&!h4(t.targetRect,{x:u,y:d})||Object.keys(c).forEach((e=>t[e]=c[e]))}({e:e,state:this.state,renderer:this.renderer,ranges:q7,targetSize:5})},end(){this.state.started&&(!function(e,t){e.started=!1,e.ranges=t(e);const n=I7(e);P7(e,e.current,n)}(this.state,q7),N7(this.state))},move(e){this.state.started&&(!function(e,t){const n=t.center[e.cssCoord.coord]-e.offset[e.cssCoord.offset];e.current=Math.max(Math.min(n,e.active.limitHigh),e.active.limitLow)}(this.state,e),function(e){const t=e.ranges.map((e=>({min:e.min,max:e.max})));if(-1!==e.active.idx)if("modify"===e.active.mode)t[e.active.idx].min=Math.min(e.start,e.current),t[e.active.idx].max=Math.max(e.start,e.current);else{const n=M7(e);t[e.active.idx].min=e.active.start+n,t[e.active.idx].max=e.active.end+n}else t.push({min:Math.min(e.start,e.current),max:Math.max(e.start,e.current)});e.rc.set(t);let n=[];t.forEach((t=>{n=[...n,...F7(e,t)]})),function(e,t){e.chart.brushFromShapes(t,e.settings.brush)}(e,n)}(this.state),N7(this.state))},clear(){this.state.rc&&this.state.rc.clear(),this.state.renderer.render([])}};function B7(e){const t="vertical"===e.direction,n=e.rect[t?"height":"width"],r=e.rect[t?"width":"height"];return function(e){const t=e.brush;if(!t||!t.isActive())return[];const n=e.scale.data(),r=(n&&n.fields||[]).map((e=>e.id())),o=t.brushes().filter((e=>"range"===e.type&&-1!==r.indexOf(e.id)))[0];return o?o.brush.ranges():[]}(e).map((o=>{const i=e.scale(o.min)*n,a=e.scale(o.max)*n,s=Math.min(i,a),l=Math.abs(i-a);return{type:"rect",fill:e.fill,opacity:e.opacity,x:t?0:s,width:t?r:l,y:t?s:0,height:t?l:r}}))}function $7(e,t,n,r){function o(){!function(e){e.renderer.render(B7(e))}(e)}function i(){!function(e){e.renderer.render(B7(e))}(e)}function a(){!function(e){e.renderer.render(B7(e))}(e)}e.brush=t,t&&(t.on("start",o),t.on("update",i),t.on("end",a),e.start=o,e.update=i,e.end=a,e.brush=t,e.scale=n,e.renderer=r)}function H7(e){e.brush&&(e.brush.removeListener("start",e.start),e.brush.removeListener("update",e.update),e.brush.removeListener("end",e.end)),e.start=void 0,e.update=void 0,e.end=void 0,e.brush=void 0,e.scale=void 0,e.renderer=void 0}const V7={require:["chart","settings","renderer"],defaultSettings:{settings:{}},preferredSize:()=>50,created(){this.state={}},render(){const e=this.settings.settings,t=this.chart.brush(e.brush),n=e.direction||"horizontal",r="horizontal"===n?this.rect.width:this.rect.height,o=y6(this.chart.scale(e.scale),r);return H7(this.state),$7(this.state,t,o,this.renderer),this.state.rect=this.rect,this.state.fill=e.fill||"#ccc",this.state.opacity=void 0!==e.opacity?e.opacity:1,this.state.direction=n,B7(this.state)},beforeDestroy(){H7(this.state)}};function G7(e,t){const n=t.center.x,r=t.center.y;return{x:n-e.left,y:r-e.top}}function U7(e,t,n){return T6(e,t.points[0])<n.settings.snapIndicator.threshold**2}function Y7(e,t){null==e.path.d?e.path.d="M".concat(t.x," ").concat(t.y," "):e.path.d+="L".concat(t.x," ").concat(t.y," "),e.points.push(t)}function K7(e){let{state:t,start:n=null,end:r=null}=e;null!==n&&(t.snapIndicator.x1=n.x,t.snapIndicator.y1=n.y),null!==r&&(t.snapIndicator.x2=r.x,t.snapIndicator.y2=r.y)}function X7(e,t){e.snapIndicator.visible=t}const J7={require:["chart","renderer","settings"],defaultSettings:{layout:{displayOrder:0},settings:{brush:{components:[]},snapIndicator:{threshold:75,strokeDasharray:"5, 5",stroke:"black",strokeWidth:2,opacity:.5},lasso:{fill:"transparent",stroke:"black",strokeWidth:2,opacity:.7,strokeDasharray:"20, 10"},startPoint:{r:10,fill:"green",stroke:"black",strokeWidth:1,opacity:1}}},on:{lassoStart(e){this.start(e)},lassoEnd(e){this.end(e)},lassoMove(e){this.move(e)},lassoCancel(){this.cancel()}},created(){this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}}},start(e){var t;this.state.active=!0,this.state.path={visible:!0,type:"path",d:null,fill:(t=this.settings.settings.lasso).fill,stroke:t.stroke,strokeWidth:t.strokeWidth,opacity:t.opacity,strokeDasharray:t.strokeDasharray,collider:{type:null}},this.state.snapIndicator=function(e){return{visible:!1,type:"line",x1:0,y1:0,x2:0,y2:0,strokeDasharray:e.strokeDasharray,stroke:e.stroke,strokeWidth:e.strokeWidth,opacity:e.opacity,collider:{type:null}}}(this.settings.settings.snapIndicator),this.state.startPoint=function(e){return{visible:!0,type:"circle",cx:0,cy:0,r:e.r,fill:e.fill,opacity:e.opacity,stroke:e.stroke,strokeWidth:e.strokeWidth,collider:{type:null}}}(this.settings.settings.startPoint),this.state.rendererBounds=this.renderer.element().getBoundingClientRect(),this.state.componentDelta=function(e,t){const n=e.element.getBoundingClientRect();return{x:t.left-n.left,y:t.top-n.top}}(this.chart,this.state.rendererBounds),this.state.brushConfig=function(e){return e.settings.brush.components.map((e=>({key:e.key,contexts:e.contexts||["lassoBrush"],data:e.data||[""],action:e.action||"add"})))}(this.settings);const n=G7(this.state.rendererBounds,e);Y7(this.state,n),K7({state:this.state,start:n}),function(e,t){e.startPoint.cx=t.x,e.startPoint.cy=t.y}(this.state,n)},move(e){if(!this.state.active)return;const t=G7(this.state.rendererBounds,e);U7(t,this.state,this.settings)?X7(this.state,!0):X7(this.state,!1),Y7(this.state,t),K7({state:this.state,end:t}),function(e,t){const n=[e.startPoint,e.path,e.snapIndicator].filter((e=>e.visible));t.render(n)}(this.state,this.renderer),function(e,t){if(e.active){const n=e.points[e.points.length-2],r=e.points[e.points.length-1];e.lineBrushShape.x1=n.x+e.componentDelta.x,e.lineBrushShape.y1=n.y+e.componentDelta.y,e.lineBrushShape.x2=r.x+e.componentDelta.x,e.lineBrushShape.y2=r.y+e.componentDelta.y;const o=t.shapesAt(e.lineBrushShape,{components:e.brushConfig});t.brushFromShapes(o,{components:e.brushConfig})}}(this.state,this.chart)},end(e){if(!this.state.active)return;X7(this.state,!1);U7(G7(this.state.rendererBounds,e),this.state,this.settings)&&function(e,t){if(e.active){const n=e.componentDelta.x,r=e.componentDelta.y,o=e.points.map((e=>({x:e.x+n,y:e.y+r}))),i=t.shapesAt({vertices:o},{components:e.brushConfig});t.brushFromShapes(i,{components:e.brushConfig})}}(this.state,this.chart),this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}},this.renderer.render([])},cancel(){var e,t;this.state.active&&(e=this.state,t=this.chart,e.brushConfig.forEach((e=>{e.contexts.forEach((e=>{t.brush(e).end()}))})),this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}},this.renderer.render([]))},render(){}};function Z7(e,t,n,r,o){let i,a=0,s=t.length-1;for(;a<s;){let l=Math.floor((a+s)/2);i=o(t[l]),i[n]+i[r]<e[n]?a=l+1:s=l}return a}function Q7(e){let{orientation:t,targetNodes:n,labels:r,container:o}=e,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Z7;const a=[],s="v"===t?"x":"y",l="v"===t?"width":"height",c=e=>e.textBounds,u=e=>e.node.localBounds;return(e,t)=>{const{textBounds:d,node:p}=r[t];if(d[s]<o[s]||d[s]+d[l]>o[s]+o[l])return!1;for(let e=i(d,a,s,l,c);e<a.length;e++)if(d4(d,a[e].textBounds))return!1;const h=i(d,n,s,l,u),f=d[s]+d[l];for(let e=h;e<n.length;e++){const t=n[e].node;if(f<t.localBounds[s])break;if(d4(d,t.localBounds)&&p!==t)return!1}return a.push(r[t]),!0}}const e9=4;function t9(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function n9(e){const t=typeof e;return("string"===t||"number"===t)&&""!==e}function r9(e){return JZ(JZ({type:"rect",rx:2,ry:2,fill:e.backgroundColor},e.backgroundBounds),{},{data:"".concat(e.data," ").concat(e.text),rotation:e.transform&&e.transform.match(/rotate/gi)?"rotated":"horizontal"})}function o9(e,t,n){return n?e.width>=t.height:e.width>=t.width}function i9(e,t,n){return n?e.height>=t.width:e.height>=t.height}function a9(e,t,n,r,o){let i,a;return"v"===e?(i=r||o||o9(t,n,!0),a=i9(t,n,!r)):(i=o9(t,n),a=o||i9(t,n,!1)),i&&a}function s9(e,t,n,r){return e+.5*t+(r-.5)*(t-n)-.5*n}function l9(e,t,n){const r={type:"text",text:t,maxWidth:n.rotate?e.height:e.width,x:0,y:e.y,dx:0,dy:0,fill:n.fill,anchor:n.rotate?"end":"start",baseline:"central",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily},o=n.textMetrics;if(!n.overflow&&!function(e,t,n){return o9(e,t,n.rotate)&&i9(e,t,n.rotate)}(e,o,n))return!1;const i=.5*o.height;return n.rotate?(r.x=s9(e.x,e.width,o.height,n.align)+i,r.y=s9(e.y,e.height,o.width,n.justify),"right"===n.dock?r.transform="rotate(90, ".concat(r.x+r.dx,", ").concat(r.y+r.dy,") translate(").concat(o.width,", 0)"):r.transform="rotate(-90, ".concat(r.x+r.dx,", ").concat(r.y+r.dy,")")):(r.x=s9(e.x,e.width,o.width,n.align),r.y=s9(e.y,e.height,o.height,n.justify)+i),r}function c9(e){let{bar:t,view:n,direction:r,position:o,padding:i=e9,measured:a}=e;const s={};if(UZ(s,t),o&&"inside"!==o)if("up"===r||"down"===r){const e=Math.max(0,Math.min(t.y,n.height)),i=Math.max(0,Math.min(t.y+t.height,n.height));"outside"===o&&"up"===r||"opposite"===o&&"down"===r?(s.y=0,s.height=e):("outside"===o&&"down"===r||"opposite"===o&&"up"===r)&&(s.y=i,s.height=n.height-i)}else{const e=Math.max(0,Math.min(t.x,n.width)),i=Math.max(0,Math.min(t.x+t.width,n.width));"outside"===o&&"left"===r||"opposite"===o&&"right"===r?(s.x=0,s.width=e):("outside"===o&&"right"===r||"opposite"===o&&"left"===r)&&(s.x=i,s.width=n.width-i)}else;return function(e,t){const n=Math.max(0,Math.min(e.y,t.height)),r=Math.max(0,Math.min(e.y+e.height,t.height)),o=Math.max(0,Math.min(e.x,t.width)),i=Math.max(0,Math.min(e.x+e.width,t.width));e.x=o,e.width=i-o,e.y=n,e.height=r-n}(s,n),function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{top:r=e9,bottom:o=e9,left:i=e9,right:a=e9}=n,s="function"==typeof i?i(t):i,l="function"==typeof a?a(t):a,c="function"==typeof r?r(t):r,u="function"==typeof o?o(t):o;e.x+=s,e.width-=s+l,e.y+=c,e.height-=c+u}(s,a,i),s}function u9(e){let t,n,r,o,i,{direction:a,fitsHorizontally:s,measured:l,node:c,orientation:u,placementSettings:d,rect:p}=e,h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c9;const f=[],m="h"===u?"width":"height";for(i=0;i<d.length;i++)if(r=d[i],o=h({bar:c.localBounds,view:p,direction:a,position:r.position,padding:r.padding,measured:l}),f.push(o),t=!i||o[m]>t[m]?o:t,a9(u,o,l,s,r.overflow)){n=o;break}return n||(n=t,i=f.indexOf(n)),r=d[i],{bounds:n,placement:r}}function d9(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};const{top:i=e9,bottom:a=e9,left:s=e9,right:l=e9}=o,c="function"==typeof s?s(t):s,u="function"==typeof l?l(t):l,d="function"==typeof i?i(t):i,p="function"==typeof a?a(t):a,h=e.x+e.dx,f=e.y+e.dy,m=n?Math.min(t.width,r.height):Math.min(t.height,r.width),g=n?Math.min(t.height,r.height):Math.min(t.width,r.width),y=.5*t.height,_=1e-9;return{x:(n?h-y:h)-c-_,y:(n?f:f-y)-d-_,width:g+(c+u)-_,height:m+(d+p)-_}}function p9(e){let{chart:t,targetNodes:n,rect:r,fitsHorizontally:o,collectiveOrientation:i}=e,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u9,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l9,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Q7;const c=[],u={container:r,targetNodes:n,labels:[],orientation:i};let d,p,h,f,m,g,y,_,b,x,v,w,S,C;for(let e=0,l=n.length;e<l;e++){g=null,p=n[e],h=p.node,S=t9(h,t),b=p.direction,C="left"===b||"right"===b?"h":"v";for(let t=0;t<p.texts.length;t++){if(f=p.texts[t],!n9(f))continue;x=p.labelSettings[t],_=p.measurements[t],w=x.placements;const n=a({direction:b,fitsHorizontally:o,lblStngs:x,measured:_,node:h,orientation:C,placements:w,placementSettings:p.placementSettings[t],rect:r});if(g=n.bounds,v=n.placement,g&&v){var E;m=v.justify;const t="function"==typeof x.linkData?x.linkData(S,e):void 0,n="function"==typeof v.overflow?v.overflow(S,e):v.overflow;"up"===b&&(m=1-m),"opposite"===v.position&&(m=1-m),"left"===b&&(m=1-m);const r=!("h"===i||o);if(d=s(g,f,{justify:"h"===C?v.align:m,align:"h"===C?m:v.align,fontSize:x.fontSize,fontFamily:x.fontFamily,textMetrics:_,rotate:r,overflow:!!n,dock:null!==(E=x.dock)&&void 0!==E?E:"left"}),d){const n=d9(d,_,r,g,v.padding);y="function"==typeof v.fill?v.fill(JZ(JZ({},S),{},{textBounds:n}),e):v.fill,d.fill=y,void 0!==t&&(d.data=t),"object"==typeof v.background&&(d.backgroundColor="function"==typeof v.background.fill?v.background.fill(JZ(JZ({},S),{},{textBounds:n}),e):v.background.fill,void 0!==d.backgroundColor&&(d.backgroundBounds=d9(d,_,r,g,v.background.padding))),c.push(d),u.labels.push({node:h,textBounds:n})}}}}const k=c.filter(l(u));return[...k.filter((e=>void 0!==e.backgroundBounds)).map(r9),...k]}function h9(e){const t=2*Math.PI;return(e%t+t)%t}function f9(e,t){e.x+=t,e.width-=2*t,e.y+=t,e.height-=2*t}function m9(e){return{x:e.x,y:e.y-e.height/2,width:e.width,height:e.height}}function g9(e,t,n){let{x:r,y:o}=t;if(r*r+o*o>e*e)return null;let i=Math.sin(n),a=Math.cos(n),s=r*a-o*i,l=e*e-s*s;if(l<0)return null;let c=Math.sqrt(l);return{x:s*a+i*c,y:-s*i+a*c}}function y9(e){let t,n,{radius:r,size:o,angle:i}=e,{width:a,height:s}=o,l={x:a/2,y:s/2};switch(Math.floor(i/(Math.PI/2))){case 0:if(t=g9(r,l,i),!t)return null;t.y*=-1,n={x:-a,y:0};break;case 1:if(t=g9(r,l,Math.PI-i),!t)return null;n={x:-a,y:-s};break;case 2:if(t=g9(r,l,i-Math.PI),!t)return null;t.x*=-1,n={x:0,y:-s};break;case 3:if(t=g9(r,l,2*Math.PI-i),!t)return null;t.x*=-1,t.y*=-1,n={x:0,y:0};break;default:throw new Error("invalid angle")}return{x:t.x+n.x,y:t.y+n.y,width:a,height:s}}function _9(e){let{slice:t,measured:n,padding:r}=e,{start:o,end:i,innerRadius:a,outerRadius:s}=t,l=s-a-2*r,c=i-o;if(c<Math.PI){let e=(n.height/2+r)/Math.tan(c/2);e>a&&(l=s-e-2*r)}if(l<0||l<n.minReqWidth)return null;const u=h9((o+i)/2);let d=s-r,p={x:Math.sin(u)*d,y:-Math.cos(u)*d,width:l,height:n.height};return u<Math.PI?(p.angle=u-Math.PI/2,p.anchor="end"):(p.angle=u+Math.PI/2,p.anchor="start"),p}function b9(e){let{context:t,node:n,bounds:r}=e;let{start:o,end:i}=n.desc.slice;const a=h9((o+i)/2);switch(Math.floor(a/(Math.PI/2))){case 0:t.q1maxY=r.y-2,void 0===t.q2minY&&(t.q2minY=r.y+r.height+2);break;case 1:t.q2minY=r.y+r.height+2;break;case 2:t.q3minY=r.y+r.height+2;break;case 3:t.q4maxY=r.y-2,void 0===t.q3minY&&(t.q3minY=r.y+r.height+2)}}function x9(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function v9(e,t,n){const r={type:"text",text:t,maxWidth:e.width,x:e.x,y:e.y+("top"===e.baseline?e.height/2:0),fill:n.fill,anchor:e.anchor||"start",baseline:"middle",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily};if(!isNaN(e.angle)){let t=e.angle*(360/(2*Math.PI));r.transform="rotate(".concat(t,", ").concat(r.x,", ").concat(r.y,")")}return r}function w9(e){let t,n,{slice:r,direction:o,position:i,padding:a,measured:s,view:l,context:c,store:u}=e,{start:d,end:p,innerRadius:h,offset:f}=r;switch(i){case"into":t="rotate"===o?_9({slice:r,measured:s,padding:a}):function(e){let{slice:t,padding:n,measured:r}=e,{start:o,end:i,innerRadius:a,outerRadius:s}=t;const l=h9((o+i)/2);let c=y9({radius:s,size:{width:r.width+2*n+1,height:r.height+2*n},angle:l});return c?(c.baseline="top",f4(c,{x1:0,y1:0,x2:Math.sin(o)*s,y2:-Math.cos(o)*s})||f4(c,{x1:0,y1:0,x2:Math.sin(i)*s,y2:-Math.cos(i)*s})||i4({cx:0,cy:0,r:a},c)?null:(f9(c,n),c)):null}({slice:r,measured:s,padding:a});break;case"inside":n={start:d,end:p,innerRadius:0,outerRadius:h},t="rotate"===o?_9({slice:n,measured:s,padding:a}):function(e){let{slice:t,padding:n,measured:r,store:o}=e;const{start:i,end:a,outerRadius:s}=t,l=h9((i+a)/2);let c=y9({radius:s,size:{width:r.width+2*n+1,height:r.height+2*n},angle:l});return c?(c.baseline="top",f9(c,n),o.insideLabelBounds.some((e=>d4(e,c)))?null:(o.insideLabelBounds.push({x:c.x-4,y:c.y,width:c.width+8,height:c.height}),c)):null}({slice:n,measured:s,padding:a,store:u});break;case"outside":t="rotate"===o?function(e){let{slice:t,measured:n,padding:r,view:o}=e,{start:i,end:a,outerRadius:s,offset:l}=t,c=s+r,u=a-i;if(u<Math.PI&&(n.height/2+r)/Math.tan(u/2)>c)return null;const d=h9((i+a)/2);let p=Math.sin(d)*c,h=-Math.cos(d)*c,f=n.width+1,m=d%Math.PI;if(m>Math.PI/2&&(m=Math.PI-m),Math.cos(m)>.001){let e=h<0?o.y:o.y+o.height,t=Math.abs(e-l.y)/Math.cos(m)-Math.tan(m)*(n.height/2)-2*r-s;t<f&&(f=t)}if(Math.sin(m)>.001){let e=p<0?o.x:o.x+o.width,t=Math.abs(e-l.x)/Math.sin(m)-n.height/2/Math.tan(m)-2*r-s;t<f&&(f=t)}if(f<=0||f<n.minReqWidth)return null;let g={x:p,y:h,width:f,height:n.height};return d<Math.PI?(g.angle=d-Math.PI/2,g.anchor="start"):(g.angle=d+Math.PI/2,g.anchor="end"),g}({slice:r,measured:s,padding:a,view:l}):function(e){let{slice:t,measured:n,padding:r,view:o,context:i}=e,{start:a,end:s,outerRadius:l,offset:c}=t;const u=h9((a+s)/2);if(function(e,t,n){switch(t){case 0:return e.q1maxY<0;case 1:return e.q2minY>n.height;case 2:return e.q3minY>n.height;case 3:return e.q4maxY<0;default:return!0}}(i,Math.floor(u/(Math.PI/2)),o))return null;let d=l+r+n.height/2,p=Math.sin(u)*d,h=-Math.cos(u)*d,f=n.width+1;if(u<Math.PI){let e=Math.abs(o.x+o.width-(p+c.x));e<f&&(f=e)}else{let e=Math.abs(o.x-(p+c.x));e<f&&(f=e)}if(f<n.minReqWidth)return null;let m={x:p,y:h,width:f,height:n.height};return u<Math.PI?m.anchor="start":m.anchor="end",m}({slice:r,measured:s,padding:a,view:l,context:c});break;default:throw new Error("not implemented")}return t&&(t.x+=f.x,t.y+=f.y,"outside"===i&&"rotate"!==o&&function(e,t,n){const{start:r,end:o,offset:i,outerRadius:a}=n,s=h9((r+o)/2);switch(Math.floor(s/(Math.PI/2))){case 0:if(void 0!==t.q1maxY){let n=Math.min(e.y,t.q1maxY-e.height),r=e.y-n;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x-2,y1:e.y+2,x2:i.x+Math.sin(s)*t,y2:i.y-Math.cos(s)*t,strokeWidth:1}}}break;case 1:if(void 0!==t.q2minY){let n=Math.max(e.y,t.q2minY),r=n-e.y;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x-2,y1:e.y-2,x2:i.x+Math.sin(s)*t,y2:i.y-Math.cos(s)*t,strokeWidth:1}}}break;case 2:if(void 0!==t.q3minY){let n=Math.max(e.y,t.q3minY),r=n-e.y;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x+2,y1:e.y-2,x2:i.x+Math.sin(s)*t,y2:i.y-Math.cos(s)*t,strokeWidth:1}}}break;case 3:if(void 0!==t.q4maxY){let n=Math.min(e.y,t.q4maxY-e.height),r=e.y-n;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x+2,y1:e.y+2,x2:i.x+Math.sin(s)*t,y2:i.y-Math.cos(s)*t,strokeWidth:1}}}}}(t,c,r)),t}function S9(e){let{context:t,direction:n,measured:r,node:o,placementSettings:i,rect:a,store:s}=e,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:w9;for(let e=0;e<i.length;e++){let c=i[e],u=l({context:t,slice:o.desc.slice,view:a,direction:n,position:c.position,measured:r,padding:c.padding,store:s});if(u)return{bounds:u,placement:c}}return{bounds:null,placement:null}}function C9(e,t,n){const r=t.fontFamily,o="".concat(t.fontSize,"px"),i=n.measureText({text:e,fontFamily:r,fontSize:o});return i.minReqWidth=Math.min(i.width,n.measureText({text:"".concat(e[0],"…"),fontFamily:r,fontSize:o}).width),i}const E9=/\n+|\r+|\r\n/,k9=/\s/,M9=/[a-zA-Z\u00C0-\u00F6\u00F8-\u00FF\u00AD]/;function R9(e){return"string"==typeof e?-1!==e.search(E9):-1!==String(e).search(E9)}function A9(e){return-1!==e.search(k9)}function I9(e){return-1!==e.search(M9)}function P9(e,t,n){return Math.max(t,Math.min(n,e))}function O9(){let{string:e,separator:t="",reverse:n=!1,measureText:r=e=>({width:e.length,height:1}),mandatoryBreakIdentifiers:o=[R9],noBreakAllowedIdentifiers:i=[],suppressIdentifier:a=[A9,R9,e=>""===e],hyphenationIdentifiers:s=[I9]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const l=String(e).split(t);!function(e){""===e[0]&&e.shift(),""===e[e.length-1]&&e.pop()}(l);const c=l.length,u=n?e=>e>=0:e=>e<c;let d=n?c:-1;function p(e){const t=P9(e,0,c-1),n=l[t],u=r(n),d=function(e,t,n,r,o){return r.some((r=>r(e,t,n)))?1:o.some((r=>r(e,t,n)))?0:2}(n,t,l,o,i);return{index:t,value:n,breakOpportunity:d,suppress:a.some((e=>e(n,t,l))),hyphenation:s.some((e=>e(n,t,l))),width:u.width,height:u.height,done:!1}}return{next:function(e){return isNaN(e)?n?d--:d++:d=P9(e,0,c-1),u(d)?p(d):{done:!0}},peek:p,length:c}}const L9="…",D9=/^\s*\d+(\.\d+)?px\s*$/i;function T9(e){return"string"===typeof e&&D9.test(e)}function z9(e){const t=e["font-size"]||e.fontSize;return T9(t)?parseFloat(t)*Math.max(isNaN(e.lineHeight)?1.2:e.lineHeight,0):19.2}function j9(e){const t=e.maxHeight,n=Math.max(e.maxLines,1)||1/0;if(isNaN(t))return n;const r=z9(e);return Math.max(1,Math.min(Math.floor(t/r),n))}function N9(e,t){return{lines:[],line:"",width:0,maxLines:j9(e),maxWidth:e.maxWidth,hyphens:{enabled:"auto"===e.hyphens,char:"‐",metrics:t("‐")}}}function q9(e){e.lines.push(e.line),e.line="",e.width=0}function F9(e,t){e.line+=t.value,e.width+=t.width}function W9(e,t,n){if(t.width>e.maxWidth)return t;const r=t.index;for(let o=1;o<5;o++){const i=n.peek(t.index-1);if(!t.hyphenation||!i.hyphenation||0===t.index)return t;if(e.width+e.hyphens.metrics.width<=e.maxWidth)return e.line+=e.hyphens.char,t;if(1===e.line.length)return t;t=n.next(r-o),e.line=e.line.slice(0,-1),e.width-=t.width}return t}function B9(e,t,n){const r=O9({string:t.value,measureText:n});for(;e.lines.length<e.maxLines;){let t=r.next();if(t.done)break;e.width+t.width>e.maxWidth&&2===t.breakOpportunity&&e.line.length>0?(t=e.hyphens.enabled?W9(e,t,r):t,q9(e),F9(e,t)):F9(e,t)}}function $9(e,t){const n=O9({string:e.text,separator:"",measureText:t,noBreakAllowedIdentifiers:[(e,t)=>0===t]}),r=N9(e,t);let o=!0;for(;r.lines.length<r.maxLines;){let e=n.next();if(e.done){q9(r),o=!1;break}1===e.breakOpportunity?q9(r):r.width+e.width>r.maxWidth&&2===e.breakOpportunity?e.suppress?r.width+=e.width:(e=r.hyphens.enabled?W9(r,e,n):e,q9(r),F9(r,e)):F9(r,e)}return{lines:r.lines,reduced:o}}function H9(e,t){const n=O9({string:e.text,separator:/(\s|-|\u2010)/,measureText:t}),r=N9(e,t);let o=!0;for(;r.lines.length<r.maxLines;){let e=n.next();if(e.done){q9(r),o=!1;break}1===e.breakOpportunity?q9(r):r.width+e.width>r.maxWidth&&2===e.breakOpportunity?e.suppress?q9(r):e.width>r.maxWidth?B9(r,e,t):(q9(r),F9(r,e)):F9(r,e)}return{lines:r.lines,reduced:o}}function V9(e){return{"break-all":$9,"break-word":H9}[e.wordBreak]}function G9(e){return t=>{const n=t.node;if(function(e){return"text"===e.type&&!e._lineBreak}(n)){const r=V9(n);if(!r)return;const o=e(n);if(o.width>n.maxWidth||R9(n.text)){const i=(z9(n)-o.height)/2,a=r(n,function(e,t){return n=>t({text:n,fontSize:e.fontSize,fontFamily:e.fontFamily})}(n,e));t.node=function(e,t,n,r){const o={type:"container",children:[]};void 0!==t.id&&(o.id=t.id);let i=0;return e.lines.forEach(((a,s)=>{const l=UZ({},t);l.text=a,l._lineBreak=!0,i+=n,e.reduced&&s===e.lines.length-1?l.text+=L9:delete l.maxWidth,l.dy=isNaN(l.dy)?i:l.dy+i,i+=r,i+=n,o.children.push(l)})),o}(a,n,i,o.height)}}}}function U9(e,t){const n=e["font-family"]||e.fontFamily,r=e["font-size"]||e.fontSize,o="string"==typeof e.text?e.text:"".concat(e.text),{maxWidth:i}=e;if(void 0===i)return o;let a=t({text:o,fontSize:r,fontFamily:n}).width;if(a<=i)return o;let s=0,l=o.length-1;for(;s<=l;){let e=Math.floor((s+l)/2);a=t({text:o.substr(0,e)+L9,fontSize:r,fontFamily:n}).width,a<=i?s=e+1:l=e-1}return o.substr(0,l)+L9}function Y9(e){const t=e.baseline||e["dominant-baseline"];let n=0;const r=parseInt(e.fontSize||e["font-size"],10)||0;switch(t){case"hanging":n=.75*r;break;case"text-before-edge":n=.85*r;break;case"middle":n=.25*r;break;case"central":n=.35*r;break;case"mathemetical":n=r/2;break;case"text-after-edge":case"ideographic":n=.2*-r;break;default:n=0}return n}const K9={},X9={},J9={fontSize:void 0,fontFamily:void 0};let Z9;function Q9(e,t){return!e&&!t||e===t}function eee(e){let{text:t,fontWeight:n,fontSize:r,fontFamily:o}=e;const i="".concat(t," ").concat(n," ").concat(r," ").concat(o);return"number"!=typeof X9[i]&&(Z9=Z9||document.createElement("canvas").getContext("2d"),function(e){let{fontWeight:t,fontSize:n,fontFamily:r}=e;Q9(J9.fontWeight,t)&&Q9(J9.fontSize,n)&&Q9(J9.fontFamily,r)||(Z9.font=[t,n,r].filter((e=>!!e)).join(" "),J9.fontWeight=t,J9.fontSize=n,J9.fontFamily=r)}({fontWeight:n,fontSize:r,fontFamily:o}),X9[i]=Z9.measureText(t).width),X9[i]}function tee(e){return"number"!=typeof K9[e]&&(K9[e]=function(e){if(T9(e)){const t=parseFloat(e);return t+4*Math.ceil((t+1e-12)/24)}return 16}(e)),K9[e]}function nee(e){let{text:t,fontWeight:n,fontSize:r,fontFamily:o}=e;return{width:eee({text:t,fontWeight:n,fontSize:r,fontFamily:o}),height:tee(r)}}function ree(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:nee;const n=e["font-size"]||e.fontSize,r=e["font-family"]||e.fontFamily,o=t({text:e.text,fontFamily:r,fontSize:n}),i=Math.min(e.maxWidth||o.width,o.width),a=e.x||0,s=e.y||0,l=e.dx||0,c={x:0,y:s+((e.dy||0)+Y9(e))-.75*o.height,width:i,height:o.height},u=e["text-anchor"]||e.anchor;return c.x="middle"===u?a+l-i/2:"end"===u?a+l-i:a+l,c}function oee(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:nee;const n=V9(e),r=e["font-size"]||e.fontSize,o=e["font-family"]||e.fontFamily,i=t({text:e.text,fontFamily:o,fontSize:r});if(n&&(i.width>e.maxWidth||R9(e.text))){const i=n(e,(e=>t({text:e,fontFamily:o,fontSize:r}))),a=UZ({},e);let s=0,l="";for(let e=0,n=i.lines.length;e<n;e++){let a=i.lines[e];a+=e===n-1&&i.reduced?L9:"";const c=t({text:a,fontSize:r,fontFamily:o}).width;c>=s&&(s=c,l=a)}a.text=l;const c=ree(a,t);return c.height=z9(e)*i.lines.length,c}return ree(e,t)}function iee(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function aee(e,t,n){const r={type:"text",text:t,maxWidth:e.width,x:0,y:e.y,dx:0,dy:0,fill:n.fill,anchor:"start",baseline:"alphabetical",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily},o=n.textMetrics;if(e.width<n.fontSize)return!1;const i=Math.max(0,e.width-o.width);return r.x=e.x+n.align*i,r.y=e.y+o.height/1.2,r}function see(e){let{cx:t,cy:n,r:r}=e;return{type:"circle",bounds:{cx:t,cy:n,r:r}}}function lee(e){return e.desc&&e.desc.slice?function(e){let{start:t,end:n,innerRadius:r,outerRadius:o,offset:i}=e;if(Math.abs(t+2*Math.PI-n)>1e-12)return{type:null,bounds:null};let a=0!==r?r:o;return see({cx:i.x,cy:i.y,r:a})}(e.desc.slice):"circle"===e.type?see(e.attrs):"rect"===e.type?{type:"rect",bounds:e.bounds}:{type:null,bounds:null}}var cee={bar:function(e){let{settings:t,chart:n,nodes:r,rect:o,renderer:i,style:a}=e,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p9;const l=UZ({fontSize:12,fontFamily:"Arial",align:.5,justify:0,fill:"#333"},a.label);l.fontSize=parseInt(l.fontSize,10);const c=t.labels.map((e=>UZ({},l,t,e))),u=t.labels.map((e=>e.placements.map((n=>UZ({},l,t,e,n))))),{fitsHorizontally:d,hasHorizontalDirection:p,targetNodes:h}=function(e){let{nodes:t,rect:n,chart:r,labelSettings:o,placementSettings:i,settings:a,renderer:s}=e;const l={},c=[];let u,d,p,h,f,m,g,y=!0,_=!1;for(let e=0;e<t.length;e++){if(d=t[e],h=d.localBounds,!d4(h,n))continue;let b=t9(d,r);u={node:d,texts:[],measurements:[],labelSettings:[],placementSettings:[]};for(let t=0;t<o.length;t++)m=o[t],p="function"==typeof m.label?m.label(b,e):void 0,n9(p)&&(g="function"==typeof a.direction?a.direction(b,e):a.direction||"up",_=_||"left"===g||"right"===g,l.fontFamily=m.fontFamily,l.fontSize="".concat(m.fontSize,"px"),l.text=p,f=s.measureText(l),u.measurements.push(f),u.texts.push(p),u.labelSettings.push(m),u.placementSettings.push(i[t]),u.direction=g,y=y&&f.width<=h.width-2*e9);c.push(u)}return{targetNodes:c,fitsHorizontally:y,hasHorizontalDirection:_}}({nodes:r,chart:n,renderer:i,settings:t,rect:o,labelSettings:c,placementSettings:u}),f=function(e){let{orientation:t="auto",defaultOrientation:n="h"}=e;switch(t.toLocaleLowerCase()){case"vertical":return"v";case"horizontal":return"h";default:return n}}({orientation:t.orientation,defaultOrientation:p?"h":"v"}),m="h"===f?"y":"x",g="h"===f?"height":"width";return h.sort(((e,t)=>e.node.localBounds[m]+e.node.localBounds[g]-(t.node.localBounds[m]+t.node.localBounds[g]))),s({chart:n,targetNodes:h,stngs:t,rect:o,fitsHorizontally:d,collectiveOrientation:f})},slice:function(e){let{settings:t,chart:n,nodes:r,rect:o,renderer:i,style:a}=e,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:S9,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:v9;const c=UZ({fontSize:12,fontFamily:"Arial",fill:"#333",padding:4,position:"into"},a.label);c.fontSize=parseInt(c.fontSize,10);const u=t.labels.map((e=>UZ({},c,t,e))),d=t.labels.map((e=>e.placements.map((n=>UZ({},c,t,e,n))))),p=[],h={insideLabelBounds:[]};r=function(e){const t=[],n=[],r=[],o=[];for(let i=0;i<e.length;++i){const{start:a,end:s}=e[i].desc.slice,l=h9((a+s)/2);switch(Math.floor(l/(Math.PI/2))){case 0:t.push(e[i]);break;case 1:n.push(e[i]);break;case 2:r.push(e[i]);break;case 3:o.push(e[i])}}const i=(e,t)=>h9((e.desc.slice.start+e.desc.slice.end)/2)-h9((t.desc.slice.start+t.desc.slice.end)/2),a=(e,t)=>i(t,e);return t.sort(a),n.sort(i),r.sort(a),o.sort(i),t.concat(n,o,r)}(r);const f={};for(let e=0,t=r.length;e<t;e++){const t=r[e],a=x9(t,n);for(let n=0;n<u.length;n++){const r=u[n],c="function"==typeof r.label?r.label(a,e):"";if(!c)continue;const m="function"==typeof r.direction?r.direction(a,e):r.direction||"horizontal",g="function"==typeof r.linkData?r.linkData(a,e):void 0,y=C9(c,r,i),_=s({context:f,direction:m,lblStngs:r,measured:y,node:t,placementSettings:d[n],rect:o,store:h}),b=_.bounds,x=_.placement;if(b&&x){if("outside"===x.position&&"rotate"!==m){b9({context:f,node:t,bounds:b});if(!J6(m9(b),o))continue}const n="function"==typeof x.fill?x.fill(a,e):x.fill,i=l(b,c,{fill:n,fontSize:r.fontSize,fontFamily:r.fontFamily,textMetrics:y});i&&(void 0!==g&&(i.data=g),p.push(i),b.line&&(b.line.stroke=n,p.push(b.line)))}}}return p},rows:function(e){let{settings:t,chart:n,nodes:r,renderer:o,style:i}=e,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:aee;const s=UZ({fontSize:12,fontFamily:"Arial",fill:"#333",padding:4,align:.5,justify:.5},i.label);s.fontSize=parseInt(s.fontSize,10);const l=UZ({},s,t),c=t.labels.map((e=>UZ({},l,e))),u={},d=[];for(let e=0,t=r.length;e<t;e++){let t=r[e],i=iee(t,n),{type:s,bounds:p}=lee(t);if(!p)continue;let h,f=0,m=[],g=[],y="circle"===s?2*p.r*.9:p.height;for(f+=l.padding,h=0;h<c.length;h++){let t=c[h],n="function"==typeof t.label?t.label(i,e):"";u.fontFamily=t.fontFamily,u.fontSize="".concat(t.fontSize,"px"),u.text=n;let r=o.measureText(u);if(f+=r.height+t.padding,f>y)break;g.push(n),m.push(r)}const _=h,b=Math.max(0,y-f);let x;for(x="circle"===s?p.cy-.9*p.r:p.y,x+=l.justify*b+l.padding,h=0;h<_;h++){let t,n=c[h];if("circle"===s){let e=Math.max(Math.abs(x-p.cy),Math.abs(x+m[h].height-p.cy)),n=Math.sqrt(p.r*p.r-e*e);t={x:p.cx-n+l.padding,y:x,width:2*n-2*l.padding,height:m[h].height}}else t={x:p.x+l.padding,y:x,width:p.width-2*l.padding,height:m[h].height};x+=m[h].height+l.padding;let r="function"==typeof n.fill?n.fill(i,e):n.fill;const u="function"==typeof n.linkData?n.linkData(i,e):void 0;let f=a(t,g[h],{fill:r,align:n.align,fontSize:n.fontSize,fontFamily:n.fontFamily,textMetrics:m[h]});if(f){if(f.text&&f.text!==L9){const e=U9(f,o.measureText);if(L9===e)continue;f.ellipsed=e}void 0!==u&&(f.data=u),d.push(f)}}}return d}};const uee={require:["chart","renderer","settings"],defaultSettings:{settings:{},style:{label:"$label"}},render(){const e=this.settings.settings,t=[];return(e.sources||[]).forEach((e=>{e.strategy&&cee[e.strategy.type]&&e.component&&t.push(...function(e,t){let{chart:n,source:r,rect:o,renderer:i,style:a}=e;if(!n.component(r.component))return[];const s=n.findShapes(r.selector).filter((e=>e.key===r.component));return t({chart:n,settings:r.strategy.settings,nodes:s,rect:{x:0,y:0,width:o.width,height:o.height},renderer:i,style:a})}({chart:this.chart,rect:this.rect,renderer:this.renderer,source:e,style:this.style},cee[e.strategy.type]))})),t}};const dee={layout:{size:1,direction:"ltr",scrollOffset:0},item:{show:!0,label:{fontSize:"12px",fontFamily:"Arial",fill:"#595959",wordBreak:"none",maxLines:2,maxWidth:136,lineHeight:1.2},shape:{type:"square",size:12}},title:{show:!0,text:void 0,anchor:"start",fontSize:"16px",fontFamily:"Arial",fill:"#595959",wordBreak:"none",maxLines:2,maxWidth:156,lineHeight:1.25}};function pee(e){let{x:t=0,y:n,item:r,globalMetrics:o,createSymbol:i,direction:a="ltr"}=e,s=r.label.displayObject,l=r.label.bounds,c=r.symbol.meta;const u="rtl"===a;let d={x:u?t+o.maxLabelBounds.width:t+o.maxSymbolSize+o.spacing,y:n,width:o.maxLabelBounds.width,height:Math.max(o.maxSymbolSize,o.maxLabelBounds.height)},p=function(e,t,n){const r=Math.max(0,e.width-t),o=Math.max(0,e.height-t);return{x:e.x+t/2+n.align*r,y:e.y+t/2+n.justify*o}}({x:u?t+o.maxLabelBounds.width+o.spacing:t,y:n,width:o.maxSymbolSize,height:d.height},c.size,{align:void 0===c.align?.5:c.align,justify:void 0===c.justify?.5:c.justify});const h=i(UZ({},c,p));return delete h.collider,s.anchor=u?"end":"start",function(e,t,n){const r=n.textMetrics;if(e.height<r.height)return!1;const o=Math.max(0,e.width-r.width);t.baseline="text-before-edge";const i=Math.max(0,e.height-r.height);t.x=e.x+n.align*o,t.y=e.y+n.justify*i+.175*parseInt(t.fontSize,10)}(d,s,{textMetrics:l,fontSize:parseInt(s.fontSize,10),align:0,justify:.5}),{item:{type:"container",data:r.label.displayObject.data,children:[h,s],collider:{type:"rect",x:t,y:n,width:o.maxItemBounds.width,height:o.maxItemBounds.height}},metrics:d}}function hee(e,t){const n=e.items.length,r=Math.ceil(n/t),o="horizontal"===e.layout.orientation?"width":"height",i="width"===o?"horizontal":"vertical";return e.globalMetrics.maxItemBounds[o]*r+(r-1)*e.layout.margin[i]}function fee(e,t){let n,r,o,i,{onScroll:a=()=>{}}=t,s=null,l=0;const c={itemize:t=>{n=function(e,t){let n,r,{resolved:o,dock:i}=e,a=[],s=o.items.items,l=o.symbols.items,c=o.labels.items,u=0,d=0,p=0;for(let e=0;e<s.length;e++){if(!1===s[e].show)continue;const o=void 0!==c[e].text?c[e].text:c[e].data.label||"";n=UZ({},c[e],{type:"text",fontSize:"".concat(parseInt(c[e].fontSize,10),"px"),text:o,title:o}),r={symbol:{meta:l[e]},label:{displayObject:n,bounds:t.textBounds(n)}},a.push(r),u=Math.max(l[e].size,u),d=Math.max(r.label.bounds.width,d),p=Math.max(r.label.bounds.height,p)}return{items:a,globalMetrics:{spacing:8,maxSymbolSize:u,maxItemBounds:{height:Math.max(u,p),width:u+8+d},maxLabelBounds:{width:d,height:p}},layout:{margin:{vertical:void 0!==o.layout.item.vertical?o.layout.item.vertical:4,horizontal:void 0!==o.layout.item.horizontal?o.layout.item.horizontal:4},mode:o.layout.item.mode,size:o.layout.item.size,orientation:"top"===i||"bottom"===i?"horizontal":"vertical",direction:o.layout.item.direction,scrollOffset:o.layout.item.scrollOffset}}}(t,e.renderer),s=isNaN(n.layout.scrollOffset)?s:n.layout.scrollOffset},getItemsToRender:t=>{o=t.viewRect,l=c.getContentOverflow(o);const a=c.extent();s=Math.max(0,Math.min(s,l)),i=UZ({},o);const u="horizontal"===c.orientation()?"x":"y";return i[u]-=s,i["x"===u?"width":"height"]=a,function(e,t,n){let{viewRect:r}=e,{itemized:o,create:i=pee,parallels:a,createSymbol:s}=n;const l=o.layout.direction,c=o.globalMetrics,u=o.items,d="horizontal"===o.layout.orientation;let p=0;const h=[],f=c.maxItemBounds.height,m=c.maxItemBounds.width,g=o.layout.margin.vertical+f,y=o.layout.margin.horizontal+m;let _=t.x,b=t.y,x=r.x-t.x;for(let e=0;e<u.length;e++){let n=i({y:b,x:"rtl"===l?r.x+x+r.width-m-(_-t.x):_,item:u[e],globalMetrics:c,direction:l,createSymbol:s});if((d&&_>=r.x-m||!d&&b>=r.y-f)&&h.push(n.item),p++,p>=a?(p=0,d?(_+=y,b=t.y):(b+=g,_=t.x)):d?b+=g:_+=y,!d&&b>r.y+r.height)break;if(d&&_>r.x+r.width)break}return h}(t,i,{itemized:n,parallels:r,createSymbol:e.symbol})},parallelize:(e,t)=>(r=function(e,t,n){const r=n.items.length,o="horizontal"===n.layout.orientation?"width":"height",i="width"===o?"horizontal":"vertical",a=n.globalMetrics.maxItemBounds[o]*r+(r-1)*n.layout.margin[i];let s=Math.ceil(a/e);if(null!=t){const e="horizontal"===n.layout.orientation?"height":"width",r="width"===e?"horizontal":"vertical",o=n.layout.margin[r]||4,i=Math.floor((t+o)/(o+n.globalMetrics.maxItemBounds[e]));s=Math.min(s,i)}const l=isNaN(n.layout.size)?1:n.layout.size;return Math.max(1,Math.min(s,l))}(e,t,n),r),hasContentOverflow:()=>{const e="horizontal"===n.layout.orientation?"width":"height";return hee(n,r)>o[e]},getContentOverflow:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o;const t="horizontal"===n.layout.orientation?"width":"height";return Math.max(0,hee(n,r)-e[t])},getNextSize:()=>{const e="horizontal"===n.layout.orientation?"width":"height",t="width"===e?"horizontal":"vertical";return n.globalMetrics.maxItemBounds[e]+n.layout.margin[t]},getPrevSize:()=>{const e="horizontal"===n.layout.orientation?"width":"height",t="width"===e?"horizontal":"vertical";return n.globalMetrics.maxItemBounds[e]+n.layout.margin[t]},hasNext:()=>"horizontal"===c.orientation()?o.x+o.width<i.x+i.width:o.y+o.height<i.y+i.height,hasPrev:()=>"horizontal"===c.orientation()?i.x<o.x:i.y<o.y,next:()=>{c.scroll(-c.getNextSize())},prev:()=>{c.scroll(c.getPrevSize())},scroll:e=>{const t=Math.max(0,Math.min(l,s-e));t!==s&&(s=t,a())},offset:()=>s,orientation:()=>n.layout.orientation,direction:()=>n.layout.direction,extent:()=>hee(n,r),spread:()=>function(e,t){const n=t,r="horizontal"===e.layout.orientation?"height":"width",o="width"===r?"horizontal":"vertical";return e.globalMetrics.maxItemBounds[r]*n+(n-1)*e.layout.margin[o]}(n,r)};return c}function mee(e){return Object.keys(e).filter((t=>e[t])).join(" ")}const gee={up:"▲",right:"▶",down:"▼",left:"◀"};function yee(e,t){let{size:n,isActive:r,direction:o,nav:i,attrs:a}=t,s={},l="";const c=a;i&&i.button&&("function"==typeof i.button.class?s=i.button.class({direction:o}):i.button.class&&(s=i.button.class),"function"==typeof i.button.content&&(l=i.button.content(e,{direction:o})),void 0!==i.button.tabIndex&&(c.tabindex=i.button.tabIndex));const u={width:"".concat(n,"px"),minWidth:"".concat(n,"px"),height:"".concat(n,"px")};return Object.keys(s).length||(u.border="0",u.background="none"),(!r||i&&i.disabled)&&(c.disabled="disabled"),e("button",UZ({class:mee(s),style:u},c),[l||e("span",{style:{pointerEvents:"none"}},[gee[o]])])}function _ee(e){let t;const n={itemize:e=>{t=function(e){let{dock:t,navigation:n}=e;return{layout:{orientation:"top"===t||"bottom"===t?"vertical":"horizontal"},navigation:n}}(e)},render:r=>function(e,t,n,r){let{rect:o,itemRenderer:i}=t;if(!e||!e.renderArgs)return;e.size(o);const a=e.renderArgs[0],s="vertical"===n.layout.orientation,l="rtl"===i.direction(),c=i.hasNext(),u=i.hasPrev();if(!u&&!c)return void e.render([]);const d=s?["right","left"]:["down","up"];l&&s&&d.reverse();const p=[a("div",{style:{position:"relative",display:"flex","flex-direction":s?"column":"row","justify-content":"center",height:"100%",pointerEvents:"auto"},dir:l&&!s?"rtl":"ltr"},[yee(a,{size:32,isActive:c,direction:d[0],attrs:{"data-action":"next","data-component-key":r.settings.key},nav:n.navigation}),yee(a,{size:32,isActive:u,direction:d[1],attrs:{"data-action":"prev","data-component-key":r.settings.key},nav:n.navigation})])];e.render(p)}(n.renderer,r,t,e),extent:()=>32,spread:()=>64};return n}function bee(e){let t;const n={itemize:n=>{t=function(e,t){let{resolved:n}=e;if(!1===n.title.item.show)return null;const r=UZ({},n.title.item,{type:"text"});if("rtl"===n.layout.item.direction&&(r.anchor&&"start"!==r.anchor?"end"===r.anchor&&(r.anchor="start"):r.anchor="end"),void 0===n.title.settings.text){const e=t.scale.data().fields;r.text=e&&e[0]?e[0].title():""}return{displayObject:r,bounds:t.renderer.textBounds(r)}}(n,e)},render:e=>{!function(e,t,n){let{rect:r}=e;if(!t)return;const o=[];if(t.size(r),n){const e={start:0,end:r.width,middle:r.width/2};o.push(UZ({},n.displayObject,{x:e[n.displayObject.anchor]||0,y:0,baseline:"text-before-edge",title:n.displayObject.text}))}t.render(o)}(e,n.renderer,t)},spread:()=>t?t.bounds.height:0,extent:()=>t?t.bounds.width:0};return n}function xee(e,t,n,r){let o,i,a,{itemRenderer:s,navigationRenderer:l,titleRenderer:c,isPreliminary:u=!1}=r,d=0;const p={x:t.spacing,y:t.spacing,width:e.width-2*t.spacing,height:e.height-2*t.spacing};if(o={x:p.x,y:p.y,width:p.width,height:c.spread()},"horizontal"===n){o={x:p.x,y:p.y,width:c.extent(),height:c.spread()};const e=p.width-o.width-(o.width?t.spacing:0),n=p.height;s.parallelize(e,u?void 0:n);const r=s.extent()>e?l.extent():0,h=s.spread(),f=r?l.spread():0;i={x:o.x+o.width+(o.width?t.spacing:0),y:p.y+Math.max(0,(f-h)/2),width:p.width-r-o.width-(r?t.spacing:0)-(o.width?t.spacing:0),height:n},a={x:i.x+i.width+(r?t.spacing:0),y:p.y,width:r,height:p.height},o.y=i.y;"rtl"===s.direction()&&(a.x=p.x,i.x=a.x+a.width+(a.width?t.spacing:0),o.x=i.x+i.width+(o.width?t.spacing:0)),d=Math.max(o.height,f,s.spread())}else{const e=p.height-o.height-(o.height?t.spacing:0),n=p.width;s.parallelize(e,u?void 0:n);const r=s.extent()>e?l.extent():0;a={x:p.x,y:p.y+p.height-r,width:p.width,height:r},i={x:p.x,y:o.y+o.height+(o.height?t.spacing:0),width:p.width,height:p.height-o.height-(o.height?t.spacing:0)-a.height-(a.height?t.spacing:0)},d=Math.max(c.extent(),r?l.spread():0,s.spread())}return i=UZ({},e,{x:e.x+i.x,y:e.y+i.y,width:i.width,height:i.height}),a.x+=e.x,a.y+=e.y,o.x+=e.x,o.y+=e.y,{title:UZ({},e,o),content:UZ({},e,i),navigation:UZ({},e,a),orientation:n,preferredSize:d}}function vee(e){e.state.resolved=function(e){const t=e.scale.domain();let n={items:[]};const r=e.settings.layout.dock;if("threshold-color"===e.scale.type){const o=e.scale.data().fields[0];let i=e=>String(e);e.settings.formatter?i=e.chart.formatter(e.settings.formatter):o&&(i=o.formatter());for(let e=0;e<t.length-1;e++){const r={value:t[e],label:"".concat(i(t[e])," - < ").concat(i(t[e+1]))};o&&(r.source={field:o.id()}),n.items.push(r)}"vertical"==("top"===r||"bottom"===r?"horizontal":"vertical")&&n.items.reverse()}else{const r=e.scale.labels?e.scale.labels():null;n.items=t.map(((t,n)=>{const o=e.scale.datum?UZ({},e.scale.datum(t)):{value:t};return o.value=t,e.scale.label?o.label=e.scale.label(t):r&&(o.label=r[n]),o}))}const o=e.resolver.resolve({data:{fields:e.scale.data().fields},defaults:UZ(!0,{},dee.title,e.style.title),settings:e.settings.settings.title}),i=e.resolver.resolve({data:{fields:e.scale.data().fields},defaults:dee.layout,settings:e.settings.settings.layout}),a=e.resolver.resolve({data:n,defaults:UZ(!0,{},dee.item.label,e.style.item.label),settings:(e.settings.settings.item||{}).label}),s=UZ(!0,{},(e.settings.settings.item||{}).shape);void 0===s.fill&&e.settings.scale&&(s.fill={scale:e.settings.scale});const l=e.resolver.resolve({data:n,defaults:UZ(!0,{},dee.item.shape,e.style.item.shape),settings:s}),c=e.resolver.resolve({data:n,defaults:UZ(!0,{},{show:dee.item.show}),settings:{show:(e.settings.settings.item||{}).show}});function u(e,n){let r=e.data.value,o=t[n+1];e.data.value=[r,o]}"threshold-color"===e.scale.type&&("vertical"==("top"===r||"bottom"===r?"horizontal":"vertical")?(c.items.reverse().forEach(u),c.items.reverse()):c.items.forEach(u));return{title:o,labels:a,symbols:l,items:c,layout:i}}(e),e.titleRenderer.itemize({resolved:e.state.resolved,dock:e.settings.layout.dock||"center"}),e.itemRenderer.itemize({resolved:e.state.resolved,dock:e.settings.layout.dock||"center"}),e.navigationRenderer.itemize({resolved:e.state.resolved,dock:e.settings.layout.dock||"center",navigation:e.settings.settings.navigation}),e.state.display={spacing:8}}function wee(e){const{rect:t,settings:n,state:r,itemRenderer:o,navigationRenderer:i,titleRenderer:a}=e,s=n.layout.dock,l="top"===s||"bottom"===s?"horizontal":"vertical",c=xee(t,r.display,l,{itemRenderer:o,navigationRenderer:i,titleRenderer:a});e.renderer.size(c.content);let u=o.getItemsToRender({viewRect:UZ({},c.content,{x:0,y:0})});return i.render({rect:c.navigation,itemRenderer:o}),a.render({rect:c.title}),e.state.views={layout:c},u}const See={require:["chart","settings","renderer","update","resolver","registries","symbol"],defaultSettings:{settings:{},style:{item:{label:"$label",shape:"$shape"},title:"$title"}},mounted(e){e&&e.parentNode&&(this.navigationRenderer.renderer.appendTo(e.parentNode),this.titleRenderer.renderer.appendTo(e.parentNode),e.parentNode.insertBefore(this.navigationRenderer.renderer.element(),e),e.parentNode.insertBefore(this.titleRenderer.renderer.element(),e)),this.navigationRenderer.render({rect:this.state.views.layout.navigation,itemRenderer:this.itemRenderer}),this.titleRenderer.render({rect:this.state.views.layout.title})},beforeUnmount(){this.navigationRenderer.renderer.clear(),this.titleRenderer.renderer.clear()},on:{panstart(){if(this.state.interaction.started)return;this.itemRenderer.getContentOverflow()&&(this.state.interaction.started=!0,this.state.interaction.delta=0)},panmove(e){if(!this.state.interaction.started)return;const t="horizontal"===this.itemRenderer.orientation()?("rtl"===this.itemRenderer.direction()?-1:1)*e.deltaX:e.deltaY;this.itemRenderer.scroll(t-this.state.interaction.delta),this.state.interaction.delta=t},panend(){this.state.interaction.started=!1},scroll(e){this.itemRenderer.scroll(-e)},next(){this.itemRenderer.next()},prev(){this.itemRenderer.prev()}},created(){this.state={interaction:{}},this.onScroll=()=>{const e=wee(this);this.update(e)},this.itemRenderer=fee(this,{onScroll:this.onScroll}),this.navigationRenderer=_ee(this),this.titleRenderer=bee(this),this.navigationRenderer.renderer=this.registries.renderer("dom")(),this.titleRenderer.renderer=this.registries.renderer(this.settings.renderer)(),vee(this)},preferredSize(e){return function(e,t){let n=0;const r=e.settings.layout.dock||"center",o="top"===r||"bottom"===r?"horizontal":"vertical",i=e.state.display,a=xee(t.inner,i,o,{itemRenderer:e.itemRenderer,navigationRenderer:e.navigationRenderer,titleRenderer:e.titleRenderer,isPreliminary:!0});return n+=i.spacing,n+=a.preferredSize,n+=i.spacing,n}(this,e)},beforeUpdate(){vee(this)},render(){return wee(this)},beforeDestroy(){this.navigationRenderer.renderer.destroy(),this.titleRenderer.renderer.destroy()},additionalElements(){return[this.titleRenderer.renderer.element(),this.navigationRenderer.renderer.element()]},_DO_NOT_USE_getInfo(){return{offset:this.itemRenderer.offset()}}};function Cee(e,t){let n=0;const r=e.state.isVertical?"justify":"align",o=e.state.isVertical?"y":"x",i=e.state.isVertical?"height":"width",a=e.state.isVertical?"requiredHeight":"requiredWidth";n=e.state.rect[i]-e.state.legend.length()-e.state.title[a](),n*=Math.min(1,Math.max(e.stgns[r],0)),t[o]+=n}function Eee(e,t,n){const r=n[e];return"object"==typeof r?-1!==r.valid.indexOf(t)?t:r.default:n.default}function kee(e){return Eee(e.layout.dock,e.settings.title.anchor,{left:{valid:["top"],default:"top"},right:{valid:["top"],default:"top"},top:{valid:["left","right"],default:"left"},bottom:{valid:["left","right"],default:"left"},default:"top"})}function Mee(e,t){const n={x:0,y:0,width:0,height:0},r=e.stgns.padding;return n.x=r.left,n.y=r.top,n.width=t.width-r.left-r.right,n.height=t.height-r.top-r.bottom,n}function Ree(e){const t="top"!==e.settings.layout.dock&&"bottom"!==e.settings.layout.dock,n=e.stgns.title,r=e.chart.scale(e.stgns.fill),o=e.chart.scale(e.stgns.major),i=function(e,t){const n=t.domain();let r=n,o=e.stgns.tick.label;!o&&e.formatter?o=e.formatter:!o&&t.data().fields&&(o=t.data().fields[0].formatter()),"function"==typeof o&&(r=n.map(o).map(String));const i=n.map(((n,o)=>{const i=r[o];return{value:n,label:i,pos:t.norm(parseFloat(n,10)),textMetrics:e.renderer.measureText({text:i,fontSize:e.stgns.tick.fontSize,fontFamily:e.stgns.tick.fontFamily})}}));return i}(e,o),a=function(e){return Eee(e.layout.dock,e.settings.tick.anchor,{left:{valid:["left","right"],default:"left"},right:{valid:["left","right"],default:"right"},top:{valid:["top","bottom"],default:"top"},bottom:{valid:["top","bottom"],default:"bottom"},default:"right"})}(e.settings);if(void 0===n.text){const e=o.data().fields;n.text=e&&e[0]?e[0].title():""}const s=e.renderer.measureText({text:n.text,fontSize:n.fontSize,fontFamily:n.fontFamily}),l=e.renderer.textBounds({text:n.text,fontSize:n.fontSize,fontFamily:n.fontFamily,maxLines:n.maxLines,maxWidth:n.maxLengthPx,wordBreak:n.wordBreak,hyphens:n.hyphens,lineHeight:n.lineHeight}),c={isVertical:t,nodes:[],title:{anchor:kee(e.settings),textMetrics:s,textBounds:l,requiredWidth:()=>{if(!n.show)return 0;let e=l.width,r=n.maxLengthPx;return t||(e+=n.padding,r+=n.padding),Math.min(e,r,c.rect.width)},requiredHeight:()=>{if(!n.show)return 0;let e=l.height;return t&&(e+=n.padding),Math.min(e,c.rect.height)}},ticks:{values:i,anchor:a,length:Math.min(Math.max(...i.map((e=>e.textMetrics.width))),e.stgns.tick.maxLengthPx),requiredHeight:()=>"top"===a?Math.max(...c.ticks.values.map((e=>e.textMetrics.height)))+e.stgns.tick.padding:0,height:Math.max(...i.map((e=>e.textMetrics.height)))},legend:{fillScale:r,majorScale:o,length:()=>{const n=t?"height":"width",r=t?"requiredHeight":"requiredWidth",o=Math.min(c.rect[n],c.rect[n]*e.stgns.length)-c.title[r]();return Math.max(0,Math.min(o,e.stgns.maxLengthPx))}}};return c}const Aee={require:["chart","settings","renderer"],defaultSettings:{layout:{displayOrder:0,dock:"right"},settings:{size:15,length:.5,maxLengthPx:250,align:.5,justify:0,padding:{left:5,right:5,top:5,bottom:5},tick:{label:null,fill:"#595959",fontSize:"12px",fontFamily:"Arial",maxLengthPx:100,anchor:null,padding:5},title:{show:!0,text:void 0,fill:"#595959",fontSize:"12px",fontFamily:"Arial",maxLengthPx:100,padding:5,maxLines:2,wordBreak:"none",lineHeight:1.2,hyphens:"auto",anchor:null}}},preferredSize(e){const t=this.state;t.rect=Mee(this,e.inner);let n=this.stgns.size;const r=t.isVertical?this.stgns.padding.left+this.stgns.padding.right:this.stgns.padding.top+this.stgns.padding.bottom;n+=r;const o=Math.max(e.inner.width,e.inner.height);if("left"===t.ticks.anchor||"right"===t.ticks.anchor){const e=t.ticks.values.reduce(((e,t)=>e+t.textMetrics.height),0);if(e>this.state.legend.length())return o;n+=t.ticks.length}else{if(t.ticks.length>this.state.legend.length())return o;n+=Math.max(...t.ticks.values.map((e=>e.textMetrics.height)))}return n+=this.stgns.tick.padding,this.stgns.title.show&&(n="left"===t.title.anchor||"right"===t.title.anchor?Math.max(t.title.textBounds.height+r,n):Math.max(n,t.title.requiredWidth()+r)),this.state.preferredSize=n,n},created(){this.stgns=this.settings.settings,this.state=Ree(this)},beforeUpdate(e){this.stgns=e.settings.settings,this.state=Ree(this)},beforeRender(e){if(this.state.nodes=[],this.state.rect=Mee(this,e.size),this.stgns.title.show){const e=function(e){const t=e.state,n=e.stgns,r="left"===t.ticks.anchor,o="top"===t.ticks.anchor;let i=t.rect.x,a=t.rect.y,s="start";"left"===t.title.anchor?(i+=t.title.requiredWidth()-n.title.padding,a+=t.title.textMetrics.height,a+=o?t.rect.height-t.title.textBounds.height:0,s="end"):"right"===t.title.anchor?(i+=t.legend.length(),i+=n.title.padding,a+=t.title.textMetrics.height,a+=o?t.rect.height-t.title.textBounds.height:0):"top"===t.title.anchor&&(i+=r?t.rect.width:0,a+=t.title.textMetrics.height,s=r?"end":"start");const l={tag:"legend-title",type:"text",x:i,y:Math.min(a,t.rect.y+t.rect.height),text:n.title.text,fill:n.title.fill,fontSize:n.title.fontSize,fontFamily:n.title.fontFamily,maxWidth:n.title.maxLengthPx,maxLines:n.title.maxLines,wordBreak:n.title.wordBreak,hyphens:n.title.hyphens,lineHeight:n.title.lineHeight,anchor:s,title:n.title.text};return Cee(e,l),l}(this);this.state.nodes.push(e)}const t=function(e){const t=e.state.legend.fillScale,n=e.state.legend.majorScale,r=t.domain().map((e=>({type:"stop",color:t(e),offset:Math.min(1,Math.max(0,n.norm(e)))})));return r.sort(((e,t)=>e.offset-t.offset))}(this),n=function(e,t){const n=e.state,r=e.stgns,o=n.rect;let i=o.x,a=o.y,s=n.isVertical?r.size:n.legend.length(),l=n.isVertical?n.legend.length():r.size;"left"===n.ticks.anchor?i+=n.rect.width-r.size:"top"===n.ticks.anchor&&(a+=n.rect.height-r.size),"top"===n.title.anchor?a+=n.title.requiredHeight():"left"===n.title.anchor&&(i+=n.title.requiredWidth());const c={type:"rect",x:i,y:a,width:s,height:l,fill:{type:"gradient",stops:t,degree:n.isVertical?90:180}};return Cee(e,c),c}(this,t),r=function(e,t){const n=e.state,r=e.stgns;let o="start";const i={type:"rect",x:t.x,y:t.y,width:n.isVertical?0:t.width,height:n.isVertical?t.height:0,fill:"transparent"},a=n.ticks.values.map((a=>{let s=0,l=0,c=0,u="alphabetical";return n.isVertical?(l=t.y+t.height*a.pos,u=0===a.pos?"text-before-edge":"text-after-edge"):s=t.x+t.width*a.pos,"right"===n.ticks.anchor?(s=t.x+r.size+r.tick.padding,i.x=t.x+t.width):"left"===n.ticks.anchor?(s=t.x-r.tick.padding,o="end"):"top"===n.ticks.anchor?(l=t.y-r.tick.padding,c-=.25*a.textMetrics.height,o=0===a.pos?"start":"end"):"bottom"===n.ticks.anchor&&(l=t.y+t.height+r.tick.padding,c=.8*a.textMetrics.height,o=0===a.pos?"start":"end",i.y=t.y+t.height),{type:"text",x:s,y:l,dx:0,dy:c,text:a.label,fontSize:r.tick.fontSize,fontFamily:r.tick.fontFamily,fill:r.tick.fill,maxWidth:n.isVertical?r.tick.maxLengthPx:Math.min(r.tick.maxLengthPx,n.legend.length()/2),anchor:o,textBoundsFn:e.renderer.textBounds,title:a.label,baseline:u}}));return{type:"container",id:"legend-seq-ticks",children:[...a,i]}}(this,n),o={id:"legend-seq-target",type:"container",children:[n,r]};this.state.nodes.push(o)},render(){return this.state.nodes}};const Iee={coordinates:{minor:.5,major:.5,layerId:0,defined:!0},layers:{curve:"linear",show:!0,line:{stroke:"#ccc",strokeWidth:1,strokeLinejoin:"miter",strokeDasharray:void 0,opacity:1,show:!0,showMinor0:!0},area:{fill:"#ccc",opacity:.8,show:!0}}};function Pee(e,t){let{generatorType:n,item:r,data:o,major:i,minor:a,layerObj:s,stngs:l}=t,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const u={type:"path",points:e,generatorType:n,major:i,minor:a,layerObj:s,stngs:l,opacity:r.opacity,stroke:r.stroke,strokeWidth:r.strokeWidth,strokeLinejoin:r.strokeLinejoin,fill:c||r.fill,data:o};return r.strokeDasharray&&(u.strokeDasharray=r.strokeDasharray),u}function Oee(e){const{metaLayers:t,coordinates:n,layers:r,lines:o,areas:i}=function(e){let{data:t,stngs:n,rect:r,resolver:o,style:i,domain:a}=e;const{width:s,height:l}=r,c=o.resolve({data:t,defaults:Iee.coordinates,settings:n.coordinates||{},scaled:{major:"vertical"===n.orientation?l:s,minor:"vertical"===n.orientation?s:l}}),u=!n.connect&&a.length>2&&("function"==typeof n.coordinates.layerId||"object"==typeof n.coordinates.layerId),d={};let p=0;for(let e=0;e<c.items.length;e++){let t=c.items[e],n=t.layerId;if(u){const e=d[n]?d[n].items[d[n].items.length-1]:null,r=e?a.indexOf(e.data.major?e.data.major.value:e.data.value):null;e&&a.indexOf(t.data.major?t.data.major.value:t.data.value)-1!==r&&d[n].items.push({dummy:!0})}d[n]=d[n]||{order:p++,id:n,items:[],dataItems:[],consumableData:{}},d[n].dataItems.push(t.data),d[n].items.push(t)}const h=Object.keys(d).map((e=>(d[e].consumableData=JZ({points:d[e].dataItems},d[e].dataItems[0]),d[e]))),f={items:h.map((e=>e.consumableData))},m=n.layers||{};return{coordinates:c,metaLayers:h,layers:o.resolve({data:f,defaults:{curve:Iee.layers.curve,show:Iee.layers.show},settings:{curve:m.curve,show:m.show}}),lines:o.resolve({data:f,defaults:UZ({},Iee.layers.line,i.line),settings:m.line}),areas:o.resolve({data:f,defaults:UZ({},Iee.layers.area,i.area),settings:m.area})}}(e),a=[];return t.forEach(((t,s)=>{const l=r.items[s];if(!1===l.show)return;l.datum=l.data,l.data=[],l.id=t.id;const c=[],u=[];let d,p;for(let r=0;r<t.items.length;r++){if(d=t.items[r],p=d.data,!d.dummy){if(isNaN(d.major))continue;e.missingMinor0&&(d.minor0=n.settings.minor.scale?n.settings.minor.scale(p.minor0?p.minor0.value:0):0),isNaN(d.minor)||c.push(d.minor),l.data.push(d.data)}u.push(d)}const h=c.sort(((e,t)=>e-t))[Math.floor((c.length-1)/2)];a.push({layerObj:l,lineObj:o.items[s],areaObj:i.items[s],median:h,points:u,consumableData:t.consumableData})})),a}const Lee={require:["chart","resolver"],defaultSettings:{style:{area:"$shape",line:"$shape-outline"}},created(){},render(e){let{data:t}=e;const{width:n,height:r}=this.rect;this.stngs=this.settings.settings||{};const o=!this.stngs.coordinates||void 0===this.stngs.coordinates.minor0,i=Oee({data:t,stngs:this.stngs,rect:this.rect,resolver:this.resolver,style:this.style,missingMinor0:o,domain:this.stngs.coordinates&&this.stngs.coordinates.major&&this.stngs.coordinates.major.scale?this.chart.scale(this.stngs.coordinates.major.scale).domain():[]});if(this.stngs.layers&&this.stngs.layers.sort){const e=i.map((e=>({id:e.layerObj.id,data:e.layerObj.data}))).sort(this.stngs.layers.sort).map((e=>e.id));i.sort(((t,n)=>e.indexOf(t.layerObj.id)-e.indexOf(n.layerObj.id)))}else i.sort(((e,t)=>e.median-t.median));return function(e,t){let{width:n,height:r,missingMinor0:o,stngs:i}=t;const a=[],s=i.layers||{};return e.forEach((e=>{const{lineObj:t,layerObj:l,areaObj:c,points:u}=e;let d={size:r,p:"y"},p={size:n,p:"x"};if("vertical"===i.orientation){const e=UZ(!0,{},p);p=UZ(!0,{},d),d=UZ(!0,{},e)}s.area&&!1!==c.show&&a.push(Pee(u,{data:e.consumableData,item:c,generatorType:"area",major:p,minor:d,layerObj:l,stngs:i})),t&&!1!==t.show&&(a.push(Pee(u,{data:e.consumableData,item:t,generatorType:"line".concat(d.p.toUpperCase(),"1"),major:p,minor:d,layerObj:l,stngs:i},"none")),!o&&s.area&&!1!==c.show&&!1!==t.showMinor0&&a.push(Pee(u,{data:e.consumableData,item:t,generatorType:"line".concat(d.p.toUpperCase(),"0"),major:p,minor:d,layerObj:l,stngs:i},"none")))})),a}(i,{width:n,height:r,missingMinor0:o,stngs:this.stngs})}};function Dee(e,t){let n,r,o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];"object"==typeof t.center?(n=t.center.x,r=t.center.y):(n=t.clientX,r=t.clientY);const i=n-e.state.boundingRect.left,a=r-e.state.boundingRect.top;return{x:o?Math.max(0,Math.min(i,e.rect.width)):i,y:o?Math.max(0,Math.min(a,e.rect.height)):a}}function Tee(e,t){return{x:t.x+e.rect.x,y:t.y+e.rect.y}}function zee(e,t){const n=Math.min(e.x,t.x),r=Math.min(e.y,t.y);return{x:n,y:r,width:Math.max(e.x,t.x)-n,height:Math.max(e.y,t.y)-r}}const jee={require:["chart","renderer"],defaultSettings:{layout:{displayOrder:99},settings:{brush:{components:[]}},style:{area:"$selection-area-target"}},on:{areaStart(e){this.start(e)},areaMove(e){this.move(e)},areaEnd(e){this.end(e)},areaCancel(){this.cancel()}},created(){this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1}},preferredSize:()=>0,render(){},start(e){this.state.boundingRect=this.renderer.element().getBoundingClientRect();const t=Dee(this,e,!1);h4({x:0,y:0,width:this.rect.width,height:this.rect.height},t)&&(this.state.brushConfig=function(e){return e.settings.brush.components.map((e=>({key:e.key,contexts:e.contexts,data:e.data,action:e.action||"set"})))}(this.settings),this.state.start=Dee(this,e),this.state.active=!0)},move(e){var t;this.state.active&&(this.state.end=Dee(this,e),function(e){if(e.state.active){const t=Tee(e,e.state.start),n=Tee(e,e.state.end),r=e.chart.shapesAt(zee(t,n),{components:e.state.brushConfig});e.chart.brushFromShapes(r,{components:e.state.brushConfig})}}(this),(t=this).renderer.render([UZ({type:"rect"},zee(t.state.start,t.state.end),t.style.area)]))},end(){this.state.active&&(this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1},this.renderer.render([]))},cancel(){var e,t;this.state.active&&(e=this.state,t=this.chart,e.brushConfig.forEach((e=>{Array.isArray(e.contexts)&&e.contexts.forEach((e=>{t.brush(e).end()}))})),this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1},this.renderer.render([]))}};function Nee(e,t,n){let{renderer:r,style:o,props:i,h:a}=n;const s=function(e,t){return{tooltip:"function"==typeof e.tooltipClass?e.tooltipClass({dock:t.dock}):e.tooltipClass,content:"function"==typeof e.contentClass?e.contentClass({dock:t.dock}):e.contentClass,arrow:"function"==typeof e.arrowClass?e.arrowClass({dock:t.dock}):e.arrowClass}}(i,t),l=function(e,t,n,r){return r.content({h:e,style:n,data:t})}(a,e,o,i),c=a("div",{dir:i.direction,class:mee(UZ({"pic-tooltip":!0},s.tooltip)),style:UZ({position:"relative",display:"inline-block"},t.computedTooltipStyle)},a("div",{style:o.content,class:mee(UZ({"pic-tooltip-content":!0},s.content))},l),a("div",{class:mee(UZ({"pic-tooltip-arrow":!0},s.arrow)),style:UZ({},o.arrow,o["arrow-".concat(t.dock)],t.computedArrowStyle)}));return r.render(c),r.element().children[0]}function qee(e){let{defaultDuration:t,defaultDelay:n}=e,r=null,o=null,i=!1;const a=function(){const e=function(){},t={pending:[],debounced:[],active:[],cancelled:[],rejected:[],fulfilled:[]};let n;return e.set=e=>{n=e,t[n].forEach((t=>t(e)))},e.on=(e,n)=>{Array.isArray(e)?e.forEach((e=>t[e].push(n))):t[e].push(n)},e.destroy=()=>{Object.keys(t).forEach((e=>{t[e].length=0}))},e}(),s=function(){},l=()=>{r=null,o=null,i=!1,a.set("fulfilled")};return s.invoke=function(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n;r&&(clearTimeout(r),a.set("debounced")),a.set("pending"),r=setTimeout((()=>{e(),i=!0,r=null,a.set("active")}),c),s>0&&(o&&clearTimeout(o),o=setTimeout(l,s+Math.max(c,0)))},s.clear=()=>{i?a.set("cancelled"):r&&(clearTimeout(r),a.set("rejected")),o&&clearTimeout(o),r=null,o=null,i=!1},s.on=(e,t)=>{a.on(e,t)},s.destroy=()=>{s.clear(),a.destroy()},s}function Fee(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return{left:"translate(-100%,-50%) translateX(".concat(-e,"px)"),right:"translate(".concat(e,"px, -50%)"),top:"translate(-50%, -100%) translateY(".concat(-e,"px)"),bottom:"translate(-50%, ".concat(e,"px)"),inside:"translate(-50%, -50%)"}}function Wee(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return{left:{x:-e-n,y:-t/2},right:{x:n,y:-t/2},top:{x:-e/2,y:-t-n},bottom:{x:-e/2,y:n},inside:{x:-e/2,y:-t/2}}}function Bee(e,t){const n=e>0?"-":"+";return e=Math.abs(e),void 0===t&&(t=e),{left:{left:"100%",top:"calc(50% ".concat(n," ").concat(e,"px)"),borderWidth:"".concat(t,"px")},right:{left:"".concat(2*-e,"px"),top:"calc(50% ".concat(n," ").concat(e,"px)"),borderWidth:"".concat(t,"px")},top:{left:"calc(50% ".concat(n," ").concat(e,"px)"),top:"100%",borderWidth:"".concat(t,"px")},bottom:{left:"calc(50% ".concat(n," ").concat(e,"px)"),top:"".concat(2*-e,"px"),borderWidth:"".concat(t,"px")},inside:{left:"0px",top:"0px",borderWidth:"0px"}}}function $ee(e,t,n,r,o,i){const a=t+i.x,s=n+i.y,l=o;return!(a<0||s<0)&&!(a+r>e.width||s+l>e.height)}function Hee(e){let{area:t,vx:n,vy:r,width:o,height:i,offset:a}=e;const s=n+a.x,l=r+a.y,c=o,u=i;let d=s<0?-s:0,p=l<0?-l:0;return d+=s+c>t.width?-(s+c-t.width):0,p+=l+u>t.height?-(l+u-t.height):0,{x:d,y:p}}function Vee(e){let{options:t,pointer:n,width:r,height:o,dockOrder:i,x:a,y:s}=e;const{targetBounds:l}=n,c=Fee(t.offset),u=c[t.dock];if(u)return{computedTooltipStyle:{left:"".concat(a,"px"),top:"".concat(s,"px"),transform:u},computedArrowStyle:Bee(t.offset)[t.dock],dock:t.dock};const d={width:"target"===t.area?l.width:window.innerWidth,height:"target"===t.area?l.height:window.innerHeight},p=Wee(r,o,t.offset),h=[],f="target"===t.area?a:l.left+a,m="target"===t.area?s:l.top+s;for(let e=0;e<i.length;e+=1){const n=i[e],l=Hee({area:d,vx:f,vy:m,width:r,height:o,offset:p[n]}),u={left:"".concat(a,"px"),top:"".concat(s,"px"),transform:c[n]},g=Bee(t.offset)[n];0!==l.x&&(u.width="".concat(r-20-Math.abs(l.x),"px"),"top"!==n&&"bottom"!==n||(u.left="".concat(a+l.x,"px"),g.left="calc(50% ".concat(l.x>0?"-":"+"," ").concat(Math.abs(l.x),"px)")));const y={computedTooltipStyle:u,computedArrowStyle:g,dock:n,rect:{width:r,height:o}};if(0===l.x&&0===l.y)return y;y.offset=l,h.push(y)}return h.sort(((e,t)=>Math.abs(e.offset.x)-Math.abs(t.offset.x))),h[0]}function Gee(e,t,n){const r=e.key?n.component(e.key):n.componentsFromPoint({x:t.clientX,y:t.clientY})[0];if(!r)return{x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1}};const o=r.rect;return UZ({scaleRatio:o.scaleRatio},o.computedInner)}const Uee={bounds:function(e){let{resources:t,nodes:n,pointer:r,width:o,height:i,options:a}=e;const{targetBounds:s}=r,{x:l,y:c,width:u,height:d}=t.getNodeBoundsRelativeToTarget(n[0]),p={left:{x:l,y:c+d/2},right:{x:l+u,y:c+d/2},top:{x:l+u/2,y:c},bottom:{x:l+u/2,y:c+d},inside:{x:l+u/2,y:c+d/2}},h=Fee(a.offset),f=h[a.dock];if(f)return{computedTooltipStyle:{left:"".concat(p[a.dock].x,"px"),top:"".concat(p[a.dock].y,"px"),transform:f},computedArrowStyle:Bee(a.offset)[a.dock],dock:a.dock};const m={width:"target"===a.area?s.width:window.innerWidth,height:"target"===a.area?s.height:window.innerHeight},g=Wee(o,i,a.offset),y=["top","left","right","bottom","inside"];for(let e=0;e<y.length;e+=1){const t=y[e];if($ee(m,"target"===a.area?p[t].x:s.left+p[t].x,"target"===a.area?p[t].y:s.top+p[t].y,o,i,g[t]))return{computedTooltipStyle:{left:"".concat(p[t].x,"px"),top:"".concat(p[t].y,"px"),transform:h[t]},computedArrowStyle:Bee(a.offset)[t],dock:t}}const _=function(e){let{options:t,docks:n,dockOffsets:r,targetBounds:o,area:i,width:a}=e;const s="top",l="target"===t.area?n[s].x:o.left+n[s].x,c=("target"===t.area?n[s].y:(o.top,n[s].y),r[s]),u=l+c.x,d=(c.y,a);let p=n.top.x;return u<0&&u+d>i.width||(u<0?p-=u:u+d>i.width&&(p-=u+d-i.width)),p}({options:a,docks:p,dockOffsets:g,targetBounds:s,area:m,width:o});return{computedTooltipStyle:{left:"".concat(_,"px"),top:"".concat(p.top.y,"px"),transform:h.top},computedArrowStyle:Bee(a.offset+_-p.top.x,a.offset).top,dock:"top"}},pointer:function(e){let{options:t,pointer:n,width:r,height:o}=e;const{x:i,y:a}=n;return Vee({x:i,y:a,pointer:n,width:r,height:o,options:t,dockOrder:["top","left","right","bottom"]})},slice:function(e){let{options:t,pointer:n,width:r,height:o,nodes:i,resources:a}=e;const s=i[0],{dx:l,dy:c}=n,u=a.getComponentBoundsFromNode(s),d=l+u.x+u.width/2,p=c+u.y+u.height/2,{start:h,end:f,outerRadius:m}=s.desc.slice,g=(h+f)/2-Math.PI/2,y=2*Math.PI,_=(g%y+y)%y;let b=["top","left","right","bottom"];return"auto"===t.dock&&(b=_<=Math.PI/4||_>=7*Math.PI/4?["right","top","bottom","left"]:_<=3*Math.PI/4?["bottom","left","right","top"]:_<=5*Math.PI/4?["left","top","bottom","right"]:["top","left","right","bottom"]),Vee({x:d+m*u.scaleRatio.x*Math.cos(_),y:p+m*u.scaleRatio.y*Math.sin(_),pointer:n,width:r,height:o,options:t,dockOrder:b})}};function Yee(e,t){let{width:n,height:r}=e,{chart:o,state:i,props:a}=t;const s={resources:{formatter:o.formatter,scale:o.scale,component:o.component,getComponentBoundsFromNode:e=>Gee(e,i.pointer,o),getNodeBoundsRelativeToTarget:e=>function(e,t,n){const r=Gee(e,t,n),o=e.bounds;return{x:r.x+t.dx+o.x,y:r.y+t.dy+o.y,width:o.width,height:o.height}}(e,i.pointer,o)},nodes:i.activeNodes,pointer:i.pointer,width:n,height:r},l=typeof a.placement;if("object"===l&&"function"==typeof a.placement.fn)return a.placement.fn(s);let c={type:"pointer",offset:8,dock:"auto",area:"viewport"};"function"===l&&(c=UZ(c,a.placement(s))),"object"===l&&Uee[a.placement.type]?c=UZ(c,a.placement):"string"===l&&Uee[a.placement]&&(c=UZ(c,{type:a.placement})),s.options=c;const u=Uee[c.type](s);let{x:d,y:p,width:h,height:f}=s.resources.getComponentBoundsFromNode(s.nodes[0]);return d+=s.pointer.dx,h+=d,p+=s.pointer.dy,f+=p,u.computedTooltipStyle.left="".concat(Math.min(Math.max(0,d,parseFloat(u.computedTooltipStyle.left)),h),"px"),u.computedTooltipStyle.top="".concat(Math.min(Math.max(0,p,parseFloat(u.computedTooltipStyle.top)),f),"px"),u}let Kee;function Xee(){Kee=null}const Jee={duration:8e3,delay:500,filter:e=>e.filter((e=>e.data&&void 0!==e.data.value)),extract:e=>e.node.data.value,content:e=>{let{h:t,data:n}=e;return n.map((e=>t("div",{},e)))},isEqual:(e,t)=>e.length&&e.length===t.length&&e.every(((e,n)=>t[n]&&JSON.stringify(e.data)===JSON.stringify(t[n].data))),placement:{type:"pointer",dock:"auto",offset:8,area:"viewport"},tooltipClass:{},contentClass:{},arrowClass:{},direction:"ltr",appendTo:void 0,beforeShow:void 0,afterShow:void 0,beforeHide:void 0,onHide:void 0,afterHide:void 0};const Zee={require:["chart","renderer"],defaultSettings:{settings:Jee,style:{tooltip:{},content:{backgroundColor:"$gray-25",color:"$font-color--inverted",fontFamily:"$font-family",fontSize:"$font-size",lineHeight:"$line-height",borderRadius:"4px",padding:"8px",opacity:.9},arrow:{position:"absolute",width:"0px",height:"0px",borderStyle:"solid",color:"$gray-25",opacity:.9},"arrow-bottom":{borderTopColor:"transparent",borderLeftColor:"transparent",borderRightColor:"transparent"},"arrow-top":{borderBottomColor:"transparent",borderLeftColor:"transparent",borderRightColor:"transparent"},"arrow-right":{borderTopColor:"transparent",borderLeftColor:"transparent",borderBottomColor:"transparent"},"arrow-left":{borderTopColor:"transparent",borderBottomColor:"transparent",borderRightColor:"transparent"}}},renderer:"dom",on:{hide(){this.hide()},show(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.show(e,t)},prevent(e){this.prevent(e)}},hide(){this.dispatcher.clear(),this.state.activeNodes=[],this.state.pointer={}},show(e){let t,{nodes:n,duration:r,delay:o}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!this.state.prevent&&this.state.targetElement&&(this.state.pointer=function(e,t){let{chart:n,state:r}=t,o=0,i=0;e.center?(o+=e.center.x,i+=e.center.y):(o+=e.clientX,i+=e.clientY);const a=n.element.getBoundingClientRect(),s=r.targetElement.getBoundingClientRect(),l=o,c=i,u=a.left-s.left,d=a.top-s.top,p=o-a.left,h=i-a.top;return o-=s.left,i-=s.top,{x:o,y:i,dx:u,dy:d,cx:p,cy:h,clientX:l,clientY:c,targetBounds:s,chartBounds:a}}(e,this),t=Array.isArray(n)?this.props.filter(n):this.props.filter(this.chart.shapesAt({x:this.state.pointer.cx,y:this.state.pointer.cy})),this.props.isEqual(this.state.activeNodes,t)||(this.dispatcher.clear(),this.state.activeNodes=t,this.state.activeNodes.length&&this.dispatcher.invoke((()=>this.invokeRenderer(this.state.activeNodes)),r,o)))},prevent(e){this.state.prevent=!!e},init(e){this.state={activeNodes:[],pointer:{},targetElement:null,prevent:!1},this.props=e.settings,this.dispatcher=qee({defaultDuration:this.props.duration,defaultDelay:this.props.delay});const t=this.dispatcher.clear;this.dispatcher.on("pending",(()=>{!function(e){Kee&&Kee!==e&&Kee()}(t),Kee=t,"function"==typeof this.props.beforeShow&&this.props.beforeShow.call(void 0,{resources:{formatter:this.chart.formatter,scale:this.chart.scale}})})),this.dispatcher.on(["cancelled","fulfilled"],(()=>{const e={resources:{formatter:this.chart.formatter,scale:this.chart.scale}};"function"==typeof this.props.beforeHide&&this.props.beforeHide.call(void 0,UZ({element:this.state.tooltipElm},e)),"function"==typeof this.props.onHide?this.props.onHide.call(void 0,UZ({element:this.state.tooltipElm},e)):this.renderer.clear([]),"function"==typeof this.props.afterHide&&this.props.afterHide.call(void 0,e),Kee===t&&(Kee=null),this.state.tooltipElm=void 0})),this.dispatcher.on("active",(()=>{"function"==typeof this.props.afterShow&&this.props.afterShow.call(void 0,{element:this.state.tooltipElm,resources:{formatter:this.chart.formatter,scale:this.chart.scale}})}))},created(){this.init(this.settings)},beforeUpdate(e){let{settings:t}=e;this.dispatcher&&(this.dispatcher.destroy(),Xee()),this.init(t)},render(e){return this.h=e,[]},beforeDestroy(){this.dispatcher.destroy(),Xee()},appendTo(){if(this.props.appendTo){this.state.targetElement="function"==typeof this.props.appendTo?this.props.appendTo({resources:{formatter:this.chart.formatter,scale:this.chart.scale}}):this.props.appendTo;const{width:e,height:t}=this.state.targetElement.getBoundingClientRect();this.renderer.destroy(),this.renderer.size({width:e,height:t}),this.renderer.appendTo(this.state.targetElement)}else this.state.targetElement=this.renderer.element()},mounted(){this.appendTo()},updated(){this.appendTo()},invokeRenderer(e){const t=function(e,t){let{chart:n,scale:r,props:o,h:i}=t;const a={resources:{dataset:n.dataset,scale:n.scale,formatter:n.formatter},scale:r,h:i},s=[];return e.forEach((e=>{if("function"==typeof o.extract){const t=UZ({node:e},a);s.push(o.extract(t))}})),s}(e,this),n=Yee(Nee(t,{},this).getBoundingClientRect(),this);this.state.tooltipElm=Nee(t,n,this)}};const Qee={require:["renderer","chart"],defaultSettings:{settings:{target:"",selector:"*",fill:"rgba(0, 255, 0, 0.1)",stroke:"lime",opacity:1,useOuterRect:!1}},on:{update(){this.draw()}},draw(){const e=this.chart.findShapes(this.props.selector).filter((e=>e.key===this.props.target)),t=e.filter((e=>e.collider)).map((e=>e.collider));t.forEach((e=>{e.fill=this.props.fill,e.stroke=this.props.stroke,e.opacity=this.props.opacity,e.collider={type:null}})),this.renderer.render(t)},created(){this.props=this.settings.settings},resize(e){let{outer:t,inner:n}=e;return this.props.useOuterRect?t:n},render(){},mounted(){this.draw()},updated(){this.props=this.settings.settings,this.draw()}};var ete={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},tte=/([astvzqmhlc])([^astvzqmhlc]*)/gi,nte=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function rte(e){const t=[],n=String(e).trim();return"M"!==n[0]&&"m"!==n[0]||n.replace(tte,((e,n,r)=>{const o=function(e){const t=e.match(nte);return t?t.map(Number):[]}(r);let i=n.toLowerCase(),a=n;if("m"===i&&o.length>2&&(t.push([a,...o.splice(0,2)]),i="l",a="m"===a?"l":"L"),o.length<ete[i])return"";for(t.push([a,...o.splice(0,ete[i])]);o.length>=ete[i]&&o.length&&ete[i];)t.push([a,...o.splice(0,ete[i])]);return""})),t}const ote=2*Math.PI;function ite(e,t){return{x:.5*(e.x+t.x),y:.5*(e.y+t.y)}}function ate(e,t,n,r,o){const i=1-e;return i**3*t+3*i**2*e*n+3*i*e**2*r+e**3*o}function ste(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:8;if(i<1||function(e,t,n,r){return Math.abs(e.x+n.x-(t.x+t.x))+Math.abs(e.y+n.y-(t.y+t.y))+Math.abs(t.x+r.x-(n.x+n.x))+Math.abs(t.y+r.y-(n.y+n.y))}(e,t,n,r)<=10)return o[o.length-1]!==e&&o.push(e),o.push(r),o;const a=ite(e,t),s=ite(t,n),l=ite(n,r),c={x:ate(.5,e.x,t.x,n.x,r.x),y:ate(.5,e.y,t.y,n.y,r.y)},u=ite(a,s),d=ite(s,l);return ste(e,a,u,c,o,i-1),ste(c,d,l,r,o,i-1),o}function lte(e,t,n){const{cp1:r,cp2:o}=function(e,t,n){return{cp1:{x:e.x+2/3*(t.x-e.x),y:e.y+2/3*(t.y-e.y)},cp2:{x:n.x+2/3*(t.x-n.x),y:n.y+2/3*(t.y-n.y)}}}(e,t,n);return ste(e,r,o,n)}function cte(e,t,n){const r=[],o=!!e[4],i=!!e[5],a=e[3];let s,l,c,u,d=e[6],p=e[7],h=e[1],f=e[2];if("a"===e[0]&&(d+=t,p+=n),t===p&&n===p)return r;if(!h||!f)return r.push({x:d,y:p}),r;({cx:s,cy:l,rx:h,ry:f,sweepAngle:c,startAngle:u}=function(e,t,n,r,o,i,a,s,l){let c,u,d,p,h,f;const m=R6(n%360),g=Math.cos(m),y=Math.sin(m),_=(s-i)/2,b=(l-a)/2,x=g*_+y*b,v=g*b-y*_;f=x**2/(e=Math.abs(e))**2+v**2/(t=Math.abs(t))**2,f>1&&(f=Math.sqrt(f),e*=f,t*=f);const w=e*v,S=t*x,C=w**2+S**2,E=(e*t)**2-C;let k=Math.sqrt(Math.max(E/C,0));r===o&&(k=-k);const M=k*(w/t),R=k*(-S/e);p=g*M-y*R+(s+i)/2,h=y*M+g*R+(l+a)/2;const A=(x-M)/e,I=(v-R)/t,P=(-x-M)/e,O=(-v-R)/t;return c=Math.atan2(I,A),c+=c<0?ote:0,u=Math.atan2(O,P),u+=u<0?ote:0,d=u-c,!o&&c<u?d-=ote:o&&u<c&&(d+=ote),d%=ote,{startAngle:c,sweepAngle:d,cx:p,cy:h,rx:e,ry:t}}(h,f,a,o,i,d,p,t,n));const m=Math.abs(c*Math.sqrt((h**2+f**2)/2)),g=Math.ceil(m/10),y=c/g;for(let e=1;e<=g;e++){const t=(u+y*e)%ote,n=Math.cos(t),o=Math.sin(t);r.push({x:s+n*h+-o*n,y:l+o*f+n*o})}return r}function ute(e){const t=rte(e),n=[],r=[];let o=0,i=0,a=null,s=null,l=null,c=null;for(let e=0;e<t.length;++e){const u=t[e],d=u[0];switch("S"!==d&&"s"!==d&&"C"!==d&&"c"!==d&&(a=null,s=null),"T"!==d&&"t"!==d&&"Q"!==d&&"q"!==d&&(l=null,c=null),d){case"m":r.length&&n.push(r.splice(0));case"l":o+=u[1],i+=u[2],r.push({x:o,y:i});break;case"M":r.length&&n.push(r.splice(0));case"L":o=u[1],i=u[2],r.push({x:o,y:i});break;case"H":o=u[1],r.push({x:o,y:i});break;case"h":o+=u[1],r.push({x:o,y:i});break;case"V":i=u[1],r.push({x:o,y:i});break;case"v":i+=u[1],r.push({x:o,y:i});break;case"a":r.push(...cte(u,o,i)),o+=u[6],i+=u[7];break;case"A":r.push(...cte(u,o,i)),o=u[6],i=u[7];break;case"c":r.push(...ste({x:o,y:i},{x:u[1]+o,y:u[2]+i},{x:u[3]+o,y:u[4]+i},{x:u[5]+o,y:u[6]+i})),a=u[3]+o,s=u[4]+i,o+=u[5],i+=u[6];break;case"C":r.push(...ste({x:o,y:i},{x:u[1],y:u[2]},{x:u[3],y:u[4]},{x:u[5],y:u[6]})),a=u[3],s=u[4],o=u[5],i=u[6];break;case"s":null!==a&&null!==a||(a=o,s=i),r.push(...ste({x:o,y:i},{x:2*o-a,y:2*i-s},{x:u[1]+o,y:u[2]+i},{x:u[3]+o,y:u[4]+i})),a=u[1]+o,s=u[2]+i,o+=u[3],i+=u[4];break;case"S":null!==a&&null!==a||(a=o,s=i),r.push(...ste({x:o,y:i},{x:2*o-a,y:2*i-s},{x:u[1],y:u[2]},{x:u[3],y:u[4]})),a=u[1],s=u[2],o=u[3],i=u[4];break;case"Q":r.push(...lte({x:o,y:i},{x:u[1],y:u[2]},{x:u[3],y:u[4]})),l=u[1],c=u[2],o=u[3],i=u[4];break;case"q":r.push(...lte({x:o,y:i},{x:u[1]+o,y:u[2]+i},{x:u[3]+o,y:u[4]+i})),l=u[1]+o,c=u[2]+i,o+=u[3],i+=u[4];break;case"T":null!==l&&null!==l||(l=o,c=i),l=2*o-l,c=2*i-c,r.push(...lte({x:o,y:i},{x:l,y:c},{x:u[1],y:u[2]})),o=u[1],i=u[2];break;case"t":null!==l&&null!==l||(l=o,c=i),l=2*o-l,c=2*i-c,r.push(...lte({x:o,y:i},{x:l,y:c},{x:u[1]+o,y:u[2]+i})),o+=u[1],i+=u[2];break;case"z":case"Z":r.length&&r.push({x:r[0].x,y:r[0].y})}}return function(e){for(let t=0;t<e.length-1;t++){const n=e[t],r=e[t+1];Math.abs(n.x-r.x)<1e-12&&Math.abs(n.y-r.y)<1e-12&&(e.splice(t,1),t--)}}(r),n.push(r.splice(0)),n}const dte={require:["renderer","chart"],defaultSettings:{settings:{target:"",fill:"transparent",stroke:"lime",opacity:1,radius:2,useOuterRect:!1}},on:{update(){this.draw()}},draw(){const e=this.chart.findShapes("path").filter((e=>e.key===this.props.target)),t=[];e.forEach((e=>{ute(e.attrs.d).forEach((e=>{e.forEach((e=>{t.push({type:"circle",cx:e.x,cy:e.y,r:this.props.radius,fill:this.props.fill,stroke:this.props.stroke,opacity:this.props.opacity,collider:{type:null}})}))}))})),this.renderer.render(t)},created(){this.props=this.settings.settings},resize(e){let{outer:t,inner:n}=e;return this.props.useOuterRect?t:n},render(){},mounted(){this.draw()},updated(){this.props=this.settings.settings,this.draw()}};var pte=[function(e){e.component("box",h8),e.component("box-marker",h8)},function(e){e.component("point",x8),e.component("point-marker",x8)},function(e){e.component("pie",C8)},function(e){e.component("grid-line",A8)},function(e){e.component("ref-line",F8)},function(e){e.component("axis",m7)},function(e){e.component("container",g7)},function(e){e.component("text",b7)},function(e){e.component("scrollbar",w7)},function(e){e.component("brush-range",j7),e.component("brush-area-dir",W7)},function(e){e.component("range",V7)},function(e){e.component("brush-lasso",J7)},function(e){e.component("labels",uee)},function(e){e.component("legend-cat",See)},function(e){e.component("legend-seq",Aee)},function(e){e.component("line",Lee)},function(e){e.component("brush-area",jee)},function(e){e.component("tooltip",Zee)},function(e){e.component("debug-collider",Qee)},function(e){e.component("debug-path-to-points",dte)}];let hte=class{constructor(e){this._parent=null,this._children=[],this._ancestors=null,this.type=e,this.data=null}detach(){return this._parent&&this._parent.removeChild(this),this}get parent(){return this._parent}get isBranch(){return this._children&&this._children.length}get children(){return this._children}get ancestors(){return this._ancestors||(this._ancestors=[],this.parent&&this._ancestors.push(this.parent,...this.parent.ancestors)),this._ancestors}get descendants(){let e=[];const t=this.children.length;let n,r;for(n=0;n<t;n++)r=this.children[n],e.push(r),r.children.length&&(e=[...e,...r.descendants]);return e}equals(e){const t=this.children,n=e.children;if(t.length!==n.length)return!1;for(let e=0;e<t.length;e++)if(!t[e].equals(n[e]))return!1;return!0}toJSON(){return{type:this.type,children:this.children.map((e=>e.toJSON()))}}};class fte{constructor(){let{x:e=0,y:t=0,width:n=0,height:r=0,minWidth:o=0,minHeight:i=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({x:e,y:t,width:n,height:r,minWidth:o,minHeight:i})}set(){let{x:e=0,y:t=0,width:n=0,height:r=0,minWidth:o=0,minHeight:i=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.type="rect",n>=0?(this.x=e,this.width=Math.max(n,o)):(this.x=e+Math.min(n,-o),this.width=-Math.min(n,-o)),r>=0?(this.y=t,this.height=Math.max(r,i)):(this.y=t+Math.min(r,-i),this.height=-Math.min(r,-i))}containsPoint(e){return h4(this,e)}intersectsLine(e){return f4(this,iQ(e))}intersectsRect(e){return d4(this,oQ(e))}intersectsCircle(e){return i4(e,this)}intersectsPolygon(e){return u4(e,this)}intersectsGeoPolygon(e){return w4(e,this)}points(){return[{x:this.x,y:this.y},{x:this.x+this.width,y:this.y},{x:this.x+this.width,y:this.y+this.height},{x:this.x,y:this.y+this.height}]}}class mte{constructor(){let{cx:e=0,cy:t=0,r:n=0,minRadius:r=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({cx:e,cy:t,r:n,minRadius:r})}set(){let{cx:e=0,cy:t=0,r:n=0,minRadius:r=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.type="circle",this.cx=e,this.cy=t,this.r=Math.max(n,r),this.vector={x:this.cx,y:this.cy}}containsPoint(e){return o4(this,e)}intersectsLine(e){return a4(this,iQ(e))}intersectsRect(e){return i4(this,oQ(e))}intersectsCircle(e){return n=e,!e4(t=this)&&!e4(n)&&(t.cx-n.cx)**2+(t.cy-n.cy)**2<=(t.r+n.r)**2;var t,n}intersectsPolygon(e){return s4(this,e)}intersectsGeoPolygon(e){return b4(this,e)}points(){return[{x:this.cx,y:this.cy}]}}class gte{constructor(){let{x1:e=0,y1:t=0,x2:n=0,y2:r=0,tolerance:o=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({x1:e,y1:t,x2:n,y2:r,tolerance:o})}set(){let{x1:e=0,y1:t=0,x2:n=0,y2:r=0,tolerance:o=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.type="line",this.x1=e,this.y1=t,this.x2=n,this.y2=r,this.tolerance=Math.max(0,Math.round(o)),this.vectors=this.points(),this.zeroSize=e===n&&t===r}containsPoint(e){if(this.tolerance>0){return a4({cx:e.x,cy:e.y,r:this.tolerance},this)}return g4(this,e)}intersectsLine(e){return m4(this,iQ(e))}intersectsRect(e){return f4(oQ(e),this)}intersectsCircle(e){return a4(e,this)}intersectsPolygon(e){return c4(e,this)}intersectsGeoPolygon(e){return v4(e,this)}points(){return[{x:this.x1,y:this.y1},{x:this.x2,y:this.y2}]}}class yte{constructor(){let{vertices:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({vertices:e})}set(){let{vertices:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.type="polygon",this.vertices=e.slice(),this.edges=[],function(e){for(let t=0;t<e.length-1;t++){const n=e[t],r=e[t+1];n.x===r.x&&n.y===r.y&&(e.splice(t,1),t--)}}(this.vertices),!(this.vertices.length<=2)){!function(e){const t=e[0],n=e[e.length-1];t.x===n.x&&t.y===n.y||e.push(t)}(this.vertices),this.xMin=NaN,this.yMin=NaN,this.xMax=NaN,this.yMax=NaN;for(let e=0;e<this.vertices.length;e++)e<this.vertices.length-1&&this.edges.push([this.vertices[e],this.vertices[e+1]]),this.xMin=isNaN(this.xMin)?this.vertices[e].x:Math.min(this.xMin,this.vertices[e].x),this.xMax=isNaN(this.xMax)?this.vertices[e].x:Math.max(this.xMax,this.vertices[e].x),this.yMin=isNaN(this.yMin)?this.vertices[e].y:Math.min(this.yMin,this.vertices[e].y),this.yMax=isNaN(this.yMax)?this.vertices[e].y:Math.max(this.yMax,this.vertices[e].y);this._bounds=null,this._boundingRect=null}}containsPoint(e){return l4(this,e)}intersectsCircle(e){return s4(e,this)}intersectsLine(e){return c4(this,iQ(e))}intersectsRect(e){return u4(this,oQ(e))}intersectsPolygon(e){return y4(this,e)}intersectsGeoPolygon(e){return _4(e,this)}points(){return this.vertices}bounds(){return this._bounds||(this._bounds=[{x:this.xMin,y:this.yMin},{x:this.xMax,y:this.yMin},{x:this.xMax,y:this.yMax},{x:this.xMin,y:this.yMax}]),this._bounds}boundingRect(){return this._boundingRect||(this._boundingRect={x:this.xMin,y:this.yMin,width:this.xMax-this.xMin,height:this.yMax-this.yMin}),this._boundingRect}}function _te(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new yte(...t)}function bte(e){const t=e[0],n=e[e.length-1];t.x===n.x&&t.y===n.y||e.push(t)}function xte(e){for(let t=0;t<e.length-1;t++){const n=e[t],r=e[t+1];n.x===r.x&&n.y===r.y&&(e.splice(t,1),t--)}}class vte{constructor(){let{vertices:e=[[]]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({vertices:e})}set(){let{vertices:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.type="geopolygon",this.vertices=e.slice(),this.numPolygons=this.vertices.length,this.polygons=[],this.xMin=NaN,this.yMin=NaN,this.xMax=NaN,this.yMax=NaN;for(let e=0;e<this.numPolygons;e++)xte(this.vertices[e]),this.vertices[e].length>2&&bte(this.vertices[e]),this.polygons[e]=_te({vertices:this.vertices[e]}),this.xMin=isNaN(this.xMin)?this.polygons[e].xMin:Math.min(this.xMin,this.polygons[e].xMin),this.xMax=isNaN(this.xMax)?this.polygons[e].xMax:Math.max(this.xMax,this.polygons[e].xMax),this.yMin=isNaN(this.yMin)?this.polygons[e].yMin:Math.min(this.yMin,this.polygons[e].yMin),this.yMax=isNaN(this.yMax)?this.polygons[e].yMax:Math.max(this.yMax,this.polygons[e].yMax);this._bounds=null,this._boundingRect=null}containsPoint(e){return x4(this,e)}intersectsCircle(e){return b4(e,this)}intersectsLine(e){return v4(this,iQ(e))}intersectsRect(e){return w4(this,oQ(e))}intersectsPolygon(e){return _4(this,e)}intersectsGeoPolygon(e){return function(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!d4(n,r)&&(p4(r,n)?r4(t,e):r4(e,t))}(this,e)}points(){return this.vertices}bounds(){return this._bounds||(this._bounds=[{x:this.xMin,y:this.yMin},{x:this.xMax,y:this.yMin},{x:this.xMax,y:this.yMax},{x:this.xMin,y:this.yMax}]),this._bounds}boundingRect(){return this._boundingRect||(this._boundingRect={x:this.xMin,y:this.yMin,width:this.xMax-this.xMin,height:this.yMax-this.yMin}),this._boundingRect}}function wte(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new vte(...t)}class Ste{constructor(){let{points:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({points:e})}set(){let{points:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.type="polyline",this.segments=[],this._points=e.slice(),this._points.length>1)for(let e=0,r=this._points.length-1;e<r;e++)t=this._points[e],n=this._points[e+1],(t.x!==n.x||t.y!==n.y)&&this.segments.push({x1:this._points[e].x,y1:this._points[e].y,x2:this._points[e+1].x,y2:this._points[e+1].y});var t,n}containsPoint(e){return this.segments.some((t=>g4(t,e)))}intersectsCircle(e){return this.segments.some((t=>a4(e,t)))}intersectsLine(e){const t=iQ(e);return this.segments.some((e=>m4(e,t)))}intersectsRect(e){const t=oQ(e);return this.segments.some((e=>f4(t,e)))}intersectsPolygon(e){return this.segments.some((t=>c4(e,t)))}intersectsGeoPolygon(e){return this.segments.some((t=>v4(e,t)))}points(){return this._points}}const Cte=u0();function Ete(e,t){return Cte.get(e)(t)}Cte.add("rect",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new fte(...t)})),Cte.add("circle",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new mte(...t)})),Cte.add("line",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new gte(...t)})),Cte.add("polygon",_te),Cte.add("geopolygon",wte),Cte.add("polyline",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Ste(...t)}));class kte{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.set(e)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.geometries=[],e.forEach((e=>{const t=Ete(e.type,e);t&&this.geometries.push(t)}))}containsPoint(e){return this.geometries.some((t=>t.containsPoint(e)))}intersectsLine(e){return this.geometries.some((t=>t.intersectsLine(e)))}intersectsRect(e){return this.geometries.some((t=>t.intersectsRect(e)))}intersectsCircle(e){return this.geometries.some((t=>t.intersectsCircle(e)))}intersectsPolygon(e){return this.geometries.some((t=>t.intersectsPolygon(e)))}intersectsGeoPolygon(e){return this.geometries.some((t=>t.intersectsGeoPolygon(e)))}}class Mte{constructor(){this._elements=[[1,0,0],[0,1,0],[0,0,1]],this._stack=[]}clone(){return(new Mte).multiply(this)}set(e){return this._elements=e,this}save(){return this._stack.push(this.elements),this}restore(){return this._stack.length&&(this._elements=this._stack.pop()),this}add(e){let t,n;for(t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)this._elements[t][n]+=e;return this}translate(e,t){return this.multiply([[1,0,e],[0,1,t],[0,0,1]]),this}rotate(e){let t=Math.cos(-e),n=Math.sin(-e);return this.multiply([[t,n,0],[-n,t,0],[0,0,1]]),this}multiply(e){let t,n,r,o;if(e instanceof Mte&&(e=e._elements),Array.isArray(e)){for(r=[[0,0,0],[0,0,0],[0,0,0]],t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)for(o=0;o<3;o++)r[t][n]+=this._elements[t][o]*e[o][n];this._elements=r}else for(t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)this._elements[t][n]*=e;return this}scale(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return this.multiply([[e,0,0],[0,t,0],[0,0,1]]),this}transform(e,t,n,r,o,i){return this.multiply([[e,n,o],[t,r,i],[0,0,1]]),this}determinant(){let e=this._elements[0][0],t=this._elements[0][1],n=this._elements[0][2],r=this._elements[1][0],o=this._elements[1][1],i=this._elements[1][2],a=this._elements[2][0],s=this._elements[2][1],l=this._elements[2][2],c=0;return c=e*o*l+t*i*a+n*r*s-n*o*a-t*r*l-e*i*s,c}invert(){let e=this.determinant(),t=this._elements[0][0],n=this._elements[0][1],r=this._elements[0][2],o=this._elements[1][0],i=this._elements[1][1],a=this._elements[1][2],s=this._elements[2][0],l=this._elements[2][1],c=this._elements[2][2];return this._elements=[[i*c-a*l,r*l-n*c,n*a-r*i],[a*s-o*c,t*c-r*s,r*o-t*a],[o*l-i*s,s*n-t*l,t*i-n*o]],this.multiply(1/e),this}transpose(){const e=Object.create(this._elements);return this._elements=[[e[0][0],e[1][0],e[2][0]],[e[0][1],e[1][1],e[2][1]],[e[0][2],e[1][2],e[2][2]]],this}identity(){return this._elements=[[1,0,0],[0,1,0],[0,0,1]],this}toString(){return"".concat(this._elements.map((e=>e.join("\t"))).join("\n"))}isIdentity(){const e=this._elements;return 1===e[0][0]&&0===e[0][1]&&0===e[0][2]&&0===e[1][0]&&1===e[1][1]&&0===e[1][2]&&0===e[2][0]&&0===e[2][1]&&1===e[2][2]}transformPoint(e){let t,n,r=[e.x,e.y,1],o=this._elements,i=[0,0,0];for(t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)i[t]+=r[n]*o[t][n];return{x:i[0],y:i[1]}}transformPoints(e){let t,n,r,o,i,a=this._elements,s=[];for(o=0;o<e.length;o++){for(t=[e[o].x,e[o].y,1],i=[0,0,0],n=0;n<this._elements.length;n++)for(r=0;r<this._elements[n].length;r++)i[n]+=t[r]*a[n][r];s.push({x:i[0],y:i[1]})}return s}get elements(){const e=this._elements;return[[e[0][0],e[0][1],e[0][2]],[e[1][0],e[1][1],e[1][2]],[e[2][0],e[2][1],e[2][2]]]}}const Rte=/(translate|scale|rotate|matrix)\(([0-9,.eE+-\s]+)(?:,|\s?)+\)/g;function Ate(e,t){const n=t.args[0]*(Math.PI/180);if(t.args.length>2){const r=t.args[1],o=t.args[2];e.translate(r,o),e.rotate(n),e.translate(-r,-o)}else 1===t.args.length&&e.rotate(n)}function Ite(e,t){const n=t.args[0],r=isNaN(t.args[1])?t.args[0]:t.args[1];e.scale(n,r)}function Pte(e,t){const n=t.args[0],r=isNaN(t.args[1])?0:t.args[1];e.translate(n,r)}function Ote(e,t){t.args.length>=6&&e.transform(...t.args)}function Lte(e,t){const n=function(e){let t,n=[];for(;null!==(t=Rte.exec(e));){const e=t[2].trim(),r=-1===e.indexOf(",")?e.split(" "):e.split(",");n.push({cmd:t[1],args:r.filter((e=>e.trim().length>0)).map((e=>Number(e)))})}return n}(e);let r;for(let e=0,o=n.length;e<o;e++)r=n[e],"rotate"===r.cmd?Ate(t,r):"scale"===r.cmd?Ite(t,r):"matrix"===r.cmd?Ote(t,r):"translate"===r.cmd&&Pte(t,r)}const Dte={type:/^\w[\w-]+/,attr:/^\[\w(?:[\w\._-]+)?(?:[!]?=['\"][\w\s*#_-]*['\"])?\]/,universal:/^(\*)/,tag:/^\.(\w+)/},Tte={type:(e,t)=>t.filter((t=>{const n=t.type;return!!n&&n.toLowerCase()===e.toLowerCase()})),attr:(e,t,n,r)=>r.filter((r=>{const o=r.attrs[e];if(!t)return void 0!==o;if(void 0===o)return!1;switch(t){case"=":return n===String(o);case"!=":return n!==String(o);default:return!1}})),universal:e=>e,tag:(e,t)=>t.filter((t=>{const n=t.tag;return!!n&&-1!==n.trim().split(/\s+/).indexOf(e.replace(".",""))}))};function zte(e,t){if(!t||!t.length||!e||"function"!=typeof Tte[e.type])return[];switch(e.type){case"type":case"tag":return Tte[e.type](e.value,t);case"attr":return Tte[e.type](e.attribute,e.operator,e.attributeValue,t);case"universal":return Tte[e.type](t);default:return[]}}var jte={find:function(e,t){const n=[],r=[];let o,i;if(t.isBranch){let a;o=function(e){const t=[];let n,r,o,i;return e.split(/\s*,\s*/).forEach((e=>{e=e.trim(),n=[];const a=t=>{o=e.match(Dte[t]),o&&(i=!0,e=e.slice(o[0].length),r={type:t,value:o[0]},"attr"===t&&(o=o[0].match(/\[(\w[\w\._-]+)?(?:([!]?=)['\"]([\w\s#_-]*)['\"])?\]/),r.attribute=o[1],r.operator=o[2],r.attributeValue=o[3]),n.push(r))};for(;e&&(i=!1,o=e.match(/^\s*([>+~]|\s)\s*/),o&&(i=!0,n.push({type:" ",value:o[0]}),e=e.slice(o[0].length)),Object.keys(Dte).forEach(a),n&&n.length&&t.indexOf(n)<0&&t.push(n),i););})),t}(e),i=t.descendants;for(let e=0,t=o.length;e<t;e++){a=o[e];const t=[];let n=i.slice(),s=!1;a.reverse().forEach((e=>{if(" "===e.type)return t.push(n),n=i.slice(),void(s=!1);n=zte(e,n),s=!0})),s&&t.push(n);const l=t[0].filter((e=>{let n,r=e.parent;for(let e=1;e<t.length;e++){for(n=t[e].indexOf(r);r&&n<0;)r=r.parent,n=t[e].indexOf(r);if(n<0)return!1}return!0}));r.push(l)}for(let e=0,t=r.length;e<t;e++)for(let t=0,o=r[e].length;t<o;t++)n.indexOf(r[e][t])<0&&n.push(r[e][t])}return n||[]}};function Nte(e,t,n){const r=e.type;let o=e.points();n&&(o=o.every((e=>Array.isArray(e)))?o.map((e=>n.transformPoints(e))):n.transformPoints(o)),function(e,t){for(let n=0,r=e.length;n<r;n++)e[n].x/=t,e[n].y/=t}(o,t);let i=null;if("rect"===r||"bounds"===r)i=oQ(o),i.type=r;else if("circle"===r)i=function(e,t){return{cx:e[0].x,cy:e[0].y,r:t}}(o,e.r),i.type=r;else if("line"===r)i=iQ(o),i.type=r;else if("polygon"===r||"polyline"===r){i={type:"path",d:k6(o,"polygon"===r)}}else if("geopolygon"===r){let e="";for(let t=0;t<o.length;t++)e+=k6(o[t],!0);i={type:"path",d:e}}return i}class qte{constructor(e){this._bounds=function(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const{x:n,y:r,width:o,height:i}=e.boundingRect?e.boundingRect(t):{x:0,y:0,width:0,height:0};return{x:n,y:r,width:o,height:i}},this._attrs=e.attrs,this._type=e.type,this._data=e.data,this._dpi=e.stage?e.stage.dpi:1,this._collider=()=>function(e,t){if(e.collider){const n=e.modelViewMatrix;return"collection"===e.colliderType?{type:"container",children:e.collider.geometries.map((e=>Nte(e,t,n)))}:Nte(e.collider,t,n)}return null}(e,this._dpi),this._desc=e.desc,this._tag=e.tag,this._children=()=>e.children.map((e=>new qte(e))),this._parent=()=>e.parent?new qte(e.parent):null,this._cache={elementBoundingRect:null},this._getElementBoundingRect=()=>(!this._cache.elementBoundingRect&&this.element&&(this._cache.elementBoundingRect=this.element.getBoundingClientRect()),this._cache.elementBoundingRect||{left:0,top:0})}get children(){return this._children()}get parent(){return this._parent()}get type(){return this._type}get data(){return this._data}get attrs(){return this._attrs}set element(e){this._cache.elementBoundingRect=null,this._element=e}get element(){return this._element}set key(e){this._key=e}get key(){return this._key}get bounds(){const e=this._bounds();return e.x/=this._dpi,e.y/=this._dpi,e.width/=this._dpi,e.height/=this._dpi,e}get localBounds(){return this._bounds(!1)}boundsRelativeTo(e){const t=typeof e,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?this.bounds:this.localBounds,r=this._getElementBoundingRect();let o=r.left,i=r.top;if("object"===t&&null!==e&&"function"==typeof e.getBoundingClientRect){const{left:t=0,top:n=0}=e.getBoundingClientRect();o-=t,i-=n}return n.x+=o,n.y+=i,n}get collider(){return this._collider()}get desc(){return this._desc}get tag(){return this._tag}}function Fte(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new qte(...t)}class Wte{constructor(e){this._node=Fte(e),this._parent=null,this._input=null}get node(){return this._node}set parent(e){this._parent=e}get parent(){return this._parent}set input(e){this._input=e}get input(){return this._input}}function Bte(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Wte(...t)}function $te(e,t){const n=e.parent;if(n&&"stage"!==n.type){t.parent=Bte(n);const e=n.parent;e&&"stage"!==e.type&&$te(e,t.parent)}}function Hte(e,t,n){if(null===e.colliderType)return null;const r=function(e,t){let n={};if(e.modelViewMatrix)if(Array.isArray(t))n=e.inverseModelViewMatrix.transformPoints(t);else if(isNaN(t.r))Array.isArray(t.vertices)?n.vertices=e.inverseModelViewMatrix.transformPoints(t.vertices):n=e.inverseModelViewMatrix.transformPoint(t);else{const r={x:t.cx,y:t.cy};({x:n.cx,y:n.cy}=e.inverseModelViewMatrix.transformPoint(r)),n.r=t.r}else n=t;return Array.isArray(n.vertices)&&(n=n.vertices.every((e=>Array.isArray(e)))?wte(n):_te(n)),n}(e,n);return"frontChild"===e.colliderType?function(e,t,n){for(let r=e.descendants.length-1;r>=0;r--){const o=e.descendants[r];if(null!==o.collider&&o.collider[t](n)){const e=Bte(o);return $te(o,e),e}}return null}(e,t,r):function(e,t,n){if(e.collider[t](n)){const t=Bte(e);return $te(e,t),t}return null}(e,t,r)}function Vte(e,t,n,r){const o=e.length;for(let i=0;i<o;i++){const o=e[i],a=Hte(o,t,r);a&&n.push(a),!o.children||a||o.collider||Vte(o.children,t,n,r)}}function Gte(e,t,n){const r=e.length;for(let o=0;o<r;o++){const r=e[o];if(null!==Hte(r,t,n))return!0;if(r.children&&!r.collider)return Gte(r.children,t,n)}return!1}function Ute(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;let n={};switch(aQ(e)){case"circle":return n.cx=e.cx*t,n.cy=e.cy*t,n.r=e.r,["intersectsCircle",n];case"rect":return n=rQ(e).map((e=>O6(e,t))),["intersectsRect",n];case"line":return n=nQ(e).map((e=>O6(e,t))),["intersectsLine",n];case"point":return n=O6(e,t),["containsPoint",n];case"polygon":return n.vertices=e.vertices.map((e=>O6(e,t))),["intersectsPolygon",n];case"geopolygon":return n.vertices=e.vertices.map((e=>e.map((e=>O6(e,t))))),["intersectsGeoPolygon",n];default:return[]}}function Yte(e,t){const[n,r]=Ute(t,e.dpi),o=[];return n&&(Vte([e],n,o,r),function(e,t){for(let n=0,r=t.length;n<r;n++)t[n].input=e}(t,o)),o}function Kte(e,t){const[n,r]=Ute(t,e.dpi);return Gte([e],n,r)}class Xte extends hte{constructor(e){super(e),this._stage=null,this._collider={type:null,definition:null,fn:null},this._attrs={},this._node=null}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.node=e;const{data:t,desc:n,tag:r,strokeReference:o,fillReference:i}=e;!function(e,t){Object.keys(E6).forEach((n=>{const r=t[n];void 0!==r&&(e[E6[n]]=r)}))}(this.attrs,e),void 0!==t&&(this.data=t),"object"==typeof n&&(this.desc=UZ(!0,{},n)),"string"==typeof r&&(this.tag=r),"string"==typeof o&&(this.strokeReference=o),"string"==typeof i&&(this.fillReference=i)}findShapes(e){return jte.find(e,this).map((e=>Fte(e)))}getItemsFrom(e){return Yte(this,e)}containsPoint(e){return Kte(this,e)}intersectsLine(e){return Kte(this,e)}intersectsRect(e){return Kte(this,e)}intersectsCircle(e){return Kte(this,e)}intersectsPolygon(e){return Kte(this,e)}intersectsGeoPolygon(e){return Kte(this,e)}resolveLocalTransform(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Mte;void 0!==this.attrs.transform&&Lte(this.attrs.transform,e),this.modelViewMatrix=e.clone()}resolveGlobalTransform(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Mte;const t=this.ancestors;if(t.length>0)for(let n=t.length-1;n>=0;n--)t[n].resolveLocalTransform(e),e=t[n].modelViewMatrix;this.resolveLocalTransform(e)}attr(e){return this.attrs[e]}equals(e){const t=this.attrs,n=Object.keys(t),r=e.attrs,o=Object.keys(r);if(n.length!==o.length)return!1;for(let e=0;e<n.length;e++){const o=n[e];if(!Object.hasOwnProperty.call(r,o))return!1;if(t[o]!==r[o])return!1}return super.equals(e)}toJSON(){const e=super.toJSON();return e.attrs=this.attrs,e}get attrs(){return this._attrs}get stage(){return this._parent&&!this._stage?this._stage=this._parent.stage:this._parent||this._stage===this||(this._stage=null),this._stage}set modelViewMatrix(e){this._mvm=e,this._imvm=null}get modelViewMatrix(){return this._mvm}get inverseModelViewMatrix(){return this._imvm=this._imvm?this._imvm:this._mvm.clone().invert(),this._imvm}set node(e){this._node=e}get node(){return this._node}set collider(e){const t=Array.isArray(e)?"collection":e&&e.type;return"string"!=typeof t?(this._collider.type=null,this._collider.definition=null,void(this._collider.fn=null)):null!==this._collider&&this._collider.type===t&&null!==this._collider.fn?(this._collider.fn.set(e),void(this._collider.definition=e)):(this._collider.type=t,void(this._collider.definition=e))}get collider(){if(null!==this._collider.fn)return this._collider.fn;switch(this._collider.type){case"collection":this._collider.fn=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new kte(...t)}(this._collider.definition);break;case"frontChild":return!0;case"bounds":this._collider.fn=Ete("rect",this.boundingRect());break;case"line":case"rect":case"circle":case"polygon":case"geopolygon":case"polyline":this._collider.fn=Ete(this._collider.type,this._collider.definition);break;default:return null}return this._collider.fn}get colliderType(){return this._collider.type}}class Jte extends hte{addChild(e){if(!(e&&e instanceof hte))throw new TypeError("Expecting a Node as argument, but got ".concat(e));if(e===this)throw new Error("Can not add itself as child!");if(e._children&&e._children.length&&this.ancestors.indexOf(e)>=0)throw new Error("Can not add an ancestor as child!");return e._parent&&e._parent!==this&&e._parent.removeChild(e),this._children.push(e),e._parent=this,e._ancestors=null,this}addChildren(e){let t,n=e?e.length:0;for(t=0;t<n;t++)this.addChild(e[t]);return this}removeChild(e){const t=this._children.indexOf(e);return t>=0&&(this._children.splice(t,1),e._parent=null,e._ancestors=null),this}removeChildren(e){let t,n;if(!this._children)return this;if(e)for(n=e.length,t=0;t<n;t++)this.removeChild(e[t]);else for(;this._children.length;)this.removeChild(this._children[0]);return this}}const Zte=Jte.prototype;class Qte extends Xte{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{type:t="container"}=e;super(t),this.set(e)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super.set(e);const{collider:t}=e,n=UZ({type:null},t);this.collider=n,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}appendChildRect(e,t){if(void 0!==e.bounds){const n=this.__boundingRect[t]||{},[r,,o]=e.bounds(t),{x:i,y:a}=r,{x:s,y:l}=o,c=isNaN(n.width)?s:Math.max(s,n.width+n.x),u=isNaN(n.height)?l:Math.max(l,n.height+n.y);n.x=isNaN(n.x)?i:Math.min(i,n.x),n.y=isNaN(n.y)?a:Math.min(a,n.y),n.width=c-n.x,n.height=u-n.y,this.__boundingRect[t]=n}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];const t=this.children.length;for(let n=0;n<t;n++)this.appendChildRect(this.children[n],e);return this.__boundingRect[e]=UZ({x:0,y:0,width:0,height:0},this.__boundingRect[e]),this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}addChild(e){const t=Zte.addChild.call(this,e);if(this._collider&&"bounds"===this._collider.type){this.appendChildRect(e,!0);const t=UZ({type:"bounds",x:0,y:0,width:0,height:0},this.__boundingRect.true);this.collider=t}return t}addChildren(e){const t=Zte.addChildren.call(this,e),n=e.length;if(this._collider&&"bounds"===this._collider.type&&n>0){for(let t=0;t<n;t++)this.appendChildRect(e[t],!0);const t=UZ({type:"bounds",x:0,y:0,width:0,height:0},this.__boundingRect.true);this.collider=t}return t}removeChild(e){e._stage=null;let t,n=e.descendants,r=n?n.length:0;for(t=0;t<r;t++)n[t]._stage=null;if(Zte.removeChild.call(this,e),this._collider&&"bounds"===this._collider.type){this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null};const e=UZ(this.boundingRect(!0),{type:"bounds"});this.collider=e}return this}removeChildren(e){if(Zte.removeChildren.call(this,e),this._collider&&"bounds"===this._collider.type){this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null};const e=UZ(this.boundingRect(!0),{type:"bounds"});this.collider=e}return this}}function ene(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Qte(...t)}class tne extends Qte{constructor(e){super("stage"),this._stage=this,this._dpiRatio=e||1}get dpi(){return this._dpiRatio}}const nne=Jte.prototype,rne=["x1","x2","y1","y2","id","offset","style"];class one extends Xte{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{type:t="container"}=e;super(t),this.set(e),this._boundingRect={}}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super.set(e);const t=this.attrs;let n="";for(let r=0,o=rne.length;r!==o;r++)n=rne[r],void 0!==e[n]&&(t[n]=e[n])}addChild(e){return nne.addChild.call(this,e)}addChildren(e){return nne.addChildren.call(this,e)}removeChild(e){e._stage=null;let t,n=e.descendants,r=n?n.length:0;for(t=0;t<r;t++)n[t]._stage=null;return nne.removeChild.call(this,e),this}removeChildren(e){return nne.removeChildren.call(this,e),this}}function ine(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new one(...t)}const ane=Jte.prototype,sne=["patternUnits","x","y","width","height","id"];class lne extends Xte{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{type:t="container"}=e;super(t),this.set(e),this._boundingRect={}}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super.set(e);const t=this.attrs;let n="";for(let r=0,o=sne.length;r!==o;r++)n=sne[r],void 0!==e[n]&&(t[n]=e[n])}addChild(e){return ane.addChild.call(this,e)}addChildren(e){return ane.addChildren.call(this,e)}removeChild(e){e._stage=null;let t,n=e.descendants,r=n?n.length:0;for(t=0;t<r;t++)n[t]._stage=null;return ane.removeChild.call(this,e),this}removeChildren(e){return ane.removeChildren.call(this,e),this}}class cne extends Xte{constructor(){super("rect"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{x:t=0,y:n=0,width:r=0,height:o=0,rx:i=0,ry:a=0,collider:s}=e,l=UZ({type:"rect",x:t,y:n,width:r,height:o},s);super.set(e),r>=0?(this.attrs.x=t,this.attrs.width=r):(this.attrs.x=t+r,this.attrs.width=-r),o>=0?(this.attrs.y=n,this.attrs.height=o):(this.attrs.y=n+o,this.attrs.height=-o),i>0&&(this.attrs.rx=i),a>0&&(this.attrs.ry=a),this.collider=l,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];const t=rQ(this.attrs),n=e&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(t):t,[r,o,i,a]=tQ(n);return this.__boundingRect[e]={x:r,y:o,width:i-r,height:a-o},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}class une extends Xte{constructor(){super("circle"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{cx:t=0,cy:n=0,r:r=0,collider:o}=e,i=UZ({type:"circle",cx:t,cy:n,r:r},o);super.set(e),this.attrs.cx=t,this.attrs.cy=n,this.attrs.r=r,this.collider=i,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];const t=this.bounds(e);return this.__boundingRect[e]={x:t[0].x,y:t[0].y,width:t[2].x-t[0].x,height:t[2].y-t[0].y},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const{cx:t,cy:n,r:r,r:o}=this.attrs,i=t-r,a=n-o;let s=2*r,l=2*o,c=[{x:i,y:a},{x:i+s,y:a},{x:i+s,y:a+l},{x:i,y:a+l}];if(e&&this.modelViewMatrix){c=this.modelViewMatrix.transformPoints(c);const[t,n,r,o]=tQ(c);s=r-t,l=o-n,this.__bounds[e]=[{x:t,y:n},{x:t+s,y:n},{x:t+s,y:n+l},{x:t,y:n+l}]}else this.__bounds[e]=c;return this.__bounds[e]}}class dne extends Xte{constructor(){super("line"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{x1:t=0,y1:n=0,x2:r=0,y2:o=0,collider:i}=e;super.set(e),this.attrs.x1=t,this.attrs.y1=n,this.attrs.x2=r,this.attrs.y2=o;const a={type:"line",x1:t,y1:n,x2:r,y2:o};this.collider=UZ(a,i),this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];let t=nQ(this.attrs);e&&this.modelViewMatrix&&(t=this.modelViewMatrix.transformPoints(t));const[n,r,o,i]=tQ(t),a=n!==o||r!==i;return this.__boundingRect[e]={x:n,y:r,width:a?Math.max(1,o-n):0,height:a?Math.max(1,i-r):0},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}const pne=Math.PI/2;function hne(e,t){const n=Math.atan2(t.y-e.y,t.x-e.x);return n<0?n+2*Math.PI:n}function fne(e,t,n){return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}}const mne={step:function(e){return new o0(e,.5)},stepAfter:function(e){return new o0(e,1)},stepBefore:function(e){return new o0(e,0)},linear:TQ,basis:function(e){return new $Q(e)},cardinal:GQ.tension(0),catmullRom:YQ,monotonex:function(e){return new QQ(e)},monotoney:function(e){return new e0(e)},natural:function(e){return new n0(e)}};function gne(e){if(e.length<2)return!1;const t=e[0],n=e[e.length-1];return Math.abs(t.x-n.x)<1e-12&&Math.abs(t.y-n.y)<1e-12}class yne extends Xte{constructor(){super("path"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(super.set(e),this.segments=[],this.points=[],e.arcDatum){const t=LQ();t.innerRadius(e.desc.slice.innerRadius),t.outerRadius(e.desc.slice.outerRadius),t.cornerRadius(e.desc.slice.cornerRadius);const n=t(e.arcDatum);this.attrs.d=n}else if(e.points){const{major:t,minor:n,layerObj:r,points:o,stngs:i,generatorType:a}=e,s=NQ(),l=i.coordinates?i.coordinates.defined:null;s[t.p]((e=>e.major*t.size))["".concat(n.p,"1")]((e=>e.minor*n.size))["".concat(n.p,"0")]((e=>e.minor0*n.size)).curve(mne["monotone"===r.curve?"monotone".concat(t.p):r.curve]),l?s.defined((e=>!e.dummy&&"number"==typeof e.minor&&!isNaN(e.minor)&&e.defined)):s.defined((e=>!e.dummy&&"number"==typeof e.minor&&!isNaN(e.minor)));const c=i.connect?o.filter(s.defined()):o,u=("area"===a?s:s[a]())(c);this.attrs.d=u}else e.d&&(this.attrs.d=e.d);if(this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null},Array.isArray(e.collider)||"object"==typeof e.collider&&void 0!==e.collider.type)this.collider=e.collider;else if(this.attrs.d){if(this.segments=ute(this.attrs.d),this.segments.length>1&&this.segments.every((e=>gne(e))))return void(this.collider=UZ({type:"geopolygon",vertices:this.segments},e.collider));this.segments.forEach((t=>{if(t.length<=1);else if(gne(t))this.collider=UZ({type:"polygon",vertices:t},e.collider);else if("object"==typeof e.collider&&e.collider.visual){const n=this.attrs["stroke-width"]/2;this.collider=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=[],o=[];if("h"===n.forceOrientation){const t=e[0].x<e[1].x?-1:1,n=e[e.length-1].x>e[e.length-2].x?1:-1;e.unshift({x:e[0].x+t,y:e[0].y}),e.push({x:e[e.length-1].x+n,y:e[e.length-1].y})}else if("v"===n.forceOrientation){const t=e[0].y<e[1].y?-1:1,n=e[e.length-1].y>e[e.length-2].y?1:-1;e.unshift({x:e[0].x,y:e[0].y+t}),e.push({x:e[e.length-1].x,y:e[e.length-1].y+n})}const i=e.length-1;for(let n=1;n<i;n++){const a=e[n-1],s=e[n],l=e[n+1],c=hne(s,a),u=hne(s,l),d=(c+u)/2,p=d+Math.PI,h=Math.max(d,p),f=Math.min(d,p),m=c>u;if(1===n){const e=hne(a,s);r.push(fne(a,e-pne,t)),o.unshift(fne(a,e+pne,t))}const g=m?h:f,y=m?f:h;if(r.push(fne(s,g,t)),o.unshift(fne(s,y,t)),n===i-1){const e=hne(l,s);r.push(fne(l,e+pne,t)),o.unshift(fne(l,e-pne,t))}}return{type:"polygon",vertices:[...r,...o]}}(t,n,e.collider)}else this.collider=UZ({type:"polyline",points:t},e.collider)}))}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];this.points.length||(this.segments=this.segments.length?this.segments:ute(this.attrs.d),this.points=function(e){const t=[];let n,r=e.length;for(let o=0;o<r;o++){n=e[o];for(let e=0;e<n.length;e++)t.push(n[e])}return t}(this.segments));const t=e&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(this.points):this.points,[n,r,o,i]=tQ(t);return this.__boundingRect[e]={x:n||0,y:r||0,width:o-n||0,height:i-r||0},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}function _ne(e){let{data:t,_boundingRect:n,_textBoundsFn:r}=e;return null!=t&&(n||r)}let bne=class extends Xte{constructor(){super("text"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{x:t=0,y:n=0,dx:r=0,dy:o=0,textBoundsFn:i,text:a,title:s,collider:l,boundingRect:c,ellipsed:u}=e;super.set(e),this.attrs.x=t,this.attrs.y=n,this.attrs.dx=r,this.attrs.dy=o,this.attrs.text=a,void 0!==s&&(this.attrs.title=String(s)),"object"==typeof c?this._textBoundsFn=()=>c:"function"==typeof i&&(this._textBoundsFn=i),"string"==typeof u&&(this.ellipsed=u),this.collider=UZ({type:_ne(this)?"bounds":null},l),this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[t])return this.__boundingRect[t];if("function"!=typeof this._textBoundsFn)return{x:0,y:0,width:0,height:0};e=this._textBoundsFn(this.attrs);const n=rQ(e),r=t&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(n):n,[o,i,a,s]=tQ(r);return this.__boundingRect[t]={x:o,y:i,width:a-o,height:s-i},this.__boundingRect[t]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}};const xne=u0();function vne(e,t){return xne.get(e)(t)}xne.add("rect",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new cne(...t)})),xne.add("circle",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new une(...t)})),xne.add("text",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new bne(...t)})),xne.add("line",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new dne(...t)})),xne.add("path",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new yne(...t)})),xne.add("stage",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new tne(...t)})),xne.add("container",ene),xne.add("defs",ene),xne.add("linearGradient",ine),xne.add("radialGradient",ine),xne.add("conicGradient",ine),xne.add("stop",ine),xne.add("pattern",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new lne(...t)}));const wne=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=[{}];function n(){return t[t.length-1]}return n.save=function(){let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const o=n(),i={};let a="";for(let t=0;t<e.length;t++)a=e[t],void 0!==o[a]&&(i[a]=o[a]);return UZ(i,r),t.push(i),n()},n.restore=function(){t.splice(t.length-1,1)},n}(["stroke","fill","strokeWidth","opacity","fontFamily","fontSize","baseline"]);function Sne(e,t){if(Array.isArray(t))for(let n=0,r=t.length;n<r;n++)t[n](e)}function Cne(e,t,n){e.node=n[t],e.index=t}function Ene(e,t,n,r){let o=!1;const i={siblings:e,node:null,index:0};for(let a=0,s=e.length;a<s;a++){if(Cne(i,a,e),Sne(i,r.create),o="function"==typeof i.node.disabled?i.node.disabled():i.node.disabled,o)continue;i.node=wne.save(i.node);const s=vne(i.node.type,i.node);s&&(i.node.transform&&(n.save(),Lte(i.node.transform,n)),n.isIdentity()||(s.modelViewMatrix=n.clone()),t.addChild(s),i.node.children&&Ene(i.node.children,s,n,r),i.node.transform&&n.restore()),wne.restore()}}function kne(e){let{items:t,stage:n,dpi:r,on:o={}}=e;return n||(n=vne("stage",r)),Ene(t,n,new Mte,o),n}function Mne(e,t,n){const{orientation:r,degree:o,stops:i=[]}=n;let a=null;if("radial"===r){const n=t.boundingRect();a=e.createRadialGradient(n.x+n.width/2,n.y+n.height/2,1e-5,n.x+n.width/2,n.y+n.height/2,Math.max(n.width,n.height)/2)}else if("conic"===r){const t=n.startAngle||0,r=n.x||0,o=n.y||0;a=e.createConicGradient(t,r,o)}else{const r=A6(o);["x1","x2","y1","y2"].forEach((e=>{e in n&&(r[e]=n[e])}));const i=t.boundingRect();a=e.createLinearGradient(i.x+r.x1*i.width,i.y+r.y1*i.height,i.x+r.x2*i.width,i.y+r.y2*i.height)}for(let e=0,t=i.length;e<t;e++){let t=i[e];a.addColorStop(t.offset,t.color)}return a}function Rne(e,t,n){return t.width=e.width,t.height=e.height,n.save(),n.fillStyle=e.fill,e.shapes.forEach((e=>{if("rect"===e.type)n.rect(e.x,e.y,e.width,e.height)})),n.fill(),n.restore(),n.createPattern(t,"repeat")}function Ane(){let{x:e,y:t,width:n,height:r,scaleRatio:o,margin:i,edgeBleed:a}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const s={x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1},margin:{left:0,top:0},edgeBleed:{left:0,right:0,top:0,bottom:0,bool:!1}};return s.x=isNaN(e)?s.x:e,s.y=isNaN(t)?s.y:t,s.width=isNaN(n)?s.width:n,s.height=isNaN(r)?s.height:r,void 0!==o&&(s.scaleRatio.x=isNaN(o.x)?s.scaleRatio.x:o.x,s.scaleRatio.y=isNaN(o.y)?s.scaleRatio.y:o.y),void 0!==i&&(s.margin.left=isNaN(i.left)?0:i.left,s.margin.top=isNaN(i.top)?0:i.top),"object"==typeof a&&["left","right","top","bottom"].forEach((e=>{!isNaN(a[e])&&a[e]>0&&(s.edgeBleed[e]=a[e],s.edgeBleed.bool=!0)})),s.computedPhysical={x:Math.round(s.margin.left+(s.x-s.edgeBleed.left)*s.scaleRatio.x),y:Math.round(s.margin.top+(s.y-s.edgeBleed.top)*s.scaleRatio.y),width:Math.round((s.width+s.edgeBleed.left+s.edgeBleed.right)*s.scaleRatio.x),height:Math.round((s.height+s.edgeBleed.top+s.edgeBleed.bottom)*s.scaleRatio.y)},s}function Ine(){const e={element:()=>{},root:()=>{},settings:()=>{},appendTo:()=>{},getScene:()=>[],render:()=>!1,itemsAt:()=>[],findShapes:()=>[],clear:()=>{},destory:()=>{},size:()=>{},measureText:nee,textBounds:oee,setKey:t=>{e.element().setAttribute("data-key",t)}};return e}function Pne(e){return t=>{let{node:n}=t;"text"!==n.type||null==n.data||n.textBoundsFn||(n.textBoundsFn=e.textBounds)}}const One=200,Lne=200;class Dne{constructor(e){this.targetCanvas=e,this.bufferCanvas=e.cloneNode()}updateSize(e){let t,{rect:n,dpiRatio:r,canvasBufferSize:o}=e;t=o?"function"==typeof o?o(n):o:{width:n.computedPhysical.width+2*One,height:n.computedPhysical.height+2*Lne},this.bufferCanvas.style.width="".concat(t.width,"px"),this.bufferCanvas.style.height="".concat(t.height,"px"),this.bufferCanvas.width=Math.round(t.width*r),this.bufferCanvas.height=Math.round(t.height*r)}apply(){this.targetCanvas.getContext("2d").drawImage(this.bufferCanvas,0,0)}clear(){this.bufferCanvas.width=this.bufferCanvas.width}getContext(){return this.bufferCanvas.getContext("2d")}}const Tne=u0();function zne(e){return Array.isArray(e)?e:"string"==typeof e?-1!==e.indexOf(",")?e.split(","):e.split(" "):[]}function jne(e){return("undefined"==typeof window?1:window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)}function Nne(e,t){t.setTransform(e[0][0],e[1][0],e[0][1],e[1][1],e[0][2],e[1][2])}function qne(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=Object.keys(r);for(let o=0,i=n.length;o<i;o++){let i=n[o];const a=i[0],s=i[1],l=i[2];if(a in t.attrs&&!(s in r)&&e[s]!==t.attrs[a]){const n=l?l(t.attrs[a]):t.attrs[a];"function"==typeof e[s]?e[s](n):e[s]=n}}for(let t=0,n=o.length;t<n;t++){const n=o[t];e[n]=r[n]}}function Fne(e,t,n,r){for(let o=0,i=e.length;o<i;o++){let i=e[o],a={};t.save(),i.attrs&&(i.attrs.fill||i.attrs.stroke)&&(i.attrs.fill&&"object"==typeof i.attrs.fill&&"gradient"===i.attrs.fill.type?a.fillStyle=Mne(t,i,i.attrs.fill):i.attrs.fill&&"object"==typeof i.attrs.fill&&"pattern"===i.attrs.fill.type&&(a.fillStyle=r.patterns.create(i.attrs.fill)),i.attrs.stroke&&"object"==typeof i.attrs.stroke&&"gradient"===i.attrs.stroke.type?a.strokeStyle=Mne(t,i,i.attrs.stroke):i.attrs.stroke&&"object"==typeof i.attrs.stroke&&"pattern"===i.attrs.stroke.type&&(a.strokeStyle=r.patterns.create(i.attrs.stroke))),qne(t,i,n,a),i.modelViewMatrix&&Nne(i.modelViewMatrix.elements,t),Tne.has(i.type)&&Tne.get(i.type)(i.attrs,{g:t,doFill:"fill"in i.attrs&&"none"!==i.attrs.fill,doStroke:"stroke"in i.attrs&&0!==i.attrs["stroke-width"],ellipsed:i.ellipsed}),i.children&&Fne(i.children,t,n,r),t.restore()}}function Wne(){let e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:kne;const r={transform:void 0,canvasBufferSize:void 0,progressive:void 0};let o,i=!1,a=Ane();const s=[["fill","fillStyle"],["stroke","strokeStyle"],["opacity","globalAlpha"],["globalAlpha","globalAlpha"],["stroke-width","lineWidth"],["stroke-linejoin","lineJoin"],["stroke-dasharray","setLineDash",zne]];let l;const c=Ine();return c.element=()=>e,c.root=()=>e,c.settings=e=>(e&&Object.keys(r).forEach((t=>{void 0!==e[t]&&(r[t]=e[t])})),r),c.appendTo=n=>(e||(e=n.ownerDocument.createElement("canvas"),e.style.position="absolute",e.style["-webkit-font-smoothing"]="antialiased",e.style["-moz-osx-font-smoothing"]="antialiased",e.style.pointerEvents="none"),"function"!=typeof r.transform||t||(t=new Dne(e)),n.appendChild(e),e),c.getScene=r=>{const o=jne(t&&t.getContext()||e.getContext("2d")),i=a.scaleRatio.x,s=a.scaleRatio.y,l={type:"container",children:r,transform:a.edgeBleed.bool?"translate(".concat(a.edgeBleed.left*o*i,", ").concat(a.edgeBleed.top*o*s,")"):""};return 1===o&&1===i&&1===s||(l.transform+="scale(".concat(o*i,", ").concat(o*s,")")),n({items:[l],dpi:o,on:{create:[G9(c.measureText),Pne(c)]}})},c.render=n=>{if(!e)return!1;l||(l=function(e){const t=e.createElement("canvas"),n=t.getContext("2d");let r={};return{create(e){const o=e.key;return o?(r[o]=r[o]||Rne(e,t,n),r[o]):Rne(e,t,n)},clear(){r={}}}}(e.ownerDocument));const u=t&&t.getContext()||e.getContext("2d"),d=jne(u),p=t&&r.transform();if(p)return e.width=e.width,function(e){let{el:t,dpiRatio:n,transform:r}=e;if("object"==typeof r){const e=[r.horizontalScaling,r.horizontalSkewing,r.verticalSkewing,r.verticalScaling,r.horizontalMoving*n,r.verticalMoving*n];t.getContext("2d").setTransform(...e)}}({el:e,dpiRatio:d,transform:p}),t.apply(),!0;i&&(e.style.left="".concat(a.computedPhysical.x,"px"),e.style.top="".concat(a.computedPhysical.y,"px"),e.style.width="".concat(a.computedPhysical.width,"px"),e.style.height="".concat(a.computedPhysical.height,"px"),e.width=Math.round(a.computedPhysical.width*d),e.height=Math.round(a.computedPhysical.height*d),t&&t.updateSize({rect:a,dpiRatio:d,canvasBufferSize:r.canvasBufferSize}));const h=c.getScene(n),f=!o||!h.equals(o);l.clear();const m=i||f,g="function"==typeof r.progressive&&r.progressive();return m&&(g&&!g.isFirst||c.clear(),Fne(h.children,u,s,{patterns:l})),t&&(e.width=e.width,t.apply()),i=!1,g&&!g.isFirst&&h.children.unshift(...o.children),o=h,m},c.itemsAt=e=>o?o.getItemsFrom(e):[],c.findShapes=e=>o?o.findShapes(e):[],c.clear=()=>(e&&(e.width=e.width),t&&t.clear(),o=null,c),c.size=e=>{if(e){const t=Ane(e);JSON.stringify(a)!==JSON.stringify(t)&&(i=!0,a=t)}return a},c.destroy=()=>{e&&(e.parentElement&&e.parentElement.removeChild(e),e=null),t&&(t=null),o=null},c}function Bne(e,t){Tne.add(e,t)}function $ne(e,t){return Math.max(0,Math.min(e,t))}const Hne=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),Vne=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞יִײַ-ﬨשׁ-ﭏ]"),Gne=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]");function Une(e){return Hne.test(e)}function Yne(e){return Vne.test(e)||Gne.test(e)}function Kne(e){let t,n,r=e?e.length:0;for(t=0;t<r;t++){if(n=e[t],Une(n))return"ltr";if(Yne(n))return"rtl"}return"ltr"}const Xne={start:"end",end:"start",center:"center",middle:"middle"};function Jne(e,t){return"rtl"===t?Xne[e]:e}function Zne(e,t){const n=[];let r;const o=[],i=[],a=[];let s,l;const c=e=>e.id,u=(e,t)=>{let n;return n="object"==typeof e?"id"in e?e.id:t:e,{content:e,id:"".concat(n,"__").concat(e.type||"")}};e.isTree||(e=e.map(u)),t=t.map(u),s=e.map(c),l=t.map(c);for(let e=0,r=t.length;e<r;e++){-1===s.indexOf(t[e].id)?n.push(t[e]):i.push(t[e])}for(let t=0,n=e.length;t<n;t++){-1===l.indexOf(e[t].id)?o.push(e[t]):a.push(e[t])}for(let e=0,t=n.length;e<t;e++)n[e].content.children&&(n[e].diff=Zne([],n[e].content.children),n[e].children=n[e].diff.updatedNew.concat(n[e].diff.added),n[e].children.isTree=!0);for(let e=0,t=i.length;e<t;e++)i[e].diff=Zne(a[e].children||[],i[e].content.children||[]),i[e].object=a[e].object,i[e].children=i[e].diff.items;return r=i.concat(n),n.isTree=!0,o.isTree=!0,i.isTree=!0,a.isTree=!0,r.isTree=!0,{added:n,updatedNew:i,updatedOld:a,removed:o,items:r}}function Qne(e,t,n){for(let r=0,o=e.length;r<o;r++)e[r].object=n(e[r].content.type,t)}function ere(e,t){for(let n=0,r=e.length;n<r;n++)null!==e[n].object&&void 0!==e[n].object&&(t(e[n].object),e[n].object=null)}function tre(e,t,n,r){let o;for(let i=0,a=e.length;i<a;i++)o=e[i],null!==o.object&&void 0!==o.object&&(n(o.object,o.content),o.diff&&(Qne(o.diff.added,o.object,t),ere(o.diff.removed,r),tre(o.diff.items,t,n,r)))}function nre(e,t,n,r,o,i){const a=Zne(e,t);return Qne(a.added,n,r),ere(a.removed,i),tre(a.items,r,o,i),a.items}Bne("rect",(function(e,t){let{g:n,doFill:r,doStroke:o}=t;n.beginPath(),e.rx>0||e.ry>0?function(e,t,n,r,o,i,a){i=$ne(r/2,i>0?i:a),a=$ne(o/2,a>0?a:i),e.moveTo(t,n+a),e.lineTo(t,n+o-a),e.quadraticCurveTo(t,n+o,t+i,n+o),e.lineTo(t+r-i,n+o),e.quadraticCurveTo(t+r,n+o,t+r,n+o-a),e.lineTo(t+r,n+a),e.quadraticCurveTo(t+r,n,t+r-i,n),e.lineTo(t+i,n),e.quadraticCurveTo(t,n,t,n+a)}(n,e.x,e.y,e.width,e.height,e.rx,e.ry):n.rect(e.x,e.y,e.width,e.height),r&&n.fill(),o&&n.stroke()})),Bne("circle",(function(e,t){let{g:n,doFill:r,doStroke:o}=t;n.beginPath(),n.moveTo(e.cx+e.r,e.cy),n.arc(e.cx,e.cy,e.r,0,2*Math.PI,!1),r&&n.fill(),o&&n.stroke()})),Bne("line",(function(e,t){let{g:n,doStroke:r}=t;n.beginPath(),n.moveTo(e.x1,e.y1),n.lineTo(e.x2,e.y2),r&&n.stroke()})),Bne("path",(function(e,t){let{g:n,doStroke:r,doFill:o}=t;const i=new Path2D(e.d);o&&n.fill(i),r&&n.stroke(i)})),Bne("text",(function(e,t){let{g:n,ellipsed:r,doStroke:o}=t;const i=r||U9(e,nee);n.font=[e["font-style"],e["font-weight"],e["font-size"],e["font-family"]].filter((e=>!!e)).join(" ");const a=Kne(e.text);n.canvas.dir!==a&&(n.canvas.dir=a);const s=Jne("middle"===e["text-anchor"]?"center":e["text-anchor"],n.canvas.dir);s&&n.textAlign!==s&&(n.textAlign=s);const l=Y9(e);n.fillText(i,e.x+e.dx,e.y+e.dy+l),o&&n.strokeText(i,e.x+e.dx,e.y+e.dy+l)}));const rre="http://www.w3.org/2000/svg",ore=(e,t)=>{if(!e||"string"!=typeof e)throw new Error("Invalid type: ".concat(e));const n=t.ownerDocument.createElementNS(rre,"container"===e?"g":e);return t.appendChild(n),n},ire=e=>{e.parentNode&&e.parentNode.removeChild(e)},are=(e,t)=>{if((e=>{switch(e.type){case"circle":return!isNaN(e.attrs.cx)&&!isNaN(e.attrs.cy)&&!isNaN(e.attrs.r);case"line":return!(isNaN(e.attrs.x1)||isNaN(e.attrs.y1)||isNaN(e.attrs.x2)||isNaN(e.attrs.y2));case"rect":return!(isNaN(e.attrs.x)||isNaN(e.attrs.y)||isNaN(e.attrs.width)||isNaN(e.attrs.height));case"text":return!isNaN(e.attrs.x)&&!isNaN(e.attrs.y);default:return!0}})(t)){for(const n in t.attrs)if("stroke"===n&&t.strokeReference)e.setAttribute("stroke",t.strokeReference);else if("fill"===n&&t.fillReference)e.setAttribute("fill",t.fillReference);else if("text"===n){e.setAttribute("style","white-space: pre"),e.textContent=t.ellipsed||U9(t.attrs,nee);const n=Kne(t.attrs.text);"rtl"===n&&(e.setAttribute("direction","rtl"),e.setAttribute("dir","rtl"),e.setAttribute("text-anchor",Jne(e.getAttribute("text-anchor"),n)))}else if("text"!==t.type||"dy"!==n&&"dominant-baseline"!==n)if("text"===t.type&&"title"===n&&t.attrs.title){const n=e.ownerDocument.createElementNS(rre,"title");n.textContent=t.attrs.title,e.appendChild(n)}else e.setAttribute(n,t.attrs[n]);else{const r=+e.getAttribute(n)||0;let o=0;o="dominant-baseline"===n?Y9(t.attrs):t.attrs[n],e.setAttribute("dy",o+r)}if("string"==typeof t.data||"number"==typeof t.data||"boolean"==typeof t.data)e.setAttribute("data",t.data);else if("object"==typeof t.data&&null!==t.data)for(const n in t.data)"string"!=typeof t.data[n]&&"number"!=typeof t.data[n]&&"boolean"!=typeof t.data[n]||e.setAttribute("data-".concat(n),t.data[n])}};class sre{constructor(e,t,n,r){this.create=e,this.nodeCreator=t,this.nodeMaintainer=n,this.nodeDestroyer=r}render(e,t){return this.create([],e,t,this.nodeCreator,this.nodeMaintainer,this.nodeDestroyer)}}function lre(){return new sre(nre,ore,are,ire)}function cre(e){let t,n,r,o=0;if(0===(e=JSON.stringify(e)).length)return o;for(t=0,r=e.length;t<r;t++)n=e.charCodeAt(t),o=(o<<5)-o+n,o&=o;return o}function ure(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:rre,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:kne;const n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:lre)();let r,o,i,a=!1,s=Ane();const l={transform:void 0,disableScreenReader:!1},c=Ine(),u={type:"defs",children:[]},d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:cre,n={},r=Date.now();const o={onCreate(o){let i={};o.node&&"object"==typeof o.node.fill&&"pattern"===o.node.fill.type&&o.node.fill.shapes&&(i.fill=o.node.fill),o.node&&"object"==typeof o.node.stroke&&"pattern"===o.node.stroke.type&&o.node.stroke.shapes&&(i.stroke=o.node.stroke),Object.keys(i).forEach((a=>{let s="";const l=i[a],c=t(l),u="picasso-pattern-".concat(r,"-").concat(c);if("undefined"!=typeof window&&(s=window.location.href.split("#")[0]),!n[c]){const t={patternUnits:"userSpaceOnUse",x:0,y:0,width:l.width,height:l.height,type:"pattern",id:u,children:[],fill:l.fill};l.shapes.forEach((e=>{t.children.push(e)})),e.push(t),n[c]=!0}o.node["".concat(a,"Reference")]="url('".concat(s,"#").concat(u,"')")}))},clear(){n={}}};return o}(u.children),p=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:cre,n={},r=Date.now();const o={getOrCreateGradient(){let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"fill",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",s=t(o[i]),l="picasso-gradient-".concat(r,"-").concat(s);if(!n[s]){let{orientation:t,degree:r,stops:a=[]}=o[i],c={};void 0===r&&(r=90),"radial"===t?c.type="radialGradient":(c=A6(r),["x1","x2","y1","y2"].forEach((e=>{e in o[i]&&(c[e]=o[i][e])})),c.type="linearGradient"),c.id=l,c.children=a.map((e=>{let{offset:t,color:n,opacity:r}=e;return{type:"stop",offset:"".concat(100*t,"%"),style:"stop-color:".concat(n,";stop-opacity:").concat(void 0!==r?r:1)}})),e.push(c),n[s]=l}return"url('".concat(a,"#").concat(l,"')")},onCreate(e){let t="";"undefined"!=typeof window&&(t=window.location.href.split("#")[0]);const n=e.node;n.fill&&"object"==typeof n.fill&&"gradient"===n.fill.type&&(n.fillReference=o.getOrCreateGradient(n,"fill",t)),n.stroke&&"object"==typeof n.stroke&&"gradient"===n.stroke.type&&(n.strokeReference=o.getOrCreateGradient(n,"stroke",t))},clear(){n={}}};return o}(u.children);return c.element=()=>r,c.root=()=>o,c.settings=e=>(e&&Object.keys(l).forEach((t=>{void 0!==e[t]&&(l[t]=e[t])})),l),c.appendTo=t=>(r||(r=t.ownerDocument.createElementNS(e,"svg"),r.style.position="absolute",r.style["-webkit-font-smoothing"]="antialiased",r.style["-moz-osx-font-smoothing"]="antialiased",r.style.pointerEvents="none",r.setAttribute("xmlns",e),o=t.ownerDocument.createElementNS(e,"g"),o.style.pointerEvents="auto",r.appendChild(o)),t.appendChild(r),r),c.getScene=e=>{const n=s.scaleRatio.x,r=s.scaleRatio.y,o={type:"container",children:Array.isArray(e)?[...e,u]:e,transform:s.edgeBleed.bool?"translate(".concat(s.edgeBleed.left*n,", ").concat(s.edgeBleed.top*r,")"):""};return 1===n&&1===r||(o.transform+="scale(".concat(n,", ").concat(r,")")),t({items:[o],on:{create:[e=>{e.node.fillReference=void 0,e.node.strokeReference=void 0},p.onCreate,d.onCreate,G9(c.measureText),Pne(c)]}})},c.render=e=>{if(!r)return!1;const t="function"==typeof l.transform&&l.transform();if(t){const{horizontalScaling:e,horizontalSkewing:n,verticalSkewing:r,verticalScaling:i,horizontalMoving:a,verticalMoving:s}=t;return o.style.transform="matrix(".concat(e,", ").concat(n,", ").concat(r,", ").concat(i,", ").concat(a,", ").concat(s,")"),!0}o.style.transform="";l.disableScreenReader&&r.setAttribute("aria-hidden",!0),a&&(r.style.left="".concat(s.computedPhysical.x,"px"),r.style.top="".concat(s.computedPhysical.y,"px"),r.setAttribute("width",s.computedPhysical.width),r.setAttribute("height",s.computedPhysical.height)),p.clear(),d.clear(),u.children.length=0;const h=c.getScene(e),f=!i||!h.equals(i),m=a||f;return m&&(c.clear(),n.render(h.children,o)),a=!1,i=h,m},c.itemsAt=e=>i?i.getItemsFrom(e):[],c.findShapes=e=>i?i.findShapes(e):[],c.clear=()=>{if(!o)return c;i=null;const e=o.cloneNode(!1);return r.replaceChild(e,o),o=e,c},c.destroy=()=>{r&&r.parentNode&&r.parentNode.removeChild(r),r=null,o=null},c.size=e=>{if(e){const t=Ane(e);JSON.stringify(s)!==JSON.stringify(t)&&(a=!0,s=t)}return s},c}var dre,pre,hre,fre,mre,gre,yre,_re={},bre=[],xre=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function vre(e,t){for(var n in t)e[n]=t[n];return e}function wre(e){var t=e.parentNode;t&&t.removeChild(e)}function Sre(e,t,n){var r,o,i,a={};for(i in t)"key"==i?r=t[i]:"ref"==i?o=t[i]:a[i]=t[i];if(arguments.length>2&&(a.children=arguments.length>3?dre.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===a[i]&&(a[i]=e.defaultProps[i]);return Cre(e,a,r,o,null)}function Cre(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++hre:o};return null==o&&null!=pre.vnode&&pre.vnode(i),i}function Ere(e){return e.children}function kre(e,t){this.props=e,this.context=t}function Mre(e,t){if(null==t)return e.__?Mre(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?Mre(e):null}function Rre(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return Rre(e)}}function Are(e){(!e.__d&&(e.__d=!0)&&fre.push(e)&&!Ire.__r++||mre!==pre.debounceRendering)&&((mre=pre.debounceRendering)||gre)(Ire)}function Ire(){var e,t,n,r,o,i,a,s;for(fre.sort(yre);e=fre.shift();)e.__d&&(t=fre.length,r=void 0,o=void 0,a=(i=(n=e).__v).__e,(s=n.__P)&&(r=[],(o=vre({},i)).__v=i.__v+1,qre(s,i,o,n.__n,void 0!==s.ownerSVGElement,null!=i.__h?[a]:null,r,null==a?Mre(i):a,i.__h),Fre(r,i),i.__e!=a&&Rre(i)),fre.length>t&&fre.sort(yre));Ire.__r=0}function Pre(e,t,n,r,o,i,a,s,l,c){var u,d,p,h,f,m,g,y=r&&r.__k||bre,_=y.length;for(n.__k=[],u=0;u<t.length;u++)if(null!=(h=n.__k[u]=null==(h=t[u])||"boolean"==typeof h||"function"==typeof h?null:"string"==typeof h||"number"==typeof h||"bigint"==typeof h?Cre(null,h,null,null,h):Array.isArray(h)?Cre(Ere,{children:h},null,null,null):h.__b>0?Cre(h.type,h.props,h.key,h.ref?h.ref:null,h.__v):h)){if(h.__=n,h.__b=n.__b+1,null===(p=y[u])||p&&h.key==p.key&&h.type===p.type)y[u]=void 0;else for(d=0;d<_;d++){if((p=y[d])&&h.key==p.key&&h.type===p.type){y[d]=void 0;break}p=null}qre(e,h,p=p||_re,o,i,a,s,l,c),f=h.__e,(d=h.ref)&&p.ref!=d&&(g||(g=[]),p.ref&&g.push(p.ref,null,h),g.push(d,h.__c||f,h)),null!=f?(null==m&&(m=f),"function"==typeof h.type&&h.__k===p.__k?h.__d=l=Ore(h,l,e):l=Lre(e,h,p,y,f,l),"function"==typeof n.type&&(n.__d=l)):l&&p.__e==l&&l.parentNode!=e&&(l=Mre(p))}for(n.__e=m,u=_;u--;)null!=y[u]&&("function"==typeof n.type&&null!=y[u].__e&&y[u].__e==n.__d&&(n.__d=Dre(r).nextSibling),$re(y[u],y[u]));if(g)for(u=0;u<g.length;u++)Bre(g[u],g[++u],g[++u])}function Ore(e,t,n){for(var r,o=e.__k,i=0;o&&i<o.length;i++)(r=o[i])&&(r.__=e,t="function"==typeof r.type?Ore(r,t,n):Lre(n,r,r,o,r.__e,t));return t}function Lre(e,t,n,r,o,i){var a,s,l;if(void 0!==t.__d)a=t.__d,t.__d=void 0;else if(null==n||o!=i||null==o.parentNode)e:if(null==i||i.parentNode!==e)e.appendChild(o),a=null;else{for(s=i,l=0;(s=s.nextSibling)&&l<r.length;l+=1)if(s==o)break e;e.insertBefore(o,i),a=i}return void 0!==a?a:o.nextSibling}function Dre(e){var t,n,r;if(null==e.type||"string"==typeof e.type)return e.__e;if(e.__k)for(t=e.__k.length-1;t>=0;t--)if((n=e.__k[t])&&(r=Dre(n)))return r;return null}function Tre(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||xre.test(t)?n:n+"px"}function zre(e,t,n,r,o){var i;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Tre(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Tre(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])i=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r||e.addEventListener(t,i?Nre:jre,i):e.removeEventListener(t,i?Nre:jre,i);else if("dangerouslySetInnerHTML"!==t){if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,n))}}function jre(e){return this.l[e.type+!1](pre.event?pre.event(e):e)}function Nre(e){return this.l[e.type+!0](pre.event?pre.event(e):e)}function qre(e,t,n,r,o,i,a,s,l){var c,u,d,p,h,f,m,g,y,_,b,x,v,w,S,C=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(l=n.__h,s=t.__e=n.__e,t.__h=null,i=[s]),(c=pre.__b)&&c(t);try{e:if("function"==typeof C){if(g=t.props,y=(c=C.contextType)&&r[c.__c],_=c?y?y.props.value:c.__:r,n.__c?m=(u=t.__c=n.__c).__=u.__E:("prototype"in C&&C.prototype.render?t.__c=u=new C(g,_):(t.__c=u=new kre(g,_),u.constructor=C,u.render=Hre),y&&y.sub(u),u.props=g,u.state||(u.state={}),u.context=_,u.__n=r,d=u.__d=!0,u.__h=[],u._sb=[]),null==u.__s&&(u.__s=u.state),null!=C.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=vre({},u.__s)),vre(u.__s,C.getDerivedStateFromProps(g,u.__s))),p=u.props,h=u.state,u.__v=t,d)null==C.getDerivedStateFromProps&&null!=u.componentWillMount&&u.componentWillMount(),null!=u.componentDidMount&&u.__h.push(u.componentDidMount);else{if(null==C.getDerivedStateFromProps&&g!==p&&null!=u.componentWillReceiveProps&&u.componentWillReceiveProps(g,_),!u.__e&&null!=u.shouldComponentUpdate&&!1===u.shouldComponentUpdate(g,u.__s,_)||t.__v===n.__v){for(t.__v!==n.__v&&(u.props=g,u.state=u.__s,u.__d=!1),u.__e=!1,t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),b=0;b<u._sb.length;b++)u.__h.push(u._sb[b]);u._sb=[],u.__h.length&&a.push(u);break e}null!=u.componentWillUpdate&&u.componentWillUpdate(g,u.__s,_),null!=u.componentDidUpdate&&u.__h.push((function(){u.componentDidUpdate(p,h,f)}))}if(u.context=_,u.props=g,u.__P=e,x=pre.__r,v=0,"prototype"in C&&C.prototype.render){for(u.state=u.__s,u.__d=!1,x&&x(t),c=u.render(u.props,u.state,u.context),w=0;w<u._sb.length;w++)u.__h.push(u._sb[w]);u._sb=[]}else do{u.__d=!1,x&&x(t),c=u.render(u.props,u.state,u.context),u.state=u.__s}while(u.__d&&++v<25);u.state=u.__s,null!=u.getChildContext&&(r=vre(vre({},r),u.getChildContext())),d||null==u.getSnapshotBeforeUpdate||(f=u.getSnapshotBeforeUpdate(p,h)),S=null!=c&&c.type===Ere&&null==c.key?c.props.children:c,Pre(e,Array.isArray(S)?S:[S],t,n,r,o,i,a,s,l),u.base=t.__e,t.__h=null,u.__h.length&&a.push(u),m&&(u.__E=u.__=null),u.__e=!1}else null==i&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=Wre(n.__e,t,n,r,o,i,a,l);(c=pre.diffed)&&c(t)}catch(e){t.__v=null,(l||null!=i)&&(t.__e=s,t.__h=!!l,i[i.indexOf(s)]=null),pre.__e(e,t,n)}}function Fre(e,t){pre.__c&&pre.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){pre.__e(e,t.__v)}}))}function Wre(e,t,n,r,o,i,a,s){var l,c,u,d=n.props,p=t.props,h=t.type,f=0;if("svg"===h&&(o=!0),null!=i)for(;f<i.length;f++)if((l=i[f])&&"setAttribute"in l==!!h&&(h?l.localName===h:3===l.nodeType)){e=l,i[f]=null;break}if(null==e){if(null===h)return document.createTextNode(p);e=o?document.createElementNS("http://www.w3.org/2000/svg",h):document.createElement(h,p.is&&p),i=null,s=!1}if(null===h)d===p||s&&e.data===p||(e.data=p);else{if(i=i&&dre.call(e.childNodes),c=(d=n.props||_re).dangerouslySetInnerHTML,u=p.dangerouslySetInnerHTML,!s){if(null!=i)for(d={},f=0;f<e.attributes.length;f++)d[e.attributes[f].name]=e.attributes[f].value;(u||c)&&(u&&(c&&u.__html==c.__html||u.__html===e.innerHTML)||(e.innerHTML=u&&u.__html||""))}if(function(e,t,n,r,o){var i;for(i in n)"children"===i||"key"===i||i in t||zre(e,i,null,n[i],r);for(i in t)o&&"function"!=typeof t[i]||"children"===i||"key"===i||"value"===i||"checked"===i||n[i]===t[i]||zre(e,i,t[i],n[i],r)}(e,p,d,o,s),u)t.__k=[];else if(f=t.props.children,Pre(e,Array.isArray(f)?f:[f],t,n,r,o&&"foreignObject"!==h,i,a,i?i[0]:n.__k&&Mre(n,0),s),null!=i)for(f=i.length;f--;)null!=i[f]&&wre(i[f]);s||("value"in p&&void 0!==(f=p.value)&&(f!==e.value||"progress"===h&&!f||"option"===h&&f!==d.value)&&zre(e,"value",f,d.value,!1),"checked"in p&&void 0!==(f=p.checked)&&f!==e.checked&&zre(e,"checked",f,d.checked,!1))}return e}function Bre(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){pre.__e(e,n)}}function $re(e,t,n){var r,o;if(pre.unmount&&pre.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Bre(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){pre.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&$re(r[o],t,n||"function"!=typeof e.type);n||null==e.__e||wre(e.__e),e.__=e.__e=e.__d=void 0}function Hre(e,t,n){return this.constructor(e,n)}function Vre(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{createElement:t=document.createElement.bind(document)}=e;let n,r,o=Ane();const i={transform:void 0,disableScreenReader:!1},a=Ine();return a.element=()=>n,a.root=()=>n,a.settings=e=>(e&&Object.keys(i).forEach((t=>{void 0!==e[t]&&(i[t]=e[t])})),i),a.appendTo=e=>(n||(n=t("div"),n.style.position="absolute",n.style["-webkit-font-smoothing"]="antialiased",n.style["-moz-osx-font-smoothing"]="antialiased",n.style.pointerEvents="none"),e.appendChild(n),n),a.render=e=>{if(!n)return!1;const t="function"==typeof i.transform&&i.transform();if(t){const{horizontalScaling:e,horizontalSkewing:r,verticalSkewing:o,verticalScaling:i,horizontalMoving:a,verticalMoving:s}=t;return n.style.transform="matrix(".concat(e,", ").concat(r,", ").concat(o,", ").concat(i,", ").concat(a,", ").concat(s,")"),!0}n.style.transform="";let a;return i.disableScreenReader&&n.setAttribute("aria-hidden",!0),n.style.left="".concat(o.computedPhysical.x,"px"),n.style.top="".concat(o.computedPhysical.y,"px"),n.style.width="".concat(o.computedPhysical.width,"px"),n.style.height="".concat(o.computedPhysical.height,"px"),a=Array.isArray(e)?Sre("div",null,e):e,r=function(e,t,n){var r,o,i;pre.__&&pre.__(e,t),o=(r="function"==typeof n)?null:n&&n.__k||t.__k,i=[],qre(t,e=(!r&&n||t).__k=Sre(Ere,null,[e]),o||_re,_re,void 0!==t.ownerSVGElement,!r&&n?[n]:o?null:t.firstChild?dre.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r),Fre(i,e)}(a,n,r),!0},a.renderArgs=[Sre],a.clear=()=>{if(n){let e=n.firstChild;for(;e;)n.removeChild(e),e=n.firstChild;r=null}return a},a.destroy=()=>{n&&n.parentElement&&n.parentElement.removeChild(n),n=null,r=null},a.size=e=>(e&&(o=Ane(e)),o),a}dre=bre.slice,pre={__e:function(e,t,n,r){for(var o,i,a;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(e)),a=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),a=o.__d),a)return o.__E=o}catch(t){e=t}throw e}},hre=0,kre.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=vre({},this.state),"function"==typeof e&&(e=e(vre({},n),this.props)),e&&vre(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),Are(this))},kre.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Are(this))},kre.prototype.render=Ere,fre=[],gre="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,yre=function(e,t){return e.__v.__b-t.__v.__b},Ire.__r=0;var Gre=[function(e){e.renderer("svg",ure)},function(e){e.renderer("canvas",Wne)},function(e){e.renderer("dom",Vre)}];const Ure={OFF:0,ERROR:1,WARN:2,INFO:3,DEBUG:4};const Yre=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=function(){let{level:e=Ure.OFF,pipe:t=console}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e;const r={[Ure.OFF]:()=>{},[Ure.ERROR]:function(){return t.error(...arguments)},[Ure.WARN]:function(){return t.warn(...arguments)},[Ure.INFO]:function(){return t.info(...arguments)},[Ure.DEBUG]:function(){return t.log(...arguments)}},o=function(e){if(e&&!(n<e)){for(var t=arguments.length,o=new Array(t>1?t-1:0),i=1;i<t;i++)o[i-1]=arguments[i];(r[e]||r[Ure.DEBUG])(...o)}};return{log:o,error:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return o(Ure.ERROR,...t)},warn:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return o(Ure.WARN,...t)},info:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return o(Ure.INFO,...t)},debug:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return o(Ure.DEBUG,...t)},level:e=>("number"==typeof e&&(n=e),n),LOG_LEVEL:Ure}}(t.logger),o={component:u0(n.component,"component",r),data:u0(n.data,"data",r),formatter:u0(n.formatter,"formatter",r),interaction:u0(n.interaction,"interaction",r),renderer:J4(n.renderer),scale:u0(n.scale,"scale",r),symbol:u0(n.symbol,"symbol",r),logger:r};function i(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e({palettes:t.palettes.concat(n.palettes||[]),style:UZ({},t.style,n.style),logger:n.logger||t.logger,renderer:n.renderer||t.renderer},o)}return t.renderer&&t.renderer.prio&&o.renderer.default(t.renderer.prio[0]),i.use=function(e){return function(e){e(arguments.length>2?arguments[2]:void 0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o)},i.chart=e=>X4(e,{registries:o,logger:r,style:t.style,palettes:t.palettes}),i.config=()=>t,Object.keys(o).forEach((e=>{i[e]=o[e]})),i.version=YZ,i}({renderer:{prio:["svg","canvas"]},logger:{level:0},style:{"$font-family":"'Source Sans Pro', Arial, sans-serif","$font-size":"12px","$line-height":"16px","$font-size--l":"16px","$font-weight":"normal","$gray-100":"#ffffff","$gray-98":"#f9f9f9","$gray-95":"#f2f2f2","$gray-90":"#e6e6e6","$gray-35":"#595959","$gray-30":"#4d4d4d","$gray-25":"#404040","$gray-20":"#333333","$border-95":"rgba(255, 255, 255, 0.05)","$border-90":"rgba(255, 255, 255, 0.1)","$border-80":"rgba(255, 255, 255, 0.2)","$border-20":"rgba(0, 0, 0, 0.2)","$border-10":"rgba(0, 0, 0, 0.1)","$border-5":"rgba(0, 0, 0, 0.05)","$primary-blue":"#3F8AB3","$primary-green":"#6CB33F","$primary-red":"#DC423F","$primary-orange":"#EF960F","$spacing--s":4,$spacing:8,"$spacing--l":12,"$font-color":"$gray-35","$font-color--inverted":"$gray-90","$guide-color":"$gray-90","$guide-color--inverted":"$gray-35",$border:"$border-80","$border--inverted":"$border-10",$shape:{fill:"$primary-blue",strokeWidth:1,stroke:"$border"},"$shape-outline":{stroke:"$primary-blue",strokeWidth:2},"$shape-guide":{stroke:"$guide-color",strokeWidth:1},"$shape-guide--inverted":{"@extend":"$shape-guide",stroke:"$guide-color--inverted"},$label:{fontSize:"$font-size",fontFamily:"$font-family",fill:"$font-color"},"$label--inverted":{$extend:"$label",fill:"$font-color--inverted"},"$label-overlay":{fontSize:"$font-size--l",fontFamily:"$font-family",fill:"$gray-100",color:"$font-color",stroke:"$guide-color--inverted",strokeWidth:1,borderRadius:4},$title:{"@extend":"$label",fontSize:"$font-size--l",fontWeight:"$font-weight",stroke:"$guide-color--inverted",strokeWidth:0},"$guide-line":{strokeWidth:1,stroke:"$guide-color"},"$guide-line--minor":{strokeWidth:1,stroke:"$gray-95"},"$padding--s":{left:"$spacing--s",right:"$spacing--s",top:"$spacing--s",bottom:"$spacing--s"},$padding:{left:"$spacing",right:"$spacing",top:"$spacing",bottom:"$spacing"},"$selection-area-target":{fill:"$primary-green",strokeWidth:0,opacity:.2}},palettes:[{key:"categorical",colors:[["#a54343","#d76c6c","#ec983d","#ecc43d","#f9ec86","#cbe989","#70ba6e","#578b60","#79d69f","#26a0a7","#138185","#65d3da"]]},{key:"diverging",colors:[["#3d52a1","#3a89c9","#77b7e5","#b4ddf7","#e6f5fe","#ffe3aa","#f9bd7e","#ed875e","#d24d3e","#ae1c3e"]]},{key:"sequential",colors:[["rgb(180,221,212)","rgb(34, 83, 90)"]]}]},{component:Z4,data:r8,formatter:D2,interaction:o8,renderer:J4(),scale:T3,symbol:W6});pte.forEach(Yre.use),Gre.forEach(Yre.use),[].forEach(Yre.use);const Kre=Yre();Kre.use(NZ),Kre.renderer.prio(["canvas"]);const Xre=(e,t)=>e&&"center"!==e&&"rtl"===t?uK(e):e,Jre=({cell:e,representation:t,textStyle:n,imageContainerHorizontalAlignment:r})=>{const{imageBox:o}=t,{styleService:{grid:{lineClamp:i}}}=wV(),{direction:a}=gV();return Uo.jsxs("div",{style:{display:"grid",gridTemplateColumns:`${o?.width??24}px 1fr`,maxHeight:"fit-content",alignItems:"center",justifyContent:"flex-start",boxSizing:"border-box"},children:[Uo.jsx("div",{"data-key":"image-container--partial-image",style:{display:"flex",flexDirection:"column",justifyContent:CK(e),alignItems:Xre(r,a),overflow:"hidden",boxSizing:"border-box",border:"4px solid transparent",width:o?.width??24,height:"100%"},children:Uo.jsx(HK,{representation:t,textStyle:n})}),Uo.jsx(SX,{padding:4/(i<=2?2:1),alignSelf:CK(e,!0),children:!!t.labelStructure&&BK(t.labelStructure)})]})},Zre=({suffix:e,delimeter:t})=>` ${e?t:""} ${e}`,Qre=({href:e,text:t,labelStructure:n,interactions:r,color:o})=>Uo.jsxs("span",{children:[Uo.jsx(tz,{...XX({href:e,text:t,interactions:r,color:o}),children:n?.maskedValue?n.maskedValue:n?.originalValue}),!!n&&Zre(n)]}),eoe=({children:e,textStyle:t,shouldEnableStickyText:n})=>Uo.jsx("span",{style:{...t,border:"4px solid transparent",boxSizing:"border-box",...n&&{alignSelf:"flex-start",position:"sticky",top:0}},children:e}),toe=({cell:e,isCellSelected:t,isLeftColumn:n})=>{const{direction:r}=gV(),{isActive:o}=vK(),{layoutService:i,styleService:a}=wV(),{interactions:s}=bV(),l=n&&i.isIndentModeEnabled;let c=n&&!e.isNull?(e=>{const{representation:{text:t,labelStructure:n}}=e;if(!n||!n.originalValue)return t;const{originalValue:r,maskedValue:o,suffix:i,delimeter:a}=n;return`${0!==o.length?o:r} ${i?a:""} ${i}`.trim()})(e):e.representation.text;if(e.isEmpty)return null;const u=(({cell:e,styleService:t,isCellSelected:n,isLeftColumn:r})=>({...h$,...f$(r?Math.max(t.grid.lineClamp,e.leafCount*t.grid.lineClamp):t.grid.columnLineClamp),color:AK({cell:e,styleService:t,isCellSelected:n}),fontWeight:IK({cell:e,styleService:t}),fontStyle:PK({cell:e,styleService:t}),textDecoration:OK({cell:e,styleService:t}),fontFamily:t.dimensionValues.fontFamily,fontSize:t.dimensionValues.fontSize}))({cell:e,styleService:a,isCellSelected:t,isLeftColumn:n});if(e.representation.type===XF.Image&&!e.isTotal&&!e.isNull){const{labelStructure:t}=e.representation,o=n&&t&&t.suffix?Jre:VK;return Uo.jsx(o,{cell:e,representation:e.representation,leafCount:e.leafCount,textStyle:u,isLeftColumn:n,canExpandOrCollapse:e.ref.qCanCollapse||e.ref.qCanExpand,imageContainerHorizontalAlignment:GX(e,i,n,r)})}if(e.representation.type===XF.Link&&!o&&!e.isTotal){const t=n&&e.representation.labelStructure?Qre:JX;c=Uo.jsx(t,{text:e.representation.text,labelStructure:e.representation.labelStructure,href:e.representation.url,interactions:s,color:e.expressionColor.color})}return Uo.jsx(eoe,{shouldEnableStickyText:l,textStyle:{...u,...e.representation.type===XF.Image&&e.isNull?{alignSelf:CK(e)}:{}},children:c})},noe=({index:e,style:t,data:n})=>{const{styleService:r,layoutService:o}=wV(),{isSelected:i}=vK(),{isLeftColumn:a=!1,showLastBorder:s,itemCount:l,isLast:c,totalDividerIndex:u}=n,{isAdjustingWidth:d,setIsAdjustingWidth:p}=uX([n]),h=VX(e,n),f=a?e===l-1:c,m=a?c:e===l-1,g=DY(h,u,o.isIndentModeEnabled);if(void 0===h){const{background:n}=r.dimensionValues;return Uo.jsx(TY,{style:{...t,background:n},index:e,isLastRow:f,isLastColumn:m,showLastBorder:s,isLeftColumn:a,showTotalCellDivider:g})}const y=i(h);return Uo.jsxs(YX,{reactWindowStyle:t,isLeftColumn:a,isLastRow:f,isLastColumn:m,isCellSelected:y,showTotalCellDivider:g,cell:h,data:n,isAdjustingWidth:d,index:e,children:[Uo.jsxs(zY,{verticalAlign:CK(h),width:jY(h.representation),right:h.isLeftColumn?void 0:4,isLeftColumn:a,children:[Uo.jsx(zK,{isLeftColumn:a,isCellSelected:y,cell:h}),Uo.jsx(toe,{isLeftColumn:a,isCellSelected:y,cell:h})]}),Uo.jsx(hX,{cellInfo:{...h,columnWidthLocation:h.isPseudoDimension?rW.Measures:rW.Dimension},columnWidth:t.width,isLastColumn:m,setIsAdjustingWidth:p})]})};var roe=t.memo(noe,bY);const ooe=({list:e,listValues:t,isLastRow:n,getRightGridColumnWidth:r})=>o=>{const i=n?e[o]:t.at(o);return i&&0===o&&i.x>0?(i.leafCount+i.x+i.distanceToNextCell)*r():!n&&i?(i.leafCount+i.distanceToNextCell)*r():r(i?.x??o)},ioe=(e,t,n,r)=>{const o=Object.values(e);let i,a=o.length;return r&&(a=n,i=t/a),{itemCount:a,estimatedItemSize:i,listValues:o}},aoe=(e,t)=>n=>{e.current&&(e.current[t]=n)},soe={display:"flex",height:"fit-content",borderWidth:"1px 0px 0px 0px",...d$},loe={overflow:"hidden",willChange:"auto",flexShrink:0},coe=({leftGridRef:e,width:t,height:n,columnWidths:r,showLastBorder:o})=>{const{pageInfo:i,direction:a}=gV(),{layoutService:s,styleService:{contentCellHeight:l,grid:{divider:c}}}=wV(),{qSize:u}=s.layout.qHyperCube,{gridSectionsData:{leftDimensionData:d},visibleDimensionsInfo:{visibleLeftDimensionInfo:p}}=sU();HX(e,d),$X(e,t,n,l);const h=i.rowsOnCurrentPage*l,f={...soe,borderColor:c,width:r.reduce(((e,t)=>e+t),0)};return Uo.jsx("div",{style:f,"data-section-id":"LEFT_GRID",children:d.grid.map(((t,c)=>{const f=c===d.columnCount-1,m=DV(p[c]),{itemCount:g,estimatedItemSize:y,listValues:_}=ioe(t,h,i.rowsOnCurrentPage,f),b=s.isIndentModeEnabled?()=>l:((e,t,n,r,o)=>i=>{const a=r?e[i]:t.at(i);if(a&&0===i&&a.pageY>0)return(a.leafCount+a.pageY+a.distanceToNextCell)*n;if(a&&a.leafCount>0){const e=a.y===o-a.leafCount;return(a.leafCount-(e?a.ref.qUp:0)+a.distanceToNextCell)*n}return n})(t,_,l,f,u.qcy);return Uo.jsx(mY,{ref:aoe(e,c),style:{...loe,flexGrow:f?1:0,direction:a},height:n,width:r[c],itemCount:g,itemSize:b,layout:"vertical",itemData:{list:t,isLeftColumn:!0,isLast:f,itemCount:g,showLastBorder:o,listValues:_,totalDividerIndex:d.totalDividerIndex},itemKey:oX,estimatedItemSize:y,children:roe},m)}))})};var uoe=y(coe);const doe={overflow:"hidden",willChange:"auto"},poe=e=>({...d$,borderWidth:"rtl"===e?"0px 1px 0px 0px":"0px 0px 0px 1px"}),hoe=({topGridRef:e,rowHightCallback:t,width:n,height:r,showLastBorder:o,getRightGridColumnWidth:i})=>{const{direction:a}=gV(),{layoutService:s,styleService:{grid:{divider:l},headerCellHeight:c}}=wV(),{gridSectionsData:{headersData:u,topDimensionData:d}}=sU(),p={...poe(a),borderColor:l,height:r};HX(e,d),$X(e,n,r,c);const h=s.size.x*i();return 0===d.rowCount?Uo.jsx("div",{style:{width:n,height:r,...poe(a)}}):Uo.jsx("div",{style:p,"data-section-id":"TOP_GRID",children:d.grid.map(((r,l)=>{const c=l===d.rowCount-1,{itemCount:p,estimatedItemSize:f,listValues:m}=ioe(r,h,s.size.x,c),g=(({layoutService:e,headersData:t,topRowIndex:n})=>{const r=t.data.at(n);if(void 0===r)return;const o=t.size.x-1,i=qX({layoutService:e,headersData:t,topRowIndex:n})?0:o,a=r.at(i),s=Array.isArray(a)?a.at(o):a;return s?e.getDimensionInfo(s.dimensionInfoIndex):void 0})({layoutService:s,headersData:u,topRowIndex:l}),y=g?DV(g):`empty ${l}`;return Uo.jsx(mY,{ref:aoe(e,l),style:doe,height:t(),width:n,itemCount:p,itemSize:ooe({list:r,listValues:m,isLastRow:c,getRightGridColumnWidth:i}),layout:"horizontal",itemData:{list:r,isLast:c,itemCount:p,showLastBorder:o,listValues:m,totalDividerIndex:d.totalDividerIndex},itemKey:oX,estimatedItemSize:f,direction:a,children:roe},y)}))})};var foe=y(hoe);const moe=()=>{const{styleService:{headerCellHeight:e,contentCellHeight:t}}=wV(),n=DU(),r=(()=>{const{model:e}=bV(),t=p((async(t,n)=>{if(!e)throw new Error("No Model provided!");const{qReverseSort:r,dimensionInfoIndex:o,sortDirection:i}=t,a=[];if(n===i)return!1;a.push({qPath:`/qHyperCubeDef/qDimensions/${o}/qDef/qReverseSort`,qOp:"Replace",qValue:(!r).toString()});try{return await e.applyPatches(a,!0),!0}catch(e){return console.error("Error while applying patch: ",e),!1}}),[e]);return t})(),{gridSectionsWrapperRefs:{headerGridWrapperRef:o,topGridWrapperRef:i,leftGridWrapperRef:a,dataGridWrapperRef:s},gridRefs:{topGridRef:l,leftGridRef:c,dataGridRef:d},scrollDirectionRefs:{verticalScrollDirection:h,horizontalScrollDirection:f},scrollbarsDimensions:{verticalScrollbarWidth:m,horizontalScrollbarHeight:g,resetHorizontalScrollbarHeight:y}}=LU(),{leftGridWidth:_,leftGridFullWidth:b,leftGridColumnWidths:x,rightGridFullWidth:v,showLastRightBorder:w,getRightGridColumnWidth:S,getHeaderCellsIconsVisibilityStatus:C,overrideLeftGridWidth:E}=function({tableWidth:e,verticalScrollbarWidth:t,resetHorizontalScrollbarHeight:n}){const{layoutService:r,styleService:o}=wV(),{gridSectionsData:{headersData:i}}=sU(),{measureText:a}=F$(o.header),s=EU({tableWidth:e}),l=kU({tableWidth:e,verticalScrollbarWidth:t,leftGridWidth:s.leftGridWidth}),c=s.leftGridWidth+l.rightGridFullWidth+1<e,d=p(((e,t,n="")=>{let o=e;r.isIndentModeEnabled&&(o=1,1===i.size.x&&(o=0));const l=s.leftGridColumnWidths[o];let c=!1,u=!1,d=a(n)+uU;return t&&d+cU<=l&&(u=!0,d+=cU),d+cU<=l&&(c=!0),{shouldShowMenuIcon:c,shouldShowLockIcon:u}}),[s.leftGridColumnWidths,a,r.isIndentModeEnabled,i.size.x]);return u((()=>{const e=s.leftGridWidth===s.leftGridFullWidth,t=l.rightGridWidth===l.rightGridFullWidth;e&&t&&n()}),[n,s.leftGridWidth,s.leftGridFullWidth,l.rightGridWidth,l.rightGridFullWidth]),{...s,...l,showLastRightBorder:c,getHeaderCellsIconsVisibilityStatus:d}}({tableWidth:n.width,verticalScrollbarWidth:m,resetHorizontalScrollbarHeight:y}),{gridScaffoldDimensions:k,headerGridDims:M,topGridDims:R,leftGridDims:A,dataGridDims:I,metadata:{everyThingFitsInTableRectHeight:P,scrollbarsVisibilityStatus:O}}=(({cellHeights:{headerCellHeight:e,contentCellHeight:t},horizontalWidths:{leftGridWidth:n,leftGridOriginalWidth:r,rightGridOriginalWidth:o},scrollBarsDimensions:{verticalScrollbarWidth:i,horizontalScrollbarHeight:a}})=>{const s=DU(),{pageInfo:l}=gV(),{gridSectionsData:{headersData:c,topDimensionData:u}}=sU(),d=Math.min(s.height*dU,Math.max(s.height*dU-25,s.height-t-a)),p=s.width*dU,h=l.rowsOnCurrentPage*t,f=Math.max(c.size.y,u.rowCount,1),m=e*f,g=e*f,y=Math.min(p,n),_=s.width-p,b=Math.max(_,s.width-y),x=Math.min(d,m,g),{availableHeight:v,everyThingFitsInTableRectHeight:w,everyThingFitsInTableRectWidth:S}=((e,t,n)=>{const r=t+1+n+i<=s.width,o=e+1+h+a,l=o-s.height<a||o<=s.height;return{availableHeight:l?o:s.height,everyThingFitsInTableRectHeight:l,everyThingFitsInTableRectWidth:r}})(x,y,b),C=v-d,E=Math.max(C,v-x),k=Math.min(E,h),M=Math.min(E,h),R=m+1+h,{visibilityStatus:A,metadata:{hasLeftGridOverflowX:I,hasDataGridOverflowX:P}}=(e=>{const{gridScaffold:{X_AXIS:{leftSectionWidth:t,rightSectionWidth:n},Y_AXIS:{topSectionHeight:r,bottomSectionHeight:o}},gridOriginalWidth:{X_AXIS:{leftSectionFullWidth:i,rightSectionFullWidth:a},Y_AXIS:{topSectionFullHeight:s,bottomSectionFullHeight:l}}}=e,c=s>r,u=i>t,d=a>n,p=l>o;return{visibilityStatus:{topGrid:{overflowX:"hidden",overflowY:c?"scroll":"hidden"},leftGrid:{overflowX:u?"scroll":"hidden",overflowY:"hidden"},dataGrid:{overflowX:d?"scroll":"hidden",overflowY:p?"scroll":"hidden"}},metadata:{hasTopGridOverflowY:c,hasLeftGridOverflowX:u,hasDataGridOverflowX:d,hasDataGridOverflowY:p}}})({gridScaffold:{X_AXIS:{leftSectionWidth:y,rightSectionWidth:b},Y_AXIS:{topSectionHeight:x,bottomSectionHeight:E}},gridOriginalWidth:{X_AXIS:{leftSectionFullWidth:r,rightSectionFullWidth:o},Y_AXIS:{topSectionFullHeight:g,bottomSectionFullHeight:R-g}}});return{gridScaffoldDimensions:{width:s.width,height:s.height,gridTemplateColumns:`${y}px ${b}px`,gridTemplateRows:`${x}px ${E}px`},headerGridDims:{width:-1,height:x},topGridDims:{fullSizeWrapper:{width:o-i+(P?i:0),height:g},stickyWrapper:{width:b-1-i,height:-1},self:{width:Math.min(o,b)-(S?1:0)-i,height:g}},leftGridDims:{fullSizeWrapper:{width:y,height:R-g+(!I&&P?a:0)},stickyWrapper:{width:y,height:E-1-a},self:{width:y,height:Math.max(t,k-(w?0:a-1))}},dataGridDims:{fullSizeWrapper:{width:o-i+(P?i:0),height:R-g+(!P&&I?a:0)},stickyWrapper:{width:b-1-i,height:E-1-a},self:{width:Math.min(o,b)-(S?1:0)-i,height:Math.max(t,M-(w?0:a-1))}},metadata:{everyThingFitsInTableRectHeight:w,scrollbarsVisibilityStatus:A}}})({cellHeights:{headerCellHeight:e,contentCellHeight:t},horizontalWidths:{leftGridWidth:_,leftGridOriginalWidth:b,rightGridOriginalWidth:v},scrollBarsDimensions:{verticalScrollbarWidth:m,horizontalScrollbarHeight:g}}),L=p((()=>e),[e]),D=p((()=>t),[t]);return(()=>{const{downloadService:e}=wV();u((()=>{e.isDownloadedAsPDForImage&&e.notifyIsDoneRendering()}))})(),Uo.jsxs(zU,{style:k,children:[Uo.jsx("div",{style:{overflow:"hidden"},ref:o,children:Uo.jsx(BX,{tableWidth:n.width,leftGridWidth:_,columnWidths:x,getHeaderCellsIconsVisibilityStatus:C,rowHight:e,height:M.height,changeSortOrder:r,overrideLeftGridWidth:E})}),Uo.jsx(qU,{style:O.topGrid,origin:iW.TopGrid,ref:i,children:Uo.jsx(TU,{style:R.fullSizeWrapper,children:Uo.jsx(FU,{style:R.stickyWrapper,children:Uo.jsx(foe,{topGridRef:l,rowHightCallback:L,...R.self,showLastBorder:{right:w,bottom:!1},getRightGridColumnWidth:S})})})}),Uo.jsx(qU,{style:O.leftGrid,origin:iW.LeftGrid,ref:a,children:Uo.jsx(TU,{style:A.fullSizeWrapper,children:Uo.jsx(FU,{style:A.stickyWrapper,children:Uo.jsx(uoe,{leftGridRef:c,...A.self,columnWidths:x,showLastBorder:{right:!1,bottom:P}})})})}),Uo.jsx(qU,{style:O.dataGrid,origin:iW.DataGrid,ref:s,children:Uo.jsx(TU,{style:I.fullSizeWrapper,children:Uo.jsx(FU,{style:I.stickyWrapper,children:Uo.jsx(lX,{dataGridRef:d,rowHightCallback:D,...I.self,showLastBorder:{right:w,bottom:P},getRightGridColumnWidth:S,verticalScrollDirection:h,horizontalScrollDirection:f})})})})]})},goe=()=>{const{keyboard:e,theme:t,interactions:n,translator:r}=bV(),{pageInfo:o,updatePageInfo:i,rect:a}=gV(),{layoutService:s}=wV(),{layout:l,hasData:c}=s;return Uo.jsxs(Uo.Fragment,{children:[c?Uo.jsx(moe,{}):null,Uo.jsx(CV,{}),Uo.jsx(fV,{paginationNeeded:o.shouldShowPagination,handleChangePage:e=>{i({page:e})},pageInfo:o,totalRowCount:o.totalRowCount,totalColumnCount:0,totalPages:o.totalPages,keyboard:e,translator:r,theme:t,interactions:n,rect:a,layout:l})]})},yoe={WHITE:"#FFFFFF",GREEN_ULTRA_LIGHT:"#F2F9F5",GREEN:"#00873D",GREEN_PALE:"#15AA51",GREEN_DARK:"#0D6932",GREEN_EXTRA_DARK:"#094923",BLUE_ULTRA_LIGHT:"#EDF7FC",BLUE:"#005DB9",BLUE_PALE:"#048DEC",BLUE_DARK:"#003A8F",BLUE_EXTRA_DARK:"#002D6D",RED_ULTRA_LIGHT:"#FEF2F6",RED:"#D7004B",RED_PALE:"#F15A81",RED_DARK:"#8B0041",RED_EXTRA_DARK:"#5C002B",ORANGE_ULTRA_LIGHT:"#FFF7EB",ORANGE:"#EF6D00",ORANGE_PALE:"#FF9800",ORANGE_DARK:"#BF3900",ORANGE_EXTRA_DARK:"#611100",PURPLE:"#655dc6",PURPLE_PALE:"#8D8BCE",PURPLE_DARK:"#413885",GREYSCALE_0:"#000000",GREYSCALE_5:"#0E0E0E",GREYSCALE_10:"#1A1A1A",GREYSCALE_15:"#262626",GREYSCALE_20:"#333333",GREYSCALE_25:"#404040",GREYSCALE_30:"#4D4D4D",GREYSCALE_35:"#595959",GREYSCALE_40:"#666666",GREYSCALE_45:"#737373",GREYSCALE_50:"#808080",GREYSCALE_55:"#8C8C8C",GREYSCALE_60:"#999999",GREYSCALE_65:"#A6A6A6",GREYSCALE_70:"#B3B3B3",GREYSCALE_75:"#BFBFBF",GREYSCALE_80:"#CCCCCC",GREYSCALE_85:"#D9D9D9",GREYSCALE_90:"#E6E6E6",GREYSCALE_95:"#F2F2F2",GREYSCALE_98:"#FAFAFA",GREYSCALE_100:"#FFFFFF",GREYSCALE_0_0:"rgba(0, 0, 0, 0)",GREYSCALE_0_03:"rgba(0, 0, 0, 0.03)",GREYSCALE_0_05:"rgba(0, 0, 0, 0.05)",GREYSCALE_0_06:"rgba(0, 0, 0, 0.06)",GREYSCALE_0_10:"rgba(0, 0, 0, 0.1)",GREYSCALE_0_15:"rgba(0, 0, 0, 0.15)",GREYSCALE_0_20:"rgba(0, 0, 0, 0.2)",GREYSCALE_0_30:"rgba(0, 0, 0, 0.3)",GREYSCALE_0_42:"rgba(0, 0, 0, 0.42)",GREYSCALE_0_55:"rgba(0, 0, 0, 0.55)",GREYSCALE_0_60:"rgba(0, 0, 0, 0.6)",GREYSCALE_100_15:"rgba(255, 255, 255, 0.15)",GREYSCALE_100_50:"rgba(255, 255, 255, 0.5)",GREYSCALE_100_60:"rgba(255, 255, 255, 0.6)",MISC_FOCUS_BORDER:"#0275D9",TEXT_PRIMARY:"#404040",TEXT_SECONDARY:"rgba(0, 0, 0, 0.55)"},_oe=12,boe=14,xoe=16,voe=24,woe=3,Soe=300,Coe=400,Eoe=600,koe=700,Moe={FONT_FAMILY:"'Source Sans Pro', 'HelveticaNeue', 'Helvetica Neue', Helvetica, Arial, sans-serif"};function Roe(e){return Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",...e,children:Uo.jsx("path",{d:"m8 9 4.5-4.5L14 6l-4.5 4.5L8 12 2 6l1.5-1.5L8 9Z"})})}var Aoe=function({fontSize:e="medium",children:t=null,className:n=""}={}){return Uo.jsx("i",{style:{fontSize:"small"===e?"16px":"20px",margin:"small"===e?"-2px 0":void 0,display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},className:n,children:t})};function Ioe(e={}){return Uo.jsx(Aoe,{...e,children:Uo.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20",children:[Uo.jsx("rect",{width:"20",height:"20",fill:"currentColor",rx:"3"}),Uo.jsx("path",{fill:"#FFFFFF",fillRule:"evenodd",d:"m12.627 6.617-4.206 4.205-1.037-1.035a1.25 1.25 0 1 0-1.768 1.767l1.92 1.919a1.25 1.25 0 0 0 1.769 0l5.09-5.089a1.25 1.25 0 1 0-1.768-1.768Z",clipRule:"evenodd"})]})})}function Poe(e={}){return Uo.jsx(Aoe,{fontSize:"medium",...e,children:Uo.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Uo.jsx("rect",{stroke:"none",width:"16",height:"16",rx:"8",fill:"currentColor"}),Uo.jsx("path",{d:"M11 8C11 9.65685 9.65685 11 8 11C6.34315 11 5 9.65685 5 8C5 6.34315 6.34315 5 8 5C9.65685 5 11 6.34315 11 8Z",stroke:"none",fill:"white"})]})})}function Ooe(e){return Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",...e,children:Uo.jsx("path",{d:"m9.345 8 3.982 3.982a.951.951 0 0 1-1.345 1.345L8 9.345l-3.982 3.982a.951.951 0 0 1-1.345-1.345L6.655 8 2.673 4.018a.951.951 0 0 1 1.345-1.345L8 6.655l3.982-3.982a.951.951 0 1 1 1.345 1.345L9.345 8Z"})})}function Loe(e={}){return Uo.jsx(Aoe,{...e,children:Uo.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:Uo.jsxs("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:[Uo.jsx("rect",{fill:"currentColor",x:"0",y:"0",width:"16",height:"16",rx:"3"}),Uo.jsx("rect",{fill:"#FFFFFF",x:"4",y:"7",width:"8",height:"2",rx:"1"})]})})})}function Doe(e={}){return Uo.jsx(Aoe,{fontSize:"medium",...e,children:Uo.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:Uo.jsx("g",{strokeWidth:"1",fillRule:"evenodd",fillOpacity:"0.603119339",strokeOpacity:"0.146654212",children:Uo.jsx("rect",{stroke:"currentStroke",fill:"currentFill",x:"0.5",y:"0.5",width:"15",height:"15",rx:"7.5"})})})})}function Toe({className:e}){return Uo.jsx(Aoe,{fontSize:"small",className:e,children:Uo.jsx("svg",{width:"8px",height:"14px",viewBox:"0 0 8 14",version:"1.1","aria-labelledby":"SortIcon",children:Uo.jsx("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:Uo.jsx("g",{transform:"translate(-4.000000, -1.000000)",fill:"#404040",fillRule:"nonzero",children:Uo.jsxs("g",{transform:"translate(4.324187, 1.300372)",children:[Uo.jsx("path",{d:"M4.06624695,13.2115849 L7.28588573,9.1870364 C7.3893886,9.05765782 7.36841219,8.8688701 7.23903361,8.76536724 C7.18583969,8.72281211 7.11974654,8.69962788 7.05162509,8.69962788 L0.3,8.69962788 C0.134314575,8.69962788 -1.25807407e-14,8.83394246 -1.26010313e-14,8.99962788 C-1.26093738e-14,9.06774933 0.0231842256,9.13384248 0.0657393572,9.1870364 L3.28537814,13.2115849 C3.45788292,13.4272158 3.7725291,13.4621765 3.98816007,13.2896718 C4.01699242,13.2666059 4.04318107,13.2404172 4.06624695,13.2115849 Z",opacity:"0.300390625"}),Uo.jsx("path",{d:"M4.06624695,0.187670888 L7.28588573,4.21221937 C7.3893886,4.34159795 7.36841219,4.53038566 7.23903361,4.63388852 C7.18583969,4.67644366 7.11974654,4.69962788 7.05162509,4.69962788 L0.3,4.69962788 C0.134314575,4.69962788 2.1918781e-12,4.56531331 2.19185781e-12,4.39962788 C2.19184946e-12,4.33150643 0.0231842256,4.26541328 0.0657393572,4.21221937 L3.28537814,0.187670888 C3.45788292,-0.0279600799 3.7725291,-0.0629207673 3.98816007,0.109584007 C4.01699242,0.132649888 4.04318107,0.158838536 4.06624695,0.187670888 Z"})]})})})})})}function zoe(e={}){return Uo.jsx(Aoe,{...e,children:Uo.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:Uo.jsx("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:Uo.jsx("rect",{stroke:yoe.GREYSCALE_0_42,fill:"currentColor",x:"0.5",y:"0.5",width:"15",height:"15",rx:"3"})})})})}const joe={MuiButtonBase:{defaultProps:{disableRipple:!0,disableTouchRipple:!0,focusVisibleClassName:"sprout-focus-visible"},styleOverrides:{root:{}}},MuiButton:{defaultProps:{color:"inherit",disableRipple:!0,focusVisibleClassName:"sprout-focus-visible"},styleOverrides:{root:{height:"32px",lineHeight:"16px",minWidth:"24px",fontSize:14,borderRadius:woe,"& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"},transition:"unset",color:"var(--sprout-common-foreground-color-default)",boxShadow:"none","&:hover":{backgroundColor:"var(--sprout-common-background-color-hover)"},"&:active":{backgroundColor:"var(--sprout-common-background-color-pressed)"},"&.Mui-disabled":{backgroundColor:"var(--sprout-common-background-color-disabled)"},"&.Mui-focusVisible":{outline:"var(--sprout-focus-border-default)",outlineOffset:"calc(var(--sprout-focus-border-default-width) / -2)",backgroundColor:"var(--sprout-focus-background-color-default)",zIndex:100}},text:{padding:"8px 16px",backgroundColor:"transparent"},textPrimary:{color:"var(--sprout-brand-primary-color-default)"},textSecondary:{color:"var(--sprout-info-color-default)"},textWarning:{color:"var(--sprout-warning-color-default)"},textError:{color:"var(--sprout-danger-color-default)"},outlined:{padding:"7px 16px",border:"var(--sprout-common-border-moderate)",backgroundColor:"var(--sprout-common-background-color-enabled)","&.Mui-focusVisible":{borderColor:"transparent"},"&:hover":{border:"var(--sprout-common-border-moderate)"}},outlinedPrimary:{borderColor:"var(--sprout-brand-primary-color-default)",color:"var(--sprout-brand-primary-color-default)","&:hover":{borderColor:"var(--sprout-brand-primary-color-default)"}},outlinedSecondary:{borderColor:"var(--sprout-info-color-default)",color:"var(--sprout-info-color-default)","&:hover":{borderColor:"var(--sprout-info-color-default)"}},outlinedWarning:{borderColor:"var(--sprout-warning-color-default)",color:"var(--sprout-warning-color-default)","&:hover":{borderColor:"var(--sprout-warning-color-default)"}},outlinedError:{borderColor:"var(--sprout-danger-color-default)",color:"var(--sprout-danger-color-default)","&:hover":{borderColor:"var(--sprout-danger-color-default)"}},contained:{color:"var(--sprout-brand-primary-color-inverse)",backgroundColor:"var(--sprout-brand-primary-color-default)",padding:"8px 16px","&:hover":{backgroundColor:"var(--sprout-brand-primary-color-hover)"},"&:active":{backgroundColor:"var(--sprout-brand-primary-color-pressed)"},"&.Mui-focusVisible":{outline:"var(--sprout-focus-border-default)",outlineOffset:"var(--sprout-focus-border-default-width)",background:"var(--sprout-brand-primary-color-focus)"}},containedError:{backgroundColor:"var(--sprout-danger-color-default)","&:hover":{backgroundColor:"var(--sprout-danger-color-hover)"},"&:active":{backgroundColor:"var(--sprout-danger-color-pressed)"},"&.Mui-focusVisible":{outlineColor:"var(--sprout-danger-color-inverse)",backgroundColor:"var(--sprout-danger-color-focus)"}},sizeSmall:{fontSize:12,height:"24px","& > svg:only-child, & > i:only-child":{marginLeft:"-7px",marginRight:"-7px"}},sizeLarge:{fontSize:16,height:"40px",lineHeight:"20px","& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},textSizeSmall:{padding:"4px 11px"},textSizeLarge:{padding:"10px 19px"},outlinedSizeSmall:{padding:"3px 11px"},outlinedSizeLarge:{padding:"9px 19px"},containedSizeSmall:{padding:"4px 11px"},containedSizeLarge:{padding:"10px 19px"}},variants:[]}};var Noe=e=>({MuiAccordion:{styleOverrides:{root:{backgroundColor:yoe.GREYSCALE_98,"&:before":{backgroundColor:"unset"},"&.Mui-expanded":{margin:"0px"}}}},MuiAccordionDetails:{styleOverrides:{root:{backgroundColor:yoe.WHITE}}},MuiAccordionSummary:{defaultProps:{expandIcon:Uo.jsx(Roe,{"aria-hidden":"true",viewBox:"0 0 16 16",width:16,height:16})},styleOverrides:{root:{padding:"0px 12px 0px 16px",minHeight:"auto",boxShadow:`inset 0px -1px 0px 0px ${yoe.GREYSCALE_0_15}`,"&.Mui-focusVisible":{borderColor:yoe.MISC_FOCUS_BORDER,boxShadow:`inset 0 0 0 2px ${yoe.MISC_FOCUS_BORDER}`,borderRadius:woe,backgroundColor:yoe.GREYSCALE_0_03},"&.Mui-expanded":{minHeight:"auto"}},content:{overflow:"hidden",textOverflow:"ellipsis","&.Mui-expanded":{margin:"12px 0px"}}}},MuiAppBar:{defaultProps:{elevation:0},styleOverrides:{root:{flex:"0 0 48px",boxShadow:`inset 0 -1px 0 0 ${yoe.GREYSCALE_0_15}`},colorPrimary:{backgroundColor:yoe.WHITE,color:yoe.TEXT_PRIMARY}}},MuiBadge:{styleOverrides:{badge:{height:"16px",minWidth:"16px",fontSize:"12px",padding:"0px 5px"},anchorOriginTopRightRectangular:{top:"-3px",right:"-3px"}}},MuiButtonBase:{defaultProps:{disableRipple:!0,disableTouchRipple:!0,focusVisibleClassName:"sprout-focus-visible"}},MuiButtonGroup:{defaultProps:{disableRipple:!0},styleOverrides:{root:{height:"32px",lineHeight:"16px",fontSize:14,borderRadius:woe},text:{padding:"8px 16px","&.Mui-focusVisible":{boxShadow:`0 0 0 2px ${yoe.MISC_FOCUS_BORDER}`}},outlined:{padding:"7px 16px",borderColor:yoe.GREYSCALE_0_15,backgroundColor:yoe.GREYSCALE_100_60,"&.Mui-focusVisible":{borderColor:yoe.MISC_FOCUS_BORDER,boxShadow:`0 0 0 1px ${yoe.MISC_FOCUS_BORDER}`}},contained:{padding:"8px 16px",boxShadow:"none","&:hover":{boxShadow:"none"},"&:active":{boxShadow:"none"}},groupedContainedPrimary:{"&:hover":{backgroundColor:yoe.GREEN_PALE},"&:active":{backgroundColor:yoe.GREEN_DARK},"&.Mui-focusVisible":{borderColor:yoe.GREEN_PALE,boxShadow:`0 0 0 3px ${eL(yoe.GREEN_PALE,.5)}`}},groupedContainedSecondary:{"&:hover":{backgroundColor:yoe.BLUE_PALE},"&:active":{backgroundColor:yoe.BLUE_DARK},"&.Mui-focusVisible":{borderColor:yoe.BLUE_PALE,boxShadow:`0 0 0 3px ${eL(yoe.BLUE_PALE,.5)}`}}},variants:[{props:{size:"small"},style:{height:"24px"}},{props:{size:"large"},style:{height:"40px"}}]},MuiButton:{defaultProps:{color:"inherit",disableRipple:!0,focusVisibleClassName:"sprout-focus-visible"},styleOverrides:{root:{height:"32px",lineHeight:"16px",minWidth:"24px",fontSize:14,borderRadius:woe,"& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},text:{padding:"8px 16px","&:active":{backgroundColor:yoe.GREYSCALE_0_10},"&.Mui-focusVisible":{boxShadow:`0 0 0 2px ${yoe.MISC_FOCUS_BORDER}`}},outlined:({ownerState:e})=>({padding:"7px 16px",borderColor:yoe.GREYSCALE_0_15,backgroundColor:yoe.GREYSCALE_100_60,"&:active":{backgroundColor:yoe.GREYSCALE_0_10},"&.Mui-focusVisible":{borderColor:yoe.MISC_FOCUS_BORDER,boxShadow:`0 0 0 1px ${yoe.MISC_FOCUS_BORDER}`},..."amethyst"===e.color&&{borderColor:yoe.PURPLE,"&.Mui-focusVisible":{borderColor:yoe.PURPLE,boxShadow:`0 0 0 3px ${eL(yoe.PURPLE_PALE,.5)}`}}}),outlinedPrimary:{borderColor:yoe.GREEN,"&.Mui-focusVisible":{borderColor:yoe.GREEN,boxShadow:`0 0 0 3px ${eL(yoe.GREEN_PALE,.5)}`}},outlinedSecondary:{borderColor:yoe.BLUE,"&.Mui-focusVisible":{borderColor:yoe.BLUE,boxShadow:`0 0 0 3px ${eL(yoe.BLUE_PALE,.5)}`}},outlinedWarning:{borderColor:yoe.ORANGE,"&.Mui-focusVisible":{borderColor:yoe.ORANGE,boxShadow:`0 0 0 3px ${eL(yoe.ORANGE_PALE,.5)}`}},outlinedError:{borderColor:yoe.RED,"&.Mui-focusVisible":{borderColor:yoe.RED,boxShadow:`0 0 0 3px ${eL(yoe.RED_PALE,.5)}`}},contained:({ownerState:e})=>({color:yoe.WHITE,padding:"8px 16px",boxShadow:"none","&:hover":{boxShadow:"none"},"&:active":{boxShadow:"none"},..."amethyst"===e.color&&{"&:hover":{backgroundColor:yoe.PURPLE_PALE},"&:active":{backgroundColor:yoe.PURPLE_DARK},"&.Mui-focusVisible":{borderColor:yoe.PURPLE_PALE,boxShadow:`0 0 0 3px ${eL(yoe.PURPLE_PALE,.5)}`}}}),containedPrimary:{"&:hover":{backgroundColor:yoe.GREEN_PALE},"&:active":{backgroundColor:yoe.GREEN_DARK},"&.Mui-focusVisible":{borderColor:yoe.GREEN_PALE,boxShadow:`0 0 0 3px ${eL(yoe.GREEN_PALE,.5)}`}},containedSecondary:{"&:hover":{backgroundColor:yoe.BLUE_PALE},"&:active":{backgroundColor:yoe.BLUE_DARK},"&.Mui-focusVisible":{borderColor:yoe.BLUE_PALE,boxShadow:`0 0 0 3px ${eL(yoe.BLUE_PALE,.5)}`}},containedWarning:{"&:hover":{backgroundColor:yoe.ORANGE_PALE},"&:active":{backgroundColor:yoe.ORANGE_DARK},"&.Mui-focusVisible":{borderColor:yoe.ORANGE_PALE,boxShadow:`0 0 0 3px ${eL(yoe.ORANGE_PALE,.5)}`}},containedError:{"&:hover":{backgroundColor:yoe.RED_PALE},"&:active":{backgroundColor:yoe.RED_DARK},"&.Mui-focusVisible":{borderColor:yoe.RED_PALE,boxShadow:`0 0 0 3px ${eL(yoe.RED_PALE,.5)}`}},sizeSmall:{fontSize:12,height:"24px","& > svg:only-child, & > i:only-child":{marginLeft:"-7px",marginRight:"-7px"}},sizeLarge:{fontSize:16,height:"40px",lineHeight:"20px","& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},textSizeSmall:{padding:"4px 11px"},textSizeLarge:{padding:"10px 19px"},outlinedSizeSmall:{padding:"3px 11px"},outlinedSizeLarge:{padding:"9px 19px"},containedSizeSmall:{padding:"4px 11px"},containedSizeLarge:{padding:"10px 19px"}},variants:[]},MuiCardActionArea:{styleOverrides:{root:{height:"100%","&.MuiCardActionArea-focusHighlight":{opacity:0},"&:hover":{boxShadow:"none",backgroundColor:yoe.GREYSCALE_0_03,"&.MuiCardActionArea-focusHighlight":{opacity:0}},"&:active":{backgroundColor:yoe.GREYSCALE_95,boxShadow:"none"},"&.Mui-focusVisible":{borderRadius:woe,boxShadow:`inset 0 0 0 2px ${yoe.MISC_FOCUS_BORDER}`,"&.MuiCardActionArea-focusHighlight":{opacity:0}}}}},MuiChip:{defaultProps:{deleteIcon:Uo.jsx(Ooe,{"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),variant:"outlined"},styleOverrides:{root:{height:"24px",fontSize:_oe,borderRadius:woe,color:yoe.TEXT_PRIMARY,backgroundColor:yoe.GREYSCALE_100_15,"&.sprout-focus-visible":{borderColor:yoe.MISC_FOCUS_BORDER,boxShadow:`0px 0px 0px 1px ${yoe.MISC_FOCUS_BORDER}`},"&.Mui-focusVisible":{backgroundColor:yoe.GREYSCALE_0_03},"&.Mui-disabled":{backgroundColor:yoe.GREYSCALE_0_05,color:yoe.GREYSCALE_0_30,border:"none",opacity:1},"&.MuiChip-outlinedSuccess":{color:yoe.GREEN,borderColor:yoe.GREEN},"&.MuiChip-outlinedInfo":{color:yoe.BLUE,borderColor:yoe.BLUE},"&.MuiChip-outlinedWarning":{color:yoe.ORANGE,borderColor:yoe.ORANGE},"&.MuiChip-outlinedError":{color:yoe.RED,borderColor:yoe.RED}},outlined:{border:`solid 1px ${yoe.GREYSCALE_0_15}`,backgroundColor:yoe.GREYSCALE_100_15,".MuiChip-clickable&:active ":{boxSizing:"border-box",borderRadius:woe,boxShadow:"none",backgroundColor:yoe.GREYSCALE_0_10},"&.MuiChip-deleteIconSmall":{height:13,color:"inherit"}},outlinedPrimary:{color:yoe.GREEN,borderColor:yoe.GREEN},outlinedSecondary:{color:yoe.BLUE,borderColor:yoe.BLUE},label:{fontFamily:Moe.FONT_FAMILY,lineHeight:"16px"}}},MuiAutocomplete:{defaultProps:{clearIcon:Uo.jsx(Ooe,{"aria-hidden":"true",viewBox:"0 0 16 16",height:12,width:12}),popupIcon:Uo.jsx(Roe,{"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),forcePopupIcon:!0},styleOverrides:{root:{"& .MuiAutocomplete-endAdornment > button":{border:"none",backgroundColor:"unset"}},input:{"&.MuiAutocomplete-input":{padding:"6px 4px"}},inputRoot:{padding:"0px 2px",boxSizing:"border-box",borderRadius:woe},listbox:{padding:"0","& .MuiAutocomplete-option":{height:"32px",minHeight:"32px"}},option:{borderRadius:woe,fontSize:boe,height:"32px",padding:"6px 16px",minHeight:"32px","&.MuiAutocomplete-option.Mui-focused":{backgroundColor:yoe.GREYSCALE_0_03,"&.Mui-focusVisible":{border:`solid 2px ${yoe.MISC_FOCUS_BORDER}`,padding:"4px 14px"}},'&.MuiAutocomplete-option[aria-selected="true"]':{backgroundColor:yoe.GREYSCALE_0_05,"&.Mui-focused":{backgroundColor:yoe.GREYSCALE_0_05},"&.Mui-focusVisible":{backgroundColor:yoe.GREYSCALE_0_05}}},popupIndicator:{borderRadius:woe,border:`solid 1px ${yoe.GREYSCALE_0_15}`,color:yoe.GREYSCALE_0_60,marginRight:0,width:voe,height:voe},paper:{marginTop:"4px",boxShadow:`0px 2px 4px 0px ${yoe.GREYSCALE_0_15}`},clearIndicator:{borderRadius:woe,marginRight:"4px"},popupIndicatorOpen:{backgroundColor:yoe.GREYSCALE_0_10}}},MuiFormControlLabel:{styleOverrides:{root:{marginLeft:"-10px"},label:{fontSize:boe}}},MuiFormHelperText:{styleOverrides:{root:{fontSize:_oe,lineHeight:"16px",margin:"4px 0 0 0","&.Mui-error":{color:yoe.RED}},contained:{marginLeft:0,marginRight:0}}},MuiFormLabel:{styleOverrides:{root:{color:yoe.GREYSCALE_25,fontSize:_oe,fontFamily:Moe.FONT_FAMILY,fontWeight:Eoe,fontStretch:"normal",fontStyle:"normal",letterSpacing:"normal",lineHeight:1,"&.Mui-focused":{color:yoe.TEXT_PRIMARY},"&.Mui-error":{color:yoe.TEXT_SECONDARY},"&[optional=true]":{"&:after":{color:yoe.TEXT_SECONDARY,content:"'(optional)'",fontWeight:Coe,marginLeft:"4px"}}},asterisk:{visibility:"collapse",display:"inline-flex","&::after":{visibility:"visible",color:yoe.TEXT_SECONDARY,content:"'(required)'",fontWeight:Coe,marginLeft:"4px"}}}},MuiOutlinedInput:{defaultProps:{notched:!1},styleOverrides:{root:{fontSize:boe,lineHeight:"16px",backgroundColor:yoe.WHITE,borderRadius:woe,"&:not(.Mui-focused):not(.Mui-error):not(.Mui-disabled):hover .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${yoe.GREYSCALE_0_05}`,borderColor:yoe.GREYSCALE_0_30},"&.Mui-focused:not(.Mui-error) .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${yoe.MISC_FOCUS_BORDER}`,boxShadow:`0px 0px 0px 1px ${yoe.MISC_FOCUS_BORDER}, inset 0 2px 0 0 ${yoe.GREYSCALE_0_05}`},"&.Mui-focused.Mui-error .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${yoe.RED}`,boxShadow:`0px 0px 0px 1px ${yoe.RED}, inset 0 2px 0 0 ${yoe.GREYSCALE_0_05}`},"&.Mui-disabled":{backgroundColor:"transparent"},"&.Mui-disabled .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${yoe.GREYSCALE_0_10}`,borderColor:yoe.GREYSCALE_0_10,backgroundColor:yoe.GREYSCALE_0_05}},adornedStart:{paddingLeft:0},adornedEnd:{paddingRight:0},input:{color:yoe.TEXT_PRIMARY,padding:"6px 12px","&.Mui-disabled":{opacity:.45}},inputSizeSmall:{padding:"0px 12px"},notchedOutline:{borderColor:yoe.GREYSCALE_0_15,borderRadius:woe,boxShadow:`inset 0 2px 0 0 ${yoe.GREYSCALE_0_05}`},multiline:{padding:"0"}}},MuiSelect:{defaultProps:{IconComponent:e=>Uo.jsx(Roe,{...e,"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}}},styleOverrides:{select:{padding:"7px 12px",borderRadius:"3px !important",minHeight:"1em","& em":{color:yoe.TEXT_SECONDARY},"& ~svg":{position:"absolute",right:"12px",top:"unset",cursor:"pointer"},"&[aria-expanded=true]":{backgroundColor:yoe.GREYSCALE_0_05},"& ~fieldset":{boxShadow:"none !important",border:"none !important",backgroundColor:"unset !important"},"&:hover":{backgroundColor:yoe.GREYSCALE_0_03},"&:active":{backgroundColor:yoe.GREYSCALE_0_10},"&:focus":{backgroundColor:yoe.GREYSCALE_0_03,borderRadius:"3px !important",border:`solid 1px ${yoe.MISC_FOCUS_BORDER}`,boxShadow:`inset 0px 0px 0px 1px ${yoe.MISC_FOCUS_BORDER}`},"&.Mui-disabled":{opacity:"unset",color:yoe.GREYSCALE_0_30,"&:hover":{backgroundColor:yoe.GREYSCALE_0_0,borderColor:yoe.GREYSCALE_0_15},"& ~svg":{color:yoe.GREYSCALE_0_30}}},outlined:{border:`solid 1px ${yoe.GREYSCALE_0_15}`},nativeInput:{height:"42px"}}},MuiIconButton:{styleOverrides:{root:{borderRadius:woe}}},MuiInput:{styleOverrides:{root:{"&.Mui-focused":{borderColor:yoe.MISC_FOCUS_BORDER,boxShadow:`0 0 0 2px ${yoe.MISC_FOCUS_BORDER}`}}}},MuiInputAdornment:{styleOverrides:{root:{padding:"4px 8px",color:yoe.GREYSCALE_55},positionStart:{marginRight:0},positionEnd:{marginLeft:0}}},MuiInputBase:{styleOverrides:{root:{fieldset:{boxShadow:"none"}},input:{height:"20px",fontSize:boe,padding:"8px 12px",lineHeight:"16px","&.MuiInputBase-inputAdornedStart":{paddingLeft:0},"&.MuiInputBase-inputAdornedEnd":{paddingRight:0}},sizeSmall:{height:"24px",input:{fontSize:_oe,paddingLeft:"8px"}}}},MuiInputLabel:{defaultProps:{shrink:!0},styleOverrides:{outlined:{fontSize:_oe,fontWeight:Eoe,color:yoe.GREYSCALE_25,"&.MuiInputLabel-shrink":{transform:"translate(0px, -16px)",fontWeight:Eoe}}}},MuiPopover:{styleOverrides:{paper:{minWidth:"160px",top:"60px",marginTop:"5px","&ul":{padding:"0px"},boxShadow:`0px 4px 10px ${yoe.GREYSCALE_0_15}, 0px 0px 0px 1px ${yoe.GREYSCALE_0_05}`}}},MuiRadio:{defaultProps:{size:"small",icon:Uo.jsx(Doe,{}),checkedIcon:Uo.jsx(Poe,{})},styleOverrides:{root:{"&:hover":{backgroundColor:"unset"},fill:yoe.GREYSCALE_100_60,stroke:"black","&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"},"&.sprout-focus-visible i":{borderRadius:"50%",boxShadow:`0 0 0 2px ${yoe.MISC_FOCUS_BORDER}`},"&.Mui-checked":{"&.MuiRadio-colorPrimary":{"&.sprout-focus-visible i":{borderColor:yoe.GREEN_PALE,boxShadow:`0 0 0 3px ${eL(yoe.GREEN_PALE,.5)}`}},"&.MuiRadio-colorSecondary":{"&.sprout-focus-visible i":{borderColor:yoe.BLUE_PALE,boxShadow:`0 0 0 3px ${eL(yoe.BLUE_PALE,.5)}`}},"&.Mui-disabled":{color:yoe.GREYSCALE_0_20}},"&.Mui-disabled":{fill:yoe.GREYSCALE_0_20,stroke:"none"}}}},MuiCheckbox:{defaultProps:{size:"small",icon:Uo.jsx(zoe,{}),checkedIcon:Uo.jsx(Ioe,{}),indeterminateIcon:Uo.jsx(Loe,{})},styleOverrides:{root:{borderWidth:1,"&:hover":{backgroundColor:"unset"},"&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"},"&.sprout-focus-visible i":{borderRadius:woe,boxShadow:" 0px 0px 0px 2px #FFFFFF, 0px 0px 0px 4px #177FE6"},"&:not(.Mui-disabled)":{"&:not(.Mui-checked)":{"&:not(.MuiCheckbox-indeterminate)":{color:yoe.GREYSCALE_100_60,"&:hover":{g:{rect:{stroke:yoe.GREYSCALE_0_55,color:yoe.GREYSCALE_0_03}}},"&.sprout-focus-visible i":{boxShadow:"0px 0px 0px 2px #0275D9",g:{rect:{stroke:"none"}}}}}},"&.Mui-disabled":{"& i":{pointerEvents:"auto",cursor:"not-allowed !important",color:yoe.GREYSCALE_0_15,g:{rect:{stroke:"none"}}}}},colorPrimary:{"&.MuiCheckbox-root":{"&:not(.Mui-disabled)":{"&:hover":{color:yoe.GREEN_DARK}}}},colorSecondary:{"&.MuiCheckbox-root":{"&:not(.Mui-disabled)":{color:yoe.GREYSCALE_0_55,"&:hover":{color:yoe.GREYSCALE_25}}}}}},MuiCircularProgress:{defaultProps:{thickness:3,disableShrink:!0}},MuiDialog:{defaultProps:{fullWidth:!0}},MuiDialogActions:{styleOverrides:{root:{padding:"16px"}}},MuiDialogTitle:{styleOverrides:{root:{display:"flex",alignItems:"center",justifyContent:"space-between",boxSizing:"content-box",minHeight:"31px",padding:"16px 16px 16px 24px",fontSize:"16px",lineHeight:"24px"}}},MuiDialogContentText:{defaultProps:{variant:"body2"},styleOverrides:{root:{marginBottom:0}}},MuiDialogContent:{styleOverrides:{root:{padding:"16px 24px !important"}}},MuiDivider:{styleOverrides:{middle:{margin:"4px 8px"}}},MuiLink:{defaultProps:{underline:"none",color:yoe.MISC_FOCUS_BORDER}},MuiListItemIcon:{styleOverrides:{root:{color:yoe.GREYSCALE_25,minWidth:"16px",marginRight:"16px"}}},MuiListItemText:{styleOverrides:{root:{fontSize:"12px"},primary:{fontSize:boe,color:yoe.TEXT_PRIMARY,lineHeight:"16px",fontWeight:Eoe},secondary:{fontSize:_oe,color:yoe.GREYSCALE_45,fontWeight:Coe,lineHeight:"16px"}}},MuiListItem:{styleOverrides:{root:{fontSize:boe,minHeight:"32px"},gutters:{paddingLeft:"12px",paddingRight:"12px"}}},MuiListItemButton:{styleOverrides:{root:{fontSize:boe,height:"32px"}}},MuiListSubheader:{styleOverrides:{root:{'&[role="option"]':{color:yoe.TEXT_PRIMARY,lineHeight:1.33,padding:"4px 12px",fontWeight:600,fontSize:_oe,borderBottom:`solid 1px ${yoe.GREYSCALE_0_15}`,pointerEvents:"none"}}}},MuiList:{styleOverrides:{padding:{paddingTop:"0px",paddingBottom:"0px"}}},MuiMenuItem:{styleOverrides:{root:{fontSize:boe,color:yoe.GREYSCALE_25,height:"32px",'[class*="MuiListItemIcon-root"]':{minWidth:"16px"},"&:hover":{backgroundColor:yoe.GREYSCALE_0_03},"&.Mui-selected":{backgroundColor:"unset","&:hover":{backgroundColor:yoe.GREYSCALE_0_10},"&.Mui-focusVisible":{backgroundColor:yoe.GREYSCALE_0_10},"&:not(.Mui-disabled)":{"&::after":{content:'url(\'data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?>%0A<svg width="8px" height="7px" viewBox="0 0 8 7" version="1.1"%0A xmlns="http://www.w3.org/2000/svg"%0A xmlns:xlink="http://www.w3.org/1999/xlink" aria-labelledby="Tick">%0A <g stroke="none" stroke-width="1" fill-rule="evenodd">%0A <g transform="translate(0.000000, -1.000000)">%0A <path d="M7.51662484,1.29325 C7.12545778,0.90225 6.49218732,0.90225 6.10202068,1.29325 L2.73658335,4.65725 L1.90722914,3.82925 C1.5170625,3.43825 0.883792042,3.43825 0.492624979,3.82925 C0.102458344,4.21925 0.102458344,4.85225 0.492624979,5.24325 L2.02928127,6.77825 C2.4194479,7.16925 3.05271836,7.16925 3.44388542,6.77825 L7.51662484,2.70725 C7.9077919,2.31725 7.9077919,1.68425 7.51662484,1.29325"></path>%0A </g>%0A </g>%0A</svg>%0A\')',fontFamily:"LUI icons",position:"absolute",fontSize:"10px",right:"10px",color:yoe.RED}}},"&.Mui-focusVisible":{backgroundColor:yoe.GREYSCALE_0_03}},divider:{marginTop:"8px",marginBottom:"8px"},gutters:{paddingLeft:"12px",paddingRight:"12px"}}},MuiMenu:{styleOverrides:{list:{paddingTop:"4px",paddingBottom:"4px"},paper:{marginTop:"4px !important",marginBottom:"4px",background:yoe.WHITE,boxShadow:"0 0 0 1px rgba(0,0,0,0.05), 0 4px 10px 0 rgba(0,0,0,0.15) !important",borderRadius:"2px !important"}}},MuiSlider:{styleOverrides:{root:{color:yoe.GREEN,height:"24px","&.Mui-disabled":{color:yoe.GREYSCALE_0_15}},rail:{backgroundColor:yoe.GREYSCALE_0_05,height:"4px",opacity:"1",border:`solid 1px ${yoe.GREYSCALE_0_05}`,borderRadius:woe,boxShadow:`inset 0px 0px 0px 1px ${yoe.GREYSCALE_0_05}`},track:{height:"4px",backgroundColor:"currentColor",opacity:"1",border:`solid 1px ${yoe.GREYSCALE_0_05}`,borderRadius:woe},thumb:{height:"16px",width:"16px",borderRadius:woe,backgroundColor:yoe.WHITE,boxShadow:`0px 1px 2px 0px ${yoe.GREYSCALE_0_15}, 0px 0px 0px 1px ${yoe.GREYSCALE_0_05}`,"&:hover":{borderRadius:woe,boxShadow:`0 2px 4px 0 ${yoe.GREYSCALE_0_30}, 0 0 0 1px ${yoe.GREYSCALE_0_06}`},"&:focus":{boxShadow:`0 1px 2px 0 ${yoe.GREYSCALE_0_15}, 0 0 0 1px ${yoe.GREYSCALE_0_06}, 0 0 0 2px ${yoe.MISC_FOCUS_BORDER}`},"&.Mui-focusVisible":{boxShadow:`0 1px 2px 0 ${yoe.GREYSCALE_0_15}, 0 0 0 1px ${yoe.GREYSCALE_0_06}, 0 0 0 2px ${yoe.MISC_FOCUS_BORDER}`},"&.Mui-disabled":{width:"16px",height:"16px",marginTop:"-5px",marginLeft:"-8px",backgroundColor:yoe.GREYSCALE_90},"& .custom-bar":{height:"8px",width:"1px",backgroundColor:yoe.GREYSCALE_0_30,marginLeft:1,marginRight:1}},mark:{width:"1px",height:"4px",margin:"16px 0px 0px 0px",backgroundColor:yoe.GREYSCALE_0_15},markActive:{opacity:1,backgroundColor:yoe.GREYSCALE_0_15},markLabel:{color:yoe.TEXT_SECONDARY,transform:"translateX(-50%)",top:"35px"},markLabelActive:{color:yoe.TEXT_SECONDARY,transform:"translateX(-50%)",top:"35px"}}},MuiSnackbar:{defaultProps:{anchorOrigin:{vertical:"bottom",horizontal:"center"}}},MuiSnackbarContent:{styleOverrides:{root:{backgroundColor:yoe.WHITE,color:yoe.GREYSCALE_25}}},MuiSwitch:{defaultProps:{color:"primary",size:"small"},styleOverrides:{root:{padding:"10px",width:"60px",height:"40px","& .MuiSwitch-switchBase":{"&:hover":{backgroundColor:"unset"},"&.Mui-checked":{"&:hover":{backgroundColor:"unset"}}}},switchBase:{padding:"12px","&.Mui-disabled":{"&.MuiSwitch-thumb":{backgroundColor:yoe.GREYSCALE_100_50}},"&.Mui-checked + .MuiSwitch-track":{opacity:1},"&.Mui-disabled + .MuiSwitch-track":{opacity:.12},"&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"}},colorPrimary:{"&.sprout-focus-visible + .MuiSwitch-track":{borderColor:yoe.GREEN_PALE,boxShadow:`0 0 0 3px ${eL(yoe.GREEN_PALE,.5)}`}},colorSecondary:{"&.sprout-focus-visible + .MuiSwitch-track":{borderColor:yoe.BLUE_PALE,boxShadow:`0 0 0 3px ${eL(yoe.BLUE_PALE,.5)}`}},track:{opacity:1,backgroundColor:yoe.GREYSCALE_0_15,borderRadius:woe},thumb:{height:"16px",width:"16px",borderRadius:woe,backgroundColor:yoe.GREYSCALE_100},sizeSmall:{height:"32px",width:"52px",padding:"8px 10px","& .MuiSwitch-thumb":{height:"12px",width:"12px"},"& .MuiSwitch-switchBase":{padding:"10px 12px"}}}},MuiTextField:{defaultProps:{margin:"dense",variant:"outlined"},styleOverrides:{root:{marginBottom:0}}},MuiTab:{styleOverrides:{root:{fontSize:boe,fontWeight:Eoe,textTransform:"none",minWidth:"auto",boxSizing:"border-box",paddingBottom:"12px","&:hover":{borderBottom:`2px solid ${yoe.GREYSCALE_80}`,paddingBottom:"10px"},"&.sprout-focus-visible":{boxShadow:`inset 0 0 0 2px ${yoe.MISC_FOCUS_BORDER}`,backgroundColor:yoe.GREYSCALE_0_03,borderRadius:woe},"&.Mui-disabled":{opacity:.3}},textColorPrimary:{color:yoe.GREYSCALE_25,"&.Mui-selected":{color:yoe.GREYSCALE_25}},textColorInherit:{opacity:"unset"},labelIcon:{minWidth:"40px",minHeight:"48px"}}},MuiTabs:{defaultProps:{indicatorColor:"primary",textColor:"primary"},styleOverrides:{root:{fontSize:boe,fontWeight:"bold"},scroller:{height:"100%"},flexContainer:{"&:not(.MuiTabs-flexContainerVertical)":{height:"100%",marginLeft:2,marginRight:2}},indicator:{height:2},scrollButtons:{borderRadius:woe,"&:hover":{backgroundColor:yoe.GREYSCALE_0_03},"&.Mui-disabled":{opacity:"unset","& .MuiSvgIcon-root":{opacity:.3}}},vertical:{padding:"8px",boxSizing:"border-box","& .MuiTabs-indicator":{left:0,right:"unset",transition:"none",clipPath:"inset(12px 0 12px 0)",marginLeft:"1px"},"& .MuiTabs-scrollButtons":{flexDirection:"column",position:"relative","&:first-child":{marginBottom:"4px","&::before":{content:'""',display:"block",width:"100%",height:"1px",borderBottom:`1px solid ${yoe.GREYSCALE_0_15}`,position:"absolute",bottom:0,left:0}},"&:last-child":{marginTop:"4px","&::before":{content:'""',display:"block",width:"100%",height:"1px",borderBottom:`1px solid ${yoe.GREYSCALE_0_15}`,position:"absolute",top:0,left:0}}},"& .MuiTab-root":{fontWeight:"normal",borderRadius:woe,marginBlock:"4px","&:first-child":{marginTop:"0px"},"&:last-child":{marginBottom:"0px"},"&.Mui-selected":{backgroundColor:yoe.GREYSCALE_0_05},"&:hover":{backgroundColor:yoe.GREYSCALE_0_03,borderBottomColor:"transparent"}}}}},MuiTableCell:{styleOverrides:{root:{padding:"0px 8px 0px 16px",borderBottom:`1px solid ${yoe.GREYSCALE_85}`,borderRight:`1px solid ${yoe.GREYSCALE_85}`,height:"39px"},head:{height:"41px",fontWeight:Eoe,backgroundColor:yoe.GREYSCALE_98},paddingCheckbox:{width:"40px",padding:"0px"},paddingNone:{padding:"0px"},sizeSmall:{padding:"0px 8px",height:"29px","&.MuiTableCell-head":{height:"31px"},"&.MuiTableCell-paddingCheckbox":{width:"40px",padding:"0px"}},stickyHeader:{backgroundColor:yoe.GREYSCALE_98,borderBottom:`1px solid ${yoe.GREYSCALE_85}`}}},MuiTableContainer:{styleOverrides:{root:{borderBottom:`1px solid ${yoe.GREYSCALE_85}`,borderTop:`1px solid ${yoe.GREYSCALE_85}`}}},MuiTableHead:{styleOverrides:{root:{backgroundColor:yoe.GREYSCALE_98}}},MuiTableRow:{styleOverrides:{root:{"&.Mui-selected":{backgroundColor:yoe.GREYSCALE_0_05,"&:hover":{backgroundColor:yoe.GREYSCALE_0_03}},"&&:hover":{backgroundColor:yoe.GREYSCALE_0_03}}}},MuiTableSortLabel:{defaultProps:{IconComponent:({className:e})=>Uo.jsx(Toe,{className:e})},styleOverrides:{root:{display:"flex",justifyContent:"space-between","&:hover":{"& icon":{opacity:.5}},"&.Mui-active":{"&& icon":{opacity:1}}},icon:{opacity:0},iconDirectionDesc:{transform:"rotate(180deg)"},iconDirectionAsc:{transform:"rotate(0deg)"}}},MuiTable:{styleOverrides:{root:{borderLeft:`1px solid ${yoe.GREYSCALE_85}`}}},MuiToggleButton:{styleOverrides:{root:{height:32,lineHeight:"16px",width:32,fontSize:boe,borderRadius:woe,padding:"7px 16px",border:`1px solid ${yoe.GREYSCALE_0_15}`,backgroundColor:yoe.GREYSCALE_100_60,color:yoe.GREYSCALE_25,zIndex:1,"&:active":{backgroundColor:yoe.GREYSCALE_0_10,border:`1px solid ${yoe.GREYSCALE_0_30}`},"&:hover":{backgroundColor:yoe.GREYSCALE_0_03,border:`1px solid ${yoe.GREYSCALE_0_30}`},"&.sprout-focus-visible":{backgroundColor:yoe.GREYSCALE_0_03,boxShadow:`0 0 0 1px ${yoe.MISC_FOCUS_BORDER}`,border:`1px solid ${yoe.MISC_FOCUS_BORDER}`,zIndex:2},"&.Mui-selected":{color:yoe.GREYSCALE_25,backgroundColor:yoe.GREYSCALE_0_10,zIndex:2,"&:hover":{backgroundColor:yoe.GREYSCALE_0_10,border:`1px solid ${yoe.GREYSCALE_0_15}`}}},sizeSmall:{fontSize:_oe,height:24,width:24,padding:7},sizeLarge:{fontSize:xoe,height:40,width:40,lineHeight:"20px"}}},MuiToggleButtonGroup:{styleOverrides:{root:{height:"32px",lineHeight:"16px",fontSize:boe,borderRadius:woe}}},MuiToolbar:{defaultProps:{disableGutters:!0},styleOverrides:{root:{display:"flex",flex:1,padding:"0 16px"},dense:{minHeight:"46px",padding:"0 8px"}}},MuiTooltip:{defaultProps:{arrow:!0,enterNextDelay:300,enterDelay:400},styleOverrides:{arrow:{color:yoe.GREYSCALE_20},tooltip:{backgroundColor:yoe.GREYSCALE_20,fontSize:_oe,lineHeight:"16px"},popper:{whiteSpace:"pre-line"}}},...e?{...joe}:{}}),qoe=(e,t)=>Noe(t);var Foe=()=>({mode:"light",primary:{ultraLight:yoe.GREEN_ULTRA_LIGHT,light:yoe.GREEN_PALE,main:yoe.GREEN,dark:yoe.GREEN_DARK,extraDark:yoe.GREEN_EXTRA_DARK,contrastText:yoe.WHITE},secondary:{ultraLight:yoe.BLUE_ULTRA_LIGHT,light:yoe.BLUE_PALE,main:yoe.BLUE,dark:yoe.BLUE_DARK,extraDark:yoe.BLUE_EXTRA_DARK,contrastText:yoe.WHITE},error:{ultraLight:yoe.RED_ULTRA_LIGHT,light:yoe.RED_PALE,main:yoe.RED,dark:yoe.RED_DARK,extraDark:yoe.RED_EXTRA_DARK,contrastText:yoe.WHITE},warning:{ultraLight:yoe.ORANGE_ULTRA_LIGHT,light:yoe.ORANGE_PALE,main:yoe.ORANGE,dark:yoe.ORANGE_DARK,extraDark:yoe.ORANGE_EXTRA_DARK,contrastText:yoe.WHITE},success:{ultraLight:yoe.GREEN_ULTRA_LIGHT,light:yoe.GREEN_PALE,main:yoe.GREEN,dark:yoe.GREEN_DARK,extraDark:yoe.GREEN_EXTRA_DARK,contrastText:yoe.WHITE},info:{ultraLight:yoe.BLUE_ULTRA_LIGHT,light:yoe.BLUE_PALE,main:yoe.BLUE,dark:yoe.BLUE_DARK,extraDark:yoe.BLUE_EXTRA_DARK,contrastText:yoe.WHITE},text:{primary:yoe.TEXT_PRIMARY,secondary:yoe.TEXT_SECONDARY,disabled:yoe.GREYSCALE_0_30},action:{hover:yoe.GREYSCALE_0_03,hoverOpacity:.03,selected:yoe.GREYSCALE_0_05,selectedOpacity:.05,focus:yoe.MISC_FOCUS_BORDER},amethyst:{ultraLight:yoe.WHITE,main:yoe.PURPLE,light:yoe.PURPLE_PALE,dark:yoe.PURPLE_DARK,extraDark:yoe.GREYSCALE_0_0,contrastText:yoe.WHITE},background:{paper:yoe.WHITE,default:yoe.GREYSCALE_95},divider:yoe.GREYSCALE_0_15});var Woe=e=>Foe();var Boe=(e,t=!1)=>({components:qoe(0,t),palette:Woe(e),breakpoints:{keys:["xs","sm","md","lg","xl"],values:{xs:0,sm:600,md:960,lg:1280,xl:1920}},spacing:8,shadows:["none","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)"],transitions:{easing:{easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},duration:{standard:300,short:250,enteringScreen:225,shorter:200,leavingScreen:195,shortest:150,complex:375}},typography:{fontSize:boe,fontWeightLight:Soe,fontWeightRegular:Coe,fontWeightMedium:Eoe,fontWeightBold:koe,htmlFontSize:boe,fontFamily:Moe.FONT_FAMILY,button:{fontWeight:Eoe,fontSize:boe,textTransform:"none"},body1:{fontSize:xoe,lineHeight:"24px"},body2:{fontSize:boe,lineHeight:"20px"},h1:{fontSize:32,lineHeight:"32px"},h2:{fontSize:28,lineHeight:"32px"},h3:{fontSize:voe,lineHeight:"24px"},h4:{fontSize:20,lineHeight:"24px"},h5:{fontSize:xoe,fontWeight:Eoe,lineHeight:"16px"},h6:{fontSize:boe,fontWeight:Eoe,lineHeight:"16px"},caption:{color:yoe.TEXT_SECONDARY},subtitle1:{fontSize:boe,color:yoe.TEXT_SECONDARY},subtitle2:{fontSize:_oe,color:yoe.TEXT_SECONDARY}},shape:{borderRadius:woe}}),$oe={},Hoe={exports:{}},Voe={exports:{}};!function(e){function t(n){return e.exports=t="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.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(Voe);var Goe=Voe.exports;!function(e){var t=Goe.default;function n(r,o){if("function"==typeof WeakMap)var i=new WeakMap,a=new WeakMap;return(e.exports=n=function(e,n){if(!n&&e&&e.__esModule)return e;var r,o,s={__proto__:null,default:e};if(null===e||"object"!=t(e)&&"function"!=typeof e)return s;if(r=n?a:i){if(r.has(e))return r.get(e);r.set(e,s)}for(var l in e)"default"!==l&&{}.hasOwnProperty.call(e,l)&&((o=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,l))&&(o.get||o.set)?r(s,l,o):s[l]=e[l]);return s},e.exports.__esModule=!0,e.exports.default=e.exports)(r,o)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}(Hoe);var Uoe=Hoe.exports,Yoe={},Koe=Pe(wh);Object.defineProperty(Yoe,"__esModule",{value:!0}),Yoe.hexToRgb=Zoe,Yoe.rgbToHex=function(e){if(0===e.indexOf("#"))return e;var t=eie(e),n=t.values;return"#".concat(n.map((function(e){return function(e){var t=e.toString(16);return 1===t.length?"0".concat(t):t}(e)})).join(""))},Yoe.hslToRgb=Qoe,Yoe.decomposeColor=eie,Yoe.recomposeColor=tie,Yoe.getContrastRatio=function(e,t){var n=nie(e),r=nie(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)},Yoe.getLuminance=nie,Yoe.emphasize=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return nie(e)>.5?oie(e,t):iie(e,t)},Yoe.fade=function(e,t){return rie(e,t)},Yoe.alpha=rie,Yoe.darken=oie,Yoe.lighten=iie;var Xoe=Koe;function Joe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),n)}function Zoe(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}function Qoe(e){var t=(e=eie(e)).values,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return o-i*Math.max(Math.min(t-3,9-t,1),-1)},s="rgb",l=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",l.push(t[3])),tie({type:s,values:l})}function eie(e){if(e.type)return e;if("#"===e.charAt(0))return eie(Zoe(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error((0,Xoe.formatMuiErrorMessage)(3,e));var r=e.substring(t+1,e.length-1).split(",");return r=r.map((function(e){return parseFloat(e)})),{type:n,values:r}}function tie(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")?n=n.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function nie(e){var t="hsl"===(e=eie(e)).type?eie(Qoe(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function rie(e,t){return e=eie(e),t=Joe(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,tie(e)}function oie(e,t){if(e=eie(e),t=Joe(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return tie(e)}function iie(e,t){if(e=eie(e),t=Joe(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return tie(e)}var aie,sie,lie,cie={},uie={exports:{}},die={exports:{}},pie={exports:{}};function hie(){return aie||(aie=1,function(e){var t=Goe.default;e.exports=function(e,n){if("object"!=t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,n||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports}(pie)),pie.exports}function fie(){return sie||(sie=1,function(e){var t=Goe.default,n=hie();e.exports=function(e){var r=n(e,"string");return"symbol"==t(r)?r:r+""},e.exports.__esModule=!0,e.exports.default=e.exports}(die)),die.exports}function mie(){return lie||(lie=1,function(e){var t=fie();e.exports=function(e,n,r){return(n=t(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports}(uie)),uie.exports}var gie,yie={exports:{}};function _ie(){return gie||(gie=1,function(e){var t=sD();e.exports=function(e,n){if(null==e)return{};var r,o,i=t(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],-1===n.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i},e.exports.__esModule=!0,e.exports.default=e.exports}(yie)),yie.exports}var bie,xie={};var vie,wie={};var Sie,Cie={},Eie={};var kie,Mie={};var Rie,Aie={};var Iie,Pie={};var Oie,Lie={};var Die,Tie={};var zie,jie={};var Nie,qie,Fie={};function Wie(){if(qie)return Cie;qie=1;var e=hL;Object.defineProperty(Cie,"__esModule",{value:!0}),Cie.default=function(e){var g=e.primary,y=void 0===g?{light:a.default[300],main:a.default[500],dark:a.default[700]}:g,_=e.secondary,b=void 0===_?{light:s.default.A200,main:s.default.A400,dark:s.default.A700}:_,x=e.error,v=void 0===x?{light:l.default[300],main:l.default[500],dark:l.default[700]}:x,w=e.warning,S=void 0===w?{light:c.default[300],main:c.default[500],dark:c.default[700]}:w,C=e.info,E=void 0===C?{light:u.default[300],main:u.default[500],dark:u.default[700]}:C,k=e.success,M=void 0===k?{light:d.default[300],main:d.default[500],dark:d.default[700]}:k,R=e.type,A=void 0===R?"light":R,I=e.contrastThreshold,P=void 0===I?3:I,O=e.tonalOffset,L=void 0===O?.2:O,D=(0,n.default)(e,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function T(e){return(0,p.getContrastRatio)(e,f.text.primary)>=P?f.text.primary:h.text.primary}var z=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;if(!(e=(0,t.default)({},e)).main&&e[n]&&(e.main=e[n]),!e.main)throw new Error((0,r.formatMuiErrorMessage)(4,n));if("string"!=typeof e.main)throw new Error(_formatMuiErrorMessage(5,JSON.stringify(e.main)));return m(e,"light",o,L),m(e,"dark",i,L),e.contrastText||(e.contrastText=T(e.main)),e},j={dark:f,light:h},N=(0,r.deepmerge)((0,t.default)({common:o.default,type:A,primary:z(y),secondary:z(b,"A400","A200","A700"),error:z(v),warning:z(S),info:z(E),success:z(M),grey:i.default,contrastThreshold:P,getContrastText:T,augmentColor:z,tonalOffset:L},j[A]),D);return N},Cie.dark=Cie.light=void 0;var t=e(oD()),n=e(_ie()),r=Koe,o=e(function(){if(Sie)return Eie;Sie=1,Object.defineProperty(Eie,"__esModule",{value:!0}),Eie.default=void 0;var e={black:"#000",white:"#fff"};return Eie.default=e,Eie}()),i=e(function(){if(kie)return Mie;kie=1,Object.defineProperty(Mie,"__esModule",{value:!0}),Mie.default=void 0;var e={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"};return Mie.default=e,Mie}()),a=e(function(){if(Rie)return Aie;Rie=1,Object.defineProperty(Aie,"__esModule",{value:!0}),Aie.default=void 0;var e={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"};return Aie.default=e,Aie}()),s=e(function(){if(Iie)return Pie;Iie=1,Object.defineProperty(Pie,"__esModule",{value:!0}),Pie.default=void 0;var e={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"};return Pie.default=e,Pie}()),l=e(function(){if(Oie)return Lie;Oie=1,Object.defineProperty(Lie,"__esModule",{value:!0}),Lie.default=void 0;var e={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"};return Lie.default=e,Lie}()),c=e(function(){if(Die)return Tie;Die=1,Object.defineProperty(Tie,"__esModule",{value:!0}),Tie.default=void 0;var e={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"};return Tie.default=e,Tie}()),u=e(function(){if(zie)return jie;zie=1,Object.defineProperty(jie,"__esModule",{value:!0}),jie.default=void 0;var e={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"};return jie.default=e,jie}()),d=e(function(){if(Nie)return Fie;Nie=1,Object.defineProperty(Fie,"__esModule",{value:!0}),Fie.default=void 0;var e={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};return Fie.default=e,Fie}()),p=Yoe,h={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:o.default.white,default:i.default[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}};Cie.light=h;var f={text:{primary:o.default.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:i.default[800],default:"#303030"},action:{active:o.default.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function m(e,t,n,r){var o=r.light||r,i=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=(0,p.lighten)(e.main,o):"dark"===t&&(e.dark=(0,p.darken)(e.main,i)))}return Cie.dark=f,Cie}var Bie,$ie={};var Hie,Vie={};var Gie,Uie={};var Yie,Kie={},Xie=Pe(cm);var Jie,Zie={};function Qie(){if(Jie)return Zie;Jie=1;var e=hL;Object.defineProperty(Zie,"__esModule",{value:!0}),Zie.default=Zie.duration=Zie.easing=void 0;var t=e(_ie()),n={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"};Zie.easing=n;var r={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function o(e){return"".concat(Math.round(e),"ms")}Zie.duration=r;var i={easing:n,duration:r,create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=i.duration,s=void 0===a?r.standard:a,l=i.easing,c=void 0===l?n.easeInOut:l,u=i.delay,d=void 0===u?0:u;return(0,t.default)(i,["duration","easing","delay"]),(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"==typeof s?s:o(s)," ").concat(c," ").concat("string"==typeof d?d:o(d))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}};return Zie.default=i,Zie}var eae,tae,nae={};function rae(){if(tae)return cie;tae=1;var e=hL;Object.defineProperty(cie,"__esModule",{value:!0}),cie.createMuiTheme=function(){return p.apply(void 0,arguments)},cie.default=void 0,e(mie());var t=e(_ie()),n=Koe,r=e(function(){if(bie)return xie;bie=1;var e=hL;Object.defineProperty(xie,"__esModule",{value:!0}),xie.default=function(e){var o=e.values,i=void 0===o?{xs:0,sm:600,md:960,lg:1280,xl:1920}:o,a=e.unit,s=void 0===a?"px":a,l=e.step,c=void 0===l?5:l,u=(0,n.default)(e,["values","unit","step"]);function d(e){var t="number"==typeof i[e]?i[e]:e;return"@media (min-width:".concat(t).concat(s,")")}function p(e,t){var n=r.indexOf(t);return n===r.length-1?d(e):"@media (min-width:".concat("number"==typeof i[e]?i[e]:e).concat(s,") and ")+"(max-width:".concat((-1!==n&&"number"==typeof i[r[n+1]]?i[r[n+1]]:t)-c/100).concat(s,")")}return(0,t.default)({keys:r,values:i,up:d,down:function(e){var t=r.indexOf(e)+1,n=i[r[t]];return t===r.length?d("xs"):"@media (max-width:".concat(("number"==typeof n&&t>0?n:e)-c/100).concat(s,")")},between:p,only:function(e){return p(e,e)},width:function(e){return i[e]}},u)},xie.keys=void 0;var t=e(oD()),n=e(_ie()),r=["xs","sm","md","lg","xl"];return xie.keys=r,xie}()),o=e(function(){if(vie)return wie;vie=1;var e=hL;Object.defineProperty(wie,"__esModule",{value:!0}),wie.default=function(e,r,o){var i;return(0,n.default)({gutters:function(){var o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return console.warn(["Material-UI: theme.mixins.gutters() is deprecated.","You can use the source of the mixin directly:","\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n [theme.breakpoints.up('sm')]: {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3),\n },\n "].join("\n")),(0,n.default)({paddingLeft:r(2),paddingRight:r(2)},o,(0,t.default)({},e.up("sm"),(0,n.default)({paddingLeft:r(3),paddingRight:r(3)},o[e.up("sm")])))},toolbar:(i={minHeight:56},(0,t.default)(i,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),(0,t.default)(i,e.up("sm"),{minHeight:64}),i)},o)};var t=e(mie()),n=e(oD());return wie}()),i=e(Wie()),a=e(function(){if(Bie)return $ie;Bie=1;var e=hL;Object.defineProperty($ie,"__esModule",{value:!0}),$ie.default=function(e,l){var c="function"==typeof l?l(e):l,u=c.fontFamily,d=void 0===u?s:u,p=c.fontSize,h=void 0===p?14:p,f=c.fontWeightLight,m=void 0===f?300:f,g=c.fontWeightRegular,y=void 0===g?400:g,_=c.fontWeightMedium,b=void 0===_?500:_,x=c.fontWeightBold,v=void 0===x?700:x,w=c.htmlFontSize,S=void 0===w?16:w,C=c.allVariants,E=c.pxToRem,k=(0,n.default)(c,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),M=h/14,R=E||function(e){return"".concat(e/S*M,"rem")},A=function(e,n,r,i,a){return(0,t.default)({fontFamily:d,fontWeight:e,fontSize:R(n),lineHeight:r},d===s?{letterSpacing:"".concat(o(i/n),"em")}:{},a,C)},I={h1:A(m,96,1.167,-1.5),h2:A(m,60,1.2,-.5),h3:A(y,48,1.167,0),h4:A(y,34,1.235,.25),h5:A(y,24,1.334,0),h6:A(b,20,1.6,.15),subtitle1:A(y,16,1.75,.15),subtitle2:A(b,14,1.57,.1),body1:A(y,16,1.5,.15),body2:A(y,14,1.43,.15),button:A(b,14,1.75,.4,a),caption:A(y,12,1.66,.4),overline:A(y,12,2.66,1,a)};return(0,r.deepmerge)((0,t.default)({htmlFontSize:S,pxToRem:R,round:i,fontFamily:d,fontSize:h,fontWeightLight:m,fontWeightRegular:y,fontWeightMedium:b,fontWeightBold:v},I),k,{clone:!1})};var t=e(oD()),n=e(_ie()),r=Koe;function o(e){return Math.round(1e5*e)/1e5}function i(e){return o(e)}var a={textTransform:"uppercase"},s='"Roboto", "Helvetica", "Arial", sans-serif';return $ie}()),s=e(function(){if(Hie)return Vie;function e(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}Hie=1,Object.defineProperty(Vie,"__esModule",{value:!0}),Vie.default=void 0;var t=["none",e(0,2,1,-1,0,1,1,0,0,1,3,0),e(0,3,1,-2,0,2,2,0,0,1,5,0),e(0,3,3,-2,0,3,4,0,0,1,8,0),e(0,2,4,-1,0,4,5,0,0,1,10,0),e(0,3,5,-1,0,5,8,0,0,1,14,0),e(0,3,5,-1,0,6,10,0,0,1,18,0),e(0,4,5,-2,0,7,10,1,0,2,16,1),e(0,5,5,-3,0,8,10,1,0,3,14,2),e(0,5,6,-3,0,9,12,1,0,3,16,2),e(0,6,6,-3,0,10,14,1,0,4,18,3),e(0,6,7,-4,0,11,15,1,0,4,20,3),e(0,7,8,-4,0,12,17,2,0,5,22,4),e(0,7,8,-4,0,13,19,2,0,5,24,4),e(0,7,9,-4,0,14,21,2,0,5,26,4),e(0,8,9,-5,0,15,22,2,0,6,28,5),e(0,8,10,-5,0,16,24,2,0,6,30,5),e(0,8,11,-5,0,17,26,2,0,6,32,5),e(0,9,11,-5,0,18,28,2,0,7,34,6),e(0,9,12,-6,0,19,29,2,0,7,36,6),e(0,10,13,-6,0,20,31,3,0,8,38,7),e(0,10,13,-6,0,21,33,3,0,8,40,7),e(0,10,14,-6,0,22,35,3,0,8,42,7),e(0,11,14,-7,0,23,36,3,0,9,44,8),e(0,11,15,-7,0,24,38,3,0,9,46,8)];return Vie.default=t,Vie}()),l=e(function(){if(Gie)return Uie;Gie=1,Object.defineProperty(Uie,"__esModule",{value:!0}),Uie.default=void 0;var e={borderRadius:4};return Uie.default=e,Uie}()),c=e(function(){if(Yie)return Kie;Yie=1,Object.defineProperty(Kie,"__esModule",{value:!0}),Kie.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(t.mui)return t;var n=(0,e.createUnarySpacing)({spacing:t}),r=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return 0===t.length?n(1):1===t.length?n(t[0]):t.map((function(e){if("string"==typeof e)return e;var t=n(e);return"number"==typeof t?"".concat(t,"px"):t})).join(" ")};return Object.defineProperty(r,"unit",{get:function(){return t}}),r.mui=!0,r};var e=Xie;return Kie}()),u=e(Qie()),d=e(function(){if(eae)return nae;eae=1,Object.defineProperty(nae,"__esModule",{value:!0}),nae.default=void 0;var e={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};return nae.default=e,nae}());function p(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},p=e.breakpoints,h=void 0===p?{}:p,f=e.mixins,m=void 0===f?{}:f,g=e.palette,y=void 0===g?{}:g,_=e.spacing,b=e.typography,x=void 0===b?{}:b,v=(0,t.default)(e,["breakpoints","mixins","palette","spacing","typography"]),w=(0,i.default)(y),S=(0,r.default)(h),C=(0,c.default)(_),E=(0,n.deepmerge)({breakpoints:S,direction:"ltr",mixins:(0,o.default)(S,C,m),overrides:{},palette:w,props:{},shadows:s.default,typography:(0,a.default)(w,x),spacing:C,shape:l.default,transitions:u.default,zIndex:d.default},v),k=arguments.length,M=new Array(k>1?k-1:0),R=1;R<k;R++)M[R-1]=arguments[R];return E=M.reduce((function(e,t){return(0,n.deepmerge)(e,t)}),E)}var h=p;return cie.default=h,cie}var oae,iae={};var aae,sae={},lae=Pe(sb);var cae,uae,dae={},pae={};function hae(){if(cae)return pae;cae=1;var e=hL;Object.defineProperty(pae,"__esModule",{value:!0}),pae.default=void 0;var t=(0,e(rae()).default)();return pae.default=t,pae}var fae,mae,gae={},yae={};function _ae(){if(mae)return gae;mae=1;var e=hL;Object.defineProperty(gae,"__esModule",{value:!0}),gae.default=function(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=o.breakpoints,a=void 0===i?["sm","md","lg"]:i,s=o.disableAlign,l=void 0!==s&&s,c=o.factor,u=void 0===c?2:c,d=o.variants,p=void 0===d?["h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","caption","button","overline"]:d,h=(0,t.default)({},e);h.typography=(0,t.default)({},h.typography);var f=h.typography,m=(0,r.convertLength)(f.htmlFontSize),g=a.map((function(e){return h.breakpoints.values[e]}));return p.forEach((function(e){var o=f[e],i=parseFloat(m(o.fontSize,"rem"));if(!(i<=1)){var a=i,s=1+(a-1)/u,c=o.lineHeight;if(!(0,r.isUnitless)(c)&&!l)throw new Error((0,n.formatMuiErrorMessage)(6));(0,r.isUnitless)(c)||(c=parseFloat(m(c,"rem"))/parseFloat(i));var d=null;l||(d=function(e){return(0,r.alignProperty)({size:e,grid:(0,r.fontGrid)({pixels:4,lineHeight:c,htmlFontSize:f.htmlFontSize})})}),f[e]=(0,t.default)({},o,(0,r.responsiveProperty)({cssProperty:"fontSize",min:s,max:a,unit:"rem",breakpoints:g,transform:d}))}})),h};var t=e(oD()),n=Koe,r=function(){if(fae)return yae;fae=1;var e=hL;Object.defineProperty(yae,"__esModule",{value:!0}),yae.isUnitless=function(e){return String(parseFloat(e)).length===String(e).length},yae.getUnit=n,yae.toUnitless=r,yae.convertLength=function(e){return function(t,o){var i=n(t);if(i===o)return t;var a=r(t);if("px"!==i)if("em"===i)a=r(t)*r(e);else if("rem"===i)return a=r(t)*r(e),t;var s=a;if("px"!==o)if("em"===o)s=a/r(e);else{if("rem"!==o)return t;s=a/r(e)}return parseFloat(s.toFixed(5))+o}},yae.alignProperty=function(e){var t=e.size,n=e.grid,r=t-t%n,o=r+n;return t-r<o-t?r:o},yae.fontGrid=function(e){var t=e.lineHeight;return e.pixels/(t*e.htmlFontSize)},yae.responsiveProperty=function(e){var n=e.cssProperty,r=e.min,o=e.max,i=e.unit,a=void 0===i?"rem":i,s=e.breakpoints,l=void 0===s?[600,960,1280]:s,c=e.transform,u=void 0===c?null:c,d=(0,t.default)({},n,"".concat(r).concat(a)),p=(o-r)/l[l.length-1];return l.forEach((function(e){var o=r+p*e;null!==u&&(o=u(o)),d["@media (min-width:".concat(e,"px)")]=(0,t.default)({},n,"".concat(Math.round(1e4*o)/1e4).concat(a))})),d};var t=e(mie());function n(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function r(e){return parseFloat(e)}return yae}();return gae}var bae,xae={};var vae,wae={};var Sae,Cae={};var Eae,kae={};!function(e){var n=hL,r=Uoe;Object.defineProperty(e,"__esModule",{value:!0});var o={createTheme:!0,createMuiTheme:!0,unstable_createMuiStrictModeTheme:!0,createStyles:!0,makeStyles:!0,responsiveFontSizes:!0,styled:!0,useTheme:!0,withStyles:!0,withTheme:!0,createGenerateClassName:!0,jssPreset:!0,ServerStyleSheets:!0,StylesProvider:!0,MuiThemeProvider:!0,ThemeProvider:!0};Object.defineProperty(e,"createTheme",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"createMuiTheme",{enumerable:!0,get:function(){return a.createMuiTheme}}),Object.defineProperty(e,"unstable_createMuiStrictModeTheme",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"createStyles",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,"makeStyles",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"responsiveFontSizes",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"styled",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(e,"useTheme",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(e,"withStyles",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"withTheme",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(e,"createGenerateClassName",{enumerable:!0,get:function(){return g.createGenerateClassName}}),Object.defineProperty(e,"jssPreset",{enumerable:!0,get:function(){return g.jssPreset}}),Object.defineProperty(e,"ServerStyleSheets",{enumerable:!0,get:function(){return g.ServerStyleSheets}}),Object.defineProperty(e,"StylesProvider",{enumerable:!0,get:function(){return g.StylesProvider}}),Object.defineProperty(e,"MuiThemeProvider",{enumerable:!0,get:function(){return g.ThemeProvider}}),Object.defineProperty(e,"ThemeProvider",{enumerable:!0,get:function(){return g.ThemeProvider}});var i=Yoe;Object.keys(i).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(o,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return i[t]}}))}));var a=r(rae()),s=n(function(){if(oae)return iae;oae=1;var e=hL;Object.defineProperty(iae,"__esModule",{value:!0}),iae.default=function(e){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return n.default.apply(void 0,[(0,t.deepmerge)({unstable_strictMode:!0},e)].concat(o))};var t=Koe,n=e(rae());return iae}()),l=n(function(){if(aae)return sae;aae=1,Object.defineProperty(sae,"__esModule",{value:!0}),sae.default=function(t){return(0,e.createStyles)(t)};var e=lae;return sae}()),c=n(function(){if(uae)return dae;uae=1;var e=hL;Object.defineProperty(dae,"__esModule",{value:!0}),dae.default=void 0;var t=e(oD()),n=lae,r=e(hae()),o=function(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,n.makeStyles)(e,(0,t.default)({defaultTheme:r.default},o))};return dae.default=o,dae}()),u=n(_ae()),d=n(function(){if(bae)return xae;bae=1;var e=hL;Object.defineProperty(xae,"__esModule",{value:!0}),xae.default=void 0;var t=e(oD()),n=lae,r=e(hae()),o=function(e){var o=(0,n.styled)(e);return function(e,n){return o(e,(0,t.default)({defaultTheme:r.default},n))}};return xae.default=o,xae}()),p=Qie();Object.keys(p).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(o,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return p[t]}}))}));var h=n(function(){if(vae)return wae;vae=1;var e=hL;Object.defineProperty(wae,"__esModule",{value:!0}),wae.default=function(){return(0,n.useTheme)()||r.default};var n=lae;e(t);var r=e(hae());return wae}()),f=n(function(){if(Sae)return Cae;Sae=1;var e=hL;Object.defineProperty(Cae,"__esModule",{value:!0}),Cae.default=void 0;var t=e(oD()),n=lae,r=e(hae()),o=function(e,o){return(0,n.withStyles)(e,(0,t.default)({defaultTheme:r.default},o))};return Cae.default=o,Cae}()),m=n(function(){if(Eae)return kae;Eae=1;var e=hL;Object.defineProperty(kae,"__esModule",{value:!0}),kae.default=void 0;var t=lae,n=e(hae()),r=(0,t.withThemeCreator)({defaultTheme:n.default});return kae.default=r,kae}()),g=lae}($oe),$oe.alpha(yoe.GREYSCALE_0,.05),$oe.alpha(yoe.GREEN_PALE,.5),$oe.alpha(yoe.BLUE_PALE,.5),$oe.alpha(yoe.GREEN_PALE,.5),$oe.alpha(yoe.BLUE_PALE,.5),$oe.alpha(yoe.GREEN_PALE,.5),$oe.alpha(yoe.BLUE_PALE,.5),$oe.alpha(yoe.GREEN_PALE,.5),$oe.alpha(yoe.BLUE_PALE,.5),$oe.alpha(yoe.GREEN_PALE,.5),$oe.alpha(yoe.BLUE_PALE,.5);function Mae(e){const t=((e="light",t=!1)=>Boe(e,t))();return t?.components?.MuiTable?.styleOverrides&&(t.components.MuiTable.styleOverrides.root={}),ZL({...t,direction:e})}var Rae=function(e){return e.FontSize="fontSize",e.FontFamily="fontFamily",e.FontColor="fontColor",e.FontStyle="fontStyle",e.Background="background",e.LineClamp="lineClamp",e.ColumnLineClamp="columnLineClamp",e.Border="border",e.Divider="divider",e}(Rae||{}),Aae=function(e){return e.Dimension="object.pivotTableV2.dimension",e.Measure="object.pivotTableV2.measure",e.Total="object.pivotTableV2.total",e.Null="object.pivotTableV2.null",e.Grid="object.pivotTableV2",e}(Aae||{}),Iae=function(e){return e.Grid="grid",e.Divider="grid.divider",e.LabelName="label.name",e.LabelValue="label.value",e}(Iae||{}),Pae=function(e){return e.FontSize="fontSize",e.FontFamily="fontFamily",e.FontColor="color",e.BackgroundColor="backgroundColor",e.LineClamp="lineClamp",e.ColumnLineClamp="columnLineClamp",e.BorderColor="borderColor",e}(Pae||{});const Oae=e=>e?`${parseInt(e,10)}px`:void 0,Lae=(e,t)=>{if(t){const n=e.getColorPickerColor(t);return"none"===n?l$.Transparent:n}},Dae=(e,t)=>+(parseInt(e,10)*s$*t+8).toFixed(2),Tae=(e,t)=>void 0===e?t:e.some((e=>"bold"===e))?i$:"normal",zae=e=>e?.some((e=>"italic"===e))?"italic":"normal",jae=e=>e?.some((e=>"underline"===e))?"underline":"none",Nae=document.createElement("textarea");function qae(e){Nae.value=e,document.body.appendChild(Nae),Nae.select(),Nae.setSelectionRange(0,Nae.value.length),document.execCommand("copy"),document.body.removeChild(Nae)}Nae.style.position="absolute",Nae.style.left="-9999px",Nae.setAttribute("readonly","");function Fae(e){P?.(((t,n)=>{const r=n.target,o=r?.closest(`.${dN}`);o?.title&&t.addItem({translation:"contextMenu.copyCellValue",icon:"lui-icon lui-icon--copy",tid:"copy-cell-context-item",id:"copy-cell-context-item",select:async()=>{(e=>{const t=e.title;t&&(navigator.clipboard?.writeText?navigator.clipboard.writeText(t).catch((()=>{qae(t)})):qae(t))})(o)}}),e?.forEach((e=>{e(t,n,o)}))}))}const Wae=({model:e,layoutService:t,effectivePropertiesService:n,translator:r})=>R$(((o,i,a)=>{if(!e||n.qAlwaysFullyExpanded)return;const s=e,l=o.addItem({translation:"Object.PivotTable.ContextMenu.ExpandCollapse",tid:"expand-collapse-group",id:"expand-collapse-group"}),{qEffectiveDimensionName:c,label:u}=((e,t)=>{const n=((e,t)=>{const n=e?.getAttribute("data-dimension-info-index");if("string"==typeof n)return t.getDimensionInfo(+n)})(e,t);return"object"==typeof n?{qEffectiveDimensionName:n.qEffectiveDimensionName,label:n.qFallbackTitle}:{qEffectiveDimensionName:void 0,label:void 0}})(a,t);l.addItem((e=>({icon:"lui-icon lui-icon--plus",translation:"Object.PivotTable.ContextMenu.ExpandAll",tid:"expand-all",select:async()=>{try{await e.expandTop(EV,0,0,!0),await e.expandLeft(EV,0,0,!0)}catch(e){console.error("Failed to expand all",e)}}}))(s)),"string"==typeof c&&l.addItem((({model:e,effectivePropertiesService:t,qEffectiveDimensionName:n,label:r,translator:o})=>({icon:"lui-icon lui-icon--plus",translation:o.get("SNPivotTable.ContextMenu.ExpandDimension",[r??""]),tid:"expand-dimension",id:"expand-dimension",select:MX({model:e,qExpansionState:t.qExpansionState,qEffectiveDimensionName:n,action:CX.Expand})}))({model:s,effectivePropertiesService:n,qEffectiveDimensionName:c,label:u,translator:r})),l.addItem((e=>({icon:"lui-icon lui-icon--minus",translation:"Object.PivotTable.ContextMenu.CollapseAll",tid:"collapse-all",select:async()=>{try{await e.collapseTop(EV,0,0,!0),await e.collapseLeft(EV,0,0,!0)}catch(e){console.error("Failed to collapse all",e)}}}))(s)),"string"==typeof c&&l.addItem((({model:e,effectivePropertiesService:t,qEffectiveDimensionName:n,label:r,translator:o})=>({icon:"lui-icon lui-icon--minus",translation:o.get("SNPivotTable.ContextMenu.CollapseDimension",[r??""]),tid:"collapse-dimension",id:"collapse-dimension",select:MX({model:e,qExpansionState:t.qExpansionState,qEffectiveDimensionName:n,action:CX.Collapse})}))({model:s,effectivePropertiesService:n,qEffectiveDimensionName:c,label:u,translator:r}))}),[e,t,n]),Bae=(e,t)=>C((()=>(({layout:e})=>{const{qHyperCube:t,nullValueRepresentation:n,snapshotData:r}=e,{qNoOfLeftDims:o,qEffectiveInterColumnSortOrder:i,qMeasureInfo:a,qDimensionInfo:s}=t,l=!!r,c=r?.content?.rowsPerPage??15e3,u={x:Math.min(e.qHyperCube.qSize.qcx,a$),y:Math.min(e.qHyperCube.qSize.qcy,c)},d=i.slice(0,o),p=e=>d.some((t=>t===e)),h=p(kV),f=new Map(i.map((e=>[s[e]??kV,e]))),m=a.filter((e=>7005!==e.qError?.qErrorCode));return{layout:e,getNullValueText:()=>n?.text??"-",getMeasureInfoIndexFromCellIndex:(e,t=!1)=>{if(h)return 0;const n=e%m.length;return t?n:a.findIndex((e=>e===m[n]))},getDimensionInfo:e=>e===kV?void 0:s.at(e),getDimensionInfoIndex:e=>f.get(e)??-1,size:u,isSnapshot:l,hasLimitedData:!l&&u.x<e.qHyperCube.qSize.qcx,hasData:u.x>0&&u.y>0,hasLeftDimensions:0!==e.qHyperCube.qNoOfLeftDims,hasPseudoDimOnLeft:h,leftDimensionInfoIndexes:d,isLeftDimension:p,triggerdByExpandOrCollapse:!!e.qHyperCube.qLastExpandedPos,visibleMeasureInfo:m,isIndentModeEnabled:Boolean(e.qHyperCube.qIndentMode),indentModeColumnWidth:e.qHyperCube.indentModeColumnWidth??{type:gN.Auto,pixels:mN.PixelsDefault,percentage:mN.PercentageDefault},searchSortFromDimension:"inherit"===e.search?.sorting}})({layout:e})),[e,t]),$ae=({model:e,layoutService:t,viewService:n,pageInfo:r,rect:o})=>{const{layout:i,isSnapshot:a,triggerdByExpandOrCollapse:s}=t,l=(e=>{const t=I$(e);return t.current=e,t})(tU(o));return j$((async()=>{const{qHyperCube:t}=i,{maxNumberOfVisibleRows:o,maxNumberOfVisibleColumns:c}=l.current;if(a)return i.snapshotData?.content?.qPivotDataPages??[];if(void 0!==e&&"getHyperCubePivotData"in e&&(((e,t,n,r)=>!!e&&(t.gridColumnStartIndex+t.gridWidth>=r||t.gridRowStartIndex+t.gridHeight>=n))(s,n,o,c)||((e,t,n,r)=>{const{qHyperCube:{qPivotDataPages:o,qSize:i}}=e,{qTop:a,qWidth:s,qHeight:l}=o[0]?.qArea??{qTop:0,qWidth:0,qHeight:0};return a<t.page*t.rowsPerPage||s<Math.min(r,i.qcx)||l<Math.min(n,i.qcy)})(i,r,o,c))){const t=((e,t,n,r,o,i)=>{const a=r.page*r.rowsPerPage,s=Math.min(a+r.rowsPerPage,n.qcy),l=Math.min(a$,n.qcx);if(n.qcy<a)return null;let c=0,u=a;if(e){c=t.gridColumnStartIndex,u=a+t.gridRowStartIndex;const e=u+t.gridHeight,n=t.gridColumnStartIndex+t.gridWidth;e>s&&(u=Math.max(0,s-o)),n>l&&(c=Math.max(0,l-i))}return{qLeft:c,qTop:u,qWidth:Math.min(l-c,i),qHeight:Math.min(s-u,o)}})(s,n,i.qHyperCube.qSize,r,o,c);return t?e.getHyperCubePivotData(EV,nU(t)):[]}return t.qPivotDataPages}),[i,a,e,n,r.page,r.rowsPerPage,l,s])},Hae=({rowsPerPage:e,totalRowCount:t,page:n})=>Math.min(e,t-n*e),Vae=(e,t,n=15e3)=>({rowsPerPage:n,totalPages:Math.max(1,Math.ceil(e/n)),totalRowCount:e,rowsOnCurrentPage:Hae({rowsPerPage:n,totalRowCount:e,page:t})}),Gae=15,Uae=({layoutService:e,viewService:t,rect:n,model:r,pageInfo:o})=>(O((async e=>{const i=e;if(!i.snapshotData||!r||i.snapshotData.content)return i;if("getHyperCubePivotData"in r){const{scrollTop:e,scrollLeft:a,leftGridScrollLeft:s,topGridScrollTop:l}=t,c=((e,t,n)=>{const{gridColumnStartIndex:r,gridRowStartIndex:o,gridWidth:i,gridHeight:a}=e,s=t.page*t.rowsPerPage,l=Math.max(r-Gae,0),c=Math.max(s+o-Gae,s,0),u=a$-l,d=s+t.rowsOnCurrentPage-c;if((e=>0===e.gridWidth&&0===e.gridHeight)(e)){const{maxNumberOfVisibleColumns:e,maxNumberOfVisibleRows:t}=tU(n);return{qLeft:l,qTop:c,qWidth:Math.min(u,e+30),qHeight:Math.min(d,t+30)}}return{qLeft:l,qTop:c,qWidth:Math.min(u,i+30),qHeight:Math.min(d,a+30)}})(t,o,n),u=nU(c),d={qLeft:0,qTop:o.page*o.rowsPerPage,qWidth:1,qHeight:1};i.snapshotData.content={qPivotDataPages:await r.getHyperCubePivotData(EV,[d,...u]),scrollTop:e,scrollLeft:a,leftGridScrollLeft:s,topGridScrollTop:l,page:o.page,rowsPerPage:o.rowsPerPage},i.snapshotData.object.size.w=n.width,i.snapshotData.object.size.h=n.height}return i})),L((()=>({getViewState:()=>((e,t)=>({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,leftGridScrollLeft:e.leftGridScrollLeft,topGridScrollTop:e.topGridScrollTop,renderPage:t.page}))(t,o)})),[t]),e.layout.snapshotData?.content?{left:n.left,top:n.top,width:e.layout.snapshotData.object.size.w,height:e.layout.snapshotData.object.size.h}:n);var Yae={SNPivotTable_ContextMenu_CollapseDimension:{id:"SNPivotTable.ContextMenu.CollapseDimension",locale:{"de-DE":"{0} reduzieren","en-US":"Collapse {0}","es-ES":"Contraer {0}","fr-FR":"Réduire {0}","it-IT":"Comprimi {0}","ja-JP":"{0} を折りたたむ","ko-KR":"{0} 축소","nl-NL":"{0} samenvouwen","pl-PL":"Zwiń {0}","pt-BR":"Recolher {0}","ru-RU":"Свернуть {0}","sv-SE":"Dölj {0}","tr-TR":"{0} öğelerini daralt","zh-CN":"折叠 {0}","zh-TW":"收合 {0}"}},SNPivotTable_ContextMenu_ExpandDimension:{id:"SNPivotTable.ContextMenu.ExpandDimension",locale:{"de-DE":"{0} erweitern","en-US":"Expand {0}","es-ES":"Expandir {0}","fr-FR":"Développer {0}","it-IT":"Espandi {0}","ja-JP":"{0} を展開","ko-KR":"{0} 확장","nl-NL":"{0} uitvouwen","pl-PL":"Rozwiń {0}","pt-BR":"Expandir {0}","ru-RU":"Развернуть {0}","sv-SE":"Visa {0}","tr-TR":"{0} öğelerini genişlet","zh-CN":"展开 {0}","zh-TW":"展開 {0}"}},SNPivotTable_IndentMode_Rows:{id:"SNPivotTable.IndentMode.Rows",locale:{"de-DE":"Zeilen","en-US":"Rows","es-ES":"Filas","fr-FR":"Lignes","it-IT":"Righe","ja-JP":"行","ko-KR":"행","nl-NL":"Rijen","pl-PL":"Wiersze","pt-BR":"Linhas","ru-RU":"Строки","sv-SE":"Rader","tr-TR":"Satırlar","zh-CN":"行","zh-TW":"列"}},SNPivotTable_LimitedData:{id:"SNPivotTable.LimitedData",locale:{"de-DE":"* Derzeit wird eine begrenzte Anzahl Spalten angezeigt","en-US":"* Currently showing a limited number of columns","es-ES":"* Actualmente mostrando un número limitado de columnas","fr-FR":"*Affichage actuel d'un nombre limité de colonnes","it-IT":"* Attualmente visualizzato un numero limitato di colonne","ja-JP":"* 現在、限られた列の数を表示","ko-KR":"* 현재 제한된 수의 열만 표시","nl-NL":"* Op dit moment wordt slechts een beperkt aantal kolommen getoond","pl-PL":"* Obecnie wyświetlana jest ograniczona liczba kolumn","pt-BR":"* Atualmente mostrando um número limitado de colunas","ru-RU":"* В настоящее время отображается ограниченное количество столбцов","sv-SE":"* Visar för närvarande ett begränsat antal kolumner","tr-TR":"*Şu anda sınırlı sayıda sütun gösteriliyor","zh-CN":"* 当前显示的列数有限","zh-TW":"* 目前顯示有限欄數"}},SNPivotTable_NoData:{id:"SNPivotTable.NoData",locale:{"de-DE":"Das Diagramm wird nicht angezeigt, weil es keine Werte enthält.","en-US":"The chart is not displayed because it contains no values.","es-ES":"El gráfico no se muestra porque no contiene valores.","fr-FR":"Le graphique n'est pas affiché, car il ne contient aucune valeur.","it-IT":"Il grafico non è visualizzato poiché non contiene alcun valore.","ja-JP":"チャートには値が含まれていないため、チャートは表示されません。","ko-KR":"차트에 값이 없으므로 차트가 표시되지 않습니다.","nl-NL":"Het diagram wordt niet weergegeven omdat deze geen waarden bevat.","pl-PL":"Wykres nie jest wyświetlany, ponieważ nie zawiera wartości.","pt-BR":"O gráfico não foi exibido porque não contém valores.","ru-RU":"Диаграмма не отображается, так как не содержит значений.","sv-SE":"Diagrammet visas inte eftersom det inte innehåller några värden.","tr-TR":"Değer içermemesi nedeniyle grafik görüntülenmiyor.","zh-CN":"图表未显示,因为它不包含任何值。","zh-TW":"系統不會顯示圖表,因為這沒有包含任何值。"}}};const Kae=()=>{const e=D(),t=e.language();return C((()=>{!function(e){const t="SNPivotTable_LimitedData";e.get(t)===t&&Object.keys(Yae).forEach((t=>{e.add(Yae[t])}))}(e)}),[e]),{translator:e,language:t}},Xae=e=>{const{flags:n}=e,r=T(),o=(e=>{const t=C((()=>W$(e)),[e]);return R((()=>()=>{t.unmount()}),[t]),t})(r),i=z(),a=j(),s=N(),l=q(),c=F(),u=P$(),d=((e,t)=>{const[n]=j$((async()=>{if(void 0!==e&&!t.snapshotData&&"getEffectiveProperties"in e)return{...await e.getEffectiveProperties()}}),[e,t]),r=C((()=>{const e=void 0!==n?.qHyperCubeDef.qSortbyYValue&&1===Math.abs(n.qHyperCubeDef.qSortbyYValue),t=n?.qHyperCubeDef.qDimensions.map((e=>e.qDef.qSortCriterias))??[];return{qAlwaysFullyExpanded:n?.qHyperCubeDef.qAlwaysFullyExpanded??!1,qExpansionState:n?.qHyperCubeDef.qExpansionState,isSortedByFirstMeasure:e,getSortCriteriaForDimension:e=>t[e]}}),[n]);return r})(a,i),p=Bae(i,n),h=(e=>{const t=I();return{...t,select:!!t.active&&!!t.select&&!e,active:!!t.active&&!e,scroll:!!t.active}})(p.isSnapshot),f=W(),m=z$(i,r),{translator:g,language:y}=Kae(),{pageInfo:_,updatePageInfo:b}=((e,t)=>{const{size:n,layout:{qHyperCube:{qSize:r}}}=e,o=t.isDownloadedAsPDForImage||e.isSnapshot,i=(e=>e.layout.snapshotData?.content?.rowsPerPage)(e),[a,s]=M((()=>{const a=((e,t)=>t.isDownloadedAsPDForImage?t.viewState?.renderPage??0:e.isSnapshot?e.layout.snapshotData?.content?.page??0:0)(e,t);return{page:a,shouldShowPagination:r.qcy>n.y&&!o,...Vae(r.qcy,a,i)}})),l=e.layout.qHyperCube.qSize.qcy;return R((()=>{s((t=>({...t,...Vae(l,t.page,i),shouldShowPagination:l>e.size.y&&!o})))}),[l,e.size.y,s,o,i]),R((()=>{const{page:e,totalPages:t}=a;if(e+1>t){const e=t-1,n=Hae({...a,page:e});s({...a,page:e,rowsOnCurrentPage:n})}}),[a]),{pageInfo:a,updatePageInfo:e=>{s({...a,...e,rowsOnCurrentPage:Hae({...a,...e})})}}})(p,u),x=((e,t,n)=>C((()=>((e,t)=>{if(e.isDownloadedAsPDForImage){const{viewState:t}=e;return{gridColumnStartIndex:0,gridRowStartIndex:0,gridWidth:0,gridHeight:0,scrollTop:t?.scrollTop??0,scrollLeft:t?.scrollLeft??0,leftGridScrollLeft:t?.leftGridScrollLeft??0,topGridScrollTop:t?.topGridScrollTop??0}}return{gridColumnStartIndex:0,gridRowStartIndex:0,gridWidth:0,gridHeight:0,scrollTop:t?.content?.scrollTop??0,scrollLeft:t?.content?.scrollLeft??0,leftGridScrollLeft:t?.content?.leftGridScrollLeft??0,topGridScrollTop:t?.content?.topGridScrollTop??0}})(n,t.snapshotData)),[n,e.page,t.snapshotData]))(_,i,u),v=Uae({rect:B(),layoutService:p,viewService:x,model:a,pageInfo:_}),[w,S]=$ae({model:a,layoutService:p,viewService:x,pageInfo:_,rect:v}),k=C((()=>((e,t)=>{const n=t.layout.components?.find((e=>"theme"===e.key)),r=n?.header,o=n?.dimensionValues,i=n?.measureValues,a=n?.measureLabels,s=n?.totalValues,l=n?.nullValues,c=n?.grid,u=(t,n,r)=>e.getStyle(t,n,r),d=+(c?.[Rae.LineClamp]??u(Aae.Grid,Iae.Grid,Pae.LineClamp)??1),p=+(c?.[Rae.ColumnLineClamp]??u(Aae.Grid,Iae.Grid,Pae.ColumnLineClamp)??1),h=Lae(e,r?.[Rae.Background])??u(Aae.Dimension,Iae.LabelName,Pae.BackgroundColor)??l$.Transparent,f={header:{fontSize:Oae(r?.[Rae.FontSize])??u(Aae.Dimension,Iae.LabelName,Pae.FontSize)??r$,fontFamily:r?.[Rae.FontFamily]??u(Aae.Dimension,Iae.LabelName,Pae.FontFamily)??o$,fontWeight:Tae(r?.[Rae.FontStyle],i$),fontStyle:zae(r?.[Rae.FontStyle]),textDecoration:jae(r?.[Rae.FontStyle]),color:Lae(e,r?.[Rae.FontColor])??u(Aae.Dimension,Iae.LabelName,Pae.FontColor)??yW.TEXT,background:h,hoverBackground:GB(h,yN),activeBackground:GB(h,_N)},dimensionValues:{fontSize:Oae(o?.[Rae.FontSize])??u(Aae.Dimension,Iae.LabelValue,Pae.FontSize)??r$,fontFamily:o?.[Rae.FontFamily]??u(Aae.Dimension,Iae.LabelValue,Pae.FontFamily)??o$,fontWeight:Tae(o?.[Rae.FontStyle],void 0),fontStyle:zae(o?.[Rae.FontStyle]),textDecoration:jae(o?.[Rae.FontStyle]),color:Lae(e,o?.[Rae.FontColor])??u(Aae.Dimension,Iae.LabelValue,Pae.FontColor)??yW.TEXT,background:Lae(e,o?.[Rae.Background])??u(Aae.Dimension,Iae.LabelValue,Pae.BackgroundColor)??l$.Transparent},measureValues:{fontSize:Oae(i?.[Rae.FontSize])??u(Aae.Measure,Iae.LabelValue,Pae.FontSize)??r$,fontFamily:i?.[Rae.FontFamily]??u(Aae.Measure,Iae.LabelValue,Pae.FontFamily)??o$,fontWeight:Tae(i?.[Rae.FontStyle],"normal"),fontStyle:zae(i?.[Rae.FontStyle]),textDecoration:jae(i?.[Rae.FontStyle]),color:Lae(e,i?.[Rae.FontColor])??u(Aae.Measure,Iae.LabelValue,Pae.FontColor)??l$.FontSecondary,background:Lae(e,i?.[Rae.Background])??u(Aae.Measure,Iae.LabelValue,Pae.BackgroundColor)??l$.Transparent},measureLabels:{fontWeight:Tae(a?.[Rae.FontStyle],"normal"),fontStyle:zae(a?.[Rae.FontStyle]),textDecoration:jae(a?.[Rae.FontStyle]),color:Lae(e,a?.[Rae.FontColor])??u(Aae.Measure,Iae.LabelName,Pae.FontColor)??l$.FontSecondary,background:Lae(e,a?.[Rae.Background])??u(Aae.Measure,Iae.LabelName,Pae.BackgroundColor)??l$.Transparent},totalValues:{fontWeight:Tae(s?.[Rae.FontStyle],i$),fontStyle:zae(s?.[Rae.FontStyle]),textDecoration:jae(s?.[Rae.FontStyle]),color:Lae(e,s?.[Rae.FontColor])??u(Aae.Total,Iae.LabelValue,Pae.FontColor)??yW.TEXT,background:Lae(e,s?.[Rae.Background])??u(Aae.Total,Iae.LabelValue,Pae.BackgroundColor)??l$.Transparent},nullValues:{fontWeight:Tae(l?.[Rae.FontStyle],"normal"),fontStyle:zae(l?.[Rae.FontStyle]),textDecoration:jae(l?.[Rae.FontStyle]),color:Lae(e,l?.[Rae.FontColor])??u(Aae.Null,Iae.LabelValue,Pae.FontColor)??yW.TEXT,background:Lae(e,l?.[Rae.Background])??u(Aae.Null,Iae.LabelValue,Pae.BackgroundColor)??l$.NullValueBackground},grid:{columnLineClamp:p,lineClamp:d,border:Lae(e,c?.[Rae.Border])??u(Aae.Grid,Iae.Grid,Pae.BorderColor)??l$.DividerLight,divider:Lae(e,c?.[Rae.Divider])??u(Aae.Grid,Iae.Divider,Pae.BorderColor)??l$.DividerDark,background:Lae(e,c?.[Rae.Background])??u(Aae.Grid,Iae.Grid,Pae.BackgroundColor)??l$.Transparent},selectedColors:VB(e)};return f.headerCellHeight=Math.max(Dae(f.header.fontSize,p),Dae(f.dimensionValues.fontSize,p),32),f.contentCellHeight=Math.max(Dae(f.measureValues.fontSize,d),Dae(f.dimensionValues.fontSize,d),24),f.dimensionValueTextHeight=Dae(f.dimensionValues.fontSize,1),f})(m,p)),[m,p]),A=((e,t,n)=>{const[,r,o]=j$((async()=>{const t=zW(n.flags),r=e.getStyle("","","fontFamily"),o=e.getStyle("object","label.name","fontFamily"),i=e.getStyle("object","label.value","fontFamily"),a=e.getStyle("","","fontFamilies")??[];return Promise.all([...t,...a,r,o,i,$$].filter((e=>void 0!==e)).map((async e=>{await document.fonts.load(`600 12px ${e}`),await document.fonts.load(`12px ${e}`)})))}),[t,e,n]);return o?(console.warn("Failed to load fonts:",o),!0):!r})(m,i,e),P=E(),O=e.flags.isEnabled("CLIENT_IM_6225_PIVOT_TABLE_RTL")?P.direction:"ltr";Fae([Wae({model:a,layoutService:p,effectivePropertiesService:d,translator:g})]),R((()=>{!S&&a&&!!w&&A&&((e,{selections:n,baseObjects:r,coreServices:o,nebulaObjects:i})=>{const a=Mae(r.direction);e.render(Uo.jsx(t.StrictMode,{children:Uo.jsx(OD,{theme:a,children:Uo.jsx(xV,{...i,children:Uo.jsx(yV,{...r,children:Uo.jsx(wK,{selections:n,children:Uo.jsx(SV,{...o,children:Uo.jsx(lU,{children:Uo.jsx(goe,{})})})})})})})}))})(o,{selections:f,baseObjects:{rect:v,pageInfo:_,qPivotDataPages:w,updatePageInfo:b,direction:O},nebulaObjects:{env:e,app:s,model:a,embed:l,theme:m,keyboard:c,translator:g,interactions:h},coreServices:{styleService:k,viewService:x,layoutService:p,downloadService:u,effectivePropertiesService:d}})}),[a,s,v,h,f,x,p,u,S,w,k,o,A,g,y,_,b,d,l,c,m,e,O])},Jae={version:"6.0.20",qHyperCubeDef:{qAlwaysFullyExpanded:!1,qDimensions:[],qMeasures:[],qMode:"P",qSuppressMissing:!0,qSuppressZero:!1,qShowTotalsAbove:!0,qInitialDataFetch:[{qTop:0,qLeft:0,qWidth:50,qHeight:50}],qIndentMode:!1},showTitles:!0,title:"",subtitle:"",footnote:"",nullValueRepresentation:{text:"-"},components:[]};function Zae(e){return{qae:{properties:{initial:{...Jae,qHyperCubeDef:{...Jae.qHyperCubeDef,qIndentMode:!1}}},data:WF(e)},ext:k$(e),component(){Xae(e)}}}export{Zae as default};
|
|
184
|
+
e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,o,i,a,s,l,c,u,d,p=e.length,h=e.search(/[0-9\-\+#]/),f=h>0?e.substring(0,h):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),y=p-g,_=e.substring(y,y+1),b=y+("."===_||","===_?1:0),x=g>0?e.substring(b,p):"";if(n=(t="-"===(e=e.substring(h,b)).charAt(0)?-t:+t)<0?t=-t:0,o=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",i=r&&r[1]&&r[0]||",",e=e.split(o),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(c=t.split("."))[1]||c[1]&&c[1].length<=s)&&(t=(+t).toFixed(s+1)),u=e[0].split(i),e[0]=u.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;c[0].length<e[0].length-a;)c[0]="0"+c[0];else 0==+c[0]&&(c[0]="");if((t=t.split("."))[0]=c[0],l=u[1]&&u[u.length-1].length){for(m="",y=(d=t[0]).length%l,p=d.length,b=0;b<p;b++)m+=d.charAt(b),!((b-y+1)%l)&&b<p-l&&(m+=i);t[0]=m}return t[1]=e[1]&&t[1]?o+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),f+(n?"-":"")+r+x}}));function UJ(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}const YJ={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"},KJ=/%\)?$/,XJ=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,JJ=/^\(oct\)/i,ZJ=/^\(dec\)/i,QJ=/^\(hex\)/i,eZ=/^\(bin\)/i,tZ=/^\(rom\)/i,nZ=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,rZ=/#|0/g;function oZ(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 iZ(e,t,n){let r;return XJ.test(t)?e=oZ(e,Number(/\d{2}/.exec(t)[0]),t,n):JJ.test(t)?e=oZ(e,8,t,n):ZJ.test(t)?e=oZ(e,10,t,n):QJ.test(t)?e=oZ(e,16,t,n):eZ.test(t)?e=oZ(e,2,t,n):tZ.test(t)&&(r="",e<0&&(r="-",e=-e),0===(e=Math.floor(e))?e="0":e<=5e5?(e=function(e,t){let n,r="",o=Number(String(e).slice(-3)),i=(e-o)/1e3,a=[0,1,4,5,9,10,40,50,90,100,400,500,900].reverse(),s=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();for(;o>0;)for(n=0;n<a.length;n++)if(a[n]<=o){r+=s[n],o-=a[n];break}for(n=0;n<i;n++)r="M".concat(r);return t[1]!==t[1].toUpperCase()&&(r=r.toLowerCase()),r}(e,t),e=r+e):e=t+r+e.toExponential(0)),e}function aZ(e,t,n){const r=UJ(e);return n?r:new RegExp(r||"",t)}function sZ(e,t,n,r){let o,i,a,s,l,c,u,d,p,h=e.pattern;var f,m;r&&(e.abbreviate=!0),f=t,(m=n)&&(m=UJ(m)),f&&(f=UJ(f)),p=new RegExp("(?:[#0]+".concat(f,")?[#0]+(?:").concat(m,"[#0]+)?")),a=h.match(p),a=a?a[0]:"",s=a?h.substr(0,h.indexOf(a)):h,l=a?h.substring(h.indexOf(a)+a.length):"",a||(a=h?"#":"##########"),t&&t===n&&(o=a.split(n),i=o.pop(),a=o.join("")+n+i,t=""),c=t,t=/,/.test(n)?"¤":",",c&&(a=a.replace(aZ(c,"g"),t)),u=n,n=".",u&&(a=a.replace(aZ(u,"g"),n)),d=a.match(/#/g),d=d?d.length:0;const g=h.split(u);let y;g[1]&&(y=g[1].match(rZ)),e.prefix=s||"",e.postfix=l||"",e.pattern=h,e.maxPrecision=y?y.length:2,e.percentage=KJ.test(h),e.numericPattern=a||"",e.numericRegex=new RegExp("".concat(aZ(t,null,!0),"|").concat(aZ(n,null,!0)),"g"),e.groupTemp=c,e.decTemp=u,e.t=t,e.d=n,e.temp=d}class lZ{constructor(e,t,n,r,o){this.localeInfo=e,this.pattern=t,this.thousandDelimiter=n||",",this.decimalDelimiter=r||".",this.type=o||"numeric",this.patternSeparator=";",this.abbreviations=function(e,t){if(!e||!e.qNumericalAbbreviation)return YJ;const n={};return e.qNumericalAbbreviation.split(t).forEach((e=>{let t=e.split(":");2===t.length&&(n[t[0]]=t[1])})),n}(e,this.patternSeparator),this.prepare()}clone(){const e=new lZ(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return e.subtype=this.subtype,e}format(e,t,n,r){return this.prepare(t,n,r),this.formatValue(e)}prepare(e,t,n){let r;if(void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===n&&(n=this.decimalDelimiter),!e)return void(this._prepared={pattern:!1});this._prepared={positive:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},negative:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},zero:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""}},r=this._prepared,e=e.split(this.patternSeparator),r.positive.pattern=e[0],r.negative.pattern=e[1],r.zero.pattern=e[2],nZ.test(e[0])&&(r.positive.isFunctional=!0),e[1]?nZ.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?nZ.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1;const o="U"===this.type;r.positive.isFunctional||sZ(r.positive,t,n,o),r.negative&&!r.negative.isFunctional&&sZ(r.negative,t,n,o),r.zero&&!r.zero.isFunctional&&sZ(r.zero,t,n,o)}formatValue(e){let t,n,r,o,i,a,s,l,c,u=this._prepared,d="",p="",h=e;if(isNaN(e))return"".concat(h);if(e=+e,!1===u.pattern)return e.toString();if(0===e&&u.zero)return u=u.zero,u.pattern;if(e<0&&u.negative?(u=u.negative,e=-e):u=u.positive,i=u.d,a=u.t,u.isFunctional)e=iZ(e,u.pattern,i);else{if(u.percentage&&(e*=100),u.abbreviate){const t=Object.keys(this.abbreviations).map((e=>parseInt(e,10))).sort(((e,t)=>e-t));let r,o,i=t[0];for(s=0,n=Number(Number(e).toExponential().split("e")[1]);i<=n&&s<t.length;)s++,i=t[s];s>0&&(r=t[s-1]),r&&n>0&&r>0?o=r:(n<0&&r<0||!r)&&(i<0&&i-n<=u.maxPrecision?o=i:r<=n&&!(i>0&&-n<=u.maxPrecision)&&(o=r)),o&&(d=this.abbreviations[o],e/=10**o)}if(r=Math.abs(e),t=u.temp,l=u.numericPattern,c=l.split(i)[1],"I"===this.type&&(e=Math.round(e)),o=e,c||"#"!==l.slice(-1)[0])if(r>=1e15||r>0&&r<=1e-14)e=r?r.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{const t=Number((e+1e-15*(e<0?-1:1)).toFixed(Math.min(20,c?c.length:0)).split(".")[0]);let n=l.split(i)[0];if(n+=i,e=GJ(n,t)||"0",c){const t=Math.max(0,Math.min(14,c.length)),n=c.replace(/#+$/,"").length;let o=("I"===this.type?0:r%1+1e-15).toFixed(t).slice(2).replace(/0+$/,"");for(s=o.length;s<n;s++)o+="0";o&&(e+=i+o)}else 0===t&&(o=0)}else if(r>=10**t||r<1||r<1e-4)0===e?e="0":r<1e-4||r>=1e20?(e=(e=o.toExponential(Math.max(1,Math.min(14,t))-1)).replace(/\.?0+(?=e)/,""),p=""):(e=e.toPrecision(Math.max(1,Math.min(14,t)))).indexOf(".")>=0&&(e=(e=e.replace(e.indexOf("e")<0?/0+$/:/\.?0+(?=e)/,"")).replace(".",i));else{for(l+=i,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(r)/Math.log(10)))),s=0;s<t;s++)l+="#";e=GJ(l,e)}e=e.replace(u.numericRegex,(e=>e===a?u.groupTemp:e===i?u.decTemp:"")),o<0&&!/^-/.test(e)&&(e="-".concat(e))}return u.prefix+e+p+d+u.postfix}static getStaticFormatter(){return{prepare(){},formatValue:e=>"".concat(e)}}}function cZ(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{size:n=5e3,multipleArguments:r=!1,toKey:o=e=>e}=t;let i,a,s=Object.create(null),l=Object.create(null),c=0,u=0;return i=r?function(){return a=o(...arguments),i.has(a)?i.get(a):i.set(a,e(...arguments))}:t=>(a=o(t),i.has(a)?i.get(a):i.set(a,e(t))),i.set=(e,t)=>(c>=n&&(delete s[l[u]],delete l[u],c--,u++),s[e]=t,l[c]=e,c++,t),i.get=e=>s[e],i.has=e=>e in s,i.clear=()=>{s=Object.create(null),l=Object.create(null),c=0,u=0},i.size=()=>c,i}function uZ(e,t,n,r,o){const i=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new lZ(...t)}(o,e,t,n,r),a=cZ(i.formatValue.bind(i),{toKey:e=>isNaN(e)?e:+e});function s(e){return a(e)}return s.format=function(e,t,n,r){return a.clear(),i.format(t,e,n,r)},s.pattern=function(e){return e&&(a.clear(),i.pattern=e,i.prepare()),i.pattern},s}const dZ="D",pZ="T",hZ="TS",fZ="IV",mZ=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],gZ=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],yZ=["January","February","March","April","May","June","July","August","September","October","November","December"],_Z=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function bZ(e,t){for(let n=e.length;n<t;n++)e="0".concat(e);return e}function xZ(e){let t=e.toString().split(".");return t[1]?(t=Number("0.".concat(t[1])),t):0}function vZ(e,t){let n,r=function(e){const t=e,n=24*xZ(t),r=60*xZ(n),o=60*xZ(r),i=1e3*xZ(o);return{d:Math.floor(t),h:Math.floor(n),m:Math.floor(r),s:Math.floor(o),f:Math.round(i)}}(e),o=r.d,i=r.h,a=r.m,s=r.s,l=r.f,c=0;/w+|t+/gi.test(t)&&(n=new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,Math.round(86400*(e-Math.floor(e))))),isNaN(n.getTime())&&(n=null)),/D+/gi.test(t)||(i+=24*o),/h+/gi.test(t)||(a+=60*i),/m+/gi.test(t)||(s+=60*a),/w+/gi.test(t)&&(c=n?n.getDay()-1:0,c<0&&(c=6));let u="";return n&&(u=n.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:c,date:o,h:i,m:a,s:s,f:l,t:u}}class wZ{constructor(e,t,n){const r=e||{};if(r.qCalendarStrings||(r.qCalendarStrings={qLongDayNames:mZ,qDayNames:gZ,qLongMonthNames:yZ,qMonthNames:_Z}),this.localeInfo=r,this.locale_days=r.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=r.qCalendarStrings.qDayNames.slice(),this.locale_months=r.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=r.qCalendarStrings.qMonthNames.slice(),!t){t={[pZ]:r.qTimeFmt||"hh:mm:ss",[dZ]:r.qDateFmt||"YYYY-MM-DD",[hZ]:r.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"}[n]}this.pattern=t}clone(){const e=new wZ(this.localeInfo,this.pattern);return e.subtype=this.subtype,e}format(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+]|\[|]/g,"");const n=/t+/gi.test(t);let r;e instanceof Date?r=function(e,t){let n=e.getUTCHours(),r=e.getUTCDay()-1;return t&&(n%=12,n||(n=12)),r<0&&(r=6),{year:e.getUTCFullYear(),month:e.getUTCMonth(),day:r,date:e.getUTCDate(),h:n,m:e.getUTCMinutes(),s:e.getUTCSeconds(),f:e.getUTCMilliseconds(),t:e.getUTCHours()>=12?"pm":"am"}}(e,n):(e<0&&(e=-e,t="-".concat(t)),r=vZ(e,t));const o=function(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:bZ("".concat(t.year).slice(-2),2),YYY:bZ("".concat(t.year).slice(-3),3),def:e=>bZ("".concat(t.year),e.length)},"M+":{M:t.month+1,MM:bZ("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:bZ("".concat(t.day),2),WWW:e.locale_days_abbr[t.day],def:e.locale_days[t.day]},"D+|d+":{D:t.date,def:e=>bZ("".concat(t.date),e.length)},"h+|H+":{h:t.h,def:e=>bZ("".concat(t.h),e.length)},"m+":{m:t.m,def:e=>bZ("".concat(t.m),e.length)},"s+|S+":{s:t.s,def:e=>bZ("".concat(t.s),e.length)},"f+|F+":{def(e){let n="".concat(t.f),r=e.length-n.length;if(r>0)for(let e=0;e<r;e++)n+="0";else r<0&&(n=n.slice(0,e.length));return n}},"t{1,2}|T{1,2}":{def(e){let n=t.t;return e[0].toUpperCase()===e[0]&&(n=n.toUpperCase()),n=n.slice(0,e.length),n}}}}(this,r),i=[];for(const e in o)Object.prototype.hasOwnProperty.call(o,e)&&i.push(e);const a=new RegExp(i.join("|"),"g"),s=t.replace(a,(e=>{let t,n,r;for(n in o)if(Object.prototype.hasOwnProperty.call(o,n)&&(t=new RegExp(n),t.test(e)))break;if(!t)return"";for(const t in o[n])if(t===e||t.toLowerCase()===e){r=o[n][t],void 0===r&&(r=o[n][t.toLowerCase()]);break}return void 0===r&&(r=o[n].def),"function"==typeof r&&(r=r(e)),r}));return s}}function SZ(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new wZ(...t)}function CZ(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=SZ(arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,e,t),r=cZ(n.format.bind(n),{toKey:e=>"object"==typeof e&&"function"==typeof e.getTime?e.getTime():e});function o(e){return t!==fZ?function(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}(e):e}function i(e){return e=o(e),r(e)}return i.format=function(e,t){return r.clear(),t=o(t),n.format(t,e)},i.locale=function(o){return n=SZ(o,e,t),r=cZ(n.format.bind(n),{toKey:e=>"object"==typeof e?e.getTime():e}),this},i.qtype=function(e){return void 0!==e&&(t=e,r.clear()),t},i}function EZ(){let e,{meta:t,id:n,key:r,localeInfo:o,fieldExtractor:i,value:a,type:s,sourceField:l}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const c=a||("dimension"===s?e=>null==e?void 0:e.qElemNo:e=>null==e?void 0:e.qValue),u="dimension"===s?"first":"avg",d=function(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return CZ(e.qNumFormat.qFmt,e.qNumFormat.qType,t);let n="#",r=t&&void 0!==t.qThousandSep?t.qThousandSep:",",o=t&&void 0!==t.qDecimalSep?t.qDecimalSep:".",i="U",a=e&&!!e.qIsAutoFormat;return e&&e.qNumFormat?(n=e.qNumFormat.qFmt||n,r=e.qNumFormat.qThou||r,o=e.qNumFormat.qDec||o,i=e.qNumFormat.qType||i,a=a&&-1===["M"].indexOf(e.qNumFormat.qType)):a=!0,(a||"U"===i)&&(n="#".concat(o,"##"),i="U"),uZ(n,r,o,i,t)}(t,o),p="dimension"===s?"first":(e,t)=>d(t),h={id:()=>n,key:()=>r,raw:()=>t,title:()=>t.qFallbackTitle||t.label,type:()=>s,origin:()=>l,items:()=>(e||(e=i(h)),e),min:()=>t.qMin,max:()=>t.qMax,value:c,label:e=>(null==e?void 0:e.qText)||"",reduce:u,reduceLabel:p,formatter:()=>d,tags:()=>t.qTags};return h}function kZ(e,t,n,r,o){return(t[e]||[]).map(((t,i)=>{const a="".concat(r?"".concat(r,"/"):"").concat(e,"/").concat(i),s={instance:EZ(cJ({id:"".concat(n?"".concat(n,"/"):"").concat(a),key:a,meta:t},o))};return s.attrDims=kZ("qAttrDimInfo",t,n,a,cJ({},o,{value:e=>null==e?void 0:e.qElemNo,type:"dimension"})),s.attrExps=kZ("qAttrExprInfo",t,n,a,cJ({},o,{value:e=>null==e?void 0:e.qNum,type:"measure"})),s.measures=kZ("qMeasureInfo",t,n,a,cJ({},o,{value:e=>null==e?void 0:e.qValue,type:"measure"})),s}))}function MZ(){let{key:e,data:t,config:n={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},o=t;if(!o)throw new Error('Missing "data" input');if(!o.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');const i=MZ.util,a={cache:r,cube:o,localeInfo:n.localeInfo,fieldExtractor:null,pages:null,hierarchy:()=>null,virtualFields:n.virtualFields},s={key:()=>e,raw:()=>o,field:e=>function(e,t){let{cache:n}=t;if("number"==typeof e)return n.fields[e];const r=n.allFields;if("function"==typeof e){for(let t=0;t<r.length;t++)if(e(r[t]))return r[t];return!1}if("string"==typeof e){for(let t=0;t<r.length;t++)if(r[t].key()===e||r[t].title()===e)return r[t]}else if(e&&-1!==r.indexOf(e))return e;throw Error("Field not found: ".concat(e))}(e,a),fields:()=>r.fields.slice(),extract:e=>a.extractor(e,s,r,i),hierarchy:e=>a.hierarchy(e,s,r,i),_cache:()=>r};"K"===o.qMode||"T"===o.qMode||!o.qMode&&o.qNodesOnDim?(a.extractor=VJ,a.hierarchy=HJ,a.pages="K"===o.qMode?o.qStackedDataPages:o.qTreeDataPages):"S"===o.qMode?(a.extractor=hJ,a.pages=o.qDataPages,a.hierarchy=HJ):a.extractor=()=>[],a.fieldExtractor=e=>a.extractor({field:e},s,r,i);const l="S"===o.qMode?e=>e.qElemNumber:void 0,c="S"===o.qMode?e=>e.qNum:void 0;r.wrappedFields.push(...kZ("qDimensionInfo",o,e,"",cJ({},a,{value:l,type:"dimension"}))),r.wrappedFields.push(...kZ("qMeasureInfo",o,e,"",cJ({},a,{value:c,type:"measure"}))),r.fields=r.wrappedFields.map((e=>e.instance));const u=e=>{e.forEach((e=>{r.allFields.push(e.instance),u(e.measures),u(e.attrDims),u(e.attrExps)}))};return u(r.wrappedFields),(n.virtualFields||[]).forEach((t=>{const n=s.field(t.from),o=EZ(eJ({meta:n.raw(),id:"".concat(e,"/").concat(t.key),sourceField:n,fieldExtractor:e=>a.extractor({field:e},s,r,i),key:t.key,type:n.type(),localeInfo:a.localeInfo,value:n.value},t.override||{}));r.virtualFields.push(o)})),r.allFields.push(...r.virtualFields),s}const RZ=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],AZ=/\/qDimensionInfo(?:\/(\d+))?/,IZ=/\/qMeasureInfo\/(\d+)/,PZ=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,OZ=/\/qAttrExprInfo\/(\d+)/,LZ=/\/?qHyperCube/,DZ=/\/?qTreeData/,TZ=e=>"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14)),zZ=e=>"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13));function jZ(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r=t.byCells,o=t.primarySource,i=[],a={},s=e.isActive();let l=!1;if(e.brushes().forEach((e=>{const t=function(e,t){let n=e,r=-1,o=-1,i="",a=e=>e;LZ.test(e)?(i="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),a=TZ):DZ.test(e)&&(i="".concat(n.substr(0,n.indexOf("qTreeData")+9)),a=zZ);let s=!0;if(AZ.test(e)&&(r=+AZ.exec(e)[1]),IZ.test(e)&&(o=+IZ.exec(e)[1]),PZ.test(e)){o=-1,r=0;const e=+PZ.exec(n)[2];isNaN(e)||(r=e,n=n.replace(/\/\d+$/,"")),s=!1}if(OZ.test(e)){const e=o;if(t){o=0;const a=IJ(i,t);o+=(a.qMeasureInfo||[]).length,r>-1?(o=a.qDimensionInfo.slice(0,r).reduce(((e,t)=>e+t.qAttrExprInfo.length),o),r=-1):(o=a.qDimensionInfo.reduce(((e,t)=>e+t.qAttrExprInfo.length),o),o=a.qMeasureInfo.slice(0,e).reduce(((e,t)=>e+t.qAttrExprInfo.length),o)),o+=+OZ.exec(n)[1]}else r>-1?(r=-1,o=+OZ.exec(n)[1]):o+=+OZ.exec(n)[1]+1}return RZ.forEach((e=>{let[t,r]=e;n=n.replace(t,r)})),s&&(n=a(n)),n&&"/"!==n[0]&&(n="/".concat(n)),{measureIdx:o,dimensionIdx:r,path:n}}(e.id,n);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.multiRangeSelectTreeDataValues||(a.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),n.forEach((e=>a.multiRangeSelectTreeDataValues.ranges.push({qMeasureIx:t.measureIdx,qDimensionIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}}))))}else{if("range"===e.type&&t.measureIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.rangeSelectHyperCubeValues||(a.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),n.forEach((e=>a.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:t.measureIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}}))))}if("range"===e.type&&t.dimensionIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.selectHyperCubeContinuousRange||(a.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),n.forEach((e=>a.selectHyperCubeContinuousRange.ranges.push({qDimIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!1}}))))}if("value"===e.type&&t.dimensionIdx>-1)if(r)if(n&&n.qHyperCube&&("P"===n.qHyperCube.qMode||"T"===n.qHyperCube.qMode||"K"===n.qHyperCube.qMode)){const r=n.qHyperCube,i=r.qNoOfLeftDims,s=r.qEffectiveInterColumnSortOrder.indexOf(t.dimensionIdx);if(a.selectPivotCells||(a.selectPivotCells={path:t.path,cells:[]}),e.id===o||!o){const n=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e)));(0===i||s>=i)&&i>-1?n.forEach((e=>{a.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:s-i})})):n.forEach((e=>{a.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})})),l=!!a.selectPivotCells.cells.length}}else a.selectHyperCubeCells||(a.selectHyperCubeCells={path:t.path,cols:[]}),a.selectHyperCubeCells.cols.push(t.dimensionIdx),e.id!==o&&(o||a.selectHyperCubeCells.values)||(a.selectHyperCubeCells.values=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e))),l=!!a.selectHyperCubeCells.values.length);else{const n=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e)));l=!!n.length,i.push({params:[t.path,t.dimensionIdx,n,!1],method:"selectHyperCubeValues"})}}})),!l&&s)return[{method:"resetMadeSelections",params:[]}];var c;a.rangeSelectHyperCubeValues&&i.push({method:"rangeSelectHyperCubeValues",params:[a.rangeSelectHyperCubeValues.path,a.rangeSelectHyperCubeValues.ranges,[],null===(c=t.orMode)||void 0===c||c]});return a.selectHyperCubeContinuousRange&&i.push({method:"selectHyperCubeContinuousRange",params:[a.selectHyperCubeContinuousRange.path,a.selectHyperCubeContinuousRange.ranges]}),a.selectHyperCubeCells&&i.push({method:"selectHyperCubeCells",params:[a.selectHyperCubeCells.path,a.selectHyperCubeCells.values,a.selectHyperCubeCells.cols]}),a.selectPivotCells&&i.push({method:"selectPivotCells",params:[a.selectPivotCells.path,a.selectPivotCells.cells]}),a.multiRangeSelectTreeDataValues&&i.push({method:"multiRangeSelectTreeDataValues",params:[a.multiRangeSelectTreeDataValues.path,a.multiRangeSelectTreeDataValues.ranges]}),i}function NZ(e){MZ.util=e.data("matrix").util,e.data("q",MZ),e.formatter("q-number",uZ),e.formatter("q-time",CZ)}NZ.qBrushHelper=jZ,NZ.selections=jZ;var qZ=Object.prototype.hasOwnProperty,FZ=Object.prototype.toString,WZ=Object.defineProperty,BZ=Object.getOwnPropertyDescriptor,$Z=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===FZ.call(e)},HZ=function(e){if(!e||"[object Object]"!==FZ.call(e))return!1;var t,n=qZ.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&qZ.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||qZ.call(e,t)},VZ=function(e,t){WZ&&"__proto__"===t.name?WZ(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},GZ=function(e,t){if("__proto__"===t){if(!qZ.call(e,t))return;if(BZ)return BZ(e,t).value}return e[t]},UZ=function e(){var t,n,r,o,i,a,s=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)r=GZ(s,n),s!==(o=GZ(t,n))&&(u&&o&&(HZ(o)||(i=$Z(o)))?(i?(i=!1,a=r&&$Z(r)?r:[]):a=r&&HZ(r)?r:{},VZ(s,{name:n,newValue:e(u,a,o)})):void 0!==o&&VZ(s,{name:n,newValue:o}));return s},YZ="2.8.2";function KZ(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function XZ(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 JZ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?XZ(Object(n),!0).forEach((function(t){KZ(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XZ(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ZZ(e){return!!e.changedTouches}function QZ(e){return"number"==typeof e&&!isNaN(e)}function eQ(e){return"number"!=typeof e||isNaN(e)}function tQ(e){const t=e.length;let n=NaN,r=NaN,o=NaN,i=NaN;for(let a=0;a<t;a++)n=isNaN(n)?e[a].x:Math.min(n,e[a].x),r=isNaN(r)?e[a].x:Math.max(r,e[a].x),o=isNaN(o)?e[a].y:Math.min(o,e[a].y),i=isNaN(i)?e[a].y:Math.max(i,e[a].y);return[n,o,r,i]}function nQ(e){return[{x:e.x1||0,y:e.y1||0},{x:e.x2||0,y:e.y2||0}]}function rQ(e){return[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}]}function oQ(e){const[t,n,r,o]=tQ(e);return{x:t,y:n,width:r-t,height:o-n}}function iQ(e){return{x1:e[0].x,y1:e[0].y,x2:e[1].x,y2:e[1].y}}function aQ(e){const{x:t,y:n,width:r,height:o,x1:i,x2:a,y1:s,y2:l,cx:c,cy:u,r:d,vertices:p}=e||{};return QZ(c)&&QZ(u)&&QZ(d)?"circle":QZ(i)&&QZ(a)&&QZ(s)&&QZ(l)?"line":QZ(t)&&QZ(n)&&QZ(r)&&QZ(o)?"rect":QZ(t)&&QZ(n)?"point":Array.isArray(p)?p.every((e=>Array.isArray(e)))?"geopolygon":"polygon":null}function sQ(e,t){return{x:t.x-e,y:t.y-e,width:t.width+e,height:t.height+e}}var lQ=Math.PI,cQ=2*lQ,uQ=1e-6,dQ=cQ-uQ;function pQ(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function hQ(){return new pQ}function fQ(e){return function(){return e}}pQ.prototype=hQ.prototype={constructor:pQ,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,o,i){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+o)+","+(this._y1=+i)},arcTo:function(e,t,n,r,o){e=+e,t=+t,n=+n,r=+r,o=+o;var i=this._x1,a=this._y1,s=n-e,l=r-t,c=i-e,u=a-t,d=c*c+u*u;if(o<0)throw new Error("negative radius: "+o);if(null===this._x1)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(d>uQ)if(Math.abs(u*s-l*c)>uQ&&o){var p=n-i,h=r-a,f=s*s+l*l,m=p*p+h*h,g=Math.sqrt(f),y=Math.sqrt(d),_=o*Math.tan((lQ-Math.acos((f+d-m)/(2*g*y)))/2),b=_/y,x=_/g;Math.abs(b-1)>uQ&&(this._+="L"+(e+b*c)+","+(t+b*u)),this._+="A"+o+","+o+",0,0,"+ +(u*p>c*h)+","+(this._x1=e+x*s)+","+(this._y1=t+x*l)}else this._+="L"+(this._x1=e)+","+(this._y1=t);else;},arc:function(e,t,n,r,o,i){e=+e,t=+t,i=!!i;var a=(n=+n)*Math.cos(r),s=n*Math.sin(r),l=e+a,c=t+s,u=1^i,d=i?r-o:o-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>uQ||Math.abs(this._y1-c)>uQ)&&(this._+="L"+l+","+c),n&&(d<0&&(d=d%cQ+cQ),d>dQ?this._+="A"+n+","+n+",0,1,"+u+","+(e-a)+","+(t-s)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):d>uQ&&(this._+="A"+n+","+n+",0,"+ +(d>=lQ)+","+u+","+(this._x1=e+n*Math.cos(o))+","+(this._y1=t+n*Math.sin(o))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var mQ=Math.abs,gQ=Math.atan2,yQ=Math.cos,_Q=Math.max,bQ=Math.min,xQ=Math.sin,vQ=Math.sqrt,wQ=1e-12,SQ=Math.PI,CQ=SQ/2,EQ=2*SQ;function kQ(e){return e>=1?CQ:e<=-1?-CQ:Math.asin(e)}function MQ(e){return e.innerRadius}function RQ(e){return e.outerRadius}function AQ(e){return e.startAngle}function IQ(e){return e.endAngle}function PQ(e){return e&&e.padAngle}function OQ(e,t,n,r,o,i,a){var s=e-n,l=t-r,c=(a?i:-i)/vQ(s*s+l*l),u=c*l,d=-c*s,p=e+u,h=t+d,f=n+u,m=r+d,g=(p+f)/2,y=(h+m)/2,_=f-p,b=m-h,x=_*_+b*b,v=o-i,w=p*m-f*h,S=(b<0?-1:1)*vQ(_Q(0,v*v*x-w*w)),C=(w*b-_*S)/x,E=(-w*_-b*S)/x,k=(w*b+_*S)/x,M=(-w*_+b*S)/x,R=C-g,A=E-y,I=k-g,P=M-y;return R*R+A*A>I*I+P*P&&(C=k,E=M),{cx:C,cy:E,x01:-u,y01:-d,x11:C*(o/v-1),y11:E*(o/v-1)}}function LQ(){var e=MQ,t=RQ,n=fQ(0),r=null,o=AQ,i=IQ,a=PQ,s=null;function l(){var l,c,u=+e.apply(this,arguments),d=+t.apply(this,arguments),p=o.apply(this,arguments)-CQ,h=i.apply(this,arguments)-CQ,f=mQ(h-p),m=h>p;if(s||(s=l=hQ()),d<u&&(c=d,d=u,u=c),d>wQ)if(f>EQ-wQ)s.moveTo(d*yQ(p),d*xQ(p)),s.arc(0,0,d,p,h,!m),u>wQ&&(s.moveTo(u*yQ(h),u*xQ(h)),s.arc(0,0,u,h,p,m));else{var g,y,_=p,b=h,x=p,v=h,w=f,S=f,C=a.apply(this,arguments)/2,E=C>wQ&&(r?+r.apply(this,arguments):vQ(u*u+d*d)),k=bQ(mQ(d-u)/2,+n.apply(this,arguments)),M=k,R=k;if(E>wQ){var A=kQ(E/u*xQ(C)),I=kQ(E/d*xQ(C));(w-=2*A)>wQ?(x+=A*=m?1:-1,v-=A):(w=0,x=v=(p+h)/2),(S-=2*I)>wQ?(_+=I*=m?1:-1,b-=I):(S=0,_=b=(p+h)/2)}var P=d*yQ(_),O=d*xQ(_),L=u*yQ(v),D=u*xQ(v);if(k>wQ){var T,z=d*yQ(b),j=d*xQ(b),N=u*yQ(x),q=u*xQ(x);if(f<SQ&&(T=function(e,t,n,r,o,i,a,s){var l=n-e,c=r-t,u=a-o,d=s-i,p=d*l-u*c;if(!(p*p<wQ))return[e+(p=(u*(t-i)-d*(e-o))/p)*l,t+p*c]}(P,O,N,q,z,j,L,D))){var F=P-T[0],W=O-T[1],B=z-T[0],$=j-T[1],H=1/xQ(function(e){return e>1?0:e<-1?SQ:Math.acos(e)}((F*B+W*$)/(vQ(F*F+W*W)*vQ(B*B+$*$)))/2),V=vQ(T[0]*T[0]+T[1]*T[1]);M=bQ(k,(u-V)/(H-1)),R=bQ(k,(d-V)/(H+1))}}S>wQ?R>wQ?(g=OQ(N,q,P,O,d,R,m),y=OQ(z,j,L,D,d,R,m),s.moveTo(g.cx+g.x01,g.cy+g.y01),R<k?s.arc(g.cx,g.cy,R,gQ(g.y01,g.x01),gQ(y.y01,y.x01),!m):(s.arc(g.cx,g.cy,R,gQ(g.y01,g.x01),gQ(g.y11,g.x11),!m),s.arc(0,0,d,gQ(g.cy+g.y11,g.cx+g.x11),gQ(y.cy+y.y11,y.cx+y.x11),!m),s.arc(y.cx,y.cy,R,gQ(y.y11,y.x11),gQ(y.y01,y.x01),!m))):(s.moveTo(P,O),s.arc(0,0,d,_,b,!m)):s.moveTo(P,O),u>wQ&&w>wQ?M>wQ?(g=OQ(L,D,z,j,u,-M,m),y=OQ(P,O,N,q,u,-M,m),s.lineTo(g.cx+g.x01,g.cy+g.y01),M<k?s.arc(g.cx,g.cy,M,gQ(g.y01,g.x01),gQ(y.y01,y.x01),!m):(s.arc(g.cx,g.cy,M,gQ(g.y01,g.x01),gQ(g.y11,g.x11),!m),s.arc(0,0,u,gQ(g.cy+g.y11,g.cx+g.x11),gQ(y.cy+y.y11,y.cx+y.x11),m),s.arc(y.cx,y.cy,M,gQ(y.y11,y.x11),gQ(y.y01,y.x01),!m))):s.arc(0,0,u,v,x,m):s.lineTo(L,D)}else s.moveTo(0,0);if(s.closePath(),l)return s=null,l+""||null}return l.centroid=function(){var n=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,r=(+o.apply(this,arguments)+ +i.apply(this,arguments))/2-SQ/2;return[yQ(r)*n,xQ(r)*n]},l.innerRadius=function(t){return arguments.length?(e="function"==typeof t?t:fQ(+t),l):e},l.outerRadius=function(e){return arguments.length?(t="function"==typeof e?e:fQ(+e),l):t},l.cornerRadius=function(e){return arguments.length?(n="function"==typeof e?e:fQ(+e),l):n},l.padRadius=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:fQ(+e),l):r},l.startAngle=function(e){return arguments.length?(o="function"==typeof e?e:fQ(+e),l):o},l.endAngle=function(e){return arguments.length?(i="function"==typeof e?e:fQ(+e),l):i},l.padAngle=function(e){return arguments.length?(a="function"==typeof e?e:fQ(+e),l):a},l.context=function(e){return arguments.length?(s=null==e?null:e,l):s},l}function DQ(e){this._context=e}function TQ(e){return new DQ(e)}function zQ(e){return e[0]}function jQ(e){return e[1]}function NQ(){var e=zQ,t=null,n=fQ(0),r=jQ,o=fQ(!0),i=null,a=TQ,s=null;function l(l){var c,u,d,p,h,f=l.length,m=!1,g=new Array(f),y=new Array(f);for(null==i&&(s=a(h=hQ())),c=0;c<=f;++c){if(!(c<f&&o(p=l[c],c,l))===m)if(m=!m)u=c,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),d=c-1;d>=u;--d)s.point(g[d],y[d]);s.lineEnd(),s.areaEnd()}m&&(g[c]=+e(p,c,l),y[c]=+n(p,c,l),s.point(t?+t(p,c,l):g[c],r?+r(p,c,l):y[c]))}if(h)return s=null,h+""||null}function c(){return function(){var e=zQ,t=jQ,n=fQ(!0),r=null,o=TQ,i=null;function a(a){var s,l,c,u=a.length,d=!1;for(null==r&&(i=o(c=hQ())),s=0;s<=u;++s)!(s<u&&n(l=a[s],s,a))===d&&((d=!d)?i.lineStart():i.lineEnd()),d&&i.point(+e(l,s,a),+t(l,s,a));if(c)return i=null,c+""||null}return a.x=function(t){return arguments.length?(e="function"==typeof t?t:fQ(+t),a):e},a.y=function(e){return arguments.length?(t="function"==typeof e?e:fQ(+e),a):t},a.defined=function(e){return arguments.length?(n="function"==typeof e?e:fQ(!!e),a):n},a.curve=function(e){return arguments.length?(o=e,null!=r&&(i=o(r)),a):o},a.context=function(e){return arguments.length?(null==e?r=i=null:i=o(r=e),a):r},a}().defined(o).curve(a).context(i)}return l.x=function(n){return arguments.length?(e="function"==typeof n?n:fQ(+n),t=null,l):e},l.x0=function(t){return arguments.length?(e="function"==typeof t?t:fQ(+t),l):e},l.x1=function(e){return arguments.length?(t=null==e?null:"function"==typeof e?e:fQ(+e),l):t},l.y=function(e){return arguments.length?(n="function"==typeof e?e:fQ(+e),r=null,l):n},l.y0=function(e){return arguments.length?(n="function"==typeof e?e:fQ(+e),l):n},l.y1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:fQ(+e),l):r},l.lineX0=l.lineY0=function(){return c().x(e).y(n)},l.lineY1=function(){return c().x(e).y(r)},l.lineX1=function(){return c().x(t).y(n)},l.defined=function(e){return arguments.length?(o="function"==typeof e?e:fQ(!!e),l):o},l.curve=function(e){return arguments.length?(a=e,null!=i&&(s=a(i)),l):a},l.context=function(e){return arguments.length?(null==e?i=s=null:s=a(i=e),l):i},l}function qQ(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function FQ(e){return e}DQ.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};var WQ=Array.prototype.slice;function BQ(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function $Q(e){this._context=e}function HQ(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function VQ(e,t){this._context=e,this._k=(1-t)/6}$Q.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:BQ(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:BQ(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},VQ.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:HQ(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:HQ(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var GQ=function e(t){function n(e){return new VQ(e,t)}return n.tension=function(t){return e(+t)},n}(0);function UQ(e,t){this._context=e,this._alpha=t}UQ.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:!function(e,t,n){var r=e._x1,o=e._y1,i=e._x2,a=e._y2;if(e._l01_a>wQ){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,o=(o*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>wQ){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);i=(i*c+e._x1*e._l23_2a-t*e._l12_2a)/u,a=(a*c+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,o,i,a,e._x2,e._y2)}(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var YQ=function e(t){function n(e){return t?new UQ(e,t):new VQ(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function KQ(e){return e<0?-1:1}function XQ(e,t,n){var r=e._x1-e._x0,o=t-e._x1,i=(e._y1-e._y0)/(r||o<0&&-0),a=(n-e._y1)/(o||r<0&&-0),s=(i*o+a*r)/(r+o);return(KQ(i)+KQ(a))*Math.min(Math.abs(i),Math.abs(a),.5*Math.abs(s))||0}function JQ(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function ZQ(e,t,n){var r=e._x0,o=e._y0,i=e._x1,a=e._y1,s=(i-r)/3;e._context.bezierCurveTo(r+s,o+s*t,i-s,a-s*n,i,a)}function QQ(e){this._context=e}function e0(e){this._context=new t0(e)}function t0(e){this._context=e}function n0(e){this._context=e}function r0(e){var t,n,r=e.length-1,o=new Array(r),i=new Array(r),a=new Array(r);for(o[0]=0,i[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)o[t]=1,i[t]=4,a[t]=4*e[t]+2*e[t+1];for(o[r-1]=2,i[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=o[t]/i[t-1],i[t]-=n,a[t]-=n*a[t-1];for(o[r-1]=a[r-1]/i[r-1],t=r-2;t>=0;--t)o[t]=(a[t]-o[t+1])/i[t];for(i[r-1]=(e[r]+o[r-1])/2,t=0;t<r-1;++t)i[t]=2*e[t+1]-o[t+1];return[o,i]}function o0(e,t){this._context=e,this._t=t}function i0(e,t){if((o=e.length)>1)for(var n,r,o,i=1,a=e[t[0]],s=a.length;i<o;++i)for(r=a,a=e[t[i]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function a0(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function s0(e,t){return e[t]}function l0(e){for(var t,n=-1,r=0,o=e.length,i=-1/0;++n<o;)(t=+e[n][1])>i&&(i=t,r=n);return r}function c0(e){for(var t,n=0,r=-1,o=e.length;++r<o;)(t=+e[r][1])&&(n+=t);return n}function u0(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"unspecified",r=arguments.length>2?arguments[2]:void 0;const o={},i=e||{get:()=>{},has:()=>!1,default:()=>{}};function a(e,t){if(!e||"string"!=typeof e)throw new TypeError("Invalid argument: key must be a non-empty string");return!(e in o)&&(o[e]=t,!0)}function s(e){return o[e]||i.get(e)}function l(e,o){if(void 0!==o)return a(e,o);const i=s(e);return r&&void 0===i&&r.warn("".concat(e," does not exist in ").concat(n," registry")),i||s(t)}return t=i.default(),l.add=a,l.get=s,l.has=function(e){return!!o[e]||i.has(e)},l.remove=function(e){const t=o[e];return delete o[e],t},l.getKeys=function(){return Object.keys(o)},l.getValues=function(){return Object.keys(o).map((e=>o[e]))},l.default=function(e){return void 0!==e&&(t=e),t},l.register=a,l}function d0(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 p0(e){return(e=d0(Math.abs(e)))?e[1]:NaN}QQ.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:ZQ(this,this._t0,JQ(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,ZQ(this,JQ(this,n=XQ(this,e,t)),n);break;default:ZQ(this,this._t0,n=XQ(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(e0.prototype=Object.create(QQ.prototype)).point=function(e,t){QQ.prototype.point.call(this,t,e)},t0.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,o,i){this._context.bezierCurveTo(t,e,r,n,i,o)}},n0.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=r0(e),o=r0(t),i=0,a=1;a<n;++i,++a)this._context.bezierCurveTo(r[0][i],o[0][i],r[1][i],o[1][i],e[a],t[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},o0.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};var h0,f0=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function m0(e){if(!(t=f0.exec(e)))throw new Error("invalid format: "+e);var t;return new g0({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function g0(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function y0(e,t){var n=d0(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}m0.prototype=g0.prototype,g0.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var _0={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>y0(100*e,t),r:y0,s:function(e,t){var n=d0(e,t);if(!n)return e+"";var r=n[0],o=n[1],i=o-(h0=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,a=r.length;return i===a?r:i>a?r+new Array(i-a+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+d0(e,Math.max(0,t+i-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function b0(e){return e}var x0,v0,w0,S0=Array.prototype.map,C0=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function E0(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?b0:(t=S0.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var o=e.length,i=[],a=0,s=t[0],l=0;o>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),i.push(e.substring(o-=s,o+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return i.reverse().join(n)}),o=void 0===e.currency?"":e.currency[0]+"",i=void 0===e.currency?"":e.currency[1]+"",a=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?b0:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(S0.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"−":e.minus+"",u=void 0===e.nan?"NaN":e.nan+"";function d(e){var t=(e=m0(e)).fill,n=e.align,d=e.sign,p=e.symbol,h=e.zero,f=e.width,m=e.comma,g=e.precision,y=e.trim,_=e.type;"n"===_?(m=!0,_="g"):_0[_]||(void 0===g&&(g=12),y=!0,_="g"),(h||"0"===t&&"="===n)&&(h=!0,t="0",n="=");var b="$"===p?o:"#"===p&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",x="$"===p?i:/[%p]/.test(_)?l:"",v=_0[_],w=/[defgprs%]/.test(_);function S(e){var o,i,l,p=b,S=x;if("c"===_)S=v(e)+S,e="";else{var C=(e=+e)<0||1/e<0;if(e=isNaN(e)?u:v(Math.abs(e),g),y&&(e=function(e){e:for(var t,n=e.length,r=1,o=-1;r<n;++r)switch(e[r]){case".":o=t=r;break;case"0":0===o&&(o=r),t=r;break;default:if(!+e[r])break e;o>0&&(o=0)}return o>0?e.slice(0,o)+e.slice(t+1):e}(e)),C&&0==+e&&"+"!==d&&(C=!1),p=(C?"("===d?d:c:"-"===d||"("===d?"":d)+p,S=("s"===_?C0[8+h0/3]:"")+S+(C&&"("===d?")":""),w)for(o=-1,i=e.length;++o<i;)if(48>(l=e.charCodeAt(o))||l>57){S=(46===l?a+e.slice(o+1):e.slice(o))+S,e=e.slice(0,o);break}}m&&!h&&(e=r(e,1/0));var E=p.length+e.length+S.length,k=E<f?new Array(f-E+1).join(t):"";switch(m&&h&&(e=r(k+e,k.length?f-S.length:1/0),k=""),n){case"<":e=p+e+S+k;break;case"=":e=p+k+e+S;break;case"^":e=k.slice(0,E=k.length>>1)+p+e+S+k.slice(E);break;default:e=k+p+e+S}return s(e)}return g=void 0===g?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),S.toString=function(){return e+""},S}return{format:d,formatPrefix:function(e,t){var n=d(((e=m0(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(p0(t)/3))),o=Math.pow(10,-r),i=C0[8+r/3];return function(e){return n(o*e)+i}}}}!function(e){x0=E0(e),v0=x0.format,w0=x0.formatPrefix}({thousands:",",grouping:[3],currency:["$",""]});const k0=new Date,M0=new Date;function R0(e,t,n,r){function o(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return o.floor=t=>(e(t=new Date(+t)),t),o.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),o.round=e=>{const t=o(e),n=o.ceil(e);return e-t<n-e?t:n},o.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),o.range=(n,r,i)=>{const a=[];if(n=o.ceil(n),i=null==i?1:Math.floor(i),!(n<r&&i>0))return a;let s;do{a.push(s=new Date(+n)),t(n,i),e(n)}while(s<n&&n<r);return a},o.filter=n=>R0((t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),((e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););})),n&&(o.count=(t,r)=>(k0.setTime(+t),M0.setTime(+r),e(k0),e(M0),Math.floor(n(k0,M0))),o.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?o.filter(r?t=>r(t)%e==0:t=>o.count(0,t)%e==0):o:null)),o}const A0=6e4,I0=864e5,P0=6048e5,O0=R0((e=>e.setHours(0,0,0,0)),((e,t)=>e.setDate(e.getDate()+t)),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*A0)/I0),(e=>e.getDate()-1));O0.range;const L0=R0((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/I0),(e=>e.getUTCDate()-1));L0.range;const D0=R0((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/I0),(e=>Math.floor(e/I0)));function T0(e){return R0((t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),((e,t)=>{e.setDate(e.getDate()+7*t)}),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*A0)/P0))}D0.range;const z0=T0(0),j0=T0(1),N0=T0(2),q0=T0(3),F0=T0(4),W0=T0(5),B0=T0(6);function $0(e){return R0((t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)}),((e,t)=>(t-e)/P0))}z0.range,j0.range,N0.range,q0.range,F0.range,W0.range,B0.range;const H0=$0(0),V0=$0(1),G0=$0(2),U0=$0(3),Y0=$0(4),K0=$0(5),X0=$0(6);H0.range,V0.range,G0.range,U0.range,Y0.range,K0.range,X0.range;const J0=R0((e=>{e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,t)=>{e.setFullYear(e.getFullYear()+t)}),((e,t)=>t.getFullYear()-e.getFullYear()),(e=>e.getFullYear()));J0.every=e=>isFinite(e=Math.floor(e))&&e>0?R0((t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,n)=>{t.setFullYear(t.getFullYear()+n*e)})):null,J0.range;const Z0=R0((e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)}),((e,t)=>t.getUTCFullYear()-e.getUTCFullYear()),(e=>e.getUTCFullYear()));function Q0(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function e1(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function t1(e){let t,n,r;function o(e,r,o=0,i=e.length){if(o<i){if(0!==t(r,r))return i;do{const t=o+i>>>1;n(e[t],r)<0?o=t+1:i=t}while(o<i)}return o}return 2!==e.length?(t=Q0,n=(t,n)=>Q0(e(t),n),r=(t,n)=>e(t)-n):(t=e===Q0||e===e1?e:n1,n=e,r=e),{left:o,center:function(e,t,n=0,i=e.length){const a=o(e,t,n,i-1);return a>n&&r(e[a-1],t)>-r(e[a],t)?a-1:a},right:function(e,r,o=0,i=e.length){if(o<i){if(0!==t(r,r))return i;do{const t=o+i>>>1;n(e[t],r)<=0?o=t+1:i=t}while(o<i)}return o}}}function n1(){return 0}Z0.every=e=>isFinite(e=Math.floor(e))&&e>0?R0((t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null,Z0.range;const r1=t1(Q0).right;t1((function(e){return null===e?NaN:+e})).center;var o1=r1;class i1 extends Map{constructor(e,t=s1){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,n]of e)this.set(t,n)}get(e){return super.get(a1(this,e))}has(e){return super.has(a1(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},n){const r=t(n);e.has(r)&&(n=e.get(r),e.delete(r));return n}(this,e))}}function a1({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function s1(e){return null!==e&&"object"==typeof e?e.valueOf():e}const l1=Math.sqrt(50),c1=Math.sqrt(10),u1=Math.sqrt(2);function d1(e,t,n){const r=(t-e)/Math.max(0,n),o=Math.floor(Math.log10(r)),i=r/Math.pow(10,o),a=i>=l1?10:i>=c1?5:i>=u1?2:1;let s,l,c;return o<0?(c=Math.pow(10,-o)/a,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,o)*a,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=n&&n<2?d1(e,t,2*n):[s,l,c]}function p1(e,t,n){return d1(e=+e,t=+t,n=+n)[2]}function h1(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 f1(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 m1(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function g1(e){var t=e.dateTime,n=e.date,r=e.time,o=e.periods,i=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=S1(o),u=C1(o),d=S1(i),p=C1(i),h=S1(a),f=C1(a),m=S1(s),g=C1(s),y=S1(l),_=C1(l),b={a:function(e){return a[e.getDay()]},A:function(e){return i[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:V1,e:V1,f:X1,g:s2,G:c2,H:G1,I:U1,j:Y1,L:K1,m:J1,M:Z1,p:function(e){return o[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:O2,s:L2,S:Q1,u:e2,U:t2,V:r2,w:o2,W:i2,x:null,X:null,y:a2,Y:l2,Z:u2,"%":P2},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return i[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:d2,e:d2,f:g2,g:M2,G:A2,H:p2,I:h2,j:f2,L:m2,m:y2,M:_2,p:function(e){return o[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:O2,s:L2,S:b2,u:x2,U:v2,V:S2,w:C2,W:E2,x:null,X:null,y:k2,Y:R2,Z:I2,"%":P2},v={a:function(e,t,n){var r=h.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=y.exec(t.slice(n));return r?(e.m=_.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return C(e,t,n,r)},d:T1,e:T1,f:W1,g:P1,G:I1,H:j1,I:j1,j:z1,L:F1,m:D1,M:N1,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1},q:L1,Q:$1,s:H1,S:q1,u:k1,U:M1,V:R1,w:E1,W:A1,x:function(e,t,r){return C(e,n,t,r)},X:function(e,t,n){return C(e,r,t,n)},y:P1,Y:I1,Z:O1,"%":B1};function w(e,t){return function(n){var r,o,i,a=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(o=y1[r=e.charAt(++s)])?r=e.charAt(++s):o="e"===r?" ":"0",(i=t[r])&&(r=i(n,o)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function S(e,t){return function(n){var r,o,i=m1(1900,void 0,1);if(C(i,e,n+="",0)!=n.length)return null;if("Q"in i)return new Date(i.Q);if("s"in i)return new Date(1e3*i.s+("L"in i?i.L:0));if(t&&!("Z"in i)&&(i.Z=0),"p"in i&&(i.H=i.H%12+12*i.p),void 0===i.m&&(i.m="q"in i?i.q:0),"V"in i){if(i.V<1||i.V>53)return null;"w"in i||(i.w=1),"Z"in i?(o=(r=f1(m1(i.y,0,1))).getUTCDay(),r=o>4||0===o?V0.ceil(r):V0(r),r=L0.offset(r,7*(i.V-1)),i.y=r.getUTCFullYear(),i.m=r.getUTCMonth(),i.d=r.getUTCDate()+(i.w+6)%7):(o=(r=h1(m1(i.y,0,1))).getDay(),r=o>4||0===o?j0.ceil(r):j0(r),r=O0.offset(r,7*(i.V-1)),i.y=r.getFullYear(),i.m=r.getMonth(),i.d=r.getDate()+(i.w+6)%7)}else("W"in i||"U"in i)&&("w"in i||(i.w="u"in i?i.u%7:"W"in i?1:0),o="Z"in i?f1(m1(i.y,0,1)).getUTCDay():h1(m1(i.y,0,1)).getDay(),i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(o+5)%7:i.w+7*i.U-(o+6)%7);return"Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,f1(i)):h1(i)}}function C(e,t,n,r){for(var o,i,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(o=t.charCodeAt(a++))){if(o=t.charAt(a++),!(i=v[o in y1?t.charAt(a++):o])||(r=i(e,n,r))<0)return-1}else if(o!=n.charCodeAt(r++))return-1}return r}return b.x=w(n,b),b.X=w(r,b),b.c=w(t,b),x.x=w(n,x),x.X=w(r,x),x.c=w(t,x),{format:function(e){var t=w(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=S(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=w(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=S(e+="",!0);return t.toString=function(){return e},t}}}var y1={"-":"",_:" ",0:"0"},_1=/^\s*\d+/,b1=/^%/,x1=/[\\^$*+?|[\]().{}]/g;function v1(e,t,n){var r=e<0?"-":"",o=(r?-e:e)+"",i=o.length;return r+(i<n?new Array(n-i+1).join(t)+o:o)}function w1(e){return e.replace(x1,"\\$&")}function S1(e){return new RegExp("^(?:"+e.map(w1).join("|")+")","i")}function C1(e){return new Map(e.map(((e,t)=>[e.toLowerCase(),t])))}function E1(e,t,n){var r=_1.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function k1(e,t,n){var r=_1.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function M1(e,t,n){var r=_1.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function R1(e,t,n){var r=_1.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function A1(e,t,n){var r=_1.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function I1(e,t,n){var r=_1.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function P1(e,t,n){var r=_1.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function O1(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 L1(e,t,n){var r=_1.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function D1(e,t,n){var r=_1.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function T1(e,t,n){var r=_1.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function z1(e,t,n){var r=_1.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function j1(e,t,n){var r=_1.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function N1(e,t,n){var r=_1.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function q1(e,t,n){var r=_1.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function F1(e,t,n){var r=_1.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function W1(e,t,n){var r=_1.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function B1(e,t,n){var r=b1.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function $1(e,t,n){var r=_1.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function H1(e,t,n){var r=_1.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function V1(e,t){return v1(e.getDate(),t,2)}function G1(e,t){return v1(e.getHours(),t,2)}function U1(e,t){return v1(e.getHours()%12||12,t,2)}function Y1(e,t){return v1(1+O0.count(J0(e),e),t,3)}function K1(e,t){return v1(e.getMilliseconds(),t,3)}function X1(e,t){return K1(e,t)+"000"}function J1(e,t){return v1(e.getMonth()+1,t,2)}function Z1(e,t){return v1(e.getMinutes(),t,2)}function Q1(e,t){return v1(e.getSeconds(),t,2)}function e2(e){var t=e.getDay();return 0===t?7:t}function t2(e,t){return v1(z0.count(J0(e)-1,e),t,2)}function n2(e){var t=e.getDay();return t>=4||0===t?F0(e):F0.ceil(e)}function r2(e,t){return e=n2(e),v1(F0.count(J0(e),e)+(4===J0(e).getDay()),t,2)}function o2(e){return e.getDay()}function i2(e,t){return v1(j0.count(J0(e)-1,e),t,2)}function a2(e,t){return v1(e.getFullYear()%100,t,2)}function s2(e,t){return v1((e=n2(e)).getFullYear()%100,t,2)}function l2(e,t){return v1(e.getFullYear()%1e4,t,4)}function c2(e,t){var n=e.getDay();return v1((e=n>=4||0===n?F0(e):F0.ceil(e)).getFullYear()%1e4,t,4)}function u2(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+v1(t/60|0,"0",2)+v1(t%60,"0",2)}function d2(e,t){return v1(e.getUTCDate(),t,2)}function p2(e,t){return v1(e.getUTCHours(),t,2)}function h2(e,t){return v1(e.getUTCHours()%12||12,t,2)}function f2(e,t){return v1(1+L0.count(Z0(e),e),t,3)}function m2(e,t){return v1(e.getUTCMilliseconds(),t,3)}function g2(e,t){return m2(e,t)+"000"}function y2(e,t){return v1(e.getUTCMonth()+1,t,2)}function _2(e,t){return v1(e.getUTCMinutes(),t,2)}function b2(e,t){return v1(e.getUTCSeconds(),t,2)}function x2(e){var t=e.getUTCDay();return 0===t?7:t}function v2(e,t){return v1(H0.count(Z0(e)-1,e),t,2)}function w2(e){var t=e.getUTCDay();return t>=4||0===t?Y0(e):Y0.ceil(e)}function S2(e,t){return e=w2(e),v1(Y0.count(Z0(e),e)+(4===Z0(e).getUTCDay()),t,2)}function C2(e){return e.getUTCDay()}function E2(e,t){return v1(V0.count(Z0(e)-1,e),t,2)}function k2(e,t){return v1(e.getUTCFullYear()%100,t,2)}function M2(e,t){return v1((e=w2(e)).getUTCFullYear()%100,t,2)}function R2(e,t){return v1(e.getUTCFullYear()%1e4,t,4)}function A2(e,t){var n=e.getUTCDay();return v1((e=n>=4||0===n?Y0(e):Y0.ceil(e)).getUTCFullYear()%1e4,t,4)}function I2(){return"+0000"}function P2(){return"%"}function O2(e){return+e}function L2(e){return Math.floor(+e/1e3)}const D2=u0();D2("d3-number",(function(e,t,n){let r,o;function i(e){return o(e)}function a(){i.locale({decimal:n||".",thousands:t||",",grouping:[3],currency:["$",""]})}return i.locale=function(t){return r=E0(t),o=r.format(e),this},a(),i.format=function(e,o,i,s){return(i||s)&&(t=i,n=s,a()),r.format(e)(o)},i.pattern=function(t){return t&&(e=t,o=r.format(t)),e},i})),D2("d3-time",(function(e){let t=g1({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),n=t.format(e);function r(e){return n(e)}return r.format=function(e,n){return t.format(e)(n)},r.locale=function(){return t=g1(...arguments),n=t.format(e),this},r.parse=function(e,n){return t.parse(e)(n)},r.parsePattern=function(e){return t.parse(e)},r}));const T2={id:e=>"".concat(e.source,"/").concat(e.key||e.title),key:e=>String(e.key||e.title),tags:e=>e.tags,min:e=>e.min,max:e=>e.max,type:e=>e.type,title:e=>String(e.title),values:e=>e.values,value:e=>e,label:e=>e,formatter:e=>(e=>{if("function"==typeof e.formatter)return e.formatter();const t=e.formatter||{};return D2(t.type||"d3-number")(t.format||"")})(e)};function z2(e){let{id:t=T2.id,key:n=T2.key,min:r=T2.min,max:o=T2.max,type:i=T2.type,tags:a=T2.tags,title:s=T2.title,values:l=T2.values,value:c=T2.value,label:u=T2.label,formatter:d=T2.formatter}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{id:()=>t(e),key:()=>n(e),raw:()=>e,tags:()=>a(e),type:()=>i(e),min:()=>r(e),max:()=>o(e),title:()=>s(e),items:()=>l(e),formatter:()=>d(e),value:c,label:u}}const j2=e=>e.filter((e=>"number"==typeof e&&!isNaN(e))),N2=e=>e.reduce(((e,t)=>e+t),0),q2={first:e=>e[0],last:e=>e[e.length-1],min:e=>{const t=j2(e);return t.length?Math.min.apply(null,t):NaN},max:e=>{const t=j2(e);return t.length?Math.max.apply(null,t):NaN},sum:e=>{const t=j2(e);return t.length?t.reduce(((e,t)=>e+t),0):NaN},avg:e=>{const t=j2(e),n=t.length;return n?N2(t)/n:NaN}};function F2(e,t,n,r){const o={},i=r.field||(void 0!==e.field?t.field(e.field):null);return Object.keys(n).forEach((a=>{const s=n[a],l=o[a]={};-1!==["number","string","boolean"].indexOf(typeof s)?(l.type="primitive",l.value=s):"function"==typeof s?(l.type="function",l.value=s,l.label=s,l.field=i):"object"==typeof s&&(s.fields?l.fields=s.fields.map((n=>F2(e,t,{main:n},r).main)):void 0!==s.field?(l.type="field",l.field=t.field(s.field),l.value=l.field.value,l.label=l.field.label):i&&(l.value=i.value,l.label=i.label,l.field=i),"function"==typeof s.filter&&(l.filter=s.filter),void 0!==s.value&&(l.value=s.value),void 0!==s.label&&(l.label=s.label),"function"==typeof s.reduce?l.reduce=s.reduce:s.reduce?l.reduce=q2[s.reduce]:l.field&&l.field.reduce&&(l.reduce="string"==typeof l.field.reduce?q2[l.field.reduce]:l.field.reduce),"function"==typeof s.reduceLabel?l.reduceLabel=s.reduceLabel:s.reduceLabel?l.reduceLabel=q2[s.reduceLabel]:l.field&&l.field.reduceLabel&&(l.reduceLabel="string"==typeof l.field.reduceLabel?q2[l.field.reduceLabel]:l.field.reduceLabel))})),o}function W2(e,t){const{main:n}=F2(e,t,{main:{value:e.value,label:e.label,reduce:e.reduce,filter:e.filter}},{});return{props:F2(e,t,e.props||{},n),main:n}}function B2(e,t,n,r){const o=Array(e.length),i=Array(e.length);let a;for(let t=0;t<e.length;t++)a=r?e[t][r]:e[t],o[t]=a.value,i[t]=a.label;const s=t.reduce,l=t.reduceLabel,c=s?s(o):o,u={value:c,label:l?l(i,c):n?n(c):String(c)};return r&&e[0][r].source?(u.source=e[0][r].source,u):!r&&e[0].source?(u.source=e[0].source,u):u}function $2(e,t){let{main:n,propsArr:r,props:o}=t,i=[];const a=n.field.formatter(),s={};return r.forEach((e=>{s[e]=o[e].field?o[e].field.formatter():e=>e})),i.push(...e.map((e=>{const t=B2(e.items,n,a);return r.forEach((n=>{t[n]=B2(e.items,o[n],s[n],n)})),t}))),i}function H2(e){let{cfg:t,itemData:n,obj:r,target:o,tracker:i,trackType:a}=e;const s="function"===a?t.trackBy(n):n[t.trackBy];let l=i[s];l||(l=i[s]={items:[],id:s},o.push(l)),l.items.push(r)}function V2(e){if(e.length<1e4)return Math.max(...e);let t=-1/0;const n=e.length;for(let r=0;r<n;r++)t<e[r]&&(t=e[r]);return t}function G2(e){if(e.length<1e4)return Math.min(...e);let t=1/0;const n=e.length;for(let r=0;r<n;r++)t>e[r]&&(t=e[r]);return t}const U2={diverging:function(e,t){if((s=e.length)>0)for(var n,r,o,i,a,s,l=0,c=e[t[0]].length;l<c;++l)for(i=a=0,n=0;n<s;++n)(o=(r=e[t[n]][l])[1]-r[0])>=0?(r[0]=i,r[1]=i+=o):o<0?(r[1]=a,r[0]=a+=o):r[0]=i},none:i0,silhouette:function(e,t){if((n=e.length)>0){for(var n,r=0,o=e[t[0]],i=o.length;r<i;++r){for(var a=0,s=0;a<n;++a)s+=e[a][r][1]||0;o[r][1]+=o[r][0]=-s/2}i0(e,t)}},expand:function(e,t){if((r=e.length)>0){for(var n,r,o,i=0,a=e[0].length;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}i0(e,t)}},wiggle:function(e,t){if((o=e.length)>0&&(r=(n=e[t[0]]).length)>0){for(var n,r,o,i=0,a=1;a<r;++a){for(var s=0,l=0,c=0;s<o;++s){for(var u=e[t[s]],d=u[a][1]||0,p=(d-(u[a-1][1]||0))/2,h=0;h<s;++h){var f=e[t[h]];p+=(f[a][1]||0)-(f[a-1][1]||0)}l+=d,c+=p*d}n[a-1][1]+=n[a-1][0]=i,l&&(i-=c/l)}n[a-1][1]+=n[a-1][0]=i,i0(e,t)}}},Y2={ascending:function(e){var t=e.map(c0);return a0(e).sort((function(e,n){return t[e]-t[n]}))},insideout:function(e){var t,n,r=e.length,o=e.map(c0),i=function(e){var t=e.map(l0);return a0(e).sort((function(e,n){return t[e]-t[n]}))}(e),a=0,s=0,l=[],c=[];for(t=0;t<r;++t)n=i[t],a<s?(a+=o[n],l.push(n)):(s+=o[n],c.push(n));return c.reverse().concat(l)},none:a0,reverse:function(e){return a0(e).reverse()}};function K2(e,t,n){const r={},o=t.stackKey,i=t.value,a=t.startProp||"start",s=t.endProp||"end",l=t.offset||"none",c=t.order||"none",u=t.valueRef||"";let d=0,p={};for(let t=0;t<e.items.length;t++){let n=e.items[t],i=u?n[u]:null;if(i&&i.source){let e="".concat(i.source.key||"","/").concat(i.source.field);p[e]||(p[e]=i.source)}let a=o(n);r[a]=r[a]||{items:[]},r[a].items.push(n),d=Math.max(d,r[a].items.length)}const h=Array.apply(null,{length:d}).map(Number.call,Number),f=Object.keys(r).map((e=>r[e].items)),m=function(){var e=fQ([]),t=a0,n=i0,r=s0;function o(o){var i,a,s=e.apply(this,arguments),l=o.length,c=s.length,u=new Array(c);for(i=0;i<c;++i){for(var d,p=s[i],h=u[i]=new Array(l),f=0;f<l;++f)h[f]=d=[0,+r(o[f],p,f,o)],d.data=o[f];h.key=p}for(i=0,a=t(u);i<c;++i)u[a[i]].index=i;return n(u,a),u}return o.keys=function(t){return arguments.length?(e="function"==typeof t?t:fQ(WQ.call(t)),o):e},o.value=function(e){return arguments.length?(r="function"==typeof e?e:fQ(+e),o):r},o.order=function(e){return arguments.length?(t=null==e?a0:"function"==typeof e?e:fQ(WQ.call(e)),o):t},o.offset=function(e){return arguments.length?(n=null==e?i0:e,o):n},o}().keys(h).value(((e,t)=>e[t]?i(e[t]):0)).order(Y2[c]).offset(U2[l]);let g=m(f),y=[];for(let e=0;e<g.length;e++){let t=g[e];for(let e=0;e<t.length;e++){let n=t[e],r=t[e].data[t.key];r&&(r[a]={value:n[0]},r[s]={value:n[1]},y.push(n[0],n[1]))}}let _=Object.keys(p).map((e=>{let t=n(p[e].key);return t?t.field(p[e].field):null})).filter((e=>!!e));const b=z2({title:_.map((e=>e.title())).join(", "),min:G2(y),max:V2(y),type:"measure",formatter:_[0]?_[0].formatter:void 0});e.fields.push(b)}function X2(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={};const r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).logger;if(Array.isArray(e))n.items=e.map((e=>({value:e,label:String(e)})));else if(e){if("collection"in e)n=JZ({},t.collection(e.collection));else{const o=t.dataset?t.dataset(e.source):null;let i=e.value||(e=>e),a=e.label||(e=>e);if(e.groupBy||e.mapTo)r.warn('Deprecated "data" configuration',e),n.items=[];else if(e.hierarchy)n.root=o.hierarchy?o.hierarchy(e.hierarchy):null,n.fields=o.fields();else if(e.items)n.items=e.skipNormalize?e.items:e.items.map((e=>({value:i(e),label:String(a(e))})));else if(e.extract){const r=Array.isArray(e.extract)?e.extract:[e.extract];n.items=[];const i=[];r.forEach((e=>{const r=e.source?t.dataset(e.source):o;r&&(n.items=[...n.items,...r.extract(e)],void 0!==e.field&&i.push(r.field(e.field)))})),i.length&&(n.fields=i),e.amend&&Array.isArray(e.amend)&&(n.items=[...n.items,...e.amend])}else if(void 0!==e.field&&o){const t=o.field(e.field);t&&(n.fields||(n.fields=[]),n.fields.push(t),"value"in e||(i=t.value||(e=>e),a=t.label||(e=>e),n.value=i),n.items=t.items().map((t=>({value:i(t),label:String(a(t)),source:{field:e.field}}))))}else e.fields&&e.fields.forEach((e=>{const r="object"==typeof e&&e.source?t.dataset(e.source):o;if(!r)return;let i;i="object"==typeof e&&void 0!==e.field?r.field(e.field):r.field(e),i&&(n.fields||(n.fields=[]),n.fields.push(i))}));n.items&&e.map&&(n.items=n.items.map(e.map))}e&&e.stack&&K2(n,e.stack,t.dataset)}return e&&!Array.isArray(e)&&"function"==typeof e.filter&&n.items&&(n.items=n.items.filter(e.filter)),e&&!Array.isArray(e)&&"function"==typeof e.sort&&n.items&&(n.items=n.items.sort(e.sort)),n}function J2(e,t,n){let r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:X2;if(e.data){const r=o(e.data,t,n);if(r&&r.fields&&r.fields[0])return r.fields[0].formatter()}if(r=e.formatter?"".concat(e.formatter,"-").concat(e.type||"number"):e.type||"d3-number",n.formatter.has(r)){return n.formatter.get(r)(e.format||"")}throw new Error("Formatter of type '".concat(r,"' was not found"))}function Z2(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}const Q2=Symbol("implicit");function e5(){var e=new i1,t=[],n=[],r=Q2;function o(o){let i=e.get(o);if(void 0===i){if(r!==Q2)return r;e.set(o,i=t.push(o)-1)}return n[i%n.length]}return o.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new i1;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return o},o.range=function(e){return arguments.length?(n=Array.from(e),o):n.slice()},o.unknown=function(e){return arguments.length?(r=e,o):r},o.copy=function(){return e5(t,n).unknown(r)},Z2.apply(o,arguments),o}function t5(){var e,t,n=e5().unknown(void 0),r=n.domain,o=n.range,i=0,a=1,s=!1,l=0,c=0,u=.5;function d(){var n=r().length,d=a<i,p=d?a:i,h=d?i:a;e=(h-p)/Math.max(1,n-l+2*c),s&&(e=Math.floor(e)),p+=(h-p-e*(n-l))*u,t=e*(1-l),s&&(p=Math.round(p),t=Math.round(t));var f=function(e,t,n){e=+e,t=+t,n=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+n;for(var r=-1,o=0|Math.max(0,Math.ceil((t-e)/n)),i=new Array(o);++r<o;)i[r]=e+r*n;return i}(n).map((function(t){return p+e*t}));return o(d?f.reverse():f)}return delete n.unknown,n.domain=function(e){return arguments.length?(r(e),d()):r()},n.range=function(e){return arguments.length?([i,a]=e,i=+i,a=+a,d()):[i,a]},n.rangeRound=function(e){return[i,a]=e,i=+i,a=+a,s=!0,d()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(s=!!e,d()):s},n.padding=function(e){return arguments.length?(l=Math.min(1,c=+e),d()):l},n.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),d()):l},n.paddingOuter=function(e){return arguments.length?(c=+e,d()):c},n.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},n.copy=function(){return t5(r(),[i,a]).round(s).paddingInner(l).paddingOuter(c).align(u)},Z2.apply(d(),arguments)}function n5(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function r5(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function o5(){}var i5=.7,a5=1/i5,s5="\\s*([+-]?\\d+)\\s*",l5="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",c5="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",u5=/^#([0-9a-f]{3,8})$/,d5=new RegExp(`^rgb\\(${s5},${s5},${s5}\\)$`),p5=new RegExp(`^rgb\\(${c5},${c5},${c5}\\)$`),h5=new RegExp(`^rgba\\(${s5},${s5},${s5},${l5}\\)$`),f5=new RegExp(`^rgba\\(${c5},${c5},${c5},${l5}\\)$`),m5=new RegExp(`^hsl\\(${l5},${c5},${c5}\\)$`),g5=new RegExp(`^hsla\\(${l5},${c5},${c5},${l5}\\)$`),y5={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 _5(){return this.rgb().formatHex()}function b5(){return this.rgb().formatRgb()}function x5(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=u5.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?v5(t):3===n?new C5(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?w5(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?w5(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=d5.exec(e))?new C5(t[1],t[2],t[3],1):(t=p5.exec(e))?new C5(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=h5.exec(e))?w5(t[1],t[2],t[3],t[4]):(t=f5.exec(e))?w5(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=m5.exec(e))?I5(t[1],t[2]/100,t[3]/100,1):(t=g5.exec(e))?I5(t[1],t[2]/100,t[3]/100,t[4]):y5.hasOwnProperty(e)?v5(y5[e]):"transparent"===e?new C5(NaN,NaN,NaN,0):null}function v5(e){return new C5(e>>16&255,e>>8&255,255&e,1)}function w5(e,t,n,r){return r<=0&&(e=t=n=NaN),new C5(e,t,n,r)}function S5(e,t,n,r){return 1===arguments.length?function(e){return e instanceof o5||(e=x5(e)),e?new C5((e=e.rgb()).r,e.g,e.b,e.opacity):new C5}(e):new C5(e,t,n,null==r?1:r)}function C5(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function E5(){return`#${A5(this.r)}${A5(this.g)}${A5(this.b)}`}function k5(){const e=M5(this.opacity);return`${1===e?"rgb(":"rgba("}${R5(this.r)}, ${R5(this.g)}, ${R5(this.b)}${1===e?")":`, ${e})`}`}function M5(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function R5(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function A5(e){return((e=R5(e))<16?"0":"")+e.toString(16)}function I5(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new O5(e,t,n,r)}function P5(e){if(e instanceof O5)return new O5(e.h,e.s,e.l,e.opacity);if(e instanceof o5||(e=x5(e)),!e)return new O5;if(e instanceof O5)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new O5(a,s,l,e.opacity)}function O5(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function L5(e){return(e=(e||0)%360)<0?e+360:e}function D5(e){return Math.max(0,Math.min(1,e||0))}function T5(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}n5(o5,x5,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:_5,formatHex:_5,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return P5(this).formatHsl()},formatRgb:b5,toString:b5}),n5(C5,S5,r5(o5,{brighter(e){return e=null==e?a5:Math.pow(a5,e),new C5(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?i5:Math.pow(i5,e),new C5(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new C5(R5(this.r),R5(this.g),R5(this.b),M5(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:E5,formatHex:E5,formatHex8:function(){return`#${A5(this.r)}${A5(this.g)}${A5(this.b)}${A5(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:k5,toString:k5})),n5(O5,(function(e,t,n,r){return 1===arguments.length?P5(e):new O5(e,t,n,null==r?1:r)}),r5(o5,{brighter(e){return e=null==e?a5:Math.pow(a5,e),new O5(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?i5:Math.pow(i5,e),new O5(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new C5(T5(e>=240?e-240:e+120,o,r),T5(e,o,r),T5(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new O5(L5(this.h),D5(this.s),D5(this.l),M5(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=M5(this.opacity);return`${1===e?"hsl(":"hsla("}${L5(this.h)}, ${100*D5(this.s)}%, ${100*D5(this.l)}%${1===e?")":`, ${e})`}`}}));var z5=e=>()=>e;function j5(e){return 1==(e=+e)?N5: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):z5(isNaN(t)?n:t)}}function N5(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):z5(isNaN(e)?t:e)}var q5=function e(t){var n=j5(t);function r(e,t){var r=n((e=S5(e)).r,(t=S5(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=N5(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=i(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function F5(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,o=t.slice();return function(i){for(n=0;n<r;++n)o[n]=e[n]*(1-i)+t[n]*i;return o}}function W5(e,t){var n,r=t?t.length:0,o=e?Math.min(r,e.length):0,i=new Array(o),a=new Array(r);for(n=0;n<o;++n)i[n]=Y5(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<o;++n)a[n]=i[n](e);return a}}function B5(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function $5(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function H5(e,t){var n,r={},o={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=Y5(e[n],t[n]):o[n]=t[n];return function(e){for(n in r)o[n]=r[n](e);return o}}var V5=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,G5=new RegExp(V5.source,"g");function U5(e,t){var n,r,o,i=V5.lastIndex=G5.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=V5.exec(e))&&(r=G5.exec(t));)(o=r.index)>i&&(o=t.slice(i,o),s[a]?s[a]+=o:s[++a]=o),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:$5(n,r)})),i=G5.lastIndex;return i<t.length&&(o=t.slice(i),s[a]?s[a]+=o:s[++a]=o),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 Y5(e,t){var n,r=typeof t;return null==t||"boolean"===r?z5(t):("number"===r?$5:"string"===r?(n=x5(t))?(t=n,q5):U5:t instanceof x5?q5:t instanceof Date?B5:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?F5:Array.isArray(t)?W5:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?H5:$5)(e,t)}function K5(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function X5(e){return+e}var J5=[0,1];function Z5(e){return e}function Q5(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function e3(e,t,n){var r=e[0],o=e[1],i=t[0],a=t[1];return o<r?(r=Q5(o,r),i=n(a,i)):(r=Q5(r,o),i=n(i,a)),function(e){return i(r(e))}}function t3(e,t,n){var r=Math.min(e.length,t.length)-1,o=new Array(r),i=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)o[a]=Q5(e[a],e[a+1]),i[a]=n(t[a],t[a+1]);return function(t){var n=o1(e,t,1,r)-1;return i[n](o[n](t))}}function n3(){var e,t,n,r,o,i,a=J5,s=J5,l=Y5,c=Z5;function u(){var e=Math.min(a.length,s.length);return c!==Z5&&(c=function(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(a[0],a[e-1])),r=e>2?t3:e3,o=i=null,d}function d(t){return null==t||isNaN(t=+t)?n:(o||(o=r(a.map(e),s,l)))(e(c(t)))}return d.invert=function(n){return c(t((i||(i=r(s,a.map(e),$5)))(n)))},d.domain=function(e){return arguments.length?(a=Array.from(e,X5),u()):a.slice()},d.range=function(e){return arguments.length?(s=Array.from(e),u()):s.slice()},d.rangeRound=function(e){return s=Array.from(e),l=K5,u()},d.clamp=function(e){return arguments.length?(c=!!e||Z5,u()):c!==Z5},d.interpolate=function(e){return arguments.length?(l=e,u()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,u()}}function r3(e,t,n,r){var o,i=function(e,t,n){n=+n;const r=(t=+t)<(e=+e),o=r?p1(t,e,n):p1(e,t,n);return(r?-1:1)*(o<0?1/-o:o)}(e,t,n);switch((r=m0(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(o=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(p0(t)/3)))-p0(Math.abs(e)))}(i,a))||(r.precision=o),w0(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(o=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,p0(t)-p0(e))+1}(i,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=o-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(o=function(e){return Math.max(0,-p0(Math.abs(e)))}(i))||(r.precision=o-2*("%"===r.type))}return v0(r)}function o3(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){if(!((n=+n)>0))return[];if((e=+e)==(t=+t))return[e];const r=t<e,[o,i,a]=r?d1(t,e,n):d1(e,t,n);if(!(i>=o))return[];const s=i-o+1,l=new Array(s);if(r)if(a<0)for(let e=0;e<s;++e)l[e]=(i-e)/-a;else for(let e=0;e<s;++e)l[e]=(i-e)*a;else if(a<0)for(let e=0;e<s;++e)l[e]=(o+e)/-a;else for(let e=0;e<s;++e)l[e]=(o+e)*a;return l}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return r3(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,o,i=t(),a=0,s=i.length-1,l=i[a],c=i[s],u=10;for(c<l&&(o=l,l=c,c=o,o=a,a=s,s=o);u-- >0;){if((o=p1(l,c,n))===r)return i[a]=l,i[s]=c,t(i);if(o>0)l=Math.floor(l/o)*o,c=Math.ceil(c/o)*o;else{if(!(o<0))break;l=Math.ceil(l*o)/o,c=Math.floor(c*o)/o}r=o}return e},e}function i3(){var e=n3()(Z5,Z5);return e.copy=function(){return function(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}(e,i3())},Z2.apply(e,arguments),o3(e)}function a3(){var e,t=[.5],n=[0,1],r=1;function o(o){return null!=o&&o<=o?n[o1(t,o,0,r)]:e}return o.domain=function(e){return arguments.length?(t=Array.from(e),r=Math.min(t.length,n.length-1),o):t.slice()},o.range=function(e){return arguments.length?(n=Array.from(e),r=Math.min(t.length,n.length-1),o):n.slice()},o.invertExtent=function(e){var r=n.indexOf(e);return[t[r-1],t[r]]},o.unknown=function(t){return arguments.length?(e=t,o):e},o.copy=function(){return a3().domain(t).range(n).unknown(e)},Z2.apply(o,arguments)}function s3(e){return void 0===e?e=>e:t=>e(t)}function l3(e){return Math.max(0,Math.min(1,e))}function c3(e){return"object"==typeof e}function u3(e,t,n){const r=Math.abs(t-n)/(e+1),o=[];for(let i=1;i<=e;i++){const e=i*r;o.push(t<n?t+e:t-e)}return o}function d3(e,t,n){if(1===e.length)return e;const r=e.concat([]);for(let o=0;o<e.length;o++){let i=e[o],a=e[o+1];0===o&&i!==n.start()?(r.push(...u3(t,i,a)),i-=a-i,a=e[o],r.push(...u3(t,i,a))):o===e.length-1&&a!==n.end()?(a=i+(i-e[o-1]),r.push(...u3(t,i,a))):r.push(...u3(t,i,a))}return r.filter((e=>e>=n.min()&&e<=n.max()))}function p3(e){let{distance:t,scale:n,minorCount:r=0,unitDivider:o=100,formatter:i}=e;const a=eQ(o)||eQ(t)?2:Math.max(t/o,2),s=Math.min(1e3,Math.round(a));let l=n.ticks(s);l.length<=1&&(l=n.ticks(s+1));const c=r>0?d3(l,r,n):l;c.sort(((e,t)=>e-t));const u=c.map(s3(i));return c.map(((e,t)=>{const r=n(e);return{position:r,start:r,end:r,label:u[t],value:e,isMinor:-1===l.indexOf(e)}}))}function h3(e){let{distance:t,scale:n,minorCount:r=0,unitDivider:o=100,formatter:i}=e;const a=eQ(o)||eQ(t)?2:Math.max(t/o,2),s=Math.min(1e3,Math.round(a)),l=s>10?10:s;n.nice(l);const c=n.ticks(s),u=r>0?d3(c,r,n):c;u.sort(((e,t)=>e-t));const d=u.map(s3(i));return u.map(((e,t)=>{const r=n(e);return{position:r,start:r,end:r,label:d[t],value:e,isMinor:-1===c.indexOf(e)}}))}function f3(e){let t,{settings:n,scale:r,distance:o,formatter:i=e=>e}=e;const a=n.minorTicks&&!eQ(n.minorTicks.count)?Math.min(100,n.minorTicks.count):0;if(Array.isArray(n.ticks.values)){const e=n.ticks.values.filter((e=>"object"==typeof e?!eQ(e.value):!eQ(e)));t=function(e){let{values:t,scale:n,formatter:r=e=>e}=e;return t.sort(((e,t)=>(c3(e)?e.value:e)-(c3(t)?t.value:t))).filter(((e,t,r)=>{const o=c3(e)?e.value:e;return o<=n.max()&&o>=n.min()&&r.indexOf(e)===t})).map((e=>{const t=c3(e),o=t?e.value:e,i=n(o);return{position:i,value:o,label:t&&void 0!==e.label?e.label:r(o),isMinor:!!t&&!!e.isMinor,start:t&&!isNaN(e.start)?l3(n(e.start)):i,end:t&&!isNaN(e.end)?l3(n(e.end)):i}}))}({values:e,scale:r.copy(),formatter:i})}else if(eQ(n.ticks.count)){t=(n.ticks.tight?h3:p3)({distance:o,minorCount:a,unitDivider:n.ticks.distance,scale:r,formatter:i}),n.ticks.forceBounds&&function(e,t,n){const r=e.map((e=>e.position)),o=t.range();-1===r.indexOf(o[0])?e.splice(0,0,{position:o[0],start:o[0],end:o[0],label:n(t.start()),isMinor:!1,value:t.start()}):e[0]&&e[0].isMinor&&(e[0].isMinor=!1);const i=e[e.length-1];-1===r.indexOf(o[1])?e.push({position:o[1],start:o[1],end:o[1],label:n(t.end()),isMinor:!1,value:t.end()}):i&&i.isMinor&&(i.isMinor=!1)}(t,r,i)}else{t=function(e){let{count:t,minorCount:n,scale:r,formatter:o}=e;return r.ticks((t-1)*n+t).map(((e,t)=>{const i=r(e);return{position:i,start:i,end:i,label:o(e),isMinor:t%(n+1)!=0,value:e}}))}({count:Math.min(1e3,n.ticks.count),minorCount:a,scale:r.copy(),formatter:i})}return t}function m3(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r={};return Object.keys(t).forEach((o=>{const i=typeof e[o];r[o]="function"===i?e[o](n):"undefined"===i?t[o]:e[o]})),r}const g3={min:NaN,max:NaN,expand:NaN,include:[],invert:!1},y3={tight:!1,forceBounds:!1,values:void 0,count:NaN,distance:100},_3={count:NaN};function b3(e,t){e.instance||(e.instance=t.copy(),e.instance.domain([t.start(),t.end()]),e.instance.clamp(!0),e.instance.range(e.invert?[1,0]:[0,1]))}function x3(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=i3(),o={instance:null,invert:!1},i={data:t,resources:n},a=m3(e,g3,i);let s;function l(e){return eQ(e)?NaN:r(e)}a.ticks=m3(e.ticks,y3,i),a.minorTicks=m3(e.minorTicks,_3,i),l.data=()=>t,l.invert=function(e){return r.invert(e)},l.rangeRound=function(e){return r.rangeRound(e),l},l.clamp=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return r.clamp(e),l},l.cachedTicks=function(){return s},l.clearTicksCache=function(){return s=void 0,this},l.ticks=function(e){return null!==e&&"object"==typeof e?(e.settings=e.settings||{},e.settings=UZ(!0,{},a,e.settings),e.scale=l,s=f3(e),s):(s=r.ticks(e),s)},l.nice=function(e){return r.nice(e),l},l.tickFormat=function(e,t){return r.tickFormat(e,t)},l.interpolate=function(e){return r.interpolate(e),l},l.domain=function(e){return arguments.length?(r.domain(e),o.instance&&o.instance.domain([l.start(),l.end()]),l):r.domain()},l.range=function(e){return arguments.length?(r.range(e),l):r.range()},l.start=function(){return l.domain()[0]},l.end=function(){return l.domain()[this.domain().length-1]},l.min=function(){return Math.min(this.start(),this.end())},l.max=function(){return Math.max(this.start(),this.end())},l.classify=function(e){let t=(l.start()-l.end())/e,n=[l.end()],r=[],o=t/2;for(let i=0;i<e;i++){let e=n[n.length-1]||0,i=e+t,a=l(e+o);n.push(i,i),r.push(a,a)}return n.pop(),l.domain(n),l.range(r),l},l.copy=function(){const o=x3(e,t,n);return o.domain(l.domain()),o.range(l.range()),o.clamp(r.clamp()),o},l.norm=function(e){return b3(o,l),o.instance(e)},l.normInvert=function(e){return b3(o,l),o.instance.invert(e)};const{mini:c,maxi:u}=function(e,t){const n=+e.min,r=+e.max;let o=0,i=1;if(t&&t[0]){const n=t.map((e=>e.min())).filter((e=>!isNaN(e))),r=t.map((e=>e.max())).filter((e=>!isNaN(e)));if(o=n.length?Math.min(...n):Number.NaN,i=r.length?Math.max(...r):Number.NaN,isNaN(o)||isNaN(i))o=-1,i=1;else if(o===i&&0===o)o=-1,i=1;else if(o===i&&o)o-=Math.abs(.1*o),i+=Math.abs(.1*i);else if(!isNaN(e.expand)){const t=i-o;o-=t*e.expand,i+=t*e.expand}if(Array.isArray(e.include)){const t=e.include.filter((e=>!isNaN(e)));o=Math.min(...t,o),i=Math.max(...t,i)}}return{mini:isNaN(n)?o:n,maxi:isNaN(r)?i:r}}(a,t?t.fields:[]);return l.domain([c,u]),l.range(a.invert?[1,0]:[0,1]),o.invert=a.invert,l}const v3={padding:0,paddingInner:NaN,paddingOuter:NaN,align:.5,invert:!1,maxPxStep:NaN,range:[0,1]};function w3(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={data:t,resources:arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}},r=m3(e,v3,n),o=t.items||[],i={},a=[],s=[];function l(e,n){e.data=()=>t,e.datum=e=>o[i[e]],e.start=function(){return e.domain()[0]},e.end=function(){return e.domain()[e.domain().length-1]},e.labels=()=>s,e.ticks=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.scale=e,function(e){let{scale:t}=e;const n=t.domain(),r=t.data().items,o=t.labels?t.labels():n,i=t.bandwidth();return n.map(((e,n)=>{const a=t(e);return{position:a+i/2,label:"".concat(o[n]),data:r?r[n]:void 0,start:a,end:a+i}}))}(t,n.trackBy)}}const c=t5();l(c,e),c.pxScale=function(t){const n=r.maxPxStep;if(isNaN(n))return c;const o=c.domain().length,i=Math.max(1,o-c.paddingInner()+2*c.paddingOuter());if(i*n>=t)return c;const a=c.copy();a.type=c.type,l(a,e);const s=i*n/t,u=(1-s)*c.align();return a.range(r.invert?[s+u,u]:[u,s+u]),a};const u="function"==typeof e.value?e.value:e=>e.datum.value,d="function"==typeof e.label?e.label:e=>e.datum.label;for(let e=0;e<o.length;e++){const t=UZ({datum:o[e]},n),r=u(t,e);-1===a.indexOf(r)&&(a.push(r),s.push(d(t,e)),i[r]=e)}return c.domain(a),c.range(r.invert?r.range.slice().reverse():r.range),c.padding(isNaN(r.padding)?0:r.padding),isNaN(r.paddingInner)||c.paddingInner(r.paddingInner),isNaN(r.paddingOuter)||c.paddingOuter(r.paddingOuter),c.align(isNaN(r.align)?.5:r.align),c}const S3={depth:0};function C3(e,t,n){return e.ancestors().map((e=>t(UZ({datum:e.data},n)))).reverse().slice(1).toString()}const E3=e=>e.min(),k3=e=>e.max();function M3(e,t){const n=e&&!isNaN(e.min),r=e&&!isNaN(e.max);let o=n?+e.min:0,i=r?+e.max:1;if(t&&t.length){if(!n){const e=t.map(E3).filter(QZ);o=e.length?Math.min(...e):o}if(!r){const e=t.map(k3).filter(QZ);i=e.length?Math.max(...e):i}}return[o,i]}const R3={domain:[],range:[],invert:!1,min:NaN,max:NaN};function A3(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=x3(e,t,n).clamp(!0).interpolate(q5),o=m3(e,R3,{data:t,resources:n}),i=Array.isArray(o.domain)&&o.domain.length,a=Array.isArray(o.range)&&o.range.length,s=r;UZ(!0,s,r);const[l,c]=M3(o,t?t.fields:[]),u=i?o.domain.length:-1,d=n.theme?n.theme.palette("sequential",u>0?u:2):[],p=a?o.range:d;return s.range(o.invert?p.slice().reverse():p.slice()),s.domain(i?o.domain:function(e,t,n){const r=e.length;if(2===r)return[t,n];const o=[],i=(n-t)/(r-1);o.push(t);for(let e=1;e<r-1;e++)o.push(t+i*e);return o.push(n),o}(s.range(),l,c)),s}const I3={domain:[],range:[],invert:!1,min:NaN,max:NaN,nice:!1};function P3(e){const t=[];for(let n=0;n<e.length-1;n++)t.push((e[n]+e[n+1])/2);return t}const O3={domain:[],range:[]};const L3={domain:[],range:[],unknown:void 0},D3={domain:[],range:[],override:!1};const T3=u0();function z3(e,t,n){let r=e.data;e.source&&(n.logger.warn("Deprecated: Scale data source configuration"),r={extract:[]},(Array.isArray(e.source)?e.source:[e.source]).forEach((e=>{r.extract.push({field:e})})));const o=X2(r,t,n);let i,a=e.type||function(e){return e.root?"h-band":e.fields&&e.fields[0]?function(e){const t=e.map((e=>"dimension"===e.type()?"band":"linear"));return-1!==t.indexOf("linear")?"linear":"band"}(e.fields):"linear"}(o);return"color"===a&&(a=o.fields&&o.fields[0]&&"dimension"===o.fields[0].type()?"categorical-color":"sequential-color"),n.scale.has(a)&&(i=n.scale.get(a),i=i(e,o,{theme:n.theme,logger:n.logger}),i.type=a),i}T3("linear",x3),T3("band",w3),T3("h-band",(function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const o={data:n,resources:r},i=m3(t,v3,o);i.ticks=m3(t.ticks,S3,o),i.value="function"==typeof t.value?t.value:e=>e.datum.value,i.label="function"==typeof t.label?t.label:e=>e.datum.value;let a=w3(i);const{values:s,labels:l,items:c,ticks:u}=function(e,t,n){const r=t.ticks.depth,o=t.value,i=t.label,a=[],s=[],l={},c=[];let u=0;if(!e)return{values:a,labels:s,items:l,ticks:c};e.eachAfter((e=>{if(e.depth>0){const t=C3(e,o,n),d=e.leaves()||[e],p=o(UZ({datum:e.data},n)),h=i(UZ({datum:e.data},n)),f=Array.isArray(e.children),m={key:t,count:d.length,value:p,label:h,leftEdge:C3(d[0],o,n),rightEdge:C3(d[Math.max(d.length-1,0)],o,n),node:e};f?(a.push("SPACER_".concat(u,"_SPACER")),u++):(a.push(t),s.push(h)),(r<=0&&!f||e.depth===r)&&c.push(m),l[t]=m}}));const d=e.height-1;return d>0&&a.splice(-d),{values:a,labels:s,items:l,ticks:c}}(n.root,i,o),d=function(e){const t=String(e),n=c[t];return a(n?i.invert?n.rightEdge:n.leftEdge:t)};UZ(!0,d,a),d.bandwidth=function(e){const t=c[String(e)],n=a.bandwidth();if(t&&!t.isLeaf){const e=d(t.leftEdge),r=d(t.rightEdge);return Math.abs(e-r)+n}return n},d.step=function(e){const t=c[String(e)],n=t?t.count:1;let r=a.step();return r*=n,r},d.data=()=>n,d.datum=e=>{const t=c[String(e)];return t?t.node.data:null},d.copy=()=>e(t,n,r),d.labels=()=>l,d.ticks=()=>u.map((e=>{const t=d(e.key),n=d.bandwidth(e.key);return{position:t+n/2,label:e.label,data:e.node.data,start:t,end:t+n}}));const p=a.pxScale;return d.pxScale=function(e){return a=p(e),d},d.domain(s),d})),T3("sequential-color",A3),T3("threshold-color",(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=a3(),o=m3(e,I3,{data:t,resources:n}),i=Array.isArray(o.domain)&&o.domain.length,a=Array.isArray(o.range)&&o.range.length;function s(e){return eQ(e)?NaN:r(e)}Object.keys(r).forEach((e=>s[e]=r[e]));const l=t.fields,[c,u]=M3(o,l),d=i?o.domain.length:-1,p=n.theme?n.theme.palette("sequential",d>0?d:2):[];let h=a?o.range:p,f=[];return f=i?o.domain:o.nice?function(e,t,n){const r=2===e.length?10:Math.max(1,e.length),o=i3().domain([t,n]).nice(r).ticks(r);if(!e||!e.length)return o;const i=Math.max(0,e.length-1);for(;o.length>i;)o[0]-t<=n-o[o.length-1]?o.shift():o.pop();return o}(h,c,u):[c+(u-c)/2],h.length>f.length+1?f=function(e,t,n){const r=e.length;if(2===r)return[t+(n-t)/2];const o=[],i=(n-t)/r;for(let e=1;e<r;e++)o.push(t+i*e);return o}(h,c,u):h.length<f.length+1&&(h=function(e,t,n,r){n=e[0],r=e&&e.length>=2?e[e.length-1]:r;const o=A3().domain([n,r]).range(t);return[n,...P3(e),r].map((e=>o(e)))}(f,h,c,u)),s.data=()=>t,s.range(o.invert?h.slice().reverse():h),s.domain(f),s})),T3("categorical-color",(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=e5(),o={data:t,resources:n},i=m3(e,O3,o),a="function"==typeof e.value?e.value:e=>e.datum.value,s="function"==typeof e.label?e.label:e=>e.datum.label,l=t.items||[],c={},u=[],d=[];for(let e=0;e<l.length;e++){const t=UZ({datum:l[e]},o),n=a(t,e);-1===u.indexOf(n)&&(u.push(n),d.push(s(t,e)),c[n]=e)}return r.data=()=>t,r.labels=()=>d,r.label=e=>d[u.indexOf(e)],r.datum=e=>l[c[e]],r.range(i.range),Array.isArray(i.domain)&&i.domain.length?r.domain(i.domain):r.domain(u),r}(e,t,n),o=n.theme,i=m3(e,L3,{data:t,resources:n});let a;if(i.explicit=m3(e.explicit,D3,{data:t,resources:n}),a=Array.isArray(i.range)&&0!==i.range.length?i.range.slice():o?o.palette("categorical",r.domain().length).slice():[],i.unknown)r.unknown(i.unknown);else if(o&&o.palette("unknown")){let e=o.palette("unknown");r.unknown(e[0])}if(Array.isArray(i.explicit.domain)&&i.explicit.domain.length){const e=r.domain().slice(),t=i.explicit.domain,n=Array.isArray(i.explicit.range)?i.explicit.range:[],o=Math.floor(e.length/a.length);for(let e=1;e<o+1;e*=2)a=a.concat(a);if(i.explicit.override)for(let r=0;r<t.length;r++){const o=e.indexOf(t[r]);o>-1&&(a[o]=n[r])}else{const r=t.map(((t,r)=>[e.indexOf(t),t,n[r]])).sort(((e,t)=>e[0]-t[0]));r.forEach((t=>{const n=e.indexOf(t[1]);-1!==n&&a.splice(n,0,t[2])}))}a.length=e.length}return r.range(a),r}));var j3={};function N3(){N3.init.call(this)}j3.isObject=function(e){return"object"==typeof e&&null!==e},j3.isNumber=function(e){return"number"==typeof e},j3.isUndefined=function(e){return void 0===e},j3.isFunction=function(e){return"function"==typeof e};var q3=N3;N3.EventEmitter=N3,N3.prototype._events=void 0,N3.prototype._maxListeners=void 0,N3.defaultMaxListeners=10,N3.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},N3.prototype.setMaxListeners=function(e){if(!j3.isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},N3.prototype.emit=function(e){var t,n,r,o,i,a;if(this._events||(this._events={}),"error"===e&&!this._events.error)throw(t=arguments[1])instanceof Error?t:Error('Uncaught, unspecified "error" event.');if(n=this._events[e],j3.isUndefined(n))return!1;if(j3.isFunction(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(r=arguments.length,o=new Array(r-1),i=1;i<r;i++)o[i-1]=arguments[i];n.apply(this,o)}else if(j3.isObject(n)){for(r=arguments.length,o=new Array(r-1),i=1;i<r;i++)o[i-1]=arguments[i];for(r=(a=n.slice()).length,i=0;i<r;i++)a[i].apply(this,o)}return!0},N3.prototype.addListener=function(e,t){var n;if(!j3.isFunction(t))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,j3.isFunction(t.listener)?t.listener:t),this._events[e]?j3.isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,j3.isObject(this._events[e])&&!this._events[e].warned)&&((n=j3.isUndefined(this._maxListeners)?N3.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,j3.isFunction(console.error)&&console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),j3.isFunction(console.trace)&&console.trace()));return this},N3.prototype.on=N3.prototype.addListener,N3.prototype.once=function(e,t){if(!j3.isFunction(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},N3.prototype.removeListener=function(e,t){var n,r,o,i;if(!j3.isFunction(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(o=(n=this._events[e]).length,r=-1,n===t||j3.isFunction(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(j3.isObject(n)){for(i=o;i-- >0;)if(n[i]===t||n[i].listener&&n[i].listener===t){r=i;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},N3.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],j3.isFunction(n))this.removeListener(e,n);else if(Array.isArray(n))for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},N3.prototype.listeners=function(e){return this._events&&this._events[e]?j3.isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},N3.listenerCount=function(e,t){return e._events&&e._events[t]?j3.isFunction(e._events[t])?1:e._events[t].length:0};var F3={mixin:e=>(Object.keys(q3.prototype).forEach((t=>{e[t]=q3.prototype[t]})),q3.init(e),e)};function W3(){let e=0,t=0,n=0,r=0;n=n||e;const o={move(e){this.moveTo(n+e)},moveTo(i){const a=Math.max(e,Math.min(t-r,i));n!==a&&(n=a,o.emit("update"))},update(i){let a=!1;({min:e=e,max:t=t}=i),void 0!==i.viewSize&&i.viewSize!==r&&(r=i.viewSize,a=!0);const s=Math.max(e,Math.min(t-r,n));n!==s&&(n=s,a=!0),a&&o.emit("update")},getState:()=>({min:e,max:t,start:n,viewSize:r})};return F3.mixin(o),o}function B3(e,t){const n=e.min||0,r=e.max||0,o=e.viewSize||0,i=t||W3();return i.update({min:n,max:r,viewSize:o}),i}function $3(e,t){return e<=t}function H3(e,t){return e<t}function V3(e,t,n){let r=0;for(;r<e.length&&t>e[r];)++r;return e[r]===t&&n&&++r,r}function G3(){let e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=[];function o(){}return o.configure=function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{includeMax:r=!0,includeMin:o=!0}=n;e=r?$3:H3,t=o?$3:H3},o.add=e=>{let{min:t,max:n}=e;const o=V3(r,t),i=V3(r,n,!0),a=[o,i-o];o%2==0&&a.push(t),i%2==0&&a.push(n);const s=r.join(",");r.splice(...a);return s!==r.join(",")},o.remove=e=>{let{min:t,max:n}=e;const o=V3(r,t),i=V3(r,n,!0),a=[o,i-o];o%2==1&&a.push(t),i%2==1&&a.push(n);const s=r.join(",");r.splice(...a);return s!==r.join(",")},o.set=e=>{const t=r.join(",");r=[],Array.isArray(e)?e.forEach(o.add):o.add(e);return t!==r.join(",")},o.clear=()=>{const e=r.length>0;return r=[],e},o.containsValue=n=>function(e,t,n,r){const o=e.length;for(let i=1;i<o;i+=2)if(n(e[i-1],t)&&r(t,e[i]))return!0;return!1}(r,n,t,e),o.containsRange=e=>{let{min:t,max:n}=e;const o=V3(r,t,!0),i=V3(r,n);return o===i&&i%2==1},o.toggle=e=>o.containsRange(e)?o.remove(e):o.add(e),o.ranges=()=>{const e=[];for(let t=1;t<r.length;t+=2)e.push({min:r[t-1],max:r[t]});return e},o.configure(n),o}function U3(){let e=[];function t(){}return t.add=t=>-1===e.indexOf(t)&&(e.push(t),!0),t.remove=t=>{const n=e.indexOf(t);return-1!==n&&(e.splice(n,1),!0)},t.contains=t=>-1!==e.indexOf(t),t.values=()=>e.slice(),t.clear=()=>e=[],t.toString=()=>e.join(";"),t}const Y3={key:void 0,includeMin:!0,includeMax:!0};function K3(e){let{items:t,collection:n,vc:r}=e;const o={},i=[];let a,s;for(let e=0,i=t.length;e<i;e++){a=t[e].key,n[a]||(n[a]=r()),s=t[e].values||[t[e].value];for(let e=0;e<s.length;e++)n[a].add(s[e])&&(o[a]=o[a]||[],o[a].push(s[e]))}const l=Object.keys(o);for(let e=0,t=l.length;e<t;e++)a=l[e],i.push({id:a,values:o[a]});return i}function X3(e){let{items:t,collection:n}=e;const r={},o=[];let i,a;for(let e=0,o=t.length;e<o;e++)if(i=t[e].key,n[i]){a=t[e].values||[t[e].value];for(let e=0;e<a.length;e++)n[i].remove(a[e])&&(r[i]=r[i]||[],r[i].push(a[e]))}const s=Object.keys(r);for(let e=0,t=s.length;e<t;e++)i=s[e],o.push({id:i,values:r[i]});return o}function J3(e){const t={};let n,r;for(let o=0,i=e.length;o<i;o++){n=e[o].key,r=e[o].values||[e[o].value],t[n]||(t[n]=[]);for(let e=0;e<r.length;e++){-1===t[n].indexOf(r[e])&&t[n].push(r[e])}}return t}function Z3(e){let{key:t,collection:n,obj:r,fn:o,value:i}=e;n[t]||(n[t]=o()),r[t]=r[t]||[],r[t].push(i),n[t].add(i)}function Q3(e,t){const n=[],r=Object.keys(e);let o,i;const a=e=>-1===t[o].indexOf(e);for(let s=0,l=r.length;s<l;s++)o=r[s],t[o]?(i=e[o].filter(a),i.length&&n.push({id:o,values:i})):n.push({id:o,values:e[o]});return n}function e6(e,t,n){const r=function(e,t){if(!Object.keys(t).length)return e;const n=e.length,r=Array(n);for(let o=0;o<n;o++)r[o]=e[o].key in t?UZ({},e[o],{key:t[e[o].key]}):e[o];return r}(t,n);return e&&e.length?e.reduce(((e,t)=>t(e)),r):r}function t6(e){return e.replace(/(-[a-z])/g,(e=>e.toUpperCase().replace("-","")))}function n6(e){return e.replace(/([A-Z])/g,(e=>"-".concat(e.toLowerCase())))}function r6(e,t,n){let{ranges:r,interceptors:o,rc:i,aliases:a,rangeConfig:s}=n;const l=e6(o["".concat(t,"Ranges")],e,a);let c=!1;return l.forEach((e=>{const n=e.key;if(r[n]||(r[n]=i(s.sources[n]||s.default)),"set"===t)c=r[n][t](e.ranges||e.range)||c;else{const o=e.ranges||[e.range];for(let e=0;e<o.length;e++)c=r[n][t](o[e])||c}})),c}function o6(){let{vc:e=U3,rc:t=G3}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=!1,r={},o={},i={},a={sources:{},default:UZ({},Y3)};const s={addValues:[],removeValues:[],toggleValues:[],setValues:[],addRanges:[],setRanges:[],removeRanges:[],toggleRanges:[]},l=()=>{const e={values:{},ranges:{}};return Object.keys(o).forEach((t=>{e.values[t]=o[t].values()})),Object.keys(r).forEach((t=>{e.ranges[t]=r[t].ranges()})),e},c={ls:[],clear(){this.ls.forEach((e=>e.clear()))},start(){this.ls.forEach((e=>e.start()))},end(){this.ls.forEach((e=>e.end()))},update(){const e=l();this.ls.forEach((t=>t._state(e)))},updateValues(){const e=l();this.ls.forEach((t=>t._state({values:e.values})))},updateRanges(){const e=l();this.ls.forEach((t=>t._state({ranges:e.ranges})))}},u={configure:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Array.isArray(e.ranges)&&e.ranges.length&&(a={sources:{},default:UZ({},Y3)},e.ranges.forEach((e=>{const t={};Object.keys(Y3).filter((e=>"key"!==e)).forEach((n=>{t[n]=void 0!==e[n]?e[n]:Y3[n]})),void 0!==e.key?a.sources[e.key]=t:a.default=t})),Object.keys(r).forEach((e=>r[e].configure(a.sources[e]||a.default))),u.emit("update",[],[]))},link:e=>{if(u===e)throw new Error("Can't link to self");c.ls.push(e),e._state(l())},_state:e=>{if(!e)return l();if(e.values){const t=[];Object.keys(e.values).forEach((n=>{o[n]&&e.values[n].join(";")===o[n].toString()||t.push({key:n,values:e.values[n]})})),Object.keys(o).forEach((n=>{e.values[n]||t.push({key:n,values:[]})})),t.length&&u.setValues(t)}if(e.ranges){const t=[];Object.keys(e.ranges).forEach((n=>{r[n]&&e.ranges[n].join(";")===r[n].toString()||t.push({key:n,ranges:e.ranges[n]})})),Object.keys(r).forEach((n=>{e.ranges[n]||t.push({key:n,ranges:[]})})),t.length&&u.setRanges(t)}},start:function(){if(!n){n=!0;for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];u.emit("start",...t),c.start()}},end:function(){if(n){n=!1,r={},o={};for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];u.emit("end",...t),c.end()}},isActive:()=>n,clear:()=>{const e=u.brushes().filter((e=>"value"===e.type&&e.brush.values().length)).map((e=>({id:e.id,values:e.brush.values()}))),t=Object.keys(r).length>0||e.length;r={},o={},t&&(u.emit("update",[],e),c.clear())},brushes:()=>{let e=[];return e=e.concat(Object.keys(r).map((e=>({type:"range",id:e,brush:r[e]})))),e=e.concat(Object.keys(o).map((e=>({type:"value",id:e,brush:o[e]})))),e},addValue:(e,t)=>{u.addValues([{key:e,value:t}])},addValues:t=>{const r=e6(s.addValues,t,i),a=K3({vc:e,collection:o,items:r});u.emit("add-values",r),a.length&&(n||(n=!0,u.emit("start")),u.emit("update",a,[]),c.updateValues())}};return u.setValues=t=>{const r=e6(s.setValues,t,i),a=function(e){let{items:t,vCollection:n,vc:r}=e;const o={},i=J3(t);let a,s=[],l=[];const c={},u=Object.keys(n);for(let e=0,t=u.length;e<t;e++)a=u[e],c[a]=n[a].values().slice(),delete n[a];const d=e=>{n[a]&&n[a].contains(e)||Z3({key:a,value:e,collection:n,obj:o,fn:r})},p=Object.keys(i);for(let e=0,t=p.length;e<t;e++)a=p[e],i[a].forEach(d);return l=Q3(c,o),s=Q3(o,c),[s,l]}({items:r,vCollection:o,vc:e});u.emit("set-values",r),(a[0].length>0||a[1].length>0)&&(n||(n=!0,u.emit("start")),u.emit("update",a[0],a[1]),c.updateValues())},u.removeValue=(e,t)=>{u.removeValues([{key:e,value:t}])},u.removeValues=e=>{const t=e6(s.removeValues,e,i),n=X3({collection:o,items:t});u.emit("remove-values",t),n.length&&(u.emit("update",[],n),c.updateValues())},u.addAndRemoveValues=(t,r)=>{const a=e6(s.addValues,t,i),l=e6(s.removeValues,r,i),d=K3({vc:e,collection:o,items:a}),p=X3({collection:o,items:l});u.emit("add-values",a),u.emit("remove-values",l),(d.length||p.length)&&(n||(n=!0,u.emit("start")),u.emit("update",d,p),c.updateValues())},u.toggleValue=(e,t)=>{u.toggleValues([{key:e,value:t}])},u.toggleValues=t=>{const r=e6(s.toggleValues,t,i),a=function(e){let{items:t,values:n,vc:r}=e;const o={},i={},a=[],s=[],l=J3(t);let c,u,d;const p=Object.keys(l);for(let e=0,t=p.length;e<t;e++){c=p[e],d=l[c];for(let e=0,t=d.length;e<t;e++)u=d[e],n[c]&&n[c].contains(u)?n[c]&&n[c].contains(u)&&(i[c]=i[c]||[],i[c].push(u),n[c].remove(u)):Z3({key:c,value:u,collection:n,obj:o,fn:r})}const h=Object.keys(o);for(let e=0,t=h.length;e<t;e++)c=h[e],a.push({id:c,values:o[c]});const f=Object.keys(i);for(let e=0,t=f.length;e<t;e++)c=f[e],s.push({id:c,values:i[c]});return[a,s]}({items:r,values:o,vc:e});u.emit("toggle-values",r),(a[0].length>0||a[1].length>0)&&(n||(n=!0,u.emit("start")),u.emit("update",a[0],a[1]),c.updateValues())},u.containsValue=(e,t)=>{let n=i[e]||e;return!!o[n]&&o[n].contains(t)},u.addRange=(e,t)=>{u.addRanges([{key:e,range:t}])},u.addRanges=e=>{r6(e,"add",{ranges:r,rc:t,interceptors:s,aliases:i,rangeConfig:a})&&(n||(n=!0,u.emit("start")),u.emit("update",[],[]),c.updateRanges())},u.removeRange=(e,t)=>{u.removeRanges([{key:e,range:t}])},u.removeRanges=e=>{r6(e,"remove",{ranges:r,rc:t,interceptors:s,aliases:i,rangeConfig:a})&&(n||(n=!0,u.emit("start")),u.emit("update",[],[]),c.updateRanges())},u.setRange=(e,t)=>{u.setRanges([{key:e,range:t}])},u.setRanges=e=>{r6(e,"set",{ranges:r,rc:t,interceptors:s,aliases:i,rangeConfig:a})&&(n||(n=!0,u.emit("start")),u.emit("update",[],[]),c.updateRanges())},u.toggleRange=(e,t)=>{u.toggleRanges([{key:e,range:t}])},u.toggleRanges=e=>{r6(e,"toggle",{ranges:r,rc:t,interceptors:s,aliases:i,rangeConfig:a})&&(n||(n=!0,u.emit("start")),u.emit("update",[],[]),c.updateRanges())},u.containsRangeValue=(e,t)=>{let n=i[e]||e;return!!r[n]&&r[n].containsValue(t)},u.containsRange=(e,t)=>{let n=i[e]||e;return!!r[n]&&r[n].containsRange(t)},u.containsMappedData=(e,t,n)=>{let a=[];const s=Object.keys(e);let l,c,u,d;for(let t=0,n=s.length;t<n;t++){if(l=s[t],"value"===l)c=e,a[t]={key:"",i:t,bool:!1};else{if("source"===l)continue;c=e[l],a[t]={key:l,i:t,bool:!1}}u=c.source&&c.source.field,void 0!==u&&(void 0!==c.source.key&&(u="".concat(c.source.key,"/").concat(u)),u in i&&(u=i[u]),d=c.value,r[u]?a[t].bool=Array.isArray(d)?r[u].containsRange({min:d[0],max:d[1]}):r[u].containsValue(d):o[u]&&o[u].contains(d)&&(a[t].bool=!0))}return t?(a=a.filter((e=>-1!==t.indexOf(e.key))),"and"===n?!!a.length&&!a.some((e=>!1===e.bool)):"xor"===n?!!a.length&&a.some((e=>e.bool))&&a.some((e=>!1===e.bool)):a.some((e=>e.bool))):a.some((e=>e.bool))},u.intercept=(e,t)=>{const n=t6(e);s[n]&&s[n].push(t)},u.removeInterceptor=(e,t)=>{const n=t6(e);if(!s[n])return;const r=s[n].indexOf(t);-1!==r&&s[n].splice(r,1)},u.removeAllInterceptors=e=>{const t=[];if(e){const n=t6(e);s[n]&&s[n].length&&t.push({name:e,handlers:s[n]})}else Object.keys(s).forEach((e=>{s[e].length&&t.push({name:n6(e),handlers:s[e]})}));t.forEach((e=>{e.handlers.slice().forEach((t=>u.removeInterceptor(e.name,t)))}))},u.addKeyAlias=(e,t)=>{i[e]=t},u.removeKeyAlias=e=>{delete i[e]},F3.mixin(u),u}function i6(e){return e*e*e}function a6(e){return--e*e*e+1}function s6(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}u0();const l6=["stroke","fill","color","backgroundColor","thumbColor"];function c6(e,t){const n=t?t.length:0,r=e?Math.min(n,e.length):0,o=new Array(r),i=new Array(n);let a;for(a=0;a<r;++a)o[a]=u6(e[a],t[a]);for(;a<n;++a)i[a]=t[a];return function(e){for(a=0;a<r;++a)i[a]=o[a](e);return i}}function u6(e,t,n){const r=typeof t;let o;return null==t||"boolean"===r?function(e){return()=>e}(t):("number"===r?$5:"string"===r?(o=x5(t))&&l6.includes(n)?(t=o,q5):U5:t instanceof x5?q5:t instanceof Date?B5:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?F5:Array.isArray(t)?c6:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?d6:$5)(e,t)}function d6(e,t){const n={},r={};let o;for(o in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)o in e?n[o]=u6(e[o],t[o],o):r[o]=t[o];return function(e){for(o in n)r[o]=n[o](e);return r}}function p6(e,t){return e.data?e.data.value:"text"===e.type?e.text:t}const h6={fontFamily:"Arial",fontSize:"13px",color:"#595959",backgroundColor:"#ffffff",stroke:"#000000",strokeWidth:0,$fill:"#333333"},f6=/^\$/;function m6(e){const t=typeof e;return"object"!==t&&"function"!==t&&"undefined"!==t}function g6(e,t,n){const r=e[t];r&&r.scale&&r.scale.pxScale?r.scale=r.scale.pxScale(n):r&&r.pxScale&&(e[t]=r.pxScale(n))}function y6(e,t){return e.pxScale?e.pxScale(t):e}const _6={normalizeSettings:function(e,t,n){const r=UZ({},e),o=UZ({},t);return Object.keys(r).forEach((e=>{o[e]={};const i=r[e],a=typeof i;if("function"==typeof i)o[e].fn=i;else if(m6(i)){let n=t[e];"string"==typeof n&&f6.test(n)&&(n=h6[n]);const r=typeof n;o[e]="undefined"===r||r===a?i:n}else i&&"object"==typeof i&&("function"==typeof i.fn&&(o[e].fn=i.fn),void 0!==i.scale&&(o[e].scale=n.scale(i.scale)),"string"==typeof i.ref&&(o[e].ref=i.ref))})),Object.keys(t).forEach((e=>{if(e in r)return;const n=t[e];"string"===typeof n&&f6.test(n)?o[e]=h6[n]:o[e]=n})),o},resolveForItem:function(e,t,n){const r={},o=Object.keys(t),i=o.length,a=e.datum,s=e.datum;for(let l=0;l<i;l++){const i=o[l],c=t[i],u="object"==typeof s&&void 0!==c,d=u&&"string"==typeof c.ref,p=u&&i in s,h=d?s[c.ref]:p?s[i]:a;m6(c)?r[i]=c:u&&c.fn?(c.scale&&(e.scale=c.scale),r[i]=c.fn.call(null,e,n)):u&&c.scale&&h?(r[i]=c.scale(h.value),c.scale.bandwidth&&(r[i]+=c.scale.bandwidth()/2)):d&&h?r[i]=h.value:c.fn?r[i]=c.fn.call(null,e,n):r[i]=c}return r},updateScaleSize:g6};function b6(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce(((e,t)=>Array.isArray(t.children)?(e.push(...b6(t.children)),e):(e.push(t),e)),[])}function x6(e,t){let{context:n,data:r,style:o,filter:i,mode:a}=t;const s=e.chart.brush(n),l=r,c=o.active||{},u=o.inactive||{},d=[];Object.keys(c).forEach((e=>{d.push(e)})),Object.keys(u).forEach((e=>{-1===d.indexOf(e)&&d.push(e)}));const p=[];let h=!1;const f=()=>{let t=b6(e.nodes);return"function"==typeof i&&(t=t.filter(i)),t},m=()=>{const e=f(),t=e.length;let n,r=!1;const o="function"==typeof l?l({brush:s}):l;for(let r=0;r<t;r++){if(n=e[r].data,!n)continue;e[r].__style||(e[r].__style={},d.forEach((t=>{e[r].__style[t]=e[r][t]})));const t=s.containsMappedData(n,o,a),i=p.indexOf(e[r]);let l=!1;t&&-1===i?(p.push(e[r]),l=!0):t||-1===i||(p.splice(i,1),l=!0),e[r].needToUpdate=l||h,e[r].isActive=t}for(let o=0;o<t;o++)if(n=e[o].data,n){if(e[o].needToUpdate){const t=UZ({},e[o],e[o].__style),n=e[o].isActive;d.forEach((r=>{e[o][r]=n&&r in c?"function"==typeof c[r]?c[r].call(null,t,p):c[r]:!n&&r in u?"function"==typeof u[r]?u[r].call(null,t,p):u[r]:e[o].__style[r]})),r=!0}delete e[o].needToUpdate}return h=!1,r},g=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{suppressRender:!1};const{suppressRender:n}=t,r=f(),o=r.length;for(let e=0;e<o;e++)r[e].data&&(r[e].__style=r[e].__style||{},d.forEach((t=>{r[e].__style[t]=r[e][t],t in u&&(r[e][t]="function"==typeof u[t]?u[t].call(null,r[e]):u[t])})));h=!0,p.length=0,n||e.renderer.render(e.nodes)},y=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{suppressRender:!1};const{suppressRender:n}=t,r=f(),o=r.length;for(let e=0;e<o;e++)r[e].__style&&(Object.keys(r[e].__style).forEach((t=>{r[e][t]=r[e].__style[t]})),r[e].__style=void 0);p.length=0,n||e.renderer.render(e.nodes)},_=()=>{if(m()){const t="function"==typeof e.config.sortNodes?e.config.sortNodes(e):e.nodes;"function"==typeof e.config.customRender?e.config.customRender({render:e.renderer.render,nodes:t}):e.renderer.render(t)}};return s.on("start",g),s.on("end",y),s.on("update",_),{isActive:()=>s.isActive(),update:()=>{p.length=0,h=!0,m()},cleanUp:function(){s.removeListener("start",g),s.removeListener("end",y),s.removeListener("update",_)}}}function v6(e){let{nodes:t,action:n,chart:r,trigger:o}=e;const i=[];for(let e=0;e<t.length;e++){let n=t[e].data;null!==n&&i.push(n)}!function(e){let{dataPoints:t,action:n,chart:r,trigger:o}=e;if(!o)return;const i=o.data||[""];let a={items:[],actionFn:"toggleRanges"},s={items:[],actionFn:"toggleValues"};-1!==["add","remove","set","toggle"].indexOf(n)&&(a.actionFn="".concat(n,"Ranges"),s.actionFn="".concat(n,"Values"));for(let e=0;e<t.length;e++){const n=t[e];n&&i.forEach((e=>{let t=n&&!e?n:n[e];if(t){let e={key:t.source.field};void 0!==t.source.key&&(e.key="".concat(t.source.key,"/").concat(t.source.field)),Array.isArray(t.value)?(e.range={min:t.value[0],max:t.value[1]},a.items.push(e)):(e.value=t.value,s.items.push(e))}}))}o.contexts.forEach((e=>{a.items.length?r.brush(e)[a.actionFn](a.items):r.brush(e)[s.actionFn](s.items)}))}({dataPoints:i,action:n,chart:r,trigger:o})}function w6(e){let{collisions:t,t:n,config:r,action:o}=e,i=[],a=!1;t.length>0&&(i=t,a=!0,"stop"===n.propagation&&(i=[t[t.length-1]]));const s=i.map((e=>e.node));return v6({nodes:s,action:o,chart:r.chart,data:r.data,trigger:n}),a}function S6(e,t,n){const r=n.element().getBoundingClientRect();let o=ZZ(e)?function(e,t){return 1!==e.changedTouches.length?null:{x:e.changedTouches[0].clientX-t.left,y:e.changedTouches[0].clientY-t.top}}(e,r):function(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}(e,r);return null===o||o.x<0||o.y<0||o.x>r.width||o.y>r.height?[]:(t.touchRadius>0&&ZZ(e)?o={cx:o.x,cy:o.y,r:t.touchRadius}:t.mouseRadius>0&&!ZZ(e)&&(o={cx:o.x,cy:o.y,r:t.mouseRadius}),n.itemsAt(o))}function C6(e,t,n){return e?"function"==typeof e?e(t):e:n}const E6={fill:"fill",stroke:"stroke",opacity:"opacity",strokeWidth:"stroke-width",strokeLinejoin:"stroke-linejoin",fontFamily:"font-family",fontSize:"font-size",fontStyle:"font-style",textDecoration:"text-decoration",fontWeight:"font-weight",baseline:"dominant-baseline",dominantBaseline:"dominant-baseline",anchor:"text-anchor",textAnchor:"text-anchor",maxWidth:"maxWidth",transform:"transform",strokeDasharray:"stroke-dasharray",id:"id"};function k6(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n="";for(let t=0;t<e.length;t++){const r=e[t];n+=0===t?"M".concat(r.x," ").concat(r.y):"L".concat(r.x," ").concat(r.y),n+=" "}return t&&(n+="Z"),n}function M6(e,t,n,r){const o=n/2,i=e-r/2,a=t-r/2,s=e-o,l=t-o;return[{x:i,y:a},{x:i,y:l},{x:i+r,y:l},{x:i+r,y:a},{x:s+n,y:a},{x:s+n,y:a+r},{x:i+r,y:a+r},{x:i+r,y:l+n},{x:i,y:l+n},{x:i,y:a+r},{x:s,y:a+r},{x:s,y:a}]}function R6(e){return-e/180*Math.PI}function A6(e){return function(e){let t=(.5*(Math.floor(e/Math.PI*2)+2)+.25)*Math.PI,n=Math.cos(Math.abs(t-e))*Math.sqrt(2),r=n*Math.cos(e),o=n*Math.sin(e);return{x1:r<0?1:0,y1:o<0?1:0,x2:r>=0?r:r+1,y2:o>=0?o:o+1}}(R6(e))}function I6(e,t){return{x:e.x+t.x,y:e.y+t.y}}function P6(e,t){return{x:e.x-t.x,y:e.y-t.y}}function O6(e,t){return{x:e.x*t,y:e.y*t}}function L6(e,t){return e.x-t.x}function D6(e,t){return e.y-t.y}function T6(e,t){return L6(e,t)**2+D6(e,t)**2}function z6(e,t){return Math.sqrt(T6(e,t))}function j6(e,t){return e.x*t.x+e.y*t.y}function N6(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{x:0,y:0};const r=Math.cos(t),o=Math.sin(t),i=P6(e,n);return I6({x:r*i.x-o*i.y,y:o*i.x+r*i.y},n)}const q6={up:0,down:180,left:90,right:-90};function F6(e){let{x:t,y:n,size:r}=e;const o=r/2;return{type:"rect",x:t-o,y:n-o,width:r,height:r}}const W6=u0();W6.add("circle",(function(e){return{type:"circle",fill:"black",cx:e.x,cy:e.y,r:e.size/2}})),W6.add("diamond",(function(e){const t=e.size,n=e.x-t/2,r=e.y-t/2;return{type:"path",fill:"black",d:k6([{x:n,y:r+t/2},{x:n+t/2,y:r},{x:n+t,y:r+t/2},{x:n+t/2,y:r+t},{x:n,y:r+t/2}])}})),W6.add("saltire",(function(e){const t=R6(45),n=e.size/2,r=isNaN(e.width)?n/2:e.width,o=Math.min(r,n);let i=e.size;const a=Math.sin(Math.asin(-t))*(o/2);i+=2*(n/Math.sin(-t)-n),i-=2*a;const s={x:e.x,y:e.y},l=M6(e.x,e.y,i,o).map((e=>N6(e,t,s)));return{type:"path",fill:"black",d:k6(l)}})),W6.add("square",(function(e){const t=e.size;return{type:"rect",fill:"black",x:e.x-t/2,y:e.y-t/2,width:t,height:t}})),W6.add("triangle",(function(e){const t=e.size,n={x:e.x,y:e.y},r=q6[e.direction]||0,o=t/2,i=e.x-o,a=e.y-o;let s=[{x:i,y:a+t},{x:i+o,y:a},{x:i+t,y:a+t},{x:i,y:a+t}];const l=R6(r);return s=s.map((e=>N6(e,l,n))),{type:"path",fill:"black",d:k6(s)}})),W6.add("line",(function(e){const t="vertical"===e.direction,n=e.size/2,r=e.x,o=e.y;return{type:"line",stroke:"black",strokeWidth:1,x1:r-(t?0:n),y1:o-(t?n:0),x2:r+(t?0:n),y2:o+(t?n:0),collider:F6(e)}})),W6.add("star",(function(e){const t=e.size,n=[],r=t/2,o=e.points||5,i=Math.min(e.innerRadius||t/2,t)/2,a=isNaN(e.startAngle)?90:e.startAngle,s=360/o;for(let t=1;t<=o;t++){const o=s*t+a,l=R6(o),c=R6(o+s/2),u=Math.sin(l),d=Math.cos(l),p=Math.sin(c),h=Math.cos(c);n.push({x:e.x+d*r,y:e.y+u*r}),n.push({x:e.x+h*i,y:e.y+p*i})}return{type:"path",fill:"black",d:k6(n)}})),W6.add("n-polygon",(function(e){const t=[],n=e.size/2,r=Math.max(isNaN(e.sides)?6:e.sides,3),o=360/r,i=isNaN(e.startAngle)?0:e.startAngle;for(let a=1;a<=r;a++){const r=R6(o*a+i),s=Math.sin(r),l=Math.cos(r);t.push({x:e.x+l*n,y:e.y+s*n})}return{type:"path",fill:"black",d:k6(t)}})),W6.add("cross",(function(e){const t=e.x,n=e.y,r=e.size/2,o=isNaN(e.width)?r/2:e.width,i=Math.min(o,r);return{type:"path",fill:"black",d:k6(M6(t,n,e.size,i))}})),W6.add("bar",(function(e){const t={x:e.x,y:e.y},n="vertical"===e.direction,r=e.size/2,o=r/2/2;let i=[{x:t.x-r,y:t.y+o},{x:t.x-r,y:t.y-o},{x:t.x+r,y:t.y-o},{x:t.x+r,y:t.y+o}];if(n){const e=R6(90);i=i.map((n=>N6(n,e,t)))}const a=oQ(i);return a.type="rect",a.fill="black",a})),W6.add("rect",(function(e){const{x:t,y:n,size:r}=e,o=void 0===e.width?r:e.width,i=void 0===e.height?r:e.height;return{type:"rect",fill:"black",x:t-o/2,y:n-i/2,width:o,height:i}}));const B6=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:W6;return function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=e.get(t.type);if(n){const e=n(t);return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object.keys(t).forEach((n=>{void 0!==E6[n]&&"transform"!==n&&(e[n]=t[n])}))}(e,t),void 0!==t.data&&(e.data=t.data),e}return n}};function $6(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{dock:n="center",displayOrder:r=0,prioOrder:o=0,preferredSize:i=0,minimumLayoutMode:a,show:s=!0}=e;n=n||"center";return{computePreferredSize(e){let{inner:n,outer:r,children:o}=e;return"function"==typeof i?i({inner:n,outer:r,children:o,dock:this.dock()},t):i},dock(e){return void 0!==e?(n=e,this):"function"==typeof n?n(t):n},displayOrder(e){return void 0!==e?(r=e,this):"function"==typeof r?r(t):r},prioOrder(e){return void 0!==e?(o=e,this):"function"==typeof o?o(t):o},minimumLayoutMode(e){return void 0!==e?(a=e,this):"function"==typeof a?a(t):a},show(e){return void 0!==e?(s=e,this):"function"==typeof s?s(t):s}}}function H6(e,t,n){const{require:r=[]}=t,o=t.mediator||{},{settings:i,formatter:a,scale:s,data:l,renderer:c,chart:u,dockConfig:d,mediator:p,instance:h,rect:f,style:m,registries:g,resolver:y,update:_,_DO_NOT_USE_getInfo:b,symbol:x,isVisible:v}=n;e.emit=()=>{},v&&(e.isVisible=v),Object.defineProperty(e,"settings",{get:i}),Object.defineProperty(e,"data",{get:l}),Object.defineProperty(e,"formatter",{get:a}),Object.defineProperty(e,"scale",{get:s}),Object.defineProperty(e,"mediator",{get:p}),Object.defineProperty(e,"style",{get:m}),Object.defineProperty(e,"registries",{get:g}),f&&Object.defineProperty(e,"rect",{get:f}),b&&(e._DO_NOT_USE_getInfo=b),Object.keys(t).forEach((n=>{var r;r=n,["on","preferredSize","created","beforeMount","mounted","resize","beforeUpdate","updated","beforeRender","render","beforeUnmount","beforeDestroy","destroyed","defaultSettings","data","settings","formatter","scale","chart","dockConfig","mediator","style","resolver","registries","_DO_NOT_USE_getInfo","symbol","isVisible"].some((e=>e===r))||("function"==typeof t[n]?e[n]=t[n].bind(e):e[n]=t[n])})),r.forEach((t=>{"renderer"===t?Object.defineProperty(e,"renderer",{get:c}):"chart"===t?Object.defineProperty(e,"chart",{get:u}):"dockConfig"===t?Object.defineProperty(e,"dockConfig",{get:d}):"instance"===t?Object.defineProperty(e,"instance",{get:h}):"update"===t&&_?Object.defineProperty(e,"update",{get:_}):"resolver"===t?Object.defineProperty(e,"resolver",{get:y}):"symbol"===t&&Object.defineProperty(e,"symbol",{get:x})})),Object.keys(o).forEach((t=>{e.mediator.on(t,o[t].bind(e))}))}function V6(e,t,n){const r=t=>e[t]?(n.warn("Deprecation Warning the ".concat(t," property should be moved into layout: {} property")),e[t]):e.layout?e.layout[t]:void 0,o={};return o.displayOrder=r("displayOrder"),o.dock=r("dock"),o.prioOrder=r("prioOrder"),o.minimumLayoutMode=r("minimumLayoutMode"),e.layout=e.layout||{},e.layout.displayOrder=void 0!==o.displayOrder?o.displayOrder:e.layout.displayOrder,e.layout.prioOrder=void 0!==o.prioOrder?o.prioOrder:e.layout.prioOrder,e.layout.dock=o.dock||e.layout.dock,e.layout.minimumLayoutMode=o.minimumLayoutMode||e.layout.minimumLayoutMode,o.show=e.show,o.preferredSize=t,o}function G6(e,t,n){Object.keys(n.on||{}).forEach((r=>{e.eventListeners=e.eventListeners||[];const o=n.on[r].bind(e);e.eventListeners.push({event:r,listener:o}),t.on(r,o)})),e.emit=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.emit(e,...r)}}function U6(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{defaultSettings:n={},_DO_NOT_USE_getInfo:r=()=>({})}=e,{chart:o,container:i,mediator:a,registries:s,theme:l,renderer:c}=t,u=F3.mixin({});let d,p,h,f,m,g=t.settings||{},y=UZ(!0,{},n,g),_=[],b=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_6,n={};return{resolve:function(r){let{data:o,settings:i,defaults:a={},scaled:s}=r;const l=n.norm=t.normalizeSettings(i,a,e.chart),c={scale:e.chart.scale,formatter:e.chart.formatter};s&&Object.keys(s).forEach((e=>{l[e]&&t.updateScaleSize(l,e,s[e])}));const u=[];if(!o||!Array.isArray(o.items)){const e={data:o,resources:c};let r=t.resolveForItem(e,n.norm,-1);return{settings:n.norm,item:r}}{let e;for(let r=0,i=o.items.length;r<i;r++){e={datum:o.items[r],data:o,resources:c};let i=t.resolveForItem(e,n.norm,r);i.data=o.items[r],u.push(i)}}return{settings:n.norm,items:u}}}}({chart:o}),x=!1;const v={nodes:[],chart:o,config:y.brush||{},renderer:null},w={tap:[],over:[]},S=[],C={},E=UZ({},g);function k(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(){const o=void 0!==e[t],i=void 0!==g[t];let a;for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];return o&&("function"==typeof e[t]?a=e[t].call(C,...l):r&&(a=e[t])),i&&("function"==typeof g[t]?a=g[t].call(E,...l):r&&(a=g[t])),o||i||(a=n.call(C,...l)),a}}const M=k("preferredSize",(()=>0),!0),R=k("resize",(e=>{let{inner:t}=e;return t})),A=k("created"),I=k("beforeMount"),P=k("mounted"),O=k("beforeUnmount"),L=k("beforeUpdate"),D=k("updated"),T=k("beforeRender"),z=k("beforeDestroy"),j=k("destroyed"),N=e.render,q=()=>{y.brush&&(y.brush.consume||[]).forEach((e=>{e.context&&e.style&&S.push(x6(v,e))}))},F=()=>{y.brush&&(y.brush.trigger||[]).forEach((e=>{"over"===e.on?w.over.push(e):w.tap.push(e)}))};Object.defineProperty(v,"data",{get:()=>_});const W=y.renderer||e.renderer,B=W?c||s.renderer(W)():c||s.renderer()();"function"==typeof B.settings&&B.settings(y.rendererSettings),v.renderer=B;const $={resources:o.logger?{logger:o.logger()}:{}};let H=$6(V6(y,M,o.logger()),$);const V=e=>{e.key=y.key,e.element=B.element()},G=()=>{};G.dockConfig=()=>H,G.set=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e.settings&&(g=e.settings,y=UZ(!0,{},n,e.settings),H=$6(V6(y,M,o.logger()),$),v.config=y.brush||{}),y.scale&&(d=o.scale(y.scale)),y.data){const{rendererSettings:e}=y,t="function"==typeof(null==e?void 0:e.progressive)&&e.progressive(),n=X2(y.data,{dataset:o.dataset,collection:o.dataCollection},{logger:o.logger()},o.dataCollection);t?t.isFirst?(_=n,_.items&&(_.items=[...n.items])):_.items&&(_.items=[..._.items,...n.items||[]]):_=n}else _=d?d.data():[];"string"==typeof y.formatter||"object"==typeof y.formatter?p=o.formatter(y.formatter):d&&d.data().fields&&(p=d.data().fields[0].formatter()),m=l.style(y.style||{})},G.resize=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=R({inner:e,outer:t});f=n?B.size(n):B.size(e),E.rect=UZ(!0,{computedPhysical:f.computedPhysical,computedOuter:t.computed||t,computedInner:e.computed||e},e),f=UZ(!0,{computedOuter:t.computed||t,computedInner:e.computed||e},f)},G.getRect=()=>E.rect;const U=()=>{const e=B.renderArgs?B.renderArgs.slice(0):[],{rendererSettings:t}=y;let n=_;const r="function"==typeof(null==t?void 0:t.progressive)&&t.progressive();return _.items&&r&&(n=JZ(JZ({},_),{},{items:_.items.slice(r.start,r.end)})),e.push({data:n}),e};let Y,K,X;function J(e){const{rendererSettings:t}=y,n="function"==typeof(null==t?void 0:t.progressive)&&t.progressive();n?n.isFirst?v.nodes=[...e||[]]:v.nodes&&(v.nodes=[...v.nodes,...e||[]]):v.nodes=e}G.beforeMount=I,G.beforeRender=()=>{T({size:f})},G.render=()=>{const e=N.call(C,...U());J(e),B.render(e),Y=e,K=E.rect.computed},G.hide=()=>{G.unmount(),B.size({x:0,y:0,width:0,height:0}),B.clear()},G.beforeUpdate=()=>{L({settings:y,data:_})},G.update=()=>{X&&X.stop();const{rendererSettings:e,brush:t,animations:n}=y;if("function"==typeof(null==e?void 0:e.transform)&&e.transform())return B.render(),void(Y=null);const r=N.call(C,...U());J(r),S.forEach((e=>e.cleanUp())),S.length=0,w.tap=[],w.over=[],t&&(q(),F()),S.forEach((e=>{e.isActive()&&e.update()})),Y&&n&&("function"==typeof n.enabled?n.enabled():n.enabled)?(n.compensateForLayoutChanges&&n.compensateForLayoutChanges({currentNodes:Y,currentRect:E.rect.computed,previousRect:K}),X=function(e,t,n,r){let o,{old:i,current:a}=e,{renderer:s}=t,l=[],c={nodes:[],ips:[]},u={nodes:[],ips:[]},d={nodes:[],ips:[]},p=[],h=null;const f=n.trackBy||p6,m={start(){let e={};if(i.forEach(((t,n)=>{let r=f(t,n);e[r]=t})),a.forEach(((t,n)=>{let r=f(t,n);if(e[r]){if("path"===t.type&&t.points&&t.points.length>0&&"trend"!==t.data.source.key){const n=function(e,t){const n=e.points.filter((e=>!e.dummy)),r=t.points.filter((e=>!e.dummy)),o=r.map((e=>e.data.major.value)),i=n.filter((e=>o.includes(e.data.major.value))).map((e=>e.data.major.value)),a=n.filter((e=>i.includes(e.data.major.value))),s=r.filter((e=>i.includes(e.data.major.value)));return{old:a,current:s}}(e[r],t);d.ips.push(d6(UZ({},e[r],{points:n.old}),UZ({},t,{points:n.current}))),l.push(UZ({},e[r],{commonPoints:n.old}))}else d.ips.push(d6(e[r],t)),l.push(e[r]);d.nodes.push(t),e[r]=!1}else c.nodes.push(t),c.ips.push(d6(UZ({},t,{r:.001,opacity:0}),t))})),Object.keys(e).forEach((t=>{e[t]&&(u.nodes.push(e[t]),u.ips.push(d6(e[t],UZ({},e[t],{r:1e-4,opacity:0}))))})),p.push({name:"exiting",easing:i6,duration:200,tweens:u.ips,nodes:[...l]}),p.push({name:"updating",easing:s6,duration:400,tweens:d.ips,nodes:[]}),p.push({name:"entering",easing:a6,duration:200,tweens:c.ips,nodes:[...d.nodes]}),n.isMainComponent){var t;const e=null===(t=n.isMainComponent)||void 0===t?void 0:t.filterFn,o=e?l.filter(e).length:l.length,{isInit:i,shouldBeRemoved:a}=r.getValue("animations.updatingStageMeta");!1===i?(r.setValue("animations.updatingStageMeta.shouldBeRemoved",0===o),r.setValue("animations.updatingStageMeta.isInit",!0)):r.setValue("animations.updatingStageMeta.shouldBeRemoved",a&&0===o)}p.length&&(h=s.getScene(a),p[0].started=Date.now(),"undefined"!=typeof window&&(o=window.requestAnimationFrame(m.tick)))},tick(){let e=p[0];e||m.stop(),e.started||(e.started=Date.now());let t=(Date.now()-e.started)/e.duration,i=[],a=e.tweens.map((n=>n(e.easing(Math.min(1,t)))));const{adjustTweenedNodes:l}=n;if(l&&l(a),i.push(...a),i.push(...e.nodes),s.render(i),t>=1){p.shift();const{isInit:e,shouldBeRemoved:t}=r.getValue("animations.updatingStageMeta");p.length?"updating"===p[0].name&&t&&p.shift():(!0===e&&r.setValue("animations.updatingStageMeta.isInit",!1),m.stop())}o&&(o=window.requestAnimationFrame(m.tick))},stop(){o&&(window.cancelAnimationFrame(o),o=!1)},inProgress:()=>!!o,get targetScene(){return h}};return m}({old:Y,current:r},{renderer:B},n,o.storage),X.start()):B.render(r),Y=r,K=E.rect.computed,B.setKey&&"string"==typeof g.key&&B.setKey(g.key)},G.updated=D,G.destroy=()=>{G.unmount(),z(h),B.destroy(),j(),h=null};const Z=e=>{v.nodes=e,S.forEach((e=>{e.isActive()&&e.update()})),B.render(e)};return H6(C,e,{settings:()=>y,data:()=>_,scale:()=>d,formatter:()=>p,renderer:()=>B,chart:()=>o,dockConfig:()=>H,mediator:()=>a,instance:()=>E,rect:()=>E.rect,style:()=>m,update:()=>Z,registries:()=>s,resolver:()=>b,symbol:()=>B6(s.symbol)}),H6(E,g,{settings:()=>y,data:()=>_,scale:()=>d,formatter:()=>p,renderer:()=>B,chart:()=>o,dockConfig:()=>H,mediator:()=>a,style:()=>m,_DO_NOT_USE_getInfo:r.bind(C),isVisible:()=>x}),G.getBrushedShapes=function(e,t,n){const r=[];if(y.brush&&y.brush.consume){const i=o.brush(e),a=B.findShapes("*");y.brush.consume.filter((t=>t.context===e)).forEach((e=>{for(let o=0;o<a.length;o++){const s=a[o];s.data&&i.containsMappedData(s.data,n||e.data,t)&&(V(s),r.push(s),a.splice(o,1),o--)}}))}return r},G.findShapes=e=>{var t;const n=(null!==(t=X)&&void 0!==t&&t.inProgress()?X.targetScene:B).findShapes(e);for(let e=0,t=n.length;e<t;e++)V(n[e]);return n},G.shapesAt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=B.itemsAt(e);let r;r=t&&"stop"===t.propagation&&n.length>0?[n.pop().node]:n.map((e=>e.node));for(let e=0,t=r.length;e<t;e++)V(r[e]);return r},G.brushFromShapes=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.contexts=Array.isArray(t.contexts)?t.contexts:[];v6({nodes:e,action:t.action||"toggle",trigger:t,chart:o,data:v.data})},G.mount=()=>{h=B.element&&B.element()?h:B.appendTo(i),B.setKey&&"string"==typeof g.key&&B.setKey(g.key),y.brush&&(q(),F()),G6(E,u,g),G6(C,u,e),x=!0},G.mounted=()=>P(h),G.unmount=()=>{[E,C].forEach((e=>{!function(e,t){e.eventListeners&&(e.eventListeners.forEach((e=>{let{event:n,listener:r}=e;t.removeListener(n,r)})),e.eventListeners.length=0),e.emit=()=>{}}(e,u)})),w.tap=[],w.over=[],S.forEach((e=>{e.cleanUp()})),S.length=0,O(),x=!1},G.onBrushTap=e=>{w.tap.forEach((t=>{(function(e){let{e:t,t:n,config:r}=e;return w6({collisions:S6(t,n,r.renderer),t:n,config:r,action:C6(n.action,t,"toggle")})})({e:e,t:t,config:v})&&"stop"===t.globalPropagation&&o.toggleBrushing(!0)}))},G.onBrushOver=e=>{w.over.forEach((t=>{(function(e){let{e:t,t:n,config:r}=e;return w6({collisions:S6(t,n,r.renderer),t:n,config:r,action:C6(n.action,t,"set")})})({e:e,t:t,config:v})&&"stop"===t.globalPropagation&&o.toggleBrushing(!0)}))},G.def=C,G.ctx=E,G.renderer=()=>B,G.set({settings:g}),A(),G}function Y6(e){const t=UZ(!0,{},e),n={getAll:()=>t,getValue:(e,n)=>function(e,t,n){if(void 0===e||void 0===t)return n;const r=t.split(".");let o=e;for(let e=0;e<r.length;++e){const t=r[e];if(void 0===o[t])return n;o=o[t]}return o}(t,e,n),setValue:(e,n)=>function(e,t,n){if(void 0===e||void 0===t)return;const r=t.split("."),o=r[r.length-1];let i=e;for(let e=0;e<r.length-1;++e){const t=r[e];void 0===i[t]&&(i[t]=Number.isNaN(+r[e+1])?{}:[]),i=i[t]}void 0!==n?i[o]=n:delete i[o]}(t,e,n)};return n}function K6(e,t,n){const r=I6(function(e,t){const n=j6(e,t)/j6(t,t)||1;return{x:t.x*n,y:t.y*n}}(P6(n,e),P6(t,e)),e);return r}function X6(e,t,n){return z6(e,n)+z6(t,n)-z6(e,t)<1e-12}function J6(e,t){return e.x>=t.x&&e.x+e.width<=t.x+t.width&&e.y>=t.y&&e.y+e.height<=t.y+t.height}function Z6(e){return e.x1===e.x2&&e.y1===e.y2}function Q6(e){return e.width<=0||e.height<=0}function e4(e){return e.r<=0}function t4(e){return e.edges.length<=2}function n4(e,t){let n=!1;for(let r=0,o=t.edges.length;r<o;r++)if(n=c4(e,iQ(t.edges[r])),!0===n)return!0;return!1}function r4(e,t){let n=!1;const{numPolygons:r,polygons:o}=t;for(let t=0;t<r;t++){if(n=_4(e,o[t]),!0===n)return!0}return!1}function o4(e,t){if(e4(e))return!1;return T6({x:e.cx,y:e.cy},t)<=e.r**2}function i4(e,t){if(Q6(t)||e4(e))return!1;const n=t.width/2,r=t.height/2,o=t.x+n,i=t.y+r,a=e.r,s=e.cx,l=e.cy,c=Math.abs(s-o),u=Math.abs(l-i);if(c>n+a||u>r+a)return!1;if(c<=n||u<=r)return!0;return(c-n)**2+(u-r)**2<=a**2}function a4(e,t){if(e4(e)||Z6(t))return!1;const[n,r]=nQ(t);if(o4(e,n)||o4(e,r))return!0;const o={x:e.cx,y:e.cy},i=K6(n,r,o);return T6(i,o)<=e.r**2&&X6(n,r,i)}function s4(e,t){if(t4(t)||e4(e))return!1;if(l4(t,{x:e.cx,y:e.cy}))return!0;const n=t.edges.length;for(let r=0;r<n;r++){if(a4(e,iQ(t.edges[r])))return!0}return!1}function l4(e,t){if(t4(e)||!h4(e.boundingRect(),t))return!1;const{x:n,y:r}=t,o=e.vertices;let i,a,s,l,c;for(i=!1,l=-1,a=o.length,s=a-1;++l<a;s=l){if(o[l].x===n&&o[l].y===r)return!0;if(o[l].y===o[s].y&&o[l].y===r&&(n-o[l].x)*(n-o[s].x)<=0)return!0;if(o[l].y<r&&r<=o[s].y||o[s].y<r&&r<=o[l].y){if(c=(o[s].x-o[l].x)*(r-o[l].y)/(o[s].y-o[l].y)+o[l].x,n===c)return!0;n<c&&(i=!i)}}return i}function c4(e,t){if(t4(e))return!1;for(let n=0,r=e.edges.length;n<r;n++){if(m4(t,iQ(e.edges[n])))return!0}const[n,r]=nQ(t);return l4(e,n)||l4(e,r)}function u4(e,t){if(t4(e))return!1;for(let n=0,r=e.edges.length;n<r;n++){if(f4(t,iQ(e.edges[n])))return!0}const[n,r,o,i]=rQ(t);return l4(e,n)||l4(e,r)||l4(e,o)||l4(e,i)}function d4(e,t){return!Q6(e)&&!Q6(t)&&(e.x<=t.x+t.width&&t.x<=e.x+e.width&&e.y<=t.y+t.height&&t.y<=e.y+e.height)}function p4(e,t){if(Q6(e)||Q6(t))return!1;return[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}].every((t=>h4(e,t)))}function h4(e,t){return!Q6(e)&&(t.x>=e.x&&t.x<=e.x+e.width&&t.y>=e.y&&t.y<=e.y+e.height)}function f4(e,t){if(Z6(t)||Q6(e))return!1;const[n,r]=nQ(t);if(h4(e,n)||h4(e,r))return!0;const o=rQ(e);let i=o.length;for(let e=0;e<i;e++){if(m4(iQ([o[e],o[3!==e?e+1:0]]),t))return!0}return!1}function m4(e,t){const[n,r]=nQ(e),[o,i]=nQ(t),a=L6(r,n),s=D6(r,n),l=L6(i,o),c=D6(i,o),u=L6(n,o),d=D6(n,o);let p=c*a-l*s;const h=l*d-c*u,f=a*d-s*u;let m,g;if(0===a&&0===s)return!1;if(0===l&&0===c)return!1;if(0===p){if(0===h&&0===f){if(0===a){if(0===s)return n.x===r.x&&n.y===r.y;m=D6(o,n)/s,g=D6(i,n)/s}else m=(o.x-n.x)/a,g=(i.x-n.x)/a;return!(m<0&&g<0||m>1&&g>1)}return!1}const y=h/p;return p=f/p,y>=0&&y<=1&&p>=0&&p<=1}function g4(e,t){if(Z6(e))return!1;const[n,r]=nQ(e);return X6(n,r,t)}function y4(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!d4(n,r)&&(p4(n,r)?n4(e,t):n4(t,e))}function _4(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!d4(n,r)&&(p4(r,n)?function(e,t){let n=!1;const{numPolygons:r,polygons:o}=e;for(let e=0;e<r;e++)if(n=y4(t,o[e]),!0===n)return!0;return!1}(e,t):function(e,t){let n=!1;for(let r=0,o=t.edges.length;r<o;r++)if(n=v4(e,iQ(t.edges[r])),!0===n)return!0;return!1}(e,t))}function b4(e,t){if(e4(e))return!1;if(x4(t,{x:e.cx,y:e.cy}))return!0;const{numPolygons:n,polygons:r}=t;for(let t=0;t<n;t++){const n=r[t],o=n.edges.length;for(let t=0;t<o;t++){if(a4(e,iQ(n.edges[t])))return!0}}return!1}function x4(e,t){if(!h4(e.boundingRect(),t))return!1;const{x:n,y:r}=t,o=e.numPolygons;let i,a,s,l,c,u,d=!1;for(a=0;a<o;a++)for(i=e.vertices[a],c=-1,s=i.length,l=s-1;++c<s;l=c){if(i[c].x===n&&i[c].y===r)return!0;if(i[c].y===i[l].y&&i[c].y===r&&(n-i[c].x)*(n-i[l].x)<=0)return!0;if(i[c].y<r&&r<=i[l].y||i[l].y<r&&r<=i[c].y){if(u=(i[l].x-i[c].x)*(r-i[c].y)/(i[l].y-i[c].y)+i[c].x,n===u)return!0;n<u&&(d=!d)}}return d}function v4(e,t){const[n,r]=nQ(t);if(x4(e,n)||x4(e,r))return!0;const{numPolygons:o,polygons:i}=e;for(let e=0;e<o;e++){const n=i[e];for(let e=0,r=n.edges.length;e<r;e++){if(m4(t,iQ(n.edges[e])))return!0}}return!1}function w4(e,t){const[n,r,o,i]=rQ(t);if(x4(e,n)||x4(e,r)||x4(e,o)||x4(e,i))return!0;const{numPolygons:a,polygons:s}=e;for(let e=0;e<a;e++){const n=s[e];for(let e=0,r=n.edges.length;e<r;e++){if(f4(t,iQ(n.edges[e])))return!0}}return!1}const S4=/^\$/,C4="@extend";function E4(e){throw new Error('Cyclical reference for "'.concat(e,'"'))}function k4(e,t,n){if("string"==typeof e){let r=t[e];return-1!==n.indexOf(e)&&E4(e),S4.test(r)?(n.push(e),k4(r,t,n)):r}let r=e;const o=UZ(!0,{},t,e),i={};if(e[C4]){const i=e[C4];-1!==n.indexOf(i)&&E4(i);let a=n.slice();a.push(i),r=UZ(!0,{},k4(o[i],t,a),e)}return Object.keys(r).forEach((e=>{let t=n.slice();if(e===C4||S4.test(e))return;i[e]=r[e];let a=i[e];S4.test(a)&&a in o?(-1!==n.indexOf(a)&&E4(a),t.push(a),a=o[a],"object"==typeof a||S4.test(a)&&a in o?i[e]=k4(a,o,t):i[e]=a):"object"==typeof a&&(i[e]=k4(a,o,t))})),i}function M4(e,t){return k4(e,t,[])}function R4(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={},n=e;const r=e=>{e.forEach((e=>{const n=Array.isArray(e.colors[0])?e.colors:[e.colors];t[e.key]={colors:n,sizes:n.map((e=>e?e.length:0))}}))},o={palette:(e,n)=>((e,n)=>{const r=t[e];if(!r)return[];const o=r.sizes;for(let e=0;e<o.length;e++)if(n<=o[e])return r.colors[e];return r.colors[o.length-1]})(e,n),setPalettes:r,style:e=>M4(e,n),setStyle:t=>{n=UZ({},e,t)}};return r(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]),o}function A4(e){e.x=Math.floor(e.x),e.y=Math.floor(e.y),e.width=Math.floor(e.width),e.height=Math.floor(e.height)}function I4(e){const t={center:{minWidthRatio:.5,minHeightRatio:.5,minWidth:0,minHeight:0}};return UZ(!0,t,e),t.center.minWidthRatio=Math.min(Math.max(t.center.minWidthRatio,0),1),t.center.minHeightRatio=Math.min(Math.max(t.center.minHeightRatio,0),1),t.center.minWidth=Math.max(t.center.minWidth,0),t.center.minHeight=Math.max(t.center.minHeight,0),t}function P4(e,t,n,r,o){return{x:isNaN(e)?0:e,y:isNaN(e)?0:t,width:isNaN(e)?0:n,height:isNaN(e)?0:r,margin:isNaN(o)?0:o}}function O4(e,t,n){if(void 0===e.cachedSize){const r=e.config.dock();let o,i=e.comp.preferredSize({inner:t,outer:n,dock:r});isNaN(i)?i&&!isNaN(i.size)&&(i.width=i.size,i.height=i.size):i={width:i,height:i},o="top"===r||"bottom"===r?i.height:"right"===r||"left"===r?i.width:Math.max(i.width,i.height),e.cachedSize=Math.ceil(o),e.edgeBleed=i.edgeBleed||0}return e.cachedSize}function L4(e,t){switch(t.config.dock()){case"top":e.y+=t.cachedSize,e.height-=t.cachedSize;break;case"bottom":e.height-=t.cachedSize;break;case"left":e.x+=t.cachedSize,e.width-=t.cachedSize;break;case"right":e.width-=t.cachedSize}}function D4(e,t){const n=t.edgeBleed;n&&(e.left=Math.max(e.left,n.left||0),e.right=Math.max(e.right,n.right||0),e.top=Math.max(e.top,n.top||0),e.bottom=Math.max(e.bottom,n.bottom||0))}function T4(e,t,n){t.x<n.left&&(t.width-=n.left-t.x,t.x=n.left);const r=e.width-(t.x+t.width);r<n.right&&(t.width-=n.right-r),t.y<n.top&&(t.height-=n.top-t.y,t.y=n.top);const o=e.height-(t.y+t.height);o<n.bottom&&(t.height-=n.bottom-o)}function z4(e,t,n,r,o){const i=UZ({},t),a=UZ({},n);L4(i,r),D4(a,r),T4(e,i,a);const s=function(e,t,n){const r=Math.min(n.center.minWidth,e.width)||Math.max(e.width*n.center.minWidthRatio,1),o=Math.min(n.center.minHeight,e.height)||Math.max(e.height*n.center.minHeightRatio,1);return t.width>=r&&t.height>=o}(e,i,o);return!!s&&(L4(t,r),D4(n,r),!0)}function j4(e){return{x:e.margin.left+e.x*e.scaleRatio.x,y:e.margin.top+e.y*e.scaleRatio.y,width:e.width*e.scaleRatio.x,height:e.height*e.scaleRatio.y}}function N4(e){return oQ([].concat(...e.map(rQ)))}function q4(e){let{visible:t,layoutRect:n,reducedRect:r,containerRect:o,translation:i}=e;const a=P4(r.x,r.y,r.width,r.height),s=P4(r.x,r.y,r.width,r.height),l={},c=t.slice(),u=c.slice().sort(((e,t)=>e.config.displayOrder()-t.config.displayOrder()));return t.sort(((e,t)=>{if(e.referencedDocks.length>0&&t.referencedDocks.length>0)return 0;if(t.referencedDocks.length>0)return-1;if(e.referencedDocks.length>0)return 1;const n=e.config.displayOrder()-t.config.displayOrder();return 0===n?c.indexOf(e)-c.indexOf(t):n})).forEach((e=>{let t={},c={};switch(e.config.dock()){case"top":t.height=c.height=e.cachedSize,t.width=n.width,c.width=a.width,t.x=n.x,c.x=a.x,t.y=c.y=a.y-e.cachedSize,a.y-=e.cachedSize,a.height+=e.cachedSize;break;case"bottom":t.x=n.x,c.x=a.x,t.y=c.y=a.y+a.height,t.width=n.width,c.width=a.width,t.height=c.height=e.cachedSize,a.height+=e.cachedSize;break;case"left":t.x=c.x=s.x-e.cachedSize,t.y=n.y,c.y=s.y,t.width=c.width=e.cachedSize,t.height=n.height,c.height=s.height,s.x-=e.cachedSize,s.width+=e.cachedSize;break;case"right":t.x=c.x=s.x+s.width,t.y=n.y,c.y=s.y,t.width=c.width=e.cachedSize,t.height=n.height,c.height=s.height,s.width+=e.cachedSize;break;case"center":t.x=c.x=r.x,t.y=c.y=r.y,t.width=c.width=r.width,t.height=c.height=r.height;break;default:if(e.referencedDocks.length>0){const n=e.referencedDocks.map((e=>l[e])).filter((e=>!!e));n.length>0&&(t=N4(n.map((e=>e.outerRect))),c=N4(n.map((e=>e.r))))}}e.key&&(l[e.key]={r:c,outerRect:t}),function(e,t,n,r){const o={x:r.width/n.width,y:r.height/n.height},i={left:0,top:0};if(n.preserveAspectRatio){const e=o.x<o.y,t=Math.min(o.x,o.y);o.x=t,o.y=t;const a=e?"height":"width",s=(r[a]-n[a]*o.x)*n.align;i.left=e?0:s,i.top=e?s:0}e.scaleRatio=o,e.margin=i,t.scaleRatio=o,t.margin=i,n.scaleRatio=o,n.margin=i}(c,t,n,o),c.edgeBleed=e.edgeBleed,c.computed=j4(c),t.edgeBleed=e.edgeBleed,t.computed=j4(t),c.x+=i.x,c.y+=i.y,t.x+=i.x,t.y+=i.y,e.comp.resize(c,t),e.cachedSize=void 0,e.edgeBleed=void 0})),u}function F4(e,t,n){const r=e.layoutModes||{},o=t.minimumLayoutMode();let i=t.show();return i&&"object"==typeof o?i=r[o.width]&&r[o.height]&&n.width>=r[o.width].width&&n.height>=r[o.height].height:i&&void 0!==o&&(i=r[o]&&n.width>=r[o].width&&n.height>=r[o].height),i}function W4(e){if(!e.resize||"function"!=typeof e.resize)throw new Error("Component is missing resize function");if(!e.dockConfig&&!e.preferredSize)throw new Error("Component is missing preferredSize function")}function B4(e){let t=I4(e);const n={};return n.layout=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!e||isNaN(e.x)||isNaN(e.y)||isNaN(e.width)||isNaN(e.height))throw new Error("Invalid rect");if(!n.length)return{visible:[],hidden:[],ordered:[]};const{logicalContainerRect:r,containerRect:o}=function(e,t){const n={x:0,y:0,width:0,height:0},r={x:0,y:0,width:0,height:0};return n.width=e.width||0,n.height=e.height||0,void 0!==t.size&&(n.width=isNaN(t.size.width)?n.width:t.size.width,n.height=isNaN(t.size.height)?n.height:t.size.height),void 0!==t.logicalSize?(r.width=isNaN(t.logicalSize.width)?n.width:t.logicalSize.width,r.height=isNaN(t.logicalSize.height)?n.height:t.logicalSize.height,r.align=isNaN(t.logicalSize.align)?.5:Math.min(Math.max(t.logicalSize.align,0),1),r.preserveAspectRatio=t.logicalSize.preserveAspectRatio):(r.width=n.width,r.height=n.height,r.preserveAspectRatio=!1),A4(r),A4(n),{logicalContainerRect:r,containerRect:n}}(e,t),[i,a]=function(e,t,n){const r=[],o=[];for(let i=0;i<e.length;++i){const a=e[i];W4(a);let s=a.dockConfig;const l=a.key,c=s.dock(),u=/@/.test(c)?c.split(",").map((e=>e.replace(/^\s*@/,""))):[];F4(t,s,n)?r.push({comp:a,key:l,config:s,referencedDocks:u}):o.push({comp:a,key:l,config:s,referencedDocks:u})}return[r,o]}(n,t,r),s=function(e){let{layoutRect:t,visible:n,hidden:r,settings:o}=e;const i=P4(t.x,t.y,t.width,t.height),a={left:0,right:0,top:0,bottom:0},s=n.slice();s.sort(((e,t)=>e.config.prioOrder()-t.config.prioOrder()));for(let e=0;e<s.length;++e){const n=s[e];O4(n,i,t),z4(t,i,a,n,o)||(r.push(s.splice(e,1)[0]),--e)}!function(e,t){if(0!==t.length)for(let n=0;n<e.length;++n){let r=e[n];if(r.referencedDocks.length){const o=r.referencedDocks.every((e=>t.some((t=>t.key===e))));o&&t.push(e.splice(n,1)[0])}}}(n,r);const l=n.filter((e=>-1!==s.indexOf(e)));return n.length=0,n.push(...l),T4(t,i,a),i}({layoutRect:r,visible:i,hidden:a,settings:t}),l=q4({visible:i,layoutRect:r,reducedRect:s,containerRect:o,translation:{x:e.x,y:e.y}});return a.forEach((e=>{e.comp.visible=!1;const t=P4();e.comp.resize(t,t)})),{visible:i.map((e=>e.comp)),hidden:a.map((e=>e.comp)),ordered:l.map((e=>e.comp))}},n.settings=function(e){t=I4(e)},n}const $4=(e,t)=>{for(let n=0;n<e.length;n++){const r=e[n];if(r.hasKey&&r.key===t)return e[n]}return null},H4=e=>null==e?void 0:e.map((e=>{const t=e.instance.dockConfig();return{preferredSize:n=>t.computePreferredSize(JZ(JZ({},n),{},{children:H4(e.children)}))}})),V4=(e,t)=>({visible:[],hidden:t,ordered:[]}),G4=e=>(t,n)=>{var r;const o=n.map(((e,t)=>{const n=e.instance.dockConfig();return{index:t,key:e.key,dockConfig:n,resize:e.instance.resize,preferredSize:t=>n.computePreferredSize(JZ(JZ({},t),{},{children:H4(e.children)}))}})),i=e=>n[e.index],{visible:a=o,hidden:s=[],ordered:l=a}=null!==(r=e(t,o))&&void 0!==r?r:{};return{visible:a.map(i),hidden:s.map(i),ordered:l.map(i)}},U4=e=>"function"==typeof e?G4(e):(e=>{const t=B4(e);return G4(((e,n)=>t.layout(e,n)))})(e);function Y4(e,t,n){const r=t.left-n.left,o=t.top-n.top,i=aQ(e),a=UZ(!0,{},e);switch(i){case"circle":a.cx+=r,a.cy+=o;break;case"polygon":for(let e=0,t=a.vertices.length;e<t;e++){const t=a.vertices[e];t.x+=r,t.y+=o}break;case"geopolygon":for(let e=0;e<a.vertices.length;e++){const t=a.vertices[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n.x+=r,n.y+=o}}break;case"line":a.x1+=r,a.y1+=o,a.x2+=r,a.y2+=o;break;case"point":case"rect":a.x+=r,a.y+=o}return a}function K4(e,t){const n=[];let r=0;t.forEach((e=>{n.push(r),r++;const t=e.instance.def.additionalElements&&e.instance.def.additionalElements();t&&(r+=t.length)})),t.forEach(((t,r)=>((e,t,n)=>{const r=t.instance.renderer().element();if(isNaN(n)||!r||!e||!e.children)return;const o=e.children[Math.max(0,n)];if(r===o)return;const i=t.instance.def.additionalElements&&t.instance.def.additionalElements().filter(Boolean);e.insertBefore&&void 0!==o?(e.insertBefore(r,o),i&&i.forEach((t=>{e.insertBefore(t,r)}))):(i&&i.forEach((t=>{e.appendChild(t,r)})),e.appendChild(r))})(e,t,n[r])))}function X4(e,t){let{element:n,data:r=[],settings:o={},on:i={}}=e;const a=t.registries,s=t.logger,l=R4(t.style,t.palettes),c=[],u=UZ({},e),d=function(){const e={};return F3.mixin(e),e}();let p=[],h=null,f=null,m=null,g=[],y=()=>{},_=()=>{};const b={};let x=!1;const v=function(e){let{createComponent:t}=e;const n={};let r=[],o=[];const i=e=>{const n=t(e);return n&&(r.push(n),e.components&&(n.children=e.components.map((e=>i(e))).filter((e=>!!e)))),n},a=e=>{const t=r.indexOf(e);-1!==t&&r.splice(t,1)},s=(e,t)=>{for(let n=e.length-1;n>=0;n--){const r=e[n],o=t.find((e=>r.hasKey&&r.key===e.key));o?r.children&&o.components&&s(r.children,o.components):(e.splice(n,1),a(r),r.children&&s(r.children,[]),r.instance.destroy())}},l=e=>{let{compList:t,data:n,excludeFromUpdate:r,formatters:o,scales:a,settingsList:s}=e;return s.map((e=>{const s=$4(t,e.key);return r.indexOf(e.key)>-1?(delete s.updateWith,s):s?(e.rendererSettings&&"function"==typeof s.instance.renderer().settings&&s.instance.renderer().settings(e.rendererSettings),e.rendererSettings&&"function"==typeof e.rendererSettings.transform&&e.rendererSettings.transform()?(s.applyTransform=!0,s):(s.updateWith={formatters:o,scales:a,data:n,settings:e},e.components&&(s.children=l({compList:s.children||[],data:n,excludeFromUpdate:r,formatters:o,scales:a,settingsList:e.components})),s)):i(e)})).filter((e=>!!e))},c=e=>{let{components:t,hidden:n,layoutFn:r,ordered:o,rect:i,visible:a}=e;const{visible:s,hidden:l,ordered:u}=r(i,t);a.push(...s),n.push(...l),o.push(...u),s.forEach((e=>{if(e.children){var t,r;const i=U4(null!==(t=null===(r=e.settings)||void 0===r?void 0:r.strategy)&&void 0!==t?t:{});c({components:e.children,hidden:n,layoutFn:i,ordered:o,rect:e.instance.getRect(),visible:a})}})),l.forEach((e=>{e.children&&c({components:e.children,hidden:n,layoutFn:V4,ordered:o,rect:null,visible:a})}))};return n.destroy=()=>{r.forEach((e=>e.instance.destroy())),r=[],o=[]},n.findComponentByKey=e=>$4(r,e),n.forEach=e=>{r.forEach(e)},n.layout=e=>{let{layoutSettings:t,rect:n}=e;const r=[],i=[],a=[],s=U4(t);return c({components:o,hidden:i,layoutFn:s,ordered:a,rect:n,visible:r}),{visible:r,hidden:i,ordered:a}},n.set=e=>{let{components:t}=e;o=t.map((e=>i(e))).filter((e=>!!e))},n.update=e=>{let{components:t,data:n,excludeFromUpdate:r,formatters:i,scales:a}=e;s(o,t),o=l({compList:o,data:n,excludeFromUpdate:r,formatters:i,scales:a,settingsList:t})},n}({createComponent:e=>{if(!a.component.has(e.type))return s.warn("Unknown component: ".concat(e.type)),!1;return{instance:U6(a.component(e.type),{settings:e,chart:u,mediator:d,registries:a,theme:l,container:n}),settings:UZ(!0,{},e),key:e.key,hasKey:void 0!==e.key}}});function w(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};return function(){const r="function"==typeof e[t];let o;for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return o=r?e[t].call(u,...a):n.call(u,...a),o}}const S=()=>{let e;o.dockLayout?(s.warn('Deprecation Warning: "dockLayout" property should be renamed to "strategy"'),e=o.dockLayout):e=o.strategy;const t=function(e){if("function"==typeof e.getBoundingClientRect){const{width:t,height:n}=e.getBoundingClientRect();return{x:0,y:0,width:t,height:n}}return{x:0,y:0,width:0,height:0}}(n);return v.layout({layoutSettings:e,rect:t})},C=w("created"),E=w("beforeMount"),k=w("mounted"),M=w("beforeUpdate"),R=w("updated"),A=w("beforeRender"),I=w("beforeDestroy"),P=w("destroyed"),O=function(e,t){let{partialData:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{formatters:r={},scales:o={},scroll:i={}}=t;y=function(e,t){let{types:n,logger:r}=t;const o={},i=[];return Array.isArray(e)?i.push(...e):(r.warn('Deprecated: "data-source" configuration"'),i.push(e)),i.forEach(((e,t)=>{let i=n(e.type);if(i){let n=e.key;void 0===e.key&&(r.warn("Missing key for dataset. Using index '".concat(t,"' as key.")),n=t);let a=i({key:n,data:e.data,config:e.config});o[n]=a}})),e=>e?o[e]:o[Object.keys(o)[0]]}(e,{logger:s,types:a.data}),n||Object.keys(b).forEach((e=>b[e].clear())),t.palettes&&l.setPalettes(t.palettes),t.style&&l.setStyle(t.style),_=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:X2;const o={};return(e||[]).forEach((e=>{if(!e.key)throw new Error('Data collection is missing "key" property');if("object"==typeof e.data&&"collection"in e.data)throw new Error("Data config for collections may not reference other collections");o[e.key]=()=>r(e.data,t,n)})),e=>{let t,n;if("string"==typeof e?t=e:"object"==typeof e&&(t=e.key,n=e),!(t in o))throw new Error("Unknown data collection: ".concat(t));"function"==typeof o[t]&&(o[t]=o[t]());let r=o[t];if(n&&n.fields&&n.fields.filter){let e=r.fields.filter(n.fields.filter);r.fields.length!==e.length&&(r=UZ(r,{fields:e}))}return r}}(t.collections,{dataset:y},{logger:s});const c={theme:l,logger:s};h=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:z3;const o={};return{get(i){let a;return"string"==typeof i&&e[i]?a=i:"object"==typeof i&&"scale"in i&&e[i.scale]&&(a=i.scale),a?(o[a]=o[a]||r(e[a],t,n),o[a]):r(i,t,n)},all(){return Object.keys(e).forEach(this.get),o}}}(o,{dataset:y,collection:_},JZ(JZ({},c),{},{scale:a.scale})),f=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:J2;const o={};return{get(i){let a;return"string"==typeof i&&e[i]?a=i:"object"==typeof i&&"formatter"in i&&e[i.formatter]?a=i.formatter:"object"==typeof i&&"type"in i&&e[i.type]&&(a=i.type),a?(o[a]=o[a]||r(e[a],t,n),o[a]):r(i||{},t,n)},all(){return Object.keys(e).forEach(this.get),o}}}(r,{dataset:y,collection:_},JZ(JZ({},c),{},{formatter:a.formatter})),m=function(e,t){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=B3(e[r],t?t[r]:null));return n}(i,m)};function L(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={},r=e.filter((e=>!!e.key)).map((e=>e.key));g.forEach((e=>{e.key&&-1!==r.indexOf(e.key)?t[e.key]=e:e.destroy()})),g=e.map((e=>{const r=e.key&&t[e.key]?t[e.key]:a.interaction(e.type)(u,d,n);return r.set(e),r}))}const D=e=>{const t=n.getBoundingClientRect(),r="clientX"in e?e.clientX:e.x,o="clientY"in e?e.clientY:e.y,i={x:r-t.left,y:o-t.top},a=[];return p.forEach((e=>{const t=e.instance.getRect();h4(t.computedPhysical?t.computedPhysical:{x:t.margin.left+t.x*t.scaleRatio.x,y:t.margin.top+t.y*t.scaleRatio.y,width:t.width*t.scaleRatio.x,height:t.height*t.scaleRatio.y},i)&&a.push(e)})),a},T=()=>{if(c.length||!n)return;Object.keys(i).forEach((e=>{const t=i[e].bind(u);n.addEventListener(e,t),c.push({key:e,listener:t})}));const e={},t=t=>{t.touches?(e.x=t.touches[0].clientX,e.y=t.touches[0].clientY,e.multiTouch=t.touches.length>1):(e.x=t.clientX,e.y=t.clientY,e.multiTouch=!1),e.time=Date.now(),e.comps=D(e)},r=t=>{const n=e.comps||D(t);if(!n.every((e=>e.instance.def.disableTriggers))&&("touchend"===t.type&&t.preventDefault(),function(e,t){const n=ZZ(e),r=n?e.changedTouches[0]:e,o=Date.now()-t.time,i=isNaN(t.x)?0:Math.abs(r.clientX-t.x),a=isNaN(t.y)?0:Math.abs(r.clientY-t.y);return(0===e.button||n)&&!t.multiTouch&&i<=12&&a<=12&&o<=300}(t,e)))for(let e=n.length-1;e>=0;e--){if(n[e].instance.onBrushTap(t),x){x=!1;break}}},o=[];o.push({key:"mousedown",listener:t}),o.push({key:"mouseup",listener:r}),function(e){return"ontouchstart"in e&&"ontouchend"in e||navigator.maxTouchPoints>1}(n)&&(o.push({key:"touchstart",listener:t}),o.push({key:"touchend",listener:r})),o.push({key:"mousemove",listener:e=>{const t=D(e);for(let n=t.length-1;n>=0;n--){if(t[n].instance.onBrushOver(e),x){x=!1;break}}}}),o.forEach((e=>{n.addEventListener(e.key,e.listener),c.push(e)}))},z=()=>{c.forEach((e=>{let{key:t,listener:r}=e;return n.removeEventListener(t,r)})),c.length=0},j=()=>{n.innerHTML="",(()=>{const{components:e=[]}=o;A(),O(r,o),v.set({components:e});const{visible:t,hidden:i,ordered:a}=S();p=t,i.forEach((e=>{e.instance.hide(),e.visible=!1})),t.forEach((e=>e.instance.beforeMount())),t.forEach((e=>e.instance.mount())),t.forEach((e=>e.instance.beforeRender())),t.forEach((e=>e.instance.render())),t.forEach((e=>e.instance.mounted())),t.forEach((e=>{e.visible=!0})),K4(n,a)})(),T(),L(o.interactions)};return u.layoutComponents=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{excludeFromUpdate:t=[]}=e;e.data&&(r=e.data),e.settings&&(o=e.settings,L(e.settings.interactions)),M(),O(r,o);const{formatters:n,scales:i,components:a=[]}=o;v.update({components:a,data:r,excludeFromUpdate:t,formatters:n,scales:i}),v.forEach((e=>{e.updateWith&&e.instance.set(e.updateWith)})),v.forEach((e=>{e.updateWith&&e.instance.beforeUpdate()})),S()},u.update=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{partialData:t,excludeFromUpdate:i=[]}=e;let a;e.data&&(r=e.data),e.settings&&(o=e.settings,L(e.settings.interactions)),M(),O(r,o,{partialData:t});const{formatters:s,scales:l,components:c=[]}=o;v.update({components:c,data:r,excludeFromUpdate:i,formatters:s,scales:l}),v.forEach((e=>{e.updateWith&&e.instance.set(e.updateWith)})),v.forEach((e=>{e.updateWith&&e.instance.beforeUpdate()}));const u=[],d=[];let h;if(t)v.forEach((e=>{(e.updateWith||e.applyTransform)&&e.visible&&u.push(e)})),h=u;else{const{visible:e,hidden:t,ordered:n}=S();p=e,h=e,a=n,e.forEach((e=>{e.updateWith&&e.visible?u.push(e):d.push(e)})),t.forEach((e=>{e.instance.hide(),e.visible=!1,delete e.updateWith,e.applyTransform=!1}))}d.forEach((e=>e.instance.beforeMount())),d.forEach((e=>e.instance.mount())),h.forEach((e=>e.instance.beforeRender())),h.forEach((e=>{(e.updateWith||e.applyTransform)&&e.visible?e.instance.update():e.instance.render()})),t||K4(n,a),d.forEach((e=>e.instance.mounted())),u.forEach((e=>e.instance.updated())),p.forEach((e=>{delete e.updateWith,e.visible=!0,e.applyTransform=!1})),R()},u.destroy=()=>{I(),v.destroy(),z(),L(),delete u.update,delete u.destroy,P()},u.getAffectedShapes=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"and",n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=[];return p.filter((e=>null==r||e.key===r)).forEach((r=>{const i=r.instance.getBrushedShapes(e,t,n);o=[...o,...i]})),o},u.findShapes=e=>{let t=[];return p.forEach((n=>{const r=n.instance.findShapes(e);t=[...t,...r]})),t},u.componentsFromPoint=e=>D(e).map((e=>e.instance.ctx)),u.shapesAt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=[];const o=n.getBoundingClientRect();let i=p;if(Array.isArray(t.components)&&t.components.length>0){const e=t.components.map((e=>e.key));i=p.filter((t=>-1!==e.indexOf(t.key))).map((n=>({instance:n.instance,opts:t.components[e.indexOf(n.key)]})))}for(let n=i.length-1;n>=0;n--){const a=i[n],s=Y4(e,o,a.instance.renderer().element().getBoundingClientRect()),l=a.instance.shapesAt(s,a.opts),c=l.length>0&&"stop"===t.propagation;if(r=[...r,...l],r.length>0&&c)return r}return r},u.brushFromShapes=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{components:[]};for(let n=0;n<t.components.length;n++){const r=t.components[n].key;p.filter((e=>r===e.key)).forEach((r=>{let o=e.filter((e=>e.key===r.key));r.instance.brushFromShapes(o,t.components[n])}))}},u.scroll=function(){return function(e,t){return t[e]||(t[e]=W3()),t[e]}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",m)},u.dataset=e=>y(e),u.dataCollection=e=>_(e),u.scales=function(){return h.all()},u.formatters=function(){return f.all()},u.brush=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return b[e]||(b[e]=o6()),b[e]},u.scale=function(e){return h.get(e)},u.formatter=function(e){return f.get(e)},u.toggleBrushing=function(e){x=void 0!==e?e:!x},u.component=e=>{const t=v.findComponentByKey(e);return null==t?void 0:t.instance.ctx},u.logger=()=>s,u.theme=()=>l,u.storage=Y6({animations:{updatingStageMeta:{isInit:!1,shouldBeRemoved:!1}}}),Object.defineProperty(u,"interactions",{get:()=>({instances:g,on(){T(),g.forEach((e=>e.on()))},off(){z(),g.forEach((e=>e.off()))}})}),C(),n&&(E(),j(),k(n),u.element=n),u}const J4=e=>{let t=u0(e);return t.prio=e=>e?t.default(e[0]):[t.default()],t.types=()=>t.getKeys(),t};var Z4=u0();function Q4(e,t,n){let{key:r}=n;const o={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return o.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(o.value),e.field&&(o.source={key:r,field:e.field.key()}),o}const e8=e=>e.filter((e=>"number"==typeof e&&!isNaN(e)));const t8=e=>{let{key:t,data:n,cache:r,config:o}=e;if(!n)return;let i=n;"string"==typeof i&&(i=(e=>{let{data:t,config:n}=e;const r=t.split("\n"),o=r[0],i=r[1];let a=",";if(n&&n.parse&&n.parse.delimiter)a=n.parse.delimiter;else if(o){const e=[/,/,/\t/,/;/];for(let t=0;t<e.length;t++){const n=e[t];if(o&&i){if(n.test(o)&&n.test(i)&&o.split(n).length===i.split(n).length){a=n;break}}else n.test(o)&&(a=n)}}return r.map((e=>e.split(a)))})({data:n,config:o})),Array.isArray(i)&&function(e){let t,{source:n,data:r,cache:o,config:i}=e,a=r;const s=i&&i.parse;Array.isArray(r[0])?s&&!1===s.headers?t=r[0].map(((e,t)=>t)):(t=r[0],a=r.slice(1)):t=Object.keys(r[0]);const l=!!s&&"function"==typeof s.row&&s.row;let c,u=t;u=s&&"function"==typeof s.fields?s.fields(u.slice()):t.map((e=>({key:e,title:e}))),Array.isArray(r[0])?c=u.map((()=>[])):(c={},u.forEach((e=>{c[e.key]=[]})));for(let e=0;e<a.length;e++){const t=l?l(a[e],e,u):a[e];if(t)if(Array.isArray(t))for(let e=0;e<u.length;e++)c[e].push(t[e]);else for(let e=0;e<u.length;e++)c[u[e].key].push(t[u[e].key])}const d=Array.isArray(c)?e=>c[e]:e=>c[u[e].key];for(let e=0;e<u.length;e++){const t=d(e),r=e8(t),i=r.length>0,a=i?"measure":"dimension",s=i?Math.min(...r):NaN,l=i?Math.max(...r):NaN;o.fields.push(z2(UZ({source:n,key:e,title:u[e].title,values:t,min:s,max:l,type:a},u[e]),{value:u[e].value,label:u[e].label}))}}({data:i,cache:r,source:t,config:o})};function n8(){let{key:e,data:t,config:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r={fields:[]},o={key:()=>e,raw:()=>t,field:e=>function(e,t){let{cache:n}=t;if("number"==typeof e)return n.fields[e];for(let t=0;t<n.fields.length;t++)if(n.fields[t].key()===e)return n.fields[t];for(let t=0;t<n.fields.length;t++)if(n.fields[t].title()===e)return n.fields[t];return null}(e,{cache:r}),fields:()=>r.fields.slice(),extract:e=>function(e,t){const n=Array.isArray(e)?e:[e];let r=[];return n.forEach((e=>{if(void 0!==e.field){const n=t.field(e.field),o=t.key();if(!n)throw Error("Field '".concat(e.field,"' not found"));const{props:i,main:a}=W2(e,t),s=Object.keys(i),l=!!e.trackBy,c=typeof e.trackBy,u={},d=[],p=n.items(),h=[];for(let t=0;t<p.length;t++){const n=p[t];if(a.filter&&!a.filter(n))continue;const r=Q4(a,n,{key:o});s.forEach((e=>{const a=i[e];let s=a.field?a.field.items()[t]:n;r[e]=Q4(a,s,{key:o})})),l&&H2({cfg:e,itemData:n,obj:r,target:d,tracker:u,trackType:c}),h.push(r)}r=l?[...r,...$2(d,{main:a,propsArr:s,props:i})]:[...r,...h]}})),r}(e,o),hierarchy:()=>null};return t8({key:e,data:t,config:n,cache:r}),o}n8.util={normalizeConfig:W2,collect:$2,track:H2};const r8=u0();r8.default("matrix"),r8("matrix",n8),r8("default",n8);const o8=u0();function i8(e,t,n){return Math.max(e,Math.min(t,n))}function a8(e){let{item:t,value:n,boxCenter:r,rendWidth:o,rendHeight:i,flipXY:a,symbol:s}=e,l="x",c="y",u=o,d=i,p=n<.5?90:-90;return a&&(l="y",c="x",u=i,d=o,p=n<.5?180:0),s(UZ({},t.oob,{[l]:r*u,[c]:Math.max(t.oob.size/2,Math.min(n*d,d-t.oob.size/2)),startAngle:p}))}function s8(e){let{item:t,boxWidth:n,boxPadding:r,rendWidth:o,rendHeight:i,flipXY:a}=e,s="x",l="y",c="width",u="height",d=o,p=i;a&&(s="y",l="x",c="height",u="width",d=i,p=o);const{actualDiff:h,actualLow:f}=function(e){let{start:t,end:n,minPx:r=.1,maxPx:o=1}=e;const i=Math.max(t,n),a=Math.min(t,n),s=i8(-.1,1.2,i),l=i8(-.1,1.2,a),c=s*o-l*o,u=Math.max(r,c),d=(u-c)/2;return{actualDiff:u,startModifier:d,actualLow:l*o-d}}({start:t.start,end:t.end,minPx:t.box.minHeightPx,maxPx:p});return UZ({},t.box,{type:"rect",[s]:(r+t.major)*d,[l]:f,[u]:h,[c]:n*d,data:t.data||{},collider:{type:null}})}function l8(e){let{item:t,from:n,to:r,boxCenter:o,rendWidth:i,rendHeight:a,flipXY:s}=e,l="x1",c="y1",u="x2",d="y2",p=i,h=a;return s&&(l="y1",c="x1",u="y2",d="x2",p=a,h=i),UZ({},t.line,{type:"line",[d]:Math.floor(n*h),[l]:o*p,[c]:Math.floor(r*h),[u]:o*p,data:t.data||{},collider:{type:null}})}function c8(e){let{item:t,key:n,position:r,width:o,boxCenter:i,rendWidth:a,rendHeight:s,flipXY:l}=e,c="x1",u="y1",d="x2",p="y2",h=a,f=s;l&&(c="y1",u="x1",d="y2",p="x2",h=s,f=a);const m=o/2;return UZ({type:"line"},t[n],{[u]:Math.floor(r*f),[c]:(i-m)*h,[p]:Math.floor(r*f),[d]:(i+m)*h,r:m*h,cx:i*h,cy:r*f,width:o*h,data:t.data||{},collider:{type:null}})}function u8(e,t,n){const{width:r,maxWidthPx:o,minWidthPx:i}=t.box,a=e>=0?1:-1;let s=Math.min(a*e*r,isNaN(o)?n:o/n);return s=isNaN(i)?s:Math.max(i/n,s),s*a}o8("native",(function(e,t,n){let r,o,i={chart:e,mediator:t,element:n},a=[],s=!0;function l(){"function"==typeof r.enable&&(r.enable=r.enable.bind(i)()),r.enable&&Object.keys(r.events).forEach((e=>{const t=r.events[e].bind(i);n.addEventListener(e,t),a.push({key:e,listener:t})}))}function c(){a.forEach((e=>{let{key:t,listener:r}=e;n.removeEventListener(t,r)})),a=[]}return{get key(){return o},set(e){!function(e){o=e.key,r=e,r.events=r.events||[],void 0===r.enable&&(r.enable=!0)}(e),c(),s&&l()},off(){s=!1,c()},on(){s=!0,0===a.length&&l()},destroy(){c(),i=null,r=null}}}));const d8={oob:{show:!0,type:"n-polygon",fill:"#999",stroke:"#000",strokeWidth:0,size:10,sides:3,startAngle:-90},box:{show:!0,fill:"#fff",stroke:"#000",strokeWidth:1,strokeLinejoin:"miter",width:1,maxWidthPx:void 0,minWidthPx:1,minHeightPx:1},line:{show:!0,stroke:"#000",strokeWidth:1},median:{show:!0,stroke:"#000",strokeWidth:1},whisker:{show:!0,stroke:"#000",strokeWidth:1,fill:"",type:"line",width:1}},p8=Object.keys(d8),h8={require:["chart","resolver","symbol"],defaultSettings:{settings:{},data:{},style:{box:"$shape",line:"$shape-guide",whisker:"$shape-guide",median:"$shape-guide--inverted"}},created(){this.state={}},render(e){let{data:t}=e;const{width:n,height:r}=this.rect,o="horizontal"===this.settings.settings.orientation,{style:i,resolver:a,symbol:s}=this,l=p8.filter((e=>!this.settings.settings[e]||!1!==this.settings.settings[e].show)),c={};l.forEach((e=>c[e]=d8[e]));const u=function(e){let{keys:t,data:n,defaultSettings:r,style:o,settings:i,width:a,height:s,resolver:l}=e;const c=UZ(!0,{},r||{},o||{}),u={major:"horizontal"===i.orientation?s:a,minor:"horizontal"===i.orientation?a:s},d=i.major;let p;p="object"==typeof d&&"object"==typeof d.ref&&void 0!==d.ref.start&&void 0!==d.ref.end?l.resolve({data:n,defaults:{start:0,end:1},scaled:u,settings:UZ(!0,{},{binStart:{scale:i.major.scale,ref:i.major.ref.start},binEnd:{scale:i.major.scale,ref:i.major.ref.end}})}):"object"==typeof d&&void 0!==d.binStart&&void 0!==d.binEnd?l.resolve({data:n,defaults:{start:0,end:1},scaled:u,settings:UZ(!0,{},{binStart:{scale:i.major.scale,ref:"binStart"},binEnd:{scale:i.major.scale,ref:"binEnd"}},i.major)}):l.resolve({data:n,scaled:u,defaults:{major:.5},settings:{major:i.major}});const h=i.minor||{},f={};["start","end","min","max","med"].forEach((e=>{(h[e]||n.items&&n.items.length&&n.items[0][e])&&(f[e]={scale:h.scale,ref:e})}));let m,g={major:p,minor:l.resolve({data:n,defaults:{start:0,end:1},scaled:u,settings:UZ(!0,{},f,h)})};for(let e=0,r=t.length;e<r;e++)i[m]&&!1===i[m].show||(m=t[e],g[m]=l.resolve({data:n,defaults:c[m],settings:i[m],scaled:u}));return g}({keys:l,data:t,defaultSettings:c,style:i,settings:this.settings.settings,width:n,height:r,resolver:a}),{settings:d,items:p}=u,h=function(e){let{width:t,height:n,flipXY:r,resolved:o,keys:i,symbol:a}=e;const s=[],l=o.major.items;if(!l.length)return s;const c=t,u=n,d=r?n:t,p=o.major.settings,h=["start","end","min","max","med"].filter((e=>void 0!==o.minor.settings[e])),f=h.length,m=i.filter((e=>"oob"!==e));let g,y,_,b,x,v,w,S,C;const E=i?i.length:0,k=m?m.length:0,M={box:function(){_.box&&QZ(_.start)&&QZ(_.end)&&g.push(s8({item:_,boxWidth:b,boxPadding:x,rendWidth:c,rendHeight:u,flipXY:r}))},line:function(){QZ(_.min)&&QZ(_.start)&&g.push(l8({item:_,from:_.min,to:_.start,boxCenter:v,rendWidth:c,rendHeight:u,flipXY:r})),QZ(_.max)&&QZ(_.end)&&g.push(l8({item:_,from:_.max,to:_.end,boxCenter:v,rendWidth:c,rendHeight:u,flipXY:r}))},median:function(){_.median&&QZ(_.med)&&g.push(c8({item:_,key:"median",position:_.med,width:b,boxCenter:v,rendWidth:c,rendHeight:u,flipXY:r}))},whisker:function(){if(_.whisker){const e=b*_.whisker.width;QZ(_.min)&&g.push(c8({item:_,key:"whisker",position:_.min,width:e,boxCenter:v,rendWidth:c,rendHeight:u,flipXY:r})),QZ(_.max)&&g.push(c8({item:_,key:"whisker",position:_.max,width:e,boxCenter:v,rendWidth:c,rendHeight:u,flipXY:r}))}}};function R(){let e,t=-Number.MAX_VALUE,n=Number.MAX_VALUE;for(let r=0;r<f;r++)e=_[h[r]],QZ(e)&&(t<e&&(t=e),n>e&&(n=e));w=t<0&&t!==-Number.MAX_VALUE,S=n>1&&n!==Number.MAX_VALUE,C=w||S}for(let e=0,t=l.length;e<t;e++){g=[],y=null;const t=l[e],n=t.data;let h=null,f=null;void 0!==p.binStart?(h=t.binStart,f=t.binEnd,y=p.binStart.scale):(y=p.major.scale,h=y?t.major:0);let A=0;y?y.bandwidth?(A=y.bandwidth(),h-=A/2):A=f-h:A=1,_=UZ({},{major:h,majorEnd:f},o.minor.items[e]);for(let t=0;t<E;t++)_[i[t]]=o[i[t]].items[e];if(b=u8(A,_,d),x=(A-b)/2,v=x+_.major+b/2,R(),C)_.oob&&(w?g.push(a8({item:_,value:0,boxCenter:v,rendWidth:c,rendHeight:u,flipXY:r,symbol:a})):S&&g.push(a8({item:_,value:1,boxCenter:v,rendWidth:c,rendHeight:u,flipXY:r,symbol:a})));else for(let e=0;e<k;e++)_[m[e]]&&!1===_[m[e]].show||M[m[e]]();const I={type:"container",data:n,collider:{type:"bounds"},children:g};s.push(I)}return s}({width:n,height:r,flipXY:o,resolved:u,keys:l,symbol:s});return h}};const f8={shape:"saltire",width:2,size:.5,fill:"#333",stroke:"#333",strokeWidth:0},m8=/px$/,g8={shape:"circle",label:"",fill:"#333",stroke:"#ccc",strokeDasharray:"",strokeWidth:0,strokeLinejoin:"miter",opacity:1,x:.5,y:.5,size:1,show:!0},y8={maxPx:1e4,minPx:1,maxRelExtent:.1,minRelExtent:.01,maxRelDiscrete:1,minRelDiscrete:.1};function _8(e,t){return e&&"function"==typeof e.bandwidth?{isBandwidth:!0,value:Math.max(1,e.bandwidth()*t)}:{isBandwidth:!1,value:Math.max(1,t)}}function b8(e,t,n,r){let{width:o,height:i}=t;return e.filter((e=>!1!==e.show&&!isNaN(e.x+e.y))).map((e=>{let t=e,a=m8.test(e.size)?parseInt(e.size,10):n.min+t.size*(n.max-n.min);eQ(a)&&(t=f8,a=n.min+t.size*(n.max-n.min));const[s,l]=function(e){let t=g8.shape,n={};return"object"==typeof e.shape&&"string"==typeof e.shape.type?(t=e.shape.type,n=e.shape):"string"==typeof e.shape&&(t=e.shape),[t,n]}(t),c=JZ(JZ({},l),{},{type:s,label:e.label,x:e.x*o,y:e.y*i,fill:t.fill,size:Math.min(n.maxGlobal,Math.max(n.minGlobal,a)),stroke:t.stroke,strokeWidth:t.strokeWidth,strokeDasharray:t.strokeDasharray,opacity:t.opacity});t===e.errorShape&&(c.width=t.width);const u=r(c);return u.data=e.data,u}))}const x8={require:["chart","resolver","symbol"],defaultSettings:{settings:{},data:{},animations:{enabled:!1,trackBy:e=>e.data.value},style:{item:"$shape"}},render(e){let{data:t}=e;const n=this.resolver.resolve({data:t,defaults:UZ({},g8,this.style.item),settings:this.settings.settings,scaled:{x:this.rect.width,y:this.rect.height}}),{width:r,height:o}=this.rect,i=UZ({},y8,this.settings.settings.sizeLimits),a=n.items,s=function(e,t,n,r,o){const i=_8(e?e.scale:void 0,n),a=_8(t?t.scale:void 0,r);let s=Math.min(i.value*o[i.isBandwidth?"maxRelDiscrete":"maxRelExtent"],a.value*o[a.isBandwidth?"maxRelDiscrete":"maxRelExtent"]),l=Math.min(i.value*o[i.isBandwidth?"minRelDiscrete":"minRelExtent"],a.value*o[a.isBandwidth?"minRelDiscrete":"minRelExtent"]);return{min:Math.max(1,Math.floor(l)),max:Math.max(1,Math.floor(s)),maxGlobal:o.maxPx,minGlobal:o.minPx}}(n.settings.x,n.settings.y,r,o,i);return b8(a,this.rect,s,this.settings.shapeFn||this.symbol)}};const v8={label:"",arc:1,show:!0,fill:"#333",stroke:"#ccc",strokeWidth:1,strokeLinejoin:"round",opacity:1,innerRadius:0,outerRadius:.8,cornerRadius:0,offset:0};function w8(e,t,n,r){let{x:o,y:i,width:a,height:s}=t;const l=LQ(),c={x:o+a/2,y:i+s/2},u=Math.min(a,s)/2,d=Math.min(a,s)/2,p=d/100;return e.map(((e,t)=>{const o=n[t];o.type="path";const i=d*o.outerRadius,a=u*o.innerRadius,s=p*o.cornerRadius;l.innerRadius(a),l.outerRadius(i),l.cornerRadius(s),o.arcDatum=e;const h=l.centroid(e),f=o.offset?function(e,t,n,r){let[o,i]=e;const a=Math.sqrt(o*o+i*i);o/=a,i/=a;const s=n-r;return{x:o*t*s,y:i*t*s}}(h,o.offset,i,a):{x:0,y:0};return o.transform="translate(".concat(f.x,", ").concat(f.y,") translate(").concat(c.x,", ").concat(c.y,")"),o.desc={share:e.value/r,slice:{start:e.startAngle,end:e.endAngle,innerRadius:a,outerRadius:i,cornerRadius:s,offset:{x:c.x+f.x,y:c.y+f.y}}},o}))}function S8(e,t){return e.slice&&"arc"in e.slice?t.arc:t.data.value}const C8={require:["chart","resolver"],defaultSettings:{settings:{startAngle:0,endAngle:2*Math.PI,padAngle:0,slice:{}},style:{slice:"$shape"},data:{}},render(e){let{data:t}=e;const n=[],r=[],o=this.settings.settings,{items:i}=this.resolver.resolve({data:t,defaults:UZ({},v8,this.style.slice),settings:o.slice});let a=0;for(let e=0,t=i.length;e<t;e++){const t=S8(o,i[e]);t>0&&i[e].outerRadius>=i[e].innerRadius&&(n.push(t),r.push(i[e]),a+=t)}const s=function(){var e=FQ,t=qQ,n=null,r=fQ(0),o=fQ(EQ),i=fQ(0);function a(a){var s,l,c,u,d,p=a.length,h=0,f=new Array(p),m=new Array(p),g=+r.apply(this,arguments),y=Math.min(EQ,Math.max(-EQ,o.apply(this,arguments)-g)),_=Math.min(Math.abs(y)/p,i.apply(this,arguments)),b=_*(y<0?-1:1);for(s=0;s<p;++s)(d=m[f[s]=s]=+e(a[s],s,a))>0&&(h+=d);for(null!=t?f.sort((function(e,n){return t(m[e],m[n])})):null!=n&&f.sort((function(e,t){return n(a[e],a[t])})),s=0,c=h?(y-p*b)/h:0;s<p;++s,g=u)l=f[s],u=g+((d=m[l])>0?d*c:0)+b,m[l]={data:a[l],index:s,value:d,startAngle:g,endAngle:u,padAngle:_};return m}return a.value=function(t){return arguments.length?(e="function"==typeof t?t:fQ(+t),a):e},a.sortValues=function(e){return arguments.length?(t=e,n=null,a):t},a.sort=function(e){return arguments.length?(n=e,t=null,a):n},a.startAngle=function(e){return arguments.length?(r="function"==typeof e?e:fQ(+e),a):r},a.endAngle=function(e){return arguments.length?(o="function"==typeof e?e:fQ(+e),a):o},a.padAngle=function(e){return arguments.length?(i="function"==typeof e?e:fQ(+e),a):i},a}().sortValues(null);s.startAngle(o.startAngle),s.endAngle(o.endAngle),s.padAngle(o.padAngle);return w8(s(n),UZ({},this.rect,{x:0,y:0}),r,a)}};const E8=function(e){function t(t){if(e[t.type]&&e[t.type].condition(t)){const n=e[t.type],r=void 0===n.conditionAppend||n.conditionAppend(t);n.items.forEach((e=>{const n=Math.round(t[e.key]),o=t[e.key]-n;t[e.key]=n,r&&"append"===e.type&&(o>0?t[e.key]+=.5:t[e.key]-=.5)}))}}return void 0===e&&((e={}).line={append:["x1","x2","y1","y2"],round:[],condition:e=>e.x1===e.x2||e.y1===e.y2,conditionAppend:e=>e.strokeWidth%2!=0},e.rect={append:["x","y"],round:["width","height"],condition:()=>!0,conditionAppend:e=>e.strokeWidth%2!=0}),Object.keys(e).forEach((t=>{const n=e[t];n.items=[],n.append.forEach((e=>{n.items.push({key:e,type:"append"})})),n.round.forEach((e=>{n.items.push({key:e,type:"round"})}))})),t.multiple=e=>e.forEach((e=>t(e))),t}();class k8{constructor(){this.reset(),this.push(...arguments)}static evaluateKey(e,t){if(t){const t=e.substring(0,1),n=e.substring(1);if("x"===t)return"y".concat(n);if("y"===t)return"x".concat(n);if("cx"===e)return"cy";if("cy"===e)return"cx";if("width"===e)return"height";if("height"===e)return"width"}return e}transposeCoordinate(e,t,n){if("number"==typeof t&&isFinite(t)){const r=e.substring(0,1);if("x"===r||"cx"===e)return t*this.width;if("width"===e)return t*this.width;if("r"===e)return t*(n?this.height:this.width);if("y"===r||"cy"===e)return t*this.height;if("height"===e)return t*this.height}return t}push(){return this.storage.push(...arguments),this}processItem(e){let t={};const n=void 0!==e.flipXY?e.flipXY:this.flipXY,r=void 0!==e.crisp?e.crisp:this.crisp;if(e.fn&&"function"==typeof e.fn){let r=n?this.height:this.width,o=n?this.width:this.height;e=e.fn({width:r,height:o,flipXY:n});const i=Object.keys(e);for(let r=0,o=i.length;r<o;r++){let o=i[r];t[k8.evaluateKey(o,n)]=e[o]}}else{const r=Object.keys(e);for(let o=0,i=r.length;o<i;o++){let i=r[o];const a=k8.evaluateKey(i,n),s=this.transposeCoordinate(a,e[i],n);t[a]=s}}return r&&E8(t),t}output(){let e=[];for(let t=0,n=this.storage.length;t<n;t++){let n=this.processItem(this.storage[t]);e.push(n)}return e}reset(){this.storage=[],this.flipXY=!1,this.crisp=!1,this.width=0,this.height=0}}function M8(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new k8(...t)}function R8(e,t){return e&&t?e.cachedTicks&&e.cachedTicks()||e.ticks({distance:t}):[]}const A8={created(){},require:["chart","renderer","resolver"],defaultSettings:{layout:{displayOrder:0},style:{ticks:"$guide-line",minorTicks:"$guide-line--minor"}},beforeRender(){this.blueprint=M8(),this.blueprint.width=this.rect.width,this.blueprint.height=this.rect.height,this.blueprint.x=this.rect.x,this.blueprint.y=this.rect.y,this.blueprint.crisp=!0},render(){if(this.x=this.settings.x?this.chart.scale(this.settings.x):null,this.y=this.settings.y?this.chart.scale(this.settings.y):null,g6(this,"x",this.rect.width),g6(this,"y",this.rect.height),!this.x&&!this.y)return[];this.settings.ticks=UZ({show:!0},this.style.ticks,this.settings.ticks||{}),this.settings.minorTicks=UZ({show:!1},this.style.minorTicks,this.settings.minorTicks||{}),this.lines={x:[],y:[]},this.lines.x=R8(this.x,this.rect.width),this.lines.y=R8(this.y,this.rect.height),this.lines.y=this.lines.y.map((e=>UZ(e,{flipXY:!0})));let e=e=>{let{dir:t,isMinor:n}=e,r=this.lines[t].filter((e=>!!e.isMinor===n)),o=n?this.settings.minorTicks:this.settings.ticks;this.resolver.resolve({settings:o,data:{items:r,dir:t}}).items.forEach((e=>{let n=e.data;var r,o;e.show&&this.blueprint.push({type:"line",x1:n.position,y1:0,x2:n.position,y2:1,stroke:e.stroke||"black",strokeWidth:void 0!==e.strokeWidth?e.strokeWidth:1,strokeDasharray:void 0!==e.strokeDasharray?e.strokeDasharray:void 0,flipXY:n.flipXY||!1,value:null!==(r=n.value)&&void 0!==r?r:null===(o=n.data)||void 0===o?void 0:o.value,dir:t})}))};return e({dir:"x",isMinor:!1}),e({dir:"x",isMinor:!0}),e({dir:"y",isMinor:!1}),e({dir:"y",isMinor:!0}),this.blueprint.output()}};function I8(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"bottom";if(n*=.8,"left"===r||"right"===r){let o="right"===r;return"\n M ".concat(e," ").concat(t-n,"\n A ").concat(1.25*n," ").concat(1.25*n,", 0, 1, ").concat(o?0:1,", ").concat(e," ").concat(t+n,"\n L ").concat(o?e+n:e-n," ").concat(t," Z\n ")}let o="bottom"===r;return"\n M ".concat(e-n," ").concat(t,"\n A ").concat(1.25*n," ").concat(1.25*n,", 0, 1, ").concat(o?1:0,", ").concat(e+n," ").concat(t,"\n L ").concat(e," ").concat(o?t+n:t-n," Z\n ")}function P8(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"bottom";if(n*=.75,"left"===r||"right"===r){let o="right"===r;return"\n M ".concat(e+=o?1.5*n:-1.5*n," ").concat(t-n,"\n L ").concat(e," ").concat(t+n,"\n L ").concat(o?e+n:e-n," ").concat(t," Z\n ")}let o="bottom"===r;return t+=o?1.5*n:-1.5*n,"\n M ".concat(e-n," ").concat(t,"\n L ").concat(e+n," ").concat(t,"\n L ").concat(e," ").concat(o?t+n:t-n," Z\n ")}function O8(e,t,n){return e<t||e>n}function L8(e,t){if("string"==typeof e.formatter)return t.formatter(e.formatter);if("object"==typeof e.formatter)return t.formatter(e.formatter);if(void 0!==e.scale&&e.scale.data){const t=e.scale.data()&&e.scale.data().fields;return t&&t[0]?t[0].formatter():null}return null}function D8(e){if(void 0===e)return 0;if("number"==typeof e&&isFinite(e))return e;if("string"==typeof e)switch(e){case"center":case"middle":return.5;case"bottom":case"right":return 1;default:return 0}return 0}function T8(e){var t,n;let{chart:r,blueprint:o,renderer:i,p:a,settings:s,items:l,slopeLine:c}=e,u=!0,d=!1,p=!1,h=!1,f=!1,m=UZ(!0,{},s.style.line,a.line||{}),g=UZ(!0,{fill:"#000",fontFamily:"Arial",fontSize:"12px",opacity:1,maxWidth:1,maxWidthPx:9999,padding:5,background:{fill:"#fff",stroke:"transparent",strokeWidth:0,opacity:.5}},s.style.label||{},{fill:m.stroke});if(d=c?o.processItem({type:"line",x1:c.x1,y1:c.y1,x2:c.x2,y2:c.y2,stroke:m.stroke||"black",strokeWidth:m.strokeWidth||1,strokeDasharray:m.strokeDasharray,flipXY:!1,value:a.valueInfo?a.valueInfo.id:a.value}):o.processItem({type:"line",x1:a.position,y1:0,x2:a.position,y2:1,stroke:m.stroke||"black",strokeWidth:m.strokeWidth||1,strokeDasharray:m.strokeDasharray,flipXY:a.flipXY||!1,value:a.valueInfo?a.valueInfo.id:a.value}),a.label&&!1!==a.label.show&&(null==c||!c.slope||0===c.slope)){const e=UZ(!0,{fill:"#000",fontFamily:"Arial",fontSize:"12px",opacity:1,maxWidth:1,maxWidthPx:9999,padding:5,background:{fill:"#fff",stroke:"transparent",strokeWidth:0,opacity:.5}},s.style.label||{},{fill:m.stroke},a.label);let t,n={width:0,height:0},c="";t=L8(a,r),!1!==a.label.showValue&&(t?c=" (".concat(t(a.value),")"):a.scale&&(c=" (".concat(a.value,")"))),c&&(n=i.measureText({text:c,fontFamily:e.fontFamily,fontSize:e.fontSize}));let d=i.measureText({text:e.text||"",fontFamily:e.fontFamily,fontSize:e.fontSize}),g={width:d.width+n.width,height:Math.max(d.height,n.height)},y=e.padding,_=D8(a.flipXY?e.vAlign:e.align),b=D8(a.flipXY?e.align:e.vAlign),x=Math.min(1+g.width+2*y,e.maxWidth*o.width,e.maxWidthPx),v=g.height+2*y,w=a.flipXY?v:x,S=a.flipXY?x:v;if(p=o.processItem({fn:t=>{let{width:n,height:r}=t,i=a.position*n-(a.flipXY?v:x)*(1-_);i=a.flipXY?i:Math.max(i,0);return{type:"rect",x:i,y:Math.max(Math.abs(b*r-S*b),0),width:a.flipXY?w:Math.min(w,o.width-i),height:S,stroke:e.background.stroke,strokeWidth:e.background.strokeWidth,fill:e.background.fill,opacity:e.background.opacity}},flipXY:a.flipXY||!1}),p.x<-1||p.x+p.width>o.width+1||p.y<-1||p.y+p.height>o.height+1)p=void 0;else{h={type:"text",text:e.text||"",fill:e.fill,opacity:e.opacity,fontFamily:e.fontFamily,fontSize:e.fontSize,x:p.x+y,y:p.y+p.height/2+g.height/3,maxWidth:p.width-2*y-n.width,anchor:"start"},c&&(f={type:"text",text:c||"",fill:e.fill,opacity:e.opacity,fontFamily:e.fontFamily,fontSize:e.fontSize,x:h.x+3+(p.width-(n.width+2*y)),y:h.y});for(let e=0,t=l.length;e<t;e++){let t=l[e];"rect"===t.type?d4(p,t)&&(u=!1):"line"===t.type&&a.flipXY===t.flipXY&&f4(p,t)&&(u=!1)}}}if(d&&l.push(d),c&&0!==c.slope&&(!1!==(null===(t=c.label)||void 0===t?void 0:t.show)||!1!==(null===(n=c.label)||void 0===n?void 0:n.showValue))){var y,_,b;let e,t;const n=120;let s=!1!==(null===(y=c.label)||void 0===y?void 0:y.show)?null===(_=c.label)||void 0===_?void 0:_.text:"";if(!1!==(null===(b=c.label)||void 0===b?void 0:b.showValue)){var x;const t=L8(a,r),n=t?t(c.value):c.value;e="(".concat(c.slope,"x + ").concat(n,")"),s+=null!==(x=c.label)&&void 0!==x&&x.text?" ".concat(e):e}if(s.length>1){var v,w,S;const e=i.measureText({text:s,fontFamily:g.fontFamily,fontSize:g.fontSize});e.width=e.width>n?n:e.width;const a=function(e,t,n){const r=e.scale({scale:"x"}),o=e.scale({scale:"y"});if(t>0){if(r.max()*t+n>=o.max())return!0}else if(t<0&&r.min()*t+n>=o.max())return!0;return!1}(r,c.slope,c.value)?function(e,t,n){const r=e.scale({scale:"x"}),o=e.scale({scale:"y"});return r((o.max()-n)/t)}(r,c.slope,c.value):void 0,u=void 0===a||c.isRtl?g.padding:3*g.padding,p=void 0!==a||c.slope>0?3*g.padding:g.padding,h=function(e,t,n,r,o,i){let a=0;if(void 0!==n){if(n<.8)return a=e.slope<0||e.isRtl?3*i.padding:2*i.padding,e.isRtl,n*o.width+a;if(1===n)return e.isRtl?n*o.width-(r.width+3*i.padding):n*o.width-(r.width+6*i.padding);if(n>.8)return e.isRtl?n*o.width-(r.width+3*i.padding):n*o.width-(r.width+6*i.padding)}else if(e.slope>0)return t.x2-(r.width+2*i.padding);return e.isRtl?t.x1-(r.width+2*i.padding):t.x1}(c,d,a,e,o,g),f=Math.min(d.y1,d.y2);null!==(v=c.label)&&void 0!==v&&v.stroke&&(t={type:"rect",x:c.isRtl?Math.max(h,u)-2:Math.max(h,u)+2,y:Math.abs(Math.max(f,p)-e.height),rx:3,ry:3,width:e.width+g.padding,height:e.height-2,stroke:m.stroke,fill:m.stroke});const y={type:"text",text:s,fill:null!==(w=null===(S=c.label)||void 0===S?void 0:S.stroke)&&void 0!==w?w:m.stroke,opacity:g.opacity,fontFamily:g.fontFamily,fontSize:g.fontSize,x:t?t.x+2:Math.max(h,u)+2,y:t?t.y+e.height-g.padding:Math.abs(Math.max(f,p)-g.padding/2),anchor:"start",title:s,maxWidth:n,width:e.width};(function(e,t,n,r,o){for(let i=0,a=e.length;i<a;i++){const a=e[i];if("text"===(null==a?void 0:a.type)&&Math.abs(a.x-t.x)<Math.max(a.width+r,t.width+r)&&Math.abs(a.y-t.y)<n.height+o)return!0}return!1})(l,y,e,u,p)||(t&&l.push(t),l.push(y))}}u&&p&&h&&(l.push(p,h),f&&l.push(f))}function z8(e){const t={value:e.value};return e.label&&(t.label=e.label.text),t}function j8(e){return void 0!==("function"==typeof e.value?e.value():e.value)}function N8(e,t){const n=e.min();if(n===e.max()){const r=function(e){const t=e.range();return 2===(null==t?void 0:t.length)&&t[0]>t[1]}(e);if(t<n)return r?2:-1;if(t>n)return r?-1:2}return e(t)}function q8(e,t){return e&&t&&Math.abs(e.x-t.x)<1e-15&&Math.abs(e.y-t.y)<1e-15}const F8={require:["chart","renderer"],defaultSettings:{layout:{displayOrder:0},style:{oob:{show:!0,width:10,fill:"#1A1A1A",stroke:"transparent",strokeWidth:0,opacity:1,text:{fontFamily:"Arial",stroke:"transparent",fill:"#fff",strokeWidth:0,opacity:1},triangle:{fill:"#4D4D4D",stroke:"transparent",strokeWidth:0,opacity:1},padding:{x:28,y:5}},line:{stroke:"#000"},label:{strokeWidth:0}}},preferredSize:()=>30,beforeRender(){this.blueprint=M8(),this.blueprint.width=this.rect.width,this.blueprint.height=this.rect.height,this.blueprint.x=this.rect.x,this.blueprint.y=this.rect.y,this.blueprint.crisp=!0},render(){let e=this.settings;if(this.lines={x:[],y:[]},this.lines.x=e.lines&&e.lines.x||[],this.lines.y=e.lines&&e.lines.y||[],0===this.lines.x.length&&0===this.lines.y.length)return[];const t={x0:[],x1:[],y0:[],y1:[]};this.lines.x=this.lines.x.filter(j8).map((e=>{if("function"==typeof e.value&&(e.value=e.value()),e.scale){let t=this.chart.scale(e.scale);const n=N8(t,e.value);return UZ(e,{scale:t,position:n})}return UZ(e,{position:e.value})})),this.lines.y=this.lines.y.filter(j8).map((e=>{if("function"==typeof e.value&&(e.value=e.value()),e.scale){let t=this.chart.scale(e.scale);const n=N8(t,e.value);return UZ(e,{scale:t,position:n,flipXY:!0})}return UZ(e,{position:e.value,flipXY:!0})})),this.lines.x=this.lines.x.filter((e=>!(e.position<0||e.position>1)||(t["x".concat(e.position>1?1:0)].push(z8(e)),!1))),this.lines.y=this.lines.y.filter((e=>!(!e.slope||0===e.slope)||(!(e.position<0||e.position>1)||(t["y".concat(e.position>1?1:0)].push(z8(e)),!1))));let n=[];return[...this.lines.x,...this.lines.y].forEach((r=>{if(!0===r.show||void 0===r.show){let o;if(r.slope&&0!==r.slope){const e=this.chart.scale({scale:"x"}),n=this.chart.scale({scale:"y"}),i=e.min(),a=e.max(),s=n.min(),l=n.max();o=JZ(JZ({},r),{},{x1:void 0,y1:void 0,x2:void 0,y2:void 0});const c=i*r.slope+r.value,u=a*r.slope+r.value,d=(s-r.value)/r.slope,p=(l-r.value)/r.slope;let h=[];O8(c,s,l)||(h[0]={x:N8(e,i),y:N8(n,c)}),O8(d,i,a)||(h[1]={x:N8(e,d),y:1}),O8(u,s,l)||(h[2]={x:N8(e,a),y:N8(n,u)}),O8(p,i,a)||(h[3]={x:N8(e,p),y:0});const f=h.filter((e=>!!e)).length;if(f>2&&function(e){q8(e[0],e[1])&&(e[1]=void 0),q8(e[1],e[2])&&(e[2]=void 0),q8(e[2],e[3])&&(e[3]=void 0),q8(e[3],e[0])&&(e[3]=void 0)}(h),h=h.filter((e=>!!e)),h.length<2)return void t["y".concat(c>l?0:1)].push(z8(r));o.x1=h[0].x,o.y1=h[0].y,o.x2=h[1].x,o.y2=h[1].y}else o=void 0;T8({chart:this.chart,blueprint:this.blueprint,renderer:this.renderer,p:r,settings:e,items:n,slopeLine:o})}})),e.style.oob.show&&function(e){let{blueprint:t,oob:n,settings:r,items:o}=e;const i=Object.keys(n);let a=r.style.oob||{};for(let e=0,r=i.length;e<r;e++){const r=i[e],s=n[r];if(s.length>0){let e=r.charAt(1),n="y"===r.charAt(0),i=a.padding.x+a.width,l=a.padding.y+a.width,c="bottom";c=n?"1"===e?"bottom":"top":"1"===e?"right":"left";let u=t.processItem({fn:t=>{let{width:r,height:o}=t,u=e*r+("1"===e?-i:i),d=n?l:o-l;return"arc"===a.type?{type:"path",d:I8(n?d:u,n?u:d,a.width,c),x:u,y:d,stroke:a.stroke,fill:a.fill,strokeWidth:a.strokeWidth||0}:{type:"circle",cx:u,cy:d,r:a.width,stroke:a.stroke,fill:a.fill,strokeWidth:a.strokeWidth||0,opacity:a.opacity,data:s}},flipXY:n}),d=u.cx||u.x,p=u.cy||u.y;const h=s.map((e=>e.label?"".concat(e.label," (").concat(e.value,")"):"(".concat(e.value,")"))),f=h.reduce(((e,t,n)=>0===n?t:"".concat(e,"\n\n").concat(t)),"");let m={type:"text",text:s.length||"",title:f,x:d-.4*a.width,y:p+.4*a.width,fontFamily:a.text.fontFamily,fontSize:"".concat(1.3*a.width,"px"),stroke:a.text.stroke,fill:a.text.fill,strokeWidth:a.text.strokeWidth||0,opacity:a.text.opacity},g={type:"path",d:P8(d,p,a.width,c),x:d,y:p,stroke:a.triangle.stroke,fill:a.triangle.fill,strokeWidth:a.triangle.strokeWidth||0,opacity:a.triangle.opacity};o.push(u,m,g)}}}({blueprint:this.blueprint,oob:t,settings:e,items:n}),n}};function W8(e){const t={type:"line",x1:0,x2:0,y1:0,y2:0,collider:{type:null}};return"top"===e.align||"bottom"===e.align?(t.x1=e.innerRect.x-e.outerRect.x,t.x2=t.x1+e.innerRect.width,t.y1=t.y2="top"===e.align?e.innerRect.height-e.padding:e.padding):(t.x1=t.x2="left"===e.align?e.innerRect.width-e.padding:e.padding,t.y1=e.innerRect.y-e.outerRect.y,t.y2=t.y1+e.innerRect.height),function(e,t){UZ(e,t.style)}(t,e),t}function B8(e){return"string"==typeof e||"number"==typeof e?e:"-"}function $8(e,t,n){n.layered||!n.stepSize?function(e,t){t.collider={type:"polygon",vertices:[{x:t.boundingRect.x,y:t.boundingRect.y},{x:t.boundingRect.x+t.boundingRect.width,y:t.boundingRect.y},{x:t.boundingRect.x+t.boundingRect.width,y:t.boundingRect.y+t.boundingRect.height},{x:t.boundingRect.x,y:t.boundingRect.y+t.boundingRect.height}]}}(0,t):n.tilted?function(e,t,n){const r=n.angle*(Math.PI/180),o=Math.max(n.stepSize/2,t.boundingRect.height/2),i="start"===t.anchor,a="end"===t.anchor&&r<0,s="start"===t.anchor&&r>=0,l=t.boundingRect.y+(s||a?t.boundingRect.height:0),c=[{x:t.x-o,y:l},{x:t.x+o,y:l}].map((e=>N6(e,r,{x:t.x,y:t.y}))),u={x:i?t.boundingRect.x+t.boundingRect.width+10:t.boundingRect.x-10,y:t.boundingRect.y+t.boundingRect.height},d={x:i?t.boundingRect.x+t.boundingRect.width+10:t.boundingRect.x-10,y:t.boundingRect.y},p=r>=0?[u,d]:[d,u];c.push(...p),t.collider={type:"polygon",vertices:c}}(0,t,n):function(e,t,n){if("bottom"===n.align||"top"===n.align){const r=e.position*n.innerRect.width+(n.innerRect.x-n.outerRect.x-n.stepSize/2);t.collider={type:"rect",x:r,y:0,width:r<0?n.stepSize+r:n.stepSize,height:n.innerRect.height}}else{const r=e.position*n.innerRect.height+(n.innerRect.y-n.outerRect.y-n.stepSize/2);t.collider={type:"rect",x:0,y:r,width:n.innerRect.width,height:r<0?n.stepSize+r:n.stepSize}}const r=t.collider;r.x=Math.max(r.x,0),r.y=Math.max(r.y,0);const o=r.x+r.width-(n.outerRect.x+n.outerRect.width);r.width=o>0?r.width-o:r.width;const i=r.y+r.height-(n.outerRect.y+n.outerRect.height);r.height=i>0?r.height-i:r.height}(e,t,n)}function H8(e,t){const n=isNaN(e.style.align)?.5:Math.min(Math.max(e.style.align,0),1);let r=0;if(e.tilted)r=e.stepSize*n;else{const o=t?e.textRect.height:e.textRect.width;r=Math.max(0,e.stepSize-o)*n}return r}function V8(e,t){var n,r;const o={type:"text",text:B8(e.label),x:0,y:0,maxWidth:t.maxWidth,maxHeight:t.maxHeight,tickValue:null!==(n=e.value)&&void 0!==n?n:null===(r=e.data)||void 0===r?void 0:r.value};return"top"===t.align||"bottom"===t.align?(o.x=e.start*t.innerRect.width+(t.innerRect.x-t.outerRect.x)+H8(t,!1),o.y="top"===t.align?t.innerRect.height:0,o.anchor=t.stepSize?"start":"middle",o.x+=isNaN(t.style.offset)?0:+t.style.offset):(o.y=e.start*t.innerRect.height+(t.innerRect.y-t.outerRect.y)+H8(t,!0),o.x="left"===t.align?t.innerRect.width:0,o.anchor="left"===t.align?"end":"start",o.baseline=t.stepSize?"text-before-edge":"central",o.y+=isNaN(t.style.offset)?0:+t.style.offset),function(e,t){["fill","fontSize","fontFamily"].forEach((n=>{e[n]=t.style[n]}))}(o,t),function(e,t){if(!t.tilted&&!t.stepSize)if("top"===t.align||"bottom"===t.align){const n=0,r=t.outerRect.width,o=Math.min(t.maxWidth/2,t.textRect.width/2),i=e.x-o,a=e.x+o;i<n?(e.anchor="start",e.x=t.innerRect.x-t.outerRect.x):a>r&&(e.anchor="end",e.x=t.innerRect.width+t.innerRect.x)}else{const n=0,r=t.outerRect.height,o=t.maxHeight/2,i=e.y-o,a=e.y+o;i<n?(e.y=t.innerRect.y-t.outerRect.y,e.baseline="text-before-edge"):a>r&&(e.y=t.innerRect.height+(t.innerRect.y-t.outerRect.y),e.baseline="text-after-edge")}}(o,t),function(e,t){"top"===t.align?e.y-=t.padding:"bottom"===t.align?e.y+=t.padding+t.maxHeight:"left"===t.align?e.x-=t.padding:"right"===t.align&&(e.x+=t.padding)}(o,t),function(e,t){if(t.tilted){const n=-t.angle,r=n*(Math.PI/180);"bottom"===t.align?(e.x-=t.maxHeight*Math.sin(r)/2,e.y-=t.maxHeight,e.y+=t.maxHeight*Math.cos(r)/2):e.x-=t.maxHeight*Math.sin(r)/3,e.transform="rotate(".concat(n,", ").concat(e.x,", ").concat(e.y,")"),e.anchor="bottom"===t.align==t.angle<0?"start":"end";const o=Math.cos(r)*t.maxWidth;if("bottom"===t.align==t.angle<0){const n=t.outerRect.width-t.paddingEnd;e.x+o>n&&(e.maxWidth=(n-e.x-10)/Math.cos(r))}else{const n=t.paddingEnd;e.x-o<n&&(e.maxWidth=(e.x-n-10)/Math.cos(r))}}}(o,t),function(e,t){e.boundingRect=t.textBounds(e)}(o,t),$8(e,o,t),o}function G8(e,t){const n={type:"line",x1:0,x2:0,y1:0,y2:0,collider:{type:null},tickValue:e.value};return"top"===t.align||"bottom"===t.align?(n.x1=n.x2=e.position*t.innerRect.width+(t.innerRect.x-t.outerRect.x),n.y1="top"===t.align?t.innerRect.height:0,n.y2="top"===t.align?n.y1-t.tickSize:n.y1+t.tickSize):(n.y1=n.y2=e.position*t.innerRect.height+(t.innerRect.y-t.outerRect.y),n.x1="left"===t.align?t.innerRect.width:0,n.x2="left"===t.align?n.x1-t.tickSize:n.x1+t.tickSize),function(e,t){UZ(e,t.style)}(n,t),function(e,t){"top"===t.align?(e.y1-=t.padding,e.y2-=t.padding):"bottom"===t.align?(e.y1+=t.padding,e.y2+=t.padding):"left"===t.align?(e.x1-=t.padding,e.x2-=t.padding):"right"===t.align&&(e.x1+=t.padding,e.x2+=t.padding)}(n,t),function(e,t){const n=e.strokeWidth/2;e.x1===t.innerRect.width?(e.x1-=n,e.x2-=n):0===e.x1?(e.x1+=n,e.x2+=n):e.y1===t.innerRect.height?(e.y1-=n,e.y2-=n):0===e.y1&&(e.y1+=n,e.y2+=n)}(n,t),n}function U8(e){return!e.isMinor&&e.position>=0&&e.position<=1}function Y8(e){let{rect:t,state:n,majorTicks:r,measure:o,horizontal:i}=e;return i?function(e){let{majorTicks:t,measureText:n,rect:r,state:o}=e;const i="layered"===o.labels.activeMode?2:1,a=r.width,s=t.map((e=>e.label)).map((e=>"".concat(e.slice(0,1)).concat(e.length>1?"…":""))).map(n).map((e=>e.width));for(let e=0;e<t.length;++e){const n=t[e];if(i*a*Math.abs(n.start-n.end)<s[e])return!0}return!1}({majorTicks:r,measureText:o,rect:t,state:n}):function(e){let{majorTicks:t,measureText:n,rect:r}=e;const o=r.height,i=n("M").height;return!(t.length<2)&&o*Math.abs(t[0].position-t[1].position)<i}({majorTicks:r,measureText:o,rect:t})}function K8(e){let{value:t,maxValue:n,minValue:r,range:o,modifier:i}=e;return isNaN(o)||isNaN(i)||(t=o*i),t>n&&(t=n),t<r&&(t=r),t}function X8(e){let{isDiscrete:t,rect:n,formatter:r,measureText:o,scale:i,settings:a,state:s}=e,l=0;const c={left:0,top:0,right:0,bottom:0},{maxLengthPx:u,minLengthPx:d}=a.labels;if(a.labels.show){const e=a.align,p="top"===e||"bottom"===e,h=p?n.inner.width:n.inner.height,f=i.ticks({settings:a,distance:h,formatter:r}).filter(U8),m=e=>{const t=o({text:e,fontSize:a.labels.fontSize,fontFamily:a.labels.fontFamily});return t.width=K8({value:t.width,maxValue:u,minValue:d}),t};if(t&&p&&"auto"===a.labels.mode&&(!function(e){let{majorTicks:t,measure:n,rect:r,state:o,settings:i}=e;const a=i.labels.maxGlyphCount,s="layered"===o.labels.activeMode?2:1,l=i.labels.tiltThreshold?i.labels.tiltThreshold:.7,c=n("…").width,u=r.width;let d=0,p=0;if(isNaN(a))for(let e=0;e<t.length;e++){const r=t[e],o=r.label,i=n(o).width*(o.length>1?l:1);if(p=s*u*Math.abs(r.start-r.end),i+c>p)return!0}else{const e=t.reduce(((e,t)=>Math.min(Math.abs(t.start-t.end),e)),1/0);if(p=s*u*e,d=n("M").width*l*a,d+c>p)return!0}return!1}({majorTicks:f,measure:m,rect:n.inner,state:s,settings:a})?s.labels.activeMode="horizontal":s.labels.activeMode="tilted"),!a.labels.filterOverlapping&&"tilted"!==s.labels.activeMode&&Y8({rect:n.inner,state:s,majorTicks:f,measure:m,horizontal:p})){return{size:Math.max(n.outer.width,n.outer.height),isToLarge:!0}}let g,y;if("tilted"===s.labels.activeMode){const e=Math.abs(a.labels.tiltAngle)*(Math.PI/180);g=t=>K8({value:t.width,maxValue:u,minValue:d})*Math.sin(e)+t.height*Math.cos(e)}else g=p?e=>e.height:e=>K8({value:e.width,maxValue:u,minValue:d});if(p&&"tilted"!==s.labels.activeMode)y=["M"];else if(isNaN(a.labels.maxGlyphCount))y=f.map((e=>e.label));else{let e="";for(let t=0;t<a.labels.maxGlyphCount;t++)e+="M";y=[e]}const _=y.map(m),b=_.map(g),x=Math.max(...b,0);if(l+=x,l+=a.labels.margin,"layered"===s.labels.activeMode&&(l*=2),"tilted"===s.labels.activeMode){const e="bottom"===a.align==a.labels.tiltAngle>=0,t=Math.abs(a.labels.tiltAngle)*(Math.PI/180),r=(x-m("M").height*Math.cos(t))/Math.sin(t),o=e=>Math.min(r,e.width)*Math.cos(t)+e.height,i=(t,r)=>{const o=f[r]?f[r].position:0;return e?t-o*n.inner.width:t-(1-o)*n.inner.width},s=Math.min(a.labels.maxEdgeBleed,Math.max(..._.map(o).map(i),0))+a.paddingEnd;if(c[e?"left":"right"]=s,!a.labels.filterOverlapping&&function(e){let{majorTicks:t,measureText:n,rect:r,bleedSize:o,angle:i}=e;if(t.length<2)return!1;if(0===i)return!0;const a=Math.abs(i),s=1/(Math.min(r.outer.width-o,r.inner.width)*Math.abs(t[0].position-t[1].position));return n("M").height>Math.sin(a*(Math.PI/180))/s}({majorTicks:f,measureText:m,rect:n,bleedSize:s,angle:a.labels.tiltAngle})){return{size:Math.max(n.outer.width,n.outer.height),isToLarge:!0}}}}return{size:l,edgeBleed:c}}const J8=(e,t,n)=>e.width*Math.abs(t.position-n.position);function Z8(e){let{layered:t,major:n,innerRect:r,outerRect:o,tick:i,index:a}=e;const s=t?2:1,l=n[a-s],c=n[a+s],u=l?J8(r,i,l)/2-2:1/0,d=c?J8(r,i,c)/2-2:1/0;return n.length<2?r.width:l?c?2*Math.min(u,d):(e=>{let{innerRect:t,outerRect:n,tick:r,prevWidth:o}=e;const i=t.x-n.x,a=n.width-t.width-i,s=t.width-t.width*r.position+a,l=2*Math.min(o,s),c=1===r.position?t.width/2-2:0;return Math.max(o,l,c)})({innerRect:r,outerRect:o,tick:i,prevWidth:u}):(e=>{let{innerRect:t,outerRect:n,tick:r,nextWidth:o}=e;const i=t.x-n.x,a=t.width*r.position+i,s=2*Math.min(o,a),l=0===r.position?t.width/2-2:0;return Math.max(o,s,l)})({innerRect:r,outerRect:o,tick:i,nextWidth:d})}function Q8(e){const t=e.innerRect,n={cx:t.width/2,cy:t.height/2},r=Math.min(t.height,t.width)/2*e.radius,o=r+e.style.strokeWidth,i={visible:!0,type:"path",arcDatum:{startAngle:e.startAngle,endAngle:e.endAngle},transform:"translate(0, 0) translate(".concat(n.cx,", ").concat(n.cy,")"),desc:{share:1,slice:{cornerRadius:0,innerRadius:r,outerRadius:o}},ticks:[]};return function(e,t){UZ(e,t.style)}(i,e),i}function e7(e,t,n,r){return{x:e+n*Math.cos(r),y:t+n*Math.sin(r)}}function t7(e,t){const n=t.innerRect,r={cx:n.width/2,cy:n.height/2},o=Math.min(n.height,n.width)/2*t.radius+t.padding,i=t.startAngle,a=t.endAngle,s=t.tickSize,l=a-i;let c=a-e.position*l;c-=Math.PI/2;const u=e7(r.cx,r.cy,o+s,c),d=e7(r.cx,r.cy,o,c),p={type:"line",x1:u.x,y1:u.y,x2:d.x,y2:d.y,value:e.value};return function(e,t){const n=JZ({},t.style);UZ(e,n)}(p,t),p}function n7(e){return"string"==typeof e||"number"==typeof e?e:"-"}function r7(e,t,n){let r;return r="left"===t?n.x:"right"===t?e.outerRect.width-n.x:Math.max(n.x,e.outerRect.width-n.x),r}function o7(e,t){const n=t.innerRect,r={cx:n.width/2,cy:n.height/2},o=Math.min(n.height,n.width)/2*t.radius+t.padding,i=t.startAngle,a=t.endAngle,s=t.tickSize,l=a-i,c=.2;let u,d;u="top"===t.align||"bottom"===t.align?a-e.position*l:i+e.position*l,d=u<-.2&&u>-Math.PI+c?"left":u>.2&&u<Math.PI-c?"right":"center",u-=Math.PI/2;const p=function(e,t,n,r){return{x:e+n*Math.cos(r),y:t+n*Math.sin(r)}}(r.cx,r.cy,o+s+6,u);let h;h="left"===d?"end":"right"===d?"start":"middle";const f={type:"text",text:n7(e.label),align:d,x:p.x,y:p.y,maxHeight:t.maxHeight,maxWidth:r7(t,d,p),anchor:h,baseline:"middle"};return function(e,t){["fill","fontSize","fontFamily"].forEach((n=>{e[n]=t.style[n]}))}(f,t),function(e,t){e.boundingRect=t.textBounds(e)}(f,t),function(e,t,n){let r,o;const i=parseFloat(n.fontSize)||0;r=t.y-i/2,o=e.innerRect.height-(t.y+i/2),(r<0||o<0)&&(n.text="")}(t,p,f),f}function i7(e){let t=0;return t+=e.paddingStart,t+=e.line.show?e.line.strokeWidth/2:0,t+=e.ticks.show?e.ticks.margin:0,t}function a7(e){let t=0;return t+=e.line.show?e.line.strokeWidth/2:0,t+=e.ticks.show?e.ticks.margin:0,t}function s7(e){let t=0;return t+=e.ticks.show?e.ticks.tickSize:0,t+=i7(e)+e.labels.margin,t}function l7(e,t){return e.map((e=>G8(e,t)))}function c7(e,t){return t?Math.abs(t.end-t.start):e.bandwidth()}function u7(e){let{textMetrics:t,settings:n,innerRect:r,scale:o,tilted:i,layered:a,tick:s}=e;const l=t.height,c=c7(o,s),u={width:0,height:l};if("left"===n.align||"right"===n.align)u.width=r.width-s7(n)-n.paddingEnd;else if(a)u.width=c*r.width*2;else if(i){const e=Math.abs(n.labels.tiltAngle)*(Math.PI/180);u.width=(r.height-s7(n)-n.paddingEnd-l*Math.cos(e))/Math.sin(e)}else u.width=c*r.width;return u.width=K8({value:u.width,maxValue:n.labels.maxLengthPx,minValue:n.labels.minLengthPx}),u}function d7(e){let{textMetrics:t,settings:n,innerRect:r,outerRect:o,tilted:i,layered:a,tick:s,index:l,major:c}=e;const u=t.height,d={width:0,height:u};if("left"===n.align||"right"===n.align)d.width=r.width-s7(n)-n.paddingEnd;else if(i){const e=Math.abs(n.labels.tiltAngle)*(Math.PI/180);d.width=(r.height-s7(n)-n.paddingEnd-u*Math.cos(e))/Math.sin(e)}else d.width=Z8({layered:a,major:c,innerRect:r,outerRect:o,tick:s,index:l});return d.width=K8({value:d.width,maxValue:n.labels.maxLengthPx,minValue:n.labels.minLengthPx}),d}function p7(e){let t;function n(){return t=d7,n}function r(){return t=u7,r}function o(e){let{settings:n,scale:r,innerRect:o,outerRect:i,measureText:a,ticks:s,state:l,textBounds:c}=e;const u=[],d=function(e){return e.filter((e=>!e.isMinor))}(s),p=function(e){return e.filter((e=>e.isMinor))}(s),h={innerRect:o,align:n.align,outerRect:i},f="tilted"===l.labels.activeMode,m="layered"===l.labels.activeMode;let g;if(n.arc&&(h.startAngle=n.arc.startAngle,h.endAngle=n.arc.endAngle,h.radius=n.arc.radius),n.line.show&&(h.style=n.line,h.padding=n.paddingStart,n.arc?u.push(Q8(h)):u.push(W8(h))),n.ticks.show&&(h.style=n.ticks,h.tickSize=n.ticks.tickSize,h.padding=i7(n),n.arc?(h.padding=a7(n),g=function(e,t){return e.map((e=>t7(e,t)))}(d,h)):g=l7(d,h)),n.labels.show){const e=s7(n);h.style=n.labels,h.padding=e,h.tilted=f,h.layered=m,h.angle=n.labels.tiltAngle,h.paddingEnd=n.paddingEnd,h.textBounds=c;const s=(e,s)=>{h.textRect=function(e){let{style:t,measureText:n,tick:r}=e;return n({text:r.label,fontSize:t.fontSize,fontFamily:t.fontFamily})}({tick:e,measureText:a,style:h.style});const l=t({textMetrics:h.textRect,settings:n,innerRect:o,outerRect:i,scale:r,tilted:f,layered:m,tick:e,major:d,index:s});h.maxWidth=l.width,h.maxHeight=l.height,h.stepSize=function(e){let{innerRect:t,scale:n,settings:r,tick:o}=e;return("top"===r.align||"bottom"===r.align?t.width:t.height)*c7(n,o)}({innerRect:o,scale:r,settings:n,tick:e})};let l=[];n.arc?(h.padding=function(e){let t=0;return t+=e.ticks.show?e.ticks.tickSize:0,t+=a7(e)+e.labels.margin,t}(n),l=function(e,t,n){return e.map(((e,r)=>{n(e,r);const o=o7(e,t);return o.data=e.data,o}))}(d,h,s)):l=!m||"top"!==n.align&&"bottom"!==n.align?function(e,t,n){return e.map(((e,r)=>{n(e,r);const o=V8(e,t);return o.data=e.data,o}))}(d,h,s):function(e,t,n,r){const o=t.padding,i=s7(n);return e.map(((e,a)=>{r(e,a);const s=i+t.maxHeight+n.labels.margin;t.layer=a%2,t.padding=a%2==0?o:s;const l=V8(e,t);return l.data=e.data,l}))}(d,h,n,s),n.labels.filterOverlapping&&function(e,t,n){let r=(t,n)=>d4(sQ(1,e[t].boundingRect),sQ(1,e[n].boundingRect));if(n&&n.tilted){const t=Math.abs(n.angle);r=(n,r)=>{const o=1/Math.abs(e[n].x-e[r].x),i=Math.sin(t*(Math.PI/180))/o;return e[n].boundingRect.height>i}}for(let n=0;n<=e.length-1;n++)for(let o=n+1;o<=Math.min(n+5,n+(e.length-1));o++)e[n]&&e[o]&&r(n,o)&&(o===e.length-1?(e.splice(n,1),t&&t.splice(n,1)):(e.splice(o,1),t&&t.splice(o,1)),o--,n--)}(l,g,h),u.push(...l)}return n.minorTicks&&n.minorTicks.show&&p.length>0&&(h.style=n.minorTicks,h.tickSize=n.minorTicks.tickSize,h.padding=function(e){return e.line.strokeWidth+e.minorTicks.margin}(n),u.push(...l7(p,h))),g&&u.push(...g),u}return n.build=o,r.build=o,e?r():n()}const h7={labels:{show:!0,tiltAngle:40,tiltThreshold:.7,maxEdgeBleed:1/0,margin:4,maxLengthPx:150,minLengthPx:0,mode:"auto",maxGlyphCount:NaN,align:.5,offset:0,filterOverlapping:!1},ticks:{show:!1,margin:0,tickSize:4},line:{show:!1},paddingStart:0,paddingEnd:10,align:"auto"},f7={labels:{show:!0,margin:4,maxLengthPx:150,minLengthPx:0,align:.5,offset:0,filterOverlapping:!0},ticks:{show:!0,margin:0,tickSize:8},minorTicks:{show:!1,tickSize:3,margin:0},line:{show:!0},paddingStart:0,paddingEnd:10,align:"auto"};const m7={require:["chart","renderer","dockConfig"],defaultSettings:{layout:{displayOrder:0,prioOrder:0},settings:{},style:{labels:"$label",ticks:"$guide-line",minorTicks:"$guide-line--minor",line:"$guide-line"}},created(){this.state={isDiscrete:!!this.scale.bandwidth,isHorizontal:!1,labels:{activeMode:"horizontal"},ticks:[],innerRect:{width:0,height:0,x:0,y:0},outerRect:{width:0,height:0,x:0,y:0},defaultDock:void 0,concreteNodeBuilder:void 0,settings:void 0},this.state.isDiscrete?this.state.defaultDock="bottom":this.state.defaultDock="left",this.setState(this.settings)},setState(){this.state.isDiscrete=!!this.scale.bandwidth,this.state.settings=function(e){let{state:t,style:n,settings:r}=e;const o=UZ(!0,{},t.isDiscrete?h7:f7,n),i=UZ(!0,{},o,r.settings),a=r.layout.dock||t.defaultDock;i.dock=a,i.align=function(e,t){const n=["top","bottom"],r=["left","right"];return-1!==n.indexOf(e)&&-1===r.indexOf(t)||-1!==r.indexOf(e)&&-1===n.indexOf(t)?e:t}(r.settings.align,a),i.labels.tiltAngle=Math.max(-90,Math.min(i.labels.tiltAngle,90));const{paddingStart:s,paddingEnd:l}=i;return i.paddingStart="function"==typeof s?s.call(null):s,i.paddingEnd="function"==typeof l?l.call(null):l,i}(this),this.state.concreteNodeBuilder=p7(this.state.isDiscrete),this.dockConfig.dock(this.state.settings.dock),this.state.isHorizontal="top"===this.state.settings.align||"bottom"===this.state.settings.align,this.state.labels.activeMode=function(e,t,n){const r=t.labels.mode;return n&&e.isHorizontal?"auto"===r?e.labels.activeMode:-1!==["layered","tilted"].indexOf(t.labels.mode)&&-1!==["top","bottom"].indexOf(t.dock)?r:"horizontal":"horizontal"}(this.state,this.state.settings,this.state.isDiscrete)},preferredSize(e){const{formatter:t,state:n,scale:r}=this,o=this.state.isHorizontal?e.inner.width:e.inner.height;this.state.pxScale=y6(r,o);const i=function(e){let{isDiscrete:t,rect:n,formatter:r,measureText:o,scale:i,settings:a,state:s}=e,l=0;const{size:c,edgeBleed:u,isToLarge:d}=X8({isDiscrete:t,rect:n,formatter:r,measureText:o,scale:i,settings:a,state:s});if(l+=c,d)return{size:l};if(a.ticks.show&&(l+=a.ticks.margin,l+=a.ticks.tickSize),a.minorTicks&&a.minorTicks.show){const e=a.minorTicks.margin+a.minorTicks.tickSize;e>l&&(l=e)}if(a.line.show){const e=a.line.strokeWidth/2;l+=e,u[function(e){switch(e){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left";default:return e}}(a.align)]=Math.ceil(e)}return l+=a.paddingStart,l+=a.paddingEnd,{size:l,edgeBleed:u}}({isDiscrete:this.state.isDiscrete,rect:{inner:e.inner,outer:e.outer},formatter:t,measureText:this.renderer.measureText,scale:this.state.pxScale,settings:this.state.settings,state:n});return i},beforeUpdate(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{settings:t}=e;this.setState(t)},resize(e){const{inner:t,outer:n}=e,r=UZ({},t,function(e){let{align:t,inner:n}=e;return"left"===t?{x:n.width+n.x}:"right"===t||"bottom"===t?n:{y:n.y+n.height}}({align:this.state.settings.align,inner:t})),o=n||r;return UZ(this.state.innerRect,r),UZ(this.state.outerRect,o),n},beforeRender(){const{scale:e,formatter:t}=this,n=this.state.isHorizontal?this.state.innerRect.width:this.state.innerRect.height;this.state.pxScale=y6(e,n),this.state.ticks=this.state.pxScale.ticks({distance:n,formatter:t}).filter((e=>e.position>=0&&e.position<=1))},render(){const{state:e}=this,t=[];return t.push(...this.state.concreteNodeBuilder.build({settings:this.state.settings,scale:this.state.pxScale,innerRect:this.state.innerRect,outerRect:this.state.outerRect,measureText:this.renderer.measureText,textBounds:this.renderer.textBounds,ticks:this.state.ticks,state:e})),E8.multiple(t),t}};const g7={render:()=>[]};function y7(e,t,n){let r="";if("function"==typeof e)r=e();else if("string"==typeof e)r=e;else if(n){const e=(n.data().fields||[]).map((e=>e.title()));r=e.join(t)}return r}function _7(e,t){let n="middle";return"left"===e?"top"===t?n="end":"bottom"===t&&(n="start"):"right"===e?"top"===t?n="start":"bottom"===t&&(n="end"):"left"===t?n="start":"right"===t&&(n="end"),n}const b7={require:["renderer","chart"],defaultSettings:{layout:{dock:"bottom",displayOrder:0,prioOrder:0},settings:{paddingStart:5,paddingEnd:5,paddingLeft:0,paddingRight:0,anchor:"center",join:", ",maxLengthPx:NaN},style:{text:"$title"}},created(){this.definitionSettings=this.settings.settings;const e=this.settings.text,t=this.definitionSettings.join;this.title=y7(e,t,this.scale)},preferredSize(){return this.renderer.measureText({text:this.title,fontSize:this.style.text.fontSize,fontFamily:this.style.text.fontFamily}).height+this.definitionSettings.paddingStart+this.definitionSettings.paddingEnd},render(){const{title:e,definitionSettings:t,rect:n}=this,r=[];return r.push(function(e){let{title:t,definitionSettings:n,dock:r,rect:o,measureText:i,style:a}=e;const s={type:"text",text:t,x:0,y:0,dx:0,dy:0,anchor:_7(r,n.anchor),baseline:"alphabetical",stroke:"transparent",strokeWidth:0,fontWeight:"normal"};UZ(s,a.text);const l=i(s);if("top"===r||"bottom"===r){let e=o.width/2;"left"===n.anchor?e=n.paddingLeft||0:"right"===n.anchor&&(e=o.width-(n.paddingRight||0)),s.x=e,s.y="top"===r?o.height-n.paddingStart:n.paddingStart+l.height,s.dy="top"===r?-l.height/6:-l.height/3,s.maxWidth=.8*o.width}else{let e=o.height/2;"top"===n.anchor?e=n.paddingStart:"bottom"===n.anchor&&(e=o.height-n.paddingStart),s.y=e,s.x="left"===r?o.width-n.paddingStart:n.paddingStart,s.dx="left"===r?-l.height/3:l.height/3;const t="left"===r?270:90;s.transform="rotate(".concat(t,", ").concat(s.x+s.dx,", ").concat(s.y+s.dy,")"),s.maxWidth=.8*o.height}return isNaN(n.maxLengthPx)||(s.maxWidth=Math.min(s.maxWidth,n.maxLengthPx)),s}({title:e,dock:this.settings.layout.dock,definitionSettings:t,rect:n,measureText:this.renderer.measureText,style:this.style})),r},beforeUpdate(e){e.settings&&(UZ(this.settings,e.settings),this.definitionSettings=e.settings.settings);const t=this.settings.text,n=this.definitionSettings.join;this.title=y7(t,n,this.scale)}};function x7(e,t){const n=e.settings.layout.dock,r=e.settings.settings.invert,o="top"===n||"bottom"===n,i=o?"width":"height",a=e.rect[i],s=e.chart.scroll(e.settings.scroll);let l;{let e=t[o?"x":"y"];r&&(e=a-e);const n=s.getState();l={startOffset:e,startScroll:n.start,swipe:!1};const i=e/a*(n.max-n.min)+n.min;i<n.start?l.startScroll=i:i>n.start+n.viewSize&&(l.startScroll=i-n.viewSize)}return{update:e=>{let t=e[o?"x":"y"];if(r&&(t=a-t),!l.swipe){if(Math.abs(l.startOffset-t)<=1)return;l.swipe=!0}const n=s.getState(),i=(t-l.startOffset)/a*(n.max-n.min),c=l.startScroll+i;s.moveTo(c)},end:e=>{let t=e[o?"x":"y"];r&&(t=a-t);const n=s.getState();if(l.swipe){const e=(t-l.startOffset)/a*(n.max-n.min),r=l.startScroll+e;s.moveTo(r)}else{const e=t/a*(n.max-n.min)+n.min-n.viewSize/2;s.moveTo(e)}}}}function v7(e,t){const n=t.element().getBoundingClientRect();return{x:e.center.x-n.left,y:e.center.y-n.top}}const w7={require:["chart","renderer"],on:{panStart(e){const t=v7(e,this.renderer),n={x:t.x-e.deltaX,y:t.y-e.deltaY};this.currentMove=x7(this,n),this.currentMove.update(t)},panMove(e){if(!this.currentMove)return;const t=v7(e,this.renderer);this.currentMove.update(t)},panEnd(e){if(!this.currentMove)return;const t=v7(e,this.renderer);this.currentMove.end(t),this.currentMove=null},panCancel(){this.currentMove=null},tap(e){const t=v7(e,this.renderer);x7(this,t).end(t)}},defaultSettings:{settings:{backgroundColor:"#eee",thumbColor:"#ccc",width:16}},preferredSize:function(e){const t=this.chart.scroll(this.settings.scroll).getState();if(t.viewSize>=t.max-t.min){return Math.max(e.width,e.height)}return this.settings.settings.width},render:function(e){const t=this.settings.layout.dock,n=this.settings.settings.invert,r="top"===t||"bottom"===t,o=r?"width":"height",i=this.rect[o],a=this.chart.scroll(this.settings.scroll).getState();let s=i*(a.start-a.min)/(a.max-a.min);const l=i*a.viewSize/(a.max-a.min);return n&&(s=i-s-l),e("div",{style:{position:"relative",width:"100%",height:"100%",background:this.settings.settings.backgroundColor,pointerEvents:"auto"}},[].concat(e("div",{class:"scroller",style:{position:"absolute",[r?"left":"top"]:"".concat(s,"px"),[r?"top":"left"]:"25%",[r?"height":"width"]:"50%",[o]:"".concat(Math.max(1,l),"px"),background:this.settings.settings.thumbColor}})))},renderer:"dom"};function S7(e){let{h:t,isVertical:n,value:r,pos:o,align:i,borderHit:a,state:s,idx:l}=e;const c="end"!==i,u=c?{left:"0",top:"0"}:{right:"0",bottom:"0"};let d=0,p="100%",h="100%";return s.targetRect&&"start"===s.settings.bubbles.align?(p="".concat(s.targetRect.x+s.targetRect.width,"px"),h="".concat(s.targetRect.y+s.targetRect.height,"px")):s.targetRect&&"end"===s.settings.bubbles.align&&(d=n?s.targetRect.x:s.targetRect.y,p="".concat(s.rect.width-d,"px"),h="".concat(s.rect.height-d,"px")),c||(o-=a),t("div",{onmouseover(e){e.srcElement.children[0].style.backgroundColor="#000",e.srcElement.children[0].style[n?"height":"width"]="2px"},onmouseout(e){e.srcElement.children[0].style.backgroundColor=s.style.line.stroke,e.srcElement.children[0].style[n?"height":"width"]="1px"},"data-value":r,"data-key":[s.key,"edge",l].join("-"),style:{cursor:n?"ns-resize":"ew-resize",position:"absolute",left:"".concat(n?d:o,"px"),top:"".concat(n?o:d,"px"),height:n?"".concat(a,"px"):h,width:n?p:"".concat(a,"px"),pointerEvents:"auto"}},[t("div",{style:UZ({backgroundColor:s.style.line.stroke,position:"absolute",height:n?"".concat(1,"px"):"100%",width:n?"100%":"".concat(1,"px"),pointerEvents:"none"},u)})])}function C7(e){let{h:t,isVertical:n,label:r,otherValue:o,rangeIdx:i,idx:a,pos:s,align:l,state:c,value:u}=e;const d="end"!==l,p="outside"===c.settings.bubbles.placement;let h,f="none";n?(h=d?"left":"right",p&&(f=d?"translate(-100%, 0px)":"translate(100%, 0px)")):(h=d?"top":"bottom",p&&(f=d?"translate(0px, -100%)":"translate(0px, 100%)"));let m=c.edit&&c.edit.rangeIdx===i&&c.edit.bubbleIdx===a;const g={position:"relative",borderRadius:"".concat(c.style.bubble.borderRadius,"px"),border:"".concat(c.style.bubble.strokeWidth,"px solid ").concat(c.style.bubble.stroke),backgroundColor:c.style.bubble.fill,color:c.style.bubble.color,fontFamily:c.style.bubble.fontFamily,fontSize:c.style.bubble.fontSize,padding:"4px 8px",textAlign:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"150px",minWidth:"50px",minHeight:"1em",pointerEvents:"auto",transform:n?"translate(0,-50%)":"translate(-50%,0)",cursor:n?"ns-resize":"ew-resize"};let y=c.style.bubble.stroke;const _=m?t("input",{type:"text",value:u,style:JZ(JZ({},g),{},{textAlign:"start",textOverflow:"",fontSize:"13px"}),onkeyup(e){if("Enter"===e.key){e.preventDefault(),e.stopPropagation();const t=parseFloat(e.target.value);isNaN(t)?(y="rgba(230, 78, 78, 0.6)",e.target.style.border="".concat(c.style.bubble.strokeWidth,"px solid ").concat(y)):c.onEditConfirmed(i,t,o)}else"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),c.onEditCanceled())}}):t("div",{"data-key":[c.key,"bubble",i,a].join("-"),"data-other-value":o,"data-idx":i,"data-bidx":a,style:g},[r]);return t("div",{style:{position:"absolute",[h]:"0",[n?"top":"left"]:"".concat(s,"px"),transform:f}},[_])}function E7(e){let{h:t,isVertical:n,top:r,height:o,color:i,on:a,opacity:s}=e;return t("div",UZ({style:{backgroundColor:i,opacity:s,position:"absolute",left:n?0:"".concat(r,"px"),top:n?"".concat(r,"px"):0,height:n?"".concat(o,"px"):"100%",width:n?"100%":"".concat(o,"px"),pointerEvents:"auto"}},a),[])}function k7(e){let{borderHit:t,els:n,isVertical:r,state:o,vStart:i,vEnd:a,idx:s}=e,l=0;o.targetRect&&(l=r?o.targetRect.y:o.targetRect.x);const c=!!o.scale,u=c?o.scale.norm(i)*o.size:i,d=c?o.scale.norm(a)*o.size:a,p=Math.abs(u-d),h=Math.min(u,d)+l,f=h+p;if(o.targetRect){const e=o.targetFillRect||o.targetRect,t=r?e.height:e.width,s=c?o.scale.norm(i)*t:i,l=c?o.scale.norm(a)*t:a,u=Math.abs(s-l),d=Math.min(s,l),p={h:o.h,isVertical:r,top:d,height:u,color:o.style.target.fill,opacity:o.style.target.opacity};o.style.target.opacity<.8&&(p.on={onmouseover(e){e.srcElement.style.opacity=o.style.target.opacity+.1},onmouseout(e){e.srcElement.style.opacity=o.style.target.opacity}}),n.push(o.h("div",{style:{position:"absolute",left:"".concat(e.x,"px"),top:"".concat(e.y,"px"),height:"".concat(e.height,"px"),width:"".concat(e.width,"px")}},[E7(p)]))}const m=u<d?i:a,g=u<d?a:i,[y,_]=c?o.scale.domain():[Math.min(i,a),Math.max(i,a)],b=m+1e-5>=y&&m-1e-5<=_,x=g-1e-5<=_&&g+1e-5>=y;b&&n.push(S7({h:o.h,isVertical:r,borderHit:t,value:m,pos:h,align:"start",state:o,idx:s})),x&&n.push(S7({h:o.h,isVertical:r,borderHit:t,value:g,pos:f,align:"end",state:o,idx:s}));const v=o.settings.bubbles;if(v&&v.show){v.fontSize,v.fontFamily,v.fill;const e=[i,a];b&&n.push(C7({h:o.h,isVertical:r,align:v.align,rangeIdx:s,idx:0,otherValue:g,value:m,label:"".concat(o.format(m,e)),pos:h,state:o})),x&&n.push(C7({h:o.h,isVertical:r,align:v.align,rangeIdx:s,idx:1,otherValue:m,value:g,label:"".concat(o.format(g,e)),pos:f,state:o}))}}function M7(e){const t=e.active.limitHigh-e.active.end,n=e.active.limitLow-e.active.start;let r=e.current-e.start;return r=r<0?Math.max(r,n):Math.min(r,t),r}function R7(e){let t=[];const n=0===e.direction;if(Array.isArray(e.ranges)&&e.ranges.forEach(((r,o)=>{e.active&&o===e.active.idx||k7({borderHit:5,els:t,isVertical:n,state:e,vStart:Math.min(r.min,r.max),vEnd:Math.max(r.min,r.max),idx:o})})),e.active){let r=e.start,o=e.current;if(-1!==e.active.idx)if("foo"===e.active.mode)r=Math.min(e.active.start,e.active.end),o=Math.max(e.active.start,e.active.end);else if("modify"===e.active.mode)r=Math.min(e.start,e.current),o=Math.max(e.start,e.current);else{const t=M7(e);r=e.active.start+t,o=e.active.end+t}k7({borderHit:5,els:t,isVertical:n,state:e,vStart:r,vEnd:o,idx:e.active.idx})}return t}function A7(e){return{min:e.scale.min(),max:e.scale.max()}}function I7(e){return{min:0,max:e.direction?e.rect.width:e.rect.height}}function P7(e,t,n){let r,o,i=e.ranges,a=-1;for(r=0;r<i.length;r++){if(i[r].min<=t&&t<=i[r].max){a=r,n.min=r?i[r-1].max:n.min,n.max=r+1<i.length?i[r+1].min:n.max;break}if(t<i[r].min){n.max=i[r].min,n.min=r?i[r-1].max:n.min;break}}-1===a&&i.length&&r>=i.length&&(n.min=i[i.length-1].max),-1!==a&&(o={idx:a,start:i[a].min,end:i[a].max,limitLow:n.min,limitHigh:n.max,mode:"foo"}),e.active=o}function O7(e){e.renderer.render(R7(e))}function L7(e,t){if(!t||!t.isActive())return[];const n=e.scale.data(),r=(n&&n.fields||[]).map((e=>e.id())),o=t.brushes().filter((e=>"range"===e.type&&-1!==r.indexOf(e.id)))[0];return o?o.brush.ranges():[]}function D7(e,t){let n,r=1/0;const o=t.domain(),i=t.bandwidth()/2;for(let a=0;a<o.length;++a){const s=Math.abs(e-i-t(o[a]));s<r&&(r=s,n=o[a])}return n}function T7(e,t){return Math.min(...e)<=Math.max(...t)&&Math.max(...e)>=Math.min(...t)}function z7(e){const t=e.reduce(((e,t)=>(e.push(...rQ(t.bounds)),e)),[]);return oQ(t)}const j7={require:["chart","settings","renderer"],defaultSettings:{settings:{bubbles:{show:!0,align:"start"}},style:{bubble:"$label-overlay",line:"$shape-guide--inverted",target:"$selection-area-target"}},renderer:"dom",on:{rangeStart(e){this.start(e)},rangeMove(e){this.move(e)},rangeEnd(e){this.end(e)},rangeClear(e){this.clear(e)},bubbleStart(e){this.bubbleStart(e)}},created(){this.state={key:this.settings.key||"brush-range"}},beforeRender(e){this.state.rect=e.size.computedInner},renderRanges(){this.state.started||(this.state.ranges=L7(this.state,this.state.brushInstance),this.state.active=null,O7(this.state))},render(e){const t=this.settings.settings;this.state.direction="vertical"===t.direction?0:1;const n=this.renderer.element().getBoundingClientRect(),r=this.state.rect[0===this.state.direction?"height":"width"];let o=y6(this.chart.scale(t.scale),r);const i=function(e){const t={targetRect:null,targetFillRect:null,scale:null,size:null},n=e.settings.settings,r=n.target&&(n.target.components||(n.target.component?[n.target.component]:[])).map((t=>e.chart.component(t))).filter((e=>!!e&&!!e.rect)),o=n.target&&n.target.selector?e.chart.findShapes(n.target.selector):[],i=n.target&&n.target.fillSelector?e.chart.findShapes(n.target.fillSelector):[];if(o.length>0){const r=z7(o);if(t.size=r[0===e.state.direction?"height":"width"],t.scale=y6(e.chart.scale(n.scale),t.size),t.targetRect=r,i.length>0){const e=z7(i);t.targetFillRect=e}}else if(r&&r.length>0){const n=r.slice(1).reduce(((e,t)=>({x0:Math.min(e.x0,t.rect.computedInner.x),y0:Math.min(e.y0,t.rect.computedInner.y),x1:Math.max(e.x1,t.rect.computedInner.x+t.rect.computedInner.width),y1:Math.max(e.y1,t.rect.computedInner.y+t.rect.computedInner.height)})),{x0:r[0].rect.computedInner.x,y0:r[0].rect.computedInner.y,x1:r[0].rect.computedInner.x+r[0].rect.computedInner.width,y1:r[0].rect.computedInner.y+r[0].rect.computedInner.height});t.targetRect={x:n.x0-e.state.rect.x,y:n.y0-e.state.rect.y,width:n.x1-n.x0,height:n.y1-n.y0}}return t}(this);if(o=i.scale?i.scale:o,this.state.targetRect=i.targetRect,this.state.targetFillRect=i.targetFillRect,this.state.size=null===i.size?r:i.size,this.state.settings=t,this.state.style=this.style,this.state.offset=n,this.state.brush="object"==typeof t.brush?t.brush.context:t.brush,this.state.brushInstance=this.chart.brush(this.state.brush),this.state.renderer=this.renderer,this.state.multi=!!t.multiple,this.state.h=e,this.state.onEditConfirmed=(e,t,n)=>{this.state.edit=null,function(e,t,n,r){let o=e.ranges.map((e=>({min:e.min,max:e.max})));const i=e.scale.min(),a=e.scale.max();o[t]={min:Math.max(i,Math.min(n,r)),max:Math.min(a,Math.max(n,r))},e.ranges[t]=JZ({},o[t]);const s=e.scale.data();s&&s.fields&&s.fields.forEach((t=>{e.fauxBrushInstance||e.brushInstance.setRange(t.id(),o)}))}(this.state,e,t,n),this.emit("bubbleEnd"),O7(this.state)},this.state.onEditCanceled=()=>{this.state.edit=null,O7(this.state)},this.state.cssCoord={offset:0===this.state.direction?"top":"left",coord:0===this.state.direction?"y":"x",pos:0===this.state.direction?"deltaY":"deltaX"},this.state.format="function"==typeof t.bubbles.label&&((e,n)=>t.bubbles.label.call(void 0,{datum:e,data:n,scale:o,resources:{scale:this.chart.scale,formatter:this.chart.formatter}})),{}.hasOwnProperty.call(o,"norm")){this.state.editable=!0,this.state.observeBrush="object"==typeof t.brush&&t.brush.observe,this.state.fauxBrushInstance=null,this.state.findValues=null,this.state.scale=o;const e=this.state.scale.data();!this.state.format&&e&&e.fields&&e.fields[0]&&(this.state.format=e.fields[0].formatter())}else this.state.editable=!1,this.state.scale=x3(),this.state.scale.data=o.data,this.state.format||(this.state.format=(e,t)=>T7(o.range(),t)?function(e,t){const n=t.ticks(),r=t.domain().indexOf(D7(e,t));return-1!==r?n[r].label:"-"}(e,o):"-"),this.state.fauxBrushInstance=o6(),this.state.findValues=e=>function(e,t){const n=t.domain(),r=t.range(),o=[];return e.forEach((e=>{if(!T7(r,[e.min,e.max]))return;const i=n.indexOf(D7(e.min,t)),a=n.indexOf(D7(e.max,t));o.push.apply(o,n.slice(Math.min(i,a),Math.max(i,a)+1))})),o}(e,o);return this.state.ranges=L7(this.state,this.state.brushInstance),this.state.observeBrush||this.state.sourcedFromThisComponent?[R7(this.state)]:[]},mounted(){this.state.observeBrush&&this.state.brushInstance&&this.state.brushInstance.on("update",this.renderRanges)},beforeDestroy(){this.state.observeBrush&&this.state.brushInstance&&this.state.brushInstance.removeListener("update",this.renderRanges)},start(e){!function(e){let{state:t,e:n,renderer:r,ranges:o,targetSize:i}=e;if(t.started)return;t.edit=null;const a=n.center.x-n.deltaX,s=n.center.y-n.deltaY;let l=document.elementFromPoint(a,s);r.element().contains(l)||(l=null);const c={started:!0};t.offset=UZ({},r.element().getBoundingClientRect());const u=a-t.offset.left,d=s-t.offset.top;t.offset.left+=t.targetRect?t.targetRect.x:0,t.offset.top+=t.targetRect?t.targetRect.y:0,t.ranges=o(t,t.fauxBrushInstance||t.brushInstance);const p=n.center[t.cssCoord.coord]-n[t.cssCoord.pos]-t.offset[t.cssCoord.offset],h=n.center[t.cssCoord.coord]-t.offset[t.cssCoord.offset];c.current=t.scale.normInvert(h/t.size),c.start=t.scale.normInvert(p/t.size);let f=t.ranges;const m=A7(t);let g,y,_=-1;if(l&&l.hasAttribute("data-idx"))_=parseInt(l.getAttribute("data-idx"),10),m.min=_>0?f[_-1].max:m.min,m.max=_+1<f.length?f[_+1].min:m.max;else{for(g=0;g<f.length;g++){if(f[g].min<=c.start&&c.start<=f[g].max){_=g,m.min=g?f[g-1].max:m.min,m.max=g+1<f.length?f[g+1].min:m.max;break}if(c.start<f[g].min){m.max=f[g].min,m.min=g?f[g-1].max:m.min;break}}-1===_&&f.length&&g>=f.length&&(m.min=f[f.length-1].max)}if(-1!==_||t.multi||(c.ranges=[],m.min=t.scale.min(),m.max=t.scale.max()),-1!==_)if(y={idx:_,start:f[_].min,end:f[_].max,limitLow:m.min,limitHigh:m.max,mode:"move"},l&&l.hasAttribute("data-other-value"))c.start=parseFloat(l.getAttribute("data-other-value")),y.mode="modify";else{let e=t.scale.norm(y.start)*t.size,n=t.scale.norm(y.end)*t.size;Math.abs(p-e)<=i?(c.start=y.end,y.mode="modify"):Math.abs(p-n)<=i&&(c.start=y.start,y.mode="modify")}else y={idx:-1,start:c.start,end:c.current,limitLow:m.min,limitHigh:m.max,mode:"current"};c.active=y,"modify"!==y.mode&&t.targetRect&&!h4(t.targetRect,{x:u,y:d})||Object.keys(c).forEach((e=>t[e]=c[e]))}({e:e,state:this.state,renderer:this.renderer,ranges:L7,targetSize:5})},end(){this.state.started&&(!function(e,t){e.started=!1,e.ranges=t(e,e.fauxBrushInstance||e.brushInstance);const n=A7(e);P7(e,e.current,n)}(this.state,L7),O7(this.state),this.state.sourcedFromThisComponent=!0,this.state.active=null)},move(e){this.state.started&&(!function(e,t){const n=(t.center[e.cssCoord.coord]-e.offset[e.cssCoord.offset])/e.size,r=e.scale.normInvert(n);e.current=Math.max(Math.min(r,e.active.limitHigh),e.active.limitLow)}(this.state,e),function(e){let t=e.ranges.map((e=>({min:e.min,max:e.max})));if(-1!==e.active.idx)if("modify"===e.active.mode)t[e.active.idx].min=Math.min(e.start,e.current),t[e.active.idx].max=Math.max(e.start,e.current);else{const n=M7(e);t[e.active.idx].min+=n,t[e.active.idx].max+=n}else t.push({min:Math.min(e.start,e.current),max:Math.max(e.start,e.current)});const n=e.scale.data();n&&n.fields&&n.fields.forEach((n=>{if(e.fauxBrushInstance){let r=L7(e,e.fauxBrushInstance),o=e.findValues(r),i=e.findValues(t),a=i.filter((e=>-1===o.indexOf(e))),s=o.filter((e=>-1===i.indexOf(e))),l=a.map((e=>({key:n.id(),value:e}))),c=s.map((e=>({key:n.id(),value:e})));e.brushInstance.addAndRemoveValues(l,c),e.fauxBrushInstance.setRange(n.id(),t)}else e.brushInstance.setRange(n.id(),t)}))}(this.state),O7(this.state))},clear(){this.state.fauxBrushInstance&&this.state.fauxBrushInstance.clear(),this.state.renderer.render([]),this.state.started=!1,this.state.active=null,this.state.sourcedFromThisComponent=!1},bubbleStart(e){if(!this.state.editable)return;const t=e.srcEvent||e,n=t.target,r={rangeIdx:parseInt(n.getAttribute("data-idx"),10),bubbleIdx:parseInt(n.getAttribute("data-bidx"),10)};if(isNaN(r.rangeIdx)||JSON.stringify(r)===JSON.stringify(this.state.edit))return;this.state.edit=r,t.stopPropagation(),t.stopImmediatePropagation(),t.preventDefault();const o=n.parentNode;O7(this.state);const i=o.querySelector("input");i.focus(),i.select()}};function N7(e){e.renderer.render(R7(e))}function q7(e){return e.rc.ranges()}function F7(e,t){const n={x:e.direction?t.min+e.rect.x:e.rect.x,y:e.direction?e.rect.y:t.min+e.rect.y,width:e.direction?t.max-t.min:e.rect.width+e.rect.x,height:e.direction?e.rect.height+e.rect.y:t.max-t.min};return e.chart.shapesAt(n,e.settings.brush)}const W7={require:["chart","settings","renderer"],defaultSettings:{settings:{bubbles:{show:!0,align:"start"}},style:{bubble:"$label-overlay",line:"$shape-guide--inverted",target:"$selection-area-target"}},renderer:"dom",on:{areaStart(e){this.start(e)},areaMove(e){this.move(e)},areaEnd(e){this.end(e)},areaClear(e){this.clear(e)}},created(){this.state={key:this.settings.key||"brush-area-dir"}},render(e){this.state.rect=this.rect;const t=this.settings.settings,n="vertical"===t.direction?0:1,r=this.state.rect[0===n?"height":"width"],o=this.renderer.element().getBoundingClientRect(),i=(t.target?t.target.components||[t.target.component]:[]).map((e=>this.chart.component(e))).filter((e=>!!e&&!!e.rect)),a=i[0]?i.slice(1).reduce(((e,t)=>({x0:Math.min(e.x0,t.rect.x),y0:Math.min(e.y0,t.rect.y),x1:Math.max(e.x1,t.rect.x+t.rect.width),y1:Math.max(e.y1,t.rect.y+t.rect.height)})),{x0:i[0].rect.x,y0:i[0].rect.y,x1:i[0].rect.x+i[0].rect.width,y1:i[0].rect.y+i[0].rect.height}):null;return this.state.targetRect=a?{x:a.x0-this.rect.x,y:a.y0-this.rect.y,width:a.x1-a.x0,height:a.y1-a.y0}:null,this.state.style=this.style,this.state.chart=this.chart,this.state.direction=n,this.state.settings=t,this.state.offset=o,this.state.rc=G3(),this.state.renderer=this.renderer,this.state.multi=!!t.multiple,this.state.h=e,this.state.size=r,this.state.cssCoord={offset:0===this.state.direction?"top":"left",coord:0===this.state.direction?"y":"x",pos:0===this.state.direction?"deltaY":"deltaX",area:0===this.state.direction?"height":"width"},this.state.format=function(e,t){return function(e,t,n){const r=Math.min(...n),o=Math.max(...n),i={x:e.direction?r+e.rect.x:e.rect.x,y:e.direction?e.rect.y:r+e.rect.y,width:e.direction?o-r:e.rect.width+e.rect.x,height:e.direction?e.rect.height+e.rect.y:o-r},a=e.chart.shapesAt(i,e.settings.brush);if(0===a.length)return"-";const s=a.reduce(((n,o)=>{const i=n.bounds,a=o.bounds;return t===r?i[e.cssCoord.coord]<=a[e.cssCoord.coord]?n:o:i[e.cssCoord.coord]+i[e.cssCoord.area]>=a[e.cssCoord.coord]+a[e.cssCoord.area]?n:o})),l=e.settings.brush.components.reduce(((e,t)=>e.key===s.key?e:t));return"function"==typeof e.settings.bubbles.label?e.settings.bubbles.label(s.data):Array.isArray(l.data)&&l.data.length?s.data[l.data[0]].label:s.data&&s.data.label?s.data.label:"-"}(this,e,t)},[]},start(e){!function(e){let{state:t,e:n,renderer:r,ranges:o,targetSize:i}=e;if(t.started)return;const a=n.center.x-n.deltaX,s=n.center.y-n.deltaY;let l=document.elementFromPoint(a,s);r.element().contains(l)||(l=null);const c={started:!0};t.offset=r.element().getBoundingClientRect(),t.ranges=o(t);const u=a-t.offset.left,d=s-t.offset.top,p=n.center[t.cssCoord.coord]-n[t.cssCoord.pos]-t.offset[t.cssCoord.offset],h=n.center[t.cssCoord.coord]-t.offset[t.cssCoord.offset];let f=h,m=p;c.start=p,c.current=h;let g=t.ranges;const y=I7(t);let _,b,x=-1;if(l&&l.hasAttribute("data-idx"))x=parseInt(l.getAttribute("data-idx"),10),y.min=x>0?g[x-1].max:y.min,y.max=x+1<g.length?g[x+1].min:y.max;else{for(_=0;_<g.length;_++){if(g[_].min<=m&&m<=g[_].max){x=_,y.min=_?g[_-1].max:y.min,y.max=_+1<g.length?g[_+1].min:y.max;break}if(m<g[_].min){y.max=g[_].min,y.min=_?g[_-1].max:y.min;break}}-1===x&&g.length&&_>=g.length&&(y.min=g[g.length-1].max)}if(-1!==x||t.multi||(c.ranges=[],y.min=0,y.max=t.direction?t.rect.width:t.rect.height),-1!==x)if(b={idx:x,start:g[x].min,end:g[x].max,limitLow:y.min,limitHigh:y.max,mode:"move"},l&&l.hasAttribute("data-other-value"))c.start=parseFloat(l.getAttribute("data-other-value")),b.mode="modify";else{let e=b.start,t=b.end;Math.abs(p-e)<=i?(c.start=b.end,b.mode="modify"):Math.abs(p-t)<=i&&(c.start=b.start,b.mode="modify")}else b={idx:-1,start:m,end:f,limitLow:y.min,limitHigh:y.max,mode:"current"};c.active=b,"modify"!==b.mode&&t.targetRect&&!h4(t.targetRect,{x:u,y:d})||Object.keys(c).forEach((e=>t[e]=c[e]))}({e:e,state:this.state,renderer:this.renderer,ranges:q7,targetSize:5})},end(){this.state.started&&(!function(e,t){e.started=!1,e.ranges=t(e);const n=I7(e);P7(e,e.current,n)}(this.state,q7),N7(this.state))},move(e){this.state.started&&(!function(e,t){const n=t.center[e.cssCoord.coord]-e.offset[e.cssCoord.offset];e.current=Math.max(Math.min(n,e.active.limitHigh),e.active.limitLow)}(this.state,e),function(e){const t=e.ranges.map((e=>({min:e.min,max:e.max})));if(-1!==e.active.idx)if("modify"===e.active.mode)t[e.active.idx].min=Math.min(e.start,e.current),t[e.active.idx].max=Math.max(e.start,e.current);else{const n=M7(e);t[e.active.idx].min=e.active.start+n,t[e.active.idx].max=e.active.end+n}else t.push({min:Math.min(e.start,e.current),max:Math.max(e.start,e.current)});e.rc.set(t);let n=[];t.forEach((t=>{n=[...n,...F7(e,t)]})),function(e,t){e.chart.brushFromShapes(t,e.settings.brush)}(e,n)}(this.state),N7(this.state))},clear(){this.state.rc&&this.state.rc.clear(),this.state.renderer.render([])}};function B7(e){const t="vertical"===e.direction,n=e.rect[t?"height":"width"],r=e.rect[t?"width":"height"];return function(e){const t=e.brush;if(!t||!t.isActive())return[];const n=e.scale.data(),r=(n&&n.fields||[]).map((e=>e.id())),o=t.brushes().filter((e=>"range"===e.type&&-1!==r.indexOf(e.id)))[0];return o?o.brush.ranges():[]}(e).map((o=>{const i=e.scale(o.min)*n,a=e.scale(o.max)*n,s=Math.min(i,a),l=Math.abs(i-a);return{type:"rect",fill:e.fill,opacity:e.opacity,x:t?0:s,width:t?r:l,y:t?s:0,height:t?l:r}}))}function $7(e,t,n,r){function o(){!function(e){e.renderer.render(B7(e))}(e)}function i(){!function(e){e.renderer.render(B7(e))}(e)}function a(){!function(e){e.renderer.render(B7(e))}(e)}e.brush=t,t&&(t.on("start",o),t.on("update",i),t.on("end",a),e.start=o,e.update=i,e.end=a,e.brush=t,e.scale=n,e.renderer=r)}function H7(e){e.brush&&(e.brush.removeListener("start",e.start),e.brush.removeListener("update",e.update),e.brush.removeListener("end",e.end)),e.start=void 0,e.update=void 0,e.end=void 0,e.brush=void 0,e.scale=void 0,e.renderer=void 0}const V7={require:["chart","settings","renderer"],defaultSettings:{settings:{}},preferredSize:()=>50,created(){this.state={}},render(){const e=this.settings.settings,t=this.chart.brush(e.brush),n=e.direction||"horizontal",r="horizontal"===n?this.rect.width:this.rect.height,o=y6(this.chart.scale(e.scale),r);return H7(this.state),$7(this.state,t,o,this.renderer),this.state.rect=this.rect,this.state.fill=e.fill||"#ccc",this.state.opacity=void 0!==e.opacity?e.opacity:1,this.state.direction=n,B7(this.state)},beforeDestroy(){H7(this.state)}};function G7(e,t){const n=t.center.x,r=t.center.y;return{x:n-e.left,y:r-e.top}}function U7(e,t,n){return T6(e,t.points[0])<n.settings.snapIndicator.threshold**2}function Y7(e,t){null==e.path.d?e.path.d="M".concat(t.x," ").concat(t.y," "):e.path.d+="L".concat(t.x," ").concat(t.y," "),e.points.push(t)}function K7(e){let{state:t,start:n=null,end:r=null}=e;null!==n&&(t.snapIndicator.x1=n.x,t.snapIndicator.y1=n.y),null!==r&&(t.snapIndicator.x2=r.x,t.snapIndicator.y2=r.y)}function X7(e,t){e.snapIndicator.visible=t}const J7={require:["chart","renderer","settings"],defaultSettings:{layout:{displayOrder:0},settings:{brush:{components:[]},snapIndicator:{threshold:75,strokeDasharray:"5, 5",stroke:"black",strokeWidth:2,opacity:.5},lasso:{fill:"transparent",stroke:"black",strokeWidth:2,opacity:.7,strokeDasharray:"20, 10"},startPoint:{r:10,fill:"green",stroke:"black",strokeWidth:1,opacity:1}}},on:{lassoStart(e){this.start(e)},lassoEnd(e){this.end(e)},lassoMove(e){this.move(e)},lassoCancel(){this.cancel()}},created(){this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}}},start(e){var t;this.state.active=!0,this.state.path={visible:!0,type:"path",d:null,fill:(t=this.settings.settings.lasso).fill,stroke:t.stroke,strokeWidth:t.strokeWidth,opacity:t.opacity,strokeDasharray:t.strokeDasharray,collider:{type:null}},this.state.snapIndicator=function(e){return{visible:!1,type:"line",x1:0,y1:0,x2:0,y2:0,strokeDasharray:e.strokeDasharray,stroke:e.stroke,strokeWidth:e.strokeWidth,opacity:e.opacity,collider:{type:null}}}(this.settings.settings.snapIndicator),this.state.startPoint=function(e){return{visible:!0,type:"circle",cx:0,cy:0,r:e.r,fill:e.fill,opacity:e.opacity,stroke:e.stroke,strokeWidth:e.strokeWidth,collider:{type:null}}}(this.settings.settings.startPoint),this.state.rendererBounds=this.renderer.element().getBoundingClientRect(),this.state.componentDelta=function(e,t){const n=e.element.getBoundingClientRect();return{x:t.left-n.left,y:t.top-n.top}}(this.chart,this.state.rendererBounds),this.state.brushConfig=function(e){return e.settings.brush.components.map((e=>({key:e.key,contexts:e.contexts||["lassoBrush"],data:e.data||[""],action:e.action||"add"})))}(this.settings);const n=G7(this.state.rendererBounds,e);Y7(this.state,n),K7({state:this.state,start:n}),function(e,t){e.startPoint.cx=t.x,e.startPoint.cy=t.y}(this.state,n)},move(e){if(!this.state.active)return;const t=G7(this.state.rendererBounds,e);U7(t,this.state,this.settings)?X7(this.state,!0):X7(this.state,!1),Y7(this.state,t),K7({state:this.state,end:t}),function(e,t){const n=[e.startPoint,e.path,e.snapIndicator].filter((e=>e.visible));t.render(n)}(this.state,this.renderer),function(e,t){if(e.active){const n=e.points[e.points.length-2],r=e.points[e.points.length-1];e.lineBrushShape.x1=n.x+e.componentDelta.x,e.lineBrushShape.y1=n.y+e.componentDelta.y,e.lineBrushShape.x2=r.x+e.componentDelta.x,e.lineBrushShape.y2=r.y+e.componentDelta.y;const o=t.shapesAt(e.lineBrushShape,{components:e.brushConfig});t.brushFromShapes(o,{components:e.brushConfig})}}(this.state,this.chart)},end(e){if(!this.state.active)return;X7(this.state,!1);U7(G7(this.state.rendererBounds,e),this.state,this.settings)&&function(e,t){if(e.active){const n=e.componentDelta.x,r=e.componentDelta.y,o=e.points.map((e=>({x:e.x+n,y:e.y+r}))),i=t.shapesAt({vertices:o},{components:e.brushConfig});t.brushFromShapes(i,{components:e.brushConfig})}}(this.state,this.chart),this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}},this.renderer.render([])},cancel(){var e,t;this.state.active&&(e=this.state,t=this.chart,e.brushConfig.forEach((e=>{e.contexts.forEach((e=>{t.brush(e).end()}))})),this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}},this.renderer.render([]))},render(){}};function Z7(e,t,n,r,o){let i,a=0,s=t.length-1;for(;a<s;){let l=Math.floor((a+s)/2);i=o(t[l]),i[n]+i[r]<e[n]?a=l+1:s=l}return a}function Q7(e){let{orientation:t,targetNodes:n,labels:r,container:o}=e,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Z7;const a=[],s="v"===t?"x":"y",l="v"===t?"width":"height",c=e=>e.textBounds,u=e=>e.node.localBounds;return(e,t)=>{const{textBounds:d,node:p}=r[t];if(d[s]<o[s]||d[s]+d[l]>o[s]+o[l])return!1;for(let e=i(d,a,s,l,c);e<a.length;e++)if(d4(d,a[e].textBounds))return!1;const h=i(d,n,s,l,u),f=d[s]+d[l];for(let e=h;e<n.length;e++){const t=n[e].node;if(f<t.localBounds[s])break;if(d4(d,t.localBounds)&&p!==t)return!1}return a.push(r[t]),!0}}const e9=4;function t9(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function n9(e){const t=typeof e;return("string"===t||"number"===t)&&""!==e}function r9(e){return JZ(JZ({type:"rect",rx:2,ry:2,fill:e.backgroundColor},e.backgroundBounds),{},{data:"".concat(e.data," ").concat(e.text),rotation:e.transform&&e.transform.match(/rotate/gi)?"rotated":"horizontal"})}function o9(e,t,n){return n?e.width>=t.height:e.width>=t.width}function i9(e,t,n){return n?e.height>=t.width:e.height>=t.height}function a9(e,t,n,r,o){let i,a;return"v"===e?(i=r||o||o9(t,n,!0),a=i9(t,n,!r)):(i=o9(t,n),a=o||i9(t,n,!1)),i&&a}function s9(e,t,n,r){return e+.5*t+(r-.5)*(t-n)-.5*n}function l9(e,t,n){const r={type:"text",text:t,maxWidth:n.rotate?e.height:e.width,x:0,y:e.y,dx:0,dy:0,fill:n.fill,anchor:n.rotate?"end":"start",baseline:"central",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily},o=n.textMetrics;if(!n.overflow&&!function(e,t,n){return o9(e,t,n.rotate)&&i9(e,t,n.rotate)}(e,o,n))return!1;const i=.5*o.height;return n.rotate?(r.x=s9(e.x,e.width,o.height,n.align)+i,r.y=s9(e.y,e.height,o.width,n.justify),"right"===n.dock?r.transform="rotate(90, ".concat(r.x+r.dx,", ").concat(r.y+r.dy,") translate(").concat(o.width,", 0)"):r.transform="rotate(-90, ".concat(r.x+r.dx,", ").concat(r.y+r.dy,")")):(r.x=s9(e.x,e.width,o.width,n.align),r.y=s9(e.y,e.height,o.height,n.justify)+i),r}function c9(e){let{bar:t,view:n,direction:r,position:o,padding:i=e9,measured:a}=e;const s={};if(UZ(s,t),o&&"inside"!==o)if("up"===r||"down"===r){const e=Math.max(0,Math.min(t.y,n.height)),i=Math.max(0,Math.min(t.y+t.height,n.height));"outside"===o&&"up"===r||"opposite"===o&&"down"===r?(s.y=0,s.height=e):("outside"===o&&"down"===r||"opposite"===o&&"up"===r)&&(s.y=i,s.height=n.height-i)}else{const e=Math.max(0,Math.min(t.x,n.width)),i=Math.max(0,Math.min(t.x+t.width,n.width));"outside"===o&&"left"===r||"opposite"===o&&"right"===r?(s.x=0,s.width=e):("outside"===o&&"right"===r||"opposite"===o&&"left"===r)&&(s.x=i,s.width=n.width-i)}else;return function(e,t){const n=Math.max(0,Math.min(e.y,t.height)),r=Math.max(0,Math.min(e.y+e.height,t.height)),o=Math.max(0,Math.min(e.x,t.width)),i=Math.max(0,Math.min(e.x+e.width,t.width));e.x=o,e.width=i-o,e.y=n,e.height=r-n}(s,n),function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{top:r=e9,bottom:o=e9,left:i=e9,right:a=e9}=n,s="function"==typeof i?i(t):i,l="function"==typeof a?a(t):a,c="function"==typeof r?r(t):r,u="function"==typeof o?o(t):o;e.x+=s,e.width-=s+l,e.y+=c,e.height-=c+u}(s,a,i),s}function u9(e){let t,n,r,o,i,{direction:a,fitsHorizontally:s,measured:l,node:c,orientation:u,placementSettings:d,rect:p}=e,h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c9;const f=[],m="h"===u?"width":"height";for(i=0;i<d.length;i++)if(r=d[i],o=h({bar:c.localBounds,view:p,direction:a,position:r.position,padding:r.padding,measured:l}),f.push(o),t=!i||o[m]>t[m]?o:t,a9(u,o,l,s,r.overflow)){n=o;break}return n||(n=t,i=f.indexOf(n)),r=d[i],{bounds:n,placement:r}}function d9(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};const{top:i=e9,bottom:a=e9,left:s=e9,right:l=e9}=o,c="function"==typeof s?s(t):s,u="function"==typeof l?l(t):l,d="function"==typeof i?i(t):i,p="function"==typeof a?a(t):a,h=e.x+e.dx,f=e.y+e.dy,m=n?Math.min(t.width,r.height):Math.min(t.height,r.width),g=n?Math.min(t.height,r.height):Math.min(t.width,r.width),y=.5*t.height,_=1e-9;return{x:(n?h-y:h)-c-_,y:(n?f:f-y)-d-_,width:g+(c+u)-_,height:m+(d+p)-_}}function p9(e){let{chart:t,targetNodes:n,rect:r,fitsHorizontally:o,collectiveOrientation:i}=e,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u9,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l9,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Q7;const c=[],u={container:r,targetNodes:n,labels:[],orientation:i};let d,p,h,f,m,g,y,_,b,x,v,w,S,C;for(let e=0,l=n.length;e<l;e++){g=null,p=n[e],h=p.node,S=t9(h,t),b=p.direction,C="left"===b||"right"===b?"h":"v";for(let t=0;t<p.texts.length;t++){if(f=p.texts[t],!n9(f))continue;x=p.labelSettings[t],_=p.measurements[t],w=x.placements;const n=a({direction:b,fitsHorizontally:o,lblStngs:x,measured:_,node:h,orientation:C,placements:w,placementSettings:p.placementSettings[t],rect:r});if(g=n.bounds,v=n.placement,g&&v){var E;m=v.justify;const t="function"==typeof x.linkData?x.linkData(S,e):void 0,n="function"==typeof v.overflow?v.overflow(S,e):v.overflow;"up"===b&&(m=1-m),"opposite"===v.position&&(m=1-m),"left"===b&&(m=1-m);const r=!("h"===i||o);if(d=s(g,f,{justify:"h"===C?v.align:m,align:"h"===C?m:v.align,fontSize:x.fontSize,fontFamily:x.fontFamily,textMetrics:_,rotate:r,overflow:!!n,dock:null!==(E=x.dock)&&void 0!==E?E:"left"}),d){const n=d9(d,_,r,g,v.padding);y="function"==typeof v.fill?v.fill(JZ(JZ({},S),{},{textBounds:n}),e):v.fill,d.fill=y,void 0!==t&&(d.data=t),"object"==typeof v.background&&(d.backgroundColor="function"==typeof v.background.fill?v.background.fill(JZ(JZ({},S),{},{textBounds:n}),e):v.background.fill,void 0!==d.backgroundColor&&(d.backgroundBounds=d9(d,_,r,g,v.background.padding))),c.push(d),u.labels.push({node:h,textBounds:n})}}}}const k=c.filter(l(u));return[...k.filter((e=>void 0!==e.backgroundBounds)).map(r9),...k]}function h9(e){const t=2*Math.PI;return(e%t+t)%t}function f9(e,t){e.x+=t,e.width-=2*t,e.y+=t,e.height-=2*t}function m9(e){return{x:e.x,y:e.y-e.height/2,width:e.width,height:e.height}}function g9(e,t,n){let{x:r,y:o}=t;if(r*r+o*o>e*e)return null;let i=Math.sin(n),a=Math.cos(n),s=r*a-o*i,l=e*e-s*s;if(l<0)return null;let c=Math.sqrt(l);return{x:s*a+i*c,y:-s*i+a*c}}function y9(e){let t,n,{radius:r,size:o,angle:i}=e,{width:a,height:s}=o,l={x:a/2,y:s/2};switch(Math.floor(i/(Math.PI/2))){case 0:if(t=g9(r,l,i),!t)return null;t.y*=-1,n={x:-a,y:0};break;case 1:if(t=g9(r,l,Math.PI-i),!t)return null;n={x:-a,y:-s};break;case 2:if(t=g9(r,l,i-Math.PI),!t)return null;t.x*=-1,n={x:0,y:-s};break;case 3:if(t=g9(r,l,2*Math.PI-i),!t)return null;t.x*=-1,t.y*=-1,n={x:0,y:0};break;default:throw new Error("invalid angle")}return{x:t.x+n.x,y:t.y+n.y,width:a,height:s}}function _9(e){let{slice:t,measured:n,padding:r}=e,{start:o,end:i,innerRadius:a,outerRadius:s}=t,l=s-a-2*r,c=i-o;if(c<Math.PI){let e=(n.height/2+r)/Math.tan(c/2);e>a&&(l=s-e-2*r)}if(l<0||l<n.minReqWidth)return null;const u=h9((o+i)/2);let d=s-r,p={x:Math.sin(u)*d,y:-Math.cos(u)*d,width:l,height:n.height};return u<Math.PI?(p.angle=u-Math.PI/2,p.anchor="end"):(p.angle=u+Math.PI/2,p.anchor="start"),p}function b9(e){let{context:t,node:n,bounds:r}=e;let{start:o,end:i}=n.desc.slice;const a=h9((o+i)/2);switch(Math.floor(a/(Math.PI/2))){case 0:t.q1maxY=r.y-2,void 0===t.q2minY&&(t.q2minY=r.y+r.height+2);break;case 1:t.q2minY=r.y+r.height+2;break;case 2:t.q3minY=r.y+r.height+2;break;case 3:t.q4maxY=r.y-2,void 0===t.q3minY&&(t.q3minY=r.y+r.height+2)}}function x9(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function v9(e,t,n){const r={type:"text",text:t,maxWidth:e.width,x:e.x,y:e.y+("top"===e.baseline?e.height/2:0),fill:n.fill,anchor:e.anchor||"start",baseline:"middle",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily};if(!isNaN(e.angle)){let t=e.angle*(360/(2*Math.PI));r.transform="rotate(".concat(t,", ").concat(r.x,", ").concat(r.y,")")}return r}function w9(e){let t,n,{slice:r,direction:o,position:i,padding:a,measured:s,view:l,context:c,store:u}=e,{start:d,end:p,innerRadius:h,offset:f}=r;switch(i){case"into":t="rotate"===o?_9({slice:r,measured:s,padding:a}):function(e){let{slice:t,padding:n,measured:r}=e,{start:o,end:i,innerRadius:a,outerRadius:s}=t;const l=h9((o+i)/2);let c=y9({radius:s,size:{width:r.width+2*n+1,height:r.height+2*n},angle:l});return c?(c.baseline="top",f4(c,{x1:0,y1:0,x2:Math.sin(o)*s,y2:-Math.cos(o)*s})||f4(c,{x1:0,y1:0,x2:Math.sin(i)*s,y2:-Math.cos(i)*s})||i4({cx:0,cy:0,r:a},c)?null:(f9(c,n),c)):null}({slice:r,measured:s,padding:a});break;case"inside":n={start:d,end:p,innerRadius:0,outerRadius:h},t="rotate"===o?_9({slice:n,measured:s,padding:a}):function(e){let{slice:t,padding:n,measured:r,store:o}=e;const{start:i,end:a,outerRadius:s}=t,l=h9((i+a)/2);let c=y9({radius:s,size:{width:r.width+2*n+1,height:r.height+2*n},angle:l});return c?(c.baseline="top",f9(c,n),o.insideLabelBounds.some((e=>d4(e,c)))?null:(o.insideLabelBounds.push({x:c.x-4,y:c.y,width:c.width+8,height:c.height}),c)):null}({slice:n,measured:s,padding:a,store:u});break;case"outside":t="rotate"===o?function(e){let{slice:t,measured:n,padding:r,view:o}=e,{start:i,end:a,outerRadius:s,offset:l}=t,c=s+r,u=a-i;if(u<Math.PI&&(n.height/2+r)/Math.tan(u/2)>c)return null;const d=h9((i+a)/2);let p=Math.sin(d)*c,h=-Math.cos(d)*c,f=n.width+1,m=d%Math.PI;if(m>Math.PI/2&&(m=Math.PI-m),Math.cos(m)>.001){let e=h<0?o.y:o.y+o.height,t=Math.abs(e-l.y)/Math.cos(m)-Math.tan(m)*(n.height/2)-2*r-s;t<f&&(f=t)}if(Math.sin(m)>.001){let e=p<0?o.x:o.x+o.width,t=Math.abs(e-l.x)/Math.sin(m)-n.height/2/Math.tan(m)-2*r-s;t<f&&(f=t)}if(f<=0||f<n.minReqWidth)return null;let g={x:p,y:h,width:f,height:n.height};return d<Math.PI?(g.angle=d-Math.PI/2,g.anchor="start"):(g.angle=d+Math.PI/2,g.anchor="end"),g}({slice:r,measured:s,padding:a,view:l}):function(e){let{slice:t,measured:n,padding:r,view:o,context:i}=e,{start:a,end:s,outerRadius:l,offset:c}=t;const u=h9((a+s)/2);if(function(e,t,n){switch(t){case 0:return e.q1maxY<0;case 1:return e.q2minY>n.height;case 2:return e.q3minY>n.height;case 3:return e.q4maxY<0;default:return!0}}(i,Math.floor(u/(Math.PI/2)),o))return null;let d=l+r+n.height/2,p=Math.sin(u)*d,h=-Math.cos(u)*d,f=n.width+1;if(u<Math.PI){let e=Math.abs(o.x+o.width-(p+c.x));e<f&&(f=e)}else{let e=Math.abs(o.x-(p+c.x));e<f&&(f=e)}if(f<n.minReqWidth)return null;let m={x:p,y:h,width:f,height:n.height};return u<Math.PI?m.anchor="start":m.anchor="end",m}({slice:r,measured:s,padding:a,view:l,context:c});break;default:throw new Error("not implemented")}return t&&(t.x+=f.x,t.y+=f.y,"outside"===i&&"rotate"!==o&&function(e,t,n){const{start:r,end:o,offset:i,outerRadius:a}=n,s=h9((r+o)/2);switch(Math.floor(s/(Math.PI/2))){case 0:if(void 0!==t.q1maxY){let n=Math.min(e.y,t.q1maxY-e.height),r=e.y-n;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x-2,y1:e.y+2,x2:i.x+Math.sin(s)*t,y2:i.y-Math.cos(s)*t,strokeWidth:1}}}break;case 1:if(void 0!==t.q2minY){let n=Math.max(e.y,t.q2minY),r=n-e.y;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x-2,y1:e.y-2,x2:i.x+Math.sin(s)*t,y2:i.y-Math.cos(s)*t,strokeWidth:1}}}break;case 2:if(void 0!==t.q3minY){let n=Math.max(e.y,t.q3minY),r=n-e.y;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x+2,y1:e.y-2,x2:i.x+Math.sin(s)*t,y2:i.y-Math.cos(s)*t,strokeWidth:1}}}break;case 3:if(void 0!==t.q4maxY){let n=Math.min(e.y,t.q4maxY-e.height),r=e.y-n;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x+2,y1:e.y+2,x2:i.x+Math.sin(s)*t,y2:i.y-Math.cos(s)*t,strokeWidth:1}}}}}(t,c,r)),t}function S9(e){let{context:t,direction:n,measured:r,node:o,placementSettings:i,rect:a,store:s}=e,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:w9;for(let e=0;e<i.length;e++){let c=i[e],u=l({context:t,slice:o.desc.slice,view:a,direction:n,position:c.position,measured:r,padding:c.padding,store:s});if(u)return{bounds:u,placement:c}}return{bounds:null,placement:null}}function C9(e,t,n){const r=t.fontFamily,o="".concat(t.fontSize,"px"),i=n.measureText({text:e,fontFamily:r,fontSize:o});return i.minReqWidth=Math.min(i.width,n.measureText({text:"".concat(e[0],"…"),fontFamily:r,fontSize:o}).width),i}const E9=/\n+|\r+|\r\n/,k9=/\s/,M9=/[a-zA-Z\u00C0-\u00F6\u00F8-\u00FF\u00AD]/;function R9(e){return"string"==typeof e?-1!==e.search(E9):-1!==String(e).search(E9)}function A9(e){return-1!==e.search(k9)}function I9(e){return-1!==e.search(M9)}function P9(e,t,n){return Math.max(t,Math.min(n,e))}function O9(){let{string:e,separator:t="",reverse:n=!1,measureText:r=e=>({width:e.length,height:1}),mandatoryBreakIdentifiers:o=[R9],noBreakAllowedIdentifiers:i=[],suppressIdentifier:a=[A9,R9,e=>""===e],hyphenationIdentifiers:s=[I9]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const l=String(e).split(t);!function(e){""===e[0]&&e.shift(),""===e[e.length-1]&&e.pop()}(l);const c=l.length,u=n?e=>e>=0:e=>e<c;let d=n?c:-1;function p(e){const t=P9(e,0,c-1),n=l[t],u=r(n),d=function(e,t,n,r,o){return r.some((r=>r(e,t,n)))?1:o.some((r=>r(e,t,n)))?0:2}(n,t,l,o,i);return{index:t,value:n,breakOpportunity:d,suppress:a.some((e=>e(n,t,l))),hyphenation:s.some((e=>e(n,t,l))),width:u.width,height:u.height,done:!1}}return{next:function(e){return isNaN(e)?n?d--:d++:d=P9(e,0,c-1),u(d)?p(d):{done:!0}},peek:p,length:c}}const L9="…",D9=/^\s*\d+(\.\d+)?px\s*$/i;function T9(e){return"string"===typeof e&&D9.test(e)}function z9(e){const t=e["font-size"]||e.fontSize;return T9(t)?parseFloat(t)*Math.max(isNaN(e.lineHeight)?1.2:e.lineHeight,0):19.2}function j9(e){const t=e.maxHeight,n=Math.max(e.maxLines,1)||1/0;if(isNaN(t))return n;const r=z9(e);return Math.max(1,Math.min(Math.floor(t/r),n))}function N9(e,t){return{lines:[],line:"",width:0,maxLines:j9(e),maxWidth:e.maxWidth,hyphens:{enabled:"auto"===e.hyphens,char:"‐",metrics:t("‐")}}}function q9(e){e.lines.push(e.line),e.line="",e.width=0}function F9(e,t){e.line+=t.value,e.width+=t.width}function W9(e,t,n){if(t.width>e.maxWidth)return t;const r=t.index;for(let o=1;o<5;o++){const i=n.peek(t.index-1);if(!t.hyphenation||!i.hyphenation||0===t.index)return t;if(e.width+e.hyphens.metrics.width<=e.maxWidth)return e.line+=e.hyphens.char,t;if(1===e.line.length)return t;t=n.next(r-o),e.line=e.line.slice(0,-1),e.width-=t.width}return t}function B9(e,t,n){const r=O9({string:t.value,measureText:n});for(;e.lines.length<e.maxLines;){let t=r.next();if(t.done)break;e.width+t.width>e.maxWidth&&2===t.breakOpportunity&&e.line.length>0?(t=e.hyphens.enabled?W9(e,t,r):t,q9(e),F9(e,t)):F9(e,t)}}function $9(e,t){const n=O9({string:e.text,separator:"",measureText:t,noBreakAllowedIdentifiers:[(e,t)=>0===t]}),r=N9(e,t);let o=!0;for(;r.lines.length<r.maxLines;){let e=n.next();if(e.done){q9(r),o=!1;break}1===e.breakOpportunity?q9(r):r.width+e.width>r.maxWidth&&2===e.breakOpportunity?e.suppress?r.width+=e.width:(e=r.hyphens.enabled?W9(r,e,n):e,q9(r),F9(r,e)):F9(r,e)}return{lines:r.lines,reduced:o}}function H9(e,t){const n=O9({string:e.text,separator:/(\s|-|\u2010)/,measureText:t}),r=N9(e,t);let o=!0;for(;r.lines.length<r.maxLines;){let e=n.next();if(e.done){q9(r),o=!1;break}1===e.breakOpportunity?q9(r):r.width+e.width>r.maxWidth&&2===e.breakOpportunity?e.suppress?q9(r):e.width>r.maxWidth?B9(r,e,t):(q9(r),F9(r,e)):F9(r,e)}return{lines:r.lines,reduced:o}}function V9(e){return{"break-all":$9,"break-word":H9}[e.wordBreak]}function G9(e){return t=>{const n=t.node;if(function(e){return"text"===e.type&&!e._lineBreak}(n)){const r=V9(n);if(!r)return;const o=e(n);if(o.width>n.maxWidth||R9(n.text)){const i=(z9(n)-o.height)/2,a=r(n,function(e,t){return n=>t({text:n,fontSize:e.fontSize,fontFamily:e.fontFamily})}(n,e));t.node=function(e,t,n,r){const o={type:"container",children:[]};void 0!==t.id&&(o.id=t.id);let i=0;return e.lines.forEach(((a,s)=>{const l=UZ({},t);l.text=a,l._lineBreak=!0,i+=n,e.reduced&&s===e.lines.length-1?l.text+=L9:delete l.maxWidth,l.dy=isNaN(l.dy)?i:l.dy+i,i+=r,i+=n,o.children.push(l)})),o}(a,n,i,o.height)}}}}function U9(e,t){const n=e["font-family"]||e.fontFamily,r=e["font-size"]||e.fontSize,o="string"==typeof e.text?e.text:"".concat(e.text),{maxWidth:i}=e;if(void 0===i)return o;let a=t({text:o,fontSize:r,fontFamily:n}).width;if(a<=i)return o;let s=0,l=o.length-1;for(;s<=l;){let e=Math.floor((s+l)/2);a=t({text:o.substr(0,e)+L9,fontSize:r,fontFamily:n}).width,a<=i?s=e+1:l=e-1}return o.substr(0,l)+L9}function Y9(e){const t=e.baseline||e["dominant-baseline"];let n=0;const r=parseInt(e.fontSize||e["font-size"],10)||0;switch(t){case"hanging":n=.75*r;break;case"text-before-edge":n=.85*r;break;case"middle":n=.25*r;break;case"central":n=.35*r;break;case"mathemetical":n=r/2;break;case"text-after-edge":case"ideographic":n=.2*-r;break;default:n=0}return n}const K9={},X9={},J9={fontSize:void 0,fontFamily:void 0};let Z9;function Q9(e,t){return!e&&!t||e===t}function eee(e){let{text:t,fontWeight:n,fontSize:r,fontFamily:o}=e;const i="".concat(t," ").concat(n," ").concat(r," ").concat(o);return"number"!=typeof X9[i]&&(Z9=Z9||document.createElement("canvas").getContext("2d"),function(e){let{fontWeight:t,fontSize:n,fontFamily:r}=e;Q9(J9.fontWeight,t)&&Q9(J9.fontSize,n)&&Q9(J9.fontFamily,r)||(Z9.font=[t,n,r].filter((e=>!!e)).join(" "),J9.fontWeight=t,J9.fontSize=n,J9.fontFamily=r)}({fontWeight:n,fontSize:r,fontFamily:o}),X9[i]=Z9.measureText(t).width),X9[i]}function tee(e){return"number"!=typeof K9[e]&&(K9[e]=function(e){if(T9(e)){const t=parseFloat(e);return t+4*Math.ceil((t+1e-12)/24)}return 16}(e)),K9[e]}function nee(e){let{text:t,fontWeight:n,fontSize:r,fontFamily:o}=e;return{width:eee({text:t,fontWeight:n,fontSize:r,fontFamily:o}),height:tee(r)}}function ree(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:nee;const n=e["font-size"]||e.fontSize,r=e["font-family"]||e.fontFamily,o=t({text:e.text,fontFamily:r,fontSize:n}),i=Math.min(e.maxWidth||o.width,o.width),a=e.x||0,s=e.y||0,l=e.dx||0,c={x:0,y:s+((e.dy||0)+Y9(e))-.75*o.height,width:i,height:o.height},u=e["text-anchor"]||e.anchor;return c.x="middle"===u?a+l-i/2:"end"===u?a+l-i:a+l,c}function oee(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:nee;const n=V9(e),r=e["font-size"]||e.fontSize,o=e["font-family"]||e.fontFamily,i=t({text:e.text,fontFamily:o,fontSize:r});if(n&&(i.width>e.maxWidth||R9(e.text))){const i=n(e,(e=>t({text:e,fontFamily:o,fontSize:r}))),a=UZ({},e);let s=0,l="";for(let e=0,n=i.lines.length;e<n;e++){let a=i.lines[e];a+=e===n-1&&i.reduced?L9:"";const c=t({text:a,fontSize:r,fontFamily:o}).width;c>=s&&(s=c,l=a)}a.text=l;const c=ree(a,t);return c.height=z9(e)*i.lines.length,c}return ree(e,t)}function iee(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function aee(e,t,n){const r={type:"text",text:t,maxWidth:e.width,x:0,y:e.y,dx:0,dy:0,fill:n.fill,anchor:"start",baseline:"alphabetical",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily},o=n.textMetrics;if(e.width<n.fontSize)return!1;const i=Math.max(0,e.width-o.width);return r.x=e.x+n.align*i,r.y=e.y+o.height/1.2,r}function see(e){let{cx:t,cy:n,r:r}=e;return{type:"circle",bounds:{cx:t,cy:n,r:r}}}function lee(e){return e.desc&&e.desc.slice?function(e){let{start:t,end:n,innerRadius:r,outerRadius:o,offset:i}=e;if(Math.abs(t+2*Math.PI-n)>1e-12)return{type:null,bounds:null};let a=0!==r?r:o;return see({cx:i.x,cy:i.y,r:a})}(e.desc.slice):"circle"===e.type?see(e.attrs):"rect"===e.type?{type:"rect",bounds:e.bounds}:{type:null,bounds:null}}var cee={bar:function(e){let{settings:t,chart:n,nodes:r,rect:o,renderer:i,style:a}=e,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p9;const l=UZ({fontSize:12,fontFamily:"Arial",align:.5,justify:0,fill:"#333"},a.label);l.fontSize=parseInt(l.fontSize,10);const c=t.labels.map((e=>UZ({},l,t,e))),u=t.labels.map((e=>e.placements.map((n=>UZ({},l,t,e,n))))),{fitsHorizontally:d,hasHorizontalDirection:p,targetNodes:h}=function(e){let{nodes:t,rect:n,chart:r,labelSettings:o,placementSettings:i,settings:a,renderer:s}=e;const l={},c=[];let u,d,p,h,f,m,g,y=!0,_=!1;for(let e=0;e<t.length;e++){if(d=t[e],h=d.localBounds,!d4(h,n))continue;let b=t9(d,r);u={node:d,texts:[],measurements:[],labelSettings:[],placementSettings:[]};for(let t=0;t<o.length;t++)m=o[t],p="function"==typeof m.label?m.label(b,e):void 0,n9(p)&&(g="function"==typeof a.direction?a.direction(b,e):a.direction||"up",_=_||"left"===g||"right"===g,l.fontFamily=m.fontFamily,l.fontSize="".concat(m.fontSize,"px"),l.text=p,f=s.measureText(l),u.measurements.push(f),u.texts.push(p),u.labelSettings.push(m),u.placementSettings.push(i[t]),u.direction=g,y=y&&f.width<=h.width-2*e9);c.push(u)}return{targetNodes:c,fitsHorizontally:y,hasHorizontalDirection:_}}({nodes:r,chart:n,renderer:i,settings:t,rect:o,labelSettings:c,placementSettings:u}),f=function(e){let{orientation:t="auto",defaultOrientation:n="h"}=e;switch(t.toLocaleLowerCase()){case"vertical":return"v";case"horizontal":return"h";default:return n}}({orientation:t.orientation,defaultOrientation:p?"h":"v"}),m="h"===f?"y":"x",g="h"===f?"height":"width";return h.sort(((e,t)=>e.node.localBounds[m]+e.node.localBounds[g]-(t.node.localBounds[m]+t.node.localBounds[g]))),s({chart:n,targetNodes:h,stngs:t,rect:o,fitsHorizontally:d,collectiveOrientation:f})},slice:function(e){let{settings:t,chart:n,nodes:r,rect:o,renderer:i,style:a}=e,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:S9,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:v9;const c=UZ({fontSize:12,fontFamily:"Arial",fill:"#333",padding:4,position:"into"},a.label);c.fontSize=parseInt(c.fontSize,10);const u=t.labels.map((e=>UZ({},c,t,e))),d=t.labels.map((e=>e.placements.map((n=>UZ({},c,t,e,n))))),p=[],h={insideLabelBounds:[]};r=function(e){const t=[],n=[],r=[],o=[];for(let i=0;i<e.length;++i){const{start:a,end:s}=e[i].desc.slice,l=h9((a+s)/2);switch(Math.floor(l/(Math.PI/2))){case 0:t.push(e[i]);break;case 1:n.push(e[i]);break;case 2:r.push(e[i]);break;case 3:o.push(e[i])}}const i=(e,t)=>h9((e.desc.slice.start+e.desc.slice.end)/2)-h9((t.desc.slice.start+t.desc.slice.end)/2),a=(e,t)=>i(t,e);return t.sort(a),n.sort(i),r.sort(a),o.sort(i),t.concat(n,o,r)}(r);const f={};for(let e=0,t=r.length;e<t;e++){const t=r[e],a=x9(t,n);for(let n=0;n<u.length;n++){const r=u[n],c="function"==typeof r.label?r.label(a,e):"";if(!c)continue;const m="function"==typeof r.direction?r.direction(a,e):r.direction||"horizontal",g="function"==typeof r.linkData?r.linkData(a,e):void 0,y=C9(c,r,i),_=s({context:f,direction:m,lblStngs:r,measured:y,node:t,placementSettings:d[n],rect:o,store:h}),b=_.bounds,x=_.placement;if(b&&x){if("outside"===x.position&&"rotate"!==m){b9({context:f,node:t,bounds:b});if(!J6(m9(b),o))continue}const n="function"==typeof x.fill?x.fill(a,e):x.fill,i=l(b,c,{fill:n,fontSize:r.fontSize,fontFamily:r.fontFamily,textMetrics:y});i&&(void 0!==g&&(i.data=g),p.push(i),b.line&&(b.line.stroke=n,p.push(b.line)))}}}return p},rows:function(e){let{settings:t,chart:n,nodes:r,renderer:o,style:i}=e,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:aee;const s=UZ({fontSize:12,fontFamily:"Arial",fill:"#333",padding:4,align:.5,justify:.5},i.label);s.fontSize=parseInt(s.fontSize,10);const l=UZ({},s,t),c=t.labels.map((e=>UZ({},l,e))),u={},d=[];for(let e=0,t=r.length;e<t;e++){let t=r[e],i=iee(t,n),{type:s,bounds:p}=lee(t);if(!p)continue;let h,f=0,m=[],g=[],y="circle"===s?2*p.r*.9:p.height;for(f+=l.padding,h=0;h<c.length;h++){let t=c[h],n="function"==typeof t.label?t.label(i,e):"";u.fontFamily=t.fontFamily,u.fontSize="".concat(t.fontSize,"px"),u.text=n;let r=o.measureText(u);if(f+=r.height+t.padding,f>y)break;g.push(n),m.push(r)}const _=h,b=Math.max(0,y-f);let x;for(x="circle"===s?p.cy-.9*p.r:p.y,x+=l.justify*b+l.padding,h=0;h<_;h++){let t,n=c[h];if("circle"===s){let e=Math.max(Math.abs(x-p.cy),Math.abs(x+m[h].height-p.cy)),n=Math.sqrt(p.r*p.r-e*e);t={x:p.cx-n+l.padding,y:x,width:2*n-2*l.padding,height:m[h].height}}else t={x:p.x+l.padding,y:x,width:p.width-2*l.padding,height:m[h].height};x+=m[h].height+l.padding;let r="function"==typeof n.fill?n.fill(i,e):n.fill;const u="function"==typeof n.linkData?n.linkData(i,e):void 0;let f=a(t,g[h],{fill:r,align:n.align,fontSize:n.fontSize,fontFamily:n.fontFamily,textMetrics:m[h]});if(f){if(f.text&&f.text!==L9){const e=U9(f,o.measureText);if(L9===e)continue;f.ellipsed=e}void 0!==u&&(f.data=u),d.push(f)}}}return d}};const uee={require:["chart","renderer","settings"],defaultSettings:{settings:{},style:{label:"$label"}},render(){const e=this.settings.settings,t=[];return(e.sources||[]).forEach((e=>{e.strategy&&cee[e.strategy.type]&&e.component&&t.push(...function(e,t){let{chart:n,source:r,rect:o,renderer:i,style:a}=e;if(!n.component(r.component))return[];const s=n.findShapes(r.selector).filter((e=>e.key===r.component));return t({chart:n,settings:r.strategy.settings,nodes:s,rect:{x:0,y:0,width:o.width,height:o.height},renderer:i,style:a})}({chart:this.chart,rect:this.rect,renderer:this.renderer,source:e,style:this.style},cee[e.strategy.type]))})),t}};const dee={layout:{size:1,direction:"ltr",scrollOffset:0},item:{show:!0,label:{fontSize:"12px",fontFamily:"Arial",fill:"#595959",wordBreak:"none",maxLines:2,maxWidth:136,lineHeight:1.2},shape:{type:"square",size:12}},title:{show:!0,text:void 0,anchor:"start",fontSize:"16px",fontFamily:"Arial",fill:"#595959",wordBreak:"none",maxLines:2,maxWidth:156,lineHeight:1.25}};function pee(e){let{x:t=0,y:n,item:r,globalMetrics:o,createSymbol:i,direction:a="ltr"}=e,s=r.label.displayObject,l=r.label.bounds,c=r.symbol.meta;const u="rtl"===a;let d={x:u?t+o.maxLabelBounds.width:t+o.maxSymbolSize+o.spacing,y:n,width:o.maxLabelBounds.width,height:Math.max(o.maxSymbolSize,o.maxLabelBounds.height)},p=function(e,t,n){const r=Math.max(0,e.width-t),o=Math.max(0,e.height-t);return{x:e.x+t/2+n.align*r,y:e.y+t/2+n.justify*o}}({x:u?t+o.maxLabelBounds.width+o.spacing:t,y:n,width:o.maxSymbolSize,height:d.height},c.size,{align:void 0===c.align?.5:c.align,justify:void 0===c.justify?.5:c.justify});const h=i(UZ({},c,p));return delete h.collider,s.anchor=u?"end":"start",function(e,t,n){const r=n.textMetrics;if(e.height<r.height)return!1;const o=Math.max(0,e.width-r.width);t.baseline="text-before-edge";const i=Math.max(0,e.height-r.height);t.x=e.x+n.align*o,t.y=e.y+n.justify*i+.175*parseInt(t.fontSize,10)}(d,s,{textMetrics:l,fontSize:parseInt(s.fontSize,10),align:0,justify:.5}),{item:{type:"container",data:r.label.displayObject.data,children:[h,s],collider:{type:"rect",x:t,y:n,width:o.maxItemBounds.width,height:o.maxItemBounds.height}},metrics:d}}function hee(e,t){const n=e.items.length,r=Math.ceil(n/t),o="horizontal"===e.layout.orientation?"width":"height",i="width"===o?"horizontal":"vertical";return e.globalMetrics.maxItemBounds[o]*r+(r-1)*e.layout.margin[i]}function fee(e,t){let n,r,o,i,{onScroll:a=()=>{}}=t,s=null,l=0;const c={itemize:t=>{n=function(e,t){let n,r,{resolved:o,dock:i}=e,a=[],s=o.items.items,l=o.symbols.items,c=o.labels.items,u=0,d=0,p=0;for(let e=0;e<s.length;e++){if(!1===s[e].show)continue;const o=void 0!==c[e].text?c[e].text:c[e].data.label||"";n=UZ({},c[e],{type:"text",fontSize:"".concat(parseInt(c[e].fontSize,10),"px"),text:o,title:o}),r={symbol:{meta:l[e]},label:{displayObject:n,bounds:t.textBounds(n)}},a.push(r),u=Math.max(l[e].size,u),d=Math.max(r.label.bounds.width,d),p=Math.max(r.label.bounds.height,p)}return{items:a,globalMetrics:{spacing:8,maxSymbolSize:u,maxItemBounds:{height:Math.max(u,p),width:u+8+d},maxLabelBounds:{width:d,height:p}},layout:{margin:{vertical:void 0!==o.layout.item.vertical?o.layout.item.vertical:4,horizontal:void 0!==o.layout.item.horizontal?o.layout.item.horizontal:4},mode:o.layout.item.mode,size:o.layout.item.size,orientation:"top"===i||"bottom"===i?"horizontal":"vertical",direction:o.layout.item.direction,scrollOffset:o.layout.item.scrollOffset}}}(t,e.renderer),s=isNaN(n.layout.scrollOffset)?s:n.layout.scrollOffset},getItemsToRender:t=>{o=t.viewRect,l=c.getContentOverflow(o);const a=c.extent();s=Math.max(0,Math.min(s,l)),i=UZ({},o);const u="horizontal"===c.orientation()?"x":"y";return i[u]-=s,i["x"===u?"width":"height"]=a,function(e,t,n){let{viewRect:r}=e,{itemized:o,create:i=pee,parallels:a,createSymbol:s}=n;const l=o.layout.direction,c=o.globalMetrics,u=o.items,d="horizontal"===o.layout.orientation;let p=0;const h=[],f=c.maxItemBounds.height,m=c.maxItemBounds.width,g=o.layout.margin.vertical+f,y=o.layout.margin.horizontal+m;let _=t.x,b=t.y,x=r.x-t.x;for(let e=0;e<u.length;e++){let n=i({y:b,x:"rtl"===l?r.x+x+r.width-m-(_-t.x):_,item:u[e],globalMetrics:c,direction:l,createSymbol:s});if((d&&_>=r.x-m||!d&&b>=r.y-f)&&h.push(n.item),p++,p>=a?(p=0,d?(_+=y,b=t.y):(b+=g,_=t.x)):d?b+=g:_+=y,!d&&b>r.y+r.height)break;if(d&&_>r.x+r.width)break}return h}(t,i,{itemized:n,parallels:r,createSymbol:e.symbol})},parallelize:(e,t)=>(r=function(e,t,n){const r=n.items.length,o="horizontal"===n.layout.orientation?"width":"height",i="width"===o?"horizontal":"vertical",a=n.globalMetrics.maxItemBounds[o]*r+(r-1)*n.layout.margin[i];let s=Math.ceil(a/e);if(null!=t){const e="horizontal"===n.layout.orientation?"height":"width",r="width"===e?"horizontal":"vertical",o=n.layout.margin[r]||4,i=Math.floor((t+o)/(o+n.globalMetrics.maxItemBounds[e]));s=Math.min(s,i)}const l=isNaN(n.layout.size)?1:n.layout.size;return Math.max(1,Math.min(s,l))}(e,t,n),r),hasContentOverflow:()=>{const e="horizontal"===n.layout.orientation?"width":"height";return hee(n,r)>o[e]},getContentOverflow:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o;const t="horizontal"===n.layout.orientation?"width":"height";return Math.max(0,hee(n,r)-e[t])},getNextSize:()=>{const e="horizontal"===n.layout.orientation?"width":"height",t="width"===e?"horizontal":"vertical";return n.globalMetrics.maxItemBounds[e]+n.layout.margin[t]},getPrevSize:()=>{const e="horizontal"===n.layout.orientation?"width":"height",t="width"===e?"horizontal":"vertical";return n.globalMetrics.maxItemBounds[e]+n.layout.margin[t]},hasNext:()=>"horizontal"===c.orientation()?o.x+o.width<i.x+i.width:o.y+o.height<i.y+i.height,hasPrev:()=>"horizontal"===c.orientation()?i.x<o.x:i.y<o.y,next:()=>{c.scroll(-c.getNextSize())},prev:()=>{c.scroll(c.getPrevSize())},scroll:e=>{const t=Math.max(0,Math.min(l,s-e));t!==s&&(s=t,a())},offset:()=>s,orientation:()=>n.layout.orientation,direction:()=>n.layout.direction,extent:()=>hee(n,r),spread:()=>function(e,t){const n=t,r="horizontal"===e.layout.orientation?"height":"width",o="width"===r?"horizontal":"vertical";return e.globalMetrics.maxItemBounds[r]*n+(n-1)*e.layout.margin[o]}(n,r)};return c}function mee(e){return Object.keys(e).filter((t=>e[t])).join(" ")}const gee={up:"▲",right:"▶",down:"▼",left:"◀"};function yee(e,t){let{size:n,isActive:r,direction:o,nav:i,attrs:a}=t,s={},l="";const c=a;i&&i.button&&("function"==typeof i.button.class?s=i.button.class({direction:o}):i.button.class&&(s=i.button.class),"function"==typeof i.button.content&&(l=i.button.content(e,{direction:o})),void 0!==i.button.tabIndex&&(c.tabindex=i.button.tabIndex));const u={width:"".concat(n,"px"),minWidth:"".concat(n,"px"),height:"".concat(n,"px")};return Object.keys(s).length||(u.border="0",u.background="none"),(!r||i&&i.disabled)&&(c.disabled="disabled"),e("button",UZ({class:mee(s),style:u},c),[l||e("span",{style:{pointerEvents:"none"}},[gee[o]])])}function _ee(e){let t;const n={itemize:e=>{t=function(e){let{dock:t,navigation:n}=e;return{layout:{orientation:"top"===t||"bottom"===t?"vertical":"horizontal"},navigation:n}}(e)},render:r=>function(e,t,n,r){let{rect:o,itemRenderer:i}=t;if(!e||!e.renderArgs)return;e.size(o);const a=e.renderArgs[0],s="vertical"===n.layout.orientation,l="rtl"===i.direction(),c=i.hasNext(),u=i.hasPrev();if(!u&&!c)return void e.render([]);const d=s?["right","left"]:["down","up"];l&&s&&d.reverse();const p=[a("div",{style:{position:"relative",display:"flex","flex-direction":s?"column":"row","justify-content":"center",height:"100%",pointerEvents:"auto"},dir:l&&!s?"rtl":"ltr"},[yee(a,{size:32,isActive:c,direction:d[0],attrs:{"data-action":"next","data-component-key":r.settings.key},nav:n.navigation}),yee(a,{size:32,isActive:u,direction:d[1],attrs:{"data-action":"prev","data-component-key":r.settings.key},nav:n.navigation})])];e.render(p)}(n.renderer,r,t,e),extent:()=>32,spread:()=>64};return n}function bee(e){let t;const n={itemize:n=>{t=function(e,t){let{resolved:n}=e;if(!1===n.title.item.show)return null;const r=UZ({},n.title.item,{type:"text"});if("rtl"===n.layout.item.direction&&(r.anchor&&"start"!==r.anchor?"end"===r.anchor&&(r.anchor="start"):r.anchor="end"),void 0===n.title.settings.text){const e=t.scale.data().fields;r.text=e&&e[0]?e[0].title():""}return{displayObject:r,bounds:t.renderer.textBounds(r)}}(n,e)},render:e=>{!function(e,t,n){let{rect:r}=e;if(!t)return;const o=[];if(t.size(r),n){const e={start:0,end:r.width,middle:r.width/2};o.push(UZ({},n.displayObject,{x:e[n.displayObject.anchor]||0,y:0,baseline:"text-before-edge",title:n.displayObject.text}))}t.render(o)}(e,n.renderer,t)},spread:()=>t?t.bounds.height:0,extent:()=>t?t.bounds.width:0};return n}function xee(e,t,n,r){let o,i,a,{itemRenderer:s,navigationRenderer:l,titleRenderer:c,isPreliminary:u=!1}=r,d=0;const p={x:t.spacing,y:t.spacing,width:e.width-2*t.spacing,height:e.height-2*t.spacing};if(o={x:p.x,y:p.y,width:p.width,height:c.spread()},"horizontal"===n){o={x:p.x,y:p.y,width:c.extent(),height:c.spread()};const e=p.width-o.width-(o.width?t.spacing:0),n=p.height;s.parallelize(e,u?void 0:n);const r=s.extent()>e?l.extent():0,h=s.spread(),f=r?l.spread():0;i={x:o.x+o.width+(o.width?t.spacing:0),y:p.y+Math.max(0,(f-h)/2),width:p.width-r-o.width-(r?t.spacing:0)-(o.width?t.spacing:0),height:n},a={x:i.x+i.width+(r?t.spacing:0),y:p.y,width:r,height:p.height},o.y=i.y;"rtl"===s.direction()&&(a.x=p.x,i.x=a.x+a.width+(a.width?t.spacing:0),o.x=i.x+i.width+(o.width?t.spacing:0)),d=Math.max(o.height,f,s.spread())}else{const e=p.height-o.height-(o.height?t.spacing:0),n=p.width;s.parallelize(e,u?void 0:n);const r=s.extent()>e?l.extent():0;a={x:p.x,y:p.y+p.height-r,width:p.width,height:r},i={x:p.x,y:o.y+o.height+(o.height?t.spacing:0),width:p.width,height:p.height-o.height-(o.height?t.spacing:0)-a.height-(a.height?t.spacing:0)},d=Math.max(c.extent(),r?l.spread():0,s.spread())}return i=UZ({},e,{x:e.x+i.x,y:e.y+i.y,width:i.width,height:i.height}),a.x+=e.x,a.y+=e.y,o.x+=e.x,o.y+=e.y,{title:UZ({},e,o),content:UZ({},e,i),navigation:UZ({},e,a),orientation:n,preferredSize:d}}function vee(e){e.state.resolved=function(e){const t=e.scale.domain();let n={items:[]};const r=e.settings.layout.dock;if("threshold-color"===e.scale.type){const o=e.scale.data().fields[0];let i=e=>String(e);e.settings.formatter?i=e.chart.formatter(e.settings.formatter):o&&(i=o.formatter());for(let e=0;e<t.length-1;e++){const r={value:t[e],label:"".concat(i(t[e])," - < ").concat(i(t[e+1]))};o&&(r.source={field:o.id()}),n.items.push(r)}"vertical"==("top"===r||"bottom"===r?"horizontal":"vertical")&&n.items.reverse()}else{const r=e.scale.labels?e.scale.labels():null;n.items=t.map(((t,n)=>{const o=e.scale.datum?UZ({},e.scale.datum(t)):{value:t};return o.value=t,e.scale.label?o.label=e.scale.label(t):r&&(o.label=r[n]),o}))}const o=e.resolver.resolve({data:{fields:e.scale.data().fields},defaults:UZ(!0,{},dee.title,e.style.title),settings:e.settings.settings.title}),i=e.resolver.resolve({data:{fields:e.scale.data().fields},defaults:dee.layout,settings:e.settings.settings.layout}),a=e.resolver.resolve({data:n,defaults:UZ(!0,{},dee.item.label,e.style.item.label),settings:(e.settings.settings.item||{}).label}),s=UZ(!0,{},(e.settings.settings.item||{}).shape);void 0===s.fill&&e.settings.scale&&(s.fill={scale:e.settings.scale});const l=e.resolver.resolve({data:n,defaults:UZ(!0,{},dee.item.shape,e.style.item.shape),settings:s}),c=e.resolver.resolve({data:n,defaults:UZ(!0,{},{show:dee.item.show}),settings:{show:(e.settings.settings.item||{}).show}});function u(e,n){let r=e.data.value,o=t[n+1];e.data.value=[r,o]}"threshold-color"===e.scale.type&&("vertical"==("top"===r||"bottom"===r?"horizontal":"vertical")?(c.items.reverse().forEach(u),c.items.reverse()):c.items.forEach(u));return{title:o,labels:a,symbols:l,items:c,layout:i}}(e),e.titleRenderer.itemize({resolved:e.state.resolved,dock:e.settings.layout.dock||"center"}),e.itemRenderer.itemize({resolved:e.state.resolved,dock:e.settings.layout.dock||"center"}),e.navigationRenderer.itemize({resolved:e.state.resolved,dock:e.settings.layout.dock||"center",navigation:e.settings.settings.navigation}),e.state.display={spacing:8}}function wee(e){const{rect:t,settings:n,state:r,itemRenderer:o,navigationRenderer:i,titleRenderer:a}=e,s=n.layout.dock,l="top"===s||"bottom"===s?"horizontal":"vertical",c=xee(t,r.display,l,{itemRenderer:o,navigationRenderer:i,titleRenderer:a});e.renderer.size(c.content);let u=o.getItemsToRender({viewRect:UZ({},c.content,{x:0,y:0})});return i.render({rect:c.navigation,itemRenderer:o}),a.render({rect:c.title}),e.state.views={layout:c},u}const See={require:["chart","settings","renderer","update","resolver","registries","symbol"],defaultSettings:{settings:{},style:{item:{label:"$label",shape:"$shape"},title:"$title"}},mounted(e){e&&e.parentNode&&(this.navigationRenderer.renderer.appendTo(e.parentNode),this.titleRenderer.renderer.appendTo(e.parentNode),e.parentNode.insertBefore(this.navigationRenderer.renderer.element(),e),e.parentNode.insertBefore(this.titleRenderer.renderer.element(),e)),this.navigationRenderer.render({rect:this.state.views.layout.navigation,itemRenderer:this.itemRenderer}),this.titleRenderer.render({rect:this.state.views.layout.title})},beforeUnmount(){this.navigationRenderer.renderer.clear(),this.titleRenderer.renderer.clear()},on:{panstart(){if(this.state.interaction.started)return;this.itemRenderer.getContentOverflow()&&(this.state.interaction.started=!0,this.state.interaction.delta=0)},panmove(e){if(!this.state.interaction.started)return;const t="horizontal"===this.itemRenderer.orientation()?("rtl"===this.itemRenderer.direction()?-1:1)*e.deltaX:e.deltaY;this.itemRenderer.scroll(t-this.state.interaction.delta),this.state.interaction.delta=t},panend(){this.state.interaction.started=!1},scroll(e){this.itemRenderer.scroll(-e)},next(){this.itemRenderer.next()},prev(){this.itemRenderer.prev()}},created(){this.state={interaction:{}},this.onScroll=()=>{const e=wee(this);this.update(e)},this.itemRenderer=fee(this,{onScroll:this.onScroll}),this.navigationRenderer=_ee(this),this.titleRenderer=bee(this),this.navigationRenderer.renderer=this.registries.renderer("dom")(),this.titleRenderer.renderer=this.registries.renderer(this.settings.renderer)(),vee(this)},preferredSize(e){return function(e,t){let n=0;const r=e.settings.layout.dock||"center",o="top"===r||"bottom"===r?"horizontal":"vertical",i=e.state.display,a=xee(t.inner,i,o,{itemRenderer:e.itemRenderer,navigationRenderer:e.navigationRenderer,titleRenderer:e.titleRenderer,isPreliminary:!0});return n+=i.spacing,n+=a.preferredSize,n+=i.spacing,n}(this,e)},beforeUpdate(){vee(this)},render(){return wee(this)},beforeDestroy(){this.navigationRenderer.renderer.destroy(),this.titleRenderer.renderer.destroy()},additionalElements(){return[this.titleRenderer.renderer.element(),this.navigationRenderer.renderer.element()]},_DO_NOT_USE_getInfo(){return{offset:this.itemRenderer.offset()}}};function Cee(e,t){let n=0;const r=e.state.isVertical?"justify":"align",o=e.state.isVertical?"y":"x",i=e.state.isVertical?"height":"width",a=e.state.isVertical?"requiredHeight":"requiredWidth";n=e.state.rect[i]-e.state.legend.length()-e.state.title[a](),n*=Math.min(1,Math.max(e.stgns[r],0)),t[o]+=n}function Eee(e,t,n){const r=n[e];return"object"==typeof r?-1!==r.valid.indexOf(t)?t:r.default:n.default}function kee(e){return Eee(e.layout.dock,e.settings.title.anchor,{left:{valid:["top"],default:"top"},right:{valid:["top"],default:"top"},top:{valid:["left","right"],default:"left"},bottom:{valid:["left","right"],default:"left"},default:"top"})}function Mee(e,t){const n={x:0,y:0,width:0,height:0},r=e.stgns.padding;return n.x=r.left,n.y=r.top,n.width=t.width-r.left-r.right,n.height=t.height-r.top-r.bottom,n}function Ree(e){const t="top"!==e.settings.layout.dock&&"bottom"!==e.settings.layout.dock,n=e.stgns.title,r=e.chart.scale(e.stgns.fill),o=e.chart.scale(e.stgns.major),i=function(e,t){const n=t.domain();let r=n,o=e.stgns.tick.label;!o&&e.formatter?o=e.formatter:!o&&t.data().fields&&(o=t.data().fields[0].formatter()),"function"==typeof o&&(r=n.map(o).map(String));const i=n.map(((n,o)=>{const i=r[o];return{value:n,label:i,pos:t.norm(parseFloat(n,10)),textMetrics:e.renderer.measureText({text:i,fontSize:e.stgns.tick.fontSize,fontFamily:e.stgns.tick.fontFamily})}}));return i}(e,o),a=function(e){return Eee(e.layout.dock,e.settings.tick.anchor,{left:{valid:["left","right"],default:"left"},right:{valid:["left","right"],default:"right"},top:{valid:["top","bottom"],default:"top"},bottom:{valid:["top","bottom"],default:"bottom"},default:"right"})}(e.settings);if(void 0===n.text){const e=o.data().fields;n.text=e&&e[0]?e[0].title():""}const s=e.renderer.measureText({text:n.text,fontSize:n.fontSize,fontFamily:n.fontFamily}),l=e.renderer.textBounds({text:n.text,fontSize:n.fontSize,fontFamily:n.fontFamily,maxLines:n.maxLines,maxWidth:n.maxLengthPx,wordBreak:n.wordBreak,hyphens:n.hyphens,lineHeight:n.lineHeight}),c={isVertical:t,nodes:[],title:{anchor:kee(e.settings),textMetrics:s,textBounds:l,requiredWidth:()=>{if(!n.show)return 0;let e=l.width,r=n.maxLengthPx;return t||(e+=n.padding,r+=n.padding),Math.min(e,r,c.rect.width)},requiredHeight:()=>{if(!n.show)return 0;let e=l.height;return t&&(e+=n.padding),Math.min(e,c.rect.height)}},ticks:{values:i,anchor:a,length:Math.min(Math.max(...i.map((e=>e.textMetrics.width))),e.stgns.tick.maxLengthPx),requiredHeight:()=>"top"===a?Math.max(...c.ticks.values.map((e=>e.textMetrics.height)))+e.stgns.tick.padding:0,height:Math.max(...i.map((e=>e.textMetrics.height)))},legend:{fillScale:r,majorScale:o,length:()=>{const n=t?"height":"width",r=t?"requiredHeight":"requiredWidth",o=Math.min(c.rect[n],c.rect[n]*e.stgns.length)-c.title[r]();return Math.max(0,Math.min(o,e.stgns.maxLengthPx))}}};return c}const Aee={require:["chart","settings","renderer"],defaultSettings:{layout:{displayOrder:0,dock:"right"},settings:{size:15,length:.5,maxLengthPx:250,align:.5,justify:0,padding:{left:5,right:5,top:5,bottom:5},tick:{label:null,fill:"#595959",fontSize:"12px",fontFamily:"Arial",maxLengthPx:100,anchor:null,padding:5},title:{show:!0,text:void 0,fill:"#595959",fontSize:"12px",fontFamily:"Arial",maxLengthPx:100,padding:5,maxLines:2,wordBreak:"none",lineHeight:1.2,hyphens:"auto",anchor:null}}},preferredSize(e){const t=this.state;t.rect=Mee(this,e.inner);let n=this.stgns.size;const r=t.isVertical?this.stgns.padding.left+this.stgns.padding.right:this.stgns.padding.top+this.stgns.padding.bottom;n+=r;const o=Math.max(e.inner.width,e.inner.height);if("left"===t.ticks.anchor||"right"===t.ticks.anchor){const e=t.ticks.values.reduce(((e,t)=>e+t.textMetrics.height),0);if(e>this.state.legend.length())return o;n+=t.ticks.length}else{if(t.ticks.length>this.state.legend.length())return o;n+=Math.max(...t.ticks.values.map((e=>e.textMetrics.height)))}return n+=this.stgns.tick.padding,this.stgns.title.show&&(n="left"===t.title.anchor||"right"===t.title.anchor?Math.max(t.title.textBounds.height+r,n):Math.max(n,t.title.requiredWidth()+r)),this.state.preferredSize=n,n},created(){this.stgns=this.settings.settings,this.state=Ree(this)},beforeUpdate(e){this.stgns=e.settings.settings,this.state=Ree(this)},beforeRender(e){if(this.state.nodes=[],this.state.rect=Mee(this,e.size),this.stgns.title.show){const e=function(e){const t=e.state,n=e.stgns,r="left"===t.ticks.anchor,o="top"===t.ticks.anchor;let i=t.rect.x,a=t.rect.y,s="start";"left"===t.title.anchor?(i+=t.title.requiredWidth()-n.title.padding,a+=t.title.textMetrics.height,a+=o?t.rect.height-t.title.textBounds.height:0,s="end"):"right"===t.title.anchor?(i+=t.legend.length(),i+=n.title.padding,a+=t.title.textMetrics.height,a+=o?t.rect.height-t.title.textBounds.height:0):"top"===t.title.anchor&&(i+=r?t.rect.width:0,a+=t.title.textMetrics.height,s=r?"end":"start");const l={tag:"legend-title",type:"text",x:i,y:Math.min(a,t.rect.y+t.rect.height),text:n.title.text,fill:n.title.fill,fontSize:n.title.fontSize,fontFamily:n.title.fontFamily,maxWidth:n.title.maxLengthPx,maxLines:n.title.maxLines,wordBreak:n.title.wordBreak,hyphens:n.title.hyphens,lineHeight:n.title.lineHeight,anchor:s,title:n.title.text};return Cee(e,l),l}(this);this.state.nodes.push(e)}const t=function(e){const t=e.state.legend.fillScale,n=e.state.legend.majorScale,r=t.domain().map((e=>({type:"stop",color:t(e),offset:Math.min(1,Math.max(0,n.norm(e)))})));return r.sort(((e,t)=>e.offset-t.offset))}(this),n=function(e,t){const n=e.state,r=e.stgns,o=n.rect;let i=o.x,a=o.y,s=n.isVertical?r.size:n.legend.length(),l=n.isVertical?n.legend.length():r.size;"left"===n.ticks.anchor?i+=n.rect.width-r.size:"top"===n.ticks.anchor&&(a+=n.rect.height-r.size),"top"===n.title.anchor?a+=n.title.requiredHeight():"left"===n.title.anchor&&(i+=n.title.requiredWidth());const c={type:"rect",x:i,y:a,width:s,height:l,fill:{type:"gradient",stops:t,degree:n.isVertical?90:180}};return Cee(e,c),c}(this,t),r=function(e,t){const n=e.state,r=e.stgns;let o="start";const i={type:"rect",x:t.x,y:t.y,width:n.isVertical?0:t.width,height:n.isVertical?t.height:0,fill:"transparent"},a=n.ticks.values.map((a=>{let s=0,l=0,c=0,u="alphabetical";return n.isVertical?(l=t.y+t.height*a.pos,u=0===a.pos?"text-before-edge":"text-after-edge"):s=t.x+t.width*a.pos,"right"===n.ticks.anchor?(s=t.x+r.size+r.tick.padding,i.x=t.x+t.width):"left"===n.ticks.anchor?(s=t.x-r.tick.padding,o="end"):"top"===n.ticks.anchor?(l=t.y-r.tick.padding,c-=.25*a.textMetrics.height,o=0===a.pos?"start":"end"):"bottom"===n.ticks.anchor&&(l=t.y+t.height+r.tick.padding,c=.8*a.textMetrics.height,o=0===a.pos?"start":"end",i.y=t.y+t.height),{type:"text",x:s,y:l,dx:0,dy:c,text:a.label,fontSize:r.tick.fontSize,fontFamily:r.tick.fontFamily,fill:r.tick.fill,maxWidth:n.isVertical?r.tick.maxLengthPx:Math.min(r.tick.maxLengthPx,n.legend.length()/2),anchor:o,textBoundsFn:e.renderer.textBounds,title:a.label,baseline:u}}));return{type:"container",id:"legend-seq-ticks",children:[...a,i]}}(this,n),o={id:"legend-seq-target",type:"container",children:[n,r]};this.state.nodes.push(o)},render(){return this.state.nodes}};const Iee={coordinates:{minor:.5,major:.5,layerId:0,defined:!0},layers:{curve:"linear",show:!0,line:{stroke:"#ccc",strokeWidth:1,strokeLinejoin:"miter",strokeDasharray:void 0,opacity:1,show:!0,showMinor0:!0},area:{fill:"#ccc",opacity:.8,show:!0}}};function Pee(e,t){let{generatorType:n,item:r,data:o,major:i,minor:a,layerObj:s,stngs:l}=t,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const u={type:"path",points:e,generatorType:n,major:i,minor:a,layerObj:s,stngs:l,opacity:r.opacity,stroke:r.stroke,strokeWidth:r.strokeWidth,strokeLinejoin:r.strokeLinejoin,fill:c||r.fill,data:o};return r.strokeDasharray&&(u.strokeDasharray=r.strokeDasharray),u}function Oee(e){const{metaLayers:t,coordinates:n,layers:r,lines:o,areas:i}=function(e){let{data:t,stngs:n,rect:r,resolver:o,style:i,domain:a}=e;const{width:s,height:l}=r,c=o.resolve({data:t,defaults:Iee.coordinates,settings:n.coordinates||{},scaled:{major:"vertical"===n.orientation?l:s,minor:"vertical"===n.orientation?s:l}}),u=!n.connect&&a.length>2&&("function"==typeof n.coordinates.layerId||"object"==typeof n.coordinates.layerId),d={};let p=0;for(let e=0;e<c.items.length;e++){let t=c.items[e],n=t.layerId;if(u){const e=d[n]?d[n].items[d[n].items.length-1]:null,r=e?a.indexOf(e.data.major?e.data.major.value:e.data.value):null;e&&a.indexOf(t.data.major?t.data.major.value:t.data.value)-1!==r&&d[n].items.push({dummy:!0})}d[n]=d[n]||{order:p++,id:n,items:[],dataItems:[],consumableData:{}},d[n].dataItems.push(t.data),d[n].items.push(t)}const h=Object.keys(d).map((e=>(d[e].consumableData=JZ({points:d[e].dataItems},d[e].dataItems[0]),d[e]))),f={items:h.map((e=>e.consumableData))},m=n.layers||{};return{coordinates:c,metaLayers:h,layers:o.resolve({data:f,defaults:{curve:Iee.layers.curve,show:Iee.layers.show},settings:{curve:m.curve,show:m.show}}),lines:o.resolve({data:f,defaults:UZ({},Iee.layers.line,i.line),settings:m.line}),areas:o.resolve({data:f,defaults:UZ({},Iee.layers.area,i.area),settings:m.area})}}(e),a=[];return t.forEach(((t,s)=>{const l=r.items[s];if(!1===l.show)return;l.datum=l.data,l.data=[],l.id=t.id;const c=[],u=[];let d,p;for(let r=0;r<t.items.length;r++){if(d=t.items[r],p=d.data,!d.dummy){if(isNaN(d.major))continue;e.missingMinor0&&(d.minor0=n.settings.minor.scale?n.settings.minor.scale(p.minor0?p.minor0.value:0):0),isNaN(d.minor)||c.push(d.minor),l.data.push(d.data)}u.push(d)}const h=c.sort(((e,t)=>e-t))[Math.floor((c.length-1)/2)];a.push({layerObj:l,lineObj:o.items[s],areaObj:i.items[s],median:h,points:u,consumableData:t.consumableData})})),a}const Lee={require:["chart","resolver"],defaultSettings:{style:{area:"$shape",line:"$shape-outline"}},created(){},render(e){let{data:t}=e;const{width:n,height:r}=this.rect;this.stngs=this.settings.settings||{};const o=!this.stngs.coordinates||void 0===this.stngs.coordinates.minor0,i=Oee({data:t,stngs:this.stngs,rect:this.rect,resolver:this.resolver,style:this.style,missingMinor0:o,domain:this.stngs.coordinates&&this.stngs.coordinates.major&&this.stngs.coordinates.major.scale?this.chart.scale(this.stngs.coordinates.major.scale).domain():[]});if(this.stngs.layers&&this.stngs.layers.sort){const e=i.map((e=>({id:e.layerObj.id,data:e.layerObj.data}))).sort(this.stngs.layers.sort).map((e=>e.id));i.sort(((t,n)=>e.indexOf(t.layerObj.id)-e.indexOf(n.layerObj.id)))}else i.sort(((e,t)=>e.median-t.median));return function(e,t){let{width:n,height:r,missingMinor0:o,stngs:i}=t;const a=[],s=i.layers||{};return e.forEach((e=>{const{lineObj:t,layerObj:l,areaObj:c,points:u}=e;let d={size:r,p:"y"},p={size:n,p:"x"};if("vertical"===i.orientation){const e=UZ(!0,{},p);p=UZ(!0,{},d),d=UZ(!0,{},e)}s.area&&!1!==c.show&&a.push(Pee(u,{data:e.consumableData,item:c,generatorType:"area",major:p,minor:d,layerObj:l,stngs:i})),t&&!1!==t.show&&(a.push(Pee(u,{data:e.consumableData,item:t,generatorType:"line".concat(d.p.toUpperCase(),"1"),major:p,minor:d,layerObj:l,stngs:i},"none")),!o&&s.area&&!1!==c.show&&!1!==t.showMinor0&&a.push(Pee(u,{data:e.consumableData,item:t,generatorType:"line".concat(d.p.toUpperCase(),"0"),major:p,minor:d,layerObj:l,stngs:i},"none")))})),a}(i,{width:n,height:r,missingMinor0:o,stngs:this.stngs})}};function Dee(e,t){let n,r,o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];"object"==typeof t.center?(n=t.center.x,r=t.center.y):(n=t.clientX,r=t.clientY);const i=n-e.state.boundingRect.left,a=r-e.state.boundingRect.top;return{x:o?Math.max(0,Math.min(i,e.rect.width)):i,y:o?Math.max(0,Math.min(a,e.rect.height)):a}}function Tee(e,t){return{x:t.x+e.rect.x,y:t.y+e.rect.y}}function zee(e,t){const n=Math.min(e.x,t.x),r=Math.min(e.y,t.y);return{x:n,y:r,width:Math.max(e.x,t.x)-n,height:Math.max(e.y,t.y)-r}}const jee={require:["chart","renderer"],defaultSettings:{layout:{displayOrder:99},settings:{brush:{components:[]}},style:{area:"$selection-area-target"}},on:{areaStart(e){this.start(e)},areaMove(e){this.move(e)},areaEnd(e){this.end(e)},areaCancel(){this.cancel()}},created(){this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1}},preferredSize:()=>0,render(){},start(e){this.state.boundingRect=this.renderer.element().getBoundingClientRect();const t=Dee(this,e,!1);h4({x:0,y:0,width:this.rect.width,height:this.rect.height},t)&&(this.state.brushConfig=function(e){return e.settings.brush.components.map((e=>({key:e.key,contexts:e.contexts,data:e.data,action:e.action||"set"})))}(this.settings),this.state.start=Dee(this,e),this.state.active=!0)},move(e){var t;this.state.active&&(this.state.end=Dee(this,e),function(e){if(e.state.active){const t=Tee(e,e.state.start),n=Tee(e,e.state.end),r=e.chart.shapesAt(zee(t,n),{components:e.state.brushConfig});e.chart.brushFromShapes(r,{components:e.state.brushConfig})}}(this),(t=this).renderer.render([UZ({type:"rect"},zee(t.state.start,t.state.end),t.style.area)]))},end(){this.state.active&&(this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1},this.renderer.render([]))},cancel(){var e,t;this.state.active&&(e=this.state,t=this.chart,e.brushConfig.forEach((e=>{Array.isArray(e.contexts)&&e.contexts.forEach((e=>{t.brush(e).end()}))})),this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1},this.renderer.render([]))}};function Nee(e,t,n){let{renderer:r,style:o,props:i,h:a}=n;const s=function(e,t){return{tooltip:"function"==typeof e.tooltipClass?e.tooltipClass({dock:t.dock}):e.tooltipClass,content:"function"==typeof e.contentClass?e.contentClass({dock:t.dock}):e.contentClass,arrow:"function"==typeof e.arrowClass?e.arrowClass({dock:t.dock}):e.arrowClass}}(i,t),l=function(e,t,n,r){return r.content({h:e,style:n,data:t})}(a,e,o,i),c=a("div",{dir:i.direction,class:mee(UZ({"pic-tooltip":!0},s.tooltip)),style:UZ({position:"relative",display:"inline-block"},t.computedTooltipStyle)},a("div",{style:o.content,class:mee(UZ({"pic-tooltip-content":!0},s.content))},l),a("div",{class:mee(UZ({"pic-tooltip-arrow":!0},s.arrow)),style:UZ({},o.arrow,o["arrow-".concat(t.dock)],t.computedArrowStyle)}));return r.render(c),r.element().children[0]}function qee(e){let{defaultDuration:t,defaultDelay:n}=e,r=null,o=null,i=!1;const a=function(){const e=function(){},t={pending:[],debounced:[],active:[],cancelled:[],rejected:[],fulfilled:[]};let n;return e.set=e=>{n=e,t[n].forEach((t=>t(e)))},e.on=(e,n)=>{Array.isArray(e)?e.forEach((e=>t[e].push(n))):t[e].push(n)},e.destroy=()=>{Object.keys(t).forEach((e=>{t[e].length=0}))},e}(),s=function(){},l=()=>{r=null,o=null,i=!1,a.set("fulfilled")};return s.invoke=function(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n;r&&(clearTimeout(r),a.set("debounced")),a.set("pending"),r=setTimeout((()=>{e(),i=!0,r=null,a.set("active")}),c),s>0&&(o&&clearTimeout(o),o=setTimeout(l,s+Math.max(c,0)))},s.clear=()=>{i?a.set("cancelled"):r&&(clearTimeout(r),a.set("rejected")),o&&clearTimeout(o),r=null,o=null,i=!1},s.on=(e,t)=>{a.on(e,t)},s.destroy=()=>{s.clear(),a.destroy()},s}function Fee(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return{left:"translate(-100%,-50%) translateX(".concat(-e,"px)"),right:"translate(".concat(e,"px, -50%)"),top:"translate(-50%, -100%) translateY(".concat(-e,"px)"),bottom:"translate(-50%, ".concat(e,"px)"),inside:"translate(-50%, -50%)"}}function Wee(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return{left:{x:-e-n,y:-t/2},right:{x:n,y:-t/2},top:{x:-e/2,y:-t-n},bottom:{x:-e/2,y:n},inside:{x:-e/2,y:-t/2}}}function Bee(e,t){const n=e>0?"-":"+";return e=Math.abs(e),void 0===t&&(t=e),{left:{left:"100%",top:"calc(50% ".concat(n," ").concat(e,"px)"),borderWidth:"".concat(t,"px")},right:{left:"".concat(2*-e,"px"),top:"calc(50% ".concat(n," ").concat(e,"px)"),borderWidth:"".concat(t,"px")},top:{left:"calc(50% ".concat(n," ").concat(e,"px)"),top:"100%",borderWidth:"".concat(t,"px")},bottom:{left:"calc(50% ".concat(n," ").concat(e,"px)"),top:"".concat(2*-e,"px"),borderWidth:"".concat(t,"px")},inside:{left:"0px",top:"0px",borderWidth:"0px"}}}function $ee(e,t,n,r,o,i){const a=t+i.x,s=n+i.y,l=o;return!(a<0||s<0)&&!(a+r>e.width||s+l>e.height)}function Hee(e){let{area:t,vx:n,vy:r,width:o,height:i,offset:a}=e;const s=n+a.x,l=r+a.y,c=o,u=i;let d=s<0?-s:0,p=l<0?-l:0;return d+=s+c>t.width?-(s+c-t.width):0,p+=l+u>t.height?-(l+u-t.height):0,{x:d,y:p}}function Vee(e){let{options:t,pointer:n,width:r,height:o,dockOrder:i,x:a,y:s}=e;const{targetBounds:l}=n,c=Fee(t.offset),u=c[t.dock];if(u)return{computedTooltipStyle:{left:"".concat(a,"px"),top:"".concat(s,"px"),transform:u},computedArrowStyle:Bee(t.offset)[t.dock],dock:t.dock};const d={width:"target"===t.area?l.width:window.innerWidth,height:"target"===t.area?l.height:window.innerHeight},p=Wee(r,o,t.offset),h=[],f="target"===t.area?a:l.left+a,m="target"===t.area?s:l.top+s;for(let e=0;e<i.length;e+=1){const n=i[e],l=Hee({area:d,vx:f,vy:m,width:r,height:o,offset:p[n]}),u={left:"".concat(a,"px"),top:"".concat(s,"px"),transform:c[n]},g=Bee(t.offset)[n];0!==l.x&&(u.width="".concat(r-20-Math.abs(l.x),"px"),"top"!==n&&"bottom"!==n||(u.left="".concat(a+l.x,"px"),g.left="calc(50% ".concat(l.x>0?"-":"+"," ").concat(Math.abs(l.x),"px)")));const y={computedTooltipStyle:u,computedArrowStyle:g,dock:n,rect:{width:r,height:o}};if(0===l.x&&0===l.y)return y;y.offset=l,h.push(y)}return h.sort(((e,t)=>Math.abs(e.offset.x)-Math.abs(t.offset.x))),h[0]}function Gee(e,t,n){const r=e.key?n.component(e.key):n.componentsFromPoint({x:t.clientX,y:t.clientY})[0];if(!r)return{x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1}};const o=r.rect;return UZ({scaleRatio:o.scaleRatio},o.computedInner)}const Uee={bounds:function(e){let{resources:t,nodes:n,pointer:r,width:o,height:i,options:a}=e;const{targetBounds:s}=r,{x:l,y:c,width:u,height:d}=t.getNodeBoundsRelativeToTarget(n[0]),p={left:{x:l,y:c+d/2},right:{x:l+u,y:c+d/2},top:{x:l+u/2,y:c},bottom:{x:l+u/2,y:c+d},inside:{x:l+u/2,y:c+d/2}},h=Fee(a.offset),f=h[a.dock];if(f)return{computedTooltipStyle:{left:"".concat(p[a.dock].x,"px"),top:"".concat(p[a.dock].y,"px"),transform:f},computedArrowStyle:Bee(a.offset)[a.dock],dock:a.dock};const m={width:"target"===a.area?s.width:window.innerWidth,height:"target"===a.area?s.height:window.innerHeight},g=Wee(o,i,a.offset),y=["top","left","right","bottom","inside"];for(let e=0;e<y.length;e+=1){const t=y[e];if($ee(m,"target"===a.area?p[t].x:s.left+p[t].x,"target"===a.area?p[t].y:s.top+p[t].y,o,i,g[t]))return{computedTooltipStyle:{left:"".concat(p[t].x,"px"),top:"".concat(p[t].y,"px"),transform:h[t]},computedArrowStyle:Bee(a.offset)[t],dock:t}}const _=function(e){let{options:t,docks:n,dockOffsets:r,targetBounds:o,area:i,width:a}=e;const s="top",l="target"===t.area?n[s].x:o.left+n[s].x,c=("target"===t.area?n[s].y:(o.top,n[s].y),r[s]),u=l+c.x,d=(c.y,a);let p=n.top.x;return u<0&&u+d>i.width||(u<0?p-=u:u+d>i.width&&(p-=u+d-i.width)),p}({options:a,docks:p,dockOffsets:g,targetBounds:s,area:m,width:o});return{computedTooltipStyle:{left:"".concat(_,"px"),top:"".concat(p.top.y,"px"),transform:h.top},computedArrowStyle:Bee(a.offset+_-p.top.x,a.offset).top,dock:"top"}},pointer:function(e){let{options:t,pointer:n,width:r,height:o}=e;const{x:i,y:a}=n;return Vee({x:i,y:a,pointer:n,width:r,height:o,options:t,dockOrder:["top","left","right","bottom"]})},slice:function(e){let{options:t,pointer:n,width:r,height:o,nodes:i,resources:a}=e;const s=i[0],{dx:l,dy:c}=n,u=a.getComponentBoundsFromNode(s),d=l+u.x+u.width/2,p=c+u.y+u.height/2,{start:h,end:f,outerRadius:m}=s.desc.slice,g=(h+f)/2-Math.PI/2,y=2*Math.PI,_=(g%y+y)%y;let b=["top","left","right","bottom"];return"auto"===t.dock&&(b=_<=Math.PI/4||_>=7*Math.PI/4?["right","top","bottom","left"]:_<=3*Math.PI/4?["bottom","left","right","top"]:_<=5*Math.PI/4?["left","top","bottom","right"]:["top","left","right","bottom"]),Vee({x:d+m*u.scaleRatio.x*Math.cos(_),y:p+m*u.scaleRatio.y*Math.sin(_),pointer:n,width:r,height:o,options:t,dockOrder:b})}};function Yee(e,t){let{width:n,height:r}=e,{chart:o,state:i,props:a}=t;const s={resources:{formatter:o.formatter,scale:o.scale,component:o.component,getComponentBoundsFromNode:e=>Gee(e,i.pointer,o),getNodeBoundsRelativeToTarget:e=>function(e,t,n){const r=Gee(e,t,n),o=e.bounds;return{x:r.x+t.dx+o.x,y:r.y+t.dy+o.y,width:o.width,height:o.height}}(e,i.pointer,o)},nodes:i.activeNodes,pointer:i.pointer,width:n,height:r},l=typeof a.placement;if("object"===l&&"function"==typeof a.placement.fn)return a.placement.fn(s);let c={type:"pointer",offset:8,dock:"auto",area:"viewport"};"function"===l&&(c=UZ(c,a.placement(s))),"object"===l&&Uee[a.placement.type]?c=UZ(c,a.placement):"string"===l&&Uee[a.placement]&&(c=UZ(c,{type:a.placement})),s.options=c;const u=Uee[c.type](s);let{x:d,y:p,width:h,height:f}=s.resources.getComponentBoundsFromNode(s.nodes[0]);return d+=s.pointer.dx,h+=d,p+=s.pointer.dy,f+=p,u.computedTooltipStyle.left="".concat(Math.min(Math.max(0,d,parseFloat(u.computedTooltipStyle.left)),h),"px"),u.computedTooltipStyle.top="".concat(Math.min(Math.max(0,p,parseFloat(u.computedTooltipStyle.top)),f),"px"),u}let Kee;function Xee(){Kee=null}const Jee={duration:8e3,delay:500,filter:e=>e.filter((e=>e.data&&void 0!==e.data.value)),extract:e=>e.node.data.value,content:e=>{let{h:t,data:n}=e;return n.map((e=>t("div",{},e)))},isEqual:(e,t)=>e.length&&e.length===t.length&&e.every(((e,n)=>t[n]&&JSON.stringify(e.data)===JSON.stringify(t[n].data))),placement:{type:"pointer",dock:"auto",offset:8,area:"viewport"},tooltipClass:{},contentClass:{},arrowClass:{},direction:"ltr",appendTo:void 0,beforeShow:void 0,afterShow:void 0,beforeHide:void 0,onHide:void 0,afterHide:void 0};const Zee={require:["chart","renderer"],defaultSettings:{settings:Jee,style:{tooltip:{},content:{backgroundColor:"$gray-25",color:"$font-color--inverted",fontFamily:"$font-family",fontSize:"$font-size",lineHeight:"$line-height",borderRadius:"4px",padding:"8px",opacity:.9},arrow:{position:"absolute",width:"0px",height:"0px",borderStyle:"solid",color:"$gray-25",opacity:.9},"arrow-bottom":{borderTopColor:"transparent",borderLeftColor:"transparent",borderRightColor:"transparent"},"arrow-top":{borderBottomColor:"transparent",borderLeftColor:"transparent",borderRightColor:"transparent"},"arrow-right":{borderTopColor:"transparent",borderLeftColor:"transparent",borderBottomColor:"transparent"},"arrow-left":{borderTopColor:"transparent",borderBottomColor:"transparent",borderRightColor:"transparent"}}},renderer:"dom",on:{hide(){this.hide()},show(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.show(e,t)},prevent(e){this.prevent(e)}},hide(){this.dispatcher.clear(),this.state.activeNodes=[],this.state.pointer={}},show(e){let t,{nodes:n,duration:r,delay:o}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!this.state.prevent&&this.state.targetElement&&(this.state.pointer=function(e,t){let{chart:n,state:r}=t,o=0,i=0;e.center?(o+=e.center.x,i+=e.center.y):(o+=e.clientX,i+=e.clientY);const a=n.element.getBoundingClientRect(),s=r.targetElement.getBoundingClientRect(),l=o,c=i,u=a.left-s.left,d=a.top-s.top,p=o-a.left,h=i-a.top;return o-=s.left,i-=s.top,{x:o,y:i,dx:u,dy:d,cx:p,cy:h,clientX:l,clientY:c,targetBounds:s,chartBounds:a}}(e,this),t=Array.isArray(n)?this.props.filter(n):this.props.filter(this.chart.shapesAt({x:this.state.pointer.cx,y:this.state.pointer.cy})),this.props.isEqual(this.state.activeNodes,t)||(this.dispatcher.clear(),this.state.activeNodes=t,this.state.activeNodes.length&&this.dispatcher.invoke((()=>this.invokeRenderer(this.state.activeNodes)),r,o)))},prevent(e){this.state.prevent=!!e},init(e){this.state={activeNodes:[],pointer:{},targetElement:null,prevent:!1},this.props=e.settings,this.dispatcher=qee({defaultDuration:this.props.duration,defaultDelay:this.props.delay});const t=this.dispatcher.clear;this.dispatcher.on("pending",(()=>{!function(e){Kee&&Kee!==e&&Kee()}(t),Kee=t,"function"==typeof this.props.beforeShow&&this.props.beforeShow.call(void 0,{resources:{formatter:this.chart.formatter,scale:this.chart.scale}})})),this.dispatcher.on(["cancelled","fulfilled"],(()=>{const e={resources:{formatter:this.chart.formatter,scale:this.chart.scale}};"function"==typeof this.props.beforeHide&&this.props.beforeHide.call(void 0,UZ({element:this.state.tooltipElm},e)),"function"==typeof this.props.onHide?this.props.onHide.call(void 0,UZ({element:this.state.tooltipElm},e)):this.renderer.clear([]),"function"==typeof this.props.afterHide&&this.props.afterHide.call(void 0,e),Kee===t&&(Kee=null),this.state.tooltipElm=void 0})),this.dispatcher.on("active",(()=>{"function"==typeof this.props.afterShow&&this.props.afterShow.call(void 0,{element:this.state.tooltipElm,resources:{formatter:this.chart.formatter,scale:this.chart.scale}})}))},created(){this.init(this.settings)},beforeUpdate(e){let{settings:t}=e;this.dispatcher&&(this.dispatcher.destroy(),Xee()),this.init(t)},render(e){return this.h=e,[]},beforeDestroy(){this.dispatcher.destroy(),Xee()},appendTo(){if(this.props.appendTo){this.state.targetElement="function"==typeof this.props.appendTo?this.props.appendTo({resources:{formatter:this.chart.formatter,scale:this.chart.scale}}):this.props.appendTo;const{width:e,height:t}=this.state.targetElement.getBoundingClientRect();this.renderer.destroy(),this.renderer.size({width:e,height:t}),this.renderer.appendTo(this.state.targetElement)}else this.state.targetElement=this.renderer.element()},mounted(){this.appendTo()},updated(){this.appendTo()},invokeRenderer(e){const t=function(e,t){let{chart:n,scale:r,props:o,h:i}=t;const a={resources:{dataset:n.dataset,scale:n.scale,formatter:n.formatter},scale:r,h:i},s=[];return e.forEach((e=>{if("function"==typeof o.extract){const t=UZ({node:e},a);s.push(o.extract(t))}})),s}(e,this),n=Yee(Nee(t,{},this).getBoundingClientRect(),this);this.state.tooltipElm=Nee(t,n,this)}};const Qee={require:["renderer","chart"],defaultSettings:{settings:{target:"",selector:"*",fill:"rgba(0, 255, 0, 0.1)",stroke:"lime",opacity:1,useOuterRect:!1}},on:{update(){this.draw()}},draw(){const e=this.chart.findShapes(this.props.selector).filter((e=>e.key===this.props.target)),t=e.filter((e=>e.collider)).map((e=>e.collider));t.forEach((e=>{e.fill=this.props.fill,e.stroke=this.props.stroke,e.opacity=this.props.opacity,e.collider={type:null}})),this.renderer.render(t)},created(){this.props=this.settings.settings},resize(e){let{outer:t,inner:n}=e;return this.props.useOuterRect?t:n},render(){},mounted(){this.draw()},updated(){this.props=this.settings.settings,this.draw()}};var ete={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},tte=/([astvzqmhlc])([^astvzqmhlc]*)/gi,nte=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function rte(e){const t=[],n=String(e).trim();return"M"!==n[0]&&"m"!==n[0]||n.replace(tte,((e,n,r)=>{const o=function(e){const t=e.match(nte);return t?t.map(Number):[]}(r);let i=n.toLowerCase(),a=n;if("m"===i&&o.length>2&&(t.push([a,...o.splice(0,2)]),i="l",a="m"===a?"l":"L"),o.length<ete[i])return"";for(t.push([a,...o.splice(0,ete[i])]);o.length>=ete[i]&&o.length&&ete[i];)t.push([a,...o.splice(0,ete[i])]);return""})),t}const ote=2*Math.PI;function ite(e,t){return{x:.5*(e.x+t.x),y:.5*(e.y+t.y)}}function ate(e,t,n,r,o){const i=1-e;return i**3*t+3*i**2*e*n+3*i*e**2*r+e**3*o}function ste(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:8;if(i<1||function(e,t,n,r){return Math.abs(e.x+n.x-(t.x+t.x))+Math.abs(e.y+n.y-(t.y+t.y))+Math.abs(t.x+r.x-(n.x+n.x))+Math.abs(t.y+r.y-(n.y+n.y))}(e,t,n,r)<=10)return o[o.length-1]!==e&&o.push(e),o.push(r),o;const a=ite(e,t),s=ite(t,n),l=ite(n,r),c={x:ate(.5,e.x,t.x,n.x,r.x),y:ate(.5,e.y,t.y,n.y,r.y)},u=ite(a,s),d=ite(s,l);return ste(e,a,u,c,o,i-1),ste(c,d,l,r,o,i-1),o}function lte(e,t,n){const{cp1:r,cp2:o}=function(e,t,n){return{cp1:{x:e.x+2/3*(t.x-e.x),y:e.y+2/3*(t.y-e.y)},cp2:{x:n.x+2/3*(t.x-n.x),y:n.y+2/3*(t.y-n.y)}}}(e,t,n);return ste(e,r,o,n)}function cte(e,t,n){const r=[],o=!!e[4],i=!!e[5],a=e[3];let s,l,c,u,d=e[6],p=e[7],h=e[1],f=e[2];if("a"===e[0]&&(d+=t,p+=n),t===p&&n===p)return r;if(!h||!f)return r.push({x:d,y:p}),r;({cx:s,cy:l,rx:h,ry:f,sweepAngle:c,startAngle:u}=function(e,t,n,r,o,i,a,s,l){let c,u,d,p,h,f;const m=R6(n%360),g=Math.cos(m),y=Math.sin(m),_=(s-i)/2,b=(l-a)/2,x=g*_+y*b,v=g*b-y*_;f=x**2/(e=Math.abs(e))**2+v**2/(t=Math.abs(t))**2,f>1&&(f=Math.sqrt(f),e*=f,t*=f);const w=e*v,S=t*x,C=w**2+S**2,E=(e*t)**2-C;let k=Math.sqrt(Math.max(E/C,0));r===o&&(k=-k);const M=k*(w/t),R=k*(-S/e);p=g*M-y*R+(s+i)/2,h=y*M+g*R+(l+a)/2;const A=(x-M)/e,I=(v-R)/t,P=(-x-M)/e,O=(-v-R)/t;return c=Math.atan2(I,A),c+=c<0?ote:0,u=Math.atan2(O,P),u+=u<0?ote:0,d=u-c,!o&&c<u?d-=ote:o&&u<c&&(d+=ote),d%=ote,{startAngle:c,sweepAngle:d,cx:p,cy:h,rx:e,ry:t}}(h,f,a,o,i,d,p,t,n));const m=Math.abs(c*Math.sqrt((h**2+f**2)/2)),g=Math.ceil(m/10),y=c/g;for(let e=1;e<=g;e++){const t=(u+y*e)%ote,n=Math.cos(t),o=Math.sin(t);r.push({x:s+n*h+-o*n,y:l+o*f+n*o})}return r}function ute(e){const t=rte(e),n=[],r=[];let o=0,i=0,a=null,s=null,l=null,c=null;for(let e=0;e<t.length;++e){const u=t[e],d=u[0];switch("S"!==d&&"s"!==d&&"C"!==d&&"c"!==d&&(a=null,s=null),"T"!==d&&"t"!==d&&"Q"!==d&&"q"!==d&&(l=null,c=null),d){case"m":r.length&&n.push(r.splice(0));case"l":o+=u[1],i+=u[2],r.push({x:o,y:i});break;case"M":r.length&&n.push(r.splice(0));case"L":o=u[1],i=u[2],r.push({x:o,y:i});break;case"H":o=u[1],r.push({x:o,y:i});break;case"h":o+=u[1],r.push({x:o,y:i});break;case"V":i=u[1],r.push({x:o,y:i});break;case"v":i+=u[1],r.push({x:o,y:i});break;case"a":r.push(...cte(u,o,i)),o+=u[6],i+=u[7];break;case"A":r.push(...cte(u,o,i)),o=u[6],i=u[7];break;case"c":r.push(...ste({x:o,y:i},{x:u[1]+o,y:u[2]+i},{x:u[3]+o,y:u[4]+i},{x:u[5]+o,y:u[6]+i})),a=u[3]+o,s=u[4]+i,o+=u[5],i+=u[6];break;case"C":r.push(...ste({x:o,y:i},{x:u[1],y:u[2]},{x:u[3],y:u[4]},{x:u[5],y:u[6]})),a=u[3],s=u[4],o=u[5],i=u[6];break;case"s":null!==a&&null!==a||(a=o,s=i),r.push(...ste({x:o,y:i},{x:2*o-a,y:2*i-s},{x:u[1]+o,y:u[2]+i},{x:u[3]+o,y:u[4]+i})),a=u[1]+o,s=u[2]+i,o+=u[3],i+=u[4];break;case"S":null!==a&&null!==a||(a=o,s=i),r.push(...ste({x:o,y:i},{x:2*o-a,y:2*i-s},{x:u[1],y:u[2]},{x:u[3],y:u[4]})),a=u[1],s=u[2],o=u[3],i=u[4];break;case"Q":r.push(...lte({x:o,y:i},{x:u[1],y:u[2]},{x:u[3],y:u[4]})),l=u[1],c=u[2],o=u[3],i=u[4];break;case"q":r.push(...lte({x:o,y:i},{x:u[1]+o,y:u[2]+i},{x:u[3]+o,y:u[4]+i})),l=u[1]+o,c=u[2]+i,o+=u[3],i+=u[4];break;case"T":null!==l&&null!==l||(l=o,c=i),l=2*o-l,c=2*i-c,r.push(...lte({x:o,y:i},{x:l,y:c},{x:u[1],y:u[2]})),o=u[1],i=u[2];break;case"t":null!==l&&null!==l||(l=o,c=i),l=2*o-l,c=2*i-c,r.push(...lte({x:o,y:i},{x:l,y:c},{x:u[1]+o,y:u[2]+i})),o+=u[1],i+=u[2];break;case"z":case"Z":r.length&&r.push({x:r[0].x,y:r[0].y})}}return function(e){for(let t=0;t<e.length-1;t++){const n=e[t],r=e[t+1];Math.abs(n.x-r.x)<1e-12&&Math.abs(n.y-r.y)<1e-12&&(e.splice(t,1),t--)}}(r),n.push(r.splice(0)),n}const dte={require:["renderer","chart"],defaultSettings:{settings:{target:"",fill:"transparent",stroke:"lime",opacity:1,radius:2,useOuterRect:!1}},on:{update(){this.draw()}},draw(){const e=this.chart.findShapes("path").filter((e=>e.key===this.props.target)),t=[];e.forEach((e=>{ute(e.attrs.d).forEach((e=>{e.forEach((e=>{t.push({type:"circle",cx:e.x,cy:e.y,r:this.props.radius,fill:this.props.fill,stroke:this.props.stroke,opacity:this.props.opacity,collider:{type:null}})}))}))})),this.renderer.render(t)},created(){this.props=this.settings.settings},resize(e){let{outer:t,inner:n}=e;return this.props.useOuterRect?t:n},render(){},mounted(){this.draw()},updated(){this.props=this.settings.settings,this.draw()}};var pte=[function(e){e.component("box",h8),e.component("box-marker",h8)},function(e){e.component("point",x8),e.component("point-marker",x8)},function(e){e.component("pie",C8)},function(e){e.component("grid-line",A8)},function(e){e.component("ref-line",F8)},function(e){e.component("axis",m7)},function(e){e.component("container",g7)},function(e){e.component("text",b7)},function(e){e.component("scrollbar",w7)},function(e){e.component("brush-range",j7),e.component("brush-area-dir",W7)},function(e){e.component("range",V7)},function(e){e.component("brush-lasso",J7)},function(e){e.component("labels",uee)},function(e){e.component("legend-cat",See)},function(e){e.component("legend-seq",Aee)},function(e){e.component("line",Lee)},function(e){e.component("brush-area",jee)},function(e){e.component("tooltip",Zee)},function(e){e.component("debug-collider",Qee)},function(e){e.component("debug-path-to-points",dte)}];let hte=class{constructor(e){this._parent=null,this._children=[],this._ancestors=null,this.type=e,this.data=null}detach(){return this._parent&&this._parent.removeChild(this),this}get parent(){return this._parent}get isBranch(){return this._children&&this._children.length}get children(){return this._children}get ancestors(){return this._ancestors||(this._ancestors=[],this.parent&&this._ancestors.push(this.parent,...this.parent.ancestors)),this._ancestors}get descendants(){let e=[];const t=this.children.length;let n,r;for(n=0;n<t;n++)r=this.children[n],e.push(r),r.children.length&&(e=[...e,...r.descendants]);return e}equals(e){const t=this.children,n=e.children;if(t.length!==n.length)return!1;for(let e=0;e<t.length;e++)if(!t[e].equals(n[e]))return!1;return!0}toJSON(){return{type:this.type,children:this.children.map((e=>e.toJSON()))}}};class fte{constructor(){let{x:e=0,y:t=0,width:n=0,height:r=0,minWidth:o=0,minHeight:i=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({x:e,y:t,width:n,height:r,minWidth:o,minHeight:i})}set(){let{x:e=0,y:t=0,width:n=0,height:r=0,minWidth:o=0,minHeight:i=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.type="rect",n>=0?(this.x=e,this.width=Math.max(n,o)):(this.x=e+Math.min(n,-o),this.width=-Math.min(n,-o)),r>=0?(this.y=t,this.height=Math.max(r,i)):(this.y=t+Math.min(r,-i),this.height=-Math.min(r,-i))}containsPoint(e){return h4(this,e)}intersectsLine(e){return f4(this,iQ(e))}intersectsRect(e){return d4(this,oQ(e))}intersectsCircle(e){return i4(e,this)}intersectsPolygon(e){return u4(e,this)}intersectsGeoPolygon(e){return w4(e,this)}points(){return[{x:this.x,y:this.y},{x:this.x+this.width,y:this.y},{x:this.x+this.width,y:this.y+this.height},{x:this.x,y:this.y+this.height}]}}class mte{constructor(){let{cx:e=0,cy:t=0,r:n=0,minRadius:r=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({cx:e,cy:t,r:n,minRadius:r})}set(){let{cx:e=0,cy:t=0,r:n=0,minRadius:r=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.type="circle",this.cx=e,this.cy=t,this.r=Math.max(n,r),this.vector={x:this.cx,y:this.cy}}containsPoint(e){return o4(this,e)}intersectsLine(e){return a4(this,iQ(e))}intersectsRect(e){return i4(this,oQ(e))}intersectsCircle(e){return n=e,!e4(t=this)&&!e4(n)&&(t.cx-n.cx)**2+(t.cy-n.cy)**2<=(t.r+n.r)**2;var t,n}intersectsPolygon(e){return s4(this,e)}intersectsGeoPolygon(e){return b4(this,e)}points(){return[{x:this.cx,y:this.cy}]}}class gte{constructor(){let{x1:e=0,y1:t=0,x2:n=0,y2:r=0,tolerance:o=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({x1:e,y1:t,x2:n,y2:r,tolerance:o})}set(){let{x1:e=0,y1:t=0,x2:n=0,y2:r=0,tolerance:o=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.type="line",this.x1=e,this.y1=t,this.x2=n,this.y2=r,this.tolerance=Math.max(0,Math.round(o)),this.vectors=this.points(),this.zeroSize=e===n&&t===r}containsPoint(e){if(this.tolerance>0){return a4({cx:e.x,cy:e.y,r:this.tolerance},this)}return g4(this,e)}intersectsLine(e){return m4(this,iQ(e))}intersectsRect(e){return f4(oQ(e),this)}intersectsCircle(e){return a4(e,this)}intersectsPolygon(e){return c4(e,this)}intersectsGeoPolygon(e){return v4(e,this)}points(){return[{x:this.x1,y:this.y1},{x:this.x2,y:this.y2}]}}class yte{constructor(){let{vertices:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({vertices:e})}set(){let{vertices:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.type="polygon",this.vertices=e.slice(),this.edges=[],function(e){for(let t=0;t<e.length-1;t++){const n=e[t],r=e[t+1];n.x===r.x&&n.y===r.y&&(e.splice(t,1),t--)}}(this.vertices),!(this.vertices.length<=2)){!function(e){const t=e[0],n=e[e.length-1];t.x===n.x&&t.y===n.y||e.push(t)}(this.vertices),this.xMin=NaN,this.yMin=NaN,this.xMax=NaN,this.yMax=NaN;for(let e=0;e<this.vertices.length;e++)e<this.vertices.length-1&&this.edges.push([this.vertices[e],this.vertices[e+1]]),this.xMin=isNaN(this.xMin)?this.vertices[e].x:Math.min(this.xMin,this.vertices[e].x),this.xMax=isNaN(this.xMax)?this.vertices[e].x:Math.max(this.xMax,this.vertices[e].x),this.yMin=isNaN(this.yMin)?this.vertices[e].y:Math.min(this.yMin,this.vertices[e].y),this.yMax=isNaN(this.yMax)?this.vertices[e].y:Math.max(this.yMax,this.vertices[e].y);this._bounds=null,this._boundingRect=null}}containsPoint(e){return l4(this,e)}intersectsCircle(e){return s4(e,this)}intersectsLine(e){return c4(this,iQ(e))}intersectsRect(e){return u4(this,oQ(e))}intersectsPolygon(e){return y4(this,e)}intersectsGeoPolygon(e){return _4(e,this)}points(){return this.vertices}bounds(){return this._bounds||(this._bounds=[{x:this.xMin,y:this.yMin},{x:this.xMax,y:this.yMin},{x:this.xMax,y:this.yMax},{x:this.xMin,y:this.yMax}]),this._bounds}boundingRect(){return this._boundingRect||(this._boundingRect={x:this.xMin,y:this.yMin,width:this.xMax-this.xMin,height:this.yMax-this.yMin}),this._boundingRect}}function _te(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new yte(...t)}function bte(e){const t=e[0],n=e[e.length-1];t.x===n.x&&t.y===n.y||e.push(t)}function xte(e){for(let t=0;t<e.length-1;t++){const n=e[t],r=e[t+1];n.x===r.x&&n.y===r.y&&(e.splice(t,1),t--)}}class vte{constructor(){let{vertices:e=[[]]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({vertices:e})}set(){let{vertices:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.type="geopolygon",this.vertices=e.slice(),this.numPolygons=this.vertices.length,this.polygons=[],this.xMin=NaN,this.yMin=NaN,this.xMax=NaN,this.yMax=NaN;for(let e=0;e<this.numPolygons;e++)xte(this.vertices[e]),this.vertices[e].length>2&&bte(this.vertices[e]),this.polygons[e]=_te({vertices:this.vertices[e]}),this.xMin=isNaN(this.xMin)?this.polygons[e].xMin:Math.min(this.xMin,this.polygons[e].xMin),this.xMax=isNaN(this.xMax)?this.polygons[e].xMax:Math.max(this.xMax,this.polygons[e].xMax),this.yMin=isNaN(this.yMin)?this.polygons[e].yMin:Math.min(this.yMin,this.polygons[e].yMin),this.yMax=isNaN(this.yMax)?this.polygons[e].yMax:Math.max(this.yMax,this.polygons[e].yMax);this._bounds=null,this._boundingRect=null}containsPoint(e){return x4(this,e)}intersectsCircle(e){return b4(e,this)}intersectsLine(e){return v4(this,iQ(e))}intersectsRect(e){return w4(this,oQ(e))}intersectsPolygon(e){return _4(this,e)}intersectsGeoPolygon(e){return function(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!d4(n,r)&&(p4(r,n)?r4(t,e):r4(e,t))}(this,e)}points(){return this.vertices}bounds(){return this._bounds||(this._bounds=[{x:this.xMin,y:this.yMin},{x:this.xMax,y:this.yMin},{x:this.xMax,y:this.yMax},{x:this.xMin,y:this.yMax}]),this._bounds}boundingRect(){return this._boundingRect||(this._boundingRect={x:this.xMin,y:this.yMin,width:this.xMax-this.xMin,height:this.yMax-this.yMin}),this._boundingRect}}function wte(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new vte(...t)}class Ste{constructor(){let{points:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({points:e})}set(){let{points:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.type="polyline",this.segments=[],this._points=e.slice(),this._points.length>1)for(let e=0,r=this._points.length-1;e<r;e++)t=this._points[e],n=this._points[e+1],(t.x!==n.x||t.y!==n.y)&&this.segments.push({x1:this._points[e].x,y1:this._points[e].y,x2:this._points[e+1].x,y2:this._points[e+1].y});var t,n}containsPoint(e){return this.segments.some((t=>g4(t,e)))}intersectsCircle(e){return this.segments.some((t=>a4(e,t)))}intersectsLine(e){const t=iQ(e);return this.segments.some((e=>m4(e,t)))}intersectsRect(e){const t=oQ(e);return this.segments.some((e=>f4(t,e)))}intersectsPolygon(e){return this.segments.some((t=>c4(e,t)))}intersectsGeoPolygon(e){return this.segments.some((t=>v4(e,t)))}points(){return this._points}}const Cte=u0();function Ete(e,t){return Cte.get(e)(t)}Cte.add("rect",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new fte(...t)})),Cte.add("circle",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new mte(...t)})),Cte.add("line",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new gte(...t)})),Cte.add("polygon",_te),Cte.add("geopolygon",wte),Cte.add("polyline",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Ste(...t)}));class kte{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.set(e)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.geometries=[],e.forEach((e=>{const t=Ete(e.type,e);t&&this.geometries.push(t)}))}containsPoint(e){return this.geometries.some((t=>t.containsPoint(e)))}intersectsLine(e){return this.geometries.some((t=>t.intersectsLine(e)))}intersectsRect(e){return this.geometries.some((t=>t.intersectsRect(e)))}intersectsCircle(e){return this.geometries.some((t=>t.intersectsCircle(e)))}intersectsPolygon(e){return this.geometries.some((t=>t.intersectsPolygon(e)))}intersectsGeoPolygon(e){return this.geometries.some((t=>t.intersectsGeoPolygon(e)))}}class Mte{constructor(){this._elements=[[1,0,0],[0,1,0],[0,0,1]],this._stack=[]}clone(){return(new Mte).multiply(this)}set(e){return this._elements=e,this}save(){return this._stack.push(this.elements),this}restore(){return this._stack.length&&(this._elements=this._stack.pop()),this}add(e){let t,n;for(t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)this._elements[t][n]+=e;return this}translate(e,t){return this.multiply([[1,0,e],[0,1,t],[0,0,1]]),this}rotate(e){let t=Math.cos(-e),n=Math.sin(-e);return this.multiply([[t,n,0],[-n,t,0],[0,0,1]]),this}multiply(e){let t,n,r,o;if(e instanceof Mte&&(e=e._elements),Array.isArray(e)){for(r=[[0,0,0],[0,0,0],[0,0,0]],t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)for(o=0;o<3;o++)r[t][n]+=this._elements[t][o]*e[o][n];this._elements=r}else for(t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)this._elements[t][n]*=e;return this}scale(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return this.multiply([[e,0,0],[0,t,0],[0,0,1]]),this}transform(e,t,n,r,o,i){return this.multiply([[e,n,o],[t,r,i],[0,0,1]]),this}determinant(){let e=this._elements[0][0],t=this._elements[0][1],n=this._elements[0][2],r=this._elements[1][0],o=this._elements[1][1],i=this._elements[1][2],a=this._elements[2][0],s=this._elements[2][1],l=this._elements[2][2],c=0;return c=e*o*l+t*i*a+n*r*s-n*o*a-t*r*l-e*i*s,c}invert(){let e=this.determinant(),t=this._elements[0][0],n=this._elements[0][1],r=this._elements[0][2],o=this._elements[1][0],i=this._elements[1][1],a=this._elements[1][2],s=this._elements[2][0],l=this._elements[2][1],c=this._elements[2][2];return this._elements=[[i*c-a*l,r*l-n*c,n*a-r*i],[a*s-o*c,t*c-r*s,r*o-t*a],[o*l-i*s,s*n-t*l,t*i-n*o]],this.multiply(1/e),this}transpose(){const e=Object.create(this._elements);return this._elements=[[e[0][0],e[1][0],e[2][0]],[e[0][1],e[1][1],e[2][1]],[e[0][2],e[1][2],e[2][2]]],this}identity(){return this._elements=[[1,0,0],[0,1,0],[0,0,1]],this}toString(){return"".concat(this._elements.map((e=>e.join("\t"))).join("\n"))}isIdentity(){const e=this._elements;return 1===e[0][0]&&0===e[0][1]&&0===e[0][2]&&0===e[1][0]&&1===e[1][1]&&0===e[1][2]&&0===e[2][0]&&0===e[2][1]&&1===e[2][2]}transformPoint(e){let t,n,r=[e.x,e.y,1],o=this._elements,i=[0,0,0];for(t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)i[t]+=r[n]*o[t][n];return{x:i[0],y:i[1]}}transformPoints(e){let t,n,r,o,i,a=this._elements,s=[];for(o=0;o<e.length;o++){for(t=[e[o].x,e[o].y,1],i=[0,0,0],n=0;n<this._elements.length;n++)for(r=0;r<this._elements[n].length;r++)i[n]+=t[r]*a[n][r];s.push({x:i[0],y:i[1]})}return s}get elements(){const e=this._elements;return[[e[0][0],e[0][1],e[0][2]],[e[1][0],e[1][1],e[1][2]],[e[2][0],e[2][1],e[2][2]]]}}const Rte=/(translate|scale|rotate|matrix)\(([0-9,.eE+-\s]+)(?:,|\s?)+\)/g;function Ate(e,t){const n=t.args[0]*(Math.PI/180);if(t.args.length>2){const r=t.args[1],o=t.args[2];e.translate(r,o),e.rotate(n),e.translate(-r,-o)}else 1===t.args.length&&e.rotate(n)}function Ite(e,t){const n=t.args[0],r=isNaN(t.args[1])?t.args[0]:t.args[1];e.scale(n,r)}function Pte(e,t){const n=t.args[0],r=isNaN(t.args[1])?0:t.args[1];e.translate(n,r)}function Ote(e,t){t.args.length>=6&&e.transform(...t.args)}function Lte(e,t){const n=function(e){let t,n=[];for(;null!==(t=Rte.exec(e));){const e=t[2].trim(),r=-1===e.indexOf(",")?e.split(" "):e.split(",");n.push({cmd:t[1],args:r.filter((e=>e.trim().length>0)).map((e=>Number(e)))})}return n}(e);let r;for(let e=0,o=n.length;e<o;e++)r=n[e],"rotate"===r.cmd?Ate(t,r):"scale"===r.cmd?Ite(t,r):"matrix"===r.cmd?Ote(t,r):"translate"===r.cmd&&Pte(t,r)}const Dte={type:/^\w[\w-]+/,attr:/^\[\w(?:[\w\._-]+)?(?:[!]?=['\"][\w\s*#_-]*['\"])?\]/,universal:/^(\*)/,tag:/^\.(\w+)/},Tte={type:(e,t)=>t.filter((t=>{const n=t.type;return!!n&&n.toLowerCase()===e.toLowerCase()})),attr:(e,t,n,r)=>r.filter((r=>{const o=r.attrs[e];if(!t)return void 0!==o;if(void 0===o)return!1;switch(t){case"=":return n===String(o);case"!=":return n!==String(o);default:return!1}})),universal:e=>e,tag:(e,t)=>t.filter((t=>{const n=t.tag;return!!n&&-1!==n.trim().split(/\s+/).indexOf(e.replace(".",""))}))};function zte(e,t){if(!t||!t.length||!e||"function"!=typeof Tte[e.type])return[];switch(e.type){case"type":case"tag":return Tte[e.type](e.value,t);case"attr":return Tte[e.type](e.attribute,e.operator,e.attributeValue,t);case"universal":return Tte[e.type](t);default:return[]}}var jte={find:function(e,t){const n=[],r=[];let o,i;if(t.isBranch){let a;o=function(e){const t=[];let n,r,o,i;return e.split(/\s*,\s*/).forEach((e=>{e=e.trim(),n=[];const a=t=>{o=e.match(Dte[t]),o&&(i=!0,e=e.slice(o[0].length),r={type:t,value:o[0]},"attr"===t&&(o=o[0].match(/\[(\w[\w\._-]+)?(?:([!]?=)['\"]([\w\s#_-]*)['\"])?\]/),r.attribute=o[1],r.operator=o[2],r.attributeValue=o[3]),n.push(r))};for(;e&&(i=!1,o=e.match(/^\s*([>+~]|\s)\s*/),o&&(i=!0,n.push({type:" ",value:o[0]}),e=e.slice(o[0].length)),Object.keys(Dte).forEach(a),n&&n.length&&t.indexOf(n)<0&&t.push(n),i););})),t}(e),i=t.descendants;for(let e=0,t=o.length;e<t;e++){a=o[e];const t=[];let n=i.slice(),s=!1;a.reverse().forEach((e=>{if(" "===e.type)return t.push(n),n=i.slice(),void(s=!1);n=zte(e,n),s=!0})),s&&t.push(n);const l=t[0].filter((e=>{let n,r=e.parent;for(let e=1;e<t.length;e++){for(n=t[e].indexOf(r);r&&n<0;)r=r.parent,n=t[e].indexOf(r);if(n<0)return!1}return!0}));r.push(l)}for(let e=0,t=r.length;e<t;e++)for(let t=0,o=r[e].length;t<o;t++)n.indexOf(r[e][t])<0&&n.push(r[e][t])}return n||[]}};function Nte(e,t,n){const r=e.type;let o=e.points();n&&(o=o.every((e=>Array.isArray(e)))?o.map((e=>n.transformPoints(e))):n.transformPoints(o)),function(e,t){for(let n=0,r=e.length;n<r;n++)e[n].x/=t,e[n].y/=t}(o,t);let i=null;if("rect"===r||"bounds"===r)i=oQ(o),i.type=r;else if("circle"===r)i=function(e,t){return{cx:e[0].x,cy:e[0].y,r:t}}(o,e.r),i.type=r;else if("line"===r)i=iQ(o),i.type=r;else if("polygon"===r||"polyline"===r){i={type:"path",d:k6(o,"polygon"===r)}}else if("geopolygon"===r){let e="";for(let t=0;t<o.length;t++)e+=k6(o[t],!0);i={type:"path",d:e}}return i}class qte{constructor(e){this._bounds=function(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const{x:n,y:r,width:o,height:i}=e.boundingRect?e.boundingRect(t):{x:0,y:0,width:0,height:0};return{x:n,y:r,width:o,height:i}},this._attrs=e.attrs,this._type=e.type,this._data=e.data,this._dpi=e.stage?e.stage.dpi:1,this._collider=()=>function(e,t){if(e.collider){const n=e.modelViewMatrix;return"collection"===e.colliderType?{type:"container",children:e.collider.geometries.map((e=>Nte(e,t,n)))}:Nte(e.collider,t,n)}return null}(e,this._dpi),this._desc=e.desc,this._tag=e.tag,this._children=()=>e.children.map((e=>new qte(e))),this._parent=()=>e.parent?new qte(e.parent):null,this._cache={elementBoundingRect:null},this._getElementBoundingRect=()=>(!this._cache.elementBoundingRect&&this.element&&(this._cache.elementBoundingRect=this.element.getBoundingClientRect()),this._cache.elementBoundingRect||{left:0,top:0})}get children(){return this._children()}get parent(){return this._parent()}get type(){return this._type}get data(){return this._data}get attrs(){return this._attrs}set element(e){this._cache.elementBoundingRect=null,this._element=e}get element(){return this._element}set key(e){this._key=e}get key(){return this._key}get bounds(){const e=this._bounds();return e.x/=this._dpi,e.y/=this._dpi,e.width/=this._dpi,e.height/=this._dpi,e}get localBounds(){return this._bounds(!1)}boundsRelativeTo(e){const t=typeof e,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?this.bounds:this.localBounds,r=this._getElementBoundingRect();let o=r.left,i=r.top;if("object"===t&&null!==e&&"function"==typeof e.getBoundingClientRect){const{left:t=0,top:n=0}=e.getBoundingClientRect();o-=t,i-=n}return n.x+=o,n.y+=i,n}get collider(){return this._collider()}get desc(){return this._desc}get tag(){return this._tag}}function Fte(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new qte(...t)}class Wte{constructor(e){this._node=Fte(e),this._parent=null,this._input=null}get node(){return this._node}set parent(e){this._parent=e}get parent(){return this._parent}set input(e){this._input=e}get input(){return this._input}}function Bte(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Wte(...t)}function $te(e,t){const n=e.parent;if(n&&"stage"!==n.type){t.parent=Bte(n);const e=n.parent;e&&"stage"!==e.type&&$te(e,t.parent)}}function Hte(e,t,n){if(null===e.colliderType)return null;const r=function(e,t){let n={};if(e.modelViewMatrix)if(Array.isArray(t))n=e.inverseModelViewMatrix.transformPoints(t);else if(isNaN(t.r))Array.isArray(t.vertices)?n.vertices=e.inverseModelViewMatrix.transformPoints(t.vertices):n=e.inverseModelViewMatrix.transformPoint(t);else{const r={x:t.cx,y:t.cy};({x:n.cx,y:n.cy}=e.inverseModelViewMatrix.transformPoint(r)),n.r=t.r}else n=t;return Array.isArray(n.vertices)&&(n=n.vertices.every((e=>Array.isArray(e)))?wte(n):_te(n)),n}(e,n);return"frontChild"===e.colliderType?function(e,t,n){for(let r=e.descendants.length-1;r>=0;r--){const o=e.descendants[r];if(null!==o.collider&&o.collider[t](n)){const e=Bte(o);return $te(o,e),e}}return null}(e,t,r):function(e,t,n){if(e.collider[t](n)){const t=Bte(e);return $te(e,t),t}return null}(e,t,r)}function Vte(e,t,n,r){const o=e.length;for(let i=0;i<o;i++){const o=e[i],a=Hte(o,t,r);a&&n.push(a),!o.children||a||o.collider||Vte(o.children,t,n,r)}}function Gte(e,t,n){const r=e.length;for(let o=0;o<r;o++){const r=e[o];if(null!==Hte(r,t,n))return!0;if(r.children&&!r.collider)return Gte(r.children,t,n)}return!1}function Ute(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;let n={};switch(aQ(e)){case"circle":return n.cx=e.cx*t,n.cy=e.cy*t,n.r=e.r,["intersectsCircle",n];case"rect":return n=rQ(e).map((e=>O6(e,t))),["intersectsRect",n];case"line":return n=nQ(e).map((e=>O6(e,t))),["intersectsLine",n];case"point":return n=O6(e,t),["containsPoint",n];case"polygon":return n.vertices=e.vertices.map((e=>O6(e,t))),["intersectsPolygon",n];case"geopolygon":return n.vertices=e.vertices.map((e=>e.map((e=>O6(e,t))))),["intersectsGeoPolygon",n];default:return[]}}function Yte(e,t){const[n,r]=Ute(t,e.dpi),o=[];return n&&(Vte([e],n,o,r),function(e,t){for(let n=0,r=t.length;n<r;n++)t[n].input=e}(t,o)),o}function Kte(e,t){const[n,r]=Ute(t,e.dpi);return Gte([e],n,r)}class Xte extends hte{constructor(e){super(e),this._stage=null,this._collider={type:null,definition:null,fn:null},this._attrs={},this._node=null}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.node=e;const{data:t,desc:n,tag:r,strokeReference:o,fillReference:i}=e;!function(e,t){Object.keys(E6).forEach((n=>{const r=t[n];void 0!==r&&(e[E6[n]]=r)}))}(this.attrs,e),void 0!==t&&(this.data=t),"object"==typeof n&&(this.desc=UZ(!0,{},n)),"string"==typeof r&&(this.tag=r),"string"==typeof o&&(this.strokeReference=o),"string"==typeof i&&(this.fillReference=i)}findShapes(e){return jte.find(e,this).map((e=>Fte(e)))}getItemsFrom(e){return Yte(this,e)}containsPoint(e){return Kte(this,e)}intersectsLine(e){return Kte(this,e)}intersectsRect(e){return Kte(this,e)}intersectsCircle(e){return Kte(this,e)}intersectsPolygon(e){return Kte(this,e)}intersectsGeoPolygon(e){return Kte(this,e)}resolveLocalTransform(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Mte;void 0!==this.attrs.transform&&Lte(this.attrs.transform,e),this.modelViewMatrix=e.clone()}resolveGlobalTransform(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Mte;const t=this.ancestors;if(t.length>0)for(let n=t.length-1;n>=0;n--)t[n].resolveLocalTransform(e),e=t[n].modelViewMatrix;this.resolveLocalTransform(e)}attr(e){return this.attrs[e]}equals(e){const t=this.attrs,n=Object.keys(t),r=e.attrs,o=Object.keys(r);if(n.length!==o.length)return!1;for(let e=0;e<n.length;e++){const o=n[e];if(!Object.hasOwnProperty.call(r,o))return!1;if(t[o]!==r[o])return!1}return super.equals(e)}toJSON(){const e=super.toJSON();return e.attrs=this.attrs,e}get attrs(){return this._attrs}get stage(){return this._parent&&!this._stage?this._stage=this._parent.stage:this._parent||this._stage===this||(this._stage=null),this._stage}set modelViewMatrix(e){this._mvm=e,this._imvm=null}get modelViewMatrix(){return this._mvm}get inverseModelViewMatrix(){return this._imvm=this._imvm?this._imvm:this._mvm.clone().invert(),this._imvm}set node(e){this._node=e}get node(){return this._node}set collider(e){const t=Array.isArray(e)?"collection":e&&e.type;return"string"!=typeof t?(this._collider.type=null,this._collider.definition=null,void(this._collider.fn=null)):null!==this._collider&&this._collider.type===t&&null!==this._collider.fn?(this._collider.fn.set(e),void(this._collider.definition=e)):(this._collider.type=t,void(this._collider.definition=e))}get collider(){if(null!==this._collider.fn)return this._collider.fn;switch(this._collider.type){case"collection":this._collider.fn=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new kte(...t)}(this._collider.definition);break;case"frontChild":return!0;case"bounds":this._collider.fn=Ete("rect",this.boundingRect());break;case"line":case"rect":case"circle":case"polygon":case"geopolygon":case"polyline":this._collider.fn=Ete(this._collider.type,this._collider.definition);break;default:return null}return this._collider.fn}get colliderType(){return this._collider.type}}class Jte extends hte{addChild(e){if(!(e&&e instanceof hte))throw new TypeError("Expecting a Node as argument, but got ".concat(e));if(e===this)throw new Error("Can not add itself as child!");if(e._children&&e._children.length&&this.ancestors.indexOf(e)>=0)throw new Error("Can not add an ancestor as child!");return e._parent&&e._parent!==this&&e._parent.removeChild(e),this._children.push(e),e._parent=this,e._ancestors=null,this}addChildren(e){let t,n=e?e.length:0;for(t=0;t<n;t++)this.addChild(e[t]);return this}removeChild(e){const t=this._children.indexOf(e);return t>=0&&(this._children.splice(t,1),e._parent=null,e._ancestors=null),this}removeChildren(e){let t,n;if(!this._children)return this;if(e)for(n=e.length,t=0;t<n;t++)this.removeChild(e[t]);else for(;this._children.length;)this.removeChild(this._children[0]);return this}}const Zte=Jte.prototype;class Qte extends Xte{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{type:t="container"}=e;super(t),this.set(e)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super.set(e);const{collider:t}=e,n=UZ({type:null},t);this.collider=n,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}appendChildRect(e,t){if(void 0!==e.bounds){const n=this.__boundingRect[t]||{},[r,,o]=e.bounds(t),{x:i,y:a}=r,{x:s,y:l}=o,c=isNaN(n.width)?s:Math.max(s,n.width+n.x),u=isNaN(n.height)?l:Math.max(l,n.height+n.y);n.x=isNaN(n.x)?i:Math.min(i,n.x),n.y=isNaN(n.y)?a:Math.min(a,n.y),n.width=c-n.x,n.height=u-n.y,this.__boundingRect[t]=n}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];const t=this.children.length;for(let n=0;n<t;n++)this.appendChildRect(this.children[n],e);return this.__boundingRect[e]=UZ({x:0,y:0,width:0,height:0},this.__boundingRect[e]),this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}addChild(e){const t=Zte.addChild.call(this,e);if(this._collider&&"bounds"===this._collider.type){this.appendChildRect(e,!0);const t=UZ({type:"bounds",x:0,y:0,width:0,height:0},this.__boundingRect.true);this.collider=t}return t}addChildren(e){const t=Zte.addChildren.call(this,e),n=e.length;if(this._collider&&"bounds"===this._collider.type&&n>0){for(let t=0;t<n;t++)this.appendChildRect(e[t],!0);const t=UZ({type:"bounds",x:0,y:0,width:0,height:0},this.__boundingRect.true);this.collider=t}return t}removeChild(e){e._stage=null;let t,n=e.descendants,r=n?n.length:0;for(t=0;t<r;t++)n[t]._stage=null;if(Zte.removeChild.call(this,e),this._collider&&"bounds"===this._collider.type){this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null};const e=UZ(this.boundingRect(!0),{type:"bounds"});this.collider=e}return this}removeChildren(e){if(Zte.removeChildren.call(this,e),this._collider&&"bounds"===this._collider.type){this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null};const e=UZ(this.boundingRect(!0),{type:"bounds"});this.collider=e}return this}}function ene(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Qte(...t)}class tne extends Qte{constructor(e){super("stage"),this._stage=this,this._dpiRatio=e||1}get dpi(){return this._dpiRatio}}const nne=Jte.prototype,rne=["x1","x2","y1","y2","id","offset","style"];class one extends Xte{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{type:t="container"}=e;super(t),this.set(e),this._boundingRect={}}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super.set(e);const t=this.attrs;let n="";for(let r=0,o=rne.length;r!==o;r++)n=rne[r],void 0!==e[n]&&(t[n]=e[n])}addChild(e){return nne.addChild.call(this,e)}addChildren(e){return nne.addChildren.call(this,e)}removeChild(e){e._stage=null;let t,n=e.descendants,r=n?n.length:0;for(t=0;t<r;t++)n[t]._stage=null;return nne.removeChild.call(this,e),this}removeChildren(e){return nne.removeChildren.call(this,e),this}}function ine(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new one(...t)}const ane=Jte.prototype,sne=["patternUnits","x","y","width","height","id"];class lne extends Xte{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{type:t="container"}=e;super(t),this.set(e),this._boundingRect={}}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super.set(e);const t=this.attrs;let n="";for(let r=0,o=sne.length;r!==o;r++)n=sne[r],void 0!==e[n]&&(t[n]=e[n])}addChild(e){return ane.addChild.call(this,e)}addChildren(e){return ane.addChildren.call(this,e)}removeChild(e){e._stage=null;let t,n=e.descendants,r=n?n.length:0;for(t=0;t<r;t++)n[t]._stage=null;return ane.removeChild.call(this,e),this}removeChildren(e){return ane.removeChildren.call(this,e),this}}class cne extends Xte{constructor(){super("rect"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{x:t=0,y:n=0,width:r=0,height:o=0,rx:i=0,ry:a=0,collider:s}=e,l=UZ({type:"rect",x:t,y:n,width:r,height:o},s);super.set(e),r>=0?(this.attrs.x=t,this.attrs.width=r):(this.attrs.x=t+r,this.attrs.width=-r),o>=0?(this.attrs.y=n,this.attrs.height=o):(this.attrs.y=n+o,this.attrs.height=-o),i>0&&(this.attrs.rx=i),a>0&&(this.attrs.ry=a),this.collider=l,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];const t=rQ(this.attrs),n=e&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(t):t,[r,o,i,a]=tQ(n);return this.__boundingRect[e]={x:r,y:o,width:i-r,height:a-o},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}class une extends Xte{constructor(){super("circle"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{cx:t=0,cy:n=0,r:r=0,collider:o}=e,i=UZ({type:"circle",cx:t,cy:n,r:r},o);super.set(e),this.attrs.cx=t,this.attrs.cy=n,this.attrs.r=r,this.collider=i,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];const t=this.bounds(e);return this.__boundingRect[e]={x:t[0].x,y:t[0].y,width:t[2].x-t[0].x,height:t[2].y-t[0].y},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const{cx:t,cy:n,r:r,r:o}=this.attrs,i=t-r,a=n-o;let s=2*r,l=2*o,c=[{x:i,y:a},{x:i+s,y:a},{x:i+s,y:a+l},{x:i,y:a+l}];if(e&&this.modelViewMatrix){c=this.modelViewMatrix.transformPoints(c);const[t,n,r,o]=tQ(c);s=r-t,l=o-n,this.__bounds[e]=[{x:t,y:n},{x:t+s,y:n},{x:t+s,y:n+l},{x:t,y:n+l}]}else this.__bounds[e]=c;return this.__bounds[e]}}class dne extends Xte{constructor(){super("line"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{x1:t=0,y1:n=0,x2:r=0,y2:o=0,collider:i}=e;super.set(e),this.attrs.x1=t,this.attrs.y1=n,this.attrs.x2=r,this.attrs.y2=o;const a={type:"line",x1:t,y1:n,x2:r,y2:o};this.collider=UZ(a,i),this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];let t=nQ(this.attrs);e&&this.modelViewMatrix&&(t=this.modelViewMatrix.transformPoints(t));const[n,r,o,i]=tQ(t),a=n!==o||r!==i;return this.__boundingRect[e]={x:n,y:r,width:a?Math.max(1,o-n):0,height:a?Math.max(1,i-r):0},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}const pne=Math.PI/2;function hne(e,t){const n=Math.atan2(t.y-e.y,t.x-e.x);return n<0?n+2*Math.PI:n}function fne(e,t,n){return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}}const mne={step:function(e){return new o0(e,.5)},stepAfter:function(e){return new o0(e,1)},stepBefore:function(e){return new o0(e,0)},linear:TQ,basis:function(e){return new $Q(e)},cardinal:GQ.tension(0),catmullRom:YQ,monotonex:function(e){return new QQ(e)},monotoney:function(e){return new e0(e)},natural:function(e){return new n0(e)}};function gne(e){if(e.length<2)return!1;const t=e[0],n=e[e.length-1];return Math.abs(t.x-n.x)<1e-12&&Math.abs(t.y-n.y)<1e-12}class yne extends Xte{constructor(){super("path"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(super.set(e),this.segments=[],this.points=[],e.arcDatum){const t=LQ();t.innerRadius(e.desc.slice.innerRadius),t.outerRadius(e.desc.slice.outerRadius),t.cornerRadius(e.desc.slice.cornerRadius);const n=t(e.arcDatum);this.attrs.d=n}else if(e.points){const{major:t,minor:n,layerObj:r,points:o,stngs:i,generatorType:a}=e,s=NQ(),l=i.coordinates?i.coordinates.defined:null;s[t.p]((e=>e.major*t.size))["".concat(n.p,"1")]((e=>e.minor*n.size))["".concat(n.p,"0")]((e=>e.minor0*n.size)).curve(mne["monotone"===r.curve?"monotone".concat(t.p):r.curve]),l?s.defined((e=>!e.dummy&&"number"==typeof e.minor&&!isNaN(e.minor)&&e.defined)):s.defined((e=>!e.dummy&&"number"==typeof e.minor&&!isNaN(e.minor)));const c=i.connect?o.filter(s.defined()):o,u=("area"===a?s:s[a]())(c);this.attrs.d=u}else e.d&&(this.attrs.d=e.d);if(this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null},Array.isArray(e.collider)||"object"==typeof e.collider&&void 0!==e.collider.type)this.collider=e.collider;else if(this.attrs.d){if(this.segments=ute(this.attrs.d),this.segments.length>1&&this.segments.every((e=>gne(e))))return void(this.collider=UZ({type:"geopolygon",vertices:this.segments},e.collider));this.segments.forEach((t=>{if(t.length<=1);else if(gne(t))this.collider=UZ({type:"polygon",vertices:t},e.collider);else if("object"==typeof e.collider&&e.collider.visual){const n=this.attrs["stroke-width"]/2;this.collider=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=[],o=[];if("h"===n.forceOrientation){const t=e[0].x<e[1].x?-1:1,n=e[e.length-1].x>e[e.length-2].x?1:-1;e.unshift({x:e[0].x+t,y:e[0].y}),e.push({x:e[e.length-1].x+n,y:e[e.length-1].y})}else if("v"===n.forceOrientation){const t=e[0].y<e[1].y?-1:1,n=e[e.length-1].y>e[e.length-2].y?1:-1;e.unshift({x:e[0].x,y:e[0].y+t}),e.push({x:e[e.length-1].x,y:e[e.length-1].y+n})}const i=e.length-1;for(let n=1;n<i;n++){const a=e[n-1],s=e[n],l=e[n+1],c=hne(s,a),u=hne(s,l),d=(c+u)/2,p=d+Math.PI,h=Math.max(d,p),f=Math.min(d,p),m=c>u;if(1===n){const e=hne(a,s);r.push(fne(a,e-pne,t)),o.unshift(fne(a,e+pne,t))}const g=m?h:f,y=m?f:h;if(r.push(fne(s,g,t)),o.unshift(fne(s,y,t)),n===i-1){const e=hne(l,s);r.push(fne(l,e+pne,t)),o.unshift(fne(l,e-pne,t))}}return{type:"polygon",vertices:[...r,...o]}}(t,n,e.collider)}else this.collider=UZ({type:"polyline",points:t},e.collider)}))}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];this.points.length||(this.segments=this.segments.length?this.segments:ute(this.attrs.d),this.points=function(e){const t=[];let n,r=e.length;for(let o=0;o<r;o++){n=e[o];for(let e=0;e<n.length;e++)t.push(n[e])}return t}(this.segments));const t=e&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(this.points):this.points,[n,r,o,i]=tQ(t);return this.__boundingRect[e]={x:n||0,y:r||0,width:o-n||0,height:i-r||0},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}function _ne(e){let{data:t,_boundingRect:n,_textBoundsFn:r}=e;return null!=t&&(n||r)}let bne=class extends Xte{constructor(){super("text"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{x:t=0,y:n=0,dx:r=0,dy:o=0,textBoundsFn:i,text:a,title:s,collider:l,boundingRect:c,ellipsed:u}=e;super.set(e),this.attrs.x=t,this.attrs.y=n,this.attrs.dx=r,this.attrs.dy=o,this.attrs.text=a,void 0!==s&&(this.attrs.title=String(s)),"object"==typeof c?this._textBoundsFn=()=>c:"function"==typeof i&&(this._textBoundsFn=i),"string"==typeof u&&(this.ellipsed=u),this.collider=UZ({type:_ne(this)?"bounds":null},l),this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[t])return this.__boundingRect[t];if("function"!=typeof this._textBoundsFn)return{x:0,y:0,width:0,height:0};e=this._textBoundsFn(this.attrs);const n=rQ(e),r=t&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(n):n,[o,i,a,s]=tQ(r);return this.__boundingRect[t]={x:o,y:i,width:a-o,height:s-i},this.__boundingRect[t]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}};const xne=u0();function vne(e,t){return xne.get(e)(t)}xne.add("rect",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new cne(...t)})),xne.add("circle",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new une(...t)})),xne.add("text",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new bne(...t)})),xne.add("line",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new dne(...t)})),xne.add("path",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new yne(...t)})),xne.add("stage",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new tne(...t)})),xne.add("container",ene),xne.add("defs",ene),xne.add("linearGradient",ine),xne.add("radialGradient",ine),xne.add("conicGradient",ine),xne.add("stop",ine),xne.add("pattern",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new lne(...t)}));const wne=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=[{}];function n(){return t[t.length-1]}return n.save=function(){let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const o=n(),i={};let a="";for(let t=0;t<e.length;t++)a=e[t],void 0!==o[a]&&(i[a]=o[a]);return UZ(i,r),t.push(i),n()},n.restore=function(){t.splice(t.length-1,1)},n}(["stroke","fill","strokeWidth","opacity","fontFamily","fontSize","baseline"]);function Sne(e,t){if(Array.isArray(t))for(let n=0,r=t.length;n<r;n++)t[n](e)}function Cne(e,t,n){e.node=n[t],e.index=t}function Ene(e,t,n,r){let o=!1;const i={siblings:e,node:null,index:0};for(let a=0,s=e.length;a<s;a++){if(Cne(i,a,e),Sne(i,r.create),o="function"==typeof i.node.disabled?i.node.disabled():i.node.disabled,o)continue;i.node=wne.save(i.node);const s=vne(i.node.type,i.node);s&&(i.node.transform&&(n.save(),Lte(i.node.transform,n)),n.isIdentity()||(s.modelViewMatrix=n.clone()),t.addChild(s),i.node.children&&Ene(i.node.children,s,n,r),i.node.transform&&n.restore()),wne.restore()}}function kne(e){let{items:t,stage:n,dpi:r,on:o={}}=e;return n||(n=vne("stage",r)),Ene(t,n,new Mte,o),n}function Mne(e,t,n){const{orientation:r,degree:o,stops:i=[]}=n;let a=null;if("radial"===r){const n=t.boundingRect();a=e.createRadialGradient(n.x+n.width/2,n.y+n.height/2,1e-5,n.x+n.width/2,n.y+n.height/2,Math.max(n.width,n.height)/2)}else if("conic"===r){const t=n.startAngle||0,r=n.x||0,o=n.y||0;a=e.createConicGradient(t,r,o)}else{const r=A6(o);["x1","x2","y1","y2"].forEach((e=>{e in n&&(r[e]=n[e])}));const i=t.boundingRect();a=e.createLinearGradient(i.x+r.x1*i.width,i.y+r.y1*i.height,i.x+r.x2*i.width,i.y+r.y2*i.height)}for(let e=0,t=i.length;e<t;e++){let t=i[e];a.addColorStop(t.offset,t.color)}return a}function Rne(e,t,n){return t.width=e.width,t.height=e.height,n.save(),n.fillStyle=e.fill,e.shapes.forEach((e=>{if("rect"===e.type)n.rect(e.x,e.y,e.width,e.height)})),n.fill(),n.restore(),n.createPattern(t,"repeat")}function Ane(){let{x:e,y:t,width:n,height:r,scaleRatio:o,margin:i,edgeBleed:a}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const s={x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1},margin:{left:0,top:0},edgeBleed:{left:0,right:0,top:0,bottom:0,bool:!1}};return s.x=isNaN(e)?s.x:e,s.y=isNaN(t)?s.y:t,s.width=isNaN(n)?s.width:n,s.height=isNaN(r)?s.height:r,void 0!==o&&(s.scaleRatio.x=isNaN(o.x)?s.scaleRatio.x:o.x,s.scaleRatio.y=isNaN(o.y)?s.scaleRatio.y:o.y),void 0!==i&&(s.margin.left=isNaN(i.left)?0:i.left,s.margin.top=isNaN(i.top)?0:i.top),"object"==typeof a&&["left","right","top","bottom"].forEach((e=>{!isNaN(a[e])&&a[e]>0&&(s.edgeBleed[e]=a[e],s.edgeBleed.bool=!0)})),s.computedPhysical={x:Math.round(s.margin.left+(s.x-s.edgeBleed.left)*s.scaleRatio.x),y:Math.round(s.margin.top+(s.y-s.edgeBleed.top)*s.scaleRatio.y),width:Math.round((s.width+s.edgeBleed.left+s.edgeBleed.right)*s.scaleRatio.x),height:Math.round((s.height+s.edgeBleed.top+s.edgeBleed.bottom)*s.scaleRatio.y)},s}function Ine(){const e={element:()=>{},root:()=>{},settings:()=>{},appendTo:()=>{},getScene:()=>[],render:()=>!1,itemsAt:()=>[],findShapes:()=>[],clear:()=>{},destory:()=>{},size:()=>{},measureText:nee,textBounds:oee,setKey:t=>{e.element().setAttribute("data-key",t)}};return e}function Pne(e){return t=>{let{node:n}=t;"text"!==n.type||null==n.data||n.textBoundsFn||(n.textBoundsFn=e.textBounds)}}const One=200,Lne=200;class Dne{constructor(e){this.targetCanvas=e,this.bufferCanvas=e.cloneNode()}updateSize(e){let t,{rect:n,dpiRatio:r,canvasBufferSize:o}=e;t=o?"function"==typeof o?o(n):o:{width:n.computedPhysical.width+2*One,height:n.computedPhysical.height+2*Lne},this.bufferCanvas.style.width="".concat(t.width,"px"),this.bufferCanvas.style.height="".concat(t.height,"px"),this.bufferCanvas.width=Math.round(t.width*r),this.bufferCanvas.height=Math.round(t.height*r)}apply(){this.targetCanvas.getContext("2d").drawImage(this.bufferCanvas,0,0)}clear(){this.bufferCanvas.width=this.bufferCanvas.width}getContext(){return this.bufferCanvas.getContext("2d")}}const Tne=u0();function zne(e){return Array.isArray(e)?e:"string"==typeof e?-1!==e.indexOf(",")?e.split(","):e.split(" "):[]}function jne(e){return("undefined"==typeof window?1:window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)}function Nne(e,t){t.setTransform(e[0][0],e[1][0],e[0][1],e[1][1],e[0][2],e[1][2])}function qne(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=Object.keys(r);for(let o=0,i=n.length;o<i;o++){let i=n[o];const a=i[0],s=i[1],l=i[2];if(a in t.attrs&&!(s in r)&&e[s]!==t.attrs[a]){const n=l?l(t.attrs[a]):t.attrs[a];"function"==typeof e[s]?e[s](n):e[s]=n}}for(let t=0,n=o.length;t<n;t++){const n=o[t];e[n]=r[n]}}function Fne(e,t,n,r){for(let o=0,i=e.length;o<i;o++){let i=e[o],a={};t.save(),i.attrs&&(i.attrs.fill||i.attrs.stroke)&&(i.attrs.fill&&"object"==typeof i.attrs.fill&&"gradient"===i.attrs.fill.type?a.fillStyle=Mne(t,i,i.attrs.fill):i.attrs.fill&&"object"==typeof i.attrs.fill&&"pattern"===i.attrs.fill.type&&(a.fillStyle=r.patterns.create(i.attrs.fill)),i.attrs.stroke&&"object"==typeof i.attrs.stroke&&"gradient"===i.attrs.stroke.type?a.strokeStyle=Mne(t,i,i.attrs.stroke):i.attrs.stroke&&"object"==typeof i.attrs.stroke&&"pattern"===i.attrs.stroke.type&&(a.strokeStyle=r.patterns.create(i.attrs.stroke))),qne(t,i,n,a),i.modelViewMatrix&&Nne(i.modelViewMatrix.elements,t),Tne.has(i.type)&&Tne.get(i.type)(i.attrs,{g:t,doFill:"fill"in i.attrs&&"none"!==i.attrs.fill,doStroke:"stroke"in i.attrs&&0!==i.attrs["stroke-width"],ellipsed:i.ellipsed}),i.children&&Fne(i.children,t,n,r),t.restore()}}function Wne(){let e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:kne;const r={transform:void 0,canvasBufferSize:void 0,progressive:void 0};let o,i=!1,a=Ane();const s=[["fill","fillStyle"],["stroke","strokeStyle"],["opacity","globalAlpha"],["globalAlpha","globalAlpha"],["stroke-width","lineWidth"],["stroke-linejoin","lineJoin"],["stroke-dasharray","setLineDash",zne]];let l;const c=Ine();return c.element=()=>e,c.root=()=>e,c.settings=e=>(e&&Object.keys(r).forEach((t=>{void 0!==e[t]&&(r[t]=e[t])})),r),c.appendTo=n=>(e||(e=n.ownerDocument.createElement("canvas"),e.style.position="absolute",e.style["-webkit-font-smoothing"]="antialiased",e.style["-moz-osx-font-smoothing"]="antialiased",e.style.pointerEvents="none"),"function"!=typeof r.transform||t||(t=new Dne(e)),n.appendChild(e),e),c.getScene=r=>{const o=jne(t&&t.getContext()||e.getContext("2d")),i=a.scaleRatio.x,s=a.scaleRatio.y,l={type:"container",children:r,transform:a.edgeBleed.bool?"translate(".concat(a.edgeBleed.left*o*i,", ").concat(a.edgeBleed.top*o*s,")"):""};return 1===o&&1===i&&1===s||(l.transform+="scale(".concat(o*i,", ").concat(o*s,")")),n({items:[l],dpi:o,on:{create:[G9(c.measureText),Pne(c)]}})},c.render=n=>{if(!e)return!1;l||(l=function(e){const t=e.createElement("canvas"),n=t.getContext("2d");let r={};return{create(e){const o=e.key;return o?(r[o]=r[o]||Rne(e,t,n),r[o]):Rne(e,t,n)},clear(){r={}}}}(e.ownerDocument));const u=t&&t.getContext()||e.getContext("2d"),d=jne(u),p=t&&r.transform();if(p)return e.width=e.width,function(e){let{el:t,dpiRatio:n,transform:r}=e;if("object"==typeof r){const e=[r.horizontalScaling,r.horizontalSkewing,r.verticalSkewing,r.verticalScaling,r.horizontalMoving*n,r.verticalMoving*n];t.getContext("2d").setTransform(...e)}}({el:e,dpiRatio:d,transform:p}),t.apply(),!0;i&&(e.style.left="".concat(a.computedPhysical.x,"px"),e.style.top="".concat(a.computedPhysical.y,"px"),e.style.width="".concat(a.computedPhysical.width,"px"),e.style.height="".concat(a.computedPhysical.height,"px"),e.width=Math.round(a.computedPhysical.width*d),e.height=Math.round(a.computedPhysical.height*d),t&&t.updateSize({rect:a,dpiRatio:d,canvasBufferSize:r.canvasBufferSize}));const h=c.getScene(n),f=!o||!h.equals(o);l.clear();const m=i||f,g="function"==typeof r.progressive&&r.progressive();return m&&(g&&!g.isFirst||c.clear(),Fne(h.children,u,s,{patterns:l})),t&&(e.width=e.width,t.apply()),i=!1,g&&!g.isFirst&&h.children.unshift(...o.children),o=h,m},c.itemsAt=e=>o?o.getItemsFrom(e):[],c.findShapes=e=>o?o.findShapes(e):[],c.clear=()=>(e&&(e.width=e.width),t&&t.clear(),o=null,c),c.size=e=>{if(e){const t=Ane(e);JSON.stringify(a)!==JSON.stringify(t)&&(i=!0,a=t)}return a},c.destroy=()=>{e&&(e.parentElement&&e.parentElement.removeChild(e),e=null),t&&(t=null),o=null},c}function Bne(e,t){Tne.add(e,t)}function $ne(e,t){return Math.max(0,Math.min(e,t))}const Hne=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),Vne=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞יִײַ-ﬨשׁ-ﭏ]"),Gne=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]");function Une(e){return Hne.test(e)}function Yne(e){return Vne.test(e)||Gne.test(e)}function Kne(e){let t,n,r=e?e.length:0;for(t=0;t<r;t++){if(n=e[t],Une(n))return"ltr";if(Yne(n))return"rtl"}return"ltr"}const Xne={start:"end",end:"start",center:"center",middle:"middle"};function Jne(e,t){return"rtl"===t?Xne[e]:e}function Zne(e,t){const n=[];let r;const o=[],i=[],a=[];let s,l;const c=e=>e.id,u=(e,t)=>{let n;return n="object"==typeof e?"id"in e?e.id:t:e,{content:e,id:"".concat(n,"__").concat(e.type||"")}};e.isTree||(e=e.map(u)),t=t.map(u),s=e.map(c),l=t.map(c);for(let e=0,r=t.length;e<r;e++){-1===s.indexOf(t[e].id)?n.push(t[e]):i.push(t[e])}for(let t=0,n=e.length;t<n;t++){-1===l.indexOf(e[t].id)?o.push(e[t]):a.push(e[t])}for(let e=0,t=n.length;e<t;e++)n[e].content.children&&(n[e].diff=Zne([],n[e].content.children),n[e].children=n[e].diff.updatedNew.concat(n[e].diff.added),n[e].children.isTree=!0);for(let e=0,t=i.length;e<t;e++)i[e].diff=Zne(a[e].children||[],i[e].content.children||[]),i[e].object=a[e].object,i[e].children=i[e].diff.items;return r=i.concat(n),n.isTree=!0,o.isTree=!0,i.isTree=!0,a.isTree=!0,r.isTree=!0,{added:n,updatedNew:i,updatedOld:a,removed:o,items:r}}function Qne(e,t,n){for(let r=0,o=e.length;r<o;r++)e[r].object=n(e[r].content.type,t)}function ere(e,t){for(let n=0,r=e.length;n<r;n++)null!==e[n].object&&void 0!==e[n].object&&(t(e[n].object),e[n].object=null)}function tre(e,t,n,r){let o;for(let i=0,a=e.length;i<a;i++)o=e[i],null!==o.object&&void 0!==o.object&&(n(o.object,o.content),o.diff&&(Qne(o.diff.added,o.object,t),ere(o.diff.removed,r),tre(o.diff.items,t,n,r)))}function nre(e,t,n,r,o,i){const a=Zne(e,t);return Qne(a.added,n,r),ere(a.removed,i),tre(a.items,r,o,i),a.items}Bne("rect",(function(e,t){let{g:n,doFill:r,doStroke:o}=t;n.beginPath(),e.rx>0||e.ry>0?function(e,t,n,r,o,i,a){i=$ne(r/2,i>0?i:a),a=$ne(o/2,a>0?a:i),e.moveTo(t,n+a),e.lineTo(t,n+o-a),e.quadraticCurveTo(t,n+o,t+i,n+o),e.lineTo(t+r-i,n+o),e.quadraticCurveTo(t+r,n+o,t+r,n+o-a),e.lineTo(t+r,n+a),e.quadraticCurveTo(t+r,n,t+r-i,n),e.lineTo(t+i,n),e.quadraticCurveTo(t,n,t,n+a)}(n,e.x,e.y,e.width,e.height,e.rx,e.ry):n.rect(e.x,e.y,e.width,e.height),r&&n.fill(),o&&n.stroke()})),Bne("circle",(function(e,t){let{g:n,doFill:r,doStroke:o}=t;n.beginPath(),n.moveTo(e.cx+e.r,e.cy),n.arc(e.cx,e.cy,e.r,0,2*Math.PI,!1),r&&n.fill(),o&&n.stroke()})),Bne("line",(function(e,t){let{g:n,doStroke:r}=t;n.beginPath(),n.moveTo(e.x1,e.y1),n.lineTo(e.x2,e.y2),r&&n.stroke()})),Bne("path",(function(e,t){let{g:n,doStroke:r,doFill:o}=t;const i=new Path2D(e.d);o&&n.fill(i),r&&n.stroke(i)})),Bne("text",(function(e,t){let{g:n,ellipsed:r,doStroke:o}=t;const i=r||U9(e,nee);n.font=[e["font-style"],e["font-weight"],e["font-size"],e["font-family"]].filter((e=>!!e)).join(" ");const a=Kne(e.text);n.canvas.dir!==a&&(n.canvas.dir=a);const s=Jne("middle"===e["text-anchor"]?"center":e["text-anchor"],n.canvas.dir);s&&n.textAlign!==s&&(n.textAlign=s);const l=Y9(e);n.fillText(i,e.x+e.dx,e.y+e.dy+l),o&&n.strokeText(i,e.x+e.dx,e.y+e.dy+l)}));const rre="http://www.w3.org/2000/svg",ore=(e,t)=>{if(!e||"string"!=typeof e)throw new Error("Invalid type: ".concat(e));const n=t.ownerDocument.createElementNS(rre,"container"===e?"g":e);return t.appendChild(n),n},ire=e=>{e.parentNode&&e.parentNode.removeChild(e)},are=(e,t)=>{if((e=>{switch(e.type){case"circle":return!isNaN(e.attrs.cx)&&!isNaN(e.attrs.cy)&&!isNaN(e.attrs.r);case"line":return!(isNaN(e.attrs.x1)||isNaN(e.attrs.y1)||isNaN(e.attrs.x2)||isNaN(e.attrs.y2));case"rect":return!(isNaN(e.attrs.x)||isNaN(e.attrs.y)||isNaN(e.attrs.width)||isNaN(e.attrs.height));case"text":return!isNaN(e.attrs.x)&&!isNaN(e.attrs.y);default:return!0}})(t)){for(const n in t.attrs)if("stroke"===n&&t.strokeReference)e.setAttribute("stroke",t.strokeReference);else if("fill"===n&&t.fillReference)e.setAttribute("fill",t.fillReference);else if("text"===n){e.setAttribute("style","white-space: pre"),e.textContent=t.ellipsed||U9(t.attrs,nee);const n=Kne(t.attrs.text);"rtl"===n&&(e.setAttribute("direction","rtl"),e.setAttribute("dir","rtl"),e.setAttribute("text-anchor",Jne(e.getAttribute("text-anchor"),n)))}else if("text"!==t.type||"dy"!==n&&"dominant-baseline"!==n)if("text"===t.type&&"title"===n&&t.attrs.title){const n=e.ownerDocument.createElementNS(rre,"title");n.textContent=t.attrs.title,e.appendChild(n)}else e.setAttribute(n,t.attrs[n]);else{const r=+e.getAttribute(n)||0;let o=0;o="dominant-baseline"===n?Y9(t.attrs):t.attrs[n],e.setAttribute("dy",o+r)}if("string"==typeof t.data||"number"==typeof t.data||"boolean"==typeof t.data)e.setAttribute("data",t.data);else if("object"==typeof t.data&&null!==t.data)for(const n in t.data)"string"!=typeof t.data[n]&&"number"!=typeof t.data[n]&&"boolean"!=typeof t.data[n]||e.setAttribute("data-".concat(n),t.data[n])}};class sre{constructor(e,t,n,r){this.create=e,this.nodeCreator=t,this.nodeMaintainer=n,this.nodeDestroyer=r}render(e,t){return this.create([],e,t,this.nodeCreator,this.nodeMaintainer,this.nodeDestroyer)}}function lre(){return new sre(nre,ore,are,ire)}function cre(e){let t,n,r,o=0;if(0===(e=JSON.stringify(e)).length)return o;for(t=0,r=e.length;t<r;t++)n=e.charCodeAt(t),o=(o<<5)-o+n,o&=o;return o}function ure(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:rre,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:kne;const n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:lre)();let r,o,i,a=!1,s=Ane();const l={transform:void 0,disableScreenReader:!1},c=Ine(),u={type:"defs",children:[]},d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:cre,n={},r=Date.now();const o={onCreate(o){let i={};o.node&&"object"==typeof o.node.fill&&"pattern"===o.node.fill.type&&o.node.fill.shapes&&(i.fill=o.node.fill),o.node&&"object"==typeof o.node.stroke&&"pattern"===o.node.stroke.type&&o.node.stroke.shapes&&(i.stroke=o.node.stroke),Object.keys(i).forEach((a=>{let s="";const l=i[a],c=t(l),u="picasso-pattern-".concat(r,"-").concat(c);if("undefined"!=typeof window&&(s=window.location.href.split("#")[0]),!n[c]){const t={patternUnits:"userSpaceOnUse",x:0,y:0,width:l.width,height:l.height,type:"pattern",id:u,children:[],fill:l.fill};l.shapes.forEach((e=>{t.children.push(e)})),e.push(t),n[c]=!0}o.node["".concat(a,"Reference")]="url('".concat(s,"#").concat(u,"')")}))},clear(){n={}}};return o}(u.children),p=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:cre,n={},r=Date.now();const o={getOrCreateGradient(){let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"fill",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",s=t(o[i]),l="picasso-gradient-".concat(r,"-").concat(s);if(!n[s]){let{orientation:t,degree:r,stops:a=[]}=o[i],c={};void 0===r&&(r=90),"radial"===t?c.type="radialGradient":(c=A6(r),["x1","x2","y1","y2"].forEach((e=>{e in o[i]&&(c[e]=o[i][e])})),c.type="linearGradient"),c.id=l,c.children=a.map((e=>{let{offset:t,color:n,opacity:r}=e;return{type:"stop",offset:"".concat(100*t,"%"),style:"stop-color:".concat(n,";stop-opacity:").concat(void 0!==r?r:1)}})),e.push(c),n[s]=l}return"url('".concat(a,"#").concat(l,"')")},onCreate(e){let t="";"undefined"!=typeof window&&(t=window.location.href.split("#")[0]);const n=e.node;n.fill&&"object"==typeof n.fill&&"gradient"===n.fill.type&&(n.fillReference=o.getOrCreateGradient(n,"fill",t)),n.stroke&&"object"==typeof n.stroke&&"gradient"===n.stroke.type&&(n.strokeReference=o.getOrCreateGradient(n,"stroke",t))},clear(){n={}}};return o}(u.children);return c.element=()=>r,c.root=()=>o,c.settings=e=>(e&&Object.keys(l).forEach((t=>{void 0!==e[t]&&(l[t]=e[t])})),l),c.appendTo=t=>(r||(r=t.ownerDocument.createElementNS(e,"svg"),r.style.position="absolute",r.style["-webkit-font-smoothing"]="antialiased",r.style["-moz-osx-font-smoothing"]="antialiased",r.style.pointerEvents="none",r.setAttribute("xmlns",e),o=t.ownerDocument.createElementNS(e,"g"),o.style.pointerEvents="auto",r.appendChild(o)),t.appendChild(r),r),c.getScene=e=>{const n=s.scaleRatio.x,r=s.scaleRatio.y,o={type:"container",children:Array.isArray(e)?[...e,u]:e,transform:s.edgeBleed.bool?"translate(".concat(s.edgeBleed.left*n,", ").concat(s.edgeBleed.top*r,")"):""};return 1===n&&1===r||(o.transform+="scale(".concat(n,", ").concat(r,")")),t({items:[o],on:{create:[e=>{e.node.fillReference=void 0,e.node.strokeReference=void 0},p.onCreate,d.onCreate,G9(c.measureText),Pne(c)]}})},c.render=e=>{if(!r)return!1;const t="function"==typeof l.transform&&l.transform();if(t){const{horizontalScaling:e,horizontalSkewing:n,verticalSkewing:r,verticalScaling:i,horizontalMoving:a,verticalMoving:s}=t;return o.style.transform="matrix(".concat(e,", ").concat(n,", ").concat(r,", ").concat(i,", ").concat(a,", ").concat(s,")"),!0}o.style.transform="";l.disableScreenReader&&r.setAttribute("aria-hidden",!0),a&&(r.style.left="".concat(s.computedPhysical.x,"px"),r.style.top="".concat(s.computedPhysical.y,"px"),r.setAttribute("width",s.computedPhysical.width),r.setAttribute("height",s.computedPhysical.height)),p.clear(),d.clear(),u.children.length=0;const h=c.getScene(e),f=!i||!h.equals(i),m=a||f;return m&&(c.clear(),n.render(h.children,o)),a=!1,i=h,m},c.itemsAt=e=>i?i.getItemsFrom(e):[],c.findShapes=e=>i?i.findShapes(e):[],c.clear=()=>{if(!o)return c;i=null;const e=o.cloneNode(!1);return r.replaceChild(e,o),o=e,c},c.destroy=()=>{r&&r.parentNode&&r.parentNode.removeChild(r),r=null,o=null},c.size=e=>{if(e){const t=Ane(e);JSON.stringify(s)!==JSON.stringify(t)&&(a=!0,s=t)}return s},c}var dre,pre,hre,fre,mre,gre,yre,_re={},bre=[],xre=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function vre(e,t){for(var n in t)e[n]=t[n];return e}function wre(e){var t=e.parentNode;t&&t.removeChild(e)}function Sre(e,t,n){var r,o,i,a={};for(i in t)"key"==i?r=t[i]:"ref"==i?o=t[i]:a[i]=t[i];if(arguments.length>2&&(a.children=arguments.length>3?dre.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===a[i]&&(a[i]=e.defaultProps[i]);return Cre(e,a,r,o,null)}function Cre(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++hre:o};return null==o&&null!=pre.vnode&&pre.vnode(i),i}function Ere(e){return e.children}function kre(e,t){this.props=e,this.context=t}function Mre(e,t){if(null==t)return e.__?Mre(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?Mre(e):null}function Rre(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return Rre(e)}}function Are(e){(!e.__d&&(e.__d=!0)&&fre.push(e)&&!Ire.__r++||mre!==pre.debounceRendering)&&((mre=pre.debounceRendering)||gre)(Ire)}function Ire(){var e,t,n,r,o,i,a,s;for(fre.sort(yre);e=fre.shift();)e.__d&&(t=fre.length,r=void 0,o=void 0,a=(i=(n=e).__v).__e,(s=n.__P)&&(r=[],(o=vre({},i)).__v=i.__v+1,qre(s,i,o,n.__n,void 0!==s.ownerSVGElement,null!=i.__h?[a]:null,r,null==a?Mre(i):a,i.__h),Fre(r,i),i.__e!=a&&Rre(i)),fre.length>t&&fre.sort(yre));Ire.__r=0}function Pre(e,t,n,r,o,i,a,s,l,c){var u,d,p,h,f,m,g,y=r&&r.__k||bre,_=y.length;for(n.__k=[],u=0;u<t.length;u++)if(null!=(h=n.__k[u]=null==(h=t[u])||"boolean"==typeof h||"function"==typeof h?null:"string"==typeof h||"number"==typeof h||"bigint"==typeof h?Cre(null,h,null,null,h):Array.isArray(h)?Cre(Ere,{children:h},null,null,null):h.__b>0?Cre(h.type,h.props,h.key,h.ref?h.ref:null,h.__v):h)){if(h.__=n,h.__b=n.__b+1,null===(p=y[u])||p&&h.key==p.key&&h.type===p.type)y[u]=void 0;else for(d=0;d<_;d++){if((p=y[d])&&h.key==p.key&&h.type===p.type){y[d]=void 0;break}p=null}qre(e,h,p=p||_re,o,i,a,s,l,c),f=h.__e,(d=h.ref)&&p.ref!=d&&(g||(g=[]),p.ref&&g.push(p.ref,null,h),g.push(d,h.__c||f,h)),null!=f?(null==m&&(m=f),"function"==typeof h.type&&h.__k===p.__k?h.__d=l=Ore(h,l,e):l=Lre(e,h,p,y,f,l),"function"==typeof n.type&&(n.__d=l)):l&&p.__e==l&&l.parentNode!=e&&(l=Mre(p))}for(n.__e=m,u=_;u--;)null!=y[u]&&("function"==typeof n.type&&null!=y[u].__e&&y[u].__e==n.__d&&(n.__d=Dre(r).nextSibling),$re(y[u],y[u]));if(g)for(u=0;u<g.length;u++)Bre(g[u],g[++u],g[++u])}function Ore(e,t,n){for(var r,o=e.__k,i=0;o&&i<o.length;i++)(r=o[i])&&(r.__=e,t="function"==typeof r.type?Ore(r,t,n):Lre(n,r,r,o,r.__e,t));return t}function Lre(e,t,n,r,o,i){var a,s,l;if(void 0!==t.__d)a=t.__d,t.__d=void 0;else if(null==n||o!=i||null==o.parentNode)e:if(null==i||i.parentNode!==e)e.appendChild(o),a=null;else{for(s=i,l=0;(s=s.nextSibling)&&l<r.length;l+=1)if(s==o)break e;e.insertBefore(o,i),a=i}return void 0!==a?a:o.nextSibling}function Dre(e){var t,n,r;if(null==e.type||"string"==typeof e.type)return e.__e;if(e.__k)for(t=e.__k.length-1;t>=0;t--)if((n=e.__k[t])&&(r=Dre(n)))return r;return null}function Tre(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||xre.test(t)?n:n+"px"}function zre(e,t,n,r,o){var i;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Tre(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Tre(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])i=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r||e.addEventListener(t,i?Nre:jre,i):e.removeEventListener(t,i?Nre:jre,i);else if("dangerouslySetInnerHTML"!==t){if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,n))}}function jre(e){return this.l[e.type+!1](pre.event?pre.event(e):e)}function Nre(e){return this.l[e.type+!0](pre.event?pre.event(e):e)}function qre(e,t,n,r,o,i,a,s,l){var c,u,d,p,h,f,m,g,y,_,b,x,v,w,S,C=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(l=n.__h,s=t.__e=n.__e,t.__h=null,i=[s]),(c=pre.__b)&&c(t);try{e:if("function"==typeof C){if(g=t.props,y=(c=C.contextType)&&r[c.__c],_=c?y?y.props.value:c.__:r,n.__c?m=(u=t.__c=n.__c).__=u.__E:("prototype"in C&&C.prototype.render?t.__c=u=new C(g,_):(t.__c=u=new kre(g,_),u.constructor=C,u.render=Hre),y&&y.sub(u),u.props=g,u.state||(u.state={}),u.context=_,u.__n=r,d=u.__d=!0,u.__h=[],u._sb=[]),null==u.__s&&(u.__s=u.state),null!=C.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=vre({},u.__s)),vre(u.__s,C.getDerivedStateFromProps(g,u.__s))),p=u.props,h=u.state,u.__v=t,d)null==C.getDerivedStateFromProps&&null!=u.componentWillMount&&u.componentWillMount(),null!=u.componentDidMount&&u.__h.push(u.componentDidMount);else{if(null==C.getDerivedStateFromProps&&g!==p&&null!=u.componentWillReceiveProps&&u.componentWillReceiveProps(g,_),!u.__e&&null!=u.shouldComponentUpdate&&!1===u.shouldComponentUpdate(g,u.__s,_)||t.__v===n.__v){for(t.__v!==n.__v&&(u.props=g,u.state=u.__s,u.__d=!1),u.__e=!1,t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),b=0;b<u._sb.length;b++)u.__h.push(u._sb[b]);u._sb=[],u.__h.length&&a.push(u);break e}null!=u.componentWillUpdate&&u.componentWillUpdate(g,u.__s,_),null!=u.componentDidUpdate&&u.__h.push((function(){u.componentDidUpdate(p,h,f)}))}if(u.context=_,u.props=g,u.__P=e,x=pre.__r,v=0,"prototype"in C&&C.prototype.render){for(u.state=u.__s,u.__d=!1,x&&x(t),c=u.render(u.props,u.state,u.context),w=0;w<u._sb.length;w++)u.__h.push(u._sb[w]);u._sb=[]}else do{u.__d=!1,x&&x(t),c=u.render(u.props,u.state,u.context),u.state=u.__s}while(u.__d&&++v<25);u.state=u.__s,null!=u.getChildContext&&(r=vre(vre({},r),u.getChildContext())),d||null==u.getSnapshotBeforeUpdate||(f=u.getSnapshotBeforeUpdate(p,h)),S=null!=c&&c.type===Ere&&null==c.key?c.props.children:c,Pre(e,Array.isArray(S)?S:[S],t,n,r,o,i,a,s,l),u.base=t.__e,t.__h=null,u.__h.length&&a.push(u),m&&(u.__E=u.__=null),u.__e=!1}else null==i&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=Wre(n.__e,t,n,r,o,i,a,l);(c=pre.diffed)&&c(t)}catch(e){t.__v=null,(l||null!=i)&&(t.__e=s,t.__h=!!l,i[i.indexOf(s)]=null),pre.__e(e,t,n)}}function Fre(e,t){pre.__c&&pre.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){pre.__e(e,t.__v)}}))}function Wre(e,t,n,r,o,i,a,s){var l,c,u,d=n.props,p=t.props,h=t.type,f=0;if("svg"===h&&(o=!0),null!=i)for(;f<i.length;f++)if((l=i[f])&&"setAttribute"in l==!!h&&(h?l.localName===h:3===l.nodeType)){e=l,i[f]=null;break}if(null==e){if(null===h)return document.createTextNode(p);e=o?document.createElementNS("http://www.w3.org/2000/svg",h):document.createElement(h,p.is&&p),i=null,s=!1}if(null===h)d===p||s&&e.data===p||(e.data=p);else{if(i=i&&dre.call(e.childNodes),c=(d=n.props||_re).dangerouslySetInnerHTML,u=p.dangerouslySetInnerHTML,!s){if(null!=i)for(d={},f=0;f<e.attributes.length;f++)d[e.attributes[f].name]=e.attributes[f].value;(u||c)&&(u&&(c&&u.__html==c.__html||u.__html===e.innerHTML)||(e.innerHTML=u&&u.__html||""))}if(function(e,t,n,r,o){var i;for(i in n)"children"===i||"key"===i||i in t||zre(e,i,null,n[i],r);for(i in t)o&&"function"!=typeof t[i]||"children"===i||"key"===i||"value"===i||"checked"===i||n[i]===t[i]||zre(e,i,t[i],n[i],r)}(e,p,d,o,s),u)t.__k=[];else if(f=t.props.children,Pre(e,Array.isArray(f)?f:[f],t,n,r,o&&"foreignObject"!==h,i,a,i?i[0]:n.__k&&Mre(n,0),s),null!=i)for(f=i.length;f--;)null!=i[f]&&wre(i[f]);s||("value"in p&&void 0!==(f=p.value)&&(f!==e.value||"progress"===h&&!f||"option"===h&&f!==d.value)&&zre(e,"value",f,d.value,!1),"checked"in p&&void 0!==(f=p.checked)&&f!==e.checked&&zre(e,"checked",f,d.checked,!1))}return e}function Bre(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){pre.__e(e,n)}}function $re(e,t,n){var r,o;if(pre.unmount&&pre.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Bre(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){pre.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&$re(r[o],t,n||"function"!=typeof e.type);n||null==e.__e||wre(e.__e),e.__=e.__e=e.__d=void 0}function Hre(e,t,n){return this.constructor(e,n)}function Vre(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{createElement:t=document.createElement.bind(document)}=e;let n,r,o=Ane();const i={transform:void 0,disableScreenReader:!1},a=Ine();return a.element=()=>n,a.root=()=>n,a.settings=e=>(e&&Object.keys(i).forEach((t=>{void 0!==e[t]&&(i[t]=e[t])})),i),a.appendTo=e=>(n||(n=t("div"),n.style.position="absolute",n.style["-webkit-font-smoothing"]="antialiased",n.style["-moz-osx-font-smoothing"]="antialiased",n.style.pointerEvents="none"),e.appendChild(n),n),a.render=e=>{if(!n)return!1;const t="function"==typeof i.transform&&i.transform();if(t){const{horizontalScaling:e,horizontalSkewing:r,verticalSkewing:o,verticalScaling:i,horizontalMoving:a,verticalMoving:s}=t;return n.style.transform="matrix(".concat(e,", ").concat(r,", ").concat(o,", ").concat(i,", ").concat(a,", ").concat(s,")"),!0}n.style.transform="";let a;return i.disableScreenReader&&n.setAttribute("aria-hidden",!0),n.style.left="".concat(o.computedPhysical.x,"px"),n.style.top="".concat(o.computedPhysical.y,"px"),n.style.width="".concat(o.computedPhysical.width,"px"),n.style.height="".concat(o.computedPhysical.height,"px"),a=Array.isArray(e)?Sre("div",null,e):e,r=function(e,t,n){var r,o,i;pre.__&&pre.__(e,t),o=(r="function"==typeof n)?null:n&&n.__k||t.__k,i=[],qre(t,e=(!r&&n||t).__k=Sre(Ere,null,[e]),o||_re,_re,void 0!==t.ownerSVGElement,!r&&n?[n]:o?null:t.firstChild?dre.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r),Fre(i,e)}(a,n,r),!0},a.renderArgs=[Sre],a.clear=()=>{if(n){let e=n.firstChild;for(;e;)n.removeChild(e),e=n.firstChild;r=null}return a},a.destroy=()=>{n&&n.parentElement&&n.parentElement.removeChild(n),n=null,r=null},a.size=e=>(e&&(o=Ane(e)),o),a}dre=bre.slice,pre={__e:function(e,t,n,r){for(var o,i,a;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(e)),a=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),a=o.__d),a)return o.__E=o}catch(t){e=t}throw e}},hre=0,kre.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=vre({},this.state),"function"==typeof e&&(e=e(vre({},n),this.props)),e&&vre(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),Are(this))},kre.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Are(this))},kre.prototype.render=Ere,fre=[],gre="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,yre=function(e,t){return e.__v.__b-t.__v.__b},Ire.__r=0;var Gre=[function(e){e.renderer("svg",ure)},function(e){e.renderer("canvas",Wne)},function(e){e.renderer("dom",Vre)}];const Ure={OFF:0,ERROR:1,WARN:2,INFO:3,DEBUG:4};const Yre=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=function(){let{level:e=Ure.OFF,pipe:t=console}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e;const r={[Ure.OFF]:()=>{},[Ure.ERROR]:function(){return t.error(...arguments)},[Ure.WARN]:function(){return t.warn(...arguments)},[Ure.INFO]:function(){return t.info(...arguments)},[Ure.DEBUG]:function(){return t.log(...arguments)}},o=function(e){if(e&&!(n<e)){for(var t=arguments.length,o=new Array(t>1?t-1:0),i=1;i<t;i++)o[i-1]=arguments[i];(r[e]||r[Ure.DEBUG])(...o)}};return{log:o,error:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return o(Ure.ERROR,...t)},warn:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return o(Ure.WARN,...t)},info:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return o(Ure.INFO,...t)},debug:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return o(Ure.DEBUG,...t)},level:e=>("number"==typeof e&&(n=e),n),LOG_LEVEL:Ure}}(t.logger),o={component:u0(n.component,"component",r),data:u0(n.data,"data",r),formatter:u0(n.formatter,"formatter",r),interaction:u0(n.interaction,"interaction",r),renderer:J4(n.renderer),scale:u0(n.scale,"scale",r),symbol:u0(n.symbol,"symbol",r),logger:r};function i(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e({palettes:t.palettes.concat(n.palettes||[]),style:UZ({},t.style,n.style),logger:n.logger||t.logger,renderer:n.renderer||t.renderer},o)}return t.renderer&&t.renderer.prio&&o.renderer.default(t.renderer.prio[0]),i.use=function(e){return function(e){e(arguments.length>2?arguments[2]:void 0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o)},i.chart=e=>X4(e,{registries:o,logger:r,style:t.style,palettes:t.palettes}),i.config=()=>t,Object.keys(o).forEach((e=>{i[e]=o[e]})),i.version=YZ,i}({renderer:{prio:["svg","canvas"]},logger:{level:0},style:{"$font-family":"'Source Sans Pro', Arial, sans-serif","$font-size":"12px","$line-height":"16px","$font-size--l":"16px","$font-weight":"normal","$gray-100":"#ffffff","$gray-98":"#f9f9f9","$gray-95":"#f2f2f2","$gray-90":"#e6e6e6","$gray-35":"#595959","$gray-30":"#4d4d4d","$gray-25":"#404040","$gray-20":"#333333","$border-95":"rgba(255, 255, 255, 0.05)","$border-90":"rgba(255, 255, 255, 0.1)","$border-80":"rgba(255, 255, 255, 0.2)","$border-20":"rgba(0, 0, 0, 0.2)","$border-10":"rgba(0, 0, 0, 0.1)","$border-5":"rgba(0, 0, 0, 0.05)","$primary-blue":"#3F8AB3","$primary-green":"#6CB33F","$primary-red":"#DC423F","$primary-orange":"#EF960F","$spacing--s":4,$spacing:8,"$spacing--l":12,"$font-color":"$gray-35","$font-color--inverted":"$gray-90","$guide-color":"$gray-90","$guide-color--inverted":"$gray-35",$border:"$border-80","$border--inverted":"$border-10",$shape:{fill:"$primary-blue",strokeWidth:1,stroke:"$border"},"$shape-outline":{stroke:"$primary-blue",strokeWidth:2},"$shape-guide":{stroke:"$guide-color",strokeWidth:1},"$shape-guide--inverted":{"@extend":"$shape-guide",stroke:"$guide-color--inverted"},$label:{fontSize:"$font-size",fontFamily:"$font-family",fill:"$font-color"},"$label--inverted":{$extend:"$label",fill:"$font-color--inverted"},"$label-overlay":{fontSize:"$font-size--l",fontFamily:"$font-family",fill:"$gray-100",color:"$font-color",stroke:"$guide-color--inverted",strokeWidth:1,borderRadius:4},$title:{"@extend":"$label",fontSize:"$font-size--l",fontWeight:"$font-weight",stroke:"$guide-color--inverted",strokeWidth:0},"$guide-line":{strokeWidth:1,stroke:"$guide-color"},"$guide-line--minor":{strokeWidth:1,stroke:"$gray-95"},"$padding--s":{left:"$spacing--s",right:"$spacing--s",top:"$spacing--s",bottom:"$spacing--s"},$padding:{left:"$spacing",right:"$spacing",top:"$spacing",bottom:"$spacing"},"$selection-area-target":{fill:"$primary-green",strokeWidth:0,opacity:.2}},palettes:[{key:"categorical",colors:[["#a54343","#d76c6c","#ec983d","#ecc43d","#f9ec86","#cbe989","#70ba6e","#578b60","#79d69f","#26a0a7","#138185","#65d3da"]]},{key:"diverging",colors:[["#3d52a1","#3a89c9","#77b7e5","#b4ddf7","#e6f5fe","#ffe3aa","#f9bd7e","#ed875e","#d24d3e","#ae1c3e"]]},{key:"sequential",colors:[["rgb(180,221,212)","rgb(34, 83, 90)"]]}]},{component:Z4,data:r8,formatter:D2,interaction:o8,renderer:J4(),scale:T3,symbol:W6});pte.forEach(Yre.use),Gre.forEach(Yre.use),[].forEach(Yre.use);const Kre=Yre();Kre.use(NZ),Kre.renderer.prio(["canvas"]);const Xre=(e,t)=>e&&"center"!==e&&"rtl"===t?uK(e):e,Jre=({cell:e,representation:t,textStyle:n,imageContainerHorizontalAlignment:r})=>{const{imageBox:o}=t,{styleService:{grid:{lineClamp:i}}}=wV(),{direction:a}=gV();return Uo.jsxs("div",{style:{display:"grid",gridTemplateColumns:`${o?.width??24}px 1fr`,maxHeight:"fit-content",alignItems:"center",justifyContent:"flex-start",boxSizing:"border-box"},children:[Uo.jsx("div",{"data-key":"image-container--partial-image",style:{display:"flex",flexDirection:"column",justifyContent:CK(e),alignItems:Xre(r,a),overflow:"hidden",boxSizing:"border-box",border:"4px solid transparent",width:o?.width??24,height:"100%"},children:Uo.jsx(HK,{representation:t,textStyle:n})}),Uo.jsx(SX,{padding:4/(i<=2?2:1),alignSelf:CK(e,!0),children:!!t.labelStructure&&BK(t.labelStructure)})]})},Zre=({suffix:e,delimeter:t})=>` ${e?t:""} ${e}`,Qre=({href:e,text:t,labelStructure:n,interactions:r,color:o})=>Uo.jsxs("span",{children:[Uo.jsx(tz,{...XX({href:e,text:t,interactions:r,color:o}),children:n?.maskedValue?n.maskedValue:n?.originalValue}),!!n&&Zre(n)]}),eoe=({children:e,textStyle:t,shouldEnableStickyText:n})=>Uo.jsx("span",{style:{...t,border:"4px solid transparent",boxSizing:"border-box",...n&&{alignSelf:"flex-start",position:"sticky",top:0}},children:e}),toe=({cell:e,isCellSelected:t,isLeftColumn:n})=>{const{direction:r}=gV(),{isActive:o}=vK(),{layoutService:i,styleService:a}=wV(),{interactions:s}=bV(),l=n&&i.isIndentModeEnabled;let c=n&&!e.isNull?(e=>{const{representation:{text:t,labelStructure:n}}=e;if(!n||!n.originalValue)return t;const{originalValue:r,maskedValue:o,suffix:i,delimeter:a}=n;return`${0!==o.length?o:r} ${i?a:""} ${i}`.trim()})(e):e.representation.text;if(e.isEmpty)return null;const u=(({cell:e,styleService:t,isCellSelected:n,isLeftColumn:r})=>({...h$,...f$(r?Math.max(t.grid.lineClamp,e.leafCount*t.grid.lineClamp):t.grid.columnLineClamp),color:AK({cell:e,styleService:t,isCellSelected:n}),fontWeight:IK({cell:e,styleService:t}),fontStyle:PK({cell:e,styleService:t}),textDecoration:OK({cell:e,styleService:t}),fontFamily:t.dimensionValues.fontFamily,fontSize:t.dimensionValues.fontSize}))({cell:e,styleService:a,isCellSelected:t,isLeftColumn:n});if(e.representation.type===XF.Image&&!e.isTotal&&!e.isNull){const{labelStructure:t}=e.representation,o=n&&t&&t.suffix?Jre:VK;return Uo.jsx(o,{cell:e,representation:e.representation,leafCount:e.leafCount,textStyle:u,isLeftColumn:n,canExpandOrCollapse:e.ref.qCanCollapse||e.ref.qCanExpand,imageContainerHorizontalAlignment:GX(e,i,n,r)})}if(e.representation.type===XF.Link&&!o&&!e.isTotal){const t=n&&e.representation.labelStructure?Qre:JX;c=Uo.jsx(t,{text:e.representation.text,labelStructure:e.representation.labelStructure,href:e.representation.url,interactions:s,color:e.expressionColor.color})}return Uo.jsx(eoe,{shouldEnableStickyText:l,textStyle:{...u,...e.representation.type===XF.Image&&e.isNull?{alignSelf:CK(e)}:{}},children:c})},noe=({index:e,style:t,data:n})=>{const{styleService:r,layoutService:o}=wV(),{isSelected:i}=vK(),{isLeftColumn:a=!1,showLastBorder:s,itemCount:l,isLast:c,totalDividerIndex:u}=n,{isAdjustingWidth:d,setIsAdjustingWidth:p}=uX([n]),h=VX(e,n),f=a?e===l-1:c,m=a?c:e===l-1,g=DY(h,u,o.isIndentModeEnabled);if(void 0===h){const{background:n}=r.dimensionValues;return Uo.jsx(TY,{style:{...t,background:n},index:e,isLastRow:f,isLastColumn:m,showLastBorder:s,isLeftColumn:a,showTotalCellDivider:g})}const y=i(h);return Uo.jsxs(YX,{reactWindowStyle:t,isLeftColumn:a,isLastRow:f,isLastColumn:m,isCellSelected:y,showTotalCellDivider:g,cell:h,data:n,isAdjustingWidth:d,index:e,children:[Uo.jsxs(zY,{verticalAlign:CK(h),width:jY(h.representation),right:h.isLeftColumn?void 0:4,isLeftColumn:a,children:[Uo.jsx(zK,{isLeftColumn:a,isCellSelected:y,cell:h}),Uo.jsx(toe,{isLeftColumn:a,isCellSelected:y,cell:h})]}),Uo.jsx(hX,{cellInfo:{...h,columnWidthLocation:h.isPseudoDimension?rW.Measures:rW.Dimension},columnWidth:t.width,isLastColumn:m,setIsAdjustingWidth:p})]})};var roe=t.memo(noe,bY);const ooe=({list:e,listValues:t,isLastRow:n,getRightGridColumnWidth:r})=>o=>{const i=n?e[o]:t.at(o);return i&&0===o&&i.x>0?(i.leafCount+i.x+i.distanceToNextCell)*r():!n&&i?(i.leafCount+i.distanceToNextCell)*r():r(i?.x??o)},ioe=(e,t,n,r)=>{const o=Object.values(e);let i,a=o.length;return r&&(a=n,i=t/a),{itemCount:a,estimatedItemSize:i,listValues:o}},aoe=(e,t)=>n=>{e.current&&(e.current[t]=n)},soe={display:"flex",height:"fit-content",borderWidth:"1px 0px 0px 0px",...d$},loe={overflow:"hidden",willChange:"auto",flexShrink:0},coe=({leftGridRef:e,width:t,height:n,columnWidths:r,showLastBorder:o})=>{const{pageInfo:i,direction:a}=gV(),{layoutService:s,styleService:{contentCellHeight:l,grid:{divider:c}}}=wV(),{qSize:u}=s.layout.qHyperCube,{gridSectionsData:{leftDimensionData:d},visibleDimensionsInfo:{visibleLeftDimensionInfo:p}}=sU();HX(e,d),$X(e,t,n,l);const h=i.rowsOnCurrentPage*l,f={...soe,borderColor:c,width:r.reduce(((e,t)=>e+t),0)};return Uo.jsx("div",{style:f,"data-section-id":"LEFT_GRID",children:d.grid.map(((t,c)=>{const f=c===d.columnCount-1,m=DV(p[c]),{itemCount:g,estimatedItemSize:y,listValues:_}=ioe(t,h,i.rowsOnCurrentPage,f),b=s.isIndentModeEnabled?()=>l:((e,t,n,r,o)=>i=>{const a=r?e[i]:t.at(i);if(a&&0===i&&a.pageY>0)return(a.leafCount+a.pageY+a.distanceToNextCell)*n;if(a&&a.leafCount>0){const e=a.y===o-a.leafCount;return(a.leafCount-(e?a.ref.qUp:0)+a.distanceToNextCell)*n}return n})(t,_,l,f,u.qcy);return Uo.jsx(mY,{ref:aoe(e,c),style:{...loe,flexGrow:f?1:0,direction:a},height:n,width:r[c],itemCount:g,itemSize:b,layout:"vertical",itemData:{list:t,isLeftColumn:!0,isLast:f,itemCount:g,showLastBorder:o,listValues:_,totalDividerIndex:d.totalDividerIndex},itemKey:oX,estimatedItemSize:y,children:roe},m)}))})};var uoe=y(coe);const doe={overflow:"hidden",willChange:"auto"},poe=e=>({...d$,borderWidth:"rtl"===e?"0px 1px 0px 0px":"0px 0px 0px 1px"}),hoe=({topGridRef:e,rowHightCallback:t,width:n,height:r,showLastBorder:o,getRightGridColumnWidth:i})=>{const{direction:a}=gV(),{layoutService:s,styleService:{grid:{divider:l},headerCellHeight:c}}=wV(),{gridSectionsData:{headersData:u,topDimensionData:d}}=sU(),p={...poe(a),borderColor:l,height:r};HX(e,d),$X(e,n,r,c);const h=s.size.x*i();return 0===d.rowCount?Uo.jsx("div",{style:{width:n,height:r,...poe(a)}}):Uo.jsx("div",{style:p,"data-section-id":"TOP_GRID",children:d.grid.map(((r,l)=>{const c=l===d.rowCount-1,{itemCount:p,estimatedItemSize:f,listValues:m}=ioe(r,h,s.size.x,c),g=(({layoutService:e,headersData:t,topRowIndex:n})=>{const r=t.data.at(n);if(void 0===r)return;const o=t.size.x-1,i=qX({layoutService:e,headersData:t,topRowIndex:n})?0:o,a=r.at(i),s=Array.isArray(a)?a.at(o):a;return s?e.getDimensionInfo(s.dimensionInfoIndex):void 0})({layoutService:s,headersData:u,topRowIndex:l}),y=g?DV(g):`empty ${l}`;return Uo.jsx(mY,{ref:aoe(e,l),style:doe,height:t(),width:n,itemCount:p,itemSize:ooe({list:r,listValues:m,isLastRow:c,getRightGridColumnWidth:i}),layout:"horizontal",itemData:{list:r,isLast:c,itemCount:p,showLastBorder:o,listValues:m,totalDividerIndex:d.totalDividerIndex},itemKey:oX,estimatedItemSize:f,direction:a,children:roe},y)}))})};var foe=y(hoe);const moe=()=>{const{styleService:{headerCellHeight:e,contentCellHeight:t}}=wV(),n=DU(),r=(()=>{const{model:e}=bV(),t=p((async(t,n)=>{if(!e)throw new Error("No Model provided!");const{qReverseSort:r,dimensionInfoIndex:o,sortDirection:i}=t,a=[];if(n===i)return!1;a.push({qPath:`/qHyperCubeDef/qDimensions/${o}/qDef/qReverseSort`,qOp:"Replace",qValue:(!r).toString()});try{return await e.applyPatches(a,!0),!0}catch(e){return console.error("Error while applying patch: ",e),!1}}),[e]);return t})(),{gridSectionsWrapperRefs:{headerGridWrapperRef:o,topGridWrapperRef:i,leftGridWrapperRef:a,dataGridWrapperRef:s},gridRefs:{topGridRef:l,leftGridRef:c,dataGridRef:d},scrollDirectionRefs:{verticalScrollDirection:h,horizontalScrollDirection:f},scrollbarsDimensions:{verticalScrollbarWidth:m,horizontalScrollbarHeight:g,resetHorizontalScrollbarHeight:y}}=LU(),{leftGridWidth:_,leftGridFullWidth:b,leftGridColumnWidths:x,rightGridFullWidth:v,showLastRightBorder:w,getRightGridColumnWidth:S,getHeaderCellsIconsVisibilityStatus:C,overrideLeftGridWidth:E}=function({tableWidth:e,verticalScrollbarWidth:t,resetHorizontalScrollbarHeight:n}){const{layoutService:r,styleService:o}=wV(),{gridSectionsData:{headersData:i}}=sU(),{measureText:a}=F$(o.header),s=EU({tableWidth:e}),l=kU({tableWidth:e,verticalScrollbarWidth:t,leftGridWidth:s.leftGridWidth}),c=s.leftGridWidth+l.rightGridFullWidth+1<e,d=p(((e,t,n="")=>{let o=e;r.isIndentModeEnabled&&(o=1,1===i.size.x&&(o=0));const l=s.leftGridColumnWidths[o];let c=!1,u=!1,d=a(n)+uU;return t&&d+cU<=l&&(u=!0,d+=cU),d+cU<=l&&(c=!0),{shouldShowMenuIcon:c,shouldShowLockIcon:u}}),[s.leftGridColumnWidths,a,r.isIndentModeEnabled,i.size.x]);return u((()=>{const e=s.leftGridWidth===s.leftGridFullWidth,t=l.rightGridWidth===l.rightGridFullWidth;e&&t&&n()}),[n,s.leftGridWidth,s.leftGridFullWidth,l.rightGridWidth,l.rightGridFullWidth]),{...s,...l,showLastRightBorder:c,getHeaderCellsIconsVisibilityStatus:d}}({tableWidth:n.width,verticalScrollbarWidth:m,resetHorizontalScrollbarHeight:y}),{gridScaffoldDimensions:k,headerGridDims:M,topGridDims:R,leftGridDims:A,dataGridDims:I,metadata:{everyThingFitsInTableRectHeight:P,scrollbarsVisibilityStatus:O}}=(({cellHeights:{headerCellHeight:e,contentCellHeight:t},horizontalWidths:{leftGridWidth:n,leftGridOriginalWidth:r,rightGridOriginalWidth:o},scrollBarsDimensions:{verticalScrollbarWidth:i,horizontalScrollbarHeight:a}})=>{const s=DU(),{pageInfo:l}=gV(),{gridSectionsData:{headersData:c,topDimensionData:u}}=sU(),d=Math.min(s.height*dU,Math.max(s.height*dU-25,s.height-t-a)),p=s.width*dU,h=l.rowsOnCurrentPage*t,f=Math.max(c.size.y,u.rowCount,1),m=e*f,g=e*f,y=Math.min(p,n),_=s.width-p,b=Math.max(_,s.width-y),x=Math.min(d,m,g),{availableHeight:v,everyThingFitsInTableRectHeight:w,everyThingFitsInTableRectWidth:S}=((e,t,n)=>{const r=t+1+n+i<=s.width,o=e+1+h+a,l=o-s.height<a||o<=s.height;return{availableHeight:l?o:s.height,everyThingFitsInTableRectHeight:l,everyThingFitsInTableRectWidth:r}})(x,y,b),C=v-d,E=Math.max(C,v-x),k=Math.min(E,h),M=Math.min(E,h),R=m+1+h,{visibilityStatus:A,metadata:{hasLeftGridOverflowX:I,hasDataGridOverflowX:P}}=(e=>{const{gridScaffold:{X_AXIS:{leftSectionWidth:t,rightSectionWidth:n},Y_AXIS:{topSectionHeight:r,bottomSectionHeight:o}},gridOriginalWidth:{X_AXIS:{leftSectionFullWidth:i,rightSectionFullWidth:a},Y_AXIS:{topSectionFullHeight:s,bottomSectionFullHeight:l}}}=e,c=s>r,u=i>t,d=a>n,p=l>o;return{visibilityStatus:{topGrid:{overflowX:"hidden",overflowY:c?"scroll":"hidden"},leftGrid:{overflowX:u?"scroll":"hidden",overflowY:"hidden"},dataGrid:{overflowX:d?"scroll":"hidden",overflowY:p?"scroll":"hidden"}},metadata:{hasTopGridOverflowY:c,hasLeftGridOverflowX:u,hasDataGridOverflowX:d,hasDataGridOverflowY:p}}})({gridScaffold:{X_AXIS:{leftSectionWidth:y,rightSectionWidth:b},Y_AXIS:{topSectionHeight:x,bottomSectionHeight:E}},gridOriginalWidth:{X_AXIS:{leftSectionFullWidth:r,rightSectionFullWidth:o},Y_AXIS:{topSectionFullHeight:g,bottomSectionFullHeight:R-g}}});return{gridScaffoldDimensions:{width:s.width,height:s.height,gridTemplateColumns:`${y}px ${b}px`,gridTemplateRows:`${x}px ${E}px`},headerGridDims:{width:-1,height:x},topGridDims:{fullSizeWrapper:{width:o-i+(P?i:0),height:g},stickyWrapper:{width:b-1-i,height:-1},self:{width:Math.min(o,b)-(S?1:0)-i,height:g}},leftGridDims:{fullSizeWrapper:{width:y,height:R-g+(!I&&P?a:0)},stickyWrapper:{width:y,height:E-1-a},self:{width:y,height:Math.max(t,k-(w?0:a-1))}},dataGridDims:{fullSizeWrapper:{width:o-i+(P?i:0),height:R-g+(!P&&I?a:0)},stickyWrapper:{width:b-1-i,height:E-1-a},self:{width:Math.min(o,b)-(S?1:0)-i,height:Math.max(t,M-(w?0:a-1))}},metadata:{everyThingFitsInTableRectHeight:w,scrollbarsVisibilityStatus:A}}})({cellHeights:{headerCellHeight:e,contentCellHeight:t},horizontalWidths:{leftGridWidth:_,leftGridOriginalWidth:b,rightGridOriginalWidth:v},scrollBarsDimensions:{verticalScrollbarWidth:m,horizontalScrollbarHeight:g}}),L=p((()=>e),[e]),D=p((()=>t),[t]);return(()=>{const{downloadService:e}=wV();u((()=>{e.isDownloadedAsPDForImage&&e.notifyIsDoneRendering()}))})(),Uo.jsxs(zU,{style:k,children:[Uo.jsx("div",{style:{overflow:"hidden"},ref:o,children:Uo.jsx(BX,{tableWidth:n.width,leftGridWidth:_,columnWidths:x,getHeaderCellsIconsVisibilityStatus:C,rowHight:e,height:M.height,changeSortOrder:r,overrideLeftGridWidth:E})}),Uo.jsx(qU,{style:O.topGrid,origin:iW.TopGrid,ref:i,children:Uo.jsx(TU,{style:R.fullSizeWrapper,children:Uo.jsx(FU,{style:R.stickyWrapper,children:Uo.jsx(foe,{topGridRef:l,rowHightCallback:L,...R.self,showLastBorder:{right:w,bottom:!1},getRightGridColumnWidth:S})})})}),Uo.jsx(qU,{style:O.leftGrid,origin:iW.LeftGrid,ref:a,children:Uo.jsx(TU,{style:A.fullSizeWrapper,children:Uo.jsx(FU,{style:A.stickyWrapper,children:Uo.jsx(uoe,{leftGridRef:c,...A.self,columnWidths:x,showLastBorder:{right:!1,bottom:P}})})})}),Uo.jsx(qU,{style:O.dataGrid,origin:iW.DataGrid,ref:s,children:Uo.jsx(TU,{style:I.fullSizeWrapper,children:Uo.jsx(FU,{style:I.stickyWrapper,children:Uo.jsx(lX,{dataGridRef:d,rowHightCallback:D,...I.self,showLastBorder:{right:w,bottom:P},getRightGridColumnWidth:S,verticalScrollDirection:h,horizontalScrollDirection:f})})})})]})},goe=()=>{const{keyboard:e,theme:t,interactions:n,translator:r}=bV(),{pageInfo:o,updatePageInfo:i,rect:a}=gV(),{layoutService:s}=wV(),{layout:l,hasData:c}=s;return Uo.jsxs(Uo.Fragment,{children:[c?Uo.jsx(moe,{}):null,Uo.jsx(CV,{}),Uo.jsx(fV,{paginationNeeded:o.shouldShowPagination,handleChangePage:e=>{i({page:e})},pageInfo:o,totalRowCount:o.totalRowCount,totalColumnCount:0,totalPages:o.totalPages,keyboard:e,translator:r,theme:t,interactions:n,rect:a,layout:l})]})},yoe={WHITE:"#FFFFFF",GREEN_ULTRA_LIGHT:"#F2F9F5",GREEN:"#00873D",GREEN_PALE:"#15AA51",GREEN_DARK:"#0D6932",GREEN_EXTRA_DARK:"#094923",BLUE_ULTRA_LIGHT:"#EDF7FC",BLUE:"#005DB9",BLUE_PALE:"#048DEC",BLUE_DARK:"#003A8F",BLUE_EXTRA_DARK:"#002D6D",RED_ULTRA_LIGHT:"#FEF2F6",RED:"#D7004B",RED_PALE:"#F15A81",RED_DARK:"#8B0041",RED_EXTRA_DARK:"#5C002B",ORANGE_ULTRA_LIGHT:"#FFF7EB",ORANGE:"#EF6D00",ORANGE_PALE:"#FF9800",ORANGE_DARK:"#BF3900",ORANGE_EXTRA_DARK:"#611100",PURPLE:"#655dc6",PURPLE_PALE:"#8D8BCE",PURPLE_DARK:"#413885",GREYSCALE_0:"#000000",GREYSCALE_5:"#0E0E0E",GREYSCALE_10:"#1A1A1A",GREYSCALE_15:"#262626",GREYSCALE_20:"#333333",GREYSCALE_25:"#404040",GREYSCALE_30:"#4D4D4D",GREYSCALE_35:"#595959",GREYSCALE_40:"#666666",GREYSCALE_45:"#737373",GREYSCALE_50:"#808080",GREYSCALE_55:"#8C8C8C",GREYSCALE_60:"#999999",GREYSCALE_65:"#A6A6A6",GREYSCALE_70:"#B3B3B3",GREYSCALE_75:"#BFBFBF",GREYSCALE_80:"#CCCCCC",GREYSCALE_85:"#D9D9D9",GREYSCALE_90:"#E6E6E6",GREYSCALE_95:"#F2F2F2",GREYSCALE_98:"#FAFAFA",GREYSCALE_100:"#FFFFFF",GREYSCALE_0_0:"rgba(0, 0, 0, 0)",GREYSCALE_0_03:"rgba(0, 0, 0, 0.03)",GREYSCALE_0_05:"rgba(0, 0, 0, 0.05)",GREYSCALE_0_06:"rgba(0, 0, 0, 0.06)",GREYSCALE_0_10:"rgba(0, 0, 0, 0.1)",GREYSCALE_0_15:"rgba(0, 0, 0, 0.15)",GREYSCALE_0_20:"rgba(0, 0, 0, 0.2)",GREYSCALE_0_30:"rgba(0, 0, 0, 0.3)",GREYSCALE_0_42:"rgba(0, 0, 0, 0.42)",GREYSCALE_0_55:"rgba(0, 0, 0, 0.55)",GREYSCALE_0_60:"rgba(0, 0, 0, 0.6)",GREYSCALE_100_15:"rgba(255, 255, 255, 0.15)",GREYSCALE_100_50:"rgba(255, 255, 255, 0.5)",GREYSCALE_100_60:"rgba(255, 255, 255, 0.6)",MISC_FOCUS_BORDER:"#0275D9",TEXT_PRIMARY:"#404040",TEXT_SECONDARY:"rgba(0, 0, 0, 0.55)"},_oe=12,boe=14,xoe=16,voe=24,woe=3,Soe=300,Coe=400,Eoe=600,koe=700,Moe={FONT_FAMILY:"'Source Sans Pro', 'HelveticaNeue', 'Helvetica Neue', Helvetica, Arial, sans-serif"};function Roe(e){return Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",...e,children:Uo.jsx("path",{d:"m8 9 4.5-4.5L14 6l-4.5 4.5L8 12 2 6l1.5-1.5L8 9Z"})})}var Aoe=function({fontSize:e="medium",children:t=null,className:n=""}={}){return Uo.jsx("i",{style:{fontSize:"small"===e?"16px":"20px",margin:"small"===e?"-2px 0":void 0,display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},className:n,children:t})};function Ioe(e={}){return Uo.jsx(Aoe,{...e,children:Uo.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20",children:[Uo.jsx("rect",{width:"20",height:"20",fill:"currentColor",rx:"3"}),Uo.jsx("path",{fill:"#FFFFFF",fillRule:"evenodd",d:"m12.627 6.617-4.206 4.205-1.037-1.035a1.25 1.25 0 1 0-1.768 1.767l1.92 1.919a1.25 1.25 0 0 0 1.769 0l5.09-5.089a1.25 1.25 0 1 0-1.768-1.768Z",clipRule:"evenodd"})]})})}function Poe(e={}){return Uo.jsx(Aoe,{fontSize:"medium",...e,children:Uo.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Uo.jsx("rect",{stroke:"none",width:"16",height:"16",rx:"8",fill:"currentColor"}),Uo.jsx("path",{d:"M11 8C11 9.65685 9.65685 11 8 11C6.34315 11 5 9.65685 5 8C5 6.34315 6.34315 5 8 5C9.65685 5 11 6.34315 11 8Z",stroke:"none",fill:"white"})]})})}function Ooe(e){return Uo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",...e,children:Uo.jsx("path",{d:"m9.345 8 3.982 3.982a.951.951 0 0 1-1.345 1.345L8 9.345l-3.982 3.982a.951.951 0 0 1-1.345-1.345L6.655 8 2.673 4.018a.951.951 0 0 1 1.345-1.345L8 6.655l3.982-3.982a.951.951 0 1 1 1.345 1.345L9.345 8Z"})})}function Loe(e={}){return Uo.jsx(Aoe,{...e,children:Uo.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:Uo.jsxs("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:[Uo.jsx("rect",{fill:"currentColor",x:"0",y:"0",width:"16",height:"16",rx:"3"}),Uo.jsx("rect",{fill:"#FFFFFF",x:"4",y:"7",width:"8",height:"2",rx:"1"})]})})})}function Doe(e={}){return Uo.jsx(Aoe,{fontSize:"medium",...e,children:Uo.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:Uo.jsx("g",{strokeWidth:"1",fillRule:"evenodd",fillOpacity:"0.603119339",strokeOpacity:"0.146654212",children:Uo.jsx("rect",{stroke:"currentStroke",fill:"currentFill",x:"0.5",y:"0.5",width:"15",height:"15",rx:"7.5"})})})})}function Toe({className:e}){return Uo.jsx(Aoe,{fontSize:"small",className:e,children:Uo.jsx("svg",{width:"8px",height:"14px",viewBox:"0 0 8 14",version:"1.1","aria-labelledby":"SortIcon",children:Uo.jsx("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:Uo.jsx("g",{transform:"translate(-4.000000, -1.000000)",fill:"#404040",fillRule:"nonzero",children:Uo.jsxs("g",{transform:"translate(4.324187, 1.300372)",children:[Uo.jsx("path",{d:"M4.06624695,13.2115849 L7.28588573,9.1870364 C7.3893886,9.05765782 7.36841219,8.8688701 7.23903361,8.76536724 C7.18583969,8.72281211 7.11974654,8.69962788 7.05162509,8.69962788 L0.3,8.69962788 C0.134314575,8.69962788 -1.25807407e-14,8.83394246 -1.26010313e-14,8.99962788 C-1.26093738e-14,9.06774933 0.0231842256,9.13384248 0.0657393572,9.1870364 L3.28537814,13.2115849 C3.45788292,13.4272158 3.7725291,13.4621765 3.98816007,13.2896718 C4.01699242,13.2666059 4.04318107,13.2404172 4.06624695,13.2115849 Z",opacity:"0.300390625"}),Uo.jsx("path",{d:"M4.06624695,0.187670888 L7.28588573,4.21221937 C7.3893886,4.34159795 7.36841219,4.53038566 7.23903361,4.63388852 C7.18583969,4.67644366 7.11974654,4.69962788 7.05162509,4.69962788 L0.3,4.69962788 C0.134314575,4.69962788 2.1918781e-12,4.56531331 2.19185781e-12,4.39962788 C2.19184946e-12,4.33150643 0.0231842256,4.26541328 0.0657393572,4.21221937 L3.28537814,0.187670888 C3.45788292,-0.0279600799 3.7725291,-0.0629207673 3.98816007,0.109584007 C4.01699242,0.132649888 4.04318107,0.158838536 4.06624695,0.187670888 Z"})]})})})})})}function zoe(e={}){return Uo.jsx(Aoe,{...e,children:Uo.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:Uo.jsx("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:Uo.jsx("rect",{stroke:yoe.GREYSCALE_0_42,fill:"currentColor",x:"0.5",y:"0.5",width:"15",height:"15",rx:"3"})})})})}const joe={MuiButtonBase:{defaultProps:{disableRipple:!0,disableTouchRipple:!0,focusVisibleClassName:"sprout-focus-visible"},styleOverrides:{root:{}}},MuiButton:{defaultProps:{color:"inherit",disableRipple:!0,focusVisibleClassName:"sprout-focus-visible"},styleOverrides:{root:{height:"32px",lineHeight:"16px",minWidth:"24px",fontSize:14,borderRadius:woe,"& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"},transition:"unset",color:"var(--sprout-common-foreground-color-default)",boxShadow:"none","&:hover":{backgroundColor:"var(--sprout-common-background-color-hover)"},"&:active":{backgroundColor:"var(--sprout-common-background-color-pressed)"},"&.Mui-disabled":{backgroundColor:"var(--sprout-common-background-color-disabled)"},"&.Mui-focusVisible":{outline:"var(--sprout-focus-border-default)",outlineOffset:"calc(var(--sprout-focus-border-default-width) / -2)",backgroundColor:"var(--sprout-focus-background-color-default)",zIndex:100}},text:{padding:"8px 16px",backgroundColor:"transparent"},textPrimary:{color:"var(--sprout-brand-primary-color-default)"},textSecondary:{color:"var(--sprout-info-color-default)"},textWarning:{color:"var(--sprout-warning-color-default)"},textError:{color:"var(--sprout-danger-color-default)"},outlined:{padding:"7px 16px",border:"var(--sprout-common-border-moderate)",backgroundColor:"var(--sprout-common-background-color-enabled)","&.Mui-focusVisible":{borderColor:"transparent"},"&:hover":{border:"var(--sprout-common-border-moderate)"}},outlinedPrimary:{borderColor:"var(--sprout-brand-primary-color-default)",color:"var(--sprout-brand-primary-color-default)","&:hover":{borderColor:"var(--sprout-brand-primary-color-default)"}},outlinedSecondary:{borderColor:"var(--sprout-info-color-default)",color:"var(--sprout-info-color-default)","&:hover":{borderColor:"var(--sprout-info-color-default)"}},outlinedWarning:{borderColor:"var(--sprout-warning-color-default)",color:"var(--sprout-warning-color-default)","&:hover":{borderColor:"var(--sprout-warning-color-default)"}},outlinedError:{borderColor:"var(--sprout-danger-color-default)",color:"var(--sprout-danger-color-default)","&:hover":{borderColor:"var(--sprout-danger-color-default)"}},contained:{color:"var(--sprout-brand-primary-color-inverse)",backgroundColor:"var(--sprout-brand-primary-color-default)",padding:"8px 16px","&:hover":{backgroundColor:"var(--sprout-brand-primary-color-hover)"},"&:active":{backgroundColor:"var(--sprout-brand-primary-color-pressed)"},"&.Mui-focusVisible":{outline:"var(--sprout-focus-border-default)",outlineOffset:"var(--sprout-focus-border-default-width)",background:"var(--sprout-brand-primary-color-focus)"}},containedError:{backgroundColor:"var(--sprout-danger-color-default)","&:hover":{backgroundColor:"var(--sprout-danger-color-hover)"},"&:active":{backgroundColor:"var(--sprout-danger-color-pressed)"},"&.Mui-focusVisible":{outlineColor:"var(--sprout-danger-color-inverse)",backgroundColor:"var(--sprout-danger-color-focus)"}},sizeSmall:{fontSize:12,height:"24px","& > svg:only-child, & > i:only-child":{marginLeft:"-7px",marginRight:"-7px"}},sizeLarge:{fontSize:16,height:"40px",lineHeight:"20px","& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},textSizeSmall:{padding:"4px 11px"},textSizeLarge:{padding:"10px 19px"},outlinedSizeSmall:{padding:"3px 11px"},outlinedSizeLarge:{padding:"9px 19px"},containedSizeSmall:{padding:"4px 11px"},containedSizeLarge:{padding:"10px 19px"}},variants:[]}};var Noe=e=>({MuiAccordion:{styleOverrides:{root:{backgroundColor:yoe.GREYSCALE_98,"&:before":{backgroundColor:"unset"},"&.Mui-expanded":{margin:"0px"}}}},MuiAccordionDetails:{styleOverrides:{root:{backgroundColor:yoe.WHITE}}},MuiAccordionSummary:{defaultProps:{expandIcon:Uo.jsx(Roe,{"aria-hidden":"true",viewBox:"0 0 16 16",width:16,height:16})},styleOverrides:{root:{padding:"0px 12px 0px 16px",minHeight:"auto",boxShadow:`inset 0px -1px 0px 0px ${yoe.GREYSCALE_0_15}`,"&.Mui-focusVisible":{borderColor:yoe.MISC_FOCUS_BORDER,boxShadow:`inset 0 0 0 2px ${yoe.MISC_FOCUS_BORDER}`,borderRadius:woe,backgroundColor:yoe.GREYSCALE_0_03},"&.Mui-expanded":{minHeight:"auto"}},content:{overflow:"hidden",textOverflow:"ellipsis","&.Mui-expanded":{margin:"12px 0px"}}}},MuiAppBar:{defaultProps:{elevation:0},styleOverrides:{root:{flex:"0 0 48px",boxShadow:`inset 0 -1px 0 0 ${yoe.GREYSCALE_0_15}`},colorPrimary:{backgroundColor:yoe.WHITE,color:yoe.TEXT_PRIMARY}}},MuiBadge:{styleOverrides:{badge:{height:"16px",minWidth:"16px",fontSize:"12px",padding:"0px 5px"},anchorOriginTopRightRectangular:{top:"-3px",right:"-3px"}}},MuiButtonBase:{defaultProps:{disableRipple:!0,disableTouchRipple:!0,focusVisibleClassName:"sprout-focus-visible"}},MuiButtonGroup:{defaultProps:{disableRipple:!0},styleOverrides:{root:{height:"32px",lineHeight:"16px",fontSize:14,borderRadius:woe},text:{padding:"8px 16px","&.Mui-focusVisible":{boxShadow:`0 0 0 2px ${yoe.MISC_FOCUS_BORDER}`}},outlined:{padding:"7px 16px",borderColor:yoe.GREYSCALE_0_15,backgroundColor:yoe.GREYSCALE_100_60,"&.Mui-focusVisible":{borderColor:yoe.MISC_FOCUS_BORDER,boxShadow:`0 0 0 1px ${yoe.MISC_FOCUS_BORDER}`}},contained:{padding:"8px 16px",boxShadow:"none","&:hover":{boxShadow:"none"},"&:active":{boxShadow:"none"}},groupedContainedPrimary:{"&:hover":{backgroundColor:yoe.GREEN_PALE},"&:active":{backgroundColor:yoe.GREEN_DARK},"&.Mui-focusVisible":{borderColor:yoe.GREEN_PALE,boxShadow:`0 0 0 3px ${eL(yoe.GREEN_PALE,.5)}`}},groupedContainedSecondary:{"&:hover":{backgroundColor:yoe.BLUE_PALE},"&:active":{backgroundColor:yoe.BLUE_DARK},"&.Mui-focusVisible":{borderColor:yoe.BLUE_PALE,boxShadow:`0 0 0 3px ${eL(yoe.BLUE_PALE,.5)}`}}},variants:[{props:{size:"small"},style:{height:"24px"}},{props:{size:"large"},style:{height:"40px"}}]},MuiButton:{defaultProps:{color:"inherit",disableRipple:!0,focusVisibleClassName:"sprout-focus-visible"},styleOverrides:{root:{height:"32px",lineHeight:"16px",minWidth:"24px",fontSize:14,borderRadius:woe,"& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},text:{padding:"8px 16px","&:active":{backgroundColor:yoe.GREYSCALE_0_10},"&.Mui-focusVisible":{boxShadow:`0 0 0 2px ${yoe.MISC_FOCUS_BORDER}`}},outlined:({ownerState:e})=>({padding:"7px 16px",borderColor:yoe.GREYSCALE_0_15,backgroundColor:yoe.GREYSCALE_100_60,"&:active":{backgroundColor:yoe.GREYSCALE_0_10},"&.Mui-focusVisible":{borderColor:yoe.MISC_FOCUS_BORDER,boxShadow:`0 0 0 1px ${yoe.MISC_FOCUS_BORDER}`},..."amethyst"===e.color&&{borderColor:yoe.PURPLE,"&.Mui-focusVisible":{borderColor:yoe.PURPLE,boxShadow:`0 0 0 3px ${eL(yoe.PURPLE_PALE,.5)}`}}}),outlinedPrimary:{borderColor:yoe.GREEN,"&.Mui-focusVisible":{borderColor:yoe.GREEN,boxShadow:`0 0 0 3px ${eL(yoe.GREEN_PALE,.5)}`}},outlinedSecondary:{borderColor:yoe.BLUE,"&.Mui-focusVisible":{borderColor:yoe.BLUE,boxShadow:`0 0 0 3px ${eL(yoe.BLUE_PALE,.5)}`}},outlinedWarning:{borderColor:yoe.ORANGE,"&.Mui-focusVisible":{borderColor:yoe.ORANGE,boxShadow:`0 0 0 3px ${eL(yoe.ORANGE_PALE,.5)}`}},outlinedError:{borderColor:yoe.RED,"&.Mui-focusVisible":{borderColor:yoe.RED,boxShadow:`0 0 0 3px ${eL(yoe.RED_PALE,.5)}`}},contained:({ownerState:e})=>({color:yoe.WHITE,padding:"8px 16px",boxShadow:"none","&:hover":{boxShadow:"none"},"&:active":{boxShadow:"none"},..."amethyst"===e.color&&{"&:hover":{backgroundColor:yoe.PURPLE_PALE},"&:active":{backgroundColor:yoe.PURPLE_DARK},"&.Mui-focusVisible":{borderColor:yoe.PURPLE_PALE,boxShadow:`0 0 0 3px ${eL(yoe.PURPLE_PALE,.5)}`}}}),containedPrimary:{"&:hover":{backgroundColor:yoe.GREEN_PALE},"&:active":{backgroundColor:yoe.GREEN_DARK},"&.Mui-focusVisible":{borderColor:yoe.GREEN_PALE,boxShadow:`0 0 0 3px ${eL(yoe.GREEN_PALE,.5)}`}},containedSecondary:{"&:hover":{backgroundColor:yoe.BLUE_PALE},"&:active":{backgroundColor:yoe.BLUE_DARK},"&.Mui-focusVisible":{borderColor:yoe.BLUE_PALE,boxShadow:`0 0 0 3px ${eL(yoe.BLUE_PALE,.5)}`}},containedWarning:{"&:hover":{backgroundColor:yoe.ORANGE_PALE},"&:active":{backgroundColor:yoe.ORANGE_DARK},"&.Mui-focusVisible":{borderColor:yoe.ORANGE_PALE,boxShadow:`0 0 0 3px ${eL(yoe.ORANGE_PALE,.5)}`}},containedError:{"&:hover":{backgroundColor:yoe.RED_PALE},"&:active":{backgroundColor:yoe.RED_DARK},"&.Mui-focusVisible":{borderColor:yoe.RED_PALE,boxShadow:`0 0 0 3px ${eL(yoe.RED_PALE,.5)}`}},sizeSmall:{fontSize:12,height:"24px","& > svg:only-child, & > i:only-child":{marginLeft:"-7px",marginRight:"-7px"}},sizeLarge:{fontSize:16,height:"40px",lineHeight:"20px","& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},textSizeSmall:{padding:"4px 11px"},textSizeLarge:{padding:"10px 19px"},outlinedSizeSmall:{padding:"3px 11px"},outlinedSizeLarge:{padding:"9px 19px"},containedSizeSmall:{padding:"4px 11px"},containedSizeLarge:{padding:"10px 19px"}},variants:[]},MuiCardActionArea:{styleOverrides:{root:{height:"100%","&.MuiCardActionArea-focusHighlight":{opacity:0},"&:hover":{boxShadow:"none",backgroundColor:yoe.GREYSCALE_0_03,"&.MuiCardActionArea-focusHighlight":{opacity:0}},"&:active":{backgroundColor:yoe.GREYSCALE_95,boxShadow:"none"},"&.Mui-focusVisible":{borderRadius:woe,boxShadow:`inset 0 0 0 2px ${yoe.MISC_FOCUS_BORDER}`,"&.MuiCardActionArea-focusHighlight":{opacity:0}}}}},MuiChip:{defaultProps:{deleteIcon:Uo.jsx(Ooe,{"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),variant:"outlined"},styleOverrides:{root:{height:"24px",fontSize:_oe,borderRadius:woe,color:yoe.TEXT_PRIMARY,backgroundColor:yoe.GREYSCALE_100_15,"&.sprout-focus-visible":{borderColor:yoe.MISC_FOCUS_BORDER,boxShadow:`0px 0px 0px 1px ${yoe.MISC_FOCUS_BORDER}`},"&.Mui-focusVisible":{backgroundColor:yoe.GREYSCALE_0_03},"&.Mui-disabled":{backgroundColor:yoe.GREYSCALE_0_05,color:yoe.GREYSCALE_0_30,border:"none",opacity:1},"&.MuiChip-outlinedSuccess":{color:yoe.GREEN,borderColor:yoe.GREEN},"&.MuiChip-outlinedInfo":{color:yoe.BLUE,borderColor:yoe.BLUE},"&.MuiChip-outlinedWarning":{color:yoe.ORANGE,borderColor:yoe.ORANGE},"&.MuiChip-outlinedError":{color:yoe.RED,borderColor:yoe.RED}},outlined:{border:`solid 1px ${yoe.GREYSCALE_0_15}`,backgroundColor:yoe.GREYSCALE_100_15,".MuiChip-clickable&:active ":{boxSizing:"border-box",borderRadius:woe,boxShadow:"none",backgroundColor:yoe.GREYSCALE_0_10},"&.MuiChip-deleteIconSmall":{height:13,color:"inherit"}},outlinedPrimary:{color:yoe.GREEN,borderColor:yoe.GREEN},outlinedSecondary:{color:yoe.BLUE,borderColor:yoe.BLUE},label:{fontFamily:Moe.FONT_FAMILY,lineHeight:"16px"}}},MuiAutocomplete:{defaultProps:{clearIcon:Uo.jsx(Ooe,{"aria-hidden":"true",viewBox:"0 0 16 16",height:12,width:12}),popupIcon:Uo.jsx(Roe,{"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),forcePopupIcon:!0},styleOverrides:{root:{"& .MuiAutocomplete-endAdornment > button":{border:"none",backgroundColor:"unset"}},input:{"&.MuiAutocomplete-input":{padding:"6px 4px"}},inputRoot:{padding:"0px 2px",boxSizing:"border-box",borderRadius:woe},listbox:{padding:"0","& .MuiAutocomplete-option":{height:"32px",minHeight:"32px"}},option:{borderRadius:woe,fontSize:boe,height:"32px",padding:"6px 16px",minHeight:"32px","&.MuiAutocomplete-option.Mui-focused":{backgroundColor:yoe.GREYSCALE_0_03,"&.Mui-focusVisible":{border:`solid 2px ${yoe.MISC_FOCUS_BORDER}`,padding:"4px 14px"}},'&.MuiAutocomplete-option[aria-selected="true"]':{backgroundColor:yoe.GREYSCALE_0_05,"&.Mui-focused":{backgroundColor:yoe.GREYSCALE_0_05},"&.Mui-focusVisible":{backgroundColor:yoe.GREYSCALE_0_05}}},popupIndicator:{borderRadius:woe,border:`solid 1px ${yoe.GREYSCALE_0_15}`,color:yoe.GREYSCALE_0_60,marginRight:0,width:voe,height:voe},paper:{marginTop:"4px",boxShadow:`0px 2px 4px 0px ${yoe.GREYSCALE_0_15}`},clearIndicator:{borderRadius:woe,marginRight:"4px"},popupIndicatorOpen:{backgroundColor:yoe.GREYSCALE_0_10}}},MuiFormControlLabel:{styleOverrides:{root:{marginLeft:"-10px"},label:{fontSize:boe}}},MuiFormHelperText:{styleOverrides:{root:{fontSize:_oe,lineHeight:"16px",margin:"4px 0 0 0","&.Mui-error":{color:yoe.RED}},contained:{marginLeft:0,marginRight:0}}},MuiFormLabel:{styleOverrides:{root:{color:yoe.GREYSCALE_25,fontSize:_oe,fontFamily:Moe.FONT_FAMILY,fontWeight:Eoe,fontStretch:"normal",fontStyle:"normal",letterSpacing:"normal",lineHeight:1,"&.Mui-focused":{color:yoe.TEXT_PRIMARY},"&.Mui-error":{color:yoe.TEXT_SECONDARY},"&[optional=true]":{"&:after":{color:yoe.TEXT_SECONDARY,content:"'(optional)'",fontWeight:Coe,marginLeft:"4px"}}},asterisk:{visibility:"collapse",display:"inline-flex","&::after":{visibility:"visible",color:yoe.TEXT_SECONDARY,content:"'(required)'",fontWeight:Coe,marginLeft:"4px"}}}},MuiOutlinedInput:{defaultProps:{notched:!1},styleOverrides:{root:{fontSize:boe,lineHeight:"16px",backgroundColor:yoe.WHITE,borderRadius:woe,"&:not(.Mui-focused):not(.Mui-error):not(.Mui-disabled):hover .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${yoe.GREYSCALE_0_05}`,borderColor:yoe.GREYSCALE_0_30},"&.Mui-focused:not(.Mui-error) .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${yoe.MISC_FOCUS_BORDER}`,boxShadow:`0px 0px 0px 1px ${yoe.MISC_FOCUS_BORDER}, inset 0 2px 0 0 ${yoe.GREYSCALE_0_05}`},"&.Mui-focused.Mui-error .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${yoe.RED}`,boxShadow:`0px 0px 0px 1px ${yoe.RED}, inset 0 2px 0 0 ${yoe.GREYSCALE_0_05}`},"&.Mui-disabled":{backgroundColor:"transparent"},"&.Mui-disabled .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${yoe.GREYSCALE_0_10}`,borderColor:yoe.GREYSCALE_0_10,backgroundColor:yoe.GREYSCALE_0_05}},adornedStart:{paddingLeft:0},adornedEnd:{paddingRight:0},input:{color:yoe.TEXT_PRIMARY,padding:"6px 12px","&.Mui-disabled":{opacity:.45}},inputSizeSmall:{padding:"0px 12px"},notchedOutline:{borderColor:yoe.GREYSCALE_0_15,borderRadius:woe,boxShadow:`inset 0 2px 0 0 ${yoe.GREYSCALE_0_05}`},multiline:{padding:"0"}}},MuiSelect:{defaultProps:{IconComponent:e=>Uo.jsx(Roe,{...e,"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}}},styleOverrides:{select:{padding:"7px 12px",borderRadius:"3px !important",minHeight:"1em","& em":{color:yoe.TEXT_SECONDARY},"& ~svg":{position:"absolute",right:"12px",top:"unset",cursor:"pointer"},"&[aria-expanded=true]":{backgroundColor:yoe.GREYSCALE_0_05},"& ~fieldset":{boxShadow:"none !important",border:"none !important",backgroundColor:"unset !important"},"&:hover":{backgroundColor:yoe.GREYSCALE_0_03},"&:active":{backgroundColor:yoe.GREYSCALE_0_10},"&:focus":{backgroundColor:yoe.GREYSCALE_0_03,borderRadius:"3px !important",border:`solid 1px ${yoe.MISC_FOCUS_BORDER}`,boxShadow:`inset 0px 0px 0px 1px ${yoe.MISC_FOCUS_BORDER}`},"&.Mui-disabled":{opacity:"unset",color:yoe.GREYSCALE_0_30,"&:hover":{backgroundColor:yoe.GREYSCALE_0_0,borderColor:yoe.GREYSCALE_0_15},"& ~svg":{color:yoe.GREYSCALE_0_30}}},outlined:{border:`solid 1px ${yoe.GREYSCALE_0_15}`},nativeInput:{height:"42px"}}},MuiIconButton:{styleOverrides:{root:{borderRadius:woe}}},MuiInput:{styleOverrides:{root:{"&.Mui-focused":{borderColor:yoe.MISC_FOCUS_BORDER,boxShadow:`0 0 0 2px ${yoe.MISC_FOCUS_BORDER}`}}}},MuiInputAdornment:{styleOverrides:{root:{padding:"4px 8px",color:yoe.GREYSCALE_55},positionStart:{marginRight:0},positionEnd:{marginLeft:0}}},MuiInputBase:{styleOverrides:{root:{fieldset:{boxShadow:"none"}},input:{height:"20px",fontSize:boe,padding:"8px 12px",lineHeight:"16px","&.MuiInputBase-inputAdornedStart":{paddingLeft:0},"&.MuiInputBase-inputAdornedEnd":{paddingRight:0}},sizeSmall:{height:"24px",input:{fontSize:_oe,paddingLeft:"8px"}}}},MuiInputLabel:{defaultProps:{shrink:!0},styleOverrides:{outlined:{fontSize:_oe,fontWeight:Eoe,color:yoe.GREYSCALE_25,"&.MuiInputLabel-shrink":{transform:"translate(0px, -16px)",fontWeight:Eoe}}}},MuiPopover:{styleOverrides:{paper:{minWidth:"160px",top:"60px",marginTop:"5px","&ul":{padding:"0px"},boxShadow:`0px 4px 10px ${yoe.GREYSCALE_0_15}, 0px 0px 0px 1px ${yoe.GREYSCALE_0_05}`}}},MuiRadio:{defaultProps:{size:"small",icon:Uo.jsx(Doe,{}),checkedIcon:Uo.jsx(Poe,{})},styleOverrides:{root:{"&:hover":{backgroundColor:"unset"},fill:yoe.GREYSCALE_100_60,stroke:"black","&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"},"&.sprout-focus-visible i":{borderRadius:"50%",boxShadow:`0 0 0 2px ${yoe.MISC_FOCUS_BORDER}`},"&.Mui-checked":{"&.MuiRadio-colorPrimary":{"&.sprout-focus-visible i":{borderColor:yoe.GREEN_PALE,boxShadow:`0 0 0 3px ${eL(yoe.GREEN_PALE,.5)}`}},"&.MuiRadio-colorSecondary":{"&.sprout-focus-visible i":{borderColor:yoe.BLUE_PALE,boxShadow:`0 0 0 3px ${eL(yoe.BLUE_PALE,.5)}`}},"&.Mui-disabled":{color:yoe.GREYSCALE_0_20}},"&.Mui-disabled":{fill:yoe.GREYSCALE_0_20,stroke:"none"}}}},MuiCheckbox:{defaultProps:{size:"small",icon:Uo.jsx(zoe,{}),checkedIcon:Uo.jsx(Ioe,{}),indeterminateIcon:Uo.jsx(Loe,{})},styleOverrides:{root:{borderWidth:1,"&:hover":{backgroundColor:"unset"},"&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"},"&.sprout-focus-visible i":{borderRadius:woe,boxShadow:" 0px 0px 0px 2px #FFFFFF, 0px 0px 0px 4px #177FE6"},"&:not(.Mui-disabled)":{"&:not(.Mui-checked)":{"&:not(.MuiCheckbox-indeterminate)":{color:yoe.GREYSCALE_100_60,"&:hover":{g:{rect:{stroke:yoe.GREYSCALE_0_55,color:yoe.GREYSCALE_0_03}}},"&.sprout-focus-visible i":{boxShadow:"0px 0px 0px 2px #0275D9",g:{rect:{stroke:"none"}}}}}},"&.Mui-disabled":{"& i":{pointerEvents:"auto",cursor:"not-allowed !important",color:yoe.GREYSCALE_0_15,g:{rect:{stroke:"none"}}}}},colorPrimary:{"&.MuiCheckbox-root":{"&:not(.Mui-disabled)":{"&:hover":{color:yoe.GREEN_DARK}}}},colorSecondary:{"&.MuiCheckbox-root":{"&:not(.Mui-disabled)":{color:yoe.GREYSCALE_0_55,"&:hover":{color:yoe.GREYSCALE_25}}}}}},MuiCircularProgress:{defaultProps:{thickness:3,disableShrink:!0}},MuiDialog:{defaultProps:{fullWidth:!0}},MuiDialogActions:{styleOverrides:{root:{padding:"16px"}}},MuiDialogTitle:{styleOverrides:{root:{display:"flex",alignItems:"center",justifyContent:"space-between",boxSizing:"content-box",minHeight:"31px",padding:"16px 16px 16px 24px",fontSize:"16px",lineHeight:"24px"}}},MuiDialogContentText:{defaultProps:{variant:"body2"},styleOverrides:{root:{marginBottom:0}}},MuiDialogContent:{styleOverrides:{root:{padding:"16px 24px !important"}}},MuiDivider:{styleOverrides:{middle:{margin:"4px 8px"}}},MuiLink:{defaultProps:{underline:"none",color:yoe.MISC_FOCUS_BORDER}},MuiListItemIcon:{styleOverrides:{root:{color:yoe.GREYSCALE_25,minWidth:"16px",marginRight:"16px"}}},MuiListItemText:{styleOverrides:{root:{fontSize:"12px"},primary:{fontSize:boe,color:yoe.TEXT_PRIMARY,lineHeight:"16px",fontWeight:Eoe},secondary:{fontSize:_oe,color:yoe.GREYSCALE_45,fontWeight:Coe,lineHeight:"16px"}}},MuiListItem:{styleOverrides:{root:{fontSize:boe,minHeight:"32px"},gutters:{paddingLeft:"12px",paddingRight:"12px"}}},MuiListItemButton:{styleOverrides:{root:{fontSize:boe,height:"32px"}}},MuiListSubheader:{styleOverrides:{root:{'&[role="option"]':{color:yoe.TEXT_PRIMARY,lineHeight:1.33,padding:"4px 12px",fontWeight:600,fontSize:_oe,borderBottom:`solid 1px ${yoe.GREYSCALE_0_15}`,pointerEvents:"none"}}}},MuiList:{styleOverrides:{padding:{paddingTop:"0px",paddingBottom:"0px"}}},MuiMenuItem:{styleOverrides:{root:{fontSize:boe,color:yoe.GREYSCALE_25,height:"32px",'[class*="MuiListItemIcon-root"]':{minWidth:"16px"},"&:hover":{backgroundColor:yoe.GREYSCALE_0_03},"&.Mui-selected":{backgroundColor:"unset","&:hover":{backgroundColor:yoe.GREYSCALE_0_10},"&.Mui-focusVisible":{backgroundColor:yoe.GREYSCALE_0_10},"&:not(.Mui-disabled)":{"&::after":{content:'url(\'data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?>%0A<svg width="8px" height="7px" viewBox="0 0 8 7" version="1.1"%0A xmlns="http://www.w3.org/2000/svg"%0A xmlns:xlink="http://www.w3.org/1999/xlink" aria-labelledby="Tick">%0A <g stroke="none" stroke-width="1" fill-rule="evenodd">%0A <g transform="translate(0.000000, -1.000000)">%0A <path d="M7.51662484,1.29325 C7.12545778,0.90225 6.49218732,0.90225 6.10202068,1.29325 L2.73658335,4.65725 L1.90722914,3.82925 C1.5170625,3.43825 0.883792042,3.43825 0.492624979,3.82925 C0.102458344,4.21925 0.102458344,4.85225 0.492624979,5.24325 L2.02928127,6.77825 C2.4194479,7.16925 3.05271836,7.16925 3.44388542,6.77825 L7.51662484,2.70725 C7.9077919,2.31725 7.9077919,1.68425 7.51662484,1.29325"></path>%0A </g>%0A </g>%0A</svg>%0A\')',fontFamily:"LUI icons",position:"absolute",fontSize:"10px",right:"10px",color:yoe.RED}}},"&.Mui-focusVisible":{backgroundColor:yoe.GREYSCALE_0_03}},divider:{marginTop:"8px",marginBottom:"8px"},gutters:{paddingLeft:"12px",paddingRight:"12px"}}},MuiMenu:{styleOverrides:{list:{paddingTop:"4px",paddingBottom:"4px"},paper:{marginTop:"4px !important",marginBottom:"4px",background:yoe.WHITE,boxShadow:"0 0 0 1px rgba(0,0,0,0.05), 0 4px 10px 0 rgba(0,0,0,0.15) !important",borderRadius:"2px !important"}}},MuiSlider:{styleOverrides:{root:{color:yoe.GREEN,height:"24px","&.Mui-disabled":{color:yoe.GREYSCALE_0_15}},rail:{backgroundColor:yoe.GREYSCALE_0_05,height:"4px",opacity:"1",border:`solid 1px ${yoe.GREYSCALE_0_05}`,borderRadius:woe,boxShadow:`inset 0px 0px 0px 1px ${yoe.GREYSCALE_0_05}`},track:{height:"4px",backgroundColor:"currentColor",opacity:"1",border:`solid 1px ${yoe.GREYSCALE_0_05}`,borderRadius:woe},thumb:{height:"16px",width:"16px",borderRadius:woe,backgroundColor:yoe.WHITE,boxShadow:`0px 1px 2px 0px ${yoe.GREYSCALE_0_15}, 0px 0px 0px 1px ${yoe.GREYSCALE_0_05}`,"&:hover":{borderRadius:woe,boxShadow:`0 2px 4px 0 ${yoe.GREYSCALE_0_30}, 0 0 0 1px ${yoe.GREYSCALE_0_06}`},"&:focus":{boxShadow:`0 1px 2px 0 ${yoe.GREYSCALE_0_15}, 0 0 0 1px ${yoe.GREYSCALE_0_06}, 0 0 0 2px ${yoe.MISC_FOCUS_BORDER}`},"&.Mui-focusVisible":{boxShadow:`0 1px 2px 0 ${yoe.GREYSCALE_0_15}, 0 0 0 1px ${yoe.GREYSCALE_0_06}, 0 0 0 2px ${yoe.MISC_FOCUS_BORDER}`},"&.Mui-disabled":{width:"16px",height:"16px",marginTop:"-5px",marginLeft:"-8px",backgroundColor:yoe.GREYSCALE_90},"& .custom-bar":{height:"8px",width:"1px",backgroundColor:yoe.GREYSCALE_0_30,marginLeft:1,marginRight:1}},mark:{width:"1px",height:"4px",margin:"16px 0px 0px 0px",backgroundColor:yoe.GREYSCALE_0_15},markActive:{opacity:1,backgroundColor:yoe.GREYSCALE_0_15},markLabel:{color:yoe.TEXT_SECONDARY,transform:"translateX(-50%)",top:"35px"},markLabelActive:{color:yoe.TEXT_SECONDARY,transform:"translateX(-50%)",top:"35px"}}},MuiSnackbar:{defaultProps:{anchorOrigin:{vertical:"bottom",horizontal:"center"}}},MuiSnackbarContent:{styleOverrides:{root:{backgroundColor:yoe.WHITE,color:yoe.GREYSCALE_25}}},MuiSwitch:{defaultProps:{color:"primary",size:"small"},styleOverrides:{root:{padding:"10px",width:"60px",height:"40px","& .MuiSwitch-switchBase":{"&:hover":{backgroundColor:"unset"},"&.Mui-checked":{"&:hover":{backgroundColor:"unset"}}}},switchBase:{padding:"12px","&.Mui-disabled":{"&.MuiSwitch-thumb":{backgroundColor:yoe.GREYSCALE_100_50}},"&.Mui-checked + .MuiSwitch-track":{opacity:1},"&.Mui-disabled + .MuiSwitch-track":{opacity:.12},"&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"}},colorPrimary:{"&.sprout-focus-visible + .MuiSwitch-track":{borderColor:yoe.GREEN_PALE,boxShadow:`0 0 0 3px ${eL(yoe.GREEN_PALE,.5)}`}},colorSecondary:{"&.sprout-focus-visible + .MuiSwitch-track":{borderColor:yoe.BLUE_PALE,boxShadow:`0 0 0 3px ${eL(yoe.BLUE_PALE,.5)}`}},track:{opacity:1,backgroundColor:yoe.GREYSCALE_0_15,borderRadius:woe},thumb:{height:"16px",width:"16px",borderRadius:woe,backgroundColor:yoe.GREYSCALE_100},sizeSmall:{height:"32px",width:"52px",padding:"8px 10px","& .MuiSwitch-thumb":{height:"12px",width:"12px"},"& .MuiSwitch-switchBase":{padding:"10px 12px"}}}},MuiTextField:{defaultProps:{margin:"dense",variant:"outlined"},styleOverrides:{root:{marginBottom:0}}},MuiTab:{styleOverrides:{root:{fontSize:boe,fontWeight:Eoe,textTransform:"none",minWidth:"auto",boxSizing:"border-box",paddingBottom:"12px","&:hover":{borderBottom:`2px solid ${yoe.GREYSCALE_80}`,paddingBottom:"10px"},"&.sprout-focus-visible":{boxShadow:`inset 0 0 0 2px ${yoe.MISC_FOCUS_BORDER}`,backgroundColor:yoe.GREYSCALE_0_03,borderRadius:woe},"&.Mui-disabled":{opacity:.3}},textColorPrimary:{color:yoe.GREYSCALE_25,"&.Mui-selected":{color:yoe.GREYSCALE_25}},textColorInherit:{opacity:"unset"},labelIcon:{minWidth:"40px",minHeight:"48px"}}},MuiTabs:{defaultProps:{indicatorColor:"primary",textColor:"primary"},styleOverrides:{root:{fontSize:boe,fontWeight:"bold"},scroller:{height:"100%"},flexContainer:{"&:not(.MuiTabs-flexContainerVertical)":{height:"100%",marginLeft:2,marginRight:2}},indicator:{height:2},scrollButtons:{borderRadius:woe,"&:hover":{backgroundColor:yoe.GREYSCALE_0_03},"&.Mui-disabled":{opacity:"unset","& .MuiSvgIcon-root":{opacity:.3}}},vertical:{padding:"8px",boxSizing:"border-box","& .MuiTabs-indicator":{left:0,right:"unset",transition:"none",clipPath:"inset(12px 0 12px 0)",marginLeft:"1px"},"& .MuiTabs-scrollButtons":{flexDirection:"column",position:"relative","&:first-child":{marginBottom:"4px","&::before":{content:'""',display:"block",width:"100%",height:"1px",borderBottom:`1px solid ${yoe.GREYSCALE_0_15}`,position:"absolute",bottom:0,left:0}},"&:last-child":{marginTop:"4px","&::before":{content:'""',display:"block",width:"100%",height:"1px",borderBottom:`1px solid ${yoe.GREYSCALE_0_15}`,position:"absolute",top:0,left:0}}},"& .MuiTab-root":{fontWeight:"normal",borderRadius:woe,marginBlock:"4px","&:first-child":{marginTop:"0px"},"&:last-child":{marginBottom:"0px"},"&.Mui-selected":{backgroundColor:yoe.GREYSCALE_0_05},"&:hover":{backgroundColor:yoe.GREYSCALE_0_03,borderBottomColor:"transparent"}}}}},MuiTableCell:{styleOverrides:{root:{padding:"0px 8px 0px 16px",borderBottom:`1px solid ${yoe.GREYSCALE_85}`,borderRight:`1px solid ${yoe.GREYSCALE_85}`,height:"39px"},head:{height:"41px",fontWeight:Eoe,backgroundColor:yoe.GREYSCALE_98},paddingCheckbox:{width:"40px",padding:"0px"},paddingNone:{padding:"0px"},sizeSmall:{padding:"0px 8px",height:"29px","&.MuiTableCell-head":{height:"31px"},"&.MuiTableCell-paddingCheckbox":{width:"40px",padding:"0px"}},stickyHeader:{backgroundColor:yoe.GREYSCALE_98,borderBottom:`1px solid ${yoe.GREYSCALE_85}`}}},MuiTableContainer:{styleOverrides:{root:{borderBottom:`1px solid ${yoe.GREYSCALE_85}`,borderTop:`1px solid ${yoe.GREYSCALE_85}`}}},MuiTableHead:{styleOverrides:{root:{backgroundColor:yoe.GREYSCALE_98}}},MuiTableRow:{styleOverrides:{root:{"&.Mui-selected":{backgroundColor:yoe.GREYSCALE_0_05,"&:hover":{backgroundColor:yoe.GREYSCALE_0_03}},"&&:hover":{backgroundColor:yoe.GREYSCALE_0_03}}}},MuiTableSortLabel:{defaultProps:{IconComponent:({className:e})=>Uo.jsx(Toe,{className:e})},styleOverrides:{root:{display:"flex",justifyContent:"space-between","&:hover":{"& icon":{opacity:.5}},"&.Mui-active":{"&& icon":{opacity:1}}},icon:{opacity:0},iconDirectionDesc:{transform:"rotate(180deg)"},iconDirectionAsc:{transform:"rotate(0deg)"}}},MuiTable:{styleOverrides:{root:{borderLeft:`1px solid ${yoe.GREYSCALE_85}`}}},MuiToggleButton:{styleOverrides:{root:{height:32,lineHeight:"16px",width:32,fontSize:boe,borderRadius:woe,padding:"7px 16px",border:`1px solid ${yoe.GREYSCALE_0_15}`,backgroundColor:yoe.GREYSCALE_100_60,color:yoe.GREYSCALE_25,zIndex:1,"&:active":{backgroundColor:yoe.GREYSCALE_0_10,border:`1px solid ${yoe.GREYSCALE_0_30}`},"&:hover":{backgroundColor:yoe.GREYSCALE_0_03,border:`1px solid ${yoe.GREYSCALE_0_30}`},"&.sprout-focus-visible":{backgroundColor:yoe.GREYSCALE_0_03,boxShadow:`0 0 0 1px ${yoe.MISC_FOCUS_BORDER}`,border:`1px solid ${yoe.MISC_FOCUS_BORDER}`,zIndex:2},"&.Mui-selected":{color:yoe.GREYSCALE_25,backgroundColor:yoe.GREYSCALE_0_10,zIndex:2,"&:hover":{backgroundColor:yoe.GREYSCALE_0_10,border:`1px solid ${yoe.GREYSCALE_0_15}`}}},sizeSmall:{fontSize:_oe,height:24,width:24,padding:7},sizeLarge:{fontSize:xoe,height:40,width:40,lineHeight:"20px"}}},MuiToggleButtonGroup:{styleOverrides:{root:{height:"32px",lineHeight:"16px",fontSize:boe,borderRadius:woe}}},MuiToolbar:{defaultProps:{disableGutters:!0},styleOverrides:{root:{display:"flex",flex:1,padding:"0 16px"},dense:{minHeight:"46px",padding:"0 8px"}}},MuiTooltip:{defaultProps:{arrow:!0,enterNextDelay:300,enterDelay:400},styleOverrides:{arrow:{color:yoe.GREYSCALE_20},tooltip:{backgroundColor:yoe.GREYSCALE_20,fontSize:_oe,lineHeight:"16px"},popper:{whiteSpace:"pre-line"}}},...e?{...joe}:{}}),qoe=(e,t)=>Noe(t);var Foe=()=>({mode:"light",primary:{ultraLight:yoe.GREEN_ULTRA_LIGHT,light:yoe.GREEN_PALE,main:yoe.GREEN,dark:yoe.GREEN_DARK,extraDark:yoe.GREEN_EXTRA_DARK,contrastText:yoe.WHITE},secondary:{ultraLight:yoe.BLUE_ULTRA_LIGHT,light:yoe.BLUE_PALE,main:yoe.BLUE,dark:yoe.BLUE_DARK,extraDark:yoe.BLUE_EXTRA_DARK,contrastText:yoe.WHITE},error:{ultraLight:yoe.RED_ULTRA_LIGHT,light:yoe.RED_PALE,main:yoe.RED,dark:yoe.RED_DARK,extraDark:yoe.RED_EXTRA_DARK,contrastText:yoe.WHITE},warning:{ultraLight:yoe.ORANGE_ULTRA_LIGHT,light:yoe.ORANGE_PALE,main:yoe.ORANGE,dark:yoe.ORANGE_DARK,extraDark:yoe.ORANGE_EXTRA_DARK,contrastText:yoe.WHITE},success:{ultraLight:yoe.GREEN_ULTRA_LIGHT,light:yoe.GREEN_PALE,main:yoe.GREEN,dark:yoe.GREEN_DARK,extraDark:yoe.GREEN_EXTRA_DARK,contrastText:yoe.WHITE},info:{ultraLight:yoe.BLUE_ULTRA_LIGHT,light:yoe.BLUE_PALE,main:yoe.BLUE,dark:yoe.BLUE_DARK,extraDark:yoe.BLUE_EXTRA_DARK,contrastText:yoe.WHITE},text:{primary:yoe.TEXT_PRIMARY,secondary:yoe.TEXT_SECONDARY,disabled:yoe.GREYSCALE_0_30},action:{hover:yoe.GREYSCALE_0_03,hoverOpacity:.03,selected:yoe.GREYSCALE_0_05,selectedOpacity:.05,focus:yoe.MISC_FOCUS_BORDER},amethyst:{ultraLight:yoe.WHITE,main:yoe.PURPLE,light:yoe.PURPLE_PALE,dark:yoe.PURPLE_DARK,extraDark:yoe.GREYSCALE_0_0,contrastText:yoe.WHITE},background:{paper:yoe.WHITE,default:yoe.GREYSCALE_95},divider:yoe.GREYSCALE_0_15});var Woe=e=>Foe();var Boe=(e,t=!1)=>({components:qoe(0,t),palette:Woe(e),breakpoints:{keys:["xs","sm","md","lg","xl"],values:{xs:0,sm:600,md:960,lg:1280,xl:1920}},spacing:8,shadows:["none","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)"],transitions:{easing:{easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},duration:{standard:300,short:250,enteringScreen:225,shorter:200,leavingScreen:195,shortest:150,complex:375}},typography:{fontSize:boe,fontWeightLight:Soe,fontWeightRegular:Coe,fontWeightMedium:Eoe,fontWeightBold:koe,htmlFontSize:boe,fontFamily:Moe.FONT_FAMILY,button:{fontWeight:Eoe,fontSize:boe,textTransform:"none"},body1:{fontSize:xoe,lineHeight:"24px"},body2:{fontSize:boe,lineHeight:"20px"},h1:{fontSize:32,lineHeight:"32px"},h2:{fontSize:28,lineHeight:"32px"},h3:{fontSize:voe,lineHeight:"24px"},h4:{fontSize:20,lineHeight:"24px"},h5:{fontSize:xoe,fontWeight:Eoe,lineHeight:"16px"},h6:{fontSize:boe,fontWeight:Eoe,lineHeight:"16px"},caption:{color:yoe.TEXT_SECONDARY},subtitle1:{fontSize:boe,color:yoe.TEXT_SECONDARY},subtitle2:{fontSize:_oe,color:yoe.TEXT_SECONDARY}},shape:{borderRadius:woe}}),$oe={},Hoe={exports:{}},Voe={exports:{}};!function(e){function t(n){return e.exports=t="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.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(Voe);var Goe=Voe.exports;!function(e){var t=Goe.default;function n(r,o){if("function"==typeof WeakMap)var i=new WeakMap,a=new WeakMap;return(e.exports=n=function(e,n){if(!n&&e&&e.__esModule)return e;var r,o,s={__proto__:null,default:e};if(null===e||"object"!=t(e)&&"function"!=typeof e)return s;if(r=n?a:i){if(r.has(e))return r.get(e);r.set(e,s)}for(var l in e)"default"!==l&&{}.hasOwnProperty.call(e,l)&&((o=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,l))&&(o.get||o.set)?r(s,l,o):s[l]=e[l]);return s},e.exports.__esModule=!0,e.exports.default=e.exports)(r,o)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}(Hoe);var Uoe=Hoe.exports,Yoe={},Koe=Pe(wh);Object.defineProperty(Yoe,"__esModule",{value:!0}),Yoe.hexToRgb=Zoe,Yoe.rgbToHex=function(e){if(0===e.indexOf("#"))return e;var t=eie(e),n=t.values;return"#".concat(n.map((function(e){return function(e){var t=e.toString(16);return 1===t.length?"0".concat(t):t}(e)})).join(""))},Yoe.hslToRgb=Qoe,Yoe.decomposeColor=eie,Yoe.recomposeColor=tie,Yoe.getContrastRatio=function(e,t){var n=nie(e),r=nie(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)},Yoe.getLuminance=nie,Yoe.emphasize=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return nie(e)>.5?oie(e,t):iie(e,t)},Yoe.fade=function(e,t){return rie(e,t)},Yoe.alpha=rie,Yoe.darken=oie,Yoe.lighten=iie;var Xoe=Koe;function Joe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),n)}function Zoe(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}function Qoe(e){var t=(e=eie(e)).values,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return o-i*Math.max(Math.min(t-3,9-t,1),-1)},s="rgb",l=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",l.push(t[3])),tie({type:s,values:l})}function eie(e){if(e.type)return e;if("#"===e.charAt(0))return eie(Zoe(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error((0,Xoe.formatMuiErrorMessage)(3,e));var r=e.substring(t+1,e.length-1).split(",");return r=r.map((function(e){return parseFloat(e)})),{type:n,values:r}}function tie(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")?n=n.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function nie(e){var t="hsl"===(e=eie(e)).type?eie(Qoe(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function rie(e,t){return e=eie(e),t=Joe(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,tie(e)}function oie(e,t){if(e=eie(e),t=Joe(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return tie(e)}function iie(e,t){if(e=eie(e),t=Joe(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return tie(e)}var aie,sie,lie,cie={},uie={exports:{}},die={exports:{}},pie={exports:{}};function hie(){return aie||(aie=1,function(e){var t=Goe.default;e.exports=function(e,n){if("object"!=t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,n||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports}(pie)),pie.exports}function fie(){return sie||(sie=1,function(e){var t=Goe.default,n=hie();e.exports=function(e){var r=n(e,"string");return"symbol"==t(r)?r:r+""},e.exports.__esModule=!0,e.exports.default=e.exports}(die)),die.exports}function mie(){return lie||(lie=1,function(e){var t=fie();e.exports=function(e,n,r){return(n=t(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports}(uie)),uie.exports}var gie,yie={exports:{}};function _ie(){return gie||(gie=1,function(e){var t=sD();e.exports=function(e,n){if(null==e)return{};var r,o,i=t(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],-1===n.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i},e.exports.__esModule=!0,e.exports.default=e.exports}(yie)),yie.exports}var bie,xie={};var vie,wie={};var Sie,Cie={},Eie={};var kie,Mie={};var Rie,Aie={};var Iie,Pie={};var Oie,Lie={};var Die,Tie={};var zie,jie={};var Nie,qie,Fie={};function Wie(){if(qie)return Cie;qie=1;var e=hL;Object.defineProperty(Cie,"__esModule",{value:!0}),Cie.default=function(e){var g=e.primary,y=void 0===g?{light:a.default[300],main:a.default[500],dark:a.default[700]}:g,_=e.secondary,b=void 0===_?{light:s.default.A200,main:s.default.A400,dark:s.default.A700}:_,x=e.error,v=void 0===x?{light:l.default[300],main:l.default[500],dark:l.default[700]}:x,w=e.warning,S=void 0===w?{light:c.default[300],main:c.default[500],dark:c.default[700]}:w,C=e.info,E=void 0===C?{light:u.default[300],main:u.default[500],dark:u.default[700]}:C,k=e.success,M=void 0===k?{light:d.default[300],main:d.default[500],dark:d.default[700]}:k,R=e.type,A=void 0===R?"light":R,I=e.contrastThreshold,P=void 0===I?3:I,O=e.tonalOffset,L=void 0===O?.2:O,D=(0,n.default)(e,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function T(e){return(0,p.getContrastRatio)(e,f.text.primary)>=P?f.text.primary:h.text.primary}var z=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;if(!(e=(0,t.default)({},e)).main&&e[n]&&(e.main=e[n]),!e.main)throw new Error((0,r.formatMuiErrorMessage)(4,n));if("string"!=typeof e.main)throw new Error(_formatMuiErrorMessage(5,JSON.stringify(e.main)));return m(e,"light",o,L),m(e,"dark",i,L),e.contrastText||(e.contrastText=T(e.main)),e},j={dark:f,light:h},N=(0,r.deepmerge)((0,t.default)({common:o.default,type:A,primary:z(y),secondary:z(b,"A400","A200","A700"),error:z(v),warning:z(S),info:z(E),success:z(M),grey:i.default,contrastThreshold:P,getContrastText:T,augmentColor:z,tonalOffset:L},j[A]),D);return N},Cie.dark=Cie.light=void 0;var t=e(oD()),n=e(_ie()),r=Koe,o=e(function(){if(Sie)return Eie;Sie=1,Object.defineProperty(Eie,"__esModule",{value:!0}),Eie.default=void 0;var e={black:"#000",white:"#fff"};return Eie.default=e,Eie}()),i=e(function(){if(kie)return Mie;kie=1,Object.defineProperty(Mie,"__esModule",{value:!0}),Mie.default=void 0;var e={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"};return Mie.default=e,Mie}()),a=e(function(){if(Rie)return Aie;Rie=1,Object.defineProperty(Aie,"__esModule",{value:!0}),Aie.default=void 0;var e={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"};return Aie.default=e,Aie}()),s=e(function(){if(Iie)return Pie;Iie=1,Object.defineProperty(Pie,"__esModule",{value:!0}),Pie.default=void 0;var e={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"};return Pie.default=e,Pie}()),l=e(function(){if(Oie)return Lie;Oie=1,Object.defineProperty(Lie,"__esModule",{value:!0}),Lie.default=void 0;var e={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"};return Lie.default=e,Lie}()),c=e(function(){if(Die)return Tie;Die=1,Object.defineProperty(Tie,"__esModule",{value:!0}),Tie.default=void 0;var e={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"};return Tie.default=e,Tie}()),u=e(function(){if(zie)return jie;zie=1,Object.defineProperty(jie,"__esModule",{value:!0}),jie.default=void 0;var e={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"};return jie.default=e,jie}()),d=e(function(){if(Nie)return Fie;Nie=1,Object.defineProperty(Fie,"__esModule",{value:!0}),Fie.default=void 0;var e={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};return Fie.default=e,Fie}()),p=Yoe,h={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:o.default.white,default:i.default[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}};Cie.light=h;var f={text:{primary:o.default.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:i.default[800],default:"#303030"},action:{active:o.default.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function m(e,t,n,r){var o=r.light||r,i=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=(0,p.lighten)(e.main,o):"dark"===t&&(e.dark=(0,p.darken)(e.main,i)))}return Cie.dark=f,Cie}var Bie,$ie={};var Hie,Vie={};var Gie,Uie={};var Yie,Kie={},Xie=Pe(cm);var Jie,Zie={};function Qie(){if(Jie)return Zie;Jie=1;var e=hL;Object.defineProperty(Zie,"__esModule",{value:!0}),Zie.default=Zie.duration=Zie.easing=void 0;var t=e(_ie()),n={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"};Zie.easing=n;var r={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function o(e){return"".concat(Math.round(e),"ms")}Zie.duration=r;var i={easing:n,duration:r,create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=i.duration,s=void 0===a?r.standard:a,l=i.easing,c=void 0===l?n.easeInOut:l,u=i.delay,d=void 0===u?0:u;return(0,t.default)(i,["duration","easing","delay"]),(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"==typeof s?s:o(s)," ").concat(c," ").concat("string"==typeof d?d:o(d))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}};return Zie.default=i,Zie}var eae,tae,nae={};function rae(){if(tae)return cie;tae=1;var e=hL;Object.defineProperty(cie,"__esModule",{value:!0}),cie.createMuiTheme=function(){return p.apply(void 0,arguments)},cie.default=void 0,e(mie());var t=e(_ie()),n=Koe,r=e(function(){if(bie)return xie;bie=1;var e=hL;Object.defineProperty(xie,"__esModule",{value:!0}),xie.default=function(e){var o=e.values,i=void 0===o?{xs:0,sm:600,md:960,lg:1280,xl:1920}:o,a=e.unit,s=void 0===a?"px":a,l=e.step,c=void 0===l?5:l,u=(0,n.default)(e,["values","unit","step"]);function d(e){var t="number"==typeof i[e]?i[e]:e;return"@media (min-width:".concat(t).concat(s,")")}function p(e,t){var n=r.indexOf(t);return n===r.length-1?d(e):"@media (min-width:".concat("number"==typeof i[e]?i[e]:e).concat(s,") and ")+"(max-width:".concat((-1!==n&&"number"==typeof i[r[n+1]]?i[r[n+1]]:t)-c/100).concat(s,")")}return(0,t.default)({keys:r,values:i,up:d,down:function(e){var t=r.indexOf(e)+1,n=i[r[t]];return t===r.length?d("xs"):"@media (max-width:".concat(("number"==typeof n&&t>0?n:e)-c/100).concat(s,")")},between:p,only:function(e){return p(e,e)},width:function(e){return i[e]}},u)},xie.keys=void 0;var t=e(oD()),n=e(_ie()),r=["xs","sm","md","lg","xl"];return xie.keys=r,xie}()),o=e(function(){if(vie)return wie;vie=1;var e=hL;Object.defineProperty(wie,"__esModule",{value:!0}),wie.default=function(e,r,o){var i;return(0,n.default)({gutters:function(){var o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return console.warn(["Material-UI: theme.mixins.gutters() is deprecated.","You can use the source of the mixin directly:","\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n [theme.breakpoints.up('sm')]: {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3),\n },\n "].join("\n")),(0,n.default)({paddingLeft:r(2),paddingRight:r(2)},o,(0,t.default)({},e.up("sm"),(0,n.default)({paddingLeft:r(3),paddingRight:r(3)},o[e.up("sm")])))},toolbar:(i={minHeight:56},(0,t.default)(i,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),(0,t.default)(i,e.up("sm"),{minHeight:64}),i)},o)};var t=e(mie()),n=e(oD());return wie}()),i=e(Wie()),a=e(function(){if(Bie)return $ie;Bie=1;var e=hL;Object.defineProperty($ie,"__esModule",{value:!0}),$ie.default=function(e,l){var c="function"==typeof l?l(e):l,u=c.fontFamily,d=void 0===u?s:u,p=c.fontSize,h=void 0===p?14:p,f=c.fontWeightLight,m=void 0===f?300:f,g=c.fontWeightRegular,y=void 0===g?400:g,_=c.fontWeightMedium,b=void 0===_?500:_,x=c.fontWeightBold,v=void 0===x?700:x,w=c.htmlFontSize,S=void 0===w?16:w,C=c.allVariants,E=c.pxToRem,k=(0,n.default)(c,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),M=h/14,R=E||function(e){return"".concat(e/S*M,"rem")},A=function(e,n,r,i,a){return(0,t.default)({fontFamily:d,fontWeight:e,fontSize:R(n),lineHeight:r},d===s?{letterSpacing:"".concat(o(i/n),"em")}:{},a,C)},I={h1:A(m,96,1.167,-1.5),h2:A(m,60,1.2,-.5),h3:A(y,48,1.167,0),h4:A(y,34,1.235,.25),h5:A(y,24,1.334,0),h6:A(b,20,1.6,.15),subtitle1:A(y,16,1.75,.15),subtitle2:A(b,14,1.57,.1),body1:A(y,16,1.5,.15),body2:A(y,14,1.43,.15),button:A(b,14,1.75,.4,a),caption:A(y,12,1.66,.4),overline:A(y,12,2.66,1,a)};return(0,r.deepmerge)((0,t.default)({htmlFontSize:S,pxToRem:R,round:i,fontFamily:d,fontSize:h,fontWeightLight:m,fontWeightRegular:y,fontWeightMedium:b,fontWeightBold:v},I),k,{clone:!1})};var t=e(oD()),n=e(_ie()),r=Koe;function o(e){return Math.round(1e5*e)/1e5}function i(e){return o(e)}var a={textTransform:"uppercase"},s='"Roboto", "Helvetica", "Arial", sans-serif';return $ie}()),s=e(function(){if(Hie)return Vie;function e(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}Hie=1,Object.defineProperty(Vie,"__esModule",{value:!0}),Vie.default=void 0;var t=["none",e(0,2,1,-1,0,1,1,0,0,1,3,0),e(0,3,1,-2,0,2,2,0,0,1,5,0),e(0,3,3,-2,0,3,4,0,0,1,8,0),e(0,2,4,-1,0,4,5,0,0,1,10,0),e(0,3,5,-1,0,5,8,0,0,1,14,0),e(0,3,5,-1,0,6,10,0,0,1,18,0),e(0,4,5,-2,0,7,10,1,0,2,16,1),e(0,5,5,-3,0,8,10,1,0,3,14,2),e(0,5,6,-3,0,9,12,1,0,3,16,2),e(0,6,6,-3,0,10,14,1,0,4,18,3),e(0,6,7,-4,0,11,15,1,0,4,20,3),e(0,7,8,-4,0,12,17,2,0,5,22,4),e(0,7,8,-4,0,13,19,2,0,5,24,4),e(0,7,9,-4,0,14,21,2,0,5,26,4),e(0,8,9,-5,0,15,22,2,0,6,28,5),e(0,8,10,-5,0,16,24,2,0,6,30,5),e(0,8,11,-5,0,17,26,2,0,6,32,5),e(0,9,11,-5,0,18,28,2,0,7,34,6),e(0,9,12,-6,0,19,29,2,0,7,36,6),e(0,10,13,-6,0,20,31,3,0,8,38,7),e(0,10,13,-6,0,21,33,3,0,8,40,7),e(0,10,14,-6,0,22,35,3,0,8,42,7),e(0,11,14,-7,0,23,36,3,0,9,44,8),e(0,11,15,-7,0,24,38,3,0,9,46,8)];return Vie.default=t,Vie}()),l=e(function(){if(Gie)return Uie;Gie=1,Object.defineProperty(Uie,"__esModule",{value:!0}),Uie.default=void 0;var e={borderRadius:4};return Uie.default=e,Uie}()),c=e(function(){if(Yie)return Kie;Yie=1,Object.defineProperty(Kie,"__esModule",{value:!0}),Kie.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(t.mui)return t;var n=(0,e.createUnarySpacing)({spacing:t}),r=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return 0===t.length?n(1):1===t.length?n(t[0]):t.map((function(e){if("string"==typeof e)return e;var t=n(e);return"number"==typeof t?"".concat(t,"px"):t})).join(" ")};return Object.defineProperty(r,"unit",{get:function(){return t}}),r.mui=!0,r};var e=Xie;return Kie}()),u=e(Qie()),d=e(function(){if(eae)return nae;eae=1,Object.defineProperty(nae,"__esModule",{value:!0}),nae.default=void 0;var e={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};return nae.default=e,nae}());function p(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},p=e.breakpoints,h=void 0===p?{}:p,f=e.mixins,m=void 0===f?{}:f,g=e.palette,y=void 0===g?{}:g,_=e.spacing,b=e.typography,x=void 0===b?{}:b,v=(0,t.default)(e,["breakpoints","mixins","palette","spacing","typography"]),w=(0,i.default)(y),S=(0,r.default)(h),C=(0,c.default)(_),E=(0,n.deepmerge)({breakpoints:S,direction:"ltr",mixins:(0,o.default)(S,C,m),overrides:{},palette:w,props:{},shadows:s.default,typography:(0,a.default)(w,x),spacing:C,shape:l.default,transitions:u.default,zIndex:d.default},v),k=arguments.length,M=new Array(k>1?k-1:0),R=1;R<k;R++)M[R-1]=arguments[R];return E=M.reduce((function(e,t){return(0,n.deepmerge)(e,t)}),E)}var h=p;return cie.default=h,cie}var oae,iae={};var aae,sae={},lae=Pe(sb);var cae,uae,dae={},pae={};function hae(){if(cae)return pae;cae=1;var e=hL;Object.defineProperty(pae,"__esModule",{value:!0}),pae.default=void 0;var t=(0,e(rae()).default)();return pae.default=t,pae}var fae,mae,gae={},yae={};function _ae(){if(mae)return gae;mae=1;var e=hL;Object.defineProperty(gae,"__esModule",{value:!0}),gae.default=function(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=o.breakpoints,a=void 0===i?["sm","md","lg"]:i,s=o.disableAlign,l=void 0!==s&&s,c=o.factor,u=void 0===c?2:c,d=o.variants,p=void 0===d?["h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","caption","button","overline"]:d,h=(0,t.default)({},e);h.typography=(0,t.default)({},h.typography);var f=h.typography,m=(0,r.convertLength)(f.htmlFontSize),g=a.map((function(e){return h.breakpoints.values[e]}));return p.forEach((function(e){var o=f[e],i=parseFloat(m(o.fontSize,"rem"));if(!(i<=1)){var a=i,s=1+(a-1)/u,c=o.lineHeight;if(!(0,r.isUnitless)(c)&&!l)throw new Error((0,n.formatMuiErrorMessage)(6));(0,r.isUnitless)(c)||(c=parseFloat(m(c,"rem"))/parseFloat(i));var d=null;l||(d=function(e){return(0,r.alignProperty)({size:e,grid:(0,r.fontGrid)({pixels:4,lineHeight:c,htmlFontSize:f.htmlFontSize})})}),f[e]=(0,t.default)({},o,(0,r.responsiveProperty)({cssProperty:"fontSize",min:s,max:a,unit:"rem",breakpoints:g,transform:d}))}})),h};var t=e(oD()),n=Koe,r=function(){if(fae)return yae;fae=1;var e=hL;Object.defineProperty(yae,"__esModule",{value:!0}),yae.isUnitless=function(e){return String(parseFloat(e)).length===String(e).length},yae.getUnit=n,yae.toUnitless=r,yae.convertLength=function(e){return function(t,o){var i=n(t);if(i===o)return t;var a=r(t);if("px"!==i)if("em"===i)a=r(t)*r(e);else if("rem"===i)return a=r(t)*r(e),t;var s=a;if("px"!==o)if("em"===o)s=a/r(e);else{if("rem"!==o)return t;s=a/r(e)}return parseFloat(s.toFixed(5))+o}},yae.alignProperty=function(e){var t=e.size,n=e.grid,r=t-t%n,o=r+n;return t-r<o-t?r:o},yae.fontGrid=function(e){var t=e.lineHeight;return e.pixels/(t*e.htmlFontSize)},yae.responsiveProperty=function(e){var n=e.cssProperty,r=e.min,o=e.max,i=e.unit,a=void 0===i?"rem":i,s=e.breakpoints,l=void 0===s?[600,960,1280]:s,c=e.transform,u=void 0===c?null:c,d=(0,t.default)({},n,"".concat(r).concat(a)),p=(o-r)/l[l.length-1];return l.forEach((function(e){var o=r+p*e;null!==u&&(o=u(o)),d["@media (min-width:".concat(e,"px)")]=(0,t.default)({},n,"".concat(Math.round(1e4*o)/1e4).concat(a))})),d};var t=e(mie());function n(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function r(e){return parseFloat(e)}return yae}();return gae}var bae,xae={};var vae,wae={};var Sae,Cae={};var Eae,kae={};!function(e){var n=hL,r=Uoe;Object.defineProperty(e,"__esModule",{value:!0});var o={createTheme:!0,createMuiTheme:!0,unstable_createMuiStrictModeTheme:!0,createStyles:!0,makeStyles:!0,responsiveFontSizes:!0,styled:!0,useTheme:!0,withStyles:!0,withTheme:!0,createGenerateClassName:!0,jssPreset:!0,ServerStyleSheets:!0,StylesProvider:!0,MuiThemeProvider:!0,ThemeProvider:!0};Object.defineProperty(e,"createTheme",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"createMuiTheme",{enumerable:!0,get:function(){return a.createMuiTheme}}),Object.defineProperty(e,"unstable_createMuiStrictModeTheme",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"createStyles",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,"makeStyles",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"responsiveFontSizes",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"styled",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(e,"useTheme",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(e,"withStyles",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"withTheme",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(e,"createGenerateClassName",{enumerable:!0,get:function(){return g.createGenerateClassName}}),Object.defineProperty(e,"jssPreset",{enumerable:!0,get:function(){return g.jssPreset}}),Object.defineProperty(e,"ServerStyleSheets",{enumerable:!0,get:function(){return g.ServerStyleSheets}}),Object.defineProperty(e,"StylesProvider",{enumerable:!0,get:function(){return g.StylesProvider}}),Object.defineProperty(e,"MuiThemeProvider",{enumerable:!0,get:function(){return g.ThemeProvider}}),Object.defineProperty(e,"ThemeProvider",{enumerable:!0,get:function(){return g.ThemeProvider}});var i=Yoe;Object.keys(i).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(o,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return i[t]}}))}));var a=r(rae()),s=n(function(){if(oae)return iae;oae=1;var e=hL;Object.defineProperty(iae,"__esModule",{value:!0}),iae.default=function(e){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return n.default.apply(void 0,[(0,t.deepmerge)({unstable_strictMode:!0},e)].concat(o))};var t=Koe,n=e(rae());return iae}()),l=n(function(){if(aae)return sae;aae=1,Object.defineProperty(sae,"__esModule",{value:!0}),sae.default=function(t){return(0,e.createStyles)(t)};var e=lae;return sae}()),c=n(function(){if(uae)return dae;uae=1;var e=hL;Object.defineProperty(dae,"__esModule",{value:!0}),dae.default=void 0;var t=e(oD()),n=lae,r=e(hae()),o=function(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,n.makeStyles)(e,(0,t.default)({defaultTheme:r.default},o))};return dae.default=o,dae}()),u=n(_ae()),d=n(function(){if(bae)return xae;bae=1;var e=hL;Object.defineProperty(xae,"__esModule",{value:!0}),xae.default=void 0;var t=e(oD()),n=lae,r=e(hae()),o=function(e){var o=(0,n.styled)(e);return function(e,n){return o(e,(0,t.default)({defaultTheme:r.default},n))}};return xae.default=o,xae}()),p=Qie();Object.keys(p).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(o,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return p[t]}}))}));var h=n(function(){if(vae)return wae;vae=1;var e=hL;Object.defineProperty(wae,"__esModule",{value:!0}),wae.default=function(){return(0,n.useTheme)()||r.default};var n=lae;e(t);var r=e(hae());return wae}()),f=n(function(){if(Sae)return Cae;Sae=1;var e=hL;Object.defineProperty(Cae,"__esModule",{value:!0}),Cae.default=void 0;var t=e(oD()),n=lae,r=e(hae()),o=function(e,o){return(0,n.withStyles)(e,(0,t.default)({defaultTheme:r.default},o))};return Cae.default=o,Cae}()),m=n(function(){if(Eae)return kae;Eae=1;var e=hL;Object.defineProperty(kae,"__esModule",{value:!0}),kae.default=void 0;var t=lae,n=e(hae()),r=(0,t.withThemeCreator)({defaultTheme:n.default});return kae.default=r,kae}()),g=lae}($oe),$oe.alpha(yoe.GREYSCALE_0,.05),$oe.alpha(yoe.GREEN_PALE,.5),$oe.alpha(yoe.BLUE_PALE,.5),$oe.alpha(yoe.GREEN_PALE,.5),$oe.alpha(yoe.BLUE_PALE,.5),$oe.alpha(yoe.GREEN_PALE,.5),$oe.alpha(yoe.BLUE_PALE,.5),$oe.alpha(yoe.GREEN_PALE,.5),$oe.alpha(yoe.BLUE_PALE,.5),$oe.alpha(yoe.GREEN_PALE,.5),$oe.alpha(yoe.BLUE_PALE,.5);function Mae(e){const t=((e="light",t=!1)=>Boe(e,t))();return t?.components?.MuiTable?.styleOverrides&&(t.components.MuiTable.styleOverrides.root={}),ZL({...t,direction:e})}var Rae=function(e){return e.FontSize="fontSize",e.FontFamily="fontFamily",e.FontColor="fontColor",e.FontStyle="fontStyle",e.Background="background",e.LineClamp="lineClamp",e.ColumnLineClamp="columnLineClamp",e.Border="border",e.Divider="divider",e}(Rae||{}),Aae=function(e){return e.Dimension="object.pivotTableV2.dimension",e.Measure="object.pivotTableV2.measure",e.Total="object.pivotTableV2.total",e.Null="object.pivotTableV2.null",e.Grid="object.pivotTableV2",e}(Aae||{}),Iae=function(e){return e.Grid="grid",e.Divider="grid.divider",e.LabelName="label.name",e.LabelValue="label.value",e}(Iae||{}),Pae=function(e){return e.FontSize="fontSize",e.FontFamily="fontFamily",e.FontColor="color",e.BackgroundColor="backgroundColor",e.LineClamp="lineClamp",e.ColumnLineClamp="columnLineClamp",e.BorderColor="borderColor",e}(Pae||{});const Oae=e=>e?`${parseInt(e,10)}px`:void 0,Lae=(e,t)=>{if(t){const n=e.getColorPickerColor(t);return"none"===n?l$.Transparent:n}},Dae=(e,t)=>+(parseInt(e,10)*s$*t+8).toFixed(2),Tae=(e,t)=>void 0===e?t:e.some((e=>"bold"===e))?i$:"normal",zae=e=>e?.some((e=>"italic"===e))?"italic":"normal",jae=e=>e?.some((e=>"underline"===e))?"underline":"none",Nae=document.createElement("textarea");function qae(e){Nae.value=e,document.body.appendChild(Nae),Nae.select(),Nae.setSelectionRange(0,Nae.value.length),document.execCommand("copy"),document.body.removeChild(Nae)}Nae.style.position="absolute",Nae.style.left="-9999px",Nae.setAttribute("readonly","");function Fae(e){P?.(((t,n)=>{const r=n.target,o=r?.closest(`.${dN}`);o?.title&&t.addItem({translation:"contextMenu.copyCellValue",icon:"lui-icon lui-icon--copy",tid:"copy-cell-context-item",id:"copy-cell-context-item",select:async()=>{(e=>{const t=e.title;t&&(navigator.clipboard?.writeText?navigator.clipboard.writeText(t).catch((()=>{qae(t)})):qae(t))})(o)}}),e?.forEach((e=>{e(t,n,o)}))}))}const Wae=({model:e,layoutService:t,effectivePropertiesService:n,translator:r})=>R$(((o,i,a)=>{if(!e||n.qAlwaysFullyExpanded)return;const s=e,l=o.addItem({translation:"Object.PivotTable.ContextMenu.ExpandCollapse",tid:"expand-collapse-group",id:"expand-collapse-group"}),{qEffectiveDimensionName:c,label:u}=((e,t)=>{const n=((e,t)=>{const n=e?.getAttribute("data-dimension-info-index");if("string"==typeof n)return t.getDimensionInfo(+n)})(e,t);return"object"==typeof n?{qEffectiveDimensionName:n.qEffectiveDimensionName,label:n.qFallbackTitle}:{qEffectiveDimensionName:void 0,label:void 0}})(a,t);l.addItem((e=>({icon:"lui-icon lui-icon--plus",translation:"Object.PivotTable.ContextMenu.ExpandAll",tid:"expand-all",select:async()=>{try{await e.expandTop(EV,0,0,!0),await e.expandLeft(EV,0,0,!0)}catch(e){console.error("Failed to expand all",e)}}}))(s)),"string"==typeof c&&l.addItem((({model:e,effectivePropertiesService:t,qEffectiveDimensionName:n,label:r,translator:o})=>({icon:"lui-icon lui-icon--plus",translation:o.get("SNPivotTable.ContextMenu.ExpandDimension",[r??""]),tid:"expand-dimension",id:"expand-dimension",select:MX({model:e,qExpansionState:t.qExpansionState,qEffectiveDimensionName:n,action:CX.Expand})}))({model:s,effectivePropertiesService:n,qEffectiveDimensionName:c,label:u,translator:r})),l.addItem((e=>({icon:"lui-icon lui-icon--minus",translation:"Object.PivotTable.ContextMenu.CollapseAll",tid:"collapse-all",select:async()=>{try{await e.collapseTop(EV,0,0,!0),await e.collapseLeft(EV,0,0,!0)}catch(e){console.error("Failed to collapse all",e)}}}))(s)),"string"==typeof c&&l.addItem((({model:e,effectivePropertiesService:t,qEffectiveDimensionName:n,label:r,translator:o})=>({icon:"lui-icon lui-icon--minus",translation:o.get("SNPivotTable.ContextMenu.CollapseDimension",[r??""]),tid:"collapse-dimension",id:"collapse-dimension",select:MX({model:e,qExpansionState:t.qExpansionState,qEffectiveDimensionName:n,action:CX.Collapse})}))({model:s,effectivePropertiesService:n,qEffectiveDimensionName:c,label:u,translator:r}))}),[e,t,n]),Bae=(e,t)=>C((()=>(({layout:e})=>{const{qHyperCube:t,nullValueRepresentation:n,snapshotData:r}=e,{qNoOfLeftDims:o,qEffectiveInterColumnSortOrder:i,qMeasureInfo:a,qDimensionInfo:s}=t,l=!!r,c=r?.content?.rowsPerPage??15e3,u={x:Math.min(e.qHyperCube.qSize.qcx,a$),y:Math.min(e.qHyperCube.qSize.qcy,c)},d=i.slice(0,o),p=e=>d.some((t=>t===e)),h=p(kV),f=new Map(i.map((e=>[s[e]??kV,e]))),m=a.filter((e=>7005!==e.qError?.qErrorCode));return{layout:e,getNullValueText:()=>n?.text??"-",getMeasureInfoIndexFromCellIndex:(e,t=!1)=>{if(h)return 0;const n=e%m.length;return t?n:a.findIndex((e=>e===m[n]))},getDimensionInfo:e=>e===kV?void 0:s.at(e),getDimensionInfoIndex:e=>f.get(e)??-1,size:u,isSnapshot:l,hasLimitedData:!l&&u.x<e.qHyperCube.qSize.qcx,hasData:u.x>0&&u.y>0,hasLeftDimensions:0!==e.qHyperCube.qNoOfLeftDims,hasPseudoDimOnLeft:h,leftDimensionInfoIndexes:d,isLeftDimension:p,triggerdByExpandOrCollapse:!!e.qHyperCube.qLastExpandedPos,visibleMeasureInfo:m,isIndentModeEnabled:Boolean(e.qHyperCube.qIndentMode),indentModeColumnWidth:e.qHyperCube.indentModeColumnWidth??{type:gN.Auto,pixels:mN.PixelsDefault,percentage:mN.PercentageDefault},searchSortFromDimension:"inherit"===e.search?.sorting}})({layout:e})),[e,t]),$ae=({model:e,layoutService:t,viewService:n,pageInfo:r,rect:o})=>{const{layout:i,isSnapshot:a,triggerdByExpandOrCollapse:s}=t,l=(e=>{const t=I$(e);return t.current=e,t})(tU(o));return j$((async()=>{const{qHyperCube:t}=i,{maxNumberOfVisibleRows:o,maxNumberOfVisibleColumns:c}=l.current;if(a)return i.snapshotData?.content?.qPivotDataPages??[];if(void 0!==e&&"getHyperCubePivotData"in e&&(((e,t,n,r)=>!!e&&(t.gridColumnStartIndex+t.gridWidth>=r||t.gridRowStartIndex+t.gridHeight>=n))(s,n,o,c)||((e,t,n,r)=>{const{qHyperCube:{qPivotDataPages:o,qSize:i}}=e,{qTop:a,qWidth:s,qHeight:l}=o[0]?.qArea??{qTop:0,qWidth:0,qHeight:0};return a<t.page*t.rowsPerPage||s<Math.min(r,i.qcx)||l<Math.min(n,i.qcy)})(i,r,o,c))){const t=((e,t,n,r,o,i)=>{const a=r.page*r.rowsPerPage,s=Math.min(a+r.rowsPerPage,n.qcy),l=Math.min(a$,n.qcx);if(n.qcy<a)return null;let c=0,u=a;if(e){c=t.gridColumnStartIndex,u=a+t.gridRowStartIndex;const e=u+t.gridHeight,n=t.gridColumnStartIndex+t.gridWidth;e>s&&(u=Math.max(0,s-o)),n>l&&(c=Math.max(0,l-i))}return{qLeft:c,qTop:u,qWidth:Math.min(l-c,i),qHeight:Math.min(s-u,o)}})(s,n,i.qHyperCube.qSize,r,o,c);return t?e.getHyperCubePivotData(EV,nU(t)):[]}return t.qPivotDataPages}),[i,a,e,n,r.page,r.rowsPerPage,l,s])},Hae=({rowsPerPage:e,totalRowCount:t,page:n})=>Math.min(e,t-n*e),Vae=(e,t,n=15e3)=>({rowsPerPage:n,totalPages:Math.max(1,Math.ceil(e/n)),totalRowCount:e,rowsOnCurrentPage:Hae({rowsPerPage:n,totalRowCount:e,page:t})}),Gae=15,Uae=({layoutService:e,viewService:t,rect:n,model:r,pageInfo:o})=>(O((async e=>{const i=e;if(!i.snapshotData||!r||i.snapshotData.content)return i;if("getHyperCubePivotData"in r){const{scrollTop:e,scrollLeft:a,leftGridScrollLeft:s,topGridScrollTop:l}=t,c=((e,t,n)=>{const{gridColumnStartIndex:r,gridRowStartIndex:o,gridWidth:i,gridHeight:a}=e,s=t.page*t.rowsPerPage,l=Math.max(r-Gae,0),c=Math.max(s+o-Gae,s,0),u=a$-l,d=s+t.rowsOnCurrentPage-c;if((e=>0===e.gridWidth&&0===e.gridHeight)(e)){const{maxNumberOfVisibleColumns:e,maxNumberOfVisibleRows:t}=tU(n);return{qLeft:l,qTop:c,qWidth:Math.min(u,e+30),qHeight:Math.min(d,t+30)}}return{qLeft:l,qTop:c,qWidth:Math.min(u,i+30),qHeight:Math.min(d,a+30)}})(t,o,n),u=nU(c),d={qLeft:0,qTop:o.page*o.rowsPerPage,qWidth:1,qHeight:1};i.snapshotData.content={qPivotDataPages:await r.getHyperCubePivotData(EV,[d,...u]),scrollTop:e,scrollLeft:a,leftGridScrollLeft:s,topGridScrollTop:l,page:o.page,rowsPerPage:o.rowsPerPage},i.snapshotData.object.size.w=n.width,i.snapshotData.object.size.h=n.height}return i})),L((()=>({getViewState:()=>((e,t)=>({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,leftGridScrollLeft:e.leftGridScrollLeft,topGridScrollTop:e.topGridScrollTop,renderPage:t.page}))(t,o)})),[t]),e.layout.snapshotData?.content?{left:n.left,top:n.top,width:e.layout.snapshotData.object.size.w,height:e.layout.snapshotData.object.size.h}:n);var Yae={SNPivotTable_ContextMenu_CollapseDimension:{id:"SNPivotTable.ContextMenu.CollapseDimension",locale:{"de-DE":"{0} reduzieren","en-US":"Collapse {0}","es-ES":"Contraer {0}","fr-FR":"Réduire {0}","it-IT":"Comprimi {0}","ja-JP":"{0} を折りたたむ","ko-KR":"{0} 축소","nl-NL":"{0} samenvouwen","pl-PL":"Zwiń {0}","pt-BR":"Recolher {0}","ru-RU":"Свернуть {0}","sv-SE":"Dölj {0}","tr-TR":"{0} öğelerini daralt","zh-CN":"折叠 {0}","zh-TW":"收合 {0}"}},SNPivotTable_ContextMenu_ExpandDimension:{id:"SNPivotTable.ContextMenu.ExpandDimension",locale:{"de-DE":"{0} erweitern","en-US":"Expand {0}","es-ES":"Expandir {0}","fr-FR":"Développer {0}","it-IT":"Espandi {0}","ja-JP":"{0} を展開","ko-KR":"{0} 확장","nl-NL":"{0} uitvouwen","pl-PL":"Rozwiń {0}","pt-BR":"Expandir {0}","ru-RU":"Развернуть {0}","sv-SE":"Visa {0}","tr-TR":"{0} öğelerini genişlet","zh-CN":"展开 {0}","zh-TW":"展開 {0}"}},SNPivotTable_IndentMode_Rows:{id:"SNPivotTable.IndentMode.Rows",locale:{"de-DE":"Zeilen","en-US":"Rows","es-ES":"Filas","fr-FR":"Lignes","it-IT":"Righe","ja-JP":"行","ko-KR":"행","nl-NL":"Rijen","pl-PL":"Wiersze","pt-BR":"Linhas","ru-RU":"Строки","sv-SE":"Rader","tr-TR":"Satırlar","zh-CN":"行","zh-TW":"列"}},SNPivotTable_LimitedData:{id:"SNPivotTable.LimitedData",locale:{"de-DE":"* Derzeit wird eine begrenzte Anzahl Spalten angezeigt","en-US":"* Currently showing a limited number of columns","es-ES":"* Actualmente mostrando un número limitado de columnas","fr-FR":"*Affichage actuel d'un nombre limité de colonnes","it-IT":"* Attualmente visualizzato un numero limitato di colonne","ja-JP":"* 現在、限られた列の数を表示","ko-KR":"* 현재 제한된 수의 열만 표시","nl-NL":"* Op dit moment wordt slechts een beperkt aantal kolommen getoond","pl-PL":"* Obecnie wyświetlana jest ograniczona liczba kolumn","pt-BR":"* Atualmente mostrando um número limitado de colunas","ru-RU":"* В настоящее время отображается ограниченное количество столбцов","sv-SE":"* Visar för närvarande ett begränsat antal kolumner","tr-TR":"*Şu anda sınırlı sayıda sütun gösteriliyor","zh-CN":"* 当前显示的列数有限","zh-TW":"* 目前顯示有限欄數"}},SNPivotTable_NoData:{id:"SNPivotTable.NoData",locale:{"de-DE":"Das Diagramm wird nicht angezeigt, weil es keine Werte enthält.","en-US":"The chart is not displayed because it contains no values.","es-ES":"El gráfico no se muestra porque no contiene valores.","fr-FR":"Le graphique n'est pas affiché, car il ne contient aucune valeur.","it-IT":"Il grafico non è visualizzato poiché non contiene alcun valore.","ja-JP":"チャートには値が含まれていないため、チャートは表示されません。","ko-KR":"차트에 값이 없으므로 차트가 표시되지 않습니다.","nl-NL":"Het diagram wordt niet weergegeven omdat deze geen waarden bevat.","pl-PL":"Wykres nie jest wyświetlany, ponieważ nie zawiera wartości.","pt-BR":"O gráfico não foi exibido porque não contém valores.","ru-RU":"Диаграмма не отображается, так как не содержит значений.","sv-SE":"Diagrammet visas inte eftersom det inte innehåller några värden.","tr-TR":"Değer içermemesi nedeniyle grafik görüntülenmiyor.","zh-CN":"图表未显示,因为它不包含任何值。","zh-TW":"系統不會顯示圖表,因為這沒有包含任何值。"}}};const Kae=()=>{const e=D(),t=e.language();return C((()=>{!function(e){const t="SNPivotTable_LimitedData";e.get(t)===t&&Object.keys(Yae).forEach((t=>{e.add(Yae[t])}))}(e)}),[e]),{translator:e,language:t}},Xae=e=>{const{flags:n}=e,r=T(),o=(e=>{const t=C((()=>W$(e)),[e]);return R((()=>()=>{t.unmount()}),[t]),t})(r),i=z(),a=j(),s=N(),l=q(),c=F(),u=P$(),d=((e,t)=>{const[n]=j$((async()=>{if(void 0!==e&&!t.snapshotData&&"getEffectiveProperties"in e)return{...await e.getEffectiveProperties()}}),[e,t]),r=C((()=>{const e=void 0!==n?.qHyperCubeDef.qSortbyYValue&&1===Math.abs(n.qHyperCubeDef.qSortbyYValue),t=n?.qHyperCubeDef.qDimensions.map((e=>e.qDef.qSortCriterias))??[];return{qAlwaysFullyExpanded:n?.qHyperCubeDef.qAlwaysFullyExpanded??!1,qExpansionState:n?.qHyperCubeDef.qExpansionState,isSortedByFirstMeasure:e,getSortCriteriaForDimension:e=>t[e]}}),[n]);return r})(a,i),p=Bae(i,n),h=(e=>{const t=I();return{...t,select:!!t.active&&!!t.select&&!e,active:!!t.active&&!e,scroll:!!t.active}})(p.isSnapshot),f=W(),m=z$(i,r),{translator:g,language:y}=Kae(),{pageInfo:_,updatePageInfo:b}=((e,t)=>{const{size:n,layout:{qHyperCube:{qSize:r}}}=e,o=t.isDownloadedAsPDForImage||e.isSnapshot,i=(e=>e.layout.snapshotData?.content?.rowsPerPage)(e),[a,s]=M((()=>{const a=((e,t)=>t.isDownloadedAsPDForImage?t.viewState?.renderPage??0:e.isSnapshot?e.layout.snapshotData?.content?.page??0:0)(e,t);return{page:a,shouldShowPagination:r.qcy>n.y&&!o,...Vae(r.qcy,a,i)}})),l=e.layout.qHyperCube.qSize.qcy;return R((()=>{s((t=>({...t,...Vae(l,t.page,i),shouldShowPagination:l>e.size.y&&!o})))}),[l,e.size.y,s,o,i]),R((()=>{const{page:e,totalPages:t}=a;if(e+1>t){const e=t-1,n=Hae({...a,page:e});s({...a,page:e,rowsOnCurrentPage:n})}}),[a]),{pageInfo:a,updatePageInfo:e=>{s({...a,...e,rowsOnCurrentPage:Hae({...a,...e})})}}})(p,u),x=((e,t,n)=>C((()=>((e,t)=>{if(e.isDownloadedAsPDForImage){const{viewState:t}=e;return{gridColumnStartIndex:0,gridRowStartIndex:0,gridWidth:0,gridHeight:0,scrollTop:t?.scrollTop??0,scrollLeft:t?.scrollLeft??0,leftGridScrollLeft:t?.leftGridScrollLeft??0,topGridScrollTop:t?.topGridScrollTop??0}}return{gridColumnStartIndex:0,gridRowStartIndex:0,gridWidth:0,gridHeight:0,scrollTop:t?.content?.scrollTop??0,scrollLeft:t?.content?.scrollLeft??0,leftGridScrollLeft:t?.content?.leftGridScrollLeft??0,topGridScrollTop:t?.content?.topGridScrollTop??0}})(n,t.snapshotData)),[n,e.page,t.snapshotData]))(_,i,u),v=Uae({rect:B(),layoutService:p,viewService:x,model:a,pageInfo:_}),[w,S]=$ae({model:a,layoutService:p,viewService:x,pageInfo:_,rect:v}),k=C((()=>((e,t)=>{const n=t.layout.components?.find((e=>"theme"===e.key)),r=n?.header,o=n?.dimensionValues,i=n?.measureValues,a=n?.measureLabels,s=n?.totalValues,l=n?.nullValues,c=n?.grid,u=(t,n,r)=>e.getStyle(t,n,r),d=+(c?.[Rae.LineClamp]??u(Aae.Grid,Iae.Grid,Pae.LineClamp)??1),p=+(c?.[Rae.ColumnLineClamp]??u(Aae.Grid,Iae.Grid,Pae.ColumnLineClamp)??1),h=Lae(e,r?.[Rae.Background])??u(Aae.Dimension,Iae.LabelName,Pae.BackgroundColor)??l$.Transparent,f={header:{fontSize:Oae(r?.[Rae.FontSize])??u(Aae.Dimension,Iae.LabelName,Pae.FontSize)??r$,fontFamily:r?.[Rae.FontFamily]??u(Aae.Dimension,Iae.LabelName,Pae.FontFamily)??o$,fontWeight:Tae(r?.[Rae.FontStyle],i$),fontStyle:zae(r?.[Rae.FontStyle]),textDecoration:jae(r?.[Rae.FontStyle]),color:Lae(e,r?.[Rae.FontColor])??u(Aae.Dimension,Iae.LabelName,Pae.FontColor)??yW.TEXT,background:h,hoverBackground:GB(h,yN),activeBackground:GB(h,_N)},dimensionValues:{fontSize:Oae(o?.[Rae.FontSize])??u(Aae.Dimension,Iae.LabelValue,Pae.FontSize)??r$,fontFamily:o?.[Rae.FontFamily]??u(Aae.Dimension,Iae.LabelValue,Pae.FontFamily)??o$,fontWeight:Tae(o?.[Rae.FontStyle],void 0),fontStyle:zae(o?.[Rae.FontStyle]),textDecoration:jae(o?.[Rae.FontStyle]),color:Lae(e,o?.[Rae.FontColor])??u(Aae.Dimension,Iae.LabelValue,Pae.FontColor)??yW.TEXT,background:Lae(e,o?.[Rae.Background])??u(Aae.Dimension,Iae.LabelValue,Pae.BackgroundColor)??l$.Transparent},measureValues:{fontSize:Oae(i?.[Rae.FontSize])??u(Aae.Measure,Iae.LabelValue,Pae.FontSize)??r$,fontFamily:i?.[Rae.FontFamily]??u(Aae.Measure,Iae.LabelValue,Pae.FontFamily)??o$,fontWeight:Tae(i?.[Rae.FontStyle],"normal"),fontStyle:zae(i?.[Rae.FontStyle]),textDecoration:jae(i?.[Rae.FontStyle]),color:Lae(e,i?.[Rae.FontColor])??u(Aae.Measure,Iae.LabelValue,Pae.FontColor)??l$.FontSecondary,background:Lae(e,i?.[Rae.Background])??u(Aae.Measure,Iae.LabelValue,Pae.BackgroundColor)??l$.Transparent},measureLabels:{fontWeight:Tae(a?.[Rae.FontStyle],"normal"),fontStyle:zae(a?.[Rae.FontStyle]),textDecoration:jae(a?.[Rae.FontStyle]),color:Lae(e,a?.[Rae.FontColor])??u(Aae.Measure,Iae.LabelName,Pae.FontColor)??l$.FontSecondary,background:Lae(e,a?.[Rae.Background])??u(Aae.Measure,Iae.LabelName,Pae.BackgroundColor)??l$.Transparent},totalValues:{fontWeight:Tae(s?.[Rae.FontStyle],i$),fontStyle:zae(s?.[Rae.FontStyle]),textDecoration:jae(s?.[Rae.FontStyle]),color:Lae(e,s?.[Rae.FontColor])??u(Aae.Total,Iae.LabelValue,Pae.FontColor)??yW.TEXT,background:Lae(e,s?.[Rae.Background])??u(Aae.Total,Iae.LabelValue,Pae.BackgroundColor)??l$.Transparent},nullValues:{fontWeight:Tae(l?.[Rae.FontStyle],"normal"),fontStyle:zae(l?.[Rae.FontStyle]),textDecoration:jae(l?.[Rae.FontStyle]),color:Lae(e,l?.[Rae.FontColor])??u(Aae.Null,Iae.LabelValue,Pae.FontColor)??yW.TEXT,background:Lae(e,l?.[Rae.Background])??u(Aae.Null,Iae.LabelValue,Pae.BackgroundColor)??l$.NullValueBackground},grid:{columnLineClamp:p,lineClamp:d,border:Lae(e,c?.[Rae.Border])??u(Aae.Grid,Iae.Grid,Pae.BorderColor)??l$.DividerLight,divider:Lae(e,c?.[Rae.Divider])??u(Aae.Grid,Iae.Divider,Pae.BorderColor)??l$.DividerDark,background:Lae(e,c?.[Rae.Background])??u(Aae.Grid,Iae.Grid,Pae.BackgroundColor)??l$.Transparent},selectedColors:VB(e)};return f.headerCellHeight=Math.max(Dae(f.header.fontSize,p),Dae(f.dimensionValues.fontSize,p),32),f.contentCellHeight=Math.max(Dae(f.measureValues.fontSize,d),Dae(f.dimensionValues.fontSize,d),24),f.dimensionValueTextHeight=Dae(f.dimensionValues.fontSize,1),f})(m,p)),[m,p]),A=((e,t,n)=>{const[,r,o]=j$((async()=>{const t=zW(n.flags),r=e.getStyle("","","fontFamily"),o=e.getStyle("object","label.name","fontFamily"),i=e.getStyle("object","label.value","fontFamily"),a=e.getStyle("","","fontFamilies")??[];return Promise.all([...t,...a,r,o,i,$$].filter((e=>void 0!==e)).map((async e=>{await document.fonts.load(`600 12px ${e}`),await document.fonts.load(`12px ${e}`)})))}),[t,e,n]);return o?(console.warn("Failed to load fonts:",o),!0):!r})(m,i,e),P=E(),O=e.flags.isEnabled("CLIENT_IM_6225_PIVOT_TABLE_RTL")?P.direction:"ltr";Fae([Wae({model:a,layoutService:p,effectivePropertiesService:d,translator:g})]),R((()=>{!S&&a&&!!w&&A&&((e,{selections:n,baseObjects:r,coreServices:o,nebulaObjects:i})=>{const a=Mae(r.direction);e.render(Uo.jsx(t.StrictMode,{children:Uo.jsx(OD,{theme:a,children:Uo.jsx(xV,{...i,children:Uo.jsx(yV,{...r,children:Uo.jsx(wK,{selections:n,children:Uo.jsx(SV,{...o,children:Uo.jsx(lU,{children:Uo.jsx(goe,{})})})})})})})}))})(o,{selections:f,baseObjects:{rect:v,pageInfo:_,qPivotDataPages:w,updatePageInfo:b,direction:O},nebulaObjects:{env:e,app:s,model:a,embed:l,theme:m,keyboard:c,translator:g,interactions:h},coreServices:{styleService:k,viewService:x,layoutService:p,downloadService:u,effectivePropertiesService:d}})}),[a,s,v,h,f,x,p,u,S,w,k,o,A,g,y,_,b,d,l,c,m,e,O])},Jae={version:"6.0.21",qHyperCubeDef:{qAlwaysFullyExpanded:!1,qDimensions:[],qMeasures:[],qMode:"P",qSuppressMissing:!0,qSuppressZero:!1,qShowTotalsAbove:!0,qInitialDataFetch:[{qTop:0,qLeft:0,qWidth:50,qHeight:50}],qIndentMode:!1},showTitles:!0,title:"",subtitle:"",footnote:"",nullValueRepresentation:{text:"-"},components:[]};function Zae(e){return{qae:{properties:{initial:{...Jae,qHyperCubeDef:{...Jae.qHyperCubeDef,qIndentMode:!1}}},data:WF(e)},ext:k$(e),component(){Xae(e)}}}export{Zae as default};
|