react-semaphor 0.1.540 → 0.1.541

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 (34) hide show
  1. package/dist/assistant-context/index.js +1 -1
  2. package/dist/briefings/index.js +41 -38
  3. package/dist/chunks/{aggregate-table-row-presentation-BjK9YfMI.js → aggregate-table-row-presentation-B_vQjYR3.js} +319 -302
  4. package/dist/chunks/{assistant-chat-ya7xopaC.js → assistant-chat-D1fDZD6O.js} +3 -3
  5. package/dist/chunks/{dashboard-B6Bithfl.js → dashboard-B6IrON_Q.js} +1 -1
  6. package/dist/chunks/{dashboard-briefing-launcher-DJI-zfEq.js → dashboard-briefing-launcher-DwjFpewq.js} +4 -4
  7. package/dist/chunks/{dashboard-controls-Dh7HqoKy.js → dashboard-controls-C_BI28ME.js} +5 -5
  8. package/dist/chunks/{dashboard-json-BnmlB71h.js → dashboard-json-DDY15Trn.js} +1 -1
  9. package/dist/chunks/{document-dashboard-inputs-BrYYlRVo.js → document-dashboard-inputs-DP_Op5mu.js} +1168 -1166
  10. package/dist/chunks/{edit-dashboard-visual-CydOkSko.js → edit-dashboard-visual-CH2dzWW-.js} +4 -4
  11. package/dist/chunks/{index-CqMiAkay.js → index-DaQlghLY.js} +547 -511
  12. package/dist/chunks/{report-preferences-dialog-neMDolLg.js → report-preferences-dialog-DpNkFfQO.js} +5 -5
  13. package/dist/chunks/{saved-dashboard-context-CCrLpfSQ.js → saved-dashboard-context-CJ2WpoMF.js} +1 -1
  14. package/dist/chunks/{semaphor-ready-indicator--4DWtVBu.js → semaphor-ready-indicator-KT598QJq.js} +29621 -29528
  15. package/dist/chunks/{shelf-drop-preview-context-CpdB5ois.js → shelf-drop-preview-context-BxV3Fl8h.js} +2 -2
  16. package/dist/chunks/{use-create-flow-overlay-state-8g6Zhphh.js → use-create-flow-overlay-state-DdD12SMY.js} +2 -2
  17. package/dist/dashboard/index.js +1 -1
  18. package/dist/dashboard-authoring/index.js +582 -568
  19. package/dist/format-utils/index.js +117 -114
  20. package/dist/index.js +10 -10
  21. package/dist/pdf-export-policy/index.js +20 -10
  22. package/dist/surfboard/index.js +1 -1
  23. package/dist/types/briefings/attachment-outcomes.d.ts +23 -0
  24. package/dist/types/briefings/index.d.ts +1 -0
  25. package/dist/types/lib/hooks/use-dashboard-card.d.ts +2 -0
  26. package/dist/types/lib/query-context/card-server-request.d.ts +5 -1
  27. package/dist/types/lib/types/common-types.d.ts +7 -0
  28. package/dist/types/lib/types/explorer-types.d.ts +2 -2
  29. package/dist/types/shared/dashboard-authoring/card-query-request.d.ts +20 -0
  30. package/dist/types/shared/format-utils/attachment-filter-line.d.ts +14 -0
  31. package/dist/types/shared/format-utils/filter-line.d.ts +7 -0
  32. package/dist/types/shared/format-utils/index.d.ts +1 -0
  33. package/dist/types/shared/format-utils/pdf-export-policy.d.ts +9 -0
  34. package/package.json +1 -1
@@ -1,16 +1,16 @@
1
1
  var Ke = Object.defineProperty;
2
- var qe = (e, n, t) => n in e ? Ke(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
3
- var K = (e, n, t) => qe(e, typeof n != "symbol" ? n + "" : n, t);
4
- import { z as H, q as z, t as Ue, R as Ve, y as je, m as ye, g as He } from "./raw-temporal-D61lr48Y.js";
2
+ var Ue = (e, n, t) => n in e ? Ke(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
3
+ var K = (e, n, t) => Ue(e, typeof n != "symbol" ? n + "" : n, t);
4
+ import { z as H, q as z, t as Ve, R as qe, y as je, m as ye, g as He } from "./raw-temporal-D61lr48Y.js";
5
5
  import { a9 as oe, l as Ge, t as We } from "./validators-Ej1DdCXa.js";
6
6
  import { C as Ze } from "./csv-utils-GUfKyT1J.js";
7
- import { n as Qe, q as Xe, i as Ye, l as Je, P as L } from "./pivot-result-lifecycle-8qCDmpKc.js";
7
+ import { n as Xe, q as Ye, i as Qe, l as Je, P } from "./pivot-result-lifecycle-8qCDmpKc.js";
8
8
  import { af as et, ah as tt, V as nt } from "./matrix-operation-contract-B8PBF1Gd.js";
9
9
  import "./analytics-base-schemas-BFAoRlkU.js";
10
10
  import { z as g } from "zod";
11
11
  import { DEFAULT_RESOLVED_VALUE_FORMAT_PREFERENCES as rt } from "../value-format-preferences/index.js";
12
12
  import { r as ot } from "./matrix-definition-DQDI2okF.js";
13
- import { a as at, r as G, n as ae, b as it, c as ct, f as lt, d as dt, e as st, h as mt } from "./custom-visual-inputs-BrUOIwln.js";
13
+ import { a as at, r as G, n as ae, b as it, c as ct, f as lt, d as st, e as dt, h as mt } from "./custom-visual-inputs-BrUOIwln.js";
14
14
  import { r as ut } from "./matrix-card-CJn1hB5V.js";
15
15
  import { j as ft } from "./common-types-CUf03Htv.js";
16
16
  import { r as pt } from "./pivot-result-identity-D6hhcRXi.js";
@@ -53,7 +53,7 @@ const vt = /* @__PURE__ */ new Set([
53
53
  "treemap",
54
54
  "custom"
55
55
  ]);
56
- function ar(e) {
56
+ function sr(e) {
57
57
  var o, a, i;
58
58
  const n = bt.has(e.type) && (e.type !== "custom" || !!((o = e.customCardPreferences) != null && o.url));
59
59
  let t = !1;
@@ -79,7 +79,7 @@ function It(e) {
79
79
  function wt(e) {
80
80
  return vt.has(e.cardType) && e.allowDownload !== !1 ? "csv" : "pdf";
81
81
  }
82
- function ir(e) {
82
+ function dr(e) {
83
83
  const { config: n } = e, t = ot({
84
84
  spec: n.spec,
85
85
  presentation: n.presentation,
@@ -100,7 +100,7 @@ function ir(e) {
100
100
  }
101
101
  });
102
102
  }
103
- const $t = g.object({
103
+ const Ct = g.object({
104
104
  connection_id: g.string().min(1),
105
105
  cardType: g.literal("matrixTable"),
106
106
  resultOwner: g.literal("config"),
@@ -115,7 +115,7 @@ const $t = g.object({
115
115
  semanticDomainId: g.string().optional()
116
116
  }).passthrough(),
117
117
  active_filters: g.array(g.unknown()).default([])
118
- }).passthrough(), cr = $t.extend({
118
+ }).passthrough(), mr = Ct.extend({
119
119
  dashboardId: g.string().min(1),
120
120
  cardId: g.string().min(1),
121
121
  formatOptions: g.object({
@@ -130,7 +130,7 @@ const $t = g.object({
130
130
  });
131
131
  })
132
132
  });
133
- function lr(e) {
133
+ function ur(e) {
134
134
  return {
135
135
  ...e.controls,
136
136
  type: "card",
@@ -158,20 +158,20 @@ function lr(e) {
158
158
  delimiter: e.delimiter,
159
159
  includeHeaders: e.includeHeaders,
160
160
  timezone: e.reportContext.calendar.tz,
161
- presentationExecutionSnapshot: Qe({
161
+ presentationExecutionSnapshot: Xe({
162
162
  reportContext: e.reportContext,
163
163
  resolvedFormats: []
164
164
  })
165
165
  }
166
166
  };
167
167
  }
168
- const Q = g.number().int().nonnegative(), dr = g.discriminatedUnion("status", [
168
+ const X = g.number().int().nonnegative(), fr = g.discriminatedUnion("status", [
169
169
  g.object({
170
170
  status: g.literal("ok"),
171
171
  request: oe,
172
172
  layout: et,
173
173
  rows: g.array(tt).readonly(),
174
- usage: g.object({ rows: Q, cells: Q, bytes: Q }).strict()
174
+ usage: g.object({ rows: X, cells: X, bytes: X }).strict()
175
175
  }).strict(),
176
176
  g.object({
177
177
  status: g.literal("failed"),
@@ -186,7 +186,7 @@ const Q = g.number().int().nonnegative(), dr = g.discriminatedUnion("status", [
186
186
  function ue(e) {
187
187
  return !e || typeof e != "object" ? !1 : Array.isArray(e.cards);
188
188
  }
189
- function Ct(e) {
189
+ function $t(e) {
190
190
  if (!e)
191
191
  return null;
192
192
  if (typeof e == "string")
@@ -202,29 +202,29 @@ function ve(e) {
202
202
  var n;
203
203
  return (n = e == null ? void 0 : e.cards) != null && n.length ? e.activeCardId && e.cards.find((t) => t.id === e.activeCardId) || e.cards[0] : null;
204
204
  }
205
- function sr(e) {
205
+ function pr(e) {
206
206
  var t;
207
207
  const n = (e == null ? void 0 : e.frameObject) ?? ((t = e == null ? void 0 : e.visual) == null ? void 0 : t.frameObject);
208
- return ve(Ct(n));
208
+ return ve($t(n));
209
209
  }
210
- class T extends Error {
210
+ class E extends Error {
211
211
  constructor(n, t, r) {
212
- super(`${n}: ${t}`), this.code = n, this.context = r, Object.setPrototypeOf(this, T.prototype), this.name = "RawTemporalPresentationBoundaryError";
212
+ super(`${n}: ${t}`), this.code = n, this.context = r, Object.setPrototypeOf(this, E.prototype), this.name = "RawTemporalPresentationBoundaryError";
213
213
  }
214
214
  }
215
215
  function be() {
216
216
  return { type: "raw_temporal", presentation: { mode: "auto" } };
217
217
  }
218
- function Tt(e) {
218
+ function Et(e) {
219
219
  if (e.locale || e.relative || e.timezone && e.timezone !== "auto" || e.sourceTimezone && e.sourceTimezone !== "auto" || e.prefix || e.suffix)
220
- throw new T(
220
+ throw new E(
221
221
  "invalid_raw_temporal_format",
222
222
  "Activated raw temporal presentation contains unsupported locale, relative-time, timezone, prefix, or suffix settings."
223
223
  );
224
224
  }
225
225
  function Ie(e) {
226
226
  const n = e.format;
227
- if ((n == null ? void 0 : n.type) === "date" && (Tt(n), n.pattern))
227
+ if ((n == null ? void 0 : n.type) === "date" && (Et(n), n.pattern))
228
228
  return {
229
229
  type: "raw_temporal",
230
230
  presentation: {
@@ -234,14 +234,14 @@ function Ie(e) {
234
234
  }
235
235
  };
236
236
  if (n)
237
- throw new T(
237
+ throw new E(
238
238
  "invalid_raw_temporal_format",
239
239
  `Raw temporal detail field "${e.id}" has an incompatible authored format.`,
240
240
  { fieldId: e.id }
241
241
  );
242
242
  if (e.dateFormat === "custom") {
243
243
  if (!e.customFormat)
244
- throw new T(
244
+ throw new E(
245
245
  "invalid_raw_temporal_format",
246
246
  `Raw temporal detail field "${e.id}" selects a custom pattern but has no customFormat.`,
247
247
  { fieldId: e.id }
@@ -269,7 +269,7 @@ function ie(e) {
269
269
  if (e != null && e.useRelativeTime) return;
270
270
  if (!e) return be();
271
271
  if (e.useCustomFormat && !((i = e.customFormat) != null && i.trim()))
272
- throw new T(
272
+ throw new E(
273
273
  "invalid_raw_temporal_format",
274
274
  "Declared SQL temporal presentation selects a custom pattern but has no customFormat.",
275
275
  { reason: "missing_declared_sql_custom_date_format" }
@@ -293,20 +293,20 @@ function ie(e) {
293
293
  presentation: { mode: "auto" }
294
294
  };
295
295
  }
296
- function mr(e) {
296
+ function hr(e) {
297
297
  return e === "instant" ? "yyyy-MM-dd'T'HH:mm:ssXXX" : e === "wall_datetime" ? "yyyy-MM-dd'T'HH:mm:ss" : "yyyy-MM-dd";
298
298
  }
299
- function ur(e) {
299
+ function yr(e) {
300
300
  je({
301
301
  dialect: "date_fns",
302
302
  pattern: e.pattern,
303
303
  valueKind: e.valueKind
304
304
  });
305
305
  }
306
- function Et(e) {
306
+ function Tt(e) {
307
307
  const n = ie(e.settings);
308
308
  if (!n)
309
- throw new T(
309
+ throw new E(
310
310
  "invalid_raw_temporal_format",
311
311
  "Relative-time SQL presentation does not have an absolute date preview."
312
312
  );
@@ -322,15 +322,15 @@ function Et(e) {
322
322
  })
323
323
  })(o);
324
324
  if (!a.ok)
325
- throw new T(
325
+ throw new E(
326
326
  "invalid_raw_temporal_format",
327
327
  a.diagnostic.message
328
328
  );
329
329
  return a.text;
330
330
  }
331
- function fr(e) {
331
+ function gr(e) {
332
332
  try {
333
- return { ok: !0, text: Et(e) };
333
+ return { ok: !0, text: Tt(e) };
334
334
  } catch (n) {
335
335
  return {
336
336
  ok: !1,
@@ -354,7 +354,7 @@ function xt(e) {
354
354
  }
355
355
  );
356
356
  }
357
- function pr(e) {
357
+ function vr(e) {
358
358
  var t, r, o;
359
359
  if (!xt(e)) return e;
360
360
  const n = ((r = (t = e.preferences) == null ? void 0 : t.tablePrefs) == null ? void 0 : r.columnSettingsMap) || {};
@@ -366,10 +366,10 @@ function pr(e) {
366
366
  ...(o = e.preferences) == null ? void 0 : o.tablePrefs,
367
367
  columnSettingsMap: Object.fromEntries(
368
368
  Object.entries(n).map(([a, i]) => {
369
- var c, l, d;
369
+ var c, l, s;
370
370
  return [
371
371
  a,
372
- i.type === "date" && ((c = i.dateFormat) == null ? void 0 : c.useRelativeTime) !== !0 && ((l = i.dateFormat) == null ? void 0 : l.useCustomFormat) === !0 && !((d = i.dateFormat.customFormat) != null && d.trim()) ? {
372
+ i.type === "date" && ((c = i.dateFormat) == null ? void 0 : c.useRelativeTime) !== !0 && ((l = i.dateFormat) == null ? void 0 : l.useCustomFormat) === !0 && !((s = i.dateFormat.customFormat) != null && s.trim()) ? {
373
373
  ...i,
374
374
  dateFormat: {
375
375
  ...i.dateFormat,
@@ -395,11 +395,11 @@ function St() {
395
395
  function te(e, n) {
396
396
  return e === void 0 ? { kind: "invalid", error: n } : {
397
397
  kind: "invalid",
398
- error: e instanceof T ? e : e instanceof Ve ? new T(
398
+ error: e instanceof E ? e : e instanceof qe ? new E(
399
399
  e.code,
400
400
  e.message,
401
401
  n.context
402
- ) : new T(
402
+ ) : new E(
403
403
  n.code,
404
404
  e instanceof Error ? e.message : n.message,
405
405
  n.context
@@ -415,7 +415,7 @@ function kt(e) {
415
415
  if (!Array.isArray(n) || !Array.isArray(t) || !r)
416
416
  return te(
417
417
  void 0,
418
- new T(
418
+ new E(
419
419
  "missing_raw_temporal_result_contract",
420
420
  "Activated raw temporal detail results require records, columns, and columnKeyMap atomically."
421
421
  )
@@ -431,17 +431,17 @@ function kt(e) {
431
431
  ), c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map();
432
432
  for (const m of a) {
433
433
  const p = Array.from(i).flatMap(
434
- ([E, Z]) => {
434
+ ([T, Z]) => {
435
435
  const O = pt(
436
436
  r,
437
- E,
437
+ T,
438
438
  "detail"
439
439
  );
440
440
  return O && O.role === "detail" && (O.outputKey ?? O.rawKey) === m.key ? [{ field: Z, binding: O }] : [];
441
441
  }
442
442
  ), f = p.length === 1 ? p[0] : null;
443
443
  if (!f || typeof f.binding.rawKey != "string" || f.binding.rawKey.trim().length === 0 || f.binding.outputKey !== void 0 && (typeof f.binding.outputKey != "string" || f.binding.outputKey.trim().length === 0))
444
- throw new T(
444
+ throw new E(
445
445
  "missing_raw_temporal_column_binding",
446
446
  `Raw temporal result column "${m.key}" does not have one valid exact detail result binding.`,
447
447
  { columnKey: m.key }
@@ -450,7 +450,7 @@ function kt(e) {
450
450
  metadataRequired: !0
451
451
  });
452
452
  if (!x)
453
- throw new T(
453
+ throw new E(
454
454
  "invalid_raw_temporal_metadata",
455
455
  `Raw temporal result column "${w}" has no metadata.`,
456
456
  { fieldId: h.id, columnKey: w }
@@ -459,32 +459,32 @@ function kt(e) {
459
459
  format: Ie(h),
460
460
  preferences: e.preferences,
461
461
  calendar: e.calendar
462
- }), C = {
462
+ }), $ = {
463
463
  fieldId: h.id,
464
464
  columnKey: w,
465
465
  metadata: x,
466
466
  format: k,
467
467
  formatValue: H({ metadata: x, format: k })
468
468
  };
469
- for (let E = 0; E < n.length; E += 1)
470
- if (!Object.prototype.hasOwnProperty.call(n[E], w) || n[E][w] === void 0)
471
- throw new T(
469
+ for (let T = 0; T < n.length; T += 1)
470
+ if (!Object.prototype.hasOwnProperty.call(n[T], w) || n[T][w] === void 0)
471
+ throw new E(
472
472
  "missing_raw_temporal_result_contract",
473
- `Raw temporal result row ${E} is missing column "${w}".`,
473
+ `Raw temporal result row ${T} is missing column "${w}".`,
474
474
  { fieldId: h.id, columnKey: w }
475
475
  );
476
- c.set(w, C), l.set(h.id, C);
476
+ c.set(w, $), l.set(h.id, $);
477
477
  }
478
- const d = {
478
+ const s = {
479
479
  activatedColumnKeys: new Set(c.keys()),
480
480
  byColumnKey: c,
481
481
  byFieldId: l
482
482
  };
483
- return n.length === 0 ? { kind: "loaded_empty", presentation: d } : { kind: "loaded_valid", presentation: d };
483
+ return n.length === 0 ? { kind: "loaded_empty", presentation: s } : { kind: "loaded_valid", presentation: s };
484
484
  } catch (a) {
485
485
  return te(
486
486
  a,
487
- new T(
487
+ new E(
488
488
  "invalid_raw_temporal_metadata",
489
489
  "Activated raw temporal result metadata is invalid."
490
490
  )
@@ -501,7 +501,7 @@ function _t(e) {
501
501
  const i = !!((r = e.columns) != null && r.some((c) => c.rawTemporal));
502
502
  return i && e.records !== void 0 && !e.columnKeyMap ? {
503
503
  kind: "invalid",
504
- error: new T(
504
+ error: new E(
505
505
  "missing_raw_temporal_result_contract",
506
506
  "Activated raw temporal detail results require records, columns, and columnKeyMap atomically."
507
507
  )
@@ -537,7 +537,7 @@ function _t(e) {
537
537
  e
538
538
  );
539
539
  }
540
- function hr(e) {
540
+ function br(e) {
541
541
  var r, o, a;
542
542
  const n = e.effectiveCardConfig ?? e.card.config, t = G(
543
543
  e.card,
@@ -558,14 +558,14 @@ function fe(e, n) {
558
558
  if (!n.dashboardId)
559
559
  return {
560
560
  kind: "invalid",
561
- error: new T(
561
+ error: new E(
562
562
  "missing_raw_temporal_result_contract",
563
563
  "A dashboard ID is required to resolve the captured raw temporal presentation."
564
564
  )
565
565
  };
566
566
  const t = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
567
567
  for (const o of e.presentation.activatedColumnKeys) {
568
- const a = Xe({
568
+ const a = Ye({
569
569
  snapshot: n.executionSnapshot,
570
570
  scope: {
571
571
  dashboardId: n.dashboardId,
@@ -577,7 +577,7 @@ function fe(e, n) {
577
577
  if (!a)
578
578
  return {
579
579
  kind: "invalid",
580
- error: new Ye(o)
580
+ error: new Qe(o)
581
581
  };
582
582
  const i = e.presentation.byColumnKey.get(o);
583
583
  if (!i) continue;
@@ -616,40 +616,40 @@ function At(e) {
616
616
  if (!e.records) return { kind: "loading" };
617
617
  try {
618
618
  const o = /* @__PURE__ */ new Map(), a = new Set(
619
- n.map(([d]) => d)
619
+ n.map(([s]) => s)
620
620
  ), i = /* @__PURE__ */ new Map(), c = [...e.columns || []];
621
- for (const [d, m] of n) {
621
+ for (const [s, m] of n) {
622
622
  const p = ie(
623
623
  m.dateFormat
624
624
  );
625
625
  if (!p) continue;
626
- const f = Ue({
627
- columnKey: d,
626
+ const f = Ve({
627
+ columnKey: s,
628
628
  values: e.records.map((x) => {
629
- if (!Object.prototype.hasOwnProperty.call(x, d))
630
- throw new T(
629
+ if (!Object.prototype.hasOwnProperty.call(x, s))
630
+ throw new E(
631
631
  "missing_raw_temporal_result_contract",
632
- `Declared SQL temporal column "${d}" is absent from a physical result row.`,
633
- { columnKey: d }
632
+ `Declared SQL temporal column "${s}" is absent from a physical result row.`,
633
+ { columnKey: s }
634
634
  );
635
- const k = x[d];
635
+ const k = x[s];
636
636
  return k === null || typeof k == "string" ? k : String(k);
637
637
  })
638
638
  });
639
- if (i.set(d, f), f.status !== "classified") continue;
639
+ if (i.set(s, f), f.status !== "classified") continue;
640
640
  let h = c.findIndex(
641
- (x) => x.key === d
641
+ (x) => x.key === s
642
642
  );
643
643
  if (e.columns && h < 0)
644
- throw new T(
644
+ throw new E(
645
645
  "missing_raw_temporal_result_contract",
646
- `Classified SQL temporal column "${d}" is absent from result columns.`,
647
- { columnKey: d }
646
+ `Classified SQL temporal column "${s}" is absent from result columns.`,
647
+ { columnKey: s }
648
648
  );
649
649
  h < 0 && (h = c.length, c.push({
650
- key: d,
651
- name: d,
652
- label: d,
650
+ key: s,
651
+ name: s,
652
+ label: s,
653
653
  role: "dimension",
654
654
  dataType: "string"
655
655
  }));
@@ -667,8 +667,8 @@ function At(e) {
667
667
  preferences: e.preferences,
668
668
  calendar: e.calendar
669
669
  });
670
- o.set(d, {
671
- columnKey: d,
670
+ o.set(s, {
671
+ columnKey: s,
672
672
  metadata: f.metadata,
673
673
  format: w,
674
674
  formatValue: H({
@@ -696,14 +696,14 @@ function At(e) {
696
696
  } catch (o) {
697
697
  return te(
698
698
  o,
699
- new T(
699
+ new E(
700
700
  "invalid_raw_temporal_format",
701
701
  "Declared SQL raw temporal presentation is invalid."
702
702
  )
703
703
  );
704
704
  }
705
705
  }
706
- function yr(e) {
706
+ function Ir(e) {
707
707
  if (e.value !== null && typeof e.value != "string")
708
708
  return {
709
709
  value: e.value,
@@ -720,7 +720,7 @@ function yr(e) {
720
720
  const n = e.presentation.formatValue(e.value);
721
721
  return { value: e.value, label: n.text, result: n };
722
722
  }
723
- function gr(e) {
723
+ function wr(e) {
724
724
  if (!e.result || typeof e.result != "object") return !1;
725
725
  const n = e.result;
726
726
  if (e.expectedResultOwner !== void 0 && n.resultOwner !== e.expectedResultOwner || !Array.isArray(n.records)) return !1;
@@ -735,7 +735,7 @@ function gr(e) {
735
735
  });
736
736
  return t.kind === "inactive" || t.kind === "loaded_empty" || t.kind === "loaded_valid";
737
737
  }
738
- class q extends Error {
738
+ class U extends Error {
739
739
  constructor(t) {
740
740
  const r = t.cardId ? `card "${t.cardId}"` : t.sheetId ? `sheet "${t.sheetId}"` : `dashboard "${t.dashboardId}"`;
741
741
  super(
@@ -746,23 +746,23 @@ class q extends Error {
746
746
  this.name = "TemporalSnapshotSelectionError", this.selection = t;
747
747
  }
748
748
  }
749
- function Ft(e, n) {
749
+ function Dt(e, n) {
750
750
  var o;
751
751
  const t = [], r = /* @__PURE__ */ new Map();
752
752
  for (const a of n) {
753
753
  if (a.dashboardId !== e.id)
754
- throw new q(a);
754
+ throw new U(a);
755
755
  const i = (e.sheets || []).filter(
756
756
  (l) => !a.sheetId || a.sheetId === l.id
757
757
  );
758
758
  if (a.sheetId && i.length === 0)
759
- throw new q(a);
759
+ throw new U(a);
760
760
  let c = !a.cardId;
761
761
  for (const l of i) {
762
- const d = (((o = l.document) == null ? void 0 : o.sections) || []).flatMap(
762
+ const s = (((o = l.document) == null ? void 0 : o.sections) || []).flatMap(
763
763
  (f) => ft(f)
764
764
  ), m = (l.frames || []).flatMap(
765
- (f) => Dt(f, a.cardId)
765
+ (f) => Ft(f, a.cardId)
766
766
  );
767
767
  m.length > 0 && (c = !0);
768
768
  const p = [
@@ -770,7 +770,7 @@ function Ft(e, n) {
770
770
  ...(l.cards || []).filter(
771
771
  (f) => !a.cardId || a.cardId === f.id
772
772
  ),
773
- ...d.filter(
773
+ ...s.filter(
774
774
  (f) => !a.cardId || a.cardId === f.id
775
775
  )
776
776
  ];
@@ -784,11 +784,11 @@ function Ft(e, n) {
784
784
  }
785
785
  }
786
786
  if (!c)
787
- throw new q(a);
787
+ throw new U(a);
788
788
  }
789
789
  return t;
790
790
  }
791
- function Dt(e, n) {
791
+ function Ft(e, n) {
792
792
  var i;
793
793
  const t = n ? (i = e.cards) == null ? void 0 : i.find((c) => c.id === n) : ve(e);
794
794
  if (!t) return [];
@@ -797,8 +797,8 @@ function Dt(e, n) {
797
797
  var l;
798
798
  return typeof ((l = c.customCardPreferences) == null ? void 0 : l.slotIndex) == "number";
799
799
  }
800
- ).length > 1, a = r != null && (dt(r) === "multiple" || o);
801
- return !r || !a ? [t] : st(
800
+ ).length > 1, a = r != null && (st(r) === "multiple" || o);
801
+ return !r || !a ? [t] : dt(
802
802
  mt({
803
803
  frame: e,
804
804
  configCard: r,
@@ -806,8 +806,8 @@ function Dt(e, n) {
806
806
  })
807
807
  ).filter((c) => c !== null);
808
808
  }
809
- function vr(e) {
810
- return Ft(e.dashboard, e.selections).flatMap(
809
+ function Cr(e) {
810
+ return Dt(e.dashboard, e.selections).flatMap(
811
811
  ({ card: n, attachmentIndex: t }) => {
812
812
  var m, p, f, h;
813
813
  const r = ((m = e.resolveCardConfig) == null ? void 0 : m.call(e, n)) ?? n.config, o = it({
@@ -832,57 +832,57 @@ function vr(e) {
832
832
  },
833
833
  e.valueFormatPreferences.locale
834
834
  )
835
- })) : [], c = [], l = G(n, r), d = ae(
835
+ })) : [], c = [], l = G(n, r), s = ae(
836
836
  n.python || ""
837
837
  );
838
838
  if (n.type === "detailTable" && l === "config") {
839
839
  const I = (r == null ? void 0 : r.detailColumns) || [], w = [
840
- ...((r == null ? void 0 : r.groupByColumns) || []).map((C) => ({
841
- field: C,
840
+ ...((r == null ? void 0 : r.groupByColumns) || []).map(($) => ({
841
+ field: $,
842
842
  role: "groupby"
843
843
  })),
844
- ...((r == null ? void 0 : r.metricColumns) || []).map((C) => ({
845
- field: C,
844
+ ...((r == null ? void 0 : r.metricColumns) || []).map(($) => ({
845
+ field: $,
846
846
  role: "metric"
847
847
  })),
848
- ...((r == null ? void 0 : r.pivotByColumns) || []).map((C) => ({
849
- field: C,
848
+ ...((r == null ? void 0 : r.pivotByColumns) || []).map(($) => ({
849
+ field: $,
850
850
  role: "pivotby"
851
851
  })),
852
- ...I.map((C) => ({
853
- field: C,
852
+ ...I.map(($) => ({
853
+ field: $,
854
854
  role: "detail"
855
855
  }))
856
856
  ], x = /* @__PURE__ */ new Map(), k = new Set(
857
857
  w.map(
858
- ({ field: C, role: E }) => ht(C, E)
858
+ ({ field: $, role: T }) => ht($, T)
859
859
  )
860
860
  );
861
- for (const { field: C } of w) {
862
- const E = C.label;
863
- E && x.set(E, (x.get(E) || 0) + 1);
861
+ for (const { field: $ } of w) {
862
+ const T = $.label;
863
+ T && x.set(T, (x.get(T) || 0) + 1);
864
864
  }
865
- for (const C of I) {
866
- const E = Ge(C.dataType);
867
- if (E !== "date" && E !== "datetime") continue;
868
- const Z = yt(C), O = C.label, me = gt({
865
+ for (const $ of I) {
866
+ const T = Ge($.dataType);
867
+ if (T !== "date" && T !== "datetime") continue;
868
+ const Z = yt($), O = $.label, me = gt({
869
869
  label: O,
870
870
  labelCount: O && x.get(O) || 0,
871
871
  rawKey: Z,
872
872
  rawKeys: k
873
873
  });
874
- if (!me) throw new q(a);
874
+ if (!me) throw new U(a);
875
875
  c.push({
876
876
  scope: a,
877
877
  target: { kind: "column", columnKey: me },
878
878
  format: z({
879
- format: Ie(C),
879
+ format: Ie($),
880
880
  preferences: e.valueFormatPreferences,
881
881
  calendar: e.calendar
882
882
  })
883
883
  });
884
884
  }
885
- } else if (l === "freeform" && ((p = n.sql) != null && p.trim()) && !d.trim())
885
+ } else if (l === "freeform" && ((p = n.sql) != null && p.trim()) && !s.trim())
886
886
  for (const [I, w] of Object.entries(
887
887
  ((h = (f = n.preferences) == null ? void 0 : f.tablePrefs) == null ? void 0 : h.columnSettingsMap) || {}
888
888
  )) {
@@ -907,10 +907,10 @@ function vr(e) {
907
907
  function Rt(e) {
908
908
  return !!e && typeof e == "object" && !Array.isArray(e);
909
909
  }
910
- function F(e, n, t) {
910
+ function D(e, n, t) {
911
911
  return Rt(e) ? e : (t.push({ field: n, message: "Expected an object." }), {});
912
912
  }
913
- function D(e, n, t, r) {
913
+ function F(e, n, t, r) {
914
914
  const o = new Set(t);
915
915
  Object.keys(e).forEach((a) => {
916
916
  o.has(a) || r.push({
@@ -919,7 +919,7 @@ function D(e, n, t, r) {
919
919
  });
920
920
  });
921
921
  }
922
- function B(e, n, t, r, o = {}) {
922
+ function N(e, n, t, r, o = {}) {
923
923
  if (e == null)
924
924
  return;
925
925
  if (typeof e != "string") {
@@ -941,7 +941,7 @@ function B(e, n, t, r, o = {}) {
941
941
  return a;
942
942
  }
943
943
  function ce(e, n, t) {
944
- const r = B(e, n, 2e3, t);
944
+ const r = N(e, n, 2e3, t);
945
945
  if (r)
946
946
  try {
947
947
  return new URL(r), r;
@@ -951,12 +951,12 @@ function ce(e, n, t) {
951
951
  }
952
952
  }
953
953
  function pe(e, n, t) {
954
- const r = F(e, n, t);
955
- D(r, n, ["tokens", "components"], t);
954
+ const r = D(e, n, t);
955
+ F(r, n, ["tokens", "components"], t);
956
956
  const o = {};
957
957
  if (r.tokens !== void 0) {
958
- const a = F(r.tokens, `${n}.tokens`, t);
959
- D(
958
+ const a = D(r.tokens, `${n}.tokens`, t);
959
+ F(
960
960
  a,
961
961
  `${n}.tokens`,
962
962
  ["color", "typography"],
@@ -964,7 +964,7 @@ function pe(e, n, t) {
964
964
  );
965
965
  const i = {};
966
966
  if (a.color !== void 0) {
967
- const c = F(
967
+ const c = D(
968
968
  a.color,
969
969
  `${n}.tokens.color`,
970
970
  t
@@ -981,37 +981,37 @@ function pe(e, n, t) {
981
981
  "warning",
982
982
  "info"
983
983
  ];
984
- D(c, `${n}.tokens.color`, l, t);
985
- const d = {};
984
+ F(c, `${n}.tokens.color`, l, t);
985
+ const s = {};
986
986
  l.forEach((m) => {
987
- const p = B(
987
+ const p = N(
988
988
  c[m],
989
989
  `${n}.tokens.color.${m}`,
990
990
  120,
991
991
  t
992
992
  );
993
- p !== void 0 && (d[m] = p);
994
- }), i.color = d;
993
+ p !== void 0 && (s[m] = p);
994
+ }), i.color = s;
995
995
  }
996
996
  if (a.typography !== void 0) {
997
- const c = F(
997
+ const c = D(
998
998
  a.typography,
999
999
  `${n}.tokens.typography`,
1000
1000
  t
1001
1001
  );
1002
- D(
1002
+ F(
1003
1003
  c,
1004
1004
  `${n}.tokens.typography`,
1005
1005
  ["fontFamily", "monoFontFamily"],
1006
1006
  t
1007
1007
  );
1008
- const l = B(
1008
+ const l = N(
1009
1009
  c.fontFamily,
1010
1010
  `${n}.tokens.typography.fontFamily`,
1011
1011
  500,
1012
1012
  t,
1013
1013
  { allowEmpty: !0 }
1014
- ), d = B(
1014
+ ), s = N(
1015
1015
  c.monoFontFamily,
1016
1016
  `${n}.tokens.typography.monoFontFamily`,
1017
1017
  500,
@@ -1020,32 +1020,32 @@ function pe(e, n, t) {
1020
1020
  );
1021
1021
  i.typography = {
1022
1022
  ...l !== void 0 ? { fontFamily: l } : {},
1023
- ...d !== void 0 ? { monoFontFamily: d } : {}
1023
+ ...s !== void 0 ? { monoFontFamily: s } : {}
1024
1024
  };
1025
1025
  }
1026
1026
  o.tokens = i;
1027
1027
  }
1028
1028
  if (r.components !== void 0) {
1029
- const a = F(
1029
+ const a = D(
1030
1030
  r.components,
1031
1031
  `${n}.components`,
1032
1032
  t
1033
1033
  );
1034
- if (D(a, `${n}.components`, ["chart"], t), a.chart !== void 0) {
1035
- const i = F(
1034
+ if (F(a, `${n}.components`, ["chart"], t), a.chart !== void 0) {
1035
+ const i = D(
1036
1036
  a.chart,
1037
1037
  `${n}.components.chart`,
1038
1038
  t
1039
1039
  );
1040
- D(i, `${n}.components.chart`, ["palette"], t);
1040
+ F(i, `${n}.components.chart`, ["palette"], t);
1041
1041
  let c;
1042
1042
  i.palette !== void 0 && (Array.isArray(i.palette) ? i.palette.length > 20 ? t.push({
1043
1043
  field: `${n}.components.chart.palette`,
1044
1044
  message: "Expected 20 colors or fewer."
1045
1045
  }) : c = i.palette.map(
1046
- (l, d) => B(
1046
+ (l, s) => N(
1047
1047
  l,
1048
- `${n}.components.chart.palette.${d}`,
1048
+ `${n}.components.chart.palette.${s}`,
1049
1049
  120,
1050
1050
  t
1051
1051
  )
@@ -1060,12 +1060,12 @@ function pe(e, n, t) {
1060
1060
  return o;
1061
1061
  }
1062
1062
  function Ot(e, n) {
1063
- const t = "presentation.appearance", r = F(e, t, n);
1064
- D(r, t, ["version", "schemes"], n);
1063
+ const t = "presentation.appearance", r = D(e, t, n);
1064
+ F(r, t, ["version", "schemes"], n);
1065
1065
  const o = {};
1066
1066
  if (r.version !== void 0 && (typeof r.version != "number" || !Number.isFinite(r.version) ? n.push({ field: `${t}.version`, message: "Expected a number." }) : o.version = r.version), r.schemes !== void 0) {
1067
- const a = F(r.schemes, `${t}.schemes`, n);
1068
- D(a, `${t}.schemes`, ["light", "dark"], n), o.schemes = {
1067
+ const a = D(r.schemes, `${t}.schemes`, n);
1068
+ F(a, `${t}.schemes`, ["light", "dark"], n), o.schemes = {
1069
1069
  ...a.light !== void 0 ? {
1070
1070
  light: pe(
1071
1071
  a.light,
@@ -1085,22 +1085,22 @@ function Ot(e, n) {
1085
1085
  return o;
1086
1086
  }
1087
1087
  function Mt(e, n) {
1088
- const t = "presentation.brandOverrides", r = F(e, t, n);
1089
- D(r, t, ["brandName", "logoUrl", "link"], n);
1090
- const o = B(
1088
+ const t = "presentation.brandOverrides", r = D(e, t, n);
1089
+ F(r, t, ["brandName", "logoUrl", "link"], n);
1090
+ const o = N(
1091
1091
  r.brandName,
1092
1092
  `${t}.brandName`,
1093
1093
  200,
1094
1094
  n
1095
- ), a = ce(r.logoUrl, `${t}.logoUrl`, n), i = B(r.link, `${t}.link`, 120, n);
1095
+ ), a = ce(r.logoUrl, `${t}.logoUrl`, n), i = N(r.link, `${t}.link`, 120, n);
1096
1096
  return {
1097
1097
  ...o !== void 0 ? { brandName: o } : {},
1098
1098
  ...a !== void 0 ? { logoUrl: a } : {},
1099
1099
  ...i !== void 0 ? { link: i } : {}
1100
1100
  };
1101
1101
  }
1102
- function Bt(e, n) {
1103
- const t = "presentation.fragments", r = F(e, t, n), o = [
1102
+ function Nt(e, n) {
1103
+ const t = "presentation.fragments", r = D(e, t, n), o = [
1104
1104
  "preHeaderText",
1105
1105
  "headerBannerHtml",
1106
1106
  "signatureHtml",
@@ -1108,10 +1108,10 @@ function Bt(e, n) {
1108
1108
  "disclaimerHtml",
1109
1109
  "unsubscribeUrl"
1110
1110
  ];
1111
- D(r, t, o, n);
1111
+ F(r, t, o, n);
1112
1112
  const a = {};
1113
1113
  return o.forEach((i) => {
1114
- const c = i === "unsubscribeUrl" ? ce(r[i], `${t}.${i}`, n) : B(
1114
+ const c = i === "unsubscribeUrl" ? ce(r[i], `${t}.${i}`, n) : N(
1115
1115
  r[i],
1116
1116
  `${t}.${i}`,
1117
1117
  i === "preHeaderText" ? 200 : 5e3,
@@ -1121,15 +1121,15 @@ function Bt(e, n) {
1121
1121
  c !== void 0 && (a[i] = c);
1122
1122
  }), a;
1123
1123
  }
1124
- function Nt(e) {
1124
+ function Bt(e) {
1125
1125
  const n = [], t = {};
1126
- if (e.appearance !== void 0 && (t.appearance = Ot(e.appearance, n)), e.brandOverrides !== void 0 && (t.brandOverrides = Mt(e.brandOverrides, n)), e.fragments !== void 0 && (t.fragments = Bt(e.fragments, n)), e.viewUrl !== void 0) {
1126
+ if (e.appearance !== void 0 && (t.appearance = Ot(e.appearance, n)), e.brandOverrides !== void 0 && (t.brandOverrides = Mt(e.brandOverrides, n)), e.fragments !== void 0 && (t.fragments = Nt(e.fragments, n)), e.viewUrl !== void 0) {
1127
1127
  const r = ce(e.viewUrl, "presentation.viewUrl", n);
1128
1128
  r !== void 0 && (t.viewUrl = r);
1129
1129
  }
1130
1130
  return { value: t, issues: n };
1131
1131
  }
1132
- const U = [
1132
+ const V = [
1133
1133
  "SUN",
1134
1134
  "MON",
1135
1135
  "TUE",
@@ -1137,21 +1137,21 @@ const U = [
1137
1137
  "THU",
1138
1138
  "FRI",
1139
1139
  "SAT"
1140
- ], $e = new Map(
1141
- U.map((e, n) => [e, n])
1142
- ), j = [1, 2, 3, 4, 5], Ce = [1, 2, 3, 6, 12], Te = {
1140
+ ], Ce = new Map(
1141
+ V.map((e, n) => [e, n])
1142
+ ), j = [1, 2, 3, 4, 5], $e = [1, 2, 3, 6, 12], Ee = {
1143
1143
  1: "first",
1144
1144
  2: "second",
1145
1145
  3: "third",
1146
1146
  4: "fourth",
1147
1147
  [-1]: "last"
1148
- }, br = {
1148
+ }, $r = {
1149
1149
  frequency: "weekly",
1150
1150
  hour: 9,
1151
1151
  minute: 0,
1152
1152
  weekdays: [1]
1153
1153
  }, _ = { ok: !1, issue: "Choose a supported schedule." };
1154
- function Pt(e) {
1154
+ function Lt(e) {
1155
1155
  if (typeof e != "string" || e.length === 0 || e !== e.trim() || /^(?:(?:UTC|GMT)[+-]|[+-]\d{2}:\d{2}$)/.test(e))
1156
1156
  return !1;
1157
1157
  try {
@@ -1160,10 +1160,10 @@ function Pt(e) {
1160
1160
  return !1;
1161
1161
  }
1162
1162
  }
1163
- function Lt(e) {
1163
+ function Pt(e) {
1164
1164
  return Number.isInteger(e.minute) && e.minute >= 0 && e.minute <= 59 && Number.isInteger(e.hour) && e.hour >= 0 && e.hour <= 23;
1165
1165
  }
1166
- function Ee(e) {
1166
+ function Te(e) {
1167
1167
  if (e.length === 0) return null;
1168
1168
  const n = [...e].sort((t, r) => t - r);
1169
1169
  return n.some(
@@ -1179,47 +1179,47 @@ function xe(e) {
1179
1179
  const r = e.includes("last") ? [...t, "last"] : t;
1180
1180
  return r.length > 0 ? r : null;
1181
1181
  }
1182
- function P(e, n) {
1182
+ function L(e, n) {
1183
1183
  const t = [];
1184
1184
  for (let r = 0; r < 12 / e; r += 1)
1185
1185
  t.push((n + r * e) % 12);
1186
1186
  return t.sort((r, o) => r - o);
1187
1187
  }
1188
1188
  function zt(e, n) {
1189
- return e === 1 ? "*" : P(e, n).map((t) => t + 1).join(",");
1189
+ return e === 1 ? "*" : L(e, n).map((t) => t + 1).join(",");
1190
1190
  }
1191
1191
  function Se(e, n) {
1192
1192
  return e.every((t) => Wt(t, n));
1193
1193
  }
1194
- function Ir(e) {
1195
- if (!Lt(e))
1194
+ function Er(e) {
1195
+ if (!Pt(e))
1196
1196
  throw new Error("Choose a valid schedule time.");
1197
1197
  const n = `${e.minute} ${e.hour}`;
1198
1198
  switch (e.frequency) {
1199
1199
  case "daily":
1200
- return e.weekdaysOnly ? `${n} * * ${j.map((t) => U[t]).join(",")}` : `${n} * * *`;
1200
+ return e.weekdaysOnly ? `${n} * * ${j.map((t) => V[t]).join(",")}` : `${n} * * *`;
1201
1201
  case "weekly": {
1202
- const t = Ee(e.weekdays);
1202
+ const t = Te(e.weekdays);
1203
1203
  if (!t) throw new Error("Choose at least one weekday.");
1204
- return `${n} * * ${t.map((r) => U[r]).join(",")}`;
1204
+ return `${n} * * ${t.map((r) => V[r]).join(",")}`;
1205
1205
  }
1206
1206
  case "monthly": {
1207
- if (!Ce.includes(e.interval) || !Number.isInteger(e.startMonth) || e.startMonth < 0 || e.startMonth >= e.interval)
1207
+ if (!$e.includes(e.interval) || !Number.isInteger(e.startMonth) || e.startMonth < 0 || e.startMonth >= e.interval)
1208
1208
  throw new Error("Choose a valid month cycle.");
1209
1209
  const t = zt(e.interval, e.startMonth);
1210
1210
  if (e.on.type === "days") {
1211
1211
  const i = xe(e.on.days);
1212
1212
  if (!i) throw new Error("Choose at least one day of the month.");
1213
- const c = P(e.interval, e.startMonth);
1213
+ const c = L(e.interval, e.startMonth);
1214
1214
  if (!Se(i, c))
1215
1215
  throw new Error("Choose a day that occurs in the chosen months.");
1216
- const l = i.map((d) => d === "last" ? "L" : String(d)).join(",");
1216
+ const l = i.map((s) => s === "last" ? "L" : String(s)).join(",");
1217
1217
  return `${n} ${l} ${t} *`;
1218
1218
  }
1219
1219
  const { ordinal: r, weekday: o } = e.on;
1220
- if (!Number.isInteger(o) || o < 0 || o > 6 || !(r in Te))
1220
+ if (!Number.isInteger(o) || o < 0 || o > 6 || !(r in Ee))
1221
1221
  throw new Error("Choose a valid weekday.");
1222
- const a = U[o];
1222
+ const a = V[o];
1223
1223
  return `${n} * ${t} ${r === -1 ? `${a}L` : `${a}#${r}`}`;
1224
1224
  }
1225
1225
  }
@@ -1229,15 +1229,15 @@ function Kt(e) {
1229
1229
  const n = e.split(",");
1230
1230
  if (n.some((i) => !/^([1-9]|1[0-2])$/.test(i))) return null;
1231
1231
  const t = n.map((i) => Number(i) - 1), r = 12 / t.length;
1232
- if (!Ce.includes(r))
1232
+ if (!$e.includes(r))
1233
1233
  return null;
1234
- const o = t[0], a = P(
1234
+ const o = t[0], a = L(
1235
1235
  r,
1236
1236
  o
1237
1237
  );
1238
1238
  return o >= r || a.length !== t.length || a.some((i, c) => i !== t[c]) ? null : { interval: r, startMonth: o };
1239
1239
  }
1240
- function qt(e) {
1240
+ function Ut(e) {
1241
1241
  const n = e.split(",");
1242
1242
  if (n.some((o) => !/^(L|[1-9]|[12]\d|3[01])$/.test(o))) return null;
1243
1243
  const t = n.map(
@@ -1245,10 +1245,10 @@ function qt(e) {
1245
1245
  ), r = xe(t);
1246
1246
  return !r || r.some((o, a) => o !== t[a]) ? null : r;
1247
1247
  }
1248
- function Ut(e) {
1248
+ function Vt(e) {
1249
1249
  const n = /^([A-Z]{3})(?:#([1-4])|(L))$/.exec(e);
1250
1250
  if (!n) return null;
1251
- const t = $e.get(n[1]);
1251
+ const t = Ce.get(n[1]);
1252
1252
  return t === void 0 ? null : {
1253
1253
  weekday: t,
1254
1254
  ordinal: n[3] ? -1 : Number(n[2])
@@ -1270,9 +1270,9 @@ function ke(e) {
1270
1270
  value: { frequency: "daily", hour: l, minute: c, weekdaysOnly: !1 }
1271
1271
  };
1272
1272
  if (a === "*" && o === "*" && !i.includes("#") && !i.endsWith("L")) {
1273
- const p = i.split(",").map((I) => $e.get(I));
1273
+ const p = i.split(",").map((I) => Ce.get(I));
1274
1274
  if (p.some((I) => I === void 0)) return _;
1275
- const f = p, h = Ee(f);
1275
+ const f = p, h = Te(f);
1276
1276
  return !h || h.some((I, w) => I !== f[w]) ? _ : h.length === j.length && h.every((I, w) => I === j[w]) ? {
1277
1277
  ok: !0,
1278
1278
  value: { frequency: "daily", hour: l, minute: c, weekdaysOnly: !0 }
@@ -1281,37 +1281,37 @@ function ke(e) {
1281
1281
  value: { frequency: "weekly", hour: l, minute: c, weekdays: h }
1282
1282
  };
1283
1283
  }
1284
- const d = Kt(a);
1285
- if (!d) return _;
1284
+ const s = Kt(a);
1285
+ if (!s) return _;
1286
1286
  if (o !== "*" && i === "*") {
1287
- const m = qt(o), p = P(d.interval, d.startMonth);
1287
+ const m = Ut(o), p = L(s.interval, s.startMonth);
1288
1288
  return !m || !Se(m, p) ? _ : {
1289
1289
  ok: !0,
1290
1290
  value: {
1291
1291
  frequency: "monthly",
1292
1292
  hour: l,
1293
1293
  minute: c,
1294
- ...d,
1294
+ ...s,
1295
1295
  on: { type: "days", days: m }
1296
1296
  }
1297
1297
  };
1298
1298
  }
1299
1299
  if (o === "*" && i !== "*") {
1300
- const m = Ut(i);
1300
+ const m = Vt(i);
1301
1301
  return m ? {
1302
1302
  ok: !0,
1303
1303
  value: {
1304
1304
  frequency: "monthly",
1305
1305
  hour: l,
1306
1306
  minute: c,
1307
- ...d,
1307
+ ...s,
1308
1308
  on: { type: "weekday", ...m }
1309
1309
  }
1310
1310
  } : _;
1311
1311
  }
1312
1312
  return _;
1313
1313
  }
1314
- function Vt(e, n, t) {
1314
+ function qt(e, n, t) {
1315
1315
  return new Intl.DateTimeFormat(t, {
1316
1316
  hour: "numeric",
1317
1317
  minute: "2-digit",
@@ -1343,16 +1343,16 @@ function Gt(e, n, t) {
1343
1343
  );
1344
1344
  if (e === 1) return "every month";
1345
1345
  if (e === 12) return `${r(n, "long")} each year`;
1346
- const o = P(e, n).map((a) => r(a, "short")).join(", ");
1346
+ const o = L(e, n).map((a) => r(a, "short")).join(", ");
1347
1347
  return e === 3 ? `each quarter (${o})` : `every ${e} months (${o})`;
1348
1348
  }
1349
- function wr(e, n, t = "en-US") {
1349
+ function Tr(e, n, t = "en-US") {
1350
1350
  const r = ke(e);
1351
1351
  if (!r.ok) return null;
1352
1352
  try {
1353
1353
  const o = r.value, a = jt(n, t);
1354
1354
  if (!a) return null;
1355
- const i = `at ${Vt(o.hour, o.minute, t)} ${a}`, c = (l) => new Intl.DateTimeFormat(t, {
1355
+ const i = `at ${qt(o.hour, o.minute, t)} ${a}`, c = (l) => new Intl.DateTimeFormat(t, {
1356
1356
  weekday: "long",
1357
1357
  timeZone: "UTC"
1358
1358
  }).format(new Date(Date.UTC(2023, 0, 1 + l)));
@@ -1364,11 +1364,11 @@ function wr(e, n, t = "en-US") {
1364
1364
  case "monthly": {
1365
1365
  const l = Gt(o.interval, o.startMonth, t);
1366
1366
  if (o.on.type === "weekday")
1367
- return `On the ${Te[o.on.ordinal]} ${c(o.on.weekday)} of ${l} ${i}`;
1368
- const d = o.on.days.map(
1367
+ return `On the ${Ee[o.on.ordinal]} ${c(o.on.weekday)} of ${l} ${i}`;
1368
+ const s = o.on.days.map(
1369
1369
  (m) => m === "last" ? "last day" : Ht(m)
1370
1370
  );
1371
- return `On the ${he(d)} of ${l} ${i}`;
1371
+ return `On the ${he(s)} of ${l} ${i}`;
1372
1372
  }
1373
1373
  }
1374
1374
  } catch {
@@ -1379,11 +1379,11 @@ const _e = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
1379
1379
  function Wt(e, n) {
1380
1380
  return e === "last" || n.some((t) => e <= _e[t]);
1381
1381
  }
1382
- function $r(e) {
1382
+ function xr(e) {
1383
1383
  if (e.frequency !== "monthly" || e.on.type !== "days") return null;
1384
1384
  const n = e.on.days.filter((o) => o !== "last");
1385
1385
  if (n.length === 0) return null;
1386
- const t = Math.max(...n), r = P(e.interval, e.startMonth).filter(
1386
+ const t = Math.max(...n), r = L(e.interval, e.startMonth).filter(
1387
1387
  (o) => t > (o === 1 ? 28 : _e[o])
1388
1388
  );
1389
1389
  return r.length > 0 ? { day: t, months: r } : null;
@@ -1391,7 +1391,7 @@ function $r(e) {
1391
1391
  function Zt(e, n) {
1392
1392
  return new Date(Date.UTC(e, n + 1, 0)).getUTCDate();
1393
1393
  }
1394
- function Qt(e, n, t, r) {
1394
+ function Xt(e, n, t, r) {
1395
1395
  const o = new Date(Date.UTC(n, t, r)).getUTCDay();
1396
1396
  switch (e.frequency) {
1397
1397
  case "daily":
@@ -1399,7 +1399,7 @@ function Qt(e, n, t, r) {
1399
1399
  case "weekly":
1400
1400
  return e.weekdays.includes(o);
1401
1401
  case "monthly": {
1402
- if (!P(e.interval, e.startMonth).includes(t))
1402
+ if (!L(e.interval, e.startMonth).includes(t))
1403
1403
  return !1;
1404
1404
  const a = Zt(n, t);
1405
1405
  return e.on.type === "days" ? e.on.days.some(
@@ -1408,9 +1408,9 @@ function Qt(e, n, t, r) {
1408
1408
  }
1409
1409
  }
1410
1410
  }
1411
- function Cr(e, n, t, r) {
1411
+ function Sr(e, n, t, r) {
1412
1412
  const o = ke(e);
1413
- if (!o.ok || !Pt(n)) return [];
1413
+ if (!o.ok || !Lt(n)) return [];
1414
1414
  const a = o.value, i = new Intl.DateTimeFormat("en-US", {
1415
1415
  timeZone: n,
1416
1416
  hourCycle: "h23",
@@ -1424,36 +1424,69 @@ function Cr(e, n, t, r) {
1424
1424
  return Number((p = i.find((f) => f.type === m)) == null ? void 0 : p.value);
1425
1425
  }, l = new Date(Date.UTC(c("year"), c("month") - 1, c("day")));
1426
1426
  c("hour") * 60 + c("minute") >= a.hour * 60 + a.minute && l.setUTCDate(l.getUTCDate() + 1);
1427
- const d = [];
1428
- for (let m = 0; m < 366 * 4 * (r + 1) && d.length < r; m += 1)
1429
- Qt(a, l.getUTCFullYear(), l.getUTCMonth(), l.getUTCDate()) && d.push(l.toISOString().slice(0, 10)), l.setUTCDate(l.getUTCDate() + 1);
1430
- return d;
1427
+ const s = [];
1428
+ for (let m = 0; m < 366 * 4 * (r + 1) && s.length < r; m += 1)
1429
+ Xt(a, l.getUTCFullYear(), l.getUTCMonth(), l.getUTCDate()) && s.push(l.toISOString().slice(0, 10)), l.setUTCDate(l.getUTCDate() + 1);
1430
+ return s;
1431
+ }
1432
+ const Yt = Object.freeze([
1433
+ "PDF_ROW_LIMIT_EXCEEDED",
1434
+ "PDF_SIZE_LIMIT_EXCEEDED",
1435
+ "TABLE_COMPLETENESS_UNVERIFIED",
1436
+ "CARD_QUERY_FAILED",
1437
+ "RENDER_NOT_READY",
1438
+ "RENDER_TIMED_OUT",
1439
+ "EXPORT_JOB_FAILED",
1440
+ "ATTACHMENT_UNAVAILABLE"
1441
+ ]), Qt = new Set(Yt);
1442
+ function Jt(e) {
1443
+ return typeof e == "string" && Qt.has(e);
1431
1444
  }
1432
- function Tr(e) {
1445
+ function en(e) {
1446
+ if (!e || typeof e != "object" || Array.isArray(e)) return null;
1447
+ const n = e;
1448
+ return typeof n.index != "number" || !Number.isInteger(n.index) || n.index < 0 || typeof n.title != "string" || n.format !== "pdf" && n.format !== "csv" || !Jt(n.code) || typeof n.reason != "string" || typeof n.diagnostic != "string" ? null : {
1449
+ index: n.index,
1450
+ title: n.title,
1451
+ format: n.format,
1452
+ code: n.code,
1453
+ reason: n.reason,
1454
+ diagnostic: n.diagnostic
1455
+ };
1456
+ }
1457
+ function kr(e) {
1458
+ if (!e || typeof e != "object" || Array.isArray(e)) return [];
1459
+ const n = e.omittedAttachments;
1460
+ return Array.isArray(n) ? n.flatMap((t) => {
1461
+ const r = en(t);
1462
+ return r ? [r] : [];
1463
+ }) : [];
1464
+ }
1465
+ function _r(e) {
1433
1466
  return e != null && e.role ? e.type === "tenant" ? e.role === "POWER_USER" : ["AUTHOR", "ADMIN", "SUPER_ADMIN"].includes(e.role) : !1;
1434
1467
  }
1435
- function Er(e) {
1468
+ function Ar(e) {
1436
1469
  return e.canCreate ? [
1437
1470
  ...e.scheduledReportAvailable ? ["scheduled_report"] : [],
1438
1471
  ...e.analyticalBriefingsEnabled ? ["analytical_briefing"] : []
1439
1472
  ] : [];
1440
1473
  }
1441
- function Xt(e) {
1474
+ function tn(e) {
1442
1475
  const n = (e == null ? void 0 : e.channels) ?? [];
1443
1476
  return n.length === 1 && n[0] === "EMAIL";
1444
1477
  }
1445
- function Yt(e) {
1446
- return e.body.type === "generated_analysis" ? "Analytical briefing" : e.body.type === "custom_message" && e.attachments.length > 0 && Xt(e.deliveryConfig) ? e.scheduleExpr ? "Scheduled report" : "On-demand report" : "Plain briefing";
1478
+ function nn(e) {
1479
+ return e.body.type === "generated_analysis" ? "Analytical briefing" : e.body.type === "custom_message" && e.attachments.length > 0 && tn(e.deliveryConfig) ? e.scheduleExpr ? "Scheduled report" : "On-demand report" : "Plain briefing";
1447
1480
  }
1448
- function xr(e) {
1449
- const n = Yt(e), t = n === "Scheduled report" || n === "On-demand report" ? "report" : "briefing";
1481
+ function Dr(e) {
1482
+ const n = nn(e), t = n === "Scheduled report" || n === "On-demand report" ? "report" : "briefing";
1450
1483
  return {
1451
1484
  typeLabel: n,
1452
1485
  noun: t,
1453
1486
  pluralNoun: t === "report" ? "reports" : "briefings"
1454
1487
  };
1455
1488
  }
1456
- const ne = "BRIEFING", Jt = ["markdown", "html"], re = ["markdown"], X = 20, u = {
1489
+ const ne = "BRIEFING", rn = ["markdown", "html"], re = ["markdown"], Y = 20, u = {
1457
1490
  name: 500,
1458
1491
  description: 2e3,
1459
1492
  instruction: 5e4,
@@ -1482,7 +1515,7 @@ const ne = "BRIEFING", Jt = ["markdown", "html"], re = ["markdown"], X = 20, u =
1482
1515
  // tiny tiles in narrow client panels; 2-up was the chosen layout).
1483
1516
  maxKpiTiles: 8
1484
1517
  };
1485
- function en(e) {
1518
+ function on(e) {
1486
1519
  if (e === null || typeof e != "object" || Array.isArray(e))
1487
1520
  return !1;
1488
1521
  const n = e;
@@ -1494,58 +1527,58 @@ function en(e) {
1494
1527
  const r = t;
1495
1528
  return (r.kind === "metric" && typeof r.metricId == "string" && !!r.metricId.trim() || r.kind === "column" && typeof r.columnKey == "string" && !!r.columnKey.trim() || r.kind === "matrix_measure" && typeof r.measureId == "string" && !!r.measureId.trim()) && ye(n.format).ok;
1496
1529
  }
1497
- function tn(e) {
1498
- return e == null ? "" : en(e) ? He(e.value, e.format) : String(e);
1530
+ function an(e) {
1531
+ return e == null ? "" : on(e) ? He(e.value, e.format) : String(e);
1499
1532
  }
1500
- function Sr(e) {
1533
+ function Fr(e) {
1501
1534
  return [e.delta, e.percentChange].filter(
1502
1535
  (n) => n != null
1503
- ).map(tn).filter(Boolean).join(" / ");
1536
+ ).map(an).filter(Boolean).join(" / ");
1504
1537
  }
1505
- const Ae = new Set(Jt), nn = /* @__PURE__ */ new Set([
1538
+ const Ae = new Set(rn), cn = /* @__PURE__ */ new Set([
1506
1539
  "EMAIL",
1507
1540
  "WEBHOOK",
1508
1541
  "SLACK",
1509
1542
  "IN_APP",
1510
1543
  "TELEGRAM"
1511
- ]), Y = {
1544
+ ]), Q = {
1512
1545
  maxToolCalls: { min: 1, max: 100 },
1513
1546
  maxPlanningIterations: { min: 1, max: 10 },
1514
1547
  maxRows: { min: 1, max: 1e5 },
1515
1548
  timeoutMs: { min: 1e3, max: 30 * 6e4 }
1516
- }, rn = /* @__PURE__ */ new Set([
1549
+ }, ln = /* @__PURE__ */ new Set([
1517
1550
  "letter",
1518
1551
  "legal",
1519
1552
  "a4",
1520
1553
  "a3",
1521
1554
  "tabloid"
1522
- ]), on = /* @__PURE__ */ new Set([
1555
+ ]), sn = /* @__PURE__ */ new Set([
1523
1556
  "portrait",
1524
1557
  "landscape"
1525
- ]), an = /* @__PURE__ */ new Set([",", ";", " "]), cn = new Set(Ze), ln = /* @__PURE__ */ new Set([
1558
+ ]), dn = /* @__PURE__ */ new Set([",", ";", " "]), mn = new Set(Ze), un = /* @__PURE__ */ new Set([
1526
1559
  "current",
1527
1560
  "all"
1528
- ]), dn = /* @__PURE__ */ new Set([
1561
+ ]), fn = /* @__PURE__ */ new Set([
1529
1562
  "concise",
1530
1563
  "balanced",
1531
1564
  "detailed"
1532
- ]), sn = /* @__PURE__ */ new Set([
1565
+ ]), pn = /* @__PURE__ */ new Set([
1533
1566
  "info",
1534
1567
  "positive",
1535
1568
  "warning",
1536
1569
  "critical"
1537
- ]), mn = /* @__PURE__ */ new Set([
1570
+ ]), hn = /* @__PURE__ */ new Set([
1538
1571
  "text",
1539
1572
  "number",
1540
1573
  "currency",
1541
1574
  "percent",
1542
1575
  "date",
1543
1576
  "boolean"
1544
- ]), un = /* @__PURE__ */ new Set([
1577
+ ]), yn = /* @__PURE__ */ new Set([
1545
1578
  "left",
1546
1579
  "center",
1547
1580
  "right"
1548
- ]), fn = [
1581
+ ]), gn = [
1549
1582
  "matrix",
1550
1583
  "pageSize",
1551
1584
  "orientation",
@@ -1583,19 +1616,19 @@ class W extends Error {
1583
1616
  this.name = "BriefingContractError", this.issues = t;
1584
1617
  }
1585
1618
  }
1586
- function Fe(e) {
1619
+ function De(e) {
1587
1620
  return typeof e == "object" && e !== null && !Array.isArray(e);
1588
1621
  }
1589
- function s(e, n, t) {
1622
+ function d(e, n, t) {
1590
1623
  e.push({ field: n, message: t });
1591
1624
  }
1592
- function $(e, n, t) {
1593
- return Fe(e) ? e : (s(t, n, "Expected an object."), {});
1625
+ function C(e, n, t) {
1626
+ return De(e) ? e : (d(t, n, "Expected an object."), {});
1594
1627
  }
1595
1628
  function y(e, n, t, r) {
1596
1629
  const o = new Set(t);
1597
1630
  Object.keys(e).forEach((a) => {
1598
- o.has(a) || s(
1631
+ o.has(a) || d(
1599
1632
  r,
1600
1633
  n ? `${n}.${a}` : a,
1601
1634
  `Unexpected field "${a}".`
@@ -1604,31 +1637,31 @@ function y(e, n, t, r) {
1604
1637
  }
1605
1638
  function v(e, n, t, r) {
1606
1639
  if (typeof e != "string")
1607
- return s(r, n, "Expected a string."), "";
1640
+ return d(r, n, "Expected a string."), "";
1608
1641
  const o = e.trim();
1609
- return o ? (o.length > t && s(r, n, `Must be ${t} characters or fewer.`), o) : (s(r, n, "Required value cannot be empty."), "");
1642
+ return o ? (o.length > t && d(r, n, `Must be ${t} characters or fewer.`), o) : (d(r, n, "Required value cannot be empty."), "");
1610
1643
  }
1611
1644
  function b(e, n, t, r) {
1612
1645
  if (e == null)
1613
1646
  return;
1614
1647
  if (typeof e != "string") {
1615
- s(r, n, "Expected a string.");
1648
+ d(r, n, "Expected a string.");
1616
1649
  return;
1617
1650
  }
1618
1651
  const o = e.trim();
1619
1652
  if (o)
1620
- return o.length > t && s(r, n, `Must be ${t} characters or fewer.`), o;
1653
+ return o.length > t && d(r, n, `Must be ${t} characters or fewer.`), o;
1621
1654
  }
1622
- function pn(e, n, t, r) {
1655
+ function vn(e, n, t, r) {
1623
1656
  if (typeof e != "string")
1624
- return s(r, n, "Expected a string."), "";
1657
+ return d(r, n, "Expected a string."), "";
1625
1658
  const o = e.trim();
1626
- return o.length > t && s(r, n, `Must be ${t} characters or fewer.`), o;
1659
+ return o.length > t && d(r, n, `Must be ${t} characters or fewer.`), o;
1627
1660
  }
1628
- function hn(e, n, t) {
1661
+ function bn(e, n, t) {
1629
1662
  if (e != null) {
1630
1663
  if (!Number.isInteger(e) || Number(e) < 0) {
1631
- s(t, n, "Expected a non-negative integer.");
1664
+ d(t, n, "Expected a non-negative integer.");
1632
1665
  return;
1633
1666
  }
1634
1667
  return Number(e);
@@ -1636,9 +1669,9 @@ function hn(e, n, t) {
1636
1669
  }
1637
1670
  function A(e, n, t, r = {}) {
1638
1671
  if (e == null)
1639
- return r.required ? (s(t, n, "Expected at least one evidence id."), []) : void 0;
1672
+ return r.required ? (d(t, n, "Expected at least one evidence id."), []) : void 0;
1640
1673
  if (!Array.isArray(e))
1641
- return s(t, n, "Expected an array."), r.required ? [] : void 0;
1674
+ return d(t, n, "Expected an array."), r.required ? [] : void 0;
1642
1675
  const o = [];
1643
1676
  return e.forEach((a, i) => {
1644
1677
  const c = v(
@@ -1648,21 +1681,21 @@ function A(e, n, t, r = {}) {
1648
1681
  t
1649
1682
  );
1650
1683
  c && !o.includes(c) && o.push(c);
1651
- }), r.required && o.length === 0 && s(t, n, "Expected at least one evidence id."), o.length > 0 || r.required ? o : void 0;
1684
+ }), r.required && o.length === 0 && d(t, n, "Expected at least one evidence id."), o.length > 0 || r.required ? o : void 0;
1652
1685
  }
1653
- function N(e, n, t, r) {
1654
- return e == null ? n : typeof e != "boolean" ? (s(r, t, "Expected a boolean."), n) : e;
1686
+ function B(e, n, t, r) {
1687
+ return e == null ? n : typeof e != "boolean" ? (d(r, t, "Expected a boolean."), n) : e;
1655
1688
  }
1656
- function yn(e, n) {
1657
- return e == null ? "ACTIVE" : e === "ACTIVE" || e === "PAUSED" || e === "DISABLED" ? e : (s(n, "status", "Expected ACTIVE, PAUSED, or DISABLED."), "ACTIVE");
1689
+ function In(e, n) {
1690
+ return e == null ? "ACTIVE" : e === "ACTIVE" || e === "PAUSED" || e === "DISABLED" ? e : (d(n, "status", "Expected ACTIVE, PAUSED, or DISABLED."), "ACTIVE");
1658
1691
  }
1659
- function gn(e) {
1692
+ function wn(e) {
1660
1693
  return e.includes("@") && e.includes(".") && !e.includes(" ");
1661
1694
  }
1662
- function De(e, n) {
1695
+ function Fe(e, n) {
1663
1696
  if (e == null)
1664
1697
  return { type: "project" };
1665
- const t = $(e, "source", n), r = t.type;
1698
+ const t = C(e, "source", n), r = t.type;
1666
1699
  return r === "project" ? (y(t, "source", ["type"], n), { type: "project" }) : r === "dashboard" ? (y(t, "source", ["type", "dashboardId"], n), {
1667
1700
  type: "dashboard",
1668
1701
  dashboardId: v(
@@ -1671,10 +1704,10 @@ function De(e, n) {
1671
1704
  u.id,
1672
1705
  n
1673
1706
  )
1674
- }) : (s(n, "source.type", "Expected project or dashboard."), { type: "project" });
1707
+ }) : (d(n, "source.type", "Expected project or dashboard."), { type: "project" });
1675
1708
  }
1676
1709
  function Re(e, n) {
1677
- const t = $(e, "body", n), r = t.type;
1710
+ const t = C(e, "body", n), r = t.type;
1678
1711
  return r === "generated_analysis" ? (y(t, "body", ["type", "instruction"], n), {
1679
1712
  type: "generated_analysis",
1680
1713
  instruction: v(
@@ -1685,25 +1718,25 @@ function Re(e, n) {
1685
1718
  )
1686
1719
  }) : r === "custom_message" ? (y(t, "body", ["type", "message"], n), {
1687
1720
  type: "custom_message",
1688
- message: pn(
1721
+ message: vn(
1689
1722
  t.message,
1690
1723
  "body.message",
1691
1724
  u.customMessage,
1692
1725
  n
1693
1726
  )
1694
- }) : r === "none" ? (y(t, "body", ["type"], n), { type: "none" }) : (s(
1727
+ }) : r === "none" ? (y(t, "body", ["type"], n), { type: "none" }) : (d(
1695
1728
  n,
1696
1729
  "body.type",
1697
1730
  "Expected generated_analysis, custom_message, or none."
1698
1731
  ), { type: "none" });
1699
1732
  }
1700
- function vn(e, n) {
1733
+ function Cn(e, n) {
1701
1734
  if (e == null)
1702
1735
  return [...re];
1703
1736
  if (!Array.isArray(e))
1704
- return s(n, "presentation.artifactFormats", "Expected an array."), [...re];
1737
+ return d(n, "presentation.artifactFormats", "Expected an array."), [...re];
1705
1738
  if (e.length === 0)
1706
- return s(
1739
+ return d(
1707
1740
  n,
1708
1741
  "presentation.artifactFormats",
1709
1742
  "Choose at least one artifact format."
@@ -1711,7 +1744,7 @@ function vn(e, n) {
1711
1744
  const t = [];
1712
1745
  return e.forEach((r, o) => {
1713
1746
  if (typeof r != "string" || !Ae.has(r)) {
1714
- s(
1747
+ d(
1715
1748
  n,
1716
1749
  `presentation.artifactFormats.${o}`,
1717
1750
  "Expected markdown or html."
@@ -1728,7 +1761,7 @@ function Oe(e, n) {
1728
1761
  includeEvidence: !0,
1729
1762
  includeSql: !0
1730
1763
  };
1731
- const t = $(e, "presentation", n);
1764
+ const t = C(e, "presentation", n);
1732
1765
  y(
1733
1766
  t,
1734
1767
  "presentation",
@@ -1747,14 +1780,14 @@ function Oe(e, n) {
1747
1780
  n
1748
1781
  );
1749
1782
  const r = {
1750
- artifactFormats: vn(t.artifactFormats, n),
1751
- includeEvidence: N(
1783
+ artifactFormats: Cn(t.artifactFormats, n),
1784
+ includeEvidence: B(
1752
1785
  t.includeEvidence,
1753
1786
  !0,
1754
1787
  "presentation.includeEvidence",
1755
1788
  n
1756
1789
  ),
1757
- includeSql: N(
1790
+ includeSql: B(
1758
1791
  t.includeSql,
1759
1792
  !0,
1760
1793
  "presentation.includeSql",
@@ -1777,11 +1810,11 @@ function Oe(e, n) {
1777
1810
  n
1778
1811
  );
1779
1812
  o && (r.audience = o), a && (r.tone = a), i && (r.format = i);
1780
- const c = Nt(t);
1781
- return c.issues.forEach((l) => s(n, l.field, l.message)), Object.assign(r, c.value), r;
1813
+ const c = Bt(t);
1814
+ return c.issues.forEach((l) => d(n, l.field, l.message)), Object.assign(r, c.value), r;
1782
1815
  }
1783
- function bn(e, n, t) {
1784
- return Array.isArray(e) ? (e.length === 0 && s(t, n, "Expected at least one item."), e.length > S.maxListItems && s(
1816
+ function $n(e, n, t) {
1817
+ return Array.isArray(e) ? (e.length === 0 && d(t, n, "Expected at least one item."), e.length > S.maxListItems && d(
1785
1818
  t,
1786
1819
  n,
1787
1820
  `Must have ${S.maxListItems} items or fewer.`
@@ -1792,10 +1825,10 @@ function bn(e, n, t) {
1792
1825
  u.contentItem,
1793
1826
  t
1794
1827
  )
1795
- ).filter(Boolean)) : (s(t, n, "Expected an array."), []);
1828
+ ).filter(Boolean)) : (d(t, n, "Expected an array."), []);
1796
1829
  }
1797
- function In(e, n, t) {
1798
- const r = $(e, n, t);
1830
+ function En(e, n, t) {
1831
+ const r = C(e, n, t);
1799
1832
  if (r.kind === "metric")
1800
1833
  return y(r, n, ["kind", "metricId"], t), {
1801
1834
  kind: "metric",
@@ -1826,7 +1859,7 @@ function In(e, n, t) {
1826
1859
  t
1827
1860
  )
1828
1861
  };
1829
- s(
1862
+ d(
1830
1863
  t,
1831
1864
  `${n}.kind`,
1832
1865
  "Expected metric, column, or matrix_measure."
@@ -1835,17 +1868,17 @@ function In(e, n, t) {
1835
1868
  function Me(e, n, t) {
1836
1869
  if (e === null || typeof e != "object" || Array.isArray(e))
1837
1870
  return;
1838
- const r = $(e, n, t);
1871
+ const r = C(e, n, t);
1839
1872
  if (!Object.prototype.hasOwnProperty.call(r, "target") && !Object.prototype.hasOwnProperty.call(r, "format"))
1840
1873
  return;
1841
- y(r, n, ["value", "target", "format"], t), (typeof r.value != "number" || !Number.isFinite(r.value)) && s(t, `${n}.value`, "Expected a finite number.");
1842
- const o = In(
1874
+ y(r, n, ["value", "target", "format"], t), (typeof r.value != "number" || !Number.isFinite(r.value)) && d(t, `${n}.value`, "Expected a finite number.");
1875
+ const o = En(
1843
1876
  r.target,
1844
1877
  `${n}.target`,
1845
1878
  t
1846
1879
  ), a = ye(r.format);
1847
1880
  if (a.ok || a.issues.forEach(
1848
- (i) => s(
1881
+ (i) => d(
1849
1882
  t,
1850
1883
  i.path === "$" ? `${n}.format` : `${n}.format.${i.path}`,
1851
1884
  i.message
@@ -1858,44 +1891,44 @@ function M(e, n, t) {
1858
1891
  return e;
1859
1892
  if (typeof e == "number") {
1860
1893
  if (!Number.isFinite(e)) {
1861
- s(t, n, "Expected a finite number.");
1894
+ d(t, n, "Expected a finite number.");
1862
1895
  return;
1863
1896
  }
1864
1897
  return e;
1865
1898
  }
1866
1899
  const r = Me(e, n, t);
1867
1900
  if (r) return r;
1868
- s(
1901
+ d(
1869
1902
  t,
1870
1903
  n,
1871
1904
  "Expected a string, number, or structured numeric value."
1872
1905
  );
1873
1906
  }
1874
- function wn(e, n, t) {
1907
+ function Tn(e, n, t) {
1875
1908
  if (e === null || typeof e == "string" || typeof e == "number" || typeof e == "boolean")
1876
- return typeof e == "string" && e.length > u.contentCell ? (s(
1909
+ return typeof e == "string" && e.length > u.contentCell ? (d(
1877
1910
  t,
1878
1911
  n,
1879
1912
  `Must be ${u.contentCell} characters or fewer.`
1880
- ), e.slice(0, u.contentCell)) : typeof e == "number" && !Number.isFinite(e) ? (s(t, n, "Expected a finite number."), null) : e;
1913
+ ), e.slice(0, u.contentCell)) : typeof e == "number" && !Number.isFinite(e) ? (d(t, n, "Expected a finite number."), null) : e;
1881
1914
  const r = Me(e, n, t);
1882
- return r || (s(
1915
+ return r || (d(
1883
1916
  t,
1884
1917
  n,
1885
1918
  "Expected a string, number, boolean, structured numeric value, or null."
1886
1919
  ), null);
1887
1920
  }
1888
- function $n(e, n, t) {
1921
+ function xn(e, n, t) {
1889
1922
  if (!Array.isArray(e))
1890
- return s(t, n, "Expected an array."), [];
1891
- e.length === 0 && s(t, n, "Expected at least one column."), e.length > S.maxTableColumns && s(
1923
+ return d(t, n, "Expected an array."), [];
1924
+ e.length === 0 && d(t, n, "Expected at least one column."), e.length > S.maxTableColumns && d(
1892
1925
  t,
1893
1926
  n,
1894
1927
  `Must have ${S.maxTableColumns} columns or fewer.`
1895
1928
  );
1896
1929
  const r = /* @__PURE__ */ new Set();
1897
1930
  return e.slice(0, S.maxTableColumns).map((o, a) => {
1898
- const i = `${n}.${a}`, c = $(o, i, t);
1931
+ const i = `${n}.${a}`, c = C(o, i, t);
1899
1932
  y(c, i, ["key", "label", "kind", "align"], t);
1900
1933
  const l = v(
1901
1934
  c.key,
@@ -1903,8 +1936,8 @@ function $n(e, n, t) {
1903
1936
  u.id,
1904
1937
  t
1905
1938
  );
1906
- l && (r.has(l) && s(t, `${i}.key`, "Column key must be unique."), r.add(l));
1907
- const d = v(
1939
+ l && (r.has(l) && d(t, `${i}.key`, "Column key must be unique."), r.add(l));
1940
+ const s = v(
1908
1941
  c.label,
1909
1942
  `${i}.label`,
1910
1943
  u.contentTitle,
@@ -1912,51 +1945,51 @@ function $n(e, n, t) {
1912
1945
  ), m = R(
1913
1946
  c.kind,
1914
1947
  `${i}.kind`,
1915
- mn,
1948
+ hn,
1916
1949
  "text, number, currency, percent, date, or boolean",
1917
1950
  t
1918
1951
  ), p = R(
1919
1952
  c.align,
1920
1953
  `${i}.align`,
1921
- un,
1954
+ yn,
1922
1955
  "left, center, or right",
1923
1956
  t
1924
1957
  );
1925
1958
  return {
1926
1959
  key: l,
1927
- label: d,
1960
+ label: s,
1928
1961
  ...m ? { kind: m } : {},
1929
1962
  ...p ? { align: p } : {}
1930
1963
  };
1931
1964
  });
1932
1965
  }
1933
- function Cn(e, n, t, r) {
1966
+ function Sn(e, n, t, r) {
1934
1967
  if (!Array.isArray(e))
1935
- return s(r, n, "Expected an array."), [];
1936
- e.length > S.maxTableRows && s(
1968
+ return d(r, n, "Expected an array."), [];
1969
+ e.length > S.maxTableRows && d(
1937
1970
  r,
1938
1971
  n,
1939
1972
  `Must have ${S.maxTableRows} rows or fewer.`
1940
1973
  );
1941
1974
  const o = new Set(t.map((a) => a.key).filter(Boolean));
1942
1975
  return e.slice(0, S.maxTableRows).map((a, i) => {
1943
- const c = `${n}.${i}`, l = $(a, c, r);
1944
- return Object.keys(l).forEach((d) => {
1945
- o.has(d) || s(r, `${c}.${d}`, `Unexpected table cell "${d}".`);
1976
+ const c = `${n}.${i}`, l = C(a, c, r);
1977
+ return Object.keys(l).forEach((s) => {
1978
+ o.has(s) || d(r, `${c}.${s}`, `Unexpected table cell "${s}".`);
1946
1979
  }), Object.fromEntries(
1947
- t.map((d) => [
1948
- d.key,
1949
- wn(l[d.key] ?? null, `${c}.${d.key}`, r)
1980
+ t.map((s) => [
1981
+ s.key,
1982
+ Tn(l[s.key] ?? null, `${c}.${s.key}`, r)
1950
1983
  ])
1951
1984
  );
1952
1985
  });
1953
1986
  }
1954
- function Tn(e, n, t) {
1955
- const r = `content.blocks.${n}`, o = $(e, r, t), a = o.type;
1987
+ function kn(e, n, t) {
1988
+ const r = `content.blocks.${n}`, o = C(e, r, t), a = o.type;
1956
1989
  if (a === "heading") {
1957
1990
  y(o, r, ["type", "text", "level", "evidenceIds"], t);
1958
1991
  const i = o.level === void 0 || o.level === null ? void 0 : o.level === 2 || o.level === 3 ? o.level : void 0;
1959
- o.level !== void 0 && o.level !== null && i === void 0 && s(t, `${r}.level`, "Expected 2 or 3.");
1992
+ o.level !== void 0 && o.level !== null && i === void 0 && d(t, `${r}.level`, "Expected 2 or 3.");
1960
1993
  const c = A(o.evidenceIds, `${r}.evidenceIds`, t);
1961
1994
  return {
1962
1995
  type: "heading",
@@ -1994,7 +2027,7 @@ function Tn(e, n, t) {
1994
2027
  ), c = R(
1995
2028
  o.severity,
1996
2029
  `${r}.severity`,
1997
- sn,
2030
+ pn,
1998
2031
  "info, positive, warning, or critical",
1999
2032
  t
2000
2033
  );
@@ -2024,7 +2057,7 @@ function Tn(e, n, t) {
2024
2057
  return {
2025
2058
  type: a,
2026
2059
  ...i ? { title: i } : {},
2027
- items: bn(o.items, `${r}.items`, t),
2060
+ items: $n(o.items, `${r}.items`, t),
2028
2061
  ...c ? { evidenceIds: c } : {}
2029
2062
  };
2030
2063
  }
@@ -2045,7 +2078,7 @@ function Tn(e, n, t) {
2045
2078
  t
2046
2079
  );
2047
2080
  const i = M(o.value, `${r}.value`, t) ?? "";
2048
- i === "" && s(
2081
+ i === "" && d(
2049
2082
  t,
2050
2083
  `${r}.value`,
2051
2084
  "Expected a non-empty string, number, or structured numeric value."
@@ -2058,7 +2091,7 @@ function Tn(e, n, t) {
2058
2091
  o.delta,
2059
2092
  `${r}.delta`,
2060
2093
  t
2061
- ), d = o.percentChange === void 0 || o.percentChange === null ? o.percentChange : M(
2094
+ ), s = o.percentChange === void 0 || o.percentChange === null ? o.percentChange : M(
2062
2095
  o.percentChange,
2063
2096
  `${r}.percentChange`,
2064
2097
  t
@@ -2079,7 +2112,7 @@ function Tn(e, n, t) {
2079
2112
  value: i,
2080
2113
  ...c !== void 0 ? { previousValue: c } : {},
2081
2114
  ...l !== void 0 ? { delta: l } : {},
2082
- ...d !== void 0 ? { percentChange: d } : {},
2115
+ ...s !== void 0 ? { percentChange: s } : {},
2083
2116
  ...m ? { unit: m } : {},
2084
2117
  ...p ? { evidenceIds: p } : {}
2085
2118
  };
@@ -2092,13 +2125,13 @@ function Tn(e, n, t) {
2092
2125
  u.contentTitle,
2093
2126
  t
2094
2127
  ), c = Array.isArray(o.tiles) ? o.tiles : [];
2095
- Array.isArray(o.tiles) || s(t, `${r}.tiles`, "Expected an array."), c.length === 0 && s(t, `${r}.tiles`, "Expected at least one tile."), c.length > S.maxKpiTiles && s(
2128
+ Array.isArray(o.tiles) || d(t, `${r}.tiles`, "Expected an array."), c.length === 0 && d(t, `${r}.tiles`, "Expected at least one tile."), c.length > S.maxKpiTiles && d(
2096
2129
  t,
2097
2130
  `${r}.tiles`,
2098
2131
  `Must have ${S.maxKpiTiles} tiles or fewer.`
2099
2132
  );
2100
2133
  const l = c.slice(0, S.maxKpiTiles).map((m, p) => {
2101
- const f = `${r}.tiles.${p}`, h = $(m, f, t);
2134
+ const f = `${r}.tiles.${p}`, h = C(m, f, t);
2102
2135
  y(
2103
2136
  h,
2104
2137
  f,
@@ -2118,7 +2151,7 @@ function Tn(e, n, t) {
2118
2151
  `${f}.value`,
2119
2152
  t
2120
2153
  ) ?? "";
2121
- I === "" && s(
2154
+ I === "" && d(
2122
2155
  t,
2123
2156
  `${f}.value`,
2124
2157
  "Expected a non-empty string, number, or structured numeric value."
@@ -2135,12 +2168,12 @@ function Tn(e, n, t) {
2135
2168
  h.percentChange,
2136
2169
  `${f}.percentChange`,
2137
2170
  t
2138
- ), C = b(
2171
+ ), $ = b(
2139
2172
  h.unit,
2140
2173
  `${f}.unit`,
2141
2174
  u.contentTitle,
2142
2175
  t
2143
- ), E = A(
2176
+ ), T = A(
2144
2177
  h.evidenceIds,
2145
2178
  `${f}.evidenceIds`,
2146
2179
  t
@@ -2156,10 +2189,10 @@ function Tn(e, n, t) {
2156
2189
  ...w !== void 0 ? { previousValue: w } : {},
2157
2190
  ...x !== void 0 ? { delta: x } : {},
2158
2191
  ...k !== void 0 ? { percentChange: k } : {},
2159
- ...C ? { unit: C } : {},
2160
- ...E ? { evidenceIds: E } : {}
2192
+ ...$ ? { unit: $ } : {},
2193
+ ...T ? { evidenceIds: T } : {}
2161
2194
  };
2162
- }), d = A(
2195
+ }), s = A(
2163
2196
  o.evidenceIds,
2164
2197
  `${r}.evidenceIds`,
2165
2198
  t
@@ -2168,13 +2201,13 @@ function Tn(e, n, t) {
2168
2201
  type: "kpi_grid",
2169
2202
  ...i ? { title: i } : {},
2170
2203
  tiles: l,
2171
- ...d ? { evidenceIds: d } : {}
2204
+ ...s ? { evidenceIds: s } : {}
2172
2205
  };
2173
2206
  }
2174
2207
  if (a === "progress") {
2175
2208
  y(o, r, ["type", "label", "value", "detail", "evidenceIds"], t);
2176
2209
  const i = typeof o.value == "number" && Number.isFinite(o.value) ? o.value : 0;
2177
- (typeof o.value != "number" || !Number.isFinite(o.value)) && s(t, `${r}.value`, "Expected a finite number.");
2210
+ (typeof o.value != "number" || !Number.isFinite(o.value)) && d(t, `${r}.value`, "Expected a finite number.");
2178
2211
  const c = b(
2179
2212
  o.detail,
2180
2213
  `${r}.detail`,
@@ -2201,7 +2234,7 @@ function Tn(e, n, t) {
2201
2234
  ["type", "id", "title", "columns", "rows", "caption", "totalRows", "evidenceIds"],
2202
2235
  t
2203
2236
  );
2204
- const i = $n(o.columns, `${r}.columns`, t), c = b(
2237
+ const i = xn(o.columns, `${r}.columns`, t), c = b(
2205
2238
  o.title,
2206
2239
  `${r}.title`,
2207
2240
  u.contentTitle,
@@ -2211,12 +2244,12 @@ function Tn(e, n, t) {
2211
2244
  `${r}.id`,
2212
2245
  u.id,
2213
2246
  t
2214
- ), d = b(
2247
+ ), s = b(
2215
2248
  o.caption,
2216
2249
  `${r}.caption`,
2217
2250
  u.contentItem,
2218
2251
  t
2219
- ), m = hn(
2252
+ ), m = bn(
2220
2253
  o.totalRows,
2221
2254
  `${r}.totalRows`,
2222
2255
  t
@@ -2226,8 +2259,8 @@ function Tn(e, n, t) {
2226
2259
  ...l ? { id: l } : {},
2227
2260
  ...c ? { title: c } : {},
2228
2261
  columns: i,
2229
- rows: Cn(o.rows, `${r}.rows`, i, t),
2230
- ...d ? { caption: d } : {},
2262
+ rows: Sn(o.rows, `${r}.rows`, i, t),
2263
+ ...s ? { caption: s } : {},
2231
2264
  ...m !== void 0 ? { totalRows: m } : {},
2232
2265
  ...p ? { evidenceIds: p } : {}
2233
2266
  };
@@ -2268,7 +2301,7 @@ function Tn(e, n, t) {
2268
2301
  ...l ? { evidenceIds: l } : {}
2269
2302
  };
2270
2303
  }
2271
- return s(
2304
+ return d(
2272
2305
  t,
2273
2306
  `${r}.type`,
2274
2307
  "Expected heading, paragraph, finding, bullets, metric, kpi_grid, progress, table, actions, limitations, sql, or evidence_appendix."
@@ -2277,9 +2310,9 @@ function Tn(e, n, t) {
2277
2310
  text: ""
2278
2311
  };
2279
2312
  }
2280
- function En(e) {
2281
- const n = [], t = $(e, "content", n);
2282
- y(t, "content", ["version", "title", "summary", "blocks"], n), t.version !== 1 && s(n, "content.version", "Expected version 1.");
2313
+ function _n(e) {
2314
+ const n = [], t = C(e, "content", n);
2315
+ y(t, "content", ["version", "title", "summary", "blocks"], n), t.version !== 1 && d(n, "content.version", "Expected version 1.");
2283
2316
  const r = b(
2284
2317
  t.title,
2285
2318
  "content.title",
@@ -2291,14 +2324,14 @@ function En(e) {
2291
2324
  u.contentSummary,
2292
2325
  n
2293
2326
  );
2294
- Array.isArray(t.blocks) || s(n, "content.blocks", "Expected an array.");
2327
+ Array.isArray(t.blocks) || d(n, "content.blocks", "Expected an array.");
2295
2328
  const a = Array.isArray(t.blocks) ? t.blocks : [];
2296
- a.length === 0 && s(n, "content.blocks", "Expected at least one block."), a.length > S.maxBlocks && s(
2329
+ a.length === 0 && d(n, "content.blocks", "Expected at least one block."), a.length > S.maxBlocks && d(
2297
2330
  n,
2298
2331
  "content.blocks",
2299
2332
  `Must have ${S.maxBlocks} blocks or fewer.`
2300
2333
  );
2301
- const i = a.slice(0, S.maxBlocks).map((c, l) => Tn(c, l, n));
2334
+ const i = a.slice(0, S.maxBlocks).map((c, l) => kn(c, l, n));
2302
2335
  return le(n), {
2303
2336
  version: 1,
2304
2337
  ...r ? { title: r } : {},
@@ -2306,11 +2339,11 @@ function En(e) {
2306
2339
  blocks: i
2307
2340
  };
2308
2341
  }
2309
- function kr(e) {
2342
+ function Rr(e) {
2310
2343
  try {
2311
2344
  return {
2312
2345
  valid: !0,
2313
- value: En(e),
2346
+ value: _n(e),
2314
2347
  issues: []
2315
2348
  };
2316
2349
  } catch (n) {
@@ -2319,45 +2352,45 @@ function kr(e) {
2319
2352
  throw n;
2320
2353
  }
2321
2354
  }
2322
- function V(e, n, t, r) {
2323
- return typeof e == "string" && t.includes(e) ? e : (s(r, n, `Expected ${t.join(" or ")}.`), t[0]);
2355
+ function q(e, n, t, r) {
2356
+ return typeof e == "string" && t.includes(e) ? e : (d(r, n, `Expected ${t.join(" or ")}.`), t[0]);
2324
2357
  }
2325
2358
  function R(e, n, t, r, o) {
2326
2359
  if (e != null) {
2327
2360
  if (typeof e == "string" && t.has(e))
2328
2361
  return e;
2329
- s(o, n, `Expected ${r}.`);
2362
+ d(o, n, `Expected ${r}.`);
2330
2363
  }
2331
2364
  }
2332
- function xn(e, n, t) {
2365
+ function An(e, n, t) {
2333
2366
  if (e != null) {
2334
2367
  if (!Array.isArray(e)) {
2335
- s(t, n, "Expected an array.");
2368
+ d(t, n, "Expected an array.");
2336
2369
  return;
2337
2370
  }
2338
2371
  return e;
2339
2372
  }
2340
2373
  }
2341
- function Sn(e, n, t) {
2374
+ function Dn(e, n, t) {
2342
2375
  if (e != null) {
2343
- if (!Fe(e)) {
2344
- s(t, n, "Expected an object.");
2376
+ if (!De(e)) {
2377
+ d(t, n, "Expected an object.");
2345
2378
  return;
2346
2379
  }
2347
2380
  return e;
2348
2381
  }
2349
2382
  }
2350
- function kn(e, n, t) {
2383
+ function Fn(e, n, t) {
2351
2384
  if (e == null)
2352
2385
  return;
2353
- const r = $(e, n, t);
2354
- y(r, n, fn, t);
2386
+ const r = C(e, n, t);
2387
+ y(r, n, gn, t);
2355
2388
  const o = {};
2356
2389
  if (r.matrix !== void 0) {
2357
- const m = $(r.matrix, `${n}.matrix`, t);
2390
+ const m = C(r.matrix, `${n}.matrix`, t);
2358
2391
  y(m, `${n}.matrix`, ["config", "content"], t);
2359
2392
  const p = We.safeParse(m.config);
2360
- p.success || s(t, `${n}.matrix.config`, "Expected a valid Matrix definition.");
2393
+ p.success || d(t, `${n}.matrix.config`, "Expected a valid Matrix definition.");
2361
2394
  const f = R(
2362
2395
  m.content,
2363
2396
  `${n}.matrix.content`,
@@ -2365,40 +2398,40 @@ function kn(e, n, t) {
2365
2398
  "current, all, or flat",
2366
2399
  t
2367
2400
  );
2368
- f || s(t, `${n}.matrix.content`, "Choose Matrix export content."), p.success && f && (o.matrix = { config: p.data, content: f });
2401
+ f || d(t, `${n}.matrix.content`, "Choose Matrix export content."), p.success && f && (o.matrix = { config: p.data, content: f });
2369
2402
  }
2370
2403
  const a = R(
2371
2404
  r.pageSize,
2372
2405
  `${n}.pageSize`,
2373
- rn,
2406
+ ln,
2374
2407
  "letter, legal, a4, a3, or tabloid",
2375
2408
  t
2376
2409
  ), i = R(
2377
2410
  r.orientation,
2378
2411
  `${n}.orientation`,
2379
- on,
2412
+ sn,
2380
2413
  "portrait or landscape",
2381
2414
  t
2382
2415
  ), c = R(
2383
2416
  r.delimiter,
2384
2417
  `${n}.delimiter`,
2385
- an,
2418
+ dn,
2386
2419
  "comma, semicolon, or tab",
2387
2420
  t
2388
2421
  ), l = R(
2389
2422
  r.csvEncoding,
2390
2423
  `${n}.csvEncoding`,
2391
- cn,
2424
+ mn,
2392
2425
  "utf-8-bom or utf-8",
2393
2426
  t
2394
- ), d = R(
2427
+ ), s = R(
2395
2428
  r.sheetSelection,
2396
2429
  `${n}.sheetSelection`,
2397
- ln,
2430
+ un,
2398
2431
  "current or all",
2399
2432
  t
2400
2433
  );
2401
- a && (o.pageSize = a), i && (o.orientation = i), c && (o.delimiter = c), l && (o.csvEncoding = l), d && (o.sheetSelection = d);
2434
+ a && (o.pageSize = a), i && (o.orientation = i), c && (o.delimiter = c), l && (o.csvEncoding = l), s && (o.sheetSelection = s);
2402
2435
  for (const m of [
2403
2436
  "includeFilters",
2404
2437
  "includeTimestamp",
@@ -2408,7 +2441,7 @@ function kn(e, n, t) {
2408
2441
  ])
2409
2442
  if (!(r[m] === void 0 || r[m] === null)) {
2410
2443
  if (typeof r[m] != "boolean") {
2411
- s(t, `${n}.${m}`, "Expected a boolean.");
2444
+ d(t, `${n}.${m}`, "Expected a boolean.");
2412
2445
  continue;
2413
2446
  }
2414
2447
  o[m] = r[m];
@@ -2436,7 +2469,7 @@ function kn(e, n, t) {
2436
2469
  "cardControlDefinitions",
2437
2470
  "controlBindings"
2438
2471
  ]) {
2439
- const p = xn(r[m], `${n}.${m}`, t);
2472
+ const p = An(r[m], `${n}.${m}`, t);
2440
2473
  p && (o[m] = p);
2441
2474
  }
2442
2475
  for (const m of [
@@ -2445,7 +2478,7 @@ function kn(e, n, t) {
2445
2478
  "dashboardInputExecutionSnapshot",
2446
2479
  "printInputCapture"
2447
2480
  ]) {
2448
- const p = Sn(r[m], `${n}.${m}`, t);
2481
+ const p = Dn(r[m], `${n}.${m}`, t);
2449
2482
  p && (o[m] = p);
2450
2483
  }
2451
2484
  return Object.keys(o).length > 0 ? o : void 0;
@@ -2460,15 +2493,15 @@ function J(e, n, t, r) {
2460
2493
  return o && (e.title = o), e;
2461
2494
  }
2462
2495
  function ee(e, n, t, r) {
2463
- const o = kn(n, t, r);
2464
- return o != null && o.printInputCapture && e.type !== "dashboard" && s(
2496
+ const o = Fn(n, t, r);
2497
+ return o != null && o.printInputCapture && e.type !== "dashboard" && d(
2465
2498
  r,
2466
2499
  `${t}.printInputCapture`,
2467
2500
  "Only a full dashboard attachment can carry printInputCapture."
2468
2501
  ), o && (e.settings = o), e;
2469
2502
  }
2470
- function _n(e, n, t) {
2471
- const r = `attachments.${n}`, o = $(e, r, t), a = o.type;
2503
+ function Rn(e, n, t) {
2504
+ const r = `attachments.${n}`, o = C(e, r, t), a = o.type;
2472
2505
  if (a === "dashboard") {
2473
2506
  y(
2474
2507
  o,
@@ -2485,7 +2518,7 @@ function _n(e, n, t) {
2485
2518
  u.id,
2486
2519
  t
2487
2520
  ),
2488
- format: V(o.format, `${r}.format`, ["pdf"], t)
2521
+ format: q(o.format, `${r}.format`, ["pdf"], t)
2489
2522
  },
2490
2523
  o.title,
2491
2524
  `${r}.title`,
@@ -2515,7 +2548,7 @@ function _n(e, n, t) {
2515
2548
  u.id,
2516
2549
  t
2517
2550
  ),
2518
- format: V(o.format, `${r}.format`, ["pdf"], t)
2551
+ format: q(o.format, `${r}.format`, ["pdf"], t)
2519
2552
  },
2520
2553
  o.title,
2521
2554
  `${r}.title`,
@@ -2545,7 +2578,7 @@ function _n(e, n, t) {
2545
2578
  u.id,
2546
2579
  t
2547
2580
  ),
2548
- format: V(
2581
+ format: q(
2549
2582
  o.format,
2550
2583
  `${r}.format`,
2551
2584
  ["csv", "pdf"],
@@ -2558,13 +2591,13 @@ function _n(e, n, t) {
2558
2591
  );
2559
2592
  return ee(i, o.settings, `${r}.settings`, t);
2560
2593
  }
2561
- return s(
2594
+ return d(
2562
2595
  t,
2563
2596
  `${r}.type`,
2564
2597
  "Expected dashboard, dashboard_sheet, document_sheet, or card."
2565
2598
  ), { type: "dashboard", dashboardId: "", format: "pdf" };
2566
2599
  }
2567
- function An(e) {
2600
+ function On(e) {
2568
2601
  switch (e.type) {
2569
2602
  case "dashboard":
2570
2603
  return `${e.type}:${e.dashboardId}:${e.format}`;
@@ -2575,37 +2608,37 @@ function An(e) {
2575
2608
  return `${e.type}:${e.dashboardId}:${e.cardId}:${e.format}`;
2576
2609
  }
2577
2610
  }
2578
- function Be(e, n) {
2611
+ function Ne(e, n) {
2579
2612
  if (e == null)
2580
2613
  return [];
2581
2614
  if (!Array.isArray(e))
2582
- return s(n, "attachments", "Expected an array."), [];
2583
- e.length > X && s(
2615
+ return d(n, "attachments", "Expected an array."), [];
2616
+ e.length > Y && d(
2584
2617
  n,
2585
2618
  "attachments",
2586
- `Choose ${X} attachments or fewer.`
2619
+ `Choose ${Y} attachments or fewer.`
2587
2620
  );
2588
- const t = e.slice(0, X).map((o, a) => _n(o, a, n)), r = /* @__PURE__ */ new Set();
2621
+ const t = e.slice(0, Y).map((o, a) => Rn(o, a, n)), r = /* @__PURE__ */ new Set();
2589
2622
  return t.forEach((o, a) => {
2590
2623
  var c;
2591
- (c = o.settings) != null && c.matrix && (o.type !== "card" || o.settings.cardType !== "matrixTable" || o.settings.matrix.content === "flat" && o.format !== "csv") && s(n, `attachments.${a}.settings.matrix`, "Matrix settings require a matrixTable card attachment; flat content requires CSV.");
2592
- const i = An(o);
2593
- r.has(i) && s(n, `attachments.${a}`, "Duplicate attachment."), r.add(i);
2624
+ (c = o.settings) != null && c.matrix && (o.type !== "card" || o.settings.cardType !== "matrixTable" || o.settings.matrix.content === "flat" && o.format !== "csv") && d(n, `attachments.${a}.settings.matrix`, "Matrix settings require a matrixTable card attachment; flat content requires CSV.");
2625
+ const i = On(o);
2626
+ r.has(i) && d(n, `attachments.${a}`, "Duplicate attachment."), r.add(i);
2594
2627
  }), t;
2595
2628
  }
2596
- function Ne(e, n) {
2629
+ function Be(e, n) {
2597
2630
  if (e == null)
2598
2631
  return;
2599
- const t = $(e, "limits", n);
2600
- y(t, "limits", Object.keys(Y), n);
2632
+ const t = C(e, "limits", n);
2633
+ y(t, "limits", Object.keys(Q), n);
2601
2634
  const r = {};
2602
- return Object.keys(Y).forEach((o) => {
2635
+ return Object.keys(Q).forEach((o) => {
2603
2636
  const a = t[o];
2604
2637
  if (a == null)
2605
2638
  return;
2606
- const i = Y[o];
2639
+ const i = Q[o];
2607
2640
  if (typeof a != "number" || !Number.isInteger(a) || a < i.min || a > i.max) {
2608
- s(
2641
+ d(
2609
2642
  n,
2610
2643
  `limits.${o}`,
2611
2644
  `Expected an integer between ${i.min} and ${i.max}.`
@@ -2619,37 +2652,37 @@ function le(e) {
2619
2652
  if (e.length > 0)
2620
2653
  throw new W(e);
2621
2654
  }
2622
- function Pe(e, n, t) {
2623
- !(e.type === "generated_analysis" || e.type === "custom_message" && !!e.message.trim()) && n.length === 0 && s(
2655
+ function Le(e, n, t) {
2656
+ !(e.type === "generated_analysis" || e.type === "custom_message" && !!e.message.trim()) && n.length === 0 && d(
2624
2657
  t,
2625
2658
  "body",
2626
2659
  "Add briefing instructions, a custom message, or at least one attachment."
2627
2660
  );
2628
2661
  }
2629
- function Fn(e, n, t) {
2662
+ function Mn(e, n, t) {
2630
2663
  e == null || e.forEach((r, o) => {
2631
2664
  const a = `${t}.${o}.scope`, i = r.scope.attachmentIndex;
2632
2665
  if (i === void 0)
2633
- throw new L(
2666
+ throw new P(
2634
2667
  `${a}.attachmentIndex must identify the attachment that owns this presentation entry.`
2635
2668
  );
2636
2669
  const c = n[i];
2637
2670
  if (!c)
2638
- throw new L(
2671
+ throw new P(
2639
2672
  `${a}.attachmentIndex must identify an existing attachment.`
2640
2673
  );
2641
2674
  if (r.scope.dashboardId !== c.dashboardId)
2642
- throw new L(
2675
+ throw new P(
2643
2676
  `${a}.dashboardId must match the dashboard selected by the referenced attachment.`
2644
2677
  );
2645
2678
  if (c.type === "card" && r.scope.cardId !== c.cardId)
2646
- throw new L(
2679
+ throw new P(
2647
2680
  `${a}.cardId must match the card selected by the referenced attachment.`
2648
2681
  );
2649
2682
  });
2650
2683
  }
2651
- function Le(e) {
2652
- const n = [], t = $(e, "jobConfig", n);
2684
+ function Pe(e) {
2685
+ const n = [], t = C(e, "jobConfig", n);
2653
2686
  y(
2654
2687
  t,
2655
2688
  "jobConfig",
@@ -2663,23 +2696,23 @@ function Le(e) {
2663
2696
  "limits"
2664
2697
  ],
2665
2698
  n
2666
- ), t.kind !== ne && s(n, "kind", "Expected BRIEFING.");
2699
+ ), t.kind !== ne && d(n, "kind", "Expected BRIEFING.");
2667
2700
  let r;
2668
2701
  try {
2669
2702
  r = Je(
2670
2703
  t.presentationExecutionSnapshot
2671
2704
  );
2672
- } catch (d) {
2673
- if (d instanceof L)
2674
- throw d;
2675
- s(
2705
+ } catch (s) {
2706
+ if (s instanceof P)
2707
+ throw s;
2708
+ d(
2676
2709
  n,
2677
2710
  "jobConfig.presentationExecutionSnapshot",
2678
- d instanceof Error ? d.message : "Invalid presentation snapshot."
2711
+ s instanceof Error ? s.message : "Invalid presentation snapshot."
2679
2712
  );
2680
2713
  }
2681
- const o = De(t.source, n), a = Re(t.body, n), i = Be(t.attachments, n), c = Oe(t.presentation, n), l = Ne(t.limits, n);
2682
- return Pe(a, i, n), Fn(
2714
+ const o = Fe(t.source, n), a = Re(t.body, n), i = Ne(t.attachments, n), c = Oe(t.presentation, n), l = Be(t.limits, n);
2715
+ return Le(a, i, n), Mn(
2683
2716
  r == null ? void 0 : r.resolvedFormats,
2684
2717
  i,
2685
2718
  "jobConfig.presentationExecutionSnapshot.resolvedFormats"
@@ -2693,14 +2726,14 @@ function Le(e) {
2693
2726
  ...l ? { limits: l } : {}
2694
2727
  };
2695
2728
  }
2696
- function _r(e) {
2697
- return Le({
2729
+ function Or(e) {
2730
+ return Pe({
2698
2731
  ...e,
2699
2732
  kind: ne
2700
2733
  });
2701
2734
  }
2702
- function de(e, n, t, r = "deliveryConfig.recipients") {
2703
- const o = `${r}.${n}`, a = $(e, o, t), i = a.type;
2735
+ function se(e, n, t, r = "deliveryConfig.recipients") {
2736
+ const o = `${r}.${n}`, a = C(e, o, t), i = a.type;
2704
2737
  if (i === "email") {
2705
2738
  y(a, o, ["type", "address", "name"], t);
2706
2739
  const c = v(
@@ -2714,7 +2747,7 @@ function de(e, n, t, r = "deliveryConfig.recipients") {
2714
2747
  u.attachmentTitle,
2715
2748
  t
2716
2749
  );
2717
- return c && !gn(c) && s(t, `${o}.address`, "Email address is invalid."), {
2750
+ return c && !wn(c) && d(t, `${o}.address`, "Email address is invalid."), {
2718
2751
  type: "email",
2719
2752
  address: c,
2720
2753
  ...l ? { name: l } : {}
@@ -2744,24 +2777,24 @@ function de(e, n, t, r = "deliveryConfig.recipients") {
2744
2777
  u.id,
2745
2778
  t
2746
2779
  )
2747
- }) : (s(
2780
+ }) : (d(
2748
2781
  t,
2749
2782
  `${o}.type`,
2750
2783
  "Expected email, user, tenant_user, or group."
2751
2784
  ), { type: "email", address: "" });
2752
2785
  }
2753
- function Dn(e, n) {
2786
+ function Nn(e, n) {
2754
2787
  return e == null ? [] : Array.isArray(e) ? e.map(
2755
- (t, r) => de(t, r, n)
2756
- ) : (s(n, "deliveryConfig.recipients", "Expected an array."), []);
2788
+ (t, r) => se(t, r, n)
2789
+ ) : (d(n, "deliveryConfig.recipients", "Expected an array."), []);
2757
2790
  }
2758
- function Rn(e, n) {
2791
+ function Bn(e, n) {
2759
2792
  if (!Array.isArray(e))
2760
- return s(n, "deliveryConfig.channels", "Expected an array."), [];
2793
+ return d(n, "deliveryConfig.channels", "Expected an array."), [];
2761
2794
  const t = [];
2762
2795
  return e.forEach((r, o) => {
2763
2796
  if (!ze(r)) {
2764
- s(
2797
+ d(
2765
2798
  n,
2766
2799
  `deliveryConfig.channels.${o}`,
2767
2800
  "Expected EMAIL, WEBHOOK, SLACK, IN_APP, or TELEGRAM."
@@ -2771,29 +2804,29 @@ function Rn(e, n) {
2771
2804
  t.includes(r) || t.push(r);
2772
2805
  }), t;
2773
2806
  }
2774
- function On(e, n, t) {
2807
+ function Ln(e, n, t) {
2775
2808
  if (e == null)
2776
2809
  return;
2777
- const r = $(e, n, t), o = {};
2810
+ const r = C(e, n, t), o = {};
2778
2811
  return Object.entries(r).forEach(([a, i]) => {
2779
2812
  if (typeof i != "string") {
2780
- s(t, `${n}.${a}`, "Expected a string.");
2813
+ d(t, `${n}.${a}`, "Expected a string.");
2781
2814
  return;
2782
2815
  }
2783
2816
  o[a] = i.trim();
2784
2817
  }), Object.keys(o).length > 0 ? o : void 0;
2785
2818
  }
2786
- function Mn(e, n, t) {
2819
+ function Pn(e, n, t) {
2787
2820
  if (e == null)
2788
2821
  return;
2789
- const r = $(e, n, t);
2822
+ const r = C(e, n, t);
2790
2823
  y(
2791
2824
  r,
2792
2825
  n,
2793
2826
  ["url", "method", "headers", "secretEncrypted"],
2794
2827
  t
2795
2828
  );
2796
- const o = r.method === void 0 || r.method === null ? void 0 : V(r.method, `${n}.method`, ["POST", "PUT"], t), a = On(r.headers, `${n}.headers`, t), i = b(
2829
+ const o = r.method === void 0 || r.method === null ? void 0 : q(r.method, `${n}.method`, ["POST", "PUT"], t), a = Ln(r.headers, `${n}.headers`, t), i = b(
2797
2830
  r.secretEncrypted,
2798
2831
  `${n}.secretEncrypted`,
2799
2832
  2e3,
@@ -2806,8 +2839,8 @@ function Mn(e, n, t) {
2806
2839
  ...i ? { secretEncrypted: i } : {}
2807
2840
  };
2808
2841
  }
2809
- function Bn(e, n, t) {
2810
- const r = $(e, n, t), o = r.type;
2842
+ function zn(e, n, t) {
2843
+ const r = C(e, n, t), o = r.type;
2811
2844
  if (o === "channel") {
2812
2845
  y(
2813
2846
  r,
@@ -2820,7 +2853,7 @@ function Bn(e, n, t) {
2820
2853
  `${n}.channelName`,
2821
2854
  u.attachmentTitle,
2822
2855
  t
2823
- ), i = r.isPrivate === void 0 || r.isPrivate === null ? void 0 : N(
2856
+ ), i = r.isPrivate === void 0 || r.isPrivate === null ? void 0 : B(
2824
2857
  r.isPrivate,
2825
2858
  !1,
2826
2859
  `${n}.isPrivate`,
@@ -2838,31 +2871,31 @@ function Bn(e, n, t) {
2838
2871
  ...i !== void 0 ? { isPrivate: i } : {}
2839
2872
  };
2840
2873
  }
2841
- return o === "dm" ? (y(r, n, ["type", "recipient"], t), s(
2874
+ return o === "dm" ? (y(r, n, ["type", "recipient"], t), d(
2842
2875
  t,
2843
2876
  `${n}.type`,
2844
2877
  "Slack DM delivery is not supported in V1."
2845
2878
  ), {
2846
2879
  type: "dm",
2847
- recipient: de(r.recipient, 0, t, `${n}.recipient`)
2848
- }) : (s(t, `${n}.type`, "Expected channel."), { type: "channel", channelId: "" });
2880
+ recipient: se(r.recipient, 0, t, `${n}.recipient`)
2881
+ }) : (d(t, `${n}.type`, "Expected channel."), { type: "channel", channelId: "" });
2849
2882
  }
2850
- function Nn(e, n, t) {
2883
+ function Kn(e, n, t) {
2851
2884
  if (e == null)
2852
2885
  return;
2853
2886
  if (!Array.isArray(e)) {
2854
- s(t, n, "Expected an array.");
2887
+ d(t, n, "Expected an array.");
2855
2888
  return;
2856
2889
  }
2857
2890
  const r = e.map(
2858
- (o, a) => de(o, a, t, n)
2891
+ (o, a) => se(o, a, t, n)
2859
2892
  );
2860
2893
  return r.length > 0 ? r : void 0;
2861
2894
  }
2862
- function Pn(e, n, t) {
2895
+ function Un(e, n, t) {
2863
2896
  if (e == null)
2864
2897
  return;
2865
- const r = $(e, n, t);
2898
+ const r = C(e, n, t);
2866
2899
  y(
2867
2900
  r,
2868
2901
  n,
@@ -2875,28 +2908,28 @@ function Pn(e, n, t) {
2875
2908
  ],
2876
2909
  t
2877
2910
  );
2878
- const o = Nn(
2911
+ const o = Kn(
2879
2912
  r.threadMentions,
2880
2913
  `${n}.threadMentions`,
2881
2914
  t
2882
- ), a = N(
2915
+ ), a = B(
2883
2916
  r.postThreadDetail,
2884
2917
  !0,
2885
2918
  `${n}.postThreadDetail`,
2886
2919
  t
2887
- ), i = N(
2920
+ ), i = B(
2888
2921
  r.includeDashboardLink,
2889
2922
  !0,
2890
2923
  `${n}.includeDashboardLink`,
2891
2924
  t
2892
- ), c = N(
2925
+ ), c = B(
2893
2926
  r.includeBriefingLink,
2894
2927
  !0,
2895
2928
  `${n}.includeBriefingLink`,
2896
2929
  t
2897
2930
  );
2898
2931
  return {
2899
- destination: Bn(
2932
+ destination: zn(
2900
2933
  r.destination,
2901
2934
  `${n}.destination`,
2902
2935
  t
@@ -2907,8 +2940,8 @@ function Pn(e, n, t) {
2907
2940
  ...r.includeBriefingLink !== void 0 ? { includeBriefingLink: c } : {}
2908
2941
  };
2909
2942
  }
2910
- function Ln(e, n, t) {
2911
- const r = $(e, n, t);
2943
+ function Vn(e, n, t) {
2944
+ const r = C(e, n, t);
2912
2945
  y(
2913
2946
  r,
2914
2947
  n,
@@ -2926,7 +2959,7 @@ function Ln(e, n, t) {
2926
2959
  const o = R(
2927
2960
  r.formatProfile,
2928
2961
  `${n}.formatProfile`,
2929
- dn,
2962
+ fn,
2930
2963
  "concise, balanced, or detailed",
2931
2964
  t
2932
2965
  ), a = b(
@@ -2944,16 +2977,16 @@ function Ln(e, n, t) {
2944
2977
  `${n}.summaryOverride`,
2945
2978
  2e3,
2946
2979
  t
2947
- ), l = N(
2980
+ ), l = B(
2948
2981
  r.actionBlockVisible,
2949
2982
  !0,
2950
2983
  `${n}.actionBlockVisible`,
2951
2984
  t
2952
- ), d = Mn(
2985
+ ), s = Pn(
2953
2986
  r.webhookConfig,
2954
2987
  `${n}.webhookConfig`,
2955
2988
  t
2956
- ), m = Pn(
2989
+ ), m = Un(
2957
2990
  r.slackConfig,
2958
2991
  `${n}.slackConfig`,
2959
2992
  t
@@ -2965,56 +2998,56 @@ function Ln(e, n, t) {
2965
2998
  ...c ? { summaryOverride: c } : {},
2966
2999
  ...r.actionBlockVisible !== void 0 ? { actionBlockVisible: l } : {},
2967
3000
  ...m ? { slackConfig: m } : {},
2968
- ...d ? { webhookConfig: d } : {}
3001
+ ...s ? { webhookConfig: s } : {}
2969
3002
  };
2970
3003
  }
2971
- function zn(e, n) {
3004
+ function qn(e, n) {
2972
3005
  if (e == null)
2973
3006
  return;
2974
- const t = $(e, "deliveryConfig.channelConfigs", n), r = {};
3007
+ const t = C(e, "deliveryConfig.channelConfigs", n), r = {};
2975
3008
  return Object.entries(t).forEach(([o, a]) => {
2976
3009
  if (!ze(o)) {
2977
- s(
3010
+ d(
2978
3011
  n,
2979
3012
  `deliveryConfig.channelConfigs.${o}`,
2980
3013
  "Expected a supported delivery channel."
2981
3014
  );
2982
3015
  return;
2983
3016
  }
2984
- r[o] = Ln(
3017
+ r[o] = Vn(
2985
3018
  a,
2986
3019
  `deliveryConfig.channelConfigs.${o}`,
2987
3020
  n
2988
3021
  );
2989
3022
  }), Object.keys(r).length > 0 ? r : void 0;
2990
3023
  }
2991
- function Kn(e, n) {
2992
- var l, d, m;
3024
+ function jn(e, n) {
3025
+ var l, s, m;
2993
3026
  if (e == null)
2994
3027
  return null;
2995
- const t = $(e, "deliveryConfig", n);
3028
+ const t = C(e, "deliveryConfig", n);
2996
3029
  y(
2997
3030
  t,
2998
3031
  "deliveryConfig",
2999
3032
  ["recipients", "channels", "channelConfigs"],
3000
3033
  n
3001
3034
  );
3002
- const r = zn(t.channelConfigs, n), o = Dn(t.recipients, n), a = Rn(t.channels, n), i = ((d = (l = r == null ? void 0 : r.SLACK) == null ? void 0 : l.slackConfig) == null ? void 0 : d.destination.type) === "channel" && !!r.SLACK.slackConfig.destination.channelId.trim();
3035
+ const r = qn(t.channelConfigs, n), o = Nn(t.recipients, n), a = Bn(t.channels, n), i = ((s = (l = r == null ? void 0 : r.SLACK) == null ? void 0 : l.slackConfig) == null ? void 0 : s.destination.type) === "channel" && !!r.SLACK.slackConfig.destination.channelId.trim();
3003
3036
  return a.some(
3004
3037
  (p) => p !== "SLACK"
3005
- ) && o.length === 0 && s(
3038
+ ) && o.length === 0 && d(
3006
3039
  n,
3007
3040
  "deliveryConfig.recipients",
3008
3041
  "Add at least one recipient or remove delivery config."
3009
- ), a.length === 0 && s(
3042
+ ), a.length === 0 && d(
3010
3043
  n,
3011
3044
  "deliveryConfig.channels",
3012
3045
  "Choose at least one delivery channel or remove delivery config."
3013
- ), a.includes("SLACK") && !i && s(
3046
+ ), a.includes("SLACK") && !i && d(
3014
3047
  n,
3015
3048
  "deliveryConfig.channelConfigs.SLACK.slackConfig.destination.channelId",
3016
3049
  "Choose a Slack channel destination."
3017
- ), !a.includes("SLACK") && ((m = r == null ? void 0 : r.SLACK) != null && m.slackConfig) && s(
3050
+ ), !a.includes("SLACK") && ((m = r == null ? void 0 : r.SLACK) != null && m.slackConfig) && d(
3018
3051
  n,
3019
3052
  "deliveryConfig.channelConfigs.SLACK",
3020
3053
  "Slack config requires SLACK in deliveryConfig.channels."
@@ -3024,8 +3057,8 @@ function Kn(e, n) {
3024
3057
  ...r ? { channelConfigs: r } : {}
3025
3058
  };
3026
3059
  }
3027
- function se(e) {
3028
- const n = [], t = $(e, "draft", n);
3060
+ function de(e) {
3061
+ const n = [], t = C(e, "draft", n);
3029
3062
  y(
3030
3063
  t,
3031
3064
  "draft",
@@ -3054,111 +3087,114 @@ function se(e) {
3054
3087
  "description",
3055
3088
  u.description,
3056
3089
  n
3057
- ) ?? null, a = b(t.scheduleExpr, "scheduleExpr", 500, n) ?? null, i = b(t.timezone, "timezone", 200, n) ?? "UTC", c = yn(t.status, n), l = De(t.source, n), d = Re(t.body, n), m = Be(t.attachments, n), p = Oe(t.presentation, n), f = Ne(t.limits, n), h = Kn(t.deliveryConfig, n);
3058
- return Pe(d, m, n), le(n), {
3090
+ ) ?? null, a = b(t.scheduleExpr, "scheduleExpr", 500, n) ?? null, i = b(t.timezone, "timezone", 200, n) ?? "UTC", c = In(t.status, n), l = Fe(t.source, n), s = Re(t.body, n), m = Ne(t.attachments, n), p = Oe(t.presentation, n), f = Be(t.limits, n), h = jn(t.deliveryConfig, n);
3091
+ return Le(s, m, n), le(n), {
3059
3092
  name: r,
3060
3093
  description: o,
3061
3094
  status: c,
3062
3095
  scheduleExpr: a,
3063
3096
  timezone: i,
3064
3097
  source: l,
3065
- body: d,
3098
+ body: s,
3066
3099
  attachments: m,
3067
3100
  presentation: p,
3068
3101
  ...f ? { limits: f } : {},
3069
3102
  deliveryConfig: h
3070
3103
  };
3071
3104
  }
3072
- function Ar(e) {
3073
- return se(e);
3105
+ function Mr(e) {
3106
+ return de(e);
3074
3107
  }
3075
- function Fr(e) {
3076
- return se(e);
3108
+ function Nr(e) {
3109
+ return de(e);
3077
3110
  }
3078
- function Dr(e) {
3111
+ function Br(e) {
3079
3112
  try {
3080
- return { valid: !0, value: se(e), issues: [] };
3113
+ return { valid: !0, value: de(e), issues: [] };
3081
3114
  } catch (n) {
3082
3115
  if (n instanceof W)
3083
3116
  return { valid: !1, issues: n.issues };
3084
3117
  throw n;
3085
3118
  }
3086
3119
  }
3087
- function Rr(e) {
3120
+ function Lr(e) {
3088
3121
  try {
3089
- return { valid: !0, value: Le(e), issues: [] };
3122
+ return { valid: !0, value: Pe(e), issues: [] };
3090
3123
  } catch (n) {
3091
3124
  if (n instanceof W)
3092
3125
  return { valid: !1, issues: n.issues };
3093
3126
  throw n;
3094
3127
  }
3095
3128
  }
3096
- function Or(e) {
3129
+ function Pr(e) {
3097
3130
  return typeof e == "string" && Ae.has(e);
3098
3131
  }
3099
3132
  function ze(e) {
3100
- return typeof e == "string" && nn.has(e);
3133
+ return typeof e == "string" && cn.has(e);
3101
3134
  }
3102
3135
  export {
3103
- Dr as $,
3136
+ Nr as $,
3104
3137
  xe as A,
3105
- Xt as B,
3106
- Tr as C,
3107
- br as D,
3108
- xt as E,
3109
- Ct as F,
3110
- ve as G,
3111
- sr as H,
3112
- dr as I,
3113
- ne as J,
3114
- Jt as K,
3115
- re as L,
3116
- X as M,
3117
- u as N,
3118
- S as O,
3119
- en as P,
3120
- tn as Q,
3121
- T as R,
3122
- Sr as S,
3123
- W as T,
3124
- En as U,
3125
- kr as V,
3126
- Le as W,
3127
- _r as X,
3128
- se as Y,
3129
- Ar as Z,
3130
- Fr as _,
3131
- Er as a,
3132
- Rr as a0,
3133
- Or as a1,
3134
- ze as a2,
3135
- cr as a3,
3136
- $t as a4,
3137
- wt as a5,
3138
- Yt as a6,
3138
+ tn as B,
3139
+ kr as C,
3140
+ $r as D,
3141
+ _r as E,
3142
+ xt as F,
3143
+ $t as G,
3144
+ ve as H,
3145
+ pr as I,
3146
+ fr as J,
3147
+ ne as K,
3148
+ rn as L,
3149
+ re as M,
3150
+ Y as N,
3151
+ u as O,
3152
+ S as P,
3153
+ on as Q,
3154
+ E as R,
3155
+ an as S,
3156
+ Fr as T,
3157
+ W as U,
3158
+ _n as V,
3159
+ Rr as W,
3160
+ Pe as X,
3161
+ Or as Y,
3162
+ de as Z,
3163
+ Mr as _,
3164
+ Ar as a,
3165
+ Br as a0,
3166
+ Lr as a1,
3167
+ Pr as a2,
3168
+ ze as a3,
3169
+ mr as a4,
3170
+ Ct as a5,
3171
+ wt as a6,
3172
+ Yt as a7,
3173
+ Jt as a8,
3174
+ nn as a9,
3139
3175
  It as b,
3140
- ir as c,
3141
- wr as d,
3142
- lr as e,
3143
- vr as f,
3144
- xr as g,
3176
+ dr as c,
3177
+ Tr as d,
3178
+ ur as e,
3179
+ Cr as f,
3180
+ Dr as g,
3145
3181
  kt as h,
3146
- gr as i,
3182
+ wr as i,
3147
3183
  ie as j,
3148
- hr as k,
3149
- mr as l,
3150
- fr as m,
3184
+ br as k,
3185
+ hr as l,
3186
+ gr as m,
3151
3187
  we as n,
3152
- pr as o,
3153
- yr as p,
3154
- ar as q,
3188
+ vr as o,
3189
+ Ir as p,
3190
+ sr as q,
3155
3191
  _t as r,
3156
- Pt as s,
3192
+ Lt as s,
3157
3193
  ke as t,
3158
- Ir as u,
3159
- ur as v,
3160
- P as w,
3161
- $r as x,
3194
+ Er as u,
3195
+ yr as v,
3196
+ L as w,
3197
+ xr as x,
3162
3198
  Wt as y,
3163
- Cr as z
3199
+ Sr as z
3164
3200
  };