@bino-bi/bn-template-engine 1.0.0-next.45 → 1.0.0-next.47
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/index.esm.js +1 -1
- package/dist/bn-template-engine/{p-DVE0-sOv.js → p-3ktFZb1x.js} +1 -1
- package/dist/bn-template-engine/p-444a231f.entry.js +1 -0
- package/dist/bn-template-engine/{p-48871742.entry.js → p-6ab684a9.entry.js} +1 -1
- package/dist/bn-template-engine/p-7pLJBHT2.js +1 -0
- package/dist/bn-template-engine/{p-5a64f90f.entry.js → p-9a24e486.entry.js} +1 -1
- package/dist/bn-template-engine/p-BL07yV8P.js +1 -0
- package/dist/bn-template-engine/p-DXtYQE4s.js +1 -0
- package/dist/bn-template-engine/p-DY5fMUX8.js +1 -0
- package/dist/bn-template-engine/{p-qpZjVnX5.js → p-Dvlw60RF.js} +1 -1
- package/dist/bn-template-engine/p-GstO_GU5.js +2 -0
- package/dist/bn-template-engine/p-a6017fce.entry.js +1 -0
- package/dist/bn-template-engine/{p-8b28c9bd.entry.js → p-b3f5eba0.entry.js} +1 -1
- package/dist/bn-template-engine/p-ddc1b2a9.entry.js +1 -0
- package/dist/bn-template-engine/p-hV2evPFR.js +1 -0
- package/dist/cjs/bn-annotation-layer_30.cjs.entry.js +657 -114
- package/dist/cjs/bn-grid.cjs.entry.js +164 -37
- package/dist/cjs/bn-image.cjs.entry.js +3 -3
- package/dist/cjs/bn-internationalization.cjs.entry.js +3 -3
- package/dist/cjs/bn-ruleset.cjs.entry.js +3 -3
- package/dist/cjs/bn-template-engine.cjs.js +2 -2
- package/dist/cjs/bn-text.cjs.entry.js +4 -4
- package/dist/cjs/index-CM6022qm.js +66 -0
- package/dist/cjs/{index-DGis1BzT.js → index-DwBbheYB.js} +2 -1
- package/dist/cjs/index.cjs.js +6 -14
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{localFrame-U3Qs0psw.js → localFrame-C4RBw_zT.js} +1 -1
- package/dist/cjs/types-BngAWYMW.js +17 -0
- package/dist/cjs/{withBodyObserver-S-FGHpAX.js → withBodyObserver-CIGVLQEB.js} +2 -2
- package/dist/cjs/{withHasError-BkBrsCpI.js → withHasError-CZFrIJw0.js} +12 -6
- package/dist/cjs/{withStyled-BZb6snOx.js → withStyled-DHKHBdRb.js} +41 -6
- package/dist/cjs/{withTranslation-1qTs5Fi7.js → withTranslation-CLwC9a8V.js} +3 -3
- package/dist/collection/components/bn-annotation-layer/bn-annotation-layer.js +33 -2
- package/dist/collection/components/bn-chart-structure/bn-chart-structure.js +112 -16
- package/dist/collection/components/bn-chart-structure/utils/StructureChart.js +1 -1
- package/dist/collection/components/bn-chart-structure/utils/elements/Needle.js +3 -3
- package/dist/collection/components/bn-chart-time/bn-chart-time-renderer/bn-chart-time-renderer.js +113 -3
- package/dist/collection/components/bn-chart-time/bn-chart-time.js +261 -22
- package/dist/collection/components/bn-chart-time/utils/TimeChart.js +224 -14
- package/dist/collection/components/bn-chart-time/utils/elements/AreaFill.js +1 -9
- package/dist/collection/components/bn-chart-time/utils/elements/Axis.js +9 -1
- package/dist/collection/components/bn-chart-time/utils/elements/Column.js +10 -4
- package/dist/collection/components/bn-chart-time/utils/elements/LineSeries.js +1 -6
- package/dist/collection/components/bn-chart-time/utils/elements/Needle.js +9 -3
- package/dist/collection/components/bn-chart-time/utils/factories/ScenarioFactory.js +2 -2
- package/dist/collection/components/bn-chart-time/utils/model/DataPoint.js +9 -6
- package/dist/collection/components/bn-chart-time/utils/model/TimeChartComponentConfig.js +15 -0
- package/dist/collection/components/bn-context/bn-context.js +86 -1
- package/dist/collection/components/bn-grid/bn-grid.js +118 -24
- package/dist/collection/components/bn-grid/utils/cellLayout.js +55 -9
- package/dist/collection/components/bn-layout-card/bn-layout-card.js +4 -2
- package/dist/collection/components/bn-layout-page/bn-layout-page.js +23 -1
- package/dist/collection/components/bn-title/bn-title-renderer/bn-title-renderer.css +10 -0
- package/dist/collection/components/bn-title/bn-title-renderer/bn-title-renderer.js +23 -1
- package/dist/collection/components/bn-title/bn-title.js +40 -2
- package/dist/collection/index.js +1 -0
- package/dist/collection/stores/componentStyles.js +9 -3
- package/dist/collection/stores/internationalization.js +2 -2
- package/dist/collection/utils/DateStringFactory.js +19 -0
- package/dist/collection/utils/model/DataFormatDigits.js +4 -2
- package/dist/collection/utils/model/VarianceScenario.js +13 -0
- package/dist/collection/utils/notation.js +56 -0
- package/dist/collection/utils/validate.js +4 -0
- package/dist/collection/utils/withComponentStyle.js +14 -4
- package/dist/components/bn-annotation-layer.js +1 -1
- package/dist/components/bn-annotation-list.js +1 -1
- package/dist/components/bn-asset.js +1 -1
- package/dist/components/bn-body.js +1 -1
- package/dist/components/bn-card.js +1 -1
- package/dist/components/bn-chart-bubble-renderer.js +1 -1
- package/dist/components/bn-chart-bubble.js +1 -1
- package/dist/components/bn-chart-bullet-renderer.js +1 -1
- package/dist/components/bn-chart-bullet.js +1 -1
- package/dist/components/bn-chart-scatter-renderer.js +1 -1
- package/dist/components/bn-chart-scatter.js +1 -1
- package/dist/components/bn-chart-structure-renderer.js +1 -1
- package/dist/components/bn-chart-structure.js +1 -1
- package/dist/components/bn-chart-time-renderer.js +1 -1
- package/dist/components/bn-chart-time.js +1 -1
- package/dist/components/bn-component-style.js +1 -1
- package/dist/components/bn-context.js +1 -1
- package/dist/components/bn-dataset.js +1 -1
- package/dist/components/bn-datasource.js +1 -1
- package/dist/components/bn-footer.js +1 -1
- package/dist/components/bn-grid.js +1 -1
- package/dist/components/bn-image.js +1 -1
- package/dist/components/bn-internationalization.js +1 -1
- package/dist/components/bn-layout-card.js +1 -1
- package/dist/components/bn-layout-page.js +1 -1
- package/dist/components/bn-message.js +1 -1
- package/dist/components/bn-page.js +1 -1
- package/dist/components/bn-ruleset.js +1 -1
- package/dist/components/bn-scaling-group.js +1 -1
- package/dist/components/bn-table-renderer.js +1 -1
- package/dist/components/bn-table.js +1 -1
- package/dist/components/bn-text.js +1 -1
- package/dist/components/bn-title-renderer.js +1 -1
- package/dist/components/bn-title.js +1 -1
- package/dist/components/bn-tree.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/{p-fKJx8WtW.js → p-2t-lysdb.js} +1 -1
- package/dist/components/{p-2eicD9rF.js → p-4xaxuPVU.js} +1 -1
- package/dist/components/p-6242qMx1.js +1 -0
- package/dist/components/p-6gET6YXc.js +1 -0
- package/dist/components/p-BFWvVe7v.js +1 -0
- package/dist/components/{p-CyfGkLMh.js → p-BFoRIqDi.js} +1 -1
- package/dist/components/p-BP2sJ8k9.js +1 -0
- package/dist/components/{p-B4L069XF.js → p-BgdoWKFY.js} +1 -1
- package/dist/components/{p-BzjGUtYh.js → p-BjgkgCAQ.js} +1 -1
- package/dist/components/p-BnmylmXF.js +2 -0
- package/dist/components/p-Bp5Xj4-s.js +1 -0
- package/dist/components/{p-Dq9dG0Kr.js → p-BrQCbmG0.js} +1 -1
- package/dist/components/{p-NBaq67dL.js → p-C-3TOa6K.js} +1 -1
- package/dist/components/{p-M2k_I8lv.js → p-C8rpOS5t.js} +1 -1
- package/dist/components/{p-BfUdaxZ9.js → p-CG-iY7pQ.js} +1 -1
- package/dist/components/{p-B2bvM2Ig.js → p-CLjuZoiT.js} +1 -1
- package/dist/components/p-CUoPUIej.js +1 -0
- package/dist/components/p-CZzlLTQc.js +1 -0
- package/dist/components/p-CmvpJzLd.js +1 -0
- package/dist/components/{p-CvEdUq8i.js → p-CrZ_O3DT.js} +1 -1
- package/dist/components/{p-eWxolPDU.js → p-CytMTBFu.js} +1 -1
- package/dist/components/{p-4vVbchX2.js → p-D32TsLzd.js} +1 -1
- package/dist/components/p-D3hr9wra.js +1 -0
- package/dist/components/{p-BXg3v5AO.js → p-DDo-fu3v.js} +1 -1
- package/dist/components/{p-B5tixDPM.js → p-DFybNETX.js} +1 -1
- package/dist/components/p-DJSj3oQq.js +1 -0
- package/dist/components/p-DMAaBt7n.js +1 -0
- package/dist/components/{p-Cel0a6ma.js → p-DRU71K0s.js} +1 -1
- package/dist/components/p-DRmphEA0.js +1 -0
- package/dist/components/{p-9mUU4itF.js → p-DUZCLRVu.js} +1 -1
- package/dist/components/p-DY5fMUX8.js +1 -0
- package/dist/components/p-D_K7tYhY.js +1 -0
- package/dist/components/{p-DaOm9YwQ.js → p-DdvG1D18.js} +1 -1
- package/dist/components/p-Do4GqlMV.js +1 -0
- package/dist/components/p-Dw3rv_Y9.js +1 -0
- package/dist/components/{p-BXXjh6We.js → p-Dyzb4ika.js} +1 -1
- package/dist/components/p-JG4Sx1lE.js +1 -0
- package/dist/components/p-TNX3alPU.js +1 -0
- package/dist/components/p-Uc0zvXcQ.js +1 -0
- package/dist/components/p-VtNvNyZK.js +1 -0
- package/dist/components/{p-Y9bth2Y_.js → p-Zuxd3z0q.js} +1 -1
- package/dist/components/{p-7ieJFBUk.js → p-dO0utE8m.js} +1 -1
- package/dist/components/{p-16rjcQ0t.js → p-j42D1yrQ.js} +1 -1
- package/dist/components/p-ja0FCkHB.js +1 -0
- package/dist/esm/bn-annotation-layer_30.entry.js +646 -103
- package/dist/esm/bn-grid.entry.js +163 -36
- package/dist/esm/bn-image.entry.js +3 -3
- package/dist/esm/bn-internationalization.entry.js +3 -3
- package/dist/esm/bn-ruleset.entry.js +3 -3
- package/dist/esm/bn-template-engine.js +3 -3
- package/dist/esm/bn-text.entry.js +4 -4
- package/dist/esm/index-DZHir0Ol.js +60 -0
- package/dist/esm/{index-CCZcKl0Q.js → index-GstO_GU5.js} +2 -2
- package/dist/esm/index.js +2 -15
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{localFrame-BNWPPaQa.js → localFrame-WNu1bAPm.js} +1 -1
- package/dist/esm/types-DY5fMUX8.js +15 -0
- package/dist/esm/{withBodyObserver-AHQAUV85.js → withBodyObserver-wJgSN1Pj.js} +2 -2
- package/dist/esm/{withHasError-B6Lvj9Cq.js → withHasError-BDWEBrrb.js} +12 -6
- package/dist/esm/{withStyled-CzzXg64f.js → withStyled-CTZFjg4L.js} +40 -7
- package/dist/esm/{withTranslation-C1gL7wSU.js → withTranslation-BESW5BNq.js} +3 -3
- package/dist/schemas/theme.schema.json +18 -0
- package/dist/types/components/bn-annotation-layer/bn-annotation-layer.d.ts +11 -0
- package/dist/types/components/bn-chart-structure/bn-chart-structure.d.ts +16 -0
- package/dist/types/components/bn-chart-structure/utils/elements/Needle.d.ts +2 -1
- package/dist/types/components/bn-chart-time/bn-chart-time-renderer/bn-chart-time-renderer.d.ts +8 -0
- package/dist/types/components/bn-chart-time/bn-chart-time.d.ts +46 -1
- package/dist/types/components/bn-chart-time/utils/TimeChart.d.ts +37 -0
- package/dist/types/components/bn-chart-time/utils/elements/Axis.d.ts +2 -0
- package/dist/types/components/bn-chart-time/utils/elements/Needle.d.ts +2 -1
- package/dist/types/components/bn-chart-time/utils/factories/ScenarioFactory.d.ts +1 -1
- package/dist/types/components/bn-chart-time/utils/model/DataPoint.d.ts +6 -1
- package/dist/types/components/bn-chart-time/utils/model/TimeChartComponentConfig.d.ts +6 -0
- package/dist/types/components/bn-context/bn-context.d.ts +25 -0
- package/dist/types/components/bn-grid/bn-grid.d.ts +23 -0
- package/dist/types/components/bn-grid/utils/cellLayout.d.ts +39 -3
- package/dist/types/components/bn-layout-card/bn-layout-card.d.ts +3 -1
- package/dist/types/components/bn-layout-page/bn-layout-page.d.ts +9 -0
- package/dist/types/components/bn-title/bn-title-renderer/bn-title-renderer.d.ts +2 -0
- package/dist/types/components/bn-title/bn-title.d.ts +10 -0
- package/dist/types/components.d.ts +199 -6
- package/dist/types/index.d.ts +2 -0
- package/dist/types/stores/componentStyles.d.ts +8 -0
- package/dist/types/utils/DateStringFactory.d.ts +4 -0
- package/dist/types/utils/layoutState/types.d.ts +3 -0
- package/dist/types/utils/model/VarianceScenario.d.ts +2 -0
- package/dist/types/utils/notation.d.ts +78 -0
- package/dist/types/utils/validate.d.ts +2 -0
- package/dist/types/utils/withComponentStyle.d.ts +6 -0
- package/package.json +1 -1
- package/dist/bn-template-engine/p-1b002bd5.entry.js +0 -1
- package/dist/bn-template-engine/p-750b2c82.entry.js +0 -1
- package/dist/bn-template-engine/p-CCZcKl0Q.js +0 -2
- package/dist/bn-template-engine/p-D0tNATZq.js +0 -1
- package/dist/bn-template-engine/p-DF9sfwBN.js +0 -1
- package/dist/bn-template-engine/p-EcC0qLtU.js +0 -1
- package/dist/bn-template-engine/p-b0dfc113.entry.js +0 -1
- package/dist/components/p-1B_s8oPY.js +0 -1
- package/dist/components/p-AwH1w8Mu.js +0 -1
- package/dist/components/p-BPGLOHUe.js +0 -1
- package/dist/components/p-BiSytXUy.js +0 -1
- package/dist/components/p-C2ycO60j.js +0 -1
- package/dist/components/p-C3gYq-HU.js +0 -1
- package/dist/components/p-CEf5X8MZ.js +0 -1
- package/dist/components/p-Chuj-LpI.js +0 -1
- package/dist/components/p-CniN8ALm.js +0 -1
- package/dist/components/p-D40Am1Ap.js +0 -1
- package/dist/components/p-D6YGOYV1.js +0 -2
- package/dist/components/p-DDvWTgk1.js +0 -1
- package/dist/components/p-DJUffGeB.js +0 -1
- package/dist/components/p-DQl2K2Xl.js +0 -1
- package/dist/components/p-DjPWZfry.js +0 -1
- package/dist/components/p-DnDL1pPc.js +0 -1
- package/dist/components/p-Do4oPrkE.js +0 -1
- package/dist/components/p-DwuXVo2h.js +0 -1
- package/dist/components/p-sLbQ7yZ1.js +0 -1
- package/dist/components/p-xIWChKGS.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,H as s,h as t,
|
|
1
|
+
import{p as e,H as s,h as t,d as i,t as n}from"./p-BnmylmXF.js";import{w as o}from"./p-BrQCbmG0.js";import{w as a}from"./p-JG4Sx1lE.js";import{g as r}from"./p-6242qMx1.js";import{w as l}from"./p-D32TsLzd.js";import{s as m}from"./p-CyUmrWfW.js";const d=e(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),o(this),this.errors=l(this),this.componentStyle=a(this)}connectedCallback(){this.stores=r(this.element)}getFontStyles(){return this.componentStyle((e=>{var s,t,i,n;return{"--bn-font-family":(null===(s=e.global)||void 0===s?void 0:s.fontFamily)||"'Noto Sans', sans-serif","--bn-font-size":`${(null===(t=e.global)||void 0===t?void 0:t.fontSizePx)||13.3333}px`,"--bn-font-color":(null===(i=e.global)||void 0===i?void 0:i.fontColor)||"#000000","--bn-font-background":(null===(n=e.global)||void 0===n?void 0:n.fontBackgroundColor)||"#ffffff"}}))}prepareAssetUrl(e){if(null==e||""===e)return"";const s=this.stores.assets.state;return e.startsWith("asset:")?s[e.substring(6)]:s[e]||e}render(){return t(i,{key:"4de8953156b05196149fe7a89e2b6a2d9f831695",id:this.text||this.image?"container-page-message":"container",style:this.getFontStyles()},t("div",{key:"ca005a6c2c06b59facea40c0aab4e146d51be557",id:"message-text"},null!=this.text&&""!==this.text?t("span",{class:"note",innerHTML:m(this.text)}):""),t("div",{key:"8fbdc7014401f0f02ef5c79b37bcc57b29a18a59",id:"page-image"},null!=this.image&&""!==this.image?t("img",{class:"image",src:this.prepareAssetUrl(this.image)}):""))}get element(){return this}static get style(){return':host{padding:0.2em 0.5em;display:flex;flex-direction:row;justify-content:space-between;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(#container-page-message){min-height:4.55em;box-sizing:border-box;-webkit-box-sizing:border-box;border-bottom:0.1em solid #ddd}div#message-text{font-size:1.4em;overflow:clip;display:inline}span.note p{margin:0}.image{z-index:2;background-color:transparent;border:transparent;height:4em;width:auto;display:block}'}},[1,"bn-message",{selectedStyle:[513,"selected-style"],text:[1025],image:[1]}]);function f(){"undefined"!=typeof customElements&&["bn-message"].forEach((e=>{"bn-message"===e&&(customElements.get(n(e))||customElements.define(n(e),d))}))}export{d as F,f as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{f as t,c as s}from"./p-BnmylmXF.js";import{g as r,c as e}from"./p-6242qMx1.js";import{r as o}from"./p-BrQCbmG0.js";import{i as l,f as a,r as u}from"./p-CUoPUIej.js";import{m as n}from"./p-B2NXsfMz.js";const i=i=>{let m,f,p,c,b,j=null;const M=()=>{const t=f.ruleSets.state;b=n([t._default||{},t[p]||{}]),c=n([t._system||{},b])},w=()=>{const r=s(i),e=r.getAttribute("ruleset");if(j&&(j.disconnect(),j=null),e&&l(e)){const s=a(r,e);if(p=u(s,"ruleset"),s.length>0){j=new MutationObserver((()=>{p=u(s,"ruleset"),M(),t(i)}));for(const t of s)j.observe(t,{attributes:!0,attributeFilter:["ruleset"]})}}else p=e},B=new MutationObserver((s=>{s.forEach((s=>{"ruleset"===s.attributeName&&(w(),M(),t(i))}))})),F=i.connectedCallback;i.connectedCallback=()=>{const e=s(i);f=r(e),c=f.ruleSets.state._system,B.observe(e,{attributes:!0,attributeFilter:["ruleset"]}),w(),M(),m=f.ruleSets.on("set",(r=>{r!==p&&"_default"!==r||(w(),M(),t(s(i)))})),o(F,i)};const v=i.disconnectedCallback;return i.disconnectedCallback=()=>{B.disconnect(),j&&(j.disconnect(),j=null),o(m),e(s(i)),o(v,i)},(t="all")=>"user"===t?b:c};export{i as w}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as n}from"./p-
|
|
1
|
+
import{C as n}from"./p-DFybNETX.js";function i(n,i){var o;const e=null!==(o=null==n?void 0:n.trim())&&void 0!==o?o:"";if(""===e||"null"===e)return{data:null,parseError:!1};if(e.startsWith("{")||e.startsWith("["))try{const n=JSON.parse(e);return"object"!=typeof n||null===n||Array.isArray(n)?{data:null,parseError:!0}:{data:n,parseError:!1}}catch(n){return{data:null,parseError:!0}}return null!==i?{data:{[i]:e},parseError:!1}:{data:null,parseError:!0}}function o(n,i){return Object.keys(n).filter((n=>!i.includes(n)))}function e(i,o,e){if(n.isExisting(i[o]))return n.isString(i[o])?i[o]:void e.push(o)}function r(i,o,e){if(n.isExisting(i[o]))return n.isNumber(i[o])?i[o]:void e.push(o)}const t=["measure","label","unit","min","max","refLine","highlight"];function u(i){const u=[],l=e(i,"measure",u);if(void 0===l||""===l.trim())return u.push("measure"),{config:null,unknownKeys:o(i,t),invalidFields:u};const s={measure:l.trim()};return s.label=e(i,"label",u),s.unit=e(i,"unit",u),s.min=r(i,"min",u),s.max=r(i,"max",u),s.refLine=r(i,"refLine",u),s.highlight=function(i,o){if(!n.isExisting(i.highlight))return;if(!n.isObject(i.highlight)||Array.isArray(i.highlight))return void o.push("highlight");const e=i.highlight,t={},u=r(e,"from",o),l=r(e,"to",o);return void 0!==u&&(t.from=u),void 0!==l&&(t.to=l),t}(i,u),{config:s,unknownKeys:o(i,t),invalidFields:u}}const l=["measure","label","unit","group"];function s(n){const i=[],r=e(n,"measure",i);if(void 0===r||""===r.trim())return i.push("measure"),{config:null,unknownKeys:o(n,l),invalidFields:i};const t={measure:r.trim()};return t.label=e(n,"label",i),t.unit=e(n,"unit",i),t.group=e(n,"group",i),{config:t,unknownKeys:o(n,l),invalidFields:i}}const a=["measure"];function c(n){const i=[],r=e(n,"measure",i);return void 0===r||""===r.trim()?(i.push("measure"),{config:null,unknownKeys:o(n,a),invalidFields:i}):{config:{measure:r.trim()},unknownKeys:o(n,a),invalidFields:i}}const f=["values","label","unit","highlight"];function d(i){const t=[];let u=null;if("auto"===i.values?u="auto":n.isArray(i.values)&&i.values.every((i=>n.isNumber(i)))?u=i.values:t.push("values"),null===u)return{config:null,unknownKeys:o(i,f),invalidFields:t};const l={values:u};if(l.label=e(i,"label",t),l.unit=e(i,"unit",t),n.isExisting(i.highlight))if(n.isObject(i.highlight)&&!Array.isArray(i.highlight)){const n=r(i.highlight,"from",t);void 0!==n&&(l.highlight={from:n})}else t.push("highlight");return{config:l,unknownKeys:o(i,f),invalidFields:t}}const v=["points","values","max"];function m(i,e){const r=[],t={points:e.points,values:e.values,max:e.max};return n.isExisting(i.points)&&("auto"===i.points||"none"===i.points||"all"===i.points||n.isArray(i.points)&&i.points.every((i=>n.isString(i)))?t.points=i.points:r.push("points")),n.isExisting(i.values)&&(n.isBoolean(i.values)?t.values=i.values:r.push("values")),n.isExisting(i.max)&&(n.isNumber(i.max)&&i.max>0?t.max=Math.floor(i.max):r.push("max")),{config:t,unknownKeys:o(i,v),invalidFields:r}}const g=["level","columns"];function h(i){const e=[],r=n.isString(i.level)?i.level.toLowerCase():null;if("rowgroup"!==r&&"category"!==r)return e.push("level"),{config:null,unknownKeys:o(i,g),invalidFields:e};const t={level:r};return n.isExisting(i.columns)&&(n.isNumber(i.columns)&&i.columns>=1?t.columns=Math.floor(i.columns):e.push("columns")),{config:t,unknownKeys:o(i,g),invalidFields:e}}const p=["show","position"];function y(i){const e=[],r={show:!0,position:"right"};return n.isExisting(i.show)&&(n.isBoolean(i.show)?r.show=i.show:e.push("show")),n.isExisting(i.position)&&("right"===i.position||"bottom"===i.position?r.position=i.position:e.push("position")),{config:r,unknownKeys:o(i,p),invalidFields:e}}export{s as a,c as b,h as c,m as d,y as e,d as f,i as p,u as t}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const o=1;export{o as L}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{m as t}from"./p-BYBpC0EO.js";import{o as s}from"./p-Dw3rv_Y9.js";import{f as e,c as o}from"./p-BnmylmXF.js";import{r}from"./p-BrQCbmG0.js";class a{constructor(){this.cache=new Map,this.tag=a.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.textContent=Array.from(this.cache.values()).map((t=>t)).join("\n")}}const n=new a,m=t=>s(t)?`${t}px`:t,c={width:{className:"w",cssName:"width",attrName:"width",transform:m},height:{className:"h",cssName:"height",attrName:"height",transform:m},position:{className:"pst",cssName:"position",attrName:"position"},top:{className:"top",cssName:"top",attrName:"top",transform:m},right:{className:"rgt",cssName:"right",attrName:"right",transform:m},bottom:{className:"btm",cssName:"bottom",attrName:"bottom",transform:m},left:{className:"lft",cssName:"left",attrName:"left",transform:m},"font-size":{className:"fts",cssName:"font-size",attrName:"font-size",transform:m},"grid-column":{className:"gdc",cssName:"grid-column",attrName:"grid-column"},"grid-row":{className:"gdr",cssName:"grid-row",attrName:"grid-row"}},i=Object.keys(c);function f(t,s,e){return`.${s} {${t.cssName}: ${e};}`}function l(s,e){const o=document.createElement("div").style;o.setProperty(s.cssName,e);const r=o.getPropertyValue(s.cssName);if(o.cssText=`${s.cssName}:${r};--bn-end:1`,!r||r.includes("<")||"1"!==o.getPropertyValue("--bn-end"))return;const a=function(s,e){const o=t(e);return`bn-c-${s.className}_${o}`}(s,e);return{className:a,style:f(s,a,r)}}const N=t=>{const s=new Map;return i.forEach((e=>{const o=t.getAttribute(e);if(o){["top","left","right","bottom"].includes(e)&&s.set("position",l(c.position,"absolute"));const t=l(c[e],(c[e].transform||function(t){return t})(o));t&&s.set(e,t)}})),s},d=new MutationObserver((t=>{for(const s of t){const t=s.target,o=N(t);n.apply(o);const r=Array.from(o.values()).map((t=>t.className));t.className=t.className.split(" ").filter((t=>!t.startsWith("bn-c-"))).concat(...r).join(" "),e(t)}})),p=t=>{const s=t.connectedCallback,e=t.disconnectedCallback;t.connectedCallback=()=>{const e=o(t);if(!e)throw new Error("Can't find element field in component undefined");(t=>{const s=N(t);n.apply(s);const e=Array.from(s.values()).map((t=>t.className));t.className=t.className.split(" ").filter((t=>!t.startsWith("bn-c-"))).concat(...e).join(" "),d.observe(t,{attributes:!0,attributeFilter:i,childList:!1,subtree:!1})})(e),r(s,t)},t.disconnectedCallback=()=>{r(e,t)}};export{p as w}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as t}from"./p-
|
|
1
|
+
import{f as t}from"./p-6242qMx1.js";const n=t=>Math.round(100*t)/100;function o(t){return{x:n(t.left),y:n(t.top),width:n(t.width),height:n(t.height)}}function e(t,o){const e=n(t.width),i=n(t.height);return{context:{x:n(t.left-o.context.x),y:n(t.top-o.context.y),width:e,height:i},component:{x:n(t.left-o.component.x),y:n(t.top-o.component.y),width:e,height:i}}}function i(t,n){return e(t.getBoundingClientRect(),n)}function r(t){const n=getComputedStyle(t,"::before").content;if(!n||"none"===n||"normal"===n)return 0;const o=t.ownerDocument.createElement("canvas").getContext("2d");if(!o)return 0;const{fontStyle:e,fontWeight:i,fontSize:r,fontFamily:c}=getComputedStyle(t);return o.font=`${e} ${i} ${r} ${c}`,o.measureText(n.replace(/^"|"$/g,"")).width}function c(t,n){var o,i;const r=null===(i=null===(o=t.ownerDocument)||void 0===o?void 0:o.createRange)||void 0===i?void 0:i.call(o);if(!r)return;const c=t.getBoundingClientRect(),s=t.querySelector("svg text");let f;if(s)f=s.getBoundingClientRect();else{r.selectNodeContents(t);const n=t.querySelector(".prefix-second");n&&r.setStartAfter(n),f=r.getBoundingClientRect()}const u=Math.max(f.left,c.left),h=Math.max(f.top,c.top),a=Math.min(f.right,c.right)-u,d=Math.min(f.bottom,c.bottom)-h;return a>0&&d>0?e({left:u,top:h,width:a,height:d},n):void 0}function s(n){const o=n.getBoundingClientRect(),e=t(n),i=e?e.getBoundingClientRect():o;return{context:{x:i.left,y:i.top},component:{x:o.left,y:o.top}}}export{c as a,r as b,i as m,s as o,o as t}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as t,H as i,h as s,d as h,t as e}from"./p-BnmylmXF.js";import{S as n,F as r,a as o,P as a}from"./p-CytMTBFu.js";import{C as l,A as c,g as u,e as d}from"./p-DFybNETX.js";import{D as f,b as p}from"./p-dO0utE8m.js";import{c as v,O as g,a as b}from"./p-j42D1yrQ.js";import{S as m}from"./p-CeE4_3wQ.js";import{a as w,F as P,I as y,C as S,b as x,V as L,s as k}from"./p-CmvpJzLd.js";import{g as C,a as M,I as T}from"./p-4q8nRcWC.js";import{d as O,l as $,S as A}from"./p-BjgkgCAQ.js";import{N,r as E}from"./p-fCjsrD7I.js";import{s as _,c as D,a as W,l as R,b as B,d as j,M as X}from"./p-BTnRaHPb.js";import{d as Y,g as V}from"./p-6242qMx1.js";import{e as F,r as z}from"./p-ClruFZD_.js";import{S as G}from"./p-6gET6YXc.js";import{w as H}from"./p-BrQCbmG0.js";import{S as U}from"./p-C-3TOa6K.js";import{A as I}from"./p-DDo-fu3v.js";class Q{constructor(t,i,s,h,e,n,r,o,a=!1){this.categoryPosition={x:0,y:0},this.spacings={scenarioOffset:0,markerOffset:0,scenarioLabelToBar:0,labelToBar:0,labelToAxis:0,needleWidth:0,needleHeadWidth:0,barWidth:0,varianceAxisLineWidth:0,axisLineWidth:0,auxiliaryLineWidth:0,scenarioLineWidth:0,markerWidth:0,categoryWidth:0,axisTickLength:0},this.categoriesBoxOffset={width:0,height:0},this.padding=t,this.scaleFactors=i,this.fontSize=s,this.axisPosition={x:0,y:0},this.numberOfColumns=h,this.leftSideLengthSync=e,this.topSideLabelHeight=n>0?this.fontSize:0,this.hasStackedHeaders=a,this.leftSideLabelLength=this.calculateSideLabelLength(n,r,o),this.calculateSpacings(),this.calculateCategoryPosition(),this.calculateAxisPosition()}getBarPositionX(){return this.axisPosition.x}getBarCenterPositionY(t){return this.categoryPosition.y+this.spacings.scenarioOffset+t*this.spacings.categoryWidth}getBarPositionY(t,i){return i?this.getBarCenterPositionY(t):this.getBarCenterPositionY(t)-this.spacings.scenarioOffset}getCategoryPositionX(t){let i=this.spacings.labelToAxis;return t&&(i=-this.spacings.labelToAxis),this.getAxisPositionX()+i}getAxisTitlePositionX(){return this.axisPosition.x}getAxisTitlePositionY(){return this.axisPosition.y-this.spacings.labelToAxis-this.getTopLabelOverhang()}getStackedHeaderPositionY(){return this.getBarCenterPositionY(0)-.5*this.spacings.barWidth-this.spacings.scenarioLabelToBar}getNeedleWidth(){return this.spacings.needleWidth}getAxisPositionX(){return this.leftSideLabelLength+this.padding.left+this.spacings.labelToAxis}getAxisPositionY(){return this.padding.top+this.getAxisTitleOffset()}loadCategoriesBox(t){this.categoriesBoxOffset=t,this.calculateAxisPosition()}addOffsetByNegativeDataPoints(t,i,s,h){null!=t&&null!=t.value&&t.value<0&&(s&&t.isClipped()?this.axisPosition.x+=Math.abs(t.getClippedValue()*t.pixelPerUnit):this.axisPosition.x+=Math.abs(t.value*t.pixelPerUnit),this.axisPosition.x+=i,this.axisPosition.x+=this.spacings.labelToBar),this.axisPosition.x<h/2&&(this.axisPosition.x=h/2+this.spacings.labelToBar)}getLabelPositionX(t){let i=this.spacings.labelToBar;return t<0&&(i*=-1),this.axisPosition.x+t+i}getLabelPositionY(t){return this.axisPosition.y+t+this.spacings.labelToBar}getCategoryToAxisSpaceing(){return this.spacings.labelToAxis}getCategoryToTopSpaceing(){return this.spacings.scenarioOffset}getCategoryToBottomSpaceing(){return this.spacings.scenarioOffset}getAxisEndPositionY(){return this.getAxisPositionY()+(this.numberOfColumns+.5)*this.spacings.categoryWidth}getScenarioLabelPositionOffsetY(t){if(t){const t=.5*this.getBarWidth()+this.spacings.scenarioLabelToBar;return Math.max(t,this.spacings.categoryWidth-this.spacings.scenarioOffset+this.spacings.labelToAxis)}return-(.5*this.getBarWidth()+this.spacings.scenarioLabelToBar)}getBarWidth(){return this.spacings.barWidth}getMarkerPositionY(t,i){return i?this.getBarCenterPositionY(t)-this.spacings.markerOffset-.5*this.getBarWidth():this.getBarCenterPositionY(t)+this.spacings.markerOffset+.5*this.getBarWidth()}getMarkerPositionX(){return this.getBarPositionX()}getMarkerScenarioLabelPositionOffsetY(t){return t?-(.5*this.spacings.markerWidth+this.spacings.scenarioLabelToBar):this.spacings.scenarioLabelToBar+.5*this.spacings.markerWidth}getAxisEndPositionX(){return this.getAxisPositionX()}calculateSpacings(){this.spacings={scenarioOffset:this.fontSize*this.scaleFactors.scenarioOffset,markerOffset:this.fontSize*this.scaleFactors.markerOffset,scenarioLabelToBar:this.fontSize*this.scaleFactors.scenarioLabelToBar,labelToBar:this.fontSize*this.scaleFactors.labelToBar,labelToAxis:this.fontSize*this.scaleFactors.labelToAxis,needleWidth:this.fontSize*this.scaleFactors.needleWidth,needleHeadWidth:this.fontSize*this.scaleFactors.needleHeadWidth,barWidth:this.fontSize*this.scaleFactors.barWidth,varianceAxisLineWidth:this.fontSize*this.scaleFactors.varianceAxisLineWidth,axisLineWidth:this.fontSize*this.scaleFactors.axisLineWidth,auxiliaryLineWidth:this.fontSize*this.scaleFactors.auxiliaryLineWidth,scenarioLineWidth:this.fontSize*this.scaleFactors.scenarioLineWidth,markerWidth:this.fontSize*this.scaleFactors.markerWidth,categoryWidth:this.fontSize*this.scaleFactors.categoryWidth,axisTickLength:this.fontSize*this.scaleFactors.axisTickLength}}calculateCategoryPosition(){this.categoryPosition={x:this.padding.left,y:this.getAxisPositionY()+.5*this.spacings.categoryWidth}}calculateAxisPosition(){this.axisPosition={x:this.getAxisPositionX(),y:this.getAxisPositionY()}}recalculatePositions(){this.calculateCategoryPosition(),this.calculateAxisPosition()}getAxisTitleOffset(){return this.topSideLabelHeight+this.spacings.labelToAxis+this.getTopLabelOverhang()}getTopLabelOverhang(){return this.hasStackedHeaders?this.getStackedHeaderOverhang():this.getTopScenarioLabelOverhang()}getStackedHeaderOverhang(){return Math.max(0,this.fontSize+this.spacings.scenarioLabelToBar+.5*this.spacings.barWidth-(.5*this.spacings.categoryWidth+this.spacings.scenarioOffset))}getTopScenarioLabelOverhang(){return Math.max(0,this.fontSize+.5*this.spacings.barWidth+this.spacings.scenarioLabelToBar-.5*this.spacings.categoryWidth,this.fontSize+.5*this.spacings.markerWidth+this.spacings.scenarioLabelToBar+this.spacings.markerOffset+.5*this.spacings.barWidth-(.5*this.spacings.categoryWidth+this.spacings.scenarioOffset))}calculateSideLabelLength(t,i,s){if(this.leftSideLengthSync)return this.leftSideLengthSync;const h=t/2;let e=i;return h>e&&(e=h),s>e&&(e=s),e}}class K{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 q{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"}}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}}createPatternMapForStructureBar(){const t=new Map;return t.set("marker-up",this.upMarkerPatternStrings()),t.set("marker-down",this.downMarkerPatternStrings()),t}}class Z{constructor(t){this.container=new n,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-structure-fc")}getFCPolygonPattern(){return{background:"",foreground:"",bgOffset:0,pattern:this.pattern}}toString(){return this.container.svg()}}var J,tt,it,st,ht;!function(t){t[t.UP_TO_DATE=0]="UP_TO_DATE",t[t.DIRTY=1]="DIRTY"}(J||(J={})),function(t){t.RELATIVE="dr",t.ABSOLUTE="d",t.NONE=""}(tt||(tt={}));class et{constructor(t,i){this.data=t,this.scenarios=i,this.variances=[],this.title="",this.hideCategories=!1,this.pixelPerUnit=10,this.pixelPerPercentage=50,this.limit=0,this.sortOrder=new v(new G).default(),this.level=c.CATEGORY,this.filter="",this.measureScale=new m,this.measureUnit="",this.showMeasureScale=!0,this.dataFormatDigits={decimal:1,percent:2},this.stackConfig=null}}class nt{constructor(t,i,s,h,e,n,r){this.dataRowAdapter=t,this.orderAdapter=i,this.stringAdapter=s,this.dataFormatDigitsAdapter=h,this.db=e,this.fromExpr=n,this.onQueryError=r}adapt(t){const i=I.adaptArray(t.data,this.dataRowAdapter),s=I.adaptArray(t.scenarios,this.stringAdapter),h=new et(i,s);return l.isArray(t.variances)&&(h.variances=I.adaptArray(t.variances,this.stringAdapter)),l.isString(t.title)&&(h.title=t.title),l.isBoolean(t.hideCategories)&&(h.hideCategories=t.hideCategories),l.isNumber(t.pixelPerUnit)&&(h.pixelPerUnit=t.pixelPerUnit),l.isNumber(t.pixelPerPercentage)&&(h.pixelPerPercentage=t.pixelPerPercentage),l.isNumber(t.limit)&&(h.limit=t.limit),l.isExisting(t.sortOrder)&&(h.sortOrder=this.orderAdapter.adapt(t.sortOrder)),l.isExisting(t.level)&&(h.level=t.level),l.isString(t.filter)&&(h.filter=t.filter.trim()),l.isExisting(t.measureScale)&&(h.measureScale=f.calculateMeasureScale(this.db,this.fromExpr,h.scenarios,t.measureScale,this.onQueryError)),l.isString(t.measureUnit)&&(h.measureUnit=t.measureUnit),l.isBoolean(t.showMeasureScale)&&(h.showMeasureScale=t.showMeasureScale),l.isExisting(t.dataFormatDigits)&&(h.dataFormatDigits=this.dataFormatDigitsAdapter.adapt(t.dataFormatDigits)),l.isExisting(t.stackConfig)&&(h.stackConfig=t.stackConfig),h}default(){return new et([],[])}}class rt{constructor(t,i,s,h){this.value=t,this.scenario=i,this.pixelPerUnit=s||1;const e="string"==typeof h?w(h,null,!0):h;this.variance="neg"===e||e===it.NEG?it.NEG:"pos"===e||e===it.POS?it.POS:it.NEU}isEmpty(){return null==this.value||null==this.scenario}getScaledUnit(){return null==this.value?0:this.value*this.pixelPerUnit}getScaledPercentUnit(){return null==this.value?0:Math.abs(this.value)>1.45?this.value>=0?1.45*this.pixelPerUnit:-1.45*this.pixelPerUnit:this.value*this.pixelPerUnit}getVarianceStyle(){return null==this.value||this.value>=0?this.variance:it.NEU===this.variance?it.NEU:it.POS===this.variance?it.NEG:it.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 ot{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 at{constructor(){}adapt(t){const i=new ot;return l.isOperator(t.operation)&&(i.operation=t.operation),l.isNumber(t.rowGroupIndex)&&l.isString(t.rowGroup)&&i.addRowGroup(t.rowGroup,t.rowGroupIndex),l.isNumber(t.categoryIndex)&&l.isString(t.category)&&i.addCategory(t.category,t.categoryIndex),l.isNumber(t.subCategoryIndex)&&l.isString(t.subCategory)&&i.addSubCategory(t.subCategory,t.subCategoryIndex),l.isNumber(t.columnGroupIndex)&&l.isString(t.columnGroup)&&i.addColumnGroup(t.columnGroup,t.columnGroupIndex),l.isNumber(t.columnSubGroupIndex)&&l.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}default(){return new ot}setActualValues(t,i){l.isNumber(t.ac1)&&(i.ac1=t.ac1),l.isNumber(t.ac2)&&(i.ac2=t.ac2),l.isNumber(t.ac3)&&(i.ac3=t.ac3),l.isNumber(t.ac4)&&(i.ac4=t.ac4)}setPlanValues(t,i){l.isNumber(t.pl1)&&(i.pl1=t.pl1),l.isNumber(t.pl2)&&(i.pl2=t.pl2),l.isNumber(t.pl3)&&(i.pl3=t.pl3),l.isNumber(t.pl4)&&(i.pl4=t.pl4)}setPreviousPeriodValues(t,i){l.isNumber(t.pp1)&&(i.pp1=t.pp1),l.isNumber(t.pp2)&&(i.pp2=t.pp2),l.isNumber(t.pp3)&&(i.pp3=t.pp3),l.isNumber(t.pp4)&&(i.pp4=t.pp4)}setForecastValues(t,i){l.isNumber(t.fc1)&&(i.fc1=t.fc1),l.isNumber(t.fc2)&&(i.fc2=t.fc2),l.isNumber(t.fc3)&&(i.fc3=t.fc3),l.isNumber(t.fc4)&&(i.fc4=t.fc4)}}class lt{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"],this.locale="de"}}class ct{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 lt(this.scaleFactorsStructureChartAdapter.default(),this.fontStyleAdapter.default(),this.svgStyleGroupAdapter.default(),this.svgStyleGroupAdapter.default(),this.svgVariancesStyleGroupAdapter.default(),this.paddingadapter.default());return l.isExisting(t)&&(l.isExisting(t.scaleFactors)&&(i.scaleFactors=this.scaleFactorsStructureChartAdapter.adapt(t.scaleFactors)),l.isExisting(t.fontStyles)&&(i.fontStyles=this.fontStyleAdapter.adapt(t.fontStyles)),l.isExisting(t.axisStyles)&&(i.axisStyles=this.svgStyleGroupAdapter.adapt(t.axisStyles)),l.isExisting(t.barStyles)&&(i.barStyles=this.svgStyleGroupAdapter.adapt(t.barStyles)),l.isExisting(t.varianceStyles)&&(i.varianceStyles=this.svgVariancesStyleGroupAdapter.adapt(t.varianceStyles)),l.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 q(i.fontStyles.size).createPatternMapForStructureBar()),i}default(){return new lt(this.scaleFactorsStructureChartAdapter.default(),this.fontStyleAdapter.default(),this.svgStyleGroupAdapter.default(),this.svgStyleGroupAdapter.default(),this.svgVariancesStyleGroupAdapter.default(),this.paddingadapter.default())}}class ut{constructor(){this.scenarioOffset=.3,this.scenarioLabelToBar=.1,this.labelToBar=.3,this.labelToAxis=.3,this.needleWidth=.3,this.needleHeadWidth=.6,this.barWidth=1.2,this.varianceAxisLineWidth=.3,this.axisLineWidth=.1,this.auxiliaryLineWidth=.1,this.scenarioLineWidth=.2,this.markerWidth=.7,this.markerOffset=0,this.categoryWidth=1.9,this.axisTickLength=.3}}class dt{adapt(t){const i=new ut;return l.isNumber(t.scenarioOffset)&&(i.scenarioOffset=t.scenarioOffset),l.isNumber(t.scenarioLabelToBar)&&(i.scenarioLabelToBar=t.scenarioLabelToBar),l.isNumber(t.labelToBar)&&(i.labelToBar=t.labelToBar),l.isNumber(t.labelToAxis)&&(i.labelToAxis=t.labelToAxis),l.isNumber(t.needleWidth)&&(i.needleWidth=t.needleWidth),l.isNumber(t.needleHeadWidth)&&(i.needleHeadWidth=t.needleHeadWidth),l.isNumber(t.barWidth)&&(i.barWidth=t.barWidth),l.isNumber(t.varianceAxisLineWidth)&&(i.varianceAxisLineWidth=t.varianceAxisLineWidth),l.isNumber(t.axisLineWidth)&&(i.axisLineWidth=t.axisLineWidth),l.isNumber(t.auxiliaryLineWidth)&&(i.auxiliaryLineWidth=t.auxiliaryLineWidth),l.isNumber(t.scenarioLineWidth)&&(i.scenarioLineWidth=t.scenarioLineWidth),l.isNumber(t.markerWidth)&&(i.markerWidth=t.markerWidth),l.isNumber(t.markerOffset)&&(i.markerOffset=t.markerOffset),l.isNumber(t.categoryWidth)&&(i.categoryWidth=t.categoryWidth),l.isNumber(t.axisTickLength)&&(i.axisTickLength=t.axisTickLength),i}default(){return new ut}}!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"}(it||(it={})),function(t){t.LIST="LIST",t.SUM="SUM",t.OPT="OPT"}(st||(st={})),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"}(ht||(ht={}));class ft{constructor(t,i,s,h,e,n,r,o){this.group=null,this.segmentFillColor=null,this.maxWidth=null,this.ID_SCENARIOLABEL="Label",this.CSS_CATEGORIES="categories",this.pointPart="label",this.x=i,this.y=s,this.value=e,null!=t&&(this.group=t.group().id(this.createElementID(t.toString(),h))),this.styles=n,this.isVarianceLabel=!1,this.isRelativeLabel=!1,this.verticalHookLocation=r||ht.Top,this.horizontalHookLocation=o||ht.Left}setToVarianceLabel(){return this.isVarianceLabel=!0,this}setToRelativeVarianceLabel(){return this.isVarianceLabel=!0,this.isRelativeLabel=!0,this}setSegmentFill(t){return this.segmentFillColor=t,this}setMaxWidth(t){return this.maxWidth=t,this}setPoint(t,i="label"){return this.pointKey=t,this.pointPart=i,this}updateGroup(t){return this.group=t,this}createElementID(t,i){return t+"_"+i+"_"+this.ID_SCENARIOLABEL}draw(t={percent:2,decimal:1},i=new m){var s;if(this.isEmpty())return this;const h=this.group;let e;const n=this.styles.fontStyles.background||"#ffffff";let r="",o="start";if(!1===Number.isNaN(Number(this.value))){let s=t.percent,h=t.percent,n=1,a="percent";!1===this.isRelativeLabel&&(s=t.decimal,h=t.decimal,n=i.value,a="decimal"),e=P.number(Number(this.value),a,s,h,n,this.styles.locale),Number(this.value)<0&&(o="end");const l=P.number(0,a,s,h,n,this.styles.locale);this.isVarianceLabel&&Number(this.value)>0&&e!==l&&(r="+")}else e=""+this.value,o="start";const a=h.text(r+e);a.move(this.x,this.y);const l=a.bbox(),c=l.w,u=l.h;return null!=this.maxWidth&&c>this.maxWidth?(null===(s=this.group)||void 0===s||s.remove(),this.group=null,this):(this.horizontalHookLocation===ht.Right?(o="end",a.move(a.x()-a.length(),a.y())):this.horizontalHookLocation===ht.Center&&(o="middle",a.move(a.x()-a.length()/2,a.y())),this.verticalHookLocation===ht.Center?a.move(a.x(),a.y()-u/2):this.verticalHookLocation===ht.Bottom&&a.move(a.x(),a.y()-u),a.font({anchor:o}),null!=this.segmentFillColor?a.fill(C(this.segmentFillColor)):null==h||h.rect(c,.9*u).stroke(n).fill(n).opacity(.7).move(a.x(),a.y()+.1*u).insertBefore(a),this.pointKey&&(null==h||h.attr(O(this.pointKey,this.pointPart))),this)}isEmpty(){return null==this.value||""===this.value}setPos(t,i){return this.x=t,this.y=i,this}}class pt{constructor(t,i,s,h){this.height=0,this.ID_AXIS="axis",this.ID_AXIS_TITLE="axis-title",this.CSS_AXIS_TITLE="categories",this.scenarioType=t.scenarioType,this.labelText=t.labelText||null,this.position=i,this.style=h,this.label=new ft(s,this.position.getAxisTitlePositionX(),this.position.getAxisTitlePositionY(),this.ID_AXIS_TITLE,this.labelText,this.style,ht.Bottom,ht.Center),this.svgGroup=s.group().id(this.ID_AXIS)}draw(){return this.labelText&&this.label.draw(),this.svgGroup.line(this.position.getAxisPositionX(),this.position.getAxisPositionY(),this.position.getAxisEndPositionX(),this.position.getAxisEndPositionY()).addClass(this.ID_AXIS+"-"+this.convertScenarioType()),this.height=this.svgGroup.height(),this}convertScenarioType(){return void 0===this.scenarioType||null==this.scenarioType?"default":`${this.scenarioType}`.slice(0,2)}}class vt{constructor(t,i,s,h,e,n,r,o=null){if(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.barGroup=null,this.isVarianceBar=!1,this.overflowConfig=null,this.isOverflowing=!1,this.overdriveWidth=0,this.dimensions={barLength:0,xPos:0,yPos:0,labelXPos:0,scenarioLabelXPos:0,scenarioLabelYPos:0,clipped:!1},this.hasData=!1,this.dataPoint=s,this.index=h,this.isPrimaryBar=e,this.position=t,this.barStyles=i.barStyles,this.overflowConfig=o,this.scenarioGroup=n,this.styles=i,null!=n&&(this.barGroup=n.group().id(n.toString()+"_"+this.ID_RECT)),!0!==(null==s?void 0:s.isEmpty())&&null!=s.value){this.hasData=!0;let i=ht.Left;s.value<0&&(i=ht.Right),this.dimensions=this.createDimensions(t,s,h,e),this.label=new ft(this.scenarioGroup,this.dimensions.labelXPos,this.dimensions.yPos,this.ID_DATA_PREFIX,s.value,this.styles,ht.Center,i).setPoint(s.key),this.scenarioLabel=this.getScenarioLabel(r)}}setAsVariance(){var t;return this.isVarianceBar=!0,null===(t=this.label)||void 0===t||t.setToVarianceLabel(),this}isRelativeVariance(){var t;return this.isVarianceBar=!0,null===(t=this.label)||void 0===t||t.setToRelativeVarianceLabel(),this}updateLabelGroup(t){var i;return this.isEmpty()||null==t||null===(i=this.label)||void 0===i||i.updateGroup(t),this}draw(t={percent:2,decimal:1},i=new m){var s,h;if(this.isEmpty()||null==this.dataPoint.getScenario())return this;let e=this.barStyles.getSVGStyle(this.dataPoint.getScenario());this.isVarianceBar&&(e=this.styles.varianceStyles.getSVGStyle(this.dataPoint.getVarianceStyle()));const n=this.convertToSVGStyle(e,"stroke");let r=this.convertToSVGStyle(e,"fill");const o=this.barStyles.getSVGStyle(this.dataPoint.getScenario()).fillpattern;if(null!=o){const t=this.styles.pattern.get(o);null!=t&&(r=t.pattern)}null===(s=this.scenarioGroup)||void 0===s||s.attr(O(this.dataPoint.key)),null===(h=this.barGroup)||void 0===h||h.attr(O(this.dataPoint.key,"element")),null!=this.barGroup&&(this.isOverflowing&&this.overflowConfig?this.drawOverdriveBar(r,n):this.barGroup.rect(this.dimensions.barLength,this.position.getBarWidth()).fill(r).stroke(n).cy(this.dimensions.yPos).x(this.dimensions.xPos)),this.drawBarDataLabel(t,i),this.drawScenarioLabel()}drawOverdriveBar(t,i){if(!this.barGroup||!this.overflowConfig)return;const s=this.position.getBarPositionX(),h=this.position.getBarWidth(),e=this.dimensions.barLength,{breakGap:n}=this.overflowConfig;this.dataPoint.getScaledUnit()<0?(this.barGroup.rect(e,h).fill(t).stroke(i).x(s-e).cy(this.dimensions.yPos),this.barGroup.rect(this.overdriveWidth,h).fill(t).stroke(i).x(s-e-n-this.overdriveWidth).cy(this.dimensions.yPos),this.drawBreakIndicator(s-e-n,n)):(this.barGroup.rect(e,h).fill(t).stroke(i).x(s).cy(this.dimensions.yPos),this.barGroup.rect(this.overdriveWidth,h).fill(t).stroke(i).x(s+e+n).cy(this.dimensions.yPos),this.drawBreakIndicator(s+e,n))}drawBreakIndicator(t,i){if(!this.barGroup)return;const s=this.position.getBarWidth(),h=this.dimensions.yPos-s/2,e=t+i/2,n=.35*i,r=s/3;let o=`M ${e-n} ${h}`;for(let t=0;t<3;t++)o+=` L ${e-n-.3*i} ${h+r*(t+.5)} L ${e-n} ${h+r*(t+1)}`;let a=`M ${e+n} ${h}`;for(let t=0;t<3;t++)a+=` L ${e+n+.3*i} ${h+r*(t+.5)} L ${e+n} ${h+r*(t+1)}`;this.barGroup.rect(i,s+2).fill("#ffffff").stroke("none").x(t).cy(this.dimensions.yPos),this.barGroup.path(o).fill("none").stroke({color:"#000000",width:1}),this.barGroup.path(a).fill("none").stroke({color:"#000000",width:1})}createDimensions(t,i,s,h){const e=i.getScaledUnit(),n=Math.abs(e);if(this.overflowConfig&&n>0){const r="ac"===i.getScenario()?this.overflowConfig.cutWidth:this.overflowConfig.cutWidth-this.overflowConfig.scenarioCutOffset;if(n>r){this.isOverflowing=!0;const{breakGap:i,overdriveZoneWidth:o,maxOverflow:a}=this.overflowConfig;this.overdriveWidth=a>0?(n-r)/a*o:0;const l=r+i+this.overdriveWidth;return e<0?{clipped:!1,barLength:r,xPos:t.getBarPositionX()-r,yPos:t.getBarPositionY(s,h),labelXPos:t.getLabelPositionX(-l),scenarioLabelXPos:t.getBarPositionX()-.5*r,scenarioLabelYPos:t.getBarPositionY(s,h)+t.getScenarioLabelPositionOffsetY(h)}:{clipped:!1,barLength:r,xPos:t.getBarPositionX(),yPos:t.getBarPositionY(s,h),labelXPos:t.getLabelPositionX(l),scenarioLabelXPos:t.getBarPositionX()+.5*r,scenarioLabelYPos:t.getBarPositionY(s,h)+t.getScenarioLabelPositionOffsetY(h)}}}return e<0?{clipped:!1,barLength:n,xPos:t.getBarPositionX()+e,yPos:t.getBarPositionY(s,h),labelXPos:this.position.getLabelPositionX(e),scenarioLabelXPos:this.position.getBarPositionX()-.5*n,scenarioLabelYPos:this.position.getBarPositionY(s,h)+this.position.getScenarioLabelPositionOffsetY(h)}:{clipped:!1,barLength:e,xPos:t.getBarPositionX(),yPos:t.getBarPositionY(s,h),labelXPos:this.position.getLabelPositionX(e),scenarioLabelXPos:this.position.getBarPositionX()+.5*n,scenarioLabelYPos:this.position.getBarPositionY(s,h)+this.position.getScenarioLabelPositionOffsetY(h)}}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.isVarianceBar||this.scenarioLabel.setPos(this.dimensions.scenarioLabelXPos,this.dimensions.scenarioLabelYPos).draw()}drawBarDataLabel(t,i=new m){var s;this.isPrimaryBar&&(null===(s=this.label)||void 0===s||s.draw(t,i))}isEmpty(){return!1===this.hasData||Number.isNaN(this.dataPoint.value)}getScenarioLabel(t){return new ft(this.scenarioGroup,-1,-1,this.ID_SCENARIO_PREFIX,t,this.styles,this.isPrimaryBar?ht.Top:ht.Bottom,ht.Center)}}class gt{constructor(t,i,s,h,e,n,r,o,a){this.ID_DATA_PREFIX="DATA",this.ID_SCENARIO_PREFIX="SCENARIO",this.FALLBACK_COLOUR="#000000",this.scenarioLabel=null,this._defaultMarkerPattern=null,this.dimensions={barLength:0,xPos:0,yPos:0,labelXPos: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.pointKey=n.key,this.dimensions=this.createMarkerDimensions(n,r,a),this.scenarioLabel=this.getScenarioLabel(o,e,a))}createMarkerDimensions(t,i,s){return t.getScaledUnit()<0?{clipped:!1,labelXPos:0,barLength:Math.abs(t.getScaledUnit()),xPos:this.position.getMarkerPositionX()-Math.abs(t.getScaledUnit()),yPos:this.position.getMarkerPositionY(i,s),scenarioLabelXPos:this.position.getMarkerPositionX()-Math.abs(t.getScaledUnit()),scenarioLabelYPos:this.position.getMarkerPositionY(i,s)+this.position.getMarkerScenarioLabelPositionOffsetY(s)}:{clipped:!1,labelXPos:0,barLength:t.getScaledUnit(),xPos:this.position.getMarkerPositionX()+t.getScaledUnit(),yPos:this.position.getMarkerPositionY(i,s),scenarioLabelXPos:this.position.getMarkerPositionX()+t.getScaledUnit(),scenarioLabelYPos:this.position.getMarkerPositionY(i,s)+this.position.getMarkerScenarioLabelPositionOffsetY(s)}}getScenarioLabel(t,i,s){return null==this.markerGroup?null:new ft(this.markerGroup,-1,-1,this.ID_DATA_PREFIX,t,i,s?ht.Bottom:ht.Top,ht.Center)}convertToSVGStyle(t,i){return null==t&&(t=[]),t.color=t[i]||this.FALLBACK_COLOUR,Object.assign({},t)}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.attr(O(this.pointKey)),this.markerGroup.polygon(this.markerPattern.background).fill("#ffffff").cy(this.dimensions.yPos).cx(this.dimensions.xPos),this.markerGroup.polygon(this.markerPattern.foreground).fill(i).stroke(t).cy(this.dimensions.yPos).cx(this.dimensions.xPos).attr(O(this.pointKey,"element")),null==this.scenarioLabel||this.scenarioLabel.isEmpty()||this.scenarioLabel.setPos(this.dimensions.scenarioLabelXPos,this.dimensions.scenarioLabelYPos).draw(),this}isEmpty(){return!1===this.hasData}getScenario(){var t;return null===(t=this.scenario)||void 0===t?void 0:t.slice(0,2)}}class bt{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.label=null,this.dimensions={barLength:0,xPos:0,yPos:0,labelXPos: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);const n=void 0===(null==s?void 0:s.value)&&null!=(null==s?void 0:s.scenario);if(!0!==(null==s?void 0:s.isEmpty())&&null!=s.value||n){this.hasData=!0,this.dimensions=this.createDimensions(t,s,h);let i=ht.Left;s.value<0&&(i=ht.Right),this.label=new ft(this.scenarioGroup,this.dimensions.labelXPos,this.dimensions.yPos,this.ID_DATA_PREFIX,n?N:s.value,this.styles,ht.Center,i),this.label.setToRelativeVarianceLabel().setPoint(s.key)}}updateLabelGroup(t){var i;return this.isEmpty()||null==t||null===(i=this.label)||void 0===i||i.updateGroup(t),this}draw(t={percent:2,decimal:1}){var i,s,h;if(void 0===(null===(i=this.dataPoint)||void 0===i?void 0:i.value))return null===(s=this.label)||void 0===s||s.draw(t),this;if(this.isEmpty())return this;if(null==this.dimensions)return this;this.scenarioGroup.attr(O(this.dataPoint.key)),this.barGroup.attr(O(this.dataPoint.key,"element"));const e=this.styles.varianceStyles.getSVGStyle(this.dataPoint.getVarianceStyle()),n=e.stroke;let r=e.fill;const o=this.barStyles[this.dataPoint.getScenario()];if(null!=o&&o.fillpattern){const t=this.styles.pattern.get(o.fillpattern);null!=t&&null!=t.pattern&&(r=t.pattern)}this.drawNeedleHead(r,n),this.barGroup.rect(this.dimensions.barLength,this.position.getNeedleWidth()).fill(r).stroke(n).cy(this.dimensions.yPos).x(this.dimensions.xPos),null===(h=this.label)||void 0===h||h.draw(t)}createDimensions(t,i,s){return i.getScaledPercentUnit()<0?{barLength:Math.abs(i.getScaledPercentUnit()),xPos:t.getBarPositionX()+i.getScaledPercentUnit(),yPos:t.getBarCenterPositionY(s),labelXPos:this.position.getLabelPositionX(i.getScaledPercentUnit()-this.position.getNeedleWidth()),clipped:i.isClipped(),scenarioLabelXPos:0,scenarioLabelYPos:0}:{barLength:i.getScaledPercentUnit(),xPos:t.getBarPositionX(),yPos:t.getBarCenterPositionY(s),labelXPos:this.position.getLabelPositionX(i.getScaledPercentUnit()+this.position.getNeedleWidth()),clipped:i.isClipped(),scenarioLabelXPos:0,scenarioLabelYPos:0}}drawNeedleHead(t,i){if(null===this.dimensions)return;const s=this.styles.varianceStyles.needleHeadColour,h=this.styles.varianceStyles.needleHeadColour;if(this.dimensions.clipped){let s="13,0 4,-5 4,5 13,0 8,0 0,-5 0,5 8,0";null!=this.dataPoint.value&&this.dataPoint.value<0&&(s="0,0 9,-5 9,5 0,0 5,0 13,-5 13,5 5,0"),this.barGroup.polygon(s).fill(t).cx(this.getHeadXPosition()).cy(this.dimensions.yPos).fill(t).stroke(i)}else this.barGroup.rect(2*this.position.getNeedleWidth(),2*this.position.getNeedleWidth()).cx(this.getHeadXPosition()).cy(this.dimensions.yPos).fill(s).stroke(h)}isEmpty(){return!1===this.hasData||Number.isNaN(this.dataPoint.value)}getHeadXPosition(){let t=this.dimensions.xPos;return null!=this.dataPoint.value&&this.dataPoint.value>0&&(t+=this.dimensions.barLength),t}}class mt{constructor(t,i,s,h,e,n,r,o,a,l,c){this.hasData=!1,this.position=t,this.styles=i,this.dataPoint=s,this.index=h,this.segment=e,this.segmentIndex=r,this.stackMode=o,this.stack=a,this.group=c,this.barGroup=c.group().id(`stacked_bar_${h}_seg_${r}`),!0!==(null==s?void 0:s.isEmpty())&&null!=s.value&&(this.hasData=!0)}draw(t={percent:2,decimal:1},i=new m){if(!this.hasData||!Number.isFinite(this.dataPoint.value))return;const s=this.dataPoint.value,h=this.dataPoint.pixelPerUnit,e=this.position.getBarPositionX(),n=this.position.getBarWidth(),r=Math.abs(this.segment.end-this.segment.start)*h,o=e+Math.min(this.segment.start,this.segment.end)*h,a=this.position.getBarPositionY(this.index,!0),l=this.styles.stackColors,c=l[this.segmentIndex%l.length],d={color:c},f={color:c,width:.5};this.barGroup.attr(O(this.dataPoint.key,"element")),this.barGroup.rect(Math.max(r,.5),n).fill(d).stroke(f).cy(a).x(o);const p=r-6;if(p>0){const h=o+r/2;if(this.stackMode===u.RELATIVE||this.stackMode===u.ABSOLUTE_RELATIVE){const i=P.number(this.segment.share,"percent",t.percent,t.percent,1,this.styles.locale);new ft(this.group,h,a,"STACK_SEG",i,this.styles,ht.Center,ht.Center).setSegmentFill(c).setMaxWidth(p).setPoint(this.dataPoint.key).draw()}else new ft(this.group,h,a,"STACK_SEG",s,this.styles,ht.Center,ht.Center).setSegmentFill(c).setMaxWidth(p).setPoint(this.dataPoint.key).draw(t,i)}}drawTotalLabel(t={percent:2,decimal:1},i=new m,s){if(this.stackMode===u.RELATIVE)return;const h=this.stack.total<0,e=this.position.getLabelPositionX((h?0-this.stack.negative:this.stack.positive)*this.dataPoint.pixelPerUnit),n=this.position.getBarPositionY(this.index,!0);new ft(this.group,e,n,"STACK_TOTAL",this.stack.total,this.styles,ht.Center,h?ht.Right:ht.Left).setPoint(s,"total").draw(t,i)}}class wt{constructor(t,i,s,h,e){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}isLastDataPoint(t){return this.elementCnt-1===t}isFirsttDataPoint(t){return 0===t}createPrimaryBar(t,i){var s,h,e,n;const r=null===(h=null===(s=this.svgGroups)||void 0===s?void 0:s.scenario1)||void 0===h?void 0:h.group().id(""+i),o=null===(n=null===(e=this.svgGroups)||void 0===e?void 0:e.scenario1Label)||void 0===n?void 0:n.group().id(""+i);let a=null;return this.isLastDataPoint(i)&&(a=`${this.i18n.get(t.scenario)||t.scenario}`),new vt(this.position,this.styles,t,i,!0,r,a,this.overflowConfig).updateLabelGroup(o)}createVarianceBar(t,i){var s,h,e,n;const r=null===(h=null===(s=this.svgGroups)||void 0===s?void 0:s.scenario1)||void 0===h?void 0:h.group().id(""+i),o=null===(n=null===(e=this.svgGroups)||void 0===e?void 0:e.scenario1Label)||void 0===n?void 0:n.group().id(""+i);let a=null;return this.isLastDataPoint(i)&&(a=`${this.i18n.get(t.scenario)||t.scenario}`),new vt(this.position,this.styles,t,i,!0,r,a,this.overflowConfig).updateLabelGroup(o).setAsVariance()}createRelativeVarianceBar(t,i){var s,h,e,n;const r=null===(h=null===(s=this.svgGroups)||void 0===s?void 0:s.scenario1)||void 0===h?void 0:h.group().id(""+i),o=null===(n=null===(e=this.svgGroups)||void 0===e?void 0:e.scenario1Label)||void 0===n?void 0:n.group().id(""+i);return new bt(this.position,this.styles,t,i,r).updateLabelGroup(o)}createSecondaryBar(t,i){var s,h;const e=null===(h=null===(s=this.svgGroups)||void 0===s?void 0:s.scenario2)||void 0===h?void 0:h.group().id(""+i);let n=null;return this.isFirsttDataPoint(i)&&(n=`${this.i18n.get(t.scenario)||t.scenario}`),new vt(this.position,this.styles,t,i,!1,e,n,this.overflowConfig)}createPrimaryMarker(t,i){var s,h;const e=null===(h=null===(s=this.svgGroups)||void 0===s?void 0:s.scenario3)||void 0===h?void 0:h.group().id(""+i),n=this.styles.pattern.get("marker-down")||{foreground:"0,0 1,0 1,1 0,1",background:"0,0 1,0 1,1 0,1",bgOffset:0};let r=null;return this.isFirstDataPoint(i)&&(r=`${this.i18n.get(t.scenario)||t.scenario}`),new gt(this.position,e,n,t.scenario,this.styles,t,i,r,!0)}createSecondaryMarker(t,i){var s,h;const e=null===(h=null===(s=this.svgGroups)||void 0===s?void 0:s.scenario4)||void 0===h?void 0:h.group().id(""+i),n=this.styles.pattern.get("marker-up")||{foreground:"0,0 1,0 1,1 0,1",background:"0,0 1,0 1,1 0,1",bgOffset:0};let r=null;return this.isLastDataPoint(i)&&(r=`${this.i18n.get(t.scenario)||t.scenario}`),new gt(this.position,e,n,t.scenario,this.styles,t,i,r,!1)}isFirstDataPoint(t){return 0===t}}class Pt{constructor(t,i,s,h,e){this.dataModel=[],this.variancesDataModel=[],this.title="",this.configTitle="",this.configVariances=[],this.smallestDataPointValue=new rt(0,it.AC1,1,it.NEU),this.highestDataPointValue=new rt(0,it.AC1,1,it.NEU),this.smallestVarianceDataPointValue=new rt(0,it.AC1,1,it.NEU),this.highestVarianceDataPointValue=new rt(0,it.AC1,1,it.NEU),this.pixelPerUnit=1,this.pixelPerPercentage=1,this.level=c.CATEGORY,this.hideCategories=!1,this.axisScenario=it.AC1,this.CSS_CATEGORIES="categories",this.state=J.DIRTY,this.titleLength=0,this.leftSideOffsetForHorizontalSync=0,this.limit=0,this.measureScale=new m,this.measureUnit="",this.dataFormatDigits={percent:2,decimal:1},this.stackConfig=null,this.scenarioPropOrder=[],this.overflowConfig=null,this.stackSides=_([]),this.stackLabelClearance={left:0,right:0},this.fromExpr="",this.rowCount=0,this.db=i,this.tableName=s,this.ruleSet=t||new y,this.i18n=this.createI18n(new Map),this.styles=e,this.setConfig(h),this.position=this.createElementPosition()}updatePosition(){this.position=this.createElementPosition()}createElementPosition(){this.titleLength=this.calculateTitleLength(0);let t=this.calculateLeftSideWidth(this.getVarianceType());const i=this.calculateCategoryWidth();return this.titleLength>t&&(t=this.titleLength),new Q(new K(this.styles.padding),this.styles.scaleFactors,this.styles.fontStyles.size,this.dataModel.length,this.leftSideOffsetForHorizontalSync,this.titleLength,t,i,!!this.stackConfig&&0===this.variancesDataModel.length)}setStyles(t){this.styles=t}setRuleSet(t){this.ruleSet=t||new y}setConfig(t){var i,s;this.state=J.DIRTY,this.scenarioPropOrder=[...t.scenarios];const h=this.sortScenariosbyVisualisationRules(t.scenarios);this.hideCategories=t.hideCategories||!1,this.limit=t.limit,this.pixelPerUnit=t.pixelPerUnit||1,this.pixelPerPercentage=t.pixelPerPercentage||100,this.setSource(t.filter),this.level=t.level,this.dataModel=this.populateModel(h,t.level,t.sortOrder);for(const t of this.dataModel)for(const s of[t.scenario1,t.scenario2,t.scenario3,t.scenario4])null==s.value||Number.isNaN(s.value)||(s.key=Object.assign(Object.assign({},$(this.level,t.category)),{scenario:null!==(i=s.scenario)&&void 0!==i?i:void 0}));t.stackConfig&&t.stackConfig.by!==d.SCENARIOS&&this.populateDimensionStackSegments(h,t.stackConfig,t.level),this.variancesDataModel=this.populateVarianceModel(t.variances,this.dataModel),this.configTitle=t.title,this.configVariances=null!==(s=null==t?void 0:t.variances)&&void 0!==s?s:[],this.updateTitle(),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.measureScale=t.measureScale,this.measureUnit=t.measureUnit,this.dataFormatDigits=t.dataFormatDigits,this.stackConfig=t.stackConfig,this.measureStacks(),this.updatePosition()}sortScenariosbyVisualisationRules(t){const i=this;return[...t].sort(((t,s)=>i.ruleSet.getScenarioSorIndex(t)-i.ruleSet.getScenarioSorIndex(s))).reverse()}setI18n(t){this.i18n=this.createI18n(t),this.updateTitle()}updateTitle(){var t;this.title=this.configTitle||P.translateScenarioLabel(null===(t=this.configVariances)||void 0===t?void 0:t.toString(),this.i18n)}createI18n(t){this.state=J.DIRTY;const i=new Map([["SEPARATOR_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"," "],["thereof","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])}setSource(t){var i,s;if(this.state=J.DIRTY,this.queryError=void 0,this.fromExpr=Y(this.db,this.tableName,t),this.fromExpr)try{const t=this.db.exec(`SELECT COUNT(*) AS cnt FROM ${this.fromExpr}`);this.rowCount=null!==(s=null===(i=t[0])||void 0===i?void 0:i.cnt)&&void 0!==s?s:0}catch(t){this.rowCount=0,this.failQuery(t)}else this.rowCount=0}getQueryError(){return this.queryError}failQuery(t){var i;null!==(i=this.queryError)&&void 0!==i||(this.queryError=F(t))}getUnitBarExtent(){var t,i;const s=this.isStacked(),h=this.getVarianceType(),e=h!==tt.NONE,n=e?this.highestVarianceDataPointValue:this.highestDataPointValue,r=e?this.smallestVarianceDataPointValue:this.smallestDataPointValue;return D({fixedDomain:s?this.stackSides.positive+this.stackSides.negative:void 0,relativeVariance:h===tt.RELATIVE,maxPositive:null!==(t=null==n?void 0:n.value)&&void 0!==t?t:0,minNegative:null!==(i=null==r?void 0:r.value)&&void 0!==i?i:0})}getPercentBarExtent(){var t,i,s,h;return W({relativeVariance:this.getVarianceType()===tt.RELATIVE,maxPositive:null!==(i=null===(t=this.highestVarianceDataPointValue)||void 0===t?void 0:t.value)&&void 0!==i?i:0,minNegative:null!==(h=null===(s=this.smallestVarianceDataPointValue)||void 0===s?void 0:s.value)&&void 0!==h?h:0})}getAllocatedCanvasWidth(){const t=this.position.getAxisPositionX(),i=this.calculateRightSideWidth(this.getVarianceType());let s=t+i+ +this.styles.padding.left+this.styles.padding.right;return i<this.titleLength/2&&(s+=this.titleLength/2),t<this.titleLength/2&&(s+=this.titleLength/2),s}getAllocatedCanvasHeight(){return this.position.getAxisEndPositionY()+this.position.spacings.labelToAxis+this.position.fontSize+this.styles.padding.bottom}patternToString(){return"<svg></svg>"}layout(){this.draw(new n)}toString(){const t=new n;return this.draw(t),t.id("drawCanvas"),t.width(this.getAllocatedCanvasWidth()),t.height(this.getAllocatedCanvasHeight()),t.svg()}applyFontToContainer(t){t.attr({"font-size":this.styles.fontStyles.size,"font-family":this.styles.fontStyles.family})}draw(t){this.cleanSVGforRedraw(t),this.applyFontToContainer(t),this.state===J.DIRTY&&(this.state=J.UP_TO_DATE),this.variancesDataModel&&this.variancesDataModel.length>0?(this.drawVarianceScenario(this.variancesDataModel,t),this.drawAxisAndLabels(this.variancesDataModel,t)):null!=this.stackConfig?(this.drawStackedScenarios(this.dataModel,t),this.drawStackedHeaders(this.dataModel,t),this.drawAxisAndLabels(this.dataModel,t,!0)):(this.drawScenarios(this.dataModel,t),this.drawAxisAndLabels(this.dataModel,t))}setPattern(t,i){this.styles.pattern.set(t,i)}calculateTitleLength(t){const i=S(this.title.length>7?this.title:"_______",{font:this.styles.fontStyles.font,fontSize:this.styles.fontStyles.size+"px"}).width;return i<t?t:i/2}getFooter(){return 1===this.measureScale.value&&""===this.measureUnit?" ":P.translateScenarioLabel("in",this.i18n)+" "+this.measureScale.prefix+this.measureUnit}scenarioStyles(){const t=x(this.styles.barStyles,this.ruleSet);return t===this.styles.barStyles?this.styles:Object.assign(Object.create(Object.getPrototypeOf(this.styles)),this.styles,{barStyles:t})}setAxisScenario(t){let i=it.AC1;if(null!=t&&t.length>0){const s=new L(t.toString());s.isValid&&(i=k(this.ruleSet.getScenarioColorIndex(s.delta))+s.delta.slice(2))}return null===i&&(i=it.AC1),i}populateModel(t,i,s){if(0===this.rowCount||!this.fromExpr)return[];const h=[],e=this.createOrderStr(i,s),n=this.createSelectString(i,s),r=this.createGroupByStr(i,s);let o;try{o=this.db.exec(`SELECT ${n} ${t.length>0?","+t.map((t=>`SUM(${t} * transformOperator(operation)) as ${t}, COUNT(ISNULL(${t})) as ${t}_cnt`)).join(","):""}\n FROM ${this.fromExpr}\n GROUP BY ${r}\n ORDER BY ${e}`)}catch(t){return this.failQuery(t),[]}return this.detectNaNCells(t,o),this.createDataRows(this.limit>0?o.slice(0,this.limit):o,h,t),this.crateRESTRow(o,t,h),h}detectNaNCells(t,i){i.forEach((i=>(t.forEach((t=>{const s=new L(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)))}crateRESTRow(t,i,s){if(this.limit<=0||this.limit>=t.length)return;const h=[];this.createDataRows(t.slice(this.limit),h,i);const e=(t,i)=>Number.isFinite(i)?(Number.isFinite(t)?t:0)+i:t,n=h.reduce((function(t,s){return{id:t.id,category:t.category,type:t.type,scenario1:new rt(e(t.scenario1.value,s.scenario1.value),i[0],t.scenario1.pixelPerUnit,it.NEU),scenario2:new rt(e(t.scenario2.value,s.scenario2.value),i[1],t.scenario2.pixelPerUnit,it.NEU),scenario3:new rt(e(t.scenario3.value,s.scenario3.value),i[2],t.scenario3.pixelPerUnit,it.NEU),scenario4:new rt(e(t.scenario4.value,s.scenario4.value),i[3],t.scenario4.pixelPerUnit,it.NEU)}}),{id:9999,category:"REST",type:tt.NONE,scenario1:new rt(NaN,i[0],this.pixelPerUnit,it.NEU),scenario2:new rt(NaN,i[1],this.pixelPerUnit,it.NEU),scenario3:new rt(NaN,i[2],this.pixelPerUnit,it.NEU),scenario4:new rt(NaN,i[3],this.pixelPerUnit,it.NEU)});s.push(n)}createDataRows(t,i,s){t.forEach(((t,h)=>{i.push({id:h,category:t.category,type:tt.NONE,scenario1:new rt(t[s[0]],s[0],this.pixelPerUnit,it.NEU),scenario2:new rt(t[s[1]],s[1],this.pixelPerUnit,it.NEU),scenario3:new rt(t[s[2]],s[2],this.pixelPerUnit,it.NEU),scenario4:new rt(t[s[3]],s[3],this.pixelPerUnit,it.NEU)})}))}createOrderStr(t,i){let s=`${t.toLowerCase()}`;return i.hierarchy.length>=1&&(s=i.hierarchy.map((t=>`${t} ${i.direction}`)).toString()),s}createSelectString(t,i){return t===c.CATEGORY&&i.hierarchy.includes(g.CATEGORYINDEX)?`${g.CATEGORYINDEX}, ${c.CATEGORY} as category`:t===c.ROWGROUP&&i.hierarchy.includes(g.ROWGROUPINDEX)?`${g.ROWGROUPINDEX}, ${c.ROWGROUP} as category`:t===c.SUBCATEGORY&&i.hierarchy.includes(g.SUBCATEGORYINDEX)?`${g.SUBCATEGORYINDEX}, ${c.SUBCATEGORY} as category`:`${t.toString()} as category`}createGroupByStr(t,i){return t===c.CATEGORY&&i.hierarchy.includes(g.CATEGORYINDEX)?`${g.CATEGORYINDEX}, ${c.CATEGORY}`:t===c.ROWGROUP&&i.hierarchy.includes(g.ROWGROUPINDEX)?`${g.ROWGROUPINDEX}, ${c.ROWGROUP}`:t===c.SUBCATEGORY&&i.hierarchy.includes(g.SUBCATEGORYINDEX)?`${g.SUBCATEGORYINDEX}, ${c.SUBCATEGORY}`:`${t.toString()}`}calculateCategoryWidth(){if(this.hideCategories)return 5;let t=0;for(const i of this.dataModel){const s=S(i.category,{font:this.styles.fontStyles.font,fontSize:this.styles.fontStyles.size+"px"});s.width>t&&(t=s.width)}return 1.1125*t}findSmallestDataPointValue(t){let i=new rt(0,"default",this.pixelPerUnit,null);for(const s of t)for(const t of[s.scenario1,s.scenario2,s.scenario3,s.scenario4])null!=t&&null!=i.value&&t.value<i.value&&(i=t);return i}findHighestDataPointValue(t){let i=new rt(0,"default",this.pixelPerUnit,null);for(const s of t)for(const t of[s.scenario1,s.scenario2,s.scenario3,s.scenario4])null!=t&&null!=i.value&&t.value>i.value&&(i=t);return i}stackGroups(t){if(!this.stackConfig)return[];const i=this.stackConfig.by===d.SCENARIOS;let s=[];for(const h of i?["scenario1","scenario2","scenario3","scenario4"]:["scenario1"]){const i=t[h];i&&!i.isEmpty()&&null!=i.value&&s.push({value:i.value,scenario:i.scenario,dataPoint:i})}if(0===s.length)return[];const h=this.stackConfig.mode===u.RELATIVE?1:0,e=(t,i)=>({prefix:t,segments:i,layout:R(i.map((t=>t.value)),h),hasValue:i.some((t=>Number.isFinite(t.value)))});if(i){this.sortSegmentsByPropOrder(s);const t=new Map;for(const i of s){const s=M(i.scenario);t.has(s)||t.set(s,[]),t.get(s).push(i)}if(t.size>1){const i=[];for(const s of T)t.has(s)&&(i.push(e(s,t.get(s))),t.delete(s));for(const[s,h]of t)i.push(e(s,h));return i}}else t.stackSegments&&t.stackSegments.length>0&&(s=t.stackSegments.map((t=>({value:t.value,scenario:t.label,dataPoint:t.dataPoint}))));const n=t=>Number.isFinite(t.value)?t.value:0;return"asc"===this.stackConfig.order?s.sort(((t,i)=>n(t)-n(i))):"desc"===this.stackConfig.order&&s.sort(((t,i)=>n(i)-n(t))),[e("",s)]}measureStacks(){const t=[];this.stackLabelClearance={left:0,right:0};for(const i of this.dataModel){const{flipped:s,clearance:h}=this.stackLabelPlace(i),e=this.drawnStackLayouts(i),n=s?"right":"left";this.stackLabelClearance[n]=Math.max(this.stackLabelClearance[n],h),t.push(...e)}this.stackSides=_(t)}stackLabelPlace(t){const i=this.styles.fontStyles.size*this.styles.scaleFactors.labelToBar;return B(this.drawnStackLayouts(t),(t=>{var s;return(null===(s=this.stackConfig)||void 0===s?void 0:s.mode)===u.RELATIVE?0:(i+this.calculateTotalLabelWidth(t.total))/this.pixelPerUnit}))}drawnStackLayouts(t){return this.stackGroups(t).filter((t=>t.hasValue)).map((t=>t.layout))}calculateTotalLabelWidth(t){const i=this.dataFormatDigits.decimal;return S(P.number(t,"decimal",i,i,this.measureScale.value,this.styles.locale),{font:this.styles.fontStyles.font,fontSize:this.styles.fontStyles.size+"px"}).width}isStacked(){return null!=this.stackConfig&&this.stackSides.positive+this.stackSides.negative>0}populateVarianceModel(t,i){const s=[];if(0===t.length)return s;let h=null;null!=i&&i.length>0&&(h=i[0]);for(const e in t){const n=new L(t[e]);if(n.isValid){const r=this.mapScenarios(n,h),o=n.direction;let a=this.pixelPerUnit;"dr"===n.type&&(a=this.pixelPerPercentage);for(const h in i){const l=new rt(this.calculateVariance(n,i[h],r),n.base,a,o);null===l.value||Number.isNaN(l.value)||(l.key=Object.assign(Object.assign({},$(this.level,i[h].category)),{scenario:t[e]})),s.push({id:Number(h),category:i[h].category,type:"dr"===n.type?tt.RELATIVE:tt.ABSOLUTE,scenario1:l,scenario2:new rt(null,null,null,null),scenario3:new rt(null,null,null,null),scenario4:new rt(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:t.type===tt.RELATIVE?E(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}calculateTextBoxWidth(t){return S(P.number(t,"decimal",1,0,1,this.styles.locale),{font:this.styles.fontStyles.font,fontSize:this.styles.fontStyles.size+"px"}).width}calculatePercentageTextBoxWidth(t){let i=0;const s=this.dataFormatDigits.percent,h=t=>P.number(t,"percent",s,s,1,this.styles.locale);return t>0&&h(t)!==h(0)&&(i+=S("+",{font:this.styles.fontStyles.font,fontSize:this.styles.fontStyles.size+"px"}).width),i+=S(" %",{font:this.styles.fontStyles.font,fontSize:this.styles.fontStyles.size+"px"}).width,S(P.number(t,"decimal",1,1,1,this.styles.locale),{font:this.styles.fontStyles.font,fontSize:this.styles.fontStyles.size+"px"}).width+i+i}cleanSVGforRedraw(t){t.clear()}drawAxisAndLabels(t,i,s=!1){const h=i.group().id("AxisAndDateLables");let e=!1;this.hideCategories||t.forEach(((t,i)=>{t.type===tt.RELATIVE&&(e=!0);let n=ht.Right,r=!0,o=0;if(s){const i=this.stackLabelPlace(t);r=!i.flipped,o=i.clearance*this.pixelPerUnit*(i.flipped?1:-1)}else t.scenario1.value<0&&(r=!1);r||(n=ht.Left),new ft(h,this.position.getCategoryPositionX(r)+o,this.position.getBarCenterPositionY(i),"",this.i18n.get(t.category)||t.category,this.styles,ht.Center,n).draw()})),new pt({scenarioType:this.axisScenario,labelText:this.title,isRelative:e},this.position,h,this.styles).draw()}drawScenarios(t,i){const s=i.group().id("Scenarios"),h=new wt(this.position,s,this.scenarioStyles(),t.length,this.i18n);h.setOverflowConfig(this.overflowConfig),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()}))}drawVarianceScenario(t,i){const s=i.group().id("Scenarios"),h=new wt(this.position,s,this.scenarioStyles(),t.length,this.i18n);return h.setOverflowConfig(this.overflowConfig),t.forEach(((t,i)=>{t.type===tt.RELATIVE?h.createRelativeVarianceBar(t.scenario1,i).draw(this.dataFormatDigits):h.createVarianceBar(t.scenario1,i).draw(this.dataFormatDigits,this.measureScale)})),s}sortSegmentsByPropOrder(t){if(0===this.scenarioPropOrder.length)return;const i=this.scenarioPropOrder;t.sort(((t,s)=>{const h=i.indexOf(t.scenario),e=i.indexOf(s.scenario);return(-1===h?i.length:h)-(-1===e?i.length:e)}))}drawStackedScenarios(t,i){if(!this.stackConfig)return;const s=i.group().id("StackedScenarios"),h=this.stackConfig.by===d.SCENARIOS;t.forEach(((t,i)=>{const e=this.stackGroups(t);e.forEach(((n,r)=>{let o=null;n.segments.forEach(((t,a)=>{const l=new mt(this.position,this.styles,t.dataPoint,i,n.layout.segments[a],t.scenario,e.length>1?e.length-1-r:a,this.stackConfig.mode,n.layout,h,s);l.draw(this.dataFormatDigits,this.measureScale),o=l})),o&&n.hasValue&&o.drawTotalLabel(this.dataFormatDigits,this.measureScale,Object.assign(Object.assign({},$(this.level,t.category)),{scenario:e.length>1?n.prefix:void 0}))}))}))}drawStackedHeaders(t,i){if(!this.stackConfig||0===t.length)return;const s=t[0];if(this.stackConfig.by!==d.SCENARIOS&&(!s.stackSegments||0===s.stackSegments.length))return;const h=this.stackGroups(s);if(0===h.length)return;const e=i.group().id("StackedHeaders"),n=this.position.getBarPositionX(),r=this.position.getStackedHeaderPositionY(),o=(t,i)=>{new ft(e,t,r,"STACK_HEADER",i,this.styles,ht.Bottom,ht.Center).draw()};if(h.length>1)return void h.forEach((t=>{o(n+(t.layout.positive-t.layout.negative)/2*t.segments[0].dataPoint.pixelPerUnit,this.i18n.get(t.prefix+"1")||t.prefix.toUpperCase())}));const[a]=h;a.segments.forEach(((t,i)=>{const{start:s,end:h}=a.layout.segments[i];o(n+(s+h)/2*t.dataPoint.pixelPerUnit,this.i18n.get(t.scenario)||t.scenario)}))}getVarianceType(){return this.variancesDataModel.length>0?this.variancesDataModel[0].type:tt.NONE}calculateLeftSideWidth(t){var i,s,h;let e=0;const n=this.styles.fontStyles.size*this.styles.scaleFactors.labelToBar;if(tt.NONE===t&&this.isStacked())this.stackSides.negative>0&&(e=this.stackSides.negative*this.pixelPerUnit,this.stackSides.minTotal<0&&(e+=n+this.calculateTotalLabelWidth(this.stackSides.minTotal))),this.stackLabelClearance.left>0&&(e=Math.max(e,this.stackLabelClearance.left*this.pixelPerUnit+this.calculateCategoryWidth()));else if(tt.NONE===t&&null!=(null===(i=this.smallestDataPointValue)||void 0===i?void 0:i.value)&&this.smallestDataPointValue.value<0){const t=this.calculateTextBoxWidth(this.smallestDataPointValue.value);e=Math.abs(this.smallestDataPointValue.getScaledUnit())+n+t}else if(tt.RELATIVE===t&&null!=(null===(s=this.smallestVarianceDataPointValue)||void 0===s?void 0:s.value)&&this.smallestVarianceDataPointValue.value<0){const t=this.calculatePercentageTextBoxWidth(this.smallestVarianceDataPointValue.value);e=Math.abs(this.smallestVarianceDataPointValue.getScaledPercentUnit())+n+t}else if(tt.ABSOLUTE===t&&null!=(null===(h=this.smallestVarianceDataPointValue)||void 0===h?void 0:h.value)&&this.smallestVarianceDataPointValue.value<0){const t=this.calculateTextBoxWidth(this.smallestVarianceDataPointValue.value);e=Math.abs(this.smallestVarianceDataPointValue.getScaledUnit())+n+t}return e<=this.titleLength?this.titleLength:e}calculateRightSideWidth(t){var i,s,h;if(this.isStacked()){const t=this.styles.fontStyles.size*this.styles.scaleFactors.labelToBar,i=this.calculateTextBoxWidth(this.stackSides.maxTotal);let s=this.stackSides.positive*this.pixelPerUnit+t+i;return this.stackSides.minTotal<0&&(s=Math.max(s,this.stackLabelClearance.right*this.pixelPerUnit+this.position.getCategoryToAxisSpaceing()+this.calculateCategoryWidth())),Math.max(s,this.titleLength)}let e=0;const n=this.styles.fontStyles.size*this.styles.scaleFactors.labelToBar;if(tt.NONE===t&&null!=(null===(i=this.highestDataPointValue)||void 0===i?void 0:i.value)&&this.highestDataPointValue.value>=0){const t=this.calculateTextBoxWidth(this.highestDataPointValue.value);e=Math.abs(this.highestDataPointValue.getScaledUnit())+n+t}else if(tt.RELATIVE===t&&null!=(null===(s=this.highestVarianceDataPointValue)||void 0===s?void 0:s.value)&&this.highestVarianceDataPointValue.value>=0){const t=this.calculatePercentageTextBoxWidth(this.highestVarianceDataPointValue.value);e=Math.abs(this.highestVarianceDataPointValue.getScaledPercentUnit())+n+t}else if(tt.ABSOLUTE===t&&null!=(null===(h=this.highestVarianceDataPointValue)||void 0===h?void 0:h.value)&&this.highestVarianceDataPointValue.value>=0){const t=this.calculateTextBoxWidth(this.highestVarianceDataPointValue.value);e=Math.abs(this.highestVarianceDataPointValue.getScaledUnit())+n+t}return e<=this.titleLength?this.titleLength:e}populateDimensionStackSegments(t,i,s){if(0===this.rowCount||!this.fromExpr||0===t.length)return;const h={[c.ROWGROUP]:"category",[c.ROWGROUPINDEX]:"category",[c.CATEGORY]:"subCategory",[c.CATEGORYINDEX]:"subCategory"}[s];if(!h)return;const e=s.toString(),n=t[0];let r;try{r=this.db.exec(`SELECT [${e}] as displayGroup, [${h}] as stackLabel, SUM([${n}] * transformOperator(operation)) as stackValue FROM ${this.fromExpr} GROUP BY [${e}], [${h}]`)}catch(t){return void this.failQuery(t)}const o=new Map;for(const t of r){const i=t.displayGroup;o.has(i)||o.set(i,[]),null!=t.stackValue&&null!=t.stackLabel&&o.get(i).push({label:t.stackLabel,value:t.stackValue})}for(const t of this.dataModel){const i=o.get(t.category);t.stackSegments=i&&i.length>0?i.map((i=>{const s=new rt(i.value,n,this.pixelPerUnit,it.NEU);return s.key=Object.assign(Object.assign({},$(this.level,t.category)),{[h]:i.label,scenario:n}),{label:i.label,value:i.value,dataPoint:s}})):[]}}hasNoData(){return 0===this.dataModel.length}setAvailableWidth(t){if(this.pixelPerUnit<=0||t<=0)this.overflowConfig=null;else if(null==this.stackConfig){if(this.overflowConfig=this.calculateOverflowConfig(t),this.overflowConfig){const{cutWidth:t,overdriveZoneWidth:i,breakGap:s}=this.overflowConfig,h=t+i+s;this.variancesDataModel&&this.variancesDataModel.length>0?(this.highestVarianceDataPointValue.getScaledUnit()>t&&(this.highestVarianceDataPointValue=new rt(h,this.highestVarianceDataPointValue.scenario,1,this.highestVarianceDataPointValue.variance)),null!=this.smallestVarianceDataPointValue.value&&Math.abs(this.smallestVarianceDataPointValue.getScaledUnit())>t&&(this.smallestVarianceDataPointValue=new rt(-h,this.smallestVarianceDataPointValue.scenario,1,this.smallestVarianceDataPointValue.variance))):(this.highestDataPointValue.getScaledUnit()>t&&(this.highestDataPointValue=new rt(h,this.highestDataPointValue.scenario,1,this.highestDataPointValue.variance)),null!=this.smallestDataPointValue.value&&Math.abs(this.smallestDataPointValue.getScaledUnit())>t&&(this.smallestDataPointValue=new rt(-h,this.smallestDataPointValue.scenario,1,this.smallestDataPointValue.variance))),this.updatePosition()}}else this.overflowConfig=null}calculateOverflowConfig(t){const i=this.variancesDataModel&&this.variancesDataModel.length>0;if(this.getVarianceType()===tt.RELATIVE)return null;const s=i?this.highestVarianceDataPointValue:this.highestDataPointValue,h=i?this.smallestVarianceDataPointValue:this.smallestDataPointValue,e=s.getScaledUnit(),n=null!=h.value?Math.abs(h.getScaledUnit()):0,r=Math.max(e,n);if(r<=0)return null;const o=this.styles.fontStyles.size,a=o*this.styles.scaleFactors.labelToBar,l=1.5*o,c=.3*o,u=.8*o,d=t-this.position.getAxisPositionX()-this.styles.padding.left-this.styles.padding.right-a-this.calculateTextBoxWidth(s.value||0)-l-c;if(d<=u)return null;const f=d-u;return r<=f?null:{cutWidth:d,overdriveZoneWidth:l,breakGap:c,maxOverflow:r-f,scenarioCutOffset:u}}}const yt=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.tableName="",this.dataVersion=0,this.chartTitle="",this.scenarios=[],this.variances=[],this.hideCategories=!1,this.pixelPerUnit=10,this.pixelPerPercentage=50,this.limit=0,this.i18n=new Map,this.order={hierarchy:[],direction:b.ASC},this.level=c.CATEGORY,this.filter="",this.measureScale="_",this.measureUnit="",this.showMeasureScale=!0,this.dataFormatDigits={percent:2,decimal:1},this.stackConfig=null,this.parentDimensions={width:0,height:0},H(this)}getDb(){return this.stores||(this.stores=V(this.element)),this.stores.db.db}render(){var t,i,e,n;if(void 0===this.chart||void 0!==this.queryError)return s(h,null);if(this.chart.hasNoData()){const i=null!==(t=this.i18n.get("no-data"))&&void 0!==t?t:"No Data";return s(h,{class:"no-data"},s("div",{class:"empty-state"},i))}return s(h,null,s("div",{innerHTML:null===(i=this.pattern)||void 0===i?void 0:i.toString(),class:"hidePatternContainer",style:{width:"0",height:"0",overflow:"hidden"}}),s("div",{class:this.showMeasureScale?"footer":"footer-hide"},null===(e=this.chart)||void 0===e?void 0:e.getFooter()),s("div",{innerHTML:null===(n=this.chart)||void 0===n?void 0:n.toString()}))}syncQueryError(){var t,i;this.queryError=null!==(t=this.measureScaleError)&&void 0!==t?t:null===(i=this.chart)||void 0===i?void 0:i.getQueryError(),z(this.errors,this.queryError)}async componentWillLoad(){var t;const i=this.getDb(),s=this.prepareConfig(),h=this.prepareStyle();this.chart=new Pt(new y(this.ruleSetConfig),i,this.tableName,s,h),this.chart.setI18n(this.i18n);const e=s.pixelPerUnit<=0;this.autoFitScaling(s,h),this.chart.setAvailableWidth(e?0:(null===(t=this.parentDimensions)||void 0===t?void 0:t.width)||0),this.pattern=new Z(this.chart.styles),this.chart.setPattern("hatched",this.pattern.getFCPolygonPattern()),this.syncQueryError()}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.setRuleSet(new y(this.ruleSetConfig)),this.chart.setConfig(i);const h=i.pixelPerUnit<=0;this.autoFitScaling(i,s),this.chart.setAvailableWidth(h?0:(null===(t=this.parentDimensions)||void 0===t?void 0:t.width)||0),this.pattern=new Z(this.chart.styles),this.chart.setPattern("hatched",this.pattern.getFCPolygonPattern()),this.syncQueryError()}autoFitScaling(t,i){var s;const h=t.pixelPerUnit<=0,e=t.pixelPerPercentage<=0;if(!h&&!e)return;const n=()=>{var i;null===(i=this.reportAutoScaling)||void 0===i||i.call(this,{unit:h?t.pixelPerUnit:void 0,percentage:e?t.pixelPerPercentage:void 0})},r=null===(s=this.parentDimensions)||void 0===s?void 0:s.width,o=this.getDb(),a=()=>{this.chart=new Pt(new y(this.ruleSetConfig),o,this.tableName,t,i),this.chart.setI18n(this.i18n)},l=()=>(this.chart.layout(),this.chart.getAllocatedCanvasWidth());if(!r||r<=0)return h&&(t.pixelPerUnit=1),e&&(t.pixelPerPercentage=50),a(),void n();h&&(t.pixelPerUnit=1),e&&(t.pixelPerPercentage=1),a();let c=l();if(c<=0)return void n();const u=Math.max(X,.9*r/c);let d=!1,f=!1,p=null;for(let i=0;i<=3;i++){const i=j({target:r,measured:c,unitExtent:h?this.chart.getUnitBarExtent():0,pctExtent:e?this.chart.getPercentBarExtent():0,currentPpu:t.pixelPerUnit,currentPpp:t.pixelPerPercentage});if(void 0===i.ppu&&void 0===i.ppp)break;if(h&&void 0!==i.ppu&&(t.pixelPerUnit=i.ppu,d=!0),e&&void 0!==i.ppp&&(t.pixelPerPercentage=i.ppp,f=!0),a(),c=l(),c<=r+.5&&(p={ppu:t.pixelPerUnit,ppp:t.pixelPerPercentage},c>=.98*r))break}let v=!1;if(h&&!d&&(t.pixelPerUnit=u,v=!0),e&&!f&&(t.pixelPerPercentage=u,v=!0),c>r+.5){if(p)d&&(t.pixelPerUnit=p.ppu),f&&(t.pixelPerPercentage=p.ppp);else{const i=r/c;h&&(t.pixelPerUnit=Math.max(X,t.pixelPerUnit*i)),e&&(t.pixelPerPercentage=Math.max(X,t.pixelPerPercentage*i))}v=!0}v&&a(),n()}async componentWillRender(){}componentDidLoad(){}componentDidUpdate(){}prepareConfig(){const t=this.getDb(),i=Y(t,this.tableName,this.filter);return this.measureScaleError=void 0,new nt(new at,new v(new G),new G,new p,t,i,(t=>{this.measureScaleError=F(t)})).adapt({scenarios:this.scenarios,variances:this.variances,title:this.chartTitle,hideCategories:this.hideCategories,pixelPerUnit:this.pixelPerUnit,pixelPerPercentage:this.pixelPerPercentage,level:this.level,limit:this.limit,sortOrder:this.order,filter:this.filter,measureScale:this.measureScale,measureUnit:this.measureUnit,showMeasureScale:this.showMeasureScale,dataFormatDigits:this.dataFormatDigits,stackConfig:this.stackConfig})}prepareStyle(){var t,i;const s=new ct(new dt,new r,new o(new A),new U(new A),new a).adapt(this.styles);return s.locale=(null===(i=null===(t=V(this.element).context)||void 0===t?void 0:t.state)||void 0===i?void 0:i.locale)||"de",s}get element(){return this}static get style(){return':host(.no-data){display:block;box-sizing:border-box;width:100%;height:100%}:host(.no-data)>div{float:none;width:100%;height:100%}:host(.no-data) .no-data~.no-data{display:none}.empty-state{box-sizing:border-box;display:flex;align-items:center;justify-content:center;float:none;width:100%;height:100%;min-height:3em;margin:0;padding:0.5em;overflow:hidden;border:0.1em dashed #ddd;color:#808080;font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);font-style:normal;text-align:center}:host{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)}.container{display:flex;flex-direction:row}.background-image{display:flex;flex-wrap:wrap;justify-content:flex-end}.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-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}svg#drawCanvas{display:block}.footer{margin:0.2em;font-size:0.6em}.footer-hide{margin:0.2em;font-size:0.6em;opacity:0}'}},[1,"bn-chart-structure-renderer",{tableName:[1,"table-name"],dataVersion:[2,"data-version"],chartTitle:[1,"chart-title"],scenarios:[16],variances:[16],hideCategories:[4,"hide-categories"],pixelPerUnit:[2,"pixel-per-unit"],pixelPerPercentage:[2,"pixel-per-percentage"],reportAutoScaling:[16],errors:[16],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],ruleSetConfig:[16]}]);function St(){"undefined"!=typeof customElements&&["bn-chart-structure-renderer"].forEach((t=>{"bn-chart-structure-renderer"===t&&(customElements.get(e(t))||customElements.define(e(t),yt))}))}export{yt as B,St as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{S as n,a as t,A as r,b as o,T as u,D as e,c as i,M as a,d as s}from"./p-DFybNETX.js";import{T as c,i as l}from"./p-BZXiWkDS.js";import{D as f,a as d}from"./p-ja0FCkHB.js";import{O as v,a as m,p as y}from"./p-j42D1yrQ.js";import{r as p}from"./p-Dyzb4ika.js";function S(n){return null==n||""===n||"null"===n}function b(n){return"string"==typeof n&&"none"===n.trim().toLowerCase()}function N(t){return S(t)||"auto"===t.trim().toLowerCase()?[]:O((null==t?void 0:t.split(",").filter((t=>!(t.toUpperCase().trim()in n)))).toString())}function O(r){return S(r)?[]:r.replace(";",",").split(",").filter((r=>{var o,u,e;const i=r.split("_"),a=null===(o=i[0])||void 0===o?void 0:o.replace(/^dr|^d/,"").toUpperCase().trim(),s=null===(u=i[1])||void 0===u?void 0:u.toUpperCase().trim(),c=null===(e=i[2])||void 0===e?void 0:e.toUpperCase().trim();return 3!==i.length||!(a in n)||!(s in n)||!(c in t)}))}function J(t){return S(t)?[]:O(t.split(",").filter((t=>!(t.toUpperCase().trim()in n))).toString())}function j(n){return S(n)||"auto"===n.trim().toLowerCase()?[]:O(n.split(",").filter((n=>!(n.toUpperCase()in v))).toString())}function k(n){return S(n)||"auto"===n.trim().toLowerCase()?[]:n.split(",").filter((n=>void 0===y(n)))}function A(n){return!S(n)&&Number.isInteger(Number(n))}function h(n){return!S(n)&&!Number.isNaN(Number(n))}function T(n){return!S(n)&&(null==n?void 0:n.toUpperCase())in m}function D(n){return"auto"===(null==n?void 0:n.toLowerCase())||(null==n?void 0:n.toUpperCase())in r}function g(n){if(S(n))return[];try{const t=JSON.parse(n);if(t instanceof Array)return t.filter((n=>!(n.hasOwnProperty("name")&&n.hasOwnProperty("unit"))))}catch(n){console.error("validateMeasureList: failed to parse JSON",n)}return["Invalid JSON structure"]}function E(n){const t=Date.parse(n);return Number.isInteger(t)}function G(n){return(null==n?void 0:n.toUpperCase())in d}function I(n){return(null==n?void 0:n.toUpperCase())in f}function $(n){return(null==n?void 0:n.toUpperCase())in o}function C(n){return!S(n)&&(null==n?void 0:n.toUpperCase())in e}function w(n){return!S(n)&&(null==n?void 0:n.toUpperCase())in i}function z(n){return(null==n?void 0:n.toUpperCase())in c}function B(n){if(S(n))return[];try{const t=JSON.parse(n);if(t instanceof Array)return t.filter((n=>!(n.hasOwnProperty("rowGroup")&&n.hasOwnProperty("category")&&n.hasOwnProperty("subCategory"))))}catch(n){console.error("validateThereOfJsonStr: failed to parse JSON",n)}return["Invalid JSON structure"]}function M(n){if(S(n))return[];try{const t=JSON.parse(n);if(null!==t&&"object"==typeof t&&!(t instanceof Array))return Object.entries(t).filter((([,n])=>"string"!=typeof n||!l(n))).map((([n,t])=>`${n}: ${t}`))}catch(n){console.error("validateAttributesJsonStr: failed to parse JSON",n)}return["Invalid JSON structure"]}function q(n){if(S(n))return[];try{const t=JSON.parse(n);if(t instanceof Array)return t.filter((n=>!(n.hasOwnProperty("rowGroup")&&n.hasOwnProperty("category"))))}catch(n){console.error("validatePartOfJsonStr: failed to parse JSON",n)}return["Invalid JSON structure"]}function x(n){return(null==n?void 0:n.trim().toUpperCase())in a}function F(n){return["_","k","M","G","T","P","E","Z","Y","m","my","μ","n","p","f","a","z","y"].includes(null==n?void 0:n.trim())||["GREATEST","LEAST"].includes(null==n?void 0:n.trim().toUpperCase())}function L(n){return(null==n?void 0:n.toUpperCase().trim())in s}function P(n){return(null==n?void 0:n.toUpperCase().trim())in u}function X(n){if(S(n))return[];try{return JSON.parse(n).filter((n=>!(n.hasOwnProperty("scenario")&&n.hasOwnProperty("name")&&n.hasOwnProperty("subGroups"))))}catch(n){console.error("validateColumnThereOfJsonStr: failed to parse JSON",n)}return["Invalid JSON structure"]}function Z(n){if(S(n))return[];try{const t=JSON.parse(n);if("object"!=typeof t||null===t||Array.isArray(t))return["stack: must be a JSON object"];const r=[];if(t.hasOwnProperty("by")){const n=["scenarios","dimensions"];n.includes(t.by)||r.push(`stack: 'by' must be one of: ${n.join(", ")}`)}else r.push("stack: 'by' is required");if(t.hasOwnProperty("mode")){const n=["absolute","relative","absolute-relative"];n.includes(t.mode)||r.push(`stack: 'mode' must be one of: ${n.join(", ")}`)}if(t.hasOwnProperty("order")){const n=["asc","desc","dataset"];n.includes(t.order)||r.push(`stack: 'order' must be one of: ${n.join(", ")}`)}return r}catch(n){return["stack: invalid JSON"]}}function _(n){return!S(n)&&null!==p(n)}export{L as A,X as B,M as C,O as a,j as b,T as c,g as d,E as e,I as f,G as g,A as h,S as i,_ as j,b as k,D as l,F as m,Z as n,h as o,$ as p,J as q,P as r,C as s,w as t,B as u,N as v,z as w,q as x,k as y,x as z}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{S as n}from"./p-
|
|
1
|
+
import{S as n}from"./p-DFybNETX.js";import{r}from"./p-fCjsrD7I.js";const t=/^(dr|d)((?:ac|pp|fc|pl)[1-4])_((?:ac|pp|fc|pl)[1-4])(?:_(pos|neg|neu|op|opinv))?$/;class o{constructor(n,r,t){this.type=n,this.base=r,this.delta=t}static parse(n){const r=t.exec(n);return null===r?null:new o(r[1],r[2],r[3])}compute(n,t){var o;return null==n||null==t?null:"dr"===this.type?0===t?null:null!==(o=r(n-t,t))&&void 0!==o?o:null:n-t}}function i(r){const t=r.trim();if(Object.values(n).includes(t))return{kind:"scenario",slot:t};const i=o.parse(t);return null!==i?{kind:"variance",measure:i}:null}function s(n){return n.replace(/\d+$/,"")}function u(n){return n.replace(/^[a-z]+/,"")}function l(n){var r;return"dr"===(null===(r=o.parse(n.trim()))||void 0===r?void 0:r.type)}function c(n){if(!l(n.measure))return n;const r=n=>void 0===n?void 0:n/100;return Object.assign(Object.assign({},n),{min:r(n.min),max:r(n.max),refLine:r(n.refLine),highlight:n.highlight&&{from:r(n.highlight.from),to:r(n.highlight.to)}})}export{c as a,u as b,l as i,i as r,s}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{f as r,c as s}from"./p-BnmylmXF.js";import{g as o,c as t}from"./p-6242qMx1.js";import{r as m}from"./p-BrQCbmG0.js";import{m as a}from"./p-B2NXsfMz.js";const e=(r,s)=>a([r._system||{},r._default||{},void 0!==s&&r[s]||{}],{arrayMergeType:"overwrite"}),p=a=>{let p,f,i,c;const n=()=>{c=e(f.componentStyles.state,i)},j=a.connectedCallback;a.connectedCallback=()=>{const t=s(a);f=o(t),c=f.componentStyles.state._system,i=a.selectedStyle,n(),p=f.componentStyles.on("set",(o=>{o!==i&&"_default"!==o||(i=a.selectedStyle,n(),r(s(a)))})),m(j,a)};const d=a.disconnectedCallback;return a.disconnectedCallback=()=>{m(p),t(s(a)),m(d,a)},r=>(void 0!==f&&a.selectedStyle!==i&&(i=a.selectedStyle,n()),r(c))};export{e as m,p as w}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as n}from"./p-JofGXz75.js";import{r as i}from"./p-BjgkgCAQ.js";import{r as t,a as o}from"./p-CckAR27O.js";import{m as e}from"./p-DdvG1D18.js";import{L as r}from"./p-DY5fMUX8.js";const l=/^Scenario([1-4])$/,d=/^stacked_(?:col|bar)_(\d+)_seg_\d+$/,a='g[id^="stacked_col_"], g[id^="stacked_bar_"]';function s(n,i){var t;let o=n.parentElement;for(;o&&o!==i;){const n=l.exec(null!==(t=o.id)&&void 0!==t?t:"");if(n)return`scenario${n[1]}`;o=o.parentElement}}function c(n){if(""===n)return;const i=Number(n.split("_")[0]);return Number.isFinite(i)?i:void 0}function u(n){const i=n.getAttribute("data-bn-index");return null===i?void 0:Number(i)}function v(n,i){var t;return(null!==(t=n.getAttribute("class"))&&void 0!==t?t:"").split(/\s+/).includes(i)}function f(t,o,r,l,f){var g,m;const p={regions:[],barCount:0,baseline:{}},b=[];return Array.from(null!==(m=null===(g=t.shadowRoot)||void 0===g?void 0:g.querySelectorAll(o))&&void 0!==m?m:[]).forEach(((o,g)=>{var m,x,k,A;const _=null!==(m=r[g])&&void 0!==m?m:`segment${g}`,$=null===(x=o.shadowRoot)||void 0===x?void 0:x.querySelector("svg#drawCanvas");if($&&(p.regions.push({id:`canvas:${_}`,rect:e($,l)}),0===g&&(p.barCount=function(n){const i=n.querySelector('g[id="Scenario1"]');if(i)return Array.from(i.children).filter((n=>{var i;return/^\d+$/.test(null!==(i=n.id)&&void 0!==i?i:"")})).length;const t=new Set;return n.querySelectorAll(a).forEach((n=>{const i=d.exec(n.id);i&&n.querySelector("rect")&&t.add(i[1])})),t.size}($),p.baseline=n($,t)),"full"===f&&b.push(...function(n,t,o){const r=[],l=new Set;return n.querySelectorAll('g[id$="_RECT"]').forEach(((d,a)=>{var u;l.add(d);const v={kind:"bar",id:d.id,segment:t,scenario:s(d,n),index:null!==(u=c(d.id))&&void 0!==u?u:a,rect:e(d,o),point:i(d)};r.push(v)})),n.querySelectorAll(a).forEach((n=>{var a,s,c;const u=d.exec(n.id);if(!u||!n.querySelector("rect"))return;l.add(n);const v=i(n),f={kind:"bar",id:n.id,segment:t,scenario:`stack:${null!==(c=null!==(s=null!==(a=null==v?void 0:v.scenario)&&void 0!==a?a:null==v?void 0:v.subCategory)&&void 0!==s?s:null==v?void 0:v.category)&&void 0!==c?c:""}`,index:Number(u[1]),rect:e(n,o),point:v};r.push(f)})),["DATA","SCENARIO"].forEach((d=>{n.querySelectorAll(`g[id$="_${d}_Label"]`).forEach(((n,a)=>{var s,u,f;if(v(n,"hide"))return;const g=null!==(u=null===(s=n.textContent)||void 0===s?void 0:s.trim())&&void 0!==u?u:"";if(!g)return;l.add(n);const m={kind:"label",id:n.id,role:"DATA"===d?"data":"scenario",text:g,segment:t,index:null!==(f=c(n.id))&&void 0!==f?f:a,rect:e(n,o),point:i(n)};r.push(m)}))})),n.querySelectorAll("[data-bn-part]").forEach(((d,a)=>{var s,v,f;if(l.has(d))return;const g=i(d),m=null!==(s=u(d))&&void 0!==s?s:function(n,i){var t;for(let o=n;o&&o!==i;o=o.parentElement){const n=c(null!==(t=o.id)&&void 0!==t?t:"");if(void 0!==n)return n}}(d,n);if("element"===g.part){const n={kind:"point",series:g.scenario,index:null!=m?m:a,rect:e(d,o),point:g};return void r.push(n)}const p={kind:"label",id:d.id||void 0,role:"data",text:null!==(f=null===(v=d.textContent)||void 0===v?void 0:v.trim())&&void 0!==f?f:"",segment:t,index:m,rect:e(d,o),point:g};r.push(p)})),n.querySelectorAll('g[id="axis"] line').forEach((n=>{var i;const l=(null!==(i=n.getAttribute("class"))&&void 0!==i?i:"").split(/\s+/).find((n=>n.startsWith("axis-"))),d=e(n,o),a={kind:"axis",style:null==l?void 0:l.slice(5),orientation:d.context.width>=d.context.height?"horizontal":"vertical",segment:t,rect:d};r.push(a)})),n.querySelectorAll('g[id="AxisAndDateLables"] text, g[id="AxisAndDateLabelsLine"] text').forEach((i=>{var l,d;if(v(i,"hide")||function(n,i){var t;let o=n.parentElement;for(;o&&o!==i;){if((null!==(t=o.id)&&void 0!==t?t:"").endsWith("_Label"))return!0;o=o.parentElement}return!1}(i,n))return;const a=null!==(d=null===(l=i.textContent)||void 0===l?void 0:l.trim())&&void 0!==d?d:"";if(!a)return;const s={kind:"label",role:v(i,"categories")?"title":"category",text:a,segment:t,rect:e(i,o)};r.push(s)})),r}($,_,l))),"full"===f){const n=null===(k=o.shadowRoot)||void 0===k?void 0:k.querySelector(".footer"),i=null===(A=null==n?void 0:n.textContent)||void 0===A?void 0:A.trim();i&&b.push({kind:"label",role:"footer",text:i,segment:_,rect:e(n,l)})}})),"full"===f&&(p.elements=b),p}function g(l,d,a,s,c,v){var f,g,m,p;const b={version:r,tag:l.localName,id:o(l),slot:null!==(f=l.getAttribute("slot"))&&void 0!==f?f:void 0,rect:e(l,c),em:s,regions:[],metadata:{title:a},diagnostics:t(l)},x=null===(p=null===(m=null===(g=l.shadowRoot)||void 0===g?void 0:g.querySelector(d))||void 0===m?void 0:m.shadowRoot)||void 0===p?void 0:p.querySelector("svg#drawCanvas");return x&&(b.regions.push({id:"canvas",rect:e(x,c)}),b.metadata.pointCount=x.querySelectorAll("circle, ellipse").length,b.baseline=n(x,l),"full"===v&&(b.elements=function(n,t){const o=[];return n.querySelectorAll("circle, ellipse").forEach(((n,r)=>{const l={kind:"point",index:r,rect:e(n,t),point:i(n)};o.push(l)})),n.querySelectorAll('rect[data-bn-part="element"]').forEach(((n,r)=>{var l;const d=i(n),a={kind:"bar",segment:"base",scenario:null==d?void 0:d.scenario,index:null!==(l=u(n))&&void 0!==l?l:r,rect:e(n,t),point:d};o.push(a)})),n.querySelectorAll("text").forEach((n=>{var r,l;const d=null!==(l=null===(r=n.textContent)||void 0===r?void 0:r.trim())&&void 0!==l?l:"";if(!d)return;const a={kind:"label",role:"data",text:d,rect:e(n,t),point:i(n)};o.push(a)})),o}(x,c))),b}export{f as a,g as c}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as t,H as i,h as s,d as e,t as h}from"./p-BnmylmXF.js";import{r as n,m as o,s as r,g as a,d as l}from"./p-6242qMx1.js";import{C as d,I as c}from"./p-CmvpJzLd.js";import{w as u}from"./p-BrQCbmG0.js";import{e as v,r as m}from"./p-ClruFZD_.js";import{S as f,F as b,a as p,P as w}from"./p-CytMTBFu.js";import{d as y,S as g}from"./p-BjgkgCAQ.js";import{X as x,r as M,a as $,x as z,f as C,b as L,P as S,c as j,F as k,d as P,S as F}from"./p-CG-iY7pQ.js";import{g as N}from"./p-4q8nRcWC.js";import{N as W}from"./p-BJmwHV0a.js";import{a as D,r as E,i as T}from"./p-Dyzb4ika.js";class A{constructor(t,i,s,e,h){this.mode=t,this.vMax=i,this.rMaxPx=s,this.rMinPx=e,this.areaPerUnitPx2=h}static local(t,i,s){return new A("local",t,i,s,0)}static grouped(t){return new A("grouped",0,0,0,t)}radius(t){return"grouped"===this.mode?t<=0?0:Math.sqrt(this.areaPerUnitPx2*t/Math.PI):this.vMax<=0||t<=0?this.rMinPx:Math.max(this.rMinPx,this.rMaxPx*Math.sqrt(t/this.vMax))}}class B{constructor(t,i,s,e,h,n){var o,r,a,l;this.ruleSet=t,this.config=e,this.styles=h,this.availableWidth=n,this.warnings=[],this.canvasHeight=0,this.i18nMap=new Map,this.hatchPatterns=new Set,this.scaleOverflowCount=0,this.svgRoot=null,this.config=Object.assign(Object.assign({},e),{x:D(e.x),y:D(e.y)});const d=new x;let c=[];try{""!==s&&(c=i.exec(`SELECT * FROM ${s}`))}catch(t){this.queryError=v(t)}const u=(null!=c?c:[]).map((t=>d.adapt(t)));this.data=M(u,{pointLevel:e.pointLevel,seriesLevel:e.seriesLevel,facetLevel:null!==e.facet?"rowgroup"===e.facet.level?"rowGroup":"category":null,measures:{x:null!==(o=E(e.x.measure))&&void 0!==o?o:{kind:"scenario",slot:"ac1"},y:null!==(r=E(e.y.measure))&&void 0!==r?r:{kind:"scenario",slot:"ac2"},size:null!==(a=E(e.size.measure))&&void 0!==a?a:{kind:"scenario",slot:"ac3"},share:null!==e.share&&null!==(l=E(e.share.measure))&&void 0!==l?l:void 0},compareFamily:e.compareFamily,domains:{x:{min:this.config.x.min,max:this.config.x.max},y:{min:this.config.y.min,max:this.config.y.max}},limit:e.limit,limitBy:"size"}),this.warnings.push(...this.data.warnings)}get em(){return this.styles.fontStyles.size}get xPercent(){return T(this.config.x.measure)}get yPercent(){return T(this.config.y.measure)}get sizePercent(){return T(this.config.size.measure)}fontFamily(){return this.styles.fontStyles.font.replace(/^[\d.]+px\s*/,"")}textWidth(t,i=!1){const s=d(t,{font:this.styles.fontStyles.font,fontSize:this.styles.fontStyles.size+"px",fontWeight:i?"bold":"normal"}).width;return Number.isFinite(s)&&s>0?s:.6*t.length*this.em}drawText(t,i,s,e,h={}){var n,o;return t.text(i).font({size:this.styles.fontStyles.size,weight:h.bold?"bold":"normal",anchor:null!==(n=h.anchor)&&void 0!==n?n:"start"}).fill(null!==(o=h.color)&&void 0!==o?o:this.styles.fontStyles.color).attr({x:s,y:e,"font-family":this.fontFamily()})}hasNoData(){return 0===this.data.totalPoints}getWarnings(){return this.warnings}getQueryError(){return this.queryError}getAllocatedCanvasWidth(){return this.availableWidth}getAllocatedCanvasHeight(){return this.canvasHeight}setI18n(t){this.i18nMap=t}addWarningOnce(t,i){this.warnings.some((i=>i.code===t))||this.warnings.push({code:t,data:i})}primaryColorIndex(){const t=E(this.config.size.measure);return null===t||"variance"===t.kind?10:this.ruleSet.getScenarioColorIndex(t.slot)}compareColorIndex(){return this.ruleSet.getScenarioColorIndex(`${this.config.compareFamily}1`)}seriesHue(t){const{color:i,overflowed:s}=n(t,this.styles.seriesColors);return s&&this.addWarningOnce("xy-series-overflow",{}),i}familyDisplayName(t){return this.ruleSet.getScenario(`${t}1`).group}legendModel(){var t,i;const s=[],e=null!==(i=null!==(t=this.config.size.label)&&void 0!==t?t:this.i18nMap.get("legend.size"))&&void 0!==i?i:"";""!==e&&(s.push(e),void 0!==this.config.size.unit&&""!==this.config.size.unit&&s.push(`${this.i18nMap.get("axis.in")||"in"} ${this.config.size.unit}`));const h=[];if(null!==this.config.compareFamily){const t=E(this.config.size.measure),i=null!==t&&"scenario"===t.kind?t.slot.replace(/\d+$/,""):"ac";h.push(this.legendEntry(this.familyDisplayName(this.config.compareFamily),this.compareColorIndex(),0)),h.push(this.legendEntry(this.familyDisplayName(i),this.primaryColorIndex(),0))}const n=this.data.series.map((t=>{var i;return this.legendEntry(""===t.key?null!==(i=this.ruleSet.getScenario("").name)&&void 0!==i?i:"Series":t.key,this.primaryColorIndex(),t.index)}));return{sizeCaption:s,title:this.i18nMap.get("legend.title")||null,compareEntries:h,entries:n}}legendEntry(t,i,s){const e=this.seriesHue(s),h=o(i,e,"bubble");return{label:t,treatment:h,fill:this.treatmentFill(h,s,e)}}toString(){const t=new f;return this.draw(t),t.id("drawCanvas"),t.width(this.getAllocatedCanvasWidth()),t.height(this.getAllocatedCanvasHeight()),t.attr("overflow","visible"),t.svg()}axisTitle(t,i){var s;const e=null!==(s=t.label)&&void 0!==s?s:"";return""===e?"":void 0===t.unit||""===t.unit?e:`${e} ${i} ${t.unit}`}draw(t){var i,s,e,h,n,o,r,a,l,d,c;this.warnings=this.data.warnings.slice(),this.hatchPatterns.clear(),this.scaleOverflowCount=0,this.svgRoot=t;const u=this.em,v=this.styles.padding,m=this.i18nMap.get("axis.in")||"in",f=t.group(),b=new $(this.styles),p=this.legendModel(),w=this.config.legend.show&&(p.entries.length>0||p.sizeCaption.length>0),y=w?b.measure(p,this.config.legend.position):{width:0,height:0},g="right"===this.config.legend.position&&w?y.width+u:0,x=""!==this.config.chartTitle?1.6*u:0,M=this.axisTitle(this.config.y,m),L=this.axisTitle(this.config.x,m),S=""!==M?1.4*u:.4*u,j=1.4*u+(""!==L?1.3*u:0);let P,F=3*u,N={x:0,y:0,width:0,height:0},D=[];const E=Math.max(1,this.data.facets.length),T=null===(i=this.config.facet)||void 0===i?void 0:i.columns,B=W.domain(null!==(e=null===(s=this.data.extents)||void 0===s?void 0:s.xMin)&&void 0!==e?e:0,null!==(n=null===(h=this.data.extents)||void 0===h?void 0:h.xMax)&&void 0!==n?n:1,{min:this.config.x.min,max:this.config.x.max}),H=W.domain(null!==(r=null===(o=this.data.extents)||void 0===o?void 0:o.yMin)&&void 0!==r?r:0,null!==(l=null===(a=this.data.extents)||void 0===a?void 0:a.yMax)&&void 0!==l?l:1,{min:this.config.y.min,max:this.config.y.max});for(let t=0;t<2;t++){const t=Math.max(10,this.availableWidth-v.left-v.right-F-g);N={x:v.left+F,y:v.top+x+S,width:t,height:t/this.config.aspect},P=new k(E,T,N,this.styles.scaleFactors.panelGap*u);const i=P.panelRect(0).height,s=Math.max(4,Math.min(8,Math.round(i/(4*u)))),e=new W(H[0],H[1],i,0);D=e.ticks(s);const h=z(D,this.yPercent);F=Math.max(...D.map((t=>this.textWidth(C(t,h,this.styles.locale,this.yPercent)))),u)+this.styles.scaleFactors.axisTickLength*u+.4*u}this.canvasHeight=N.y+N.height+j+("bottom"===this.config.legend.position&&w?y.height+u:0)+v.bottom,""!==this.config.chartTitle&&this.drawText(f,this.config.chartTitle,v.left,v.top+u,{bold:!0}),""!==M&&this.drawAxisTitleText(f,this.config.y,m,v.left,N.y-.6*u,"start");const I=this.buildPanels(P,B,H),O=I[0].xScale.ticks(Math.max(3,Math.min(8,Math.round(I[0].rect.width/(7*u))))),Q=z(O,this.xPercent),X=z(D,this.yPercent),G=this.config.sizeAreaPerUnit>0?A.grouped(this.config.sizeAreaPerUnit):A.local(null!==(c=null===(d=this.data.extents)||void 0===d?void 0:d.sizeMax)&&void 0!==c?c:0,this.styles.scaleFactors.bubbleMaxRadius*u,this.styles.scaleFactors.bubbleMinRadius*u);0===this.data.facets.length?this.drawPanel(f,I[0],{key:"",points:[]},G,O,D,Q,X,!0,!0):this.data.facets.forEach(((t,i)=>{this.drawPanel(f,I[i],t,G,O,D,Q,X,P.isOuterLeft(i),P.isOuterBottom(i),this.data.facets.length>1?t.key:"")})),""!==L&&this.drawAxisTitleText(f,this.config.x,m,N.x+N.width,N.y+N.height+2.6*u,"end"),w&&("right"===this.config.legend.position?b.draw(f,p,N.x+N.width+u,N.y,"right"):b.draw(f,p,N.x,N.y+N.height+j,"bottom")),this.scaleOverflowCount>0&&this.addWarningOnce("bubble-scale-overflow",{count:String(this.scaleOverflowCount)}),t.group().addClass("annotations")}drawAxisTitleText(t,i,s,e,h,n){var o;const r=null!==(o=i.label)&&void 0!==o?o:"",a=void 0!==i.unit&&""!==i.unit?`${s} ${i.unit}`:"",l=.3*this.em;"start"===n?(this.drawText(t,r,e,h,{bold:!0}),""!==a&&this.drawText(t,a,e+this.textWidth(r,!0)+l,h,{})):""!==a?(this.drawText(t,a,e,h,{anchor:"end"}),this.drawText(t,r,e-this.textWidth(a)-l,h,{anchor:"end",bold:!0})):this.drawText(t,r,e,h,{anchor:"end",bold:!0})}buildPanels(t,i,s){const e=[];for(let h=0;h<t.count;h++){const n=t.panelRect(h),o=new W(i[0],i[1],n.x,n.x+n.width),r=new W(s[0],s[1],n.y+n.height,n.y);e.push({rect:n,xScale:o,yScale:r,frame:new L(o,r,n,this.styles)})}return e}treatmentFill(t,i,s){return!0!==t.hatch?t.fill:(this.ensureHatchPattern(i,s),`url(#xy-fc-${i})`)}ensureHatchPattern(t,i){this.hatchPatterns.has(t)||null===this.svgRoot||(this.hatchPatterns.add(t),this.svgRoot.defs().pattern(10,10,(t=>{t.rect(10,10).fill("#ffffff"),t.line(0,10,10,0).stroke({color:i,width:2}),t.line(-2.5,2.5,2.5,-2.5).stroke({color:i,width:2}),t.line(7.5,12.5,12.5,7.5).stroke({color:i,width:2})})).id(`xy-fc-${t}`))}drawPanel(t,i,s,e,h,n,a,l,d,c,u=""){var v,m,f,b,p,w;const g=t.group(),x=this.em;i.frame.drawBands(g,this.config.x.highlight,this.config.y.highlight),i.frame.drawGrid(g,n,void 0===this.config.x.refLine&&void 0===this.config.y.refLine&&i.rect.width>30*x?h:void 0),i.frame.drawRefLines(g,this.config.x.refLine,this.config.y.refLine),i.frame.drawFrame(g);const M=g.group().id("compare"),$=g.group().id("primary"),z=new S(i.rect,this.styles.scaleFactors.labelToMark*x),C=[...s.points].sort(((t,i)=>{var s,e;return(null!==(s=i.size)&&void 0!==s?s:0)-(null!==(e=t.size)&&void 0!==e?e:0)})),L=[];for(const t of C){const h=null!==(m=null===(v=this.data.series.find((i=>i.key===t.seriesKey)))||void 0===v?void 0:v.index)&&void 0!==m?m:0,n=this.seriesHue(h),a=o(this.primaryColorIndex(),n,"bubble"),l=i.xScale.scale(t.x),d=i.yScale.scale(t.y),c=e.radius(null!==(f=t.size)&&void 0!==f?f:0);if(this.config.sizeAreaPerUnit>0&&this.bubbleExceedsPanel(i.rect,l,d,c)&&this.scaleOverflowCount++,null!=t.compare){const s=o(this.compareColorIndex(),n,"bubble"),r=i.xScale.scale(t.compare.x),a=i.yScale.scale(t.compare.y),l=e.radius(null!==(b=t.compare.size)&&void 0!==b?b:0);this.drawBubble(M,r,a,l,s,h,n),z.registerMark(r,a,l),this.config.labels.values&&void 0!==t.compare.size&&l>=1.2*x&&this.drawValueLabel(M,r,a,l,t.compare.size,s.fill)}const u=j(t,s.key,this.config);null===(p=this.drawBubble($,l,d,c,a,h,n))||void 0===p||p.attr(y(u,"element")),z.registerMark(l,d,c),void 0!==t.share&&c>0&&(null===(w=this.drawShareSlice($,l,d,c,t.share,r(n)))||void 0===w||w.attr(y(u))),this.config.labels.values&&void 0!==t.size&&this.drawValueLabel($,l,d,c,t.size,!0===a.hatch?"#ffffff":a.fill),L.push({point:t,cx:l,cy:d,r:c,seriesIndex:h,hue:n,treatment:a})}this.drawNameLabels(g,z,L,s.key),i.frame.drawTickLabels(g,{ticksX:h,ticksY:n,xDecimals:a,yDecimals:l,xPercent:this.xPercent,yPercent:this.yPercent,showXLabels:c,showYLabels:d}),""!==u&&i.frame.drawPanelTitle(g,u)}bubbleExceedsPanel(t,i,s,e){return i-e<t.x||i+e>t.x+t.width||s-e<t.y||s+e>t.y+t.height}drawBubble(t,i,s,e,h,n,o){if(!(e<=0))return t.circle(2*e).center(i,s).fill(this.treatmentFill(h,n,o)).stroke({color:h.stroke,width:h.strokeWidth})}drawShareSlice(t,i,s,e,h,n){if(h<=0)return;if(h>=1)return t.circle(2*e).center(i,s).fill(n);const o=2*h*Math.PI,r=i+e*Math.sin(o),a=s-e*Math.cos(o),l=o>Math.PI?1:0;return t.path(`M ${i} ${s} L ${i} ${s-e} A ${e} ${e} 0 ${l} 1 ${r} ${a} Z`).fill(n).stroke("none")}drawValueLabel(t,i,s,e,h,n){const o=C(h,this.valueDecimals(),this.styles.locale,this.sizePercent);this.textWidth(o)+.4*this.em>2*e||this.drawText(t,o,i,s+.35*this.em,{anchor:"middle",color:N(n)})}drawNameLabels(t,i,s,e){const h=[...s].sort(((t,i)=>{var s,e;return(null!==(s=i.point.size)&&void 0!==s?s:0)-(null!==(e=t.point.size)&&void 0!==e?e:0)})),{selected:n,unknownNames:o}=i.selectCandidates(h,this.config.labels.points,this.config.labels.max,(t=>t.point.name));o.length>0&&this.addWarningOnce("xy-label-unknown",{names:o.join(", ")});const r=new Map,a=n.map((t=>{const i={name:t.point.name,cx:t.cx,cy:t.cy,r:t.r,width:this.textWidth(t.point.name),height:1.1*this.em};return r.set(i,t.point),i}));for(const s of i.place(a))this.drawText(t,s.candidate.name,s.x,s.y+.9*s.candidate.height,{}).attr(y(j(r.get(s.candidate),e,this.config),"label"))}valueDecimals(){var t,i,s;let e=0;for(const h of this.data.facets)for(const n of h.points)e=Math.max(e,Math.abs(null!==(t=n.size)&&void 0!==t?t:0),Math.abs(null!==(s=null===(i=n.compare)||void 0===i?void 0:i.size)&&void 0!==s?s:0));return e>0&&Number.isFinite(e)?(this.sizePercent&&(e*=100),W.stepDecimals(Math.pow(10,Math.floor(Math.log10(e))-2))):1}}const H=["xy-duplicate-point","xy-point-clipped","xy-variance-nodata","xy-label-unknown","xy-series-overflow","xy-point-budget","bubble-size-negative","bubble-share-range","bubble-scale-overflow"],I=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.tableName="",this.dataVersion=0,this.chartTitle="",this.share=null,this.compareFamily=null,this.facet=null,this.pointLevel="category",this.seriesLevel=null,this.aspect=16/9,this.limit=0,this.filter="",this.sizeAreaPerUnit=0,this.i18n=new Map,this.containerWidth=0,this.svgMarkup="",u(this)}getDb(){return this.stores||(this.stores=a(this.element)),this.stores.db.db}componentWillLoad(){this.rebuild()}componentWillUpdate(){this.rebuild()}rebuild(){const t=this.prepareStyle(),i=l(this.getDb(),this.tableName,this.filter);this.chart=new B(new c(this.ruleSetConfig),this.getDb(),i,{chartTitle:this.chartTitle,x:this.x,y:this.y,size:this.size,share:this.share,compareFamily:this.compareFamily,labels:this.labels,legend:this.legend,facet:this.facet,pointLevel:this.pointLevel,seriesLevel:this.seriesLevel,aspect:this.aspect,limit:this.limit,sizeAreaPerUnit:this.sizeAreaPerUnit},t,this.containerWidth||0),this.chart.setI18n(this.i18n),this.svgMarkup=this.chart.hasNoData()?"":this.chart.toString(),this.syncWarnings(this.chart.getWarnings()),m(this.errors,this.chart.getQueryError())}syncWarnings(t){if(void 0===this.errors)return;const i=new Map(t.map((t=>[t.code,t.data])));for(const t of H){const s=`WARN_${t.replace(/-/g,"_")}`;if(i.has(t)){const e=void 0!==this.translator?this.translator(`.${t}`,i.get(t)):t;this.errors.addOrReplace({id:s,type:"warning",message:e})}else this.errors.remove(s)}}prepareStyle(){var t,i;const s=new P(new F,new b,new p(new g),new w).adapt(this.styles);return s.locale=(null===(i=null===(t=a(this.element).context)||void 0===t?void 0:t.state)||void 0===i?void 0:i.locale)||"de",s}render(){var t;if(void 0===this.chart||void 0!==this.chart.getQueryError())return s(e,null);if(this.chart.hasNoData()){const i=null!==(t=this.i18n.get("no-data"))&&void 0!==t?t:"No Data";return s(e,{class:"no-data"},s("div",{class:"empty-state"},i))}return s(e,null,s("div",{innerHTML:this.svgMarkup}))}get element(){return this}static get style(){return':host(.no-data){display:block;box-sizing:border-box;width:100%;height:100%}:host(.no-data)>div{float:none;width:100%;height:100%}:host(.no-data) .no-data~.no-data{display:none}.empty-state{box-sizing:border-box;display:flex;align-items:center;justify-content:center;float:none;width:100%;height:100%;min-height:3em;margin:0;padding:0.5em;overflow:hidden;border:0.1em dashed #ddd;color:#808080;font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);font-style:normal;text-align:center}:host{position:relative;display:inline-block}'}},[1,"bn-chart-bubble-renderer",{tableName:[1,"table-name"],dataVersion:[2,"data-version"],chartTitle:[1,"chart-title"],x:[16],y:[16],size:[16],share:[16],compareFamily:[1,"compare-family"],labels:[16],legend:[16],facet:[16],pointLevel:[1,"point-level"],seriesLevel:[1,"series-level"],aspect:[2],limit:[2],filter:[1],sizeAreaPerUnit:[2,"size-area-per-unit"],styles:[16],i18n:[16],containerWidth:[2,"container-width"],ruleSetConfig:[16],errors:[16],translator:[16]}]);function O(){"undefined"!=typeof customElements&&["bn-chart-bubble-renderer"].forEach((t=>{"bn-chart-bubble-renderer"===t&&(customElements.get(h(t))||customElements.define(h(t),I))}))}export{I as B,O as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const r=1,l="4,4",e={ac:{markerFill:"#000000",markerStroke:"#000000",lineColor:"#000000"},pp:{markerFill:"#999999",markerStroke:"#999999",lineColor:"#999999"},fc:{markerFill:"#ffffff",markerStroke:"#000000",lineColor:"#000000",lineDashArray:l},pl:{markerFill:"#ffffff",markerStroke:"#000000",lineColor:"#000000"}},o={ac:{fill:"#000000",opacity:.3,lineColor:"#000000"},pp:{fill:"#999999",opacity:.3,lineColor:"#999999"},fc:{fill:"#000000",opacity:.2,lineColor:"#000000",dashArray:l},pl:{fill:"#000000",opacity:.1,lineColor:"#000000"}},a=(r,l)=>{const a=e[l];return{bar:Object.assign({},r["bn-chart-time"].barStyles[l]),line:Object.assign({color:a.lineColor},a.lineDashArray&&{dashArray:a.lineDashArray}),marker:{fill:a.markerFill,stroke:a.markerStroke},area:Object.assign({},o[l])}};function i(r,l){const e=r["bn-chart-time"].varianceStyles;return{apiVersion:1,fontFamily:r.global.fontFamily,fontSizePx:r.global.fontSizePx,scenarios:{ac:a(r,"ac"),pp:a(r,"pp"),fc:a(r,"fc"),pl:a(r,"pl")},variance:{pos:Object.assign({},e.pos),neg:Object.assign({},e.neg),neu:Object.assign({},e.neu)},scalingGroups:Object.fromEntries(Object.entries(l).filter((r=>void 0!==r[1])))}}export{l as D,e as I,r as N,o as S,i as b}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as e,h as i,
|
|
1
|
+
import{p as t,H as e,h as i,d as s,t as a}from"./p-BnmylmXF.js";import{i as o}from"./p-Dw3rv_Y9.js";import{w as n}from"./p-BrQCbmG0.js";import{w as r}from"./p-JG4Sx1lE.js";import{w as f}from"./p-D32TsLzd.js";import{V as l,a as d,p as m}from"./p-DM7fwmH4.js";const h=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),n(this),this.errors=f(this),this.componentStyle=r(this)}validateFormat(t){const e="WARN_format";o(t)||l.includes(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:`format: invalid value '${t}' is not supported. Valid values: ${l.join(", ")}`})}validateOrientation(t){const e="WARN_orientation";o(t)||d.includes(t)?this.errors.remove(e):this.errors.addOrReplace({id:e,type:"warning",message:`orientation: invalid value '${t}' is not supported. Valid values: ${d.join(", ")}`})}componentWillLoad(){this.validateFormat(this.format),this.validateOrientation(this.orientation)}render(){return i(s,{key:"b2d1a2638c7bee2b2e134d5fedbac63fe38e9830",format:this.format,orientation:this.orientation,style:this.prepareStyle()},i("slot",{key:"4769d18000916a16ee9da8fb0c19b5d8b12393c0"}))}prepareStyle(){const t={"font-family":this.componentStyle((t=>t.global.fontFamily)),"font-size":`${this.componentStyle((t=>t.global.fontSizePx))}px`,"--bn-font-family":this.componentStyle((t=>t.global.fontFamily))||"'Noto Sans', sans-serif","--bn-font-size":`${this.componentStyle((t=>t.global.fontSizePx))||13.3333}px`,"--bn-font-color":this.componentStyle((t=>t.global.fontColor))||"#000000","--bn-font-background":this.componentStyle((t=>t.global.fontBackgroundColor))||"#ffffff"};if(l.includes(this.format)){const{width:e,height:i}=m(this.format,this.orientation);t.width=e,t.height=i}return t}get element(){return this}static get watchers(){return{format:[{validateFormat:0}],orientation:[{validateOrientation:0}]}}static get style(){return':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);height:768px;width:1024px;display:flex;flex-direction:column;page-break-after:always;overflow:hidden}'}},[257,"bn-page",{selectedStyle:[513,"selected-style"],format:[1],orientation:[1]},void 0,{format:[{validateFormat:0}],orientation:[{validateOrientation:0}]}]);function p(){"undefined"!=typeof customElements&&["bn-page"].forEach((t=>{"bn-page"===t&&(customElements.get(a(t))||customElements.define(a(t),h))}))}export{h as P,p as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{S as e}from"./p-CeE4_3wQ.js";import{C as t}from"./p-
|
|
1
|
+
import{S as e}from"./p-CeE4_3wQ.js";import{C as t}from"./p-DFybNETX.js";var r;!function(e){e[e.Y=1e24]="Y",e[e.Z=1e21]="Z",e[e.E=1e18]="E",e[e.P=1e15]="P",e[e.T=1e12]="T",e[e.G=1e9]="G",e[e.M=1e6]="M",e[e.k=1e3]="k",e[e.h=100]="h",e[e.da=10]="da",e[e.d=.1]="d",e[e.c=.01]="c",e[e.m=.001]="m",e[e.my=1e-6]="my",e[e.n=1e-9]="n",e[e.p=1e-12]="p",e[e.f=1e-15]="f",e[e.a=1e-18]="a",e[e.z=1e-21]="z",e[e.y=1e-24]="y"}(r||(r={}));class n{static calculateMeasureScale(t,r,n,a,s){var i,u;if("_"===a)return new e;if("μ"===a&&(a="my"),null!=a&&[...this.unitsLeast,...this.unitsGreat].includes(a))return this.lookupPrefix(a);const h=n.filter((e=>3===e.length));if(0===h.length||!r)return new e;const l=`SELECT MAX(GREATEST(${h.map((e=>"ABS("+e+")")).toString()})) as prefixvalue\n FROM ${r}`,c=`SELECT MIN(LEAST(${h.map((e=>"ABS("+e+")")).toString()})) as prefixvalue\n FROM ${r}`;let o,f=l;"LEAST"===(null==a?void 0:a.toUpperCase())&&(f=c);try{o=null!==(u=null===(i=t.exec(f)[0])||void 0===i?void 0:i.prefixvalue)&&void 0!==u?u:0}catch(t){return null==s||s(t),new e}return this.determinePrefix(Math.abs(o))}static determinePrefix(t){if(!Number.isFinite(t)||t<=0)return new e;if(t>=1e3){const r=Math.min(Math.floor(Math.log10(t)/3),this.unitsGreat.length)-1;return new e(this.unitsGreat[r],Math.pow(1e3,r+1))}if(t<=.001){const r=Math.min(-Math.floor(Math.log10(t)/3),this.unitsLeast.length)-1;return new e(this.unitsLeast[r],Math.pow(1e3,-(r+1)))}return new e}static lookupPrefix(t){return new e(t,r[t])}}n.unitsGreat=["k","M","G","T","P","E","Z","Y"],n.unitsLeast=["m","my","n","p","f","a","z","y"];class a{constructor(e=2,t=1){this.percent=e,this.decimal=t}}class s{adapt(e){const r=new a,n=e=>t.isNumber(e)&&Number.isInteger(e)&&e>=0&&e<=100;return n(e.percent)&&(r.percent=e.percent),n(e.decimal)&&(r.decimal=e.decimal),r}default(){return new a}}export{n as D,a,s as b}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as n}from"./p-
|
|
1
|
+
import{A as n}from"./p-DDo-fu3v.js";var c,t;!function(n){n.ASC="asc",n.DESC="desc"}(c||(c={})),function(n){n.ROWGROUP="rowGroup",n.ROWGROUPINDEX="rowGroupIndex",n.CATEGORY="category",n.CATEGORYINDEX="categoryIndex",n.SUBCATEGORY="subCategory",n.SUBCATEGORYINDEX="subCategoryIndex",n.AC1="ac1",n.AC2="ac2",n.AC3="ac3",n.AC4="ac4",n.PP1="pp1",n.PP2="pp2",n.PP3="pp3",n.PP4="pp4",n.FC1="fc1",n.FC2="fc2",n.FC3="fc3",n.FC4="fc4",n.PL1="pl1",n.PL2="pl2",n.PL3="pl3",n.PL4="pl4"}(t||(t={}));class o{constructor(n=["category"],t=c.ASC){this.hierarchy=n,this.direction=t}}const r=[t.ROWGROUP,t.ROWGROUPINDEX,t.CATEGORY,t.CATEGORYINDEX,t.SUBCATEGORY,t.SUBCATEGORYINDEX],a=/^(?:ac|fc|pp|pl)[1-4]$/,s=/^(dr|d)((?:ac|fc|pp|pl)[1-4])_((?:ac|fc|pp|pl)[1-4])(?:_(?:pos|neg|neu|opinv|op))?$/;function p(n){if(null==n)return;const c=n.indexOf("@"),o=(c<0?n:n.slice(0,c)).trim().toLowerCase(),p=c<0?void 0:n.slice(c+1).trim();if(""===p)return;const e=t[o.toUpperCase()];if(null!=e&&r.includes(e))return void 0===p?{kind:"dim",column:e}:void 0;if(a.test(o))return{kind:"scenario",column:o,bucket:p};const u=s.exec(o);if(null!=u){const[,n,c,t]=u;return{kind:"variance",column:`${n}${c}_${t}`,type:n,base:c,delta:t,bucket:p}}}function e(n){const c=p(n);if(null!=c)return void 0===c.bucket?c.column:`${c.column}@${c.bucket}`}class u{constructor(n,c=!1){this.stringAdapter=n,this.allowMeasures=c}adapt(r){var a;const s=n.adaptArray(r.hierarchy,this.stringAdapter),p=c[null===(a=r.direction)||void 0===a?void 0:a.toUpperCase()]||c.ASC;return new o(s.map((n=>(this.allowMeasures?e(n):t[n.toUpperCase()])||t.CATEGORY)),p)}default(){return new o(["category"],c.ASC)}}export{t as O,c as a,o as b,u as c,e as n,p}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{D as t}from"./p-BrQCbmG0.js";var e,s;!function(t){t.YEAR="year",t.QUARTER="quarter",t.MONTH="month",t.WEEK="week",t.DAY="day",t.HOUR="hour",t.MINUTE="minute",t.SECOND="second",t.MILLISECOND="millisecond",t.NONE="fallback",t.AUTO="auto"}(e||(e={})),function(t){t.AVG="avg",t.INTERVAL="interval",t.START="start",t.END="end",t.YTD="ytd",t.YTG="ytg",t.CUM="cum",t.MAT="mat",t.NONE="none",t.AUTO="auto"}(s||(s={}));class r{constructor(){this._dateFormat={year:"yyyy",quarter:"q'Q' yyyy",month:"LLL yyyy",week:"'KW'WW kkkk",day:"dd.MM.yyyy",hour:"TT",minute:"TT",second:"TT",millisecond:"TT:SSS",fallback:"dd.MM.yyyy"},this._dateFormatShort={year:"yy",quarter:"q'Q'",month:"LLL",week:"'KW'WW",day:"dd",hour:"hh'h'",minute:"mm'm'",second:"ss's'",millisecond:"SSS'ms'",fallback:"dd.MM.yyyy"},this._dateLinkFormat={avg:"Ø[LINK]",interval:"[DATE]..[DATE2]",start:".[DATE]",end:"[DATE].",ytd:"_[DATE]",ytg:"[DATE]_",cum:"[DATE]_[DATE2]",mat:"~[DATE]",none:"[DATE]"},this.locale="de",this.dateFormatPinned=!1,this.dateFormatShortPinned=!1,this.dateFormat=this._dateFormat,this.dateLinkFormat=this._dateLinkFormat,this.dateFormatShort=this._dateFormatShort}setDateLinkFormat(t){this.dateLinkFormat=t}setDateFormat(t){this.dateFormat=t,this.dateFormatPinned=!0}setDateFormatShort(t){this.dateFormatShort=t,this.dateFormatShortPinned=!0}patchDateFormatShort(t){this.dateFormatShort=Object.assign(Object.assign({},this.dateFormatShort),t)}setLocale(t){this.locale=t,this.dateFormatPinned||(this.dateFormat=Object.assign(Object.assign({},this._dateFormat),r.LOCALE_DATE_FORMAT[t]||{})),this.dateFormatShortPinned||(this.dateFormatShort=Object.assign(Object.assign({},this._dateFormatShort),r.LOCALE_DATE_FORMAT_SHORT[t]||{}))}getDateString(t,e){return t.setLocale(this.locale).toFormat(this.dateFormat[e]||this.dateFormat.fallback)}getSmartDateString(t,s){switch(s){case e.DAY:return this.getFormatedDayDate(t);case e.MONTH:return this.getFormatedMonthDate(t);case e.QUARTER:return this.getFormatedQuarterDate(t);case e.WEEK:return this.getFormatedWeekDate(t);case e.HOUR:return this.getFormatedHourDate(t);case e.MINUTE:return this.getFormatedMinuteDate(t);case e.SECOND:return this.getFormatedSecondDate(t);case e.MILLISECOND:return this.getFormatedMilliSecondDate(t);default:return this.getDateString(t,s)}}calculateDistanceType(s,r,i=32){if(null==r)return e.DAY;const a="number"==typeof s?t.fromMillis(s):s,n="number"==typeof r?t.fromMillis(r):r;return 0===n.diff(a).as("milliseconds")?e.DAY:n.diff(a).as("milliseconds")<i?e.MILLISECOND:n.diff(a).as("seconds")<i?e.SECOND:n.diff(a).as("minutes")<i?e.MINUTE:n.diff(a).as("hours")<i?e.HOUR:n.diff(a).as("days")<i?e.DAY:n.diff(a).as("weeks")<i?e.WEEK:n.diff(a).as("months")<i?e.MONTH:n.diff(a).as("quarters")<i?e.QUARTER:e.YEAR}datesBetween(t,e,s){const r=this.convertDateDistanceToMomentunitOfTime(s),i=t.startOf(r),a=e.endOf(r),n=[];let h=i;do{n.push(h),h=h.plus(this.createDiratonLike(r,1))}while(h<=a);return n}countBetween(t,e,s){const r=this.convertDateDistanceToMomentunitOfTime(s);return Math.floor(e.startOf(r).diff(t.startOf(r),r).as(r))+1}getDateLinkString(r,i,a,n,h){if(null==r&&null==i)return"";if(null==r&&a!==s.END&&a!==s.YTD)return"";if(null==i&&(s.INTERVAL===a||s.CUM===a||s.END===a||s.YTD===a))return"";const u=r||t.now(),c=i;n===e.AUTO&&(n=this.calculateDistanceType(u,c,h));let o=this.getDateString(u,n),l="",y=s.NONE;return null!=c&&(l=this.getDateString(c,n),y=s.INTERVAL,o===l&&a===s.INTERVAL&&(a=s.NONE),o===l&&a===s.AVG&&(y=s.NONE),s.END!==a&&s.YTD!==a||(o=l),a!==s.INTERVAL&&a!==s.CUM&&a!==s.AVG||(n===e.QUARTER?u.quarter===c.quarter&&u.year===c.year?l=l.replace(" "+c.year,""):u.year===c.year&&(o=o.replace(" "+u.year,"")):n===e.MONTH?u.month===c.month&&u.year===c.year?l=l.replace(" "+c.year,""):u.year===c.year&&(o=o.replace(" "+u.year,"")):n===e.WEEK&&(u.weekNumber===c.weekNumber&&u.weekYear===c.weekYear?l=l.replace(" "+c.weekYear,""):u.weekYear===c.weekYear&&(o=o.replace(" "+u.weekYear,""))))),this.dateLinkFormat[a].replace("[LINK]",this.dateLinkFormat[y]).replace("[DATE]",o).replace("[DATE2]",l)}getShortDateString(t,e){return t.setLocale(this.locale).toFormat(this.dateFormatShort[e]||this.dateFormatShort.fallback)}getFormatedDayDate(t){let e=this.dateFormatShort.day;return this.isFirstInMonth(t)&&(e+=" "+this.dateFormatShort.month),this.isJanuary(t)&&(e+=" "+this.dateFormatShort.year),t.setLocale(this.locale).toFormat(e)}getFormatedMonthDate(t){let e=this.dateFormatShort.month;return this.isJanuary(t)&&(e+=" "+this.dateFormatShort.year),t.setLocale(this.locale).toFormat(e)}getFormatedQuarterDate(t){let e=this.dateFormatShort.quarter;return this.isFirstQuarter(t)&&(e+=" "+this.dateFormatShort.year),t.setLocale(this.locale).toFormat(e)}getFormatedWeekDate(t){let e=this.dateFormatShort.week;return this.isFirstWeek(t)&&(e+=" kk"),t.setLocale(this.locale).toFormat(e)}getFormatedHourDate(t){let e=this.dateFormatShort.hour;return this.isFirstHour(t)&&(e+=" "+this.dateFormatShort.day),t.setLocale(this.locale).toFormat(e)}getFormatedMinuteDate(t){let e=this.dateFormatShort.minute;return this.isFirstMinute(t)&&(e=this.dateFormatShort.hour+":"+e),t.setLocale(this.locale).toFormat(e)}getFormatedSecondDate(t){let e=this.dateFormatShort.second;return this.isFirstSecond(t)&&(e=this.dateFormatShort.minute+":"+e),t.setLocale(this.locale).toFormat(e)}getFormatedMilliSecondDate(t){let e=this.dateFormatShort.millisecond;return this.isFirstMilliSecond(t)&&(e=this.dateFormatShort.second+":"+e),t.setLocale(this.locale).toFormat(e)}isSmartBoundary(t,s){switch(s){case e.DAY:return this.isFirstInMonth(t);case e.WEEK:return this.isFirstWeek(t);case e.MONTH:return this.isJanuary(t);case e.QUARTER:return this.isFirstQuarter(t);default:return!1}}isFirstInMonth(t){return 1===t.day}isJanuary(t){return 1===t.month}isFirstQuarter(t){return 1===t.quarter}isFirstWeek(t){return 1===t.weekNumber}isFirstHour(t){return 0===t.hour}isFirstMinute(t){return 0===t.minute}isFirstSecond(t){return 0===t.second}isFirstMilliSecond(t){return 0===t.millisecond}convertDateDistanceToMomentunitOfTime(t){let s;switch(t){case e.YEAR:s="year";break;case e.MONTH:s="month";break;case e.QUARTER:s="quarter";break;case e.WEEK:s="week";break;case e.DAY:s="day";break;case e.HOUR:s="hour";break;case e.MINUTE:s="minute";break;case e.SECOND:s="second";break;case e.MILLISECOND:s="millisecond";break;default:s="day"}return s}createDiratonLike(t,e){switch(t){case"year":return{years:e};case"month":return{months:e};case"quarter":return{quarters:e};case"week":return{weeks:e};case"day":default:return{days:e};case"hour":return{hours:e};case"minute":return{minutes:e};case"second":return{seconds:e};case"millisecond":return{milliseconds:e}}}}r.LOCALE_DATE_FORMAT={en:{week:"'W'WW kkkk",day:"MM/dd/yyyy",fallback:"MM/dd/yyyy"}},r.LOCALE_DATE_FORMAT_SHORT={en:{week:"'W'WW",fallback:"MM/dd/yyyy"}};export{e as D,s as a,r as b}
|