@opencxh/domain 1.232.0 → 1.233.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 Ci = 10, vi = 10, Ni = 10, xi = 5, _t = /* @__PURE__ */ new Set([
1
+ const ui = 10, di = 10, pi = 10, fi = 5, Dt = /* @__PURE__ */ new Set([
2
2
  "header",
3
3
  "section",
4
4
  "context",
@@ -8,13 +8,13 @@ const Ci = 10, vi = 10, Ni = 10, xi = 5, _t = /* @__PURE__ */ new Set([
8
8
  "actions",
9
9
  "attachments"
10
10
  ]);
11
- function j(e) {
11
+ function q(e) {
12
12
  if (typeof e == "string") return e.length > 0;
13
13
  if (!e || typeof e != "object") return !1;
14
14
  const t = e;
15
15
  return typeof t.key == "string" || typeof t.value == "string";
16
16
  }
17
- function Ri(e, t = () => {
17
+ function mi(e, t = () => {
18
18
  }) {
19
19
  if (!Array.isArray(e)) return [];
20
20
  const n = [];
@@ -24,89 +24,89 @@ function Ri(e, t = () => {
24
24
  break;
25
25
  }
26
26
  if (!r || typeof r != "object") continue;
27
- const i = r;
28
- if (!_t.has(i.type)) {
29
- t(`unknown block type ${String(i.type)}`);
27
+ const o = r;
28
+ if (!Dt.has(o.type)) {
29
+ t(`unknown block type ${String(o.type)}`);
30
30
  continue;
31
31
  }
32
- switch (i.type) {
32
+ switch (o.type) {
33
33
  case "header":
34
- if (!j(i.text)) {
34
+ if (!q(o.text)) {
35
35
  t("a header without text");
36
36
  continue;
37
37
  }
38
38
  break;
39
39
  case "context":
40
- if (!j(i.text)) {
40
+ if (!q(o.text)) {
41
41
  t("a context block without text");
42
42
  continue;
43
43
  }
44
44
  break;
45
45
  case "image":
46
- if (!i.url || !i.alt) {
46
+ if (!o.url || !o.alt) {
47
47
  t("an image without url or alt");
48
48
  continue;
49
49
  }
50
50
  break;
51
51
  case "section":
52
- Array.isArray(i.fields) && i.fields.length > 10 && (t("more than 10 fields in a section"), i.fields = i.fields.slice(0, 10));
52
+ Array.isArray(o.fields) && o.fields.length > 10 && (t("more than 10 fields in a section"), o.fields = o.fields.slice(0, 10));
53
53
  break;
54
54
  case "list":
55
- if (!Array.isArray(i.items) || i.items.length === 0) {
55
+ if (!Array.isArray(o.items) || o.items.length === 0) {
56
56
  t("a list without items");
57
57
  continue;
58
58
  }
59
- i.items.length > 10 && (t("more than 10 list items"), i.items = i.items.slice(0, 10));
59
+ o.items.length > 10 && (t("more than 10 list items"), o.items = o.items.slice(0, 10));
60
60
  break;
61
61
  case "actions": {
62
- const o = Array.isArray(i.elements) ? i.elements : [], a = o.filter((s) => s?.action_id && s.invoke && j(s.text));
63
- if (a.length !== o.length && t("an action without action_id, invoke or text"), a.length === 0) continue;
64
- a.length > 5 && t("more than 5 actions"), i.elements = a.slice(0, 5);
62
+ const i = Array.isArray(o.elements) ? o.elements : [], a = i.filter((s) => s?.action_id && s.invoke && q(s.text));
63
+ if (a.length !== i.length && t("an action without action_id, invoke or text"), a.length === 0) continue;
64
+ a.length > 5 && t("more than 5 actions"), o.elements = a.slice(0, 5);
65
65
  break;
66
66
  }
67
67
  }
68
- n.push(i);
68
+ n.push(o);
69
69
  }
70
70
  return n;
71
71
  }
72
- const Tt = /(\*\*|__)(?=\S)([\s\S]*?\S)\1/g, wt = /(\*|_)(?=\S)([^*_\n]*?\S)\1/g;
73
- function It(e) {
72
+ const $t = /(\*\*|__)(?=\S)([\s\S]*?\S)\1/g, Lt = /(\*|_)(?=\S)([^*_\n]*?\S)\1/g;
73
+ function Pt(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(Tt, "$2"), t = t.replace(wt, "$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($t, "$2"), t = t.replace(Lt, "$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 Mt(e) {
82
+ function Ut(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
- function R(e) {
85
+ function U(e) {
86
86
  if (!e || e < 0) return "";
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 de(e) {
90
+ function _e(e) {
91
91
  return e ? ` — ${Math.floor(e / 60)}m ${e % 60}s` : "";
92
92
  }
93
- function H(e) {
93
+ function J(e) {
94
94
  return e?.split("@")?.[0] || e || "";
95
95
  }
96
- function D(e) {
96
+ function K(e) {
97
97
  return e.map((t) => t.name).join(", ");
98
98
  }
99
- function pe(e) {
99
+ function Te(e) {
100
100
  return e === "meeting" ? "Meeting" : e === "video" ? "Video call" : "Audio call";
101
101
  }
102
- const _ = {
102
+ const k = {
103
103
  /* ---- voice ---- */
104
104
  VOICE_CALL_STARTED: {
105
105
  shape: "event",
106
106
  channelKind: "voice",
107
107
  icon: "phone",
108
108
  snippet: () => "Gesprek gestart",
109
- timeline: (e) => e.direction === "inbound" ? `Inbound call started — ${H(e.payload.from)}` : `Outbound call started — ${H(e.payload.to)}`
109
+ timeline: (e) => e.direction === "inbound" ? `Inbound call started — ${J(e.payload.from)}` : `Outbound call started — ${J(e.payload.to)}`
110
110
  },
111
111
  VOICE_CALL_ANSWERED: {
112
112
  shape: "event",
@@ -133,15 +133,15 @@ const _ = {
133
133
  shape: "event",
134
134
  channelKind: "voice",
135
135
  icon: "phone",
136
- snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${R(e.payload.duration)})` : ""}`,
137
- timeline: (e) => `Call ended${de(e.payload.duration)}`
136
+ snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${U(e.payload.duration)})` : ""}`,
137
+ timeline: (e) => `Call ended${_e(e.payload.duration)}`
138
138
  },
139
139
  VOICE_CALL_MISSED: {
140
140
  shape: "event",
141
141
  channelKind: "voice",
142
142
  icon: "phone",
143
143
  snippet: () => "Gemiste oproep",
144
- timeline: (e) => `Missed call — ${H(e.payload.from)}`
144
+ timeline: (e) => `Missed call — ${J(e.payload.from)}`
145
145
  },
146
146
  VOICE_CALL_FAILED: {
147
147
  shape: "event",
@@ -188,7 +188,7 @@ const _ = {
188
188
  shape: "event",
189
189
  channelKind: "video",
190
190
  icon: "video",
191
- snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${R(e.payload.duration)})` : ""}`,
191
+ snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${U(e.payload.duration)})` : ""}`,
192
192
  timeline: () => "Video call ended"
193
193
  },
194
194
  VIDEO_CALL_MISSED: {
@@ -216,7 +216,7 @@ const _ = {
216
216
  replyable: !0,
217
217
  carriesText: !0,
218
218
  countsAs: "inbound_message",
219
- snippet: fe
219
+ snippet: we
220
220
  },
221
221
  EMAIL_SENT: {
222
222
  shape: "message",
@@ -226,7 +226,7 @@ const _ = {
226
226
  replyable: !0,
227
227
  carriesText: !0,
228
228
  countsAs: "outbound_message",
229
- snippet: fe
229
+ snippet: we
230
230
  },
231
231
  /* ---- chat ---- */
232
232
  CHAT_MESSAGE_SENT: {
@@ -255,9 +255,9 @@ const _ = {
255
255
  shape: "event",
256
256
  channelKind: "chat",
257
257
  icon: "message-circle",
258
- snippet: (e) => `${D(e.payload.members)} toegevoegd`,
258
+ snippet: (e) => `${K(e.payload.members)} toegevoegd`,
259
259
  timeline: (e) => {
260
- const t = D(e.payload.members) || "Someone", n = e.payload.initiator?.name ? ` · added by ${e.payload.initiator.name}` : "";
260
+ const t = K(e.payload.members) || "Someone", n = e.payload.initiator?.name ? ` · added by ${e.payload.initiator.name}` : "";
261
261
  return `${t} joined the chat${n}`;
262
262
  }
263
263
  },
@@ -265,9 +265,9 @@ const _ = {
265
265
  shape: "event",
266
266
  channelKind: "chat",
267
267
  icon: "message-circle",
268
- snippet: (e) => `${D(e.payload.members)} verlaten`,
268
+ snippet: (e) => `${K(e.payload.members)} verlaten`,
269
269
  timeline: (e) => {
270
- const t = D(e.payload.members) || "Someone", n = e.payload.initiator?.name ? ` · removed by ${e.payload.initiator.name}` : "";
270
+ const t = K(e.payload.members) || "Someone", n = e.payload.initiator?.name ? ` · removed by ${e.payload.initiator.name}` : "";
271
271
  return `${t} left the chat${n}`;
272
272
  }
273
273
  },
@@ -283,15 +283,15 @@ const _ = {
283
283
  channelKind: "chat",
284
284
  icon: "message-circle",
285
285
  snippet: () => "Gesprek gestart",
286
- timeline: (e) => `${pe(e.payload.callType)} started${e.payload.initiator ? ` by ${e.payload.initiator.name}` : ""}`,
286
+ timeline: (e) => `${Te(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: {
290
290
  shape: "event",
291
291
  channelKind: "chat",
292
292
  icon: "message-circle",
293
- snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${R(e.payload.duration)})` : ""}`,
294
- timeline: (e) => `${pe(e.payload.callType)} ended${de(e.payload.duration)}`,
293
+ snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${U(e.payload.duration)})` : ""}`,
294
+ timeline: (e) => `${Te(e.payload.callType)} ended${_e(e.payload.duration)}`,
295
295
  joinUrl: (e) => e.payload.joinUrl
296
296
  },
297
297
  CHAT_EVENT: {
@@ -380,7 +380,7 @@ const _ = {
380
380
  MEETING_ENDED: {
381
381
  shape: "event",
382
382
  icon: "calendar",
383
- snippet: (e) => `Vergadering beëindigd${e.payload.duration ? ` (${R(e.payload.duration)})` : ""}`,
383
+ snippet: (e) => `Vergadering beëindigd${e.payload.duration ? ` (${U(e.payload.duration)})` : ""}`,
384
384
  timeline: () => "Meeting ended"
385
385
  },
386
386
  MEETING_PARTICIPANT_JOINED: {
@@ -460,63 +460,63 @@ const _ = {
460
460
  timeline: (e, t) => `Status changed by ${t}`
461
461
  }
462
462
  };
463
- function fe(e) {
464
- const t = e.payload, n = It(t.bodyText).trim() || t.bodySnippet?.trim() || Mt(t.body ?? "");
463
+ function we(e) {
464
+ const t = e.payload, n = Pt(t.bodyText).trim() || t.bodySnippet?.trim() || Ut(t.body ?? "");
465
465
  return t.subject ? `${t.subject} — ${n}` : n;
466
466
  }
467
- function b(e) {
468
- return _[e];
467
+ function S(e) {
468
+ return k[e];
469
469
  }
470
- function Di(e) {
471
- return b(e)?.icon ?? "circle";
470
+ function gi(e) {
471
+ return S(e)?.icon ?? "circle";
472
472
  }
473
- function $i(e) {
474
- return b(e)?.channelKind;
473
+ function hi(e) {
474
+ return S(e)?.channelKind;
475
475
  }
476
- function We(e) {
476
+ function rt(e) {
477
477
  return e === "message" || e === "note";
478
478
  }
479
- function Li(e) {
480
- return We(b(e)?.shape);
479
+ function yi(e) {
480
+ return rt(S(e)?.shape);
481
481
  }
482
- function Ve(e) {
482
+ function ot(e) {
483
483
  return e === "note";
484
484
  }
485
- function Pi(e) {
486
- return Ve(b(e)?.shape);
485
+ function bi(e) {
486
+ return ot(S(e)?.shape);
487
487
  }
488
- function Ui(e) {
489
- return b(e)?.replyable === !0;
488
+ function Ai(e) {
489
+ return S(e)?.replyable === !0;
490
490
  }
491
- function Ki(e) {
492
- return b(e)?.carriesText === !0;
491
+ function Ei(e) {
492
+ return S(e)?.carriesText === !0;
493
493
  }
494
- function kt(e) {
495
- return b(e)?.countsAs;
494
+ function Kt(e) {
495
+ return S(e)?.countsAs;
496
496
  }
497
- function Fi(e) {
498
- return b(e)?.playbookAuthored === !0;
497
+ function Si(e) {
498
+ return S(e)?.playbookAuthored === !0;
499
499
  }
500
- function Bi(e) {
501
- return b(e)?.connected === !0;
500
+ function _i(e) {
501
+ return S(e)?.connected === !0;
502
502
  }
503
- function ji(e) {
504
- const t = b(e);
503
+ function Ti(e) {
504
+ const t = S(e);
505
505
  return t?.shape === "artifact" && t?.carriesText === !0;
506
506
  }
507
- function Ot(e) {
508
- const t = b(e.type)?.snippet;
507
+ function Ft(e) {
508
+ const t = S(e.type)?.snippet;
509
509
  return t ? t(e) : "";
510
510
  }
511
- function Hi(e, t) {
512
- const n = b(e.type)?.timeline;
511
+ function wi(e, t) {
512
+ const n = S(e.type)?.timeline;
513
513
  return n ? n(e, t) : e.type.replace(/_/g, " ").toLowerCase();
514
514
  }
515
- function Gi(e) {
516
- const t = b(e.type)?.joinUrl;
515
+ function Ii(e) {
516
+ const t = S(e.type)?.joinUrl;
517
517
  return t ? t(e) : void 0;
518
518
  }
519
- function Y(e, t) {
519
+ function oe(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,44 +524,44 @@ function Y(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 q(e, t, n) {
527
+ function ie(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 Y(t, e.value) || null;
531
+ return oe(t, e.value) || null;
532
532
  const r = {};
533
- for (const [o, a] of Object.entries(e.params ?? {}))
534
- r[o] = Y(t, a);
535
- const i = n(e.key, r);
536
- return i === e.key ? null : i;
533
+ for (const [i, a] of Object.entries(e.params ?? {}))
534
+ r[i] = oe(t, a);
535
+ const o = n(e.key, r);
536
+ return o === e.key ? null : o;
537
537
  }
538
- function Ct(e, t) {
538
+ function Ht(e, t) {
539
539
  if (!e || typeof e == "string" || "value" in e) return null;
540
540
  const n = {};
541
- for (const [r, i] of Object.entries(e.params ?? {}))
542
- n[r] = Y(t, i);
541
+ for (const [r, o] of Object.entries(e.params ?? {}))
542
+ n[r] = oe(t, o);
543
543
  return { key: e.key, params: n };
544
544
  }
545
- const me = 140;
546
- function vt(e) {
545
+ const Ie = 140;
546
+ function Bt(e) {
547
547
  const t = e.trim();
548
- return t.length <= me ? t : `${t.slice(0, me - 1).trimEnd()}…`;
548
+ return t.length <= Ie ? t : `${t.slice(0, Ie - 1).trimEnd()}…`;
549
549
  }
550
- function Wi(e, t) {
551
- const n = Ct(t?.text, e), r = t ? q(t.text, e, (i) => i) : null;
550
+ function Mi(e, t) {
551
+ const n = Ht(t?.text, e), r = t ? ie(t.text, e, (o) => o) : null;
552
552
  return {
553
553
  activityId: e.id,
554
554
  type: e.type,
555
- snippet: vt(r ?? Ot(e)),
555
+ snippet: Bt(r ?? Ft(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 Nt = (e) => e;
563
- function ge(e) {
564
- const t = _[e];
562
+ const jt = (e) => e;
563
+ function Me(e) {
564
+ const t = k[e];
565
565
  return {
566
566
  type: e,
567
567
  shape: t.shape,
@@ -576,7 +576,7 @@ function ge(e) {
576
576
  displayNameKey: t.displayNameKey
577
577
  };
578
578
  }
579
- function he(e) {
579
+ function ke(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 xt {
595
- constructor(t = [], n = Nt) {
594
+ class Gt {
595
+ constructor(t = [], n = jt) {
596
596
  this.translate = n;
597
597
  for (const r of t)
598
- r?.type && (r.type in _ || this.declared.has(r.type) || this.declared.set(r.type, r));
598
+ r?.type && (r.type in k || 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 _) return ge(t);
602
+ if (t in k) return Me(t);
603
603
  const n = this.declared.get(t);
604
- return n ? he(n) : void 0;
604
+ return n ? ke(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(_).filter((r) => _[r].triggerable).map(ge), n = [...this.declared.values()].map(he).filter((r) => r.triggerable);
608
+ const t = Object.keys(k).filter((r) => k[r].triggerable).map(Me), n = [...this.declared.values()].map(ke).filter((r) => r.triggerable);
609
609
  return [...t, ...n];
610
610
  }
611
611
  /**
@@ -614,17 +614,17 @@ class xt {
614
614
  * the feed always showed for unknown types.
615
615
  */
616
616
  timelineText(t, n) {
617
- const r = _[t.type];
617
+ const r = k[t.type];
618
618
  if (r?.timeline) return r.timeline(t, n);
619
- const i = this.declared.get(t.type);
620
- return q(i?.text, t, this.translate) ?? t.type.replace(/_/g, " ").toLowerCase();
619
+ const o = this.declared.get(t.type);
620
+ return ie(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
- const n = _[t.type];
624
+ const n = k[t.type];
625
625
  if (n?.snippet) return n.snippet(t);
626
626
  const r = this.declared.get(t.type);
627
- return q(r?.text, t, this.translate) ?? "";
627
+ return ie(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 xt {
649
649
  * {@link ResolvedActivityType}.
650
650
  */
651
651
  isMessage(t) {
652
- return We(this.get(t)?.shape);
652
+ return rt(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 Ve(this.get(t)?.shape);
656
+ return ot(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 xt {
681
681
  return this.translate;
682
682
  }
683
683
  }
684
- const Vi = new xt();
685
- function zi(e, t, n = []) {
684
+ const ki = new Gt();
685
+ function vi(e, t, n = []) {
686
686
  const r = e.createdAt;
687
687
  if (!r) return [];
688
- const i = new Set(n);
689
- return e.author.type === "user" && e.author.id && i.add(e.author.id), Object.entries(t).filter(([o, a]) => a >= r && !i.has(o)).map(([o]) => o);
688
+ const o = new Set(n);
689
+ return e.author.type === "user" && e.author.id && o.add(e.author.id), Object.entries(t).filter(([i, a]) => a >= r && !o.has(i)).map(([i]) => i);
690
690
  }
691
- function Rt(e) {
691
+ function Wt(e) {
692
692
  return e.createdAt ?? 0;
693
693
  }
694
- function Xi(e) {
694
+ function Oi(e) {
695
695
  return e.type === "EMAIL_RECEIVED" || e.type === "EMAIL_SENT";
696
696
  }
697
- function Yi(e) {
697
+ function Ci(e) {
698
698
  return e.type === "CHAT_MESSAGE_SENT" || e.type === "CHAT_MESSAGE_RECEIVED";
699
699
  }
700
- const ze = [
700
+ const it = [
701
701
  {
702
702
  id: "openai",
703
703
  attachmentKinds: ["image", "pdf"],
@@ -787,45 +787,45 @@ const ze = [
787
787
  defaultModel: "default"
788
788
  }
789
789
  ];
790
- function K(e) {
791
- return ze.find((t) => t.id === e);
790
+ function V(e) {
791
+ return it.find((t) => t.id === e);
792
792
  }
793
- function qi(e) {
794
- return K(e)?.label ?? e;
793
+ function Ni(e) {
794
+ return V(e)?.label ?? e;
795
795
  }
796
- function Ji(e, t = "gpt-5-mini") {
797
- return K(e)?.defaultModel ?? t;
796
+ function Ri(e, t = "gpt-5-mini") {
797
+ return V(e)?.defaultModel ?? t;
798
798
  }
799
- function Zi(e) {
800
- return ze.filter((t) => t.capabilities.includes(e));
799
+ function xi(e) {
800
+ return it.filter((t) => t.capabilities.includes(e));
801
801
  }
802
- function Qi(e) {
803
- const t = K(e);
802
+ function Di(e) {
803
+ const t = V(e);
804
804
  return !!t && !t.baseUrl;
805
805
  }
806
- function eo(e, t) {
807
- return t === "text" ? !0 : K(e)?.attachmentKinds?.includes(t) === !0;
806
+ function $i(e, t) {
807
+ return t === "text" ? !0 : V(e)?.attachmentKinds?.includes(t) === !0;
808
808
  }
809
- function to(e, t) {
809
+ function Li(e, t) {
810
810
  if (!e.enabled) return "ok";
811
- const n = ye(e.hardLimitNanos), r = ye(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 ye(e) {
814
+ function ve(e) {
815
815
  return typeof e == "number" ? e : void 0;
816
816
  }
817
- function Dt(e, t = "month") {
817
+ function Vt(e, t = "month") {
818
818
  const n = new Date(e);
819
819
  return Date.UTC(n.getUTCFullYear(), n.getUTCMonth(), 1);
820
820
  }
821
- function no(e, t = "month") {
822
- const n = new Date(Dt(e, t));
821
+ function Pi(e, t = "month") {
822
+ const n = new Date(Vt(e, t));
823
823
  return `${n.getUTCFullYear()}-${String(n.getUTCMonth() + 1).padStart(2, "0")}`;
824
824
  }
825
- function ro(e) {
825
+ function Ui(e) {
826
826
  return e?.listeningEnabled !== !1;
827
827
  }
828
- const io = [
828
+ const Ki = [
829
829
  { id: "agent", label: "Agent", labelSource: "user" },
830
830
  { id: "team", label: "Team", labelSource: "team" },
831
831
  { id: "inbox", label: "Inbox", labelSource: "inbox" },
@@ -835,47 +835,64 @@ const io = [
835
835
  { id: "handledBy", label: "Afhandelaar", labelSource: "raw" },
836
836
  { id: "time", label: "Tijd", labelSource: "raw" }
837
837
  ];
838
- function G(e) {
838
+ function Z(e) {
839
839
  return e < 10 ? `0${e}` : `${e}`;
840
840
  }
841
- function $t(e, t) {
842
- const n = new Date(e), r = `${n.getUTCFullYear()}-${G(n.getUTCMonth() + 1)}-${G(n.getUTCDate())}`;
843
- return t === "day" ? r : `${r}T${G(n.getUTCHours())}`;
841
+ function C(e, t) {
842
+ const n = new Date(e), r = `${n.getUTCFullYear()}-${Z(n.getUTCMonth() + 1)}-${Z(n.getUTCDate())}`;
843
+ return t === "day" ? r : `${r}T${Z(n.getUTCHours())}`;
844
844
  }
845
- function Lt(e, t) {
845
+ function B(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 Pt = 36e5, Ut = 864e5;
850
- function oo(e, t, n) {
851
- const r = n === "hour" ? Pt : Ut, i = [];
852
- for (let o = Lt(e, n); o <= t; o += r)
853
- i.push($t(o, n));
854
- return i;
849
+ const zt = 36e5, Xt = 864e5;
850
+ function Fi(e, t, n) {
851
+ const r = n === "hour" ? zt : Xt, o = [];
852
+ for (let i = B(e, n); i <= t; i += r)
853
+ o.push(C(i, n));
854
+ return o;
855
+ }
856
+ const Yt = /* @__PURE__ */ new Set(["time"]);
857
+ function Hi(e, t, n) {
858
+ if (!e) return [];
859
+ const r = new Set(e.supportedDimensions ?? []);
860
+ return t.filter((o) => r.has(o.id) && !Yt.has(o.id)).map((o) => ({
861
+ id: o.id,
862
+ label: o.label,
863
+ options: o.options?.length ? o.options : n[o.id] ?? []
864
+ })).filter((o) => o.options.length > 0);
865
+ }
866
+ function Bi(e, t) {
867
+ const n = t.find((o) => o.id === e.dimensionId), r = n?.options.find((o) => o.value === e.value);
868
+ return `${n?.label ?? e.dimensionId} · ${r?.label ?? e.value}`;
869
+ }
870
+ function ji(e) {
871
+ return { value: e.id, label: `${e.category} · ${e.label}` };
855
872
  }
856
- const Kt = [
873
+ const qt = [
857
874
  { id: "resource", label: "Resource", labelSource: "raw" },
858
875
  { id: "origin", label: "Herkomst", labelSource: "raw" }
859
- ], Ft = Kt.map((e) => e.id);
860
- function Bt(e, t) {
876
+ ], Jt = qt.map((e) => e.id);
877
+ function Zt(e, t) {
861
878
  return `${e}.usage.${t}`;
862
879
  }
863
- function ao(e, t) {
880
+ function Gi(e, t) {
864
881
  return t.map((n) => ({
865
- id: Bt(e, n.unit),
882
+ id: Zt(e, n.unit),
866
883
  label: n.label,
867
884
  category: "Verbruik",
868
885
  valueType: n.valueType ?? "count",
869
886
  aggregation: "sum",
870
887
  supportedDimensions: [
871
888
  "provider",
872
- ...Ft,
889
+ ...Jt,
873
890
  ...n.extraDimensions ?? [],
874
891
  "time"
875
892
  ]
876
893
  }));
877
894
  }
878
- const Xe = /* @__PURE__ */ new Set(["info", "success", "warning", "destructive"]), be = 200, Ae = 100, Ee = 200, Se = 12, _e = 4, Ye = 4e3, W = 500, so = 256 * 1024, jt = /* @__PURE__ */ new Set([
895
+ const at = /* @__PURE__ */ new Set(["info", "success", "warning", "destructive"]), Oe = 200, Ce = 100, Ne = 200, Re = 12, xe = 4, st = 4e3, Q = 500, Wi = 256 * 1024, Qt = /* @__PURE__ */ new Set([
879
896
  "heading",
880
897
  "paragraph",
881
898
  "list",
@@ -885,15 +902,15 @@ const Xe = /* @__PURE__ */ new Set(["info", "success", "warning", "destructive"]
885
902
  "table",
886
903
  "kpi",
887
904
  "callout"
888
- ]), Ht = ["http:", "https:", "mailto:", "tel:"], Gt = /^[a-z][a-z0-9+.-]*:/i;
889
- function qe(e) {
905
+ ]), en = ["http:", "https:", "mailto:", "tel:"], tn = /^[a-z][a-z0-9+.-]*:/i;
906
+ function ct(e) {
890
907
  const t = e.trim().replace(/^<|>$/g, "");
891
908
  if (!t) return !1;
892
- const n = Gt.exec(t)?.[0];
893
- return n ? Ht.includes(n.toLowerCase()) : !t.startsWith("//");
909
+ const n = tn.exec(t)?.[0];
910
+ return n ? en.includes(n.toLowerCase()) : !t.startsWith("//");
894
911
  }
895
- const Wt = /^[ \t]{0,3}\[([^\]]+)\]:[ \t]*(\S+).*$/gm;
896
- function Vt(e) {
912
+ const nn = /^[ \t]{0,3}\[([^\]]+)\]:[ \t]*(\S+).*$/gm;
913
+ function rn(e) {
897
914
  let t = "", n = 0;
898
915
  for (; n < e.length; ) {
899
916
  const r = e[n] === "!" && e[n + 1] === "[";
@@ -901,192 +918,192 @@ function Vt(e) {
901
918
  t += e[n], n += 1;
902
919
  continue;
903
920
  }
904
- const i = n + (r ? 2 : 1), o = Te(e, i, "[", "]");
905
- if (o < 0 || e[o + 1] !== "(") {
921
+ const o = n + (r ? 2 : 1), i = De(e, o, "[", "]");
922
+ if (i < 0 || e[i + 1] !== "(") {
906
923
  t += e[n], n += 1;
907
924
  continue;
908
925
  }
909
- const a = Te(e, o + 2, "(", ")");
926
+ const a = De(e, i + 2, "(", ")");
910
927
  if (a < 0) {
911
928
  t += e[n], n += 1;
912
929
  continue;
913
930
  }
914
- const s = e.slice(i, o), c = e.slice(o + 2, a).trim().split(/\s+/)[0] ?? "";
915
- t += r || !qe(c) ? s : e.slice(n, a + 1), n = a + 1;
931
+ const s = e.slice(o, i), c = e.slice(i + 2, a).trim().split(/\s+/)[0] ?? "";
932
+ t += r || !ct(c) ? s : e.slice(n, a + 1), n = a + 1;
916
933
  }
917
934
  return t;
918
935
  }
919
- function Te(e, t, n, r) {
920
- let i = 1;
921
- for (let o = t; o < e.length; o += 1) {
922
- if (e[o] === "\\") {
923
- o += 1;
936
+ function De(e, t, n, r) {
937
+ let o = 1;
938
+ for (let i = t; i < e.length; i += 1) {
939
+ if (e[i] === "\\") {
940
+ i += 1;
924
941
  continue;
925
942
  }
926
- if (e[o] === n) i += 1;
927
- else if (e[o] === r && (i -= 1, i === 0))
928
- return o;
943
+ if (e[i] === n) o += 1;
944
+ else if (e[i] === r && (o -= 1, o === 0))
945
+ return i;
929
946
  }
930
947
  return -1;
931
948
  }
932
- function zt(e) {
933
- return Vt(e).replace(
934
- Wt,
935
- (t, n, r) => qe(r) ? t : ""
949
+ function on(e) {
950
+ return rn(e).replace(
951
+ nn,
952
+ (t, n, r) => ct(r) ? t : ""
936
953
  );
937
954
  }
938
- function A(e, t = Ye) {
939
- return typeof e == "string" ? zt(e).slice(0, t) : "";
955
+ function _(e, t = st) {
956
+ return typeof e == "string" ? on(e).slice(0, t) : "";
940
957
  }
941
- function Xt(e, t = Ye) {
958
+ function an(e, t = st) {
942
959
  return typeof e == "string" ? e.slice(0, t) : "";
943
960
  }
944
- function Yt(e, t = "info") {
945
- return typeof e == "string" && Xe.has(e) ? e : t;
961
+ function sn(e, t = "info") {
962
+ return typeof e == "string" && at.has(e) ? e : t;
946
963
  }
947
- function co(e, t = () => {
964
+ function Vi(e, t = () => {
948
965
  }) {
949
966
  if (!Array.isArray(e)) return [];
950
967
  const n = [];
951
968
  for (const r of e) {
952
- if (n.length >= be) {
953
- t(`more than ${be} blocks; the rest was dropped`);
969
+ if (n.length >= Oe) {
970
+ t(`more than ${Oe} blocks; the rest was dropped`);
954
971
  break;
955
972
  }
956
973
  if (!r || typeof r != "object") continue;
957
- const i = r;
958
- if (!jt.has(i.type)) {
959
- t(`unknown block type ${String(i.type)}`);
974
+ const o = r;
975
+ if (!Qt.has(o.type)) {
976
+ t(`unknown block type ${String(o.type)}`);
960
977
  continue;
961
978
  }
962
- const o = typeof i.block_id == "string" ? { block_id: i.block_id } : {};
963
- switch (i.type) {
979
+ const i = typeof o.block_id == "string" ? { block_id: o.block_id } : {};
980
+ switch (o.type) {
964
981
  case "heading": {
965
- const a = A(i.text);
982
+ const a = _(o.text);
966
983
  if (!a) {
967
984
  t("a heading without text");
968
985
  continue;
969
986
  }
970
- const s = i.level === 2 || i.level === 3 ? i.level : 1;
971
- n.push({ ...o, type: "heading", level: s, text: a });
987
+ const s = o.level === 2 || o.level === 3 ? o.level : 1;
988
+ n.push({ ...i, type: "heading", level: s, text: a });
972
989
  break;
973
990
  }
974
991
  case "paragraph": {
975
- const a = A(i.text);
992
+ const a = _(o.text);
976
993
  if (!a) {
977
994
  t("a paragraph without text");
978
995
  continue;
979
996
  }
980
- n.push({ ...o, type: "paragraph", text: a });
997
+ n.push({ ...i, type: "paragraph", text: a });
981
998
  break;
982
999
  }
983
1000
  case "quote": {
984
- const a = A(i.text);
1001
+ const a = _(o.text);
985
1002
  if (!a) {
986
1003
  t("a quote without text");
987
1004
  continue;
988
1005
  }
989
- n.push({ ...o, type: "quote", text: a });
1006
+ n.push({ ...i, type: "quote", text: a });
990
1007
  break;
991
1008
  }
992
1009
  case "code": {
993
- const a = Xt(i.text);
1010
+ const a = an(o.text);
994
1011
  if (!a) {
995
1012
  t("a code block without text");
996
1013
  continue;
997
1014
  }
998
- const s = typeof i.lang == "string" ? { lang: i.lang.slice(0, 32) } : {};
999
- n.push({ ...o, type: "code", ...s, text: a });
1015
+ const s = typeof o.lang == "string" ? { lang: o.lang.slice(0, 32) } : {};
1016
+ n.push({ ...i, type: "code", ...s, text: a });
1000
1017
  break;
1001
1018
  }
1002
1019
  case "divider":
1003
- n.push({ ...o, type: "divider" });
1020
+ n.push({ ...i, type: "divider" });
1004
1021
  break;
1005
1022
  case "list": {
1006
- const a = Array.isArray(i.items) ? i.items : [], s = [];
1007
- for (const m of a) {
1008
- if (s.length >= Ae) {
1009
- t(`more than ${Ae} list items`);
1023
+ const a = Array.isArray(o.items) ? o.items : [], s = [];
1024
+ for (const l of a) {
1025
+ if (s.length >= Ce) {
1026
+ t(`more than ${Ce} list items`);
1010
1027
  break;
1011
1028
  }
1012
- const h = A(m?.text);
1013
- if (!h) continue;
1014
- const y = A(m?.lead, 200);
1015
- s.push(y ? { lead: y, text: h } : { text: h });
1029
+ const d = _(l?.text);
1030
+ if (!d) continue;
1031
+ const h = _(l?.lead, 200);
1032
+ s.push(h ? { lead: h, text: d } : { text: d });
1016
1033
  }
1017
1034
  if (s.length === 0) {
1018
1035
  t("a list without usable items");
1019
1036
  continue;
1020
1037
  }
1021
- const c = i.style === "numbered" ? "numbered" : "bulleted";
1022
- n.push({ ...o, type: "list", style: c, items: s });
1038
+ const c = o.style === "numbered" ? "numbered" : "bulleted";
1039
+ n.push({ ...i, type: "list", style: c, items: s });
1023
1040
  break;
1024
1041
  }
1025
1042
  case "table": {
1026
- const a = Array.isArray(i.columns) ? i.columns : [], s = [];
1027
- for (const y of a) {
1028
- if (s.length >= Se) {
1029
- t(`more than ${Se} table columns`);
1043
+ const a = Array.isArray(o.columns) ? o.columns : [], s = [];
1044
+ for (const h of a) {
1045
+ if (s.length >= Re) {
1046
+ t(`more than ${Re} table columns`);
1030
1047
  break;
1031
1048
  }
1032
- const T = A(y?.label, W), M = y?.align === "right" ? "right" : void 0;
1033
- s.push(M ? { label: T, align: M } : { label: T });
1049
+ const A = _(h?.label, Q), E = h?.align === "right" ? "right" : void 0;
1050
+ s.push(E ? { label: A, align: E } : { label: A });
1034
1051
  }
1035
1052
  if (s.length === 0) {
1036
1053
  t("a table without columns");
1037
1054
  continue;
1038
1055
  }
1039
- const c = Array.isArray(i.rows) ? i.rows : [], m = [];
1040
- for (const y of c) {
1041
- if (m.length >= Ee) {
1042
- t(`more than ${Ee} table rows`);
1056
+ const c = Array.isArray(o.rows) ? o.rows : [], l = [];
1057
+ for (const h of c) {
1058
+ if (l.length >= Ne) {
1059
+ t(`more than ${Ne} table rows`);
1043
1060
  break;
1044
1061
  }
1045
- const T = Array.isArray(y) ? y : [];
1046
- m.push(s.map((M, B) => A(T[B], W)));
1062
+ const A = Array.isArray(h) ? h : [];
1063
+ l.push(s.map((E, M) => _(A[M], Q)));
1047
1064
  }
1048
- const h = A(i.caption, W);
1065
+ const d = _(o.caption, Q);
1049
1066
  n.push({
1050
- ...o,
1067
+ ...i,
1051
1068
  type: "table",
1052
1069
  columns: s,
1053
- rows: m,
1054
- ...h ? { caption: h } : {}
1070
+ rows: l,
1071
+ ...d ? { caption: d } : {}
1055
1072
  });
1056
1073
  break;
1057
1074
  }
1058
1075
  case "kpi": {
1059
- const a = Array.isArray(i.items) ? i.items : [], s = [];
1076
+ const a = Array.isArray(o.items) ? o.items : [], s = [];
1060
1077
  for (const c of a) {
1061
- if (s.length >= _e) {
1062
- t(`more than ${_e} kpi items`);
1078
+ if (s.length >= xe) {
1079
+ t(`more than ${xe} kpi items`);
1063
1080
  break;
1064
1081
  }
1065
- const m = A(c?.value, 40), h = A(c?.label, 80);
1066
- if (!m || !h) continue;
1067
- const y = c?.tone;
1082
+ const l = _(c?.value, 40), d = _(c?.label, 80);
1083
+ if (!l || !d) continue;
1084
+ const h = c?.tone;
1068
1085
  s.push(
1069
- typeof y == "string" && Xe.has(y) ? { value: m, label: h, tone: y } : { value: m, label: h }
1086
+ typeof h == "string" && at.has(h) ? { value: l, label: d, tone: h } : { value: l, label: d }
1070
1087
  );
1071
1088
  }
1072
1089
  if (s.length === 0) {
1073
1090
  t("a kpi block without usable items");
1074
1091
  continue;
1075
1092
  }
1076
- n.push({ ...o, type: "kpi", items: s });
1093
+ n.push({ ...i, type: "kpi", items: s });
1077
1094
  break;
1078
1095
  }
1079
1096
  case "callout": {
1080
- const a = A(i.text);
1097
+ const a = _(o.text);
1081
1098
  if (!a) {
1082
1099
  t("a callout without text");
1083
1100
  continue;
1084
1101
  }
1085
- const s = A(i.title, 200);
1102
+ const s = _(o.title, 200);
1086
1103
  n.push({
1087
- ...o,
1104
+ ...i,
1088
1105
  type: "callout",
1089
- tone: Yt(i.tone),
1106
+ tone: sn(o.tone),
1090
1107
  ...s ? { title: s } : {},
1091
1108
  text: a
1092
1109
  });
@@ -1096,28 +1113,28 @@ function co(e, t = () => {
1096
1113
  }
1097
1114
  return n;
1098
1115
  }
1099
- function lo(e) {
1116
+ function zi(e) {
1100
1117
  return JSON.stringify(e).length;
1101
1118
  }
1102
- function uo(e) {
1119
+ function Xi(e) {
1103
1120
  return {
1104
1121
  blocks: e.length,
1105
1122
  types: e.map((t) => t.type),
1106
1123
  headings: e.flatMap((t) => t.type === "heading" ? [t.text] : [])
1107
1124
  };
1108
1125
  }
1109
- function we(e) {
1126
+ function $e(e) {
1110
1127
  return e.replace(/\|/g, "\\|").replace(/\r?\n/g, " ").trim();
1111
1128
  }
1112
- function Ie(e, t, n) {
1113
- const r = e.map((i, o) => n?.[o] === "right" ? "---:" : "---");
1129
+ function Le(e, t, n) {
1130
+ const r = e.map((o, i) => n?.[i] === "right" ? "---:" : "---");
1114
1131
  return [
1115
- `| ${e.map(we).join(" | ")} |`,
1132
+ `| ${e.map($e).join(" | ")} |`,
1116
1133
  `| ${r.join(" | ")} |`,
1117
- ...t.map((i) => `| ${i.map(we).join(" | ")} |`)
1134
+ ...t.map((o) => `| ${o.map($e).join(" | ")} |`)
1118
1135
  ];
1119
1136
  }
1120
- function qt(e) {
1137
+ function cn(e) {
1121
1138
  switch (e.type) {
1122
1139
  case "heading":
1123
1140
  return [`${"#".repeat(e.level)} ${e.text}`];
@@ -1135,7 +1152,7 @@ function qt(e) {
1135
1152
  return t.lead ? `${r} **${t.lead}** ${t.text}` : `${r} ${t.text}`;
1136
1153
  });
1137
1154
  case "table": {
1138
- const t = Ie(
1155
+ const t = Le(
1139
1156
  e.columns.map((n) => n.label),
1140
1157
  e.rows,
1141
1158
  e.columns.map((n) => n.align ?? "left")
@@ -1143,7 +1160,7 @@ function qt(e) {
1143
1160
  return e.caption ? [...t, "", `*${e.caption}*`] : t;
1144
1161
  }
1145
1162
  case "kpi":
1146
- return Ie(
1163
+ return Le(
1147
1164
  e.items.map((t) => t.value),
1148
1165
  [e.items.map((t) => t.label)]
1149
1166
  );
@@ -1151,12 +1168,12 @@ function qt(e) {
1151
1168
  return (e.title ? `**${e.title}** ${e.text}` : e.text).split(/\r?\n/).map((n) => `> ${n}`);
1152
1169
  }
1153
1170
  }
1154
- function po(e, t) {
1155
- const n = [], r = e.some((i) => i.type === "heading" && i.level === 1);
1171
+ function Yi(e, t) {
1172
+ const n = [], r = e.some((o) => o.type === "heading" && o.level === 1);
1156
1173
  t && !r && n.push(`# ${t}`);
1157
- for (const i of e) {
1158
- const o = qt(i);
1159
- o.length > 0 && n.push(o.join(`
1174
+ for (const o of e) {
1175
+ const i = cn(o);
1176
+ i.length > 0 && n.push(i.join(`
1160
1177
  `));
1161
1178
  }
1162
1179
  return `${n.join(`
@@ -1164,45 +1181,45 @@ function po(e, t) {
1164
1181
  `)}
1165
1182
  `;
1166
1183
  }
1167
- const Je = (e) => `user:${e}`, Ze = (e) => `team:${e}`;
1168
- function fo(e) {
1184
+ const lt = (e) => `user:${e}`, ut = (e) => `team:${e}`;
1185
+ function qi(e) {
1169
1186
  const t = /* @__PURE__ */ new Set();
1170
1187
  for (const n of e ?? [])
1171
- n?.id && (n.kind === "user" && t.add(Je(n.id)), n.kind === "team" && t.add(Ze(n.id)));
1188
+ n?.id && (n.kind === "user" && t.add(lt(n.id)), n.kind === "team" && t.add(ut(n.id)));
1172
1189
  return [...t].sort();
1173
1190
  }
1174
- function mo(e, t) {
1175
- return [Je(e), ...t.map(Ze)];
1191
+ function Ji(e, t) {
1192
+ return [lt(e), ...t.map(ut)];
1176
1193
  }
1177
- function go(e) {
1194
+ function Zi(e) {
1178
1195
  const t = /* @__PURE__ */ new Set();
1179
1196
  for (const n of e ?? [])
1180
1197
  n?.kind && t.add(n.kind);
1181
1198
  return [...t];
1182
1199
  }
1183
- const Jt = ["done", "escalated"], ho = ["open", "waiting"];
1184
- function yo(e) {
1185
- return Jt.includes(e);
1200
+ const ln = ["done", "escalated"], Qi = ["open", "waiting"];
1201
+ function ea(e) {
1202
+ return ln.includes(e);
1186
1203
  }
1187
- const Zt = "assignment";
1188
- function bo(e) {
1189
- return `${Zt}:${e}`;
1204
+ const un = "assignment";
1205
+ function ta(e) {
1206
+ return `${un}:${e}`;
1190
1207
  }
1191
- function Ao(e, t, n, r) {
1208
+ function na(e, t, n, r) {
1192
1209
  if (e.direction === "inbound") return !0;
1193
1210
  if (e.author?.type === "user" && e.author.id === t) return !1;
1194
- const i = e.payload?.mentions;
1195
- return Array.isArray(i) && i.includes(t) || r && r === t ? !0 : n === "reply";
1211
+ const o = e.payload?.mentions;
1212
+ return Array.isArray(o) && o.includes(t) || r && r === t ? !0 : n === "reply";
1196
1213
  }
1197
- function Eo(e) {
1198
- const { targetAuthorId: t, reactorId: n, agentId: r, on: i } = e;
1199
- return !i || !t || t !== r ? !1 : n !== r;
1214
+ function ra(e) {
1215
+ const { targetAuthorId: t, reactorId: n, agentId: r, on: o } = e;
1216
+ return !o || !t || t !== r ? !1 : n !== r;
1200
1217
  }
1201
- function So(e) {
1218
+ function oa(e) {
1202
1219
  return e.subjectKind && e.subjectId ? { type: e.subjectKind, id: e.subjectId } : void 0;
1203
1220
  }
1204
- const Qt = 12;
1205
- function _o(e, t, n = Qt) {
1221
+ const dn = 12;
1222
+ function ia(e, t, n = dn) {
1206
1223
  const r = t + 1;
1207
1224
  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 ? {
1208
1225
  status: "escalated",
@@ -1216,39 +1233,39 @@ function _o(e, t, n = Qt) {
1216
1233
  reason: "de agent rondde zijn beurt af zonder te zeggen wat er moet gebeuren (wachten, afronden of overdragen)"
1217
1234
  };
1218
1235
  }
1219
- const To = /* @__PURE__ */ new Set(["mail", "message"]);
1220
- function en(e, t) {
1236
+ const aa = /* @__PURE__ */ new Set(["mail", "message"]);
1237
+ function pn(e, t) {
1221
1238
  const n = e.settings?.signatures?.[t];
1222
1239
  return !n?.enabled || !n.body || n.body.trim() === "" ? null : n;
1223
1240
  }
1224
- function wo(e, t, n, r = "html") {
1241
+ function sa(e, t, n, r = "html") {
1225
1242
  if (!e) return n;
1226
- const i = en(e, t);
1227
- return i ? `${n}${r === "text" ? `
1243
+ const o = pn(e, t);
1244
+ return o ? `${n}${r === "text" ? `
1228
1245
 
1229
- ` : t === "mail" ? "<br><br>-- <br>" : "<br><br>"}${i.body}` : n;
1246
+ ` : t === "mail" ? "<br><br>-- <br>" : "<br><br>"}${o.body}` : n;
1230
1247
  }
1231
- function Io(e) {
1248
+ function ca(e) {
1232
1249
  return e.endpoints ?? [];
1233
1250
  }
1234
- const tn = 36e5, nn = 864e5, w = -1 / 0, Mo = (e) => e.score > w, P = {
1251
+ const fn = 36e5, mn = 864e5, v = -1 / 0, la = (e) => e.score > v, j = {
1235
1252
  urgent: 40,
1236
1253
  high: 25,
1237
1254
  normal: 10,
1238
1255
  low: 0
1239
1256
  };
1240
- function ko(e) {
1257
+ function ua(e) {
1241
1258
  return Object.fromEntries(e.map((t) => [t.resourceId, t]));
1242
1259
  }
1243
- const rn = /(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|newsletter|nieuwsbrief|mailer|mailing|notifications?|bounce|postmaster|marketing)@/i, Qe = /\b(unsubscribe|afmelden|uitschrijven|opt[\s-]?out|manage (your )?preferences|geen (e-?mails?|nieuwsbrief|berichten) meer)\b/i;
1244
- function on(e, t) {
1245
- return !!(e && rn.test(e) || t && Qe.test(t));
1260
+ const gn = /(^|[._+-])(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;
1261
+ function hn(e, t) {
1262
+ return !!(e && gn.test(e) || t && dt.test(t));
1246
1263
  }
1247
- const an = 3, sn = 600;
1248
- function Oo(e, t) {
1249
- return e >= an || t >= sn;
1264
+ const yn = 3, bn = 600;
1265
+ function da(e, t) {
1266
+ return e >= yn || t >= bn;
1250
1267
  }
1251
- const cn = [
1268
+ const An = [
1252
1269
  "list-unsubscribe",
1253
1270
  "list-unsubscribe-post",
1254
1271
  "list-id",
@@ -1258,93 +1275,93 @@ const cn = [
1258
1275
  "feedback-id",
1259
1276
  "x-mailer"
1260
1277
  ];
1261
- function Co(e) {
1278
+ function pa(e) {
1262
1279
  const t = {};
1263
1280
  for (const n of e) {
1264
1281
  const r = n.name?.toLowerCase();
1265
- r && n.value !== void 0 && cn.includes(r) && (t[r] = n.value);
1282
+ r && n.value !== void 0 && An.includes(r) && (t[r] = n.value);
1266
1283
  }
1267
1284
  return t;
1268
1285
  }
1269
- const ln = /(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|notifications?|bounce|postmaster|mailer)@/i, un = /(^|[._+-])(newsletter|nieuwsbrief|marketing|mailing)@/i;
1270
- function vo(e) {
1286
+ const En = /(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|notifications?|bounce|postmaster|mailer)@/i, Sn = /(^|[._+-])(newsletter|nieuwsbrief|marketing|mailing)@/i;
1287
+ function fa(e) {
1271
1288
  const t = e.headers ?? {}, n = e.from?.email, r = t["auto-submitted"]?.toLowerCase();
1272
- if (r && r !== "no" || t["x-auto-response-suppress"] || n && ln.test(n))
1289
+ if (r && r !== "no" || t["x-auto-response-suppress"] || n && En.test(n))
1273
1290
  return "automated";
1274
- const i = t.precedence?.toLowerCase();
1275
- if (t["list-unsubscribe"] || t["list-unsubscribe-post"] || t["list-id"] || i === "bulk" || i === "list" || e.body && Qe.test(e.body) || n && un.test(n))
1291
+ const o = t.precedence?.toLowerCase();
1292
+ if (t["list-unsubscribe"] || t["list-unsubscribe-post"] || t["list-id"] || o === "bulk" || o === "list" || e.body && dt.test(e.body) || n && Sn.test(n))
1276
1293
  return "marketing";
1277
1294
  }
1278
- function dn(e, t) {
1295
+ function _n(e, t) {
1279
1296
  return e.lastActivityAt ? !(e.seenBy ?? []).includes(t) : !1;
1280
1297
  }
1281
- const pn = ["open"], fn = 1e3, mn = {
1298
+ const Tn = ["open"], wn = 1e3, In = {
1282
1299
  urgent: 1,
1283
1300
  high: 4,
1284
1301
  normal: 8,
1285
1302
  low: 24
1286
- }, gn = 72;
1287
- function hn(e) {
1288
- return e.lastActivityAt ?? (e.createdAt ? new Date(Rt(e)).getTime() : 0);
1303
+ }, Mn = 72;
1304
+ function kn(e) {
1305
+ return e.lastActivityAt ?? (e.createdAt ? new Date(Wt(e)).getTime() : 0);
1289
1306
  }
1290
- function yn(e, t) {
1291
- return bn(t.remindersById?.[e.id], e, t.now);
1307
+ function vn(e, t) {
1308
+ return On(t.remindersById?.[e.id], e, t.now);
1292
1309
  }
1293
- function bn(e, t, n) {
1310
+ function On(e, t, n) {
1294
1311
  return !e || e.remindAt <= n ? !1 : !((t.lastActivityAt ?? 0) > e.parkedAt && t.lastActivityPreview?.direction === "inbound");
1295
1312
  }
1296
- const et = (e) => kt(e) === "outbound_message", tt = (e) => pn.includes(e);
1297
- function re(e, t) {
1298
- return Math.max(0, (t - hn(e)) / tn);
1313
+ const pt = (e) => Kt(e) === "outbound_message", ft = (e) => Tn.includes(e);
1314
+ function me(e, t) {
1315
+ return Math.max(0, (t - kn(e)) / fn);
1299
1316
  }
1300
- function An(e, t) {
1317
+ function Cn(e, t) {
1301
1318
  const n = e.assignedInboxId ? t?.[e.assignedInboxId] : void 0;
1302
- return typeof n == "number" && n > 0 ? n : mn[e.priority ?? "normal"];
1319
+ return typeof n == "number" && n > 0 ? n : In[e.priority ?? "normal"];
1303
1320
  }
1304
- function No(e) {
1321
+ function ma(e) {
1305
1322
  const t = {};
1306
1323
  for (const n of e)
1307
1324
  typeof n.slaHours == "number" && n.slaHours > 0 && (t[n.id] = n.slaHours);
1308
1325
  return t;
1309
1326
  }
1310
- function xo(e, t, n) {
1311
- return !tt(e.status) || e.firstResponseAt ? !1 : re(e, t) > An(e, n);
1327
+ function ga(e, t, n) {
1328
+ return !ft(e.status) || e.firstResponseAt ? !1 : me(e, t) > Cn(e, n);
1312
1329
  }
1313
- function En(e, t) {
1330
+ function Nn(e, t) {
1314
1331
  const n = e.lastActivityPreview;
1315
- return n?.direction !== "outbound" || !et(n.type) ? !1 : re(e, t) < gn;
1332
+ return n?.direction !== "outbound" || !pt(n.type) ? !1 : me(e, t) < Mn;
1316
1333
  }
1317
- function Ro(e, t) {
1318
- if (!tt(e.status)) return { score: w, reasons: [] };
1319
- if (e.snoozedTill && e.snoozedTill > t.now) return { score: w, reasons: [] };
1320
- if (En(e, t.now)) return { score: w, reasons: [] };
1321
- if (yn(e, t)) return { score: w, reasons: [] };
1334
+ function ha(e, t) {
1335
+ if (!ft(e.status)) return { score: v, reasons: [] };
1336
+ if (e.snoozedTill && e.snoozedTill > t.now) return { score: v, reasons: [] };
1337
+ if (Nn(e, t.now)) return { score: v, reasons: [] };
1338
+ if (vn(e, t)) return { score: v, reasons: [] };
1322
1339
  let n = 0;
1323
- const r = [], i = e.priority ?? "normal";
1324
- P[i] > 0 && (n += P[i], r.push(`priority:${i}`)), dn(e, t.userId) && (n += 20, r.push("unseen")), e.assignedUserId && e.assignedUserId === t.userId && (n += 15, r.push("assigned-to-you"));
1325
- const o = re(e, t.now);
1326
- if (o > 0) {
1327
- const c = Math.min(o * 2, 30);
1328
- n += c, o >= 1 && r.push(`waiting:${Math.round(o)}h`);
1340
+ const r = [], o = e.priority ?? "normal";
1341
+ j[o] > 0 && (n += j[o], r.push(`priority:${o}`)), _n(e, t.userId) && (n += 20, r.push("unseen")), e.assignedUserId && e.assignedUserId === t.userId && (n += 15, r.push("assigned-to-you"));
1342
+ const i = me(e, t.now);
1343
+ if (i > 0) {
1344
+ const c = Math.min(i * 2, 30);
1345
+ n += c, i >= 1 && r.push(`waiting:${Math.round(i)}h`);
1329
1346
  }
1330
1347
  const a = e.lastActivityPreview;
1331
- return a?.type === "AI_ACTION_PROPOSED" && (n += 30, r.push("awaiting-approval")), a?.direction === "outbound" && et(a.type) && (n += 10, r.push("no-reply")), !e.firstResponseAt && e.lastActivityPreview?.direction === "inbound" && (n += 10, r.push("awaiting-reply")), (e.tags?.some((c) => c === "marketing" || c === "automated") || on(e.remoteParty?.resource, e.lastActivityPreview?.snippet)) && (n -= fn, r.push("bulk")), { score: n, reasons: r };
1348
+ return a?.type === "AI_ACTION_PROPOSED" && (n += 30, r.push("awaiting-approval")), a?.direction === "outbound" && pt(a.type) && (n += 10, r.push("no-reply")), !e.firstResponseAt && e.lastActivityPreview?.direction === "inbound" && (n += 10, r.push("awaiting-reply")), (e.tags?.some((c) => c === "marketing" || c === "automated") || hn(e.remoteParty?.resource, e.lastActivityPreview?.snippet)) && (n -= wn, r.push("bulk")), { score: n, reasons: r };
1332
1349
  }
1333
- const Do = (e) => !!e.assignedUserId || !!e.assignedInboxId, $o = (e) => e.status === "closed", Lo = (e) => ({
1350
+ const ya = (e) => !!e.assignedUserId || !!e.assignedInboxId, ba = (e) => e.status === "closed", Aa = (e) => ({
1334
1351
  urgent: 10,
1335
1352
  high: 5,
1336
1353
  normal: 2,
1337
1354
  low: 1
1338
- })[e.priority] || 0, Po = (e, t = 30) => e.title?.length <= t ? e.title : `${e.title.substring(0, t)}...`;
1339
- function Uo(e, t) {
1355
+ })[e.priority] || 0, Ea = (e, t = 30) => e.title?.length <= t ? e.title : `${e.title.substring(0, t)}...`;
1356
+ function Sa(e, t) {
1340
1357
  const n = e.labels ?? [];
1341
1358
  return n.find((r) => r.locale === t)?.label ?? n[0]?.label ?? e.url;
1342
1359
  }
1343
- function Ko(e, t, n) {
1360
+ function _a(e, t, n) {
1344
1361
  const r = e.translations ?? [];
1345
- return r.find((i) => i.locale === t) ?? (n ? r.find((i) => i.locale === n) : void 0) ?? { locale: t };
1362
+ return r.find((o) => o.locale === t) ?? (n ? r.find((o) => o.locale === n) : void 0) ?? { locale: t };
1346
1363
  }
1347
- const Me = [
1364
+ const Pe = [
1348
1365
  { code: "nl", label: "Nederlands", english: "Dutch" },
1349
1366
  { code: "en", label: "English", english: "English" },
1350
1367
  { code: "de", label: "Deutsch", english: "German" },
@@ -1359,83 +1376,83 @@ const Me = [
1359
1376
  { code: "fi", label: "Suomi", english: "Finnish" },
1360
1377
  { code: "tr", label: "Türkçe", english: "Turkish" }
1361
1378
  ];
1362
- function nt(e) {
1379
+ function mt(e) {
1363
1380
  const t = (e ?? "").toLowerCase();
1364
- return Me.find((n) => n.code === t) ?? Me.find((n) => n.code === t.split("-")[0]);
1381
+ return Pe.find((n) => n.code === t) ?? Pe.find((n) => n.code === t.split("-")[0]);
1365
1382
  }
1366
- function Fo(e) {
1367
- return nt(e)?.label ?? e;
1383
+ function Ta(e) {
1384
+ return mt(e)?.label ?? e;
1368
1385
  }
1369
- function Bo(e) {
1370
- const t = nt(e);
1386
+ function wa(e) {
1387
+ const t = mt(e);
1371
1388
  return t ? t.english === t.label ? `${t.english} (${t.code})` : `${t.english} — ${t.label} (${t.code})` : e;
1372
1389
  }
1373
- const rt = 3;
1374
- function Sn(e, t) {
1390
+ const gt = 3;
1391
+ function Rn(e, t) {
1375
1392
  const n = /* @__PURE__ */ new Set();
1376
- let r = 1, i = t.get(e)?.parentId;
1377
- for (; i; ) {
1378
- if (n.has(i) || (n.add(i), r++, r > rt + 1)) return 1 / 0;
1379
- i = t.get(i)?.parentId;
1393
+ let r = 1, o = t.get(e)?.parentId;
1394
+ for (; o; ) {
1395
+ if (n.has(o) || (n.add(o), r++, r > gt + 1)) return 1 / 0;
1396
+ o = t.get(o)?.parentId;
1380
1397
  }
1381
1398
  return r;
1382
1399
  }
1383
- function jo(e, t, n) {
1400
+ function Ia(e, t, n) {
1384
1401
  if (!e) return !0;
1385
1402
  if (e === t) return !1;
1386
1403
  const r = new Map(n.map((a) => [a.id, a]));
1387
- if (!r.has(e) || t && _n(e, t, r)) return !1;
1388
- const i = Sn(e, r), o = t ? it(t, n) : 1;
1389
- return i + o <= rt;
1404
+ if (!r.has(e) || t && xn(e, t, r)) return !1;
1405
+ const o = Rn(e, r), i = t ? ht(t, n) : 1;
1406
+ return o + i <= gt;
1390
1407
  }
1391
- function _n(e, t, n) {
1408
+ function xn(e, t, n) {
1392
1409
  const r = /* @__PURE__ */ new Set();
1393
- let i = n.get(e)?.parentId;
1394
- for (; i; ) {
1395
- if (i === t) return !0;
1396
- if (r.has(i)) return !1;
1397
- r.add(i), i = n.get(i)?.parentId;
1410
+ let o = n.get(e)?.parentId;
1411
+ for (; o; ) {
1412
+ if (o === t) return !0;
1413
+ if (r.has(o)) return !1;
1414
+ r.add(o), o = n.get(o)?.parentId;
1398
1415
  }
1399
1416
  return !1;
1400
1417
  }
1401
- function it(e, t, n = /* @__PURE__ */ new Set()) {
1418
+ function ht(e, t, n = /* @__PURE__ */ new Set()) {
1402
1419
  if (n.has(e)) return 1;
1403
1420
  n.add(e);
1404
- const r = t.filter((i) => i.parentId === e);
1405
- return r.length ? 1 + Math.max(...r.map((i) => it(i.id, t, n))) : 1;
1421
+ const r = t.filter((o) => o.parentId === e);
1422
+ return r.length ? 1 + Math.max(...r.map((o) => ht(o.id, t, n))) : 1;
1406
1423
  }
1407
- const Tn = "en";
1408
- function wn(e) {
1409
- return e.defaultLocale || e.locale || Tn;
1424
+ const Dn = "en";
1425
+ function $n(e) {
1426
+ return e.defaultLocale || e.locale || Dn;
1410
1427
  }
1411
- function Ho(e) {
1428
+ function Ma(e) {
1412
1429
  const t = /* @__PURE__ */ new Set(), n = [];
1413
- for (const r of [wn(e), ...e.locales ?? []])
1430
+ for (const r of [$n(e), ...e.locales ?? []])
1414
1431
  !r || t.has(r) || (t.add(r), n.push(r));
1415
1432
  return n;
1416
1433
  }
1417
- function Go(e, t, n) {
1434
+ function ka(e, t, n) {
1418
1435
  const r = e.translations ?? [];
1419
- return r.find((i) => i.locale === t)?.name ?? (n ? r.find((i) => i.locale === n)?.name : void 0) ?? e.name;
1436
+ return r.find((o) => o.locale === t)?.name ?? (n ? r.find((o) => o.locale === n)?.name : void 0) ?? e.name;
1420
1437
  }
1421
- const ke = ["lookup", "condition", "parallel", "for-each"];
1422
- function Oe(e) {
1438
+ const Ue = ["lookup", "condition", "parallel", "for-each"];
1439
+ function Ke(e) {
1423
1440
  for (const t of e) {
1424
- if (!ke.includes(t.type))
1425
- return `staptype "${t.type}" mag niet meelezen (alleen ${ke.join(", ")})`;
1441
+ if (!Ue.includes(t.type))
1442
+ return `staptype "${t.type}" mag niet meelezen (alleen ${Ue.join(", ")})`;
1426
1443
  if (t.type === "parallel")
1427
1444
  for (const n of t.branches ?? []) {
1428
- const r = Oe(n);
1445
+ const r = Ke(n);
1429
1446
  if (r) return r;
1430
1447
  }
1431
1448
  if (t.type === "for-each") {
1432
- const n = Oe(t.body ?? []);
1449
+ const n = Ke(t.body ?? []);
1433
1450
  if (n) return n;
1434
1451
  }
1435
1452
  }
1436
1453
  return null;
1437
1454
  }
1438
- function In(e, t) {
1455
+ function Ln(e, t) {
1439
1456
  switch (e.kind) {
1440
1457
  case "org":
1441
1458
  return !0;
@@ -1445,23 +1462,286 @@ function In(e, t) {
1445
1462
  return e.userId === t.userId;
1446
1463
  }
1447
1464
  }
1448
- function Wo(e, t) {
1449
- return e.filter((n) => n.enabled && In(n.ownerScope, t));
1465
+ function va(e, t) {
1466
+ return e.filter((n) => n.enabled && Ln(n.ownerScope, t));
1450
1467
  }
1451
- function Vo(e) {
1468
+ function Oa(e) {
1452
1469
  return e.credentialScope ? e.credentialScope : (e.authMode ?? "header") === "header" || e.oauth?.scope === "org" ? "shared" : "per-user";
1453
1470
  }
1454
- function zo(e) {
1471
+ function Ca(e) {
1455
1472
  return `mcp__${e}__`;
1456
1473
  }
1457
- const Xo = 1e3, Yo = 2e3, qo = 500, Jo = 12e3, Zo = 4e3, Mn = ["contact", "company", "work_item"];
1458
- function Qo(e) {
1474
+ const Na = 1e3, Ra = 2e3, xa = 500, Da = 12e3, $a = 4e3, Pn = ["contact", "company", "work_item"];
1475
+ function La(e) {
1459
1476
  if (!e) return !1;
1460
1477
  const t = e.slice(0, e.indexOf(":"));
1461
- return Mn.includes(t);
1478
+ return Pn.includes(t);
1479
+ }
1480
+ const Pa = "onboarding-source", Ua = ["support", "billing", "availability", "sales", "onboarding"], Ka = ["keep", "replace"], Fa = "demand-source", Un = 36e5, Fe = 864e5;
1481
+ function Ha(e, t, n, r = "hour") {
1482
+ if (e <= 0 || n <= t) return [];
1483
+ const o = r === "day" ? Fe : Un, i = [];
1484
+ for (let c = Kn(t); c < n; c += Fe) {
1485
+ const l = new Date(c).getUTCDay();
1486
+ l !== 0 && l !== 6 && i.push(c);
1487
+ }
1488
+ if (!i.length) return [];
1489
+ const a = e / i.length, s = [];
1490
+ for (const c of i) {
1491
+ if (r === "day") {
1492
+ s.push({ period: C(c, "day"), seconds: a });
1493
+ continue;
1494
+ }
1495
+ const l = a / 8;
1496
+ for (let d = 9; d < 17; d++) {
1497
+ const h = c + d * o;
1498
+ if (h >= n) break;
1499
+ s.push({ period: C(h, "hour"), seconds: l });
1500
+ }
1501
+ }
1502
+ return s;
1462
1503
  }
1463
- const ea = "onboarding-source", ta = ["support", "billing", "availability", "sales", "onboarding"], na = ["keep", "replace"];
1464
- function kn(e) {
1504
+ function Kn(e) {
1505
+ const t = new Date(e);
1506
+ return t.setUTCHours(0, 0, 0, 0), t.getTime();
1507
+ }
1508
+ const He = 1e3;
1509
+ function Fn(e, t) {
1510
+ let n = 1;
1511
+ for (let r = 1; r <= e; r++)
1512
+ n = t * n / (r + t * n);
1513
+ return n;
1514
+ }
1515
+ function Hn(e, t) {
1516
+ if (e <= 0) return 1;
1517
+ if (t <= 0) return 0;
1518
+ if (e <= t) return 1;
1519
+ const n = Fn(e, t), r = t / e;
1520
+ return n / (1 - r * (1 - n));
1521
+ }
1522
+ function Bn(e, t, n, r) {
1523
+ return r <= 0 ? 1 : e <= t ? 0 : 1 - Hn(e, t) * Math.exp(-(e - t) * n / r);
1524
+ }
1525
+ function jn(e, t, n) {
1526
+ return n <= 0 ? 0 : e * t / n;
1527
+ }
1528
+ function Gn(e, t, n, r) {
1529
+ if (e <= 0 || t <= 0) return 0;
1530
+ const o = jn(e, t, n);
1531
+ if (o <= 0) return 0;
1532
+ const i = r.serviceLevelPercent / 100, a = r.maxOccupancyPercent ? r.maxOccupancyPercent / 100 : void 0;
1533
+ for (let s = Math.max(1, Math.ceil(o)); s <= He; s++)
1534
+ if (!(s <= o) && !(Bn(s, o, r.targetSeconds, t) < i) && !(a && o / s > a))
1535
+ return s;
1536
+ return He;
1537
+ }
1538
+ const ge = [
1539
+ {
1540
+ key: "shift",
1541
+ label: "kind_shift",
1542
+ capacity: !0,
1543
+ productive: !1,
1544
+ absent: !1,
1545
+ icon: "calendar-clock"
1546
+ },
1547
+ {
1548
+ key: "allocation",
1549
+ label: "kind_allocation",
1550
+ capacity: !1,
1551
+ productive: !0,
1552
+ absent: !1,
1553
+ icon: "briefcase"
1554
+ },
1555
+ {
1556
+ key: "meeting",
1557
+ label: "kind_meeting",
1558
+ capacity: !1,
1559
+ productive: !1,
1560
+ absent: !1,
1561
+ icon: "users"
1562
+ },
1563
+ {
1564
+ key: "travel",
1565
+ label: "kind_travel",
1566
+ capacity: !1,
1567
+ productive: !1,
1568
+ absent: !1,
1569
+ icon: "car"
1570
+ },
1571
+ {
1572
+ key: "training",
1573
+ label: "kind_training",
1574
+ capacity: !1,
1575
+ productive: !1,
1576
+ absent: !1,
1577
+ icon: "graduation-cap"
1578
+ },
1579
+ {
1580
+ key: "break",
1581
+ label: "kind_break",
1582
+ capacity: !1,
1583
+ productive: !1,
1584
+ absent: !1,
1585
+ icon: "coffee"
1586
+ },
1587
+ {
1588
+ key: "absence",
1589
+ label: "kind_absence",
1590
+ capacity: !1,
1591
+ productive: !1,
1592
+ absent: !0,
1593
+ approvable: !0,
1594
+ icon: "palmtree"
1595
+ },
1596
+ {
1597
+ key: "sick",
1598
+ label: "kind_sick",
1599
+ capacity: !1,
1600
+ productive: !1,
1601
+ absent: !0,
1602
+ icon: "thermometer"
1603
+ },
1604
+ {
1605
+ key: "holiday",
1606
+ label: "kind_holiday",
1607
+ capacity: !1,
1608
+ productive: !1,
1609
+ absent: !0,
1610
+ icon: "party-popper"
1611
+ }
1612
+ ], Wn = {
1613
+ key: "unknown",
1614
+ label: "kind_unknown",
1615
+ capacity: !1,
1616
+ productive: !1,
1617
+ absent: !1
1618
+ };
1619
+ function G(e, t = ge) {
1620
+ return t.find((n) => n.key === e) ?? { ...Wn, key: e };
1621
+ }
1622
+ function yt(e) {
1623
+ return e === "published" || e === "approved";
1624
+ }
1625
+ function Vn(e, t, n = ge) {
1626
+ if (e.workstreamId !== t) return !1;
1627
+ const r = G(e.kindKey, n);
1628
+ return r.absent ? !1 : r.productive || r.capacity;
1629
+ }
1630
+ function Ba(e, t = ge) {
1631
+ if (!e.userId || !yt(e.status)) return !1;
1632
+ const n = G(e.kindKey, t);
1633
+ return n.capacity || n.productive || n.absent;
1634
+ }
1635
+ const zn = 36e5, Xn = 864e5;
1636
+ function Yn(e) {
1637
+ return e === "day" ? Xn : zn;
1638
+ }
1639
+ function ja(e, t) {
1640
+ return e.start < t.end && t.start < e.end;
1641
+ }
1642
+ function ee(e, t, n) {
1643
+ const r = Math.min(e.end, n) - Math.max(e.start, t);
1644
+ return r > 0 ? r / 1e3 : 0;
1645
+ }
1646
+ function qn(e, t, n) {
1647
+ const r = e.handleSeconds ?? 0, o = e.seconds ?? (e.volume !== void 0 ? e.volume * r : 0);
1648
+ if (o <= 0 && !e.volume) return { seconds: 0, headcount: 0 };
1649
+ const i = (t.unplannedLossPercent ?? 0) / 100, a = i > 0 && i < 1 ? 1 / (1 - i) : 1;
1650
+ if (t.model === "queue" && e.volume !== void 0 && r > 0) {
1651
+ const s = Gn(e.volume, r, n, t);
1652
+ return { seconds: o, headcount: s * a };
1653
+ }
1654
+ return { seconds: o, headcount: o / n * a };
1655
+ }
1656
+ function Ga(e) {
1657
+ const { entries: t, workstreamId: n, staffing: r, demand: o, range: i } = e, a = e.grain ?? "hour", s = Yn(a), c = s / 1e3, l = e.kinds, d = t.filter((y) => yt(y.status)), h = d.filter((y) => Vn(y, n, l)), A = d.filter((y) => G(y.kindKey, l).capacity), E = d.filter((y) => G(y.kindKey, l).absent), M = [];
1658
+ for (let y = B(i.from, a); y < i.to; y += s) {
1659
+ const T = y + s, u = C(y, a);
1660
+ let p = 0;
1661
+ for (const R of h) p += ee(R, y, T);
1662
+ let w = 0;
1663
+ for (const R of A) w += ee(R, y, T);
1664
+ let N = 0;
1665
+ for (const R of E) N += ee(R, y, T);
1666
+ const P = o?.[u] ?? {}, Y = qn(P, r, c), Se = p / c;
1667
+ M.push({
1668
+ period: u,
1669
+ forecastVolume: P.volume,
1670
+ requiredSeconds: Y.seconds,
1671
+ requiredHeadcount: Y.headcount,
1672
+ scheduledSeconds: p,
1673
+ scheduledHeadcount: Se,
1674
+ netHeadcount: Se - Y.headcount,
1675
+ capacitySeconds: w,
1676
+ absentSeconds: N
1677
+ });
1678
+ }
1679
+ return M;
1680
+ }
1681
+ function Jn(e, t) {
1682
+ return e.workTypeKey ?? t?.defaultWorkTypeKey;
1683
+ }
1684
+ function Wa(e, t, n) {
1685
+ const r = Jn(e, t);
1686
+ return r ? n.find((o) => o.key === r)?.defaultBillable ?? !1 : !1;
1687
+ }
1688
+ function Va(e) {
1689
+ return e.filter(
1690
+ (t) => t.netHeadcount < 0 && t.requiredHeadcount > 0
1691
+ );
1692
+ }
1693
+ const Zn = 36e5, ae = 6048e5, Qn = 8, er = 0.5, tr = 2;
1694
+ function nr(e) {
1695
+ 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;
1696
+ return Date.UTC(t, n - 1, r, o);
1697
+ }
1698
+ function rr(e, t, n) {
1699
+ const r = [];
1700
+ for (let i = 0; i < n; i++) {
1701
+ const a = t - i * ae, s = a - ae;
1702
+ let c = 0, l = !1;
1703
+ for (const [d, h] of e)
1704
+ d >= s && d < a && (c += h, l = !0);
1705
+ l && r.push(c);
1706
+ }
1707
+ if (r.length < 2) return 1;
1708
+ const o = r.reduce((i, a) => i + a, 0) / r.length;
1709
+ return o <= 0 ? 1 : Math.min(tr, Math.max(er, r[0] / o));
1710
+ }
1711
+ function or(e, t) {
1712
+ if (!e?.length) return;
1713
+ let n;
1714
+ for (const r of e)
1715
+ t >= r.from && t < r.to && (n = r);
1716
+ return n;
1717
+ }
1718
+ function za(e, t, n) {
1719
+ const r = Math.max(1, n?.weeks ?? Qn), o = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set();
1720
+ for (const c of e)
1721
+ o.set(nr(c.period), c.value), i.add(c.period.slice(0, 10));
1722
+ const a = rr(o, B(t.from, "hour"), r), s = [];
1723
+ for (let c = B(t.from, "hour"); c < t.to; c += Zn) {
1724
+ let l = 0, d = 0;
1725
+ for (let E = 1; E <= r; E++) {
1726
+ const M = c - E * ae, T = o.get(M) ?? (i.has(C(M, "day")) ? 0 : void 0);
1727
+ if (T === void 0) continue;
1728
+ const u = r - E + 1;
1729
+ l += T * u, d += u;
1730
+ }
1731
+ let h = d > 0 ? l / d * a : 0;
1732
+ const A = or(n?.adjustments, c);
1733
+ A?.absoluteVolume !== void 0 ? h = A.absoluteVolume : A?.factor !== void 0 && (h *= A.factor), s.push({ period: C(c, "hour"), volume: h });
1734
+ }
1735
+ return s;
1736
+ }
1737
+ const ir = "schedule_entry", ar = "workstream";
1738
+ function Xa(e) {
1739
+ return `${ir}:${e}`;
1740
+ }
1741
+ function Ya(e) {
1742
+ return `${ar}:${e}`;
1743
+ }
1744
+ function sr(e) {
1465
1745
  switch (e.kind) {
1466
1746
  case "user":
1467
1747
  return `user:${e.userId}`;
@@ -1471,22 +1751,22 @@ function kn(e) {
1471
1751
  return "org";
1472
1752
  }
1473
1753
  }
1474
- function ra(e) {
1754
+ function qa(e) {
1475
1755
  if (typeof e != "string") return;
1476
1756
  const t = e.trim();
1477
1757
  if (t === "org") return { kind: "org" };
1478
1758
  const n = t.indexOf(":");
1479
1759
  if (n <= 0) return;
1480
- const r = t.slice(0, n), i = t.slice(n + 1).trim();
1481
- if (i) {
1482
- if (r === "user") return { kind: "user", userId: i };
1483
- if (r === "team") return { kind: "team", teamId: i };
1760
+ const r = t.slice(0, n), o = t.slice(n + 1).trim();
1761
+ if (o) {
1762
+ if (r === "user") return { kind: "user", userId: o };
1763
+ if (r === "team") return { kind: "team", teamId: o };
1484
1764
  }
1485
1765
  }
1486
- function On(e) {
1487
- return kn(e);
1766
+ function cr(e) {
1767
+ return sr(e);
1488
1768
  }
1489
- function Cn(e) {
1769
+ function lr(e) {
1490
1770
  switch (e.kind) {
1491
1771
  case "personal":
1492
1772
  return { kind: "user", userId: e.userId };
@@ -1496,14 +1776,14 @@ function Cn(e) {
1496
1776
  return { kind: "org" };
1497
1777
  }
1498
1778
  }
1499
- const vn = Cn;
1500
- function ia(e) {
1501
- return e.agentId ? { kind: "user", userId: e.agentId } : vn(e.ownerScope);
1779
+ const ur = lr;
1780
+ function Ja(e) {
1781
+ return e.agentId ? { kind: "user", userId: e.agentId } : ur(e.ownerScope);
1502
1782
  }
1503
- function oa(e) {
1504
- return On(e);
1783
+ function Za(e) {
1784
+ return cr(e);
1505
1785
  }
1506
- function aa(e, t) {
1786
+ function Qa(e, t) {
1507
1787
  if (!t) return;
1508
1788
  let n = e;
1509
1789
  for (const r of t.split(".")) {
@@ -1512,24 +1792,24 @@ function aa(e, t) {
1512
1792
  }
1513
1793
  return n;
1514
1794
  }
1515
- function sa(e, t) {
1795
+ function es(e, t) {
1516
1796
  return e.targets.find((n) => n.activityTypes.includes(t));
1517
1797
  }
1518
- function ca(e, t) {
1798
+ function ts(e, t) {
1519
1799
  if (t)
1520
1800
  return e.targets.find((n) => n.id === t);
1521
1801
  }
1522
- function Nn(e) {
1802
+ function dr(e) {
1523
1803
  return e?.kind === "assignment";
1524
1804
  }
1525
- function la(e) {
1526
- const { trigger: t, agentId: n, target: r, activityType: i, assigneeUserId: o, authorUserId: a } = e;
1527
- return Nn(t) ? n ? r ? r.activityTypes.includes(i) ? o ? o !== n ? "assigned to someone else" : a && a === n ? "the agent assigned this to itself, which would restart its own run" : null : `no assignee found at ${r.assigneePath}` : `activity type ${i} 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";
1805
+ function ns(e) {
1806
+ const { trigger: t, agentId: n, target: r, activityType: o, assigneeUserId: i, authorUserId: a } = e;
1807
+ return dr(t) ? n ? r ? r.activityTypes.includes(o) ? i ? i !== n ? "assigned to someone else" : a && a === 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";
1528
1808
  }
1529
- function ua(e) {
1809
+ function rs(e) {
1530
1810
  return (e.startsWith("tool:") ? e.slice(5) : e).replace(/__/g, " · ").replace(/\./g, " · ").replace(/_/g, " ");
1531
1811
  }
1532
- const da = [
1812
+ const os = [
1533
1813
  { name: "text", type: "string" },
1534
1814
  { name: "subject", type: "string" },
1535
1815
  { name: "from", type: "string" },
@@ -1569,7 +1849,7 @@ const da = [
1569
1849
  // `buildTriggerVars` cannot fill it itself: the job does that with the catalog in hand, before
1570
1850
  // the trigger filter runs — like contactId/companyId above.
1571
1851
  { name: "assigneeUserId", type: "string" }
1572
- ], pa = {
1852
+ ], is = {
1573
1853
  topics: [
1574
1854
  { name: "topicId", type: "string" },
1575
1855
  { name: "topic", type: "string" },
@@ -1583,303 +1863,307 @@ const da = [
1583
1863
  // Deliberately empty: the fields come from `ClassifyStep.fields` and so differ per step.
1584
1864
  extract: []
1585
1865
  };
1586
- function xn(e) {
1866
+ function pr(e) {
1587
1867
  return `${e.type}:${e.id}`;
1588
1868
  }
1589
- const Rn = "interaction";
1590
- function Dn(e) {
1591
- return e?.type === Rn ? e.id : void 0;
1869
+ const fr = "interaction";
1870
+ function mr(e) {
1871
+ return e?.type === fr ? e.id : void 0;
1592
1872
  }
1593
- const $n = 64, Ln = 8e3;
1594
- function fa(e) {
1873
+ const gr = 64, hr = 8e3;
1874
+ function as(e) {
1595
1875
  const t = typeof e == "number" ? e : Number(String(e ?? "").trim());
1596
1876
  if (!(!Number.isFinite(t) || t <= 0))
1597
- return Math.min(Math.max(Math.round(t), $n), Ln);
1877
+ return Math.min(Math.max(Math.round(t), gr), hr);
1598
1878
  }
1599
- const ma = { kind: "workflow", steps: [] };
1600
- function ga(e) {
1879
+ const ss = { kind: "workflow", steps: [] };
1880
+ function cs(e) {
1601
1881
  return e?.kind === "workflow" ? e.steps : [];
1602
1882
  }
1603
- function ha(e) {
1883
+ function ls(e) {
1604
1884
  return e?.kind === "procedure" ? e.procedure : void 0;
1605
1885
  }
1606
- function Pn(e) {
1886
+ function yr(e) {
1607
1887
  const t = e?.approved ?? 0, n = t + (e?.rejected ?? 0);
1608
1888
  return { total: n, rate: n ? t / n : 0 };
1609
1889
  }
1610
- const Un = 10, Kn = 0.9;
1611
- function ya(e) {
1612
- const { total: t, rate: n } = Pn(e);
1613
- return t >= Un && n >= Kn;
1890
+ const br = 10, Ar = 0.9;
1891
+ function us(e) {
1892
+ const { total: t, rate: n } = yr(e);
1893
+ return t >= br && n >= Ar;
1614
1894
  }
1615
- const Fn = ["done", "escalated", "failed", "stopped"];
1616
- function ba(e) {
1617
- return Fn.includes(e);
1895
+ const Er = ["done", "escalated", "failed", "stopped"];
1896
+ function ds(e) {
1897
+ return Er.includes(e);
1618
1898
  }
1619
- function Bn(e) {
1899
+ function Sr(e) {
1620
1900
  return e === "waiting";
1621
1901
  }
1622
- function Aa(e) {
1623
- return e === "running" || Bn(e);
1902
+ function ps(e) {
1903
+ return e === "running" || Sr(e);
1624
1904
  }
1625
- function ot(e) {
1905
+ function bt(e) {
1626
1906
  return e.subjectKind && e.subjectId ? { type: e.subjectKind, id: e.subjectId } : void 0;
1627
1907
  }
1628
- function Ea(e) {
1629
- const t = ot(e);
1630
- return t ? xn(t) : void 0;
1908
+ function fs(e) {
1909
+ const t = bt(e);
1910
+ return t ? pr(t) : void 0;
1631
1911
  }
1632
- function Sa(e) {
1633
- return Dn(ot(e));
1912
+ function ms(e) {
1913
+ return mr(bt(e));
1634
1914
  }
1635
- function _a(e) {
1915
+ function gs(e) {
1636
1916
  const t = [], n = /* @__PURE__ */ new Map();
1637
- for (const r of [...e].sort(jn)) {
1638
- const i = n.get(r.emoji);
1639
- if (i) {
1640
- i.push(r.actor);
1917
+ for (const r of [...e].sort(_r)) {
1918
+ const o = n.get(r.emoji);
1919
+ if (o) {
1920
+ o.push(r.actor);
1641
1921
  continue;
1642
1922
  }
1643
1923
  t.push(r.emoji), n.set(r.emoji, [r.actor]);
1644
1924
  }
1645
1925
  return t.map((r) => {
1646
- const i = n.get(r);
1647
- return { emoji: r, count: i.length, actors: i };
1648
- }).sort((r, i) => i.count - r.count || t.indexOf(r.emoji) - t.indexOf(i.emoji));
1926
+ const o = n.get(r);
1927
+ return { emoji: r, count: o.length, actors: o };
1928
+ }).sort((r, o) => o.count - r.count || t.indexOf(r.emoji) - t.indexOf(o.emoji));
1649
1929
  }
1650
- const jn = (e, t) => (e.createdAt ?? 0) - (t.createdAt ?? 0);
1651
- function Ta(e, t) {
1930
+ const _r = (e, t) => (e.createdAt ?? 0) - (t.createdAt ?? 0);
1931
+ function hs(e, t) {
1652
1932
  return t ? e.actors.some((n) => n.type === "user" && n.id === t) : !1;
1653
1933
  }
1654
- const J = 6e4, Hn = 36e5, C = 864e5, at = 800;
1655
- function Ce(e, t) {
1934
+ const se = 6e4, Tr = 36e5, $ = 864e5, At = 800;
1935
+ function Be(e, t) {
1656
1936
  const n = Date.UTC(e, t + 1, 0);
1657
- return n - new Date(n).getUTCDay() * C + Hn;
1937
+ return n - new Date(n).getUTCDay() * $ + Tr;
1658
1938
  }
1659
- function Gn(e) {
1939
+ function wr(e) {
1660
1940
  const t = new Date(e).getUTCFullYear();
1661
- return e >= Ce(t, 2) && e < Ce(t, 9);
1941
+ return e >= Be(t, 2) && e < Be(t, 9);
1662
1942
  }
1663
- function st(e, t) {
1664
- const n = t.dst === "eu" && Gn(e) ? 60 : 0;
1665
- return (t.utcOffsetMinutes + n) * J;
1943
+ function Et(e, t) {
1944
+ const n = t.dst === "eu" && wr(e) ? 60 : 0;
1945
+ return (t.utcOffsetMinutes + n) * se;
1666
1946
  }
1667
- function Wn(e) {
1947
+ function Ir(e) {
1668
1948
  return (e + 3) % 7 + 1;
1669
1949
  }
1670
- function ct(e, t) {
1671
- const n = st(e, t), r = e + n, i = Math.floor(r / C);
1672
- if (!t.days.includes(Wn(i))) return null;
1673
- const o = i * C;
1950
+ function St(e, t) {
1951
+ const n = Et(e, t), r = e + n, o = Math.floor(r / $);
1952
+ if (!t.days.includes(Ir(o))) return null;
1953
+ const i = o * $;
1674
1954
  return {
1675
- open: o + t.fromMinutes * J - n,
1676
- close: o + t.toMinutes * J - n
1955
+ open: i + t.fromMinutes * se - n,
1956
+ close: i + t.toMinutes * se - n
1677
1957
  };
1678
1958
  }
1679
- function lt(e, t) {
1680
- const n = st(e, t), r = e + n;
1681
- return (Math.floor(r / C) + 1) * C - n;
1959
+ function _t(e, t) {
1960
+ const n = Et(e, t), r = e + n;
1961
+ return (Math.floor(r / $) + 1) * $ - n;
1682
1962
  }
1683
- function Z(e, t, n) {
1963
+ function ce(e, t, n) {
1684
1964
  if (t <= e) return 0;
1685
1965
  if (!n) return t - e;
1686
- let r = 0, i = e;
1687
- for (let o = 0; o < at && i < t; o++) {
1688
- const a = ct(i, n);
1966
+ let r = 0, o = e;
1967
+ for (let i = 0; i < At && o < t; i++) {
1968
+ const a = St(o, n);
1689
1969
  if (a) {
1690
- const s = Math.max(i, a.open), c = Math.min(t, a.close);
1970
+ const s = Math.max(o, a.open), c = Math.min(t, a.close);
1691
1971
  c > s && (r += c - s);
1692
1972
  }
1693
- i = lt(i, n);
1973
+ o = _t(o, n);
1694
1974
  }
1695
1975
  return r;
1696
1976
  }
1697
- function ie(e, t, n) {
1977
+ function he(e, t, n) {
1698
1978
  if (!n) return e + t;
1699
- let r = t, i = e;
1700
- for (let o = 0; o < at; o++) {
1701
- const a = ct(i, n);
1979
+ let r = t, o = e;
1980
+ for (let i = 0; i < At; i++) {
1981
+ const a = St(o, n);
1702
1982
  if (a) {
1703
- const s = Math.max(i, a.open);
1983
+ const s = Math.max(o, a.open);
1704
1984
  if (a.close > s) {
1705
1985
  const c = a.close - s;
1706
1986
  if (r <= c) return s + r;
1707
1987
  r -= c;
1708
1988
  }
1709
1989
  }
1710
- i = lt(i, n);
1990
+ o = _t(o, n);
1711
1991
  }
1712
1992
  return e + t;
1713
1993
  }
1714
- function wa(e) {
1994
+ function ys(e) {
1715
1995
  const t = /^([01]\d|2[0-3]):([0-5]\d)$/.exec(e);
1716
1996
  return t ? Number(t[1]) * 60 + Number(t[2]) : null;
1717
1997
  }
1718
- const Q = 1, ee = 2;
1719
- function Ia(e) {
1720
- return e === "snoozed" ? Q : ee;
1998
+ const le = 1, ue = 2;
1999
+ function bs(e) {
2000
+ return e === "snoozed" ? le : ue;
1721
2001
  }
1722
- function oe(e) {
2002
+ function ye(e) {
1723
2003
  const t = e.calendar;
1724
2004
  return t && Array.isArray(t.days) ? t : null;
1725
2005
  }
1726
- const Ma = [
2006
+ const As = [
1727
2007
  "speed_of_answer",
1728
2008
  "first_response",
1729
2009
  "next_response",
1730
2010
  "resolution",
1731
2011
  "close"
1732
- ], ka = ["snoozed", "waiting_for_customer"], Vn = 6e4, ut = ["speed_of_answer", "first_response", "next_response"], zn = [...ut, "resolution", "close"];
1733
- function v(e) {
2012
+ ], Es = ["snoozed", "waiting_for_customer"], Mr = 6e4, Tt = ["speed_of_answer", "first_response", "next_response"], kr = [...Tt, "resolution", "close"];
2013
+ function L(e) {
1734
2014
  return e.state === "running" || e.state === "paused";
1735
2015
  }
1736
- function Xn(e, t) {
1737
- return v(e) ? { state: (e.state === "paused" ? e.remainingMs > 0 : t <= e.dueAt) ? "hit" : "missed", settledAt: Math.max(t, e.startedAt) } : null;
2016
+ function vr(e, t) {
2017
+ return L(e) ? { state: (e.state === "paused" ? e.remainingMs > 0 : t <= e.dueAt) ? "hit" : "missed", settledAt: Math.max(t, e.startedAt) } : null;
1738
2018
  }
1739
- function ve(e) {
1740
- return v(e) ? { state: "void" } : null;
1741
- }
1742
- function Yn(e, t, n, r) {
1743
- if (!v(e) || (e.pauseBits & t) !== 0) return null;
1744
- const i = e.pauseBits | t;
1745
- return e.state === "paused" ? { pauseBits: i } : { pauseBits: i, state: "paused", remainingMs: Z(n, e.dueAt, r) };
1746
- }
1747
- function qn(e, t, n, r) {
1748
- if (!v(e) || (e.pauseBits & t) === 0) return null;
1749
- const i = e.pauseBits & ~t;
1750
- return i !== 0 ? { pauseBits: i } : { pauseBits: i, state: "running", dueAt: ie(n, e.remainingMs, r) };
1751
- }
1752
- function Oa({ event: e, at: t, now: n, clocks: r, profile: i }) {
1753
- const o = oe(i), a = Math.min(t, n), s = r.map((p) => ({ ...p })), c = [], m = (p, f) => {
1754
- f && (c.push({ op: "patch", clockId: p.id, patch: f }), Object.assign(p, f));
1755
- }, h = (p) => {
1756
- for (const f of s)
1757
- f.metric === p && m(f, Xn(f, a));
1758
- }, y = (p) => {
1759
- for (const f of s)
1760
- p.includes(f.metric) && m(f, ve(f));
1761
- }, T = (p) => {
1762
- for (const f of s) m(f, Yn(f, p, a, o));
1763
- }, M = (p) => {
1764
- for (const f of s) m(f, qn(f, p, a, o));
1765
- }, B = (p) => s.reduce((f, S) => S.metric === p ? Math.max(f, S.attempt) : f, 0) + 1, N = (p) => s.some((f) => f.metric === p && v(f)), x = (p, f) => {
1766
- const S = i.targets.find((St) => St.metric === p);
1767
- if (!S) return;
1768
- const ue = S.minutes * Vn;
2019
+ function je(e) {
2020
+ return L(e) ? { state: "void" } : null;
2021
+ }
2022
+ function Or(e, t, n, r) {
2023
+ if (!L(e) || (e.pauseBits & t) !== 0) return null;
2024
+ const o = e.pauseBits | t;
2025
+ return e.state === "paused" ? { pauseBits: o } : { pauseBits: o, state: "paused", remainingMs: ce(n, e.dueAt, r) };
2026
+ }
2027
+ function Cr(e, t, n, r) {
2028
+ if (!L(e) || (e.pauseBits & t) === 0) return null;
2029
+ const o = e.pauseBits & ~t;
2030
+ return o !== 0 ? { pauseBits: o } : { pauseBits: o, state: "running", dueAt: he(n, e.remainingMs, r) };
2031
+ }
2032
+ function Ss({ event: e, at: t, now: n, clocks: r, profile: o }) {
2033
+ const i = ye(o), a = Math.min(t, n), s = r.map((u) => ({ ...u })), c = [], l = (u, p) => {
2034
+ p && (c.push({ op: "patch", clockId: u.id, patch: p }), Object.assign(u, p));
2035
+ }, d = (u) => {
2036
+ for (const p of s)
2037
+ p.metric === u && l(p, vr(p, a));
2038
+ }, h = (u) => {
2039
+ for (const p of s)
2040
+ u.includes(p.metric) && l(p, je(p));
2041
+ }, A = (u) => {
2042
+ for (const p of s) l(p, Or(p, u, a, i));
2043
+ }, E = (u) => {
2044
+ for (const p of s) l(p, Cr(p, u, a, i));
2045
+ }, M = (u) => s.reduce((p, w) => w.metric === u ? Math.max(p, w.attempt) : p, 0) + 1, y = (u) => s.some((p) => p.metric === u && L(p)), T = (u, p) => {
2046
+ const w = o.targets.find((P) => P.metric === u);
2047
+ if (!w) return;
2048
+ const N = w.minutes * Mr;
1769
2049
  c.push({
1770
2050
  op: "start",
1771
- metric: p,
1772
- attempt: B(p),
1773
- startedAt: f,
1774
- targetMs: ue,
1775
- dueAt: ie(f, ue, o)
2051
+ metric: u,
2052
+ attempt: M(u),
2053
+ startedAt: p,
2054
+ targetMs: N,
2055
+ dueAt: he(p, N, i)
1776
2056
  });
1777
2057
  };
1778
2058
  switch (e) {
1779
2059
  case "apply": {
1780
- for (const p of s)
1781
- p.profileId !== i.id && m(p, ve(p));
1782
- for (const p of i.targets) {
1783
- if (p.metric === "next_response") continue;
2060
+ for (const u of s)
2061
+ u.profileId !== o.id && l(u, je(u));
2062
+ for (const u of o.targets) {
2063
+ if (u.metric === "next_response") continue;
1784
2064
  s.some(
1785
- (S) => S.metric === p.metric && S.profileId === i.id
1786
- ) || x(p.metric, a);
2065
+ (w) => w.metric === u.metric && w.profileId === o.id
2066
+ ) || T(u.metric, a);
1787
2067
  }
1788
2068
  break;
1789
2069
  }
1790
2070
  case "answered":
1791
- h("speed_of_answer");
2071
+ d("speed_of_answer");
1792
2072
  break;
1793
2073
  case "outbound": {
1794
- h("first_response"), h("next_response"), i.pauseOn.includes("waiting_for_customer") && T(ee);
2074
+ d("first_response"), d("next_response"), o.pauseOn.includes("waiting_for_customer") && A(ue);
1795
2075
  break;
1796
2076
  }
1797
2077
  case "inbound": {
1798
- M(ee), !N("first_response") && !N("next_response") && x("next_response", a);
2078
+ E(ue), !y("first_response") && !y("next_response") && T("next_response", a);
1799
2079
  break;
1800
2080
  }
1801
2081
  case "resolved":
1802
- h("resolution");
2082
+ d("resolution");
1803
2083
  break;
1804
2084
  case "closed":
1805
- h("close"), h("resolution"), y(ut);
2085
+ d("close"), d("resolution"), h(Tt);
1806
2086
  break;
1807
2087
  case "reopened":
1808
- N("resolution") || x("resolution", a), N("close") || x("close", a);
2088
+ y("resolution") || T("resolution", a), y("close") || T("close", a);
1809
2089
  break;
1810
2090
  case "snoozed":
1811
- i.pauseOn.includes("snoozed") && T(Q);
2091
+ o.pauseOn.includes("snoozed") && A(le);
1812
2092
  break;
1813
2093
  case "unsnoozed":
1814
- M(Q);
2094
+ E(le);
1815
2095
  break;
1816
2096
  case "discarded":
1817
- y(zn);
2097
+ h(kr);
1818
2098
  break;
1819
2099
  }
1820
2100
  return c;
1821
2101
  }
1822
- function Jn(e) {
2102
+ function Nr(e) {
1823
2103
  return e.state === "running" || e.state === "paused";
1824
2104
  }
1825
- function te(e, t) {
1826
- const n = oe(e);
1827
- return e.state === "paused" ? e.remainingMs : t >= e.dueAt ? -Z(e.dueAt, t, n) : Z(t, e.dueAt, n);
2105
+ function de(e, t) {
2106
+ const n = ye(e);
2107
+ return e.state === "paused" ? e.remainingMs : t >= e.dueAt ? -ce(e.dueAt, t, n) : ce(t, e.dueAt, n);
1828
2108
  }
1829
- function Ca(e, t) {
1830
- return e.state === "paused" ? ie(t, e.remainingMs, oe(e)) : e.dueAt;
2109
+ function _s(e, t) {
2110
+ return e.state === "paused" ? he(t, e.remainingMs, ye(e)) : e.dueAt;
1831
2111
  }
1832
- function va(e, t) {
1833
- const n = e.filter(Jn);
2112
+ function Ts(e, t) {
2113
+ const n = e.filter(Nr);
1834
2114
  if (!n.length) return;
1835
- const r = n.filter((o) => o.state === "running");
2115
+ const r = n.filter((i) => i.state === "running");
1836
2116
  return (r.length ? r : n).reduce(
1837
- (o, a) => te(a, t) < te(o, t) ? a : o
2117
+ (i, a) => de(a, t) < de(i, t) ? a : i
1838
2118
  );
1839
2119
  }
1840
- function Na(e, t) {
2120
+ function ws(e, t) {
1841
2121
  if (e.state === "missed") return "breached";
1842
2122
  if (e.state === "hit") return "met";
1843
2123
  if (e.state === "paused") return "paused";
1844
2124
  if (e.state === "void") return "met";
1845
- const n = te(e, t);
2125
+ const n = de(e, t);
1846
2126
  return n <= 0 ? "breached" : n <= e.targetMs / 5 ? "urgent" : "running";
1847
2127
  }
1848
- function xa(e) {
1849
- const t = Math.floor(Math.abs(e) / 1e3), n = Math.floor(t / 86400), r = Math.floor(t % 86400 / 3600), i = Math.floor(t % 3600 / 60);
1850
- return n ? r ? `${n}d ${r}u` : `${n}d` : r ? i ? `${r}u ${i}m` : `${r}u` : i ? `${i}m` : `${t % 60}s`;
2128
+ function Is(e) {
2129
+ 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);
2130
+ return n ? r ? `${n}d ${r}u` : `${n}d` : r ? o ? `${r}u ${o}m` : `${r}u` : o ? `${o}m` : `${t % 60}s`;
1851
2131
  }
1852
- const Zn = "strategy_item";
1853
- function dt(e) {
1854
- return `${Zn}:${e}`;
2132
+ const Rr = "strategy_item";
2133
+ function wt(e) {
2134
+ return `${Rr}:${e}`;
1855
2135
  }
1856
- function Ra(e, t = 25) {
1857
- const n = /* @__PURE__ */ new Set([dt(e.id)]);
2136
+ function Ms(e, t = 25) {
2137
+ const n = /* @__PURE__ */ new Set([wt(e.id)]);
1858
2138
  for (const r of e.ancestorKeys ?? []) n.add(r);
1859
2139
  return Array.from(n).slice(0, t);
1860
2140
  }
1861
- function Da(e) {
1862
- return e ? [...e.ancestorKeys ?? [], dt(e.id)] : [];
2141
+ function ks(e) {
2142
+ return e ? [...e.ancestorKeys ?? [], wt(e.id)] : [];
1863
2143
  }
1864
- const ae = [
2144
+ const z = [
1865
2145
  { key: "area", label: "level_area", order: 10, measurable: !1, icon: "compass" },
1866
2146
  { key: "objective", label: "level_objective", order: 20, measurable: !0, icon: "target" },
1867
2147
  { key: "key_result", label: "level_key_result", order: 30, measurable: !0, icon: "gauge" }
1868
- ], Qn = 999, er = 7;
1869
- function tr(e, t = ae) {
2148
+ ], xr = 999, Dr = 7;
2149
+ function $r(e, t = z) {
1870
2150
  return t.find((n) => n.key === e);
1871
2151
  }
1872
- function Ne(e, t = ae) {
1873
- return tr(e, t)?.order ?? Qn;
2152
+ function pe(e, t = z) {
2153
+ return $r(e, t)?.order ?? xr;
1874
2154
  }
1875
- function $a(e, t, n = ae) {
1876
- return Ne(t, n) <= Ne(e, n);
2155
+ function vs(e, t, n = z) {
2156
+ return pe(t, n) <= pe(e, n);
1877
2157
  }
1878
- function La(e) {
2158
+ function Os(e, t = z) {
2159
+ const n = pe(e, t);
2160
+ return t.filter((o) => o.order > n).sort((o, i) => o.order - i.order)[0]?.key ?? e;
2161
+ }
2162
+ function Cs(e) {
1879
2163
  const t = e.trim().toLowerCase();
1880
2164
  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;
1881
2165
  }
1882
- const ne = {
2166
+ const fe = {
1883
2167
  pending: "open",
1884
2168
  on_track: "open",
1885
2169
  at_risk: "open",
@@ -1888,155 +2172,157 @@ const ne = {
1888
2172
  achieved: "closed",
1889
2173
  missed: "closed"
1890
2174
  };
1891
- function Pa(e) {
1892
- return ne[e] ?? "open";
2175
+ function Ns(e) {
2176
+ return fe[e] ?? "open";
1893
2177
  }
1894
- function Ua(e) {
1895
- return Object.keys(ne).filter(
1896
- (t) => e.includes(ne[t])
2178
+ function Rs(e) {
2179
+ return Object.keys(fe).filter(
2180
+ (t) => e.includes(fe[t])
1897
2181
  );
1898
2182
  }
1899
- const nr = 864e5, F = (e) => e <= 0 ? 0 : e > 1 ? 1 : e;
1900
- function Ka(e, t) {
1901
- const { direction: n } = e, r = e.startValue ?? 0, i = e.targetValue ?? 0;
1902
- return Number.isFinite(t) ? i === r ? (n === "down" ? t <= i : t >= i) ? 1 : 0 : F((t - r) / (i - r)) : 0;
2183
+ const Lr = 864e5, X = (e) => e <= 0 ? 0 : e > 1 ? 1 : e;
2184
+ function xs(e, t) {
2185
+ const { direction: n } = e, r = e.startValue ?? 0, o = e.targetValue ?? 0;
2186
+ if (!Number.isFinite(t)) return 0;
2187
+ const i = n === "down" ? t <= o : t >= o, a = o - r;
2188
+ return (n === "down" ? a < 0 : a > 0) ? X((t - r) / a) : i ? 1 : 0;
1903
2189
  }
1904
- function Fa(e, t) {
2190
+ function Ds(e, t) {
1905
2191
  const { startDate: n, targetDate: r } = e;
1906
2192
  if (!(typeof n != "number" || typeof r != "number") && !(r <= n))
1907
- return F((t - n) / (r - n));
2193
+ return X((t - n) / (r - n));
1908
2194
  }
1909
- const rr = 0.1, ir = 0.25;
1910
- function Ba(e, t) {
2195
+ const Pr = 0.1, Ur = 0.25;
2196
+ function $s(e, t) {
1911
2197
  if (typeof e != "number" || typeof t != "number") return;
1912
2198
  if (e >= 1) return "achieved";
1913
2199
  const n = t - e;
1914
- return n >= ir ? "off_track" : n >= rr ? "at_risk" : "on_track";
2200
+ return n >= Ur ? "off_track" : n >= Pr ? "at_risk" : "on_track";
1915
2201
  }
1916
- function ja(e, t) {
2202
+ function Ls(e, t) {
1917
2203
  if (t)
1918
- return F(e / t);
2204
+ return X(e / t);
1919
2205
  }
1920
- function Ha(e) {
2206
+ function Ps(e) {
1921
2207
  const t = e.map((n) => n.progress?.ratio).filter((n) => typeof n == "number" && Number.isFinite(n));
1922
2208
  if (t.length)
1923
- return F(t.reduce((n, r) => n + r, 0) / t.length);
2209
+ return X(t.reduce((n, r) => n + r, 0) / t.length);
1924
2210
  }
1925
- function Ga(e, t) {
2211
+ function Us(e, t) {
1926
2212
  const n = e.lastCheckInAt ?? e.createdAt;
1927
2213
  if (typeof n != "number") return 0;
1928
- const r = (e.checkInEveryDays ?? er) * nr, i = t - n - r;
1929
- return i > 0 ? i : 0;
2214
+ const r = (e.checkInEveryDays ?? Dr) * Lr, o = t - n - r;
2215
+ return o > 0 ? o : 0;
1930
2216
  }
1931
- function Wa(e) {
2217
+ function Ks(e) {
1932
2218
  return e.targetDate ?? Number.MAX_SAFE_INTEGER;
1933
2219
  }
1934
- function Va(e, t) {
2220
+ function Fs(e, t) {
1935
2221
  const n = e.accumulatedSeconds || 0;
1936
2222
  return e.runningSince ? n + Math.max(0, Math.floor((t - e.runningSince) / 1e3)) : n;
1937
2223
  }
1938
- function za(e, t) {
2224
+ function Hs(e, t) {
1939
2225
  const n = Math.max(1, Math.ceil(Math.max(0, e) / 60));
1940
2226
  if (!t || t === "exact") return n * 60;
1941
2227
  const r = Number(t);
1942
2228
  return !Number.isFinite(r) || r <= 0 ? n * 60 : Math.ceil(n / r) * r * 60;
1943
2229
  }
1944
- function Xa(e) {
2230
+ function Bs(e) {
1945
2231
  const t = Math.max(0, Math.round(e / 60));
1946
2232
  return `${Math.floor(t / 60)}:${String(t % 60).padStart(2, "0")}`;
1947
2233
  }
1948
- function Ya(e) {
1949
- const t = Math.max(0, Math.floor(e)), n = (o) => String(o).padStart(2, "0"), r = Math.floor(t / 60) % 60, i = Math.floor(t / 3600);
1950
- return i > 0 ? `${i}:${n(r)}:${n(t % 60)}` : `${n(r)}:${n(t % 60)}`;
2234
+ function js(e) {
2235
+ 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);
2236
+ return o > 0 ? `${o}:${n(r)}:${n(t % 60)}` : `${n(r)}:${n(t % 60)}`;
1951
2237
  }
1952
- function or(e) {
2238
+ function Kr(e) {
1953
2239
  return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").slice(0, 48).replace(/^-+|-+$/g, "");
1954
2240
  }
1955
- function qa(e, t) {
1956
- const n = or(e) || "werksoort", r = new Set(t);
2241
+ function Gs(e, t) {
2242
+ const n = Kr(e) || "werksoort", r = new Set(t);
1957
2243
  if (!r.has(n)) return n;
1958
- for (let i = 2; i < 500; i++) {
1959
- const o = `${n}-${i}`;
1960
- if (!r.has(o)) return o;
2244
+ for (let o = 2; o < 500; o++) {
2245
+ const i = `${n}-${o}`;
2246
+ if (!r.has(i)) return i;
1961
2247
  }
1962
2248
  return `${n}-${r.size + 1}`;
1963
2249
  }
1964
- function Ja(e, t) {
2250
+ function Ws(e, t) {
1965
2251
  const n = e.ownerScope;
1966
2252
  return !n || n.kind === "org" ? !0 : t.includes(n.teamId);
1967
2253
  }
1968
- function Za(e) {
1969
- return e.filter((t) => !t.archived).sort(ar);
2254
+ function Vs(e) {
2255
+ return e.filter((t) => !t.archived).sort(Fr);
1970
2256
  }
1971
- function ar(e, t) {
2257
+ function Fr(e, t) {
1972
2258
  const n = (e.order ?? 0) - (t.order ?? 0);
1973
2259
  return n !== 0 ? n : (e.label || "").localeCompare(t.label || "");
1974
2260
  }
1975
- const sr = 20, cr = 20, V = 300;
1976
- function I(e) {
2261
+ const Hr = 20, Br = 20, te = 300;
2262
+ function O(e) {
1977
2263
  return e.toLowerCase().replace(/[^\p{L}\p{N}\s]/gu, " ").replace(/\s+/g, " ").trim();
1978
2264
  }
1979
- function lr(e) {
2265
+ function jr(e) {
1980
2266
  const t = e.replace(/\s+/g, " ").trim();
1981
- if (t.length <= V) return t;
1982
- const n = t.slice(0, V), r = Math.max(n.lastIndexOf(". "), n.lastIndexOf("! "), n.lastIndexOf("? "));
1983
- return r > V * 0.6 ? n.slice(0, r + 1) : `${n.trimEnd()}…`;
1984
- }
1985
- function Qa(e, t) {
1986
- const n = lr(t.text), r = I(n);
1987
- if (!r || (e.examples ?? []).some((a) => I(a) === r)) return null;
1988
- const i = e.exampleCandidates ?? [], o = i.findIndex((a) => I(a.text) === r);
1989
- if (o >= 0) {
1990
- if (i[o].corrected || !t.corrected) return null;
1991
- const a = [...i];
1992
- return a[o] = { ...a[o], corrected: !0, addedAt: t.addedAt }, xe(a);
2267
+ if (t.length <= te) return t;
2268
+ const n = t.slice(0, te), r = Math.max(n.lastIndexOf(". "), n.lastIndexOf("! "), n.lastIndexOf("? "));
2269
+ return r > te * 0.6 ? n.slice(0, r + 1) : `${n.trimEnd()}…`;
2270
+ }
2271
+ function zs(e, t) {
2272
+ const n = jr(t.text), r = O(n);
2273
+ if (!r || (e.examples ?? []).some((a) => O(a) === r)) return null;
2274
+ const o = e.exampleCandidates ?? [], i = o.findIndex((a) => O(a.text) === r);
2275
+ if (i >= 0) {
2276
+ if (o[i].corrected || !t.corrected) return null;
2277
+ const a = [...o];
2278
+ return a[i] = { ...a[i], corrected: !0, addedAt: t.addedAt }, Ge(a);
1993
2279
  }
1994
- return xe([{ ...t, text: n }, ...i]).slice(0, cr);
2280
+ return Ge([{ ...t, text: n }, ...o]).slice(0, Br);
1995
2281
  }
1996
- function xe(e) {
2282
+ function Ge(e) {
1997
2283
  return [...e].sort(
1998
2284
  (t, n) => Number(n.corrected) - Number(t.corrected) || n.addedAt - t.addedAt
1999
2285
  );
2000
2286
  }
2001
- function es(e, t) {
2002
- const n = I(t), r = (e.examples ?? []).filter((o) => o.trim());
2003
- return { examples: r.some((o) => I(o) === n) ? r : [...r, t].slice(-sr), exampleCandidates: ur(e, t) };
2287
+ function Xs(e, t) {
2288
+ const n = O(t), r = (e.examples ?? []).filter((i) => i.trim());
2289
+ return { examples: r.some((i) => O(i) === n) ? r : [...r, t].slice(-Hr), exampleCandidates: Gr(e, t) };
2004
2290
  }
2005
- function ur(e, t) {
2006
- const n = I(t);
2007
- return (e.exampleCandidates ?? []).filter((r) => I(r.text) !== n);
2291
+ function Gr(e, t) {
2292
+ const n = O(t);
2293
+ return (e.exampleCandidates ?? []).filter((r) => O(r.text) !== n);
2008
2294
  }
2009
- function dr(e, t) {
2295
+ function Wr(e, t) {
2010
2296
  const n = e.ownerScope;
2011
2297
  return n ? n.kind === "org" ? !0 : n.kind === "team" ? !!t && n.teamId === t : !1 : !1;
2012
2298
  }
2013
- function ts(e, t) {
2014
- return e.filter((n) => dr(n, t));
2299
+ function Ys(e, t) {
2300
+ return e.filter((n) => Wr(n, t));
2015
2301
  }
2016
- function ns(e) {
2302
+ function qs(e) {
2017
2303
  return e.type === "agent";
2018
2304
  }
2019
- const rs = "WORK_COMMENT_ADDED", is = "WORK_ITEM_ASSIGNED", os = "WORK_ITEM_STATUS_CHANGED";
2020
- function pr(e, t) {
2305
+ const Js = "WORK_COMMENT_ADDED", Zs = "WORK_ITEM_ASSIGNED", Qs = "WORK_ITEM_STATUS_CHANGED";
2306
+ function Vr(e, t) {
2021
2307
  const n = (r) => {
2022
- const i = new Date(r);
2023
- return i.setHours(0, 0, 0, 0), i.getTime();
2308
+ const o = new Date(r);
2309
+ return o.setHours(0, 0, 0, 0), o.getTime();
2024
2310
  };
2025
- return Math.round((n(e) - n(t)) / nn);
2311
+ return Math.round((n(e) - n(t)) / mn);
2026
2312
  }
2027
- function as(e, t) {
2028
- if (e.closedAt != null) return { score: w, reasons: [] };
2313
+ function ec(e, t) {
2314
+ if (e.closedAt != null) return { score: v, reasons: [] };
2029
2315
  const n = t.remindersById?.[e.id];
2030
- if (n && n.remindAt > t.now) return { score: w, reasons: [] };
2316
+ if (n && n.remindAt > t.now) return { score: v, reasons: [] };
2031
2317
  let r = 0;
2032
- const i = [], o = e.priority ?? "normal";
2033
- if (P[o] > 0 && (r += P[o], i.push(`priority:${o}`)), typeof e.dueDate == "number") {
2034
- const a = pr(e.dueDate, t.now);
2035
- a < 0 ? (r += 35, i.push("overdue")) : a === 0 && (r += 20, i.push("due-today"));
2318
+ const o = [], i = e.priority ?? "normal";
2319
+ if (j[i] > 0 && (r += j[i], o.push(`priority:${i}`)), typeof e.dueDate == "number") {
2320
+ const a = Vr(e.dueDate, t.now);
2321
+ a < 0 ? (r += 35, o.push("overdue")) : a === 0 && (r += 20, o.push("due-today"));
2036
2322
  }
2037
- return e.source?.initiator === "system" && e.source.systemReason && (r += 15, i.push(`auto:${e.source.systemReason}`)), { score: r, reasons: i };
2323
+ return e.source?.initiator === "system" && e.source.systemReason && (r += 15, o.push(`auto:${e.source.systemReason}`)), { score: r, reasons: o };
2038
2324
  }
2039
- const se = [
2325
+ const be = [
2040
2326
  { key: "task", label: "type_task" },
2041
2327
  { key: "bug", label: "type_bug" },
2042
2328
  { key: "story", label: "type_story" },
@@ -2044,35 +2330,35 @@ const se = [
2044
2330
  { key: "subtask", label: "type_subtask" },
2045
2331
  { key: "case", label: "type_case" },
2046
2332
  { key: "deal", label: "type_deal" }
2047
- ], ss = se.map((e) => e.key);
2048
- function cs(e) {
2049
- return e?.types?.length ? e.types : se;
2333
+ ], tc = be.map((e) => e.key);
2334
+ function nc(e) {
2335
+ return e?.types?.length ? e.types : be;
2050
2336
  }
2051
- function ls(e, t) {
2337
+ function rc(e, t) {
2052
2338
  return t.find((n) => n.key === e);
2053
2339
  }
2054
- function us(e) {
2340
+ function oc(e) {
2055
2341
  const t = e.trim().toLowerCase();
2056
2342
  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;
2057
2343
  }
2058
- function ds(...e) {
2059
- return e.map((t) => se.find((n) => n.key === t)).filter((t) => !!t);
2344
+ function ic(...e) {
2345
+ return e.map((t) => be.find((n) => n.key === t)).filter((t) => !!t);
2060
2346
  }
2061
- const fr = "work_item", mr = "work_project", gr = "work_activity", ps = "work_cycle";
2062
- function hr(e) {
2063
- return `${fr}:${e}`;
2347
+ const zr = "work_item", Xr = "work_project", Yr = "work_activity", ac = "work_cycle";
2348
+ function qr(e) {
2349
+ return `${zr}:${e}`;
2064
2350
  }
2065
- function pt(e) {
2066
- return `${mr}:${e}`;
2351
+ function It(e) {
2352
+ return `${Xr}:${e}`;
2067
2353
  }
2068
- function fs(e) {
2069
- return `${gr}:${e}`;
2354
+ function sc(e) {
2355
+ return `${Yr}:${e}`;
2070
2356
  }
2071
- function ms(e, t, n) {
2357
+ function cc(e, t, n) {
2072
2358
  const r = `${e}-${t}`;
2073
2359
  return n ? `${r}-${n}` : r;
2074
2360
  }
2075
- function gs(e) {
2361
+ function lc(e) {
2076
2362
  const t = /^([A-Za-z0-9]{2,8})-(\d+)(?:-(\d+))?$/.exec((e || "").trim());
2077
2363
  return t ? {
2078
2364
  projectKey: t[1].toUpperCase(),
@@ -2080,78 +2366,78 @@ function gs(e) {
2080
2366
  ...t[3] ? { subSequence: Number(t[3]) } : {}
2081
2367
  } : null;
2082
2368
  }
2083
- function hs(e) {
2369
+ function uc(e) {
2084
2370
  return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toUpperCase().replace(/[^A-Z0-9]/g, "").slice(0, 3) || "PRJ";
2085
2371
  }
2086
- function ys(e, t = 25) {
2087
- const n = /* @__PURE__ */ new Set([hr(e.id)]);
2088
- e.projectId && n.add(pt(e.projectId));
2372
+ function dc(e, t = 25) {
2373
+ const n = /* @__PURE__ */ new Set([qr(e.id)]);
2374
+ e.projectId && n.add(It(e.projectId));
2089
2375
  for (const r of e.ancestorKeys ?? []) n.add(r);
2090
2376
  for (const r of e.partyKeys ?? []) n.add(r);
2091
2377
  return Array.from(n).slice(0, t);
2092
2378
  }
2093
- function bs(e) {
2094
- return [pt(e.id)];
2379
+ function pc(e) {
2380
+ return [It(e.id)];
2095
2381
  }
2096
- const ce = [
2382
+ const Ae = [
2097
2383
  { key: "open", label: "status_open", category: "todo", order: 0 },
2098
2384
  { key: "in_progress", label: "status_in_progress", category: "in_progress", order: 1 },
2099
2385
  { key: "done", label: "status_done", category: "done", order: 2 },
2100
2386
  { key: "cancelled", label: "status_cancelled", category: "done", order: 3 }
2101
- ], ft = ce.map((e) => e.key);
2102
- function yr(e) {
2103
- return e?.statuses?.length ? e.statuses : ce;
2387
+ ], Mt = Ae.map((e) => e.key);
2388
+ function Jr(e) {
2389
+ return e?.statuses?.length ? e.statuses : Ae;
2104
2390
  }
2105
- function br(e, t) {
2391
+ function Zr(e, t) {
2106
2392
  return t.find((n) => n.key === e)?.category ?? "todo";
2107
2393
  }
2108
- function As(e, t) {
2394
+ function fc(e, t) {
2109
2395
  return t.find((n) => n.key === e);
2110
2396
  }
2111
- function Es(e) {
2112
- const t = yr(e), n = e?.defaultStatusKey;
2113
- return n && t.some((r) => r.key === n) ? n : Ar(t)[0]?.key ?? ce[0].key;
2397
+ function mc(e) {
2398
+ const t = Jr(e), n = e?.defaultStatusKey;
2399
+ return n && t.some((r) => r.key === n) ? n : Qr(t)[0]?.key ?? Ae[0].key;
2114
2400
  }
2115
- function Ar(e) {
2401
+ function Qr(e) {
2116
2402
  return [...e].sort((t, n) => {
2117
2403
  const r = (t.order ?? 0) - (n.order ?? 0);
2118
2404
  return r !== 0 ? r : (t.label || "").localeCompare(n.label || "");
2119
2405
  });
2120
2406
  }
2121
- function Ss(e, t) {
2122
- return br(e, t) === "done";
2407
+ function gc(e, t) {
2408
+ return Zr(e, t) === "done";
2123
2409
  }
2124
- function Er(e) {
2410
+ function eo(e) {
2125
2411
  return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").slice(0, 48).replace(/^-+|-+$/g, "");
2126
2412
  }
2127
- function _s(e, t) {
2128
- const n = Er(e) || "status", r = /* @__PURE__ */ new Set([...t, ...ft]);
2413
+ function hc(e, t) {
2414
+ const n = eo(e) || "status", r = /* @__PURE__ */ new Set([...t, ...Mt]);
2129
2415
  if (!r.has(n)) return n;
2130
- for (let i = 2; i < 500; i++) {
2131
- const o = `${n}-${i}`;
2132
- if (!r.has(o)) return o;
2416
+ for (let o = 2; o < 500; o++) {
2417
+ const i = `${n}-${o}`;
2418
+ if (!r.has(i)) return i;
2133
2419
  }
2134
2420
  return `${n}-${r.size + 1}`;
2135
2421
  }
2136
- function Ts(e) {
2422
+ function yc(e) {
2137
2423
  const t = [];
2138
2424
  if (!e.length) return [{ index: -1, reason: "empty" }];
2139
2425
  const n = /* @__PURE__ */ new Set();
2140
- return e.forEach((r, i) => {
2426
+ return e.forEach((r, o) => {
2141
2427
  if (!r.key) {
2142
- t.push({ index: i, reason: "missing_key" });
2428
+ t.push({ index: o, reason: "missing_key" });
2143
2429
  return;
2144
2430
  }
2145
- ft.includes(r.key) && t.push({ index: i, reason: "reserved_key", key: r.key }), n.has(r.key) && t.push({ index: i, reason: "duplicate_key", key: r.key }), n.add(r.key);
2431
+ Mt.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);
2146
2432
  }), 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;
2147
2433
  }
2148
- function ws(e) {
2434
+ function bc(e) {
2149
2435
  return e.startDate ?? Number.MAX_SAFE_INTEGER;
2150
2436
  }
2151
- function Is(e) {
2437
+ function Ac(e) {
2152
2438
  return e.completedAt ? "completed" : e.startedAt ? "active" : "planned";
2153
2439
  }
2154
- const Sr = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "image/gif", "image/webp"]), _r = /* @__PURE__ */ new Set([
2440
+ const to = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "image/gif", "image/webp"]), no = /* @__PURE__ */ new Set([
2155
2441
  "text/plain",
2156
2442
  "text/markdown",
2157
2443
  "text/csv",
@@ -2160,115 +2446,115 @@ const Sr = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "ima
2160
2446
  "application/xml",
2161
2447
  "text/xml"
2162
2448
  ]);
2163
- function Tr(e) {
2449
+ function ro(e) {
2164
2450
  const t = (e ?? "").trim().toLowerCase().split(";")[0];
2165
- return t ? Sr.has(t) ? "image" : t === "application/pdf" ? "pdf" : _r.has(t) ? "text" : t.startsWith("audio/") ? "audio" : "unsupported" : "unsupported";
2166
- }
2167
- const k = 1024 * 1024, wr = {
2168
- image: 5 * k,
2169
- pdf: 20 * k,
2170
- text: 1 * k,
2171
- audio: 20 * k
2172
- }, Ms = 25 * k, ks = 5;
2173
- function Os(e, t) {
2174
- const n = Tr(e);
2175
- return n === "unsupported" ? "unsupported" : t > wr[n] ? "too-large" : null;
2451
+ return t ? to.has(t) ? "image" : t === "application/pdf" ? "pdf" : no.has(t) ? "text" : t.startsWith("audio/") ? "audio" : "unsupported" : "unsupported";
2452
+ }
2453
+ const x = 1024 * 1024, oo = {
2454
+ image: 5 * x,
2455
+ pdf: 20 * x,
2456
+ text: 1 * x,
2457
+ audio: 20 * x
2458
+ }, Ec = 25 * x, Sc = 5;
2459
+ function _c(e, t) {
2460
+ const n = ro(e);
2461
+ return n === "unsupported" ? "unsupported" : t > oo[n] ? "too-large" : null;
2176
2462
  }
2177
- function Cs(e) {
2463
+ function Tc(e) {
2178
2464
  return e.access !== "read" && e.effect !== "internal";
2179
2465
  }
2180
- function Ir(e) {
2466
+ function io(e) {
2181
2467
  return `${e.kind}:${e.id || e.url || e.title}`;
2182
2468
  }
2183
- function vs(e, t = []) {
2184
- const n = new Set(t), r = [], i = [];
2185
- for (const o of e) {
2186
- const a = Ir(o);
2187
- n.has(a) || (n.add(a), r.push(o), i.push(a));
2469
+ function wc(e, t = []) {
2470
+ const n = new Set(t), r = [], o = [];
2471
+ for (const i of e) {
2472
+ const a = io(i);
2473
+ n.has(a) || (n.add(a), r.push(i), o.push(a));
2188
2474
  }
2189
- return { sources: r, keys: i };
2475
+ return { sources: r, keys: o };
2190
2476
  }
2191
- const Ns = "assist-source", xs = ["blocking", "due", "open"];
2192
- function Rs(e, t) {
2477
+ const Ic = "assist-source", Mc = ["blocking", "due", "open"];
2478
+ function kc(e, t) {
2193
2479
  const [n, r] = (e.subjectKey ?? "").split(":");
2194
2480
  return n === t && r ? r : void 0;
2195
2481
  }
2196
- const Re = { blocking: 0, due: 1, open: 2 };
2197
- function Ds(e, t) {
2198
- return Re[e.band ?? "open"] - Re[t.band ?? "open"] || (t.priority ?? 0) - (e.priority ?? 0) || e.id.localeCompare(t.id);
2482
+ const We = { blocking: 0, due: 1, open: 2 };
2483
+ function vc(e, t) {
2484
+ return We[e.band ?? "open"] - We[t.band ?? "open"] || (t.priority ?? 0) - (e.priority ?? 0) || e.id.localeCompare(t.id);
2199
2485
  }
2200
- function $s(e) {
2486
+ function Oc(e) {
2201
2487
  return e.sessions.filter(
2202
2488
  (t) => t.id !== e.exceptSessionId && t.state === "connected" && e.canHold(t.providerId)
2203
2489
  );
2204
2490
  }
2205
- function Ls(e) {
2491
+ function Cc(e) {
2206
2492
  return e.sessions.filter(
2207
2493
  (t) => t.id !== e.exceptSessionId && t.state === "connected" && !e.canHold(t.providerId)
2208
2494
  );
2209
2495
  }
2210
- function Ps(e) {
2496
+ function Nc(e) {
2211
2497
  return e.sessions.some(
2212
2498
  (n) => n.id !== e.exceptSessionId && (n.state === "connected" || n.state === "on_hold")
2213
2499
  ) ? { admit: !1, reason: "busy" } : { admit: !0 };
2214
2500
  }
2215
- function Mr(e, t) {
2216
- const n = new Set(e.disabledIntents ?? []), r = e.intentOverrides ?? {}, i = t.intents.filter((a) => !n.has(a.intent)).map((a) => Or(a, r[a.intent]));
2217
- if (!e.extraIntents || e.extraIntents.length === 0) return i;
2218
- const o = new Set(i.map((a) => a.intent));
2501
+ function ao(e, t) {
2502
+ const n = new Set(e.disabledIntents ?? []), r = e.intentOverrides ?? {}, o = t.intents.filter((a) => !n.has(a.intent)).map((a) => co(a, r[a.intent]));
2503
+ if (!e.extraIntents || e.extraIntents.length === 0) return o;
2504
+ const i = new Set(o.map((a) => a.intent));
2219
2505
  for (const a of e.extraIntents)
2220
- o.has(a.intent) || (i.push(a), o.add(a.intent));
2221
- return i;
2506
+ i.has(a.intent) || (o.push(a), i.add(a.intent));
2507
+ return o;
2222
2508
  }
2223
- function kr(e, t) {
2509
+ function so(e, t) {
2224
2510
  const n = {};
2225
2511
  for (const r of e.intents) {
2226
2512
  if (!r.togglable) continue;
2227
- const i = t?.[r.intent];
2228
- n[r.intent] = i ?? r.defaultEnabled ?? !0;
2513
+ const o = t?.[r.intent];
2514
+ n[r.intent] = o ?? r.defaultEnabled ?? !0;
2229
2515
  }
2230
2516
  return n;
2231
2517
  }
2232
- function Us(e, t) {
2233
- const n = kr(e, t);
2518
+ function Rc(e, t) {
2519
+ const n = so(e, t);
2234
2520
  return Object.entries(n).filter(([, r]) => !r).map(([r]) => r);
2235
2521
  }
2236
- function Or(e, t) {
2522
+ function co(e, t) {
2237
2523
  return t ? {
2238
2524
  intent: t.intent ?? e.intent,
2239
2525
  targetSchemes: t.targetSchemes ?? e.targetSchemes,
2240
2526
  transport: t.transport ?? e.transport
2241
2527
  } : e;
2242
2528
  }
2243
- function Ks(e, t) {
2529
+ function xc(e, t) {
2244
2530
  const n = [];
2245
2531
  for (const r of e) {
2246
2532
  if (!r.enabled) continue;
2247
- const i = t[r.providerId];
2248
- if (i)
2249
- for (const o of Mr(r, i))
2250
- n.push({ channel: r, description: i, capability: o });
2533
+ const o = t[r.providerId];
2534
+ if (o)
2535
+ for (const i of ao(r, o))
2536
+ n.push({ channel: r, description: o, capability: i });
2251
2537
  }
2252
2538
  return n;
2253
2539
  }
2254
- function Fs(e, t) {
2540
+ function Dc(e, t) {
2255
2541
  return t.filter((n) => n.capability.intent === e);
2256
2542
  }
2257
- function Cr(e, t) {
2543
+ function lo(e, t) {
2258
2544
  return t.filter((n) => n.capability.targetSchemes.includes(e));
2259
2545
  }
2260
- function Bs(e, t) {
2261
- return Cr(e.scheme, t);
2546
+ function $c(e, t) {
2547
+ return lo(e.scheme, t);
2262
2548
  }
2263
- function js(e, t, n) {
2549
+ function Lc(e, t, n) {
2264
2550
  const r = [];
2265
- for (const i of e)
2266
- for (const o of n)
2267
- o.capability.intent === t && o.capability.targetSchemes.includes(i.scheme) && r.push({ channelIntent: o, endpoint: i });
2551
+ for (const o of e)
2552
+ for (const i of n)
2553
+ i.capability.intent === t && i.capability.targetSchemes.includes(o.scheme) && r.push({ channelIntent: i, endpoint: o });
2268
2554
  return r;
2269
2555
  }
2270
- var vr = /* @__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))(vr || {});
2271
- const Nr = {
2556
+ var uo = /* @__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))(uo || {});
2557
+ const po = {
2272
2558
  mailto: "mail",
2273
2559
  sip: "tel",
2274
2560
  tel: "tel",
@@ -2289,10 +2575,10 @@ const Nr = {
2289
2575
  id: "note",
2290
2576
  custom: "note"
2291
2577
  };
2292
- function Hs(e) {
2293
- return e ? Nr[e] ?? "note" : "note";
2578
+ function Pc(e) {
2579
+ return e ? po[e] ?? "note" : "note";
2294
2580
  }
2295
- const Gs = "message_window", Ws = "message_templates", Vs = {
2581
+ const Uc = "message_window", Kc = "message_templates", Fc = {
2296
2582
  // E-mail
2297
2583
  FROM: "from",
2298
2584
  TO: "to",
@@ -2309,39 +2595,39 @@ const Gs = "message_window", Ws = "message_templates", Vs = {
2309
2595
  // Voice/conference
2310
2596
  HOST: "host",
2311
2597
  PARTICIPANT: "participant"
2312
- }, zs = (e, t) => ({ intent: e, ...t }), Xs = "folder_management", Ys = "remote_search", qs = "message_reactions", Js = {
2598
+ }, Hc = (e, t) => ({ intent: e, ...t }), Bc = "folder_management", jc = "remote_search", Gc = "message_reactions", Wc = {
2313
2599
  ok: !1,
2314
2600
  code: "UNSUPPORTED",
2315
2601
  message: "Provider does not support this op"
2316
- }, Zs = "connector", Qs = "context.collect", d = (e) => ({ type: "string", description: e }), u = (e) => ({ type: "number", description: e }), $ = (e) => ({ type: "boolean", description: e }), E = d("Sheet name. Omit for the sheet the user is looking at."), De = d("Slide id, as `inspect` reports it.");
2317
- function l(e, t, n, r, i, o) {
2602
+ }, Vc = "connector", zc = "context.collect", g = (e) => ({ type: "string", description: e }), m = (e) => ({ type: "number", description: e }), F = (e) => ({ type: "boolean", description: e }), I = g("Sheet name. Omit for the sheet the user is looking at."), Ve = g("Slide id, as `inspect` reports it.");
2603
+ function f(e, t, n, r, o, i) {
2318
2604
  return {
2319
2605
  op: e,
2320
2606
  kinds: t,
2321
2607
  summary: n,
2322
- parameters: { type: "object", properties: r, required: i },
2323
- undoable: o.undoable,
2324
- visible: o.visible
2608
+ parameters: { type: "object", properties: r, required: o },
2609
+ undoable: i.undoable,
2610
+ visible: i.visible
2325
2611
  };
2326
2612
  }
2327
- const O = { undoable: !1, visible: !0 }, g = { undoable: !0, visible: !0 }, $e = { undoable: !1, visible: !0 }, U = { undoable: !1, visible: !1 }, xr = [
2328
- l(
2613
+ const D = { undoable: !1, visible: !0 }, b = { undoable: !0, visible: !0 }, ze = { undoable: !1, visible: !0 }, W = { undoable: !1, visible: !1 }, fo = [
2614
+ f(
2329
2615
  "pdf.goToPage",
2330
2616
  ["pdf"],
2331
2617
  "Scroll the viewer to a page.",
2332
- { page: u("1-based page number.") },
2618
+ { page: m("1-based page number.") },
2333
2619
  ["page"],
2334
- O
2620
+ D
2335
2621
  ),
2336
- l(
2622
+ f(
2337
2623
  "pdf.search",
2338
2624
  ["pdf"],
2339
2625
  "Search the document and highlight the matches, as the find bar does.",
2340
- { query: d("Text to find."), next: $("Jump to the next match instead of the first.") },
2626
+ { query: g("Text to find."), next: F("Jump to the next match instead of the first.") },
2341
2627
  ["query"],
2342
- O
2628
+ D
2343
2629
  ),
2344
- l(
2630
+ f(
2345
2631
  "pdf.setTool",
2346
2632
  ["pdf"],
2347
2633
  "Select a markup tool for the user, so their next click draws it.",
@@ -2353,23 +2639,23 @@ const O = { undoable: !1, visible: !0 }, g = { undoable: !0, visible: !0 }, $e =
2353
2639
  }
2354
2640
  },
2355
2641
  ["tool"],
2356
- O
2642
+ D
2357
2643
  ),
2358
- l(
2644
+ f(
2359
2645
  "pdf.fillField",
2360
2646
  ["pdf"],
2361
2647
  "Fill one form field of a fillable PDF.",
2362
2648
  {
2363
- field: d("Field name, exactly as `inspect` reports it under `fields`."),
2649
+ field: g("Field name, exactly as `inspect` reports it under `fields`."),
2364
2650
  value: {
2365
2651
  type: ["string", "boolean"],
2366
2652
  description: "Text for a text field, true/false for a checkbox or radio."
2367
2653
  }
2368
2654
  },
2369
2655
  ["field", "value"],
2370
- g
2656
+ b
2371
2657
  ),
2372
- l(
2658
+ f(
2373
2659
  "pdf.reorderPages",
2374
2660
  ["pdf"],
2375
2661
  "Put the pages in a different order. Pages left out are deleted.",
@@ -2381,52 +2667,52 @@ const O = { undoable: !1, visible: !0 }, g = { undoable: !0, visible: !0 }, $e =
2381
2667
  }
2382
2668
  },
2383
2669
  ["order"],
2384
- $e
2670
+ ze
2385
2671
  ),
2386
- l(
2672
+ f(
2387
2673
  "pdf.deletePages",
2388
2674
  ["pdf"],
2389
2675
  "Remove pages, keeping the rest in order.",
2390
2676
  { pages: { type: "array", items: { type: "number" }, description: "1-based page numbers." } },
2391
2677
  ["pages"],
2392
- $e
2678
+ ze
2393
2679
  ),
2394
- l(
2680
+ f(
2395
2681
  "pdf.addNote",
2396
2682
  ["pdf"],
2397
2683
  "Place a text note on a page. Written on save; not visible before that.",
2398
2684
  {
2399
- page: u("1-based page number."),
2400
- text: d("The note's text."),
2401
- left: u("Distance from the left edge, in PDF points (72 per inch)."),
2402
- top: u("Distance from the top edge, in PDF points."),
2403
- width: u("Box width in points. Omit for a sensible default."),
2404
- height: u("Box height in points. Omit for a sensible default."),
2405
- fontSize: u("Font size in points. Omit for 12.")
2685
+ page: m("1-based page number."),
2686
+ text: g("The note's text."),
2687
+ left: m("Distance from the left edge, in PDF points (72 per inch)."),
2688
+ top: m("Distance from the top edge, in PDF points."),
2689
+ width: m("Box width in points. Omit for a sensible default."),
2690
+ height: m("Box height in points. Omit for a sensible default."),
2691
+ fontSize: m("Font size in points. Omit for 12.")
2406
2692
  },
2407
2693
  ["page", "text", "left", "top"],
2408
- U
2694
+ W
2409
2695
  ),
2410
- l(
2696
+ f(
2411
2697
  "pdf.highlightText",
2412
2698
  ["pdf"],
2413
2699
  "Highlight a phrase on a page. Written on save; not visible before that.",
2414
2700
  {
2415
- page: u("1-based page number."),
2416
- text: d("The exact phrase to highlight, as it appears in the page's text."),
2417
- occurrence: u("Which occurrence on that page, 1-based. Omit for the first.")
2701
+ page: m("1-based page number."),
2702
+ text: g("The exact phrase to highlight, as it appears in the page's text."),
2703
+ occurrence: m("Which occurrence on that page, 1-based. Omit for the first.")
2418
2704
  },
2419
2705
  ["page", "text"],
2420
- U
2706
+ W
2421
2707
  )
2422
- ], Rr = [
2423
- l(
2708
+ ], mo = [
2709
+ f(
2424
2710
  "sheet.setValues",
2425
2711
  ["sheet"],
2426
2712
  "Write a block of values. The block's shape must match the range.",
2427
2713
  {
2428
- sheet: E,
2429
- range: d("A1 notation, e.g. `B2:D5` or a single `A1`."),
2714
+ sheet: I,
2715
+ range: g("A1 notation, e.g. `B2:D5` or a single `A1`."),
2430
2716
  values: {
2431
2717
  type: "array",
2432
2718
  items: { type: "array", items: { type: ["string", "number", "boolean", "null"] } },
@@ -2434,261 +2720,261 @@ const O = { undoable: !1, visible: !0 }, g = { undoable: !0, visible: !0 }, $e =
2434
2720
  }
2435
2721
  },
2436
2722
  ["range", "values"],
2437
- g
2723
+ b
2438
2724
  ),
2439
- l(
2725
+ f(
2440
2726
  "sheet.setFormula",
2441
2727
  ["sheet"],
2442
2728
  "Put a formula in every cell of a range.",
2443
- { sheet: E, range: d("A1 notation."), formula: d("Including the leading `=`.") },
2729
+ { sheet: I, range: g("A1 notation."), formula: g("Including the leading `=`.") },
2444
2730
  ["range", "formula"],
2445
- g
2731
+ b
2446
2732
  ),
2447
- l(
2733
+ f(
2448
2734
  "sheet.setStyle",
2449
2735
  ["sheet"],
2450
2736
  "Change the look of a range. Only the properties you pass are touched.",
2451
2737
  {
2452
- sheet: E,
2453
- range: d("A1 notation."),
2454
- bold: $("Bold on or off."),
2455
- italic: $("Italic on or off."),
2456
- fontSize: u("Point size."),
2457
- fontColor: d("CSS colour, e.g. `#b91c1c`."),
2458
- background: d("CSS colour for the cell fill."),
2738
+ sheet: I,
2739
+ range: g("A1 notation."),
2740
+ bold: F("Bold on or off."),
2741
+ italic: F("Italic on or off."),
2742
+ fontSize: m("Point size."),
2743
+ fontColor: g("CSS colour, e.g. `#b91c1c`."),
2744
+ background: g("CSS colour for the cell fill."),
2459
2745
  horizontalAlignment: {
2460
2746
  type: "string",
2461
2747
  enum: ["left", "center", "right"],
2462
2748
  description: "Horizontal alignment."
2463
2749
  },
2464
- numberFormat: d("Number format pattern, e.g. `#,##0.00` or `0%`.")
2750
+ numberFormat: g("Number format pattern, e.g. `#,##0.00` or `0%`.")
2465
2751
  },
2466
2752
  ["range"],
2467
- g
2753
+ b
2468
2754
  ),
2469
- l(
2755
+ f(
2470
2756
  "sheet.insertRows",
2471
2757
  ["sheet"],
2472
2758
  "Insert empty rows, pushing the rest down.",
2473
2759
  {
2474
- sheet: E,
2475
- at: u("1-based row number to insert before."),
2476
- count: u("How many. Omit for 1.")
2760
+ sheet: I,
2761
+ at: m("1-based row number to insert before."),
2762
+ count: m("How many. Omit for 1.")
2477
2763
  },
2478
2764
  ["at"],
2479
- g
2765
+ b
2480
2766
  ),
2481
- l(
2767
+ f(
2482
2768
  "sheet.deleteRows",
2483
2769
  ["sheet"],
2484
2770
  "Delete rows, pulling the rest up.",
2485
- { sheet: E, at: u("1-based first row to delete."), count: u("How many. Omit for 1.") },
2771
+ { sheet: I, at: m("1-based first row to delete."), count: m("How many. Omit for 1.") },
2486
2772
  ["at"],
2487
- g
2773
+ b
2488
2774
  ),
2489
- l(
2775
+ f(
2490
2776
  "sheet.insertColumns",
2491
2777
  ["sheet"],
2492
2778
  "Insert empty columns, pushing the rest right.",
2493
2779
  {
2494
- sheet: E,
2495
- at: u("1-based column number to insert before."),
2496
- count: u("How many. Omit for 1.")
2780
+ sheet: I,
2781
+ at: m("1-based column number to insert before."),
2782
+ count: m("How many. Omit for 1.")
2497
2783
  },
2498
2784
  ["at"],
2499
- g
2785
+ b
2500
2786
  ),
2501
- l(
2787
+ f(
2502
2788
  "sheet.deleteColumns",
2503
2789
  ["sheet"],
2504
2790
  "Delete columns, pulling the rest left.",
2505
2791
  {
2506
- sheet: E,
2507
- at: u("1-based first column to delete."),
2508
- count: u("How many. Omit for 1.")
2792
+ sheet: I,
2793
+ at: m("1-based first column to delete."),
2794
+ count: m("How many. Omit for 1.")
2509
2795
  },
2510
2796
  ["at"],
2511
- g
2797
+ b
2512
2798
  ),
2513
- l(
2799
+ f(
2514
2800
  "sheet.merge",
2515
2801
  ["sheet"],
2516
2802
  "Merge a range into one cell.",
2517
- { sheet: E, range: d("A1 notation.") },
2803
+ { sheet: I, range: g("A1 notation.") },
2518
2804
  ["range"],
2519
- g
2805
+ b
2520
2806
  ),
2521
- l(
2807
+ f(
2522
2808
  "sheet.unmerge",
2523
2809
  ["sheet"],
2524
2810
  "Break merged cells in a range apart.",
2525
- { sheet: E, range: d("A1 notation.") },
2811
+ { sheet: I, range: g("A1 notation.") },
2526
2812
  ["range"],
2527
- g
2813
+ b
2528
2814
  ),
2529
- l(
2815
+ f(
2530
2816
  "sheet.sort",
2531
2817
  ["sheet"],
2532
2818
  "Sort a range on one of its columns.",
2533
2819
  {
2534
- sheet: E,
2535
- range: d("A1 notation covering the rows to sort, header excluded."),
2536
- column: u("1-based column *within the range*, not within the sheet."),
2537
- ascending: $("Ascending. Omit for ascending.")
2820
+ sheet: I,
2821
+ range: g("A1 notation covering the rows to sort, header excluded."),
2822
+ column: m("1-based column *within the range*, not within the sheet."),
2823
+ ascending: F("Ascending. Omit for ascending.")
2538
2824
  },
2539
2825
  ["range", "column"],
2540
- g
2826
+ b
2541
2827
  ),
2542
- l(
2828
+ f(
2543
2829
  "sheet.insertSheet",
2544
2830
  ["sheet"],
2545
2831
  "Add a new sheet.",
2546
- { name: d("Name for the new sheet.") },
2832
+ { name: g("Name for the new sheet.") },
2547
2833
  ["name"],
2548
- g
2834
+ b
2549
2835
  ),
2550
- l(
2836
+ f(
2551
2837
  "sheet.renameSheet",
2552
2838
  ["sheet"],
2553
2839
  "Rename a sheet.",
2554
- { sheet: d("Current name."), name: d("New name.") },
2840
+ { sheet: g("Current name."), name: g("New name.") },
2555
2841
  ["sheet", "name"],
2556
- g
2842
+ b
2557
2843
  ),
2558
- l(
2844
+ f(
2559
2845
  "sheet.deleteSheet",
2560
2846
  ["sheet"],
2561
2847
  "Remove a sheet and everything on it.",
2562
- { sheet: d("Name of the sheet to delete.") },
2848
+ { sheet: g("Name of the sheet to delete.") },
2563
2849
  ["sheet"],
2564
- g
2850
+ b
2565
2851
  ),
2566
- l(
2852
+ f(
2567
2853
  "sheet.activate",
2568
2854
  ["sheet"],
2569
2855
  "Show the user a sheet and select a range on it.",
2570
- { sheet: E, range: d("A1 notation to select. Omit to only switch sheets.") },
2856
+ { sheet: I, range: g("A1 notation to select. Omit to only switch sheets.") },
2571
2857
  [],
2572
- O
2858
+ D
2573
2859
  )
2574
- ], Dr = [
2575
- l(
2860
+ ], go = [
2861
+ f(
2576
2862
  "word.replaceParagraph",
2577
2863
  ["word"],
2578
2864
  "Rewrite one whole paragraph, keeping its style. This is the verb for shortening or rephrasing something; call it once per paragraph.",
2579
2865
  {
2580
- at: u("The offset the paragraph starts at, exactly as `inspect` prints it."),
2581
- text: d("The new text for that paragraph. A newline starts a further paragraph.")
2866
+ at: m("The offset the paragraph starts at, exactly as `inspect` prints it."),
2867
+ text: g("The new text for that paragraph. A newline starts a further paragraph.")
2582
2868
  },
2583
2869
  ["at", "text"],
2584
- g
2870
+ b
2585
2871
  ),
2586
- l(
2872
+ f(
2587
2873
  "word.replaceRange",
2588
2874
  ["word"],
2589
2875
  "Replace a stretch of text inside a paragraph - a sentence, a phrase. To rewrite whole paragraphs use word.replaceParagraph: a range covering several paragraph styles is refused, because a replacement carries one style and would set the whole span in the first.",
2590
2876
  {
2591
- start: u("Character offset where the replaced text starts, as `inspect` reports offsets."),
2592
- end: u("Character offset just past the last character to replace."),
2593
- text: d("The replacement text. A newline starts a new paragraph.")
2877
+ start: m("Character offset where the replaced text starts, as `inspect` reports offsets."),
2878
+ end: m("Character offset just past the last character to replace."),
2879
+ text: g("The replacement text. A newline starts a new paragraph.")
2594
2880
  },
2595
2881
  ["start", "end", "text"],
2596
- g
2882
+ b
2597
2883
  ),
2598
- l(
2884
+ f(
2599
2885
  "word.insertText",
2600
2886
  ["word"],
2601
2887
  "Insert text at a character offset, without removing anything.",
2602
2888
  {
2603
- index: u("Character offset, as `inspect` reports offsets."),
2604
- text: d("The text to insert.")
2889
+ index: m("Character offset, as `inspect` reports offsets."),
2890
+ text: g("The text to insert.")
2605
2891
  },
2606
2892
  ["index", "text"],
2607
- g
2893
+ b
2608
2894
  ),
2609
- l(
2895
+ f(
2610
2896
  "word.appendText",
2611
2897
  ["word"],
2612
2898
  "Add text at the end of the document.",
2613
- { text: d("The text to append.") },
2899
+ { text: g("The text to append.") },
2614
2900
  ["text"],
2615
- g
2901
+ b
2616
2902
  ),
2617
- l(
2903
+ f(
2618
2904
  "word.insertParagraph",
2619
2905
  ["word"],
2620
2906
  "Start a new paragraph, optionally with text in it.",
2621
2907
  {
2622
- text: d("Paragraph text. Newlines start further paragraphs."),
2623
- index: u("Character offset to insert at. Omit for the end of the document.")
2908
+ text: g("Paragraph text. Newlines start further paragraphs."),
2909
+ index: m("Character offset to insert at. Omit for the end of the document.")
2624
2910
  },
2625
2911
  [],
2626
- g
2912
+ b
2627
2913
  ),
2628
- l(
2914
+ f(
2629
2915
  "word.setSelection",
2630
2916
  ["word"],
2631
2917
  "Put the user's cursor on a stretch of text, and move the reading window there: the page context carries one window of a long document, and the text around this offset arrives in the next turn.",
2632
- { start: u("Start character offset."), end: u("End character offset. Omit for a caret.") },
2918
+ { start: m("Start character offset."), end: m("End character offset. Omit for a caret.") },
2633
2919
  ["start"],
2634
- O
2920
+ D
2635
2921
  )
2636
- ], $r = [
2637
- l(
2922
+ ], ho = [
2923
+ f(
2638
2924
  "slides.setText",
2639
2925
  ["slides"],
2640
2926
  "Replace the text of one shape. Written on save; not visible before that, and not undoable.",
2641
2927
  {
2642
- slide: De,
2643
- element: d("Element id, as `inspect` reports it."),
2644
- text: d("The new text.")
2928
+ slide: Ve,
2929
+ element: g("Element id, as `inspect` reports it."),
2930
+ text: g("The new text.")
2645
2931
  },
2646
2932
  ["slide", "element", "text"],
2647
- U
2933
+ W
2648
2934
  ),
2649
- l(
2935
+ f(
2650
2936
  "slides.setTransform",
2651
2937
  ["slides"],
2652
2938
  "Move or resize one shape. Only the values you pass change. Written on save; not visible before that, and not undoable.",
2653
2939
  {
2654
- slide: De,
2655
- element: d("Element id."),
2656
- left: u("Distance from the left edge, in pixels."),
2657
- top: u("Distance from the top edge, in pixels."),
2658
- width: u("Width in pixels."),
2659
- height: u("Height in pixels.")
2940
+ slide: Ve,
2941
+ element: g("Element id."),
2942
+ left: m("Distance from the left edge, in pixels."),
2943
+ top: m("Distance from the top edge, in pixels."),
2944
+ width: m("Width in pixels."),
2945
+ height: m("Height in pixels.")
2660
2946
  },
2661
2947
  ["slide", "element"],
2662
- U
2948
+ W
2663
2949
  )
2664
- ], mt = [
2665
- ...xr,
2666
- ...Rr,
2667
- ...Dr,
2668
- ...$r
2950
+ ], kt = [
2951
+ ...fo,
2952
+ ...mo,
2953
+ ...go,
2954
+ ...ho
2669
2955
  ];
2670
- function ec(e) {
2671
- return mt.filter((t) => t.kinds.includes(e));
2956
+ function Xc(e) {
2957
+ return kt.filter((t) => t.kinds.includes(e));
2672
2958
  }
2673
- function tc(e) {
2674
- return mt.find((t) => t.op === e);
2959
+ function Yc(e) {
2960
+ return kt.find((t) => t.op === e);
2675
2961
  }
2676
- const nc = "documents.describe", rc = "documents.inspect", ic = "documents.apply";
2677
- function oc(e) {
2962
+ const qc = "documents.describe", Jc = "documents.inspect", Zc = "documents.apply";
2963
+ function Qc(e) {
2678
2964
  const t = e.indexOf(":");
2679
2965
  if (t !== -1) return e.slice(0, t);
2680
2966
  const n = e.indexOf(".");
2681
2967
  return n === -1 ? e : e.slice(0, n);
2682
2968
  }
2683
- const ac = "installation-id";
2684
- function sc(e) {
2969
+ const el = "installation-id";
2970
+ function tl(e) {
2685
2971
  const t = [];
2686
2972
  for (const n of Object.keys(e))
2687
2973
  for (const r of Object.keys(e[n]))
2688
2974
  t.push({ lang: n, key: r, value: e[n][r] });
2689
2975
  return t;
2690
2976
  }
2691
- const cc = "notification-source", lc = (e, t) => `${e}.pref.${t}`, uc = {
2977
+ const nl = "notification-source", rl = (e, t) => `${e}.pref.${t}`, ol = {
2692
2978
  ai: [
2693
2979
  "account.read",
2694
2980
  "account.write",
@@ -2823,96 +3109,96 @@ const cc = "notification-source", lc = (e, t) => `${e}.pref.${t}`, uc = {
2823
3109
  time: ["entry.read", "entry.write", "work-type.read", "work-type.write"],
2824
3110
  user: ["user.read", "user.write"],
2825
3111
  work: ["item.read", "item.write", "project.read", "project.write"]
2826
- }, gt = 9e4, Lr = ["out_of_office"], ht = (e) => Lr.includes(e);
2827
- function dc(e, t, n) {
2828
- const r = n - e < gt, i = t?.status && (!t.expiresAt || t.expiresAt > n) ? t : void 0;
2829
- if (!i?.status) return { online: r, status: r ? "available" : "offline" };
2830
- const o = i.status;
2831
- return !r && !ht(o) ? { online: !1, status: "offline" } : { online: r, status: o, message: i.message };
2832
- }
2833
- function pc(e, t) {
2834
- const n = t - e.lastSeenAt < gt, r = n || ht(e.status) ? e.status : "offline";
3112
+ }, vt = 9e4, yo = ["out_of_office"], Ot = (e) => yo.includes(e);
3113
+ function il(e, t, n) {
3114
+ const r = n - e < vt, o = t?.status && (!t.expiresAt || t.expiresAt > n) ? t : void 0;
3115
+ if (!o?.status) return { online: r, status: r ? "available" : "offline" };
3116
+ const i = o.status;
3117
+ return !r && !Ot(i) ? { online: !1, status: "offline" } : { online: r, status: i, message: o.message };
3118
+ }
3119
+ function al(e, t) {
3120
+ const n = t - e.lastSeenAt < vt, r = n || Ot(e.status) ? e.status : "offline";
2835
3121
  return n === e.online && r === e.status ? e : { ...e, online: n, status: r };
2836
3122
  }
2837
- function fc(e, t) {
3123
+ function sl(e, t) {
2838
3124
  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 };
2839
3125
  }
2840
- function mc(e) {
3126
+ function cl(e) {
2841
3127
  return e.providerAvailable && e.allowed;
2842
3128
  }
2843
- const gc = "resources.describe", hc = "resources.search", yc = "resources.resolve", bc = "resources.attached";
2844
- function Ac(e) {
3129
+ const ll = "resources.describe", ul = "resources.search", dl = "resources.resolve", pl = "resources.attached";
3130
+ function fl(e) {
2845
3131
  const t = e.indexOf(":");
2846
3132
  return t === -1 ? e : e.slice(0, t);
2847
3133
  }
2848
- const Ec = "/provider/scope/related", Sc = "/provider/scope/read", yt = "auth";
2849
- function bt(e) {
3134
+ const ml = "/provider/scope/related", gl = "/provider/scope/read", Ct = "auth";
3135
+ function Nt(e) {
2850
3136
  const t = typeof e == "string" ? e.match(/apps\/([^/?#]+)/) : null;
2851
3137
  return t ? t[1] : null;
2852
3138
  }
2853
- function _c(e) {
2854
- const t = bt(e);
2855
- return t ? t !== yt : typeof e == "string" && e.startsWith("/wake");
3139
+ function hl(e) {
3140
+ const t = Nt(e);
3141
+ return t ? t !== Ct : typeof e == "string" && e.startsWith("/wake");
2856
3142
  }
2857
- function Tc(e) {
2858
- return typeof e != "string" || e === "" || e === "/" ? !0 : bt(e) === yt;
3143
+ function yl(e) {
3144
+ return typeof e != "string" || e === "" || e === "/" ? !0 : Nt(e) === Ct;
2859
3145
  }
2860
- function Pr(e) {
3146
+ function bo(e) {
2861
3147
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
2862
3148
  }
2863
- function Ur(e) {
2864
- const n = e.split("/").filter(Boolean).map((r) => r.startsWith(":") ? r.endsWith("?") ? "(?:/[^/]+)?" : "/[^/]+" : `/${Pr(r)}`).join("");
3149
+ function Ao(e) {
3150
+ const n = e.split("/").filter(Boolean).map((r) => r.startsWith(":") ? r.endsWith("?") ? "(?:/[^/]+)?" : "/[^/]+" : `/${bo(r)}`).join("");
2865
3151
  return new RegExp(`^${n}\\/?$`);
2866
3152
  }
2867
- function Kr(e, t) {
2868
- const n = e.split("/").filter(Boolean), r = t.split("/").filter(Boolean), i = {};
2869
- return n.forEach((o, a) => {
2870
- if (o.startsWith(":")) {
2871
- const s = o.endsWith("?") ? o.slice(1, -1) : o.slice(1), c = r[a];
2872
- c && (i[s] = c);
3153
+ function Eo(e, t) {
3154
+ const n = e.split("/").filter(Boolean), r = t.split("/").filter(Boolean), o = {};
3155
+ return n.forEach((i, a) => {
3156
+ if (i.startsWith(":")) {
3157
+ const s = i.endsWith("?") ? i.slice(1, -1) : i.slice(1), c = r[a];
3158
+ c && (o[s] = c);
2873
3159
  }
2874
- }), i;
3160
+ }), o;
2875
3161
  }
2876
- function Fr(e) {
3162
+ function So(e) {
2877
3163
  return e.publicBasePath ?? `/apps/${e.name}`;
2878
3164
  }
2879
- function wc(e) {
3165
+ function bl(e) {
2880
3166
  const t = [];
2881
3167
  for (const n of e) {
2882
3168
  if (!n?.name) continue;
2883
- const r = Fr(n);
2884
- for (const i of n.routes ?? []) {
2885
- if (!i.public) continue;
2886
- const o = i.path === "/" ? "" : i.path;
3169
+ const r = So(n);
3170
+ for (const o of n.routes ?? []) {
3171
+ if (!o.public) continue;
3172
+ const i = o.path === "/" ? "" : o.path;
2887
3173
  t.push({
2888
3174
  appName: n.name,
2889
- resource: i.resource,
2890
- pattern: `${r}${o}`,
2891
- props: i.props
3175
+ resource: o.resource,
3176
+ pattern: `${r}${i}`,
3177
+ props: o.props
2892
3178
  });
2893
3179
  }
2894
3180
  }
2895
3181
  return t;
2896
3182
  }
2897
- function Br(e, t) {
3183
+ function _o(e, t) {
2898
3184
  const n = e.split("/").filter(Boolean), r = t.split("/").filter(Boolean);
2899
- for (let i = 0; i < Math.min(n.length, r.length); i++) {
2900
- const o = n[i].startsWith(":"), a = r[i].startsWith(":");
2901
- if (o !== a) return a;
3185
+ for (let o = 0; o < Math.min(n.length, r.length); o++) {
3186
+ const i = n[o].startsWith(":"), a = r[o].startsWith(":");
3187
+ if (i !== a) return a;
2902
3188
  }
2903
3189
  return n.length > r.length;
2904
3190
  }
2905
- function jr(e, t) {
3191
+ function To(e, t) {
2906
3192
  if (typeof e != "string") return null;
2907
3193
  let n = null;
2908
3194
  for (const r of t)
2909
- Ur(r.pattern).test(e) && (!n || Br(r.pattern, n.pattern)) && (n = r);
2910
- return n ? { ...n, params: { ...n.props, ...Kr(n.pattern, e) } } : null;
3195
+ Ao(r.pattern).test(e) && (!n || _o(r.pattern, n.pattern)) && (n = r);
3196
+ return n ? { ...n, params: { ...n.props, ...Eo(n.pattern, e) } } : null;
2911
3197
  }
2912
- function Ic(e, t) {
2913
- return jr(e, t) !== null;
3198
+ function Al(e, t) {
3199
+ return To(e, t) !== null;
2914
3200
  }
2915
- const Mc = 10 * 1024 * 1024, kc = 25 * 1024 * 1024, Oc = "sync-target", Cc = 20, Hr = {
3201
+ const El = 10 * 1024 * 1024, Sl = 25 * 1024 * 1024, _l = "sync-target", Tl = 20, wo = {
2916
3202
  afrikaans: [
2917
3203
  "[Muziek]",
2918
3204
  "(C) TV GELDERLAND 2021",
@@ -3062,14 +3348,14 @@ const Mc = 10 * 1024 * 1024, kc = 25 * 1024 * 1024, Oc = "sync-target", Cc = 20,
3062
3348
  "[MÚSICA]",
3063
3349
  "[Music cuts in British]"
3064
3350
  ]
3065
- }, Gr = (e) => {
3351
+ }, Io = (e) => {
3066
3352
  let t = e;
3067
- return Object.values(Hr).forEach((n) => {
3353
+ return Object.values(wo).forEach((n) => {
3068
3354
  n.forEach((r) => {
3069
3355
  t = t.replaceAll(r, "");
3070
3356
  });
3071
3357
  }), t = t.replace(/\(.*?\)/g, ""), t = t.replace(/\[.*?\]/g, ""), t;
3072
- }, Wr = 6e4, Vr = 8e3, zr = 2, Xr = 0.4, Yr = 3, qr = /* @__PURE__ */ new Set([
3358
+ }, Mo = 6e4, ko = 8e3, vo = 2, Oo = 0.4, Co = 3, No = /* @__PURE__ */ new Set([
3073
3359
  "aan",
3074
3360
  "als",
3075
3361
  "ben",
@@ -3182,52 +3468,52 @@ const Mc = 10 * 1024 * 1024, kc = 25 * 1024 * 1024, Oc = "sync-target", Cc = 20,
3182
3468
  "you",
3183
3469
  "your"
3184
3470
  ]);
3185
- function Jr(e) {
3471
+ function Ro(e) {
3186
3472
  const t = /* @__PURE__ */ new Set();
3187
3473
  for (const n of e.toLowerCase().split(/[^a-z0-9À-ɏ]+/))
3188
- n.length < Yr || qr.has(n) || t.add(n);
3474
+ n.length < Co || No.has(n) || t.add(n);
3189
3475
  return [...t];
3190
3476
  }
3191
- function Zr(e, t) {
3477
+ function xo(e, t) {
3192
3478
  if (!e.length) return 0;
3193
3479
  if (!t.length) return 1;
3194
3480
  const n = new Set(t), r = new Set(e);
3195
- let i = 0;
3196
- for (const o of r) n.has(o) || (i += 1);
3197
- return i / r.size;
3481
+ let o = 0;
3482
+ for (const i of r) n.has(i) || (o += 1);
3483
+ return o / r.size;
3198
3484
  }
3199
- function Qr(e, t = Wr) {
3485
+ function Do(e, t = Mo) {
3200
3486
  const n = e.filter((a) => !a.partial && typeof a.text == "string");
3201
3487
  if (!n.length) return { text: "", segmentCount: 0 };
3202
- const i = n.reduce((a, s) => Math.max(a, s.endedAt ?? 0), 0) - t;
3203
- return { text: n.filter((a) => (a.endedAt ?? 0) >= i).map((a) => Gr(a.text).trim()).filter(Boolean).join(" ").replace(/\s+/g, " ").trim(), segmentCount: n.length };
3488
+ const o = n.reduce((a, s) => Math.max(a, s.endedAt ?? 0), 0) - t;
3489
+ return { text: n.filter((a) => (a.endedAt ?? 0) >= o).map((a) => Io(a.text).trim()).filter(Boolean).join(" ").replace(/\s+/g, " ").trim(), segmentCount: n.length };
3204
3490
  }
3205
- const ei = 60;
3206
- function vc(e, t, n = ei) {
3207
- const r = new Set(e), i = [...e];
3208
- for (const o of t)
3209
- !o || r.has(o) || (r.add(o), i.push(o));
3210
- return i.slice(-n);
3491
+ const $o = 60;
3492
+ function wl(e, t, n = $o) {
3493
+ const r = new Set(e), o = [...e];
3494
+ for (const i of t)
3495
+ !i || r.has(i) || (r.add(i), o.push(i));
3496
+ return o.slice(-n);
3211
3497
  }
3212
- function Nc(e) {
3498
+ function Il(e) {
3213
3499
  const { segments: t, now: n, state: r } = e;
3214
- if (r.lastTriggerAt && n - r.lastTriggerAt < Vr)
3500
+ if (r.lastTriggerAt && n - r.lastTriggerAt < ko)
3215
3501
  return { trigger: !1, reason: "too_soon" };
3216
- const i = Qr(t, e.windowMs);
3217
- if (!i.text) return { trigger: !1, reason: "no_speech" };
3218
- const o = i.segmentCount - (r.lastSegmentCount ?? 0);
3219
- if (r.lastQueryTerms && o < zr)
3502
+ const o = Do(t, e.windowMs);
3503
+ if (!o.text) return { trigger: !1, reason: "no_speech" };
3504
+ const i = o.segmentCount - (r.lastSegmentCount ?? 0);
3505
+ if (r.lastQueryTerms && i < vo)
3220
3506
  return { trigger: !1, reason: "too_few_new" };
3221
- const a = Jr(i.text);
3222
- return a.length ? r.lastQueryTerms?.length && Zr(a, r.lastQueryTerms) < Xr ? { trigger: !1, reason: "same_topic" } : { trigger: !0, text: i.text, terms: a, segmentCount: i.segmentCount } : { trigger: !1, reason: "no_speech" };
3507
+ const a = Ro(o.text);
3508
+ return a.length ? r.lastQueryTerms?.length && xo(a, r.lastQueryTerms) < Oo ? { trigger: !1, reason: "same_topic" } : { trigger: !0, text: o.text, terms: a, segmentCount: o.segmentCount } : { trigger: !1, reason: "no_speech" };
3223
3509
  }
3224
- const xc = [
3510
+ const Ml = [
3225
3511
  "personal",
3226
3512
  "workspace",
3227
3513
  "connections",
3228
3514
  "work",
3229
3515
  "ai"
3230
- ], Rc = "navNotice", le = {
3516
+ ], kl = "navNotice", Ee = {
3231
3517
  // The lower bounds are deliberately generous: service ranges (0800/0900) are
3232
3518
  // shorter than geographic numbers, and a too-strict minimum silently drops them.
3233
3519
  // An over-permissive key is harmless — it simply matches nothing.
@@ -3250,81 +3536,81 @@ const xc = [
3250
3536
  PL: { callingCode: "48", nsnMin: 9, nsnMax: 9 },
3251
3537
  US: { callingCode: "1", nsnMin: 10, nsnMax: 10 },
3252
3538
  CA: { callingCode: "1", nsnMin: 10, nsnMax: 10 }
3253
- }, ti = "NL", ni = 15, ri = 8, ii = Array.from(
3254
- new Set(Object.values(le).map((e) => e.callingCode))
3539
+ }, Lo = "NL", Po = 15, Uo = 8, Ko = Array.from(
3540
+ new Set(Object.values(Ee).map((e) => e.callingCode))
3255
3541
  ).sort((e, t) => t.length - e.length);
3256
- function Le(e) {
3542
+ function Xe(e) {
3257
3543
  if (e)
3258
- return le[e.trim().toUpperCase()];
3544
+ return Ee[e.trim().toUpperCase()];
3259
3545
  }
3260
- function L(e, t) {
3546
+ function H(e, t) {
3261
3547
  return e.length >= t.nsnMin && e.length <= t.nsnMax;
3262
3548
  }
3263
- function Pe(e) {
3264
- if (e.length > ni) return null;
3265
- for (const t of ii) {
3549
+ function Ye(e) {
3550
+ if (e.length > Po) return null;
3551
+ for (const t of Ko) {
3266
3552
  if (!e.startsWith(t)) continue;
3267
3553
  const n = e.slice(t.length);
3268
- for (const r of Object.values(le)) {
3554
+ for (const r of Object.values(Ee)) {
3269
3555
  if (r.callingCode !== t) continue;
3270
- const i = r.trunkPrefix, o = i && n.startsWith(i) ? n.slice(i.length) : n;
3271
- if (L(o, r)) return `+${t}${o}`;
3556
+ const o = r.trunkPrefix, i = o && n.startsWith(o) ? n.slice(o.length) : n;
3557
+ if (H(i, r)) return `+${t}${i}`;
3272
3558
  }
3273
3559
  return null;
3274
3560
  }
3275
- return e.length < ri ? null : `+${e}`;
3561
+ return e.length < Uo ? null : `+${e}`;
3276
3562
  }
3277
- function oi(e) {
3563
+ function Fo(e) {
3278
3564
  let t = e.trim();
3279
3565
  const n = t.match(/^(sips?|tel|whatsapp):/i);
3280
3566
  n && (t = t.slice(n[0].length));
3281
3567
  const r = t.indexOf("@");
3282
3568
  return r >= 0 && (t = t.slice(0, r)), t.trim();
3283
3569
  }
3284
- function Dc(e) {
3570
+ function vl(e) {
3285
3571
  if (!e) return !1;
3286
3572
  const t = e.indexOf("@");
3287
3573
  if (t <= 0) return !1;
3288
3574
  const n = e.slice(0, t).trim();
3289
3575
  return !/^[+\d\s().-]+$/.test(n);
3290
3576
  }
3291
- function Ue(e, t) {
3577
+ function qe(e, t) {
3292
3578
  if (!e) return null;
3293
- const n = oi(e);
3579
+ const n = Fo(e);
3294
3580
  if (!n) return null;
3295
- const r = n.startsWith("+"), i = n.replace(/\D/g, "");
3296
- if (!i) return null;
3297
- if (r) return Pe(i);
3298
- if (i.startsWith("00")) return Pe(i.slice(2));
3299
- const o = Le(t) ?? Le(ti);
3581
+ const r = n.startsWith("+"), o = n.replace(/\D/g, "");
3300
3582
  if (!o) return null;
3301
- const a = o.trunkPrefix;
3302
- if (a && i.startsWith(a)) {
3303
- const s = i.slice(a.length);
3304
- return L(s, o) ? `+${o.callingCode}${s}` : null;
3583
+ if (r) return Ye(o);
3584
+ if (o.startsWith("00")) return Ye(o.slice(2));
3585
+ const i = Xe(t) ?? Xe(Lo);
3586
+ if (!i) return null;
3587
+ const a = i.trunkPrefix;
3588
+ if (a && o.startsWith(a)) {
3589
+ const s = o.slice(a.length);
3590
+ return H(s, i) ? `+${i.callingCode}${s}` : null;
3305
3591
  }
3306
- if (i.startsWith(o.callingCode)) {
3307
- const s = i.slice(o.callingCode.length);
3308
- if (L(s, o)) return `+${o.callingCode}${s}`;
3592
+ if (o.startsWith(i.callingCode)) {
3593
+ const s = o.slice(i.callingCode.length);
3594
+ if (H(s, i)) return `+${i.callingCode}${s}`;
3309
3595
  }
3310
- return !a && L(i, o) ? `+${o.callingCode}${i}` : null;
3596
+ return !a && H(o, i) ? `+${i.callingCode}${o}` : null;
3311
3597
  }
3312
- function $c(e, t = 9) {
3598
+ function Ol(e, t = 9) {
3313
3599
  const n = (e ?? "").replace(/\D/g, "");
3314
3600
  return n.length < t ? null : n.slice(-t);
3315
3601
  }
3316
- function At(e) {
3602
+ function Rt(e) {
3317
3603
  if (!e) return null;
3318
3604
  const t = e.trim().toLowerCase(), n = t.lastIndexOf("@");
3319
3605
  if (n <= 0 || n === t.length - 1) return null;
3320
- const r = t.slice(0, n).split("+")[0], i = t.slice(n + 1);
3321
- return !r || !i.includes(".") ? null : `${r}@${i}`;
3606
+ const r = t.slice(0, n).split("+")[0], o = t.slice(n + 1);
3607
+ return !r || !o.includes(".") ? null : `${r}@${o}`;
3322
3608
  }
3323
- function Lc(e) {
3324
- const t = At(e);
3609
+ function Cl(e) {
3610
+ const t = Rt(e);
3325
3611
  return t ? t.slice(t.lastIndexOf("@") + 1) : null;
3326
3612
  }
3327
- const ai = /* @__PURE__ */ new Set([
3613
+ const Ho = /* @__PURE__ */ new Set([
3328
3614
  "co.uk",
3329
3615
  "org.uk",
3330
3616
  "gov.uk",
@@ -3334,14 +3620,14 @@ const ai = /* @__PURE__ */ new Set([
3334
3620
  "com.br",
3335
3621
  "co.za"
3336
3622
  ]);
3337
- function si(e) {
3623
+ function Bo(e) {
3338
3624
  if (!e) return null;
3339
3625
  const t = e.trim().toLowerCase().replace(/\.$/, "").split(".").filter(Boolean);
3340
3626
  if (t.length < 2) return null;
3341
3627
  const n = t.slice(-2).join(".");
3342
- return ai.has(n) && t.length >= 3 ? t.slice(-3).join(".") : n;
3628
+ return Ho.has(n) && t.length >= 3 ? t.slice(-3).join(".") : n;
3343
3629
  }
3344
- const ci = /* @__PURE__ */ new Set([
3630
+ const jo = /* @__PURE__ */ new Set([
3345
3631
  "gmail.com",
3346
3632
  "googlemail.com",
3347
3633
  "outlook.com",
@@ -3386,34 +3672,34 @@ const ci = /* @__PURE__ */ new Set([
3386
3672
  "proximus.be",
3387
3673
  "scarlet.be"
3388
3674
  ]);
3389
- function Pc(e) {
3390
- const t = si(e);
3391
- return t ? ci.has(t) : !1;
3675
+ function Nl(e) {
3676
+ const t = Bo(e);
3677
+ return t ? jo.has(t) : !1;
3392
3678
  }
3393
- function Uc(e) {
3679
+ function Rl(e) {
3394
3680
  if (!e) return !1;
3395
3681
  const t = e.trim().toLowerCase();
3396
3682
  return t === "tel" || t === "sms" || t === "whatsapp" || t === "fax";
3397
3683
  }
3398
- function Kc(e, t, n) {
3684
+ function xl(e, t, n) {
3399
3685
  if (!e || !t) return null;
3400
3686
  const r = e.trim().toLowerCase();
3401
3687
  if (r === "tel" || r === "sms" || r === "whatsapp") {
3402
- const o = Ue(t, n);
3403
- return o ? `tel:${o}` : null;
3688
+ const i = qe(t, n);
3689
+ return i ? `tel:${i}` : null;
3404
3690
  }
3405
3691
  if (r === "fax") {
3406
- const o = Ue(t, n);
3407
- return o ? `fax:${o}` : null;
3692
+ const i = qe(t, n);
3693
+ return i ? `fax:${i}` : null;
3408
3694
  }
3409
3695
  if (r === "mailto" || r === "email") {
3410
- const o = At(t);
3411
- return o ? `mailto:${o}` : null;
3696
+ const i = Rt(t);
3697
+ return i ? `mailto:${i}` : null;
3412
3698
  }
3413
- const i = t.trim().toLowerCase();
3414
- return i ? `${r}:${i}` : null;
3699
+ const o = t.trim().toLowerCase();
3700
+ return o ? `${r}:${o}` : null;
3415
3701
  }
3416
- const li = [
3702
+ const Go = [
3417
3703
  /<blockquote/i,
3418
3704
  /class="?gmail_quote/i,
3419
3705
  // Gmail quote container
@@ -3426,111 +3712,111 @@ const li = [
3426
3712
  // Outlook underscore separator before "From:"
3427
3713
  /\bOn\b[\s\S]{0,200}?\bwrote:/i
3428
3714
  // Gmail "On <date> <name> wrote:"
3429
- ], Ke = /^\s*(?:>+\s*)?(?:from|van|sent|verzonden|to|aan|cc|subject|onderwerp|date|datum)\s*:/i, ui = /^\s*(?:on|op)\b.{0,200}?\b(?:wrote|schreef|geschreven)\s*:?\s*$/i;
3430
- function di(e) {
3715
+ ], Je = /^\s*(?:>+\s*)?(?:from|van|sent|verzonden|to|aan|cc|subject|onderwerp|date|datum)\s*:/i, Wo = /^\s*(?:on|op)\b.{0,200}?\b(?:wrote|schreef|geschreven)\s*:?\s*$/i;
3716
+ function Vo(e) {
3431
3717
  const t = e.split(`
3432
3718
  `);
3433
3719
  for (let n = 0; n < t.length; n++)
3434
- if (ui.test(t[n]) || Ke.test(t[n]) && t.slice(n + 1, n + 4).some((r) => Ke.test(r)))
3720
+ if (Wo.test(t[n]) || Je.test(t[n]) && t.slice(n + 1, n + 4).some((r) => Je.test(r)))
3435
3721
  return t.slice(0, n).join(`
3436
3722
  `).trim();
3437
3723
  return e;
3438
3724
  }
3439
- const pi = /^(?:https?:|mailto:|tel:)/i, fi = /^(?:https?:|cid:|data:image\/)/i;
3440
- function z(e, t) {
3725
+ const zo = /^(?:https?:|mailto:|tel:)/i, Xo = /^(?:https?:|cid:|data:image\/)/i;
3726
+ function ne(e, t) {
3441
3727
  const n = e.match(new RegExp(`\\b${t}\\s*=\\s*(?:"([^"]*)"|'([^']*)'|([^\\s">]+))`, "i"));
3442
3728
  return (n?.[1] ?? n?.[2] ?? n?.[3] ?? "").trim();
3443
3729
  }
3444
- const mi = /(!\[[^\]]*\]\([^)]*\))/;
3445
- function Fe(e) {
3446
- return e.replace(/\s+/g, " ").trim().split(mi).map((t, n) => n % 2 === 1 ? t : t.replace(/[[\]]/g, "\\$&")).join("");
3730
+ const Yo = /(!\[[^\]]*\]\([^)]*\))/;
3731
+ function Ze(e) {
3732
+ return e.replace(/\s+/g, " ").trim().split(Yo).map((t, n) => n % 2 === 1 ? t : t.replace(/[[\]]/g, "\\$&")).join("");
3447
3733
  }
3448
- function X(e) {
3734
+ function re(e) {
3449
3735
  return e.replace(
3450
3736
  /[()\s<>"]/g,
3451
3737
  (t) => `%${t.charCodeAt(0).toString(16).toUpperCase().padStart(2, "0")}`
3452
3738
  );
3453
3739
  }
3454
- function gi(e) {
3740
+ function qo(e) {
3455
3741
  return e.replace(/<img\b([^>]*?)\/?>/gi, (n, r) => {
3456
- const i = z(r, "src");
3457
- return fi.test(i) ? `![${Fe(z(r, "alt"))}](${X(i)})` : "";
3742
+ const o = ne(r, "src");
3743
+ return Xo.test(o) ? `![${Ze(ne(r, "alt"))}](${re(o)})` : "";
3458
3744
  }).replace(
3459
3745
  /<a\b([^>]*)>([\s\S]*?)<\/a\s*>/gi,
3460
- (n, r, i) => {
3461
- const o = Fe(i.replace(/<[^>]*>/g, "")), a = z(r, "href");
3462
- return pi.test(a) ? `[${o || X(a)}](${X(a)})` : o;
3746
+ (n, r, o) => {
3747
+ const i = Ze(o.replace(/<[^>]*>/g, "")), a = ne(r, "href");
3748
+ return zo.test(a) ? `[${i || re(a)}](${re(a)})` : i;
3463
3749
  }
3464
3750
  );
3465
3751
  }
3466
- const hi = /<table\b[^>]*>((?:(?!<table\b)[\s\S])*?)<\/table\s*>/i, yi = /<tr\b[^>]*>([\s\S]*?)<\/tr\s*>/gi, bi = /<(t[dh])\b([^>]*)>([\s\S]*?)<\/\1\s*>/gi;
3467
- function Ai(e, t) {
3752
+ const Jo = /<table\b[^>]*>((?:(?!<table\b)[\s\S])*?)<\/table\s*>/i, Zo = /<tr\b[^>]*>([\s\S]*?)<\/tr\s*>/gi, Qo = /<(t[dh])\b([^>]*)>([\s\S]*?)<\/\1\s*>/gi;
3753
+ function ei(e, t) {
3468
3754
  return /<table\b/i.test(e) || e.includes(`
3469
3755
 
3470
3756
  |`) || t.includes("![") || t.length > 200;
3471
3757
  }
3472
- const Ei = 40, Si = { left: "---", center: ":---:", right: "---:" };
3473
- function _i(e) {
3758
+ const ti = 40, ni = { left: "---", center: ":---:", right: "---:" };
3759
+ function ri(e) {
3474
3760
  const t = e.match(/align\s*[=:]\s*["']?\s*(right|center)/i);
3475
3761
  return t ? t[1].toLowerCase() : "left";
3476
3762
  }
3477
- function Ti(e) {
3763
+ function oi(e) {
3478
3764
  return e.replace(/<[^>]*>/g, "").replace(/\s+/g, " ").trim().replace(/\|/g, "\\|");
3479
3765
  }
3480
- function wi(e) {
3766
+ function ii(e) {
3481
3767
  const t = [];
3482
- for (const a of e.matchAll(yi)) {
3768
+ for (const a of e.matchAll(Zo)) {
3483
3769
  const s = [];
3484
- for (const c of a[1].matchAll(bi)) {
3485
- const m = Ti(c[3]);
3486
- if (Ai(c[3], m)) return null;
3487
- s.push({ text: m, align: _i(c[2]) });
3770
+ for (const c of a[1].matchAll(Qo)) {
3771
+ const l = oi(c[3]);
3772
+ if (ei(c[3], l)) return null;
3773
+ s.push({ text: l, align: ri(c[2]) });
3488
3774
  }
3489
3775
  if (s.length === 0) return null;
3490
3776
  s.some((c) => c.text !== "") && t.push(s);
3491
3777
  }
3492
3778
  const n = t[0]?.length ?? 0;
3493
3779
  if (t.length < 2 || n < 2 || t.some((a) => a.length !== n)) return null;
3494
- const r = (a) => `| ${a.map((s) => s.text).join(" | ")} |`, i = t[1].map((a) => Si[a.align]).join(" | "), o = t.slice(1).map(r).join(`
3780
+ const r = (a) => `| ${a.map((s) => s.text).join(" | ")} |`, o = t[1].map((a) => ni[a.align]).join(" | "), i = t.slice(1).map(r).join(`
3495
3781
  `);
3496
3782
  return `
3497
3783
 
3498
3784
  ${r(t[0])}
3499
- | ${i} |
3500
- ${o}
3785
+ | ${o} |
3786
+ ${i}
3501
3787
 
3502
3788
  `;
3503
3789
  }
3504
- function Ii(e) {
3790
+ function ai(e) {
3505
3791
  return e.replace(/<\/(t[dh])\s*>/gi, " ").replace(/<\/tr\s*>/gi, `
3506
3792
  `).replace(/<(?:tbody|thead|tfoot|caption|colgroup|col|tr|t[dh])\b[^>]*>/gi, "").replace(/<\/(?:tbody|thead|tfoot|caption|colgroup)\s*>/gi, "");
3507
3793
  }
3508
- function Mi(e) {
3794
+ function si(e) {
3509
3795
  let t = e;
3510
- for (let n = 0; n < Ei; n++) {
3511
- const r = hi.exec(t);
3796
+ for (let n = 0; n < ti; n++) {
3797
+ const r = Jo.exec(t);
3512
3798
  if (!r || r.index === void 0) break;
3513
- const o = wi(r[1]) ?? `
3799
+ const i = ii(r[1]) ?? `
3514
3800
 
3515
- ${Ii(r[1])}
3801
+ ${ai(r[1])}
3516
3802
 
3517
3803
  `;
3518
- t = t.slice(0, r.index) + o + t.slice(r.index + r[0].length);
3804
+ t = t.slice(0, r.index) + i + t.slice(r.index + r[0].length);
3519
3805
  }
3520
3806
  return t;
3521
3807
  }
3522
- function Be(e, t) {
3808
+ function Qe(e, t) {
3523
3809
  let n = e;
3524
3810
  return n = n.replace(/<(script|style)[\s\S]*?<\/\1>/gi, ""), n = n.replace(/<!--[\s\S]*?-->/g, ""), n = n.replace(/<br\s*\/?>/gi, `
3525
- `), t && (n = Mi(gi(n))), n = n.replace(/<\/(p|h[1-6]|ul|ol|table|blockquote)>/gi, `
3811
+ `), t && (n = si(qo(n))), n = n.replace(/<\/(p|h[1-6]|ul|ol|table|blockquote)>/gi, `
3526
3812
 
3527
3813
  `), n = n.replace(/<\/(div|li|tr)>/gi, `
3528
3814
  `), n = n.replace(/<\/(td|th)>/gi, " "), n = n.replace(/<[^>]+>/g, ""), n = n.replace(/<[^>]*$/, ""), n;
3529
3815
  }
3530
- function je(e) {
3816
+ function et(e) {
3531
3817
  return !Number.isInteger(e) || e < 0 || e > 1114111 ? null : String.fromCodePoint(e);
3532
3818
  }
3533
- const ki = {
3819
+ const ci = {
3534
3820
  euro: "€",
3535
3821
  pound: "£",
3536
3822
  yen: "¥",
@@ -3552,416 +3838,445 @@ const ki = {
3552
3838
  rdquo: "”",
3553
3839
  apos: "'"
3554
3840
  };
3555
- function He(e) {
3556
- return e.replace(/&nbsp;/gi, " ").replace(/&([a-z]+);/gi, (t, n) => ki[n.toLowerCase()] ?? t).replace(/&lt;/gi, "<").replace(/&gt;/gi, ">").replace(/&quot;/gi, '"').replace(/&#(\d+);/g, (t, n) => je(Number(n)) ?? t).replace(/&#x([0-9a-f]+);/gi, (t, n) => je(parseInt(n, 16)) ?? t).replace(/&amp;/gi, "&");
3841
+ function tt(e) {
3842
+ return e.replace(/&nbsp;/gi, " ").replace(/&([a-z]+);/gi, (t, n) => ci[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, "&");
3557
3843
  }
3558
- function Ge(e) {
3844
+ function nt(e) {
3559
3845
  return e.replace(/\r/g, "").replace(/[ \t]+/g, " ").replace(/ *\n */g, `
3560
3846
  `).replace(/\n{3,}/g, `
3561
3847
 
3562
3848
  `).trim();
3563
3849
  }
3564
- const Oi = /<\s*(html|body|div|p|table|br|span)\b/i;
3565
- function Fc(e) {
3566
- return Oi.test(e);
3850
+ const li = /<\s*(html|body|div|p|table|br|span)\b/i;
3851
+ function Dl(e) {
3852
+ return li.test(e);
3567
3853
  }
3568
- function Bc(e) {
3569
- return Et(e, !1);
3854
+ function $l(e) {
3855
+ return xt(e, !1);
3570
3856
  }
3571
- function jc(e) {
3572
- return Et(e, !0);
3857
+ function Ll(e) {
3858
+ return xt(e, !0);
3573
3859
  }
3574
- function Et(e, t) {
3860
+ function xt(e, t) {
3575
3861
  if (typeof e != "string" || !e) return "";
3576
3862
  let n = e.length;
3577
- for (const a of li) {
3863
+ for (const a of Go) {
3578
3864
  const s = e.search(a);
3579
3865
  s >= 0 && s < n && (n = s);
3580
3866
  }
3581
3867
  const r = e.slice(0, n);
3582
- let i = Ge(He(Be(r, t)));
3583
- return i || (i = Ge(He(Be(e, t)))), di(i) || i;
3868
+ let o = nt(tt(Qe(r, t)));
3869
+ return o || (o = nt(tt(Qe(e, t)))), Vo(o) || o;
3584
3870
  }
3585
3871
  export {
3586
- ho as ACTIVE_ASSIGNMENT_STATUSES,
3587
- _ as ACTIVITY_CATALOG,
3588
- wr as AI_ATTACHMENT_LIMITS,
3589
- ks as AI_ATTACHMENT_MAX_PER_TURN,
3590
- Ms as AI_ATTACHMENT_TURN_BUDGET,
3591
- ze as AI_VENDORS,
3592
- Ht as ALLOWED_LINK_SCHEMES,
3593
- uc as APP_PERMISSIONS,
3594
- be as ARTIFACT_MAX_BLOCKS,
3595
- so as ARTIFACT_MAX_BODY_BYTES,
3596
- W as ARTIFACT_MAX_CELL_LEN,
3597
- _e as ARTIFACT_MAX_KPI_ITEMS,
3598
- Ae as ARTIFACT_MAX_LIST_ITEMS,
3599
- Se as ARTIFACT_MAX_TABLE_COLUMNS,
3600
- Ee as ARTIFACT_MAX_TABLE_ROWS,
3601
- Ye as ARTIFACT_MAX_TEXT_LEN,
3602
- Zt as ASSIGNMENT_SCOPE_KIND,
3603
- xs as ASSIST_BANDS,
3604
- Ns as ASSIST_SOURCE_PROVIDER_GROUP,
3605
- pn as ATTENTION_STATUSES,
3606
- rr as AT_RISK_GAP,
3607
- yt as AUTH_APP_NAME,
3608
- Un as AUTO_READY_MIN_PROPOSALS,
3609
- Kn as AUTO_READY_RATE,
3610
- xt as ActivityTypeRegistry,
3611
- Vi as BUILT_IN_ONLY,
3612
- fn as BULK_PENALTY,
3613
- Vr as CADENCE_FLOOR_MS,
3614
- zr as CADENCE_MIN_NEW_SEGMENTS,
3615
- Xr as CADENCE_MIN_NOVELTY,
3616
- Wr as CADENCE_WINDOW_MS,
3617
- pa as CLASSIFY_VARS,
3618
- Zs as CONNECTOR_PROVIDER_GROUP,
3619
- Qs as CONTEXT_COLLECT_SERVICE,
3620
- io as CORE_DIMENSIONS,
3621
- vr as CommunicationScheme,
3622
- nn as DAY_MS,
3623
- er as DEFAULT_CHECK_IN_DAYS,
3624
- Zo as DEFAULT_MEMORY_BUDGET,
3625
- ti as DEFAULT_PHONE_REGION,
3626
- ic as DOCUMENT_APPLY_SERVICE,
3627
- nc as DOCUMENT_DESCRIBE_SERVICE,
3628
- rc as DOCUMENT_INSPECT_SERVICE,
3629
- mt as DOCUMENT_OPERATIONS,
3630
- ma as EMPTY_WORKFLOW,
3631
- Xs as FEATURE_FOLDER_MANAGEMENT,
3632
- qs as FEATURE_MESSAGE_REACTIONS,
3633
- Ys as FEATURE_REMOTE_SEARCH,
3634
- ae as FIXED_LEVELS,
3635
- se as FIXED_TYPES,
3636
- gn as FOLLOW_UP_HOURS,
3637
- tn as HOUR_MS,
3638
- Oi as HTML_BODY_RE,
3639
- w as INELIGIBLE,
3640
- ac as INSTALLATION_HEADER,
3641
- Rn as INTERACTION_KIND,
3642
- Vs as InteractionParticipantRole,
3643
- Tn as KB_FALLBACK_LOCALE,
3644
- Me as KB_LOCALES,
3645
- ce as LOOSE_STATUSES,
3646
- cn as MAIL_HINT_HEADERS,
3647
- xi as MAX_ACTIONS,
3648
- Qt as MAX_ASSIGNMENT_TURNS,
3649
- Ci as MAX_BLOCKS,
3650
- rt as MAX_COLLECTION_DEPTH,
3651
- Mc as MAX_EDITABLE_FILE_BYTES,
3652
- vi as MAX_FIELDS,
3653
- Ni as MAX_LIST_ITEMS,
3654
- Xo as MAX_MEMORY_BROWSE,
3655
- Jo as MAX_MEMORY_BUDGET,
3656
- Yo as MAX_MEMORY_CHARS,
3657
- ei as MAX_SHOWN_KEYS,
3658
- cr as MAX_TOPIC_CANDIDATES,
3659
- sr as MAX_TOPIC_EXAMPLES,
3660
- V as MAX_TOPIC_EXAMPLE_CHARS,
3661
- kc as MAX_VIEWABLE_FILE_BYTES,
3662
- qo as MIN_MEMORY_BUDGET,
3663
- Rc as NAV_NOTICE_SLOT,
3664
- cc as NOTIFICATION_SOURCE_PROVIDER_GROUP,
3665
- ir as OFF_TRACK_GAP,
3666
- ea as ONBOARDING_SOURCE_PROVIDER_GROUP,
3667
- Q as PAUSE_SNOOZED,
3668
- ee as PAUSE_WAITING_FOR_CUSTOMER,
3669
- le as PHONE_REGIONS,
3670
- gt as PRESENCE_ONLINE_WINDOW_MS,
3671
- Lr as PRESENCE_SURVIVES_OFFLINE,
3672
- na as PROFILE_TOOL_DISPOSITIONS,
3673
- Ws as PROVIDER_FEATURE_MESSAGE_TEMPLATES,
3674
- Gs as PROVIDER_FEATURE_MESSAGE_WINDOW,
3675
- ci as PUBLIC_EMAIL_DOMAINS,
3676
- ke as READ_STEP_TYPES,
3677
- Mn as RELATED_SUBJECT_KINDS,
3678
- ft as RESERVED_STATUS_KEYS,
3679
- ss as RESERVED_TYPE_KEYS,
3680
- bc as RESOURCE_ATTACHED_SERVICE,
3681
- gc as RESOURCE_DESCRIBE_SERVICE,
3682
- yc as RESOURCE_RESOLVE_SERVICE,
3683
- hc as RESOURCE_SEARCH_SERVICE,
3684
- Sc as SCOPE_READ_ROUTE,
3685
- Ec as SCOPE_RELATED_ROUTE,
3686
- xc as SETTINGS_CATEGORIES,
3687
- To as SIGNATURE_INTENTS,
3688
- mn as SLA_HOURS_BY_PRIORITY,
3689
- Ma as SLA_METRICS,
3690
- ka as SLA_PAUSE_REASONS,
3691
- Ln as STEP_MAX_TOKENS_MAX,
3692
- $n as STEP_MAX_TOKENS_MIN,
3693
- Zn as STRATEGY_ITEM_SCOPE_KIND,
3694
- sn as SUMMARY_MIN_LAST_CHARS,
3695
- an as SUMMARY_MIN_MESSAGES,
3696
- Cc as SYNC_RUN_MAX_ERRORS,
3697
- Oc as SYNC_TARGET_PROVIDER_GROUP,
3698
- Jt as TERMINAL_ASSIGNMENT_STATUSES,
3699
- Fn as TERMINAL_RUN_STATUSES,
3700
- da as TRIGGER_VARS,
3701
- Qn as UNKNOWN_LEVEL_ORDER,
3702
- Js as UNSUPPORTED,
3703
- Kt as USAGE_DIMENSIONS,
3704
- Ft as USAGE_DIMENSION_IDS,
3705
- gr as WORK_ACTIVITY_SCOPE_KIND,
3706
- ta as WORK_AREAS,
3707
- rs as WORK_COMMENT_ADDED,
3708
- ps as WORK_CYCLE_SYNC_KIND,
3709
- is as WORK_ITEM_ASSIGNED,
3710
- fr as WORK_ITEM_SCOPE_KIND,
3711
- os as WORK_ITEM_STATUS_CHANGED,
3712
- mr as WORK_PROJECT_SCOPE_KIND,
3713
- P as W_PRIORITY,
3714
- es as acceptExampleCandidate,
3715
- On as actingIdentityKey,
3716
- Za as activeWorkTypes,
3717
- Di as activityIconOf,
3718
- Gi as activityJoinUrl,
3719
- Ot as activitySnippet,
3720
- Ct as activityTextParams,
3721
- Hi as activityTimelineText,
3722
- Rt as activityTimestamp,
3723
- b as activityTypeInfo,
3724
- oa as actorKey,
3725
- Qa as addExampleCandidate,
3726
- ie as addWorkingMs,
3727
- pc as agePresenceEntry,
3728
- Tr as aiAttachmentKind,
3729
- Os as aiAttachmentRejection,
3730
- ye as aiBudgetLimit,
3731
- no as aiBudgetPeriodKey,
3732
- Dt as aiBudgetPeriodStart,
3733
- to as aiBudgetState,
3734
- eo as aiVendorAcceptsAttachment,
3735
- Ji as aiVendorDefaultModel,
3736
- qi as aiVendorLabel,
3737
- Qi as aiVendorNeedsBaseUrl,
3738
- Zi as aiVendorsWith,
3739
- bt as appNameFromPath,
3740
- za as applyRounding,
3741
- wo as applySignature,
3742
- Pn as approvalRate,
3743
- lo as artifactBodyBytes,
3744
- uo as artifactOutline,
3745
- po as artifactToMarkdown,
3746
- la as assignmentMismatch,
3747
- bo as assignmentScopeKey,
3748
- So as assignmentSubject,
3749
- Wi as buildActivityPreview,
3750
- Ks as buildChannelIntents,
3751
- fo as buildShareKeys,
3752
- Qr as buildWindow,
3753
- oe as calendarOf,
3754
- jo as canNestUnder,
3755
- $a as canParent,
3756
- Ki as carriesText,
3757
- Go as categoryLabel,
3758
- br as categoryOf,
3759
- Hs as channelKindForScheme,
3760
- $i as channelKindOf,
3761
- Ga as checkInOverdueMs,
3762
- fa as clampStepMaxTokens,
3763
- vo as classifyMail,
3764
- jc as cleanMessageMarkdown,
3765
- Bc as cleanMessageText,
3766
- Ds as compareAssistRank,
3767
- ar as compareWorkTypes,
3768
- ws as cycleOrder,
3769
- Is as cycleState,
3770
- _o as decideAssignmentState,
3771
- Nc as decideCadence,
3772
- Ps as decideIncomingCall,
3773
- wn as defaultLocaleOf,
3774
- Es as defaultStatusKey,
3775
- zs as defineIntent,
3776
- Sn as depthOf,
3777
- dc as derivePresence,
3778
- Us as disabledIntentsFromCapabilities,
3779
- oc as documentKindOf,
3780
- Ca as dueAtOf,
3781
- Va as elapsedSeconds,
3782
- Lc as emailDomain,
3783
- Kc as endpointKey,
3784
- Kr as extractParams,
3785
- Jr as extractTerms,
3786
- Bs as filterByEndpoint,
3787
- Fs as filterByIntent,
3788
- Cr as filterByTargetScheme,
3789
- K as findAiVendor,
3790
- La as fixedLevelForName,
3791
- us as fixedTypeForName,
3792
- ds as fixedTypes,
3793
- sc as flattenLocales,
3794
- Lt as floorToPeriod,
3795
- kn as formatActingIdentity,
3796
- Ya as formatClock,
3797
- Xa as formatHm,
3798
- ms as formatItemKey,
3799
- $t as formatPeriod,
3800
- xa as formatSlaDuration,
3801
- vs as freshSources,
3802
- zi as getActivitySeenUserIds,
3803
- Io as getContactEndpoints,
3804
- Po as getShortTitle,
3805
- Lo as getUrgencyScore,
3806
- Ta as hasReacted,
3807
- Pa as healthCategory,
3808
- Ua as healthsInCategory,
3809
- it as heightOf,
3810
- Ko as helpCenterText,
3811
- ua as humanizeAction,
3812
- Dn as interactionIdOf,
3813
- ns as isAgentUser,
3814
- Do as isAssigned,
3815
- yo as isAssignmentTerminal,
3816
- Nn as isAssignmentTrigger,
3817
- ya as isAutoReady,
3818
- En as isAwaitingThem,
3819
- Yi as isChatMessageActivity,
3820
- $o as isClosed,
3821
- Bi as isConnectedType,
3822
- _c as isDeepLink,
3823
- _n as isDescendant,
3824
- Mo as isEligible,
3825
- Xi as isEmailActivity,
3826
- Fc as isHtmlBody,
3827
- Aa as isInFlight,
3828
- dn as isInteractionUnseen,
3829
- Tc as isLandingPath,
3830
- on as isLikelyBulk,
3831
- We as isMessageShape,
3832
- Li as isMessageType,
3833
- Br as isMoreSpecificPattern,
3834
- Ve as isNoteShape,
3835
- Jn as isOpenClock,
3836
- Cs as isOutwardTool,
3837
- yn as isParked,
3838
- Bn as isPaused,
3839
- Fi as isPlaybookAuthoredType,
3840
- Pc as isPublicEmailDomain,
3841
- Ic as isPublicPath,
3842
- bn as isReminderActive,
3843
- Ui as isReplyableType,
3844
- xo as isSlaAtRisk,
3845
- ba as isTerminal,
3846
- Oo as isThreadLongEnough,
3847
- ji as isTranscriptType,
3848
- Ss as isWorkClosed,
3849
- Ja as isWorkTypeVisible,
3850
- ys as itemDossierKeys,
3851
- yr as ladderFor,
3852
- tr as levelIn,
3853
- Ne as levelOrder,
3854
- Uo as linkLabel,
3855
- ro as listeningAllowed,
3856
- Bo as localeInstruction,
3857
- Fo as localeName,
3858
- Ho as localesOf,
3859
- Dc as looksLikeEmail,
3860
- js as matchContactToIntents,
3861
- jr as matchPublicRoute,
3862
- Vo as mcpCredentialScope,
3863
- zo as mcpToolPrefix,
3864
- Ka as measureRatio,
3865
- vc as mergeShownKeys,
3866
- kt as messageCountsAs,
3867
- Uc as needsPhoneRegion,
3868
- Pi as nestsUnderParent,
3869
- va as nextSlaClock,
3870
- co as normalizeArtifactBlocks,
3871
- Ri as normalizeBlocks,
3872
- At as normalizeEmail,
3873
- I as normalizeExample,
3874
- lc as notificationPrefKey,
3875
- Zr as novelty,
3876
- tc as operationDescriptor,
3877
- ec as operationsForKind,
3878
- Fa as paceRatio,
3879
- ko as parkMarksById,
3880
- ra as parseActingIdentity,
3881
- wa as parseClockMinutes,
3882
- gs as parseItemKey,
3883
- Ur as pathToRegex,
3884
- Ia as pauseBitFor,
3885
- oo as periodsInRange,
3886
- $c as phoneSuffix,
3887
- Co as pickMailHeaders,
3888
- It as plainTextFromMarkdown,
3889
- Oa as planSlaEvent,
3890
- vn as playbookActor,
3891
- ha as procedureOf,
3892
- bs as projectDossierKeys,
3893
- Fr as publicBasePathFor,
3894
- wc as publicRoutePatterns,
3895
- Eo as reactionWakesAssignment,
3896
- Y as readPath,
3897
- Oe as readStepError,
3898
- hn as recencyOf,
3899
- xn as refKey,
3900
- si as registrableDomain,
3901
- ur as rejectExampleCandidate,
3902
- Qo as relatedByDefault,
3903
- te as remainingMsOf,
3904
- kr as resolveAccountCapabilities,
3905
- q as resolveActivityText,
3906
- Mr as resolveChannelIntents,
3907
- en as resolveSignature,
3908
- fc as resolveWorkMode,
3909
- Ac as resourceKindOf,
3910
- Ha as rollupChildren,
3911
- ia as runActor,
3912
- Sa as runInteractionId,
3913
- zt as sanitizeInline,
3914
- Gr as sanitizeTranscript,
3915
- Ro as scoreInteraction,
3916
- as as scoreWorkItem,
3917
- Wo as selectLenses,
3918
- Ls as sessionsHoldCannotReach,
3919
- $s as sessionsToHold,
3920
- Ze as shareKeyForTeam,
3921
- Je as shareKeyForUser,
3922
- mo as shareKeysForViewer,
3923
- mc as shouldRunAudioPipeline,
3924
- Na as slaBadgeTone,
3925
- No as slaHoursByInbox,
3926
- An as slaHoursFor,
3927
- Ar as sortStatuses,
3928
- Ir as sourceKey,
3929
- As as statusIn,
3930
- ga as stepsOf,
3931
- Da as strategyAncestorKeysFor,
3932
- Ra as strategyDossierKeys,
3933
- dt as strategyItemScopeKey,
3934
- Mt as stripHtml,
3935
- Ea as subjectKeyOf,
3936
- ot as subjectOf,
3937
- Rs as subjectRef,
3938
- hs as suggestProjectKey,
3939
- Ba as suggestedHealth,
3940
- _a as summarizeReactions,
3941
- ca as targetById,
3942
- sa as targetForActivityType,
3943
- Wa as targetOrder,
3944
- Cn as toActingIdentity,
3945
- Ue as toE164,
3946
- go as toolSourceKinds,
3947
- dr as topicOfferedForTeam,
3948
- ts as topicsForTeam,
3949
- lr as truncateExample,
3950
- ls as typeIn,
3951
- cs as typesFor,
3952
- _s as uniqueWorkStatusKey,
3953
- qa as uniqueWorkTypeKey,
3954
- Bt as usageMetricId,
3955
- ao as usageMetrics,
3956
- Ts as validateStatuses,
3957
- aa as valueAtPath,
3958
- re as waitHoursOf,
3959
- Ao as wakesAssignment,
3960
- fs as workActivityScopeKey,
3961
- hr as workItemScopeKey,
3962
- pt as workProjectScopeKey,
3963
- ja as workRatio,
3964
- Er as workStatusKey,
3965
- or as workTypeKey,
3966
- Z as workingMsBetween
3872
+ Qi as ACTIVE_ASSIGNMENT_STATUSES,
3873
+ k as ACTIVITY_CATALOG,
3874
+ oo as AI_ATTACHMENT_LIMITS,
3875
+ Sc as AI_ATTACHMENT_MAX_PER_TURN,
3876
+ Ec as AI_ATTACHMENT_TURN_BUDGET,
3877
+ it as AI_VENDORS,
3878
+ en as ALLOWED_LINK_SCHEMES,
3879
+ ol as APP_PERMISSIONS,
3880
+ Oe as ARTIFACT_MAX_BLOCKS,
3881
+ Wi as ARTIFACT_MAX_BODY_BYTES,
3882
+ Q as ARTIFACT_MAX_CELL_LEN,
3883
+ xe as ARTIFACT_MAX_KPI_ITEMS,
3884
+ Ce as ARTIFACT_MAX_LIST_ITEMS,
3885
+ Re as ARTIFACT_MAX_TABLE_COLUMNS,
3886
+ Ne as ARTIFACT_MAX_TABLE_ROWS,
3887
+ st as ARTIFACT_MAX_TEXT_LEN,
3888
+ un as ASSIGNMENT_SCOPE_KIND,
3889
+ Mc as ASSIST_BANDS,
3890
+ Ic as ASSIST_SOURCE_PROVIDER_GROUP,
3891
+ Tn as ATTENTION_STATUSES,
3892
+ Pr as AT_RISK_GAP,
3893
+ Ct as AUTH_APP_NAME,
3894
+ br as AUTO_READY_MIN_PROPOSALS,
3895
+ Ar as AUTO_READY_RATE,
3896
+ Gt as ActivityTypeRegistry,
3897
+ ki as BUILT_IN_ONLY,
3898
+ wn as BULK_PENALTY,
3899
+ ko as CADENCE_FLOOR_MS,
3900
+ vo as CADENCE_MIN_NEW_SEGMENTS,
3901
+ Oo as CADENCE_MIN_NOVELTY,
3902
+ Mo as CADENCE_WINDOW_MS,
3903
+ is as CLASSIFY_VARS,
3904
+ Vc as CONNECTOR_PROVIDER_GROUP,
3905
+ zc as CONTEXT_COLLECT_SERVICE,
3906
+ Ki as CORE_DIMENSIONS,
3907
+ uo as CommunicationScheme,
3908
+ mn as DAY_MS,
3909
+ Dr as DEFAULT_CHECK_IN_DAYS,
3910
+ Qn as DEFAULT_FORECAST_WEEKS,
3911
+ $a as DEFAULT_MEMORY_BUDGET,
3912
+ Lo as DEFAULT_PHONE_REGION,
3913
+ Fa as DEMAND_SOURCE_PROVIDER_GROUP,
3914
+ Zc as DOCUMENT_APPLY_SERVICE,
3915
+ qc as DOCUMENT_DESCRIBE_SERVICE,
3916
+ Jc as DOCUMENT_INSPECT_SERVICE,
3917
+ kt as DOCUMENT_OPERATIONS,
3918
+ ss as EMPTY_WORKFLOW,
3919
+ Bc as FEATURE_FOLDER_MANAGEMENT,
3920
+ Gc as FEATURE_MESSAGE_REACTIONS,
3921
+ jc as FEATURE_REMOTE_SEARCH,
3922
+ ge as FIXED_KINDS,
3923
+ z as FIXED_LEVELS,
3924
+ be as FIXED_TYPES,
3925
+ Mn as FOLLOW_UP_HOURS,
3926
+ fn as HOUR_MS,
3927
+ li as HTML_BODY_RE,
3928
+ v as INELIGIBLE,
3929
+ el as INSTALLATION_HEADER,
3930
+ fr as INTERACTION_KIND,
3931
+ Fc as InteractionParticipantRole,
3932
+ Dn as KB_FALLBACK_LOCALE,
3933
+ Pe as KB_LOCALES,
3934
+ Ae as LOOSE_STATUSES,
3935
+ An as MAIL_HINT_HEADERS,
3936
+ fi as MAX_ACTIONS,
3937
+ dn as MAX_ASSIGNMENT_TURNS,
3938
+ ui as MAX_BLOCKS,
3939
+ gt as MAX_COLLECTION_DEPTH,
3940
+ El as MAX_EDITABLE_FILE_BYTES,
3941
+ di as MAX_FIELDS,
3942
+ pi as MAX_LIST_ITEMS,
3943
+ Na as MAX_MEMORY_BROWSE,
3944
+ Da as MAX_MEMORY_BUDGET,
3945
+ Ra as MAX_MEMORY_CHARS,
3946
+ $o as MAX_SHOWN_KEYS,
3947
+ Br as MAX_TOPIC_CANDIDATES,
3948
+ Hr as MAX_TOPIC_EXAMPLES,
3949
+ te as MAX_TOPIC_EXAMPLE_CHARS,
3950
+ Sl as MAX_VIEWABLE_FILE_BYTES,
3951
+ xa as MIN_MEMORY_BUDGET,
3952
+ kl as NAV_NOTICE_SLOT,
3953
+ nl as NOTIFICATION_SOURCE_PROVIDER_GROUP,
3954
+ Ur as OFF_TRACK_GAP,
3955
+ Pa as ONBOARDING_SOURCE_PROVIDER_GROUP,
3956
+ le as PAUSE_SNOOZED,
3957
+ ue as PAUSE_WAITING_FOR_CUSTOMER,
3958
+ Ee as PHONE_REGIONS,
3959
+ vt as PRESENCE_ONLINE_WINDOW_MS,
3960
+ yo as PRESENCE_SURVIVES_OFFLINE,
3961
+ Ka as PROFILE_TOOL_DISPOSITIONS,
3962
+ Kc as PROVIDER_FEATURE_MESSAGE_TEMPLATES,
3963
+ Uc as PROVIDER_FEATURE_MESSAGE_WINDOW,
3964
+ jo as PUBLIC_EMAIL_DOMAINS,
3965
+ Ue as READ_STEP_TYPES,
3966
+ Pn as RELATED_SUBJECT_KINDS,
3967
+ Mt as RESERVED_STATUS_KEYS,
3968
+ tc as RESERVED_TYPE_KEYS,
3969
+ pl as RESOURCE_ATTACHED_SERVICE,
3970
+ ll as RESOURCE_DESCRIBE_SERVICE,
3971
+ dl as RESOURCE_RESOLVE_SERVICE,
3972
+ ul as RESOURCE_SEARCH_SERVICE,
3973
+ ir as SCHEDULE_ENTRY_SCOPE_KIND,
3974
+ gl as SCOPE_READ_ROUTE,
3975
+ ml as SCOPE_RELATED_ROUTE,
3976
+ Ml as SETTINGS_CATEGORIES,
3977
+ aa as SIGNATURE_INTENTS,
3978
+ In as SLA_HOURS_BY_PRIORITY,
3979
+ As as SLA_METRICS,
3980
+ Es as SLA_PAUSE_REASONS,
3981
+ hr as STEP_MAX_TOKENS_MAX,
3982
+ gr as STEP_MAX_TOKENS_MIN,
3983
+ Rr as STRATEGY_ITEM_SCOPE_KIND,
3984
+ bn as SUMMARY_MIN_LAST_CHARS,
3985
+ yn as SUMMARY_MIN_MESSAGES,
3986
+ Tl as SYNC_RUN_MAX_ERRORS,
3987
+ _l as SYNC_TARGET_PROVIDER_GROUP,
3988
+ ln as TERMINAL_ASSIGNMENT_STATUSES,
3989
+ Er as TERMINAL_RUN_STATUSES,
3990
+ os as TRIGGER_VARS,
3991
+ Wn as UNKNOWN_KIND,
3992
+ xr as UNKNOWN_LEVEL_ORDER,
3993
+ Wc as UNSUPPORTED,
3994
+ qt as USAGE_DIMENSIONS,
3995
+ Jt as USAGE_DIMENSION_IDS,
3996
+ ar as WORKSTREAM_SCOPE_KIND,
3997
+ Yr as WORK_ACTIVITY_SCOPE_KIND,
3998
+ Ua as WORK_AREAS,
3999
+ Js as WORK_COMMENT_ADDED,
4000
+ ac as WORK_CYCLE_SYNC_KIND,
4001
+ Zs as WORK_ITEM_ASSIGNED,
4002
+ zr as WORK_ITEM_SCOPE_KIND,
4003
+ Qs as WORK_ITEM_STATUS_CHANGED,
4004
+ Xr as WORK_PROJECT_SCOPE_KIND,
4005
+ j as W_PRIORITY,
4006
+ Xs as acceptExampleCandidate,
4007
+ cr as actingIdentityKey,
4008
+ Vs as activeWorkTypes,
4009
+ gi as activityIconOf,
4010
+ Ii as activityJoinUrl,
4011
+ Ft as activitySnippet,
4012
+ Ht as activityTextParams,
4013
+ wi as activityTimelineText,
4014
+ Wt as activityTimestamp,
4015
+ S as activityTypeInfo,
4016
+ Za as actorKey,
4017
+ zs as addExampleCandidate,
4018
+ he as addWorkingMs,
4019
+ al as agePresenceEntry,
4020
+ ro as aiAttachmentKind,
4021
+ _c as aiAttachmentRejection,
4022
+ ve as aiBudgetLimit,
4023
+ Pi as aiBudgetPeriodKey,
4024
+ Vt as aiBudgetPeriodStart,
4025
+ Li as aiBudgetState,
4026
+ $i as aiVendorAcceptsAttachment,
4027
+ Ri as aiVendorDefaultModel,
4028
+ Ni as aiVendorLabel,
4029
+ Di as aiVendorNeedsBaseUrl,
4030
+ xi as aiVendorsWith,
4031
+ Nt as appNameFromPath,
4032
+ Hs as applyRounding,
4033
+ sa as applySignature,
4034
+ yr as approvalRate,
4035
+ zi as artifactBodyBytes,
4036
+ Xi as artifactOutline,
4037
+ Yi as artifactToMarkdown,
4038
+ ns as assignmentMismatch,
4039
+ ta as assignmentScopeKey,
4040
+ oa as assignmentSubject,
4041
+ Ba as belongsOnCalendar,
4042
+ Mi as buildActivityPreview,
4043
+ xc as buildChannelIntents,
4044
+ qi as buildShareKeys,
4045
+ Do as buildWindow,
4046
+ ye as calendarOf,
4047
+ Ia as canNestUnder,
4048
+ vs as canParent,
4049
+ Ei as carriesText,
4050
+ ka as categoryLabel,
4051
+ Zr as categoryOf,
4052
+ Pc as channelKindForScheme,
4053
+ hi as channelKindOf,
4054
+ Us as checkInOverdueMs,
4055
+ as as clampStepMaxTokens,
4056
+ fa as classifyMail,
4057
+ Ll as cleanMessageMarkdown,
4058
+ $l as cleanMessageText,
4059
+ vc as compareAssistRank,
4060
+ Fr as compareWorkTypes,
4061
+ yt as countsAsPlanned,
4062
+ Ga as coverageFor,
4063
+ Vn as coversWorkstream,
4064
+ bc as cycleOrder,
4065
+ Ac as cycleState,
4066
+ ia as decideAssignmentState,
4067
+ Il as decideCadence,
4068
+ Nc as decideIncomingCall,
4069
+ $n as defaultLocaleOf,
4070
+ mc as defaultStatusKey,
4071
+ Hc as defineIntent,
4072
+ Rn as depthOf,
4073
+ il as derivePresence,
4074
+ Bi as describeClause,
4075
+ Rc as disabledIntentsFromCapabilities,
4076
+ Qc as documentKindOf,
4077
+ _s as dueAtOf,
4078
+ Fs as elapsedSeconds,
4079
+ Cl as emailDomain,
4080
+ xl as endpointKey,
4081
+ Hn as erlangC,
4082
+ Eo as extractParams,
4083
+ Ro as extractTerms,
4084
+ $c as filterByEndpoint,
4085
+ Dc as filterByIntent,
4086
+ lo as filterByTargetScheme,
4087
+ Hi as filterableDimensions,
4088
+ V as findAiVendor,
4089
+ Cs as fixedLevelForName,
4090
+ oc as fixedTypeForName,
4091
+ ic as fixedTypes,
4092
+ tl as flattenLocales,
4093
+ B as floorToPeriod,
4094
+ za as forecastIntervals,
4095
+ sr as formatActingIdentity,
4096
+ js as formatClock,
4097
+ Bs as formatHm,
4098
+ cc as formatItemKey,
4099
+ C as formatPeriod,
4100
+ Is as formatSlaDuration,
4101
+ wc as freshSources,
4102
+ vi as getActivitySeenUserIds,
4103
+ ca as getContactEndpoints,
4104
+ Ea as getShortTitle,
4105
+ Aa as getUrgencyScore,
4106
+ hs as hasReacted,
4107
+ Ns as healthCategory,
4108
+ Rs as healthsInCategory,
4109
+ ht as heightOf,
4110
+ _a as helpCenterText,
4111
+ rs as humanizeAction,
4112
+ mr as interactionIdOf,
4113
+ qs as isAgentUser,
4114
+ ya as isAssigned,
4115
+ ea as isAssignmentTerminal,
4116
+ dr as isAssignmentTrigger,
4117
+ us as isAutoReady,
4118
+ Nn as isAwaitingThem,
4119
+ Ci as isChatMessageActivity,
4120
+ ba as isClosed,
4121
+ _i as isConnectedType,
4122
+ hl as isDeepLink,
4123
+ xn as isDescendant,
4124
+ la as isEligible,
4125
+ Oi as isEmailActivity,
4126
+ Dl as isHtmlBody,
4127
+ ps as isInFlight,
4128
+ _n as isInteractionUnseen,
4129
+ yl as isLandingPath,
4130
+ hn as isLikelyBulk,
4131
+ rt as isMessageShape,
4132
+ yi as isMessageType,
4133
+ _o as isMoreSpecificPattern,
4134
+ ot as isNoteShape,
4135
+ Nr as isOpenClock,
4136
+ Tc as isOutwardTool,
4137
+ vn as isParked,
4138
+ Sr as isPaused,
4139
+ Si as isPlaybookAuthoredType,
4140
+ Nl as isPublicEmailDomain,
4141
+ Al as isPublicPath,
4142
+ On as isReminderActive,
4143
+ Ai as isReplyableType,
4144
+ ga as isSlaAtRisk,
4145
+ ds as isTerminal,
4146
+ da as isThreadLongEnough,
4147
+ Ti as isTranscriptType,
4148
+ gc as isWorkClosed,
4149
+ Ws as isWorkTypeVisible,
4150
+ dc as itemDossierKeys,
4151
+ G as kindFor,
4152
+ Jr as ladderFor,
4153
+ $r as levelIn,
4154
+ pe as levelOrder,
4155
+ Sa as linkLabel,
4156
+ Ui as listeningAllowed,
4157
+ wa as localeInstruction,
4158
+ Ta as localeName,
4159
+ Ma as localesOf,
4160
+ vl as looksLikeEmail,
4161
+ Lc as matchContactToIntents,
4162
+ To as matchPublicRoute,
4163
+ Oa as mcpCredentialScope,
4164
+ Ca as mcpToolPrefix,
4165
+ xs as measureRatio,
4166
+ wl as mergeShownKeys,
4167
+ Kt as messageCountsAs,
4168
+ ji as metricOption,
4169
+ Rl as needsPhoneRegion,
4170
+ bi as nestsUnderParent,
4171
+ Os as nextLevelBelow,
4172
+ Ts as nextSlaClock,
4173
+ Vi as normalizeArtifactBlocks,
4174
+ mi as normalizeBlocks,
4175
+ Rt as normalizeEmail,
4176
+ O as normalizeExample,
4177
+ rl as notificationPrefKey,
4178
+ xo as novelty,
4179
+ Yc as operationDescriptor,
4180
+ Xc as operationsForKind,
4181
+ ee as overlapSeconds,
4182
+ ja as overlaps,
4183
+ Ds as paceRatio,
4184
+ ua as parkMarksById,
4185
+ qa as parseActingIdentity,
4186
+ ys as parseClockMinutes,
4187
+ lc as parseItemKey,
4188
+ Ao as pathToRegex,
4189
+ bs as pauseBitFor,
4190
+ Fi as periodsInRange,
4191
+ Ol as phoneSuffix,
4192
+ pa as pickMailHeaders,
4193
+ Pt as plainTextFromMarkdown,
4194
+ Ss as planSlaEvent,
4195
+ Wa as plannedBillable,
4196
+ Jn as plannedWorkTypeKey,
4197
+ ur as playbookActor,
4198
+ ls as procedureOf,
4199
+ pc as projectDossierKeys,
4200
+ So as publicBasePathFor,
4201
+ bl as publicRoutePatterns,
4202
+ ra as reactionWakesAssignment,
4203
+ oe as readPath,
4204
+ Ke as readStepError,
4205
+ kn as recencyOf,
4206
+ pr as refKey,
4207
+ Bo as registrableDomain,
4208
+ Gr as rejectExampleCandidate,
4209
+ La as relatedByDefault,
4210
+ de as remainingMsOf,
4211
+ Gn as requiredAgents,
4212
+ qn as requirementFor,
4213
+ so as resolveAccountCapabilities,
4214
+ ie as resolveActivityText,
4215
+ ao as resolveChannelIntents,
4216
+ pn as resolveSignature,
4217
+ sl as resolveWorkMode,
4218
+ fl as resourceKindOf,
4219
+ Ps as rollupChildren,
4220
+ Ja as runActor,
4221
+ ms as runInteractionId,
4222
+ on as sanitizeInline,
4223
+ Io as sanitizeTranscript,
4224
+ Xa as scheduleEntryScopeKey,
4225
+ ha as scoreInteraction,
4226
+ ec as scoreWorkItem,
4227
+ va as selectLenses,
4228
+ Bn as serviceLevel,
4229
+ Cc as sessionsHoldCannotReach,
4230
+ Oc as sessionsToHold,
4231
+ ut as shareKeyForTeam,
4232
+ lt as shareKeyForUser,
4233
+ Ji as shareKeysForViewer,
4234
+ Va as shortfalls,
4235
+ cl as shouldRunAudioPipeline,
4236
+ ws as slaBadgeTone,
4237
+ ma as slaHoursByInbox,
4238
+ Cn as slaHoursFor,
4239
+ Qr as sortStatuses,
4240
+ io as sourceKey,
4241
+ Ha as spreadSeconds,
4242
+ fc as statusIn,
4243
+ cs as stepsOf,
4244
+ ks as strategyAncestorKeysFor,
4245
+ Ms as strategyDossierKeys,
4246
+ wt as strategyItemScopeKey,
4247
+ Ut as stripHtml,
4248
+ fs as subjectKeyOf,
4249
+ bt as subjectOf,
4250
+ kc as subjectRef,
4251
+ uc as suggestProjectKey,
4252
+ $s as suggestedHealth,
4253
+ gs as summarizeReactions,
4254
+ ts as targetById,
4255
+ es as targetForActivityType,
4256
+ Ks as targetOrder,
4257
+ lr as toActingIdentity,
4258
+ qe as toE164,
4259
+ Zi as toolSourceKinds,
4260
+ Wr as topicOfferedForTeam,
4261
+ Ys as topicsForTeam,
4262
+ jn as trafficIntensity,
4263
+ jr as truncateExample,
4264
+ rc as typeIn,
4265
+ nc as typesFor,
4266
+ hc as uniqueWorkStatusKey,
4267
+ Gs as uniqueWorkTypeKey,
4268
+ Zt as usageMetricId,
4269
+ Gi as usageMetrics,
4270
+ yc as validateStatuses,
4271
+ Qa as valueAtPath,
4272
+ me as waitHoursOf,
4273
+ na as wakesAssignment,
4274
+ sc as workActivityScopeKey,
4275
+ qr as workItemScopeKey,
4276
+ It as workProjectScopeKey,
4277
+ Ls as workRatio,
4278
+ eo as workStatusKey,
4279
+ Kr as workTypeKey,
4280
+ ce as workingMsBetween,
4281
+ Ya as workstreamScopeKey
3967
4282
  };