@bino-bi/bn-template-engine 1.0.0-next.44 → 1.0.0-next.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bn-template-engine/bn-template-engine.esm.js +1 -1
- package/dist/bn-template-engine/{p-8b28c9bd.entry.js → p-16623e0f.entry.js} +1 -1
- package/dist/bn-template-engine/p-17970e07.entry.js +1 -0
- package/dist/bn-template-engine/{p-ce764078.entry.js → p-21930d0a.entry.js} +1 -1
- package/dist/bn-template-engine/{p-5a64f90f.entry.js → p-46c46067.entry.js} +1 -1
- package/dist/bn-template-engine/p-9caa7f46.entry.js +1 -0
- package/dist/bn-template-engine/p-B0MEAsAS.js +1 -0
- package/dist/bn-template-engine/{p-qpZjVnX5.js → p-BA-fydUt.js} +1 -1
- package/dist/bn-template-engine/p-BEGt_7Hr.js +1 -0
- package/dist/bn-template-engine/p-BRO1oW7m.js +1 -0
- package/dist/bn-template-engine/{p-BjozxTTW.js → p-BnzIfgCq.js} +1 -1
- package/dist/bn-template-engine/{p-b0dfc113.entry.js → p-b0d528f2.entry.js} +1 -1
- package/dist/cjs/bn-annotation-layer_30.cjs.entry.js +612 -84
- package/dist/cjs/bn-grid.cjs.entry.js +161 -34
- package/dist/cjs/bn-image.cjs.entry.js +2 -2
- package/dist/cjs/bn-internationalization.cjs.entry.js +2 -2
- package/dist/cjs/bn-ruleset.cjs.entry.js +2 -2
- package/dist/cjs/bn-template-engine.cjs.js +1 -1
- package/dist/cjs/bn-text.cjs.entry.js +3 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{localFrame-U3Qs0psw.js → localFrame-C27GGom1.js} +1 -1
- package/dist/cjs/{withBodyObserver-S-FGHpAX.js → withBodyObserver-B78wzw3f.js} +1 -1
- package/dist/cjs/{withHasError-BkBrsCpI.js → withHasError-0hW3-4mr.js} +11 -5
- package/dist/cjs/{withStyled-BZb6snOx.js → withStyled-D0hrcfE_.js} +25 -1
- package/dist/cjs/{withTranslation-FxXGUB3H.js → withTranslation-B4WipL_5.js} +7 -4
- 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 +221 -12
- 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/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-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/components/bn-tree/bn-tree.js +4 -1
- 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/parentDimensions.js +5 -2
- package/dist/collection/utils/validate.js +4 -0
- 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/p-9X5fVJqR.js +1 -0
- package/dist/components/p-B5GRtTLX.js +1 -0
- package/dist/components/{p-DJUffGeB.js → p-BKA15uoz.js} +1 -1
- package/dist/components/p-BKLq0Pbv.js +1 -0
- package/dist/components/p-BKTBdrEA.js +1 -0
- package/dist/components/p-Bd8cQiLx.js +1 -0
- package/dist/components/{p-CvEdUq8i.js → p-Be0Q3bvf.js} +1 -1
- package/dist/components/{p-xIWChKGS.js → p-Bj3RWsEx.js} +1 -1
- package/dist/components/{p-B4L069XF.js → p-BoBamuPt.js} +1 -1
- package/dist/components/{p-DaOm9YwQ.js → p-BrJZUp-K.js} +1 -1
- package/dist/components/{p-CyfGkLMh.js → p-BuWNCnvR.js} +1 -1
- package/dist/components/p-C50Ge-4H.js +1 -0
- package/dist/components/{p-M2k_I8lv.js → p-CFVoK5Rb.js} +1 -1
- package/dist/components/{p-fKJx8WtW.js → p-CgJB5mCu.js} +1 -1
- package/dist/components/p-Cxx0YNnl.js +1 -0
- package/dist/components/p-D9F5IBFT.js +1 -0
- package/dist/components/{p-BfUdaxZ9.js → p-DQFahsnV.js} +1 -1
- package/dist/components/p-DROj8gke.js +1 -0
- package/dist/components/p-D_Sbhd0L.js +1 -0
- package/dist/components/{p-Cel0a6ma.js → p-DbWh9W5D.js} +1 -1
- package/dist/components/{p-2eicD9rF.js → p-DkCeSWKR.js} +1 -1
- package/dist/components/{p-7ieJFBUk.js → p-DoOSXntC.js} +1 -1
- package/dist/components/p-Dxj_pf8s.js +1 -0
- package/dist/components/{p-DQl2K2Xl.js → p-DzYhS_9s.js} +1 -1
- package/dist/components/{p-B2bvM2Ig.js → p-EQNS13GN.js} +1 -1
- package/dist/components/{p-Y9bth2Y_.js → p-G56USTsQ.js} +1 -1
- package/dist/components/p-OgFFKehL.js +1 -0
- package/dist/components/{p-C2ycO60j.js → p-kvYRImZT.js} +1 -1
- package/dist/components/{p-Chuj-LpI.js → p-rEdNIgD8.js} +1 -1
- package/dist/components/{p-DwuXVo2h.js → p-uCpFBDF5.js} +1 -1
- package/dist/esm/bn-annotation-layer_30.entry.js +612 -84
- package/dist/esm/bn-grid.entry.js +161 -34
- package/dist/esm/bn-image.entry.js +2 -2
- package/dist/esm/bn-internationalization.entry.js +2 -2
- package/dist/esm/bn-ruleset.entry.js +2 -2
- package/dist/esm/bn-template-engine.js +1 -1
- package/dist/esm/bn-text.entry.js +3 -3
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{localFrame-BNWPPaQa.js → localFrame-CEZ7-hBs.js} +1 -1
- package/dist/esm/{withBodyObserver-AHQAUV85.js → withBodyObserver-D9yIMxdr.js} +1 -1
- package/dist/esm/{withHasError-B6Lvj9Cq.js → withHasError-UGtkLrYT.js} +11 -5
- package/dist/esm/{withStyled-CzzXg64f.js → withStyled-BlMqEIfr.js} +25 -2
- package/dist/esm/{withTranslation-Daq2JXkv.js → withTranslation-Bc3bjHTb.js} +7 -4
- 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-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 +173 -6
- 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/validate.d.ts +2 -0
- package/package.json +1 -1
- package/dist/bn-template-engine/p-3c4af59a.entry.js +0 -1
- 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-a4b76176.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-BiSytXUy.js +0 -1
- package/dist/components/p-C3gYq-HU.js +0 -1
- package/dist/components/p-CEf5X8MZ.js +0 -1
- package/dist/components/p-CniN8ALm.js +0 -1
- package/dist/components/p-D2Epww9R.js +0 -1
- package/dist/components/p-D40Am1Ap.js +0 -1
- package/dist/components/p-DDvWTgk1.js +0 -1
- package/dist/components/p-DjPWZfry.js +0 -1
- package/dist/components/p-DnDL1pPc.js +0 -1
- package/dist/components/p-sLbQ7yZ1.js +0 -1
- /package/dist/components/{p-DD1zlev_.js → p-Dsvjkuy3.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as t}from"./p-
|
|
1
|
+
import{b as t}from"./p-B0MEAsAS.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 r(t,o){const r=n(t.width),e=n(t.height);return{context:{x:n(t.left-o.context.x),y:n(t.top-o.context.y),width:r,height:e},component:{x:n(t.left-o.component.x),y:n(t.top-o.component.y),width:r,height:e}}}function e(t,n){return r(t.getBoundingClientRect(),n)}function i(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:r,fontWeight:e,fontSize:i,fontFamily:u}=getComputedStyle(t);return o.font=`${r} ${e} ${i} ${u}`,o.measureText(n.replace(/^"|"$/g,"")).width}function u(t,n){var o,e;const i=null===(e=null===(o=t.ownerDocument)||void 0===o?void 0:o.createRange)||void 0===e?void 0:e.call(o);if(!i)return;const u=t.getBoundingClientRect(),c=t.querySelector("svg text");let a;if(c)a=c.getBoundingClientRect();else{i.selectNodeContents(t);const n=t.querySelector(".prefix-second");n&&i.setStartAfter(n),a=i.getBoundingClientRect()}const l=Math.max(a.left,u.left),s=Math.max(a.top,u.top),f=Math.min(a.right,u.right)-l,h=Math.min(a.bottom,u.bottom)-s;return f>0&&h>0?r({left:l,top:s,width:f,height:h},n):void 0}function c(n){const o=n.getBoundingClientRect(),r=t(n),e=r?r.getBoundingClientRect():o;return{context:{x:e.left,y:e.top},component:{x:o.left,y:o.top}}}function a(t){var n,o;return null!==(o=null!==(n=t.getAttribute("id"))&&void 0!==n?n:t.getAttribute("name"))&&void 0!==o?o:void 0}function l(t){var n;return null!==(n=a(t))&&void 0!==n?n:t.localName}function s(t){const n=new Map;return t.map((({tag:t,explicitId:o})=>{var r;const e=null!==(r=n.get(t))&&void 0!==r?r:0;return n.set(t,e+1),null!=o?o:`${t}[${e}]`}))}function f(t){const n=t.getAttribute("has-error");if(!n)return[];try{const t=JSON.parse(n);return Array.isArray(t)?t:[]}catch(t){return[]}}const h=[1,0,0,1],d=([t,n,o,r],[e,i,u,c])=>[t*e+o*i,n*e+r*i,t*u+o*c,n*u+r*c];function v(t){if("function"!=typeof getComputedStyle||"function"!=typeof DOMMatrix)return h;const n=getComputedStyle(t).transform;if(!n||"none"===n)return h;try{const{a:t,b:o,c:r,d:e}=new DOMMatrix(n);return[t,o,r,e]}catch(t){return h}}function y(t){var n,o,r;return null!==(r=null!==(o=null!==(n=t.assignedSlot)&&void 0!==n?n:t.parentElement)&&void 0!==o?o:t.getRootNode().host)&&void 0!==r?r:null}function x(t){var n,o;const[r,e,i,u]=function(t){let n=h;for(let o=t;o;o=y(o))n=d(v(o),n);return n}(t),c=r*u-e*i;if(0===c){const n=t.getBoundingClientRect();return{toLocal:t=>({x:t.left-n.left,y:t.top-n.top,width:t.width,height:t.height})}}const a=(t,n)=>({x:r*t+i*n,y:e*t+u*n}),l=t,s=t.getBoundingClientRect(),f=null!==(n=l.offsetWidth)&&void 0!==n?n:s.width,x=null!==(o=l.offsetHeight)&&void 0!==o?o:s.height,M=[a(0,0),a(f,0),a(0,x),a(f,x)],p=s.left-Math.min(...M.map((t=>t.x))),g=s.top-Math.min(...M.map((t=>t.y))),m=(t,n)=>{const o=t-p,a=n-g;return{x:(u*o-i*a)/c,y:(-e*o+r*a)/c}};return{toLocal:t=>{const n=[m(t.left,t.top),m(t.left+t.width,t.top),m(t.left,t.top+t.height),m(t.left+t.width,t.top+t.height)],o=Math.min(...n.map((t=>t.x))),r=Math.min(...n.map((t=>t.y)));return{x:o,y:r,width:Math.max(...n.map((t=>t.x)))-o,height:Math.max(...n.map((t=>t.y)))-r}}}}export{l as a,s as b,a as c,u as d,i as e,x as l,e as m,c as o,f as r,o as t}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as t,f as n}from"./p-CCZcKl0Q.js";import{g as e,r,c as s,D as a}from"./p-B0MEAsAS.js";const i=t=>{if("object"==typeof t&&null!==t){if("function"==typeof Object.getPrototypeOf){const n=Object.getPrototypeOf(t);return n===Object.prototype||null===n}return"[object Object]"===Object.prototype.toString.call(t)}return!1},o=(t,n)=>n,u=(t,n)=>[...new Set([...t,...n])],c=(t,n)=>{const e=(t=>{return{arrayMergeType:"combine",arrayMerge:(n=t?t.arrayMergeType:"combine","overwrite"===n?o:u),...t};var n})(n);return t.reduce(((t,n)=>(Object.keys(n).forEach((r=>{Array.isArray(t[r])&&Array.isArray(n[r])?e&&e.arrayMerge&&(t[r]=e.arrayMerge(t[r],n[r])):t[r]=i(t[r])&&i(n[r])?c([t[r],n[r]],e):n[r]})),t)),{})},l=a=>{let i,o,u,l;const f=()=>{const t=o.componentStyles.state;l=c([t._system||{},t._default||{},t[u]||{}],{arrayMergeType:"overwrite"})},d=a.connectedCallback;a.connectedCallback=()=>{const s=t(a);o=e(s),l=o.componentStyles.state._system,u=a.selectedStyle,f(),i=o.componentStyles.on("set",(e=>{e!==u&&"_default"!==e||(u=a.selectedStyle,f(),n(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!==u&&(u=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 N,w,k,S,O,D;!function(t){t.ROWGROUP="rowGroup",t.ROWGROUPINDEX="rowGroupIndex",t.CATEGORY="category",t.CATEGORYINDEX="categoryIndex",t.SUBCATEGORY="subCategory",t.SUBCATEGORYINDEX="subCategoryIndex"}(N||(N={})),function(t){t.SMART="smart",t.LONG="long",t.SHORT="short"}(w||(w={})),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,M,E,j,$,J,L;!function(t){t.ASC="asc",t.DESC="desc",t.DATASET="dataset"}(A||(A={})),function(t){t[t.ALL=-1]="ALL"}(M||(M={})),function(t){t[t.UP_TO_DATE=0]="UP_TO_DATE",t[t.DIRTY=1]="DIRTY"}(E||(E={})),function(t){t.LIST="list",t.SUM="sum",t.SUMNOTOTAL="sumnototal",t.OPT="opt",t.OPTNOTOTAL="optnototal"}(j||(j={})),function(t){t.BELOW="below",t.ABOVE="above"}($||($={})),function(t){t.ASC="asc",t.DESC="desc"}(J||(J={})),function(t){t.HEADER="HEADER",t.GROUPHEAD="GROUPHEAD",t.SEPERATORLINE="SEPERATORLINE",t.SUM="SUM",t.GROUPSUM="GROUP_SUM",t.DRILLELEMENT="DRILLELEMENT",t.STANDARD="STANDARD",t.PARTELEMENT="PARTELEMENT",t.ENTRY="ENTRY"}(L||(L={}));const F=/^\s*(set|first|last|min|max|avg|sum|lit)\(\s*(.*?)\s*\)\s*$/,I=/^[A-Za-z_][A-Za-z0-9_]*$/,_=["min","max","avg","sum"];class W{constructor(t,n,e,r){this.label=t,this.alias=n,this.fn=e,this.arg=r}get isNumeric(){return _.includes(this.fn)}}function x(t){if("string"!=typeof t)return!1;const n=F.exec(t);if(!n)return!1;const[,e,r]=n;return"lit"===e?r.length>0:I.test(r)}function G(t,n,e){if(!x(e))return null;const[,r,s]=F.exec(e);return new W(t,n,r,s)}var R,q,C,z;!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"}(R||(R={})),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"}(q||(q={}));class P{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),P.LOCALE_DATE_FORMAT[t]||{})),this.dateFormatShortPinned||(this.dateFormatShort=Object.assign(Object.assign({},this._dateFormatShort),P.LOCALE_DATE_FORMAT_SHORT[t]||{}))}getDateString(t,n){return t.setLocale(this.locale).toFormat(this.dateFormat[n]||this.dateFormat.fallback)}getSmartDateString(t,n){switch(n){case R.DAY:return this.getFormatedDayDate(t);case R.MONTH:return this.getFormatedMonthDate(t);case R.QUARTER:return this.getFormatedQuarterDate(t);case R.WEEK:return this.getFormatedWeekDate(t);case R.HOUR:return this.getFormatedHourDate(t);case R.MINUTE:return this.getFormatedMinuteDate(t);case R.SECOND:return this.getFormatedSecondDate(t);case R.MILLISECOND:return this.getFormatedMilliSecondDate(t);default:return this.getDateString(t,n)}}calculateDistanceType(t,n,e=32){if(null==n)return R.DAY;const r="number"==typeof t?a.fromMillis(t):t,s="number"==typeof n?a.fromMillis(n):n;return 0===s.diff(r).as("milliseconds")?R.DAY:s.diff(r).as("milliseconds")<e?R.MILLISECOND:s.diff(r).as("seconds")<e?R.SECOND:s.diff(r).as("minutes")<e?R.MINUTE:s.diff(r).as("hours")<e?R.HOUR:s.diff(r).as("days")<e?R.DAY:s.diff(r).as("weeks")<e?R.WEEK:s.diff(r).as("months")<e?R.MONTH:s.diff(r).as("quarters")<e?R.QUARTER:R.YEAR}datesBetween(t,n,e){const r=this.convertDateDistanceToMomentunitOfTime(e),s=t.startOf(r),a=n.endOf(r),i=[];let o=s;do{i.push(o),o=o.plus(this.createDiratonLike(r,1))}while(o<=a);return i}countBetween(t,n,e){const r=this.convertDateDistanceToMomentunitOfTime(e);return Math.floor(n.startOf(r).diff(t.startOf(r),r).as(r))+1}getDateLinkString(t,n,e,r,s){if(null==t&&null==n)return"";if(null==t&&e!==q.END&&e!==q.YTD)return"";if(null==n&&(q.INTERVAL===e||q.CUM===e||q.END===e||q.YTD===e))return"";const i=t||a.now(),o=n;r===R.AUTO&&(r=this.calculateDistanceType(i,o,s));let u=this.getDateString(i,r),c="",l=q.NONE;return null!=o&&(c=this.getDateString(o,r),l=q.INTERVAL,u===c&&e===q.INTERVAL&&(e=q.NONE),u===c&&e===q.AVG&&(l=q.NONE),q.END!==e&&q.YTD!==e||(u=c),e!==q.INTERVAL&&e!==q.CUM&&e!==q.AVG||(r===R.QUARTER?i.quarter===o.quarter&&i.year===o.year?c=c.replace(" "+o.year,""):i.year===o.year&&(u=u.replace(" "+i.year,"")):r===R.MONTH?i.month===o.month&&i.year===o.year?c=c.replace(" "+o.year,""):i.year===o.year&&(u=u.replace(" "+i.year,"")):r===R.WEEK&&(i.weekNumber===o.weekNumber&&i.weekYear===o.weekYear?c=c.replace(" "+o.weekYear,""):i.weekYear===o.weekYear&&(u=u.replace(" "+i.weekYear,""))))),this.dateLinkFormat[e].replace("[LINK]",this.dateLinkFormat[l]).replace("[DATE]",u).replace("[DATE2]",c)}getShortDateString(t,n){return t.setLocale(this.locale).toFormat(this.dateFormatShort[n]||this.dateFormatShort.fallback)}getFormatedDayDate(t){let n=this.dateFormatShort.day;return this.isFirstInMonth(t)&&(n+=" "+this.dateFormatShort.month),this.isJanuary(t)&&(n+=" "+this.dateFormatShort.year),t.setLocale(this.locale).toFormat(n)}getFormatedMonthDate(t){let n=this.dateFormatShort.month;return this.isJanuary(t)&&(n+=" "+this.dateFormatShort.year),t.setLocale(this.locale).toFormat(n)}getFormatedQuarterDate(t){let n=this.dateFormatShort.quarter;return this.isFirstQuarter(t)&&(n+=" "+this.dateFormatShort.year),t.setLocale(this.locale).toFormat(n)}getFormatedWeekDate(t){let n=this.dateFormatShort.week;return this.isFirstWeek(t)&&(n+=" kk"),t.setLocale(this.locale).toFormat(n)}getFormatedHourDate(t){let n=this.dateFormatShort.hour;return this.isFirstHour(t)&&(n+=" "+this.dateFormatShort.day),t.setLocale(this.locale).toFormat(n)}getFormatedMinuteDate(t){let n=this.dateFormatShort.minute;return this.isFirstMinute(t)&&(n=this.dateFormatShort.hour+":"+n),t.setLocale(this.locale).toFormat(n)}getFormatedSecondDate(t){let n=this.dateFormatShort.second;return this.isFirstSecond(t)&&(n=this.dateFormatShort.minute+":"+n),t.setLocale(this.locale).toFormat(n)}getFormatedMilliSecondDate(t){let n=this.dateFormatShort.millisecond;return this.isFirstMilliSecond(t)&&(n=this.dateFormatShort.second+":"+n),t.setLocale(this.locale).toFormat(n)}isSmartBoundary(t,n){switch(n){case R.DAY:return this.isFirstInMonth(t);case R.WEEK:return this.isFirstWeek(t);case R.MONTH:return this.isJanuary(t);case R.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 n;switch(t){case R.YEAR:n="year";break;case R.MONTH:n="month";break;case R.QUARTER:n="quarter";break;case R.WEEK:n="week";break;case R.DAY:n="day";break;case R.HOUR:n="hour";break;case R.MINUTE:n="minute";break;case R.SECOND:n="second";break;case R.MILLISECOND:n="millisecond";break;default:n="day"}return n}createDiratonLike(t,n){switch(t){case"year":return{years:n};case"month":return{months:n};case"quarter":return{quarters:n};case"week":return{weeks:n};case"day":default:return{days:n};case"hour":return{hours:n};case"minute":return{minutes:n};case"second":return{seconds:n};case"millisecond":return{milliseconds:n}}}}P.LOCALE_DATE_FORMAT={en:{week:"'W'WW kkkk",day:"MM/dd/yyyy",fallback:"MM/dd/yyyy"}},P.LOCALE_DATE_FORMAT_SHORT={en:{week:"'W'WW",fallback:"MM/dd/yyyy"}};class B{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 K{static adaptDefaultString(t){return B.isString(t)?t.trim():""}static adaptArray(t,n){const e=[];return B.isArray(t)&&t.forEach((t=>{e.push(n.adapt(t))})),e}}!function(t){t.ASC="asc",t.DESC="desc"}(C||(C={})),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"}(z||(z={}));class Q{constructor(t=["category"],n=C.ASC){this.hierarchy=t,this.direction=n}}const U=[z.ROWGROUP,z.ROWGROUPINDEX,z.CATEGORY,z.CATEGORYINDEX,z.SUBCATEGORY,z.SUBCATEGORYINDEX],H=/^(?:ac|fc|pp|pl)[1-4]$/,Z=/^(dr|d)((?:ac|fc|pp|pl)[1-4])_((?:ac|fc|pp|pl)[1-4])(?:_(?:pos|neg|neu|opinv|op))?$/;function Y(t){if(null==t)return;const n=t.indexOf("@"),e=(n<0?t:t.slice(0,n)).trim().toLowerCase(),r=n<0?void 0:t.slice(n+1).trim();if(""===r)return;const s=z[e.toUpperCase()];if(null!=s&&U.includes(s))return void 0===r?{kind:"dim",column:s}:void 0;if(H.test(e))return{kind:"scenario",column:e,bucket:r};const a=Z.exec(e);if(null!=a){const[,t,n,e]=a;return{kind:"variance",column:`${t}${n}_${e}`,type:t,base:n,delta:e,bucket:r}}}function V(t){const n=Y(t);if(null!=n)return void 0===n.bucket?n.column:`${n.column}@${n.bucket}`}class X{constructor(t,n=!1){this.stringAdapter=t,this.allowMeasures=n}adapt(t){var n;const e=K.adaptArray(t.hierarchy,this.stringAdapter),r=C[null===(n=t.direction)||void 0===n?void 0:n.toUpperCase()]||C.ASC;return new Q(e.map((t=>(this.allowMeasures?V(t):z[t.toUpperCase()])||z.CATEGORY)),r)}default(){return new Q(["category"],C.ASC)}}const tt="n/a";function nt(t,n){if(!(Math.abs(n)<=1e-9*Math.abs(t)))return t/Math.abs(n)}const et=/^(dr|d)((?:ac|pp|fc|pl)[1-4])_((?:ac|pp|fc|pl)[1-4])(?:_(pos|neg|neu|op|opinv))?$/;class rt{constructor(t,n,e){this.type=t,this.base=n,this.delta=e}static parse(t){const n=et.exec(t);return null===n?null:new rt(n[1],n[2],n[3])}compute(t,n){var e;return null==t||null==n?null:"dr"===this.type?0===n?null:null!==(e=nt(t-n,n))&&void 0!==e?e:null:t-n}}function st(t){const n=t.trim();if(Object.values(h).includes(n))return{kind:"scenario",slot:n};const e=rt.parse(n);return null!==e?{kind:"variance",measure:e}:null}function at(t){return t.replace(/\d+$/,"")}function it(t){return t.replace(/^[a-z]+/,"")}function ot(t){var n;return"dr"===(null===(n=rt.parse(t.trim()))||void 0===n?void 0:n.type)}function ut(t){if(!ot(t.measure))return t;const n=t=>void 0===t?void 0:t/100;return Object.assign(Object.assign({},t),{min:n(t.min),max:n(t.max),refLine:n(t.refLine),highlight:t.highlight&&{from:n(t.highlight.from),to:n(t.highlight.to)}})}function ct(t){return null==t||""===t||"null"===t}function lt(t){return"string"==typeof t&&"none"===t.trim().toLowerCase()}function ft(t){return ct(t)||"auto"===t.trim().toLowerCase()?[]:dt((null==t?void 0:t.split(",").filter((t=>!(t.toUpperCase().trim()in h)))).toString())}function dt(t){return ct(t)?[]:t.replace(";",",").split(",").filter((t=>{var n,e,r;const s=t.split("_"),a=null===(n=s[0])||void 0===n?void 0:n.replace(/^dr|^d/,"").toUpperCase().trim(),i=null===(e=s[1])||void 0===e?void 0:e.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 ht(t){return ct(t)?[]:dt(t.split(",").filter((t=>!(t.toUpperCase().trim()in h))).toString())}function mt(t){return ct(t)||"auto"===t.trim().toLowerCase()?[]:dt(t.split(",").filter((t=>!(t.toUpperCase()in z))).toString())}function yt(t){return ct(t)||"auto"===t.trim().toLowerCase()?[]:t.split(",").filter((t=>void 0===Y(t)))}function pt(t){return!ct(t)&&Number.isInteger(Number(t))}function bt(t){return!ct(t)&&!Number.isNaN(Number(t))}function vt(t){return!ct(t)&&(null==t?void 0:t.toUpperCase())in C}function gt(t){return"auto"===(null==t?void 0:t.toLowerCase())||(null==t?void 0:t.toUpperCase())in N}function Nt(t){if(ct(t))return[];try{const n=JSON.parse(t);if(n instanceof Array)return n.filter((t=>!(t.hasOwnProperty("name")&&t.hasOwnProperty("unit"))))}catch(t){console.error("validateMeasureList: failed to parse JSON",t)}return["Invalid JSON structure"]}function wt(t){const n=Date.parse(t);return Number.isInteger(n)}function kt(t){return(null==t?void 0:t.toUpperCase())in q}function St(t){return(null==t?void 0:t.toUpperCase())in R}function Ot(t){return(null==t?void 0:t.toUpperCase())in w}function Dt(t){return!ct(t)&&(null==t?void 0:t.toUpperCase())in y}function Tt(t){return!ct(t)&&(null==t?void 0:t.toUpperCase())in p}function At(t){return(null==t?void 0:t.toUpperCase())in $}function Mt(t){if(ct(t))return[];try{const n=JSON.parse(t);if(n instanceof Array)return n.filter((t=>!(t.hasOwnProperty("rowGroup")&&t.hasOwnProperty("category")&&t.hasOwnProperty("subCategory"))))}catch(t){console.error("validateThereOfJsonStr: failed to parse JSON",t)}return["Invalid JSON structure"]}function Et(t){if(ct(t))return[];try{const n=JSON.parse(t);if(null!==n&&"object"==typeof n&&!(n instanceof Array))return Object.entries(n).filter((([,t])=>"string"!=typeof t||!x(t))).map((([t,n])=>`${t}: ${n}`))}catch(t){console.error("validateAttributesJsonStr: failed to parse JSON",t)}return["Invalid JSON structure"]}function jt(t){if(ct(t))return[];try{const n=JSON.parse(t);if(n instanceof Array)return n.filter((t=>!(t.hasOwnProperty("rowGroup")&&t.hasOwnProperty("category"))))}catch(t){console.error("validatePartOfJsonStr: failed to parse JSON",t)}return["Invalid JSON structure"]}function $t(t){return(null==t?void 0:t.trim().toUpperCase())in d}function Jt(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 Lt(t){return(null==t?void 0:t.toUpperCase().trim())in b}function Ft(t){return(null==t?void 0:t.toUpperCase().trim())in v}function It(t){if(ct(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 _t(t){if(ct(t))return[];try{const n=JSON.parse(t);if("object"!=typeof n||null===n||Array.isArray(n))return["stack: must be a JSON object"];const e=[];if(n.hasOwnProperty("by")){const t=["scenarios","dimensions"];t.includes(n.by)||e.push(`stack: 'by' must be one of: ${t.join(", ")}`)}else e.push("stack: 'by' is required");if(n.hasOwnProperty("mode")){const t=["absolute","relative","absolute-relative"];t.includes(n.mode)||e.push(`stack: 'mode' must be one of: ${t.join(", ")}`)}if(n.hasOwnProperty("order")){const t=["asc","desc","dataset"];t.includes(n.order)||e.push(`stack: 'order' must be one of: ${t.join(", ")}`)}return e}catch(t){return["stack: invalid JSON"]}}function Wt(t){return!ct(t)&&null!==st(t)}class xt{constructor(){this.cache=new Map,this.tag=xt.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 Gt=new xt;function Rt(t){for(var n,e=0,r=0,s=t.length;s>=4;++r,s-=4)n=1540483477*(65535&(n=255&t.charCodeAt(r)|(255&t.charCodeAt(++r))<<8|(255&t.charCodeAt(++r))<<16|(255&t.charCodeAt(++r))<<24))+(59797*(n>>>16)<<16),e=1540483477*(65535&(n^=n>>>24))+(59797*(n>>>16)<<16)^1540483477*(65535&e)+(59797*(e>>>16)<<16);switch(s){case 3:e^=(255&t.charCodeAt(r+2))<<16;case 2:e^=(255&t.charCodeAt(r+1))<<8;case 1:e=1540483477*(65535&(e^=255&t.charCodeAt(r)))+(59797*(e>>>16)<<16)}return(((e=1540483477*(65535&(e^=e>>>13))+(59797*(e>>>16)<<16))^e>>>15)>>>0).toString(36)}const qt=t=>bt(t)?`${t}px`:t,Ct={width:{className:"w",cssName:"width",attrName:"width",transform:qt},height:{className:"h",cssName:"height",attrName:"height",transform:qt},position:{className:"pst",cssName:"position",attrName:"position"},top:{className:"top",cssName:"top",attrName:"top",transform:qt},right:{className:"rgt",cssName:"right",attrName:"right",transform:qt},bottom:{className:"btm",cssName:"bottom",attrName:"bottom",transform:qt},left:{className:"lft",cssName:"left",attrName:"left",transform:qt},"font-size":{className:"fts",cssName:"font-size",attrName:"font-size",transform:qt},"grid-column":{className:"gdc",cssName:"grid-column",attrName:"grid-column"},"grid-row":{className:"gdr",cssName:"grid-row",attrName:"grid-row"}},zt=Object.keys(Ct);function Pt(t,n,e){return`.${n} {${t.cssName}: ${e};}`}function Bt(t,n){const e=document.createElement("div").style;e.setProperty(t.cssName,n);const r=e.getPropertyValue(t.cssName);if(e.cssText=`${t.cssName}:${r};--bn-end:1`,!r||r.includes("<")||"1"!==e.getPropertyValue("--bn-end"))return;const s=function(t,n){const e=Rt(n);return`bn-c-${t.className}_${e}`}(t,n);return{className:s,style:Pt(t,s,r)}}const Kt=t=>{const n=new Map;return zt.forEach((e=>{const r=t.getAttribute(e);if(r){["top","left","right","bottom"].includes(e)&&n.set("position",Bt(Ct.position,"absolute"));const t=Bt(Ct[e],(Ct[e].transform||function(t){return t})(r));t&&n.set(e,t)}})),n},Qt=new MutationObserver((t=>{for(const e of t){const t=e.target,r=Kt(t);Gt.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(" "),n(t)}})),Ut=n=>{const e=n.connectedCallback,s=n.disconnectedCallback;n.connectedCallback=()=>{const s=t(n);if(!s)throw new Error("Can't find element field in component undefined");(t=>{const n=Kt(t);Gt.apply(n);const e=Array.from(n.values()).map((t=>t.className));t.className=t.className.split(" ").filter((t=>!t.startsWith("bn-c-"))).concat(...e).join(" "),Qt.observe(t,{attributes:!0,attributeFilter:zt,childList:!1,subtree:!1})})(s),r(e,n)},n.disconnectedCallback=()=>{r(s,n)}};export{$,N as A,bt as B,B as C,St as D,Ot as E,R as F,w as G,S as H,P as I,Rt as J,ht as K,Ft as L,Dt as M,tt as N,C as O,Tt as P,Mt as Q,T as R,O as S,At as T,jt as U,yt as V,$t as W,Lt as X,It as Y,Et as Z,y as _,l as a,j as a0,V as a1,f as a2,b as a3,d as a4,G as a5,g as a6,v as a7,L as a8,I as a9,Y as aa,h as ab,J as ac,E as ad,Nt as ae,wt as af,kt as ag,q as ah,pt as b,Wt as c,it as d,ut as e,ot as f,vt as g,Q as h,ct as i,z as j,lt as k,ft as l,c as m,dt as n,gt as o,Jt as p,_t as q,st as r,at as s,A as t,D as u,mt as v,Ut as w,K as x,X as y,nt as z}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as r}from"./p-CCZcKl0Q.js";import{r as t}from"./p-B0MEAsAS.js";const s=(s,o)=>{let a;const e=new MutationObserver((()=>{var r;a&&o(null!==(r=a.textContent)&&void 0!==r?r:"")})),c=s.connectedCallback;s.connectedCallback=()=>{var i;a=r(s),e.observe(a,{childList:!0,subtree:!0,characterData:!0}),o(null!==(i=a.textContent)&&void 0!==i?i:""),t(c,s)};const i=s.disconnectedCallback;s.disconnectedCallback=()=>{e.disconnect(),t(i,s)}};export{s as w}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as t,r as n,c as e,R as o}from"./p-
|
|
1
|
+
import{g as t,r as n,c as e,R as o}from"./p-B0MEAsAS.js";import{g as r,f as i}from"./p-CCZcKl0Q.js";import{i as s}from"./p-BEGt_7Hr.js";const a=new Set(["br","b","i","strong","em","span","p","div","table","tr","td","th","thead","tbody","tfoot","ul","ol","li","h1","h2","h3","h4","h5","h6","sub","sup","small","hr","a","img","code","pre","blockquote","del"]),l=new Set(["class","style","colspan","rowspan","href","title","src","alt","width","height"]),u=new Set(["http:","https:","mailto:"]),c=/^\s*text-align:\s*(left|center|right)\s*;?\s*$/i;function d(t){if(!t)return"";const n=(new DOMParser).parseFromString(t,"text/html").body;return f(n),n.innerHTML}function f(t){for(const n of Array.from(t.childNodes)){if(n.nodeType===Node.TEXT_NODE)continue;const e=n;if(n.nodeType!==Node.ELEMENT_NODE||!a.has(e.localName)){t.removeChild(n);continue}for(const t of Array.from(e.attributes)){const n=t.name.toLowerCase();l.has(n)&&("href"!==n&&"src"!==n||v(n,t.value))||e.removeAttribute(t.name)}const o=e.getAttribute("style");null===o||c.test(o)||e.removeAttribute("style"),f(e)}}function v(t,n){try{const{protocol:e}=new URL(n,"http://a");return u.has(e)||"src"===t&&"data:"===e}catch(t){return!1}}function h(t,n=!1){const e=p(t);if(!e)return n&&console.log("[parentDims] no layout parent found for",t.tagName),{width:0,height:0};const o=getComputedStyle(e),r=e.clientWidth-parseFloat(o.paddingLeft)-parseFloat(o.paddingRight),i=function(t,n=!1){let e=p(t),o=0,r=null,i=1;for(;e;){if(e.hasAttribute("data-bn-fit-content")){n&&console.log(`[height:${o}]`,e.tagName,"fit-content region → discarding inner candidate"),r=null;const t=parseInt(e.getAttribute("data-bn-fit-content"),10);!isNaN(t)&&t>1&&(i*=t),e=m(e),o++;continue}const t=getComputedStyle(e),s=t.overflowY;if(n&&console.log(`[height:${o}]`,e.tagName,e.className||"(no class)",`overflow=${s} clientH=${e.clientHeight} h=${t.height}`),null===r)if("hidden"===s||"scroll"===s||"auto"===s)r=e.clientHeight-parseFloat(t.paddingTop)-parseFloat(t.paddingBottom),n&&console.log(`[height] candidate at depth ${o}: ${Math.round(r)}px`);else if("none"!==t.maxHeight){const n=parseFloat(t.maxHeight);!isNaN(n)&&n>0&&(r=Math.min(n,e.clientHeight-parseFloat(t.paddingTop)-parseFloat(t.paddingBottom)))}e=m(e),o++}return null!==r?r/i:(n&&console.log("[height] NO constrained ancestor → viewport fallback"),"undefined"!=typeof window?window.innerHeight/i:0)}(t,n);return n&&console.log("[parentDims]",t.tagName,"→ layoutParent:",e.tagName,e.className||"(no class)",`clientW=${e.clientWidth} → w=${Math.round(r)}, h=${Math.round(i)}`,"overflow:",o.overflow),{width:Math.max(0,r),height:Math.max(0,i)}}function p(t){var n;const e=t.parentElement;return(null===(n=null==e?void 0:e.assignedSlot)||void 0===n?void 0:n.parentElement)?e.assignedSlot.parentElement:e}function m(t){var n;if(null===(n=t.assignedSlot)||void 0===n?void 0:n.parentElement)return t.assignedSlot.parentElement;if(t.parentElement)return t.parentElement;const e=t.getRootNode();return e instanceof ShadowRoot?e.host:null}function b(t,n){const e=t.getBoundingClientRect(),o=t.offsetHeight>0?e.height/t.offsetHeight:0;if(!(o>0)||Math.abs(o-(t.offsetWidth>0?e.width/t.offsetWidth:0))>.01*o)return 0;const r=e.top+n*o;let i=0;for(let n=t;n;n=m(n)){const t=getComputedStyle(n).overflowY;if("hidden"===t||"clip"===t)i=Math.max(i,r-n.getBoundingClientRect().bottom);else if(("auto"===t||"scroll"===t)&&n.scrollHeight>n.clientHeight+1)break}return i/o}const g=(t,n)=>Math.round(t*n*100)/100;function w(t){if(null==t||""===t)return{mode:"empty"};if("none"===t)return{mode:"none"};if("auto"===t)return{mode:"auto"};const n=Number(t);return!isNaN(n)&&n>0?{mode:"factor",factor:n}:{mode:"empty"}}const y={k:1e3,K:1e3,M:1e6,G:1e9,T:1e12},M=/^(\d+(?:\.\d+)?|\.\d+)\s*([kKMGT])?$/;function $(t){var n;if("number"==typeof t)return Number.isFinite(t)&&t>0?{kind:"number",value:t}:{kind:"invalid",raw:String(t)};const e=null!==(n=null==t?void 0:t.toString().trim())&&void 0!==n?n:"";if("auto"===e.toLowerCase())return{kind:"auto"};const o=M.exec(e);if(o){const t=Number(o[1])*(o[2]?y[o[2]]:1);if(Number.isFinite(t)&&t>0)return{kind:"number",value:t}}return{kind:"invalid",raw:e}}function k(t,n){const e=$(t);if("auto"===e.kind)return{kind:"auto"};if("string"==typeof t){const e=t.trim();if(n.has(e))return{kind:"value",value:n.get(e)}}return"number"===e.kind?{kind:"value",value:e.value}:{kind:"invalid",raw:e.raw}}const N=[[1e12,"T"],[1e9,"G"],[1e6,"M"],[1e3,"k"]];function S(t){if(!Number.isFinite(t)||t<=0)return String(t);const n=t=>String(Number(t.toPrecision(3)));for(const[e,o]of N)if(t>=e)return`${n(t/e)}${o}`;return n(t)}const F="WARN_datasets",R=(o,i,s)=>{let a,l,u=[],c=[],d=[],f="";const v=()=>{const t=f;f=o.datasets||"",""!==t&&t!==f&&i("",[]),[d,c]=((t,n)=>{const e=[],o=[];for(const t of n)(r=t,r.startsWith("$")?e:o).push(t);var r;return[e,o]})(0,f.split(",")),((t,n)=>{const e=t.errors;if(e)if(n.length>0){const t=n.map((t=>t.substring(1))).join(", ");e.addOrReplace({id:F,type:"warning",message:`Using datasource(s) "${t}" directly. Prefer using a dataset (bn-dataset) for query support and metadata.`})}else e.remove(F)})(o,d),p()},h=(t,n)=>{const e=n?t.substring(1):t;let o;try{o=l.db.db.exec(`SELECT * FROM \`${e}\``)}catch(t){o=[]}i(t,o)},p=()=>{u.forEach((t=>t())),u=[],c.forEach((t=>{t&&(u.push(l.db.subscribe(t,(()=>h(t,!1)))),h(t,!1),(t=>{if(s){const n=l.datasetsMeta.get(t);n&&s(t,n)}})(t))})),d.forEach((t=>{t&&(u.push(l.db.subscribe(t.substring(1),(()=>h(t,!0)))),h(t,!0))}))},m=new MutationObserver((t=>{t.forEach((t=>{"datasets"===t.attributeName&&(o.datasets||"")!==f&&v()}))})),b=o.connectedCallback;o.connectedCallback=()=>{const e=r(o);l=t(e),v(),m.observe(e,{attributes:!0,attributeFilter:["datasets"]}),s&&(a=l.datasetsMeta.on("set",((t,n)=>{c.includes(t)&&s(t,n)}))),n(b,o)};const g=o.disconnectedCallback;return o.disconnectedCallback=()=>{m.disconnect(),u.forEach((t=>t())),u=[],n(a),e(r(o)),n(g,o)},t=>{c=t,p()}},O="inherited-page",A="bn-layout-page";function C(t){return"inherited-closest"===t||t===O}function j(t,n){const e=[];let o=t.parentNode;for(;o;){const t=o.nodeName.toLowerCase();if(t===A){e.push(o);break}if("bn-layout-card"===t&&n!==O&&e.push(o),o.parentNode)o=o.parentNode;else{if(!(o instanceof ShadowRoot))break;o=o.host}}return e}function E(t,n){var e;const o=t=>{const e=t.getAttribute(n),o=null==e?void 0:e.trim();return s(o)||C(o)?void 0:e};for(const r of t){if((null===(e=r.getAttribute(n))||void 0===e?void 0:e.trim())===O){const n=t.find((t=>t.nodeName.toLowerCase()===A)),e=n&&o(n);if(void 0!==e)return e;continue}const i=o(r);if(void 0!==i)return i}}const T=(t,e,o)=>{const s=new Map,a=new Map;let l=null;const u=()=>{var n;const o=r(t);s.clear(),a.clear(),l&&(l.disconnect(),l=null);const c=new Map;for(const r of e){const e=t[r.propName];if("string"!=typeof e||!C(e))continue;a.set(r.propName,e);const i=j(o,e),l=E(i,r.ancestorAttr);void 0!==l&&s.set(r.propName,l);for(const t of i)c.set(t,[...null!==(n=c.get(t))&&void 0!==n?n:[],r.ancestorAttr])}if(c.size>0){l=new MutationObserver((()=>{u(),i(t)}));for(const[t,n]of c)l.observe(t,{attributes:!0,attributeFilter:n})}},c=t.connectedCallback;t.connectedCallback=()=>{u(),n(c,t)};const d=t.disconnectedCallback;t.disconnectedCallback=()=>{l&&(l.disconnect(),l=null),s.clear(),a.clear(),n(d,t)};const f=t=>{var n;return null===(n=e.find((n=>n.propName===t)))||void 0===n?void 0:n.ancestorAttr.replace(/-(\w)/g,((t,n)=>n.toUpperCase()))};return(t,n,e)=>{const r=`WARN_inherited_${t}`,i=C(n);i&&a.get(t)!==n&&u();const l=i?s.get(t):void 0;return i&&void 0===l?(null==o||o.addOrReplace({id:r,type:"warning",message:`${t}: '${n}' could not be resolved, no surrounding ${n===O?"page":"card or page"} sets ${f(t)}`}),{value:e,inherited:!1,unresolved:!0}):(null==o||o.remove(r),{value:null!=l?l:n,inherited:void 0!==l,unresolved:!1})}},_=s=>{let a,l,u,c,d=null;const f=()=>{const t=r(s);if(d&&(d.disconnect(),d=null),u=s.i18nNamespace,l=u,null!=l)return;const n=function(t){let n=t.parentNode;for(;n;){if(n instanceof HTMLElement&&n.hasAttribute("i18n-namespace"))return n;if(n.parentNode)n=n.parentNode;else{if(!(n instanceof ShadowRoot))break;n=n.host}}}(t);n&&(l=n.getAttribute("i18n-namespace"),d=new MutationObserver((()=>{f(),i(s)})),d.observe(n,{attributes:!0,attributeFilter:["i18n-namespace"]}))},v=s.connectedCallback;s.connectedCallback=()=>{const e=r(s);c=t(e),f(),a=c.internationalization.on("set",(t=>{t!==l&&"_system"!==t||i(s)})),n(v,s)};const h=s.disconnectedCallback;return s.disconnectedCallback=()=>{d&&(d.disconnect(),d=null),n(a),e(r(s)),n(h,s)},{t:(t,n)=>{var e,i,a,d,v;void 0!==c&&s.i18nNamespace!==u&&f(),t.startsWith(".")&&(t=r(s).localName+t),Object.prototype.hasOwnProperty.call(o,t)&&(t=o[t]);const h=c.internationalization.state,p=c.context.state.locale,m=null!==(a=null===(i=null===(e=h[l])||void 0===e?void 0:e[p])||void 0===i?void 0:i[t])&&void 0!==a?a:null===(v=null===(d=h._system)||void 0===d?void 0:d[p])||void 0===v?void 0:v[t];return null==m?t:m.replace(/{{([\s\S]+?)}}/g,((t,e)=>{var o;return null!==(o=null==n?void 0:n[e.trim()])&&void 0!==o?o:""}))}}};export{R as a,b,g as c,k as d,S as e,j as f,h as g,T as h,C as i,$ as j,w as p,E as r,d as s,_ as w}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,h as t,a as e,g as r}from"./p-CCZcKl0Q.js";import{w as i}from"./p-
|
|
1
|
+
import{r as s,h as t,a as e,g as r}from"./p-CCZcKl0Q.js";import{w as i}from"./p-BRO1oW7m.js";import{w as o,a,g as c}from"./p-B0MEAsAS.js";const h=class{constructor(t){s(this,t),this.name="_default",o(this),this.errors=a(this),i(this,(s=>{this.stores||(this.stores=c(this.element));try{const t=JSON.parse(s);this.stores.ruleSets.set(this.name,t),this.errors.remove("ERR_body")}catch(s){this.errors.addOrReplace({id:"ERR_body",type:"error",message:`bn-ruleset: Failed to parse JSON body - ${s.message}`}),console.error(s)}}))}render(){return t(e,{key:"de03c25692178ed0f97c1e0d914396cba7c53cc3"})}get element(){return r(this)}};h.style="bn-ruleset{display:none}";export{h as bn_ruleset}
|