@aikaara/chat-sdk 1.5.25 → 1.5.28

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.
@@ -1,4 +1,4 @@
1
- class sc {
1
+ class oc {
2
2
  identifier;
3
3
  callbacks = {};
4
4
  sendFn;
@@ -63,7 +63,7 @@ class Ds {
63
63
  this.ws && (this.ws.onclose = null, this.ws.close(), this.ws = null), this.subscriptions.forEach((e) => e._notifyDisconnected()), this.subscriptions.clear();
64
64
  }
65
65
  subscribe(e) {
66
- const t = JSON.stringify(e), r = new sc(t, (i) => {
66
+ const t = JSON.stringify(e), r = new oc(t, (i) => {
67
67
  this.send({
68
68
  command: "message",
69
69
  identifier: t,
@@ -163,8 +163,8 @@ class da {
163
163
  this.handlers.clear();
164
164
  }
165
165
  }
166
- const oc = 1e3, ac = 10, lc = 400, cc = 600, $s = "#6366f1", uc = 12, dc = "system-ui, -apple-system, sans-serif", Us = "Type a message...", hc = "bottom-right", fc = "light", pc = { x: 20, y: 20 }, an = "aikaara_conversation_id";
167
- class mc extends da {
166
+ const ac = 1e3, lc = 10, cc = 400, uc = 600, $s = "#6366f1", dc = 12, hc = "system-ui, -apple-system, sans-serif", Us = "Type a message...", fc = "bottom-right", pc = "light", mc = { x: 20, y: 20 }, ln = "aikaara_conversation_id";
167
+ class gc extends da {
168
168
  client;
169
169
  config;
170
170
  state = "disconnected";
@@ -221,13 +221,13 @@ class mc extends da {
221
221
  this.state !== e && (this.state = e, this.emit("connection:state", e));
222
222
  }
223
223
  scheduleReconnect() {
224
- const e = this.config.maxReconnectAttempts ?? ac;
224
+ const e = this.config.maxReconnectAttempts ?? lc;
225
225
  if (this.reconnectAttempt >= e) {
226
226
  this.emit("error", new Error("Max reconnection attempts reached"));
227
227
  return;
228
228
  }
229
229
  this.setState("reconnecting");
230
- const r = (this.config.reconnectInterval ?? oc) * Math.pow(2, this.reconnectAttempt);
230
+ const r = (this.config.reconnectInterval ?? ac) * Math.pow(2, this.reconnectAttempt);
231
231
  this.reconnectAttempt++, this.reconnectTimer = setTimeout(async () => {
232
232
  try {
233
233
  const i = this.buildWsUrl(this.config.baseUrl, this.config.userToken);
@@ -247,7 +247,7 @@ class mc extends da {
247
247
  return `${e.replace(/^http/, "ws")}/cable?token=${t}`;
248
248
  }
249
249
  }
250
- class gc {
250
+ class bc {
251
251
  baseUrl;
252
252
  apiKey;
253
253
  authToken;
@@ -354,7 +354,7 @@ class gc {
354
354
  return r && (n.body = JSON.stringify(r)), fetch(e, n);
355
355
  }
356
356
  }
357
- class bc {
357
+ class yc {
358
358
  _messages = [];
359
359
  optimisticCounter = 0;
360
360
  get messages() {
@@ -446,7 +446,7 @@ class bc {
446
446
  for (const r of e) {
447
447
  const i = Bs(t, r);
448
448
  if (i) {
449
- const n = Gr(i), o = Gr(r);
449
+ const n = Yr(i), o = Yr(r);
450
450
  !n && o && Object.assign(i, r, { id: i.id });
451
451
  continue;
452
452
  }
@@ -461,7 +461,7 @@ class bc {
461
461
  function Bs(s, e, t = 15e3) {
462
462
  const r = e.attachments && e.attachments[0], i = (e.metadata ?? {}).attributes;
463
463
  if (!(!!r || !!(i && i.fileMessage))) return null;
464
- const o = Gr(e), a = Fs(e), l = qs(e);
464
+ const o = Yr(e), a = Fs(e), l = qs(e);
465
465
  if (!o && !a && !l) return null;
466
466
  const c = new Date(e.createdAt).getTime();
467
467
  for (let u = s.length - 1; u >= 0; u--) {
@@ -469,7 +469,7 @@ function Bs(s, e, t = 15e3) {
469
469
  if (!(!!p || !!(g && g.fileMessage))) continue;
470
470
  const b = (d.content || "").trim().toLowerCase();
471
471
  if (b === "file_uploaded" || b === "file_upload" || Math.abs(c - new Date(d.createdAt).getTime()) > t) continue;
472
- const y = Gr(d);
472
+ const y = Yr(d);
473
473
  if (o && y && o === y) return d;
474
474
  const w = Fs(d);
475
475
  if (a && w && a === w) return d;
@@ -494,7 +494,7 @@ function qs(s) {
494
494
  const n = s.template?.payload?.elements?.[0]?.description;
495
495
  if (typeof n == "string" && n) return n;
496
496
  }
497
- function Gr(s) {
497
+ function Yr(s) {
498
498
  const e = s.attachments && s.attachments[0];
499
499
  if (e && typeof e.cloudFileId == "string")
500
500
  return e.cloudFileId;
@@ -512,7 +512,7 @@ function ha(s) {
512
512
  const r = e.payload?.elements?.[0]?.action?.url;
513
513
  return typeof r == "string" ? r : void 0;
514
514
  }
515
- class yc {
515
+ class vc {
516
516
  _conversationId;
517
517
  persist;
518
518
  constructor(e, t = !0) {
@@ -527,46 +527,46 @@ class yc {
527
527
  clear() {
528
528
  if (this._conversationId = null, this.persist)
529
529
  try {
530
- localStorage.removeItem(an);
530
+ localStorage.removeItem(ln);
531
531
  } catch {
532
532
  }
533
533
  }
534
534
  loadFromStorage() {
535
535
  if (!this.persist) return null;
536
536
  try {
537
- return localStorage.getItem(an);
537
+ return localStorage.getItem(ln);
538
538
  } catch {
539
539
  return null;
540
540
  }
541
541
  }
542
542
  saveToStorage(e) {
543
543
  try {
544
- localStorage.setItem(an, e);
544
+ localStorage.setItem(ln, e);
545
545
  } catch {
546
546
  }
547
547
  }
548
548
  }
549
- var ws = Object.defineProperty, vc = Object.getOwnPropertyDescriptor, wc = Object.getOwnPropertyNames, kc = Object.prototype.hasOwnProperty, Qe = (s, e) => () => (s && (e = s(s = 0)), e), me = (s, e) => () => (e || s((e = { exports: {} }).exports, e), e.exports), Qt = (s, e) => {
549
+ var ws = Object.defineProperty, wc = Object.getOwnPropertyDescriptor, kc = Object.getOwnPropertyNames, xc = Object.prototype.hasOwnProperty, Qe = (s, e) => () => (s && (e = s(s = 0)), e), me = (s, e) => () => (e || s((e = { exports: {} }).exports, e), e.exports), Qt = (s, e) => {
550
550
  for (var t in e) ws(s, t, { get: e[t], enumerable: !0 });
551
- }, xc = (s, e, t, r) => {
552
- if (e && typeof e == "object" || typeof e == "function") for (let i of wc(e)) !kc.call(s, i) && i !== t && ws(s, i, { get: () => e[i], enumerable: !(r = vc(e, i)) || r.enumerable });
551
+ }, _c = (s, e, t, r) => {
552
+ if (e && typeof e == "object" || typeof e == "function") for (let i of kc(e)) !xc.call(s, i) && i !== t && ws(s, i, { get: () => e[i], enumerable: !(r = wc(e, i)) || r.enumerable });
553
553
  return s;
554
- }, Re = (s) => xc(ws({}, "__esModule", { value: !0 }), s), le = Qe(() => {
554
+ }, Re = (s) => _c(ws({}, "__esModule", { value: !0 }), s), le = Qe(() => {
555
555
  }), je = {};
556
- Qt(je, { _debugEnd: () => Zn, _debugProcess: () => Xn, _events: () => pi, _eventsCount: () => mi, _exiting: () => $n, _fatalExceptions: () => Yn, _getActiveHandles: () => va, _getActiveRequests: () => ya, _kill: () => Fn, _linkedBinding: () => ga, _maxListeners: () => fi, _preload_modules: () => di, _rawDebug: () => Rn, _startProfilerIdleNotifier: () => ei, _stopProfilerIdleNotifier: () => ti, _tickCallback: () => Qn, abort: () => si, addListener: () => gi, allowedNodeEnvironmentFlags: () => Kn, arch: () => kn, argv: () => Sn, argv0: () => ui, assert: () => wa, binding: () => Cn, browser: () => Nn, chdir: () => Ln, config: () => Un, cpuUsage: () => or, cwd: () => On, debugPort: () => ci, default: () => xs, dlopen: () => ba, domain: () => Dn, emit: () => ki, emitWarning: () => Tn, env: () => _n, execArgv: () => En, execPath: () => li, exit: () => zn, features: () => Gn, hasUncaughtExceptionCaptureCallback: () => ka, hrtime: () => _r, kill: () => Wn, listeners: () => _a, memoryUsage: () => Hn, moduleLoadList: () => jn, nextTick: () => pa, off: () => yi, on: () => pt, once: () => bi, openStdin: () => Vn, pid: () => oi, platform: () => xn, ppid: () => ai, prependListener: () => xi, prependOnceListener: () => _i, reallyExit: () => Bn, release: () => Mn, removeAllListeners: () => wi, removeListener: () => vi, resourceUsage: () => qn, setSourceMapsEnabled: () => hi, setUncaughtExceptionCaptureCallback: () => Jn, stderr: () => ni, stdin: () => ii, stdout: () => ri, title: () => wn, umask: () => Pn, uptime: () => xa, version: () => An, versions: () => In });
556
+ Qt(je, { _debugEnd: () => Zn, _debugProcess: () => Xn, _events: () => pi, _eventsCount: () => mi, _exiting: () => $n, _fatalExceptions: () => Yn, _getActiveHandles: () => va, _getActiveRequests: () => ya, _kill: () => Fn, _linkedBinding: () => ga, _maxListeners: () => fi, _preload_modules: () => di, _rawDebug: () => Rn, _startProfilerIdleNotifier: () => ei, _stopProfilerIdleNotifier: () => ti, _tickCallback: () => Qn, abort: () => si, addListener: () => gi, allowedNodeEnvironmentFlags: () => Kn, arch: () => kn, argv: () => Sn, argv0: () => ui, assert: () => wa, binding: () => Cn, browser: () => Nn, chdir: () => Ln, config: () => Un, cpuUsage: () => ar, cwd: () => On, debugPort: () => ci, default: () => xs, dlopen: () => ba, domain: () => Dn, emit: () => ki, emitWarning: () => Tn, env: () => _n, execArgv: () => En, execPath: () => li, exit: () => zn, features: () => Gn, hasUncaughtExceptionCaptureCallback: () => ka, hrtime: () => Sr, kill: () => Wn, listeners: () => _a, memoryUsage: () => Hn, moduleLoadList: () => jn, nextTick: () => pa, off: () => yi, on: () => pt, once: () => bi, openStdin: () => Vn, pid: () => oi, platform: () => xn, ppid: () => ai, prependListener: () => xi, prependOnceListener: () => _i, reallyExit: () => Bn, release: () => Mn, removeAllListeners: () => wi, removeListener: () => vi, resourceUsage: () => qn, setSourceMapsEnabled: () => hi, setUncaughtExceptionCaptureCallback: () => Jn, stderr: () => ni, stdin: () => ii, stdout: () => ri, title: () => wn, umask: () => Pn, uptime: () => xa, version: () => An, versions: () => In });
557
557
  function ks(s) {
558
558
  throw new Error("Node.js process " + s + " is not supported by JSPM core outside of Node.js");
559
559
  }
560
- function _c() {
561
- !Dt || !Rt || (Dt = !1, Rt.length ? dt = Rt.concat(dt) : dr = -1, dt.length && fa());
560
+ function Sc() {
561
+ !Dt || !Rt || (Dt = !1, Rt.length ? dt = Rt.concat(dt) : hr = -1, dt.length && fa());
562
562
  }
563
563
  function fa() {
564
564
  if (!Dt) {
565
- var s = setTimeout(_c, 0);
565
+ var s = setTimeout(Sc, 0);
566
566
  Dt = !0;
567
567
  for (var e = dt.length; e; ) {
568
- for (Rt = dt, dt = []; ++dr < e; ) Rt && Rt[dr].run();
569
- dr = -1, e = dt.length;
568
+ for (Rt = dt, dt = []; ++hr < e; ) Rt && Rt[hr].run();
569
+ hr = -1, e = dt.length;
570
570
  }
571
571
  Rt = null, Dt = !1, clearTimeout(s);
572
572
  }
@@ -602,9 +602,9 @@ function ka() {
602
602
  function xa() {
603
603
  return gt.now() / 1e3;
604
604
  }
605
- function _r(s) {
605
+ function Sr(s) {
606
606
  var e = Math.floor((Date.now() - gt.now()) * 1e-3), t = gt.now() * 1e-3, r = Math.floor(t) + e, i = Math.floor(t % 1 * 1e9);
607
- return s && (r = r - s[0], i = i - s[1], i < 0 && (r--, i += Sr)), [r, i];
607
+ return s && (r = r - s[0], i = i - s[1], i < 0 && (r--, i += Er)), [r, i];
608
608
  }
609
609
  function pt() {
610
610
  return xs;
@@ -612,8 +612,8 @@ function pt() {
612
612
  function _a(s) {
613
613
  return [];
614
614
  }
615
- var dt, Dt, Rt, dr, wn, kn, xn, _n, Sn, En, An, In, Tn, Cn, Pn, On, Ln, Mn, Nn, Rn, jn, Dn, $n, Un, Bn, Fn, or, qn, Hn, Wn, zn, Vn, Kn, Gn, Yn, Jn, Qn, Xn, Zn, ei, ti, ri, ni, ii, si, oi, ai, li, ci, ui, di, hi, gt, ln, Sr, fi, pi, mi, gi, bi, yi, vi, wi, ki, xi, _i, xs, Sc = Qe(() => {
616
- le(), ue(), ce(), dt = [], Dt = !1, dr = -1, ma.prototype.run = function() {
615
+ var dt, Dt, Rt, hr, wn, kn, xn, _n, Sn, En, An, In, Tn, Cn, Pn, On, Ln, Mn, Nn, Rn, jn, Dn, $n, Un, Bn, Fn, ar, qn, Hn, Wn, zn, Vn, Kn, Gn, Yn, Jn, Qn, Xn, Zn, ei, ti, ri, ni, ii, si, oi, ai, li, ci, ui, di, hi, gt, cn, Er, fi, pi, mi, gi, bi, yi, vi, wi, ki, xi, _i, xs, Ec = Qe(() => {
616
+ le(), ue(), ce(), dt = [], Dt = !1, hr = -1, ma.prototype.run = function() {
617
617
  this.fun.apply(null, this.array);
618
618
  }, wn = "browser", kn = "x64", xn = "browser", _n = { PATH: "/usr/bin", LANG: typeof navigator < "u" ? navigator.language + ".UTF-8" : void 0, PWD: "/", HOME: "/home", TMP: "/tmp" }, Sn = ["/usr/bin/node"], En = [], An = "v16.8.0", In = {}, Tn = function(s, e) {
619
619
  console.warn((e ? e + ": " : "") + s);
@@ -624,16 +624,16 @@ var dt, Dt, Rt, dr, wn, kn, xn, _n, Sn, En, An, In, Tn, Cn, Pn, On, Ln, Mn, Nn,
624
624
  }, On = function() {
625
625
  return "/";
626
626
  }, Ln = function(s) {
627
- }, Mn = { name: "node", sourceUrl: "", headersUrl: "", libUrl: "" }, Nn = !0, Rn = We, jn = [], Dn = {}, $n = !1, Un = {}, Bn = We, Fn = We, or = function() {
627
+ }, Mn = { name: "node", sourceUrl: "", headersUrl: "", libUrl: "" }, Nn = !0, Rn = We, jn = [], Dn = {}, $n = !1, Un = {}, Bn = We, Fn = We, ar = function() {
628
628
  return {};
629
- }, qn = or, Hn = or, Wn = We, zn = We, Vn = We, Kn = {}, Gn = { inspector: !1, debug: !1, uv: !1, ipv6: !1, tls_alpn: !1, tls_sni: !1, tls_ocsp: !1, tls: !1, cached_builtins: !0 }, Yn = We, Jn = We, Qn = We, Xn = We, Zn = We, ei = We, ti = We, ri = void 0, ni = void 0, ii = void 0, si = We, oi = 2, ai = 1, li = "/bin/usr/node", ci = 9229, ui = "node", di = [], hi = We, gt = { now: typeof performance < "u" ? performance.now.bind(performance) : void 0, timing: typeof performance < "u" ? performance.timing : void 0 }, gt.now === void 0 && (ln = Date.now(), gt.timing && gt.timing.navigationStart && (ln = gt.timing.navigationStart), gt.now = () => Date.now() - ln), Sr = 1e9, _r.bigint = function(s) {
630
- var e = _r(s);
631
- return typeof BigInt > "u" ? e[0] * Sr + e[1] : BigInt(e[0] * Sr) + BigInt(e[1]);
632
- }, fi = 10, pi = {}, mi = 0, gi = pt, bi = pt, yi = pt, vi = pt, wi = pt, ki = We, xi = pt, _i = pt, xs = { version: An, versions: In, arch: kn, platform: xn, browser: Nn, release: Mn, _rawDebug: Rn, moduleLoadList: jn, binding: Cn, _linkedBinding: ga, _events: pi, _eventsCount: mi, _maxListeners: fi, on: pt, addListener: gi, once: bi, off: yi, removeListener: vi, removeAllListeners: wi, emit: ki, prependListener: xi, prependOnceListener: _i, listeners: _a, domain: Dn, _exiting: $n, config: Un, dlopen: ba, uptime: xa, _getActiveRequests: ya, _getActiveHandles: va, reallyExit: Bn, _kill: Fn, cpuUsage: or, resourceUsage: qn, memoryUsage: Hn, kill: Wn, exit: zn, openStdin: Vn, allowedNodeEnvironmentFlags: Kn, assert: wa, features: Gn, _fatalExceptions: Yn, setUncaughtExceptionCaptureCallback: Jn, hasUncaughtExceptionCaptureCallback: ka, emitWarning: Tn, nextTick: pa, _tickCallback: Qn, _debugProcess: Xn, _debugEnd: Zn, _startProfilerIdleNotifier: ei, _stopProfilerIdleNotifier: ti, stdout: ri, stdin: ii, stderr: ni, abort: si, umask: Pn, chdir: Ln, cwd: On, env: _n, title: wn, argv: Sn, execArgv: En, pid: oi, ppid: ai, execPath: li, debugPort: ci, hrtime: _r, argv0: ui, _preload_modules: di, setSourceMapsEnabled: hi };
629
+ }, qn = ar, Hn = ar, Wn = We, zn = We, Vn = We, Kn = {}, Gn = { inspector: !1, debug: !1, uv: !1, ipv6: !1, tls_alpn: !1, tls_sni: !1, tls_ocsp: !1, tls: !1, cached_builtins: !0 }, Yn = We, Jn = We, Qn = We, Xn = We, Zn = We, ei = We, ti = We, ri = void 0, ni = void 0, ii = void 0, si = We, oi = 2, ai = 1, li = "/bin/usr/node", ci = 9229, ui = "node", di = [], hi = We, gt = { now: typeof performance < "u" ? performance.now.bind(performance) : void 0, timing: typeof performance < "u" ? performance.timing : void 0 }, gt.now === void 0 && (cn = Date.now(), gt.timing && gt.timing.navigationStart && (cn = gt.timing.navigationStart), gt.now = () => Date.now() - cn), Er = 1e9, Sr.bigint = function(s) {
630
+ var e = Sr(s);
631
+ return typeof BigInt > "u" ? e[0] * Er + e[1] : BigInt(e[0] * Er) + BigInt(e[1]);
632
+ }, fi = 10, pi = {}, mi = 0, gi = pt, bi = pt, yi = pt, vi = pt, wi = pt, ki = We, xi = pt, _i = pt, xs = { version: An, versions: In, arch: kn, platform: xn, browser: Nn, release: Mn, _rawDebug: Rn, moduleLoadList: jn, binding: Cn, _linkedBinding: ga, _events: pi, _eventsCount: mi, _maxListeners: fi, on: pt, addListener: gi, once: bi, off: yi, removeListener: vi, removeAllListeners: wi, emit: ki, prependListener: xi, prependOnceListener: _i, listeners: _a, domain: Dn, _exiting: $n, config: Un, dlopen: ba, uptime: xa, _getActiveRequests: ya, _getActiveHandles: va, reallyExit: Bn, _kill: Fn, cpuUsage: ar, resourceUsage: qn, memoryUsage: Hn, kill: Wn, exit: zn, openStdin: Vn, allowedNodeEnvironmentFlags: Kn, assert: wa, features: Gn, _fatalExceptions: Yn, setUncaughtExceptionCaptureCallback: Jn, hasUncaughtExceptionCaptureCallback: ka, emitWarning: Tn, nextTick: pa, _tickCallback: Qn, _debugProcess: Xn, _debugEnd: Zn, _startProfilerIdleNotifier: ei, _stopProfilerIdleNotifier: ti, stdout: ri, stdin: ii, stderr: ni, abort: si, umask: Pn, chdir: Ln, cwd: On, env: _n, title: wn, argv: Sn, execArgv: En, pid: oi, ppid: ai, execPath: li, debugPort: ci, hrtime: Sr, argv0: ui, _preload_modules: di, setSourceMapsEnabled: hi };
633
633
  }), ce = Qe(() => {
634
- Sc();
634
+ Ec();
635
635
  });
636
- function Ec() {
636
+ function Ac() {
637
637
  if (Si) return Wt;
638
638
  Si = !0, Wt.byteLength = a, Wt.toByteArray = c, Wt.fromByteArray = p;
639
639
  for (var s = [], e = [], t = typeof Uint8Array < "u" ? Uint8Array : Array, r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", i = 0, n = r.length; i < n; ++i) s[i] = r[i], e[r.charCodeAt(i)] = i;
@@ -671,8 +671,8 @@ function Ec() {
671
671
  }
672
672
  return Wt;
673
673
  }
674
- function Ac() {
675
- return Ei ? ar : (Ei = !0, ar.read = function(s, e, t, r, i) {
674
+ function Ic() {
675
+ return Ei ? lr : (Ei = !0, lr.read = function(s, e, t, r, i) {
676
676
  var n, o, a = i * 8 - r - 1, l = (1 << a) - 1, c = l >> 1, u = -7, d = t ? i - 1 : 0, p = t ? -1 : 1, g = s[e + d];
677
677
  for (d += p, n = g & (1 << -u) - 1, g >>= -u, u += a; u > 0; n = n * 256 + s[e + d], d += p, u -= 8) ;
678
678
  for (o = n & (1 << -u) - 1, n >>= -u, u += r; u > 0; o = o * 256 + s[e + d], d += p, u -= 8) ;
@@ -682,17 +682,17 @@ function Ac() {
682
682
  o = o + Math.pow(2, r), n = n - c;
683
683
  }
684
684
  return (g ? -1 : 1) * o * Math.pow(2, n - r);
685
- }, ar.write = function(s, e, t, r, i, n) {
685
+ }, lr.write = function(s, e, t, r, i, n) {
686
686
  var o, a, l, c = n * 8 - i - 1, u = (1 << c) - 1, d = u >> 1, p = i === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, g = r ? 0 : n - 1, h = r ? 1 : -1, b = e < 0 || e === 0 && 1 / e < 0 ? 1 : 0;
687
687
  for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (a = isNaN(e) ? 1 : 0, o = u) : (o = Math.floor(Math.log(e) / Math.LN2), e * (l = Math.pow(2, -o)) < 1 && (o--, l *= 2), o + d >= 1 ? e += p / l : e += p * Math.pow(2, 1 - d), e * l >= 2 && (o++, l /= 2), o + d >= u ? (a = 0, o = u) : o + d >= 1 ? (a = (e * l - 1) * Math.pow(2, i), o = o + d) : (a = e * Math.pow(2, d - 1) * Math.pow(2, i), o = 0)); i >= 8; s[t + g] = a & 255, g += h, a /= 256, i -= 8) ;
688
688
  for (o = o << i | a, c += i; c > 0; s[t + g] = o & 255, g += h, o /= 256, c -= 8) ;
689
689
  s[t + g - h] |= b * 128;
690
- }, ar);
690
+ }, lr);
691
691
  }
692
- function Ic() {
692
+ function Tc() {
693
693
  if (Ai) return It;
694
694
  Ai = !0;
695
- let s = Ec(), e = Ac(), t = typeof Symbol == "function" && typeof Symbol.for == "function" ? /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom") : null;
695
+ let s = Ac(), e = Ic(), t = typeof Symbol == "function" && typeof Symbol.for == "function" ? /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom") : null;
696
696
  It.Buffer = o, It.SlowBuffer = w, It.INSPECT_MAX_BYTES = 50;
697
697
  let r = 2147483647;
698
698
  It.kMaxLength = r, o.TYPED_ARRAY_SUPPORT = i(), !o.TYPED_ARRAY_SUPPORT && typeof console < "u" && typeof console.error == "function" && console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");
@@ -1447,12 +1447,12 @@ function Ic() {
1447
1447
  }
1448
1448
  return It;
1449
1449
  }
1450
- var Wt, Si, ar, Ei, It, Ai, Tc = Qe(() => {
1451
- le(), ue(), ce(), Wt = {}, Si = !1, ar = {}, Ei = !1, It = {}, Ai = !1;
1450
+ var Wt, Si, lr, Ei, It, Ai, Cc = Qe(() => {
1451
+ le(), ue(), ce(), Wt = {}, Si = !1, lr = {}, Ei = !1, It = {}, Ai = !1;
1452
1452
  }), Fe = {};
1453
- Qt(Fe, { Buffer: () => Yr, INSPECT_MAX_BYTES: () => Sa, default: () => mt, kMaxLength: () => Ea });
1454
- var mt, Yr, Sa, Ea, qe = Qe(() => {
1455
- le(), ue(), ce(), Tc(), mt = Ic(), mt.Buffer, mt.SlowBuffer, mt.INSPECT_MAX_BYTES, mt.kMaxLength, Yr = mt.Buffer, Sa = mt.INSPECT_MAX_BYTES, Ea = mt.kMaxLength;
1453
+ Qt(Fe, { Buffer: () => Jr, INSPECT_MAX_BYTES: () => Sa, default: () => mt, kMaxLength: () => Ea });
1454
+ var mt, Jr, Sa, Ea, qe = Qe(() => {
1455
+ le(), ue(), ce(), Cc(), mt = Tc(), mt.Buffer, mt.SlowBuffer, mt.INSPECT_MAX_BYTES, mt.kMaxLength, Jr = mt.Buffer, Sa = mt.INSPECT_MAX_BYTES, Ea = mt.kMaxLength;
1456
1456
  }), ue = Qe(() => {
1457
1457
  qe();
1458
1458
  }), Ue = me((s, e) => {
@@ -1693,14 +1693,14 @@ var mt, Yr, Sa, Ea, qe = Qe(() => {
1693
1693
  } else v = r(_);
1694
1694
  return `The value of "${m}" is out of range. It must be ${k}. Received ${v}`;
1695
1695
  }, RangeError), h("ERR_MULTIPLE_CALLBACK", "Callback called multiple times", Error), h("ERR_METHOD_NOT_IMPLEMENTED", "The %s method is not implemented", Error), h("ERR_STREAM_ALREADY_FINISHED", "Cannot call %s after a stream was finished", Error), h("ERR_STREAM_CANNOT_PIPE", "Cannot pipe, not readable", Error), h("ERR_STREAM_DESTROYED", "Cannot call %s after a stream was destroyed", Error), h("ERR_STREAM_NULL_VALUES", "May not write null values to stream", TypeError), h("ERR_STREAM_PREMATURE_CLOSE", "Premature close", Error), h("ERR_STREAM_PUSH_AFTER_EOF", "stream.push() after EOF", Error), h("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event", Error), h("ERR_STREAM_WRITE_AFTER_END", "write after end", Error), h("ERR_UNKNOWN_ENCODING", "Unknown encoding: %s", TypeError), e.exports = { AbortError: w, aggregateTwoErrors: b(y), hideStackFrames: b, codes: u };
1696
- }), fr = me((s, e) => {
1696
+ }), pr = me((s, e) => {
1697
1697
  le(), ue(), ce();
1698
1698
  var { AbortController: t, AbortSignal: r } = typeof self < "u" ? self : typeof window < "u" ? window : void 0;
1699
1699
  e.exports = t, e.exports.AbortSignal = r, e.exports.default = t;
1700
1700
  }), Pt = {};
1701
1701
  Qt(Pt, { EventEmitter: () => Ia, default: () => zt, defaultMaxListeners: () => Ta, init: () => Ca, listenerCount: () => Pa, on: () => Oa, once: () => La });
1702
- function Cc() {
1703
- if (Ii) return lr;
1702
+ function Pc() {
1703
+ if (Ii) return cr;
1704
1704
  Ii = !0;
1705
1705
  var s = typeof Reflect == "object" ? Reflect : null, e = s && typeof s.apply == "function" ? s.apply : function(_, v, E) {
1706
1706
  return Function.prototype.apply.call(_, v, E);
@@ -1719,7 +1719,7 @@ function Cc() {
1719
1719
  function n() {
1720
1720
  n.init.call(this);
1721
1721
  }
1722
- lr = n, lr.once = w, n.EventEmitter = n, n.prototype._events = void 0, n.prototype._eventsCount = 0, n.prototype._maxListeners = void 0;
1722
+ cr = n, cr.once = w, n.EventEmitter = n, n.prototype._events = void 0, n.prototype._eventsCount = 0, n.prototype._maxListeners = void 0;
1723
1723
  var o = 10;
1724
1724
  function a(_) {
1725
1725
  if (typeof _ != "function") throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof _);
@@ -1868,10 +1868,10 @@ function Cc() {
1868
1868
  });
1869
1869
  else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof _);
1870
1870
  }
1871
- return lr;
1871
+ return cr;
1872
1872
  }
1873
- var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
1874
- le(), ue(), ce(), lr = {}, Ii = !1, zt = Cc(), zt.once, zt.once = function(s, e) {
1873
+ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
1874
+ le(), ue(), ce(), cr = {}, Ii = !1, zt = Pc(), zt.once, zt.once = function(s, e) {
1875
1875
  return new Promise((t, r) => {
1876
1876
  function i(...o) {
1877
1877
  n !== void 0 && s.removeListener("error", n), t(o);
@@ -1912,7 +1912,7 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
1912
1912
  }, { EventEmitter: Ia, defaultMaxListeners: Ta, init: Ca, listenerCount: Pa, on: Oa, once: La } = zt;
1913
1913
  }), Je = me((s, e) => {
1914
1914
  le(), ue(), ce();
1915
- var t = (qe(), Re(Fe)), { format: r, inspect: i } = Aa(), { codes: { ERR_INVALID_ARG_TYPE: n } } = Ye(), { kResistStopPropagation: o, AggregateError: a, SymbolDispose: l } = Ue(), c = globalThis.AbortSignal || fr().AbortSignal, u = globalThis.AbortController || fr().AbortController, d = Object.getPrototypeOf(async function() {
1915
+ var t = (qe(), Re(Fe)), { format: r, inspect: i } = Aa(), { codes: { ERR_INVALID_ARG_TYPE: n } } = Ye(), { kResistStopPropagation: o, AggregateError: a, SymbolDispose: l } = Ue(), c = globalThis.AbortSignal || pr().AbortSignal, u = globalThis.AbortController || pr().AbortController, d = Object.getPrototypeOf(async function() {
1916
1916
  }).constructor, p = globalThis.Blob || t.Blob, g = typeof p < "u" ? function(y) {
1917
1917
  return y instanceof p;
1918
1918
  } : function(y) {
@@ -1964,7 +1964,7 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
1964
1964
  y.forEach((k) => k.removeEventListener("abort", m));
1965
1965
  }, { once: !0 }), w.signal;
1966
1966
  } }, e.exports.promisify.custom = /* @__PURE__ */ Symbol.for("nodejs.util.promisify.custom");
1967
- }), mr = me((s, e) => {
1967
+ }), gr = me((s, e) => {
1968
1968
  le(), ue(), ce();
1969
1969
  var { ArrayIsArray: t, ArrayPrototypeIncludes: r, ArrayPrototypeJoin: i, ArrayPrototypeMap: n, NumberIsInteger: o, NumberIsNaN: a, NumberMAX_SAFE_INTEGER: l, NumberMIN_SAFE_INTEGER: c, NumberParseInt: u, ObjectPrototypeHasOwnProperty: d, RegExpPrototypeExec: p, String: g, StringPrototypeToUpperCase: h, StringPrototypeTrim: b } = Ue(), { hideStackFrames: y, codes: { ERR_SOCKET_BAD_PORT: w, ERR_INVALID_ARG_TYPE: m, ERR_INVALID_ARG_VALUE: k, ERR_OUT_OF_RANGE: _, ERR_UNKNOWN_SIGNAL: v } } = Ye(), { normalizeEncoding: E } = Je(), { isAsyncFunction: S, isArrayBufferView: I } = Je().types, P = {};
1970
1970
  function O(H) {
@@ -2281,7 +2281,7 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
2281
2281
  e.exports = { isDestroyed: v, kIsDestroyed: n, isDisturbed: D, kIsDisturbed: c, isErrored: G, kIsErrored: o, isReadable: O, kIsReadable: a, kIsClosedPromise: u, kControllerErrorFunction: d, kIsWritable: l, isClosed: U, isDuplexNodeStream: h, isFinished: T, isIterable: _, isReadableNodeStream: p, isReadableStream: y, isReadableEnded: I, isReadableFinished: P, isReadableErrored: $, isNodeStream: b, isWebStream: k, isWritable: j, isWritableNodeStream: g, isWritableStream: w, isWritableEnded: E, isWritableFinished: S, isWritableErrored: F, isServerRequest: W, isServerResponse: z, willEmitClose: ne, isTransformStream: m };
2282
2282
  }), Ot = me((s, e) => {
2283
2283
  le(), ue(), ce();
2284
- var t = Bt(), { AbortError: r, codes: i } = Ye(), { ERR_INVALID_ARG_TYPE: n, ERR_STREAM_PREMATURE_CLOSE: o } = i, { kEmptyObject: a, once: l } = Je(), { validateAbortSignal: c, validateFunction: u, validateObject: d, validateBoolean: p } = mr(), { Promise: g, PromisePrototypeThen: h, SymbolDispose: b } = Ue(), { isClosed: y, isReadable: w, isReadableNodeStream: m, isReadableStream: k, isReadableFinished: _, isReadableErrored: v, isWritable: E, isWritableNodeStream: S, isWritableStream: I, isWritableFinished: P, isWritableErrored: O, isNodeStream: j, willEmitClose: T, kIsClosedPromise: F } = wt(), $;
2284
+ var t = Bt(), { AbortError: r, codes: i } = Ye(), { ERR_INVALID_ARG_TYPE: n, ERR_STREAM_PREMATURE_CLOSE: o } = i, { kEmptyObject: a, once: l } = Je(), { validateAbortSignal: c, validateFunction: u, validateObject: d, validateBoolean: p } = gr(), { Promise: g, PromisePrototypeThen: h, SymbolDispose: b } = Ue(), { isClosed: y, isReadable: w, isReadableNodeStream: m, isReadableStream: k, isReadableFinished: _, isReadableErrored: v, isWritable: E, isWritableNodeStream: S, isWritableStream: I, isWritableFinished: P, isWritableErrored: O, isNodeStream: j, willEmitClose: T, kIsClosedPromise: F } = wt(), $;
2285
2285
  function U(D) {
2286
2286
  return D.setHeader && typeof D.abort == "function";
2287
2287
  }
@@ -2484,7 +2484,7 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
2484
2484
  !a._events || !a._events[l] ? a.on(l, c) : t(a._events[l]) ? a._events[l].unshift(c) : a._events[l] = [c, a._events[l]];
2485
2485
  }
2486
2486
  e.exports = { Stream: n, prependListener: o };
2487
- }), Zr = me((s, e) => {
2487
+ }), en = me((s, e) => {
2488
2488
  le(), ue(), ce();
2489
2489
  var { SymbolDispose: t } = Ue(), { AbortError: r, codes: i } = Ye(), { isNodeStream: n, isWebStream: o, kControllerErrorFunction: a } = wt(), l = Ot(), { ERR_INVALID_ARG_TYPE: c } = i, u, d = (p, g) => {
2490
2490
  if (typeof p != "object" || !("aborted" in p)) throw new c(g, "AbortSignal", p);
@@ -2507,7 +2507,7 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
2507
2507
  }
2508
2508
  return g;
2509
2509
  };
2510
- }), Pc = me((s, e) => {
2510
+ }), Oc = me((s, e) => {
2511
2511
  le(), ue(), ce();
2512
2512
  var { StringPrototypeSlice: t, SymbolIterator: r, TypedArrayPrototypeSet: i, Uint8Array: n } = Ue(), { Buffer: o } = (qe(), Re(Fe)), { inspect: a } = Je();
2513
2513
  e.exports = class {
@@ -2586,9 +2586,9 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
2586
2586
  return a(this, { ...c, depth: 0, customInspect: !1 });
2587
2587
  }
2588
2588
  };
2589
- }), en = me((s, e) => {
2589
+ }), tn = me((s, e) => {
2590
2590
  le(), ue(), ce();
2591
- var { MathFloor: t, NumberIsInteger: r } = Ue(), { validateInteger: i } = mr(), { ERR_INVALID_ARG_VALUE: n } = Ye().codes, o = 16 * 1024, a = 16;
2591
+ var { MathFloor: t, NumberIsInteger: r } = Ue(), { validateInteger: i } = gr(), { ERR_INVALID_ARG_VALUE: n } = Ye().codes, o = 16 * 1024, a = 16;
2592
2592
  function l(p, g, h) {
2593
2593
  return p.highWaterMark != null ? p.highWaterMark : g ? p[h] : null;
2594
2594
  }
@@ -2610,7 +2610,7 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
2610
2610
  return c(p.objectMode);
2611
2611
  }
2612
2612
  e.exports = { getHighWaterMark: d, getDefaultHighWaterMark: c, setDefaultHighWaterMark: u };
2613
- }), Oc = me((s, e) => {
2613
+ }), Lc = me((s, e) => {
2614
2614
  le(), ue(), ce();
2615
2615
  var t = (qe(), Re(Fe)), r = t.Buffer;
2616
2616
  function i(o, a) {
@@ -2634,9 +2634,9 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
2634
2634
  if (typeof o != "number") throw new TypeError("Argument must be a number");
2635
2635
  return t.SlowBuffer(o);
2636
2636
  };
2637
- }), Lc = me((s) => {
2637
+ }), Mc = me((s) => {
2638
2638
  le(), ue(), ce();
2639
- var e = Oc().Buffer, t = e.isEncoding || function(m) {
2639
+ var e = Lc().Buffer, t = e.isEncoding || function(m) {
2640
2640
  switch (m = "" + m, m && m.toLowerCase()) {
2641
2641
  case "hex":
2642
2642
  case "utf8":
@@ -2829,13 +2829,13 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
2829
2829
  return b;
2830
2830
  }
2831
2831
  e.exports = c;
2832
- }), tn = me((s, e) => {
2832
+ }), rn = me((s, e) => {
2833
2833
  le(), ue(), ce();
2834
2834
  var t = Bt(), { ArrayPrototypeIndexOf: r, NumberIsInteger: i, NumberIsNaN: n, NumberParseInt: o, ObjectDefineProperties: a, ObjectKeys: l, ObjectSetPrototypeOf: c, Promise: u, SafeSet: d, SymbolAsyncDispose: p, SymbolAsyncIterator: g, Symbol: h } = Ue();
2835
2835
  e.exports = ae, ae.ReadableState = we;
2836
- var { EventEmitter: b } = (Ut(), Re(Pt)), { Stream: y, prependListener: w } = _s(), { Buffer: m } = (qe(), Re(Fe)), { addAbortSignal: k } = Zr(), _ = Ot(), v = Je().debuglog("stream", (C) => {
2836
+ var { EventEmitter: b } = (Ut(), Re(Pt)), { Stream: y, prependListener: w } = _s(), { Buffer: m } = (qe(), Re(Fe)), { addAbortSignal: k } = en(), _ = Ot(), v = Je().debuglog("stream", (C) => {
2837
2837
  v = C;
2838
- }), E = Pc(), S = Xt(), { getHighWaterMark: I, getDefaultHighWaterMark: P } = en(), { aggregateTwoErrors: O, codes: { ERR_INVALID_ARG_TYPE: j, ERR_METHOD_NOT_IMPLEMENTED: T, ERR_OUT_OF_RANGE: F, ERR_STREAM_PUSH_AFTER_EOF: $, ERR_STREAM_UNSHIFT_AFTER_END_EVENT: U }, AbortError: X } = Ye(), { validateObject: z } = mr(), W = h("kPaused"), { StringDecoder: ne } = Lc(), D = Ma();
2838
+ }), E = Oc(), S = Xt(), { getHighWaterMark: I, getDefaultHighWaterMark: P } = tn(), { aggregateTwoErrors: O, codes: { ERR_INVALID_ARG_TYPE: j, ERR_METHOD_NOT_IMPLEMENTED: T, ERR_OUT_OF_RANGE: F, ERR_STREAM_PUSH_AFTER_EOF: $, ERR_STREAM_UNSHIFT_AFTER_END_EVENT: U }, AbortError: X } = Ye(), { validateObject: z } = gr(), W = h("kPaused"), { StringDecoder: ne } = Mc(), D = Ma();
2839
2839
  c(ae.prototype, y.prototype), c(ae, y);
2840
2840
  var G = () => {
2841
2841
  }, { errorOrDestroy: L } = S, Y = 1, pe = 2, te = 4, ve = 8, J = 16, R = 32, ie = 64, V = 128, Q = 256, Z = 512, be = 1024, oe = 2048, M = 4096, q = 8192, re = 16384, he = 32768, fe = 65536, ye = 1 << 17, H = 1 << 18;
@@ -2969,13 +2969,13 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
2969
2969
  }
2970
2970
  let et, rr = !1;
2971
2971
  function nr() {
2972
- v("cleanup"), C.removeListener("close", lt), C.removeListener("finish", St), et && C.removeListener("drain", et), C.removeListener("error", Lt), C.removeListener("unpipe", Be), ke.removeListener("end", Ge), ke.removeListener("end", Mt), ke.removeListener("data", yr), rr = !0, et && Se.awaitDrainWriters && (!C._writableState || C._writableState.needDrain) && et();
2972
+ v("cleanup"), C.removeListener("close", lt), C.removeListener("finish", St), et && C.removeListener("drain", et), C.removeListener("error", Lt), C.removeListener("unpipe", Be), ke.removeListener("end", Ge), ke.removeListener("end", Mt), ke.removeListener("data", vr), rr = !0, et && Se.awaitDrainWriters && (!C._writableState || C._writableState.needDrain) && et();
2973
2973
  }
2974
2974
  function ir() {
2975
2975
  rr || (Se.pipes.length === 1 && Se.pipes[0] === C ? (v("false write response, pause", 0), Se.awaitDrainWriters = C, Se.multiAwaitDrain = !1) : Se.pipes.length > 1 && Se.pipes.includes(C) && (v("false write response, pause", Se.awaitDrainWriters.size), Se.awaitDrainWriters.add(C)), ke.pause()), et || (et = Ie(ke, C), C.on("drain", et));
2976
2976
  }
2977
- ke.on("data", yr);
2978
- function yr(ct) {
2977
+ ke.on("data", vr);
2978
+ function vr(ct) {
2979
2979
  v("ondata");
2980
2980
  let ft = C.write(ct);
2981
2981
  v("dest.write", ft), ft === !1 && ir();
@@ -3158,14 +3158,14 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
3158
3158
  }
3159
3159
  function Xe(C, N) {
3160
3160
  if (v("endReadableNT", C.endEmitted, C.length), !C.errored && !C.closeEmitted && !C.endEmitted && C.length === 0) {
3161
- if (C.endEmitted = !0, N.emit("end"), N.writable && N.allowHalfOpen === !1) t.nextTick(br, N);
3161
+ if (C.endEmitted = !0, N.emit("end"), N.writable && N.allowHalfOpen === !1) t.nextTick(yr, N);
3162
3162
  else if (C.autoDestroy) {
3163
3163
  let ke = N._writableState;
3164
3164
  (!ke || ke.autoDestroy && (ke.finished || ke.writable === !1)) && N.destroy();
3165
3165
  }
3166
3166
  }
3167
3167
  }
3168
- function br(C) {
3168
+ function yr(C) {
3169
3169
  C.writable && !C.writableEnded && !C.destroyed && C.end();
3170
3170
  }
3171
3171
  ae.from = function(C, N) {
@@ -3189,7 +3189,7 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
3189
3189
  le(), ue(), ce();
3190
3190
  var t = Bt(), { ArrayPrototypeSlice: r, Error: i, FunctionPrototypeSymbolHasInstance: n, ObjectDefineProperty: o, ObjectDefineProperties: a, ObjectSetPrototypeOf: l, StringPrototypeToLowerCase: c, Symbol: u, SymbolHasInstance: d } = Ue();
3191
3191
  e.exports = z, z.WritableState = U;
3192
- var { EventEmitter: p } = (Ut(), Re(Pt)), g = _s().Stream, { Buffer: h } = (qe(), Re(Fe)), b = Xt(), { addAbortSignal: y } = Zr(), { getHighWaterMark: w, getDefaultHighWaterMark: m } = en(), { ERR_INVALID_ARG_TYPE: k, ERR_METHOD_NOT_IMPLEMENTED: _, ERR_MULTIPLE_CALLBACK: v, ERR_STREAM_CANNOT_PIPE: E, ERR_STREAM_DESTROYED: S, ERR_STREAM_ALREADY_FINISHED: I, ERR_STREAM_NULL_VALUES: P, ERR_STREAM_WRITE_AFTER_END: O, ERR_UNKNOWN_ENCODING: j } = Ye().codes, { errorOrDestroy: T } = b;
3192
+ var { EventEmitter: p } = (Ut(), Re(Pt)), g = _s().Stream, { Buffer: h } = (qe(), Re(Fe)), b = Xt(), { addAbortSignal: y } = en(), { getHighWaterMark: w, getDefaultHighWaterMark: m } = tn(), { ERR_INVALID_ARG_TYPE: k, ERR_METHOD_NOT_IMPLEMENTED: _, ERR_MULTIPLE_CALLBACK: v, ERR_STREAM_CANNOT_PIPE: E, ERR_STREAM_DESTROYED: S, ERR_STREAM_ALREADY_FINISHED: I, ERR_STREAM_NULL_VALUES: P, ERR_STREAM_WRITE_AFTER_END: O, ERR_UNKNOWN_ENCODING: j } = Ye().codes, { errorOrDestroy: T } = b;
3193
3193
  l(z.prototype, g.prototype), l(z, g);
3194
3194
  function F() {
3195
3195
  }
@@ -3415,13 +3415,13 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
3415
3415
  }, z.toWeb = function(M) {
3416
3416
  return oe().newWritableStreamFromStreamWritable(M);
3417
3417
  };
3418
- }), Mc = me((s, e) => {
3418
+ }), Nc = me((s, e) => {
3419
3419
  le(), ue(), ce();
3420
- var t = Bt(), r = (qe(), Re(Fe)), { isReadable: i, isWritable: n, isIterable: o, isNodeStream: a, isReadableNodeStream: l, isWritableNodeStream: c, isDuplexNodeStream: u, isReadableStream: d, isWritableStream: p } = wt(), g = Ot(), { AbortError: h, codes: { ERR_INVALID_ARG_TYPE: b, ERR_INVALID_RETURN_VALUE: y } } = Ye(), { destroyer: w } = Xt(), m = yt(), k = tn(), _ = Ss(), { createDeferredPromise: v } = Je(), E = Ma(), S = globalThis.Blob || r.Blob, I = typeof S < "u" ? function($) {
3420
+ var t = Bt(), r = (qe(), Re(Fe)), { isReadable: i, isWritable: n, isIterable: o, isNodeStream: a, isReadableNodeStream: l, isWritableNodeStream: c, isDuplexNodeStream: u, isReadableStream: d, isWritableStream: p } = wt(), g = Ot(), { AbortError: h, codes: { ERR_INVALID_ARG_TYPE: b, ERR_INVALID_RETURN_VALUE: y } } = Ye(), { destroyer: w } = Xt(), m = yt(), k = rn(), _ = Ss(), { createDeferredPromise: v } = Je(), E = Ma(), S = globalThis.Blob || r.Blob, I = typeof S < "u" ? function($) {
3421
3421
  return $ instanceof S;
3422
3422
  } : function($) {
3423
3423
  return !1;
3424
- }, P = globalThis.AbortController || fr().AbortController, { FunctionPrototypeCall: O } = Ue(), j = class extends m {
3424
+ }, P = globalThis.AbortController || pr().AbortController, { FunctionPrototypeCall: O } = Ue(), j = class extends m {
3425
3425
  constructor($) {
3426
3426
  super($), $?.readable === !1 && (this._readableState.readable = !1, this._readableState.ended = !0, this._readableState.endEmitted = !0), $?.writable === !1 && (this._writableState.writable = !1, this._writableState.ending = !0, this._writableState.ended = !0, this._writableState.finished = !0);
3427
3427
  }
@@ -3543,7 +3543,7 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
3543
3543
  le(), ue(), ce();
3544
3544
  var { ObjectDefineProperties: t, ObjectGetOwnPropertyDescriptor: r, ObjectKeys: i, ObjectSetPrototypeOf: n } = Ue();
3545
3545
  e.exports = l;
3546
- var o = tn(), a = Ss();
3546
+ var o = rn(), a = Ss();
3547
3547
  n(l.prototype, o.prototype), n(l, o);
3548
3548
  {
3549
3549
  let p = i(a.prototype);
@@ -3572,13 +3572,13 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
3572
3572
  };
3573
3573
  var d;
3574
3574
  l.from = function(p) {
3575
- return d || (d = Mc()), d(p, "body");
3575
+ return d || (d = Nc()), d(p, "body");
3576
3576
  };
3577
3577
  }), Na = me((s, e) => {
3578
3578
  le(), ue(), ce();
3579
3579
  var { ObjectSetPrototypeOf: t, Symbol: r } = Ue();
3580
3580
  e.exports = l;
3581
- var { ERR_METHOD_NOT_IMPLEMENTED: i } = Ye().codes, n = yt(), { getHighWaterMark: o } = en();
3581
+ var { ERR_METHOD_NOT_IMPLEMENTED: i } = Ye().codes, n = yt(), { getHighWaterMark: o } = tn();
3582
3582
  t(l.prototype, n.prototype), t(l, n);
3583
3583
  var a = r("kCallback");
3584
3584
  function l(d) {
@@ -3630,7 +3630,7 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
3630
3630
  };
3631
3631
  }), Es = me((s, e) => {
3632
3632
  le(), ue(), ce();
3633
- var t = Bt(), { ArrayIsArray: r, Promise: i, SymbolAsyncIterator: n, SymbolDispose: o } = Ue(), a = Ot(), { once: l } = Je(), c = Xt(), u = yt(), { aggregateTwoErrors: d, codes: { ERR_INVALID_ARG_TYPE: p, ERR_INVALID_RETURN_VALUE: g, ERR_MISSING_ARGS: h, ERR_STREAM_DESTROYED: b, ERR_STREAM_PREMATURE_CLOSE: y }, AbortError: w } = Ye(), { validateFunction: m, validateAbortSignal: k } = mr(), { isIterable: _, isReadable: v, isReadableNodeStream: E, isNodeStream: S, isTransformStream: I, isWebStream: P, isReadableStream: O, isReadableFinished: j } = wt(), T = globalThis.AbortController || fr().AbortController, F, $, U;
3633
+ var t = Bt(), { ArrayIsArray: r, Promise: i, SymbolAsyncIterator: n, SymbolDispose: o } = Ue(), a = Ot(), { once: l } = Je(), c = Xt(), u = yt(), { aggregateTwoErrors: d, codes: { ERR_INVALID_ARG_TYPE: p, ERR_INVALID_RETURN_VALUE: g, ERR_MISSING_ARGS: h, ERR_STREAM_DESTROYED: b, ERR_STREAM_PREMATURE_CLOSE: y }, AbortError: w } = Ye(), { validateFunction: m, validateAbortSignal: k } = gr(), { isIterable: _, isReadable: v, isReadableNodeStream: E, isNodeStream: S, isTransformStream: I, isWebStream: P, isReadableStream: O, isReadableFinished: j } = wt(), T = globalThis.AbortController || pr().AbortController, F, $, U;
3634
3634
  function X(te, ve, J) {
3635
3635
  let R = !1;
3636
3636
  te.on("close", () => {
@@ -3652,7 +3652,7 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
3652
3652
  throw new p("val", ["Readable", "Iterable", "AsyncIterable"], te);
3653
3653
  }
3654
3654
  async function* ne(te) {
3655
- $ || ($ = tn()), yield* $.prototype[n].call(te);
3655
+ $ || ($ = rn()), yield* $.prototype[n].call(te);
3656
3656
  }
3657
3657
  async function D(te, ve, J, { end: R }) {
3658
3658
  let ie, V = null, Q = (oe) => {
@@ -3892,9 +3892,9 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
3892
3892
  !T && v !== null && (T = new p()), _ = null, m = null, k = null, v === null ? F(T) : (v = F, n(P) && i(P, T));
3893
3893
  }, E;
3894
3894
  };
3895
- }), Nc = me((s, e) => {
3895
+ }), Rc = me((s, e) => {
3896
3896
  le(), ue(), ce();
3897
- var t = globalThis.AbortController || fr().AbortController, { codes: { ERR_INVALID_ARG_VALUE: r, ERR_INVALID_ARG_TYPE: i, ERR_MISSING_ARGS: n, ERR_OUT_OF_RANGE: o }, AbortError: a } = Ye(), { validateAbortSignal: l, validateInteger: c, validateObject: u } = mr(), d = Ue().Symbol("kWeak"), p = Ue().Symbol("kResistStopPropagation"), { finished: g } = Ot(), h = ja(), { addAbortSignalNoValidate: b } = Zr(), { isWritable: y, isNodeStream: w } = wt(), { deprecate: m } = Je(), { ArrayPrototypePush: k, Boolean: _, MathFloor: v, Number: E, NumberIsNaN: S, Promise: I, PromiseReject: P, PromiseResolve: O, PromisePrototypeThen: j, Symbol: T } = Ue(), F = T("kEmpty"), $ = T("kEof");
3897
+ var t = globalThis.AbortController || pr().AbortController, { codes: { ERR_INVALID_ARG_VALUE: r, ERR_INVALID_ARG_TYPE: i, ERR_MISSING_ARGS: n, ERR_OUT_OF_RANGE: o }, AbortError: a } = Ye(), { validateAbortSignal: l, validateInteger: c, validateObject: u } = gr(), d = Ue().Symbol("kWeak"), p = Ue().Symbol("kResistStopPropagation"), { finished: g } = Ot(), h = ja(), { addAbortSignalNoValidate: b } = en(), { isWritable: y, isNodeStream: w } = wt(), { deprecate: m } = Je(), { ArrayPrototypePush: k, Boolean: _, MathFloor: v, Number: E, NumberIsNaN: S, Promise: I, PromiseReject: P, PromiseResolve: O, PromisePrototypeThen: j, Symbol: T } = Ue(), F = T("kEmpty"), $ = T("kEof");
3898
3898
  function U(V, Q) {
3899
3899
  if (Q != null && u(Q, "options"), Q?.signal != null && l(Q.signal, "options.signal"), w(V) && !y(V)) throw new r("stream", V, "must be writable");
3900
3900
  let Z = h(this, V);
@@ -4089,8 +4089,8 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
4089
4089
  e.exports = { finished: l, pipeline: c };
4090
4090
  }), $a = me((s, e) => {
4091
4091
  le(), ue(), ce();
4092
- var { Buffer: t } = (qe(), Re(Fe)), { ObjectDefineProperty: r, ObjectKeys: i, ReflectApply: n } = Ue(), { promisify: { custom: o } } = Je(), { streamReturningOperators: a, promiseReturningOperators: l } = Nc(), { codes: { ERR_ILLEGAL_CONSTRUCTOR: c } } = Ye(), u = ja(), { setDefaultHighWaterMark: d, getDefaultHighWaterMark: p } = en(), { pipeline: g } = Es(), { destroyer: h } = Xt(), b = Ot(), y = Da(), w = wt(), m = e.exports = _s().Stream;
4093
- m.isDestroyed = w.isDestroyed, m.isDisturbed = w.isDisturbed, m.isErrored = w.isErrored, m.isReadable = w.isReadable, m.isWritable = w.isWritable, m.Readable = tn();
4092
+ var { Buffer: t } = (qe(), Re(Fe)), { ObjectDefineProperty: r, ObjectKeys: i, ReflectApply: n } = Ue(), { promisify: { custom: o } } = Je(), { streamReturningOperators: a, promiseReturningOperators: l } = Rc(), { codes: { ERR_ILLEGAL_CONSTRUCTOR: c } } = Ye(), u = ja(), { setDefaultHighWaterMark: d, getDefaultHighWaterMark: p } = tn(), { pipeline: g } = Es(), { destroyer: h } = Xt(), b = Ot(), y = Da(), w = wt(), m = e.exports = _s().Stream;
4093
+ m.isDestroyed = w.isDestroyed, m.isDisturbed = w.isDisturbed, m.isErrored = w.isErrored, m.isReadable = w.isReadable, m.isWritable = w.isWritable, m.Readable = rn();
4094
4094
  for (let _ of i(a)) {
4095
4095
  let v = function(...S) {
4096
4096
  if (new.target) throw c();
@@ -4106,7 +4106,7 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
4106
4106
  r(v, "name", { __proto__: null, value: E.name }), r(v, "length", { __proto__: null, value: E.length }), r(m.Readable.prototype, _, { __proto__: null, value: v, enumerable: !1, configurable: !0, writable: !0 });
4107
4107
  }
4108
4108
  m.Writable = Ss(), m.Duplex = yt(), m.Transform = Na(), m.PassThrough = Ra(), m.pipeline = g;
4109
- var { addAbortSignal: k } = Zr();
4109
+ var { addAbortSignal: k } = en();
4110
4110
  m.addAbortSignal = k, m.finished = b, m.destroy = h, m.compose = u, m.setDefaultHighWaterMark = d, m.getDefaultHighWaterMark = p, r(m, "promises", { __proto__: null, configurable: !0, enumerable: !0, get() {
4111
4111
  return y;
4112
4112
  } }), r(g, o, { __proto__: null, enumerable: !0, get() {
@@ -4124,7 +4124,7 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
4124
4124
  e.exports = t.Readable, e.exports._uint8ArrayToBuffer = t._uint8ArrayToBuffer, e.exports._isUint8Array = t._isUint8Array, e.exports.isDisturbed = t.isDisturbed, e.exports.isErrored = t.isErrored, e.exports.isReadable = t.isReadable, e.exports.Readable = t.Readable, e.exports.Writable = t.Writable, e.exports.Duplex = t.Duplex, e.exports.Transform = t.Transform, e.exports.PassThrough = t.PassThrough, e.exports.addAbortSignal = t.addAbortSignal, e.exports.finished = t.finished, e.exports.destroy = t.destroy, e.exports.destroy = i, e.exports.pipeline = t.pipeline, e.exports.compose = t.compose, Object.defineProperty(t, "promises", { configurable: !0, enumerable: !0, get() {
4125
4125
  return r;
4126
4126
  } }), e.exports.Stream = t.Stream, e.exports.default = e.exports;
4127
- }), Rc = me((s, e) => {
4127
+ }), jc = me((s, e) => {
4128
4128
  le(), ue(), ce(), typeof Object.create == "function" ? e.exports = function(t, r) {
4129
4129
  r && (t.super_ = r, t.prototype = Object.create(r.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }));
4130
4130
  } : e.exports = function(t, r) {
@@ -4135,7 +4135,7 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
4135
4135
  i.prototype = r.prototype, t.prototype = new i(), t.prototype.constructor = t;
4136
4136
  }
4137
4137
  };
4138
- }), jc = me((s, e) => {
4138
+ }), Dc = me((s, e) => {
4139
4139
  le(), ue(), ce();
4140
4140
  var { Buffer: t } = (qe(), Re(Fe)), r = /* @__PURE__ */ Symbol.for("BufferList");
4141
4141
  function i(n) {
@@ -4259,9 +4259,9 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
4259
4259
  }, i.isBufferList = function(n) {
4260
4260
  return n != null && n[r];
4261
4261
  }, e.exports = i;
4262
- }), Dc = me((s, e) => {
4262
+ }), $c = me((s, e) => {
4263
4263
  le(), ue(), ce();
4264
- var t = Ft().Duplex, r = Rc(), i = jc();
4264
+ var t = Ft().Duplex, r = jc(), i = Dc();
4265
4265
  function n(o) {
4266
4266
  if (!(this instanceof n)) return new n(o);
4267
4267
  if (typeof o == "function") {
@@ -4291,7 +4291,7 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
4291
4291
  }, n.prototype._isBufferList = function(o) {
4292
4292
  return o instanceof n || o instanceof i || n.isBufferList(o);
4293
4293
  }, n.isBufferList = i.isBufferList, e.exports = n, e.exports.BufferListStream = n, e.exports.BufferList = i;
4294
- }), $c = me((s, e) => {
4294
+ }), Uc = me((s, e) => {
4295
4295
  le(), ue(), ce();
4296
4296
  var t = class {
4297
4297
  constructor() {
@@ -4325,7 +4325,7 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
4325
4325
  })));
4326
4326
  }
4327
4327
  t.PUBLISH_HEADER = i("publish"), t.SUBSCRIBE_HEADER = i("subscribe"), t.SUBSCRIBE_OPTIONS_QOS_MASK = 3, t.SUBSCRIBE_OPTIONS_NL_MASK = 1, t.SUBSCRIBE_OPTIONS_NL_SHIFT = 2, t.SUBSCRIBE_OPTIONS_RAP_MASK = 1, t.SUBSCRIBE_OPTIONS_RAP_SHIFT = 3, t.SUBSCRIBE_OPTIONS_RH_MASK = 3, t.SUBSCRIBE_OPTIONS_RH_SHIFT = 4, t.SUBSCRIBE_OPTIONS_RH = [0, 16, 32], t.SUBSCRIBE_OPTIONS_NL = 4, t.SUBSCRIBE_OPTIONS_RAP = 8, t.SUBSCRIBE_OPTIONS_QOS = [0, 1, 2], t.UNSUBSCRIBE_HEADER = i("unsubscribe"), t.ACKS = { unsuback: i("unsuback"), puback: i("puback"), pubcomp: i("pubcomp"), pubrel: i("pubrel"), pubrec: i("pubrec") }, t.SUBACK_HEADER = r.from([t.codes.suback << t.CMD_SHIFT]), t.VERSION3 = r.from([3]), t.VERSION4 = r.from([4]), t.VERSION5 = r.from([5]), t.VERSION131 = r.from([131]), t.VERSION132 = r.from([132]), t.QOS = [0, 1, 2].map((n) => r.from([n])), t.EMPTY = { pingreq: r.from([t.codes.pingreq << 4, 0]), pingresp: r.from([t.codes.pingresp << 4, 0]), disconnect: r.from([t.codes.disconnect << 4, 0]) }, t.MQTT5_PUBACK_PUBREC_CODES = { 0: "Success", 16: "No matching subscribers", 128: "Unspecified error", 131: "Implementation specific error", 135: "Not authorized", 144: "Topic Name invalid", 145: "Packet identifier in use", 151: "Quota exceeded", 153: "Payload format invalid" }, t.MQTT5_PUBREL_PUBCOMP_CODES = { 0: "Success", 146: "Packet Identifier not found" }, t.MQTT5_SUBACK_CODES = { 0: "Granted QoS 0", 1: "Granted QoS 1", 2: "Granted QoS 2", 128: "Unspecified error", 131: "Implementation specific error", 135: "Not authorized", 143: "Topic Filter invalid", 145: "Packet Identifier in use", 151: "Quota exceeded", 158: "Shared Subscriptions not supported", 161: "Subscription Identifiers not supported", 162: "Wildcard Subscriptions not supported" }, t.MQTT5_UNSUBACK_CODES = { 0: "Success", 17: "No subscription existed", 128: "Unspecified error", 131: "Implementation specific error", 135: "Not authorized", 143: "Topic Filter invalid", 145: "Packet Identifier in use" }, t.MQTT5_DISCONNECT_CODES = { 0: "Normal disconnection", 4: "Disconnect with Will Message", 128: "Unspecified error", 129: "Malformed Packet", 130: "Protocol Error", 131: "Implementation specific error", 135: "Not authorized", 137: "Server busy", 139: "Server shutting down", 141: "Keep Alive timeout", 142: "Session taken over", 143: "Topic Filter invalid", 144: "Topic Name invalid", 147: "Receive Maximum exceeded", 148: "Topic Alias invalid", 149: "Packet too large", 150: "Message rate too high", 151: "Quota exceeded", 152: "Administrative action", 153: "Payload format invalid", 154: "Retain not supported", 155: "QoS not supported", 156: "Use another server", 157: "Server moved", 158: "Shared Subscriptions not supported", 159: "Connection rate exceeded", 160: "Maximum connect time", 161: "Subscription Identifiers not supported", 162: "Wildcard Subscriptions not supported" }, t.MQTT5_AUTH_CODES = { 0: "Success", 24: "Continue authentication", 25: "Re-authenticate" };
4328
- }), Uc = me((s, e) => {
4328
+ }), Bc = me((s, e) => {
4329
4329
  le(), ue(), ce();
4330
4330
  var t = 1e3, r = t * 60, i = r * 60, n = i * 24, o = n * 7, a = n * 365.25;
4331
4331
  e.exports = function(p, g) {
@@ -4397,10 +4397,10 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
4397
4397
  var y = g >= h * 1.5;
4398
4398
  return Math.round(p / h) + " " + b + (y ? "s" : "");
4399
4399
  }
4400
- }), Bc = me((s, e) => {
4400
+ }), Fc = me((s, e) => {
4401
4401
  le(), ue(), ce();
4402
4402
  function t(r) {
4403
- n.debug = n, n.default = n, n.coerce = d, n.disable = c, n.enable = a, n.enabled = u, n.humanize = Uc(), n.destroy = p, Object.keys(r).forEach((g) => {
4403
+ n.debug = n, n.default = n, n.coerce = d, n.disable = c, n.enable = a, n.enabled = u, n.humanize = Bc(), n.destroy = p, Object.keys(r).forEach((g) => {
4404
4404
  n[g] = r[g];
4405
4405
  }), n.names = [], n.skips = [], n.formatters = {};
4406
4406
  function i(g) {
@@ -4510,7 +4510,7 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
4510
4510
  } catch {
4511
4511
  }
4512
4512
  }
4513
- e.exports = Bc()(s);
4513
+ e.exports = Fc()(s);
4514
4514
  var { formatters: a } = e.exports;
4515
4515
  a.j = function(l) {
4516
4516
  try {
@@ -4519,9 +4519,9 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
4519
4519
  return "[UnexpectedJSONParseError]: " + c.message;
4520
4520
  }
4521
4521
  };
4522
- }), Fc = me((s, e) => {
4522
+ }), qc = me((s, e) => {
4523
4523
  le(), ue(), ce();
4524
- var t = Dc(), { EventEmitter: r } = (Ut(), Re(Pt)), i = $c(), n = Ua(), o = vt()("mqtt-packet:parser"), a = class Ti extends r {
4524
+ var t = $c(), { EventEmitter: r } = (Ut(), Re(Pt)), i = Uc(), n = Ua(), o = vt()("mqtt-packet:parser"), a = class Ti extends r {
4525
4525
  constructor() {
4526
4526
  super(), this.parser = this.constructor.parser;
4527
4527
  }
@@ -4872,7 +4872,7 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
4872
4872
  }
4873
4873
  };
4874
4874
  e.exports = a;
4875
- }), qc = me((s, e) => {
4875
+ }), Hc = me((s, e) => {
4876
4876
  le(), ue(), ce();
4877
4877
  var { Buffer: t } = (qe(), Re(Fe)), r = 65536, i = {}, n = t.isBuffer(t.from([1, 2]).subarray(0, 1));
4878
4878
  function o(u) {
@@ -4894,7 +4894,7 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
4894
4894
  return d.writeUInt32BE(u, 0), d;
4895
4895
  }
4896
4896
  e.exports = { cache: i, generateCache: a, generateNumber: o, genBufVariableByteInt: l, generate4ByteBuffer: c };
4897
- }), Hc = me((s, e) => {
4897
+ }), Wc = me((s, e) => {
4898
4898
  le(), ue(), ce(), typeof je > "u" || !je.version || je.version.indexOf("v0.") === 0 || je.version.indexOf("v1.") === 0 && je.version.indexOf("v1.8.") !== 0 ? e.exports = { nextTick: t } : e.exports = je;
4899
4899
  function t(r, i, n, o) {
4900
4900
  if (typeof r != "function") throw new TypeError('"callback" argument must be a function');
@@ -4924,7 +4924,7 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
4924
4924
  }
4925
4925
  }), Ba = me((s, e) => {
4926
4926
  le(), ue(), ce();
4927
- var t = Ua(), { Buffer: r } = (qe(), Re(Fe)), i = r.allocUnsafe(0), n = r.from([0]), o = qc(), a = Hc().nextTick, l = vt()("mqtt-packet:writeToStream"), c = o.cache, u = o.generateNumber, d = o.generateCache, p = o.genBufVariableByteInt, g = o.generate4ByteBuffer, h = z, b = !0;
4927
+ var t = Ua(), { Buffer: r } = (qe(), Re(Fe)), i = r.allocUnsafe(0), n = r.from([0]), o = Hc(), a = Wc().nextTick, l = vt()("mqtt-packet:writeToStream"), c = o.cache, u = o.generateNumber, d = o.generateCache, p = o.genBufVariableByteInt, g = o.generate4ByteBuffer, h = z, b = !0;
4928
4928
  function y(J, R, ie) {
4929
4929
  switch (l("generate called"), R.cork && (R.cork(), a(w, R)), b && (b = !1, d()), l("generate: packet.cmd: %s", J.cmd), J.cmd) {
4930
4930
  case "connect":
@@ -5305,7 +5305,7 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
5305
5305
  return typeof J == "string" || J instanceof r;
5306
5306
  }
5307
5307
  e.exports = y;
5308
- }), Wc = me((s, e) => {
5308
+ }), zc = me((s, e) => {
5309
5309
  le(), ue(), ce();
5310
5310
  var t = Ba(), { EventEmitter: r } = (Ut(), Re(Pt)), { Buffer: i } = (qe(), Re(Fe));
5311
5311
  function n(a, l) {
@@ -5331,12 +5331,12 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
5331
5331
  }
5332
5332
  };
5333
5333
  e.exports = n;
5334
- }), zc = me((s) => {
5335
- le(), ue(), ce(), s.parser = Fc().parser, s.generate = Wc(), s.writeToStream = Ba();
5336
- }), Vc = me((s, e) => {
5334
+ }), Vc = me((s) => {
5335
+ le(), ue(), ce(), s.parser = qc().parser, s.generate = zc(), s.writeToStream = Ba();
5336
+ }), Kc = me((s, e) => {
5337
5337
  le(), ue(), ce(), e.exports = r;
5338
5338
  function t(n) {
5339
- return n instanceof Yr ? Yr.from(n) : new n.constructor(n.buffer.slice(), n.byteOffset, n.length);
5339
+ return n instanceof Jr ? Jr.from(n) : new n.constructor(n.buffer.slice(), n.byteOffset, n.length);
5340
5340
  }
5341
5341
  function r(n) {
5342
5342
  if (n = n || {}, n.circles) return i(n);
@@ -5433,8 +5433,8 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
5433
5433
  return o.pop(), a.pop(), h;
5434
5434
  }
5435
5435
  }
5436
- }), Kc = me((s, e) => {
5437
- le(), ue(), ce(), e.exports = Vc()();
5436
+ }), Gc = me((s, e) => {
5437
+ le(), ue(), ce(), e.exports = Kc()();
5438
5438
  }), Fa = me((s) => {
5439
5439
  le(), ue(), ce(), Object.defineProperty(s, "__esModule", { value: !0 }), s.validateTopic = e, s.validateTopics = t;
5440
5440
  function e(r) {
@@ -5486,7 +5486,7 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
5486
5486
  }
5487
5487
  };
5488
5488
  s.default = i;
5489
- }), Gc = me((s) => {
5489
+ }), Yc = me((s) => {
5490
5490
  le(), ue(), ce(), Object.defineProperty(s, "__esModule", { value: !0 });
5491
5491
  var e = [0, 16, 128, 131, 135, 144, 145, 151, 153], t = (r, i, n) => {
5492
5492
  r.log("handlePublish: packet %o", i), n = typeof n < "u" ? n : r.noop;
@@ -5541,7 +5541,7 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
5541
5541
  }
5542
5542
  };
5543
5543
  s.default = t;
5544
- }), Yc = me((s, e) => {
5544
+ }), Jc = me((s, e) => {
5545
5545
  e.exports = { version: "5.15.0" };
5546
5546
  }), Zt = me((s) => {
5547
5547
  le(), ue(), ce(), Object.defineProperty(s, "__esModule", { value: !0 }), s.MQTTJS_VERSION = s.nextTick = s.ErrorWithSubackPacket = s.ErrorWithReasonCode = void 0, s.applyMixin = r;
@@ -5570,8 +5570,8 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
5570
5570
  }
5571
5571
  s.nextTick = typeof je?.nextTick == "function" ? je.nextTick : (i) => {
5572
5572
  setTimeout(i, 0);
5573
- }, s.MQTTJS_VERSION = Yc().version;
5574
- }), rn = me((s) => {
5573
+ }, s.MQTTJS_VERSION = Jc().version;
5574
+ }), nn = me((s) => {
5575
5575
  le(), ue(), ce(), Object.defineProperty(s, "__esModule", { value: !0 }), s.ReasonCodes = void 0;
5576
5576
  var e = Zt();
5577
5577
  s.ReasonCodes = { 0: "", 1: "Unacceptable protocol version", 2: "Identifier rejected", 3: "Server unavailable", 4: "Bad username or password", 5: "Not authorized", 16: "No matching subscribers", 17: "No subscription existed", 128: "Unspecified error", 129: "Malformed Packet", 130: "Protocol Error", 131: "Implementation specific error", 132: "Unsupported Protocol Version", 133: "Client Identifier not valid", 134: "Bad User Name or Password", 135: "Not authorized", 136: "Server unavailable", 137: "Server busy", 138: "Banned", 139: "Server shutting down", 140: "Bad authentication method", 141: "Keep Alive timeout", 142: "Session taken over", 143: "Topic Filter invalid", 144: "Topic Name invalid", 145: "Packet identifier in use", 146: "Packet Identifier not found", 147: "Receive Maximum exceeded", 148: "Topic Alias invalid", 149: "Packet too large", 150: "Message rate too high", 151: "Quota exceeded", 152: "Administrative action", 153: "Payload format invalid", 154: "Retain not supported", 155: "QoS not supported", 156: "Use another server", 157: "Server moved", 158: "Shared Subscriptions not supported", 159: "Connection rate exceeded", 160: "Maximum connect time", 161: "Subscription Identifiers not supported", 162: "Wildcard Subscriptions not supported" };
@@ -5624,9 +5624,9 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
5624
5624
  r.disconnecting && Object.keys(r.outgoing).length === 0 && r.emit("outgoingEmpty");
5625
5625
  };
5626
5626
  s.default = t;
5627
- }), Jc = me((s) => {
5627
+ }), Qc = me((s) => {
5628
5628
  le(), ue(), ce(), Object.defineProperty(s, "__esModule", { value: !0 });
5629
- var e = Zt(), t = rn(), r = (i, n) => {
5629
+ var e = Zt(), t = nn(), r = (i, n) => {
5630
5630
  let { options: o } = i, a = o.protocolVersion, l = a === 5 ? n.reasonCode : n.returnCode;
5631
5631
  if (a !== 5) {
5632
5632
  let c = new e.ErrorWithReasonCode(`Protocol error: Auth packets are only supported in MQTT 5. Your version:${a}`, l);
@@ -5646,7 +5646,7 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
5646
5646
  });
5647
5647
  };
5648
5648
  s.default = r;
5649
- }), Qc = me((s) => {
5649
+ }), Xc = me((s) => {
5650
5650
  le(), ue(), ce(), Object.defineProperty(s, "__esModule", { value: !0 }), s.LRUCache = void 0;
5651
5651
  var e = typeof performance == "object" && performance && typeof performance.now == "function" ? performance : Date, t = /* @__PURE__ */ new Set(), r = typeof je == "object" && je ? je : {}, i = (g, h, b, y) => {
5652
5652
  typeof r.emitWarning == "function" ? r.emitWarning(g, h, b, y) : console.error(`[${b}] ${h}: ${g}`);
@@ -5681,19 +5681,19 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
5681
5681
  constructor(g) {
5682
5682
  super(g), this.fill(0);
5683
5683
  }
5684
- }, d = class cr {
5684
+ }, d = class ur {
5685
5685
  heap;
5686
5686
  length;
5687
5687
  static #l = !1;
5688
5688
  static create(h) {
5689
5689
  let b = c(h);
5690
5690
  if (!b) return [];
5691
- cr.#l = !0;
5692
- let y = new cr(h, b);
5693
- return cr.#l = !1, y;
5691
+ ur.#l = !0;
5692
+ let y = new ur(h, b);
5693
+ return ur.#l = !1, y;
5694
5694
  }
5695
5695
  constructor(h, b) {
5696
- if (!cr.#l) throw new TypeError("instantiate Stack using Stack.create(n)");
5696
+ if (!ur.#l) throw new TypeError("instantiate Stack using Stack.create(n)");
5697
5697
  this.heap = new b(h), this.length = 0;
5698
5698
  }
5699
5699
  push(h) {
@@ -6190,7 +6190,7 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
6190
6190
  var r = class extends t {
6191
6191
  };
6192
6192
  s.Container = r;
6193
- }), Xc = me((s) => {
6193
+ }), Zc = me((s) => {
6194
6194
  le(), ue(), ce(), Object.defineProperty(s, "t", { value: !0 }), s.default = void 0;
6195
6195
  var e = kt(), t = class extends e.Base {
6196
6196
  constructor(i = []) {
@@ -6214,7 +6214,7 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
6214
6214
  }
6215
6215
  }, r = t;
6216
6216
  s.default = r;
6217
- }), Zc = me((s) => {
6217
+ }), eu = me((s) => {
6218
6218
  le(), ue(), ce(), Object.defineProperty(s, "t", { value: !0 }), s.default = void 0;
6219
6219
  var e = kt(), t = class extends e.Base {
6220
6220
  constructor(i = []) {
@@ -6246,7 +6246,7 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
6246
6246
  }
6247
6247
  }, r = t;
6248
6248
  s.default = r;
6249
- }), eu = me((s) => {
6249
+ }), tu = me((s) => {
6250
6250
  le(), ue(), ce(), Object.defineProperty(s, "t", { value: !0 }), s.default = void 0;
6251
6251
  var e = kt(), t = class extends e.Base {
6252
6252
  constructor(i = [], n = function(a, l) {
@@ -6344,7 +6344,7 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
6344
6344
  }
6345
6345
  };
6346
6346
  s.RandomIterator = r;
6347
- }), tu = me((s) => {
6347
+ }), ru = me((s) => {
6348
6348
  le(), ue(), ce(), Object.defineProperty(s, "t", { value: !0 }), s.default = void 0;
6349
6349
  var e = r(As()), t = Va();
6350
6350
  function r(a) {
@@ -6445,7 +6445,7 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
6445
6445
  }
6446
6446
  }, o = n;
6447
6447
  s.default = o;
6448
- }), ru = me((s) => {
6448
+ }), nu = me((s) => {
6449
6449
  le(), ue(), ce(), Object.defineProperty(s, "t", { value: !0 }), s.default = void 0;
6450
6450
  var e = i(As()), t = kt(), r = xt();
6451
6451
  function i(l) {
@@ -6630,7 +6630,7 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
6630
6630
  }
6631
6631
  }, a = o;
6632
6632
  s.default = a;
6633
- }), nu = me((s) => {
6633
+ }), iu = me((s) => {
6634
6634
  le(), ue(), ce(), Object.defineProperty(s, "t", { value: !0 }), s.default = void 0;
6635
6635
  var e = r(As()), t = Va();
6636
6636
  function r(a) {
@@ -6815,7 +6815,7 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
6815
6815
  }
6816
6816
  }, o = n;
6817
6817
  s.default = o;
6818
- }), iu = me((s) => {
6818
+ }), su = me((s) => {
6819
6819
  le(), ue(), ce(), Object.defineProperty(s, "t", { value: !0 }), s.TreeNodeEnableIndex = s.TreeNode = void 0;
6820
6820
  var e = class {
6821
6821
  constructor(r, i) {
@@ -6872,7 +6872,7 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
6872
6872
  s.TreeNodeEnableIndex = t;
6873
6873
  }), Ja = me((s) => {
6874
6874
  le(), ue(), ce(), Object.defineProperty(s, "t", { value: !0 }), s.default = void 0;
6875
- var e = iu(), t = kt(), r = xt(), i = class extends t.Container {
6875
+ var e = su(), t = kt(), r = xt(), i = class extends t.Container {
6876
6876
  constructor(o = function(l, c) {
6877
6877
  return l < c ? -1 : l > c ? 1 : 0;
6878
6878
  }, a = !1) {
@@ -7150,7 +7150,7 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
7150
7150
  }
7151
7151
  }, i = r;
7152
7152
  s.default = i;
7153
- }), su = me((s) => {
7153
+ }), ou = me((s) => {
7154
7154
  le(), ue(), ce(), Object.defineProperty(s, "t", { value: !0 }), s.default = void 0;
7155
7155
  var e = i(Ja()), t = i(Qa()), r = xt();
7156
7156
  function i(l) {
@@ -7229,7 +7229,7 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
7229
7229
  }
7230
7230
  }, a = o;
7231
7231
  s.default = a;
7232
- }), ou = me((s) => {
7232
+ }), au = me((s) => {
7233
7233
  le(), ue(), ce(), Object.defineProperty(s, "t", { value: !0 }), s.default = void 0;
7234
7234
  var e = i(Ja()), t = i(Qa()), r = xt();
7235
7235
  function i(l) {
@@ -7407,7 +7407,7 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
7407
7407
  }
7408
7408
  };
7409
7409
  s.HashContainer = o;
7410
- }), au = me((s) => {
7410
+ }), lu = me((s) => {
7411
7411
  le(), ue(), ce(), Object.defineProperty(s, "t", { value: !0 }), s.default = void 0;
7412
7412
  var e = tl(), t = xt(), r = class rl extends e.HashContainerIterator {
7413
7413
  constructor(a, l, c, u) {
@@ -7470,7 +7470,7 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
7470
7470
  }
7471
7471
  }, n = i;
7472
7472
  s.default = n;
7473
- }), lu = me((s) => {
7473
+ }), cu = me((s) => {
7474
7474
  le(), ue(), ce(), Object.defineProperty(s, "t", { value: !0 }), s.default = void 0;
7475
7475
  var e = tl(), t = i(el()), r = xt();
7476
7476
  function i(l) {
@@ -7553,7 +7553,7 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
7553
7553
  }
7554
7554
  }, a = o;
7555
7555
  s.default = a;
7556
- }), cu = me((s) => {
7556
+ }), uu = me((s) => {
7557
7557
  le(), ue(), ce(), Object.defineProperty(s, "t", { value: !0 }), Object.defineProperty(s, "Deque", { enumerable: !0, get: function() {
7558
7558
  return o.default;
7559
7559
  } }), Object.defineProperty(s, "HashMap", { enumerable: !0, get: function() {
@@ -7575,13 +7575,13 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
7575
7575
  } }), Object.defineProperty(s, "Vector", { enumerable: !0, get: function() {
7576
7576
  return i.default;
7577
7577
  } });
7578
- var e = d(Xc()), t = d(Zc()), r = d(eu()), i = d(tu()), n = d(ru()), o = d(nu()), a = d(su()), l = d(ou()), c = d(au()), u = d(lu());
7578
+ var e = d(Zc()), t = d(eu()), r = d(tu()), i = d(ru()), n = d(nu()), o = d(iu()), a = d(ou()), l = d(au()), c = d(lu()), u = d(cu());
7579
7579
  function d(p) {
7580
7580
  return p && p.t ? p : { default: p };
7581
7581
  }
7582
- }), uu = me((s, e) => {
7582
+ }), du = me((s, e) => {
7583
7583
  le(), ue(), ce();
7584
- var t = cu().OrderedSet, r = vt()("number-allocator:trace"), i = vt()("number-allocator:error");
7584
+ var t = uu().OrderedSet, r = vt()("number-allocator:trace"), i = vt()("number-allocator:error");
7585
7585
  function n(a, l) {
7586
7586
  this.low = a, this.high = l;
7587
7587
  }
@@ -7642,11 +7642,11 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
7642
7642
  }, e.exports = o;
7643
7643
  }), il = me((s, e) => {
7644
7644
  le(), ue(), ce();
7645
- var t = uu();
7645
+ var t = du();
7646
7646
  e.exports.NumberAllocator = t;
7647
- }), du = me((s) => {
7647
+ }), hu = me((s) => {
7648
7648
  le(), ue(), ce(), Object.defineProperty(s, "__esModule", { value: !0 });
7649
- var e = Qc(), t = il(), r = class {
7649
+ var e = Xc(), t = il(), r = class {
7650
7650
  aliasToTopic;
7651
7651
  topicToAlias;
7652
7652
  max;
@@ -7675,13 +7675,13 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
7675
7675
  }
7676
7676
  };
7677
7677
  s.default = r;
7678
- }), hu = me((s) => {
7678
+ }), fu = me((s) => {
7679
7679
  le(), ue(), ce();
7680
7680
  var e = s && s.__importDefault || function(o) {
7681
7681
  return o && o.__esModule ? o : { default: o };
7682
7682
  };
7683
7683
  Object.defineProperty(s, "__esModule", { value: !0 });
7684
- var t = rn(), r = e(du()), i = Zt(), n = (o, a) => {
7684
+ var t = nn(), r = e(hu()), i = Zt(), n = (o, a) => {
7685
7685
  o.log("_handleConnack");
7686
7686
  let { options: l } = o, c = l.protocolVersion === 5 ? a.reasonCode : a.returnCode;
7687
7687
  if (clearTimeout(o.connackTimer), delete o.topicAliasSend, a.properties) {
@@ -7701,7 +7701,7 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
7701
7701
  }
7702
7702
  };
7703
7703
  s.default = n;
7704
- }), fu = me((s) => {
7704
+ }), pu = me((s) => {
7705
7705
  le(), ue(), ce(), Object.defineProperty(s, "__esModule", { value: !0 });
7706
7706
  var e = (t, r, i) => {
7707
7707
  t.log("handling pubrel packet");
@@ -7714,13 +7714,13 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
7714
7714
  });
7715
7715
  };
7716
7716
  s.default = e;
7717
- }), pu = me((s) => {
7717
+ }), mu = me((s) => {
7718
7718
  le(), ue(), ce();
7719
7719
  var e = s && s.__importDefault || function(l) {
7720
7720
  return l && l.__esModule ? l : { default: l };
7721
7721
  };
7722
7722
  Object.defineProperty(s, "__esModule", { value: !0 });
7723
- var t = e(Gc()), r = e(Jc()), i = e(hu()), n = e(rn()), o = e(fu()), a = (l, c, u) => {
7723
+ var t = e(Yc()), r = e(Qc()), i = e(fu()), n = e(nn()), o = e(pu()), a = (l, c, u) => {
7724
7724
  let { options: d } = l;
7725
7725
  if (d.protocolVersion === 5 && d.properties && d.properties.maximumPacketSize && d.properties.maximumPacketSize < c.length) return l.emit("error", new Error(`exceeding packets size ${c.cmd}`)), l.end({ reasonCode: 149, properties: { reasonString: "Maximum packet size was exceeded" } }), l;
7726
7726
  switch (l.log("_handlePacket :: emitting packetreceive"), l.emit("packetreceive", c), c.cmd) {
@@ -7778,7 +7778,7 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
7778
7778
  }
7779
7779
  };
7780
7780
  s.default = e;
7781
- }), mu = me((s) => {
7781
+ }), gu = me((s) => {
7782
7782
  le(), ue(), ce(), Object.defineProperty(s, "__esModule", { value: !0 });
7783
7783
  var e = class {
7784
7784
  aliasToTopic;
@@ -7798,7 +7798,7 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
7798
7798
  }
7799
7799
  };
7800
7800
  s.default = e;
7801
- }), gu = me((s) => {
7801
+ }), bu = me((s) => {
7802
7802
  le(), ue(), ce();
7803
7803
  var e = s && s.__importDefault || function(n) {
7804
7804
  return n && n.__esModule ? n : { default: n };
@@ -7807,7 +7807,7 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
7807
7807
  var t = e((Ut(), Re(Pt))), r = Zt(), i = class {
7808
7808
  };
7809
7809
  s.TypedEventEmitter = i, (0, r.applyMixin)(i, t.default);
7810
- }), nn = me((s, e) => {
7810
+ }), sn = me((s, e) => {
7811
7811
  le(), ue(), ce();
7812
7812
  function t(r) {
7813
7813
  "@babel/helpers - typeof";
@@ -7818,9 +7818,9 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
7818
7818
  }, e.exports.__esModule = !0, e.exports.default = e.exports, t(r);
7819
7819
  }
7820
7820
  e.exports = t, e.exports.__esModule = !0, e.exports.default = e.exports;
7821
- }), bu = me((s, e) => {
7821
+ }), yu = me((s, e) => {
7822
7822
  le(), ue(), ce();
7823
- var t = nn().default;
7823
+ var t = sn().default;
7824
7824
  function r(i, n) {
7825
7825
  if (t(i) != "object" || !i) return i;
7826
7826
  var o = i[Symbol.toPrimitive];
@@ -7832,28 +7832,28 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
7832
7832
  return (n === "string" ? String : Number)(i);
7833
7833
  }
7834
7834
  e.exports = r, e.exports.__esModule = !0, e.exports.default = e.exports;
7835
- }), yu = me((s, e) => {
7835
+ }), vu = me((s, e) => {
7836
7836
  le(), ue(), ce();
7837
- var t = nn().default, r = bu();
7837
+ var t = sn().default, r = yu();
7838
7838
  function i(n) {
7839
7839
  var o = r(n, "string");
7840
7840
  return t(o) == "symbol" ? o : o + "";
7841
7841
  }
7842
7842
  e.exports = i, e.exports.__esModule = !0, e.exports.default = e.exports;
7843
- }), vu = me((s, e) => {
7843
+ }), wu = me((s, e) => {
7844
7844
  le(), ue(), ce();
7845
- var t = yu();
7845
+ var t = vu();
7846
7846
  function r(i, n, o) {
7847
7847
  return (n = t(n)) in i ? Object.defineProperty(i, n, { value: o, enumerable: !0, configurable: !0, writable: !0 }) : i[n] = o, i;
7848
7848
  }
7849
7849
  e.exports = r, e.exports.__esModule = !0, e.exports.default = e.exports;
7850
- }), wu = me((s, e) => {
7850
+ }), ku = me((s, e) => {
7851
7851
  le(), ue(), ce();
7852
7852
  function t(r) {
7853
7853
  if (Array.isArray(r)) return r;
7854
7854
  }
7855
7855
  e.exports = t, e.exports.__esModule = !0, e.exports.default = e.exports;
7856
- }), ku = me((s, e) => {
7856
+ }), xu = me((s, e) => {
7857
7857
  le(), ue(), ce();
7858
7858
  function t(r, i) {
7859
7859
  var n = r == null ? null : typeof Symbol < "u" && r[Symbol.iterator] || r["@@iterator"];
@@ -7877,7 +7877,7 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
7877
7877
  }
7878
7878
  }
7879
7879
  e.exports = t, e.exports.__esModule = !0, e.exports.default = e.exports;
7880
- }), xu = me((s, e) => {
7880
+ }), _u = me((s, e) => {
7881
7881
  le(), ue(), ce();
7882
7882
  function t(r, i) {
7883
7883
  (i == null || i > r.length) && (i = r.length);
@@ -7885,9 +7885,9 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
7885
7885
  return o;
7886
7886
  }
7887
7887
  e.exports = t, e.exports.__esModule = !0, e.exports.default = e.exports;
7888
- }), _u = me((s, e) => {
7888
+ }), Su = me((s, e) => {
7889
7889
  le(), ue(), ce();
7890
- var t = xu();
7890
+ var t = _u();
7891
7891
  function r(i, n) {
7892
7892
  if (i) {
7893
7893
  if (typeof i == "string") return t(i, n);
@@ -7896,16 +7896,16 @@ var lr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
7896
7896
  }
7897
7897
  }
7898
7898
  e.exports = r, e.exports.__esModule = !0, e.exports.default = e.exports;
7899
- }), Su = me((s, e) => {
7899
+ }), Eu = me((s, e) => {
7900
7900
  le(), ue(), ce();
7901
7901
  function t() {
7902
7902
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
7903
7903
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
7904
7904
  }
7905
7905
  e.exports = t, e.exports.__esModule = !0, e.exports.default = e.exports;
7906
- }), Eu = me((s, e) => {
7906
+ }), Au = me((s, e) => {
7907
7907
  le(), ue(), ce();
7908
- var t = wu(), r = ku(), i = _u(), n = Su();
7908
+ var t = ku(), r = xu(), i = Su(), n = Eu();
7909
7909
  function o(a, l) {
7910
7910
  return t(a) || r(a, l) || i(a, l) || n();
7911
7911
  }
@@ -7938,7 +7938,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
7938
7938
  }, c = /* @__PURE__ */ new WeakMap(), u = i(c), d = l(u, c), p = r(d);
7939
7939
  t.addUniqueNumber = p, t.generateUniqueNumber = d;
7940
7940
  });
7941
- }), Au = me((s, e) => {
7941
+ }), Iu = me((s, e) => {
7942
7942
  le(), ue(), ce();
7943
7943
  function t(i, n, o, a, l, c, u) {
7944
7944
  try {
@@ -8094,7 +8094,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8094
8094
  return new r(t().w(n, o, a, l), c || Promise);
8095
8095
  }
8096
8096
  e.exports = i, e.exports.__esModule = !0, e.exports.default = e.exports;
8097
- }), Iu = me((s, e) => {
8097
+ }), Tu = me((s, e) => {
8098
8098
  le(), ue(), ce();
8099
8099
  var t = dl();
8100
8100
  function r(i, n, o, a, l) {
@@ -8104,7 +8104,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8104
8104
  });
8105
8105
  }
8106
8106
  e.exports = r, e.exports.__esModule = !0, e.exports.default = e.exports;
8107
- }), Tu = me((s, e) => {
8107
+ }), Cu = me((s, e) => {
8108
8108
  le(), ue(), ce();
8109
8109
  function t(r) {
8110
8110
  var i = Object(r), n = [];
@@ -8115,9 +8115,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8115
8115
  };
8116
8116
  }
8117
8117
  e.exports = t, e.exports.__esModule = !0, e.exports.default = e.exports;
8118
- }), Cu = me((s, e) => {
8118
+ }), Pu = me((s, e) => {
8119
8119
  le(), ue(), ce();
8120
- var t = nn().default;
8120
+ var t = sn().default;
8121
8121
  function r(i) {
8122
8122
  if (i != null) {
8123
8123
  var n = i[typeof Symbol == "function" && Symbol.iterator || "@@iterator"], o = 0;
@@ -8130,9 +8130,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8130
8130
  throw new TypeError(t(i) + " is not iterable");
8131
8131
  }
8132
8132
  e.exports = r, e.exports.__esModule = !0, e.exports.default = e.exports;
8133
- }), Pu = me((s, e) => {
8133
+ }), Ou = me((s, e) => {
8134
8134
  le(), ue(), ce();
8135
- var t = al(), r = cl(), i = Iu(), n = dl(), o = ul(), a = Tu(), l = Cu();
8135
+ var t = al(), r = cl(), i = Tu(), n = dl(), o = ul(), a = Cu(), l = Pu();
8136
8136
  function c() {
8137
8137
  var u = r(), d = u.m(c), p = (Object.getPrototypeOf ? Object.getPrototypeOf(d) : d.__proto__).constructor;
8138
8138
  function g(y) {
@@ -8179,18 +8179,18 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8179
8179
  }, e.exports.__esModule = !0, e.exports.default = e.exports)();
8180
8180
  }
8181
8181
  e.exports = c, e.exports.__esModule = !0, e.exports.default = e.exports;
8182
- }), Ou = me((s, e) => {
8182
+ }), Lu = me((s, e) => {
8183
8183
  le(), ue(), ce();
8184
- var t = Pu()();
8184
+ var t = Ou()();
8185
8185
  e.exports = t;
8186
8186
  try {
8187
8187
  regeneratorRuntime = t;
8188
8188
  } catch {
8189
8189
  typeof globalThis == "object" ? globalThis.regeneratorRuntime = t : Function("r", "regeneratorRuntime = r")(t);
8190
8190
  }
8191
- }), Lu = me((s, e) => {
8191
+ }), Mu = me((s, e) => {
8192
8192
  le(), ue(), ce(), (function(t, r) {
8193
- typeof s == "object" && typeof e < "u" ? r(s, vu(), Eu(), ol(), Au(), Ou()) : typeof define == "function" && define.amd ? define(["exports", "@babel/runtime/helpers/defineProperty", "@babel/runtime/helpers/slicedToArray", "fast-unique-numbers", "@babel/runtime/helpers/asyncToGenerator", "@babel/runtime/regenerator"], r) : (t = typeof globalThis < "u" ? globalThis : t || self, r(t.brokerFactory = {}, t._defineProperty, t._slicedToArray, t.fastUniqueNumbers, t._asyncToGenerator, t._regeneratorRuntime));
8193
+ typeof s == "object" && typeof e < "u" ? r(s, wu(), Au(), ol(), Iu(), Lu()) : typeof define == "function" && define.amd ? define(["exports", "@babel/runtime/helpers/defineProperty", "@babel/runtime/helpers/slicedToArray", "fast-unique-numbers", "@babel/runtime/helpers/asyncToGenerator", "@babel/runtime/regenerator"], r) : (t = typeof globalThis < "u" ? globalThis : t || self, r(t.brokerFactory = {}, t._defineProperty, t._slicedToArray, t.fastUniqueNumbers, t._asyncToGenerator, t._regeneratorRuntime));
8194
8194
  })(s, function(t, r, i, n, o, a) {
8195
8195
  var l = function(m) {
8196
8196
  return typeof m.start == "function";
@@ -8319,9 +8319,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8319
8319
  };
8320
8320
  t.createBroker = w;
8321
8321
  });
8322
- }), Mu = me((s, e) => {
8322
+ }), Nu = me((s, e) => {
8323
8323
  le(), ue(), ce(), (function(t, r) {
8324
- typeof s == "object" && typeof e < "u" ? r(s, nn(), Lu(), ol()) : typeof define == "function" && define.amd ? define(["exports", "@babel/runtime/helpers/typeof", "broker-factory", "fast-unique-numbers"], r) : (t = typeof globalThis < "u" ? globalThis : t || self, r(t.workerTimersBroker = {}, t._typeof, t.brokerFactory, t.fastUniqueNumbers));
8324
+ typeof s == "object" && typeof e < "u" ? r(s, sn(), Mu(), ol()) : typeof define == "function" && define.amd ? define(["exports", "@babel/runtime/helpers/typeof", "broker-factory", "fast-unique-numbers"], r) : (t = typeof globalThis < "u" ? globalThis : t || self, r(t.workerTimersBroker = {}, t._typeof, t.brokerFactory, t.fastUniqueNumbers));
8325
8325
  })(s, function(t, r, i, n) {
8326
8326
  var o = /* @__PURE__ */ new Map([[0, null]]), a = /* @__PURE__ */ new Map([[0, null]]), l = i.createBroker({ clearInterval: function(u) {
8327
8327
  var d = u.call;
@@ -8369,9 +8369,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8369
8369
  };
8370
8370
  t.load = c, t.wrap = l;
8371
8371
  });
8372
- }), Nu = me((s, e) => {
8372
+ }), Ru = me((s, e) => {
8373
8373
  le(), ue(), ce(), (function(t, r) {
8374
- typeof s == "object" && typeof e < "u" ? r(s, Mu()) : typeof define == "function" && define.amd ? define(["exports", "worker-timers-broker"], r) : (t = typeof globalThis < "u" ? globalThis : t || self, r(t.workerTimers = {}, t.workerTimersBroker));
8374
+ typeof s == "object" && typeof e < "u" ? r(s, Nu()) : typeof define == "function" && define.amd ? define(["exports", "worker-timers-broker"], r) : (t = typeof globalThis < "u" ? globalThis : t || self, r(t.workerTimers = {}, t.workerTimersBroker));
8375
8375
  })(s, function(t, r) {
8376
8376
  var i = function(d, p) {
8377
8377
  var g = null;
@@ -8395,11 +8395,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8395
8395
  };
8396
8396
  t.clearInterval = a, t.clearTimeout = l, t.setInterval = c, t.setTimeout = u;
8397
8397
  });
8398
- }), sn = me((s) => {
8398
+ }), on = me((s) => {
8399
8399
  le(), ue(), ce(), Object.defineProperty(s, "__esModule", { value: !0 }), s.isReactNativeBrowser = s.isWebWorker = void 0;
8400
8400
  var e = () => typeof window < "u" ? typeof navigator < "u" && navigator.userAgent?.toLowerCase().indexOf(" electron/") > -1 && je?.versions ? !Object.prototype.hasOwnProperty.call(je.versions, "electron") : typeof window.document < "u" : !1, t = () => !!(typeof self == "object" && self?.constructor?.name?.includes("WorkerGlobalScope") && typeof Deno > "u"), r = () => typeof navigator < "u" && navigator.product === "ReactNative", i = e() || t() || r();
8401
8401
  s.isWebWorker = t(), s.isReactNativeBrowser = r(), s.default = i;
8402
- }), Ru = me((s) => {
8402
+ }), ju = me((s) => {
8403
8403
  le(), ue(), ce();
8404
8404
  var e = s && s.__createBinding || (Object.create ? function(c, u, d, p) {
8405
8405
  p === void 0 && (p = d);
@@ -8429,7 +8429,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8429
8429
  };
8430
8430
  })();
8431
8431
  Object.defineProperty(s, "__esModule", { value: !0 });
8432
- var i = Nu(), n = r(sn()), o = { set: i.setInterval, clear: i.clearInterval }, a = { set: (c, u) => setInterval(c, u), clear: (c) => clearInterval(c) }, l = (c) => {
8432
+ var i = Ru(), n = r(on()), o = { set: i.setInterval, clear: i.clearInterval }, a = { set: (c, u) => setInterval(c, u), clear: (c) => clearInterval(c) }, l = (c) => {
8433
8433
  switch (c) {
8434
8434
  case "native":
8435
8435
  return a;
@@ -8446,7 +8446,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8446
8446
  return i && i.__esModule ? i : { default: i };
8447
8447
  };
8448
8448
  Object.defineProperty(s, "__esModule", { value: !0 });
8449
- var t = e(Ru()), r = class {
8449
+ var t = e(ju()), r = class {
8450
8450
  _keepalive;
8451
8451
  timerId;
8452
8452
  timer;
@@ -8519,7 +8519,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8519
8519
  return v && v.__esModule ? v : { default: v };
8520
8520
  };
8521
8521
  Object.defineProperty(s, "__esModule", { value: !0 });
8522
- var n = i(zc()), o = Ft(), a = i(Kc()), l = i(vt()), c = r(Fa()), u = i(qa()), d = i(pu()), p = i(sl()), g = i(mu()), h = Zt(), b = gu(), y = i(hl()), w = r(sn()), m = globalThis.setImmediate || ((...v) => {
8522
+ var n = i(Vc()), o = Ft(), a = i(Gc()), l = i(vt()), c = r(Fa()), u = i(qa()), d = i(mu()), p = i(sl()), g = i(gu()), h = Zt(), b = bu(), y = i(hl()), w = r(on()), m = globalThis.setImmediate || ((...v) => {
8523
8523
  let E = v.shift();
8524
8524
  (0, h.nextTick)(() => {
8525
8525
  E(...v);
@@ -9021,7 +9021,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
9021
9021
  }
9022
9022
  };
9023
9023
  s.default = _;
9024
- }), ju = me((s) => {
9024
+ }), Du = me((s) => {
9025
9025
  le(), ue(), ce(), Object.defineProperty(s, "__esModule", { value: !0 });
9026
9026
  var e = il(), t = class {
9027
9027
  numberAllocator;
@@ -9047,8 +9047,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
9047
9047
  };
9048
9048
  s.default = t;
9049
9049
  });
9050
- function Du() {
9051
- if (Oi) return Er;
9050
+ function $u() {
9051
+ if (Oi) return Ar;
9052
9052
  Oi = !0;
9053
9053
  let s = 2147483647, e = 36, t = 1, r = 26, i = 38, n = 700, o = 72, a = 128, l = "-", c = /^xn--/, u = /[^\0-\x7F]/, d = /[\x2E\u3002\uFF0E\uFF61]/g, p = { overflow: "Overflow: input needs wider integers to process", "not-basic": "Illegal input >= 0x80 (not a basic code point)", "invalid-input": "Invalid input" }, g = e - t, h = Math.floor, b = String.fromCharCode;
9054
9054
  function y(O) {
@@ -9128,7 +9128,7 @@ function Du() {
9128
9128
  }
9129
9129
  return j.join("");
9130
9130
  };
9131
- return Er = { version: "2.3.1", ucs2: { decode: k, encode: _ }, decode: I, encode: P, toASCII: function(O) {
9131
+ return Ar = { version: "2.3.1", ucs2: { decode: k, encode: _ }, decode: I, encode: P, toASCII: function(O) {
9132
9132
  return m(O, function(j) {
9133
9133
  return u.test(j) ? "xn--" + P(j) : j;
9134
9134
  });
@@ -9136,12 +9136,12 @@ function Du() {
9136
9136
  return m(O, function(j) {
9137
9137
  return c.test(j) ? I(j.slice(4).toLowerCase()) : j;
9138
9138
  });
9139
- } }, Er;
9139
+ } }, Ar;
9140
9140
  }
9141
- var Er, Oi, Tt, $u = Qe(() => {
9142
- le(), ue(), ce(), Er = {}, Oi = !1, Tt = Du(), Tt.decode, Tt.encode, Tt.toASCII, Tt.toUnicode, Tt.ucs2, Tt.version;
9141
+ var Ar, Oi, Tt, Uu = Qe(() => {
9142
+ le(), ue(), ce(), Ar = {}, Oi = !1, Tt = $u(), Tt.decode, Tt.encode, Tt.toASCII, Tt.toUnicode, Tt.ucs2, Tt.version;
9143
9143
  });
9144
- function Uu() {
9144
+ function Bu() {
9145
9145
  return Mi || (Mi = !0, Li = function() {
9146
9146
  if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function") return !1;
9147
9147
  if (typeof Symbol.iterator == "symbol") return !0;
@@ -9160,45 +9160,45 @@ function Uu() {
9160
9160
  return !0;
9161
9161
  }), Li;
9162
9162
  }
9163
- function Bu() {
9163
+ function Fu() {
9164
9164
  return Ri || (Ri = !0, Ni = Error), Ni;
9165
9165
  }
9166
- function Fu() {
9166
+ function qu() {
9167
9167
  return Di || (Di = !0, ji = EvalError), ji;
9168
9168
  }
9169
- function qu() {
9169
+ function Hu() {
9170
9170
  return Ui || (Ui = !0, $i = RangeError), $i;
9171
9171
  }
9172
- function Hu() {
9172
+ function Wu() {
9173
9173
  return Fi || (Fi = !0, Bi = ReferenceError), Bi;
9174
9174
  }
9175
9175
  function fl() {
9176
9176
  return Hi || (Hi = !0, qi = SyntaxError), qi;
9177
9177
  }
9178
- function gr() {
9178
+ function br() {
9179
9179
  return zi || (zi = !0, Wi = TypeError), Wi;
9180
9180
  }
9181
- function Wu() {
9181
+ function zu() {
9182
9182
  return Ki || (Ki = !0, Vi = URIError), Vi;
9183
9183
  }
9184
- function zu() {
9185
- if (Gi) return Ar;
9184
+ function Vu() {
9185
+ if (Gi) return Ir;
9186
9186
  Gi = !0;
9187
- var s = typeof Symbol < "u" && Symbol, e = Uu();
9188
- return Ar = function() {
9187
+ var s = typeof Symbol < "u" && Symbol, e = Bu();
9188
+ return Ir = function() {
9189
9189
  return typeof s != "function" || typeof Symbol != "function" || typeof s("foo") != "symbol" || typeof /* @__PURE__ */ Symbol("bar") != "symbol" ? !1 : e();
9190
- }, Ar;
9190
+ }, Ir;
9191
9191
  }
9192
- function Vu() {
9193
- if (Yi) return Ir;
9192
+ function Ku() {
9193
+ if (Yi) return Tr;
9194
9194
  Yi = !0;
9195
9195
  var s = { __proto__: null, foo: {} }, e = Object;
9196
- return Ir = function() {
9196
+ return Tr = function() {
9197
9197
  return { __proto__: s }.foo === s.foo && !(s instanceof e);
9198
- }, Ir;
9198
+ }, Tr;
9199
9199
  }
9200
- function Ku() {
9201
- if (Ji) return Tr;
9200
+ function Gu() {
9201
+ if (Ji) return Cr;
9202
9202
  Ji = !0;
9203
9203
  var s = "Function.prototype.bind called on incompatible ", e = Object.prototype.toString, t = Math.max, r = "[object Function]", i = function(a, l) {
9204
9204
  for (var c = [], u = 0; u < a.length; u += 1) c[u] = a[u];
@@ -9211,7 +9211,7 @@ function Ku() {
9211
9211
  for (var c = "", u = 0; u < a.length; u += 1) c += a[u], u + 1 < a.length && (c += l);
9212
9212
  return c;
9213
9213
  };
9214
- return Tr = function(a) {
9214
+ return Cr = function(a) {
9215
9215
  var l = this;
9216
9216
  if (typeof l != "function" || e.apply(l) !== r) throw new TypeError(s + l);
9217
9217
  for (var c = n(arguments, 1), u, d = function() {
@@ -9227,24 +9227,24 @@ function Ku() {
9227
9227
  b.prototype = l.prototype, u.prototype = new b(), b.prototype = null;
9228
9228
  }
9229
9229
  return u;
9230
- }, Tr;
9230
+ }, Cr;
9231
9231
  }
9232
9232
  function Is() {
9233
- if (Qi) return Cr;
9233
+ if (Qi) return Pr;
9234
9234
  Qi = !0;
9235
- var s = Ku();
9236
- return Cr = Function.prototype.bind || s, Cr;
9235
+ var s = Gu();
9236
+ return Pr = Function.prototype.bind || s, Pr;
9237
9237
  }
9238
- function Gu() {
9239
- if (Xi) return Pr;
9238
+ function Yu() {
9239
+ if (Xi) return Or;
9240
9240
  Xi = !0;
9241
9241
  var s = Function.prototype.call, e = Object.prototype.hasOwnProperty, t = Is();
9242
- return Pr = t.call(s, e), Pr;
9242
+ return Or = t.call(s, e), Or;
9243
9243
  }
9244
9244
  function er() {
9245
- if (Zi) return Or;
9245
+ if (Zi) return Lr;
9246
9246
  Zi = !0;
9247
- var s, e = Bu(), t = Fu(), r = qu(), i = Hu(), n = fl(), o = gr(), a = Wu(), l = Function, c = function(z) {
9247
+ var s, e = Fu(), t = qu(), r = Hu(), i = Wu(), n = fl(), o = br(), a = zu(), l = Function, c = function(z) {
9248
9248
  try {
9249
9249
  return l('"use strict"; return (' + z + ").constructor;")();
9250
9250
  } catch {
@@ -9267,7 +9267,7 @@ function er() {
9267
9267
  return d;
9268
9268
  }
9269
9269
  }
9270
- })() : d, g = zu()(), h = Vu()(), b = Object.getPrototypeOf || (h ? function(z) {
9270
+ })() : d, g = Vu()(), h = Ku()(), b = Object.getPrototypeOf || (h ? function(z) {
9271
9271
  return z.__proto__;
9272
9272
  } : null), y = {}, w = typeof Uint8Array > "u" || !b ? s : b(Uint8Array), m = { __proto__: null, "%AggregateError%": typeof AggregateError > "u" ? s : AggregateError, "%Array%": Array, "%ArrayBuffer%": typeof ArrayBuffer > "u" ? s : ArrayBuffer, "%ArrayIteratorPrototype%": g && b ? b([][Symbol.iterator]()) : s, "%AsyncFromSyncIteratorPrototype%": s, "%AsyncFunction%": y, "%AsyncGenerator%": y, "%AsyncGeneratorFunction%": y, "%AsyncIteratorPrototype%": y, "%Atomics%": typeof Atomics > "u" ? s : Atomics, "%BigInt%": typeof BigInt > "u" ? s : BigInt, "%BigInt64Array%": typeof BigInt64Array > "u" ? s : BigInt64Array, "%BigUint64Array%": typeof BigUint64Array > "u" ? s : BigUint64Array, "%Boolean%": Boolean, "%DataView%": typeof DataView > "u" ? s : DataView, "%Date%": Date, "%decodeURI%": decodeURI, "%decodeURIComponent%": decodeURIComponent, "%encodeURI%": encodeURI, "%encodeURIComponent%": encodeURIComponent, "%Error%": e, "%eval%": eval, "%EvalError%": t, "%Float32Array%": typeof Float32Array > "u" ? s : Float32Array, "%Float64Array%": typeof Float64Array > "u" ? s : Float64Array, "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? s : FinalizationRegistry, "%Function%": l, "%GeneratorFunction%": y, "%Int8Array%": typeof Int8Array > "u" ? s : Int8Array, "%Int16Array%": typeof Int16Array > "u" ? s : Int16Array, "%Int32Array%": typeof Int32Array > "u" ? s : Int32Array, "%isFinite%": isFinite, "%isNaN%": isNaN, "%IteratorPrototype%": g && b ? b(b([][Symbol.iterator]())) : s, "%JSON%": typeof JSON == "object" ? JSON : s, "%Map%": typeof Map > "u" ? s : Map, "%MapIteratorPrototype%": typeof Map > "u" || !g || !b ? s : b((/* @__PURE__ */ new Map())[Symbol.iterator]()), "%Math%": Math, "%Number%": Number, "%Object%": Object, "%parseFloat%": parseFloat, "%parseInt%": parseInt, "%Promise%": typeof Promise > "u" ? s : Promise, "%Proxy%": typeof Proxy > "u" ? s : Proxy, "%RangeError%": r, "%ReferenceError%": i, "%Reflect%": typeof Reflect > "u" ? s : Reflect, "%RegExp%": RegExp, "%Set%": typeof Set > "u" ? s : Set, "%SetIteratorPrototype%": typeof Set > "u" || !g || !b ? s : b((/* @__PURE__ */ new Set())[Symbol.iterator]()), "%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? s : SharedArrayBuffer, "%String%": String, "%StringIteratorPrototype%": g && b ? b(""[Symbol.iterator]()) : s, "%Symbol%": g ? Symbol : s, "%SyntaxError%": n, "%ThrowTypeError%": p, "%TypedArray%": w, "%TypeError%": o, "%Uint8Array%": typeof Uint8Array > "u" ? s : Uint8Array, "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? s : Uint8ClampedArray, "%Uint16Array%": typeof Uint16Array > "u" ? s : Uint16Array, "%Uint32Array%": typeof Uint32Array > "u" ? s : Uint32Array, "%URIError%": a, "%WeakMap%": typeof WeakMap > "u" ? s : WeakMap, "%WeakRef%": typeof WeakRef > "u" ? s : WeakRef, "%WeakSet%": typeof WeakSet > "u" ? s : WeakSet };
9273
9273
  if (b) try {
@@ -9289,7 +9289,7 @@ function er() {
9289
9289
  G && b && (ne = b(G.prototype));
9290
9290
  }
9291
9291
  return m[W] = ne, ne;
9292
- }, v = { __proto__: null, "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"], "%ArrayPrototype%": ["Array", "prototype"], "%ArrayProto_entries%": ["Array", "prototype", "entries"], "%ArrayProto_forEach%": ["Array", "prototype", "forEach"], "%ArrayProto_keys%": ["Array", "prototype", "keys"], "%ArrayProto_values%": ["Array", "prototype", "values"], "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"], "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"], "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"], "%BooleanPrototype%": ["Boolean", "prototype"], "%DataViewPrototype%": ["DataView", "prototype"], "%DatePrototype%": ["Date", "prototype"], "%ErrorPrototype%": ["Error", "prototype"], "%EvalErrorPrototype%": ["EvalError", "prototype"], "%Float32ArrayPrototype%": ["Float32Array", "prototype"], "%Float64ArrayPrototype%": ["Float64Array", "prototype"], "%FunctionPrototype%": ["Function", "prototype"], "%Generator%": ["GeneratorFunction", "prototype"], "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"], "%Int8ArrayPrototype%": ["Int8Array", "prototype"], "%Int16ArrayPrototype%": ["Int16Array", "prototype"], "%Int32ArrayPrototype%": ["Int32Array", "prototype"], "%JSONParse%": ["JSON", "parse"], "%JSONStringify%": ["JSON", "stringify"], "%MapPrototype%": ["Map", "prototype"], "%NumberPrototype%": ["Number", "prototype"], "%ObjectPrototype%": ["Object", "prototype"], "%ObjProto_toString%": ["Object", "prototype", "toString"], "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"], "%PromisePrototype%": ["Promise", "prototype"], "%PromiseProto_then%": ["Promise", "prototype", "then"], "%Promise_all%": ["Promise", "all"], "%Promise_reject%": ["Promise", "reject"], "%Promise_resolve%": ["Promise", "resolve"], "%RangeErrorPrototype%": ["RangeError", "prototype"], "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"], "%RegExpPrototype%": ["RegExp", "prototype"], "%SetPrototype%": ["Set", "prototype"], "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"], "%StringPrototype%": ["String", "prototype"], "%SymbolPrototype%": ["Symbol", "prototype"], "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"], "%TypedArrayPrototype%": ["TypedArray", "prototype"], "%TypeErrorPrototype%": ["TypeError", "prototype"], "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"], "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"], "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"], "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"], "%URIErrorPrototype%": ["URIError", "prototype"], "%WeakMapPrototype%": ["WeakMap", "prototype"], "%WeakSetPrototype%": ["WeakSet", "prototype"] }, E = Is(), S = Gu(), I = E.call(Function.call, Array.prototype.concat), P = E.call(Function.apply, Array.prototype.splice), O = E.call(Function.call, String.prototype.replace), j = E.call(Function.call, String.prototype.slice), T = E.call(Function.call, RegExp.prototype.exec), F = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, $ = /\\(\\)?/g, U = function(z) {
9292
+ }, v = { __proto__: null, "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"], "%ArrayPrototype%": ["Array", "prototype"], "%ArrayProto_entries%": ["Array", "prototype", "entries"], "%ArrayProto_forEach%": ["Array", "prototype", "forEach"], "%ArrayProto_keys%": ["Array", "prototype", "keys"], "%ArrayProto_values%": ["Array", "prototype", "values"], "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"], "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"], "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"], "%BooleanPrototype%": ["Boolean", "prototype"], "%DataViewPrototype%": ["DataView", "prototype"], "%DatePrototype%": ["Date", "prototype"], "%ErrorPrototype%": ["Error", "prototype"], "%EvalErrorPrototype%": ["EvalError", "prototype"], "%Float32ArrayPrototype%": ["Float32Array", "prototype"], "%Float64ArrayPrototype%": ["Float64Array", "prototype"], "%FunctionPrototype%": ["Function", "prototype"], "%Generator%": ["GeneratorFunction", "prototype"], "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"], "%Int8ArrayPrototype%": ["Int8Array", "prototype"], "%Int16ArrayPrototype%": ["Int16Array", "prototype"], "%Int32ArrayPrototype%": ["Int32Array", "prototype"], "%JSONParse%": ["JSON", "parse"], "%JSONStringify%": ["JSON", "stringify"], "%MapPrototype%": ["Map", "prototype"], "%NumberPrototype%": ["Number", "prototype"], "%ObjectPrototype%": ["Object", "prototype"], "%ObjProto_toString%": ["Object", "prototype", "toString"], "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"], "%PromisePrototype%": ["Promise", "prototype"], "%PromiseProto_then%": ["Promise", "prototype", "then"], "%Promise_all%": ["Promise", "all"], "%Promise_reject%": ["Promise", "reject"], "%Promise_resolve%": ["Promise", "resolve"], "%RangeErrorPrototype%": ["RangeError", "prototype"], "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"], "%RegExpPrototype%": ["RegExp", "prototype"], "%SetPrototype%": ["Set", "prototype"], "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"], "%StringPrototype%": ["String", "prototype"], "%SymbolPrototype%": ["Symbol", "prototype"], "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"], "%TypedArrayPrototype%": ["TypedArray", "prototype"], "%TypeErrorPrototype%": ["TypeError", "prototype"], "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"], "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"], "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"], "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"], "%URIErrorPrototype%": ["URIError", "prototype"], "%WeakMapPrototype%": ["WeakMap", "prototype"], "%WeakSetPrototype%": ["WeakSet", "prototype"] }, E = Is(), S = Yu(), I = E.call(Function.call, Array.prototype.concat), P = E.call(Function.apply, Array.prototype.splice), O = E.call(Function.call, String.prototype.replace), j = E.call(Function.call, String.prototype.slice), T = E.call(Function.call, RegExp.prototype.exec), F = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, $ = /\\(\\)?/g, U = function(z) {
9293
9293
  var W = j(z, 0, 1), ne = j(z, -1);
9294
9294
  if (W === "%" && ne !== "%") throw new n("invalid intrinsic syntax, expected closing `%`");
9295
9295
  if (ne === "%" && W !== "%") throw new n("invalid intrinsic syntax, expected opening `%`");
@@ -9306,7 +9306,7 @@ function er() {
9306
9306
  }
9307
9307
  throw new n("intrinsic " + z + " does not exist!");
9308
9308
  };
9309
- return Or = function(z, W) {
9309
+ return Lr = function(z, W) {
9310
9310
  if (typeof z != "string" || z.length === 0) throw new o("intrinsic name must be a non-empty string");
9311
9311
  if (arguments.length > 1 && typeof W != "boolean") throw new o('"allowMissing" argument must be a boolean');
9312
9312
  if (T(/^%?[^%]*%?$/, z) === null) throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
@@ -9329,10 +9329,10 @@ function er() {
9329
9329
  }
9330
9330
  }
9331
9331
  return Y;
9332
- }, Or;
9332
+ }, Lr;
9333
9333
  }
9334
9334
  function Ts() {
9335
- if (es) return Lr;
9335
+ if (es) return Mr;
9336
9336
  es = !0;
9337
9337
  var s = er(), e = s("%Object.defineProperty%", !0) || !1;
9338
9338
  if (e) try {
@@ -9340,10 +9340,10 @@ function Ts() {
9340
9340
  } catch {
9341
9341
  e = !1;
9342
9342
  }
9343
- return Lr = e, Lr;
9343
+ return Mr = e, Mr;
9344
9344
  }
9345
9345
  function pl() {
9346
- if (ts) return Mr;
9346
+ if (ts) return Nr;
9347
9347
  ts = !0;
9348
9348
  var s = er(), e = s("%Object.getOwnPropertyDescriptor%", !0);
9349
9349
  if (e) try {
@@ -9351,13 +9351,13 @@ function pl() {
9351
9351
  } catch {
9352
9352
  e = null;
9353
9353
  }
9354
- return Mr = e, Mr;
9354
+ return Nr = e, Nr;
9355
9355
  }
9356
- function Yu() {
9357
- if (rs) return Nr;
9356
+ function Ju() {
9357
+ if (rs) return Rr;
9358
9358
  rs = !0;
9359
- var s = Ts(), e = fl(), t = gr(), r = pl();
9360
- return Nr = function(i, n, o) {
9359
+ var s = Ts(), e = fl(), t = br(), r = pl();
9360
+ return Rr = function(i, n, o) {
9361
9361
  if (!i || typeof i != "object" && typeof i != "function") throw new t("`obj` must be an object or a function`");
9362
9362
  if (typeof n != "string" && typeof n != "symbol") throw new t("`property` must be a string or a symbol`");
9363
9363
  if (arguments.length > 3 && typeof arguments[3] != "boolean" && arguments[3] !== null) throw new t("`nonEnumerable`, if provided, must be a boolean or null");
@@ -9368,10 +9368,10 @@ function Yu() {
9368
9368
  if (s) s(i, n, { configurable: c === null && d ? d.configurable : !c, enumerable: a === null && d ? d.enumerable : !a, value: o, writable: l === null && d ? d.writable : !l });
9369
9369
  else if (u || !a && !l && !c) i[n] = o;
9370
9370
  else throw new e("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
9371
- }, Nr;
9371
+ }, Rr;
9372
9372
  }
9373
- function Ju() {
9374
- if (ns) return Rr;
9373
+ function Qu() {
9374
+ if (ns) return jr;
9375
9375
  ns = !0;
9376
9376
  var s = Ts(), e = function() {
9377
9377
  return !!s;
@@ -9383,13 +9383,13 @@ function Ju() {
9383
9383
  } catch {
9384
9384
  return !0;
9385
9385
  }
9386
- }, Rr = e, Rr;
9386
+ }, jr = e, jr;
9387
9387
  }
9388
- function Qu() {
9389
- if (is) return jr;
9388
+ function Xu() {
9389
+ if (is) return Dr;
9390
9390
  is = !0;
9391
- var s = er(), e = Yu(), t = Ju()(), r = pl(), i = gr(), n = s("%Math.floor%");
9392
- return jr = function(o, a) {
9391
+ var s = er(), e = Ju(), t = Qu()(), r = pl(), i = br(), n = s("%Math.floor%");
9392
+ return Dr = function(o, a) {
9393
9393
  if (typeof o != "function") throw new i("`fn` is not a function");
9394
9394
  if (typeof a != "number" || a < 0 || a > 4294967295 || n(a) !== a) throw new i("`length` must be a positive 32-bit integer");
9395
9395
  var l = arguments.length > 2 && !!arguments[2], c = !0, u = !0;
@@ -9398,12 +9398,12 @@ function Qu() {
9398
9398
  d && !d.configurable && (c = !1), d && !d.writable && (u = !1);
9399
9399
  }
9400
9400
  return (c || u || !l) && (t ? e(o, "length", a, !0, !0) : e(o, "length", a)), o;
9401
- }, jr;
9401
+ }, Dr;
9402
9402
  }
9403
- function Xu() {
9403
+ function Zu() {
9404
9404
  if (ss) return Vt;
9405
9405
  ss = !0;
9406
- var s = Is(), e = er(), t = Qu(), r = gr(), i = e("%Function.prototype.apply%"), n = e("%Function.prototype.call%"), o = e("%Reflect.apply%", !0) || s.call(n, i), a = Ts(), l = e("%Math.max%");
9406
+ var s = Is(), e = er(), t = Xu(), r = br(), i = e("%Function.prototype.apply%"), n = e("%Function.prototype.call%"), o = e("%Reflect.apply%", !0) || s.call(n, i), a = Ts(), l = e("%Math.max%");
9407
9407
  Vt = function(u) {
9408
9408
  if (typeof u != "function") throw new r("a function is required");
9409
9409
  var d = o(s, n, arguments);
@@ -9414,36 +9414,36 @@ function Xu() {
9414
9414
  };
9415
9415
  return a ? a(Vt, "apply", { value: c }) : Vt.apply = c, Vt;
9416
9416
  }
9417
- function Zu() {
9418
- if (os) return Dr;
9417
+ function ed() {
9418
+ if (os) return $r;
9419
9419
  os = !0;
9420
- var s = er(), e = Xu(), t = e(s("String.prototype.indexOf"));
9421
- return Dr = function(r, i) {
9420
+ var s = er(), e = Zu(), t = e(s("String.prototype.indexOf"));
9421
+ return $r = function(r, i) {
9422
9422
  var n = s(r, !!i);
9423
9423
  return typeof n == "function" && t(r, ".prototype.") > -1 ? e(n) : n;
9424
- }, Dr;
9424
+ }, $r;
9425
9425
  }
9426
- var Li, Mi, Ni, Ri, ji, Di, $i, Ui, Bi, Fi, qi, Hi, Wi, zi, Vi, Ki, Ar, Gi, Ir, Yi, Tr, Ji, Cr, Qi, Pr, Xi, Or, Zi, Lr, es, Mr, ts, Nr, rs, Rr, ns, jr, is, Vt, ss, Dr, os, ed = Qe(() => {
9427
- le(), ue(), ce(), Li = {}, Mi = !1, Ni = {}, Ri = !1, ji = {}, Di = !1, $i = {}, Ui = !1, Bi = {}, Fi = !1, qi = {}, Hi = !1, Wi = {}, zi = !1, Vi = {}, Ki = !1, Ar = {}, Gi = !1, Ir = {}, Yi = !1, Tr = {}, Ji = !1, Cr = {}, Qi = !1, Pr = {}, Xi = !1, Or = {}, Zi = !1, Lr = {}, es = !1, Mr = {}, ts = !1, Nr = {}, rs = !1, Rr = {}, ns = !1, jr = {}, is = !1, Vt = {}, ss = !1, Dr = {}, os = !1;
9426
+ var Li, Mi, Ni, Ri, ji, Di, $i, Ui, Bi, Fi, qi, Hi, Wi, zi, Vi, Ki, Ir, Gi, Tr, Yi, Cr, Ji, Pr, Qi, Or, Xi, Lr, Zi, Mr, es, Nr, ts, Rr, rs, jr, ns, Dr, is, Vt, ss, $r, os, td = Qe(() => {
9427
+ le(), ue(), ce(), Li = {}, Mi = !1, Ni = {}, Ri = !1, ji = {}, Di = !1, $i = {}, Ui = !1, Bi = {}, Fi = !1, qi = {}, Hi = !1, Wi = {}, zi = !1, Vi = {}, Ki = !1, Ir = {}, Gi = !1, Tr = {}, Yi = !1, Cr = {}, Ji = !1, Pr = {}, Qi = !1, Or = {}, Xi = !1, Lr = {}, Zi = !1, Mr = {}, es = !1, Nr = {}, ts = !1, Rr = {}, rs = !1, jr = {}, ns = !1, Dr = {}, is = !1, Vt = {}, ss = !1, $r = {}, os = !1;
9428
9428
  });
9429
9429
  function Cs(s) {
9430
9430
  throw new Error("Node.js process " + s + " is not supported by JSPM core outside of Node.js");
9431
9431
  }
9432
- function td() {
9433
- !$t || !jt || ($t = !1, jt.length ? ht = jt.concat(ht) : hr = -1, ht.length && ml());
9432
+ function rd() {
9433
+ !$t || !jt || ($t = !1, jt.length ? ht = jt.concat(ht) : fr = -1, ht.length && ml());
9434
9434
  }
9435
9435
  function ml() {
9436
9436
  if (!$t) {
9437
- var s = setTimeout(td, 0);
9437
+ var s = setTimeout(rd, 0);
9438
9438
  $t = !0;
9439
9439
  for (var e = ht.length; e; ) {
9440
- for (jt = ht, ht = []; ++hr < e; ) jt && jt[hr].run();
9441
- hr = -1, e = ht.length;
9440
+ for (jt = ht, ht = []; ++fr < e; ) jt && jt[fr].run();
9441
+ fr = -1, e = ht.length;
9442
9442
  }
9443
9443
  jt = null, $t = !1, clearTimeout(s);
9444
9444
  }
9445
9445
  }
9446
- function rd(s) {
9446
+ function nd(s) {
9447
9447
  var e = new Array(arguments.length - 1);
9448
9448
  if (arguments.length > 1) for (var t = 1; t < arguments.length; t++) e[t - 1] = arguments[t];
9449
9449
  ht.push(new gl(s, e)), ht.length === 1 && !$t && setTimeout(ml, 0);
@@ -9453,39 +9453,39 @@ function gl(s, e) {
9453
9453
  }
9454
9454
  function ze() {
9455
9455
  }
9456
- function nd(s) {
9456
+ function id(s) {
9457
9457
  Cs("_linkedBinding");
9458
9458
  }
9459
- function id(s) {
9459
+ function sd(s) {
9460
9460
  Cs("dlopen");
9461
9461
  }
9462
- function sd() {
9462
+ function od() {
9463
9463
  return [];
9464
9464
  }
9465
- function od() {
9465
+ function ad() {
9466
9466
  return [];
9467
9467
  }
9468
- function ad(s, e) {
9468
+ function ld(s, e) {
9469
9469
  if (!s) throw new Error(e || "assertion error");
9470
9470
  }
9471
- function ld() {
9471
+ function cd() {
9472
9472
  return !1;
9473
9473
  }
9474
- function cd() {
9474
+ function ud() {
9475
9475
  return bt.now() / 1e3;
9476
9476
  }
9477
- function cn(s) {
9477
+ function un(s) {
9478
9478
  var e = Math.floor((Date.now() - bt.now()) * 1e-3), t = bt.now() * 1e-3, r = Math.floor(t) + e, i = Math.floor(t % 1 * 1e9);
9479
- return s && (r = r - s[0], i = i - s[1], i < 0 && (r--, i += $r)), [r, i];
9479
+ return s && (r = r - s[0], i = i - s[1], i < 0 && (r--, i += Ur)), [r, i];
9480
9480
  }
9481
9481
  function Et() {
9482
9482
  return Ps;
9483
9483
  }
9484
- function ud(s) {
9484
+ function dd(s) {
9485
9485
  return [];
9486
9486
  }
9487
- var ht, $t, jt, hr, Hs, Ws, zs, Vs, Ks, Gs, Ys, Js, Qs, Xs, Zs, eo, to, ro, no, io, so, oo, ao, lo, co, vr, uo, ho, fo, po, mo, go, bo, yo, vo, wo, ko, xo, _o, So, Eo, Ao, Io, To, Co, Po, Oo, Lo, Mo, No, Ro, bt, un, $r, jo, Do, $o, Uo, Bo, Fo, qo, Ho, Wo, zo, Vo, Ps, bl = Qe(() => {
9488
- le(), ue(), ce(), ht = [], $t = !1, hr = -1, gl.prototype.run = function() {
9487
+ var ht, $t, jt, fr, Hs, Ws, zs, Vs, Ks, Gs, Ys, Js, Qs, Xs, Zs, eo, to, ro, no, io, so, oo, ao, lo, co, wr, uo, ho, fo, po, mo, go, bo, yo, vo, wo, ko, xo, _o, So, Eo, Ao, Io, To, Co, Po, Oo, Lo, Mo, No, Ro, bt, dn, Ur, jo, Do, $o, Uo, Bo, Fo, qo, Ho, Wo, zo, Vo, Ps, bl = Qe(() => {
9488
+ le(), ue(), ce(), ht = [], $t = !1, fr = -1, gl.prototype.run = function() {
9489
9489
  this.fun.apply(null, this.array);
9490
9490
  }, Hs = "browser", Ws = "x64", zs = "browser", Vs = { PATH: "/usr/bin", LANG: navigator.language + ".UTF-8", PWD: "/", HOME: "/home", TMP: "/tmp" }, Ks = ["/usr/bin/node"], Gs = [], Ys = "v16.8.0", Js = {}, Qs = function(s, e) {
9491
9491
  console.warn((e ? e + ": " : "") + s);
@@ -9496,15 +9496,15 @@ var ht, $t, jt, hr, Hs, Ws, zs, Vs, Ks, Gs, Ys, Js, Qs, Xs, Zs, eo, to, ro, no,
9496
9496
  }, eo = function() {
9497
9497
  return "/";
9498
9498
  }, to = function(s) {
9499
- }, ro = { name: "node", sourceUrl: "", headersUrl: "", libUrl: "" }, no = ze, io = [], so = {}, oo = !1, ao = {}, lo = ze, co = ze, vr = function() {
9499
+ }, ro = { name: "node", sourceUrl: "", headersUrl: "", libUrl: "" }, no = ze, io = [], so = {}, oo = !1, ao = {}, lo = ze, co = ze, wr = function() {
9500
9500
  return {};
9501
- }, uo = vr, ho = vr, fo = ze, po = ze, mo = ze, go = {}, bo = { inspector: !1, debug: !1, uv: !1, ipv6: !1, tls_alpn: !1, tls_sni: !1, tls_ocsp: !1, tls: !1, cached_builtins: !0 }, yo = ze, vo = ze, wo = ze, ko = ze, xo = ze, _o = ze, So = ze, Eo = void 0, Ao = void 0, Io = void 0, To = ze, Co = 2, Po = 1, Oo = "/bin/usr/node", Lo = 9229, Mo = "node", No = [], Ro = ze, bt = { now: typeof performance < "u" ? performance.now.bind(performance) : void 0, timing: typeof performance < "u" ? performance.timing : void 0 }, bt.now === void 0 && (un = Date.now(), bt.timing && bt.timing.navigationStart && (un = bt.timing.navigationStart), bt.now = () => Date.now() - un), $r = 1e9, cn.bigint = function(s) {
9502
- var e = cn(s);
9503
- return typeof BigInt > "u" ? e[0] * $r + e[1] : BigInt(e[0] * $r) + BigInt(e[1]);
9504
- }, jo = 10, Do = {}, $o = 0, Uo = Et, Bo = Et, Fo = Et, qo = Et, Ho = Et, Wo = ze, zo = Et, Vo = Et, Ps = { version: Ys, versions: Js, arch: Ws, platform: zs, release: ro, _rawDebug: no, moduleLoadList: io, binding: Xs, _linkedBinding: nd, _events: Do, _eventsCount: $o, _maxListeners: jo, on: Et, addListener: Uo, once: Bo, off: Fo, removeListener: qo, removeAllListeners: Ho, emit: Wo, prependListener: zo, prependOnceListener: Vo, listeners: ud, domain: so, _exiting: oo, config: ao, dlopen: id, uptime: cd, _getActiveRequests: sd, _getActiveHandles: od, reallyExit: lo, _kill: co, cpuUsage: vr, resourceUsage: uo, memoryUsage: ho, kill: fo, exit: po, openStdin: mo, allowedNodeEnvironmentFlags: go, assert: ad, features: bo, _fatalExceptions: yo, setUncaughtExceptionCaptureCallback: vo, hasUncaughtExceptionCaptureCallback: ld, emitWarning: Qs, nextTick: rd, _tickCallback: wo, _debugProcess: ko, _debugEnd: xo, _startProfilerIdleNotifier: _o, _stopProfilerIdleNotifier: So, stdout: Eo, stdin: Io, stderr: Ao, abort: To, umask: Zs, chdir: to, cwd: eo, env: Vs, title: Hs, argv: Ks, execArgv: Gs, pid: Co, ppid: Po, execPath: Oo, debugPort: Lo, hrtime: cn, argv0: Mo, _preload_modules: No, setSourceMapsEnabled: Ro };
9501
+ }, uo = wr, ho = wr, fo = ze, po = ze, mo = ze, go = {}, bo = { inspector: !1, debug: !1, uv: !1, ipv6: !1, tls_alpn: !1, tls_sni: !1, tls_ocsp: !1, tls: !1, cached_builtins: !0 }, yo = ze, vo = ze, wo = ze, ko = ze, xo = ze, _o = ze, So = ze, Eo = void 0, Ao = void 0, Io = void 0, To = ze, Co = 2, Po = 1, Oo = "/bin/usr/node", Lo = 9229, Mo = "node", No = [], Ro = ze, bt = { now: typeof performance < "u" ? performance.now.bind(performance) : void 0, timing: typeof performance < "u" ? performance.timing : void 0 }, bt.now === void 0 && (dn = Date.now(), bt.timing && bt.timing.navigationStart && (dn = bt.timing.navigationStart), bt.now = () => Date.now() - dn), Ur = 1e9, un.bigint = function(s) {
9502
+ var e = un(s);
9503
+ return typeof BigInt > "u" ? e[0] * Ur + e[1] : BigInt(e[0] * Ur) + BigInt(e[1]);
9504
+ }, jo = 10, Do = {}, $o = 0, Uo = Et, Bo = Et, Fo = Et, qo = Et, Ho = Et, Wo = ze, zo = Et, Vo = Et, Ps = { version: Ys, versions: Js, arch: Ws, platform: zs, release: ro, _rawDebug: no, moduleLoadList: io, binding: Xs, _linkedBinding: id, _events: Do, _eventsCount: $o, _maxListeners: jo, on: Et, addListener: Uo, once: Bo, off: Fo, removeListener: qo, removeAllListeners: Ho, emit: Wo, prependListener: zo, prependOnceListener: Vo, listeners: dd, domain: so, _exiting: oo, config: ao, dlopen: sd, uptime: ud, _getActiveRequests: od, _getActiveHandles: ad, reallyExit: lo, _kill: co, cpuUsage: wr, resourceUsage: uo, memoryUsage: ho, kill: fo, exit: po, openStdin: mo, allowedNodeEnvironmentFlags: go, assert: ld, features: bo, _fatalExceptions: yo, setUncaughtExceptionCaptureCallback: vo, hasUncaughtExceptionCaptureCallback: cd, emitWarning: Qs, nextTick: nd, _tickCallback: wo, _debugProcess: ko, _debugEnd: xo, _startProfilerIdleNotifier: _o, _stopProfilerIdleNotifier: So, stdout: Eo, stdin: Io, stderr: Ao, abort: To, umask: Zs, chdir: to, cwd: eo, env: Vs, title: Hs, argv: Ks, execArgv: Gs, pid: Co, ppid: Po, execPath: Oo, debugPort: Lo, hrtime: un, argv0: Mo, _preload_modules: No, setSourceMapsEnabled: Ro };
9505
9505
  });
9506
- function dd() {
9507
- if (as) return Ur;
9506
+ function hd() {
9507
+ if (as) return Br;
9508
9508
  as = !0;
9509
9509
  var s = Ps;
9510
9510
  function e(n) {
@@ -9652,14 +9652,14 @@ function dd() {
9652
9652
  }
9653
9653
  return u === -1 || p === -1 || b === 0 || b === 1 && u === p - 1 && u === d + 1 ? p !== -1 && (d === 0 && l ? o.base = o.name = n.slice(1, p) : o.base = o.name = n.slice(d, p)) : (d === 0 && l ? (o.name = n.slice(1, u), o.base = n.slice(1, p)) : (o.name = n.slice(d, u), o.base = n.slice(d, p)), o.ext = n.slice(u, p)), d > 0 ? o.dir = n.slice(0, d - 1) : l && (o.dir = "/"), o;
9654
9654
  }, sep: "/", delimiter: ":", win32: null, posix: null };
9655
- return i.posix = i, Ur = i, Ur;
9655
+ return i.posix = i, Br = i, Br;
9656
9656
  }
9657
- var Ur, as, ls, hd = Qe(() => {
9658
- le(), ue(), ce(), bl(), Ur = {}, as = !1, ls = dd();
9657
+ var Br, as, ls, fd = Qe(() => {
9658
+ le(), ue(), ce(), bl(), Br = {}, as = !1, ls = hd();
9659
9659
  }), yl = {};
9660
9660
  Qt(yl, { URL: () => Tl, Url: () => _l, default: () => Ke, fileURLToPath: () => wl, format: () => Sl, parse: () => Il, pathToFileURL: () => kl, resolve: () => El, resolveObject: () => Al });
9661
- function fd() {
9662
- if (cs) return Br;
9661
+ function pd() {
9662
+ if (cs) return Fr;
9663
9663
  cs = !0;
9664
9664
  var s = typeof Map == "function" && Map.prototype, e = Object.getOwnPropertyDescriptor && s ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, t = s && e && typeof e.get == "function" ? e.get : null, r = s && Map.prototype.forEach, i = typeof Set == "function" && Set.prototype, n = Object.getOwnPropertyDescriptor && i ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, o = i && n && typeof n.get == "function" ? n.get : null, a = i && Set.prototype.forEach, l = typeof WeakMap == "function" && WeakMap.prototype, c = l ? WeakMap.prototype.has : null, u = typeof WeakSet == "function" && WeakSet.prototype, d = u ? WeakSet.prototype.has : null, p = typeof WeakRef == "function" && WeakRef.prototype, g = p ? WeakRef.prototype.deref : null, h = Boolean.prototype.valueOf, b = Object.prototype.toString, y = Function.prototype.toString, w = String.prototype.match, m = String.prototype.slice, k = String.prototype.replace, _ = String.prototype.toUpperCase, v = String.prototype.toLowerCase, E = RegExp.prototype.test, S = Array.prototype.concat, I = Array.prototype.join, P = Array.prototype.slice, O = Math.floor, j = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, T = Object.getOwnPropertySymbols, F = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, $ = typeof Symbol == "function" && typeof Symbol.iterator == "object", U = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === $ || !0) ? Symbol.toStringTag : null, X = Object.prototype.propertyIsEnumerable, z = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(K) {
9665
9665
  return K.__proto__;
@@ -9677,7 +9677,7 @@ function fd() {
9677
9677
  return k.call(se, Ie, "$&_");
9678
9678
  }
9679
9679
  var ne = xl, D = ne.custom, G = Q(D) ? D : null;
9680
- Br = function K(se, Ie, Te, Oe) {
9680
+ Fr = function K(se, Ie, Te, Oe) {
9681
9681
  var Ne = Ie || {};
9682
9682
  if (oe(Ne, "quoteStyle") && Ne.quoteStyle !== "single" && Ne.quoteStyle !== "double") throw new TypeError('option "quoteStyle" must be "single" or "double"');
9683
9683
  if (oe(Ne, "maxStringLength") && (typeof Ne.maxStringLength == "number" ? Ne.maxStringLength < 0 && Ne.maxStringLength !== 1 / 0 : Ne.maxStringLength !== null)) throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
@@ -9712,8 +9712,8 @@ function fd() {
9712
9712
  return K(lt, Ne, Te + 1, Oe);
9713
9713
  }
9714
9714
  if (typeof se == "function" && !ve(se)) {
9715
- var br = q(se), Ht = xe(se, Xe);
9716
- return "[Function" + (br ? ": " + br : " (anonymous)") + "]" + (Ht.length > 0 ? " { " + I.call(Ht, ", ") + " }" : "");
9715
+ var yr = q(se), Ht = xe(se, Xe);
9716
+ return "[Function" + (yr ? ": " + yr : " (anonymous)") + "]" + (Ht.length > 0 ? " { " + I.call(Ht, ", ") + " }" : "");
9717
9717
  }
9718
9718
  if (Q(se)) {
9719
9719
  var tr = $ ? k.call(String(se), /^(Symbol\(.*\))_[^)]*$/, "$1") : F.call(se);
@@ -9756,9 +9756,9 @@ function fd() {
9756
9756
  if (V(se)) return f(h.call(se));
9757
9757
  if (R(se)) return f(Xe(String(se)));
9758
9758
  if (typeof window < "u" && se === window) return "{ [object Window] }";
9759
- if (typeof globalThis < "u" && se === globalThis || typeof Fr < "u" && se === Fr) return "{ [object globalThis] }";
9759
+ if (typeof globalThis < "u" && se === globalThis || typeof qr < "u" && se === qr) return "{ [object globalThis] }";
9760
9760
  if (!te(se) && !ve(se)) {
9761
- var et = xe(se, Xe), rr = z ? z(se) === Object.prototype : se instanceof Object || se.constructor === Object, nr = se instanceof Object ? "" : "null prototype", ir = !rr && U && Object(se) === se && U in se ? m.call(M(se), 8, -1) : nr ? "Object" : "", yr = rr || typeof se.constructor != "function" ? "" : se.constructor.name ? se.constructor.name + " " : "", Lt = yr + (ir || nr ? "[" + I.call(S.call([], ir || [], nr || []), ": ") + "] " : "");
9761
+ var et = xe(se, Xe), rr = z ? z(se) === Object.prototype : se instanceof Object || se.constructor === Object, nr = se instanceof Object ? "" : "null prototype", ir = !rr && U && Object(se) === se && U in se ? m.call(M(se), 8, -1) : nr ? "Object" : "", vr = rr || typeof se.constructor != "function" ? "" : se.constructor.name ? se.constructor.name + " " : "", Lt = vr + (ir || nr ? "[" + I.call(S.call([], ir || [], nr || []), ": ") + "] " : "");
9762
9762
  return et.length === 0 ? Lt + "{}" : at ? Lt + "{" + de(et, at) + "}" : Lt + "{ " + I.call(et, ", ") + " }";
9763
9763
  }
9764
9764
  return String(se);
@@ -9810,7 +9810,7 @@ function fd() {
9810
9810
  return !1;
9811
9811
  }
9812
9812
  var be = Object.prototype.hasOwnProperty || function(K) {
9813
- return K in (this || Fr);
9813
+ return K in (this || qr);
9814
9814
  };
9815
9815
  function oe(K, se) {
9816
9816
  return be.call(K, se);
@@ -9951,12 +9951,12 @@ function fd() {
9951
9951
  if (typeof T == "function") for (var ot = 0; ot < Ne.length; ot++) X.call(K, Ne[ot]) && Te.push("[" + se(Ne[ot]) + "]: " + se(K[Ne[ot]], K));
9952
9952
  return Te;
9953
9953
  }
9954
- return Br;
9954
+ return Fr;
9955
9955
  }
9956
- function pd() {
9957
- if (us) return qr;
9956
+ function md() {
9957
+ if (us) return Hr;
9958
9958
  us = !0;
9959
- var s = er(), e = Zu(), t = fd(), r = gr(), i = s("%WeakMap%", !0), n = s("%Map%", !0), o = e("WeakMap.prototype.get", !0), a = e("WeakMap.prototype.set", !0), l = e("WeakMap.prototype.has", !0), c = e("Map.prototype.get", !0), u = e("Map.prototype.set", !0), d = e("Map.prototype.has", !0), p = function(y, w) {
9959
+ var s = er(), e = ed(), t = pd(), r = br(), i = s("%WeakMap%", !0), n = s("%Map%", !0), o = e("WeakMap.prototype.get", !0), a = e("WeakMap.prototype.set", !0), l = e("WeakMap.prototype.has", !0), c = e("Map.prototype.get", !0), u = e("Map.prototype.set", !0), d = e("Map.prototype.has", !0), p = function(y, w) {
9960
9960
  for (var m = y, k; (k = m.next) !== null; m = k) if (k.key === w) return m.next = k.next, k.next = y.next, y.next = k, k;
9961
9961
  }, g = function(y, w) {
9962
9962
  var m = p(y, w);
@@ -9967,7 +9967,7 @@ function pd() {
9967
9967
  }, b = function(y, w) {
9968
9968
  return !!p(y, w);
9969
9969
  };
9970
- return qr = function() {
9970
+ return Hr = function() {
9971
9971
  var y, w, m, k = { assert: function(_) {
9972
9972
  if (!k.has(_)) throw new r("Side channel does not contain " + t(_));
9973
9973
  }, get: function(_) {
@@ -9987,20 +9987,20 @@ function pd() {
9987
9987
  i && _ && (typeof _ == "object" || typeof _ == "function") ? (y || (y = new i()), a(y, _, v)) : n ? (w || (w = new n()), u(w, _, v)) : (m || (m = { key: {}, next: null }), h(m, _, v));
9988
9988
  } };
9989
9989
  return k;
9990
- }, qr;
9990
+ }, Hr;
9991
9991
  }
9992
9992
  function Os() {
9993
- if (ds) return Hr;
9993
+ if (ds) return Wr;
9994
9994
  ds = !0;
9995
9995
  var s = String.prototype.replace, e = /%20/g, t = { RFC1738: "RFC1738", RFC3986: "RFC3986" };
9996
- return Hr = { default: t.RFC3986, formatters: { RFC1738: function(r) {
9996
+ return Wr = { default: t.RFC3986, formatters: { RFC1738: function(r) {
9997
9997
  return s.call(r, e, "+");
9998
9998
  }, RFC3986: function(r) {
9999
9999
  return String(r);
10000
- } }, RFC1738: t.RFC1738, RFC3986: t.RFC3986 }, Hr;
10000
+ } }, RFC1738: t.RFC1738, RFC3986: t.RFC3986 }, Wr;
10001
10001
  }
10002
10002
  function vl() {
10003
- if (hs) return Wr;
10003
+ if (hs) return zr;
10004
10004
  hs = !0;
10005
10005
  var s = Os(), e = Object.prototype.hasOwnProperty, t = Array.isArray, r = (function() {
10006
10006
  for (var y = [], w = 0; w < 256; ++w) y.push("%" + ((w < 16 ? "0" : "") + w.toString(16)).toUpperCase());
@@ -10096,12 +10096,12 @@ function vl() {
10096
10096
  }
10097
10097
  return w(y);
10098
10098
  };
10099
- return Wr = { arrayToObject: n, assign: a, combine: h, compact: d, decode: l, encode: u, isBuffer: g, isRegExp: p, maybeMap: b, merge: o }, Wr;
10099
+ return zr = { arrayToObject: n, assign: a, combine: h, compact: d, decode: l, encode: u, isBuffer: g, isRegExp: p, maybeMap: b, merge: o }, zr;
10100
10100
  }
10101
- function md() {
10102
- if (fs) return zr;
10101
+ function gd() {
10102
+ if (fs) return Vr;
10103
10103
  fs = !0;
10104
- var s = pd(), e = vl(), t = Os(), r = Object.prototype.hasOwnProperty, i = { brackets: function(b) {
10104
+ var s = md(), e = vl(), t = Os(), r = Object.prototype.hasOwnProperty, i = { brackets: function(b) {
10105
10105
  return b + "[]";
10106
10106
  }, comma: "comma", indices: function(b, y) {
10107
10107
  return b + "[" + y + "]";
@@ -10175,7 +10175,7 @@ function md() {
10175
10175
  var v = typeof b.allowDots > "u" ? b.encodeDotInKeys === !0 ? !0 : u.allowDots : !!b.allowDots;
10176
10176
  return { addQueryPrefix: typeof b.addQueryPrefix == "boolean" ? b.addQueryPrefix : u.addQueryPrefix, allowDots: v, allowEmptyArrays: typeof b.allowEmptyArrays == "boolean" ? !!b.allowEmptyArrays : u.allowEmptyArrays, arrayFormat: _, charset: y, charsetSentinel: typeof b.charsetSentinel == "boolean" ? b.charsetSentinel : u.charsetSentinel, commaRoundTrip: b.commaRoundTrip, delimiter: typeof b.delimiter > "u" ? u.delimiter : b.delimiter, encode: typeof b.encode == "boolean" ? b.encode : u.encode, encodeDotInKeys: typeof b.encodeDotInKeys == "boolean" ? b.encodeDotInKeys : u.encodeDotInKeys, encoder: typeof b.encoder == "function" ? b.encoder : u.encoder, encodeValuesOnly: typeof b.encodeValuesOnly == "boolean" ? b.encodeValuesOnly : u.encodeValuesOnly, filter: k, format: w, formatter: m, serializeDate: typeof b.serializeDate == "function" ? b.serializeDate : u.serializeDate, skipNulls: typeof b.skipNulls == "boolean" ? b.skipNulls : u.skipNulls, sort: typeof b.sort == "function" ? b.sort : null, strictNullHandling: typeof b.strictNullHandling == "boolean" ? b.strictNullHandling : u.strictNullHandling };
10177
10177
  };
10178
- return zr = function(b, y) {
10178
+ return Vr = function(b, y) {
10179
10179
  var w = b, m = h(y), k, _;
10180
10180
  typeof m.filter == "function" ? (_ = m.filter, w = _("", w)) : n(m.filter) && (_ = m.filter, k = _);
10181
10181
  var v = [];
@@ -10188,10 +10188,10 @@ function md() {
10188
10188
  }
10189
10189
  var j = v.join(m.delimiter), T = m.addQueryPrefix === !0 ? "?" : "";
10190
10190
  return m.charsetSentinel && (m.charset === "iso-8859-1" ? T += "utf8=%26%2310003%3B&" : T += "utf8=%E2%9C%93&"), j.length > 0 ? T + j : "";
10191
- }, zr;
10191
+ }, Vr;
10192
10192
  }
10193
- function gd() {
10194
- if (ps) return Vr;
10193
+ function bd() {
10194
+ if (ps) return Kr;
10195
10195
  ps = !0;
10196
10196
  var s = vl(), e = Object.prototype.hasOwnProperty, t = Array.isArray, r = { allowDots: !1, allowEmptyArrays: !1, allowPrototypes: !1, allowSparse: !1, arrayLimit: 20, charset: "utf-8", charsetSentinel: !1, comma: !1, decodeDotInKeys: !1, decoder: s.decode, delimiter: "&", depth: 5, duplicates: "combine", ignoreQueryPrefix: !1, interpretNumericEntities: !1, parameterLimit: 1e3, parseArrays: !0, plainObjects: !1, strictDepth: !1, strictNullHandling: !1 }, i = function(p) {
10197
10197
  return p.replace(/&#(\d+);/g, function(g, h) {
@@ -10253,7 +10253,7 @@ function gd() {
10253
10253
  var b = typeof p.allowDots > "u" ? p.decodeDotInKeys === !0 ? !0 : r.allowDots : !!p.allowDots;
10254
10254
  return { allowDots: b, allowEmptyArrays: typeof p.allowEmptyArrays == "boolean" ? !!p.allowEmptyArrays : r.allowEmptyArrays, allowPrototypes: typeof p.allowPrototypes == "boolean" ? p.allowPrototypes : r.allowPrototypes, allowSparse: typeof p.allowSparse == "boolean" ? p.allowSparse : r.allowSparse, arrayLimit: typeof p.arrayLimit == "number" ? p.arrayLimit : r.arrayLimit, charset: g, charsetSentinel: typeof p.charsetSentinel == "boolean" ? p.charsetSentinel : r.charsetSentinel, comma: typeof p.comma == "boolean" ? p.comma : r.comma, decodeDotInKeys: typeof p.decodeDotInKeys == "boolean" ? p.decodeDotInKeys : r.decodeDotInKeys, decoder: typeof p.decoder == "function" ? p.decoder : r.decoder, delimiter: typeof p.delimiter == "string" || s.isRegExp(p.delimiter) ? p.delimiter : r.delimiter, depth: typeof p.depth == "number" || p.depth === !1 ? +p.depth : r.depth, duplicates: h, ignoreQueryPrefix: p.ignoreQueryPrefix === !0, interpretNumericEntities: typeof p.interpretNumericEntities == "boolean" ? p.interpretNumericEntities : r.interpretNumericEntities, parameterLimit: typeof p.parameterLimit == "number" ? p.parameterLimit : r.parameterLimit, parseArrays: p.parseArrays !== !1, plainObjects: typeof p.plainObjects == "boolean" ? p.plainObjects : r.plainObjects, strictDepth: typeof p.strictDepth == "boolean" ? !!p.strictDepth : r.strictDepth, strictNullHandling: typeof p.strictNullHandling == "boolean" ? p.strictNullHandling : r.strictNullHandling };
10255
10255
  };
10256
- return Vr = function(p, g) {
10256
+ return Kr = function(p, g) {
10257
10257
  var h = d(g);
10258
10258
  if (p === "" || p === null || typeof p > "u") return h.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
10259
10259
  for (var b = typeof p == "string" ? l(p, h) : p, y = h.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, w = Object.keys(b), m = 0; m < w.length; ++m) {
@@ -10261,15 +10261,15 @@ function gd() {
10261
10261
  y = s.merge(y, _, h);
10262
10262
  }
10263
10263
  return h.allowSparse === !0 ? y : s.compact(y);
10264
- }, Vr;
10264
+ }, Kr;
10265
10265
  }
10266
- function bd() {
10267
- if (ms) return Kr;
10266
+ function yd() {
10267
+ if (ms) return Gr;
10268
10268
  ms = !0;
10269
- var s = md(), e = gd(), t = Os();
10270
- return Kr = { formats: t, parse: e, stringify: s }, Kr;
10269
+ var s = gd(), e = bd(), t = Os();
10270
+ return Gr = { formats: t, parse: e, stringify: s }, Gr;
10271
10271
  }
10272
- function yd() {
10272
+ function vd() {
10273
10273
  if (gs) return Ct;
10274
10274
  gs = !0;
10275
10275
  var s = Tt;
@@ -10277,7 +10277,7 @@ function yd() {
10277
10277
  this.protocol = null, this.slashes = null, this.auth = null, this.host = null, this.port = null, this.hostname = null, this.hash = null, this.search = null, this.query = null, this.pathname = null, this.path = null, this.href = null;
10278
10278
  }
10279
10279
  var t = /^([a-z0-9.+-]+:)/i, r = /:[0-9]*$/, i = /^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/, n = ["<", ">", '"', "`", " ", "\r", `
10280
- `, " "], o = ["{", "}", "|", "\\", "^", "`"].concat(n), a = ["'"].concat(o), l = ["%", "/", "?", ";", "#"].concat(a), c = ["/", "?", "#"], u = 255, d = /^[+a-z0-9A-Z_-]{0,63}$/, p = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, g = { javascript: !0, "javascript:": !0 }, h = { javascript: !0, "javascript:": !0 }, b = { http: !0, https: !0, ftp: !0, gopher: !0, file: !0, "http:": !0, "https:": !0, "ftp:": !0, "gopher:": !0, "file:": !0 }, y = bd();
10280
+ `, " "], o = ["{", "}", "|", "\\", "^", "`"].concat(n), a = ["'"].concat(o), l = ["%", "/", "?", ";", "#"].concat(a), c = ["/", "?", "#"], u = 255, d = /^[+a-z0-9A-Z_-]{0,63}$/, p = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, g = { javascript: !0, "javascript:": !0 }, h = { javascript: !0, "javascript:": !0 }, b = { http: !0, https: !0, ftp: !0, gopher: !0, file: !0, "http:": !0, "https:": !0, "ftp:": !0, "gopher:": !0, "file:": !0 }, y = yd();
10281
10281
  function w(v, E, S) {
10282
10282
  if (v && typeof v == "object" && v instanceof e) return v;
10283
10283
  var I = new e();
@@ -10434,9 +10434,9 @@ function wl(s) {
10434
10434
  if (typeof s == "string") s = new URL(s);
10435
10435
  else if (!(s instanceof URL)) throw new Deno.errors.InvalidData("invalid argument path , must be a string or URL");
10436
10436
  if (s.protocol !== "file:") throw new Deno.errors.InvalidData("invalid url scheme");
10437
- return Jr ? vd(s) : wd(s);
10437
+ return Qr ? wd(s) : kd(s);
10438
10438
  }
10439
- function vd(s) {
10439
+ function wd(s) {
10440
10440
  let e = s.hostname, t = s.pathname;
10441
10441
  for (let r = 0; r < t.length; r++) if (t[r] === "%") {
10442
10442
  let i = t.codePointAt(r + 2) || 32;
@@ -10449,7 +10449,7 @@ function vd(s) {
10449
10449
  return t.slice(1);
10450
10450
  }
10451
10451
  }
10452
- function wd(s) {
10452
+ function kd(s) {
10453
10453
  if (s.hostname !== "") throw new Deno.errors.InvalidData("invalid file url hostname");
10454
10454
  let e = s.pathname;
10455
10455
  for (let t = 0; t < e.length; t++) if (e[t] === "%") {
@@ -10460,14 +10460,14 @@ function wd(s) {
10460
10460
  }
10461
10461
  function kl(s) {
10462
10462
  let e = ls.resolve(s), t = s.charCodeAt(s.length - 1);
10463
- (t === Pl || Jr && t === Cl) && e[e.length - 1] !== ls.sep && (e += "/");
10463
+ (t === Pl || Qr && t === Cl) && e[e.length - 1] !== ls.sep && (e += "/");
10464
10464
  let r = new URL("file://");
10465
- return e.includes("%") && (e = e.replace(Nl, "%25")), !Jr && e.includes("\\") && (e = e.replace(Rl, "%5C")), e.includes(`
10465
+ return e.includes("%") && (e = e.replace(Nl, "%25")), !Qr && e.includes("\\") && (e = e.replace(Rl, "%5C")), e.includes(`
10466
10466
  `) && (e = e.replace(jl, "%0A")), e.includes("\r") && (e = e.replace(Dl, "%0D")), e.includes(" ") && (e = e.replace($l, "%09")), r.pathname = e, r;
10467
10467
  }
10468
- var xl, Br, cs, Fr, qr, us, Hr, ds, Wr, hs, zr, fs, Vr, ps, Kr, ms, Ct, gs, Ke, Ko, _l, Sl, El, Al, Il, Tl, Cl, Pl, Ol, Ll, Jr, Ml, Nl, Rl, jl, Dl, $l, kd = Qe(() => {
10469
- le(), ue(), ce(), $u(), ed(), hd(), bl(), xl = Object.freeze(/* @__PURE__ */ Object.create(null)), Br = {}, cs = !1, Fr = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : global, qr = {}, us = !1, Hr = {}, ds = !1, Wr = {}, hs = !1, zr = {}, fs = !1, Vr = {}, ps = !1, Kr = {}, ms = !1, Ct = {}, gs = !1, Ke = yd(), Ke.parse, Ke.resolve, Ke.resolveObject, Ke.format, Ke.Url, Ko = typeof Deno < "u" ? Deno.build.os === "windows" ? "win32" : Deno.build.os : void 0, Ke.URL = typeof URL < "u" ? URL : null, Ke.pathToFileURL = kl, Ke.fileURLToPath = wl, _l = Ke.Url, Sl = Ke.format, El = Ke.resolve, Al = Ke.resolveObject, Il = Ke.parse, Tl = Ke.URL, Cl = 92, Pl = 47, Ol = 97, Ll = 122, Jr = Ko === "win32", Ml = /\//g, Nl = /%/g, Rl = /\\/g, jl = /\n/g, Dl = /\r/g, $l = /\t/g;
10470
- }), xd = me((s, e) => {
10468
+ var xl, Fr, cs, qr, Hr, us, Wr, ds, zr, hs, Vr, fs, Kr, ps, Gr, ms, Ct, gs, Ke, Ko, _l, Sl, El, Al, Il, Tl, Cl, Pl, Ol, Ll, Qr, Ml, Nl, Rl, jl, Dl, $l, xd = Qe(() => {
10469
+ le(), ue(), ce(), Uu(), td(), fd(), bl(), xl = Object.freeze(/* @__PURE__ */ Object.create(null)), Fr = {}, cs = !1, qr = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : global, Hr = {}, us = !1, Wr = {}, ds = !1, zr = {}, hs = !1, Vr = {}, fs = !1, Kr = {}, ps = !1, Gr = {}, ms = !1, Ct = {}, gs = !1, Ke = vd(), Ke.parse, Ke.resolve, Ke.resolveObject, Ke.format, Ke.Url, Ko = typeof Deno < "u" ? Deno.build.os === "windows" ? "win32" : Deno.build.os : void 0, Ke.URL = typeof URL < "u" ? URL : null, Ke.pathToFileURL = kl, Ke.fileURLToPath = wl, _l = Ke.Url, Sl = Ke.format, El = Ke.resolve, Al = Ke.resolveObject, Il = Ke.parse, Tl = Ke.URL, Cl = 92, Pl = 47, Ol = 97, Ll = 122, Qr = Ko === "win32", Ml = /\//g, Nl = /%/g, Rl = /\\/g, jl = /\n/g, Dl = /\r/g, $l = /\t/g;
10470
+ }), _d = me((s, e) => {
10471
10471
  le(), ue(), ce(), e.exports = function() {
10472
10472
  throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object");
10473
10473
  };
@@ -10515,13 +10515,13 @@ var xl, Br, cs, Fr, qr, us, Hr, ds, Wr, hs, zr, fs, Vr, ps, Kr, ms, Ct, gs, Ke,
10515
10515
  }
10516
10516
  };
10517
10517
  s.BufferedDuplex = i;
10518
- }), wr = me((s) => {
10518
+ }), kr = me((s) => {
10519
10519
  le(), ue(), ce();
10520
10520
  var e = s && s.__importDefault || function(w) {
10521
10521
  return w && w.__esModule ? w : { default: w };
10522
10522
  };
10523
10523
  Object.defineProperty(s, "__esModule", { value: !0 }), s.streamBuilder = s.browserStreamBuilder = void 0;
10524
- var t = (qe(), Re(Fe)), r = e(xd()), i = e(vt()), n = Ft(), o = e(sn()), a = Ls(), l = (0, i.default)("mqttjs:ws"), c = ["rejectUnauthorized", "ca", "cert", "key", "pfx", "passphrase"];
10524
+ var t = (qe(), Re(Fe)), r = e(_d()), i = e(vt()), n = Ft(), o = e(on()), a = Ls(), l = (0, i.default)("mqttjs:ws"), c = ["rejectUnauthorized", "ca", "cert", "key", "pfx", "passphrase"];
10525
10525
  function u(w, m) {
10526
10526
  let k = `${w.protocol}://${w.hostname}:${w.port}${w.path}`;
10527
10527
  return typeof w.transformWsUrl == "function" && (k = w.transformWsUrl(k, w, m)), k;
@@ -10632,7 +10632,7 @@ var Ul, Bl = Qe(() => {
10632
10632
  s.default = o;
10633
10633
  }), ql = {};
10634
10634
  Qt(ql, { default: () => Hl });
10635
- var Hl, _d = Qe(() => {
10635
+ var Hl, Sd = Qe(() => {
10636
10636
  le(), ue(), ce(), Hl = {};
10637
10637
  }), Yo = me((s) => {
10638
10638
  le(), ue(), ce();
@@ -10640,7 +10640,7 @@ var Hl, _d = Qe(() => {
10640
10640
  return c && c.__esModule ? c : { default: c };
10641
10641
  };
10642
10642
  Object.defineProperty(s, "__esModule", { value: !0 });
10643
- var t = (_d(), Re(ql)), r = e((Bl(), Re(Ms))), i = e(vt()), n = e(Fl()), o = (0, i.default)("mqttjs:tls");
10643
+ var t = (Sd(), Re(ql)), r = e((Bl(), Re(Ms))), i = e(vt()), n = e(Fl()), o = (0, i.default)("mqttjs:tls");
10644
10644
  function a(c) {
10645
10645
  let { host: u, port: d, socksProxy: p, ...g } = c;
10646
10646
  if (p !== void 0) {
@@ -10771,13 +10771,13 @@ var Hl, _d = Qe(() => {
10771
10771
  return i = h.my, i.connectSocket({ url: y, protocols: b }), n = l(), o = new r.BufferedDuplex(h, n, i), d(), o;
10772
10772
  };
10773
10773
  s.default = p;
10774
- }), Sd = me((s) => {
10774
+ }), Ed = me((s) => {
10775
10775
  le(), ue(), ce();
10776
10776
  var e = s && s.__importDefault || function(d) {
10777
10777
  return d && d.__esModule ? d : { default: d };
10778
10778
  };
10779
10779
  Object.defineProperty(s, "__esModule", { value: !0 }), s.connectAsync = u;
10780
- var t = e(vt()), r = e((kd(), Re(yl))), i = e(Ci()), n = e(sn());
10780
+ var t = e(vt()), r = e((xd(), Re(yl))), i = e(Ci()), n = e(on());
10781
10781
  typeof je?.nextTick != "function" && (je.nextTick = setImmediate);
10782
10782
  var o = (0, t.default)("mqttjs"), a = null;
10783
10783
  function l(d) {
@@ -10811,7 +10811,7 @@ var Hl, _d = Qe(() => {
10811
10811
  throw new Error(`Unknown protocol for secure connection: "${p.protocol}"!`);
10812
10812
  }
10813
10813
  } else throw new Error("Missing secure protocol key");
10814
- if (a || (a = {}, !n.default && !p.forceNativeWebSocket ? (a.ws = wr().streamBuilder, a.wss = wr().streamBuilder, a.mqtt = Go().default, a.tcp = Go().default, a.ssl = Yo().default, a.tls = a.ssl, a.mqtts = Yo().default) : (a.ws = wr().browserStreamBuilder, a.wss = wr().browserStreamBuilder, a.wx = Jo().default, a.wxs = Jo().default, a.ali = Qo().default, a.alis = Qo().default)), !a[p.protocol]) {
10814
+ if (a || (a = {}, !n.default && !p.forceNativeWebSocket ? (a.ws = kr().streamBuilder, a.wss = kr().streamBuilder, a.mqtt = Go().default, a.tcp = Go().default, a.ssl = Yo().default, a.tls = a.ssl, a.mqtts = Yo().default) : (a.ws = kr().browserStreamBuilder, a.wss = kr().browserStreamBuilder, a.wx = Jo().default, a.wxs = Jo().default, a.ali = Qo().default, a.alis = Qo().default)), !a[p.protocol]) {
10815
10815
  let b = ["mqtts", "wss"].indexOf(p.protocol) !== -1;
10816
10816
  p.protocol = ["mqtt", "mqtts", "ws", "wss", "wx", "wxs", "ali", "alis"].filter((y, w) => b && w % 2 === 0 ? !1 : typeof a[y] == "function")[0];
10817
10817
  }
@@ -10885,21 +10885,21 @@ var Hl, _d = Qe(() => {
10885
10885
  s.MqttClient = o.default;
10886
10886
  var a = n(sl());
10887
10887
  s.DefaultMessageIdProvider = a.default;
10888
- var l = n(ju());
10888
+ var l = n(Du());
10889
10889
  s.UniqueMessageIdProvider = l.default;
10890
10890
  var c = n(qa());
10891
10891
  s.Store = c.default;
10892
- var u = r(Sd());
10892
+ var u = r(Ed());
10893
10893
  s.connect = u.default, Object.defineProperty(s, "connectAsync", { enumerable: !0, get: function() {
10894
10894
  return u.connectAsync;
10895
10895
  } });
10896
10896
  var d = n(hl());
10897
10897
  s.KeepaliveManager = d.default, s.Client = o.default, i(Ci(), s), i(Zt(), s), i(Fa(), s);
10898
- var p = rn();
10898
+ var p = nn();
10899
10899
  Object.defineProperty(s, "ReasonCodes", { enumerable: !0, get: function() {
10900
10900
  return p.ReasonCodes;
10901
10901
  } });
10902
- }), Ed = me((s) => {
10902
+ }), Ad = me((s) => {
10903
10903
  le(), ue(), ce();
10904
10904
  var e = s && s.__createBinding || (Object.create ? function(o, a, l, c) {
10905
10905
  c === void 0 && (c = l);
@@ -10934,25 +10934,25 @@ var Hl, _d = Qe(() => {
10934
10934
  var n = r(Xo());
10935
10935
  s.default = n, i(Xo(), s);
10936
10936
  });
10937
- const Ad = Ed();
10938
- const Id = {
10937
+ const Id = Ad();
10938
+ const Td = {
10939
10939
  inbound: "apps/{appId}/users/{userId}/messages/{conversationId}/clientadded",
10940
10940
  inboundUpdate: "apps/{appId}/users/{userId}/messages/{conversationId}/{messageId}/update",
10941
10941
  outbound: "apps/{appId}/outgoing/users/{userId}/messages/{conversationId}/outgoing",
10942
10942
  presence: "apps/{appId}/users/{userId}/presence/{clientId}",
10943
10943
  wildcardSubscribe: "apps/{appId}/users/{userId}/#"
10944
- }, Td = 300, Cd = {
10944
+ }, Cd = 300, Pd = {
10945
10945
  templateId: "7",
10946
10946
  type: "link",
10947
10947
  isDeepLink: !0
10948
- }, Pd = {
10948
+ }, Od = {
10949
10949
  channelType: "group",
10950
10950
  channel: "chat21",
10951
10951
  requestChannel: "chat21",
10952
10952
  platform: "WEBSITE",
10953
10953
  medium: "CHATBUDDY"
10954
10954
  };
10955
- class Od {
10955
+ class Ld {
10956
10956
  client = null;
10957
10957
  config;
10958
10958
  currentToken;
@@ -10979,7 +10979,7 @@ class Od {
10979
10979
  inboundRegex;
10980
10980
  inboundUpdateRegex;
10981
10981
  constructor(e) {
10982
- this.config = e, this.currentToken = e.jwtToken, this.appId = e.appId ?? "tilechat", this.clientId = e.clientId ?? this.freshClientId(), this.topics = { ...Id, ...e.topicTemplates ?? {} }, this.maxReconnectAttempts = e.maxReconnectAttempts ?? 1 / 0, this.reconnectMaxDelayMs = e.reconnectMaxDelayMs ?? 3e4, this.inboundRegex = this.buildTopicRegex(
10982
+ this.config = e, this.currentToken = e.jwtToken, this.appId = e.appId ?? "tilechat", this.clientId = e.clientId ?? this.freshClientId(), this.topics = { ...Td, ...e.topicTemplates ?? {} }, this.maxReconnectAttempts = e.maxReconnectAttempts ?? 1 / 0, this.reconnectMaxDelayMs = e.reconnectMaxDelayMs ?? 3e4, this.inboundRegex = this.buildTopicRegex(
10983
10983
  this.topics.inbound,
10984
10984
  ["conversationId"]
10985
10985
  ), this.inboundUpdateRegex = this.buildTopicRegex(
@@ -11031,7 +11031,7 @@ class Od {
11031
11031
  () => c("connect-timeout"),
11032
11032
  r + 500
11033
11033
  );
11034
- this.client = Ad.connect(this.config.mqttEndpoint, i), this.client.on("connect", () => {
11034
+ this.client = Id.connect(this.config.mqttEndpoint, i), this.client.on("connect", () => {
11035
11035
  if (this.connectedAt = Date.now(), a || l(() => n()), this.debugLog("CONNECT", { endpoint: this.config.mqttEndpoint, clientId: this.clientId }), this.notifyStateChange(!0), this.config.enablePresence !== !1) {
11036
11036
  const d = this.config.presencePayloadConnected ?? { connected: !0 };
11037
11037
  this.client.publish(e, JSON.stringify(d), { qos: 0, retain: !1 }), this.debugLog("PUBLISH", { topic: e, payload: d });
@@ -11096,9 +11096,9 @@ class Od {
11096
11096
  publishFileMessage(e, t) {
11097
11097
  if (!this.client) return;
11098
11098
  const r = {
11099
- ...Cd,
11099
+ ...Pd,
11100
11100
  ...this.config.fileTemplate ?? {},
11101
- ...Ld(t)
11101
+ ...Md(t)
11102
11102
  }, i = {
11103
11103
  metadata: {
11104
11104
  contentType: "300",
@@ -11137,7 +11137,7 @@ class Od {
11137
11137
  * Send a read receipt for a message. Tiledesk widgets publish
11138
11138
  * `{"status":300}` to apps/{appId}/users/{userId}/messages/{convId}/{msgId}/update.
11139
11139
  */
11140
- publishReadReceipt(e, t, r = Td) {
11140
+ publishReadReceipt(e, t, r = Cd) {
11141
11141
  if (!this.client) return;
11142
11142
  const i = this.renderTemplate(this.topics.inboundUpdate, { conversationId: e, messageId: t });
11143
11143
  this.client.publish(i, JSON.stringify({ status: r }), {
@@ -11268,7 +11268,7 @@ class Od {
11268
11268
  this.messageHandlers.forEach((c) => c(i, l));
11269
11269
  }
11270
11270
  buildOutgoingEnvelope(e, t) {
11271
- const r = { ...Pd, ...this.config.messageDefaults ?? {} }, i = this.config.senderFullname ?? this.config.userName ?? this.config.userId, n = this.config.recipientFullnameResolver?.(e), o = {
11271
+ const r = { ...Od, ...this.config.messageDefaults ?? {} }, i = this.config.senderFullname ?? this.config.userName ?? this.config.userId, n = this.config.recipientFullnameResolver?.(e), o = {
11272
11272
  projectId: this.config.projectId,
11273
11273
  ...r.departmentId ? { departmentId: r.departmentId } : {},
11274
11274
  ...this.config.userName ? { userFullname: this.config.userName } : {},
@@ -11342,16 +11342,16 @@ class Od {
11342
11342
  return new RegExp(`^${r}$`);
11343
11343
  }
11344
11344
  }
11345
- function Ld(s) {
11345
+ function Md(s) {
11346
11346
  const e = {};
11347
11347
  for (const [t, r] of Object.entries(s))
11348
11348
  r !== void 0 && (e[t] = r);
11349
11349
  return e;
11350
11350
  }
11351
- function Md(s, e) {
11351
+ function Nd(s, e) {
11352
11352
  return (s.sender ?? "").toString() === e;
11353
11353
  }
11354
- function Nd(s, e) {
11354
+ function Rd(s, e) {
11355
11355
  const t = (s.sender ?? "").toString(), r = e.systemSenders ?? ["metadata", "system"], i = e.botSenderPrefix ?? "bot_";
11356
11356
  return t ? t === e.userId ? "user" : t.startsWith(i) ? "assistant" : r.includes(t) ? "system" : "agent" : "system";
11357
11357
  }
@@ -11372,7 +11372,7 @@ function Wl(s) {
11372
11372
  }
11373
11373
  return e;
11374
11374
  }
11375
- function Rd(s) {
11375
+ function jd(s) {
11376
11376
  const e = Wl(s);
11377
11377
  if (e.contentType !== "300") return null;
11378
11378
  const t = e.payload, r = t && Array.isArray(t.elements) ? t.elements : null;
@@ -11386,10 +11386,10 @@ function Rd(s) {
11386
11386
  };
11387
11387
  }
11388
11388
  function Zo(s, e, t) {
11389
- const r = Nd(s, t), i = Wl(s), n = Rd(s);
11389
+ const r = Rd(s, t), i = Wl(s), n = jd(s);
11390
11390
  let o = "";
11391
11391
  i.innerMessage ? o = i.innerMessage : typeof s.text == "string" && (s.text.trim().startsWith("{") ? i.contentType !== "300" && (o = s.text) : o = s.text);
11392
- const a = typeof s.message_id == "string" ? s.message_id : `td_${Date.now()}_${Math.random().toString(36).slice(2, 8)}`, l = typeof s.timestamp == "number" ? new Date(s.timestamp).toISOString() : (/* @__PURE__ */ new Date()).toISOString(), c = r === "assistant" ? "assistant" : r === "agent" ? "agent" : r === "system" ? "system" : "user", u = typeof s.status == "number" ? jd(s.status) : "delivered", d = {
11392
+ const a = typeof s.message_id == "string" ? s.message_id : `td_${Date.now()}_${Math.random().toString(36).slice(2, 8)}`, l = typeof s.timestamp == "number" ? new Date(s.timestamp).toISOString() : (/* @__PURE__ */ new Date()).toISOString(), c = r === "assistant" ? "assistant" : r === "agent" ? "agent" : r === "system" ? "system" : "user", u = typeof s.status == "number" ? Dd(s.status) : "delivered", d = {
11393
11393
  id: a,
11394
11394
  externalId: a,
11395
11395
  conversationId: e,
@@ -11416,10 +11416,10 @@ function Zo(s, e, t) {
11416
11416
  }
11417
11417
  ]), { message: d, template: i };
11418
11418
  }
11419
- function jd(s) {
11419
+ function Dd(s) {
11420
11420
  return s < 0 ? "error" : s >= 250 ? "read" : s >= 150 ? "delivered" : "sent";
11421
11421
  }
11422
- class Dd extends da {
11422
+ class $d extends da {
11423
11423
  connection = null;
11424
11424
  tiledesk = null;
11425
11425
  api;
@@ -11432,7 +11432,7 @@ class Dd extends da {
11432
11432
  historyAdapter;
11433
11433
  tiledeskUnsubs = [];
11434
11434
  constructor(e, t) {
11435
- super(), this.config = e, this.mode = e.transport ?? "aikaara", this.uploadAdapter = t?.uploadAdapter ?? null, this.historyAdapter = t?.historyAdapter ?? null, this.api = new gc(e.baseUrl, e.userToken, e.apiKey, e.authToken), this.messageStore = new bc(), this.conversationManager = new yc(e.conversationId), this.usesAikaara() && (this.connection = new mc(e), this.connection.on("connection:state", (r) => {
11435
+ super(), this.config = e, this.mode = e.transport ?? "aikaara", this.uploadAdapter = t?.uploadAdapter ?? null, this.historyAdapter = t?.historyAdapter ?? null, this.api = new bc(e.baseUrl, e.userToken, e.apiKey, e.authToken), this.messageStore = new yc(), this.conversationManager = new vc(e.conversationId), this.usesAikaara() && (this.connection = new gc(e), this.connection.on("connection:state", (r) => {
11436
11436
  this.emit("connection:state", r), this.config.onConnectionStateChange?.(r);
11437
11437
  }), this.connection.on("error", (r) => {
11438
11438
  this.emit("error", r), this.config.onError?.(r);
@@ -11452,7 +11452,7 @@ class Dd extends da {
11452
11452
  throw new Error("AikaaraChatClient: tiledesk transport requires `config.tiledesk` (TiledeskTransportConfig)");
11453
11453
  if (!t?.userId)
11454
11454
  throw new Error("AikaaraChatClient: tiledesk transport requires `config.tiledeskIdentity.userId`");
11455
- this.tiledesk = new Od({
11455
+ this.tiledesk = new Ld({
11456
11456
  ...e,
11457
11457
  userId: t.userId,
11458
11458
  userName: t.userName ?? e.userName,
@@ -11668,7 +11668,7 @@ class Dd extends da {
11668
11668
  systemSenders: this.config.tiledesk?.messageDefaults?.attributes?.systemSenders
11669
11669
  });
11670
11670
  if (this.mode === "dual" && o.role === "assistant") return;
11671
- if (Md(e, n)) {
11671
+ if (Nd(e, n)) {
11672
11672
  const u = this.messageStore.reconcileOptimistic(o);
11673
11673
  if (u) {
11674
11674
  this.emit("message:updated", u);
@@ -11818,20 +11818,20 @@ const ea = {
11818
11818
  doc: "application/msword",
11819
11819
  json: "application/json"
11820
11820
  };
11821
- function $d(s) {
11821
+ function Ud(s) {
11822
11822
  const e = s.lastIndexOf(".");
11823
11823
  return e < 0 || e === s.length - 1 ? "" : s.slice(e + 1).toLowerCase();
11824
11824
  }
11825
- function Ud(s, e, t) {
11826
- const r = $d(s.name || "");
11825
+ function Bd(s, e, t) {
11826
+ const r = Ud(s.name || "");
11827
11827
  if (r && e && e[r]) return e[r];
11828
11828
  const i = s.type;
11829
11829
  return i && i.trim().length > 0 ? i : r && ea[r] ? ea[r] : t;
11830
11830
  }
11831
- function dn(s, e) {
11831
+ function sr(s, e) {
11832
11832
  return s.replace(/\{(\w+)\}/g, (t, r) => e[r] ?? "");
11833
11833
  }
11834
- function Bd(s, e) {
11834
+ function Fd(s, e) {
11835
11835
  const t = e.split(".");
11836
11836
  let r = s;
11837
11837
  for (const i of t)
@@ -11840,11 +11840,11 @@ function Bd(s, e) {
11840
11840
  else return "";
11841
11841
  return typeof r == "string" ? r : "";
11842
11842
  }
11843
- function Fd(s) {
11843
+ function qd(s) {
11844
11844
  const e = s.signedUrlPath || "data.s3SignedUrl";
11845
11845
  return {
11846
11846
  async upload(t, r) {
11847
- const i = t.name || `upload-${Date.now()}`, n = Ud(
11847
+ const i = t.name || `upload-${Date.now()}`, n = Bd(
11848
11848
  t,
11849
11849
  s.contentTypeMap,
11850
11850
  s.contentTypeFallback ?? "application/octet-stream"
@@ -11859,18 +11859,30 @@ function Fd(s) {
11859
11859
  ...s.extraHeaders ?? {},
11860
11860
  ...a ? { authorization: a } : {}
11861
11861
  };
11862
- let c = s.signEndpoint.includes("{") ? s.signEndpoint : `${s.signEndpoint}?fileName={fileName}`;
11863
- if (!c.includes("{contentType}")) {
11864
- const w = c.includes("?") ? "&" : "?";
11865
- c = `${c}${w}contentType={contentType}`;
11866
- }
11867
- const u = dn(c, o), d = await fetch(u, {
11868
- method: s.signMethod ?? "GET",
11869
- headers: l
11870
- });
11862
+ let c, u;
11863
+ if (s.signBody) {
11864
+ c = sr(s.signEndpoint, o);
11865
+ const w = sr(JSON.stringify(s.signBody), o);
11866
+ u = {
11867
+ method: s.signMethod ?? "POST",
11868
+ headers: { ...l, "content-type": "application/json" },
11869
+ body: w
11870
+ };
11871
+ } else {
11872
+ let w = s.signEndpoint.includes("{") ? s.signEndpoint : `${s.signEndpoint}?fileName={fileName}`;
11873
+ if (!w.includes("{contentType}")) {
11874
+ const m = w.includes("?") ? "&" : "?";
11875
+ w = `${w}${m}contentType={contentType}`;
11876
+ }
11877
+ c = sr(w, o), u = {
11878
+ method: s.signMethod ?? "GET",
11879
+ headers: l
11880
+ };
11881
+ }
11882
+ const d = await fetch(c, u);
11871
11883
  if (!d.ok)
11872
11884
  throw new Error(`Sign request failed: ${d.status}`);
11873
- const p = await d.json().catch(() => ({})), g = Bd(p, e);
11885
+ const p = await d.json().catch(() => ({})), g = Fd(p, e);
11874
11886
  if (!g) throw new Error(`Sign response missing path "${e}"`);
11875
11887
  const h = s.s3HostRewrite ? g.replace(/^https:\/\/[^/]+/i, s.s3HostRewrite) : g, b = await fetch(h, {
11876
11888
  method: "PUT",
@@ -11883,7 +11895,7 @@ function Fd(s) {
11883
11895
  }
11884
11896
  if (s.registerEndpoint) {
11885
11897
  const w = JSON.parse(
11886
- dn(JSON.stringify(s.registerBody ?? {}), o)
11898
+ sr(JSON.stringify(s.registerBody ?? {}), o)
11887
11899
  ), m = await fetch(s.registerEndpoint, {
11888
11900
  method: "POST",
11889
11901
  headers: { ...l, "content-type": "application/json" },
@@ -11895,7 +11907,7 @@ function Fd(s) {
11895
11907
  }
11896
11908
  }
11897
11909
  return {
11898
- url: s.viewerTemplate ? dn(s.viewerTemplate, o) : g.split("?")[0],
11910
+ url: s.viewerTemplate ? sr(s.viewerTemplate, o) : g.split("?")[0],
11899
11911
  fileName: i,
11900
11912
  contentType: n,
11901
11913
  byteSize: t.size,
@@ -11937,9 +11949,9 @@ function zl(s) {
11937
11949
  }
11938
11950
  };
11939
11951
  }
11940
- const qd = "/tilechat/{userId}/conversations/{conversationId}/messages?pageSize={pageSize}";
11941
- function Hd(s) {
11942
- const e = s.apiBase.replace(/\/$/, ""), t = s.pageSize ?? 200, r = s.pathTemplate ?? qd;
11952
+ const Hd = "/tilechat/{userId}/conversations/{conversationId}/messages?pageSize={pageSize}";
11953
+ function Wd(s) {
11954
+ const e = s.apiBase.replace(/\/$/, ""), t = s.pageSize ?? 200, r = s.pathTemplate ?? Hd;
11943
11955
  return {
11944
11956
  async fetchMessages(i, n) {
11945
11957
  const o = r.replace("{userId}", encodeURIComponent(n.userId)).replace("{conversationId}", encodeURIComponent(i)).replace("{appId}", encodeURIComponent(n.appId ?? "tilechat")).replace("{projectId}", encodeURIComponent(n.projectId ?? "")).replace("{pageSize}", String(t)), a = o.startsWith("http") ? o : `${e}${o.startsWith("/") ? o : `/${o}`}`, l = {
@@ -11965,7 +11977,7 @@ function Hd(s) {
11965
11977
  }
11966
11978
  };
11967
11979
  }
11968
- const Wd = "^[A-Z]{4}[0-9]{5}[A-Z]$", zd = "^\\S{12}$", Vl = "^[A-Z]{4}0[A-Z0-9]{6}$", Kl = "^[0-9]{6}$", Vd = {
11980
+ const zd = "^[A-Z]{4}[0-9]{5}[A-Z]$", Vd = "^\\S{12}$", Vl = "^[A-Z]{4}0[A-Z0-9]{6}$", Kl = "^[0-9]{6}$", Kd = {
11969
11981
  id: "house-property",
11970
11982
  title: "House Property",
11971
11983
  icon: "🏠",
@@ -12037,7 +12049,7 @@ const Wd = "^[A-Z]{4}[0-9]{5}[A-Z]$", zd = "^\\S{12}$", Vl = "^[A-Z]{4}0[A-Z0-9]
12037
12049
  }
12038
12050
  ],
12039
12051
  submitLabel: "Save"
12040
- }, Kd = {
12052
+ }, Gd = {
12041
12053
  id: "salary-hra",
12042
12054
  title: "Salary / HRA / Allowances",
12043
12055
  icon: "💰",
@@ -12062,7 +12074,7 @@ const Wd = "^[A-Z]{4}[0-9]{5}[A-Z]$", zd = "^\\S{12}$", Vl = "^[A-Z]{4}0[A-Z0-9]
12062
12074
  // Optional: the pattern check only fires on a non-empty value, so a
12063
12075
  // blank TAN saves cleanly while a malformed one is still caught.
12064
12076
  label: "TAN (Tax Deduction Account Number)",
12065
- pattern: Wd,
12077
+ pattern: zd,
12066
12078
  uppercase: !0,
12067
12079
  maxLength: 10
12068
12080
  }
@@ -12091,7 +12103,7 @@ const Wd = "^[A-Z]{4}[0-9]{5}[A-Z]$", zd = "^\\S{12}$", Vl = "^[A-Z]{4}0[A-Z0-9]
12091
12103
  }
12092
12104
  ],
12093
12105
  submitLabel: "Save"
12094
- }, Gd = {
12106
+ }, Yd = {
12095
12107
  id: "deductions",
12096
12108
  title: "Deductions",
12097
12109
  icon: "📋",
@@ -12135,7 +12147,7 @@ const Wd = "^[A-Z]{4}[0-9]{5}[A-Z]$", zd = "^\\S{12}$", Vl = "^[A-Z]{4}0[A-Z0-9]
12135
12147
  id: "us80ccd1bPanNo",
12136
12148
  type: "text",
12137
12149
  label: "PRAN No.",
12138
- pattern: zd,
12150
+ pattern: Vd,
12139
12151
  maxLength: 12
12140
12152
  }
12141
12153
  ]
@@ -12371,7 +12383,7 @@ const Wd = "^[A-Z]{4}[0-9]{5}[A-Z]$", zd = "^\\S{12}$", Vl = "^[A-Z]{4}0[A-Z0-9]
12371
12383
  }
12372
12384
  ],
12373
12385
  submitLabel: "Save"
12374
- }, Yd = {
12386
+ }, Jd = {
12375
12387
  id: "other-sources",
12376
12388
  title: "Income from Other Sources",
12377
12389
  icon: "💵",
@@ -12427,7 +12439,7 @@ const Wd = "^[A-Z]{4}[0-9]{5}[A-Z]$", zd = "^\\S{12}$", Vl = "^[A-Z]{4}0[A-Z0-9]
12427
12439
  }
12428
12440
  ],
12429
12441
  submitLabel: "Save"
12430
- }, Jd = {
12442
+ }, Qd = {
12431
12443
  id: "crypto-income",
12432
12444
  title: "Crypto Income",
12433
12445
  icon: "🪙",
@@ -12456,7 +12468,7 @@ const Wd = "^[A-Z]{4}[0-9]{5}[A-Z]$", zd = "^\\S{12}$", Vl = "^[A-Z]{4}0[A-Z0-9]
12456
12468
  }
12457
12469
  ],
12458
12470
  submitLabel: "Save"
12459
- }, Qd = {
12471
+ }, Xd = {
12460
12472
  id: "business-profession",
12461
12473
  title: "Business / Profession",
12462
12474
  icon: "💼",
@@ -12529,7 +12541,7 @@ const Wd = "^[A-Z]{4}[0-9]{5}[A-Z]$", zd = "^\\S{12}$", Vl = "^[A-Z]{4}0[A-Z0-9]
12529
12541
  }
12530
12542
  ],
12531
12543
  submitLabel: "Save"
12532
- }, Xd = {
12544
+ }, Zd = {
12533
12545
  id: "agricultural-income",
12534
12546
  title: "Agricultural Income",
12535
12547
  icon: "🌾",
@@ -12593,7 +12605,7 @@ const Wd = "^[A-Z]{4}[0-9]{5}[A-Z]$", zd = "^\\S{12}$", Vl = "^[A-Z]{4}0[A-Z0-9]
12593
12605
  }
12594
12606
  ],
12595
12607
  submitLabel: "Save"
12596
- }, Zd = {
12608
+ }, eh = {
12597
12609
  id: "bank-details",
12598
12610
  title: "Personal / Bank Details",
12599
12611
  icon: "🏦",
@@ -12646,22 +12658,22 @@ const Wd = "^[A-Z]{4}[0-9]{5}[A-Z]$", zd = "^\\S{12}$", Vl = "^[A-Z]{4}0[A-Z0-9]
12646
12658
  // },
12647
12659
  ],
12648
12660
  submitLabel: "Save"
12649
- }, eh = [
12650
- Kd,
12651
- Qd,
12652
- Yd,
12653
- Jd,
12654
- Vd,
12661
+ }, th = [
12655
12662
  Gd,
12656
12663
  Xd,
12657
- Zd
12664
+ Jd,
12665
+ Qd,
12666
+ Kd,
12667
+ Yd,
12668
+ Zd,
12669
+ eh
12658
12670
  // Hidden for now — re-enable to restore the full set:
12659
12671
  // capitalGains,
12660
12672
  // exemptIncome,
12661
12673
  // taxPaidTds,
12662
12674
  // haveAQuestion,
12663
12675
  ];
12664
- function th(s, e) {
12676
+ function rh(s, e) {
12665
12677
  const t = s || {}, r = {
12666
12678
  userId: nt(e.userId),
12667
12679
  assessmentYear: e.assessmentYear,
@@ -12669,9 +12681,9 @@ function th(s, e) {
12669
12681
  // though only the bank/aadhaar section exposes it for editing.
12670
12682
  aadhaarNumber: Ee(t.aadhaarNumber),
12671
12683
  isRevised: e.isRevised || "N",
12672
- timestamp: mh()
12684
+ timestamp: gh()
12673
12685
  };
12674
- r.us80cAmount = _e(t.us80cAmount), r.us80dForSelfAndFamilyAmount = _e(t.us80dForSelfAndFamilyAmount), r.us80dForParentsAmount = _e(t.us80dForParentsAmount), r.hasParentOverSixty = pr(t.hasParentOverSixty), r.preventiveHealthCheckUp = _e(t.preventiveHealthCheckUp), r.medicalExpenditure = _e(t.medicalExpenditure), r.savingBankInterest = _e(t.savingBankInterest), r.fdInterest = _e(t.fdInterest), r.dividend = _e(t.dividend), r.anyOtherIncome = _e(t.anyOtherIncome), r.familyPension = _e(t.familyPension), r.cryptoSellValue = _e(t.cryptoSellPrice), r.cryptoPurchaseAmount = _e(t.cryptoPurchasePrice), r.vdaPurchaseCost = _e(t.cryptoPurchasePrice);
12686
+ r.us80cAmount = _e(t.us80cAmount), r.us80dForSelfAndFamilyAmount = _e(t.us80dForSelfAndFamilyAmount), r.us80dForParentsAmount = _e(t.us80dForParentsAmount), r.hasParentOverSixty = mr(t.hasParentOverSixty), r.preventiveHealthCheckUp = _e(t.preventiveHealthCheckUp), r.medicalExpenditure = _e(t.medicalExpenditure), r.savingBankInterest = _e(t.savingBankInterest), r.fdInterest = _e(t.fdInterest), r.dividend = _e(t.dividend), r.anyOtherIncome = _e(t.anyOtherIncome), r.familyPension = _e(t.familyPension), r.cryptoSellValue = _e(t.cryptoSellPrice), r.cryptoPurchaseAmount = _e(t.cryptoPurchasePrice), r.vdaPurchaseCost = _e(t.cryptoPurchasePrice);
12675
12687
  const i = (_e(t.bizReceiptsBank) ?? 0) + (_e(t.bizReceiptsCash) ?? 0), n = (_e(t.profReceiptsBank) ?? 0) + (_e(t.profReceiptsCash) ?? 0), o = Ee(t.bizName) !== void 0 || i > 0;
12676
12688
  r.businessName = Ee(o ? t.bizName : t.profName), r.businessAnnualTurnOver = o ? i || void 0 : n || void 0, r.agricultureDetails = Yl(t), r.exemptIncomeAmount = _e(t.exemptIncome), r.exemptIncomeNature = Ee(t.exemptIncomeNature), _e(t.exemptIncome) !== void 0 && (r.exemptIncomes = [
12677
12689
  { name: Ee(t.exemptIncomeNature) ?? "Exempt income", value: String(_e(t.exemptIncome)) }
@@ -12686,9 +12698,9 @@ function th(s, e) {
12686
12698
  amount: _e(t.immovableAssetCost)
12687
12699
  };
12688
12700
  Object.values(a).some((u) => u !== void 0) && (r.immovableAsset = [a]);
12689
- const l = hn(t.hpDetails, rh);
12701
+ const l = hn(t.hpDetails, nh);
12690
12702
  l.length && (r.hpDetails = l);
12691
- const c = hn(t.salaryDetails, nh);
12703
+ const c = hn(t.salaryDetails, ih);
12692
12704
  if (c.length) {
12693
12705
  r.salaryIncome = c;
12694
12706
  const u = hn(t.salaryDetails, (p) => ({
@@ -12696,25 +12708,25 @@ function th(s, e) {
12696
12708
  employerName: Ee(p.employerName)
12697
12709
  }));
12698
12710
  u.length && (r.salary = u);
12699
- const d = on(t.salaryDetails)[0] ?? {};
12711
+ const d = an(t.salaryDetails)[0] ?? {};
12700
12712
  r.hraAmount = _e(d.hraReceived), r.leaveTravelAllowanceAmount = _e(d.leaveTravelAllowance), r.leaveEncashmentAllowanceAmount = _e(d.leaveEncashment), r.anyOtherAllowanceAmount = _e(d.anyOtherAllowance), r.salaryIncomeFlag = !0;
12701
12713
  }
12702
12714
  return rt(r);
12703
12715
  }
12704
- function rh(s) {
12716
+ function nh(s) {
12705
12717
  const e = {
12706
12718
  loanType: "HOME_LOAN",
12707
12719
  loanTakenFrom: Ee(s.loanTakenFrom),
12708
12720
  bankOrInstituteName: Ee(s.lenderName),
12709
12721
  loanAccountNo: Ee(s.loanAccountNumber),
12710
- loanSanctionDate: Qr(s.sanctionDate),
12722
+ loanSanctionDate: Xr(s.sanctionDate),
12711
12723
  totalLoanAmount: _e(s.totalLoanAmount),
12712
12724
  loanOutstandingAmount: _e(s.outstandingAmount),
12713
12725
  interest: _e(s.homeLoanInterest)
12714
12726
  }, t = Object.entries(e).some(([r, i]) => r !== "loanType" && i !== void 0);
12715
12727
  return {
12716
12728
  typeOfHouseProperty: Ee(s.typeOfHouseProperty),
12717
- hasRentalIncome: s.typeOfHouseProperty === "LOP" ? !0 : pr(s.hasRentalIncome),
12729
+ hasRentalIncome: s.typeOfHouseProperty === "LOP" ? !0 : mr(s.hasRentalIncome),
12718
12730
  homeLoanInterest: _e(s.homeLoanInterest),
12719
12731
  homeLoanPrinciple: _e(s.homeLoanPrinciple),
12720
12732
  housePropertyAddress: Ee(s.housePropertyAddress),
@@ -12722,14 +12734,14 @@ function rh(s) {
12722
12734
  rentalIncome: _e(s.rentalIncome),
12723
12735
  nameOfTenant: Ee(s.nameOfTenant),
12724
12736
  propertyTax: _e(s.propertyTax),
12725
- hasCoOwnedProperty: pr(s.hasCoOwnedProperty),
12737
+ hasCoOwnedProperty: mr(s.hasCoOwnedProperty),
12726
12738
  coOwnerName: Ee(s.coOwnerName),
12727
12739
  coOwnerPan: Ee(s.coOwnerPan),
12728
12740
  coOwnerShare: Ee(s.coOwnerShare),
12729
12741
  loanDetails: t ? [e] : void 0
12730
12742
  };
12731
12743
  }
12732
- function nh(s) {
12744
+ function ih(s) {
12733
12745
  return {
12734
12746
  grossSalaryIncome: _e(s.grossSalary),
12735
12747
  salary: _e(s.basicSalary),
@@ -12748,7 +12760,7 @@ function nh(s) {
12748
12760
  }
12749
12761
  };
12750
12762
  }
12751
- function ih(s, e) {
12763
+ function sh(s, e) {
12752
12764
  const t = [];
12753
12765
  for (const r of s) {
12754
12766
  const i = Ee(r.employerName), n = Ee(r.employerTan), o = _e(r.grossSalary), a = _e(r.basicSalary), l = _e(r.totalTdsDeposited);
@@ -12767,7 +12779,7 @@ function ih(s, e) {
12767
12779
  salary: t
12768
12780
  } : null;
12769
12781
  }
12770
- function sh(s, e) {
12782
+ function oh(s, e) {
12771
12783
  const t = Ee(s.aadhaarNumber), r = Ee(s.bankAccountNumber), i = Ee(s.bankIfscCode);
12772
12784
  return t === void 0 && r === void 0 && i === void 0 ? null : {
12773
12785
  userId: nt(e.userId),
@@ -12776,7 +12788,7 @@ function sh(s, e) {
12776
12788
  bankDetails: [{ bankAccountNumber: r, bankIfscCode: i }]
12777
12789
  };
12778
12790
  }
12779
- function oh(s, e) {
12791
+ function ah(s, e) {
12780
12792
  return {
12781
12793
  userId: nt(e.userId),
12782
12794
  assessmentYear: e.assessmentYear,
@@ -12787,7 +12799,7 @@ function oh(s, e) {
12787
12799
  familyPension: _e(s.familyPension) ?? 0
12788
12800
  };
12789
12801
  }
12790
- function ah(s, e) {
12802
+ function lh(s, e) {
12791
12803
  const t = _e(s.cryptoSellPrice), r = _e(s.cryptoPurchasePrice);
12792
12804
  return t === void 0 && r === void 0 ? null : {
12793
12805
  userId: nt(e.userId),
@@ -12796,7 +12808,7 @@ function ah(s, e) {
12796
12808
  vdaSellCost: t ?? 0
12797
12809
  };
12798
12810
  }
12799
- function lh(s, e) {
12811
+ function ch(s, e) {
12800
12812
  const t = (i, n, o, a) => {
12801
12813
  const l = Ee(s[n]), c = _e(s[o]), u = _e(s[a]);
12802
12814
  return l === void 0 && c === void 0 && u === void 0 ? null : {
@@ -12815,20 +12827,20 @@ function lh(s, e) {
12815
12827
  presumptiveIncome: r
12816
12828
  } : null;
12817
12829
  }
12818
- function ch(s) {
12830
+ function uh(s) {
12819
12831
  return Ee(s.lenderName) !== void 0 || Ee(s.loanAccountNumber) !== void 0 || _e(s.totalLoanAmount) !== void 0 || _e(s.outstandingAmount) !== void 0 || _e(s.homeLoanInterest) !== void 0;
12820
12832
  }
12821
12833
  function Gl(s) {
12822
12834
  const e = Ee(s.typeOfHouseProperty)?.toUpperCase();
12823
12835
  return _e(s.rentalIncome) !== void 0 || Ee(s.nameOfTenant) !== void 0 || e === "LOP" || e === "DLOP";
12824
12836
  }
12825
- function uh(s, e) {
12826
- const t = on(s.hpDetails).filter(ch).map((r) => {
12837
+ function dh(s, e) {
12838
+ const t = an(s.hpDetails).filter(uh).map((r) => {
12827
12839
  const i = rt({
12828
12840
  loanType: "HOMELOAN",
12829
12841
  bankOrInstituteName: Ee(r.lenderName),
12830
12842
  loanAccountNo: Ee(r.loanAccountNumber),
12831
- loanSanctionDate: Qr(r.sanctionDate),
12843
+ loanSanctionDate: Xr(r.sanctionDate),
12832
12844
  totalLoanAmount: _e(r.totalLoanAmount),
12833
12845
  loanOutstandingAmount: _e(r.outstandingAmount),
12834
12846
  interest: _e(r.homeLoanInterest)
@@ -12842,7 +12854,7 @@ function uh(s, e) {
12842
12854
  propertyTax: _e(r.propertyTax),
12843
12855
  eligible80EEAAmount: _e(r.eligible80EEAAmount),
12844
12856
  eligible80EEAmount: _e(r.eligible80EEAmount),
12845
- hasCoOwnedProperty: pr(r.hasCoOwnedProperty) ?? !1,
12857
+ hasCoOwnedProperty: mr(r.hasCoOwnedProperty) ?? !1,
12846
12858
  hasRentalIncome: Gl(r),
12847
12859
  loanDetails: [i]
12848
12860
  });
@@ -12853,8 +12865,8 @@ function uh(s, e) {
12853
12865
  hpDetails: t
12854
12866
  } : null;
12855
12867
  }
12856
- function dh(s, e) {
12857
- const t = on(s.hpDetails).filter(Gl).map(
12868
+ function hh(s, e) {
12869
+ const t = an(s.hpDetails).filter(Gl).map(
12858
12870
  (r) => rt({
12859
12871
  typeOfHouseProperty: Ee(r.typeOfHouseProperty),
12860
12872
  housePropertyAddress: Ee(r.housePropertyAddress),
@@ -12873,7 +12885,7 @@ function dh(s, e) {
12873
12885
  hpDetails: t
12874
12886
  } : null;
12875
12887
  }
12876
- function hh(s, e) {
12888
+ function fh(s, e) {
12877
12889
  const t = s || {}, r = (g) => ({
12878
12890
  userId: nt(e.userId),
12879
12891
  assessmentYear: e.assessmentYear,
@@ -12917,7 +12929,7 @@ function hh(s, e) {
12917
12929
  loanTakenFrom: Ee(t.us80eLoanTakenFrom),
12918
12930
  bankOrInstituteName: Ee(t.us80eBankName),
12919
12931
  loanAccountNo: Ee(t.us80eLoanAccountNumber),
12920
- loanSanctionDate: Qr(t.us80eLoanSanctionDate),
12932
+ loanSanctionDate: Xr(t.us80eLoanSanctionDate),
12921
12933
  totalLoanAmount: _e(t.us80eLoanAmount),
12922
12934
  loanOutstandingAmount: _e(t.us80eOutstandingLoan)
12923
12935
  })
@@ -12930,7 +12942,7 @@ function hh(s, e) {
12930
12942
  loanTakenFrom: Ee(t.us80eeLoanTakenFrom),
12931
12943
  bankOrInstituteName: Ee(t.us80eeBankName),
12932
12944
  loanAccountNo: Ee(t.us80eeLoanAccountNumber),
12933
- loanSanctionDate: Qr(t.us80eeLoanSanctionDate),
12945
+ loanSanctionDate: Xr(t.us80eeLoanSanctionDate),
12934
12946
  totalLoanAmount: _e(t.us80eeLoanAmount),
12935
12947
  loanOutstandingAmount: _e(t.us80eeOutstandingLoan),
12936
12948
  // Must match DeductionDTO.vehicleRegistrationNo; sending
@@ -12957,11 +12969,11 @@ function hh(s, e) {
12957
12969
  insurerName: Ee(t.us80dForParentsPolicyCompany),
12958
12970
  accountNo: Ee(t.us80dForParentsPolicyNumber),
12959
12971
  // Sourced from systemFlags.hasParentOverSixty in the pre-fill.
12960
- parentSeniorCitizen: pr(t.hasParentOverSixty) ?? !1
12972
+ parentSeniorCitizen: mr(t.hasParentOverSixty) ?? !1
12961
12973
  })
12962
12974
  ), i;
12963
12975
  }
12964
- function fh(s, e) {
12976
+ function ph(s, e) {
12965
12977
  const t = s || {}, r = _e(t.us80gDonationInCash), i = _e(t.us80gDonationOnline), n = Ee(t.us80gNameOfCharity);
12966
12978
  if (r === void 0 && i === void 0 && n === void 0)
12967
12979
  return null;
@@ -13000,7 +13012,7 @@ function Yl(s) {
13000
13012
  agricultureLandDetails: n ? [i] : void 0
13001
13013
  });
13002
13014
  }
13003
- function ph(s, e) {
13015
+ function mh(s, e) {
13004
13016
  const t = Yl(s);
13005
13017
  return t ? {
13006
13018
  userId: nt(e.userId),
@@ -13023,23 +13035,23 @@ function Ee(s) {
13023
13035
  const e = String(s).trim();
13024
13036
  return e === "" ? void 0 : e;
13025
13037
  }
13026
- function pr(s) {
13038
+ function mr(s) {
13027
13039
  return s === !0 || s === !1 ? s : void 0;
13028
13040
  }
13029
- function mh() {
13041
+ function gh() {
13030
13042
  const s = /* @__PURE__ */ new Date(), e = (t, r = 2) => String(t).padStart(r, "0");
13031
13043
  return `${s.getFullYear()}-${e(s.getMonth() + 1)}-${e(s.getDate())}T${e(s.getHours())}:${e(s.getMinutes())}:${e(s.getSeconds())}.${e(s.getMilliseconds(), 3)}`;
13032
13044
  }
13033
- function Qr(s) {
13045
+ function Xr(s) {
13034
13046
  const e = Ee(s);
13035
13047
  if (e)
13036
13048
  return e.includes("T") ? e : /^\d{4}-\d{2}-\d{2}$/.test(e) ? `${e}T00:00:00Z` : e;
13037
13049
  }
13038
- function on(s) {
13050
+ function an(s) {
13039
13051
  return Array.isArray(s) ? s.filter((e) => e && typeof e == "object") : [];
13040
13052
  }
13041
13053
  function hn(s, e) {
13042
- return on(s).map((t) => rt(e(t))).filter((t) => t !== void 0);
13054
+ return an(s).map((t) => rt(e(t))).filter((t) => t !== void 0);
13043
13055
  }
13044
13056
  function rt(s) {
13045
13057
  if (Array.isArray(s)) {
@@ -13056,10 +13068,10 @@ function rt(s) {
13056
13068
  }
13057
13069
  return s;
13058
13070
  }
13059
- function gh(s) {
13071
+ function bh(s) {
13060
13072
  const e = s && typeof s == "object" ? s : {}, t = {}, r = De(e.employers), i = De(e.taxPaid?.onSalary);
13061
13073
  r.length && (t.salaryDetails = r.map((X) => {
13062
- const z = pn(X.salary), W = pn(X.perquisites), ne = pn(X.profitsInLieuOfSalaryType), D = z + W + ne, G = wh(X.allowance);
13074
+ const z = pn(X.salary), W = pn(X.perquisites), ne = pn(X.profitsInLieuOfSalaryType), D = z + W + ne, G = kh(X.allowance);
13063
13075
  return {
13064
13076
  employerName: Ce(X.employerName),
13065
13077
  employerTan: Ce(X.employerTAN),
@@ -13070,7 +13082,7 @@ function gh(s) {
13070
13082
  leaveTravelAllowance: G.lta,
13071
13083
  leaveEncashment: G.leaveEncashment,
13072
13084
  anyOtherAllowance: G.other,
13073
- totalTdsDeposited: vh(X, i, r) ?? Me(X.totalTdsDeposited)
13085
+ totalTdsDeposited: wh(X, i, r) ?? Me(X.totalTdsDeposited)
13074
13086
  };
13075
13087
  }));
13076
13088
  const n = De(e.houseProperties);
@@ -13127,7 +13139,7 @@ function gh(s) {
13127
13139
  g?.insurerName ?? b?.insurerName
13128
13140
  ), t.us80dForParentsPolicyNumber = Ce(
13129
13141
  g?.policyNo ?? b?.accountNo
13130
- ), t.hasParentOverSixty = kh(
13142
+ ), t.hasParentOverSixty = xh(
13131
13143
  e.systemFlags?.hasParentOverSixty
13132
13144
  ), t.us80ccd1bAmount = void 0, t.us80ccd1bPanNo = Ce(e.pranNumber), t.us80ccd2Amount = void 0;
13133
13145
  const w = De(e.donations)[0];
@@ -13193,17 +13205,17 @@ function gh(s) {
13193
13205
  const $ = De(
13194
13206
  j?.agricultureLandDetails ?? j?.agriculturalLandDetails ?? e.agriculturalLandDetails
13195
13207
  )[0];
13196
- $ && (t.agricultureLandInAcre = Me($.landInAcre), t.agricultureLandDistrict = Ce($.nameOfDistrict), t.agricultureLandPincode = Ce($.pinCode), t.agricultureLandOwner = bh($.owner), t.agricultureLandType = yh($.typeOfLand)), t.aadhaarNumber = Ce(e.aadharNumber);
13208
+ $ && (t.agricultureLandInAcre = Me($.landInAcre), t.agricultureLandDistrict = Ce($.nameOfDistrict), t.agricultureLandPincode = Ce($.pinCode), t.agricultureLandOwner = yh($.owner), t.agricultureLandType = vh($.typeOfLand)), t.aadhaarNumber = Ce(e.aadharNumber);
13197
13209
  const U = De(e.bankDetails)[0];
13198
13210
  return U && (t.bankAccountNumber = Ce(U.accountNumber), t.bankIfscCode = Ce(U.ifsCode)), Jl(t);
13199
13211
  }
13200
- function bh(s) {
13212
+ function yh(s) {
13201
13213
  const e = Ce(s)?.trim();
13202
13214
  if (!e) return;
13203
13215
  const t = e.toUpperCase();
13204
13216
  return t === "O" || t === "OWNED" ? "Owned" : t === "H" || t.startsWith("HELD") ? "Held on lease" : e;
13205
13217
  }
13206
- function yh(s) {
13218
+ function vh(s) {
13207
13219
  const e = Ce(s)?.trim();
13208
13220
  if (!e) return;
13209
13221
  const t = e.toUpperCase();
@@ -13221,7 +13233,7 @@ function pn(s) {
13221
13233
  0
13222
13234
  );
13223
13235
  }
13224
- function vh(s, e, t) {
13236
+ function wh(s, e, t) {
13225
13237
  if (!e.length) return;
13226
13238
  const r = Ce(s.employerTAN)?.trim().toUpperCase();
13227
13239
  if (r) {
@@ -13238,7 +13250,7 @@ function vh(s, e, t) {
13238
13250
  if (t.length === 1 && e.length === 1)
13239
13251
  return Me(e[0].totalTdsDeposited);
13240
13252
  }
13241
- function wh(s) {
13253
+ function kh(s) {
13242
13254
  const e = De(s);
13243
13255
  if (!e.length) return {};
13244
13256
  let t, r, i, n;
@@ -13281,7 +13293,7 @@ function Ce(s) {
13281
13293
  const e = String(s).trim();
13282
13294
  return e === "" ? void 0 : e;
13283
13295
  }
13284
- function kh(s) {
13296
+ function xh(s) {
13285
13297
  if (typeof s == "boolean") return s;
13286
13298
  if (typeof s == "string") {
13287
13299
  const e = s.trim().toLowerCase();
@@ -13304,23 +13316,23 @@ function mn() {
13304
13316
  return console.warn(
13305
13317
  "[smart-edit] API disabled: window.__aikaara_runtime__.getChatJwt is missing — the chat was not mounted via the SDK mountFromSlug path."
13306
13318
  ), null;
13307
- const t = s.__aikaara_descriptor__ ?? {}, r = Lh(t);
13319
+ const t = s.__aikaara_descriptor__ ?? {}, r = Mh(t);
13308
13320
  if (!r)
13309
13321
  return console.warn(
13310
13322
  "[smart-edit] API disabled: could not resolve a TaxBuddy API host from the descriptor (cloud / upload / pan / leader endpoints)."
13311
13323
  ), null;
13312
- const i = Mh(e.slug), n = typeof i?.tenantJwt == "string" ? i.tenantJwt : "", o = e.getChatJwt, a = async () => n || await o(), l = (i && i.userId != null && i.userId !== "" ? String(i.userId) : Rh(e.identity)) || void 0;
13324
+ const i = Nh(e.slug), n = typeof i?.tenantJwt == "string" ? i.tenantJwt : "", o = e.getChatJwt, a = async () => n || await o(), l = (i && i.userId != null && i.userId !== "" ? String(i.userId) : jh(e.identity)) || void 0;
13313
13325
  return console.info("[smart-edit] API config — base:", r, "· userId:", l ?? "(none)"), {
13314
13326
  baseUrl: r,
13315
13327
  getToken: a,
13316
- headers: Nh(t.auth?.headers),
13317
- assessmentYear: t.itr?.assessmentYear || jh(),
13328
+ headers: Rh(t.auth?.headers),
13329
+ assessmentYear: t.itr?.assessmentYear || Dh(),
13318
13330
  isRevised: "N",
13319
13331
  userId: l,
13320
13332
  submitUrl: t.itr?.automationSubmitUrl || void 0
13321
13333
  };
13322
13334
  }
13323
- async function xh(s) {
13335
+ async function _h(s) {
13324
13336
  const e = await s.getToken(), t = s.userId;
13325
13337
  if (!t)
13326
13338
  throw new Error(
@@ -13338,11 +13350,11 @@ async function xh(s) {
13338
13350
  const i = await r.text().catch(() => "");
13339
13351
  throw new Error(`[smart-edit] GET /itr/latest-itr → ${r.status} ${i.slice(0, 200)}`);
13340
13352
  }
13341
- return gh(Ns(await r.json().catch(() => ({}))));
13353
+ return bh(Ns(await r.json().catch(() => ({}))));
13342
13354
  }
13343
- async function _h(s, e) {
13355
+ async function Sh(s, e) {
13344
13356
  const t = await s.getToken(), r = s.userId, i = {
13345
- ...th(e, {
13357
+ ...rh(e, {
13346
13358
  userId: r,
13347
13359
  assessmentYear: s.assessmentYear,
13348
13360
  isRevised: s.isRevised
@@ -13366,31 +13378,31 @@ async function _h(s, e) {
13366
13378
  }
13367
13379
  return Ns(await a.json().catch(() => ({})));
13368
13380
  }
13369
- async function Sh(s, e) {
13381
+ async function Eh(s, e) {
13370
13382
  return _t(s, `${s.baseUrl}/itr/v1/automation/salary`, e);
13371
13383
  }
13372
- async function Eh(s, e) {
13384
+ async function Ah(s, e) {
13373
13385
  return _t(s, `${s.baseUrl}/itr/v1/automation/bank-aadhaar`, e);
13374
13386
  }
13375
13387
  async function ta(s, e) {
13376
13388
  return _t(s, s.submitUrl || `${s.baseUrl}/itr/v1/automation/data`, e);
13377
13389
  }
13378
- async function Ah(s, e) {
13379
- return _t(s, s.submitUrl || `${s.baseUrl}/itr/v1/automation/data`, e);
13380
- }
13381
13390
  async function Ih(s, e) {
13382
13391
  return _t(s, s.submitUrl || `${s.baseUrl}/itr/v1/automation/data`, e);
13383
13392
  }
13384
13393
  async function Th(s, e) {
13385
- return _t(s, `${s.baseUrl}/itr/v1/automation/deductions`, e);
13394
+ return _t(s, s.submitUrl || `${s.baseUrl}/itr/v1/automation/data`, e);
13386
13395
  }
13387
13396
  async function Ch(s, e) {
13388
- return _t(s, s.submitUrl || `${s.baseUrl}/itr/v1/automation/data`, e);
13397
+ return _t(s, `${s.baseUrl}/itr/v1/automation/deductions`, e);
13389
13398
  }
13390
13399
  async function Ph(s, e) {
13391
- return _t(s, `${s.baseUrl}/itr/v1/automation/hp-income`, e);
13400
+ return _t(s, s.submitUrl || `${s.baseUrl}/itr/v1/automation/data`, e);
13392
13401
  }
13393
13402
  async function Oh(s, e) {
13403
+ return _t(s, `${s.baseUrl}/itr/v1/automation/hp-income`, e);
13404
+ }
13405
+ async function Lh(s, e) {
13394
13406
  return _t(s, `${s.baseUrl}/itr/v1/automation/vda`, e);
13395
13407
  }
13396
13408
  async function _t(s, e, t) {
@@ -13408,7 +13420,7 @@ async function _t(s, e, t) {
13408
13420
  }
13409
13421
  return Ns(await n.json().catch(() => ({})));
13410
13422
  }
13411
- function Lh(s) {
13423
+ function Mh(s) {
13412
13424
  const e = [
13413
13425
  s.cloud?.listEndpoint,
13414
13426
  s.cloud?.downloadEndpoint,
@@ -13426,7 +13438,7 @@ function Lh(s) {
13426
13438
  }
13427
13439
  return null;
13428
13440
  }
13429
- function Mh(s) {
13441
+ function Nh(s) {
13430
13442
  if (!s || typeof localStorage > "u") return null;
13431
13443
  try {
13432
13444
  const e = localStorage.getItem(`aikaara_sso:${s}`);
@@ -13437,7 +13449,7 @@ function Mh(s) {
13437
13449
  return null;
13438
13450
  }
13439
13451
  }
13440
- function Nh(s) {
13452
+ function Rh(s) {
13441
13453
  const e = {};
13442
13454
  if (!s) return e;
13443
13455
  const t = /^(authorization|content-type|accept)$/i;
@@ -13445,7 +13457,7 @@ function Nh(s) {
13445
13457
  !t.test(r) && typeof i == "string" && (e[r] = i);
13446
13458
  return e;
13447
13459
  }
13448
- function Rh(s) {
13460
+ function jh(s) {
13449
13461
  if (!s) return;
13450
13462
  const e = s.userId ?? s.id ?? s.ext_uid ?? s.extUid;
13451
13463
  return e == null || e === "" ? void 0 : String(e);
@@ -13457,14 +13469,23 @@ function Ns(s) {
13457
13469
  }
13458
13470
  return {};
13459
13471
  }
13460
- function jh() {
13472
+ function Dh() {
13461
13473
  const s = /* @__PURE__ */ new Date(), e = s.getMonth() >= 3 ? s.getFullYear() : s.getFullYear() - 1;
13462
13474
  return `${e}-${e + 1}`;
13463
13475
  }
13464
- const Dh = [
13476
+ const $h = [
13477
+ "No, I have concerns",
13478
+ // Older Tiledesk copy shipped with an extra article; keep it so existing
13479
+ // flows still open the editor.
13465
13480
  "No, I have a concerns"
13466
13481
  ];
13467
- class $h {
13482
+ function Ql(s) {
13483
+ const e = window.__aikaara_descriptor__?.smartEdit?.openOnMessages, t = Array.isArray(e) ? e : $h;
13484
+ if (t.length === 0) return !1;
13485
+ const r = (n) => n.trim().toLowerCase(), i = r(s);
13486
+ return t.some((n) => typeof n == "string" && r(n) === i);
13487
+ }
13488
+ class Uh {
13468
13489
  client;
13469
13490
  panel;
13470
13491
  bubble;
@@ -13476,7 +13497,7 @@ class $h {
13476
13497
  isEmbed = !1;
13477
13498
  smartEditModal = null;
13478
13499
  constructor(e, t, r) {
13479
- this.client = new Dd(e, {
13500
+ this.client = new $d(e, {
13480
13501
  uploadAdapter: r?.uploadAdapter,
13481
13502
  historyAdapter: r?.historyAdapter
13482
13503
  }), this.isEmbed = e.display === "embed", this.bubble = t.querySelector("aikaara-chat-bubble"), this.panel = t.querySelector(".aikaara-panel"), this.header = t.querySelector("aikaara-chat-header"), this.messageList = t.querySelector("aikaara-message-list"), this.input = t.querySelector("aikaara-chat-input"), this.errorBanner = t.querySelector("aikaara-error-banner"), e.welcomeMessage && this.messageList.setWelcomeMessage(e.welcomeMessage), e.showTimestamps !== void 0 && this.messageList.setShowTimestamps(e.showTimestamps), (e.linkHandlers || e.getLinkBearer) && this.messageList.setLinkConfig(e.linkHandlers ?? [], e.getLinkBearer), e.chatActions !== void 0 && this.header.setActions(e.chatActions), this.wireEvents();
@@ -13534,13 +13555,15 @@ class $h {
13534
13555
  }), this.messageList.addEventListener("message-action", (e) => {
13535
13556
  const t = e.detail;
13536
13557
  if (!t?.text) return;
13537
- const r = this.shouldOpenSmartEdit(t.text), i = this.client.config.templateActionAttributes ?? {}, n = t.attributes?.action ?? {}, o = {
13558
+ if (Ql(t.text)) {
13559
+ this.openSmartEdit();
13560
+ return;
13561
+ }
13562
+ const r = this.client.config.templateActionAttributes ?? {}, i = t.attributes?.action ?? {}, n = {
13538
13563
  ...t.attributes,
13539
- action: { ...i, ...n }
13564
+ action: { ...r, ...i }
13540
13565
  };
13541
- this.handleSend(t.text, o).then(() => {
13542
- r && this.openSmartEdit();
13543
- });
13566
+ this.handleSend(t.text, n);
13544
13567
  });
13545
13568
  }
13546
13569
  async handleSend(e, t) {
@@ -13581,17 +13604,6 @@ class $h {
13581
13604
  }
13582
13605
  console.info("[chat-action]", e.id, e.label);
13583
13606
  }
13584
- /**
13585
- * True when the given quick-reply button text is listed in
13586
- * `descriptor.smartEdit.openOnMessages` — i.e. clicking it should open the
13587
- * Smart Edit modal after posting the text. Trimmed + case-insensitive.
13588
- */
13589
- shouldOpenSmartEdit(e) {
13590
- const t = window.__aikaara_descriptor__?.smartEdit?.openOnMessages, r = Array.isArray(t) ? t : Dh;
13591
- if (!Array.isArray(r) || r.length === 0) return !1;
13592
- const i = (o) => o.trim().toLowerCase(), n = i(e);
13593
- return r.some((o) => typeof o == "string" && i(o) === n);
13594
- }
13595
13607
  /**
13596
13608
  * Open the Smart Edit modal. It opens with an EMPTY record — never the
13597
13609
  * demo data (that is for the standalone demo page only), so a save can
@@ -13601,11 +13613,11 @@ class $h {
13601
13613
  */
13602
13614
  async openSmartEdit() {
13603
13615
  const e = this.ensureSmartEditModal();
13604
- e.open({ schemas: eh, data: {} });
13616
+ e.open({ schemas: th, data: {} });
13605
13617
  const t = mn();
13606
13618
  if (!(!t || !t.baseUrl))
13607
13619
  try {
13608
- const r = await xh(t);
13620
+ const r = await _h(t);
13609
13621
  e.setData(r);
13610
13622
  } catch (r) {
13611
13623
  console.warn("[smart-edit] fetch failed", r), this.errorBanner.show(
@@ -13638,32 +13650,32 @@ class $h {
13638
13650
  const i = { userId: r.userId, assessmentYear: r.assessmentYear };
13639
13651
  try {
13640
13652
  if (e === "salary-hra") {
13641
- const n = Array.isArray(t.salaryDetails) ? t.salaryDetails : [], o = ih(n, i);
13642
- o && await Sh(r, o);
13653
+ const n = Array.isArray(t.salaryDetails) ? t.salaryDetails : [], o = sh(n, i);
13654
+ o && await Eh(r, o);
13643
13655
  } else if (e === "bank-details") {
13644
- const n = sh(t, i);
13645
- n && await Eh(r, n);
13656
+ const n = oh(t, i);
13657
+ n && await Ah(r, n);
13646
13658
  } else if (e === "other-sources")
13647
- await ta(r, oh(t, i));
13659
+ await ta(r, ah(t, i));
13648
13660
  else if (e === "business-profession") {
13649
- const n = lh(t, i);
13650
- n && await Ah(r, n);
13661
+ const n = ch(t, i);
13662
+ n && await Ih(r, n);
13651
13663
  } else if (e === "crypto-income") {
13652
- const n = ah(t, i);
13653
- n && await Oh(r, n);
13664
+ const n = lh(t, i);
13665
+ n && await Lh(r, n);
13654
13666
  } else if (e === "agricultural-income") {
13655
- const n = ph(t, i);
13656
- n && await Ih(r, n);
13667
+ const n = mh(t, i);
13668
+ n && await Th(r, n);
13657
13669
  } else if (e === "deductions") {
13658
- for (const o of hh(t, i))
13659
- await Th(r, o);
13660
- const n = fh(t, i);
13670
+ for (const o of fh(t, i))
13671
+ await Ch(r, o);
13672
+ const n = ph(t, i);
13661
13673
  n && await ta(r, n);
13662
13674
  } else if (e === "house-property") {
13663
- const n = uh(t, i);
13664
- n && await Ch(r, n);
13665
- const o = dh(t, i);
13666
- o && await Ph(r, o);
13675
+ const n = dh(t, i);
13676
+ n && await Ph(r, n);
13677
+ const o = hh(t, i);
13678
+ o && await Oh(r, o);
13667
13679
  }
13668
13680
  } catch (n) {
13669
13681
  console.warn("[smart-edit] section save failed", e, n), this.errorBanner.show("Failed to save. Please try again.", 4e3);
@@ -13683,7 +13695,7 @@ class $h {
13683
13695
  return;
13684
13696
  }
13685
13697
  try {
13686
- await _h(t, e);
13698
+ await Sh(t, e);
13687
13699
  } catch (r) {
13688
13700
  console.warn("[smart-edit] save failed", r), this.errorBanner.show(
13689
13701
  "Failed to save your ITR details. Please try again.",
@@ -13699,7 +13711,7 @@ class $h {
13699
13711
  }, 200)));
13700
13712
  }
13701
13713
  }
13702
- class Uh extends HTMLElement {
13714
+ class Bh extends HTMLElement {
13703
13715
  shadow;
13704
13716
  controller = null;
13705
13717
  _config = {};
@@ -13745,13 +13757,13 @@ class Uh extends HTMLElement {
13745
13757
  apiKey: this.getAttribute("api-key") || this._config.apiKey,
13746
13758
  title: this.getAttribute("title") || this._config.title || "Chat",
13747
13759
  subtitle: this.getAttribute("subtitle") || this._config.subtitle,
13748
- theme: this.getAttribute("theme") || this._config.theme || fc,
13760
+ theme: this.getAttribute("theme") || this._config.theme || pc,
13749
13761
  primaryColor: this.getAttribute("primary-color") || this._config.primaryColor || $s,
13750
- position: this.getAttribute("position") || this._config.position || hc,
13751
- width: Number(this.getAttribute("width")) || this._config.width || lc,
13752
- height: Number(this.getAttribute("height")) || this._config.height || cc,
13753
- fontFamily: this._config.fontFamily || dc,
13754
- borderRadius: this._config.borderRadius ?? uc,
13762
+ position: this.getAttribute("position") || this._config.position || fc,
13763
+ width: Number(this.getAttribute("width")) || this._config.width || cc,
13764
+ height: Number(this.getAttribute("height")) || this._config.height || uc,
13765
+ fontFamily: this._config.fontFamily || hc,
13766
+ borderRadius: this._config.borderRadius ?? dc,
13755
13767
  placeholder: this.getAttribute("placeholder") || this._config.placeholder || Us,
13756
13768
  welcomeMessage: this.getAttribute("welcome-message") || this._config.welcomeMessage,
13757
13769
  avatarUrl: this.getAttribute("avatar-url") || this._config.avatarUrl,
@@ -13765,7 +13777,7 @@ class Uh extends HTMLElement {
13765
13777
  chatActions: this._config.chatActions,
13766
13778
  showBubble: this._config.showBubble ?? !0,
13767
13779
  display: (this.getAttribute("display") || this._config.display) ?? "popup",
13768
- offset: this._config.offset || pc,
13780
+ offset: this._config.offset || mc,
13769
13781
  conversationId: this._config.conversationId,
13770
13782
  systemPromptId: this._config.systemPromptId,
13771
13783
  channel: this._config.channel,
@@ -13968,7 +13980,7 @@ class Uh extends HTMLElement {
13968
13980
  }
13969
13981
  async initController() {
13970
13982
  const e = this.getConfig(), t = e.transport ?? "aikaara";
13971
- (t === "aikaara" || t === "dual") && (!e.baseUrl || !e.userToken) || (this.controller?.disconnect(), this.controller = new $h(e, this.shadow, {
13983
+ (t === "aikaara" || t === "dual") && (!e.baseUrl || !e.userToken) || (this.controller?.disconnect(), this.controller = new Uh(e, this.shadow, {
13972
13984
  uploadAdapter: this._config.uploadAdapter,
13973
13985
  historyAdapter: this._config.historyAdapter
13974
13986
  }), await this.controller.connect());
@@ -13988,7 +14000,7 @@ class Uh extends HTMLElement {
13988
14000
  }
13989
14001
  }
13990
14002
  }
13991
- class Bh extends HTMLElement {
14003
+ class Fh extends HTMLElement {
13992
14004
  shadow;
13993
14005
  constructor() {
13994
14006
  super(), this.shadow = this.attachShadow({ mode: "open" });
@@ -14041,12 +14053,12 @@ class Bh extends HTMLElement {
14041
14053
  t && (t.innerHTML = e);
14042
14054
  }
14043
14055
  }
14044
- const Fh = [
14056
+ const qh = [
14045
14057
  { id: "edit-itr", label: "Edit ITR Details", icon: "edit" }
14046
14058
  ];
14047
- class qh extends HTMLElement {
14059
+ class Hh extends HTMLElement {
14048
14060
  shadow;
14049
- actions = Fh;
14061
+ actions = qh;
14050
14062
  menuOpen = !1;
14051
14063
  outsideClickHandler = null;
14052
14064
  static get observedAttributes() {
@@ -14272,7 +14284,7 @@ class qh extends HTMLElement {
14272
14284
  this.setAttribute("status", e);
14273
14285
  }
14274
14286
  }
14275
- const Hh = /<\s*(br|i|b|em|strong|small|sub|sup|p|div|span|ul|ol|li|a|img|code|pre)\b/i, Wh = /&(quot|apos|amp|lt|gt|nbsp|#\d+|#x[0-9a-f]+);/i, zh = {
14287
+ const Wh = /<\s*(br|i|b|em|strong|small|sub|sup|p|div|span|ul|ol|li|a|img|code|pre)\b/i, zh = /&(quot|apos|amp|lt|gt|nbsp|#\d+|#x[0-9a-f]+);/i, Vh = {
14276
14288
  "&quot;": '"',
14277
14289
  "&apos;": "'",
14278
14290
  "&lt;": "<",
@@ -14280,14 +14292,14 @@ const Hh = /<\s*(br|i|b|em|strong|small|sub|sup|p|div|span|ul|ol|li|a|img|code|p
14280
14292
  "&amp;": "&",
14281
14293
  "&nbsp;": " "
14282
14294
  };
14283
- function Vh(s) {
14284
- return s.replace(/&(quot|apos|lt|gt|nbsp);/gi, (e) => zh[e.toLowerCase()] ?? e).replace(/&#(\d+);/g, (e, t) => String.fromCharCode(parseInt(t, 10))).replace(/&#x([0-9a-f]+);/gi, (e, t) => String.fromCharCode(parseInt(t, 16))).replace(/&amp;/gi, "&");
14295
+ function Kh(s) {
14296
+ return s.replace(/&(quot|apos|lt|gt|nbsp);/gi, (e) => Vh[e.toLowerCase()] ?? e).replace(/&#(\d+);/g, (e, t) => String.fromCharCode(parseInt(t, 10))).replace(/&#x([0-9a-f]+);/gi, (e, t) => String.fromCharCode(parseInt(t, 16))).replace(/&amp;/gi, "&");
14285
14297
  }
14286
14298
  function Kt(s) {
14287
- if (Hh.test(s))
14299
+ if (Wh.test(s))
14288
14300
  return s;
14289
- const e = Wh.test(s) ? Vh(s) : s;
14290
- let t = Kh(e);
14301
+ const e = zh.test(s) ? Kh(s) : s;
14302
+ let t = Gh(e);
14291
14303
  return t = t.replace(/```(\w*)\n([\s\S]*?)```/g, (r, i, n) => `<pre><code>${n.trim()}</code></pre>`), t = t.replace(/`([^`]+)`/g, "<code>$1</code>"), t = t.replace(/\*\*(.+?)\*\*/g, "<strong>$1</strong>"), t = t.replace(/\*(.+?)\*/g, "<em>$1</em>"), t = t.replace(
14292
14304
  /\[([^\]]+)\]\((https?:\/\/[^\s)]+)\)/g,
14293
14305
  '<a href="$2" target="_self" rel="noopener noreferrer">$1</a>'
@@ -14299,7 +14311,7 @@ function Kt(s) {
14299
14311
  }
14300
14312
  ), t = t.replace(/\n/g, "<br>"), t;
14301
14313
  }
14302
- function Kh(s) {
14314
+ function Gh(s) {
14303
14315
  const e = {
14304
14316
  "&": "&amp;",
14305
14317
  "<": "&lt;",
@@ -14309,7 +14321,7 @@ function Kh(s) {
14309
14321
  };
14310
14322
  return s.replace(/[&<>"']/g, (t) => e[t]);
14311
14323
  }
14312
- const Gh = /* @__PURE__ */ new Set([
14324
+ const Yh = /* @__PURE__ */ new Set([
14313
14325
  "p",
14314
14326
  "br",
14315
14327
  "hr",
@@ -14344,7 +14356,7 @@ const Gh = /* @__PURE__ */ new Set([
14344
14356
  "tr",
14345
14357
  "th",
14346
14358
  "td"
14347
- ]), Yh = {
14359
+ ]), Jh = {
14348
14360
  a: /* @__PURE__ */ new Set(["href", "target", "rel"]),
14349
14361
  img: /* @__PURE__ */ new Set(["src", "alt", "width", "height"]),
14350
14362
  code: /* @__PURE__ */ new Set(["class"]),
@@ -14354,29 +14366,29 @@ const Gh = /* @__PURE__ */ new Set([
14354
14366
  };
14355
14367
  function Gt(s) {
14356
14368
  const e = document.createElement("template");
14357
- return e.innerHTML = s, Ql(e.content), e.innerHTML;
14369
+ return e.innerHTML = s, Xl(e.content), e.innerHTML;
14358
14370
  }
14359
- function Ql(s) {
14371
+ function Xl(s) {
14360
14372
  const e = Array.from(s.childNodes);
14361
14373
  for (const t of e)
14362
14374
  if (t.nodeType === Node.ELEMENT_NODE) {
14363
14375
  const r = t, i = r.tagName.toLowerCase();
14364
- if (!Gh.has(i)) {
14376
+ if (!Yh.has(i)) {
14365
14377
  const a = document.createTextNode(r.textContent || "");
14366
14378
  s.replaceChild(a, t);
14367
14379
  continue;
14368
14380
  }
14369
- const n = Yh[i] || /* @__PURE__ */ new Set(), o = Array.from(r.attributes);
14381
+ const n = Jh[i] || /* @__PURE__ */ new Set(), o = Array.from(r.attributes);
14370
14382
  for (const a of o)
14371
14383
  n.has(a.name) || r.removeAttribute(a.name);
14372
14384
  if (r.hasAttribute("href")) {
14373
14385
  const a = r.getAttribute("href") || "";
14374
14386
  !a.startsWith("http://") && !a.startsWith("https://") && !a.startsWith("/") && r.removeAttribute("href");
14375
14387
  }
14376
- Ql(t);
14388
+ Xl(t);
14377
14389
  }
14378
14390
  }
14379
- function Jh(s, e = {}) {
14391
+ function Qh(s, e = {}) {
14380
14392
  const { width: t = 600, height: r = 700, closeOnTypes: i } = e, n = Math.round(window.screenX + (window.outerWidth - t) / 2), o = Math.round(window.screenY + (window.outerHeight - r) / 2), a = window.open(
14381
14393
  s,
14382
14394
  "aikaara_popup",
@@ -14394,7 +14406,7 @@ function Jh(s, e = {}) {
14394
14406
  }, 500);
14395
14407
  return a;
14396
14408
  }
14397
- function Qh(s) {
14409
+ function Xh(s) {
14398
14410
  const e = Date.now() - s.getTime(), t = Math.round(e / 1e3);
14399
14411
  if (t < 5) return "just now";
14400
14412
  if (t < 60) return `${t}s ago`;
@@ -14405,7 +14417,7 @@ function Qh(s) {
14405
14417
  const n = Math.round(i / 24);
14406
14418
  return n === 1 ? "Yesterday" : n < 7 ? `${n} d ago` : s.toLocaleDateString(void 0, { month: "short", day: "2-digit" });
14407
14419
  }
14408
- class Xh extends HTMLElement {
14420
+ class Zh extends HTMLElement {
14409
14421
  shadow;
14410
14422
  container;
14411
14423
  welcomeMessage = "";
@@ -14658,7 +14670,7 @@ class Xh extends HTMLElement {
14658
14670
  if (n.role === "user") {
14659
14671
  const o = n.metadata?.attributes?.action;
14660
14672
  if (o) {
14661
- const a = Zh(o);
14673
+ const a = ef(o);
14662
14674
  if (o.message_id && t.set(o.message_id, a), Object.keys(a).length > 0)
14663
14675
  for (let l = i - 1; l >= 0; l--) {
14664
14676
  const c = e[l];
@@ -14796,7 +14808,7 @@ class Xh extends HTMLElement {
14796
14808
  case "date":
14797
14809
  return r;
14798
14810
  case "relative":
14799
- return Qh(t);
14811
+ return Xh(t);
14800
14812
  case "time-24":
14801
14813
  return t.toLocaleTimeString(void 0, { hour: "2-digit", minute: "2-digit", hour12: !1 });
14802
14814
  case "time-seconds":
@@ -14822,7 +14834,7 @@ class Xh extends HTMLElement {
14822
14834
  return;
14823
14835
  }
14824
14836
  if (i === "popup") {
14825
- Jh(e);
14837
+ Qh(e);
14826
14838
  return;
14827
14839
  }
14828
14840
  const n = this.getOrCreateModal(), o = r?.title ?? t ?? "Link";
@@ -14830,7 +14842,7 @@ class Xh extends HTMLElement {
14830
14842
  requestAnimationFrame(() => n.show?.(e, o));
14831
14843
  return;
14832
14844
  }
14833
- const a = ef(e), l = Xl(r.fetch.url, a), c = {
14845
+ const a = tf(e), l = Zl(r.fetch.url, a), c = {
14834
14846
  accept: "application/json",
14835
14847
  ...r.fetch.headers ?? {}
14836
14848
  }, u = r.fetch.authHeader ?? "session";
@@ -14876,7 +14888,7 @@ class Xh extends HTMLElement {
14876
14888
  return e || (e = document.createElement("aikaara-link-modal"), document.body.appendChild(e)), e;
14877
14889
  }
14878
14890
  }
14879
- function Zh(s) {
14891
+ function ef(s) {
14880
14892
  const e = /* @__PURE__ */ new Set(["message_id", "formAction", "requestType"]), t = {};
14881
14893
  for (const [r, i] of Object.entries(s))
14882
14894
  e.has(r) || (Array.isArray(i) && i.every((n) => typeof n == "string") ? t[r] = i : typeof i == "string" && (t[r] = [i]));
@@ -14886,7 +14898,7 @@ function ra(s, e) {
14886
14898
  const t = e.replace(/[.+^${}()|[\]\\]/g, "\\$&");
14887
14899
  return new RegExp("^" + t.replace(/\*/g, ".*").replace(/\?/g, ".") + "$", "i").test(s);
14888
14900
  }
14889
- function ef(s) {
14901
+ function tf(s) {
14890
14902
  try {
14891
14903
  const e = new URL(s), t = {};
14892
14904
  return e.searchParams.forEach((r, i) => {
@@ -14896,11 +14908,11 @@ function ef(s) {
14896
14908
  return {};
14897
14909
  }
14898
14910
  }
14899
- function Xl(s, e) {
14911
+ function Zl(s, e) {
14900
14912
  return s.replace(/\{(\w+)\}/g, (t, r) => e[r] ?? "");
14901
14913
  }
14902
14914
  function bs(s, e) {
14903
- if (typeof s == "string") return Xl(s, e);
14915
+ if (typeof s == "string") return Zl(s, e);
14904
14916
  if (Array.isArray(s)) return s.map((t) => bs(t, e));
14905
14917
  if (s && typeof s == "object") {
14906
14918
  const t = {};
@@ -14909,7 +14921,7 @@ function bs(s, e) {
14909
14921
  }
14910
14922
  return s;
14911
14923
  }
14912
- class tf extends HTMLElement {
14924
+ class rf extends HTMLElement {
14913
14925
  shadow;
14914
14926
  templatePayload = null;
14915
14927
  attachments = [];
@@ -15025,7 +15037,7 @@ class tf extends HTMLElement {
15025
15037
  renderAttachments() {
15026
15038
  return this.attachments.length ? `<div class="attachments">${this.attachments.map(
15027
15039
  (t) => `<a class="attachment" href="${na(t.fileUrl)}" target="_blank" rel="noopener noreferrer">
15028
- 📎 ${rf(t.fileName)}
15040
+ 📎 ${nf(t.fileName)}
15029
15041
  </a>`
15030
15042
  ).join("")}</div>` : "";
15031
15043
  }
@@ -15033,10 +15045,10 @@ class tf extends HTMLElement {
15033
15045
  function na(s) {
15034
15046
  return String(s).replace(/[&<>"']/g, (e) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" })[e]);
15035
15047
  }
15036
- function rf(s) {
15048
+ function nf(s) {
15037
15049
  return String(s).replace(/[&<>]/g, (e) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;" })[e]);
15038
15050
  }
15039
- class nf extends HTMLElement {
15051
+ class sf extends HTMLElement {
15040
15052
  shadow;
15041
15053
  textarea;
15042
15054
  sendBtn;
@@ -15187,7 +15199,7 @@ class nf extends HTMLElement {
15187
15199
  this.textarea.style.height = "auto", this.textarea.style.height = Math.min(this.textarea.scrollHeight, 120) + "px";
15188
15200
  }
15189
15201
  }
15190
- class sf extends HTMLElement {
15202
+ class of extends HTMLElement {
15191
15203
  shadow;
15192
15204
  constructor() {
15193
15205
  super(), this.shadow = this.attachShadow({ mode: "open" });
@@ -15236,7 +15248,7 @@ class sf extends HTMLElement {
15236
15248
  this.removeAttribute("visible");
15237
15249
  }
15238
15250
  }
15239
- class of extends HTMLElement {
15251
+ class af extends HTMLElement {
15240
15252
  shadow;
15241
15253
  bubble;
15242
15254
  constructor() {
@@ -15301,7 +15313,7 @@ class of extends HTMLElement {
15301
15313
  this.bubble?.classList.remove("cursor");
15302
15314
  }
15303
15315
  }
15304
- class af extends HTMLElement {
15316
+ class lf extends HTMLElement {
15305
15317
  shadow;
15306
15318
  container;
15307
15319
  dismissTimer = null;
@@ -15348,7 +15360,7 @@ class af extends HTMLElement {
15348
15360
  }
15349
15361
  }
15350
15362
  const gn = /* @__PURE__ */ new Map();
15351
- function Zl(s) {
15363
+ function ec(s) {
15352
15364
  const e = gn.get(s);
15353
15365
  if (e) return e;
15354
15366
  const t = new Promise((r, i) => {
@@ -15374,7 +15386,7 @@ function Zl(s) {
15374
15386
  });
15375
15387
  return gn.set(s, t), t;
15376
15388
  }
15377
- function lf(s, e = 5e3) {
15389
+ function cf(s, e = 5e3) {
15378
15390
  return new Promise((t, r) => {
15379
15391
  const i = setTimeout(() => r(new Error(`Custom element <${s}> not registered within ${e}ms`)), e);
15380
15392
  customElements.whenDefined(s).then(() => {
@@ -15382,9 +15394,9 @@ function lf(s, e = 5e3) {
15382
15394
  });
15383
15395
  });
15384
15396
  }
15385
- const cf = {
15397
+ const uf = {
15386
15398
  "aikaara-template-payment-link": () => import("./AikaaraPaymentLink-ZYn2r5t-.mjs").then(({ registerAikaaraPaymentLink: s }) => s())
15387
- }, uf = {
15399
+ }, df = {
15388
15400
  "service-picker": "aikaara-service-picker",
15389
15401
  "service-details": "aikaara-service-details",
15390
15402
  "price-breakdown": "aikaara-price-breakdown",
@@ -15392,11 +15404,11 @@ const cf = {
15392
15404
  "call-upload": "aikaara-call-upload",
15393
15405
  "call-confirmation": "aikaara-call-confirmation"
15394
15406
  };
15395
- function df(s) {
15407
+ function hf(s) {
15396
15408
  const e = `template:${s}`, t = window.__aikaara_descriptor__?.components?.[e];
15397
15409
  return t && t.kind === "iife-element" ? { render: t.tag, scriptUrl: t.scriptUrl, props: t.props } : window.__aikaara_descriptor__?.templates?.[s];
15398
15410
  }
15399
- class hf extends HTMLElement {
15411
+ class ff extends HTMLElement {
15400
15412
  shadow;
15401
15413
  payloadData = null;
15402
15414
  innerMessage = "";
@@ -15418,9 +15430,11 @@ class hf extends HTMLElement {
15418
15430
  }
15419
15431
  connectedCallback() {
15420
15432
  this.render(), this.addEventListener("template-action", (e) => {
15421
- const t = e.detail, r = this.getAttribute("message-id");
15433
+ const t = e.detail;
15434
+ if (t?.text && Ql(t.text)) return;
15435
+ const r = this.getAttribute("message-id");
15422
15436
  if (r && t?.attributes?.action) {
15423
- const i = mf(t.attributes.action);
15437
+ const i = gf(t.attributes.action);
15424
15438
  if (Object.keys(i).length > 0)
15425
15439
  try {
15426
15440
  localStorage.setItem(`aikaara_form:${r}`, JSON.stringify(i));
@@ -15496,8 +15510,8 @@ class hf extends HTMLElement {
15496
15510
  <slot></slot>
15497
15511
  `; this.firstChild; ) this.removeChild(this.firstChild);
15498
15512
  if (!e) return;
15499
- const r = t ? df(t) : void 0, i = r?.render ?? (t ? `aikaara-template-${t}` : `aikaara-template-${e}`), n = cf[i];
15500
- if (n && !customElements.get(i) ? n().then(() => this.render()).catch((o) => console.warn(`[aikaara-template-renderer] native template ${i} failed to load`, o)) : r?.scriptUrl && !customElements.get(i) && Zl(r.scriptUrl).then(() => lf(i)).then(() => this.render()).catch((o) => console.warn(`[aikaara-template-renderer] failed to lazy-load ${r.scriptUrl}`, o)), customElements.get(i)) {
15513
+ const r = t ? hf(t) : void 0, i = r?.render ?? (t ? `aikaara-template-${t}` : `aikaara-template-${e}`), n = uf[i];
15514
+ if (n && !customElements.get(i) ? n().then(() => this.render()).catch((o) => console.warn(`[aikaara-template-renderer] native template ${i} failed to load`, o)) : r?.scriptUrl && !customElements.get(i) && ec(r.scriptUrl).then(() => cf(i)).then(() => this.render()).catch((o) => console.warn(`[aikaara-template-renderer] failed to lazy-load ${r.scriptUrl}`, o)), customElements.get(i)) {
15501
15515
  const o = document.createElement(i);
15502
15516
  if (r?.props) {
15503
15517
  for (const [a, l] of Object.entries(r.props))
@@ -15542,7 +15556,7 @@ class hf extends HTMLElement {
15542
15556
  this.mountLinkButton(e);
15543
15557
  return;
15544
15558
  }
15545
- const r = t ? uf[t.replace(/_/g, "-").toLowerCase()] : void 0;
15559
+ const r = t ? df[t.replace(/_/g, "-").toLowerCase()] : void 0;
15546
15560
  if (r) {
15547
15561
  this.mountScheduleWidget(r, e);
15548
15562
  return;
@@ -15589,7 +15603,7 @@ class hf extends HTMLElement {
15589
15603
  */
15590
15604
  mountLinkButton(e) {
15591
15605
  const t = this.renderGen;
15592
- import("./AikaaraLinkButton-DuUkgMrC.mjs").then(({ registerAikaaraLinkButton: r, AikaaraLinkButton: i }) => {
15606
+ import("./AikaaraLinkButton-v4bie0j6.mjs").then(({ registerAikaaraLinkButton: r, AikaaraLinkButton: i }) => {
15593
15607
  if (t !== this.renderGen) return;
15594
15608
  r();
15595
15609
  const n = document.createElement("aikaara-link-button");
@@ -15598,7 +15612,7 @@ class hf extends HTMLElement {
15598
15612
  url: e.url ?? "",
15599
15613
  openLinkInNewTab: e.openLinkInNewTab,
15600
15614
  orderId: e.orderId,
15601
- extra: pf(e),
15615
+ extra: mf(e),
15602
15616
  messageId: this.getAttribute("message-id") ?? void 0
15603
15617
  }), this.appendChild(n);
15604
15618
  });
@@ -15622,26 +15636,26 @@ class hf extends HTMLElement {
15622
15636
  t.setPayload(e), this.appendChild(t);
15623
15637
  }
15624
15638
  }
15625
- const ff = /* @__PURE__ */ new Set([
15639
+ const pf = /* @__PURE__ */ new Set([
15626
15640
  "type",
15627
15641
  "url",
15628
15642
  "name",
15629
15643
  "openLinkInNewTab",
15630
15644
  "orderId"
15631
15645
  ]);
15632
- function pf(s) {
15646
+ function mf(s) {
15633
15647
  const e = {};
15634
15648
  for (const [t, r] of Object.entries(s))
15635
- ff.has(t) || (e[t] = r);
15649
+ pf.has(t) || (e[t] = r);
15636
15650
  return e;
15637
15651
  }
15638
- function mf(s) {
15652
+ function gf(s) {
15639
15653
  const e = /* @__PURE__ */ new Set(["message_id", "formAction", "requestType", "serviceType"]), t = {};
15640
15654
  for (const [r, i] of Object.entries(s))
15641
15655
  e.has(r) || (Array.isArray(i) && i.every((n) => typeof n == "string") ? t[r] = i : typeof i == "string" && (t[r] = [i]));
15642
15656
  return t;
15643
15657
  }
15644
- class gf extends HTMLElement {
15658
+ class bf extends HTMLElement {
15645
15659
  shadow;
15646
15660
  static get observedAttributes() {
15647
15661
  return ["text", "subtext"];
@@ -15690,7 +15704,7 @@ class gf extends HTMLElement {
15690
15704
  function ia(s) {
15691
15705
  return String(s).replace(/[&<>]/g, (e) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;" })[e]);
15692
15706
  }
15693
- class bf extends HTMLElement {
15707
+ class yf extends HTMLElement {
15694
15708
  shadow;
15695
15709
  data = null;
15696
15710
  selected = /* @__PURE__ */ new Set();
@@ -15915,7 +15929,7 @@ function Nt(s) {
15915
15929
  function bn(s) {
15916
15930
  return String(s).replace(/[&<>"']/g, (e) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" })[e]);
15917
15931
  }
15918
- class yf extends HTMLElement {
15932
+ class vf extends HTMLElement {
15919
15933
  shadow;
15920
15934
  data = null;
15921
15935
  constructor() {
@@ -15984,14 +15998,14 @@ class yf extends HTMLElement {
15984
15998
  button:hover { background: var(--aikaara-submit-hover-bg, var(--aikaara-primary-hover, #4f46e5)); }
15985
15999
  button:disabled { opacity: var(--aikaara-submit-disabled-opacity, 0.5); cursor: not-allowed; }
15986
16000
  </style>
15987
- <button type="button">${vf(e)}</button>
16001
+ <button type="button">${wf(e)}</button>
15988
16002
  `, this.shadow.querySelector("button").addEventListener("click", () => this.handleClick());
15989
16003
  }
15990
16004
  }
15991
- function vf(s) {
16005
+ function wf(s) {
15992
16006
  return String(s).replace(/[&<>]/g, (e) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;" })[e]);
15993
16007
  }
15994
- class wf extends HTMLElement {
16008
+ class kf extends HTMLElement {
15995
16009
  shadow;
15996
16010
  data = null;
15997
16011
  dismissed = !1;
@@ -16083,7 +16097,7 @@ class wf extends HTMLElement {
16083
16097
  function yn(s) {
16084
16098
  return String(s).replace(/[&<>]/g, (e) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;" })[e]);
16085
16099
  }
16086
- class kf extends HTMLElement {
16100
+ class xf extends HTMLElement {
16087
16101
  shadow;
16088
16102
  data = null;
16089
16103
  _value = "";
@@ -16166,15 +16180,15 @@ class kf extends HTMLElement {
16166
16180
  }
16167
16181
  :host([data-consumed]) input { pointer-events: none; opacity: 0.65; background: var(--aikaara-input-bg, #f9fafb); }
16168
16182
  </style>
16169
- <label>${sr(e)}${i}</label>
16183
+ <label>${or(e)}${i}</label>
16170
16184
  <input
16171
16185
  type="text"
16172
- placeholder="${sr(t)}"
16173
- value="${sr(this._value)}"
16174
- aria-label="${sr(e)}"
16186
+ placeholder="${or(t)}"
16187
+ value="${or(this._value)}"
16188
+ aria-label="${or(e)}"
16175
16189
  aria-invalid="false"
16176
16190
  />
16177
- <div class="error" role="alert">${sr(this._error)}</div>
16191
+ <div class="error" role="alert">${or(this._error)}</div>
16178
16192
  `;
16179
16193
  const n = this.shadow.querySelector("input");
16180
16194
  n.addEventListener("input", () => {
@@ -16184,13 +16198,13 @@ class kf extends HTMLElement {
16184
16198
  });
16185
16199
  }
16186
16200
  }
16187
- function sr(s) {
16201
+ function or(s) {
16188
16202
  return String(s).replace(
16189
16203
  /[&<>"']/g,
16190
16204
  (e) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" })[e]
16191
16205
  );
16192
16206
  }
16193
- class xf extends HTMLElement {
16207
+ class _f extends HTMLElement {
16194
16208
  static get observedAttributes() {
16195
16209
  return ["slug", "user-id", "user-name", "user-token", "department-id", "config-base", "api-key"];
16196
16210
  }
@@ -16244,7 +16258,7 @@ class xf extends HTMLElement {
16244
16258
  const l = Object.keys(n).length > 0 ? n : void 0;
16245
16259
  return this.mountInflight = (async () => {
16246
16260
  try {
16247
- this.mounted = await Sp({
16261
+ this.mounted = await Ep({
16248
16262
  container: this,
16249
16263
  slug: e,
16250
16264
  configBase: this.getAttribute("config-base") ?? void 0,
@@ -16273,7 +16287,7 @@ class xf extends HTMLElement {
16273
16287
  })(), this.mountInflight;
16274
16288
  }
16275
16289
  }
16276
- class _f extends HTMLElement {
16290
+ class Sf extends HTMLElement {
16277
16291
  shadow;
16278
16292
  root = null;
16279
16293
  iframe = null;
@@ -16390,7 +16404,7 @@ class _f extends HTMLElement {
16390
16404
  });
16391
16405
  }
16392
16406
  }
16393
- const Sf = [
16407
+ const Ef = [
16394
16408
  { label: "Self-filing guidance" },
16395
16409
  { label: "Smart tax suggestions" },
16396
16410
  { label: "Auto-fetch 26AS / AIS" },
@@ -16398,7 +16412,7 @@ const Sf = [
16398
16412
  { label: "Dedicated tax expert" },
16399
16413
  { label: "End-to-end filing" },
16400
16414
  { label: "Document handling" }
16401
- ], Ef = [
16415
+ ], Af = [
16402
16416
  {
16403
16417
  label: "DIY",
16404
16418
  match: ["DIY", "DIY_SALARY"],
@@ -16421,11 +16435,11 @@ const Sf = [
16421
16435
  features: [!0, !0, !0, !0, !0, !0, !0]
16422
16436
  }
16423
16437
  ];
16424
- class Af extends HTMLElement {
16438
+ class If extends HTMLElement {
16425
16439
  shadow;
16426
16440
  data = null;
16427
- columns = Ef;
16428
- features = Sf;
16441
+ columns = Af;
16442
+ features = Ef;
16429
16443
  constructor() {
16430
16444
  super(), this.shadow = this.attachShadow({ mode: "open" });
16431
16445
  }
@@ -16558,7 +16572,7 @@ function vn(s) {
16558
16572
  (e) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" })[e]
16559
16573
  );
16560
16574
  }
16561
- class If extends HTMLElement {
16575
+ class Tf extends HTMLElement {
16562
16576
  shadow;
16563
16577
  root = null;
16564
16578
  schemas = [];
@@ -16649,7 +16663,7 @@ class If extends HTMLElement {
16649
16663
  `;
16650
16664
  const r = this.shadow.querySelector(".modal-body"), i = this.schemas.map(
16651
16665
  (o) => `
16652
- <button class="chip" type="button" data-section-id="${Cf(o.id)}">
16666
+ <button class="chip" type="button" data-section-id="${Pf(o.id)}">
16653
16667
  <span class="chip-icon">${o.icon ?? "📄"}</span>
16654
16668
  <span class="chip-label">${oa(o.title)}</span>
16655
16669
  </button>`
@@ -16682,7 +16696,7 @@ class If extends HTMLElement {
16682
16696
  e.classList.remove("view-picker"), e.classList.add("view-form");
16683
16697
  const t = this.schemas.find((n) => n.id === this.activeSectionId), r = this.shadow.querySelector(".modal-header");
16684
16698
  r.innerHTML = `
16685
- <button class="icon-btn back-btn" type="button" aria-label="Back">${Tf}</button>
16699
+ <button class="icon-btn back-btn" type="button" aria-label="Back">${Cf}</button>
16686
16700
  <div class="modal-title">${oa(t?.title ?? "Edit")}</div>
16687
16701
  <button class="icon-btn close-btn" type="button" aria-label="Close">${sa}</button>
16688
16702
  `;
@@ -16858,14 +16872,14 @@ class If extends HTMLElement {
16858
16872
  `;
16859
16873
  }
16860
16874
  }
16861
- const sa = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>', Tf = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="19" y1="12" x2="5" y2="12"/><polyline points="12 19 5 12 12 5"/></svg>';
16862
- function Cf(s) {
16875
+ const sa = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>', Cf = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="19" y1="12" x2="5" y2="12"/><polyline points="12 19 5 12 12 5"/></svg>';
16876
+ function Pf(s) {
16863
16877
  return s.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
16864
16878
  }
16865
16879
  function oa(s) {
16866
16880
  return s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
16867
16881
  }
16868
- class Pf extends HTMLElement {
16882
+ class Of extends HTMLElement {
16869
16883
  shadow;
16870
16884
  schema = null;
16871
16885
  value = {};
@@ -17424,7 +17438,7 @@ function Jt(s) {
17424
17438
  function tt(s) {
17425
17439
  return `₹${Math.round(Number.isFinite(s) ? s : 0).toLocaleString("en-IN")}`;
17426
17440
  }
17427
- function Xr(s) {
17441
+ function Zr(s) {
17428
17442
  const e = Number(s.basePrice) || 0, t = s.gstRate ?? 0.18, r = Math.round(e * t), i = Number(s.discount) || 0;
17429
17443
  return { base: e, gst: r, discount: i, total: e + r - i };
17430
17444
  }
@@ -17436,7 +17450,7 @@ function aa(s) {
17436
17450
  const e = s.getFullYear(), t = String(s.getMonth() + 1).padStart(2, "0"), r = String(s.getDate()).padStart(2, "0");
17437
17451
  return `${e}-${t}-${r}`;
17438
17452
  }
17439
- function Of(s, e) {
17453
+ function Lf(s, e) {
17440
17454
  const t = new Date(s);
17441
17455
  return t.setDate(t.getDate() + e), t;
17442
17456
  }
@@ -17447,7 +17461,7 @@ function ys(s) {
17447
17461
  year: "numeric"
17448
17462
  });
17449
17463
  }
17450
- function Lf(s) {
17464
+ function Mf(s) {
17451
17465
  const e = Rs(s);
17452
17466
  return {
17453
17467
  weekday: e.toLocaleDateString("en-GB", { weekday: "short" }),
@@ -17455,7 +17469,7 @@ function Lf(s) {
17455
17469
  month: e.toLocaleDateString("en-GB", { month: "short" })
17456
17470
  };
17457
17471
  }
17458
- function ur(s) {
17472
+ function dr(s) {
17459
17473
  const [e = 0, t = 0] = s.split(":").map(Number);
17460
17474
  return `${la(e * 60 + t)} – ${la(e * 60 + t + 30)}`;
17461
17475
  }
@@ -17463,8 +17477,8 @@ function la(s) {
17463
17477
  const e = (s % 1440 + 1440) % 1440, t = Math.floor(e / 60), r = e % 60, i = (t + 11) % 12 + 1, n = t < 12 ? "AM" : "PM";
17464
17478
  return `${i}:${String(r).padStart(2, "0")} ${n}`;
17465
17479
  }
17466
- const Mf = "serviceId";
17467
- class Nf extends HTMLElement {
17480
+ const Nf = "serviceId";
17481
+ class Rf extends HTMLElement {
17468
17482
  shadow;
17469
17483
  data = null;
17470
17484
  selectedId = null;
@@ -17478,7 +17492,7 @@ class Nf extends HTMLElement {
17478
17492
  this.data = e ?? { services: [] }, this.dataset.consumed !== "true" && (this.selectedId = null), this.render();
17479
17493
  }
17480
17494
  getName() {
17481
- return this.data?.postbackKey ?? Mf;
17495
+ return this.data?.postbackKey ?? Nf;
17482
17496
  }
17483
17497
  setConsumedValues(e) {
17484
17498
  const t = e?.[this.getName()], r = Array.isArray(t) ? t[0] : t;
@@ -17519,7 +17533,7 @@ class Nf extends HTMLElement {
17519
17533
  ${t ? `<span class="from">from ${Pe(tt(i.basePrice))}</span>` : ""}
17520
17534
  </button>`).join("");
17521
17535
  this.shadow.innerHTML = `
17522
- <style>${Rf}</style>
17536
+ <style>${jf}</style>
17523
17537
  <div class="card" part="card">
17524
17538
  ${this.data?.title ? `<div class="title">${Pe(this.data.title)}</div>` : ""}
17525
17539
  ${this.data?.subtitle ? `<div class="subtitle">${Pe(this.data.subtitle)}</div>` : ""}
@@ -17535,7 +17549,7 @@ class Nf extends HTMLElement {
17535
17549
  });
17536
17550
  }
17537
17551
  }
17538
- const Rf = `
17552
+ const jf = `
17539
17553
  :host { display: block; font-family: var(--aikaara-font, system-ui, sans-serif); color: var(--aikaara-text, #1f2937); }
17540
17554
  .card {
17541
17555
  background: var(--aikaara-service-bg, var(--aikaara-surface, #ffffff));
@@ -17562,8 +17576,8 @@ const Rf = `
17562
17576
  .name { font-weight: 600; font-size: 14px; }
17563
17577
  .tagline { font-size: 13px; color: var(--aikaara-text-secondary, #6b7280); }
17564
17578
  .from { flex-shrink: 0; font-size: 13px; font-weight: 600; color: var(--aikaara-primary, #6366f1); white-space: nowrap; }
17565
- `, jf = "serviceDetails";
17566
- class Df extends HTMLElement {
17579
+ `, Df = "serviceDetails";
17580
+ class $f extends HTMLElement {
17567
17581
  shadow;
17568
17582
  data = null;
17569
17583
  constructor() {
@@ -17576,7 +17590,7 @@ class Df extends HTMLElement {
17576
17590
  this.data = e, this.render();
17577
17591
  }
17578
17592
  getName() {
17579
- return this.data?.postbackKey ?? jf;
17593
+ return this.data?.postbackKey ?? Df;
17580
17594
  }
17581
17595
  locked() {
17582
17596
  return this.dataset.consumed === "true";
@@ -17587,7 +17601,7 @@ class Df extends HTMLElement {
17587
17601
  [this.getName()]: !0,
17588
17602
  serviceName: this.data.name
17589
17603
  };
17590
- typeof this.data.basePrice == "number" && (t.total = Xr({
17604
+ typeof this.data.basePrice == "number" && (t.total = Zr({
17591
17605
  basePrice: this.data.basePrice,
17592
17606
  discount: this.data.discount,
17593
17607
  gstRate: this.data.gstRate
@@ -17604,7 +17618,7 @@ class Df extends HTMLElement {
17604
17618
  this.shadow.innerHTML = "";
17605
17619
  return;
17606
17620
  }
17607
- const { name: e, tagline: t, badge: r, inclusions: i = [], limitations: n = [], extraInclusions: o = [], extraLimitations: a = [] } = this.data, c = (this.data.showPricing ?? !0) && typeof this.data.basePrice == "number" ? Xr({ basePrice: this.data.basePrice ?? 0, discount: this.data.discount, gstRate: this.data.gstRate }) : null, u = [...i, ...o], d = [...n, ...a], p = u.map((y) => `<li class="row"><span class="mark ok">✓</span><span>${Pe(y)}</span></li>`).join(""), g = d.map((y) => `<li class="row muted"><span class="mark no">✕</span><span>${Pe(y)}</span></li>`).join(""), h = c ? `
17621
+ const { name: e, tagline: t, badge: r, inclusions: i = [], limitations: n = [], extraInclusions: o = [], extraLimitations: a = [] } = this.data, c = (this.data.showPricing ?? !0) && typeof this.data.basePrice == "number" ? Zr({ basePrice: this.data.basePrice ?? 0, discount: this.data.discount, gstRate: this.data.gstRate }) : null, u = [...i, ...o], d = [...n, ...a], p = u.map((y) => `<li class="row"><span class="mark ok">✓</span><span>${Pe(y)}</span></li>`).join(""), g = d.map((y) => `<li class="row muted"><span class="mark no">✕</span><span>${Pe(y)}</span></li>`).join(""), h = c ? `
17608
17622
  <div class="section">
17609
17623
  <h3>Pricing</h3>
17610
17624
  <div class="price">
@@ -17615,7 +17629,7 @@ class Df extends HTMLElement {
17615
17629
  </div>
17616
17630
  </div>` : "", b = this.locked() ? "" : `<button class="cta" type="button">${Pe(this.data.continueLabel ?? "Continue")}</button>`;
17617
17631
  this.shadow.innerHTML = `
17618
- <style>${$f}</style>
17632
+ <style>${Uf}</style>
17619
17633
  <div class="card" part="card">
17620
17634
  <div class="section">
17621
17635
  ${r ? `<span class="badge">${Pe(r)}</span>` : ""}
@@ -17630,7 +17644,7 @@ class Df extends HTMLElement {
17630
17644
  `, this.shadow.querySelector("button.cta")?.addEventListener("click", () => this.handleContinue());
17631
17645
  }
17632
17646
  }
17633
- const $f = `
17647
+ const Uf = `
17634
17648
  :host { display: block; font-family: var(--aikaara-font, system-ui, sans-serif); color: var(--aikaara-text, #1f2937); }
17635
17649
  .card {
17636
17650
  background: var(--aikaara-service-bg, var(--aikaara-surface, #ffffff));
@@ -17663,8 +17677,8 @@ const $f = `
17663
17677
  font-family: inherit; cursor: pointer;
17664
17678
  }
17665
17679
  .cta:hover { filter: brightness(0.96); }
17666
- `, Uf = "priceAccepted";
17667
- class Bf extends HTMLElement {
17680
+ `, Bf = "priceAccepted";
17681
+ class Ff extends HTMLElement {
17668
17682
  shadow;
17669
17683
  data = null;
17670
17684
  constructor() {
@@ -17677,14 +17691,14 @@ class Bf extends HTMLElement {
17677
17691
  this.data = e, this.render();
17678
17692
  }
17679
17693
  getName() {
17680
- return this.data?.postbackKey ?? Uf;
17694
+ return this.data?.postbackKey ?? Bf;
17681
17695
  }
17682
17696
  locked() {
17683
17697
  return this.dataset.consumed === "true";
17684
17698
  }
17685
17699
  handleContinue() {
17686
17700
  if (this.locked() || !this.data) return;
17687
- const e = this.data.continueLabel ?? "Continue", t = Xr(this.data), r = {
17701
+ const e = this.data.continueLabel ?? "Continue", t = Zr(this.data), r = {
17688
17702
  [this.getName()]: !0,
17689
17703
  total: t.total
17690
17704
  };
@@ -17701,9 +17715,9 @@ class Bf extends HTMLElement {
17701
17715
  this.shadow.innerHTML = "";
17702
17716
  return;
17703
17717
  }
17704
- const e = Xr(this.data), t = Math.round((this.data.gstRate ?? 0.18) * 100), r = this.data.feeLabel ?? "Service Fee", i = this.data.discountLabel ?? "Discount", n = this.data.totalLabel ?? "Total Payable", o = this.data.name ? `${Pe(this.data.name)} Consultation` : "Price Breakdown", a = this.locked() ? "" : `<button class="cta" type="button">${Pe(this.data.continueLabel ?? "Continue to Schedule")}</button>`;
17718
+ const e = Zr(this.data), t = Math.round((this.data.gstRate ?? 0.18) * 100), r = this.data.feeLabel ?? "Service Fee", i = this.data.discountLabel ?? "Discount", n = this.data.totalLabel ?? "Total Payable", o = this.data.name ? `${Pe(this.data.name)} Consultation` : "Price Breakdown", a = this.locked() ? "" : `<button class="cta" type="button">${Pe(this.data.continueLabel ?? "Continue to Schedule")}</button>`;
17705
17719
  this.shadow.innerHTML = `
17706
- <style>${Ff}</style>
17720
+ <style>${qf}</style>
17707
17721
  <div class="card" part="card">
17708
17722
  <h2>${o}</h2>
17709
17723
  <p class="sub">30 minute call with a tax expert</p>
@@ -17722,7 +17736,7 @@ class Bf extends HTMLElement {
17722
17736
  `, this.shadow.querySelector("button.cta")?.addEventListener("click", () => this.handleContinue());
17723
17737
  }
17724
17738
  }
17725
- const Ff = `
17739
+ const qf = `
17726
17740
  :host { display: block; font-family: var(--aikaara-font, system-ui, sans-serif); color: var(--aikaara-text, #1f2937); }
17727
17741
  .card {
17728
17742
  background: var(--aikaara-service-bg, var(--aikaara-surface, #ffffff));
@@ -17746,8 +17760,8 @@ const Ff = `
17746
17760
  font-family: inherit; cursor: pointer;
17747
17761
  }
17748
17762
  .cta:hover { filter: brightness(0.96); }
17749
- `, qf = ["09:00", "10:00", "11:00", "12:00", "14:00", "15:00", "16:00", "17:00"], Hf = 7, Wf = "callSlot";
17750
- class zf extends HTMLElement {
17763
+ `, Hf = ["09:00", "10:00", "11:00", "12:00", "14:00", "15:00", "16:00", "17:00"], Wf = 7, zf = "callSlot";
17764
+ class Vf extends HTMLElement {
17751
17765
  shadow;
17752
17766
  data = null;
17753
17767
  selectedDate = null;
@@ -17780,7 +17794,7 @@ class zf extends HTMLElement {
17780
17794
  this.errorMessage = e ?? "", this.render();
17781
17795
  }
17782
17796
  getName() {
17783
- return this.data?.postbackKey ?? Wf;
17797
+ return this.data?.postbackKey ?? zf;
17784
17798
  }
17785
17799
  setConsumedValues(e) {
17786
17800
  const t = e?.[this.getName()], r = Array.isArray(t) ? t[0] : t;
@@ -17798,10 +17812,10 @@ class zf extends HTMLElement {
17798
17812
  if (!e) return [];
17799
17813
  const t = new Set(e.disabledDates ?? []), r = this.availabilityOverride ?? e.days ?? e.availability ?? e.slots;
17800
17814
  if (r && r.length)
17801
- return r.filter((l) => l && typeof l.date == "string").map((l) => ({ iso: l.date, slots: (l.slots ?? []).map(Vf) })).filter((l) => !t.has(l.iso));
17802
- const i = e.startDate ? Rs(e.startDate) : /* @__PURE__ */ new Date(), n = Math.max(1, e.daysAhead ?? Hf), o = e.times && e.times.length ? e.times : qf, a = [];
17815
+ return r.filter((l) => l && typeof l.date == "string").map((l) => ({ iso: l.date, slots: (l.slots ?? []).map(Kf) })).filter((l) => !t.has(l.iso));
17816
+ const i = e.startDate ? Rs(e.startDate) : /* @__PURE__ */ new Date(), n = Math.max(1, e.daysAhead ?? Wf), o = e.times && e.times.length ? e.times : Hf, a = [];
17803
17817
  for (let l = 0; l < n; l++) {
17804
- const c = aa(Of(i, l));
17818
+ const c = aa(Lf(i, l));
17805
17819
  t.has(c) || a.push({ iso: c, slots: o.map((u) => ({ start: u, available: !0 })) });
17806
17820
  }
17807
17821
  return a;
@@ -17826,7 +17840,7 @@ class zf extends HTMLElement {
17826
17840
  scheduledDate: this.selectedDate,
17827
17841
  scheduledTime: this.selectedSlot,
17828
17842
  slot: this.selectedSlot,
17829
- slotLabel: ur(this.selectedSlot)
17843
+ slotLabel: dr(this.selectedSlot)
17830
17844
  };
17831
17845
  this.data.timezone && (t.timezone = this.data.timezone), this.data.messageId && (t.message_id = this.data.messageId), Object.assign(t, this.data.action ?? {}), this.submitted = !0, this.render(), this.dispatchEvent(
17832
17846
  new CustomEvent("template-action", {
@@ -17862,7 +17876,7 @@ class zf extends HTMLElement {
17862
17876
  if (this.errorMessage) return `<div class="state error">${Pe(this.errorMessage)}</div>`;
17863
17877
  if (!e.length) return '<div class="state">No call slots are available right now.</div>';
17864
17878
  const r = e.map((a) => {
17865
- const { weekday: l, day: c, month: u } = Lf(a.iso);
17879
+ const { weekday: l, day: c, month: u } = Mf(a.iso);
17866
17880
  return `
17867
17881
  <button class="day" type="button" role="radio" aria-checked="${a.iso === this.selectedDate}" data-date="${Jt(a.iso)}">
17868
17882
  <span class="day-weekday">${Pe(l)}</span>
@@ -17874,9 +17888,9 @@ class zf extends HTMLElement {
17874
17888
  return `
17875
17889
  <button class="slot" type="button" role="radio" aria-checked="${a.start === this.selectedSlot}"
17876
17890
  data-time="${Jt(a.start)}" ${l ? "" : "disabled"}>
17877
- ${Pe(ur(a.start))}
17891
+ ${Pe(dr(a.start))}
17878
17892
  </button>`;
17879
- }).join(""), n = this.selectedDate && this.selectedSlot ? `<div class="summary">${Pe(ys(this.selectedDate))} · ${Pe(ur(this.selectedSlot))}</div>` : "", o = this.isLocked() ? "" : `<button class="cta" type="button" ${this.selectedDate && this.selectedSlot ? "" : "disabled"}>
17893
+ }).join(""), n = this.selectedDate && this.selectedSlot ? `<div class="summary">${Pe(ys(this.selectedDate))} · ${Pe(dr(this.selectedSlot))}</div>` : "", o = this.isLocked() ? "" : `<button class="cta" type="button" ${this.selectedDate && this.selectedSlot ? "" : "disabled"}>
17880
17894
  ${Pe(this.data?.continueLabel ?? "Continue")}
17881
17895
  </button>`;
17882
17896
  return `
@@ -17894,7 +17908,7 @@ class zf extends HTMLElement {
17894
17908
  <style>${ca}</style>
17895
17909
  <div class="card locked" part="card">
17896
17910
  <div class="locked-head"><span class="tick" aria-hidden="true">✓</span> Slot selected</div>
17897
- <div class="locked-when">${Pe(ys(this.selectedDate))} · ${Pe(ur(this.selectedSlot))}</div>
17911
+ <div class="locked-when">${Pe(ys(this.selectedDate))} · ${Pe(dr(this.selectedSlot))}</div>
17898
17912
  ${this.data?.timezone ? `<div class="locked-tz">${Pe(this.data.timezone)}</div>` : ""}
17899
17913
  </div>
17900
17914
  `;
@@ -17907,7 +17921,7 @@ class zf extends HTMLElement {
17907
17921
  }), this.shadow.querySelector("button.cta")?.addEventListener("click", () => this.handleContinue());
17908
17922
  }
17909
17923
  }
17910
- function Vf(s) {
17924
+ function Kf(s) {
17911
17925
  return typeof s == "string" ? { start: s, available: !0 } : { start: s.start, available: s.available };
17912
17926
  }
17913
17927
  const ca = `
@@ -17966,8 +17980,8 @@ const ca = `
17966
17980
  .tick { color: #16a34a; font-weight: 700; }
17967
17981
  .locked-when { margin-top: 6px; font-size: 14px; }
17968
17982
  .locked-tz { margin-top: 2px; font-size: 12px; color: var(--aikaara-text-secondary, #6b7280); }
17969
- `, Kf = "callDetails";
17970
- class Gf extends HTMLElement {
17983
+ `, Gf = "callDetails";
17984
+ class Yf extends HTMLElement {
17971
17985
  shadow;
17972
17986
  data = null;
17973
17987
  query = "";
@@ -17984,7 +17998,7 @@ class Gf extends HTMLElement {
17984
17998
  this.data = e ?? {}, this.query = "", this.fileNames = [], this.error = "", this.dataset.consumed !== "true" && (this.submitted = !1), this.render();
17985
17999
  }
17986
18000
  getName() {
17987
- return this.data?.postbackKey ?? Kf;
18001
+ return this.data?.postbackKey ?? Gf;
17988
18002
  }
17989
18003
  setConsumedValues(e) {
17990
18004
  const t = e?.query, r = Array.isArray(t) ? t[0] : t;
@@ -18053,7 +18067,7 @@ class Gf extends HTMLElement {
18053
18067
  <p class="counter">${this.query.length}/${t.maxLength ?? 1e3}</p>`}
18054
18068
  </div>`, a = r ? "" : `<button class="cta" type="button">${Pe(this.data.submitLabel ?? "Schedule Call")}</button>`;
18055
18069
  this.shadow.innerHTML = `
18056
- <style>${Yf}</style>
18070
+ <style>${Jf}</style>
18057
18071
  <div class="card" part="card">
18058
18072
  ${this.data.title ? `<div class="title">${Pe(this.data.title)}</div>` : ""}
18059
18073
  ${this.data.subtitle ? `<div class="subtitle">${Pe(this.data.subtitle)}</div>` : ""}
@@ -18078,7 +18092,7 @@ class Gf extends HTMLElement {
18078
18092
  })), this.shadow.querySelector("button.cta")?.addEventListener("click", () => this.handleSubmit());
18079
18093
  }
18080
18094
  }
18081
- const Yf = `
18095
+ const Jf = `
18082
18096
  :host { display: block; font-family: var(--aikaara-font, system-ui, sans-serif); color: var(--aikaara-text, #1f2937); }
18083
18097
  .card {
18084
18098
  background: var(--aikaara-service-bg, var(--aikaara-surface, #ffffff));
@@ -18123,7 +18137,7 @@ const Yf = `
18123
18137
  }
18124
18138
  .cta:hover { filter: brightness(0.96); }
18125
18139
  `;
18126
- class Jf extends HTMLElement {
18140
+ class Qf extends HTMLElement {
18127
18141
  shadow;
18128
18142
  data = null;
18129
18143
  constructor() {
@@ -18139,7 +18153,7 @@ class Jf extends HTMLElement {
18139
18153
  return /^\d{4}-\d{2}-\d{2}$/.test(e) ? ys(e) : e;
18140
18154
  }
18141
18155
  displayTime(e) {
18142
- return /^\d{2}:\d{2}$/.test(e) ? ur(e) : e;
18156
+ return /^\d{2}:\d{2}$/.test(e) ? dr(e) : e;
18143
18157
  }
18144
18158
  render() {
18145
18159
  if (!this.data) {
@@ -18152,7 +18166,7 @@ class Jf extends HTMLElement {
18152
18166
  ([u, d]) => `<div class="row"><span class="label">${Pe(u)}</span><span class="value">${Pe(d)}</span></div>`
18153
18167
  ).join("");
18154
18168
  this.shadow.innerHTML = `
18155
- <style>${Qf}</style>
18169
+ <style>${Xf}</style>
18156
18170
  <div class="card" part="card">
18157
18171
  <div class="head">
18158
18172
  <div class="icon" aria-hidden="true">✓</div>
@@ -18165,7 +18179,7 @@ class Jf extends HTMLElement {
18165
18179
  `;
18166
18180
  }
18167
18181
  }
18168
- const Qf = `
18182
+ const Xf = `
18169
18183
  :host { display: block; font-family: var(--aikaara-font, system-ui, sans-serif); color: var(--aikaara-text, #1f2937); }
18170
18184
  .card {
18171
18185
  background: var(--aikaara-service-bg, var(--aikaara-surface, #ffffff));
@@ -18189,41 +18203,41 @@ const Qf = `
18189
18203
  .value { font-weight: 600; text-align: right; }
18190
18204
  .note { margin: 12px 0 0; text-align: center; font-size: 12px; color: var(--aikaara-text-secondary, #6b7280); }
18191
18205
  `;
18192
- function Xf() {
18206
+ function Zf() {
18193
18207
  const s = [
18194
- ["aikaara-chat-widget", Uh],
18195
- ["aikaara-chat-bubble", Bh],
18196
- ["aikaara-chat-header", qh],
18197
- ["aikaara-message-list", Xh],
18198
- ["aikaara-message-bubble", tf],
18199
- ["aikaara-chat-input", nf],
18200
- ["aikaara-typing-indicator", sf],
18201
- ["aikaara-streaming-message", of],
18202
- ["aikaara-error-banner", af],
18203
- ["aikaara-template-renderer", hf],
18204
- ["aikaara-system-pill", gf],
18205
- ["aikaara-option-list", bf],
18206
- ["aikaara-submit-action", yf],
18207
- ["aikaara-modal-action", wf],
18208
- ["aikaara-text-input", kf],
18209
- ["aikaara-chat", xf],
18210
- ["aikaara-link-modal", _f],
18211
- ["aikaara-compare-plans", Af],
18212
- ["aikaara-smart-edit-modal", If],
18213
- ["aikaara-schema-form", Pf],
18208
+ ["aikaara-chat-widget", Bh],
18209
+ ["aikaara-chat-bubble", Fh],
18210
+ ["aikaara-chat-header", Hh],
18211
+ ["aikaara-message-list", Zh],
18212
+ ["aikaara-message-bubble", rf],
18213
+ ["aikaara-chat-input", sf],
18214
+ ["aikaara-typing-indicator", of],
18215
+ ["aikaara-streaming-message", af],
18216
+ ["aikaara-error-banner", lf],
18217
+ ["aikaara-template-renderer", ff],
18218
+ ["aikaara-system-pill", bf],
18219
+ ["aikaara-option-list", yf],
18220
+ ["aikaara-submit-action", vf],
18221
+ ["aikaara-modal-action", kf],
18222
+ ["aikaara-text-input", xf],
18223
+ ["aikaara-chat", _f],
18224
+ ["aikaara-link-modal", Sf],
18225
+ ["aikaara-compare-plans", If],
18226
+ ["aikaara-smart-edit-modal", Tf],
18227
+ ["aikaara-schema-form", Of],
18214
18228
  // Schedule-call flow widgets (one per step; chained by the dashboard flow).
18215
- ["aikaara-service-picker", Nf],
18216
- ["aikaara-service-details", Df],
18217
- ["aikaara-price-breakdown", Bf],
18218
- ["aikaara-slot-picker", zf],
18219
- ["aikaara-call-upload", Gf],
18220
- ["aikaara-call-confirmation", Jf]
18229
+ ["aikaara-service-picker", Rf],
18230
+ ["aikaara-service-details", $f],
18231
+ ["aikaara-price-breakdown", Ff],
18232
+ ["aikaara-slot-picker", Vf],
18233
+ ["aikaara-call-upload", Yf],
18234
+ ["aikaara-call-confirmation", Qf]
18221
18235
  ];
18222
18236
  for (const [e, t] of s)
18223
18237
  customElements.get(e) || customElements.define(e, t);
18224
18238
  }
18225
- Xf();
18226
- function kr(s, e, t = "") {
18239
+ Zf();
18240
+ function xr(s, e, t = "") {
18227
18241
  if (!e) return t;
18228
18242
  const r = e.split(".");
18229
18243
  let i = s;
@@ -18248,7 +18262,7 @@ function ua(s) {
18248
18262
  async function Yt(s) {
18249
18263
  return typeof s == "function" ? await s() : s;
18250
18264
  }
18251
- class Zf {
18265
+ class ep {
18252
18266
  constructor(e, t) {
18253
18267
  this.descriptor = e, this.sessionToken = t;
18254
18268
  }
@@ -18293,16 +18307,16 @@ class Zf {
18293
18307
  const w = await a.text().catch(() => "");
18294
18308
  throw new Error(`Session auth failed: ${a.status} ${w.slice(0, 200)}`);
18295
18309
  }
18296
- const l = await a.json().catch(() => ({})), c = kr(l, this.descriptor.tokenPath ?? "data.token"), u = this.descriptor.tokenStripPrefix, d = u ? c.replace(new RegExp(`^${u}`, "i"), "").trim() : c;
18310
+ const l = await a.json().catch(() => ({})), c = xr(l, this.descriptor.tokenPath ?? "data.token"), u = this.descriptor.tokenStripPrefix, d = u ? c.replace(new RegExp(`^${u}`, "i"), "").trim() : c;
18297
18311
  if (!d) throw new Error("Session auth response missing token");
18298
- const p = kr(l, this.descriptor.requestIdPath ?? "data.requestId"), g = this.cache?.requestId || p || "", h = kr(l, this.descriptor.fullNamePath ?? "data.fullName"), b = kr(l, this.descriptor.userPath ?? "data.userId"), y = ua(d) || Date.now() + 3600 * 1e3;
18312
+ const p = xr(l, this.descriptor.requestIdPath ?? "data.requestId"), g = this.cache?.requestId || p || "", h = xr(l, this.descriptor.fullNamePath ?? "data.fullName"), b = xr(l, this.descriptor.userPath ?? "data.userId"), y = ua(d) || Date.now() + 3600 * 1e3;
18299
18313
  return this.cache = { token: d, requestId: g, fullName: h, userId: b, expiresAt: y }, this.cache;
18300
18314
  }
18301
18315
  }
18302
- async function ep(s) {
18316
+ async function tp(s) {
18303
18317
  const e = {};
18304
18318
  for (const t of s.spec) {
18305
- const r = await tp(t, s.providers);
18319
+ const r = await rp(t, s.providers);
18306
18320
  if (r !== void 0 && r !== "")
18307
18321
  e[t.name] = r;
18308
18322
  else {
@@ -18315,19 +18329,19 @@ async function ep(s) {
18315
18329
  }
18316
18330
  return e;
18317
18331
  }
18318
- async function tp(s, e) {
18332
+ async function rp(s, e) {
18319
18333
  const t = s.key ?? s.name;
18320
18334
  switch (s.source) {
18321
18335
  case "cookie":
18322
- return rp(t);
18336
+ return np(t);
18323
18337
  case "localStorage":
18324
- return xr(() => window.localStorage.getItem(t) ?? void 0);
18338
+ return _r(() => window.localStorage.getItem(t) ?? void 0);
18325
18339
  case "sessionStorage":
18326
- return xr(() => window.sessionStorage.getItem(t) ?? void 0);
18340
+ return _r(() => window.sessionStorage.getItem(t) ?? void 0);
18327
18341
  case "url_param":
18328
- return xr(() => new URL(window.location.href).searchParams.get(t) ?? void 0);
18342
+ return _r(() => new URL(window.location.href).searchParams.get(t) ?? void 0);
18329
18343
  case "header_meta":
18330
- return xr(() => document.querySelector(`meta[name="${np(t)}"]`)?.content ?? void 0);
18344
+ return _r(() => document.querySelector(`meta[name="${ip(t)}"]`)?.content ?? void 0);
18331
18345
  case "callback": {
18332
18346
  const r = e?.[s.name];
18333
18347
  if (!r) return;
@@ -18338,7 +18352,7 @@ async function tp(s, e) {
18338
18352
  return;
18339
18353
  }
18340
18354
  }
18341
- function rp(s) {
18355
+ function np(s) {
18342
18356
  if (typeof document > "u") return;
18343
18357
  const e = encodeURIComponent(s), t = document.cookie ? document.cookie.split("; ") : [];
18344
18358
  for (const r of t) {
@@ -18353,18 +18367,18 @@ function rp(s) {
18353
18367
  }
18354
18368
  }
18355
18369
  }
18356
- function xr(s) {
18370
+ function _r(s) {
18357
18371
  try {
18358
18372
  return s();
18359
18373
  } catch {
18360
18374
  return;
18361
18375
  }
18362
18376
  }
18363
- function np(s) {
18377
+ function ip(s) {
18364
18378
  return s.replace(/["\\]/g, "\\$&");
18365
18379
  }
18366
- const ip = 1800;
18367
- class sp {
18380
+ const sp = 1800;
18381
+ class op {
18368
18382
  constructor(e) {
18369
18383
  this.opts = e, this.cache = this.loadCache();
18370
18384
  }
@@ -18393,7 +18407,7 @@ class sp {
18393
18407
  throw new Error(
18394
18408
  "[aikaara-chat-sdk] SsoExchangeAdapter.exchange() requires descriptor.sso.collect; v2 partner-token flow should be handled by TokenDiscoveryReader instead."
18395
18409
  );
18396
- const e = await ep({
18410
+ const e = await tp({
18397
18411
  spec: this.opts.descriptor.collect,
18398
18412
  providers: this.opts.providers
18399
18413
  }), t = JSON.stringify({ credentials: e }), r = {
@@ -18431,7 +18445,7 @@ class sp {
18431
18445
  return this.cache = u, this.persistCache(u), u;
18432
18446
  }
18433
18447
  computeExpiry() {
18434
- const e = this.opts.descriptor.cacheTtlSec ?? ip;
18448
+ const e = this.opts.descriptor.cacheTtlSec ?? sp;
18435
18449
  if (!(!this.opts.descriptor.cacheKey || e <= 0))
18436
18450
  return Date.now() + e * 1e3;
18437
18451
  }
@@ -18464,8 +18478,8 @@ class sp {
18464
18478
  }
18465
18479
  }
18466
18480
  }
18467
- const op = 3e4, ap = 2e3, lp = 100;
18468
- async function cp(s) {
18481
+ const ap = 3e4, lp = 2e3, cp = 100;
18482
+ async function up(s) {
18469
18483
  const { descriptor: e } = s, t = e.tokenSourceConfig ?? {};
18470
18484
  switch (e.tokenSource) {
18471
18485
  case "init": {
@@ -18474,37 +18488,37 @@ async function cp(s) {
18474
18488
  return { token: s.initToken, source: "init" };
18475
18489
  }
18476
18490
  case "query": {
18477
- const r = typeof t.key == "string" && t.key ? t.key : "token", i = dp(r);
18491
+ const r = typeof t.key == "string" && t.key ? t.key : "token", i = hp(r);
18478
18492
  if (!i) throw new Ze("query", `?${r}= not present`);
18479
18493
  return { token: i, source: "query" };
18480
18494
  }
18481
18495
  case "hash": {
18482
- const r = typeof t.key == "string" && t.key ? t.key : "token", i = hp(r);
18496
+ const r = typeof t.key == "string" && t.key ? t.key : "token", i = fp(r);
18483
18497
  if (!i) throw new Ze("hash", `#${r}= not present`);
18484
18498
  return { token: i, source: "hash" };
18485
18499
  }
18486
18500
  case "postmsg": {
18487
- const r = typeof t.type == "string" ? t.type : "", i = typeof t.key == "string" && t.key ? t.key : "token", n = bp(typeof t.origins == "string" ? t.origins : ""), o = typeof t.timeoutMs == "number" && t.timeoutMs > 0 ? t.timeoutMs : op;
18488
- return { token: await gp({ type: r, key: i, origins: n, timeoutMs: o }), source: "postmsg" };
18501
+ const r = typeof t.type == "string" ? t.type : "", i = typeof t.key == "string" && t.key ? t.key : "token", n = yp(typeof t.origins == "string" ? t.origins : ""), o = typeof t.timeoutMs == "number" && t.timeoutMs > 0 ? t.timeoutMs : ap;
18502
+ return { token: await bp({ type: r, key: i, origins: n, timeoutMs: o }), source: "postmsg" };
18489
18503
  }
18490
18504
  case "cookie": {
18491
18505
  const r = typeof t.name == "string" && t.name ? t.name : "";
18492
18506
  if (!r) throw new Ze("cookie", "cookie.name not configured");
18493
- const i = fp(r);
18507
+ const i = pp(r);
18494
18508
  if (!i) throw new Ze("cookie", `cookie "${r}" not set`);
18495
18509
  return { token: i, source: "cookie" };
18496
18510
  }
18497
18511
  case "storage": {
18498
18512
  const r = t.store === "session" ? "session" : "local", i = typeof t.key == "string" && t.key ? t.key : "", n = typeof t.path == "string" ? t.path : "";
18499
18513
  if (!i) throw new Ze("storage", "storage.key not configured");
18500
- const o = pp(r, i, n);
18514
+ const o = mp(r, i, n);
18501
18515
  if (!o) throw new Ze("storage", `${r}Storage["${i}"] not set`);
18502
18516
  return { token: o, source: "storage" };
18503
18517
  }
18504
18518
  case "global": {
18505
18519
  const r = typeof t.path == "string" ? t.path : "";
18506
18520
  if (!r) throw new Ze("global", "global.path not configured");
18507
- const i = typeof t.timeoutMs == "number" && t.timeoutMs > 0 ? t.timeoutMs : ap, n = typeof t.intervalMs == "number" && t.intervalMs > 0 ? t.intervalMs : lp, o = await mp(r, i, n);
18521
+ const i = typeof t.timeoutMs == "number" && t.timeoutMs > 0 ? t.timeoutMs : lp, n = typeof t.intervalMs == "number" && t.intervalMs > 0 ? t.intervalMs : cp, o = await gp(r, i, n);
18508
18522
  if (!o) throw new Ze("global", `window.${r} not present`);
18509
18523
  return { token: o, source: "global" };
18510
18524
  }
@@ -18517,7 +18531,7 @@ async function cp(s) {
18517
18531
  }
18518
18532
  }
18519
18533
  }
18520
- class up {
18534
+ class dp {
18521
18535
  constructor(e) {
18522
18536
  this.opts = e;
18523
18537
  }
@@ -18528,7 +18542,7 @@ class up {
18528
18542
  /** Resolve the token. Returns cache if present. */
18529
18543
  async get() {
18530
18544
  if (this.cached) return this.cached;
18531
- const e = await cp(this.opts);
18545
+ const e = await up(this.opts);
18532
18546
  return this.cached = e, e;
18533
18547
  }
18534
18548
  /**
@@ -18545,7 +18559,7 @@ class Ze extends Error {
18545
18559
  super(`[aikaara-chat-sdk] token-discovery (${e}): ${t}`), this.source = e, this.name = "TokenDiscoveryError";
18546
18560
  }
18547
18561
  }
18548
- function dp(s) {
18562
+ function hp(s) {
18549
18563
  if (!(typeof window > "u"))
18550
18564
  try {
18551
18565
  const e = window.location.search.slice(1);
@@ -18559,7 +18573,7 @@ function dp(s) {
18559
18573
  return;
18560
18574
  }
18561
18575
  }
18562
- function hp(s) {
18576
+ function fp(s) {
18563
18577
  if (!(typeof window > "u"))
18564
18578
  try {
18565
18579
  const e = window.location.hash.replace(/^#/, "");
@@ -18568,7 +18582,7 @@ function hp(s) {
18568
18582
  return;
18569
18583
  }
18570
18584
  }
18571
- function fp(s) {
18585
+ function pp(s) {
18572
18586
  if (typeof document > "u") return;
18573
18587
  const e = encodeURIComponent(s), t = document.cookie ? document.cookie.split("; ") : [];
18574
18588
  for (const r of t) {
@@ -18583,7 +18597,7 @@ function fp(s) {
18583
18597
  }
18584
18598
  }
18585
18599
  }
18586
- function pp(s, e, t) {
18600
+ function mp(s, e, t) {
18587
18601
  if (!(typeof window > "u"))
18588
18602
  try {
18589
18603
  const i = (s === "session" ? window.sessionStorage : window.localStorage).getItem(e);
@@ -18595,17 +18609,17 @@ function pp(s, e, t) {
18595
18609
  } catch {
18596
18610
  return i;
18597
18611
  }
18598
- const o = ec(n, t);
18612
+ const o = tc(n, t);
18599
18613
  return typeof o == "string" ? o : void 0;
18600
18614
  } catch {
18601
18615
  return;
18602
18616
  }
18603
18617
  }
18604
- async function mp(s, e, t) {
18618
+ async function gp(s, e, t) {
18605
18619
  if (typeof window > "u") return;
18606
18620
  const r = Date.now() + e;
18607
18621
  for (; Date.now() < r; ) {
18608
- const i = ec(window, s);
18622
+ const i = tc(window, s);
18609
18623
  if (typeof i == "string" && i.length > 0) return i;
18610
18624
  if (typeof i == "function")
18611
18625
  try {
@@ -18616,7 +18630,7 @@ async function mp(s, e, t) {
18616
18630
  await new Promise((n) => setTimeout(n, t));
18617
18631
  }
18618
18632
  }
18619
- function gp(s) {
18633
+ function bp(s) {
18620
18634
  return new Promise((e, t) => {
18621
18635
  if (typeof window > "u") {
18622
18636
  t(new Ze("postmsg", "no window"));
@@ -18638,10 +18652,10 @@ function gp(s) {
18638
18652
  window.addEventListener("message", n);
18639
18653
  });
18640
18654
  }
18641
- function bp(s) {
18655
+ function yp(s) {
18642
18656
  return s ? s.split(/[,\s]+/).map((e) => e.trim()).filter(Boolean) : [];
18643
18657
  }
18644
- function ec(s, e) {
18658
+ function tc(s, e) {
18645
18659
  if (!e) return s;
18646
18660
  const t = e.split(".").filter(Boolean);
18647
18661
  let r = s;
@@ -18652,7 +18666,7 @@ function ec(s, e) {
18652
18666
  return;
18653
18667
  return r;
18654
18668
  }
18655
- function yp() {
18669
+ function vp() {
18656
18670
  const s = typeof crypto < "u" ? crypto : null;
18657
18671
  if (s?.randomUUID) return s.randomUUID();
18658
18672
  if (s?.getRandomValues) {
@@ -18666,25 +18680,25 @@ function yp() {
18666
18680
  return (e === "x" ? t : t & 3 | 8).toString(16);
18667
18681
  });
18668
18682
  }
18669
- const vp = "aikaara_chat:requestId";
18683
+ const wp = "aikaara_chat:requestId";
18670
18684
  function js(s, e, t) {
18671
- const r = `${vp}:${s}:${e}`;
18685
+ const r = `${wp}:${s}:${e}`;
18672
18686
  return t ? `${r}:${t}` : r;
18673
18687
  }
18674
- function tc(s, e, t) {
18688
+ function rc(s, e, t) {
18675
18689
  try {
18676
18690
  return localStorage.getItem(js(s, e, t));
18677
18691
  } catch {
18678
18692
  return null;
18679
18693
  }
18680
18694
  }
18681
- function wp(s, e, t, r) {
18695
+ function kp(s, e, t, r) {
18682
18696
  try {
18683
18697
  localStorage.setItem(js(s, e, r), t);
18684
18698
  } catch {
18685
18699
  }
18686
18700
  }
18687
- function Ep(s, e, t) {
18701
+ function Ap(s, e, t) {
18688
18702
  try {
18689
18703
  localStorage.removeItem(js(s, e, t));
18690
18704
  } catch {
@@ -18733,7 +18747,7 @@ async function vs(s, e, t = "before-chat") {
18733
18747
  k = _;
18734
18748
  break;
18735
18749
  }
18736
- if (y = _.status, w = await _.text().catch(() => ""), m < c.length && kp(y, w)) {
18750
+ if (y = _.status, w = await _.text().catch(() => ""), m < c.length && xp(y, w)) {
18737
18751
  const E = c[m++];
18738
18752
  console.warn(
18739
18753
  `[aikaara-chat-sdk] preflight #${u} ${g} ${p} → ${y} (transient). Retry #${m} in ${E}ms.`
@@ -18787,7 +18801,7 @@ async function vs(s, e, t = "before-chat") {
18787
18801
  }
18788
18802
  return { captured: l };
18789
18803
  }
18790
- async function Ap(s) {
18804
+ async function Ip(s) {
18791
18805
  const e = s.steps ?? [];
18792
18806
  return e.some((r) => r.trigger === "on-method-select") ? (await vs(
18793
18807
  e,
@@ -18803,7 +18817,7 @@ async function Ap(s) {
18803
18817
  "on-method-select"
18804
18818
  )).captured : {};
18805
18819
  }
18806
- function kp(s, e) {
18820
+ function xp(s, e) {
18807
18821
  if (s === 503 || s === 504 || s === 502) return !0;
18808
18822
  if (s === 401 || s === 403) return e.trim().length === 0;
18809
18823
  if (s === 500) {
@@ -18812,7 +18826,7 @@ function kp(s, e) {
18812
18826
  }
18813
18827
  return !1;
18814
18828
  }
18815
- async function rc(s, e) {
18829
+ async function nc(s, e) {
18816
18830
  const t = await fetch(s, {
18817
18831
  method: "GET",
18818
18832
  headers: { accept: "application/json", ...e ?? {} }
@@ -18828,10 +18842,10 @@ async function rc(s, e) {
18828
18842
  }
18829
18843
  return r;
18830
18844
  }
18831
- function nc(s, e) {
18832
- return s.replace("{projectId}", e).replace("{uuid}", yp().replace(/-/g, ""));
18845
+ function ic(s, e) {
18846
+ return s.replace("{projectId}", e).replace("{uuid}", vp().replace(/-/g, ""));
18833
18847
  }
18834
- function ic(s) {
18848
+ function sc(s) {
18835
18849
  const e = s._preload;
18836
18850
  if (!Array.isArray(e) || e.length === 0) return;
18837
18851
  const t = Array.from(
@@ -18839,19 +18853,19 @@ function ic(s) {
18839
18853
  e.map((r) => r && typeof r == "object" ? r.scriptUrl : null).filter((r) => typeof r == "string" && r.length > 0)
18840
18854
  )
18841
18855
  );
18842
- t.length !== 0 && Promise.allSettled(t.map((r) => Zl(r)));
18856
+ t.length !== 0 && Promise.allSettled(t.map((r) => ec(r)));
18843
18857
  }
18844
- async function xp(s) {
18858
+ async function _p(s) {
18845
18859
  const e = {
18846
- ...s.config ?? (s.configUrl ? await rc(s.configUrl, s.configHeaders) : {}),
18860
+ ...s.config ?? (s.configUrl ? await nc(s.configUrl, s.configHeaders) : {}),
18847
18861
  ...s.overrides ?? {}
18848
18862
  };
18849
- ic(e);
18863
+ sc(e);
18850
18864
  const t = e.transport ?? "tiledesk", r = e.tiledesk;
18851
18865
  if ((t === "tiledesk" || t === "dual") && !r)
18852
18866
  throw new Error("mount: descriptor.tiledesk is required for tiledesk/dual transport");
18853
- const i = r?.projectId ?? "", n = s.identity.userId, o = s.conversationScope || void 0, a = s.forceNewConversation ? null : tc(n, i, o), l = r?.requestIdTemplate ?? "support-group-{projectId}-{uuid}", c = s.conversationId ?? a ?? nc(l, i);
18854
- (s.conversationId || !a || s.forceNewConversation) && i && wp(n, i, c, o);
18867
+ const i = r?.projectId ?? "", n = s.identity.userId, o = s.conversationScope || void 0, a = s.forceNewConversation ? null : rc(n, i, o), l = r?.requestIdTemplate ?? "support-group-{projectId}-{uuid}", c = s.conversationId ?? a ?? ic(l, i);
18868
+ (s.conversationId || !a || s.forceNewConversation) && i && kp(n, i, c, o);
18855
18869
  const u = await s.tokenProvider(), d = s.tokenProvider, p = s.historyTokenProvider ?? d, g = r ? {
18856
18870
  mqttEndpoint: r.mqttEndpoint,
18857
18871
  jwtToken: u,
@@ -18883,7 +18897,7 @@ async function xp(s) {
18883
18897
  endpoint: e.uploadEndpoint,
18884
18898
  fieldName: e.uploadFieldName,
18885
18899
  extraFields: e.uploadExtraFields
18886
- }) : void 0), b = s.historyAdapter ?? (e.historyApiBase ? Hd({
18900
+ }) : void 0), b = s.historyAdapter ?? (e.historyApiBase ? Wd({
18887
18901
  apiBase: e.historyApiBase,
18888
18902
  pageSize: e.historyPageSize ?? 200,
18889
18903
  pathTemplate: e.historyPathTemplate,
@@ -18939,17 +18953,17 @@ async function xp(s) {
18939
18953
  }
18940
18954
  };
18941
18955
  }
18942
- function _p(s) {
18956
+ function Sp(s) {
18943
18957
  if (typeof s != "string") return s;
18944
18958
  const e = document.querySelector(s);
18945
18959
  if (!e) throw new Error(`mountFromSlug: container "${s}" not found`);
18946
18960
  return e;
18947
18961
  }
18948
- async function Sp(s) {
18962
+ async function Ep(s) {
18949
18963
  const e = (s.configBase ?? "https://api.aikaara.com").replace(/\/$/, ""), t = `${e}/api/v1/widget_configs/${encodeURIComponent(s.slug)}`;
18950
18964
  let r = null;
18951
18965
  try {
18952
- r = await rc(t, s.configHeaders);
18966
+ r = await nc(t, s.configHeaders);
18953
18967
  } catch (I) {
18954
18968
  if (!s.fallbackConfig) throw I;
18955
18969
  console.warn(
@@ -18962,7 +18976,7 @@ async function Sp(s) {
18962
18976
  ...r ?? {},
18963
18977
  ...s.overrides ?? {}
18964
18978
  };
18965
- if (ic(i), i.templates && Object.keys(i.templates).length > 0) {
18979
+ if (sc(i), i.templates && Object.keys(i.templates).length > 0) {
18966
18980
  i.components = { ...i.components ?? {} };
18967
18981
  for (const [I, P] of Object.entries(i.templates)) {
18968
18982
  const O = `template:${I}`;
@@ -18996,7 +19010,7 @@ async function Sp(s) {
18996
19010
  let o = null, a = s.user.id, l = s.user.name, c = "", u = s.user.token, d = null;
18997
19011
  const p = await Yt(s.user.token).catch(() => ""), g = typeof p == "string" && p.length > 0;
18998
19012
  if (!g && i.sso?.tokenSource) {
18999
- d = new up({
19013
+ d = new dp({
19000
19014
  descriptor: {
19001
19015
  provider: i.sso.provider,
19002
19016
  flow: i.sso.flow,
@@ -19013,7 +19027,7 @@ async function Sp(s) {
19013
19027
  u = async () => (await d.get()).token, s.user.identity && !s.user.identity.partnerToken && (s.user.identity.partnerToken = I.token);
19014
19028
  } else if (!g && i.sso && i.sso.collect && i.sso.collect.length > 0) {
19015
19029
  const I = `${e}/api/v1/projects/by-slug/${encodeURIComponent(s.slug)}/sso_exchange`;
19016
- o = await new sp({
19030
+ o = await new op({
19017
19031
  descriptor: i.sso,
19018
19032
  providers: s.user.credentialProviders,
19019
19033
  exchangeUrl: I
@@ -19035,9 +19049,9 @@ async function Sp(s) {
19035
19049
  }
19036
19050
  I.captured.userId && (a = I.captured.userId), I.captured.requestId && (b = I.captured.requestId);
19037
19051
  }
19038
- const y = new Zf(i.auth, u);
19052
+ const y = new ep(i.auth, u);
19039
19053
  if (h) {
19040
- const I = i.tiledesk?.projectId ?? "", P = I ? tc(a, I) : null, O = i.tiledesk?.requestIdTemplate ?? "support-group-{projectId}-{uuid}", j = P ?? (I ? nc(O, I) : "");
19054
+ const I = i.tiledesk?.projectId ?? "", P = I ? rc(a, I) : null, O = i.tiledesk?.requestIdTemplate ?? "support-group-{projectId}-{uuid}", j = P ?? (I ? ic(O, I) : "");
19041
19055
  y.prime(h, { requestId: j, fullName: l });
19042
19056
  }
19043
19057
  const w = await y.get();
@@ -19058,7 +19072,7 @@ async function Sp(s) {
19058
19072
  } catch (I) {
19059
19073
  return console.warn("[aikaara-chat-sdk] partner auto-refresh failed", I), null;
19060
19074
  }
19061
- } : null, _ = i.upload, v = async () => `Bearer ${_ && "tokenSource" in _ && _.tokenSource === "chat" ? (await y.get()).token : await Yt(s.user.token)}`, E = s.hooks?.upload ?? (_ && _.mode === "presigned-3step" ? Fd({
19075
+ } : null, _ = i.upload, v = async () => `Bearer ${_ && "tokenSource" in _ && _.tokenSource === "chat" ? (await y.get()).token : await Yt(s.user.token)}`, E = s.hooks?.upload ?? (_ && _.mode === "presigned-3step" ? qd({
19062
19076
  ..._,
19063
19077
  authHeader: v
19064
19078
  }) : _ && _.mode === "direct" ? zl({
@@ -19066,8 +19080,8 @@ async function Sp(s) {
19066
19080
  fieldName: _.fieldName,
19067
19081
  extraFields: _.extraFields,
19068
19082
  headers: async () => ({ authorization: await v() })
19069
- }) : void 0), S = await xp({
19070
- container: _p(s.container),
19083
+ }) : void 0), S = await _p({
19084
+ container: Sp(s.container),
19071
19085
  config: i,
19072
19086
  // SSO-issued Aikaara user token, used by the ActionCable transport.
19073
19087
  // Tiledesk-only widgets ignore this; falls back to `userId` inside `mount`.
@@ -19122,58 +19136,58 @@ async function Sp(s) {
19122
19136
  });
19123
19137
  }
19124
19138
  export {
19125
- kf as $,
19139
+ xf as $,
19126
19140
  Ds as A,
19127
- Sp as B,
19128
- sc as C,
19129
- xp as D,
19141
+ Ep as B,
19142
+ oc as C,
19143
+ _p as D,
19130
19144
  da as E,
19131
19145
  Wl as F,
19132
- Ap as G,
19133
- Jh as H,
19134
- Jf as I,
19135
- Gf as J,
19136
- xf as K,
19137
- Af as L,
19138
- bc as M,
19139
- _f as N,
19140
- wf as O,
19141
- bf as P,
19142
- Bf as Q,
19143
- Pf as R,
19144
- Zf as S,
19145
- Od as T,
19146
- Df as U,
19147
- Nf as V,
19148
- zf as W,
19149
- If as X,
19150
- yf as Y,
19151
- gf as Z,
19152
- hf as _,
19153
- Bh as a,
19154
- Dd as b,
19155
- qh as c,
19156
- nf as d,
19157
- Uh as e,
19158
- af as f,
19159
- tf as g,
19160
- Xh as h,
19161
- of as i,
19162
- sf as j,
19163
- gc as k,
19164
- mc as l,
19165
- yc as m,
19166
- sp as n,
19146
+ Ip as G,
19147
+ Qh as H,
19148
+ Qf as I,
19149
+ Yf as J,
19150
+ _f as K,
19151
+ If as L,
19152
+ yc as M,
19153
+ Sf as N,
19154
+ kf as O,
19155
+ yf as P,
19156
+ Ff as Q,
19157
+ Of as R,
19158
+ ep as S,
19159
+ Ld as T,
19160
+ $f as U,
19161
+ Rf as V,
19162
+ Vf as W,
19163
+ Tf as X,
19164
+ vf as Y,
19165
+ bf as Z,
19166
+ ff as _,
19167
+ Fh as a,
19168
+ $d as b,
19169
+ Hh as c,
19170
+ sf as d,
19171
+ Bh as e,
19172
+ lf as f,
19173
+ rf as g,
19174
+ Zh as h,
19175
+ af as i,
19176
+ of as j,
19177
+ bc as k,
19178
+ gc as l,
19179
+ vc as m,
19180
+ op as n,
19167
19181
  Ze as o,
19168
- up as p,
19169
- Ep as q,
19170
- Xf as r,
19171
- ep as s,
19182
+ dp as p,
19183
+ Ap as q,
19184
+ Zf as r,
19185
+ tp as s,
19172
19186
  zl as t,
19173
- Fd as u,
19174
- Hd as v,
19175
- cp as w,
19176
- Rd as x,
19177
- Nd as y,
19178
- Md as z
19187
+ qd as u,
19188
+ Wd as v,
19189
+ up as w,
19190
+ jd as x,
19191
+ Rd as y,
19192
+ Nd as z
19179
19193
  };