@opencxh/domain 1.159.0 → 1.161.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 gn(e) {
4
4
  function hn(e) {
5
5
  return e.type === "CHAT_MESSAGE_SENT" || e.type === "CHAT_MESSAGE_RECEIVED";
6
6
  }
7
- const $ = 10, _ = 10, I = 10, M = 5, Me = /* @__PURE__ */ new Set([
7
+ const L = 10, _ = 10, I = 10, M = 5, Me = /* @__PURE__ */ new Set([
8
8
  "header",
9
9
  "section",
10
10
  "context",
@@ -25,8 +25,8 @@ function An(e, t = () => {
25
25
  if (!Array.isArray(e)) return [];
26
26
  const n = [];
27
27
  for (const i of e) {
28
- if (n.length >= $) {
29
- t("more than " + $ + " blocks; the rest was dropped");
28
+ if (n.length >= L) {
29
+ t("more than " + L + " blocks; the rest was dropped");
30
30
  break;
31
31
  }
32
32
  if (!i || typeof i != "object") continue;
@@ -86,7 +86,7 @@ function y(e) {
86
86
  function D(e) {
87
87
  return e ? ` — ${Math.floor(e / 60)}m ${e % 60}s` : "";
88
88
  }
89
- function w(e) {
89
+ function k(e) {
90
90
  return e?.split("@")?.[0] || e || "";
91
91
  }
92
92
  function b(e) {
@@ -102,7 +102,7 @@ const m = {
102
102
  channelKind: "voice",
103
103
  icon: "phone",
104
104
  snippet: () => "Gesprek gestart",
105
- timeline: (e) => e.direction === "inbound" ? `Inbound call started — ${w(e.payload.from)}` : `Outbound call started — ${w(e.payload.to)}`
105
+ timeline: (e) => e.direction === "inbound" ? `Inbound call started — ${k(e.payload.from)}` : `Outbound call started — ${k(e.payload.to)}`
106
106
  },
107
107
  VOICE_CALL_ANSWERED: {
108
108
  shape: "event",
@@ -137,7 +137,7 @@ const m = {
137
137
  channelKind: "voice",
138
138
  icon: "phone",
139
139
  snippet: () => "Gemiste oproep",
140
- timeline: (e) => `Missed call — ${w(e.payload.from)}`
140
+ timeline: (e) => `Missed call — ${k(e.payload.from)}`
141
141
  },
142
142
  VOICE_CALL_FAILED: {
143
143
  shape: "event",
@@ -451,15 +451,15 @@ function Cn(e) {
451
451
  const t = d(e);
452
452
  return t?.shape === "artifact" && t?.carriesText === !0;
453
453
  }
454
- function we(e) {
454
+ function ke(e) {
455
455
  const t = d(e.type)?.snippet;
456
456
  return t ? t(e) : "";
457
457
  }
458
- function wn(e, t) {
458
+ function kn(e, t) {
459
459
  const n = d(e.type)?.timeline;
460
460
  return n ? n(e, t) : e.type.replace(/_/g, " ").toLowerCase();
461
461
  }
462
- function kn(e) {
462
+ function wn(e) {
463
463
  const t = d(e.type)?.joinUrl;
464
464
  return t ? t(e) : void 0;
465
465
  }
@@ -482,7 +482,7 @@ function O(e, t, n) {
482
482
  const r = n(e.key, i);
483
483
  return r === e.key ? null : r;
484
484
  }
485
- function ke(e, t) {
485
+ function we(e, t) {
486
486
  if (!e || typeof e == "string" || "value" in e) return null;
487
487
  const n = {};
488
488
  for (const [i, r] of Object.entries(e.params ?? {}))
@@ -613,11 +613,11 @@ function xe(e) {
613
613
  return t.length <= j ? t : t.slice(0, j - 1).trimEnd() + "…";
614
614
  }
615
615
  function Nn(e, t) {
616
- const n = ke(t?.text, e), i = t ? O(t.text, e, (r) => r) : null;
616
+ const n = we(t?.text, e), i = t ? O(t.text, e, (r) => r) : null;
617
617
  return {
618
618
  activityId: e.id,
619
619
  type: e.type,
620
- snippet: xe(i ?? we(e)),
620
+ snippet: xe(i ?? ke(e)),
621
621
  authorName: e.author?.name ?? "",
622
622
  direction: e.direction,
623
623
  createdAt: e.createdAt ?? Date.now(),
@@ -633,7 +633,7 @@ function xn(e, t, n = []) {
633
633
  function On(e) {
634
634
  return e.createdAt ?? 0;
635
635
  }
636
- const Ln = [
636
+ const $n = [
637
637
  { id: "agent", label: "Agent", labelSource: "user" },
638
638
  { id: "team", label: "Team", labelSource: "team" },
639
639
  { id: "inbox", label: "Inbox", labelSource: "inbox" },
@@ -643,28 +643,28 @@ const Ln = [
643
643
  { id: "handledBy", label: "Afhandelaar", labelSource: "raw" },
644
644
  { id: "time", label: "Tijd", labelSource: "raw" }
645
645
  ];
646
- function $n(e) {
646
+ function Ln(e) {
647
647
  const t = [];
648
648
  for (const n of Object.keys(e))
649
649
  for (const i of Object.keys(e[n]))
650
650
  t.push({ lang: n, key: i, value: e[n][i] });
651
651
  return t;
652
652
  }
653
- function k(e) {
653
+ function w(e) {
654
654
  return e < 10 ? `0${e}` : `${e}`;
655
655
  }
656
656
  function Oe(e, t) {
657
- const n = new Date(e), i = `${n.getUTCFullYear()}-${k(n.getUTCMonth() + 1)}-${k(n.getUTCDate())}`;
658
- return t === "day" ? i : `${i}T${k(n.getUTCHours())}`;
657
+ const n = new Date(e), i = `${n.getUTCFullYear()}-${w(n.getUTCMonth() + 1)}-${w(n.getUTCDate())}`;
658
+ return t === "day" ? i : `${i}T${w(n.getUTCHours())}`;
659
659
  }
660
- function Le(e, t) {
660
+ function $e(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 $e = 36e5, De = 864e5;
664
+ const Le = 36e5, De = 864e5;
665
665
  function Dn(e, t, n) {
666
- const i = n === "hour" ? $e : De, r = [];
667
- for (let a = Le(e, n); a <= t; a += i)
666
+ const i = n === "hour" ? Le : De, r = [];
667
+ for (let a = $e(e, n); a <= t; a += i)
668
668
  r.push(Oe(a, n));
669
669
  return r;
670
670
  }
@@ -1005,11 +1005,11 @@ const Ye = "assignment";
1005
1005
  function Wn(e) {
1006
1006
  return `${Ye}:${e}`;
1007
1007
  }
1008
- function zn(e, t) {
1008
+ function zn(e, t, n) {
1009
1009
  if (e.direction === "inbound") return !0;
1010
1010
  if (e.author?.type === "user" && e.author.id === t) return !1;
1011
- const n = e.payload?.mentions;
1012
- return Array.isArray(n) && n.includes(t);
1011
+ const i = e.payload?.mentions;
1012
+ return Array.isArray(i) && i.includes(t) ? !0 : n === "reply";
1013
1013
  }
1014
1014
  function Xn(e) {
1015
1015
  return e.subjectKind && e.subjectId ? { type: e.subjectKind, id: e.subjectId } : void 0;
@@ -1429,10 +1429,10 @@ function Mi(e) {
1429
1429
  function Ci(e, t = "gpt-5-mini") {
1430
1430
  return S(e)?.defaultModel ?? t;
1431
1431
  }
1432
- function wi(e) {
1432
+ function ki(e) {
1433
1433
  return ye.filter((t) => t.capabilities.includes(e));
1434
1434
  }
1435
- function ki(e) {
1435
+ function wi(e) {
1436
1436
  const t = S(e);
1437
1437
  return !!t && !t.baseUrl;
1438
1438
  }
@@ -1458,12 +1458,12 @@ function xi(e, t = "month") {
1458
1458
  function Oi(e) {
1459
1459
  return e?.listeningEnabled !== !1;
1460
1460
  }
1461
- const Li = /* @__PURE__ */ new Set(["mail", "message"]);
1461
+ const $i = /* @__PURE__ */ new Set(["mail", "message"]);
1462
1462
  function bt(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
- function $i(e, t, n, i = "html") {
1466
+ function Li(e, t, n, i = "html") {
1467
1467
  if (!e) return n;
1468
1468
  const r = bt(e, t);
1469
1469
  return r ? `${n}${i === "text" ? `
@@ -1488,10 +1488,28 @@ function Wi(e) {
1488
1488
  const t = e.slice(0, e.indexOf(":"));
1489
1489
  return Et.includes(t);
1490
1490
  }
1491
- function zi(e) {
1491
+ function zi(e, t) {
1492
+ const n = e.accumulatedSeconds || 0;
1493
+ return e.runningSince ? n + Math.max(0, Math.floor((t - e.runningSince) / 1e3)) : n;
1494
+ }
1495
+ function Xi(e, t) {
1496
+ const n = Math.max(1, Math.ceil(Math.max(0, e) / 60));
1497
+ if (!t || t === "exact") return n * 60;
1498
+ const i = Number(t);
1499
+ return !Number.isFinite(i) || i <= 0 ? n * 60 : Math.ceil(n / i) * i * 60;
1500
+ }
1501
+ function Yi(e) {
1502
+ const t = Math.max(0, Math.round(e / 60));
1503
+ return `${Math.floor(t / 60)}:${String(t % 60).padStart(2, "0")}`;
1504
+ }
1505
+ function qi(e) {
1506
+ const t = Math.max(0, Math.floor(e)), n = (a) => String(a).padStart(2, "0"), i = Math.floor(t / 60) % 60, r = Math.floor(t / 3600);
1507
+ return r > 0 ? `${r}:${n(i)}:${n(t % 60)}` : `${n(i)}:${n(t % 60)}`;
1508
+ }
1509
+ function Ji(e) {
1492
1510
  return e.type === "agent";
1493
1511
  }
1494
- const L = {
1512
+ const $ = {
1495
1513
  // The lower bounds are deliberately generous: service ranges (0800/0900) are
1496
1514
  // shorter than geographic numbers, and a too-strict minimum silently drops them.
1497
1515
  // An over-permissive key is harmless — it simply matches nothing.
@@ -1515,11 +1533,11 @@ const L = {
1515
1533
  US: { callingCode: "1", nsnMin: 10, nsnMax: 10 },
1516
1534
  CA: { callingCode: "1", nsnMin: 10, nsnMax: 10 }
1517
1535
  }, St = "NL", Tt = 15, _t = 8, It = Array.from(
1518
- new Set(Object.values(L).map((e) => e.callingCode))
1536
+ new Set(Object.values($).map((e) => e.callingCode))
1519
1537
  ).sort((e, t) => t.length - e.length);
1520
1538
  function ee(e) {
1521
1539
  if (e)
1522
- return L[e.trim().toUpperCase()];
1540
+ return $[e.trim().toUpperCase()];
1523
1541
  }
1524
1542
  function E(e, t) {
1525
1543
  return e.length >= t.nsnMin && e.length <= t.nsnMax;
@@ -1529,7 +1547,7 @@ function te(e) {
1529
1547
  for (const t of It) {
1530
1548
  if (!e.startsWith(t)) continue;
1531
1549
  const n = e.slice(t.length);
1532
- for (const i of Object.values(L)) {
1550
+ for (const i of Object.values($)) {
1533
1551
  if (i.callingCode !== t) continue;
1534
1552
  const r = i.trunkPrefix, a = r && n.startsWith(r) ? n.slice(r.length) : n;
1535
1553
  if (E(a, i)) return `+${t}${a}`;
@@ -1545,7 +1563,7 @@ function Mt(e) {
1545
1563
  const i = t.indexOf("@");
1546
1564
  return i >= 0 && (t = t.slice(0, i)), t.trim();
1547
1565
  }
1548
- function Xi(e) {
1566
+ function Qi(e) {
1549
1567
  if (!e) return !1;
1550
1568
  const t = e.indexOf("@");
1551
1569
  if (t <= 0) return !1;
@@ -1573,7 +1591,7 @@ function ne(e, t) {
1573
1591
  }
1574
1592
  return !o && E(r, a) ? `+${a.callingCode}${r}` : null;
1575
1593
  }
1576
- function Yi(e, t = 9) {
1594
+ function Zi(e, t = 9) {
1577
1595
  const n = (e ?? "").replace(/\D/g, "");
1578
1596
  return n.length < t ? null : n.slice(-t);
1579
1597
  }
@@ -1584,7 +1602,7 @@ function be(e) {
1584
1602
  const i = t.slice(0, n).split("+")[0], r = t.slice(n + 1);
1585
1603
  return !i || !r.includes(".") ? null : `${i}@${r}`;
1586
1604
  }
1587
- function qi(e) {
1605
+ function er(e) {
1588
1606
  const t = be(e);
1589
1607
  return t ? t.slice(t.lastIndexOf("@") + 1) : null;
1590
1608
  }
@@ -1598,14 +1616,14 @@ const Ct = /* @__PURE__ */ new Set([
1598
1616
  "com.br",
1599
1617
  "co.za"
1600
1618
  ]);
1601
- function wt(e) {
1619
+ function kt(e) {
1602
1620
  if (!e) return null;
1603
1621
  const t = e.trim().toLowerCase().replace(/\.$/, "").split(".").filter(Boolean);
1604
1622
  if (t.length < 2) return null;
1605
1623
  const n = t.slice(-2).join(".");
1606
1624
  return Ct.has(n) && t.length >= 3 ? t.slice(-3).join(".") : n;
1607
1625
  }
1608
- const kt = /* @__PURE__ */ new Set([
1626
+ const wt = /* @__PURE__ */ new Set([
1609
1627
  "gmail.com",
1610
1628
  "googlemail.com",
1611
1629
  "outlook.com",
@@ -1650,16 +1668,16 @@ const kt = /* @__PURE__ */ new Set([
1650
1668
  "proximus.be",
1651
1669
  "scarlet.be"
1652
1670
  ]);
1653
- function Ji(e) {
1654
- const t = wt(e);
1655
- return t ? kt.has(t) : !1;
1671
+ function tr(e) {
1672
+ const t = kt(e);
1673
+ return t ? wt.has(t) : !1;
1656
1674
  }
1657
- function Qi(e) {
1675
+ function nr(e) {
1658
1676
  if (!e) return !1;
1659
1677
  const t = e.trim().toLowerCase();
1660
1678
  return t === "tel" || t === "sms" || t === "whatsapp" || t === "fax";
1661
1679
  }
1662
- function Zi(e, t, n) {
1680
+ function ir(e, t, n) {
1663
1681
  if (!e || !t) return null;
1664
1682
  const i = e.trim().toLowerCase();
1665
1683
  if (i === "tel" || i === "sms" || i === "whatsapp") {
@@ -1678,7 +1696,7 @@ function Zi(e, t, n) {
1678
1696
  return r ? `${i}:${r}` : null;
1679
1697
  }
1680
1698
  const vt = /(\*\*|__)(?=\S)([\s\S]*?\S)\1/g, Nt = /(\*|_)(?=\S)([^*_\n]*?\S)\1/g;
1681
- function er(e) {
1699
+ function rr(e) {
1682
1700
  if (typeof e != "string" || !e) return "";
1683
1701
  let t = e;
1684
1702
  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(`
@@ -1701,7 +1719,7 @@ const xt = [
1701
1719
  /\bOn\b[\s\S]{0,200}?\bwrote:/i
1702
1720
  // Gmail "On <date> <name> wrote:"
1703
1721
  ], ie = /^\s*(?:>+\s*)?(?:from|van|sent|verzonden|to|aan|cc|subject|onderwerp|date|datum)\s*:/i, Ot = /^\s*(?:on|op)\b.{0,200}?\b(?:wrote|schreef|geschreven)\s*:?\s*$/i;
1704
- function Lt(e) {
1722
+ function $t(e) {
1705
1723
  const t = e.split(`
1706
1724
  `);
1707
1725
  for (let n = 0; n < t.length; n++)
@@ -1730,7 +1748,7 @@ function se(e) {
1730
1748
 
1731
1749
  `).trim();
1732
1750
  }
1733
- function tr(e) {
1751
+ function ar(e) {
1734
1752
  if (typeof e != "string" || !e) return "";
1735
1753
  let t = e.length;
1736
1754
  for (const a of xt) {
@@ -1739,14 +1757,14 @@ function tr(e) {
1739
1757
  }
1740
1758
  const n = e.slice(0, t);
1741
1759
  let i = se(oe(re(n)));
1742
- return i || (i = se(oe(re(e)))), Lt(i) || i;
1760
+ return i || (i = se(oe(re(e)))), $t(i) || i;
1743
1761
  }
1744
- const $t = /(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|newsletter|nieuwsbrief|mailer|mailing|notifications?|bounce|postmaster|marketing)@/i, Dt = /\b(unsubscribe|afmelden|uitschrijven|opt[\s-]?out|manage (your )?preferences|geen (e-?mails?|nieuwsbrief|berichten) meer)\b/i;
1745
- function nr(e, t) {
1746
- return !!(e && $t.test(e) || t && Dt.test(t));
1762
+ const Lt = /(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|newsletter|nieuwsbrief|mailer|mailing|notifications?|bounce|postmaster|marketing)@/i, Dt = /\b(unsubscribe|afmelden|uitschrijven|opt[\s-]?out|manage (your )?preferences|geen (e-?mails?|nieuwsbrief|berichten) meer)\b/i;
1763
+ function or(e, t) {
1764
+ return !!(e && Lt.test(e) || t && Dt.test(t));
1747
1765
  }
1748
1766
  const Rt = 3, Pt = 600;
1749
- function ir(e, t) {
1767
+ function sr(e, t) {
1750
1768
  return e >= Rt || t >= Pt;
1751
1769
  }
1752
1770
  const Ut = /* @__PURE__ */ new Set(["image/png", "image/jpeg", "image/jpg", "image/gif", "image/webp"]), Kt = /* @__PURE__ */ new Set([
@@ -1767,15 +1785,15 @@ const h = 1024 * 1024, Gt = {
1767
1785
  pdf: 20 * h,
1768
1786
  text: 1 * h,
1769
1787
  audio: 20 * h
1770
- }, rr = 25 * h, ar = 5;
1771
- function or(e, t) {
1788
+ }, lr = 25 * h, cr = 5;
1789
+ function ur(e, t) {
1772
1790
  const n = jt(e);
1773
1791
  return n === "unsupported" ? "unsupported" : t > Gt[n] ? "too-large" : null;
1774
1792
  }
1775
1793
  function Bt(e) {
1776
1794
  return `${e.kind}:${e.id || e.url || e.title}`;
1777
1795
  }
1778
- function sr(e, t = []) {
1796
+ function dr(e, t = []) {
1779
1797
  const n = new Set(t), i = [], r = [];
1780
1798
  for (const a of e) {
1781
1799
  const o = Bt(a);
@@ -1800,7 +1818,7 @@ function Ht(e, t) {
1800
1818
  }
1801
1819
  return n;
1802
1820
  }
1803
- function lr(e, t) {
1821
+ function pr(e, t) {
1804
1822
  const n = Ht(e, t);
1805
1823
  return Object.entries(n).filter(([, i]) => !i).map(([i]) => i);
1806
1824
  }
@@ -1811,7 +1829,7 @@ function Vt(e, t) {
1811
1829
  transport: t.transport ?? e.transport
1812
1830
  } : e;
1813
1831
  }
1814
- function cr(e, t) {
1832
+ function fr(e, t) {
1815
1833
  const n = [];
1816
1834
  for (const i of e) {
1817
1835
  if (!i.enabled) continue;
@@ -1822,16 +1840,16 @@ function cr(e, t) {
1822
1840
  }
1823
1841
  return n;
1824
1842
  }
1825
- function ur(e, t) {
1843
+ function mr(e, t) {
1826
1844
  return t.filter((n) => n.capability.intent === e);
1827
1845
  }
1828
1846
  function Wt(e, t) {
1829
1847
  return t.filter((n) => n.capability.targetSchemes.includes(e));
1830
1848
  }
1831
- function dr(e, t) {
1849
+ function gr(e, t) {
1832
1850
  return Wt(e.scheme, t);
1833
1851
  }
1834
- function pr(e, t, n) {
1852
+ function hr(e, t, n) {
1835
1853
  const i = [];
1836
1854
  for (const r of e)
1837
1855
  for (const a of n)
@@ -1861,10 +1879,10 @@ const Xt = {
1861
1879
  id: "note",
1862
1880
  custom: "note"
1863
1881
  };
1864
- function fr(e) {
1882
+ function Ar(e) {
1865
1883
  return e ? Xt[e] ?? "note" : "note";
1866
1884
  }
1867
- const mr = "message_window", gr = "message_templates", hr = {
1885
+ const yr = "message_window", br = "message_templates", Er = {
1868
1886
  // E-mail
1869
1887
  FROM: "from",
1870
1888
  TO: "to",
@@ -1881,16 +1899,16 @@ const mr = "message_window", gr = "message_templates", hr = {
1881
1899
  // Voice/conference
1882
1900
  HOST: "host",
1883
1901
  PARTICIPANT: "participant"
1884
- }, Ar = (e, t) => ({ intent: e, ...t }), yr = "folder_management", br = "remote_search", Er = { ok: !1, code: "UNSUPPORTED", message: "Provider does not support this op" }, Ee = "auth";
1902
+ }, Sr = (e, t) => ({ intent: e, ...t }), Tr = "folder_management", _r = "remote_search", Ir = { ok: !1, code: "UNSUPPORTED", message: "Provider does not support this op" }, Ee = "auth";
1885
1903
  function Se(e) {
1886
1904
  const t = typeof e == "string" ? e.match(/apps\/([^/?#]+)/) : null;
1887
1905
  return t ? t[1] : null;
1888
1906
  }
1889
- function Sr(e) {
1907
+ function Mr(e) {
1890
1908
  const t = Se(e);
1891
1909
  return t ? t !== Ee : typeof e == "string" && e.startsWith("/wake");
1892
1910
  }
1893
- function Tr(e) {
1911
+ function Cr(e) {
1894
1912
  return typeof e != "string" || e === "" || e === "/" ? !0 : Se(e) === Ee;
1895
1913
  }
1896
1914
  function Yt(e) {
@@ -1912,7 +1930,7 @@ function Jt(e, t) {
1912
1930
  function Qt(e) {
1913
1931
  return e.publicBasePath ?? `/apps/${e.name}`;
1914
1932
  }
1915
- function _r(e) {
1933
+ function kr(e) {
1916
1934
  const t = [];
1917
1935
  for (const n of e) {
1918
1936
  if (!n?.name) continue;
@@ -1945,7 +1963,7 @@ function en(e, t) {
1945
1963
  qt(i.pattern).test(e) && (!n || Zt(i.pattern, n.pattern)) && (n = i);
1946
1964
  return n ? { ...n, params: { ...n.props, ...Jt(n.pattern, e) } } : null;
1947
1965
  }
1948
- function Ir(e, t) {
1966
+ function wr(e, t) {
1949
1967
  return en(e, t) !== null;
1950
1968
  }
1951
1969
  const tn = {
@@ -2239,13 +2257,13 @@ function pn(e, t = rn) {
2239
2257
  return { text: n.filter((o) => (o.endedAt ?? 0) >= r).map((o) => nn(o.text).trim()).filter(Boolean).join(" ").replace(/\s+/g, " ").trim(), segmentCount: n.length };
2240
2258
  }
2241
2259
  const fn = 60;
2242
- function Mr(e, t, n = fn) {
2260
+ function vr(e, t, n = fn) {
2243
2261
  const i = new Set(e), r = [...e];
2244
2262
  for (const a of t)
2245
2263
  !a || i.has(a) || (i.add(a), r.push(a));
2246
2264
  return r.slice(-n);
2247
2265
  }
2248
- function Cr(e) {
2266
+ function Nr(e) {
2249
2267
  const { segments: t, now: n, state: i } = e;
2250
2268
  if (i.lastTriggerAt && n - i.lastTriggerAt < an)
2251
2269
  return { trigger: !1, reason: "too_soon" };
@@ -2258,28 +2276,28 @@ function Cr(e) {
2258
2276
  return o.length ? i.lastQueryTerms?.length && dn(o, i.lastQueryTerms) < sn ? { trigger: !1, reason: "same_topic" } : { trigger: !0, text: r.text, terms: o, segmentCount: r.segmentCount } : { trigger: !1, reason: "no_speech" };
2259
2277
  }
2260
2278
  const Te = 9e4, mn = ["out_of_office"], _e = (e) => mn.includes(e);
2261
- function wr(e, t, n) {
2279
+ function xr(e, t, n) {
2262
2280
  const i = n - e < Te, r = t?.status && (!t.expiresAt || t.expiresAt > n) ? t : void 0;
2263
2281
  if (!r?.status) return { online: i, status: i ? "available" : "offline" };
2264
2282
  const a = r.status;
2265
2283
  return !i && !_e(a) ? { online: !1, status: "offline" } : { online: i, status: a, message: r.message };
2266
2284
  }
2267
- function kr(e, t) {
2285
+ function Or(e, t) {
2268
2286
  const n = t - e.lastSeenAt < Te, i = n || _e(e.status) ? e.status : "offline";
2269
2287
  return n === e.online && i === e.status ? e : { ...e, online: n, status: i };
2270
2288
  }
2271
- function vr(e, t) {
2289
+ function $r(e, t) {
2272
2290
  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 };
2273
2291
  }
2274
- function Nr(e) {
2292
+ function Lr(e) {
2275
2293
  return e.providerAvailable && e.allowed;
2276
2294
  }
2277
- const xr = "installation-id";
2295
+ const Dr = "installation-id";
2278
2296
  export {
2279
2297
  m as ACTIVITY_CATALOG,
2280
2298
  Gt as AI_ATTACHMENT_LIMITS,
2281
- ar as AI_ATTACHMENT_MAX_PER_TURN,
2282
- rr as AI_ATTACHMENT_TURN_BUDGET,
2299
+ cr as AI_ATTACHMENT_MAX_PER_TURN,
2300
+ lr as AI_ATTACHMENT_TURN_BUDGET,
2283
2301
  ye as AI_VENDORS,
2284
2302
  je as ALLOWED_LINK_SCHEMES,
2285
2303
  G as ARTIFACT_MAX_BLOCKS,
@@ -2299,21 +2317,21 @@ export {
2299
2317
  sn as CADENCE_MIN_NOVELTY,
2300
2318
  rn as CADENCE_WINDOW_MS,
2301
2319
  Zn as CLASSIFY_VARS,
2302
- Ln as CORE_DIMENSIONS,
2320
+ $n as CORE_DIMENSIONS,
2303
2321
  zt as CommunicationScheme,
2304
2322
  Vi as DEFAULT_MEMORY_BUDGET,
2305
2323
  St as DEFAULT_PHONE_REGION,
2306
2324
  li as EMPTY_WORKFLOW,
2307
- yr as FEATURE_FOLDER_MANAGEMENT,
2308
- br as FEATURE_REMOTE_SEARCH,
2309
- xr as INSTALLATION_HEADER,
2325
+ Tr as FEATURE_FOLDER_MANAGEMENT,
2326
+ _r as FEATURE_REMOTE_SEARCH,
2327
+ Dr as INSTALLATION_HEADER,
2310
2328
  it as INTERACTION_KIND,
2311
- hr as InteractionParticipantRole,
2329
+ Er as InteractionParticipantRole,
2312
2330
  dt as KB_FALLBACK_LOCALE,
2313
2331
  J as KB_LOCALES,
2314
2332
  M as MAX_ACTIONS,
2315
2333
  qe as MAX_ASSIGNMENT_TURNS,
2316
- $ as MAX_BLOCKS,
2334
+ L as MAX_BLOCKS,
2317
2335
  he as MAX_COLLECTION_DEPTH,
2318
2336
  _ as MAX_FIELDS,
2319
2337
  I as MAX_LIST_ITEMS,
@@ -2325,15 +2343,15 @@ export {
2325
2343
  ft as MAX_TOPIC_EXAMPLES,
2326
2344
  N as MAX_TOPIC_EXAMPLE_CHARS,
2327
2345
  Fi as MIN_MEMORY_BUDGET,
2328
- L as PHONE_REGIONS,
2346
+ $ as PHONE_REGIONS,
2329
2347
  Te as PRESENCE_ONLINE_WINDOW_MS,
2330
2348
  mn as PRESENCE_SURVIVES_OFFLINE,
2331
- gr as PROVIDER_FEATURE_MESSAGE_TEMPLATES,
2332
- mr as PROVIDER_FEATURE_MESSAGE_WINDOW,
2333
- kt as PUBLIC_EMAIL_DOMAINS,
2349
+ br as PROVIDER_FEATURE_MESSAGE_TEMPLATES,
2350
+ yr as PROVIDER_FEATURE_MESSAGE_WINDOW,
2351
+ wt as PUBLIC_EMAIL_DOMAINS,
2334
2352
  Y as READ_STEP_TYPES,
2335
2353
  Et as RELATED_SUBJECT_KINDS,
2336
- Li as SIGNATURE_INTENTS,
2354
+ $i as SIGNATURE_INTENTS,
2337
2355
  ot as STEP_MAX_TOKENS_MAX,
2338
2356
  at as STEP_MAX_TOKENS_MIN,
2339
2357
  Pt as SUMMARY_MIN_LAST_CHARS,
@@ -2341,23 +2359,23 @@ export {
2341
2359
  Xe as TERMINAL_ASSIGNMENT_STATUSES,
2342
2360
  st as TERMINAL_RUN_STATUSES,
2343
2361
  Qn as TRIGGER_VARS,
2344
- Er as UNSUPPORTED,
2362
+ Ir as UNSUPPORTED,
2345
2363
  Re as USAGE_DIMENSIONS,
2346
2364
  Pe as USAGE_DIMENSION_IDS,
2347
2365
  _i as acceptExampleCandidate,
2348
2366
  Ze as actingIdentityKey,
2349
2367
  yn as activityIconOf,
2350
- kn as activityJoinUrl,
2351
- we as activitySnippet,
2352
- ke as activityTextParams,
2353
- wn as activityTimelineText,
2368
+ wn as activityJoinUrl,
2369
+ ke as activitySnippet,
2370
+ we as activityTextParams,
2371
+ kn as activityTimelineText,
2354
2372
  On as activityTimestamp,
2355
2373
  d as activityTypeInfo,
2356
2374
  ni as actorKey,
2357
2375
  Ti as addExampleCandidate,
2358
- kr as agePresenceEntry,
2376
+ Or as agePresenceEntry,
2359
2377
  jt as aiAttachmentKind,
2360
- or as aiAttachmentRejection,
2378
+ ur as aiAttachmentRejection,
2361
2379
  Z as aiBudgetLimit,
2362
2380
  xi as aiBudgetPeriodKey,
2363
2381
  yt as aiBudgetPeriodStart,
@@ -2365,10 +2383,11 @@ export {
2365
2383
  vi as aiVendorAcceptsAttachment,
2366
2384
  Ci as aiVendorDefaultModel,
2367
2385
  Mi as aiVendorLabel,
2368
- ki as aiVendorNeedsBaseUrl,
2369
- wi as aiVendorsWith,
2386
+ wi as aiVendorNeedsBaseUrl,
2387
+ ki as aiVendorsWith,
2370
2388
  Se as appNameFromPath,
2371
- $i as applySignature,
2389
+ Xi as applyRounding,
2390
+ Li as applySignature,
2372
2391
  Kn as artifactBodyBytes,
2373
2392
  jn as artifactOutline,
2374
2393
  Gn as artifactToMarkdown,
@@ -2376,36 +2395,39 @@ export {
2376
2395
  Wn as assignmentScopeKey,
2377
2396
  Xn as assignmentSubject,
2378
2397
  Nn as buildActivityPreview,
2379
- cr as buildChannelIntents,
2398
+ fr as buildChannelIntents,
2380
2399
  Bn as buildShareKeys,
2381
2400
  pn as buildWindow,
2382
2401
  bi as canNestUnder,
2383
2402
  Tn as carriesText,
2384
2403
  Si as categoryLabel,
2385
- fr as channelKindForScheme,
2404
+ Ar as channelKindForScheme,
2386
2405
  bn as channelKindOf,
2387
2406
  si as clampStepMaxTokens,
2388
- tr as cleanMessageText,
2407
+ ar as cleanMessageText,
2389
2408
  Yn as decideAssignmentState,
2390
- Cr as decideCadence,
2409
+ Nr as decideCadence,
2391
2410
  pt as defaultLocaleOf,
2392
- Ar as defineIntent,
2411
+ Sr as defineIntent,
2393
2412
  ct as depthOf,
2394
- wr as derivePresence,
2395
- lr as disabledIntentsFromCapabilities,
2396
- qi as emailDomain,
2397
- Zi as endpointKey,
2413
+ xr as derivePresence,
2414
+ pr as disabledIntentsFromCapabilities,
2415
+ zi as elapsedSeconds,
2416
+ er as emailDomain,
2417
+ ir as endpointKey,
2398
2418
  Jt as extractParams,
2399
2419
  un as extractTerms,
2400
- dr as filterByEndpoint,
2401
- ur as filterByIntent,
2420
+ gr as filterByEndpoint,
2421
+ mr as filterByIntent,
2402
2422
  Wt as filterByTargetScheme,
2403
2423
  S as findAiVendor,
2404
- $n as flattenLocales,
2405
- Le as floorToPeriod,
2424
+ Ln as flattenLocales,
2425
+ $e as floorToPeriod,
2406
2426
  Qe as formatActingIdentity,
2427
+ qi as formatClock,
2428
+ Yi as formatHm,
2407
2429
  Oe as formatPeriod,
2408
- sr as freshSources,
2430
+ dr as freshSources,
2409
2431
  xn as getActivitySeenUserIds,
2410
2432
  Di as getContactEndpoints,
2411
2433
  Ki as getShortTitle,
@@ -2414,42 +2436,42 @@ export {
2414
2436
  hi as helpCenterText,
2415
2437
  Jn as humanizeAction,
2416
2438
  rt as interactionIdOf,
2417
- zi as isAgentUser,
2439
+ Ji as isAgentUser,
2418
2440
  Ri as isAssigned,
2419
2441
  Vn as isAssignmentTerminal,
2420
2442
  tt as isAssignmentTrigger,
2421
2443
  hn as isChatMessageActivity,
2422
2444
  Pi as isClosed,
2423
2445
  Mn as isConnectedType,
2424
- Sr as isDeepLink,
2446
+ Mr as isDeepLink,
2425
2447
  ut as isDescendant,
2426
2448
  gn as isEmailActivity,
2427
2449
  pi as isInFlight,
2428
2450
  ji as isInteractionUnseen,
2429
- Tr as isLandingPath,
2430
- nr as isLikelyBulk,
2451
+ Cr as isLandingPath,
2452
+ or as isLikelyBulk,
2431
2453
  le as isMessageShape,
2432
2454
  En as isMessageType,
2433
2455
  Zt as isMoreSpecificPattern,
2434
2456
  lt as isPaused,
2435
2457
  In as isPlaybookAuthoredType,
2436
- Ji as isPublicEmailDomain,
2437
- Ir as isPublicPath,
2458
+ tr as isPublicEmailDomain,
2459
+ wr as isPublicPath,
2438
2460
  Sn as isReplyableType,
2439
2461
  di as isTerminal,
2440
- ir as isThreadLongEnough,
2462
+ sr as isThreadLongEnough,
2441
2463
  Cn as isTranscriptType,
2442
2464
  gi as linkLabel,
2443
2465
  Oi as listeningAllowed,
2444
2466
  yi as localeInstruction,
2445
2467
  Ai as localeName,
2446
2468
  Ei as localesOf,
2447
- Xi as looksLikeEmail,
2448
- pr as matchContactToIntents,
2469
+ Qi as looksLikeEmail,
2470
+ hr as matchContactToIntents,
2449
2471
  en as matchPublicRoute,
2450
- Mr as mergeShownKeys,
2472
+ vr as mergeShownKeys,
2451
2473
  _n as messageCountsAs,
2452
- Qi as needsPhoneRegion,
2474
+ nr as needsPhoneRegion,
2453
2475
  Un as normalizeArtifactBlocks,
2454
2476
  An as normalizeBlocks,
2455
2477
  be as normalizeEmail,
@@ -2458,23 +2480,23 @@ export {
2458
2480
  ei as parseActingIdentity,
2459
2481
  qt as pathToRegex,
2460
2482
  Dn as periodsInRange,
2461
- Yi as phoneSuffix,
2462
- er as plainTextFromMarkdown,
2483
+ Zi as phoneSuffix,
2484
+ rr as plainTextFromMarkdown,
2463
2485
  et as playbookActor,
2464
2486
  ui as procedureOf,
2465
2487
  Qt as publicBasePathFor,
2466
- _r as publicRoutePatterns,
2488
+ kr as publicRoutePatterns,
2467
2489
  x as readPath,
2468
2490
  q as readStepError,
2469
2491
  nt as refKey,
2470
- wt as registrableDomain,
2492
+ kt as registrableDomain,
2471
2493
  ht as rejectExampleCandidate,
2472
2494
  Wi as relatedByDefault,
2473
2495
  Ht as resolveAccountCapabilities,
2474
2496
  O as resolveActivityText,
2475
2497
  Ft as resolveChannelIntents,
2476
2498
  bt as resolveSignature,
2477
- vr as resolveWorkMode,
2499
+ $r as resolveWorkMode,
2478
2500
  ti as runActor,
2479
2501
  mi as runInteractionId,
2480
2502
  He as sanitizeInline,
@@ -2483,7 +2505,7 @@ export {
2483
2505
  fe as shareKeyForTeam,
2484
2506
  pe as shareKeyForUser,
2485
2507
  Fn as shareKeysForViewer,
2486
- Nr as shouldRunAudioPipeline,
2508
+ Lr as shouldRunAudioPipeline,
2487
2509
  Bt as sourceKey,
2488
2510
  ci as stepsOf,
2489
2511
  Ce as stripHtml,