@bino-bi/bn-template-engine 1.0.0-alpha.4 → 1.0.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bn-template-engine/bn-template-engine.esm.js +1 -1
- package/dist/bn-template-engine/p-06946f44.entry.js +1 -0
- package/dist/bn-template-engine/p-0fabe296.entry.js +1 -0
- package/dist/bn-template-engine/p-1164c0b0.entry.js +1 -0
- package/dist/bn-template-engine/p-355abdf0.entry.js +1 -0
- package/dist/bn-template-engine/p-79KuA4Ox.js +1 -0
- package/dist/bn-template-engine/p-859cc06d.entry.js +1 -0
- package/dist/bn-template-engine/p-8acec99e.entry.js +1 -0
- package/dist/bn-template-engine/p-8f490c45.entry.js +1 -0
- package/dist/bn-template-engine/p-98cf512f.entry.js +1 -0
- package/dist/bn-template-engine/p-9a564f8f.entry.js +1 -0
- package/dist/bn-template-engine/{p-CL1RYuNU.js → p-B0lsgVuN.js} +1 -1
- package/dist/bn-template-engine/p-B7p8beYH.js +1 -0
- package/dist/bn-template-engine/p-BDh7GfC5.js +1 -0
- package/dist/bn-template-engine/p-BoMtoHJB.js +1 -0
- package/dist/bn-template-engine/p-Bs8BqBsb.js +1 -0
- package/dist/bn-template-engine/p-CYjZRKdI.js +1 -0
- package/dist/bn-template-engine/{p-P7pGJBgc.js → p-DG-1MR_T.js} +1 -1
- package/dist/bn-template-engine/p-bdd2b243.entry.js +1 -0
- package/dist/bn-template-engine/p-e6b24f15.entry.js +1 -0
- package/dist/bn-template-engine/p-f27995c9.entry.js +1 -0
- package/dist/bn-template-engine/{p-Bnhh02CF.js → p-sRO-lj7X.js} +1 -1
- package/dist/bn-template-engine/p-tzFCK9qn.js +1 -0
- package/dist/cjs/{Order-iG11HI4R.js → Order-BGx39pS5.js} +448 -0
- package/dist/cjs/{alasql.min-C_nHTuEQ.js → SVGVariancesStyleGroup-BqAdPYtL.js} +8228 -3
- package/dist/cjs/bn-asset_16.cjs.entry.js +9018 -0
- package/dist/cjs/bn-card.cjs.entry.js +3 -4
- package/dist/cjs/bn-chart-time.cjs.entry.js +11 -16
- package/dist/cjs/bn-grid.cjs.entry.js +5 -8
- package/dist/cjs/bn-image.cjs.entry.js +5 -8
- package/dist/cjs/bn-internationalization.cjs.entry.js +3 -4
- package/dist/cjs/bn-layout-card.cjs.entry.js +125 -6
- package/dist/cjs/bn-template-engine.cjs.js +1 -1
- package/dist/cjs/bn-template.cjs.entry.js +2 -3
- package/dist/cjs/bn-text.cjs.entry.js +7 -11
- package/dist/cjs/bn-tree.cjs.entry.js +5 -8
- package/dist/cjs/{formatter-DIJL_crx.js → formatter-4XCS0d2B.js} +8 -2
- package/dist/cjs/ibcs-chart-time.cjs.entry.js +37 -42
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{scaling-9Tz595RQ.js → scaling-BidPsO53.js} +115 -12
- package/dist/cjs/{withBodyObserver-CKpSD8UT.js → withBodyObserver-C6gLgq_e.js} +3 -3
- package/dist/cjs/{withComponentStatus-Bw70BhO0.js → withComponentStatus-_x4LQZ0N.js} +5 -5
- package/dist/cjs/{withComponentStyle-aIbTCtfj.js → withComponentStyle-ClSJfCku.js} +4 -4
- package/dist/cjs/{utils-CwHIVbbL.js → withHasError-B8gHkfV2.js} +69 -1
- package/dist/cjs/{withStyled-CS1Yp4sv.js → withStyled-9tG024gQ.js} +62 -9
- package/dist/collection/components/bn-chart-structure/utils/elements/Label.js +11 -0
- package/dist/collection/components/bn-chart-structure/utils/elements/StackedBar.js +5 -2
- package/dist/collection/components/bn-layout-card/bn-layout-card.css +1 -0
- package/dist/collection/components/bn-layout-card/bn-layout-card.js +162 -27
- package/dist/collection/components/bn-layout-page/bn-layout-page.css +1 -0
- package/dist/collection/components/bn-layout-page/bn-layout-page.js +151 -33
- package/dist/collection/components/bn-table/bn-table.js +12 -10
- package/dist/collection/components/bn-table/ibcs-table.js +2 -2
- package/dist/collection/utils/parentDimensions.js +38 -6
- package/dist/components/bn-layout-card.js +1 -1
- package/dist/components/bn-layout-page.js +1 -1
- package/dist/components/bn-table.js +1 -1
- package/dist/components/ibcs-chart-structure2.js +1 -1
- package/dist/components/ibcs-table2.js +1 -1
- package/dist/components/scaling.js +1 -1
- package/dist/esm/{Order-Bnhh02CF.js → Order-sRO-lj7X.js} +448 -1
- package/dist/esm/{alasql.min-CWu4NkIt.js → SVGVariancesStyleGroup-DOIT-zvI.js} +8212 -2
- package/dist/esm/bn-asset_16.entry.js +9001 -0
- package/dist/esm/bn-card.entry.js +4 -5
- package/dist/esm/bn-chart-time.entry.js +8 -13
- package/dist/esm/bn-grid.entry.js +6 -9
- package/dist/esm/bn-image.entry.js +6 -9
- package/dist/esm/bn-internationalization.entry.js +4 -5
- package/dist/esm/bn-layout-card.entry.js +126 -7
- package/dist/esm/bn-template-engine.js +1 -1
- package/dist/esm/bn-template.entry.js +2 -3
- package/dist/esm/bn-text.entry.js +7 -11
- package/dist/esm/bn-tree.entry.js +6 -9
- package/dist/esm/{context-protocol-BHnQsVsr.js → context-protocol-2peaD4y8.js} +1 -1
- package/dist/esm/editor-companion.entry.js +1 -1
- package/dist/esm/{formatter-DTMEZ6d8.js → formatter-BDh7GfC5.js} +6 -2
- package/dist/esm/ibcs-chart-time.entry.js +3 -8
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{scaling-Cehc74IE.js → scaling-BOcjT8M0.js} +112 -10
- package/dist/esm/{withBodyObserver-FQ8NwCIz.js → withBodyObserver-DczL5ia8.js} +1 -1
- package/dist/esm/{withComponentStatus-DWjDYtZ7.js → withComponentStatus-DodoSXe-.js} +1 -1
- package/dist/esm/{withComponentStyle-9uP_hcDq.js → withComponentStyle-D3VWOsto.js} +2 -2
- package/dist/esm/{utils-DvvwfRQG.js → withHasError-B3QX2emi.js} +69 -1
- package/dist/esm/{withStyled--qQWquTH.js → withStyled-CE3_3taP.js} +57 -5
- package/dist/types/components/bn-chart-structure/utils/elements/Label.d.ts +2 -0
- package/dist/types/components/bn-layout-card/bn-layout-card.d.ts +139 -0
- package/dist/types/components/bn-layout-page/bn-layout-page.d.ts +154 -0
- package/dist/types/components/bn-table/bn-table.d.ts +7 -5
- package/dist/types/components.d.ts +170 -2
- package/dist/types/utils/parentDimensions.d.ts +6 -1
- package/package.json +1 -1
- package/dist/bn-template-engine/p-1265d8d3.entry.js +0 -1
- package/dist/bn-template-engine/p-15516dac.entry.js +0 -1
- package/dist/bn-template-engine/p-1c716641.entry.js +0 -1
- package/dist/bn-template-engine/p-1jFf17Vj.js +0 -1
- package/dist/bn-template-engine/p-27cc8dc0.entry.js +0 -1
- package/dist/bn-template-engine/p-4426d484.entry.js +0 -1
- package/dist/bn-template-engine/p-51f8dc9e.entry.js +0 -1
- package/dist/bn-template-engine/p-53d4e690.entry.js +0 -1
- package/dist/bn-template-engine/p-5KQYRQLK.js +0 -1
- package/dist/bn-template-engine/p-745f4596.entry.js +0 -1
- package/dist/bn-template-engine/p-75e97c87.entry.js +0 -1
- package/dist/bn-template-engine/p-7a560278.entry.js +0 -1
- package/dist/bn-template-engine/p-7ea7c325.entry.js +0 -1
- package/dist/bn-template-engine/p-945cc95d.entry.js +0 -1
- package/dist/bn-template-engine/p-BFTU3MAI.js +0 -1
- package/dist/bn-template-engine/p-BYBpC0EO.js +0 -1
- package/dist/bn-template-engine/p-BYmPQYxx.js +0 -1
- package/dist/bn-template-engine/p-BfXY5dsy.js +0 -1
- package/dist/bn-template-engine/p-BgnHJQ9Q.js +0 -1
- package/dist/bn-template-engine/p-Bhd_WSML.js +0 -1
- package/dist/bn-template-engine/p-Bka-Z6jo.js +0 -1
- package/dist/bn-template-engine/p-C7dQL8CS.js +0 -1
- package/dist/bn-template-engine/p-CYwd_ZNM.js +0 -1
- package/dist/bn-template-engine/p-ChlK-T9I.js +0 -1
- package/dist/bn-template-engine/p-DHezf8pZ.js +0 -1
- package/dist/bn-template-engine/p-DlppAFq9.js +0 -1
- package/dist/bn-template-engine/p-DvDDgmcV.js +0 -1
- package/dist/bn-template-engine/p-DvvwfRQG.js +0 -1
- package/dist/bn-template-engine/p-b34eaf86.entry.js +0 -1
- package/dist/bn-template-engine/p-bdb8b44c.entry.js +0 -1
- package/dist/bn-template-engine/p-c44fcb8e.entry.js +0 -1
- package/dist/bn-template-engine/p-c7e1a49b.entry.js +0 -1
- package/dist/bn-template-engine/p-d9003041.entry.js +0 -1
- package/dist/bn-template-engine/p-daa7ffa3.entry.js +0 -1
- package/dist/bn-template-engine/p-e084f50a.entry.js +0 -1
- package/dist/bn-template-engine/p-eaba6658.entry.js +0 -1
- package/dist/bn-template-engine/p-u8igQLRZ.js +0 -1
- package/dist/cjs/DataFormatDigits-DKcOeLNK.js +0 -142
- package/dist/cjs/DateStringFactory-CSKvbS8K.js +0 -452
- package/dist/cjs/SVGVariancesStyleGroup-K-Tw6lOD.js +0 -7960
- package/dist/cjs/_commonjsHelpers-BJu3ubxk.js +0 -10
- package/dist/cjs/bn-asset.cjs.entry.js +0 -42
- package/dist/cjs/bn-body_4.cjs.entry.js +0 -748
- package/dist/cjs/bn-chart-structure_5.cjs.entry.js +0 -3934
- package/dist/cjs/bn-component-style.cjs.entry.js +0 -44
- package/dist/cjs/bn-dataset.cjs.entry.js +0 -306
- package/dist/cjs/bn-layout-page.cjs.entry.js +0 -143
- package/dist/cjs/bn-message.cjs.entry.js +0 -52
- package/dist/cjs/bn-table.cjs.entry.js +0 -979
- package/dist/cjs/contentDecoder-JxOldq1e.js +0 -419
- package/dist/cjs/emotion-hash.esm-nbbEQ0Dn.js +0 -57
- package/dist/cjs/ibcs-table.cjs.entry.js +0 -2276
- package/dist/cjs/ibcsRuleSet-DgUoXOfd.js +0 -136
- package/dist/cjs/index-Dm85hG6t.js +0 -65
- package/dist/cjs/withHasError-D7ue5vAv.js +0 -72
- package/dist/cjs/withTranslation-rwgyITqe.js +0 -77
- package/dist/esm/DataFormatDigits-oSZ1hBKE.js +0 -137
- package/dist/esm/DateStringFactory-CSGz6TDk.js +0 -450
- package/dist/esm/SVGVariancesStyleGroup-CqTjrZYg.js +0 -7950
- package/dist/esm/_commonjsHelpers-BFTU3MAI.js +0 -7
- package/dist/esm/bn-asset.entry.js +0 -40
- package/dist/esm/bn-body_4.entry.js +0 -743
- package/dist/esm/bn-chart-structure_5.entry.js +0 -3928
- package/dist/esm/bn-component-style.entry.js +0 -42
- package/dist/esm/bn-dataset.entry.js +0 -304
- package/dist/esm/bn-layout-page.entry.js +0 -141
- package/dist/esm/bn-message.entry.js +0 -50
- package/dist/esm/bn-table.entry.js +0 -977
- package/dist/esm/contentDecoder-oMmxz6nJ.js +0 -416
- package/dist/esm/emotion-hash.esm-BYBpC0EO.js +0 -55
- package/dist/esm/ibcs-table.entry.js +0 -2274
- package/dist/esm/ibcsRuleSet-K4ytuA1f.js +0 -133
- package/dist/esm/index-DHezf8pZ.js +0 -65
- package/dist/esm/withHasError-FyY5mQ_3.js +0 -70
- package/dist/esm/withTranslation-BqD0Kp7b.js +0 -75
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,B as a,c as t,w as i,N as r,a as l,b as n}from"./p-JNHhIe7t.js";export{s as setNonce}from"./p-JNHhIe7t.js";import{g as o}from"./p-DQuL1Twl.js";var d=e=>{const a=e.cloneNode;e.cloneNode=function(e){if("TEMPLATE"===this.nodeName)return a.call(this,e);const t=a.call(this,!1),i=this.childNodes;if(e)for(let e=0;e<i.length;e++)2!==i[e].nodeType&&t.appendChild(i[e].cloneNode(!0));return t}};(()=>{a.isDev&&!a.isTesting&&t("Running in development mode."),a.cloneNodeFix&&d(l.prototype);const s=a.scriptDataOpts?i.document&&Array.from(i.document.querySelectorAll("script")).find((e=>new RegExp(`/${r}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===r)):null,n=import.meta.url,o=a.scriptDataOpts&&(s||{})["data-opts"]||{};return""!==n&&(o.resourcesUrl=new URL(".",n).href),e(o)})().then((async e=>(await o(),n(JSON.parse('[["p-daa7ffa3",[[257,"bn-layout-page",{"styles":[1],"messageText":[1,"message-text"],"messageImage":[1,"message-image"],"titleBusinessUnit":[1,"title-business-unit"],"titleScenarios":[1,"title-scenarios"],"titleVariances":[1,"title-variances"],"titleOrder":[1,"title-order"],"titleOrderDirection":[1,"title-order-direction"],"titleMeasures":[1,"title-measures"],"titleDateStart":[1,"title-date-start"],"titleDateEnd":[1,"title-date-end"],"titleDateFormat":[1,"title-date-format"],"titleDateLink":[1,"title-date-link"],"titleNamespace":[1,"title-namespace"],"pageFormat":[1,"page-format"],"pageOrientation":[1,"page-orientation"],"pageNumber":[1,"page-number"],"footerText":[1,"footer-text"],"footerDisplayPageNumber":[4,"footer-display-page-number"],"pageLayout":[1,"page-layout"],"pageCustomTemplate":[1,"page-custom-template"],"pageGridGap":[1,"page-grid-gap"],"pageFitToContent":[4,"page-fit-to-content"],"getNumberOfSlot":[64]}]]],["p-bdb8b44c",[[257,"bn-layout-card",{"styles":[1],"titleImage":[1,"title-image"],"titleBusinessUnit":[1,"title-business-unit"],"titleScenarios":[1,"title-scenarios"],"titleVariances":[1,"title-variances"],"titleOrder":[1,"title-order"],"titleOrderDirection":[1,"title-order-direction"],"titleMeasures":[1,"title-measures"],"titleDateStart":[1,"title-date-start"],"titleDateEnd":[1,"title-date-end"],"titleDateFormat":[1,"title-date-format"],"titleDateLink":[1,"title-date-link"],"titleNamespace":[1,"title-namespace"],"footerText":[1,"footer-text"],"cardLayout":[1,"card-layout"],"cardCustomTemplate":[1,"card-custom-template"],"cardGridGap":[1,"card-grid-gap"],"cardFitToContent":[4,"card-fit-to-content"],"cardShowBorder":[4,"card-show-border"],"getNumberOfSlot":[64]}]]],["p-b34eaf86",[[1,"bn-chart-time",{"chartTitle":[1,"chart-title"],"filter":[1],"scenarios":[1],"variances":[1],"syncSpaceLeft":[2,"sync-space-left"],"limit":[2],"unitScaling":[8,"unit-scaling"],"percentageScaling":[8,"percentage-scaling"],"level":[1],"order":[1],"orderDirection":[1,"order-direction"],"dateInterval":[1,"date-interval"],"chartMode":[1,"chart-mode"],"maxBars":[2,"max-bars"],"stack":[1],"scale":[1],"intervalSpanLimit":[2,"interval-span-limit"],"axisLabelsMode":[1,"axis-labels-mode"],"lineFullWidth":[1,"line-full-width"],"showCategories":[1,"show-categories"],"measureScale":[1,"measure-scale"],"showMeasureScale":[1,"show-measure-scale"],"showOverlayAvg":[1,"show-overlay-avg"],"showOverlayMedian":[1,"show-overlay-median"],"measureUnit":[1,"measure-unit"],"data":[32],"datasetMeta":[32],"appliedScaleFactor":[32]},null,{"scenarios":[{"validateScenario":0}],"variances":[{"validateVariances":0}],"syncSpaceLeft":[{"validateLeftSync":0}],"limit":[{"validateLimit":0}],"unitScaling":[{"validateUnitScaling":0}],"percentageScaling":[{"validatePercentageScaling":0}],"level":[{"validateLevel":0}],"order":[{"validateOrderList":0}],"orderDirection":[{"validateOrderDirection":0}],"dateInterval":[{"validateDateInterval":0}],"chartMode":[{"validateChartMode":0}],"maxBars":[{"validateMaxBars":0}],"stack":[{"validateStack":0}],"scale":[{"validateScaling":0}],"axisLabelsMode":[{"validateAxisLabelsMode":0}],"lineFullWidth":[{"validateLineFullWidth":0}],"showCategories":[{"validateShowCategories":0}],"measureScale":[{"validateMeasureScale":0}],"showMeasureScale":[{"validateShowMeasureScale":0}],"showOverlayAvg":[{"validateShowOverlayAvg":0}],"showOverlayMedian":[{"validateShowOverlayMedian":0}]}]]],["p-745f4596",[[1,"bn-table",{"scale":[1],"tableTitle":[1,"table-title"],"filter":[1],"measureUnit":[1,"measure-unit"],"scenarios":[1],"variances":[1],"barColumns":[1,"bar-columns"],"barColumnWidth":[1,"bar-column-width"],"unitScaling":[8,"unit-scaling"],"percentageScaling":[8,"percentage-scaling"],"dataFormat":[1,"data-format"],"grouped":[1],"showMeasureScale":[1,"show-measure-scale"],"showGroupTitle":[1,"show-group-title"],"type":[1],"limit":[2],"thereof":[1],"partof":[1],"order":[1],"orderDirection":[1,"order-direction"],"measureType":[1,"measure-type"],"measureScale":[1,"measure-scale"],"dataFormatDigitsDecimal":[2,"data-format-digits-decimal"],"dataFormatDigitsPercent":[2,"data-format-digits-percent"],"categoryWidth":[1,"category-width"],"columnthereof":[1],"data":[32],"datasetMeta":[32],"appliedScaleFactor":[32]},null,{"scale":[{"validateScaling":0}],"scenarios":[{"validateScenario":0}],"variances":[{"validateVariances":0}],"barColumns":[{"validateBarColumns":0}],"barColumnWidth":[{"validateBarColumnWidth":0}],"unitScaling":[{"validateUnitScaling":0}],"percentageScaling":[{"validatePercentageScaling":0}],"dataFormat":[{"validateDataFormat":0}],"grouped":[{"validateGrouped":0}],"showMeasureScale":[{"validateShowMeasureScale":0}],"showGroupTitle":[{"validateShowGroupTitle":0}],"type":[{"validateType":0}],"limit":[{"validateLimit":0}],"thereof":[{"validateThereOf":0}],"partof":[{"validatePartOf":0}],"order":[{"validateOrderList":0}],"orderDirection":[{"validateOrderDirection":0}],"measureType":[{"validateMeasureType":0}],"measureScale":[{"validateMeasureScale":0}],"dataFormatDigitsDecimal":[{"validateDataFormatDigitsDecimal":0}],"dataFormatDigitsPercent":[{"validateDateFormatDigitsPercent":0}],"categoryWidth":[{"validateCategoryWidth":0}],"columnthereof":[{"validateColumnThereOf":0}]}]]],["p-1c716641",[[1,"bn-asset",{"name":[1]}]]],["p-c44fcb8e",[[0,"bn-component-style",{"name":[1]}]]],["p-15516dac",[[0,"bn-dataset",{"name":[1],"datasources":[1],"static":[4],"raw":[4]},null,{"name":[{"nameUpdated":0}]}]]],["p-4426d484",[[257,"bn-grid",{"chartTitle":[1,"chart-title"],"rowHeaders":[1,"row-headers"],"columnHeaders":[1,"column-headers"],"showRowHeaders":[1,"show-row-headers"],"showColumnHeaders":[1,"show-column-headers"],"showBorders":[1,"show-borders"],"rowHeaderWidth":[1,"row-header-width"],"cellGap":[1,"cell-gap"],"gridConfig":[32]},null,{"rowHeaders":[{"validateRowHeaders":0}],"columnHeaders":[{"validateColumnHeaders":0}],"showRowHeaders":[{"validateShowRowHeaders":0}],"showColumnHeaders":[{"validateShowColumnHeaders":0}],"showBorders":[{"validateShowBorders":0}]}]]],["p-d9003041",[[1,"bn-image",{"source":[1]}]]],["p-e084f50a",[[0,"bn-internationalization",{"code":[1],"namespace":[1]}]]],["p-eaba6658",[[257,"bn-template",{"templateId":[1,"template-id"]}]]],["p-7a560278",[[1,"bn-text",{"value":[1],"scale":[1],"data":[32]},null,{"value":[{"validateValue":0}],"scale":[{"validateScaling":0}]}]]],["p-27cc8dc0",[[257,"bn-tree",{"edges":[1],"direction":[1],"levelSpacing":[2,"level-spacing"],"nodeSpacing":[2,"node-spacing"],"edgeStyle":[1,"edge-style"],"showOperators":[1,"show-operators"],"treeConfig":[32],"layout":[32],"nodeRects":[32],"svgWidth":[32],"svgHeight":[32]},null,{"edges":[{"validateEdgesProp":0}],"direction":[{"validateDirection":0}],"levelSpacing":[{"validateLevelSpacing":0}],"nodeSpacing":[{"validateNodeSpacing":0}],"edgeStyle":[{"validateEdgeStyle":0}],"showOperators":[{"validateShowOperators":0}]}]]],["p-75e97c87",[[0,"editor-companion",{"internationalizationKeys":[64],"getDistinctFromDataSource":[64],"getDistinctFromDataset":[64]}]]],["p-c7e1a49b",[[257,"bn-card"]]],["p-51f8dc9e",[[1,"bn-message",{"text":[1025],"image":[1]}]]],["p-1265d8d3",[[1,"ibcs-chart-time",{"data":[16],"chartTitle":[1,"chart-title"],"scenarios":[16],"variances":[16],"hideAxisLabels":[4,"hide-axis-labels"],"pixelPerUnit":[2,"pixel-per-unit"],"pixelPerPercentage":[2,"pixel-per-percentage"],"limit":[2],"leftSideOffsetForHorizontalSync":[2,"left-side-offset-for-horizontal-sync"],"styles":[1040],"i18n":[1040],"order":[16],"level":[1],"dateInterval":[1,"date-interval"],"intervalSpanLimit":[2,"interval-span-limit"],"axisLabelsMode":[1,"axis-labels-mode"],"filter":[1],"measureScale":[1,"measure-scale"],"measureUnit":[1,"measure-unit"],"showMeasureScale":[4,"show-measure-scale"],"showOverlayMedian":[4,"show-overlay-median"],"showOverlayAvg":[4,"show-overlay-avg"],"chartMode":[1,"chart-mode"],"maxBars":[2,"max-bars"],"stackConfig":[16],"lineFullWidth":[4,"line-full-width"],"containerWidth":[2,"container-width"],"dataFormatDigits":[16],"parentDimensions":[16]}]]],["p-945cc95d",[[1,"ibcs-table",{"data":[16],"tableTitle":[1,"table-title"],"scenarios":[16],"scenariosDataFormat":[1,"scenarios-data-format"],"grouped":[4],"limit":[2],"showGroupTitle":[4,"show-group-title"],"thereof":[16],"partof":[16],"order":[16],"categorythereof":[16],"type":[1],"categoryWidth":[1,"category-width"],"dataFormatDigits":[16],"i18n":[1040],"i18nMode":[1,"i18n-mode"],"measureScale":[1,"measure-scale"],"measureUnit":[1,"measure-unit"],"showMeasureScale":[4,"show-measure-scale"],"measureType":[1,"measure-type"],"filter":[1],"barColumns":[16],"barColumnMaxWidth":[2,"bar-column-max-width"],"unitScaling":[2,"unit-scaling"],"percentageScaling":[2,"percentage-scaling"],"scaleFactor":[2,"scale-factor"]}]]],["p-7ea7c325",[[1,"bn-chart-structure",{"chartTitle":[1,"chart-title"],"filter":[1],"scenarios":[1],"variances":[1],"unitScaling":[8,"unit-scaling"],"percentageScaling":[8,"percentage-scaling"],"level":[1],"order":[1],"orderDirection":[1,"order-direction"],"limit":[2],"showCategories":[1,"show-categories"],"measureScale":[1,"measure-scale"],"showMeasureScale":[1,"show-measure-scale"],"measureUnit":[1,"measure-unit"],"stack":[1],"scale":[1],"data":[32],"datasetMeta":[32],"appliedScaleFactor":[32]},null,{"scenarios":[{"validateScenario":0}],"variances":[{"validateVariances":0}],"unitScaling":[{"validateUnitScaling":0}],"percentageScaling":[{"validatePercentageScaling":0}],"level":[{"validateLevel":0}],"order":[{"validateOrderList":0}],"orderDirection":[{"validateOrderDirection":0}],"limit":[{"validateLimit":0}],"showCategories":[{"validateShowCategories":0}],"measureScale":[{"validateMeasureScale":0}],"showMeasureScale":[{"validateShowMeasureScale":0}],"stack":[{"validateStack":0}],"scale":[{"validateScaling":0}]}],[257,"bn-context",{"locale":[1]},null,{"locale":[{"setLocale":0}]}],[0,"bn-datasource",{"name":[1],"raw":[4]}],[257,"bn-page",{"format":[1],"orientation":[1]},null,{"format":[{"validateFormat":0}],"orientation":[{"validateOrientation":0}]}],[1,"ibcs-chart-structure",{"data":[16],"chartTitle":[1,"chart-title"],"scenarios":[16],"variances":[16],"hideCategories":[4,"hide-categories"],"pixelPerUnit":[2,"pixel-per-unit"],"pixelPerPercentage":[2,"pixel-per-percentage"],"limit":[2],"styles":[1040],"i18n":[1040],"order":[16],"level":[1],"filter":[1],"measureScale":[1,"measure-scale"],"measureUnit":[1,"measure-unit"],"showMeasureScale":[4,"show-measure-scale"],"dataFormatDigits":[16],"stackConfig":[16],"parentDimensions":[16]}]]],["p-53d4e690",[[1,"bn-title",{"businessUnit":[1,"business-unit"],"scenarios":[1],"variances":[1],"order":[1],"orderDirection":[1,"order-direction"],"measures":[1],"dateStart":[1,"date-start"],"dateEnd":[1,"date-end"],"dateFormat":[1,"date-format"],"dateLink":[1,"date-link"]},null,{"scenarios":[{"validateScenario":0}],"variances":[{"validateVariances":0}],"order":[{"validateOrder":0}],"orderDirection":[{"validateOrderDirection":0}],"measures":[{"validateMeasures":0}],"dateStart":[{"validateDateStart":0}],"dateEnd":[{"validateDateEnd":0}],"dateFormat":[{"validateDateFormat":0}],"dateLink":[{"validateDateLink":0}]}],[257,"bn-body"],[1,"bn-footer",{"pageNumber":[1026,"page-number"],"text":[1025],"code":[1025],"displayPageNumber":[4,"display-page-number"]}],[1,"ibcs-title",{"businessUnit":[1537,"business-unit"],"scenarios":[16],"measures":[16],"timeperiod":[16],"intervalSpanLimit":[2,"interval-span-limit"],"order":[16],"i18n":[1040],"i18nMode":[1,"i18n-mode"],"setBusinessUnit":[64],"setProps":[64]}]]]]'),e))));
|
|
1
|
+
import{p as e,B as a,c as t,w as i,N as r,a as l,b as n}from"./p-JNHhIe7t.js";export{s as setNonce}from"./p-JNHhIe7t.js";import{g as o}from"./p-DQuL1Twl.js";var d=e=>{const a=e.cloneNode;e.cloneNode=function(e){if("TEMPLATE"===this.nodeName)return a.call(this,e);const t=a.call(this,!1),i=this.childNodes;if(e)for(let e=0;e<i.length;e++)2!==i[e].nodeType&&t.appendChild(i[e].cloneNode(!0));return t}};(()=>{a.isDev&&!a.isTesting&&t("Running in development mode."),a.cloneNodeFix&&d(l.prototype);const s=a.scriptDataOpts?i.document&&Array.from(i.document.querySelectorAll("script")).find((e=>new RegExp(`/${r}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===r)):null,n=import.meta.url,o=a.scriptDataOpts&&(s||{})["data-opts"]||{};return""!==n&&(o.resourcesUrl=new URL(".",n).href),e(o)})().then((async e=>(await o(),n(JSON.parse('[["p-06946f44",[[257,"bn-layout-card",{"styles":[1],"titleImage":[1,"title-image"],"titleBusinessUnit":[1,"title-business-unit"],"titleScenarios":[1,"title-scenarios"],"titleVariances":[1,"title-variances"],"titleOrder":[1,"title-order"],"titleOrderDirection":[1,"title-order-direction"],"titleMeasures":[1,"title-measures"],"titleDateStart":[1,"title-date-start"],"titleDateEnd":[1,"title-date-end"],"titleDateFormat":[1,"title-date-format"],"titleDateLink":[1,"title-date-link"],"titleNamespace":[1,"title-namespace"],"footerText":[1,"footer-text"],"cardLayout":[1,"card-layout"],"cardCustomTemplate":[1,"card-custom-template"],"cardGridGap":[1,"card-grid-gap"],"cardFitToContent":[4,"card-fit-to-content"],"cardShowBorder":[4,"card-show-border"],"getNumberOfSlot":[64]}]]],["p-98cf512f",[[1,"bn-chart-time",{"chartTitle":[1,"chart-title"],"filter":[1],"scenarios":[1],"variances":[1],"syncSpaceLeft":[2,"sync-space-left"],"limit":[2],"unitScaling":[8,"unit-scaling"],"percentageScaling":[8,"percentage-scaling"],"level":[1],"order":[1],"orderDirection":[1,"order-direction"],"dateInterval":[1,"date-interval"],"chartMode":[1,"chart-mode"],"maxBars":[2,"max-bars"],"stack":[1],"scale":[1],"intervalSpanLimit":[2,"interval-span-limit"],"axisLabelsMode":[1,"axis-labels-mode"],"lineFullWidth":[1,"line-full-width"],"showCategories":[1,"show-categories"],"measureScale":[1,"measure-scale"],"showMeasureScale":[1,"show-measure-scale"],"showOverlayAvg":[1,"show-overlay-avg"],"showOverlayMedian":[1,"show-overlay-median"],"measureUnit":[1,"measure-unit"],"data":[32],"datasetMeta":[32],"appliedScaleFactor":[32]},null,{"scenarios":[{"validateScenario":0}],"variances":[{"validateVariances":0}],"syncSpaceLeft":[{"validateLeftSync":0}],"limit":[{"validateLimit":0}],"unitScaling":[{"validateUnitScaling":0}],"percentageScaling":[{"validatePercentageScaling":0}],"level":[{"validateLevel":0}],"order":[{"validateOrderList":0}],"orderDirection":[{"validateOrderDirection":0}],"dateInterval":[{"validateDateInterval":0}],"chartMode":[{"validateChartMode":0}],"maxBars":[{"validateMaxBars":0}],"stack":[{"validateStack":0}],"scale":[{"validateScaling":0}],"axisLabelsMode":[{"validateAxisLabelsMode":0}],"lineFullWidth":[{"validateLineFullWidth":0}],"showCategories":[{"validateShowCategories":0}],"measureScale":[{"validateMeasureScale":0}],"showMeasureScale":[{"validateShowMeasureScale":0}],"showOverlayAvg":[{"validateShowOverlayAvg":0}],"showOverlayMedian":[{"validateShowOverlayMedian":0}]}]]],["p-8acec99e",[[257,"bn-grid",{"chartTitle":[1,"chart-title"],"rowHeaders":[1,"row-headers"],"columnHeaders":[1,"column-headers"],"showRowHeaders":[1,"show-row-headers"],"showColumnHeaders":[1,"show-column-headers"],"showBorders":[1,"show-borders"],"rowHeaderWidth":[1,"row-header-width"],"cellGap":[1,"cell-gap"],"gridConfig":[32]},null,{"rowHeaders":[{"validateRowHeaders":0}],"columnHeaders":[{"validateColumnHeaders":0}],"showRowHeaders":[{"validateShowRowHeaders":0}],"showColumnHeaders":[{"validateShowColumnHeaders":0}],"showBorders":[{"validateShowBorders":0}]}]]],["p-0fabe296",[[1,"bn-image",{"source":[1]}]]],["p-bdd2b243",[[0,"bn-internationalization",{"code":[1],"namespace":[1]}]]],["p-f27995c9",[[257,"bn-template",{"templateId":[1,"template-id"]}]]],["p-355abdf0",[[1,"bn-text",{"value":[1],"scale":[1],"data":[32]},null,{"value":[{"validateValue":0}],"scale":[{"validateScaling":0}]}]]],["p-859cc06d",[[257,"bn-tree",{"edges":[1],"direction":[1],"levelSpacing":[2,"level-spacing"],"nodeSpacing":[2,"node-spacing"],"edgeStyle":[1,"edge-style"],"showOperators":[1,"show-operators"],"treeConfig":[32],"layout":[32],"nodeRects":[32],"svgWidth":[32],"svgHeight":[32]},null,{"edges":[{"validateEdgesProp":0}],"direction":[{"validateDirection":0}],"levelSpacing":[{"validateLevelSpacing":0}],"nodeSpacing":[{"validateNodeSpacing":0}],"edgeStyle":[{"validateEdgeStyle":0}],"showOperators":[{"validateShowOperators":0}]}]]],["p-1164c0b0",[[0,"editor-companion",{"internationalizationKeys":[64],"getDistinctFromDataSource":[64],"getDistinctFromDataset":[64]}]]],["p-9a564f8f",[[257,"bn-card"]]],["p-8f490c45",[[1,"ibcs-chart-time",{"data":[16],"chartTitle":[1,"chart-title"],"scenarios":[16],"variances":[16],"hideAxisLabels":[4,"hide-axis-labels"],"pixelPerUnit":[2,"pixel-per-unit"],"pixelPerPercentage":[2,"pixel-per-percentage"],"limit":[2],"leftSideOffsetForHorizontalSync":[2,"left-side-offset-for-horizontal-sync"],"styles":[1040],"i18n":[1040],"order":[16],"level":[1],"dateInterval":[1,"date-interval"],"intervalSpanLimit":[2,"interval-span-limit"],"axisLabelsMode":[1,"axis-labels-mode"],"filter":[1],"measureScale":[1,"measure-scale"],"measureUnit":[1,"measure-unit"],"showMeasureScale":[4,"show-measure-scale"],"showOverlayMedian":[4,"show-overlay-median"],"showOverlayAvg":[4,"show-overlay-avg"],"chartMode":[1,"chart-mode"],"maxBars":[2,"max-bars"],"stackConfig":[16],"lineFullWidth":[4,"line-full-width"],"containerWidth":[2,"container-width"],"dataFormatDigits":[16],"parentDimensions":[16]}]]],["p-e6b24f15",[[257,"bn-layout-page",{"styles":[1],"messageText":[1,"message-text"],"messageImage":[1,"message-image"],"titleBusinessUnit":[1,"title-business-unit"],"titleScenarios":[1,"title-scenarios"],"titleVariances":[1,"title-variances"],"titleOrder":[1,"title-order"],"titleOrderDirection":[1,"title-order-direction"],"titleMeasures":[1,"title-measures"],"titleDateStart":[1,"title-date-start"],"titleDateEnd":[1,"title-date-end"],"titleDateFormat":[1,"title-date-format"],"titleDateLink":[1,"title-date-link"],"titleNamespace":[1,"title-namespace"],"pageFormat":[1,"page-format"],"pageOrientation":[1,"page-orientation"],"pageNumber":[1,"page-number"],"footerText":[1,"footer-text"],"footerDisplayPageNumber":[4,"footer-display-page-number"],"pageLayout":[1,"page-layout"],"pageCustomTemplate":[1,"page-custom-template"],"pageGridGap":[1,"page-grid-gap"],"pageFitToContent":[4,"page-fit-to-content"],"getNumberOfSlot":[64]}],[1,"bn-chart-structure",{"chartTitle":[1,"chart-title"],"filter":[1],"scenarios":[1],"variances":[1],"unitScaling":[8,"unit-scaling"],"percentageScaling":[8,"percentage-scaling"],"level":[1],"order":[1],"orderDirection":[1,"order-direction"],"limit":[2],"showCategories":[1,"show-categories"],"measureScale":[1,"measure-scale"],"showMeasureScale":[1,"show-measure-scale"],"measureUnit":[1,"measure-unit"],"stack":[1],"scale":[1],"data":[32],"datasetMeta":[32],"appliedScaleFactor":[32]},null,{"scenarios":[{"validateScenario":0}],"variances":[{"validateVariances":0}],"unitScaling":[{"validateUnitScaling":0}],"percentageScaling":[{"validatePercentageScaling":0}],"level":[{"validateLevel":0}],"order":[{"validateOrderList":0}],"orderDirection":[{"validateOrderDirection":0}],"limit":[{"validateLimit":0}],"showCategories":[{"validateShowCategories":0}],"measureScale":[{"validateMeasureScale":0}],"showMeasureScale":[{"validateShowMeasureScale":0}],"stack":[{"validateStack":0}],"scale":[{"validateScaling":0}]}],[1,"bn-table",{"scale":[1],"tableTitle":[1,"table-title"],"filter":[1],"measureUnit":[1,"measure-unit"],"scenarios":[1],"variances":[1],"barColumns":[1,"bar-columns"],"barColumnWidth":[1,"bar-column-width"],"unitScaling":[8,"unit-scaling"],"percentageScaling":[8,"percentage-scaling"],"dataFormat":[1,"data-format"],"grouped":[1],"showMeasureScale":[1,"show-measure-scale"],"showGroupTitle":[1,"show-group-title"],"type":[1],"limit":[2],"thereof":[1],"partof":[1],"order":[1],"orderDirection":[1,"order-direction"],"measureType":[1,"measure-type"],"measureScale":[1,"measure-scale"],"dataFormatDigitsDecimal":[2,"data-format-digits-decimal"],"dataFormatDigitsPercent":[2,"data-format-digits-percent"],"categoryWidth":[1,"category-width"],"columnthereof":[1],"data":[32],"datasetMeta":[32],"appliedScaleFactor":[32]},null,{"scale":[{"validateScaling":0}],"scenarios":[{"validateScenario":0}],"variances":[{"validateVariances":0}],"barColumns":[{"validateBarColumns":0}],"barColumnWidth":[{"validateBarColumnWidth":0}],"unitScaling":[{"validateUnitScaling":0}],"percentageScaling":[{"validatePercentageScaling":0}],"dataFormat":[{"validateDataFormat":0}],"grouped":[{"validateGrouped":0}],"showMeasureScale":[{"validateShowMeasureScale":0}],"showGroupTitle":[{"validateShowGroupTitle":0}],"type":[{"validateType":0}],"limit":[{"validateLimit":0}],"thereof":[{"validateThereOf":0}],"partof":[{"validatePartOf":0}],"order":[{"validateOrderList":0}],"orderDirection":[{"validateOrderDirection":0}],"measureType":[{"validateMeasureType":0}],"measureScale":[{"validateMeasureScale":0}],"dataFormatDigitsDecimal":[{"validateDataFormatDigitsDecimal":0}],"dataFormatDigitsPercent":[{"validateDateFormatDigitsPercent":0}],"categoryWidth":[{"validateCategoryWidth":0}],"columnthereof":[{"validateColumnThereOf":0}]}],[1,"bn-asset",{"name":[1]}],[0,"bn-component-style",{"name":[1]}],[257,"bn-context",{"locale":[1]},null,{"locale":[{"setLocale":0}]}],[0,"bn-dataset",{"name":[1],"datasources":[1],"static":[4],"raw":[4]},null,{"name":[{"nameUpdated":0}]}],[0,"bn-datasource",{"name":[1],"raw":[4]}],[1,"bn-message",{"text":[1025],"image":[1]}],[257,"bn-page",{"format":[1],"orientation":[1]},null,{"format":[{"validateFormat":0}],"orientation":[{"validateOrientation":0}]}],[1,"ibcs-chart-structure",{"data":[16],"chartTitle":[1,"chart-title"],"scenarios":[16],"variances":[16],"hideCategories":[4,"hide-categories"],"pixelPerUnit":[2,"pixel-per-unit"],"pixelPerPercentage":[2,"pixel-per-percentage"],"limit":[2],"styles":[1040],"i18n":[1040],"order":[16],"level":[1],"filter":[1],"measureScale":[1,"measure-scale"],"measureUnit":[1,"measure-unit"],"showMeasureScale":[4,"show-measure-scale"],"dataFormatDigits":[16],"stackConfig":[16],"parentDimensions":[16]}],[1,"ibcs-table",{"data":[16],"tableTitle":[1,"table-title"],"scenarios":[16],"scenariosDataFormat":[1,"scenarios-data-format"],"grouped":[4],"limit":[2],"showGroupTitle":[4,"show-group-title"],"thereof":[16],"partof":[16],"order":[16],"categorythereof":[16],"type":[1],"categoryWidth":[1,"category-width"],"dataFormatDigits":[16],"i18n":[1040],"i18nMode":[1,"i18n-mode"],"measureScale":[1,"measure-scale"],"measureUnit":[1,"measure-unit"],"showMeasureScale":[4,"show-measure-scale"],"measureType":[1,"measure-type"],"filter":[1],"barColumns":[16],"barColumnMaxWidth":[2,"bar-column-max-width"],"unitScaling":[2,"unit-scaling"],"percentageScaling":[2,"percentage-scaling"],"scaleFactor":[2,"scale-factor"]}],[1,"bn-title",{"businessUnit":[1,"business-unit"],"scenarios":[1],"variances":[1],"order":[1],"orderDirection":[1,"order-direction"],"measures":[1],"dateStart":[1,"date-start"],"dateEnd":[1,"date-end"],"dateFormat":[1,"date-format"],"dateLink":[1,"date-link"]},null,{"scenarios":[{"validateScenario":0}],"variances":[{"validateVariances":0}],"order":[{"validateOrder":0}],"orderDirection":[{"validateOrderDirection":0}],"measures":[{"validateMeasures":0}],"dateStart":[{"validateDateStart":0}],"dateEnd":[{"validateDateEnd":0}],"dateFormat":[{"validateDateFormat":0}],"dateLink":[{"validateDateLink":0}]}],[257,"bn-body"],[1,"bn-footer",{"pageNumber":[1026,"page-number"],"text":[1025],"code":[1025],"displayPageNumber":[4,"display-page-number"]}],[1,"ibcs-title",{"businessUnit":[1537,"business-unit"],"scenarios":[16],"measures":[16],"timeperiod":[16],"intervalSpanLimit":[2,"interval-span-limit"],"order":[16],"i18n":[1040],"i18nMode":[1,"i18n-mode"],"setBusinessUnit":[64],"setProps":[64]}]]]]'),e))));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as e,F as s,g as a}from"./p-JNHhIe7t.js";import{a as i}from"./p-B0lsgVuN.js";import{w as r}from"./p-tzFCK9qn.js";const n=class{constructor(e){t(this,e),this.titleImage="",this.titleBusinessUnit="",this.titleOrder="category",this.titleOrderDirection="asc",this.titleDateFormat="none",this.titleDateLink="none",this.titleNamespace="_system",this.footerText="",this.cardLayout="full",this.cardCustomTemplate='"a b" "c d"',this.cardGridGap="0",this.cardFitToContent=!0,this.cardShowBorder=!0,this.templateMap=new Map([["split-vertical",'"a b"'],["split-horizontal",'"a" "b"'],["2x2",'"a b" "c d"'],["3x3",'"a b c" "d e f" "g h i"'],["4x4",'"a b c d" "e f g h" "i j k l" "m n o p"'],["1-over-2",'"a a" "b c"'],["2-over-1",'"a b" "c c"'],["1-over-3",'"a a a " "b c d"'],["3-over-1",'"a b c" "d d d"'],["custom-template",'"a b" "c c c"'],["gold3",'"a c" "b c"'],["gold4",'"a b c c" "d d c c"']]),this.errors=r(this)}connectedCallback(){this.stores=i(this.element)}getCommonStyles(){let t="100%",e="100%";return!0===this.cardFitToContent&&(e="fit-content",t="fit-content"),{display:"grid",height:t,width:e,gap:this.cardGridGap+"px"}}calculatePercentages(t){const e=t.trim().split(/\s+/).length;if(0===e)return"100%";const s=(100/e).toFixed(0)+"%";return Array(e).fill(s).join(" ")}getGridTemplateColumns(t){const e=this.getTemplatePattern(t).match(/"[\w\d\s.]+"/g);return e&&0!==e.length?this.calculatePercentages(e[0]):"100%"}getGridTemplateRows(t){const e=this.getTemplatePattern(t).match(/"[\w\d\s.]+"/g),s=e?e.length:1;return this.cardFitToContent?Array(s).fill("auto").join(" "):Array(s).fill("1fr").join(" ")}getLayoutStyle(){return Object.assign(Object.assign({},this.getCommonStyles()),{"grid-template-areas":this.getTemplatePattern(this.cardLayout),"grid-template-columns":this.getGridTemplateColumns(this.cardLayout),"grid-template-rows":this.getGridTemplateRows(this.cardLayout)})}createDivAreaStyles(t){return t.map((t=>({width:"100%",overflow:"hidden","grid-area":t,height:"100%"})))}getSlots(t){const a=this.createDivAreaStyles(t);return e(s,null,a.map(((t,s)=>e("div",{style:t},e("slot",{name:"card-slot-"+s})))))}extractSlotNames(t){if(null==t)return[];const e=t.match(/\b\w+\b/g);return e?Array.from(new Set(e)):[]}getTemplatePattern(t){return!1===this.templateMap.has(t)&&"custom-template"!==t?'"a"':"custom-template"===t?this.cardCustomTemplate:this.templateMap.get(t)}async getNumberOfSlot(t){const e=this.getTemplatePattern(t);return this.extractSlotNames(e).length}componentDidUpdate(){}setCardClass(){return!0===this.cardShowBorder?"card_box border":"card_box"}prepareTitleImage(t){if(null==t||""===t)return"";const e=this.stores.assets.state;return t.startsWith("asset:")?e[t.substring(6)]:e[t]||t}render(){const t=this.getLayoutStyle(),s=this.extractSlotNames(t["grid-template-areas"]);return e("bn-card",{key:"e920b128510046289f0960c19abb1eadb2751204",styles:this.styles,class:this.setCardClass()},e("div",{key:"de7b2ed78aade1a7c2d0a8a69cd1f7b47eef2414",class:"cardtitle"},e("bn-title",{key:"72fd36fe7e0bc2d628825b69114b81e04669143d",namespace:this.titleNamespace,"business-unit":this.titleBusinessUnit,scenarios:this.titleScenarios,variances:this.titleVariances,order:this.titleOrder,"order-direction":this.titleOrderDirection,measures:this.titleMeasures,"date-start":this.titleDateStart,"date-end":this.titleDateEnd,"date-format":this.titleDateFormat,"date-link":this.titleDateLink}),null!=this.titleImage&&""!==this.titleImage?e("img",{class:"image",src:this.prepareTitleImage(this.titleImage)}):""),e("bn-body",{key:"1d3a6da80bcaab5ab2d9442edd548bc408f10563"},e("div",{key:"e24cfa54735c0b401e34825a8da7327555c120c5",style:t},this.getSlots(s))),e("bn-footer",{key:"c2307c5dcb8058d49465fbafa7d5aaa6e5dc4488",text:this.footerText,"page-number":0,"display-page-number":"false"}))}get element(){return a(this)}};n.style=':host{background:var(--bn-font-background, white);color:var(--bn-font-color, black);font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);display:block;flex-direction:column;overflow:hidden;float:left;clear:left}.cardtitle{display:inline-flex}.image{margin-right:0.5em;margin-top:0.5em;z-index:2;background-color:transparent;border:transparent;height:4em;width:auto;display:inline}';export{n as bn_layout_card}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as s,H as i,g as o}from"./p-JNHhIe7t.js";import{w as r}from"./p-B7p8beYH.js";import{w as e}from"./p-CYjZRKdI.js";import{w as n}from"./p-BoMtoHJB.js";import{a as l}from"./p-B0lsgVuN.js";import{w as a}from"./p-tzFCK9qn.js";import"./p-sRO-lj7X.js";const f=class{constructor(s){t(this,s),r(this),e(this),this.errors=a(this),this.componentStyle=n(this)}connectedCallback(){this.stores=l(this.element)}getFontStyles(){return this.componentStyle((t=>{var s,i,o,r;return{"--bn-font-family":(null===(s=t.global)||void 0===s?void 0:s.fontFamily)||"'Noto Sans', sans-serif","--bn-font-size":`${(null===(i=t.global)||void 0===i?void 0:i.fontSizePx)||13.3333}px`,"--bn-font-color":(null===(o=t.global)||void 0===o?void 0:o.fontColor)||"#000000","--bn-font-background":(null===(r=t.global)||void 0===r?void 0:r.fontBackgroundColor)||"#ffffff"}}))}prepareAssetUrl(t){if(null==t||""===t)return"";const s=this.stores.assets.state;return t.startsWith("asset:")?s[t.substring(6)]:s[t]||t}render(){return s(i,{key:"656f301d5fb1a7650f4c7d0cbb3fe1ef15b8ae92",style:this.getFontStyles()},null!=this.source&&""!==this.source?s("img",{src:this.prepareAssetUrl(this.source)}):"")}get element(){return o(this)}};f.style=":host{display:inline-block;position:relative;overflow:hidden}img{max-width:100%;height:auto}";export{f as bn_image}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as s,F as e,g as i}from"./p-JNHhIe7t.js";import{a as r,B as n}from"./p-B0lsgVuN.js";const o=class{constructor(s){t(this,s),this.distinctCache=new Map}connectedCallback(){this.stores=r(this.element)}internationalizationKeys(){return Promise.resolve(n)}getDistinctFromDataSource(t,s){const e=`datasource:${t}:${s}`;if(this.distinctCache.has(e))return Promise.resolve(this.distinctCache.get(e));const i=this.distinct(this.stores.datasources.get(t)||[],s);return this.distinctCache.set(e,i),Promise.resolve(i)}getDistinctFromDataset(t,s){const e=`dataset:${t}:${s}`;if(this.distinctCache.has(e))return Promise.resolve(this.distinctCache.get(e));const i=this.distinct(this.stores.datasets.get(t)||[],s);return this.distinctCache.set(e,i),Promise.resolve(i)}render(){return s(e,{key:"ee282c29dd433c77fddae8e99e844bf299ebfa29"})}distinct(t,s){return[...new Set(t.map((t=>t[s])))].filter((t=>null!=t))}get element(){return i(this)}};o.style="editor-companion{display:none}";export{o as editor_companion}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as o,H as i,g as e}from"./p-JNHhIe7t.js";import{a as n,w as s,g as a,p as r}from"./p-79KuA4Ox.js";import{w as l}from"./p-CYjZRKdI.js";import{w as d}from"./p-B7p8beYH.js";import{w as c}from"./p-BoMtoHJB.js";import{w as h}from"./p-tzFCK9qn.js";import"./p-B0lsgVuN.js";import"./p-sRO-lj7X.js";const f=new Set(["br","b","i","strong","em","span","p","div","table","tr","td","th","thead","tbody","tfoot","ul","ol","li","h1","h2","h3","h4","h5","h6","sub","sup","small","hr","a","img"]),u=new Set(["class","style","colspan","rowspan","href","title","src","alt","width","height"]),v=/\b(__proto__|globalThis)\b|\.constructor\b/;function p(t){const o=document.createElement("div");return o.innerHTML=t,b(o),o.innerHTML}function b(t){for(const o of Array.from(t.childNodes)){if(o.nodeType!==Node.ELEMENT_NODE)continue;const i=o;if(f.has(i.tagName.toLowerCase())){for(const t of Array.from(i.attributes)){const o=t.name.toLowerCase();o.startsWith("on")||!u.has(o)?i.removeAttribute(t.name):"href"!==o&&"src"!==o||!/^\s*javascript:/i.test(t.value)?"style"===o&&/expression|javascript/i.test(t.value)&&i.removeAttribute(t.name):i.removeAttribute(t.name)}b(i)}else t.replaceChild(document.createTextNode(i.textContent||""),i)}}const m=class{constructor(o){t(this,o),this.data={},d(this),l(this),this.errors=h(this),this.t=n(this).t,s(this,((t,o)=>{this.data=Object.assign(Object.assign({},this.data),{[t]:o})})),this.componentStyle=c(this)}validateValue(t){"string"!=typeof t||""===t?this.errors.addOrReplace({id:"no_value",type:"warning",message:"Empty value"}):this.errors.remove("no_value")}validateScaling(t){if(null==t||""===t||"none"===t||"auto"===t)return void this.errors.remove("ERR_scale");const o=Number(t);isNaN(o)||o<=0?this.errors.addOrReplace({id:"ERR_scale",type:"warning",message:`Invalid scale value: "${t}". Use "none", "auto", or a positive number.`}):this.errors.remove("ERR_scale")}componentWillLoad(){this.validateValue(this.value),this.validateScaling(this.scale)}evalTemplate(t){if(!t)return"";if(v.test(t))return this.errors.addOrReplace({id:"ERR_value_eval",type:"error",message:"Template contains forbidden pattern"}),"";try{const o=new Proxy({data:this.data,t:this.t},{has:()=>!0,get:(t,o)=>o===Symbol.unscopables?void 0:t[o],set:()=>!0}),i=new Function("sandbox","with(sandbox){try{return`"+t+'`}catch(e){return""}}').call(o,o);return this.errors.remove("ERR_value_eval"),null!=i?String(i):""}catch(t){return this.errors.addOrReplace({id:"ERR_value_eval",type:"error",message:`Template evaluation failed: ${t instanceof Error?t.message:String(t)}`}),""}}prepareStyle(){return this.componentStyle((t=>{var o,i,e,n,s,a,r,l,d,c,h,f,u,v,p,b,m,g,y,w,_,R;return{fontStyles:{font:`${null!==(n=null!==(i=null===(o=t["bn-text"])||void 0===o?void 0:o.fontSizePx)&&void 0!==i?i:null===(e=t.global)||void 0===e?void 0:e.fontSizePx)&&void 0!==n?n:13.3333}px ${null!==(l=null!==(a=null===(s=t["bn-text"])||void 0===s?void 0:s.fontFamily)&&void 0!==a?a:null===(r=t.global)||void 0===r?void 0:r.fontFamily)&&void 0!==l?l:"'Noto Sans', sans-serif"}`,size:null!==(f=null!==(c=null===(d=t["bn-text"])||void 0===d?void 0:d.fontSizePx)&&void 0!==c?c:null===(h=t.global)||void 0===h?void 0:h.fontSizePx)&&void 0!==f?f:13.3333,color:null!==(b=null!==(v=null===(u=t["bn-text"])||void 0===u?void 0:u.fontColor)&&void 0!==v?v:null===(p=t.global)||void 0===p?void 0:p.fontColor)&&void 0!==b?b:"#000000",background:null!==(w=null!==(g=null===(m=t["bn-text"])||void 0===m?void 0:m.fontBackgroundColor)&&void 0!==g?g:null===(y=t.global)||void 0===y?void 0:y.fontBackgroundColor)&&void 0!==w?w:"#ffffff",leading:null!==(R=null===(_=t["bn-text"])||void 0===_?void 0:_.leading)&&void 0!==R?R:1.8}}}))}applyScaling(t){const o=this.element,{mode:i,factor:e}=r(this.scale),{width:n,height:s}=a(o),l=o.scrollHeight>o.clientHeight+1?o.clientHeight:s,d=n,c=d>0&&o.scrollWidth>d+1,h=l>0&&o.scrollHeight>l+1,f=c||h;if(d<=0&&l<=0)return;if("none"===i){if(f){const t=[];c&&t.push(`w:${o.scrollWidth}>${Math.round(d)}`),h&&t.push(`h:${o.scrollHeight}>${Math.round(l)}`),this.errors.addOrReplace({id:"WARN_overflow",type:"warning",message:`Content overflows container (${t.join(", ")})`})}else this.errors.remove("WARN_overflow");return}if("factor"===i){if(f){const t=[];c&&t.push(`w:${o.scrollWidth}>${Math.round(d)}`),h&&t.push(`h:${o.scrollHeight}>${Math.round(l)}`),this.errors.addOrReplace({id:"WARN_overflow",type:"warning",message:`Content overflows with factor ${e} (${t.join(", ")})`})}else this.errors.remove("WARN_overflow");return}o.style.setProperty("--bn-font-size",`${t}px`);const u=o.scrollWidth,v=o.scrollHeight,p=o.clientHeight,b=v>p+1?p:s,m=d<=0||u<=d+1,g=b<=0||v<=b+1;if(m&&g)return void this.errors.remove("AUTO_scale");const y=Math.min(1,!m&&d>0?d/u:1,!g&&b>0?b/v:1);o.style.setProperty("--bn-font-size",t*y+"px"),"empty"===i?this.errors.addOrReplace({id:"AUTO_scale",type:"warning",message:`Auto-scaled font by factor ${y.toFixed(3)}`}):this.errors.remove("AUTO_scale")}componentDidRender(){this.container.innerHTML=p(this.evalTemplate(this.value)),this.applyScaling(this.prepareStyle().fontStyles.size)}render(){const{fontStyles:t}=this.prepareStyle(),{mode:e,factor:n}=r(this.scale),s="factor"===e?t.size*n+"px":`${t.size}px`,a={"--bn-font-family":t.font.substring(t.font.indexOf("px ")+3),"--bn-font-size":s,"--bn-font-color":t.color,"--bn-font-background":t.background};return o(i,{key:"49a4060ebb36623a64a41efbdefcdcc9060457c3",style:a},o("div",{key:"19f66b3d17d38d3c8119f9cb6b046e0d18c0f022"},o("span",{key:"3b8cf9f75aeb668cb0c32a7a3540e0ed8f336050",class:"container",ref:t=>{this.container=t}})))}get element(){return e(this)}static get watchers(){return{value:[{validateValue:0}],scale:[{validateScaling:0}]}}};m.style=':host{padding:0.5em;display:inline-block;position:relative;overflow:hidden;font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);color:var(--bn-font-color, #000000);background-color:var(--bn-font-background, white)}span.container p{margin:0}';export{m as bn_text}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as t,c as e}from"./p-B0lsgVuN.js";import{r as n}from"./p-tzFCK9qn.js";import{g as s,f as a}from"./p-JNHhIe7t.js";const o=(t,e)=>{const n=[],s=[];for(const a of e)(t(a)?n:s).push(a);return[n,s]},r="WARN_use_dataset",i=(t,e)=>{const n=t.errors;if(n)if(e.length>0){const t=e.map((t=>t.substring(1))).join(", ");n.addOrReplace({id:r,type:"warning",message:`Using datasource(s) "${t}" directly. Prefer using a dataset (bn-dataset) for query support and metadata.`})}else n.remove(r)},u=(a,r,u)=>{let d,l,c,f,p=[],m=[];const v=t=>{if(u){const e=f.datasetsMeta.get(t);e&&u(t,e)}},g=new MutationObserver((t=>{t.forEach((t=>{"datasets"===t.attributeName&&([m,p]=o((t=>t.startsWith("$")),s(a).getAttribute("datasets").split(",")),i(a,m),p.forEach((t=>{r(t,f.datasets.get(t)),v(t)})),m.forEach((t=>{r(t,f.datasources.get(t.substring(1)))})))}))})),h=a.connectedCallback;a.connectedCallback=()=>{const e=s(a);f=t(e),[m,p]=o((t=>t.startsWith("$")),(e.getAttribute("datasets")||"").split(",")),i(a,m),p.forEach((t=>{r(t,f.datasets.get(t)),v(t)})),m.forEach((t=>{r(t,f.datasources.get(t.substring(1)))})),g.observe(e,{attributes:!0,attributeFilter:["datasets"]}),d=f.datasets.on("set",((t,e)=>{p.includes(t)&&r(t,e)})),l=f.datasources.on("set",((t,e)=>{m.includes("$"+t)&&r("$"+t,e)})),u&&(c=f.datasetsMeta.on("set",((t,e)=>{p.includes(t)&&u(t,e)}))),n(h,a)};const w=a.disconnectedCallback;return a.disconnectedCallback=()=>{g.disconnect(),n(d),n(l),n(c),e(s(a)),n(w,a)},t=>{p=t,t.forEach((t=>{r(t,f.datasets.get(t)),v(t)}))}},d=o=>{let r,i,u;const d=new MutationObserver((t=>{t.forEach((t=>{"namespace"===t.attributeName&&(i=s(o).getAttribute("namespace"),a(o))}))})),l=o.connectedCallback;o.connectedCallback=()=>{const e=s(o);u=t(e),d.observe(e,{attributes:!0,attributeFilter:["namespace"]}),i=s(o).getAttribute("namespace"),r=u.internationalization.on("set",(t=>{t===i&&a(o)})),n(l,o)};const c=o.disconnectedCallback;return o.disconnectedCallback=()=>{d.disconnect(),n(r),e(s(o)),n(c,o)},{t:(t,e)=>{var n,a;t.startsWith(".")&&(t=s(o).localName+t);const r=u.internationalization.state,d=u.context.state.locale;let l=i;return null==(null===(a=null===(n=r[l])||void 0===n?void 0:n[d])||void 0===a?void 0:a[t])&&(l="_system"),r[l][d][t].replace(/{{([\s\S]+?)}}/g,((t,n)=>{var s;return null!==(s=null==e?void 0:e[n.trim()])&&void 0!==s?s:""}))}}};function l(t){const e=c(t);if(!e)return{width:0,height:0};const n=getComputedStyle(e),s=e.clientWidth-parseFloat(n.paddingLeft)-parseFloat(n.paddingRight),a=function(t){let e=c(t);for(;e;){const t=getComputedStyle(e),n=t.overflowY;if("hidden"===n||"scroll"===n||"auto"===n)return e.clientHeight-parseFloat(t.paddingTop)-parseFloat(t.paddingBottom);if("none"!==t.maxHeight){const n=parseFloat(t.maxHeight);if(!isNaN(n)&&n>0)return Math.min(n,e.clientHeight-parseFloat(t.paddingTop)-parseFloat(t.paddingBottom))}e=f(e)}return"undefined"!=typeof window?window.innerHeight:0}(t);return{width:Math.max(0,s),height:Math.max(0,a)}}function c(t){var e;const n=t.parentElement;return(null===(e=null==n?void 0:n.assignedSlot)||void 0===e?void 0:e.parentElement)?n.assignedSlot.parentElement:n}function f(t){var e;return(null===(e=t.assignedSlot)||void 0===e?void 0:e.parentElement)?t.assignedSlot.parentElement:t.parentElement}function p(t){if(null==t||""===t)return{mode:"empty"};if("none"===t)return{mode:"none"};if("auto"===t)return{mode:"auto"};const e=Number(t);return!isNaN(e)&&e>0?{mode:"factor",factor:e}:{mode:"empty"}}export{d as a,l as g,p,u as w}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as e,H as n,g as s}from"./p-JNHhIe7t.js";import{i as r,j as i,w as o}from"./p-B7p8beYH.js";import{w as a}from"./p-CYjZRKdI.js";import{w as l}from"./p-BoMtoHJB.js";import{w as c}from"./p-tzFCK9qn.js";import"./p-sRO-lj7X.js";import"./p-B0lsgVuN.js";const d=["*","/","+","-","x","÷","none"];function u(t){switch(t){case"*":case"x":return"×";case"/":case"÷":return"÷";case"+":return"+";case"-":return"−";default:return""}}function h(t,e,n){return t.find((t=>t.from===e&&t.to===n))}function f(t){return 2*(t-1)+1}function p(t){return 2*(t-1)+1}function g(t,e){const n=t.getBoundingClientRect(),s=n.left-e.left,r=n.top-e.top;return{left:s,top:r,width:n.width,height:n.height,centerX:s+n.width/2,centerY:r+n.height/2}}function y(t,e,n){switch(n){case"ltr":return e?{x:t.left+t.width,y:t.centerY}:{x:t.left,y:t.centerY};case"rtl":return e?{x:t.left,y:t.centerY}:{x:t.left+t.width,y:t.centerY};case"ttb":return e?{x:t.centerX,y:t.top+t.height}:{x:t.centerX,y:t.top};case"btt":return e?{x:t.centerX,y:t.top}:{x:t.centerX,y:t.top+t.height}}}function v(t,e,n,s,r=8){const i=-(s-1)*r/2+n*r;switch(e){case"ltr":return{x:t.left,y:t.centerY+i};case"rtl":return{x:t.left+t.width,y:t.centerY+i};case"ttb":return{x:t.centerX+i,y:t.top};case"btt":return{x:t.centerX+i,y:t.top+t.height}}}function m(t,e,n,s){switch(n){case"straight":return function(t,e){return{path:`M ${t.x} ${t.y} L ${e.x} ${e.y}`,midpoint:{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}}(t,e);case"curved":return function(t,e,n){let s,r;if("ltr"===n||"rtl"===n){const n=(t.x+e.x)/2;s={x:n,y:t.y},r={x:n,y:e.y}}else{const n=(t.y+e.y)/2;s={x:t.x,y:n},r={x:e.x,y:n}}return{path:`M ${t.x} ${t.y} C ${s.x} ${s.y}, ${r.x} ${r.y}, ${e.x} ${e.y}`,midpoint:{x:.125*t.x+.375*s.x+.375*r.x+.125*e.x,y:.125*t.y+.375*s.y+.375*r.y+.125*e.y}}}(t,e,s);default:return function(t,e,n){let s,r;if("ltr"===n||"rtl"===n){const n=t.x+.7*(e.x-t.x);s=`M ${t.x} ${t.y} L ${n} ${t.y} L ${n} ${e.y} L ${e.x} ${e.y}`,r={x:n,y:(t.y+e.y)/2}}else{const n=t.y+.7*(e.y-t.y);s=`M ${t.x} ${t.y} L ${t.x} ${n} L ${e.x} ${n} L ${e.x} ${e.y}`,r={x:(t.x+e.x)/2,y:n}}return{path:s,midpoint:r}}(t,e,s)}}function b(t,e,n,s){const r=.7;switch(s){case"ltr":{const s=t.left+t.width;return{x:s+(Math.min(e.left,n.left)-s)*r,y:t.centerY}}case"rtl":{const s=t.left,i=Math.max(e.left+e.width,n.left+n.width);return{x:i+(s-i)*r,y:t.centerY}}case"ttb":{const s=t.top+t.height,i=Math.min(e.top,n.top);return{x:t.centerX,y:s+(i-s)*r}}case"btt":{const s=t.top,i=Math.max(e.top+e.height,n.top+n.height);return{x:t.centerX,y:i+(s-i)*r}}}}function $(t,e,n){var s,r;return Object.assign({stroke:null!==(s=null==n?void 0:n.color)&&void 0!==s?s:t,strokeWidth:null!==(r=null==n?void 0:n.width)&&void 0!==r?r:e},(null==n?void 0:n.dasharray)?{strokeDasharray:n.dasharray}:{})}const x=class{validateEdgesProp(t){const e="ERR_edges",n=function(t){const e=[];if(!t||""===t.trim())return e.push("edges: value is required"),e;let n;try{n=JSON.parse(t)}catch(t){return e.push("edges: invalid JSON structure"),e}if(!Array.isArray(n))return e.push("edges: must be an array"),e;if(0===n.length)return e.push("edges: array must not be empty"),e;const s=new Set,r=new Set;n.forEach(((t,n)=>{if("object"!=typeof t||null===t)return void e.push(`edges[${n}]: must be an object`);const i=t;if("string"!=typeof i.from||""===i.from.trim()?e.push(`edges[${n}]: 'from' is required and must be a non-empty string`):s.add(i.from),"string"!=typeof i.to||""===i.to.trim()?e.push(`edges[${n}]: 'to' is required and must be a non-empty string`):(s.add(i.to),r.add(i.to)),void 0!==i.operator&&("string"==typeof i.operator&&d.includes(i.operator)||e.push(`edges[${n}]: 'operator' must be one of: ${d.join(", ")}`)),void 0!==i.label&&"string"!=typeof i.label&&e.push(`edges[${n}]: 'label' must be a string`),void 0!==i.style)if("object"!=typeof i.style||null===i.style)e.push(`edges[${n}]: 'style' must be an object`);else{const t=i.style;void 0!==t.color&&"string"!=typeof t.color&&e.push(`edges[${n}]: 'style.color' must be a string`),void 0!==t.width&&"number"!=typeof t.width&&e.push(`edges[${n}]: 'style.width' must be a number`),void 0!==t.dasharray&&"string"!=typeof t.dasharray&&e.push(`edges[${n}]: 'style.dasharray' must be a string`)}}));const i=Array.from(s).filter((t=>!r.has(t)));return 0===i.length?e.push("edges: tree has no root node (circular reference detected)"):i.length>1&&e.push(`edges: tree has multiple root nodes: ${i.join(", ")}`),e}(t);n.length>0?(this.errors.addOrReplace({id:e,type:"error",message:`edges: ${n.join("; ")}`}),this.treeConfig=null):(this.errors.remove(e),this.treeConfig=function(t){if(!t||""===t.trim())return null;try{const e=JSON.parse(t);if(!Array.isArray(e))return null;const n=e,s=function(t){const e=new Map;for(const n of t){const t=e.get(n.from)||[];t.push(n.to),e.set(n.from,t)}return e}(n),r=function(t){const e=new Set;for(const n of t)e.add(n.from),e.add(n.to);return e}(n),i=function(t,e){const n=new Set;for(const e of t)n.add(e.to);const s=Array.from(e).filter((t=>!n.has(t)));return 1===s.length?s[0]:null}(n,r);return{edges:n,adjacencyList:s,rootNode:i,allNodes:r}}catch(t){return console.error("parseTreeConfig: failed to parse tree configuration",t),null}}(t)),this.recalculateLayout()}validateDirection(t){const e="ERR_direction",n=["ltr","rtl","ttb","btt"];n.includes(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:`direction: invalid value '${t}', must be one of: ${n.join(", ")}`}),this.recalculateLayout()}validateLevelSpacing(t){const e="ERR_levelSpacing";!r(t)||t<0?this.errors.addOrReplace({id:e,type:"warning",message:`level-spacing: invalid value '${t}', must be a non-negative number`}):this.errors.remove(e),this.recalculateLayout()}validateNodeSpacing(t){const e="ERR_nodeSpacing";!r(t)||t<0?this.errors.addOrReplace({id:e,type:"warning",message:`node-spacing: invalid value '${t}', must be a non-negative number`}):this.errors.remove(e),this.recalculateLayout()}validateEdgeStyle(t){const e="ERR_edgeStyle",n=["straight","orthogonal","curved"];n.includes(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:`edge-style: invalid value '${t}', must be one of: ${n.join(", ")}`})}validateShowOperators(t){const e="ERR_showOperators";i(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:`show-operators: invalid value '${t}', must be 'true' or 'false'`})}constructor(e){t(this,e),this.treeConfig=null,this.layout=null,this.nodeRects=new Map,this.svgWidth=0,this.svgHeight=0,this.resizeObserver=null,this.gridContainer=null,this.direction="ltr",this.levelSpacing=60,this.nodeSpacing=20,this.edgeStyle="orthogonal",this.showOperators="true",o(this),a(this),this.errors=c(this),this.componentStyle=l(this)}getTreeStyle(){return this.componentStyle((t=>({edgeColor:t["bn-tree"].edgeColor,edgeWidth:t["bn-tree"].edgeWidth,operatorCircleRadius:t["bn-tree"].operatorCircleRadius,operatorFontSize:t.global.fontSizePx*t["bn-tree"].operatorFontSizeScale,operatorColor:t["bn-tree"].operatorColor})))}componentWillLoad(){this.validateEdgesProp(this.edges),this.validateDirection(this.direction),this.validateLevelSpacing(this.levelSpacing),this.validateNodeSpacing(this.nodeSpacing),this.validateEdgeStyle(this.edgeStyle),this.validateShowOperators(this.showOperators)}componentDidLoad(){this.setupResizeObserver(),this.updateNodeRects()}disconnectedCallback(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}setupResizeObserver(){var t;this.gridContainer=null===(t=this.element.shadowRoot)||void 0===t?void 0:t.querySelector(".tree-grid"),this.gridContainer&&(this.resizeObserver=new ResizeObserver((()=>{this.updateNodeRects()})),this.resizeObserver.observe(this.gridContainer),this.element.querySelectorAll("[slot]").forEach((t=>{this.resizeObserver.observe(t)})))}recalculateLayout(){this.layout=this.treeConfig?function(t,e,n,s){if(!t.rootNode)return{positions:new Map,gridTemplateColumns:"",gridTemplateRows:"",maxLevel:0,maxIndex:0};const r=function(t){const e=new Map;if(!t.rootNode)return e;const n=[{node:t.rootNode,level:0}],s=new Set;for(;n.length>0;){const{node:r,level:i}=n.shift();if(s.has(r))continue;s.add(r),e.set(r,i);const o=t.adjacencyList.get(r)||[];for(const t of o)s.has(t)||n.push({node:t,level:i+1})}return e}(t),i=function(t){const e=new Map;if(!t.rootNode)return e;let n=0;return function s(r){const i=e.get(r);if(i)return i;const o=t.adjacencyList.get(r)||[];if(0===o.length){const t={startIndex:n,endIndex:n};return e.set(r,t),n++,t}let a=1/0,l=-1/0;for(const t of o){const e=s(t);a=Math.min(a,e.startIndex),l=Math.max(l,e.endIndex)}const c={startIndex:a,endIndex:l};return e.set(r,c),c}(t.rootNode),e}(t),o=function(t,e,n,s){var r,i;const o=new Map,a=Math.max(...Array.from(e.values()));for(const l of t.allNodes){const t=null!==(r=e.get(l))&&void 0!==r?r:0,c=null!==(i=n.get(l))&&void 0!==i?i:{startIndex:0,endIndex:0};let d,u,h;switch(s){case"ltr":d=t+1,u=c.startIndex+1,h=c.endIndex-c.startIndex+1;break;case"rtl":d=a-t+1,u=c.startIndex+1,h=c.endIndex-c.startIndex+1;break;case"ttb":u=t+1,d=c.startIndex+1,h=1;break;case"btt":u=a-t+1,d=c.startIndex+1,h=1}o.set(l,{nodeId:l,level:t,index:c.startIndex,gridColumn:d,gridRow:u,gridRowSpan:h})}return o}(t,r,i,e),a=Math.max(...Array.from(r.values())),l=Math.max(...Array.from(i.values()).map((t=>t.endIndex))),{gridTemplateColumns:c,gridTemplateRows:d}=function(t,e,n,s,r){const i=t+1,o=e+1;if("ltr"===n||"rtl"===n){const t=[];for(let e=0;e<i;e++)t.push("auto"),e<i-1&&t.push(`${s}px`);const e=[];for(let t=0;t<o;t++)e.push("auto"),t<o-1&&e.push(`${r}px`);return{gridTemplateColumns:t.join(" "),gridTemplateRows:e.join(" ")}}{const t=[];for(let e=0;e<i;e++)t.push("auto"),e<i-1&&t.push(`${s}px`);const e=[];for(let t=0;t<o;t++)e.push("auto"),t<o-1&&e.push(`${r}px`);return{gridTemplateColumns:e.join(" "),gridTemplateRows:t.join(" ")}}}(a,l,e,n,s);return{positions:o,gridTemplateColumns:c,gridTemplateRows:d,maxLevel:a,maxIndex:l}}(this.treeConfig,this.direction,this.levelSpacing,this.nodeSpacing):null}updateNodeRects(){if(!this.treeConfig||!this.gridContainer)return;const t=this.gridContainer.getBoundingClientRect(),e=new Map;for(const n of this.treeConfig.allNodes){const s=this.element.querySelector(`[slot="${n}"]`);s&&e.set(n,g(s,t))}this.nodeRects=e,this.svgWidth=t.width,this.svgHeight=t.height}getSlotStyle(t){if(!this.layout)return{};const e=this.layout.positions.get(t);return e?"ltr"===this.direction||"rtl"===this.direction?{"grid-column":String(f(e.gridColumn)),"grid-row":`${p(e.gridRow)} / span ${n=e.gridRowSpan,n<=1?1:2*(n-1)+1}`,"align-self":"center"}:{"grid-row":String(p(e.gridRow)),"grid-column":String(f(e.gridColumn)),"justify-self":"center"}:{};var n}renderEdges(){var t;if(!this.treeConfig||0===this.nodeRects.size)return null;const n=this.getTreeStyle(),s=[],r=[],i=new Map;for(const t of this.treeConfig.edges){const e=i.get(t.to)||[];e.push(t.from),i.set(t.to,e)}for(const t of this.treeConfig.edges){const r=this.nodeRects.get(t.from),o=this.nodeRects.get(t.to);if(!r||!o)continue;const a=y(r,!0,this.direction),l=i.get(t.to)||[];let c;if(l.length>1){const e=l.indexOf(t.from);c=v(o,this.direction,e,l.length)}else c=y(o,!1,this.direction);const{path:d}=m(a,c,this.edgeStyle,this.direction),u=$(n.edgeColor,n.edgeWidth,t.style);s.push(e("path",{key:`edge-${t.from}-${t.to}`,d,fill:"none",stroke:u.stroke,"stroke-width":u.strokeWidth,"stroke-dasharray":u.strokeDasharray}))}if("true"===this.showOperators)for(const[s,i]of this.treeConfig.adjacencyList.entries()){const o=this.nodeRects.get(s);if(o)for(let a=0;a<i.length-1;a++){const l=i[a],c=i[a+1],d=h(this.treeConfig.edges,s,l);if(!(null==d?void 0:d.operator)||"none"===d.operator)continue;const f=this.nodeRects.get(l),p=this.nodeRects.get(c);if(!f||!p)continue;const g=null!==(t=d.label)&&void 0!==t?t:u(d.operator),y=b(o,f,p,this.direction);r.push(e("g",{key:`operator-${s}-${l}`,class:"operator-group"},e("circle",{cx:y.x,cy:y.y,r:n.operatorCircleRadius,fill:"white",stroke:n.edgeColor,"stroke-width":n.edgeWidth}),e("text",{x:y.x,y:y.y,"text-anchor":"middle","dominant-baseline":"central",style:{fontSize:`${n.operatorFontSize}px`,fill:n.operatorColor,fontWeight:"bold"}},g)))}}return e("svg",{class:"edge-layer",width:this.svgWidth,height:this.svgHeight,style:{position:"absolute",top:"0",left:"0",pointerEvents:"none"}},s,r)}renderSlots(){return this.treeConfig&&this.layout?Array.from(this.treeConfig.allNodes).map((t=>e("div",{key:t,class:"tree-node",style:this.getSlotStyle(t)},e("slot",{name:t})))):null}getFontStyles(){return this.componentStyle((t=>{var e,n,s,r;return{"--bn-font-family":(null===(e=t.global)||void 0===e?void 0:e.fontFamily)||"'Noto Sans', sans-serif","--bn-font-size":`${(null===(n=t.global)||void 0===n?void 0:n.fontSizePx)||13.3333}px`,"--bn-font-color":(null===(s=t.global)||void 0===s?void 0:s.fontColor)||"#000000","--bn-font-background":(null===(r=t.global)||void 0===r?void 0:r.fontBackgroundColor)||"#ffffff"}}))}render(){const t=this.getFontStyles();return e(n,{style:t},this.treeConfig&&this.layout?e("div",{class:"tree-container"},e("div",{class:"tree-grid",style:{display:"grid","grid-template-columns":this.layout.gridTemplateColumns,"grid-template-rows":this.layout.gridTemplateRows,position:"relative"}},this.renderEdges(),this.renderSlots())):e("div",{class:"tree-container tree-error"},e("slot",null)))}get element(){return s(this)}static get watchers(){return{edges:[{validateEdgesProp:0}],direction:[{validateDirection:0}],levelSpacing:[{validateLevelSpacing:0}],nodeSpacing:[{validateNodeSpacing:0}],edgeStyle:[{validateEdgeStyle:0}],showOperators:[{validateShowOperators:0}]}}};x.style=':host{display:inline-block;position:relative;font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);color:var(--bn-font-color, #000000)}.tree-container{position:relative;display:inline-block}.tree-grid{position:relative;display:grid;align-items:center}.tree-node{position:relative;z-index:1;border:1px solid #404040;background:var(--bn-font-background, white)}.edge-layer{position:absolute;top:0;left:0;z-index:0;pointer-events:none;overflow:visible}.tree-error{display:flex;flex-wrap:wrap;gap:20px}';export{x as bn_tree}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as e,H as s,g as r}from"./p-JNHhIe7t.js";import{j as i,w as o}from"./p-B7p8beYH.js";import{w as n}from"./p-CYjZRKdI.js";import{w as a}from"./p-BoMtoHJB.js";import{w as d}from"./p-tzFCK9qn.js";import"./p-sRO-lj7X.js";import"./p-B0lsgVuN.js";function l(t){if(!t||""===t.trim()||"[]"===t)return[];try{const e=JSON.parse(t);return Array.isArray(e)?e.map(((t,e)=>{var s,r,i;return"string"==typeof t?{label:t,id:String(e)}:"object"==typeof t&&null!==t?{label:null!==(r=null!==(s=t.label)&&void 0!==s?s:t.name)&&void 0!==r?r:String(e),id:null!==(i=t.id)&&void 0!==i?i:String(e)}:{label:String(t),id:String(e)}})):[]}catch(t){return console.error("parseHeaders: failed to parse JSON",t),[]}}function h(t){if(!t||""===t.trim()||"[]"===t)return[];try{const e=JSON.parse(t);if(!Array.isArray(e))return["Headers must be an array"];const s=[],r=new Set;return e.forEach(((t,e)=>{"object"==typeof t&&null!==t&&void 0!==t.id&&("string"!=typeof t.id?s.push(`Header[${e}]: 'id' must be a string`):r.has(t.id)?s.push(`Header[${e}]: duplicate id '${t.id}'`):r.add(t.id),void 0!==t.label&&"string"!=typeof t.label&&s.push(`Header[${e}]: 'label' must be a string`))})),s}catch(t){return console.error("validateHeadersJson: failed to parse JSON",t),["Invalid JSON structure"]}}const u=class{validateRowHeaders(t){const e="ERR_rowHeaders",s=h(t);s.length>0?this.errors.addOrReplace({id:e,type:"error",message:`row-headers: ${s.join("; ")}`}):this.errors.remove(e),this.updateGridConfig()}validateColumnHeaders(t){const e="ERR_columnHeaders",s=h(t);s.length>0?this.errors.addOrReplace({id:e,type:"error",message:`column-headers: ${s.join("; ")}`}):this.errors.remove(e),this.updateGridConfig()}validateShowRowHeaders(t){const e="ERR_showRowHeaders";i(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:`show-row-headers: invalid value '${t}', must be 'true' or 'false'`})}validateShowColumnHeaders(t){const e="ERR_showColumnHeaders";i(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:`show-column-headers: invalid value '${t}', must be 'true' or 'false'`})}validateShowBorders(t){const e="ERR_showBorders";i(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:`show-borders: invalid value '${t}', must be 'true' or 'false'`})}constructor(e){t(this,e),this.gridConfig={rows:[],columns:[]},this.chartTitle="",this.rowHeaders="[]",this.columnHeaders="[]",this.showRowHeaders="true",this.showColumnHeaders="true",this.showBorders="true",this.rowHeaderWidth="auto",this.cellGap="0px",o(this),n(this),this.errors=d(this),this.componentStyle=a(this)}getGridStyle(){return this.componentStyle((t=>t["bn-grid"]))}componentWillLoad(){this.validateRowHeaders(this.rowHeaders),this.validateColumnHeaders(this.columnHeaders),this.validateShowRowHeaders(this.showRowHeaders),this.validateShowColumnHeaders(this.showColumnHeaders),this.validateShowBorders(this.showBorders)}updateGridConfig(){var t;this.gridConfig=(t=this.columnHeaders,{rows:l(this.rowHeaders),columns:l(t)})}shouldShowRowHeaders(){return"true"===this.showRowHeaders&&this.gridConfig.rows.length>0}shouldShowColumnHeaders(){return"true"===this.showColumnHeaders&&this.gridConfig.columns.length>0}shouldShowBorders(){return"true"===this.showBorders}getGridTemplateColumns(){const t=[];this.shouldShowRowHeaders()&&t.push(this.rowHeaderWidth);const e=this.gridConfig.columns.length||1;for(let s=0;s<e;s++)t.push("auto");return t.join(" ")}getGridTemplateRows(){const t=[];this.chartTitle&&t.push("auto"),this.shouldShowColumnHeaders()&&t.push("auto");const e=this.gridConfig.rows.length||1;for(let s=0;s<e;s++)t.push("auto");return t.join(" ")}renderTitle(){if(!this.chartTitle)return null;const t=(this.shouldShowRowHeaders()?1:0)+this.gridConfig.columns.length;return e("div",{class:"grid-title",style:{"grid-column":`1 / span ${t}`,"grid-row":"1"}},this.chartTitle)}renderColumnHeaders(){if(!this.shouldShowColumnHeaders())return null;const t=this.getGridStyle(),s=this.shouldShowBorders()?`${t.borderWidth}px solid ${t.borderColor}`:"none",r=this.shouldShowRowHeaders()?2:1,i=this.chartTitle?2:1;return this.gridConfig.columns.map(((o,n)=>{const a=n>0;return e("div",{key:`col-header-${o.id}`,class:"grid-header grid-header-col",style:{"grid-column":String(r+n),"grid-row":String(i),"border-left":a?s:"none",padding:`${t.cellPadding}px`,"padding-left":a?`${t.cellPadding+4}px`:`${t.cellPadding}px`}},o.label)}))}renderDataCells(){const t=this.getGridStyle(),s=this.shouldShowBorders()?`${t.borderWidth}px solid ${t.borderColor}`:"none",r=this.shouldShowRowHeaders()?2:1,i=(this.chartTitle?1:0)+(this.shouldShowColumnHeaders()?1:0)+1,o=[];return this.gridConfig.rows.length>0&&this.gridConfig.columns.length>0&&this.gridConfig.rows.forEach(((n,a)=>{if(this.shouldShowRowHeaders()){const r=a>0;o.push(e("div",{key:`row-header-${n.id}`,class:"grid-header grid-header-row",style:{"grid-column":"1","grid-row":String(i+a),"border-top":r?s:"none",padding:`${t.cellPadding}px`,"padding-top":r?`${t.cellPadding+4}px`:`${t.cellPadding}px`}},n.label))}this.gridConfig.columns.forEach(((d,l)=>{const h=function(t,e){return`${t.id}-${e.id}`}(n,d),u=l>0,c=a>0;o.push(e("div",{key:`cell-${h}`,class:"grid-cell",style:{"grid-column":String(r+l),"grid-row":String(i+a),"border-left":u?s:"none","border-top":c?s:"none","padding-left":u?`${t.cellPadding+4}px`:"0","padding-top":c?`${t.cellPadding+4}px`:"0"}},e("slot",{name:h})))}))})),o}getFontStyles(){return this.componentStyle((t=>{var e,s,r,i;return{"--bn-font-family":(null===(e=t.global)||void 0===e?void 0:e.fontFamily)||"'Noto Sans', sans-serif","--bn-font-size":`${(null===(s=t.global)||void 0===s?void 0:s.fontSizePx)||13.3333}px`,"--bn-font-color":(null===(r=t.global)||void 0===r?void 0:r.fontColor)||"#000000","--bn-font-background":(null===(i=t.global)||void 0===i?void 0:i.fontBackgroundColor)||"#ffffff"}}))}render(){const t={display:"inline-grid","grid-template-columns":this.getGridTemplateColumns(),"grid-template-rows":this.getGridTemplateRows(),gap:this.cellGap};return e(s,{key:"e84402bafd778e7069cd17bd86687a6648dbafe0",style:this.getFontStyles()},e("div",{key:"91941a42bc41fbbaf53c66551035bf97765a9f88",class:"grid-container",style:t},this.renderTitle(),this.renderColumnHeaders(),this.renderDataCells()),e("slot",{key:"349958090f4bf35b9ec768c8994bdf5a96636a36"}))}get element(){return r(this)}static get watchers(){return{rowHeaders:[{validateRowHeaders:0}],columnHeaders:[{validateColumnHeaders:0}],showRowHeaders:[{validateShowRowHeaders:0}],showColumnHeaders:[{validateShowColumnHeaders:0}],showBorders:[{validateShowBorders:0}]}}};u.style=':host{display:inline-block;font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);color:var(--bn-font-color, #000000)}.grid-container{display:inline-grid;box-sizing:border-box}.grid-title{font-weight:normal;padding-bottom:8px}.grid-header{display:flex;align-items:flex-end;box-sizing:border-box}.grid-header-row{justify-content:flex-end;padding-right:8px}.grid-header-col{white-space:nowrap;justify-content:flex-start}.grid-cell{position:relative;box-sizing:border-box}';export{u as bn_grid}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as i,H as s,g as h}from"./p-JNHhIe7t.js";import{S as e,a as n,g as r,I as o,b as l,c as a,d as c,D as u,e as d,f,F as p,h as w,i as v,j as b,P as g}from"./p-Bs8BqBsb.js";import{k as m,l as L,c as P,D as S,A as y,C as k,m as M,S as C,n as x,o as A,f as O,O as T}from"./p-sRO-lj7X.js";import{C as $,F as _,V as D}from"./p-BDh7GfC5.js";class E{constructor(){this.scenarioOffset=.3,this.scenarioLabelToColumn=.3,this.labelToColumn=.3,this.labelToAxis=.3,this.needleWidth=.3,this.needleHeadWidth=.6,this.columnWidth=2,this.varianceAxisLineWidth=.3,this.axisLineWidth=.1,this.auxiliaryLineWidth=.1,this.scenarioLineWidth=.2,this.markerWidth=.7,this.markerOffset=0,this.categoryWidth=3,this.axisTickLength=.3}}class Y{adapt(t){const i=new E;return m.isNumber(t.scenarioOffset)&&(i.scenarioOffset=t.scenarioOffset),m.isNumber(t.scenarioLabelToColumn)&&(i.scenarioLabelToColumn=t.scenarioLabelToColumn),m.isNumber(t.labelToColumn)&&(i.labelToColumn=t.labelToColumn),m.isNumber(t.labelToAxis)&&(i.labelToAxis=t.labelToAxis),m.isNumber(t.needleWidth)&&(i.needleWidth=t.needleWidth),m.isNumber(t.needleHeadWidth)&&(i.needleHeadWidth=t.needleHeadWidth),m.isNumber(t.columnWidth)&&(i.columnWidth=t.columnWidth),m.isNumber(t.varianceAxisLineWidth)&&(i.varianceAxisLineWidth=t.varianceAxisLineWidth),m.isNumber(t.axisLineWidth)&&(i.axisLineWidth=t.axisLineWidth),m.isNumber(t.auxiliaryLineWidth)&&(i.auxiliaryLineWidth=t.auxiliaryLineWidth),m.isNumber(t.scenarioLineWidth)&&(i.scenarioLineWidth=t.scenarioLineWidth),m.isNumber(t.markerWidth)&&(i.markerWidth=t.markerWidth),m.isNumber(t.markerOffset)&&(i.markerOffset=t.markerOffset),m.isNumber(t.categoryWidth)&&(i.categoryWidth=t.categoryWidth),m.isNumber(t.axisTickLength)&&(i.axisTickLength=t.axisTickLength),i}default(){return new E}}class N{constructor(t,i,s,h,e,n,r){this.categoryPosition={x:0,y:0},this.spacings=new E,this.categoriesBoxOffset={width:0,height:0},this.padding=t,this.scaleFactors=i,this.fontStlye=s,this.dataLabelHeight=this.caluculateDataLabelHeight(),this.axisPosition={x:0,y:0},this.columnValue={min:h,max:e},this.numberOfColumns=n,this.leftSideLabelLength=r,this.calculateSpacings(),this.calculateCategoryPosition(),this.calculateAxisPosition()}caluculateDataLabelHeight(){return 1.1*$("123456789",{font:this.fontStlye.font,fontSize:this.fontStlye.size+"px"}).height}getColumnCenterPositionX(t){return this.categoryPosition.y+this.spacings.scenarioOffset+t*this.spacings.categoryWidth+this.leftSideLabelLength+.5*this.spacings.columnWidth}getAxisPositionY(t){let i=this.columnValue.max.getScaledUnit();return t&&(i=this.columnValue.max.getScaledPercentUnit()+this.getNeedleWidth()),i+this.dataLabelHeight+this.spacings.labelToAxis+this.padding.top}getAxisPositionX(){return this.padding.left+this.leftSideLabelLength}getColumnPositionX(t,i){return i?this.getColumnCenterPositionX(t):this.getColumnCenterPositionX(t)-this.spacings.scenarioOffset}getColumnPositionY(){return this.columnValue.max.getScaledUnit()+this.dataLabelHeight+this.spacings.labelToColumn+this.padding.top}getNeedlePositionY(){return this.columnValue.max.getScaledPercentUnit()+this.dataLabelHeight+this.spacings.labelToColumn+this.getNeedleWidth()+this.padding.top}getMarkerPositionX(t,i){return i?this.getColumnCenterPositionX(t)-this.spacings.markerOffset-.5*this.getColumnWidth():this.getColumnCenterPositionX(t)+this.spacings.markerOffset+.5*this.getColumnWidth()}getMarkerPositionY(){return this.getColumnPositionY()}getAxisTitlePositionX(t){const i=t.width();return this.axisPosition.x-i}getAxisTitlePositionY(t,i){let s=this.columnValue.max.getScaledUnit();return i&&(s=this.columnValue.max.getScaledPercentUnit()),t?s+this.dataLabelHeight+this.spacings.labelToAxis:s}getColumnDataLabelPositionY(t){const i=this.spacings.labelToColumn;return t<0?this.getColumnPositionY()+Math.abs(t)+i:this.getColumnPositionY()-t-i}getNeedleDataLabelPositionY(t){const i=this.spacings.labelToColumn;return t<0?this.getNeedlePositionY()+Math.abs(t)+i+2*this.getNeedleWidth():this.getNeedlePositionY()-t-i-2*this.getNeedleWidth()}getAxisEndPositionX(){return this.getAxisPositionX()+(this.numberOfColumns+.5)*this.spacings.categoryWidth}getColumnWidth(){return this.spacings.columnWidth}getNeedleWidth(){return this.spacings.needleWidth}getNeedleHeadWidth(){return this.spacings.needleHeadWidth}getScenarioLabelPositionOffsetX(t){return t?.5*this.getColumnWidth()+this.spacings.scenarioLabelToColumn:-(.5*this.getColumnWidth()+this.spacings.scenarioLabelToColumn)}calculateSpacings(){this.spacings={scenarioOffset:this.fontStlye.size*this.scaleFactors.scenarioOffset,scenarioLabelToColumn:this.fontStlye.size*this.scaleFactors.scenarioLabelToColumn,markerOffset:this.fontStlye.size*this.scaleFactors.markerOffset,labelToColumn:this.fontStlye.size*this.scaleFactors.labelToColumn,labelToAxis:this.fontStlye.size*this.scaleFactors.labelToAxis,needleWidth:this.fontStlye.size*this.scaleFactors.needleWidth,needleHeadWidth:this.fontStlye.size*this.scaleFactors.needleHeadWidth,columnWidth:this.fontStlye.size*this.scaleFactors.columnWidth,varianceAxisLineWidth:this.fontStlye.size*this.scaleFactors.varianceAxisLineWidth,axisLineWidth:this.fontStlye.size*this.scaleFactors.axisLineWidth,auxiliaryLineWidth:this.fontStlye.size*this.scaleFactors.auxiliaryLineWidth,scenarioLineWidth:this.fontStlye.size*this.scaleFactors.scenarioLineWidth,markerWidth:this.fontStlye.size*this.scaleFactors.markerWidth,categoryWidth:this.fontStlye.size*this.scaleFactors.categoryWidth,axisTickLength:this.fontStlye.size*this.scaleFactors.axisTickLength}}calculateCategoryPosition(){this.categoryPosition={x:this.padding.left+.5*this.spacings.columnWidth,y:this.padding.top}}calculateAxisPosition(){this.axisPosition={x:this.getAxisPositionX(),y:this.getAxisPositionY(!1)}}getMarkerScenarioLabelPositionOffsetX(t){return t?this.spacings.labelToColumn-this.fontStlye.size:this.spacings.labelToColumn+.5*this.spacings.markerWidth}}class R{constructor(t){this.top=t.top,this.bottom=t.bottom,this.left=t.left,this.right=t.right}addBoxTopLeft(t){return this.top+=t.height|this.top,this.left+=t.width|this.top,this}}class H{constructor(t){const i=1*t,s=.7*t;this.bgOffset=(i-s)/2,this.markerUp={top:s/2+",0",left:"0,"+s,right:s+","+s},this.markerUpBackground={top:i/2+",0",left:"0,"+i,right:i+","+i},this.markerDown={bottom:s/2+","+s,left:"0,0",right:s+",0"},this.markerDownBackground={bottom:i/2+","+i,left:"0,0",right:i+",0"},this.markerRight={bottom:"0,"+s,top:"0,0",right:s+","+s/2},this.markerRightBackground={bottom:"0,"+i,top:"0,0",right:i+","+i/2},this.markerLeft={bottom:s+","+s,top:s+",0",left:"0,"+s/2},this.markerLeftBackground={bottom:i+","+i,top:i+",0",Left:"0,"+i/2}}upMarkerPatternStrings(){return{background:this.markerUpBackground.left+" "+this.markerUpBackground.right+" "+this.markerUpBackground.top+" "+this.markerUpBackground.left,foreground:this.markerUp.left+" "+this.markerUp.right+" "+this.markerUp.top+" "+this.markerUp.left,bgOffset:this.bgOffset}}downMarkerPatternStrings(){return{background:this.markerDownBackground.left+" "+this.markerDownBackground.right+" "+this.markerDownBackground.bottom+" "+this.markerDownBackground.left,foreground:this.markerDown.left+" "+this.markerDown.right+" "+this.markerDown.bottom+" "+this.markerDown.left,bgOffset:this.bgOffset}}rightMarkerPatternStrings(){return{background:this.markerRightBackground.top+" "+this.markerRightBackground.right+" "+this.markerRightBackground.bottom+" "+this.markerRightBackground.top,foreground:this.markerRight.top+" "+this.markerRight.right+" "+this.markerRight.bottom+" "+this.markerRight.top,bgOffset:this.bgOffset}}leftMarkerPatternStrings(){return{background:this.markerLeftBackground.top+" "+this.markerLeftBackground.Left+" "+this.markerLeftBackground.bottom+" "+this.markerLeftBackground.top,foreground:this.markerLeft.top+" "+this.markerLeft.left+" "+this.markerLeft.bottom+" "+this.markerLeft.top,bgOffset:this.bgOffset}}createPatternMapForStructureBar(){const t=new Map;return t.set("marker-up",this.upMarkerPatternStrings()),t.set("marker-down",this.downMarkerPatternStrings()),t.set("marker-right",this.rightMarkerPatternStrings()),t.set("marker-left",this.leftMarkerPatternStrings()),t}}class F{constructor(t){this.container=new e,this.pattern=this.createFCPattern(this.container.group(),t),this.styles=t;let i=10;null!=t&&null!=t.fontStyles&&t.fontStyles.size&&(i=t.fontStyles.size),this.bgOffset=(1*i-.7*i)/2}createFCPattern(t,i){const s=i;return t.pattern(10,10,(function(t){t.rect(10,10).fill(s.barStyles.fc.fill),t.line(0,5,5,0).stroke({width:s.barStyles.fc.width,color:s.barStyles.fc.stroke,linecap:"square"}),t.line(5,10,10,5).stroke({width:s.barStyles.fc.width,color:s.barStyles.fc.stroke,linecap:"square"})})).id("pattern-time-fc")}getFCPolygonPattern(){return{background:"",foreground:"",bgOffset:0,pattern:this.pattern}}toString(){return this.container.svg()}}var V;!function(t){t[t.Left=0]="Left",t[t.Center=1]="Center",t[t.Right=2]="Right",t[t.Top=3]="Top",t[t.Bottom=4]="Bottom"}(V||(V={}));class j{constructor(t,i,s,h,e,n,r,o){this.ID_SCENARIOLABEL="Label",this.CSS_CATEGORIES="categories",this.isRelativeLabel=!1,this.segmentFillColor=null,this.x=i,this.y=s,this.value=e,this.group=t.group().id(this.createElementID(t.toString(),h)),this.styles=n,this.isVarianceLabel=!1,this.verticalHookLocation=r||V.Top,this.horizontalHookLocation=o||V.Left}setToVarianceLabel(){return this.isVarianceLabel=!0,this}setToRelativeVarianceLabel(){return this.isVarianceLabel=!0,this.isRelativeLabel=!0,this}setSegmentFill(t){return this.segmentFillColor=t,this}updateGroup(t){return this.group=t,this}draw(t=!0,i={percent:2,decimal:1},s=new n){if(this.isEmpty())return this;const h=this.group;let e,r="";if(!1===Number.isNaN(Number(this.value))){let t="percent",h=i.percent,n=i.percent,o=1;!1===this.isRelativeLabel&&(h=i.decimal,n=i.decimal,o=s.value,t="decimal"),e=_.number(Number(this.value),t,h,n,o),this.isVarianceLabel&&Number(this.value)>=0&&(r="+")}else e=""+this.value;const o=this.drawLabel(h,r+e);return!1===t&&(o.addClass("hide"),h.addClass("hide")),this}isEmpty(){return null==this.value||""===this.value}setPos(t,i){return this.x=t,this.y=i,this}forceStringTypeDraw(){return this.drawLabel(this.group,""+this.value),this}drawLabel(t,i){const s=this.styles.fontStyles.background||"#ffffff";let h="start";const e=t.text(i);e.move(this.x,this.y);const n=e.bbox().w,o=e.bbox().h;let l=0,a=0;const c=e.x();let u=e.y();return this.horizontalHookLocation===V.Left?(h="left",l=e.x()):this.horizontalHookLocation===V.Center?(h="middle",l=e.x()-(n+2)/2):this.horizontalHookLocation===V.Right&&(h="end",l=e.x()-n),this.verticalHookLocation===V.Center?(u=e.y()-1.2*o/2,a=u+.2*o):this.verticalHookLocation===V.Top?(u-=o/4,a=u+.2*o):this.verticalHookLocation===V.Bottom&&(u-=o,a=u+.2*o),e.move(c,u),e.font({anchor:h}),null!=this.segmentFillColor?e.fill(r(this.segmentFillColor)):t.rect(n+2,.8*o).stroke(s).fill(s).opacity(.9).move(l-1,a).insertBefore(e),e}createElementID(t,i){return t+"_"+i+"_"+this.ID_SCENARIOLABEL}}const X={ac:1,pp:2,fc:3,pl:4};var G,W,B;!function(t){t[t.Above=0]="Above",t[t.Below=1]="Below",t[t.Left=2]="Left",t[t.Right=3]="Right"}(G||(G={}));class I{constructor(){this.labels=[],this.scenarioLabels=[]}clear(){this.labels=[],this.scenarioLabels=[]}register(t){this.labels.push(t)}hasCollision(t){return this.labels.some((i=>this.intersects(t,i)))}getOptimalPlacement(t,i,s,h,e,n,r,o){const l=X[r]||99,a=n/2;for(const n of o){const r=this.calculatePlacementForDirection(t,i,s,h,e,a,8,n);if(!this.hasCollision(r.bounds))return r}for(const n of o){const r=this.calculatePlacementForDirection(t,i,s,h,e,a,8,n);if(!this.collidesWithHigherPriority(r.bounds,l))return r}return null}calculatePlacementForDirection(t,i,s,h,e,n,r,o){let l,a,c,u,d,f;switch(o){case G.Above:l=t,a=i-n-r,c=V.Bottom,u=V.Center,d=t-s/2,f=i-n-r-h;break;case G.Below:l=t,a=i+n+r,c=V.Top,u=V.Center,d=t-s/2,f=i+n+r-h/4;break;case G.Left:l=t-n-r,a=i,c=V.Center,u=V.Right,d=t-n-r-s,f=i-.6*h;break;case G.Right:l=t+n+r,a=i,c=V.Center,u=V.Left,d=t+n+r,f=i-.6*h}return{labelX:l,labelY:a,verticalHook:c,horizontalHook:u,bounds:{x:d,y:f,width:s,height:h,pointIndex:e,preferredHook:c}}}collidesWithHigherPriority(t,i){return this.labels.some((s=>!!s.scenarioType&&((X[s.scenarioType]||99)<i&&this.intersects(t,s))))}shouldHideScenarioLabel(t,i,s,h=20){const e=X[s]||99;return!(e<=1)&&this.scenarioLabels.some((s=>{if((X[s.scenarioType]||99)>=e)return!1;const n=Math.abs(i-s.y),r=Math.abs(t-s.x);return n<h&&r<h}))}registerScenarioLabel(t,i,s){this.scenarioLabels.push({x:t,y:i,scenarioType:s})}intersects(t,i){return!(t.x+t.width<i.x||i.x+i.width<t.x||t.y+t.height<i.y||i.y+i.height<t.y)}getLabelCount(){return this.labels.length}}class z{constructor(t,i,s,h){this.value=t,this.scenario=i,this.pixelPerUnit=s||1,this.variance="neg"===h||h===W.NEG?W.NEG:"pos"===h||h===W.POS?W.POS:W.NEU}isEmpty(){return void 0===this.value||null==this.scenario}getScaledUnit(){return null==this.value?0:this.value*this.pixelPerUnit}getScaledPercentUnit(){return null==this.value?0:this.value>1.45?1.45*this.pixelPerUnit:this.value<-1.45?-1.45*this.pixelPerUnit:this.value*this.pixelPerUnit}getVarianceStyle(){return null==this.value||this.value>=0?this.variance:W.NEU===this.variance?W.NEU:W.POS===this.variance?W.NEG:W.POS}isClipped(){return null!=this.value&&Math.abs(this.value)>1.45}getClippedValue(){return 145}getScenario(){var t;return null===(t=this.scenario)||void 0===t?void 0:t.slice(0,2)}}class U{constructor(){this.operation="+"}addRowGroup(t,i){this.rowGroup=t,this.rowGroupIndex=i}addCategory(t,i){this.category=t,this.categoryIndex=i}addSubCategory(t,i){this.subCategory=t,this.subCategoryIndex=i}addColumnGroup(t,i){this.columnGroup=t,this.columnGroupIndex=i}addSubColumnGroup(t,i){this.columnSubGroup=t,this.columnSubGroupIndex=i}}class q{constructor(){}adapt(t){const i=new U;return m.isString(t.date)&&(i.date=this.parseDateString(t.date)),m.isOperator(t.operation)&&(i.operation=t.operation),m.isNumber(t.rowGroupIndex)&&m.isString(t.rowGroup)&&i.addRowGroup(t.rowGroup,t.rowGroupIndex),m.isNumber(t.categoryIndex)&&m.isString(t.category)&&i.addCategory(t.category,t.categoryIndex),m.isNumber(t.subCategoryIndex)&&m.isString(t.subCategory)&&i.addSubCategory(t.subCategory,t.subCategoryIndex),m.isNumber(t.columnGroupIndex)&&m.isString(t.columnGroup)&&i.addColumnGroup(t.columnGroup,t.columnGroupIndex),m.isNumber(t.columnSubGroupIndex)&&m.isString(t.columnSubGroup)&&i.addSubColumnGroup(t.columnSubGroup,t.columnSubGroupIndex),this.setActualValues(t,i),this.setPlanValues(t,i),this.setPreviousPeriodValues(t,i),this.setForecastValues(t,i),i}parseDateString(t){const i=L.fromISO(t);if(i.isValid)return i;console.warn(`TimeChartDataRow: invalid date value '${t}' — skipping row`)}default(){return new U}setActualValues(t,i){m.isNumber(t.ac1)&&(i.ac1=t.ac1),m.isNumber(t.ac2)&&(i.ac2=t.ac2),m.isNumber(t.ac3)&&(i.ac3=t.ac3),m.isNumber(t.ac4)&&(i.ac4=t.ac4)}setPlanValues(t,i){m.isNumber(t.pl1)&&(i.pl1=t.pl1),m.isNumber(t.pl2)&&(i.pl2=t.pl2),m.isNumber(t.pl3)&&(i.pl3=t.pl3),m.isNumber(t.pl4)&&(i.pl4=t.pl4)}setPreviousPeriodValues(t,i){m.isNumber(t.pp1)&&(i.pp1=t.pp1),m.isNumber(t.pp2)&&(i.pp2=t.pp2),m.isNumber(t.pp3)&&(i.pp3=t.pp3),m.isNumber(t.pp4)&&(i.pp4=t.pp4)}setForecastValues(t,i){m.isNumber(t.fc1)&&(i.fc1=t.fc1),m.isNumber(t.fc2)&&(i.fc2=t.fc2),m.isNumber(t.fc3)&&(i.fc3=t.fc3),m.isNumber(t.fc4)&&(i.fc4=t.fc4)}}class K{constructor(t,i,s,h,e,n){this.scaleFactors=t,this.fontStyles=i,this.axisStyles=s,this.barStyles=h,this.varianceStyles=e,this.padding=n,this.pattern=new Map,this.stackColors=["#000000","#c0c0c0","#808080"]}}class Z{constructor(t,i,s,h,e){this.scaleFactorsStructureChartAdapter=t,this.fontStyleAdapter=i,this.svgStyleGroupAdapter=s,this.svgVariancesStyleGroupAdapter=h,this.paddingadapter=e}adapt(t){const i=new K(this.scaleFactorsStructureChartAdapter.default(),this.fontStyleAdapter.default(),this.svgStyleGroupAdapter.default(),this.svgStyleGroupAdapter.default(),this.svgVariancesStyleGroupAdapter.default(),this.paddingadapter.default());return m.isExisting(t)&&(m.isExisting(t.scaleFactors)&&(i.scaleFactors=this.scaleFactorsStructureChartAdapter.adapt(t.scaleFactors)),m.isExisting(t.fontStyles)&&(i.fontStyles=this.fontStyleAdapter.adapt(t.fontStyles)),m.isExisting(t.axisStyles)&&(i.axisStyles=this.svgStyleGroupAdapter.adapt(t.axisStyles)),m.isExisting(t.barStyles)&&(i.barStyles=this.svgStyleGroupAdapter.adapt(t.barStyles)),m.isExisting(t.varianceStyles)&&(i.varianceStyles=this.svgVariancesStyleGroupAdapter.adapt(t.varianceStyles)),m.isExisting(t.padding)&&(i.padding=this.paddingadapter.adapt(t.padding)),Array.isArray(t.stackColors)&&t.stackColors.length>0&&(i.stackColors=t.stackColors),i.pattern=new H(i.fontStyles.size).createPatternMapForStructureBar()),i}default(){return new K(this.scaleFactorsStructureChartAdapter.default(),this.fontStyleAdapter.default(),this.svgStyleGroupAdapter.default(),this.svgStyleGroupAdapter.default(),this.svgVariancesStyleGroupAdapter.default(),this.paddingadapter.default())}}!function(t){t.AC1="ac1",t.PP1="pp1",t.FC1="fc1",t.PL1="pl1",t.AC2="ac2",t.PP2="pp2",t.FC2="fc2",t.PL2="pl2",t.AC3="ac3",t.PP3="pp3",t.FC3="fc3",t.PL3="pl3",t.AC4="ac4",t.PP4="pp4",t.FC4="fc4",t.PL4="pl4",t.POS="pos",t.NEG="neg",t.NEU="neu"}(W||(W={})),function(t){t.LIST="LIST",t.SUM="SUM",t.OPT="OPT"}(B||(B={}));class J{constructor(t,i,s){this.ID_AXIS="axis",this.CSS_AXIS_TITLE="categories",this.scenarioType=t.scenarioType,this.labelText=t.labelText||null,this.isRelative=t.isRelative||!1,this.position=i,this.svgGroup=s.group().id(this.ID_AXIS)}drawAxisTitle(t,i){null==i&&(i=""),t.text(i).addClass(this.CSS_AXIS_TITLE).attr("text-anchor","middle").move(this.position.getAxisTitlePositionX(t),this.position.getAxisTitlePositionY(!0,this.isRelative))}draw(){return this.labelText&&this.drawAxisTitle(this.svgGroup,this.labelText),this.svgGroup.line(this.position.getAxisPositionX(),this.position.getAxisPositionY(this.isRelative),this.position.getAxisEndPositionX(),this.position.getAxisPositionY(this.isRelative)).addClass(this.ID_AXIS+"-"+this.convertScenarioType()),this}convertScenarioType(){return void 0===this.scenarioType||null==this.scenarioType?"default":`${this.scenarioType}`.slice(0,2)}}class Q{constructor(t,i,s,h,e,n,r,o=null){this.ID_DATA_PREFIX="DATA",this.ID_SCENARIO_PREFIX="SCENARIO",this.ID_RECT="RECT",this.FALLBACK_COLOUR="#000000",this.label=null,this.scenarioLabel=null,this.isVarianceColumn=!1,this.overflowConfig=null,this.isOverflowing=!1,this.overdriveHeight=0,this.dimensions={columnLength:0,xPos:0,yPos:0,labelYPos:0,scenarioLabelXPos:0,scenarioLabelYPos:0,clipped:!1},this.hasData=!1,this.dataPoint=s,this.index=h,this.isPrimaryColumn=e,this.position=t,this.columnBarStyles=i.barStyles,this.overflowConfig=o,this.scenarioGroup=n,this.styles=i,this.columnGroup=n.group().id(n.toString()+"_"+this.ID_RECT),!0!==(null==s?void 0:s.isEmpty())&&(this.hasData=!0,this.dimensions=this.createDimensions(s,h,e),this.label=this.getDataLabel(s),this.scenarioLabel=this.getScenarioLabel(r))}setAsVariance(){var t;return this.isVarianceColumn=!0,null===(t=this.label)||void 0===t||t.setToVarianceLabel(),this}updateLabelGroup(t){var i;return this.isEmpty()||null===(i=this.label)||void 0===i||i.updateGroup(t),this}draw(t={percent:2,decimal:1},i=new n){if(this.isEmpty())return this;const s=this.getScenarioStyle(),h=this.convertToSVGStyle(s,"stroke"),e=this.getFillStyle(s);null!=this.columnGroup&&(this.isOverflowing&&this.overflowConfig?this.drawOverdriveBar(e,h):this.columnGroup.rect(this.position.getColumnWidth(),this.dimensions.columnLength).fill(e).stroke(h).y(this.dimensions.yPos).cx(this.dimensions.xPos)),this.drawColumnDataLabel(t,i),this.drawScenarioLabel()}drawOverdriveBar(t,i){if(!this.columnGroup||!this.overflowConfig)return;const s=this.position.getColumnPositionY(),h=this.position.getColumnWidth(),e=this.dimensions.columnLength,{breakGap:n}=this.overflowConfig,r=s-e;this.columnGroup.rect(h,e).fill(t).stroke(i).y(r).cx(this.dimensions.xPos);const o=r-n-this.overdriveHeight;this.columnGroup.rect(h,this.overdriveHeight).fill(t).stroke(i).y(o).cx(this.dimensions.xPos),this.drawBreakIndicator(r,n)}drawBreakIndicator(t,i){if(!this.columnGroup)return;const s=this.position.getColumnWidth(),h=this.dimensions.xPos-s/2,e=t-i/2,n=.35*i,r=s/3;let o=`M ${h} ${e-n}`;for(let t=0;t<3;t++)o+=` L ${h+r*(t+.5)} ${e-n-.3*i} L ${h+r*(t+1)} ${e-n}`;let l=`M ${h} ${e+n}`;for(let t=0;t<3;t++)l+=` L ${h+r*(t+.5)} ${e+n+.3*i} L ${h+r*(t+1)} ${e+n}`;this.columnGroup.rect(s+2,i).fill("#ffffff").stroke("none").y(t-i).cx(this.dimensions.xPos),this.columnGroup.path(o).fill("none").stroke({color:"#000000",width:1}),this.columnGroup.path(l).fill("none").stroke({color:"#000000",width:1})}createDimensions(t,i,s){const h=t.getScaledUnit();if(this.overflowConfig&&h>0){const e="ac"===t.getScenario()?this.overflowConfig.cutHeight:this.overflowConfig.cutHeight-this.overflowConfig.scenarioCutOffset;if(h>e){this.isOverflowing=!0;const{breakGap:t,overdriveZoneHeight:n,maxOverflow:r}=this.overflowConfig;this.overdriveHeight=r>0?(h-e)/r*n:0;const o=e+t+this.overdriveHeight,l=this.position.getColumnPositionY();return{clipped:!1,columnLength:e,xPos:this.position.getColumnPositionX(i,s),yPos:l-e,labelYPos:l-o-this.position.spacings.labelToColumn,scenarioLabelXPos:this.position.getColumnPositionX(i,s)+this.position.getScenarioLabelPositionOffsetX(s),scenarioLabelYPos:l-.5*e}}}return h<0?{clipped:!1,columnLength:Math.abs(h),xPos:this.position.getColumnPositionX(i,s),yPos:this.position.getColumnPositionY(),labelYPos:this.position.getColumnDataLabelPositionY(h),scenarioLabelXPos:this.position.getColumnPositionX(i,s)+this.position.getScenarioLabelPositionOffsetX(s),scenarioLabelYPos:this.position.getColumnPositionY()+.5*Math.abs(h)}:{clipped:!1,columnLength:h,xPos:this.position.getColumnPositionX(i,s),yPos:this.position.getColumnPositionY()-h,labelYPos:this.position.getColumnDataLabelPositionY(h),scenarioLabelXPos:this.position.getColumnPositionX(i,s)+this.position.getScenarioLabelPositionOffsetX(s),scenarioLabelYPos:this.position.getColumnPositionY()-.5*Math.abs(h)}}getDataLabel(t){let i=V.Bottom;null!=t.value&&t.value<0&&(i=V.Top);const s=this.isOverflowing?this.dimensions.labelYPos:this.position.getColumnDataLabelPositionY(this.dataPoint.getScaledUnit());return new j(this.scenarioGroup,this.position.getColumnCenterPositionX(this.index),s,this.ID_DATA_PREFIX,t.value,this.styles,i,V.Center)}getScenarioLabel(t){return new j(this.scenarioGroup,-1,-1,this.ID_SCENARIO_PREFIX,t,this.styles,V.Center,this.isPrimaryColumn?V.Left:V.Right)}convertToSVGStyle(t,i){return null==t&&(t=[]),t.color=t[i]||this.FALLBACK_COLOUR,Object.assign({},t)}drawScenarioLabel(){null==this.scenarioLabel||this.scenarioLabel.isEmpty()||this.isVarianceColumn||this.scenarioLabel.setPos(this.dimensions.scenarioLabelXPos,this.dimensions.scenarioLabelYPos).draw(!0)}drawColumnDataLabel(t,i=new n){var s;null===(s=this.label)||void 0===s||s.draw(this.isPrimaryColumn,t,i)}getFillStyle(t){var i,s,h,e;const n=this.columnBarStyles[this.dataPoint.getScenario()];return(null==n?void 0:n.fillpattern)&&(null===(i=this.styles.pattern.get(n.fillpattern))||void 0===i?void 0:i.pattern)?null===(e=null===(h=null===(s=this.styles)||void 0===s?void 0:s.pattern)||void 0===h?void 0:h.get(n.fillpattern))||void 0===e?void 0:e.pattern:this.convertToSVGStyle(t,"fill")}getScenarioStyle(){var t;return this.isVarianceColumn?null===(t=this.styles)||void 0===t?void 0:t.varianceStyles.getSVGStyle(this.dataPoint.getVarianceStyle()):this.columnBarStyles[this.dataPoint.getScenario()]}isEmpty(){return!1===this.hasData||Number.isNaN(this.dataPoint.value)}}class tt{constructor(t,i,s,h,e,n,r,o,l){this.ID_DATA_PREFIX="DATA",this.ID_SCENARIO_PREFIX="SCENARIO",this.FALLBACK_COLOUR="#000000",this.scenarioLabel=null,this._defaultMarkerPattern=null,this.dimensions={columnLength:0,xPos:0,yPos:0,labelYPos:0,scenarioLabelXPos:0,scenarioLabelYPos:0,clipped:!1},this.hasData=!1,this.position=t,this.markerGroup=i||null,this.markerPattern=s||this._defaultMarkerPattern,this.styles=e,this.barStyles=e?e.barStyles:null,this.scenario=h,!0!==(null==n?void 0:n.isEmpty())&&(this.hasData=!0,this.dimensions=this.createMarkerDimensions(n,r,l),this.scenarioLabel=this.getScenarioLabel(o,e,l))}draw(){if(this.isEmpty())return this;const t=this.convertToSVGStyle(this.barStyles[this.getScenario()],"stroke");let i=this.convertToSVGStyle(this.barStyles[this.getScenario()],"fill");const s=this.barStyles[this.getScenario()];if(null!=s&&s.fillpattern){const t=this.styles.pattern.get(s.fillpattern);null!=t&&(i=t.pattern)}return this.markerGroup.polygon(this.markerPattern.background).fill("#ffffff").cy(this.dimensions.yPos-this.dimensions.columnLength).cx(this.dimensions.xPos),this.markerGroup.polygon(this.markerPattern.foreground).fill(i).stroke(t).cy(this.dimensions.yPos-this.dimensions.columnLength).cx(this.dimensions.xPos),null==this.scenarioLabel||this.scenarioLabel.isEmpty()||this.scenarioLabel.setPos(this.dimensions.scenarioLabelXPos,this.dimensions.scenarioLabelYPos).draw(),this}createMarkerDimensions(t,i,s){return t.getScaledUnit()<0?{clipped:!1,labelYPos:0,columnLength:t.getScaledUnit(),xPos:this.position.getMarkerPositionX(i,s),yPos:this.position.getMarkerPositionY(),scenarioLabelXPos:this.position.getMarkerPositionX(i,s)+this.position.getMarkerScenarioLabelPositionOffsetX(s),scenarioLabelYPos:this.position.getMarkerPositionY()+Math.abs(t.getScaledUnit())}:{clipped:!1,labelYPos:0,columnLength:t.getScaledUnit(),xPos:this.position.getMarkerPositionX(i,s),yPos:this.position.getMarkerPositionY(),scenarioLabelXPos:this.position.getMarkerPositionX(i,s)+this.position.getMarkerScenarioLabelPositionOffsetX(s),scenarioLabelYPos:this.position.getMarkerPositionY()-Math.abs(t.getScaledUnit())}}getScenarioLabel(t,i,s){return null==this.markerGroup?null:new j(this.markerGroup,-1,-1,this.ID_DATA_PREFIX,t,i,V.Center,s?V.Right:V.Left)}convertToSVGStyle(t,i){return null==t&&(t=[]),t.color=t[i]||this.FALLBACK_COLOUR,Object.assign({},t)}isEmpty(){return!1===this.hasData}getScenario(){var t;return null===(t=this.scenario)||void 0===t?void 0:t.slice(0,2)}}class it{constructor(t,i,s,h,e){this.ID_DATA_PREFIX="DATA",this.ID_SCENARIO_PREFIX="SCENARIO",this.ID_RECT="RECT",this.FALLBACK_COLOUR="#000000",this.dataLabel=null,this.dimensions={columnLength:0,xPos:0,yPos:0,labelYPos:0,scenarioLabelXPos:0,scenarioLabelYPos:0,clipped:!1},this.hasData=!1,this.dataPoint=s,this.index=h,this.position=t,this.barStyles=i.barStyles,this.scenarioGroup=e,this.styles=i,this.barGroup=e.group().id(e.toString()+"_"+this.ID_RECT),!0!==(null==s?void 0:s.isEmpty())&&(this.hasData=!0,this.dimensions=this.createDimensions(t,s,h),this.dataLabel=new j(this.scenarioGroup,this.position.getColumnCenterPositionX(this.index),this.position.getNeedleDataLabelPositionY(this.dataPoint.getScaledPercentUnit()),this.ID_DATA_PREFIX,s.value,this.styles,V.Center,V.Center),this.dataLabel.setToRelativeVarianceLabel())}updateLabelGroup(t){var i;return this.isEmpty()||null===(i=this.dataLabel)||void 0===i||i.updateGroup(t),this}draw(){var t;if(this.isEmpty())return this;const i=this.styles.varianceStyles[this.dataPoint.getVarianceStyle()],s=this.convertToSVGStyle(i,"stroke");let h=this.convertToSVGStyle(i,"fill");const e=this.convertToSVGStyle(this.styles.varianceStyles.ac,"stroke"),n=this.convertToSVGStyle(this.styles.varianceStyles.ac,"fill"),r=this.barStyles[this.dataPoint.getScenario()];if(null!=r&&r.fillpattern){const t=this.styles.pattern.get(r.fillpattern);null!=t&&(h=t.pattern)}this.dimensions.clipped?this.createClippedNeedleHead(h,s):this.createNeedleHead(e,n),this.barGroup.rect(this.position.getNeedleWidth(),this.dimensions.columnLength).cx(this.dimensions.xPos).y(this.dimensions.yPos).fill(h).stroke(s),null===(t=this.dataLabel)||void 0===t||t.draw()}createDimensions(t,i,s){return i.getScaledPercentUnit()<0?{labelYPos:0,scenarioLabelXPos:0,scenarioLabelYPos:0,columnLength:Math.abs(i.getScaledPercentUnit()),xPos:t.getColumnCenterPositionX(s),yPos:t.getNeedlePositionY(),clipped:i.isClipped()}:{columnLength:i.getScaledPercentUnit(),xPos:t.getColumnCenterPositionX(s),yPos:t.getNeedlePositionY()-i.getScaledPercentUnit(),labelYPos:0,scenarioLabelXPos:0,scenarioLabelYPos:0,clipped:i.isClipped()}}convertToSVGStyle(t,i){return null==t&&(t=[]),t.color=t[i]||this.FALLBACK_COLOUR,Object.assign({},t)}createClippedNeedleHead(t,i){const s=this.barGroup.polygon("0,0 5,9 -5,9 0,0 0,5 5,13 -5,13 0,5").fill(t).cx(this.dimensions.xPos).cy(this.getHeadYPosition()).fill(t).stroke(i);null!=this.dataPoint.value&&this.dataPoint.value<0&&s.flip("y")}createNeedleHead(t,i){this.barGroup.rect(2*this.position.getNeedleWidth(),this.position.getNeedleHeadWidth()).cx(this.dimensions.xPos).cy(this.getHeadYPosition()).fill(t).stroke(i)}isEmpty(){return!1===this.hasData||Number.isNaN(this.dataPoint.value)}getHeadYPosition(){let t=this.dimensions.yPos;return null!=this.dataPoint.value&&this.dataPoint.value<0&&(t+=this.dimensions.columnLength),t}}const st={ac:{markerFill:"#000000",markerStroke:"#000000",lineColor:"#000000"},pp:{markerFill:"#999999",markerStroke:"#999999",lineColor:"#999999"},fc:{markerFill:"#ffffff",markerStroke:"#000000",lineColor:"#000000",lineDashArray:"4,4"},pl:{markerFill:"#ffffff",markerStroke:"#000000",lineColor:"#000000"}};class ht{constructor(t,i,s,h,e,n,r,o,l=null){this.MARKER_SIZE=8,this.LINE_WIDTH=2,this.ID_LINE_PREFIX="LINE",this.ID_MARKER_PREFIX="MARKER",this.ID_LABEL_PREFIX="LABEL",this.ESTIMATED_LABEL_WIDTH=56,this.ESTIMATED_LABEL_HEIGHT=24,this.position=t,this.styles=i,this.dataPoints=s,this.scenarioGroup=h,this.labelGroup=e,this.scenarioName=n,this.scenarioLabel=r,this.collisionManager=l}draw(t={percent:2,decimal:1},i=new n){return this.drawGeometry(),this.drawLabels(t,i),this}drawGeometry(){if(0===this.dataPoints.length)return this;const t=this.getLineStyle();return this.drawLines(t),this.drawMarkers(t),this}drawLabels(t={percent:2,decimal:1},i=new n){return 0===this.dataPoints.length||(this.drawScenarioLabel(),this.drawValueLabels(t,i)),this}getLineStyle(){var t,i;const s=(null===(i=null===(t=this.scenarioName)||void 0===t?void 0:t.slice(0,2))||void 0===i?void 0:i.toLowerCase())||"ac";return st[s]||st.ac}getScenarioVariant(){var t;const i=parseInt((null===(t=this.scenarioName)||void 0===t?void 0:t.slice(-1))||"1",10);return isNaN(i)?1:Math.min(Math.max(i,1),4)}drawSquareMarker(t,i,s,h){const e=this.MARKER_SIZE/2;t.rect(this.MARKER_SIZE,this.MARKER_SIZE).fill(h.markerFill).stroke({color:h.markerStroke,width:1}).move(i-e,s-e)}drawCircleMarker(t,i,s,h){t.circle(this.MARKER_SIZE).fill(h.markerFill).stroke({color:h.markerStroke,width:1}).center(i,s)}drawTriangleMarker(t,i,s,h){const e=this.MARKER_SIZE/2;t.polygon(`${i},${s-e} ${i-e},${s+e} ${i+e},${s+e}`).fill(h.markerFill).stroke({color:h.markerStroke,width:1})}drawDiamondMarker(t,i,s,h){const e=this.MARKER_SIZE/2;t.polygon(`${i},${s-e} ${i+e},${s} ${i},${s+e} ${i-e},${s}`).fill(h.markerFill).stroke({color:h.markerStroke,width:1})}drawLines(t){const i=this.scenarioGroup.group().id(this.ID_LINE_PREFIX);for(let s=1;s<this.dataPoints.length;s++){const h=this.dataPoints[s-1],e=this.dataPoints[s];if(h.dataPoint.isEmpty()||e.dataPoint.isEmpty())continue;const n=this.position.getColumnCenterPositionX(h.index),r=this.position.getColumnPositionY()-h.dataPoint.getScaledUnit(),o=this.position.getColumnCenterPositionX(e.index),l=this.position.getColumnPositionY()-e.dataPoint.getScaledUnit(),a=i.line([[n,r],[o,l]]).stroke({color:t.lineColor,width:this.LINE_WIDTH,linecap:"round"}).fill("none");t.lineDashArray&&a.attr("stroke-dasharray",t.lineDashArray)}}drawMarkers(t){const i=this.scenarioGroup.group().id(this.ID_MARKER_PREFIX),s=this.getScenarioVariant();for(const h of this.dataPoints){if(h.dataPoint.isEmpty())continue;const e=this.position.getColumnCenterPositionX(h.index),n=this.position.getColumnPositionY()-h.dataPoint.getScaledUnit();switch(s){case 2:this.drawCircleMarker(i,e,n,t);break;case 3:this.drawTriangleMarker(i,e,n,t);break;case 4:this.drawDiamondMarker(i,e,n,t);break;default:this.drawSquareMarker(i,e,n,t)}}}getLabelPositionPriority(t){const i=this.dataPoints[t];let s=null;for(let i=t+1;i<this.dataPoints.length;i++)if(!this.dataPoints[i].dataPoint.isEmpty()){s=this.dataPoints[i];break}let h=null;for(let i=t-1;i>=0;i--)if(!this.dataPoints[i].dataPoint.isEmpty()){h=this.dataPoints[i];break}const e=i.dataPoint.getScaledUnit();return h&&s&&h.dataPoint.getScaledUnit()>e&&s.dataPoint.getScaledUnit()>e?[G.Below,G.Left,G.Right,G.Above]:[G.Above,G.Left,G.Right,G.Below]}getScenarioType(){var t,i;return(null===(i=null===(t=this.scenarioName)||void 0===t?void 0:t.slice(0,2))||void 0===i?void 0:i.toLowerCase())||"ac"}drawValueLabels(t,i){const s=this.getScenarioType();for(let h=0;h<this.dataPoints.length;h++){const e=this.dataPoints[h];if(e.dataPoint.isEmpty()||null===e.dataPoint.value)continue;const n=this.position.getColumnCenterPositionX(e.index),r=this.position.getColumnPositionY()-e.dataPoint.getScaledUnit();let o=n,l=r-this.MARKER_SIZE/2-2,a=V.Bottom,c=V.Center;if(this.collisionManager){const t=this.getLabelPositionPriority(h),i=this.collisionManager.getOptimalPlacement(n,r,this.ESTIMATED_LABEL_WIDTH,this.ESTIMATED_LABEL_HEIGHT,e.index,this.MARKER_SIZE,s,t);if(null===i)continue;o=i.labelX,l=i.labelY,a=i.verticalHook,c=i.horizontalHook;const u=Object.assign(Object.assign({},i.bounds),{scenarioType:s});this.collisionManager.register(u)}new j(this.labelGroup,o,l,this.ID_LABEL_PREFIX,e.dataPoint.value,this.styles,a,c).draw(!0,t,i)}}drawScenarioLabel(){if(!this.scenarioLabel)return;let t=null;for(let i=this.dataPoints.length-1;i>=0;i--)if(!this.dataPoints[i].dataPoint.isEmpty()){t=this.dataPoints[i];break}if(!t)return;const i=this.position.getColumnCenterPositionX(t.index)+this.MARKER_SIZE+4,s=this.position.getColumnPositionY()-t.dataPoint.getScaledUnit(),h=this.getScenarioType();if(this.collisionManager){if(this.collisionManager.shouldHideScenarioLabel(i,s,h))return;this.collisionManager.registerScenarioLabel(i,s,h)}new j(this.labelGroup,i,s,"SCENARIO_LABEL",this.scenarioLabel,this.styles,V.Center,V.Left).forceStringTypeDraw()}}class et{constructor(t,i,s,h,e,n,r,o,l,a,c){this.hasData=!1,this.position=t,this.styles=i,this.dataPoint=s,this.index=h,this.baselineValue=e,this.segmentIndex=r,this.stackMode=o,this.totalValue=l,this.group=c,this.columnGroup=c.group().id(`stacked_col_${h}_seg_${r}`),!0!==(null==s?void 0:s.isEmpty())&&null!=s.value&&(this.hasData=!0)}draw(t={percent:2,decimal:1},i=new n){if(!this.hasData||null==this.dataPoint.value)return;const s=this.dataPoint.value,h=this.dataPoint.pixelPerUnit;let e,r;const o=this.position.getColumnPositionY();if(this.stackMode===P.RELATIVE){const t=h;e=(0!==this.totalValue?Math.abs(s)/Math.abs(this.totalValue):0)*t,r=o-this.baselineValue/Math.abs(this.totalValue)*t-e}else e=Math.abs(s*h),r=o-this.baselineValue*h-e;const l=this.position.getColumnCenterPositionX(this.index),a=this.position.getColumnWidth(),c=this.styles.stackColors,u=c[this.segmentIndex%c.length],d={color:u},f={color:u,width:.5};if(this.columnGroup.rect(a,Math.max(e,.5)).fill(d).stroke(f).y(r).cx(l),e>=18){const h=r+e/2;if(this.stackMode===P.RELATIVE||this.stackMode===P.ABSOLUTE_RELATIVE){const i=(0!==this.totalValue?s/this.totalValue*100:0).toFixed(t.percent)+"%";new j(this.group,l,h,"STACK_SEG",i,this.styles,V.Center,V.Center).setSegmentFill(u).forceStringTypeDraw()}else new j(this.group,l,h,"STACK_SEG",s,this.styles,V.Center,V.Center).setSegmentFill(u).draw(!0,t,i)}}drawTotalLabel(t={percent:2,decimal:1},i=new n){if(this.stackMode===P.RELATIVE)return;const s=this.position.getColumnCenterPositionX(this.index),h=this.position.getColumnPositionY();new j(this.group,s,h-this.totalValue*this.dataPoint.pixelPerUnit-this.position.spacings.labelToColumn,"STACK_TOTAL",this.totalValue,this.styles,V.Bottom,V.Center).draw(!0,t,i)}}const nt={ac:{fill:"#000000",opacity:.3,lineColor:"#000000"},pp:{fill:"#999999",opacity:.3,lineColor:"#999999"},fc:{fill:"#000000",opacity:.2,lineColor:"#000000",dashArray:"4,4"},pl:{fill:"#000000",opacity:.1,lineColor:"#000000"}},rt=[{fill:"#000000",opacity:.3},{fill:"#555555",opacity:.25},{fill:"#999999",opacity:.2},{fill:"#bbbbbb",opacity:.15},{fill:"#dddddd",opacity:.1}];class ot{constructor(t,i,s,h,e,n){this.group=t.group().id(`area_fill_${e}`),this.upperPoints=i,this.lowerPoints=s,this.scenarioType=h,this.segmentIndex=e,this.isScenarioStack=n}draw(){if(this.upperPoints.length<2||this.lowerPoints.length<2)return;let t,i,s=`M ${this.upperPoints[0].x},${this.upperPoints[0].y}`;for(let t=1;t<this.upperPoints.length;t++)s+=` L ${this.upperPoints[t].x},${this.upperPoints[t].y}`;for(let t=this.lowerPoints.length-1;t>=0;t--)s+=` L ${this.lowerPoints[t].x},${this.lowerPoints[t].y}`;if(s+=" Z",this.isScenarioStack&&this.scenarioType){const s=this.scenarioType.slice(0,2).toLowerCase(),h=nt[s]||nt.ac;t=h.fill,i=h.opacity}else{const s=Math.min(this.segmentIndex,rt.length-1);t=rt[s].fill,i=rt[s].opacity}this.group.path(s).fill(t).opacity(i).stroke("none")}drawBoundaryLine(){if(this.upperPoints.length<2)return;let t,i="#000000";if(this.isScenarioStack&&this.scenarioType){const s=this.scenarioType.slice(0,2).toLowerCase(),h=nt[s]||nt.ac;i=h.lineColor,t=h.dashArray}const s=this.group.polyline(this.upperPoints.map((t=>[t.x,t.y]))).fill("none").stroke({color:i,width:1.5});t&&s.attr("stroke-dasharray",t)}}class lt{constructor(t,i,s,h,e,n,r,o){this.ID_DATA_PREFIX="DATA",this.ID_SCENARIO_PREFIX="SCENARIO",this.ID_RECT="RECT",this.FALLBACK_COLOUR="#000000",this.label=null,this.scenarioLabel=null,this.isVarianceLine=!1,this.dimensions={columnLength:0,xPos:0,yPos:0,labelYPos:0,scenarioLabelXPos:0,scenarioLabelYPos:0,clipped:!1},this.previousDimensions={columnLength:0,xPos:0,yPos:0,labelYPos:0,scenarioLabelXPos:0,scenarioLabelYPos:0,clipped:!1},this.hasData=!1,this.dataPoint=s,this.index=e,this.isPrimaryLine=n,this.position=t,this.LineBarStyles=i.barStyles,this.scenarioGroup=r,this.styles=i,this.LineGroup=r.group().id(r.toString()+"_"+this.ID_RECT),!0!==(null==s?void 0:s.isEmpty())&&(this.hasData=!0,this.dimensions=this.createDimensions(s,e,n),this.label=this.getDataLabel(s),this.scenarioLabel=this.getScenarioLabel(o)),this.previousDimensions=this.createDimensions(h,e-1,n)}setAsVariance(){var t;return this.isVarianceLine=!0,null===(t=this.label)||void 0===t||t.setToVarianceLabel(),this}updateLabelGroup(t){var i;return this.isEmpty()||null===(i=this.label)||void 0===i||i.updateGroup(t),this}draw(t={percent:2,decimal:1},i=new n){if(this.isEmpty())return this;const s=this.getScenarioStyle(),h=this.getFillStyle(s);null!=this.LineGroup&&this.LineGroup.line([[this.previousDimensions.xPos,this.previousDimensions.yPos],[this.dimensions.xPos,this.dimensions.yPos]]).fill(h).stroke({color:"#f06",width:3,linecap:"round"}),this.drawLineDataLabel(t,i),this.drawScenarioLabel()}createDimensions(t,i,s){return{clipped:!1,columnLength:t.getScaledUnit(),xPos:this.position.getColumnPositionX(i,s),yPos:this.position.getColumnPositionY()-t.getScaledUnit(),labelYPos:this.position.getColumnDataLabelPositionY(t.getScaledUnit()),scenarioLabelXPos:this.position.getColumnPositionX(i,s)+this.position.getScenarioLabelPositionOffsetX(s),scenarioLabelYPos:this.position.getColumnPositionY()-t.getScaledUnit()}}getDataLabel(t){let i=V.Bottom;return null!=t.value&&t.value<0&&(i=V.Top),new j(this.scenarioGroup,this.position.getColumnCenterPositionX(this.index),this.position.getColumnDataLabelPositionY(this.dataPoint.getScaledUnit()),this.ID_DATA_PREFIX,t.value,this.styles,i,V.Center)}getScenarioLabel(t){return new j(this.scenarioGroup,0,0,this.ID_SCENARIO_PREFIX,t,this.styles,V.Bottom,V.Left)}convertToSVGStyle(t,i){return null==t&&(t=[]),t.color=t[i]||this.FALLBACK_COLOUR,Object.assign({},t)}drawScenarioLabel(){null==this.scenarioLabel||this.scenarioLabel.isEmpty()||this.isVarianceLine||this.scenarioLabel.setPos(this.dimensions.scenarioLabelXPos,this.dimensions.scenarioLabelYPos).draw(!0)}drawLineDataLabel(t,i=new n){var s;null===(s=this.label)||void 0===s||s.draw(this.isPrimaryLine,t,i)}getFillStyle(t){var i,s,h,e;const n=this.LineBarStyles[this.dataPoint.getScenario()];return(null==n?void 0:n.fillpattern)&&(null===(i=this.styles.pattern.get(n.fillpattern))||void 0===i?void 0:i.pattern)?null===(e=null===(h=null===(s=this.styles)||void 0===s?void 0:s.pattern)||void 0===h?void 0:h.get(n.fillpattern))||void 0===e?void 0:e.pattern:this.convertToSVGStyle(t,"fill")}getScenarioStyle(){var t;return this.isVarianceLine?null===(t=this.styles)||void 0===t?void 0:t.varianceStyles.getSVGStyle(this.dataPoint.getVarianceStyle()):this.LineBarStyles[this.dataPoint.getScenario()]}isEmpty(){return!1===this.hasData||Number.isNaN(this.dataPoint.value)}}class at{constructor(t,i,s,h,e){this.pixelPerUnit=1,this.collisionManager=null,this.overflowConfig=null,this.i18n=e;const n=i.group().id("Scenario1"),r=i.group().id("Scenario2").insertBefore(n);this.svgGroups={parent:i,scenario1:n,scenario2:r,scenario3:i.group().id("Scenario3"),scenario4:i.group().id("Scenario4"),scenario1Label:i.group().id("label")},this.styles=s,this.position=t,this.elementCnt=h}setOverflowConfig(t){this.overflowConfig=t}createLine(t,i,s,h){const e=this.svgGroups.scenario1.group().id(""+h),n=this.svgGroups.scenario1Label.group().id(""+h);let r=null;return this.isLastDataPoint(h-1)&&(r=t),new lt(this.position,this.styles,i,s,h,!1,e,r).updateLabelGroup(n)}createPrimaryBar(t,i){const s=this.svgGroups.scenario1.group().id(""+i),h=this.svgGroups.scenario1Label.group().id(""+i);let e=null;return this.isLastDataPoint(i)&&(e=`${this.i18n.get(t.scenario)||t.scenario}`),new Q(this.position,this.styles,t,i,!0,s,e,this.overflowConfig).updateLabelGroup(h)}createVarianceBar(t,i){const s=this.svgGroups.scenario1.group().id(""+i),h=this.svgGroups.scenario1Label.group().id(""+i);let e=null;return this.isLastDataPoint(i)&&(e=`${this.i18n.get(t.scenario)||t.scenario}`),new Q(this.position,this.styles,t,i,!0,s,e,this.overflowConfig).updateLabelGroup(h).setAsVariance()}createRelativeVarianceBar(t,i){const s=this.svgGroups.scenario1.group().id(""+i),h=this.svgGroups.scenario1Label.group().id(""+i);return new it(this.position,this.styles,t,i,s).updateLabelGroup(h)}createSecondaryBar(t,i){const s=this.svgGroups.scenario2.group().id(""+i);let h=null;return this.isFirstDataPoint(i)&&(h=`${this.i18n.get(t.scenario)||t.scenario}`),new Q(this.position,this.styles,t,i,!1,s,h,this.overflowConfig)}createPrimaryMarker(t,i){const s=this.svgGroups.scenario3.group().id(""+i),h=this.styles.pattern.get("marker-right")||{foreground:"#000000",background:"#ffffff",bgOffset:0};let e=null;return this.isFirstDataPoint(i)&&(e=`${this.i18n.get(t.scenario)||t.scenario}`),new tt(this.position,s,h,t.scenario,this.styles,t,i,e,!0)}createSecondaryMarker(t,i){const s=this.svgGroups.scenario4.group().id(""+i),h=this.styles.pattern.get("marker-left")||{foreground:"#000000",background:"#ffffff",bgOffset:0};let e=null;return this.isLastDataPoint(i)&&(e=`${this.i18n.get(t.scenario)||t.scenario}`),new tt(this.position,s,h,t.scenario,this.styles,t,i,e,!1)}isLastDataPoint(t){return this.elementCnt-1===t}isFirstDataPoint(t){return 0===t}setCollisionManager(t){this.collisionManager=t}moveLabelsToFront(){this.svgGroups.scenario1Label.front()}createLineSeries(t,i){const s=this.svgGroups.parent.group().id("LineSeries_"+i),h=this.svgGroups.scenario1Label.group().id("LineSeries_Label_"+i),e=`${this.i18n.get(i)||i}`;return new ht(this.position,this.styles,t,s,h,i,e,this.i18n,this.collisionManager)}}var ct,ut;!function(t){t[t.UP_TO_DATE=0]="UP_TO_DATE",t[t.DIRTY=1]="DIRTY"}(ct||(ct={})),function(t){t.RELATIVE="dr",t.ABSOLUTE="d",t.NONE=""}(ut||(ut={}));class dt{constructor(t,i,s,h=0){this.CSS_CATEGORIES="categories",this.dataModel=[],this.variancesDataModel=[],this.title="",this.smallestDataPointValue=new z(0,W.AC1,1,W.NEU),this.highestDataPointValue=new z(0,W.AC1,1,W.NEU),this.smallestVarianceDataPointValue=new z(0,W.AC1,1,W.NEU),this.highestVarianceDataPointValue=new z(0,W.AC1,1,W.NEU),this.pixelPerUnit=1,this.pixelPerPercentage=1,this.hideAxisLabels=!1,this.axisScenario=W.AC1,this.preparedDataSet=[],this.axisCategoryArea={width:0,height:0},this.scenariosArea={width:0,height:0},this.state=ct.DIRTY,this.i18n=new Map,this.leftSideOffsetForHorizontalSync=-1,this.dateInterval=S.DAY,this.locale="de",this.axisLabelsMode=y.SMART,this.intervalSpanLimit=32,this.measureScale=new n,this.measureUnit="",this.dataFormatDigits={percent:2,decimal:1},this.showOverlayMedian=!1,this.showOverlayAvg=!1,this.chartMode=k.BAR,this.maxBars=28,this.stackConfig=null,this.lineFullWidth=!0,this.availableWidth=0,this.overflowConfig=null,this.lastScenarios=[],this.initSQLFunctions(),this.ruleSet=t||new o,this.i18n=this.createI18n(new Map),this.styles=s,this.availableWidth=h,this.setConfig(i),this.position=this.createElementPosition(i.scenarios)}updatePosition(t){this.position=this.createElementPosition(t)}initSQLFunctions(){l.fn.transformOperator=function(t){return"-"===t?-1:1},l.fn.normalizeDate=function(t,i){if(void 0!==t&&t.isValid)return t.startOf(i)}}setStyles(t){this.styles=t}setAvailableWidth(t){this.availableWidth=t}setAvailableHeight(t){this.pixelPerUnit<=0||t<=0?this.overflowConfig=null:null==this.stackConfig&&this.determineEffectiveChartMode()===k.BAR?(this.overflowConfig=this.calculateOverflowConfig(t),this.overflowConfig&&this.updatePosition(this.lastScenarios)):this.overflowConfig=null}calculateOverflowConfig(t){const i=(this.isVarianceChart()?this.highestVarianceDataPointValue:this.highestDataPointValue).getScaledUnit();if(i<=0)return null;const s=this.styles.fontStyles.size,h=1.5*s,e=.3*s,n=t-(this.position.dataLabelHeight+this.position.spacings.labelToColumn+this.position.padding.top+this.position.padding.bottom+this.position.spacings.labelToAxis+s)-h-e,r=.8*s;if(n<=r)return null;const o=n-r;return i<=o?null:{cutHeight:n,overdriveZoneHeight:h,breakGap:e,maxOverflow:i-o,scenarioCutOffset:r}}setConfig(t){var i;this.state=ct.DIRTY,this.sortScenariosbyVisualisationRules(t),this.setData([...t.data],t.filter),this.hideAxisLabels=t.hideAxisLabels||!1,this.pixelPerUnit=t.pixelPerUnit,this.pixelPerPercentage=t.pixelPerPercentage,this.axisLabelsMode=t.axisLabelsMode,this.intervalSpanLimit=t.intervalSpanLimit,this.dateInterval=this.findDateInterval(t.dateInterval),this.dataModel=this.populateModel(t.scenarios,this.dateInterval,t.level,t.sortOrder),this.variancesDataModel=this.populateVarianceModel(t.variances,this.dataModel),this.title=t.title||_.translateScenarioLabel(null===(i=null==t?void 0:t.variances)||void 0===i?void 0:i.toString(),this.i18n),this.smallestDataPointValue=this.findSmallestDataPointValue(this.dataModel),this.smallestVarianceDataPointValue=this.findSmallestDataPointValue(this.variancesDataModel),this.highestDataPointValue=this.findHighestDataPointValue(this.dataModel),this.highestVarianceDataPointValue=this.findHighestDataPointValue(this.variancesDataModel),this.axisScenario=this.setAxisScenario(t.variances),this.leftSideOffsetForHorizontalSync=t.leftSideOffsetForHorizontalSync,this.measureScale=t.measureScale,this.measureUnit=t.measureUnit,this.dataFormatDigits=t.dataFormatDigits,this.showOverlayMedian=t.showOverlayMedian,this.showOverlayAvg=t.showOverlayAvg,this.chartMode=t.chartMode,this.maxBars=t.maxBars,this.stackConfig=t.stackConfig,this.lineFullWidth=t.lineFullWidth,this.lastScenarios=t.scenarios,this.updatePosition(t.scenarios)}getFooter(){return 1===this.measureScale.value&&""===this.measureUnit?" ":_.translateScenarioLabel("in",this.i18n)+" "+this.measureScale.prefix+this.measureUnit}sortScenariosbyVisualisationRules(t){const i=this;t.scenarios.sort(((t,s)=>i.ruleSet.getScenarioSorIndex(t)-i.ruleSet.getScenarioSorIndex(s))).reverse()}setI18n(t){this.i18n=this.createI18n(t)}setData(t,i){if(null!=t)if(this.state=ct.DIRTY,this.preparedDataSet.length=0,null!=i&&i.length>0)try{this.preparedDataSet=l(`SELECT * FROM ? WHERE ${i}`,[t])}catch(s){console.error("TimeChart: filter query failed, using unfiltered data",i,s),this.preparedDataSet=t}else this.preparedDataSet=t}getAllocatedCanvasWidth(){const t=this.position.getAxisEndPositionX(),i=3*this.styles.fontStyles.size,s=Math.max(this.axisCategoryArea.width,this.scenariosArea.width);return Math.max(t+i,s>0?s+this.position.leftSideLabelLength:0)}getAllocatedCanvasHeight(){if(null==this.smallestVarianceDataPointValue.value||null==this.highestVarianceDataPointValue.value||null==this.smallestDataPointValue.value||null==this.highestDataPointValue.value)return 0;const t=this.isVarianceChart()&&this.variancesDataModel.some((t=>t.type===ut.RELATIVE)),i=this.position.getAxisPositionY(t),s=this.position.spacings.labelToAxis+this.position.dataLabelHeight+this.styles.padding.bottom;let h;if(this.isOnSameAxisSide())h=i+s;else{const t=this.isVarianceChart()?this.smallestVarianceDataPointValue:this.smallestDataPointValue;h=i+Math.abs(t.getScaledUnit())+this.position.spacings.labelToColumn+this.position.dataLabelHeight+s}const e=this.isOnSameAxisSide();return Math.max(h,e?this.axisCategoryArea.height+this.scenariosArea.height:this.scenariosArea.height)}toString(){const t=new e;return this.draw(t),t.id("drawCanvas"),t.width(this.getAllocatedCanvasWidth()),t.height(this.getAllocatedCanvasHeight()),t.attr("overflow","visible"),t.svg()}draw(t){this.cleanSVGforRedraw(t),this.state===ct.DIRTY&&(this.state=ct.UP_TO_DATE),this.isVarianceChart()?(this.drawVarianceScenario(this.variancesDataModel,t),this.drawAxisAndLabels(this.variancesDataModel,t)):null!=this.stackConfig?this.determineEffectiveChartMode()===k.LINE?(this.drawStackedAreaScenarios(this.dataModel,t),this.drawAxisAndLabelsForLineChart(this.dataModel,t)):(this.drawStackedScenarios(this.dataModel,t),this.drawStackedHeaders(this.dataModel,t),this.drawAxisAndLabels(this.dataModel,t)):this.determineEffectiveChartMode()===k.LINE?(this.drawLineScenarios(this.dataModel,t),this.drawAxisAndLabelsForLineChart(this.dataModel,t)):(this.drawScenarios(this.dataModel,t),this.drawOverlayLayer(this.dataModel,t),this.drawAxisAndLabels(this.dataModel,t))}determineEffectiveChartMode(){return this.chartMode===k.LINE||this.chartMode===k.AUTO&&this.dataModel.length>this.maxBars?k.LINE:k.BAR}setPattern(t,i){this.styles.pattern.set(t,i)}hasNoData(){return 0===this.dataModel.length}isOnSameAxisSide(){return null!=this.smallestVarianceDataPointValue.value&&null!=this.highestVarianceDataPointValue.value&&null!=this.smallestDataPointValue.value&&null!=this.highestDataPointValue.value&&(this.isVarianceChart()?Math.sign(this.smallestVarianceDataPointValue.value)===Math.sign(this.highestVarianceDataPointValue.value)||0===this.smallestDataPointValue.value&&1===Math.sign(this.highestDataPointValue.value):Math.sign(this.smallestDataPointValue.value)===Math.sign(this.highestDataPointValue.value)||0===this.smallestDataPointValue.value&&1===Math.sign(this.highestDataPointValue.value))}createI18n(t){this.state=ct.DIRTY;const i=new Map([["SEPERATOR_WS",", "],["in","in"],["ORDER_asc","↑"],["ORDER_desc","↓"],["ac1","AC"],["pp1","PY"],["fc1","FC"],["pl1","PL"],["ac2","AC2"],["pp2","PY2"],["fc2","FC2"],["pl2","PL2"],["ac3","AC3"],["pp3","PY3"],["fc3","FC3"],["pl3","PL3"],["ac4","AC4"],["pp4","PY4"],["fc4","FC4"],["pl4","PL4"],["category"," "],["operation"," "],["there_of","davon"],["part_of","in % von"],["ibcssymbol_delta_ac","Δ{%}"],["ibcssymbol_delta_generic","Δ({%})"],["ibcssymbol_delta_ac_relative","Δ{%}%"],["ibcssymbol_delta_generic_relative","Δ({%})%"],["SUM_TOTAL","❖"]]);return new Map([...i,...t])}createElementPosition(t){let i;const s=$(t.filter(((t,i)=>1===i||2===i)).map((t=>_.translateScenarioLabel(t,this.i18n))).reduce(((t,i)=>t.length<i.length?i:t),""),{font:this.styles.fontStyles.font,fontSize:this.styles.fontStyles.size+"px"}).width,h=this.calculateTitleLength(this.leftSideOffsetForHorizontalSync);let e,n;if(i=s>h?s:h,null!=this.position&&(i+=this.position.spacings.labelToColumn),this.leftSideOffsetForHorizontalSync>-1&&(i=this.leftSideOffsetForHorizontalSync),this.isVarianceChart()?(e=this.smallestVarianceDataPointValue,n=this.highestVarianceDataPointValue):(e=this.smallestDataPointValue,n=this.highestDataPointValue),this.overflowConfig){const{cutHeight:t,overdriveZoneHeight:i,breakGap:s}=this.overflowConfig;n=new z(t+i+s,n.scenario,1,n.variance)}let r=this.styles.scaleFactors;const o=this.determineEffectiveChartMode();if(this.lineFullWidth&&this.availableWidth>0&&this.dataModel.length>0&&!this.isVarianceChart()&&o===k.LINE){const t=this.styles.fontStyles.size,s=this.styles.padding,h=this.styles.scaleFactors,e=this.availableWidth-(s.left+s.right+t*h.scenarioOffset+i+t*h.columnWidth);if(e>0){const i=Math.max(e/this.dataModel.length/t,1.2*h.columnWidth),s=new E;Object.assign(s,h),s.categoryWidth=i,r=s}}return new N(new R(this.styles.padding),r,this.styles.fontStyles,e,n,this.dataModel.length,i)}calculateTitleLength(t){let i="_______";i.length<this.title.length&&(i=this.title);const s=$(i,{font:this.styles.fontStyles.font,fontSize:this.styles.fontStyles.size+"px"}).width;return s<t?t:s}setAxisScenario(t){let i=W.AC1;if(null!=t&&t.length>0){const s=new D(t.toString());s.isValid&&(i=s.delta)}return null===i&&(i=W.AC1),i}populateModel(t,i,s,h){var e;if(0===(null===(e=this.preparedDataSet)||void 0===e?void 0:e.length))return[];let n=this.queryDataSet(i,"","");return this.detectNaNCells(t,n),n=this.leftOuterJoinDates(n,i),this.createDataRows(n,t)}detectNaNCells(t,i){i.forEach((i=>(t.forEach((t=>{const s=new D(t);!0===s.isValid?0!==i[s.base+"_cnt"]&&0!==i[s.delta+"_cnt"]||(i[t]=Number.NaN):0===i[t+"_cnt"]&&(i[t]=Number.NaN)})),i)))}findDateInterval(t){var i,s,h;if(t!==S.AUTO)return t;const e=this.queryMinMaxDates();let n=S.DAY;return null!=(null===(i=e[0])||void 0===i?void 0:i.mindate)&&(n=(new M).calculateDistanceType(null===(s=e[0])||void 0===s?void 0:s.mindate,null===(h=e[0])||void 0===h?void 0:h.maxdate,this.intervalSpanLimit)),n}queryMinMaxDates(){var t,i,s,h;const e=l("SELECT MAX(date) as maxdate, MIN(date) as mindate FROM ?",[this.preparedDataSet]);return null!=(null===(t=e[0])||void 0===t?void 0:t.mindate)&&(e[0].mindate=L.fromMillis(null===(i=e[0])||void 0===i?void 0:i.mindate)),null!=(null===(s=e[0])||void 0===s?void 0:s.maxdate)&&(e[0].maxdate=L.fromMillis(null===(h=e[0])||void 0===h?void 0:h.maxdate)),e}queryDataSet(t,i,s){const h=`normalizeDate([date], '${t}' , '${this.locale}') as calcdate`;return l(`SELECT p.calcdate ${i},\n ${["ac1","ac2","ac3","ac4","pp1","pp2","pp3","pp4","fc1","fc2","fc3","fc4","pl1","pl2","pl3","pl4"].map((t=>`SUM(${t} * transformOperator(operation)) as ${t}, COUNT(ISNULL(${t})) as ${t}_cnt`)).join(",")} \n \n FROM (SELECT ${h} ${i},\n ac1,\n ac2,\n ac3,\n ac4,\n pp1,\n pp2,\n pp3,\n pp4,\n fc1,\n fc2,\n fc3,\n fc4,\n pl1,\n pl2,\n pl3,\n pl4\n FROM ?) as p\n GROUP BY calcdate ${s}\n ORDER BY calcdate asc`,[this.preparedDataSet])}createDataRows(t,i){const s=[];return t.forEach(((t,h)=>{s.push({id:h,category:t.category,type:ut.NONE,date:t.calcdate,scenario1:new z(t[i[0]],i[0],this.pixelPerUnit,W.NEU),scenario2:new z(t[i[1]],i[1],this.pixelPerUnit,W.NEU),scenario3:new z(t[i[2]],i[2],this.pixelPerUnit,W.NEU),scenario4:new z(t[i[3]],i[3],this.pixelPerUnit,W.NEU)})})),s}findSmallestDataPointValue(t){const i=this.isVarianceChart()?this.pixelPerPercentage:this.pixelPerUnit;let s=new z(0,"default",i,W.NEU);for(const i of t)for(const t of[i.scenario1,i.scenario2,i.scenario3,i.scenario4])t&&null!=t.value&&t.value<Number(s.value)&&(s=t);return s}findHighestDataPointValue(t){const i=this.isVarianceChart()?this.pixelPerPercentage:this.pixelPerUnit;let s=new z(0,"default",i,W.NEU);for(const i of t)for(const t of[i.scenario1,i.scenario2,i.scenario3,i.scenario4])null!=t&&t.value>Number(s.value)&&(s=t);return s}populateVarianceModel(t,i){const s=[];if(null==t||0===t.length)return s;let h=null;null!=i&&i.length>0&&(h=i[0]);for(const e in t){const n=new D(t[e]);if(n.isValid){const t=this.mapScenarios(n,h),e=n.direction,r="dr"===n.type?this.pixelPerPercentage:this.pixelPerUnit;for(const h in i)s.push({id:Number(h),category:i[h].category,type:"dr"===n.type?ut.RELATIVE:ut.ABSOLUTE,date:i[h].date,scenario1:new z(this.calculateVariance(n,i[h],t),n.delta,r,e),scenario2:new z(null,null,null,null),scenario3:new z(null,null,null,null),scenario4:new z(null,null,null,null)})}}return s}calculateVariance(t,i,s){const h=s.get(t.base),e=s.get(t.delta);return null==h||null==e||null==i[h].value||null==i[e].value?null:t.type===ut.RELATIVE?(i[h].value-i[e].value)/i[e].value:i[h].value-i[e].value}mapScenarios(t,i){const s=new Map;return null==i||["scenario1","scenario2","scenario3","scenario4"].forEach((h=>{i[h].scenario===t.delta?s.set(t.delta,h):i[h].scenario===t.base&&s.set(t.base,h)})),s}cleanSVGforRedraw(t){t.clear()}isVarianceChart(){return this.variancesDataModel&&this.variancesDataModel.length>0}createDateFactory(){return new M}drawAxisAndLabels(t,i){const s=this.createDateFactory(),h=i.group().id("AxisAndDateLables");let e=!1;if(!1===this.hideAxisLabels)t.forEach(((t,i)=>{let n=V.Top,r=this.position.spacings.labelToAxis;t.scenario1.value<0&&(n=V.Bottom,r*=-1),t.type===ut.RELATIVE&&(e=!0);let o=s.getDateString(t.date,this.dateInterval);this.axisLabelsMode===y.SMART?(o=s.getSmartDateString(t.date,this.dateInterval),0===i&&this.dateInterval!==S.YEAR&&(o=s.getShortDateString(t.date,this.dateInterval))):this.axisLabelsMode===y.SHORT&&(o=s.getShortDateString(t.date,this.dateInterval)),new j(h,this.position.getColumnCenterPositionX(i),this.position.getAxisPositionY(e)+r,"",o,this.styles,n,V.Center).forceStringTypeDraw()}));else{const i=null==t?void 0:t[0];i&&i.type===ut.RELATIVE&&(e=!0)}new J({scenarioType:this.axisScenario,labelText:this.title,isRelative:e},this.position,h).draw(),this.axisCategoryArea={height:h.height(),width:h.width()}}drawScenarios(t,i){const s=i.group().id("Scenarios"),h=new at(this.position,s,this.styles,t.length,this.i18n);h.setOverflowConfig(this.overflowConfig);let e=!1;t.forEach(((t,i)=>{h.createPrimaryBar(t.scenario1,i).draw(this.dataFormatDigits,this.measureScale),h.createSecondaryBar(t.scenario2,i).draw(),h.createPrimaryMarker(t.scenario3,i).draw(),h.createSecondaryMarker(t.scenario4,i).draw(),!1===t.scenario1.isEmpty()&&(e=!0)}));let n=0;!1===e&&(n=this.isOnSameAxisSide()?this.position.dataLabelHeight:2*this.position.dataLabelHeight),this.scenariosArea={height:s.height()+this.styles.padding.top+this.styles.padding.bottom+n,width:s.width()+this.position.spacings.columnWidth}}drawLineScenarios(t,i){var s,h;const e=i.group().id("LineScenarios"),n=new I,r=new at(this.position,e,this.styles,t.length,this.i18n);r.setCollisionManager(n);const o=["ac1","pp1","fc1","pl1"],l=[[],[],[],[]];t.forEach(((t,i)=>{["scenario1","scenario2","scenario3","scenario4"].forEach(((s,h)=>{t[s]&&l[h].push({dataPoint:t[s],index:i})}))}));const a=[];for(let t=0;t<l.length;t++){const i=l[t];if(i.length>0&&i.some((t=>!t.dataPoint.isEmpty()))){const e=(null===(h=null===(s=i[0])||void 0===s?void 0:s.dataPoint)||void 0===h?void 0:h.scenario)||o[t],n=e.slice(0,2).toLowerCase();a.push({points:i,scenarioName:e,scenarioType:n})}}a.sort(((t,i)=>(X[i.scenarioType]||99)-(X[t.scenarioType]||99)));const c=[];for(const t of a){const i=r.createLineSeries(t.points,t.scenarioName);c.push({series:i,scenarioType:t.scenarioType})}for(const t of c)t.series.drawGeometry();r.moveLabelsToFront();const u=[...c].sort(((t,i)=>(X[t.scenarioType]||99)-(X[i.scenarioType]||99)));for(const t of u)t.series.drawLabels(this.dataFormatDigits,this.measureScale);const d=this.position.getColumnPositionY();this.scenariosArea={height:Math.max(e.height()+this.styles.padding.top,d)+this.styles.padding.bottom,width:e.width()+this.position.spacings.columnWidth}}drawAxisAndLabelsForLineChart(t,i){const s=this.createDateFactory(),h=i.group().id("AxisAndDateLabelsLine"),e=!1,n=t.length-1;!1===this.hideAxisLabels&&t.forEach(((i,r)=>{if(!this.shouldShowLineChartAxisLabel(t,r))return;let o,l=V.Top,a=this.position.spacings.labelToAxis;i.scenario1.value<0&&(l=V.Bottom,a*=-1),this.lineFullWidth&&this.availableWidth>0?this.axisLabelsMode===y.SMART?(o=s.getSmartDateString(i.date,this.dateInterval),0===r&&this.dateInterval!==S.YEAR&&(o=s.getShortDateString(i.date,this.dateInterval))):o=this.axisLabelsMode===y.SHORT?s.getShortDateString(i.date,this.dateInterval):s.getDateString(i.date,this.dateInterval):o=s.getShortDateString(i.date,this.dateInterval),new j(h,this.position.getColumnCenterPositionX(r),this.position.getAxisPositionY(e)+a,"",o,this.styles,l,V.Center).forceStringTypeDraw(),r>0&&r<n&&this.isYearChange(t,r)&&this.drawYearSeparatorLine(h,r,e)})),new J({scenarioType:this.axisScenario,labelText:this.title,isRelative:e},this.position,h).draw(),this.axisCategoryArea={height:h.height(),width:h.width()}}shouldShowLineChartAxisLabel(t,i){return!!(this.lineFullWidth&&this.availableWidth>0)||(0===i||i===t.length-1||this.isYearChange(t,i))}isYearChange(t,i){var s,h;if(0===i)return!1;const e=null===(s=t[i])||void 0===s?void 0:s.date,n=null===(h=t[i-1])||void 0===h?void 0:h.date;return!(!e||!n)&&e.year!==n.year}drawYearSeparatorLine(t,i,s){const h=this.position.getColumnCenterPositionX(i)-this.position.spacings.columnWidth/2,e=this.position.columnValue.max.getScaledUnit()+this.position.dataLabelHeight,n=this.position.getAxisPositionY(s)-e,r=this.position.getAxisPositionY(s);t.line([[h,n],[h,r]]).stroke({color:"#999999",width:1,dasharray:"4,4"}).attr("stroke-dasharray","4,4")}drawVarianceScenario(t,i){const s=i.group().id("Scenarios"),h=new at(this.position,s,this.styles,t.length,this.i18n);return h.setOverflowConfig(this.overflowConfig),t.forEach(((t,i)=>{t.type===ut.RELATIVE?h.createRelativeVarianceBar(t.scenario1,i).draw():h.createVarianceBar(t.scenario1,i).draw(this.dataFormatDigits,this.measureScale)})),this.scenariosArea={height:s.height()+this.styles.padding.top+this.styles.padding.bottom,width:s.width()+this.position.spacings.columnWidth},s}drawStackedScenarios(t,i){if(!this.stackConfig)return;const s=i.group().id("StackedScenarios"),h=this.stackConfig.by===C.SCENARIOS;t.forEach(((t,i)=>{const e=["scenario1","scenario2","scenario3","scenario4"],n=[];if(h)for(const i of e){const s=t[i];s&&!s.isEmpty()&&null!=s.value&&n.push({value:s.value,scenario:s.scenario,dataPoint:s})}else{const i=t.scenario1;i&&!i.isEmpty()&&null!=i.value&&n.push({value:i.value,scenario:i.scenario,dataPoint:i})}if(0!==n.length)if((h?new Set(n.map((t=>a(t.scenario)))):new Set).size>1){const t=new Map;for(const i of n){const s=a(i.scenario);t.has(s)||t.set(s,[]),t.get(s).push(i)}const h=[];for(const i of c)t.has(i)&&(h.push({prefix:i,segments:t.get(i)}),t.delete(i));for(const[i,s]of t)h.push({prefix:i,segments:s});h.forEach(((t,e)=>{const n=t.segments.reduce(((t,i)=>t+Math.abs(i.value)),0),r=h.length-1-e;let o=0,l=null;t.segments.forEach((t=>{const h=new et(this.position,this.styles,t.dataPoint,i,o,t.scenario,r,this.stackConfig.mode,n,!0,s);h.draw(this.dataFormatDigits,this.measureScale),o+=Math.abs(t.value),l=h})),l&&l.drawTotalLabel(this.dataFormatDigits,this.measureScale)}))}else{"asc"===this.stackConfig.order?n.sort(((t,i)=>t.value-i.value)):"desc"===this.stackConfig.order&&n.sort(((t,i)=>i.value-t.value));const t=n.reduce(((t,i)=>t+Math.abs(i.value)),0);let e=0,r=null;n.forEach(((n,o)=>{const l=new et(this.position,this.styles,n.dataPoint,i,e,n.scenario,o,this.stackConfig.mode,t,h,s);l.draw(this.dataFormatDigits,this.measureScale),e+=Math.abs(n.value),r=l})),r&&r.drawTotalLabel(this.dataFormatDigits,this.measureScale)}})),this.scenariosArea={height:s.height()+this.styles.padding.top+this.styles.padding.bottom,width:s.width()+this.position.spacings.columnWidth}}drawStackedHeaders(t,i){if(!this.stackConfig||0===t.length)return;if(this.stackConfig.by!==C.SCENARIOS)return;const s=i.group().id("StackedHeaders"),h=t[0],e=["scenario1","scenario2","scenario3","scenario4"],n=[];for(const t of e){const i=h[t];i&&!i.isEmpty()&&null!=i.value&&n.push({value:i.value,scenario:i.scenario,dataPoint:i})}if(0===n.length)return;const r=new Set(n.map((t=>a(t.scenario)))),o=this.position.getColumnPositionY(),l=this.position.getColumnCenterPositionX(0)-this.position.getColumnWidth()/2-this.position.spacings.labelToColumn;if(r.size>1){const t=new Map;for(const i of n){const s=a(i.scenario);t.has(s)||t.set(s,[]),t.get(s).push(i)}const i=[];for(const s of c)t.has(s)&&(i.push({prefix:s,segments:t.get(s)}),t.delete(s));for(const[s,h]of t)i.push({prefix:s,segments:h});i.forEach((t=>{const i=t.segments.reduce(((t,i)=>t+Math.abs(i.value)),0),h=t.segments[0].dataPoint.pixelPerUnit,e=o-(this.stackConfig.mode===P.RELATIVE?h:i*h)/2,n=this.i18n.get(t.prefix+"1")||t.prefix.toUpperCase();new j(s,l,e,"STACK_HEADER",n,this.styles,V.Center,V.Right).forceStringTypeDraw()}))}else{"asc"===this.stackConfig.order?n.sort(((t,i)=>t.value-i.value)):"desc"===this.stackConfig.order&&n.sort(((t,i)=>i.value-t.value));const t=n.reduce(((t,i)=>t+Math.abs(i.value)),0),i=n[0].dataPoint.pixelPerUnit;let h=0;n.forEach((e=>{let n;n=this.stackConfig.mode===P.RELATIVE?(0!==t?Math.abs(e.value)/t:0)*i:Math.abs(e.value*i);const r=o-h-n/2,a=this.i18n.get(e.scenario)||e.scenario;new j(s,l,r,"STACK_HEADER",a,this.styles,V.Center,V.Right).forceStringTypeDraw(),h+=n}))}}drawStackedAreaScenarios(t,i){if(!this.stackConfig)return;const s=i.group().id("StackedAreaScenarios"),h=this.stackConfig.by===C.SCENARIOS,e=this.stackConfig.mode,n=["scenario1","scenario2","scenario3","scenario4"];if(0===(h?n.filter((i=>t.some((t=>t[i]&&!t[i].isEmpty())))).length:1))return;const r=[],o=[],l=[];for(const i of n)t.some((t=>t[i]&&!t[i].isEmpty()))&&l.push(i);for(let i=0;i<l.length;i++){const s=l[i],h=[];for(let n=0;n<t.length;n++){const o=t[n][s],a=o&&!o.isEmpty()&&null!=o.value?o.value:0,c=i>0?r[i-1][n]:0;if(e===P.RELATIVE){const i=l.reduce(((i,s)=>{const h=t[n][s];return i+(h&&!h.isEmpty()&&null!=h.value?Math.abs(h.value):0)}),0),s=0!==i?Math.abs(a)/i:0;h.push(c+s)}else h.push(c+a)}r.push(h);const n=t[0][s];o.push((null==n?void 0:n.scenario)||"ac1")}const a=this.position.getColumnPositionY(),c=this.pixelPerUnit,u=t=>t.map(((t,i)=>({x:this.position.getColumnCenterPositionX(i),y:a-t*c}))),d=t.map(((t,i)=>({x:this.position.getColumnCenterPositionX(i),y:a})));for(let t=0;t<r.length;t++){const i=u(r[t]),e=0===t?d:u(r[t-1]),n=new ot(s,i,e,h?o[t]:null,t,h);n.draw(),n.drawBoundaryLine()}this.scenariosArea={height:s.height()+this.styles.padding.top+this.styles.padding.bottom,width:s.width()+this.position.spacings.columnWidth}}drawOverlayLayer(t,i){const s=i.group().id("Overlay"),h=new at(this.position,s,this.styles,t.length,this.i18n);if(!0===this.showOverlayAvg){let i=null;const s=function(t){const i=t.reduce(((t,i)=>{var s;return t+((null===(s=i.scenario1)||void 0===s?void 0:s.value)||0)}),0),s=t.filter((t=>{var i;return void 0!==(null===(i=t.scenario1)||void 0===i?void 0:i.value)})).length,h=s>0?i/s:0,e=Object.assign(Object.assign({},t[0]),{scenario1:new z(h,t[0].scenario1.scenario,t[0].scenario1.pixelPerUnit,t[0].scenario1.variance)}),n=Object.assign(Object.assign({},t[t.length-1]),{scenario1:new z(h,t[t.length-1].scenario1.scenario,t[t.length-1].scenario1.pixelPerUnit,t[t.length-1].scenario1.variance)});return[e,...t.map((t=>Object.assign(Object.assign({},t),{scenario1:new z(h,t.scenario1.scenario,t.scenario1.pixelPerUnit,t.scenario1.variance)}))),n]}(t);s.forEach(((t,s)=>{null!=i&&h.createLine(`Ø ${this.i18n.get(t.scenario1.scenario)||t.scenario1.scenario}`,t.scenario1,i,s-1).draw(this.dataFormatDigits,this.measureScale),i=t.scenario1}))}if(!0===this.showOverlayMedian){let i=null;const s=function(t){const i=t.map((t=>{var i;return null===(i=t.scenario1)||void 0===i?void 0:i.value})).filter((t=>void 0!==t)).sort(((t,i)=>t-i)),s=i.length%2==0?(i[i.length/2-1]+i[i.length/2])/2:i[Math.floor(i.length/2)],h=Object.assign(Object.assign({},t[0]),{scenario1:new z(s,t[0].scenario1.scenario,t[0].scenario1.pixelPerUnit,t[0].scenario1.variance)}),e=Object.assign(Object.assign({},t[t.length-1]),{scenario1:new z(s,t[t.length-1].scenario1.scenario,t[t.length-1].scenario1.pixelPerUnit,t[t.length-1].scenario1.variance)});return[h,...t.map((t=>Object.assign(Object.assign({},t),{scenario1:new z(s,t.scenario1.scenario,t.scenario1.pixelPerUnit,t.scenario1.variance)}))),e]}(t);s.forEach(((t,s)=>{null!=i&&h.createLine(`Mdn ${this.i18n.get(t.scenario1.scenario)||t.scenario1.scenario}`,t.scenario1,i,s-1).draw(this.dataFormatDigits,this.measureScale),i=t.scenario1}))}}leftOuterJoinDates(t,i){const s=L.max(...t.map((function(t){return t.calcdate}))),h=L.min(...t.map((function(t){return t.calcdate}))),e=(new M).datesBetween(h,s,i,this.intervalSpanLimit),n=new Map;return e.forEach(((t,i)=>{n.set(t.toISO(),{id:i,calcdate:t,category:null,ac1:null,ac2:null,ac3:null,ac4:null,pp1:null,pp2:null,pp3:null,pp4:null,fc1:null,fc2:null,fc3:null,fc4:null,pl1:null,pl2:null,pl3:null,pl4:null,isEmpty:!0})})),t.forEach((t=>{const i=t.calcdate.toISO(),s=n.get(i);s&&s.isEmpty&&n.set(i,{id:s.id,calcdate:t.calcdate,category:t.category,ac1:t.ac1,ac2:t.ac2,ac3:t.ac3,ac4:t.ac4,pp1:t.pp1,pp2:t.pp2,pp3:t.pp3,pp4:t.pp4,fc1:t.fc1,fc2:t.fc2,fc3:t.fc3,fc4:t.fc4,pl1:t.pl1,pl2:t.pl2,pl3:t.pl3,pl4:t.pl4,isEmpty:!1})})),Array.from(n.values())}}class ft{constructor(t,i){this.data=t,this.scenarios=i,this.variances=[],this.title="",this.hideAxisLabels=!1,this.pixelPerUnit=10,this.pixelPerPercentage=50,this.limit=0,this.sortOrder=new A(new d).default(),this.level=O.CATEGORY,this.leftSideOffsetForHorizontalSync=-1,this.dateInterval=S.AUTO,this.axisLabelsMode=y.SMART,this.intervalSpanLimit=28,this.filter="",this.measureScale=new n,this.measureUnit="",this.showMeasureScale=!0,this.dataFormatDigits={decimal:1,percent:2},this.showOverlayMedian=!0,this.showOverlayAvg=!0,this.chartMode=k.BAR,this.maxBars=28,this.stackConfig=null,this.lineFullWidth=!0}}class pt{constructor(t,i,s,h,e){this.dataRowAdapter=t,this.orderAdapter=i,this.stringAdapter=s,this.dataFormatDigitsAdapter=h,this.dataSet=e}adapt(t){const i=x.adaptArray(t.data,this.dataRowAdapter),s=x.adaptArray(t.scenarios,this.stringAdapter),h=new ft(i,s);return m.isArray(t.variances)&&(h.variances=x.adaptArray(t.variances,this.stringAdapter)),m.isString(t.title)&&(h.title=t.title),m.isBoolean(t.hideAxisLabels)&&(h.hideAxisLabels=t.hideAxisLabels),m.isNumber(t.pixelPerUnit)&&(h.pixelPerUnit=t.pixelPerUnit),m.isNumber(t.pixelPerPercentage)&&(h.pixelPerPercentage=t.pixelPerPercentage),m.isNumber(t.limit)&&(h.limit=t.limit),m.isExisting(t.sortOrder)&&(h.sortOrder=this.orderAdapter.adapt(t.sortOrder)),m.isExisting(t.level)&&(h.level=t.level),m.isExisting(t.dateInterval)&&(h.dateInterval=t.dateInterval),m.isExisting(t.axisLabelsMode)&&(h.axisLabelsMode=t.axisLabelsMode),m.isNumber(t.leftSideOffsetForHorizontalSync)&&(h.leftSideOffsetForHorizontalSync=t.leftSideOffsetForHorizontalSync),m.isNumber(t.intervalSpanLimit)&&(h.intervalSpanLimit=t.intervalSpanLimit),m.isString(t.filter)&&(h.filter=t.filter),m.isExisting(t.measureScale)&&(h.measureScale=u.calculateMeasureScale(this.dataSet,h.scenarios,t.measureScale)),m.isString(t.measureUnit)&&(h.measureUnit=t.measureUnit),m.isBoolean(t.showMeasureScale)&&(h.showMeasureScale=t.showMeasureScale),m.isExisting(t.dataFormatDigits)&&(h.dataFormatDigits=this.dataFormatDigitsAdapter.adapt(t.dataFormatDigits)),m.isBoolean(t.showOverlayAvg)&&(h.showOverlayAvg=t.showOverlayAvg),m.isBoolean(t.showOverlayMedian)&&(h.showOverlayMedian=t.showOverlayMedian),m.isExisting(t.chartMode)&&(h.chartMode=t.chartMode),m.isNumber(t.maxBars)&&(h.maxBars=t.maxBars),m.isExisting(t.stackConfig)&&(h.stackConfig=t.stackConfig),m.isBoolean(t.lineFullWidth)&&(h.lineFullWidth=t.lineFullWidth),h}default(){return new ft([],[])}}const wt=class{constructor(i){t(this,i),this.data=[],this.scenarios=[],this.variances=[],this.hideAxisLabels=!1,this.pixelPerUnit=2,this.pixelPerPercentage=50,this.limit=0,this.leftSideOffsetForHorizontalSync=-1,this.i18n=new Map,this.order={hierarchy:[],direction:T.ASC},this.level=O.CATEGORY,this.dateInterval=S.AUTO,this.intervalSpanLimit=28,this.axisLabelsMode=y.SMART,this.filter="",this.measureScale="_",this.measureUnit="",this.showMeasureScale=!0,this.showOverlayMedian=!1,this.showOverlayAvg=!1,this.chartMode=k.BAR,this.maxBars=28,this.stackConfig=null,this.lineFullWidth=!0,this.containerWidth=0,this.dataFormatDigits={percent:2,decimal:1},this.parentDimensions={width:0,height:0}}render(){var t,h,e;if(void 0===this.chart)return i(s,null);if(this.chart.hasNoData()){const t=this.i18n.get("NO_DATA")||"==No Data==";return i(s,null,i("p",{class:"warning"},t))}return i(s,null,i("div",{innerHTML:null===(t=this.pattern)||void 0===t?void 0:t.toString(),class:"hidePatternContainer"}),i("div",{class:this.showMeasureScale?"footer":"footer-hide"},null===(h=this.chart)||void 0===h?void 0:h.getFooter()),i("div",{innerHTML:null===(e=this.chart)||void 0===e?void 0:e.toString()}))}async componentWillLoad(){var t;const i=this.prepareConfig(),s=this.prepareStyle(),h=this.containerWidth||0;this.chart=new dt(new o,i,s,h),this.chart.setI18n(this.i18n),this.autoFitScaling(i,s),this.chart.setAvailableHeight((null===(t=this.parentDimensions)||void 0===t?void 0:t.height)||0),this.pattern=new F(this.chart.styles),this.chart.setPattern("fc",this.pattern.getFCPolygonPattern())}async componentWillUpdate(){var t;if(null==this.chart)return;const i=this.prepareConfig(),s=this.prepareStyle();this.chart.setI18n(this.i18n),this.chart.setStyles(s),this.chart.setAvailableWidth(this.containerWidth||0),this.chart.setConfig(i),this.autoFitScaling(i,s),this.chart.setAvailableHeight((null===(t=this.parentDimensions)||void 0===t?void 0:t.height)||0),this.pattern=new F(this.chart.styles),this.chart.setPattern("fc",this.pattern.getFCPolygonPattern())}autoFitScaling(t,i){var s;if(t.pixelPerUnit>0)return;const h=null===(s=this.parentDimensions)||void 0===s?void 0:s.height,e=this.containerWidth||0;if(!h||h<=0)return t.pixelPerUnit=1,this.chart=new dt(new o,t,i,e),void this.chart.setI18n(this.i18n);t.pixelPerUnit=1,this.chart=new dt(new o,t,i,e),this.chart.setI18n(this.i18n),this.chart.toString();const n=this.chart.getAllocatedCanvasHeight();n<=0||(t.pixelPerUnit=.9*h/n,this.chart=new dt(new o,t,i,e),this.chart.setI18n(this.i18n))}async componentWillRender(){}componentDidLoad(){}componentDidUpdate(){}prepareConfig(){return new pt(new q,new A(new d),new d,new f,this.data).adapt({data:this.data,scenarios:this.scenarios,variances:this.variances,title:this.chartTitle,hideAxisLabels:this.hideAxisLabels,pixelPerUnit:this.pixelPerUnit,pixelPerPercentage:this.pixelPerPercentage,level:this.level,dateInterval:this.dateInterval,axisLabelsMode:this.axisLabelsMode,limit:this.limit,sortOrder:this.order,leftSideOffsetForHorizontalSync:this.leftSideOffsetForHorizontalSync,intervalSpanLimit:this.intervalSpanLimit,filter:this.filter,measureScale:this.measureScale,measureUnit:this.measureUnit,showMeasureScale:this.showMeasureScale,dataFormatDigits:this.dataFormatDigits,showOverlayMedian:this.showOverlayMedian,showOverlayAvg:this.showOverlayAvg,chartMode:this.chartMode,maxBars:this.maxBars,stackConfig:this.stackConfig,lineFullWidth:this.lineFullWidth})}prepareStyle(){return new Z(new Y,new p,new w(new v),new b(new v),new g).adapt(this.styles)}get element(){return h(this)}};wt.style=':host{position:relative;display:inline-block}.categories{text-align:right;font-size:var(--bn-font-size, 1em);font-family:var(--bn-font-family, "Noto Sans", "Helvetica Neue", Helvetica, sans-serif);color:var(--bn-font-color, black)}.label-bg{fill:var(--bn-font-background, white);opacity:0.7}.label-text{text-align:right;font-size:var(--bn-font-size, 1em);font-family:var(--bn-font-family, "Noto Sans", "Helvetica Neue", Helvetica, sans-serif);color:var(--bn-font-color, black)}.axis-title{text-align:center;font-family:var(--bn-font-family, "Noto Sans", "Helvetica Neue", Helvetica, sans-serif);color:var(--bn-font-color, black)}.axis-default{stroke:black;stroke-width:0.1em}.axis-ac{stroke:black;stroke-width:0.1em}.axis-pp{stroke:grey;stroke-width:0.1em}.axis-fc{stroke:black;stroke-dasharray:2;stroke-width:0.1em}.axis-pl{stroke:white;stroke-width:0.1em;outline-offset:0em;outline:0.1em solid black}canvas{image-rendering:-moz-crisp-edges;image-rendering:-webkit-crisp-edges;image-rendering:pixelated;image-rendering:crisp-edges}.measure{font-weight:bold}span{display:inline-block}.hidePatternContainer{height:0;width:0}div{float:left}.hide{opacity:0}.footer{margin:0.2em;font-size:0.6em}.footer-hide{margin:0.2em;font-size:0.6em;opacity:0}';export{wt as ibcs_chart_time}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,h as t,H as e,g as s}from"./p-JNHhIe7t.js";import{v as a,a as n,i as r,b as o,c as l,d,e as h,f as p,g as u,h as c,j as v,k as g,w as m,l as y}from"./p-B7p8beYH.js";import{w as f,a as b,g as O,p as w}from"./p-79KuA4Ox.js";import{w as S}from"./p-CYjZRKdI.js";import{g as R}from"./p-B0lsgVuN.js";import{w as _}from"./p-BoMtoHJB.js";import{w as x}from"./p-tzFCK9qn.js";import{O as M,a as A,D as L,A as T,S as E,b as C,c as I,C as U}from"./p-sRO-lj7X.js";import{F as k}from"./p-BDh7GfC5.js";var W;!function(i){i.ROWGROUP="rowGroup",i.ROWGROUPINDEX="rowGroupIndex",i.CATEGORY="category",i.CATEGORYINDEX="categoryIndex",i.SUBCATEGORY="subCategory",i.SUBCATEGORYINDEX="subCategoryIndex"}(W||(W={}));const N=class{validateScenario(i){const t=a(i),e="ERR_scenarios";t.length>0?this.errors.addOrReplace({id:e,type:"warning",message:"scenarios: invalid value(s) '"+JSON.stringify(t)+"' are not supported."}):this.errors.remove(e)}validateVariances(i){const t="ERR_variances",e=n(i);e.length>0?this.errors.addOrReplace({id:t,type:"warning",message:"variances: invalid value(s) '"+JSON.stringify(e)+"' are not supported."}):this.errors.remove(t)}validateLeftSync(i){const t="ERR_syncSpaceLeft";r(i)?this.errors.remove(t):this.errors.addOrReplace({id:t,type:"warning",message:"syncSpaceLeft: invalid value(s) '"+i+"' are not supported."})}validateLimit(i){const t="ERR_limit";o(i)?this.errors.remove(t):this.errors.addOrReplace({id:t,type:"warning",message:"limit: invalid value '"+(null==i?void 0:i.toString())+"' is not supported."})}validateUnitScaling(i){const t="ERR_unitScaling";r(i)||this.pixelPerUnitGroupMap.has(i)?this.errors.remove(t):this.errors.addOrReplace({id:t,type:"warning",message:"unitScaling: invalid value(s) '"+i+"' are not supported."})}validatePercentageScaling(i){const t="ERR_percentageScaling";r(i)||this.pixelPerUnitGroupMap.has(i)?this.errors.remove(t):this.errors.addOrReplace({id:t,type:"warning",message:"percentageScaling: invalid value(s) '"+i+"' are not supported."})}validateLevel(i){const t="ERR_level";l(i)?this.errors.remove(t):this.errors.addOrReplace({id:t,type:"warning",message:"level: invalid value(s) '"+i+"' are not supported."})}validateOrderList(i){const t="ERR_order",e=d(i);e.length>0?this.errors.addOrReplace({id:t,type:"warning",message:"order: invalid value(s) '"+JSON.stringify(e)+"' are not supported."}):this.errors.remove(t)}validateOrderDirection(i){const t="ERR_orderDirection";h(i)?this.errors.remove(t):this.errors.addOrReplace({id:t,type:"warning",message:"orderDirection: invalid value '"+(null==i?void 0:i.toString())+"' is not supported."})}validateDateInterval(i){const t="ERR_dateInterval";p(i)?this.errors.remove(t):this.errors.addOrReplace({id:t,type:"warning",message:"dateInterval: invalid value '"+(null==i?void 0:i.toString())+"' is not supported."})}validateChartMode(i){const t="ERR_chartMode";["bar","line","auto"].includes(null==i?void 0:i.toLowerCase())?this.errors.remove(t):this.errors.addOrReplace({id:t,type:"warning",message:"chartMode: invalid value '"+(null==i?void 0:i.toString())+"' is not supported. Valid values are: bar, line, auto."})}validateMaxBars(i){const t="ERR_maxBars";!o(i)||i<1?this.errors.addOrReplace({id:t,type:"warning",message:"maxBars: invalid value '"+(null==i?void 0:i.toString())+"' is not supported. Must be a positive integer."}):this.errors.remove(t)}validateStack(i){const t="ERR_stack",e=u(i);e.length>0?this.errors.addOrReplace({id:t,type:"warning",message:e.join("; ")}):this.errors.remove(t)}validateScaling(i){if(null==i||""===i||"none"===i||"auto"===i)return void this.errors.remove("ERR_scale");const t=Number(i);isNaN(t)||t<=0?this.errors.addOrReplace({id:"ERR_scale",type:"warning",message:`Invalid scale value: "${i}". Use "none", "auto", or a positive number.`}):this.errors.remove("ERR_scale")}validateAxisLabelsMode(i){const t="ERR_axisLabelsMode";c(i)?this.errors.remove(t):this.errors.addOrReplace({id:t,type:"warning",message:"axisLabelsMode: invalid value '"+(null==i?void 0:i.toString())+"' is not supported."})}validateLineFullWidth(i){const t="ERR_lineFullWidth";v(i)?this.errors.remove(t):this.errors.addOrReplace({id:t,type:"warning",message:"lineFullWidth: invalid value(s) '"+(null==i?void 0:i.toString())+"' are not supported."})}validateShowCategories(i){const t="ERR_showCategories";v(i)?this.errors.remove(t):this.errors.addOrReplace({id:t,type:"warning",message:"showCategories: invalid value(s) '"+(null==i?void 0:i.toString())+"' are not supported."})}validateMeasureScale(i){const t="ERR_measureScale";g(i)?this.errors.remove(t):this.errors.addOrReplace({id:t,type:"warning",message:"measureScale: invalid value '"+(null==i?void 0:i.toString())+"' is not supported."})}validateShowMeasureScale(i){const t="ERR_grouped";v(i)?this.errors.remove(t):this.errors.addOrReplace({id:t,type:"warning",message:"showMeasureScale: invalid value(s) '"+(null==i?void 0:i.toString())+"' are not supported."})}validateShowOverlayAvg(i){const t="ERR_grouped";v(i)?this.errors.remove(t):this.errors.addOrReplace({id:t,type:"warning",message:"showOverlayAvg: invalid value(s) '"+(null==i?void 0:i.toString())+"' are not supported."})}validateShowOverlayMedian(i){const t="ERR_grouped";v(i)?this.errors.remove(t):this.errors.addOrReplace({id:t,type:"warning",message:"showOverlayMedian: invalid value(s) '"+(null==i?void 0:i.toString())+"' are not supported."})}constructor(t){i(this,t),this.data=[],this.datasetMeta=null,this.appliedScaleFactor=1,this.chartTitle="",this.filter="",this.syncSpaceLeft=-1,this.limit=0,this.chartMode="bar",this.maxBars=28,this.stack="",this.intervalSpanLimit=28,this.lineFullWidth="true",this.showCategories="true",this.measureScale="greatest",this.showMeasureScale="false",this.showOverlayAvg="true",this.showOverlayMedian="false",this.measureUnit="",this.pixelPerUnitGroupMap=new Map,this._autoScaleGuard=!1,m(this),S(this),f(this,((i,t)=>{this.data=t||[]}),((i,t)=>{this.datasetMeta=t})),this.chartTemplate=this.chartTemplate.bind(this),this.errors=x(this),this.componentStyle=_(this),this.t=b(this).t}componentWillLoad(){this.validateScenario(this.scenarios),this.validateVariances(this.variances),this.validateUnitScaling(this.unitScaling),this.validateLimit(this.limit),this.validateLevel(this.level),this.validateOrderDirection(this.orderDirection),this.validateOrderList(this.order),this.validateLeftSync(this.syncSpaceLeft),this.validateDateInterval(this.dateInterval),this.validateAxisLabelsMode(this.axisLabelsMode),this.validateLineFullWidth(this.lineFullWidth),this.validateShowCategories(this.showCategories),this.validateMeasureScale(this.measureScale),this.validateShowMeasureScale(this.showMeasureScale),this.validateShowOverlayAvg(this.showOverlayAvg),this.validateShowOverlayMedian(this.showOverlayMedian),this.validateChartMode(this.chartMode),this.validateMaxBars(this.maxBars),this.validateStack(this.stack),this.validateScaling(this.scale)}componentDidRender(){var i,t;const{mode:e}=w(this.scale);if("auto"!==e&&"empty"!==e){this._autoScaleGuard=!1;const i=O(this.element),t="WARN_overflow";return void(i.width>0&&this.element.scrollWidth>i.width+1?this.errors.addOrReplace({id:t,type:"warning",message:"Chart exceeds available space and will be cut off. Check unit-scaling value."}):this.errors.remove(t))}if(this._autoScaleGuard)return void(this._autoScaleGuard=!1);const s=this.element,{width:a}=O(s);if(a<=0)return;const n=this.componentStyle((i=>{var t;return(null===(t=i.global)||void 0===t?void 0:t.fontSizePx)||13.3333}));s.style.setProperty("--bn-font-size",`${n}px`);const r=null===(i=s.shadowRoot)||void 0===i?void 0:i.querySelector(".container"),o=null!==(t=null==r?void 0:r.scrollWidth)&&void 0!==t?t:s.scrollWidth;if(o<=a+1)return this.errors.remove("AUTO_scale"),void(1!==this.appliedScaleFactor&&(this._autoScaleGuard=!0,this.appliedScaleFactor=1));const l=(a-1)/o;s.style.setProperty("--bn-font-size",n*l+"px"),"empty"===e?this.errors.addOrReplace({id:"AUTO_scale",type:"warning",message:`Auto-scaled chart by factor ${l.toFixed(3)}`}):this.errors.remove("AUTO_scale"),Math.abs(l-this.appliedScaleFactor)>.001&&(this._autoScaleGuard=!0,this.appliedScaleFactor=l)}prepareDimension(){const i=O(this.element),t=this.prepareScenarios(),e=this.prepareVariances();return this.canvasWidthSegmented=i.width/(t.length+e.length||1),{width:this.canvasWidthSegmented,height:i.height}}prepareScenarios(){var i,t,e,s;const a="auto"===(null===(i=this.scenarios)||void 0===i?void 0:i.trim().toLowerCase());return y(this.scenarios)||a?(null===(e=null===(t=this.datasetMeta)||void 0===t?void 0:t.availableScenarios)||void 0===e?void 0:e.length)>0?(a?this.errors.remove("AUTO_scenarios"):this.errors.addOrReplace({id:"AUTO_scenarios",type:"warning",message:`scenarios: not set, auto-detected: ${this.datasetMeta.availableScenarios.join(",")}`}),this.datasetMeta.availableScenarios):[]:(this.errors.remove("AUTO_scenarios"),null===(s=this.scenarios)||void 0===s?void 0:s.split(",").map((i=>i.trim())))}prepareAvg(){return"true"===this.showOverlayAvg}prepareMedian(){return"true"===this.showOverlayMedian}prepareVariances(){var i;return y(this.variances)?[]:null===(i=this.variances)||void 0===i?void 0:i.split(",").map((i=>i.trim()))}prepareHideAxisLabels(i){return i>=1||"true"!==this.showCategories}prepareI18n(){const i=R,t=new Map([].map((i=>[i,this.t(".".concat(i))]))),e=new Map(i.map((i=>[i,this.t("global.".concat(i))])));return new Map([...e.entries(),...t.entries()])}preparePixelPerUnit(){var i;if(this.pixelPerUnitGroupMap.has(this.unitScaling))return this.errors.remove("AUTO_unitScaling"),this.pixelPerUnitGroupMap.get(this.unitScaling);if("auto"===(null===(i=this.unitScaling)||void 0===i?void 0:i.toString().trim().toLowerCase()))return this.errors.remove("AUTO_unitScaling"),0;const t=Number(this.unitScaling);return!isNaN(t)&&t>0?(this.errors.remove("AUTO_unitScaling"),t):(this.errors.addOrReplace({id:"AUTO_unitScaling",type:"warning",message:"unit-scaling: not set, auto-calculated to fit available space."}),0)}preparePixelPerPercentage(){return this.pixelPerUnitGroupMap.has(this.percentageScaling)?this.pixelPerUnitGroupMap.get(this.percentageScaling):100*Number(this.percentageScaling)}prepareLevel(){var i,t,e;const s="auto"===(null===(i=this.level)||void 0===i?void 0:i.trim().toLowerCase());return y(this.level)||s?(null===(t=this.datasetMeta)||void 0===t?void 0:t.suggestedLevel)?(s?this.errors.remove("AUTO_level"):this.errors.addOrReplace({id:"AUTO_level",type:"warning",message:`level: not set, auto-detected: ${this.datasetMeta.suggestedLevel}`}),W[this.datasetMeta.suggestedLevel.toUpperCase()]):void 0:(this.errors.remove("AUTO_level"),W[null===(e=this.level)||void 0===e?void 0:e.toUpperCase()])}prepareOrder(){var i,t,e,s,a,n;let r=(y(this.level)||"auto"===(null===(i=this.level)||void 0===i?void 0:i.trim().toLowerCase()))&&(null===(t=this.datasetMeta)||void 0===t?void 0:t.suggestedLevel)?this.datasetMeta.suggestedLevel:this.level;const o="auto"===(null===(e=this.order)||void 0===e?void 0:e.trim().toLowerCase());return y(this.order)||o?(null===(s=this.datasetMeta)||void 0===s?void 0:s.suggestedLevel)&&(o?this.errors.remove("AUTO_order"):this.errors.addOrReplace({id:"AUTO_order",type:"warning",message:`order: not set, auto-detected: ${r}`})):(this.errors.remove("AUTO_order"),"levelindex"===(null===(a=this.order)||void 0===a?void 0:a.toLocaleLowerCase())&&(r+="Index")),{hierarchy:[A[null==r?void 0:r.toUpperCase()]],direction:M[null===(n=this.orderDirection)||void 0===n?void 0:n.toUpperCase()]}}prepareStyle(){const i=this.getEffectiveScaleFactor();return this.componentStyle((t=>{const e=t.global.fontSizePx*i;return{scaleFactors:{scenarioOffset:t["bn-chart-time"].scaleFactors.scenarioOffset,scenarioLabelToColumn:t["bn-chart-time"].scaleFactors.scenarioLabelToColumn,labelToColumn:.3,labelToColum:t["bn-chart-time"].scaleFactors.labelToColum,labelToAxis:t["bn-chart-time"].scaleFactors.labelToAxis,needleWidth:t["bn-chart-time"].scaleFactors.needleWidth,needleHeadWidth:t["bn-chart-time"].scaleFactors.needleHeadWidth,columnWidth:t["bn-chart-time"].scaleFactors.columnWidth,varianceAxisLineWidth:t["bn-chart-time"].scaleFactors.varianceAxisLineWidth,axisLineWidth:t["bn-chart-time"].scaleFactors.axisLineWidth,auxiliaryLineWidth:t["bn-chart-time"].scaleFactors.auxiliaryLineWidth,scenarioLineWidth:t["bn-chart-time"].scaleFactors.scenarioLineWidth,markerWidth:t["bn-chart-time"].scaleFactors.markerWidth,markerOffset:t["bn-chart-time"].scaleFactors.markerOffset,categoryWidth:t["bn-chart-time"].scaleFactors.categoryWidth,axisTickLength:t["bn-chart-time"].scaleFactors.axisTickLength},fontStyles:{font:`${e}px ${t.global.fontFamily}`,size:e,color:t.global.fontColor,background:t.global.fontBackgroundColor,leading:1.8},axisStyles:t["bn-chart-time"].axisStyles,barStyles:t["bn-chart-time"].barStyles,varianceStyles:t["bn-chart-time"].varianceStyles,stackColors:t["bn-chart-time"].stackColors,padding:t["bn-chart-time"].padding,pattern:null}}))}prepareLeftSideOffset(i,t){return this.syncSpaceLeft>-1?this.syncSpaceLeft:k.getMaxWidthOfArrayItems([...this.prepareVariances(),...this.prepareScenarios(),this.chartTitle],i,t)}prepareChartTitle(i){return i>=1?"":this.chartTitle}prepareLimit(){return Math.floor(Number(this.limit)||0)}prepareDateInterval(){var i,t,e;const s="auto"===(null===(i=this.dateInterval)||void 0===i?void 0:i.trim().toLowerCase());return y(this.dateInterval)||s?(null===(t=this.datasetMeta)||void 0===t?void 0:t.suggestedDateInterval)?(s?this.errors.remove("AUTO_dateInterval"):this.errors.addOrReplace({id:"AUTO_dateInterval",type:"warning",message:`dateInterval: not set, auto-detected: ${this.datasetMeta.suggestedDateInterval}`}),L[this.datasetMeta.suggestedDateInterval.toUpperCase()]):s?L.AUTO:void 0:(this.errors.remove("AUTO_dateInterval"),L[null===(e=this.dateInterval)||void 0===e?void 0:e.toUpperCase()])}prepareIntervalSpanLimit(){return this.intervalSpanLimit}prepareAxisLabelsMode(){var i;return T[null===(i=this.axisLabelsMode)||void 0===i?void 0:i.toUpperCase()]}prepareFilter(){return 0===this.filter.length?"":this.filter}getDataStructure(){return{ITimeChartDataRow:{setName:{type:"string",isOptional:!1,description:""},date:{type:"string",isOptional:!1,description:""},operation:{type:"string",isOptional:!1,description:""},rowGroup:{type:"string",isOptional:!1,description:""},rowGroupIndex:{type:"number",isOptional:!1,description:""},category:{type:"string",isOptional:!1,description:""},categoryIndex:{type:"number",isOptional:!1,description:""},subCategory:{type:"string",isOptional:!1,description:""},subCategoryIndex:{type:"number",isOptional:!1,description:""},columnGroup:{type:"string",isOptional:!1,description:""},columnGroupIndex:{type:"number",isOptional:!1,description:""},columnSubGroup:{type:"string",isOptional:!1,description:""},columnSubGroupIndex:{type:"number",isOptional:!1,description:""},ac1:{type:"number",isOptional:!1,description:""},ac2:{type:"number",isOptional:!1,description:""},ac3:{type:"number",isOptional:!1,description:""},ac4:{type:"number",isOptional:!1,description:""},pp1:{type:"number",isOptional:!1,description:""},pp2:{type:"number",isOptional:!1,description:""},pp3:{type:"number",isOptional:!1,description:""},pp4:{type:"number",isOptional:!1,description:""},fc1:{type:"number",isOptional:!1,description:""},fc2:{type:"number",isOptional:!1,description:""},fc3:{type:"number",isOptional:!1,description:""},fc4:{type:"number",isOptional:!1,description:""},pl1:{type:"number",isOptional:!1,description:""},pl2:{type:"number",isOptional:!1,description:""},pl3:{type:"number",isOptional:!1,description:""},pl4:{type:"number",isOptional:!1,description:""}}}}prepareMeasureScale(){return y(this.measureScale)?"GREATEST":["_","k","M","G","T","P","E","Z","Y","m","μ","n","p","P","f","a","z","y"].includes(this.measureScale.trim())||"LEAST"===this.measureScale.trim().toUpperCase()?this.measureScale.trim():"GREATEST"}prepareShowMeasureScale(i){return 0===i&&"true"===this.showMeasureScale}prepareMeasureUnit(){return""===this.measureUnit||null==this.measureUnit?"":this.measureUnit}prepareStackConfig(){if(y(this.stack))return this.errors.remove("WARN_stack_dimensions_scenarios"),null;try{const i=JSON.parse(this.stack),t=i.by,e="WARN_stack_dimensions_scenarios";if(t===E.DIMENSIONS){const i=this.prepareScenarios();i.length>1?this.errors.addOrReplace({id:e,type:"warning",message:`stack by dimensions: only the first scenario "${i[0]}" is used, the rest (${i.slice(1).join(", ")}) are discarded.`}):this.errors.remove(e)}else this.errors.remove(e);return{by:t,mode:i.mode||I.ABSOLUTE,order:i.order||C.DATASET}}catch(i){return this.errors.remove("WARN_stack_dimensions_scenarios"),null}}prepareLineFullWidth(){return"true"===this.lineFullWidth}prepareChartMode(){var i;const t=null===(i=this.chartMode)||void 0===i?void 0:i.toLowerCase();return"line"===t?U.LINE:"auto"===t?U.AUTO:U.BAR}prepareMaxBars(){return Math.floor(Number(this.maxBars)||28)}chartTemplate(i,e){const s=this.prepareI18n(),a=this.prepareStyle(),n=O(this.element).width,r=this.getEffectiveScaleFactor(),o=this.preparePixelPerUnit(),l=this.preparePixelPerPercentage(),d=this.prepareStackConfig(),h=this.prepareScenarios(),p=(null==d?void 0:d.by)===E.DIMENSIONS?h.slice(0,1):h;return t("ibcs-chart-time",{data:this.data,chartTitle:this.prepareChartTitle(e),scenarios:p,variances:[i],hideAxisLabels:this.prepareHideAxisLabels(e),pixelPerUnit:o>0?o*r:0,pixelPerPercentage:l>0?l*r:0,limit:this.prepareLimit(),leftSideOffsetForHorizontalSync:this.prepareLeftSideOffset(s,a),styles:a,i18n:s,order:this.prepareOrder(),level:this.prepareLevel(),dateInterval:this.prepareDateInterval(),intervalSpanLimit:this.prepareIntervalSpanLimit(),axisLabelsMode:this.prepareAxisLabelsMode(),filter:this.prepareFilter(),"measure-scale":this.prepareMeasureScale(),"measure-unit":this.prepareMeasureUnit(),showOverlayAvg:this.prepareAvg(),showOverlayMedian:this.prepareMedian(),showMeasureScale:this.prepareShowMeasureScale(e),chartMode:this.prepareChartMode(),maxBars:this.prepareMaxBars(),stackConfig:d,lineFullWidth:this.prepareLineFullWidth(),containerWidth:n,parentDimensions:this.prepareDimension()})}getEffectiveScaleFactor(){const{mode:i,factor:t}=w(this.scale);return"factor"===i?t:"auto"===i||"empty"===i?this.appliedScaleFactor:1}getFontStyles(){const i=this.getEffectiveScaleFactor();return this.componentStyle((t=>{var e,s,a,n;const r=(null===(e=t.global)||void 0===e?void 0:e.fontSizePx)||13.3333;return{"--bn-font-family":(null===(s=t.global)||void 0===s?void 0:s.fontFamily)||"'Noto Sans', sans-serif","--bn-font-size":r*i+"px","--bn-font-color":(null===(a=t.global)||void 0===a?void 0:a.fontColor)||"#000000","--bn-font-background":(null===(n=t.global)||void 0===n?void 0:n.fontBackgroundColor)||"#ffffff"}}))}render(){let i=[""];const s=this.prepareVariances();s.length>0&&(i=[...i,...s]);const a=this.getFontStyles();return t(e,{key:"ecbf96e2d037a7dad9b3380bcc28b6e010ac867c",style:a},t("div",{key:"c556b86aac629e59c601986650d1a4857a2ee068",class:"container"},i.map(this.chartTemplate)))}get element(){return s(this)}static get watchers(){return{scenarios:[{validateScenario:0}],variances:[{validateVariances:0}],syncSpaceLeft:[{validateLeftSync:0}],limit:[{validateLimit:0}],unitScaling:[{validateUnitScaling:0}],percentageScaling:[{validatePercentageScaling:0}],level:[{validateLevel:0}],order:[{validateOrderList:0}],orderDirection:[{validateOrderDirection:0}],dateInterval:[{validateDateInterval:0}],chartMode:[{validateChartMode:0}],maxBars:[{validateMaxBars:0}],stack:[{validateStack:0}],scale:[{validateScaling:0}],axisLabelsMode:[{validateAxisLabelsMode:0}],lineFullWidth:[{validateLineFullWidth:0}],showCategories:[{validateShowCategories:0}],measureScale:[{validateMeasureScale:0}],showMeasureScale:[{validateShowMeasureScale:0}],showOverlayAvg:[{validateShowOverlayAvg:0}],showOverlayMedian:[{validateShowOverlayMedian:0}]}}};N.style=":host{display:inline-block;position:relative;overflow:visible;}.container{display:flex;flex-direction:column-reverse}.background-image{display:flex;flex-wrap:wrap;justify-content:flex-end}";export{N as bn_chart_time}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o,h as t,H as s,g as r}from"./p-JNHhIe7t.js";import{w as n}from"./p-CYjZRKdI.js";import{w as e}from"./p-BoMtoHJB.js";import{w as i}from"./p-tzFCK9qn.js";import"./p-B0lsgVuN.js";const a=class{constructor(t){o(this,t),n(this),this.errors=i(this),this.componentStyle=e(this)}render(){return t(s,{key:"92bcbc010336d3a542c86e182831bbfddda2aa9b",style:this.prepareStyle()},t("slot",{key:"d836aa5443283df158dcb50345aee0df97f74a6e"}))}prepareStyle(){return{"font-family":this.componentStyle((o=>o.global.fontFamily)),"font-size":`${this.componentStyle((o=>o.global.fontSizePx))}px`,"--bn-font-family":this.componentStyle((o=>o.global.fontFamily))||"'Noto Sans', sans-serif","--bn-font-size":`${this.componentStyle((o=>o.global.fontSizePx))||13.3333}px`,"--bn-font-color":this.componentStyle((o=>o.global.fontColor))||"#000000","--bn-font-background":this.componentStyle((o=>o.global.fontBackgroundColor))||"#ffffff"}}get element(){return r(this)}};a.style=':host{display:flex;flex-direction:column;justify-content:space-between;padding:0.25em;margin:0.5em;background-origin:content-box;font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);color:var(--bn-font-color, #000000)}:host(.border){box-sizing:border-box;-webkit-box-sizing:border-box;border:0.1em solid #ddd}div{color:var(--bn-font-color, black)}';export{a as bn_card}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{S as e}from"./p-JNHhIe7t.js";const t=(()=>{let e;return(...t)=>{e&&clearTimeout(e),e=setTimeout((()=>{e=0,(e=>{for(let t of e.keys()){const o=e.get(t).filter((e=>{const t=e.deref();return t&&(!("isConnected"in(o=t))||o.isConnected);var o}));e.set(t,o)}})(...t)}),2e3)}})(),o=e.forceUpdate,n=e.getRenderingRef,i=(e,t)=>{const o=e.indexOf(t);o>=0&&(e[o]=e[e.length-1],e.length--)},r=(e,r)=>{const a=((e,t=(e,t)=>e!==t)=>{const o=()=>{return("function"==typeof(t=e)?t():t)??{};var t},n=o();let r=new Map(Object.entries(n));const a="undefined"!=typeof Proxy,s=a?null:{},l={dispose:[],get:[],set:[],reset:[]},f=new Map,c=()=>{r=new Map(Object.entries(o())),a||_(),l.reset.forEach((e=>e()))},d=e=>(l.get.forEach((t=>t(e))),r.get(e)),p=(e,o)=>{const n=r.get(e);t(o,n,e)&&(r.set(e,o),a||u(e),l.set.forEach((t=>t(e,o,n))))},b=a?new Proxy(n,{get:(e,t)=>d(t),ownKeys:()=>Array.from(r.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(e,t)=>r.has(t),set:(e,t,o)=>(p(t,o),!0)}):(_(),s),h=(e,t)=>(l[e].push(t),()=>{i(l[e],t)});function u(e){!a&&s&&(Object.prototype.hasOwnProperty.call(s,e)||Object.defineProperty(s,e,{configurable:!0,enumerable:!0,get:()=>d(e),set(t){p(e,t)}}))}function _(){if(a||!s)return;const e=new Set(r.keys());for(const t of Object.keys(s))e.has(t)||delete s[t];for(const t of e)u(t)}return{state:b,get:d,set:p,on:h,onChange:(e,t)=>{const n=(o,n)=>{o===e&&t(n)},i=()=>{const n=o();t(n[e])},r=h("set",n),a=h("reset",i);return f.set(t,{setHandler:n,resetHandler:i,propName:e}),()=>{r(),a(),f.delete(t)}},use:(...e)=>{const t=e.reduce(((e,t)=>(t.set&&e.push(h("set",t.set)),t.get&&e.push(h("get",t.get)),t.reset&&e.push(h("reset",t.reset)),t.dispose&&e.push(h("dispose",t.dispose)),e)),[]);return()=>t.forEach((e=>e()))},dispose:()=>{l.dispose.forEach((e=>e())),c()},reset:c,forceUpdate:e=>{const t=r.get(e);l.set.forEach((o=>o(e,t,t)))},removeListener:(e,t)=>{const o=f.get(t);o&&o.propName===e&&(i(l.set,o.setHandler),i(l.reset,o.resetHandler),f.delete(t))}}})(e,r);return a.use((()=>{if("function"!=typeof n||"function"!=typeof o)return{};const e=o,i=n,r=new Map;return{dispose:()=>r.clear(),get:e=>{const t=i();t&&((e,t,o)=>{let n=e.get(t);n||(n=[],e.set(t,n)),n.some((e=>e.deref()===o))||n.push(new WeakRef(o))})(r,e,t)},set:o=>{const n=r.get(o);if(n){const t=n.filter((t=>{const o=t.deref();return!!o&&e(o)}));r.set(o,t)}t(r)},reset:()=>{r.forEach((t=>{t.forEach((t=>{const o=t.deref();o&&e(o)}))})),t(r)}}})()),a},a={global:{fontFamily:"'Noto Sans', sans-serif",fontSizePx:13.3333,fontColor:"#000000",fontBackgroundColor:"#ffffff"},"bn-text":{},"bn-chart-time":{scaleFactors:{scenarioOffset:.3,scenarioLabelToColumn:.3,labelToColumn:.3,labelToAxis:.3,needleWidth:.3,needleHeadWidth:.6,columnWidth:2,varianceAxisLineWidth:.3,axisLineWidth:.1,auxiliaryLineWidth:.1,scenarioLineWidth:.2,markerWidth:.7,markerOffset:0,categoryWidth:3,axisTickLength:.3},axisStyles:{ac:{stroke:"#121212",fill:"#121212",width:.1},fc:{stroke:"#121212",fill:"#ffffff",width:.1,dasharray:"10 5 5 5"},pp:{stroke:"#606060",fill:"#606060",width:.1},pl:{stroke:"#121212",fill:"#ffffff",width:.1}},barStyles:{ac:{stroke:"#404040",fill:"#404040",width:.1},fc:{stroke:"#404040",fill:"#ffffff",width:.5,fillpattern:"fc"},pp:{stroke:"#A6A6A6",fill:"#A6A6A6",width:.1},pl:{stroke:"#404040",fill:"#ffffff",width:.1}},varianceStyles:{pos:{stroke:"#008f96",fill:"#008f96",width:.1},neg:{stroke:"#ff0000",fill:"#ff0000",width:.1},neu:{stroke:"#808080",fill:"#808080",width:.1}},stackColors:["#000000","#c0c0c0","#808080"],padding:{top:10,left:10,right:10,bottom:10}},"bn-chart-structure":{scaleFactors:{scenarioOffset:.3,scenarioLabelToBar:.1,labelToBar:.3,labelToAxis:.3,needleWidth:.3,needleHeadWidth:.6,barWidth:1.2,varianceAxisLineWidth:.3,axisLineWidth:.1,auxiliaryLineWidth:.1,scenarioLineWidth:.2,markerWidth:.7,markerOffset:0,categoryWidth:1.9,axisTickLength:.3},axisStyles:{ac:{stroke:"#121212",fill:"#121212",width:.1},fc:{stroke:"#121212",fill:"#ffffff",width:.1,dasharray:"10 5 5 5"},pp:{stroke:"#606060",fill:"#606060",width:.1},pl:{stroke:"#121212",fill:"#ffffff",width:.1}},barStyles:{ac:{stroke:"#404040",fill:"#404040",width:.1},fc:{stroke:"#404040",fill:"#ffffff",width:.5,fillpattern:"fc"},pp:{stroke:"#A6A6A6",fill:"#A6A6A6",width:.1},pl:{stroke:"#404040",fill:"#ffffff",width:.1}},varianceStyles:{pos:{stroke:"#008f96",fill:"#008f96",width:.1},neg:{stroke:"#ff0000",fill:"#ff0000",width:.1},neu:{stroke:"#808080",fill:"#808080",width:.1}},stackColors:["#000000","#c0c0c0","#808080"],padding:{top:10,left:10,right:10,bottom:10}},"bn-tree":{edgeColor:"#404040",edgeWidth:1,operatorCircleRadius:10,operatorFontSizeScale:.9,operatorColor:"#404040"},"bn-grid":{headerBackground:"transparent",borderColor:"#A6A6A6",borderWidth:1,cellPadding:4}};function s(e,t,o=null){o=o||{},t=t?t+".":"";for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&("object"==typeof e[n]&&null!==e[n]?s(e[n],t+n,o):o[t+n]=e[n]);return o}const l=["ORDER_asc","ORDER_desc","ac1","pp1","fc1","pl1","ac2","pp2","fc2","pl2","ac3","pp3","fc3","pl3","ac4","pp4","fc4","pl4","ibcssymbol_delta_ac","ibcssymbol_delta_generic","ibcssymbol_delta_ac_relative","ibcssymbol_delta_generic_relative"],f=s({global:{ac1:"AC",pp1:"PY",fc1:"FC",pl1:"PL",ac2:"AC2",pp2:"PY2",fc2:"FC2",pl2:"PL2",ac3:"AC3",pp3:"PY3",fc3:"FC3",pl3:"PL3",ac4:"AC4",pp4:"PY4",fc4:"FC4",pl4:"PL4",ORDER_asc:"↑",ORDER_desc:"↓",ibcssymbol_delta_ac:"Δ{%}",ibcssymbol_delta_generic:"Δ({%})",ibcssymbol_delta_ac_relative:"Δ{%}%",ibcssymbol_delta_generic_relative:"Δ({%})%"},"bn-title":{SEPERATOR_WS:", ",CONNECTOR_WS:" und ",in:"in"},"bn-chart":{},"bn-table":{in:"in",category:" ",operation:" ",there_of:"davon",part_of:"in % von",SUM_TOTAL:"❖",REST:"REST"}}),c=s({global:{ac1:"AC",pp1:"PY",fc1:"FC",pl1:"PL",ac2:"AC2",pp2:"PY2",fc2:"FC2",pl2:"PL2",ac3:"AC3",pp3:"PY3",fc3:"FC3",pl3:"PL3",ac4:"AC4",pp4:"PY4",fc4:"FC4",pl4:"PL4",ORDER_asc:"↑",ORDER_desc:"↓",ibcssymbol_delta_ac:"Δ{%}",ibcssymbol_delta_generic:"Δ({%})",ibcssymbol_delta_ac_relative:"Δ{%}%",ibcssymbol_delta_generic_relative:"Δ({%})%"},"bn-title":{SEPERATOR_WS:", ",CONNECTOR_WS:" and ",in:"in"},"bn-chart":{},"bn-table":{category:" ",operation:" ",there_of:"there of",part_of:"in % of",SUM_TOTAL:"❖",REST:"REST"}}),d=Object.keys(f||{}),p={_system:{de:f,en:c}},b=new WeakMap;function h(e){let t=b.get(e);return t||(t={datasources:r({}),datasets:r({}),datasetsMeta:r({}),componentStyles:r({_system:a}),internationalization:r(Object.assign({},p)),assets:r({}),context:r({locale:"en"})},b.set(e,t)),t}const u=new WeakMap;function _(e){const t=u.get(e);if(t)return t;const o=function(e){var t;let o=e.parentNode;for(;o;){if(o instanceof HTMLElement&&"bn-context"===(null===(t=o.nodeName)||void 0===t?void 0:t.toLowerCase()))return o;if(o.parentNode)o=o.parentNode;else{if(!(o instanceof ShadowRoot))break;o=o.host}}}(e);if(!o)throw new Error(`[bn] <${e.localName}> must be inside a <bn-context>. No ancestor <bn-context> found.`);const n=h(o);return u.set(e,n),n}function y(e){u.delete(e)}export{d as B,
|
|
1
|
+
import{S as e}from"./p-JNHhIe7t.js";const t=(()=>{let e;return(...t)=>{e&&clearTimeout(e),e=setTimeout((()=>{e=0,(e=>{for(let t of e.keys()){const o=e.get(t).filter((e=>{const t=e.deref();return t&&(!("isConnected"in(o=t))||o.isConnected);var o}));e.set(t,o)}})(...t)}),2e3)}})(),o=e.forceUpdate,n=e.getRenderingRef,i=(e,t)=>{const o=e.indexOf(t);o>=0&&(e[o]=e[e.length-1],e.length--)},r=(e,r)=>{const a=((e,t=(e,t)=>e!==t)=>{const o=()=>{return("function"==typeof(t=e)?t():t)??{};var t},n=o();let r=new Map(Object.entries(n));const a="undefined"!=typeof Proxy,s=a?null:{},l={dispose:[],get:[],set:[],reset:[]},f=new Map,c=()=>{r=new Map(Object.entries(o())),a||_(),l.reset.forEach((e=>e()))},d=e=>(l.get.forEach((t=>t(e))),r.get(e)),p=(e,o)=>{const n=r.get(e);t(o,n,e)&&(r.set(e,o),a||u(e),l.set.forEach((t=>t(e,o,n))))},b=a?new Proxy(n,{get:(e,t)=>d(t),ownKeys:()=>Array.from(r.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(e,t)=>r.has(t),set:(e,t,o)=>(p(t,o),!0)}):(_(),s),h=(e,t)=>(l[e].push(t),()=>{i(l[e],t)});function u(e){!a&&s&&(Object.prototype.hasOwnProperty.call(s,e)||Object.defineProperty(s,e,{configurable:!0,enumerable:!0,get:()=>d(e),set(t){p(e,t)}}))}function _(){if(a||!s)return;const e=new Set(r.keys());for(const t of Object.keys(s))e.has(t)||delete s[t];for(const t of e)u(t)}return{state:b,get:d,set:p,on:h,onChange:(e,t)=>{const n=(o,n)=>{o===e&&t(n)},i=()=>{const n=o();t(n[e])},r=h("set",n),a=h("reset",i);return f.set(t,{setHandler:n,resetHandler:i,propName:e}),()=>{r(),a(),f.delete(t)}},use:(...e)=>{const t=e.reduce(((e,t)=>(t.set&&e.push(h("set",t.set)),t.get&&e.push(h("get",t.get)),t.reset&&e.push(h("reset",t.reset)),t.dispose&&e.push(h("dispose",t.dispose)),e)),[]);return()=>t.forEach((e=>e()))},dispose:()=>{l.dispose.forEach((e=>e())),c()},reset:c,forceUpdate:e=>{const t=r.get(e);l.set.forEach((o=>o(e,t,t)))},removeListener:(e,t)=>{const o=f.get(t);o&&o.propName===e&&(i(l.set,o.setHandler),i(l.reset,o.resetHandler),f.delete(t))}}})(e,r);return a.use((()=>{if("function"!=typeof n||"function"!=typeof o)return{};const e=o,i=n,r=new Map;return{dispose:()=>r.clear(),get:e=>{const t=i();t&&((e,t,o)=>{let n=e.get(t);n||(n=[],e.set(t,n)),n.some((e=>e.deref()===o))||n.push(new WeakRef(o))})(r,e,t)},set:o=>{const n=r.get(o);if(n){const t=n.filter((t=>{const o=t.deref();return!!o&&e(o)}));r.set(o,t)}t(r)},reset:()=>{r.forEach((t=>{t.forEach((t=>{const o=t.deref();o&&e(o)}))})),t(r)}}})()),a},a={global:{fontFamily:"'Noto Sans', sans-serif",fontSizePx:13.3333,fontColor:"#000000",fontBackgroundColor:"#ffffff"},"bn-text":{},"bn-chart-time":{scaleFactors:{scenarioOffset:.3,scenarioLabelToColumn:.3,labelToColumn:.3,labelToAxis:.3,needleWidth:.3,needleHeadWidth:.6,columnWidth:2,varianceAxisLineWidth:.3,axisLineWidth:.1,auxiliaryLineWidth:.1,scenarioLineWidth:.2,markerWidth:.7,markerOffset:0,categoryWidth:3,axisTickLength:.3},axisStyles:{ac:{stroke:"#121212",fill:"#121212",width:.1},fc:{stroke:"#121212",fill:"#ffffff",width:.1,dasharray:"10 5 5 5"},pp:{stroke:"#606060",fill:"#606060",width:.1},pl:{stroke:"#121212",fill:"#ffffff",width:.1}},barStyles:{ac:{stroke:"#404040",fill:"#404040",width:.1},fc:{stroke:"#404040",fill:"#ffffff",width:.5,fillpattern:"fc"},pp:{stroke:"#A6A6A6",fill:"#A6A6A6",width:.1},pl:{stroke:"#404040",fill:"#ffffff",width:.1}},varianceStyles:{pos:{stroke:"#008f96",fill:"#008f96",width:.1},neg:{stroke:"#ff0000",fill:"#ff0000",width:.1},neu:{stroke:"#808080",fill:"#808080",width:.1}},stackColors:["#000000","#c0c0c0","#808080"],padding:{top:10,left:10,right:10,bottom:10}},"bn-chart-structure":{scaleFactors:{scenarioOffset:.3,scenarioLabelToBar:.1,labelToBar:.3,labelToAxis:.3,needleWidth:.3,needleHeadWidth:.6,barWidth:1.2,varianceAxisLineWidth:.3,axisLineWidth:.1,auxiliaryLineWidth:.1,scenarioLineWidth:.2,markerWidth:.7,markerOffset:0,categoryWidth:1.9,axisTickLength:.3},axisStyles:{ac:{stroke:"#121212",fill:"#121212",width:.1},fc:{stroke:"#121212",fill:"#ffffff",width:.1,dasharray:"10 5 5 5"},pp:{stroke:"#606060",fill:"#606060",width:.1},pl:{stroke:"#121212",fill:"#ffffff",width:.1}},barStyles:{ac:{stroke:"#404040",fill:"#404040",width:.1},fc:{stroke:"#404040",fill:"#ffffff",width:.5,fillpattern:"fc"},pp:{stroke:"#A6A6A6",fill:"#A6A6A6",width:.1},pl:{stroke:"#404040",fill:"#ffffff",width:.1}},varianceStyles:{pos:{stroke:"#008f96",fill:"#008f96",width:.1},neg:{stroke:"#ff0000",fill:"#ff0000",width:.1},neu:{stroke:"#808080",fill:"#808080",width:.1}},stackColors:["#000000","#c0c0c0","#808080"],padding:{top:10,left:10,right:10,bottom:10}},"bn-tree":{edgeColor:"#404040",edgeWidth:1,operatorCircleRadius:10,operatorFontSizeScale:.9,operatorColor:"#404040"},"bn-grid":{headerBackground:"transparent",borderColor:"#A6A6A6",borderWidth:1,cellPadding:4}};function s(e,t,o=null){o=o||{},t=t?t+".":"";for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&("object"==typeof e[n]&&null!==e[n]?s(e[n],t+n,o):o[t+n]=e[n]);return o}const l=["ORDER_asc","ORDER_desc","ac1","pp1","fc1","pl1","ac2","pp2","fc2","pl2","ac3","pp3","fc3","pl3","ac4","pp4","fc4","pl4","ibcssymbol_delta_ac","ibcssymbol_delta_generic","ibcssymbol_delta_ac_relative","ibcssymbol_delta_generic_relative"],f=s({global:{ac1:"AC",pp1:"PY",fc1:"FC",pl1:"PL",ac2:"AC2",pp2:"PY2",fc2:"FC2",pl2:"PL2",ac3:"AC3",pp3:"PY3",fc3:"FC3",pl3:"PL3",ac4:"AC4",pp4:"PY4",fc4:"FC4",pl4:"PL4",ORDER_asc:"↑",ORDER_desc:"↓",ibcssymbol_delta_ac:"Δ{%}",ibcssymbol_delta_generic:"Δ({%})",ibcssymbol_delta_ac_relative:"Δ{%}%",ibcssymbol_delta_generic_relative:"Δ({%})%"},"bn-title":{SEPERATOR_WS:", ",CONNECTOR_WS:" und ",in:"in"},"bn-chart":{},"bn-table":{in:"in",category:" ",operation:" ",there_of:"davon",part_of:"in % von",SUM_TOTAL:"❖",REST:"REST"}}),c=s({global:{ac1:"AC",pp1:"PY",fc1:"FC",pl1:"PL",ac2:"AC2",pp2:"PY2",fc2:"FC2",pl2:"PL2",ac3:"AC3",pp3:"PY3",fc3:"FC3",pl3:"PL3",ac4:"AC4",pp4:"PY4",fc4:"FC4",pl4:"PL4",ORDER_asc:"↑",ORDER_desc:"↓",ibcssymbol_delta_ac:"Δ{%}",ibcssymbol_delta_generic:"Δ({%})",ibcssymbol_delta_ac_relative:"Δ{%}%",ibcssymbol_delta_generic_relative:"Δ({%})%"},"bn-title":{SEPERATOR_WS:", ",CONNECTOR_WS:" and ",in:"in"},"bn-chart":{},"bn-table":{category:" ",operation:" ",there_of:"there of",part_of:"in % of",SUM_TOTAL:"❖",REST:"REST"}}),d=Object.keys(f||{}),p={_system:{de:f,en:c}},b=new WeakMap;function h(e){let t=b.get(e);return t||(t={datasources:r({}),datasets:r({}),datasetsMeta:r({}),componentStyles:r({_system:a}),internationalization:r(Object.assign({},p)),assets:r({}),context:r({locale:"en"})},b.set(e,t)),t}const u=new WeakMap;function _(e){const t=u.get(e);if(t)return t;const o=function(e){var t;let o=e.parentNode;for(;o;){if(o instanceof HTMLElement&&"bn-context"===(null===(t=o.nodeName)||void 0===t?void 0:t.toLowerCase()))return o;if(o.parentNode)o=o.parentNode;else{if(!(o instanceof ShadowRoot))break;o=o.host}}}(e);if(!o)throw new Error(`[bn] <${e.localName}> must be inside a <bn-context>. No ancestor <bn-context> found.`);const n=h(o);return u.set(e,n),n}function y(e){u.delete(e)}export{d as B,_ as a,h as b,y as c,s as f,l as g}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as t,e as n,f as r,a as s,O as e,T as a,g as o,h as i,M as u,i as c,D as l,j as f,A as m}from"./p-sRO-lj7X.js";import{f as d,g as N}from"./p-JNHhIe7t.js";import{r as v}from"./p-tzFCK9qn.js";function b(t){return null==t||""===t||"null"===t}function p(n){return b(n)||"auto"===n.trim().toLowerCase()?[]:h((null==n?void 0:n.split(",").filter((n=>!(n.toUpperCase().trim()in t)))).toString())}function h(r){return b(r)?[]:r.replace(";",",").split(",").filter((r=>{var s,e,a;const o=r.split("_"),i=null===(s=o[0])||void 0===s?void 0:s.replace(/^dr|^d/,"").toUpperCase().trim(),u=null===(e=o[1])||void 0===e?void 0:e.toUpperCase().trim(),c=null===(a=o[2])||void 0===a?void 0:a.toUpperCase().trim();return 3!==o.length||!(i in t)||!(u in t)||!(c in n)}))}function y(t){return b(t)||"auto"===t.trim().toLowerCase()?[]:h(t.split(",").filter((t=>!(t.toUpperCase()in s))).toString())}function g(t){return!b(t)&&Number.isInteger(Number(t))}function O(t){return!b(t)&&!Number.isNaN(Number(t))}function S(t){return!b(t)&&(null==t?void 0:t.toUpperCase())in e}function J(t){return"auto"===(null==t?void 0:t.toLowerCase())||(null==t?void 0:t.toUpperCase())in r}function w(t){if(b(t))return[];try{const n=JSON.parse(t);if(n instanceof Array)return n.filter((t=>!(t.hasOwnProperty("name")&&t.hasOwnProperty("unit"))))}catch(t){console.error("validateMeasureList: failed to parse JSON",t)}return["Invalid JSON structure"]}function A(t){const n=Date.parse(t);return Number.isInteger(n)}function j(t){return(null==t?void 0:t.toUpperCase())in f}function k(t){return(null==t?void 0:t.toUpperCase())in l}function $(t){return(null==t?void 0:t.toUpperCase())in m}function T(t){return!b(t)&&(null==t?void 0:t.toUpperCase())in o}function z(t){return!b(t)&&["true","false",!0,!1].some((n=>n===t))}function M(t){return!b(t)&&(null==t?void 0:t.toUpperCase())in i}function E(t){if(b(t))return[];try{const n=JSON.parse(t);if(n instanceof Array)return n.filter((t=>!(t.hasOwnProperty("rowGroup")&&t.hasOwnProperty("category")&&t.hasOwnProperty("subCategory"))))}catch(t){console.error("validateThereOfJsonStr: failed to parse JSON",t)}return["Invalid JSON structure"]}function G(t){if(b(t))return[];try{const n=JSON.parse(t);if(n instanceof Array)return n.filter((t=>!(t.hasOwnProperty("rowGroup")&&t.hasOwnProperty("category"))))}catch(t){console.error("validatePartOfJsonStr: failed to parse JSON",t)}return["Invalid JSON structure"]}function I(t){return(null==t?void 0:t.trim().toUpperCase())in u}function x(t){return["_","k","M","G","T","P","E","Z","Y","m","μ","n","p","P","f","a","z","y"].includes(null==t?void 0:t.trim())||["GREATEST","LEAST"].includes(null==t?void 0:t.trim().toUpperCase())}function C(t){return(null==t?void 0:t.toUpperCase().trim())in c}function q(t){return(null==t?void 0:t.toUpperCase().trim())in a}function L(t){if(b(t))return[];try{return JSON.parse(t).filter((t=>!(t.hasOwnProperty("scenario")&&t.hasOwnProperty("name")&&t.hasOwnProperty("subGroups"))))}catch(t){console.error("validateColumnThereOfJsonStr: failed to parse JSON",t)}return["Invalid JSON structure"]}function P(t){if(b(t))return[];try{const n=JSON.parse(t);if("object"!=typeof n||null===n||Array.isArray(n))return["stack: must be a JSON object"];const r=[];if(n.hasOwnProperty("by")){const t=["scenarios","dimensions"];t.includes(n.by)||r.push(`stack: 'by' must be one of: ${t.join(", ")}`)}else r.push("stack: 'by' is required");if(n.hasOwnProperty("mode")){const t=["absolute","relative","absolute-relative"];t.includes(n.mode)||r.push(`stack: 'mode' must be one of: ${t.join(", ")}`)}if(n.hasOwnProperty("order")){const t=["asc","desc","dataset"];t.includes(n.order)||r.push(`stack: 'order' must be one of: ${t.join(", ")}`)}return r}catch(t){return["stack: invalid JSON"]}}class _{constructor(){this.cache=new Map,this.tag=_.makeStyleTag()}static makeStyleTag(){const t=document.createElement("style");return t.type="text/css",t.setAttribute("data-bn-computed-style",""),t.append(document.createTextNode("")),(document.head||document.querySelector("head")).append(t),t}apply(t){t.forEach((t=>this.cache.set(t.className,t.style))),this.tag.innerHTML=Array.from(this.cache.values()).map((t=>t)).join("\n")}}const D=new _;function F(t){for(var n,r=0,s=0,e=t.length;e>=4;++s,e-=4)n=1540483477*(65535&(n=255&t.charCodeAt(s)|(255&t.charCodeAt(++s))<<8|(255&t.charCodeAt(++s))<<16|(255&t.charCodeAt(++s))<<24))+(59797*(n>>>16)<<16),r=1540483477*(65535&(n^=n>>>24))+(59797*(n>>>16)<<16)^1540483477*(65535&r)+(59797*(r>>>16)<<16);switch(e){case 3:r^=(255&t.charCodeAt(s+2))<<16;case 2:r^=(255&t.charCodeAt(s+1))<<8;case 1:r=1540483477*(65535&(r^=255&t.charCodeAt(s)))+(59797*(r>>>16)<<16)}return(((r=1540483477*(65535&(r^=r>>>13))+(59797*(r>>>16)<<16))^r>>>15)>>>0).toString(36)}const R=t=>O(t)?`${t}px`:t,H={width:{className:"w",cssName:"width",attrName:"width",transform:R},height:{className:"h",cssName:"height",attrName:"height",transform:R},position:{className:"pst",cssName:"position",attrName:"position"},top:{className:"top",cssName:"top",attrName:"top",transform:R},right:{className:"rgt",cssName:"right",attrName:"right",transform:R},bottom:{className:"btm",cssName:"bottom",attrName:"bottom",transform:R},left:{className:"lft",cssName:"left",attrName:"left",transform:R},"font-size":{className:"fts",cssName:"font-size",attrName:"font-size",transform:R},"grid-column":{className:"gdc",cssName:"grid-column",attrName:"grid-column"},"grid-row":{className:"gdr",cssName:"grid-row",attrName:"grid-row"}},K=Object.keys(H);function X(t,n){const r=function(t,n){const r=F(n);return`bn-c-${t.className}_${r}`}(t,n),s=function(t,n,r){return`.${n} {${t.cssName}: ${r};}`}(t,r,n);return{className:r,style:s}}const Y=t=>{const n=new Map;return K.forEach((r=>{const s=t.getAttribute(r);s&&(["top","left","right","bottom"].includes(r)&&n.set("position",X(H.position,"absolute")),n.set(r,X(H[r],(H[r].transform||function(t){return t})(s))))})),n},Z=new MutationObserver((t=>{for(const n of t){const t=n.target,r=Y(t);D.apply(r);const s=Array.from(r.values()).map((t=>t.className));t.className=t.className.split(" ").filter((t=>!t.startsWith("bn-c-"))).concat(...s).join(" "),d(t)}})),B=t=>{const n=t.connectedCallback,r=t.disconnectedCallback;t.connectedCallback=()=>{const r=N(t);if(!r)throw new Error("Can't find element field in component undefined");(t=>{const n=Y(t);D.apply(n);const r=Array.from(n.values()).map((t=>t.className));t.className=t.className.split(" ").filter((t=>!t.startsWith("bn-c-"))).concat(...r).join(" "),Z.observe(t,{attributes:!0,attributeFilter:K,childList:!1,subtree:!1})})(r),v(n,t)},t.disconnectedCallback=()=>{v(r,t)}};export{h as a,g as b,J as c,y as d,S as e,k as f,P as g,$ as h,O as i,z as j,x as k,b as l,F as m,q as n,T as o,M as p,E as q,G as r,I as s,C as t,L as u,p as v,B as w,w as x,A as y,j as z}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t,e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}class i{constructor(t){this.type="",this.base="",this.delta="",this.direction="",this.isValid=!1;const e=/(d|dr)(pl\d|ac\d|fc\d|pp\d)_(pl\d|ac\d|fc\d|pp\d)_(pos|neg|neu)/;if(e.test(t)){const n=e.exec(t);null!=n&&(this.type=String(n[1]),this.base=String(n[2]),this.delta=String(n[3]),this.direction=String(n[4]),this.isValid=!0)}}}!function(t){t.OPERATION="operation",t.ROWGROUP="rowGroup",t.ROWGROUPINDEX="rowGroupIndex",t.CURRENTROW="currentRow",t.CATEGORY="category",t.CATEGORYINDEX="categoryIndex",t.SUBCATEGORY="subCategory",t.SUBCATEGORYINDEX="subCategoryIndex",t.COLUMNGROUP="columnGroup",t.COLUMNGROUPINDEX="columnIndex",t.COLUMNSUBGROUP="columnSubGroup",t.COLUMNSUBGROUPINDEX="columnSubGroupIndex",t.AC1="ac1",t.AC2="ac2",t.AC3="ac3",t.AC4="ac4",t.PP1="pp1",t.PP2="pp2",t.PP3="pp3",t.PP4="pp4",t.FC1="fc1",t.FC2="fc2",t.FC3="fc3",t.FC4="fc4",t.PL1="pl1",t.PL2="pl2",t.PL3="pl3",t.PL4="pl4",t.TOTALROWCOUNT="totalRowCnt",t.ROWNR="rowNr",t.TYPE="type"}(t||(t={}));var r,o={},a=n(function(){if(r)return o;r=1;var t={};return Object.defineProperty(o,"__esModule",{value:!0}),o.default=function(e,n){void 0===n&&(n={});var i=JSON.stringify({text:e,options:n});if(t[i])return t[i];n.font=n.font||"Times",n.fontSize=n.fontSize||"16px",n.fontWeight=n.fontWeight||"normal",n.width=n.width||"auto";var r=function(t,e){var n=document.createElement("div"),i=document.createTextNode(t);return n.appendChild(i),n.style.fontFamily=e.font,n.style.fontSize=e.fontSize,n.style.fontWeight=e.fontWeight,n.style.position="absolute",n.style.visibility="hidden",n.style.left="-999px",n.style.top="-999px",n.style.width=e.width,n.style.height="auto",document.body.appendChild(n),n}(e,n),o={width:r.offsetWidth,height:r.offsetHeight};return function(t){t.parentNode.removeChild(t)}(r),t[i]=o,o},o}());class s{static number(t,e="decimal",n=1,i=0,r=1){return(t/r).toLocaleString("de-DE",{style:e,useGrouping:!0,maximumFractionDigits:n,minimumFractionDigits:i}).replace(/\s+(%)/g,"$1").replace(/\s/g,this.postfixSeperator).replace(/\./g,this.tsdDelimiter)}static translateScenarioLabel(e,n){if(null==e)return"";const r=new i(e);if(!r.isValid)return`${n.get(e)||e}`;let o,a;return t.AC1===r.base?(o=n.get("dr"===r.type?"ibcssymbol_delta_ac_relative":"ibcssymbol_delta_ac"),a=n.get(r.delta)||r.delta):(o=n.get("dr"===r.type?"ibcssymbol_delta_generic_relative":"ibcssymbol_delta_generic"),a=`${n.get(r.base)||r.base} - ${n.get(r.delta)||r.delta}`),void 0===o&&(o="{%}"),`${o.replace("{%}",a)}`}static getMaxWidthOfArrayItems(t,e,n){return a(t.map((t=>s.translateScenarioLabel(t,e))).reduce(((t,e)=>t.length<e.length?e:t),""),{font:n.fontStyles.font,fontSize:n.fontStyles.size+"px"}).width}}s.tsdDelimiter=".",s.postfixSeperator=",";export{a as C,s as F,t as Q,i as V,e as c,n as g}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as e,f as t}from"./p-JNHhIe7t.js";import{a as r,c as s}from"./p-B0lsgVuN.js";import{r as c}from"./p-tzFCK9qn.js";const n=e=>{if("object"==typeof e&&null!==e){if("function"==typeof Object.getPrototypeOf){const t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}return"[object Object]"===Object.prototype.toString.call(e)}return!1},o=(e,t)=>t,a=(e,t)=>[...new Set([...e,...t])],l=(e,t)=>{const r=(e=>{return{arrayMergeType:"combine",arrayMerge:(t=e?e.arrayMergeType:"combine","overwrite"===t?o:a),...e};var t})(t);return e.reduce(((e,t)=>(Object.keys(t).forEach((s=>{Array.isArray(e[s])&&Array.isArray(t[s])?r&&r.arrayMerge&&(e[s]=r.arrayMerge(e[s],t[s])):e[s]=n(e[s])&&n(t[s])?l([e[s],t[s]],r):t[s]})),e)),{})},b=n=>{let o,a,b,i;const u=()=>{const e=a.componentStyles.state;i=l([e._system||{},e._default||{},e[b]||{}])},y=new MutationObserver((r=>{r.forEach((r=>{"selected-style"===r.attributeName&&(b=e(n).getAttribute("selected-style"),u(),t(n))}))})),j=n.connectedCallback;n.connectedCallback=()=>{const s=e(n);a=r(s),i=a.componentStyles.state._system,y.observe(s,{attributes:!0,attributeFilter:["selected-style"]}),b=e(n).getAttribute("selected-style"),u(),o=a.componentStyles.on("set",(r=>{r===b&&(b=e(n).getAttribute("selected-style"),u(),t(e(n)))})),c(j,n)};const p=n.disconnectedCallback;return n.disconnectedCallback=()=>{y.disconnect(),c(o),s(e(n)),c(p,n)},e=>e(i)};export{b as w}
|