@eka-care/ekascribe-ts-sdk 3.0.36 → 3.0.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -3,10 +3,10 @@ var Ds = (t, e, n) => e in t ? As(t, e, { enumerable: !0, configurable: !0, writ
3
3
  var w = (t, e, n) => Ds(t, typeof e != "symbol" ? e + "" : e, n);
4
4
  import { SessionStatus as Os, ScribeError as mn, ScribeClient as $s, TransportMode as _n } from "med-scribe-alliance-ts-sdk";
5
5
  import { createWorkerBlobUrl as ld, getWorkerUrl as ud } from "med-scribe-alliance-ts-sdk";
6
- const Ps = 1e4;
7
- class Ls {
6
+ const Ls = 1e4;
7
+ class Ps {
8
8
  constructor(e) {
9
- this.tokenRefreshPromise = null, this.accessToken = e.access_token, this.clientId = e.clientId, this.flavour = e.flavour, this.defaultTimeout = e.defaultTimeout ?? Ps, this.onUnauthorized = e.onUnauthorized;
9
+ this.tokenRefreshPromise = null, this.accessToken = e.access_token, this.clientId = e.clientId, this.flavour = e.flavour, this.defaultTimeout = e.defaultTimeout ?? Ls, this.onUnauthorized = e.onUnauthorized;
10
10
  }
11
11
  setAuthToken(e) {
12
12
  this.accessToken = e;
@@ -201,15 +201,15 @@ class zs {
201
201
  return !!n && n.size > 0;
202
202
  }
203
203
  }
204
- const _ = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__, R = globalThis, re = "10.43.0";
204
+ const y = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__, x = globalThis, re = "10.43.0";
205
205
  function et() {
206
- return tt(R), R;
206
+ return tt(x), x;
207
207
  }
208
208
  function tt(t) {
209
209
  const e = t.__SENTRY__ = t.__SENTRY__ || {};
210
210
  return e.version = e.version || re, e[re] = e[re] || {};
211
211
  }
212
- function ge(t, e, n = R) {
212
+ function ge(t, e, n = x) {
213
213
  const r = n.__SENTRY__ = n.__SENTRY__ || {}, s = r[re] = r[re] || {};
214
214
  return s[t] || (s[t] = e());
215
215
  }
@@ -223,9 +223,9 @@ const js = [
223
223
  "trace"
224
224
  ], qs = "Sentry Logger ", Xe = {};
225
225
  function me(t) {
226
- if (!("console" in R))
226
+ if (!("console" in x))
227
227
  return t();
228
- const e = R.console, n = {}, r = Object.keys(Xe);
228
+ const e = x.console, n = {}, r = Object.keys(Xe);
229
229
  r.forEach((s) => {
230
230
  const i = Xe[s];
231
231
  n[s] = e[s], e[s] = i;
@@ -257,12 +257,12 @@ function Ks(...t) {
257
257
  Vt("error", ...t);
258
258
  }
259
259
  function Vt(t, ...e) {
260
- _ && wr() && me(() => {
261
- R.console[t](`${qs}[${t}]:`, ...e);
260
+ y && wr() && me(() => {
261
+ x.console[t](`${qs}[${t}]:`, ...e);
262
262
  });
263
263
  }
264
264
  function Gt() {
265
- return _ ? ge("loggerSettings", () => ({ enabled: !1 })) : { enabled: !1 };
265
+ return y ? ge("loggerSettings", () => ({ enabled: !1 })) : { enabled: !1 };
266
266
  }
267
267
  const m = {
268
268
  /** Enable logging. */
@@ -309,13 +309,13 @@ function Zs(t) {
309
309
  if (!t.length)
310
310
  return [];
311
311
  const e = Array.from(t);
312
- return /sentryWrapped/.test(Pe(e).function || "") && e.pop(), e.reverse(), En.test(Pe(e).function || "") && (e.pop(), En.test(Pe(e).function || "") && e.pop()), e.slice(0, Tr).map((n) => ({
312
+ return /sentryWrapped/.test(Le(e).function || "") && e.pop(), e.reverse(), En.test(Le(e).function || "") && (e.pop(), En.test(Le(e).function || "") && e.pop()), e.slice(0, Tr).map((n) => ({
313
313
  ...n,
314
- filename: n.filename || Pe(e).filename,
314
+ filename: n.filename || Le(e).filename,
315
315
  function: n.function || se
316
316
  }));
317
317
  }
318
- function Pe(t) {
318
+ function Le(t) {
319
319
  return t[t.length - 1] || {};
320
320
  }
321
321
  const pt = "<anonymous>";
@@ -352,7 +352,7 @@ function ae(t, e) {
352
352
  try {
353
353
  e();
354
354
  } catch (n) {
355
- _ && m.error(`Error while instrumenting ${t}`, n);
355
+ y && m.error(`Error while instrumenting ${t}`, n);
356
356
  }
357
357
  }
358
358
  }
@@ -363,7 +363,7 @@ function F(t, e) {
363
363
  try {
364
364
  r(e);
365
365
  } catch (s) {
366
- _ && m.error(
366
+ y && m.error(
367
367
  `Error while triggering instrumentation handler.
368
368
  Type: ${t}
369
369
  Name: ${X(r)}
@@ -378,7 +378,7 @@ function Js(t) {
378
378
  oe(e, t), ae(e, Qs);
379
379
  }
380
380
  function Qs() {
381
- ht = R.onerror, R.onerror = function(t, e, n, r, s) {
381
+ ht = x.onerror, x.onerror = function(t, e, n, r, s) {
382
382
  return F("error", {
383
383
  column: r,
384
384
  error: s,
@@ -386,7 +386,7 @@ function Qs() {
386
386
  msg: t,
387
387
  url: e
388
388
  }), ht ? ht.apply(this, arguments) : !1;
389
- }, R.onerror.__SENTRY_INSTRUMENTED__ = !0;
389
+ }, x.onerror.__SENTRY_INSTRUMENTED__ = !0;
390
390
  }
391
391
  let ft = null;
392
392
  function ei(t) {
@@ -394,9 +394,9 @@ function ei(t) {
394
394
  oe(e, t), ae(e, ti);
395
395
  }
396
396
  function ti() {
397
- ft = R.onunhandledrejection, R.onunhandledrejection = function(t) {
397
+ ft = x.onunhandledrejection, x.onunhandledrejection = function(t) {
398
398
  return F("unhandledrejection", t), ft ? ft.apply(this, arguments) : !0;
399
- }, R.onunhandledrejection.__SENTRY_INSTRUMENTED__ = !0;
399
+ }, x.onunhandledrejection.__SENTRY_INSTRUMENTED__ = !0;
400
400
  }
401
401
  const Cr = Object.prototype.toString;
402
402
  function nt(t) {
@@ -462,7 +462,7 @@ function Ar(t) {
462
462
  function Dr(t) {
463
463
  return typeof Request < "u" && K(t, Request);
464
464
  }
465
- const Xt = R, oi = 80;
465
+ const Xt = x, oi = 80;
466
466
  function Or(t, e = {}) {
467
467
  if (!t)
468
468
  return "<unknown>";
@@ -548,7 +548,7 @@ function $(t, e, n) {
548
548
  try {
549
549
  t[e] = s;
550
550
  } catch {
551
- _ && m.log(`Failed to replace method "${e}" in object`, t);
551
+ y && m.log(`Failed to replace method "${e}" in object`, t);
552
552
  }
553
553
  }
554
554
  function Y(t, e, n) {
@@ -560,7 +560,7 @@ function Y(t, e, n) {
560
560
  configurable: !0
561
561
  });
562
562
  } catch {
563
- _ && m.log(`Failed to add non-enumerable property "${e}" to object`, t);
563
+ y && m.log(`Failed to add non-enumerable property "${e}" to object`, t);
564
564
  }
565
565
  }
566
566
  function $r(t, e) {
@@ -573,33 +573,33 @@ function $r(t, e) {
573
573
  function Yt(t) {
574
574
  return t.__sentry_original__;
575
575
  }
576
- function Pr(t) {
576
+ function Lr(t) {
577
577
  if (nt(t))
578
578
  return {
579
579
  message: t.message,
580
580
  name: t.name,
581
581
  stack: t.stack,
582
- ...Rn(t)
582
+ ...xn(t)
583
583
  };
584
584
  if (st(t)) {
585
585
  const e = {
586
586
  type: t.type,
587
- target: xn(t.target),
588
- currentTarget: xn(t.currentTarget),
589
- ...Rn(t)
587
+ target: Rn(t.target),
588
+ currentTarget: Rn(t.currentTarget),
589
+ ...xn(t)
590
590
  };
591
591
  return typeof CustomEvent < "u" && K(t, CustomEvent) && (e.detail = t.detail), e;
592
592
  } else
593
593
  return t;
594
594
  }
595
- function xn(t) {
595
+ function Rn(t) {
596
596
  try {
597
597
  return ri(t) ? Or(t) : Object.prototype.toString.call(t);
598
598
  } catch {
599
599
  return "<unknown>";
600
600
  }
601
601
  }
602
- function Rn(t) {
602
+ function xn(t) {
603
603
  if (typeof t == "object" && t !== null) {
604
604
  const e = {};
605
605
  for (const n in t)
@@ -609,14 +609,14 @@ function Rn(t) {
609
609
  return {};
610
610
  }
611
611
  function li(t) {
612
- const e = Object.keys(Pr(t));
612
+ const e = Object.keys(Lr(t));
613
613
  return e.sort(), e[0] ? e.join(", ") : "[object has no keys]";
614
614
  }
615
615
  let le;
616
616
  function it(t) {
617
617
  if (le !== void 0)
618
618
  return le ? le(t) : t();
619
- const e = Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"), n = R;
619
+ const e = Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"), n = x;
620
620
  return e in n && typeof n[e] == "function" ? (le = n[e], le(t)) : (le = null, t());
621
621
  }
622
622
  function Ke() {
@@ -649,14 +649,14 @@ function at(t, e = [], n = !1) {
649
649
  return e.some((r) => je(t, r, n));
650
650
  }
651
651
  function ui() {
652
- const t = R;
652
+ const t = x;
653
653
  return t.crypto || t.msCrypto;
654
654
  }
655
655
  let gt;
656
656
  function di() {
657
657
  return Ke() * 16;
658
658
  }
659
- function P(t = ui()) {
659
+ function L(t = ui()) {
660
660
  try {
661
661
  if (t?.randomUUID)
662
662
  return it(() => t.randomUUID()).replace(/-/g, "");
@@ -670,14 +670,14 @@ function P(t = ui()) {
670
670
  )
671
671
  );
672
672
  }
673
- function Lr(t) {
673
+ function Pr(t) {
674
674
  return t.exception?.values?.[0];
675
675
  }
676
676
  function te(t) {
677
677
  const { message: e, event_id: n } = t;
678
678
  if (e)
679
679
  return e;
680
- const r = Lr(t);
680
+ const r = Pr(t);
681
681
  return r ? r.type && r.value ? `${r.type}: ${r.value}` : r.type || r.value || n || "<unknown>" : n || "<unknown>";
682
682
  }
683
683
  function Tt(t, e, n) {
@@ -685,7 +685,7 @@ function Tt(t, e, n) {
685
685
  i.value || (i.value = e || ""), i.type || (i.type = "Error");
686
686
  }
687
687
  function de(t, e) {
688
- const n = Lr(t);
688
+ const n = Pr(t);
689
689
  if (!n)
690
690
  return;
691
691
  const r = { type: "generic", handled: !0 }, s = n.mechanism;
@@ -714,7 +714,7 @@ function Ne() {
714
714
  return ot() / Mr;
715
715
  }
716
716
  function hi() {
717
- const { performance: t } = R;
717
+ const { performance: t } = x;
718
718
  if (!t?.now || !t.timeOrigin)
719
719
  return Ne;
720
720
  const e = t.timeOrigin;
@@ -726,7 +726,7 @@ function V() {
726
726
  }
727
727
  function fi(t) {
728
728
  const e = V(), n = {
729
- sid: P(),
729
+ sid: L(),
730
730
  init: !0,
731
731
  timestamp: e,
732
732
  started: e,
@@ -739,7 +739,7 @@ function fi(t) {
739
739
  return t && pe(n, t), n;
740
740
  }
741
741
  function pe(t, e = {}) {
742
- if (e.user && (!t.ipAddress && e.user.ip_address && (t.ipAddress = e.user.ip_address), !t.did && !e.did && (t.did = e.user.id || e.user.email || e.user.username)), t.timestamp = e.timestamp || V(), e.abnormal_mechanism && (t.abnormal_mechanism = e.abnormal_mechanism), e.ignoreDuration && (t.ignoreDuration = e.ignoreDuration), e.sid && (t.sid = e.sid.length === 32 ? e.sid : P()), e.init !== void 0 && (t.init = e.init), !t.did && e.did && (t.did = `${e.did}`), typeof e.started == "number" && (t.started = e.started), t.ignoreDuration)
742
+ if (e.user && (!t.ipAddress && e.user.ip_address && (t.ipAddress = e.user.ip_address), !t.did && !e.did && (t.did = e.user.id || e.user.email || e.user.username)), t.timestamp = e.timestamp || V(), e.abnormal_mechanism && (t.abnormal_mechanism = e.abnormal_mechanism), e.ignoreDuration && (t.ignoreDuration = e.ignoreDuration), e.sid && (t.sid = e.sid.length === 32 ? e.sid : L()), e.init !== void 0 && (t.init = e.init), !t.did && e.did && (t.did = `${e.did}`), typeof e.started == "number" && (t.started = e.started), t.ignoreDuration)
743
743
  t.duration = void 0;
744
744
  else if (typeof e.duration == "number")
745
745
  t.duration = e.duration;
@@ -784,10 +784,10 @@ function Ae(t, e, n = 2) {
784
784
  return r;
785
785
  }
786
786
  function In() {
787
- return P();
787
+ return L();
788
788
  }
789
789
  function Fr() {
790
- return P().substring(16);
790
+ return L().substring(16);
791
791
  }
792
792
  const vt = "_sentrySpan";
793
793
  function Cn(t, e) {
@@ -1168,9 +1168,9 @@ class B {
1168
1168
  * @returns {string} The id of the captured Sentry event.
1169
1169
  */
1170
1170
  captureException(e, n) {
1171
- const r = n?.event_id || P();
1171
+ const r = n?.event_id || L();
1172
1172
  if (!this._client)
1173
- return _ && m.warn("No client configured on scope - will not capture exception!"), r;
1173
+ return y && m.warn("No client configured on scope - will not capture exception!"), r;
1174
1174
  const s = new Error("Sentry syntheticException");
1175
1175
  return this._client.captureException(
1176
1176
  e,
@@ -1189,9 +1189,9 @@ class B {
1189
1189
  * @returns {string} The id of the captured message.
1190
1190
  */
1191
1191
  captureMessage(e, n, r) {
1192
- const s = r?.event_id || P();
1192
+ const s = r?.event_id || L();
1193
1193
  if (!this._client)
1194
- return _ && m.warn("No client configured on scope - will not capture message!"), s;
1194
+ return y && m.warn("No client configured on scope - will not capture message!"), s;
1195
1195
  const i = r?.syntheticException ?? new Error(e);
1196
1196
  return this._client.captureMessage(
1197
1197
  e,
@@ -1211,8 +1211,8 @@ class B {
1211
1211
  * @returns {string} The id of the captured event.
1212
1212
  */
1213
1213
  captureEvent(e, n) {
1214
- const r = e.event_id || n?.event_id || P();
1215
- return this._client ? (this._client.captureEvent(e, { ...n, event_id: r }, this), r) : (_ && m.warn("No client configured on scope - will not capture event!"), r);
1214
+ const r = e.event_id || n?.event_id || L();
1215
+ return this._client ? (this._client.captureEvent(e, { ...n, event_id: r }, this), r) : (y && m.warn("No client configured on scope - will not capture event!"), r);
1216
1216
  }
1217
1217
  /**
1218
1218
  * This will be called on every set call.
@@ -1309,7 +1309,7 @@ function ki(t, e) {
1309
1309
  function An(t) {
1310
1310
  return he().withScope(() => t(he().getIsolationScope()));
1311
1311
  }
1312
- function xi() {
1312
+ function Ri() {
1313
1313
  return {
1314
1314
  withIsolationScope: An,
1315
1315
  withScope: Si,
@@ -1321,7 +1321,7 @@ function xi() {
1321
1321
  }
1322
1322
  function Zt(t) {
1323
1323
  const e = tt(t);
1324
- return e.acs ? e.acs : xi();
1324
+ return e.acs ? e.acs : Ri();
1325
1325
  }
1326
1326
  function H() {
1327
1327
  const t = et();
@@ -1331,7 +1331,7 @@ function J() {
1331
1331
  const t = et();
1332
1332
  return Zt(t).getIsolationScope();
1333
1333
  }
1334
- function Ri() {
1334
+ function xi() {
1335
1335
  return ge("globalScope", () => new B());
1336
1336
  }
1337
1337
  function wi(...t) {
@@ -1352,7 +1352,7 @@ function Ti(t) {
1352
1352
  };
1353
1353
  return r && (i.parent_span_id = r), i;
1354
1354
  }
1355
- const vi = "sentry.source", Ii = "sentry.sample_rate", Ci = "sentry.previous_trace_sample_rate", Ni = "sentry.op", Ai = "sentry.origin", Ur = "sentry.profile_id", Br = "sentry.exclusive_time", Di = "gen_ai.conversation.id", Oi = 0, $i = 1, Pi = "_sentryScope", Li = "_sentryIsolationScope";
1355
+ const vi = "sentry.source", Ii = "sentry.sample_rate", Ci = "sentry.previous_trace_sample_rate", Ni = "sentry.op", Ai = "sentry.origin", Ur = "sentry.profile_id", Br = "sentry.exclusive_time", Di = "gen_ai.conversation.id", Oi = 0, $i = 1, Li = "_sentryScope", Pi = "_sentryIsolationScope";
1356
1356
  function Mi(t) {
1357
1357
  if (t) {
1358
1358
  if (typeof t == "object" && "deref" in t && typeof t.deref == "function")
@@ -1367,8 +1367,8 @@ function Mi(t) {
1367
1367
  function Hr(t) {
1368
1368
  const e = t;
1369
1369
  return {
1370
- scope: e[Pi],
1371
- isolationScope: Mi(e[Li])
1370
+ scope: e[Li],
1371
+ isolationScope: Mi(e[Pi])
1372
1372
  };
1373
1373
  }
1374
1374
  const Fi = "sentry-", Ui = /^sentry-/;
@@ -1447,7 +1447,7 @@ function zr(t) {
1447
1447
  };
1448
1448
  }
1449
1449
  function Gi(t) {
1450
- if (!_)
1450
+ if (!y)
1451
1451
  return !0;
1452
1452
  const { port: e, projectId: n, protocol: r } = t;
1453
1453
  return ["protocol", "publicKey", "host", "projectId"].find((o) => t[o] ? !1 : (m.error(`Invalid Sentry Dsn: ${o} missing`), !0)) ? !1 : n.match(/^\d+$/) ? qi(r) ? e && isNaN(parseInt(e, 10)) ? (m.error(`Invalid Sentry Dsn: Invalid port ${e}`), !1) : !0 : (m.error(`Invalid Sentry Dsn: Invalid protocol ${r}`), !1) : (m.error(`Invalid Sentry Dsn: Invalid projectId ${n}`), !1);
@@ -1493,9 +1493,9 @@ function Ji(t) {
1493
1493
  }));
1494
1494
  }
1495
1495
  function $n(t) {
1496
- return typeof t == "number" ? Pn(t) : Array.isArray(t) ? t[0] + t[1] / 1e9 : t instanceof Date ? Pn(t.getTime()) : V();
1496
+ return typeof t == "number" ? Ln(t) : Array.isArray(t) ? t[0] + t[1] / 1e9 : t instanceof Date ? Ln(t.getTime()) : V();
1497
1497
  }
1498
- function Pn(t) {
1498
+ function Ln(t) {
1499
1499
  return t > 9999999999 ? t / 1e3 : t;
1500
1500
  }
1501
1501
  function Jt(t) {
@@ -1545,7 +1545,7 @@ const ro = "_sentryRootSpan";
1545
1545
  function qr(t) {
1546
1546
  return t[ro] || t;
1547
1547
  }
1548
- function Ln() {
1548
+ function Pn() {
1549
1549
  On || (me(() => {
1550
1550
  console.warn(
1551
1551
  "[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`."
@@ -1568,14 +1568,14 @@ function Fn(t, e) {
1568
1568
  for (const n of e) {
1569
1569
  if (oo(n)) {
1570
1570
  if (je(t.description, n))
1571
- return _ && Mn(t), !0;
1571
+ return y && Mn(t), !0;
1572
1572
  continue;
1573
1573
  }
1574
1574
  if (!n.name && !n.op)
1575
1575
  continue;
1576
1576
  const r = n.name ? je(t.description, n.name) : !0, s = n.op ? t.op && je(t.op, n.op) : !0;
1577
1577
  if (r && s)
1578
- return _ && Mn(t), !0;
1578
+ return y && Mn(t), !0;
1579
1579
  }
1580
1580
  return !1;
1581
1581
  }
@@ -1658,7 +1658,7 @@ function It(t, e, n = 1 / 0, r = 1 / 0, s = go()) {
1658
1658
  }
1659
1659
  const d = Array.isArray(e) ? [] : {};
1660
1660
  let u = 0;
1661
- const p = Pr(e);
1661
+ const p = Lr(e);
1662
1662
  for (const h in p) {
1663
1663
  if (!Object.prototype.hasOwnProperty.call(p, h))
1664
1664
  continue;
@@ -1741,7 +1741,7 @@ function _o(t, e) {
1741
1741
  return Ct(t, (n, r) => e.includes(r));
1742
1742
  }
1743
1743
  function Nt(t) {
1744
- const e = tt(R);
1744
+ const e = tt(x);
1745
1745
  return e.encodePolyfill ? e.encodePolyfill(t) : new TextEncoder().encode(t);
1746
1746
  }
1747
1747
  function yo(t) {
@@ -1829,7 +1829,7 @@ function ko(t, e, n, r) {
1829
1829
  }
1830
1830
  };
1831
1831
  }
1832
- function xo(t, e) {
1832
+ function Ro(t, e) {
1833
1833
  if (!e)
1834
1834
  return t;
1835
1835
  const n = t.sdk || {};
@@ -1845,7 +1845,7 @@ function xo(t, e) {
1845
1845
  } : void 0
1846
1846
  }, t;
1847
1847
  }
1848
- function Ro(t, e, n, r) {
1848
+ function xo(t, e, n, r) {
1849
1849
  const s = Wr(n), i = {
1850
1850
  sent_at: (/* @__PURE__ */ new Date()).toISOString(),
1851
1851
  ...s && { sdk: s },
@@ -1855,7 +1855,7 @@ function Ro(t, e, n, r) {
1855
1855
  }
1856
1856
  function wo(t, e, n, r) {
1857
1857
  const s = Wr(n), i = t.type && t.type !== "replay_event" ? t.type : "event";
1858
- xo(t, n?.sdk);
1858
+ Ro(t, n?.sdk);
1859
1859
  const o = ko(t, s, r, e);
1860
1860
  return delete t.sdkProcessingMetadata, ye(o, [[{ type: i }, t]]);
1861
1861
  }
@@ -1970,11 +1970,11 @@ function At(t, e, n, r) {
1970
1970
  if (!t || !s)
1971
1971
  return t;
1972
1972
  const i = s({ ...t }, e);
1973
- return _ && i === null && m.log(`Event processor "${s.id || "?"}" dropped event`), Ce(i) ? i.then((o) => At(o, e, n, r + 1)) : At(i, e, n, r + 1);
1973
+ return y && i === null && m.log(`Event processor "${s.id || "?"}" dropped event`), Ce(i) ? i.then((o) => At(o, e, n, r + 1)) : At(i, e, n, r + 1);
1974
1974
  }
1975
1975
  let Q, zn, jn, G;
1976
1976
  function vo(t) {
1977
- const e = R._sentryDebugIds, n = R._debugIds;
1977
+ const e = x._sentryDebugIds, n = x._debugIds;
1978
1978
  if (!e && !n)
1979
1979
  return {};
1980
1980
  const r = e ? Object.keys(e) : [], s = n ? Object.keys(n) : [];
@@ -2027,7 +2027,7 @@ function ke(t, e, n) {
2027
2027
  t[e] = Ae(t[e], n, 1);
2028
2028
  }
2029
2029
  function Xr(t, e) {
2030
- const n = Ri().getScopeData();
2030
+ const n = xi().getScopeData();
2031
2031
  return t && qn(n, t.getScopeData()), e && qn(n, e.getScopeData()), n;
2032
2032
  }
2033
2033
  function Co(t, e) {
@@ -2061,10 +2061,10 @@ function Oo(t, e) {
2061
2061
  function $o(t, e, n, r, s, i) {
2062
2062
  const { normalizeDepth: o = 3, normalizeMaxBreadth: a = 1e3 } = t, c = {
2063
2063
  ...e,
2064
- event_id: e.event_id || n.event_id || P(),
2064
+ event_id: e.event_id || n.event_id || L(),
2065
2065
  timestamp: e.timestamp || Ne()
2066
2066
  }, l = n.integrations || t.integrations.map((N) => N.name);
2067
- Po(c, t), Fo(c, l), s && s.emit("applyFrameMetadata", e), e.type === void 0 && Lo(c, t.stackParser);
2067
+ Lo(c, t), Fo(c, l), s && s.emit("applyFrameMetadata", e), e.type === void 0 && Po(c, t.stackParser);
2068
2068
  const d = Bo(r, n.captureContext);
2069
2069
  n.mechanism && de(c, n.mechanism);
2070
2070
  const u = s ? s.getEventProcessors() : [], p = Xr(i, d), h = [...n.attachments || [], ...p.attachments];
@@ -2076,7 +2076,7 @@ function $o(t, e, n, r, s, i) {
2076
2076
  ];
2077
2077
  return (n.data && n.data.__sentry__ === !0 ? Oe(c) : To(f, c, n)).then((N) => (N && Mo(N), typeof o == "number" && o > 0 ? Uo(N, o, a) : N));
2078
2078
  }
2079
- function Po(t, e) {
2079
+ function Lo(t, e) {
2080
2080
  const { environment: n, release: r, dist: s, maxValueLength: i } = e;
2081
2081
  t.environment = t.environment || n || Qt, !t.release && r && (t.release = r), !t.dist && s && (t.dist = s);
2082
2082
  const o = t.request;
@@ -2084,7 +2084,7 @@ function Po(t, e) {
2084
2084
  a.value && (a.value = wt(a.value, i));
2085
2085
  });
2086
2086
  }
2087
- function Lo(t, e) {
2087
+ function Po(t, e) {
2088
2088
  const n = vo(e);
2089
2089
  t.exception?.values?.forEach((r) => {
2090
2090
  r.stacktrace?.frames?.forEach((s) => {
@@ -2184,7 +2184,7 @@ function Go(t) {
2184
2184
  J().setUser(t);
2185
2185
  }
2186
2186
  function Vn(t) {
2187
- const e = J(), { user: n } = Xr(e, H()), { userAgent: r } = R.navigator || {}, s = fi({
2187
+ const e = J(), { user: n } = Xr(e, H()), { userAgent: r } = x.navigator || {}, s = fi({
2188
2188
  user: n,
2189
2189
  ...r && { userAgent: r },
2190
2190
  ...t
@@ -2258,7 +2258,7 @@ function Wn(t, e) {
2258
2258
  }
2259
2259
  function Qr(t, e, n) {
2260
2260
  if (n[e.name]) {
2261
- _ && m.log(`Integration skipped because it was already installed: ${e.name}`);
2261
+ y && m.log(`Integration skipped because it was already installed: ${e.name}`);
2262
2262
  return;
2263
2263
  }
2264
2264
  if (n[e.name] = e, !Gn.includes(e.name) && typeof e.setupOnce == "function" && (e.setupOnce(), Gn.push(e.name)), e.setup && typeof e.setup == "function" && e.setup(t), typeof e.preprocessEvent == "function") {
@@ -2271,7 +2271,7 @@ function Qr(t, e, n) {
2271
2271
  });
2272
2272
  t.addEventProcessor(s);
2273
2273
  }
2274
- _ && m.log(`Integration installed: ${e.name}`);
2274
+ y && m.log(`Integration installed: ${e.name}`);
2275
2275
  }
2276
2276
  function ta(t) {
2277
2277
  return [
@@ -2423,25 +2423,25 @@ function pa(t, e, n = nn(
2423
2423
  return Promise.resolve({});
2424
2424
  const c = ye(o[0], a), l = (u) => {
2425
2425
  if (_o(c, ["client_report"])) {
2426
- _ && m.warn(`Dropping client report. Will not send outcomes (reason: ${u}).`);
2426
+ y && m.warn(`Dropping client report. Will not send outcomes (reason: ${u}).`);
2427
2427
  return;
2428
2428
  }
2429
2429
  Ct(c, (p, h) => {
2430
2430
  t.recordDroppedEvent(u, Un(h));
2431
2431
  });
2432
2432
  }, d = () => e({ body: yo(c) }).then(
2433
- (u) => u.statusCode === 413 ? (_ && m.error(
2433
+ (u) => u.statusCode === 413 ? (y && m.error(
2434
2434
  "Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."
2435
- ), l("send_error"), u) : (_ && u.statusCode !== void 0 && (u.statusCode < 200 || u.statusCode >= 300) && m.warn(`Sentry responded with status code ${u.statusCode} to sent event.`), r = da(r, u), u),
2435
+ ), l("send_error"), u) : (y && u.statusCode !== void 0 && (u.statusCode < 200 || u.statusCode >= 300) && m.warn(`Sentry responded with status code ${u.statusCode} to sent event.`), r = da(r, u), u),
2436
2436
  (u) => {
2437
- throw l("network_error"), _ && m.error("Encountered error running transport request:", u), u;
2437
+ throw l("network_error"), y && m.error("Encountered error running transport request:", u), u;
2438
2438
  }
2439
2439
  );
2440
2440
  return n.add(d).then(
2441
2441
  (u) => u,
2442
2442
  (u) => {
2443
2443
  if (u === tn)
2444
- return _ && m.error("Skipped sending event because buffer is full."), l("queue_overflow"), Promise.resolve({});
2444
+ return y && m.error("Skipped sending event because buffer is full."), l("queue_overflow"), Promise.resolve({});
2445
2445
  throw u;
2446
2446
  }
2447
2447
  );
@@ -2560,7 +2560,7 @@ class _a {
2560
2560
  * @param options Options for the client.
2561
2561
  */
2562
2562
  constructor(e) {
2563
- if (this._options = e, this._integrations = {}, this._numProcessing = 0, this._outcomes = {}, this._hooks = {}, this._eventProcessors = [], this._promiseBuffer = nn(e.transportOptions?.bufferSize ?? ss), e.dsn ? this._dsn = Ki(e.dsn) : _ && m.warn("No DSN provided, client will not send events."), this._dsn) {
2563
+ if (this._options = e, this._integrations = {}, this._numProcessing = 0, this._outcomes = {}, this._hooks = {}, this._eventProcessors = [], this._promiseBuffer = nn(e.transportOptions?.bufferSize ?? ss), e.dsn ? this._dsn = Ki(e.dsn) : y && m.warn("No DSN provided, client will not send events."), this._dsn) {
2564
2564
  const r = Zo(
2565
2565
  this._dsn,
2566
2566
  e.tunnel,
@@ -2587,9 +2587,9 @@ class _a {
2587
2587
  * Unlike `captureException` exported from every SDK, this method requires that you pass it the current scope.
2588
2588
  */
2589
2589
  captureException(e, n, r) {
2590
- const s = P();
2590
+ const s = L();
2591
2591
  if (Tn(e))
2592
- return _ && m.log(Xn), s;
2592
+ return y && m.log(Xn), s;
2593
2593
  const i = {
2594
2594
  event_id: s,
2595
2595
  ...n
@@ -2606,7 +2606,7 @@ class _a {
2606
2606
  */
2607
2607
  captureMessage(e, n, r, s) {
2608
2608
  const i = {
2609
- event_id: P(),
2609
+ event_id: L(),
2610
2610
  ...r
2611
2611
  }, o = Wt(e) ? e : String(e), a = rt(e), c = a ? this.eventFromMessage(o, n, i) : this.eventFromException(e, i);
2612
2612
  return this._process(
@@ -2620,9 +2620,9 @@ class _a {
2620
2620
  * Unlike `captureEvent` exported from every SDK, this method requires that you pass it the current scope.
2621
2621
  */
2622
2622
  captureEvent(e, n, r) {
2623
- const s = P();
2623
+ const s = L();
2624
2624
  if (n?.originalException && Tn(n.originalException))
2625
- return _ && m.log(Xn), s;
2625
+ return y && m.log(Xn), s;
2626
2626
  const i = {
2627
2627
  event_id: s,
2628
2628
  ...n
@@ -2765,19 +2765,19 @@ class _a {
2765
2765
  if ("aggregates" in e) {
2766
2766
  const i = e.attrs || {};
2767
2767
  if (!i.release && !n) {
2768
- _ && m.warn(Kn);
2768
+ y && m.warn(Kn);
2769
2769
  return;
2770
2770
  }
2771
2771
  i.release = i.release || n, i.environment = i.environment || r, e.attrs = i;
2772
2772
  } else {
2773
2773
  if (!e.release && !n) {
2774
- _ && m.warn(Kn);
2774
+ y && m.warn(Kn);
2775
2775
  return;
2776
2776
  }
2777
2777
  e.release = e.release || n, e.environment = e.environment || r;
2778
2778
  }
2779
2779
  this.emit("beforeSendSession", e);
2780
- const s = Ro(e, this._dsn, this._options._metadata, this._options.tunnel);
2780
+ const s = xo(e, this._dsn, this._options._metadata, this._options.tunnel);
2781
2781
  this.sendEnvelope(s);
2782
2782
  }
2783
2783
  /**
@@ -2786,7 +2786,7 @@ class _a {
2786
2786
  recordDroppedEvent(e, n, r = 1) {
2787
2787
  if (this._options.sendClientReports) {
2788
2788
  const s = `${e}:${n}`;
2789
- _ && m.log(`Recording outcome: "${s}"${r > 1 ? ` (${r} times)` : ""}`), this._outcomes[s] = (this._outcomes[s] || 0) + r;
2789
+ y && m.log(`Recording outcome: "${s}"${r > 1 ? ` (${r} times)` : ""}`), this._outcomes[s] = (this._outcomes[s] || 0) + r;
2790
2790
  }
2791
2791
  }
2792
2792
  /* eslint-disable @typescript-eslint/unified-signatures */
@@ -2821,9 +2821,9 @@ class _a {
2821
2821
  try {
2822
2822
  return await this._transport.send(e);
2823
2823
  } catch (n) {
2824
- return _ && m.error("Error while sending envelope:", n), {};
2824
+ return y && m.error("Error while sending envelope:", n), {};
2825
2825
  }
2826
- return _ && m.error("Transport disabled"), {};
2826
+ return y && m.error("Transport disabled"), {};
2827
2827
  }
2828
2828
  /**
2829
2829
  * Disposes of the client and releases all resources.
@@ -2917,10 +2917,10 @@ class _a {
2917
2917
  * @param scope
2918
2918
  */
2919
2919
  _captureEvent(e, n = {}, r = H(), s = J()) {
2920
- return _ && Ot(e) && m.log(`Captured error event \`${is(e)[0] || "<unknown>"}\``), this._processEvent(e, n, r, s).then(
2920
+ return y && Ot(e) && m.log(`Captured error event \`${is(e)[0] || "<unknown>"}\``), this._processEvent(e, n, r, s).then(
2921
2921
  (i) => i.event_id,
2922
2922
  (i) => {
2923
- _ && (Zn(i) ? m.log(i.message) : Yn(i) ? m.warn(i.message) : m.warn(i));
2923
+ y && (Zn(i) ? m.log(i.message) : Yn(i) ? m.warn(i.message) : m.warn(i));
2924
2924
  }
2925
2925
  );
2926
2926
  }
@@ -3018,17 +3018,17 @@ Reason: ${h}`
3018
3018
  * Sends client reports as an envelope.
3019
3019
  */
3020
3020
  _flushOutcomes() {
3021
- _ && m.log("Flushing outcomes...");
3021
+ y && m.log("Flushing outcomes...");
3022
3022
  const e = this._clearOutcomes();
3023
3023
  if (e.length === 0) {
3024
- _ && m.log("No outcomes to send");
3024
+ y && m.log("No outcomes to send");
3025
3025
  return;
3026
3026
  }
3027
3027
  if (!this._dsn) {
3028
- _ && m.log("No dsn provided, will not send outcomes");
3028
+ y && m.log("No dsn provided, will not send outcomes");
3029
3029
  return;
3030
3030
  }
3031
- _ && m.log("Sending outcomes:", e);
3031
+ y && m.log("Sending outcomes:", e);
3032
3032
  const n = ha(e, this._options.tunnel && De(this._dsn));
3033
3033
  this.sendEnvelope(n);
3034
3034
  }
@@ -3068,7 +3068,7 @@ function Ea(t, e, n, r) {
3068
3068
  return null;
3069
3069
  if (o) {
3070
3070
  const d = o(l);
3071
- d ? c = Ae(n, ga(d)) : Ln();
3071
+ d ? c = Ae(n, ga(d)) : Pn();
3072
3072
  }
3073
3073
  if (c.spans) {
3074
3074
  const d = [], u = c.spans;
@@ -3079,7 +3079,7 @@ function Ea(t, e, n, r) {
3079
3079
  }
3080
3080
  if (o) {
3081
3081
  const f = o(h);
3082
- f ? d.push(f) : (Ln(), d.push(h));
3082
+ f ? d.push(f) : (Pn(), d.push(h));
3083
3083
  } else
3084
3084
  d.push(h);
3085
3085
  }
@@ -3131,14 +3131,14 @@ function ka(t) {
3131
3131
  function tr(t) {
3132
3132
  return ka(t) ? `${t.message} (${t.__sentry_fetch_url_host__})` : t.message;
3133
3133
  }
3134
- function xa(t, e) {
3135
- e.debug === !0 && (_ ? m.enable() : me(() => {
3134
+ function Ra(t, e) {
3135
+ e.debug === !0 && (y ? m.enable() : me(() => {
3136
3136
  console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.");
3137
3137
  })), H().update(e.initialScope);
3138
3138
  const r = new t(e);
3139
- return Ra(r), r.init(), r;
3139
+ return xa(r), r.init(), r;
3140
3140
  }
3141
- function Ra(t) {
3141
+ function xa(t) {
3142
3142
  H().setClient(t);
3143
3143
  }
3144
3144
  function Et(t) {
@@ -3242,10 +3242,10 @@ const Ca = "FunctionToString", rr = /* @__PURE__ */ new WeakMap(), Na = (() => (
3242
3242
  const i = s.getOptions();
3243
3243
  e = sr(t, i);
3244
3244
  }
3245
- return La(n, e) ? null : n;
3245
+ return Pa(n, e) ? null : n;
3246
3246
  }
3247
3247
  };
3248
- }, Pa = ((t = {}) => ({
3248
+ }, La = ((t = {}) => ({
3249
3249
  ...$a(t),
3250
3250
  name: "InboundFilters"
3251
3251
  }));
@@ -3261,28 +3261,28 @@ function sr(t = {}, e = {}) {
3261
3261
  ignoreTransactions: [...t.ignoreTransactions || [], ...e.ignoreTransactions || []]
3262
3262
  };
3263
3263
  }
3264
- function La(t, e) {
3264
+ function Pa(t, e) {
3265
3265
  if (t.type) {
3266
3266
  if (t.type === "transaction" && Fa(t, e.ignoreTransactions))
3267
- return _ && m.warn(
3267
+ return y && m.warn(
3268
3268
  `Event dropped due to being matched by \`ignoreTransactions\` option.
3269
3269
  Event: ${te(t)}`
3270
3270
  ), !0;
3271
3271
  } else {
3272
3272
  if (Ma(t, e.ignoreErrors))
3273
- return _ && m.warn(
3273
+ return y && m.warn(
3274
3274
  `Event dropped due to being matched by \`ignoreErrors\` option.
3275
3275
  Event: ${te(t)}`
3276
3276
  ), !0;
3277
3277
  if (za(t))
3278
- return _ && m.warn(
3278
+ return y && m.warn(
3279
3279
  `Event dropped due to not having an error message, error type or stacktrace.
3280
3280
  Event: ${te(
3281
3281
  t
3282
3282
  )}`
3283
3283
  ), !0;
3284
3284
  if (Ua(t, e.denyUrls))
3285
- return _ && m.warn(
3285
+ return y && m.warn(
3286
3286
  `Event dropped due to being matched by \`denyUrls\` option.
3287
3287
  Event: ${te(
3288
3288
  t
@@ -3290,7 +3290,7 @@ Event: ${te(
3290
3290
  Url: ${Ye(t)}`
3291
3291
  ), !0;
3292
3292
  if (!Ba(t, e.allowUrls))
3293
- return _ && m.warn(
3293
+ return y && m.warn(
3294
3294
  `Event dropped due to not being matched by \`allowUrls\` option.
3295
3295
  Event: ${te(
3296
3296
  t
@@ -3334,7 +3334,7 @@ function Ye(t) {
3334
3334
  const n = [...t.exception?.values ?? []].reverse().find((r) => r.mechanism?.parent_id === void 0 && r.stacktrace?.frames?.length)?.stacktrace?.frames;
3335
3335
  return n ? Ha(n) : null;
3336
3336
  } catch {
3337
- return _ && m.error(`Cannot extract url for event ${te(t)}`), null;
3337
+ return y && m.error(`Cannot extract url for event ${te(t)}`), null;
3338
3338
  }
3339
3339
  }
3340
3340
  function za(t) {
@@ -3421,10 +3421,10 @@ function qa(t) {
3421
3421
  oe(e, t), ae(e, Va);
3422
3422
  }
3423
3423
  function Va() {
3424
- "console" in R && js.forEach(function(t) {
3425
- t in R.console && $(R.console, t, function(e) {
3424
+ "console" in x && js.forEach(function(t) {
3425
+ t in x.console && $(x.console, t, function(e) {
3426
3426
  return Xe[t] = e, function(...n) {
3427
- F("console", { args: n, level: t }), Xe[t]?.apply(R.console, n);
3427
+ F("console", { args: n, level: t }), Xe[t]?.apply(x.console, n);
3428
3428
  };
3429
3429
  });
3430
3430
  });
@@ -3441,7 +3441,7 @@ const Wa = "Dedupe", Xa = (() => {
3441
3441
  return e;
3442
3442
  try {
3443
3443
  if (Ya(e, t))
3444
- return _ && m.warn("Event dropped due to being a duplicate of previously captured event."), null;
3444
+ return y && m.warn("Event dropped due to being a duplicate of previously captured event."), null;
3445
3445
  } catch {
3446
3446
  }
3447
3447
  return t = e;
@@ -3501,7 +3501,7 @@ function hs(t) {
3501
3501
  if (t !== void 0)
3502
3502
  return t >= 400 && t < 500 ? "warning" : t >= 500 ? "error" : void 0;
3503
3503
  }
3504
- const Ie = R;
3504
+ const Ie = x;
3505
3505
  function nc() {
3506
3506
  return "history" in Ie && !!Ie.history;
3507
3507
  }
@@ -3514,7 +3514,7 @@ function rc() {
3514
3514
  return !1;
3515
3515
  }
3516
3516
  }
3517
- function Pt(t) {
3517
+ function Lt(t) {
3518
3518
  return t && /^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString());
3519
3519
  }
3520
3520
  function sc() {
@@ -3522,16 +3522,16 @@ function sc() {
3522
3522
  return !0;
3523
3523
  if (!rc())
3524
3524
  return !1;
3525
- if (Pt(Ie.fetch))
3525
+ if (Lt(Ie.fetch))
3526
3526
  return !0;
3527
3527
  let t = !1;
3528
3528
  const e = Ie.document;
3529
3529
  if (e && typeof e.createElement == "function")
3530
3530
  try {
3531
3531
  const n = e.createElement("iframe");
3532
- n.hidden = !0, e.head.appendChild(n), n.contentWindow?.fetch && (t = Pt(n.contentWindow.fetch)), e.head.removeChild(n);
3532
+ n.hidden = !0, e.head.appendChild(n), n.contentWindow?.fetch && (t = Lt(n.contentWindow.fetch)), e.head.removeChild(n);
3533
3533
  } catch (n) {
3534
- _ && m.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ", n);
3534
+ y && m.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ", n);
3535
3535
  }
3536
3536
  return t;
3537
3537
  }
@@ -3540,7 +3540,7 @@ function ic(t, e) {
3540
3540
  oe(n, t), ae(n, () => oc(void 0, e));
3541
3541
  }
3542
3542
  function oc(t, e = !1) {
3543
- e && !sc() || $(R, "fetch", function(n) {
3543
+ e && !sc() || $(x, "fetch", function(n) {
3544
3544
  return function(...r) {
3545
3545
  const s = new Error(), { method: i, url: o } = ac(r), a = {
3546
3546
  args: r,
@@ -3555,7 +3555,7 @@ function oc(t, e = !1) {
3555
3555
  };
3556
3556
  return F("fetch", {
3557
3557
  ...a
3558
- }), n.apply(R, r).then(
3558
+ }), n.apply(x, r).then(
3559
3559
  async (c) => (F("fetch", {
3560
3560
  ...a,
3561
3561
  endTimestamp: V() * 1e3,
@@ -3618,14 +3618,14 @@ function cc(t) {
3618
3618
  function lc() {
3619
3619
  return "npm";
3620
3620
  }
3621
- const T = R;
3622
- let Lt = 0;
3621
+ const T = x;
3622
+ let Pt = 0;
3623
3623
  function fs() {
3624
- return Lt > 0;
3624
+ return Pt > 0;
3625
3625
  }
3626
3626
  function uc() {
3627
- Lt++, setTimeout(() => {
3628
- Lt--;
3627
+ Pt++, setTimeout(() => {
3628
+ Pt--;
3629
3629
  });
3630
3630
  }
3631
3631
  function fe(t, e = {}) {
@@ -3814,14 +3814,14 @@ function kc(t) {
3814
3814
  return n;
3815
3815
  }
3816
3816
  }
3817
- class xc extends _a {
3817
+ class Rc extends _a {
3818
3818
  /**
3819
3819
  * Creates a new Browser SDK instance.
3820
3820
  *
3821
3821
  * @param options Configuration options for this SDK.
3822
3822
  */
3823
3823
  constructor(e) {
3824
- const n = Rc(e), r = T.SENTRY_SDK_SOURCE || lc();
3824
+ const n = xc(e), r = T.SENTRY_SDK_SOURCE || lc();
3825
3825
  va(n, "browser", ["browser"], r), n._metadata?.sdk && (n._metadata.sdk.settings = {
3826
3826
  infer_ip: n.sendDefaultPii ? "auto" : "never",
3827
3827
  // purposefully allowing already passed settings to override the default
@@ -3857,7 +3857,7 @@ class xc extends _a {
3857
3857
  return e.platform = e.platform || "javascript", super._prepareEvent(e, n, r, s);
3858
3858
  }
3859
3859
  }
3860
- function Rc(t) {
3860
+ function xc(t) {
3861
3861
  return {
3862
3862
  release: typeof __SENTRY_RELEASE__ == "string" ? __SENTRY_RELEASE__ : T.SENTRY_RELEASE?.id,
3863
3863
  // This supports the variable that sentry-webpack-plugin injects
@@ -3867,7 +3867,7 @@ function Rc(t) {
3867
3867
  ...t
3868
3868
  };
3869
3869
  }
3870
- const wc = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__, A = R, Tc = 1e3;
3870
+ const wc = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__, A = x, Tc = 1e3;
3871
3871
  let lr, Ft, Ut;
3872
3872
  function vc(t) {
3873
3873
  oe("dom", t), ae("dom", Ic);
@@ -3929,7 +3929,7 @@ function ur(t, e = !1) {
3929
3929
  const r = Ac(n);
3930
3930
  if (Nc(n.type, r))
3931
3931
  return;
3932
- Y(n, "_sentryCaptured", !0), r && !r._sentryId && Y(r, "_sentryId", P());
3932
+ Y(n, "_sentryCaptured", !0), r && !r._sentryId && Y(r, "_sentryId", L());
3933
3933
  const s = n.type === "keypress" ? "input" : n.type;
3934
3934
  Cc(n) || (t({ event: n, name: s, global: e }), Ft = n.type, Ut = r ? r._sentryId : void 0), clearTimeout(lr), lr = A.setTimeout(() => {
3935
3935
  Ut = void 0, Ft = void 0;
@@ -3943,15 +3943,15 @@ function Ac(t) {
3943
3943
  return null;
3944
3944
  }
3945
3945
  }
3946
- let Le;
3946
+ let Pe;
3947
3947
  function ms(t) {
3948
3948
  const e = "history";
3949
3949
  oe(e, t), ae(e, Dc);
3950
3950
  }
3951
3951
  function Dc() {
3952
3952
  if (A.addEventListener("popstate", () => {
3953
- const e = A.location.href, n = Le;
3954
- if (Le = e, n === e)
3953
+ const e = A.location.href, n = Pe;
3954
+ if (Pe = e, n === e)
3955
3955
  return;
3956
3956
  F("history", { from: n, to: e });
3957
3957
  }), !nc())
@@ -3960,8 +3960,8 @@ function Dc() {
3960
3960
  return function(...n) {
3961
3961
  const r = n.length > 2 ? n[2] : void 0;
3962
3962
  if (r) {
3963
- const s = Le, i = Oc(String(r));
3964
- if (Le = i, s === i)
3963
+ const s = Pe, i = Oc(String(r));
3964
+ if (Pe = i, s === i)
3965
3965
  return e.apply(this, n);
3966
3966
  F("history", { from: s, to: i });
3967
3967
  }
@@ -3983,7 +3983,7 @@ function $c(t) {
3983
3983
  if (e)
3984
3984
  return e;
3985
3985
  let n = A[t];
3986
- if (Pt(n))
3986
+ if (Lt(n))
3987
3987
  return Ge[t] = n.bind(A);
3988
3988
  const r = A.document;
3989
3989
  if (r && typeof r.createElement == "function")
@@ -3997,11 +3997,11 @@ function $c(t) {
3997
3997
  }
3998
3998
  return n && (Ge[t] = n.bind(A));
3999
3999
  }
4000
- function Pc(t) {
4000
+ function Lc(t) {
4001
4001
  Ge[t] = void 0;
4002
4002
  }
4003
- const Re = "__sentry_xhr_v3__";
4004
- function Lc(t) {
4003
+ const xe = "__sentry_xhr_v3__";
4004
+ function Pc(t) {
4005
4005
  oe("xhr", t), ae("xhr", Mc);
4006
4006
  }
4007
4007
  function Mc() {
@@ -4013,13 +4013,13 @@ function Mc() {
4013
4013
  const s = new Error(), i = V() * 1e3, o = q(r[0]) ? r[0].toUpperCase() : void 0, a = Fc(r[1]);
4014
4014
  if (!o || !a)
4015
4015
  return e.apply(n, r);
4016
- n[Re] = {
4016
+ n[xe] = {
4017
4017
  method: o,
4018
4018
  url: a,
4019
4019
  request_headers: {}
4020
4020
  }, o === "POST" && a.match(/sentry_key/) && (n.__sentry_own_request__ = !0);
4021
4021
  const c = () => {
4022
- const l = n[Re];
4022
+ const l = n[xe];
4023
4023
  if (l && n.readyState === 4) {
4024
4024
  try {
4025
4025
  l.status_code = n.status;
@@ -4040,14 +4040,14 @@ function Mc() {
4040
4040
  }
4041
4041
  }) : n.addEventListener("readystatechange", c), n.setRequestHeader = new Proxy(n.setRequestHeader, {
4042
4042
  apply(l, d, u) {
4043
- const [p, h] = u, f = d[Re];
4043
+ const [p, h] = u, f = d[xe];
4044
4044
  return f && q(p) && q(h) && (f.request_headers[p.toLowerCase()] = h), l.apply(d, u);
4045
4045
  }
4046
4046
  }), e.apply(n, r);
4047
4047
  }
4048
4048
  }), t.send = new Proxy(t.send, {
4049
4049
  apply(e, n, r) {
4050
- const s = n[Re];
4050
+ const s = n[xe];
4051
4051
  if (!s)
4052
4052
  return e.apply(n, r);
4053
4053
  r[0] !== void 0 && (s.body = r[0]);
@@ -4102,7 +4102,7 @@ function Bc(t, e = $c("fetch")) {
4102
4102
  }
4103
4103
  };
4104
4104
  } catch (c) {
4105
- throw Pc("fetch"), c;
4105
+ throw Lc("fetch"), c;
4106
4106
  } finally {
4107
4107
  n -= o, r--;
4108
4108
  }
@@ -4173,7 +4173,7 @@ const jc = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i, qc = /^\s*at (?:(.+?\)(?: \
4173
4173
  return {
4174
4174
  name: tl,
4175
4175
  setup(n) {
4176
- e.console && qa(ol(n)), e.dom && vc(il(n, e.dom)), e.xhr && Lc(al(n)), e.fetch && ic(cl(n)), e.history && ms(ll(n)), e.sentry && n.on("beforeSendEvent", sl(n));
4176
+ e.console && qa(ol(n)), e.dom && vc(il(n, e.dom)), e.xhr && Pc(al(n)), e.fetch && ic(cl(n)), e.history && ms(ll(n)), e.sentry && n.on("beforeSendEvent", sl(n));
4177
4177
  }
4178
4178
  };
4179
4179
  }), rl = nl;
@@ -4247,7 +4247,7 @@ function al(t) {
4247
4247
  return function(n) {
4248
4248
  if (C() !== t)
4249
4249
  return;
4250
- const { startTimestamp: r, endTimestamp: s } = n, i = n.xhr[Re];
4250
+ const { startTimestamp: r, endTimestamp: s } = n, i = n.xhr[xe];
4251
4251
  if (!r || !s || !i)
4252
4252
  return;
4253
4253
  const { method: o, url: a, status_code: c, body: l } = i, d = {
@@ -4498,14 +4498,14 @@ const bl = (t = {}) => {
4498
4498
  }, Sl = "CultureContext", kl = (() => ({
4499
4499
  name: Sl,
4500
4500
  preprocessEvent(t) {
4501
- const e = Rl();
4501
+ const e = xl();
4502
4502
  e && (t.contexts = {
4503
4503
  ...t.contexts,
4504
4504
  culture: { ...e, ...t.contexts?.culture }
4505
4505
  });
4506
4506
  }
4507
- })), xl = kl;
4508
- function Rl() {
4507
+ })), Rl = kl;
4508
+ function xl() {
4509
4509
  try {
4510
4510
  const t = T.Intl;
4511
4511
  if (!t)
@@ -4634,8 +4634,8 @@ const $l = () => ({
4634
4634
  headers: n
4635
4635
  };
4636
4636
  }
4637
- }), Pl = "cause", Ll = 5, Ml = "LinkedErrors", Fl = ((t = {}) => {
4638
- const e = t.limit || Ll, n = t.key || Pl;
4637
+ }), Ll = "cause", Pl = 5, Ml = "LinkedErrors", Fl = ((t = {}) => {
4638
+ const e = t.limit || Pl, n = t.key || Ll;
4639
4639
  return {
4640
4640
  name: Ml,
4641
4641
  preprocessEvent(r, s, i) {
@@ -4672,7 +4672,7 @@ function zl(t) {
4672
4672
  return [
4673
4673
  // TODO(v11): Replace with `eventFiltersIntegration` once we remove the deprecated `inboundFiltersIntegration`
4674
4674
  // eslint-disable-next-line deprecation/deprecation
4675
- Pa(),
4675
+ La(),
4676
4676
  Aa(),
4677
4677
  tc(),
4678
4678
  fl(),
@@ -4681,7 +4681,7 @@ function zl(t) {
4681
4681
  Ul(),
4682
4682
  Ka(),
4683
4683
  $l(),
4684
- xl(),
4684
+ Rl(),
4685
4685
  bl()
4686
4686
  ];
4687
4687
  }
@@ -4698,7 +4698,7 @@ function jl(t = {}) {
4698
4698
  }),
4699
4699
  transport: t.transport || Bc
4700
4700
  };
4701
- return xa(xc, r);
4701
+ return Ra(Rc, r);
4702
4702
  }
4703
4703
  const ql = "https://06451c8d861702902d2e6b2088fa9b62@o1128948.ingest.us.sentry.io/4509207135387648";
4704
4704
  class Vl {
@@ -4737,7 +4737,7 @@ class Vl {
4737
4737
  });
4738
4738
  }
4739
4739
  }
4740
- const y = {
4740
+ const _ = {
4741
4741
  AUDIO_ERROR: 1001,
4742
4742
  SUCCESS: 200,
4743
4743
  TXN_ERROR: 1003,
@@ -4746,35 +4746,35 @@ const y = {
4746
4746
  UNAUTHORIZED: 401,
4747
4747
  FORBIDDEN: 403
4748
4748
  };
4749
- var Gl = /* @__PURE__ */ ((t) => (t.NOT_INITIALIZED = "na", t.INIT = "init", t.STOP = "stop", t.COMMIT = "commit", t))(Gl || {}), Wl = /* @__PURE__ */ ((t) => (t.START = "start", t.PAUSE = "pause", t.RESUME = "resume", t.STOP = "stop", t))(Wl || {}), Xl = /* @__PURE__ */ ((t) => (t.EKA_EMR_TEMPLATE = "eka_emr_template", t.CLINICAL_NOTE_TEMPLATE = "clinical_notes_template", t.TRANSCRIPT_TEMPLATE = "transcript_template", t.EKA_EMR_TO_FHIR_TEMPLATE = "eka_emr_to_fhir_template", t.NIC_TEMPLATE = "nic_template", t))(Xl || {}), Kl = /* @__PURE__ */ ((t) => (t.SUCCESS = "success", t.FAILURE = "failure", t.PARTIAL_COMPLETE = "partial_complete", t.IN_PROGRESS = "in-progress", t))(Kl || {}), S = /* @__PURE__ */ ((t) => (t.MICROPHONE = "microphone", t.TXN_INIT_FAILED = "txn_init_failed", t.TXN_LIMIT_EXCEEDED = "txn_limit_exceeded", t.INTERNAL_SERVER_ERROR = "internal_server_error", t.END_RECORDING_FAILED = "end_recording_failed", t.AUDIO_UPLOAD_FAILED = "audio_upload_failed", t.TXN_COMMIT_FAILED = "txn_commit_failed", t.TXN_STATUS_MISMATCH = "txn_status_mismatch", t.NETWORK_ERROR = "network_error", t.UNKNOWN_ERROR = "unknown_error", t.UNAUTHORIZED = "unauthorized", t.FORBIDDEN = "forbidden", t))(S || {}), Yl = /* @__PURE__ */ ((t) => (t.SUCCESS = "success", t.IN_PROGRESS = "in-progress", t.FAILED = "failed", t.CANCELLED = "cancelled", t))(Yl || {}), Zl = /* @__PURE__ */ ((t) => (t.AWS_CONFIGURE_STATUS = "aws_configure_status", t.FILE_UPLOAD_STATUS = "file_upload_status", t.TRANSACTION_STATUS = "transaction_status", t.TEMPLATE_OPERATION_STATUS = "template_operation_status", t.AUTHENTICATION_STATUS = "authentication_status", t.NETWORK_STATUS = "network_status", t.STORAGE_STATUS = "storage_status", t))(Zl || {}), We = /* @__PURE__ */ ((t) => (t.JSON = "json", t.TRANSCRIPT = "transcript", t.MARKDOWN = "markdown", t))(We || {}), ee = /* @__PURE__ */ ((t) => (t.INTERNET_CONNECTIVITY = "INTERNET_CONNECTIVITY", t.SYSTEM_INFO = "SYSTEM_INFO", t.MICROPHONE = "MICROPHONE", t.SHARED_WORKER = "SHARED_WORKER", t.NETWORK_API = "NETWORK_API", t))(ee || {}), v = /* @__PURE__ */ ((t) => (t.SUCCESS = "success", t.ERROR = "error", t.WARNING = "warning", t))(v || {});
4750
- function E(t, e) {
4749
+ var Gl = /* @__PURE__ */ ((t) => (t.NOT_INITIALIZED = "na", t.INIT = "init", t.STOP = "stop", t.COMMIT = "commit", t))(Gl || {}), Wl = /* @__PURE__ */ ((t) => (t.START = "start", t.PAUSE = "pause", t.RESUME = "resume", t.STOP = "stop", t))(Wl || {}), Xl = /* @__PURE__ */ ((t) => (t.EKA_EMR_TEMPLATE = "eka_emr_template", t.CLINICAL_NOTE_TEMPLATE = "clinical_notes_template", t.TRANSCRIPT_TEMPLATE = "transcript_template", t.EKA_EMR_TO_FHIR_TEMPLATE = "eka_emr_to_fhir_template", t.NIC_TEMPLATE = "nic_template", t))(Xl || {}), Kl = /* @__PURE__ */ ((t) => (t.SUCCESS = "success", t.FAILURE = "failure", t.PARTIAL_COMPLETE = "partial_complete", t.IN_PROGRESS = "in-progress", t))(Kl || {}), E = /* @__PURE__ */ ((t) => (t.TXN_INIT_FAILED = "txn_init_failed", t.TXN_LIMIT_EXCEEDED = "txn_limit_exceeded", t.INTERNAL_SERVER_ERROR = "internal_server_error", t.END_RECORDING_FAILED = "end_recording_failed", t.AUDIO_UPLOAD_FAILED = "audio_upload_failed", t.TXN_COMMIT_FAILED = "txn_commit_failed", t.TXN_STATUS_MISMATCH = "txn_status_mismatch", t.NETWORK_ERROR = "network_error", t.UNKNOWN_ERROR = "unknown_error", t.UNAUTHORIZED = "unauthorized", t.FORBIDDEN = "forbidden", t.START_RECORDING_FAILED = "start_recording_failed", t))(E || {}), Yl = /* @__PURE__ */ ((t) => (t.SUCCESS = "success", t.IN_PROGRESS = "in-progress", t.FAILED = "failed", t.CANCELLED = "cancelled", t))(Yl || {}), Zl = /* @__PURE__ */ ((t) => (t.AWS_CONFIGURE_STATUS = "aws_configure_status", t.FILE_UPLOAD_STATUS = "file_upload_status", t.TRANSACTION_STATUS = "transaction_status", t.TEMPLATE_OPERATION_STATUS = "template_operation_status", t.AUTHENTICATION_STATUS = "authentication_status", t.NETWORK_STATUS = "network_status", t.STORAGE_STATUS = "storage_status", t))(Zl || {}), We = /* @__PURE__ */ ((t) => (t.JSON = "json", t.TRANSCRIPT = "transcript", t.MARKDOWN = "markdown", t))(We || {}), ee = /* @__PURE__ */ ((t) => (t.INTERNET_CONNECTIVITY = "INTERNET_CONNECTIVITY", t.SYSTEM_INFO = "SYSTEM_INFO", t.MICROPHONE = "MICROPHONE", t.SHARED_WORKER = "SHARED_WORKER", t.NETWORK_API = "NETWORK_API", t))(ee || {}), v = /* @__PURE__ */ ((t) => (t.SUCCESS = "success", t.ERROR = "error", t.WARNING = "warning", t))(v || {});
4750
+ function S(t, e) {
4751
4751
  return t instanceof j ? t.status === 401 ? {
4752
- error_code: S.UNAUTHORIZED,
4753
- status_code: y.UNAUTHORIZED,
4752
+ error_code: E.UNAUTHORIZED,
4753
+ status_code: _.UNAUTHORIZED,
4754
4754
  message: "Authentication failed. Token may be expired."
4755
4755
  } : t.status === 403 ? {
4756
- error_code: S.FORBIDDEN,
4757
- status_code: y.FORBIDDEN,
4756
+ error_code: E.FORBIDDEN,
4757
+ status_code: _.FORBIDDEN,
4758
4758
  message: "Access forbidden."
4759
4759
  } : t.status === 408 ? {
4760
- error_code: S.NETWORK_ERROR,
4760
+ error_code: E.NETWORK_ERROR,
4761
4761
  status_code: t.status,
4762
4762
  message: `${e} Request timed out.`
4763
4763
  } : {
4764
- error_code: S.INTERNAL_SERVER_ERROR,
4764
+ error_code: E.INTERNAL_SERVER_ERROR,
4765
4765
  status_code: t.status,
4766
4766
  message: `${e} ${t.message}`
4767
4767
  } : t instanceof DOMException && t.name === "AbortError" ? {
4768
- error_code: S.NETWORK_ERROR,
4769
- status_code: y.INTERNAL_SERVER_ERROR,
4768
+ error_code: E.NETWORK_ERROR,
4769
+ status_code: _.INTERNAL_SERVER_ERROR,
4770
4770
  message: `${e} Request aborted (timeout).`
4771
4771
  } : t instanceof TypeError && (t.message.includes("fetch") || t.message.includes("network")) ? {
4772
- error_code: S.NETWORK_ERROR,
4773
- status_code: y.INTERNAL_SERVER_ERROR,
4772
+ error_code: E.NETWORK_ERROR,
4773
+ status_code: _.INTERNAL_SERVER_ERROR,
4774
4774
  message: `${e} Network error.`
4775
4775
  } : {
4776
- error_code: S.INTERNAL_SERVER_ERROR,
4777
- status_code: y.INTERNAL_SERVER_ERROR,
4776
+ error_code: E.INTERNAL_SERVER_ERROR,
4777
+ status_code: _.INTERNAL_SERVER_ERROR,
4778
4778
  message: `${e} ${t}`
4779
4779
  };
4780
4780
  }
@@ -4791,7 +4791,7 @@ class Jl {
4791
4791
  });
4792
4792
  return { ...e.data, status_code: e.status };
4793
4793
  } catch (e) {
4794
- return { status_code: E(e, "Failed to fetch templates,").status_code, items: [] };
4794
+ return { status_code: S(e, "Failed to fetch templates,").status_code, items: [] };
4795
4795
  }
4796
4796
  }
4797
4797
  async createTemplate({
@@ -4807,7 +4807,7 @@ class Jl {
4807
4807
  });
4808
4808
  return { ...s.data, status_code: s.status };
4809
4809
  } catch (s) {
4810
- const i = E(s, "Failed to create template,");
4810
+ const i = S(s, "Failed to create template,");
4811
4811
  return {
4812
4812
  status_code: i.status_code,
4813
4813
  message: i.message
@@ -4828,7 +4828,7 @@ class Jl {
4828
4828
  });
4829
4829
  return { ...i.data, status_code: i.status };
4830
4830
  } catch (i) {
4831
- const o = E(i, "Failed to update template,");
4831
+ const o = S(i, "Failed to update template,");
4832
4832
  return { status_code: o.status_code, msg: o.message };
4833
4833
  }
4834
4834
  }
@@ -4840,7 +4840,7 @@ class Jl {
4840
4840
  });
4841
4841
  return { ...n.data, status_code: n.status };
4842
4842
  } catch (n) {
4843
- const r = E(n, "Failed to delete template,");
4843
+ const r = S(n, "Failed to delete template,");
4844
4844
  return { status_code: r.status_code, msg: r.message };
4845
4845
  }
4846
4846
  }
@@ -4854,7 +4854,7 @@ class Jl {
4854
4854
  });
4855
4855
  return { ...n.data, status_code: n.status };
4856
4856
  } catch (n) {
4857
- const r = E(n, "Failed to AI generate template,");
4857
+ const r = S(n, "Failed to AI generate template,");
4858
4858
  return {
4859
4859
  status_code: r.status_code,
4860
4860
  message: r.message
@@ -4886,7 +4886,7 @@ class Jl {
4886
4886
  });
4887
4887
  return { ...i.data, status_code: i.status };
4888
4888
  } catch (i) {
4889
- const o = E(i, "Failed to convert transcription to template,");
4889
+ const o = S(i, "Failed to convert transcription to template,");
4890
4890
  return {
4891
4891
  status_code: o.status_code,
4892
4892
  message: o.message
@@ -4902,7 +4902,7 @@ class Jl {
4902
4902
  });
4903
4903
  return { ...e.data, status_code: e.status };
4904
4904
  } catch (e) {
4905
- return { status_code: E(e, "Failed to fetch template sections,").status_code, items: [] };
4905
+ return { status_code: S(e, "Failed to fetch template sections,").status_code, items: [] };
4906
4906
  }
4907
4907
  }
4908
4908
  async createTemplateSection({
@@ -4919,7 +4919,7 @@ class Jl {
4919
4919
  });
4920
4920
  return { ...i.data, status_code: i.status };
4921
4921
  } catch (i) {
4922
- const o = E(i, "Failed to create template section,");
4922
+ const o = S(i, "Failed to create template section,");
4923
4923
  return {
4924
4924
  status_code: o.status_code,
4925
4925
  msg: o.message,
@@ -4942,7 +4942,7 @@ class Jl {
4942
4942
  });
4943
4943
  return { ...o.data, status_code: o.status };
4944
4944
  } catch (o) {
4945
- const a = E(o, "Failed to update template section,");
4945
+ const a = S(o, "Failed to update template section,");
4946
4946
  return {
4947
4947
  status_code: a.status_code,
4948
4948
  msg: a.message,
@@ -4959,7 +4959,7 @@ class Jl {
4959
4959
  });
4960
4960
  return { ...n.data, status_code: n.status };
4961
4961
  } catch (n) {
4962
- const r = E(n, "Failed to delete template section,");
4962
+ const r = S(n, "Failed to delete template section,");
4963
4963
  return {
4964
4964
  status_code: r.status_code,
4965
4965
  msg: r.message
@@ -4978,7 +4978,7 @@ class Jl {
4978
4978
  });
4979
4979
  return { ...s.data, status_code: s.status };
4980
4980
  } catch (r) {
4981
- return { status_code: E(r, "Failed to fetch document,").status_code };
4981
+ return { status_code: S(r, "Failed to fetch document,").status_code };
4982
4982
  }
4983
4983
  }
4984
4984
  async createDocument({
@@ -5002,7 +5002,7 @@ class Jl {
5002
5002
  });
5003
5003
  return { ...o.data, status_code: o.status };
5004
5004
  } catch (o) {
5005
- const a = E(o, "Failed to create document,");
5005
+ const a = S(o, "Failed to create document,");
5006
5006
  return {
5007
5007
  status_code: a.status_code,
5008
5008
  message: a.message
@@ -5033,7 +5033,7 @@ class Jl {
5033
5033
  });
5034
5034
  return { ...c.data, status_code: c.status };
5035
5035
  } catch (c) {
5036
- const l = E(c, "Failed to update document,");
5036
+ const l = S(c, "Failed to update document,");
5037
5037
  return {
5038
5038
  status_code: l.status_code,
5039
5039
  message: l.message
@@ -5048,7 +5048,7 @@ class Jl {
5048
5048
  });
5049
5049
  return { ...n.data, status_code: n.status };
5050
5050
  } catch (n) {
5051
- const r = E(n, "Failed to delete document,");
5051
+ const r = S(n, "Failed to delete document,");
5052
5052
  return {
5053
5053
  status_code: r.status_code,
5054
5054
  message: r.message
@@ -5067,7 +5067,7 @@ class Jl {
5067
5067
  });
5068
5068
  return { ...r.data, status_code: r.status };
5069
5069
  } catch (r) {
5070
- const s = E(r, "Failed to publish document,");
5070
+ const s = S(r, "Failed to publish document,");
5071
5071
  return {
5072
5072
  status_code: s.status_code,
5073
5073
  message: s.message
@@ -5096,7 +5096,7 @@ class Ql {
5096
5096
  message: `Past ${e} transactions fetched successfully.`
5097
5097
  };
5098
5098
  } catch (r) {
5099
- const s = E(r, "Failed to fetch transactions,");
5099
+ const s = S(r, "Failed to fetch transactions,");
5100
5100
  return { status_code: s.status_code, message: s.message };
5101
5101
  }
5102
5102
  }
@@ -5108,7 +5108,7 @@ class Ql {
5108
5108
  });
5109
5109
  return { ...n.data, status_code: n.status };
5110
5110
  } catch (n) {
5111
- const r = E(n, "Failed to delete transaction,");
5111
+ const r = S(n, "Failed to delete transaction,");
5112
5112
  return { status_code: r.status_code, message: r.message };
5113
5113
  }
5114
5114
  }
@@ -5126,7 +5126,7 @@ class Ql {
5126
5126
  });
5127
5127
  return { ...r.data, status_code: r.status };
5128
5128
  } catch (r) {
5129
- const s = E(r, "Failed to fetch session details,");
5129
+ const s = S(r, "Failed to fetch session details,");
5130
5130
  return {
5131
5131
  status_code: s.status_code,
5132
5132
  message: s.message
@@ -5141,7 +5141,7 @@ class Ql {
5141
5141
  });
5142
5142
  return { ...n.data, status_code: n.status };
5143
5143
  } catch (n) {
5144
- const r = E(n, "Failed to fetch suggested medications,");
5144
+ const r = S(n, "Failed to fetch suggested medications,");
5145
5145
  return {
5146
5146
  status_code: r.status_code,
5147
5147
  message: r.message
@@ -5160,7 +5160,7 @@ class Ql {
5160
5160
  });
5161
5161
  return { ...r.data, status_code: r.status };
5162
5162
  } catch (r) {
5163
- const s = E(r, "Failed to add session context,");
5163
+ const s = S(r, "Failed to add session context,");
5164
5164
  return {
5165
5165
  status_code: s.status_code,
5166
5166
  message: s.message
@@ -5179,7 +5179,7 @@ class Ql {
5179
5179
  });
5180
5180
  return { ...r.data, status_code: r.status };
5181
5181
  } catch (r) {
5182
- const s = E(r, "Failed to remove session context,");
5182
+ const s = S(r, "Failed to remove session context,");
5183
5183
  return {
5184
5184
  status_code: s.status_code,
5185
5185
  message: s.message
@@ -5200,7 +5200,7 @@ class Ql {
5200
5200
  });
5201
5201
  return { ...r.data, status_code: r.status };
5202
5202
  } catch (r) {
5203
- const s = E(r, "Failed to update result summary,");
5203
+ const s = S(r, "Failed to update result summary,");
5204
5204
  return {
5205
5205
  status_code: s.status_code,
5206
5206
  message: s.message
@@ -5216,7 +5216,7 @@ class Ql {
5216
5216
  });
5217
5217
  return { ...e.data, status_code: e.status };
5218
5218
  } catch (e) {
5219
- const n = E(e, "Failed to fetch configurations,");
5219
+ const n = S(e, "Failed to fetch configurations,");
5220
5220
  return { status_code: n.status_code, message: n.message };
5221
5221
  }
5222
5222
  }
@@ -5228,7 +5228,7 @@ class Ql {
5228
5228
  });
5229
5229
  return { ...e.data, status_code: e.status };
5230
5230
  } catch (e) {
5231
- const n = E(e, "Failed to fetch configurations,");
5231
+ const n = S(e, "Failed to fetch configurations,");
5232
5232
  return { status_code: n.status_code, message: n.message };
5233
5233
  }
5234
5234
  }
@@ -5241,7 +5241,7 @@ class Ql {
5241
5241
  });
5242
5242
  return { ...r.data, status_code: r.status };
5243
5243
  } catch (n) {
5244
- const r = E(n, "Failed to update config,");
5244
+ const r = S(n, "Failed to update config,");
5245
5245
  return {
5246
5246
  status_code: r.status_code,
5247
5247
  msg: r.message
@@ -5290,7 +5290,7 @@ class Ql {
5290
5290
  status_code: r.status
5291
5291
  };
5292
5292
  } catch (r) {
5293
- const s = E(r, "Failed to fetch doctor header/footer,");
5293
+ const s = S(r, "Failed to fetch doctor header/footer,");
5294
5294
  return {
5295
5295
  data: this.getDefaultHeaderFooterInfo(),
5296
5296
  status_code: s.status_code,
@@ -5325,7 +5325,7 @@ class Ql {
5325
5325
  status_code: n.status
5326
5326
  };
5327
5327
  } catch (n) {
5328
- const r = E(n, "Failed to fetch doctor clinics,");
5328
+ const r = S(n, "Failed to fetch doctor clinics,");
5329
5329
  return { data: null, status_code: r.status_code, message: r.message };
5330
5330
  }
5331
5331
  }
@@ -5435,20 +5435,20 @@ class eu {
5435
5435
  );
5436
5436
  return r.success ? (this.storedSession = r.data, this.txnID = r.data.session_id, this.tracker.setTransactionId(this.txnID), this.tracker.captureEvent("Session started", {
5437
5437
  txn_id: this.txnID,
5438
- status_code: r.httpStatus ?? y.SUCCESS
5438
+ status_code: r.httpStatus ?? _.SUCCESS
5439
5439
  }), {
5440
- status_code: r.httpStatus ?? y.SUCCESS,
5440
+ status_code: r.httpStatus ?? _.SUCCESS,
5441
5441
  message: "Transaction initialized successfully.",
5442
5442
  txn_id: r.data.session_id
5443
5443
  }) : {
5444
- error_code: r.error.code === "txn_limit_exceeded" ? S.TXN_LIMIT_EXCEEDED : S.TXN_INIT_FAILED,
5445
- status_code: r.error.httpStatus ?? y.INTERNAL_SERVER_ERROR,
5444
+ error_code: r.error.code === "txn_limit_exceeded" ? E.TXN_LIMIT_EXCEEDED : E.TXN_INIT_FAILED,
5445
+ status_code: r.error.httpStatus ?? _.INTERNAL_SERVER_ERROR,
5446
5446
  message: r.error.message || "Transaction initialization failed."
5447
5447
  };
5448
5448
  } catch (n) {
5449
5449
  return {
5450
- error_code: S.TXN_INIT_FAILED,
5451
- status_code: y.INTERNAL_SERVER_ERROR,
5450
+ error_code: E.TXN_INIT_FAILED,
5451
+ status_code: _.INTERNAL_SERVER_ERROR,
5452
5452
  message: `Failed to initialize transaction. ${n}`
5453
5453
  };
5454
5454
  }
@@ -5461,20 +5461,20 @@ class eu {
5461
5461
  const n = await this.allianceClient.startRecording(e);
5462
5462
  return n.success ? (this.storedSession = n.data, this.txnID = n.data.session_id, this.tracker.setTransactionId(this.txnID), this.tracker.captureEvent("Session started (v2)", {
5463
5463
  txn_id: this.txnID,
5464
- status_code: n.httpStatus ?? y.SUCCESS
5464
+ status_code: n.httpStatus ?? _.SUCCESS
5465
5465
  }), {
5466
- status_code: n.httpStatus ?? y.SUCCESS,
5466
+ status_code: n.httpStatus ?? _.SUCCESS,
5467
5467
  message: "Recording started successfully.",
5468
5468
  txn_id: n.data.session_id
5469
5469
  }) : {
5470
- error_code: n.error.code === "txn_limit_exceeded" ? S.TXN_LIMIT_EXCEEDED : S.TXN_INIT_FAILED,
5471
- status_code: n.error.httpStatus ?? y.INTERNAL_SERVER_ERROR,
5470
+ error_code: n.error.code === "txn_limit_exceeded" ? E.TXN_LIMIT_EXCEEDED : E.TXN_INIT_FAILED,
5471
+ status_code: n.error.httpStatus ?? _.INTERNAL_SERVER_ERROR,
5472
5472
  message: n.error.message || "Failed to start recording."
5473
5473
  };
5474
5474
  } catch (n) {
5475
5475
  return {
5476
- error_code: S.INTERNAL_SERVER_ERROR,
5477
- status_code: y.INTERNAL_SERVER_ERROR,
5476
+ error_code: E.INTERNAL_SERVER_ERROR,
5477
+ status_code: _.INTERNAL_SERVER_ERROR,
5478
5478
  message: `Failed to start recording. ${n}`
5479
5479
  };
5480
5480
  }
@@ -5484,10 +5484,11 @@ class eu {
5484
5484
  try {
5485
5485
  if (!this.storedSession)
5486
5486
  return {
5487
- error_code: S.TXN_STATUS_MISMATCH,
5488
- status_code: y.TXN_ERROR,
5487
+ error_code: E.TXN_STATUS_MISMATCH,
5488
+ status_code: _.TXN_ERROR,
5489
5489
  message: "Transaction not initialized. Call initTransaction() first."
5490
5490
  };
5491
+ this.allianceClient.clearRecordingState();
5491
5492
  const n = await this.allianceClient.startRecordingWithSession(
5492
5493
  this.storedSession,
5493
5494
  {
@@ -5496,18 +5497,18 @@ class eu {
5496
5497
  }
5497
5498
  );
5498
5499
  return n.success ? {
5499
- status_code: n.httpStatus ?? y.SUCCESS,
5500
+ status_code: n.httpStatus ?? _.SUCCESS,
5500
5501
  message: "Recording started successfully.",
5501
5502
  txn_id: this.txnID
5502
5503
  } : {
5503
- error_code: S.MICROPHONE,
5504
- status_code: n.error.httpStatus ?? y.INTERNAL_SERVER_ERROR,
5504
+ error_code: E.START_RECORDING_FAILED,
5505
+ status_code: n.error.httpStatus ?? _.INTERNAL_SERVER_ERROR,
5505
5506
  message: n.error.message || "Failed to start recording."
5506
5507
  };
5507
5508
  } catch (n) {
5508
5509
  return {
5509
- error_code: S.INTERNAL_SERVER_ERROR,
5510
- status_code: y.INTERNAL_SERVER_ERROR,
5510
+ error_code: E.INTERNAL_SERVER_ERROR,
5511
+ status_code: _.INTERNAL_SERVER_ERROR,
5511
5512
  message: `Failed to start recording. ${n}`
5512
5513
  };
5513
5514
  }
@@ -5529,18 +5530,18 @@ class eu {
5529
5530
  }
5530
5531
  );
5531
5532
  return r.success ? (this.storedSession = n, this.txnID = e.txn_id, this.tracker.setTransactionId(this.txnID), {
5532
- status_code: r.httpStatus ?? y.SUCCESS,
5533
+ status_code: r.httpStatus ?? _.SUCCESS,
5533
5534
  message: "Recording started for existing session.",
5534
5535
  txn_id: this.txnID
5535
5536
  }) : {
5536
- error_code: S.MICROPHONE,
5537
- status_code: r.error.httpStatus ?? y.INTERNAL_SERVER_ERROR,
5537
+ error_code: E.START_RECORDING_FAILED,
5538
+ status_code: r.error.httpStatus ?? _.INTERNAL_SERVER_ERROR,
5538
5539
  message: r.error.message || "Failed to start recording for existing session."
5539
5540
  };
5540
5541
  } catch (n) {
5541
5542
  return {
5542
- error_code: S.INTERNAL_SERVER_ERROR,
5543
- status_code: y.INTERNAL_SERVER_ERROR,
5543
+ error_code: E.INTERNAL_SERVER_ERROR,
5544
+ status_code: _.INTERNAL_SERVER_ERROR,
5544
5545
  message: `Failed to start recording for existing session. ${n}`
5545
5546
  };
5546
5547
  }
@@ -5548,14 +5549,14 @@ class eu {
5548
5549
  pauseRecording() {
5549
5550
  try {
5550
5551
  return this.allianceClient.pauseRecording(), {
5551
- status_code: y.SUCCESS,
5552
+ status_code: _.SUCCESS,
5552
5553
  message: "Recording paused.",
5553
5554
  is_paused: !0
5554
5555
  };
5555
5556
  } catch (e) {
5556
5557
  return {
5557
- error_code: S.INTERNAL_SERVER_ERROR,
5558
- status_code: y.INTERNAL_SERVER_ERROR,
5558
+ error_code: E.INTERNAL_SERVER_ERROR,
5559
+ status_code: _.INTERNAL_SERVER_ERROR,
5559
5560
  message: `Failed to pause recording. ${e}`
5560
5561
  };
5561
5562
  }
@@ -5563,14 +5564,14 @@ class eu {
5563
5564
  resumeRecording() {
5564
5565
  try {
5565
5566
  return this.allianceClient.resumeRecording(), {
5566
- status_code: y.SUCCESS,
5567
+ status_code: _.SUCCESS,
5567
5568
  message: "Recording resumed.",
5568
5569
  is_paused: !1
5569
5570
  };
5570
5571
  } catch (e) {
5571
5572
  return {
5572
- error_code: S.INTERNAL_SERVER_ERROR,
5573
- status_code: y.INTERNAL_SERVER_ERROR,
5573
+ error_code: E.INTERNAL_SERVER_ERROR,
5574
+ status_code: _.INTERNAL_SERVER_ERROR,
5574
5575
  message: `Failed to resume recording. ${e}`
5575
5576
  };
5576
5577
  }
@@ -5584,27 +5585,27 @@ class eu {
5584
5585
  total_files: e.data.totalFiles,
5585
5586
  failed_files: e.data.failedUploads.length
5586
5587
  }), this.storedSession = null, e.data.failedUploads.length > 0 ? {
5587
- error_code: S.AUDIO_UPLOAD_FAILED,
5588
- status_code: e.httpStatus ?? y.AUDIO_ERROR,
5588
+ error_code: E.AUDIO_UPLOAD_FAILED,
5589
+ status_code: e.httpStatus ?? _.AUDIO_ERROR,
5589
5590
  message: `Recording ended but ${e.data.failedUploads.length} audio file(s) failed to upload.`,
5590
5591
  failed_files: e.data.failedUploads,
5591
5592
  total_audio_files: e.data.endSessionResponse?.audio_files
5592
5593
  } : {
5593
- status_code: e.httpStatus ?? y.SUCCESS,
5594
+ status_code: e.httpStatus ?? _.SUCCESS,
5594
5595
  message: "Recording ended successfully.",
5595
5596
  total_audio_files: e.data.endSessionResponse?.audio_files
5596
5597
  }) : (this.tracker.captureEvent("Session end failed", {
5597
5598
  txn_id: this.txnID,
5598
5599
  error: e.error.message
5599
5600
  }), {
5600
- error_code: S.END_RECORDING_FAILED,
5601
- status_code: e.error.httpStatus ?? y.INTERNAL_SERVER_ERROR,
5601
+ error_code: E.END_RECORDING_FAILED,
5602
+ status_code: e.error.httpStatus ?? _.INTERNAL_SERVER_ERROR,
5602
5603
  message: e.error.message || "Failed to end recording."
5603
5604
  });
5604
5605
  } catch (e) {
5605
5606
  return {
5606
- error_code: S.INTERNAL_SERVER_ERROR,
5607
- status_code: y.INTERNAL_SERVER_ERROR,
5607
+ error_code: E.INTERNAL_SERVER_ERROR,
5608
+ status_code: _.INTERNAL_SERVER_ERROR,
5608
5609
  message: `Failed to end recording. ${e}`
5609
5610
  };
5610
5611
  }
@@ -5614,34 +5615,34 @@ class eu {
5614
5615
  if (!r)
5615
5616
  return {
5616
5617
  success: !1,
5617
- status_code: y.TXN_ERROR,
5618
+ status_code: _.TXN_ERROR,
5618
5619
  error: new mn(
5619
5620
  "No session ID available. Call initTransaction() first or pass a sessionId.",
5620
- S.TXN_STATUS_MISMATCH
5621
+ E.TXN_STATUS_MISMATCH
5621
5622
  )
5622
5623
  };
5623
5624
  const s = await this.allianceClient.getSessionStatus(r, n);
5624
5625
  return {
5625
5626
  ...s,
5626
- status_code: s.success ? s.httpStatus ?? y.SUCCESS : s.error.httpStatus ?? y.INTERNAL_SERVER_ERROR
5627
+ status_code: s.success ? s.httpStatus ?? _.SUCCESS : s.error.httpStatus ?? _.INTERNAL_SERVER_ERROR
5627
5628
  };
5628
5629
  }
5629
5630
  async retryUploadRecording() {
5630
5631
  try {
5631
5632
  const e = await this.allianceClient.retryFailedUploads();
5632
5633
  return e.success ? {
5633
- status_code: e.httpStatus ?? y.SUCCESS,
5634
+ status_code: e.httpStatus ?? _.SUCCESS,
5634
5635
  message: `Retried ${e.data.retried} files. ${e.data.succeeded} succeeded.`,
5635
5636
  failed_files: e.data.stillFailed
5636
5637
  } : {
5637
- error_code: S.AUDIO_UPLOAD_FAILED,
5638
- status_code: e.error.httpStatus ?? y.INTERNAL_SERVER_ERROR,
5638
+ error_code: E.AUDIO_UPLOAD_FAILED,
5639
+ status_code: e.error.httpStatus ?? _.INTERNAL_SERVER_ERROR,
5639
5640
  message: e.error.message || "Retry upload failed."
5640
5641
  };
5641
5642
  } catch (e) {
5642
5643
  return {
5643
- error_code: S.INTERNAL_SERVER_ERROR,
5644
- status_code: y.INTERNAL_SERVER_ERROR,
5644
+ error_code: E.INTERNAL_SERVER_ERROR,
5645
+ status_code: _.INTERNAL_SERVER_ERROR,
5645
5646
  message: `Failed to retry upload. ${e}`
5646
5647
  };
5647
5648
  }
@@ -5651,43 +5652,38 @@ class eu {
5651
5652
  if (!n)
5652
5653
  return {
5653
5654
  success: !1,
5654
- status_code: y.TXN_ERROR,
5655
+ status_code: _.TXN_ERROR,
5655
5656
  error: new mn(
5656
5657
  "No session ID available. Call initTransaction() first or pass a sessionId.",
5657
- S.TXN_STATUS_MISMATCH
5658
+ E.TXN_STATUS_MISMATCH
5658
5659
  )
5659
5660
  };
5660
5661
  const r = await this.allianceClient.cancelSession(n);
5661
5662
  return this.storedSession = null, this.txnID = "", {
5662
5663
  ...r,
5663
- status_code: r.success ? r.httpStatus ?? y.SUCCESS : r.error.httpStatus ?? y.INTERNAL_SERVER_ERROR
5664
+ status_code: r.success ? r.httpStatus ?? _.SUCCESS : r.error.httpStatus ?? _.INTERNAL_SERVER_ERROR
5664
5665
  };
5665
5666
  }
5666
5667
  async processPreRecordedAudio({
5667
- uploadUrl: e,
5668
- audioFile: n
5668
+ upload: e,
5669
+ audioFile: n,
5670
+ audioFileName: r = "audio_1.mp3"
5669
5671
  }) {
5670
5672
  try {
5671
- const r = e.endsWith("/") ? `${e}audio_1.mp3` : `${e}/audio_1.mp3`, s = await this.transport.request({
5672
- method: "POST",
5673
- url: r,
5674
- body: n,
5675
- headers: { "Content-Type": "audio/mp3" }
5676
- });
5677
- return s.status < 200 || s.status >= 300 ? {
5678
- error_code: S.AUDIO_UPLOAD_FAILED,
5679
- status_code: s.status,
5680
- message: `Audio upload failed with status: ${s.status}`
5681
- } : {
5682
- status_code: y.SUCCESS,
5673
+ const s = await this.allianceClient.uploadAudioFile(n, r, e);
5674
+ return s.success ? {
5675
+ status_code: s.httpStatus ?? _.SUCCESS,
5683
5676
  message: "Audio file uploaded successfully."
5677
+ } : {
5678
+ error_code: E.AUDIO_UPLOAD_FAILED,
5679
+ status_code: s.error.httpStatus ?? _.INTERNAL_SERVER_ERROR,
5680
+ message: s.error.message || "Audio upload failed."
5684
5681
  };
5685
- } catch (r) {
5686
- const s = E(r, "Audio upload failed:");
5682
+ } catch (s) {
5687
5683
  return {
5688
- error_code: s.error_code,
5689
- status_code: s.status_code,
5690
- message: s.message
5684
+ error_code: E.INTERNAL_SERVER_ERROR,
5685
+ status_code: _.INTERNAL_SERVER_ERROR,
5686
+ message: `Failed to upload audio file. ${s}`
5691
5687
  };
5692
5688
  }
5693
5689
  }
@@ -5695,8 +5691,8 @@ class eu {
5695
5691
  try {
5696
5692
  if (!this.txnID)
5697
5693
  return {
5698
- error_code: S.TXN_STATUS_MISMATCH,
5699
- status_code: y.TXN_ERROR,
5694
+ error_code: E.TXN_STATUS_MISMATCH,
5695
+ status_code: _.TXN_ERROR,
5700
5696
  message: "Transaction not initialized."
5701
5697
  };
5702
5698
  const e = await this.transport.request({
@@ -5705,15 +5701,15 @@ class eu {
5705
5701
  body: { audio_files: [] }
5706
5702
  });
5707
5703
  return e.status !== 200 ? {
5708
- error_code: S.TXN_COMMIT_FAILED,
5704
+ error_code: E.TXN_COMMIT_FAILED,
5709
5705
  status_code: e.status,
5710
5706
  message: e.data.message || "Transaction commit failed."
5711
5707
  } : {
5712
- status_code: y.SUCCESS,
5708
+ status_code: _.SUCCESS,
5713
5709
  message: e.data.message || "Transaction committed successfully."
5714
5710
  };
5715
5711
  } catch (e) {
5716
- const n = E(e, "Failed to commit transaction,");
5712
+ const n = S(e, "Failed to commit transaction,");
5717
5713
  return {
5718
5714
  error_code: n.error_code,
5719
5715
  status_code: n.status_code,
@@ -5725,8 +5721,8 @@ class eu {
5725
5721
  try {
5726
5722
  if (!this.txnID)
5727
5723
  return {
5728
- error_code: S.TXN_STATUS_MISMATCH,
5729
- status_code: y.TXN_ERROR,
5724
+ error_code: E.TXN_STATUS_MISMATCH,
5725
+ status_code: _.TXN_ERROR,
5730
5726
  message: "Transaction not initialized."
5731
5727
  };
5732
5728
  const e = await this.transport.request({
@@ -5739,7 +5735,7 @@ class eu {
5739
5735
  message: e.data.message || "Transaction stopped."
5740
5736
  };
5741
5737
  } catch (e) {
5742
- const n = E(e, "Failed to stop transaction,");
5738
+ const n = S(e, "Failed to stop transaction,");
5743
5739
  return {
5744
5740
  error_code: n.error_code,
5745
5741
  status_code: n.status_code,
@@ -5793,7 +5789,7 @@ class ru {
5793
5789
  try {
5794
5790
  return await this.fetchV3Status(e);
5795
5791
  } catch (n) {
5796
- const r = E(n, "Failed to fetch output templates,");
5792
+ const r = S(n, "Failed to fetch output templates,");
5797
5793
  return { status_code: r.status_code, message: r.message };
5798
5794
  }
5799
5795
  }
@@ -5801,7 +5797,7 @@ class ru {
5801
5797
  try {
5802
5798
  return await this.fetchV3Status(e, "transcript=true", 15e3);
5803
5799
  } catch (n) {
5804
- const r = E(n, "Failed to fetch output transcription,");
5800
+ const r = S(n, "Failed to fetch output transcription,");
5805
5801
  return { status_code: r.status_code, message: r.message };
5806
5802
  }
5807
5803
  }
@@ -5812,9 +5808,9 @@ class ru {
5812
5808
  url: `${this.hosts.voiceV3}/transcript/${e}/${n}`,
5813
5809
  timeout: 1e4
5814
5810
  });
5815
- return r.status >= 400 ? { success: !1, error: r.data?.error?.code ?? S.UNKNOWN_ERROR } : { success: !0, data: r.data };
5811
+ return r.status >= 400 ? { success: !1, error: r.data?.error?.code ?? E.UNKNOWN_ERROR } : { success: !0, data: r.data };
5816
5812
  } catch (r) {
5817
- return { success: !1, error: E(r, "Failed to fetch chunk transcript,").error_code };
5813
+ return { success: !1, error: S(r, "Failed to fetch chunk transcript,").error_code };
5818
5814
  }
5819
5815
  }
5820
5816
  async pollSessionOutput(e) {
@@ -5907,7 +5903,7 @@ class ru {
5907
5903
  status_code: i.status
5908
5904
  };
5909
5905
  } catch (s) {
5910
- const i = E(s, "Failed to fetch status,");
5906
+ const i = S(s, "Failed to fetch status,");
5911
5907
  return { status_code: i.status_code, message: i.message };
5912
5908
  }
5913
5909
  }
@@ -6229,7 +6225,7 @@ var ou = ((t = "") => {
6229
6225
  return !1;
6230
6226
  }
6231
6227
  })(), I = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (t) => new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: ue((t) => new RegExp(`^ {0,${t}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)), hrRegex: ue((t) => new RegExp(`^ {0,${t}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)), fencesBeginRegex: ue((t) => new RegExp(`^ {0,${t}}(?:\`\`\`|~~~)`)), headingBeginRegex: ue((t) => new RegExp(`^ {0,${t}}#`)), htmlBeginRegex: ue((t) => new RegExp(`^ {0,${t}}<(?:[a-z].*>|!--)`, "i")), blockquoteBeginRegex: ue((t) => new RegExp(`^ {0,${t}}>`)) }, au = /^(?:[ \t]*(?:\n|$))+/, cu = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, lu = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, $e = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, uu = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, cn = / {0,3}(?:[*+-]|\d{1,9}[.)])/, bs = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Ss = b(bs).replace(/bull/g, cn).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), du = b(bs).replace(/bull/g, cn).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), ln = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, pu = /^[^\n]+/, un = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, hu = b(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", un).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), fu = b(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, cn).getRegex(), lt = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", dn = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, gu = b("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", dn).replace("tag", lt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), ks = b(ln).replace("hr", $e).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", lt).getRegex(), mu = b(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", ks).getRegex(), pn = { blockquote: mu, code: cu, def: hu, fences: lu, heading: uu, hr: $e, html: gu, lheading: Ss, list: fu, newline: au, paragraph: ks, table: ne, text: pu }, mr = b("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", $e).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", lt).getRegex(), _u = { ...pn, lheading: du, table: mr, paragraph: b(ln).replace("hr", $e).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", mr).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", lt).getRegex() }, yu = { ...pn, html: b(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", dn).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: ne, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: b(ln).replace("hr", $e).replace("heading", ` *#{1,6} *[^
6232
- ]`).replace("lheading", Ss).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Eu = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, bu = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, xs = /^( {2,}|\\)\n(?!\s*$)/, Su = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Ee = /[\p{P}\p{S}]/u, ut = /[\s\p{P}\p{S}]/u, hn = /[^\s\p{P}\p{S}]/u, ku = b(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, ut).getRegex(), Rs = /(?!~)[\p{P}\p{S}]/u, xu = /(?!~)[\s\p{P}\p{S}]/u, Ru = /(?:[^\s\p{P}\p{S}]|~)/u, wu = b(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", ou ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), ws = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, Tu = b(ws, "u").replace(/punct/g, Ee).getRegex(), vu = b(ws, "u").replace(/punct/g, Rs).getRegex(), Ts = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Iu = b(Ts, "gu").replace(/notPunctSpace/g, hn).replace(/punctSpace/g, ut).replace(/punct/g, Ee).getRegex(), Cu = b(Ts, "gu").replace(/notPunctSpace/g, Ru).replace(/punctSpace/g, xu).replace(/punct/g, Rs).getRegex(), Nu = b("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, hn).replace(/punctSpace/g, ut).replace(/punct/g, Ee).getRegex(), Au = b(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, Ee).getRegex(), Du = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", Ou = b(Du, "gu").replace(/notPunctSpace/g, hn).replace(/punctSpace/g, ut).replace(/punct/g, Ee).getRegex(), $u = b(/\\(punct)/, "gu").replace(/punct/g, Ee).getRegex(), Pu = b(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Lu = b(dn).replace("(?:-->|$)", "-->").getRegex(), Mu = b("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Lu).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Ze = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, Fu = b(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", Ze).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), vs = b(/^!?\[(label)\]\[(ref)\]/).replace("label", Ze).replace("ref", un).getRegex(), Is = b(/^!?\[(ref)\](?:\[\])?/).replace("ref", un).getRegex(), Uu = b("reflink|nolink(?!\\()", "g").replace("reflink", vs).replace("nolink", Is).getRegex(), _r = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, fn = { _backpedal: ne, anyPunctuation: $u, autolink: Pu, blockSkip: wu, br: xs, code: bu, del: ne, delLDelim: ne, delRDelim: ne, emStrongLDelim: Tu, emStrongRDelimAst: Iu, emStrongRDelimUnd: Nu, escape: Eu, link: Fu, nolink: Is, punctuation: ku, reflink: vs, reflinkSearch: Uu, tag: Mu, text: Su, url: ne }, Bu = { ...fn, link: b(/^!?\[(label)\]\((.*?)\)/).replace("label", Ze).getRegex(), reflink: b(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Ze).getRegex() }, Ht = { ...fn, emStrongRDelimAst: Cu, emStrongLDelim: vu, delLDelim: Au, delRDelim: Ou, url: b(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", _r).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: b(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", _r).getRegex() }, Hu = { ...Ht, br: b(xs).replace("{2,}", "*").getRegex(), text: b(Ht.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, Ue = { normal: pn, gfm: _u, pedantic: yu }, xe = { normal: fn, gfm: Ht, breaks: Hu, pedantic: Bu }, zu = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, yr = (t) => zu[t];
6228
+ ]`).replace("lheading", Ss).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Eu = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, bu = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Rs = /^( {2,}|\\)\n(?!\s*$)/, Su = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Ee = /[\p{P}\p{S}]/u, ut = /[\s\p{P}\p{S}]/u, hn = /[^\s\p{P}\p{S}]/u, ku = b(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, ut).getRegex(), xs = /(?!~)[\p{P}\p{S}]/u, Ru = /(?!~)[\s\p{P}\p{S}]/u, xu = /(?:[^\s\p{P}\p{S}]|~)/u, wu = b(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", ou ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), ws = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, Tu = b(ws, "u").replace(/punct/g, Ee).getRegex(), vu = b(ws, "u").replace(/punct/g, xs).getRegex(), Ts = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Iu = b(Ts, "gu").replace(/notPunctSpace/g, hn).replace(/punctSpace/g, ut).replace(/punct/g, Ee).getRegex(), Cu = b(Ts, "gu").replace(/notPunctSpace/g, xu).replace(/punctSpace/g, Ru).replace(/punct/g, xs).getRegex(), Nu = b("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, hn).replace(/punctSpace/g, ut).replace(/punct/g, Ee).getRegex(), Au = b(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, Ee).getRegex(), Du = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", Ou = b(Du, "gu").replace(/notPunctSpace/g, hn).replace(/punctSpace/g, ut).replace(/punct/g, Ee).getRegex(), $u = b(/\\(punct)/, "gu").replace(/punct/g, Ee).getRegex(), Lu = b(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Pu = b(dn).replace("(?:-->|$)", "-->").getRegex(), Mu = b("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Pu).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Ze = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, Fu = b(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", Ze).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), vs = b(/^!?\[(label)\]\[(ref)\]/).replace("label", Ze).replace("ref", un).getRegex(), Is = b(/^!?\[(ref)\](?:\[\])?/).replace("ref", un).getRegex(), Uu = b("reflink|nolink(?!\\()", "g").replace("reflink", vs).replace("nolink", Is).getRegex(), _r = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, fn = { _backpedal: ne, anyPunctuation: $u, autolink: Lu, blockSkip: wu, br: Rs, code: bu, del: ne, delLDelim: ne, delRDelim: ne, emStrongLDelim: Tu, emStrongRDelimAst: Iu, emStrongRDelimUnd: Nu, escape: Eu, link: Fu, nolink: Is, punctuation: ku, reflink: vs, reflinkSearch: Uu, tag: Mu, text: Su, url: ne }, Bu = { ...fn, link: b(/^!?\[(label)\]\((.*?)\)/).replace("label", Ze).getRegex(), reflink: b(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Ze).getRegex() }, Ht = { ...fn, emStrongRDelimAst: Cu, emStrongLDelim: vu, delLDelim: Au, delRDelim: Ou, url: b(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", _r).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: b(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", _r).getRegex() }, Hu = { ...Ht, br: b(Rs).replace("{2,}", "*").getRegex(), text: b(Ht.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, Ue = { normal: pn, gfm: _u, pedantic: yu }, Re = { normal: fn, gfm: Ht, breaks: Hu, pedantic: Bu }, zu = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, yr = (t) => zu[t];
6233
6229
  function U(t, e) {
6234
6230
  if (e) {
6235
6231
  if (I.escapeTest.test(t)) return t.replace(I.escapeReplace, yr);
@@ -6624,7 +6620,7 @@ ${d}` : d;
6624
6620
  return { type: "text", raw: e[0], text: e[0], escaped: n };
6625
6621
  }
6626
6622
  }
6627
- }, L = class zt {
6623
+ }, P = class zt {
6628
6624
  constructor(e) {
6629
6625
  w(this, "tokens");
6630
6626
  w(this, "options");
@@ -6632,11 +6628,11 @@ ${d}` : d;
6632
6628
  w(this, "inlineQueue");
6633
6629
  w(this, "tokenizer");
6634
6630
  this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || ce, this.options.tokenizer = this.options.tokenizer || new Je(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
6635
- let n = { other: I, block: Ue.normal, inline: xe.normal };
6636
- this.options.pedantic ? (n.block = Ue.pedantic, n.inline = xe.pedantic) : this.options.gfm && (n.block = Ue.gfm, this.options.breaks ? n.inline = xe.breaks : n.inline = xe.gfm), this.tokenizer.rules = n;
6631
+ let n = { other: I, block: Ue.normal, inline: Re.normal };
6632
+ this.options.pedantic ? (n.block = Ue.pedantic, n.inline = Re.pedantic) : this.options.gfm && (n.block = Ue.gfm, this.options.breaks ? n.inline = Re.breaks : n.inline = Re.gfm), this.tokenizer.rules = n;
6637
6633
  }
6638
6634
  static get rules() {
6639
- return { block: Ue, inline: xe };
6635
+ return { block: Ue, inline: Re };
6640
6636
  }
6641
6637
  static lex(e, n) {
6642
6638
  return new zt(n).lex(e);
@@ -7161,7 +7157,7 @@ ${t}</tr>
7161
7157
  return t;
7162
7158
  }
7163
7159
  provideLexer(t = this.block) {
7164
- return t ? L.lex : L.lexInline;
7160
+ return t ? P.lex : P.lexInline;
7165
7161
  }
7166
7162
  provideParser(t = this.block) {
7167
7163
  return t ? M.parse : M.parseInline;
@@ -7175,7 +7171,7 @@ ${t}</tr>
7175
7171
  w(this, "Parser", M);
7176
7172
  w(this, "Renderer", Qe);
7177
7173
  w(this, "TextRenderer", gn);
7178
- w(this, "Lexer", L);
7174
+ w(this, "Lexer", P);
7179
7175
  w(this, "Tokenizer", Je);
7180
7176
  w(this, "Hooks", we);
7181
7177
  this.use(...t);
@@ -7287,7 +7283,7 @@ ${t}</tr>
7287
7283
  return this.defaults = { ...this.defaults, ...t }, this;
7288
7284
  }
7289
7285
  lexer(t, e) {
7290
- return L.lex(t, e ?? this.defaults);
7286
+ return P.lex(t, e ?? this.defaults);
7291
7287
  }
7292
7288
  parser(t, e) {
7293
7289
  return M.parse(t, e ?? this.defaults);
@@ -7299,14 +7295,14 @@ ${t}</tr>
7299
7295
  if (typeof e > "u" || e === null) return i(new Error("marked(): input parameter is undefined or null"));
7300
7296
  if (typeof e != "string") return i(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(e) + ", string expected"));
7301
7297
  if (s.hooks && (s.hooks.options = s, s.hooks.block = t), s.async) return (async () => {
7302
- let o = s.hooks ? await s.hooks.preprocess(e) : e, a = await (s.hooks ? await s.hooks.provideLexer(t) : t ? L.lex : L.lexInline)(o, s), c = s.hooks ? await s.hooks.processAllTokens(a) : a;
7298
+ let o = s.hooks ? await s.hooks.preprocess(e) : e, a = await (s.hooks ? await s.hooks.provideLexer(t) : t ? P.lex : P.lexInline)(o, s), c = s.hooks ? await s.hooks.processAllTokens(a) : a;
7303
7299
  s.walkTokens && await Promise.all(this.walkTokens(c, s.walkTokens));
7304
7300
  let l = await (s.hooks ? await s.hooks.provideParser(t) : t ? M.parse : M.parseInline)(c, s);
7305
7301
  return s.hooks ? await s.hooks.postprocess(l) : l;
7306
7302
  })().catch(i);
7307
7303
  try {
7308
7304
  s.hooks && (e = s.hooks.preprocess(e));
7309
- let o = (s.hooks ? s.hooks.provideLexer(t) : t ? L.lex : L.lexInline)(e, s);
7305
+ let o = (s.hooks ? s.hooks.provideLexer(t) : t ? P.lex : P.lexInline)(e, s);
7310
7306
  s.hooks && (o = s.hooks.processAllTokens(o)), s.walkTokens && this.walkTokens(o, s.walkTokens);
7311
7307
  let a = (s.hooks ? s.hooks.provideParser(t) : t ? M.parse : M.parseInline)(o, s);
7312
7308
  return s.hooks && (a = s.hooks.postprocess(a)), a;
@@ -7327,37 +7323,37 @@ Please report this to https://github.com/markedjs/marked.`, t) {
7327
7323
  };
7328
7324
  }
7329
7325
  }, ie = new Gu();
7330
- function x(t, e) {
7326
+ function R(t, e) {
7331
7327
  return ie.parse(t, e);
7332
7328
  }
7333
- x.options = x.setOptions = function(t) {
7334
- return ie.setOptions(t), x.defaults = ie.defaults, Es(x.defaults), x;
7329
+ R.options = R.setOptions = function(t) {
7330
+ return ie.setOptions(t), R.defaults = ie.defaults, Es(R.defaults), R;
7335
7331
  };
7336
- x.getDefaults = an;
7337
- x.defaults = ce;
7338
- x.use = function(...t) {
7339
- return ie.use(...t), x.defaults = ie.defaults, Es(x.defaults), x;
7332
+ R.getDefaults = an;
7333
+ R.defaults = ce;
7334
+ R.use = function(...t) {
7335
+ return ie.use(...t), R.defaults = ie.defaults, Es(R.defaults), R;
7340
7336
  };
7341
- x.walkTokens = function(t, e) {
7337
+ R.walkTokens = function(t, e) {
7342
7338
  return ie.walkTokens(t, e);
7343
7339
  };
7344
- x.parseInline = ie.parseInline;
7345
- x.Parser = M;
7346
- x.parser = M.parse;
7347
- x.Renderer = Qe;
7348
- x.TextRenderer = gn;
7349
- x.Lexer = L;
7350
- x.lexer = L.lex;
7351
- x.Tokenizer = Je;
7352
- x.Hooks = we;
7353
- x.parse = x;
7354
- x.options;
7355
- x.setOptions;
7356
- x.use;
7357
- x.walkTokens;
7358
- x.parseInline;
7340
+ R.parseInline = ie.parseInline;
7341
+ R.Parser = M;
7342
+ R.parser = M.parse;
7343
+ R.Renderer = Qe;
7344
+ R.TextRenderer = gn;
7345
+ R.Lexer = P;
7346
+ R.lexer = P.lex;
7347
+ R.Tokenizer = Je;
7348
+ R.Hooks = we;
7349
+ R.parse = R;
7350
+ R.options;
7351
+ R.setOptions;
7352
+ R.use;
7353
+ R.walkTokens;
7354
+ R.parseInline;
7359
7355
  M.parse;
7360
- L.lex;
7356
+ P.lex;
7361
7357
  var g = /* @__PURE__ */ ((t) => (t.COLLAPSED = "collapsed", t.RECORDING = "recording", t.PAUSED = "paused", t.PROCESSING = "processing", t.DONE = "done", t.ERROR = "error", t))(g || {});
7362
7358
  const Wu = {
7363
7359
  [g.COLLAPSED]: [g.RECORDING, g.ERROR],
@@ -7855,7 +7851,7 @@ function Zu(t, e) {
7855
7851
  e.removeEventListener("mousedown", i), e.removeEventListener("touchstart", i), a();
7856
7852
  };
7857
7853
  }
7858
- const Ju = '<svg viewBox="0 0 24 24"><rect x="6" y="4" width="4" height="16"/><rect x="14" y="4" width="4" height="16"/></svg>', Qu = '<svg viewBox="0 0 24 24"><polygon points="8,4 20,12 8,20"/></svg>', xr = '<svg viewBox="0 0 24 24"><rect x="5" y="5" width="14" height="14" rx="2"/></svg>', Rr = '<svg viewBox="0 0 24 24"><polyline points="20 6 9 17 4 12"/></svg>', Be = '<svg viewBox="0 0 24 24"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>', ed = 20, td = 14, xt = 3, Rt = 2;
7854
+ const Ju = '<svg viewBox="0 0 24 24"><rect x="6" y="4" width="4" height="16"/><rect x="14" y="4" width="4" height="16"/></svg>', Qu = '<svg viewBox="0 0 24 24"><polygon points="8,4 20,12 8,20"/></svg>', Rr = '<svg viewBox="0 0 24 24"><rect x="5" y="5" width="14" height="14" rx="2"/></svg>', xr = '<svg viewBox="0 0 24 24"><polyline points="20 6 9 17 4 12"/></svg>', Be = '<svg viewBox="0 0 24 24"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>', ed = 20, td = 14, Rt = 3, xt = 2;
7859
7855
  class nd {
7860
7856
  constructor(e, n, r, s) {
7861
7857
  this.cleanupDrag = null, this.animationId = null, this.waveformBars = [], this.actions = s, this.orientation = r, this.host = document.createElement("eka-scribe-widget"), this.shadow = this.host.attachShadow({ mode: "closed" });
@@ -7903,7 +7899,7 @@ class nd {
7903
7899
  i.className = "timer", i.textContent = e, n.appendChild(i);
7904
7900
  const o = this.createButton("btn btn-play-pause", Ju);
7905
7901
  o.addEventListener("click", this.actions.onPause), n.appendChild(o);
7906
- const a = this.createButton("btn btn-stop", xr);
7902
+ const a = this.createButton("btn btn-stop", Rr);
7907
7903
  a.addEventListener("click", this.actions.onStop), n.appendChild(a), this.contentEl.appendChild(n), this.bindDrag(n), this.startAnimation();
7908
7904
  }
7909
7905
  renderPaused(e) {
@@ -7917,7 +7913,7 @@ class nd {
7917
7913
  i.className = "timer", i.textContent = e, n.appendChild(i);
7918
7914
  const o = this.createButton("btn btn-play-pause", Qu);
7919
7915
  o.addEventListener("click", this.actions.onResume), n.appendChild(o);
7920
- const a = this.createButton("btn btn-stop", xr);
7916
+ const a = this.createButton("btn btn-stop", Rr);
7921
7917
  a.addEventListener("click", this.actions.onStop), n.appendChild(a), this.contentEl.appendChild(n), this.bindDrag(n);
7922
7918
  }
7923
7919
  renderProcessing() {
@@ -7932,7 +7928,7 @@ class nd {
7932
7928
  this.widgetEl.classList.remove("hidden"), this.contentEl.innerHTML = "";
7933
7929
  const e = document.createElement("div");
7934
7930
  e.className = "pill", e.innerHTML = `
7935
- <div class="done-icon">${Rr}</div>
7931
+ <div class="done-icon">${xr}</div>
7936
7932
  <span class="done-text">Notes ready</span>
7937
7933
  `;
7938
7934
  const n = document.createElement("button");
@@ -7954,7 +7950,7 @@ class nd {
7954
7950
  this.stopAnimation(), this.widgetEl.classList.remove("hidden"), this.contentEl.innerHTML = "", this.contentEl.className = "content-expanded";
7955
7951
  const n = document.createElement("div");
7956
7952
  n.className = "pill", n.innerHTML = `
7957
- <div class="done-icon">${Rr}</div>
7953
+ <div class="done-icon">${xr}</div>
7958
7954
  <span class="done-text">Notes ready</span>
7959
7955
  `;
7960
7956
  const r = document.createElement("button");
@@ -7986,7 +7982,7 @@ class nd {
7986
7982
  }
7987
7983
  // ─── Waveform ─────────────────────────────────────────────────────────────
7988
7984
  createWaveform() {
7989
- const e = this.orientation === "vertical" ? td : ed, n = 28, r = e * (xt + Rt) - Rt, s = n, i = document.createElementNS("http://www.w3.org/2000/svg", "svg");
7985
+ const e = this.orientation === "vertical" ? td : ed, n = 28, r = e * (Rt + xt) - xt, s = n, i = document.createElementNS("http://www.w3.org/2000/svg", "svg");
7990
7986
  i.setAttribute("width", String(r)), i.setAttribute("height", String(s)), i.setAttribute("viewBox", `0 0 ${r} ${s}`);
7991
7987
  const o = [], a = n * 0.4;
7992
7988
  for (let c = 0; c < e; c++) {
@@ -7995,8 +7991,8 @@ class nd {
7995
7991
  "rect"
7996
7992
  );
7997
7993
  l.setAttribute("fill", "#2563EB"), l.setAttribute("rx", "1.5");
7998
- const d = c * (xt + Rt);
7999
- l.setAttribute("x", String(d)), l.setAttribute("y", String((n - a) / 2)), l.setAttribute("width", String(xt)), l.setAttribute("height", String(a)), l.style.opacity = "0.35", i.appendChild(l), o.push(l);
7994
+ const d = c * (Rt + xt);
7995
+ l.setAttribute("x", String(d)), l.setAttribute("y", String((n - a) / 2)), l.setAttribute("width", String(Rt)), l.setAttribute("height", String(a)), l.style.opacity = "0.35", i.appendChild(l), o.push(l);
8000
7996
  }
8001
7997
  return { svg: i, bars: o };
8002
7998
  }
@@ -8189,7 +8185,7 @@ class rd {
8189
8185
  }
8190
8186
  if (s) {
8191
8187
  const i = typeof s == "string" ? s : JSON.stringify(s, null, 2);
8192
- r.notesHtml = x.parse(i);
8188
+ r.notesHtml = R.parse(i);
8193
8189
  }
8194
8190
  }
8195
8191
  return r;
@@ -8204,7 +8200,7 @@ const O = class O {
8204
8200
  flavour: e.flavour,
8205
8201
  onUnauthorized: () => this.handleUnauthorized()
8206
8202
  };
8207
- if (e.mode === "ipc" && e.ipcBridge ? this.transport = new Fs(n, e.ipcBridge) : this.transport = new Ls(n), e.enableTracking && (this.tracker.init(e.env), e.flavour && this.tracker.setUser(e.flavour)), !e.allianceConfig?.baseUrl)
8203
+ if (e.mode === "ipc" && e.ipcBridge ? this.transport = new Fs(n, e.ipcBridge) : this.transport = new Ps(n), e.enableTracking && (this.tracker.init(e.env), e.flavour && this.tracker.setUser(e.flavour)), !e.allianceConfig?.baseUrl)
8208
8204
  throw new Error("[EkaScribe] allianceConfig.baseUrl is required.");
8209
8205
  this.allianceClient = new $s({
8210
8206
  baseUrl: e.allianceConfig.baseUrl,
@@ -8287,7 +8283,7 @@ const O = class O {
8287
8283
  *
8288
8284
  * Client flow:
8289
8285
  * 1. createSession() — via sessions.createSession()
8290
- * 2. processPreRecordedAudio(uploadUrl, audioFile, audioFileName) — this method
8286
+ * 2. processPreRecordedAudio(upload, audioFile, audioFileName) — this method
8291
8287
  * 3. endSession — via sessions.endSession()
8292
8288
  */
8293
8289
  processPreRecordedAudio(e) {
@@ -8362,7 +8358,7 @@ export {
8362
8358
  Zl as CALLBACK_TYPE,
8363
8359
  v as COMPATIBILITY_TEST_STATUS,
8364
8360
  ee as COMPATIBILITY_TEST_TYPE,
8365
- S as ERROR_CODE,
8361
+ E as ERROR_CODE,
8366
8362
  Yl as PROCESSING_STATUS,
8367
8363
  Kl as RESULT_STATUS,
8368
8364
  Xl as TEMPLATE_ID,