@bino-bi/bn-template-engine 1.0.0-next.34 → 1.0.0-next.35

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.
Files changed (145) hide show
  1. package/dist/bn-template-engine/bn-template-engine.esm.js +1 -1
  2. package/dist/bn-template-engine/p-4ef6683e.entry.js +1 -0
  3. package/dist/bn-template-engine/{p-7d475277.entry.js → p-5a64f90f.entry.js} +1 -1
  4. package/dist/bn-template-engine/{p-789bfd06.entry.js → p-93b8387f.entry.js} +1 -1
  5. package/dist/bn-template-engine/{p-66ed6259.entry.js → p-9a61f59d.entry.js} +1 -1
  6. package/dist/bn-template-engine/p-BVU4bIsi.js +1 -0
  7. package/dist/bn-template-engine/{p-CJfJQT0m.js → p-D0tNATZq.js} +1 -1
  8. package/dist/bn-template-engine/p-DF9sfwBN.js +1 -0
  9. package/dist/bn-template-engine/{p-CAvWZ3a5.js → p-DyupX-Z-.js} +1 -1
  10. package/dist/bn-template-engine/{p-14d021be.entry.js → p-b0dfc113.entry.js} +1 -1
  11. package/dist/bn-template-engine/{p-dec6837c.entry.js → p-eea538f1.entry.js} +1 -1
  12. package/dist/bn-template-engine/{p-CHZ50kEY.js → p-qpZjVnX5.js} +1 -1
  13. package/dist/cjs/bn-annotation-layer_30.cjs.entry.js +206 -48
  14. package/dist/cjs/bn-grid.cjs.entry.js +3 -3
  15. package/dist/cjs/bn-image.cjs.entry.js +2 -2
  16. package/dist/cjs/bn-internationalization.cjs.entry.js +2 -2
  17. package/dist/cjs/bn-ruleset.cjs.entry.js +2 -2
  18. package/dist/cjs/bn-text.cjs.entry.js +3 -3
  19. package/dist/cjs/{localFrame-P5SDUOto.js → localFrame-U3Qs0psw.js} +1 -1
  20. package/dist/cjs/{withBodyObserver-B1_hmuUz.js → withBodyObserver-S-FGHpAX.js} +1 -1
  21. package/dist/cjs/{withHasError-3kR2tdhJ.js → withHasError-BkBrsCpI.js} +8 -7
  22. package/dist/cjs/{withStyled-eHD8Yt2K.js → withStyled-DfE0aW7D.js} +63 -3
  23. package/dist/cjs/{withTranslation-yJ-j0lsu.js → withTranslation-0gkn9xoC.js} +2 -2
  24. package/dist/collection/components/bn-table/bn-table-renderer/bn-table-renderer.js +9 -2
  25. package/dist/collection/components/bn-table/bn-table.js +19 -10
  26. package/dist/collection/components/bn-table/utils/Table.js +34 -8
  27. package/dist/collection/components/bn-table/utils/elements/CellBarChart.js +84 -13
  28. package/dist/collection/components/bn-table/utils/helper/DataQuery.js +57 -10
  29. package/dist/collection/components/bn-table/utils/helper/barColumnGeometry.js +5 -5
  30. package/dist/collection/stores/ruleSets.js +8 -7
  31. package/dist/collection/utils/ibcsRuleSet.js +2 -1
  32. package/dist/collection/utils/model/Order.js +49 -2
  33. package/dist/collection/utils/validate.js +11 -1
  34. package/dist/components/bn-annotation-layer.js +1 -1
  35. package/dist/components/bn-annotation-list.js +1 -1
  36. package/dist/components/bn-asset.js +1 -1
  37. package/dist/components/bn-body.js +1 -1
  38. package/dist/components/bn-card.js +1 -1
  39. package/dist/components/bn-chart-bubble-renderer.js +1 -1
  40. package/dist/components/bn-chart-bubble.js +1 -1
  41. package/dist/components/bn-chart-bullet-renderer.js +1 -1
  42. package/dist/components/bn-chart-bullet.js +1 -1
  43. package/dist/components/bn-chart-scatter-renderer.js +1 -1
  44. package/dist/components/bn-chart-scatter.js +1 -1
  45. package/dist/components/bn-chart-structure-renderer.js +1 -1
  46. package/dist/components/bn-chart-structure.js +1 -1
  47. package/dist/components/bn-chart-time-renderer.js +1 -1
  48. package/dist/components/bn-chart-time.js +1 -1
  49. package/dist/components/bn-component-style.js +1 -1
  50. package/dist/components/bn-context.js +1 -1
  51. package/dist/components/bn-dataset.js +1 -1
  52. package/dist/components/bn-datasource.js +1 -1
  53. package/dist/components/bn-footer.js +1 -1
  54. package/dist/components/bn-grid.js +1 -1
  55. package/dist/components/bn-image.js +1 -1
  56. package/dist/components/bn-internationalization.js +1 -1
  57. package/dist/components/bn-layout-card.js +1 -1
  58. package/dist/components/bn-layout-page.js +1 -1
  59. package/dist/components/bn-message.js +1 -1
  60. package/dist/components/bn-page.js +1 -1
  61. package/dist/components/bn-ruleset.js +1 -1
  62. package/dist/components/bn-scaling-group.js +1 -1
  63. package/dist/components/bn-table-renderer.js +1 -1
  64. package/dist/components/bn-table.js +1 -1
  65. package/dist/components/bn-text.js +1 -1
  66. package/dist/components/bn-title-renderer.js +1 -1
  67. package/dist/components/bn-title.js +1 -1
  68. package/dist/components/bn-tree.js +1 -1
  69. package/dist/components/p-16rjcQ0t.js +1 -0
  70. package/dist/components/{p-8a2-IS-y.js → p-2eicD9rF.js} +1 -1
  71. package/dist/components/p-4vVbchX2.js +1 -0
  72. package/dist/components/{p-VIw66ez1.js → p-7ieJFBUk.js} +1 -1
  73. package/dist/components/{p-Dn3DJxQQ.js → p-9mUU4itF.js} +1 -1
  74. package/dist/components/{p-D5LDmR4u.js → p-B5tixDPM.js} +1 -1
  75. package/dist/components/p-BPGLOHUe.js +1 -0
  76. package/dist/components/{p-B3F_c9GB.js → p-BU_53KVT.js} +1 -1
  77. package/dist/components/p-BW842XlW.js +1 -0
  78. package/dist/components/p-BXXjh6We.js +1 -0
  79. package/dist/components/{p-C-oNdJj9.js → p-BXg3v5AO.js} +1 -1
  80. package/dist/components/{p-B7UDMyar.js → p-BhEdmPjm.js} +1 -1
  81. package/dist/components/{p-nHZ8466v.js → p-BmOWXYHF.js} +1 -1
  82. package/dist/components/{p-DLLljAll.js → p-Bo_R7f_T.js} +1 -1
  83. package/dist/components/{p-DdG2Ylar.js → p-BqUB56k1.js} +1 -1
  84. package/dist/components/{p-DHAoxu6M.js → p-BzjGUtYh.js} +1 -1
  85. package/dist/components/{p-BtH2oezK.js → p-C-KX1_tw.js} +1 -1
  86. package/dist/components/{p-BldMZbAf.js → p-C3gYq-HU.js} +1 -1
  87. package/dist/components/{p-CPC9Vkmg.js → p-CQVAHG6w.js} +1 -1
  88. package/dist/components/{p-4BanAktr.js → p-C_6KHDYv.js} +1 -1
  89. package/dist/components/{p-ClGOhg6P.js → p-Cel0a6ma.js} +1 -1
  90. package/dist/components/{p-Ku08TQL1.js → p-Chuj-LpI.js} +1 -1
  91. package/dist/components/{p-M6hn0BuZ.js → p-CniN8ALm.js} +1 -1
  92. package/dist/components/{p-BcOud3dQ.js → p-DDvWTgk1.js} +1 -1
  93. package/dist/components/p-DJUffGeB.js +1 -0
  94. package/dist/components/p-DQl2K2Xl.js +1 -0
  95. package/dist/components/p-DT04Cka0.js +1 -0
  96. package/dist/components/{p-BVnYDfb8.js → p-DTmqMQpw.js} +1 -1
  97. package/dist/components/{p-DSkyHSIL.js → p-DaOm9YwQ.js} +1 -1
  98. package/dist/components/p-DjPWZfry.js +1 -0
  99. package/dist/components/{p-BXt0ers2.js → p-Dm6EAaJ9.js} +1 -1
  100. package/dist/components/p-Do4oPrkE.js +1 -0
  101. package/dist/components/{p-DEHnizot.js → p-Dq9dG0Kr.js} +1 -1
  102. package/dist/components/{p-D6cWoDk1.js → p-M2k_I8lv.js} +1 -1
  103. package/dist/components/{p-B4pmO5QQ.js → p-NBaq67dL.js} +1 -1
  104. package/dist/components/p-OquycEMA.js +1 -0
  105. package/dist/components/{p-CJtE8Pyr.js → p-eWxolPDU.js} +1 -1
  106. package/dist/components/{p-De82WP7z.js → p-fKJx8WtW.js} +1 -1
  107. package/dist/components/{p-xhiPDAZa.js → p-sLbQ7yZ1.js} +1 -1
  108. package/dist/components/{p-GrpYAVHb.js → p-sar8m7th.js} +1 -1
  109. package/dist/components/{p-CYqHwYgQ.js → p-tkB96Ena.js} +1 -1
  110. package/dist/esm/bn-annotation-layer_30.entry.js +206 -48
  111. package/dist/esm/bn-grid.entry.js +3 -3
  112. package/dist/esm/bn-image.entry.js +2 -2
  113. package/dist/esm/bn-internationalization.entry.js +2 -2
  114. package/dist/esm/bn-ruleset.entry.js +2 -2
  115. package/dist/esm/bn-text.entry.js +3 -3
  116. package/dist/esm/{localFrame-IW84cmdb.js → localFrame-BNWPPaQa.js} +1 -1
  117. package/dist/esm/{withBodyObserver-CAnnvrE_.js → withBodyObserver-AHQAUV85.js} +1 -1
  118. package/dist/esm/{withHasError-Cj_MzZ8Q.js → withHasError-B6Lvj9Cq.js} +8 -7
  119. package/dist/esm/{withStyled-Cxua0iTP.js → withStyled-CIoJ86RM.js} +61 -4
  120. package/dist/esm/{withTranslation-BeAbw2--.js → withTranslation-BX9T3dfm.js} +2 -2
  121. package/dist/types/components/bn-table/bn-table.d.ts +17 -4
  122. package/dist/types/components/bn-table/utils/Table.d.ts +2 -0
  123. package/dist/types/components/bn-table/utils/elements/CellBarChart.d.ts +1 -1
  124. package/dist/types/components/bn-table/utils/helper/DataQuery.d.ts +8 -0
  125. package/dist/types/components/bn-table/utils/helper/barColumnGeometry.d.ts +3 -2
  126. package/dist/types/components.d.ts +4 -4
  127. package/dist/types/stores/ruleSets.d.ts +2 -1
  128. package/dist/types/utils/ibcsRuleSet.d.ts +2 -1
  129. package/dist/types/utils/model/Order.d.ts +18 -1
  130. package/dist/types/utils/validate.d.ts +2 -0
  131. package/package.json +1 -1
  132. package/dist/bn-template-engine/p-BNCLKXjM.js +0 -1
  133. package/dist/bn-template-engine/p-_SKPuKfK.js +0 -1
  134. package/dist/bn-template-engine/p-dc12ff1b.entry.js +0 -1
  135. package/dist/components/p-BNWZoAip.js +0 -1
  136. package/dist/components/p-BT2WH_CP.js +0 -1
  137. package/dist/components/p-BVtD8O36.js +0 -1
  138. package/dist/components/p-BWRE5w0i.js +0 -1
  139. package/dist/components/p-C6XrNN2m.js +0 -1
  140. package/dist/components/p-CGI6XIaK.js +0 -1
  141. package/dist/components/p-CLkpoHdg.js +0 -1
  142. package/dist/components/p-CYv_8LrR.js +0 -1
  143. package/dist/components/p-Ckl1aEvn.js +0 -1
  144. package/dist/components/p-CurWSJkH.js +0 -1
  145. package/dist/components/p-D7X69xMg.js +0 -1
@@ -1 +1 @@
1
- import{r as t,h as s,a as i,g as o}from"./p-CCZcKl0Q.js";import{w as e}from"./p-BNCLKXjM.js";import{w as r,a,g as n,f as h,R as c}from"./p-CJfJQT0m.js";import{e as b}from"./p-ClruFZD_.js";const f=class{constructor(s){t(this,s),this.namespace="_system",r(this),this.errors=a(this),e(this,(t=>{if(this.stores||(this.stores=n(this.element)),""!==t.trim())try{const s=JSON.parse(t);if(null===s||"object"!=typeof s||Array.isArray(s))throw new Error("not a JSON object.");const i=h(s);for(const[t,s]of Object.entries(c))t in i&&!(s in i)&&(i[s]=i[t]);const o=this.namespace||"_system",e=Object.assign({},this.stores.internationalization.get(o));e[this.code]=Object.assign(Object.assign({},e[this.code]),i),this.stores.internationalization.set(o,e),this.errors.remove("ERR_body")}catch(t){this.errors.addOrReplace({id:"ERR_body",type:"error",message:`Body: ${b(t)}`})}else this.errors.remove("ERR_body")}))}render(){return s(i,{key:"7e7454bf0b02ea746a736daaabb09c9ff52b3775"})}get element(){return o(this)}};f.style="bn-internationalization{display:none}";export{f as bn_internationalization}
1
+ import{r as t,h as s,a as i,g as o}from"./p-CCZcKl0Q.js";import{w as e}from"./p-DF9sfwBN.js";import{w as r,a,g as n,f as h,R as c}from"./p-D0tNATZq.js";import{e as b}from"./p-ClruFZD_.js";const f=class{constructor(s){t(this,s),this.namespace="_system",r(this),this.errors=a(this),e(this,(t=>{if(this.stores||(this.stores=n(this.element)),""!==t.trim())try{const s=JSON.parse(t);if(null===s||"object"!=typeof s||Array.isArray(s))throw new Error("not a JSON object.");const i=h(s);for(const[t,s]of Object.entries(c))t in i&&!(s in i)&&(i[s]=i[t]);const o=this.namespace||"_system",e=Object.assign({},this.stores.internationalization.get(o));e[this.code]=Object.assign(Object.assign({},e[this.code]),i),this.stores.internationalization.set(o,e),this.errors.remove("ERR_body")}catch(t){this.errors.addOrReplace({id:"ERR_body",type:"error",message:`Body: ${b(t)}`})}else this.errors.remove("ERR_body")}))}render(){return s(i,{key:"7e7454bf0b02ea746a736daaabb09c9ff52b3775"})}get element(){return o(this)}};f.style="bn-internationalization{display:none}";export{f as bn_internationalization}
@@ -1 +1 @@
1
- import{r as t,f as n,h as i,a as o,g as s}from"./p-CCZcKl0Q.js";import{w as e,a,g as l,p as r,s as d}from"./p-CAvWZ3a5.js";import{w as u,a as c}from"./p-CJfJQT0m.js";import{w as f,a as v}from"./p-_SKPuKfK.js";const h="[A-Za-z_$\\u00C0-\\uFFFF][\\w$\\u00C0-\\uFFFF]*",p="'[^'\\\\]*'|\"[^\"\\\\]*\"",g=`(?:this\\.)?data(?:\\.(${h})|\\[\\s*(${p})\\s*\\])\\[\\s*(\\d+)\\s*\\]\\.(${h})`,m=new RegExp(`\\$\\{\\s*(?:${g}|t\\(\\s*(${p})\\s*(?:,\\s*\\{([^{}]*)\\}\\s*)?\\))\\s*\\}`,"g"),b=new RegExp(`\\s*(?:(${h})|(${p}))\\s*:\\s*(?:(${p})|(-?\\d+(?:\\.\\d+)?)|(${g}))\\s*(?:,|$)`,"y"),$=t=>String(t).replace(/[&<>"'\t\n\f\r ]/g,(t=>`&#${t.charCodeAt(0)};`)),w=(t,n)=>"object"==typeof t&&null!==t&&Object.prototype.hasOwnProperty.call(t,n)?t[n]:void 0,y=t=>t.slice(1,-1);const _=class{constructor(i){t(this,i),this.refit=()=>{n(this)},this.data={},f(this),u(this),this.errors=c(this),this.t=e(this).t,a(this,((t,n)=>{this.data=""===t?{}:Object.assign(Object.assign({},this.data),{[t]:n})})),this.componentStyle=v(this)}connectedCallback(){var t;null===(t=document.fonts)||void 0===t||t.addEventListener("loadingdone",this.refit)}disconnectedCallback(){var t;null===(t=document.fonts)||void 0===t||t.removeEventListener("loadingdone",this.refit)}validateValue(t){"string"!=typeof t||""===t?this.errors.addOrReplace({id:"WARN_value",type:"warning",message:"Empty value"}):this.errors.remove("WARN_value")}validateScaling(t){if(null==t||""===t||"none"===t||"auto"===t)return void this.errors.remove("WARN_scale");const n=Number(t);isNaN(n)||n<=0?this.errors.addOrReplace({id:"WARN_scale",type:"warning",message:`Invalid scale value: "${t}". Use "none", "auto", or a positive number.`}):this.errors.remove("WARN_scale")}componentWillLoad(){this.validateValue(this.value),this.validateScaling(this.scale)}prepareStyle(){return this.componentStyle((t=>{var n,i,o,s,e,a,l,r,d,u,c,f,v,h,p,g,m,b,$,w,y,_;return{fontStyles:{font:`${null!==(s=null!==(i=null===(n=t["bn-text"])||void 0===n?void 0:n.fontSizePx)&&void 0!==i?i:null===(o=t.global)||void 0===o?void 0:o.fontSizePx)&&void 0!==s?s:13.3333}px ${null!==(r=null!==(a=null===(e=t["bn-text"])||void 0===e?void 0:e.fontFamily)&&void 0!==a?a:null===(l=t.global)||void 0===l?void 0:l.fontFamily)&&void 0!==r?r:"'Noto Sans', sans-serif"}`,size:null!==(f=null!==(u=null===(d=t["bn-text"])||void 0===d?void 0:d.fontSizePx)&&void 0!==u?u:null===(c=t.global)||void 0===c?void 0:c.fontSizePx)&&void 0!==f?f:13.3333,color:null!==(g=null!==(h=null===(v=t["bn-text"])||void 0===v?void 0:v.fontColor)&&void 0!==h?h:null===(p=t.global)||void 0===p?void 0:p.fontColor)&&void 0!==g?g:"#000000",background:null!==(w=null!==(b=null===(m=t["bn-text"])||void 0===m?void 0:m.fontBackgroundColor)&&void 0!==b?b:null===($=t.global)||void 0===$?void 0:$.fontBackgroundColor)&&void 0!==w?w:"#ffffff",leading:null!==(_=null===(y=t["bn-text"])||void 0===y?void 0:y.leading)&&void 0!==_?_:1.8}}}))}applyScaling(t){const n=this.element,{mode:i,factor:o}=r(this.scale),{width:s,height:e}=l(n),a=n.scrollHeight>n.clientHeight+1?n.clientHeight:e,d=s,u=d>0&&n.scrollWidth>d+1,c=a>0&&n.scrollHeight>a+1,f=u||c;if(d<=0&&a<=0)return;if("none"===i){if(f){const t=[];u&&t.push(`w:${n.scrollWidth}>${Math.round(d)}`),c&&t.push(`h:${n.scrollHeight}>${Math.round(a)}`),this.errors.addOrReplace({id:"WARN_overflow",type:"warning",message:`Content overflows container (${t.join(", ")})`})}else this.errors.remove("WARN_overflow");return}if("factor"===i){if(f){const t=[];u&&t.push(`w:${n.scrollWidth}>${Math.round(d)}`),c&&t.push(`h:${n.scrollHeight}>${Math.round(a)}`),this.errors.addOrReplace({id:"WARN_overflow",type:"warning",message:`Content overflows with factor ${o} (${t.join(", ")})`})}else this.errors.remove("WARN_overflow");return}n.style.setProperty("--bn-font-size",`${t}px`);const v=n.scrollWidth,h=n.scrollHeight,p=n.clientHeight,g=h>p+1?p:e,m=d<=0||v<=d+1,b=g<=0||h<=g+1;if(m&&b)return void this.errors.remove("AUTO_scale");const $=Math.min(1,!m&&d>0?d/v:1,!b&&g>0?g/h:1);n.style.setProperty("--bn-font-size",t*$+"px"),"empty"===i?this.errors.addOrReplace({id:"AUTO_scale",type:"warning",message:`Auto-scaled font by factor ${$.toFixed(3)}`}):this.errors.remove("AUTO_scale")}componentDidRender(){var t;const{html:n,unknown:i}=function(t,n,i){const o=[],s=t=>{o.includes(t)||o.push(t)},e=(t,i,o,e,a)=>{const l=w(w(w(n,null!=i?i:y(o)),String(Number(e))),a);return void 0===l&&s(t),l};return{html:t.replace(m,((t,n,o,a,l,r,d)=>{const u=t.slice(2,-1).trim();try{if(void 0===r){const t=e(u,n,o,a,l);return null==t?"":$(t)}const s=void 0===d?void 0:(t=>{const n={};for(b.lastIndex=0;""!==t.slice(b.lastIndex).trim();){const i=b.exec(t);if(!i)return null;const[,o,s,a,l,r,d,u,c,f]=i;n[null!=o?o:y(s)]=void 0!==a?y(a):void 0!==l?Number(l):e(r,d,u,c,f)}return n})(d);return null===s?t:$(i(y(r),s))}catch(t){return s(u),""}})),unknown:o}}(null!==(t=this.value)&&void 0!==t?t:"",this.data,this.t);i.length>0?this.errors.addOrReplace({id:"WARN_value_path",type:"warning",message:`Unknown template path: ${i.join(", ")}`}):this.errors.remove("WARN_value_path"),this.container.innerHTML=d(n),this.applyScaling(this.prepareStyle().fontStyles.size)}render(){const{fontStyles:t}=this.prepareStyle(),{mode:n,factor:s}=r(this.scale),e="factor"===n?t.size*s+"px":`${t.size}px`,a={"--bn-font-family":t.font.substring(t.font.indexOf("px ")+3),"--bn-font-size":e,"--bn-font-color":t.color,"--bn-font-background":t.background};return i(o,{key:"47eaf1468ffc8b8de7e77f2b0aff4b927f8b0471",style:a},i("div",{key:"1f592c2fd0a4af77047c56ee043f6bdd84dfb2d2"},i("span",{key:"ecad3e6ea36dfa495ef78183fc6c3979eb9d5be2",class:"container",ref:t=>{this.container=t}})))}get element(){return s(this)}static get watchers(){return{value:[{validateValue:0}],scale:[{validateScaling:0}]}}};_.style=':host{padding:0.5em;display:inline-block;position:relative;overflow:hidden;font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);color:var(--bn-font-color, #000000);background-color:var(--bn-font-background, white)}span.container p{margin:0}';export{_ as bn_text}
1
+ import{r as t,f as n,h as i,a as o,g as s}from"./p-CCZcKl0Q.js";import{w as e,a,g as l,p as r,s as d}from"./p-DyupX-Z-.js";import{w as u,a as c}from"./p-D0tNATZq.js";import{w as f,a as v}from"./p-BVU4bIsi.js";const h="[A-Za-z_$\\u00C0-\\uFFFF][\\w$\\u00C0-\\uFFFF]*",p="'[^'\\\\]*'|\"[^\"\\\\]*\"",b=`(?:this\\.)?data(?:\\.(${h})|\\[\\s*(${p})\\s*\\])\\[\\s*(\\d+)\\s*\\]\\.(${h})`,g=new RegExp(`\\$\\{\\s*(?:${b}|t\\(\\s*(${p})\\s*(?:,\\s*\\{([^{}]*)\\}\\s*)?\\))\\s*\\}`,"g"),m=new RegExp(`\\s*(?:(${h})|(${p}))\\s*:\\s*(?:(${p})|(-?\\d+(?:\\.\\d+)?)|(${b}))\\s*(?:,|$)`,"y"),$=t=>String(t).replace(/[&<>"'\t\n\f\r ]/g,(t=>`&#${t.charCodeAt(0)};`)),w=(t,n)=>"object"==typeof t&&null!==t&&Object.prototype.hasOwnProperty.call(t,n)?t[n]:void 0,y=t=>t.slice(1,-1);const N=class{constructor(i){t(this,i),this.refit=()=>{n(this)},this.data={},f(this),u(this),this.errors=c(this),this.t=e(this).t,a(this,((t,n)=>{this.data=""===t?{}:Object.assign(Object.assign({},this.data),{[t]:n})})),this.componentStyle=v(this)}connectedCallback(){var t;null===(t=document.fonts)||void 0===t||t.addEventListener("loadingdone",this.refit)}disconnectedCallback(){var t;null===(t=document.fonts)||void 0===t||t.removeEventListener("loadingdone",this.refit)}validateValue(t){"string"!=typeof t||""===t?this.errors.addOrReplace({id:"WARN_value",type:"warning",message:"Empty value"}):this.errors.remove("WARN_value")}validateScaling(t){if(null==t||""===t||"none"===t||"auto"===t)return void this.errors.remove("WARN_scale");const n=Number(t);isNaN(n)||n<=0?this.errors.addOrReplace({id:"WARN_scale",type:"warning",message:`Invalid scale value: "${t}". Use "none", "auto", or a positive number.`}):this.errors.remove("WARN_scale")}componentWillLoad(){this.validateValue(this.value),this.validateScaling(this.scale)}prepareStyle(){return this.componentStyle((t=>{var n,i,o,s,e,a,l,r,d,u,c,f,v,h,p,b,g,m,$,w,y,N;return{fontStyles:{font:`${null!==(s=null!==(i=null===(n=t["bn-text"])||void 0===n?void 0:n.fontSizePx)&&void 0!==i?i:null===(o=t.global)||void 0===o?void 0:o.fontSizePx)&&void 0!==s?s:13.3333}px ${null!==(r=null!==(a=null===(e=t["bn-text"])||void 0===e?void 0:e.fontFamily)&&void 0!==a?a:null===(l=t.global)||void 0===l?void 0:l.fontFamily)&&void 0!==r?r:"'Noto Sans', sans-serif"}`,size:null!==(f=null!==(u=null===(d=t["bn-text"])||void 0===d?void 0:d.fontSizePx)&&void 0!==u?u:null===(c=t.global)||void 0===c?void 0:c.fontSizePx)&&void 0!==f?f:13.3333,color:null!==(b=null!==(h=null===(v=t["bn-text"])||void 0===v?void 0:v.fontColor)&&void 0!==h?h:null===(p=t.global)||void 0===p?void 0:p.fontColor)&&void 0!==b?b:"#000000",background:null!==(w=null!==(m=null===(g=t["bn-text"])||void 0===g?void 0:g.fontBackgroundColor)&&void 0!==m?m:null===($=t.global)||void 0===$?void 0:$.fontBackgroundColor)&&void 0!==w?w:"#ffffff",leading:null!==(N=null===(y=t["bn-text"])||void 0===y?void 0:y.leading)&&void 0!==N?N:1.8}}}))}applyScaling(t){const n=this.element,{mode:i,factor:o}=r(this.scale),{width:s,height:e}=l(n),a=n.scrollHeight>n.clientHeight+1?n.clientHeight:e,d=s,u=d>0&&n.scrollWidth>d+1,c=a>0&&n.scrollHeight>a+1,f=u||c;if(d<=0&&a<=0)return;if("none"===i){if(f){const t=[];u&&t.push(`w:${n.scrollWidth}>${Math.round(d)}`),c&&t.push(`h:${n.scrollHeight}>${Math.round(a)}`),this.errors.addOrReplace({id:"WARN_overflow",type:"warning",message:`Content overflows container (${t.join(", ")})`})}else this.errors.remove("WARN_overflow");return}if("factor"===i){if(f){const t=[];u&&t.push(`w:${n.scrollWidth}>${Math.round(d)}`),c&&t.push(`h:${n.scrollHeight}>${Math.round(a)}`),this.errors.addOrReplace({id:"WARN_overflow",type:"warning",message:`Content overflows with factor ${o} (${t.join(", ")})`})}else this.errors.remove("WARN_overflow");return}n.style.setProperty("--bn-font-size",`${t}px`);const v=n.scrollWidth,h=n.scrollHeight,p=n.clientHeight,b=h>p+1?p:e,g=d<=0||v<=d+1,m=b<=0||h<=b+1;if(g&&m)return void this.errors.remove("AUTO_scale");const $=Math.min(1,!g&&d>0?d/v:1,!m&&b>0?b/h:1);n.style.setProperty("--bn-font-size",t*$+"px"),"empty"===i?this.errors.addOrReplace({id:"AUTO_scale",type:"warning",message:`Auto-scaled font by factor ${$.toFixed(3)}`}):this.errors.remove("AUTO_scale")}componentDidRender(){var t;const{html:n,unknown:i}=function(t,n,i){const o=[],s=t=>{o.includes(t)||o.push(t)},e=(t,i,o,e,a)=>{const l=w(w(w(n,null!=i?i:y(o)),String(Number(e))),a);return void 0===l&&s(t),l};return{html:t.replace(g,((t,n,o,a,l,r,d)=>{const u=t.slice(2,-1).trim();try{if(void 0===r){const t=e(u,n,o,a,l);return null==t?"":$(t)}const s=void 0===d?void 0:(t=>{const n={};for(m.lastIndex=0;""!==t.slice(m.lastIndex).trim();){const i=m.exec(t);if(!i)return null;const[,o,s,a,l,r,d,u,c,f]=i;n[null!=o?o:y(s)]=void 0!==a?y(a):void 0!==l?Number(l):e(r,d,u,c,f)}return n})(d);return null===s?t:$(i(y(r),s))}catch(t){return s(u),""}})),unknown:o}}(null!==(t=this.value)&&void 0!==t?t:"",this.data,this.t);i.length>0?this.errors.addOrReplace({id:"WARN_value_path",type:"warning",message:`Unknown template path: ${i.join(", ")}`}):this.errors.remove("WARN_value_path"),this.container.innerHTML=d(n),this.applyScaling(this.prepareStyle().fontStyles.size)}render(){const{fontStyles:t}=this.prepareStyle(),{mode:n,factor:s}=r(this.scale),e="factor"===n?t.size*s+"px":`${t.size}px`,a={"--bn-font-family":t.font.substring(t.font.indexOf("px ")+3),"--bn-font-size":e,"--bn-font-color":t.color,"--bn-font-background":t.background};return i(o,{key:"47eaf1468ffc8b8de7e77f2b0aff4b927f8b0471",style:a},i("div",{key:"1f592c2fd0a4af77047c56ee043f6bdd84dfb2d2"},i("span",{key:"ecad3e6ea36dfa495ef78183fc6c3979eb9d5be2",class:"container",ref:t=>{this.container=t}})))}get element(){return s(this)}static get watchers(){return{value:[{validateValue:0}],scale:[{validateScaling:0}]}}};N.style=':host{padding:0.5em;display:inline-block;position:relative;overflow:hidden;font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);color:var(--bn-font-color, #000000);background-color:var(--bn-font-background, white)}span.container p{margin:0}';export{N as bn_text}
@@ -1 +1 @@
1
- import{r as t,h as s,a as i,g as o}from"./p-CCZcKl0Q.js";import{w as n,a as e}from"./p-_SKPuKfK.js";import{w as r,a,g as l}from"./p-CJfJQT0m.js";const h=class{constructor(s){t(this,s),n(this),r(this),this.errors=a(this),this.componentStyle=e(this)}connectedCallback(){this.stores=l(this.element)}getFontStyles(){return this.componentStyle((t=>{var s,i,o,n;return{"--bn-font-family":(null===(s=t.global)||void 0===s?void 0:s.fontFamily)||"'Noto Sans', sans-serif","--bn-font-size":`${(null===(i=t.global)||void 0===i?void 0:i.fontSizePx)||13.3333}px`,"--bn-font-color":(null===(o=t.global)||void 0===o?void 0:o.fontColor)||"#000000","--bn-font-background":(null===(n=t.global)||void 0===n?void 0:n.fontBackgroundColor)||"#ffffff"}}))}prepareAssetUrl(t){if(null==t||""===t)return"";const s=this.stores.assets.state;return t.startsWith("asset:")?s[t.substring(6)]:s[t]||t}render(){return s(i,{key:"b303581057c183cc27eb13cfdc389c6b008e9172",style:this.getFontStyles()},null!=this.source&&""!==this.source?s("img",{src:this.prepareAssetUrl(this.source)}):"")}get element(){return o(this)}};h.style=":host{display:inline-block;position:relative;overflow:hidden}img{max-width:100%;height:auto}";export{h as bn_image}
1
+ import{r as t,h as s,a as i,g as o}from"./p-CCZcKl0Q.js";import{w as n,a as e}from"./p-BVU4bIsi.js";import{w as r,a,g as l}from"./p-D0tNATZq.js";const h=class{constructor(s){t(this,s),n(this),r(this),this.errors=a(this),this.componentStyle=e(this)}connectedCallback(){this.stores=l(this.element)}getFontStyles(){return this.componentStyle((t=>{var s,i,o,n;return{"--bn-font-family":(null===(s=t.global)||void 0===s?void 0:s.fontFamily)||"'Noto Sans', sans-serif","--bn-font-size":`${(null===(i=t.global)||void 0===i?void 0:i.fontSizePx)||13.3333}px`,"--bn-font-color":(null===(o=t.global)||void 0===o?void 0:o.fontColor)||"#000000","--bn-font-background":(null===(n=t.global)||void 0===n?void 0:n.fontBackgroundColor)||"#ffffff"}}))}prepareAssetUrl(t){if(null==t||""===t)return"";const s=this.stores.assets.state;return t.startsWith("asset:")?s[t.substring(6)]:s[t]||t}render(){return s(i,{key:"b303581057c183cc27eb13cfdc389c6b008e9172",style:this.getFontStyles()},null!=this.source&&""!==this.source?s("img",{src:this.prepareAssetUrl(this.source)}):"")}get element(){return o(this)}};h.style=":host{display:inline-block;position:relative;overflow:hidden}img{max-width:100%;height:auto}";export{h as bn_image}
@@ -0,0 +1 @@
1
+ import{g as t,f as e}from"./p-CCZcKl0Q.js";import{g as n,r,c as s,D as a}from"./p-D0tNATZq.js";const i=t=>{if("object"==typeof t&&null!==t){if("function"==typeof Object.getPrototypeOf){const e=Object.getPrototypeOf(t);return e===Object.prototype||null===e}return"[object Object]"===Object.prototype.toString.call(t)}return!1},o=(t,e)=>e,c=(t,e)=>[...new Set([...t,...e])],u=(t,e)=>{const n=(t=>{return{arrayMergeType:"combine",arrayMerge:(e=t?t.arrayMergeType:"combine","overwrite"===e?o:c),...t};var e})(e);return t.reduce(((t,e)=>(Object.keys(e).forEach((r=>{Array.isArray(t[r])&&Array.isArray(e[r])?n&&n.arrayMerge&&(t[r]=n.arrayMerge(t[r],e[r])):t[r]=i(t[r])&&i(e[r])?u([t[r],e[r]],n):e[r]})),t)),{})},l=a=>{let i,o,c,l;const f=()=>{const t=o.componentStyles.state;l=u([t._system||{},t._default||{},t[c]||{}],{arrayMergeType:"overwrite"})},d=a.connectedCallback;a.connectedCallback=()=>{const s=t(a);o=n(s),l=o.componentStyles.state._system,c=a.selectedStyle,f(),i=o.componentStyles.on("set",(n=>{n!==c&&"_default"!==n||(c=a.selectedStyle,f(),e(t(a)))})),r(d,a)};const h=a.disconnectedCallback;return a.disconnectedCallback=()=>{r(i),s(t(a)),r(h,a)},t=>(void 0!==o&&a.selectedStyle!==c&&(c=a.selectedStyle,f()),t(l))};var f,d,h,m,y,p,b,v;!function(t){t.ALL="all",t.META="meta"}(f||(f={})),function(t){t.CURRENCY="currency",t.VOLUME="volume"}(d||(d={})),function(t){t.AC1="ac1",t.AC2="ac2",t.AC3="ac3",t.AC4="ac4",t.PP1="pp1",t.PP2="pp2",t.PP3="pp3",t.PP4="pp4",t.FC1="fc1",t.FC2="fc2",t.FC3="fc3",t.FC4="fc4",t.PL1="pl1",t.PL2="pl2",t.PL3="pl3",t.PL4="pl4"}(h||(h={})),function(t){t.POS="pos",t.NEG="neg",t.NEU="neu",t.OP="op",t.OPINV="opinv"}(m||(m={})),function(t){t.DECIMAL="decimal",t.PERCENT="percent"}(y||(y={})),function(t){t.LIST="list",t.SUM="sum",t.SUMNOTOTAL="sumnototal",t.OPT="opt",t.OPTNOTOTAL="optnototal"}(p||(p={})),function(t){t.INF="inf",t.W100="w100",t.W50="w50",t.W25="w25",t.W20="w20",t.W15="w15",t.W10="w10",t.W5="w5"}(b||(b={})),function(t){t.W5="w5",t.W10="w10",t.W15="w15",t.W20="w20",t.W25="w25",t.W30="w30",t.W40="w40",t.W60="w60",t.W80="w80",t.W100="w100"}(v||(v={}));const g={[v.W5]:5,[v.W10]:10,[v.W15]:15,[v.W20]:20,[v.W25]:25,[v.W30]:30,[v.W40]:40,[v.W60]:60,[v.W80]:80,[v.W100]:100};var w,N,k,S,O,D;!function(t){t.ROWGROUP="rowGroup",t.ROWGROUPINDEX="rowGroupIndex",t.CATEGORY="category",t.CATEGORYINDEX="categoryIndex",t.SUBCATEGORY="subCategory",t.SUBCATEGORYINDEX="subCategoryIndex"}(w||(w={})),function(t){t.SMART="smart",t.LONG="long",t.SHORT="short"}(N||(N={})),function(t){t.COLUMN="column",t.LINE="line",t.WATERFALL="waterfall"}(k||(k={})),function(t){t.BAR="bar",t.LINE="line",t.AUTO="auto"}(S||(S={})),function(t){t.SCENARIOS="scenarios",t.DIMENSIONS="dimensions"}(O||(O={})),function(t){t.ABSOLUTE="absolute",t.RELATIVE="relative",t.ABSOLUTE_RELATIVE="absolute-relative"}(D||(D={}));const T=100;var A;!function(t){t.ASC="asc",t.DESC="desc",t.DATASET="dataset"}(A||(A={}));const M=/^\s*(set|first|last|min|max|avg|sum|lit)\(\s*(.*?)\s*\)\s*$/,j=/^[A-Za-z_][A-Za-z0-9_]*$/,$=["min","max","avg","sum"];class J{constructor(t,e,n,r){this.label=t,this.alias=e,this.fn=n,this.arg=r}get isNumeric(){return $.includes(this.fn)}}function F(t){if("string"!=typeof t)return!1;const e=M.exec(t);if(!e)return!1;const[,n,r]=e;return"lit"===n?r.length>0:j.test(r)}function E(t,e,n){if(!F(n))return null;const[,r,s]=M.exec(n);return new J(t,e,r,s)}var L,I,W,_;!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"}(L||(L={})),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"}(I||(I={}));class x{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}setLocale(t){this.locale=t,this.dateFormatPinned||(this.dateFormat=Object.assign(Object.assign({},this._dateFormat),x.LOCALE_DATE_FORMAT[t]||{})),this.dateFormatShortPinned||(this.dateFormatShort=Object.assign(Object.assign({},this._dateFormatShort),x.LOCALE_DATE_FORMAT_SHORT[t]||{}))}getDateString(t,e){return t.setLocale(this.locale).toFormat(this.dateFormat[e]||this.dateFormat.fallback)}getSmartDateString(t,e){switch(e){case L.DAY:return this.getFormatedDayDate(t);case L.MONTH:return this.getFormatedMonthDate(t);case L.QUARTER:return this.getFormatedQuarterDate(t);case L.WEEK:return this.getFormatedWeekDate(t);case L.HOUR:return this.getFormatedHourDate(t);case L.MINUTE:return this.getFormatedMinuteDate(t);case L.SECOND:return this.getFormatedSecondDate(t);case L.MILLISECOND:return this.getFormatedMilliSecondDate(t);default:return this.getDateString(t,e)}}calculateDistanceType(t,e,n=32){if(null==e)return L.DAY;const r="number"==typeof t?a.fromMillis(t):t,s="number"==typeof e?a.fromMillis(e):e;return 0===s.diff(r).as("milliseconds")?L.DAY:s.diff(r).as("milliseconds")<n?L.MILLISECOND:s.diff(r).as("seconds")<n?L.SECOND:s.diff(r).as("minutes")<n?L.MINUTE:s.diff(r).as("hours")<n?L.HOUR:s.diff(r).as("days")<n?L.DAY:s.diff(r).as("weeks")<n?L.WEEK:s.diff(r).as("months")<n?L.MONTH:s.diff(r).as("quarters")<n?L.QUARTER:L.YEAR}datesBetween(t,e,n){const r=this.convertDateDistanceToMomentunitOfTime(n),s=t.startOf(r),a=e.endOf(r),i=[];let o=s;do{i.push(o),o=o.plus(this.createDiratonLike(r,1))}while(o<=a);return i}countBetween(t,e,n){const r=this.convertDateDistanceToMomentunitOfTime(n);return Math.floor(e.startOf(r).diff(t.startOf(r),r).as(r))+1}getDateLinkString(t,e,n,r,s){if(null==t&&null==e)return"";if(null==t&&n!==I.END&&n!==I.YTD)return"";if(null==e&&(I.INTERVAL===n||I.CUM===n||I.END===n||I.YTD===n))return"";const i=t||a.now(),o=e;r===L.AUTO&&(r=this.calculateDistanceType(i,o,s));let c=this.getDateString(i,r),u="",l=I.NONE;return null!=o&&(u=this.getDateString(o,r),l=I.INTERVAL,c===u&&n===I.INTERVAL&&(n=I.NONE),c===u&&n===I.AVG&&(l=I.NONE),I.END!==n&&I.YTD!==n||(c=u),n!==I.INTERVAL&&n!==I.CUM&&n!==I.AVG||(r===L.QUARTER?i.quarter===o.quarter&&i.year===o.year?u=u.replace(" "+o.year,""):i.year===o.year&&(c=c.replace(" "+i.year,"")):r===L.MONTH?i.month===o.month&&i.year===o.year?u=u.replace(" "+o.year,""):i.year===o.year&&(c=c.replace(" "+i.year,"")):r===L.WEEK&&(i.weekNumber===o.weekNumber&&i.weekYear===o.weekYear?u=u.replace(" "+o.weekYear,""):i.weekYear===o.weekYear&&(c=c.replace(" "+i.weekYear,""))))),this.dateLinkFormat[n].replace("[LINK]",this.dateLinkFormat[l]).replace("[DATE]",c).replace("[DATE2]",u)}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)}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 e;switch(t){case L.YEAR:e="year";break;case L.MONTH:e="month";break;case L.QUARTER:e="quarter";break;case L.WEEK:e="week";break;case L.DAY:e="day";break;case L.HOUR:e="hour";break;case L.MINUTE:e="minute";break;case L.SECOND:e="second";break;case L.MILLISECOND:e="millisecond";break;default:e="day"}return e}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}}}}x.LOCALE_DATE_FORMAT={en:{week:"'W'WW kkkk",day:"MM/dd/yyyy",fallback:"MM/dd/yyyy"}},x.LOCALE_DATE_FORMAT_SHORT={en:{week:"'W'WW",fallback:"MM/dd/yyyy"}};class q{static isExisting(t){return null!=t}static isString(t){return"string"==typeof t}static isNumber(t){return"number"==typeof t&&!Number.isNaN(t)}static isBoolean(t){return"boolean"==typeof t}static isArray(t){return Array.isArray(t)}static isObject(t){return"object"==typeof t&&null!==t}static isOperator(t){return"+"===t||"-"===t}static isDate(t){return t instanceof a&&t.isValid}}class C{static adaptDefaultString(t){return q.isString(t)?t.trim():""}static adaptArray(t,e){const n=[];return q.isArray(t)&&t.forEach((t=>{n.push(e.adapt(t))})),n}}!function(t){t.ASC="asc",t.DESC="desc"}(W||(W={})),function(t){t.ROWGROUP="rowGroup",t.ROWGROUPINDEX="rowGroupIndex",t.CATEGORY="category",t.CATEGORYINDEX="categoryIndex",t.SUBCATEGORY="subCategory",t.SUBCATEGORYINDEX="subCategoryIndex",t.AC1="ac1",t.AC2="ac2",t.AC3="ac3",t.AC4="ac4",t.PP1="pp1",t.PP2="pp2",t.PP3="pp3",t.PP4="pp4",t.FC1="fc1",t.FC2="fc2",t.FC3="fc3",t.FC4="fc4",t.PL1="pl1",t.PL2="pl2",t.PL3="pl3",t.PL4="pl4"}(_||(_={}));class G{constructor(t=["category"],e=W.ASC){this.hierarchy=t,this.direction=e}}const z=[_.ROWGROUP,_.ROWGROUPINDEX,_.CATEGORY,_.CATEGORYINDEX,_.SUBCATEGORY,_.SUBCATEGORYINDEX],K=/^(?:ac|fc|pp|pl)[1-4]$/,Q=/^(dr|d)((?:ac|fc|pp|pl)[1-4])_((?:ac|fc|pp|pl)[1-4])(?:_(?:pos|neg|neu|opinv|op))?$/;function Z(t){if(null==t)return;const e=t.indexOf("@"),n=(e<0?t:t.slice(0,e)).trim().toLowerCase(),r=e<0?void 0:t.slice(e+1).trim();if(""===r)return;const s=_[n.toUpperCase()];if(null!=s&&z.includes(s))return void 0===r?{kind:"dim",column:s}:void 0;if(K.test(n))return{kind:"scenario",column:n,bucket:r};const a=Q.exec(n);if(null!=a){const[,t,e,n]=a;return{kind:"variance",column:`${t}${e}_${n}`,type:t,base:e,delta:n,bucket:r}}}function B(t){const e=Z(t);if(null!=e)return void 0===e.bucket?e.column:`${e.column}@${e.bucket}`}class H{constructor(t,e=!1){this.stringAdapter=t,this.allowMeasures=e}adapt(t){var e;const n=C.adaptArray(t.hierarchy,this.stringAdapter),r=W[null===(e=t.direction)||void 0===e?void 0:e.toUpperCase()]||W.ASC;return new G(n.map((t=>(this.allowMeasures?B(t):_[t.toUpperCase()])||_.CATEGORY)),r)}default(){return new G(["category"],W.ASC)}}const P="n/a";function R(t,e){if(!(Math.abs(e)<=1e-9*Math.abs(t)))return t/Math.abs(e)}const Y=/^(dr|d)((?:ac|pp|fc|pl)[1-4])_((?:ac|pp|fc|pl)[1-4])(?:_(pos|neg|neu|op|opinv))?$/;class U{constructor(t,e,n){this.type=t,this.base=e,this.delta=n}static parse(t){const e=Y.exec(t);return null===e?null:new U(e[1],e[2],e[3])}compute(t,e){var n;return null==t||null==e?null:"dr"===this.type?0===e?null:null!==(n=R(t-e,e))&&void 0!==n?n:null:t-e}}function V(t){const e=t.trim();if(Object.values(h).includes(e))return{kind:"scenario",slot:e};const n=U.parse(e);return null!==n?{kind:"variance",measure:n}:null}function X(t){return t.replace(/\d+$/,"")}function tt(t){return t.replace(/^[a-z]+/,"")}function et(t){var e;return"dr"===(null===(e=U.parse(t.trim()))||void 0===e?void 0:e.type)}function nt(t){if(!et(t.measure))return t;const e=t=>void 0===t?void 0:t/100;return Object.assign(Object.assign({},t),{min:e(t.min),max:e(t.max),refLine:e(t.refLine),highlight:t.highlight&&{from:e(t.highlight.from),to:e(t.highlight.to)}})}function rt(t){return null==t||""===t||"null"===t}function st(t){return rt(t)||"auto"===t.trim().toLowerCase()?[]:at((null==t?void 0:t.split(",").filter((t=>!(t.toUpperCase().trim()in h)))).toString())}function at(t){return rt(t)?[]:t.replace(";",",").split(",").filter((t=>{var e,n,r;const s=t.split("_"),a=null===(e=s[0])||void 0===e?void 0:e.replace(/^dr|^d/,"").toUpperCase().trim(),i=null===(n=s[1])||void 0===n?void 0:n.toUpperCase().trim(),o=null===(r=s[2])||void 0===r?void 0:r.toUpperCase().trim();return 3!==s.length||!(a in h)||!(i in h)||!(o in m)}))}function it(t){return rt(t)?[]:at(t.split(",").filter((t=>!(t.toUpperCase().trim()in h))).toString())}function ot(t){return rt(t)||"auto"===t.trim().toLowerCase()?[]:at(t.split(",").filter((t=>!(t.toUpperCase()in _))).toString())}function ct(t){return rt(t)||"auto"===t.trim().toLowerCase()?[]:t.split(",").filter((t=>void 0===Z(t)))}function ut(t){return!rt(t)&&Number.isInteger(Number(t))}function lt(t){return!rt(t)&&!Number.isNaN(Number(t))}function ft(t){return!rt(t)&&(null==t?void 0:t.toUpperCase())in W}function dt(t){return"auto"===(null==t?void 0:t.toLowerCase())||(null==t?void 0:t.toUpperCase())in w}function ht(t){if(rt(t))return[];try{const e=JSON.parse(t);if(e instanceof Array)return e.filter((t=>!(t.hasOwnProperty("name")&&t.hasOwnProperty("unit"))))}catch(t){console.error("validateMeasureList: failed to parse JSON",t)}return["Invalid JSON structure"]}function mt(t){const e=Date.parse(t);return Number.isInteger(e)}function yt(t){return(null==t?void 0:t.toUpperCase())in I}function pt(t){return(null==t?void 0:t.toUpperCase())in L}function bt(t){return(null==t?void 0:t.toUpperCase())in N}function vt(t){return!rt(t)&&(null==t?void 0:t.toUpperCase())in y}function gt(t){return!rt(t)&&(null==t?void 0:t.toUpperCase())in p}function wt(t){if(rt(t))return[];try{const e=JSON.parse(t);if(e instanceof Array)return e.filter((t=>!(t.hasOwnProperty("rowGroup")&&t.hasOwnProperty("category")&&t.hasOwnProperty("subCategory"))))}catch(t){console.error("validateThereOfJsonStr: failed to parse JSON",t)}return["Invalid JSON structure"]}function Nt(t){if(rt(t))return[];try{const e=JSON.parse(t);if(null!==e&&"object"==typeof e&&!(e instanceof Array))return Object.entries(e).filter((([,t])=>"string"!=typeof t||!F(t))).map((([t,e])=>`${t}: ${e}`))}catch(t){console.error("validateAttributesJsonStr: failed to parse JSON",t)}return["Invalid JSON structure"]}function kt(t){if(rt(t))return[];try{const e=JSON.parse(t);if(e instanceof Array)return e.filter((t=>!(t.hasOwnProperty("rowGroup")&&t.hasOwnProperty("category"))))}catch(t){console.error("validatePartOfJsonStr: failed to parse JSON",t)}return["Invalid JSON structure"]}function St(t){return(null==t?void 0:t.trim().toUpperCase())in d}function Ot(t){return["_","k","M","G","T","P","E","Z","Y","m","my","μ","n","p","f","a","z","y"].includes(null==t?void 0:t.trim())||["GREATEST","LEAST"].includes(null==t?void 0:t.trim().toUpperCase())}function Dt(t){return(null==t?void 0:t.toUpperCase().trim())in b}function Tt(t){return(null==t?void 0:t.toUpperCase().trim())in v}function At(t){if(rt(t))return[];try{return JSON.parse(t).filter((t=>!(t.hasOwnProperty("scenario")&&t.hasOwnProperty("name")&&t.hasOwnProperty("subGroups"))))}catch(t){console.error("validateColumnThereOfJsonStr: failed to parse JSON",t)}return["Invalid JSON structure"]}function Mt(t){if(rt(t))return[];try{const e=JSON.parse(t);if("object"!=typeof e||null===e||Array.isArray(e))return["stack: must be a JSON object"];const n=[];if(e.hasOwnProperty("by")){const t=["scenarios","dimensions"];t.includes(e.by)||n.push(`stack: 'by' must be one of: ${t.join(", ")}`)}else n.push("stack: 'by' is required");if(e.hasOwnProperty("mode")){const t=["absolute","relative","absolute-relative"];t.includes(e.mode)||n.push(`stack: 'mode' must be one of: ${t.join(", ")}`)}if(e.hasOwnProperty("order")){const t=["asc","desc","dataset"];t.includes(e.order)||n.push(`stack: 'order' must be one of: ${t.join(", ")}`)}return n}catch(t){return["stack: invalid JSON"]}}function jt(t){return!rt(t)&&null!==V(t)}class $t{constructor(){this.cache=new Map,this.tag=$t.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 Jt=new $t;function Ft(t){for(var e,n=0,r=0,s=t.length;s>=4;++r,s-=4)e=1540483477*(65535&(e=255&t.charCodeAt(r)|(255&t.charCodeAt(++r))<<8|(255&t.charCodeAt(++r))<<16|(255&t.charCodeAt(++r))<<24))+(59797*(e>>>16)<<16),n=1540483477*(65535&(e^=e>>>24))+(59797*(e>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(s){case 3:n^=(255&t.charCodeAt(r+2))<<16;case 2:n^=(255&t.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&t.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}const Et=t=>lt(t)?`${t}px`:t,Lt={width:{className:"w",cssName:"width",attrName:"width",transform:Et},height:{className:"h",cssName:"height",attrName:"height",transform:Et},position:{className:"pst",cssName:"position",attrName:"position"},top:{className:"top",cssName:"top",attrName:"top",transform:Et},right:{className:"rgt",cssName:"right",attrName:"right",transform:Et},bottom:{className:"btm",cssName:"bottom",attrName:"bottom",transform:Et},left:{className:"lft",cssName:"left",attrName:"left",transform:Et},"font-size":{className:"fts",cssName:"font-size",attrName:"font-size",transform:Et},"grid-column":{className:"gdc",cssName:"grid-column",attrName:"grid-column"},"grid-row":{className:"gdr",cssName:"grid-row",attrName:"grid-row"}},It=Object.keys(Lt);function Wt(t,e,n){return`.${e} {${t.cssName}: ${n};}`}function _t(t,e){const n=document.createElement("div").style;n.setProperty(t.cssName,e);const r=n.getPropertyValue(t.cssName);if(n.cssText=`${t.cssName}:${r};--bn-end:1`,!r||r.includes("<")||"1"!==n.getPropertyValue("--bn-end"))return;const s=function(t,e){const n=Ft(e);return`bn-c-${t.className}_${n}`}(t,e);return{className:s,style:Wt(t,s,r)}}const xt=t=>{const e=new Map;return It.forEach((n=>{const r=t.getAttribute(n);if(r){["top","left","right","bottom"].includes(n)&&e.set("position",_t(Lt.position,"absolute"));const t=_t(Lt[n],(Lt[n].transform||function(t){return t})(r));t&&e.set(n,t)}})),e},qt=new MutationObserver((t=>{for(const n of t){const t=n.target,r=xt(t);Jt.apply(r);const s=Array.from(r.values()).map((t=>t.className));t.className=t.className.split(" ").filter((t=>!t.startsWith("bn-c-"))).concat(...s).join(" "),e(t)}})),Ct=e=>{const n=e.connectedCallback,s=e.disconnectedCallback;e.connectedCallback=()=>{const s=t(e);if(!s)throw new Error("Can't find element field in component undefined");(t=>{const e=xt(t);Jt.apply(e);const n=Array.from(e.values()).map((t=>t.className));t.className=t.className.split(" ").filter((t=>!t.startsWith("bn-c-"))).concat(...n).join(" "),qt.observe(t,{attributes:!0,attributeFilter:It,childList:!1,subtree:!1})})(s),r(n,e)},e.disconnectedCallback=()=>{r(s,e)}};export{b as $,w as A,pt as B,q as C,bt as D,L as E,N as F,S as G,x as H,Ft as I,it as J,Tt as K,vt as L,gt as M,P as N,W as O,wt as P,kt as Q,T as R,O as S,ct as T,St as U,Dt as V,At as W,Nt as X,y as Y,B as Z,f as _,l as a,d as a0,E as a1,g as a2,v as a3,j as a4,Z as a5,h as a6,ht as a7,mt as a8,yt as a9,I as aa,ut as b,jt as c,tt as d,nt as e,et as f,ft as g,G as h,rt as i,_ as j,st as k,at as l,u as m,dt as n,Ot as o,Mt as p,A as q,V as r,X as s,D as t,C as u,ot as v,Ct as w,H as x,R as y,lt as z}