@luzmo/analytics-components-kit 1.0.1-alpha.3 → 1.0.1-alpha.4

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 (150) hide show
  1. package/LICENSE +18 -0
  2. package/custom-elements.json +1550 -0
  3. package/lib/area-chart-slots.config-BLxiYX05.cjs +20 -0
  4. package/lib/area-chart-slots.config-C0c2ZzBh.js +52 -0
  5. package/lib/async-directive-CPjMHOPu.cjs +24 -0
  6. package/lib/async-directive-SCUUQ3Mh.js +114 -0
  7. package/lib/bar-chart-slots.config-GSSL7XVA.js +47 -0
  8. package/lib/bar-chart-slots.config-Jx1PveTM.cjs +20 -0
  9. package/lib/bar-chart.config-B57geUzJ.cjs +20 -0
  10. package/lib/bar-chart.config-CQ6HAvs2.js +153 -0
  11. package/lib/bar-chart.en-BqYbiHO3.cjs +20 -0
  12. package/lib/bar-chart.en-FwT00qdU.js +69 -0
  13. package/lib/bar-chart.fr-DGx9smEh.cjs +20 -0
  14. package/lib/bar-chart.fr-DbxKiM0j.js +44 -0
  15. package/lib/bar-chart.nl-BYzVExsz.cjs +20 -0
  16. package/lib/bar-chart.nl-ahX1ARpH.js +44 -0
  17. package/lib/button-base-B4PdJFVe.cjs +27 -0
  18. package/lib/button-base-CtfPWS-P.js +142 -0
  19. package/lib/column-chart.config-B57geUzJ.cjs +20 -0
  20. package/lib/column-chart.config-C9hP0kX7.js +153 -0
  21. package/lib/cs-DVZ0Tapy.js +89 -0
  22. package/lib/cs-I9E81keK.cjs +20 -0
  23. package/lib/da-DHy05oSR.js +97 -0
  24. package/lib/da-QkdvupDg.cjs +20 -0
  25. package/lib/de-Dn5mUzha.cjs +20 -0
  26. package/lib/de-iM39JlAt.js +109 -0
  27. package/lib/decompose-numeric-format-B3rVVHpO.cjs +20 -0
  28. package/lib/decompose-numeric-format-BuZcjH2k.js +39 -0
  29. package/lib/directive-helpers-BSB0tfc9.cjs +32 -0
  30. package/lib/directive-helpers-eY1rHtyn.js +154 -0
  31. package/lib/divider.module-BW8qaMVq.js +211 -0
  32. package/lib/divider.module-DEy88Ieh.cjs +20 -0
  33. package/lib/donut-chart-slots.config-BEwhfq27.js +39 -0
  34. package/lib/donut-chart-slots.config-DIp-24lO.cjs +20 -0
  35. package/lib/donut-chart.config-3DhKiSSM.js +177 -0
  36. package/lib/donut-chart.config-DLWJUlHx.cjs +20 -0
  37. package/lib/donut-chart.en-Blb9oSdU.cjs +20 -0
  38. package/lib/donut-chart.en-CzjT4-XN.js +85 -0
  39. package/lib/donut-chart.fr-BeTVa2wh.cjs +20 -0
  40. package/lib/donut-chart.fr-DftPrKbG.js +39 -0
  41. package/lib/donut-chart.nl-D9YGbOce.cjs +20 -0
  42. package/lib/donut-chart.nl-NMatXfhK.js +39 -0
  43. package/lib/draggable-data-item/index.cjs +20 -0
  44. package/lib/draggable-data-item/index.js +30 -0
  45. package/lib/droppable-slot/index.cjs +20 -0
  46. package/lib/droppable-slot/index.js +30 -0
  47. package/lib/en-BDBzmAXX.cjs +202 -0
  48. package/lib/en-CIeY2T5K.js +1980 -0
  49. package/lib/en-GB-BqYHIX1v.cjs +20 -0
  50. package/lib/en-GB-CYx--4nh.js +28 -0
  51. package/lib/es-CwyPlN5d.cjs +20 -0
  52. package/lib/es-KhTq4jX8.js +305 -0
  53. package/lib/fi-Dh_ebgpe.js +97 -0
  54. package/lib/fi-rijeZE5V.cjs +20 -0
  55. package/lib/fr-BcgE-6S_.cjs +20 -0
  56. package/lib/fr-CU727YF1.js +305 -0
  57. package/lib/get-css-variable-BHHQ0SnL.js +1444 -0
  58. package/lib/get-css-variable-D439CdH9.cjs +24 -0
  59. package/lib/he-Au3xg6lR.js +89 -0
  60. package/lib/he-O6Ih8Bqh.cjs +20 -0
  61. package/lib/hu-BnZ8y3xQ.cjs +20 -0
  62. package/lib/hu-DNJ-P_MW.js +97 -0
  63. package/lib/if-defined-BbzmSG-O.js +757 -0
  64. package/lib/if-defined-V7yEJWI3.cjs +54 -0
  65. package/lib/imageobject.config-B7ld9bj3.cjs +20 -0
  66. package/lib/imageobject.config-DZLp9Elq.js +127 -0
  67. package/lib/index-0314DjEl.cjs +20 -0
  68. package/lib/index-B9h2L_hV.js +3048 -0
  69. package/lib/index-BDXFsKUM.cjs +146 -0
  70. package/lib/index-Bd4cKS9O.js +155 -0
  71. package/lib/index-BmAD29P2.js +106 -0
  72. package/lib/index-Bo1DpZ-1.cjs +58 -0
  73. package/lib/index-C4ePDYEC.cjs +41 -0
  74. package/lib/index-C9xEN5Ji.js +82 -0
  75. package/lib/index-CBCm4_7S.js +869 -0
  76. package/lib/index-CM80_HQw.js +442 -0
  77. package/lib/index-CcF-9wyF.cjs +71 -0
  78. package/lib/index-CfEm5P0J.cjs +196 -0
  79. package/lib/index-CrWoFMZ3.cjs +22 -0
  80. package/lib/index-CtEJZdT0.js +1627 -0
  81. package/lib/index-CvX-HLY1.cjs +322 -0
  82. package/lib/index-D37RwuEH.js +1584 -0
  83. package/lib/index-D5puKlcm.cjs +96 -0
  84. package/lib/index-DGz6jCKo.cjs +26 -0
  85. package/lib/index-DJp_9h0l.js +327 -0
  86. package/lib/index-DSbgZduE.js +501 -0
  87. package/lib/index-D_KYpfBM.js +24 -0
  88. package/lib/index-DdtjeKYI.js +928 -0
  89. package/lib/index-Dj7PF4Q9.cjs +63 -0
  90. package/lib/index-Dq3HAOaM.js +127 -0
  91. package/lib/index-DrIA0eFE.js +392 -0
  92. package/lib/index-jt6FL_uE.cjs +20 -0
  93. package/lib/index-kJR406YZ.cjs +112 -0
  94. package/lib/index-v8ZTprPO.cjs +51 -0
  95. package/lib/index.cjs +875 -0
  96. package/lib/index.js +6367 -302
  97. package/lib/it-Bh5U73z6.js +305 -0
  98. package/lib/it-PshtLMkq.cjs +20 -0
  99. package/lib/ja-CCcHUL61.js +89 -0
  100. package/lib/ja-KIS2HdaG.cjs +20 -0
  101. package/lib/ko--l4qmjLV.cjs +20 -0
  102. package/lib/ko-DhapsZMM.js +89 -0
  103. package/lib/line-chart.config-BZcvfO2c.cjs +20 -0
  104. package/lib/line-chart.config-CIVN6uLI.js +115 -0
  105. package/lib/mk-B9HPSuKa.js +97 -0
  106. package/lib/mk-DZlj-edb.cjs +20 -0
  107. package/lib/nl-BKlDqOXb.cjs +20 -0
  108. package/lib/nl-BwSt5Bf4.js +109 -0
  109. package/lib/no-D-DofYnx.js +109 -0
  110. package/lib/no-D_SzxhTu.cjs +20 -0
  111. package/lib/observe-slot-text-DOYmGOZe.js +181 -0
  112. package/lib/observe-slot-text-oJ0a2KY9.cjs +42 -0
  113. package/lib/picker/index.cjs +20 -0
  114. package/lib/picker/index.js +32 -0
  115. package/lib/pl-D_L_0Boq.js +97 -0
  116. package/lib/pl-PIK23rK_.cjs +20 -0
  117. package/lib/popover-Bwnkg-5-.js +67 -0
  118. package/lib/popover-CQGN8nbX.cjs +32 -0
  119. package/lib/progress-circle/index.cjs +35 -0
  120. package/lib/progress-circle/index.js +104 -0
  121. package/lib/pt-B0BBS5VB.js +89 -0
  122. package/lib/pt-Dqlu4MS5.cjs +20 -0
  123. package/lib/ru-Vo-m3O_2.js +108 -0
  124. package/lib/ru-zyNDTB04.cjs +20 -0
  125. package/lib/sv-1DPTltNQ.cjs +20 -0
  126. package/lib/sv-CiozMaev.js +89 -0
  127. package/lib/textobject.config-C8opcGG4.js +52 -0
  128. package/lib/textobject.config-DbAajFz8.cjs +20 -0
  129. package/lib/tr-BkmWvOG2.cjs +20 -0
  130. package/lib/tr-D_D4i5iv.js +109 -0
  131. package/lib/zh-CN-DTZ4OmdP.cjs +20 -0
  132. package/lib/zh-CN-wsl7eFSd.js +89 -0
  133. package/lib/zh-TW-DTZ4OmdP.cjs +20 -0
  134. package/lib/zh-TW-wsl7eFSd.js +89 -0
  135. package/package.json +16 -12
  136. package/lib/37.js +0 -1
  137. package/lib/729.js +0 -1
  138. package/lib/common-31743c5a.js +0 -13
  139. package/lib/common-b02547a0.js +0 -1
  140. package/lib/common-b49d9a9d.js +0 -1
  141. package/lib/common-b5232813.js +0 -56
  142. package/lib/common-cefd4f4c.js +0 -1
  143. package/lib/common-d6cb565f.js +0 -1
  144. package/lib/common-fd868059.js +0 -1
  145. package/lib/common-fedaf338.js +0 -32
  146. package/lib/edit-option-picker/index.js +0 -314
  147. package/lib/edit-option-slider/index.js +0 -102
  148. package/lib/edit-option-toggle/index.js +0 -114
  149. package/lib/vendors-93cc3efa.js +0 -1
  150. package/lib/vendors-bb3d84b5.js +0 -1
@@ -0,0 +1,1980 @@
1
+ /*! * A kit of modern Luzmo Web Components for analytics in your web application.
2
+ *
3
+ * Copyright © 2024 Luzmo
4
+ * All rights reserved.
5
+ * Luzmo web components (“Luzmo Web Components”)
6
+ * must be used according to the Luzmo Terms of Service.
7
+ * This license allows users with a current active Luzmo account
8
+ * to use the Luzmo Web Components. This license terminates
9
+ * automatically if a user no longer has an active Luzmo account.
10
+ * Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
11
+ *
12
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18
+ * SOFTWARE.
19
+ * */
20
+ import { h as St } from "./index-CtEJZdT0.js";
21
+ import { S as bt, a as kt, L as wt, r as Tt, x as D, n as ge, e as O } from "./if-defined-BbzmSG-O.js";
22
+ import "./index-Bd4cKS9O.js";
23
+ import "./index-DSbgZduE.js";
24
+ import "./index-C9xEN5Ji.js";
25
+ import "./index-CBCm4_7S.js";
26
+ import "./index-D37RwuEH.js";
27
+ import "./progress-circle/index.js";
28
+ import { C as ve, h as Me } from "./index-DdtjeKYI.js";
29
+ import { i as R, l as zt, b as Ft, c as Se } from "./get-css-variable-BHHQ0SnL.js";
30
+ import { d as Dt } from "./decompose-numeric-format-BuZcjH2k.js";
31
+ function Yt(e) {
32
+ return Math.abs(e = Math.round(e)) >= 1e21 ? e.toLocaleString("en").replace(/,/g, "") : e.toString(10);
33
+ }
34
+ function ce(e, t) {
35
+ if ((r = (e = t ? e.toExponential(t - 1) : e.toExponential()).indexOf("e")) < 0) return null;
36
+ var r, n = e.slice(0, r);
37
+ return [
38
+ n.length > 1 ? n[0] + n.slice(2) : n,
39
+ +e.slice(r + 1)
40
+ ];
41
+ }
42
+ function Ct(e) {
43
+ return e = ce(Math.abs(e)), e ? e[1] : NaN;
44
+ }
45
+ function xt(e, t) {
46
+ return function(r, n) {
47
+ for (var i = r.length, a = [], l = 0, _ = e[0], k = 0; i > 0 && _ > 0 && (k + _ + 1 > n && (_ = Math.max(1, n - k)), a.push(r.substring(i -= _, i + _)), !((k += _ + 1) > n)); )
48
+ _ = e[l = (l + 1) % e.length];
49
+ return a.reverse().join(t);
50
+ };
51
+ }
52
+ function Ut(e) {
53
+ return function(t) {
54
+ return t.replace(/[0-9]/g, function(r) {
55
+ return e[+r];
56
+ });
57
+ };
58
+ }
59
+ var At = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
60
+ function De(e) {
61
+ if (!(t = At.exec(e))) throw new Error("invalid format: " + e);
62
+ var t;
63
+ return new Ue({
64
+ fill: t[1],
65
+ align: t[2],
66
+ sign: t[3],
67
+ symbol: t[4],
68
+ zero: t[5],
69
+ width: t[6],
70
+ comma: t[7],
71
+ precision: t[8] && t[8].slice(1),
72
+ trim: t[9],
73
+ type: t[10]
74
+ });
75
+ }
76
+ De.prototype = Ue.prototype;
77
+ function Ue(e) {
78
+ this.fill = e.fill === void 0 ? " " : e.fill + "", this.align = e.align === void 0 ? ">" : e.align + "", this.sign = e.sign === void 0 ? "-" : e.sign + "", this.symbol = e.symbol === void 0 ? "" : e.symbol + "", this.zero = !!e.zero, this.width = e.width === void 0 ? void 0 : +e.width, this.comma = !!e.comma, this.precision = e.precision === void 0 ? void 0 : +e.precision, this.trim = !!e.trim, this.type = e.type === void 0 ? "" : e.type + "";
79
+ }
80
+ Ue.prototype.toString = function() {
81
+ return this.fill + this.align + this.sign + this.symbol + (this.zero ? "0" : "") + (this.width === void 0 ? "" : Math.max(1, this.width | 0)) + (this.comma ? "," : "") + (this.precision === void 0 ? "" : "." + Math.max(0, this.precision | 0)) + (this.trim ? "~" : "") + this.type;
82
+ };
83
+ function Lt(e) {
84
+ e: for (var t = e.length, r = 1, n = -1, i; r < t; ++r)
85
+ switch (e[r]) {
86
+ case ".":
87
+ n = i = r;
88
+ break;
89
+ case "0":
90
+ n === 0 && (n = r), i = r;
91
+ break;
92
+ default:
93
+ if (!+e[r]) break e;
94
+ n > 0 && (n = 0);
95
+ break;
96
+ }
97
+ return n > 0 ? e.slice(0, n) + e.slice(i + 1) : e;
98
+ }
99
+ var tt;
100
+ function $t(e, t) {
101
+ var r = ce(e, t);
102
+ if (!r) return e + "";
103
+ var n = r[0], i = r[1], a = i - (tt = Math.max(-8, Math.min(8, Math.floor(i / 3))) * 3) + 1, l = n.length;
104
+ return a === l ? n : a > l ? n + new Array(a - l + 1).join("0") : a > 0 ? n.slice(0, a) + "." + n.slice(a) : "0." + new Array(1 - a).join("0") + ce(e, Math.max(0, t + a - 1))[0];
105
+ }
106
+ function We(e, t) {
107
+ var r = ce(e, t);
108
+ if (!r) return e + "";
109
+ var n = r[0], i = r[1];
110
+ return i < 0 ? "0." + new Array(-i).join("0") + n : n.length > i + 1 ? n.slice(0, i + 1) + "." + n.slice(i + 1) : n + new Array(i - n.length + 2).join("0");
111
+ }
112
+ const Ee = {
113
+ "%": (e, t) => (e * 100).toFixed(t),
114
+ b: (e) => Math.round(e).toString(2),
115
+ c: (e) => e + "",
116
+ d: Yt,
117
+ e: (e, t) => e.toExponential(t),
118
+ f: (e, t) => e.toFixed(t),
119
+ g: (e, t) => e.toPrecision(t),
120
+ o: (e) => Math.round(e).toString(8),
121
+ p: (e, t) => We(e * 100, t),
122
+ r: We,
123
+ s: $t,
124
+ X: (e) => Math.round(e).toString(16).toUpperCase(),
125
+ x: (e) => Math.round(e).toString(16)
126
+ };
127
+ function He(e) {
128
+ return e;
129
+ }
130
+ var Oe = Array.prototype.map, Ie = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
131
+ function Nt(e) {
132
+ var t = e.grouping === void 0 || e.thousands === void 0 ? He : xt(Oe.call(e.grouping, Number), e.thousands + ""), r = e.currency === void 0 ? "" : e.currency[0] + "", n = e.currency === void 0 ? "" : e.currency[1] + "", i = e.decimal === void 0 ? "." : e.decimal + "", a = e.numerals === void 0 ? He : Ut(Oe.call(e.numerals, String)), l = e.percent === void 0 ? "%" : e.percent + "", _ = e.minus === void 0 ? "−" : e.minus + "", k = e.nan === void 0 ? "NaN" : e.nan + "";
133
+ function u(y) {
134
+ y = De(y);
135
+ var H = y.fill, m = y.align, c = y.sign, d = y.symbol, S = y.zero, h = y.width, Y = y.comma, b = y.precision, F = y.trim, g = y.type;
136
+ g === "n" ? (Y = !0, g = "g") : Ee[g] || (b === void 0 && (b = 12), F = !0, g = "g"), (S || H === "0" && m === "=") && (S = !0, H = "0", m = "=");
137
+ var z = d === "$" ? r : d === "#" && /[boxX]/.test(g) ? "0" + g.toLowerCase() : "", ue = d === "$" ? n : /[%p]/.test(g) ? l : "", j = Ee[g], _e = /[defgprs%]/.test(g);
138
+ b = b === void 0 ? 6 : /[gprs]/.test(g) ? Math.max(1, Math.min(21, b)) : Math.max(0, Math.min(20, b));
139
+ function he(p) {
140
+ var I = z, A = ue, Q, de, X;
141
+ if (g === "c")
142
+ A = j(p) + A, p = "";
143
+ else {
144
+ p = +p;
145
+ var K = p < 0 || 1 / p < 0;
146
+ if (p = isNaN(p) ? k : j(Math.abs(p), b), F && (p = Lt(p)), K && +p == 0 && c !== "+" && (K = !1), I = (K ? c === "(" ? c : _ : c === "-" || c === "(" ? "" : c) + I, A = (g === "s" ? Ie[8 + tt / 3] : "") + A + (K && c === "(" ? ")" : ""), _e) {
147
+ for (Q = -1, de = p.length; ++Q < de; )
148
+ if (X = p.charCodeAt(Q), 48 > X || X > 57) {
149
+ A = (X === 46 ? i + p.slice(Q + 1) : p.slice(Q)) + A, p = p.slice(0, Q);
150
+ break;
151
+ }
152
+ }
153
+ }
154
+ Y && !S && (p = t(p, 1 / 0));
155
+ var ee = I.length + p.length + A.length, E = ee < h ? new Array(h - ee + 1).join(H) : "";
156
+ switch (Y && S && (p = t(E + p, E.length ? h - A.length : 1 / 0), E = ""), m) {
157
+ case "<":
158
+ p = I + p + A + E;
159
+ break;
160
+ case "=":
161
+ p = I + E + p + A;
162
+ break;
163
+ case "^":
164
+ p = E.slice(0, ee = E.length >> 1) + I + p + A + E.slice(ee);
165
+ break;
166
+ default:
167
+ p = E + I + p + A;
168
+ break;
169
+ }
170
+ return a(p);
171
+ }
172
+ return he.toString = function() {
173
+ return y + "";
174
+ }, he;
175
+ }
176
+ function w(y, H) {
177
+ var m = u((y = De(y), y.type = "f", y)), c = Math.max(-8, Math.min(8, Math.floor(Ct(H) / 3))) * 3, d = Math.pow(10, -c), S = Ie[8 + c / 3];
178
+ return function(h) {
179
+ return m(d * h) + S;
180
+ };
181
+ }
182
+ return {
183
+ format: u,
184
+ formatPrefix: w
185
+ };
186
+ }
187
+ const be = /* @__PURE__ */ new Date(), ke = /* @__PURE__ */ new Date();
188
+ function x(e, t, r, n) {
189
+ function i(a) {
190
+ return e(a = arguments.length === 0 ? /* @__PURE__ */ new Date() : /* @__PURE__ */ new Date(+a)), a;
191
+ }
192
+ return i.floor = (a) => (e(a = /* @__PURE__ */ new Date(+a)), a), i.ceil = (a) => (e(a = new Date(a - 1)), t(a, 1), e(a), a), i.round = (a) => {
193
+ const l = i(a), _ = i.ceil(a);
194
+ return a - l < _ - a ? l : _;
195
+ }, i.offset = (a, l) => (t(a = /* @__PURE__ */ new Date(+a), l == null ? 1 : Math.floor(l)), a), i.range = (a, l, _) => {
196
+ const k = [];
197
+ if (a = i.ceil(a), _ = _ == null ? 1 : Math.floor(_), !(a < l) || !(_ > 0)) return k;
198
+ let u;
199
+ do
200
+ k.push(u = /* @__PURE__ */ new Date(+a)), t(a, _), e(a);
201
+ while (u < a && a < l);
202
+ return k;
203
+ }, i.filter = (a) => x((l) => {
204
+ if (l >= l) for (; e(l), !a(l); ) l.setTime(l - 1);
205
+ }, (l, _) => {
206
+ if (l >= l)
207
+ if (_ < 0) for (; ++_ <= 0; )
208
+ for (; t(l, -1), !a(l); )
209
+ ;
210
+ else for (; --_ >= 0; )
211
+ for (; t(l, 1), !a(l); )
212
+ ;
213
+ }), r && (i.count = (a, l) => (be.setTime(+a), ke.setTime(+l), e(be), e(ke), Math.floor(r(be, ke))), i.every = (a) => (a = Math.floor(a), !isFinite(a) || !(a > 0) ? null : a > 1 ? i.filter(n ? (l) => n(l) % a === 0 : (l) => i.count(0, l) % a === 0) : i)), i;
214
+ }
215
+ const se = 1e3, V = se * 60, le = V * 60, me = le * 24, rt = me * 7, nt = x((e) => {
216
+ e.setTime(e - e.getMilliseconds());
217
+ }, (e, t) => {
218
+ e.setTime(+e + t * se);
219
+ }, (e, t) => (t - e) / se, (e) => e.getUTCSeconds());
220
+ nt.range;
221
+ const at = x((e) => {
222
+ e.setTime(e - e.getMilliseconds() - e.getSeconds() * se);
223
+ }, (e, t) => {
224
+ e.setTime(+e + t * V);
225
+ }, (e, t) => (t - e) / V, (e) => e.getMinutes());
226
+ at.range;
227
+ const Wt = x((e) => {
228
+ e.setUTCSeconds(0, 0);
229
+ }, (e, t) => {
230
+ e.setTime(+e + t * V);
231
+ }, (e, t) => (t - e) / V, (e) => e.getUTCMinutes());
232
+ Wt.range;
233
+ const ot = x((e) => {
234
+ e.setTime(e - e.getMilliseconds() - e.getSeconds() * se - e.getMinutes() * V);
235
+ }, (e, t) => {
236
+ e.setTime(+e + t * le);
237
+ }, (e, t) => (t - e) / le, (e) => e.getHours());
238
+ ot.range;
239
+ const Et = x((e) => {
240
+ e.setUTCMinutes(0, 0, 0);
241
+ }, (e, t) => {
242
+ e.setTime(+e + t * le);
243
+ }, (e, t) => (t - e) / le, (e) => e.getUTCHours());
244
+ Et.range;
245
+ const pe = x(
246
+ (e) => e.setHours(0, 0, 0, 0),
247
+ (e, t) => e.setDate(e.getDate() + t),
248
+ (e, t) => (t - e - (t.getTimezoneOffset() - e.getTimezoneOffset()) * V) / me,
249
+ (e) => e.getDate() - 1
250
+ );
251
+ pe.range;
252
+ const Ae = x((e) => {
253
+ e.setUTCHours(0, 0, 0, 0);
254
+ }, (e, t) => {
255
+ e.setUTCDate(e.getUTCDate() + t);
256
+ }, (e, t) => (t - e) / me, (e) => e.getUTCDate() - 1);
257
+ Ae.range;
258
+ const Ht = x((e) => {
259
+ e.setUTCHours(0, 0, 0, 0);
260
+ }, (e, t) => {
261
+ e.setUTCDate(e.getUTCDate() + t);
262
+ }, (e, t) => (t - e) / me, (e) => Math.floor(e / me));
263
+ Ht.range;
264
+ function B(e) {
265
+ return x((t) => {
266
+ t.setDate(t.getDate() - (t.getDay() + 7 - e) % 7), t.setHours(0, 0, 0, 0);
267
+ }, (t, r) => {
268
+ t.setDate(t.getDate() + r * 7);
269
+ }, (t, r) => (r - t - (r.getTimezoneOffset() - t.getTimezoneOffset()) * V) / rt);
270
+ }
271
+ const Le = B(0), fe = B(1), Ot = B(2), It = B(3), re = B(4), qt = B(5), Qt = B(6);
272
+ Le.range;
273
+ fe.range;
274
+ Ot.range;
275
+ It.range;
276
+ re.range;
277
+ qt.range;
278
+ Qt.range;
279
+ function J(e) {
280
+ return x((t) => {
281
+ t.setUTCDate(t.getUTCDate() - (t.getUTCDay() + 7 - e) % 7), t.setUTCHours(0, 0, 0, 0);
282
+ }, (t, r) => {
283
+ t.setUTCDate(t.getUTCDate() + r * 7);
284
+ }, (t, r) => (r - t) / rt);
285
+ }
286
+ const it = J(0), ye = J(1), Vt = J(2), Pt = J(3), ne = J(4), jt = J(5), Gt = J(6);
287
+ it.range;
288
+ ye.range;
289
+ Vt.range;
290
+ Pt.range;
291
+ ne.range;
292
+ jt.range;
293
+ Gt.range;
294
+ const st = x((e) => {
295
+ e.setDate(1), e.setHours(0, 0, 0, 0);
296
+ }, (e, t) => {
297
+ e.setMonth(e.getMonth() + t);
298
+ }, (e, t) => t.getMonth() - e.getMonth() + (t.getFullYear() - e.getFullYear()) * 12, (e) => e.getMonth());
299
+ st.range;
300
+ const Rt = x((e) => {
301
+ e.setUTCDate(1), e.setUTCHours(0, 0, 0, 0);
302
+ }, (e, t) => {
303
+ e.setUTCMonth(e.getUTCMonth() + t);
304
+ }, (e, t) => t.getUTCMonth() - e.getUTCMonth() + (t.getUTCFullYear() - e.getUTCFullYear()) * 12, (e) => e.getUTCMonth());
305
+ Rt.range;
306
+ const P = x((e) => {
307
+ e.setMonth(0, 1), e.setHours(0, 0, 0, 0);
308
+ }, (e, t) => {
309
+ e.setFullYear(e.getFullYear() + t);
310
+ }, (e, t) => t.getFullYear() - e.getFullYear(), (e) => e.getFullYear());
311
+ P.every = (e) => !isFinite(e = Math.floor(e)) || !(e > 0) ? null : x((t) => {
312
+ t.setFullYear(Math.floor(t.getFullYear() / e) * e), t.setMonth(0, 1), t.setHours(0, 0, 0, 0);
313
+ }, (t, r) => {
314
+ t.setFullYear(t.getFullYear() + r * e);
315
+ });
316
+ P.range;
317
+ const Z = x((e) => {
318
+ e.setUTCMonth(0, 1), e.setUTCHours(0, 0, 0, 0);
319
+ }, (e, t) => {
320
+ e.setUTCFullYear(e.getUTCFullYear() + t);
321
+ }, (e, t) => t.getUTCFullYear() - e.getUTCFullYear(), (e) => e.getUTCFullYear());
322
+ Z.every = (e) => !isFinite(e = Math.floor(e)) || !(e > 0) ? null : x((t) => {
323
+ t.setUTCFullYear(Math.floor(t.getUTCFullYear() / e) * e), t.setUTCMonth(0, 1), t.setUTCHours(0, 0, 0, 0);
324
+ }, (t, r) => {
325
+ t.setUTCFullYear(t.getUTCFullYear() + r * e);
326
+ });
327
+ Z.range;
328
+ function we(e) {
329
+ if (0 <= e.y && e.y < 100) {
330
+ var t = new Date(-1, e.m, e.d, e.H, e.M, e.S, e.L);
331
+ return t.setFullYear(e.y), t;
332
+ }
333
+ return new Date(e.y, e.m, e.d, e.H, e.M, e.S, e.L);
334
+ }
335
+ function Te(e) {
336
+ if (0 <= e.y && e.y < 100) {
337
+ var t = new Date(Date.UTC(-1, e.m, e.d, e.H, e.M, e.S, e.L));
338
+ return t.setUTCFullYear(e.y), t;
339
+ }
340
+ return new Date(Date.UTC(e.y, e.m, e.d, e.H, e.M, e.S, e.L));
341
+ }
342
+ function ae(e, t, r) {
343
+ return { y: e, m: t, d: r, H: 0, M: 0, S: 0, L: 0 };
344
+ }
345
+ function Ye(e) {
346
+ var t = e.dateTime, r = e.date, n = e.time, i = e.periods, a = e.days, l = e.shortDays, _ = e.months, k = e.shortMonths, u = oe(i), w = ie(i), y = oe(a), H = ie(a), m = oe(l), c = ie(l), d = oe(_), S = ie(_), h = oe(k), Y = ie(k), b = {
347
+ a: K,
348
+ A: ee,
349
+ b: E,
350
+ B: dt,
351
+ c: null,
352
+ d: Ge,
353
+ e: Ge,
354
+ f: pr,
355
+ g: Fr,
356
+ G: Yr,
357
+ H: fr,
358
+ I: yr,
359
+ j: gr,
360
+ L: lt,
361
+ m: _r,
362
+ M: vr,
363
+ p: ct,
364
+ q: ft,
365
+ Q: Be,
366
+ s: Je,
367
+ S: Mr,
368
+ u: Sr,
369
+ U: br,
370
+ V: kr,
371
+ w: wr,
372
+ W: Tr,
373
+ x: null,
374
+ X: null,
375
+ y: zr,
376
+ Y: Dr,
377
+ Z: Cr,
378
+ "%": Ze
379
+ }, F = {
380
+ a: yt,
381
+ A: gt,
382
+ b: pt,
383
+ B: _t,
384
+ c: null,
385
+ d: Re,
386
+ e: Re,
387
+ f: Lr,
388
+ g: Vr,
389
+ G: jr,
390
+ H: xr,
391
+ I: Ur,
392
+ j: Ar,
393
+ L: ut,
394
+ m: $r,
395
+ M: Nr,
396
+ p: vt,
397
+ q: Mt,
398
+ Q: Be,
399
+ s: Je,
400
+ S: Wr,
401
+ u: Er,
402
+ U: Hr,
403
+ V: Or,
404
+ w: Ir,
405
+ W: qr,
406
+ x: null,
407
+ X: null,
408
+ y: Qr,
409
+ Y: Pr,
410
+ Z: Gr,
411
+ "%": Ze
412
+ }, g = {
413
+ a: he,
414
+ A: p,
415
+ b: I,
416
+ B: A,
417
+ c: Q,
418
+ d: Pe,
419
+ e: Pe,
420
+ f: ur,
421
+ g: Ve,
422
+ G: Qe,
423
+ H: je,
424
+ I: je,
425
+ j: ir,
426
+ L: mr,
427
+ m: or,
428
+ M: sr,
429
+ p: _e,
430
+ q: ar,
431
+ Q: dr,
432
+ s: cr,
433
+ S: lr,
434
+ u: Kt,
435
+ U: er,
436
+ V: tr,
437
+ w: Xt,
438
+ W: rr,
439
+ x: de,
440
+ X,
441
+ y: Ve,
442
+ Y: Qe,
443
+ Z: nr,
444
+ "%": hr
445
+ };
446
+ b.x = z(r, b), b.X = z(n, b), b.c = z(t, b), F.x = z(r, F), F.X = z(n, F), F.c = z(t, F);
447
+ function z(s, f) {
448
+ return function(v) {
449
+ var o = [], L = -1, T = 0, N = s.length, W, G, Ne;
450
+ for (v instanceof Date || (v = /* @__PURE__ */ new Date(+v)); ++L < N; )
451
+ s.charCodeAt(L) === 37 && (o.push(s.slice(T, L)), (G = qe[W = s.charAt(++L)]) != null ? W = s.charAt(++L) : G = W === "e" ? " " : "0", (Ne = f[W]) && (W = Ne(v, G)), o.push(W), T = L + 1);
452
+ return o.push(s.slice(T, L)), o.join("");
453
+ };
454
+ }
455
+ function ue(s, f) {
456
+ return function(v) {
457
+ var o = ae(1900, void 0, 1), L = j(o, s, v += "", 0), T, N;
458
+ if (L != v.length) return null;
459
+ if ("Q" in o) return new Date(o.Q);
460
+ if ("s" in o) return new Date(o.s * 1e3 + ("L" in o ? o.L : 0));
461
+ if (f && !("Z" in o) && (o.Z = 0), "p" in o && (o.H = o.H % 12 + o.p * 12), o.m === void 0 && (o.m = "q" in o ? o.q : 0), "V" in o) {
462
+ if (o.V < 1 || o.V > 53) return null;
463
+ "w" in o || (o.w = 1), "Z" in o ? (T = Te(ae(o.y, 0, 1)), N = T.getUTCDay(), T = N > 4 || N === 0 ? ye.ceil(T) : ye(T), T = Ae.offset(T, (o.V - 1) * 7), o.y = T.getUTCFullYear(), o.m = T.getUTCMonth(), o.d = T.getUTCDate() + (o.w + 6) % 7) : (T = we(ae(o.y, 0, 1)), N = T.getDay(), T = N > 4 || N === 0 ? fe.ceil(T) : fe(T), T = pe.offset(T, (o.V - 1) * 7), o.y = T.getFullYear(), o.m = T.getMonth(), o.d = T.getDate() + (o.w + 6) % 7);
464
+ } else ("W" in o || "U" in o) && ("w" in o || (o.w = "u" in o ? o.u % 7 : "W" in o ? 1 : 0), N = "Z" in o ? Te(ae(o.y, 0, 1)).getUTCDay() : we(ae(o.y, 0, 1)).getDay(), o.m = 0, o.d = "W" in o ? (o.w + 6) % 7 + o.W * 7 - (N + 5) % 7 : o.w + o.U * 7 - (N + 6) % 7);
465
+ return "Z" in o ? (o.H += o.Z / 100 | 0, o.M += o.Z % 100, Te(o)) : we(o);
466
+ };
467
+ }
468
+ function j(s, f, v, o) {
469
+ for (var L = 0, T = f.length, N = v.length, W, G; L < T; ) {
470
+ if (o >= N) return -1;
471
+ if (W = f.charCodeAt(L++), W === 37) {
472
+ if (W = f.charAt(L++), G = g[W in qe ? f.charAt(L++) : W], !G || (o = G(s, v, o)) < 0) return -1;
473
+ } else if (W != v.charCodeAt(o++))
474
+ return -1;
475
+ }
476
+ return o;
477
+ }
478
+ function _e(s, f, v) {
479
+ var o = u.exec(f.slice(v));
480
+ return o ? (s.p = w.get(o[0].toLowerCase()), v + o[0].length) : -1;
481
+ }
482
+ function he(s, f, v) {
483
+ var o = m.exec(f.slice(v));
484
+ return o ? (s.w = c.get(o[0].toLowerCase()), v + o[0].length) : -1;
485
+ }
486
+ function p(s, f, v) {
487
+ var o = y.exec(f.slice(v));
488
+ return o ? (s.w = H.get(o[0].toLowerCase()), v + o[0].length) : -1;
489
+ }
490
+ function I(s, f, v) {
491
+ var o = h.exec(f.slice(v));
492
+ return o ? (s.m = Y.get(o[0].toLowerCase()), v + o[0].length) : -1;
493
+ }
494
+ function A(s, f, v) {
495
+ var o = d.exec(f.slice(v));
496
+ return o ? (s.m = S.get(o[0].toLowerCase()), v + o[0].length) : -1;
497
+ }
498
+ function Q(s, f, v) {
499
+ return j(s, t, f, v);
500
+ }
501
+ function de(s, f, v) {
502
+ return j(s, r, f, v);
503
+ }
504
+ function X(s, f, v) {
505
+ return j(s, n, f, v);
506
+ }
507
+ function K(s) {
508
+ return l[s.getDay()];
509
+ }
510
+ function ee(s) {
511
+ return a[s.getDay()];
512
+ }
513
+ function E(s) {
514
+ return k[s.getMonth()];
515
+ }
516
+ function dt(s) {
517
+ return _[s.getMonth()];
518
+ }
519
+ function ct(s) {
520
+ return i[+(s.getHours() >= 12)];
521
+ }
522
+ function ft(s) {
523
+ return 1 + ~~(s.getMonth() / 3);
524
+ }
525
+ function yt(s) {
526
+ return l[s.getUTCDay()];
527
+ }
528
+ function gt(s) {
529
+ return a[s.getUTCDay()];
530
+ }
531
+ function pt(s) {
532
+ return k[s.getUTCMonth()];
533
+ }
534
+ function _t(s) {
535
+ return _[s.getUTCMonth()];
536
+ }
537
+ function vt(s) {
538
+ return i[+(s.getUTCHours() >= 12)];
539
+ }
540
+ function Mt(s) {
541
+ return 1 + ~~(s.getUTCMonth() / 3);
542
+ }
543
+ return {
544
+ format: function(s) {
545
+ var f = z(s += "", b);
546
+ return f.toString = function() {
547
+ return s;
548
+ }, f;
549
+ },
550
+ parse: function(s) {
551
+ var f = ue(s += "", !1);
552
+ return f.toString = function() {
553
+ return s;
554
+ }, f;
555
+ },
556
+ utcFormat: function(s) {
557
+ var f = z(s += "", F);
558
+ return f.toString = function() {
559
+ return s;
560
+ }, f;
561
+ },
562
+ utcParse: function(s) {
563
+ var f = ue(s += "", !0);
564
+ return f.toString = function() {
565
+ return s;
566
+ }, f;
567
+ }
568
+ };
569
+ }
570
+ var qe = { "-": "", _: " ", 0: "0" }, C = /^\s*\d+/, Zt = /^%/, Bt = /[\\^$*+?|[\]().{}]/g;
571
+ function M(e, t, r) {
572
+ var n = e < 0 ? "-" : "", i = (n ? -e : e) + "", a = i.length;
573
+ return n + (a < r ? new Array(r - a + 1).join(t) + i : i);
574
+ }
575
+ function Jt(e) {
576
+ return e.replace(Bt, "\\$&");
577
+ }
578
+ function oe(e) {
579
+ return new RegExp("^(?:" + e.map(Jt).join("|") + ")", "i");
580
+ }
581
+ function ie(e) {
582
+ return new Map(e.map((t, r) => [t.toLowerCase(), r]));
583
+ }
584
+ function Xt(e, t, r) {
585
+ var n = C.exec(t.slice(r, r + 1));
586
+ return n ? (e.w = +n[0], r + n[0].length) : -1;
587
+ }
588
+ function Kt(e, t, r) {
589
+ var n = C.exec(t.slice(r, r + 1));
590
+ return n ? (e.u = +n[0], r + n[0].length) : -1;
591
+ }
592
+ function er(e, t, r) {
593
+ var n = C.exec(t.slice(r, r + 2));
594
+ return n ? (e.U = +n[0], r + n[0].length) : -1;
595
+ }
596
+ function tr(e, t, r) {
597
+ var n = C.exec(t.slice(r, r + 2));
598
+ return n ? (e.V = +n[0], r + n[0].length) : -1;
599
+ }
600
+ function rr(e, t, r) {
601
+ var n = C.exec(t.slice(r, r + 2));
602
+ return n ? (e.W = +n[0], r + n[0].length) : -1;
603
+ }
604
+ function Qe(e, t, r) {
605
+ var n = C.exec(t.slice(r, r + 4));
606
+ return n ? (e.y = +n[0], r + n[0].length) : -1;
607
+ }
608
+ function Ve(e, t, r) {
609
+ var n = C.exec(t.slice(r, r + 2));
610
+ return n ? (e.y = +n[0] + (+n[0] > 68 ? 1900 : 2e3), r + n[0].length) : -1;
611
+ }
612
+ function nr(e, t, r) {
613
+ var n = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r, r + 6));
614
+ return n ? (e.Z = n[1] ? 0 : -(n[2] + (n[3] || "00")), r + n[0].length) : -1;
615
+ }
616
+ function ar(e, t, r) {
617
+ var n = C.exec(t.slice(r, r + 1));
618
+ return n ? (e.q = n[0] * 3 - 3, r + n[0].length) : -1;
619
+ }
620
+ function or(e, t, r) {
621
+ var n = C.exec(t.slice(r, r + 2));
622
+ return n ? (e.m = n[0] - 1, r + n[0].length) : -1;
623
+ }
624
+ function Pe(e, t, r) {
625
+ var n = C.exec(t.slice(r, r + 2));
626
+ return n ? (e.d = +n[0], r + n[0].length) : -1;
627
+ }
628
+ function ir(e, t, r) {
629
+ var n = C.exec(t.slice(r, r + 3));
630
+ return n ? (e.m = 0, e.d = +n[0], r + n[0].length) : -1;
631
+ }
632
+ function je(e, t, r) {
633
+ var n = C.exec(t.slice(r, r + 2));
634
+ return n ? (e.H = +n[0], r + n[0].length) : -1;
635
+ }
636
+ function sr(e, t, r) {
637
+ var n = C.exec(t.slice(r, r + 2));
638
+ return n ? (e.M = +n[0], r + n[0].length) : -1;
639
+ }
640
+ function lr(e, t, r) {
641
+ var n = C.exec(t.slice(r, r + 2));
642
+ return n ? (e.S = +n[0], r + n[0].length) : -1;
643
+ }
644
+ function mr(e, t, r) {
645
+ var n = C.exec(t.slice(r, r + 3));
646
+ return n ? (e.L = +n[0], r + n[0].length) : -1;
647
+ }
648
+ function ur(e, t, r) {
649
+ var n = C.exec(t.slice(r, r + 6));
650
+ return n ? (e.L = Math.floor(n[0] / 1e3), r + n[0].length) : -1;
651
+ }
652
+ function hr(e, t, r) {
653
+ var n = Zt.exec(t.slice(r, r + 1));
654
+ return n ? r + n[0].length : -1;
655
+ }
656
+ function dr(e, t, r) {
657
+ var n = C.exec(t.slice(r));
658
+ return n ? (e.Q = +n[0], r + n[0].length) : -1;
659
+ }
660
+ function cr(e, t, r) {
661
+ var n = C.exec(t.slice(r));
662
+ return n ? (e.s = +n[0], r + n[0].length) : -1;
663
+ }
664
+ function Ge(e, t) {
665
+ return M(e.getDate(), t, 2);
666
+ }
667
+ function fr(e, t) {
668
+ return M(e.getHours(), t, 2);
669
+ }
670
+ function yr(e, t) {
671
+ return M(e.getHours() % 12 || 12, t, 2);
672
+ }
673
+ function gr(e, t) {
674
+ return M(1 + pe.count(P(e), e), t, 3);
675
+ }
676
+ function lt(e, t) {
677
+ return M(e.getMilliseconds(), t, 3);
678
+ }
679
+ function pr(e, t) {
680
+ return lt(e, t) + "000";
681
+ }
682
+ function _r(e, t) {
683
+ return M(e.getMonth() + 1, t, 2);
684
+ }
685
+ function vr(e, t) {
686
+ return M(e.getMinutes(), t, 2);
687
+ }
688
+ function Mr(e, t) {
689
+ return M(e.getSeconds(), t, 2);
690
+ }
691
+ function Sr(e) {
692
+ var t = e.getDay();
693
+ return t === 0 ? 7 : t;
694
+ }
695
+ function br(e, t) {
696
+ return M(Le.count(P(e) - 1, e), t, 2);
697
+ }
698
+ function mt(e) {
699
+ var t = e.getDay();
700
+ return t >= 4 || t === 0 ? re(e) : re.ceil(e);
701
+ }
702
+ function kr(e, t) {
703
+ return e = mt(e), M(re.count(P(e), e) + (P(e).getDay() === 4), t, 2);
704
+ }
705
+ function wr(e) {
706
+ return e.getDay();
707
+ }
708
+ function Tr(e, t) {
709
+ return M(fe.count(P(e) - 1, e), t, 2);
710
+ }
711
+ function zr(e, t) {
712
+ return M(e.getFullYear() % 100, t, 2);
713
+ }
714
+ function Fr(e, t) {
715
+ return e = mt(e), M(e.getFullYear() % 100, t, 2);
716
+ }
717
+ function Dr(e, t) {
718
+ return M(e.getFullYear() % 1e4, t, 4);
719
+ }
720
+ function Yr(e, t) {
721
+ var r = e.getDay();
722
+ return e = r >= 4 || r === 0 ? re(e) : re.ceil(e), M(e.getFullYear() % 1e4, t, 4);
723
+ }
724
+ function Cr(e) {
725
+ var t = e.getTimezoneOffset();
726
+ return (t > 0 ? "-" : (t *= -1, "+")) + M(t / 60 | 0, "0", 2) + M(t % 60, "0", 2);
727
+ }
728
+ function Re(e, t) {
729
+ return M(e.getUTCDate(), t, 2);
730
+ }
731
+ function xr(e, t) {
732
+ return M(e.getUTCHours(), t, 2);
733
+ }
734
+ function Ur(e, t) {
735
+ return M(e.getUTCHours() % 12 || 12, t, 2);
736
+ }
737
+ function Ar(e, t) {
738
+ return M(1 + Ae.count(Z(e), e), t, 3);
739
+ }
740
+ function ut(e, t) {
741
+ return M(e.getUTCMilliseconds(), t, 3);
742
+ }
743
+ function Lr(e, t) {
744
+ return ut(e, t) + "000";
745
+ }
746
+ function $r(e, t) {
747
+ return M(e.getUTCMonth() + 1, t, 2);
748
+ }
749
+ function Nr(e, t) {
750
+ return M(e.getUTCMinutes(), t, 2);
751
+ }
752
+ function Wr(e, t) {
753
+ return M(e.getUTCSeconds(), t, 2);
754
+ }
755
+ function Er(e) {
756
+ var t = e.getUTCDay();
757
+ return t === 0 ? 7 : t;
758
+ }
759
+ function Hr(e, t) {
760
+ return M(it.count(Z(e) - 1, e), t, 2);
761
+ }
762
+ function ht(e) {
763
+ var t = e.getUTCDay();
764
+ return t >= 4 || t === 0 ? ne(e) : ne.ceil(e);
765
+ }
766
+ function Or(e, t) {
767
+ return e = ht(e), M(ne.count(Z(e), e) + (Z(e).getUTCDay() === 4), t, 2);
768
+ }
769
+ function Ir(e) {
770
+ return e.getUTCDay();
771
+ }
772
+ function qr(e, t) {
773
+ return M(ye.count(Z(e) - 1, e), t, 2);
774
+ }
775
+ function Qr(e, t) {
776
+ return M(e.getUTCFullYear() % 100, t, 2);
777
+ }
778
+ function Vr(e, t) {
779
+ return e = ht(e), M(e.getUTCFullYear() % 100, t, 2);
780
+ }
781
+ function Pr(e, t) {
782
+ return M(e.getUTCFullYear() % 1e4, t, 4);
783
+ }
784
+ function jr(e, t) {
785
+ var r = e.getUTCDay();
786
+ return e = r >= 4 || r === 0 ? ne(e) : ne.ceil(e), M(e.getUTCFullYear() % 1e4, t, 4);
787
+ }
788
+ function Gr() {
789
+ return "+0000";
790
+ }
791
+ function Ze() {
792
+ return "%";
793
+ }
794
+ function Be(e) {
795
+ return +e;
796
+ }
797
+ function Je(e) {
798
+ return Math.floor(+e / 1e3);
799
+ }
800
+ var te, q;
801
+ Rr({
802
+ dateTime: "%x, %X",
803
+ date: "%-m/%-d/%Y",
804
+ time: "%-I:%M:%S %p",
805
+ periods: ["AM", "PM"],
806
+ days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
807
+ shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
808
+ months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
809
+ shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
810
+ });
811
+ function Rr(e) {
812
+ return te = Ye(e), q = te.format, te.parse, te.utcFormat, te.utcParse, te;
813
+ }
814
+ const Ce = [
815
+ // YEAR
816
+ [
817
+ 1,
818
+ // years
819
+ 4,
820
+ // quarters
821
+ 12,
822
+ // months
823
+ 52,
824
+ // weeks
825
+ 365,
826
+ // days
827
+ 365 * 24,
828
+ // hours
829
+ 365 * 24 * 60,
830
+ // minutes
831
+ 365 * 24 * 60 * 60,
832
+ // seconds
833
+ 365 * 24 * 60 * 60 * 1e3
834
+ // milliseconds
835
+ ],
836
+ // QUARTERS
837
+ [
838
+ 1 / 4,
839
+ // year
840
+ 1,
841
+ // quarters
842
+ 3,
843
+ // months
844
+ 13,
845
+ // weeks
846
+ 91,
847
+ // days
848
+ 91 * 24,
849
+ // hours
850
+ 91 * 24 * 60,
851
+ // minutes
852
+ 91 * 24 * 60 * 60,
853
+ // seconds
854
+ 91 * 24 * 60 * 60 * 1e3
855
+ // milliseconds
856
+ ],
857
+ // MONTHS
858
+ [
859
+ 1 / 12,
860
+ // year
861
+ 1 / 3,
862
+ // quarters
863
+ 1,
864
+ // months
865
+ 4,
866
+ // weeks
867
+ 30,
868
+ // days
869
+ 30 * 24,
870
+ // hours
871
+ 30 * 24 * 60,
872
+ // minutes
873
+ 30 * 24 * 60 * 60,
874
+ // seconds
875
+ 30 * 24 * 60 * 60 * 1e3
876
+ // milliseconds
877
+ ],
878
+ // WEEKS
879
+ [
880
+ 1 / 52,
881
+ // year
882
+ 1 / 13,
883
+ // quarters
884
+ 1 / 4,
885
+ // months
886
+ 1,
887
+ // weeks
888
+ 7,
889
+ // days
890
+ 7 * 24,
891
+ // hours
892
+ 7 * 24 * 60,
893
+ // minutes
894
+ 7 * 24 * 60 * 60,
895
+ // seconds
896
+ 7 * 24 * 60 * 60 * 1e3
897
+ // milliseconds
898
+ ],
899
+ // DAYS
900
+ [
901
+ 1 / 365,
902
+ // year
903
+ 1 / 91,
904
+ // quarters
905
+ 1 / 30,
906
+ // months
907
+ 1 / 7,
908
+ // weeks
909
+ 1,
910
+ // days
911
+ 24,
912
+ // hours
913
+ 24 * 60,
914
+ // minutes
915
+ 24 * 60 * 60,
916
+ // seconds
917
+ 24 * 60 * 60 * 1e3
918
+ // milliseconds
919
+ ],
920
+ // HOURS
921
+ [
922
+ 1 / (365 * 24),
923
+ // year
924
+ 1 / (91 * 24),
925
+ // quarters
926
+ 1 / (30 * 24),
927
+ // months
928
+ 1 / (7 * 24),
929
+ // weeks
930
+ 1 / 24,
931
+ // days
932
+ 1,
933
+ // hours
934
+ 60,
935
+ // minutes
936
+ 60 * 60,
937
+ // seconds
938
+ 60 * 60 * 1e3
939
+ // milliseconds
940
+ ],
941
+ // MINUTES
942
+ [
943
+ 1 / (365 * 24 * 60),
944
+ // year
945
+ 1 / (91 * 24 * 60),
946
+ // quarters
947
+ 1 / (30 * 24 * 60),
948
+ // months
949
+ 1 / (7 * 24 * 60),
950
+ // weeks
951
+ 1 / (24 * 60),
952
+ // days
953
+ 1 / 60,
954
+ // hours
955
+ 1,
956
+ // minutes
957
+ 60,
958
+ // seconds
959
+ 60 * 1e3
960
+ // milliseconds
961
+ ],
962
+ // SECONDS
963
+ [
964
+ 1 / (365 * 24 * 60 * 60),
965
+ // year
966
+ 1 / (91 * 24 * 60 * 60),
967
+ // quarters
968
+ 1 / (30 * 24 * 60 * 60),
969
+ // months
970
+ 1 / (7 * 24 * 60 * 60),
971
+ // weeks
972
+ 1 / (24 * 60 * 60),
973
+ // days
974
+ 1 / (60 * 60),
975
+ // hours
976
+ 1 / 60,
977
+ // minutes
978
+ 1,
979
+ // seconds
980
+ 1e3
981
+ // milliseconds
982
+ ],
983
+ // MILLISECONDS
984
+ [
985
+ 1 / (365 * 24 * 60 * 60 * 1e3),
986
+ // year
987
+ 1 / (91 * 24 * 60 * 60 * 1e3),
988
+ // quarters
989
+ 1 / (30 * 24 * 60 * 60 * 1e3),
990
+ // months
991
+ 1 / (7 * 24 * 60 * 60 * 1e3),
992
+ // weeks
993
+ 1 / (24 * 60 * 60 * 1e3),
994
+ // days
995
+ 1 / (60 * 60 * 1e3),
996
+ // hours
997
+ 1 / (60 * 1e3),
998
+ // minutes
999
+ 1 / 1e3,
1000
+ // seconds
1001
+ 1
1002
+ // milliseconds
1003
+ ]
1004
+ ];
1005
+ function Zr(e, t, r) {
1006
+ if (R(e))
1007
+ return;
1008
+ if (!t || !r || t === r)
1009
+ return e;
1010
+ const n = Ce[t - 1][r - 1];
1011
+ if (n)
1012
+ return e * n;
1013
+ }
1014
+ function Br(e, t, r, n) {
1015
+ if (R(e) || !t.lowestLevel || r.length === 0)
1016
+ return "";
1017
+ const i = [];
1018
+ let a = 0, l = Math.round(
1019
+ e * Ce[t.lowestLevel - 1][8]
1020
+ );
1021
+ const _ = 9;
1022
+ for (const [, u] of r.entries())
1023
+ if (e) {
1024
+ l = l - a;
1025
+ const w = Ce[u - 1][_ - 1], y = Math.floor(l / w);
1026
+ a = y * w, i.push({ level: u, value: y });
1027
+ } else
1028
+ i.push({ level: u, value: 0 });
1029
+ let k = "";
1030
+ for (const [u, w] of i.entries())
1031
+ if (t.duration.format === "time") {
1032
+ let y = w.value;
1033
+ [6, 7, 8].includes(w.level) && w.value < 10 ? y = "0" + w.value.toString() : w.level === 9 && w.value < 10 ? y = "00" + w.value.toString() : w.level === 9 && w.value < 100 && (y = "0" + w.value.toString()), k += (u === 0 ? "" : w.level === 9 ? "." : ":") + y;
1034
+ } else if (t.duration.format === "long") {
1035
+ const y = n.durationLongSuffix;
1036
+ k += w.value + " " + y[w.level] + (u === i.length - 1 ? "" : " ");
1037
+ } else {
1038
+ const y = n.durationShortSuffix;
1039
+ k += w.value + "" + y[w.level] + (u === i.length - 1 ? "" : " ");
1040
+ }
1041
+ return k;
1042
+ }
1043
+ const $e = {
1044
+ decimal: ".",
1045
+ thousands: ",",
1046
+ grouping: [3],
1047
+ currency: ["$", ""],
1048
+ dateTime: "%a %b %e %X %Y",
1049
+ date: "%m/%d/%Y",
1050
+ dateSeparator: "/",
1051
+ time: "%H:%M:%S",
1052
+ periods: ["AM", "PM"],
1053
+ days: [
1054
+ "Sunday",
1055
+ "Monday",
1056
+ "Tuesday",
1057
+ "Wednesday",
1058
+ "Thursday",
1059
+ "Friday",
1060
+ "Saturday"
1061
+ ],
1062
+ shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
1063
+ months: [
1064
+ "January",
1065
+ "February",
1066
+ "March",
1067
+ "April",
1068
+ "May",
1069
+ "June",
1070
+ "July",
1071
+ "August",
1072
+ "September",
1073
+ "October",
1074
+ "November",
1075
+ "December"
1076
+ ],
1077
+ shortMonths: [
1078
+ "Jan",
1079
+ "Feb",
1080
+ "Mar",
1081
+ "Apr",
1082
+ "May",
1083
+ "Jun",
1084
+ "Jul",
1085
+ "Aug",
1086
+ "Sep",
1087
+ "Oct",
1088
+ "Nov",
1089
+ "Dec"
1090
+ ],
1091
+ levels: [
1092
+ "All",
1093
+ "Year",
1094
+ "Quarter",
1095
+ "Month",
1096
+ "Week",
1097
+ "Date",
1098
+ "Hour",
1099
+ "Minute",
1100
+ "Second",
1101
+ "Millisecond"
1102
+ ],
1103
+ shortLevels: [
1104
+ "All",
1105
+ "Yr",
1106
+ "Qtr",
1107
+ "Mth",
1108
+ "Wk",
1109
+ "Date",
1110
+ "Hr",
1111
+ "Min",
1112
+ "Sec",
1113
+ "Msec"
1114
+ ],
1115
+ durationLongSuffix: [
1116
+ "",
1117
+ "years",
1118
+ "quarters",
1119
+ "months",
1120
+ "weeks",
1121
+ "days",
1122
+ "hours",
1123
+ "minutes",
1124
+ "seconds",
1125
+ "milliseconds"
1126
+ ],
1127
+ durationShortSuffix: ["", "y", "q", "mo", "w", "d", "h", "m", "s", "ms"],
1128
+ multi: [".%L", ":%S", "%I:%M", "%I %p", "%a %d", "W%G", "%b %d", "%B", "%Y"]
1129
+ }, Jr = "%d-%m-%Y", xe = [
1130
+ {
1131
+ key: "%a %e %b %Y",
1132
+ lev1: "%Y",
1133
+ lev2: "Q%q-%Y",
1134
+ lev3: "%b %Y",
1135
+ lev4: "Wk %V-%G",
1136
+ lev5: "%a %e %b %Y",
1137
+ monthType: "name",
1138
+ longText: !1,
1139
+ weekday: !0
1140
+ },
1141
+ {
1142
+ key: "%e %b %Y",
1143
+ lev1: "%Y",
1144
+ lev2: "Q%q-%Y",
1145
+ lev3: "%b %Y",
1146
+ lev4: "Wk %V-%G",
1147
+ lev5: "%e %b %Y",
1148
+ monthType: "name",
1149
+ longText: !1,
1150
+ weekday: !1
1151
+ },
1152
+ {
1153
+ key: "%a %e %B %Y",
1154
+ lev1: "%Y",
1155
+ lev2: "Q%q-%Y",
1156
+ lev3: "%B %Y",
1157
+ lev4: "Week %V, %G",
1158
+ lev5: "%a %e %B %Y",
1159
+ monthType: "name",
1160
+ longText: !0,
1161
+ weekday: !0
1162
+ },
1163
+ {
1164
+ key: "%e %B %Y",
1165
+ lev1: "%Y",
1166
+ lev2: "Q%q-%Y",
1167
+ lev3: "%B %Y",
1168
+ lev4: "Week %V, %G",
1169
+ lev5: "%e %B %Y",
1170
+ monthType: "name",
1171
+ longText: !0,
1172
+ weekday: !1
1173
+ },
1174
+ {
1175
+ key: "%d/%m/%Y",
1176
+ lev1: "%Y",
1177
+ lev2: "Q%q/%Y",
1178
+ lev3: "%m/%Y",
1179
+ lev4: "W%V/%G",
1180
+ lev5: "%d/%m/%Y",
1181
+ monthType: "number",
1182
+ mmdd: !1,
1183
+ separator: "/"
1184
+ },
1185
+ {
1186
+ key: "%d-%m-%Y",
1187
+ lev1: "%Y",
1188
+ lev2: "Q%q-%Y",
1189
+ lev3: "%m-%Y",
1190
+ lev4: "W%V-%G",
1191
+ lev5: "%d-%m-%Y",
1192
+ monthType: "number",
1193
+ mmdd: !1,
1194
+ separator: "-"
1195
+ },
1196
+ {
1197
+ key: "%d.%m.%Y",
1198
+ lev1: "%Y",
1199
+ lev2: "Q%q.%Y",
1200
+ lev3: "%m.%Y",
1201
+ lev4: "W%V.%G",
1202
+ lev5: "%d.%m.%Y",
1203
+ monthType: "number",
1204
+ mmdd: !1,
1205
+ separator: "."
1206
+ },
1207
+ {
1208
+ key: "%d~%m~%Y",
1209
+ lev1: "%Y",
1210
+ lev2: "Q%q~%Y",
1211
+ lev3: "%m~%Y",
1212
+ lev4: "W%V~%G",
1213
+ lev5: "%d~%m~%Y",
1214
+ monthType: "number",
1215
+ mmdd: !1,
1216
+ separator: "~"
1217
+ },
1218
+ {
1219
+ key: "%m/%d/%Y",
1220
+ lev1: "%Y",
1221
+ lev2: "Q%q/%Y",
1222
+ lev3: "%m/%Y",
1223
+ lev4: "%G/W%V",
1224
+ lev5: "%m/%d/%Y",
1225
+ monthType: "number",
1226
+ mmdd: !0,
1227
+ separator: "/"
1228
+ },
1229
+ {
1230
+ key: "%m-%d-%Y",
1231
+ lev1: "%Y",
1232
+ lev2: "Q%q-%Y",
1233
+ lev3: "%m-%Y",
1234
+ lev4: "%G-W%V",
1235
+ lev5: "%m-%d-%Y",
1236
+ monthType: "number",
1237
+ mmdd: !0,
1238
+ separator: "-"
1239
+ },
1240
+ {
1241
+ key: "%m.%d.%Y",
1242
+ lev1: "%Y",
1243
+ lev2: "Q%q.%Y",
1244
+ lev3: "%m.%Y",
1245
+ lev4: "%G.W%V",
1246
+ lev5: "%m.%d.%Y",
1247
+ monthType: "number",
1248
+ mmdd: !0,
1249
+ separator: "."
1250
+ },
1251
+ {
1252
+ key: "%m~%d~%Y",
1253
+ lev1: "%Y",
1254
+ lev2: "Q%q~%Y",
1255
+ lev3: "%m~%Y",
1256
+ lev4: "%G~W%V",
1257
+ lev5: "%m~%d~%Y",
1258
+ monthType: "number",
1259
+ mmdd: !0,
1260
+ separator: "~"
1261
+ },
1262
+ {
1263
+ key: "%amd/%Y",
1264
+ lev1: "%Y",
1265
+ lev2: "Q%q/%Y",
1266
+ lev3: "%m/%Y",
1267
+ lev4: "%G/W%V",
1268
+ lev5: "%amd/%Y",
1269
+ monthType: "number",
1270
+ mmdd: null,
1271
+ separator: "/"
1272
+ },
1273
+ {
1274
+ key: "%amd-%Y",
1275
+ lev1: "%Y",
1276
+ lev2: "Q%q-%Y",
1277
+ lev3: "%m-%Y",
1278
+ lev4: "%G-W%V",
1279
+ lev5: "%amd-%Y",
1280
+ monthType: "number",
1281
+ mmdd: null,
1282
+ separator: "-"
1283
+ },
1284
+ {
1285
+ key: "%amd.%Y",
1286
+ lev1: "%Y",
1287
+ lev2: "Q%q.%Y",
1288
+ lev3: "%m.%Y",
1289
+ lev4: "%G.W%V",
1290
+ lev5: "%amd.%Y",
1291
+ monthType: "number",
1292
+ mmdd: null,
1293
+ separator: "."
1294
+ },
1295
+ {
1296
+ key: "%amd~%Y",
1297
+ lev1: "%Y",
1298
+ lev2: "Q%q~%Y",
1299
+ lev3: "%m~%Y",
1300
+ lev4: "%G~W%V",
1301
+ lev5: "%amd~%Y",
1302
+ monthType: "number",
1303
+ mmdd: null,
1304
+ separator: "~"
1305
+ }
1306
+ ], Xr = [
1307
+ {
1308
+ key: "%H:%M:%S.%L",
1309
+ lev6: "%H:00",
1310
+ lev7: "%H:%M",
1311
+ lev8: "%H:%M:%S",
1312
+ lev9: "%H:%M:%S.%L",
1313
+ ampm: !1
1314
+ },
1315
+ {
1316
+ key: "%I:%M:%S.%L %p",
1317
+ lev6: "%I:00 %p",
1318
+ lev7: "%I:%M %p",
1319
+ lev8: "%I:%M:%S %p",
1320
+ lev9: "%I:%M:%S.%L %p",
1321
+ ampm: !0
1322
+ }
1323
+ ];
1324
+ function ze(e, t) {
1325
+ var y, H;
1326
+ t = t || {};
1327
+ const r = t.localFormats || $e;
1328
+ let n, i, a, l = [], _ = [], k = "datetime", u;
1329
+ t && t.multi && (k = "datetime"), (!e || !e.format) && (k = "hierarchy"), e && e.type && (k = e.type), e && e.format ? u = e.format : k === "numeric" ? u = ",.0f" : k === "datetime" ? u = Jr : u = "";
1330
+ const w = Dt(u);
1331
+ switch (w.precision && w.typeFormat && (k = "numeric"), k) {
1332
+ case "numeric": {
1333
+ if (e.subtype === "duration" && e.duration && e.duration.levels && e.duration.levels.length > 1 && !t.hideDuration)
1334
+ n = (m) => R(m) ? "" : Br(
1335
+ m,
1336
+ e,
1337
+ e.duration.levels,
1338
+ r
1339
+ );
1340
+ else {
1341
+ const m = { ...r };
1342
+ let c = w.typeFormat, d = !1;
1343
+ switch (c.length === 2 && c.startsWith("a") && (d = !0, c = c.slice(1, 2), u = u.replace(/a/, "")), d ? (m.decimal = r.decimal, m.thousands = r.thousands) : ["z", "y", "w"].includes(c) ? (m.decimal = ",", m.thousands = ".") : (m.decimal = ".", m.thousands = ","), c) {
1344
+ case "z": {
1345
+ u = u.replace("z", "f");
1346
+ break;
1347
+ }
1348
+ case "y": {
1349
+ u = u.replace("y", "%");
1350
+ break;
1351
+ }
1352
+ case "w": {
1353
+ u = u.replace("w", "s");
1354
+ break;
1355
+ }
1356
+ }
1357
+ if ((e == null ? void 0 : e.subtype) === "currency" && e.currency) {
1358
+ const h = " ", Y = m.currency.findIndex(
1359
+ (z) => z.length > 0
1360
+ ), b = m.currency[Y].startsWith(h), F = m.currency[Y].endsWith(h), g = `${b ? h : ""}${e.currency}${F ? h : ""}`;
1361
+ m.currency[Y] = g;
1362
+ }
1363
+ const S = Nt(m);
1364
+ c !== "%" && (e == null ? void 0 : e.subtype) === "currency" && e.currency && m.currency && !(t != null && t.hideCurrency) && !["count", "distinctcount"].includes(e.aggregationFunc) && !(e.aggregationFunc === "rate" && ((y = e.aggregationWeight) == null ? void 0 : y.columnSubType) === "currency") && ((H = e.periodOverPeriod) == null ? void 0 : H.type) !== "percentageChange" && (u = "$" + u), t != null && t.trimZero && ["y", "%"].includes(c) && m.decimal === "," ? i = (h) => S.format(u)(h).replace(/(,\d*?)0+%$/, "$1%").replace(/,%$/, "%") : t != null && t.trimZero && ["y", "%"].includes(c) && m.decimal === "." ? i = (h) => S.format(u)(h).replace(/(\.\d*?)0+%$/, "$1%").replace(/\.%$/, "%") : t != null && t.trimZero && ["z", "f"].includes(c) && m.decimal === "," ? i = (h) => S.format(u)(h).replace(/(,\d*?)0+$/, "$1").replace(/,$/, "") : t != null && t.trimZero && ["z", "f"].includes(c) && m.decimal === "." ? i = (h) => S.format(u)(h).replace(/(\.\d*?)0+$/, "$1").replace(/\.$/, "") : (e == null ? void 0 : e.subtype) === "currency" && e.currency && m.currency && c === "s" ? i = (h) => S.format(u)(h).replace(/G/, "B") : i = R(w.precision) ? S.format(",.0f") : S.format(u), n = (h) => {
1365
+ var Y;
1366
+ if (R(h))
1367
+ return "";
1368
+ if (e.subtype === "duration" && e.duration && !t.hideDuration) {
1369
+ const b = e.duration.levels ? e.duration.levels[0] : e.lowestLevel;
1370
+ return b !== e.lowestLevel && (h = Zr(h, e.lowestLevel, b)), i(h) + ((Y = r == null ? void 0 : r.durationShortSuffix) == null ? void 0 : Y[b]);
1371
+ }
1372
+ return i(h);
1373
+ };
1374
+ }
1375
+ break;
1376
+ }
1377
+ case "datetime": {
1378
+ if (l = (r == null ? void 0 : r.smartDateFormats) ?? xe, _ = (r == null ? void 0 : r.smartTimeFormats) ?? Xr, R(e.datetimeDisplayMode)) {
1379
+ if (t != null && t.level) {
1380
+ const m = t.level, c = l.find(
1381
+ (F) => u.includes(F.key)
1382
+ ), d = _.find(
1383
+ (F) => u.includes(F.key)
1384
+ ), S = c ? c["lev" + Math.min(m, 5)] : l[0]["lev" + Math.min(m, 5)], h = m > 5 ? d ? d["lev" + m] : _[0]["lev" + m] : "";
1385
+ u = m > 5 ? S + ", " + h : S;
1386
+ const Y = u.includes("%amd") && t.level >= 5, b = c ? t.level >= 2 && c.separator === "~" : !1;
1387
+ Y ? u = b ? (
1388
+ // Fully use the date format defined in the locale JSON, including its separators.
1389
+ u.replaceAll(
1390
+ new RegExp(/%amd[.~\/-]%Y/g),
1391
+ r.date.slice(0, 8)
1392
+ )
1393
+ ) : (
1394
+ // Use the date format defined in the locale JSON, but replace the seperators to the hardcoded separator configured in the slot menu.
1395
+ u.replaceAll(
1396
+ new RegExp(/%amd[.~\/-]%Y/g),
1397
+ r.date.slice(0, 8).replaceAll(
1398
+ new RegExp(/[.~\/-]/g),
1399
+ c.separator
1400
+ )
1401
+ )
1402
+ ) : u = b ? (
1403
+ // No locale aware date format but locale aware separator: replace locale aware '~' separator by correct separator from locale JSON.
1404
+ u.replaceAll(
1405
+ new RegExp(/[~]/g),
1406
+ r.dateSeparator
1407
+ )
1408
+ ) : (
1409
+ // No locale aware format and no locale aware separator: no action required.
1410
+ u
1411
+ );
1412
+ }
1413
+ if (t != null && t.multi) {
1414
+ const m = q(r.multi[0]), c = q(r.multi[1]), d = q(r.multi[2]), S = q(r.multi[3]), h = q(r.multi[4]), Y = q(r.multi[6]), b = q(r.multi[7]), F = q(r.multi[8]);
1415
+ a = (g) => {
1416
+ let z;
1417
+ return nt(g) < g ? z = m : at(g) < g ? z = c : ot(g) < g ? z = d : pe(g) < g ? z = S : st(g) < g ? z = Le(g) < g ? h : Y : P(g) < g ? z = b : z = F, z(g);
1418
+ };
1419
+ } else
1420
+ a = Ye(r).format(u);
1421
+ } else {
1422
+ const m = {
1423
+ quarter_number: { min: 1, max: 4 },
1424
+ month_name: { min: 1, max: 12 },
1425
+ month_number: { min: 1, max: 12 },
1426
+ week_number: { min: 1, max: 53 },
1427
+ day_in_month: { min: 1, max: 31 },
1428
+ day_in_year: { min: 1, max: 366 },
1429
+ weekday_name: { min: 0, max: 7 },
1430
+ weekday_number: { min: 0, max: 7 },
1431
+ hour_in_day: { min: 0, max: 23 },
1432
+ minute_in_hour: { min: 0, max: 59 },
1433
+ second_in_minute: { min: 0, max: 59 }
1434
+ }, c = (d, S, h) => {
1435
+ var Y, b, F, g, z;
1436
+ return S === "letter" ? ((Y = d.shortNames) == null ? void 0 : Y.length) > 0 && ((b = d.shortNames[h]) == null ? void 0 : b.length) > 0 ? (F = d.shortNames[h]) == null ? void 0 : F.charAt(0) : "N/A" : S === "short" ? ((g = d.shortNames) == null ? void 0 : g.length) > 0 && d.shortNames[h] ? d.shortNames[h] : "N/A" : ((z = d.longNames) == null ? void 0 : z.length) > 0 && d.longNames[h] ? d.longNames[h] : "N/A";
1437
+ };
1438
+ [
1439
+ "quarter_number",
1440
+ "month_number",
1441
+ "week_number",
1442
+ "day_in_month",
1443
+ "day_in_year",
1444
+ "weekday_number",
1445
+ "hour_in_day",
1446
+ "minute_in_hour",
1447
+ "second_in_minute"
1448
+ ].includes(e.datetimeDisplayMode) ? a = (d) => Se(d) && d >= m[e.datetimeDisplayMode].min && d <= m[e.datetimeDisplayMode].max ? d : "N/A" : e.datetimeDisplayMode === "month_name" ? a = (d) => {
1449
+ const S = [...r.shortMonths], h = [...r.months];
1450
+ return Se(d) && d >= m[e.datetimeDisplayMode].min && d <= m[e.datetimeDisplayMode].max ? c(
1451
+ { shortNames: S, longNames: h },
1452
+ e.monthNameFormat,
1453
+ d - 1
1454
+ ) : "N/A";
1455
+ } : e.datetimeDisplayMode === "weekday_name" ? a = (d) => {
1456
+ const S = [...r.shortDays], h = [...r.days];
1457
+ return e.weekStart === "monday" && (S.push(S.shift()), h.push(h.shift())), Se(d) && d >= m[e.datetimeDisplayMode].min && d <= m[e.datetimeDisplayMode].max ? c(
1458
+ { shortNames: S, longNames: h },
1459
+ e.weekDayNameFormat,
1460
+ d - 1
1461
+ ) : "N/A";
1462
+ } : a = Ye(r).format(u);
1463
+ }
1464
+ n = (m) => {
1465
+ if (R(m))
1466
+ return "";
1467
+ const c = a(m);
1468
+ return Ft(c) ? c.trim() : c;
1469
+ };
1470
+ break;
1471
+ }
1472
+ case "hierarchy": {
1473
+ n = (m) => zt(m, t ? t.locale : void 0);
1474
+ break;
1475
+ }
1476
+ default: {
1477
+ n = (m) => m;
1478
+ break;
1479
+ }
1480
+ }
1481
+ return n;
1482
+ }
1483
+ const Xe = {
1484
+ "~": "Auto",
1485
+ "/": "/",
1486
+ "-": "-",
1487
+ ".": "."
1488
+ }, Fe = {
1489
+ level2: [
1490
+ { key: "default", label: "Default" },
1491
+ { key: "quarter_number", label: "Quarter numbers" }
1492
+ ],
1493
+ level3: [
1494
+ { key: "default", label: "Default" },
1495
+ { key: "month_in_year", label: "Month number" }
1496
+ ],
1497
+ level4: [
1498
+ { key: "default", label: "Default" },
1499
+ { key: "week_number", label: "Week number" }
1500
+ ],
1501
+ level5: [
1502
+ { key: "default", label: "Default" },
1503
+ { key: "day_in_week", label: "Day in week" },
1504
+ { key: "day_in_month", label: "Day in month" },
1505
+ { key: "day_in_year", label: "Day in year" }
1506
+ ],
1507
+ level6: [
1508
+ { key: "default", label: "Default" },
1509
+ { key: "hour_in_day", label: "Hour in day" }
1510
+ ],
1511
+ level7: [
1512
+ { key: "default", label: "Default" },
1513
+ { key: "minute_in_hour", label: "Minute in hour" }
1514
+ ],
1515
+ level8: [
1516
+ { key: "default", label: "Default" },
1517
+ { key: "second_in_minute", label: "Second in minute" }
1518
+ ]
1519
+ }, Ke = {
1520
+ number: "Number",
1521
+ letter: "Letter",
1522
+ short: "Short",
1523
+ long: "Long"
1524
+ }, et = {
1525
+ sunday: "Sunday",
1526
+ monday: "Monday"
1527
+ }, Kr = ":host{font-family:var(--luzmo-display-settings-datetime-font-family, var(--luzmo-font-family))}:host .settings-container{display:flex;flex-direction:column;gap:var(--luzmo-spacing-2)}:host .settings-row{display:flex;justify-content:flex-start;align-items:center;gap:var(--luzmo-display-settings-datetime-gap, var(--display-settings-datetime-gap))}:host .example-container{line-height:var(--luzmo-display-settings-datetime-example-height, var(--display-settings-datetime-example-height));font-size:var(--luzmo-display-settings-datetime-example-font-size, var(--display-settings-datetime-example-font-size));color:var(--luzmo-display-settings-datetime-example-color, var(--display-settings-datetime-example-color))}:host .example-container .example-label{font-weight:var(--luzmo-display-settings-datetime-example-label-font-weight, var(--display-settings-datetime-example-label-font-weight));color:var(--luzmo-display-settings-datetime-example-label-color, var(--display-settings-datetime-example-label-color))}:host .example-container .example-language{text-transform:uppercase;color:var(--luzmo-display-settings-datetime-example-language-color, var(--display-settings-datetime-example-language-color))}:host{--display-settings-datetime-example-font-size: var(--luzmo-font-size);--display-settings-datetime-example-color: var(--luzmo-font-color);--display-settings-datetime-example-label-font-weight: bold;--display-settings-datetime-example-label-color: var(--luzmo-primary);--display-settings-datetime-example-language-color: var(--luzmo-primary)}:host{--display-settings-datetime-gap: var(--luzmo-spacing-3);--display-settings-datetime-example-height: var(--luzmo-component-height);--display-settings-datetime-example-font-size: var(--luzmo-font-size-s)}:host([size=s]){--display-settings-datetime-gap: var(--luzmo-spacing-3);--display-settings-datetime-example-height: var(--luzmo-component-height-s);--display-settings-datetime-example-font-size: var(--luzmo-font-size-s)}:host([size=l]){--display-settings-datetime-gap: var(--luzmo-spacing-4);--display-settings-datetime-example-height: var(--luzmo-component-height-l);--display-settings-datetime-example-font-size: var(--luzmo-font-size)}:host([size=xl]){--display-settings-datetime-gap: var(--luzmo-spacing-5);--display-settings-datetime-example-height: var(--luzmo-component-height-xl);--display-settings-datetime-example-font-size: var(--luzmo-font-size-l)}";
1528
+ var en = Object.defineProperty, $ = (e, t, r, n) => {
1529
+ for (var i = void 0, a = e.length - 1, l; a >= 0; a--)
1530
+ (l = e[a]) && (i = l(t, r, i) || i);
1531
+ return i && en(t, r, i), i;
1532
+ };
1533
+ class U extends bt(wt, {
1534
+ validSizes: Object.values(kt)
1535
+ }) {
1536
+ constructor() {
1537
+ super(...arguments), this._loadLocaleFormatsConfig = new St(this, {
1538
+ task: async ([t]) => {
1539
+ if (t && t !== this._contentLanguageLoaded) {
1540
+ const r = /* @__PURE__ */ Object.assign({
1541
+ "../../utils/formatter/formats/cs.ts": () => import("./cs-DVZ0Tapy.js"),
1542
+ "../../utils/formatter/formats/da.ts": () => import("./da-DHy05oSR.js"),
1543
+ "../../utils/formatter/formats/de.ts": () => import("./de-iM39JlAt.js"),
1544
+ "../../utils/formatter/formats/en-GB.ts": () => import("./en-GB-CYx--4nh.js"),
1545
+ "../../utils/formatter/formats/en-US.ts": () => Promise.resolve().then(() => tn),
1546
+ "../../utils/formatter/formats/en.ts": () => Promise.resolve().then(() => rn),
1547
+ "../../utils/formatter/formats/es.ts": () => import("./es-KhTq4jX8.js"),
1548
+ "../../utils/formatter/formats/fi.ts": () => import("./fi-Dh_ebgpe.js"),
1549
+ "../../utils/formatter/formats/fr.ts": () => import("./fr-CU727YF1.js"),
1550
+ "../../utils/formatter/formats/he.ts": () => import("./he-Au3xg6lR.js"),
1551
+ "../../utils/formatter/formats/hu.ts": () => import("./hu-DNJ-P_MW.js"),
1552
+ "../../utils/formatter/formats/it.ts": () => import("./it-Bh5U73z6.js"),
1553
+ "../../utils/formatter/formats/ja.ts": () => import("./ja-CCcHUL61.js"),
1554
+ "../../utils/formatter/formats/ko.ts": () => import("./ko-DhapsZMM.js"),
1555
+ "../../utils/formatter/formats/mk.ts": () => import("./mk-B9HPSuKa.js"),
1556
+ "../../utils/formatter/formats/nl.ts": () => import("./nl-BwSt5Bf4.js"),
1557
+ "../../utils/formatter/formats/no.ts": () => import("./no-D-DofYnx.js"),
1558
+ "../../utils/formatter/formats/pl.ts": () => import("./pl-D_L_0Boq.js"),
1559
+ "../../utils/formatter/formats/pt.ts": () => import("./pt-B0BBS5VB.js"),
1560
+ "../../utils/formatter/formats/ru.ts": () => import("./ru-Vo-m3O_2.js"),
1561
+ "../../utils/formatter/formats/sv.ts": () => import("./sv-CiozMaev.js"),
1562
+ "../../utils/formatter/formats/tr.ts": () => import("./tr-D_D4i5iv.js"),
1563
+ "../../utils/formatter/formats/zh-CN.ts": () => import("./zh-CN-wsl7eFSd.js"),
1564
+ "../../utils/formatter/formats/zh-TW.ts": () => import("./zh-TW-wsl7eFSd.js")
1565
+ });
1566
+ if (r[`../../utils/formatter/formats/${t}.ts`]) {
1567
+ const n = await r[`../../utils/formatter/formats/${t}.ts`]();
1568
+ this._localeFormats = (n == null ? void 0 : n.default) ?? {};
1569
+ }
1570
+ return this._localeFormats;
1571
+ }
1572
+ },
1573
+ args: () => [this.contentLanguage]
1574
+ }), this.language = "en", this.contentLanguage = "en", this.size = "m", this.slotContent = {}, this._disableShowMode = !1, this._dateLevel = 5, this._displayAs = "default", this._weekStart = "monday", this._weekDayAndMonthInYearFormat = "long", this._dateFormat = "auto", this._dateSeparator = "~", this._sendEvent = () => {
1575
+ this._calculateSlotContent(), this.dispatchEvent(
1576
+ new CustomEvent("slot-content-changed", {
1577
+ bubbles: !0,
1578
+ composed: !0,
1579
+ cancelable: !0,
1580
+ detail: {
1581
+ slotContent: this._currentSlotContent
1582
+ }
1583
+ })
1584
+ );
1585
+ };
1586
+ }
1587
+ static get styles() {
1588
+ return [Tt(Kr)];
1589
+ }
1590
+ _parseSlotContent() {
1591
+ var t, r;
1592
+ this._dateLevel = this.slotContent.level ?? ((t = this.slotContent) == null ? void 0 : t.lowestLevel) ?? 5, this._displayAs = ((r = this.slotContent) == null ? void 0 : r.datetimeDisplayMode) ?? "default", this._displayAs === "weekday_number" && (this._displayAs = "day_in_week", this._weekDayAndMonthInYearFormat = "number"), this._displayAs === "weekday_name" && (this._displayAs = "day_in_week"), this._displayAs === "month_number" && (this._displayAs = "month_in_year", this._weekDayAndMonthInYearFormat = "number"), this._displayAs === "month_name" && (this._displayAs = "month_in_year");
1593
+ }
1594
+ _calculateFormat() {
1595
+ var n;
1596
+ let t;
1597
+ const r = ((n = this._localeFormats) == null ? void 0 : n.smartDateFormats) ?? xe;
1598
+ this._monthName ? (t = r.filter(
1599
+ (i) => i.monthType === "name" && i.longText === (this._monthNameFormat === "long") && i.weekday === this._weekDay
1600
+ ), t.length > 0 ? this._format = t[0].key : (this._weekDayAndMonthInYearFormat = "short", this._weekDay = !0, this._format = "%a %e %B %Y")) : (t = this._dateLevel && this._dateLevel === 4 ? r.filter(
1601
+ (i) => i.monthType === "number" && i.mmdd === (this._weekFormat === "mmdd" ? !0 : this._weekFormat === "ddmm" ? !1 : null) && i.separator === this._dateSeparator
1602
+ ) : r.filter(
1603
+ (i) => i.monthType === "number" && i.mmdd === (this._dateFormat === "mmdd" ? !0 : this._dateFormat === "ddmm" ? !1 : null) && i.separator === this._dateSeparator
1604
+ ), this._dateFormat === "auto" && this._dateLevel && this._dateLevel !== 4 ? this._format = "%amd" + this._dateSeparator + "%Y" : t.length > 0 ? this._format = t[0].key : (this._dateFormat = "ddmm", this._dateSeparator = "/", this._format = "%d/%m/%Y")), this._dateLevel && this._dateLevel > 5 && (this._format += this._24hFormat ? " %H:%M:%S.%L" : " %I:%M:%S.%L %p");
1605
+ }
1606
+ _setWeekStartsOn() {
1607
+ this._weekStart = this._weekStartElement.value, this._sendEvent(), this.requestUpdate();
1608
+ }
1609
+ _setDisplayAs() {
1610
+ this._displayAs = this._displayAsElement.value, this._sendEvent(), this.requestUpdate();
1611
+ }
1612
+ _setWeekdayAndMonthInYearFormat() {
1613
+ var t;
1614
+ this._weekDayAndMonthInYearFormat = ((t = this._weekDayAndMonthInYearFormatElement.selected) == null ? void 0 : t[0]) ?? "long", this._sendEvent(), this.requestUpdate();
1615
+ }
1616
+ _setMonthNameFormat() {
1617
+ var t;
1618
+ this._monthNameFormat = (t = this._monthNameFormatElement.selected) == null ? void 0 : t[0], this._sendEvent(), this.requestUpdate();
1619
+ }
1620
+ _setMonthName() {
1621
+ this._monthName = this._monthNameElement.selected, this._sendEvent(), this.requestUpdate();
1622
+ }
1623
+ _setWeekFormat() {
1624
+ var t;
1625
+ this._weekFormat = (t = this._weekFormatElement.selected) == null ? void 0 : t[0], this._sendEvent(), this.requestUpdate();
1626
+ }
1627
+ _setDateFormat() {
1628
+ this._dateFormat = this._dateFormatElement.value, this._sendEvent(), this.requestUpdate();
1629
+ }
1630
+ _setDateSeparator() {
1631
+ this._dateSeparator = this._dateSeparatorElement.value, this._sendEvent(), this.requestUpdate();
1632
+ }
1633
+ _set24hFormat() {
1634
+ this._24hFormat = this._format24hElement.selected, this._sendEvent(), this.requestUpdate();
1635
+ }
1636
+ _setWeekday() {
1637
+ this._weekDay = this._weekDayElement.selected, this._sendEvent(), this.requestUpdate();
1638
+ }
1639
+ _calculateSlotContent() {
1640
+ this._currentSlotContent = { ...this.slotContent }, this._calculateFormat(), this._currentSlotContent.format = this._format, this._displayAs === "default" ? delete this._currentSlotContent.datetimeDisplayMode : (this._currentSlotContent.datetimeDisplayMode = this._displayAs, this._displayAs === "week_in_year" ? this._currentSlotContent.datetimeDisplayMode = this._weekDayAndMonthInYearFormat === "number" ? "week_number" : "week_name" : this._displayAs === "month_in_year" ? this._currentSlotContent.datetimeDisplayMode = this._weekDayAndMonthInYearFormat === "number" ? "month_number" : "month_name" : this._displayAs === "day_in_week" && (this._currentSlotContent.datetimeDisplayMode = this._weekDayAndMonthInYearFormat === "number" ? "weekday_number" : "weekday_name", this._currentSlotContent.weekStart = this._weekStart), this._weekDayAndMonthInYearFormat && (this._dateLevel === 3 ? this._currentSlotContent.monthNameFormat = this._weekDayAndMonthInYearFormat : this._dateLevel === 5 && (this._currentSlotContent.weekDayNameFormat = this._weekDayAndMonthInYearFormat)));
1641
+ }
1642
+ willUpdate(t) {
1643
+ t.has("slotContent") && (this._parseSlotContent(), this._calculateSlotContent());
1644
+ }
1645
+ _renderDisplaySettings() {
1646
+ var r;
1647
+ const t = (r = Fe == null ? void 0 : Fe[`level${this._dateLevel ?? 0}`]) == null ? void 0 : r.map(
1648
+ (n) => D`<luzmo-menu-item value=${n.key}>
1649
+ ${n.label}
1650
+ </luzmo-menu-item>`
1651
+ );
1652
+ return D`<div class="setting">
1653
+ <luzmo-field-label for="display-as">Display</luzmo-field-label>
1654
+ <luzmo-picker
1655
+ id="display-as"
1656
+ size=${this.size}
1657
+ variant="highlight"
1658
+ value=${this._displayAs ?? "default"}
1659
+ @change=${this._setDisplayAs}
1660
+ >
1661
+ ${t}
1662
+ </luzmo-picker>
1663
+ </div>`;
1664
+ }
1665
+ _renderWeekDayAndMonthNameFormatSettings() {
1666
+ const t = Object.keys(
1667
+ Ke
1668
+ ).map((r) => D`<luzmo-action-button value=${r}>
1669
+ ${Ke[r]}
1670
+ </luzmo-action-button>`);
1671
+ return D` <div class="setting">
1672
+ <luzmo-field-label for="weekday-and-month-in-year-format"
1673
+ >Format</luzmo-field-label
1674
+ >
1675
+ <luzmo-action-group
1676
+ emphasized
1677
+ id="weekday-and-month-in-year-format"
1678
+ size=${this.size}
1679
+ compact
1680
+ .selected=${[this._weekDayAndMonthInYearFormat ?? "short"]}
1681
+ selects="single"
1682
+ @change=${this._setWeekdayAndMonthInYearFormat}
1683
+ >
1684
+ ${t}
1685
+ </luzmo-action-group>
1686
+ </div>`;
1687
+ }
1688
+ _renderMonthNameFormatSettings() {
1689
+ return D` <div class="setting">
1690
+ <luzmo-field-label for="month-name-format">Format</luzmo-field-label>
1691
+ <luzmo-action-group
1692
+ emphasized
1693
+ id="month-name-format"
1694
+ size=${this.size}
1695
+ compact
1696
+ .selected=${[this._monthNameFormat ?? "long"]}
1697
+ selects="single"
1698
+ @change=${this._setMonthNameFormat}
1699
+ >
1700
+ <luzmo-action-button value="short">Short</luzmo-action-button>
1701
+ <luzmo-action-button value="long">Long</luzmo-action-button>
1702
+ </luzmo-action-group>
1703
+ </div>`;
1704
+ }
1705
+ _renderWeekFormatSettings() {
1706
+ var i;
1707
+ const t = ((i = this._localeFormats) == null ? void 0 : i.smartDateFormats) ?? xe, r = t.find(
1708
+ (a) => a.mmdd === !0 && a.separator === this._dateSeparator && a.monthType === "number"
1709
+ ), n = t.find(
1710
+ (a) => a.mmdd === !1 && a.separator === this._dateSeparator && a.monthType === "number"
1711
+ );
1712
+ return D` <div class="setting">
1713
+ <luzmo-field-label for="week-format">Format</luzmo-field-label>
1714
+ <luzmo-action-group
1715
+ emphasized
1716
+ id="week-format"
1717
+ size=${this.size}
1718
+ compact
1719
+ .selected=${[this._weekFormat ?? "ddmm"]}
1720
+ selects="single"
1721
+ @change=${this._setWeekFormat}
1722
+ >
1723
+ <luzmo-action-button value="ddmm">
1724
+ ${ze(
1725
+ {
1726
+ ...this._currentSlotContent,
1727
+ type: "datetime",
1728
+ format: n == null ? void 0 : n.key
1729
+ },
1730
+ {
1731
+ localFormats: this._localeFormats,
1732
+ level: this._dateLevel
1733
+ }
1734
+ )(/* @__PURE__ */ new Date())}
1735
+ </luzmo-action-button>
1736
+ <luzmo-action-button value="mmdd"
1737
+ >${ze(
1738
+ {
1739
+ ...this._currentSlotContent,
1740
+ type: "datetime",
1741
+ format: r == null ? void 0 : r.key
1742
+ },
1743
+ {
1744
+ localFormats: this._localeFormats,
1745
+ level: this._dateLevel
1746
+ }
1747
+ )(/* @__PURE__ */ new Date())}</luzmo-action-button
1748
+ >
1749
+ </luzmo-action-group>
1750
+ </div>`;
1751
+ }
1752
+ _renderWeekStartsOnSettings() {
1753
+ const t = Object.keys(et).map(
1754
+ (r) => D`<luzmo-menu-item value=${r}>
1755
+ ${et[r]}
1756
+ </luzmo-menu-item>`
1757
+ );
1758
+ return D`<div class="setting">
1759
+ <luzmo-field-label for="week-start">Week starts on</luzmo-field-label>
1760
+ <luzmo-picker
1761
+ id="week-start"
1762
+ size=${this.size}
1763
+ variant="highlight"
1764
+ value=${this._weekStart ?? "Auto"}
1765
+ @change=${this._setWeekStartsOn}
1766
+ >
1767
+ ${t}
1768
+ </luzmo-picker>
1769
+ </div>`;
1770
+ }
1771
+ _renderMonthNameSettings() {
1772
+ return D`<div class="settings-">
1773
+ <luzmo-field-label for="month-name">Month</luzmo-field-label>
1774
+ <luzmo-action-button
1775
+ id="month-name"
1776
+ emphasized
1777
+ toggles
1778
+ .size=${this.size}
1779
+ ?selected=${this._monthName}
1780
+ @change=${this._setMonthName}
1781
+ >
1782
+ <luzmo-icon
1783
+ slot="icon"
1784
+ .size=${this.size}
1785
+ .icon=${this._monthName ? ve : Me}
1786
+ ></luzmo-icon>
1787
+ Name
1788
+ </luzmo-action-button>
1789
+ </div>`;
1790
+ }
1791
+ _renderDateFormatSettings() {
1792
+ const t = this._dateSeparator === "~" ? "/" : this._dateSeparator;
1793
+ return D`<div class="setting">
1794
+ <luzmo-field-label for="date-format">Format</luzmo-field-label>
1795
+ <luzmo-picker
1796
+ id="date-format"
1797
+ size=${this.size}
1798
+ variant="highlight"
1799
+ value=${this._dateFormat ?? "Auto"}
1800
+ @change=${this._setDateFormat}
1801
+ >
1802
+ <luzmo-menu-item value="auto">Auto</luzmo-menu-item>
1803
+ <luzmo-menu-item value="mmdd">12${t}31</luzmo-menu-item>
1804
+ <luzmo-menu-item value="ddmm">31${t}12</luzmo-menu-item>
1805
+ </luzmo-picker>
1806
+ </div>`;
1807
+ }
1808
+ _renderSeparatorSettings() {
1809
+ const t = Object.keys(Xe).map(
1810
+ (r) => D`<luzmo-menu-item value=${r}>
1811
+ ${Xe[r]}
1812
+ </luzmo-menu-item>`
1813
+ );
1814
+ return D`<div class="setting">
1815
+ <luzmo-field-label for="date-separator">Separator</luzmo-field-label>
1816
+ <luzmo-picker
1817
+ id="date-separator"
1818
+ size=${this.size}
1819
+ variant="highlight"
1820
+ value=${this._dateSeparator ?? "~"}
1821
+ @change=${this._setDateSeparator}
1822
+ >
1823
+ ${t}
1824
+ </luzmo-picker>
1825
+ </div>`;
1826
+ }
1827
+ _render24hFormatSettings() {
1828
+ return D`<div class="settings-">
1829
+ <luzmo-field-label for="format-24h">24h</luzmo-field-label>
1830
+ <luzmo-action-button
1831
+ id="format-24h"
1832
+ emphasized
1833
+ toggles
1834
+ .size=${this.size}
1835
+ ?selected=${this._24hFormat}
1836
+ @change=${this._set24hFormat}
1837
+ >
1838
+ <luzmo-icon
1839
+ slot="icon"
1840
+ .size=${this.size}
1841
+ .icon=${this._24hFormat ? ve : Me}
1842
+ ></luzmo-icon>
1843
+ </luzmo-action-button>
1844
+ </div>`;
1845
+ }
1846
+ _renderWeekdaySettings() {
1847
+ return D`<div class="settings-">
1848
+ <luzmo-field-label for="weekday">Weekday</luzmo-field-label>
1849
+ <luzmo-action-button
1850
+ id="weekday"
1851
+ emphasized
1852
+ toggles
1853
+ .size=${this.size}
1854
+ ?selected=${this._weekDay}
1855
+ @change=${this._setWeekday}
1856
+ >
1857
+ <luzmo-icon
1858
+ slot="icon"
1859
+ .size=${this.size}
1860
+ .icon=${this._weekDay ? ve : Me}
1861
+ ></luzmo-icon>
1862
+ Show
1863
+ </luzmo-action-button>
1864
+ </div>`;
1865
+ }
1866
+ _renderExampleFormat() {
1867
+ return D`<span class="example">
1868
+ ${ze(
1869
+ {
1870
+ ...this._currentSlotContent,
1871
+ type: "datetime"
1872
+ },
1873
+ {
1874
+ localFormats: this._localeFormats,
1875
+ level: this._dateLevel
1876
+ }
1877
+ )(!this._displayAs || this._displayAs === "default" ? /* @__PURE__ */ new Date() : 1)}
1878
+ </span>
1879
+ ${(this._dateSeparator === "~" || this._dateFormat === "auto") && !this._monthName ? D`<span class="example-language">
1880
+ (${this.contentLanguage})
1881
+ </span>` : ""}`;
1882
+ }
1883
+ _renderAllSettings() {
1884
+ return D`<div class="settings-container">
1885
+ ${this._dateLevel && ![1, 9].includes(this._dateLevel) ? D` <div class="settings-row">
1886
+ ${this._renderDisplaySettings()}
1887
+ ${this._dateLevel && this._dateLevel >= 5 && this._displayAs === "day_in_week" ? this._renderWeekStartsOnSettings() : ""}
1888
+ </div>` : ""}
1889
+ ${["month_in_year", "day_in_week"].includes(this._displayAs ?? "") ? D` <div class="settings-row">
1890
+ ${this._renderWeekDayAndMonthNameFormatSettings()}
1891
+ </div>` : ""}
1892
+ ${this._dateLevel && this._dateLevel > 1 && this._displayAs === "default" ? D` <div class="settings-row">
1893
+ ${this._dateLevel && this._dateLevel !== 4 && this._dateLevel !== 2 ? this._renderMonthNameSettings() : ""}
1894
+ ${this._dateLevel && this._dateLevel !== 4 && this._dateLevel > 2 && this._monthName ? this._renderMonthNameFormatSettings() : ""}
1895
+ ${this._dateLevel && this._dateLevel === 4 && !this._monthName ? this._renderWeekFormatSettings() : ""}
1896
+ ${this._dateLevel && this._dateLevel >= 5 && !this._monthName ? this._renderDateFormatSettings() : ""}
1897
+ ${this._dateLevel && this._dateLevel > 1 && !this._monthName ? this._renderSeparatorSettings() : ""}
1898
+ ${this._dateLevel && this._dateLevel >= 5 && this._monthName ? this._renderWeekdaySettings() : ""}
1899
+ ${this._dateLevel && this._dateLevel > 5 ? this._render24hFormatSettings() : ""}
1900
+ </div>` : ""}
1901
+ <div class="settings-row">
1902
+ <div class="example-container">
1903
+ <span class="example-label">Example:</span>
1904
+ ${this._renderExampleFormat()}
1905
+ </div>
1906
+ </div>
1907
+ </div>`;
1908
+ }
1909
+ render() {
1910
+ return this._loadLocaleFormatsConfig.render({
1911
+ pending: () => D`<luzmo-progress-circle
1912
+ indeterminate
1913
+ .size=${this.size}
1914
+ ></luzmo-progress-circle>`,
1915
+ complete: () => this._renderAllSettings(),
1916
+ error: (t) => this._renderAllSettings()
1917
+ });
1918
+ }
1919
+ }
1920
+ $([
1921
+ ge({ type: String })
1922
+ ], U.prototype, "language");
1923
+ $([
1924
+ ge({ type: String })
1925
+ ], U.prototype, "contentLanguage");
1926
+ $([
1927
+ ge({ type: String })
1928
+ ], U.prototype, "size");
1929
+ $([
1930
+ ge({ type: Object, reflect: !1 })
1931
+ ], U.prototype, "slotContent");
1932
+ $([
1933
+ O("#display-as")
1934
+ ], U.prototype, "_displayAsElement");
1935
+ $([
1936
+ O("#week-start")
1937
+ ], U.prototype, "_weekStartElement");
1938
+ $([
1939
+ O("#weekday-and-month-in-year-format")
1940
+ ], U.prototype, "_weekDayAndMonthInYearFormatElement");
1941
+ $([
1942
+ O("#month-name-format")
1943
+ ], U.prototype, "_monthNameFormatElement");
1944
+ $([
1945
+ O("#month-name")
1946
+ ], U.prototype, "_monthNameElement");
1947
+ $([
1948
+ O("#week-format")
1949
+ ], U.prototype, "_weekFormatElement");
1950
+ $([
1951
+ O("#date-format")
1952
+ ], U.prototype, "_dateFormatElement");
1953
+ $([
1954
+ O("#date-separator")
1955
+ ], U.prototype, "_dateSeparatorElement");
1956
+ $([
1957
+ O("#weekday")
1958
+ ], U.prototype, "_weekDayElement");
1959
+ $([
1960
+ O("#format-24h")
1961
+ ], U.prototype, "_format24hElement");
1962
+ customElements.get("luzmo-display-settings-datetime") || customElements.define(
1963
+ "luzmo-display-settings-datetime",
1964
+ U
1965
+ );
1966
+ const yn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1967
+ __proto__: null,
1968
+ LuzmoDisplaySettingsDatetime: U
1969
+ }, Symbol.toStringTag, { value: "Module" })), tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1970
+ __proto__: null,
1971
+ default: $e
1972
+ }, Symbol.toStringTag, { value: "Module" })), rn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1973
+ __proto__: null,
1974
+ default: $e
1975
+ }, Symbol.toStringTag, { value: "Module" }));
1976
+ export {
1977
+ $e as D,
1978
+ U as L,
1979
+ yn as i
1980
+ };