@opencxh/domain 1.158.0 → 1.159.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,10 @@
1
- const un = 10, dn = 10, pn = 10, fn = 5, Ee = /* @__PURE__ */ new Set([
1
+ function gn(e) {
2
+ return e.type === "EMAIL_RECEIVED" || e.type === "EMAIL_SENT";
3
+ }
4
+ function hn(e) {
5
+ return e.type === "CHAT_MESSAGE_SENT" || e.type === "CHAT_MESSAGE_RECEIVED";
6
+ }
7
+ const $ = 10, _ = 10, I = 10, M = 5, Me = /* @__PURE__ */ new Set([
2
8
  "header",
3
9
  "section",
4
10
  "context",
@@ -8,36 +14,36 @@ const un = 10, dn = 10, pn = 10, fn = 5, Ee = /* @__PURE__ */ new Set([
8
14
  "actions",
9
15
  "attachments"
10
16
  ]);
11
- function _(e) {
17
+ function C(e) {
12
18
  if (typeof e == "string") return e.length > 0;
13
19
  if (!e || typeof e != "object") return !1;
14
20
  const t = e;
15
21
  return typeof t.key == "string" || typeof t.value == "string";
16
22
  }
17
- function mn(e, t = () => {
23
+ function An(e, t = () => {
18
24
  }) {
19
25
  if (!Array.isArray(e)) return [];
20
26
  const n = [];
21
27
  for (const i of e) {
22
- if (n.length >= 10) {
23
- t("more than 10 blocks; the rest was dropped");
28
+ if (n.length >= $) {
29
+ t("more than " + $ + " blocks; the rest was dropped");
24
30
  break;
25
31
  }
26
32
  if (!i || typeof i != "object") continue;
27
33
  const r = i;
28
- if (!Ee.has(r.type)) {
34
+ if (!Me.has(r.type)) {
29
35
  t("unknown block type " + String(r.type));
30
36
  continue;
31
37
  }
32
38
  switch (r.type) {
33
39
  case "header":
34
- if (!_(r.text)) {
40
+ if (!C(r.text)) {
35
41
  t("a header without text");
36
42
  continue;
37
43
  }
38
44
  break;
39
45
  case "context":
40
- if (!_(r.text)) {
46
+ if (!C(r.text)) {
41
47
  t("a context block without text");
42
48
  continue;
43
49
  }
@@ -49,19 +55,19 @@ function mn(e, t = () => {
49
55
  }
50
56
  break;
51
57
  case "section":
52
- Array.isArray(r.fields) && r.fields.length > 10 && (t("more than 10 fields in a section"), r.fields = r.fields.slice(0, 10));
58
+ Array.isArray(r.fields) && r.fields.length > _ && (t("more than " + _ + " fields in a section"), r.fields = r.fields.slice(0, _));
53
59
  break;
54
60
  case "list":
55
61
  if (!Array.isArray(r.items) || r.items.length === 0) {
56
62
  t("a list without items");
57
63
  continue;
58
64
  }
59
- r.items.length > 10 && (t("more than 10 list items"), r.items = r.items.slice(0, 10));
65
+ r.items.length > I && (t("more than " + I + " list items"), r.items = r.items.slice(0, I));
60
66
  break;
61
67
  case "actions": {
62
- const a = Array.isArray(r.elements) ? r.elements : [], o = a.filter((s) => s && s.action_id && s.invoke && _(s.text));
68
+ const a = Array.isArray(r.elements) ? r.elements : [], o = a.filter((s) => s && s.action_id && s.invoke && C(s.text));
63
69
  if (o.length !== a.length && t("an action without action_id, invoke or text"), o.length === 0) continue;
64
- o.length > 5 && t("more than 5 actions"), r.elements = o.slice(0, 5);
70
+ o.length > M && t("more than " + M + " actions"), r.elements = o.slice(0, M);
65
71
  break;
66
72
  }
67
73
  }
@@ -69,7 +75,7 @@ function mn(e, t = () => {
69
75
  }
70
76
  return n;
71
77
  }
72
- function Se(e) {
78
+ function Ce(e) {
73
79
  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();
74
80
  }
75
81
  function y(e) {
@@ -77,16 +83,16 @@ function y(e) {
77
83
  const t = Math.floor(e / 60), n = Math.floor(e % 60);
78
84
  return `${t}:${n.toString().padStart(2, "0")}`;
79
85
  }
80
- function x(e) {
86
+ function D(e) {
81
87
  return e ? ` — ${Math.floor(e / 60)}m ${e % 60}s` : "";
82
88
  }
83
- function I(e) {
89
+ function w(e) {
84
90
  return e?.split("@")?.[0] || e || "";
85
91
  }
86
92
  function b(e) {
87
93
  return e.map((t) => t.name).join(", ");
88
94
  }
89
- function O(e) {
95
+ function R(e) {
90
96
  return e === "meeting" ? "Meeting" : e === "video" ? "Video call" : "Audio call";
91
97
  }
92
98
  const m = {
@@ -96,7 +102,7 @@ const m = {
96
102
  channelKind: "voice",
97
103
  icon: "phone",
98
104
  snippet: () => "Gesprek gestart",
99
- timeline: (e) => e.direction === "inbound" ? `Inbound call started — ${I(e.payload.from)}` : `Outbound call started — ${I(e.payload.to)}`
105
+ timeline: (e) => e.direction === "inbound" ? `Inbound call started — ${w(e.payload.from)}` : `Outbound call started — ${w(e.payload.to)}`
100
106
  },
101
107
  VOICE_CALL_ANSWERED: {
102
108
  shape: "event",
@@ -124,14 +130,14 @@ const m = {
124
130
  channelKind: "voice",
125
131
  icon: "phone",
126
132
  snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${y(e.payload.duration)})` : ""}`,
127
- timeline: (e) => `Call ended${x(e.payload.duration)}`
133
+ timeline: (e) => `Call ended${D(e.payload.duration)}`
128
134
  },
129
135
  VOICE_CALL_MISSED: {
130
136
  shape: "event",
131
137
  channelKind: "voice",
132
138
  icon: "phone",
133
139
  snippet: () => "Gemiste oproep",
134
- timeline: (e) => `Missed call — ${I(e.payload.from)}`
140
+ timeline: (e) => `Missed call — ${w(e.payload.from)}`
135
141
  },
136
142
  VOICE_CALL_FAILED: {
137
143
  shape: "event",
@@ -206,7 +212,7 @@ const m = {
206
212
  replyable: !0,
207
213
  carriesText: !0,
208
214
  countsAs: "inbound_message",
209
- snippet: L
215
+ snippet: P
210
216
  },
211
217
  EMAIL_SENT: {
212
218
  shape: "message",
@@ -216,7 +222,7 @@ const m = {
216
222
  replyable: !0,
217
223
  carriesText: !0,
218
224
  countsAs: "outbound_message",
219
- snippet: L
225
+ snippet: P
220
226
  },
221
227
  /* ---- chat ---- */
222
228
  CHAT_MESSAGE_SENT: {
@@ -273,7 +279,7 @@ const m = {
273
279
  channelKind: "chat",
274
280
  icon: "message-circle",
275
281
  snippet: () => "Gesprek gestart",
276
- timeline: (e) => `${O(e.payload.callType)} started${e.payload.initiator ? ` by ${e.payload.initiator.name}` : ""}`,
282
+ timeline: (e) => `${R(e.payload.callType)} started${e.payload.initiator ? ` by ${e.payload.initiator.name}` : ""}`,
277
283
  joinUrl: (e) => e.payload.joinUrl
278
284
  },
279
285
  CHAT_CALL_ENDED: {
@@ -281,7 +287,7 @@ const m = {
281
287
  channelKind: "chat",
282
288
  icon: "message-circle",
283
289
  snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${y(e.payload.duration)})` : ""}`,
284
- timeline: (e) => `${O(e.payload.callType)} ended${x(e.payload.duration)}`,
290
+ timeline: (e) => `${R(e.payload.callType)} ended${D(e.payload.duration)}`,
285
291
  joinUrl: (e) => e.payload.joinUrl
286
292
  },
287
293
  CHAT_EVENT: {
@@ -407,55 +413,57 @@ const m = {
407
413
  timeline: (e, t) => `Assigned by ${t}`
408
414
  }
409
415
  };
410
- function L(e) {
411
- const t = e.payload, n = t.bodySnippet?.trim() || Se(t.body ?? "");
416
+ function P(e) {
417
+ const t = e.payload, n = t.bodySnippet?.trim() || Ce(t.body ?? "");
412
418
  return t.subject ? `${t.subject} — ${n}` : n;
413
419
  }
414
420
  function d(e) {
415
421
  return m[e];
416
422
  }
417
- function gn(e) {
423
+ function yn(e) {
418
424
  return d(e)?.icon ?? "circle";
419
425
  }
420
- function hn(e) {
426
+ function bn(e) {
421
427
  return d(e)?.channelKind;
422
428
  }
423
- function An(e) {
424
- const t = d(e)?.shape;
425
- return t === "message" || t === "note";
429
+ function le(e) {
430
+ return e === "message" || e === "note";
426
431
  }
427
- function yn(e) {
432
+ function En(e) {
433
+ return le(d(e)?.shape);
434
+ }
435
+ function Sn(e) {
428
436
  return d(e)?.replyable === !0;
429
437
  }
430
- function bn(e) {
438
+ function Tn(e) {
431
439
  return d(e)?.carriesText === !0;
432
440
  }
433
- function En(e) {
441
+ function _n(e) {
434
442
  return d(e)?.countsAs;
435
443
  }
436
- function Sn(e) {
444
+ function In(e) {
437
445
  return d(e)?.playbookAuthored === !0;
438
446
  }
439
- function Tn(e) {
447
+ function Mn(e) {
440
448
  return d(e)?.connected === !0;
441
449
  }
442
- function _n(e) {
450
+ function Cn(e) {
443
451
  const t = d(e);
444
452
  return t?.shape === "artifact" && t?.carriesText === !0;
445
453
  }
446
- function Te(e) {
454
+ function we(e) {
447
455
  const t = d(e.type)?.snippet;
448
456
  return t ? t(e) : "";
449
457
  }
450
- function In(e, t) {
458
+ function wn(e, t) {
451
459
  const n = d(e.type)?.timeline;
452
460
  return n ? n(e, t) : e.type.replace(/_/g, " ").toLowerCase();
453
461
  }
454
- function Mn(e) {
462
+ function kn(e) {
455
463
  const t = d(e.type)?.joinUrl;
456
464
  return t ? t(e) : void 0;
457
465
  }
458
- function w(e, t) {
466
+ function x(e, t) {
459
467
  let n = e;
460
468
  for (const i of t.split(".")) {
461
469
  if (n == null || typeof n != "object") return "";
@@ -463,26 +471,26 @@ function w(e, t) {
463
471
  }
464
472
  return n == null ? "" : typeof n == "string" ? n : typeof n == "number" || typeof n == "boolean" ? String(n) : "";
465
473
  }
466
- function k(e, t, n) {
474
+ function O(e, t, n) {
467
475
  if (e === void 0) return null;
468
476
  if (typeof e == "string") return e || null;
469
477
  if ("value" in e)
470
- return w(t, e.value) || null;
478
+ return x(t, e.value) || null;
471
479
  const i = {};
472
480
  for (const [a, o] of Object.entries(e.params ?? {}))
473
- i[a] = w(t, o);
481
+ i[a] = x(t, o);
474
482
  const r = n(e.key, i);
475
483
  return r === e.key ? null : r;
476
484
  }
477
- function _e(e, t) {
485
+ function ke(e, t) {
478
486
  if (!e || typeof e == "string" || "value" in e) return null;
479
487
  const n = {};
480
488
  for (const [i, r] of Object.entries(e.params ?? {}))
481
- n[i] = w(t, r);
489
+ n[i] = x(t, r);
482
490
  return { key: e.key, params: n };
483
491
  }
484
- const Ie = (e) => e;
485
- function $(e) {
492
+ const ve = (e) => e;
493
+ function U(e) {
486
494
  const t = m[e];
487
495
  return {
488
496
  type: e,
@@ -498,7 +506,7 @@ function $(e) {
498
506
  displayNameKey: t.displayNameKey
499
507
  };
500
508
  }
501
- function D(e) {
509
+ function K(e) {
502
510
  return {
503
511
  type: e.type,
504
512
  shape: e.shape,
@@ -513,21 +521,21 @@ function D(e) {
513
521
  displayNameKey: e.displayNameKey
514
522
  };
515
523
  }
516
- class Me {
517
- constructor(t = [], n = Ie) {
524
+ class Ne {
525
+ constructor(t = [], n = ve) {
518
526
  this.translate = n;
519
527
  for (const i of t)
520
528
  i?.type && (i.type in m || this.declared.has(i.type) || this.declared.set(i.type, i));
521
529
  }
522
530
  declared = /* @__PURE__ */ new Map();
523
531
  get(t) {
524
- if (t in m) return $(t);
532
+ if (t in m) return U(t);
525
533
  const n = this.declared.get(t);
526
- return n ? D(n) : void 0;
534
+ return n ? K(n) : void 0;
527
535
  }
528
536
  /** Alles wat als trigger aangeboden mag worden, ingebouwd en gedeclareerd. */
529
537
  triggerable() {
530
- const t = Object.keys(m).filter((i) => m[i].triggerable).map($), n = [...this.declared.values()].map(D).filter((i) => i.triggerable);
538
+ const t = Object.keys(m).filter((i) => m[i].triggerable).map(U), n = [...this.declared.values()].map(K).filter((i) => i.triggerable);
531
539
  return [...t, ...n];
532
540
  }
533
541
  /**
@@ -539,14 +547,14 @@ class Me {
539
547
  const i = m[t.type];
540
548
  if (i?.timeline) return i.timeline(t, n);
541
549
  const r = this.declared.get(t.type);
542
- return k(r?.text, t, this.translate) ?? t.type.replace(/_/g, " ").toLowerCase();
550
+ return O(r?.text, t, this.translate) ?? t.type.replace(/_/g, " ").toLowerCase();
543
551
  }
544
552
  /** De regel voor de inboxlijst. Leeg wanneer het type niets te tonen heeft. */
545
553
  snippet(t) {
546
554
  const n = m[t.type];
547
555
  if (n?.snippet) return n.snippet(t);
548
556
  const i = this.declared.get(t.type);
549
- return k(i?.text, t, this.translate) ?? "";
557
+ return O(i?.text, t, this.translate) ?? "";
550
558
  }
551
559
  /** De descriptor zoals hij binnenkwam; nodig om `text` als sleutel op te slaan. */
552
560
  descriptor(t) {
@@ -557,38 +565,75 @@ class Me {
557
565
  const n = this.declared.get(t)?.render;
558
566
  return n?.length ? n : void 0;
559
567
  }
568
+ /**
569
+ * Dezelfde semantische vragen als de losse accessors in `catalog.ts`, maar dan óók voor
570
+ * types die een app declareerde.
571
+ *
572
+ * Dat verschil is de reden dat deze methodes bestaan. `isMessageType(type)` leest alleen
573
+ * `ACTIVITY_CATALOG`, dus een gedeclareerd type met `shape: "message"` gaf daar `false` —
574
+ * een helpdesk-app kon een berichtsoort meebrengen die vervolgens niet meetelde als
575
+ * gesprek, niet antwoordbaar was en niet in de analytics landde. Wie een registry bij de
576
+ * hand heeft, hoort deze te gebruiken; wie er geen heeft valt terug op de ingebouwde.
577
+ *
578
+ * De regel zelf staat maar op één plek: {@link isMessageShape} en de velden van
579
+ * {@link ResolvedActivityType}.
580
+ */
581
+ isMessage(t) {
582
+ return le(this.get(t)?.shape);
583
+ }
584
+ /** Kan een mens hierop antwoorden? Notities niet — die gaan nergens heen. */
585
+ isReplyable(t) {
586
+ return this.get(t)?.replyable === !0;
587
+ }
588
+ /** Leesbare inhoud voor een model: berichten, notities én transcripten. */
589
+ carriesText(t) {
590
+ return this.get(t)?.carriesText === !0;
591
+ }
592
+ /** Telt mee als in- of uitgaand bericht in de analytics-rollup. */
593
+ countsAs(t) {
594
+ return this.get(t)?.countsAs;
595
+ }
596
+ /** `mail` | `chat` | `voice` | `video`, of `undefined` voor een levenscyclus-event. */
597
+ channelKind(t) {
598
+ return this.get(t)?.channelKind;
599
+ }
600
+ /** Transcript-achtig artefact: meegeleverde inhoud die leesbare tekst draagt. */
601
+ isTranscript(t) {
602
+ const n = this.get(t);
603
+ return n?.shape === "artifact" && n.carriesText;
604
+ }
560
605
  /** De vertaler die bij deze registry hoort, voor het oplossen van blokteksten. */
561
606
  get translator() {
562
607
  return this.translate;
563
608
  }
564
609
  }
565
- const Cn = new Me(), R = 140;
566
- function Ce(e) {
610
+ const vn = new Ne(), j = 140;
611
+ function xe(e) {
567
612
  const t = e.trim();
568
- return t.length <= R ? t : t.slice(0, R - 1).trimEnd() + "…";
613
+ return t.length <= j ? t : t.slice(0, j - 1).trimEnd() + "…";
569
614
  }
570
- function vn(e, t) {
571
- const n = _e(t?.text, e), i = t ? k(t.text, e, (r) => r) : null;
615
+ function Nn(e, t) {
616
+ const n = ke(t?.text, e), i = t ? O(t.text, e, (r) => r) : null;
572
617
  return {
573
618
  activityId: e.id,
574
619
  type: e.type,
575
- snippet: Ce(i ?? Te(e)),
620
+ snippet: xe(i ?? we(e)),
576
621
  authorName: e.author?.name ?? "",
577
622
  direction: e.direction,
578
623
  createdAt: e.createdAt ?? Date.now(),
579
624
  ...n ? { snippetKey: n.key, snippetParams: n.params } : {}
580
625
  };
581
626
  }
582
- function wn(e, t, n = []) {
627
+ function xn(e, t, n = []) {
583
628
  const i = e.createdAt;
584
629
  if (!i) return [];
585
630
  const r = new Set(n);
586
631
  return e.author.type === "user" && e.author.id && r.add(e.author.id), Object.entries(t).filter(([a, o]) => o >= i && !r.has(a)).map(([a]) => a);
587
632
  }
588
- function kn(e) {
633
+ function On(e) {
589
634
  return e.createdAt ?? 0;
590
635
  }
591
- const Nn = [
636
+ const Ln = [
592
637
  { id: "agent", label: "Agent", labelSource: "user" },
593
638
  { id: "team", label: "Team", labelSource: "team" },
594
639
  { id: "inbox", label: "Inbox", labelSource: "inbox" },
@@ -598,54 +643,54 @@ const Nn = [
598
643
  { id: "handledBy", label: "Afhandelaar", labelSource: "raw" },
599
644
  { id: "time", label: "Tijd", labelSource: "raw" }
600
645
  ];
601
- function xn(e) {
646
+ function $n(e) {
602
647
  const t = [];
603
648
  for (const n of Object.keys(e))
604
649
  for (const i of Object.keys(e[n]))
605
650
  t.push({ lang: n, key: i, value: e[n][i] });
606
651
  return t;
607
652
  }
608
- function M(e) {
653
+ function k(e) {
609
654
  return e < 10 ? `0${e}` : `${e}`;
610
655
  }
611
- function ve(e, t) {
612
- const n = new Date(e), i = `${n.getUTCFullYear()}-${M(n.getUTCMonth() + 1)}-${M(n.getUTCDate())}`;
613
- return t === "day" ? i : `${i}T${M(n.getUTCHours())}`;
656
+ function Oe(e, t) {
657
+ const n = new Date(e), i = `${n.getUTCFullYear()}-${k(n.getUTCMonth() + 1)}-${k(n.getUTCDate())}`;
658
+ return t === "day" ? i : `${i}T${k(n.getUTCHours())}`;
614
659
  }
615
- function we(e, t) {
660
+ function Le(e, t) {
616
661
  const n = new Date(e);
617
662
  return n.setUTCMinutes(0, 0, 0), t === "day" && n.setUTCHours(0), n.getTime();
618
663
  }
619
- const ke = 36e5, Ne = 864e5;
620
- function On(e, t, n) {
621
- const i = n === "hour" ? ke : Ne, r = [];
622
- for (let a = we(e, n); a <= t; a += i)
623
- r.push(ve(a, n));
664
+ const $e = 36e5, De = 864e5;
665
+ function Dn(e, t, n) {
666
+ const i = n === "hour" ? $e : De, r = [];
667
+ for (let a = Le(e, n); a <= t; a += i)
668
+ r.push(Oe(a, n));
624
669
  return r;
625
670
  }
626
- const xe = [
671
+ const Re = [
627
672
  { id: "resource", label: "Resource", labelSource: "raw" },
628
673
  { id: "origin", label: "Herkomst", labelSource: "raw" }
629
- ], Oe = xe.map((e) => e.id);
630
- function Le(e, t) {
674
+ ], Pe = Re.map((e) => e.id);
675
+ function Ue(e, t) {
631
676
  return `${e}.usage.${t}`;
632
677
  }
633
- function Ln(e, t) {
678
+ function Rn(e, t) {
634
679
  return t.map((n) => ({
635
- id: Le(e, n.unit),
680
+ id: Ue(e, n.unit),
636
681
  label: n.label,
637
682
  category: "Verbruik",
638
683
  valueType: n.valueType ?? "count",
639
684
  aggregation: "sum",
640
685
  supportedDimensions: [
641
686
  "provider",
642
- ...Oe,
687
+ ...Pe,
643
688
  ...n.extraDimensions ?? [],
644
689
  "time"
645
690
  ]
646
691
  }));
647
692
  }
648
- const re = /* @__PURE__ */ new Set(["info", "success", "warning", "destructive"]), P = 200, U = 100, K = 200, j = 12, B = 4, ae = 4e3, C = 500, $n = 256 * 1024, $e = /* @__PURE__ */ new Set([
693
+ const ce = /* @__PURE__ */ new Set(["info", "success", "warning", "destructive"]), G = 200, B = 100, F = 200, H = 12, V = 4, ue = 4e3, v = 500, Pn = 256 * 1024, Ke = /* @__PURE__ */ new Set([
649
694
  "heading",
650
695
  "paragraph",
651
696
  "list",
@@ -655,15 +700,15 @@ const re = /* @__PURE__ */ new Set(["info", "success", "warning", "destructive"]
655
700
  "table",
656
701
  "kpi",
657
702
  "callout"
658
- ]), De = ["http:", "https:", "mailto:", "tel:"], Re = /^[a-z][a-z0-9+.-]*:/i;
659
- function oe(e) {
703
+ ]), je = ["http:", "https:", "mailto:", "tel:"], Ge = /^[a-z][a-z0-9+.-]*:/i;
704
+ function de(e) {
660
705
  const t = e.trim().replace(/^<|>$/g, "");
661
706
  if (!t) return !1;
662
- const n = Re.exec(t)?.[0];
663
- return n ? De.includes(n.toLowerCase()) : !t.startsWith("//");
707
+ const n = Ge.exec(t)?.[0];
708
+ return n ? je.includes(n.toLowerCase()) : !t.startsWith("//");
664
709
  }
665
- const Pe = /^[ \t]{0,3}\[([^\]]+)\]:[ \t]*(\S+).*$/gm;
666
- function Ue(e) {
710
+ const Be = /^[ \t]{0,3}\[([^\]]+)\]:[ \t]*(\S+).*$/gm;
711
+ function Fe(e) {
667
712
  let t = "", n = 0;
668
713
  for (; n < e.length; ) {
669
714
  const i = e[n] === "!" && e[n + 1] === "[";
@@ -671,22 +716,22 @@ function Ue(e) {
671
716
  t += e[n], n += 1;
672
717
  continue;
673
718
  }
674
- const r = n + (i ? 2 : 1), a = G(e, r, "[", "]");
719
+ const r = n + (i ? 2 : 1), a = W(e, r, "[", "]");
675
720
  if (a < 0 || e[a + 1] !== "(") {
676
721
  t += e[n], n += 1;
677
722
  continue;
678
723
  }
679
- const o = G(e, a + 2, "(", ")");
724
+ const o = W(e, a + 2, "(", ")");
680
725
  if (o < 0) {
681
726
  t += e[n], n += 1;
682
727
  continue;
683
728
  }
684
729
  const s = e.slice(r, a), l = e.slice(a + 2, o).trim().split(/\s+/)[0] ?? "";
685
- t += i || !oe(l) ? s : e.slice(n, o + 1), n = o + 1;
730
+ t += i || !de(l) ? s : e.slice(n, o + 1), n = o + 1;
686
731
  }
687
732
  return t;
688
733
  }
689
- function G(e, t, n, i) {
734
+ function W(e, t, n, i) {
690
735
  let r = 1;
691
736
  for (let a = t; a < e.length; a += 1) {
692
737
  if (e[a] === "\\") {
@@ -699,33 +744,33 @@ function G(e, t, n, i) {
699
744
  }
700
745
  return -1;
701
746
  }
702
- function Ke(e) {
703
- return Ue(e).replace(
704
- Pe,
705
- (t, n, i) => oe(i) ? t : ""
747
+ function He(e) {
748
+ return Fe(e).replace(
749
+ Be,
750
+ (t, n, i) => de(i) ? t : ""
706
751
  );
707
752
  }
708
- function u(e, t = ae) {
709
- return typeof e == "string" ? Ke(e).slice(0, t) : "";
753
+ function u(e, t = ue) {
754
+ return typeof e == "string" ? He(e).slice(0, t) : "";
710
755
  }
711
- function je(e, t = ae) {
756
+ function Ve(e, t = ue) {
712
757
  return typeof e == "string" ? e.slice(0, t) : "";
713
758
  }
714
- function Be(e, t = "info") {
715
- return typeof e == "string" && re.has(e) ? e : t;
759
+ function We(e, t = "info") {
760
+ return typeof e == "string" && ce.has(e) ? e : t;
716
761
  }
717
- function Dn(e, t = () => {
762
+ function Un(e, t = () => {
718
763
  }) {
719
764
  if (!Array.isArray(e)) return [];
720
765
  const n = [];
721
766
  for (const i of e) {
722
- if (n.length >= P) {
723
- t("more than " + P + " blocks; the rest was dropped");
767
+ if (n.length >= G) {
768
+ t("more than " + G + " blocks; the rest was dropped");
724
769
  break;
725
770
  }
726
771
  if (!i || typeof i != "object") continue;
727
772
  const r = i;
728
- if (!$e.has(r.type)) {
773
+ if (!Ke.has(r.type)) {
729
774
  t("unknown block type " + String(r.type));
730
775
  continue;
731
776
  }
@@ -760,7 +805,7 @@ function Dn(e, t = () => {
760
805
  break;
761
806
  }
762
807
  case "code": {
763
- const o = je(r.text);
808
+ const o = Ve(r.text);
764
809
  if (!o) {
765
810
  t("a code block without text");
766
811
  continue;
@@ -775,8 +820,8 @@ function Dn(e, t = () => {
775
820
  case "list": {
776
821
  const o = Array.isArray(r.items) ? r.items : [], s = [];
777
822
  for (const p of o) {
778
- if (s.length >= U) {
779
- t("more than " + U + " list items");
823
+ if (s.length >= B) {
824
+ t("more than " + B + " list items");
780
825
  break;
781
826
  }
782
827
  const f = u(p?.text);
@@ -795,11 +840,11 @@ function Dn(e, t = () => {
795
840
  case "table": {
796
841
  const o = Array.isArray(r.columns) ? r.columns : [], s = [];
797
842
  for (const c of o) {
798
- if (s.length >= j) {
799
- t("more than " + j + " table columns");
843
+ if (s.length >= H) {
844
+ t("more than " + H + " table columns");
800
845
  break;
801
846
  }
802
- const A = u(c?.label, C), T = c?.align === "right" ? "right" : void 0;
847
+ const A = u(c?.label, v), T = c?.align === "right" ? "right" : void 0;
803
848
  s.push(T ? { label: A, align: T } : { label: A });
804
849
  }
805
850
  if (s.length === 0) {
@@ -808,16 +853,16 @@ function Dn(e, t = () => {
808
853
  }
809
854
  const l = Array.isArray(r.rows) ? r.rows : [], p = [];
810
855
  for (const c of l) {
811
- if (p.length >= K) {
812
- t("more than " + K + " table rows");
856
+ if (p.length >= F) {
857
+ t("more than " + F + " table rows");
813
858
  break;
814
859
  }
815
860
  const A = Array.isArray(c) ? c : [];
816
861
  p.push(
817
- s.map((T, be) => u(A[be], C))
862
+ s.map((T, Ie) => u(A[Ie], v))
818
863
  );
819
864
  }
820
- const f = u(r.caption, C);
865
+ const f = u(r.caption, v);
821
866
  n.push({
822
867
  ...a,
823
868
  type: "table",
@@ -830,15 +875,15 @@ function Dn(e, t = () => {
830
875
  case "kpi": {
831
876
  const o = Array.isArray(r.items) ? r.items : [], s = [];
832
877
  for (const l of o) {
833
- if (s.length >= B) {
834
- t("more than " + B + " kpi items");
878
+ if (s.length >= V) {
879
+ t("more than " + V + " kpi items");
835
880
  break;
836
881
  }
837
882
  const p = u(l?.value, 40), f = u(l?.label, 80);
838
883
  if (!p || !f) continue;
839
884
  const c = l?.tone;
840
885
  s.push(
841
- typeof c == "string" && re.has(c) ? { value: p, label: f, tone: c } : { value: p, label: f }
886
+ typeof c == "string" && ce.has(c) ? { value: p, label: f, tone: c } : { value: p, label: f }
842
887
  );
843
888
  }
844
889
  if (s.length === 0) {
@@ -858,7 +903,7 @@ function Dn(e, t = () => {
858
903
  n.push({
859
904
  ...a,
860
905
  type: "callout",
861
- tone: Be(r.tone),
906
+ tone: We(r.tone),
862
907
  ...s ? { title: s } : {},
863
908
  text: o
864
909
  });
@@ -868,28 +913,28 @@ function Dn(e, t = () => {
868
913
  }
869
914
  return n;
870
915
  }
871
- function Rn(e) {
916
+ function Kn(e) {
872
917
  return JSON.stringify(e).length;
873
918
  }
874
- function Pn(e) {
919
+ function jn(e) {
875
920
  return {
876
921
  blocks: e.length,
877
922
  types: e.map((t) => t.type),
878
923
  headings: e.flatMap((t) => t.type === "heading" ? [t.text] : [])
879
924
  };
880
925
  }
881
- function F(e) {
926
+ function z(e) {
882
927
  return e.replace(/\|/g, "\\|").replace(/\r?\n/g, " ").trim();
883
928
  }
884
- function H(e, t, n) {
929
+ function X(e, t, n) {
885
930
  const i = e.map((r, a) => n?.[a] === "right" ? "---:" : "---");
886
931
  return [
887
- `| ${e.map(F).join(" | ")} |`,
932
+ `| ${e.map(z).join(" | ")} |`,
888
933
  `| ${i.join(" | ")} |`,
889
- ...t.map((r) => `| ${r.map(F).join(" | ")} |`)
934
+ ...t.map((r) => `| ${r.map(z).join(" | ")} |`)
890
935
  ];
891
936
  }
892
- function Ge(e) {
937
+ function ze(e) {
893
938
  switch (e.type) {
894
939
  case "heading":
895
940
  return [`${"#".repeat(e.level)} ${e.text}`];
@@ -907,7 +952,7 @@ function Ge(e) {
907
952
  return t.lead ? `${i} **${t.lead}** ${t.text}` : `${i} ${t.text}`;
908
953
  });
909
954
  case "table": {
910
- const t = H(
955
+ const t = X(
911
956
  e.columns.map((n) => n.label),
912
957
  e.rows,
913
958
  e.columns.map((n) => n.align ?? "left")
@@ -915,7 +960,7 @@ function Ge(e) {
915
960
  return e.caption ? [...t, "", `*${e.caption}*`] : t;
916
961
  }
917
962
  case "kpi":
918
- return H(
963
+ return X(
919
964
  e.items.map((t) => t.value),
920
965
  [e.items.map((t) => t.label)]
921
966
  );
@@ -923,11 +968,11 @@ function Ge(e) {
923
968
  return (e.title ? `**${e.title}** ${e.text}` : e.text).split(/\r?\n/).map((n) => `> ${n}`);
924
969
  }
925
970
  }
926
- function Un(e, t) {
971
+ function Gn(e, t) {
927
972
  const n = [], i = e.some((r) => r.type === "heading" && r.level === 1);
928
973
  t && !i && n.push(`# ${t}`);
929
974
  for (const r of e) {
930
- const a = Ge(r);
975
+ const a = ze(r);
931
976
  a.length > 0 && n.push(a.join(`
932
977
  `));
933
978
  }
@@ -936,35 +981,41 @@ function Un(e, t) {
936
981
  `)}
937
982
  `;
938
983
  }
939
- const se = (e) => `user:${e}`, le = (e) => `team:${e}`;
940
- function Kn(e) {
984
+ const pe = (e) => `user:${e}`, fe = (e) => `team:${e}`;
985
+ function Bn(e) {
941
986
  const t = /* @__PURE__ */ new Set();
942
987
  for (const n of e ?? [])
943
- n?.id && (n.kind === "user" && t.add(se(n.id)), n.kind === "team" && t.add(le(n.id)));
988
+ n?.id && (n.kind === "user" && t.add(pe(n.id)), n.kind === "team" && t.add(fe(n.id)));
944
989
  return [...t].sort();
945
990
  }
946
- function jn(e, t) {
947
- return [se(e), ...t.map(le)];
991
+ function Fn(e, t) {
992
+ return [pe(e), ...t.map(fe)];
948
993
  }
949
- function Bn(e) {
994
+ function Hn(e) {
950
995
  const t = /* @__PURE__ */ new Set();
951
996
  for (const n of e ?? [])
952
997
  n?.kind && t.add(n.kind);
953
998
  return [...t];
954
999
  }
955
- const Fe = ["done", "escalated"];
956
- function Gn(e) {
957
- return Fe.includes(e);
1000
+ const Xe = ["done", "escalated"];
1001
+ function Vn(e) {
1002
+ return Xe.includes(e);
958
1003
  }
959
- const He = "assignment";
960
- function Fn(e) {
961
- return `${He}:${e}`;
1004
+ const Ye = "assignment";
1005
+ function Wn(e) {
1006
+ return `${Ye}:${e}`;
962
1007
  }
963
- function Hn(e) {
1008
+ function zn(e, t) {
1009
+ if (e.direction === "inbound") return !0;
1010
+ if (e.author?.type === "user" && e.author.id === t) return !1;
1011
+ const n = e.payload?.mentions;
1012
+ return Array.isArray(n) && n.includes(t);
1013
+ }
1014
+ function Xn(e) {
964
1015
  return e.subjectKind && e.subjectId ? { type: e.subjectKind, id: e.subjectId } : void 0;
965
1016
  }
966
- const Ve = 12;
967
- function Vn(e, t, n = Ve) {
1017
+ const qe = 12;
1018
+ function Yn(e, t, n = qe) {
968
1019
  const i = t + 1;
969
1020
  return e ? e.kind === "done" ? { status: "done", waitingOn: null, turns: i, reason: e.note } : e.kind === "escalate" ? { status: "escalated", waitingOn: null, turns: i, reason: e.reason } : i >= n ? {
970
1021
  status: "escalated",
@@ -978,24 +1029,24 @@ function Vn(e, t, n = Ve) {
978
1029
  reason: "de agent rondde zijn beurt af zonder te zeggen wat er moet gebeuren (wachten, afronden of overdragen)"
979
1030
  };
980
1031
  }
981
- const V = ["lookup", "condition", "parallel", "for-each"];
982
- function W(e) {
1032
+ const Y = ["lookup", "condition", "parallel", "for-each"];
1033
+ function q(e) {
983
1034
  for (const t of e) {
984
- if (!V.includes(t.type))
985
- return `staptype "${t.type}" mag niet meelezen (alleen ${V.join(", ")})`;
1035
+ if (!Y.includes(t.type))
1036
+ return `staptype "${t.type}" mag niet meelezen (alleen ${Y.join(", ")})`;
986
1037
  if (t.type === "parallel")
987
1038
  for (const n of t.branches ?? []) {
988
- const i = W(n);
1039
+ const i = q(n);
989
1040
  if (i) return i;
990
1041
  }
991
1042
  if (t.type === "for-each") {
992
- const n = W(t.body ?? []);
1043
+ const n = q(t.body ?? []);
993
1044
  if (n) return n;
994
1045
  }
995
1046
  }
996
1047
  return null;
997
1048
  }
998
- function We(e, t) {
1049
+ function Je(e, t) {
999
1050
  switch (e.kind) {
1000
1051
  case "org":
1001
1052
  return !0;
@@ -1005,13 +1056,13 @@ function We(e, t) {
1005
1056
  return e.userId === t.userId;
1006
1057
  }
1007
1058
  }
1008
- function Wn(e, t) {
1009
- return e.filter((n) => n.enabled && We(n.ownerScope, t));
1059
+ function qn(e, t) {
1060
+ return e.filter((n) => n.enabled && Je(n.ownerScope, t));
1010
1061
  }
1011
- function Xn(e) {
1062
+ function Jn(e) {
1012
1063
  return (e.startsWith("tool:") ? e.slice(5) : e).replace(/__/g, " · ").replace(/\./g, " · ").replace(/_/g, " ");
1013
1064
  }
1014
- const zn = [
1065
+ const Qn = [
1015
1066
  { name: "text", type: "string" },
1016
1067
  { name: "subject", type: "string" },
1017
1068
  { name: "from", type: "string" },
@@ -1039,7 +1090,7 @@ const zn = [
1039
1090
  // dus `buildTriggerVars` kan hem niet zelf vullen: de job doet dat met de catalogus in de
1040
1091
  // hand, vóór het trigger-filter draait — net als contactId/companyId hierboven.
1041
1092
  { name: "assigneeUserId", type: "string" }
1042
- ], Yn = {
1093
+ ], Zn = {
1043
1094
  topics: [
1044
1095
  { name: "topicId", type: "string" },
1045
1096
  { name: "topic", type: "string" },
@@ -1053,7 +1104,7 @@ const zn = [
1053
1104
  // Leeg met opzet: de velden komen uit `ClassifyStep.fields` en zijn dus per stap anders.
1054
1105
  extract: []
1055
1106
  };
1056
- function Xe(e) {
1107
+ function Qe(e) {
1057
1108
  switch (e.kind) {
1058
1109
  case "user":
1059
1110
  return `user:${e.userId}`;
@@ -1063,7 +1114,7 @@ function Xe(e) {
1063
1114
  return "org";
1064
1115
  }
1065
1116
  }
1066
- function qn(e) {
1117
+ function ei(e) {
1067
1118
  if (typeof e != "string") return;
1068
1119
  const t = e.trim();
1069
1120
  if (t === "org") return { kind: "org" };
@@ -1075,10 +1126,10 @@ function qn(e) {
1075
1126
  if (i === "team") return { kind: "team", teamId: r };
1076
1127
  }
1077
1128
  }
1078
- function ze(e) {
1079
- return Xe(e);
1129
+ function Ze(e) {
1130
+ return Qe(e);
1080
1131
  }
1081
- function Ye(e) {
1132
+ function et(e) {
1082
1133
  switch (e.kind) {
1083
1134
  case "personal":
1084
1135
  return { kind: "user", userId: e.userId };
@@ -1088,13 +1139,13 @@ function Ye(e) {
1088
1139
  return { kind: "org" };
1089
1140
  }
1090
1141
  }
1091
- function Jn(e) {
1092
- return e.agentId ? { kind: "user", userId: e.agentId } : Ye(e.ownerScope);
1142
+ function ti(e) {
1143
+ return e.agentId ? { kind: "user", userId: e.agentId } : et(e.ownerScope);
1093
1144
  }
1094
- function Qn(e) {
1095
- return ze(e);
1145
+ function ni(e) {
1146
+ return Ze(e);
1096
1147
  }
1097
- function Zn(e, t) {
1148
+ function ii(e, t) {
1098
1149
  if (!t) return;
1099
1150
  let n = e;
1100
1151
  for (const i of t.split(".")) {
@@ -1103,69 +1154,69 @@ function Zn(e, t) {
1103
1154
  }
1104
1155
  return n;
1105
1156
  }
1106
- function ei(e, t) {
1157
+ function ri(e, t) {
1107
1158
  return e.targets.find((n) => n.activityTypes.includes(t));
1108
1159
  }
1109
- function ti(e, t) {
1160
+ function ai(e, t) {
1110
1161
  if (t)
1111
1162
  return e.targets.find((n) => n.id === t);
1112
1163
  }
1113
- function qe(e) {
1164
+ function tt(e) {
1114
1165
  return e?.kind === "assignment";
1115
1166
  }
1116
- function ni(e) {
1167
+ function oi(e) {
1117
1168
  const { trigger: t, agentId: n, target: i, activityType: r, assigneeUserId: a, authorUserId: o } = e;
1118
- return qe(t) ? n ? i ? i.activityTypes.includes(r) ? a ? a !== n ? "assigned to someone else" : o && o === n ? "the agent assigned this to itself, which would restart its own run" : null : `no assignee found at ${i.assigneePath}` : `activity type ${r} does not announce an assignment for ${i.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";
1169
+ return tt(t) ? n ? i ? i.activityTypes.includes(r) ? a ? a !== n ? "assigned to someone else" : o && o === n ? "the agent assigned this to itself, which would restart its own run" : null : `no assignee found at ${i.assigneePath}` : `activity type ${r} does not announce an assignment for ${i.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";
1119
1170
  }
1120
- function Je(e) {
1171
+ function nt(e) {
1121
1172
  return `${e.type}:${e.id}`;
1122
1173
  }
1123
- const Qe = "interaction";
1124
- function Ze(e) {
1125
- return e?.type === Qe ? e.id : void 0;
1174
+ const it = "interaction";
1175
+ function rt(e) {
1176
+ return e?.type === it ? e.id : void 0;
1126
1177
  }
1127
- const et = 64, tt = 8e3;
1128
- function ii(e) {
1178
+ const at = 64, ot = 8e3;
1179
+ function si(e) {
1129
1180
  const t = typeof e == "number" ? e : Number(String(e ?? "").trim());
1130
1181
  if (!(!Number.isFinite(t) || t <= 0))
1131
- return Math.min(Math.max(Math.round(t), et), tt);
1182
+ return Math.min(Math.max(Math.round(t), at), ot);
1132
1183
  }
1133
- const ri = { kind: "workflow", steps: [] };
1134
- function ai(e) {
1184
+ const li = { kind: "workflow", steps: [] };
1185
+ function ci(e) {
1135
1186
  return e?.kind === "workflow" ? e.steps : [];
1136
1187
  }
1137
- function oi(e) {
1188
+ function ui(e) {
1138
1189
  return e?.kind === "procedure" ? e.procedure : void 0;
1139
1190
  }
1140
- const nt = ["done", "escalated", "failed", "stopped"];
1141
- function si(e) {
1142
- return nt.includes(e);
1191
+ const st = ["done", "escalated", "failed", "stopped"];
1192
+ function di(e) {
1193
+ return st.includes(e);
1143
1194
  }
1144
- function it(e) {
1195
+ function lt(e) {
1145
1196
  return e === "waiting";
1146
1197
  }
1147
- function li(e) {
1148
- return e === "running" || it(e);
1198
+ function pi(e) {
1199
+ return e === "running" || lt(e);
1149
1200
  }
1150
- function ce(e) {
1201
+ function me(e) {
1151
1202
  return e.subjectKind && e.subjectId ? { type: e.subjectKind, id: e.subjectId } : void 0;
1152
1203
  }
1153
- function ci(e) {
1154
- const t = ce(e);
1155
- return t ? Je(t) : void 0;
1204
+ function fi(e) {
1205
+ const t = me(e);
1206
+ return t ? nt(t) : void 0;
1156
1207
  }
1157
- function ui(e) {
1158
- return Ze(ce(e));
1208
+ function mi(e) {
1209
+ return rt(me(e));
1159
1210
  }
1160
- function di(e, t) {
1211
+ function gi(e, t) {
1161
1212
  const n = e.labels ?? [];
1162
1213
  return n.find((i) => i.locale === t)?.label ?? n[0]?.label ?? e.url;
1163
1214
  }
1164
- function pi(e, t, n) {
1215
+ function hi(e, t, n) {
1165
1216
  const i = e.translations ?? [];
1166
1217
  return i.find((r) => r.locale === t) ?? (n ? i.find((r) => r.locale === n) : void 0) ?? { locale: t };
1167
1218
  }
1168
- const X = [
1219
+ const J = [
1169
1220
  { code: "nl", label: "Nederlands", english: "Dutch" },
1170
1221
  { code: "en", label: "English", english: "English" },
1171
1222
  { code: "de", label: "Deutsch", english: "German" },
@@ -1180,36 +1231,36 @@ const X = [
1180
1231
  { code: "fi", label: "Suomi", english: "Finnish" },
1181
1232
  { code: "tr", label: "Türkçe", english: "Turkish" }
1182
1233
  ];
1183
- function ue(e) {
1234
+ function ge(e) {
1184
1235
  const t = (e ?? "").toLowerCase();
1185
- return X.find((n) => n.code === t) ?? X.find((n) => n.code === t.split("-")[0]);
1236
+ return J.find((n) => n.code === t) ?? J.find((n) => n.code === t.split("-")[0]);
1186
1237
  }
1187
- function fi(e) {
1188
- return ue(e)?.label ?? e;
1238
+ function Ai(e) {
1239
+ return ge(e)?.label ?? e;
1189
1240
  }
1190
- function mi(e) {
1191
- const t = ue(e);
1241
+ function yi(e) {
1242
+ const t = ge(e);
1192
1243
  return t ? t.english === t.label ? `${t.english} (${t.code})` : `${t.english} — ${t.label} (${t.code})` : e;
1193
1244
  }
1194
- const de = 3;
1195
- function rt(e, t) {
1245
+ const he = 3;
1246
+ function ct(e, t) {
1196
1247
  const n = /* @__PURE__ */ new Set();
1197
1248
  let i = 1, r = t.get(e)?.parentId;
1198
1249
  for (; r; ) {
1199
- if (n.has(r) || (n.add(r), i++, i > de + 1)) return 1 / 0;
1250
+ if (n.has(r) || (n.add(r), i++, i > he + 1)) return 1 / 0;
1200
1251
  r = t.get(r)?.parentId;
1201
1252
  }
1202
1253
  return i;
1203
1254
  }
1204
- function gi(e, t, n) {
1255
+ function bi(e, t, n) {
1205
1256
  if (!e) return !0;
1206
1257
  if (e === t) return !1;
1207
1258
  const i = new Map(n.map((o) => [o.id, o]));
1208
- if (!i.has(e) || t && at(e, t, i)) return !1;
1209
- const r = rt(e, i), a = t ? pe(t, n) : 1;
1210
- return r + a <= de;
1259
+ if (!i.has(e) || t && ut(e, t, i)) return !1;
1260
+ const r = ct(e, i), a = t ? Ae(t, n) : 1;
1261
+ return r + a <= he;
1211
1262
  }
1212
- function at(e, t, n) {
1263
+ function ut(e, t, n) {
1213
1264
  const i = /* @__PURE__ */ new Set();
1214
1265
  let r = n.get(e)?.parentId;
1215
1266
  for (; r; ) {
@@ -1219,66 +1270,66 @@ function at(e, t, n) {
1219
1270
  }
1220
1271
  return !1;
1221
1272
  }
1222
- function pe(e, t, n = /* @__PURE__ */ new Set()) {
1273
+ function Ae(e, t, n = /* @__PURE__ */ new Set()) {
1223
1274
  if (n.has(e)) return 1;
1224
1275
  n.add(e);
1225
1276
  const i = t.filter((r) => r.parentId === e);
1226
- return i.length ? 1 + Math.max(...i.map((r) => pe(r.id, t, n))) : 1;
1277
+ return i.length ? 1 + Math.max(...i.map((r) => Ae(r.id, t, n))) : 1;
1227
1278
  }
1228
- const ot = "en";
1229
- function st(e) {
1230
- return e.defaultLocale || e.locale || ot;
1279
+ const dt = "en";
1280
+ function pt(e) {
1281
+ return e.defaultLocale || e.locale || dt;
1231
1282
  }
1232
- function hi(e) {
1283
+ function Ei(e) {
1233
1284
  const t = /* @__PURE__ */ new Set(), n = [];
1234
- for (const i of [st(e), ...e.locales ?? []])
1285
+ for (const i of [pt(e), ...e.locales ?? []])
1235
1286
  !i || t.has(i) || (t.add(i), n.push(i));
1236
1287
  return n;
1237
1288
  }
1238
- function Ai(e, t, n) {
1289
+ function Si(e, t, n) {
1239
1290
  const i = e.translations ?? [];
1240
1291
  return i.find((r) => r.locale === t)?.name ?? (n ? i.find((r) => r.locale === n)?.name : void 0) ?? e.name;
1241
1292
  }
1242
- const lt = 20, ct = 20, v = 300;
1293
+ const ft = 20, mt = 20, N = 300;
1243
1294
  function g(e) {
1244
1295
  return e.toLowerCase().replace(/[^\p{L}\p{N}\s]/gu, " ").replace(/\s+/g, " ").trim();
1245
1296
  }
1246
- function ut(e) {
1297
+ function gt(e) {
1247
1298
  const t = e.replace(/\s+/g, " ").trim();
1248
- if (t.length <= v) return t;
1249
- const n = t.slice(0, v), i = Math.max(n.lastIndexOf(". "), n.lastIndexOf("! "), n.lastIndexOf("? "));
1250
- return i > v * 0.6 ? n.slice(0, i + 1) : `${n.trimEnd()}…`;
1299
+ if (t.length <= N) return t;
1300
+ const n = t.slice(0, N), i = Math.max(n.lastIndexOf(". "), n.lastIndexOf("! "), n.lastIndexOf("? "));
1301
+ return i > N * 0.6 ? n.slice(0, i + 1) : `${n.trimEnd()}…`;
1251
1302
  }
1252
- function yi(e, t) {
1253
- const n = ut(t.text), i = g(n);
1303
+ function Ti(e, t) {
1304
+ const n = gt(t.text), i = g(n);
1254
1305
  if (!i || (e.examples ?? []).some((o) => g(o) === i)) return null;
1255
1306
  const r = e.exampleCandidates ?? [], a = r.findIndex((o) => g(o.text) === i);
1256
1307
  if (a >= 0) {
1257
1308
  if (r[a].corrected || !t.corrected) return null;
1258
1309
  const o = [...r];
1259
- return o[a] = { ...o[a], corrected: !0, addedAt: t.addedAt }, z(o);
1310
+ return o[a] = { ...o[a], corrected: !0, addedAt: t.addedAt }, Q(o);
1260
1311
  }
1261
- return z([{ ...t, text: n }, ...r]).slice(0, ct);
1312
+ return Q([{ ...t, text: n }, ...r]).slice(0, mt);
1262
1313
  }
1263
- function z(e) {
1314
+ function Q(e) {
1264
1315
  return [...e].sort((t, n) => Number(n.corrected) - Number(t.corrected) || n.addedAt - t.addedAt);
1265
1316
  }
1266
- function bi(e, t) {
1317
+ function _i(e, t) {
1267
1318
  const n = g(t), i = (e.examples ?? []).filter((a) => a.trim());
1268
- return { examples: i.some((a) => g(a) === n) ? i : [...i, t].slice(-lt), exampleCandidates: dt(e, t) };
1319
+ return { examples: i.some((a) => g(a) === n) ? i : [...i, t].slice(-ft), exampleCandidates: ht(e, t) };
1269
1320
  }
1270
- function dt(e, t) {
1321
+ function ht(e, t) {
1271
1322
  const n = g(t);
1272
1323
  return (e.exampleCandidates ?? []).filter((i) => g(i.text) !== n);
1273
1324
  }
1274
- function pt(e, t) {
1325
+ function At(e, t) {
1275
1326
  const n = e.ownerScope;
1276
1327
  return n ? n.kind === "org" ? !0 : n.kind === "team" ? !!t && n.teamId === t : !1 : !1;
1277
1328
  }
1278
- function Ei(e, t) {
1279
- return e.filter((n) => pt(n, t));
1329
+ function Ii(e, t) {
1330
+ return e.filter((n) => At(n, t));
1280
1331
  }
1281
- const fe = [
1332
+ const ye = [
1282
1333
  {
1283
1334
  id: "openai",
1284
1335
  attachmentKinds: ["image", "pdf"],
@@ -1370,77 +1421,77 @@ const fe = [
1370
1421
  }
1371
1422
  ];
1372
1423
  function S(e) {
1373
- return fe.find((t) => t.id === e);
1424
+ return ye.find((t) => t.id === e);
1374
1425
  }
1375
- function Si(e) {
1426
+ function Mi(e) {
1376
1427
  return S(e)?.label ?? e;
1377
1428
  }
1378
- function Ti(e, t = "gpt-5-mini") {
1429
+ function Ci(e, t = "gpt-5-mini") {
1379
1430
  return S(e)?.defaultModel ?? t;
1380
1431
  }
1381
- function _i(e) {
1382
- return fe.filter((t) => t.capabilities.includes(e));
1432
+ function wi(e) {
1433
+ return ye.filter((t) => t.capabilities.includes(e));
1383
1434
  }
1384
- function Ii(e) {
1435
+ function ki(e) {
1385
1436
  const t = S(e);
1386
1437
  return !!t && !t.baseUrl;
1387
1438
  }
1388
- function Mi(e, t) {
1439
+ function vi(e, t) {
1389
1440
  return t === "text" ? !0 : S(e)?.attachmentKinds?.includes(t) === !0;
1390
1441
  }
1391
- function Ci(e, t) {
1442
+ function Ni(e, t) {
1392
1443
  if (!e.enabled) return "ok";
1393
- const n = Y(e.hardLimitNanos), i = Y(e.softLimitNanos);
1444
+ const n = Z(e.hardLimitNanos), i = Z(e.softLimitNanos);
1394
1445
  return n !== void 0 && t >= n ? "hard" : i !== void 0 && t >= i ? "soft" : "ok";
1395
1446
  }
1396
- function Y(e) {
1447
+ function Z(e) {
1397
1448
  return typeof e == "number" ? e : void 0;
1398
1449
  }
1399
- function ft(e, t = "month") {
1450
+ function yt(e, t = "month") {
1400
1451
  const n = new Date(e);
1401
1452
  return Date.UTC(n.getUTCFullYear(), n.getUTCMonth(), 1);
1402
1453
  }
1403
- function vi(e, t = "month") {
1404
- const n = new Date(ft(e, t));
1454
+ function xi(e, t = "month") {
1455
+ const n = new Date(yt(e, t));
1405
1456
  return `${n.getUTCFullYear()}-${String(n.getUTCMonth() + 1).padStart(2, "0")}`;
1406
1457
  }
1407
- function wi(e) {
1458
+ function Oi(e) {
1408
1459
  return e?.listeningEnabled !== !1;
1409
1460
  }
1410
- const ki = /* @__PURE__ */ new Set(["mail", "message"]);
1411
- function mt(e, t) {
1461
+ const Li = /* @__PURE__ */ new Set(["mail", "message"]);
1462
+ function bt(e, t) {
1412
1463
  const n = e.settings?.signatures?.[t];
1413
1464
  return !n || !n.enabled || !n.body || n.body.trim() === "" ? null : n;
1414
1465
  }
1415
- function Ni(e, t, n, i = "html") {
1466
+ function $i(e, t, n, i = "html") {
1416
1467
  if (!e) return n;
1417
- const r = mt(e, t);
1468
+ const r = bt(e, t);
1418
1469
  return r ? `${n}${i === "text" ? `
1419
1470
 
1420
1471
  ` : t === "mail" ? "<br><br>-- <br>" : "<br><br>"}${r.body}` : n;
1421
1472
  }
1422
- function xi(e) {
1473
+ function Di(e) {
1423
1474
  return e.endpoints ?? [];
1424
1475
  }
1425
- const Oi = (e) => !!e.assignedUserId || !!e.assignedInboxId, Li = (e) => e.status === "closed", $i = (e) => ({
1476
+ const Ri = (e) => !!e.assignedUserId || !!e.assignedInboxId, Pi = (e) => e.status === "closed", Ui = (e) => ({
1426
1477
  urgent: 10,
1427
1478
  high: 5,
1428
1479
  normal: 2,
1429
1480
  low: 1
1430
- })[e.priority] || 0, Di = (e, t = 30) => e.title?.length <= t ? e.title : `${e.title.substring(0, t)}...`;
1431
- function Ri(e, t) {
1481
+ })[e.priority] || 0, Ki = (e, t = 30) => e.title?.length <= t ? e.title : `${e.title.substring(0, t)}...`;
1482
+ function ji(e, t) {
1432
1483
  return e.lastActivityAt ? !(e.seenBy ?? []).includes(t) : !1;
1433
1484
  }
1434
- const Pi = 1e3, Ui = 2e3, Ki = 500, ji = 12e3, Bi = 4e3, gt = ["contact", "company"];
1435
- function Gi(e) {
1485
+ const Gi = 1e3, Bi = 2e3, Fi = 500, Hi = 12e3, Vi = 4e3, Et = ["contact", "company"];
1486
+ function Wi(e) {
1436
1487
  if (!e) return !1;
1437
1488
  const t = e.slice(0, e.indexOf(":"));
1438
- return gt.includes(t);
1489
+ return Et.includes(t);
1439
1490
  }
1440
- function Fi(e) {
1491
+ function zi(e) {
1441
1492
  return e.type === "agent";
1442
1493
  }
1443
- const N = {
1494
+ const L = {
1444
1495
  // The lower bounds are deliberately generous: service ranges (0800/0900) are
1445
1496
  // shorter than geographic numbers, and a too-strict minimum silently drops them.
1446
1497
  // An over-permissive key is harmless — it simply matches nothing.
@@ -1463,53 +1514,53 @@ const N = {
1463
1514
  PL: { callingCode: "48", nsnMin: 9, nsnMax: 9 },
1464
1515
  US: { callingCode: "1", nsnMin: 10, nsnMax: 10 },
1465
1516
  CA: { callingCode: "1", nsnMin: 10, nsnMax: 10 }
1466
- }, ht = "NL", At = 15, yt = 8, bt = Array.from(
1467
- new Set(Object.values(N).map((e) => e.callingCode))
1517
+ }, St = "NL", Tt = 15, _t = 8, It = Array.from(
1518
+ new Set(Object.values(L).map((e) => e.callingCode))
1468
1519
  ).sort((e, t) => t.length - e.length);
1469
- function q(e) {
1520
+ function ee(e) {
1470
1521
  if (e)
1471
- return N[e.trim().toUpperCase()];
1522
+ return L[e.trim().toUpperCase()];
1472
1523
  }
1473
1524
  function E(e, t) {
1474
1525
  return e.length >= t.nsnMin && e.length <= t.nsnMax;
1475
1526
  }
1476
- function J(e) {
1477
- if (e.length > At) return null;
1478
- for (const t of bt) {
1527
+ function te(e) {
1528
+ if (e.length > Tt) return null;
1529
+ for (const t of It) {
1479
1530
  if (!e.startsWith(t)) continue;
1480
1531
  const n = e.slice(t.length);
1481
- for (const i of Object.values(N)) {
1532
+ for (const i of Object.values(L)) {
1482
1533
  if (i.callingCode !== t) continue;
1483
1534
  const r = i.trunkPrefix, a = r && n.startsWith(r) ? n.slice(r.length) : n;
1484
1535
  if (E(a, i)) return `+${t}${a}`;
1485
1536
  }
1486
1537
  return null;
1487
1538
  }
1488
- return e.length < yt ? null : `+${e}`;
1539
+ return e.length < _t ? null : `+${e}`;
1489
1540
  }
1490
- function Et(e) {
1541
+ function Mt(e) {
1491
1542
  let t = e.trim();
1492
1543
  const n = t.match(/^(sips?|tel|whatsapp):/i);
1493
1544
  n && (t = t.slice(n[0].length));
1494
1545
  const i = t.indexOf("@");
1495
1546
  return i >= 0 && (t = t.slice(0, i)), t.trim();
1496
1547
  }
1497
- function Hi(e) {
1548
+ function Xi(e) {
1498
1549
  if (!e) return !1;
1499
1550
  const t = e.indexOf("@");
1500
1551
  if (t <= 0) return !1;
1501
1552
  const n = e.slice(0, t).trim();
1502
1553
  return !/^[+\d\s().-]+$/.test(n);
1503
1554
  }
1504
- function Q(e, t) {
1555
+ function ne(e, t) {
1505
1556
  if (!e) return null;
1506
- const n = Et(e);
1557
+ const n = Mt(e);
1507
1558
  if (!n) return null;
1508
1559
  const i = n.startsWith("+"), r = n.replace(/\D/g, "");
1509
1560
  if (!r) return null;
1510
- if (i) return J(r);
1511
- if (r.startsWith("00")) return J(r.slice(2));
1512
- const a = q(t) ?? q(ht);
1561
+ if (i) return te(r);
1562
+ if (r.startsWith("00")) return te(r.slice(2));
1563
+ const a = ee(t) ?? ee(St);
1513
1564
  if (!a) return null;
1514
1565
  const o = a.trunkPrefix;
1515
1566
  if (o && r.startsWith(o)) {
@@ -1522,22 +1573,22 @@ function Q(e, t) {
1522
1573
  }
1523
1574
  return !o && E(r, a) ? `+${a.callingCode}${r}` : null;
1524
1575
  }
1525
- function Vi(e, t = 9) {
1576
+ function Yi(e, t = 9) {
1526
1577
  const n = (e ?? "").replace(/\D/g, "");
1527
1578
  return n.length < t ? null : n.slice(-t);
1528
1579
  }
1529
- function me(e) {
1580
+ function be(e) {
1530
1581
  if (!e) return null;
1531
1582
  const t = e.trim().toLowerCase(), n = t.lastIndexOf("@");
1532
1583
  if (n <= 0 || n === t.length - 1) return null;
1533
1584
  const i = t.slice(0, n).split("+")[0], r = t.slice(n + 1);
1534
1585
  return !i || !r.includes(".") ? null : `${i}@${r}`;
1535
1586
  }
1536
- function Wi(e) {
1537
- const t = me(e);
1587
+ function qi(e) {
1588
+ const t = be(e);
1538
1589
  return t ? t.slice(t.lastIndexOf("@") + 1) : null;
1539
1590
  }
1540
- const St = /* @__PURE__ */ new Set([
1591
+ const Ct = /* @__PURE__ */ new Set([
1541
1592
  "co.uk",
1542
1593
  "org.uk",
1543
1594
  "gov.uk",
@@ -1547,14 +1598,14 @@ const St = /* @__PURE__ */ new Set([
1547
1598
  "com.br",
1548
1599
  "co.za"
1549
1600
  ]);
1550
- function Tt(e) {
1601
+ function wt(e) {
1551
1602
  if (!e) return null;
1552
1603
  const t = e.trim().toLowerCase().replace(/\.$/, "").split(".").filter(Boolean);
1553
1604
  if (t.length < 2) return null;
1554
1605
  const n = t.slice(-2).join(".");
1555
- return St.has(n) && t.length >= 3 ? t.slice(-3).join(".") : n;
1606
+ return Ct.has(n) && t.length >= 3 ? t.slice(-3).join(".") : n;
1556
1607
  }
1557
- const _t = /* @__PURE__ */ new Set([
1608
+ const kt = /* @__PURE__ */ new Set([
1558
1609
  "gmail.com",
1559
1610
  "googlemail.com",
1560
1611
  "outlook.com",
@@ -1599,44 +1650,44 @@ const _t = /* @__PURE__ */ new Set([
1599
1650
  "proximus.be",
1600
1651
  "scarlet.be"
1601
1652
  ]);
1602
- function Xi(e) {
1603
- const t = Tt(e);
1604
- return t ? _t.has(t) : !1;
1653
+ function Ji(e) {
1654
+ const t = wt(e);
1655
+ return t ? kt.has(t) : !1;
1605
1656
  }
1606
- function zi(e) {
1657
+ function Qi(e) {
1607
1658
  if (!e) return !1;
1608
1659
  const t = e.trim().toLowerCase();
1609
1660
  return t === "tel" || t === "sms" || t === "whatsapp" || t === "fax";
1610
1661
  }
1611
- function Yi(e, t, n) {
1662
+ function Zi(e, t, n) {
1612
1663
  if (!e || !t) return null;
1613
1664
  const i = e.trim().toLowerCase();
1614
1665
  if (i === "tel" || i === "sms" || i === "whatsapp") {
1615
- const a = Q(t, n);
1666
+ const a = ne(t, n);
1616
1667
  return a ? `tel:${a}` : null;
1617
1668
  }
1618
1669
  if (i === "fax") {
1619
- const a = Q(t, n);
1670
+ const a = ne(t, n);
1620
1671
  return a ? `fax:${a}` : null;
1621
1672
  }
1622
1673
  if (i === "mailto" || i === "email") {
1623
- const a = me(t);
1674
+ const a = be(t);
1624
1675
  return a ? `mailto:${a}` : null;
1625
1676
  }
1626
1677
  const r = t.trim().toLowerCase();
1627
1678
  return r ? `${i}:${r}` : null;
1628
1679
  }
1629
- const It = /(\*\*|__)(?=\S)([\s\S]*?\S)\1/g, Mt = /(\*|_)(?=\S)([^*_\n]*?\S)\1/g;
1630
- function qi(e) {
1680
+ const vt = /(\*\*|__)(?=\S)([\s\S]*?\S)\1/g, Nt = /(\*|_)(?=\S)([^*_\n]*?\S)\1/g;
1681
+ function er(e) {
1631
1682
  if (typeof e != "string" || !e) return "";
1632
1683
  let t = e;
1633
1684
  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(`
1634
1685
  `).map(
1635
1686
  (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,}$/, "")
1636
1687
  ).join(`
1637
- `), t = t.replace(It, "$2"), t = t.replace(Mt, "$2"), t = t.replace(/~~(?=\S)([\s\S]*?\S)~~/g, "$1"), t = t.replace(/`([^`\n]+)`/g, "$1"), t.replace(/\s+/g, " ").trim();
1688
+ `), t = t.replace(vt, "$2"), t = t.replace(Nt, "$2"), t = t.replace(/~~(?=\S)([\s\S]*?\S)~~/g, "$1"), t = t.replace(/`([^`\n]+)`/g, "$1"), t.replace(/\s+/g, " ").trim();
1638
1689
  }
1639
- const Ct = [
1690
+ const xt = [
1640
1691
  /<blockquote/i,
1641
1692
  /class="?gmail_quote/i,
1642
1693
  // Gmail quote container
@@ -1649,17 +1700,17 @@ const Ct = [
1649
1700
  // Outlook underscore separator before "From:"
1650
1701
  /\bOn\b[\s\S]{0,200}?\bwrote:/i
1651
1702
  // Gmail "On <date> <name> wrote:"
1652
- ], Z = /^\s*(?:>+\s*)?(?:from|van|sent|verzonden|to|aan|cc|subject|onderwerp|date|datum)\s*:/i, vt = /^\s*(?:on|op)\b.{0,200}?\b(?:wrote|schreef|geschreven)\s*:?\s*$/i;
1653
- function wt(e) {
1703
+ ], ie = /^\s*(?:>+\s*)?(?:from|van|sent|verzonden|to|aan|cc|subject|onderwerp|date|datum)\s*:/i, Ot = /^\s*(?:on|op)\b.{0,200}?\b(?:wrote|schreef|geschreven)\s*:?\s*$/i;
1704
+ function Lt(e) {
1654
1705
  const t = e.split(`
1655
1706
  `);
1656
1707
  for (let n = 0; n < t.length; n++)
1657
- if (vt.test(t[n]) || Z.test(t[n]) && t.slice(n + 1, n + 4).some((i) => Z.test(i)))
1708
+ if (Ot.test(t[n]) || ie.test(t[n]) && t.slice(n + 1, n + 4).some((i) => ie.test(i)))
1658
1709
  return t.slice(0, n).join(`
1659
1710
  `).trim();
1660
1711
  return e;
1661
1712
  }
1662
- function ee(e) {
1713
+ function re(e) {
1663
1714
  let t = e;
1664
1715
  return t = t.replace(/<(script|style)[\s\S]*?<\/\1>/gi, ""), t = t.replace(/<br\s*\/?>/gi, `
1665
1716
  `), t = t.replace(/<\/(p|h[1-6]|ul|ol|table|blockquote)>/gi, `
@@ -1667,38 +1718,38 @@ function ee(e) {
1667
1718
  `), t = t.replace(/<\/(div|li|tr)>/gi, `
1668
1719
  `), t = t.replace(/<\/(td|th)>/gi, " "), t = t.replace(/<[^>]+>/g, ""), t = t.replace(/<[^>]*$/, ""), t;
1669
1720
  }
1670
- function te(e) {
1721
+ function ae(e) {
1671
1722
  return !Number.isInteger(e) || e < 0 || e > 1114111 ? null : String.fromCodePoint(e);
1672
1723
  }
1673
- function ne(e) {
1674
- return e.replace(/&nbsp;/gi, " ").replace(/&lt;/gi, "<").replace(/&gt;/gi, ">").replace(/&quot;/gi, '"').replace(/&#(\d+);/g, (t, n) => te(Number(n)) ?? t).replace(/&#x([0-9a-f]+);/gi, (t, n) => te(parseInt(n, 16)) ?? t).replace(/&amp;/gi, "&");
1724
+ function oe(e) {
1725
+ return e.replace(/&nbsp;/gi, " ").replace(/&lt;/gi, "<").replace(/&gt;/gi, ">").replace(/&quot;/gi, '"').replace(/&#(\d+);/g, (t, n) => ae(Number(n)) ?? t).replace(/&#x([0-9a-f]+);/gi, (t, n) => ae(parseInt(n, 16)) ?? t).replace(/&amp;/gi, "&");
1675
1726
  }
1676
- function ie(e) {
1727
+ function se(e) {
1677
1728
  return e.replace(/\r/g, "").replace(/[ \t]+/g, " ").replace(/ *\n */g, `
1678
1729
  `).replace(/\n{3,}/g, `
1679
1730
 
1680
1731
  `).trim();
1681
1732
  }
1682
- function Ji(e) {
1733
+ function tr(e) {
1683
1734
  if (typeof e != "string" || !e) return "";
1684
1735
  let t = e.length;
1685
- for (const a of Ct) {
1736
+ for (const a of xt) {
1686
1737
  const o = e.search(a);
1687
1738
  o >= 0 && o < t && (t = o);
1688
1739
  }
1689
1740
  const n = e.slice(0, t);
1690
- let i = ie(ne(ee(n)));
1691
- return i || (i = ie(ne(ee(e)))), wt(i) || i;
1741
+ let i = se(oe(re(n)));
1742
+ return i || (i = se(oe(re(e)))), Lt(i) || i;
1692
1743
  }
1693
- const kt = /(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|newsletter|nieuwsbrief|mailer|mailing|notifications?|bounce|postmaster|marketing)@/i, Nt = /\b(unsubscribe|afmelden|uitschrijven|opt[\s-]?out|manage (your )?preferences|geen (e-?mails?|nieuwsbrief|berichten) meer)\b/i;
1694
- function Qi(e, t) {
1695
- return !!(e && kt.test(e) || t && Nt.test(t));
1744
+ const $t = /(^|[._+-])(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;
1745
+ function nr(e, t) {
1746
+ return !!(e && $t.test(e) || t && Dt.test(t));
1696
1747
  }
1697
- const xt = 3, Ot = 600;
1698
- function Zi(e, t) {
1699
- return e >= xt || t >= Ot;
1748
+ const Rt = 3, Pt = 600;
1749
+ function ir(e, t) {
1750
+ return e >= Rt || t >= Pt;
1700
1751
  }
1701
- const Lt = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "image/gif", "image/webp"]), $t = /* @__PURE__ */ new Set([
1752
+ const Ut = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "image/gif", "image/webp"]), Kt = /* @__PURE__ */ new Set([
1702
1753
  "text/plain",
1703
1754
  "text/markdown",
1704
1755
  "text/csv",
@@ -1707,40 +1758,40 @@ const Lt = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "ima
1707
1758
  "application/xml",
1708
1759
  "text/xml"
1709
1760
  ]);
1710
- function Dt(e) {
1761
+ function jt(e) {
1711
1762
  const t = (e ?? "").trim().toLowerCase().split(";")[0];
1712
- return t ? Lt.has(t) ? "image" : t === "application/pdf" ? "pdf" : $t.has(t) ? "text" : t.startsWith("audio/") ? "audio" : "unsupported" : "unsupported";
1763
+ return t ? Ut.has(t) ? "image" : t === "application/pdf" ? "pdf" : Kt.has(t) ? "text" : t.startsWith("audio/") ? "audio" : "unsupported" : "unsupported";
1713
1764
  }
1714
- const h = 1024 * 1024, Rt = {
1765
+ const h = 1024 * 1024, Gt = {
1715
1766
  image: 5 * h,
1716
1767
  pdf: 20 * h,
1717
1768
  text: 1 * h,
1718
1769
  audio: 20 * h
1719
- }, er = 25 * h, tr = 5;
1720
- function nr(e, t) {
1721
- const n = Dt(e);
1722
- return n === "unsupported" ? "unsupported" : t > Rt[n] ? "too-large" : null;
1770
+ }, rr = 25 * h, ar = 5;
1771
+ function or(e, t) {
1772
+ const n = jt(e);
1773
+ return n === "unsupported" ? "unsupported" : t > Gt[n] ? "too-large" : null;
1723
1774
  }
1724
- function Pt(e) {
1775
+ function Bt(e) {
1725
1776
  return `${e.kind}:${e.id || e.url || e.title}`;
1726
1777
  }
1727
- function ir(e, t = []) {
1778
+ function sr(e, t = []) {
1728
1779
  const n = new Set(t), i = [], r = [];
1729
1780
  for (const a of e) {
1730
- const o = Pt(a);
1781
+ const o = Bt(a);
1731
1782
  n.has(o) || (n.add(o), i.push(a), r.push(o));
1732
1783
  }
1733
1784
  return { sources: i, keys: r };
1734
1785
  }
1735
- function Ut(e, t) {
1736
- const n = new Set(e.disabledIntents ?? []), i = e.intentOverrides ?? {}, r = t.intents.filter((o) => !n.has(o.intent)).map((o) => jt(o, i[o.intent]));
1786
+ function Ft(e, t) {
1787
+ const n = new Set(e.disabledIntents ?? []), i = e.intentOverrides ?? {}, r = t.intents.filter((o) => !n.has(o.intent)).map((o) => Vt(o, i[o.intent]));
1737
1788
  if (!e.extraIntents || e.extraIntents.length === 0) return r;
1738
1789
  const a = new Set(r.map((o) => o.intent));
1739
1790
  for (const o of e.extraIntents)
1740
1791
  a.has(o.intent) || (r.push(o), a.add(o.intent));
1741
1792
  return r;
1742
1793
  }
1743
- function Kt(e, t) {
1794
+ function Ht(e, t) {
1744
1795
  const n = {};
1745
1796
  for (const i of e.intents) {
1746
1797
  if (!i.togglable) continue;
@@ -1749,46 +1800,46 @@ function Kt(e, t) {
1749
1800
  }
1750
1801
  return n;
1751
1802
  }
1752
- function rr(e, t) {
1753
- const n = Kt(e, t);
1803
+ function lr(e, t) {
1804
+ const n = Ht(e, t);
1754
1805
  return Object.entries(n).filter(([, i]) => !i).map(([i]) => i);
1755
1806
  }
1756
- function jt(e, t) {
1807
+ function Vt(e, t) {
1757
1808
  return t ? {
1758
1809
  intent: t.intent ?? e.intent,
1759
1810
  targetSchemes: t.targetSchemes ?? e.targetSchemes,
1760
1811
  transport: t.transport ?? e.transport
1761
1812
  } : e;
1762
1813
  }
1763
- function ar(e, t) {
1814
+ function cr(e, t) {
1764
1815
  const n = [];
1765
1816
  for (const i of e) {
1766
1817
  if (!i.enabled) continue;
1767
1818
  const r = t[i.providerId];
1768
1819
  if (r)
1769
- for (const a of Ut(i, r))
1820
+ for (const a of Ft(i, r))
1770
1821
  n.push({ channel: i, description: r, capability: a });
1771
1822
  }
1772
1823
  return n;
1773
1824
  }
1774
- function or(e, t) {
1825
+ function ur(e, t) {
1775
1826
  return t.filter((n) => n.capability.intent === e);
1776
1827
  }
1777
- function Bt(e, t) {
1828
+ function Wt(e, t) {
1778
1829
  return t.filter((n) => n.capability.targetSchemes.includes(e));
1779
1830
  }
1780
- function sr(e, t) {
1781
- return Bt(e.scheme, t);
1831
+ function dr(e, t) {
1832
+ return Wt(e.scheme, t);
1782
1833
  }
1783
- function lr(e, t, n) {
1834
+ function pr(e, t, n) {
1784
1835
  const i = [];
1785
1836
  for (const r of e)
1786
1837
  for (const a of n)
1787
1838
  a.capability.intent === t && a.capability.targetSchemes.includes(r.scheme) && i.push({ channelIntent: a, endpoint: r });
1788
1839
  return i;
1789
1840
  }
1790
- var Gt = /* @__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))(Gt || {});
1791
- const Ft = {
1841
+ var zt = /* @__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))(zt || {});
1842
+ const Xt = {
1792
1843
  mailto: "mail",
1793
1844
  sip: "tel",
1794
1845
  tel: "tel",
@@ -1810,10 +1861,10 @@ const Ft = {
1810
1861
  id: "note",
1811
1862
  custom: "note"
1812
1863
  };
1813
- function cr(e) {
1814
- return e ? Ft[e] ?? "note" : "note";
1864
+ function fr(e) {
1865
+ return e ? Xt[e] ?? "note" : "note";
1815
1866
  }
1816
- const ur = "message_window", dr = "message_templates", pr = {
1867
+ const mr = "message_window", gr = "message_templates", hr = {
1817
1868
  // E-mail
1818
1869
  FROM: "from",
1819
1870
  TO: "to",
@@ -1830,26 +1881,26 @@ const ur = "message_window", dr = "message_templates", pr = {
1830
1881
  // Voice/conference
1831
1882
  HOST: "host",
1832
1883
  PARTICIPANT: "participant"
1833
- }, fr = (e, t) => ({ intent: e, ...t }), mr = "folder_management", gr = "remote_search", hr = { ok: !1, code: "UNSUPPORTED", message: "Provider does not support this op" }, ge = "auth";
1834
- function he(e) {
1884
+ }, Ar = (e, t) => ({ intent: e, ...t }), yr = "folder_management", br = "remote_search", Er = { ok: !1, code: "UNSUPPORTED", message: "Provider does not support this op" }, Ee = "auth";
1885
+ function Se(e) {
1835
1886
  const t = typeof e == "string" ? e.match(/apps\/([^/?#]+)/) : null;
1836
1887
  return t ? t[1] : null;
1837
1888
  }
1838
- function Ar(e) {
1839
- const t = he(e);
1840
- return t ? t !== ge : typeof e == "string" && e.startsWith("/wake");
1889
+ function Sr(e) {
1890
+ const t = Se(e);
1891
+ return t ? t !== Ee : typeof e == "string" && e.startsWith("/wake");
1841
1892
  }
1842
- function yr(e) {
1843
- return typeof e != "string" || e === "" || e === "/" ? !0 : he(e) === ge;
1893
+ function Tr(e) {
1894
+ return typeof e != "string" || e === "" || e === "/" ? !0 : Se(e) === Ee;
1844
1895
  }
1845
- function Ht(e) {
1896
+ function Yt(e) {
1846
1897
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1847
1898
  }
1848
- function Vt(e) {
1849
- const n = e.split("/").filter(Boolean).map((i) => i.startsWith(":") ? i.endsWith("?") ? "(?:/[^/]+)?" : "/[^/]+" : "/" + Ht(i)).join("");
1899
+ function qt(e) {
1900
+ const n = e.split("/").filter(Boolean).map((i) => i.startsWith(":") ? i.endsWith("?") ? "(?:/[^/]+)?" : "/[^/]+" : "/" + Yt(i)).join("");
1850
1901
  return new RegExp(`^${n}\\/?$`);
1851
1902
  }
1852
- function Wt(e, t) {
1903
+ function Jt(e, t) {
1853
1904
  const n = e.split("/").filter(Boolean), i = t.split("/").filter(Boolean), r = {};
1854
1905
  return n.forEach((a, o) => {
1855
1906
  if (a.startsWith(":")) {
@@ -1858,14 +1909,14 @@ function Wt(e, t) {
1858
1909
  }
1859
1910
  }), r;
1860
1911
  }
1861
- function Xt(e) {
1912
+ function Qt(e) {
1862
1913
  return e.publicBasePath ?? `/apps/${e.name}`;
1863
1914
  }
1864
- function br(e) {
1915
+ function _r(e) {
1865
1916
  const t = [];
1866
1917
  for (const n of e) {
1867
1918
  if (!n?.name) continue;
1868
- const i = Xt(n);
1919
+ const i = Qt(n);
1869
1920
  for (const r of n.routes ?? []) {
1870
1921
  if (!r.public) continue;
1871
1922
  const a = r.path === "/" ? "" : r.path;
@@ -1879,7 +1930,7 @@ function br(e) {
1879
1930
  }
1880
1931
  return t;
1881
1932
  }
1882
- function zt(e, t) {
1933
+ function Zt(e, t) {
1883
1934
  const n = e.split("/").filter(Boolean), i = t.split("/").filter(Boolean);
1884
1935
  for (let r = 0; r < Math.min(n.length, i.length); r++) {
1885
1936
  const a = n[r].startsWith(":"), o = i[r].startsWith(":");
@@ -1887,17 +1938,17 @@ function zt(e, t) {
1887
1938
  }
1888
1939
  return n.length > i.length;
1889
1940
  }
1890
- function Yt(e, t) {
1941
+ function en(e, t) {
1891
1942
  if (typeof e != "string") return null;
1892
1943
  let n = null;
1893
1944
  for (const i of t)
1894
- Vt(i.pattern).test(e) && (!n || zt(i.pattern, n.pattern)) && (n = i);
1895
- return n ? { ...n, params: { ...n.props, ...Wt(n.pattern, e) } } : null;
1945
+ qt(i.pattern).test(e) && (!n || Zt(i.pattern, n.pattern)) && (n = i);
1946
+ return n ? { ...n, params: { ...n.props, ...Jt(n.pattern, e) } } : null;
1896
1947
  }
1897
- function Er(e, t) {
1898
- return Yt(e, t) !== null;
1948
+ function Ir(e, t) {
1949
+ return en(e, t) !== null;
1899
1950
  }
1900
- const qt = {
1951
+ const tn = {
1901
1952
  afrikaans: [
1902
1953
  "[Muziek]",
1903
1954
  "(C) TV GELDERLAND 2021",
@@ -2047,14 +2098,14 @@ const qt = {
2047
2098
  "[MÚSICA]",
2048
2099
  "[Music cuts in British]"
2049
2100
  ]
2050
- }, Jt = (e) => {
2101
+ }, nn = (e) => {
2051
2102
  let t = e;
2052
- return Object.values(qt).forEach((n) => {
2103
+ return Object.values(tn).forEach((n) => {
2053
2104
  n.forEach((i) => {
2054
2105
  t = t.replaceAll(i, "");
2055
2106
  });
2056
2107
  }), t = t.replace(/\(.*?\)/g, ""), t = t.replace(/\[.*?\]/g, ""), t;
2057
- }, Qt = 6e4, Zt = 8e3, en = 2, tn = 0.4, nn = 3, rn = /* @__PURE__ */ new Set([
2108
+ }, rn = 6e4, an = 8e3, on = 2, sn = 0.4, ln = 3, cn = /* @__PURE__ */ new Set([
2058
2109
  "aan",
2059
2110
  "als",
2060
2111
  "ben",
@@ -2167,13 +2218,13 @@ const qt = {
2167
2218
  "you",
2168
2219
  "your"
2169
2220
  ]);
2170
- function an(e) {
2221
+ function un(e) {
2171
2222
  const t = /* @__PURE__ */ new Set();
2172
2223
  for (const n of e.toLowerCase().split(/[^a-z0-9À-ɏ]+/))
2173
- n.length < nn || rn.has(n) || t.add(n);
2224
+ n.length < ln || cn.has(n) || t.add(n);
2174
2225
  return [...t];
2175
2226
  }
2176
- function on(e, t) {
2227
+ function dn(e, t) {
2177
2228
  if (!e.length) return 0;
2178
2229
  if (!t.length) return 1;
2179
2230
  const n = new Set(t), i = new Set(e);
@@ -2181,268 +2232,272 @@ function on(e, t) {
2181
2232
  for (const a of i) n.has(a) || (r += 1);
2182
2233
  return r / i.size;
2183
2234
  }
2184
- function sn(e, t = Qt) {
2235
+ function pn(e, t = rn) {
2185
2236
  const n = e.filter((o) => !o.partial && typeof o.text == "string");
2186
2237
  if (!n.length) return { text: "", segmentCount: 0 };
2187
2238
  const r = n.reduce((o, s) => Math.max(o, s.endedAt ?? 0), 0) - t;
2188
- return { text: n.filter((o) => (o.endedAt ?? 0) >= r).map((o) => Jt(o.text).trim()).filter(Boolean).join(" ").replace(/\s+/g, " ").trim(), segmentCount: n.length };
2239
+ return { text: n.filter((o) => (o.endedAt ?? 0) >= r).map((o) => nn(o.text).trim()).filter(Boolean).join(" ").replace(/\s+/g, " ").trim(), segmentCount: n.length };
2189
2240
  }
2190
- const ln = 60;
2191
- function Sr(e, t, n = ln) {
2241
+ const fn = 60;
2242
+ function Mr(e, t, n = fn) {
2192
2243
  const i = new Set(e), r = [...e];
2193
2244
  for (const a of t)
2194
2245
  !a || i.has(a) || (i.add(a), r.push(a));
2195
2246
  return r.slice(-n);
2196
2247
  }
2197
- function Tr(e) {
2248
+ function Cr(e) {
2198
2249
  const { segments: t, now: n, state: i } = e;
2199
- if (i.lastTriggerAt && n - i.lastTriggerAt < Zt)
2250
+ if (i.lastTriggerAt && n - i.lastTriggerAt < an)
2200
2251
  return { trigger: !1, reason: "too_soon" };
2201
- const r = sn(t, e.windowMs);
2252
+ const r = pn(t, e.windowMs);
2202
2253
  if (!r.text) return { trigger: !1, reason: "no_speech" };
2203
2254
  const a = r.segmentCount - (i.lastSegmentCount ?? 0);
2204
- if (i.lastQueryTerms && a < en)
2255
+ if (i.lastQueryTerms && a < on)
2205
2256
  return { trigger: !1, reason: "too_few_new" };
2206
- const o = an(r.text);
2207
- return o.length ? i.lastQueryTerms?.length && on(o, i.lastQueryTerms) < tn ? { trigger: !1, reason: "same_topic" } : { trigger: !0, text: r.text, terms: o, segmentCount: r.segmentCount } : { trigger: !1, reason: "no_speech" };
2257
+ const o = un(r.text);
2258
+ return o.length ? i.lastQueryTerms?.length && dn(o, i.lastQueryTerms) < sn ? { trigger: !1, reason: "same_topic" } : { trigger: !0, text: r.text, terms: o, segmentCount: r.segmentCount } : { trigger: !1, reason: "no_speech" };
2208
2259
  }
2209
- const Ae = 9e4, cn = ["out_of_office"], ye = (e) => cn.includes(e);
2210
- function _r(e, t, n) {
2211
- const i = n - e < Ae, r = t?.status && (!t.expiresAt || t.expiresAt > n) ? t : void 0;
2260
+ const Te = 9e4, mn = ["out_of_office"], _e = (e) => mn.includes(e);
2261
+ function wr(e, t, n) {
2262
+ const i = n - e < Te, r = t?.status && (!t.expiresAt || t.expiresAt > n) ? t : void 0;
2212
2263
  if (!r?.status) return { online: i, status: i ? "available" : "offline" };
2213
2264
  const a = r.status;
2214
- return !i && !ye(a) ? { online: !1, status: "offline" } : { online: i, status: a, message: r.message };
2265
+ return !i && !_e(a) ? { online: !1, status: "offline" } : { online: i, status: a, message: r.message };
2215
2266
  }
2216
- function Ir(e, t) {
2217
- const n = t - e.lastSeenAt < Ae, i = n || ye(e.status) ? e.status : "offline";
2267
+ function kr(e, t) {
2268
+ const n = t - e.lastSeenAt < Te, i = n || _e(e.status) ? e.status : "offline";
2218
2269
  return n === e.online && i === e.status ? e : { ...e, online: n, status: i };
2219
2270
  }
2220
- function Mr(e, t) {
2271
+ function vr(e, t) {
2221
2272
  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 };
2222
2273
  }
2223
- function Cr(e) {
2274
+ function Nr(e) {
2224
2275
  return e.providerAvailable && e.allowed;
2225
2276
  }
2226
- const vr = "installation-id";
2277
+ const xr = "installation-id";
2227
2278
  export {
2228
2279
  m as ACTIVITY_CATALOG,
2229
- Rt as AI_ATTACHMENT_LIMITS,
2230
- tr as AI_ATTACHMENT_MAX_PER_TURN,
2231
- er as AI_ATTACHMENT_TURN_BUDGET,
2232
- fe as AI_VENDORS,
2233
- De as ALLOWED_LINK_SCHEMES,
2234
- P as ARTIFACT_MAX_BLOCKS,
2235
- $n as ARTIFACT_MAX_BODY_BYTES,
2236
- C as ARTIFACT_MAX_CELL_LEN,
2237
- B as ARTIFACT_MAX_KPI_ITEMS,
2238
- U as ARTIFACT_MAX_LIST_ITEMS,
2239
- j as ARTIFACT_MAX_TABLE_COLUMNS,
2240
- K as ARTIFACT_MAX_TABLE_ROWS,
2241
- ae as ARTIFACT_MAX_TEXT_LEN,
2242
- He as ASSIGNMENT_SCOPE_KIND,
2243
- ge as AUTH_APP_NAME,
2244
- Me as ActivityTypeRegistry,
2245
- Cn as BUILT_IN_ONLY,
2246
- Zt as CADENCE_FLOOR_MS,
2247
- en as CADENCE_MIN_NEW_SEGMENTS,
2248
- tn as CADENCE_MIN_NOVELTY,
2249
- Qt as CADENCE_WINDOW_MS,
2250
- Yn as CLASSIFY_VARS,
2251
- Nn as CORE_DIMENSIONS,
2252
- Gt as CommunicationScheme,
2253
- Bi as DEFAULT_MEMORY_BUDGET,
2254
- ht as DEFAULT_PHONE_REGION,
2255
- ri as EMPTY_WORKFLOW,
2256
- mr as FEATURE_FOLDER_MANAGEMENT,
2257
- gr as FEATURE_REMOTE_SEARCH,
2258
- vr as INSTALLATION_HEADER,
2259
- Qe as INTERACTION_KIND,
2260
- pr as InteractionParticipantRole,
2261
- ot as KB_FALLBACK_LOCALE,
2262
- X as KB_LOCALES,
2263
- fn as MAX_ACTIONS,
2264
- Ve as MAX_ASSIGNMENT_TURNS,
2265
- un as MAX_BLOCKS,
2266
- de as MAX_COLLECTION_DEPTH,
2267
- dn as MAX_FIELDS,
2268
- pn as MAX_LIST_ITEMS,
2269
- Pi as MAX_MEMORY_BROWSE,
2270
- ji as MAX_MEMORY_BUDGET,
2271
- Ui as MAX_MEMORY_CHARS,
2272
- ln as MAX_SHOWN_KEYS,
2273
- ct as MAX_TOPIC_CANDIDATES,
2274
- lt as MAX_TOPIC_EXAMPLES,
2275
- v as MAX_TOPIC_EXAMPLE_CHARS,
2276
- Ki as MIN_MEMORY_BUDGET,
2277
- N as PHONE_REGIONS,
2278
- Ae as PRESENCE_ONLINE_WINDOW_MS,
2279
- cn as PRESENCE_SURVIVES_OFFLINE,
2280
- dr as PROVIDER_FEATURE_MESSAGE_TEMPLATES,
2281
- ur as PROVIDER_FEATURE_MESSAGE_WINDOW,
2282
- _t as PUBLIC_EMAIL_DOMAINS,
2283
- V as READ_STEP_TYPES,
2284
- gt as RELATED_SUBJECT_KINDS,
2285
- ki as SIGNATURE_INTENTS,
2286
- tt as STEP_MAX_TOKENS_MAX,
2287
- et as STEP_MAX_TOKENS_MIN,
2288
- Ot as SUMMARY_MIN_LAST_CHARS,
2289
- xt as SUMMARY_MIN_MESSAGES,
2290
- Fe as TERMINAL_ASSIGNMENT_STATUSES,
2291
- nt as TERMINAL_RUN_STATUSES,
2292
- zn as TRIGGER_VARS,
2293
- hr as UNSUPPORTED,
2294
- xe as USAGE_DIMENSIONS,
2295
- Oe as USAGE_DIMENSION_IDS,
2296
- bi as acceptExampleCandidate,
2297
- ze as actingIdentityKey,
2298
- gn as activityIconOf,
2299
- Mn as activityJoinUrl,
2300
- Te as activitySnippet,
2301
- _e as activityTextParams,
2302
- In as activityTimelineText,
2303
- kn as activityTimestamp,
2280
+ Gt as AI_ATTACHMENT_LIMITS,
2281
+ ar as AI_ATTACHMENT_MAX_PER_TURN,
2282
+ rr as AI_ATTACHMENT_TURN_BUDGET,
2283
+ ye as AI_VENDORS,
2284
+ je as ALLOWED_LINK_SCHEMES,
2285
+ G as ARTIFACT_MAX_BLOCKS,
2286
+ Pn as ARTIFACT_MAX_BODY_BYTES,
2287
+ v as ARTIFACT_MAX_CELL_LEN,
2288
+ V as ARTIFACT_MAX_KPI_ITEMS,
2289
+ B as ARTIFACT_MAX_LIST_ITEMS,
2290
+ H as ARTIFACT_MAX_TABLE_COLUMNS,
2291
+ F as ARTIFACT_MAX_TABLE_ROWS,
2292
+ ue as ARTIFACT_MAX_TEXT_LEN,
2293
+ Ye as ASSIGNMENT_SCOPE_KIND,
2294
+ Ee as AUTH_APP_NAME,
2295
+ Ne as ActivityTypeRegistry,
2296
+ vn as BUILT_IN_ONLY,
2297
+ an as CADENCE_FLOOR_MS,
2298
+ on as CADENCE_MIN_NEW_SEGMENTS,
2299
+ sn as CADENCE_MIN_NOVELTY,
2300
+ rn as CADENCE_WINDOW_MS,
2301
+ Zn as CLASSIFY_VARS,
2302
+ Ln as CORE_DIMENSIONS,
2303
+ zt as CommunicationScheme,
2304
+ Vi as DEFAULT_MEMORY_BUDGET,
2305
+ St as DEFAULT_PHONE_REGION,
2306
+ li as EMPTY_WORKFLOW,
2307
+ yr as FEATURE_FOLDER_MANAGEMENT,
2308
+ br as FEATURE_REMOTE_SEARCH,
2309
+ xr as INSTALLATION_HEADER,
2310
+ it as INTERACTION_KIND,
2311
+ hr as InteractionParticipantRole,
2312
+ dt as KB_FALLBACK_LOCALE,
2313
+ J as KB_LOCALES,
2314
+ M as MAX_ACTIONS,
2315
+ qe as MAX_ASSIGNMENT_TURNS,
2316
+ $ as MAX_BLOCKS,
2317
+ he as MAX_COLLECTION_DEPTH,
2318
+ _ as MAX_FIELDS,
2319
+ I as MAX_LIST_ITEMS,
2320
+ Gi as MAX_MEMORY_BROWSE,
2321
+ Hi as MAX_MEMORY_BUDGET,
2322
+ Bi as MAX_MEMORY_CHARS,
2323
+ fn as MAX_SHOWN_KEYS,
2324
+ mt as MAX_TOPIC_CANDIDATES,
2325
+ ft as MAX_TOPIC_EXAMPLES,
2326
+ N as MAX_TOPIC_EXAMPLE_CHARS,
2327
+ Fi as MIN_MEMORY_BUDGET,
2328
+ L as PHONE_REGIONS,
2329
+ Te as PRESENCE_ONLINE_WINDOW_MS,
2330
+ mn as PRESENCE_SURVIVES_OFFLINE,
2331
+ gr as PROVIDER_FEATURE_MESSAGE_TEMPLATES,
2332
+ mr as PROVIDER_FEATURE_MESSAGE_WINDOW,
2333
+ kt as PUBLIC_EMAIL_DOMAINS,
2334
+ Y as READ_STEP_TYPES,
2335
+ Et as RELATED_SUBJECT_KINDS,
2336
+ Li as SIGNATURE_INTENTS,
2337
+ ot as STEP_MAX_TOKENS_MAX,
2338
+ at as STEP_MAX_TOKENS_MIN,
2339
+ Pt as SUMMARY_MIN_LAST_CHARS,
2340
+ Rt as SUMMARY_MIN_MESSAGES,
2341
+ Xe as TERMINAL_ASSIGNMENT_STATUSES,
2342
+ st as TERMINAL_RUN_STATUSES,
2343
+ Qn as TRIGGER_VARS,
2344
+ Er as UNSUPPORTED,
2345
+ Re as USAGE_DIMENSIONS,
2346
+ Pe as USAGE_DIMENSION_IDS,
2347
+ _i as acceptExampleCandidate,
2348
+ Ze as actingIdentityKey,
2349
+ yn as activityIconOf,
2350
+ kn as activityJoinUrl,
2351
+ we as activitySnippet,
2352
+ ke as activityTextParams,
2353
+ wn as activityTimelineText,
2354
+ On as activityTimestamp,
2304
2355
  d as activityTypeInfo,
2305
- Qn as actorKey,
2306
- yi as addExampleCandidate,
2307
- Ir as agePresenceEntry,
2308
- Dt as aiAttachmentKind,
2309
- nr as aiAttachmentRejection,
2310
- Y as aiBudgetLimit,
2311
- vi as aiBudgetPeriodKey,
2312
- ft as aiBudgetPeriodStart,
2313
- Ci as aiBudgetState,
2314
- Mi as aiVendorAcceptsAttachment,
2315
- Ti as aiVendorDefaultModel,
2316
- Si as aiVendorLabel,
2317
- Ii as aiVendorNeedsBaseUrl,
2318
- _i as aiVendorsWith,
2319
- he as appNameFromPath,
2320
- Ni as applySignature,
2321
- Rn as artifactBodyBytes,
2322
- Pn as artifactOutline,
2323
- Un as artifactToMarkdown,
2324
- ni as assignmentMismatch,
2325
- Fn as assignmentScopeKey,
2326
- Hn as assignmentSubject,
2327
- vn as buildActivityPreview,
2328
- ar as buildChannelIntents,
2329
- Kn as buildShareKeys,
2330
- sn as buildWindow,
2331
- gi as canNestUnder,
2332
- bn as carriesText,
2333
- Ai as categoryLabel,
2334
- cr as channelKindForScheme,
2335
- hn as channelKindOf,
2336
- ii as clampStepMaxTokens,
2337
- Ji as cleanMessageText,
2338
- Vn as decideAssignmentState,
2339
- Tr as decideCadence,
2340
- st as defaultLocaleOf,
2341
- fr as defineIntent,
2342
- rt as depthOf,
2343
- _r as derivePresence,
2344
- rr as disabledIntentsFromCapabilities,
2345
- Wi as emailDomain,
2346
- Yi as endpointKey,
2347
- Wt as extractParams,
2348
- an as extractTerms,
2349
- sr as filterByEndpoint,
2350
- or as filterByIntent,
2351
- Bt as filterByTargetScheme,
2356
+ ni as actorKey,
2357
+ Ti as addExampleCandidate,
2358
+ kr as agePresenceEntry,
2359
+ jt as aiAttachmentKind,
2360
+ or as aiAttachmentRejection,
2361
+ Z as aiBudgetLimit,
2362
+ xi as aiBudgetPeriodKey,
2363
+ yt as aiBudgetPeriodStart,
2364
+ Ni as aiBudgetState,
2365
+ vi as aiVendorAcceptsAttachment,
2366
+ Ci as aiVendorDefaultModel,
2367
+ Mi as aiVendorLabel,
2368
+ ki as aiVendorNeedsBaseUrl,
2369
+ wi as aiVendorsWith,
2370
+ Se as appNameFromPath,
2371
+ $i as applySignature,
2372
+ Kn as artifactBodyBytes,
2373
+ jn as artifactOutline,
2374
+ Gn as artifactToMarkdown,
2375
+ oi as assignmentMismatch,
2376
+ Wn as assignmentScopeKey,
2377
+ Xn as assignmentSubject,
2378
+ Nn as buildActivityPreview,
2379
+ cr as buildChannelIntents,
2380
+ Bn as buildShareKeys,
2381
+ pn as buildWindow,
2382
+ bi as canNestUnder,
2383
+ Tn as carriesText,
2384
+ Si as categoryLabel,
2385
+ fr as channelKindForScheme,
2386
+ bn as channelKindOf,
2387
+ si as clampStepMaxTokens,
2388
+ tr as cleanMessageText,
2389
+ Yn as decideAssignmentState,
2390
+ Cr as decideCadence,
2391
+ pt as defaultLocaleOf,
2392
+ Ar as defineIntent,
2393
+ ct as depthOf,
2394
+ wr as derivePresence,
2395
+ lr as disabledIntentsFromCapabilities,
2396
+ qi as emailDomain,
2397
+ Zi as endpointKey,
2398
+ Jt as extractParams,
2399
+ un as extractTerms,
2400
+ dr as filterByEndpoint,
2401
+ ur as filterByIntent,
2402
+ Wt as filterByTargetScheme,
2352
2403
  S as findAiVendor,
2353
- xn as flattenLocales,
2354
- we as floorToPeriod,
2355
- Xe as formatActingIdentity,
2356
- ve as formatPeriod,
2357
- ir as freshSources,
2358
- wn as getActivitySeenUserIds,
2359
- xi as getContactEndpoints,
2360
- Di as getShortTitle,
2361
- $i as getUrgencyScore,
2362
- pe as heightOf,
2363
- pi as helpCenterText,
2364
- Xn as humanizeAction,
2365
- Ze as interactionIdOf,
2366
- Fi as isAgentUser,
2367
- Oi as isAssigned,
2368
- Gn as isAssignmentTerminal,
2369
- qe as isAssignmentTrigger,
2370
- Li as isClosed,
2371
- Tn as isConnectedType,
2372
- Ar as isDeepLink,
2373
- at as isDescendant,
2374
- li as isInFlight,
2375
- Ri as isInteractionUnseen,
2376
- yr as isLandingPath,
2377
- Qi as isLikelyBulk,
2378
- An as isMessageType,
2379
- zt as isMoreSpecificPattern,
2380
- it as isPaused,
2381
- Sn as isPlaybookAuthoredType,
2382
- Xi as isPublicEmailDomain,
2383
- Er as isPublicPath,
2384
- yn as isReplyableType,
2385
- si as isTerminal,
2386
- Zi as isThreadLongEnough,
2387
- _n as isTranscriptType,
2388
- di as linkLabel,
2389
- wi as listeningAllowed,
2390
- mi as localeInstruction,
2391
- fi as localeName,
2392
- hi as localesOf,
2393
- Hi as looksLikeEmail,
2394
- lr as matchContactToIntents,
2395
- Yt as matchPublicRoute,
2396
- Sr as mergeShownKeys,
2397
- En as messageCountsAs,
2398
- zi as needsPhoneRegion,
2399
- Dn as normalizeArtifactBlocks,
2400
- mn as normalizeBlocks,
2401
- me as normalizeEmail,
2404
+ $n as flattenLocales,
2405
+ Le as floorToPeriod,
2406
+ Qe as formatActingIdentity,
2407
+ Oe as formatPeriod,
2408
+ sr as freshSources,
2409
+ xn as getActivitySeenUserIds,
2410
+ Di as getContactEndpoints,
2411
+ Ki as getShortTitle,
2412
+ Ui as getUrgencyScore,
2413
+ Ae as heightOf,
2414
+ hi as helpCenterText,
2415
+ Jn as humanizeAction,
2416
+ rt as interactionIdOf,
2417
+ zi as isAgentUser,
2418
+ Ri as isAssigned,
2419
+ Vn as isAssignmentTerminal,
2420
+ tt as isAssignmentTrigger,
2421
+ hn as isChatMessageActivity,
2422
+ Pi as isClosed,
2423
+ Mn as isConnectedType,
2424
+ Sr as isDeepLink,
2425
+ ut as isDescendant,
2426
+ gn as isEmailActivity,
2427
+ pi as isInFlight,
2428
+ ji as isInteractionUnseen,
2429
+ Tr as isLandingPath,
2430
+ nr as isLikelyBulk,
2431
+ le as isMessageShape,
2432
+ En as isMessageType,
2433
+ Zt as isMoreSpecificPattern,
2434
+ lt as isPaused,
2435
+ In as isPlaybookAuthoredType,
2436
+ Ji as isPublicEmailDomain,
2437
+ Ir as isPublicPath,
2438
+ Sn as isReplyableType,
2439
+ di as isTerminal,
2440
+ ir as isThreadLongEnough,
2441
+ Cn as isTranscriptType,
2442
+ gi as linkLabel,
2443
+ Oi as listeningAllowed,
2444
+ yi as localeInstruction,
2445
+ Ai as localeName,
2446
+ Ei as localesOf,
2447
+ Xi as looksLikeEmail,
2448
+ pr as matchContactToIntents,
2449
+ en as matchPublicRoute,
2450
+ Mr as mergeShownKeys,
2451
+ _n as messageCountsAs,
2452
+ Qi as needsPhoneRegion,
2453
+ Un as normalizeArtifactBlocks,
2454
+ An as normalizeBlocks,
2455
+ be as normalizeEmail,
2402
2456
  g as normalizeExample,
2403
- on as novelty,
2404
- qn as parseActingIdentity,
2405
- Vt as pathToRegex,
2406
- On as periodsInRange,
2407
- Vi as phoneSuffix,
2408
- qi as plainTextFromMarkdown,
2409
- Ye as playbookActor,
2410
- oi as procedureOf,
2411
- Xt as publicBasePathFor,
2412
- br as publicRoutePatterns,
2413
- w as readPath,
2414
- W as readStepError,
2415
- Je as refKey,
2416
- Tt as registrableDomain,
2417
- dt as rejectExampleCandidate,
2418
- Gi as relatedByDefault,
2419
- Kt as resolveAccountCapabilities,
2420
- k as resolveActivityText,
2421
- Ut as resolveChannelIntents,
2422
- mt as resolveSignature,
2423
- Mr as resolveWorkMode,
2424
- Jn as runActor,
2425
- ui as runInteractionId,
2426
- Ke as sanitizeInline,
2427
- Jt as sanitizeTranscript,
2428
- Wn as selectLenses,
2429
- le as shareKeyForTeam,
2430
- se as shareKeyForUser,
2431
- jn as shareKeysForViewer,
2432
- Cr as shouldRunAudioPipeline,
2433
- Pt as sourceKey,
2434
- ai as stepsOf,
2435
- Se as stripHtml,
2436
- ci as subjectKeyOf,
2437
- ce as subjectOf,
2438
- ti as targetById,
2439
- ei as targetForActivityType,
2440
- Q as toE164,
2441
- Bn as toolSourceKinds,
2442
- pt as topicOfferedForTeam,
2443
- Ei as topicsForTeam,
2444
- ut as truncateExample,
2445
- Le as usageMetricId,
2446
- Ln as usageMetrics,
2447
- Zn as valueAtPath
2457
+ dn as novelty,
2458
+ ei as parseActingIdentity,
2459
+ qt as pathToRegex,
2460
+ Dn as periodsInRange,
2461
+ Yi as phoneSuffix,
2462
+ er as plainTextFromMarkdown,
2463
+ et as playbookActor,
2464
+ ui as procedureOf,
2465
+ Qt as publicBasePathFor,
2466
+ _r as publicRoutePatterns,
2467
+ x as readPath,
2468
+ q as readStepError,
2469
+ nt as refKey,
2470
+ wt as registrableDomain,
2471
+ ht as rejectExampleCandidate,
2472
+ Wi as relatedByDefault,
2473
+ Ht as resolveAccountCapabilities,
2474
+ O as resolveActivityText,
2475
+ Ft as resolveChannelIntents,
2476
+ bt as resolveSignature,
2477
+ vr as resolveWorkMode,
2478
+ ti as runActor,
2479
+ mi as runInteractionId,
2480
+ He as sanitizeInline,
2481
+ nn as sanitizeTranscript,
2482
+ qn as selectLenses,
2483
+ fe as shareKeyForTeam,
2484
+ pe as shareKeyForUser,
2485
+ Fn as shareKeysForViewer,
2486
+ Nr as shouldRunAudioPipeline,
2487
+ Bt as sourceKey,
2488
+ ci as stepsOf,
2489
+ Ce as stripHtml,
2490
+ fi as subjectKeyOf,
2491
+ me as subjectOf,
2492
+ ai as targetById,
2493
+ ri as targetForActivityType,
2494
+ ne as toE164,
2495
+ Hn as toolSourceKinds,
2496
+ At as topicOfferedForTeam,
2497
+ Ii as topicsForTeam,
2498
+ gt as truncateExample,
2499
+ Ue as usageMetricId,
2500
+ Rn as usageMetrics,
2501
+ ii as valueAtPath,
2502
+ zn as wakesAssignment
2448
2503
  };