react-semaphor 0.1.513 → 0.1.515

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 (70) hide show
  1. package/dist/brand-studio/index.cjs +1 -1
  2. package/dist/brand-studio/index.js +1 -1
  3. package/dist/briefings/index.cjs +1 -1
  4. package/dist/briefings/index.js +3 -3
  5. package/dist/chunks/{dashboard-briefing-launcher-BgGxFDKD.cjs → dashboard-briefing-launcher-B7zqm8P1.cjs} +1 -1
  6. package/dist/chunks/{dashboard-briefing-launcher-C7ptb5Yf.js → dashboard-briefing-launcher-BA_bl05p.js} +5 -5
  7. package/dist/chunks/{dashboard-controls-BybAeRL8.js → dashboard-controls-QMW17RKx.js} +6 -6
  8. package/dist/chunks/{dashboard-controls-BFT7savs.cjs → dashboard-controls-x_v9wLOU.cjs} +1 -1
  9. package/dist/chunks/{dashboard-json-qNJC4fZW.cjs → dashboard-json-0ZLLBlHj.cjs} +1 -1
  10. package/dist/chunks/{dashboard-json-DmgEQ0yQ.js → dashboard-json-DRnpkNwO.js} +3 -3
  11. package/dist/chunks/{edit-dashboard-visual-CHqpQVfv.js → edit-dashboard-visual-1ISjhwry.js} +1377 -1380
  12. package/dist/chunks/{edit-dashboard-visual-BS219qr8.cjs → edit-dashboard-visual-CI0EqzKj.cjs} +2 -2
  13. package/dist/chunks/{editor-action-buttons-DbU_vUvm.js → editor-action-buttons-BTCKZERI.js} +3 -3
  14. package/dist/chunks/{editor-action-buttons-6NvSUz4D.cjs → editor-action-buttons-Czq5SnA9.cjs} +1 -1
  15. package/dist/chunks/{index-DhlVxvyI.cjs → index-BMMXKK3G.cjs} +1 -1
  16. package/dist/chunks/{index-CrxlydOT.cjs → index-C6_xef4P.cjs} +168 -168
  17. package/dist/chunks/{index-CACdoqu3.js → index-C8w91oj4.js} +61 -51
  18. package/dist/chunks/index-Cw2ypaFl.cjs +1 -0
  19. package/dist/chunks/{index-WMVZeOZp.js → index-Dlic9KZs.js} +32234 -31816
  20. package/dist/chunks/{index-CnGVjyF8.js → index-v1OE4-eA.js} +2 -2
  21. package/dist/chunks/matrix-formatter-BdIsE7Qu.js +341 -0
  22. package/dist/chunks/matrix-formatter-Dajj91Ni.cjs +1 -0
  23. package/dist/chunks/{pivot-header-presentation-Dm9dUQsl.js → pivot-header-presentation-BIf4HW3L.js} +35 -36
  24. package/dist/chunks/{pivot-header-presentation-Cxz8-06f.cjs → pivot-header-presentation-B_N11CgN.cjs} +3 -3
  25. package/dist/chunks/{pivot-result-lifecycle-BeOpjAhg.js → pivot-result-lifecycle-CEmyU2At.js} +207 -148
  26. package/dist/chunks/pivot-result-lifecycle-vg_suUNb.cjs +1 -0
  27. package/dist/chunks/{raw-temporal-DrmCX9Wq.js → raw-temporal-Bj6_w9cG.js} +471 -361
  28. package/dist/chunks/raw-temporal-CeblVJbu.cjs +1 -0
  29. package/dist/chunks/{report-preferences-dialog-CaefWf8W.cjs → report-preferences-dialog-Dr1BYwuf.cjs} +1 -1
  30. package/dist/chunks/{report-preferences-dialog-BoDcPtha.js → report-preferences-dialog-b8J6KjSy.js} +2 -2
  31. package/dist/chunks/semantic-format-DFI1iszk.cjs +1 -0
  32. package/dist/chunks/{semantic-format-BZxJLKvw.js → semantic-format-Dt-nUxFB.js} +23 -29
  33. package/dist/chunks/switch-Ced9ZZwI.cjs +134 -0
  34. package/dist/chunks/{switch-QfKb0Iwe.js → switch-D5_tjsIS.js} +3139 -3087
  35. package/dist/dashboard/index.cjs +1 -1
  36. package/dist/dashboard/index.js +1 -1
  37. package/dist/data-app-builder/index.cjs +1 -1
  38. package/dist/data-app-builder/index.js +2 -2
  39. package/dist/data-app-sdk/index.cjs +1 -1
  40. package/dist/data-app-sdk/index.js +1 -1
  41. package/dist/format-utils/index.cjs +3 -3
  42. package/dist/format-utils/index.js +131 -126
  43. package/dist/index.cjs +1 -1
  44. package/dist/index.js +7 -7
  45. package/dist/surfboard/index.cjs +1 -1
  46. package/dist/surfboard/index.js +2 -2
  47. package/dist/types/components/calculated-fields/templates-menu.d.ts +0 -9
  48. package/dist/types/components/visual/aggregated-table/utils/metric-format-resolver.d.ts +3 -3
  49. package/dist/types/components/visual/data-table/types/data-table.d.ts +4 -1
  50. package/dist/types/components/visual/pivot-table/utils/pivot-metric-formatting.d.ts +2 -2
  51. package/dist/types/index.cjs +1 -1
  52. package/dist/types/index.js +58 -34
  53. package/dist/types/lib/formatters/metric-formatting.d.ts +3 -3
  54. package/dist/types/lib/table-formatting/table-presentation-fields.d.ts +1 -0
  55. package/dist/types/lib/types/calculated-field-template-types.d.ts +3 -2
  56. package/dist/types/lib/utils/calculated-field-row-templates.d.ts +6 -4
  57. package/dist/types/lib/utils/date-timezone-utils.d.ts +26 -4
  58. package/dist/types/shared/format-utils/formatters/duration-formatter.d.ts +4 -1
  59. package/dist/types/shared/format-utils/formatters/index.d.ts +2 -2
  60. package/dist/types/shared/format-utils/formatters/number-formatter.d.ts +8 -2
  61. package/dist/types/shared/format-utils/presentation-execution.d.ts +17 -2
  62. package/dist/types/shared/format-utils/types/format-types.d.ts +16 -1
  63. package/package.json +1 -1
  64. package/dist/chunks/index-F25jnH0p.cjs +0 -1
  65. package/dist/chunks/matrix-formatter-BLunke3R.js +0 -424
  66. package/dist/chunks/matrix-formatter-CveLJo6S.cjs +0 -1
  67. package/dist/chunks/pivot-result-lifecycle-BiERyXnS.cjs +0 -1
  68. package/dist/chunks/raw-temporal-BUeTpG76.cjs +0 -1
  69. package/dist/chunks/semantic-format-BzH69TRq.cjs +0 -1
  70. package/dist/chunks/switch--Re1K566.cjs +0 -134
@@ -1,143 +1,240 @@
1
- var W = Object.defineProperty;
2
- var Q = (e, t, r) => t in e ? W(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var b = (e, t, r) => Q(e, typeof t != "symbol" ? t + "" : t, r);
4
- import { b8 as K, b9 as J, i as T } from "./validators-CkHsAvwB.js";
5
- import { canonicalizeSupportedLocale as M, canonicalizeSupportedCurrencyCode as z } from "../value-format-preferences/index.js";
6
- import { i as g, t as L } from "./temporal-bucket-B9hMwemw.js";
7
- import { p as ee } from "./raw-temporal-contract-CFLGwTiI.js";
8
- import { f as te } from "./index-CACdoqu3.js";
9
- let I;
10
- function C(e, t) {
1
+ var ne = Object.defineProperty;
2
+ var ae = (e, t, r) => t in e ? ne(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var b = (e, t, r) => ae(e, typeof t != "symbol" ? t + "" : t, r);
4
+ import { b8 as p, b9 as ie, i as D } from "./validators-CkHsAvwB.js";
5
+ import { canonicalizeSupportedLocale as I, canonicalizeSupportedCurrencyCode as F } from "../value-format-preferences/index.js";
6
+ import { i as g, t as K } from "./temporal-bucket-B9hMwemw.js";
7
+ import { p as ce } from "./raw-temporal-contract-CFLGwTiI.js";
8
+ import { f as se } from "./index-C8w91oj4.js";
9
+ const O = [
10
+ "day",
11
+ "hour",
12
+ "minute",
13
+ "second",
14
+ "millisecond"
15
+ ], k = {
16
+ day: 864e5,
17
+ hour: 36e5,
18
+ minute: 6e4,
19
+ second: 1e3,
20
+ millisecond: 1
21
+ }, ue = {
22
+ day: "d",
23
+ hour: "hr",
24
+ minute: "min",
25
+ second: "s",
26
+ millisecond: "ms"
27
+ }, me = {
28
+ day: ["day", "days"],
29
+ hour: ["hour", "hours"],
30
+ minute: ["minute", "minutes"],
31
+ second: ["second", "seconds"],
32
+ millisecond: ["millisecond", "milliseconds"]
33
+ };
34
+ function oe(e) {
35
+ return e === "day" || e === "hour" || e === "minute" || e === "second" || e === "millisecond";
36
+ }
37
+ function V(e, t) {
38
+ return oe(e) ? e : t;
39
+ }
40
+ function P(e, t) {
41
+ return O.indexOf(V(e, t));
42
+ }
43
+ function le(e, t) {
44
+ const r = P(e, "day"), n = P(t, "second"), i = Math.min(r, n), a = Math.max(r, n);
45
+ return O.slice(i, a + 1);
46
+ }
47
+ function fe(e, t) {
48
+ return e * k[V(t, "second")];
49
+ }
50
+ function de(e, t) {
51
+ const r = le(t.largestUnit, t.smallestUnit), n = r[r.length - 1], i = k[n];
52
+ let a = Math.round(e / i) * i;
53
+ return r.map((c) => {
54
+ const s = k[c], u = Math.floor(a / s);
55
+ return a -= u * s, { unit: c, value: u };
56
+ });
57
+ }
58
+ function ge(e, t) {
59
+ const r = e.filter((a) => a.value !== 0), n = r.length > 0 ? r : [e[e.length - 1]], i = typeof t == "number" && Number.isFinite(t) ? Math.max(1, Math.trunc(t)) : n.length;
60
+ return n.slice(0, i).map((a) => `${a.value}${ue[a.unit]}`).join(" ");
61
+ }
62
+ function ye(e, t) {
63
+ const r = e.filter((a) => a.value !== 0), n = r.length > 0 ? r : [e[e.length - 1]], i = typeof t == "number" && Number.isFinite(t) ? Math.max(1, Math.trunc(t)) : n.length;
64
+ return n.slice(0, i).map((a) => {
65
+ const [c, s] = me[a.unit];
66
+ return `${a.value} ${a.value === 1 ? c : s}`;
67
+ }).join(" ");
68
+ }
69
+ function he(e) {
70
+ const t = e.some(
71
+ (u) => u.unit === "day" && u.value !== 0
72
+ ), r = e.some((u) => u.unit === "millisecond"), n = e.findIndex((u) => u.value !== 0), i = Math.max(0, e.length - 2), a = t ? 0 : n === -1 ? i : Math.min(n, i), c = n === -1 ? e.slice(i) : e.slice(a);
73
+ if (c.length === 0)
74
+ return "0";
75
+ const s = c.map((u, l) => u.unit === "millisecond" ? String(u.value).padStart(3, "0") : l === 0 ? String(u.value) : String(u.value).padStart(2, "0")).join(":");
76
+ return r ? s.replace(/:(\d{3})$/, ".$1") : s;
77
+ }
78
+ function Se(e, t, r) {
79
+ const n = `${r.prefix || ""}${e}${r.suffix || ""}`;
80
+ return t ? r.negativeInParentheses ? `(${n})` : `-${n}` : n;
81
+ }
82
+ function xe(e, t = {}) {
83
+ if (e == null)
84
+ return "";
85
+ const r = typeof e == "number" ? e : typeof e == "string" && e.trim() ? Number(e) : NaN;
86
+ if (!Number.isFinite(r))
87
+ return "";
88
+ const n = t.inputUnit || "second", i = t.outputStyle === "digital" || t.outputStyle === "long" ? t.outputStyle : "compact", a = r < 0, c = Math.abs(fe(r, n)), s = de(c, t), u = i === "digital" ? he(s) : i === "long" ? ye(s, t.maxUnits) : ge(s, t.maxUnits);
89
+ return Se(u, a, t);
90
+ }
91
+ function G(e, t) {
92
+ return xe(
93
+ e !== null && typeof e == "object" ? e.value : e,
94
+ {
95
+ inputUnit: t.inputUnit,
96
+ outputStyle: t.outputStyle,
97
+ largestUnit: t.largestUnit,
98
+ smallestUnit: t.smallestUnit,
99
+ maxUnits: t.maxUnits,
100
+ prefix: t.prefix,
101
+ suffix: t.suffix,
102
+ negativeInParentheses: t.negativeStyle === "parentheses"
103
+ }
104
+ );
105
+ }
106
+ let C;
107
+ function R(e, t) {
11
108
  const r = e.format;
12
109
  return r(t);
13
110
  }
14
- function re(e, t) {
15
- if (I ?? (I = C(
111
+ function we(e, t) {
112
+ if (C ?? (C = R(
16
113
  new Intl.NumberFormat("en-US", { useGrouping: !1, maximumFractionDigits: 6 }),
17
114
  "9007199254740993.000009"
18
- ) === "9007199254740993.000009"), !I)
115
+ ) === "9007199254740993.000009"), !C)
19
116
  throw new RangeError("This runtime cannot format exact decimal strings.");
20
117
  const r = Number(e);
21
118
  if (!Number.isFinite(r) || r === 0 && e !== "0")
22
119
  throw new RangeError("Exact value is outside the Intl formatting range; use raw text.");
23
- return C(t, e);
120
+ return R(t, e);
24
121
  }
25
- function N(e) {
122
+ function _(e) {
26
123
  return typeof e == "number" ? e < 0 : e.value.startsWith("-");
27
124
  }
28
- function D(e) {
29
- return typeof e == "number" ? Math.abs(e) : N(e) ? { ...e, value: e.value.slice(1) } : e;
125
+ function T(e) {
126
+ return typeof e == "number" ? Math.abs(e) : _(e) ? { ...e, value: e.value.slice(1) } : e;
30
127
  }
31
- function V(e, t) {
128
+ function Z(e, t) {
32
129
  return typeof e == "number" ? e * t : {
33
130
  kind: "exact_number",
34
131
  type: "decimal",
35
- value: K(e.value, t)
132
+ value: p(e.value, t)
36
133
  };
37
134
  }
38
- function _(e, t) {
135
+ function N(e, t) {
39
136
  return t === 0 ? e : typeof e == "number" ? e / 10 ** t : {
40
137
  kind: "exact_number",
41
138
  type: "decimal",
42
- value: K(e.value, `1e-${t}`)
139
+ value: p(e.value, `1e-${t}`)
43
140
  };
44
141
  }
45
142
  function h(e, t) {
46
- return typeof e == "number" ? t.format(e) : re(e.value, t);
143
+ return typeof e == "number" ? t.format(e) : we(e.value, t);
47
144
  }
48
- function P(e) {
145
+ function A(e) {
49
146
  if (!e) return !1;
50
147
  const t = e.toLowerCase().replace("_", "-");
51
148
  return t === "en-in" || t.startsWith("en-in-");
52
149
  }
53
- function R(e, t) {
54
- const r = D(e), a = (i) => typeof r == "number" ? r >= i : J(r.value, String(i)) >= 0;
55
- return a(1e12) ? { power: 12, suffix: "T" } : a(1e9) ? { power: 9, suffix: "B" } : P(t) && a(1e7) ? { power: 7, suffix: "Cr" } : a(1e6) ? { power: 6, suffix: "M" } : P(t) && a(1e5) ? { power: 5, suffix: "L" } : a(1e3) ? { power: 3, suffix: "K" } : { power: 0, suffix: "" };
150
+ function L(e, t) {
151
+ const r = T(e), n = (i) => typeof r == "number" ? r >= i : ie(r.value, String(i)) >= 0;
152
+ return n(1e12) ? { power: 12, suffix: "T" } : n(1e9) ? { power: 9, suffix: "B" } : A(t) && n(1e7) ? { power: 7, suffix: "Cr" } : n(1e6) ? { power: 6, suffix: "M" } : A(t) && n(1e5) ? { power: 5, suffix: "L" } : n(1e3) ? { power: 3, suffix: "K" } : { power: 0, suffix: "" };
56
153
  }
57
- function k(e, t) {
154
+ function z(e, t) {
58
155
  try {
59
- const r = w(t);
60
- return R(e, r);
156
+ const r = x(t);
157
+ return L(e, r);
61
158
  } catch {
62
- return R(e, "en-US");
159
+ return L(e, "en-US");
63
160
  }
64
161
  }
65
- function ae(e) {
162
+ function ve(e) {
66
163
  try {
67
164
  return new Intl.NumberFormat(e), !0;
68
165
  } catch {
69
166
  return !1;
70
167
  }
71
168
  }
72
- function w(e) {
73
- return e && ae(e) ? e : "en-US";
169
+ function x(e) {
170
+ return e && ve(e) ? e : "en-US";
74
171
  }
75
- function $(e, t) {
172
+ function E(e, t) {
76
173
  if (e == null || Number.isNaN(e))
77
174
  return "";
78
- const r = w(t == null ? void 0 : t.locale);
79
- let a = e;
80
- if (t != null && t.multiplyBy && (a = V(a, t.multiplyBy)), t != null && t.useSuffix) {
81
- const { power: n, suffix: c } = k(a, r);
82
- a = _(a, n);
83
- const m = h(a, new Intl.NumberFormat(r, {
175
+ const r = x(t == null ? void 0 : t.locale);
176
+ let n = e;
177
+ if (t != null && t.multiplyBy && (n = Z(n, t.multiplyBy)), t != null && t.useSuffix) {
178
+ const { power: a, suffix: c } = z(n, r);
179
+ n = N(n, a);
180
+ const s = h(n, new Intl.NumberFormat(r, {
84
181
  minimumFractionDigits: (t == null ? void 0 : t.minimumFractionDigits) ?? 0,
85
182
  maximumFractionDigits: (t == null ? void 0 : t.maximumFractionDigits) ?? 2,
86
183
  useGrouping: (t == null ? void 0 : t.useGrouping) ?? !0
87
184
  }));
88
- return `${(t == null ? void 0 : t.prefix) ?? ""}${m}${c}${(t == null ? void 0 : t.suffix) ?? ""}`;
185
+ return `${(t == null ? void 0 : t.prefix) ?? ""}${s}${c}${(t == null ? void 0 : t.suffix) ?? ""}`;
89
186
  }
90
- const i = h(a, new Intl.NumberFormat(r, {
187
+ const i = h(n, new Intl.NumberFormat(r, {
91
188
  minimumFractionDigits: (t == null ? void 0 : t.minimumFractionDigits) ?? 0,
92
189
  maximumFractionDigits: (t == null ? void 0 : t.maximumFractionDigits) ?? 2,
93
190
  useGrouping: (t == null ? void 0 : t.useGrouping) ?? !0
94
191
  }));
95
- if (t != null && t.negativeInParentheses && N(a)) {
96
- const n = i.replace("-", "");
97
- return `(${(t == null ? void 0 : t.prefix) ?? ""}${n}${(t == null ? void 0 : t.suffix) ?? ""})`;
192
+ if (t != null && t.negativeInParentheses && _(n)) {
193
+ const a = i.replace("-", "");
194
+ return `(${(t == null ? void 0 : t.prefix) ?? ""}${a}${(t == null ? void 0 : t.suffix) ?? ""})`;
98
195
  }
99
196
  return `${(t == null ? void 0 : t.prefix) ?? ""}${i}${(t == null ? void 0 : t.suffix) ?? ""}`;
100
197
  }
101
- function O(e, t) {
198
+ function j(e, t) {
102
199
  if (e == null || Number.isNaN(e))
103
200
  return "";
104
- const r = w(t == null ? void 0 : t.locale), a = (t == null ? void 0 : t.currency) || "USD", i = N(e), n = !!(t != null && t.negativeInParentheses && i), c = n ? D(e) : e;
201
+ const r = x(t == null ? void 0 : t.locale), n = (t == null ? void 0 : t.currency) || "USD", i = _(e), a = !!(t != null && t.negativeInParentheses && i), c = a ? T(e) : e;
105
202
  try {
106
203
  if (t != null && t.useSuffix) {
107
- const { power: l, suffix: o } = k(c, r), s = _(c, l), d = `${h(s, new Intl.NumberFormat(r, {
204
+ const { power: u, suffix: l } = z(c, r), m = N(c, u), d = `${h(m, new Intl.NumberFormat(r, {
108
205
  style: "currency",
109
- currency: a,
206
+ currency: n,
110
207
  minimumFractionDigits: (t == null ? void 0 : t.minimumFractionDigits) ?? 0,
111
208
  maximumFractionDigits: (t == null ? void 0 : t.maximumFractionDigits) ?? 2,
112
209
  useGrouping: (t == null ? void 0 : t.useGrouping) ?? !0
113
- }))}${o}`;
114
- return n ? `(${d})` : d;
210
+ }))}${l}`;
211
+ return a ? `(${d})` : d;
115
212
  }
116
- const m = h(c, new Intl.NumberFormat(r, {
213
+ const s = h(c, new Intl.NumberFormat(r, {
117
214
  style: "currency",
118
- currency: a,
215
+ currency: n,
119
216
  minimumFractionDigits: (t == null ? void 0 : t.minimumFractionDigits) ?? 0,
120
217
  maximumFractionDigits: (t == null ? void 0 : t.maximumFractionDigits) ?? 2,
121
218
  useGrouping: (t == null ? void 0 : t.useGrouping) ?? !0
122
219
  }));
123
- return n ? `(${m})` : m;
220
+ return a ? `(${s})` : s;
124
221
  } catch {
125
- const m = D(e), l = t != null && t.useSuffix ? k(m, r) : { power: 0, suffix: "" }, o = $(
126
- _(m, l.power),
222
+ const s = T(e), u = t != null && t.useSuffix ? z(s, r) : { power: 0, suffix: "" }, l = E(
223
+ N(s, u.power),
127
224
  {
128
225
  locale: r,
129
226
  minimumFractionDigits: (t == null ? void 0 : t.minimumFractionDigits) ?? 0,
130
227
  maximumFractionDigits: (t == null ? void 0 : t.maximumFractionDigits) ?? 2,
131
228
  useGrouping: (t == null ? void 0 : t.useGrouping) ?? !0
132
229
  }
133
- ), s = `${a} ${o}${l.suffix}`;
134
- return i ? t != null && t.negativeInParentheses ? `(${s})` : `-${s}` : s;
230
+ ), m = `${n} ${l}${u.suffix}`;
231
+ return i ? t != null && t.negativeInParentheses ? `(${m})` : `-${m}` : m;
135
232
  }
136
233
  }
137
- function p(e, t) {
234
+ function q(e, t) {
138
235
  if (e == null || Number.isNaN(e))
139
236
  return "";
140
- const r = w(t == null ? void 0 : t.locale), i = (t == null ? void 0 : t.alreadyPercent) ?? (t == null ? void 0 : t.percentValueMode) === "whole" ? _(e, 2) : e;
237
+ const r = x(t == null ? void 0 : t.locale), i = (t == null ? void 0 : t.alreadyPercent) ?? (t == null ? void 0 : t.percentValueMode) === "whole" ? N(e, 2) : e;
141
238
  return h(i, new Intl.NumberFormat(r, {
142
239
  style: "percent",
143
240
  minimumFractionDigits: (t == null ? void 0 : t.minimumFractionDigits) ?? 0,
@@ -145,20 +242,20 @@ function p(e, t) {
145
242
  useGrouping: (t == null ? void 0 : t.useGrouping) ?? !0
146
243
  }));
147
244
  }
148
- function G(e, t) {
245
+ function B(e, t) {
149
246
  if (e == null || Number.isNaN(e))
150
247
  return "";
151
- const r = w(t == null ? void 0 : t.locale);
248
+ const r = x(t == null ? void 0 : t.locale);
152
249
  return h(e, new Intl.NumberFormat(r, {
153
250
  notation: "scientific",
154
251
  minimumFractionDigits: (t == null ? void 0 : t.minimumFractionDigits) ?? 0,
155
252
  maximumFractionDigits: (t == null ? void 0 : t.maximumFractionDigits) ?? 2
156
253
  }));
157
254
  }
158
- function ne(e, t) {
255
+ function H(e, t) {
159
256
  if (e == null || Number.isNaN(e))
160
257
  return "";
161
- const r = t.scale === void 0 ? e : V(e, t.scale), a = t.negativeStyle === "parentheses" && N(r), i = a ? D(r) : r, n = {
258
+ const r = t.scale === void 0 ? e : Z(e, t.scale), n = t.negativeStyle === "parentheses" && _(r), i = n ? T(r) : r, a = {
162
259
  style: t.type === "number" ? "decimal" : t.type,
163
260
  locale: t.locale,
164
261
  currency: t.currency,
@@ -171,36 +268,46 @@ function ne(e, t) {
171
268
  let c;
172
269
  switch (t.type) {
173
270
  case "currency":
174
- c = O(i, n);
271
+ c = j(i, a);
175
272
  break;
176
273
  case "percent":
177
- c = p(i, n);
274
+ c = q(i, a);
178
275
  break;
179
276
  case "scientific":
180
- c = G(i, n);
277
+ c = B(i, a);
181
278
  break;
182
279
  default:
183
- c = $(i, n);
280
+ c = E(i, a);
184
281
  break;
185
282
  }
186
- const m = `${t.prefix ?? ""}${c}${t.suffix ?? ""}`;
187
- return a ? `(${m})` : m;
283
+ const s = `${t.prefix ?? ""}${c}${t.suffix ?? ""}`;
284
+ return n ? `(${s})` : s;
188
285
  }
189
- function Ce(e, t, r = "en-US") {
286
+ function Ye(e, t) {
287
+ return t.type === "duration" ? e == null ? "" : G(e, t) : H(e, t);
288
+ }
289
+ function Xe(e, t, r = "en-US") {
190
290
  if (e == null || typeof e == "number" && isNaN(e))
191
291
  return "";
192
- const a = w((t == null ? void 0 : t.locale) || r), i = (t == null ? void 0 : t.style) || "decimal", n = i === "decimal" ? "number" : i;
193
- return n === "currency" && new Intl.NumberFormat(a, {
292
+ if ((t == null ? void 0 : t.style) === "duration")
293
+ return G(e, {
294
+ ...t.duration,
295
+ prefix: t.prefix,
296
+ suffix: t.suffix,
297
+ negativeStyle: t.negativeStyle
298
+ });
299
+ const n = x((t == null ? void 0 : t.locale) || r), i = (t == null ? void 0 : t.style) || "decimal", a = i === "decimal" ? "number" : i;
300
+ return a === "currency" && new Intl.NumberFormat(n, {
194
301
  style: "currency",
195
302
  currency: (t == null ? void 0 : t.currency) || "USD"
196
- }), ne(e, {
197
- type: n,
198
- locale: a,
199
- currency: n === "currency" ? (t == null ? void 0 : t.currency) || "USD" : void 0,
303
+ }), H(e, {
304
+ type: a,
305
+ locale: n,
306
+ currency: a === "currency" ? (t == null ? void 0 : t.currency) || "USD" : void 0,
200
307
  minimumFractionDigits: (t == null ? void 0 : t.minimumFractionDigits) ?? 0,
201
308
  maximumFractionDigits: (t == null ? void 0 : t.maximumFractionDigits) ?? 2,
202
309
  useGrouping: (t == null ? void 0 : t.useGrouping) ?? !0,
203
- percentValueMode: n === "percent" ? (t == null ? void 0 : t.percentValueMode) ?? "whole" : void 0,
310
+ percentValueMode: a === "percent" ? (t == null ? void 0 : t.percentValueMode) ?? "whole" : void 0,
204
311
  scale: t == null ? void 0 : t.scale,
205
312
  compact: t == null ? void 0 : t.compact,
206
313
  negativeStyle: t == null ? void 0 : t.negativeStyle,
@@ -208,8 +315,8 @@ function Ce(e, t, r = "en-US") {
208
315
  suffix: t == null ? void 0 : t.suffix
209
316
  });
210
317
  }
211
- function Pe(e, t, r) {
212
- const a = {
318
+ function We(e, t, r) {
319
+ const n = {
213
320
  style: t === "currency" ? "currency" : t === "percent" ? "percent" : "decimal",
214
321
  locale: r == null ? void 0 : r.locale,
215
322
  currency: r == null ? void 0 : r.currency,
@@ -223,16 +330,16 @@ function Pe(e, t, r) {
223
330
  };
224
331
  switch (t) {
225
332
  case "currency":
226
- return O(e, a);
333
+ return j(e, n);
227
334
  case "percent":
228
- return p(e, a);
335
+ return q(e, n);
229
336
  case "scientific":
230
- return G(e, a);
337
+ return B(e, n);
231
338
  default:
232
- return $(e, a);
339
+ return E(e, n);
233
340
  }
234
341
  }
235
- const ie = [
342
+ const De = [
236
343
  "type",
237
344
  "locale",
238
345
  "minimumFractionDigits",
@@ -246,30 +353,30 @@ const ie = [
246
353
  "currency",
247
354
  "percentValueMode"
248
355
  ];
249
- function ce(e) {
356
+ function Te(e) {
250
357
  if (!g(e))
251
358
  return {
252
359
  ok: !1,
253
360
  issues: [{ path: "$", message: "Numeric format must be an object." }]
254
361
  };
255
- const t = [], r = new Set(ie);
256
- Object.keys(e).filter((n) => !r.has(n)).forEach(
257
- (n) => t.push({ path: n, message: `Unknown property "${n}".` })
362
+ const t = [], r = new Set(De);
363
+ Object.keys(e).filter((a) => !r.has(a)).forEach(
364
+ (a) => t.push({ path: a, message: `Unknown property "${a}".` })
258
365
  ), e.type !== "number" && e.type !== "currency" && e.type !== "percent" && e.type !== "scientific" && t.push({
259
366
  path: "type",
260
367
  message: "Expected number, currency, percent, or scientific."
261
368
  });
262
- const a = e.locale === void 0 ? void 0 : M(e.locale);
263
- e.locale !== void 0 && !a && t.push({ path: "locale", message: "Expected a supported BCP 47 locale." });
264
- const i = e.currency === void 0 ? void 0 : z(e.currency);
369
+ const n = e.locale === void 0 ? void 0 : I(e.locale);
370
+ e.locale !== void 0 && !n && t.push({ path: "locale", message: "Expected a supported BCP 47 locale." });
371
+ const i = e.currency === void 0 ? void 0 : F(e.currency);
265
372
  e.currency !== void 0 && !i && t.push({
266
373
  path: "currency",
267
374
  message: "Expected a supported ISO 4217 currency code."
268
375
  });
269
- for (const n of ["minimumFractionDigits", "maximumFractionDigits"]) {
270
- const c = e[n];
376
+ for (const a of ["minimumFractionDigits", "maximumFractionDigits"]) {
377
+ const c = e[a];
271
378
  c !== void 0 && (!Number.isInteger(c) || typeof c != "number" || c < 0 || c > 20) && t.push({
272
- path: n,
379
+ path: a,
273
380
  message: "Expected an integer from 0 to 20."
274
381
  });
275
382
  }
@@ -277,10 +384,10 @@ function ce(e) {
277
384
  path: "maximumFractionDigits",
278
385
  message: "Must be greater than or equal to minimumFractionDigits."
279
386
  });
280
- for (const n of ["useGrouping", "compact"])
281
- e[n] !== void 0 && typeof e[n] != "boolean" && t.push({ path: n, message: "Expected a boolean." });
282
- for (const n of ["prefix", "suffix"])
283
- e[n] !== void 0 && typeof e[n] != "string" && t.push({ path: n, message: "Expected a string." });
387
+ for (const a of ["useGrouping", "compact"])
388
+ e[a] !== void 0 && typeof e[a] != "boolean" && t.push({ path: a, message: "Expected a boolean." });
389
+ for (const a of ["prefix", "suffix"])
390
+ e[a] !== void 0 && typeof e[a] != "string" && t.push({ path: a, message: "Expected a string." });
284
391
  return e.negativeStyle !== void 0 && e.negativeStyle !== "minus" && e.negativeStyle !== "parentheses" && t.push({
285
392
  path: "negativeStyle",
286
393
  message: "Expected minus or parentheses."
@@ -291,7 +398,7 @@ function ce(e) {
291
398
  ok: !0,
292
399
  value: {
293
400
  type: e.type,
294
- ...a ? { locale: a } : {},
401
+ ...n ? { locale: n } : {},
295
402
  ...e.minimumFractionDigits !== void 0 ? { minimumFractionDigits: e.minimumFractionDigits } : {},
296
403
  ...e.maximumFractionDigits !== void 0 ? { maximumFractionDigits: e.maximumFractionDigits } : {},
297
404
  ...e.useGrouping !== void 0 ? { useGrouping: e.useGrouping } : {},
@@ -309,8 +416,8 @@ function ce(e) {
309
416
  }
310
417
  };
311
418
  }
312
- function Re(e) {
313
- const t = ce(e);
419
+ function Qe(e) {
420
+ const t = Te(e);
314
421
  if (!t.ok)
315
422
  return t;
316
423
  const r = [];
@@ -328,32 +435,32 @@ function Re(e) {
328
435
  message: "Resolved currency formats require an explicit currency."
329
436
  }), r.length > 0 ? { ok: !1, issues: r } : t;
330
437
  }
331
- function Ae(e) {
332
- var a;
438
+ function Je(e) {
439
+ var n;
333
440
  const t = /* @__PURE__ */ new Set();
334
- if (e.snapshot.resolvedFormats.forEach((i, n) => {
441
+ if (e.snapshot.resolvedFormats.forEach((i, a) => {
335
442
  if (i.format.type !== "temporal_bucket") {
336
443
  if (i.scope.attachmentIndex !== void 0)
337
444
  throw new Error(
338
- `resolvedFormats.${n}.scope.attachmentIndex is not valid for a card export`
445
+ `resolvedFormats.${a}.scope.attachmentIndex is not valid for a card export`
339
446
  );
340
447
  if (i.scope.dashboardId !== e.expectedScope.dashboardId || i.scope.cardId !== e.expectedScope.cardId)
341
448
  throw new Error(
342
- `resolvedFormats.${n}.scope must match the executing dashboard/card`
449
+ `resolvedFormats.${a}.scope must match the executing dashboard/card`
343
450
  );
344
451
  if (i.target.kind !== "column")
345
452
  throw new Error(
346
- `resolvedFormats.${n}.target must identify an export column`
453
+ `resolvedFormats.${a}.target must identify an export column`
347
454
  );
348
455
  if (t.has(i.target.columnKey))
349
456
  throw new Error(
350
- `resolvedFormats.${n} duplicates export column "${i.target.columnKey}"`
457
+ `resolvedFormats.${a} duplicates export column "${i.target.columnKey}"`
351
458
  );
352
459
  t.add(i.target.columnKey);
353
460
  }
354
461
  }), !e.useFormattedValues)
355
462
  return;
356
- if (!((a = e.visibleColumns) != null && a.length))
463
+ if (!((n = e.visibleColumns) != null && n.length))
357
464
  throw new Error(
358
465
  "visibleColumns must identify every formatted export column"
359
466
  );
@@ -365,7 +472,7 @@ function Ae(e) {
365
472
  `resolvedFormats is missing visible export column "${r}"`
366
473
  );
367
474
  }
368
- function se(e, t) {
475
+ function Ne(e, t) {
369
476
  const r = new Intl.NumberFormat(e, {
370
477
  style: "currency",
371
478
  currency: t
@@ -375,7 +482,7 @@ function se(e, t) {
375
482
  maximumFractionDigits: r.maximumFractionDigits
376
483
  };
377
484
  }
378
- function me(e) {
485
+ function _e(e) {
379
486
  if (e.minimumFractionDigits !== void 0 || e.maximumFractionDigits !== void 0) {
380
487
  const r = e.minimumFractionDigits ?? 0;
381
488
  return {
@@ -389,41 +496,41 @@ function me(e) {
389
496
  maximumFractionDigits: t
390
497
  };
391
498
  }
392
- function Ke(e, t, r) {
393
- const a = M(e.locale) ?? t.locale, i = e.type === "number" || e.type === "currency" ? z(r) : void 0;
499
+ function et(e, t, r) {
500
+ const n = I(e.locale) ?? t.locale, i = e.type === "number" || e.type === "currency" ? F(r) : void 0;
394
501
  if (!(e.type === "currency" || i !== void 0))
395
502
  return {
396
503
  ...e,
397
- locale: a,
398
- ...me(e)
504
+ locale: n,
505
+ ..._e(e)
399
506
  };
400
- const c = i ?? z(e.currency) ?? t.defaultCurrency, m = se(
401
- a,
507
+ const c = i ?? F(e.currency) ?? t.defaultCurrency, s = Ne(
508
+ n,
402
509
  c
403
- ), l = m.minimumFractionDigits ?? 0, o = m.maximumFractionDigits ?? l, s = e.minimumFractionDigits ?? Math.min(
404
- l,
405
- e.maximumFractionDigits ?? l
510
+ ), u = s.minimumFractionDigits ?? 0, l = s.maximumFractionDigits ?? u, m = e.minimumFractionDigits ?? Math.min(
511
+ u,
512
+ e.maximumFractionDigits ?? u
406
513
  ), f = e.maximumFractionDigits ?? Math.max(
407
- s,
408
- o
514
+ m,
515
+ l
409
516
  );
410
517
  return {
411
518
  ...e,
412
519
  type: "currency",
413
- locale: a,
520
+ locale: n,
414
521
  currency: c,
415
- minimumFractionDigits: s,
522
+ minimumFractionDigits: m,
416
523
  maximumFractionDigits: f
417
524
  };
418
525
  }
419
526
  class S extends Error {
420
- constructor(r, a) {
421
- super(a);
527
+ constructor(r, n) {
528
+ super(n);
422
529
  b(this, "code");
423
530
  this.name = "RawTemporalFormatContractError", this.code = r;
424
531
  }
425
532
  }
426
- const ue = [
533
+ const Me = [
427
534
  "SSSSSSSSS",
428
535
  "SSSSSSSS",
429
536
  "SSSSSSS",
@@ -433,7 +540,7 @@ const ue = [
433
540
  "SSS",
434
541
  "SS",
435
542
  "S"
436
- ], U = /^(\d{4})-(\d{2})-(\d{2})$/, Z = /^(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,9}))?)?$/, q = /^(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,9}))?)?(Z|[+-]\d{2}:\d{2})$/, oe = [
543
+ ], Y = /^(\d{4})-(\d{2})-(\d{2})$/, X = /^(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,9}))?)?$/, W = /^(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,9}))?)?(Z|[+-]\d{2}:\d{2})$/, Fe = [
437
544
  "yyyy",
438
545
  "MMMM",
439
546
  "LLLL",
@@ -455,7 +562,7 @@ const ue = [
455
562
  "m",
456
563
  "s",
457
564
  "a"
458
- ], le = /* @__PURE__ */ new Set([
565
+ ], ke = /* @__PURE__ */ new Set([
459
566
  "HH",
460
567
  "H",
461
568
  "hh",
@@ -465,90 +572,90 @@ const ue = [
465
572
  "ss",
466
573
  "s",
467
574
  "a",
468
- ...ue
469
- ]), fe = /* @__PURE__ */ new Set(["zzz", "XXX"]), F = /* @__PURE__ */ new Set(["short", "medium", "long"]);
575
+ ...Me
576
+ ]), ze = /* @__PURE__ */ new Set(["zzz", "XXX"]), M = /* @__PURE__ */ new Set(["short", "medium", "long"]);
470
577
  function y(e, t) {
471
- return Object.keys(e).length === t.length && t.every((a) => a in e);
578
+ return Object.keys(e).length === t.length && t.every((n) => n in e);
472
579
  }
473
- function u(e) {
580
+ function o(e) {
474
581
  throw new S(
475
582
  "invalid_raw_temporal_format",
476
583
  e
477
584
  );
478
585
  }
479
- function j(e) {
586
+ function Q(e) {
480
587
  if (!e || e.trim() !== e || e.length > 256)
481
- return u(
588
+ return o(
482
589
  "date_fns patterns must be non-empty, trimmed, and at most 256 characters."
483
590
  );
484
591
  const t = [], r = (i) => {
485
- const n = t[t.length - 1];
486
- (n == null ? void 0 : n.kind) === "literal" ? n.value += i : t.push({ kind: "literal", value: i });
592
+ const a = t[t.length - 1];
593
+ (a == null ? void 0 : a.kind) === "literal" ? a.value += i : t.push({ kind: "literal", value: i });
487
594
  };
488
- let a = 0;
489
- for (; a < e.length; ) {
490
- if (e[a] === "'") {
491
- if (e[a + 1] === "'") {
492
- r("'"), a += 2;
595
+ let n = 0;
596
+ for (; n < e.length; ) {
597
+ if (e[n] === "'") {
598
+ if (e[n + 1] === "'") {
599
+ r("'"), n += 2;
493
600
  continue;
494
601
  }
495
- let c = "", m = !1;
496
- for (a += 1; a < e.length; ) {
497
- if (e[a] === "'") {
498
- if (e[a + 1] === "'") {
499
- c += "'", a += 2;
602
+ let c = "", s = !1;
603
+ for (n += 1; n < e.length; ) {
604
+ if (e[n] === "'") {
605
+ if (e[n + 1] === "'") {
606
+ c += "'", n += 2;
500
607
  continue;
501
608
  }
502
- m = !0, a += 1;
609
+ s = !0, n += 1;
503
610
  break;
504
611
  }
505
- c += e[a], a += 1;
612
+ c += e[n], n += 1;
506
613
  }
507
- if (!m)
508
- return u("date_fns pattern has an unclosed quote.");
614
+ if (!s)
615
+ return o("date_fns pattern has an unclosed quote.");
509
616
  r(c);
510
617
  continue;
511
618
  }
512
- if (e[a] === "S") {
513
- let c = a + 1;
619
+ if (e[n] === "S") {
620
+ let c = n + 1;
514
621
  for (; e[c] === "S"; ) c += 1;
515
- const m = e.slice(a, c);
516
- if (m.length > 9)
517
- return u(
622
+ const s = e.slice(n, c);
623
+ if (s.length > 9)
624
+ return o(
518
625
  "date_fns fractional-second tokens support at most nine digits."
519
626
  );
520
627
  t.push({
521
628
  kind: "token",
522
- value: m
523
- }), a = c;
629
+ value: s
630
+ }), n = c;
524
631
  continue;
525
632
  }
526
- const i = oe.find(
527
- (c) => e.startsWith(c, a)
633
+ const i = Fe.find(
634
+ (c) => e.startsWith(c, n)
528
635
  );
529
636
  if (i) {
530
- t.push({ kind: "token", value: i }), a += i.length;
637
+ t.push({ kind: "token", value: i }), n += i.length;
531
638
  continue;
532
639
  }
533
- const n = e[a];
534
- if (/[A-Za-z]/.test(n))
535
- return u(
536
- `Unsupported date_fns pattern token beginning at "${e.slice(a)}".`
640
+ const a = e[n];
641
+ if (/[A-Za-z]/.test(a))
642
+ return o(
643
+ `Unsupported date_fns pattern token beginning at "${e.slice(n)}".`
537
644
  );
538
- r(n), a += 1;
645
+ r(a), n += 1;
539
646
  }
540
- return t.some((i) => i.kind === "token") ? t : u("date_fns patterns must contain at least one token.");
647
+ return t.some((i) => i.kind === "token") ? t : o("date_fns patterns must contain at least one token.");
541
648
  }
542
- function B(e, t) {
649
+ function J(e, t) {
543
650
  if (e === "semaphor_tokens") {
544
- const r = L(t);
545
- r.ok || u(r.message);
651
+ const r = K(t);
652
+ r.ok || o(r.message);
546
653
  return;
547
654
  }
548
- j(t);
655
+ Q(t);
549
656
  }
550
- function de(e) {
551
- return !g(e) || !y(e, ["dateStyle", "dateTime"]) ? u("Automatic raw temporal styles are incomplete.") : F.has(e.dateStyle) ? !g(e.dateTime) || !y(e.dateTime, ["dateStyle", "timeStyle"]) || !F.has(e.dateTime.dateStyle) || !F.has(e.dateTime.timeStyle) ? u(
657
+ function $e(e) {
658
+ return !g(e) || !y(e, ["dateStyle", "dateTime"]) ? o("Automatic raw temporal styles are incomplete.") : M.has(e.dateStyle) ? !g(e.dateTime) || !y(e.dateTime, ["dateStyle", "timeStyle"]) || !M.has(e.dateTime.dateStyle) || !M.has(e.dateTime.timeStyle) ? o(
552
659
  "Automatic dateTime styles are incomplete or invalid."
553
660
  ) : {
554
661
  dateStyle: e.dateStyle,
@@ -556,33 +663,33 @@ function de(e) {
556
663
  dateStyle: e.dateTime.dateStyle,
557
664
  timeStyle: e.dateTime.timeStyle
558
665
  }
559
- } : u("Automatic dateStyle is invalid.");
666
+ } : o("Automatic dateStyle is invalid.");
560
667
  }
561
- function H(e) {
668
+ function ee(e) {
562
669
  const t = ["type", "locale", "calendarTimezone", "presentation"], r = [...t, "sourceTimezone"];
563
670
  if (!g(e) || !y(e, t) && !y(e, r) || e.type !== "raw_temporal")
564
- return u("Resolved raw temporal format has an invalid shape.");
565
- const a = M(e.locale);
566
- return a ? typeof e.calendarTimezone != "string" || !T(e.calendarTimezone) ? u(
671
+ return o("Resolved raw temporal format has an invalid shape.");
672
+ const n = I(e.locale);
673
+ return n ? typeof e.calendarTimezone != "string" || !D(e.calendarTimezone) ? o(
567
674
  "Raw temporal calendarTimezone must be a valid IANA timezone."
568
- ) : e.sourceTimezone !== void 0 && (typeof e.sourceTimezone != "string" || !T(e.sourceTimezone)) ? u(
675
+ ) : e.sourceTimezone !== void 0 && (typeof e.sourceTimezone != "string" || !D(e.sourceTimezone)) ? o(
569
676
  "Raw temporal sourceTimezone must be a valid IANA timezone."
570
677
  ) : g(e.presentation) ? e.presentation.mode === "auto" ? y(e.presentation, ["mode", "styles"]) ? {
571
678
  type: "raw_temporal",
572
- locale: a,
679
+ locale: n,
573
680
  calendarTimezone: e.calendarTimezone,
574
681
  ...e.sourceTimezone ? { sourceTimezone: e.sourceTimezone } : {},
575
682
  presentation: {
576
683
  mode: "auto",
577
- styles: de(e.presentation.styles)
684
+ styles: $e(e.presentation.styles)
578
685
  }
579
- } : u(
686
+ } : o(
580
687
  "Automatic raw temporal presentation has unknown fields."
581
- ) : e.presentation.mode !== "pattern" || !y(e.presentation, ["mode", "dialect", "pattern"]) || e.presentation.dialect !== "semaphor_tokens" && e.presentation.dialect !== "date_fns" || typeof e.presentation.pattern != "string" ? u(
688
+ ) : e.presentation.mode !== "pattern" || !y(e.presentation, ["mode", "dialect", "pattern"]) || e.presentation.dialect !== "semaphor_tokens" && e.presentation.dialect !== "date_fns" || typeof e.presentation.pattern != "string" ? o(
582
689
  "Pattern raw temporal presentation has an invalid shape."
583
- ) : (B(e.presentation.dialect, e.presentation.pattern), {
690
+ ) : (J(e.presentation.dialect, e.presentation.pattern), {
584
691
  type: "raw_temporal",
585
- locale: a,
692
+ locale: n,
586
693
  calendarTimezone: e.calendarTimezone,
587
694
  ...e.sourceTimezone ? { sourceTimezone: e.sourceTimezone } : {},
588
695
  presentation: {
@@ -590,45 +697,45 @@ function H(e) {
590
697
  dialect: e.presentation.dialect,
591
698
  pattern: e.presentation.pattern
592
699
  }
593
- }) : u("Raw temporal presentation must be an object.") : u("Raw temporal locale is invalid or unsupported.");
700
+ }) : o("Raw temporal presentation must be an object.") : o("Raw temporal locale is invalid or unsupported.");
594
701
  }
595
- function Le(e) {
596
- var m, l, o;
702
+ function tt(e) {
703
+ var s, u, l;
597
704
  if (e.format) {
598
705
  if (!g(e.format))
599
- return u(
706
+ return o(
600
707
  "Authored raw temporal format has an invalid shape."
601
708
  );
602
- const s = Object.keys(e.format);
603
- if (!s.includes("type") || !s.includes("presentation") || s.some(
709
+ const m = Object.keys(e.format);
710
+ if (!m.includes("type") || !m.includes("presentation") || m.some(
604
711
  (d) => d !== "type" && d !== "presentation" && d !== "timezone" && d !== "sourceTimezone"
605
712
  ) || e.format.type !== "raw_temporal" || !g(e.format.presentation))
606
- return u(
713
+ return o(
607
714
  "Authored raw temporal format has an invalid shape."
608
715
  );
609
716
  const f = e.format.presentation;
610
717
  if (f.mode === "auto") {
611
718
  if (!y(f, ["mode"]))
612
- return u(
719
+ return o(
613
720
  "Automatic authored raw temporal format has unknown fields."
614
721
  );
615
722
  } else {
616
723
  if (f.mode !== "pattern" || !y(f, ["mode", "dialect", "pattern"]) || f.dialect !== "semaphor_tokens" && f.dialect !== "date_fns" || typeof f.pattern != "string")
617
- return u(
724
+ return o(
618
725
  "Authored raw temporal pattern has an invalid shape."
619
726
  );
620
- B(f.dialect, f.pattern);
727
+ J(f.dialect, f.pattern);
621
728
  }
622
729
  }
623
- const t = (m = e.format) == null ? void 0 : m.timezone, r = (l = e.format) == null ? void 0 : l.sourceTimezone, a = t && t !== "auto" ? t : e.calendar.tz, i = r && r !== "auto" ? r === "local" ? Intl.DateTimeFormat().resolvedOptions().timeZone : r : void 0;
624
- if (t !== void 0 && t !== "auto" && !T(a) || i !== void 0 && !T(i))
625
- return u("Authored raw temporal timezone is invalid.");
626
- const n = ((o = e.format) == null ? void 0 : o.presentation) ?? { mode: "auto" }, c = {
730
+ const t = (s = e.format) == null ? void 0 : s.timezone, r = (u = e.format) == null ? void 0 : u.sourceTimezone, n = t && t !== "auto" ? t : e.calendar.tz, i = r && r !== "auto" ? r === "local" ? Intl.DateTimeFormat().resolvedOptions().timeZone : r : void 0;
731
+ if (t !== void 0 && t !== "auto" && !D(n) || i !== void 0 && !D(i))
732
+ return o("Authored raw temporal timezone is invalid.");
733
+ const a = ((l = e.format) == null ? void 0 : l.presentation) ?? { mode: "auto" }, c = {
627
734
  type: "raw_temporal",
628
735
  locale: e.preferences.locale,
629
- calendarTimezone: a,
736
+ calendarTimezone: n,
630
737
  ...i ? { sourceTimezone: i } : {},
631
- presentation: n.mode === "pattern" ? { ...n } : {
738
+ presentation: a.mode === "pattern" ? { ...a } : {
632
739
  mode: "auto",
633
740
  styles: {
634
741
  dateStyle: e.preferences.dateStyle,
@@ -636,20 +743,20 @@ function Le(e) {
636
743
  }
637
744
  }
638
745
  };
639
- return H(c);
746
+ return ee(c);
640
747
  }
641
- function ge(e) {
642
- if (U.test(e)) return "date";
643
- if (q.test(e)) return "instant";
644
- if (Z.test(e)) return "wall_datetime";
748
+ function Ie(e) {
749
+ if (Y.test(e)) return "date";
750
+ if (W.test(e)) return "instant";
751
+ if (X.test(e)) return "wall_datetime";
645
752
  }
646
- function Ve(e) {
753
+ function rt(e) {
647
754
  const t = /* @__PURE__ */ new Set();
648
755
  let r = !1;
649
- for (const a of e.values) {
650
- if (a === null) continue;
756
+ for (const n of e.values) {
757
+ if (n === null) continue;
651
758
  r = !0;
652
- const i = ge(a);
759
+ const i = Ie(n);
653
760
  i && t.add(i);
654
761
  }
655
762
  if (!r) return { status: "empty" };
@@ -667,7 +774,7 @@ function Ve(e) {
667
774
  }
668
775
  };
669
776
  }
670
- function Oe(e) {
777
+ function nt(e) {
671
778
  return {
672
779
  version: 1,
673
780
  columns: Object.fromEntries(
@@ -678,8 +785,8 @@ function Oe(e) {
678
785
  )
679
786
  };
680
787
  }
681
- function ye(e) {
682
- if (!g(e) || e.version !== 1 || !g(e.columns) || Object.keys(e).some((a) => a !== "version" && a !== "columns"))
788
+ function Ee(e) {
789
+ if (!g(e) || e.version !== 1 || !g(e.columns) || Object.keys(e).some((n) => n !== "version" && n !== "columns"))
683
790
  throw new S(
684
791
  "invalid_raw_temporal_format",
685
792
  "Raw temporal chunk classification evidence is malformed."
@@ -691,48 +798,48 @@ function ye(e) {
691
798
  "wall_datetime",
692
799
  "instant"
693
800
  ]);
694
- for (const [a, i] of Object.entries(e.columns)) {
695
- if (!a.trim() || !r.has(i))
801
+ for (const [n, i] of Object.entries(e.columns)) {
802
+ if (!n.trim() || !r.has(i))
696
803
  throw new S(
697
804
  "invalid_raw_temporal_format",
698
805
  "Raw temporal chunk classification evidence contains an invalid column or status."
699
806
  );
700
- t[a] = i;
807
+ t[n] = i;
701
808
  }
702
809
  return { version: 1, columns: t };
703
810
  }
704
- function pe(e) {
811
+ function at(e) {
705
812
  if (e.length === 0) return;
706
- const t = e.map(ye), r = Object.keys(t[0].columns).sort();
707
- for (let a = 1; a < t.length; a += 1) {
708
- const i = Object.keys(t[a].columns).sort();
709
- if (i.length !== r.length || i.some((n, c) => n !== r[c]))
813
+ const t = e.map(Ee), r = Object.keys(t[0].columns).sort();
814
+ for (let n = 1; n < t.length; n += 1) {
815
+ const i = Object.keys(t[n].columns).sort();
816
+ if (i.length !== r.length || i.some((a, c) => a !== r[c]))
710
817
  throw new S(
711
818
  "invalid_raw_temporal_format",
712
819
  "Raw temporal chunk classification evidence has inconsistent columns."
713
820
  );
714
821
  }
715
- for (const a of r)
822
+ for (const n of r)
716
823
  if (new Set(
717
- t.map((n) => n.columns[a]).filter(
718
- (n) => n !== "empty" && n !== "invalid_only"
824
+ t.map((a) => a.columns[n]).filter(
825
+ (a) => a !== "empty" && a !== "invalid_only"
719
826
  )
720
827
  ).size > 1)
721
828
  throw new S(
722
829
  "mixed_sql_temporal_semantics",
723
- `Declared SQL temporal column "${a}" has inconsistent semantics across export chunks. Normalize it to one kind.`
830
+ `Declared SQL temporal column "${n}" has inconsistent semantics across export chunks. Normalize it to one kind.`
724
831
  );
725
832
  }
726
- function he(e) {
833
+ function be(e) {
727
834
  return e % 4 === 0 && (e % 100 !== 0 || e % 400 === 0);
728
835
  }
729
- function Se(e, t) {
730
- return t === 2 ? he(e) ? 29 : 28 : [4, 6, 9, 11].includes(t) ? 30 : 31;
836
+ function Pe(e, t) {
837
+ return t === 2 ? be(e) ? 29 : 28 : [4, 6, 9, 11].includes(t) ? 30 : 31;
731
838
  }
732
- function we(e) {
733
- return e.year >= 1 && e.year <= 9999 && e.month >= 1 && e.month <= 12 && e.day >= 1 && e.day <= Se(e.year, e.month) && e.hour >= 0 && e.hour <= 23 && e.minute >= 0 && e.minute <= 59 && e.second >= 0 && e.second <= 59;
839
+ function Ce(e) {
840
+ return e.year >= 1 && e.year <= 9999 && e.month >= 1 && e.month <= 12 && e.day >= 1 && e.day <= Pe(e.year, e.month) && e.hour >= 0 && e.hour <= 23 && e.minute >= 0 && e.minute <= 59 && e.second >= 0 && e.second <= 59;
734
841
  }
735
- function xe(e) {
842
+ function Re(e) {
736
843
  return {
737
844
  year: Number(e[1]),
738
845
  month: Number(e[2]),
@@ -743,70 +850,70 @@ function xe(e) {
743
850
  fraction: e[7] ?? ""
744
851
  };
745
852
  }
746
- function ve(e, t) {
747
- const r = t === "date" ? e.match(U) : t === "wall_datetime" ? e.match(Z) : e.match(q);
853
+ function Ae(e, t) {
854
+ const r = t === "date" ? e.match(Y) : t === "wall_datetime" ? e.match(X) : e.match(W);
748
855
  if (!r) return { status: "invalid_shape" };
749
- const a = xe(r);
750
- if (!we(a)) return { status: "out_of_range" };
856
+ const n = Re(r);
857
+ if (!Ce(n)) return { status: "out_of_range" };
751
858
  if (t === "instant") {
752
859
  const i = r[8];
753
860
  if (i && i !== "Z") {
754
- const [c, m] = i.slice(1).split(":").map(Number);
755
- if (c > 23 || m > 59) return { status: "out_of_range" };
861
+ const [c, s] = i.slice(1).split(":").map(Number);
862
+ if (c > 23 || s > 59) return { status: "out_of_range" };
756
863
  }
757
- const n = new Date(e.replace(" ", "T"));
758
- return Number.isNaN(n.getTime()) ? { status: "out_of_range" } : { status: "valid", fields: a, instant: n };
864
+ const a = new Date(e.replace(" ", "T"));
865
+ return Number.isNaN(a.getTime()) ? { status: "out_of_range" } : { status: "valid", fields: n, instant: a };
759
866
  }
760
- return { status: "valid", fields: a };
867
+ return { status: "valid", fields: n };
761
868
  }
762
- function E(e) {
869
+ function $(e) {
763
870
  const t = /* @__PURE__ */ new Date(0);
764
871
  return t.setUTCFullYear(e.year, e.month - 1, e.day), t.setUTCHours(e.hour, e.minute, e.second, 0), t;
765
872
  }
766
- function Y(e, t) {
873
+ function te(e, t) {
767
874
  const r = e.fraction ? `.${e.fraction.padEnd(3, "0").slice(0, 3)}` : "";
768
- return te(
875
+ return se(
769
876
  `${String(e.year).padStart(4, "0")}-${String(e.month).padStart(2, "0")}-${String(e.day).padStart(2, "0")}T${String(e.hour).padStart(2, "0")}:${String(e.minute).padStart(2, "0")}:${String(e.second).padStart(2, "0")}${r}`,
770
877
  t
771
878
  );
772
879
  }
773
- function Te(e, t) {
774
- const r = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map();
775
- let i, n, c, m;
880
+ function Le(e, t) {
881
+ const r = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map();
882
+ let i, a, c, s;
776
883
  return {
777
- number(l, o = 1) {
778
- let s = r.get(o);
779
- return s || (s = new Intl.NumberFormat(e, {
884
+ number(u, l = 1) {
885
+ let m = r.get(l);
886
+ return m || (m = new Intl.NumberFormat(e, {
780
887
  useGrouping: !1,
781
- minimumIntegerDigits: o,
888
+ minimumIntegerDigits: l,
782
889
  maximumFractionDigits: 0
783
- }), r.set(o, s)), s.format(l);
890
+ }), r.set(l, m)), m.format(u);
784
891
  },
785
- month(l, o, s) {
786
- var x;
787
- const f = `${o}:${s ? "standalone" : "contextual"}`;
788
- let d = a.get(f);
892
+ month(u, l, m) {
893
+ var w;
894
+ const f = `${l}:${m ? "standalone" : "contextual"}`;
895
+ let d = n.get(f);
789
896
  if (!d) {
790
897
  const v = {
791
898
  calendar: "gregory",
792
899
  timeZone: "UTC",
793
- month: o
900
+ month: l
794
901
  };
795
- s || (v.day = "numeric"), d = new Intl.DateTimeFormat(e, v), a.set(f, d);
902
+ m || (v.day = "numeric"), d = new Intl.DateTimeFormat(e, v), n.set(f, d);
796
903
  }
797
- return ((x = d.formatToParts(l).find((v) => v.type === "month")) == null ? void 0 : x.value) ?? "";
904
+ return ((w = d.formatToParts(u).find((v) => v.type === "month")) == null ? void 0 : w.value) ?? "";
798
905
  },
799
- dayPeriod(l) {
800
- var o;
906
+ dayPeriod(u) {
907
+ var l;
801
908
  return i ?? (i = new Intl.DateTimeFormat(e, {
802
909
  calendar: "gregory",
803
910
  timeZone: "UTC",
804
911
  hour: "numeric",
805
912
  hour12: !0
806
- })), ((o = i.formatToParts(l).find((s) => s.type === "dayPeriod")) == null ? void 0 : o.value) ?? "";
913
+ })), ((l = i.formatToParts(u).find((m) => m.type === "dayPeriod")) == null ? void 0 : l.value) ?? "";
807
914
  },
808
- instantFields(l) {
809
- n ?? (n = new Intl.DateTimeFormat("en-CA", {
915
+ instantFields(u) {
916
+ a ?? (a = new Intl.DateTimeFormat("en-CA", {
810
917
  calendar: "gregory",
811
918
  numberingSystem: "latn",
812
919
  timeZone: t,
@@ -818,160 +925,160 @@ function Te(e, t) {
818
925
  second: "2-digit",
819
926
  hourCycle: "h23"
820
927
  }));
821
- const o = n.formatToParts(l), s = (f) => {
928
+ const l = a.formatToParts(u), m = (f) => {
822
929
  var d;
823
- return Number((d = o.find((x) => x.type === f)) == null ? void 0 : d.value);
930
+ return Number((d = l.find((w) => w.type === f)) == null ? void 0 : d.value);
824
931
  };
825
932
  return {
826
- year: s("year"),
827
- month: s("month"),
828
- day: s("day"),
829
- hour: s("hour"),
830
- minute: s("minute"),
831
- second: s("second"),
933
+ year: m("year"),
934
+ month: m("month"),
935
+ day: m("day"),
936
+ hour: m("hour"),
937
+ minute: m("minute"),
938
+ second: m("second"),
832
939
  fraction: ""
833
940
  };
834
941
  },
835
- timezoneName(l) {
836
- var o;
942
+ timezoneName(u) {
943
+ var l;
837
944
  return c ?? (c = new Intl.DateTimeFormat(e, {
838
945
  calendar: "gregory",
839
946
  timeZone: t,
840
947
  timeZoneName: "short"
841
- })), ((o = c.formatToParts(l).find((s) => s.type === "timeZoneName")) == null ? void 0 : o.value) ?? "";
948
+ })), ((l = c.formatToParts(u).find((m) => m.type === "timeZoneName")) == null ? void 0 : l.value) ?? "";
842
949
  },
843
- timezoneOffset(l) {
950
+ timezoneOffset(u) {
844
951
  var f;
845
- m ?? (m = new Intl.DateTimeFormat("en-US", {
952
+ s ?? (s = new Intl.DateTimeFormat("en-US", {
846
953
  calendar: "gregory",
847
954
  timeZone: t,
848
955
  timeZoneName: "longOffset"
849
956
  }));
850
- const o = (f = m.formatToParts(l).find((d) => d.type === "timeZoneName")) == null ? void 0 : f.value;
851
- if (!o)
852
- return u("Unable to resolve the instant timezone offset.");
853
- const s = o.replace(/^GMT/, "");
854
- return s === "" || /^[+-]00:00$/.test(s) ? "Z" : s;
957
+ const l = (f = s.formatToParts(u).find((d) => d.type === "timeZoneName")) == null ? void 0 : f.value;
958
+ if (!l)
959
+ return o("Unable to resolve the instant timezone offset.");
960
+ const m = l.replace(/^GMT/, "");
961
+ return m === "" || /^[+-]00:00$/.test(m) ? "Z" : m;
855
962
  }
856
963
  };
857
964
  }
858
- function De(e, t, r, a, i) {
965
+ function Ue(e, t, r, n, i) {
859
966
  if (/^S{1,9}$/.test(e)) {
860
- const n = t.fraction.padEnd(e.length, "0").slice(0, e.length);
861
- return a.number(Number(n), e.length);
967
+ const a = t.fraction.padEnd(e.length, "0").slice(0, e.length);
968
+ return n.number(Number(a), e.length);
862
969
  }
863
970
  switch (e) {
864
971
  case "YYYY":
865
972
  case "yyyy":
866
- return a.number(t.year, 4);
973
+ return n.number(t.year, 4);
867
974
  case "YY":
868
975
  case "yy":
869
- return a.number(t.year % 100, 2);
976
+ return n.number(t.year % 100, 2);
870
977
  case "MMMM":
871
- return a.month(r, "long", !1);
978
+ return n.month(r, "long", !1);
872
979
  case "LLLL":
873
- return a.month(r, "long", !0);
980
+ return n.month(r, "long", !0);
874
981
  case "MMM":
875
- return a.month(r, "short", !1);
982
+ return n.month(r, "short", !1);
876
983
  case "LLL":
877
- return a.month(r, "short", !0);
984
+ return n.month(r, "short", !0);
878
985
  case "MM":
879
- return a.number(t.month, 2);
986
+ return n.number(t.month, 2);
880
987
  case "M":
881
- return a.number(t.month);
988
+ return n.number(t.month);
882
989
  case "DD":
883
990
  case "dd":
884
- return a.number(t.day, 2);
991
+ return n.number(t.day, 2);
885
992
  case "d":
886
- return a.number(t.day);
993
+ return n.number(t.day);
887
994
  case "HH":
888
- return a.number(t.hour, 2);
995
+ return n.number(t.hour, 2);
889
996
  case "H":
890
- return a.number(t.hour);
997
+ return n.number(t.hour);
891
998
  case "hh":
892
- return a.number(t.hour % 12 || 12, 2);
999
+ return n.number(t.hour % 12 || 12, 2);
893
1000
  case "h":
894
- return a.number(t.hour % 12 || 12);
1001
+ return n.number(t.hour % 12 || 12);
895
1002
  case "mm":
896
- return a.number(t.minute, 2);
1003
+ return n.number(t.minute, 2);
897
1004
  case "m":
898
- return a.number(t.minute);
1005
+ return n.number(t.minute);
899
1006
  case "ss":
900
- return a.number(t.second, 2);
1007
+ return n.number(t.second, 2);
901
1008
  case "s":
902
- return a.number(t.second);
1009
+ return n.number(t.second);
903
1010
  case "a":
904
- return a.dayPeriod(r);
1011
+ return n.dayPeriod(r);
905
1012
  case "zzz":
906
- return i ? a.timezoneName(i) : u(
1013
+ return i ? n.timezoneName(i) : o(
907
1014
  "Timezone pattern tokens require an instant value."
908
1015
  );
909
1016
  case "XXX":
910
- return i ? a.timezoneOffset(i) : u(
1017
+ return i ? n.timezoneOffset(i) : o(
911
1018
  "Timezone pattern tokens require an instant value."
912
1019
  );
913
1020
  default:
914
- return u(
1021
+ return o(
915
1022
  `Unsupported raw temporal pattern token "${e}".`
916
1023
  );
917
1024
  }
918
1025
  }
919
- function _e(e, t, r, a) {
920
- const i = E(t);
1026
+ function pe(e, t, r, n) {
1027
+ const i = $(t);
921
1028
  return e.map(
922
- (n) => n.kind === "literal" ? n.value : De(n.value, t, i, r, a)
1029
+ (a) => a.kind === "literal" ? a.value : Ue(a.value, t, i, r, n)
923
1030
  ).join("");
924
1031
  }
925
- function X(e, t, r) {
926
- const a = t === "date_fns" ? j(r) : (() => {
927
- const n = L(r);
928
- return n.ok ? n.segments : u(n.message);
929
- })(), i = a.filter((n) => n.kind === "token").map((n) => n.value);
930
- return e === "date" && i.some((n) => le.has(n)) ? u("Date patterns cannot contain time tokens.") : e !== "instant" && i.some((n) => fe.has(n)) ? u("Timezone pattern tokens require an instant value.") : a;
1032
+ function re(e, t, r) {
1033
+ const n = t === "date_fns" ? Q(r) : (() => {
1034
+ const a = K(r);
1035
+ return a.ok ? a.segments : o(a.message);
1036
+ })(), i = n.filter((a) => a.kind === "token").map((a) => a.value);
1037
+ return e === "date" && i.some((a) => ke.has(a)) ? o("Date patterns cannot contain time tokens.") : e !== "instant" && i.some((a) => ze.has(a)) ? o("Timezone pattern tokens require an instant value.") : n;
931
1038
  }
932
- function Ge(e) {
933
- X(
1039
+ function it(e) {
1040
+ re(
934
1041
  e.valueKind ?? "instant",
935
1042
  e.dialect,
936
1043
  e.pattern
937
1044
  );
938
1045
  }
939
- function Ne(e, t, r, a) {
940
- const i = X(
1046
+ function Ke(e, t, r, n) {
1047
+ const i = re(
941
1048
  e.valueKind,
942
1049
  r,
943
- a
944
- ), n = Te(t.locale, t.calendarTimezone);
1050
+ n
1051
+ ), a = Le(t.locale, t.calendarTimezone);
945
1052
  return (c) => {
946
- const m = e.valueKind === "wall_datetime" && t.sourceTimezone ? Y(c.fields, t.sourceTimezone) : void 0, l = e.valueKind === "instant" ? {
947
- ...n.instantFields(c.instant),
1053
+ const s = e.valueKind === "wall_datetime" && t.sourceTimezone ? te(c.fields, t.sourceTimezone) : void 0, u = e.valueKind === "instant" ? {
1054
+ ...a.instantFields(c.instant),
948
1055
  fraction: c.fields.fraction
949
- } : m ? {
950
- ...n.instantFields(m),
1056
+ } : s ? {
1057
+ ...a.instantFields(s),
951
1058
  fraction: c.fields.fraction
952
1059
  } : c.fields;
953
- return _e(i, l, n, c.instant ?? m);
1060
+ return pe(i, u, a, c.instant ?? s);
954
1061
  };
955
1062
  }
956
- function Fe(e, t) {
957
- const r = t.presentation.mode === "auto" ? t.presentation.styles : u("Automatic raw temporal formatting requires styles.");
1063
+ function Oe(e, t) {
1064
+ const r = t.presentation.mode === "auto" ? t.presentation.styles : o("Automatic raw temporal formatting requires styles.");
958
1065
  if (e.valueKind === "date") {
959
1066
  const c = new Intl.DateTimeFormat(t.locale, {
960
1067
  calendar: "gregory",
961
1068
  timeZone: "UTC",
962
1069
  dateStyle: r.dateStyle
963
1070
  });
964
- return (m) => c.format(E(m.fields));
1071
+ return (s) => c.format($(s.fields));
965
1072
  }
966
- const a = e.valueKind === "instant", i = !a && r.dateTime.timeStyle === "long" ? "medium" : r.dateTime.timeStyle, n = new Intl.DateTimeFormat(t.locale, {
1073
+ const n = e.valueKind === "instant", i = !n && r.dateTime.timeStyle === "long" ? "medium" : r.dateTime.timeStyle, a = new Intl.DateTimeFormat(t.locale, {
967
1074
  calendar: "gregory",
968
- timeZone: a || e.valueKind === "wall_datetime" && t.sourceTimezone ? t.calendarTimezone : "UTC",
1075
+ timeZone: n || e.valueKind === "wall_datetime" && t.sourceTimezone ? t.calendarTimezone : "UTC",
969
1076
  dateStyle: r.dateTime.dateStyle,
970
1077
  timeStyle: i
971
1078
  });
972
- return (c) => a ? n.format(c.instant) : e.valueKind === "wall_datetime" && t.sourceTimezone ? n.format(Y(c.fields, t.sourceTimezone)) : n.format(E(c.fields));
1079
+ return (c) => n ? a.format(c.instant) : e.valueKind === "wall_datetime" && t.sourceTimezone ? a.format(te(c.fields, t.sourceTimezone)) : a.format($(c.fields));
973
1080
  }
974
- function A(e, t, r) {
1081
+ function U(e, t, r) {
975
1082
  return {
976
1083
  ok: !1,
977
1084
  text: e,
@@ -981,8 +1088,8 @@ function A(e, t, r) {
981
1088
  }
982
1089
  };
983
1090
  }
984
- function ze(e) {
985
- const t = ee(e.metadata), r = H(e.format), a = r.presentation.mode === "auto" ? Fe(t, r) : Ne(
1091
+ function Ve(e) {
1092
+ const t = ce(e.metadata), r = ee(e.format), n = r.presentation.mode === "auto" ? Oe(t, r) : Ke(
986
1093
  t,
987
1094
  r,
988
1095
  r.presentation.dialect,
@@ -991,37 +1098,40 @@ function ze(e) {
991
1098
  return (i) => {
992
1099
  if (i === null)
993
1100
  return { ok: !0, text: "", status: "empty" };
994
- const n = ve(i, t.valueKind);
995
- return n.status === "invalid_shape" ? A(i, t, "invalid_raw_temporal_value") : n.status === "out_of_range" ? A(i, t, "out_of_range_raw_temporal_value") : { ok: !0, text: a(n), status: "formatted" };
1101
+ const a = Ae(i, t.valueKind);
1102
+ return a.status === "invalid_shape" ? U(i, t, "invalid_raw_temporal_value") : a.status === "out_of_range" ? U(i, t, "out_of_range_raw_temporal_value") : { ok: !0, text: n(a), status: "formatted" };
996
1103
  };
997
1104
  }
998
- function Ue(e) {
999
- return ze({
1105
+ function ct(e) {
1106
+ return Ve({
1000
1107
  metadata: e.metadata,
1001
1108
  format: e.format
1002
1109
  })(e.value);
1003
1110
  }
1004
1111
  export {
1005
1112
  S as R,
1006
- H as a,
1007
- ne as b,
1008
- $ as c,
1009
- O as d,
1010
- p as e,
1011
- Ce as f,
1012
- G as g,
1013
- Pe as h,
1014
- ce as i,
1015
- Ke as j,
1016
- Le as k,
1017
- Ve as l,
1018
- Oe as m,
1019
- ye as n,
1020
- pe as o,
1021
- Re as p,
1022
- Ge as q,
1023
- se as r,
1024
- ze as s,
1025
- Ue as t,
1026
- Ae as v
1113
+ ee as a,
1114
+ Ye as b,
1115
+ E as c,
1116
+ j as d,
1117
+ q as e,
1118
+ Xe as f,
1119
+ B as g,
1120
+ H as h,
1121
+ We as i,
1122
+ xe as j,
1123
+ G as k,
1124
+ Te as l,
1125
+ et as m,
1126
+ tt as n,
1127
+ rt as o,
1128
+ Qe as p,
1129
+ nt as q,
1130
+ Ne as r,
1131
+ Ee as s,
1132
+ at as t,
1133
+ it as u,
1134
+ Je as v,
1135
+ Ve as w,
1136
+ ct as x
1027
1137
  };