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