@sisense/sdk-ui-vue 2.24.0 → 2.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/dist/ai.cjs +1 -906
  2. package/dist/ai.js +102 -5812
  3. package/dist/index.cjs +1 -1
  4. package/dist/index.js +540 -2923
  5. package/dist/packages/sdk-ui-vue/src/components/widgets/index.d.ts +0 -1
  6. package/dist/packages/sdk-ui-vue/src/composables/index.d.ts +2 -0
  7. package/dist/packages/sdk-ui-vue/src/composables/use-custom-widgets.d.ts +10 -1
  8. package/dist/packages/sdk-ui-vue/src/composables/use-get-data-source-dimensions.d.ts +42 -0
  9. package/dist/packages/sdk-ui-vue/src/sdk-ui-core-exports.d.ts +1 -1
  10. package/dist/translations/de-de.cjs +1 -1
  11. package/dist/translations/de-de.js +2 -446
  12. package/dist/translations/en-us.cjs +1 -1
  13. package/dist/translations/en-us.js +2 -7
  14. package/dist/translations/es-ar.cjs +1 -1
  15. package/dist/translations/es-ar.js +2 -446
  16. package/dist/translations/es-es.cjs +1 -1
  17. package/dist/translations/es-es.js +2 -446
  18. package/dist/translations/fr-fr.cjs +1 -1
  19. package/dist/translations/fr-fr.js +2 -446
  20. package/dist/translations/it-it.cjs +1 -1
  21. package/dist/translations/it-it.js +1 -445
  22. package/dist/translations/ja-jp.cjs +1 -1
  23. package/dist/translations/ja-jp.js +1 -445
  24. package/dist/translations/ko-kr.cjs +1 -1
  25. package/dist/translations/ko-kr.js +1 -445
  26. package/dist/translations/nl-nl.cjs +1 -1
  27. package/dist/translations/nl-nl.js +2 -446
  28. package/dist/translations/pt-br.cjs +1 -1
  29. package/dist/translations/pt-br.js +2 -446
  30. package/dist/translations/ru-ru.cjs +1 -1
  31. package/dist/translations/ru-ru.js +1 -445
  32. package/dist/translations/tr-tr.cjs +1 -1
  33. package/dist/translations/tr-tr.js +2 -446
  34. package/dist/translations/zh-cn.cjs +1 -1
  35. package/dist/translations/zh-cn.js +1 -445
  36. package/dist/use-tracking-04bcc493.js +512 -0
  37. package/dist/use-tracking-a5140061.cjs +1 -0
  38. package/package.json +3 -2
  39. package/dist/index-r66Tjiqj-bb24c939-5da584fa.cjs +0 -1
  40. package/dist/index-r66Tjiqj-bb24c939-bb24c939.js +0 -448
  41. package/dist/packages/sdk-ui-vue/src/components/widgets/table-widget.d.ts +0 -57
  42. package/dist/packages/sdk-ui-vue/src/providers/sisense-context-provider/sisense-context-provider.d.ts +0 -205
  43. package/dist/use-tracking-a88b968c.cjs +0 -3233
  44. package/dist/use-tracking-bca10d2a.js +0 -122281
package/dist/index.js CHANGED
@@ -1,11 +1,13 @@
1
- var cn = Object.defineProperty;
2
- var dn = (e, t, n) => t in e ? cn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var ue = (e, t, n) => (dn(e, typeof t != "symbol" ? t + "" : t, n), n);
4
- import { s as _t, J as fn, a as b, b as pn, d as gn, _ as hn, c as mn, u as yn, i as bn, e as Sn, h as On, l as vn, m as xn, v as Cn, y as wn, p as Dn, f as jn, g as Pn, w as Fn, C as An, x as Ln, j as En, k as Nn, X as Rn, n as Tn, o as Mn, r as $n, H as In, L as _n, q, t as Ae, z as kn, A as Qe, B as kt, D as Bn, E as Un, F as qn, G as Bt, I as Ut, S as at, K as qt, M as Ce, N as Vt, O as Vn, P as K, Q as V, R, T as F, U as S, V as Wt, W as Wn, Y as Ye, Z as Hn, $ as G, a0 as Kn, a1 as z, a2 as te, a3 as Gn, a4 as zn, a5 as Jn, a6 as Qn, a7 as pe, a8 as Yn, a9 as Xn, aa as Zn, ab as er, ac as tr, ad as nr, ae as rr, af as sr, ag as ir, ah as ar, ai as or, aj as ur, ak as lr, al as cr, am as ot, an as dr, ao as fr, ap as pr, aq as gr, ar as ut, as as hr, at as mr, au as yr, av as br, aw as Sr, ax as Or, ay as vr, az as xr, aA as Cr, aB as wr, aC as Dr, aD as jr, aE as ne, aF as B } from "./use-tracking-bca10d2a.js";
5
- import { aI as Tu, aG as Mu, aH as $u, aJ as Iu, aK as _u } from "./use-tracking-bca10d2a.js";
6
- import { defineComponent as m, watch as L, toRefs as A, ref as _, onBeforeUnmount as J, createApp as Pr, h as Fr, toValue as Ar, computed as We, openBlock as Lr, createElementBlock as Er, renderSlot as Te, createVNode as lt, unref as T, createElementVNode as Nr } from "vue";
7
- import "./index-r66Tjiqj-bb24c939-bb24c939.js";
8
- const Rr = m({
1
+ var K = Object.defineProperty;
2
+ var U = (t, e, n) => e in t ? K(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
+ var E = (t, e, n) => (U(t, typeof e != "symbol" ? e + "" : e, n), n);
4
+ import { DrilldownBreadcrumbs as X, AreaChart as Y, BarChart as Z, CalendarHeatmapChart as tt, ColumnChart as et, FunnelChart as nt, LineChart as rt, PieChart as ot, ScatterChart as it, Table as st, PivotTable as at, TreemapChart as ut, SunburstChart as ct, PolarChart as lt, IndicatorChart as dt, Chart as pt, BoxplotChart as yt, AreamapChart as ht, ScattermapChart as bt, StreamgraphChart as gt, AreaRangeChart as Ot, DateRangeFilterTile as St, MemberFilterTile as Ft, CriteriaFilterTile as ft, RelativeDateFilterTile as Ct, FilterTile as Dt, FiltersPanel as mt, queryStateReducer as J, executeQuery as jt, executeQueryByWidgetId as vt, HookAdapter as x, useExecuteCsvQueryInternal as Pt, useExecutePivotQueryInternal as xt, useExecuteCustomWidgetQueryInternal as At, useGetFilterMembers as Mt, useGetDataSourceDimensionsInternal as wt, translateToDashboardResponse as qt, dataLoadStateReducer as B, getDashboardModel as Rt, translateToDashboardsResponse as Wt, getDashboardModels as Tt, useGetSharedFormulaInternal as Et, getWidgetModel as Bt, getHierarchyModels as kt, createElement as $t, ExternalComponentAdapterElement as Qt, useComposedDashboardInternal as It, createHookApiFacade as _, useJtdWidget as Lt, ContextMenu as Gt, translateColumnToAttribute as _t, isSameAttribute as H, updateDrilldownSelections as Ht, processDrilldownSelections as Vt, getSelectionTitleMenuItem as Jt, getDrilldownMenuItems as Nt, ChartWidget as zt, WidgetById as Kt, PivotTableWidget as Ut, Widget as Xt, DashboardById as Yt, Dashboard as Zt, dashboardModelTranslator as te, dashboardHelpers as T, widgetModelTranslator as v } from "@sisense/sdk-ui-preact";
5
+ import { boxWhiskerProcessResult as Hn, extractDimensionsAndMeasures as Vn } from "@sisense/sdk-ui-preact";
6
+ import { defineComponent as u, watch as g, toRefs as h, ref as j, onBeforeUnmount as A, createApp as ee, h as ne, toValue as re, computed as I, openBlock as oe, createElementBlock as ie, renderSlot as Q, createVNode as V, unref as C, createElementVNode as se } from "vue";
7
+ import { d as N, s as d, a as R, g as M, u as O, b, t as l, e as L, f as w, h as W, i as ae, j as ue, k as ce, l as le, m as de, n as pe } from "./use-tracking-04bcc493.js";
8
+ import { C as Nn, S as zn, T as Kn } from "./use-tracking-04bcc493.js";
9
+ import { getFilterListAndRelationsJaql as z, isMembersFilter as ye, MetadataTypes as he } from "@sisense/sdk-data";
10
+ const be = u({
9
11
  props: {
10
12
  /**
11
13
  * {@inheritDoc @sisense/sdk-ui!DrilldownBreadcrumbsProps.clearDrilldownSelections}
@@ -44,8 +46,8 @@ const Rr = m({
44
46
  required: !0
45
47
  }
46
48
  },
47
- setup: (e, { slots: t }) => _t(fn, e, t, [])
48
- }), To = m({
49
+ setup: (t, { slots: e }) => N(X, t, e, [])
50
+ }), _e = u({
49
51
  props: {
50
52
  /**
51
53
  * {@inheritDoc @sisense/sdk-ui!AreaChartProps.dataOptions}
@@ -111,8 +113,8 @@ const Rr = m({
111
113
  */
112
114
  onDataPointsSelected: Function
113
115
  },
114
- setup: (e) => b(pn, e)
115
- }), Mo = m({
116
+ setup: (t) => d(Y, t)
117
+ }), He = u({
116
118
  props: {
117
119
  /**
118
120
  * {@inheritDoc @sisense/sdk-ui!BarChartProps.dataOptions}
@@ -178,8 +180,8 @@ const Rr = m({
178
180
  */
179
181
  styleOptions: Object
180
182
  },
181
- setup: (e) => b(gn, e)
182
- }), $o = m({
183
+ setup: (t) => d(Z, t)
184
+ }), Ve = u({
183
185
  props: {
184
186
  /**
185
187
  * {@inheritDoc @sisense/sdk-ui!CalendarHeatmapChartProps.dataOptions}
@@ -245,8 +247,8 @@ const Rr = m({
245
247
  */
246
248
  onDataPointsSelected: Function
247
249
  },
248
- setup: (e) => b(hn, e)
249
- }), Io = m({
250
+ setup: (t) => d(tt, t)
251
+ }), Je = u({
250
252
  props: {
251
253
  /**
252
254
  * {@inheritDoc @sisense/sdk-ui!ColumnChartProps.dataOptions}
@@ -312,8 +314,8 @@ const Rr = m({
312
314
  */
313
315
  styleOptions: Object
314
316
  },
315
- setup: (e) => b(mn, e)
316
- }), _o = m({
317
+ setup: (t) => d(et, t)
318
+ }), Ne = u({
317
319
  props: {
318
320
  /**
319
321
  * {@inheritDoc @sisense/sdk-ui!FunnelChartProps.dataOptions}
@@ -379,8 +381,8 @@ const Rr = m({
379
381
  */
380
382
  styleOptions: Object
381
383
  },
382
- setup: (e) => b(yn, e)
383
- }), ko = m({
384
+ setup: (t) => d(nt, t)
385
+ }), ze = u({
384
386
  props: {
385
387
  /**
386
388
  * {@inheritDoc @sisense/sdk-ui!LineChartProps.dataOptions}
@@ -446,8 +448,8 @@ const Rr = m({
446
448
  */
447
449
  styleOptions: Object
448
450
  },
449
- setup: (e) => b(bn, e)
450
- }), Bo = m({
451
+ setup: (t) => d(rt, t)
452
+ }), Ke = u({
451
453
  props: {
452
454
  /**
453
455
  * {@inheritDoc @sisense/sdk-ui!PieChartProps.dataOptions}
@@ -513,8 +515,8 @@ const Rr = m({
513
515
  */
514
516
  styleOptions: Object
515
517
  },
516
- setup: (e) => b(Sn, e)
517
- }), Uo = m({
518
+ setup: (t) => d(ot, t)
519
+ }), Ue = u({
518
520
  props: {
519
521
  /**
520
522
  * {@inheritDoc @sisense/sdk-ui!ScatterChartProps.dataOptions}
@@ -580,8 +582,8 @@ const Rr = m({
580
582
  */
581
583
  styleOptions: Object
582
584
  },
583
- setup: (e) => b(On, e)
584
- }), qo = m({
585
+ setup: (t) => d(it, t)
586
+ }), Xe = u({
585
587
  props: {
586
588
  /**
587
589
  * {@inheritDoc @sisense/sdk-ui!TableProps.dataOptions}
@@ -619,8 +621,8 @@ const Rr = m({
619
621
  */
620
622
  onDataReady: Function
621
623
  },
622
- setup: (e) => b(vn, e)
623
- }), Vo = m({
624
+ setup: (t) => d(st, t)
625
+ }), Ye = u({
624
626
  props: {
625
627
  /**
626
628
  * {@inheritDoc @sisense/sdk-ui!PivotTableProps.dataOptions}
@@ -670,8 +672,8 @@ const Rr = m({
670
672
  */
671
673
  onDataPointContextMenu: Function
672
674
  },
673
- setup: (e) => b(xn, e)
674
- }), Wo = m({
675
+ setup: (t) => d(at, t)
676
+ }), Ze = u({
675
677
  props: {
676
678
  /**
677
679
  * {@inheritDoc @sisense/sdk-ui!TreemapChartProps.dataOptions}
@@ -737,8 +739,8 @@ const Rr = m({
737
739
  */
738
740
  styleOptions: Object
739
741
  },
740
- setup: (e) => b(Cn, e)
741
- }), Ho = m({
742
+ setup: (t) => d(ut, t)
743
+ }), tn = u({
742
744
  props: {
743
745
  /**
744
746
  * {@inheritDoc @sisense/sdk-ui!SunburstChartProps.dataOptions}
@@ -804,8 +806,8 @@ const Rr = m({
804
806
  */
805
807
  styleOptions: Object
806
808
  },
807
- setup: (e) => b(wn, e)
808
- }), Ko = m({
809
+ setup: (t) => d(ct, t)
810
+ }), en = u({
809
811
  props: {
810
812
  /**
811
813
  * {@inheritDoc @sisense/sdk-ui!PolarChartProps.dataOptions}
@@ -871,8 +873,8 @@ const Rr = m({
871
873
  */
872
874
  styleOptions: Object
873
875
  },
874
- setup: (e) => b(Dn, e)
875
- }), Go = m({
876
+ setup: (t) => d(lt, t)
877
+ }), nn = u({
876
878
  props: {
877
879
  /**
878
880
  * {@inheritDoc @sisense/sdk-ui!IndicatorChartProps.dataOptions}
@@ -920,8 +922,8 @@ const Rr = m({
920
922
  */
921
923
  onDataReady: Function
922
924
  },
923
- setup: (e) => b(jn, e)
924
- }), zo = m({
925
+ setup: (t) => d(dt, t)
926
+ }), rn = u({
925
927
  props: {
926
928
  /**
927
929
  * {@inheritDoc @sisense/sdk-ui!ChartProps.chartType}
@@ -1000,8 +1002,8 @@ const Rr = m({
1000
1002
  */
1001
1003
  refreshCounter: Number
1002
1004
  },
1003
- setup: (e) => b(Pn, e)
1004
- }), Jo = m({
1005
+ setup: (t) => d(pt, t)
1006
+ }), on = u({
1005
1007
  props: {
1006
1008
  /**
1007
1009
  * {@inheritDoc @sisense/sdk-ui!BoxplotChartProps.dataOptions}
@@ -1067,8 +1069,8 @@ const Rr = m({
1067
1069
  */
1068
1070
  onDataPointsSelected: Function
1069
1071
  },
1070
- setup: (e) => b(Fn, e)
1071
- }), Qo = m({
1072
+ setup: (t) => d(yt, t)
1073
+ }), sn = u({
1072
1074
  props: {
1073
1075
  /**
1074
1076
  * {@inheritDoc @sisense/sdk-ui!AreamapChartProps.dataOptions}
@@ -1116,8 +1118,8 @@ const Rr = m({
1116
1118
  */
1117
1119
  onDataPointClick: Function
1118
1120
  },
1119
- setup: (e) => b(An, e)
1120
- }), Yo = m({
1121
+ setup: (t) => d(ht, t)
1122
+ }), an = u({
1121
1123
  props: {
1122
1124
  /**
1123
1125
  * {@inheritDoc @sisense/sdk-ui!ScattermapChartProps.dataOptions}
@@ -1165,8 +1167,8 @@ const Rr = m({
1165
1167
  */
1166
1168
  onDataPointClick: Object
1167
1169
  },
1168
- setup: (e) => b(Ln, e)
1169
- }), Xo = m({
1170
+ setup: (t) => d(bt, t)
1171
+ }), un = u({
1170
1172
  props: {
1171
1173
  /**
1172
1174
  * {@inheritDoc @sisense/sdk-ui!StreamgraphChartProps.dataOptions}
@@ -1232,8 +1234,8 @@ const Rr = m({
1232
1234
  */
1233
1235
  onDataPointsSelected: Function
1234
1236
  },
1235
- setup: (e) => b(En, e)
1236
- }), Zo = m({
1237
+ setup: (t) => d(gt, t)
1238
+ }), cn = u({
1237
1239
  props: {
1238
1240
  /**
1239
1241
  * {@inheritDoc @sisense/sdk-ui!AreaRangeChartProps.dataOptions}
@@ -1299,8 +1301,8 @@ const Rr = m({
1299
1301
  */
1300
1302
  styleOptions: Object
1301
1303
  },
1302
- setup: (e) => b(Nn, e)
1303
- }), eu = m({
1304
+ setup: (t) => d(Ot, t)
1305
+ }), ln = u({
1304
1306
  props: {
1305
1307
  /**
1306
1308
  * {@inheritDoc @sisense/sdk-ui!DateRangeFilterTileProps.attribute}
@@ -1360,8 +1362,8 @@ const Rr = m({
1360
1362
  */
1361
1363
  onEdit: Function
1362
1364
  },
1363
- setup: (e) => b(Rn, e)
1364
- }), tu = m({
1365
+ setup: (t) => d(St, t)
1366
+ }), dn = u({
1365
1367
  props: {
1366
1368
  /**
1367
1369
  * {@inheritDoc @sisense/sdk-ui!MemberFilterTileProps.attribute}
@@ -1408,8 +1410,8 @@ const Rr = m({
1408
1410
  */
1409
1411
  onEdit: Function
1410
1412
  },
1411
- setup: (e) => b(Tn, e)
1412
- }), nu = m({
1413
+ setup: (t) => d(Ft, t)
1414
+ }), pn = u({
1413
1415
  props: {
1414
1416
  /**
1415
1417
  * {@inheritDoc @sisense/sdk-ui!CriteriaFilterTileProps.arrangement}
@@ -1449,8 +1451,8 @@ const Rr = m({
1449
1451
  */
1450
1452
  onEdit: Function
1451
1453
  },
1452
- setup: (e) => b(Mn, e)
1453
- }), ru = m({
1454
+ setup: (t) => d(ft, t)
1455
+ }), yn = u({
1454
1456
  props: {
1455
1457
  /**
1456
1458
  * {@inheritDoc @sisense/sdk-ui!RelativeDateFilterTileProps.title}
@@ -1495,8 +1497,8 @@ const Rr = m({
1495
1497
  */
1496
1498
  onEdit: Function
1497
1499
  },
1498
- setup: (e) => b($n, e)
1499
- }), su = m({
1500
+ setup: (t) => d(Ct, t)
1501
+ }), hn = u({
1500
1502
  props: {
1501
1503
  /**
1502
1504
  * {@inheritDoc @sisense/sdk-ui!FilterTileProps.filter}
@@ -1525,8 +1527,8 @@ const Rr = m({
1525
1527
  */
1526
1528
  onEdit: Function
1527
1529
  },
1528
- setup: (e) => b(In, e)
1529
- }), iu = m({
1530
+ setup: (t) => d(Dt, t)
1531
+ }), bn = u({
1530
1532
  props: {
1531
1533
  /**
1532
1534
  * {@inheritDoc @sisense/sdk-ui!FiltersPanelProps.filters}
@@ -1557,2503 +1559,103 @@ const Rr = m({
1557
1559
  required: !0
1558
1560
  }
1559
1561
  },
1560
- setup: (e) => b(_n, e)
1561
- }), Tr = {
1562
- type: "logger",
1563
- log(e) {
1564
- this.output("log", e);
1565
- },
1566
- warn(e) {
1567
- this.output("warn", e);
1568
- },
1569
- error(e) {
1570
- this.output("error", e);
1571
- },
1572
- output(e, t) {
1573
- console && console[e] && console[e].apply(console, t);
1574
- }
1575
- };
1576
- class we {
1577
- constructor(t) {
1578
- let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1579
- this.init(t, n);
1580
- }
1581
- init(t) {
1582
- let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1583
- this.prefix = n.prefix || "i18next:", this.logger = t || Tr, this.options = n, this.debug = n.debug;
1584
- }
1585
- log() {
1586
- for (var t = arguments.length, n = new Array(t), r = 0; r < t; r++)
1587
- n[r] = arguments[r];
1588
- return this.forward(n, "log", "", !0);
1589
- }
1590
- warn() {
1591
- for (var t = arguments.length, n = new Array(t), r = 0; r < t; r++)
1592
- n[r] = arguments[r];
1593
- return this.forward(n, "warn", "", !0);
1594
- }
1595
- error() {
1596
- for (var t = arguments.length, n = new Array(t), r = 0; r < t; r++)
1597
- n[r] = arguments[r];
1598
- return this.forward(n, "error", "");
1599
- }
1600
- deprecate() {
1601
- for (var t = arguments.length, n = new Array(t), r = 0; r < t; r++)
1602
- n[r] = arguments[r];
1603
- return this.forward(n, "warn", "WARNING DEPRECATED: ", !0);
1604
- }
1605
- forward(t, n, r, s) {
1606
- return s && !this.debug ? null : (typeof t[0] == "string" && (t[0] = `${r}${this.prefix} ${t[0]}`), this.logger[n](t));
1607
- }
1608
- create(t) {
1609
- return new we(this.logger, {
1610
- prefix: `${this.prefix}:${t}:`,
1611
- ...this.options
1612
- });
1613
- }
1614
- clone(t) {
1615
- return t = t || this.options, t.prefix = t.prefix || this.prefix, new we(this.logger, t);
1616
- }
1617
- }
1618
- var k = new we();
1619
- class Le {
1620
- constructor() {
1621
- this.observers = {};
1622
- }
1623
- on(t, n) {
1624
- return t.split(" ").forEach((r) => {
1625
- this.observers[r] = this.observers[r] || [], this.observers[r].push(n);
1626
- }), this;
1627
- }
1628
- off(t, n) {
1629
- if (this.observers[t]) {
1630
- if (!n) {
1631
- delete this.observers[t];
1632
- return;
1633
- }
1634
- this.observers[t] = this.observers[t].filter((r) => r !== n);
1635
- }
1636
- }
1637
- emit(t) {
1638
- for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), s = 1; s < n; s++)
1639
- r[s - 1] = arguments[s];
1640
- this.observers[t] && [].concat(this.observers[t]).forEach((a) => {
1641
- a(...r);
1642
- }), this.observers["*"] && [].concat(this.observers["*"]).forEach((a) => {
1643
- a.apply(a, [t, ...r]);
1644
- });
1645
- }
1646
- }
1647
- function le() {
1648
- let e, t;
1649
- const n = new Promise((r, s) => {
1650
- e = r, t = s;
1651
- });
1652
- return n.resolve = e, n.reject = t, n;
1653
- }
1654
- function ct(e) {
1655
- return e == null ? "" : "" + e;
1656
- }
1657
- function Mr(e, t, n) {
1658
- e.forEach((r) => {
1659
- t[r] && (n[r] = t[r]);
1660
- });
1661
- }
1662
- function Xe(e, t, n) {
1663
- function r(a) {
1664
- return a && a.indexOf("###") > -1 ? a.replace(/###/g, ".") : a;
1665
- }
1666
- function s() {
1667
- return !e || typeof e == "string";
1668
- }
1669
- const i = typeof t != "string" ? [].concat(t) : t.split(".");
1670
- for (; i.length > 1; ) {
1671
- if (s())
1672
- return {};
1673
- const a = r(i.shift());
1674
- !e[a] && n && (e[a] = new n()), Object.prototype.hasOwnProperty.call(e, a) ? e = e[a] : e = {};
1675
- }
1676
- return s() ? {} : {
1677
- obj: e,
1678
- k: r(i.shift())
1679
- };
1680
- }
1681
- function dt(e, t, n) {
1682
- const {
1683
- obj: r,
1684
- k: s
1685
- } = Xe(e, t, Object);
1686
- r[s] = n;
1687
- }
1688
- function $r(e, t, n, r) {
1689
- const {
1690
- obj: s,
1691
- k: i
1692
- } = Xe(e, t, Object);
1693
- s[i] = s[i] || [], r && (s[i] = s[i].concat(n)), r || s[i].push(n);
1694
- }
1695
- function De(e, t) {
1696
- const {
1697
- obj: n,
1698
- k: r
1699
- } = Xe(e, t);
1700
- if (n)
1701
- return n[r];
1702
- }
1703
- function Ir(e, t, n) {
1704
- const r = De(e, n);
1705
- return r !== void 0 ? r : De(t, n);
1706
- }
1707
- function Ht(e, t, n) {
1708
- for (const r in t)
1709
- r !== "__proto__" && r !== "constructor" && (r in e ? typeof e[r] == "string" || e[r] instanceof String || typeof t[r] == "string" || t[r] instanceof String ? n && (e[r] = t[r]) : Ht(e[r], t[r], n) : e[r] = t[r]);
1710
- return e;
1711
- }
1712
- function Z(e) {
1713
- return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
1714
- }
1715
- var _r = {
1716
- "&": "&amp;",
1717
- "<": "&lt;",
1718
- ">": "&gt;",
1719
- '"': "&quot;",
1720
- "'": "&#39;",
1721
- "/": "&#x2F;"
1722
- };
1723
- function kr(e) {
1724
- return typeof e == "string" ? e.replace(/[&<>"'\/]/g, (t) => _r[t]) : e;
1725
- }
1726
- const Br = [" ", ",", "?", "!", ";"];
1727
- function Ur(e, t, n) {
1728
- t = t || "", n = n || "";
1729
- const r = Br.filter((a) => t.indexOf(a) < 0 && n.indexOf(a) < 0);
1730
- if (r.length === 0)
1731
- return !0;
1732
- const s = new RegExp(`(${r.map((a) => a === "?" ? "\\?" : a).join("|")})`);
1733
- let i = !s.test(e);
1734
- if (!i) {
1735
- const a = e.indexOf(n);
1736
- a > 0 && !s.test(e.substring(0, a)) && (i = !0);
1737
- }
1738
- return i;
1739
- }
1740
- function je(e, t) {
1741
- let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ".";
1742
- if (!e)
1743
- return;
1744
- if (e[t])
1745
- return e[t];
1746
- const r = t.split(n);
1747
- let s = e;
1748
- for (let i = 0; i < r.length; ++i) {
1749
- if (!s || typeof s[r[i]] == "string" && i + 1 < r.length)
1750
- return;
1751
- if (s[r[i]] === void 0) {
1752
- let a = 2, o = r.slice(i, i + a).join(n), u = s[o];
1753
- for (; u === void 0 && r.length > i + a; )
1754
- a++, o = r.slice(i, i + a).join(n), u = s[o];
1755
- if (u === void 0)
1756
- return;
1757
- if (u === null)
1758
- return null;
1759
- if (t.endsWith(o)) {
1760
- if (typeof u == "string")
1761
- return u;
1762
- if (o && typeof u[o] == "string")
1763
- return u[o];
1764
- }
1765
- const c = r.slice(i + a).join(n);
1766
- return c ? je(u, c, n) : void 0;
1767
- }
1768
- s = s[r[i]];
1769
- }
1770
- return s;
1771
- }
1772
- function Pe(e) {
1773
- return e && e.indexOf("_") > 0 ? e.replace("_", "-") : e;
1774
- }
1775
- class ft extends Le {
1776
- constructor(t) {
1777
- let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
1778
- ns: ["translation"],
1779
- defaultNS: "translation"
1780
- };
1781
- super(), this.data = t || {}, this.options = n, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.options.ignoreJSONStructure === void 0 && (this.options.ignoreJSONStructure = !0);
1782
- }
1783
- addNamespaces(t) {
1784
- this.options.ns.indexOf(t) < 0 && this.options.ns.push(t);
1785
- }
1786
- removeNamespaces(t) {
1787
- const n = this.options.ns.indexOf(t);
1788
- n > -1 && this.options.ns.splice(n, 1);
1789
- }
1790
- getResource(t, n, r) {
1791
- let s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
1792
- const i = s.keySeparator !== void 0 ? s.keySeparator : this.options.keySeparator, a = s.ignoreJSONStructure !== void 0 ? s.ignoreJSONStructure : this.options.ignoreJSONStructure;
1793
- let o = [t, n];
1794
- r && typeof r != "string" && (o = o.concat(r)), r && typeof r == "string" && (o = o.concat(i ? r.split(i) : r)), t.indexOf(".") > -1 && (o = t.split("."));
1795
- const u = De(this.data, o);
1796
- return u || !a || typeof r != "string" ? u : je(this.data && this.data[t] && this.data[t][n], r, i);
1797
- }
1798
- addResource(t, n, r, s) {
1799
- let i = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {
1800
- silent: !1
1801
- };
1802
- const a = i.keySeparator !== void 0 ? i.keySeparator : this.options.keySeparator;
1803
- let o = [t, n];
1804
- r && (o = o.concat(a ? r.split(a) : r)), t.indexOf(".") > -1 && (o = t.split("."), s = n, n = o[1]), this.addNamespaces(n), dt(this.data, o, s), i.silent || this.emit("added", t, n, r, s);
1805
- }
1806
- addResources(t, n, r) {
1807
- let s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {
1808
- silent: !1
1809
- };
1810
- for (const i in r)
1811
- (typeof r[i] == "string" || Object.prototype.toString.apply(r[i]) === "[object Array]") && this.addResource(t, n, i, r[i], {
1812
- silent: !0
1813
- });
1814
- s.silent || this.emit("added", t, n, r);
1815
- }
1816
- addResourceBundle(t, n, r, s, i) {
1817
- let a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {
1818
- silent: !1
1819
- }, o = [t, n];
1820
- t.indexOf(".") > -1 && (o = t.split("."), s = r, r = n, n = o[1]), this.addNamespaces(n);
1821
- let u = De(this.data, o) || {};
1822
- s ? Ht(u, r, i) : u = {
1823
- ...u,
1824
- ...r
1825
- }, dt(this.data, o, u), a.silent || this.emit("added", t, n, r);
1826
- }
1827
- removeResourceBundle(t, n) {
1828
- this.hasResourceBundle(t, n) && delete this.data[t][n], this.removeNamespaces(n), this.emit("removed", t, n);
1829
- }
1830
- hasResourceBundle(t, n) {
1831
- return this.getResource(t, n) !== void 0;
1832
- }
1833
- getResourceBundle(t, n) {
1834
- return n || (n = this.options.defaultNS), this.options.compatibilityAPI === "v1" ? {
1835
- ...this.getResource(t, n)
1836
- } : this.getResource(t, n);
1837
- }
1838
- getDataByLanguage(t) {
1839
- return this.data[t];
1840
- }
1841
- hasLanguageSomeTranslations(t) {
1842
- const n = this.getDataByLanguage(t);
1843
- return !!(n && Object.keys(n) || []).find((s) => n[s] && Object.keys(n[s]).length > 0);
1844
- }
1845
- toJSON() {
1846
- return this.data;
1847
- }
1848
- }
1849
- var Kt = {
1850
- processors: {},
1851
- addPostProcessor(e) {
1852
- this.processors[e.name] = e;
1853
- },
1854
- handle(e, t, n, r, s) {
1855
- return e.forEach((i) => {
1856
- this.processors[i] && (t = this.processors[i].process(t, n, r, s));
1857
- }), t;
1858
- }
1859
- };
1860
- const pt = {};
1861
- class Fe extends Le {
1862
- constructor(t) {
1863
- let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1864
- super(), Mr(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], t, this), this.options = n, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = k.create("translator");
1865
- }
1866
- changeLanguage(t) {
1867
- t && (this.language = t);
1868
- }
1869
- exists(t) {
1870
- let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
1871
- interpolation: {}
1872
- };
1873
- if (t == null)
1874
- return !1;
1875
- const r = this.resolve(t, n);
1876
- return r && r.res !== void 0;
1877
- }
1878
- extractFromKey(t, n) {
1879
- let r = n.nsSeparator !== void 0 ? n.nsSeparator : this.options.nsSeparator;
1880
- r === void 0 && (r = ":");
1881
- const s = n.keySeparator !== void 0 ? n.keySeparator : this.options.keySeparator;
1882
- let i = n.ns || this.options.defaultNS || [];
1883
- const a = r && t.indexOf(r) > -1, o = !this.options.userDefinedKeySeparator && !n.keySeparator && !this.options.userDefinedNsSeparator && !n.nsSeparator && !Ur(t, r, s);
1884
- if (a && !o) {
1885
- const u = t.match(this.interpolator.nestingRegexp);
1886
- if (u && u.length > 0)
1887
- return {
1888
- key: t,
1889
- namespaces: i
1890
- };
1891
- const c = t.split(r);
1892
- (r !== s || r === s && this.options.ns.indexOf(c[0]) > -1) && (i = c.shift()), t = c.join(s);
1893
- }
1894
- return typeof i == "string" && (i = [i]), {
1895
- key: t,
1896
- namespaces: i
1897
- };
1898
- }
1899
- translate(t, n, r) {
1900
- if (typeof n != "object" && this.options.overloadTranslationOptionHandler && (n = this.options.overloadTranslationOptionHandler(arguments)), typeof n == "object" && (n = {
1901
- ...n
1902
- }), n || (n = {}), t == null)
1903
- return "";
1904
- Array.isArray(t) || (t = [String(t)]);
1905
- const s = n.returnDetails !== void 0 ? n.returnDetails : this.options.returnDetails, i = n.keySeparator !== void 0 ? n.keySeparator : this.options.keySeparator, {
1906
- key: a,
1907
- namespaces: o
1908
- } = this.extractFromKey(t[t.length - 1], n), u = o[o.length - 1], c = n.lng || this.language, d = n.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
1909
- if (c && c.toLowerCase() === "cimode") {
1910
- if (d) {
1911
- const C = n.nsSeparator || this.options.nsSeparator;
1912
- return s ? {
1913
- res: `${u}${C}${a}`,
1914
- usedKey: a,
1915
- exactUsedKey: a,
1916
- usedLng: c,
1917
- usedNS: u
1918
- } : `${u}${C}${a}`;
1919
- }
1920
- return s ? {
1921
- res: a,
1922
- usedKey: a,
1923
- exactUsedKey: a,
1924
- usedLng: c,
1925
- usedNS: u
1926
- } : a;
1927
- }
1928
- const f = this.resolve(t, n);
1929
- let l = f && f.res;
1930
- const g = f && f.usedKey || a, p = f && f.exactUsedKey || a, y = Object.prototype.toString.apply(l), h = ["[object Number]", "[object Function]", "[object RegExp]"], x = n.joinArrays !== void 0 ? n.joinArrays : this.options.joinArrays, w = !this.i18nFormat || this.i18nFormat.handleAsObject;
1931
- if (w && l && (typeof l != "string" && typeof l != "boolean" && typeof l != "number") && h.indexOf(y) < 0 && !(typeof x == "string" && y === "[object Array]")) {
1932
- if (!n.returnObjects && !this.options.returnObjects) {
1933
- this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
1934
- const C = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(g, l, {
1935
- ...n,
1936
- ns: o
1937
- }) : `key '${a} (${this.language})' returned an object instead of string.`;
1938
- return s ? (f.res = C, f) : C;
1939
- }
1940
- if (i) {
1941
- const C = y === "[object Array]", E = C ? [] : {}, $ = C ? p : g;
1942
- for (const P in l)
1943
- if (Object.prototype.hasOwnProperty.call(l, P)) {
1944
- const ge = `${$}${i}${P}`;
1945
- E[P] = this.translate(ge, {
1946
- ...n,
1947
- joinArrays: !1,
1948
- ns: o
1949
- }), E[P] === ge && (E[P] = l[P]);
1950
- }
1951
- l = E;
1952
- }
1953
- } else if (w && typeof x == "string" && y === "[object Array]")
1954
- l = l.join(x), l && (l = this.extendTranslation(l, t, n, r));
1955
- else {
1956
- let C = !1, E = !1;
1957
- const $ = n.count !== void 0 && typeof n.count != "string", P = Fe.hasDefaultValue(n), ge = $ ? this.pluralResolver.getSuffix(c, n.count, n) : "", un = n.ordinal && $ ? this.pluralResolver.getSuffix(c, n.count, {
1958
- ordinal: !1
1959
- }) : "", ie = n[`defaultValue${ge}`] || n[`defaultValue${un}`] || n.defaultValue;
1960
- !this.isValidLookup(l) && P && (C = !0, l = ie), this.isValidLookup(l) || (E = !0, l = a);
1961
- const ln = (n.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && E ? void 0 : l, ae = P && ie !== l && this.options.updateMissing;
1962
- if (E || C || ae) {
1963
- if (this.logger.log(ae ? "updateKey" : "missingKey", c, u, a, ae ? ie : l), i) {
1964
- const N = this.resolve(a, {
1965
- ...n,
1966
- keySeparator: !1
1967
- });
1968
- N && N.res && this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.");
1969
- }
1970
- let oe = [];
1971
- const he = this.languageUtils.getFallbackCodes(this.options.fallbackLng, n.lng || this.language);
1972
- if (this.options.saveMissingTo === "fallback" && he && he[0])
1973
- for (let N = 0; N < he.length; N++)
1974
- oe.push(he[N]);
1975
- else
1976
- this.options.saveMissingTo === "all" ? oe = this.languageUtils.toResolveHierarchy(n.lng || this.language) : oe.push(n.lng || this.language);
1977
- const rt = (N, X, st) => {
1978
- const it = P && st !== l ? st : ln;
1979
- this.options.missingKeyHandler ? this.options.missingKeyHandler(N, u, X, it, ae, n) : this.backendConnector && this.backendConnector.saveMissing && this.backendConnector.saveMissing(N, u, X, it, ae, n), this.emit("missingKey", N, u, X, l);
1980
- };
1981
- this.options.saveMissing && (this.options.saveMissingPlurals && $ ? oe.forEach((N) => {
1982
- this.pluralResolver.getSuffixes(N, n).forEach((X) => {
1983
- rt([N], a + X, n[`defaultValue${X}`] || ie);
1984
- });
1985
- }) : rt(oe, a, ie));
1986
- }
1987
- l = this.extendTranslation(l, t, n, f, r), E && l === a && this.options.appendNamespaceToMissingKey && (l = `${u}:${a}`), (E || C) && this.options.parseMissingKeyHandler && (this.options.compatibilityAPI !== "v1" ? l = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${u}:${a}` : a, C ? l : void 0) : l = this.options.parseMissingKeyHandler(l));
1988
- }
1989
- return s ? (f.res = l, f) : l;
1990
- }
1991
- extendTranslation(t, n, r, s, i) {
1992
- var a = this;
1993
- if (this.i18nFormat && this.i18nFormat.parse)
1994
- t = this.i18nFormat.parse(t, {
1995
- ...this.options.interpolation.defaultVariables,
1996
- ...r
1997
- }, s.usedLng, s.usedNS, s.usedKey, {
1998
- resolved: s
1999
- });
2000
- else if (!r.skipInterpolation) {
2001
- r.interpolation && this.interpolator.init({
2002
- ...r,
2003
- interpolation: {
2004
- ...this.options.interpolation,
2005
- ...r.interpolation
2006
- }
2007
- });
2008
- const c = typeof t == "string" && (r && r.interpolation && r.interpolation.skipOnVariables !== void 0 ? r.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
2009
- let d;
2010
- if (c) {
2011
- const l = t.match(this.interpolator.nestingRegexp);
2012
- d = l && l.length;
2013
- }
2014
- let f = r.replace && typeof r.replace != "string" ? r.replace : r;
2015
- if (this.options.interpolation.defaultVariables && (f = {
2016
- ...this.options.interpolation.defaultVariables,
2017
- ...f
2018
- }), t = this.interpolator.interpolate(t, f, r.lng || this.language, r), c) {
2019
- const l = t.match(this.interpolator.nestingRegexp), g = l && l.length;
2020
- d < g && (r.nest = !1);
2021
- }
2022
- !r.lng && this.options.compatibilityAPI !== "v1" && s && s.res && (r.lng = s.usedLng), r.nest !== !1 && (t = this.interpolator.nest(t, function() {
2023
- for (var l = arguments.length, g = new Array(l), p = 0; p < l; p++)
2024
- g[p] = arguments[p];
2025
- return i && i[0] === g[0] && !r.context ? (a.logger.warn(`It seems you are nesting recursively key: ${g[0]} in key: ${n[0]}`), null) : a.translate(...g, n);
2026
- }, r)), r.interpolation && this.interpolator.reset();
2027
- }
2028
- const o = r.postProcess || this.options.postProcess, u = typeof o == "string" ? [o] : o;
2029
- return t != null && u && u.length && r.applyPostProcessor !== !1 && (t = Kt.handle(u, t, n, this.options && this.options.postProcessPassResolved ? {
2030
- i18nResolved: s,
2031
- ...r
2032
- } : r, this)), t;
2033
- }
2034
- resolve(t) {
2035
- let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r, s, i, a, o;
2036
- return typeof t == "string" && (t = [t]), t.forEach((u) => {
2037
- if (this.isValidLookup(r))
2038
- return;
2039
- const c = this.extractFromKey(u, n), d = c.key;
2040
- s = d;
2041
- let f = c.namespaces;
2042
- this.options.fallbackNS && (f = f.concat(this.options.fallbackNS));
2043
- const l = n.count !== void 0 && typeof n.count != "string", g = l && !n.ordinal && n.count === 0 && this.pluralResolver.shouldUseIntlApi(), p = n.context !== void 0 && (typeof n.context == "string" || typeof n.context == "number") && n.context !== "", y = n.lngs ? n.lngs : this.languageUtils.toResolveHierarchy(n.lng || this.language, n.fallbackLng);
2044
- f.forEach((h) => {
2045
- this.isValidLookup(r) || (o = h, !pt[`${y[0]}-${h}`] && this.utils && this.utils.hasLoadedNamespace && !this.utils.hasLoadedNamespace(o) && (pt[`${y[0]}-${h}`] = !0, this.logger.warn(`key "${s}" for languages "${y.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), y.forEach((x) => {
2046
- if (this.isValidLookup(r))
2047
- return;
2048
- a = x;
2049
- const w = [d];
2050
- if (this.i18nFormat && this.i18nFormat.addLookupKeys)
2051
- this.i18nFormat.addLookupKeys(w, d, x, h, n);
2052
- else {
2053
- let C;
2054
- l && (C = this.pluralResolver.getSuffix(x, n.count, n));
2055
- const E = `${this.options.pluralSeparator}zero`, $ = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
2056
- if (l && (w.push(d + C), n.ordinal && C.indexOf($) === 0 && w.push(d + C.replace($, this.options.pluralSeparator)), g && w.push(d + E)), p) {
2057
- const P = `${d}${this.options.contextSeparator}${n.context}`;
2058
- w.push(P), l && (w.push(P + C), n.ordinal && C.indexOf($) === 0 && w.push(P + C.replace($, this.options.pluralSeparator)), g && w.push(P + E));
2059
- }
2060
- }
2061
- let D;
2062
- for (; D = w.pop(); )
2063
- this.isValidLookup(r) || (i = D, r = this.getResource(x, h, D, n));
2064
- }));
2065
- });
2066
- }), {
2067
- res: r,
2068
- usedKey: s,
2069
- exactUsedKey: i,
2070
- usedLng: a,
2071
- usedNS: o
2072
- };
2073
- }
2074
- isValidLookup(t) {
2075
- return t !== void 0 && !(!this.options.returnNull && t === null) && !(!this.options.returnEmptyString && t === "");
2076
- }
2077
- getResource(t, n, r) {
2078
- let s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
2079
- return this.i18nFormat && this.i18nFormat.getResource ? this.i18nFormat.getResource(t, n, r, s) : this.resourceStore.getResource(t, n, r, s);
2080
- }
2081
- static hasDefaultValue(t) {
2082
- const n = "defaultValue";
2083
- for (const r in t)
2084
- if (Object.prototype.hasOwnProperty.call(t, r) && n === r.substring(0, n.length) && t[r] !== void 0)
2085
- return !0;
2086
- return !1;
2087
- }
2088
- }
2089
- function Me(e) {
2090
- return e.charAt(0).toUpperCase() + e.slice(1);
2091
- }
2092
- class gt {
2093
- constructor(t) {
2094
- this.options = t, this.supportedLngs = this.options.supportedLngs || !1, this.logger = k.create("languageUtils");
2095
- }
2096
- getScriptPartFromCode(t) {
2097
- if (t = Pe(t), !t || t.indexOf("-") < 0)
2098
- return null;
2099
- const n = t.split("-");
2100
- return n.length === 2 || (n.pop(), n[n.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(n.join("-"));
2101
- }
2102
- getLanguagePartFromCode(t) {
2103
- if (t = Pe(t), !t || t.indexOf("-") < 0)
2104
- return t;
2105
- const n = t.split("-");
2106
- return this.formatLanguageCode(n[0]);
2107
- }
2108
- formatLanguageCode(t) {
2109
- if (typeof t == "string" && t.indexOf("-") > -1) {
2110
- const n = ["hans", "hant", "latn", "cyrl", "cans", "mong", "arab"];
2111
- let r = t.split("-");
2112
- return this.options.lowerCaseLng ? r = r.map((s) => s.toLowerCase()) : r.length === 2 ? (r[0] = r[0].toLowerCase(), r[1] = r[1].toUpperCase(), n.indexOf(r[1].toLowerCase()) > -1 && (r[1] = Me(r[1].toLowerCase()))) : r.length === 3 && (r[0] = r[0].toLowerCase(), r[1].length === 2 && (r[1] = r[1].toUpperCase()), r[0] !== "sgn" && r[2].length === 2 && (r[2] = r[2].toUpperCase()), n.indexOf(r[1].toLowerCase()) > -1 && (r[1] = Me(r[1].toLowerCase())), n.indexOf(r[2].toLowerCase()) > -1 && (r[2] = Me(r[2].toLowerCase()))), r.join("-");
2113
- }
2114
- return this.options.cleanCode || this.options.lowerCaseLng ? t.toLowerCase() : t;
2115
- }
2116
- isSupportedCode(t) {
2117
- return (this.options.load === "languageOnly" || this.options.nonExplicitSupportedLngs) && (t = this.getLanguagePartFromCode(t)), !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.indexOf(t) > -1;
2118
- }
2119
- getBestMatchFromCodes(t) {
2120
- if (!t)
2121
- return null;
2122
- let n;
2123
- return t.forEach((r) => {
2124
- if (n)
2125
- return;
2126
- const s = this.formatLanguageCode(r);
2127
- (!this.options.supportedLngs || this.isSupportedCode(s)) && (n = s);
2128
- }), !n && this.options.supportedLngs && t.forEach((r) => {
2129
- if (n)
2130
- return;
2131
- const s = this.getLanguagePartFromCode(r);
2132
- if (this.isSupportedCode(s))
2133
- return n = s;
2134
- n = this.options.supportedLngs.find((i) => {
2135
- if (i === s)
2136
- return i;
2137
- if (!(i.indexOf("-") < 0 && s.indexOf("-") < 0) && i.indexOf(s) === 0)
2138
- return i;
2139
- });
2140
- }), n || (n = this.getFallbackCodes(this.options.fallbackLng)[0]), n;
2141
- }
2142
- getFallbackCodes(t, n) {
2143
- if (!t)
2144
- return [];
2145
- if (typeof t == "function" && (t = t(n)), typeof t == "string" && (t = [t]), Object.prototype.toString.apply(t) === "[object Array]")
2146
- return t;
2147
- if (!n)
2148
- return t.default || [];
2149
- let r = t[n];
2150
- return r || (r = t[this.getScriptPartFromCode(n)]), r || (r = t[this.formatLanguageCode(n)]), r || (r = t[this.getLanguagePartFromCode(n)]), r || (r = t.default), r || [];
2151
- }
2152
- toResolveHierarchy(t, n) {
2153
- const r = this.getFallbackCodes(n || this.options.fallbackLng || [], t), s = [], i = (a) => {
2154
- a && (this.isSupportedCode(a) ? s.push(a) : this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`));
2155
- };
2156
- return typeof t == "string" && (t.indexOf("-") > -1 || t.indexOf("_") > -1) ? (this.options.load !== "languageOnly" && i(this.formatLanguageCode(t)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && i(this.getScriptPartFromCode(t)), this.options.load !== "currentOnly" && i(this.getLanguagePartFromCode(t))) : typeof t == "string" && i(this.formatLanguageCode(t)), r.forEach((a) => {
2157
- s.indexOf(a) < 0 && i(this.formatLanguageCode(a));
2158
- }), s;
2159
- }
2160
- }
2161
- let qr = [{
2162
- lngs: ["ach", "ak", "am", "arn", "br", "fil", "gun", "ln", "mfe", "mg", "mi", "oc", "pt", "pt-BR", "tg", "tl", "ti", "tr", "uz", "wa"],
2163
- nr: [1, 2],
2164
- fc: 1
2165
- }, {
2166
- lngs: ["af", "an", "ast", "az", "bg", "bn", "ca", "da", "de", "dev", "el", "en", "eo", "es", "et", "eu", "fi", "fo", "fur", "fy", "gl", "gu", "ha", "hi", "hu", "hy", "ia", "it", "kk", "kn", "ku", "lb", "mai", "ml", "mn", "mr", "nah", "nap", "nb", "ne", "nl", "nn", "no", "nso", "pa", "pap", "pms", "ps", "pt-PT", "rm", "sco", "se", "si", "so", "son", "sq", "sv", "sw", "ta", "te", "tk", "ur", "yo"],
2167
- nr: [1, 2],
2168
- fc: 2
2169
- }, {
2170
- lngs: ["ay", "bo", "cgg", "fa", "ht", "id", "ja", "jbo", "ka", "km", "ko", "ky", "lo", "ms", "sah", "su", "th", "tt", "ug", "vi", "wo", "zh"],
2171
- nr: [1],
2172
- fc: 3
2173
- }, {
2174
- lngs: ["be", "bs", "cnr", "dz", "hr", "ru", "sr", "uk"],
2175
- nr: [1, 2, 5],
2176
- fc: 4
2177
- }, {
2178
- lngs: ["ar"],
2179
- nr: [0, 1, 2, 3, 11, 100],
2180
- fc: 5
2181
- }, {
2182
- lngs: ["cs", "sk"],
2183
- nr: [1, 2, 5],
2184
- fc: 6
2185
- }, {
2186
- lngs: ["csb", "pl"],
2187
- nr: [1, 2, 5],
2188
- fc: 7
2189
- }, {
2190
- lngs: ["cy"],
2191
- nr: [1, 2, 3, 8],
2192
- fc: 8
2193
- }, {
2194
- lngs: ["fr"],
2195
- nr: [1, 2],
2196
- fc: 9
2197
- }, {
2198
- lngs: ["ga"],
2199
- nr: [1, 2, 3, 7, 11],
2200
- fc: 10
2201
- }, {
2202
- lngs: ["gd"],
2203
- nr: [1, 2, 3, 20],
2204
- fc: 11
2205
- }, {
2206
- lngs: ["is"],
2207
- nr: [1, 2],
2208
- fc: 12
2209
- }, {
2210
- lngs: ["jv"],
2211
- nr: [0, 1],
2212
- fc: 13
2213
- }, {
2214
- lngs: ["kw"],
2215
- nr: [1, 2, 3, 4],
2216
- fc: 14
2217
- }, {
2218
- lngs: ["lt"],
2219
- nr: [1, 2, 10],
2220
- fc: 15
2221
- }, {
2222
- lngs: ["lv"],
2223
- nr: [1, 2, 0],
2224
- fc: 16
2225
- }, {
2226
- lngs: ["mk"],
2227
- nr: [1, 2],
2228
- fc: 17
2229
- }, {
2230
- lngs: ["mnk"],
2231
- nr: [0, 1, 2],
2232
- fc: 18
2233
- }, {
2234
- lngs: ["mt"],
2235
- nr: [1, 2, 11, 20],
2236
- fc: 19
2237
- }, {
2238
- lngs: ["or"],
2239
- nr: [2, 1],
2240
- fc: 2
2241
- }, {
2242
- lngs: ["ro"],
2243
- nr: [1, 2, 20],
2244
- fc: 20
2245
- }, {
2246
- lngs: ["sl"],
2247
- nr: [5, 1, 2, 3],
2248
- fc: 21
2249
- }, {
2250
- lngs: ["he", "iw"],
2251
- nr: [1, 2, 20, 21],
2252
- fc: 22
2253
- }], Vr = {
2254
- 1: function(e) {
2255
- return +(e > 1);
2256
- },
2257
- 2: function(e) {
2258
- return +(e != 1);
2259
- },
2260
- 3: function(e) {
2261
- return 0;
2262
- },
2263
- 4: function(e) {
2264
- return e % 10 == 1 && e % 100 != 11 ? 0 : e % 10 >= 2 && e % 10 <= 4 && (e % 100 < 10 || e % 100 >= 20) ? 1 : 2;
2265
- },
2266
- 5: function(e) {
2267
- return e == 0 ? 0 : e == 1 ? 1 : e == 2 ? 2 : e % 100 >= 3 && e % 100 <= 10 ? 3 : e % 100 >= 11 ? 4 : 5;
2268
- },
2269
- 6: function(e) {
2270
- return e == 1 ? 0 : e >= 2 && e <= 4 ? 1 : 2;
2271
- },
2272
- 7: function(e) {
2273
- return e == 1 ? 0 : e % 10 >= 2 && e % 10 <= 4 && (e % 100 < 10 || e % 100 >= 20) ? 1 : 2;
2274
- },
2275
- 8: function(e) {
2276
- return e == 1 ? 0 : e == 2 ? 1 : e != 8 && e != 11 ? 2 : 3;
2277
- },
2278
- 9: function(e) {
2279
- return +(e >= 2);
2280
- },
2281
- 10: function(e) {
2282
- return e == 1 ? 0 : e == 2 ? 1 : e < 7 ? 2 : e < 11 ? 3 : 4;
2283
- },
2284
- 11: function(e) {
2285
- return e == 1 || e == 11 ? 0 : e == 2 || e == 12 ? 1 : e > 2 && e < 20 ? 2 : 3;
2286
- },
2287
- 12: function(e) {
2288
- return +(e % 10 != 1 || e % 100 == 11);
2289
- },
2290
- 13: function(e) {
2291
- return +(e !== 0);
2292
- },
2293
- 14: function(e) {
2294
- return e == 1 ? 0 : e == 2 ? 1 : e == 3 ? 2 : 3;
2295
- },
2296
- 15: function(e) {
2297
- return e % 10 == 1 && e % 100 != 11 ? 0 : e % 10 >= 2 && (e % 100 < 10 || e % 100 >= 20) ? 1 : 2;
2298
- },
2299
- 16: function(e) {
2300
- return e % 10 == 1 && e % 100 != 11 ? 0 : e !== 0 ? 1 : 2;
2301
- },
2302
- 17: function(e) {
2303
- return e == 1 || e % 10 == 1 && e % 100 != 11 ? 0 : 1;
2304
- },
2305
- 18: function(e) {
2306
- return e == 0 ? 0 : e == 1 ? 1 : 2;
2307
- },
2308
- 19: function(e) {
2309
- return e == 1 ? 0 : e == 0 || e % 100 > 1 && e % 100 < 11 ? 1 : e % 100 > 10 && e % 100 < 20 ? 2 : 3;
2310
- },
2311
- 20: function(e) {
2312
- return e == 1 ? 0 : e == 0 || e % 100 > 0 && e % 100 < 20 ? 1 : 2;
2313
- },
2314
- 21: function(e) {
2315
- return e % 100 == 1 ? 1 : e % 100 == 2 ? 2 : e % 100 == 3 || e % 100 == 4 ? 3 : 0;
2316
- },
2317
- 22: function(e) {
2318
- return e == 1 ? 0 : e == 2 ? 1 : (e < 0 || e > 10) && e % 10 == 0 ? 2 : 3;
2319
- }
2320
- };
2321
- const Wr = ["v1", "v2", "v3"], Hr = ["v4"], ht = {
2322
- zero: 0,
2323
- one: 1,
2324
- two: 2,
2325
- few: 3,
2326
- many: 4,
2327
- other: 5
2328
- };
2329
- function Kr() {
2330
- const e = {};
2331
- return qr.forEach((t) => {
2332
- t.lngs.forEach((n) => {
2333
- e[n] = {
2334
- numbers: t.nr,
2335
- plurals: Vr[t.fc]
2336
- };
2337
- });
2338
- }), e;
2339
- }
2340
- class Gr {
2341
- constructor(t) {
2342
- let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2343
- this.languageUtils = t, this.options = n, this.logger = k.create("pluralResolver"), (!this.options.compatibilityJSON || Hr.includes(this.options.compatibilityJSON)) && (typeof Intl > "u" || !Intl.PluralRules) && (this.options.compatibilityJSON = "v3", this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")), this.rules = Kr();
2344
- }
2345
- addRule(t, n) {
2346
- this.rules[t] = n;
2347
- }
2348
- getRule(t) {
2349
- let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2350
- if (this.shouldUseIntlApi())
2351
- try {
2352
- return new Intl.PluralRules(Pe(t), {
2353
- type: n.ordinal ? "ordinal" : "cardinal"
2354
- });
2355
- } catch {
2356
- return;
2357
- }
2358
- return this.rules[t] || this.rules[this.languageUtils.getLanguagePartFromCode(t)];
2359
- }
2360
- needsPlural(t) {
2361
- let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2362
- const r = this.getRule(t, n);
2363
- return this.shouldUseIntlApi() ? r && r.resolvedOptions().pluralCategories.length > 1 : r && r.numbers.length > 1;
2364
- }
2365
- getPluralFormsOfKey(t, n) {
2366
- let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
2367
- return this.getSuffixes(t, r).map((s) => `${n}${s}`);
2368
- }
2369
- getSuffixes(t) {
2370
- let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2371
- const r = this.getRule(t, n);
2372
- return r ? this.shouldUseIntlApi() ? r.resolvedOptions().pluralCategories.sort((s, i) => ht[s] - ht[i]).map((s) => `${this.options.prepend}${n.ordinal ? `ordinal${this.options.prepend}` : ""}${s}`) : r.numbers.map((s) => this.getSuffix(t, s, n)) : [];
2373
- }
2374
- getSuffix(t, n) {
2375
- let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
2376
- const s = this.getRule(t, r);
2377
- return s ? this.shouldUseIntlApi() ? `${this.options.prepend}${r.ordinal ? `ordinal${this.options.prepend}` : ""}${s.select(n)}` : this.getSuffixRetroCompatible(s, n) : (this.logger.warn(`no plural rule found for: ${t}`), "");
2378
- }
2379
- getSuffixRetroCompatible(t, n) {
2380
- const r = t.noAbs ? t.plurals(n) : t.plurals(Math.abs(n));
2381
- let s = t.numbers[r];
2382
- this.options.simplifyPluralSuffix && t.numbers.length === 2 && t.numbers[0] === 1 && (s === 2 ? s = "plural" : s === 1 && (s = ""));
2383
- const i = () => this.options.prepend && s.toString() ? this.options.prepend + s.toString() : s.toString();
2384
- return this.options.compatibilityJSON === "v1" ? s === 1 ? "" : typeof s == "number" ? `_plural_${s.toString()}` : i() : this.options.compatibilityJSON === "v2" || this.options.simplifyPluralSuffix && t.numbers.length === 2 && t.numbers[0] === 1 ? i() : this.options.prepend && r.toString() ? this.options.prepend + r.toString() : r.toString();
2385
- }
2386
- shouldUseIntlApi() {
2387
- return !Wr.includes(this.options.compatibilityJSON);
2388
- }
2389
- }
2390
- function mt(e, t, n) {
2391
- let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ".", s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, i = Ir(e, t, n);
2392
- return !i && s && typeof n == "string" && (i = je(e, n, r), i === void 0 && (i = je(t, n, r))), i;
2393
- }
2394
- class zr {
2395
- constructor() {
2396
- let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2397
- this.logger = k.create("interpolator"), this.options = t, this.format = t.interpolation && t.interpolation.format || ((n) => n), this.init(t);
2398
- }
2399
- init() {
2400
- let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2401
- t.interpolation || (t.interpolation = {
2402
- escapeValue: !0
2403
- });
2404
- const n = t.interpolation;
2405
- this.escape = n.escape !== void 0 ? n.escape : kr, this.escapeValue = n.escapeValue !== void 0 ? n.escapeValue : !0, this.useRawValueToEscape = n.useRawValueToEscape !== void 0 ? n.useRawValueToEscape : !1, this.prefix = n.prefix ? Z(n.prefix) : n.prefixEscaped || "{{", this.suffix = n.suffix ? Z(n.suffix) : n.suffixEscaped || "}}", this.formatSeparator = n.formatSeparator ? n.formatSeparator : n.formatSeparator || ",", this.unescapePrefix = n.unescapeSuffix ? "" : n.unescapePrefix || "-", this.unescapeSuffix = this.unescapePrefix ? "" : n.unescapeSuffix || "", this.nestingPrefix = n.nestingPrefix ? Z(n.nestingPrefix) : n.nestingPrefixEscaped || Z("$t("), this.nestingSuffix = n.nestingSuffix ? Z(n.nestingSuffix) : n.nestingSuffixEscaped || Z(")"), this.nestingOptionsSeparator = n.nestingOptionsSeparator ? n.nestingOptionsSeparator : n.nestingOptionsSeparator || ",", this.maxReplaces = n.maxReplaces ? n.maxReplaces : 1e3, this.alwaysFormat = n.alwaysFormat !== void 0 ? n.alwaysFormat : !1, this.resetRegExp();
2406
- }
2407
- reset() {
2408
- this.options && this.init(this.options);
2409
- }
2410
- resetRegExp() {
2411
- const t = `${this.prefix}(.+?)${this.suffix}`;
2412
- this.regexp = new RegExp(t, "g");
2413
- const n = `${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`;
2414
- this.regexpUnescape = new RegExp(n, "g");
2415
- const r = `${this.nestingPrefix}(.+?)${this.nestingSuffix}`;
2416
- this.nestingRegexp = new RegExp(r, "g");
2417
- }
2418
- interpolate(t, n, r, s) {
2419
- let i, a, o;
2420
- const u = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {};
2421
- function c(p) {
2422
- return p.replace(/\$/g, "$$$$");
2423
- }
2424
- const d = (p) => {
2425
- if (p.indexOf(this.formatSeparator) < 0) {
2426
- const w = mt(n, u, p, this.options.keySeparator, this.options.ignoreJSONStructure);
2427
- return this.alwaysFormat ? this.format(w, void 0, r, {
2428
- ...s,
2429
- ...n,
2430
- interpolationkey: p
2431
- }) : w;
2432
- }
2433
- const y = p.split(this.formatSeparator), h = y.shift().trim(), x = y.join(this.formatSeparator).trim();
2434
- return this.format(mt(n, u, h, this.options.keySeparator, this.options.ignoreJSONStructure), x, r, {
2435
- ...s,
2436
- ...n,
2437
- interpolationkey: h
2438
- });
2439
- };
2440
- this.resetRegExp();
2441
- const f = s && s.missingInterpolationHandler || this.options.missingInterpolationHandler, l = s && s.interpolation && s.interpolation.skipOnVariables !== void 0 ? s.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;
2442
- return [{
2443
- regex: this.regexpUnescape,
2444
- safeValue: (p) => c(p)
2445
- }, {
2446
- regex: this.regexp,
2447
- safeValue: (p) => this.escapeValue ? c(this.escape(p)) : c(p)
2448
- }].forEach((p) => {
2449
- for (o = 0; i = p.regex.exec(t); ) {
2450
- const y = i[1].trim();
2451
- if (a = d(y), a === void 0)
2452
- if (typeof f == "function") {
2453
- const x = f(t, i, s);
2454
- a = typeof x == "string" ? x : "";
2455
- } else if (s && Object.prototype.hasOwnProperty.call(s, y))
2456
- a = "";
2457
- else if (l) {
2458
- a = i[0];
2459
- continue;
2460
- } else
2461
- this.logger.warn(`missed to pass in variable ${y} for interpolating ${t}`), a = "";
2462
- else
2463
- typeof a != "string" && !this.useRawValueToEscape && (a = ct(a));
2464
- const h = p.safeValue(a);
2465
- if (t = t.replace(i[0], h), l ? (p.regex.lastIndex += a.length, p.regex.lastIndex -= i[0].length) : p.regex.lastIndex = 0, o++, o >= this.maxReplaces)
2466
- break;
2467
- }
2468
- }), t;
2469
- }
2470
- nest(t, n) {
2471
- let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, s, i, a;
2472
- function o(u, c) {
2473
- const d = this.nestingOptionsSeparator;
2474
- if (u.indexOf(d) < 0)
2475
- return u;
2476
- const f = u.split(new RegExp(`${d}[ ]*{`));
2477
- let l = `{${f[1]}`;
2478
- u = f[0], l = this.interpolate(l, a);
2479
- const g = l.match(/'/g), p = l.match(/"/g);
2480
- (g && g.length % 2 === 0 && !p || p.length % 2 !== 0) && (l = l.replace(/'/g, '"'));
2481
- try {
2482
- a = JSON.parse(l), c && (a = {
2483
- ...c,
2484
- ...a
2485
- });
2486
- } catch (y) {
2487
- return this.logger.warn(`failed parsing options string in nesting for key ${u}`, y), `${u}${d}${l}`;
2488
- }
2489
- return delete a.defaultValue, u;
2490
- }
2491
- for (; s = this.nestingRegexp.exec(t); ) {
2492
- let u = [];
2493
- a = {
2494
- ...r
2495
- }, a = a.replace && typeof a.replace != "string" ? a.replace : a, a.applyPostProcessor = !1, delete a.defaultValue;
2496
- let c = !1;
2497
- if (s[0].indexOf(this.formatSeparator) !== -1 && !/{.*}/.test(s[1])) {
2498
- const d = s[1].split(this.formatSeparator).map((f) => f.trim());
2499
- s[1] = d.shift(), u = d, c = !0;
2500
- }
2501
- if (i = n(o.call(this, s[1].trim(), a), a), i && s[0] === t && typeof i != "string")
2502
- return i;
2503
- typeof i != "string" && (i = ct(i)), i || (this.logger.warn(`missed to resolve ${s[1]} for nesting ${t}`), i = ""), c && (i = u.reduce((d, f) => this.format(d, f, r.lng, {
2504
- ...r,
2505
- interpolationkey: s[1].trim()
2506
- }), i.trim())), t = t.replace(s[0], i), this.regexp.lastIndex = 0;
2507
- }
2508
- return t;
2509
- }
2510
- }
2511
- function Jr(e) {
2512
- let t = e.toLowerCase().trim();
2513
- const n = {};
2514
- if (e.indexOf("(") > -1) {
2515
- const r = e.split("(");
2516
- t = r[0].toLowerCase().trim();
2517
- const s = r[1].substring(0, r[1].length - 1);
2518
- t === "currency" && s.indexOf(":") < 0 ? n.currency || (n.currency = s.trim()) : t === "relativetime" && s.indexOf(":") < 0 ? n.range || (n.range = s.trim()) : s.split(";").forEach((a) => {
2519
- if (!a)
2520
- return;
2521
- const [o, ...u] = a.split(":"), c = u.join(":").trim().replace(/^'+|'+$/g, "");
2522
- n[o.trim()] || (n[o.trim()] = c), c === "false" && (n[o.trim()] = !1), c === "true" && (n[o.trim()] = !0), isNaN(c) || (n[o.trim()] = parseInt(c, 10));
2523
- });
2524
- }
2525
- return {
2526
- formatName: t,
2527
- formatOptions: n
2528
- };
2529
- }
2530
- function ee(e) {
2531
- const t = {};
2532
- return function(r, s, i) {
2533
- const a = s + JSON.stringify(i);
2534
- let o = t[a];
2535
- return o || (o = e(Pe(s), i), t[a] = o), o(r);
2536
- };
2537
- }
2538
- class Qr {
2539
- constructor() {
2540
- let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2541
- this.logger = k.create("formatter"), this.options = t, this.formats = {
2542
- number: ee((n, r) => {
2543
- const s = new Intl.NumberFormat(n, {
2544
- ...r
2545
- });
2546
- return (i) => s.format(i);
2547
- }),
2548
- currency: ee((n, r) => {
2549
- const s = new Intl.NumberFormat(n, {
2550
- ...r,
2551
- style: "currency"
2552
- });
2553
- return (i) => s.format(i);
2554
- }),
2555
- datetime: ee((n, r) => {
2556
- const s = new Intl.DateTimeFormat(n, {
2557
- ...r
2558
- });
2559
- return (i) => s.format(i);
2560
- }),
2561
- relativetime: ee((n, r) => {
2562
- const s = new Intl.RelativeTimeFormat(n, {
2563
- ...r
2564
- });
2565
- return (i) => s.format(i, r.range || "day");
2566
- }),
2567
- list: ee((n, r) => {
2568
- const s = new Intl.ListFormat(n, {
2569
- ...r
2570
- });
2571
- return (i) => s.format(i);
2572
- })
2573
- }, this.init(t);
2574
- }
2575
- init(t) {
2576
- const r = (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
2577
- interpolation: {}
2578
- }).interpolation;
2579
- this.formatSeparator = r.formatSeparator ? r.formatSeparator : r.formatSeparator || ",";
2580
- }
2581
- add(t, n) {
2582
- this.formats[t.toLowerCase().trim()] = n;
2583
- }
2584
- addCached(t, n) {
2585
- this.formats[t.toLowerCase().trim()] = ee(n);
2586
- }
2587
- format(t, n, r) {
2588
- let s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
2589
- return n.split(this.formatSeparator).reduce((o, u) => {
2590
- const {
2591
- formatName: c,
2592
- formatOptions: d
2593
- } = Jr(u);
2594
- if (this.formats[c]) {
2595
- let f = o;
2596
- try {
2597
- const l = s && s.formatParams && s.formatParams[s.interpolationkey] || {}, g = l.locale || l.lng || s.locale || s.lng || r;
2598
- f = this.formats[c](o, g, {
2599
- ...d,
2600
- ...s,
2601
- ...l
2602
- });
2603
- } catch (l) {
2604
- this.logger.warn(l);
2605
- }
2606
- return f;
2607
- } else
2608
- this.logger.warn(`there was no format function for ${c}`);
2609
- return o;
2610
- }, t);
2611
- }
2612
- }
2613
- function Yr(e, t) {
2614
- e.pending[t] !== void 0 && (delete e.pending[t], e.pendingCount--);
2615
- }
2616
- class Xr extends Le {
2617
- constructor(t, n, r) {
2618
- let s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
2619
- super(), this.backend = t, this.store = n, this.services = r, this.languageUtils = r.languageUtils, this.options = s, this.logger = k.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = s.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = s.maxRetries >= 0 ? s.maxRetries : 5, this.retryTimeout = s.retryTimeout >= 1 ? s.retryTimeout : 350, this.state = {}, this.queue = [], this.backend && this.backend.init && this.backend.init(r, s.backend, s);
2620
- }
2621
- queueLoad(t, n, r, s) {
2622
- const i = {}, a = {}, o = {}, u = {};
2623
- return t.forEach((c) => {
2624
- let d = !0;
2625
- n.forEach((f) => {
2626
- const l = `${c}|${f}`;
2627
- !r.reload && this.store.hasResourceBundle(c, f) ? this.state[l] = 2 : this.state[l] < 0 || (this.state[l] === 1 ? a[l] === void 0 && (a[l] = !0) : (this.state[l] = 1, d = !1, a[l] === void 0 && (a[l] = !0), i[l] === void 0 && (i[l] = !0), u[f] === void 0 && (u[f] = !0)));
2628
- }), d || (o[c] = !0);
2629
- }), (Object.keys(i).length || Object.keys(a).length) && this.queue.push({
2630
- pending: a,
2631
- pendingCount: Object.keys(a).length,
2632
- loaded: {},
2633
- errors: [],
2634
- callback: s
2635
- }), {
2636
- toLoad: Object.keys(i),
2637
- pending: Object.keys(a),
2638
- toLoadLanguages: Object.keys(o),
2639
- toLoadNamespaces: Object.keys(u)
2640
- };
2641
- }
2642
- loaded(t, n, r) {
2643
- const s = t.split("|"), i = s[0], a = s[1];
2644
- n && this.emit("failedLoading", i, a, n), r && this.store.addResourceBundle(i, a, r), this.state[t] = n ? -1 : 2;
2645
- const o = {};
2646
- this.queue.forEach((u) => {
2647
- $r(u.loaded, [i], a), Yr(u, t), n && u.errors.push(n), u.pendingCount === 0 && !u.done && (Object.keys(u.loaded).forEach((c) => {
2648
- o[c] || (o[c] = {});
2649
- const d = u.loaded[c];
2650
- d.length && d.forEach((f) => {
2651
- o[c][f] === void 0 && (o[c][f] = !0);
2652
- });
2653
- }), u.done = !0, u.errors.length ? u.callback(u.errors) : u.callback());
2654
- }), this.emit("loaded", o), this.queue = this.queue.filter((u) => !u.done);
2655
- }
2656
- read(t, n, r) {
2657
- let s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0, i = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : this.retryTimeout, a = arguments.length > 5 ? arguments[5] : void 0;
2658
- if (!t.length)
2659
- return a(null, {});
2660
- if (this.readingCalls >= this.maxParallelReads) {
2661
- this.waitingReads.push({
2662
- lng: t,
2663
- ns: n,
2664
- fcName: r,
2665
- tried: s,
2666
- wait: i,
2667
- callback: a
2668
- });
2669
- return;
2670
- }
2671
- this.readingCalls++;
2672
- const o = (c, d) => {
2673
- if (this.readingCalls--, this.waitingReads.length > 0) {
2674
- const f = this.waitingReads.shift();
2675
- this.read(f.lng, f.ns, f.fcName, f.tried, f.wait, f.callback);
2676
- }
2677
- if (c && d && s < this.maxRetries) {
2678
- setTimeout(() => {
2679
- this.read.call(this, t, n, r, s + 1, i * 2, a);
2680
- }, i);
2681
- return;
2682
- }
2683
- a(c, d);
2684
- }, u = this.backend[r].bind(this.backend);
2685
- if (u.length === 2) {
2686
- try {
2687
- const c = u(t, n);
2688
- c && typeof c.then == "function" ? c.then((d) => o(null, d)).catch(o) : o(null, c);
2689
- } catch (c) {
2690
- o(c);
2691
- }
2692
- return;
2693
- }
2694
- return u(t, n, o);
2695
- }
2696
- prepareLoading(t, n) {
2697
- let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, s = arguments.length > 3 ? arguments[3] : void 0;
2698
- if (!this.backend)
2699
- return this.logger.warn("No backend was added via i18next.use. Will not load resources."), s && s();
2700
- typeof t == "string" && (t = this.languageUtils.toResolveHierarchy(t)), typeof n == "string" && (n = [n]);
2701
- const i = this.queueLoad(t, n, r, s);
2702
- if (!i.toLoad.length)
2703
- return i.pending.length || s(), null;
2704
- i.toLoad.forEach((a) => {
2705
- this.loadOne(a);
2706
- });
2707
- }
2708
- load(t, n, r) {
2709
- this.prepareLoading(t, n, {}, r);
2710
- }
2711
- reload(t, n, r) {
2712
- this.prepareLoading(t, n, {
2713
- reload: !0
2714
- }, r);
2715
- }
2716
- loadOne(t) {
2717
- let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
2718
- const r = t.split("|"), s = r[0], i = r[1];
2719
- this.read(s, i, "read", void 0, void 0, (a, o) => {
2720
- a && this.logger.warn(`${n}loading namespace ${i} for language ${s} failed`, a), !a && o && this.logger.log(`${n}loaded namespace ${i} for language ${s}`, o), this.loaded(t, a, o);
2721
- });
2722
- }
2723
- saveMissing(t, n, r, s, i) {
2724
- let a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {}, o = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : () => {
2725
- };
2726
- if (this.services.utils && this.services.utils.hasLoadedNamespace && !this.services.utils.hasLoadedNamespace(n)) {
2727
- this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");
2728
- return;
2729
- }
2730
- if (!(r == null || r === "")) {
2731
- if (this.backend && this.backend.create) {
2732
- const u = {
2733
- ...a,
2734
- isUpdate: i
2735
- }, c = this.backend.create.bind(this.backend);
2736
- if (c.length < 6)
2737
- try {
2738
- let d;
2739
- c.length === 5 ? d = c(t, n, r, s, u) : d = c(t, n, r, s), d && typeof d.then == "function" ? d.then((f) => o(null, f)).catch(o) : o(null, d);
2740
- } catch (d) {
2741
- o(d);
2742
- }
2743
- else
2744
- c(t, n, r, s, o, u);
2745
- }
2746
- !t || !t[0] || this.store.addResource(t[0], n, r, s);
2747
- }
2748
- }
2749
- }
2750
- function yt() {
2751
- return {
2752
- debug: !1,
2753
- initImmediate: !0,
2754
- ns: ["translation"],
2755
- defaultNS: ["translation"],
2756
- fallbackLng: ["dev"],
2757
- fallbackNS: !1,
2758
- supportedLngs: !1,
2759
- nonExplicitSupportedLngs: !1,
2760
- load: "all",
2761
- preload: !1,
2762
- simplifyPluralSuffix: !0,
2763
- keySeparator: ".",
2764
- nsSeparator: ":",
2765
- pluralSeparator: "_",
2766
- contextSeparator: "_",
2767
- partialBundledLanguages: !1,
2768
- saveMissing: !1,
2769
- updateMissing: !1,
2770
- saveMissingTo: "fallback",
2771
- saveMissingPlurals: !0,
2772
- missingKeyHandler: !1,
2773
- missingInterpolationHandler: !1,
2774
- postProcess: !1,
2775
- postProcessPassResolved: !1,
2776
- returnNull: !1,
2777
- returnEmptyString: !0,
2778
- returnObjects: !1,
2779
- joinArrays: !1,
2780
- returnedObjectHandler: !1,
2781
- parseMissingKeyHandler: !1,
2782
- appendNamespaceToMissingKey: !1,
2783
- appendNamespaceToCIMode: !1,
2784
- overloadTranslationOptionHandler: function(t) {
2785
- let n = {};
2786
- if (typeof t[1] == "object" && (n = t[1]), typeof t[1] == "string" && (n.defaultValue = t[1]), typeof t[2] == "string" && (n.tDescription = t[2]), typeof t[2] == "object" || typeof t[3] == "object") {
2787
- const r = t[3] || t[2];
2788
- Object.keys(r).forEach((s) => {
2789
- n[s] = r[s];
2790
- });
2791
- }
2792
- return n;
2793
- },
2794
- interpolation: {
2795
- escapeValue: !0,
2796
- format: (e, t, n, r) => e,
2797
- prefix: "{{",
2798
- suffix: "}}",
2799
- formatSeparator: ",",
2800
- unescapePrefix: "-",
2801
- nestingPrefix: "$t(",
2802
- nestingSuffix: ")",
2803
- nestingOptionsSeparator: ",",
2804
- maxReplaces: 1e3,
2805
- skipOnVariables: !0
2806
- }
2807
- };
2808
- }
2809
- function bt(e) {
2810
- return typeof e.ns == "string" && (e.ns = [e.ns]), typeof e.fallbackLng == "string" && (e.fallbackLng = [e.fallbackLng]), typeof e.fallbackNS == "string" && (e.fallbackNS = [e.fallbackNS]), e.supportedLngs && e.supportedLngs.indexOf("cimode") < 0 && (e.supportedLngs = e.supportedLngs.concat(["cimode"])), e;
2811
- }
2812
- function me() {
2813
- }
2814
- function Zr(e) {
2815
- Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((n) => {
2816
- typeof e[n] == "function" && (e[n] = e[n].bind(e));
2817
- });
2818
- }
2819
- class ce extends Le {
2820
- constructor() {
2821
- let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = arguments.length > 1 ? arguments[1] : void 0;
2822
- if (super(), this.options = bt(t), this.services = {}, this.logger = k, this.modules = {
2823
- external: []
2824
- }, Zr(this), n && !this.isInitialized && !t.isClone) {
2825
- if (!this.options.initImmediate)
2826
- return this.init(t, n), this;
2827
- setTimeout(() => {
2828
- this.init(t, n);
2829
- }, 0);
2830
- }
2831
- }
2832
- init() {
2833
- var t = this;
2834
- let n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, r = arguments.length > 1 ? arguments[1] : void 0;
2835
- typeof n == "function" && (r = n, n = {}), !n.defaultNS && n.defaultNS !== !1 && n.ns && (typeof n.ns == "string" ? n.defaultNS = n.ns : n.ns.indexOf("translation") < 0 && (n.defaultNS = n.ns[0]));
2836
- const s = yt();
2837
- this.options = {
2838
- ...s,
2839
- ...this.options,
2840
- ...bt(n)
2841
- }, this.options.compatibilityAPI !== "v1" && (this.options.interpolation = {
2842
- ...s.interpolation,
2843
- ...this.options.interpolation
2844
- }), n.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = n.keySeparator), n.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = n.nsSeparator);
2845
- function i(d) {
2846
- return d ? typeof d == "function" ? new d() : d : null;
2847
- }
2848
- if (!this.options.isClone) {
2849
- this.modules.logger ? k.init(i(this.modules.logger), this.options) : k.init(null, this.options);
2850
- let d;
2851
- this.modules.formatter ? d = this.modules.formatter : typeof Intl < "u" && (d = Qr);
2852
- const f = new gt(this.options);
2853
- this.store = new ft(this.options.resources, this.options);
2854
- const l = this.services;
2855
- l.logger = k, l.resourceStore = this.store, l.languageUtils = f, l.pluralResolver = new Gr(f, {
2856
- prepend: this.options.pluralSeparator,
2857
- compatibilityJSON: this.options.compatibilityJSON,
2858
- simplifyPluralSuffix: this.options.simplifyPluralSuffix
2859
- }), d && (!this.options.interpolation.format || this.options.interpolation.format === s.interpolation.format) && (l.formatter = i(d), l.formatter.init(l, this.options), this.options.interpolation.format = l.formatter.format.bind(l.formatter)), l.interpolator = new zr(this.options), l.utils = {
2860
- hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
2861
- }, l.backendConnector = new Xr(i(this.modules.backend), l.resourceStore, l, this.options), l.backendConnector.on("*", function(g) {
2862
- for (var p = arguments.length, y = new Array(p > 1 ? p - 1 : 0), h = 1; h < p; h++)
2863
- y[h - 1] = arguments[h];
2864
- t.emit(g, ...y);
2865
- }), this.modules.languageDetector && (l.languageDetector = i(this.modules.languageDetector), l.languageDetector.init && l.languageDetector.init(l, this.options.detection, this.options)), this.modules.i18nFormat && (l.i18nFormat = i(this.modules.i18nFormat), l.i18nFormat.init && l.i18nFormat.init(this)), this.translator = new Fe(this.services, this.options), this.translator.on("*", function(g) {
2866
- for (var p = arguments.length, y = new Array(p > 1 ? p - 1 : 0), h = 1; h < p; h++)
2867
- y[h - 1] = arguments[h];
2868
- t.emit(g, ...y);
2869
- }), this.modules.external.forEach((g) => {
2870
- g.init && g.init(this);
2871
- });
2872
- }
2873
- if (this.format = this.options.interpolation.format, r || (r = me), this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
2874
- const d = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
2875
- d.length > 0 && d[0] !== "dev" && (this.options.lng = d[0]);
2876
- }
2877
- !this.services.languageDetector && !this.options.lng && this.logger.warn("init: no languageDetector is used and no lng is defined"), ["getResource", "hasResourceBundle", "getResourceBundle", "getDataByLanguage"].forEach((d) => {
2878
- this[d] = function() {
2879
- return t.store[d](...arguments);
2880
- };
2881
- }), ["addResource", "addResources", "addResourceBundle", "removeResourceBundle"].forEach((d) => {
2882
- this[d] = function() {
2883
- return t.store[d](...arguments), t;
2884
- };
2885
- });
2886
- const u = le(), c = () => {
2887
- const d = (f, l) => {
2888
- this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"), this.isInitialized = !0, this.options.isClone || this.logger.log("initialized", this.options), this.emit("initialized", this.options), u.resolve(l), r(f, l);
2889
- };
2890
- if (this.languages && this.options.compatibilityAPI !== "v1" && !this.isInitialized)
2891
- return d(null, this.t.bind(this));
2892
- this.changeLanguage(this.options.lng, d);
2893
- };
2894
- return this.options.resources || !this.options.initImmediate ? c() : setTimeout(c, 0), u;
2895
- }
2896
- loadResources(t) {
2897
- let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : me;
2898
- const s = typeof t == "string" ? t : this.language;
2899
- if (typeof t == "function" && (r = t), !this.options.resources || this.options.partialBundledLanguages) {
2900
- if (s && s.toLowerCase() === "cimode")
2901
- return r();
2902
- const i = [], a = (o) => {
2903
- if (!o)
2904
- return;
2905
- this.services.languageUtils.toResolveHierarchy(o).forEach((c) => {
2906
- i.indexOf(c) < 0 && i.push(c);
2907
- });
2908
- };
2909
- s ? a(s) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((u) => a(u)), this.options.preload && this.options.preload.forEach((o) => a(o)), this.services.backendConnector.load(i, this.options.ns, (o) => {
2910
- !o && !this.resolvedLanguage && this.language && this.setResolvedLanguage(this.language), r(o);
2911
- });
2912
- } else
2913
- r(null);
2914
- }
2915
- reloadResources(t, n, r) {
2916
- const s = le();
2917
- return t || (t = this.languages), n || (n = this.options.ns), r || (r = me), this.services.backendConnector.reload(t, n, (i) => {
2918
- s.resolve(), r(i);
2919
- }), s;
2920
- }
2921
- use(t) {
2922
- if (!t)
2923
- throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");
2924
- if (!t.type)
2925
- throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");
2926
- return t.type === "backend" && (this.modules.backend = t), (t.type === "logger" || t.log && t.warn && t.error) && (this.modules.logger = t), t.type === "languageDetector" && (this.modules.languageDetector = t), t.type === "i18nFormat" && (this.modules.i18nFormat = t), t.type === "postProcessor" && Kt.addPostProcessor(t), t.type === "formatter" && (this.modules.formatter = t), t.type === "3rdParty" && this.modules.external.push(t), this;
2927
- }
2928
- setResolvedLanguage(t) {
2929
- if (!(!t || !this.languages) && !(["cimode", "dev"].indexOf(t) > -1))
2930
- for (let n = 0; n < this.languages.length; n++) {
2931
- const r = this.languages[n];
2932
- if (!(["cimode", "dev"].indexOf(r) > -1) && this.store.hasLanguageSomeTranslations(r)) {
2933
- this.resolvedLanguage = r;
2934
- break;
2935
- }
2936
- }
2937
- }
2938
- changeLanguage(t, n) {
2939
- var r = this;
2940
- this.isLanguageChangingTo = t;
2941
- const s = le();
2942
- this.emit("languageChanging", t);
2943
- const i = (u) => {
2944
- this.language = u, this.languages = this.services.languageUtils.toResolveHierarchy(u), this.resolvedLanguage = void 0, this.setResolvedLanguage(u);
2945
- }, a = (u, c) => {
2946
- c ? (i(c), this.translator.changeLanguage(c), this.isLanguageChangingTo = void 0, this.emit("languageChanged", c), this.logger.log("languageChanged", c)) : this.isLanguageChangingTo = void 0, s.resolve(function() {
2947
- return r.t(...arguments);
2948
- }), n && n(u, function() {
2949
- return r.t(...arguments);
2950
- });
2951
- }, o = (u) => {
2952
- !t && !u && this.services.languageDetector && (u = []);
2953
- const c = typeof u == "string" ? u : this.services.languageUtils.getBestMatchFromCodes(u);
2954
- c && (this.language || i(c), this.translator.language || this.translator.changeLanguage(c), this.services.languageDetector && this.services.languageDetector.cacheUserLanguage && this.services.languageDetector.cacheUserLanguage(c)), this.loadResources(c, (d) => {
2955
- a(d, c);
2956
- });
2957
- };
2958
- return !t && this.services.languageDetector && !this.services.languageDetector.async ? o(this.services.languageDetector.detect()) : !t && this.services.languageDetector && this.services.languageDetector.async ? this.services.languageDetector.detect.length === 0 ? this.services.languageDetector.detect().then(o) : this.services.languageDetector.detect(o) : o(t), s;
2959
- }
2960
- getFixedT(t, n, r) {
2961
- var s = this;
2962
- const i = function(a, o) {
2963
- let u;
2964
- if (typeof o != "object") {
2965
- for (var c = arguments.length, d = new Array(c > 2 ? c - 2 : 0), f = 2; f < c; f++)
2966
- d[f - 2] = arguments[f];
2967
- u = s.options.overloadTranslationOptionHandler([a, o].concat(d));
2968
- } else
2969
- u = {
2970
- ...o
2971
- };
2972
- u.lng = u.lng || i.lng, u.lngs = u.lngs || i.lngs, u.ns = u.ns || i.ns, u.keyPrefix = u.keyPrefix || r || i.keyPrefix;
2973
- const l = s.options.keySeparator || ".";
2974
- let g;
2975
- return u.keyPrefix && Array.isArray(a) ? g = a.map((p) => `${u.keyPrefix}${l}${p}`) : g = u.keyPrefix ? `${u.keyPrefix}${l}${a}` : a, s.t(g, u);
2976
- };
2977
- return typeof t == "string" ? i.lng = t : i.lngs = t, i.ns = n, i.keyPrefix = r, i;
2978
- }
2979
- t() {
2980
- return this.translator && this.translator.translate(...arguments);
2981
- }
2982
- exists() {
2983
- return this.translator && this.translator.exists(...arguments);
2984
- }
2985
- setDefaultNamespace(t) {
2986
- this.options.defaultNS = t;
2987
- }
2988
- hasLoadedNamespace(t) {
2989
- let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2990
- if (!this.isInitialized)
2991
- return this.logger.warn("hasLoadedNamespace: i18next was not initialized", this.languages), !1;
2992
- if (!this.languages || !this.languages.length)
2993
- return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty", this.languages), !1;
2994
- const r = n.lng || this.resolvedLanguage || this.languages[0], s = this.options ? this.options.fallbackLng : !1, i = this.languages[this.languages.length - 1];
2995
- if (r.toLowerCase() === "cimode")
2996
- return !0;
2997
- const a = (o, u) => {
2998
- const c = this.services.backendConnector.state[`${o}|${u}`];
2999
- return c === -1 || c === 2;
3000
- };
3001
- if (n.precheck) {
3002
- const o = n.precheck(this, a);
3003
- if (o !== void 0)
3004
- return o;
3005
- }
3006
- return !!(this.hasResourceBundle(r, t) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || a(r, t) && (!s || a(i, t)));
3007
- }
3008
- loadNamespaces(t, n) {
3009
- const r = le();
3010
- return this.options.ns ? (typeof t == "string" && (t = [t]), t.forEach((s) => {
3011
- this.options.ns.indexOf(s) < 0 && this.options.ns.push(s);
3012
- }), this.loadResources((s) => {
3013
- r.resolve(), n && n(s);
3014
- }), r) : (n && n(), Promise.resolve());
3015
- }
3016
- loadLanguages(t, n) {
3017
- const r = le();
3018
- typeof t == "string" && (t = [t]);
3019
- const s = this.options.preload || [], i = t.filter((a) => s.indexOf(a) < 0);
3020
- return i.length ? (this.options.preload = s.concat(i), this.loadResources((a) => {
3021
- r.resolve(), n && n(a);
3022
- }), r) : (n && n(), Promise.resolve());
3023
- }
3024
- dir(t) {
3025
- if (t || (t = this.resolvedLanguage || (this.languages && this.languages.length > 0 ? this.languages[0] : this.language)), !t)
3026
- return "rtl";
3027
- const n = ["ar", "shu", "sqr", "ssh", "xaa", "yhd", "yud", "aao", "abh", "abv", "acm", "acq", "acw", "acx", "acy", "adf", "ads", "aeb", "aec", "afb", "ajp", "apc", "apd", "arb", "arq", "ars", "ary", "arz", "auz", "avl", "ayh", "ayl", "ayn", "ayp", "bbz", "pga", "he", "iw", "ps", "pbt", "pbu", "pst", "prp", "prd", "ug", "ur", "ydd", "yds", "yih", "ji", "yi", "hbo", "men", "xmn", "fa", "jpr", "peo", "pes", "prs", "dv", "sam", "ckb"], r = this.services && this.services.languageUtils || new gt(yt());
3028
- return n.indexOf(r.getLanguagePartFromCode(t)) > -1 || t.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr";
3029
- }
3030
- static createInstance() {
3031
- let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = arguments.length > 1 ? arguments[1] : void 0;
3032
- return new ce(t, n);
3033
- }
3034
- cloneInstance() {
3035
- let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : me;
3036
- const r = t.forkResourceStore;
3037
- r && delete t.forkResourceStore;
3038
- const s = {
3039
- ...this.options,
3040
- ...t,
3041
- isClone: !0
3042
- }, i = new ce(s);
3043
- return (t.debug !== void 0 || t.prefix !== void 0) && (i.logger = i.logger.clone(t)), ["store", "services", "language"].forEach((o) => {
3044
- i[o] = this[o];
3045
- }), i.services = {
3046
- ...this.services
3047
- }, i.services.utils = {
3048
- hasLoadedNamespace: i.hasLoadedNamespace.bind(i)
3049
- }, r && (i.store = new ft(this.store.data, s), i.services.resourceStore = i.store), i.translator = new Fe(i.services, s), i.translator.on("*", function(o) {
3050
- for (var u = arguments.length, c = new Array(u > 1 ? u - 1 : 0), d = 1; d < u; d++)
3051
- c[d - 1] = arguments[d];
3052
- i.emit(o, ...c);
3053
- }), i.init(s, n), i.translator.options = s, i.translator.backendConnector.services.utils = {
3054
- hasLoadedNamespace: i.hasLoadedNamespace.bind(i)
3055
- }, i;
3056
- }
3057
- toJSON() {
3058
- return {
3059
- options: this.options,
3060
- store: this.store,
3061
- language: this.language,
3062
- languages: this.languages,
3063
- resolvedLanguage: this.resolvedLanguage
3064
- };
3065
- }
3066
- }
3067
- const j = ce.createInstance();
3068
- j.createInstance = ce.createInstance;
3069
- j.createInstance;
3070
- j.dir;
3071
- j.init;
3072
- j.loadResources;
3073
- j.reloadResources;
3074
- j.use;
3075
- j.changeLanguage;
3076
- j.getFixedT;
3077
- j.t;
3078
- j.exists;
3079
- j.setDefaultNamespace;
3080
- j.hasLoadedNamespace;
3081
- j.loadNamespaces;
3082
- j.loadLanguages;
3083
- const es = {
3084
- error: "Error"
3085
- }, ts = {
3086
- error: "Помилка"
3087
- }, St = "common", ns = {
3088
- en: es,
3089
- uk: ts
3090
- }, I = j.createInstance({
3091
- defaultNS: St,
3092
- resources: ss(ns, St),
3093
- lng: "en",
3094
- fallbackLng: "en"
3095
- }), Gt = {
3096
- i18nextInstance: I,
3097
- initPromise: I.init().then(() => I)
3098
- }, ye = /* @__PURE__ */ new Map();
3099
- ye.set("common", Gt);
3100
- const rs = (e) => {
3101
- if (ye.has(e.namespace))
3102
- return ye.get(e.namespace);
3103
- if (e.plugins)
3104
- for (const i of e.plugins)
3105
- I.use(i);
3106
- Object.keys(e.resource).forEach((i) => {
3107
- I.addResourceBundle(i, e.namespace, e.resource[i]);
3108
- });
3109
- const t = I.cloneInstance({
3110
- defaultNS: e.namespace
3111
- });
3112
- let n = Gt.initPromise.then(() => t);
3113
- t.on("languageChanged", (i) => {
3114
- I.language !== i && I.changeLanguage(i);
3115
- }), I.on("languageChanged", (i) => {
3116
- t.language !== i && t.changeLanguage(i);
3117
- });
3118
- const r = e.language || "en";
3119
- I.language !== r && (n = n.then(() => t.changeLanguage(r)).then(() => t));
3120
- const s = { initPromise: n, i18nextInstance: t };
3121
- return ye.set(e.namespace, s), s;
3122
- };
3123
- function ss(e, t) {
3124
- return Object.keys(e).reduce((n, r) => (n[r] = {
3125
- [t]: e[r]
3126
- }, n), {});
3127
- }
3128
- function is(e) {
3129
- return e && e.replace(new RegExp("(?<!\\\\)'", "g"), "\\'");
3130
- }
3131
- const as = {
3132
- errors: {
3133
- measure: {
3134
- unsupportedType: "Unsupported measure type for measure: {{measureName}}",
3135
- dimensionalCalculatedMeasure: {
3136
- noContext: "DimensionalCalculatedMeasure {{measureName}} must have 'context' property"
3137
- },
3138
- dimensionalBaseMeasure: {
3139
- noAttributeDimExpression: "DimensionalBaseMeasure {{measureName}} must have 'attribute'/'dim'/'expression' property",
3140
- noAggAggregation: "DimensionalBaseMeasure {{measureName}} must have 'agg' or 'aggregation' property"
3141
- }
3142
- },
3143
- dataModel: {
3144
- noName: "'name' must be specified in config for DataModel",
3145
- noMetadata: "'metadata' must be specified in config for DataModel"
3146
- },
3147
- filter: {
3148
- unsupportedType: "Unsupported filter type: {{filterType}}",
3149
- unsupportedDatetimeLevel: 'Filters do not support the following "datetime" levels: Hours, MinutesRoundTo30, MinutesRoundTo15, Minutes, Seconds',
3150
- membersFilterNullMember: "MembersFilter of {{attributeId}} - member cannot be null",
3151
- unsupportedConditionFilter: "Jaql for {{attributeName}} contains unsupported condition filter: {{filter}}",
3152
- formulaFiltersNotSupported: "Formula-based filter for {{attributeName}} not supported yet: {{filter}}"
3153
- },
3154
- unsupportedDimensionalElement: "Unsupported dimensional element type"
3155
- }
3156
- }, os = {
3157
- errors: {
3158
- measure: {
3159
- unsupportedType: "Непідтримуваний тип measure: {{measureName}}",
3160
- dimensionalCalculatedMeasure: {
3161
- noContext: "DimensionalCalculatedMeasure {{measureName}} має мати властивість 'context'"
3162
- },
3163
- dimensionalBaseMeasure: {
3164
- noAttributeDimExpression: "DimensionalBaseMeasure {{measureName}} має мати властивість 'attribute'/'dim'/'expression'",
3165
- noAggAggregation: "DimensionalBaseMeasure {{measureName}} має мати властивість 'agg' або 'aggregation'"
3166
- }
3167
- },
3168
- dataModel: {
3169
- noName: "'name' має бути вказано в конфігурації для DataModel",
3170
- noMetadata: "'metadata' має бути вказано в конфігурації для DataModel"
3171
- },
3172
- filter: {
3173
- unsupportedType: "Непідтримуваний тип фільтра: {{filterType}}",
3174
- unsupportedDatetimeLevel: 'Фільтри не підтримують наступні рівні "datetime": Hours, MinutesRoundTo30, MinutesRoundTo15, Minutes, Seconds',
3175
- membersFilterNullMember: "MembersFilter у {{attributeId}} - member не може бути нульовим",
3176
- unsupportedConditionFilter: "Jaql для {{attributeName}} містить непідтримуваний condition фільтр: {{filter}}",
3177
- formulaFiltersNotSupported: "Фільтри, що містять формули для {{attributeName}} наразі не підтримуються: {{filter}}"
3178
- },
3179
- unsupportedDimensionalElement: "Непідтримуваний тип елемента"
3180
- }
3181
- }, us = "sdkData", ls = {
3182
- en: as,
3183
- uk: os
3184
- };
3185
- function cs() {
3186
- return rs({
3187
- resource: ls,
3188
- language: "en",
3189
- namespace: us
3190
- });
3191
- }
3192
- cs();
3193
- function ds() {
3194
- this.__data__ = [], this.size = 0;
3195
- }
3196
- function zt(e, t) {
3197
- return e === t || e !== e && t !== t;
3198
- }
3199
- function Ee(e, t) {
3200
- for (var n = e.length; n--; )
3201
- if (zt(e[n][0], t))
3202
- return n;
3203
- return -1;
3204
- }
3205
- var fs = Array.prototype, ps = fs.splice;
3206
- function gs(e) {
3207
- var t = this.__data__, n = Ee(t, e);
3208
- if (n < 0)
3209
- return !1;
3210
- var r = t.length - 1;
3211
- return n == r ? t.pop() : ps.call(t, n, 1), --this.size, !0;
3212
- }
3213
- function hs(e) {
3214
- var t = this.__data__, n = Ee(t, e);
3215
- return n < 0 ? void 0 : t[n][1];
3216
- }
3217
- function ms(e) {
3218
- return Ee(this.__data__, e) > -1;
3219
- }
3220
- function ys(e, t) {
3221
- var n = this.__data__, r = Ee(n, e);
3222
- return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this;
3223
- }
3224
- function U(e) {
3225
- var t = -1, n = e == null ? 0 : e.length;
3226
- for (this.clear(); ++t < n; ) {
3227
- var r = e[t];
3228
- this.set(r[0], r[1]);
3229
- }
3230
- }
3231
- U.prototype.clear = ds;
3232
- U.prototype.delete = gs;
3233
- U.prototype.get = hs;
3234
- U.prototype.has = ms;
3235
- U.prototype.set = ys;
3236
- function bs() {
3237
- this.__data__ = new U(), this.size = 0;
3238
- }
3239
- function Ss(e) {
3240
- var t = this.__data__, n = t.delete(e);
3241
- return this.size = t.size, n;
3242
- }
3243
- function Os(e) {
3244
- return this.__data__.get(e);
3245
- }
3246
- function vs(e) {
3247
- return this.__data__.has(e);
3248
- }
3249
- var xs = q["__core-js_shared__"];
3250
- const $e = xs;
3251
- var Ot = function() {
3252
- var e = /[^.]+$/.exec($e && $e.keys && $e.keys.IE_PROTO || "");
3253
- return e ? "Symbol(src)_1." + e : "";
3254
- }();
3255
- function Cs(e) {
3256
- return !!Ot && Ot in e;
3257
- }
3258
- var ws = Function.prototype, Ds = ws.toString;
3259
- function Q(e) {
3260
- if (e != null) {
3261
- try {
3262
- return Ds.call(e);
3263
- } catch {
3264
- }
3265
- try {
3266
- return e + "";
3267
- } catch {
3268
- }
3269
- }
3270
- return "";
3271
- }
3272
- var js = /[\\^$.*+?()[\]{}|]/g, Ps = /^\[object .+?Constructor\]$/, Fs = Function.prototype, As = Object.prototype, Ls = Fs.toString, Es = As.hasOwnProperty, Ns = RegExp(
3273
- "^" + Ls.call(Es).replace(js, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
3274
- );
3275
- function Rs(e) {
3276
- if (!Ae(e) || Cs(e))
3277
- return !1;
3278
- var t = kn(e) ? Ns : Ps;
3279
- return t.test(Q(e));
3280
- }
3281
- function Ts(e, t) {
3282
- return e == null ? void 0 : e[t];
3283
- }
3284
- function Y(e, t) {
3285
- var n = Ts(e, t);
3286
- return Rs(n) ? n : void 0;
3287
- }
3288
- var Ms = Y(q, "Map");
3289
- const de = Ms;
3290
- var $s = Y(Object, "create");
3291
- const fe = $s;
3292
- function Is() {
3293
- this.__data__ = fe ? fe(null) : {}, this.size = 0;
3294
- }
3295
- function _s(e) {
3296
- var t = this.has(e) && delete this.__data__[e];
3297
- return this.size -= t ? 1 : 0, t;
3298
- }
3299
- var ks = "__lodash_hash_undefined__", Bs = Object.prototype, Us = Bs.hasOwnProperty;
3300
- function qs(e) {
3301
- var t = this.__data__;
3302
- if (fe) {
3303
- var n = t[e];
3304
- return n === ks ? void 0 : n;
3305
- }
3306
- return Us.call(t, e) ? t[e] : void 0;
3307
- }
3308
- var Vs = Object.prototype, Ws = Vs.hasOwnProperty;
3309
- function Hs(e) {
3310
- var t = this.__data__;
3311
- return fe ? t[e] !== void 0 : Ws.call(t, e);
3312
- }
3313
- var Ks = "__lodash_hash_undefined__";
3314
- function Gs(e, t) {
3315
- var n = this.__data__;
3316
- return this.size += this.has(e) ? 0 : 1, n[e] = fe && t === void 0 ? Ks : t, this;
3317
- }
3318
- function H(e) {
3319
- var t = -1, n = e == null ? 0 : e.length;
3320
- for (this.clear(); ++t < n; ) {
3321
- var r = e[t];
3322
- this.set(r[0], r[1]);
3323
- }
3324
- }
3325
- H.prototype.clear = Is;
3326
- H.prototype.delete = _s;
3327
- H.prototype.get = qs;
3328
- H.prototype.has = Hs;
3329
- H.prototype.set = Gs;
3330
- function zs() {
3331
- this.size = 0, this.__data__ = {
3332
- hash: new H(),
3333
- map: new (de || U)(),
3334
- string: new H()
3335
- };
3336
- }
3337
- function Js(e) {
3338
- var t = typeof e;
3339
- return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
3340
- }
3341
- function Ne(e, t) {
3342
- var n = e.__data__;
3343
- return Js(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map;
3344
- }
3345
- function Qs(e) {
3346
- var t = Ne(this, e).delete(e);
3347
- return this.size -= t ? 1 : 0, t;
3348
- }
3349
- function Ys(e) {
3350
- return Ne(this, e).get(e);
3351
- }
3352
- function Xs(e) {
3353
- return Ne(this, e).has(e);
3354
- }
3355
- function Zs(e, t) {
3356
- var n = Ne(this, e), r = n.size;
3357
- return n.set(e, t), this.size += n.size == r ? 0 : 1, this;
3358
- }
3359
- function re(e) {
3360
- var t = -1, n = e == null ? 0 : e.length;
3361
- for (this.clear(); ++t < n; ) {
3362
- var r = e[t];
3363
- this.set(r[0], r[1]);
3364
- }
3365
- }
3366
- re.prototype.clear = zs;
3367
- re.prototype.delete = Qs;
3368
- re.prototype.get = Ys;
3369
- re.prototype.has = Xs;
3370
- re.prototype.set = Zs;
3371
- var ei = 200;
3372
- function ti(e, t) {
3373
- var n = this.__data__;
3374
- if (n instanceof U) {
3375
- var r = n.__data__;
3376
- if (!de || r.length < ei - 1)
3377
- return r.push([e, t]), this.size = ++n.size, this;
3378
- n = this.__data__ = new re(r);
3379
- }
3380
- return n.set(e, t), this.size = n.size, this;
3381
- }
3382
- function se(e) {
3383
- var t = this.__data__ = new U(e);
3384
- this.size = t.size;
3385
- }
3386
- se.prototype.clear = bs;
3387
- se.prototype.delete = Ss;
3388
- se.prototype.get = Os;
3389
- se.prototype.has = vs;
3390
- se.prototype.set = ti;
3391
- function ni(e, t) {
3392
- for (var n = -1, r = e == null ? 0 : e.length; ++n < r && t(e[n], n, e) !== !1; )
3393
- ;
3394
- return e;
3395
- }
3396
- var ri = function() {
3397
- try {
3398
- var e = Y(Object, "defineProperty");
3399
- return e({}, "", {}), e;
3400
- } catch {
3401
- }
3402
- }();
3403
- const vt = ri;
3404
- function Jt(e, t, n) {
3405
- t == "__proto__" && vt ? vt(e, t, {
3406
- configurable: !0,
3407
- enumerable: !0,
3408
- value: n,
3409
- writable: !0
3410
- }) : e[t] = n;
3411
- }
3412
- var si = Object.prototype, ii = si.hasOwnProperty;
3413
- function Qt(e, t, n) {
3414
- var r = e[t];
3415
- (!(ii.call(e, t) && zt(r, n)) || n === void 0 && !(t in e)) && Jt(e, t, n);
3416
- }
3417
- function Re(e, t, n, r) {
3418
- var s = !n;
3419
- n || (n = {});
3420
- for (var i = -1, a = t.length; ++i < a; ) {
3421
- var o = t[i], u = r ? r(n[o], e[o], o, n, e) : void 0;
3422
- u === void 0 && (u = e[o]), s ? Jt(n, o, u) : Qt(n, o, u);
3423
- }
3424
- return n;
3425
- }
3426
- function ai(e, t) {
3427
- return e && Re(t, Qe(t), e);
3428
- }
3429
- function oi(e) {
3430
- var t = [];
3431
- if (e != null)
3432
- for (var n in Object(e))
3433
- t.push(n);
3434
- return t;
3435
- }
3436
- var ui = Object.prototype, li = ui.hasOwnProperty;
3437
- function ci(e) {
3438
- if (!Ae(e))
3439
- return oi(e);
3440
- var t = kt(e), n = [];
3441
- for (var r in e)
3442
- r == "constructor" && (t || !li.call(e, r)) || n.push(r);
3443
- return n;
3444
- }
3445
- function Ze(e) {
3446
- return Bn(e) ? Un(e, !0) : ci(e);
3447
- }
3448
- function di(e, t) {
3449
- return e && Re(t, Ze(t), e);
3450
- }
3451
- var Yt = typeof exports == "object" && exports && !exports.nodeType && exports, xt = Yt && typeof module == "object" && module && !module.nodeType && module, fi = xt && xt.exports === Yt, Ct = fi ? q.Buffer : void 0, wt = Ct ? Ct.allocUnsafe : void 0;
3452
- function pi(e, t) {
3453
- if (t)
3454
- return e.slice();
3455
- var n = e.length, r = wt ? wt(n) : new e.constructor(n);
3456
- return e.copy(r), r;
3457
- }
3458
- function gi(e, t) {
3459
- var n = -1, r = e.length;
3460
- for (t || (t = Array(r)); ++n < r; )
3461
- t[n] = e[n];
3462
- return t;
3463
- }
3464
- function hi(e, t) {
3465
- for (var n = -1, r = e == null ? 0 : e.length, s = 0, i = []; ++n < r; ) {
3466
- var a = e[n];
3467
- t(a, n, e) && (i[s++] = a);
3468
- }
3469
- return i;
3470
- }
3471
- function Xt() {
3472
- return [];
3473
- }
3474
- var mi = Object.prototype, yi = mi.propertyIsEnumerable, Dt = Object.getOwnPropertySymbols, bi = Dt ? function(e) {
3475
- return e == null ? [] : (e = Object(e), hi(Dt(e), function(t) {
3476
- return yi.call(e, t);
3477
- }));
3478
- } : Xt;
3479
- const et = bi;
3480
- function Si(e, t) {
3481
- return Re(e, et(e), t);
3482
- }
3483
- function Zt(e, t) {
3484
- for (var n = -1, r = t.length, s = e.length; ++n < r; )
3485
- e[s + n] = t[n];
3486
- return e;
3487
- }
3488
- var Oi = qn(Object.getPrototypeOf, Object);
3489
- const en = Oi;
3490
- var vi = Object.getOwnPropertySymbols, xi = vi ? function(e) {
3491
- for (var t = []; e; )
3492
- Zt(t, et(e)), e = en(e);
3493
- return t;
3494
- } : Xt;
3495
- const tn = xi;
3496
- function Ci(e, t) {
3497
- return Re(e, tn(e), t);
3498
- }
3499
- function nn(e, t, n) {
3500
- var r = t(e);
3501
- return Bt(e) ? r : Zt(r, n(e));
3502
- }
3503
- function wi(e) {
3504
- return nn(e, Qe, et);
3505
- }
3506
- function Di(e) {
3507
- return nn(e, Ze, tn);
3508
- }
3509
- var ji = Y(q, "DataView");
3510
- const He = ji;
3511
- var Pi = Y(q, "Promise");
3512
- const Ke = Pi;
3513
- var Fi = Y(q, "Set");
3514
- const Ge = Fi;
3515
- var Ai = Y(q, "WeakMap");
3516
- const ze = Ai;
3517
- var jt = "[object Map]", Li = "[object Object]", Pt = "[object Promise]", Ft = "[object Set]", At = "[object WeakMap]", Lt = "[object DataView]", Ei = Q(He), Ni = Q(de), Ri = Q(Ke), Ti = Q(Ge), Mi = Q(ze), W = Ut;
3518
- (He && W(new He(new ArrayBuffer(1))) != Lt || de && W(new de()) != jt || Ke && W(Ke.resolve()) != Pt || Ge && W(new Ge()) != Ft || ze && W(new ze()) != At) && (W = function(e) {
3519
- var t = Ut(e), n = t == Li ? e.constructor : void 0, r = n ? Q(n) : "";
3520
- if (r)
3521
- switch (r) {
3522
- case Ei:
3523
- return Lt;
3524
- case Ni:
3525
- return jt;
3526
- case Ri:
3527
- return Pt;
3528
- case Ti:
3529
- return Ft;
3530
- case Mi:
3531
- return At;
3532
- }
3533
- return t;
3534
- });
3535
- const tt = W;
3536
- var $i = Object.prototype, Ii = $i.hasOwnProperty;
3537
- function _i(e) {
3538
- var t = e.length, n = new e.constructor(t);
3539
- return t && typeof e[0] == "string" && Ii.call(e, "index") && (n.index = e.index, n.input = e.input), n;
3540
- }
3541
- var ki = q.Uint8Array;
3542
- const Et = ki;
3543
- function nt(e) {
3544
- var t = new e.constructor(e.byteLength);
3545
- return new Et(t).set(new Et(e)), t;
3546
- }
3547
- function Bi(e, t) {
3548
- var n = t ? nt(e.buffer) : e.buffer;
3549
- return new e.constructor(n, e.byteOffset, e.byteLength);
3550
- }
3551
- var Ui = /\w*$/;
3552
- function qi(e) {
3553
- var t = new e.constructor(e.source, Ui.exec(e));
3554
- return t.lastIndex = e.lastIndex, t;
3555
- }
3556
- var Nt = at ? at.prototype : void 0, Rt = Nt ? Nt.valueOf : void 0;
3557
- function Vi(e) {
3558
- return Rt ? Object(Rt.call(e)) : {};
3559
- }
3560
- function Wi(e, t) {
3561
- var n = t ? nt(e.buffer) : e.buffer;
3562
- return new e.constructor(n, e.byteOffset, e.length);
3563
- }
3564
- var Hi = "[object Boolean]", Ki = "[object Date]", Gi = "[object Map]", zi = "[object Number]", Ji = "[object RegExp]", Qi = "[object Set]", Yi = "[object String]", Xi = "[object Symbol]", Zi = "[object ArrayBuffer]", ea = "[object DataView]", ta = "[object Float32Array]", na = "[object Float64Array]", ra = "[object Int8Array]", sa = "[object Int16Array]", ia = "[object Int32Array]", aa = "[object Uint8Array]", oa = "[object Uint8ClampedArray]", ua = "[object Uint16Array]", la = "[object Uint32Array]";
3565
- function ca(e, t, n) {
3566
- var r = e.constructor;
3567
- switch (t) {
3568
- case Zi:
3569
- return nt(e);
3570
- case Hi:
3571
- case Ki:
3572
- return new r(+e);
3573
- case ea:
3574
- return Bi(e, n);
3575
- case ta:
3576
- case na:
3577
- case ra:
3578
- case sa:
3579
- case ia:
3580
- case aa:
3581
- case oa:
3582
- case ua:
3583
- case la:
3584
- return Wi(e, n);
3585
- case Gi:
3586
- return new r();
3587
- case zi:
3588
- case Yi:
3589
- return new r(e);
3590
- case Ji:
3591
- return qi(e);
3592
- case Qi:
3593
- return new r();
3594
- case Xi:
3595
- return Vi(e);
3596
- }
3597
- }
3598
- var Tt = Object.create, da = function() {
3599
- function e() {
3600
- }
3601
- return function(t) {
3602
- if (!Ae(t))
3603
- return {};
3604
- if (Tt)
3605
- return Tt(t);
3606
- e.prototype = t;
3607
- var n = new e();
3608
- return e.prototype = void 0, n;
3609
- };
3610
- }();
3611
- const fa = da;
3612
- function pa(e) {
3613
- return typeof e.constructor == "function" && !kt(e) ? fa(en(e)) : {};
3614
- }
3615
- var ga = "[object Map]";
3616
- function ha(e) {
3617
- return qt(e) && tt(e) == ga;
3618
- }
3619
- var Mt = Ce && Ce.isMap, ma = Mt ? Vt(Mt) : ha;
3620
- const ya = ma;
3621
- var ba = "[object Set]";
3622
- function Sa(e) {
3623
- return qt(e) && tt(e) == ba;
3624
- }
3625
- var $t = Ce && Ce.isSet, Oa = $t ? Vt($t) : Sa;
3626
- const va = Oa;
3627
- var xa = 1, Ca = 2, wa = 4, rn = "[object Arguments]", Da = "[object Array]", ja = "[object Boolean]", Pa = "[object Date]", Fa = "[object Error]", sn = "[object Function]", Aa = "[object GeneratorFunction]", La = "[object Map]", Ea = "[object Number]", an = "[object Object]", Na = "[object RegExp]", Ra = "[object Set]", Ta = "[object String]", Ma = "[object Symbol]", $a = "[object WeakMap]", Ia = "[object ArrayBuffer]", _a = "[object DataView]", ka = "[object Float32Array]", Ba = "[object Float64Array]", Ua = "[object Int8Array]", qa = "[object Int16Array]", Va = "[object Int32Array]", Wa = "[object Uint8Array]", Ha = "[object Uint8ClampedArray]", Ka = "[object Uint16Array]", Ga = "[object Uint32Array]", v = {};
3628
- v[rn] = v[Da] = v[Ia] = v[_a] = v[ja] = v[Pa] = v[ka] = v[Ba] = v[Ua] = v[qa] = v[Va] = v[La] = v[Ea] = v[an] = v[Na] = v[Ra] = v[Ta] = v[Ma] = v[Wa] = v[Ha] = v[Ka] = v[Ga] = !0;
3629
- v[Fa] = v[sn] = v[$a] = !1;
3630
- function be(e, t, n, r, s, i) {
3631
- var a, o = t & xa, u = t & Ca, c = t & wa;
3632
- if (n && (a = s ? n(e, r, s, i) : n(e)), a !== void 0)
3633
- return a;
3634
- if (!Ae(e))
3635
- return e;
3636
- var d = Bt(e);
3637
- if (d) {
3638
- if (a = _i(e), !o)
3639
- return gi(e, a);
3640
- } else {
3641
- var f = tt(e), l = f == sn || f == Aa;
3642
- if (Vn(e))
3643
- return pi(e, o);
3644
- if (f == an || f == rn || l && !s) {
3645
- if (a = u || l ? {} : pa(e), !o)
3646
- return u ? Ci(e, di(a, e)) : Si(e, ai(a, e));
3647
- } else {
3648
- if (!v[f])
3649
- return s ? e : {};
3650
- a = ca(e, f, o);
3651
- }
3652
- }
3653
- i || (i = new se());
3654
- var g = i.get(e);
3655
- if (g)
3656
- return g;
3657
- i.set(e, a), va(e) ? e.forEach(function(h) {
3658
- a.add(be(h, t, n, h, e, i));
3659
- }) : ya(e) && e.forEach(function(h, x) {
3660
- a.set(x, be(h, t, n, x, e, i));
3661
- });
3662
- var p = c ? u ? Di : wi : u ? Ze : Qe, y = d ? void 0 : p(e);
3663
- return ni(y || e, function(h, x) {
3664
- y && (x = h, h = e[x]), Qt(a, x, be(h, t, n, x, e, i));
3665
- }), a;
3666
- }
3667
- var za = 1, Ja = 4;
3668
- function Qa(e) {
3669
- return be(e, za | Ja);
3670
- }
3671
- function Ya(e) {
3672
- return Buffer.from(e).toString("utf8");
3673
- }
3674
- function Xa(e) {
3675
- return String.fromCharCode.apply(null, new Uint16Array(e));
3676
- }
3677
- function Za() {
3678
- return "UNSUPPORTED";
3679
- }
3680
- typeof Buffer < "u" && Buffer.from;
3681
- var Ie;
3682
- (function(e) {
3683
- e[e.None = 0] = "None", e[e.Ascending = 1] = "Ascending", e[e.Descending = 2] = "Descending";
3684
- })(Ie = Ie || (Ie = {}));
3685
- const O = {
3686
- Measure: "measure",
3687
- MeasureTemplate: "measuretemplate",
3688
- BaseMeasure: "basemeasure",
3689
- CalculatedMeasure: "calculatedmeasure",
3690
- Dimension: "dimension",
3691
- DateDimension: "datedimension",
3692
- TextDimension: "textdimension",
3693
- NumericDimension: "numericdimension",
3694
- DateLevel: "datelevel",
3695
- Attribute: "attribute",
3696
- TextAttribute: "text-attribute",
3697
- NumericAttribute: "numeric-attribute",
3698
- Filter: "filter",
3699
- DimensionFilter: "dimensionfilter",
3700
- MeasureFilter: "measurefilter",
3701
- /**
3702
- * Checks whether the given object or type is a metadata element
3703
- *
3704
- * @param o - object to check
3705
- * @returns true if the object or type is a metadata element
3706
- */
3707
- isMetadata(e) {
3708
- return O.isMeasure(e) || O.isDimension(e) || O.isAttribute(e) || O.isFilter(e);
3709
- },
3710
- /**
3711
- * Checks whether the given object or type is a measure template
3712
- *
3713
- * @param o - object to check
3714
- * @returns true if the object or type is a measure template
3715
- */
3716
- isMeasureTemplate(e) {
3717
- return e ? typeof e == "string" ? e.toLowerCase() === O.MeasureTemplate : e.agg === "*" || e.aggregation === "*" || e.type && e.type.toLowerCase() === O.MeasureTemplate : !1;
3718
- },
3719
- /**
3720
- * Checks whether the given object or type is a base measure
3721
- *
3722
- * @param o - object to check
3723
- * @returns true if the object or type is a base measure
3724
- */
3725
- isBaseMeasure(e) {
3726
- return e ? typeof e == "string" ? e.toLowerCase() === O.BaseMeasure : (e.agg || e.aggregation) && (e.attribute || e.jaql || e.dim || e.expression) && !this.isMeasureTemplate(e) : !1;
3727
- },
3728
- /**
3729
- * Checks whether the given object or type is a measure - of any type
3730
- *
3731
- * @param o - object to check
3732
- * @returns true if the object or type is a measure - of any type
3733
- */
3734
- isMeasure(e) {
3735
- if (!e)
3736
- return !1;
3737
- if (typeof e == "string") {
3738
- const t = e;
3739
- return t.toLowerCase() === O.Measure || t.toLowerCase() === O.BaseMeasure || t.toLowerCase() === O.MeasureTemplate || t.toLowerCase() === O.CalculatedMeasure;
3740
- }
3741
- return this.isBaseMeasure(e) || this.isCalculatedMeasure(e) || this.isMeasureTemplate(e);
3742
- },
3743
- /**
3744
- * Checks whether the given object or type is a calculated measure
3745
- *
3746
- * @param o - object to check
3747
- * @returns true if the object or type is a calculated measure
3748
- */
3749
- isCalculatedMeasure(e) {
3750
- return e ? typeof e == "string" ? e.toLowerCase() === O.CalculatedMeasure : (e.expression || e.formula) && e.context : !1;
3751
- },
3752
- /**
3753
- * Checks whether the given object or type is a date dimension
3754
- *
3755
- * @param o - object to check
3756
- * @returns true if the object or type is a date dimension
3757
- */
3758
- isDateDimension(e) {
3759
- return e ? typeof e == "string" ? e.toLowerCase() === O.DateDimension : (e.dim || e.expression) && e.level : !1;
3760
- },
3761
- /**
3762
- * Checks whether the given object or type is a text dimension
3763
- *
3764
- * @param o - object to check
3765
- * @returns true if the object or type is a text dimension
3766
- */
3767
- isTextDimension(e) {
3768
- return e && typeof e == "string" ? e.toLowerCase() === O.TextDimension : !1;
3769
- },
3770
- /**
3771
- * Checks whether the given object or type is a numeric dimension
3772
- *
3773
- * @param o - object to check
3774
- * @returns true if the object or type is a numeric dimension
3775
- */
3776
- isNumericDimension(e) {
3777
- return e && typeof e == "string" ? e.toLowerCase() === O.NumericDimension : !1;
3778
- },
3779
- /**
3780
- * Checks whether the given object or type is a dimension - of any type
3781
- *
3782
- * @param o - object to check
3783
- * @returns true if the object or type is a dimension - of any type
3784
- */
3785
- isDimension(e) {
3786
- if (e && typeof e == "object" && (e = e.type), typeof e == "string") {
3787
- const t = e;
3788
- return t.toLowerCase() === O.DateDimension || t.toLowerCase() === O.Dimension || t.toLowerCase() === O.TextDimension || t.toLowerCase() === O.NumericDimension;
3789
- }
3790
- return !1;
3791
- },
3792
- /**
3793
- * Checks whether the given object or type is an attribute - of any type
3794
- *
3795
- * @param o - object to check
3796
- * @returns true if the object or type is an attribute - of any type
3797
- */
3798
- isAttribute(e) {
3799
- if (typeof e == "string") {
3800
- const t = e;
3801
- return t.toLowerCase() === O.Attribute || t.toLowerCase() === O.TextAttribute || t.toLowerCase() === O.NumericAttribute || t.toLowerCase() === O.DateLevel;
3802
- }
3803
- return e && e.type ? this.isAttribute(e.type) : !1;
3804
- },
3805
- /**
3806
- * Checks whether the given object or type is a filter
3807
- *
3808
- * @param o - object to check
3809
- * @returns true if the object or type is a filter
3810
- */
3811
- isFilter(e) {
3812
- if (e && typeof e == "object" && (e = e.type), typeof e == "string") {
3813
- const t = e;
3814
- return t.toLowerCase() === O.Filter || t.toLowerCase() === O.DimensionFilter || t.toLowerCase() === O.MeasureFilter;
3815
- }
3816
- return !1;
3817
- }
3818
- };
3819
- var _e;
3820
- (function(e) {
3821
- e.TEXT = "text", e.NUMERIC = "numeric", e.DATETIME = "datetime";
3822
- })(_e = _e || (_e = {}));
3823
- var ke;
3824
- (function(e) {
3825
- e.ASC = "asc", e.DESC = "desc";
3826
- })(ke = ke || (ke = {}));
3827
- var Be;
3828
- (function(e) {
3829
- e.PRE = "pre", e.POST = "post";
3830
- })(Be = Be || (Be = {}));
3831
- function Je(e, t = []) {
3832
- try {
3833
- return e == null ? String(e) : typeof e == "string" ? `'${is(e)}'` : typeof e == "number" || typeof e == "boolean" ? String(e) : e instanceof Date ? `new Date('${e.toISOString()}')` : Array.isArray(e) ? `[${e.map((n) => Je(n, t)).join(", ")}]` : typeof e == "object" && e !== null ? "composeCode" in e ? e.composeCode : `{ ${Object.entries(e).filter(([r]) => !t.includes(r)).map(([r, s]) => `${/[^a-zA-Z0-9_$]/.test(r) ? `'${r}'` : r}: ${Je(s, t)}`).join(", ")} }` : JSON.stringify(e);
3834
- } catch (n) {
3835
- return console.error(n, JSON.stringify(e, null, 2)), JSON.stringify(e);
3836
- }
3837
- }
3838
- function eo(e) {
3839
- let t = e.length;
3840
- for (; t > 0 && e[t - 1] === void 0; )
3841
- t--;
3842
- return e.slice(0, t);
3843
- }
3844
- function to(e, t) {
3845
- return function(n) {
3846
- return function(...r) {
3847
- const s = eo(r), i = s.length, a = s.map((c) => Je(c, ["guid"])).filter((c, d) => !(["", "{ }", "{}", "undefined", "null"].includes(c) && d === i - 1)).join(", "), o = `${e}.${t ?? n.name}(${a})`, u = n(...r);
3848
- return u.composeCode = o, u;
3849
- };
3850
- };
3851
- }
3852
- function It(e, t) {
3853
- return to("filterFactory.logic", t)(e);
3854
- }
3855
- function no(e) {
3856
- return e && e.__serializable === "MembersFilter";
3857
- }
3858
- function ro(e) {
3859
- return e && e.__serializable === "CascadingFilter";
3860
- }
3861
- var Ue;
3862
- (function(e) {
3863
- const t = (n) => {
3864
- if (Array.isArray(n)) {
3865
- const [r, ...s] = n;
3866
- return s.length === 0 ? t(r) : {
3867
- operator: "AND",
3868
- left: t(r),
3869
- right: t(s)
3870
- };
3871
- }
3872
- return n;
3873
- };
3874
- e.and = It((n, r) => ({
3875
- operator: "AND",
3876
- left: t(n),
3877
- right: t(r)
3878
- }), "and"), e.or = It((n, r) => ({
3879
- operator: "OR",
3880
- left: t(n),
3881
- right: t(r)
3882
- }), "or");
3883
- })(Ue = Ue || (Ue = {}));
3884
- var Se;
3885
- (function(e) {
3886
- e.INCLUDE_ALL = "INCLUDE_ALL", e.ADVANCED = "ADVANCED", e.INVALID = "INVALID", e.CONDITION = "CONDITION", e.SPECIFIC_ITEMS = "SPECIFIC_ITEMS";
3887
- })(Se = Se || (Se = {}));
3888
- var Oe;
3889
- (function(e) {
3890
- e.PERIOD = "PERIOD", e.DATE_RANGE = "DATE_RANGE";
3891
- })(Oe = Oe || (Oe = {}));
3892
- var ve;
3893
- (function(e) {
3894
- e.NUMERIC_RANGE = "NUMERIC_RANGE";
3895
- })(ve = ve || (ve = {}));
3896
- var xe;
3897
- (function(e) {
3898
- e.YEARS = "years", e.QUARTERS = "quarters", e.MONTHS = "months", e.WEEKS = "weeks", e.DAYS = "days", e.HOURS = "hours", e.MINUTES = "minutes";
3899
- })(xe = xe || (xe = {}));
3900
- var qe;
3901
- (function(e) {
3902
- e.DATE_TIME = "datetime", e.NUMERIC = "numeric", e.TEXT = "text";
3903
- })(qe = qe || (qe = {}));
3904
- const M = Object.assign(Object.assign(Object.assign({}, Se), Oe), ve), so = {
3905
- [M.INCLUDE_ALL]: {
3906
- all: !0,
3907
- filterType: M.INCLUDE_ALL
3908
- },
3909
- [M.PERIOD]: {
3910
- last: { count: 1, offset: 1 },
3911
- isNotCurrentPeriod: !0,
3912
- filterType: M.PERIOD
3913
- },
3914
- [M.DATE_RANGE]: {
3915
- filterType: M.DATE_RANGE
3916
- },
3917
- [M.NUMERIC_RANGE]: {
3918
- filterType: M.NUMERIC_RANGE
3919
- },
3920
- [M.CONDITION]: {
3921
- explicit: !1,
3922
- multiSelection: !0,
3923
- exclude: { members: [] },
3924
- filterType: M.CONDITION
3925
- },
3926
- [M.SPECIFIC_ITEMS]: {
3927
- explicit: !0,
3928
- multiSelection: !0,
3929
- members: [],
3930
- filterType: M.SPECIFIC_ITEMS
3931
- }
3932
- };
3933
- so.INCLUDE_ALL, xe.YEARS;
3934
- var Ve;
3935
- (function(e) {
3936
- e.IS = "members", e.IS_NOT = "exclude", e.IS_WITHIN = "isWithin", e.TOP = "top", e.BOTTOM = "bottom", e.AFTER = "after", e.BEFORE = "before", e.STARTS_WITH = "startsWith", e.DOESNT_START_WITH = "doesntStartWith", e.ENDS_WITH = "endsWith", e.DOESNT_END_WITH = "doesntEndWith", e.CONTAINS = "contains", e.DOESNT_CONTAIN = "doesntContain", e.EQUALS = "equals", e.DOESNT_EQUAL = "doesntEqual", e.IS_EMPTY = "isEmpty", e.IS_NOT_EMPTY = "isNotEmpty", e.GREATER_THAN = "fromNotEqual", e.GREATER_THAN_OR_EQUAL = "from", e.LESS_THAN = "toNotEqual", e.LESS_THAN_OR_EQUAL = "to", e.BETWEEN = "between", e.IS_NOT_BETWEEN = "isNotBetween", e.MULTIPLE_CONDITION = "multipleCondition", e.NONE = "none";
3937
- })(Ve = Ve || (Ve = {}));
3938
- const on = (e) => {
3939
- if (!e)
3940
- return { filters: void 0, relations: void 0 };
3941
- if (Array.isArray(e))
3942
- return { filters: e, relations: void 0 };
3943
- const t = /* @__PURE__ */ new Set();
3944
- function n(a) {
3945
- const [o, ...u] = a;
3946
- if (t.add(o), !u.length)
3947
- return r({ instanceid: o.config.guid });
3948
- const c = r(o), d = n(u);
3949
- return { left: c, right: d, operator: "AND" };
3950
- }
3951
- function r(a) {
3952
- return a && (io(a) ? ro(a) ? n(a.filters) : (t.add(a), { instanceid: a.config.guid }) : ("left" in a && (a.left = r(a.left)), "right" in a && (a.right = r(a.right)), "composeCode" in a && delete a.composeCode, a));
3953
- }
3954
- const s = Qa(e), i = r(s);
3955
- return { filters: Array.from(t), relations: i };
3956
- };
3957
- function io(e) {
3958
- return "config" in e && "guid" in e.config;
3959
- }
3960
- O.TextAttribute, O.NumericAttribute, O.DateLevel;
3961
- const au = (e) => {
3962
- const [t, n] = K(Wt, {
1562
+ setup: (t) => d(mt, t)
1563
+ }), gn = (t) => {
1564
+ const [e, n] = R(J, {
3963
1565
  isLoading: !0,
3964
1566
  isError: !1,
3965
1567
  isSuccess: !1,
3966
1568
  status: "loading",
3967
1569
  error: void 0,
3968
1570
  data: void 0
3969
- }), r = V();
3970
- R("useExecuteQuery");
3971
- const s = async (i) => {
1571
+ }), i = M();
1572
+ O("useExecuteQuery");
1573
+ const o = async (s) => {
3972
1574
  try {
3973
1575
  const {
3974
- dataSource: a,
3975
- dimensions: o,
3976
- measures: u,
3977
- filters: c,
3978
- highlights: d,
1576
+ dataSource: r,
1577
+ dimensions: a,
1578
+ measures: c,
1579
+ filters: y,
1580
+ highlights: S,
3979
1581
  count: f,
3980
- offset: l,
3981
- ungroup: g,
3982
- onBeforeQuery: p
3983
- } = S(e), { filters: y, relations: h } = on(c);
1582
+ offset: p,
1583
+ ungroup: F,
1584
+ onBeforeQuery: m
1585
+ } = l(t), { filters: P, relations: q } = z(y);
3984
1586
  n({ type: "loading" });
3985
- const x = await Wn(
1587
+ const k = await jt(
3986
1588
  {
3987
- dataSource: a,
3988
- dimensions: o,
3989
- measures: u,
3990
- filters: y,
3991
- filterRelations: h,
3992
- highlights: d,
1589
+ dataSource: r,
1590
+ dimensions: a,
1591
+ measures: c,
1592
+ filters: P,
1593
+ filterRelations: q,
1594
+ highlights: S,
3993
1595
  count: f,
3994
- offset: l,
3995
- ungroup: g
1596
+ offset: p,
1597
+ ungroup: F
3996
1598
  },
3997
- i,
3998
- { onBeforeQuery: Ye(p) }
1599
+ s,
1600
+ { onBeforeQuery: L(m) }
3999
1601
  );
4000
- n({ type: "success", data: x });
4001
- } catch (a) {
4002
- n({ type: "error", error: a });
1602
+ n({ type: "success", data: k });
1603
+ } catch (r) {
1604
+ n({ type: "error", error: r });
4003
1605
  }
4004
1606
  };
4005
- return L(
4006
- [...F(e), r],
1607
+ return g(
1608
+ [...b(t), i],
4007
1609
  () => {
4008
- const { app: i } = r.value, { enabled: a } = S(e);
4009
- !i || !(a === void 0 || a === !0) || s(i);
1610
+ const { app: s } = i.value, { enabled: r } = l(t);
1611
+ !s || !(r === void 0 || r === !0) || o(s);
4010
1612
  },
4011
1613
  { immediate: !0 }
4012
- ), A(t.value);
4013
- }, ou = (e) => {
4014
- const t = _(void 0), n = _(void 0);
4015
- R("useExecuteQueryByWidgetId");
4016
- const [r, s] = K(Wt, {
1614
+ ), h(e.value);
1615
+ }, On = (t) => {
1616
+ const e = j(void 0), n = j(void 0);
1617
+ O("useExecuteQueryByWidgetId");
1618
+ const [i, o] = R(J, {
4017
1619
  isLoading: !0,
4018
1620
  isError: !1,
4019
1621
  isSuccess: !1,
4020
1622
  status: "loading",
4021
1623
  error: void 0,
4022
1624
  data: void 0
4023
- }), i = V(), a = async (o) => {
1625
+ }), s = M(), r = async (a) => {
4024
1626
  try {
4025
- s({ type: "loading" });
4026
- const { filters: u, ...c } = S(e), { filters: d } = on(Ye(u)), {
1627
+ o({ type: "loading" });
1628
+ const { filters: c, ...y } = l(t), { filters: S } = z(L(c)), {
4027
1629
  data: f,
4028
- query: l,
4029
- pivotQuery: g
4030
- } = await Hn({
4031
- ...c,
4032
- filters: d,
4033
- app: o
1630
+ query: p,
1631
+ pivotQuery: F
1632
+ } = await vt({
1633
+ ...y,
1634
+ filters: S,
1635
+ app: a
4034
1636
  });
4035
- s({ type: "success", data: f }), t.value = l, n.value = g;
4036
- } catch (u) {
4037
- s({ type: "error", error: u });
1637
+ o({ type: "success", data: f }), e.value = p, n.value = F;
1638
+ } catch (c) {
1639
+ o({ type: "error", error: c });
4038
1640
  }
4039
1641
  };
4040
- return L(
4041
- [...F(e), i],
1642
+ return g(
1643
+ [...b(t), s],
4042
1644
  () => {
4043
- const { app: o } = i.value, { enabled: u } = S(e);
4044
- !o || !(u === void 0 || u === !0) || a(o);
1645
+ const { app: a } = s.value, { enabled: c } = l(t);
1646
+ !a || !(c === void 0 || c === !0) || r(a);
4045
1647
  },
4046
1648
  { immediate: !0 }
4047
1649
  ), {
4048
- ...A(r.value),
4049
- query: t,
1650
+ ...h(i.value),
1651
+ query: e,
4050
1652
  pivotQuery: n
4051
1653
  };
4052
- }, uu = (e) => {
4053
- R("useExecuteCsvQuery");
4054
- const t = new G(Kn, [
4055
- z()
4056
- ]), [n, r] = te({
1654
+ }, Sn = (t) => {
1655
+ O("useExecuteCsvQuery");
1656
+ const e = new x(Pt, [
1657
+ w()
1658
+ ]), [n, i] = W({
4057
1659
  isLoading: !0,
4058
1660
  isError: !1,
4059
1661
  isSuccess: !1,
@@ -4061,18 +1663,18 @@ const au = (e) => {
4061
1663
  error: void 0,
4062
1664
  data: void 0
4063
1665
  });
4064
- return t.subscribe((s) => {
4065
- r(s);
4066
- }), t.run(S(e)), L([...F(e)], () => {
4067
- t.run(S(e));
4068
- }), J(() => {
4069
- t.destroy();
4070
- }), A(n.value);
4071
- }, lu = (e) => {
4072
- R("useExecutePivotQuery");
4073
- const t = new G(Gn, [
4074
- z()
4075
- ]), [n, r] = te({
1666
+ return e.subscribe((o) => {
1667
+ i(o);
1668
+ }), e.run(l(t)), g([...b(t)], () => {
1669
+ e.run(l(t));
1670
+ }), A(() => {
1671
+ e.destroy();
1672
+ }), h(n.value);
1673
+ }, Fn = (t) => {
1674
+ O("useExecutePivotQuery");
1675
+ const e = new x(xt, [
1676
+ w()
1677
+ ]), [n, i] = W({
4076
1678
  isLoading: !0,
4077
1679
  isError: !1,
4078
1680
  isSuccess: !1,
@@ -4080,18 +1682,18 @@ const au = (e) => {
4080
1682
  error: void 0,
4081
1683
  data: void 0
4082
1684
  });
4083
- return t.subscribe((s) => {
4084
- r(s);
4085
- }), t.run(S(e)), L([...F(e)], () => {
4086
- t.run(S(e));
4087
- }), J(() => {
4088
- t.destroy();
4089
- }), A(n.value);
4090
- }, cu = (e) => {
4091
- R("useExecuteCustomWidgetQuery");
4092
- const t = new G(zn, [
4093
- z()
4094
- ]), [n, r] = te({
1685
+ return e.subscribe((o) => {
1686
+ i(o);
1687
+ }), e.run(l(t)), g([...b(t)], () => {
1688
+ e.run(l(t));
1689
+ }), A(() => {
1690
+ e.destroy();
1691
+ }), h(n.value);
1692
+ }, fn = (t) => {
1693
+ O("useExecuteCustomWidgetQuery");
1694
+ const e = new x(At, [
1695
+ w()
1696
+ ]), [n, i] = W({
4095
1697
  data: void 0,
4096
1698
  isLoading: !0,
4097
1699
  isError: !1,
@@ -4099,107 +1701,126 @@ const au = (e) => {
4099
1701
  status: "loading",
4100
1702
  error: void 0
4101
1703
  });
4102
- return t.subscribe((s) => {
4103
- r(s);
4104
- }), t.run(S(e)), L([...F(e)], () => {
4105
- t.run(S(e));
4106
- }), J(() => {
4107
- t.destroy();
4108
- }), A(n.value);
4109
- }, du = (e) => {
4110
- R("useGetFilterMembers");
4111
- const { filter: t, parentFilters: n = [] } = S(e), r = {
1704
+ return e.subscribe((o) => {
1705
+ i(o);
1706
+ }), e.run(l(t)), g([...b(t)], () => {
1707
+ e.run(l(t));
1708
+ }), A(() => {
1709
+ e.destroy();
1710
+ }), h(n.value);
1711
+ }, Cn = (t) => {
1712
+ O("useGetFilterMembers");
1713
+ const { filter: e, parentFilters: n = [] } = l(t), i = {
4112
1714
  selectedMembers: [],
4113
1715
  allMembers: [],
4114
- ...no(t) ? {
4115
- excludeMembers: t.config.excludeMembers,
4116
- enableMultiSelection: t.config.enableMultiSelection,
4117
- hasBackgroundFilter: !!t.config.backgroundFilter && n.length === 0
1716
+ ...ye(e) ? {
1717
+ excludeMembers: e.config.excludeMembers,
1718
+ enableMultiSelection: e.config.enableMultiSelection,
1719
+ hasBackgroundFilter: !!e.config.backgroundFilter && n.length === 0
4118
1720
  } : {
4119
1721
  excludeMembers: !1,
4120
1722
  enableMultiSelection: !1,
4121
1723
  hasBackgroundFilter: !1
4122
1724
  }
4123
- }, s = new G(Jn, [z()]), [i, a] = te({
1725
+ }, o = new x(Mt, [w()]), [s, r] = W({
4124
1726
  isLoading: !0,
4125
1727
  isError: !1,
4126
1728
  isSuccess: !1,
4127
1729
  status: "loading",
4128
1730
  error: void 0,
4129
- data: r,
1731
+ data: i,
4130
1732
  isAllItemsLoaded: !1
4131
1733
  });
4132
- return s.subscribe((o) => {
4133
- a(o);
4134
- }), s.run(S(e)), L([...F(e)], () => {
4135
- s.run(S(e));
4136
- }), J(() => {
4137
- s.destroy();
4138
- }), A(i.value);
4139
- }, fu = (e) => {
4140
- R("useGetDashboardModel");
4141
- const [t, n] = K(pe, {
1734
+ return o.subscribe((a) => {
1735
+ r(a);
1736
+ }), o.run(l(t)), g([...b(t)], () => {
1737
+ o.run(l(t));
1738
+ }), A(() => {
1739
+ o.destroy();
1740
+ }), h(s.value);
1741
+ }, Dn = (t) => {
1742
+ O("useGetDataSourceDimensions");
1743
+ const e = new x(wt, [
1744
+ w()
1745
+ ]), [n, i] = W({
1746
+ isLoading: !0,
1747
+ isError: !1,
1748
+ isSuccess: !1,
1749
+ dimensions: void 0,
1750
+ error: void 0,
1751
+ status: "loading"
1752
+ });
1753
+ return e.subscribe((o) => {
1754
+ i(o);
1755
+ }), e.run(l(t)), g([...b(t)], () => {
1756
+ e.run(l(t));
1757
+ }), A(() => {
1758
+ e.destroy();
1759
+ }), h(n.value);
1760
+ }, mn = (t) => {
1761
+ O("useGetDashboardModel");
1762
+ const [e, n] = R(B, {
4142
1763
  isLoading: !0,
4143
1764
  isError: !1,
4144
1765
  isSuccess: !1,
4145
1766
  status: "loading",
4146
1767
  error: void 0,
4147
1768
  data: void 0
4148
- }), r = V(), s = async (a) => {
1769
+ }), i = M(), o = async (r) => {
4149
1770
  try {
4150
1771
  n({ type: "loading" });
4151
- const { dashboardOid: o, includeWidgets: u, includeFilters: c } = S(e), d = await Yn(a.httpClient, o, {
4152
- includeWidgets: u,
4153
- includeFilters: c
1772
+ const { dashboardOid: a, includeWidgets: c, includeFilters: y } = l(t), S = await Rt(r.httpClient, a, {
1773
+ includeWidgets: c,
1774
+ includeFilters: y
4154
1775
  });
4155
- n({ type: "success", data: d });
4156
- } catch (o) {
4157
- n({ type: "error", error: o });
1776
+ n({ type: "success", data: S });
1777
+ } catch (a) {
1778
+ n({ type: "error", error: a });
4158
1779
  }
4159
1780
  };
4160
- L(
4161
- [...F(e), r],
1781
+ g(
1782
+ [...b(t), i],
4162
1783
  () => {
4163
- const { app: a } = r.value, { enabled: o } = S(e);
4164
- !a || !(o === void 0 || o === !0) || s(a);
1784
+ const { app: r } = i.value, { enabled: a } = l(t);
1785
+ !r || !(a === void 0 || a === !0) || o(r);
4165
1786
  },
4166
1787
  { immediate: !0 }
4167
1788
  );
4168
- const i = A(t.value);
4169
- return A(Qn(i));
4170
- }, pu = (e) => {
4171
- R("useGetDashboardModels");
4172
- const [t, n] = K(pe, {
1789
+ const s = h(e.value);
1790
+ return h(qt(s));
1791
+ }, jn = (t) => {
1792
+ O("useGetDashboardModels");
1793
+ const [e, n] = R(B, {
4173
1794
  isLoading: !0,
4174
1795
  isError: !1,
4175
1796
  isSuccess: !1,
4176
1797
  status: "loading",
4177
1798
  error: void 0,
4178
1799
  data: void 0
4179
- }), r = V(), s = async (a) => {
1800
+ }), i = M(), o = async (r) => {
4180
1801
  try {
4181
1802
  n({ type: "loading" });
4182
- const o = S(e), u = await Zn(a.httpClient, o);
4183
- n({ type: "success", data: u });
4184
- } catch (o) {
4185
- n({ type: "error", error: o });
1803
+ const a = l(t), c = await Tt(r.httpClient, a);
1804
+ n({ type: "success", data: c });
1805
+ } catch (a) {
1806
+ n({ type: "error", error: a });
4186
1807
  }
4187
1808
  };
4188
- L(
4189
- [...F(e), r],
1809
+ g(
1810
+ [...b(t), i],
4190
1811
  () => {
4191
- const { app: a } = r.value, { enabled: o } = S(e);
4192
- !a || !(o === void 0 || o === !0) || s(a);
1812
+ const { app: r } = i.value, { enabled: a } = l(t);
1813
+ !r || !(a === void 0 || a === !0) || o(r);
4193
1814
  },
4194
1815
  { immediate: !0 }
4195
1816
  );
4196
- const i = A(t.value);
4197
- return A(Xn(i));
4198
- }, gu = (e) => {
4199
- R("useGetSharedFormula");
4200
- const t = new G(er, [
4201
- z()
4202
- ]), [n, r] = te({
1817
+ const s = h(e.value);
1818
+ return h(Wt(s));
1819
+ }, vn = (t) => {
1820
+ O("useGetSharedFormula");
1821
+ const e = new x(Et, [
1822
+ w()
1823
+ ]), [n, i] = W({
4203
1824
  isLoading: !0,
4204
1825
  isError: !1,
4205
1826
  isSuccess: !1,
@@ -4207,105 +1828,105 @@ const au = (e) => {
4207
1828
  error: void 0,
4208
1829
  formula: null
4209
1830
  });
4210
- return t.subscribe((s) => {
4211
- r(s);
4212
- }), t.run(S(e)), L([...F(e)], () => {
4213
- t.run(S(e));
4214
- }), J(() => {
4215
- t.destroy();
4216
- }), A(n.value);
4217
- }, hu = (e) => {
4218
- R("useGetWidgetModel");
4219
- const [t, n] = K(pe, {
1831
+ return e.subscribe((o) => {
1832
+ i(o);
1833
+ }), e.run(l(t)), g([...b(t)], () => {
1834
+ e.run(l(t));
1835
+ }), A(() => {
1836
+ e.destroy();
1837
+ }), h(n.value);
1838
+ }, Pn = (t) => {
1839
+ O("useGetWidgetModel");
1840
+ const [e, n] = R(B, {
4220
1841
  isLoading: !0,
4221
1842
  isError: !1,
4222
1843
  isSuccess: !1,
4223
1844
  status: "loading",
4224
1845
  error: void 0,
4225
1846
  data: void 0
4226
- }), r = V(), s = async (i) => {
1847
+ }), i = M(), o = async (s) => {
4227
1848
  try {
4228
1849
  n({ type: "loading" });
4229
- const { dashboardOid: a, widgetOid: o } = S(e), u = await tr(i.httpClient, a, o);
4230
- n({ type: "success", data: u });
4231
- } catch (a) {
4232
- n({ type: "error", error: a });
1850
+ const { dashboardOid: r, widgetOid: a } = l(t), c = await Bt(s.httpClient, r, a);
1851
+ n({ type: "success", data: c });
1852
+ } catch (r) {
1853
+ n({ type: "error", error: r });
4233
1854
  }
4234
1855
  };
4235
- return L(
4236
- [...F(e), r],
1856
+ return g(
1857
+ [...b(t), i],
4237
1858
  () => {
4238
- const { app: i } = r.value, { enabled: a } = S(e);
4239
- !i || !(a === void 0 || a === !0) || s(i);
1859
+ const { app: s } = i.value, { enabled: r } = l(t);
1860
+ !s || !(r === void 0 || r === !0) || o(s);
4240
1861
  },
4241
1862
  { immediate: !0 }
4242
- ), A(t.value);
4243
- }, mu = (e) => {
4244
- R("useGetHierarchyModels");
4245
- const [t, n] = K(pe, {
1863
+ ), h(e.value);
1864
+ }, xn = (t) => {
1865
+ O("useGetHierarchyModels");
1866
+ const [e, n] = R(B, {
4246
1867
  isLoading: !0,
4247
1868
  isError: !1,
4248
1869
  isSuccess: !1,
4249
1870
  status: "loading",
4250
1871
  error: void 0,
4251
1872
  data: void 0
4252
- }), r = V(), s = async (i) => {
1873
+ }), i = M(), o = async (s) => {
4253
1874
  try {
4254
1875
  n({ type: "loading" });
4255
- const a = await nr(i.httpClient, S(e));
4256
- n({ type: "success", data: a });
4257
- } catch (a) {
4258
- n({ type: "error", error: a });
1876
+ const r = await kt(s.httpClient, l(t));
1877
+ n({ type: "success", data: r });
1878
+ } catch (r) {
1879
+ n({ type: "error", error: r });
4259
1880
  }
4260
1881
  };
4261
- return L(
4262
- [...F(e), r],
1882
+ return g(
1883
+ [...b(t), i],
4263
1884
  () => {
4264
- const { app: i } = r.value, { enabled: a } = S(e);
4265
- !i || !(a === void 0 || a === !0) || s(i);
1885
+ const { app: s } = i.value, { enabled: r } = l(t);
1886
+ !s || !(r === void 0 || r === !0) || o(s);
4266
1887
  },
4267
1888
  { immediate: !0 }
4268
- ), A(t.value);
4269
- }, yu = (e, t, n) => {
4270
- const [r, s] = K(pe, {
1889
+ ), h(e.value);
1890
+ }, An = (t, e, n) => {
1891
+ const [i, o] = R(B, {
4271
1892
  isLoading: !0,
4272
1893
  isError: !1,
4273
1894
  isSuccess: !1,
4274
1895
  status: "loading",
4275
1896
  error: void 0,
4276
1897
  data: void 0
4277
- }), i = V(), a = async (o) => {
1898
+ }), s = M(), r = async (a) => {
4278
1899
  try {
4279
- s({ type: "loading" });
4280
- const u = Ye(e), c = t ? S(t) : {}, d = n ? S(n) : {}, f = {
4281
- requestConfig: d.requestConfig ? S(d.requestConfig) : {},
1900
+ o({ type: "loading" });
1901
+ const c = L(t), y = e ? l(e) : {}, S = n ? l(n) : {}, f = {
1902
+ requestConfig: S.requestConfig ? l(S.requestConfig) : {},
4282
1903
  skipTrackingParam: !0
4283
- }, l = await o.call(
4284
- o.url + u,
4285
- c,
1904
+ }, p = await a.call(
1905
+ a.url + c,
1906
+ y,
4286
1907
  f
4287
1908
  );
4288
- s({ type: "success", data: l });
4289
- } catch (u) {
4290
- s({ type: "error", error: u });
1909
+ o({ type: "success", data: p });
1910
+ } catch (c) {
1911
+ o({ type: "error", error: c });
4291
1912
  }
4292
1913
  };
4293
- return L(
4294
- [...F(e, t, n), i],
1914
+ return g(
1915
+ [...b(t, e, n), s],
4295
1916
  () => {
4296
- const { app: o } = i.value, u = S(n || {}).enabled;
4297
- !o || !(u === void 0 || u === !0) || a(o.httpClient);
1917
+ const { app: a } = s.value, c = l(n || {}).enabled;
1918
+ !a || !(c === void 0 || c === !0) || r(a.httpClient);
4298
1919
  },
4299
1920
  { immediate: !0 }
4300
- ), A(r.value);
1921
+ ), h(i.value);
4301
1922
  };
4302
- class ao {
4303
- constructor(t, n) {
4304
- ue(this, "app", null);
4305
- ue(this, "container", null);
4306
- ue(this, "isDestroyed", !1);
4307
- ue(this, "propsRef", null);
4308
- this.componentClass = t, this.contexts = n;
1923
+ class ge {
1924
+ constructor(e, n) {
1925
+ E(this, "app", null);
1926
+ E(this, "container", null);
1927
+ E(this, "isDestroyed", !1);
1928
+ E(this, "propsRef", null);
1929
+ this.componentClass = e, this.contexts = n;
4309
1930
  }
4310
1931
  /**
4311
1932
  * Mounts the Vue component into the container element.
@@ -4314,14 +1935,14 @@ class ao {
4314
1935
  * @param container - The DOM element to mount the Vue component into
4315
1936
  * @param props - Initial props to pass to the component
4316
1937
  */
4317
- mount(t, n) {
1938
+ mount(e, n) {
4318
1939
  if (this.app || this.isDestroyed)
4319
1940
  return;
4320
- this.container = t, this.propsRef = _(n);
4321
- const r = {
4322
- setup: () => () => Fr(this.componentClass, this.propsRef.value)
1941
+ this.container = e, this.propsRef = j(n);
1942
+ const i = {
1943
+ setup: () => () => ne(this.componentClass, this.propsRef.value)
4323
1944
  };
4324
- this.app = Pr(r), this.app.provide(rr, this.contexts.sisenseContext), this.app.provide(sr, this.contexts.themeContext), this.app.provide(ir, this.contexts.customWidgetsContext), this.app.mount(t);
1945
+ this.app = ee(i), this.app.provide(ae, this.contexts.sisenseContext), this.app.provide(ue, this.contexts.themeContext), this.app.provide(ce, this.contexts.customWidgetsContext), this.app.mount(e);
4325
1946
  }
4326
1947
  /**
4327
1948
  * Updates the props on the existing Vue component instance.
@@ -4330,8 +1951,8 @@ class ao {
4330
1951
  *
4331
1952
  * @param props - New props to apply to the component
4332
1953
  */
4333
- update(t) {
4334
- !this.propsRef || this.isDestroyed || (this.propsRef.value = t);
1954
+ update(e) {
1955
+ !this.propsRef || this.isDestroyed || (this.propsRef.value = e);
4335
1956
  }
4336
1957
  /**
4337
1958
  * Destroys the Vue component and cleans up resources.
@@ -4347,8 +1968,8 @@ class ao {
4347
1968
  return this.app !== null && !this.isDestroyed;
4348
1969
  }
4349
1970
  }
4350
- const bu = () => {
4351
- const e = ar(), t = V(), n = or(), r = e;
1971
+ const Mn = () => {
1972
+ const t = le(), e = M(), n = de(), i = t;
4352
1973
  return {
4353
1974
  /**
4354
1975
  * Registers a new custom widget.
@@ -4356,19 +1977,31 @@ const bu = () => {
4356
1977
  * @param customWidgetType - The unique identifier for the custom widget type.
4357
1978
  * @param customWidget - The custom widget component to register.
4358
1979
  */
4359
- registerCustomWidget: (s, i) => {
4360
- const a = {
4361
- sisenseContext: t,
1980
+ registerCustomWidget: (o, s) => {
1981
+ const r = {
1982
+ sisenseContext: e,
4362
1983
  themeContext: n,
4363
- customWidgetsContext: r
4364
- }, o = () => new ao(i, a), u = (c) => ur(lr, {
4365
- adapterFactory: o,
4366
- componentProps: c
1984
+ customWidgetsContext: i
1985
+ }, a = () => new ge(s, r), c = (y) => $t(Qt, {
1986
+ adapterFactory: a,
1987
+ componentProps: y
1988
+ });
1989
+ t.value.customWidgetsMap.has(o) || (t.value.customWidgetsMap.set(
1990
+ o,
1991
+ c
1992
+ ), t.value = {
1993
+ customWidgetsMap: new Map(t.value.customWidgetsMap)
1994
+ });
1995
+ },
1996
+ /**
1997
+ * Unregisters a custom widget for the given type name.
1998
+ *
1999
+ * @param customWidgetType - The unique identifier for the custom widget type.
2000
+ */
2001
+ unregisterCustomWidget: (o) => {
2002
+ t.value.customWidgetsMap.delete(o) && (t.value = {
2003
+ customWidgetsMap: new Map(t.value.customWidgetsMap)
4367
2004
  });
4368
- e.value.customWidgetsMap.has(s) || e.value.customWidgetsMap.set(
4369
- s,
4370
- u
4371
- );
4372
2005
  },
4373
2006
  /**
4374
2007
  * Checks if a custom widget is registered.
@@ -4376,45 +2009,45 @@ const bu = () => {
4376
2009
  * @param customWidgetType - The type of the custom widget.
4377
2010
  * @returns True if the custom widget is registered, false otherwise.
4378
2011
  */
4379
- hasCustomWidget: (s) => e.value.customWidgetsMap.has(s)
2012
+ hasCustomWidget: (o) => t.value.customWidgetsMap.has(o)
4380
2013
  };
4381
- }, Su = (e, t = {}) => {
4382
- R("useComposedDashboard");
4383
- const n = new G(cr, [
4384
- z()
4385
- ]), [r, s] = te(S(e));
4386
- n.subscribe(({ dashboard: o }) => {
4387
- s(o);
4388
- }), n.run(S(e), t), L([...F(e)], () => {
4389
- n.run(S(e), t);
4390
- }), J(() => {
2014
+ }, wn = (t, e = {}) => {
2015
+ O("useComposedDashboard");
2016
+ const n = new x(It, [
2017
+ w()
2018
+ ]), [i, o] = W(l(t));
2019
+ n.subscribe(({ dashboard: a }) => {
2020
+ o(a);
2021
+ }), n.run(l(t), e), g([...b(t)], () => {
2022
+ n.run(l(t), e);
2023
+ }), A(() => {
4391
2024
  n.destroy();
4392
2025
  });
4393
- const i = ot(n, "setFilters"), a = ot(n, "setWidgetsLayout");
2026
+ const s = _(n, "setFilters"), r = _(n, "setWidgetsLayout");
4394
2027
  return {
4395
- dashboard: r,
4396
- setFilters: i,
4397
- setWidgetsLayout: a
2028
+ dashboard: i,
2029
+ setFilters: s,
2030
+ setWidgetsLayout: r
4398
2031
  };
4399
- }, Ou = (e, t) => {
4400
- R("useJtdWidget");
4401
- const n = new G(dr, [
4402
- z(),
4403
- fr()
4404
- ]), r = _(null);
4405
- n.subscribe((i) => {
4406
- r.value = i;
2032
+ }, qn = (t, e) => {
2033
+ O("useJtdWidget");
2034
+ const n = new x(Lt, [
2035
+ w(),
2036
+ pe()
2037
+ ]), i = j(null);
2038
+ n.subscribe((s) => {
2039
+ i.value = s;
4407
2040
  });
4408
- const s = () => {
4409
- const i = Ar(e), a = S(t);
4410
- n.run(i, a);
2041
+ const o = () => {
2042
+ const s = re(t), r = l(e);
2043
+ n.run(s, r);
4411
2044
  };
4412
- return s(), L([...F(e), ...F(t)], () => {
4413
- s();
4414
- }), J(() => {
2045
+ return o(), g([...b(t), ...b(e)], () => {
2046
+ o();
2047
+ }), A(() => {
4415
2048
  n.destroy();
4416
- }), r;
4417
- }, oo = m({
2049
+ }), i;
2050
+ }, Oe = u({
4418
2051
  props: {
4419
2052
  /**
4420
2053
  * {@inheritDoc @sisense/sdk-ui!ContextMenuProps.closeContextMenu}
@@ -4432,61 +2065,61 @@ const bu = () => {
4432
2065
  */
4433
2066
  position: Object
4434
2067
  },
4435
- setup: (e, { slots: t }) => _t(pr, e, t, [])
4436
- }), uo = ({
4437
- drilldownPaths: e,
4438
- initialDimension: t
2068
+ setup: (t, { slots: e }) => N(Gt, t, e, [])
2069
+ }), Se = ({
2070
+ drilldownPaths: t,
2071
+ initialDimension: e
4439
2072
  }) => {
4440
- if (!t)
2073
+ if (!e)
4441
2074
  throw new Error(
4442
2075
  "Initial dimension has to be specified to use drilldown with custom components"
4443
2076
  );
4444
- const n = _([]), r = _(), s = _([]), i = _([]), a = We(() => [
4445
- gr(t),
4446
- ...n.value.map(({ nextDimension: l }) => l)
4447
- ]), o = We(
4448
- () => e.value.filter((l) => {
4449
- if (O.isAttribute(l)) {
4450
- const y = l;
4451
- return a.value.every(
4452
- (h) => !ut(h, y)
2077
+ const n = j([]), i = j(), o = j([]), s = j([]), r = I(() => [
2078
+ _t(e),
2079
+ ...n.value.map(({ nextDimension: p }) => p)
2080
+ ]), a = I(
2081
+ () => t.value.filter((p) => {
2082
+ if (he.isAttribute(p)) {
2083
+ const P = p;
2084
+ return r.value.every(
2085
+ (q) => !H(q, P)
4453
2086
  );
4454
2087
  }
4455
- const p = l;
4456
- return a.value.every(
4457
- (y, h) => ut(y, p.levels[h])
2088
+ const m = p;
2089
+ return r.value.every(
2090
+ (P, q) => H(P, m.levels[q])
4458
2091
  );
4459
2092
  })
4460
- ), u = (l, g, p) => {
4461
- n.value = hr(
2093
+ ), c = (p, F, m) => {
2094
+ n.value = Ht(
4462
2095
  n.value,
4463
- l,
4464
- g,
4465
- p
2096
+ p,
2097
+ F,
2098
+ m
4466
2099
  ), f();
4467
- }, c = (l) => {
4468
- n.value = n.value.slice(0, l), f();
4469
- }, d = () => {
2100
+ }, y = (p) => {
2101
+ n.value = n.value.slice(0, p), f();
2102
+ }, S = () => {
4470
2103
  n.value = [], f();
4471
2104
  }, f = () => {
4472
- const l = (p) => p === "drilldown.breadcrumbsAllSuffix" ? "All" : p, g = mr(
2105
+ const p = (m) => m === "drilldown.breadcrumbsAllSuffix" ? "All" : m, F = Vt(
4473
2106
  n.value,
4474
- t,
4475
- l
2107
+ e,
2108
+ p
4476
2109
  );
4477
- r.value = g.drilldownDimension, s.value = g.drilldownFilters, i.value = g.drilldownFiltersDisplayValues;
2110
+ i.value = F.drilldownDimension, o.value = F.drilldownFilters, s.value = F.drilldownFiltersDisplayValues;
4478
2111
  };
4479
2112
  return f(), {
4480
2113
  drilldownSelections: n,
4481
- availableDrilldownPaths: o,
4482
- drilldownDimension: r,
4483
- drilldownFilters: s,
4484
- drilldownFiltersDisplayValues: i,
4485
- selectDrilldown: u,
4486
- sliceDrilldownSelections: c,
4487
- clearDrilldownSelections: d
2114
+ availableDrilldownPaths: a,
2115
+ drilldownDimension: i,
2116
+ drilldownFilters: o,
2117
+ drilldownFiltersDisplayValues: s,
2118
+ selectDrilldown: c,
2119
+ sliceDrilldownSelections: y,
2120
+ clearDrilldownSelections: S
4488
2121
  };
4489
- }, lo = m({
2122
+ }, Fe = u({
4490
2123
  props: {
4491
2124
  /**
4492
2125
  * {@inheritDoc @sisense/sdk-ui!DrilldownWidgetProps.config}
@@ -4522,81 +2155,81 @@ const bu = () => {
4522
2155
  },
4523
2156
  setup: () => {
4524
2157
  }
4525
- }), co = { style: { display: "flex", "flex-direction": "column", height: "100%" } }, fo = { style: { "flex-grow": "1", "min-wdith": "0", "min-height": "0" } }, vu = /* @__PURE__ */ m({
2158
+ }), fe = { style: { display: "flex", "flex-direction": "column", height: "100%" } }, Ce = { style: { "flex-grow": "1", "min-wdith": "0", "min-height": "0" } }, Rn = /* @__PURE__ */ u({
4526
2159
  __name: "drilldown-widget",
4527
- props: lo.props,
4528
- setup(e) {
4529
- const t = e, { drilldownPaths: n, initialDimension: r, config: s } = A(t), i = _(null), a = _([]), {
4530
- drilldownFilters: o,
2160
+ props: Fe.props,
2161
+ setup(t) {
2162
+ const e = t, { drilldownPaths: n, initialDimension: i, config: o } = h(e), s = j(null), r = j([]), {
2163
+ drilldownFilters: a,
4531
2164
  // computed
4532
- drilldownDimension: u,
2165
+ drilldownDimension: c,
4533
2166
  // computed
4534
- drilldownFiltersDisplayValues: c,
2167
+ drilldownFiltersDisplayValues: y,
4535
2168
  // computed
4536
- availableDrilldownPaths: d,
2169
+ availableDrilldownPaths: S,
4537
2170
  // computed
4538
2171
  selectDrilldown: f,
4539
- sliceDrilldownSelections: l,
4540
- clearDrilldownSelections: g
4541
- } = uo({
2172
+ sliceDrilldownSelections: p,
2173
+ clearDrilldownSelections: F
2174
+ } = Se({
4542
2175
  drilldownPaths: n,
4543
- initialDimension: r.value
4544
- }), p = (D) => {
4545
- f(a.value, D);
4546
- }, y = We(() => {
4547
- const D = (C) => C === "drilldown.drillMenuItem" ? "Drill" : C;
2176
+ initialDimension: i.value
2177
+ }), m = (D) => {
2178
+ f(r.value, D);
2179
+ }, P = I(() => {
2180
+ const D = ($) => $ === "drilldown.drillMenuItem" ? "Drill" : $;
4548
2181
  return [
4549
- yr(a.value, u.value),
4550
- br(
4551
- d.value,
4552
- u.value,
4553
- p,
2182
+ Jt(r.value, c.value),
2183
+ Nt(
2184
+ S.value,
2185
+ c.value,
2186
+ m,
4554
2187
  D
4555
2188
  )
4556
2189
  ];
4557
- }), h = (D) => {
4558
- i.value = D;
4559
- }, x = (D) => {
4560
- a.value = D;
4561
- }, w = () => {
4562
- i.value = null;
2190
+ }), q = (D) => {
2191
+ s.value = D;
2192
+ }, k = (D) => {
2193
+ r.value = D;
2194
+ }, G = () => {
2195
+ s.value = null;
4563
2196
  };
4564
- return (D, C) => (Lr(), Er("div", co, [
4565
- Te(D.$slots, "contextMenu", {
4566
- contextMenuProps: { position: i.value, itemSections: y.value, closeContextMenu: w }
2197
+ return (D, $) => (oe(), ie("div", fe, [
2198
+ Q(D.$slots, "contextMenu", {
2199
+ contextMenuProps: { position: s.value, itemSections: P.value, closeContextMenu: G }
4567
2200
  }, () => [
4568
- lt(T(oo), {
4569
- position: i.value,
4570
- itemSections: y.value,
4571
- closeContextMenu: w
2201
+ V(C(Oe), {
2202
+ position: s.value,
2203
+ itemSections: P.value,
2204
+ closeContextMenu: G
4572
2205
  }, null, 8, ["position", "itemSections"])
4573
2206
  ]),
4574
- Te(D.$slots, "breadcrumbs", {
2207
+ Q(D.$slots, "breadcrumbs", {
4575
2208
  drilldownBreadcrumbsProps: {
4576
- clearDrilldownSelections: T(g),
4577
- sliceDrilldownSelections: T(l),
4578
- drilldownFiltersDisplayValues: T(c),
4579
- drilldownDimension: T(u)
2209
+ clearDrilldownSelections: C(F),
2210
+ sliceDrilldownSelections: C(p),
2211
+ drilldownFiltersDisplayValues: C(y),
2212
+ drilldownDimension: C(c)
4580
2213
  }
4581
2214
  }, () => [
4582
- lt(T(Rr), {
4583
- "clear-drilldown-selections": T(g),
4584
- "slice-drilldown-selections": T(l),
4585
- "filters-display-values": T(c),
4586
- "current-dimension": T(u)
2215
+ V(C(be), {
2216
+ "clear-drilldown-selections": C(F),
2217
+ "slice-drilldown-selections": C(p),
2218
+ "filters-display-values": C(y),
2219
+ "current-dimension": C(c)
4587
2220
  }, null, 8, ["clear-drilldown-selections", "slice-drilldown-selections", "filters-display-values", "current-dimension"])
4588
2221
  ]),
4589
- Nr("div", fo, [
4590
- Te(D.$slots, "chart", {
4591
- drilldownFilters: T(o),
4592
- drilldownDimension: T(u),
4593
- onDataPointsSelected: x,
4594
- onContextMenu: h
2222
+ se("div", Ce, [
2223
+ Q(D.$slots, "chart", {
2224
+ drilldownFilters: C(a),
2225
+ drilldownDimension: C(c),
2226
+ onDataPointsSelected: k,
2227
+ onContextMenu: q
4595
2228
  })
4596
2229
  ])
4597
2230
  ]));
4598
2231
  }
4599
- }), xu = m({
2232
+ }), Wn = u({
4600
2233
  props: {
4601
2234
  /**
4602
2235
  * {@inheritDoc @sisense/sdk-ui!ChartWidgetProps.bottomSlot}
@@ -4717,8 +2350,8 @@ const bu = () => {
4717
2350
  */
4718
2351
  onDataReady: Function
4719
2352
  },
4720
- setup: (e) => b(Sr, e)
4721
- }), Cu = m({
2353
+ setup: (t) => d(zt, t)
2354
+ }), Tn = u({
4722
2355
  props: {
4723
2356
  /** @internal */
4724
2357
  bottomSlot: Object,
@@ -4825,24 +2458,8 @@ const bu = () => {
4825
2458
  */
4826
2459
  onDataReady: Function
4827
2460
  },
4828
- setup: (e) => b(Or, e)
4829
- }), wu = m({
4830
- props: {
4831
- bottomSlot: Object,
4832
- dataOptions: {
4833
- type: Object,
4834
- required: !0
4835
- },
4836
- dataSource: [String, Object],
4837
- description: String,
4838
- filters: [Object, Array],
4839
- styleOptions: Object,
4840
- title: String,
4841
- topSlot: Object,
4842
- widgetStyleOptions: Object
4843
- },
4844
- setup: (e) => b(vr, e)
4845
- }), Du = m({
2461
+ setup: (t) => d(Kt, t)
2462
+ }), En = u({
4846
2463
  props: {
4847
2464
  /**
4848
2465
  * {@inheritDoc @sisense/sdk-ui!PivotTableWidgetProps.dataOptions}
@@ -4936,8 +2553,8 @@ const bu = () => {
4936
2553
  */
4937
2554
  onHeaderCellFormat: Function
4938
2555
  },
4939
- setup: (e) => b(xr, e)
4940
- }), ju = m({
2556
+ setup: (t) => d(Ut, t)
2557
+ }), Bn = u({
4941
2558
  props: {
4942
2559
  /**
4943
2560
  * Unique identifier of the widget
@@ -5062,8 +2679,8 @@ const bu = () => {
5062
2679
  */
5063
2680
  onDataPointsSelected: Function
5064
2681
  },
5065
- setup: (e) => b(Cr, e)
5066
- }), Pu = m({
2682
+ setup: (t) => d(Xt, t)
2683
+ }), kn = u({
5067
2684
  props: {
5068
2685
  /**
5069
2686
  * {@inheritDoc @sisense/sdk-ui!DashboardByIdProps.dashboardOid}
@@ -5077,8 +2694,8 @@ const bu = () => {
5077
2694
  */
5078
2695
  config: Object
5079
2696
  },
5080
- setup: (e) => b(wr, e)
5081
- }), Fu = m({
2697
+ setup: (t) => d(Yt, t)
2698
+ }), $n = u({
5082
2699
  props: {
5083
2700
  /**
5084
2701
  * {@inheritDoc @sisense/sdk-ui!DashboardProps.title}
@@ -5116,118 +2733,118 @@ const bu = () => {
5116
2733
  */
5117
2734
  styleOptions: Object
5118
2735
  },
5119
- setup: (e) => b(Dr, e)
2736
+ setup: (t) => d(Zt, t)
5120
2737
  });
5121
- function po(e) {
5122
- return jr.toDashboardProps(e);
2738
+ function De(t) {
2739
+ return te.toDashboardProps(t);
5123
2740
  }
5124
- const Au = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2741
+ const Qn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5125
2742
  __proto__: null,
5126
- toDashboardProps: po
5127
- }, Symbol.toStringTag, { value: "Module" })), go = (e, t) => ne.replaceFilters(e, t), ho = (e, t) => ne.addFilter(e, t), mo = (e, t) => ne.addFilters(e, t), yo = (e, t, n) => ne.replaceFilter(
5128
- e,
2743
+ toDashboardProps: De
2744
+ }, Symbol.toStringTag, { value: "Module" })), me = (t, e) => T.replaceFilters(t, e), je = (t, e) => T.addFilter(t, e), ve = (t, e) => T.addFilters(t, e), Pe = (t, e, n) => T.replaceFilter(
5129
2745
  t,
2746
+ e,
5130
2747
  n
5131
- ), bo = (e, t) => ne.removeFilter(e, t), So = (e, t) => ne.removeFilters(e, t), Lu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2748
+ ), xe = (t, e) => T.removeFilter(t, e), Ae = (t, e) => T.removeFilters(t, e), In = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5132
2749
  __proto__: null,
5133
- addFilter: ho,
5134
- addFilters: mo,
5135
- removeFilter: bo,
5136
- removeFilters: So,
5137
- replaceFilter: yo,
5138
- replaceFilters: go
5139
- }, Symbol.toStringTag, { value: "Module" })), Oo = (e) => B.toExecuteQueryParams(e), vo = (e) => B.toExecutePivotQueryParams(e);
5140
- function xo(e) {
5141
- return B.toChartProps(e);
2750
+ addFilter: je,
2751
+ addFilters: ve,
2752
+ removeFilter: xe,
2753
+ removeFilters: Ae,
2754
+ replaceFilter: Pe,
2755
+ replaceFilters: me
2756
+ }, Symbol.toStringTag, { value: "Module" })), Me = (t) => v.toExecuteQueryParams(t), we = (t) => v.toExecutePivotQueryParams(t);
2757
+ function qe(t) {
2758
+ return v.toChartProps(t);
5142
2759
  }
5143
- function Co(e) {
5144
- return B.toTableProps(e);
2760
+ function Re(t) {
2761
+ return v.toTableProps(t);
5145
2762
  }
5146
- function wo(e) {
5147
- return B.toPivotTableProps(e);
2763
+ function We(t) {
2764
+ return v.toPivotTableProps(t);
5148
2765
  }
5149
- function Do(e) {
5150
- return B.toChartWidgetProps(e);
2766
+ function Te(t) {
2767
+ return v.toChartWidgetProps(t);
5151
2768
  }
5152
- function jo(e) {
5153
- return B.toPivotTableWidgetProps(e);
2769
+ function Ee(t) {
2770
+ return v.toPivotTableWidgetProps(t);
5154
2771
  }
5155
- function Po(e) {
5156
- return B.toTextWidgetProps(e);
2772
+ function Be(t) {
2773
+ return v.toTextWidgetProps(t);
5157
2774
  }
5158
- function Fo(e) {
5159
- return B.toWidgetProps(e);
2775
+ function ke(t) {
2776
+ return v.toWidgetProps(t);
5160
2777
  }
5161
- const Eu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2778
+ const Ln = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5162
2779
  __proto__: null,
5163
- toChartProps: xo,
5164
- toChartWidgetProps: Do,
5165
- toExecutePivotQueryParams: vo,
5166
- toExecuteQueryParams: Oo,
5167
- toPivotTableProps: wo,
5168
- toPivotTableWidgetProps: jo,
5169
- toTableProps: Co,
5170
- toTextWidgetProps: Po,
5171
- toWidgetProps: Fo
2780
+ toChartProps: qe,
2781
+ toChartWidgetProps: Te,
2782
+ toExecutePivotQueryParams: we,
2783
+ toExecuteQueryParams: Me,
2784
+ toPivotTableProps: We,
2785
+ toPivotTableWidgetProps: Ee,
2786
+ toTableProps: Re,
2787
+ toTextWidgetProps: Be,
2788
+ toWidgetProps: ke
5172
2789
  }, Symbol.toStringTag, { value: "Module" }));
5173
2790
  export {
5174
- To as AreaChart,
5175
- Zo as AreaRangeChart,
5176
- Qo as AreamapChart,
5177
- Mo as BarChart,
5178
- Jo as BoxplotChart,
5179
- $o as CalendarHeatmapChart,
5180
- zo as Chart,
5181
- xu as ChartWidget,
5182
- Io as ColumnChart,
5183
- oo as ContextMenu,
5184
- nu as CriteriaFilterTile,
5185
- Tu as CustomWidgetsProvider,
5186
- Fu as Dashboard,
5187
- Pu as DashboardById,
5188
- eu as DateRangeFilterTile,
5189
- Rr as DrilldownBreadcrumbs,
5190
- vu as DrilldownWidget,
5191
- su as FilterTile,
5192
- iu as FiltersPanel,
5193
- _o as FunnelChart,
5194
- Go as IndicatorChart,
5195
- ko as LineChart,
5196
- tu as MemberFilterTile,
5197
- Bo as PieChart,
5198
- Vo as PivotTable,
5199
- Du as PivotTableWidget,
5200
- Ko as PolarChart,
5201
- ru as RelativeDateFilterTile,
5202
- Uo as ScatterChart,
5203
- Yo as ScattermapChart,
5204
- Mu as SisenseContextProvider,
5205
- Xo as StreamgraphChart,
5206
- Ho as SunburstChart,
5207
- qo as Table,
5208
- wu as TableWidget,
5209
- $u as ThemeProvider,
5210
- Wo as TreemapChart,
5211
- ju as Widget,
5212
- Cu as WidgetById,
5213
- Iu as boxWhiskerProcessResult,
5214
- Lu as dashboardHelpers,
5215
- Au as dashboardModelTranslator,
5216
- _u as extractDimensionsAndMeasures,
5217
- Su as useComposedDashboard,
5218
- bu as useCustomWidgets,
5219
- uu as useExecuteCsvQuery,
5220
- cu as useExecuteCustomWidgetQuery,
5221
- lu as useExecutePivotQuery,
5222
- au as useExecuteQuery,
5223
- ou as useExecuteQueryByWidgetId,
5224
- yu as useFetch,
5225
- fu as useGetDashboardModel,
5226
- pu as useGetDashboardModels,
5227
- du as useGetFilterMembers,
5228
- mu as useGetHierarchyModels,
5229
- gu as useGetSharedFormula,
5230
- hu as useGetWidgetModel,
5231
- Ou as useJtdWidget,
5232
- Eu as widgetModelTranslator
2791
+ _e as AreaChart,
2792
+ cn as AreaRangeChart,
2793
+ sn as AreamapChart,
2794
+ He as BarChart,
2795
+ on as BoxplotChart,
2796
+ Ve as CalendarHeatmapChart,
2797
+ rn as Chart,
2798
+ Wn as ChartWidget,
2799
+ Je as ColumnChart,
2800
+ Oe as ContextMenu,
2801
+ pn as CriteriaFilterTile,
2802
+ Nn as CustomWidgetsProvider,
2803
+ $n as Dashboard,
2804
+ kn as DashboardById,
2805
+ ln as DateRangeFilterTile,
2806
+ be as DrilldownBreadcrumbs,
2807
+ Rn as DrilldownWidget,
2808
+ hn as FilterTile,
2809
+ bn as FiltersPanel,
2810
+ Ne as FunnelChart,
2811
+ nn as IndicatorChart,
2812
+ ze as LineChart,
2813
+ dn as MemberFilterTile,
2814
+ Ke as PieChart,
2815
+ Ye as PivotTable,
2816
+ En as PivotTableWidget,
2817
+ en as PolarChart,
2818
+ yn as RelativeDateFilterTile,
2819
+ Ue as ScatterChart,
2820
+ an as ScattermapChart,
2821
+ zn as SisenseContextProvider,
2822
+ un as StreamgraphChart,
2823
+ tn as SunburstChart,
2824
+ Xe as Table,
2825
+ Kn as ThemeProvider,
2826
+ Ze as TreemapChart,
2827
+ Bn as Widget,
2828
+ Tn as WidgetById,
2829
+ Hn as boxWhiskerProcessResult,
2830
+ In as dashboardHelpers,
2831
+ Qn as dashboardModelTranslator,
2832
+ Vn as extractDimensionsAndMeasures,
2833
+ wn as useComposedDashboard,
2834
+ Mn as useCustomWidgets,
2835
+ Sn as useExecuteCsvQuery,
2836
+ fn as useExecuteCustomWidgetQuery,
2837
+ Fn as useExecutePivotQuery,
2838
+ gn as useExecuteQuery,
2839
+ On as useExecuteQueryByWidgetId,
2840
+ An as useFetch,
2841
+ mn as useGetDashboardModel,
2842
+ jn as useGetDashboardModels,
2843
+ Dn as useGetDataSourceDimensions,
2844
+ Cn as useGetFilterMembers,
2845
+ xn as useGetHierarchyModels,
2846
+ vn as useGetSharedFormula,
2847
+ Pn as useGetWidgetModel,
2848
+ qn as useJtdWidget,
2849
+ Ln as widgetModelTranslator
5233
2850
  };