@eka-care/ekascribe-ts-sdk 3.0.54 → 3.0.55

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.d.ts CHANGED
@@ -278,8 +278,6 @@ export declare enum RESULT_STATUS {
278
278
 
279
279
  export { SDKResult }
280
280
 
281
- export { SessionUploadInfo }
282
-
283
281
  declare class SessionUtils {
284
282
  private transport;
285
283
  private hosts;
package/dist/index.mjs CHANGED
@@ -2,7 +2,7 @@ var Ls = Object.defineProperty;
2
2
  var Ms = (t, e, n) => e in t ? Ls(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
3
  var w = (t, e, n) => Ms(t, typeof e != "symbol" ? e + "" : e, n);
4
4
  import { SessionStatus as Fs, ScribeError as yn, UploadError as Us, ScribeClient as Bs, TransportMode as En } from "med-scribe-alliance-ts-sdk";
5
- import { createWorkerBlobUrl as Rd, getWorkerUrl as wd } from "med-scribe-alliance-ts-sdk";
5
+ import { createWorkerBlobUrl as kd, getWorkerUrl as xd } from "med-scribe-alliance-ts-sdk";
6
6
  function Ir() {
7
7
  try {
8
8
  return Intl.DateTimeFormat().resolvedOptions().timeZone || "UTC";
@@ -309,8 +309,8 @@ const m = {
309
309
  warn: ei,
310
310
  /** Log an error. */
311
311
  error: ti
312
- }, Nr = 50, oe = "?", bn = /\(error: (.*)\)/, Sn = /captureMessage|captureException/;
313
- function Dr(...t) {
312
+ }, Dr = 50, oe = "?", bn = /\(error: (.*)\)/, Sn = /captureMessage|captureException/;
313
+ function Nr(...t) {
314
314
  const e = t.sort((n, r) => n[0] - r[0]).map((n) => n[1]);
315
315
  return (n, r = 0, s = 0) => {
316
316
  const i = [], o = n.split(`
@@ -327,7 +327,7 @@ function Dr(...t) {
327
327
  break;
328
328
  }
329
329
  }
330
- if (i.length >= Nr + s)
330
+ if (i.length >= Dr + s)
331
331
  break;
332
332
  }
333
333
  }
@@ -335,13 +335,13 @@ function Dr(...t) {
335
335
  };
336
336
  }
337
337
  function ni(t) {
338
- return Array.isArray(t) ? Dr(...t) : t;
338
+ return Array.isArray(t) ? Nr(...t) : t;
339
339
  }
340
340
  function ri(t) {
341
341
  if (!t.length)
342
342
  return [];
343
343
  const e = Array.from(t);
344
- return /sentryWrapped/.test(Me(e).function || "") && e.pop(), e.reverse(), Sn.test(Me(e).function || "") && (e.pop(), Sn.test(Me(e).function || "") && e.pop()), e.slice(0, Nr).map((n) => ({
344
+ return /sentryWrapped/.test(Me(e).function || "") && e.pop(), e.reverse(), Sn.test(Me(e).function || "") && (e.pop(), Sn.test(Me(e).function || "") && e.pop()), e.slice(0, Dr).map((n) => ({
345
345
  ...n,
346
346
  filename: n.filename || Me(e).filename,
347
347
  function: n.function || oe
@@ -475,7 +475,7 @@ function li(t) {
475
475
  function ui(t) {
476
476
  return Ee(t, "RegExp");
477
477
  }
478
- function Ne(t) {
478
+ function De(t) {
479
479
  return !!(t?.then && typeof t.then == "function");
480
480
  }
481
481
  function di(t) {
@@ -742,13 +742,13 @@ function yi(t) {
742
742
  }
743
743
  }
744
744
  const zr = 1e3;
745
- function De() {
745
+ function Ne() {
746
746
  return ct() / zr;
747
747
  }
748
748
  function Ei() {
749
749
  const { performance: t } = R;
750
750
  if (!t?.now || !t.timeOrigin)
751
- return De;
751
+ return Ne;
752
752
  const e = t.timeOrigin;
753
753
  return () => (e + at(() => t.now())) / zr;
754
754
  }
@@ -822,10 +822,10 @@ function jr() {
822
822
  return P().substring(16);
823
823
  }
824
824
  const Ct = "_sentrySpan";
825
- function Nn(t, e) {
825
+ function Dn(t, e) {
826
826
  e ? Y(t, Ct, e) : delete t[Ct];
827
827
  }
828
- function Dn(t) {
828
+ function Nn(t) {
829
829
  return t[Ct];
830
830
  }
831
831
  const xi = 100;
@@ -871,7 +871,7 @@ class B {
871
871
  const e = new B();
872
872
  return e._breadcrumbs = [...this._breadcrumbs], e._tags = { ...this._tags }, e._attributes = { ...this._attributes }, e._extra = { ...this._extra }, e._contexts = { ...this._contexts }, this._contexts.flags && (e._contexts.flags = {
873
873
  values: [...this._contexts.flags.values]
874
- }), e._user = this._user, e._level = this._level, e._session = this._session, e._transactionName = this._transactionName, e._fingerprint = this._fingerprint, e._eventProcessors = [...this._eventProcessors], e._attachments = [...this._attachments], e._sdkProcessingMetadata = { ...this._sdkProcessingMetadata }, e._propagationContext = { ...this._propagationContext }, e._client = this._client, e._lastEventId = this._lastEventId, e._conversationId = this._conversationId, Nn(e, Dn(this)), e;
874
+ }), e._user = this._user, e._level = this._level, e._session = this._session, e._transactionName = this._transactionName, e._fingerprint = this._fingerprint, e._eventProcessors = [...this._eventProcessors], e._attachments = [...this._attachments], e._sdkProcessingMetadata = { ...this._sdkProcessingMetadata }, e._propagationContext = { ...this._propagationContext }, e._client = this._client, e._lastEventId = this._lastEventId, e._conversationId = this._conversationId, Dn(e, Nn(this)), e;
875
875
  }
876
876
  /**
877
877
  * Update the client assigned to this scope.
@@ -1109,7 +1109,7 @@ class B {
1109
1109
  * Note: The client will not be cleared.
1110
1110
  */
1111
1111
  clear() {
1112
- return this._breadcrumbs = [], this._tags = {}, this._attributes = {}, this._extra = {}, this._user = {}, this._contexts = {}, this._level = void 0, this._transactionName = void 0, this._fingerprint = void 0, this._session = void 0, this._conversationId = void 0, Nn(this, void 0), this._attachments = [], this.setPropagationContext({
1112
+ return this._breadcrumbs = [], this._tags = {}, this._attributes = {}, this._extra = {}, this._user = {}, this._contexts = {}, this._level = void 0, this._transactionName = void 0, this._fingerprint = void 0, this._session = void 0, this._conversationId = void 0, Dn(this, void 0), this._attachments = [], this.setPropagationContext({
1113
1113
  traceId: An(),
1114
1114
  sampleRand: Ze()
1115
1115
  }), this._notifyScopeListeners(), this;
@@ -1123,7 +1123,7 @@ class B {
1123
1123
  if (r <= 0)
1124
1124
  return this;
1125
1125
  const s = {
1126
- timestamp: De(),
1126
+ timestamp: Ne(),
1127
1127
  ...e,
1128
1128
  // Breadcrumb messages can theoretically be infinitely large and they're held in memory so we truncate them not to leak (too much) memory
1129
1129
  message: e.message ? vt(e.message, 2048) : e.message
@@ -1172,7 +1172,7 @@ class B {
1172
1172
  propagationContext: this._propagationContext,
1173
1173
  sdkProcessingMetadata: this._sdkProcessingMetadata,
1174
1174
  transactionName: this._transactionName,
1175
- span: Dn(this),
1175
+ span: Nn(this),
1176
1176
  conversationId: this._conversationId
1177
1177
  };
1178
1178
  }
@@ -1279,7 +1279,7 @@ class Ti {
1279
1279
  } catch (s) {
1280
1280
  throw this._popScope(), s;
1281
1281
  }
1282
- return Ne(r) ? r.then(
1282
+ return De(r) ? r.then(
1283
1283
  (s) => (this._popScope(), s),
1284
1284
  (s) => {
1285
1285
  throw this._popScope(), s;
@@ -1366,7 +1366,7 @@ function J() {
1366
1366
  function Ai() {
1367
1367
  return _e("globalScope", () => new B());
1368
1368
  }
1369
- function Ni(...t) {
1369
+ function Di(...t) {
1370
1370
  const e = nt(), n = Qt(e);
1371
1371
  if (t.length === 2) {
1372
1372
  const [r, s] = t;
@@ -1377,7 +1377,7 @@ function Ni(...t) {
1377
1377
  function C() {
1378
1378
  return H().getClient();
1379
1379
  }
1380
- function Di(t) {
1380
+ function Ni(t) {
1381
1381
  const e = t.getPropagationContext(), { traceId: n, parentSpanId: r, propagationSpanId: s } = e, i = {
1382
1382
  trace_id: n,
1383
1383
  span_id: s || jr()
@@ -1760,7 +1760,7 @@ function ko(t, e) {
1760
1760
  const [n, r] = t;
1761
1761
  return [n, [...r, e]];
1762
1762
  }
1763
- function Nt(t, e) {
1763
+ function Dt(t, e) {
1764
1764
  const n = t[1];
1765
1765
  for (const r of n) {
1766
1766
  const s = r[0].type;
@@ -1770,9 +1770,9 @@ function Nt(t, e) {
1770
1770
  return !1;
1771
1771
  }
1772
1772
  function xo(t, e) {
1773
- return Nt(t, (n, r) => e.includes(r));
1773
+ return Dt(t, (n, r) => e.includes(r));
1774
1774
  }
1775
- function Dt(t) {
1775
+ function Nt(t) {
1776
1776
  const e = rt(R);
1777
1777
  return e.encodePolyfill ? e.encodePolyfill(t) : new TextEncoder().encode(t);
1778
1778
  }
@@ -1780,7 +1780,7 @@ function Ro(t) {
1780
1780
  const [e, n] = t;
1781
1781
  let r = JSON.stringify(e);
1782
1782
  function s(i) {
1783
- typeof r == "string" ? r = typeof i == "string" ? r + i : [Dt(r), i] : r.push(typeof i == "string" ? Dt(i) : i);
1783
+ typeof r == "string" ? r = typeof i == "string" ? r + i : [Nt(r), i] : r.push(typeof i == "string" ? Nt(i) : i);
1784
1784
  }
1785
1785
  for (const i of n) {
1786
1786
  const [o, a] = i;
@@ -1808,7 +1808,7 @@ function wo(t) {
1808
1808
  return n;
1809
1809
  }
1810
1810
  function To(t) {
1811
- const e = typeof t.data == "string" ? Dt(t.data) : t.data;
1811
+ const e = typeof t.data == "string" ? Nt(t.data) : t.data;
1812
1812
  return [
1813
1813
  {
1814
1814
  type: "attachment",
@@ -1885,7 +1885,7 @@ function Ao(t, e, n, r) {
1885
1885
  }, o = "aggregates" in t ? [{ type: "sessions" }, t] : [{ type: "session" }, t.toJSON()];
1886
1886
  return be(i, [o]);
1887
1887
  }
1888
- function No(t, e, n, r) {
1888
+ function Do(t, e, n, r) {
1889
1889
  const s = Jr(n), i = t.type && t.type !== "replay_event" ? t.type : "event";
1890
1890
  Co(t, n?.sdk);
1891
1891
  const o = Io(t, s, r, e);
@@ -1971,7 +1971,7 @@ class Ce {
1971
1971
  _runExecutor(e) {
1972
1972
  const n = (i, o) => {
1973
1973
  if (this._state === yt) {
1974
- if (Ne(o)) {
1974
+ if (De(o)) {
1975
1975
  o.then(r, s);
1976
1976
  return;
1977
1977
  }
@@ -1989,10 +1989,10 @@ class Ce {
1989
1989
  }
1990
1990
  }
1991
1991
  }
1992
- function Do(t, e, n, r = 0) {
1992
+ function No(t, e, n, r = 0) {
1993
1993
  try {
1994
1994
  const s = Ot(e, n, t, r);
1995
- return Ne(s) ? s : Pe(s);
1995
+ return De(s) ? s : Pe(s);
1996
1996
  } catch (s) {
1997
1997
  return nn(s);
1998
1998
  }
@@ -2002,7 +2002,7 @@ function Ot(t, e, n, r) {
2002
2002
  if (!t || !s)
2003
2003
  return t;
2004
2004
  const i = s({ ...t }, e);
2005
- return _ && i === null && m.log(`Event processor "${s.id || "?"}" dropped event`), Ne(i) ? i.then((o) => Ot(o, e, n, r + 1)) : Ot(i, e, n, r + 1);
2005
+ return _ && i === null && m.log(`Event processor "${s.id || "?"}" dropped event`), De(i) ? i.then((o) => Ot(o, e, n, r + 1)) : Ot(i, e, n, r + 1);
2006
2006
  }
2007
2007
  let Q, qn, Gn, G;
2008
2008
  function Oo(t) {
@@ -2094,7 +2094,7 @@ function Bo(t, e, n, r, s, i) {
2094
2094
  const { normalizeDepth: o = 3, normalizeMaxBreadth: a = 1e3 } = t, c = {
2095
2095
  ...e,
2096
2096
  event_id: e.event_id || n.event_id || P(),
2097
- timestamp: e.timestamp || De()
2097
+ timestamp: e.timestamp || Ne()
2098
2098
  }, l = n.integrations || t.integrations.map((A) => A.name);
2099
2099
  Ho(c, t), qo(c, l), s && s.emit("applyFrameMetadata", e), e.type === void 0 && zo(c, t.stackParser);
2100
2100
  const d = Vo(r, n.captureContext);
@@ -2106,7 +2106,7 @@ function Bo(t, e, n, r, s, i) {
2106
2106
  // Run scope event processors _after_ all other processors
2107
2107
  ...p.eventProcessors
2108
2108
  ];
2109
- return (n.data && n.data.__sentry__ === !0 ? Pe(c) : Do(f, c, n)).then((A) => (A && jo(A), typeof o == "number" && o > 0 ? Go(A, o, a) : A));
2109
+ return (n.data && n.data.__sentry__ === !0 ? Pe(c) : No(f, c, n)).then((A) => (A && jo(A), typeof o == "number" && o > 0 ? Go(A, o, a) : A));
2110
2110
  }
2111
2111
  function Ho(t, e) {
2112
2112
  const { environment: n, release: r, dist: s, maxValueLength: i } = e;
@@ -2448,7 +2448,7 @@ function ya(t, e, n = sn(
2448
2448
  const s = (o) => n.drain(o);
2449
2449
  function i(o) {
2450
2450
  const a = [];
2451
- if (Nt(o, (u, p) => {
2451
+ if (Dt(o, (u, p) => {
2452
2452
  const h = Hn(p);
2453
2453
  ma(r, h) ? t.recordDroppedEvent("ratelimit_backoff", h) : a.push(u);
2454
2454
  }), a.length === 0)
@@ -2458,7 +2458,7 @@ function ya(t, e, n = sn(
2458
2458
  _ && m.warn(`Dropping client report. Will not send outcomes (reason: ${u}).`);
2459
2459
  return;
2460
2460
  }
2461
- Nt(c, (p, h) => {
2461
+ Dt(c, (p, h) => {
2462
2462
  t.recordDroppedEvent(u, Hn(h));
2463
2463
  });
2464
2464
  }, d = () => e({ body: Ro(c) }).then(
@@ -2487,7 +2487,7 @@ function Ea(t, e, n) {
2487
2487
  const r = [
2488
2488
  { type: "client_report" },
2489
2489
  {
2490
- timestamp: De(),
2490
+ timestamp: Ne(),
2491
2491
  discarded_events: t
2492
2492
  }
2493
2493
  ];
@@ -2784,7 +2784,7 @@ class xa {
2784
2784
  */
2785
2785
  sendEvent(e, n = {}) {
2786
2786
  this.emit("beforeSendEvent", e, n);
2787
- let r = No(e, this._dsn, this._options._metadata, this._options.tunnel);
2787
+ let r = Do(e, this._dsn, this._options._metadata, this._options.tunnel);
2788
2788
  for (const s of n.attachments || [])
2789
2789
  r = ko(r, To(s));
2790
2790
  this.sendEnvelope(r).then((s) => this.emit("afterSendEvent", e, s));
@@ -2932,7 +2932,7 @@ class xa {
2932
2932
  if (a === null)
2933
2933
  return a;
2934
2934
  this.emit("postprocessEvent", a, n), a.contexts = {
2935
- trace: { ...a.contexts?.trace, ...Di(r) },
2935
+ trace: { ...a.contexts?.trace, ...Ni(r) },
2936
2936
  ...a.contexts
2937
2937
  };
2938
2938
  const c = go(this, r);
@@ -2995,15 +2995,15 @@ class xa {
2995
2995
  }
2996
2996
  const f = r.getSession() || s.getSession();
2997
2997
  if (c && f && this._updateSessionFromEvent(f, h), a) {
2998
- const D = h.sdkProcessingMetadata?.spanCountBeforeProcessing || 0, A = h.spans ? h.spans.length : 0, ke = D - A;
2998
+ const N = h.sdkProcessingMetadata?.spanCountBeforeProcessing || 0, A = h.spans ? h.spans.length : 0, ke = N - A;
2999
2999
  ke > 0 && this.recordDroppedEvent("before_send", "span", ke);
3000
3000
  }
3001
3001
  const k = h.transaction_info;
3002
3002
  if (a && k && h.transaction !== e.transaction) {
3003
- const D = "custom";
3003
+ const N = "custom";
3004
3004
  h.transaction_info = {
3005
3005
  ...k,
3006
- source: D
3006
+ source: N
3007
3007
  };
3008
3008
  }
3009
3009
  return this.sendEvent(h, n), h;
@@ -3073,7 +3073,7 @@ function tr(t) {
3073
3073
  }
3074
3074
  function Ra(t, e) {
3075
3075
  const n = `${e} must return \`null\` or a valid event.`;
3076
- if (Ne(t))
3076
+ if (De(t))
3077
3077
  return t.then(
3078
3078
  (r) => {
3079
3079
  if (!Ie(r) && r !== null)
@@ -3190,7 +3190,7 @@ function St(t) {
3190
3190
  // everything minus origin
3191
3191
  };
3192
3192
  }
3193
- function Na(t, e = !0) {
3193
+ function Da(t, e = !0) {
3194
3194
  if (t.startsWith("data:")) {
3195
3195
  const n = t.match(/^data:([^;,]+)/), r = n ? n[1] : "text/plain", s = t.includes(";base64,"), i = t.indexOf(",");
3196
3196
  let o = "";
@@ -3202,7 +3202,7 @@ function Na(t, e = !0) {
3202
3202
  }
3203
3203
  return t;
3204
3204
  }
3205
- function Da(t) {
3205
+ function Na(t) {
3206
3206
  "aggregates" in t ? t.attrs?.ip_address === void 0 && (t.attrs = {
3207
3207
  ...t.attrs,
3208
3208
  ip_address: "{{auto}}"
@@ -3221,7 +3221,7 @@ function Z(t, e) {
3221
3221
  if (!n) return;
3222
3222
  const { beforeBreadcrumb: s = null, maxBreadcrumbs: i = $a } = n.getOptions();
3223
3223
  if (i <= 0) return;
3224
- const a = { timestamp: De(), ...t }, c = s ? ye(() => s(a, e)) : a;
3224
+ const a = { timestamp: Ne(), ...t }, c = s ? ye(() => s(a, e)) : a;
3225
3225
  c !== null && (n.emit && n.emit("beforeAddBreadcrumb", c, e), r.addBreadcrumb(c, i));
3226
3226
  }
3227
3227
  let sr;
@@ -3680,7 +3680,7 @@ function me(t, e = {}) {
3680
3680
  const i = s.map((o) => me(o, e));
3681
3681
  return t.apply(this, i);
3682
3682
  } catch (i) {
3683
- throw mc(), Ni((o) => {
3683
+ throw mc(), Di((o) => {
3684
3684
  o.addEventProcessor((a) => (e.mechanism && (It(a, void 0), he(a, e.mechanism)), a.extra = {
3685
3685
  ...a.extra,
3686
3686
  arguments: s
@@ -3868,7 +3868,7 @@ class Cc extends xa {
3868
3868
  } = this._options, l = c ?? a?.enableMetrics ?? !0;
3869
3869
  T.document && (i || o || l) && T.document.addEventListener("visibilitychange", () => {
3870
3870
  T.document.visibilityState === "hidden" && (i && this._flushOutcomes(), o && $t(this), l && os(this));
3871
- }), s && this.on("beforeSendSession", Da);
3871
+ }), s && this.on("beforeSendSession", Na);
3872
3872
  }
3873
3873
  /**
3874
3874
  * @inheritDoc
@@ -3899,17 +3899,17 @@ function Ac(t) {
3899
3899
  ...t
3900
3900
  };
3901
3901
  }
3902
- const Nc = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__, N = R, Dc = 1e3;
3902
+ const Dc = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__, D = R, Nc = 1e3;
3903
3903
  let dr, Bt, Ht;
3904
3904
  function Oc(t) {
3905
3905
  ce("dom", t), le("dom", $c);
3906
3906
  }
3907
3907
  function $c() {
3908
- if (!N.document)
3908
+ if (!D.document)
3909
3909
  return;
3910
3910
  const t = F.bind(null, "dom"), e = pr(t, !0);
3911
- N.document.addEventListener("click", e, !1), N.document.addEventListener("keypress", e, !1), ["EventTarget", "Node"].forEach((n) => {
3912
- const s = N[n]?.prototype;
3911
+ D.document.addEventListener("click", e, !1), D.document.addEventListener("keypress", e, !1), ["EventTarget", "Node"].forEach((n) => {
3912
+ const s = D[n]?.prototype;
3913
3913
  s?.hasOwnProperty?.("addEventListener") && ($(s, "addEventListener", function(i) {
3914
3914
  return function(o, a, c) {
3915
3915
  if (o === "click" || o == "keypress")
@@ -3963,9 +3963,9 @@ function pr(t, e = !1) {
3963
3963
  return;
3964
3964
  Y(n, "_sentryCaptured", !0), r && !r._sentryId && Y(r, "_sentryId", P());
3965
3965
  const s = n.type === "keypress" ? "input" : n.type;
3966
- Pc(n) || (t({ event: n, name: s, global: e }), Bt = n.type, Ht = r ? r._sentryId : void 0), clearTimeout(dr), dr = N.setTimeout(() => {
3966
+ Pc(n) || (t({ event: n, name: s, global: e }), Bt = n.type, Ht = r ? r._sentryId : void 0), clearTimeout(dr), dr = D.setTimeout(() => {
3967
3967
  Ht = void 0, Bt = void 0;
3968
- }, Dc);
3968
+ }, Nc);
3969
3969
  };
3970
3970
  }
3971
3971
  function Mc(t) {
@@ -3981,8 +3981,8 @@ function Ss(t) {
3981
3981
  ce(e, t), le(e, Fc);
3982
3982
  }
3983
3983
  function Fc() {
3984
- if (N.addEventListener("popstate", () => {
3985
- const e = N.location.href, n = Fe;
3984
+ if (D.addEventListener("popstate", () => {
3985
+ const e = D.location.href, n = Fe;
3986
3986
  if (Fe = e, n === e)
3987
3987
  return;
3988
3988
  F("history", { from: n, to: e });
@@ -4000,11 +4000,11 @@ function Fc() {
4000
4000
  return e.apply(this, n);
4001
4001
  };
4002
4002
  }
4003
- $(N.history, "pushState", t), $(N.history, "replaceState", t);
4003
+ $(D.history, "pushState", t), $(D.history, "replaceState", t);
4004
4004
  }
4005
4005
  function Uc(t) {
4006
4006
  try {
4007
- return new URL(t, N.location.origin).toString();
4007
+ return new URL(t, D.location.origin).toString();
4008
4008
  } catch {
4009
4009
  return t;
4010
4010
  }
@@ -4014,10 +4014,10 @@ function Bc(t) {
4014
4014
  const e = Xe[t];
4015
4015
  if (e)
4016
4016
  return e;
4017
- let n = N[t];
4017
+ let n = D[t];
4018
4018
  if (Mt(n))
4019
- return Xe[t] = n.bind(N);
4020
- const r = N.document;
4019
+ return Xe[t] = n.bind(D);
4020
+ const r = D.document;
4021
4021
  if (r && typeof r.createElement == "function")
4022
4022
  try {
4023
4023
  const s = r.createElement("iframe");
@@ -4025,9 +4025,9 @@ function Bc(t) {
4025
4025
  const i = s.contentWindow;
4026
4026
  i?.[t] && (n = i[t]), r.head.removeChild(s);
4027
4027
  } catch (s) {
4028
- Nc && m.warn(`Could not create sandbox iframe for ${t} check, bailing to window.${t}: `, s);
4028
+ Dc && m.warn(`Could not create sandbox iframe for ${t} check, bailing to window.${t}: `, s);
4029
4029
  }
4030
- return n && (Xe[t] = n.bind(N));
4030
+ return n && (Xe[t] = n.bind(D));
4031
4031
  }
4032
4032
  function Hc(t) {
4033
4033
  Xe[t] = void 0;
@@ -4037,7 +4037,7 @@ function zc(t) {
4037
4037
  ce("xhr", t), le("xhr", jc);
4038
4038
  }
4039
4039
  function jc() {
4040
- if (!N.XMLHttpRequest)
4040
+ if (!D.XMLHttpRequest)
4041
4041
  return;
4042
4042
  const t = XMLHttpRequest.prototype;
4043
4043
  t.open = new Proxy(t.open, {
@@ -4186,7 +4186,7 @@ const Kc = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i, Yc = /^\s*at (?:(.+?\)(?: \
4186
4186
  let r = e[3], s = e[1] || oe;
4187
4187
  return [s, r] = ks(s, r), zt(r, s, e[4] ? +e[4] : void 0, e[5] ? +e[5] : void 0);
4188
4188
  }
4189
- }, sl = [Xc, rl], il = [el, sl], ol = Dr(...il), ks = (t, e) => {
4189
+ }, sl = [Xc, rl], il = [el, sl], ol = Nr(...il), ks = (t, e) => {
4190
4190
  const n = t.indexOf("safari-extension") !== -1, r = t.indexOf("safari-web-extension") !== -1;
4191
4191
  return n || r ? [
4192
4192
  t.indexOf("@") !== -1 ? t.split("@")[0] : oe,
@@ -4552,14 +4552,14 @@ function Al() {
4552
4552
  return;
4553
4553
  }
4554
4554
  }
4555
- const Nl = "GlobalHandlers", Dl = ((t = {}) => {
4555
+ const Dl = "GlobalHandlers", Nl = ((t = {}) => {
4556
4556
  const e = {
4557
4557
  onerror: !0,
4558
4558
  onunhandledrejection: !0,
4559
4559
  ...t
4560
4560
  };
4561
4561
  return {
4562
- name: Nl,
4562
+ name: Dl,
4563
4563
  setupOnce() {
4564
4564
  Error.stackTraceLimit = 50;
4565
4565
  },
@@ -4567,7 +4567,7 @@ const Nl = "GlobalHandlers", Dl = ((t = {}) => {
4567
4567
  e.onerror && ($l(n), fr("onerror")), e.onunhandledrejection && (Pl(n), fr("onunhandledrejection"));
4568
4568
  }
4569
4569
  };
4570
- }), Ol = Dl;
4570
+ }), Ol = Nl;
4571
4571
  function $l(t) {
4572
4572
  si((e) => {
4573
4573
  const { stackParser: n, attachStacktrace: r } = xs();
@@ -4649,7 +4649,7 @@ function xs() {
4649
4649
  }
4650
4650
  function Ul(t) {
4651
4651
  if (!(!j(t) || t.length === 0))
4652
- return t.startsWith("data:") ? `<${Na(t, !1)}>` : t;
4652
+ return t.startsWith("data:") ? `<${Da(t, !1)}>` : t;
4653
4653
  }
4654
4654
  const Bl = () => ({
4655
4655
  name: "HttpContext",
@@ -5403,22 +5403,7 @@ function _r(t) {
5403
5403
  function pu(t, e) {
5404
5404
  return t.code === "txn_limit_exceeded" ? y.TXN_LIMIT_EXCEEDED : t.httpStatus === b.UNAUTHORIZED ? y.UNAUTHORIZED : t.httpStatus === b.FORBIDDEN ? y.FORBIDDEN : e;
5405
5405
  }
5406
- const hu = {
5407
- "audio/mpeg": "mp3",
5408
- "audio/mp3": "mp3",
5409
- "audio/wav": "wav",
5410
- "audio/x-wav": "wav",
5411
- "audio/mp4": "mp4",
5412
- "audio/m4a": "m4a",
5413
- "audio/x-m4a": "m4a",
5414
- "audio/webm": "webm",
5415
- "audio/ogg": "ogg"
5416
- };
5417
- function fu(t) {
5418
- const e = t.name, n = e && e.includes(".") ? e.split(".").pop()?.toLowerCase() : void 0, r = t.type?.split(";")[0]?.trim().toLowerCase();
5419
- return `audio_1.${n || (r ? hu[r] : void 0) || "mp3"}`;
5420
- }
5421
- class gu {
5406
+ class hu {
5422
5407
  constructor(e, n, r, s) {
5423
5408
  this.allianceClient = e, this.transport = n, this.hosts = r, this.tracker = s, this.txnID = "", this.storedSession = null, this.sessionEnded = !1;
5424
5409
  }
@@ -5728,15 +5713,15 @@ class gu {
5728
5713
  async processPreRecordedAudio({
5729
5714
  upload: e,
5730
5715
  audioFile: n,
5731
- audioFileName: r
5716
+ audioFileName: r = "audio_1.mp3"
5732
5717
  }) {
5733
5718
  try {
5734
- const s = r || fu(n), i = await this.allianceClient.uploadAudioFile(n, s, e);
5735
- return i.success ? {
5736
- status_code: ne(i),
5719
+ const s = await this.allianceClient.uploadAudioFile(n, r, e);
5720
+ return s.success ? {
5721
+ status_code: ne(s),
5737
5722
  message: "Audio file uploaded successfully."
5738
5723
  } : ee(
5739
- i.error,
5724
+ s.error,
5740
5725
  y.AUDIO_UPLOAD_FAILED,
5741
5726
  "Audio upload failed."
5742
5727
  );
@@ -5800,7 +5785,7 @@ const yr = (t) => {
5800
5785
  } catch {
5801
5786
  return t;
5802
5787
  }
5803
- }, mu = (t) => {
5788
+ }, fu = (t) => {
5804
5789
  try {
5805
5790
  const e = atob(t), n = new Uint8Array(e.length);
5806
5791
  for (let s = 0; s < e.length; s++)
@@ -5809,9 +5794,9 @@ const yr = (t) => {
5809
5794
  } catch (e) {
5810
5795
  return console.error("Error decoding base64 string:", e), "";
5811
5796
  }
5812
- }, _u = (t, e) => {
5797
+ }, gu = (t, e) => {
5813
5798
  if (!e || e.trim() === "") return null;
5814
- const n = mu(e);
5799
+ const n = fu(e);
5815
5800
  switch (t) {
5816
5801
  case Ke.JSON:
5817
5802
  return yr(n);
@@ -5825,10 +5810,10 @@ const yr = (t) => {
5825
5810
  const { value: n } = e;
5826
5811
  return typeof n != "string" ? { ...e, value: n ?? null } : {
5827
5812
  ...e,
5828
- value: _u(e.type, n)
5813
+ value: gu(e.type, n)
5829
5814
  };
5830
5815
  }) : [];
5831
- class yu {
5816
+ class mu {
5832
5817
  constructor(e, n) {
5833
5818
  this.transport = e, this.hosts = n;
5834
5819
  }
@@ -5892,20 +5877,20 @@ class yu {
5892
5877
  return s && h.push(`template_id=${s}`), i && h.push(`document_id=${i}`), o && h.push("dlp=true"), h.join("&");
5893
5878
  }, p = async () => {
5894
5879
  try {
5895
- const h = u(), f = await this.fetchV3Status(n, h, 2e4), { status_code: k, response: D } = f;
5880
+ const h = u(), f = await this.fetchV3Status(n, h, 2e4), { status_code: k, response: N } = f;
5896
5881
  if (Date.now() >= l)
5897
5882
  return c(500, null, "Timeout while fetching analysis results.", "timeout");
5898
5883
  if (k === 401 || k === 403)
5899
5884
  return c(
5900
5885
  k,
5901
- D ?? null,
5886
+ N ?? null,
5902
5887
  "Unauthorized or Forbidden",
5903
5888
  "failed"
5904
5889
  );
5905
5890
  if (k === 202 || k === 400 || k >= 500) {
5906
- if (k === 202 && D && a?.({
5891
+ if (k === 202 && N && a?.({
5907
5892
  txn_id: n,
5908
- response: D,
5893
+ response: N,
5909
5894
  status_code: k,
5910
5895
  message: "Partial result received",
5911
5896
  poll_status: "in-progress"
@@ -5914,7 +5899,7 @@ class yu {
5914
5899
  return c(
5915
5900
  k,
5916
5901
  null,
5917
- D?.error?.message || f.message || "Backend error while fetching results.",
5902
+ N?.error?.message || f.message || "Backend error while fetching results.",
5918
5903
  "failed"
5919
5904
  );
5920
5905
  } else
@@ -5923,7 +5908,7 @@ class yu {
5923
5908
  }
5924
5909
  return c(
5925
5910
  k,
5926
- D ?? null,
5911
+ N ?? null,
5927
5912
  "Template results generated successfully.",
5928
5913
  "success"
5929
5914
  );
@@ -5969,8 +5954,8 @@ class yu {
5969
5954
  };
5970
5955
  }
5971
5956
  }
5972
- const Eu = 5e3;
5973
- class bu {
5957
+ const _u = 5e3;
5958
+ class yu {
5974
5959
  constructor(e, n) {
5975
5960
  this.transport = e, this.hosts = n, this.microphoneStream = null;
5976
5961
  }
@@ -6012,7 +5997,7 @@ class bu {
6012
5997
  "No internet connection detected",
6013
5998
  { isOnline: !1 }
6014
5999
  );
6015
- const r = new AbortController(), s = setTimeout(() => r.abort(), Eu);
6000
+ const r = new AbortController(), s = setTimeout(() => r.abort(), _u);
6016
6001
  try {
6017
6002
  await fetch("https://www.google.com/favicon.ico", {
6018
6003
  mode: "no-cors",
@@ -6262,14 +6247,14 @@ function E(t, e = "") {
6262
6247
  }, getRegex: () => new RegExp(n, e) };
6263
6248
  return r;
6264
6249
  }
6265
- var Su = ((t = "") => {
6250
+ var Eu = ((t = "") => {
6266
6251
  try {
6267
6252
  return !!new RegExp("(?<=1)(?<!1)" + t);
6268
6253
  } catch {
6269
6254
  return !1;
6270
6255
  }
6271
- })(), 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: pe((t) => new RegExp(`^ {0,${t}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)), hrRegex: pe((t) => new RegExp(`^ {0,${t}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)), fencesBeginRegex: pe((t) => new RegExp(`^ {0,${t}}(?:\`\`\`|~~~)`)), headingBeginRegex: pe((t) => new RegExp(`^ {0,${t}}#`)), htmlBeginRegex: pe((t) => new RegExp(`^ {0,${t}}<(?:[a-z].*>|!--)`, "i")), blockquoteBeginRegex: pe((t) => new RegExp(`^ {0,${t}}>`)) }, ku = /^(?:[ \t]*(?:\n|$))+/, xu = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Ru = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, Le = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, wu = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, un = / {0,3}(?:[*+-]|\d{1,9}[.)])/, ws = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Ts = E(ws).replace(/bull/g, un).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(), Tu = E(ws).replace(/bull/g, un).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(), dn = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, vu = /^[^\n]+/, pn = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Iu = E(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", pn).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Cu = E(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, un).getRegex(), dt = "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", hn = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Au = E("^ {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", hn).replace("tag", dt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), vs = E(dn).replace("hr", Le).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", dt).getRegex(), Nu = E(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", vs).getRegex(), fn = { blockquote: Nu, code: xu, def: Iu, fences: Ru, heading: wu, hr: Le, html: Au, lheading: Ts, list: Cu, newline: ku, paragraph: vs, table: se, text: vu }, Er = E("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", Le).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", dt).getRegex(), Du = { ...fn, lheading: Tu, table: Er, paragraph: E(dn).replace("hr", Le).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Er).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", dt).getRegex() }, Ou = { ...fn, html: E(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", hn).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: se, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: E(dn).replace("hr", Le).replace("heading", ` *#{1,6} *[^
6272
- ]`).replace("lheading", Ts).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, $u = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Pu = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Is = /^( {2,}|\\)\n(?!\s*$)/, Lu = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Se = /[\p{P}\p{S}]/u, pt = /[\s\p{P}\p{S}]/u, gn = /[^\s\p{P}\p{S}]/u, Mu = E(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, pt).getRegex(), Cs = /(?!~)[\p{P}\p{S}]/u, Fu = /(?!~)[\s\p{P}\p{S}]/u, Uu = /(?:[^\s\p{P}\p{S}]|~)/u, Bu = E(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Su ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), As = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, Hu = E(As, "u").replace(/punct/g, Se).getRegex(), zu = E(As, "u").replace(/punct/g, Cs).getRegex(), Ns = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", ju = E(Ns, "gu").replace(/notPunctSpace/g, gn).replace(/punctSpace/g, pt).replace(/punct/g, Se).getRegex(), qu = E(Ns, "gu").replace(/notPunctSpace/g, Uu).replace(/punctSpace/g, Fu).replace(/punct/g, Cs).getRegex(), Gu = E("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, gn).replace(/punctSpace/g, pt).replace(/punct/g, Se).getRegex(), Vu = E(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, Se).getRegex(), Wu = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", Xu = E(Wu, "gu").replace(/notPunctSpace/g, gn).replace(/punctSpace/g, pt).replace(/punct/g, Se).getRegex(), Ku = E(/\\(punct)/, "gu").replace(/punct/g, Se).getRegex(), Yu = E(/^<(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(), Zu = E(hn).replace("(?:-->|$)", "-->").getRegex(), Ju = E("^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", Zu).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Qe = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, Qu = E(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", Qe).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Ds = E(/^!?\[(label)\]\[(ref)\]/).replace("label", Qe).replace("ref", pn).getRegex(), Os = E(/^!?\[(ref)\](?:\[\])?/).replace("ref", pn).getRegex(), ed = E("reflink|nolink(?!\\()", "g").replace("reflink", Ds).replace("nolink", Os).getRegex(), br = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, mn = { _backpedal: se, anyPunctuation: Ku, autolink: Yu, blockSkip: Bu, br: Is, code: Pu, del: se, delLDelim: se, delRDelim: se, emStrongLDelim: Hu, emStrongRDelimAst: ju, emStrongRDelimUnd: Gu, escape: $u, link: Qu, nolink: Os, punctuation: Mu, reflink: Ds, reflinkSearch: ed, tag: Ju, text: Lu, url: se }, td = { ...mn, link: E(/^!?\[(label)\]\((.*?)\)/).replace("label", Qe).getRegex(), reflink: E(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Qe).getRegex() }, jt = { ...mn, emStrongRDelimAst: qu, emStrongLDelim: zu, delLDelim: Vu, delRDelim: Xu, url: E(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", br).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: E(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", br).getRegex() }, nd = { ...jt, br: E(Is).replace("{2,}", "*").getRegex(), text: E(jt.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, He = { normal: fn, gfm: Du, pedantic: Ou }, we = { normal: mn, gfm: jt, breaks: nd, pedantic: td }, rd = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, Sr = (t) => rd[t];
6256
+ })(), 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: pe((t) => new RegExp(`^ {0,${t}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)), hrRegex: pe((t) => new RegExp(`^ {0,${t}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)), fencesBeginRegex: pe((t) => new RegExp(`^ {0,${t}}(?:\`\`\`|~~~)`)), headingBeginRegex: pe((t) => new RegExp(`^ {0,${t}}#`)), htmlBeginRegex: pe((t) => new RegExp(`^ {0,${t}}<(?:[a-z].*>|!--)`, "i")), blockquoteBeginRegex: pe((t) => new RegExp(`^ {0,${t}}>`)) }, bu = /^(?:[ \t]*(?:\n|$))+/, Su = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, ku = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, Le = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, xu = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, un = / {0,3}(?:[*+-]|\d{1,9}[.)])/, ws = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Ts = E(ws).replace(/bull/g, un).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(), Ru = E(ws).replace(/bull/g, un).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(), dn = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, wu = /^[^\n]+/, pn = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Tu = E(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", pn).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), vu = E(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, un).getRegex(), dt = "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", hn = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Iu = E("^ {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", hn).replace("tag", dt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), vs = E(dn).replace("hr", Le).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", dt).getRegex(), Cu = E(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", vs).getRegex(), fn = { blockquote: Cu, code: Su, def: Tu, fences: ku, heading: xu, hr: Le, html: Iu, lheading: Ts, list: vu, newline: bu, paragraph: vs, table: se, text: wu }, Er = E("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", Le).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", dt).getRegex(), Au = { ...fn, lheading: Ru, table: Er, paragraph: E(dn).replace("hr", Le).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Er).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", dt).getRegex() }, Du = { ...fn, html: E(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", hn).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: se, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: E(dn).replace("hr", Le).replace("heading", ` *#{1,6} *[^
6257
+ ]`).replace("lheading", Ts).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Nu = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ou = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Is = /^( {2,}|\\)\n(?!\s*$)/, $u = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Se = /[\p{P}\p{S}]/u, pt = /[\s\p{P}\p{S}]/u, gn = /[^\s\p{P}\p{S}]/u, Pu = E(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, pt).getRegex(), Cs = /(?!~)[\p{P}\p{S}]/u, Lu = /(?!~)[\s\p{P}\p{S}]/u, Mu = /(?:[^\s\p{P}\p{S}]|~)/u, Fu = E(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Eu ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), As = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, Uu = E(As, "u").replace(/punct/g, Se).getRegex(), Bu = E(As, "u").replace(/punct/g, Cs).getRegex(), Ds = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Hu = E(Ds, "gu").replace(/notPunctSpace/g, gn).replace(/punctSpace/g, pt).replace(/punct/g, Se).getRegex(), zu = E(Ds, "gu").replace(/notPunctSpace/g, Mu).replace(/punctSpace/g, Lu).replace(/punct/g, Cs).getRegex(), ju = E("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, gn).replace(/punctSpace/g, pt).replace(/punct/g, Se).getRegex(), qu = E(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, Se).getRegex(), Gu = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", Vu = E(Gu, "gu").replace(/notPunctSpace/g, gn).replace(/punctSpace/g, pt).replace(/punct/g, Se).getRegex(), Wu = E(/\\(punct)/, "gu").replace(/punct/g, Se).getRegex(), Xu = E(/^<(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(), Ku = E(hn).replace("(?:-->|$)", "-->").getRegex(), Yu = E("^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", Ku).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Qe = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, Zu = E(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", Qe).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Ns = E(/^!?\[(label)\]\[(ref)\]/).replace("label", Qe).replace("ref", pn).getRegex(), Os = E(/^!?\[(ref)\](?:\[\])?/).replace("ref", pn).getRegex(), Ju = E("reflink|nolink(?!\\()", "g").replace("reflink", Ns).replace("nolink", Os).getRegex(), br = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, mn = { _backpedal: se, anyPunctuation: Wu, autolink: Xu, blockSkip: Fu, br: Is, code: Ou, del: se, delLDelim: se, delRDelim: se, emStrongLDelim: Uu, emStrongRDelimAst: Hu, emStrongRDelimUnd: ju, escape: Nu, link: Zu, nolink: Os, punctuation: Pu, reflink: Ns, reflinkSearch: Ju, tag: Yu, text: $u, url: se }, Qu = { ...mn, link: E(/^!?\[(label)\]\((.*?)\)/).replace("label", Qe).getRegex(), reflink: E(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Qe).getRegex() }, jt = { ...mn, emStrongRDelimAst: zu, emStrongLDelim: Bu, delLDelim: qu, delRDelim: Vu, url: E(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", br).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: E(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", br).getRegex() }, ed = { ...jt, br: E(Is).replace("{2,}", "*").getRegex(), text: E(jt.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, He = { normal: fn, gfm: Au, pedantic: Du }, we = { normal: mn, gfm: jt, breaks: ed, pedantic: Qu }, td = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, Sr = (t) => td[t];
6273
6258
  function U(t, e) {
6274
6259
  if (e) {
6275
6260
  if (I.escapeTest.test(t)) return t.replace(I.escapeReplace, Sr);
@@ -6310,7 +6295,7 @@ function Rr(t) {
6310
6295
  return e.length - n <= 2 ? t : e.slice(0, n + 1).join(`
6311
6296
  `);
6312
6297
  }
6313
- function sd(t, e) {
6298
+ function nd(t, e) {
6314
6299
  if (t.indexOf(e[1]) === -1) return -1;
6315
6300
  let n = 0;
6316
6301
  for (let r = 0; r < t.length; r++) if (t[r] === "\\") r++;
@@ -6318,7 +6303,7 @@ function sd(t, e) {
6318
6303
  else if (t[r] === e[1] && (n--, n < 0)) return r;
6319
6304
  return n > 0 ? -2 : -1;
6320
6305
  }
6321
- function id(t, e = 0) {
6306
+ function rd(t, e = 0) {
6322
6307
  let n = e, r = "";
6323
6308
  for (let s of t) if (s === " ") {
6324
6309
  let i = 4 - n % 4;
@@ -6332,7 +6317,7 @@ function wr(t, e, n, r, s) {
6332
6317
  let c = { type: t[0].charAt(0) === "!" ? "image" : "link", raw: n, href: i, title: o, text: a, tokens: r.inlineTokens(a) };
6333
6318
  return r.state.inLink = !1, c;
6334
6319
  }
6335
- function od(t, e, n) {
6320
+ function sd(t, e, n) {
6336
6321
  let r = t.match(n.other.indentCodeCompensation);
6337
6322
  if (r === null) return e;
6338
6323
  let s = r[1];
@@ -6366,7 +6351,7 @@ var et = class {
6366
6351
  fences(t) {
6367
6352
  let e = this.rules.block.fences.exec(t);
6368
6353
  if (e) {
6369
- let n = e[0], r = od(n, e[3] || "", this.rules);
6354
+ let n = e[0], r = sd(n, e[3] || "", this.rules);
6370
6355
  return { type: "code", raw: n, lang: e[2] ? e[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : e[2], text: r };
6371
6356
  }
6372
6357
  }
@@ -6437,20 +6422,20 @@ ${d}` : d;
6437
6422
  let c = !1, l = "", d = "";
6438
6423
  if (!(e = i.exec(t)) || this.rules.block.hr.test(t)) break;
6439
6424
  l = e[0], t = t.substring(l.length);
6440
- let u = id(e[2].split(`
6425
+ let u = rd(e[2].split(`
6441
6426
  `, 1)[0], e[1].length), p = t.split(`
6442
6427
  `, 1)[0], h = !u.trim(), f = 0;
6443
6428
  if (this.options.pedantic ? (f = 2, d = u.trimStart()) : h ? f = e[1].length + 1 : (f = u.search(this.rules.other.nonSpaceChar), f = f > 4 ? 1 : f, d = u.slice(f), f += e[1].length), h && this.rules.other.blankLine.test(p) && (l += p + `
6444
6429
  `, t = t.substring(p.length + 1), c = !0), !c) {
6445
- let k = this.rules.other.nextBulletRegex(f), D = this.rules.other.hrRegex(f), A = this.rules.other.fencesBeginRegex(f), ke = this.rules.other.headingBeginRegex(f), $s = this.rules.other.htmlBeginRegex(f), Ps = this.rules.other.blockquoteBeginRegex(f);
6430
+ let k = this.rules.other.nextBulletRegex(f), N = this.rules.other.hrRegex(f), A = this.rules.other.fencesBeginRegex(f), ke = this.rules.other.headingBeginRegex(f), $s = this.rules.other.htmlBeginRegex(f), Ps = this.rules.other.blockquoteBeginRegex(f);
6446
6431
  for (; t; ) {
6447
6432
  let ht = t.split(`
6448
6433
  `, 1)[0], xe;
6449
- if (p = ht, this.options.pedantic ? (p = p.replace(this.rules.other.listReplaceNesting, " "), xe = p) : xe = p.replace(this.rules.other.tabCharGlobal, " "), A.test(p) || ke.test(p) || $s.test(p) || Ps.test(p) || k.test(p) || D.test(p)) break;
6434
+ if (p = ht, this.options.pedantic ? (p = p.replace(this.rules.other.listReplaceNesting, " "), xe = p) : xe = p.replace(this.rules.other.tabCharGlobal, " "), A.test(p) || ke.test(p) || $s.test(p) || Ps.test(p) || k.test(p) || N.test(p)) break;
6450
6435
  if (xe.search(this.rules.other.nonSpaceChar) >= f || !p.trim()) d += `
6451
6436
  ` + xe.slice(f);
6452
6437
  else {
6453
- if (h || u.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || A.test(u) || ke.test(u) || D.test(u)) break;
6438
+ if (h || u.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || A.test(u) || ke.test(u) || N.test(u)) break;
6454
6439
  d += `
6455
6440
  ` + p;
6456
6441
  }
@@ -6556,7 +6541,7 @@ ${d}` : d;
6556
6541
  let i = V(n.slice(0, -1), "\\");
6557
6542
  if ((n.length - i.length) % 2 === 0) return;
6558
6543
  } else {
6559
- let i = sd(e[2], "()");
6544
+ let i = nd(e[2], "()");
6560
6545
  if (i === -2) return;
6561
6546
  if (i > -1) {
6562
6547
  let o = (e[0].indexOf("!") === 0 ? 5 : 4) + e[1].length + i;
@@ -7206,7 +7191,7 @@ ${t}</tr>
7206
7191
  provideParser(t = this.block) {
7207
7192
  return t ? M.parse : M.parseInline;
7208
7193
  }
7209
- }, w(je, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), w(je, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), je), ad = class {
7194
+ }, w(je, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), w(je, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), je), id = class {
7210
7195
  constructor(...t) {
7211
7196
  w(this, "defaults", ln());
7212
7197
  w(this, "options", this.setOptions);
@@ -7366,7 +7351,7 @@ Please report this to https://github.com/markedjs/marked.`, t) {
7366
7351
  throw n;
7367
7352
  };
7368
7353
  }
7369
- }, ae = new ad();
7354
+ }, ae = new id();
7370
7355
  function x(t, e) {
7371
7356
  return ae.parse(t, e);
7372
7357
  }
@@ -7399,7 +7384,7 @@ x.parseInline;
7399
7384
  M.parse;
7400
7385
  L.lex;
7401
7386
  var g = /* @__PURE__ */ ((t) => (t.COLLAPSED = "collapsed", t.RECORDING = "recording", t.PAUSED = "paused", t.PROCESSING = "processing", t.DONE = "done", t.ERROR = "error", t))(g || {});
7402
- const cd = {
7387
+ const od = {
7403
7388
  [g.COLLAPSED]: [g.RECORDING, g.ERROR],
7404
7389
  [g.RECORDING]: [
7405
7390
  g.PAUSED,
@@ -7415,7 +7400,7 @@ const cd = {
7415
7400
  [g.DONE]: [g.COLLAPSED],
7416
7401
  [g.ERROR]: [g.COLLAPSED, g.RECORDING]
7417
7402
  };
7418
- class ld {
7403
+ class ad {
7419
7404
  constructor() {
7420
7405
  this.state = g.COLLAPSED, this.listeners = /* @__PURE__ */ new Set();
7421
7406
  }
@@ -7423,7 +7408,7 @@ class ld {
7423
7408
  return this.state;
7424
7409
  }
7425
7410
  canTransition(e) {
7426
- return cd[this.state].includes(e);
7411
+ return od[this.state].includes(e);
7427
7412
  }
7428
7413
  transition(e) {
7429
7414
  if (!this.canTransition(e))
@@ -7445,7 +7430,7 @@ class ld {
7445
7430
  this.state = g.COLLAPSED;
7446
7431
  }
7447
7432
  }
7448
- class ud {
7433
+ class cd {
7449
7434
  constructor(e) {
7450
7435
  this.startTime = 0, this.elapsed = 0, this.intervalId = null, this.tickCallback = e;
7451
7436
  }
@@ -7478,7 +7463,7 @@ class ud {
7478
7463
  this.intervalId !== null && (clearInterval(this.intervalId), this.intervalId = null);
7479
7464
  }
7480
7465
  }
7481
- function dd() {
7466
+ function ld() {
7482
7467
  return `
7483
7468
  :host {
7484
7469
  all: initial;
@@ -7875,7 +7860,7 @@ function dd() {
7875
7860
  }
7876
7861
  `;
7877
7862
  }
7878
- function pd(t, e) {
7863
+ function ud(t, e) {
7879
7864
  let n = 0, r = 0, s = !1;
7880
7865
  function i(c) {
7881
7866
  if (c.target.closest("button")) return;
@@ -7895,12 +7880,12 @@ function pd(t, e) {
7895
7880
  e.removeEventListener("mousedown", i), e.removeEventListener("touchstart", i), a();
7896
7881
  };
7897
7882
  }
7898
- const hd = '<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>', fd = '<svg viewBox="0 0 24 24"><polygon points="8,4 20,12 8,20"/></svg>', Tr = '<svg viewBox="0 0 24 24"><rect x="5" y="5" width="14" height="14" rx="2"/></svg>', vr = '<svg viewBox="0 0 24 24"><polyline points="20 6 9 17 4 12"/></svg>', ze = '<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>', gd = 20, md = 14, wt = 3, Tt = 2;
7899
- class _d {
7883
+ const dd = '<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>', pd = '<svg viewBox="0 0 24 24"><polygon points="8,4 20,12 8,20"/></svg>', Tr = '<svg viewBox="0 0 24 24"><rect x="5" y="5" width="14" height="14" rx="2"/></svg>', vr = '<svg viewBox="0 0 24 24"><polyline points="20 6 9 17 4 12"/></svg>', ze = '<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>', hd = 20, fd = 14, wt = 3, Tt = 2;
7884
+ class gd {
7900
7885
  constructor(e, n, r, s) {
7901
7886
  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" });
7902
7887
  const i = document.createElement("style");
7903
- i.textContent = dd(), this.shadow.appendChild(i), this.widgetEl = document.createElement("div"), this.widgetEl.className = "widget hidden", this.widgetEl.style.zIndex = String(e), this.applyPosition(n), this.shadow.appendChild(this.widgetEl), this.contentEl = document.createElement("div"), this.widgetEl.appendChild(this.contentEl), document.body.appendChild(this.host);
7888
+ i.textContent = ld(), this.shadow.appendChild(i), this.widgetEl = document.createElement("div"), this.widgetEl.className = "widget hidden", this.widgetEl.style.zIndex = String(e), this.applyPosition(n), this.shadow.appendChild(this.widgetEl), this.contentEl = document.createElement("div"), this.widgetEl.appendChild(this.contentEl), document.body.appendChild(this.host);
7904
7889
  }
7905
7890
  renderState(e, n) {
7906
7891
  switch (this.stopAnimation(), this.contentEl.className = "", e) {
@@ -7941,7 +7926,7 @@ class _d {
7941
7926
  this.waveformBars = s, n.appendChild(r);
7942
7927
  const i = document.createElement("span");
7943
7928
  i.className = "timer", i.textContent = e, n.appendChild(i);
7944
- const o = this.createButton("btn btn-play-pause", hd);
7929
+ const o = this.createButton("btn btn-play-pause", dd);
7945
7930
  o.addEventListener("click", this.actions.onPause), n.appendChild(o);
7946
7931
  const a = this.createButton("btn btn-stop", Tr);
7947
7932
  a.addEventListener("click", this.actions.onStop), n.appendChild(a), this.contentEl.appendChild(n), this.bindDrag(n), this.startAnimation();
@@ -7955,7 +7940,7 @@ class _d {
7955
7940
  n.appendChild(r);
7956
7941
  const i = document.createElement("span");
7957
7942
  i.className = "timer", i.textContent = e, n.appendChild(i);
7958
- const o = this.createButton("btn btn-play-pause", fd);
7943
+ const o = this.createButton("btn btn-play-pause", pd);
7959
7944
  o.addEventListener("click", this.actions.onResume), n.appendChild(o);
7960
7945
  const a = this.createButton("btn btn-stop", Tr);
7961
7946
  a.addEventListener("click", this.actions.onStop), n.appendChild(a), this.contentEl.appendChild(n), this.bindDrag(n);
@@ -8026,7 +8011,7 @@ class _d {
8026
8011
  }
8027
8012
  // ─── Waveform ─────────────────────────────────────────────────────────────
8028
8013
  createWaveform() {
8029
- const e = this.orientation === "vertical" ? md : gd, n = 28, r = e * (wt + Tt) - Tt, s = n, i = document.createElementNS("http://www.w3.org/2000/svg", "svg");
8014
+ const e = this.orientation === "vertical" ? fd : hd, n = 28, r = e * (wt + Tt) - Tt, s = n, i = document.createElementNS("http://www.w3.org/2000/svg", "svg");
8030
8015
  i.setAttribute("width", String(r)), i.setAttribute("height", String(s)), i.setAttribute("viewBox", `0 0 ${r} ${s}`);
8031
8016
  const o = [], a = n * 0.4;
8032
8017
  for (let c = 0; c < e; c++) {
@@ -8064,7 +8049,7 @@ class _d {
8064
8049
  return r.className = e, r.innerHTML = n, r;
8065
8050
  }
8066
8051
  bindDrag(e) {
8067
- this.cleanupDrag && this.cleanupDrag(), this.cleanupDrag = pd(this.widgetEl, e);
8052
+ this.cleanupDrag && this.cleanupDrag(), this.cleanupDrag = ud(this.widgetEl, e);
8068
8053
  }
8069
8054
  applyPosition(e) {
8070
8055
  e && (e.top != null && (this.widgetEl.style.top = `${e.top}px`, this.widgetEl.style.bottom = "auto"), e.bottom != null && (this.widgetEl.style.bottom = `${e.bottom}px`), e.left != null && (this.widgetEl.style.left = `${e.left}px`, this.widgetEl.style.right = "auto"), e.right != null && (this.widgetEl.style.right = `${e.right}px`));
@@ -8074,9 +8059,9 @@ class _d {
8074
8059
  return n.textContent = e, n.innerHTML;
8075
8060
  }
8076
8061
  }
8077
- class yd {
8062
+ class md {
8078
8063
  constructor(e, n) {
8079
- this.currentTxnId = "", this.isProcessing = !1, this.isStarting = !1, this.sdk = e, this.config = n, this.callbacks = n.callbacks || {}, this.stateMachine = new ld(), this.timer = new ud((r) => this.renderer.updateTimer(r)), this.renderer = new _d(
8064
+ this.currentTxnId = "", this.isProcessing = !1, this.isStarting = !1, this.sdk = e, this.config = n, this.callbacks = n.callbacks || {}, this.stateMachine = new ad(), this.timer = new cd((r) => this.renderer.updateTimer(r)), this.renderer = new gd(
8080
8065
  n.zIndex ?? 9999,
8081
8066
  n.position,
8082
8067
  n.orientation || "horizontal",
@@ -8261,12 +8246,12 @@ const O = class O {
8261
8246
  flavour: e.flavour
8262
8247
  }), this.allianceClient.init().catch((r) => {
8263
8248
  console.error("[EkaScribe] Alliance SDK init failed:", r);
8264
- }), this.documents = new uu(this.transport, this.hosts, this.allianceClient), this.sessions = new du(this.transport, this.hosts, this.allianceClient), this.output = new yu(this.transport, this.hosts), this.recording = new gu(
8249
+ }), this.documents = new uu(this.transport, this.hosts, this.allianceClient), this.sessions = new du(this.transport, this.hosts, this.allianceClient), this.output = new mu(this.transport, this.hosts), this.recording = new hu(
8265
8250
  this.allianceClient,
8266
8251
  this.transport,
8267
8252
  this.hosts,
8268
8253
  this.tracker
8269
- ), e.widget?.enabled && (this.widgetManager = new yd(this, e.widget)), this.allianceClient.registerCallback("onTokenRequired", (r) => {
8254
+ ), e.widget?.enabled && (this.widgetManager = new md(this, e.widget)), this.allianceClient.registerCallback("onTokenRequired", (r) => {
8270
8255
  this.handleUnauthorized().then((s) => {
8271
8256
  s ? r.resolve(s) : (console.error("[EkaScribe] Token refresh returned empty token."), r.resolve(""));
8272
8257
  }).catch((s) => {
@@ -8387,7 +8372,7 @@ const O = class O {
8387
8372
  }
8388
8373
  // ─── Compatibility ─────────────────────────────────────────────────────────
8389
8374
  async runSystemCompatibilityTest(e) {
8390
- return new bu(this.transport, this.hosts).runCompatibilityTest(e);
8375
+ return new yu(this.transport, this.hosts).runCompatibilityTest(e);
8391
8376
  }
8392
8377
  // ─── Lifecycle ─────────────────────────────────────────────────────────────
8393
8378
  async resetInstance() {
@@ -8406,7 +8391,7 @@ const O = class O {
8406
8391
  };
8407
8392
  O.instance = null;
8408
8393
  let Vt = O;
8409
- const Sd = (t) => Vt.getInstance(t);
8394
+ const Ed = (t) => Vt.getInstance(t);
8410
8395
  export {
8411
8396
  Jl as API_STATUS,
8412
8397
  ru as CALLBACK_TYPE,
@@ -8419,7 +8404,7 @@ export {
8419
8404
  Ke as TEMPLATE_TYPE,
8420
8405
  Ql as VAD_STATUS,
8421
8406
  g as WidgetState,
8422
- Rd as createWorkerBlobUrl,
8423
- Sd as getEkaScribeInstance,
8424
- wd as getWorkerUrl
8407
+ kd as createWorkerBlobUrl,
8408
+ Ed as getEkaScribeInstance,
8409
+ xd as getWorkerUrl
8425
8410
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eka-care/ekascribe-ts-sdk",
3
- "version": "3.0.54",
3
+ "version": "3.0.55",
4
4
  "description": "EkaScribe TypeScript SDK - Modern ES2020 build",
5
5
  "main": "dist/index.mjs",
6
6
  "module": "dist/index.mjs",
@@ -38,7 +38,7 @@
38
38
  ],
39
39
  "dependencies": {
40
40
  "marked": "^18.0.4",
41
- "med-scribe-alliance-ts-sdk": "2.0.52"
41
+ "med-scribe-alliance-ts-sdk": "2.0.54"
42
42
  },
43
43
  "devDependencies": {
44
44
  "vite-bundle-analyzer": "^1.3.6"