@bino-bi/bn-template-engine 1.0.0-next.49 → 1.0.0-next.51
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-0cad5598.entry.js +1 -0
- package/dist/bn-template-engine/{p-2de524d0.entry.js → p-150bdb68.entry.js} +1 -1
- package/dist/bn-template-engine/{p-Bxa4pX1M.js → p-Bvunba5p.js} +1 -1
- package/dist/bn-template-engine/p-NxJ6P79y.js +1 -0
- package/dist/bn-template-engine/{p-8fc90dc8.entry.js → p-b75a4b52.entry.js} +1 -1
- package/dist/bn-template-engine/{p-510d2ee6.entry.js → p-fdf42a77.entry.js} +1 -1
- package/dist/cjs/bn-annotation-layer_30.cjs.entry.js +1045 -63
- package/dist/cjs/bn-grid.cjs.entry.js +1 -1
- package/dist/cjs/bn-image.cjs.entry.js +1 -1
- package/dist/cjs/bn-template-engine.cjs.js +1 -1
- package/dist/cjs/bn-text.cjs.entry.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{withStyled-pkdctrK9.js → withStyled-BISQLGLe.js} +9 -0
- package/dist/cjs/{withTranslation-BIzTNYZM.js → withTranslation-B7T30EVU.js} +1 -1
- package/dist/collection/components/bn-annotation-layer/bn-annotation-layer.js +109 -11
- package/dist/collection/components/bn-annotation-layer/utils/marks.js +126 -4
- package/dist/collection/components/bn-annotation-layer/utils/matchPoint.js +2 -1
- package/dist/collection/components/bn-chart-structure/bn-chart-structure-renderer/bn-chart-structure-renderer.js +133 -0
- package/dist/collection/components/bn-chart-structure/bn-chart-structure.js +258 -2
- package/dist/collection/components/bn-chart-structure/utils/StructureChart.js +507 -27
- package/dist/collection/components/bn-chart-structure/utils/elements/Bar.js +3 -1
- package/dist/collection/components/bn-chart-structure/utils/elements/Label.js +12 -0
- package/dist/collection/components/bn-chart-structure/utils/elements/StackedBar.js +23 -8
- package/dist/collection/components/bn-chart-structure/utils/helper/ElementPositions.js +19 -3
- package/dist/collection/components/bn-chart-structure/utils/model/StructureChartComponentConfig.js +23 -0
- package/dist/collection/components/bn-context/bn-context.js +56 -1
- package/dist/collection/components/bn-layout-card/bn-layout-card.js +62 -2
- package/dist/collection/utils/formatter.js +13 -2
- package/dist/collection/utils/validate.js +9 -0
- package/dist/components/bn-annotation-layer.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-context.js +1 -1
- package/dist/components/bn-grid.js +1 -1
- package/dist/components/bn-image.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-page.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-BOwmXBm-.js +1 -0
- package/dist/components/p-Bs5V6Ibu.js +1 -0
- package/dist/components/{p-CVfmhtEW.js → p-CU9CdEBF.js} +1 -1
- package/dist/components/{p-Cc0gaLwp.js → p-CZSp0rSS.js} +1 -1
- package/dist/components/p-CcfvGlBq.js +1 -0
- package/dist/components/p-CiljAoC5.js +1 -0
- package/dist/components/p-D0v9GMIf.js +1 -0
- package/dist/components/{p-DBj1Yd3M.js → p-D65TnLS9.js} +1 -1
- package/dist/components/p-DKcw-1ot.js +1 -0
- package/dist/components/{p-k7heRDPP.js → p-DLmQ_mi7.js} +1 -1
- package/dist/components/p-DOKqRsAu.js +1 -0
- package/dist/components/p-Dpc8_R-Y.js +1 -0
- package/dist/components/p-LHIKI9Dp.js +1 -0
- package/dist/components/{p-Blre9f28.js → p-NdDdfez6.js} +1 -1
- package/dist/components/p-Zz3fAPcH.js +1 -0
- package/dist/components/{p-y12CmIFS.js → p-dSUX43yf.js} +1 -1
- package/dist/components/p-jEqo8YD5.js +1 -0
- package/dist/esm/bn-annotation-layer_30.entry.js +1045 -63
- package/dist/esm/bn-grid.entry.js +1 -1
- package/dist/esm/bn-image.entry.js +1 -1
- package/dist/esm/bn-template-engine.js +1 -1
- package/dist/esm/bn-text.entry.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{withStyled-B62R20Zx.js → withStyled-CrTxIZ0Q.js} +9 -0
- package/dist/esm/{withTranslation-BEseMLQ6.js → withTranslation-BtSJmx1J.js} +1 -1
- package/dist/schemas/stack.schema.json +42 -0
- package/dist/types/components/bn-annotation-layer/utils/marks.d.ts +53 -0
- package/dist/types/components/bn-annotation-layer/utils/matchPoint.d.ts +2 -0
- package/dist/types/components/bn-chart-structure/bn-chart-structure-renderer/bn-chart-structure-renderer.d.ts +11 -1
- package/dist/types/components/bn-chart-structure/bn-chart-structure.d.ts +49 -0
- package/dist/types/components/bn-chart-structure/utils/StructureChart.d.ts +45 -0
- package/dist/types/components/bn-chart-structure/utils/elements/Label.d.ts +4 -0
- package/dist/types/components/bn-chart-structure/utils/elements/StackedBar.d.ts +13 -1
- package/dist/types/components/bn-chart-structure/utils/helper/ElementPositions.d.ts +13 -1
- package/dist/types/components/bn-chart-structure/utils/model/StructureChartComponentConfig.d.ts +23 -0
- package/dist/types/components/bn-context/bn-context.d.ts +11 -0
- package/dist/types/components/bn-layout-card/bn-layout-card.d.ts +12 -0
- package/dist/types/components.d.ts +113 -2
- package/dist/types/schemas.d.ts +12 -0
- package/dist/types/utils/annotations.d.ts +1 -1
- package/dist/types/utils/formatter.d.ts +5 -0
- package/package.json +1 -1
- package/dist/bn-template-engine/p-BFl7OwcC.js +0 -1
- package/dist/bn-template-engine/p-c1d679af.entry.js +0 -1
- package/dist/components/p-B11cXOLy.js +0 -1
- package/dist/components/p-BVNOmHh4.js +0 -1
- package/dist/components/p-CHhxQoF9.js +0 -1
- package/dist/components/p-CO6bgquz.js +0 -1
- package/dist/components/p-CmvpJzLd.js +0 -1
- package/dist/components/p-CuUfiEu0.js +0 -1
- package/dist/components/p-DHloMyxV.js +0 -1
- package/dist/components/p-Dd1QOWDV.js +0 -1
- package/dist/components/p-HVN8BNWN.js +0 -1
- package/dist/components/p-x0W2_FAX.js +0 -1
|
@@ -66,6 +66,11 @@ export declare class StructureChart {
|
|
|
66
66
|
private rowCount;
|
|
67
67
|
/** Text of the first query that failed since the source was set. The component reports it as ERR_sql. */
|
|
68
68
|
private queryError;
|
|
69
|
+
private sums;
|
|
70
|
+
private sumTitle;
|
|
71
|
+
private scenarioLabelTop;
|
|
72
|
+
private referenceLine;
|
|
73
|
+
private italicCategories;
|
|
69
74
|
constructor(ruleSet: VisualisationRuleSet, db: AlaSQLDatabase, tableName: string, config: StructureChartComponentConfig, styles: StructureChartStyle);
|
|
70
75
|
private updatePosition;
|
|
71
76
|
private createElementPosition;
|
|
@@ -186,6 +191,8 @@ export declare class StructureChart {
|
|
|
186
191
|
private cleanSVGforRedraw;
|
|
187
192
|
private drawAxisAndLabels;
|
|
188
193
|
private drawScenarios;
|
|
194
|
+
/** The value of a sum row of a chart with plain bars or variances: a bold number at the axis, no bar. */
|
|
195
|
+
private drawSumValue;
|
|
189
196
|
private drawVarianceScenario;
|
|
190
197
|
/** Restore the original `scenarios` prop order for stacked segments (IBCS sort reorders the slots). */
|
|
191
198
|
private sortSegmentsByPropOrder;
|
|
@@ -212,6 +219,44 @@ export declare class StructureChart {
|
|
|
212
219
|
* at the stack dimension level and attach stackSegments to each dataModel row.
|
|
213
220
|
*/
|
|
214
221
|
private populateDimensionStackSegments;
|
|
222
|
+
/** A sum row that is printed as numbers: every stack but a 100 % stack, where it is a bar of shares. */
|
|
223
|
+
private isTextSum;
|
|
224
|
+
private isItalic;
|
|
225
|
+
private hasPercentMark;
|
|
226
|
+
/**
|
|
227
|
+
* Adds the sum rows: one below the rows of each `rowGroup`, which keeps the rows of a
|
|
228
|
+
* group together, and one over all rows at the end.
|
|
229
|
+
*/
|
|
230
|
+
private addSumRows;
|
|
231
|
+
/** The `rowGroup` of each row of a chart at level `category`, with the place of the group. */
|
|
232
|
+
private rowGroups;
|
|
233
|
+
/** Rows of different height (`stack.thickness: total`) and the room below a group. Null: all rows are equal. */
|
|
234
|
+
private rowLayout;
|
|
235
|
+
/**
|
|
236
|
+
* The height of each row in units of a normal row: by its total, with the same height
|
|
237
|
+
* over all. A row is at least one line of text high, and the others give up that room.
|
|
238
|
+
* Null stands for a row that keeps the normal height.
|
|
239
|
+
*/
|
|
240
|
+
private rowWeights;
|
|
241
|
+
private boldWidth;
|
|
242
|
+
private sumText;
|
|
243
|
+
/**
|
|
244
|
+
* Where the numbers of the text sum rows stand, as distance from the axis: one column
|
|
245
|
+
* per series, the same for all sum rows, then the total. Null without such a row.
|
|
246
|
+
*/
|
|
247
|
+
private sumColumns;
|
|
248
|
+
/** A sum row of a stack as numbers: per series a small square in its colour and the sum, then the total. */
|
|
249
|
+
private drawSumText;
|
|
250
|
+
/** How far a sum row reaches right of the axis, in px. */
|
|
251
|
+
private sumRowExtent;
|
|
252
|
+
/** Where the reference line stands, as distance from the axis in px. Null without a line in this chart. */
|
|
253
|
+
private referenceLineOffset;
|
|
254
|
+
/** The room right of the axis that the reference line and its label need. */
|
|
255
|
+
private referenceLineExtent;
|
|
256
|
+
/** The end of a 100 % stack: a line along the bar ends and one `100%` below it. */
|
|
257
|
+
private drawPercentMark;
|
|
258
|
+
/** A line across the bars at one value, with its label above the first bar. In a 100 % stack the value is a percent. */
|
|
259
|
+
private drawReferenceLine;
|
|
215
260
|
hasNoData(): boolean;
|
|
216
261
|
setAvailableWidth(availableWidth: number): void;
|
|
217
262
|
private calculateOverflowConfig;
|
|
@@ -32,6 +32,8 @@ export declare class Label {
|
|
|
32
32
|
private isVarianceLabel;
|
|
33
33
|
private segmentFillColor;
|
|
34
34
|
private maxWidth;
|
|
35
|
+
private bold;
|
|
36
|
+
private italic;
|
|
35
37
|
readonly ID_SCENARIOLABEL: string;
|
|
36
38
|
readonly CSS_CATEGORIES: string;
|
|
37
39
|
private isRelativeLabel;
|
|
@@ -43,6 +45,8 @@ export declare class Label {
|
|
|
43
45
|
setToVarianceLabel(): Label;
|
|
44
46
|
setToRelativeVarianceLabel(): Label;
|
|
45
47
|
setSegmentFill(color: string): Label;
|
|
48
|
+
/** Bold for a sum row, italic for a rest row. */
|
|
49
|
+
setEmphasis(bold: boolean, italic: boolean): Label;
|
|
46
50
|
setMaxWidth(width: number): Label;
|
|
47
51
|
/** The data row this label belongs to. Written on the label group when the label is drawn. */
|
|
48
52
|
setPoint(key: DataPointKey | undefined, part?: DataPointPart): Label;
|
|
@@ -6,6 +6,17 @@ import { SiPrefix } from "../../../../utils/model/SiPrefix";
|
|
|
6
6
|
import { StackMode } from "../../../../utils/constants";
|
|
7
7
|
import { StackLayout, StackSegment } from "../../../../utils/stackLayout";
|
|
8
8
|
import { DataPointKey } from "../../../../utils/layoutState/types";
|
|
9
|
+
/** What a segment prints: its share with a percent sign, its share as a plain number, or its value. */
|
|
10
|
+
export type StackLabel = "share" | "plain-share" | "value";
|
|
11
|
+
/** Options of one segment that only some charts set. */
|
|
12
|
+
export interface StackedBarOptions {
|
|
13
|
+
/** Label of a segment in mode `relative`. Default: `share`. */
|
|
14
|
+
label?: StackLabel;
|
|
15
|
+
/** A 100 % stack prints no total, unless this is set. */
|
|
16
|
+
total?: boolean;
|
|
17
|
+
bold?: boolean;
|
|
18
|
+
italic?: boolean;
|
|
19
|
+
}
|
|
9
20
|
/**
|
|
10
21
|
* Renders a single horizontal stacked bar segment for the structure chart.
|
|
11
22
|
*/
|
|
@@ -21,7 +32,8 @@ export declare class StackedBar {
|
|
|
21
32
|
private readonly stackMode;
|
|
22
33
|
private readonly stack;
|
|
23
34
|
private hasData;
|
|
24
|
-
|
|
35
|
+
private readonly options;
|
|
36
|
+
constructor(position: ElementPositions, styles: StructureChartStyle, dataPoint: DataPoint, index: number, segment: StackSegment, _segmentLabel: string | null, segmentIndex: number, stackMode: StackMode, stack: StackLayout, _isScenarioStack: boolean, parentGroup: G, options?: StackedBarOptions);
|
|
25
37
|
draw(dataFormatDigits?: DataFormatDigits, measureScale?: SiPrefix): void;
|
|
26
38
|
drawTotalLabel(dataFormatDigits?: DataFormatDigits, measureScale?: SiPrefix, key?: DataPointKey): void;
|
|
27
39
|
}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { Box, DataPoint, Point2D, ScaleFactorsStructureChart } from "../model";
|
|
2
2
|
import { Padding } from "./Padding";
|
|
3
|
+
/** Rows that are not all one `categoryWidth` high: start and height of each, in units of `categoryWidth`. */
|
|
4
|
+
export type RowLayout = {
|
|
5
|
+
start: number[];
|
|
6
|
+
weight: number[];
|
|
7
|
+
total: number;
|
|
8
|
+
};
|
|
3
9
|
/**
|
|
4
10
|
* Spatial layout engine for the structure chart (horizontal bars).
|
|
5
11
|
*
|
|
@@ -28,9 +34,15 @@ export declare class ElementPositions {
|
|
|
28
34
|
private leftSideLabelLength;
|
|
29
35
|
private topSideLabelHeight;
|
|
30
36
|
private hasStackedHeaders;
|
|
31
|
-
|
|
37
|
+
/** Per row, in units of `categoryWidth`: where it starts below the axis top, and its height. */
|
|
38
|
+
private rows;
|
|
39
|
+
constructor(padding: Padding, scaleFactors: ScaleFactorsStructureChart, fontSize: number, numberOfColumns: number, leftSideLengthSync: number, titleLength: number, leftSideWidth: number, categoryWidth: number, hasStackedHeaders?: boolean, rows?: RowLayout | null);
|
|
32
40
|
getBarPositionX(): number;
|
|
33
41
|
getBarCenterPositionY(index: number): number;
|
|
42
|
+
/** Upper edge of the room of a row. */
|
|
43
|
+
getRowTopPositionY(index: number): number;
|
|
44
|
+
/** Thickness of the bar of a row. Rows have one thickness unless the chart sets a row layout. */
|
|
45
|
+
getBarWidthAt(index: number): number;
|
|
34
46
|
getBarPositionY(index: number, isPrimaryMarker: boolean): number;
|
|
35
47
|
getCategoryPositionX(isPositive: boolean): number;
|
|
36
48
|
getAxisTitlePositionX(): number;
|
package/dist/types/components/bn-chart-structure/utils/model/StructureChartComponentConfig.d.ts
CHANGED
|
@@ -11,6 +11,21 @@ export interface StackConfigParsed {
|
|
|
11
11
|
by: StackBy;
|
|
12
12
|
mode: StackMode;
|
|
13
13
|
order: StackOrder;
|
|
14
|
+
/** Mode `relative`: plain shares and one `100%` mark. */
|
|
15
|
+
percentMark?: boolean;
|
|
16
|
+
/** Mode `relative`: `value` prints the value of a segment and the total of the bar. Default: `share`. */
|
|
17
|
+
labels?: "share" | "value";
|
|
18
|
+
/** `total`: the thickness of a bar follows the total of its row. Default: `equal`. */
|
|
19
|
+
thickness?: "equal" | "total";
|
|
20
|
+
/** A name above the totals of the bars, on the line of the series names. */
|
|
21
|
+
totalTitle?: string;
|
|
22
|
+
}
|
|
23
|
+
/** Which sum rows a chart adds: one per `rowGroup`, one over all rows, or both. */
|
|
24
|
+
export type SumRows = "none" | "groups" | "total" | "all";
|
|
25
|
+
/** A line across the bars at one value of the axis. */
|
|
26
|
+
export interface ReferenceLine {
|
|
27
|
+
value: number;
|
|
28
|
+
label?: string;
|
|
14
29
|
}
|
|
15
30
|
/**
|
|
16
31
|
* Configuration for an IBCS structural (categorical) bar chart component.
|
|
@@ -42,6 +57,14 @@ export declare class StructureChartComponentConfig {
|
|
|
42
57
|
showMeasureScale: boolean;
|
|
43
58
|
dataFormatDigits: DataFormatDigits;
|
|
44
59
|
stackConfig: StackConfigParsed | null;
|
|
60
|
+
sums: SumRows;
|
|
61
|
+
/** Label of the row over all rows. Empty: the `SUM_TOTAL` text. */
|
|
62
|
+
sumTitle: string;
|
|
63
|
+
/** The name of the scenario stands above the first bar and not below the last one. */
|
|
64
|
+
scenarioLabelTop: boolean;
|
|
65
|
+
referenceLine: ReferenceLine | null;
|
|
66
|
+
/** Values of the level column whose row is printed in italics. */
|
|
67
|
+
italicCategories: string[];
|
|
45
68
|
constructor(data: StructureChartDataRow[], scenarios: string[]);
|
|
46
69
|
}
|
|
47
70
|
/**
|
|
@@ -27,6 +27,17 @@ export declare class Context {
|
|
|
27
27
|
* The event has no detail: call `getNotation()` again.
|
|
28
28
|
*/
|
|
29
29
|
bnNotationChange: EventEmitter<void>;
|
|
30
|
+
/**
|
|
31
|
+
* Group separator of every number in the document, in place of the one of
|
|
32
|
+
* the locale: `thin-space`, `space`, `none`, or the separator itself. It
|
|
33
|
+
* holds for the whole page, also for a context that does not set it.
|
|
34
|
+
*
|
|
35
|
+
* @default "" (the separator of the locale)
|
|
36
|
+
* @example group-separator="thin-space"
|
|
37
|
+
*/
|
|
38
|
+
groupSeparator: string;
|
|
39
|
+
private setsGroupSeparator;
|
|
40
|
+
setGroupSeparator(newValue: string): void;
|
|
30
41
|
setLocale(newValue: string): void;
|
|
31
42
|
/** The page numbers this context wrote. A number that is not in here was set by the author and is left alone. */
|
|
32
43
|
private readonly assignedPageNumbers;
|
|
@@ -179,6 +179,16 @@ export declare class LayoutCard {
|
|
|
179
179
|
* card-custom-template='"a a" "b c"'></bn-layout-card>
|
|
180
180
|
*/
|
|
181
181
|
cardCustomTemplate: string;
|
|
182
|
+
/**
|
|
183
|
+
* Puts the child after the last slot of the template on top of the grid,
|
|
184
|
+
* in the cells this CSS `grid-area` names by line numbers:
|
|
185
|
+
* `row-start / column-start / row-end / column-end`. Use it for a text or a
|
|
186
|
+
* comment list in the free part of a chart.
|
|
187
|
+
*
|
|
188
|
+
* @default "" (no overlay)
|
|
189
|
+
* @example card-overlay-area="4 / 3 / 7 / 5"
|
|
190
|
+
*/
|
|
191
|
+
cardOverlayArea: string;
|
|
182
192
|
/**
|
|
183
193
|
* Gap between grid cells in pixels.
|
|
184
194
|
*/
|
|
@@ -206,6 +216,8 @@ export declare class LayoutCard {
|
|
|
206
216
|
private getLayoutStyle;
|
|
207
217
|
private createDivAreaStyles;
|
|
208
218
|
private getSlots;
|
|
219
|
+
/** The overlay area when it is four line numbers inside the grid of the layout, else nothing. */
|
|
220
|
+
private overlayArea;
|
|
209
221
|
private extractSlotNames;
|
|
210
222
|
private getTemplatePattern;
|
|
211
223
|
componentWillRender(): void;
|
|
@@ -18,7 +18,7 @@ import { BulletChartStyle } from "./components/bn-chart-bullet/utils/model/Bulle
|
|
|
18
18
|
import { AutoScalingReport } from "./utils/scaling";
|
|
19
19
|
import { StructureChartStyle } from "./components/bn-chart-structure/utils/model/styles/StructureChartStyle";
|
|
20
20
|
import { DataFormatDigits } from "./utils/model/DataFormatDigits";
|
|
21
|
-
import { StackConfigParsed } from "./components/bn-chart-structure/utils/model/StructureChartComponentConfig";
|
|
21
|
+
import { ReferenceLine, StackConfigParsed } from "./components/bn-chart-structure/utils/model/StructureChartComponentConfig";
|
|
22
22
|
import { ParentDimensions } from "./utils/parentDimensions";
|
|
23
23
|
import { TimeChartStyle } from "./components/bn-chart-time/utils/model/styles/TimeChartStyle";
|
|
24
24
|
import { DateDistance } from "./utils/DateStringFactory";
|
|
@@ -48,7 +48,7 @@ export { BulletChartStyle } from "./components/bn-chart-bullet/utils/model/Bulle
|
|
|
48
48
|
export { AutoScalingReport } from "./utils/scaling";
|
|
49
49
|
export { StructureChartStyle } from "./components/bn-chart-structure/utils/model/styles/StructureChartStyle";
|
|
50
50
|
export { DataFormatDigits } from "./utils/model/DataFormatDigits";
|
|
51
|
-
export { StackConfigParsed } from "./components/bn-chart-structure/utils/model/StructureChartComponentConfig";
|
|
51
|
+
export { ReferenceLine, StackConfigParsed } from "./components/bn-chart-structure/utils/model/StructureChartComponentConfig";
|
|
52
52
|
export { ParentDimensions } from "./utils/parentDimensions";
|
|
53
53
|
export { TimeChartStyle } from "./components/bn-chart-time/utils/model/styles/TimeChartStyle";
|
|
54
54
|
export { DateDistance } from "./utils/DateStringFactory";
|
|
@@ -718,6 +718,12 @@ export namespace Components {
|
|
|
718
718
|
* Namespace of the translations to use (the `namespace` of a `<bn-internationalization>`). Without it the component takes the `i18n-namespace` of the nearest ancestor that has one, then the built-in texts.
|
|
719
719
|
*/
|
|
720
720
|
"i18nNamespace"?: string;
|
|
721
|
+
/**
|
|
722
|
+
* Rows that are printed in italics, as a JSON array of values of the level column, for example the rest rows.
|
|
723
|
+
* @default "" (none)
|
|
724
|
+
* @example italic-categories='["Rest of world"]'
|
|
725
|
+
*/
|
|
726
|
+
"italicCategories": string;
|
|
721
727
|
/**
|
|
722
728
|
* Aggregation level that determines which hierarchy dimension each bar represents. | Value | Bars represent | |--------------------|---------------------------| | `"rowGroup"` | Row groups | | `"rowGroupIndex"` | Row groups (dataset order)| | `"category"` | Categories | | `"categoryIndex"` | Categories (dataset order)| | `"subCategory"` | Sub-categories | | `"subCategoryIndex"` | Sub-categories (dataset order)| | `"auto"` | Auto-detect from dataset metadata (no warning) | | not set / `""` | Auto-detect with `AUTO_level` warning | Index variants preserve the original dataset order instead of sorting alphabetically. When `stack.by` is `"dimensions"`, the chart automatically stacks by the next-lower level (e.g. level `"rowGroup"` stacks by category).
|
|
723
729
|
* @example level="category"
|
|
@@ -758,6 +764,12 @@ export namespace Components {
|
|
|
758
764
|
* @example percentage-scaling="pct-scale"
|
|
759
765
|
*/
|
|
760
766
|
"percentageScaling": string | number;
|
|
767
|
+
/**
|
|
768
|
+
* A line across the bars at one value of the axis, as a JSON string: `value` and an optional `label`. In a 100 % stack the value is a percent.
|
|
769
|
+
* @default "" (no line)
|
|
770
|
+
* @example reference-line='{"value":50,"label":"50%"}'
|
|
771
|
+
*/
|
|
772
|
+
"referenceLine": string;
|
|
761
773
|
/**
|
|
762
774
|
* Name of a registered IBCS rule set (see `bn-ruleset`) used for scenario ordering, look and names. Supports `"inherited-closest"` / `"inherited-page"` to take over the value from an ancestor `bn-layout-card` / `bn-layout-page`.
|
|
763
775
|
*/
|
|
@@ -766,6 +778,12 @@ export namespace Components {
|
|
|
766
778
|
* Controls proportional scaling of the chart to fit the available parent height. | Value | Behavior | |---------------------|-----------------------------------------------------------------------------------| | not set / `""` | Auto-scale to fit parent height; emit `AUTO_scale` warning with the applied factor | | `"none"` | No scaling (render at base font size regardless of available space) | | `"auto"` | Auto-scale to fit parent height silently (no warning) | | `"0.5"`, `"1.2"`, … | Fixed factor - apply `baseFontSize × factor` |
|
|
767
779
|
*/
|
|
768
780
|
"scale"?: string;
|
|
781
|
+
/**
|
|
782
|
+
* Where the name of the scenario of a chart with plain bars stands: `bottom` below the last bar, `top` above the first one.
|
|
783
|
+
* @default "bottom"
|
|
784
|
+
* @example scenario-label-position="top"
|
|
785
|
+
*/
|
|
786
|
+
"scenarioLabelPosition": "bottom" | "top";
|
|
769
787
|
/**
|
|
770
788
|
* Comma-separated list of scenario columns to display as bars. Up to 4 scenarios are supported; additional values are ignored. Valid scenario names: `ac1`-`ac4`, `fc1`-`fc4`, `pp1`-`pp4`, `pl1`-`pl4`. | Value | Behavior | |---------------|-------------------------------------------------------------| | `"ac1,fc1"` | Show the listed scenarios | | `"auto"` | Auto-detect from dataset metadata (no warning) | | not set / `""` | Auto-detect from dataset metadata (emits `AUTO_scenarios` warning) | | `"none"` | Draw no scenario: the chart shows only its variances, the first one carries the categories |
|
|
771
789
|
* @example scenarios="ac1,pp1,pl1"
|
|
@@ -794,6 +812,18 @@ export namespace Components {
|
|
|
794
812
|
* @example stack='{"by":"dimensions","mode":"relative"}'
|
|
795
813
|
*/
|
|
796
814
|
"stack": string;
|
|
815
|
+
/**
|
|
816
|
+
* Label of the sum row over all rows.
|
|
817
|
+
* @default "" (the `SUM_TOTAL` text)
|
|
818
|
+
* @example sum-title="World"
|
|
819
|
+
*/
|
|
820
|
+
"sumTitle": string;
|
|
821
|
+
/**
|
|
822
|
+
* Sum rows. `groups` adds a row below the rows of each `rowGroup` (level `category`), `total` a row over all rows, `all` both. A sum row has no bar: it prints the sum in bold, in a stack one number per series with a small square in the colour of the series. In a 100 % stack it is a bar of shares. A sum row does not count for the scale.
|
|
823
|
+
* @default "none"
|
|
824
|
+
* @example sums="all"
|
|
825
|
+
*/
|
|
826
|
+
"sums": "none" | "groups" | "total" | "all";
|
|
797
827
|
/**
|
|
798
828
|
* Data units displayed per 1 em of bar length (horizontal bars) - map-scale semantics: a larger value means smaller bars. | Value | Behavior | |--------------------|-------------------------------------------------------------| | `"auto"` | Auto-fit bars to fill the available container width | | not set / invalid | Same as auto, but emits `AUTO_unitScaling` warning | | `"250000"`, `"1M"` | Units per em; optional SI suffix `k`/`K`/`M`/`G`/`T` | | group name | References a `<bn-scaling-group>` for synchronized scaling | When using a custom value that causes the chart to exceed its container, an `ERR_overflow` error is emitted.
|
|
799
829
|
* @example unit-scaling="auto"
|
|
@@ -838,6 +868,10 @@ export namespace Components {
|
|
|
838
868
|
* @default new Map()
|
|
839
869
|
*/
|
|
840
870
|
"i18n": Map<string, string>;
|
|
871
|
+
/**
|
|
872
|
+
* @default []
|
|
873
|
+
*/
|
|
874
|
+
"italicCategories": string[];
|
|
841
875
|
/**
|
|
842
876
|
* @default AggregationLevel.CATEGORY
|
|
843
877
|
*/
|
|
@@ -870,11 +904,19 @@ export namespace Components {
|
|
|
870
904
|
* @default 10
|
|
871
905
|
*/
|
|
872
906
|
"pixelPerUnit": number;
|
|
907
|
+
/**
|
|
908
|
+
* @default null
|
|
909
|
+
*/
|
|
910
|
+
"referenceLine": ReferenceLine | null;
|
|
873
911
|
/**
|
|
874
912
|
* Internal wrapper channel: called with the auto-fitted values (px for one data unit / px per 1.0 fraction) whenever one of them was auto-resolved, so the outer `bn-chart-structure` can surface them in its AUTO_* warnings. Not for end users.
|
|
875
913
|
*/
|
|
876
914
|
"reportAutoScaling"?: (report: AutoScalingReport) => void;
|
|
877
915
|
"ruleSetConfig"?: RuleSetConfig;
|
|
916
|
+
/**
|
|
917
|
+
* @default false
|
|
918
|
+
*/
|
|
919
|
+
"scenarioLabelTop": boolean;
|
|
878
920
|
/**
|
|
879
921
|
* @default []
|
|
880
922
|
*/
|
|
@@ -888,6 +930,14 @@ export namespace Components {
|
|
|
888
930
|
*/
|
|
889
931
|
"stackConfig": StackConfigParsed | null;
|
|
890
932
|
"styles": StructureChartStyle | undefined;
|
|
933
|
+
/**
|
|
934
|
+
* @default ""
|
|
935
|
+
*/
|
|
936
|
+
"sumTitle": string;
|
|
937
|
+
/**
|
|
938
|
+
* @default "none"
|
|
939
|
+
*/
|
|
940
|
+
"sums": string;
|
|
891
941
|
/**
|
|
892
942
|
* Name of the dataset (table or view in the shared alasql database).
|
|
893
943
|
* @default ""
|
|
@@ -1204,6 +1254,12 @@ export namespace Components {
|
|
|
1204
1254
|
* @param styleName - name of a `<bn-component-style>`, like the `selected-style` of a chart
|
|
1205
1255
|
*/
|
|
1206
1256
|
"getNotation": (styleName?: string) => Promise<Notation>;
|
|
1257
|
+
/**
|
|
1258
|
+
* Group separator of every number in the document, in place of the one of the locale: `thin-space`, `space`, `none`, or the separator itself. It holds for the whole page, also for a context that does not set it.
|
|
1259
|
+
* @default "" (the separator of the locale)
|
|
1260
|
+
* @example group-separator="thin-space"
|
|
1261
|
+
*/
|
|
1262
|
+
"groupSeparator": string;
|
|
1207
1263
|
/**
|
|
1208
1264
|
* Default i18n namespace for every component inside this context. Resolved at runtime from the `i18n-namespace` attribute by the nearest ancestor lookup in `withTranslation`; a namespace set on a page, card, tree, grid, or the component itself wins. Declared so the attribute is part of the typed public API rather than a bare DOM attribute.
|
|
1209
1265
|
*/
|
|
@@ -1453,6 +1509,12 @@ export namespace Components {
|
|
|
1453
1509
|
| "2-over-1"
|
|
1454
1510
|
| "3-over-1"
|
|
1455
1511
|
| "custom-template";
|
|
1512
|
+
/**
|
|
1513
|
+
* Puts the child after the last slot of the template on top of the grid, in the cells this CSS `grid-area` names by line numbers: `row-start / column-start / row-end / column-end`. Use it for a text or a comment list in the free part of a chart.
|
|
1514
|
+
* @default "" (no overlay)
|
|
1515
|
+
* @example card-overlay-area="4 / 3 / 7 / 5"
|
|
1516
|
+
*/
|
|
1517
|
+
"cardOverlayArea": string;
|
|
1456
1518
|
/**
|
|
1457
1519
|
* Whether to display a visible border around the card.
|
|
1458
1520
|
* @default true
|
|
@@ -3137,6 +3199,12 @@ declare namespace LocalJSX {
|
|
|
3137
3199
|
* Namespace of the translations to use (the `namespace` of a `<bn-internationalization>`). Without it the component takes the `i18n-namespace` of the nearest ancestor that has one, then the built-in texts.
|
|
3138
3200
|
*/
|
|
3139
3201
|
"i18nNamespace"?: string;
|
|
3202
|
+
/**
|
|
3203
|
+
* Rows that are printed in italics, as a JSON array of values of the level column, for example the rest rows.
|
|
3204
|
+
* @default "" (none)
|
|
3205
|
+
* @example italic-categories='["Rest of world"]'
|
|
3206
|
+
*/
|
|
3207
|
+
"italicCategories"?: string;
|
|
3140
3208
|
/**
|
|
3141
3209
|
* Aggregation level that determines which hierarchy dimension each bar represents. | Value | Bars represent | |--------------------|---------------------------| | `"rowGroup"` | Row groups | | `"rowGroupIndex"` | Row groups (dataset order)| | `"category"` | Categories | | `"categoryIndex"` | Categories (dataset order)| | `"subCategory"` | Sub-categories | | `"subCategoryIndex"` | Sub-categories (dataset order)| | `"auto"` | Auto-detect from dataset metadata (no warning) | | not set / `""` | Auto-detect with `AUTO_level` warning | Index variants preserve the original dataset order instead of sorting alphabetically. When `stack.by` is `"dimensions"`, the chart automatically stacks by the next-lower level (e.g. level `"rowGroup"` stacks by category).
|
|
3142
3210
|
* @example level="category"
|
|
@@ -3177,6 +3245,12 @@ declare namespace LocalJSX {
|
|
|
3177
3245
|
* @example percentage-scaling="pct-scale"
|
|
3178
3246
|
*/
|
|
3179
3247
|
"percentageScaling": string | number;
|
|
3248
|
+
/**
|
|
3249
|
+
* A line across the bars at one value of the axis, as a JSON string: `value` and an optional `label`. In a 100 % stack the value is a percent.
|
|
3250
|
+
* @default "" (no line)
|
|
3251
|
+
* @example reference-line='{"value":50,"label":"50%"}'
|
|
3252
|
+
*/
|
|
3253
|
+
"referenceLine"?: string;
|
|
3180
3254
|
/**
|
|
3181
3255
|
* Name of a registered IBCS rule set (see `bn-ruleset`) used for scenario ordering, look and names. Supports `"inherited-closest"` / `"inherited-page"` to take over the value from an ancestor `bn-layout-card` / `bn-layout-page`.
|
|
3182
3256
|
*/
|
|
@@ -3185,6 +3259,12 @@ declare namespace LocalJSX {
|
|
|
3185
3259
|
* Controls proportional scaling of the chart to fit the available parent height. | Value | Behavior | |---------------------|-----------------------------------------------------------------------------------| | not set / `""` | Auto-scale to fit parent height; emit `AUTO_scale` warning with the applied factor | | `"none"` | No scaling (render at base font size regardless of available space) | | `"auto"` | Auto-scale to fit parent height silently (no warning) | | `"0.5"`, `"1.2"`, … | Fixed factor - apply `baseFontSize × factor` |
|
|
3186
3260
|
*/
|
|
3187
3261
|
"scale"?: string;
|
|
3262
|
+
/**
|
|
3263
|
+
* Where the name of the scenario of a chart with plain bars stands: `bottom` below the last bar, `top` above the first one.
|
|
3264
|
+
* @default "bottom"
|
|
3265
|
+
* @example scenario-label-position="top"
|
|
3266
|
+
*/
|
|
3267
|
+
"scenarioLabelPosition"?: "bottom" | "top";
|
|
3188
3268
|
/**
|
|
3189
3269
|
* Comma-separated list of scenario columns to display as bars. Up to 4 scenarios are supported; additional values are ignored. Valid scenario names: `ac1`-`ac4`, `fc1`-`fc4`, `pp1`-`pp4`, `pl1`-`pl4`. | Value | Behavior | |---------------|-------------------------------------------------------------| | `"ac1,fc1"` | Show the listed scenarios | | `"auto"` | Auto-detect from dataset metadata (no warning) | | not set / `""` | Auto-detect from dataset metadata (emits `AUTO_scenarios` warning) | | `"none"` | Draw no scenario: the chart shows only its variances, the first one carries the categories |
|
|
3190
3270
|
* @example scenarios="ac1,pp1,pl1"
|
|
@@ -3213,6 +3293,18 @@ declare namespace LocalJSX {
|
|
|
3213
3293
|
* @example stack='{"by":"dimensions","mode":"relative"}'
|
|
3214
3294
|
*/
|
|
3215
3295
|
"stack"?: string;
|
|
3296
|
+
/**
|
|
3297
|
+
* Label of the sum row over all rows.
|
|
3298
|
+
* @default "" (the `SUM_TOTAL` text)
|
|
3299
|
+
* @example sum-title="World"
|
|
3300
|
+
*/
|
|
3301
|
+
"sumTitle"?: string;
|
|
3302
|
+
/**
|
|
3303
|
+
* Sum rows. `groups` adds a row below the rows of each `rowGroup` (level `category`), `total` a row over all rows, `all` both. A sum row has no bar: it prints the sum in bold, in a stack one number per series with a small square in the colour of the series. In a 100 % stack it is a bar of shares. A sum row does not count for the scale.
|
|
3304
|
+
* @default "none"
|
|
3305
|
+
* @example sums="all"
|
|
3306
|
+
*/
|
|
3307
|
+
"sums"?: "none" | "groups" | "total" | "all";
|
|
3216
3308
|
/**
|
|
3217
3309
|
* Data units displayed per 1 em of bar length (horizontal bars) - map-scale semantics: a larger value means smaller bars. | Value | Behavior | |--------------------|-------------------------------------------------------------| | `"auto"` | Auto-fit bars to fill the available container width | | not set / invalid | Same as auto, but emits `AUTO_unitScaling` warning | | `"250000"`, `"1M"` | Units per em; optional SI suffix `k`/`K`/`M`/`G`/`T` | | group name | References a `<bn-scaling-group>` for synchronized scaling | When using a custom value that causes the chart to exceed its container, an `ERR_overflow` error is emitted.
|
|
3218
3310
|
* @example unit-scaling="auto"
|
|
@@ -3391,6 +3483,12 @@ declare namespace LocalJSX {
|
|
|
3391
3483
|
"name"?: string;
|
|
3392
3484
|
}
|
|
3393
3485
|
interface BnContext {
|
|
3486
|
+
/**
|
|
3487
|
+
* Group separator of every number in the document, in place of the one of the locale: `thin-space`, `space`, `none`, or the separator itself. It holds for the whole page, also for a context that does not set it.
|
|
3488
|
+
* @default "" (the separator of the locale)
|
|
3489
|
+
* @example group-separator="thin-space"
|
|
3490
|
+
*/
|
|
3491
|
+
"groupSeparator"?: string;
|
|
3394
3492
|
/**
|
|
3395
3493
|
* Default i18n namespace for every component inside this context. Resolved at runtime from the `i18n-namespace` attribute by the nearest ancestor lookup in `withTranslation`; a namespace set on a page, card, tree, grid, or the component itself wins. Declared so the attribute is part of the typed public API rather than a bare DOM attribute.
|
|
3396
3494
|
*/
|
|
@@ -3639,6 +3737,12 @@ declare namespace LocalJSX {
|
|
|
3639
3737
|
| "2-over-1"
|
|
3640
3738
|
| "3-over-1"
|
|
3641
3739
|
| "custom-template";
|
|
3740
|
+
/**
|
|
3741
|
+
* Puts the child after the last slot of the template on top of the grid, in the cells this CSS `grid-area` names by line numbers: `row-start / column-start / row-end / column-end`. Use it for a text or a comment list in the free part of a chart.
|
|
3742
|
+
* @default "" (no overlay)
|
|
3743
|
+
* @example card-overlay-area="4 / 3 / 7 / 5"
|
|
3744
|
+
*/
|
|
3745
|
+
"cardOverlayArea"?: string;
|
|
3642
3746
|
/**
|
|
3643
3747
|
* Whether to display a visible border around the card.
|
|
3644
3748
|
* @default true
|
|
@@ -4366,6 +4470,11 @@ declare namespace LocalJSX {
|
|
|
4366
4470
|
"measureUnit": string;
|
|
4367
4471
|
"dataFormatDigitsDecimal": number;
|
|
4368
4472
|
"dataFormatDigitsPercent": number;
|
|
4473
|
+
"sums": "none" | "groups" | "total" | "all";
|
|
4474
|
+
"sumTitle": string;
|
|
4475
|
+
"scenarioLabelPosition": "bottom" | "top";
|
|
4476
|
+
"referenceLine": string;
|
|
4477
|
+
"italicCategories": string;
|
|
4369
4478
|
"stack": string;
|
|
4370
4479
|
"scale": string;
|
|
4371
4480
|
}
|
|
@@ -4414,6 +4523,7 @@ declare namespace LocalJSX {
|
|
|
4414
4523
|
"locale": string;
|
|
4415
4524
|
"i18nNamespace": string;
|
|
4416
4525
|
"renderOrientation": "landscape" | "portrait";
|
|
4526
|
+
"groupSeparator": string;
|
|
4417
4527
|
}
|
|
4418
4528
|
interface BnDatasetAttributes {
|
|
4419
4529
|
"name": string;
|
|
@@ -4490,6 +4600,7 @@ declare namespace LocalJSX {
|
|
|
4490
4600
|
| "3-over-1"
|
|
4491
4601
|
| "custom-template";
|
|
4492
4602
|
"cardCustomTemplate": string;
|
|
4603
|
+
"cardOverlayArea": string;
|
|
4493
4604
|
"cardGridGap": string;
|
|
4494
4605
|
"cardFitToContent": boolean;
|
|
4495
4606
|
"cardShowBorder": boolean;
|
package/dist/types/schemas.d.ts
CHANGED
|
@@ -45,6 +45,18 @@ export interface Stack {
|
|
|
45
45
|
mode?: StackMode;
|
|
46
46
|
/** Order of the segments in a stack. Default: `dataset`. */
|
|
47
47
|
order?: StackOrder;
|
|
48
|
+
/** `bn-chart-time`: `scenario` gives a segment the look of its scenario. Default: `none`. */
|
|
49
|
+
notation?: "none" | "scenario";
|
|
50
|
+
/** `bn-chart-time`: where the series names stand. Default: `left`. */
|
|
51
|
+
legend?: "left" | "right" | "both" | "none";
|
|
52
|
+
/** Mode `relative`: plain shares and one `100%` mark. Default: `false`. */
|
|
53
|
+
percentMark?: boolean;
|
|
54
|
+
/** `bn-chart-structure`, mode `relative`: `value` prints the value of a segment and the total of the bar. Default: `share`. */
|
|
55
|
+
labels?: "share" | "value";
|
|
56
|
+
/** `bn-chart-structure`: `total` makes a bar as thick as the total of its row is large. Default: `equal`. */
|
|
57
|
+
thickness?: "equal" | "total";
|
|
58
|
+
/** `bn-chart-structure`: a name above the totals of the bars. */
|
|
59
|
+
totalTitle?: string;
|
|
48
60
|
}
|
|
49
61
|
/** The `x` and `y` attribute of `bn-chart-scatter` and `bn-chart-bubble`, in its JSON form. */
|
|
50
62
|
export type Axis = AxisConfig;
|
|
@@ -14,7 +14,7 @@ export interface AnnotationPoint {
|
|
|
14
14
|
export interface AnnotationLayerItem {
|
|
15
15
|
/** Number on the mark. Absent when the annotation has none. */
|
|
16
16
|
label?: string;
|
|
17
|
-
mark?: "marker" | "frame" | "arrow" | "difference";
|
|
17
|
+
mark?: "marker" | "frame" | "arrow" | "difference" | "pointer" | "bracket";
|
|
18
18
|
/** Named colour, see {@link annotationColor}. */
|
|
19
19
|
color?: string;
|
|
20
20
|
/** `data-bino-annotation-target` of the slot that holds the component. */
|
|
@@ -5,6 +5,11 @@ import { BinoChartSyles } from "./model";
|
|
|
5
5
|
export declare class Formatter {
|
|
6
6
|
/** One formatter per locale, style and digits: building one per cell is slow. */
|
|
7
7
|
private static formats;
|
|
8
|
+
/**
|
|
9
|
+
* Replaces the group separator of the locale in every number, for example by a thin
|
|
10
|
+
* space. Null: the separator of the locale. One setting for the page: `bn-context` sets it.
|
|
11
|
+
*/
|
|
12
|
+
static groupSeparator: string | null;
|
|
8
13
|
/**
|
|
9
14
|
* Formats a number for display in the given locale.
|
|
10
15
|
*
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as t,f as n}from"./p-GstO_GU5.js";import{g as e,r,c as s,D as a}from"./p-7pLJBHT2.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,c=(t,n)=>[...new Set([...t,...n])],u=(t,n)=>{const e=(t=>{return{arrayMergeType:"combine",arrayMerge:(n=t?t.arrayMergeType:"combine","overwrite"===n?o:c),...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])?u([t[r],n[r]],e):n[r]})),t)),{})},l=(t,n)=>u([t._system||{},t._default||{},void 0!==n&&t[n]||{}],{arrayMergeType:"overwrite"}),f=a=>{let i,o,c,u;const f=()=>{u=l(o.componentStyles.state,c)},d=a.connectedCallback;a.connectedCallback=()=>{const s=t(a);o=e(s),u=o.componentStyles.state._system,c=a.selectedStyle,f(),i=o.componentStyles.on("set",(e=>{e!==c&&"_default"!==e||(c=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!==c&&(c=a.selectedStyle,f()),t(u))};var d,h,m,y,p,b,v,g;!function(t){t.ALL="all",t.META="meta"}(d||(d={})),function(t){t.CURRENCY="currency",t.VOLUME="volume"}(h||(h={})),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"}(m||(m={})),function(t){t.POS="pos",t.NEG="neg",t.NEU="neu",t.OP="op",t.OPINV="opinv"}(y||(y={})),function(t){t.DECIMAL="decimal",t.PERCENT="percent"}(p||(p={})),function(t){t.LIST="list",t.SUM="sum",t.SUMNOTOTAL="sumnototal",t.OPT="opt",t.OPTNOTOTAL="optnototal"}(b||(b={})),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"}(v||(v={})),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"}(g||(g={}));const w={[g.W5]:5,[g.W10]:10,[g.W15]:15,[g.W20]:20,[g.W25]:25,[g.W30]:30,[g.W40]:40,[g.W60]:60,[g.W80]:80,[g.W100]:100};var N,k,S,O,D,T;!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",t.TWO_ROW="two-row"}(k||(k={})),function(t){t.COLUMN="column",t.LINE="line",t.WATERFALL="waterfall"}(S||(S={})),function(t){t.BAR="bar",t.LINE="line",t.AUTO="auto"}(O||(O={})),function(t){t.SCENARIOS="scenarios",t.DIMENSIONS="dimensions"}(D||(D={})),function(t){t.ABSOLUTE="absolute",t.RELATIVE="relative",t.ABSOLUTE_RELATIVE="absolute-relative"}(T||(T={}));const A=100;var M,E,j,$,J,L,F;!function(t){t.ASC="asc",t.DESC="desc",t.DATASET="dataset"}(M||(M={})),function(t){t[t.ALL=-1]="ALL"}(E||(E={})),function(t){t[t.UP_TO_DATE=0]="UP_TO_DATE",t[t.DIRTY=1]="DIRTY"}(j||(j={})),function(t){t.LIST="list",t.SUM="sum",t.SUMNOTOTAL="sumnototal",t.OPT="opt",t.OPTNOTOTAL="optnototal"}($||($={})),function(t){t.BELOW="below",t.ABOVE="above"}(J||(J={})),function(t){t.ASC="asc",t.DESC="desc"}(L||(L={})),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"}(F||(F={}));const _=/^\s*(set|first|last|min|max|avg|sum|lit)\(\s*(.*?)\s*\)\s*$/,I=/^[A-Za-z_][A-Za-z0-9_]*$/,W=["min","max","avg","sum"];class x{constructor(t,n,e,r){this.label=t,this.alias=n,this.fn=e,this.arg=r}get isNumeric(){return W.includes(this.fn)}}function G(t){if("string"!=typeof t)return!1;const n=_.exec(t);if(!n)return!1;const[,e,r]=n;return"lit"===e?r.length>0:I.test(r)}function R(t,n,e){if(!G(e))return null;const[,r,s]=_.exec(e);return new x(t,n,r,s)}var q,z,C,P;!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"}(q||(q={})),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"}(z||(z={}));class U{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),U.LOCALE_DATE_FORMAT[t]||{})),this.dateFormatShortPinned||(this.dateFormatShort=Object.assign(Object.assign({},this._dateFormatShort),U.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 q.DAY:return this.getFormatedDayDate(t);case q.MONTH:return this.getFormatedMonthDate(t);case q.QUARTER:return this.getFormatedQuarterDate(t);case q.WEEK:return this.getFormatedWeekDate(t);case q.HOUR:return this.getFormatedHourDate(t);case q.MINUTE:return this.getFormatedMinuteDate(t);case q.SECOND:return this.getFormatedSecondDate(t);case q.MILLISECOND:return this.getFormatedMilliSecondDate(t);default:return this.getDateString(t,n)}}calculateDistanceType(t,n,e=32){if(null==n)return q.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")?q.DAY:s.diff(r).as("milliseconds")<e?q.MILLISECOND:s.diff(r).as("seconds")<e?q.SECOND:s.diff(r).as("minutes")<e?q.MINUTE:s.diff(r).as("hours")<e?q.HOUR:s.diff(r).as("days")<e?q.DAY:s.diff(r).as("weeks")<e?q.WEEK:s.diff(r).as("months")<e?q.MONTH:s.diff(r).as("quarters")<e?q.QUARTER:q.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!==z.END&&e!==z.YTD)return"";if(null==n&&(z.INTERVAL===e||z.CUM===e||z.END===e||z.YTD===e))return"";const i=t||a.now(),o=n;r===q.AUTO&&(r=this.calculateDistanceType(i,o,s));let c=this.getDateString(i,r),u="",l=z.NONE;return null!=o&&(u=this.getDateString(o,r),l=z.INTERVAL,c===u&&e===z.INTERVAL&&(e=z.NONE),c===u&&e===z.AVG&&(l=z.NONE),z.END!==e&&z.YTD!==e||(c=u),e!==z.INTERVAL&&e!==z.CUM&&e!==z.AVG||(r===q.QUARTER?i.quarter===o.quarter&&i.year===o.year?u=u.replace(" "+o.year,""):i.year===o.year&&(c=c.replace(" "+i.year,"")):r===q.MONTH?i.month===o.month&&i.year===o.year?u=u.replace(" "+o.year,""):i.year===o.year&&(c=c.replace(" "+i.year,"")):r===q.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[e].replace("[LINK]",this.dateLinkFormat[l]).replace("[DATE]",c).replace("[DATE2]",u)}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 q.DAY:return this.isFirstInMonth(t);case q.WEEK:return this.isFirstWeek(t);case q.MONTH:return this.isJanuary(t);case q.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 q.YEAR:n="year";break;case q.MONTH:n="month";break;case q.QUARTER:n="quarter";break;case q.WEEK:n="week";break;case q.DAY:n="day";break;case q.HOUR:n="hour";break;case q.MINUTE:n="minute";break;case q.SECOND:n="second";break;case q.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}}}}U.LOCALE_DATE_FORMAT={en:{week:"'W'WW kkkk",day:"MM/dd/yyyy",fallback:"MM/dd/yyyy"}},U.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 H{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"}(P||(P={}));class K{constructor(t=["category"],n=C.ASC){this.hierarchy=t,this.direction=n}}const Q=[P.ROWGROUP,P.ROWGROUPINDEX,P.CATEGORY,P.CATEGORYINDEX,P.SUBCATEGORY,P.SUBCATEGORYINDEX],Y=/^(?: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 V(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=P[e.toUpperCase()];if(null!=s&&Q.includes(s))return void 0===r?{kind:"dim",column:s}:void 0;if(Y.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 X(t){const n=V(t);if(null!=n)return void 0===n.bucket?n.column:`${n.column}@${n.bucket}`}class tt{constructor(t,n=!1){this.stringAdapter=t,this.allowMeasures=n}adapt(t){var n;const e=H.adaptArray(t.hierarchy,this.stringAdapter),r=C[null===(n=t.direction)||void 0===n?void 0:n.toUpperCase()]||C.ASC;return new K(e.map((t=>(this.allowMeasures?X(t):P[t.toUpperCase()])||P.CATEGORY)),r)}default(){return new K(["category"],C.ASC)}}const nt="n/a";function et(t,n){if(!(Math.abs(n)<=1e-9*Math.abs(t)))return t/Math.abs(n)}const rt=/^(dr|d)((?:ac|pp|fc|pl)[1-4])_((?:ac|pp|fc|pl)[1-4])(?:_(pos|neg|neu|op|opinv))?$/;class st{constructor(t,n,e){this.type=t,this.base=n,this.delta=e}static parse(t){const n=rt.exec(t);return null===n?null:new st(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=et(t-n,n))&&void 0!==e?e:null:t-n}}function at(t){const n=t.trim();if(Object.values(m).includes(n))return{kind:"scenario",slot:n};const e=st.parse(n);return null!==e?{kind:"variance",measure:e}:null}function it(t){return t.replace(/\d+$/,"")}function ot(t){return t.replace(/^[a-z]+/,"")}function ct(t){var n;return"dr"===(null===(n=st.parse(t.trim()))||void 0===n?void 0:n.type)}function ut(t){if(!ct(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 lt(t){return null==t||""===t||"null"===t}function ft(t){return"string"==typeof t&&"none"===t.trim().toLowerCase()}function dt(t){return lt(t)||"auto"===t.trim().toLowerCase()?[]:ht((null==t?void 0:t.split(",").filter((t=>!(t.toUpperCase().trim()in m)))).toString())}function ht(t){return lt(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 m)||!(i in m)||!(o in y)}))}function mt(t){return lt(t)?[]:ht(t.split(",").filter((t=>!(t.toUpperCase().trim()in m))).toString())}function yt(t){return lt(t)||"auto"===t.trim().toLowerCase()?[]:ht(t.split(",").filter((t=>!(t.toUpperCase()in P))).toString())}function pt(t){return lt(t)||"auto"===t.trim().toLowerCase()?[]:t.split(",").filter((t=>void 0===V(t)))}function bt(t){return!lt(t)&&Number.isInteger(Number(t))}function vt(t){return!lt(t)&&!Number.isNaN(Number(t))}function gt(t){return!lt(t)&&(null==t?void 0:t.toUpperCase())in C}function wt(t){return"auto"===(null==t?void 0:t.toLowerCase())||(null==t?void 0:t.toUpperCase())in N}function Nt(t){if(lt(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 kt(t){const n=Date.parse(t);return Number.isInteger(n)}function St(t){return(null==t?void 0:t.toUpperCase())in z}function Ot(t){return(null==t?void 0:t.toUpperCase())in q}function Dt(t){return(null==t?void 0:t.toUpperCase().replace("-","_"))in k}function Tt(t){return!lt(t)&&(null==t?void 0:t.toUpperCase())in p}function At(t){return!lt(t)&&(null==t?void 0:t.toUpperCase())in b}function Mt(t){return(null==t?void 0:t.toUpperCase())in J}function Et(t){if(lt(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 jt(t){if(lt(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||!G(t))).map((([t,n])=>`${t}: ${n}`))}catch(t){console.error("validateAttributesJsonStr: failed to parse JSON",t)}return["Invalid JSON structure"]}function $t(t){if(lt(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 Jt(t){return(null==t?void 0:t.trim().toUpperCase())in h}function Lt(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 Ft(t){return(null==t?void 0:t.toUpperCase().trim())in v}function _t(t){return(null==t?void 0:t.toUpperCase().trim())in g}function It(t){if(lt(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 Wt(t){if(lt(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(", ")}`)}if(n.hasOwnProperty("notation")){const t=["none","scenario"];t.includes(n.notation)||e.push(`stack: 'notation' must be one of: ${t.join(", ")}`)}if(n.hasOwnProperty("legend")){const t=["left","right","both","none"];t.includes(n.legend)||e.push(`stack: 'legend' must be one of: ${t.join(", ")}`)}return n.hasOwnProperty("percentMark")&&"boolean"!=typeof n.percentMark&&e.push("stack: 'percentMark' must be true or false"),e}catch(t){return["stack: invalid JSON"]}}function xt(t){return!lt(t)&&null!==at(t)}class Gt{constructor(){this.cache=new Map,this.tag=Gt.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 Rt=new Gt;function qt(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 zt=t=>vt(t)?`${t}px`:t,Ct={width:{className:"w",cssName:"width",attrName:"width",transform:zt},height:{className:"h",cssName:"height",attrName:"height",transform:zt},position:{className:"pst",cssName:"position",attrName:"position"},top:{className:"top",cssName:"top",attrName:"top",transform:zt},right:{className:"rgt",cssName:"right",attrName:"right",transform:zt},bottom:{className:"btm",cssName:"bottom",attrName:"bottom",transform:zt},left:{className:"lft",cssName:"left",attrName:"left",transform:zt},"font-size":{className:"fts",cssName:"font-size",attrName:"font-size",transform:zt},"grid-column":{className:"gdc",cssName:"grid-column",attrName:"grid-column"},"grid-row":{className:"gdr",cssName:"grid-row",attrName:"grid-row"}},Pt=Object.keys(Ct);function Ut(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=qt(n);return`bn-c-${t.className}_${e}`}(t,n);return{className:s,style:Ut(t,s,r)}}const Ht=t=>{const n=new Map;return Pt.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},Kt=new MutationObserver((t=>{for(const e of t){const t=e.target,r=Ht(t);Rt.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)}})),Qt=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=Ht(t);Rt.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(" "),Kt.observe(t,{attributes:!0,attributeFilter:Pt,childList:!1,subtree:!1})})(s),r(e,n)},n.disconnectedCallback=()=>{r(s,n)}};export{p as $,N as A,vt as B,B as C,Ot as D,Dt as E,q as F,k as G,O as H,U as I,l as J,qt as K,mt as L,_t as M,nt as N,C as O,Tt as P,At as Q,A as R,D as S,Et as T,Mt as U,$t as V,pt as W,Jt as X,Ft as Y,It as Z,jt as _,f as a,J as a0,$ as a1,X as a2,d as a3,v as a4,h as a5,R as a6,w as a7,g as a8,F as a9,I as aa,V as ab,m as ac,L as ad,j as ae,Nt as af,kt as ag,St as ah,z as ai,bt as b,xt as c,ot as d,ut as e,ct as f,gt as g,K as h,lt as i,P as j,ft as k,dt as l,u as m,ht as n,wt as o,Lt as p,Wt as q,at as r,it as s,M as t,T as u,yt as v,Qt as w,H as x,tt as y,et as z}
|