@opencxh/domain 1.162.0 → 1.164.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ function Cn(e) {
4
4
  function wn(e) {
5
5
  return e.type === "CHAT_MESSAGE_SENT" || e.type === "CHAT_MESSAGE_RECEIVED";
6
6
  }
7
- const D = 10, _ = 10, I = 10, M = 5, we = /* @__PURE__ */ new Set([
7
+ const R = 10, T = 10, I = 10, M = 5, we = /* @__PURE__ */ new Set([
8
8
  "header",
9
9
  "section",
10
10
  "context",
@@ -25,8 +25,8 @@ function Nn(e, t = () => {
25
25
  if (!Array.isArray(e)) return [];
26
26
  const n = [];
27
27
  for (const r of e) {
28
- if (n.length >= D) {
29
- t("more than " + D + " blocks; the rest was dropped");
28
+ if (n.length >= R) {
29
+ t("more than " + R + " blocks; the rest was dropped");
30
30
  break;
31
31
  }
32
32
  if (!r || typeof r != "object") continue;
@@ -55,7 +55,7 @@ function Nn(e, t = () => {
55
55
  }
56
56
  break;
57
57
  case "section":
58
- Array.isArray(i.fields) && i.fields.length > _ && (t("more than " + _ + " fields in a section"), i.fields = i.fields.slice(0, _));
58
+ Array.isArray(i.fields) && i.fields.length > T && (t("more than " + T + " fields in a section"), i.fields = i.fields.slice(0, T));
59
59
  break;
60
60
  case "list":
61
61
  if (!Array.isArray(i.items) || i.items.length === 0) {
@@ -83,7 +83,7 @@ function A(e) {
83
83
  const t = Math.floor(e / 60), n = Math.floor(e % 60);
84
84
  return `${t}:${n.toString().padStart(2, "0")}`;
85
85
  }
86
- function R(e) {
86
+ function D(e) {
87
87
  return e ? ` — ${Math.floor(e / 60)}m ${e % 60}s` : "";
88
88
  }
89
89
  function C(e) {
@@ -92,7 +92,7 @@ function C(e) {
92
92
  function b(e) {
93
93
  return e.map((t) => t.name).join(", ");
94
94
  }
95
- function K(e) {
95
+ function P(e) {
96
96
  return e === "meeting" ? "Meeting" : e === "video" ? "Video call" : "Audio call";
97
97
  }
98
98
  const m = {
@@ -130,7 +130,7 @@ const m = {
130
130
  channelKind: "voice",
131
131
  icon: "phone",
132
132
  snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${A(e.payload.duration)})` : ""}`,
133
- timeline: (e) => `Call ended${R(e.payload.duration)}`
133
+ timeline: (e) => `Call ended${D(e.payload.duration)}`
134
134
  },
135
135
  VOICE_CALL_MISSED: {
136
136
  shape: "event",
@@ -212,7 +212,7 @@ const m = {
212
212
  replyable: !0,
213
213
  carriesText: !0,
214
214
  countsAs: "inbound_message",
215
- snippet: P
215
+ snippet: K
216
216
  },
217
217
  EMAIL_SENT: {
218
218
  shape: "message",
@@ -222,7 +222,7 @@ const m = {
222
222
  replyable: !0,
223
223
  carriesText: !0,
224
224
  countsAs: "outbound_message",
225
- snippet: P
225
+ snippet: K
226
226
  },
227
227
  /* ---- chat ---- */
228
228
  CHAT_MESSAGE_SENT: {
@@ -279,7 +279,7 @@ const m = {
279
279
  channelKind: "chat",
280
280
  icon: "message-circle",
281
281
  snippet: () => "Gesprek gestart",
282
- timeline: (e) => `${K(e.payload.callType)} started${e.payload.initiator ? ` by ${e.payload.initiator.name}` : ""}`,
282
+ timeline: (e) => `${P(e.payload.callType)} started${e.payload.initiator ? ` by ${e.payload.initiator.name}` : ""}`,
283
283
  joinUrl: (e) => e.payload.joinUrl
284
284
  },
285
285
  CHAT_CALL_ENDED: {
@@ -287,7 +287,7 @@ const m = {
287
287
  channelKind: "chat",
288
288
  icon: "message-circle",
289
289
  snippet: (e) => `Gesprek beëindigd${e.payload.duration ? ` (${A(e.payload.duration)})` : ""}`,
290
- timeline: (e) => `${K(e.payload.callType)} ended${R(e.payload.duration)}`,
290
+ timeline: (e) => `${P(e.payload.callType)} ended${D(e.payload.duration)}`,
291
291
  joinUrl: (e) => e.payload.joinUrl
292
292
  },
293
293
  CHAT_EVENT: {
@@ -413,7 +413,7 @@ const m = {
413
413
  timeline: (e, t) => `Assigned by ${t}`
414
414
  }
415
415
  };
416
- function P(e) {
416
+ function K(e) {
417
417
  const t = e.payload, n = t.bodySnippet?.trim() || Ne(t.body ?? "");
418
418
  return t.subject ? `${t.subject} — ${n}` : n;
419
419
  }
@@ -438,16 +438,16 @@ function $n(e) {
438
438
  function Ln(e) {
439
439
  return d(e)?.carriesText === !0;
440
440
  }
441
- function Dn(e) {
441
+ function Rn(e) {
442
442
  return d(e)?.countsAs;
443
443
  }
444
- function Rn(e) {
444
+ function Dn(e) {
445
445
  return d(e)?.playbookAuthored === !0;
446
446
  }
447
- function Kn(e) {
447
+ function Pn(e) {
448
448
  return d(e)?.connected === !0;
449
449
  }
450
- function Pn(e) {
450
+ function Kn(e) {
451
451
  const t = d(e);
452
452
  return t?.shape === "artifact" && t?.carriesText === !0;
453
453
  }
@@ -630,10 +630,10 @@ function Fn(e, t, n = []) {
630
630
  const i = new Set(n);
631
631
  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
632
  }
633
- function Hn(e) {
633
+ function Vn(e) {
634
634
  return e.createdAt ?? 0;
635
635
  }
636
- const Vn = [
636
+ const Hn = [
637
637
  { id: "agent", label: "Agent", labelSource: "user" },
638
638
  { id: "team", label: "Team", labelSource: "team" },
639
639
  { id: "inbox", label: "Inbox", labelSource: "inbox" },
@@ -653,19 +653,19 @@ function Wn(e) {
653
653
  function w(e) {
654
654
  return e < 10 ? `0${e}` : `${e}`;
655
655
  }
656
- function De(e, t) {
656
+ function Re(e, t) {
657
657
  const n = new Date(e), r = `${n.getUTCFullYear()}-${w(n.getUTCMonth() + 1)}-${w(n.getUTCDate())}`;
658
658
  return t === "day" ? r : `${r}T${w(n.getUTCHours())}`;
659
659
  }
660
- function Re(e, t) {
660
+ function De(e, t) {
661
661
  const n = new Date(e);
662
662
  return n.setUTCMinutes(0, 0, 0), t === "day" && n.setUTCHours(0), n.getTime();
663
663
  }
664
- const Ke = 36e5, Pe = 864e5;
664
+ const Pe = 36e5, Ke = 864e5;
665
665
  function zn(e, t, n) {
666
- const r = n === "hour" ? Ke : Pe, i = [];
667
- for (let a = Re(e, n); a <= t; a += r)
668
- i.push(De(a, n));
666
+ const r = n === "hour" ? Pe : Ke, i = [];
667
+ for (let a = De(e, n); a <= t; a += r)
668
+ i.push(Re(a, n));
669
669
  return i;
670
670
  }
671
671
  const Ue = [
@@ -690,7 +690,7 @@ function Xn(e, t) {
690
690
  ]
691
691
  }));
692
692
  }
693
- const ue = /* @__PURE__ */ new Set(["info", "success", "warning", "destructive"]), B = 200, F = 100, H = 200, V = 12, W = 4, de = 4e3, N = 500, Yn = 256 * 1024, Be = /* @__PURE__ */ new Set([
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([
694
694
  "heading",
695
695
  "paragraph",
696
696
  "list",
@@ -700,14 +700,14 @@ const ue = /* @__PURE__ */ new Set(["info", "success", "warning", "destructive"]
700
700
  "table",
701
701
  "kpi",
702
702
  "callout"
703
- ]), Fe = ["http:", "https:", "mailto:", "tel:"], He = /^[a-z][a-z0-9+.-]*:/i;
703
+ ]), Fe = ["http:", "https:", "mailto:", "tel:"], Ve = /^[a-z][a-z0-9+.-]*:/i;
704
704
  function pe(e) {
705
705
  const t = e.trim().replace(/^<|>$/g, "");
706
706
  if (!t) return !1;
707
- const n = He.exec(t)?.[0];
707
+ const n = Ve.exec(t)?.[0];
708
708
  return n ? Fe.includes(n.toLowerCase()) : !t.startsWith("//");
709
709
  }
710
- const Ve = /^[ \t]{0,3}\[([^\]]+)\]:[ \t]*(\S+).*$/gm;
710
+ const He = /^[ \t]{0,3}\[([^\]]+)\]:[ \t]*(\S+).*$/gm;
711
711
  function We(e) {
712
712
  let t = "", n = 0;
713
713
  for (; n < e.length; ) {
@@ -746,7 +746,7 @@ function z(e, t, n, r) {
746
746
  }
747
747
  function ze(e) {
748
748
  return We(e).replace(
749
- Ve,
749
+ He,
750
750
  (t, n, r) => pe(r) ? t : ""
751
751
  );
752
752
  }
@@ -840,12 +840,12 @@ function qn(e, t = () => {
840
840
  case "table": {
841
841
  const o = Array.isArray(i.columns) ? i.columns : [], s = [];
842
842
  for (const c of o) {
843
- if (s.length >= V) {
844
- t("more than " + V + " table columns");
843
+ if (s.length >= H) {
844
+ t("more than " + H + " table columns");
845
845
  break;
846
846
  }
847
- const y = u(c?.label, N), T = c?.align === "right" ? "right" : void 0;
848
- s.push(T ? { label: y, align: T } : { label: y });
847
+ const y = u(c?.label, N), _ = c?.align === "right" ? "right" : void 0;
848
+ s.push(_ ? { label: y, align: _ } : { label: y });
849
849
  }
850
850
  if (s.length === 0) {
851
851
  t("a table without columns");
@@ -853,13 +853,13 @@ function qn(e, t = () => {
853
853
  }
854
854
  const l = Array.isArray(i.rows) ? i.rows : [], p = [];
855
855
  for (const c of l) {
856
- if (p.length >= H) {
857
- t("more than " + H + " table rows");
856
+ if (p.length >= V) {
857
+ t("more than " + V + " table rows");
858
858
  break;
859
859
  }
860
860
  const y = Array.isArray(c) ? c : [];
861
861
  p.push(
862
- s.map((T, Ce) => u(y[Ce], N))
862
+ s.map((_, Ce) => u(y[Ce], N))
863
863
  );
864
864
  }
865
865
  const f = u(i.caption, N);
@@ -1185,11 +1185,11 @@ const Er = { kind: "workflow", steps: [] };
1185
1185
  function Sr(e) {
1186
1186
  return e?.kind === "workflow" ? e.steps : [];
1187
1187
  }
1188
- function Tr(e) {
1188
+ function _r(e) {
1189
1189
  return e?.kind === "procedure" ? e.procedure : void 0;
1190
1190
  }
1191
1191
  const ut = ["done", "escalated", "failed", "stopped"];
1192
- function _r(e) {
1192
+ function Tr(e) {
1193
1193
  return ut.includes(e);
1194
1194
  }
1195
1195
  function dt(e) {
@@ -1314,7 +1314,7 @@ function Lr(e, t) {
1314
1314
  function Q(e) {
1315
1315
  return [...e].sort((t, n) => Number(n.corrected) - Number(t.corrected) || n.addedAt - t.addedAt);
1316
1316
  }
1317
- function Dr(e, t) {
1317
+ function Rr(e, t) {
1318
1318
  const n = g(t), r = (e.examples ?? []).filter((a) => a.trim());
1319
1319
  return { examples: r.some((a) => g(a) === n) ? r : [...r, t].slice(-ht), exampleCandidates: bt(e, t) };
1320
1320
  }
@@ -1326,7 +1326,7 @@ function Et(e, t) {
1326
1326
  const n = e.ownerScope;
1327
1327
  return n ? n.kind === "org" ? !0 : n.kind === "team" ? !!t && n.teamId === t : !1 : !1;
1328
1328
  }
1329
- function Rr(e, t) {
1329
+ function Dr(e, t) {
1330
1330
  return e.filter((n) => Et(n, t));
1331
1331
  }
1332
1332
  const be = [
@@ -1423,10 +1423,10 @@ const be = [
1423
1423
  function S(e) {
1424
1424
  return be.find((t) => t.id === e);
1425
1425
  }
1426
- function Kr(e) {
1426
+ function Pr(e) {
1427
1427
  return S(e)?.label ?? e;
1428
1428
  }
1429
- function Pr(e, t = "gpt-5-mini") {
1429
+ function Kr(e, t = "gpt-5-mini") {
1430
1430
  return S(e)?.defaultModel ?? t;
1431
1431
  }
1432
1432
  function Ur(e) {
@@ -1455,17 +1455,17 @@ function Fr(e, t = "month") {
1455
1455
  const n = new Date(St(e, t));
1456
1456
  return `${n.getUTCFullYear()}-${String(n.getUTCMonth() + 1).padStart(2, "0")}`;
1457
1457
  }
1458
- function Hr(e) {
1458
+ function Vr(e) {
1459
1459
  return e?.listeningEnabled !== !1;
1460
1460
  }
1461
- const Vr = /* @__PURE__ */ new Set(["mail", "message"]);
1462
- function Tt(e, t) {
1461
+ const Hr = /* @__PURE__ */ new Set(["mail", "message"]);
1462
+ function _t(e, t) {
1463
1463
  const n = e.settings?.signatures?.[t];
1464
1464
  return !n || !n.enabled || !n.body || n.body.trim() === "" ? null : n;
1465
1465
  }
1466
1466
  function Wr(e, t, n, r = "html") {
1467
1467
  if (!e) return n;
1468
- const i = Tt(e, t);
1468
+ const i = _t(e, t);
1469
1469
  return i ? `${n}${r === "text" ? `
1470
1470
 
1471
1471
  ` : t === "mail" ? "<br><br>-- <br>" : "<br><br>"}${i.body}` : n;
@@ -1482,11 +1482,11 @@ const Xr = (e) => !!e.assignedUserId || !!e.assignedInboxId, Yr = (e) => e.statu
1482
1482
  function Zr(e, t) {
1483
1483
  return e.lastActivityAt ? !(e.seenBy ?? []).includes(t) : !1;
1484
1484
  }
1485
- const Qr = 1e3, ei = 2e3, ti = 500, ni = 12e3, ri = 4e3, _t = ["contact", "company"];
1485
+ const Qr = 1e3, ei = 2e3, ti = 500, ni = 12e3, ri = 4e3, Tt = ["contact", "company"];
1486
1486
  function ii(e) {
1487
1487
  if (!e) return !1;
1488
1488
  const t = e.slice(0, e.indexOf(":"));
1489
- return _t.includes(t);
1489
+ return Tt.includes(t);
1490
1490
  }
1491
1491
  function ai(e, t) {
1492
1492
  const n = e.accumulatedSeconds || 0;
@@ -1603,7 +1603,7 @@ function Si(e, t) {
1603
1603
  }
1604
1604
  return `${n}-${r.size + 1}`;
1605
1605
  }
1606
- function Ti(e) {
1606
+ function _i(e) {
1607
1607
  const t = [];
1608
1608
  if (!e.length) return [{ index: -1, reason: "empty" }];
1609
1609
  const n = /* @__PURE__ */ new Set();
@@ -1638,7 +1638,7 @@ const L = {
1638
1638
  PL: { callingCode: "48", nsnMin: 9, nsnMax: 9 },
1639
1639
  US: { callingCode: "1", nsnMin: 10, nsnMax: 10 },
1640
1640
  CA: { callingCode: "1", nsnMin: 10, nsnMax: 10 }
1641
- }, $t = "NL", Lt = 15, Dt = 8, Rt = Array.from(
1641
+ }, $t = "NL", Lt = 15, Rt = 8, Dt = Array.from(
1642
1642
  new Set(Object.values(L).map((e) => e.callingCode))
1643
1643
  ).sort((e, t) => t.length - e.length);
1644
1644
  function te(e) {
@@ -1650,7 +1650,7 @@ function E(e, t) {
1650
1650
  }
1651
1651
  function ne(e) {
1652
1652
  if (e.length > Lt) return null;
1653
- for (const t of Rt) {
1653
+ for (const t of Dt) {
1654
1654
  if (!e.startsWith(t)) continue;
1655
1655
  const n = e.slice(t.length);
1656
1656
  for (const r of Object.values(L)) {
@@ -1660,16 +1660,16 @@ function ne(e) {
1660
1660
  }
1661
1661
  return null;
1662
1662
  }
1663
- return e.length < Dt ? null : `+${e}`;
1663
+ return e.length < Rt ? null : `+${e}`;
1664
1664
  }
1665
- function Kt(e) {
1665
+ function Pt(e) {
1666
1666
  let t = e.trim();
1667
1667
  const n = t.match(/^(sips?|tel|whatsapp):/i);
1668
1668
  n && (t = t.slice(n[0].length));
1669
1669
  const r = t.indexOf("@");
1670
1670
  return r >= 0 && (t = t.slice(0, r)), t.trim();
1671
1671
  }
1672
- function _i(e) {
1672
+ function Ti(e) {
1673
1673
  if (!e) return !1;
1674
1674
  const t = e.indexOf("@");
1675
1675
  if (t <= 0) return !1;
@@ -1678,7 +1678,7 @@ function _i(e) {
1678
1678
  }
1679
1679
  function re(e, t) {
1680
1680
  if (!e) return null;
1681
- const n = Kt(e);
1681
+ const n = Pt(e);
1682
1682
  if (!n) return null;
1683
1683
  const r = n.startsWith("+"), i = n.replace(/\D/g, "");
1684
1684
  if (!i) return null;
@@ -1701,7 +1701,7 @@ function Ii(e, t = 9) {
1701
1701
  const n = (e ?? "").replace(/\D/g, "");
1702
1702
  return n.length < t ? null : n.slice(-t);
1703
1703
  }
1704
- function Te(e) {
1704
+ function _e(e) {
1705
1705
  if (!e) return null;
1706
1706
  const t = e.trim().toLowerCase(), n = t.lastIndexOf("@");
1707
1707
  if (n <= 0 || n === t.length - 1) return null;
@@ -1709,10 +1709,10 @@ function Te(e) {
1709
1709
  return !r || !i.includes(".") ? null : `${r}@${i}`;
1710
1710
  }
1711
1711
  function Mi(e) {
1712
- const t = Te(e);
1712
+ const t = _e(e);
1713
1713
  return t ? t.slice(t.lastIndexOf("@") + 1) : null;
1714
1714
  }
1715
- const Pt = /* @__PURE__ */ new Set([
1715
+ const Kt = /* @__PURE__ */ new Set([
1716
1716
  "co.uk",
1717
1717
  "org.uk",
1718
1718
  "gov.uk",
@@ -1727,7 +1727,7 @@ function Ut(e) {
1727
1727
  const t = e.trim().toLowerCase().replace(/\.$/, "").split(".").filter(Boolean);
1728
1728
  if (t.length < 2) return null;
1729
1729
  const n = t.slice(-2).join(".");
1730
- return Pt.has(n) && t.length >= 3 ? t.slice(-3).join(".") : n;
1730
+ return Kt.has(n) && t.length >= 3 ? t.slice(-3).join(".") : n;
1731
1731
  }
1732
1732
  const jt = /* @__PURE__ */ new Set([
1733
1733
  "gmail.com",
@@ -1795,7 +1795,7 @@ function wi(e, t, n) {
1795
1795
  return a ? `fax:${a}` : null;
1796
1796
  }
1797
1797
  if (r === "mailto" || r === "email") {
1798
- const a = Te(t);
1798
+ const a = _e(t);
1799
1799
  return a ? `mailto:${a}` : null;
1800
1800
  }
1801
1801
  const i = t.trim().toLowerCase();
@@ -1824,12 +1824,12 @@ const Ft = [
1824
1824
  // Outlook underscore separator before "From:"
1825
1825
  /\bOn\b[\s\S]{0,200}?\bwrote:/i
1826
1826
  // Gmail "On <date> <name> wrote:"
1827
- ], ie = /^\s*(?:>+\s*)?(?:from|van|sent|verzonden|to|aan|cc|subject|onderwerp|date|datum)\s*:/i, Ht = /^\s*(?:on|op)\b.{0,200}?\b(?:wrote|schreef|geschreven)\s*:?\s*$/i;
1828
- function Vt(e) {
1827
+ ], 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;
1828
+ function Ht(e) {
1829
1829
  const t = e.split(`
1830
1830
  `);
1831
1831
  for (let n = 0; n < t.length; n++)
1832
- if (Ht.test(t[n]) || ie.test(t[n]) && t.slice(n + 1, n + 4).some((r) => ie.test(r)))
1832
+ if (Vt.test(t[n]) || ie.test(t[n]) && t.slice(n + 1, n + 4).some((r) => ie.test(r)))
1833
1833
  return t.slice(0, n).join(`
1834
1834
  `).trim();
1835
1835
  return e;
@@ -1863,7 +1863,7 @@ function vi(e) {
1863
1863
  }
1864
1864
  const n = e.slice(0, t);
1865
1865
  let r = le(se(ae(n)));
1866
- return r || (r = le(se(ae(e)))), Vt(r) || r;
1866
+ return r || (r = le(se(ae(e)))), Ht(r) || r;
1867
1867
  }
1868
1868
  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;
1869
1869
  function xi(e, t) {
@@ -1892,14 +1892,14 @@ const h = 1024 * 1024, Qt = {
1892
1892
  text: 1 * h,
1893
1893
  audio: 20 * h
1894
1894
  }, $i = 25 * h, Li = 5;
1895
- function Di(e, t) {
1895
+ function Ri(e, t) {
1896
1896
  const n = Zt(e);
1897
1897
  return n === "unsupported" ? "unsupported" : t > Qt[n] ? "too-large" : null;
1898
1898
  }
1899
1899
  function en(e) {
1900
1900
  return `${e.kind}:${e.id || e.url || e.title}`;
1901
1901
  }
1902
- function Ri(e, t = []) {
1902
+ function Di(e, t = []) {
1903
1903
  const n = new Set(t), r = [], i = [];
1904
1904
  for (const a of e) {
1905
1905
  const o = en(a);
@@ -1924,7 +1924,7 @@ function nn(e, t) {
1924
1924
  }
1925
1925
  return n;
1926
1926
  }
1927
- function Ki(e, t) {
1927
+ function Pi(e, t) {
1928
1928
  const n = nn(e, t);
1929
1929
  return Object.entries(n).filter(([, r]) => !r).map(([r]) => r);
1930
1930
  }
@@ -1935,7 +1935,7 @@ function rn(e, t) {
1935
1935
  transport: t.transport ?? e.transport
1936
1936
  } : e;
1937
1937
  }
1938
- function Pi(e, t) {
1938
+ function Ki(e, t) {
1939
1939
  const n = [];
1940
1940
  for (const r of e) {
1941
1941
  if (!r.enabled) continue;
@@ -1988,7 +1988,7 @@ const sn = {
1988
1988
  function Bi(e) {
1989
1989
  return e ? sn[e] ?? "note" : "note";
1990
1990
  }
1991
- const Fi = "message_window", Hi = "message_templates", Vi = {
1991
+ const Fi = "message_window", Vi = "message_templates", Hi = {
1992
1992
  // E-mail
1993
1993
  FROM: "from",
1994
1994
  TO: "to",
@@ -2005,17 +2005,22 @@ const Fi = "message_window", Hi = "message_templates", Vi = {
2005
2005
  // Voice/conference
2006
2006
  HOST: "host",
2007
2007
  PARTICIPANT: "participant"
2008
- }, Wi = (e, t) => ({ intent: e, ...t }), zi = "folder_management", Xi = "remote_search", Yi = { ok: !1, code: "UNSUPPORTED", message: "Provider does not support this op" }, _e = "auth";
2008
+ }, Wi = (e, t) => ({ intent: e, ...t }), zi = "folder_management", Xi = "remote_search", Yi = { ok: !1, code: "UNSUPPORTED", message: "Provider does not support this op" }, qi = "resources.describe", Ji = "resources.search", Zi = "resources.resolve";
2009
+ function Qi(e) {
2010
+ const t = e.indexOf(":");
2011
+ return t === -1 ? e : e.slice(0, t);
2012
+ }
2013
+ const Te = "auth";
2009
2014
  function Ie(e) {
2010
2015
  const t = typeof e == "string" ? e.match(/apps\/([^/?#]+)/) : null;
2011
2016
  return t ? t[1] : null;
2012
2017
  }
2013
- function qi(e) {
2018
+ function ea(e) {
2014
2019
  const t = Ie(e);
2015
- return t ? t !== _e : typeof e == "string" && e.startsWith("/wake");
2020
+ return t ? t !== Te : typeof e == "string" && e.startsWith("/wake");
2016
2021
  }
2017
- function Ji(e) {
2018
- return typeof e != "string" || e === "" || e === "/" ? !0 : Ie(e) === _e;
2022
+ function ta(e) {
2023
+ return typeof e != "string" || e === "" || e === "/" ? !0 : Ie(e) === Te;
2019
2024
  }
2020
2025
  function ln(e) {
2021
2026
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
@@ -2036,7 +2041,7 @@ function un(e, t) {
2036
2041
  function dn(e) {
2037
2042
  return e.publicBasePath ?? `/apps/${e.name}`;
2038
2043
  }
2039
- function Zi(e) {
2044
+ function na(e) {
2040
2045
  const t = [];
2041
2046
  for (const n of e) {
2042
2047
  if (!n?.name) continue;
@@ -2069,7 +2074,7 @@ function fn(e, t) {
2069
2074
  cn(r.pattern).test(e) && (!n || pn(r.pattern, n.pattern)) && (n = r);
2070
2075
  return n ? { ...n, params: { ...n.props, ...un(n.pattern, e) } } : null;
2071
2076
  }
2072
- function Qi(e, t) {
2077
+ function ra(e, t) {
2073
2078
  return fn(e, t) !== null;
2074
2079
  }
2075
2080
  const mn = {
@@ -2342,13 +2347,13 @@ const mn = {
2342
2347
  "you",
2343
2348
  "your"
2344
2349
  ]);
2345
- function Tn(e) {
2350
+ function _n(e) {
2346
2351
  const t = /* @__PURE__ */ new Set();
2347
2352
  for (const n of e.toLowerCase().split(/[^a-z0-9À-ɏ]+/))
2348
2353
  n.length < En || Sn.has(n) || t.add(n);
2349
2354
  return [...t];
2350
2355
  }
2351
- function _n(e, t) {
2356
+ function Tn(e, t) {
2352
2357
  if (!e.length) return 0;
2353
2358
  if (!t.length) return 1;
2354
2359
  const n = new Set(t), r = new Set(e);
@@ -2363,13 +2368,13 @@ function In(e, t = hn) {
2363
2368
  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 };
2364
2369
  }
2365
2370
  const Mn = 60;
2366
- function ea(e, t, n = Mn) {
2371
+ function ia(e, t, n = Mn) {
2367
2372
  const r = new Set(e), i = [...e];
2368
2373
  for (const a of t)
2369
2374
  !a || r.has(a) || (r.add(a), i.push(a));
2370
2375
  return i.slice(-n);
2371
2376
  }
2372
- function ta(e) {
2377
+ function aa(e) {
2373
2378
  const { segments: t, now: n, state: r } = e;
2374
2379
  if (r.lastTriggerAt && n - r.lastTriggerAt < yn)
2375
2380
  return { trigger: !1, reason: "too_soon" };
@@ -2378,27 +2383,27 @@ function ta(e) {
2378
2383
  const a = i.segmentCount - (r.lastSegmentCount ?? 0);
2379
2384
  if (r.lastQueryTerms && a < An)
2380
2385
  return { trigger: !1, reason: "too_few_new" };
2381
- const o = Tn(i.text);
2382
- return o.length ? r.lastQueryTerms?.length && _n(o, r.lastQueryTerms) < bn ? { trigger: !1, reason: "same_topic" } : { trigger: !0, text: i.text, terms: o, segmentCount: i.segmentCount } : { trigger: !1, reason: "no_speech" };
2386
+ const o = _n(i.text);
2387
+ 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" };
2383
2388
  }
2384
2389
  const Me = 9e4, kn = ["out_of_office"], ke = (e) => kn.includes(e);
2385
- function na(e, t, n) {
2390
+ function oa(e, t, n) {
2386
2391
  const r = n - e < Me, i = t?.status && (!t.expiresAt || t.expiresAt > n) ? t : void 0;
2387
2392
  if (!i?.status) return { online: r, status: r ? "available" : "offline" };
2388
2393
  const a = i.status;
2389
2394
  return !r && !ke(a) ? { online: !1, status: "offline" } : { online: r, status: a, message: i.message };
2390
2395
  }
2391
- function ra(e, t) {
2396
+ function sa(e, t) {
2392
2397
  const n = t - e.lastSeenAt < Me, r = n || ke(e.status) ? e.status : "offline";
2393
2398
  return n === e.online && r === e.status ? e : { ...e, online: n, status: r };
2394
2399
  }
2395
- function ia(e, t) {
2400
+ function la(e, t) {
2396
2401
  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 };
2397
2402
  }
2398
- function aa(e) {
2403
+ function ca(e) {
2399
2404
  return e.providerAvailable && e.allowed;
2400
2405
  }
2401
- const oa = "installation-id";
2406
+ const ua = "installation-id";
2402
2407
  export {
2403
2408
  m as ACTIVITY_CATALOG,
2404
2409
  Qt as AI_ATTACHMENT_LIMITS,
@@ -2411,11 +2416,11 @@ export {
2411
2416
  N as ARTIFACT_MAX_CELL_LEN,
2412
2417
  W as ARTIFACT_MAX_KPI_ITEMS,
2413
2418
  F as ARTIFACT_MAX_LIST_ITEMS,
2414
- V as ARTIFACT_MAX_TABLE_COLUMNS,
2415
- H as ARTIFACT_MAX_TABLE_ROWS,
2419
+ H as ARTIFACT_MAX_TABLE_COLUMNS,
2420
+ V as ARTIFACT_MAX_TABLE_ROWS,
2416
2421
  de as ARTIFACT_MAX_TEXT_LEN,
2417
2422
  Ze as ASSIGNMENT_SCOPE_KIND,
2418
- _e as AUTH_APP_NAME,
2423
+ Te as AUTH_APP_NAME,
2419
2424
  $e as ActivityTypeRegistry,
2420
2425
  Gn as BUILT_IN_ONLY,
2421
2426
  yn as CADENCE_FLOOR_MS,
@@ -2423,24 +2428,24 @@ export {
2423
2428
  bn as CADENCE_MIN_NOVELTY,
2424
2429
  hn as CADENCE_WINDOW_MS,
2425
2430
  dr as CLASSIFY_VARS,
2426
- Vn as CORE_DIMENSIONS,
2431
+ Hn as CORE_DIMENSIONS,
2427
2432
  on as CommunicationScheme,
2428
2433
  ri as DEFAULT_MEMORY_BUDGET,
2429
2434
  $t as DEFAULT_PHONE_REGION,
2430
2435
  Er as EMPTY_WORKFLOW,
2431
2436
  zi as FEATURE_FOLDER_MANAGEMENT,
2432
2437
  Xi as FEATURE_REMOTE_SEARCH,
2433
- oa as INSTALLATION_HEADER,
2438
+ ua as INSTALLATION_HEADER,
2434
2439
  ot as INTERACTION_KIND,
2435
- Vi as InteractionParticipantRole,
2440
+ Hi as InteractionParticipantRole,
2436
2441
  mt as KB_FALLBACK_LOCALE,
2437
2442
  Z as KB_LOCALES,
2438
2443
  $ as LOOSE_STATUSES,
2439
2444
  M as MAX_ACTIONS,
2440
2445
  Qe as MAX_ASSIGNMENT_TURNS,
2441
- D as MAX_BLOCKS,
2446
+ R as MAX_BLOCKS,
2442
2447
  ye as MAX_COLLECTION_DEPTH,
2443
- _ as MAX_FIELDS,
2448
+ T as MAX_FIELDS,
2444
2449
  I as MAX_LIST_ITEMS,
2445
2450
  Qr as MAX_MEMORY_BROWSE,
2446
2451
  ni as MAX_MEMORY_BUDGET,
@@ -2453,13 +2458,16 @@ export {
2453
2458
  L as PHONE_REGIONS,
2454
2459
  Me as PRESENCE_ONLINE_WINDOW_MS,
2455
2460
  kn as PRESENCE_SURVIVES_OFFLINE,
2456
- Hi as PROVIDER_FEATURE_MESSAGE_TEMPLATES,
2461
+ Vi as PROVIDER_FEATURE_MESSAGE_TEMPLATES,
2457
2462
  Fi as PROVIDER_FEATURE_MESSAGE_WINDOW,
2458
2463
  jt as PUBLIC_EMAIL_DOMAINS,
2459
2464
  q as READ_STEP_TYPES,
2460
- _t as RELATED_SUBJECT_KINDS,
2465
+ Tt as RELATED_SUBJECT_KINDS,
2461
2466
  Se as RESERVED_STATUS_KEYS,
2462
- Vr as SIGNATURE_INTENTS,
2467
+ qi as RESOURCE_DESCRIBE_SERVICE,
2468
+ Zi as RESOURCE_RESOLVE_SERVICE,
2469
+ Ji as RESOURCE_SEARCH_SERVICE,
2470
+ Hr as SIGNATURE_INTENTS,
2463
2471
  ct as STEP_MAX_TOKENS_MAX,
2464
2472
  lt as STEP_MAX_TOKENS_MIN,
2465
2473
  Yt as SUMMARY_MIN_LAST_CHARS,
@@ -2472,7 +2480,7 @@ export {
2472
2480
  je as USAGE_DIMENSION_IDS,
2473
2481
  kt as WORK_ITEM_SCOPE_KIND,
2474
2482
  Ct as WORK_PROJECT_SCOPE_KIND,
2475
- Dr as acceptExampleCandidate,
2483
+ Rr as acceptExampleCandidate,
2476
2484
  nt as actingIdentityKey,
2477
2485
  di as activeWorkTypes,
2478
2486
  vn as activityIconOf,
@@ -2480,20 +2488,20 @@ export {
2480
2488
  ve as activitySnippet,
2481
2489
  xe as activityTextParams,
2482
2490
  Un as activityTimelineText,
2483
- Hn as activityTimestamp,
2491
+ Vn as activityTimestamp,
2484
2492
  d as activityTypeInfo,
2485
2493
  mr as actorKey,
2486
2494
  Lr as addExampleCandidate,
2487
- ra as agePresenceEntry,
2495
+ sa as agePresenceEntry,
2488
2496
  Zt as aiAttachmentKind,
2489
- Di as aiAttachmentRejection,
2497
+ Ri as aiAttachmentRejection,
2490
2498
  ee as aiBudgetLimit,
2491
2499
  Fr as aiBudgetPeriodKey,
2492
2500
  St as aiBudgetPeriodStart,
2493
2501
  Br as aiBudgetState,
2494
2502
  Gr as aiVendorAcceptsAttachment,
2495
- Pr as aiVendorDefaultModel,
2496
- Kr as aiVendorLabel,
2503
+ Kr as aiVendorDefaultModel,
2504
+ Pr as aiVendorLabel,
2497
2505
  jr as aiVendorNeedsBaseUrl,
2498
2506
  Ur as aiVendorsWith,
2499
2507
  Ie as appNameFromPath,
@@ -2506,7 +2514,7 @@ export {
2506
2514
  ir as assignmentScopeKey,
2507
2515
  or as assignmentSubject,
2508
2516
  Bn as buildActivityPreview,
2509
- Pi as buildChannelIntents,
2517
+ Ki as buildChannelIntents,
2510
2518
  er as buildShareKeys,
2511
2519
  In as buildWindow,
2512
2520
  xr as canNestUnder,
@@ -2519,30 +2527,30 @@ export {
2519
2527
  vi as cleanMessageText,
2520
2528
  Mt as compareWorkTypes,
2521
2529
  sr as decideAssignmentState,
2522
- ta as decideCadence,
2530
+ aa as decideCadence,
2523
2531
  gt as defaultLocaleOf,
2524
2532
  bi as defaultStatusKey,
2525
2533
  Wi as defineIntent,
2526
2534
  pt as depthOf,
2527
- na as derivePresence,
2528
- Ki as disabledIntentsFromCapabilities,
2535
+ oa as derivePresence,
2536
+ Pi as disabledIntentsFromCapabilities,
2529
2537
  ai as elapsedSeconds,
2530
2538
  Mi as emailDomain,
2531
2539
  wi as endpointKey,
2532
2540
  un as extractParams,
2533
- Tn as extractTerms,
2541
+ _n as extractTerms,
2534
2542
  ji as filterByEndpoint,
2535
2543
  Ui as filterByIntent,
2536
2544
  an as filterByTargetScheme,
2537
2545
  S as findAiVendor,
2538
2546
  Wn as flattenLocales,
2539
- Re as floorToPeriod,
2547
+ De as floorToPeriod,
2540
2548
  tt as formatActingIdentity,
2541
2549
  li as formatClock,
2542
2550
  si as formatHm,
2543
2551
  fi as formatItemKey,
2544
- De as formatPeriod,
2545
- Ri as freshSources,
2552
+ Re as formatPeriod,
2553
+ Di as freshSources,
2546
2554
  Fn as getActivitySeenUserIds,
2547
2555
  zr as getContactEndpoints,
2548
2556
  Jr as getShortTitle,
@@ -2557,45 +2565,45 @@ export {
2557
2565
  it as isAssignmentTrigger,
2558
2566
  wn as isChatMessageActivity,
2559
2567
  Yr as isClosed,
2560
- Kn as isConnectedType,
2561
- qi as isDeepLink,
2568
+ Pn as isConnectedType,
2569
+ ea as isDeepLink,
2562
2570
  ft as isDescendant,
2563
2571
  Cn as isEmailActivity,
2564
2572
  Ir as isInFlight,
2565
2573
  Zr as isInteractionUnseen,
2566
- Ji as isLandingPath,
2574
+ ta as isLandingPath,
2567
2575
  xi as isLikelyBulk,
2568
2576
  ce as isMessageShape,
2569
2577
  On as isMessageType,
2570
2578
  pn as isMoreSpecificPattern,
2571
2579
  dt as isPaused,
2572
- Rn as isPlaybookAuthoredType,
2580
+ Dn as isPlaybookAuthoredType,
2573
2581
  ki as isPublicEmailDomain,
2574
- Qi as isPublicPath,
2582
+ ra as isPublicPath,
2575
2583
  $n as isReplyableType,
2576
- _r as isTerminal,
2584
+ Tr as isTerminal,
2577
2585
  Oi as isThreadLongEnough,
2578
- Pn as isTranscriptType,
2586
+ Kn as isTranscriptType,
2579
2587
  Ei as isWorkClosed,
2580
2588
  ui as isWorkTypeVisible,
2581
2589
  hi as itemDossierKeys,
2582
2590
  Nt as ladderFor,
2583
2591
  Cr as linkLabel,
2584
- Hr as listeningAllowed,
2592
+ Vr as listeningAllowed,
2585
2593
  vr as localeInstruction,
2586
2594
  Nr as localeName,
2587
2595
  Or as localesOf,
2588
- _i as looksLikeEmail,
2596
+ Ti as looksLikeEmail,
2589
2597
  Gi as matchContactToIntents,
2590
2598
  fn as matchPublicRoute,
2591
- ea as mergeShownKeys,
2592
- Dn as messageCountsAs,
2599
+ ia as mergeShownKeys,
2600
+ Rn as messageCountsAs,
2593
2601
  Ci as needsPhoneRegion,
2594
2602
  qn as normalizeArtifactBlocks,
2595
2603
  Nn as normalizeBlocks,
2596
- Te as normalizeEmail,
2604
+ _e as normalizeEmail,
2597
2605
  g as normalizeExample,
2598
- _n as novelty,
2606
+ Tn as novelty,
2599
2607
  pr as parseActingIdentity,
2600
2608
  mi as parseItemKey,
2601
2609
  cn as pathToRegex,
@@ -2603,10 +2611,10 @@ export {
2603
2611
  Ii as phoneSuffix,
2604
2612
  Ni as plainTextFromMarkdown,
2605
2613
  rt as playbookActor,
2606
- Tr as procedureOf,
2614
+ _r as procedureOf,
2607
2615
  yi as projectDossierKeys,
2608
2616
  dn as publicBasePathFor,
2609
- Zi as publicRoutePatterns,
2617
+ na as publicRoutePatterns,
2610
2618
  x as readPath,
2611
2619
  J as readStepError,
2612
2620
  at as refKey,
@@ -2616,8 +2624,9 @@ export {
2616
2624
  nn as resolveAccountCapabilities,
2617
2625
  O as resolveActivityText,
2618
2626
  tn as resolveChannelIntents,
2619
- Tt as resolveSignature,
2620
- ia as resolveWorkMode,
2627
+ _t as resolveSignature,
2628
+ la as resolveWorkMode,
2629
+ Qi as resourceKindOf,
2621
2630
  fr as runActor,
2622
2631
  kr as runInteractionId,
2623
2632
  ze as sanitizeInline,
@@ -2626,7 +2635,7 @@ export {
2626
2635
  me as shareKeyForTeam,
2627
2636
  fe as shareKeyForUser,
2628
2637
  tr as shareKeysForViewer,
2629
- aa as shouldRunAudioPipeline,
2638
+ ca as shouldRunAudioPipeline,
2630
2639
  xt as sortStatuses,
2631
2640
  en as sourceKey,
2632
2641
  Ai as statusIn,
@@ -2640,13 +2649,13 @@ export {
2640
2649
  re as toE164,
2641
2650
  nr as toolSourceKinds,
2642
2651
  Et as topicOfferedForTeam,
2643
- Rr as topicsForTeam,
2652
+ Dr as topicsForTeam,
2644
2653
  At as truncateExample,
2645
2654
  Si as uniqueWorkStatusKey,
2646
2655
  ci as uniqueWorkTypeKey,
2647
2656
  Ge as usageMetricId,
2648
2657
  Xn as usageMetrics,
2649
- Ti as validateStatuses,
2658
+ _i as validateStatuses,
2650
2659
  gr as valueAtPath,
2651
2660
  ar as wakesAssignment,
2652
2661
  wt as workItemScopeKey,