@opencxh/domain 1.171.0 → 1.172.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/dist/entities/activity/blocks.d.ts +30 -30
  2. package/dist/entities/activity/catalog.d.ts +63 -86
  3. package/dist/entities/activity/descriptor.d.ts +31 -32
  4. package/dist/entities/activity/index.d.ts +2 -2
  5. package/dist/entities/activity/preview.d.ts +7 -7
  6. package/dist/entities/activity/resolve.d.ts +37 -38
  7. package/dist/entities/activity/types.d.ts +34 -34
  8. package/dist/entities/ai-account/types.d.ts +3 -3
  9. package/dist/entities/ai-account/vendors.d.ts +25 -32
  10. package/dist/entities/ai-budget/types.d.ts +12 -8
  11. package/dist/entities/ai-conversation/types.d.ts +12 -12
  12. package/dist/entities/ai-profile/types.d.ts +21 -26
  13. package/dist/entities/ai-settings/types.d.ts +12 -13
  14. package/dist/entities/analytics/dashboard.d.ts +1 -1
  15. package/dist/entities/analytics/index.d.ts +4 -4
  16. package/dist/entities/analytics/source.d.ts +1 -1
  17. package/dist/entities/analytics/usage.d.ts +23 -28
  18. package/dist/entities/artifact/blocks.d.ts +54 -69
  19. package/dist/entities/artifact/markdown.d.ts +2 -3
  20. package/dist/entities/artifact/types.d.ts +47 -55
  21. package/dist/entities/assignment/types.d.ts +74 -88
  22. package/dist/entities/calendar-event/types.d.ts +1 -1
  23. package/dist/entities/channel/index.d.ts +1 -1
  24. package/dist/entities/channel/signature.d.ts +8 -9
  25. package/dist/entities/communication/index.d.ts +1 -1
  26. package/dist/entities/communication/message-template.d.ts +1 -1
  27. package/dist/entities/company/types.d.ts +1 -1
  28. package/dist/entities/contact/index.d.ts +1 -1
  29. package/dist/entities/contact/provider.d.ts +2 -1
  30. package/dist/entities/contact/types.d.ts +1 -10
  31. package/dist/entities/custom-field-def/types.d.ts +14 -14
  32. package/dist/entities/external-identity/types.d.ts +45 -50
  33. package/dist/entities/interaction/index.d.ts +1 -1
  34. package/dist/entities/interaction/types.d.ts +44 -47
  35. package/dist/entities/live-lens/types.d.ts +39 -44
  36. package/dist/entities/mcp/types.d.ts +53 -57
  37. package/dist/entities/memory/alias.d.ts +7 -7
  38. package/dist/entities/memory/browse.d.ts +21 -21
  39. package/dist/entities/memory/ingest.d.ts +26 -17
  40. package/dist/entities/memory/item.d.ts +53 -58
  41. package/dist/entities/memory/kind.d.ts +26 -26
  42. package/dist/entities/memory/query.d.ts +49 -51
  43. package/dist/entities/playbook/actor.d.ts +20 -19
  44. package/dist/entities/playbook/assignment.d.ts +54 -63
  45. package/dist/entities/playbook/index.d.ts +2 -2
  46. package/dist/entities/playbook/labels.d.ts +4 -4
  47. package/dist/entities/playbook/trigger-vars.d.ts +14 -15
  48. package/dist/entities/playbook/types.d.ts +173 -303
  49. package/dist/entities/resource-reminder/types.d.ts +8 -9
  50. package/dist/entities/scope/actor.d.ts +16 -0
  51. package/dist/entities/{note → scope}/index.d.ts +1 -0
  52. package/dist/entities/scope/scope.test.d.ts +1 -0
  53. package/dist/entities/scope/types.d.ts +53 -0
  54. package/dist/entities/task/types.d.ts +1 -1
  55. package/dist/entities/time-entry/duration.d.ts +11 -11
  56. package/dist/entities/time-entry/types.d.ts +60 -60
  57. package/dist/entities/time-entry/work-type.d.ts +21 -24
  58. package/dist/entities/topic/examples.d.ts +26 -27
  59. package/dist/entities/topic/scope.d.ts +11 -12
  60. package/dist/entities/topic/types.d.ts +28 -28
  61. package/dist/entities/user/types.d.ts +24 -28
  62. package/dist/entities/webhook/types.d.ts +6 -6
  63. package/dist/entities/work/keys.d.ts +25 -26
  64. package/dist/entities/work/ladder.d.ts +48 -52
  65. package/dist/entities/work/types.d.ts +109 -115
  66. package/dist/index.cjs +6 -6
  67. package/dist/index.d.ts +29 -33
  68. package/dist/index.js +1391 -1254
  69. package/dist/platform/account.d.ts +34 -38
  70. package/dist/platform/ai-tools.d.ts +48 -52
  71. package/dist/platform/api.d.ts +9 -8
  72. package/dist/platform/author.d.ts +7 -9
  73. package/dist/platform/capabilities.d.ts +3 -3
  74. package/dist/platform/communication.d.ts +163 -204
  75. package/dist/platform/context.d.ts +8 -8
  76. package/dist/platform/identity.d.ts +16 -19
  77. package/dist/platform/kernel.d.ts +1 -1
  78. package/dist/platform/manifest.d.ts +2 -2
  79. package/dist/platform/media.d.ts +13 -15
  80. package/dist/platform/permission.d.ts +39 -0
  81. package/dist/platform/permission.test.d.ts +1 -0
  82. package/dist/platform/presence.d.ts +30 -30
  83. package/dist/platform/provider.d.ts +14 -76
  84. package/dist/platform/resource-source.d.ts +43 -45
  85. package/dist/platform/resource.d.ts +17 -23
  86. package/dist/platform/scope.d.ts +36 -62
  87. package/dist/platform/services.d.ts +4 -4
  88. package/dist/platform/settings.d.ts +0 -14
  89. package/dist/platform/storage.d.ts +2 -2
  90. package/dist/platform/sync-source.d.ts +196 -216
  91. package/dist/platform/transcript-cadence.d.ts +37 -41
  92. package/dist/platform/ui.d.ts +6 -6
  93. package/dist/text/endpoint.d.ts +11 -27
  94. package/package.json +3 -5
  95. package/dist/entities/note/types.d.ts +0 -14
  96. package/dist/entities/shopify/index.d.ts +0 -1
  97. package/dist/entities/shopify/types.d.ts +0 -79
  98. package/dist/platform/lifecycle.d.ts +0 -13
  99. package/dist/platform/reactive.d.ts +0 -13
  100. package/dist/platform/sdk.d.ts +0 -182
  101. package/dist/platform/service-registry.d.ts +0 -13
package/dist/index.js CHANGED
@@ -1,10 +1,4 @@
1
- function kn(e) {
2
- return e.type === "EMAIL_RECEIVED" || e.type === "EMAIL_SENT";
3
- }
4
- function wn(e) {
5
- return e.type === "CHAT_MESSAGE_SENT" || e.type === "CHAT_MESSAGE_RECEIVED";
6
- }
7
- const L = 10, T = 10, I = 10, M = 5, we = /* @__PURE__ */ new Set([
1
+ const In = 10, wn = 10, Mn = 10, kn = 5, Ie = /* @__PURE__ */ new Set([
8
2
  "header",
9
3
  "section",
10
4
  "context",
@@ -14,36 +8,36 @@ const L = 10, T = 10, I = 10, M = 5, we = /* @__PURE__ */ new Set([
14
8
  "actions",
15
9
  "attachments"
16
10
  ]);
17
- function C(e) {
11
+ function T(e) {
18
12
  if (typeof e == "string") return e.length > 0;
19
13
  if (!e || typeof e != "object") return !1;
20
14
  const t = e;
21
15
  return typeof t.key == "string" || typeof t.value == "string";
22
16
  }
23
- function Nn(e, t = () => {
17
+ function Cn(e, t = () => {
24
18
  }) {
25
19
  if (!Array.isArray(e)) return [];
26
20
  const n = [];
27
21
  for (const r of e) {
28
- if (n.length >= L) {
29
- t("more than " + L + " blocks; the rest was dropped");
22
+ if (n.length >= 10) {
23
+ t("more than 10 blocks; the rest was dropped");
30
24
  break;
31
25
  }
32
26
  if (!r || typeof r != "object") continue;
33
27
  const i = r;
34
- if (!we.has(i.type)) {
28
+ if (!Ie.has(i.type)) {
35
29
  t("unknown block type " + String(i.type));
36
30
  continue;
37
31
  }
38
32
  switch (i.type) {
39
33
  case "header":
40
- if (!C(i.text)) {
34
+ if (!T(i.text)) {
41
35
  t("a header without text");
42
36
  continue;
43
37
  }
44
38
  break;
45
39
  case "context":
46
- if (!C(i.text)) {
40
+ if (!T(i.text)) {
47
41
  t("a context block without text");
48
42
  continue;
49
43
  }
@@ -55,19 +49,19 @@ function Nn(e, t = () => {
55
49
  }
56
50
  break;
57
51
  case "section":
58
- Array.isArray(i.fields) && i.fields.length > T && (t("more than " + T + " fields in a section"), i.fields = i.fields.slice(0, T));
52
+ Array.isArray(i.fields) && i.fields.length > 10 && (t("more than 10 fields in a section"), i.fields = i.fields.slice(0, 10));
59
53
  break;
60
54
  case "list":
61
55
  if (!Array.isArray(i.items) || i.items.length === 0) {
62
56
  t("a list without items");
63
57
  continue;
64
58
  }
65
- i.items.length > I && (t("more than " + I + " list items"), i.items = i.items.slice(0, I));
59
+ i.items.length > 10 && (t("more than 10 list items"), i.items = i.items.slice(0, 10));
66
60
  break;
67
61
  case "actions": {
68
- const a = Array.isArray(i.elements) ? i.elements : [], o = a.filter((s) => s && s.action_id && s.invoke && C(s.text));
62
+ const a = Array.isArray(i.elements) ? i.elements : [], o = a.filter((s) => s && s.action_id && s.invoke && T(s.text));
69
63
  if (o.length !== a.length && t("an action without action_id, invoke or text"), o.length === 0) continue;
70
- o.length > M && t("more than " + M + " actions"), i.elements = o.slice(0, M);
64
+ o.length > 5 && t("more than 5 actions"), i.elements = o.slice(0, 5);
71
65
  break;
72
66
  }
73
67
  }
@@ -75,7 +69,7 @@ function Nn(e, t = () => {
75
69
  }
76
70
  return n;
77
71
  }
78
- function Ne(e) {
72
+ function we(e) {
79
73
  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();
80
74
  }
81
75
  function A(e) {
@@ -83,16 +77,16 @@ function A(e) {
83
77
  const t = Math.floor(e / 60), n = Math.floor(e % 60);
84
78
  return `${t}:${n.toString().padStart(2, "0")}`;
85
79
  }
86
- function D(e) {
80
+ function O(e) {
87
81
  return e ? ` — ${Math.floor(e / 60)}m ${e % 60}s` : "";
88
82
  }
89
- function k(e) {
83
+ function I(e) {
90
84
  return e?.split("@")?.[0] || e || "";
91
85
  }
92
86
  function b(e) {
93
87
  return e.map((t) => t.name).join(", ");
94
88
  }
95
- function P(e) {
89
+ function $(e) {
96
90
  return e === "meeting" ? "Meeting" : e === "video" ? "Video call" : "Audio call";
97
91
  }
98
92
  const m = {
@@ -102,7 +96,7 @@ const m = {
102
96
  channelKind: "voice",
103
97
  icon: "phone",
104
98
  snippet: () => "Gesprek gestart",
105
- timeline: (e) => e.direction === "inbound" ? `Inbound call started — ${k(e.payload.from)}` : `Outbound call started — ${k(e.payload.to)}`
99
+ timeline: (e) => e.direction === "inbound" ? `Inbound call started — ${I(e.payload.from)}` : `Outbound call started — ${I(e.payload.to)}`
106
100
  },
107
101
  VOICE_CALL_ANSWERED: {
108
102
  shape: "event",
@@ -130,14 +124,14 @@ const m = {
130
124
  channelKind: "voice",
131
125
  icon: "phone",
132
126
  snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${A(e.payload.duration)})` : ""}`,
133
- timeline: (e) => `Call ended${D(e.payload.duration)}`
127
+ timeline: (e) => `Call ended${O(e.payload.duration)}`
134
128
  },
135
129
  VOICE_CALL_MISSED: {
136
130
  shape: "event",
137
131
  channelKind: "voice",
138
132
  icon: "phone",
139
133
  snippet: () => "Gemiste oproep",
140
- timeline: (e) => `Missed call — ${k(e.payload.from)}`
134
+ timeline: (e) => `Missed call — ${I(e.payload.from)}`
141
135
  },
142
136
  VOICE_CALL_FAILED: {
143
137
  shape: "event",
@@ -212,7 +206,7 @@ const m = {
212
206
  replyable: !0,
213
207
  carriesText: !0,
214
208
  countsAs: "inbound_message",
215
- snippet: K
209
+ snippet: R
216
210
  },
217
211
  EMAIL_SENT: {
218
212
  shape: "message",
@@ -222,7 +216,7 @@ const m = {
222
216
  replyable: !0,
223
217
  carriesText: !0,
224
218
  countsAs: "outbound_message",
225
- snippet: K
219
+ snippet: R
226
220
  },
227
221
  /* ---- chat ---- */
228
222
  CHAT_MESSAGE_SENT: {
@@ -279,7 +273,7 @@ const m = {
279
273
  channelKind: "chat",
280
274
  icon: "message-circle",
281
275
  snippet: () => "Gesprek gestart",
282
- timeline: (e) => `${P(e.payload.callType)} started${e.payload.initiator ? ` by ${e.payload.initiator.name}` : ""}`,
276
+ timeline: (e) => `${$(e.payload.callType)} started${e.payload.initiator ? ` by ${e.payload.initiator.name}` : ""}`,
283
277
  joinUrl: (e) => e.payload.joinUrl
284
278
  },
285
279
  CHAT_CALL_ENDED: {
@@ -287,7 +281,7 @@ const m = {
287
281
  channelKind: "chat",
288
282
  icon: "message-circle",
289
283
  snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${A(e.payload.duration)})` : ""}`,
290
- timeline: (e) => `${P(e.payload.callType)} ended${D(e.payload.duration)}`,
284
+ timeline: (e) => `${$(e.payload.callType)} ended${O(e.payload.duration)}`,
291
285
  joinUrl: (e) => e.payload.joinUrl
292
286
  },
293
287
  CHAT_EVENT: {
@@ -297,7 +291,7 @@ const m = {
297
291
  snippet: (e) => e.payload.text ?? e.payload.eventType,
298
292
  timeline: (e) => e.payload.text || e.payload.eventType
299
293
  },
300
- /* ---- inhoud ---- */
294
+ /* ---- content ---- */
301
295
  TRANSCRIPT_ADDED: {
302
296
  shape: "artifact",
303
297
  triggerable: !0,
@@ -391,7 +385,7 @@ const m = {
391
385
  snippet: (e) => `${e.payload.name} verlaten`,
392
386
  timeline: (e, t) => `${t} left the meeting`
393
387
  },
394
- /* ---- interactie-levenscyclus ---- */
388
+ /* ---- interaction lifecycle ---- */
395
389
  INTERACTION_CREATED: {
396
390
  shape: "event",
397
391
  icon: "circle",
@@ -413,8 +407,8 @@ const m = {
413
407
  timeline: (e, t) => `Assigned by ${t}`
414
408
  }
415
409
  };
416
- function K(e) {
417
- const t = e.payload, n = t.bodySnippet?.trim() || Ne(t.body ?? "");
410
+ function R(e) {
411
+ const t = e.payload, n = t.bodySnippet?.trim() || we(t.body ?? "");
418
412
  return t.subject ? `${t.subject} — ${n}` : n;
419
413
  }
420
414
  function d(e) {
@@ -423,47 +417,47 @@ function d(e) {
423
417
  function vn(e) {
424
418
  return d(e)?.icon ?? "circle";
425
419
  }
426
- function xn(e) {
420
+ function Nn(e) {
427
421
  return d(e)?.channelKind;
428
422
  }
429
- function ce(e) {
423
+ function ae(e) {
430
424
  return e === "message" || e === "note";
431
425
  }
432
- function On(e) {
433
- return ce(d(e)?.shape);
426
+ function xn(e) {
427
+ return ae(d(e)?.shape);
434
428
  }
435
- function $n(e) {
429
+ function On(e) {
436
430
  return d(e)?.replyable === !0;
437
431
  }
438
- function Rn(e) {
432
+ function $n(e) {
439
433
  return d(e)?.carriesText === !0;
440
434
  }
441
- function Ln(e) {
435
+ function Rn(e) {
442
436
  return d(e)?.countsAs;
443
437
  }
444
- function Dn(e) {
438
+ function Ln(e) {
445
439
  return d(e)?.playbookAuthored === !0;
446
440
  }
447
- function Pn(e) {
441
+ function Dn(e) {
448
442
  return d(e)?.connected === !0;
449
443
  }
450
- function Kn(e) {
444
+ function Pn(e) {
451
445
  const t = d(e);
452
446
  return t?.shape === "artifact" && t?.carriesText === !0;
453
447
  }
454
- function ve(e) {
448
+ function Me(e) {
455
449
  const t = d(e.type)?.snippet;
456
450
  return t ? t(e) : "";
457
451
  }
458
- function Un(e, t) {
452
+ function Kn(e, t) {
459
453
  const n = d(e.type)?.timeline;
460
454
  return n ? n(e, t) : e.type.replace(/_/g, " ").toLowerCase();
461
455
  }
462
- function jn(e) {
456
+ function Un(e) {
463
457
  const t = d(e.type)?.joinUrl;
464
458
  return t ? t(e) : void 0;
465
459
  }
466
- function x(e, t) {
460
+ function C(e, t) {
467
461
  let n = e;
468
462
  for (const r of t.split(".")) {
469
463
  if (n == null || typeof n != "object") return "";
@@ -471,26 +465,43 @@ function x(e, t) {
471
465
  }
472
466
  return n == null ? "" : typeof n == "string" ? n : typeof n == "number" || typeof n == "boolean" ? String(n) : "";
473
467
  }
474
- function O(e, t, n) {
468
+ function v(e, t, n) {
475
469
  if (e === void 0) return null;
476
470
  if (typeof e == "string") return e || null;
477
471
  if ("value" in e)
478
- return x(t, e.value) || null;
472
+ return C(t, e.value) || null;
479
473
  const r = {};
480
474
  for (const [a, o] of Object.entries(e.params ?? {}))
481
- r[a] = x(t, o);
475
+ r[a] = C(t, o);
482
476
  const i = n(e.key, r);
483
477
  return i === e.key ? null : i;
484
478
  }
485
- function xe(e, t) {
479
+ function ke(e, t) {
486
480
  if (!e || typeof e == "string" || "value" in e) return null;
487
481
  const n = {};
488
482
  for (const [r, i] of Object.entries(e.params ?? {}))
489
- n[r] = x(t, i);
483
+ n[r] = C(t, i);
490
484
  return { key: e.key, params: n };
491
485
  }
492
- const Oe = (e) => e;
493
- function U(e) {
486
+ const L = 140;
487
+ function Ce(e) {
488
+ const t = e.trim();
489
+ return t.length <= L ? t : t.slice(0, L - 1).trimEnd() + "…";
490
+ }
491
+ function jn(e, t) {
492
+ const n = ke(t?.text, e), r = t ? v(t.text, e, (i) => i) : null;
493
+ return {
494
+ activityId: e.id,
495
+ type: e.type,
496
+ snippet: Ce(r ?? Me(e)),
497
+ authorName: e.author?.name ?? "",
498
+ direction: e.direction,
499
+ createdAt: e.createdAt ?? Date.now(),
500
+ ...n ? { snippetKey: n.key, snippetParams: n.params } : {}
501
+ };
502
+ }
503
+ const ve = (e) => e;
504
+ function D(e) {
494
505
  const t = m[e];
495
506
  return {
496
507
  type: e,
@@ -506,7 +517,7 @@ function U(e) {
506
517
  displayNameKey: t.displayNameKey
507
518
  };
508
519
  }
509
- function j(e) {
520
+ function P(e) {
510
521
  return {
511
522
  type: e.type,
512
523
  shape: e.shape,
@@ -521,119 +532,244 @@ function j(e) {
521
532
  displayNameKey: e.displayNameKey
522
533
  };
523
534
  }
524
- class $e {
525
- constructor(t = [], n = Oe) {
535
+ class Ne {
536
+ constructor(t = [], n = ve) {
526
537
  this.translate = n;
527
538
  for (const r of t)
528
539
  r?.type && (r.type in m || this.declared.has(r.type) || this.declared.set(r.type, r));
529
540
  }
530
541
  declared = /* @__PURE__ */ new Map();
531
542
  get(t) {
532
- if (t in m) return U(t);
543
+ if (t in m) return D(t);
533
544
  const n = this.declared.get(t);
534
- return n ? j(n) : void 0;
545
+ return n ? P(n) : void 0;
535
546
  }
536
- /** Alles wat als trigger aangeboden mag worden, ingebouwd en gedeclareerd. */
547
+ /** Everything that may be offered as a trigger, built-in and declared. */
537
548
  triggerable() {
538
- const t = Object.keys(m).filter((r) => m[r].triggerable).map(U), n = [...this.declared.values()].map(j).filter((r) => r.triggerable);
549
+ const t = Object.keys(m).filter((r) => m[r].triggerable).map(D), n = [...this.declared.values()].map(P).filter((r) => r.triggerable);
539
550
  return [...t, ...n];
540
551
  }
541
552
  /**
542
- * De tijdlijnregel. Ingebouwd komt uit de catalogus, gedeclareerd uit `text` + de
543
- * meegeleverde vertaling. Zonder bruikbare tekst valt het terug op de ontstreepte
544
- * typenaam — dezelfde regel die de feed altijd al toonde voor onbekende types.
553
+ * The timeline line. Built-in comes from the catalog, declared from `text` plus the supplied
554
+ * translation. Without usable text it falls back to the de-underscored type name — the same line
555
+ * the feed always showed for unknown types.
545
556
  */
546
557
  timelineText(t, n) {
547
558
  const r = m[t.type];
548
559
  if (r?.timeline) return r.timeline(t, n);
549
560
  const i = this.declared.get(t.type);
550
- return O(i?.text, t, this.translate) ?? t.type.replace(/_/g, " ").toLowerCase();
561
+ return v(i?.text, t, this.translate) ?? t.type.replace(/_/g, " ").toLowerCase();
551
562
  }
552
- /** De regel voor de inboxlijst. Leeg wanneer het type niets te tonen heeft. */
563
+ /** The line for the inbox list. Empty when the type has nothing to show. */
553
564
  snippet(t) {
554
565
  const n = m[t.type];
555
566
  if (n?.snippet) return n.snippet(t);
556
567
  const r = this.declared.get(t.type);
557
- return O(r?.text, t, this.translate) ?? "";
568
+ return v(r?.text, t, this.translate) ?? "";
558
569
  }
559
- /** De descriptor zoals hij binnenkwam; nodig om `text` als sleutel op te slaan. */
570
+ /** The descriptor as it arrived; needed to store `text` as a key. */
560
571
  descriptor(t) {
561
572
  return this.declared.get(t);
562
573
  }
563
- /** De declaratieve blokken van een type, als het er heeft. */
574
+ /** A type's declarative blocks, when it has any. */
564
575
  blocks(t) {
565
576
  const n = this.declared.get(t)?.render;
566
577
  return n?.length ? n : void 0;
567
578
  }
568
579
  /**
569
- * Dezelfde semantische vragen als de losse accessors in `catalog.ts`, maar dan óók voor
570
- * types die een app declareerde.
580
+ * The same semantic questions as the standalone accessors in `catalog.ts`, but for types an app
581
+ * declared as well.
571
582
  *
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.
583
+ * That difference is why these methods exist. `isMessageType(type)` reads only
584
+ * `ACTIVITY_CATALOG`, so a declared type with `shape: "message"` returned `false` there — a
585
+ * helpdesk app could bring a message kind that then did not count as a conversation, was not
586
+ * replyable and never landed in the analytics. Anyone with a registry at hand should use these;
587
+ * anyone without falls back to the built-in ones.
577
588
  *
578
- * De regel zelf staat maar op één plek: {@link isMessageShape} en de velden van
589
+ * The rule itself lives in one place: {@link isMessageShape} and the fields of
579
590
  * {@link ResolvedActivityType}.
580
591
  */
581
592
  isMessage(t) {
582
- return ce(this.get(t)?.shape);
593
+ return ae(this.get(t)?.shape);
583
594
  }
584
- /** Kan een mens hierop antwoorden? Notities niet — die gaan nergens heen. */
595
+ /** Can a person reply to this? Notes cannot — those go nowhere. */
585
596
  isReplyable(t) {
586
597
  return this.get(t)?.replyable === !0;
587
598
  }
588
- /** Leesbare inhoud voor een model: berichten, notities én transcripten. */
599
+ /** Readable content for a model: messages, notes and transcripts. */
589
600
  carriesText(t) {
590
601
  return this.get(t)?.carriesText === !0;
591
602
  }
592
- /** Telt mee als in- of uitgaand bericht in de analytics-rollup. */
603
+ /** Counts as an inbound or outbound message in the analytics rollup. */
593
604
  countsAs(t) {
594
605
  return this.get(t)?.countsAs;
595
606
  }
596
- /** `mail` | `chat` | `voice` | `video`, of `undefined` voor een levenscyclus-event. */
607
+ /** `mail` | `chat` | `voice` | `video`, or `undefined` for a lifecycle event. */
597
608
  channelKind(t) {
598
609
  return this.get(t)?.channelKind;
599
610
  }
600
- /** Transcript-achtig artefact: meegeleverde inhoud die leesbare tekst draagt. */
611
+ /** Transcript-like artifact: supplied content carrying readable text. */
601
612
  isTranscript(t) {
602
613
  const n = this.get(t);
603
614
  return n?.shape === "artifact" && n.carriesText;
604
615
  }
605
- /** De vertaler die bij deze registry hoort, voor het oplossen van blokteksten. */
616
+ /** The translator belonging to this registry, for resolving block texts. */
606
617
  get translator() {
607
618
  return this.translate;
608
619
  }
609
620
  }
610
- const Gn = new $e(), G = 140;
611
- function Re(e) {
612
- const t = e.trim();
613
- return t.length <= G ? t : t.slice(0, G - 1).trimEnd() + "…";
614
- }
615
- function Bn(e, t) {
616
- const n = xe(t?.text, e), r = t ? O(t.text, e, (i) => i) : null;
617
- return {
618
- activityId: e.id,
619
- type: e.type,
620
- snippet: Re(r ?? ve(e)),
621
- authorName: e.author?.name ?? "",
622
- direction: e.direction,
623
- createdAt: e.createdAt ?? Date.now(),
624
- ...n ? { snippetKey: n.key, snippetParams: n.params } : {}
625
- };
626
- }
627
- function Fn(e, t, n = []) {
621
+ const Gn = new Ne();
622
+ function Bn(e, t, n = []) {
628
623
  const r = e.createdAt;
629
624
  if (!r) return [];
630
625
  const i = new Set(n);
631
626
  return e.author.type === "user" && e.author.id && i.add(e.author.id), Object.entries(t).filter(([a, o]) => o >= r && !i.has(a)).map(([a]) => a);
632
627
  }
633
- function Vn(e) {
628
+ function Fn(e) {
634
629
  return e.createdAt ?? 0;
635
630
  }
636
- const Hn = [
631
+ function Vn(e) {
632
+ return e.type === "EMAIL_RECEIVED" || e.type === "EMAIL_SENT";
633
+ }
634
+ function Hn(e) {
635
+ return e.type === "CHAT_MESSAGE_SENT" || e.type === "CHAT_MESSAGE_RECEIVED";
636
+ }
637
+ const oe = [
638
+ {
639
+ id: "openai",
640
+ attachmentKinds: ["image", "pdf"],
641
+ label: "OpenAI",
642
+ capabilities: ["chat", "transcription", "embedding"],
643
+ defaultModel: "gpt-5-mini",
644
+ baseUrl: "https://api.openai.com/v1"
645
+ },
646
+ {
647
+ id: "gemini",
648
+ attachmentKinds: ["image", "pdf"],
649
+ label: "Google Gemini",
650
+ capabilities: ["chat", "transcription", "embedding"],
651
+ defaultModel: "gemini-3.5-flash",
652
+ baseUrl: "https://generativelanguage.googleapis.com/v1beta"
653
+ },
654
+ {
655
+ id: "anthropic",
656
+ attachmentKinds: ["image", "pdf"],
657
+ label: "Anthropic",
658
+ capabilities: ["chat"],
659
+ defaultModel: "claude-haiku-4-5",
660
+ baseUrl: "https://api.anthropic.com/v1"
661
+ },
662
+ {
663
+ id: "elevenlabs",
664
+ label: "ElevenLabs",
665
+ capabilities: ["transcription"],
666
+ baseUrl: "https://api.elevenlabs.io/v1"
667
+ },
668
+ // Chat Completions vendors. Everything below runs on one adapter
669
+ // (`OpenAiCompatibleProvider`); adding one is a row here plus a line in `providers/registry`.
670
+ //
671
+ // `defaultModel` is deliberately an alias where the vendor offers one (`mistral-large-latest`,
672
+ // `openrouter/auto`): individual model ids expire, aliases do not. Where that is impossible, the
673
+ // newest flagship stands.
674
+ {
675
+ id: "moonshot",
676
+ label: "Moonshot (Kimi)",
677
+ capabilities: ["chat"],
678
+ defaultModel: "kimi-k3",
679
+ baseUrl: "https://api.moonshot.ai/v1"
680
+ },
681
+ {
682
+ id: "deepseek",
683
+ label: "DeepSeek",
684
+ capabilities: ["chat"],
685
+ defaultModel: "deepseek-v4-flash",
686
+ baseUrl: "https://api.deepseek.com/v1"
687
+ },
688
+ {
689
+ id: "groq",
690
+ label: "Groq",
691
+ capabilities: ["chat"],
692
+ defaultModel: "openai/gpt-oss-120b",
693
+ baseUrl: "https://api.groq.com/openai/v1"
694
+ },
695
+ {
696
+ id: "mistral",
697
+ label: "Mistral",
698
+ capabilities: ["chat"],
699
+ defaultModel: "mistral-large-latest",
700
+ baseUrl: "https://api.mistral.ai/v1"
701
+ },
702
+ {
703
+ id: "openrouter",
704
+ label: "OpenRouter",
705
+ capabilities: ["chat"],
706
+ // The Auto Router picks a model per prompt itself, so this does not expire along with the
707
+ // weekly changing slugs in the catalog.
708
+ defaultModel: "openrouter/auto",
709
+ baseUrl: "https://openrouter.ai/api/v1"
710
+ },
711
+ // Self-hosted: no fixed host, the user fills one in on the account. They all speak Chat
712
+ // Completions, so the same adapter.
713
+ {
714
+ id: "ollama",
715
+ label: "Ollama (self-hosted)",
716
+ capabilities: ["chat"],
717
+ defaultModel: "llama3.3"
718
+ },
719
+ {
720
+ id: "openai-compatible",
721
+ label: "OpenAI-compatible (eigen endpoint)",
722
+ capabilities: ["chat"],
723
+ // vLLM, LM Studio, a custom gateway — model and host come from the user.
724
+ defaultModel: "default"
725
+ }
726
+ ];
727
+ function S(e) {
728
+ return oe.find((t) => t.id === e);
729
+ }
730
+ function Wn(e) {
731
+ return S(e)?.label ?? e;
732
+ }
733
+ function zn(e, t = "gpt-5-mini") {
734
+ return S(e)?.defaultModel ?? t;
735
+ }
736
+ function Xn(e) {
737
+ return oe.filter((t) => t.capabilities.includes(e));
738
+ }
739
+ function Yn(e) {
740
+ const t = S(e);
741
+ return !!t && !t.baseUrl;
742
+ }
743
+ function qn(e, t) {
744
+ return t === "text" ? !0 : S(e)?.attachmentKinds?.includes(t) === !0;
745
+ }
746
+ function Jn(e, t) {
747
+ if (!e.enabled) return "ok";
748
+ const n = K(e.hardLimitNanos), r = K(e.softLimitNanos);
749
+ return n !== void 0 && t >= n ? "hard" : r !== void 0 && t >= r ? "soft" : "ok";
750
+ }
751
+ function K(e) {
752
+ return typeof e == "number" ? e : void 0;
753
+ }
754
+ function xe(e, t = "month") {
755
+ const n = new Date(e);
756
+ return Date.UTC(n.getUTCFullYear(), n.getUTCMonth(), 1);
757
+ }
758
+ function Zn(e, t = "month") {
759
+ const n = new Date(xe(e, t));
760
+ return `${n.getUTCFullYear()}-${String(n.getUTCMonth() + 1).padStart(2, "0")}`;
761
+ }
762
+ function Qn(e) {
763
+ return e?.listeningEnabled !== !1;
764
+ }
765
+ function er(e) {
766
+ const t = [];
767
+ for (const n of Object.keys(e))
768
+ for (const r of Object.keys(e[n]))
769
+ t.push({ lang: n, key: r, value: e[n][r] });
770
+ return t;
771
+ }
772
+ const tr = [
637
773
  { id: "agent", label: "Agent", labelSource: "user" },
638
774
  { id: "team", label: "Team", labelSource: "team" },
639
775
  { id: "inbox", label: "Inbox", labelSource: "inbox" },
@@ -643,54 +779,47 @@ const Hn = [
643
779
  { id: "handledBy", label: "Afhandelaar", labelSource: "raw" },
644
780
  { id: "time", label: "Tijd", labelSource: "raw" }
645
781
  ];
646
- function Wn(e) {
647
- const t = [];
648
- for (const n of Object.keys(e))
649
- for (const r of Object.keys(e[n]))
650
- t.push({ lang: n, key: r, value: e[n][r] });
651
- return t;
652
- }
653
782
  function w(e) {
654
783
  return e < 10 ? `0${e}` : `${e}`;
655
784
  }
656
- function Le(e, t) {
785
+ function Oe(e, t) {
657
786
  const n = new Date(e), r = `${n.getUTCFullYear()}-${w(n.getUTCMonth() + 1)}-${w(n.getUTCDate())}`;
658
787
  return t === "day" ? r : `${r}T${w(n.getUTCHours())}`;
659
788
  }
660
- function De(e, t) {
789
+ function $e(e, t) {
661
790
  const n = new Date(e);
662
791
  return n.setUTCMinutes(0, 0, 0), t === "day" && n.setUTCHours(0), n.getTime();
663
792
  }
664
- const Pe = 36e5, Ke = 864e5;
665
- function zn(e, t, n) {
666
- const r = n === "hour" ? Pe : Ke, i = [];
667
- for (let a = De(e, n); a <= t; a += r)
668
- i.push(Le(a, n));
793
+ const Re = 36e5, Le = 864e5;
794
+ function nr(e, t, n) {
795
+ const r = n === "hour" ? Re : Le, i = [];
796
+ for (let a = $e(e, n); a <= t; a += r)
797
+ i.push(Oe(a, n));
669
798
  return i;
670
799
  }
671
- const Ue = [
800
+ const De = [
672
801
  { id: "resource", label: "Resource", labelSource: "raw" },
673
802
  { id: "origin", label: "Herkomst", labelSource: "raw" }
674
- ], je = Ue.map((e) => e.id);
675
- function Ge(e, t) {
803
+ ], Pe = De.map((e) => e.id);
804
+ function Ke(e, t) {
676
805
  return `${e}.usage.${t}`;
677
806
  }
678
- function Xn(e, t) {
807
+ function rr(e, t) {
679
808
  return t.map((n) => ({
680
- id: Ge(e, n.unit),
809
+ id: Ke(e, n.unit),
681
810
  label: n.label,
682
811
  category: "Verbruik",
683
812
  valueType: n.valueType ?? "count",
684
813
  aggregation: "sum",
685
814
  supportedDimensions: [
686
815
  "provider",
687
- ...je,
816
+ ...Pe,
688
817
  ...n.extraDimensions ?? [],
689
818
  "time"
690
819
  ]
691
820
  }));
692
821
  }
693
- const ue = /* @__PURE__ */ new Set(["info", "success", "warning", "destructive"]), B = 200, F = 100, V = 200, H = 12, W = 4, de = 4e3, N = 500, Yn = 256 * 1024, Be = /* @__PURE__ */ new Set([
822
+ const se = /* @__PURE__ */ new Set(["info", "success", "warning", "destructive"]), U = 200, j = 100, G = 200, B = 12, F = 4, ce = 4e3, M = 500, ir = 256 * 1024, Ue = /* @__PURE__ */ new Set([
694
823
  "heading",
695
824
  "paragraph",
696
825
  "list",
@@ -700,15 +829,15 @@ const ue = /* @__PURE__ */ new Set(["info", "success", "warning", "destructive"]
700
829
  "table",
701
830
  "kpi",
702
831
  "callout"
703
- ]), Fe = ["http:", "https:", "mailto:", "tel:"], Ve = /^[a-z][a-z0-9+.-]*:/i;
704
- function pe(e) {
832
+ ]), je = ["http:", "https:", "mailto:", "tel:"], Ge = /^[a-z][a-z0-9+.-]*:/i;
833
+ function le(e) {
705
834
  const t = e.trim().replace(/^<|>$/g, "");
706
835
  if (!t) return !1;
707
- const n = Ve.exec(t)?.[0];
708
- return n ? Fe.includes(n.toLowerCase()) : !t.startsWith("//");
836
+ const n = Ge.exec(t)?.[0];
837
+ return n ? je.includes(n.toLowerCase()) : !t.startsWith("//");
709
838
  }
710
- const He = /^[ \t]{0,3}\[([^\]]+)\]:[ \t]*(\S+).*$/gm;
711
- function We(e) {
839
+ const Be = /^[ \t]{0,3}\[([^\]]+)\]:[ \t]*(\S+).*$/gm;
840
+ function Fe(e) {
712
841
  let t = "", n = 0;
713
842
  for (; n < e.length; ) {
714
843
  const r = e[n] === "!" && e[n + 1] === "[";
@@ -716,22 +845,22 @@ function We(e) {
716
845
  t += e[n], n += 1;
717
846
  continue;
718
847
  }
719
- const i = n + (r ? 2 : 1), a = z(e, i, "[", "]");
848
+ const i = n + (r ? 2 : 1), a = V(e, i, "[", "]");
720
849
  if (a < 0 || e[a + 1] !== "(") {
721
850
  t += e[n], n += 1;
722
851
  continue;
723
852
  }
724
- const o = z(e, a + 2, "(", ")");
853
+ const o = V(e, a + 2, "(", ")");
725
854
  if (o < 0) {
726
855
  t += e[n], n += 1;
727
856
  continue;
728
857
  }
729
- const s = e.slice(i, a), l = e.slice(a + 2, o).trim().split(/\s+/)[0] ?? "";
730
- t += r || !pe(l) ? s : e.slice(n, o + 1), n = o + 1;
858
+ const s = e.slice(i, a), c = e.slice(a + 2, o).trim().split(/\s+/)[0] ?? "";
859
+ t += r || !le(c) ? s : e.slice(n, o + 1), n = o + 1;
731
860
  }
732
861
  return t;
733
862
  }
734
- function z(e, t, n, r) {
863
+ function V(e, t, n, r) {
735
864
  let i = 1;
736
865
  for (let a = t; a < e.length; a += 1) {
737
866
  if (e[a] === "\\") {
@@ -744,33 +873,33 @@ function z(e, t, n, r) {
744
873
  }
745
874
  return -1;
746
875
  }
747
- function ze(e) {
748
- return We(e).replace(
749
- He,
750
- (t, n, r) => pe(r) ? t : ""
876
+ function Ve(e) {
877
+ return Fe(e).replace(
878
+ Be,
879
+ (t, n, r) => le(r) ? t : ""
751
880
  );
752
881
  }
753
- function u(e, t = de) {
754
- return typeof e == "string" ? ze(e).slice(0, t) : "";
882
+ function u(e, t = ce) {
883
+ return typeof e == "string" ? Ve(e).slice(0, t) : "";
755
884
  }
756
- function Xe(e, t = de) {
885
+ function He(e, t = ce) {
757
886
  return typeof e == "string" ? e.slice(0, t) : "";
758
887
  }
759
- function Ye(e, t = "info") {
760
- return typeof e == "string" && ue.has(e) ? e : t;
888
+ function We(e, t = "info") {
889
+ return typeof e == "string" && se.has(e) ? e : t;
761
890
  }
762
- function qn(e, t = () => {
891
+ function ar(e, t = () => {
763
892
  }) {
764
893
  if (!Array.isArray(e)) return [];
765
894
  const n = [];
766
895
  for (const r of e) {
767
- if (n.length >= B) {
768
- t("more than " + B + " blocks; the rest was dropped");
896
+ if (n.length >= U) {
897
+ t("more than " + U + " blocks; the rest was dropped");
769
898
  break;
770
899
  }
771
900
  if (!r || typeof r != "object") continue;
772
901
  const i = r;
773
- if (!Be.has(i.type)) {
902
+ if (!Ue.has(i.type)) {
774
903
  t("unknown block type " + String(i.type));
775
904
  continue;
776
905
  }
@@ -805,7 +934,7 @@ function qn(e, t = () => {
805
934
  break;
806
935
  }
807
936
  case "code": {
808
- const o = Xe(i.text);
937
+ const o = He(i.text);
809
938
  if (!o) {
810
939
  t("a code block without text");
811
940
  continue;
@@ -820,49 +949,47 @@ function qn(e, t = () => {
820
949
  case "list": {
821
950
  const o = Array.isArray(i.items) ? i.items : [], s = [];
822
951
  for (const p of o) {
823
- if (s.length >= F) {
824
- t("more than " + F + " list items");
952
+ if (s.length >= j) {
953
+ t("more than " + j + " list items");
825
954
  break;
826
955
  }
827
956
  const f = u(p?.text);
828
957
  if (!f) continue;
829
- const c = u(p?.lead, 200);
830
- s.push(c ? { lead: c, text: f } : { text: f });
958
+ const l = u(p?.lead, 200);
959
+ s.push(l ? { lead: l, text: f } : { text: f });
831
960
  }
832
961
  if (s.length === 0) {
833
962
  t("a list without usable items");
834
963
  continue;
835
964
  }
836
- const l = i.style === "numbered" ? "numbered" : "bulleted";
837
- n.push({ ...a, type: "list", style: l, items: s });
965
+ const c = i.style === "numbered" ? "numbered" : "bulleted";
966
+ n.push({ ...a, type: "list", style: c, items: s });
838
967
  break;
839
968
  }
840
969
  case "table": {
841
970
  const o = Array.isArray(i.columns) ? i.columns : [], s = [];
842
- for (const c of o) {
843
- if (s.length >= H) {
844
- t("more than " + H + " table columns");
971
+ for (const l of o) {
972
+ if (s.length >= B) {
973
+ t("more than " + B + " table columns");
845
974
  break;
846
975
  }
847
- const y = u(c?.label, N), _ = c?.align === "right" ? "right" : void 0;
976
+ const y = u(l?.label, M), _ = l?.align === "right" ? "right" : void 0;
848
977
  s.push(_ ? { label: y, align: _ } : { label: y });
849
978
  }
850
979
  if (s.length === 0) {
851
980
  t("a table without columns");
852
981
  continue;
853
982
  }
854
- const l = Array.isArray(i.rows) ? i.rows : [], p = [];
855
- for (const c of l) {
856
- if (p.length >= V) {
857
- t("more than " + V + " table rows");
983
+ const c = Array.isArray(i.rows) ? i.rows : [], p = [];
984
+ for (const l of c) {
985
+ if (p.length >= G) {
986
+ t("more than " + G + " table rows");
858
987
  break;
859
988
  }
860
- const y = Array.isArray(c) ? c : [];
861
- p.push(
862
- s.map((_, ke) => u(y[ke], N))
863
- );
989
+ const y = Array.isArray(l) ? l : [];
990
+ p.push(s.map((_, Te) => u(y[Te], M)));
864
991
  }
865
- const f = u(i.caption, N);
992
+ const f = u(i.caption, M);
866
993
  n.push({
867
994
  ...a,
868
995
  type: "table",
@@ -874,16 +1001,16 @@ function qn(e, t = () => {
874
1001
  }
875
1002
  case "kpi": {
876
1003
  const o = Array.isArray(i.items) ? i.items : [], s = [];
877
- for (const l of o) {
878
- if (s.length >= W) {
879
- t("more than " + W + " kpi items");
1004
+ for (const c of o) {
1005
+ if (s.length >= F) {
1006
+ t("more than " + F + " kpi items");
880
1007
  break;
881
1008
  }
882
- const p = u(l?.value, 40), f = u(l?.label, 80);
1009
+ const p = u(c?.value, 40), f = u(c?.label, 80);
883
1010
  if (!p || !f) continue;
884
- const c = l?.tone;
1011
+ const l = c?.tone;
885
1012
  s.push(
886
- typeof c == "string" && ue.has(c) ? { value: p, label: f, tone: c } : { value: p, label: f }
1013
+ typeof l == "string" && se.has(l) ? { value: p, label: f, tone: l } : { value: p, label: f }
887
1014
  );
888
1015
  }
889
1016
  if (s.length === 0) {
@@ -903,7 +1030,7 @@ function qn(e, t = () => {
903
1030
  n.push({
904
1031
  ...a,
905
1032
  type: "callout",
906
- tone: Ye(i.tone),
1033
+ tone: We(i.tone),
907
1034
  ...s ? { title: s } : {},
908
1035
  text: o
909
1036
  });
@@ -913,28 +1040,28 @@ function qn(e, t = () => {
913
1040
  }
914
1041
  return n;
915
1042
  }
916
- function Jn(e) {
1043
+ function or(e) {
917
1044
  return JSON.stringify(e).length;
918
1045
  }
919
- function Zn(e) {
1046
+ function sr(e) {
920
1047
  return {
921
1048
  blocks: e.length,
922
1049
  types: e.map((t) => t.type),
923
1050
  headings: e.flatMap((t) => t.type === "heading" ? [t.text] : [])
924
1051
  };
925
1052
  }
926
- function X(e) {
1053
+ function H(e) {
927
1054
  return e.replace(/\|/g, "\\|").replace(/\r?\n/g, " ").trim();
928
1055
  }
929
- function Y(e, t, n) {
1056
+ function W(e, t, n) {
930
1057
  const r = e.map((i, a) => n?.[a] === "right" ? "---:" : "---");
931
1058
  return [
932
- `| ${e.map(X).join(" | ")} |`,
1059
+ `| ${e.map(H).join(" | ")} |`,
933
1060
  `| ${r.join(" | ")} |`,
934
- ...t.map((i) => `| ${i.map(X).join(" | ")} |`)
1061
+ ...t.map((i) => `| ${i.map(H).join(" | ")} |`)
935
1062
  ];
936
1063
  }
937
- function qe(e) {
1064
+ function ze(e) {
938
1065
  switch (e.type) {
939
1066
  case "heading":
940
1067
  return [`${"#".repeat(e.level)} ${e.text}`];
@@ -952,7 +1079,7 @@ function qe(e) {
952
1079
  return t.lead ? `${r} **${t.lead}** ${t.text}` : `${r} ${t.text}`;
953
1080
  });
954
1081
  case "table": {
955
- const t = Y(
1082
+ const t = W(
956
1083
  e.columns.map((n) => n.label),
957
1084
  e.rows,
958
1085
  e.columns.map((n) => n.align ?? "left")
@@ -960,7 +1087,7 @@ function qe(e) {
960
1087
  return e.caption ? [...t, "", `*${e.caption}*`] : t;
961
1088
  }
962
1089
  case "kpi":
963
- return Y(
1090
+ return W(
964
1091
  e.items.map((t) => t.value),
965
1092
  [e.items.map((t) => t.label)]
966
1093
  );
@@ -968,11 +1095,11 @@ function qe(e) {
968
1095
  return (e.title ? `**${e.title}** ${e.text}` : e.text).split(/\r?\n/).map((n) => `> ${n}`);
969
1096
  }
970
1097
  }
971
- function Qn(e, t) {
1098
+ function cr(e, t) {
972
1099
  const n = [], r = e.some((i) => i.type === "heading" && i.level === 1);
973
1100
  t && !r && n.push(`# ${t}`);
974
1101
  for (const i of e) {
975
- const a = qe(i);
1102
+ const a = ze(i);
976
1103
  a.length > 0 && n.push(a.join(`
977
1104
  `));
978
1105
  }
@@ -981,41 +1108,41 @@ function Qn(e, t) {
981
1108
  `)}
982
1109
  `;
983
1110
  }
984
- const fe = (e) => `user:${e}`, me = (e) => `team:${e}`;
985
- function er(e) {
1111
+ const ue = (e) => `user:${e}`, de = (e) => `team:${e}`;
1112
+ function lr(e) {
986
1113
  const t = /* @__PURE__ */ new Set();
987
1114
  for (const n of e ?? [])
988
- n?.id && (n.kind === "user" && t.add(fe(n.id)), n.kind === "team" && t.add(me(n.id)));
1115
+ n?.id && (n.kind === "user" && t.add(ue(n.id)), n.kind === "team" && t.add(de(n.id)));
989
1116
  return [...t].sort();
990
1117
  }
991
- function tr(e, t) {
992
- return [fe(e), ...t.map(me)];
1118
+ function ur(e, t) {
1119
+ return [ue(e), ...t.map(de)];
993
1120
  }
994
- function nr(e) {
1121
+ function dr(e) {
995
1122
  const t = /* @__PURE__ */ new Set();
996
1123
  for (const n of e ?? [])
997
1124
  n?.kind && t.add(n.kind);
998
1125
  return [...t];
999
1126
  }
1000
- const Je = ["done", "escalated"];
1001
- function rr(e) {
1002
- return Je.includes(e);
1127
+ const Xe = ["done", "escalated"];
1128
+ function pr(e) {
1129
+ return Xe.includes(e);
1003
1130
  }
1004
- const Ze = "assignment";
1005
- function ir(e) {
1006
- return `${Ze}:${e}`;
1131
+ const Ye = "assignment";
1132
+ function fr(e) {
1133
+ return `${Ye}:${e}`;
1007
1134
  }
1008
- function ar(e, t, n) {
1135
+ function mr(e, t, n) {
1009
1136
  if (e.direction === "inbound") return !0;
1010
1137
  if (e.author?.type === "user" && e.author.id === t) return !1;
1011
1138
  const r = e.payload?.mentions;
1012
1139
  return Array.isArray(r) && r.includes(t) ? !0 : n === "reply";
1013
1140
  }
1014
- function or(e) {
1141
+ function gr(e) {
1015
1142
  return e.subjectKind && e.subjectId ? { type: e.subjectKind, id: e.subjectId } : void 0;
1016
1143
  }
1017
- const Qe = 12;
1018
- function sr(e, t, n = Qe) {
1144
+ const qe = 12;
1145
+ function hr(e, t, n = qe) {
1019
1146
  const r = t + 1;
1020
1147
  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 ? {
1021
1148
  status: "escalated",
@@ -1029,92 +1156,165 @@ function sr(e, t, n = Qe) {
1029
1156
  reason: "de agent rondde zijn beurt af zonder te zeggen wat er moet gebeuren (wachten, afronden of overdragen)"
1030
1157
  };
1031
1158
  }
1032
- const q = ["lookup", "condition", "parallel", "for-each"];
1033
- function J(e) {
1034
- for (const t of e) {
1035
- if (!q.includes(t.type))
1036
- return `staptype "${t.type}" mag niet meelezen (alleen ${q.join(", ")})`;
1037
- if (t.type === "parallel")
1038
- for (const n of t.branches ?? []) {
1039
- const r = J(n);
1040
- if (r) return r;
1041
- }
1042
- if (t.type === "for-each") {
1043
- const n = J(t.body ?? []);
1044
- if (n) return n;
1045
- }
1046
- }
1047
- return null;
1159
+ const yr = /* @__PURE__ */ new Set(["mail", "message"]);
1160
+ function Je(e, t) {
1161
+ const n = e.settings?.signatures?.[t];
1162
+ return !n || !n.enabled || !n.body || n.body.trim() === "" ? null : n;
1048
1163
  }
1049
- function et(e, t) {
1050
- switch (e.kind) {
1051
- case "org":
1052
- return !0;
1053
- case "team":
1054
- return !!t.teamId && e.teamId === t.teamId;
1055
- case "personal":
1056
- return e.userId === t.userId;
1057
- }
1164
+ function Ar(e, t, n, r = "html") {
1165
+ if (!e) return n;
1166
+ const i = Je(e, t);
1167
+ return i ? `${n}${r === "text" ? `
1168
+
1169
+ ` : t === "mail" ? "<br><br>-- <br>" : "<br><br>"}${i.body}` : n;
1058
1170
  }
1059
- function lr(e, t) {
1060
- return e.filter((n) => n.enabled && et(n.ownerScope, t));
1171
+ function br(e) {
1172
+ return e.endpoints ?? [];
1061
1173
  }
1062
- function cr(e) {
1063
- return (e.startsWith("tool:") ? e.slice(5) : e).replace(/__/g, " · ").replace(/\./g, " · ").replace(/_/g, " ");
1174
+ const Er = (e) => !!e.assignedUserId || !!e.assignedInboxId, Sr = (e) => e.status === "closed", _r = (e) => ({
1175
+ urgent: 10,
1176
+ high: 5,
1177
+ normal: 2,
1178
+ low: 1
1179
+ })[e.priority] || 0, Tr = (e, t = 30) => e.title?.length <= t ? e.title : `${e.title.substring(0, t)}...`;
1180
+ function Ir(e, t) {
1181
+ return e.lastActivityAt ? !(e.seenBy ?? []).includes(t) : !1;
1064
1182
  }
1065
- const ur = [
1066
- { name: "text", type: "string" },
1067
- { name: "subject", type: "string" },
1068
- { name: "from", type: "string" },
1069
- { name: "type", type: "string" },
1070
- { name: "direction", type: "string" },
1071
- { name: "channelId", type: "string" },
1072
- { name: "interactionId", type: "string" },
1073
- { name: "activityId", type: "string" },
1074
- { name: "authorType", type: "string" },
1075
- { name: "authorName", type: "string" },
1076
- { name: "textRaw", type: "string" },
1077
- // Alleen gevuld bij INTERACTION_STATUS_CHANGED; een filter als
1078
- // `trigger.toStatus == "closed"` is de trigger voor "onthoud dit bij afsluiten".
1079
- { name: "fromStatus", type: "string" },
1080
- { name: "toStatus", type: "string" },
1081
- // Met wie is dit gesprek. Dit stond hier eerder expliciet NIET, omdat het toen een gok via
1082
- // `remoteParty` zou zijn geweest; nu legt de identiteitslaag de resolutie vast als
1083
- // `contact:<id>`/`company:<id>` in `Interaction.partyKeys`, dus dit is een vastgelegd feit.
1084
- // Leeg zolang de identiteit niet is opgelost (een onbekend nummer, een eerste bericht van
1085
- // een nieuw adres) — een stap die hierop leunt hoort dus een `condition` te hebben.
1086
- { name: "contactId", type: "string" },
1087
- { name: "companyId", type: "string" },
1088
- // Aan wie dit werk is toegewezen, bij een activity die een toewijzing aankondigt. Waar dat
1089
- // op de activity staat is per bron **gedeclareerd** (`AssignmentTargetKind.assigneePath`),
1090
- // dus `buildTriggerVars` kan hem niet zelf vullen: de job doet dat met de catalogus in de
1091
- // hand, vóór het trigger-filter draait — net als contactId/companyId hierboven.
1092
- { name: "assigneeUserId", type: "string" }
1093
- ], dr = {
1094
- topics: [
1095
- { name: "topicId", type: "string" },
1096
- { name: "topic", type: "string" },
1097
- { name: "confidence", type: "number" },
1098
- { name: "reasoning", type: "string" }
1099
- ],
1100
- question: [
1101
- { name: "answer", type: "boolean" },
1102
- { name: "reasoning", type: "string" }
1103
- ],
1104
- // Leeg met opzet: de velden komen uit `ClassifyStep.fields` en zijn dus per stap anders.
1105
- extract: []
1106
- };
1107
- function tt(e) {
1108
- switch (e.kind) {
1109
- case "user":
1110
- return `user:${e.userId}`;
1111
- case "team":
1112
- return `team:${e.teamId}`;
1113
- case "org":
1114
- return "org";
1183
+ function wr(e, t) {
1184
+ const n = e.labels ?? [];
1185
+ return n.find((r) => r.locale === t)?.label ?? n[0]?.label ?? e.url;
1186
+ }
1187
+ function Mr(e, t, n) {
1188
+ const r = e.translations ?? [];
1189
+ return r.find((i) => i.locale === t) ?? (n ? r.find((i) => i.locale === n) : void 0) ?? { locale: t };
1190
+ }
1191
+ const z = [
1192
+ { code: "nl", label: "Nederlands", english: "Dutch" },
1193
+ { code: "en", label: "English", english: "English" },
1194
+ { code: "de", label: "Deutsch", english: "German" },
1195
+ { code: "fr", label: "Français", english: "French" },
1196
+ { code: "es", label: "Español", english: "Spanish" },
1197
+ { code: "it", label: "Italiano", english: "Italian" },
1198
+ { code: "pt", label: "Português", english: "Portuguese" },
1199
+ { code: "pl", label: "Polski", english: "Polish" },
1200
+ { code: "sv", label: "Svenska", english: "Swedish" },
1201
+ { code: "da", label: "Dansk", english: "Danish" },
1202
+ { code: "nb", label: "Norsk bokmål", english: "Norwegian Bokmål" },
1203
+ { code: "fi", label: "Suomi", english: "Finnish" },
1204
+ { code: "tr", label: "Türkçe", english: "Turkish" }
1205
+ ];
1206
+ function pe(e) {
1207
+ const t = (e ?? "").toLowerCase();
1208
+ return z.find((n) => n.code === t) ?? z.find((n) => n.code === t.split("-")[0]);
1209
+ }
1210
+ function kr(e) {
1211
+ return pe(e)?.label ?? e;
1212
+ }
1213
+ function Cr(e) {
1214
+ const t = pe(e);
1215
+ return t ? t.english === t.label ? `${t.english} (${t.code})` : `${t.english} — ${t.label} (${t.code})` : e;
1216
+ }
1217
+ const fe = 3;
1218
+ function Ze(e, t) {
1219
+ const n = /* @__PURE__ */ new Set();
1220
+ let r = 1, i = t.get(e)?.parentId;
1221
+ for (; i; ) {
1222
+ if (n.has(i) || (n.add(i), r++, r > fe + 1)) return 1 / 0;
1223
+ i = t.get(i)?.parentId;
1224
+ }
1225
+ return r;
1226
+ }
1227
+ function vr(e, t, n) {
1228
+ if (!e) return !0;
1229
+ if (e === t) return !1;
1230
+ const r = new Map(n.map((o) => [o.id, o]));
1231
+ if (!r.has(e) || t && Qe(e, t, r)) return !1;
1232
+ const i = Ze(e, r), a = t ? me(t, n) : 1;
1233
+ return i + a <= fe;
1234
+ }
1235
+ function Qe(e, t, n) {
1236
+ const r = /* @__PURE__ */ new Set();
1237
+ let i = n.get(e)?.parentId;
1238
+ for (; i; ) {
1239
+ if (i === t) return !0;
1240
+ if (r.has(i)) return !1;
1241
+ r.add(i), i = n.get(i)?.parentId;
1115
1242
  }
1243
+ return !1;
1116
1244
  }
1117
- function pr(e) {
1245
+ function me(e, t, n = /* @__PURE__ */ new Set()) {
1246
+ if (n.has(e)) return 1;
1247
+ n.add(e);
1248
+ const r = t.filter((i) => i.parentId === e);
1249
+ return r.length ? 1 + Math.max(...r.map((i) => me(i.id, t, n))) : 1;
1250
+ }
1251
+ const et = "en";
1252
+ function tt(e) {
1253
+ return e.defaultLocale || e.locale || et;
1254
+ }
1255
+ function Nr(e) {
1256
+ const t = /* @__PURE__ */ new Set(), n = [];
1257
+ for (const r of [tt(e), ...e.locales ?? []])
1258
+ !r || t.has(r) || (t.add(r), n.push(r));
1259
+ return n;
1260
+ }
1261
+ function xr(e, t, n) {
1262
+ const r = e.translations ?? [];
1263
+ return r.find((i) => i.locale === t)?.name ?? (n ? r.find((i) => i.locale === n)?.name : void 0) ?? e.name;
1264
+ }
1265
+ const X = ["lookup", "condition", "parallel", "for-each"];
1266
+ function Y(e) {
1267
+ for (const t of e) {
1268
+ if (!X.includes(t.type))
1269
+ return `staptype "${t.type}" mag niet meelezen (alleen ${X.join(", ")})`;
1270
+ if (t.type === "parallel")
1271
+ for (const n of t.branches ?? []) {
1272
+ const r = Y(n);
1273
+ if (r) return r;
1274
+ }
1275
+ if (t.type === "for-each") {
1276
+ const n = Y(t.body ?? []);
1277
+ if (n) return n;
1278
+ }
1279
+ }
1280
+ return null;
1281
+ }
1282
+ function nt(e, t) {
1283
+ switch (e.kind) {
1284
+ case "org":
1285
+ return !0;
1286
+ case "team":
1287
+ return !!t.teamId && e.teamId === t.teamId;
1288
+ case "personal":
1289
+ return e.userId === t.userId;
1290
+ }
1291
+ }
1292
+ function Or(e, t) {
1293
+ return e.filter((n) => n.enabled && nt(n.ownerScope, t));
1294
+ }
1295
+ function $r(e) {
1296
+ return e.credentialScope ? e.credentialScope : (e.authMode ?? "header") === "header" || e.oauth?.scope === "org" ? "shared" : "per-user";
1297
+ }
1298
+ function Rr(e) {
1299
+ return `mcp__${e}__`;
1300
+ }
1301
+ const Lr = 1e3, Dr = 2e3, Pr = 500, Kr = 12e3, Ur = 4e3, rt = ["contact", "company"];
1302
+ function jr(e) {
1303
+ if (!e) return !1;
1304
+ const t = e.slice(0, e.indexOf(":"));
1305
+ return rt.includes(t);
1306
+ }
1307
+ function it(e) {
1308
+ switch (e.kind) {
1309
+ case "user":
1310
+ return `user:${e.userId}`;
1311
+ case "team":
1312
+ return `team:${e.teamId}`;
1313
+ case "org":
1314
+ return "org";
1315
+ }
1316
+ }
1317
+ function Gr(e) {
1118
1318
  if (typeof e != "string") return;
1119
1319
  const t = e.trim();
1120
1320
  if (t === "org") return { kind: "org" };
@@ -1126,10 +1326,10 @@ function pr(e) {
1126
1326
  if (r === "team") return { kind: "team", teamId: i };
1127
1327
  }
1128
1328
  }
1129
- function nt(e) {
1130
- return tt(e);
1329
+ function at(e) {
1330
+ return it(e);
1131
1331
  }
1132
- function rt(e) {
1332
+ function ot(e) {
1133
1333
  switch (e.kind) {
1134
1334
  case "personal":
1135
1335
  return { kind: "user", userId: e.userId };
@@ -1139,13 +1339,14 @@ function rt(e) {
1139
1339
  return { kind: "org" };
1140
1340
  }
1141
1341
  }
1142
- function fr(e) {
1143
- return e.agentId ? { kind: "user", userId: e.agentId } : rt(e.ownerScope);
1342
+ const st = ot;
1343
+ function Br(e) {
1344
+ return e.agentId ? { kind: "user", userId: e.agentId } : st(e.ownerScope);
1144
1345
  }
1145
- function mr(e) {
1146
- return nt(e);
1346
+ function Fr(e) {
1347
+ return at(e);
1147
1348
  }
1148
- function gr(e, t) {
1349
+ function Vr(e, t) {
1149
1350
  if (!t) return;
1150
1351
  let n = e;
1151
1352
  for (const r of t.split(".")) {
@@ -1154,402 +1355,201 @@ function gr(e, t) {
1154
1355
  }
1155
1356
  return n;
1156
1357
  }
1157
- function hr(e, t) {
1358
+ function Hr(e, t) {
1158
1359
  return e.targets.find((n) => n.activityTypes.includes(t));
1159
1360
  }
1160
- function yr(e, t) {
1361
+ function Wr(e, t) {
1161
1362
  if (t)
1162
1363
  return e.targets.find((n) => n.id === t);
1163
1364
  }
1164
- function it(e) {
1365
+ function ct(e) {
1165
1366
  return e?.kind === "assignment";
1166
1367
  }
1167
- function Ar(e) {
1368
+ function zr(e) {
1168
1369
  const { trigger: t, agentId: n, target: r, activityType: i, assigneeUserId: a, authorUserId: o } = e;
1169
- return it(t) ? n ? r ? r.activityTypes.includes(i) ? 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 ${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";
1370
+ return ct(t) ? n ? r ? r.activityTypes.includes(i) ? 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 ${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";
1170
1371
  }
1171
- function at(e) {
1372
+ function Xr(e) {
1373
+ return (e.startsWith("tool:") ? e.slice(5) : e).replace(/__/g, " · ").replace(/\./g, " · ").replace(/_/g, " ");
1374
+ }
1375
+ const Yr = [
1376
+ { name: "text", type: "string" },
1377
+ { name: "subject", type: "string" },
1378
+ { name: "from", type: "string" },
1379
+ { name: "type", type: "string" },
1380
+ { name: "direction", type: "string" },
1381
+ { name: "channelId", type: "string" },
1382
+ { name: "interactionId", type: "string" },
1383
+ { name: "activityId", type: "string" },
1384
+ { name: "authorType", type: "string" },
1385
+ { name: "authorName", type: "string" },
1386
+ { name: "textRaw", type: "string" },
1387
+ // Only filled on INTERACTION_STATUS_CHANGED; a filter like `trigger.toStatus == "closed"` is
1388
+ // the trigger for "remember this when closing".
1389
+ { name: "fromStatus", type: "string" },
1390
+ { name: "toStatus", type: "string" },
1391
+ // Who this conversation is with. The identity layer records the resolution as
1392
+ // `contact:<id>`/`company:<id>` in `Interaction.partyKeys`, so this is a recorded fact and not a
1393
+ // guess via `remoteParty`. Empty while the identity is unresolved (an unknown number, a first
1394
+ // message from a new address) — so a step leaning on this should carry a `condition`.
1395
+ { name: "contactId", type: "string" },
1396
+ { name: "companyId", type: "string" },
1397
+ // Who this work is assigned to, on an activity announcing an assignment. Where that sits on
1398
+ // the activity is **declared** per source (`AssignmentTargetKind.assigneePath`), so
1399
+ // `buildTriggerVars` cannot fill it itself: the job does that with the catalog in hand, before
1400
+ // the trigger filter runs — like contactId/companyId above.
1401
+ { name: "assigneeUserId", type: "string" }
1402
+ ], qr = {
1403
+ topics: [
1404
+ { name: "topicId", type: "string" },
1405
+ { name: "topic", type: "string" },
1406
+ { name: "confidence", type: "number" },
1407
+ { name: "reasoning", type: "string" }
1408
+ ],
1409
+ question: [
1410
+ { name: "answer", type: "boolean" },
1411
+ { name: "reasoning", type: "string" }
1412
+ ],
1413
+ // Deliberately empty: the fields come from `ClassifyStep.fields` and so differ per step.
1414
+ extract: []
1415
+ };
1416
+ function lt(e) {
1172
1417
  return `${e.type}:${e.id}`;
1173
1418
  }
1174
- const ot = "interaction";
1175
- function st(e) {
1176
- return e?.type === ot ? e.id : void 0;
1419
+ const ut = "interaction";
1420
+ function dt(e) {
1421
+ return e?.type === ut ? e.id : void 0;
1177
1422
  }
1178
- const lt = 64, ct = 8e3;
1179
- function br(e) {
1423
+ const pt = 64, ft = 8e3;
1424
+ function Jr(e) {
1180
1425
  const t = typeof e == "number" ? e : Number(String(e ?? "").trim());
1181
1426
  if (!(!Number.isFinite(t) || t <= 0))
1182
- return Math.min(Math.max(Math.round(t), lt), ct);
1427
+ return Math.min(Math.max(Math.round(t), pt), ft);
1183
1428
  }
1184
- const Er = { kind: "workflow", steps: [] };
1185
- function Sr(e) {
1429
+ const Zr = { kind: "workflow", steps: [] };
1430
+ function Qr(e) {
1186
1431
  return e?.kind === "workflow" ? e.steps : [];
1187
1432
  }
1188
- function _r(e) {
1433
+ function ei(e) {
1189
1434
  return e?.kind === "procedure" ? e.procedure : void 0;
1190
1435
  }
1191
- const ut = ["done", "escalated", "failed", "stopped"];
1192
- function Tr(e) {
1193
- return ut.includes(e);
1436
+ const mt = ["done", "escalated", "failed", "stopped"];
1437
+ function ti(e) {
1438
+ return mt.includes(e);
1194
1439
  }
1195
- function dt(e) {
1440
+ function gt(e) {
1196
1441
  return e === "waiting";
1197
1442
  }
1198
- function Ir(e) {
1199
- return e === "running" || dt(e);
1443
+ function ni(e) {
1444
+ return e === "running" || gt(e);
1200
1445
  }
1201
1446
  function ge(e) {
1202
1447
  return e.subjectKind && e.subjectId ? { type: e.subjectKind, id: e.subjectId } : void 0;
1203
1448
  }
1204
- function Mr(e) {
1449
+ function ri(e) {
1205
1450
  const t = ge(e);
1206
- return t ? at(t) : void 0;
1207
- }
1208
- function Cr(e) {
1209
- return st(ge(e));
1451
+ return t ? lt(t) : void 0;
1210
1452
  }
1211
- function kr(e, t) {
1212
- const n = e.labels ?? [];
1213
- return n.find((r) => r.locale === t)?.label ?? n[0]?.label ?? e.url;
1214
- }
1215
- function wr(e, t, n) {
1216
- const r = e.translations ?? [];
1217
- return r.find((i) => i.locale === t) ?? (n ? r.find((i) => i.locale === n) : void 0) ?? { locale: t };
1453
+ function ii(e) {
1454
+ return dt(ge(e));
1218
1455
  }
1219
- const Z = [
1220
- { code: "nl", label: "Nederlands", english: "Dutch" },
1221
- { code: "en", label: "English", english: "English" },
1222
- { code: "de", label: "Deutsch", english: "German" },
1223
- { code: "fr", label: "Français", english: "French" },
1224
- { code: "es", label: "Español", english: "Spanish" },
1225
- { code: "it", label: "Italiano", english: "Italian" },
1226
- { code: "pt", label: "Português", english: "Portuguese" },
1227
- { code: "pl", label: "Polski", english: "Polish" },
1228
- { code: "sv", label: "Svenska", english: "Swedish" },
1229
- { code: "da", label: "Dansk", english: "Danish" },
1230
- { code: "nb", label: "Norsk bokmål", english: "Norwegian Bokmål" },
1231
- { code: "fi", label: "Suomi", english: "Finnish" },
1232
- { code: "tr", label: "Türkçe", english: "Turkish" }
1233
- ];
1234
- function he(e) {
1235
- const t = (e ?? "").toLowerCase();
1236
- return Z.find((n) => n.code === t) ?? Z.find((n) => n.code === t.split("-")[0]);
1456
+ function ai(e, t) {
1457
+ const n = e.accumulatedSeconds || 0;
1458
+ return e.runningSince ? n + Math.max(0, Math.floor((t - e.runningSince) / 1e3)) : n;
1237
1459
  }
1238
- function Nr(e) {
1239
- return he(e)?.label ?? e;
1460
+ function oi(e, t) {
1461
+ const n = Math.max(1, Math.ceil(Math.max(0, e) / 60));
1462
+ if (!t || t === "exact") return n * 60;
1463
+ const r = Number(t);
1464
+ return !Number.isFinite(r) || r <= 0 ? n * 60 : Math.ceil(n / r) * r * 60;
1240
1465
  }
1241
- function vr(e) {
1242
- const t = he(e);
1243
- return t ? t.english === t.label ? `${t.english} (${t.code})` : `${t.english} — ${t.label} (${t.code})` : e;
1466
+ function si(e) {
1467
+ const t = Math.max(0, Math.round(e / 60));
1468
+ return `${Math.floor(t / 60)}:${String(t % 60).padStart(2, "0")}`;
1244
1469
  }
1245
- const ye = 3;
1246
- function pt(e, t) {
1247
- const n = /* @__PURE__ */ new Set();
1248
- let r = 1, i = t.get(e)?.parentId;
1249
- for (; i; ) {
1250
- if (n.has(i) || (n.add(i), r++, r > ye + 1)) return 1 / 0;
1251
- i = t.get(i)?.parentId;
1252
- }
1253
- return r;
1470
+ function ci(e) {
1471
+ const t = Math.max(0, Math.floor(e)), n = (a) => String(a).padStart(2, "0"), r = Math.floor(t / 60) % 60, i = Math.floor(t / 3600);
1472
+ return i > 0 ? `${i}:${n(r)}:${n(t % 60)}` : `${n(r)}:${n(t % 60)}`;
1254
1473
  }
1255
- function xr(e, t, n) {
1256
- if (!e) return !0;
1257
- if (e === t) return !1;
1258
- const r = new Map(n.map((o) => [o.id, o]));
1259
- if (!r.has(e) || t && ft(e, t, r)) return !1;
1260
- const i = pt(e, r), a = t ? Ae(t, n) : 1;
1261
- return i + a <= ye;
1474
+ function ht(e) {
1475
+ return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").slice(0, 48).replace(/^-+|-+$/g, "");
1262
1476
  }
1263
- function ft(e, t, n) {
1264
- const r = /* @__PURE__ */ new Set();
1265
- let i = n.get(e)?.parentId;
1266
- for (; i; ) {
1267
- if (i === t) return !0;
1268
- if (r.has(i)) return !1;
1269
- r.add(i), i = n.get(i)?.parentId;
1477
+ function li(e, t) {
1478
+ const n = ht(e) || "werksoort", r = new Set(t);
1479
+ if (!r.has(n)) return n;
1480
+ for (let i = 2; i < 500; i++) {
1481
+ const a = `${n}-${i}`;
1482
+ if (!r.has(a)) return a;
1270
1483
  }
1271
- return !1;
1272
- }
1273
- function Ae(e, t, n = /* @__PURE__ */ new Set()) {
1274
- if (n.has(e)) return 1;
1275
- n.add(e);
1276
- const r = t.filter((i) => i.parentId === e);
1277
- return r.length ? 1 + Math.max(...r.map((i) => Ae(i.id, t, n))) : 1;
1484
+ return `${n}-${r.size + 1}`;
1278
1485
  }
1279
- const mt = "en";
1280
- function gt(e) {
1281
- return e.defaultLocale || e.locale || mt;
1486
+ function ui(e, t) {
1487
+ const n = e.ownerScope;
1488
+ return !n || n.kind === "org" ? !0 : t.includes(n.teamId);
1282
1489
  }
1283
- function Or(e) {
1284
- const t = /* @__PURE__ */ new Set(), n = [];
1285
- for (const r of [gt(e), ...e.locales ?? []])
1286
- !r || t.has(r) || (t.add(r), n.push(r));
1287
- return n;
1490
+ function di(e) {
1491
+ return e.filter((t) => !t.archived).sort(yt);
1288
1492
  }
1289
- function $r(e, t, n) {
1290
- const r = e.translations ?? [];
1291
- return r.find((i) => i.locale === t)?.name ?? (n ? r.find((i) => i.locale === n)?.name : void 0) ?? e.name;
1493
+ function yt(e, t) {
1494
+ const n = (e.order ?? 0) - (t.order ?? 0);
1495
+ return n !== 0 ? n : (e.label || "").localeCompare(t.label || "");
1292
1496
  }
1293
- const ht = 20, yt = 20, v = 300;
1497
+ const At = 20, bt = 20, k = 300;
1294
1498
  function g(e) {
1295
1499
  return e.toLowerCase().replace(/[^\p{L}\p{N}\s]/gu, " ").replace(/\s+/g, " ").trim();
1296
1500
  }
1297
- function At(e) {
1501
+ function Et(e) {
1298
1502
  const t = e.replace(/\s+/g, " ").trim();
1299
- if (t.length <= v) return t;
1300
- const n = t.slice(0, v), r = Math.max(n.lastIndexOf(". "), n.lastIndexOf("! "), n.lastIndexOf("? "));
1301
- return r > v * 0.6 ? n.slice(0, r + 1) : `${n.trimEnd()}…`;
1503
+ if (t.length <= k) return t;
1504
+ const n = t.slice(0, k), r = Math.max(n.lastIndexOf(". "), n.lastIndexOf("! "), n.lastIndexOf("? "));
1505
+ return r > k * 0.6 ? n.slice(0, r + 1) : `${n.trimEnd()}…`;
1302
1506
  }
1303
- function Rr(e, t) {
1304
- const n = At(t.text), r = g(n);
1507
+ function pi(e, t) {
1508
+ const n = Et(t.text), r = g(n);
1305
1509
  if (!r || (e.examples ?? []).some((o) => g(o) === r)) return null;
1306
1510
  const i = e.exampleCandidates ?? [], a = i.findIndex((o) => g(o.text) === r);
1307
1511
  if (a >= 0) {
1308
1512
  if (i[a].corrected || !t.corrected) return null;
1309
1513
  const o = [...i];
1310
- return o[a] = { ...o[a], corrected: !0, addedAt: t.addedAt }, Q(o);
1514
+ return o[a] = { ...o[a], corrected: !0, addedAt: t.addedAt }, q(o);
1311
1515
  }
1312
- return Q([{ ...t, text: n }, ...i]).slice(0, yt);
1516
+ return q([{ ...t, text: n }, ...i]).slice(0, bt);
1313
1517
  }
1314
- function Q(e) {
1315
- return [...e].sort((t, n) => Number(n.corrected) - Number(t.corrected) || n.addedAt - t.addedAt);
1518
+ function q(e) {
1519
+ return [...e].sort(
1520
+ (t, n) => Number(n.corrected) - Number(t.corrected) || n.addedAt - t.addedAt
1521
+ );
1316
1522
  }
1317
- function Lr(e, t) {
1523
+ function fi(e, t) {
1318
1524
  const n = g(t), r = (e.examples ?? []).filter((a) => a.trim());
1319
- return { examples: r.some((a) => g(a) === n) ? r : [...r, t].slice(-ht), exampleCandidates: bt(e, t) };
1525
+ return { examples: r.some((a) => g(a) === n) ? r : [...r, t].slice(-At), exampleCandidates: St(e, t) };
1320
1526
  }
1321
- function bt(e, t) {
1527
+ function St(e, t) {
1322
1528
  const n = g(t);
1323
1529
  return (e.exampleCandidates ?? []).filter((r) => g(r.text) !== n);
1324
1530
  }
1325
- function Et(e, t) {
1531
+ function _t(e, t) {
1326
1532
  const n = e.ownerScope;
1327
1533
  return n ? n.kind === "org" ? !0 : n.kind === "team" ? !!t && n.teamId === t : !1 : !1;
1328
1534
  }
1329
- function Dr(e, t) {
1330
- return e.filter((n) => Et(n, t));
1535
+ function mi(e, t) {
1536
+ return e.filter((n) => _t(n, t));
1331
1537
  }
1332
- const be = [
1333
- {
1334
- id: "openai",
1335
- attachmentKinds: ["image", "pdf"],
1336
- label: "OpenAI",
1337
- capabilities: ["chat", "transcription", "embedding"],
1338
- defaultModel: "gpt-5-mini",
1339
- baseUrl: "https://api.openai.com/v1"
1340
- },
1341
- {
1342
- id: "gemini",
1343
- attachmentKinds: ["image", "pdf"],
1344
- label: "Google Gemini",
1345
- capabilities: ["chat", "transcription", "embedding"],
1346
- defaultModel: "gemini-3.5-flash",
1347
- baseUrl: "https://generativelanguage.googleapis.com/v1beta"
1348
- },
1349
- {
1350
- id: "anthropic",
1351
- attachmentKinds: ["image", "pdf"],
1352
- label: "Anthropic",
1353
- capabilities: ["chat"],
1354
- defaultModel: "claude-haiku-4-5",
1355
- baseUrl: "https://api.anthropic.com/v1"
1356
- },
1357
- {
1358
- id: "elevenlabs",
1359
- label: "ElevenLabs",
1360
- capabilities: ["transcription"],
1361
- baseUrl: "https://api.elevenlabs.io/v1"
1362
- },
1363
- // --- Chat Completions-vendors ------------------------------------------
1364
- // Alles hieronder draait op één adapter (`OpenAiCompatibleProvider`). Een
1365
- // nieuwe toevoegen is een rij hier + een regel in `providers/registry`.
1366
- //
1367
- // `defaultModel` is bewust een alias waar de vendor er een aanbiedt
1368
- // (`mistral-large-latest`, `openrouter/auto`): losse model-ids verlopen,
1369
- // aliassen niet. Waar dat niet kan, staat het nieuwste vlaggenschip.
1370
- {
1371
- id: "moonshot",
1372
- label: "Moonshot (Kimi)",
1373
- capabilities: ["chat"],
1374
- defaultModel: "kimi-k3",
1375
- baseUrl: "https://api.moonshot.ai/v1"
1376
- },
1377
- {
1378
- id: "deepseek",
1379
- label: "DeepSeek",
1380
- capabilities: ["chat"],
1381
- defaultModel: "deepseek-v4-flash",
1382
- baseUrl: "https://api.deepseek.com/v1"
1383
- },
1384
- {
1385
- id: "groq",
1386
- label: "Groq",
1387
- capabilities: ["chat"],
1388
- defaultModel: "openai/gpt-oss-120b",
1389
- baseUrl: "https://api.groq.com/openai/v1"
1390
- },
1391
- {
1392
- id: "mistral",
1393
- label: "Mistral",
1394
- capabilities: ["chat"],
1395
- defaultModel: "mistral-large-latest",
1396
- baseUrl: "https://api.mistral.ai/v1"
1397
- },
1398
- {
1399
- id: "openrouter",
1400
- label: "OpenRouter",
1401
- capabilities: ["chat"],
1402
- // De Auto Router kiest zelf een model per prompt, dus dit verloopt niet
1403
- // mee met de wekelijks wisselende slugs in de catalogus.
1404
- defaultModel: "openrouter/auto",
1405
- baseUrl: "https://openrouter.ai/api/v1"
1406
- },
1407
- // Self-hosted: geen vaste host, de user vult er zelf een in op het account.
1408
- // Praten allemaal Chat Completions, dus dezelfde adapter.
1409
- {
1410
- id: "ollama",
1411
- label: "Ollama (self-hosted)",
1412
- capabilities: ["chat"],
1413
- defaultModel: "llama3.3"
1414
- },
1415
- {
1416
- id: "openai-compatible",
1417
- label: "OpenAI-compatible (eigen endpoint)",
1418
- capabilities: ["chat"],
1419
- // vLLM, LM Studio, een eigen gateway — model en host komen van de user.
1420
- defaultModel: "default"
1421
- }
1422
- ];
1423
- function S(e) {
1424
- return be.find((t) => t.id === e);
1425
- }
1426
- function Pr(e) {
1427
- return S(e)?.label ?? e;
1428
- }
1429
- function Kr(e, t = "gpt-5-mini") {
1430
- return S(e)?.defaultModel ?? t;
1431
- }
1432
- function Ur(e) {
1433
- return be.filter((t) => t.capabilities.includes(e));
1434
- }
1435
- function jr(e) {
1436
- const t = S(e);
1437
- return !!t && !t.baseUrl;
1438
- }
1439
- function Gr(e, t) {
1440
- return t === "text" ? !0 : S(e)?.attachmentKinds?.includes(t) === !0;
1441
- }
1442
- function Br(e, t) {
1443
- if (!e.enabled) return "ok";
1444
- const n = ee(e.hardLimitNanos), r = ee(e.softLimitNanos);
1445
- return n !== void 0 && t >= n ? "hard" : r !== void 0 && t >= r ? "soft" : "ok";
1446
- }
1447
- function ee(e) {
1448
- return typeof e == "number" ? e : void 0;
1449
- }
1450
- function St(e, t = "month") {
1451
- const n = new Date(e);
1452
- return Date.UTC(n.getUTCFullYear(), n.getUTCMonth(), 1);
1453
- }
1454
- function Fr(e, t = "month") {
1455
- const n = new Date(St(e, t));
1456
- return `${n.getUTCFullYear()}-${String(n.getUTCMonth() + 1).padStart(2, "0")}`;
1457
- }
1458
- function Vr(e) {
1459
- return e?.listeningEnabled !== !1;
1460
- }
1461
- function Hr(e) {
1462
- return e.credentialScope ? e.credentialScope : (e.authMode ?? "header") === "header" || e.oauth?.scope === "org" ? "shared" : "per-user";
1463
- }
1464
- function Wr(e) {
1465
- return `mcp__${e}__`;
1466
- }
1467
- const zr = /* @__PURE__ */ new Set(["mail", "message"]);
1468
- function _t(e, t) {
1469
- const n = e.settings?.signatures?.[t];
1470
- return !n || !n.enabled || !n.body || n.body.trim() === "" ? null : n;
1471
- }
1472
- function Xr(e, t, n, r = "html") {
1473
- if (!e) return n;
1474
- const i = _t(e, t);
1475
- return i ? `${n}${r === "text" ? `
1476
-
1477
- ` : t === "mail" ? "<br><br>-- <br>" : "<br><br>"}${i.body}` : n;
1478
- }
1479
- function Yr(e) {
1480
- return e.endpoints ?? [];
1481
- }
1482
- const qr = (e) => !!e.assignedUserId || !!e.assignedInboxId, Jr = (e) => e.status === "closed", Zr = (e) => ({
1483
- urgent: 10,
1484
- high: 5,
1485
- normal: 2,
1486
- low: 1
1487
- })[e.priority] || 0, Qr = (e, t = 30) => e.title?.length <= t ? e.title : `${e.title.substring(0, t)}...`;
1488
- function ei(e, t) {
1489
- return e.lastActivityAt ? !(e.seenBy ?? []).includes(t) : !1;
1490
- }
1491
- const ti = 1e3, ni = 2e3, ri = 500, ii = 12e3, ai = 4e3, Tt = ["contact", "company"];
1492
- function oi(e) {
1493
- if (!e) return !1;
1494
- const t = e.slice(0, e.indexOf(":"));
1495
- return Tt.includes(t);
1496
- }
1497
- function si(e, t) {
1498
- const n = e.accumulatedSeconds || 0;
1499
- return e.runningSince ? n + Math.max(0, Math.floor((t - e.runningSince) / 1e3)) : n;
1500
- }
1501
- function li(e, t) {
1502
- const n = Math.max(1, Math.ceil(Math.max(0, e) / 60));
1503
- if (!t || t === "exact") return n * 60;
1504
- const r = Number(t);
1505
- return !Number.isFinite(r) || r <= 0 ? n * 60 : Math.ceil(n / r) * r * 60;
1506
- }
1507
- function ci(e) {
1508
- const t = Math.max(0, Math.round(e / 60));
1509
- return `${Math.floor(t / 60)}:${String(t % 60).padStart(2, "0")}`;
1510
- }
1511
- function ui(e) {
1512
- const t = Math.max(0, Math.floor(e)), n = (a) => String(a).padStart(2, "0"), r = Math.floor(t / 60) % 60, i = Math.floor(t / 3600);
1513
- return i > 0 ? `${i}:${n(r)}:${n(t % 60)}` : `${n(r)}:${n(t % 60)}`;
1514
- }
1515
- function It(e) {
1516
- return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").slice(0, 48).replace(/^-+|-+$/g, "");
1517
- }
1518
- function di(e, t) {
1519
- const n = It(e) || "werksoort", r = new Set(t);
1520
- if (!r.has(n)) return n;
1521
- for (let i = 2; i < 500; i++) {
1522
- const a = `${n}-${i}`;
1523
- if (!r.has(a)) return a;
1524
- }
1525
- return `${n}-${r.size + 1}`;
1526
- }
1527
- function pi(e, t) {
1528
- const n = e.ownerScope;
1529
- return !n || n.kind === "org" ? !0 : t.includes(n.teamId);
1530
- }
1531
- function fi(e) {
1532
- return e.filter((t) => !t.archived).sort(Mt);
1533
- }
1534
- function Mt(e, t) {
1535
- const n = (e.order ?? 0) - (t.order ?? 0);
1536
- return n !== 0 ? n : (e.label || "").localeCompare(t.label || "");
1537
- }
1538
- function mi(e) {
1538
+ function gi(e) {
1539
1539
  return e.type === "agent";
1540
1540
  }
1541
- const Ct = "work_item", kt = "work_project";
1541
+ const Tt = "work_item", It = "work_project";
1542
1542
  function wt(e) {
1543
- return `${Ct}:${e}`;
1543
+ return `${Tt}:${e}`;
1544
1544
  }
1545
- function Ee(e) {
1546
- return `${kt}:${e}`;
1545
+ function he(e) {
1546
+ return `${It}:${e}`;
1547
1547
  }
1548
- function gi(e, t, n) {
1548
+ function hi(e, t, n) {
1549
1549
  const r = `${e}-${t}`;
1550
1550
  return n ? `${r}-${n}` : r;
1551
1551
  }
1552
- function hi(e) {
1552
+ function yi(e) {
1553
1553
  const t = /^([A-Za-z0-9]{2,8})-(\d+)(?:-(\d+))?$/.exec((e || "").trim());
1554
1554
  return t ? {
1555
1555
  projectKey: t[1].toUpperCase(),
@@ -1557,329 +1557,71 @@ function hi(e) {
1557
1557
  ...t[3] ? { subSequence: Number(t[3]) } : {}
1558
1558
  } : null;
1559
1559
  }
1560
- function yi(e) {
1560
+ function Ai(e) {
1561
1561
  return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toUpperCase().replace(/[^A-Z0-9]/g, "").slice(0, 3) || "PRJ";
1562
1562
  }
1563
- function Ai(e, t = 25) {
1563
+ function bi(e, t = 25) {
1564
1564
  const n = /* @__PURE__ */ new Set([wt(e.id)]);
1565
- e.projectId && n.add(Ee(e.projectId));
1565
+ e.projectId && n.add(he(e.projectId));
1566
1566
  for (const r of e.ancestorKeys ?? []) n.add(r);
1567
1567
  for (const r of e.partyKeys ?? []) n.add(r);
1568
1568
  return Array.from(n).slice(0, t);
1569
1569
  }
1570
- function bi(e) {
1571
- return [Ee(e.id)];
1570
+ function Ei(e) {
1571
+ return [he(e.id)];
1572
1572
  }
1573
- const $ = [
1573
+ const N = [
1574
1574
  { key: "open", label: "status_open", category: "todo", order: 0 },
1575
1575
  { key: "in_progress", label: "status_in_progress", category: "in_progress", order: 1 },
1576
1576
  { key: "done", label: "status_done", category: "done", order: 2 }
1577
- ], Se = $.map((e) => e.key);
1578
- function Nt(e) {
1579
- return e?.statuses?.length ? e.statuses : $;
1577
+ ], ye = N.map((e) => e.key);
1578
+ function Mt(e) {
1579
+ return e?.statuses?.length ? e.statuses : N;
1580
1580
  }
1581
- function vt(e, t) {
1581
+ function kt(e, t) {
1582
1582
  return t.find((n) => n.key === e)?.category ?? "todo";
1583
1583
  }
1584
- function Ei(e, t) {
1584
+ function Si(e, t) {
1585
1585
  return t.find((n) => n.key === e);
1586
1586
  }
1587
- function Si(e) {
1588
- const t = Nt(e), n = e?.defaultStatusKey;
1589
- return n && t.some((r) => r.key === n) ? n : xt(t)[0]?.key ?? $[0].key;
1587
+ function _i(e) {
1588
+ const t = Mt(e), n = e?.defaultStatusKey;
1589
+ return n && t.some((r) => r.key === n) ? n : Ct(t)[0]?.key ?? N[0].key;
1590
1590
  }
1591
- function xt(e) {
1591
+ function Ct(e) {
1592
1592
  return [...e].sort((t, n) => {
1593
1593
  const r = (t.order ?? 0) - (n.order ?? 0);
1594
1594
  return r !== 0 ? r : (t.label || "").localeCompare(n.label || "");
1595
1595
  });
1596
1596
  }
1597
- function _i(e, t) {
1598
- return vt(e, t) === "done";
1597
+ function Ti(e, t) {
1598
+ return kt(e, t) === "done";
1599
1599
  }
1600
- function Ot(e) {
1600
+ function vt(e) {
1601
1601
  return (e || "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").slice(0, 48).replace(/^-+|-+$/g, "");
1602
1602
  }
1603
- function Ti(e, t) {
1604
- const n = Ot(e) || "status", r = /* @__PURE__ */ new Set([...t, ...Se]);
1603
+ function Ii(e, t) {
1604
+ const n = vt(e) || "status", r = /* @__PURE__ */ new Set([...t, ...ye]);
1605
1605
  if (!r.has(n)) return n;
1606
1606
  for (let i = 2; i < 500; i++) {
1607
1607
  const a = `${n}-${i}`;
1608
- if (!r.has(a)) return a;
1609
- }
1610
- return `${n}-${r.size + 1}`;
1611
- }
1612
- function Ii(e) {
1613
- const t = [];
1614
- if (!e.length) return [{ index: -1, reason: "empty" }];
1615
- const n = /* @__PURE__ */ new Set();
1616
- return e.forEach((r, i) => {
1617
- if (!r.key) {
1618
- t.push({ index: i, reason: "missing_key" });
1619
- return;
1620
- }
1621
- Se.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);
1622
- }), 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;
1623
- }
1624
- const R = {
1625
- // The lower bounds are deliberately generous: service ranges (0800/0900) are
1626
- // shorter than geographic numbers, and a too-strict minimum silently drops them.
1627
- // An over-permissive key is harmless — it simply matches nothing.
1628
- NL: { callingCode: "31", trunkPrefix: "0", nsnMin: 7, nsnMax: 9 },
1629
- BE: { callingCode: "32", trunkPrefix: "0", nsnMin: 8, nsnMax: 9 },
1630
- LU: { callingCode: "352", nsnMin: 6, nsnMax: 9 },
1631
- DE: { callingCode: "49", trunkPrefix: "0", nsnMin: 6, nsnMax: 13 },
1632
- FR: { callingCode: "33", trunkPrefix: "0", nsnMin: 9, nsnMax: 9 },
1633
- GB: { callingCode: "44", trunkPrefix: "0", nsnMin: 9, nsnMax: 10 },
1634
- IE: { callingCode: "353", trunkPrefix: "0", nsnMin: 7, nsnMax: 9 },
1635
- ES: { callingCode: "34", nsnMin: 9, nsnMax: 9 },
1636
- PT: { callingCode: "351", nsnMin: 9, nsnMax: 9 },
1637
- IT: { callingCode: "39", nsnMin: 6, nsnMax: 11 },
1638
- AT: { callingCode: "43", trunkPrefix: "0", nsnMin: 7, nsnMax: 13 },
1639
- CH: { callingCode: "41", trunkPrefix: "0", nsnMin: 9, nsnMax: 9 },
1640
- DK: { callingCode: "45", nsnMin: 8, nsnMax: 8 },
1641
- SE: { callingCode: "46", trunkPrefix: "0", nsnMin: 7, nsnMax: 13 },
1642
- NO: { callingCode: "47", nsnMin: 8, nsnMax: 8 },
1643
- FI: { callingCode: "358", trunkPrefix: "0", nsnMin: 5, nsnMax: 12 },
1644
- PL: { callingCode: "48", nsnMin: 9, nsnMax: 9 },
1645
- US: { callingCode: "1", nsnMin: 10, nsnMax: 10 },
1646
- CA: { callingCode: "1", nsnMin: 10, nsnMax: 10 }
1647
- }, $t = "NL", Rt = 15, Lt = 8, Dt = Array.from(
1648
- new Set(Object.values(R).map((e) => e.callingCode))
1649
- ).sort((e, t) => t.length - e.length);
1650
- function te(e) {
1651
- if (e)
1652
- return R[e.trim().toUpperCase()];
1653
- }
1654
- function E(e, t) {
1655
- return e.length >= t.nsnMin && e.length <= t.nsnMax;
1656
- }
1657
- function ne(e) {
1658
- if (e.length > Rt) return null;
1659
- for (const t of Dt) {
1660
- if (!e.startsWith(t)) continue;
1661
- const n = e.slice(t.length);
1662
- for (const r of Object.values(R)) {
1663
- if (r.callingCode !== t) continue;
1664
- const i = r.trunkPrefix, a = i && n.startsWith(i) ? n.slice(i.length) : n;
1665
- if (E(a, r)) return `+${t}${a}`;
1666
- }
1667
- return null;
1668
- }
1669
- return e.length < Lt ? null : `+${e}`;
1670
- }
1671
- function Pt(e) {
1672
- let t = e.trim();
1673
- const n = t.match(/^(sips?|tel|whatsapp):/i);
1674
- n && (t = t.slice(n[0].length));
1675
- const r = t.indexOf("@");
1676
- return r >= 0 && (t = t.slice(0, r)), t.trim();
1677
- }
1678
- function Mi(e) {
1679
- if (!e) return !1;
1680
- const t = e.indexOf("@");
1681
- if (t <= 0) return !1;
1682
- const n = e.slice(0, t).trim();
1683
- return !/^[+\d\s().-]+$/.test(n);
1684
- }
1685
- function re(e, t) {
1686
- if (!e) return null;
1687
- const n = Pt(e);
1688
- if (!n) return null;
1689
- const r = n.startsWith("+"), i = n.replace(/\D/g, "");
1690
- if (!i) return null;
1691
- if (r) return ne(i);
1692
- if (i.startsWith("00")) return ne(i.slice(2));
1693
- const a = te(t) ?? te($t);
1694
- if (!a) return null;
1695
- const o = a.trunkPrefix;
1696
- if (o && i.startsWith(o)) {
1697
- const s = i.slice(o.length);
1698
- return E(s, a) ? `+${a.callingCode}${s}` : null;
1699
- }
1700
- if (i.startsWith(a.callingCode)) {
1701
- const s = i.slice(a.callingCode.length);
1702
- if (E(s, a)) return `+${a.callingCode}${s}`;
1703
- }
1704
- return !o && E(i, a) ? `+${a.callingCode}${i}` : null;
1705
- }
1706
- function Ci(e, t = 9) {
1707
- const n = (e ?? "").replace(/\D/g, "");
1708
- return n.length < t ? null : n.slice(-t);
1709
- }
1710
- function _e(e) {
1711
- if (!e) return null;
1712
- const t = e.trim().toLowerCase(), n = t.lastIndexOf("@");
1713
- if (n <= 0 || n === t.length - 1) return null;
1714
- const r = t.slice(0, n).split("+")[0], i = t.slice(n + 1);
1715
- return !r || !i.includes(".") ? null : `${r}@${i}`;
1716
- }
1717
- function ki(e) {
1718
- const t = _e(e);
1719
- return t ? t.slice(t.lastIndexOf("@") + 1) : null;
1720
- }
1721
- const Kt = /* @__PURE__ */ new Set([
1722
- "co.uk",
1723
- "org.uk",
1724
- "gov.uk",
1725
- "ac.uk",
1726
- "com.au",
1727
- "co.nz",
1728
- "com.br",
1729
- "co.za"
1730
- ]);
1731
- function Ut(e) {
1732
- if (!e) return null;
1733
- const t = e.trim().toLowerCase().replace(/\.$/, "").split(".").filter(Boolean);
1734
- if (t.length < 2) return null;
1735
- const n = t.slice(-2).join(".");
1736
- return Kt.has(n) && t.length >= 3 ? t.slice(-3).join(".") : n;
1737
- }
1738
- const jt = /* @__PURE__ */ new Set([
1739
- "gmail.com",
1740
- "googlemail.com",
1741
- "outlook.com",
1742
- "hotmail.com",
1743
- "hotmail.nl",
1744
- "hotmail.be",
1745
- "hotmail.co.uk",
1746
- "live.com",
1747
- "live.nl",
1748
- "live.be",
1749
- "msn.com",
1750
- "yahoo.com",
1751
- "yahoo.co.uk",
1752
- "ymail.com",
1753
- "icloud.com",
1754
- "me.com",
1755
- "mac.com",
1756
- "aol.com",
1757
- "gmx.net",
1758
- "gmx.de",
1759
- "web.de",
1760
- "protonmail.com",
1761
- "proton.me",
1762
- "pm.me",
1763
- "tutanota.com",
1764
- "zoho.com",
1765
- "mail.com",
1766
- "ziggo.nl",
1767
- "kpnmail.nl",
1768
- "planet.nl",
1769
- "home.nl",
1770
- "casema.nl",
1771
- "chello.nl",
1772
- "xs4all.nl",
1773
- "telfort.nl",
1774
- "hetnet.nl",
1775
- "zonnet.nl",
1776
- "upcmail.nl",
1777
- "quicknet.nl",
1778
- "telenet.be",
1779
- "skynet.be",
1780
- "proximus.be",
1781
- "scarlet.be"
1782
- ]);
1783
- function wi(e) {
1784
- const t = Ut(e);
1785
- return t ? jt.has(t) : !1;
1786
- }
1787
- function Ni(e) {
1788
- if (!e) return !1;
1789
- const t = e.trim().toLowerCase();
1790
- return t === "tel" || t === "sms" || t === "whatsapp" || t === "fax";
1791
- }
1792
- function vi(e, t, n) {
1793
- if (!e || !t) return null;
1794
- const r = e.trim().toLowerCase();
1795
- if (r === "tel" || r === "sms" || r === "whatsapp") {
1796
- const a = re(t, n);
1797
- return a ? `tel:${a}` : null;
1798
- }
1799
- if (r === "fax") {
1800
- const a = re(t, n);
1801
- return a ? `fax:${a}` : null;
1802
- }
1803
- if (r === "mailto" || r === "email") {
1804
- const a = _e(t);
1805
- return a ? `mailto:${a}` : null;
1806
- }
1807
- const i = t.trim().toLowerCase();
1808
- return i ? `${r}:${i}` : null;
1809
- }
1810
- const Gt = /(\*\*|__)(?=\S)([\s\S]*?\S)\1/g, Bt = /(\*|_)(?=\S)([^*_\n]*?\S)\1/g;
1811
- function xi(e) {
1812
- if (typeof e != "string" || !e) return "";
1813
- let t = e;
1814
- 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(`
1815
- `).map(
1816
- (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,}$/, "")
1817
- ).join(`
1818
- `), t = t.replace(Gt, "$2"), t = t.replace(Bt, "$2"), t = t.replace(/~~(?=\S)([\s\S]*?\S)~~/g, "$1"), t = t.replace(/`([^`\n]+)`/g, "$1"), t.replace(/\s+/g, " ").trim();
1819
- }
1820
- const Ft = [
1821
- /<blockquote/i,
1822
- /class="?gmail_quote/i,
1823
- // Gmail quote container
1824
- /id="?[^"]*divRplyFwdMsg/i,
1825
- // Outlook web reply/forward header
1826
- /id="?[^"]*mail-editor-reference-message-container/i,
1827
- // Outlook new/"mail editor" quote container
1828
- /-{3,}\s*Original Message\s*-{3,}/i,
1829
- /\n_{5,}\s*\n/,
1830
- // Outlook underscore separator before "From:"
1831
- /\bOn\b[\s\S]{0,200}?\bwrote:/i
1832
- // Gmail "On <date> <name> wrote:"
1833
- ], ie = /^\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;
1834
- function Ht(e) {
1835
- const t = e.split(`
1836
- `);
1837
- for (let n = 0; n < t.length; n++)
1838
- if (Vt.test(t[n]) || ie.test(t[n]) && t.slice(n + 1, n + 4).some((r) => ie.test(r)))
1839
- return t.slice(0, n).join(`
1840
- `).trim();
1841
- return e;
1842
- }
1843
- function ae(e) {
1844
- let t = e;
1845
- return t = t.replace(/<(script|style)[\s\S]*?<\/\1>/gi, ""), t = t.replace(/<br\s*\/?>/gi, `
1846
- `), t = t.replace(/<\/(p|h[1-6]|ul|ol|table|blockquote)>/gi, `
1847
-
1848
- `), t = t.replace(/<\/(div|li|tr)>/gi, `
1849
- `), t = t.replace(/<\/(td|th)>/gi, " "), t = t.replace(/<[^>]+>/g, ""), t = t.replace(/<[^>]*$/, ""), t;
1850
- }
1851
- function oe(e) {
1852
- return !Number.isInteger(e) || e < 0 || e > 1114111 ? null : String.fromCodePoint(e);
1853
- }
1854
- function se(e) {
1855
- return e.replace(/&nbsp;/gi, " ").replace(/&lt;/gi, "<").replace(/&gt;/gi, ">").replace(/&quot;/gi, '"').replace(/&#(\d+);/g, (t, n) => oe(Number(n)) ?? t).replace(/&#x([0-9a-f]+);/gi, (t, n) => oe(parseInt(n, 16)) ?? t).replace(/&amp;/gi, "&");
1856
- }
1857
- function le(e) {
1858
- return e.replace(/\r/g, "").replace(/[ \t]+/g, " ").replace(/ *\n */g, `
1859
- `).replace(/\n{3,}/g, `
1860
-
1861
- `).trim();
1862
- }
1863
- function Oi(e) {
1864
- if (typeof e != "string" || !e) return "";
1865
- let t = e.length;
1866
- for (const a of Ft) {
1867
- const o = e.search(a);
1868
- o >= 0 && o < t && (t = o);
1608
+ if (!r.has(a)) return a;
1869
1609
  }
1870
- const n = e.slice(0, t);
1871
- let r = le(se(ae(n)));
1872
- return r || (r = le(se(ae(e)))), Ht(r) || r;
1873
- }
1874
- const Wt = /(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|newsletter|nieuwsbrief|mailer|mailing|notifications?|bounce|postmaster|marketing)@/i, zt = /\b(unsubscribe|afmelden|uitschrijven|opt[\s-]?out|manage (your )?preferences|geen (e-?mails?|nieuwsbrief|berichten) meer)\b/i;
1875
- function $i(e, t) {
1876
- return !!(e && Wt.test(e) || t && zt.test(t));
1610
+ return `${n}-${r.size + 1}`;
1877
1611
  }
1878
- const Xt = 3, Yt = 600;
1879
- function Ri(e, t) {
1880
- return e >= Xt || t >= Yt;
1612
+ function wi(e) {
1613
+ const t = [];
1614
+ if (!e.length) return [{ index: -1, reason: "empty" }];
1615
+ const n = /* @__PURE__ */ new Set();
1616
+ return e.forEach((r, i) => {
1617
+ if (!r.key) {
1618
+ t.push({ index: i, reason: "missing_key" });
1619
+ return;
1620
+ }
1621
+ ye.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);
1622
+ }), 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;
1881
1623
  }
1882
- const qt = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "image/gif", "image/webp"]), Jt = /* @__PURE__ */ new Set([
1624
+ const Nt = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "image/gif", "image/webp"]), xt = /* @__PURE__ */ new Set([
1883
1625
  "text/plain",
1884
1626
  "text/markdown",
1885
1627
  "text/csv",
@@ -1888,55 +1630,55 @@ const qt = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "ima
1888
1630
  "application/xml",
1889
1631
  "text/xml"
1890
1632
  ]);
1891
- function Zt(e) {
1633
+ function Ot(e) {
1892
1634
  const t = (e ?? "").trim().toLowerCase().split(";")[0];
1893
- return t ? qt.has(t) ? "image" : t === "application/pdf" ? "pdf" : Jt.has(t) ? "text" : t.startsWith("audio/") ? "audio" : "unsupported" : "unsupported";
1635
+ return t ? Nt.has(t) ? "image" : t === "application/pdf" ? "pdf" : xt.has(t) ? "text" : t.startsWith("audio/") ? "audio" : "unsupported" : "unsupported";
1894
1636
  }
1895
- const h = 1024 * 1024, Qt = {
1637
+ const h = 1024 * 1024, $t = {
1896
1638
  image: 5 * h,
1897
1639
  pdf: 20 * h,
1898
1640
  text: 1 * h,
1899
1641
  audio: 20 * h
1900
- }, Li = 25 * h, Di = 5;
1901
- function Pi(e, t) {
1902
- const n = Zt(e);
1903
- return n === "unsupported" ? "unsupported" : t > Qt[n] ? "too-large" : null;
1642
+ }, Mi = 25 * h, ki = 5;
1643
+ function Ci(e, t) {
1644
+ const n = Ot(e);
1645
+ return n === "unsupported" ? "unsupported" : t > $t[n] ? "too-large" : null;
1904
1646
  }
1905
- function en(e) {
1647
+ function Rt(e) {
1906
1648
  return `${e.kind}:${e.id || e.url || e.title}`;
1907
1649
  }
1908
- function Ki(e, t = []) {
1650
+ function vi(e, t = []) {
1909
1651
  const n = new Set(t), r = [], i = [];
1910
1652
  for (const a of e) {
1911
- const o = en(a);
1653
+ const o = Rt(a);
1912
1654
  n.has(o) || (n.add(o), r.push(a), i.push(o));
1913
1655
  }
1914
1656
  return { sources: r, keys: i };
1915
1657
  }
1916
- function Ui(e) {
1658
+ function Ni(e) {
1917
1659
  return e.sessions.filter(
1918
1660
  (t) => t.id !== e.exceptSessionId && t.state === "connected" && e.canHold(t.providerId)
1919
1661
  );
1920
1662
  }
1921
- function ji(e) {
1663
+ function xi(e) {
1922
1664
  return e.sessions.filter(
1923
1665
  (t) => t.id !== e.exceptSessionId && t.state === "connected" && !e.canHold(t.providerId)
1924
1666
  );
1925
1667
  }
1926
- function Gi(e) {
1668
+ function Oi(e) {
1927
1669
  return e.sessions.some(
1928
1670
  (n) => n.id !== e.exceptSessionId && (n.state === "connected" || n.state === "on_hold")
1929
1671
  ) ? { admit: !1, reason: "busy" } : { admit: !0 };
1930
1672
  }
1931
- function tn(e, t) {
1932
- const n = new Set(e.disabledIntents ?? []), r = e.intentOverrides ?? {}, i = t.intents.filter((o) => !n.has(o.intent)).map((o) => rn(o, r[o.intent]));
1673
+ function Lt(e, t) {
1674
+ const n = new Set(e.disabledIntents ?? []), r = e.intentOverrides ?? {}, i = t.intents.filter((o) => !n.has(o.intent)).map((o) => Pt(o, r[o.intent]));
1933
1675
  if (!e.extraIntents || e.extraIntents.length === 0) return i;
1934
1676
  const a = new Set(i.map((o) => o.intent));
1935
1677
  for (const o of e.extraIntents)
1936
1678
  a.has(o.intent) || (i.push(o), a.add(o.intent));
1937
1679
  return i;
1938
1680
  }
1939
- function nn(e, t) {
1681
+ function Dt(e, t) {
1940
1682
  const n = {};
1941
1683
  for (const r of e.intents) {
1942
1684
  if (!r.togglable) continue;
@@ -1945,46 +1687,46 @@ function nn(e, t) {
1945
1687
  }
1946
1688
  return n;
1947
1689
  }
1948
- function Bi(e, t) {
1949
- const n = nn(e, t);
1690
+ function $i(e, t) {
1691
+ const n = Dt(e, t);
1950
1692
  return Object.entries(n).filter(([, r]) => !r).map(([r]) => r);
1951
1693
  }
1952
- function rn(e, t) {
1694
+ function Pt(e, t) {
1953
1695
  return t ? {
1954
1696
  intent: t.intent ?? e.intent,
1955
1697
  targetSchemes: t.targetSchemes ?? e.targetSchemes,
1956
1698
  transport: t.transport ?? e.transport
1957
1699
  } : e;
1958
1700
  }
1959
- function Fi(e, t) {
1701
+ function Ri(e, t) {
1960
1702
  const n = [];
1961
1703
  for (const r of e) {
1962
1704
  if (!r.enabled) continue;
1963
1705
  const i = t[r.providerId];
1964
1706
  if (i)
1965
- for (const a of tn(r, i))
1707
+ for (const a of Lt(r, i))
1966
1708
  n.push({ channel: r, description: i, capability: a });
1967
1709
  }
1968
1710
  return n;
1969
1711
  }
1970
- function Vi(e, t) {
1712
+ function Li(e, t) {
1971
1713
  return t.filter((n) => n.capability.intent === e);
1972
1714
  }
1973
- function an(e, t) {
1715
+ function Kt(e, t) {
1974
1716
  return t.filter((n) => n.capability.targetSchemes.includes(e));
1975
1717
  }
1976
- function Hi(e, t) {
1977
- return an(e.scheme, t);
1718
+ function Di(e, t) {
1719
+ return Kt(e.scheme, t);
1978
1720
  }
1979
- function Wi(e, t, n) {
1721
+ function Pi(e, t, n) {
1980
1722
  const r = [];
1981
1723
  for (const i of e)
1982
1724
  for (const a of n)
1983
1725
  a.capability.intent === t && a.capability.targetSchemes.includes(i.scheme) && r.push({ channelIntent: a, endpoint: i });
1984
1726
  return r;
1985
1727
  }
1986
- var on = /* @__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))(on || {});
1987
- const sn = {
1728
+ var Ut = /* @__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))(Ut || {});
1729
+ const jt = {
1988
1730
  mailto: "mail",
1989
1731
  sip: "tel",
1990
1732
  tel: "tel",
@@ -1996,9 +1738,8 @@ const sn = {
1996
1738
  instagram: "chat",
1997
1739
  viber: "chat",
1998
1740
  whatsapp: "wa",
1999
- // Not ways of reaching a person: a webhook is a machine, a URL is a page,
2000
- // a calendar entry is an appointment, and username/id/custom say nothing
2001
- // about transport on their own.
1741
+ // Not ways of reaching a person: a webhook is a machine, a URL is a page, a
1742
+ // calendar entry is an appointment; username/id/custom say nothing about transport.
2002
1743
  webhook: "note",
2003
1744
  url: "note",
2004
1745
  calendar: "note",
@@ -2006,10 +1747,10 @@ const sn = {
2006
1747
  id: "note",
2007
1748
  custom: "note"
2008
1749
  };
2009
- function zi(e) {
2010
- return e ? sn[e] ?? "note" : "note";
1750
+ function Ki(e) {
1751
+ return e ? jt[e] ?? "note" : "note";
2011
1752
  }
2012
- const Xi = "message_window", Yi = "message_templates", qi = {
1753
+ const Ui = "message_window", ji = "message_templates", Gi = {
2013
1754
  // E-mail
2014
1755
  FROM: "from",
2015
1756
  TO: "to",
@@ -2026,47 +1767,201 @@ const Xi = "message_window", Yi = "message_templates", qi = {
2026
1767
  // Voice/conference
2027
1768
  HOST: "host",
2028
1769
  PARTICIPANT: "participant"
2029
- }, Ji = (e, t) => ({ intent: e, ...t }), Zi = "folder_management", Qi = "remote_search", ea = { ok: !1, code: "UNSUPPORTED", message: "Provider does not support this op" }, ta = "resources.describe", na = "resources.search", ra = "resources.resolve";
2030
- function ia(e) {
1770
+ }, Bi = (e, t) => ({ intent: e, ...t }), Fi = "folder_management", Vi = "remote_search", Hi = {
1771
+ ok: !1,
1772
+ code: "UNSUPPORTED",
1773
+ message: "Provider does not support this op"
1774
+ }, Wi = "installation-id", zi = {
1775
+ ai: [
1776
+ "account.read",
1777
+ "account.write",
1778
+ "agent.read",
1779
+ "agent.write",
1780
+ "assignment.read",
1781
+ "budget.read",
1782
+ "budget.write",
1783
+ "connector.read",
1784
+ "connector.write",
1785
+ "context.read",
1786
+ "context.write",
1787
+ "conversation.read",
1788
+ "conversation.write",
1789
+ "lens.read",
1790
+ "lens.write",
1791
+ "message.read",
1792
+ "message.write",
1793
+ "playbook.read",
1794
+ "playbook.write",
1795
+ "profile.read",
1796
+ "profile.write",
1797
+ "run.read",
1798
+ "run.write",
1799
+ "settings.read",
1800
+ "settings.write",
1801
+ "tool.read",
1802
+ "transcript.write",
1803
+ "usage.read"
1804
+ ],
1805
+ analytics: ["report.read"],
1806
+ "app-store": ["app.publish", "app.read", "app.write", "setting.read", "setting.write"],
1807
+ automations: ["sync.read", "sync.write", "webhook.read", "webhook.write"],
1808
+ communication: [
1809
+ "account.read",
1810
+ "account.write",
1811
+ "activity-type.read",
1812
+ "activity.read",
1813
+ "activity.write",
1814
+ "attachment.read",
1815
+ "attribute.read",
1816
+ "attribute.write",
1817
+ "calendar.read",
1818
+ "calendar.write",
1819
+ "channel.read",
1820
+ "channel.write",
1821
+ "custom-field.read",
1822
+ "custom-field.write",
1823
+ "folder.read",
1824
+ "folder.write",
1825
+ "inbox.read",
1826
+ "inbox.write",
1827
+ "interaction.read",
1828
+ "interaction.write",
1829
+ "reminder.read",
1830
+ "task.read",
1831
+ "task.write",
1832
+ "template.read",
1833
+ "template.write",
1834
+ "topic.read",
1835
+ "topic.write"
1836
+ ],
1837
+ context: ["kind.read", "kind.write", "memory.read", "memory.write"],
1838
+ crm: ["company.read", "company.write", "contact.read", "contact.write"],
1839
+ "eylo-voip": [
1840
+ "account.read",
1841
+ "account.write",
1842
+ "callflow.read",
1843
+ "callflow.write",
1844
+ "channel.read",
1845
+ "channel.write",
1846
+ "contact.read",
1847
+ "contact.write",
1848
+ "device.read",
1849
+ "device.write",
1850
+ "group.read",
1851
+ "group.write",
1852
+ "interaction.read",
1853
+ "interaction.write",
1854
+ "media.read",
1855
+ "media.write",
1856
+ "menu.read",
1857
+ "menu.write",
1858
+ "phone-number.read",
1859
+ "phone-number.write",
1860
+ "recording.read",
1861
+ "recording.write",
1862
+ "sip.read",
1863
+ "temporal-rule.read",
1864
+ "temporal-rule.write",
1865
+ "user.read",
1866
+ "user.write",
1867
+ "vmbox.read",
1868
+ "vmbox.write",
1869
+ "webhook.read",
1870
+ "webhook.write"
1871
+ ],
1872
+ google: ["account.read", "account.write", "contact.read"],
1873
+ kb: [
1874
+ "article.read",
1875
+ "article.write",
1876
+ "category.read",
1877
+ "category.write",
1878
+ "help-center.read",
1879
+ "help-center.write",
1880
+ "kb.read",
1881
+ "kb.write"
1882
+ ],
1883
+ mail: ["account.write"],
1884
+ meta: ["account.read", "account.write"],
1885
+ microsoft: ["account.read", "account.write", "contact.read", "sync.write"],
1886
+ organization: [
1887
+ "billing.read",
1888
+ "billing.write",
1889
+ "settings.read",
1890
+ "settings.write",
1891
+ "team.read",
1892
+ "team.write"
1893
+ ],
1894
+ shopify: ["account.read", "account.write", "order.read"],
1895
+ slack: ["thread.read", "thread.write"],
1896
+ storage: [
1897
+ "artifact.read",
1898
+ "artifact.write",
1899
+ "file.read",
1900
+ "file.write",
1901
+ "mount.read",
1902
+ "mount.write"
1903
+ ],
1904
+ time: ["entry.read", "entry.write", "work-type.read", "work-type.write"],
1905
+ user: ["user.read", "user.write"],
1906
+ work: ["item.read", "item.write", "project.read", "project.write"]
1907
+ }, Ae = 9e4, Gt = ["out_of_office"], be = (e) => Gt.includes(e);
1908
+ function Xi(e, t, n) {
1909
+ const r = n - e < Ae, i = t?.status && (!t.expiresAt || t.expiresAt > n) ? t : void 0;
1910
+ if (!i?.status) return { online: r, status: r ? "available" : "offline" };
1911
+ const a = i.status;
1912
+ return !r && !be(a) ? { online: !1, status: "offline" } : { online: r, status: a, message: i.message };
1913
+ }
1914
+ function Yi(e, t) {
1915
+ const n = t - e.lastSeenAt < Ae, r = n || be(e.status) ? e.status : "offline";
1916
+ return n === e.online && r === e.status ? e : { ...e, online: n, status: r };
1917
+ }
1918
+ function qi(e, t) {
1919
+ 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 };
1920
+ }
1921
+ function Ji(e) {
1922
+ return e.providerAvailable && e.allowed;
1923
+ }
1924
+ const Zi = "resources.describe", Qi = "resources.search", ea = "resources.resolve";
1925
+ function ta(e) {
2031
1926
  const t = e.indexOf(":");
2032
1927
  return t === -1 ? e : e.slice(0, t);
2033
1928
  }
2034
- const Te = "auth";
2035
- function Ie(e) {
1929
+ const Ee = "auth";
1930
+ function Se(e) {
2036
1931
  const t = typeof e == "string" ? e.match(/apps\/([^/?#]+)/) : null;
2037
1932
  return t ? t[1] : null;
2038
1933
  }
2039
- function aa(e) {
2040
- const t = Ie(e);
2041
- return t ? t !== Te : typeof e == "string" && e.startsWith("/wake");
1934
+ function na(e) {
1935
+ const t = Se(e);
1936
+ return t ? t !== Ee : typeof e == "string" && e.startsWith("/wake");
2042
1937
  }
2043
- function oa(e) {
2044
- return typeof e != "string" || e === "" || e === "/" ? !0 : Ie(e) === Te;
1938
+ function ra(e) {
1939
+ return typeof e != "string" || e === "" || e === "/" ? !0 : Se(e) === Ee;
2045
1940
  }
2046
- function ln(e) {
1941
+ function Bt(e) {
2047
1942
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
2048
1943
  }
2049
- function cn(e) {
2050
- const n = e.split("/").filter(Boolean).map((r) => r.startsWith(":") ? r.endsWith("?") ? "(?:/[^/]+)?" : "/[^/]+" : "/" + ln(r)).join("");
1944
+ function Ft(e) {
1945
+ const n = e.split("/").filter(Boolean).map((r) => r.startsWith(":") ? r.endsWith("?") ? "(?:/[^/]+)?" : "/[^/]+" : "/" + Bt(r)).join("");
2051
1946
  return new RegExp(`^${n}\\/?$`);
2052
1947
  }
2053
- function un(e, t) {
1948
+ function Vt(e, t) {
2054
1949
  const n = e.split("/").filter(Boolean), r = t.split("/").filter(Boolean), i = {};
2055
1950
  return n.forEach((a, o) => {
2056
1951
  if (a.startsWith(":")) {
2057
- const s = a.endsWith("?") ? a.slice(1, -1) : a.slice(1), l = r[o];
2058
- l && (i[s] = l);
1952
+ const s = a.endsWith("?") ? a.slice(1, -1) : a.slice(1), c = r[o];
1953
+ c && (i[s] = c);
2059
1954
  }
2060
1955
  }), i;
2061
1956
  }
2062
- function dn(e) {
1957
+ function Ht(e) {
2063
1958
  return e.publicBasePath ?? `/apps/${e.name}`;
2064
1959
  }
2065
- function sa(e) {
1960
+ function ia(e) {
2066
1961
  const t = [];
2067
1962
  for (const n of e) {
2068
1963
  if (!n?.name) continue;
2069
- const r = dn(n);
1964
+ const r = Ht(n);
2070
1965
  for (const i of n.routes ?? []) {
2071
1966
  if (!i.public) continue;
2072
1967
  const a = i.path === "/" ? "" : i.path;
@@ -2080,7 +1975,7 @@ function sa(e) {
2080
1975
  }
2081
1976
  return t;
2082
1977
  }
2083
- function pn(e, t) {
1978
+ function Wt(e, t) {
2084
1979
  const n = e.split("/").filter(Boolean), r = t.split("/").filter(Boolean);
2085
1980
  for (let i = 0; i < Math.min(n.length, r.length); i++) {
2086
1981
  const a = n[i].startsWith(":"), o = r[i].startsWith(":");
@@ -2088,17 +1983,17 @@ function pn(e, t) {
2088
1983
  }
2089
1984
  return n.length > r.length;
2090
1985
  }
2091
- function fn(e, t) {
1986
+ function zt(e, t) {
2092
1987
  if (typeof e != "string") return null;
2093
1988
  let n = null;
2094
1989
  for (const r of t)
2095
- cn(r.pattern).test(e) && (!n || pn(r.pattern, n.pattern)) && (n = r);
2096
- return n ? { ...n, params: { ...n.props, ...un(n.pattern, e) } } : null;
1990
+ Ft(r.pattern).test(e) && (!n || Wt(r.pattern, n.pattern)) && (n = r);
1991
+ return n ? { ...n, params: { ...n.props, ...Vt(n.pattern, e) } } : null;
2097
1992
  }
2098
- function la(e, t) {
2099
- return fn(e, t) !== null;
1993
+ function aa(e, t) {
1994
+ return zt(e, t) !== null;
2100
1995
  }
2101
- const ca = "sync-source", ua = "sync-target", da = 20, mn = {
1996
+ const oa = "sync-source", sa = "sync-target", ca = 20, Xt = {
2102
1997
  afrikaans: [
2103
1998
  "[Muziek]",
2104
1999
  "(C) TV GELDERLAND 2021",
@@ -2248,14 +2143,14 @@ const ca = "sync-source", ua = "sync-target", da = 20, mn = {
2248
2143
  "[MÚSICA]",
2249
2144
  "[Music cuts in British]"
2250
2145
  ]
2251
- }, gn = (e) => {
2146
+ }, Yt = (e) => {
2252
2147
  let t = e;
2253
- return Object.values(mn).forEach((n) => {
2148
+ return Object.values(Xt).forEach((n) => {
2254
2149
  n.forEach((r) => {
2255
2150
  t = t.replaceAll(r, "");
2256
2151
  });
2257
2152
  }), t = t.replace(/\(.*?\)/g, ""), t = t.replace(/\[.*?\]/g, ""), t;
2258
- }, hn = 6e4, yn = 8e3, An = 2, bn = 0.4, En = 3, Sn = /* @__PURE__ */ new Set([
2153
+ }, qt = 6e4, Jt = 8e3, Zt = 2, Qt = 0.4, en = 3, tn = /* @__PURE__ */ new Set([
2259
2154
  "aan",
2260
2155
  "als",
2261
2156
  "ben",
@@ -2368,13 +2263,13 @@ const ca = "sync-source", ua = "sync-target", da = 20, mn = {
2368
2263
  "you",
2369
2264
  "your"
2370
2265
  ]);
2371
- function _n(e) {
2266
+ function nn(e) {
2372
2267
  const t = /* @__PURE__ */ new Set();
2373
2268
  for (const n of e.toLowerCase().split(/[^a-z0-9À-ɏ]+/))
2374
- n.length < En || Sn.has(n) || t.add(n);
2269
+ n.length < en || tn.has(n) || t.add(n);
2375
2270
  return [...t];
2376
2271
  }
2377
- function Tn(e, t) {
2272
+ function rn(e, t) {
2378
2273
  if (!e.length) return 0;
2379
2274
  if (!t.length) return 1;
2380
2275
  const n = new Set(t), r = new Set(e);
@@ -2382,313 +2277,555 @@ function Tn(e, t) {
2382
2277
  for (const a of r) n.has(a) || (i += 1);
2383
2278
  return i / r.size;
2384
2279
  }
2385
- function In(e, t = hn) {
2280
+ function an(e, t = qt) {
2386
2281
  const n = e.filter((o) => !o.partial && typeof o.text == "string");
2387
2282
  if (!n.length) return { text: "", segmentCount: 0 };
2388
2283
  const i = n.reduce((o, s) => Math.max(o, s.endedAt ?? 0), 0) - t;
2389
- return { text: n.filter((o) => (o.endedAt ?? 0) >= i).map((o) => gn(o.text).trim()).filter(Boolean).join(" ").replace(/\s+/g, " ").trim(), segmentCount: n.length };
2284
+ return { text: n.filter((o) => (o.endedAt ?? 0) >= i).map((o) => Yt(o.text).trim()).filter(Boolean).join(" ").replace(/\s+/g, " ").trim(), segmentCount: n.length };
2390
2285
  }
2391
- const Mn = 60;
2392
- function pa(e, t, n = Mn) {
2286
+ const on = 60;
2287
+ function la(e, t, n = on) {
2393
2288
  const r = new Set(e), i = [...e];
2394
2289
  for (const a of t)
2395
2290
  !a || r.has(a) || (r.add(a), i.push(a));
2396
2291
  return i.slice(-n);
2397
2292
  }
2398
- function fa(e) {
2293
+ function ua(e) {
2399
2294
  const { segments: t, now: n, state: r } = e;
2400
- if (r.lastTriggerAt && n - r.lastTriggerAt < yn)
2295
+ if (r.lastTriggerAt && n - r.lastTriggerAt < Jt)
2401
2296
  return { trigger: !1, reason: "too_soon" };
2402
- const i = In(t, e.windowMs);
2297
+ const i = an(t, e.windowMs);
2403
2298
  if (!i.text) return { trigger: !1, reason: "no_speech" };
2404
2299
  const a = i.segmentCount - (r.lastSegmentCount ?? 0);
2405
- if (r.lastQueryTerms && a < An)
2300
+ if (r.lastQueryTerms && a < Zt)
2406
2301
  return { trigger: !1, reason: "too_few_new" };
2407
- const o = _n(i.text);
2408
- return o.length ? r.lastQueryTerms?.length && Tn(o, r.lastQueryTerms) < bn ? { trigger: !1, reason: "same_topic" } : { trigger: !0, text: i.text, terms: o, segmentCount: i.segmentCount } : { trigger: !1, reason: "no_speech" };
2302
+ const o = nn(i.text);
2303
+ return o.length ? r.lastQueryTerms?.length && rn(o, r.lastQueryTerms) < Qt ? { trigger: !1, reason: "same_topic" } : { trigger: !0, text: i.text, terms: o, segmentCount: i.segmentCount } : { trigger: !1, reason: "no_speech" };
2409
2304
  }
2410
- const Me = 9e4, Cn = ["out_of_office"], Ce = (e) => Cn.includes(e);
2411
- function ma(e, t, n) {
2412
- const r = n - e < Me, i = t?.status && (!t.expiresAt || t.expiresAt > n) ? t : void 0;
2413
- if (!i?.status) return { online: r, status: r ? "available" : "offline" };
2414
- const a = i.status;
2415
- return !r && !Ce(a) ? { online: !1, status: "offline" } : { online: r, status: a, message: i.message };
2305
+ const x = {
2306
+ // The lower bounds are deliberately generous: service ranges (0800/0900) are
2307
+ // shorter than geographic numbers, and a too-strict minimum silently drops them.
2308
+ // An over-permissive key is harmless — it simply matches nothing.
2309
+ NL: { callingCode: "31", trunkPrefix: "0", nsnMin: 7, nsnMax: 9 },
2310
+ BE: { callingCode: "32", trunkPrefix: "0", nsnMin: 8, nsnMax: 9 },
2311
+ LU: { callingCode: "352", nsnMin: 6, nsnMax: 9 },
2312
+ DE: { callingCode: "49", trunkPrefix: "0", nsnMin: 6, nsnMax: 13 },
2313
+ FR: { callingCode: "33", trunkPrefix: "0", nsnMin: 9, nsnMax: 9 },
2314
+ GB: { callingCode: "44", trunkPrefix: "0", nsnMin: 9, nsnMax: 10 },
2315
+ IE: { callingCode: "353", trunkPrefix: "0", nsnMin: 7, nsnMax: 9 },
2316
+ ES: { callingCode: "34", nsnMin: 9, nsnMax: 9 },
2317
+ PT: { callingCode: "351", nsnMin: 9, nsnMax: 9 },
2318
+ IT: { callingCode: "39", nsnMin: 6, nsnMax: 11 },
2319
+ AT: { callingCode: "43", trunkPrefix: "0", nsnMin: 7, nsnMax: 13 },
2320
+ CH: { callingCode: "41", trunkPrefix: "0", nsnMin: 9, nsnMax: 9 },
2321
+ DK: { callingCode: "45", nsnMin: 8, nsnMax: 8 },
2322
+ SE: { callingCode: "46", trunkPrefix: "0", nsnMin: 7, nsnMax: 13 },
2323
+ NO: { callingCode: "47", nsnMin: 8, nsnMax: 8 },
2324
+ FI: { callingCode: "358", trunkPrefix: "0", nsnMin: 5, nsnMax: 12 },
2325
+ PL: { callingCode: "48", nsnMin: 9, nsnMax: 9 },
2326
+ US: { callingCode: "1", nsnMin: 10, nsnMax: 10 },
2327
+ CA: { callingCode: "1", nsnMin: 10, nsnMax: 10 }
2328
+ }, sn = "NL", cn = 15, ln = 8, un = Array.from(
2329
+ new Set(Object.values(x).map((e) => e.callingCode))
2330
+ ).sort((e, t) => t.length - e.length);
2331
+ function J(e) {
2332
+ if (e)
2333
+ return x[e.trim().toUpperCase()];
2416
2334
  }
2417
- function ga(e, t) {
2418
- const n = t - e.lastSeenAt < Me, r = n || Ce(e.status) ? e.status : "offline";
2419
- return n === e.online && r === e.status ? e : { ...e, online: n, status: r };
2335
+ function E(e, t) {
2336
+ return e.length >= t.nsnMin && e.length <= t.nsnMax;
2420
2337
  }
2421
- function ha(e, t) {
2422
- 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 };
2338
+ function Z(e) {
2339
+ if (e.length > cn) return null;
2340
+ for (const t of un) {
2341
+ if (!e.startsWith(t)) continue;
2342
+ const n = e.slice(t.length);
2343
+ for (const r of Object.values(x)) {
2344
+ if (r.callingCode !== t) continue;
2345
+ const i = r.trunkPrefix, a = i && n.startsWith(i) ? n.slice(i.length) : n;
2346
+ if (E(a, r)) return `+${t}${a}`;
2347
+ }
2348
+ return null;
2349
+ }
2350
+ return e.length < ln ? null : `+${e}`;
2351
+ }
2352
+ function dn(e) {
2353
+ let t = e.trim();
2354
+ const n = t.match(/^(sips?|tel|whatsapp):/i);
2355
+ n && (t = t.slice(n[0].length));
2356
+ const r = t.indexOf("@");
2357
+ return r >= 0 && (t = t.slice(0, r)), t.trim();
2358
+ }
2359
+ function da(e) {
2360
+ if (!e) return !1;
2361
+ const t = e.indexOf("@");
2362
+ if (t <= 0) return !1;
2363
+ const n = e.slice(0, t).trim();
2364
+ return !/^[+\d\s().-]+$/.test(n);
2365
+ }
2366
+ function Q(e, t) {
2367
+ if (!e) return null;
2368
+ const n = dn(e);
2369
+ if (!n) return null;
2370
+ const r = n.startsWith("+"), i = n.replace(/\D/g, "");
2371
+ if (!i) return null;
2372
+ if (r) return Z(i);
2373
+ if (i.startsWith("00")) return Z(i.slice(2));
2374
+ const a = J(t) ?? J(sn);
2375
+ if (!a) return null;
2376
+ const o = a.trunkPrefix;
2377
+ if (o && i.startsWith(o)) {
2378
+ const s = i.slice(o.length);
2379
+ return E(s, a) ? `+${a.callingCode}${s}` : null;
2380
+ }
2381
+ if (i.startsWith(a.callingCode)) {
2382
+ const s = i.slice(a.callingCode.length);
2383
+ if (E(s, a)) return `+${a.callingCode}${s}`;
2384
+ }
2385
+ return !o && E(i, a) ? `+${a.callingCode}${i}` : null;
2386
+ }
2387
+ function pa(e, t = 9) {
2388
+ const n = (e ?? "").replace(/\D/g, "");
2389
+ return n.length < t ? null : n.slice(-t);
2390
+ }
2391
+ function _e(e) {
2392
+ if (!e) return null;
2393
+ const t = e.trim().toLowerCase(), n = t.lastIndexOf("@");
2394
+ if (n <= 0 || n === t.length - 1) return null;
2395
+ const r = t.slice(0, n).split("+")[0], i = t.slice(n + 1);
2396
+ return !r || !i.includes(".") ? null : `${r}@${i}`;
2397
+ }
2398
+ function fa(e) {
2399
+ const t = _e(e);
2400
+ return t ? t.slice(t.lastIndexOf("@") + 1) : null;
2401
+ }
2402
+ const pn = /* @__PURE__ */ new Set([
2403
+ "co.uk",
2404
+ "org.uk",
2405
+ "gov.uk",
2406
+ "ac.uk",
2407
+ "com.au",
2408
+ "co.nz",
2409
+ "com.br",
2410
+ "co.za"
2411
+ ]);
2412
+ function fn(e) {
2413
+ if (!e) return null;
2414
+ const t = e.trim().toLowerCase().replace(/\.$/, "").split(".").filter(Boolean);
2415
+ if (t.length < 2) return null;
2416
+ const n = t.slice(-2).join(".");
2417
+ return pn.has(n) && t.length >= 3 ? t.slice(-3).join(".") : n;
2418
+ }
2419
+ const mn = /* @__PURE__ */ new Set([
2420
+ "gmail.com",
2421
+ "googlemail.com",
2422
+ "outlook.com",
2423
+ "hotmail.com",
2424
+ "hotmail.nl",
2425
+ "hotmail.be",
2426
+ "hotmail.co.uk",
2427
+ "live.com",
2428
+ "live.nl",
2429
+ "live.be",
2430
+ "msn.com",
2431
+ "yahoo.com",
2432
+ "yahoo.co.uk",
2433
+ "ymail.com",
2434
+ "icloud.com",
2435
+ "me.com",
2436
+ "mac.com",
2437
+ "aol.com",
2438
+ "gmx.net",
2439
+ "gmx.de",
2440
+ "web.de",
2441
+ "protonmail.com",
2442
+ "proton.me",
2443
+ "pm.me",
2444
+ "tutanota.com",
2445
+ "zoho.com",
2446
+ "mail.com",
2447
+ "ziggo.nl",
2448
+ "kpnmail.nl",
2449
+ "planet.nl",
2450
+ "home.nl",
2451
+ "casema.nl",
2452
+ "chello.nl",
2453
+ "xs4all.nl",
2454
+ "telfort.nl",
2455
+ "hetnet.nl",
2456
+ "zonnet.nl",
2457
+ "upcmail.nl",
2458
+ "quicknet.nl",
2459
+ "telenet.be",
2460
+ "skynet.be",
2461
+ "proximus.be",
2462
+ "scarlet.be"
2463
+ ]);
2464
+ function ma(e) {
2465
+ const t = fn(e);
2466
+ return t ? mn.has(t) : !1;
2467
+ }
2468
+ function ga(e) {
2469
+ if (!e) return !1;
2470
+ const t = e.trim().toLowerCase();
2471
+ return t === "tel" || t === "sms" || t === "whatsapp" || t === "fax";
2472
+ }
2473
+ function ha(e, t, n) {
2474
+ if (!e || !t) return null;
2475
+ const r = e.trim().toLowerCase();
2476
+ if (r === "tel" || r === "sms" || r === "whatsapp") {
2477
+ const a = Q(t, n);
2478
+ return a ? `tel:${a}` : null;
2479
+ }
2480
+ if (r === "fax") {
2481
+ const a = Q(t, n);
2482
+ return a ? `fax:${a}` : null;
2483
+ }
2484
+ if (r === "mailto" || r === "email") {
2485
+ const a = _e(t);
2486
+ return a ? `mailto:${a}` : null;
2487
+ }
2488
+ const i = t.trim().toLowerCase();
2489
+ return i ? `${r}:${i}` : null;
2423
2490
  }
2491
+ const gn = /(\*\*|__)(?=\S)([\s\S]*?\S)\1/g, hn = /(\*|_)(?=\S)([^*_\n]*?\S)\1/g;
2424
2492
  function ya(e) {
2425
- return e.providerAvailable && e.allowed;
2493
+ if (typeof e != "string" || !e) return "";
2494
+ let t = e;
2495
+ 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(`
2496
+ `).map(
2497
+ (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,}$/, "")
2498
+ ).join(`
2499
+ `), t = t.replace(gn, "$2"), t = t.replace(hn, "$2"), t = t.replace(/~~(?=\S)([\s\S]*?\S)~~/g, "$1"), t = t.replace(/`([^`\n]+)`/g, "$1"), t.replace(/\s+/g, " ").trim();
2500
+ }
2501
+ const yn = [
2502
+ /<blockquote/i,
2503
+ /class="?gmail_quote/i,
2504
+ // Gmail quote container
2505
+ /id="?[^"]*divRplyFwdMsg/i,
2506
+ // Outlook web reply/forward header
2507
+ /id="?[^"]*mail-editor-reference-message-container/i,
2508
+ // Outlook new/"mail editor" quote container
2509
+ /-{3,}\s*Original Message\s*-{3,}/i,
2510
+ /\n_{5,}\s*\n/,
2511
+ // Outlook underscore separator before "From:"
2512
+ /\bOn\b[\s\S]{0,200}?\bwrote:/i
2513
+ // Gmail "On <date> <name> wrote:"
2514
+ ], ee = /^\s*(?:>+\s*)?(?:from|van|sent|verzonden|to|aan|cc|subject|onderwerp|date|datum)\s*:/i, An = /^\s*(?:on|op)\b.{0,200}?\b(?:wrote|schreef|geschreven)\s*:?\s*$/i;
2515
+ function bn(e) {
2516
+ const t = e.split(`
2517
+ `);
2518
+ for (let n = 0; n < t.length; n++)
2519
+ if (An.test(t[n]) || ee.test(t[n]) && t.slice(n + 1, n + 4).some((r) => ee.test(r)))
2520
+ return t.slice(0, n).join(`
2521
+ `).trim();
2522
+ return e;
2523
+ }
2524
+ function te(e) {
2525
+ let t = e;
2526
+ return t = t.replace(/<(script|style)[\s\S]*?<\/\1>/gi, ""), t = t.replace(/<br\s*\/?>/gi, `
2527
+ `), t = t.replace(/<\/(p|h[1-6]|ul|ol|table|blockquote)>/gi, `
2528
+
2529
+ `), t = t.replace(/<\/(div|li|tr)>/gi, `
2530
+ `), t = t.replace(/<\/(td|th)>/gi, " "), t = t.replace(/<[^>]+>/g, ""), t = t.replace(/<[^>]*$/, ""), t;
2531
+ }
2532
+ function ne(e) {
2533
+ return !Number.isInteger(e) || e < 0 || e > 1114111 ? null : String.fromCodePoint(e);
2534
+ }
2535
+ function re(e) {
2536
+ return e.replace(/&nbsp;/gi, " ").replace(/&lt;/gi, "<").replace(/&gt;/gi, ">").replace(/&quot;/gi, '"').replace(/&#(\d+);/g, (t, n) => ne(Number(n)) ?? t).replace(/&#x([0-9a-f]+);/gi, (t, n) => ne(parseInt(n, 16)) ?? t).replace(/&amp;/gi, "&");
2537
+ }
2538
+ function ie(e) {
2539
+ return e.replace(/\r/g, "").replace(/[ \t]+/g, " ").replace(/ *\n */g, `
2540
+ `).replace(/\n{3,}/g, `
2541
+
2542
+ `).trim();
2543
+ }
2544
+ function Aa(e) {
2545
+ if (typeof e != "string" || !e) return "";
2546
+ let t = e.length;
2547
+ for (const a of yn) {
2548
+ const o = e.search(a);
2549
+ o >= 0 && o < t && (t = o);
2550
+ }
2551
+ const n = e.slice(0, t);
2552
+ let r = ie(re(te(n)));
2553
+ return r || (r = ie(re(te(e)))), bn(r) || r;
2554
+ }
2555
+ const En = /(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|newsletter|nieuwsbrief|mailer|mailing|notifications?|bounce|postmaster|marketing)@/i, Sn = /\b(unsubscribe|afmelden|uitschrijven|opt[\s-]?out|manage (your )?preferences|geen (e-?mails?|nieuwsbrief|berichten) meer)\b/i;
2556
+ function ba(e, t) {
2557
+ return !!(e && En.test(e) || t && Sn.test(t));
2558
+ }
2559
+ const _n = 3, Tn = 600;
2560
+ function Ea(e, t) {
2561
+ return e >= _n || t >= Tn;
2426
2562
  }
2427
- const Aa = "installation-id";
2428
2563
  export {
2429
2564
  m as ACTIVITY_CATALOG,
2430
- Qt as AI_ATTACHMENT_LIMITS,
2431
- Di as AI_ATTACHMENT_MAX_PER_TURN,
2432
- Li as AI_ATTACHMENT_TURN_BUDGET,
2433
- be as AI_VENDORS,
2434
- Fe as ALLOWED_LINK_SCHEMES,
2435
- B as ARTIFACT_MAX_BLOCKS,
2436
- Yn as ARTIFACT_MAX_BODY_BYTES,
2437
- N as ARTIFACT_MAX_CELL_LEN,
2438
- W as ARTIFACT_MAX_KPI_ITEMS,
2439
- F as ARTIFACT_MAX_LIST_ITEMS,
2440
- H as ARTIFACT_MAX_TABLE_COLUMNS,
2441
- V as ARTIFACT_MAX_TABLE_ROWS,
2442
- de as ARTIFACT_MAX_TEXT_LEN,
2443
- Ze as ASSIGNMENT_SCOPE_KIND,
2444
- Te as AUTH_APP_NAME,
2445
- $e as ActivityTypeRegistry,
2565
+ $t as AI_ATTACHMENT_LIMITS,
2566
+ ki as AI_ATTACHMENT_MAX_PER_TURN,
2567
+ Mi as AI_ATTACHMENT_TURN_BUDGET,
2568
+ oe as AI_VENDORS,
2569
+ je as ALLOWED_LINK_SCHEMES,
2570
+ zi as APP_PERMISSIONS,
2571
+ U as ARTIFACT_MAX_BLOCKS,
2572
+ ir as ARTIFACT_MAX_BODY_BYTES,
2573
+ M as ARTIFACT_MAX_CELL_LEN,
2574
+ F as ARTIFACT_MAX_KPI_ITEMS,
2575
+ j as ARTIFACT_MAX_LIST_ITEMS,
2576
+ B as ARTIFACT_MAX_TABLE_COLUMNS,
2577
+ G as ARTIFACT_MAX_TABLE_ROWS,
2578
+ ce as ARTIFACT_MAX_TEXT_LEN,
2579
+ Ye as ASSIGNMENT_SCOPE_KIND,
2580
+ Ee as AUTH_APP_NAME,
2581
+ Ne as ActivityTypeRegistry,
2446
2582
  Gn as BUILT_IN_ONLY,
2447
- yn as CADENCE_FLOOR_MS,
2448
- An as CADENCE_MIN_NEW_SEGMENTS,
2449
- bn as CADENCE_MIN_NOVELTY,
2450
- hn as CADENCE_WINDOW_MS,
2451
- dr as CLASSIFY_VARS,
2452
- Hn as CORE_DIMENSIONS,
2453
- on as CommunicationScheme,
2454
- ai as DEFAULT_MEMORY_BUDGET,
2455
- $t as DEFAULT_PHONE_REGION,
2456
- Er as EMPTY_WORKFLOW,
2457
- Zi as FEATURE_FOLDER_MANAGEMENT,
2458
- Qi as FEATURE_REMOTE_SEARCH,
2459
- Aa as INSTALLATION_HEADER,
2460
- ot as INTERACTION_KIND,
2461
- qi as InteractionParticipantRole,
2462
- mt as KB_FALLBACK_LOCALE,
2463
- Z as KB_LOCALES,
2464
- $ as LOOSE_STATUSES,
2465
- M as MAX_ACTIONS,
2466
- Qe as MAX_ASSIGNMENT_TURNS,
2467
- L as MAX_BLOCKS,
2468
- ye as MAX_COLLECTION_DEPTH,
2469
- T as MAX_FIELDS,
2470
- I as MAX_LIST_ITEMS,
2471
- ti as MAX_MEMORY_BROWSE,
2472
- ii as MAX_MEMORY_BUDGET,
2473
- ni as MAX_MEMORY_CHARS,
2474
- Mn as MAX_SHOWN_KEYS,
2475
- yt as MAX_TOPIC_CANDIDATES,
2476
- ht as MAX_TOPIC_EXAMPLES,
2477
- v as MAX_TOPIC_EXAMPLE_CHARS,
2478
- ri as MIN_MEMORY_BUDGET,
2479
- R as PHONE_REGIONS,
2480
- Me as PRESENCE_ONLINE_WINDOW_MS,
2481
- Cn as PRESENCE_SURVIVES_OFFLINE,
2482
- Yi as PROVIDER_FEATURE_MESSAGE_TEMPLATES,
2483
- Xi as PROVIDER_FEATURE_MESSAGE_WINDOW,
2484
- jt as PUBLIC_EMAIL_DOMAINS,
2485
- q as READ_STEP_TYPES,
2486
- Tt as RELATED_SUBJECT_KINDS,
2487
- Se as RESERVED_STATUS_KEYS,
2488
- ta as RESOURCE_DESCRIBE_SERVICE,
2489
- ra as RESOURCE_RESOLVE_SERVICE,
2490
- na as RESOURCE_SEARCH_SERVICE,
2491
- zr as SIGNATURE_INTENTS,
2492
- ct as STEP_MAX_TOKENS_MAX,
2493
- lt as STEP_MAX_TOKENS_MIN,
2494
- Yt as SUMMARY_MIN_LAST_CHARS,
2495
- Xt as SUMMARY_MIN_MESSAGES,
2496
- da as SYNC_RUN_MAX_ERRORS,
2497
- ca as SYNC_SOURCE_PROVIDER_GROUP,
2498
- ua as SYNC_TARGET_PROVIDER_GROUP,
2499
- Je as TERMINAL_ASSIGNMENT_STATUSES,
2500
- ut as TERMINAL_RUN_STATUSES,
2501
- ur as TRIGGER_VARS,
2502
- ea as UNSUPPORTED,
2503
- Ue as USAGE_DIMENSIONS,
2504
- je as USAGE_DIMENSION_IDS,
2505
- Ct as WORK_ITEM_SCOPE_KIND,
2506
- kt as WORK_PROJECT_SCOPE_KIND,
2507
- Lr as acceptExampleCandidate,
2508
- nt as actingIdentityKey,
2509
- fi as activeWorkTypes,
2583
+ Jt as CADENCE_FLOOR_MS,
2584
+ Zt as CADENCE_MIN_NEW_SEGMENTS,
2585
+ Qt as CADENCE_MIN_NOVELTY,
2586
+ qt as CADENCE_WINDOW_MS,
2587
+ qr as CLASSIFY_VARS,
2588
+ tr as CORE_DIMENSIONS,
2589
+ Ut as CommunicationScheme,
2590
+ Ur as DEFAULT_MEMORY_BUDGET,
2591
+ sn as DEFAULT_PHONE_REGION,
2592
+ Zr as EMPTY_WORKFLOW,
2593
+ Fi as FEATURE_FOLDER_MANAGEMENT,
2594
+ Vi as FEATURE_REMOTE_SEARCH,
2595
+ Wi as INSTALLATION_HEADER,
2596
+ ut as INTERACTION_KIND,
2597
+ Gi as InteractionParticipantRole,
2598
+ et as KB_FALLBACK_LOCALE,
2599
+ z as KB_LOCALES,
2600
+ N as LOOSE_STATUSES,
2601
+ kn as MAX_ACTIONS,
2602
+ qe as MAX_ASSIGNMENT_TURNS,
2603
+ In as MAX_BLOCKS,
2604
+ fe as MAX_COLLECTION_DEPTH,
2605
+ wn as MAX_FIELDS,
2606
+ Mn as MAX_LIST_ITEMS,
2607
+ Lr as MAX_MEMORY_BROWSE,
2608
+ Kr as MAX_MEMORY_BUDGET,
2609
+ Dr as MAX_MEMORY_CHARS,
2610
+ on as MAX_SHOWN_KEYS,
2611
+ bt as MAX_TOPIC_CANDIDATES,
2612
+ At as MAX_TOPIC_EXAMPLES,
2613
+ k as MAX_TOPIC_EXAMPLE_CHARS,
2614
+ Pr as MIN_MEMORY_BUDGET,
2615
+ x as PHONE_REGIONS,
2616
+ Ae as PRESENCE_ONLINE_WINDOW_MS,
2617
+ Gt as PRESENCE_SURVIVES_OFFLINE,
2618
+ ji as PROVIDER_FEATURE_MESSAGE_TEMPLATES,
2619
+ Ui as PROVIDER_FEATURE_MESSAGE_WINDOW,
2620
+ mn as PUBLIC_EMAIL_DOMAINS,
2621
+ X as READ_STEP_TYPES,
2622
+ rt as RELATED_SUBJECT_KINDS,
2623
+ ye as RESERVED_STATUS_KEYS,
2624
+ Zi as RESOURCE_DESCRIBE_SERVICE,
2625
+ ea as RESOURCE_RESOLVE_SERVICE,
2626
+ Qi as RESOURCE_SEARCH_SERVICE,
2627
+ yr as SIGNATURE_INTENTS,
2628
+ ft as STEP_MAX_TOKENS_MAX,
2629
+ pt as STEP_MAX_TOKENS_MIN,
2630
+ Tn as SUMMARY_MIN_LAST_CHARS,
2631
+ _n as SUMMARY_MIN_MESSAGES,
2632
+ ca as SYNC_RUN_MAX_ERRORS,
2633
+ oa as SYNC_SOURCE_PROVIDER_GROUP,
2634
+ sa as SYNC_TARGET_PROVIDER_GROUP,
2635
+ Xe as TERMINAL_ASSIGNMENT_STATUSES,
2636
+ mt as TERMINAL_RUN_STATUSES,
2637
+ Yr as TRIGGER_VARS,
2638
+ Hi as UNSUPPORTED,
2639
+ De as USAGE_DIMENSIONS,
2640
+ Pe as USAGE_DIMENSION_IDS,
2641
+ Tt as WORK_ITEM_SCOPE_KIND,
2642
+ It as WORK_PROJECT_SCOPE_KIND,
2643
+ fi as acceptExampleCandidate,
2644
+ at as actingIdentityKey,
2645
+ di as activeWorkTypes,
2510
2646
  vn as activityIconOf,
2511
- jn as activityJoinUrl,
2512
- ve as activitySnippet,
2513
- xe as activityTextParams,
2514
- Un as activityTimelineText,
2515
- Vn as activityTimestamp,
2647
+ Un as activityJoinUrl,
2648
+ Me as activitySnippet,
2649
+ ke as activityTextParams,
2650
+ Kn as activityTimelineText,
2651
+ Fn as activityTimestamp,
2516
2652
  d as activityTypeInfo,
2517
- mr as actorKey,
2518
- Rr as addExampleCandidate,
2519
- ga as agePresenceEntry,
2520
- Zt as aiAttachmentKind,
2521
- Pi as aiAttachmentRejection,
2522
- ee as aiBudgetLimit,
2523
- Fr as aiBudgetPeriodKey,
2524
- St as aiBudgetPeriodStart,
2525
- Br as aiBudgetState,
2526
- Gr as aiVendorAcceptsAttachment,
2527
- Kr as aiVendorDefaultModel,
2528
- Pr as aiVendorLabel,
2529
- jr as aiVendorNeedsBaseUrl,
2530
- Ur as aiVendorsWith,
2531
- Ie as appNameFromPath,
2532
- li as applyRounding,
2533
- Xr as applySignature,
2534
- Jn as artifactBodyBytes,
2535
- Zn as artifactOutline,
2536
- Qn as artifactToMarkdown,
2537
- Ar as assignmentMismatch,
2538
- ir as assignmentScopeKey,
2539
- or as assignmentSubject,
2540
- Bn as buildActivityPreview,
2541
- Fi as buildChannelIntents,
2542
- er as buildShareKeys,
2543
- In as buildWindow,
2544
- xr as canNestUnder,
2545
- Rn as carriesText,
2546
- $r as categoryLabel,
2547
- vt as categoryOf,
2548
- zi as channelKindForScheme,
2549
- xn as channelKindOf,
2550
- br as clampStepMaxTokens,
2551
- Oi as cleanMessageText,
2552
- Mt as compareWorkTypes,
2553
- sr as decideAssignmentState,
2554
- fa as decideCadence,
2555
- Gi as decideIncomingCall,
2556
- gt as defaultLocaleOf,
2557
- Si as defaultStatusKey,
2558
- Ji as defineIntent,
2559
- pt as depthOf,
2560
- ma as derivePresence,
2561
- Bi as disabledIntentsFromCapabilities,
2562
- si as elapsedSeconds,
2563
- ki as emailDomain,
2564
- vi as endpointKey,
2565
- un as extractParams,
2566
- _n as extractTerms,
2567
- Hi as filterByEndpoint,
2568
- Vi as filterByIntent,
2569
- an as filterByTargetScheme,
2653
+ Fr as actorKey,
2654
+ pi as addExampleCandidate,
2655
+ Yi as agePresenceEntry,
2656
+ Ot as aiAttachmentKind,
2657
+ Ci as aiAttachmentRejection,
2658
+ K as aiBudgetLimit,
2659
+ Zn as aiBudgetPeriodKey,
2660
+ xe as aiBudgetPeriodStart,
2661
+ Jn as aiBudgetState,
2662
+ qn as aiVendorAcceptsAttachment,
2663
+ zn as aiVendorDefaultModel,
2664
+ Wn as aiVendorLabel,
2665
+ Yn as aiVendorNeedsBaseUrl,
2666
+ Xn as aiVendorsWith,
2667
+ Se as appNameFromPath,
2668
+ oi as applyRounding,
2669
+ Ar as applySignature,
2670
+ or as artifactBodyBytes,
2671
+ sr as artifactOutline,
2672
+ cr as artifactToMarkdown,
2673
+ zr as assignmentMismatch,
2674
+ fr as assignmentScopeKey,
2675
+ gr as assignmentSubject,
2676
+ jn as buildActivityPreview,
2677
+ Ri as buildChannelIntents,
2678
+ lr as buildShareKeys,
2679
+ an as buildWindow,
2680
+ vr as canNestUnder,
2681
+ $n as carriesText,
2682
+ xr as categoryLabel,
2683
+ kt as categoryOf,
2684
+ Ki as channelKindForScheme,
2685
+ Nn as channelKindOf,
2686
+ Jr as clampStepMaxTokens,
2687
+ Aa as cleanMessageText,
2688
+ yt as compareWorkTypes,
2689
+ hr as decideAssignmentState,
2690
+ ua as decideCadence,
2691
+ Oi as decideIncomingCall,
2692
+ tt as defaultLocaleOf,
2693
+ _i as defaultStatusKey,
2694
+ Bi as defineIntent,
2695
+ Ze as depthOf,
2696
+ Xi as derivePresence,
2697
+ $i as disabledIntentsFromCapabilities,
2698
+ ai as elapsedSeconds,
2699
+ fa as emailDomain,
2700
+ ha as endpointKey,
2701
+ Vt as extractParams,
2702
+ nn as extractTerms,
2703
+ Di as filterByEndpoint,
2704
+ Li as filterByIntent,
2705
+ Kt as filterByTargetScheme,
2570
2706
  S as findAiVendor,
2571
- Wn as flattenLocales,
2572
- De as floorToPeriod,
2573
- tt as formatActingIdentity,
2574
- ui as formatClock,
2575
- ci as formatHm,
2576
- gi as formatItemKey,
2577
- Le as formatPeriod,
2578
- Ki as freshSources,
2579
- Fn as getActivitySeenUserIds,
2580
- Yr as getContactEndpoints,
2581
- Qr as getShortTitle,
2582
- Zr as getUrgencyScore,
2583
- Ae as heightOf,
2584
- wr as helpCenterText,
2585
- cr as humanizeAction,
2586
- st as interactionIdOf,
2587
- mi as isAgentUser,
2588
- qr as isAssigned,
2589
- rr as isAssignmentTerminal,
2590
- it as isAssignmentTrigger,
2591
- wn as isChatMessageActivity,
2592
- Jr as isClosed,
2593
- Pn as isConnectedType,
2594
- aa as isDeepLink,
2595
- ft as isDescendant,
2596
- kn as isEmailActivity,
2597
- Ir as isInFlight,
2598
- ei as isInteractionUnseen,
2599
- oa as isLandingPath,
2600
- $i as isLikelyBulk,
2601
- ce as isMessageShape,
2602
- On as isMessageType,
2603
- pn as isMoreSpecificPattern,
2604
- dt as isPaused,
2605
- Dn as isPlaybookAuthoredType,
2606
- wi as isPublicEmailDomain,
2607
- la as isPublicPath,
2608
- $n as isReplyableType,
2609
- Tr as isTerminal,
2610
- Ri as isThreadLongEnough,
2611
- Kn as isTranscriptType,
2612
- _i as isWorkClosed,
2613
- pi as isWorkTypeVisible,
2614
- Ai as itemDossierKeys,
2615
- Nt as ladderFor,
2616
- kr as linkLabel,
2617
- Vr as listeningAllowed,
2618
- vr as localeInstruction,
2619
- Nr as localeName,
2620
- Or as localesOf,
2621
- Mi as looksLikeEmail,
2622
- Wi as matchContactToIntents,
2623
- fn as matchPublicRoute,
2624
- Hr as mcpCredentialScope,
2625
- Wr as mcpToolPrefix,
2626
- pa as mergeShownKeys,
2627
- Ln as messageCountsAs,
2628
- Ni as needsPhoneRegion,
2629
- qn as normalizeArtifactBlocks,
2630
- Nn as normalizeBlocks,
2707
+ er as flattenLocales,
2708
+ $e as floorToPeriod,
2709
+ it as formatActingIdentity,
2710
+ ci as formatClock,
2711
+ si as formatHm,
2712
+ hi as formatItemKey,
2713
+ Oe as formatPeriod,
2714
+ vi as freshSources,
2715
+ Bn as getActivitySeenUserIds,
2716
+ br as getContactEndpoints,
2717
+ Tr as getShortTitle,
2718
+ _r as getUrgencyScore,
2719
+ me as heightOf,
2720
+ Mr as helpCenterText,
2721
+ Xr as humanizeAction,
2722
+ dt as interactionIdOf,
2723
+ gi as isAgentUser,
2724
+ Er as isAssigned,
2725
+ pr as isAssignmentTerminal,
2726
+ ct as isAssignmentTrigger,
2727
+ Hn as isChatMessageActivity,
2728
+ Sr as isClosed,
2729
+ Dn as isConnectedType,
2730
+ na as isDeepLink,
2731
+ Qe as isDescendant,
2732
+ Vn as isEmailActivity,
2733
+ ni as isInFlight,
2734
+ Ir as isInteractionUnseen,
2735
+ ra as isLandingPath,
2736
+ ba as isLikelyBulk,
2737
+ ae as isMessageShape,
2738
+ xn as isMessageType,
2739
+ Wt as isMoreSpecificPattern,
2740
+ gt as isPaused,
2741
+ Ln as isPlaybookAuthoredType,
2742
+ ma as isPublicEmailDomain,
2743
+ aa as isPublicPath,
2744
+ On as isReplyableType,
2745
+ ti as isTerminal,
2746
+ Ea as isThreadLongEnough,
2747
+ Pn as isTranscriptType,
2748
+ Ti as isWorkClosed,
2749
+ ui as isWorkTypeVisible,
2750
+ bi as itemDossierKeys,
2751
+ Mt as ladderFor,
2752
+ wr as linkLabel,
2753
+ Qn as listeningAllowed,
2754
+ Cr as localeInstruction,
2755
+ kr as localeName,
2756
+ Nr as localesOf,
2757
+ da as looksLikeEmail,
2758
+ Pi as matchContactToIntents,
2759
+ zt as matchPublicRoute,
2760
+ $r as mcpCredentialScope,
2761
+ Rr as mcpToolPrefix,
2762
+ la as mergeShownKeys,
2763
+ Rn as messageCountsAs,
2764
+ ga as needsPhoneRegion,
2765
+ ar as normalizeArtifactBlocks,
2766
+ Cn as normalizeBlocks,
2631
2767
  _e as normalizeEmail,
2632
2768
  g as normalizeExample,
2633
- Tn as novelty,
2634
- pr as parseActingIdentity,
2635
- hi as parseItemKey,
2636
- cn as pathToRegex,
2637
- zn as periodsInRange,
2638
- Ci as phoneSuffix,
2639
- xi as plainTextFromMarkdown,
2640
- rt as playbookActor,
2641
- _r as procedureOf,
2642
- bi as projectDossierKeys,
2643
- dn as publicBasePathFor,
2644
- sa as publicRoutePatterns,
2645
- x as readPath,
2646
- J as readStepError,
2647
- at as refKey,
2648
- Ut as registrableDomain,
2649
- bt as rejectExampleCandidate,
2650
- oi as relatedByDefault,
2651
- nn as resolveAccountCapabilities,
2652
- O as resolveActivityText,
2653
- tn as resolveChannelIntents,
2654
- _t as resolveSignature,
2655
- ha as resolveWorkMode,
2656
- ia as resourceKindOf,
2657
- fr as runActor,
2658
- Cr as runInteractionId,
2659
- ze as sanitizeInline,
2660
- gn as sanitizeTranscript,
2661
- lr as selectLenses,
2662
- ji as sessionsHoldCannotReach,
2663
- Ui as sessionsToHold,
2664
- me as shareKeyForTeam,
2665
- fe as shareKeyForUser,
2666
- tr as shareKeysForViewer,
2667
- ya as shouldRunAudioPipeline,
2668
- xt as sortStatuses,
2669
- en as sourceKey,
2670
- Ei as statusIn,
2671
- Sr as stepsOf,
2672
- Ne as stripHtml,
2673
- Mr as subjectKeyOf,
2769
+ rn as novelty,
2770
+ Gr as parseActingIdentity,
2771
+ yi as parseItemKey,
2772
+ Ft as pathToRegex,
2773
+ nr as periodsInRange,
2774
+ pa as phoneSuffix,
2775
+ ya as plainTextFromMarkdown,
2776
+ st as playbookActor,
2777
+ ei as procedureOf,
2778
+ Ei as projectDossierKeys,
2779
+ Ht as publicBasePathFor,
2780
+ ia as publicRoutePatterns,
2781
+ C as readPath,
2782
+ Y as readStepError,
2783
+ lt as refKey,
2784
+ fn as registrableDomain,
2785
+ St as rejectExampleCandidate,
2786
+ jr as relatedByDefault,
2787
+ Dt as resolveAccountCapabilities,
2788
+ v as resolveActivityText,
2789
+ Lt as resolveChannelIntents,
2790
+ Je as resolveSignature,
2791
+ qi as resolveWorkMode,
2792
+ ta as resourceKindOf,
2793
+ Br as runActor,
2794
+ ii as runInteractionId,
2795
+ Ve as sanitizeInline,
2796
+ Yt as sanitizeTranscript,
2797
+ Or as selectLenses,
2798
+ xi as sessionsHoldCannotReach,
2799
+ Ni as sessionsToHold,
2800
+ de as shareKeyForTeam,
2801
+ ue as shareKeyForUser,
2802
+ ur as shareKeysForViewer,
2803
+ Ji as shouldRunAudioPipeline,
2804
+ Ct as sortStatuses,
2805
+ Rt as sourceKey,
2806
+ Si as statusIn,
2807
+ Qr as stepsOf,
2808
+ we as stripHtml,
2809
+ ri as subjectKeyOf,
2674
2810
  ge as subjectOf,
2675
- yi as suggestProjectKey,
2676
- yr as targetById,
2677
- hr as targetForActivityType,
2678
- re as toE164,
2679
- nr as toolSourceKinds,
2680
- Et as topicOfferedForTeam,
2681
- Dr as topicsForTeam,
2682
- At as truncateExample,
2683
- Ti as uniqueWorkStatusKey,
2684
- di as uniqueWorkTypeKey,
2685
- Ge as usageMetricId,
2686
- Xn as usageMetrics,
2687
- Ii as validateStatuses,
2688
- gr as valueAtPath,
2689
- ar as wakesAssignment,
2811
+ Ai as suggestProjectKey,
2812
+ Wr as targetById,
2813
+ Hr as targetForActivityType,
2814
+ ot as toActingIdentity,
2815
+ Q as toE164,
2816
+ dr as toolSourceKinds,
2817
+ _t as topicOfferedForTeam,
2818
+ mi as topicsForTeam,
2819
+ Et as truncateExample,
2820
+ Ii as uniqueWorkStatusKey,
2821
+ li as uniqueWorkTypeKey,
2822
+ Ke as usageMetricId,
2823
+ rr as usageMetrics,
2824
+ wi as validateStatuses,
2825
+ Vr as valueAtPath,
2826
+ mr as wakesAssignment,
2690
2827
  wt as workItemScopeKey,
2691
- Ee as workProjectScopeKey,
2692
- Ot as workStatusKey,
2693
- It as workTypeKey
2828
+ he as workProjectScopeKey,
2829
+ vt as workStatusKey,
2830
+ ht as workTypeKey
2694
2831
  };