@opencxh/domain 1.253.0 → 1.255.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- const fs = 10, ms = 10, hs = 10, gs = 5, cn = /* @__PURE__ */ new Set([
1
+ const hs = 10, gs = 10, ys = 10, bs = 5, ln = /* @__PURE__ */ new Set([
2
2
  "header",
3
3
  "section",
4
4
  "context",
@@ -8,13 +8,13 @@ const fs = 10, ms = 10, hs = 10, gs = 5, cn = /* @__PURE__ */ new Set([
8
8
  "actions",
9
9
  "attachments"
10
10
  ]);
11
- function se(e) {
11
+ function ae(e) {
12
12
  if (typeof e == "string") return e.length > 0;
13
13
  if (!e || typeof e != "object") return !1;
14
14
  const t = e;
15
15
  return typeof t.key == "string" || typeof t.value == "string";
16
16
  }
17
- function ys(e, t = () => {
17
+ function _s(e, t = () => {
18
18
  }) {
19
19
  if (!Array.isArray(e)) return [];
20
20
  const n = [];
@@ -25,19 +25,19 @@ function ys(e, t = () => {
25
25
  }
26
26
  if (!r || typeof r != "object") continue;
27
27
  const o = r;
28
- if (!cn.has(o.type)) {
28
+ if (!ln.has(o.type)) {
29
29
  t(`unknown block type ${String(o.type)}`);
30
30
  continue;
31
31
  }
32
32
  switch (o.type) {
33
33
  case "header":
34
- if (!se(o.text)) {
34
+ if (!ae(o.text)) {
35
35
  t("a header without text");
36
36
  continue;
37
37
  }
38
38
  break;
39
39
  case "context":
40
- if (!se(o.text)) {
40
+ if (!ae(o.text)) {
41
41
  t("a context block without text");
42
42
  continue;
43
43
  }
@@ -59,7 +59,7 @@ function ys(e, t = () => {
59
59
  o.items.length > 10 && (t("more than 10 list items"), o.items = o.items.slice(0, 10));
60
60
  break;
61
61
  case "actions": {
62
- const i = Array.isArray(o.elements) ? o.elements : [], s = i.filter((a) => a?.action_id && a.invoke && se(a.text));
62
+ const i = Array.isArray(o.elements) ? o.elements : [], s = i.filter((a) => a?.action_id && a.invoke && ae(a.text));
63
63
  if (s.length !== i.length && t("an action without action_id, invoke or text"), s.length === 0) continue;
64
64
  s.length > 5 && t("more than 5 actions"), o.elements = s.slice(0, 5);
65
65
  break;
@@ -69,17 +69,17 @@ function ys(e, t = () => {
69
69
  }
70
70
  return n;
71
71
  }
72
- const ln = /(\*\*|__)(?=\S)([\s\S]*?\S)\1/g, un = /(\*|_)(?=\S)([^*_\n]*?\S)\1/g;
73
- function dn(e) {
72
+ const un = /(\*\*|__)(?=\S)([\s\S]*?\S)\1/g, dn = /(\*|_)(?=\S)([^*_\n]*?\S)\1/g;
73
+ function pn(e) {
74
74
  if (typeof e != "string" || !e) return "";
75
75
  let t = e;
76
76
  return t = t.replace(/```[a-z]*\n?/gi, "").replace(/~~~[a-z]*\n?/gi, ""), t = t.replace(/!\[([^\]]*)\]\([^)]*\)/g, "$1"), t = t.replace(/\[([^\]]*)\]\([^)]*\)/g, "$1"), t = t.replace(/\[([^\]]*)\]\[[^\]]*\]/g, "$1"), t = t.replace(/<((?:https?|mailto):[^>\s]+)>/gi, "$1"), t = t.split(`
77
77
  `).map(
78
78
  (n) => n.replace(/^\s{0,3}#{1,6}\s+/, "").replace(/^\s{0,3}>\s?/, "").replace(/^\s*[-*+]\s+/, "").replace(/^\s*\d+[.)]\s+/, "").replace(/^\s*(?:[-*_]\s*){3,}$/, "")
79
79
  ).join(`
80
- `), t = t.replace(ln, "$2"), t = t.replace(un, "$2"), t = t.replace(/~~(?=\S)([\s\S]*?\S)~~/g, "$1"), t = t.replace(/`([^`\n]+)`/g, "$1"), t.replace(/\s+/g, " ").trim();
80
+ `), t = t.replace(un, "$2"), t = t.replace(dn, "$2"), t = t.replace(/~~(?=\S)([\s\S]*?\S)~~/g, "$1"), t = t.replace(/`([^`\n]+)`/g, "$1"), t.replace(/\s+/g, " ").trim();
81
81
  }
82
- function pn(e) {
82
+ function fn(e) {
83
83
  return e.replace(/<style[\s\S]*?<\/style>/gi, " ").replace(/<script[\s\S]*?<\/script>/gi, " ").replace(/<[^>]+>/g, " ").replace(/&nbsp;/g, " ").replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, '"').replace(/&#39;/g, "'").replace(/\s+/g, " ").trim();
84
84
  }
85
85
  function q(e) {
@@ -87,16 +87,16 @@ function q(e) {
87
87
  const t = Math.floor(e / 60), n = Math.floor(e % 60);
88
88
  return `${t}:${n.toString().padStart(2, "0")}`;
89
89
  }
90
- function Fe(e) {
90
+ function Be(e) {
91
91
  return e ? ` — ${Math.floor(e / 60)}m ${e % 60}s` : "";
92
92
  }
93
- function ae(e) {
93
+ function ce(e) {
94
94
  return e?.split("@")?.[0] || e || "";
95
95
  }
96
96
  function Q(e) {
97
97
  return e.map((t) => t.name).join(", ");
98
98
  }
99
- function Be(e) {
99
+ function je(e) {
100
100
  return e === "meeting" ? "Meeting" : e === "video" ? "Video call" : "Audio call";
101
101
  }
102
102
  const R = {
@@ -106,7 +106,7 @@ const R = {
106
106
  channelKind: "voice",
107
107
  icon: "phone",
108
108
  snippet: () => "Gesprek gestart",
109
- timeline: (e) => e.direction === "inbound" ? `Inbound call started — ${ae(e.payload.from)}` : `Outbound call started — ${ae(e.payload.to)}`
109
+ timeline: (e) => e.direction === "inbound" ? `Inbound call started — ${ce(e.payload.from)}` : `Outbound call started — ${ce(e.payload.to)}`
110
110
  },
111
111
  VOICE_CALL_ANSWERED: {
112
112
  shape: "event",
@@ -134,14 +134,14 @@ const R = {
134
134
  channelKind: "voice",
135
135
  icon: "phone",
136
136
  snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${q(e.payload.duration)})` : ""}`,
137
- timeline: (e) => `Call ended${Fe(e.payload.duration)}`
137
+ timeline: (e) => `Call ended${Be(e.payload.duration)}`
138
138
  },
139
139
  VOICE_CALL_MISSED: {
140
140
  shape: "event",
141
141
  channelKind: "voice",
142
142
  icon: "phone",
143
143
  snippet: () => "Gemiste oproep",
144
- timeline: (e) => `Missed call — ${ae(e.payload.from)}`
144
+ timeline: (e) => `Missed call — ${ce(e.payload.from)}`
145
145
  },
146
146
  VOICE_CALL_FAILED: {
147
147
  shape: "event",
@@ -216,7 +216,7 @@ const R = {
216
216
  replyable: !0,
217
217
  carriesText: !0,
218
218
  countsAs: "inbound_message",
219
- snippet: je
219
+ snippet: He
220
220
  },
221
221
  EMAIL_SENT: {
222
222
  shape: "message",
@@ -226,7 +226,7 @@ const R = {
226
226
  replyable: !0,
227
227
  carriesText: !0,
228
228
  countsAs: "outbound_message",
229
- snippet: je
229
+ snippet: He
230
230
  },
231
231
  /* ---- chat ---- */
232
232
  CHAT_MESSAGE_SENT: {
@@ -283,7 +283,7 @@ const R = {
283
283
  channelKind: "chat",
284
284
  icon: "message-circle",
285
285
  snippet: () => "Gesprek gestart",
286
- timeline: (e) => `${Be(e.payload.callType)} started${e.payload.initiator ? ` by ${e.payload.initiator.name}` : ""}`,
286
+ timeline: (e) => `${je(e.payload.callType)} started${e.payload.initiator ? ` by ${e.payload.initiator.name}` : ""}`,
287
287
  joinUrl: (e) => e.payload.joinUrl
288
288
  },
289
289
  CHAT_CALL_ENDED: {
@@ -291,7 +291,7 @@ const R = {
291
291
  channelKind: "chat",
292
292
  icon: "message-circle",
293
293
  snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${q(e.payload.duration)})` : ""}`,
294
- timeline: (e) => `${Be(e.payload.callType)} ended${Fe(e.payload.duration)}`,
294
+ timeline: (e) => `${je(e.payload.callType)} ended${Be(e.payload.duration)}`,
295
295
  joinUrl: (e) => e.payload.joinUrl
296
296
  },
297
297
  CHAT_EVENT: {
@@ -460,63 +460,63 @@ const R = {
460
460
  timeline: (e, t) => `Status changed by ${t}`
461
461
  }
462
462
  };
463
- function je(e) {
464
- const t = e.payload, n = dn(t.bodyText).trim() || t.bodySnippet?.trim() || pn(t.body ?? "");
463
+ function He(e) {
464
+ const t = e.payload, n = pn(t.bodyText).trim() || t.bodySnippet?.trim() || fn(t.body ?? "");
465
465
  return t.subject ? `${t.subject} — ${n}` : n;
466
466
  }
467
467
  function k(e) {
468
468
  return R[e];
469
469
  }
470
- function bs(e) {
470
+ function As(e) {
471
471
  return k(e)?.icon ?? "circle";
472
472
  }
473
- function _s(e) {
473
+ function Ss(e) {
474
474
  return k(e)?.channelKind;
475
475
  }
476
- function wt(e) {
476
+ function vt(e) {
477
477
  return e === "message" || e === "note";
478
478
  }
479
- function As(e) {
480
- return wt(k(e)?.shape);
479
+ function Es(e) {
480
+ return vt(k(e)?.shape);
481
481
  }
482
- function vt(e) {
482
+ function Mt(e) {
483
483
  return e === "note";
484
484
  }
485
- function Ss(e) {
486
- return vt(k(e)?.shape);
485
+ function Ts(e) {
486
+ return Mt(k(e)?.shape);
487
487
  }
488
- function Es(e) {
488
+ function Is(e) {
489
489
  return k(e)?.replyable === !0;
490
490
  }
491
- function Ts(e) {
491
+ function ks(e) {
492
492
  return k(e)?.carriesText === !0;
493
493
  }
494
- function fn(e) {
494
+ function mn(e) {
495
495
  return k(e)?.countsAs;
496
496
  }
497
- function Is(e) {
497
+ function ws(e) {
498
498
  return k(e)?.playbookAuthored === !0;
499
499
  }
500
- function ks(e) {
500
+ function vs(e) {
501
501
  return k(e)?.connected === !0;
502
502
  }
503
- function ws(e) {
503
+ function Ms(e) {
504
504
  const t = k(e);
505
505
  return t?.shape === "artifact" && t?.carriesText === !0;
506
506
  }
507
- function mn(e) {
507
+ function hn(e) {
508
508
  const t = k(e.type)?.snippet;
509
509
  return t ? t(e) : "";
510
510
  }
511
- function vs(e, t) {
511
+ function Cs(e, t) {
512
512
  const n = k(e.type)?.timeline;
513
513
  return n ? n(e, t) : e.type.replace(/_/g, " ").toLowerCase();
514
514
  }
515
- function Ms(e) {
515
+ function Os(e) {
516
516
  const t = k(e.type)?.joinUrl;
517
517
  return t ? t(e) : void 0;
518
518
  }
519
- function ge(e, t) {
519
+ function ye(e, t) {
520
520
  let n = e;
521
521
  for (const r of t.split(".")) {
522
522
  if (n == null || typeof n != "object") return "";
@@ -524,43 +524,43 @@ function ge(e, t) {
524
524
  }
525
525
  return n == null ? "" : typeof n == "string" ? n : typeof n == "number" || typeof n == "boolean" ? String(n) : "";
526
526
  }
527
- function ye(e, t, n) {
527
+ function be(e, t, n) {
528
528
  if (e === void 0) return null;
529
529
  if (typeof e == "string") return e || null;
530
530
  if ("value" in e)
531
- return ge(t, e.value) || null;
531
+ return ye(t, e.value) || null;
532
532
  const r = {};
533
533
  for (const [i, s] of Object.entries(e.params ?? {}))
534
- r[i] = ge(t, s);
534
+ r[i] = ye(t, s);
535
535
  const o = n(e.key, r);
536
536
  return o === e.key ? null : o;
537
537
  }
538
- function hn(e, t) {
538
+ function gn(e, t) {
539
539
  if (!e || typeof e == "string" || "value" in e) return null;
540
540
  const n = {};
541
541
  for (const [r, o] of Object.entries(e.params ?? {}))
542
- n[r] = ge(t, o);
542
+ n[r] = ye(t, o);
543
543
  return { key: e.key, params: n };
544
544
  }
545
- const He = 140;
546
- function gn(e) {
545
+ const Ge = 140;
546
+ function yn(e) {
547
547
  const t = e.trim();
548
- return t.length <= He ? t : `${t.slice(0, He - 1).trimEnd()}…`;
548
+ return t.length <= Ge ? t : `${t.slice(0, Ge - 1).trimEnd()}…`;
549
549
  }
550
- function Cs(e, t) {
551
- const n = hn(t?.text, e), r = t ? ye(t.text, e, (o) => o) : null;
550
+ function xs(e, t) {
551
+ const n = gn(t?.text, e), r = t ? be(t.text, e, (o) => o) : null;
552
552
  return {
553
553
  activityId: e.id,
554
554
  type: e.type,
555
- snippet: gn(r ?? mn(e)),
555
+ snippet: yn(r ?? hn(e)),
556
556
  authorName: e.author?.name ?? "",
557
557
  direction: e.direction,
558
558
  createdAt: e.createdAt ?? Date.now(),
559
559
  ...n ? { snippetKey: n.key, snippetParams: n.params } : {}
560
560
  };
561
561
  }
562
- const yn = (e) => e;
563
- function Ge(e) {
562
+ const bn = (e) => e;
563
+ function We(e) {
564
564
  const t = R[e];
565
565
  return {
566
566
  type: e,
@@ -576,7 +576,7 @@ function Ge(e) {
576
576
  displayNameKey: t.displayNameKey
577
577
  };
578
578
  }
579
- function We(e) {
579
+ function Ve(e) {
580
580
  return {
581
581
  type: e.type,
582
582
  shape: e.shape,
@@ -591,21 +591,21 @@ function We(e) {
591
591
  displayNameKey: e.displayNameKey
592
592
  };
593
593
  }
594
- class bn {
595
- constructor(t = [], n = yn) {
594
+ class _n {
595
+ constructor(t = [], n = bn) {
596
596
  this.translate = n;
597
597
  for (const r of t)
598
598
  r?.type && (r.type in R || this.declared.has(r.type) || this.declared.set(r.type, r));
599
599
  }
600
600
  declared = /* @__PURE__ */ new Map();
601
601
  get(t) {
602
- if (t in R) return Ge(t);
602
+ if (t in R) return We(t);
603
603
  const n = this.declared.get(t);
604
- return n ? We(n) : void 0;
604
+ return n ? Ve(n) : void 0;
605
605
  }
606
606
  /** Everything that may be offered as a trigger, built-in and declared. */
607
607
  triggerable() {
608
- const t = Object.keys(R).filter((r) => R[r].triggerable).map(Ge), n = [...this.declared.values()].map(We).filter((r) => r.triggerable);
608
+ const t = Object.keys(R).filter((r) => R[r].triggerable).map(We), n = [...this.declared.values()].map(Ve).filter((r) => r.triggerable);
609
609
  return [...t, ...n];
610
610
  }
611
611
  /**
@@ -617,14 +617,14 @@ class bn {
617
617
  const r = R[t.type];
618
618
  if (r?.timeline) return r.timeline(t, n);
619
619
  const o = this.declared.get(t.type);
620
- return ye(o?.text, t, this.translate) ?? t.type.replace(/_/g, " ").toLowerCase();
620
+ return be(o?.text, t, this.translate) ?? t.type.replace(/_/g, " ").toLowerCase();
621
621
  }
622
622
  /** The line for the inbox list. Empty when the type has nothing to show. */
623
623
  snippet(t) {
624
624
  const n = R[t.type];
625
625
  if (n?.snippet) return n.snippet(t);
626
626
  const r = this.declared.get(t.type);
627
- return ye(r?.text, t, this.translate) ?? "";
627
+ return be(r?.text, t, this.translate) ?? "";
628
628
  }
629
629
  /** The descriptor as it arrived; needed to store `text` as a key. */
630
630
  descriptor(t) {
@@ -649,11 +649,11 @@ class bn {
649
649
  * {@link ResolvedActivityType}.
650
650
  */
651
651
  isMessage(t) {
652
- return wt(this.get(t)?.shape);
652
+ return vt(this.get(t)?.shape);
653
653
  }
654
654
  /** Folds into the list under the message it answers. See {@link isNoteShape}. */
655
655
  nestsUnderParent(t) {
656
- return vt(this.get(t)?.shape);
656
+ return Mt(this.get(t)?.shape);
657
657
  }
658
658
  /** Can a person reply to this? Notes cannot — those go nowhere. */
659
659
  isReplyable(t) {
@@ -681,23 +681,23 @@ class bn {
681
681
  return this.translate;
682
682
  }
683
683
  }
684
- const Os = new bn();
685
- function xs(e, t, n = []) {
684
+ const Ns = new _n();
685
+ function Rs(e, t, n = []) {
686
686
  const r = e.createdAt;
687
687
  if (!r) return [];
688
688
  const o = new Set(n);
689
689
  return e.author.type === "user" && e.author.id && o.add(e.author.id), Object.entries(t).filter(([i, s]) => s >= r && !o.has(i)).map(([i]) => i);
690
690
  }
691
- function _n(e) {
691
+ function An(e) {
692
692
  return e.createdAt ?? 0;
693
693
  }
694
- function Ns(e) {
694
+ function Ds(e) {
695
695
  return e.type === "EMAIL_RECEIVED" || e.type === "EMAIL_SENT";
696
696
  }
697
- function Rs(e) {
697
+ function $s(e) {
698
698
  return e.type === "CHAT_MESSAGE_SENT" || e.type === "CHAT_MESSAGE_RECEIVED";
699
699
  }
700
- const Mt = [
700
+ const Ct = [
701
701
  {
702
702
  id: "openai",
703
703
  attachmentKinds: ["image", "pdf"],
@@ -787,45 +787,45 @@ const Mt = [
787
787
  defaultModel: "default"
788
788
  }
789
789
  ];
790
- function re(e) {
791
- return Mt.find((t) => t.id === e);
790
+ function oe(e) {
791
+ return Ct.find((t) => t.id === e);
792
792
  }
793
- function Ds(e) {
794
- return re(e)?.label ?? e;
793
+ function Ls(e) {
794
+ return oe(e)?.label ?? e;
795
795
  }
796
- function $s(e, t = "gpt-5-mini") {
797
- return re(e)?.defaultModel ?? t;
796
+ function Ps(e, t = "gpt-5-mini") {
797
+ return oe(e)?.defaultModel ?? t;
798
798
  }
799
- function Ls(e) {
800
- return Mt.filter((t) => t.capabilities.includes(e));
799
+ function Ks(e) {
800
+ return Ct.filter((t) => t.capabilities.includes(e));
801
801
  }
802
- function Ps(e) {
803
- const t = re(e);
802
+ function Us(e) {
803
+ const t = oe(e);
804
804
  return !!t && !t.baseUrl;
805
805
  }
806
- function Ks(e, t) {
807
- return t === "text" ? !0 : re(e)?.attachmentKinds?.includes(t) === !0;
806
+ function Fs(e, t) {
807
+ return t === "text" ? !0 : oe(e)?.attachmentKinds?.includes(t) === !0;
808
808
  }
809
- function Us(e, t) {
809
+ function Bs(e, t) {
810
810
  if (!e.enabled) return "ok";
811
- const n = Ve(e.hardLimitNanos), r = Ve(e.softLimitNanos);
811
+ const n = ze(e.hardLimitNanos), r = ze(e.softLimitNanos);
812
812
  return n !== void 0 && t >= n ? "hard" : r !== void 0 && t >= r ? "soft" : "ok";
813
813
  }
814
- function Ve(e) {
814
+ function ze(e) {
815
815
  return typeof e == "number" ? e : void 0;
816
816
  }
817
- function An(e, t = "month") {
817
+ function Sn(e, t = "month") {
818
818
  const n = new Date(e);
819
819
  return Date.UTC(n.getUTCFullYear(), n.getUTCMonth(), 1);
820
820
  }
821
- function Fs(e, t = "month") {
822
- const n = new Date(An(e, t));
821
+ function js(e, t = "month") {
822
+ const n = new Date(Sn(e, t));
823
823
  return `${n.getUTCFullYear()}-${String(n.getUTCMonth() + 1).padStart(2, "0")}`;
824
824
  }
825
- function Bs(e) {
825
+ function Hs(e) {
826
826
  return e?.listeningEnabled !== !1;
827
827
  }
828
- const js = [
828
+ const Gs = [
829
829
  { id: "agent", label: "Agent", labelSource: "user" },
830
830
  { id: "team", label: "Team", labelSource: "team" },
831
831
  { id: "inbox", label: "Inbox", labelSource: "inbox" },
@@ -835,64 +835,64 @@ const js = [
835
835
  { id: "handledBy", label: "Afhandelaar", labelSource: "raw" },
836
836
  { id: "time", label: "Tijd", labelSource: "raw" }
837
837
  ];
838
- function ce(e) {
838
+ function le(e) {
839
839
  return e < 10 ? `0${e}` : `${e}`;
840
840
  }
841
841
  function G(e, t) {
842
- const n = new Date(e), r = `${n.getUTCFullYear()}-${ce(n.getUTCMonth() + 1)}-${ce(n.getUTCDate())}`;
843
- return t === "day" ? r : `${r}T${ce(n.getUTCHours())}`;
842
+ const n = new Date(e), r = `${n.getUTCFullYear()}-${le(n.getUTCMonth() + 1)}-${le(n.getUTCDate())}`;
843
+ return t === "day" ? r : `${r}T${le(n.getUTCHours())}`;
844
844
  }
845
845
  function W(e, t) {
846
846
  const n = new Date(e);
847
847
  return n.setUTCMinutes(0, 0, 0), t === "day" && n.setUTCHours(0), n.getTime();
848
848
  }
849
- const Sn = 36e5, En = 864e5;
850
- function Hs(e, t, n) {
851
- const r = n === "hour" ? Sn : En, o = [];
849
+ const En = 36e5, Tn = 864e5;
850
+ function Ws(e, t, n) {
851
+ const r = n === "hour" ? En : Tn, o = [];
852
852
  for (let i = W(e, n); i <= t; i += r)
853
853
  o.push(G(i, n));
854
854
  return o;
855
855
  }
856
- const Tn = /* @__PURE__ */ new Set(["time"]);
857
- function Gs(e, t, n) {
856
+ const In = /* @__PURE__ */ new Set(["time"]);
857
+ function Vs(e, t, n) {
858
858
  if (!e) return [];
859
859
  const r = new Set(e.supportedDimensions ?? []);
860
- return t.filter((o) => r.has(o.id) && !Tn.has(o.id)).map((o) => ({
860
+ return t.filter((o) => r.has(o.id) && !In.has(o.id)).map((o) => ({
861
861
  id: o.id,
862
862
  label: o.label,
863
863
  options: o.options?.length ? o.options : n[o.id] ?? []
864
864
  })).filter((o) => o.options.length > 0);
865
865
  }
866
- function Ws(e, t) {
866
+ function zs(e, t) {
867
867
  const n = t.find((o) => o.id === e.dimensionId), r = n?.options.find((o) => o.value === e.value);
868
868
  return `${n?.label ?? e.dimensionId} · ${r?.label ?? e.value}`;
869
869
  }
870
- function Vs(e) {
870
+ function Xs(e) {
871
871
  return { value: e.id, label: `${e.category} · ${e.label}` };
872
872
  }
873
- const In = [
873
+ const kn = [
874
874
  { id: "resource", label: "Resource", labelSource: "raw" },
875
875
  { id: "origin", label: "Herkomst", labelSource: "raw" }
876
- ], kn = In.map((e) => e.id);
877
- function wn(e, t) {
876
+ ], wn = kn.map((e) => e.id);
877
+ function vn(e, t) {
878
878
  return `${e}.usage.${t}`;
879
879
  }
880
- function zs(e, t) {
880
+ function Ys(e, t) {
881
881
  return t.map((n) => ({
882
- id: wn(e, n.unit),
882
+ id: vn(e, n.unit),
883
883
  label: n.label,
884
884
  category: "Verbruik",
885
885
  valueType: n.valueType ?? "count",
886
886
  aggregation: "sum",
887
887
  supportedDimensions: [
888
888
  "provider",
889
- ...kn,
889
+ ...wn,
890
890
  ...n.extraDimensions ?? [],
891
891
  "time"
892
892
  ]
893
893
  }));
894
894
  }
895
- const Ct = /* @__PURE__ */ new Set(["info", "success", "warning", "destructive"]), ze = 200, Xe = 100, Ye = 200, qe = 12, Qe = 4, Ze = 10, vn = 8, Je = 12, Ot = 4e3, Z = 500, Xs = 1024 * 1024, Mn = /* @__PURE__ */ new Set([
895
+ const Ot = /* @__PURE__ */ new Set(["info", "success", "warning", "destructive"]), Xe = 200, Ye = 100, qe = 200, Qe = 12, Ze = 4, Je = 10, Mn = 8, et = 12, xt = 4e3, Z = 500, qs = 1024 * 1024, Cn = /* @__PURE__ */ new Set([
896
896
  "heading",
897
897
  "paragraph",
898
898
  "list",
@@ -906,15 +906,15 @@ const Ct = /* @__PURE__ */ new Set(["info", "success", "warning", "destructive"]
906
906
  "letterhead",
907
907
  "totals",
908
908
  "pagebreak"
909
- ]), Cn = ["http:", "https:", "mailto:", "tel:"], On = /^[a-z][a-z0-9+.-]*:/i;
910
- function Oe(e) {
909
+ ]), On = ["http:", "https:", "mailto:", "tel:"], xn = /^[a-z][a-z0-9+.-]*:/i;
910
+ function xe(e) {
911
911
  const t = e.trim().replace(/^<|>$/g, "");
912
912
  if (!t) return !1;
913
- const n = On.exec(t)?.[0];
914
- return n ? Cn.includes(n.toLowerCase()) : !t.startsWith("//");
913
+ const n = xn.exec(t)?.[0];
914
+ return n ? On.includes(n.toLowerCase()) : !t.startsWith("//");
915
915
  }
916
- const xn = /^[ \t]{0,3}\[([^\]]+)\]:[ \t]*(\S+).*$/gm;
917
- function Nn(e) {
916
+ const Nn = /^[ \t]{0,3}\[([^\]]+)\]:[ \t]*(\S+).*$/gm;
917
+ function Rn(e) {
918
918
  let t = "", n = 0;
919
919
  for (; n < e.length; ) {
920
920
  const r = e[n] === "!" && e[n + 1] === "[";
@@ -922,22 +922,22 @@ function Nn(e) {
922
922
  t += e[n], n += 1;
923
923
  continue;
924
924
  }
925
- const o = n + (r ? 2 : 1), i = et(e, o, "[", "]");
925
+ const o = n + (r ? 2 : 1), i = tt(e, o, "[", "]");
926
926
  if (i < 0 || e[i + 1] !== "(") {
927
927
  t += e[n], n += 1;
928
928
  continue;
929
929
  }
930
- const s = et(e, i + 2, "(", ")");
930
+ const s = tt(e, i + 2, "(", ")");
931
931
  if (s < 0) {
932
932
  t += e[n], n += 1;
933
933
  continue;
934
934
  }
935
935
  const a = e.slice(o, i), u = e.slice(i + 2, s).trim().split(/\s+/)[0] ?? "";
936
- t += r || !Oe(u) ? a : e.slice(n, s + 1), n = s + 1;
936
+ t += r || !xe(u) ? a : e.slice(n, s + 1), n = s + 1;
937
937
  }
938
938
  return t;
939
939
  }
940
- function et(e, t, n, r) {
940
+ function tt(e, t, n, r) {
941
941
  let o = 1;
942
942
  for (let i = t; i < e.length; i += 1) {
943
943
  if (e[i] === "\\") {
@@ -950,36 +950,36 @@ function et(e, t, n, r) {
950
950
  }
951
951
  return -1;
952
952
  }
953
- function Rn(e) {
954
- return Nn(e).replace(
955
- xn,
956
- (t, n, r) => Oe(r) ? t : ""
953
+ function Dn(e) {
954
+ return Rn(e).replace(
955
+ Nn,
956
+ (t, n, r) => xe(r) ? t : ""
957
957
  );
958
958
  }
959
- function I(e, t = Ot) {
960
- return typeof e == "string" ? Rn(e).slice(0, t) : "";
959
+ function I(e, t = xt) {
960
+ return typeof e == "string" ? Dn(e).slice(0, t) : "";
961
961
  }
962
- function Dn(e, t = Ot) {
962
+ function $n(e, t = xt) {
963
963
  return typeof e == "string" ? e.slice(0, t) : "";
964
964
  }
965
965
  function B(e, t = 200) {
966
966
  return I(e, t);
967
967
  }
968
- function $n(e, t = "info") {
969
- return typeof e == "string" && Ct.has(e) ? e : t;
968
+ function Ln(e, t = "info") {
969
+ return typeof e == "string" && Ot.has(e) ? e : t;
970
970
  }
971
- function Ys(e, t = () => {
971
+ function Qs(e, t = () => {
972
972
  }) {
973
973
  if (!Array.isArray(e)) return [];
974
974
  const n = [];
975
975
  for (const r of e) {
976
- if (n.length >= ze) {
977
- t(`more than ${ze} blocks; the rest was dropped`);
976
+ if (n.length >= Xe) {
977
+ t(`more than ${Xe} blocks; the rest was dropped`);
978
978
  break;
979
979
  }
980
980
  if (!r || typeof r != "object") continue;
981
981
  const o = r;
982
- if (!Mn.has(o.type)) {
982
+ if (!Cn.has(o.type)) {
983
983
  t(`unknown block type ${String(o.type)}`);
984
984
  continue;
985
985
  }
@@ -1014,7 +1014,7 @@ function Ys(e, t = () => {
1014
1014
  break;
1015
1015
  }
1016
1016
  case "code": {
1017
- const s = Dn(o.text);
1017
+ const s = $n(o.text);
1018
1018
  if (!s) {
1019
1019
  t("a code block without text");
1020
1020
  continue;
@@ -1029,8 +1029,8 @@ function Ys(e, t = () => {
1029
1029
  case "list": {
1030
1030
  const s = Array.isArray(o.items) ? o.items : [], a = [];
1031
1031
  for (const l of s) {
1032
- if (a.length >= Xe) {
1033
- t(`more than ${Xe} list items`);
1032
+ if (a.length >= Ye) {
1033
+ t(`more than ${Ye} list items`);
1034
1034
  break;
1035
1035
  }
1036
1036
  const d = I(l?.text);
@@ -1049,8 +1049,8 @@ function Ys(e, t = () => {
1049
1049
  case "table": {
1050
1050
  const s = Array.isArray(o.columns) ? o.columns : [], a = [];
1051
1051
  for (const c of s) {
1052
- if (a.length >= qe) {
1053
- t(`more than ${qe} table columns`);
1052
+ if (a.length >= Qe) {
1053
+ t(`more than ${Qe} table columns`);
1054
1054
  break;
1055
1055
  }
1056
1056
  const p = I(c?.label, Z), f = c?.align === "right" ? "right" : void 0;
@@ -1062,8 +1062,8 @@ function Ys(e, t = () => {
1062
1062
  }
1063
1063
  const u = Array.isArray(o.rows) ? o.rows : [], l = [];
1064
1064
  for (const c of u) {
1065
- if (l.length >= Ye) {
1066
- t(`more than ${Ye} table rows`);
1065
+ if (l.length >= qe) {
1066
+ t(`more than ${qe} table rows`);
1067
1067
  break;
1068
1068
  }
1069
1069
  const p = Array.isArray(c) ? c : [];
@@ -1082,15 +1082,15 @@ function Ys(e, t = () => {
1082
1082
  case "kpi": {
1083
1083
  const s = Array.isArray(o.items) ? o.items : [], a = [];
1084
1084
  for (const u of s) {
1085
- if (a.length >= Qe) {
1086
- t(`more than ${Qe} kpi items`);
1085
+ if (a.length >= Ze) {
1086
+ t(`more than ${Ze} kpi items`);
1087
1087
  break;
1088
1088
  }
1089
1089
  const l = I(u?.value, 40), d = I(u?.label, 80);
1090
1090
  if (!l || !d) continue;
1091
1091
  const c = u?.tone;
1092
1092
  a.push(
1093
- typeof c == "string" && Ct.has(c) ? { value: l, label: d, tone: c } : { value: l, label: d }
1093
+ typeof c == "string" && Ot.has(c) ? { value: l, label: d, tone: c } : { value: l, label: d }
1094
1094
  );
1095
1095
  }
1096
1096
  if (a.length === 0) {
@@ -1102,7 +1102,7 @@ function Ys(e, t = () => {
1102
1102
  }
1103
1103
  case "image": {
1104
1104
  const s = typeof o.url == "string" ? o.url.trim() : "";
1105
- if (!s || !Oe(s)) {
1105
+ if (!s || !xe(s)) {
1106
1106
  t("an image without a usable url");
1107
1107
  continue;
1108
1108
  }
@@ -1119,8 +1119,8 @@ function Ys(e, t = () => {
1119
1119
  case "letterhead": {
1120
1120
  const s = Array.isArray(o.fields) ? o.fields : [], a = [];
1121
1121
  for (const d of s) {
1122
- if (a.length >= Ze) {
1123
- t(`more than ${Ze} letterhead fields`);
1122
+ if (a.length >= Je) {
1123
+ t(`more than ${Je} letterhead fields`);
1124
1124
  break;
1125
1125
  }
1126
1126
  const c = d, p = typeof c?.key == "string" ? c.key.slice(0, 48) : "", f = B(c?.value);
@@ -1128,7 +1128,7 @@ function Ys(e, t = () => {
1128
1128
  const y = B(c?.label, 80);
1129
1129
  a.push(y ? { key: p, label: y, value: f } : { key: p, value: f });
1130
1130
  }
1131
- const l = (Array.isArray(o.recipient) ? o.recipient : []).slice(0, vn).map((d) => B(d)).filter(Boolean);
1131
+ const l = (Array.isArray(o.recipient) ? o.recipient : []).slice(0, Mn).map((d) => B(d)).filter(Boolean);
1132
1132
  if (a.length === 0 && l.length === 0) {
1133
1133
  t("a letterhead without fields or recipient");
1134
1134
  continue;
@@ -1145,8 +1145,8 @@ function Ys(e, t = () => {
1145
1145
  const s = (l) => {
1146
1146
  const d = Array.isArray(l) ? l : [], c = [];
1147
1147
  for (const p of d) {
1148
- if (c.length >= Je) {
1149
- t(`more than ${Je} totals rows`);
1148
+ if (c.length >= et) {
1149
+ t(`more than ${et} totals rows`);
1150
1150
  break;
1151
1151
  }
1152
1152
  const f = p, y = B(f?.label), m = B(f?.amount, 40);
@@ -1177,7 +1177,7 @@ function Ys(e, t = () => {
1177
1177
  n.push({
1178
1178
  ...i,
1179
1179
  type: "callout",
1180
- tone: $n(o.tone),
1180
+ tone: Ln(o.tone),
1181
1181
  ...a ? { title: a } : {},
1182
1182
  text: s
1183
1183
  });
@@ -1187,28 +1187,28 @@ function Ys(e, t = () => {
1187
1187
  }
1188
1188
  return n;
1189
1189
  }
1190
- function qs(e) {
1190
+ function Zs(e) {
1191
1191
  return JSON.stringify(e).length;
1192
1192
  }
1193
- function Qs(e) {
1193
+ function Js(e) {
1194
1194
  return {
1195
1195
  blocks: e.length,
1196
1196
  types: e.map((t) => t.type),
1197
1197
  headings: e.flatMap((t) => t.type === "heading" ? [t.text] : [])
1198
1198
  };
1199
1199
  }
1200
- function tt(e) {
1200
+ function nt(e) {
1201
1201
  return e.replace(/\|/g, "\\|").replace(/\r?\n/g, " ").trim();
1202
1202
  }
1203
- function le(e, t, n) {
1203
+ function ue(e, t, n) {
1204
1204
  const r = e.map((o, i) => n?.[i] === "right" ? "---:" : "---");
1205
1205
  return [
1206
- `| ${e.map(tt).join(" | ")} |`,
1206
+ `| ${e.map(nt).join(" | ")} |`,
1207
1207
  `| ${r.join(" | ")} |`,
1208
- ...t.map((o) => `| ${o.map(tt).join(" | ")} |`)
1208
+ ...t.map((o) => `| ${o.map(nt).join(" | ")} |`)
1209
1209
  ];
1210
1210
  }
1211
- function Ln(e) {
1211
+ function Pn(e) {
1212
1212
  switch (e.type) {
1213
1213
  case "heading":
1214
1214
  return [`${"#".repeat(e.level)} ${e.text}`];
@@ -1226,7 +1226,7 @@ function Ln(e) {
1226
1226
  return t.lead ? `${r} **${t.lead}** ${t.text}` : `${r} ${t.text}`;
1227
1227
  });
1228
1228
  case "table": {
1229
- const t = le(
1229
+ const t = ue(
1230
1230
  e.columns.map((n) => n.label),
1231
1231
  e.rows,
1232
1232
  e.columns.map((n) => n.align ?? "left")
@@ -1234,7 +1234,7 @@ function Ln(e) {
1234
1234
  return e.caption ? [...t, "", `*${e.caption}*`] : t;
1235
1235
  }
1236
1236
  case "kpi":
1237
- return le(
1237
+ return ue(
1238
1238
  e.items.map((t) => t.value),
1239
1239
  [e.items.map((t) => t.label)]
1240
1240
  );
@@ -1252,7 +1252,7 @@ function Ln(e) {
1252
1252
  return t.map((n, r) => r < t.length - 1 ? `${n} ` : n);
1253
1253
  }
1254
1254
  case "totals":
1255
- return le(
1255
+ return ue(
1256
1256
  ["", ""],
1257
1257
  [...e.rows, ...e.taxRows ?? []].map((t) => [
1258
1258
  t.emphasis ? `**${t.label}**` : t.label,
@@ -1264,11 +1264,11 @@ function Ln(e) {
1264
1264
  return ["---"];
1265
1265
  }
1266
1266
  }
1267
- function Pn(e, t) {
1267
+ function Kn(e, t) {
1268
1268
  const n = [], r = e.some((o) => o.type === "heading" && o.level === 1);
1269
1269
  t && !r && n.push(`# ${t}`);
1270
1270
  for (const o of e) {
1271
- const i = Ln(o);
1271
+ const i = Pn(o);
1272
1272
  i.length > 0 && n.push(i.join(`
1273
1273
  `));
1274
1274
  }
@@ -1277,45 +1277,45 @@ function Pn(e, t) {
1277
1277
  `)}
1278
1278
  `;
1279
1279
  }
1280
- const xt = (e) => `user:${e}`, Nt = (e) => `team:${e}`;
1281
- function Zs(e) {
1280
+ const Nt = (e) => `user:${e}`, Rt = (e) => `team:${e}`;
1281
+ function ea(e) {
1282
1282
  const t = /* @__PURE__ */ new Set();
1283
1283
  for (const n of e ?? [])
1284
- n?.id && (n.kind === "user" && t.add(xt(n.id)), n.kind === "team" && t.add(Nt(n.id)));
1284
+ n?.id && (n.kind === "user" && t.add(Nt(n.id)), n.kind === "team" && t.add(Rt(n.id)));
1285
1285
  return [...t].sort();
1286
1286
  }
1287
- function Js(e, t) {
1288
- return [xt(e), ...t.map(Nt)];
1287
+ function ta(e, t) {
1288
+ return [Nt(e), ...t.map(Rt)];
1289
1289
  }
1290
- function ea(e) {
1290
+ function na(e) {
1291
1291
  const t = /* @__PURE__ */ new Set();
1292
1292
  for (const n of e ?? [])
1293
1293
  n?.kind && t.add(n.kind);
1294
1294
  return [...t];
1295
1295
  }
1296
- const Kn = ["done", "escalated"], ta = ["open", "waiting"];
1297
- function na(e) {
1298
- return Kn.includes(e);
1296
+ const Un = ["done", "escalated"], ra = ["open", "waiting"];
1297
+ function oa(e) {
1298
+ return Un.includes(e);
1299
1299
  }
1300
- const Un = "assignment";
1301
- function ra(e) {
1302
- return `${Un}:${e}`;
1300
+ const Fn = "assignment";
1301
+ function ia(e) {
1302
+ return `${Fn}:${e}`;
1303
1303
  }
1304
- function oa(e, t, n, r) {
1304
+ function sa(e, t, n, r) {
1305
1305
  if (e.direction === "inbound") return !0;
1306
1306
  if (e.author?.type === "user" && e.author.id === t) return !1;
1307
1307
  const o = e.payload?.mentions;
1308
1308
  return Array.isArray(o) && o.includes(t) || r && r === t ? !0 : n === "reply";
1309
1309
  }
1310
- function ia(e) {
1310
+ function aa(e) {
1311
1311
  const { targetAuthorId: t, reactorId: n, agentId: r, on: o } = e;
1312
1312
  return !o || !t || t !== r ? !1 : n !== r;
1313
1313
  }
1314
- function sa(e) {
1314
+ function ca(e) {
1315
1315
  return e.subjectKind && e.subjectId ? { type: e.subjectKind, id: e.subjectId } : void 0;
1316
1316
  }
1317
- const Fn = 12;
1318
- function aa(e, t, n = Fn) {
1317
+ const Bn = 12;
1318
+ function la(e, t, n = Bn) {
1319
1319
  const r = t + 1;
1320
1320
  return e ? e.kind === "done" ? { status: "done", waitingOn: null, turns: r, reason: e.note } : e.kind === "escalate" ? { status: "escalated", waitingOn: null, turns: r, reason: e.reason } : r >= n ? {
1321
1321
  status: "escalated",
@@ -1329,30 +1329,30 @@ function aa(e, t, n = Fn) {
1329
1329
  reason: "de agent rondde zijn beurt af zonder te zeggen wat er moet gebeuren (wachten, afronden of overdragen)"
1330
1330
  };
1331
1331
  }
1332
- const ca = "organization.business-entities.list";
1333
- function la(e, t, n) {
1332
+ const ua = "organization.business-entities.list";
1333
+ function da(e, t, n) {
1334
1334
  return e ? e === t : n;
1335
1335
  }
1336
- function Bn(e) {
1336
+ function jn(e) {
1337
1337
  const t = e.trim().replace(/[\s-]/g, "");
1338
1338
  if (!/^\d+$/.test(t) || ![8, 12, 13, 14].includes(t.length)) return;
1339
1339
  const n = t.padStart(14, "0");
1340
- return jn(n.slice(0, 13)) === Number(n[13]) ? n : void 0;
1340
+ return Hn(n.slice(0, 13)) === Number(n[13]) ? n : void 0;
1341
1341
  }
1342
- function jn(e) {
1342
+ function Hn(e) {
1343
1343
  let t = 0;
1344
1344
  for (let n = 0; n < e.length; n++)
1345
1345
  t += Number(e[n]) * (n % 2 === 0 ? 3 : 1);
1346
1346
  return (10 - t % 10) % 10;
1347
1347
  }
1348
- function ua(e, t) {
1349
- const n = t.trim(), r = Bn(n), o = [{ sku: n }, { barcodes: { $in: [n] } }];
1348
+ function pa(e, t) {
1349
+ const n = t.trim(), r = jn(n), o = [{ sku: n }, { barcodes: { $in: [n] } }];
1350
1350
  return r && o.push({ gtin: r }), { organizationId: e, $or: o };
1351
1351
  }
1352
1352
  function V(e) {
1353
1353
  return e < 0 ? -Math.round(-e) : Math.round(e);
1354
1354
  }
1355
- function Hn(e, t) {
1355
+ function Gn(e, t) {
1356
1356
  if (t.length === 0) return [];
1357
1357
  const n = t.reduce((u, l) => u + l, 0);
1358
1358
  if (n === 0) return t.map((u, l) => l === 0 ? e : 0);
@@ -1370,25 +1370,25 @@ function D(e, t = {}) {
1370
1370
  l > 0 && (s.length - l) % 3 === 0 && (u += r), u += s[l];
1371
1371
  return `${o ? "-" : ""}${u}${n}${a}`;
1372
1372
  }
1373
- function da(e) {
1373
+ function fa(e) {
1374
1374
  const t = e.trim().replace(/[\s ]/g, "");
1375
1375
  if (!t) return;
1376
1376
  const n = t.replace(/^[-+]?[^\d.,-]*/, "").replace(/[^\d.,-]+$/, ""), r = /^-/.test(t) || /-$/.test(t), o = n.replace(/-/g, "");
1377
1377
  if (!o || !/^[\d.,]+$/.test(o)) return;
1378
1378
  const i = o.lastIndexOf(","), s = o.lastIndexOf("."), a = Math.max(i, s), u = a === -1 ? "" : o.slice(a + 1), l = a !== -1 && u.length >= 1 && u.length <= 2, d = l ? o.slice(0, a) : o;
1379
- if (!Gn(d)) return;
1379
+ if (!Wn(d)) return;
1380
1380
  const c = d.replace(/[.,]/g, ""), p = l ? u.padEnd(2, "0") : "00";
1381
1381
  if (c === "") return;
1382
1382
  const f = Number(c) * 100 + Number(p);
1383
1383
  return r ? -f : f;
1384
1384
  }
1385
- function Gn(e) {
1385
+ function Wn(e) {
1386
1386
  return /^\d+$/.test(e) ? !0 : e.includes(".") && e.includes(",") ? !1 : /^\d{1,3}([.,]\d{3})*$/.test(e);
1387
1387
  }
1388
- function pa(e) {
1388
+ function ma(e) {
1389
1389
  return e.costPriceCents == null ? e.netCents : e.netCents - V(e.costPriceCents * e.quantity);
1390
1390
  }
1391
- const Wn = [
1391
+ const Vn = [
1392
1392
  {
1393
1393
  key: "contract",
1394
1394
  matches: (e, t) => !!e.contractId && e.contractId === t.contractId && !!e.productId
@@ -1410,40 +1410,40 @@ const Wn = [
1410
1410
  matches: (e, t) => !e.contractId && !e.companyId && !!e.segmentKey && e.segmentKey === t.segmentKey && !!e.categoryKey
1411
1411
  }
1412
1412
  ];
1413
- function fa(e, t, n) {
1413
+ function ha(e, t, n) {
1414
1414
  const r = n.filter(
1415
1415
  (o) => o.currency === e.currency && (o.validFrom == null || o.validFrom <= t.at) && (o.validTo == null || o.validTo >= t.at) && (o.minQuantity == null || t.quantity >= o.minQuantity) && (o.productId == null || o.productId === e.id) && (o.categoryKey == null || o.categoryKey === e.categoryKey) && (o.productId != null || o.categoryKey != null)
1416
1416
  );
1417
- for (const o of Wn) {
1417
+ for (const o of Vn) {
1418
1418
  const i = r.filter((a) => o.matches(a, t));
1419
1419
  if (i.length === 0) continue;
1420
1420
  const s = i.reduce(
1421
1421
  (a, u) => (u.minQuantity ?? 0) >= (a.minQuantity ?? 0) ? u : a
1422
1422
  );
1423
1423
  return {
1424
- unitPriceCents: Vn(s, e.listPriceCents),
1424
+ unitPriceCents: zn(s, e.listPriceCents),
1425
1425
  sourceKey: (s.minQuantity ?? 0) > 1 ? "tier" : o.key,
1426
1426
  ruleId: s.id
1427
1427
  };
1428
1428
  }
1429
1429
  return { unitPriceCents: e.listPriceCents, sourceKey: "list" };
1430
1430
  }
1431
- function Vn(e, t) {
1431
+ function zn(e, t) {
1432
1432
  return e.unitPriceCents != null ? e.unitPriceCents : e.discountPercent != null ? V(t * (1 - e.discountPercent / 100)) : t;
1433
1433
  }
1434
- const ma = ["piece", "hour", "day", "month", "km", "license"], ha = /* @__PURE__ */ new Set(["mail", "message"]);
1435
- function zn(e, t) {
1434
+ const ga = ["piece", "hour", "day", "month", "km", "license"], ya = /* @__PURE__ */ new Set(["mail", "message"]);
1435
+ function Xn(e, t) {
1436
1436
  const n = e.settings?.signatures?.[t];
1437
1437
  return !n?.enabled || !n.body || n.body.trim() === "" ? null : n;
1438
1438
  }
1439
- function ga(e, t, n, r = "html") {
1439
+ function ba(e, t, n, r = "html") {
1440
1440
  if (!e) return n;
1441
- const o = zn(e, t);
1441
+ const o = Xn(e, t);
1442
1442
  return o ? `${n}${r === "text" ? `
1443
1443
 
1444
1444
  ` : t === "mail" ? "<br><br>-- <br>" : "<br><br>"}${o.body}` : n;
1445
1445
  }
1446
- function ya(e) {
1446
+ function _a(e) {
1447
1447
  return e.endpoints ?? [];
1448
1448
  }
1449
1449
  function $(e) {
@@ -1451,18 +1451,18 @@ function $(e) {
1451
1451
  if (t)
1452
1452
  return t.split(/[-_]/)[0] || void 0;
1453
1453
  }
1454
- function ba(e) {
1454
+ function Aa(e) {
1455
1455
  return $(e.contactLocale) ?? $(e.companyLocale) ?? $(e.organizationLocale);
1456
1456
  }
1457
- function _a(e, t, n, r) {
1457
+ function Sa(e, t, n, r) {
1458
1458
  const o = e.filter((a) => a.key === t && !a.archived);
1459
1459
  if (o.length === 0) return;
1460
1460
  const i = $(n), s = $(r);
1461
1461
  return o.find((a) => $(a.locale) === i) ?? o.find((a) => $(a.locale) === s) ?? // A row with no language at all is the single-language case: it is for everybody.
1462
1462
  o.find((a) => !a.locale) ?? o[0];
1463
1463
  }
1464
- const Xn = /\{([a-zA-Z0-9_.]+)\}/g;
1465
- function Rt(e, t) {
1464
+ const Yn = /\{([a-zA-Z0-9_.]+)\}/g;
1465
+ function Dt(e, t) {
1466
1466
  let n = e;
1467
1467
  for (const r of t.split(".")) {
1468
1468
  if (n == null || typeof n != "object") return;
@@ -1470,33 +1470,33 @@ function Rt(e, t) {
1470
1470
  }
1471
1471
  return n;
1472
1472
  }
1473
- function Yn(e) {
1473
+ function qn(e) {
1474
1474
  return typeof e == "string" ? e : typeof e == "number" || typeof e == "boolean" ? String(e) : "";
1475
1475
  }
1476
- function qn(e, t, n) {
1476
+ function Qn(e, t, n) {
1477
1477
  const r = [];
1478
- return { text: e.replace(Xn, (i, s) => {
1479
- const a = Rt(t, s);
1480
- return a == null || a === "" ? (r.includes(s) || r.push(s), n ?? `{${s}}`) : Yn(a);
1478
+ return { text: e.replace(Yn, (i, s) => {
1479
+ const a = Dt(t, s);
1480
+ return a == null || a === "" ? (r.includes(s) || r.push(s), n ?? `{${s}}`) : qn(a);
1481
1481
  }), unresolved: r };
1482
1482
  }
1483
- function Qn(e, t) {
1483
+ function Zn(e, t) {
1484
1484
  if (!e) return !0;
1485
- const n = Rt(t, e.key);
1485
+ const n = Dt(t, e.key);
1486
1486
  if (e.exists !== void 0) {
1487
1487
  const r = n != null && n !== "" && n !== !1;
1488
1488
  return e.exists ? r : !r;
1489
1489
  }
1490
1490
  return e.equals !== void 0 ? n === e.equals : !0;
1491
1491
  }
1492
- function Aa(e, t, n, r, o) {
1492
+ function Ea(e, t, n, r, o) {
1493
1493
  const i = [], s = [], a = /* @__PURE__ */ new Set(), u = (l) => {
1494
- const d = qn(l, t, o);
1494
+ const d = Qn(l, t, o);
1495
1495
  for (const c of d.unresolved) i.includes(c) || i.push(c);
1496
1496
  return d.text;
1497
1497
  };
1498
1498
  for (const l of e) {
1499
- if (l.block_id && !Qn(n?.[l.block_id], t)) continue;
1499
+ if (l.block_id && !Zn(n?.[l.block_id], t)) continue;
1500
1500
  const d = l.block_id ? r?.[l.block_id] : void 0;
1501
1501
  if (d && l.block_id) {
1502
1502
  a.add(l.block_id), s.push(...d);
@@ -1586,7 +1586,7 @@ function Aa(e, t, n, r, o) {
1586
1586
  unusedSlots: Object.keys(r ?? {}).filter((l) => !a.has(l))
1587
1587
  };
1588
1588
  }
1589
- function Zn(e) {
1589
+ function Jn(e) {
1590
1590
  const t = e?.address, n = [t?.street, t?.houseNumber].filter(Boolean).join(" "), r = [t?.postalCode, t?.city].filter(Boolean).join(" ");
1591
1591
  return {
1592
1592
  name: e?.name ?? "",
@@ -1600,8 +1600,8 @@ function Zn(e) {
1600
1600
  ...e?.logo ? { logo: e.logo } : {}
1601
1601
  };
1602
1602
  }
1603
- function Sa(e) {
1604
- return Zn({
1603
+ function Ta(e) {
1604
+ return Jn({
1605
1605
  name: e?.billing?.companyName || e?.name || e?.displayName || "",
1606
1606
  address: e?.address,
1607
1607
  kvkNumber: e?.billing?.kvkNumber,
@@ -1611,24 +1611,24 @@ function Sa(e) {
1611
1611
  logo: e?.logo
1612
1612
  });
1613
1613
  }
1614
- const Jn = 36e5, er = 864e5, L = -1 / 0, Ea = (e) => e.score > L, te = {
1614
+ const er = 36e5, tr = 864e5, L = -1 / 0, Ia = (e) => e.score > L, te = {
1615
1615
  urgent: 40,
1616
1616
  high: 25,
1617
1617
  normal: 10,
1618
1618
  low: 0
1619
1619
  };
1620
- function Ta(e) {
1620
+ function ka(e) {
1621
1621
  return Object.fromEntries(e.map((t) => [t.resourceId, t]));
1622
1622
  }
1623
- const tr = /(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|newsletter|nieuwsbrief|mailer|mailing|notifications?|bounce|postmaster|marketing)@/i, Dt = /\b(unsubscribe|afmelden|uitschrijven|opt[\s-]?out|manage (your )?preferences|geen (e-?mails?|nieuwsbrief|berichten) meer)\b/i;
1624
- function nr(e, t) {
1625
- return !!(e && tr.test(e) || t && Dt.test(t));
1623
+ const nr = /(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|newsletter|nieuwsbrief|mailer|mailing|notifications?|bounce|postmaster|marketing)@/i, $t = /\b(unsubscribe|afmelden|uitschrijven|opt[\s-]?out|manage (your )?preferences|geen (e-?mails?|nieuwsbrief|berichten) meer)\b/i;
1624
+ function rr(e, t) {
1625
+ return !!(e && nr.test(e) || t && $t.test(t));
1626
1626
  }
1627
- const rr = 3, or = 600;
1628
- function Ia(e, t) {
1629
- return e >= rr || t >= or;
1627
+ const or = 3, ir = 600;
1628
+ function wa(e, t) {
1629
+ return e >= or || t >= ir;
1630
1630
  }
1631
- const ir = [
1631
+ const sr = [
1632
1632
  "list-unsubscribe",
1633
1633
  "list-unsubscribe-post",
1634
1634
  "list-id",
@@ -1638,93 +1638,93 @@ const ir = [
1638
1638
  "feedback-id",
1639
1639
  "x-mailer"
1640
1640
  ];
1641
- function ka(e) {
1641
+ function va(e) {
1642
1642
  const t = {};
1643
1643
  for (const n of e) {
1644
1644
  const r = n.name?.toLowerCase();
1645
- r && n.value !== void 0 && ir.includes(r) && (t[r] = n.value);
1645
+ r && n.value !== void 0 && sr.includes(r) && (t[r] = n.value);
1646
1646
  }
1647
1647
  return t;
1648
1648
  }
1649
- const sr = /(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|notifications?|bounce|postmaster|mailer)@/i, ar = /(^|[._+-])(newsletter|nieuwsbrief|marketing|mailing)@/i;
1650
- function wa(e) {
1649
+ const ar = /(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|notifications?|bounce|postmaster|mailer)@/i, cr = /(^|[._+-])(newsletter|nieuwsbrief|marketing|mailing)@/i;
1650
+ function Ma(e) {
1651
1651
  const t = e.headers ?? {}, n = e.from?.email, r = t["auto-submitted"]?.toLowerCase();
1652
- if (r && r !== "no" || t["x-auto-response-suppress"] || n && sr.test(n))
1652
+ if (r && r !== "no" || t["x-auto-response-suppress"] || n && ar.test(n))
1653
1653
  return "automated";
1654
1654
  const o = t.precedence?.toLowerCase();
1655
- if (t["list-unsubscribe"] || t["list-unsubscribe-post"] || t["list-id"] || o === "bulk" || o === "list" || e.body && Dt.test(e.body) || n && ar.test(n))
1655
+ if (t["list-unsubscribe"] || t["list-unsubscribe-post"] || t["list-id"] || o === "bulk" || o === "list" || e.body && $t.test(e.body) || n && cr.test(n))
1656
1656
  return "marketing";
1657
1657
  }
1658
- function cr(e, t) {
1658
+ function lr(e, t) {
1659
1659
  return e.lastActivityAt ? !(e.seenBy ?? []).includes(t) : !1;
1660
1660
  }
1661
- const lr = ["open"], ur = 1e3, dr = {
1661
+ const ur = ["open"], dr = 1e3, pr = {
1662
1662
  urgent: 1,
1663
1663
  high: 4,
1664
1664
  normal: 8,
1665
1665
  low: 24
1666
- }, pr = 72;
1667
- function fr(e) {
1668
- return e.lastActivityAt ?? (e.createdAt ? new Date(_n(e)).getTime() : 0);
1666
+ }, fr = 72;
1667
+ function mr(e) {
1668
+ return e.lastActivityAt ?? (e.createdAt ? new Date(An(e)).getTime() : 0);
1669
1669
  }
1670
- function mr(e, t) {
1671
- return hr(t.remindersById?.[e.id], e, t.now);
1670
+ function hr(e, t) {
1671
+ return gr(t.remindersById?.[e.id], e, t.now);
1672
1672
  }
1673
- function hr(e, t, n) {
1673
+ function gr(e, t, n) {
1674
1674
  return !e || e.remindAt <= n ? !1 : !((t.lastActivityAt ?? 0) > e.parkedAt && t.lastActivityPreview?.direction === "inbound");
1675
1675
  }
1676
- const $t = (e) => fn(e) === "outbound_message", Lt = (e) => lr.includes(e);
1677
- function xe(e, t) {
1678
- return Math.max(0, (t - fr(e)) / Jn);
1676
+ const Lt = (e) => mn(e) === "outbound_message", Pt = (e) => ur.includes(e);
1677
+ function Ne(e, t) {
1678
+ return Math.max(0, (t - mr(e)) / er);
1679
1679
  }
1680
- function gr(e, t) {
1680
+ function yr(e, t) {
1681
1681
  const n = e.assignedInboxId ? t?.[e.assignedInboxId] : void 0;
1682
- return typeof n == "number" && n > 0 ? n : dr[e.priority ?? "normal"];
1682
+ return typeof n == "number" && n > 0 ? n : pr[e.priority ?? "normal"];
1683
1683
  }
1684
- function va(e) {
1684
+ function Ca(e) {
1685
1685
  const t = {};
1686
1686
  for (const n of e)
1687
1687
  typeof n.slaHours == "number" && n.slaHours > 0 && (t[n.id] = n.slaHours);
1688
1688
  return t;
1689
1689
  }
1690
- function Ma(e, t, n) {
1691
- return !Lt(e.status) || e.firstResponseAt ? !1 : xe(e, t) > gr(e, n);
1690
+ function Oa(e, t, n) {
1691
+ return !Pt(e.status) || e.firstResponseAt ? !1 : Ne(e, t) > yr(e, n);
1692
1692
  }
1693
- function yr(e, t) {
1693
+ function br(e, t) {
1694
1694
  const n = e.lastActivityPreview;
1695
- return n?.direction !== "outbound" || !$t(n.type) ? !1 : xe(e, t) < pr;
1695
+ return n?.direction !== "outbound" || !Lt(n.type) ? !1 : Ne(e, t) < fr;
1696
1696
  }
1697
- function Ca(e, t) {
1698
- if (!Lt(e.status)) return { score: L, reasons: [] };
1697
+ function xa(e, t) {
1698
+ if (!Pt(e.status)) return { score: L, reasons: [] };
1699
1699
  if (e.snoozedTill && e.snoozedTill > t.now) return { score: L, reasons: [] };
1700
- if (yr(e, t.now)) return { score: L, reasons: [] };
1701
- if (mr(e, t)) return { score: L, reasons: [] };
1700
+ if (br(e, t.now)) return { score: L, reasons: [] };
1701
+ if (hr(e, t)) return { score: L, reasons: [] };
1702
1702
  let n = 0;
1703
1703
  const r = [], o = e.priority ?? "normal";
1704
- te[o] > 0 && (n += te[o], r.push(`priority:${o}`)), cr(e, t.userId) && (n += 20, r.push("unseen")), e.assignedUserId && e.assignedUserId === t.userId && (n += 15, r.push("assigned-to-you"));
1705
- const i = xe(e, t.now);
1704
+ te[o] > 0 && (n += te[o], r.push(`priority:${o}`)), lr(e, t.userId) && (n += 20, r.push("unseen")), e.assignedUserId && e.assignedUserId === t.userId && (n += 15, r.push("assigned-to-you"));
1705
+ const i = Ne(e, t.now);
1706
1706
  if (i > 0) {
1707
1707
  const u = Math.min(i * 2, 30);
1708
1708
  n += u, i >= 1 && r.push(`waiting:${Math.round(i)}h`);
1709
1709
  }
1710
1710
  const s = e.lastActivityPreview;
1711
- return s?.type === "AI_ACTION_PROPOSED" && (n += 30, r.push("awaiting-approval")), s?.direction === "outbound" && $t(s.type) && (n += 10, r.push("no-reply")), !e.firstResponseAt && e.lastActivityPreview?.direction === "inbound" && (n += 10, r.push("awaiting-reply")), (e.tags?.some((u) => u === "marketing" || u === "automated") || nr(e.remoteParty?.resource, e.lastActivityPreview?.snippet)) && (n -= ur, r.push("bulk")), { score: n, reasons: r };
1711
+ return s?.type === "AI_ACTION_PROPOSED" && (n += 30, r.push("awaiting-approval")), s?.direction === "outbound" && Lt(s.type) && (n += 10, r.push("no-reply")), !e.firstResponseAt && e.lastActivityPreview?.direction === "inbound" && (n += 10, r.push("awaiting-reply")), (e.tags?.some((u) => u === "marketing" || u === "automated") || rr(e.remoteParty?.resource, e.lastActivityPreview?.snippet)) && (n -= dr, r.push("bulk")), { score: n, reasons: r };
1712
1712
  }
1713
- const Oa = (e) => !!e.assignedUserId || !!e.assignedInboxId, xa = (e) => e.status === "closed", Na = (e) => ({
1713
+ const Na = (e) => !!e.assignedUserId || !!e.assignedInboxId, Ra = (e) => e.status === "closed", Da = (e) => ({
1714
1714
  urgent: 10,
1715
1715
  high: 5,
1716
1716
  normal: 2,
1717
1717
  low: 1
1718
- })[e.priority] || 0, Ra = (e, t = 30) => e.title?.length <= t ? e.title : `${e.title.substring(0, t)}...`;
1719
- function Da(e, t) {
1718
+ })[e.priority] || 0, $a = (e, t = 30) => e.title?.length <= t ? e.title : `${e.title.substring(0, t)}...`;
1719
+ function La(e, t) {
1720
1720
  const n = e.labels ?? [];
1721
1721
  return n.find((r) => r.locale === t)?.label ?? n[0]?.label ?? e.url;
1722
1722
  }
1723
- function $a(e, t, n) {
1723
+ function Pa(e, t, n) {
1724
1724
  const r = e.translations ?? [];
1725
1725
  return r.find((o) => o.locale === t) ?? (n ? r.find((o) => o.locale === n) : void 0) ?? { locale: t };
1726
1726
  }
1727
- const nt = [
1727
+ const rt = [
1728
1728
  { code: "nl", label: "Nederlands", english: "Dutch" },
1729
1729
  { code: "en", label: "English", english: "English" },
1730
1730
  { code: "de", label: "Deutsch", english: "German" },
@@ -1739,36 +1739,36 @@ const nt = [
1739
1739
  { code: "fi", label: "Suomi", english: "Finnish" },
1740
1740
  { code: "tr", label: "Türkçe", english: "Turkish" }
1741
1741
  ];
1742
- function Pt(e) {
1742
+ function Kt(e) {
1743
1743
  const t = (e ?? "").toLowerCase();
1744
- return nt.find((n) => n.code === t) ?? nt.find((n) => n.code === t.split("-")[0]);
1744
+ return rt.find((n) => n.code === t) ?? rt.find((n) => n.code === t.split("-")[0]);
1745
1745
  }
1746
- function La(e) {
1747
- return Pt(e)?.label ?? e;
1746
+ function Ka(e) {
1747
+ return Kt(e)?.label ?? e;
1748
1748
  }
1749
- function Pa(e) {
1750
- const t = Pt(e);
1749
+ function Ua(e) {
1750
+ const t = Kt(e);
1751
1751
  return t ? t.english === t.label ? `${t.english} (${t.code})` : `${t.english} — ${t.label} (${t.code})` : e;
1752
1752
  }
1753
- const Kt = 3;
1754
- function br(e, t) {
1753
+ const Ut = 3;
1754
+ function _r(e, t) {
1755
1755
  const n = /* @__PURE__ */ new Set();
1756
1756
  let r = 1, o = t.get(e)?.parentId;
1757
1757
  for (; o; ) {
1758
- if (n.has(o) || (n.add(o), r++, r > Kt + 1)) return 1 / 0;
1758
+ if (n.has(o) || (n.add(o), r++, r > Ut + 1)) return 1 / 0;
1759
1759
  o = t.get(o)?.parentId;
1760
1760
  }
1761
1761
  return r;
1762
1762
  }
1763
- function Ka(e, t, n) {
1763
+ function Fa(e, t, n) {
1764
1764
  if (!e) return !0;
1765
1765
  if (e === t) return !1;
1766
1766
  const r = new Map(n.map((s) => [s.id, s]));
1767
- if (!r.has(e) || t && _r(e, t, r)) return !1;
1768
- const o = br(e, r), i = t ? Ut(t, n) : 1;
1769
- return o + i <= Kt;
1767
+ if (!r.has(e) || t && Ar(e, t, r)) return !1;
1768
+ const o = _r(e, r), i = t ? Ft(t, n) : 1;
1769
+ return o + i <= Ut;
1770
1770
  }
1771
- function _r(e, t, n) {
1771
+ function Ar(e, t, n) {
1772
1772
  const r = /* @__PURE__ */ new Set();
1773
1773
  let o = n.get(e)?.parentId;
1774
1774
  for (; o; ) {
@@ -1778,48 +1778,48 @@ function _r(e, t, n) {
1778
1778
  }
1779
1779
  return !1;
1780
1780
  }
1781
- function Ut(e, t, n = /* @__PURE__ */ new Set()) {
1781
+ function Ft(e, t, n = /* @__PURE__ */ new Set()) {
1782
1782
  if (n.has(e)) return 1;
1783
1783
  n.add(e);
1784
1784
  const r = t.filter((o) => o.parentId === e);
1785
- return r.length ? 1 + Math.max(...r.map((o) => Ut(o.id, t, n))) : 1;
1785
+ return r.length ? 1 + Math.max(...r.map((o) => Ft(o.id, t, n))) : 1;
1786
1786
  }
1787
- const Ar = "en";
1788
- function Sr(e) {
1789
- return e.defaultLocale || e.locale || Ar;
1787
+ const Sr = "en";
1788
+ function Er(e) {
1789
+ return e.defaultLocale || e.locale || Sr;
1790
1790
  }
1791
- function Ua(e) {
1791
+ function Ba(e) {
1792
1792
  const t = /* @__PURE__ */ new Set(), n = [];
1793
- for (const r of [Sr(e), ...e.locales ?? []])
1793
+ for (const r of [Er(e), ...e.locales ?? []])
1794
1794
  !r || t.has(r) || (t.add(r), n.push(r));
1795
1795
  return n;
1796
1796
  }
1797
- function Fa(e, t, n) {
1797
+ function ja(e, t, n) {
1798
1798
  const r = e.translations ?? [];
1799
1799
  return r.find((o) => o.locale === t)?.name ?? (n ? r.find((o) => o.locale === n)?.name : void 0) ?? e.name;
1800
1800
  }
1801
- const rt = ["lookup", "condition", "parallel", "for-each"];
1802
- function ue(e) {
1801
+ const ot = ["lookup", "condition", "parallel", "for-each"];
1802
+ function de(e) {
1803
1803
  for (const t of e) {
1804
- if (!rt.includes(t.type))
1805
- return `staptype "${t.type}" mag niet meelezen (alleen ${rt.join(", ")})`;
1804
+ if (!ot.includes(t.type))
1805
+ return `staptype "${t.type}" mag niet meelezen (alleen ${ot.join(", ")})`;
1806
1806
  if (t.type === "parallel")
1807
1807
  for (const n of t.branches ?? []) {
1808
- const r = ue(n);
1808
+ const r = de(n);
1809
1809
  if (r) return r;
1810
1810
  }
1811
1811
  if (t.type === "for-each") {
1812
- const n = ue(t.body ?? []);
1812
+ const n = de(t.body ?? []);
1813
1813
  if (n) return n;
1814
1814
  }
1815
1815
  if (t.type === "condition") {
1816
- const n = ue(t.else ?? []);
1816
+ const n = de(t.else ?? []);
1817
1817
  if (n) return n;
1818
1818
  }
1819
1819
  }
1820
1820
  return null;
1821
1821
  }
1822
- function Er(e, t) {
1822
+ function Tr(e, t) {
1823
1823
  switch (e.kind) {
1824
1824
  case "org":
1825
1825
  return !0;
@@ -1829,29 +1829,29 @@ function Er(e, t) {
1829
1829
  return e.userId === t.userId;
1830
1830
  }
1831
1831
  }
1832
- function Ba(e, t) {
1833
- return e.filter((n) => n.enabled && Er(n.ownerScope, t));
1832
+ function Ha(e, t) {
1833
+ return e.filter((n) => n.enabled && Tr(n.ownerScope, t));
1834
1834
  }
1835
- function ja(e) {
1835
+ function Ga(e) {
1836
1836
  return e.credentialScope ? e.credentialScope : (e.authMode ?? "header") === "header" || e.oauth?.scope === "org" ? "shared" : "per-user";
1837
1837
  }
1838
- function Ha(e) {
1838
+ function Wa(e) {
1839
1839
  return `mcp__${e}__`;
1840
1840
  }
1841
- const Ga = 1e3, Wa = 2e3, Va = 500, za = 12e3, Xa = 4e3, Tr = ["contact", "company", "work_item"];
1842
- function Ya(e) {
1841
+ const Va = 1e3, za = 2e3, Xa = 500, Ya = 12e3, qa = 4e3, Ir = ["contact", "company", "work_item"];
1842
+ function Qa(e) {
1843
1843
  if (!e) return !1;
1844
1844
  const t = e.slice(0, e.indexOf(":"));
1845
- return Tr.includes(t);
1845
+ return Ir.includes(t);
1846
1846
  }
1847
- const qa = [
1847
+ const Za = [
1848
1848
  { key: "high", label: "tax_high", percent: 21, kind: "standard" },
1849
1849
  { key: "low", label: "tax_low", percent: 9, kind: "reduced" },
1850
1850
  { key: "zero", label: "tax_zero", percent: 0, kind: "zero" },
1851
1851
  { key: "reverse_charge", label: "tax_reverse_charge", percent: 0, kind: "reverse_charge" },
1852
1852
  { key: "exempt", label: "tax_exempt", percent: 0, kind: "exempt" }
1853
1853
  ];
1854
- function Ir(e, t) {
1854
+ function kr(e, t) {
1855
1855
  return t.find((n) => n.key === e) ?? {
1856
1856
  key: e,
1857
1857
  label: e,
@@ -1859,13 +1859,13 @@ function Ir(e, t) {
1859
1859
  kind: "zero"
1860
1860
  };
1861
1861
  }
1862
- function kr(e) {
1862
+ function wr(e) {
1863
1863
  if (e.kind !== "product") return 0;
1864
1864
  const t = 1 - (e.discountPercent ?? 0) / 100;
1865
1865
  return V(e.quantity * e.unitPriceCents * t);
1866
1866
  }
1867
- function Qa(e, t, n) {
1868
- const r = e.map((l) => ({ ...l, netCents: kr(l), taxCents: 0 })), o = /* @__PURE__ */ new Map();
1867
+ function Ja(e, t, n) {
1868
+ const r = e.map((l) => ({ ...l, netCents: wr(l), taxCents: 0 })), o = /* @__PURE__ */ new Map();
1869
1869
  for (let l = 0; l < r.length; l++) {
1870
1870
  if (r[l].kind !== "product" || r[l].optional) continue;
1871
1871
  const d = n ?? r[l].taxRateKey, c = o.get(d);
@@ -1874,7 +1874,7 @@ function Qa(e, t, n) {
1874
1874
  const i = [];
1875
1875
  let s = 0, a = 0;
1876
1876
  for (const [l, d] of o) {
1877
- const c = Ir(l, t), p = d.reduce((m, E) => m + r[E].netCents, 0), f = V(p * c.percent / 100), y = Hn(
1877
+ const c = kr(l, t), p = d.reduce((m, E) => m + r[E].netCents, 0), f = V(p * c.percent / 100), y = Gn(
1878
1878
  f,
1879
1879
  d.map((m) => r[m].netCents)
1880
1880
  );
@@ -1896,7 +1896,7 @@ function Qa(e, t, n) {
1896
1896
  }
1897
1897
  };
1898
1898
  }
1899
- const Za = "onboarding-source", Ja = ["support", "billing", "availability", "sales", "onboarding"], ec = ["keep", "replace"], Ne = [
1899
+ const ec = "onboarding-source", tc = ["support", "billing", "availability", "sales", "onboarding"], nc = ["keep", "replace"], Re = [
1900
1900
  {
1901
1901
  key: "shift",
1902
1902
  label: "kind_shift",
@@ -1970,44 +1970,44 @@ const Za = "onboarding-source", Ja = ["support", "billing", "availability", "sal
1970
1970
  absent: !0,
1971
1971
  icon: "party-popper"
1972
1972
  }
1973
- ], wr = {
1973
+ ], vr = {
1974
1974
  key: "unknown",
1975
1975
  label: "kind_unknown",
1976
1976
  capacity: !1,
1977
1977
  productive: !1,
1978
1978
  absent: !1
1979
1979
  };
1980
- function N(e, t = Ne) {
1981
- return t.find((n) => n.key === e) ?? { ...wr, key: e };
1980
+ function N(e, t = Re) {
1981
+ return t.find((n) => n.key === e) ?? { ...vr, key: e };
1982
1982
  }
1983
1983
  function z(e) {
1984
1984
  return e === "published" || e === "approved";
1985
1985
  }
1986
- function Ft(e, t, n = Ne) {
1986
+ function Bt(e, t, n = Re) {
1987
1987
  if (e.workstreamId !== t) return !1;
1988
1988
  const r = N(e.kindKey, n);
1989
1989
  return r.absent ? !1 : r.productive || r.capacity;
1990
1990
  }
1991
- function tc(e, t = Ne) {
1991
+ function rc(e, t = Re) {
1992
1992
  if (!e.userId || !z(e.status)) return !1;
1993
1993
  const n = N(e.kindKey, t);
1994
1994
  return n.capacity || n.productive || n.absent;
1995
1995
  }
1996
- const vr = 864e5;
1997
- function Mr(e, t) {
1998
- return Math.round((t - e) / vr);
1999
- }
2000
- function Bt(e, t) {
2001
- const n = e.cycleMinutes.length;
2002
- return n === 0 ? 0 : (Mr(e.anchor, t) % n + n) % n;
1996
+ const Mr = 864e5;
1997
+ function Cr(e, t) {
1998
+ return Math.round((t - e) / Mr);
2003
1999
  }
2004
2000
  function jt(e, t) {
2005
- return e.effectiveFrom !== void 0 && t < e.effectiveFrom ? 0 : e.cycleMinutes[Bt(e, t)] ?? 0;
2001
+ const n = e.cycleMinutes.length;
2002
+ return n === 0 ? 0 : (Cr(e.anchor, t) % n + n) % n;
2006
2003
  }
2007
2004
  function Ht(e, t) {
2008
- return e.startTimes?.[Bt(e, t)];
2005
+ return e.effectiveFrom !== void 0 && t < e.effectiveFrom ? 0 : e.cycleMinutes[jt(e, t)] ?? 0;
2009
2006
  }
2010
- function Gt(e, t, n, r) {
2007
+ function Gt(e, t) {
2008
+ return e.startTimes?.[jt(e, t)];
2009
+ }
2010
+ function Wt(e, t, n, r) {
2011
2011
  const o = e.filter(
2012
2012
  (a) => a.effectiveFrom === void 0 || a.effectiveFrom <= r
2013
2013
  ), i = (a) => a.sort((u, l) => (l.effectiveFrom ?? 0) - (u.effectiveFrom ?? 0))[0], s = i(o.filter((a) => a.userId === t));
@@ -2015,22 +2015,22 @@ function Gt(e, t, n, r) {
2015
2015
  o.filter((a) => !a.userId && a.teamId && n.includes(a.teamId))
2016
2016
  );
2017
2017
  }
2018
- function Cr(e, t, n) {
2018
+ function Or(e, t, n) {
2019
2019
  return e.filter(
2020
2020
  (r) => r.userId === t && (r.effectiveFrom === void 0 || r.effectiveFrom <= n)
2021
2021
  ).sort((r, o) => (o.effectiveFrom ?? 0) - (r.effectiveFrom ?? 0))[0];
2022
2022
  }
2023
- const be = 864e5;
2024
- function Or(e) {
2025
- const t = Math.max(1, Math.round((e.to - e.from) / be));
2026
- return Array.from({ length: t }, (n, r) => e.from + r * be);
2023
+ const _e = 864e5;
2024
+ function xr(e) {
2025
+ const t = Math.max(1, Math.round((e.to - e.from) / _e));
2026
+ return Array.from({ length: t }, (n, r) => e.from + r * _e);
2027
2027
  }
2028
- function _e(e, t, n, r) {
2028
+ function Ae(e, t, n, r) {
2029
2029
  const o = Math.min(t, r) - Math.max(e, n);
2030
2030
  return o > 0 ? o / 1e3 : 0;
2031
2031
  }
2032
- const ot = { interval: 0, day: 1, week: 2 };
2033
- function nc(e, t) {
2032
+ const it = { interval: 0, day: 1, week: 2 };
2033
+ function oc(e, t) {
2034
2034
  const { entries: n, patterns: r = [], terms: o = [] } = t, i = n.filter(
2035
2035
  (c) => c.userId && z(c.status) && N(c.kindKey).capacity
2036
2036
  ), s = n.filter(
@@ -2044,32 +2044,32 @@ function nc(e, t) {
2044
2044
  ].filter((c) => !!c), u = {};
2045
2045
  let l = "interval";
2046
2046
  const d = (c) => {
2047
- ot[c] > ot[l] && (l = c);
2047
+ it[c] > it[l] && (l = c);
2048
2048
  };
2049
2049
  for (const c of a) {
2050
2050
  const p = t.teamIdsOf?.(c) ?? [];
2051
2051
  let f = 0, y = 0, m = 0;
2052
- for (const h of Or(e)) {
2053
- const S = Math.max(h, e.from), x = Math.min(h + be, e.to);
2052
+ for (const h of xr(e)) {
2053
+ const S = Math.max(h, e.from), x = Math.min(h + _e, e.to);
2054
2054
  m++;
2055
- const C = i.filter((w) => w.userId === c).reduce((w, Ue) => w + _e(Ue.start, Ue.end, S, x), 0);
2055
+ const C = i.filter((w) => w.userId === c).reduce((w, Fe) => w + Ae(Fe.start, Fe.end, S, x), 0);
2056
2056
  if (C > 0) {
2057
2057
  f += C;
2058
2058
  continue;
2059
2059
  }
2060
- const v = Gt(r, c, p, h), O = v ? jt(v, h) : 0;
2060
+ const v = Wt(r, c, p, h), O = v ? Ht(v, h) : 0;
2061
2061
  if (v && O > 0) {
2062
- f += O * 60, d(Ht(v, h) ? "interval" : "day");
2062
+ f += O * 60, d(Gt(v, h) ? "interval" : "day");
2063
2063
  continue;
2064
2064
  }
2065
2065
  v || y++;
2066
2066
  }
2067
2067
  if (y > 0) {
2068
- const h = Cr(o, c, e.from);
2068
+ const h = Or(o, c, e.from);
2069
2069
  h && (f += h.weeklyMinutes * 60 * (y / 7), d("week"));
2070
2070
  }
2071
2071
  const E = s.filter((h) => h.userId === c).reduce(
2072
- (h, S) => h + _e(S.start, S.end, e.from, e.to),
2072
+ (h, S) => h + Ae(S.start, S.end, e.from, e.to),
2073
2073
  0
2074
2074
  ), g = Math.max(0, f - E);
2075
2075
  (g > 0 || m > 0) && (u[c] = g);
@@ -2080,7 +2080,7 @@ function nc(e, t) {
2080
2080
  byUser: u
2081
2081
  };
2082
2082
  }
2083
- function rc(e, t) {
2083
+ function ic(e, t) {
2084
2084
  if (!e.some((a) => a.userId)) return [];
2085
2085
  const n = "", r = /* @__PURE__ */ new Map();
2086
2086
  for (const a of e) {
@@ -2103,7 +2103,7 @@ function rc(e, t) {
2103
2103
  const s = r.get(n) ?? 0;
2104
2104
  return s > 0 && i.push({ requiredSeconds: s, capacitySeconds: 0, netSeconds: -s }), i;
2105
2105
  }
2106
- function oc(e, t, n, r) {
2106
+ function sc(e, t, n, r) {
2107
2107
  const o = e.filter(
2108
2108
  (s) => s.userId && z(s.status) && !N(s.kindKey).absent
2109
2109
  ), i = Object.entries(r.byUser).map(
@@ -2111,8 +2111,8 @@ function oc(e, t, n, r) {
2111
2111
  let u = 0, l = 0;
2112
2112
  for (const d of o) {
2113
2113
  if (d.userId !== s || N(d.kindKey).capacity && !d.workstreamId) continue;
2114
- const c = _e(d.start, d.end, n.from, n.to);
2115
- c <= 0 || (Ft(d, t) ? u += c : l += c);
2114
+ const c = Ae(d.start, d.end, n.from, n.to);
2115
+ c <= 0 || (Bt(d, t) ? u += c : l += c);
2116
2116
  }
2117
2117
  return {
2118
2118
  userId: s,
@@ -2125,68 +2125,68 @@ function oc(e, t, n, r) {
2125
2125
  );
2126
2126
  return i.sort((s, a) => a.freeSeconds - s.freeSeconds), i;
2127
2127
  }
2128
- const ic = "demand-source", it = 1e3;
2129
- function xr(e, t) {
2128
+ const ac = "demand-source", st = 1e3;
2129
+ function Nr(e, t) {
2130
2130
  let n = 1;
2131
2131
  for (let r = 1; r <= e; r++)
2132
2132
  n = t * n / (r + t * n);
2133
2133
  return n;
2134
2134
  }
2135
- function Nr(e, t) {
2135
+ function Rr(e, t) {
2136
2136
  if (e <= 0) return 1;
2137
2137
  if (t <= 0) return 0;
2138
2138
  if (e <= t) return 1;
2139
- const n = xr(e, t), r = t / e;
2139
+ const n = Nr(e, t), r = t / e;
2140
2140
  return n / (1 - r * (1 - n));
2141
2141
  }
2142
- function Rr(e, t, n, r) {
2143
- return r <= 0 ? 1 : e <= t ? 0 : 1 - Nr(e, t) * Math.exp(-(e - t) * n / r);
2142
+ function Dr(e, t, n, r) {
2143
+ return r <= 0 ? 1 : e <= t ? 0 : 1 - Rr(e, t) * Math.exp(-(e - t) * n / r);
2144
2144
  }
2145
- function Dr(e, t, n) {
2145
+ function $r(e, t, n) {
2146
2146
  return n <= 0 ? 0 : e * t / n;
2147
2147
  }
2148
- function $r(e, t, n, r) {
2148
+ function Lr(e, t, n, r) {
2149
2149
  if (e <= 0 || t <= 0) return 0;
2150
- const o = Dr(e, t, n);
2150
+ const o = $r(e, t, n);
2151
2151
  if (o <= 0) return 0;
2152
2152
  const i = r.serviceLevelPercent / 100, s = r.maxOccupancyPercent ? r.maxOccupancyPercent / 100 : void 0;
2153
- for (let a = Math.max(1, Math.ceil(o)); a <= it; a++)
2154
- if (!(a <= o) && !(Rr(a, o, r.targetSeconds, t) < i) && !(s && o / a > s))
2153
+ for (let a = Math.max(1, Math.ceil(o)); a <= st; a++)
2154
+ if (!(a <= o) && !(Dr(a, o, r.targetSeconds, t) < i) && !(s && o / a > s))
2155
2155
  return a;
2156
- return it;
2156
+ return st;
2157
2157
  }
2158
- const Lr = 36e5, Pr = 864e5;
2159
- function Kr(e) {
2160
- return e === "day" ? Pr : Lr;
2158
+ const Pr = 36e5, Kr = 864e5;
2159
+ function Ur(e) {
2160
+ return e === "day" ? Kr : Pr;
2161
2161
  }
2162
- function sc(e, t) {
2162
+ function cc(e, t) {
2163
2163
  return e.start < t.end && t.start < e.end;
2164
2164
  }
2165
- function de(e, t, n) {
2165
+ function pe(e, t, n) {
2166
2166
  const r = Math.min(e.end, n) - Math.max(e.start, t);
2167
2167
  return r > 0 ? r / 1e3 : 0;
2168
2168
  }
2169
- function Ur(e, t, n) {
2169
+ function Fr(e, t, n) {
2170
2170
  const r = e.handleSeconds ?? 0, o = e.seconds ?? (e.volume !== void 0 ? e.volume * r : 0);
2171
2171
  if (o <= 0 && !e.volume) return { seconds: 0, headcount: 0 };
2172
2172
  const i = (t.unplannedLossPercent ?? 0) / 100, s = i > 0 && i < 1 ? 1 / (1 - i) : 1;
2173
2173
  if (t.model === "queue" && e.volume !== void 0 && r > 0) {
2174
- const a = $r(e.volume, r, n, t);
2174
+ const a = Lr(e.volume, r, n, t);
2175
2175
  return { seconds: o, headcount: a * s };
2176
2176
  }
2177
2177
  return { seconds: o, headcount: o / n * s };
2178
2178
  }
2179
- function ac(e) {
2180
- const { entries: t, workstreamId: n, staffing: r, demand: o, range: i } = e, s = e.grain ?? "hour", a = Kr(s), u = a / 1e3, l = e.kinds, d = t.filter((m) => z(m.status)), c = d.filter((m) => Ft(m, n, l)), p = d.filter((m) => N(m.kindKey, l).capacity), f = d.filter((m) => N(m.kindKey, l).absent), y = [];
2179
+ function lc(e) {
2180
+ const { entries: t, workstreamId: n, staffing: r, demand: o, range: i } = e, s = e.grain ?? "hour", a = Ur(s), u = a / 1e3, l = e.kinds, d = t.filter((m) => z(m.status)), c = d.filter((m) => Bt(m, n, l)), p = d.filter((m) => N(m.kindKey, l).capacity), f = d.filter((m) => N(m.kindKey, l).absent), y = [];
2181
2181
  for (let m = W(i.from, s); m < i.to; m += a) {
2182
2182
  const E = m + a, g = G(m, s);
2183
2183
  let h = 0;
2184
- for (const w of c) h += de(w, m, E);
2184
+ for (const w of c) h += pe(w, m, E);
2185
2185
  let S = 0;
2186
- for (const w of p) S += de(w, m, E);
2186
+ for (const w of p) S += pe(w, m, E);
2187
2187
  let x = 0;
2188
- for (const w of f) x += de(w, m, E);
2189
- const C = o?.[g] ?? {}, v = Ur(C, r, u), O = h / u;
2188
+ for (const w of f) x += pe(w, m, E);
2189
+ const C = o?.[g] ?? {}, v = Fr(C, r, u), O = h / u;
2190
2190
  y.push({
2191
2191
  period: g,
2192
2192
  forecastVolume: C.volume,
@@ -2201,27 +2201,27 @@ function ac(e) {
2201
2201
  }
2202
2202
  return y;
2203
2203
  }
2204
- function Fr(e, t) {
2204
+ function Br(e, t) {
2205
2205
  return e.workTypeKey ?? t?.defaultWorkTypeKey;
2206
2206
  }
2207
- function cc(e, t, n) {
2208
- const r = Fr(e, t);
2207
+ function uc(e, t, n) {
2208
+ const r = Br(e, t);
2209
2209
  return r ? n.find((o) => o.key === r)?.defaultBillable ?? !1 : !1;
2210
2210
  }
2211
- function lc(e) {
2211
+ function dc(e) {
2212
2212
  return e.filter(
2213
2213
  (t) => t.netHeadcount < 0 && t.requiredHeadcount > 0
2214
2214
  );
2215
2215
  }
2216
- const Br = 36e5, Ae = 6048e5, jr = 8, Hr = 0.5, Gr = 2;
2217
- function Wr(e) {
2216
+ const jr = 36e5, Se = 6048e5, Hr = 8, Gr = 0.5, Wr = 2;
2217
+ function Vr(e) {
2218
2218
  const t = Number(e.slice(0, 4)), n = Number(e.slice(5, 7)), r = Number(e.slice(8, 10)), o = e.length > 10 ? Number(e.slice(11, 13)) : 0;
2219
2219
  return Date.UTC(t, n - 1, r, o);
2220
2220
  }
2221
- function Vr(e, t, n) {
2221
+ function zr(e, t, n) {
2222
2222
  const r = [];
2223
2223
  for (let i = 0; i < n; i++) {
2224
- const s = t - i * Ae, a = s - Ae;
2224
+ const s = t - i * Se, a = s - Se;
2225
2225
  let u = 0, l = !1;
2226
2226
  for (const [d, c] of e)
2227
2227
  d >= a && d < s && (u += c, l = !0);
@@ -2229,65 +2229,65 @@ function Vr(e, t, n) {
2229
2229
  }
2230
2230
  if (r.length < 2) return 1;
2231
2231
  const o = r.reduce((i, s) => i + s, 0) / r.length;
2232
- return o <= 0 ? 1 : Math.min(Gr, Math.max(Hr, r[0] / o));
2232
+ return o <= 0 ? 1 : Math.min(Wr, Math.max(Gr, r[0] / o));
2233
2233
  }
2234
- function zr(e, t) {
2234
+ function Xr(e, t) {
2235
2235
  if (!e?.length) return;
2236
2236
  let n;
2237
2237
  for (const r of e)
2238
2238
  t >= r.from && t < r.to && (n = r);
2239
2239
  return n;
2240
2240
  }
2241
- function uc(e, t, n) {
2242
- const r = Math.max(1, n?.weeks ?? jr), o = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set();
2241
+ function pc(e, t, n) {
2242
+ const r = Math.max(1, n?.weeks ?? Hr), o = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set();
2243
2243
  for (const u of e)
2244
- o.set(Wr(u.period), u.value), i.add(u.period.slice(0, 10));
2245
- const s = Vr(o, W(t.from, "hour"), r), a = [];
2246
- for (let u = W(t.from, "hour"); u < t.to; u += Br) {
2244
+ o.set(Vr(u.period), u.value), i.add(u.period.slice(0, 10));
2245
+ const s = zr(o, W(t.from, "hour"), r), a = [];
2246
+ for (let u = W(t.from, "hour"); u < t.to; u += jr) {
2247
2247
  let l = 0, d = 0;
2248
2248
  for (let f = 1; f <= r; f++) {
2249
- const y = u - f * Ae, E = o.get(y) ?? (i.has(G(y, "day")) ? 0 : void 0);
2249
+ const y = u - f * Se, E = o.get(y) ?? (i.has(G(y, "day")) ? 0 : void 0);
2250
2250
  if (E === void 0) continue;
2251
2251
  const g = r - f + 1;
2252
2252
  l += E * g, d += g;
2253
2253
  }
2254
2254
  let c = d > 0 ? l / d * s : 0;
2255
- const p = zr(n?.adjustments, u);
2255
+ const p = Xr(n?.adjustments, u);
2256
2256
  p?.absoluteVolume !== void 0 ? c = p.absoluteVolume : p?.factor !== void 0 && (c *= p.factor), a.push({ period: G(u, "hour"), volume: c });
2257
2257
  }
2258
2258
  return a;
2259
2259
  }
2260
- const Xr = "schedule_entry", Yr = "workstream";
2261
- function dc(e) {
2262
- return `${Xr}:${e}`;
2263
- }
2264
- function pc(e) {
2260
+ const Yr = "schedule_entry", qr = "workstream";
2261
+ function fc(e) {
2265
2262
  return `${Yr}:${e}`;
2266
2263
  }
2267
- const Se = 36e5, U = 864e5;
2268
- function qr(e, t) {
2269
- const n = t === "day" ? U : Se, r = [];
2264
+ function mc(e) {
2265
+ return `${qr}:${e}`;
2266
+ }
2267
+ const Ee = 36e5, U = 864e5;
2268
+ function Qr(e, t) {
2269
+ const n = t === "day" ? U : Ee, r = [];
2270
2270
  for (let o = W(e.from, t); o < e.to; o += n) r.push(o);
2271
2271
  return r;
2272
2272
  }
2273
- function st(e) {
2273
+ function at(e) {
2274
2274
  const t = Math.max(1, Math.round((e.to - e.from) / U));
2275
2275
  return Array.from({ length: t }, (n, r) => e.from + r * U);
2276
2276
  }
2277
- function pe(e, t, n, r) {
2277
+ function fe(e, t, n, r) {
2278
2278
  const o = Math.min(t, r) - Math.max(e, n);
2279
2279
  return o > 0 ? o / 1e3 : 0;
2280
2280
  }
2281
- function fc(e, t, n = {}) {
2282
- const r = n.grain ?? "hour", o = qr(t, r), i = r === "day" ? U : Se, s = new Map(o.map((c) => [c, 0])), a = e.filter((c) => c.userId && N(c.kindKey).capacity), u = n.userIds?.length ? new Set(n.userIds) : null, l = /* @__PURE__ */ new Set();
2281
+ function hc(e, t, n = {}) {
2282
+ const r = n.grain ?? "hour", o = Qr(t, r), i = r === "day" ? U : Ee, s = new Map(o.map((c) => [c, 0])), a = e.filter((c) => c.userId && N(c.kindKey).capacity), u = n.userIds?.length ? new Set(n.userIds) : null, l = /* @__PURE__ */ new Set();
2283
2283
  for (const c of a)
2284
2284
  if (!(u && c.userId && !u.has(c.userId))) {
2285
2285
  for (const p of o) {
2286
- const f = pe(c.start, c.end, p, p + i);
2286
+ const f = fe(c.start, c.end, p, p + i);
2287
2287
  f > 0 && s.set(p, (s.get(p) ?? 0) + f);
2288
2288
  }
2289
- for (const p of st(t))
2290
- pe(c.start, c.end, p, p + U) > 0 && l.add(`${c.userId}:${p}`);
2289
+ for (const p of at(t))
2290
+ fe(c.start, c.end, p, p + U) > 0 && l.add(`${c.userId}:${p}`);
2291
2291
  }
2292
2292
  const d = n.userIds ?? [
2293
2293
  .../* @__PURE__ */ new Set([
@@ -2298,17 +2298,17 @@ function fc(e, t, n = {}) {
2298
2298
  if (n.patterns?.length)
2299
2299
  for (const c of d) {
2300
2300
  const p = n.teamIdsOf?.(c) ?? [];
2301
- for (const f of st(t)) {
2301
+ for (const f of at(t)) {
2302
2302
  if (l.has(`${c}:${f}`)) continue;
2303
- const y = Gt(n.patterns, c, p, f);
2303
+ const y = Wt(n.patterns, c, p, f);
2304
2304
  if (!y) continue;
2305
- const m = jt(y, f);
2305
+ const m = Ht(y, f);
2306
2306
  if (m <= 0) continue;
2307
- const E = Ht(y, f);
2307
+ const E = Gt(y, f);
2308
2308
  if (E) {
2309
- const [S, x] = E.split(":").map(Number), C = f + S * Se + (x ?? 0) * 6e4, v = C + m * 6e4;
2309
+ const [S, x] = E.split(":").map(Number), C = f + S * Ee + (x ?? 0) * 6e4, v = C + m * 6e4;
2310
2310
  for (const O of o) {
2311
- const w = pe(C, v, O, O + i);
2311
+ const w = fe(C, v, O, O + i);
2312
2312
  w > 0 && s.set(O, (s.get(O) ?? 0) + w);
2313
2313
  }
2314
2314
  continue;
@@ -2321,7 +2321,7 @@ function fc(e, t, n = {}) {
2321
2321
  }
2322
2322
  return o.map((c) => ({ period: G(c, r), weight: s.get(c) ?? 0 }));
2323
2323
  }
2324
- function Qr(e, t) {
2324
+ function Zr(e, t) {
2325
2325
  if (e <= 0 || !t.length) return [];
2326
2326
  const n = t.reduce((r, o) => r + Math.max(0, o.weight), 0);
2327
2327
  if (n <= 0) {
@@ -2330,11 +2330,11 @@ function Qr(e, t) {
2330
2330
  }
2331
2331
  return t.filter((r) => r.weight > 0).map((r) => ({ period: r.period, seconds: e * r.weight / n }));
2332
2332
  }
2333
- function mc(e, t, n) {
2333
+ function gc(e, t, n) {
2334
2334
  const r = /* @__PURE__ */ new Map();
2335
2335
  for (const o of e) {
2336
2336
  const i = o.by ? t.filter((a) => n(a.period) < o.by) : t, s = i.length ? i : t;
2337
- for (const a of Qr(o.seconds, s)) {
2337
+ for (const a of Zr(o.seconds, s)) {
2338
2338
  const u = `${a.period}|${o.userId ?? ""}`, l = r.get(u);
2339
2339
  l ? l.seconds += a.seconds : r.set(u, { ...a, userId: o.userId });
2340
2340
  }
@@ -2343,7 +2343,7 @@ function mc(e, t, n) {
2343
2343
  (o, i) => o.period.localeCompare(i.period) || (o.userId ?? "").localeCompare(i.userId ?? "")
2344
2344
  );
2345
2345
  }
2346
- function Zr(e) {
2346
+ function Jr(e) {
2347
2347
  switch (e.kind) {
2348
2348
  case "user":
2349
2349
  return `user:${e.userId}`;
@@ -2353,7 +2353,7 @@ function Zr(e) {
2353
2353
  return "org";
2354
2354
  }
2355
2355
  }
2356
- function hc(e) {
2356
+ function yc(e) {
2357
2357
  if (typeof e != "string") return;
2358
2358
  const t = e.trim();
2359
2359
  if (t === "org") return { kind: "org" };
@@ -2365,10 +2365,10 @@ function hc(e) {
2365
2365
  if (r === "team") return { kind: "team", teamId: o };
2366
2366
  }
2367
2367
  }
2368
- function Jr(e) {
2369
- return Zr(e);
2370
- }
2371
2368
  function eo(e) {
2369
+ return Jr(e);
2370
+ }
2371
+ function to(e) {
2372
2372
  switch (e.kind) {
2373
2373
  case "personal":
2374
2374
  return { kind: "user", userId: e.userId };
@@ -2378,14 +2378,14 @@ function eo(e) {
2378
2378
  return { kind: "org" };
2379
2379
  }
2380
2380
  }
2381
- const to = eo;
2382
- function gc(e) {
2383
- return e.agentId ? { kind: "user", userId: e.agentId } : to(e.ownerScope);
2381
+ const no = to;
2382
+ function bc(e) {
2383
+ return e.agentId ? { kind: "user", userId: e.agentId } : no(e.ownerScope);
2384
2384
  }
2385
- function yc(e) {
2386
- return Jr(e);
2385
+ function _c(e) {
2386
+ return eo(e);
2387
2387
  }
2388
- function bc(e, t) {
2388
+ function Ac(e, t) {
2389
2389
  if (!t) return;
2390
2390
  let n = e;
2391
2391
  for (const r of t.split(".")) {
@@ -2394,24 +2394,35 @@ function bc(e, t) {
2394
2394
  }
2395
2395
  return n;
2396
2396
  }
2397
- function _c(e, t) {
2397
+ function Sc(e, t) {
2398
2398
  return e.targets.find((n) => n.activityTypes.includes(t));
2399
2399
  }
2400
- function Ac(e, t) {
2400
+ function Ec(e, t) {
2401
2401
  if (t)
2402
2402
  return e.targets.find((n) => n.id === t);
2403
2403
  }
2404
- function no(e) {
2404
+ function ro(e) {
2405
2405
  return e?.kind === "assignment";
2406
2406
  }
2407
- function Sc(e) {
2407
+ function Tc(e) {
2408
2408
  const { trigger: t, agentId: n, target: r, activityType: o, assigneeUserId: i, authorUserId: s } = e;
2409
- return no(t) ? n ? r ? r.activityTypes.includes(o) ? i ? i !== n ? "assigned to someone else" : s && s === n ? "the agent assigned this to itself, which would restart its own run" : null : `no assignee found at ${r.assigneePath}` : `activity type ${o} does not announce an assignment for ${r.id}` : `assignment target kind "${t.targetKind}" is not declared by any installed app` : "this playbook has no agent, so an assignment can never be for it" : "trigger is not an assignment trigger";
2409
+ return ro(t) ? n ? r ? r.activityTypes.includes(o) ? i ? i !== n ? "assigned to someone else" : s && s === n ? "the agent assigned this to itself, which would restart its own run" : null : `no assignee found at ${r.assigneePath}` : `activity type ${o} does not announce an assignment for ${r.id}` : `assignment target kind "${t.targetKind}" is not declared by any installed app` : "this playbook has no agent, so an assignment can never be for it" : "trigger is not an assignment trigger";
2410
+ }
2411
+ function Ic(e) {
2412
+ return ne(e).replace(/__/g, " · ").replace(/\./g, " · ").replace(/_/g, " ");
2413
+ }
2414
+ function ne(e) {
2415
+ return e.startsWith("tool:") ? e.slice(5) : e;
2416
+ }
2417
+ function oo(e) {
2418
+ const t = ne(e).split("__");
2419
+ return t[t.length - 1] || ne(e);
2410
2420
  }
2411
- function Ec(e) {
2412
- return (e.startsWith("tool:") ? e.slice(5) : e).replace(/__/g, " · ").replace(/\./g, " · ").replace(/_/g, " ");
2421
+ function kc(e) {
2422
+ const t = oo(e).replace(/[_.]+/g, " ").trim();
2423
+ return t ? t.charAt(0).toUpperCase() + t.slice(1) : ne(e);
2413
2424
  }
2414
- const Tc = [
2425
+ const wc = [
2415
2426
  { name: "text", type: "string" },
2416
2427
  { name: "subject", type: "string" },
2417
2428
  { name: "from", type: "string" },
@@ -2428,12 +2439,12 @@ const Tc = [
2428
2439
  { name: "textRaw", type: "string" },
2429
2440
  // Only filled on INTERACTION_STATUS_CHANGED; a filter like `trigger.toStatus == "closed"` is
2430
2441
  // the trigger for "remember this when closing".
2431
- { name: "fromStatus", type: "string" },
2432
- { name: "toStatus", type: "string" },
2442
+ { name: "fromStatus", type: "string", onlyFor: ["INTERACTION_STATUS_CHANGED"] },
2443
+ { name: "toStatus", type: "string", onlyFor: ["INTERACTION_STATUS_CHANGED"] },
2433
2444
  // Only on WORK_ITEM_STATUS_CHANGED: the *category* of the new status (`todo`/`in_progress`/
2434
2445
  // `done`). A filter must key on this and not on `toStatus`, because status keys are the
2435
2446
  // organisation's own — a template shipping `"done"` as a key fits exactly one ladder.
2436
- { name: "toCategory", type: "string" },
2447
+ { name: "toCategory", type: "string", onlyFor: ["WORK_ITEM_STATUS_CHANGED"] },
2437
2448
  // Who this conversation is with. The identity layer records the resolution as
2438
2449
  // `contact:<id>`/`company:<id>` in `Interaction.partyKeys`, so this is a recorded fact and not a
2439
2450
  // guess via `remoteParty`. Empty while the identity is unresolved (an unknown number, a first
@@ -2451,7 +2462,11 @@ const Tc = [
2451
2462
  // `buildTriggerVars` cannot fill it itself: the job does that with the catalog in hand, before
2452
2463
  // the trigger filter runs — like contactId/companyId above.
2453
2464
  { name: "assigneeUserId", type: "string" }
2454
- ], Ic = {
2465
+ ];
2466
+ function vc(e, t) {
2467
+ return !e.onlyFor || !t?.length ? !0 : t.some((n) => e.onlyFor?.includes(n));
2468
+ }
2469
+ const Mc = {
2455
2470
  topics: [
2456
2471
  { name: "topicId", type: "string" },
2457
2472
  { name: "topic", type: "string" },
@@ -2465,58 +2480,58 @@ const Tc = [
2465
2480
  // Deliberately empty: the fields come from `ClassifyStep.fields` and so differ per step.
2466
2481
  extract: []
2467
2482
  };
2468
- function ro(e) {
2483
+ function io(e) {
2469
2484
  return `${e.type}:${e.id}`;
2470
2485
  }
2471
- const oo = "interaction";
2472
- function io(e) {
2473
- return e?.type === oo ? e.id : void 0;
2486
+ const so = "interaction";
2487
+ function ao(e) {
2488
+ return e?.type === so ? e.id : void 0;
2474
2489
  }
2475
- const so = 64, ao = 8e3;
2476
- function kc(e) {
2490
+ const co = 64, lo = 8e3;
2491
+ function Cc(e) {
2477
2492
  const t = typeof e == "number" ? e : Number(String(e ?? "").trim());
2478
2493
  if (!(!Number.isFinite(t) || t <= 0))
2479
- return Math.min(Math.max(Math.round(t), so), ao);
2494
+ return Math.min(Math.max(Math.round(t), co), lo);
2480
2495
  }
2481
- const wc = { kind: "workflow", steps: [] };
2482
- function vc(e) {
2496
+ const Oc = { kind: "workflow", steps: [] };
2497
+ function xc(e) {
2483
2498
  return e?.kind === "workflow" ? e.steps : [];
2484
2499
  }
2485
- function Mc(e) {
2500
+ function Nc(e) {
2486
2501
  return e?.kind === "procedure" ? e.procedure : void 0;
2487
2502
  }
2488
- function co(e) {
2503
+ function uo(e) {
2489
2504
  const t = e?.approved ?? 0, n = t + (e?.rejected ?? 0);
2490
2505
  return { total: n, rate: n ? t / n : 0 };
2491
2506
  }
2492
- const lo = 10, uo = 0.9;
2493
- function Cc(e) {
2494
- const { total: t, rate: n } = co(e);
2495
- return t >= lo && n >= uo;
2507
+ const po = 10, fo = 0.9;
2508
+ function Rc(e) {
2509
+ const { total: t, rate: n } = uo(e);
2510
+ return t >= po && n >= fo;
2496
2511
  }
2497
- const po = ["done", "escalated", "failed", "stopped"];
2498
- function Oc(e) {
2499
- return po.includes(e);
2512
+ const mo = ["done", "escalated", "failed", "stopped"];
2513
+ function Dc(e) {
2514
+ return mo.includes(e);
2500
2515
  }
2501
- function fo(e) {
2516
+ function ho(e) {
2502
2517
  return e === "waiting";
2503
2518
  }
2504
- function xc(e) {
2505
- return e === "running" || fo(e);
2519
+ function $c(e) {
2520
+ return e === "running" || ho(e);
2506
2521
  }
2507
- function Wt(e) {
2522
+ function Vt(e) {
2508
2523
  return e.subjectKind && e.subjectId ? { type: e.subjectKind, id: e.subjectId } : void 0;
2509
2524
  }
2510
- function Nc(e) {
2511
- const t = Wt(e);
2512
- return t ? ro(t) : void 0;
2525
+ function Lc(e) {
2526
+ const t = Vt(e);
2527
+ return t ? io(t) : void 0;
2513
2528
  }
2514
- function Rc(e) {
2515
- return io(Wt(e));
2529
+ function Pc(e) {
2530
+ return ao(Vt(e));
2516
2531
  }
2517
- function Dc(e) {
2532
+ function Kc(e) {
2518
2533
  const t = [], n = /* @__PURE__ */ new Map();
2519
- for (const r of [...e].sort(mo)) {
2534
+ for (const r of [...e].sort(go)) {
2520
2535
  const o = n.get(r.emoji);
2521
2536
  if (o) {
2522
2537
  o.push(r.actor);
@@ -2529,58 +2544,58 @@ function Dc(e) {
2529
2544
  return { emoji: r, count: o.length, actors: o };
2530
2545
  }).sort((r, o) => o.count - r.count || t.indexOf(r.emoji) - t.indexOf(o.emoji));
2531
2546
  }
2532
- const mo = (e, t) => (e.createdAt ?? 0) - (t.createdAt ?? 0);
2533
- function $c(e, t) {
2547
+ const go = (e, t) => (e.createdAt ?? 0) - (t.createdAt ?? 0);
2548
+ function Uc(e, t) {
2534
2549
  return t ? e.actors.some((n) => n.type === "user" && n.id === t) : !1;
2535
2550
  }
2536
- const Ee = 6e4, ho = 36e5, X = 864e5, Vt = 800;
2537
- function at(e, t) {
2551
+ const Te = 6e4, yo = 36e5, X = 864e5, zt = 800;
2552
+ function ct(e, t) {
2538
2553
  const n = Date.UTC(e, t + 1, 0);
2539
- return n - new Date(n).getUTCDay() * X + ho;
2554
+ return n - new Date(n).getUTCDay() * X + yo;
2540
2555
  }
2541
- function go(e) {
2556
+ function bo(e) {
2542
2557
  const t = new Date(e).getUTCFullYear();
2543
- return e >= at(t, 2) && e < at(t, 9);
2558
+ return e >= ct(t, 2) && e < ct(t, 9);
2544
2559
  }
2545
- function zt(e, t) {
2546
- const n = t.dst === "eu" && go(e) ? 60 : 0;
2547
- return (t.utcOffsetMinutes + n) * Ee;
2560
+ function Xt(e, t) {
2561
+ const n = t.dst === "eu" && bo(e) ? 60 : 0;
2562
+ return (t.utcOffsetMinutes + n) * Te;
2548
2563
  }
2549
- function yo(e) {
2564
+ function _o(e) {
2550
2565
  return (e + 3) % 7 + 1;
2551
2566
  }
2552
- function Xt(e, t) {
2553
- const n = zt(e, t), r = e + n, o = Math.floor(r / X);
2554
- if (!t.days.includes(yo(o))) return null;
2567
+ function Yt(e, t) {
2568
+ const n = Xt(e, t), r = e + n, o = Math.floor(r / X);
2569
+ if (!t.days.includes(_o(o))) return null;
2555
2570
  const i = o * X;
2556
2571
  return {
2557
- open: i + t.fromMinutes * Ee - n,
2558
- close: i + t.toMinutes * Ee - n
2572
+ open: i + t.fromMinutes * Te - n,
2573
+ close: i + t.toMinutes * Te - n
2559
2574
  };
2560
2575
  }
2561
- function Yt(e, t) {
2562
- const n = zt(e, t), r = e + n;
2576
+ function qt(e, t) {
2577
+ const n = Xt(e, t), r = e + n;
2563
2578
  return (Math.floor(r / X) + 1) * X - n;
2564
2579
  }
2565
- function Te(e, t, n) {
2580
+ function Ie(e, t, n) {
2566
2581
  if (t <= e) return 0;
2567
2582
  if (!n) return t - e;
2568
2583
  let r = 0, o = e;
2569
- for (let i = 0; i < Vt && o < t; i++) {
2570
- const s = Xt(o, n);
2584
+ for (let i = 0; i < zt && o < t; i++) {
2585
+ const s = Yt(o, n);
2571
2586
  if (s) {
2572
2587
  const a = Math.max(o, s.open), u = Math.min(t, s.close);
2573
2588
  u > a && (r += u - a);
2574
2589
  }
2575
- o = Yt(o, n);
2590
+ o = qt(o, n);
2576
2591
  }
2577
2592
  return r;
2578
2593
  }
2579
- function Re(e, t, n) {
2594
+ function De(e, t, n) {
2580
2595
  if (!n) return e + t;
2581
2596
  let r = t, o = e;
2582
- for (let i = 0; i < Vt; i++) {
2583
- const s = Xt(o, n);
2597
+ for (let i = 0; i < zt; i++) {
2598
+ const s = Yt(o, n);
2584
2599
  if (s) {
2585
2600
  const a = Math.max(o, s.open);
2586
2601
  if (s.close > a) {
@@ -2589,78 +2604,78 @@ function Re(e, t, n) {
2589
2604
  r -= u;
2590
2605
  }
2591
2606
  }
2592
- o = Yt(o, n);
2607
+ o = qt(o, n);
2593
2608
  }
2594
2609
  return e + t;
2595
2610
  }
2596
- function Lc(e) {
2611
+ function Fc(e) {
2597
2612
  const t = /^([01]\d|2[0-3]):([0-5]\d)$/.exec(e);
2598
2613
  return t ? Number(t[1]) * 60 + Number(t[2]) : null;
2599
2614
  }
2600
- const Ie = 1, ke = 2, we = 4;
2601
- function Pc(e) {
2602
- return e === "snoozed" ? Ie : ke;
2615
+ const ke = 1, we = 2, ve = 4;
2616
+ function Bc(e) {
2617
+ return e === "snoozed" ? ke : we;
2603
2618
  }
2604
- function De(e) {
2619
+ function $e(e) {
2605
2620
  const t = e.calendar;
2606
2621
  return t && Array.isArray(t.days) ? t : null;
2607
2622
  }
2608
- const Kc = [
2623
+ const jc = [
2609
2624
  "speed_of_answer",
2610
2625
  "first_response",
2611
2626
  "next_response",
2612
2627
  "resolution",
2613
2628
  "close"
2614
- ], Uc = ["snoozed", "waiting_for_customer"], bo = 6e4, qt = ["speed_of_answer", "first_response", "next_response"], _o = [...qt, "resolution", "close"];
2629
+ ], Hc = ["snoozed", "waiting_for_customer"], Ao = 6e4, Qt = ["speed_of_answer", "first_response", "next_response"], So = [...Qt, "resolution", "close"];
2615
2630
  function Y(e) {
2616
2631
  return e.state === "running" || e.state === "paused";
2617
2632
  }
2618
- function Ao(e, t) {
2633
+ function Eo(e, t) {
2619
2634
  return Y(e) ? { state: (e.state === "paused" ? e.remainingMs > 0 : t <= e.dueAt) ? "hit" : "missed", settledAt: Math.max(t, e.startedAt) } : null;
2620
2635
  }
2621
- function ct(e) {
2636
+ function lt(e) {
2622
2637
  return Y(e) ? { state: "void" } : null;
2623
2638
  }
2624
- function So(e, t, n, r) {
2639
+ function To(e, t, n, r) {
2625
2640
  if (!Y(e) || (e.pauseBits & t) !== 0) return null;
2626
2641
  const o = e.pauseBits | t;
2627
- return e.state === "paused" ? { pauseBits: o } : { pauseBits: o, state: "paused", remainingMs: Te(n, e.dueAt, r) };
2642
+ return e.state === "paused" ? { pauseBits: o } : { pauseBits: o, state: "paused", remainingMs: Ie(n, e.dueAt, r) };
2628
2643
  }
2629
- function Eo(e, t, n, r) {
2644
+ function Io(e, t, n, r) {
2630
2645
  if (!Y(e) || (e.pauseBits & t) === 0) return null;
2631
2646
  const o = e.pauseBits & ~t;
2632
- return o !== 0 ? { pauseBits: o } : { pauseBits: o, state: "running", dueAt: Re(n, e.remainingMs, r) };
2647
+ return o !== 0 ? { pauseBits: o } : { pauseBits: o, state: "running", dueAt: De(n, e.remainingMs, r) };
2633
2648
  }
2634
- function Fc({ event: e, at: t, now: n, clocks: r, profile: o }) {
2635
- const i = De(o), s = Math.min(t, n), a = r.map((g) => ({ ...g })), u = [], l = (g, h) => {
2649
+ function Gc({ event: e, at: t, now: n, clocks: r, profile: o }) {
2650
+ const i = $e(o), s = Math.min(t, n), a = r.map((g) => ({ ...g })), u = [], l = (g, h) => {
2636
2651
  h && (u.push({ op: "patch", clockId: g.id, patch: h }), Object.assign(g, h));
2637
2652
  }, d = (g) => {
2638
2653
  for (const h of a)
2639
- h.metric === g && l(h, Ao(h, s));
2654
+ h.metric === g && l(h, Eo(h, s));
2640
2655
  }, c = (g) => {
2641
2656
  for (const h of a)
2642
- g.includes(h.metric) && l(h, ct(h));
2657
+ g.includes(h.metric) && l(h, lt(h));
2643
2658
  }, p = (g) => {
2644
- for (const h of a) l(h, So(h, g, s, i));
2659
+ for (const h of a) l(h, To(h, g, s, i));
2645
2660
  }, f = (g) => {
2646
- for (const h of a) l(h, Eo(h, g, s, i));
2661
+ for (const h of a) l(h, Io(h, g, s, i));
2647
2662
  }, y = (g) => a.reduce((h, S) => S.metric === g ? Math.max(h, S.attempt) : h, 0) + 1, m = (g) => a.some((h) => h.metric === g && Y(h)), E = (g, h) => {
2648
2663
  const S = o.targets.find((C) => C.metric === g);
2649
2664
  if (!S) return;
2650
- const x = S.minutes * bo;
2665
+ const x = S.minutes * Ao;
2651
2666
  u.push({
2652
2667
  op: "start",
2653
2668
  metric: g,
2654
2669
  attempt: y(g),
2655
2670
  startedAt: h,
2656
2671
  targetMs: x,
2657
- dueAt: Re(h, x, i)
2672
+ dueAt: De(h, x, i)
2658
2673
  });
2659
2674
  };
2660
2675
  switch (e) {
2661
2676
  case "apply": {
2662
2677
  for (const g of a)
2663
- g.profileId !== o.id && l(g, ct(g));
2678
+ g.profileId !== o.id && l(g, lt(g));
2664
2679
  for (const g of o.targets) {
2665
2680
  if (g.metric === "next_response") continue;
2666
2681
  a.some(
@@ -2673,111 +2688,111 @@ function Fc({ event: e, at: t, now: n, clocks: r, profile: o }) {
2673
2688
  d("speed_of_answer");
2674
2689
  break;
2675
2690
  case "outbound": {
2676
- d("first_response"), d("next_response"), o.pauseOn.includes("waiting_for_customer") && p(ke);
2691
+ d("first_response"), d("next_response"), o.pauseOn.includes("waiting_for_customer") && p(we);
2677
2692
  break;
2678
2693
  }
2679
2694
  case "inbound": {
2680
- f(ke), !m("first_response") && !m("next_response") && E("next_response", s);
2695
+ f(we), !m("first_response") && !m("next_response") && E("next_response", s);
2681
2696
  break;
2682
2697
  }
2683
2698
  case "resolved":
2684
2699
  d("resolution");
2685
2700
  break;
2686
2701
  case "closed":
2687
- d("close"), d("resolution"), c(qt);
2702
+ d("close"), d("resolution"), c(Qt);
2688
2703
  break;
2689
2704
  case "reopened":
2690
2705
  m("resolution") || E("resolution", s), m("close") || E("close", s);
2691
2706
  break;
2692
2707
  case "snoozed":
2693
- o.pauseOn.includes("snoozed") && p(Ie);
2708
+ o.pauseOn.includes("snoozed") && p(ke);
2694
2709
  break;
2695
2710
  case "unsnoozed":
2696
- f(Ie);
2711
+ f(ke);
2697
2712
  break;
2698
2713
  // Not gated on `profile.pauseOn`, unlike the two above: this is a person deciding about
2699
2714
  // one conversation, not a profile setting. `resumeAll` only lifts the bit it is given, so
2700
2715
  // an `inbound` arriving meanwhile clears `waiting_for_customer` and the clock stays held.
2701
2716
  case "hold":
2702
- p(we);
2717
+ p(ve);
2703
2718
  break;
2704
2719
  case "unhold":
2705
- f(we);
2720
+ f(ve);
2706
2721
  break;
2707
2722
  case "discarded":
2708
- c(_o);
2723
+ c(So);
2709
2724
  break;
2710
2725
  }
2711
2726
  return u;
2712
2727
  }
2713
- function To(e) {
2728
+ function ko(e) {
2714
2729
  return e.state === "running" || e.state === "paused";
2715
2730
  }
2716
- function Bc(e) {
2717
- return (e.pauseBits & we) !== 0;
2731
+ function Wc(e) {
2732
+ return (e.pauseBits & ve) !== 0;
2718
2733
  }
2719
- function ve(e, t) {
2720
- const n = De(e);
2721
- return e.state === "paused" ? e.remainingMs : t >= e.dueAt ? -Te(e.dueAt, t, n) : Te(t, e.dueAt, n);
2734
+ function Me(e, t) {
2735
+ const n = $e(e);
2736
+ return e.state === "paused" ? e.remainingMs : t >= e.dueAt ? -Ie(e.dueAt, t, n) : Ie(t, e.dueAt, n);
2722
2737
  }
2723
- function jc(e, t) {
2724
- return e.state === "paused" ? Re(t, e.remainingMs, De(e)) : e.dueAt;
2738
+ function Vc(e, t) {
2739
+ return e.state === "paused" ? De(t, e.remainingMs, $e(e)) : e.dueAt;
2725
2740
  }
2726
- function Hc(e, t) {
2727
- const n = e.filter(To);
2741
+ function zc(e, t) {
2742
+ const n = e.filter(ko);
2728
2743
  if (!n.length) return;
2729
2744
  const r = n.filter((i) => i.state === "running");
2730
2745
  return (r.length ? r : n).reduce(
2731
- (i, s) => ve(s, t) < ve(i, t) ? s : i
2746
+ (i, s) => Me(s, t) < Me(i, t) ? s : i
2732
2747
  );
2733
2748
  }
2734
- function Gc(e, t) {
2749
+ function Xc(e, t) {
2735
2750
  if (e.state === "missed") return "breached";
2736
2751
  if (e.state === "hit") return "met";
2737
2752
  if (e.state === "paused") return "paused";
2738
2753
  if (e.state === "void") return "met";
2739
- const n = ve(e, t);
2754
+ const n = Me(e, t);
2740
2755
  return n <= 0 ? "breached" : n <= e.targetMs / 5 ? "urgent" : "running";
2741
2756
  }
2742
- function Wc(e) {
2757
+ function Yc(e) {
2743
2758
  const t = Math.floor(Math.abs(e) / 1e3), n = Math.floor(t / 86400), r = Math.floor(t % 86400 / 3600), o = Math.floor(t % 3600 / 60);
2744
2759
  return n ? r ? `${n}d ${r}u` : `${n}d` : r ? o ? `${r}u ${o}m` : `${r}u` : o ? `${o}m` : `${t % 60}s`;
2745
2760
  }
2746
- const Io = "strategy_item";
2747
- function Qt(e) {
2748
- return `${Io}:${e}`;
2761
+ const wo = "strategy_item";
2762
+ function Zt(e) {
2763
+ return `${wo}:${e}`;
2749
2764
  }
2750
- function Vc(e, t = 25) {
2751
- const n = /* @__PURE__ */ new Set([Qt(e.id)]);
2765
+ function qc(e, t = 25) {
2766
+ const n = /* @__PURE__ */ new Set([Zt(e.id)]);
2752
2767
  for (const r of e.ancestorKeys ?? []) n.add(r);
2753
2768
  return Array.from(n).slice(0, t);
2754
2769
  }
2755
- function zc(e) {
2756
- return e ? [...e.ancestorKeys ?? [], Qt(e.id)] : [];
2770
+ function Qc(e) {
2771
+ return e ? [...e.ancestorKeys ?? [], Zt(e.id)] : [];
2757
2772
  }
2758
- const oe = [
2773
+ const ie = [
2759
2774
  { key: "area", label: "level_area", order: 10, measurable: !1, icon: "compass" },
2760
2775
  { key: "objective", label: "level_objective", order: 20, measurable: !0, icon: "target" },
2761
2776
  { key: "key_result", label: "level_key_result", order: 30, measurable: !0, icon: "gauge" }
2762
- ], ko = 999, wo = 7;
2763
- function vo(e, t = oe) {
2777
+ ], vo = 999, Mo = 7;
2778
+ function Co(e, t = ie) {
2764
2779
  return t.find((n) => n.key === e);
2765
2780
  }
2766
- function Me(e, t = oe) {
2767
- return vo(e, t)?.order ?? ko;
2781
+ function Ce(e, t = ie) {
2782
+ return Co(e, t)?.order ?? vo;
2768
2783
  }
2769
- function Xc(e, t, n = oe) {
2770
- return Me(t, n) <= Me(e, n);
2784
+ function Zc(e, t, n = ie) {
2785
+ return Ce(t, n) <= Ce(e, n);
2771
2786
  }
2772
- function Yc(e, t = oe) {
2773
- const n = Me(e, t);
2787
+ function Jc(e, t = ie) {
2788
+ const n = Ce(e, t);
2774
2789
  return t.filter((o) => o.order > n).sort((o, i) => o.order - i.order)[0]?.key ?? e;
2775
2790
  }
2776
- function qc(e) {
2791
+ function el(e) {
2777
2792
  const t = e.trim().toLowerCase();
2778
2793
  return t ? t.includes("key result") || t.includes("keyresult") || t === "kr" ? "key_result" : t.includes("objective") || t.includes("goal") || t.includes("doel") ? "objective" : t.includes("focus") || t.includes("area") || t.includes("theme") ? "area" : null : null;
2779
2794
  }
2780
- const Ce = {
2795
+ const Oe = {
2781
2796
  pending: "open",
2782
2797
  on_track: "open",
2783
2798
  at_risk: "open",
@@ -2786,74 +2801,74 @@ const Ce = {
2786
2801
  achieved: "closed",
2787
2802
  missed: "closed"
2788
2803
  };
2789
- function Qc(e) {
2790
- return Ce[e] ?? "open";
2804
+ function tl(e) {
2805
+ return Oe[e] ?? "open";
2791
2806
  }
2792
- function Zc(e) {
2793
- return Object.keys(Ce).filter(
2794
- (t) => e.includes(Ce[t])
2807
+ function nl(e) {
2808
+ return Object.keys(Oe).filter(
2809
+ (t) => e.includes(Oe[t])
2795
2810
  );
2796
2811
  }
2797
- const Mo = 864e5, ie = (e) => e <= 0 ? 0 : e > 1 ? 1 : e;
2798
- function Jc(e, t) {
2812
+ const Oo = 864e5, se = (e) => e <= 0 ? 0 : e > 1 ? 1 : e;
2813
+ function rl(e, t) {
2799
2814
  const { direction: n } = e, r = e.startValue ?? 0, o = e.targetValue ?? 0;
2800
2815
  if (!Number.isFinite(t)) return 0;
2801
2816
  const i = n === "down" ? t <= o : t >= o, s = o - r;
2802
- return (n === "down" ? s < 0 : s > 0) ? ie((t - r) / s) : i ? 1 : 0;
2817
+ return (n === "down" ? s < 0 : s > 0) ? se((t - r) / s) : i ? 1 : 0;
2803
2818
  }
2804
- function el(e, t) {
2819
+ function ol(e, t) {
2805
2820
  const { startDate: n, targetDate: r } = e;
2806
2821
  if (!(typeof n != "number" || typeof r != "number") && !(r <= n))
2807
- return ie((t - n) / (r - n));
2822
+ return se((t - n) / (r - n));
2808
2823
  }
2809
- const Co = 0.1, Oo = 0.25;
2810
- function tl(e, t) {
2824
+ const xo = 0.1, No = 0.25;
2825
+ function il(e, t) {
2811
2826
  if (typeof e != "number" || typeof t != "number") return;
2812
2827
  if (e >= 1) return "achieved";
2813
2828
  const n = t - e;
2814
- return n >= Oo ? "off_track" : n >= Co ? "at_risk" : "on_track";
2829
+ return n >= No ? "off_track" : n >= xo ? "at_risk" : "on_track";
2815
2830
  }
2816
- function nl(e, t) {
2831
+ function sl(e, t) {
2817
2832
  if (t)
2818
- return ie(e / t);
2833
+ return se(e / t);
2819
2834
  }
2820
- function rl(e) {
2835
+ function al(e) {
2821
2836
  const t = e.map((n) => n.progress?.ratio).filter((n) => typeof n == "number" && Number.isFinite(n));
2822
2837
  if (t.length)
2823
- return ie(t.reduce((n, r) => n + r, 0) / t.length);
2838
+ return se(t.reduce((n, r) => n + r, 0) / t.length);
2824
2839
  }
2825
- function ol(e, t) {
2840
+ function cl(e, t) {
2826
2841
  const n = e.lastCheckInAt ?? e.createdAt;
2827
2842
  if (typeof n != "number") return 0;
2828
- const r = (e.checkInEveryDays ?? wo) * Mo, o = t - n - r;
2843
+ const r = (e.checkInEveryDays ?? Mo) * Oo, o = t - n - r;
2829
2844
  return o > 0 ? o : 0;
2830
2845
  }
2831
- function il(e) {
2846
+ function ll(e) {
2832
2847
  return e.targetDate ?? Number.MAX_SAFE_INTEGER;
2833
2848
  }
2834
- function sl(e, t) {
2849
+ function ul(e, t) {
2835
2850
  const n = e.accumulatedSeconds || 0;
2836
2851
  return e.runningSince ? n + Math.max(0, Math.floor((t - e.runningSince) / 1e3)) : n;
2837
2852
  }
2838
- function al(e, t) {
2853
+ function dl(e, t) {
2839
2854
  const n = Math.max(1, Math.ceil(Math.max(0, e) / 60));
2840
2855
  if (!t || t === "exact") return n * 60;
2841
2856
  const r = Number(t);
2842
2857
  return !Number.isFinite(r) || r <= 0 ? n * 60 : Math.ceil(n / r) * r * 60;
2843
2858
  }
2844
- function cl(e) {
2859
+ function pl(e) {
2845
2860
  const t = Math.max(0, Math.round(e / 60));
2846
2861
  return `${Math.floor(t / 60)}:${String(t % 60).padStart(2, "0")}`;
2847
2862
  }
2848
- function ll(e) {
2863
+ function fl(e) {
2849
2864
  const t = Math.max(0, Math.floor(e)), n = (i) => String(i).padStart(2, "0"), r = Math.floor(t / 60) % 60, o = Math.floor(t / 3600);
2850
2865
  return o > 0 ? `${o}:${n(r)}:${n(t % 60)}` : `${n(r)}:${n(t % 60)}`;
2851
2866
  }
2852
- function xo(e) {
2867
+ function Ro(e) {
2853
2868
  return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").slice(0, 48).replace(/^-+|-+$/g, "");
2854
2869
  }
2855
- function ul(e, t) {
2856
- const n = xo(e) || "werksoort", r = new Set(t);
2870
+ function ml(e, t) {
2871
+ const n = Ro(e) || "werksoort", r = new Set(t);
2857
2872
  if (!r.has(n)) return n;
2858
2873
  for (let o = 2; o < 500; o++) {
2859
2874
  const i = `${n}-${o}`;
@@ -2861,59 +2876,59 @@ function ul(e, t) {
2861
2876
  }
2862
2877
  return `${n}-${r.size + 1}`;
2863
2878
  }
2864
- function dl(e, t) {
2879
+ function hl(e, t) {
2865
2880
  const n = e.ownerScope;
2866
2881
  return !n || n.kind === "org" ? !0 : t.includes(n.teamId);
2867
2882
  }
2868
- function pl(e) {
2869
- return e.filter((t) => !t.archived).sort(No);
2883
+ function gl(e) {
2884
+ return e.filter((t) => !t.archived).sort(Do);
2870
2885
  }
2871
- function No(e, t) {
2886
+ function Do(e, t) {
2872
2887
  const n = (e.order ?? 0) - (t.order ?? 0);
2873
2888
  return n !== 0 ? n : (e.label || "").localeCompare(t.label || "");
2874
2889
  }
2875
- const Ro = 20, Do = 20, fe = 300;
2890
+ const $o = 20, Lo = 20, me = 300;
2876
2891
  function P(e) {
2877
2892
  return e.toLowerCase().replace(/[^\p{L}\p{N}\s]/gu, " ").replace(/\s+/g, " ").trim();
2878
2893
  }
2879
- function $o(e) {
2894
+ function Po(e) {
2880
2895
  const t = e.replace(/\s+/g, " ").trim();
2881
- if (t.length <= fe) return t;
2882
- const n = t.slice(0, fe), r = Math.max(n.lastIndexOf(". "), n.lastIndexOf("! "), n.lastIndexOf("? "));
2883
- return r > fe * 0.6 ? n.slice(0, r + 1) : `${n.trimEnd()}…`;
2896
+ if (t.length <= me) return t;
2897
+ const n = t.slice(0, me), r = Math.max(n.lastIndexOf(". "), n.lastIndexOf("! "), n.lastIndexOf("? "));
2898
+ return r > me * 0.6 ? n.slice(0, r + 1) : `${n.trimEnd()}…`;
2884
2899
  }
2885
- function fl(e, t) {
2886
- const n = $o(t.text), r = P(n);
2900
+ function yl(e, t) {
2901
+ const n = Po(t.text), r = P(n);
2887
2902
  if (!r || (e.examples ?? []).some((s) => P(s) === r)) return null;
2888
2903
  const o = e.exampleCandidates ?? [], i = o.findIndex((s) => P(s.text) === r);
2889
2904
  if (i >= 0) {
2890
2905
  if (o[i].corrected || !t.corrected) return null;
2891
2906
  const s = [...o];
2892
- return s[i] = { ...s[i], corrected: !0, addedAt: t.addedAt }, lt(s);
2907
+ return s[i] = { ...s[i], corrected: !0, addedAt: t.addedAt }, ut(s);
2893
2908
  }
2894
- return lt([{ ...t, text: n }, ...o]).slice(0, Do);
2909
+ return ut([{ ...t, text: n }, ...o]).slice(0, Lo);
2895
2910
  }
2896
- function lt(e) {
2911
+ function ut(e) {
2897
2912
  return [...e].sort(
2898
2913
  (t, n) => Number(n.corrected) - Number(t.corrected) || n.addedAt - t.addedAt
2899
2914
  );
2900
2915
  }
2901
- function ml(e, t) {
2916
+ function bl(e, t) {
2902
2917
  const n = P(t), r = (e.examples ?? []).filter((i) => i.trim());
2903
- return { examples: r.some((i) => P(i) === n) ? r : [...r, t].slice(-Ro), exampleCandidates: Lo(e, t) };
2918
+ return { examples: r.some((i) => P(i) === n) ? r : [...r, t].slice(-$o), exampleCandidates: Ko(e, t) };
2904
2919
  }
2905
- function Lo(e, t) {
2920
+ function Ko(e, t) {
2906
2921
  const n = P(t);
2907
2922
  return (e.exampleCandidates ?? []).filter((r) => P(r.text) !== n);
2908
2923
  }
2909
- function Po(e, t) {
2924
+ function Uo(e, t) {
2910
2925
  const n = e.ownerScope;
2911
2926
  return n ? n.kind === "org" ? !0 : n.kind === "team" ? !!t && n.teamId === t : !1 : !1;
2912
2927
  }
2913
- function hl(e, t) {
2914
- return e.filter((n) => Po(n, t));
2928
+ function _l(e, t) {
2929
+ return e.filter((n) => Uo(n, t));
2915
2930
  }
2916
- const $e = [
2931
+ const Le = [
2917
2932
  {
2918
2933
  key: "quote",
2919
2934
  label: "kind_quote",
@@ -2952,15 +2967,15 @@ const $e = [
2952
2967
  path: "invoices",
2953
2968
  issuedStatus: "open"
2954
2969
  }
2955
- ], Ko = ["quote", "order", "invoice"];
2956
- function gl() {
2970
+ ], Fo = ["quote", "order", "invoice"];
2971
+ function Al() {
2957
2972
  const e = /* @__PURE__ */ new Map();
2958
- for (const t of $e)
2959
- Ko.includes(t.key) && (e.has(t.path) || e.set(t.path, t));
2973
+ for (const t of Le)
2974
+ Fo.includes(t.key) && (e.has(t.path) || e.set(t.path, t));
2960
2975
  return [...e.values()];
2961
2976
  }
2962
2977
  function F(e) {
2963
- return $e.find((t) => t.key === e) ?? {
2978
+ return Le.find((t) => t.key === e) ?? {
2964
2979
  key: e,
2965
2980
  label: e,
2966
2981
  numbered: !1,
@@ -2970,10 +2985,10 @@ function F(e) {
2970
2985
  issuedStatus: "draft"
2971
2986
  };
2972
2987
  }
2973
- function yl(e) {
2988
+ function Sl(e) {
2974
2989
  return e.issuedAt != null;
2975
2990
  }
2976
- const bl = [
2991
+ const El = [
2977
2992
  "status",
2978
2993
  "fileRef",
2979
2994
  "number",
@@ -2982,7 +2997,7 @@ const bl = [
2982
2997
  "dunning",
2983
2998
  "updatedAt"
2984
2999
  ];
2985
- function Uo(e, t) {
3000
+ function Bo(e, t) {
2986
3001
  const n = F(t).signFlip !== F(e.kindKey).signFlip, r = e.lines.map((o) => ({
2987
3002
  ...o,
2988
3003
  quantity: n ? -o.quantity : o.quantity,
@@ -3021,9 +3036,9 @@ function Uo(e, t) {
3021
3036
  source: e.source
3022
3037
  };
3023
3038
  }
3024
- function _l(e) {
3039
+ function Tl(e) {
3025
3040
  return {
3026
- ...Uo(e, e.kindKey),
3041
+ ...Bo(e, e.kindKey),
3027
3042
  sourceTransactionId: e.sourceTransactionId,
3028
3043
  previousVersionId: e.id,
3029
3044
  version: e.version + 1,
@@ -3031,7 +3046,7 @@ function _l(e) {
3031
3046
  totals: e.totals
3032
3047
  };
3033
3048
  }
3034
- function Al(e, t = {}) {
3049
+ function Il(e, t = {}) {
3035
3050
  const n = F(e.kindKey), r = e.totals ?? { netCents: 0, taxCents: 0, grossCents: 0 };
3036
3051
  return {
3037
3052
  customer: {
@@ -3040,7 +3055,7 @@ function Al(e, t = {}) {
3040
3055
  // One token per line of the address, plus `street` on its own for a template that wants
3041
3056
  // the house number elsewhere. Empty stays empty: `fillText` reports it as a hole, and a
3042
3057
  // recipient block missing its street is exactly what the issue gate has to refuse.
3043
- address: jo(t.companyAddress),
3058
+ address: Go(t.companyAddress),
3044
3059
  street: t.companyAddress?.street ?? "",
3045
3060
  house_number: t.companyAddress?.houseNumber ?? "",
3046
3061
  postal_code: t.companyAddress?.postalCode ?? "",
@@ -3077,7 +3092,7 @@ function Al(e, t = {}) {
3077
3092
  }
3078
3093
  };
3079
3094
  }
3080
- function Sl(e, t = [], n = Fo) {
3095
+ function kl(e, t = [], n = jo) {
3081
3096
  const r = e.totals ?? { netCents: 0, grossCents: 0, byRate: [] }, o = (a) => t.find((u) => u.key === a)?.percent ?? 0, i = {
3082
3097
  block_id: "lines",
3083
3098
  type: "table",
@@ -3092,8 +3107,8 @@ function Sl(e, t = [], n = Fo) {
3092
3107
  // A text line spans as a heading: empty money cells would read as "free".
3093
3108
  [a.name, "", "", ""]
3094
3109
  ) : [
3095
- Bo(a.name, a.description, a.optional, n.optional),
3096
- Ho(a.quantity),
3110
+ Ho(a.name, a.description, a.optional, n.optional),
3111
+ Wo(a.quantity),
3097
3112
  D(a.unitPriceCents),
3098
3113
  D(a.netCents)
3099
3114
  ]
@@ -3112,7 +3127,7 @@ function Sl(e, t = [], n = Fo) {
3112
3127
  };
3113
3128
  return { lines: [i], totals: [s] };
3114
3129
  }
3115
- const Fo = {
3130
+ const jo = {
3116
3131
  description: "Omschrijving",
3117
3132
  optional: "optioneel",
3118
3133
  quantity: "Aantal",
@@ -3121,14 +3136,14 @@ const Fo = {
3121
3136
  tax: "Btw",
3122
3137
  gross: "Totaal"
3123
3138
  };
3124
- function Bo(e, t, n, r) {
3139
+ function Ho(e, t, n, r) {
3125
3140
  const o = t ? `${e} — ${t}` : e;
3126
3141
  return n ? `${o} (${r})` : o;
3127
3142
  }
3128
- function jo(e) {
3143
+ function Go(e) {
3129
3144
  return e?.street ? [e.street, e.houseNumber].filter(Boolean).join(" ") : "";
3130
3145
  }
3131
- function Ho(e) {
3146
+ function Wo(e) {
3132
3147
  return Number.isInteger(e) ? String(e) : String(e).replace(".", ",");
3133
3148
  }
3134
3149
  function K(e) {
@@ -3136,14 +3151,14 @@ function K(e) {
3136
3151
  const t = new Date(e), n = (r) => String(r).padStart(2, "0");
3137
3152
  return `${n(t.getDate())}-${n(t.getMonth() + 1)}-${t.getFullYear()}`;
3138
3153
  }
3139
- function Go(e) {
3154
+ function Vo(e) {
3140
3155
  const t = F(e), n = t.key, r = t.numbered;
3141
3156
  return [
3142
3157
  {
3143
3158
  block_id: "head",
3144
3159
  type: "letterhead",
3145
3160
  fields: [
3146
- ...r ? [{ key: "number", label: Wo[n]?.number ?? "Nummer", value: `{${n}.number}` }] : [],
3161
+ ...r ? [{ key: "number", label: zo[n]?.number ?? "Nummer", value: `{${n}.number}` }] : [],
3147
3162
  { key: "date", label: "Datum", value: `{${n}.date}` },
3148
3163
  ...r ? [{ key: "due_date", label: "Vervaldatum", value: `{${n}.due_date}` }] : [{ key: "valid_until", label: "Geldig tot", value: `{${n}.valid_until}` }],
3149
3164
  { key: "reference", label: "Referentie", value: `{${n}.reference}` }
@@ -3156,7 +3171,7 @@ function Go(e) {
3156
3171
  ]
3157
3172
  },
3158
3173
  { block_id: "title", type: "heading", level: 1, text: `{${n}.title}` },
3159
- { block_id: "intro", type: "paragraph", text: ut[n] ?? ut.quote },
3174
+ { block_id: "intro", type: "paragraph", text: dt[n] ?? dt.quote },
3160
3175
  /**
3161
3176
  * The service period, when there is one — a subscription invoice says which quarter it bills.
3162
3177
  *
@@ -3181,17 +3196,17 @@ function Go(e) {
3181
3196
  text: `Betaling: {${n}.payment_term}. Wij verzoeken u het bedrag vóór {${n}.due_date} over te maken onder vermelding van {${n}.number}.`
3182
3197
  }
3183
3198
  ] : [],
3184
- { block_id: "terms", type: "paragraph", text: dt[n] ?? dt.quote }
3199
+ { block_id: "terms", type: "paragraph", text: pt[n] ?? pt.quote }
3185
3200
  ];
3186
3201
  }
3187
- const El = (e) => ({
3202
+ const wl = (e) => ({
3188
3203
  note: { key: `${F(e).key}.note`, exists: !0 },
3189
3204
  // Keyed on the start: a range without one is not a range, and `period_to` alone says nothing.
3190
3205
  period: { key: `${F(e).key}.period_from`, exists: !0 }
3191
- }), Wo = {
3206
+ }), zo = {
3192
3207
  invoice: { number: "Factuurnummer" },
3193
3208
  credit_note: { number: "Creditnotanummer" }
3194
- }, ut = {
3209
+ }, dt = {
3195
3210
  quote: `Beste {customer.contact},
3196
3211
 
3197
3212
  Hierbij onze offerte. Hieronder vindt u de specificatie.`,
@@ -3204,47 +3219,47 @@ Hierbij onze factuur. Hieronder vindt u de specificatie.`,
3204
3219
  credit_note: `Beste {customer.contact},
3205
3220
 
3206
3221
  Hierbij onze creditnota. De onderstaande bedragen worden met u verrekend.`
3207
- }, dt = {
3222
+ }, pt = {
3208
3223
  quote: "Genoemde bedragen zijn exclusief btw tenzij anders vermeld. Deze offerte is geldig tot {quote.valid_until}.",
3209
3224
  order: "Genoemde bedragen zijn exclusief btw tenzij anders vermeld.",
3210
3225
  invoice: "Genoemde bedragen zijn exclusief btw tenzij anders vermeld.",
3211
3226
  credit_note: "Genoemde bedragen zijn exclusief btw tenzij anders vermeld."
3212
- }, Tl = Go("quote"), Vo = $e.map((e) => e.key), zo = "product";
3213
- function Xo(e, t) {
3227
+ }, vl = Vo("quote"), Xo = Le.map((e) => e.key), Yo = "product";
3228
+ function qo(e, t) {
3214
3229
  return `${e}:${t}`;
3215
3230
  }
3216
- function Il(e) {
3217
- return `${zo}:${e}`;
3231
+ function Ml(e) {
3232
+ return `${Yo}:${e}`;
3218
3233
  }
3219
- function kl(e) {
3234
+ function Cl(e) {
3220
3235
  const t = e.indexOf(":");
3221
3236
  if (t < 0) return;
3222
3237
  const n = e.slice(0, t);
3223
- return Vo.includes(n) ? e.slice(t + 1) : void 0;
3238
+ return Xo.includes(n) ? e.slice(t + 1) : void 0;
3224
3239
  }
3225
- function wl(e) {
3226
- const t = /* @__PURE__ */ new Set([Xo(e.kindKey, e.id)]);
3240
+ function Ol(e) {
3241
+ const t = /* @__PURE__ */ new Set([qo(e.kindKey, e.id)]);
3227
3242
  return e.companyId && t.add(`company:${e.companyId}`), e.contactId && t.add(`contact:${e.contactId}`), e.dealItemId && t.add(`work_item:${e.dealItemId}`), Array.from(t);
3228
3243
  }
3229
- const vl = 4;
3230
- function Ml(e, t) {
3244
+ const xl = 4;
3245
+ function Nl(e, t) {
3231
3246
  const n = String(t).padStart(Math.max(1, e.padding), "0");
3232
3247
  return `${e.prefix}${e.period ? `${e.period}-` : ""}${n}`;
3233
3248
  }
3234
- function Cl(e, t = Date.now()) {
3249
+ function Rl(e, t = Date.now()) {
3235
3250
  return e === "year" ? String(new Date(t).getFullYear()) : "";
3236
3251
  }
3237
- const Ol = [
3252
+ const Dl = [
3238
3253
  "cash",
3239
3254
  "credit",
3240
3255
  "direct_debit",
3241
3256
  "card",
3242
3257
  "other"
3243
3258
  ];
3244
- function xl(e, t) {
3259
+ function $l(e, t) {
3245
3260
  return e + Math.max(0, Math.round(t)) * 24 * 60 * 60 * 1e3;
3246
3261
  }
3247
- function Nl(e, t) {
3262
+ function Ll(e, t) {
3248
3263
  const n = /* @__PURE__ */ new Map();
3249
3264
  for (const r of e) r.businessEntityId || n.set(r.code, r);
3250
3265
  if (t)
@@ -3252,10 +3267,10 @@ function Nl(e, t) {
3252
3267
  r.businessEntityId === t && n.set(r.code, r);
3253
3268
  return [...n.values()];
3254
3269
  }
3255
- function Rl(e) {
3270
+ function Pl(e) {
3256
3271
  return { code: e.code, label: e.label, method: e.method, dueDays: e.dueDays };
3257
3272
  }
3258
- const Dl = [
3273
+ const Kl = [
3259
3274
  {
3260
3275
  code: "14D",
3261
3276
  label: "Binnen 14 dagen",
@@ -3267,30 +3282,30 @@ const Dl = [
3267
3282
  { code: "30D", label: "Binnen 30 dagen", method: "credit", dueDays: 30, order: 1 },
3268
3283
  { code: "CONTANT", label: "Contant", method: "cash", dueDays: 0, order: 2 }
3269
3284
  ];
3270
- function $l(e) {
3285
+ function Ul(e) {
3271
3286
  return e.type === "agent";
3272
3287
  }
3273
- const Ll = "WORK_COMMENT_ADDED", Pl = "WORK_ITEM_ASSIGNED", Kl = "WORK_ITEM_STATUS_CHANGED";
3274
- function Yo(e, t) {
3288
+ const Fl = "WORK_COMMENT_ADDED", Bl = "WORK_ITEM_ASSIGNED", jl = "WORK_ITEM_STATUS_CHANGED";
3289
+ function Qo(e, t) {
3275
3290
  const n = (r) => {
3276
3291
  const o = new Date(r);
3277
3292
  return o.setHours(0, 0, 0, 0), o.getTime();
3278
3293
  };
3279
- return Math.round((n(e) - n(t)) / er);
3294
+ return Math.round((n(e) - n(t)) / tr);
3280
3295
  }
3281
- function Ul(e, t) {
3296
+ function Hl(e, t) {
3282
3297
  if (e.closedAt != null) return { score: L, reasons: [] };
3283
3298
  const n = t.remindersById?.[e.id];
3284
3299
  if (n && n.remindAt > t.now) return { score: L, reasons: [] };
3285
3300
  let r = 0;
3286
3301
  const o = [], i = e.priority ?? "normal";
3287
3302
  if (te[i] > 0 && (r += te[i], o.push(`priority:${i}`)), typeof e.dueDate == "number") {
3288
- const s = Yo(e.dueDate, t.now);
3303
+ const s = Qo(e.dueDate, t.now);
3289
3304
  s < 0 ? (r += 35, o.push("overdue")) : s === 0 && (r += 20, o.push("due-today"));
3290
3305
  }
3291
3306
  return e.source?.initiator === "system" && e.source.systemReason && (r += 15, o.push(`auto:${e.source.systemReason}`)), { score: r, reasons: o };
3292
3307
  }
3293
- const Le = [
3308
+ const Pe = [
3294
3309
  { key: "task", label: "type_task" },
3295
3310
  { key: "bug", label: "type_bug" },
3296
3311
  { key: "story", label: "type_story" },
@@ -3298,35 +3313,35 @@ const Le = [
3298
3313
  { key: "subtask", label: "type_subtask" },
3299
3314
  { key: "case", label: "type_case" },
3300
3315
  { key: "deal", label: "type_deal" }
3301
- ], Fl = Le.map((e) => e.key);
3302
- function Bl(e) {
3303
- return e?.types?.length ? e.types : Le;
3316
+ ], Gl = Pe.map((e) => e.key);
3317
+ function Wl(e) {
3318
+ return e?.types?.length ? e.types : Pe;
3304
3319
  }
3305
- function jl(e, t) {
3320
+ function Vl(e, t) {
3306
3321
  return t.find((n) => n.key === e);
3307
3322
  }
3308
- function Hl(e) {
3323
+ function zl(e) {
3309
3324
  const t = e.trim().toLowerCase();
3310
3325
  return t ? t.includes("sub-task") || t.includes("subtask") || t.includes("sub task") ? "subtask" : t.includes("bug") || t.includes("defect") ? "bug" : t.includes("epic") ? "epic" : t.includes("story") ? "story" : t.includes("incident") || t.includes("problem") || t.includes("service request") || t.includes("change") ? "case" : t.includes("task") ? "task" : null : null;
3311
3326
  }
3312
- function Gl(...e) {
3313
- return e.map((t) => Le.find((n) => n.key === t)).filter((t) => !!t);
3327
+ function Xl(...e) {
3328
+ return e.map((t) => Pe.find((n) => n.key === t)).filter((t) => !!t);
3314
3329
  }
3315
- const qo = "work_item", Qo = "work_project", Zo = "work_activity", Wl = "work_cycle";
3316
- function Jo(e) {
3317
- return `${qo}:${e}`;
3330
+ const Zo = "work_item", Jo = "work_project", ei = "work_activity", Yl = "work_cycle";
3331
+ function ti(e) {
3332
+ return `${Zo}:${e}`;
3318
3333
  }
3319
- function Zt(e) {
3320
- return `${Qo}:${e}`;
3334
+ function Jt(e) {
3335
+ return `${Jo}:${e}`;
3321
3336
  }
3322
- function Vl(e) {
3323
- return `${Zo}:${e}`;
3337
+ function ql(e) {
3338
+ return `${ei}:${e}`;
3324
3339
  }
3325
- function zl(e, t, n) {
3340
+ function Ql(e, t, n) {
3326
3341
  const r = `${e}-${t}`;
3327
3342
  return n ? `${r}-${n}` : r;
3328
3343
  }
3329
- function Xl(e) {
3344
+ function Zl(e) {
3330
3345
  const t = /^([A-Za-z0-9]{2,8})-(\d+)(?:-(\d+))?$/.exec((e || "").trim());
3331
3346
  return t ? {
3332
3347
  projectKey: t[1].toUpperCase(),
@@ -3334,52 +3349,52 @@ function Xl(e) {
3334
3349
  ...t[3] ? { subSequence: Number(t[3]) } : {}
3335
3350
  } : null;
3336
3351
  }
3337
- function Yl(e) {
3352
+ function Jl(e) {
3338
3353
  return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toUpperCase().replace(/[^A-Z0-9]/g, "").slice(0, 3) || "PRJ";
3339
3354
  }
3340
- function ql(e, t = 25) {
3341
- const n = /* @__PURE__ */ new Set([Jo(e.id)]);
3342
- e.projectId && n.add(Zt(e.projectId));
3355
+ function eu(e, t = 25) {
3356
+ const n = /* @__PURE__ */ new Set([ti(e.id)]);
3357
+ e.projectId && n.add(Jt(e.projectId));
3343
3358
  for (const r of e.ancestorKeys ?? []) n.add(r);
3344
3359
  for (const r of e.partyKeys ?? []) n.add(r);
3345
3360
  return Array.from(n).slice(0, t);
3346
3361
  }
3347
- function Ql(e) {
3348
- return [Zt(e.id)];
3362
+ function tu(e) {
3363
+ return [Jt(e.id)];
3349
3364
  }
3350
- const Pe = [
3365
+ const Ke = [
3351
3366
  { key: "open", label: "status_open", category: "todo", order: 0 },
3352
3367
  { key: "in_progress", label: "status_in_progress", category: "in_progress", order: 1 },
3353
3368
  { key: "done", label: "status_done", category: "done", order: 2 },
3354
3369
  { key: "cancelled", label: "status_cancelled", category: "done", order: 3 }
3355
- ], Jt = Pe.map((e) => e.key);
3356
- function ei(e) {
3357
- return e?.statuses?.length ? e.statuses : Pe;
3370
+ ], en = Ke.map((e) => e.key);
3371
+ function ni(e) {
3372
+ return e?.statuses?.length ? e.statuses : Ke;
3358
3373
  }
3359
- function ti(e, t) {
3374
+ function ri(e, t) {
3360
3375
  return t.find((n) => n.key === e)?.category ?? "todo";
3361
3376
  }
3362
- function Zl(e, t) {
3377
+ function nu(e, t) {
3363
3378
  return t.find((n) => n.key === e);
3364
3379
  }
3365
- function Jl(e) {
3366
- const t = ei(e), n = e?.defaultStatusKey;
3367
- return n && t.some((r) => r.key === n) ? n : ni(t)[0]?.key ?? Pe[0].key;
3380
+ function ru(e) {
3381
+ const t = ni(e), n = e?.defaultStatusKey;
3382
+ return n && t.some((r) => r.key === n) ? n : oi(t)[0]?.key ?? Ke[0].key;
3368
3383
  }
3369
- function ni(e) {
3384
+ function oi(e) {
3370
3385
  return [...e].sort((t, n) => {
3371
3386
  const r = (t.order ?? 0) - (n.order ?? 0);
3372
3387
  return r !== 0 ? r : (t.label || "").localeCompare(n.label || "");
3373
3388
  });
3374
3389
  }
3375
- function eu(e, t) {
3376
- return ti(e, t) === "done";
3390
+ function ou(e, t) {
3391
+ return ri(e, t) === "done";
3377
3392
  }
3378
- function ri(e) {
3393
+ function ii(e) {
3379
3394
  return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").slice(0, 48).replace(/^-+|-+$/g, "");
3380
3395
  }
3381
- function tu(e, t) {
3382
- const n = ri(e) || "status", r = /* @__PURE__ */ new Set([...t, ...Jt]);
3396
+ function iu(e, t) {
3397
+ const n = ii(e) || "status", r = /* @__PURE__ */ new Set([...t, ...en]);
3383
3398
  if (!r.has(n)) return n;
3384
3399
  for (let o = 2; o < 500; o++) {
3385
3400
  const i = `${n}-${o}`;
@@ -3387,7 +3402,7 @@ function tu(e, t) {
3387
3402
  }
3388
3403
  return `${n}-${r.size + 1}`;
3389
3404
  }
3390
- function nu(e) {
3405
+ function su(e) {
3391
3406
  const t = [];
3392
3407
  if (!e.length) return [{ index: -1, reason: "empty" }];
3393
3408
  const n = /* @__PURE__ */ new Set();
@@ -3396,16 +3411,16 @@ function nu(e) {
3396
3411
  t.push({ index: o, reason: "missing_key" });
3397
3412
  return;
3398
3413
  }
3399
- Jt.includes(r.key) && t.push({ index: o, reason: "reserved_key", key: r.key }), n.has(r.key) && t.push({ index: o, reason: "duplicate_key", key: r.key }), n.add(r.key);
3414
+ en.includes(r.key) && t.push({ index: o, reason: "reserved_key", key: r.key }), n.has(r.key) && t.push({ index: o, reason: "duplicate_key", key: r.key }), n.add(r.key);
3400
3415
  }), e.some((r) => r.category === "todo" || r.category === "in_progress") || t.push({ index: -1, reason: "no_open" }), e.some((r) => r.category === "done") || t.push({ index: -1, reason: "no_done" }), t;
3401
3416
  }
3402
- function ru(e) {
3417
+ function au(e) {
3403
3418
  return e.startDate ?? Number.MAX_SAFE_INTEGER;
3404
3419
  }
3405
- function ou(e) {
3420
+ function cu(e) {
3406
3421
  return e.completedAt ? "completed" : e.startedAt ? "active" : "planned";
3407
3422
  }
3408
- const oi = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "image/gif", "image/webp"]), ii = /* @__PURE__ */ new Set([
3423
+ const si = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "image/gif", "image/webp"]), ai = /* @__PURE__ */ new Set([
3409
3424
  "text/plain",
3410
3425
  "text/markdown",
3411
3426
  "text/csv",
@@ -3414,67 +3429,67 @@ const oi = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "ima
3414
3429
  "application/xml",
3415
3430
  "text/xml"
3416
3431
  ]);
3417
- function si(e) {
3432
+ function ci(e) {
3418
3433
  const t = (e ?? "").trim().toLowerCase().split(";")[0];
3419
- return t ? oi.has(t) ? "image" : t === "application/pdf" ? "pdf" : ii.has(t) ? "text" : t.startsWith("audio/") ? "audio" : "unsupported" : "unsupported";
3434
+ return t ? si.has(t) ? "image" : t === "application/pdf" ? "pdf" : ai.has(t) ? "text" : t.startsWith("audio/") ? "audio" : "unsupported" : "unsupported";
3420
3435
  }
3421
- const j = 1024 * 1024, ai = {
3436
+ const j = 1024 * 1024, li = {
3422
3437
  image: 5 * j,
3423
3438
  pdf: 20 * j,
3424
3439
  text: 1 * j,
3425
3440
  audio: 20 * j
3426
- }, iu = 25 * j, su = 5;
3427
- function au(e, t) {
3428
- const n = si(e);
3429
- return n === "unsupported" ? "unsupported" : t > ai[n] ? "too-large" : null;
3441
+ }, lu = 25 * j, uu = 5;
3442
+ function du(e, t) {
3443
+ const n = ci(e);
3444
+ return n === "unsupported" ? "unsupported" : t > li[n] ? "too-large" : null;
3430
3445
  }
3431
- function cu(e) {
3446
+ function pu(e) {
3432
3447
  return e.access !== "read" && e.effect !== "internal";
3433
3448
  }
3434
- function ci(e) {
3449
+ function ui(e) {
3435
3450
  return `${e.kind}:${e.id || e.url || e.title}`;
3436
3451
  }
3437
- function lu(e, t = []) {
3452
+ function fu(e, t = []) {
3438
3453
  const n = new Set(t), r = [], o = [];
3439
3454
  for (const i of e) {
3440
- const s = ci(i);
3455
+ const s = ui(i);
3441
3456
  n.has(s) || (n.add(s), r.push(i), o.push(s));
3442
3457
  }
3443
3458
  return { sources: r, keys: o };
3444
3459
  }
3445
- const uu = "assist-source", du = ["blocking", "due", "open"];
3446
- function pu(e, t) {
3460
+ const mu = "assist-source", hu = ["blocking", "due", "open"];
3461
+ function gu(e, t) {
3447
3462
  const [n, r] = (e.subjectKey ?? "").split(":");
3448
3463
  return n === t && r ? r : void 0;
3449
3464
  }
3450
- const pt = { blocking: 0, due: 1, open: 2 };
3451
- function fu(e, t) {
3452
- return pt[e.band ?? "open"] - pt[t.band ?? "open"] || (t.priority ?? 0) - (e.priority ?? 0) || e.id.localeCompare(t.id);
3465
+ const ft = { blocking: 0, due: 1, open: 2 };
3466
+ function yu(e, t) {
3467
+ return ft[e.band ?? "open"] - ft[t.band ?? "open"] || (t.priority ?? 0) - (e.priority ?? 0) || e.id.localeCompare(t.id);
3453
3468
  }
3454
- function mu(e) {
3469
+ function bu(e) {
3455
3470
  return e.sessions.filter(
3456
3471
  (t) => t.id !== e.exceptSessionId && t.state === "connected" && e.canHold(t.providerId)
3457
3472
  );
3458
3473
  }
3459
- function hu(e) {
3474
+ function _u(e) {
3460
3475
  return e.sessions.filter(
3461
3476
  (t) => t.id !== e.exceptSessionId && t.state === "connected" && !e.canHold(t.providerId)
3462
3477
  );
3463
3478
  }
3464
- function gu(e) {
3479
+ function Au(e) {
3465
3480
  return e.sessions.some(
3466
3481
  (n) => n.id !== e.exceptSessionId && (n.state === "connected" || n.state === "on_hold")
3467
3482
  ) ? { admit: !1, reason: "busy" } : { admit: !0 };
3468
3483
  }
3469
- function li(e, t) {
3470
- const n = new Set(e.disabledIntents ?? []), r = e.intentOverrides ?? {}, o = t.intents.filter((s) => !n.has(s.intent)).map((s) => di(s, r[s.intent]));
3484
+ function di(e, t) {
3485
+ const n = new Set(e.disabledIntents ?? []), r = e.intentOverrides ?? {}, o = t.intents.filter((s) => !n.has(s.intent)).map((s) => fi(s, r[s.intent]));
3471
3486
  if (!e.extraIntents || e.extraIntents.length === 0) return o;
3472
3487
  const i = new Set(o.map((s) => s.intent));
3473
3488
  for (const s of e.extraIntents)
3474
3489
  i.has(s.intent) || (o.push(s), i.add(s.intent));
3475
3490
  return o;
3476
3491
  }
3477
- function ui(e, t) {
3492
+ function pi(e, t) {
3478
3493
  const n = {};
3479
3494
  for (const r of e.intents) {
3480
3495
  if (!r.togglable) continue;
@@ -3483,46 +3498,46 @@ function ui(e, t) {
3483
3498
  }
3484
3499
  return n;
3485
3500
  }
3486
- function yu(e, t) {
3487
- const n = ui(e, t);
3501
+ function Su(e, t) {
3502
+ const n = pi(e, t);
3488
3503
  return Object.entries(n).filter(([, r]) => !r).map(([r]) => r);
3489
3504
  }
3490
- function di(e, t) {
3505
+ function fi(e, t) {
3491
3506
  return t ? {
3492
3507
  intent: t.intent ?? e.intent,
3493
3508
  targetSchemes: t.targetSchemes ?? e.targetSchemes,
3494
3509
  transport: t.transport ?? e.transport
3495
3510
  } : e;
3496
3511
  }
3497
- function bu(e, t) {
3512
+ function Eu(e, t) {
3498
3513
  const n = [];
3499
3514
  for (const r of e) {
3500
3515
  if (!r.enabled) continue;
3501
3516
  const o = t[r.providerId];
3502
3517
  if (o)
3503
- for (const i of li(r, o))
3518
+ for (const i of di(r, o))
3504
3519
  n.push({ channel: r, description: o, capability: i });
3505
3520
  }
3506
3521
  return n;
3507
3522
  }
3508
- function _u(e, t) {
3523
+ function Tu(e, t) {
3509
3524
  return t.filter((n) => n.capability.intent === e);
3510
3525
  }
3511
- function pi(e, t) {
3526
+ function mi(e, t) {
3512
3527
  return t.filter((n) => n.capability.targetSchemes.includes(e));
3513
3528
  }
3514
- function Au(e, t) {
3515
- return pi(e.scheme, t);
3529
+ function Iu(e, t) {
3530
+ return mi(e.scheme, t);
3516
3531
  }
3517
- function Su(e, t, n) {
3532
+ function ku(e, t, n) {
3518
3533
  const r = [];
3519
3534
  for (const o of e)
3520
3535
  for (const i of n)
3521
3536
  i.capability.intent === t && i.capability.targetSchemes.includes(o.scheme) && r.push({ channelIntent: i, endpoint: o });
3522
3537
  return r;
3523
3538
  }
3524
- var fi = /* @__PURE__ */ ((e) => (e.MAILTO = "mailto", e.SIP = "sip", e.TEL = "tel", e.WEBHOOK = "webhook", e.USERNAME = "username", e.ID = "id", e.CUSTOM = "custom", e.URL = "url", e.TELEGRAM = "telegram", e.WHATSAPP = "whatsapp", e.MESSENGER = "messenger", e.INSTAGRAM = "instagram", e.VIBER = "viber", e.SMS = "sms", e.FAX = "fax", e.TEAMS = "teams", e.CALENDAR = "calendar", e))(fi || {});
3525
- const mi = {
3539
+ var hi = /* @__PURE__ */ ((e) => (e.MAILTO = "mailto", e.SIP = "sip", e.TEL = "tel", e.WEBHOOK = "webhook", e.USERNAME = "username", e.ID = "id", e.CUSTOM = "custom", e.URL = "url", e.TELEGRAM = "telegram", e.WHATSAPP = "whatsapp", e.MESSENGER = "messenger", e.INSTAGRAM = "instagram", e.VIBER = "viber", e.SMS = "sms", e.FAX = "fax", e.TEAMS = "teams", e.CALENDAR = "calendar", e))(hi || {});
3540
+ const gi = {
3526
3541
  mailto: "mail",
3527
3542
  sip: "tel",
3528
3543
  tel: "tel",
@@ -3543,10 +3558,10 @@ const mi = {
3543
3558
  id: "note",
3544
3559
  custom: "note"
3545
3560
  };
3546
- function Eu(e) {
3547
- return e ? mi[e] ?? "note" : "note";
3561
+ function wu(e) {
3562
+ return e ? gi[e] ?? "note" : "note";
3548
3563
  }
3549
- const Tu = "message_window", Iu = "message_templates", ku = {
3564
+ const vu = "message_window", Mu = "message_templates", Cu = {
3550
3565
  // E-mail
3551
3566
  FROM: "from",
3552
3567
  TO: "to",
@@ -3563,11 +3578,11 @@ const Tu = "message_window", Iu = "message_templates", ku = {
3563
3578
  // Voice/conference
3564
3579
  HOST: "host",
3565
3580
  PARTICIPANT: "participant"
3566
- }, wu = (e, t) => ({ intent: e, ...t }), vu = "folder_management", Mu = "remote_search", Cu = "message_reactions", Ou = {
3581
+ }, Ou = (e, t) => ({ intent: e, ...t }), xu = "folder_management", Nu = "remote_search", Ru = "message_reactions", Du = {
3567
3582
  ok: !1,
3568
3583
  code: "UNSUPPORTED",
3569
3584
  message: "Provider does not support this op"
3570
- }, xu = "connector", Nu = "context.collect", A = (e) => ({ type: "string", description: e }), _ = (e) => ({ type: "number", description: e }), J = (e) => ({ type: "boolean", description: e }), M = A("Sheet name. Omit for the sheet the user is looking at."), ft = A("Slide id, as `inspect` reports it.");
3585
+ }, $u = "connector", Lu = "context.collect", A = (e) => ({ type: "string", description: e }), _ = (e) => ({ type: "number", description: e }), J = (e) => ({ type: "boolean", description: e }), M = A("Sheet name. Omit for the sheet the user is looking at."), mt = A("Slide id, as `inspect` reports it.");
3571
3586
  function b(e, t, n, r, o, i) {
3572
3587
  return {
3573
3588
  op: e,
@@ -3578,7 +3593,7 @@ function b(e, t, n, r, o, i) {
3578
3593
  visible: i.visible
3579
3594
  };
3580
3595
  }
3581
- const H = { undoable: !1, visible: !0 }, T = { undoable: !0, visible: !0 }, mt = { undoable: !1, visible: !0 }, ne = { undoable: !1, visible: !1 }, hi = [
3596
+ const H = { undoable: !1, visible: !0 }, T = { undoable: !0, visible: !0 }, ht = { undoable: !1, visible: !0 }, re = { undoable: !1, visible: !1 }, yi = [
3582
3597
  b(
3583
3598
  "pdf.goToPage",
3584
3599
  ["pdf"],
@@ -3635,7 +3650,7 @@ const H = { undoable: !1, visible: !0 }, T = { undoable: !0, visible: !0 }, mt =
3635
3650
  }
3636
3651
  },
3637
3652
  ["order"],
3638
- mt
3653
+ ht
3639
3654
  ),
3640
3655
  b(
3641
3656
  "pdf.deletePages",
@@ -3643,7 +3658,7 @@ const H = { undoable: !1, visible: !0 }, T = { undoable: !0, visible: !0 }, mt =
3643
3658
  "Remove pages, keeping the rest in order.",
3644
3659
  { pages: { type: "array", items: { type: "number" }, description: "1-based page numbers." } },
3645
3660
  ["pages"],
3646
- mt
3661
+ ht
3647
3662
  ),
3648
3663
  b(
3649
3664
  "pdf.addNote",
@@ -3659,7 +3674,7 @@ const H = { undoable: !1, visible: !0 }, T = { undoable: !0, visible: !0 }, mt =
3659
3674
  fontSize: _("Font size in points. Omit for 12.")
3660
3675
  },
3661
3676
  ["page", "text", "left", "top"],
3662
- ne
3677
+ re
3663
3678
  ),
3664
3679
  b(
3665
3680
  "pdf.highlightText",
@@ -3671,9 +3686,9 @@ const H = { undoable: !1, visible: !0 }, T = { undoable: !0, visible: !0 }, mt =
3671
3686
  occurrence: _("Which occurrence on that page, 1-based. Omit for the first.")
3672
3687
  },
3673
3688
  ["page", "text"],
3674
- ne
3689
+ re
3675
3690
  )
3676
- ], gi = [
3691
+ ], bi = [
3677
3692
  b(
3678
3693
  "sheet.setValues",
3679
3694
  ["sheet"],
@@ -3825,7 +3840,7 @@ const H = { undoable: !1, visible: !0 }, T = { undoable: !0, visible: !0 }, mt =
3825
3840
  [],
3826
3841
  H
3827
3842
  )
3828
- ], yi = [
3843
+ ], _i = [
3829
3844
  b(
3830
3845
  "word.replaceParagraph",
3831
3846
  ["word"],
@@ -3887,25 +3902,25 @@ const H = { undoable: !1, visible: !0 }, T = { undoable: !0, visible: !0 }, mt =
3887
3902
  ["start"],
3888
3903
  H
3889
3904
  )
3890
- ], bi = [
3905
+ ], Ai = [
3891
3906
  b(
3892
3907
  "slides.setText",
3893
3908
  ["slides"],
3894
3909
  "Replace the text of one shape. Written on save; not visible before that, and not undoable.",
3895
3910
  {
3896
- slide: ft,
3911
+ slide: mt,
3897
3912
  element: A("Element id, as `inspect` reports it."),
3898
3913
  text: A("The new text.")
3899
3914
  },
3900
3915
  ["slide", "element", "text"],
3901
- ne
3916
+ re
3902
3917
  ),
3903
3918
  b(
3904
3919
  "slides.setTransform",
3905
3920
  ["slides"],
3906
3921
  "Move or resize one shape. Only the values you pass change. Written on save; not visible before that, and not undoable.",
3907
3922
  {
3908
- slide: ft,
3923
+ slide: mt,
3909
3924
  element: A("Element id."),
3910
3925
  left: _("Distance from the left edge, in pixels."),
3911
3926
  top: _("Distance from the top edge, in pixels."),
@@ -3913,26 +3928,26 @@ const H = { undoable: !1, visible: !0 }, T = { undoable: !0, visible: !0 }, mt =
3913
3928
  height: _("Height in pixels.")
3914
3929
  },
3915
3930
  ["slide", "element"],
3916
- ne
3931
+ re
3917
3932
  )
3918
- ], en = [
3919
- ...hi,
3920
- ...gi,
3933
+ ], tn = [
3921
3934
  ...yi,
3922
- ...bi
3935
+ ...bi,
3936
+ ..._i,
3937
+ ...Ai
3923
3938
  ];
3924
- function Ru(e) {
3925
- return en.filter((t) => t.kinds.includes(e));
3939
+ function Pu(e) {
3940
+ return tn.filter((t) => t.kinds.includes(e));
3926
3941
  }
3927
- function Du(e) {
3928
- return en.find((t) => t.op === e);
3942
+ function Ku(e) {
3943
+ return tn.find((t) => t.op === e);
3929
3944
  }
3930
- const ht = /(?: {2,}|\\)$/, _i = /^\*\*([^*]+)\*\*\s+(.*)$/;
3931
- function gt(e) {
3932
- const t = _i.exec(e);
3945
+ const gt = /(?: {2,}|\\)$/, Si = /^\*\*([^*]+)\*\*\s+(.*)$/;
3946
+ function yt(e) {
3947
+ const t = Si.exec(e);
3933
3948
  return t ? { lead: t[1], text: t[2] } : { text: e };
3934
3949
  }
3935
- function $u(e) {
3950
+ function Uu(e) {
3936
3951
  const t = (e ?? "").replace(/\r\n/g, `
3937
3952
  `).split(`
3938
3953
  `), n = [];
@@ -3940,7 +3955,7 @@ function $u(e) {
3940
3955
  const o = () => {
3941
3956
  r && n.push({ type: "list", style: r.style, items: r.items }), r = null;
3942
3957
  }, i = (p, f) => {
3943
- r && r.style !== p && o(), r ? r.items.push(gt(f)) : r = { style: p, items: [gt(f)] };
3958
+ r && r.style !== p && o(), r ? r.items.push(yt(f)) : r = { style: p, items: [yt(f)] };
3944
3959
  };
3945
3960
  let s = [], a = [];
3946
3961
  const u = () => {
@@ -4005,33 +4020,33 @@ function $u(e) {
4005
4020
  continue;
4006
4021
  }
4007
4022
  l(), o();
4008
- const E = ht.test(p);
4009
- s.push(p.replace(ht, "").trim() + (E ? `
4023
+ const E = gt.test(p);
4024
+ s.push(p.replace(gt, "").trim() + (E ? `
4010
4025
  ` : " ")), c++;
4011
4026
  }
4012
4027
  return d(), n;
4013
4028
  }
4014
- function Lu(e, t) {
4015
- return Pn(e, t).replace(/^```.*$/gm, "").replace(/^\|[\s:|-]*\|$/gm, "").replace(/[ \t]*\|[ \t]*/g, " ").replace(/^[ \t]*(#{1,6}|>|[-*+]|\d+\.)[ \t]+/gm, "").replace(/!\[([^\]]*)\]\([^)]*\)/g, "$1").replace(/\[([^\]]+)\]\([^)]*\)/g, "$1").replace(/(\*\*|__|\*|_|`|~~)/g, "").replace(/[ \t]+$/gm, "").replace(/\n{3,}/g, `
4029
+ function Fu(e, t) {
4030
+ return Kn(e, t).replace(/^```.*$/gm, "").replace(/^\|[\s:|-]*\|$/gm, "").replace(/[ \t]*\|[ \t]*/g, " ").replace(/^[ \t]*(#{1,6}|>|[-*+]|\d+\.)[ \t]+/gm, "").replace(/!\[([^\]]*)\]\([^)]*\)/g, "$1").replace(/\[([^\]]+)\]\([^)]*\)/g, "$1").replace(/(\*\*|__|\*|_|`|~~)/g, "").replace(/[ \t]+$/gm, "").replace(/\n{3,}/g, `
4016
4031
 
4017
4032
  `).trim();
4018
4033
  }
4019
- const Pu = "documents.describe", Ku = "documents.inspect", Uu = "documents.apply";
4020
- function Fu(e) {
4034
+ const Bu = "documents.describe", ju = "documents.inspect", Hu = "documents.apply";
4035
+ function Gu(e) {
4021
4036
  const t = e.indexOf(":");
4022
4037
  if (t !== -1) return e.slice(0, t);
4023
4038
  const n = e.indexOf(".");
4024
4039
  return n === -1 ? e : e.slice(0, n);
4025
4040
  }
4026
- const Bu = "installation-id";
4027
- function ju(e) {
4041
+ const Wu = "installation-id";
4042
+ function Vu(e) {
4028
4043
  const t = [];
4029
4044
  for (const n of Object.keys(e))
4030
4045
  for (const r of Object.keys(e[n]))
4031
4046
  t.push({ lang: n, key: r, value: e[n][r] });
4032
4047
  return t;
4033
4048
  }
4034
- const Hu = "notification-source", Gu = (e, t) => `${e}.pref.${t}`, Wu = {
4049
+ const zu = "notification-source", Xu = (e, t) => `${e}.pref.${t}`, Yu = {
4035
4050
  ai: [
4036
4051
  "account.read",
4037
4052
  "account.write",
@@ -4166,48 +4181,48 @@ const Hu = "notification-source", Gu = (e, t) => `${e}.pref.${t}`, Wu = {
4166
4181
  time: ["entry.read", "entry.write", "work-type.read", "work-type.write"],
4167
4182
  user: ["user.read", "user.write"],
4168
4183
  work: ["item.read", "item.write", "project.read", "project.write"]
4169
- }, tn = 9e4, Ai = ["out_of_office"], nn = (e) => Ai.includes(e);
4170
- function Vu(e, t, n) {
4171
- const r = n - e < tn, o = t?.status && (!t.expiresAt || t.expiresAt > n) ? t : void 0;
4184
+ }, nn = 9e4, Ei = ["out_of_office"], rn = (e) => Ei.includes(e);
4185
+ function qu(e, t, n) {
4186
+ const r = n - e < nn, o = t?.status && (!t.expiresAt || t.expiresAt > n) ? t : void 0;
4172
4187
  if (!o?.status) return { online: r, status: r ? "available" : "offline" };
4173
4188
  const i = o.status;
4174
- return !r && !nn(i) ? { online: !1, status: "offline" } : { online: r, status: i, message: o.message };
4189
+ return !r && !rn(i) ? { online: !1, status: "offline" } : { online: r, status: i, message: o.message };
4175
4190
  }
4176
- function zu(e, t) {
4177
- const n = t - e.lastSeenAt < tn, r = n || nn(e.status) ? e.status : "offline";
4191
+ function Qu(e, t) {
4192
+ const n = t - e.lastSeenAt < nn, r = n || rn(e.status) ? e.status : "offline";
4178
4193
  return n === e.online && r === e.status ? e : { ...e, online: n, status: r };
4179
4194
  }
4180
- function Xu(e, t) {
4195
+ function Zu(e, t) {
4181
4196
  return e?.teamId && t.includes(e.teamId) ? { teamId: e.teamId, mustChoose: !1 } : t.length === 1 ? { teamId: t[0], mustChoose: !1 } : { teamId: void 0, mustChoose: t.length > 1 };
4182
4197
  }
4183
- function Yu(e) {
4198
+ function Ju(e) {
4184
4199
  return e.providerAvailable && e.allowed;
4185
4200
  }
4186
- const qu = "resources.describe", Qu = "resources.search", Zu = "resources.resolve", Ju = "resources.attached";
4187
- function ed(e) {
4201
+ const ed = "resources.describe", td = "resources.search", nd = "resources.resolve", rd = "resources.attached";
4202
+ function od(e) {
4188
4203
  const t = e.indexOf(":");
4189
4204
  return t === -1 ? e : e.slice(0, t);
4190
4205
  }
4191
- const td = "/provider/scope/related", nd = "/provider/scope/read", rn = "auth";
4192
- function on(e) {
4206
+ const id = "/provider/scope/related", sd = "/provider/scope/read", on = "auth";
4207
+ function sn(e) {
4193
4208
  const t = typeof e == "string" ? e.match(/apps\/([^/?#]+)/) : null;
4194
4209
  return t ? t[1] : null;
4195
4210
  }
4196
- function rd(e) {
4197
- const t = on(e);
4198
- return t ? t !== rn : typeof e == "string" && e.startsWith("/wake");
4211
+ function ad(e) {
4212
+ const t = sn(e);
4213
+ return t ? t !== on : typeof e == "string" && e.startsWith("/wake");
4199
4214
  }
4200
- function od(e) {
4201
- return typeof e != "string" || e === "" || e === "/" ? !0 : on(e) === rn;
4215
+ function cd(e) {
4216
+ return typeof e != "string" || e === "" || e === "/" ? !0 : sn(e) === on;
4202
4217
  }
4203
- function Si(e) {
4218
+ function Ti(e) {
4204
4219
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
4205
4220
  }
4206
- function Ei(e) {
4207
- const n = e.split("/").filter(Boolean).map((r) => r.startsWith(":") ? r.endsWith("?") ? "(?:/[^/]+)?" : "/[^/]+" : `/${Si(r)}`).join("");
4221
+ function Ii(e) {
4222
+ const n = e.split("/").filter(Boolean).map((r) => r.startsWith(":") ? r.endsWith("?") ? "(?:/[^/]+)?" : "/[^/]+" : `/${Ti(r)}`).join("");
4208
4223
  return new RegExp(`^${n}\\/?$`);
4209
4224
  }
4210
- function Ti(e, t) {
4225
+ function ki(e, t) {
4211
4226
  const n = e.split("/").filter(Boolean), r = t.split("/").filter(Boolean), o = {};
4212
4227
  return n.forEach((i, s) => {
4213
4228
  if (i.startsWith(":")) {
@@ -4216,14 +4231,14 @@ function Ti(e, t) {
4216
4231
  }
4217
4232
  }), o;
4218
4233
  }
4219
- function Ii(e) {
4234
+ function wi(e) {
4220
4235
  return e.publicBasePath ?? `/apps/${e.name}`;
4221
4236
  }
4222
- function id(e) {
4237
+ function ld(e) {
4223
4238
  const t = [];
4224
4239
  for (const n of e) {
4225
4240
  if (!n?.name) continue;
4226
- const r = Ii(n);
4241
+ const r = wi(n);
4227
4242
  for (const o of n.routes ?? []) {
4228
4243
  if (!o.public) continue;
4229
4244
  const i = o.path === "/" ? "" : o.path;
@@ -4237,7 +4252,7 @@ function id(e) {
4237
4252
  }
4238
4253
  return t;
4239
4254
  }
4240
- function ki(e, t) {
4255
+ function vi(e, t) {
4241
4256
  const n = e.split("/").filter(Boolean), r = t.split("/").filter(Boolean);
4242
4257
  for (let o = 0; o < Math.min(n.length, r.length); o++) {
4243
4258
  const i = n[o].startsWith(":"), s = r[o].startsWith(":");
@@ -4245,17 +4260,17 @@ function ki(e, t) {
4245
4260
  }
4246
4261
  return n.length > r.length;
4247
4262
  }
4248
- function wi(e, t) {
4263
+ function Mi(e, t) {
4249
4264
  if (typeof e != "string") return null;
4250
4265
  let n = null;
4251
4266
  for (const r of t)
4252
- Ei(r.pattern).test(e) && (!n || ki(r.pattern, n.pattern)) && (n = r);
4253
- return n ? { ...n, params: { ...n.props, ...Ti(n.pattern, e) } } : null;
4267
+ Ii(r.pattern).test(e) && (!n || vi(r.pattern, n.pattern)) && (n = r);
4268
+ return n ? { ...n, params: { ...n.props, ...ki(n.pattern, e) } } : null;
4254
4269
  }
4255
- function sd(e, t) {
4256
- return wi(e, t) !== null;
4270
+ function ud(e, t) {
4271
+ return Mi(e, t) !== null;
4257
4272
  }
4258
- const ad = 10 * 1024 * 1024, cd = 25 * 1024 * 1024, ld = "sync-target", ud = 20, vi = {
4273
+ const dd = 10 * 1024 * 1024, pd = 25 * 1024 * 1024, fd = "sync-target", md = 20, Ci = {
4259
4274
  afrikaans: [
4260
4275
  "[Muziek]",
4261
4276
  "(C) TV GELDERLAND 2021",
@@ -4405,14 +4420,14 @@ const ad = 10 * 1024 * 1024, cd = 25 * 1024 * 1024, ld = "sync-target", ud = 20,
4405
4420
  "[MÚSICA]",
4406
4421
  "[Music cuts in British]"
4407
4422
  ]
4408
- }, Mi = (e) => {
4423
+ }, Oi = (e) => {
4409
4424
  let t = e;
4410
- return Object.values(vi).forEach((n) => {
4425
+ return Object.values(Ci).forEach((n) => {
4411
4426
  n.forEach((r) => {
4412
4427
  t = t.replaceAll(r, "");
4413
4428
  });
4414
4429
  }), t = t.replace(/\(.*?\)/g, ""), t = t.replace(/\[.*?\]/g, ""), t;
4415
- }, Ci = 6e4, Oi = 8e3, xi = 2, Ni = 0.4, Ri = 3, Di = /* @__PURE__ */ new Set([
4430
+ }, xi = 6e4, Ni = 8e3, Ri = 2, Di = 0.4, $i = 3, Li = /* @__PURE__ */ new Set([
4416
4431
  "aan",
4417
4432
  "als",
4418
4433
  "ben",
@@ -4525,13 +4540,13 @@ const ad = 10 * 1024 * 1024, cd = 25 * 1024 * 1024, ld = "sync-target", ud = 20,
4525
4540
  "you",
4526
4541
  "your"
4527
4542
  ]);
4528
- function $i(e) {
4543
+ function Pi(e) {
4529
4544
  const t = /* @__PURE__ */ new Set();
4530
4545
  for (const n of e.toLowerCase().split(/[^a-z0-9À-ɏ]+/))
4531
- n.length < Ri || Di.has(n) || t.add(n);
4546
+ n.length < $i || Li.has(n) || t.add(n);
4532
4547
  return [...t];
4533
4548
  }
4534
- function Li(e, t) {
4549
+ function Ki(e, t) {
4535
4550
  if (!e.length) return 0;
4536
4551
  if (!t.length) return 1;
4537
4552
  const n = new Set(t), r = new Set(e);
@@ -4539,32 +4554,32 @@ function Li(e, t) {
4539
4554
  for (const i of r) n.has(i) || (o += 1);
4540
4555
  return o / r.size;
4541
4556
  }
4542
- function Pi(e, t = Ci) {
4557
+ function Ui(e, t = xi) {
4543
4558
  const n = e.filter((s) => !s.partial && typeof s.text == "string");
4544
4559
  if (!n.length) return { text: "", segmentCount: 0 };
4545
4560
  const o = n.reduce((s, a) => Math.max(s, a.endedAt ?? 0), 0) - t;
4546
- return { text: n.filter((s) => (s.endedAt ?? 0) >= o).map((s) => Mi(s.text).trim()).filter(Boolean).join(" ").replace(/\s+/g, " ").trim(), segmentCount: n.length };
4561
+ return { text: n.filter((s) => (s.endedAt ?? 0) >= o).map((s) => Oi(s.text).trim()).filter(Boolean).join(" ").replace(/\s+/g, " ").trim(), segmentCount: n.length };
4547
4562
  }
4548
- const Ki = 60;
4549
- function dd(e, t, n = Ki) {
4563
+ const Fi = 60;
4564
+ function hd(e, t, n = Fi) {
4550
4565
  const r = new Set(e), o = [...e];
4551
4566
  for (const i of t)
4552
4567
  !i || r.has(i) || (r.add(i), o.push(i));
4553
4568
  return o.slice(-n);
4554
4569
  }
4555
- function pd(e) {
4570
+ function gd(e) {
4556
4571
  const { segments: t, now: n, state: r } = e;
4557
- if (r.lastTriggerAt && n - r.lastTriggerAt < Oi)
4572
+ if (r.lastTriggerAt && n - r.lastTriggerAt < Ni)
4558
4573
  return { trigger: !1, reason: "too_soon" };
4559
- const o = Pi(t, e.windowMs);
4574
+ const o = Ui(t, e.windowMs);
4560
4575
  if (!o.text) return { trigger: !1, reason: "no_speech" };
4561
4576
  const i = o.segmentCount - (r.lastSegmentCount ?? 0);
4562
- if (r.lastQueryTerms && i < xi)
4577
+ if (r.lastQueryTerms && i < Ri)
4563
4578
  return { trigger: !1, reason: "too_few_new" };
4564
- const s = $i(o.text);
4565
- return s.length ? r.lastQueryTerms?.length && Li(s, r.lastQueryTerms) < Ni ? { trigger: !1, reason: "same_topic" } : { trigger: !0, text: o.text, terms: s, segmentCount: o.segmentCount } : { trigger: !1, reason: "no_speech" };
4579
+ const s = Pi(o.text);
4580
+ return s.length ? r.lastQueryTerms?.length && Ki(s, r.lastQueryTerms) < Di ? { trigger: !1, reason: "same_topic" } : { trigger: !0, text: o.text, terms: s, segmentCount: o.segmentCount } : { trigger: !1, reason: "no_speech" };
4566
4581
  }
4567
- const fd = [
4582
+ const yd = [
4568
4583
  "personal",
4569
4584
  "organization",
4570
4585
  "connections",
@@ -4572,7 +4587,7 @@ const fd = [
4572
4587
  "work",
4573
4588
  "administration",
4574
4589
  "ai"
4575
- ], md = "navNotice", Ke = {
4590
+ ], bd = "navNotice", Ue = {
4576
4591
  // The lower bounds are deliberately generous: service ranges (0800/0900) are
4577
4592
  // shorter than geographic numbers, and a too-strict minimum silently drops them.
4578
4593
  // An over-permissive key is harmless — it simply matches nothing.
@@ -4595,53 +4610,53 @@ const fd = [
4595
4610
  PL: { callingCode: "48", nsnMin: 9, nsnMax: 9 },
4596
4611
  US: { callingCode: "1", nsnMin: 10, nsnMax: 10 },
4597
4612
  CA: { callingCode: "1", nsnMin: 10, nsnMax: 10 }
4598
- }, Ui = "NL", Fi = 15, Bi = 8, ji = Array.from(
4599
- new Set(Object.values(Ke).map((e) => e.callingCode))
4613
+ }, Bi = "NL", ji = 15, Hi = 8, Gi = Array.from(
4614
+ new Set(Object.values(Ue).map((e) => e.callingCode))
4600
4615
  ).sort((e, t) => t.length - e.length);
4601
- function yt(e) {
4616
+ function bt(e) {
4602
4617
  if (e)
4603
- return Ke[e.trim().toUpperCase()];
4618
+ return Ue[e.trim().toUpperCase()];
4604
4619
  }
4605
4620
  function ee(e, t) {
4606
4621
  return e.length >= t.nsnMin && e.length <= t.nsnMax;
4607
4622
  }
4608
- function bt(e) {
4609
- if (e.length > Fi) return null;
4610
- for (const t of ji) {
4623
+ function _t(e) {
4624
+ if (e.length > ji) return null;
4625
+ for (const t of Gi) {
4611
4626
  if (!e.startsWith(t)) continue;
4612
4627
  const n = e.slice(t.length);
4613
- for (const r of Object.values(Ke)) {
4628
+ for (const r of Object.values(Ue)) {
4614
4629
  if (r.callingCode !== t) continue;
4615
4630
  const o = r.trunkPrefix, i = o && n.startsWith(o) ? n.slice(o.length) : n;
4616
4631
  if (ee(i, r)) return `+${t}${i}`;
4617
4632
  }
4618
4633
  return null;
4619
4634
  }
4620
- return e.length < Bi ? null : `+${e}`;
4635
+ return e.length < Hi ? null : `+${e}`;
4621
4636
  }
4622
- function Hi(e) {
4637
+ function Wi(e) {
4623
4638
  let t = e.trim();
4624
4639
  const n = t.match(/^(sips?|tel|whatsapp):/i);
4625
4640
  n && (t = t.slice(n[0].length));
4626
4641
  const r = t.indexOf("@");
4627
4642
  return r >= 0 && (t = t.slice(0, r)), t.trim();
4628
4643
  }
4629
- function hd(e) {
4644
+ function _d(e) {
4630
4645
  if (!e) return !1;
4631
4646
  const t = e.indexOf("@");
4632
4647
  if (t <= 0) return !1;
4633
4648
  const n = e.slice(0, t).trim();
4634
4649
  return !/^[+\d\s().-]+$/.test(n);
4635
4650
  }
4636
- function _t(e, t) {
4651
+ function At(e, t) {
4637
4652
  if (!e) return null;
4638
- const n = Hi(e);
4653
+ const n = Wi(e);
4639
4654
  if (!n) return null;
4640
4655
  const r = n.startsWith("+"), o = n.replace(/\D/g, "");
4641
4656
  if (!o) return null;
4642
- if (r) return bt(o);
4643
- if (o.startsWith("00")) return bt(o.slice(2));
4644
- const i = yt(t) ?? yt(Ui);
4657
+ if (r) return _t(o);
4658
+ if (o.startsWith("00")) return _t(o.slice(2));
4659
+ const i = bt(t) ?? bt(Bi);
4645
4660
  if (!i) return null;
4646
4661
  const s = i.trunkPrefix;
4647
4662
  if (s && o.startsWith(s)) {
@@ -4654,22 +4669,22 @@ function _t(e, t) {
4654
4669
  }
4655
4670
  return !s && ee(o, i) ? `+${i.callingCode}${o}` : null;
4656
4671
  }
4657
- function gd(e, t = 9) {
4672
+ function Ad(e, t = 9) {
4658
4673
  const n = (e ?? "").replace(/\D/g, "");
4659
4674
  return n.length < t ? null : n.slice(-t);
4660
4675
  }
4661
- function sn(e) {
4676
+ function an(e) {
4662
4677
  if (!e) return null;
4663
4678
  const t = e.trim().toLowerCase(), n = t.lastIndexOf("@");
4664
4679
  if (n <= 0 || n === t.length - 1) return null;
4665
4680
  const r = t.slice(0, n).split("+")[0], o = t.slice(n + 1);
4666
4681
  return !r || !o.includes(".") ? null : `${r}@${o}`;
4667
4682
  }
4668
- function yd(e) {
4669
- const t = sn(e);
4683
+ function Sd(e) {
4684
+ const t = an(e);
4670
4685
  return t ? t.slice(t.lastIndexOf("@") + 1) : null;
4671
4686
  }
4672
- const Gi = /* @__PURE__ */ new Set([
4687
+ const Vi = /* @__PURE__ */ new Set([
4673
4688
  "co.uk",
4674
4689
  "org.uk",
4675
4690
  "gov.uk",
@@ -4679,14 +4694,14 @@ const Gi = /* @__PURE__ */ new Set([
4679
4694
  "com.br",
4680
4695
  "co.za"
4681
4696
  ]);
4682
- function Wi(e) {
4697
+ function zi(e) {
4683
4698
  if (!e) return null;
4684
4699
  const t = e.trim().toLowerCase().replace(/\.$/, "").split(".").filter(Boolean);
4685
4700
  if (t.length < 2) return null;
4686
4701
  const n = t.slice(-2).join(".");
4687
- return Gi.has(n) && t.length >= 3 ? t.slice(-3).join(".") : n;
4702
+ return Vi.has(n) && t.length >= 3 ? t.slice(-3).join(".") : n;
4688
4703
  }
4689
- const Vi = /* @__PURE__ */ new Set([
4704
+ const Xi = /* @__PURE__ */ new Set([
4690
4705
  "gmail.com",
4691
4706
  "googlemail.com",
4692
4707
  "outlook.com",
@@ -4731,34 +4746,34 @@ const Vi = /* @__PURE__ */ new Set([
4731
4746
  "proximus.be",
4732
4747
  "scarlet.be"
4733
4748
  ]);
4734
- function bd(e) {
4735
- const t = Wi(e);
4736
- return t ? Vi.has(t) : !1;
4749
+ function Ed(e) {
4750
+ const t = zi(e);
4751
+ return t ? Xi.has(t) : !1;
4737
4752
  }
4738
- function _d(e) {
4753
+ function Td(e) {
4739
4754
  if (!e) return !1;
4740
4755
  const t = e.trim().toLowerCase();
4741
4756
  return t === "tel" || t === "sms" || t === "whatsapp" || t === "fax";
4742
4757
  }
4743
- function Ad(e, t, n) {
4758
+ function Id(e, t, n) {
4744
4759
  if (!e || !t) return null;
4745
4760
  const r = e.trim().toLowerCase();
4746
4761
  if (r === "tel" || r === "sms" || r === "whatsapp") {
4747
- const i = _t(t, n);
4762
+ const i = At(t, n);
4748
4763
  return i ? `tel:${i}` : null;
4749
4764
  }
4750
4765
  if (r === "fax") {
4751
- const i = _t(t, n);
4766
+ const i = At(t, n);
4752
4767
  return i ? `fax:${i}` : null;
4753
4768
  }
4754
4769
  if (r === "mailto" || r === "email") {
4755
- const i = sn(t);
4770
+ const i = an(t);
4756
4771
  return i ? `mailto:${i}` : null;
4757
4772
  }
4758
4773
  const o = t.trim().toLowerCase();
4759
4774
  return o ? `${r}:${o}` : null;
4760
4775
  }
4761
- const zi = [
4776
+ const Yi = [
4762
4777
  /<blockquote/i,
4763
4778
  /class="?gmail_quote/i,
4764
4779
  // Gmail quote container
@@ -4771,72 +4786,72 @@ const zi = [
4771
4786
  // Outlook underscore separator before "From:"
4772
4787
  /\bOn\b[\s\S]{0,200}?\bwrote:/i
4773
4788
  // Gmail "On <date> <name> wrote:"
4774
- ], At = /^\s*(?:>+\s*)?(?:from|van|sent|verzonden|to|aan|cc|subject|onderwerp|date|datum)\s*:/i, Xi = /^\s*(?:on|op)\b.{0,200}?\b(?:wrote|schreef|geschreven)\s*:?\s*$/i;
4775
- function Yi(e) {
4789
+ ], St = /^\s*(?:>+\s*)?(?:from|van|sent|verzonden|to|aan|cc|subject|onderwerp|date|datum)\s*:/i, qi = /^\s*(?:on|op)\b.{0,200}?\b(?:wrote|schreef|geschreven)\s*:?\s*$/i;
4790
+ function Qi(e) {
4776
4791
  const t = e.split(`
4777
4792
  `);
4778
4793
  for (let n = 0; n < t.length; n++)
4779
- if (Xi.test(t[n]) || At.test(t[n]) && t.slice(n + 1, n + 4).some((r) => At.test(r)))
4794
+ if (qi.test(t[n]) || St.test(t[n]) && t.slice(n + 1, n + 4).some((r) => St.test(r)))
4780
4795
  return t.slice(0, n).join(`
4781
4796
  `).trim();
4782
4797
  return e;
4783
4798
  }
4784
- const qi = /^(?:https?:|mailto:|tel:)/i, Qi = /^(?:https?:|cid:|data:image\/)/i;
4785
- function me(e, t) {
4799
+ const Zi = /^(?:https?:|mailto:|tel:)/i, Ji = /^(?:https?:|cid:|data:image\/)/i;
4800
+ function he(e, t) {
4786
4801
  const n = e.match(new RegExp(`\\b${t}\\s*=\\s*(?:"([^"]*)"|'([^']*)'|([^\\s">]+))`, "i"));
4787
4802
  return (n?.[1] ?? n?.[2] ?? n?.[3] ?? "").trim();
4788
4803
  }
4789
- const Zi = /(!\[[^\]]*\]\([^)]*\))/;
4790
- function St(e) {
4791
- return e.replace(/\s+/g, " ").trim().split(Zi).map((t, n) => n % 2 === 1 ? t : t.replace(/[[\]]/g, "\\$&")).join("");
4804
+ const es = /(!\[[^\]]*\]\([^)]*\))/;
4805
+ function Et(e) {
4806
+ return e.replace(/\s+/g, " ").trim().split(es).map((t, n) => n % 2 === 1 ? t : t.replace(/[[\]]/g, "\\$&")).join("");
4792
4807
  }
4793
- function he(e) {
4808
+ function ge(e) {
4794
4809
  return e.replace(
4795
4810
  /[()\s<>"]/g,
4796
4811
  (t) => `%${t.charCodeAt(0).toString(16).toUpperCase().padStart(2, "0")}`
4797
4812
  );
4798
4813
  }
4799
- function Ji(e) {
4814
+ function ts(e) {
4800
4815
  return e.replace(/<img\b([^>]*?)\/?>/gi, (n, r) => {
4801
- const o = me(r, "src");
4802
- return Qi.test(o) ? `![${St(me(r, "alt"))}](${he(o)})` : "";
4816
+ const o = he(r, "src");
4817
+ return Ji.test(o) ? `![${Et(he(r, "alt"))}](${ge(o)})` : "";
4803
4818
  }).replace(
4804
4819
  /<a\b([^>]*)>([\s\S]*?)<\/a\s*>/gi,
4805
4820
  (n, r, o) => {
4806
- const i = St(o.replace(/<[^>]*>/g, "")), s = me(r, "href");
4807
- return qi.test(s) ? `[${i || he(s)}](${he(s)})` : i;
4821
+ const i = Et(o.replace(/<[^>]*>/g, "")), s = he(r, "href");
4822
+ return Zi.test(s) ? `[${i || ge(s)}](${ge(s)})` : i;
4808
4823
  }
4809
4824
  );
4810
4825
  }
4811
- const es = /<table\b[^>]*>((?:(?!<table\b)[\s\S])*?)<\/table\s*>/i, ts = /<tr\b[^>]*>([\s\S]*?)<\/tr\s*>/gi, ns = /<(t[dh])\b([^>]*)>([\s\S]*?)<\/\1\s*>/gi;
4812
- function rs(e, t) {
4826
+ const ns = /<table\b[^>]*>((?:(?!<table\b)[\s\S])*?)<\/table\s*>/i, rs = /<tr\b[^>]*>([\s\S]*?)<\/tr\s*>/gi, os = /<(t[dh])\b([^>]*)>([\s\S]*?)<\/\1\s*>/gi;
4827
+ function is(e, t) {
4813
4828
  return /<table\b/i.test(e) || e.includes(`
4814
4829
 
4815
4830
  |`) || t.includes("![") || t.length > 200;
4816
4831
  }
4817
- const os = 40, is = { left: "---", center: ":---:", right: "---:" };
4818
- function ss(e) {
4832
+ const ss = 40, as = { left: "---", center: ":---:", right: "---:" };
4833
+ function cs(e) {
4819
4834
  const t = e.match(/align\s*[=:]\s*["']?\s*(right|center)/i);
4820
4835
  return t ? t[1].toLowerCase() : "left";
4821
4836
  }
4822
- function as(e) {
4837
+ function ls(e) {
4823
4838
  return e.replace(/<[^>]*>/g, "").replace(/\s+/g, " ").trim().replace(/\|/g, "\\|");
4824
4839
  }
4825
- function cs(e) {
4840
+ function us(e) {
4826
4841
  const t = [];
4827
- for (const s of e.matchAll(ts)) {
4842
+ for (const s of e.matchAll(rs)) {
4828
4843
  const a = [];
4829
- for (const u of s[1].matchAll(ns)) {
4830
- const l = as(u[3]);
4831
- if (rs(u[3], l)) return null;
4832
- a.push({ text: l, align: ss(u[2]) });
4844
+ for (const u of s[1].matchAll(os)) {
4845
+ const l = ls(u[3]);
4846
+ if (is(u[3], l)) return null;
4847
+ a.push({ text: l, align: cs(u[2]) });
4833
4848
  }
4834
4849
  if (a.length === 0) return null;
4835
4850
  a.some((u) => u.text !== "") && t.push(a);
4836
4851
  }
4837
4852
  const n = t[0]?.length ?? 0;
4838
4853
  if (t.length < 2 || n < 2 || t.some((s) => s.length !== n)) return null;
4839
- const r = (s) => `| ${s.map((a) => a.text).join(" | ")} |`, o = t[1].map((s) => is[s.align]).join(" | "), i = t.slice(1).map(r).join(`
4854
+ const r = (s) => `| ${s.map((a) => a.text).join(" | ")} |`, o = t[1].map((s) => as[s.align]).join(" | "), i = t.slice(1).map(r).join(`
4840
4855
  `);
4841
4856
  return `
4842
4857
 
@@ -4846,36 +4861,36 @@ ${i}
4846
4861
 
4847
4862
  `;
4848
4863
  }
4849
- function ls(e) {
4864
+ function ds(e) {
4850
4865
  return e.replace(/<\/(t[dh])\s*>/gi, " ").replace(/<\/tr\s*>/gi, `
4851
4866
  `).replace(/<(?:tbody|thead|tfoot|caption|colgroup|col|tr|t[dh])\b[^>]*>/gi, "").replace(/<\/(?:tbody|thead|tfoot|caption|colgroup)\s*>/gi, "");
4852
4867
  }
4853
- function us(e) {
4868
+ function ps(e) {
4854
4869
  let t = e;
4855
- for (let n = 0; n < os; n++) {
4856
- const r = es.exec(t);
4870
+ for (let n = 0; n < ss; n++) {
4871
+ const r = ns.exec(t);
4857
4872
  if (!r || r.index === void 0) break;
4858
- const i = cs(r[1]) ?? `
4873
+ const i = us(r[1]) ?? `
4859
4874
 
4860
- ${ls(r[1])}
4875
+ ${ds(r[1])}
4861
4876
 
4862
4877
  `;
4863
4878
  t = t.slice(0, r.index) + i + t.slice(r.index + r[0].length);
4864
4879
  }
4865
4880
  return t;
4866
4881
  }
4867
- function Et(e, t) {
4882
+ function Tt(e, t) {
4868
4883
  let n = e;
4869
4884
  return n = n.replace(/<(script|style)[\s\S]*?<\/\1>/gi, ""), n = n.replace(/<!--[\s\S]*?-->/g, ""), n = n.replace(/<br\s*\/?>/gi, `
4870
- `), t && (n = us(Ji(n))), n = n.replace(/<\/(p|h[1-6]|ul|ol|table|blockquote)>/gi, `
4885
+ `), t && (n = ps(ts(n))), n = n.replace(/<\/(p|h[1-6]|ul|ol|table|blockquote)>/gi, `
4871
4886
 
4872
4887
  `), n = n.replace(/<\/(div|li|tr)>/gi, `
4873
4888
  `), n = n.replace(/<\/(td|th)>/gi, " "), n = n.replace(/<[^>]+>/g, ""), n = n.replace(/<[^>]*$/, ""), n;
4874
4889
  }
4875
- function Tt(e) {
4890
+ function It(e) {
4876
4891
  return !Number.isInteger(e) || e < 0 || e > 1114111 ? null : String.fromCodePoint(e);
4877
4892
  }
4878
- const ds = {
4893
+ const fs = {
4879
4894
  euro: "€",
4880
4895
  pound: "£",
4881
4896
  yen: "¥",
@@ -4897,527 +4912,531 @@ const ds = {
4897
4912
  rdquo: "”",
4898
4913
  apos: "'"
4899
4914
  };
4900
- function It(e) {
4901
- return e.replace(/&nbsp;/gi, " ").replace(/&([a-z]+);/gi, (t, n) => ds[n.toLowerCase()] ?? t).replace(/&lt;/gi, "<").replace(/&gt;/gi, ">").replace(/&quot;/gi, '"').replace(/&#(\d+);/g, (t, n) => Tt(Number(n)) ?? t).replace(/&#x([0-9a-f]+);/gi, (t, n) => Tt(parseInt(n, 16)) ?? t).replace(/&amp;/gi, "&");
4902
- }
4903
4915
  function kt(e) {
4916
+ return e.replace(/&nbsp;/gi, " ").replace(/&([a-z]+);/gi, (t, n) => fs[n.toLowerCase()] ?? t).replace(/&lt;/gi, "<").replace(/&gt;/gi, ">").replace(/&quot;/gi, '"').replace(/&#(\d+);/g, (t, n) => It(Number(n)) ?? t).replace(/&#x([0-9a-f]+);/gi, (t, n) => It(parseInt(n, 16)) ?? t).replace(/&amp;/gi, "&");
4917
+ }
4918
+ function wt(e) {
4904
4919
  return e.replace(/\r/g, "").replace(/[ \t]+/g, " ").replace(/ *\n */g, `
4905
4920
  `).replace(/\n{3,}/g, `
4906
4921
 
4907
4922
  `).trim();
4908
4923
  }
4909
- const ps = /<\s*(html|body|div|p|table|br|span)\b/i;
4910
- function Sd(e) {
4911
- return ps.test(e);
4924
+ const ms = /<\s*(html|body|div|p|table|br|span)\b/i;
4925
+ function kd(e) {
4926
+ return ms.test(e);
4912
4927
  }
4913
- function Ed(e) {
4914
- return an(e, !1);
4928
+ function wd(e) {
4929
+ return cn(e, !1);
4915
4930
  }
4916
- function Td(e) {
4917
- return an(e, !0);
4931
+ function vd(e) {
4932
+ return cn(e, !0);
4918
4933
  }
4919
- function an(e, t) {
4934
+ function cn(e, t) {
4920
4935
  if (typeof e != "string" || !e) return "";
4921
4936
  let n = e.length;
4922
- for (const s of zi) {
4937
+ for (const s of Yi) {
4923
4938
  const a = e.search(s);
4924
4939
  a >= 0 && a < n && (n = a);
4925
4940
  }
4926
4941
  const r = e.slice(0, n);
4927
- let o = kt(It(Et(r, t)));
4928
- return o || (o = kt(It(Et(e, t)))), Yi(o) || o;
4942
+ let o = wt(kt(Tt(r, t)));
4943
+ return o || (o = wt(kt(Tt(e, t)))), Qi(o) || o;
4929
4944
  }
4930
4945
  export {
4931
- ta as ACTIVE_ASSIGNMENT_STATUSES,
4946
+ ra as ACTIVE_ASSIGNMENT_STATUSES,
4932
4947
  R as ACTIVITY_CATALOG,
4933
- ai as AI_ATTACHMENT_LIMITS,
4934
- su as AI_ATTACHMENT_MAX_PER_TURN,
4935
- iu as AI_ATTACHMENT_TURN_BUDGET,
4936
- Mt as AI_VENDORS,
4937
- Cn as ALLOWED_LINK_SCHEMES,
4938
- Wu as APP_PERMISSIONS,
4939
- ze as ARTIFACT_MAX_BLOCKS,
4940
- Xs as ARTIFACT_MAX_BODY_BYTES,
4948
+ li as AI_ATTACHMENT_LIMITS,
4949
+ uu as AI_ATTACHMENT_MAX_PER_TURN,
4950
+ lu as AI_ATTACHMENT_TURN_BUDGET,
4951
+ Ct as AI_VENDORS,
4952
+ On as ALLOWED_LINK_SCHEMES,
4953
+ Yu as APP_PERMISSIONS,
4954
+ Xe as ARTIFACT_MAX_BLOCKS,
4955
+ qs as ARTIFACT_MAX_BODY_BYTES,
4941
4956
  Z as ARTIFACT_MAX_CELL_LEN,
4942
- Qe as ARTIFACT_MAX_KPI_ITEMS,
4943
- Xe as ARTIFACT_MAX_LIST_ITEMS,
4944
- qe as ARTIFACT_MAX_TABLE_COLUMNS,
4945
- Ye as ARTIFACT_MAX_TABLE_ROWS,
4946
- Ot as ARTIFACT_MAX_TEXT_LEN,
4947
- Un as ASSIGNMENT_SCOPE_KIND,
4948
- du as ASSIST_BANDS,
4949
- uu as ASSIST_SOURCE_PROVIDER_GROUP,
4950
- lr as ATTENTION_STATUSES,
4951
- Co as AT_RISK_GAP,
4952
- rn as AUTH_APP_NAME,
4953
- lo as AUTO_READY_MIN_PROPOSALS,
4954
- uo as AUTO_READY_RATE,
4955
- bn as ActivityTypeRegistry,
4956
- Os as BUILT_IN_ONLY,
4957
- ur as BULK_PENALTY,
4958
- ca as BUSINESS_ENTITY_LIST_SERVICE,
4959
- Oi as CADENCE_FLOOR_MS,
4960
- xi as CADENCE_MIN_NEW_SEGMENTS,
4961
- Ni as CADENCE_MIN_NOVELTY,
4962
- Ci as CADENCE_WINDOW_MS,
4963
- Ic as CLASSIFY_VARS,
4964
- xu as CONNECTOR_PROVIDER_GROUP,
4965
- Nu as CONTEXT_COLLECT_SERVICE,
4966
- js as CORE_DIMENSIONS,
4967
- fi as CommunicationScheme,
4968
- er as DAY_MS,
4969
- wo as DEFAULT_CHECK_IN_DAYS,
4970
- jr as DEFAULT_FORECAST_WEEKS,
4971
- Xa as DEFAULT_MEMORY_BUDGET,
4972
- vl as DEFAULT_NUMBER_PADDING,
4973
- Ui as DEFAULT_PHONE_REGION,
4974
- Tl as DEFAULT_QUOTE_TEMPLATE_BLOCKS,
4975
- El as DEFAULT_TEMPLATE_CONDITIONS,
4976
- ic as DEMAND_SOURCE_PROVIDER_GROUP,
4977
- Uu as DOCUMENT_APPLY_SERVICE,
4978
- Pu as DOCUMENT_DESCRIBE_SERVICE,
4979
- Ku as DOCUMENT_INSPECT_SERVICE,
4980
- ze as DOCUMENT_MAX_BLOCKS,
4981
- Xs as DOCUMENT_MAX_BODY_BYTES,
4957
+ Ze as ARTIFACT_MAX_KPI_ITEMS,
4958
+ Ye as ARTIFACT_MAX_LIST_ITEMS,
4959
+ Qe as ARTIFACT_MAX_TABLE_COLUMNS,
4960
+ qe as ARTIFACT_MAX_TABLE_ROWS,
4961
+ xt as ARTIFACT_MAX_TEXT_LEN,
4962
+ Fn as ASSIGNMENT_SCOPE_KIND,
4963
+ hu as ASSIST_BANDS,
4964
+ mu as ASSIST_SOURCE_PROVIDER_GROUP,
4965
+ ur as ATTENTION_STATUSES,
4966
+ xo as AT_RISK_GAP,
4967
+ on as AUTH_APP_NAME,
4968
+ po as AUTO_READY_MIN_PROPOSALS,
4969
+ fo as AUTO_READY_RATE,
4970
+ _n as ActivityTypeRegistry,
4971
+ Ns as BUILT_IN_ONLY,
4972
+ dr as BULK_PENALTY,
4973
+ ua as BUSINESS_ENTITY_LIST_SERVICE,
4974
+ Ni as CADENCE_FLOOR_MS,
4975
+ Ri as CADENCE_MIN_NEW_SEGMENTS,
4976
+ Di as CADENCE_MIN_NOVELTY,
4977
+ xi as CADENCE_WINDOW_MS,
4978
+ Mc as CLASSIFY_VARS,
4979
+ $u as CONNECTOR_PROVIDER_GROUP,
4980
+ Lu as CONTEXT_COLLECT_SERVICE,
4981
+ Gs as CORE_DIMENSIONS,
4982
+ hi as CommunicationScheme,
4983
+ tr as DAY_MS,
4984
+ Mo as DEFAULT_CHECK_IN_DAYS,
4985
+ Hr as DEFAULT_FORECAST_WEEKS,
4986
+ qa as DEFAULT_MEMORY_BUDGET,
4987
+ xl as DEFAULT_NUMBER_PADDING,
4988
+ Bi as DEFAULT_PHONE_REGION,
4989
+ vl as DEFAULT_QUOTE_TEMPLATE_BLOCKS,
4990
+ wl as DEFAULT_TEMPLATE_CONDITIONS,
4991
+ ac as DEMAND_SOURCE_PROVIDER_GROUP,
4992
+ Hu as DOCUMENT_APPLY_SERVICE,
4993
+ Bu as DOCUMENT_DESCRIBE_SERVICE,
4994
+ ju as DOCUMENT_INSPECT_SERVICE,
4995
+ Xe as DOCUMENT_MAX_BLOCKS,
4996
+ qs as DOCUMENT_MAX_BODY_BYTES,
4982
4997
  Z as DOCUMENT_MAX_CELL_LEN,
4983
- Qe as DOCUMENT_MAX_KPI_ITEMS,
4984
- Ze as DOCUMENT_MAX_LETTERHEAD_FIELDS,
4985
- Xe as DOCUMENT_MAX_LIST_ITEMS,
4986
- vn as DOCUMENT_MAX_RECIPIENT_LINES,
4987
- qe as DOCUMENT_MAX_TABLE_COLUMNS,
4988
- Ye as DOCUMENT_MAX_TABLE_ROWS,
4989
- Ot as DOCUMENT_MAX_TEXT_LEN,
4990
- Je as DOCUMENT_MAX_TOTALS_ROWS,
4991
- en as DOCUMENT_OPERATIONS,
4992
- Fo as DUTCH_SLOT_LABELS,
4993
- wc as EMPTY_WORKFLOW,
4994
- Ko as ENABLED_TRANSACTION_KINDS,
4995
- vu as FEATURE_FOLDER_MANAGEMENT,
4996
- Cu as FEATURE_MESSAGE_REACTIONS,
4997
- Mu as FEATURE_REMOTE_SEARCH,
4998
- Ne as FIXED_KINDS,
4999
- oe as FIXED_LEVELS,
5000
- Le as FIXED_TYPES,
5001
- ma as FIXED_UNITS,
5002
- pr as FOLLOW_UP_HOURS,
5003
- bl as FROZEN_WRITABLE_FIELDS,
5004
- Jn as HOUR_MS,
5005
- ps as HTML_BODY_RE,
4998
+ Ze as DOCUMENT_MAX_KPI_ITEMS,
4999
+ Je as DOCUMENT_MAX_LETTERHEAD_FIELDS,
5000
+ Ye as DOCUMENT_MAX_LIST_ITEMS,
5001
+ Mn as DOCUMENT_MAX_RECIPIENT_LINES,
5002
+ Qe as DOCUMENT_MAX_TABLE_COLUMNS,
5003
+ qe as DOCUMENT_MAX_TABLE_ROWS,
5004
+ xt as DOCUMENT_MAX_TEXT_LEN,
5005
+ et as DOCUMENT_MAX_TOTALS_ROWS,
5006
+ tn as DOCUMENT_OPERATIONS,
5007
+ jo as DUTCH_SLOT_LABELS,
5008
+ Oc as EMPTY_WORKFLOW,
5009
+ Fo as ENABLED_TRANSACTION_KINDS,
5010
+ xu as FEATURE_FOLDER_MANAGEMENT,
5011
+ Ru as FEATURE_MESSAGE_REACTIONS,
5012
+ Nu as FEATURE_REMOTE_SEARCH,
5013
+ Re as FIXED_KINDS,
5014
+ ie as FIXED_LEVELS,
5015
+ Pe as FIXED_TYPES,
5016
+ ga as FIXED_UNITS,
5017
+ fr as FOLLOW_UP_HOURS,
5018
+ El as FROZEN_WRITABLE_FIELDS,
5019
+ er as HOUR_MS,
5020
+ ms as HTML_BODY_RE,
5006
5021
  L as INELIGIBLE,
5007
- Bu as INSTALLATION_HEADER,
5008
- oo as INTERACTION_KIND,
5009
- ku as InteractionParticipantRole,
5010
- Ar as KB_FALLBACK_LOCALE,
5011
- nt as KB_LOCALES,
5012
- nt as LOCALES,
5013
- Pe as LOOSE_STATUSES,
5014
- ir as MAIL_HINT_HEADERS,
5015
- gs as MAX_ACTIONS,
5016
- Fn as MAX_ASSIGNMENT_TURNS,
5017
- fs as MAX_BLOCKS,
5018
- Kt as MAX_COLLECTION_DEPTH,
5019
- ad as MAX_EDITABLE_FILE_BYTES,
5020
- ms as MAX_FIELDS,
5021
- hs as MAX_LIST_ITEMS,
5022
- Ga as MAX_MEMORY_BROWSE,
5023
- za as MAX_MEMORY_BUDGET,
5024
- Wa as MAX_MEMORY_CHARS,
5025
- Ki as MAX_SHOWN_KEYS,
5026
- Do as MAX_TOPIC_CANDIDATES,
5027
- Ro as MAX_TOPIC_EXAMPLES,
5028
- fe as MAX_TOPIC_EXAMPLE_CHARS,
5029
- cd as MAX_VIEWABLE_FILE_BYTES,
5030
- Va as MIN_MEMORY_BUDGET,
5031
- md as NAV_NOTICE_SLOT,
5032
- Dl as NL_PAYMENT_TERMS,
5033
- qa as NL_TAX_RATES,
5034
- Hu as NOTIFICATION_SOURCE_PROVIDER_GROUP,
5035
- Oo as OFF_TRACK_GAP,
5036
- Za as ONBOARDING_SOURCE_PROVIDER_GROUP,
5037
- we as PAUSE_HOLD,
5038
- Ie as PAUSE_SNOOZED,
5039
- ke as PAUSE_WAITING_FOR_CUSTOMER,
5040
- Ol as PAYMENT_TERM_METHODS,
5041
- Ke as PHONE_REGIONS,
5042
- tn as PRESENCE_ONLINE_WINDOW_MS,
5043
- Ai as PRESENCE_SURVIVES_OFFLINE,
5044
- zo as PRODUCT_SCOPE_KIND,
5045
- ec as PROFILE_TOOL_DISPOSITIONS,
5046
- Iu as PROVIDER_FEATURE_MESSAGE_TEMPLATES,
5047
- Tu as PROVIDER_FEATURE_MESSAGE_WINDOW,
5048
- Vi as PUBLIC_EMAIL_DOMAINS,
5049
- rt as READ_STEP_TYPES,
5050
- Tr as RELATED_SUBJECT_KINDS,
5051
- Jt as RESERVED_STATUS_KEYS,
5052
- Fl as RESERVED_TYPE_KEYS,
5053
- Ju as RESOURCE_ATTACHED_SERVICE,
5054
- qu as RESOURCE_DESCRIBE_SERVICE,
5055
- Zu as RESOURCE_RESOLVE_SERVICE,
5056
- Qu as RESOURCE_SEARCH_SERVICE,
5057
- Xr as SCHEDULE_ENTRY_SCOPE_KIND,
5058
- nd as SCOPE_READ_ROUTE,
5059
- td as SCOPE_RELATED_ROUTE,
5060
- fd as SETTINGS_CATEGORIES,
5061
- ha as SIGNATURE_INTENTS,
5062
- dr as SLA_HOURS_BY_PRIORITY,
5063
- Kc as SLA_METRICS,
5064
- Uc as SLA_PAUSE_REASONS,
5065
- ao as STEP_MAX_TOKENS_MAX,
5066
- so as STEP_MAX_TOKENS_MIN,
5067
- Io as STRATEGY_ITEM_SCOPE_KIND,
5068
- or as SUMMARY_MIN_LAST_CHARS,
5069
- rr as SUMMARY_MIN_MESSAGES,
5070
- ud as SYNC_RUN_MAX_ERRORS,
5071
- ld as SYNC_TARGET_PROVIDER_GROUP,
5072
- Kn as TERMINAL_ASSIGNMENT_STATUSES,
5073
- po as TERMINAL_RUN_STATUSES,
5074
- $e as TRANSACTION_KINDS,
5075
- Vo as TRANSACTION_SCOPE_KINDS,
5076
- Tc as TRIGGER_VARS,
5077
- wr as UNKNOWN_KIND,
5078
- ko as UNKNOWN_LEVEL_ORDER,
5079
- Ou as UNSUPPORTED,
5080
- In as USAGE_DIMENSIONS,
5081
- kn as USAGE_DIMENSION_IDS,
5082
- Yr as WORKSTREAM_SCOPE_KIND,
5083
- Zo as WORK_ACTIVITY_SCOPE_KIND,
5084
- Ja as WORK_AREAS,
5085
- Ll as WORK_COMMENT_ADDED,
5086
- Wl as WORK_CYCLE_SYNC_KIND,
5087
- Pl as WORK_ITEM_ASSIGNED,
5088
- qo as WORK_ITEM_SCOPE_KIND,
5089
- Kl as WORK_ITEM_STATUS_CHANGED,
5090
- Qo as WORK_PROJECT_SCOPE_KIND,
5022
+ Wu as INSTALLATION_HEADER,
5023
+ so as INTERACTION_KIND,
5024
+ Cu as InteractionParticipantRole,
5025
+ Sr as KB_FALLBACK_LOCALE,
5026
+ rt as KB_LOCALES,
5027
+ rt as LOCALES,
5028
+ Ke as LOOSE_STATUSES,
5029
+ sr as MAIL_HINT_HEADERS,
5030
+ bs as MAX_ACTIONS,
5031
+ Bn as MAX_ASSIGNMENT_TURNS,
5032
+ hs as MAX_BLOCKS,
5033
+ Ut as MAX_COLLECTION_DEPTH,
5034
+ dd as MAX_EDITABLE_FILE_BYTES,
5035
+ gs as MAX_FIELDS,
5036
+ ys as MAX_LIST_ITEMS,
5037
+ Va as MAX_MEMORY_BROWSE,
5038
+ Ya as MAX_MEMORY_BUDGET,
5039
+ za as MAX_MEMORY_CHARS,
5040
+ Fi as MAX_SHOWN_KEYS,
5041
+ Lo as MAX_TOPIC_CANDIDATES,
5042
+ $o as MAX_TOPIC_EXAMPLES,
5043
+ me as MAX_TOPIC_EXAMPLE_CHARS,
5044
+ pd as MAX_VIEWABLE_FILE_BYTES,
5045
+ Xa as MIN_MEMORY_BUDGET,
5046
+ bd as NAV_NOTICE_SLOT,
5047
+ Kl as NL_PAYMENT_TERMS,
5048
+ Za as NL_TAX_RATES,
5049
+ zu as NOTIFICATION_SOURCE_PROVIDER_GROUP,
5050
+ No as OFF_TRACK_GAP,
5051
+ ec as ONBOARDING_SOURCE_PROVIDER_GROUP,
5052
+ ve as PAUSE_HOLD,
5053
+ ke as PAUSE_SNOOZED,
5054
+ we as PAUSE_WAITING_FOR_CUSTOMER,
5055
+ Dl as PAYMENT_TERM_METHODS,
5056
+ Ue as PHONE_REGIONS,
5057
+ nn as PRESENCE_ONLINE_WINDOW_MS,
5058
+ Ei as PRESENCE_SURVIVES_OFFLINE,
5059
+ Yo as PRODUCT_SCOPE_KIND,
5060
+ nc as PROFILE_TOOL_DISPOSITIONS,
5061
+ Mu as PROVIDER_FEATURE_MESSAGE_TEMPLATES,
5062
+ vu as PROVIDER_FEATURE_MESSAGE_WINDOW,
5063
+ Xi as PUBLIC_EMAIL_DOMAINS,
5064
+ ot as READ_STEP_TYPES,
5065
+ Ir as RELATED_SUBJECT_KINDS,
5066
+ en as RESERVED_STATUS_KEYS,
5067
+ Gl as RESERVED_TYPE_KEYS,
5068
+ rd as RESOURCE_ATTACHED_SERVICE,
5069
+ ed as RESOURCE_DESCRIBE_SERVICE,
5070
+ nd as RESOURCE_RESOLVE_SERVICE,
5071
+ td as RESOURCE_SEARCH_SERVICE,
5072
+ Yr as SCHEDULE_ENTRY_SCOPE_KIND,
5073
+ sd as SCOPE_READ_ROUTE,
5074
+ id as SCOPE_RELATED_ROUTE,
5075
+ yd as SETTINGS_CATEGORIES,
5076
+ ya as SIGNATURE_INTENTS,
5077
+ pr as SLA_HOURS_BY_PRIORITY,
5078
+ jc as SLA_METRICS,
5079
+ Hc as SLA_PAUSE_REASONS,
5080
+ lo as STEP_MAX_TOKENS_MAX,
5081
+ co as STEP_MAX_TOKENS_MIN,
5082
+ wo as STRATEGY_ITEM_SCOPE_KIND,
5083
+ ir as SUMMARY_MIN_LAST_CHARS,
5084
+ or as SUMMARY_MIN_MESSAGES,
5085
+ md as SYNC_RUN_MAX_ERRORS,
5086
+ fd as SYNC_TARGET_PROVIDER_GROUP,
5087
+ Un as TERMINAL_ASSIGNMENT_STATUSES,
5088
+ mo as TERMINAL_RUN_STATUSES,
5089
+ Le as TRANSACTION_KINDS,
5090
+ Xo as TRANSACTION_SCOPE_KINDS,
5091
+ wc as TRIGGER_VARS,
5092
+ vr as UNKNOWN_KIND,
5093
+ vo as UNKNOWN_LEVEL_ORDER,
5094
+ Du as UNSUPPORTED,
5095
+ kn as USAGE_DIMENSIONS,
5096
+ wn as USAGE_DIMENSION_IDS,
5097
+ qr as WORKSTREAM_SCOPE_KIND,
5098
+ ei as WORK_ACTIVITY_SCOPE_KIND,
5099
+ tc as WORK_AREAS,
5100
+ Fl as WORK_COMMENT_ADDED,
5101
+ Yl as WORK_CYCLE_SYNC_KIND,
5102
+ Bl as WORK_ITEM_ASSIGNED,
5103
+ Zo as WORK_ITEM_SCOPE_KIND,
5104
+ jl as WORK_ITEM_STATUS_CHANGED,
5105
+ Jo as WORK_PROJECT_SCOPE_KIND,
5091
5106
  te as W_PRIORITY,
5092
- ml as acceptExampleCandidate,
5093
- Jr as actingIdentityKey,
5094
- pl as activeWorkTypes,
5095
- bs as activityIconOf,
5096
- Ms as activityJoinUrl,
5097
- mn as activitySnippet,
5098
- hn as activityTextParams,
5099
- vs as activityTimelineText,
5100
- _n as activityTimestamp,
5107
+ bl as acceptExampleCandidate,
5108
+ eo as actingIdentityKey,
5109
+ gl as activeWorkTypes,
5110
+ As as activityIconOf,
5111
+ Os as activityJoinUrl,
5112
+ hn as activitySnippet,
5113
+ gn as activityTextParams,
5114
+ Cs as activityTimelineText,
5115
+ An as activityTimestamp,
5101
5116
  k as activityTypeInfo,
5102
- yc as actorKey,
5103
- fl as addExampleCandidate,
5104
- Re as addWorkingMs,
5105
- zu as agePresenceEntry,
5106
- si as aiAttachmentKind,
5107
- au as aiAttachmentRejection,
5108
- Ve as aiBudgetLimit,
5109
- Fs as aiBudgetPeriodKey,
5110
- An as aiBudgetPeriodStart,
5111
- Us as aiBudgetState,
5112
- Ks as aiVendorAcceptsAttachment,
5113
- $s as aiVendorDefaultModel,
5114
- Ds as aiVendorLabel,
5115
- Ps as aiVendorNeedsBaseUrl,
5116
- Ls as aiVendorsWith,
5117
- Hn as allocate,
5118
- on as appNameFromPath,
5119
- al as applyRounding,
5120
- ga as applySignature,
5121
- co as approvalRate,
5122
- qs as artifactBodyBytes,
5123
- Qs as artifactOutline,
5124
- Pn as artifactToMarkdown,
5125
- Sc as assignmentMismatch,
5126
- ra as assignmentScopeKey,
5127
- sa as assignmentSubject,
5128
- oc as availabilityByPerson,
5129
- tc as belongsOnCalendar,
5130
- la as belongsToEntity,
5131
- Cs as buildActivityPreview,
5132
- bu as buildChannelIntents,
5133
- Zs as buildShareKeys,
5134
- Pi as buildWindow,
5135
- Zn as businessEntitySender,
5136
- Mr as calendarDaysBetween,
5137
- De as calendarOf,
5138
- Ka as canNestUnder,
5139
- Xc as canParent,
5140
- nc as capacityTotal,
5141
- fc as capacityWeights,
5142
- Ts as carriesText,
5143
- Fa as categoryLabel,
5144
- ti as categoryOf,
5145
- Eu as channelKindForScheme,
5146
- _s as channelKindOf,
5147
- ol as checkInOverdueMs,
5148
- kc as clampStepMaxTokens,
5149
- wa as classifyMail,
5150
- Td as cleanMessageMarkdown,
5151
- Ed as cleanMessageText,
5152
- ua as codeQuery,
5153
- fu as compareAssistRank,
5154
- No as compareWorkTypes,
5155
- Qn as conditionHolds,
5156
- Uo as copyFrom,
5117
+ _c as actorKey,
5118
+ yl as addExampleCandidate,
5119
+ De as addWorkingMs,
5120
+ Qu as agePresenceEntry,
5121
+ ci as aiAttachmentKind,
5122
+ du as aiAttachmentRejection,
5123
+ ze as aiBudgetLimit,
5124
+ js as aiBudgetPeriodKey,
5125
+ Sn as aiBudgetPeriodStart,
5126
+ Bs as aiBudgetState,
5127
+ Fs as aiVendorAcceptsAttachment,
5128
+ Ps as aiVendorDefaultModel,
5129
+ Ls as aiVendorLabel,
5130
+ Us as aiVendorNeedsBaseUrl,
5131
+ Ks as aiVendorsWith,
5132
+ Gn as allocate,
5133
+ sn as appNameFromPath,
5134
+ dl as applyRounding,
5135
+ ba as applySignature,
5136
+ uo as approvalRate,
5137
+ Zs as artifactBodyBytes,
5138
+ Js as artifactOutline,
5139
+ Kn as artifactToMarkdown,
5140
+ Tc as assignmentMismatch,
5141
+ ia as assignmentScopeKey,
5142
+ ca as assignmentSubject,
5143
+ sc as availabilityByPerson,
5144
+ rc as belongsOnCalendar,
5145
+ da as belongsToEntity,
5146
+ xs as buildActivityPreview,
5147
+ Eu as buildChannelIntents,
5148
+ ea as buildShareKeys,
5149
+ Ui as buildWindow,
5150
+ Jn as businessEntitySender,
5151
+ Cr as calendarDaysBetween,
5152
+ $e as calendarOf,
5153
+ Fa as canNestUnder,
5154
+ Zc as canParent,
5155
+ oc as capacityTotal,
5156
+ hc as capacityWeights,
5157
+ ks as carriesText,
5158
+ ja as categoryLabel,
5159
+ ri as categoryOf,
5160
+ wu as channelKindForScheme,
5161
+ Ss as channelKindOf,
5162
+ cl as checkInOverdueMs,
5163
+ Cc as clampStepMaxTokens,
5164
+ Ma as classifyMail,
5165
+ vd as cleanMessageMarkdown,
5166
+ wd as cleanMessageText,
5167
+ pa as codeQuery,
5168
+ yu as compareAssistRank,
5169
+ Do as compareWorkTypes,
5170
+ Zn as conditionHolds,
5171
+ Bo as copyFrom,
5157
5172
  z as countsAsPlanned,
5158
- rc as coverageByPerson,
5159
- ac as coverageFor,
5160
- Ft as coversWorkstream,
5161
- Cl as currentPeriod,
5162
- Bt as cycleDayIndex,
5163
- ru as cycleOrder,
5164
- ou as cycleState,
5165
- aa as decideAssignmentState,
5166
- pd as decideCadence,
5167
- gu as decideIncomingCall,
5168
- Sr as defaultLocaleOf,
5169
- Jl as defaultStatusKey,
5170
- Go as defaultTemplateBlocks,
5171
- wu as defineIntent,
5172
- br as depthOf,
5173
- Vu as derivePresence,
5174
- Ws as describeClause,
5175
- yu as disabledIntentsFromCapabilities,
5176
- qs as documentBodyBytes,
5177
- Fu as documentKindOf,
5178
- Qs as documentOutline,
5179
- Pn as documentToMarkdown,
5180
- Lu as documentToText,
5181
- jc as dueAtOf,
5182
- xl as dueDateFrom,
5183
- sl as elapsedSeconds,
5184
- yd as emailDomain,
5185
- Ad as endpointKey,
5186
- Nr as erlangC,
5187
- Ti as extractParams,
5188
- $i as extractTerms,
5189
- Aa as fillDocument,
5190
- qn as fillText,
5191
- Au as filterByEndpoint,
5192
- _u as filterByIntent,
5193
- pi as filterByTargetScheme,
5194
- Gs as filterableDimensions,
5195
- re as findAiVendor,
5196
- qc as fixedLevelForName,
5197
- Hl as fixedTypeForName,
5198
- Gl as fixedTypes,
5199
- ju as flattenLocales,
5173
+ ic as coverageByPerson,
5174
+ lc as coverageFor,
5175
+ Bt as coversWorkstream,
5176
+ Rl as currentPeriod,
5177
+ jt as cycleDayIndex,
5178
+ au as cycleOrder,
5179
+ cu as cycleState,
5180
+ la as decideAssignmentState,
5181
+ gd as decideCadence,
5182
+ Au as decideIncomingCall,
5183
+ Er as defaultLocaleOf,
5184
+ ru as defaultStatusKey,
5185
+ Vo as defaultTemplateBlocks,
5186
+ Ou as defineIntent,
5187
+ _r as depthOf,
5188
+ qu as derivePresence,
5189
+ zs as describeClause,
5190
+ Su as disabledIntentsFromCapabilities,
5191
+ Zs as documentBodyBytes,
5192
+ Gu as documentKindOf,
5193
+ Js as documentOutline,
5194
+ Kn as documentToMarkdown,
5195
+ Fu as documentToText,
5196
+ Vc as dueAtOf,
5197
+ $l as dueDateFrom,
5198
+ ul as elapsedSeconds,
5199
+ Sd as emailDomain,
5200
+ Id as endpointKey,
5201
+ Rr as erlangC,
5202
+ ki as extractParams,
5203
+ Pi as extractTerms,
5204
+ Ea as fillDocument,
5205
+ Qn as fillText,
5206
+ Iu as filterByEndpoint,
5207
+ Tu as filterByIntent,
5208
+ mi as filterByTargetScheme,
5209
+ Vs as filterableDimensions,
5210
+ oe as findAiVendor,
5211
+ el as fixedLevelForName,
5212
+ zl as fixedTypeForName,
5213
+ Xl as fixedTypes,
5214
+ Vu as flattenLocales,
5200
5215
  W as floorToPeriod,
5201
- uc as forecastIntervals,
5202
- Zr as formatActingIdentity,
5216
+ pc as forecastIntervals,
5217
+ Jr as formatActingIdentity,
5203
5218
  D as formatCents,
5204
- ll as formatClock,
5205
- cl as formatHm,
5206
- zl as formatItemKey,
5219
+ fl as formatClock,
5220
+ pl as formatHm,
5221
+ Ql as formatItemKey,
5207
5222
  G as formatPeriod,
5208
- Ml as formatSeriesNumber,
5209
- Wc as formatSlaDuration,
5210
- lu as freshSources,
5211
- xs as getActivitySeenUserIds,
5212
- ya as getContactEndpoints,
5213
- Ra as getShortTitle,
5214
- Na as getUrgencyScore,
5215
- $c as hasReacted,
5216
- Qc as healthCategory,
5217
- Zc as healthsInCategory,
5218
- Ut as heightOf,
5219
- $a as helpCenterText,
5220
- Ec as humanizeAction,
5221
- io as interactionIdOf,
5222
- $l as isAgentUser,
5223
- Oa as isAssigned,
5224
- na as isAssignmentTerminal,
5225
- no as isAssignmentTrigger,
5226
- Cc as isAutoReady,
5227
- yr as isAwaitingThem,
5228
- Rs as isChatMessageActivity,
5229
- xa as isClosed,
5230
- ks as isConnectedType,
5231
- rd as isDeepLink,
5232
- _r as isDescendant,
5233
- Ea as isEligible,
5234
- Ns as isEmailActivity,
5235
- yl as isFrozen,
5236
- Bc as isHeldClock,
5237
- Sd as isHtmlBody,
5238
- xc as isInFlight,
5239
- cr as isInteractionUnseen,
5240
- od as isLandingPath,
5241
- nr as isLikelyBulk,
5242
- wt as isMessageShape,
5243
- As as isMessageType,
5244
- ki as isMoreSpecificPattern,
5245
- vt as isNoteShape,
5246
- To as isOpenClock,
5247
- cu as isOutwardTool,
5248
- mr as isParked,
5249
- fo as isPaused,
5250
- Is as isPlaybookAuthoredType,
5251
- bd as isPublicEmailDomain,
5252
- sd as isPublicPath,
5253
- hr as isReminderActive,
5254
- Es as isReplyableType,
5255
- Ma as isSlaAtRisk,
5256
- Oc as isTerminal,
5257
- Ia as isThreadLongEnough,
5258
- ws as isTranscriptType,
5259
- eu as isWorkClosed,
5260
- dl as isWorkTypeVisible,
5261
- ql as itemDossierKeys,
5223
+ Nl as formatSeriesNumber,
5224
+ Yc as formatSlaDuration,
5225
+ fu as freshSources,
5226
+ Rs as getActivitySeenUserIds,
5227
+ _a as getContactEndpoints,
5228
+ $a as getShortTitle,
5229
+ Da as getUrgencyScore,
5230
+ Uc as hasReacted,
5231
+ tl as healthCategory,
5232
+ nl as healthsInCategory,
5233
+ Ft as heightOf,
5234
+ Pa as helpCenterText,
5235
+ Ic as humanizeAction,
5236
+ ao as interactionIdOf,
5237
+ Ul as isAgentUser,
5238
+ Na as isAssigned,
5239
+ oa as isAssignmentTerminal,
5240
+ ro as isAssignmentTrigger,
5241
+ Rc as isAutoReady,
5242
+ br as isAwaitingThem,
5243
+ $s as isChatMessageActivity,
5244
+ Ra as isClosed,
5245
+ vs as isConnectedType,
5246
+ ad as isDeepLink,
5247
+ Ar as isDescendant,
5248
+ Ia as isEligible,
5249
+ Ds as isEmailActivity,
5250
+ Sl as isFrozen,
5251
+ Wc as isHeldClock,
5252
+ kd as isHtmlBody,
5253
+ $c as isInFlight,
5254
+ lr as isInteractionUnseen,
5255
+ cd as isLandingPath,
5256
+ rr as isLikelyBulk,
5257
+ vt as isMessageShape,
5258
+ Es as isMessageType,
5259
+ vi as isMoreSpecificPattern,
5260
+ Mt as isNoteShape,
5261
+ ko as isOpenClock,
5262
+ pu as isOutwardTool,
5263
+ hr as isParked,
5264
+ ho as isPaused,
5265
+ ws as isPlaybookAuthoredType,
5266
+ Ed as isPublicEmailDomain,
5267
+ ud as isPublicPath,
5268
+ gr as isReminderActive,
5269
+ Is as isReplyableType,
5270
+ Oa as isSlaAtRisk,
5271
+ Dc as isTerminal,
5272
+ wa as isThreadLongEnough,
5273
+ Ms as isTranscriptType,
5274
+ ou as isWorkClosed,
5275
+ hl as isWorkTypeVisible,
5276
+ eu as itemDossierKeys,
5262
5277
  N as kindFor,
5263
- ei as ladderFor,
5264
- vo as levelIn,
5265
- Me as levelOrder,
5266
- kr as lineNet,
5267
- Da as linkLabel,
5268
- gl as listedTransactionKinds,
5269
- Bs as listeningAllowed,
5270
- Pa as localeInstruction,
5271
- La as localeName,
5272
- Ua as localesOf,
5273
- hd as looksLikeEmail,
5274
- Rt as lookup,
5275
- pa as marginCents,
5276
- $u as markdownToDocument,
5277
- Su as matchContactToIntents,
5278
- wi as matchPublicRoute,
5279
- ja as mcpCredentialScope,
5280
- Ha as mcpToolPrefix,
5281
- Jc as measureRatio,
5282
- dd as mergeShownKeys,
5283
- fn as messageCountsAs,
5284
- Vs as metricOption,
5285
- jt as minutesOn,
5286
- _d as needsPhoneRegion,
5287
- Ss as nestsUnderParent,
5288
- Yc as nextLevelBelow,
5289
- Hc as nextSlaClock,
5290
- _l as nextVersion,
5291
- Ys as normalizeArtifactBlocks,
5292
- ys as normalizeBlocks,
5293
- Ys as normalizeDocumentBlocks,
5294
- sn as normalizeEmail,
5278
+ ni as ladderFor,
5279
+ Co as levelIn,
5280
+ Ce as levelOrder,
5281
+ wr as lineNet,
5282
+ La as linkLabel,
5283
+ Al as listedTransactionKinds,
5284
+ Hs as listeningAllowed,
5285
+ Ua as localeInstruction,
5286
+ Ka as localeName,
5287
+ Ba as localesOf,
5288
+ _d as looksLikeEmail,
5289
+ Dt as lookup,
5290
+ ma as marginCents,
5291
+ Uu as markdownToDocument,
5292
+ ku as matchContactToIntents,
5293
+ Mi as matchPublicRoute,
5294
+ Ga as mcpCredentialScope,
5295
+ Wa as mcpToolPrefix,
5296
+ rl as measureRatio,
5297
+ hd as mergeShownKeys,
5298
+ mn as messageCountsAs,
5299
+ Xs as metricOption,
5300
+ Ht as minutesOn,
5301
+ Td as needsPhoneRegion,
5302
+ Ts as nestsUnderParent,
5303
+ Jc as nextLevelBelow,
5304
+ zc as nextSlaClock,
5305
+ Tl as nextVersion,
5306
+ Qs as normalizeArtifactBlocks,
5307
+ _s as normalizeBlocks,
5308
+ Qs as normalizeDocumentBlocks,
5309
+ an as normalizeEmail,
5295
5310
  P as normalizeExample,
5296
- Bn as normalizeGtin,
5297
- Gu as notificationPrefKey,
5298
- Li as novelty,
5299
- Du as operationDescriptor,
5300
- Ru as operationsForKind,
5301
- Sa as organizationSender,
5302
- de as overlapSeconds,
5303
- sc as overlaps,
5304
- el as paceRatio,
5305
- Ta as parkMarksById,
5306
- hc as parseActingIdentity,
5307
- da as parseAmount,
5308
- Lc as parseClockMinutes,
5309
- Xl as parseItemKey,
5310
- Ei as pathToRegex,
5311
- Gt as patternFor,
5312
- Ht as patternStartTime,
5313
- Pc as pauseBitFor,
5314
- Hs as periodsInRange,
5315
- gd as phoneSuffix,
5316
- ka as pickMailHeaders,
5317
- _a as pickTemplate,
5318
- mc as placeLumps,
5319
- dn as plainTextFromMarkdown,
5320
- Fc as planSlaEvent,
5321
- cc as plannedBillable,
5322
- Fr as plannedWorkTypeKey,
5323
- to as playbookActor,
5324
- Mc as procedureOf,
5325
- Il as productScopeKey,
5326
- Ql as projectDossierKeys,
5327
- Ii as publicBasePathFor,
5328
- id as publicRoutePatterns,
5329
- ia as reactionWakesAssignment,
5330
- ge as readPath,
5331
- ue as readStepError,
5332
- fr as recencyOf,
5333
- ba as recipientLocale,
5334
- ro as refKey,
5335
- Wi as registrableDomain,
5336
- Lo as rejectExampleCandidate,
5337
- Ya as relatedByDefault,
5338
- ve as remainingMsOf,
5339
- $r as requiredAgents,
5340
- Ur as requirementFor,
5341
- ui as resolveAccountCapabilities,
5342
- ye as resolveActivityText,
5343
- li as resolveChannelIntents,
5344
- fa as resolvePrice,
5345
- zn as resolveSignature,
5346
- Xu as resolveWorkMode,
5347
- ed as resourceKindOf,
5348
- rl as rollupChildren,
5311
+ jn as normalizeGtin,
5312
+ Xu as notificationPrefKey,
5313
+ Ki as novelty,
5314
+ Ku as operationDescriptor,
5315
+ Pu as operationsForKind,
5316
+ Ta as organizationSender,
5317
+ pe as overlapSeconds,
5318
+ cc as overlaps,
5319
+ ol as paceRatio,
5320
+ ka as parkMarksById,
5321
+ yc as parseActingIdentity,
5322
+ fa as parseAmount,
5323
+ Fc as parseClockMinutes,
5324
+ Zl as parseItemKey,
5325
+ Ii as pathToRegex,
5326
+ Wt as patternFor,
5327
+ Gt as patternStartTime,
5328
+ Bc as pauseBitFor,
5329
+ Ws as periodsInRange,
5330
+ Ad as phoneSuffix,
5331
+ va as pickMailHeaders,
5332
+ Sa as pickTemplate,
5333
+ gc as placeLumps,
5334
+ pn as plainTextFromMarkdown,
5335
+ Gc as planSlaEvent,
5336
+ uc as plannedBillable,
5337
+ Br as plannedWorkTypeKey,
5338
+ no as playbookActor,
5339
+ Nc as procedureOf,
5340
+ Ml as productScopeKey,
5341
+ tu as projectDossierKeys,
5342
+ wi as publicBasePathFor,
5343
+ ld as publicRoutePatterns,
5344
+ aa as reactionWakesAssignment,
5345
+ ye as readPath,
5346
+ de as readStepError,
5347
+ mr as recencyOf,
5348
+ Aa as recipientLocale,
5349
+ io as refKey,
5350
+ zi as registrableDomain,
5351
+ Ko as rejectExampleCandidate,
5352
+ Qa as relatedByDefault,
5353
+ Me as remainingMsOf,
5354
+ Lr as requiredAgents,
5355
+ Fr as requirementFor,
5356
+ pi as resolveAccountCapabilities,
5357
+ be as resolveActivityText,
5358
+ di as resolveChannelIntents,
5359
+ ha as resolvePrice,
5360
+ Xn as resolveSignature,
5361
+ Zu as resolveWorkMode,
5362
+ od as resourceKindOf,
5363
+ al as rollupChildren,
5349
5364
  V as roundHalfUp,
5350
- gc as runActor,
5351
- Rc as runInteractionId,
5352
- Rn as sanitizeInline,
5353
- Mi as sanitizeTranscript,
5354
- dc as scheduleEntryScopeKey,
5355
- Ca as scoreInteraction,
5356
- Ul as scoreWorkItem,
5357
- Ba as selectLenses,
5358
- Rr as serviceLevel,
5359
- hu as sessionsHoldCannotReach,
5360
- mu as sessionsToHold,
5361
- Nl as shadowTermsByCode,
5362
- Nt as shareKeyForTeam,
5363
- xt as shareKeyForUser,
5364
- Js as shareKeysForViewer,
5365
- lc as shortfalls,
5366
- Yu as shouldRunAudioPipeline,
5367
- Gc as slaBadgeTone,
5368
- va as slaHoursByInbox,
5369
- gr as slaHoursFor,
5370
- ni as sortStatuses,
5371
- ci as sourceKey,
5372
- Qr as spreadOverWeights,
5373
- Zl as statusIn,
5374
- vc as stepsOf,
5375
- zc as strategyAncestorKeysFor,
5376
- Vc as strategyDossierKeys,
5377
- Qt as strategyItemScopeKey,
5378
- pn as stripHtml,
5379
- Nc as subjectKeyOf,
5380
- Wt as subjectOf,
5381
- pu as subjectRef,
5382
- Yl as suggestProjectKey,
5383
- tl as suggestedHealth,
5384
- Dc as summarizeReactions,
5385
- Ac as targetById,
5386
- _c as targetForActivityType,
5387
- il as targetOrder,
5388
- Ir as taxRateFor,
5389
- Cr as termsFor,
5390
- eo as toActingIdentity,
5391
- _t as toE164,
5392
- Rl as toTransactionTerm,
5393
- ea as toolSourceKinds,
5394
- Po as topicOfferedForTeam,
5395
- hl as topicsForTeam,
5396
- Dr as trafficIntensity,
5397
- Al as transactionContext,
5398
- wl as transactionDossierKeys,
5399
- kl as transactionIdFromScope,
5365
+ bc as runActor,
5366
+ Pc as runInteractionId,
5367
+ Dn as sanitizeInline,
5368
+ Oi as sanitizeTranscript,
5369
+ fc as scheduleEntryScopeKey,
5370
+ xa as scoreInteraction,
5371
+ Hl as scoreWorkItem,
5372
+ Ha as selectLenses,
5373
+ Dr as serviceLevel,
5374
+ _u as sessionsHoldCannotReach,
5375
+ bu as sessionsToHold,
5376
+ Ll as shadowTermsByCode,
5377
+ Rt as shareKeyForTeam,
5378
+ Nt as shareKeyForUser,
5379
+ ta as shareKeysForViewer,
5380
+ dc as shortfalls,
5381
+ Ju as shouldRunAudioPipeline,
5382
+ Xc as slaBadgeTone,
5383
+ Ca as slaHoursByInbox,
5384
+ yr as slaHoursFor,
5385
+ oi as sortStatuses,
5386
+ ui as sourceKey,
5387
+ Zr as spreadOverWeights,
5388
+ nu as statusIn,
5389
+ xc as stepsOf,
5390
+ Qc as strategyAncestorKeysFor,
5391
+ qc as strategyDossierKeys,
5392
+ Zt as strategyItemScopeKey,
5393
+ fn as stripHtml,
5394
+ Lc as subjectKeyOf,
5395
+ Vt as subjectOf,
5396
+ gu as subjectRef,
5397
+ Jl as suggestProjectKey,
5398
+ il as suggestedHealth,
5399
+ Kc as summarizeReactions,
5400
+ Ec as targetById,
5401
+ Sc as targetForActivityType,
5402
+ ll as targetOrder,
5403
+ kr as taxRateFor,
5404
+ Or as termsFor,
5405
+ to as toActingIdentity,
5406
+ At as toE164,
5407
+ Pl as toTransactionTerm,
5408
+ oo as toolBareName,
5409
+ kc as toolDisplayName,
5410
+ ne as toolName,
5411
+ na as toolSourceKinds,
5412
+ Uo as topicOfferedForTeam,
5413
+ _l as topicsForTeam,
5414
+ $r as trafficIntensity,
5415
+ Il as transactionContext,
5416
+ Ol as transactionDossierKeys,
5417
+ Cl as transactionIdFromScope,
5400
5418
  F as transactionKind,
5401
- Xo as transactionScopeKey,
5402
- Sl as transactionSlots,
5403
- Qa as transactionTotals,
5404
- $o as truncateExample,
5405
- jl as typeIn,
5406
- Bl as typesFor,
5407
- tu as uniqueWorkStatusKey,
5408
- ul as uniqueWorkTypeKey,
5409
- wn as usageMetricId,
5410
- zs as usageMetrics,
5411
- nu as validateStatuses,
5412
- bc as valueAtPath,
5413
- xe as waitHoursOf,
5414
- oa as wakesAssignment,
5415
- Vl as workActivityScopeKey,
5416
- Jo as workItemScopeKey,
5417
- Zt as workProjectScopeKey,
5418
- nl as workRatio,
5419
- ri as workStatusKey,
5420
- xo as workTypeKey,
5421
- Te as workingMsBetween,
5422
- pc as workstreamScopeKey
5419
+ qo as transactionScopeKey,
5420
+ kl as transactionSlots,
5421
+ Ja as transactionTotals,
5422
+ vc as triggerFillsVar,
5423
+ Po as truncateExample,
5424
+ Vl as typeIn,
5425
+ Wl as typesFor,
5426
+ iu as uniqueWorkStatusKey,
5427
+ ml as uniqueWorkTypeKey,
5428
+ vn as usageMetricId,
5429
+ Ys as usageMetrics,
5430
+ su as validateStatuses,
5431
+ Ac as valueAtPath,
5432
+ Ne as waitHoursOf,
5433
+ sa as wakesAssignment,
5434
+ ql as workActivityScopeKey,
5435
+ ti as workItemScopeKey,
5436
+ Jt as workProjectScopeKey,
5437
+ sl as workRatio,
5438
+ ii as workStatusKey,
5439
+ Ro as workTypeKey,
5440
+ Ie as workingMsBetween,
5441
+ mc as workstreamScopeKey
5423
5442
  };