@starfish-codes/hellgate 2.0.0-beta.5 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,7 +12,7 @@ function z(e, t) {
12
12
  }
13
13
  return r;
14
14
  }
15
- function nt(e) {
15
+ function be(e) {
16
16
  if (!e.ok)
17
17
  throw e;
18
18
  return e.json();
@@ -91,13 +91,13 @@ class Yr {
91
91
  }
92
92
  }
93
93
  }
94
- }), this.domContainer = r ?? ze(), this.disposers.push(this.session.onStateChange(this.sessionStateHandle));
94
+ }), this.domContainer = r ?? Ve(), this.disposers.push(this.session.onStateChange(this.sessionStateHandle));
95
95
  }
96
96
  dispose() {
97
97
  this.disposers.forEach((t) => t()), this.check3dsIframeDisposers.forEach((t) => t());
98
98
  }
99
99
  initCheck3DSIframes(t, r) {
100
- const n = ze();
100
+ const n = Ve();
101
101
  n.insertAdjacentHTML("beforeend", `<iframe id="check_3ds_${this.iframeId}" width="0" height="0" style="border:0;visibility: hidden;" src="${t}"></iframe>`);
102
102
  const s = n.querySelector(`#check_3ds_${this.iframeId}`);
103
103
  if (s) {
@@ -116,7 +116,7 @@ class Yr {
116
116
  this.check3dsIframeDisposers.forEach((t) => t()), this.check3dsIframeDisposers = [];
117
117
  }
118
118
  startChallenge(t, r) {
119
- const n = ze(), s = `<iframe id="cha_${this.iframeId}" ${this.domContainer === n ? 'width="100%" height="500" style="border:0; max-width: 800px; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);' : 'width="100%" height="100%" style="border:0;'}" src="${t}"></iframe>`;
119
+ const n = Ve(), s = `<iframe id="cha_${this.iframeId}" ${this.domContainer === n ? 'width="100%" height="500" style="border:0; max-width: 800px; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);' : 'width="100%" height="100%" style="border:0;'}" src="${t}"></iframe>`;
120
120
  this.domContainer.insertAdjacentHTML("beforeend", this.domContainer === n ? `<div id="cha_${this.iframeId}_wrap" style="background: #fff; position: fixed; left: 0; top: 0; width: 100%; height: 100%; z-index: 10000;">${s}</div>` : s);
121
121
  const i = this.domContainer.querySelector(`#cha_${this.iframeId}`), a = this.domContainer.querySelector(`#cha_${this.iframeId}_wrap`);
122
122
  if (!i)
@@ -124,23 +124,23 @@ class Yr {
124
124
  this.disposers.push(() => {
125
125
  i.remove(), a == null || a.remove();
126
126
  });
127
- const o = new Promise((d) => {
127
+ const o = new Promise((f) => {
128
128
  const u = (h) => {
129
- h.source === i.contentWindow && d(h.data);
129
+ h.source === i.contentWindow && f(h.data);
130
130
  };
131
131
  window.addEventListener("message", u), this.disposers.push(() => window.removeEventListener("message", u));
132
- }), l = new Promise((d) => {
132
+ }), l = new Promise((f) => {
133
133
  const u = this.startAuthResultPolling(r, (h) => {
134
- h.event === "AuthResultReady" && (u(), d({
134
+ h.event === "AuthResultReady" && (u(), f({
135
135
  requestor_trans_id: h.threeDSRequestorTransID,
136
136
  event: h.event
137
137
  }));
138
138
  });
139
139
  });
140
- Promise.any([o, l]).then((d) => {
140
+ Promise.any([o, l]).then((f) => {
141
141
  this.session.completeAction({
142
142
  action: "3ds_challenge",
143
- result: d
143
+ result: f
144
144
  });
145
145
  });
146
146
  }
@@ -154,17 +154,17 @@ class Yr {
154
154
  });
155
155
  }
156
156
  startAuthResultPolling(t, r) {
157
- return window.clearTimeout(this.resultPollingTimer), this.resultPollingTimer = window.setTimeout(() => fetch(t).then((n) => nt(n)).then((n) => {
157
+ return window.clearTimeout(this.resultPollingTimer), this.resultPollingTimer = window.setTimeout(() => fetch(t).then((n) => be(n)).then((n) => {
158
158
  this.startAuthResultPolling(t, r), r(n);
159
159
  }).catch(() => {
160
160
  }), Jr), () => window.clearTimeout(this.resultPollingTimer);
161
161
  }
162
162
  }
163
- function ze() {
163
+ function Ve() {
164
164
  return document.body;
165
165
  }
166
166
  var Xr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
167
- function Qr(e) {
167
+ function Zr(e) {
168
168
  if (e.__esModule)
169
169
  return e;
170
170
  var t = e.default;
@@ -185,12 +185,12 @@ function Qr(e) {
185
185
  });
186
186
  }), r;
187
187
  }
188
- var Xt = {}, _e = {}, W = {};
188
+ var Xt = {}, ye = {}, W = {};
189
189
  Object.defineProperty(W, "__esModule", {
190
190
  value: !0
191
191
  });
192
192
  W.makeRequestWithoutElementsPayloadCheck = W.makeRequestWithElementsPayloadCheck = void 0;
193
- function Zr(e) {
193
+ function Qr(e) {
194
194
  function t() {
195
195
  var r = Reflect.construct(e, Array.from(arguments));
196
196
  return Object.setPrototypeOf(r, Object.getPrototypeOf(this)), r;
@@ -204,7 +204,7 @@ function Zr(e) {
204
204
  }
205
205
  }), Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e, t;
206
206
  }
207
- class Qt extends Zr(Error) {
207
+ class Zt extends Qr(Error) {
208
208
  constructor(t) {
209
209
  super(t), this.name = "NoElementsError";
210
210
  }
@@ -213,44 +213,44 @@ const en = (e, t, r, n, s = {}) => {
213
213
  if (e != null && e.hasElement(n))
214
214
  return e.client[t](r, n, s);
215
215
  let i = "Elements not initialized.";
216
- throw e && (i = "Element not found in payload."), new Qt(`${i} Use a regular HTTP client if no elements are needed.`);
216
+ throw e && (i = "Element not found in payload."), new Zt(`${i} Use a regular HTTP client if no elements are needed.`);
217
217
  };
218
218
  W.makeRequestWithElementsPayloadCheck = en;
219
219
  const tn = (e, t, r, n = {}) => {
220
220
  if (e)
221
221
  return e.client[t](r, n);
222
- throw new Qt("Elements not initialized. Use a regular HTTP client if no elements are needed.");
222
+ throw new Zt("Elements not initialized. Use a regular HTTP client if no elements are needed.");
223
223
  };
224
224
  W.makeRequestWithoutElementsPayloadCheck = tn;
225
- var Zt = {}, ye = {}, O = {}, b = {};
226
- Object.defineProperty(b, "__esModule", {
225
+ var Qt = {}, ge = {}, S = {}, E = {};
226
+ Object.defineProperty(E, "__esModule", {
227
227
  value: !0
228
228
  });
229
- b.USER_AGENT_HEADER = b.USER_AGENT_CLIENT = b.MERGE_CONTENT_TYPE = b.DEFAULT_ELEMENTS_BASE_URL = b.DEFAULT_BASE_URL = b.CONTENT_TYPE_HEADER = b.CLIENT_USER_AGENT_HEADER = b.CLIENT_BASE_PATHS = b.BT_TRANSACTION_ID_HEADER = b.BT_TRACE_ID_HEADER = b.BT_IDEMPOTENCY_KEY_HEADER = b.BT_EXPOSE_PROXY_RESPONSE_HEADER = b.BROWSER_LIST = b.API_KEY_HEADER = void 0;
229
+ E.USER_AGENT_HEADER = E.USER_AGENT_CLIENT = E.MERGE_CONTENT_TYPE = E.DEFAULT_ELEMENTS_BASE_URL = E.DEFAULT_BASE_URL = E.CONTENT_TYPE_HEADER = E.CLIENT_USER_AGENT_HEADER = E.CLIENT_BASE_PATHS = E.BT_TRANSACTION_ID_HEADER = E.BT_TRACE_ID_HEADER = E.BT_IDEMPOTENCY_KEY_HEADER = E.BT_EXPOSE_PROXY_RESPONSE_HEADER = E.BROWSER_LIST = E.API_KEY_HEADER = void 0;
230
230
  const rn = "BT-API-KEY";
231
- b.API_KEY_HEADER = rn;
231
+ E.API_KEY_HEADER = rn;
232
232
  const nn = "bt-trace-id";
233
- b.BT_TRACE_ID_HEADER = nn;
233
+ E.BT_TRACE_ID_HEADER = nn;
234
234
  const sn = "bt-idempotency-key";
235
- b.BT_IDEMPOTENCY_KEY_HEADER = sn;
235
+ E.BT_IDEMPOTENCY_KEY_HEADER = sn;
236
236
  const an = "BT-EXPOSE-RAW-PROXY-RESPONSE";
237
- b.BT_EXPOSE_PROXY_RESPONSE_HEADER = an;
237
+ E.BT_EXPOSE_PROXY_RESPONSE_HEADER = an;
238
238
  const on = "BT-TRANSACTION-ID";
239
- b.BT_TRANSACTION_ID_HEADER = on;
239
+ E.BT_TRANSACTION_ID_HEADER = on;
240
240
  const un = "Content-Type";
241
- b.CONTENT_TYPE_HEADER = un;
241
+ E.CONTENT_TYPE_HEADER = un;
242
242
  const cn = "application/merge-patch+json";
243
- b.MERGE_CONTENT_TYPE = cn;
243
+ E.MERGE_CONTENT_TYPE = cn;
244
244
  const ln = "User-Agent";
245
- b.USER_AGENT_HEADER = ln;
245
+ E.USER_AGENT_HEADER = ln;
246
246
  const dn = "BT-CLIENT-USER-AGENT";
247
- b.CLIENT_USER_AGENT_HEADER = dn;
247
+ E.CLIENT_USER_AGENT_HEADER = dn;
248
248
  const fn = "BasisTheoryJS";
249
- b.USER_AGENT_CLIENT = fn;
249
+ E.USER_AGENT_CLIENT = fn;
250
250
  const hn = "https://api.basistheory.com";
251
- b.DEFAULT_BASE_URL = hn;
251
+ E.DEFAULT_BASE_URL = hn;
252
252
  const pn = "https://js.basistheory.com/hosted-elements";
253
- b.DEFAULT_ELEMENTS_BASE_URL = pn;
253
+ E.DEFAULT_ELEMENTS_BASE_URL = pn;
254
254
  const mn = {
255
255
  tokens: "tokens",
256
256
  tokenize: "tokenize",
@@ -265,8 +265,8 @@ const mn = {
265
265
  sessions: "sessions",
266
266
  transactions: "transactions"
267
267
  };
268
- b.CLIENT_BASE_PATHS = mn;
269
- const En = [{
268
+ E.CLIENT_BASE_PATHS = mn;
269
+ const bn = [{
270
270
  browserName: "Firefox",
271
271
  browserUA: "Firefox"
272
272
  }, {
@@ -294,17 +294,17 @@ const En = [{
294
294
  browserName: "Safari",
295
295
  browserUA: "Safari"
296
296
  }];
297
- b.BROWSER_LIST = En;
297
+ E.BROWSER_LIST = bn;
298
298
  var p = {};
299
299
  function er(e, t) {
300
300
  return function() {
301
301
  return e.apply(t, arguments);
302
302
  };
303
303
  }
304
- const { toString: bn } = Object.prototype, { getPrototypeOf: ft } = Object, ge = /* @__PURE__ */ ((e) => (t) => {
305
- const r = bn.call(t);
304
+ const { toString: En } = Object.prototype, { getPrototypeOf: ft } = Object, Te = /* @__PURE__ */ ((e) => (t) => {
305
+ const r = En.call(t);
306
306
  return e[r] || (e[r] = r.slice(8, -1).toLowerCase());
307
- })(/* @__PURE__ */ Object.create(null)), x = (e) => (e = e.toLowerCase(), (t) => ge(t) === e), Te = (e) => (t) => typeof t === e, { isArray: J } = Array, ee = Te("undefined");
307
+ })(/* @__PURE__ */ Object.create(null)), x = (e) => (e = e.toLowerCase(), (t) => Te(t) === e), Re = (e) => (t) => typeof t === e, { isArray: J } = Array, ee = Re("undefined");
308
308
  function _n(e) {
309
309
  return e !== null && !ee(e) && e.constructor !== null && !ee(e.constructor) && P(e.constructor.isBuffer) && e.constructor.isBuffer(e);
310
310
  }
@@ -313,14 +313,14 @@ function yn(e) {
313
313
  let t;
314
314
  return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && tr(e.buffer), t;
315
315
  }
316
- const gn = Te("string"), P = Te("function"), rr = Te("number"), Re = (e) => e !== null && typeof e == "object", Tn = (e) => e === !0 || e === !1, he = (e) => {
317
- if (ge(e) !== "object")
316
+ const gn = Re("string"), P = Re("function"), rr = Re("number"), we = (e) => e !== null && typeof e == "object", Tn = (e) => e === !0 || e === !1, he = (e) => {
317
+ if (Te(e) !== "object")
318
318
  return !1;
319
319
  const t = ft(e);
320
320
  return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
321
- }, Rn = x("Date"), wn = x("File"), Sn = x("Blob"), vn = x("FileList"), On = (e) => Re(e) && P(e.pipe), Cn = (e) => {
321
+ }, Rn = x("Date"), wn = x("File"), vn = x("Blob"), On = x("FileList"), Sn = (e) => we(e) && P(e.pipe), Cn = (e) => {
322
322
  let t;
323
- return e && (typeof FormData == "function" && e instanceof FormData || P(e.append) && ((t = ge(e)) === "formdata" || // detect form-data instance
323
+ return e && (typeof FormData == "function" && e instanceof FormData || P(e.append) && ((t = Te(e)) === "formdata" || // detect form-data instance
324
324
  t === "object" && P(e.toString) && e.toString() === "[object FormData]"));
325
325
  }, Pn = x("URLSearchParams"), An = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
326
326
  function te(e, t, { allOwnKeys: r = !1 } = {}) {
@@ -436,10 +436,10 @@ const Bn = (e, t, r, { allOwnKeys: n } = {}) => (te(t, (s, i) => {
436
436
  };
437
437
  return J(e) ? n(e) : n(String(e).split(t)), r;
438
438
  }, zn = () => {
439
- }, Vn = (e, t) => (e = +e, Number.isFinite(e) ? e : t), Ve = "abcdefghijklmnopqrstuvwxyz", Pt = "0123456789", or = {
439
+ }, Vn = (e, t) => (e = +e, Number.isFinite(e) ? e : t), Ge = "abcdefghijklmnopqrstuvwxyz", Pt = "0123456789", or = {
440
440
  DIGIT: Pt,
441
- ALPHA: Ve,
442
- ALPHA_DIGIT: Ve + Ve.toUpperCase() + Pt
441
+ ALPHA: Ge,
442
+ ALPHA_DIGIT: Ge + Ge.toUpperCase() + Pt
443
443
  }, Gn = (e = 16, t = or.ALPHA_DIGIT) => {
444
444
  let r = "";
445
445
  const { length: n } = t;
@@ -452,7 +452,7 @@ function Wn(e) {
452
452
  }
453
453
  const Kn = (e) => {
454
454
  const t = new Array(10), r = (n, s) => {
455
- if (Re(n)) {
455
+ if (we(n)) {
456
456
  if (t.indexOf(n) >= 0)
457
457
  return;
458
458
  if (!("toJSON" in n)) {
@@ -467,7 +467,7 @@ const Kn = (e) => {
467
467
  return n;
468
468
  };
469
469
  return r(e, 0);
470
- }, Jn = x("AsyncFunction"), Yn = (e) => e && (Re(e) || P(e)) && P(e.then) && P(e.catch);
470
+ }, Jn = x("AsyncFunction"), Yn = (e) => e && (we(e) || P(e)) && P(e.then) && P(e.catch);
471
471
  var c = {
472
472
  isArray: J,
473
473
  isArrayBuffer: tr,
@@ -477,18 +477,18 @@ var c = {
477
477
  isString: gn,
478
478
  isNumber: rr,
479
479
  isBoolean: Tn,
480
- isObject: Re,
480
+ isObject: we,
481
481
  isPlainObject: he,
482
482
  isUndefined: ee,
483
483
  isDate: Rn,
484
484
  isFile: wn,
485
- isBlob: Sn,
485
+ isBlob: vn,
486
486
  isRegExp: qn,
487
487
  isFunction: P,
488
- isStream: On,
488
+ isStream: Sn,
489
489
  isURLSearchParams: Pn,
490
490
  isTypedArray: Mn,
491
- isFileList: vn,
491
+ isFileList: On,
492
492
  forEach: te,
493
493
  merge: st,
494
494
  extend: Bn,
@@ -496,7 +496,7 @@ var c = {
496
496
  stripBOM: jn,
497
497
  inherits: Nn,
498
498
  toFlatObject: xn,
499
- kindOf: ge,
499
+ kindOf: Te,
500
500
  kindOfTest: x,
501
501
  endsWith: Ln,
502
502
  toArray: Dn,
@@ -522,10 +522,10 @@ var c = {
522
522
  isAsyncFn: Jn,
523
523
  isThenable: Yn
524
524
  };
525
- function E(e, t, r, n, s) {
525
+ function b(e, t, r, n, s) {
526
526
  Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), r && (this.config = r), n && (this.request = n), s && (this.response = s);
527
527
  }
528
- c.inherits(E, Error, {
528
+ c.inherits(b, Error, {
529
529
  toJSON: function() {
530
530
  return {
531
531
  // Standard
@@ -546,7 +546,7 @@ c.inherits(E, Error, {
546
546
  };
547
547
  }
548
548
  });
549
- const ur = E.prototype, cr = {};
549
+ const ur = b.prototype, cr = {};
550
550
  [
551
551
  "ERR_BAD_OPTION_VALUE",
552
552
  "ERR_BAD_OPTION",
@@ -564,13 +564,13 @@ const ur = E.prototype, cr = {};
564
564
  ].forEach((e) => {
565
565
  cr[e] = { value: e };
566
566
  });
567
- Object.defineProperties(E, cr);
567
+ Object.defineProperties(b, cr);
568
568
  Object.defineProperty(ur, "isAxiosError", { value: !0 });
569
- E.from = (e, t, r, n, s, i) => {
569
+ b.from = (e, t, r, n, s, i) => {
570
570
  const a = Object.create(ur);
571
571
  return c.toFlatObject(e, a, function(l) {
572
572
  return l !== Error.prototype;
573
- }, (o) => o !== "isAxiosError"), E.call(a, e.message, t, r, n, s), a.cause = e, a.name = e.name, i && Object.assign(a, i), a;
573
+ }, (o) => o !== "isAxiosError"), b.call(a, e.message, t, r, n, s), a.cause = e, a.name = e.name, i && Object.assign(a, i), a;
574
574
  };
575
575
  var Xn = null;
576
576
  function it(e) {
@@ -584,73 +584,73 @@ function At(e, t, r) {
584
584
  return s = lr(s), !r && i ? "[" + s + "]" : s;
585
585
  }).join(r ? "." : "") : t;
586
586
  }
587
- function Qn(e) {
587
+ function Zn(e) {
588
588
  return c.isArray(e) && !e.some(it);
589
589
  }
590
- const Zn = c.toFlatObject(c, {}, null, function(t) {
590
+ const Qn = c.toFlatObject(c, {}, null, function(t) {
591
591
  return /^is[A-Z]/.test(t);
592
592
  });
593
- function we(e, t, r) {
593
+ function ve(e, t, r) {
594
594
  if (!c.isObject(e))
595
595
  throw new TypeError("target must be an object");
596
596
  t = t || new FormData(), r = c.toFlatObject(r, {
597
597
  metaTokens: !0,
598
598
  dots: !1,
599
599
  indexes: !1
600
- }, !1, function(m, S) {
601
- return !c.isUndefined(S[m]);
600
+ }, !1, function(m, v) {
601
+ return !c.isUndefined(v[m]);
602
602
  });
603
603
  const n = r.metaTokens, s = r.visitor || u, i = r.dots, a = r.indexes, l = (r.Blob || typeof Blob < "u" && Blob) && c.isSpecCompliantForm(t);
604
604
  if (!c.isFunction(s))
605
605
  throw new TypeError("visitor must be a function");
606
- function d(f) {
607
- if (f === null)
606
+ function f(d) {
607
+ if (d === null)
608
608
  return "";
609
- if (c.isDate(f))
610
- return f.toISOString();
611
- if (!l && c.isBlob(f))
612
- throw new E("Blob is not supported. Use a Buffer instead.");
613
- return c.isArrayBuffer(f) || c.isTypedArray(f) ? l && typeof Blob == "function" ? new Blob([f]) : Buffer.from(f) : f;
614
- }
615
- function u(f, m, S) {
616
- let D = f;
617
- if (f && !S && typeof f == "object") {
609
+ if (c.isDate(d))
610
+ return d.toISOString();
611
+ if (!l && c.isBlob(d))
612
+ throw new b("Blob is not supported. Use a Buffer instead.");
613
+ return c.isArrayBuffer(d) || c.isTypedArray(d) ? l && typeof Blob == "function" ? new Blob([d]) : Buffer.from(d) : d;
614
+ }
615
+ function u(d, m, v) {
616
+ let D = d;
617
+ if (d && !v && typeof d == "object") {
618
618
  if (c.endsWith(m, "{}"))
619
- m = n ? m : m.slice(0, -2), f = JSON.stringify(f);
620
- else if (c.isArray(f) && Qn(f) || (c.isFileList(f) || c.endsWith(m, "[]")) && (D = c.toArray(f)))
619
+ m = n ? m : m.slice(0, -2), d = JSON.stringify(d);
620
+ else if (c.isArray(d) && Zn(d) || (c.isFileList(d) || c.endsWith(m, "[]")) && (D = c.toArray(d)))
621
621
  return m = lr(m), D.forEach(function(ae, Kr) {
622
622
  !(c.isUndefined(ae) || ae === null) && t.append(
623
623
  // eslint-disable-next-line no-nested-ternary
624
624
  a === !0 ? At([m], Kr, i) : a === null ? m : m + "[]",
625
- d(ae)
625
+ f(ae)
626
626
  );
627
627
  }), !1;
628
628
  }
629
- return it(f) ? !0 : (t.append(At(S, m, i), d(f)), !1);
629
+ return it(d) ? !0 : (t.append(At(v, m, i), f(d)), !1);
630
630
  }
631
- const h = [], _ = Object.assign(Zn, {
631
+ const h = [], _ = Object.assign(Qn, {
632
632
  defaultVisitor: u,
633
- convertValue: d,
633
+ convertValue: f,
634
634
  isVisitable: it
635
635
  });
636
- function w(f, m) {
637
- if (!c.isUndefined(f)) {
638
- if (h.indexOf(f) !== -1)
636
+ function R(d, m) {
637
+ if (!c.isUndefined(d)) {
638
+ if (h.indexOf(d) !== -1)
639
639
  throw Error("Circular reference detected in " + m.join("."));
640
- h.push(f), c.forEach(f, function(D, A) {
640
+ h.push(d), c.forEach(d, function(D, A) {
641
641
  (!(c.isUndefined(D) || D === null) && s.call(
642
642
  t,
643
643
  D,
644
644
  c.isString(A) ? A.trim() : A,
645
645
  m,
646
646
  _
647
- )) === !0 && w(D, m ? m.concat(A) : [A]);
647
+ )) === !0 && R(D, m ? m.concat(A) : [A]);
648
648
  }), h.pop();
649
649
  }
650
650
  }
651
651
  if (!c.isObject(e))
652
652
  throw new TypeError("data must be an object");
653
- return w(e), t;
653
+ return R(e), t;
654
654
  }
655
655
  function Bt(e) {
656
656
  const t = {
@@ -667,7 +667,7 @@ function Bt(e) {
667
667
  });
668
668
  }
669
669
  function ht(e, t) {
670
- this._pairs = [], e && we(e, this, t);
670
+ this._pairs = [], e && ve(e, this, t);
671
671
  }
672
672
  const dr = ht.prototype;
673
673
  dr.append = function(t, r) {
@@ -774,7 +774,7 @@ var us = /* @__PURE__ */ Object.freeze({
774
774
  ...is
775
775
  };
776
776
  function cs(e, t) {
777
- return we(e, new j.classes.URLSearchParams(), Object.assign({
777
+ return ve(e, new j.classes.URLSearchParams(), Object.assign({
778
778
  visitor: function(r, n, s, i) {
779
779
  return j.isNode && c.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
780
780
  }
@@ -835,7 +835,7 @@ const pt = {
835
835
  return cs(t, this.formSerializer).toString();
836
836
  if ((o = c.isFileList(t)) || n.indexOf("multipart/form-data") > -1) {
837
837
  const l = this.env && this.env.FormData;
838
- return we(
838
+ return ve(
839
839
  o ? { "files[]": t } : t,
840
840
  l && new l(),
841
841
  this.formSerializer
@@ -852,7 +852,7 @@ const pt = {
852
852
  return JSON.parse(t);
853
853
  } catch (o) {
854
854
  if (a)
855
- throw o.name === "SyntaxError" ? E.from(o, E.ERR_BAD_RESPONSE, this, null, this.response) : o;
855
+ throw o.name === "SyntaxError" ? b.from(o, b.ERR_BAD_RESPONSE, this, null, this.response) : o;
856
856
  }
857
857
  }
858
858
  return t;
@@ -925,8 +925,8 @@ function ms(e) {
925
925
  t[n[1]] = n[2];
926
926
  return t;
927
927
  }
928
- const Es = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
929
- function Ge(e, t, r, n, s) {
928
+ const bs = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
929
+ function We(e, t, r, n, s) {
930
930
  if (c.isFunction(n))
931
931
  return n.call(this, t, r);
932
932
  if (s && (t = r), !!c.isString(t)) {
@@ -936,7 +936,7 @@ function Ge(e, t, r, n, s) {
936
936
  return n.test(t);
937
937
  }
938
938
  }
939
- function bs(e) {
939
+ function Es(e) {
940
940
  return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, r, n) => r.toUpperCase() + n);
941
941
  }
942
942
  function _s(e, t) {
@@ -950,21 +950,21 @@ function _s(e, t) {
950
950
  });
951
951
  });
952
952
  }
953
- class Se {
953
+ class Oe {
954
954
  constructor(t) {
955
955
  t && this.set(t);
956
956
  }
957
957
  set(t, r, n) {
958
958
  const s = this;
959
- function i(o, l, d) {
959
+ function i(o, l, f) {
960
960
  const u = Y(l);
961
961
  if (!u)
962
962
  throw new Error("header name must be a non-empty string");
963
963
  const h = c.findKey(s, u);
964
- (!h || s[h] === void 0 || d === !0 || d === void 0 && s[h] !== !1) && (s[h || l] = pe(o));
964
+ (!h || s[h] === void 0 || f === !0 || f === void 0 && s[h] !== !1) && (s[h || l] = pe(o));
965
965
  }
966
- const a = (o, l) => c.forEach(o, (d, u) => i(d, u, l));
967
- return c.isPlainObject(t) || t instanceof this.constructor ? a(t, r) : c.isString(t) && (t = t.trim()) && !Es(t) ? a(ps(t), r) : t != null && i(r, t, n), this;
966
+ const a = (o, l) => c.forEach(o, (f, u) => i(f, u, l));
967
+ return c.isPlainObject(t) || t instanceof this.constructor ? a(t, r) : c.isString(t) && (t = t.trim()) && !bs(t) ? a(ps(t), r) : t != null && i(r, t, n), this;
968
968
  }
969
969
  get(t, r) {
970
970
  if (t = Y(t), t) {
@@ -986,7 +986,7 @@ class Se {
986
986
  has(t, r) {
987
987
  if (t = Y(t), t) {
988
988
  const n = c.findKey(this, t);
989
- return !!(n && this[n] !== void 0 && (!r || Ge(this, this[n], n, r)));
989
+ return !!(n && this[n] !== void 0 && (!r || We(this, this[n], n, r)));
990
990
  }
991
991
  return !1;
992
992
  }
@@ -996,7 +996,7 @@ class Se {
996
996
  function i(a) {
997
997
  if (a = Y(a), a) {
998
998
  const o = c.findKey(n, a);
999
- o && (!r || Ge(n, n[o], o, r)) && (delete n[o], s = !0);
999
+ o && (!r || We(n, n[o], o, r)) && (delete n[o], s = !0);
1000
1000
  }
1001
1001
  }
1002
1002
  return c.isArray(t) ? t.forEach(i) : i(t), s;
@@ -1006,7 +1006,7 @@ class Se {
1006
1006
  let n = r.length, s = !1;
1007
1007
  for (; n--; ) {
1008
1008
  const i = r[n];
1009
- (!t || Ge(this, this[i], i, t, !0)) && (delete this[i], s = !0);
1009
+ (!t || We(this, this[i], i, t, !0)) && (delete this[i], s = !0);
1010
1010
  }
1011
1011
  return s;
1012
1012
  }
@@ -1018,7 +1018,7 @@ class Se {
1018
1018
  r[a] = pe(s), delete r[i];
1019
1019
  return;
1020
1020
  }
1021
- const o = t ? bs(i) : String(i).trim();
1021
+ const o = t ? Es(i) : String(i).trim();
1022
1022
  o !== i && delete r[i], r[o] = pe(s), n[o] = !0;
1023
1023
  }), this;
1024
1024
  }
@@ -1059,8 +1059,8 @@ class Se {
1059
1059
  return c.isArray(t) ? t.forEach(i) : i(t), this;
1060
1060
  }
1061
1061
  }
1062
- Se.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
1063
- c.reduceDescriptors(Se.prototype, ({ value: e }, t) => {
1062
+ Oe.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
1063
+ c.reduceDescriptors(Oe.prototype, ({ value: e }, t) => {
1064
1064
  let r = t[0].toUpperCase() + t.slice(1);
1065
1065
  return {
1066
1066
  get: () => e,
@@ -1069,29 +1069,29 @@ c.reduceDescriptors(Se.prototype, ({ value: e }, t) => {
1069
1069
  }
1070
1070
  };
1071
1071
  });
1072
- c.freezeMethods(Se);
1073
- var I = Se;
1074
- function We(e, t) {
1072
+ c.freezeMethods(Oe);
1073
+ var I = Oe;
1074
+ function Ke(e, t) {
1075
1075
  const r = this || mt, n = t || r, s = I.from(n.headers);
1076
1076
  let i = n.data;
1077
1077
  return c.forEach(e, function(o) {
1078
1078
  i = o.call(r, i, s.normalize(), t ? t.status : void 0);
1079
1079
  }), s.normalize(), i;
1080
1080
  }
1081
- function Er(e) {
1081
+ function br(e) {
1082
1082
  return !!(e && e.__CANCEL__);
1083
1083
  }
1084
1084
  function re(e, t, r) {
1085
- E.call(this, e ?? "canceled", E.ERR_CANCELED, t, r), this.name = "CanceledError";
1085
+ b.call(this, e ?? "canceled", b.ERR_CANCELED, t, r), this.name = "CanceledError";
1086
1086
  }
1087
- c.inherits(re, E, {
1087
+ c.inherits(re, b, {
1088
1088
  __CANCEL__: !0
1089
1089
  });
1090
1090
  function ys(e, t, r) {
1091
1091
  const n = r.config.validateStatus;
1092
- !r.status || !n || n(r.status) ? e(r) : t(new E(
1092
+ !r.status || !n || n(r.status) ? e(r) : t(new b(
1093
1093
  "Request failed with status code " + r.status,
1094
- [E.ERR_BAD_REQUEST, E.ERR_BAD_RESPONSE][Math.floor(r.status / 100) - 4],
1094
+ [b.ERR_BAD_REQUEST, b.ERR_BAD_RESPONSE][Math.floor(r.status / 100) - 4],
1095
1095
  r.config,
1096
1096
  r.request,
1097
1097
  r
@@ -1134,7 +1134,7 @@ function Ts(e) {
1134
1134
  function Rs(e, t) {
1135
1135
  return t ? e.replace(/\/+$/, "") + "/" + t.replace(/^\/+/, "") : e;
1136
1136
  }
1137
- function br(e, t) {
1137
+ function Er(e, t) {
1138
1138
  return e && !Ts(t) ? Rs(e, t) : t;
1139
1139
  }
1140
1140
  var ws = j.hasStandardBrowserEnv ? (
@@ -1169,31 +1169,31 @@ var ws = j.hasStandardBrowserEnv ? (
1169
1169
  };
1170
1170
  }()
1171
1171
  );
1172
- function Ss(e) {
1172
+ function vs(e) {
1173
1173
  const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
1174
1174
  return t && t[1] || "";
1175
1175
  }
1176
- function vs(e, t) {
1176
+ function Os(e, t) {
1177
1177
  e = e || 10;
1178
1178
  const r = new Array(e), n = new Array(e);
1179
1179
  let s = 0, i = 0, a;
1180
1180
  return t = t !== void 0 ? t : 1e3, function(l) {
1181
- const d = Date.now(), u = n[i];
1182
- a || (a = d), r[s] = l, n[s] = d;
1181
+ const f = Date.now(), u = n[i];
1182
+ a || (a = f), r[s] = l, n[s] = f;
1183
1183
  let h = i, _ = 0;
1184
1184
  for (; h !== s; )
1185
1185
  _ += r[h++], h = h % e;
1186
- if (s = (s + 1) % e, s === i && (i = (i + 1) % e), d - a < t)
1186
+ if (s = (s + 1) % e, s === i && (i = (i + 1) % e), f - a < t)
1187
1187
  return;
1188
- const w = u && d - u;
1189
- return w ? Math.round(_ * 1e3 / w) : void 0;
1188
+ const R = u && f - u;
1189
+ return R ? Math.round(_ * 1e3 / R) : void 0;
1190
1190
  };
1191
1191
  }
1192
1192
  function xt(e, t) {
1193
1193
  let r = 0;
1194
- const n = vs(50, 250);
1194
+ const n = Os(50, 250);
1195
1195
  return (s) => {
1196
- const i = s.loaded, a = s.lengthComputable ? s.total : void 0, o = i - r, l = n(o), d = i <= a;
1196
+ const i = s.loaded, a = s.lengthComputable ? s.total : void 0, o = i - r, l = n(o), f = i <= a;
1197
1197
  r = i;
1198
1198
  const u = {
1199
1199
  loaded: i,
@@ -1201,14 +1201,14 @@ function xt(e, t) {
1201
1201
  progress: a ? i / a : void 0,
1202
1202
  bytes: o,
1203
1203
  rate: l || void 0,
1204
- estimated: l && a && d ? (a - i) / l : void 0,
1204
+ estimated: l && a && f ? (a - i) / l : void 0,
1205
1205
  event: s
1206
1206
  };
1207
1207
  u[t ? "download" : "upload"] = !0, e(u);
1208
1208
  };
1209
1209
  }
1210
- const Os = typeof XMLHttpRequest < "u";
1211
- var Cs = Os && function(e) {
1210
+ const Ss = typeof XMLHttpRequest < "u";
1211
+ var Cs = Ss && function(e) {
1212
1212
  return new Promise(function(r, n) {
1213
1213
  let s = e.data;
1214
1214
  const i = I.from(e.headers).normalize(), a = e.responseType;
@@ -1216,32 +1216,32 @@ var Cs = Os && function(e) {
1216
1216
  function l() {
1217
1217
  e.cancelToken && e.cancelToken.unsubscribe(o), e.signal && e.signal.removeEventListener("abort", o);
1218
1218
  }
1219
- let d;
1219
+ let f;
1220
1220
  if (c.isFormData(s)) {
1221
1221
  if (j.hasStandardBrowserEnv || j.hasStandardBrowserWebWorkerEnv)
1222
1222
  i.setContentType(!1);
1223
- else if ((d = i.getContentType()) !== !1) {
1224
- const [f, ...m] = d ? d.split(";").map((S) => S.trim()).filter(Boolean) : [];
1225
- i.setContentType([f || "multipart/form-data", ...m].join("; "));
1223
+ else if ((f = i.getContentType()) !== !1) {
1224
+ const [d, ...m] = f ? f.split(";").map((v) => v.trim()).filter(Boolean) : [];
1225
+ i.setContentType([d || "multipart/form-data", ...m].join("; "));
1226
1226
  }
1227
1227
  }
1228
1228
  let u = new XMLHttpRequest();
1229
1229
  if (e.auth) {
1230
- const f = e.auth.username || "", m = e.auth.password ? unescape(encodeURIComponent(e.auth.password)) : "";
1231
- i.set("Authorization", "Basic " + btoa(f + ":" + m));
1230
+ const d = e.auth.username || "", m = e.auth.password ? unescape(encodeURIComponent(e.auth.password)) : "";
1231
+ i.set("Authorization", "Basic " + btoa(d + ":" + m));
1232
1232
  }
1233
- const h = br(e.baseURL, e.url);
1233
+ const h = Er(e.baseURL, e.url);
1234
1234
  u.open(e.method.toUpperCase(), fr(h, e.params, e.paramsSerializer), !0), u.timeout = e.timeout;
1235
1235
  function _() {
1236
1236
  if (!u)
1237
1237
  return;
1238
- const f = I.from(
1238
+ const d = I.from(
1239
1239
  "getAllResponseHeaders" in u && u.getAllResponseHeaders()
1240
- ), S = {
1240
+ ), v = {
1241
1241
  data: !a || a === "text" || a === "json" ? u.responseText : u.response,
1242
1242
  status: u.status,
1243
1243
  statusText: u.statusText,
1244
- headers: f,
1244
+ headers: d,
1245
1245
  config: e,
1246
1246
  request: u
1247
1247
  };
@@ -1249,35 +1249,35 @@ var Cs = Os && function(e) {
1249
1249
  r(A), l();
1250
1250
  }, function(A) {
1251
1251
  n(A), l();
1252
- }, S), u = null;
1252
+ }, v), u = null;
1253
1253
  }
1254
1254
  if ("onloadend" in u ? u.onloadend = _ : u.onreadystatechange = function() {
1255
1255
  !u || u.readyState !== 4 || u.status === 0 && !(u.responseURL && u.responseURL.indexOf("file:") === 0) || setTimeout(_);
1256
1256
  }, u.onabort = function() {
1257
- u && (n(new E("Request aborted", E.ECONNABORTED, e, u)), u = null);
1257
+ u && (n(new b("Request aborted", b.ECONNABORTED, e, u)), u = null);
1258
1258
  }, u.onerror = function() {
1259
- n(new E("Network Error", E.ERR_NETWORK, e, u)), u = null;
1259
+ n(new b("Network Error", b.ERR_NETWORK, e, u)), u = null;
1260
1260
  }, u.ontimeout = function() {
1261
1261
  let m = e.timeout ? "timeout of " + e.timeout + "ms exceeded" : "timeout exceeded";
1262
- const S = e.transitional || hr;
1263
- e.timeoutErrorMessage && (m = e.timeoutErrorMessage), n(new E(
1262
+ const v = e.transitional || hr;
1263
+ e.timeoutErrorMessage && (m = e.timeoutErrorMessage), n(new b(
1264
1264
  m,
1265
- S.clarifyTimeoutError ? E.ETIMEDOUT : E.ECONNABORTED,
1265
+ v.clarifyTimeoutError ? b.ETIMEDOUT : b.ECONNABORTED,
1266
1266
  e,
1267
1267
  u
1268
1268
  )), u = null;
1269
1269
  }, j.hasStandardBrowserEnv) {
1270
- const f = ws(h) && e.xsrfCookieName && gs.read(e.xsrfCookieName);
1271
- f && i.set(e.xsrfHeaderName, f);
1270
+ const d = ws(h) && e.xsrfCookieName && gs.read(e.xsrfCookieName);
1271
+ d && i.set(e.xsrfHeaderName, d);
1272
1272
  }
1273
- s === void 0 && i.setContentType(null), "setRequestHeader" in u && c.forEach(i.toJSON(), function(m, S) {
1274
- u.setRequestHeader(S, m);
1275
- }), c.isUndefined(e.withCredentials) || (u.withCredentials = !!e.withCredentials), a && a !== "json" && (u.responseType = e.responseType), typeof e.onDownloadProgress == "function" && u.addEventListener("progress", xt(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && u.upload && u.upload.addEventListener("progress", xt(e.onUploadProgress)), (e.cancelToken || e.signal) && (o = (f) => {
1276
- u && (n(!f || f.type ? new re(null, e, u) : f), u.abort(), u = null);
1273
+ s === void 0 && i.setContentType(null), "setRequestHeader" in u && c.forEach(i.toJSON(), function(m, v) {
1274
+ u.setRequestHeader(v, m);
1275
+ }), c.isUndefined(e.withCredentials) || (u.withCredentials = !!e.withCredentials), a && a !== "json" && (u.responseType = e.responseType), typeof e.onDownloadProgress == "function" && u.addEventListener("progress", xt(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && u.upload && u.upload.addEventListener("progress", xt(e.onUploadProgress)), (e.cancelToken || e.signal) && (o = (d) => {
1276
+ u && (n(!d || d.type ? new re(null, e, u) : d), u.abort(), u = null);
1277
1277
  }, e.cancelToken && e.cancelToken.subscribe(o), e.signal && (e.signal.aborted ? o() : e.signal.addEventListener("abort", o)));
1278
- const w = Ss(h);
1279
- if (w && j.protocols.indexOf(w) === -1) {
1280
- n(new E("Unsupported protocol " + w + ":", E.ERR_BAD_REQUEST, e));
1278
+ const R = vs(h);
1279
+ if (R && j.protocols.indexOf(R) === -1) {
1280
+ n(new b("Unsupported protocol " + R + ":", b.ERR_BAD_REQUEST, e));
1281
1281
  return;
1282
1282
  }
1283
1283
  u.send(s || null);
@@ -1307,7 +1307,7 @@ var _r = {
1307
1307
  r = e[i];
1308
1308
  let a;
1309
1309
  if (n = r, !Ps(r) && (n = at[(a = String(r)).toLowerCase()], n === void 0))
1310
- throw new E(`Unknown adapter '${a}'`);
1310
+ throw new b(`Unknown adapter '${a}'`);
1311
1311
  if (n)
1312
1312
  break;
1313
1313
  s[a || "#" + i] = n;
@@ -1319,7 +1319,7 @@ var _r = {
1319
1319
  let a = t ? i.length > 1 ? `since :
1320
1320
  ` + i.map(Lt).join(`
1321
1321
  `) : " " + Lt(i[0]) : "as no adapter specified";
1322
- throw new E(
1322
+ throw new b(
1323
1323
  "There is no suitable adapter to dispatch the request " + a,
1324
1324
  "ERR_NOT_SUPPORT"
1325
1325
  );
@@ -1328,22 +1328,22 @@ var _r = {
1328
1328
  },
1329
1329
  adapters: at
1330
1330
  };
1331
- function Ke(e) {
1331
+ function Je(e) {
1332
1332
  if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
1333
1333
  throw new re(null, e);
1334
1334
  }
1335
1335
  function Dt(e) {
1336
- return Ke(e), e.headers = I.from(e.headers), e.data = We.call(
1336
+ return Je(e), e.headers = I.from(e.headers), e.data = Ke.call(
1337
1337
  e,
1338
1338
  e.transformRequest
1339
1339
  ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), _r.getAdapter(e.adapter || mt.adapter)(e).then(function(n) {
1340
- return Ke(e), n.data = We.call(
1340
+ return Je(e), n.data = Ke.call(
1341
1341
  e,
1342
1342
  e.transformResponse,
1343
1343
  n
1344
1344
  ), n.headers = I.from(n.headers), n;
1345
1345
  }, function(n) {
1346
- return Er(n) || (Ke(e), n && n.response && (n.response.data = We.call(
1346
+ return br(n) || (Je(e), n && n.response && (n.response.data = Ke.call(
1347
1347
  e,
1348
1348
  e.transformResponse,
1349
1349
  n.response
@@ -1354,32 +1354,32 @@ const Mt = (e) => e instanceof I ? e.toJSON() : e;
1354
1354
  function K(e, t) {
1355
1355
  t = t || {};
1356
1356
  const r = {};
1357
- function n(d, u, h) {
1358
- return c.isPlainObject(d) && c.isPlainObject(u) ? c.merge.call({ caseless: h }, d, u) : c.isPlainObject(u) ? c.merge({}, u) : c.isArray(u) ? u.slice() : u;
1357
+ function n(f, u, h) {
1358
+ return c.isPlainObject(f) && c.isPlainObject(u) ? c.merge.call({ caseless: h }, f, u) : c.isPlainObject(u) ? c.merge({}, u) : c.isArray(u) ? u.slice() : u;
1359
1359
  }
1360
- function s(d, u, h) {
1360
+ function s(f, u, h) {
1361
1361
  if (c.isUndefined(u)) {
1362
- if (!c.isUndefined(d))
1363
- return n(void 0, d, h);
1362
+ if (!c.isUndefined(f))
1363
+ return n(void 0, f, h);
1364
1364
  } else
1365
- return n(d, u, h);
1365
+ return n(f, u, h);
1366
1366
  }
1367
- function i(d, u) {
1367
+ function i(f, u) {
1368
1368
  if (!c.isUndefined(u))
1369
1369
  return n(void 0, u);
1370
1370
  }
1371
- function a(d, u) {
1371
+ function a(f, u) {
1372
1372
  if (c.isUndefined(u)) {
1373
- if (!c.isUndefined(d))
1374
- return n(void 0, d);
1373
+ if (!c.isUndefined(f))
1374
+ return n(void 0, f);
1375
1375
  } else
1376
1376
  return n(void 0, u);
1377
1377
  }
1378
- function o(d, u, h) {
1378
+ function o(f, u, h) {
1379
1379
  if (h in t)
1380
- return n(d, u);
1380
+ return n(f, u);
1381
1381
  if (h in e)
1382
- return n(void 0, d);
1382
+ return n(void 0, f);
1383
1383
  }
1384
1384
  const l = {
1385
1385
  url: i,
@@ -1409,29 +1409,29 @@ function K(e, t) {
1409
1409
  socketPath: a,
1410
1410
  responseEncoding: a,
1411
1411
  validateStatus: o,
1412
- headers: (d, u) => s(Mt(d), Mt(u), !0)
1412
+ headers: (f, u) => s(Mt(f), Mt(u), !0)
1413
1413
  };
1414
1414
  return c.forEach(Object.keys(Object.assign({}, e, t)), function(u) {
1415
1415
  const h = l[u] || s, _ = h(e[u], t[u], u);
1416
1416
  c.isUndefined(_) && h !== o || (r[u] = _);
1417
1417
  }), r;
1418
1418
  }
1419
- const yr = "1.6.1", Et = {};
1419
+ const yr = "1.6.1", bt = {};
1420
1420
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
1421
- Et[e] = function(n) {
1421
+ bt[e] = function(n) {
1422
1422
  return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
1423
1423
  };
1424
1424
  });
1425
1425
  const It = {};
1426
- Et.transitional = function(t, r, n) {
1426
+ bt.transitional = function(t, r, n) {
1427
1427
  function s(i, a) {
1428
1428
  return "[Axios v" + yr + "] Transitional option '" + i + "'" + a + (n ? ". " + n : "");
1429
1429
  }
1430
1430
  return (i, a, o) => {
1431
1431
  if (t === !1)
1432
- throw new E(
1432
+ throw new b(
1433
1433
  s(a, " has been removed" + (r ? " in " + r : "")),
1434
- E.ERR_DEPRECATED
1434
+ b.ERR_DEPRECATED
1435
1435
  );
1436
1436
  return r && !It[a] && (It[a] = !0, console.warn(
1437
1437
  s(
@@ -1443,7 +1443,7 @@ Et.transitional = function(t, r, n) {
1443
1443
  };
1444
1444
  function As(e, t, r) {
1445
1445
  if (typeof e != "object")
1446
- throw new E("options must be an object", E.ERR_BAD_OPTION_VALUE);
1446
+ throw new b("options must be an object", b.ERR_BAD_OPTION_VALUE);
1447
1447
  const n = Object.keys(e);
1448
1448
  let s = n.length;
1449
1449
  for (; s-- > 0; ) {
@@ -1451,16 +1451,16 @@ function As(e, t, r) {
1451
1451
  if (a) {
1452
1452
  const o = e[i], l = o === void 0 || a(o, i, e);
1453
1453
  if (l !== !0)
1454
- throw new E("option " + i + " must be " + l, E.ERR_BAD_OPTION_VALUE);
1454
+ throw new b("option " + i + " must be " + l, b.ERR_BAD_OPTION_VALUE);
1455
1455
  continue;
1456
1456
  }
1457
1457
  if (r !== !0)
1458
- throw new E("Unknown option " + i, E.ERR_BAD_OPTION);
1458
+ throw new b("Unknown option " + i, b.ERR_BAD_OPTION);
1459
1459
  }
1460
1460
  }
1461
1461
  var ot = {
1462
1462
  assertOptions: As,
1463
- validators: Et
1463
+ validators: bt
1464
1464
  };
1465
1465
  const U = ot.validators;
1466
1466
  class Ee {
@@ -1497,8 +1497,8 @@ class Ee {
1497
1497
  );
1498
1498
  i && c.forEach(
1499
1499
  ["delete", "get", "head", "post", "put", "patch", "common"],
1500
- (f) => {
1501
- delete i[f];
1500
+ (d) => {
1501
+ delete i[d];
1502
1502
  }
1503
1503
  ), r.headers = I.concat(a, i);
1504
1504
  const o = [];
@@ -1506,40 +1506,40 @@ class Ee {
1506
1506
  this.interceptors.request.forEach(function(m) {
1507
1507
  typeof m.runWhen == "function" && m.runWhen(r) === !1 || (l = l && m.synchronous, o.unshift(m.fulfilled, m.rejected));
1508
1508
  });
1509
- const d = [];
1509
+ const f = [];
1510
1510
  this.interceptors.response.forEach(function(m) {
1511
- d.push(m.fulfilled, m.rejected);
1511
+ f.push(m.fulfilled, m.rejected);
1512
1512
  });
1513
1513
  let u, h = 0, _;
1514
1514
  if (!l) {
1515
- const f = [Dt.bind(this), void 0];
1516
- for (f.unshift.apply(f, o), f.push.apply(f, d), _ = f.length, u = Promise.resolve(r); h < _; )
1517
- u = u.then(f[h++], f[h++]);
1515
+ const d = [Dt.bind(this), void 0];
1516
+ for (d.unshift.apply(d, o), d.push.apply(d, f), _ = d.length, u = Promise.resolve(r); h < _; )
1517
+ u = u.then(d[h++], d[h++]);
1518
1518
  return u;
1519
1519
  }
1520
1520
  _ = o.length;
1521
- let w = r;
1521
+ let R = r;
1522
1522
  for (h = 0; h < _; ) {
1523
- const f = o[h++], m = o[h++];
1523
+ const d = o[h++], m = o[h++];
1524
1524
  try {
1525
- w = f(w);
1526
- } catch (S) {
1527
- m.call(this, S);
1525
+ R = d(R);
1526
+ } catch (v) {
1527
+ m.call(this, v);
1528
1528
  break;
1529
1529
  }
1530
1530
  }
1531
1531
  try {
1532
- u = Dt.call(this, w);
1533
- } catch (f) {
1534
- return Promise.reject(f);
1532
+ u = Dt.call(this, R);
1533
+ } catch (d) {
1534
+ return Promise.reject(d);
1535
1535
  }
1536
- for (h = 0, _ = d.length; h < _; )
1537
- u = u.then(d[h++], d[h++]);
1536
+ for (h = 0, _ = f.length; h < _; )
1537
+ u = u.then(f[h++], f[h++]);
1538
1538
  return u;
1539
1539
  }
1540
1540
  getUri(t) {
1541
1541
  t = K(this.defaults, t);
1542
- const r = br(t.baseURL, t.url);
1542
+ const r = Er(t.baseURL, t.url);
1543
1543
  return fr(r, t.params, t.paramsSerializer);
1544
1544
  }
1545
1545
  }
@@ -1568,7 +1568,7 @@ c.forEach(["post", "put", "patch"], function(t) {
1568
1568
  Ee.prototype[t] = r(), Ee.prototype[t + "Form"] = r(!0);
1569
1569
  });
1570
1570
  var me = Ee;
1571
- class bt {
1571
+ class Et {
1572
1572
  constructor(t) {
1573
1573
  if (typeof t != "function")
1574
1574
  throw new TypeError("executor must be a function.");
@@ -1629,14 +1629,14 @@ class bt {
1629
1629
  static source() {
1630
1630
  let t;
1631
1631
  return {
1632
- token: new bt(function(s) {
1632
+ token: new Et(function(s) {
1633
1633
  t = s;
1634
1634
  }),
1635
1635
  cancel: t
1636
1636
  };
1637
1637
  }
1638
1638
  }
1639
- var Bs = bt;
1639
+ var Bs = Et;
1640
1640
  function js(e) {
1641
1641
  return function(r) {
1642
1642
  return e.apply(null, r);
@@ -1724,10 +1724,10 @@ const T = gr(mt);
1724
1724
  T.Axios = me;
1725
1725
  T.CanceledError = re;
1726
1726
  T.CancelToken = Bs;
1727
- T.isCancel = Er;
1727
+ T.isCancel = br;
1728
1728
  T.VERSION = yr;
1729
- T.toFormData = we;
1730
- T.AxiosError = E;
1729
+ T.toFormData = ve;
1730
+ T.AxiosError = b;
1731
1731
  T.Cancel = T.CanceledError;
1732
1732
  T.all = function(t) {
1733
1733
  return Promise.all(t);
@@ -1758,8 +1758,8 @@ const Rr = (e) => typeof e == "object" && e !== null, wr = Symbol("skip"), Ut =
1758
1758
  const l = t(a, o, e);
1759
1759
  if (l === wr)
1760
1760
  continue;
1761
- let [d, u, { shouldRecurse: h = !0 } = {}] = l;
1762
- d !== "__proto__" && (r.deep && h && Ut(u) && (u = Array.isArray(u) ? i(u) : ct(u, t, r, n)), s[d] = u);
1761
+ let [f, u, { shouldRecurse: h = !0 } = {}] = l;
1762
+ f !== "__proto__" && (r.deep && h && Ut(u) && (u = Array.isArray(u) ? i(u) : ct(u, t, r, n)), s[f] = u);
1763
1763
  }
1764
1764
  return s;
1765
1765
  };
@@ -1769,7 +1769,7 @@ _t.exports = (e, t, r) => {
1769
1769
  return ct(e, t, r);
1770
1770
  };
1771
1771
  _t.exports.mapObjectSkip = wr;
1772
- var Sr = _t.exports, yt = { exports: {} };
1772
+ var vr = _t.exports, yt = { exports: {} };
1773
1773
  const Ls = (e) => {
1774
1774
  let t = !1, r = !1, n = !1;
1775
1775
  for (let s = 0; s < e.length; s++) {
@@ -1777,7 +1777,7 @@ const Ls = (e) => {
1777
1777
  t && /[a-zA-Z]/.test(i) && i.toUpperCase() === i ? (e = e.slice(0, s) + "-" + e.slice(s), t = !1, n = r, r = !0, s++) : r && n && /[a-zA-Z]/.test(i) && i.toLowerCase() === i ? (e = e.slice(0, s - 1) + "-" + e.slice(s - 1), n = r, r = !1, t = !0) : (t = i.toLowerCase() === i && i.toUpperCase() !== i, n = r, r = i.toUpperCase() === i && i.toLowerCase() !== i);
1778
1778
  }
1779
1779
  return e;
1780
- }, vr = (e, t) => {
1780
+ }, Or = (e, t) => {
1781
1781
  if (!(typeof e == "string" || Array.isArray(e)))
1782
1782
  throw new TypeError("Expected the input to be `string | string[]`");
1783
1783
  t = Object.assign({
@@ -1786,8 +1786,8 @@ const Ls = (e) => {
1786
1786
  const r = (s) => t.pascalCase ? s.charAt(0).toUpperCase() + s.slice(1) : s;
1787
1787
  return Array.isArray(e) ? e = e.map((s) => s.trim()).filter((s) => s.length).join("-") : e = e.trim(), e.length === 0 ? "" : e.length === 1 ? t.pascalCase ? e.toUpperCase() : e.toLowerCase() : (e !== e.toLowerCase() && (e = Ls(e)), e = e.replace(/^[_.\- ]+/, "").toLowerCase().replace(/[_.\- ]+(\w|$)/g, (s, i) => i.toUpperCase()).replace(/\d+(\w|$)/g, (s) => s.toUpperCase()), r(e));
1788
1788
  };
1789
- yt.exports = vr;
1790
- yt.exports.default = vr;
1789
+ yt.exports = Or;
1790
+ yt.exports.default = Or;
1791
1791
  var Ds = yt.exports;
1792
1792
  class Ms {
1793
1793
  constructor(t = {}) {
@@ -1849,7 +1849,7 @@ class Ms {
1849
1849
  }
1850
1850
  }
1851
1851
  var Is = Ms;
1852
- const $t = Sr, Us = Ds, $s = Is, Hs = (e, t) => e.some((r) => typeof r == "string" ? r === t : (r.lastIndex = 0, r.test(t))), Je = new $s({ maxSize: 1e5 }), Ht = (e) => typeof e == "object" && e !== null && !(e instanceof RegExp) && !(e instanceof Error) && !(e instanceof Date), qt = (e, t) => {
1852
+ const $t = vr, Us = Ds, $s = Is, Hs = (e, t) => e.some((r) => typeof r == "string" ? r === t : (r.lastIndex = 0, r.test(t))), Ye = new $s({ maxSize: 1e5 }), Ht = (e) => typeof e == "object" && e !== null && !(e instanceof RegExp) && !(e instanceof Error) && !(e instanceof Date), qt = (e, t) => {
1853
1853
  if (!Ht(e))
1854
1854
  return e;
1855
1855
  t = {
@@ -1857,37 +1857,37 @@ const $t = Sr, Us = Ds, $s = Is, Hs = (e, t) => e.some((r) => typeof r == "strin
1857
1857
  pascalCase: !1,
1858
1858
  ...t
1859
1859
  };
1860
- const { exclude: r, pascalCase: n, stopPaths: s, deep: i } = t, a = new Set(s), o = (l) => (d, u) => {
1860
+ const { exclude: r, pascalCase: n, stopPaths: s, deep: i } = t, a = new Set(s), o = (l) => (f, u) => {
1861
1861
  if (i && Ht(u)) {
1862
- const h = l === void 0 ? d : `${l}.${d}`;
1862
+ const h = l === void 0 ? f : `${l}.${f}`;
1863
1863
  a.has(h) || (u = $t(u, o(h)));
1864
1864
  }
1865
- if (!(r && Hs(r, d))) {
1866
- const h = n ? `${d}_` : d;
1867
- if (Je.has(h))
1868
- d = Je.get(h);
1865
+ if (!(r && Hs(r, f))) {
1866
+ const h = n ? `${f}_` : f;
1867
+ if (Ye.has(h))
1868
+ f = Ye.get(h);
1869
1869
  else {
1870
- const _ = Us(d, { pascalCase: n });
1871
- d.length < 100 && Je.set(h, _), d = _;
1870
+ const _ = Us(f, { pascalCase: n });
1871
+ f.length < 100 && Ye.set(h, _), f = _;
1872
1872
  }
1873
1873
  }
1874
- return [d, u];
1874
+ return [f, u];
1875
1875
  };
1876
1876
  return $t(e, o(void 0));
1877
1877
  };
1878
- var qs = (e, t) => Array.isArray(e) ? Object.keys(e).map((r) => qt(e[r], t)) : qt(e, t), Ye, Ft;
1879
- function Or() {
1880
- return Ft || (Ft = 1, Ye = Or()), Ye;
1878
+ var qs = (e, t) => Array.isArray(e) ? Object.keys(e).map((r) => qt(e[r], t)) : qt(e, t), Xe, Ft;
1879
+ function Sr() {
1880
+ return Ft || (Ft = 1, Xe = Sr()), Xe;
1881
1881
  }
1882
- var be = function() {
1883
- return be = Object.assign || function(t) {
1882
+ var _e = function() {
1883
+ return _e = Object.assign || function(t) {
1884
1884
  for (var r, n = 1, s = arguments.length; n < s; n++) {
1885
1885
  r = arguments[n];
1886
1886
  for (var i in r)
1887
1887
  Object.prototype.hasOwnProperty.call(r, i) && (t[i] = r[i]);
1888
1888
  }
1889
1889
  return t;
1890
- }, be.apply(this, arguments);
1890
+ }, _e.apply(this, arguments);
1891
1891
  };
1892
1892
  function Fs(e) {
1893
1893
  return e.toLowerCase();
@@ -1895,11 +1895,11 @@ function Fs(e) {
1895
1895
  var ks = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g], zs = /[^A-Z0-9]+/gi;
1896
1896
  function Vs(e, t) {
1897
1897
  t === void 0 && (t = {});
1898
- for (var r = t.splitRegexp, n = r === void 0 ? ks : r, s = t.stripRegexp, i = s === void 0 ? zs : s, a = t.transform, o = a === void 0 ? Fs : a, l = t.delimiter, d = l === void 0 ? " " : l, u = kt(kt(e, n, "$1\0$2"), i, "\0"), h = 0, _ = u.length; u.charAt(h) === "\0"; )
1898
+ for (var r = t.splitRegexp, n = r === void 0 ? ks : r, s = t.stripRegexp, i = s === void 0 ? zs : s, a = t.transform, o = a === void 0 ? Fs : a, l = t.delimiter, f = l === void 0 ? " " : l, u = kt(kt(e, n, "$1\0$2"), i, "\0"), h = 0, _ = u.length; u.charAt(h) === "\0"; )
1899
1899
  h++;
1900
1900
  for (; u.charAt(_ - 1) === "\0"; )
1901
1901
  _--;
1902
- return u.slice(h, _).split("\0").map(o).join(d);
1902
+ return u.slice(h, _).split("\0").map(o).join(f);
1903
1903
  }
1904
1904
  function kt(e, t, r) {
1905
1905
  return t instanceof RegExp ? e.replace(t, r) : t.reduce(function(n, s) {
@@ -1907,18 +1907,18 @@ function kt(e, t, r) {
1907
1907
  }, e);
1908
1908
  }
1909
1909
  function Gs(e, t) {
1910
- return t === void 0 && (t = {}), Vs(e, be({ delimiter: "." }, t));
1910
+ return t === void 0 && (t = {}), Vs(e, _e({ delimiter: "." }, t));
1911
1911
  }
1912
1912
  function Ws(e, t) {
1913
- return t === void 0 && (t = {}), Gs(e, be({ delimiter: "_" }, t));
1913
+ return t === void 0 && (t = {}), Gs(e, _e({ delimiter: "_" }, t));
1914
1914
  }
1915
1915
  const Ks = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1916
1916
  __proto__: null,
1917
1917
  snakeCase: Ws
1918
- }, Symbol.toStringTag, { value: "Module" })), Js = /* @__PURE__ */ Qr(Ks);
1919
- var Ys = ei, Xs = /\s/, Qs = /(_|-|\.|:)/, Zs = /([a-z][A-Z]|[A-Z][a-z])/;
1918
+ }, Symbol.toStringTag, { value: "Module" })), Js = /* @__PURE__ */ Zr(Ks);
1919
+ var Ys = ei, Xs = /\s/, Zs = /(_|-|\.|:)/, Qs = /([a-z][A-Z]|[A-Z][a-z])/;
1920
1920
  function ei(e) {
1921
- return Xs.test(e) ? e.toLowerCase() : Qs.test(e) ? (ri(e) || e).toLowerCase() : Zs.test(e) ? si(e).toLowerCase() : e.toLowerCase();
1921
+ return Xs.test(e) ? e.toLowerCase() : Zs.test(e) ? (ri(e) || e).toLowerCase() : Qs.test(e) ? si(e).toLowerCase() : e.toLowerCase();
1922
1922
  }
1923
1923
  var ti = /[\W_]+(.|$)/g;
1924
1924
  function ri(e) {
@@ -1942,7 +1942,7 @@ var ui = ai, ci = li;
1942
1942
  function li(e) {
1943
1943
  return ui(e).replace(/\s/g, "_");
1944
1944
  }
1945
- const di = Sr, fi = ci;
1945
+ const di = vr, fi = ci;
1946
1946
  var hi = function(e, t) {
1947
1947
  return t = Object.assign({ deep: !0, exclude: [] }, t), di(e, function(r, n) {
1948
1948
  return [
@@ -1985,8 +1985,8 @@ Object.defineProperty(p, "__esModule", {
1985
1985
  value: !0
1986
1986
  });
1987
1987
  p.transformTokenResponseCamelCase = p.transformTokenRequestSnakeCase = p.transformResponseCamelCase = p.transformRequestSnakeCase = p.transformReactorResponseCamelCase = p.transformReactorRequestSnakeCase = p.transformProxyResponseCamelCase = p.transformProxyRequestSnakeCase = p.proxyRaw = p.getRuntime = p.getQueryParams = p.getOSVersion = p.getBrowser = p.errorInterceptor = p.dataExtractor = p.dataAndHeadersExtractor = p.createRequestConfig = p.concatResponseTransformerWithDefault = p.concatRequestTransformerWithDefault = p.buildUserAgentString = p.buildClientUserAgentString = p.assertInit = void 0;
1988
- var Cr = ve(Tr), N = ve(qs), zt = ve(Or()), Ei = Js, se = ve(hi), bi = ne, q = b;
1989
- function ve(e) {
1988
+ var Cr = Se(Tr), N = Se(qs), zt = Se(Sr()), bi = Js, se = Se(hi), Ei = ne, q = E;
1989
+ function Se(e) {
1990
1990
  return e && e.__esModule ? e : { default: e };
1991
1991
  }
1992
1992
  const _i = (e) => {
@@ -2043,7 +2043,7 @@ const wi = (e) => {
2043
2043
  };
2044
2044
  };
2045
2045
  p.transformTokenRequestSnakeCase = wi;
2046
- const Tt = (e) => e && (e == null ? void 0 : e.pagination) !== void 0 && (e == null ? void 0 : e.data) !== void 0, Si = (e) => {
2046
+ const Tt = (e) => e && (e == null ? void 0 : e.pagination) !== void 0 && (e == null ? void 0 : e.data) !== void 0, vi = (e) => {
2047
2047
  if (!(typeof e > "u"))
2048
2048
  return Tt(e) ? {
2049
2049
  data: e.data.map((n) => ({
@@ -2072,8 +2072,8 @@ const Tt = (e) => e && (e == null ? void 0 : e.pagination) !== void 0 && (e == n
2072
2072
  } : {}
2073
2073
  };
2074
2074
  };
2075
- p.transformTokenResponseCamelCase = Si;
2076
- const vi = (e) => {
2075
+ p.transformTokenResponseCamelCase = vi;
2076
+ const Oi = (e) => {
2077
2077
  if (!(typeof e > "u"))
2078
2078
  return Tt(e) ? {
2079
2079
  data: e.data.map((n) => ({
@@ -2096,8 +2096,8 @@ const vi = (e) => {
2096
2096
  } : {}
2097
2097
  };
2098
2098
  };
2099
- p.transformReactorResponseCamelCase = vi;
2100
- const Oi = (e) => {
2099
+ p.transformReactorResponseCamelCase = Oi;
2100
+ const Si = (e) => {
2101
2101
  if (!(typeof e > "u"))
2102
2102
  return Tt(e) ? {
2103
2103
  data: e.data.map((n) => ({
@@ -2120,7 +2120,7 @@ const Oi = (e) => {
2120
2120
  } : {}
2121
2121
  };
2122
2122
  };
2123
- p.transformProxyResponseCamelCase = Oi;
2123
+ p.transformProxyResponseCamelCase = Si;
2124
2124
  const Ci = (e) => {
2125
2125
  if (!(typeof e > "u"))
2126
2126
  return (0, N.default)(e, {
@@ -2158,7 +2158,7 @@ const Bi = (e, t) => {
2158
2158
  headers: o
2159
2159
  } = e, l = r ? {
2160
2160
  [q.API_KEY_HEADER]: r
2161
- } : {}, d = n ? {
2161
+ } : {}, f = n ? {
2162
2162
  [q.BT_TRACE_ID_HEADER]: n
2163
2163
  } : {}, u = s ? {
2164
2164
  [q.BT_IDEMPOTENCY_KEY_HEADER]: s
@@ -2168,7 +2168,7 @@ const Bi = (e, t) => {
2168
2168
  return {
2169
2169
  headers: {
2170
2170
  ...l,
2171
- ...d,
2171
+ ...f,
2172
2172
  ...u,
2173
2173
  ...h,
2174
2174
  ...typeof o < "u" && {
@@ -2190,14 +2190,14 @@ p.createRequestConfig = Bi;
2190
2190
  const ji = (e) => {
2191
2191
  var t, r;
2192
2192
  const n = ((t = e.response) === null || t === void 0 ? void 0 : t.status) || -1, s = (r = e.response) === null || r === void 0 ? void 0 : r.data;
2193
- throw new bi.BasisTheoryApiError(e.message, n, s);
2193
+ throw new Ei.BasisTheoryApiError(e.message, n, s);
2194
2194
  };
2195
2195
  p.errorInterceptor = ji;
2196
2196
  const Ni = (e = {}) => {
2197
2197
  const t = Object.keys(e);
2198
2198
  if (t.length) {
2199
2199
  const r = new URLSearchParams(), n = (s, i, a = !1) => {
2200
- const o = typeof i, l = a ? s : (0, Ei.snakeCase)(s);
2200
+ const o = typeof i, l = a ? s : (0, bi.snakeCase)(s);
2201
2201
  (i === null || ["boolean", "number", "string"].includes(o)) && r.append(l, i);
2202
2202
  };
2203
2203
  return t.forEach((s) => {
@@ -2262,11 +2262,11 @@ const Di = (e) => {
2262
2262
  return e && (t.application = e), JSON.stringify((0, se.default)(t));
2263
2263
  };
2264
2264
  p.buildClientUserAgentString = Di;
2265
- var Oe = {};
2266
- Object.defineProperty(Oe, "__esModule", {
2265
+ var Ce = {};
2266
+ Object.defineProperty(Ce, "__esModule", {
2267
2267
  value: !0
2268
2268
  });
2269
- Oe.BasisTheoryValidationError = void 0;
2269
+ Ce.BasisTheoryValidationError = void 0;
2270
2270
  function Mi(e) {
2271
2271
  function t() {
2272
2272
  var r = Reflect.construct(e, Array.from(arguments));
@@ -2286,12 +2286,12 @@ class Rt extends Mi(Error) {
2286
2286
  super(t), this.details = r, this.validation = n, this.name = "BasisTheoryValidationError", Object.setPrototypeOf(this, Rt.prototype);
2287
2287
  }
2288
2288
  }
2289
- Oe.BasisTheoryValidationError = Rt;
2290
- var Ce = {};
2291
- Object.defineProperty(Ce, "__esModule", {
2289
+ Ce.BasisTheoryValidationError = Rt;
2290
+ var Pe = {};
2291
+ Object.defineProperty(Pe, "__esModule", {
2292
2292
  value: !0
2293
2293
  });
2294
- Ce.HttpClientError = void 0;
2294
+ Pe.HttpClientError = void 0;
2295
2295
  function Ii(e) {
2296
2296
  function t() {
2297
2297
  var r = Reflect.construct(e, Array.from(arguments));
@@ -2311,7 +2311,7 @@ class wt extends Ii(Error) {
2311
2311
  super(t), this.name = "HttpClientError", this.status = r, this.data = n, this.headers = s, Object.setPrototypeOf(this, wt.prototype);
2312
2312
  }
2313
2313
  }
2314
- Ce.HttpClientError = wt;
2314
+ Pe.HttpClientError = wt;
2315
2315
  (function(e) {
2316
2316
  Object.defineProperty(e, "__esModule", {
2317
2317
  value: !0
@@ -2337,7 +2337,7 @@ Ce.HttpClientError = wt;
2337
2337
  return a.HttpClientError;
2338
2338
  }
2339
2339
  });
2340
- var r = b;
2340
+ var r = E;
2341
2341
  Object.keys(r).forEach(function(o) {
2342
2342
  o === "default" || o === "__esModule" || Object.prototype.hasOwnProperty.call(t, o) || o in e && e[o] === r[o] || Object.defineProperty(e, o, {
2343
2343
  enumerable: !0,
@@ -2355,14 +2355,14 @@ Ce.HttpClientError = wt;
2355
2355
  }
2356
2356
  });
2357
2357
  });
2358
- var s = ne, i = Oe, a = Ce;
2359
- })(O);
2360
- var C = {}, Ui = {}, Pe = {};
2361
- Object.defineProperty(Pe, "__esModule", {
2358
+ var s = ne, i = Ce, a = Pe;
2359
+ })(S);
2360
+ var C = {}, Ui = {}, Ae = {};
2361
+ Object.defineProperty(Ae, "__esModule", {
2362
2362
  value: !0
2363
2363
  });
2364
- Pe.BasisTheoryService = void 0;
2365
- var oe = $i(Tr), $ = O;
2364
+ Ae.BasisTheoryService = void 0;
2365
+ var oe = $i(Tr), $ = S;
2366
2366
  function $i(e) {
2367
2367
  return e && e.__esModule ? e : { default: e };
2368
2368
  }
@@ -2393,7 +2393,7 @@ class Hi {
2393
2393
  }), this.client.interceptors.response.use(void 0, $.errorInterceptor);
2394
2394
  }
2395
2395
  }
2396
- Pe.BasisTheoryService = Hi;
2396
+ Ae.BasisTheoryService = Hi;
2397
2397
  (function(e) {
2398
2398
  Object.defineProperty(e, "__esModule", {
2399
2399
  value: !0
@@ -2407,7 +2407,7 @@ Pe.BasisTheoryService = Hi;
2407
2407
  }
2408
2408
  });
2409
2409
  });
2410
- var r = Pe;
2410
+ var r = Ae;
2411
2411
  Object.keys(r).forEach(function(n) {
2412
2412
  n === "default" || n === "__esModule" || n in e && e[n] === r[n] || Object.defineProperty(e, n, {
2413
2413
  enumerable: !0,
@@ -2417,11 +2417,11 @@ Pe.BasisTheoryService = Hi;
2417
2417
  });
2418
2418
  });
2419
2419
  })(C);
2420
- Object.defineProperty(ye, "__esModule", {
2420
+ Object.defineProperty(ge, "__esModule", {
2421
2421
  value: !0
2422
2422
  });
2423
- ye.BasisTheoryTransactions = void 0;
2424
- var Xe = O, X = p, qi = C;
2423
+ ge.BasisTheoryTransactions = void 0;
2424
+ var Ze = S, X = p, qi = C;
2425
2425
  class Fi extends qi.BasisTheoryService {
2426
2426
  constructor(t) {
2427
2427
  const r = {
@@ -2430,23 +2430,23 @@ class Fi extends qi.BasisTheoryService {
2430
2430
  r.transformRequest = [].concat(X.transformProxyRequestSnakeCase, t.transformRequest || []), r.transformResponse = [].concat(X.transformProxyResponseCamelCase, t.transformResponse || []), super(r);
2431
2431
  }
2432
2432
  create(t = {}) {
2433
- return this.client.post("/", void 0, (0, Xe.createRequestConfig)(t)).then(X.dataExtractor);
2433
+ return this.client.post("/", void 0, (0, Ze.createRequestConfig)(t)).then(X.dataExtractor);
2434
2434
  }
2435
2435
  commit(t, r = {}) {
2436
2436
  const n = `/${t}/commit`;
2437
- return this.client.post(n, void 0, (0, Xe.createRequestConfig)(r)).then(X.dataExtractor);
2437
+ return this.client.post(n, void 0, (0, Ze.createRequestConfig)(r)).then(X.dataExtractor);
2438
2438
  }
2439
2439
  rollback(t, r = {}) {
2440
2440
  const n = `/${t}/rollback`;
2441
- return this.client.post(n, void 0, (0, Xe.createRequestConfig)(r)).then(X.dataExtractor);
2441
+ return this.client.post(n, void 0, (0, Ze.createRequestConfig)(r)).then(X.dataExtractor);
2442
2442
  }
2443
2443
  }
2444
- ye.BasisTheoryTransactions = Fi;
2444
+ ge.BasisTheoryTransactions = Fi;
2445
2445
  (function(e) {
2446
2446
  Object.defineProperty(e, "__esModule", {
2447
2447
  value: !0
2448
2448
  });
2449
- var t = ye;
2449
+ var t = ge;
2450
2450
  Object.keys(t).forEach(function(r) {
2451
2451
  r === "default" || r === "__esModule" || r in e && e[r] === t[r] || Object.defineProperty(e, r, {
2452
2452
  enumerable: !0,
@@ -2455,44 +2455,44 @@ ye.BasisTheoryTransactions = Fi;
2455
2455
  }
2456
2456
  });
2457
2457
  });
2458
- })(Zt);
2459
- var St = {}, Ae = {}, L = {};
2458
+ })(Qt);
2459
+ var vt = {}, Be = {}, L = {};
2460
2460
  Object.defineProperty(L, "__esModule", {
2461
2461
  value: !0
2462
2462
  });
2463
2463
  L.CrudBuilder = void 0;
2464
- var v = O;
2464
+ var O = S;
2465
2465
  const ki = (e) => class extends e {
2466
2466
  create(r, n) {
2467
- return this.client.post("/", r, (0, v.createRequestConfig)(n)).then(v.dataExtractor);
2467
+ return this.client.post("/", r, (0, O.createRequestConfig)(n)).then(O.dataExtractor);
2468
2468
  }
2469
2469
  }, zi = (e) => class extends e {
2470
2470
  retrieve(r, n) {
2471
- return this.client.get(r, (0, v.createRequestConfig)(n)).then(v.dataExtractor);
2471
+ return this.client.get(r, (0, O.createRequestConfig)(n)).then(O.dataExtractor);
2472
2472
  }
2473
2473
  }, Vi = (e) => class extends e {
2474
2474
  update(r, n, s) {
2475
- return this.client.put(r, n, (0, v.createRequestConfig)(s)).then(v.dataExtractor);
2475
+ return this.client.put(r, n, (0, O.createRequestConfig)(s)).then(O.dataExtractor);
2476
2476
  }
2477
2477
  }, Gi = (e) => class extends e {
2478
2478
  patch(r, n, s) {
2479
- const i = (0, v.createRequestConfig)(s);
2479
+ const i = (0, O.createRequestConfig)(s);
2480
2480
  return this.client.patch(r, n, {
2481
2481
  ...i,
2482
2482
  headers: {
2483
2483
  ...(i == null ? void 0 : i.headers) || {},
2484
- [v.CONTENT_TYPE_HEADER]: v.MERGE_CONTENT_TYPE
2484
+ [O.CONTENT_TYPE_HEADER]: O.MERGE_CONTENT_TYPE
2485
2485
  }
2486
- }).then(v.dataExtractor);
2486
+ }).then(O.dataExtractor);
2487
2487
  }
2488
2488
  }, Wi = (e) => class extends e {
2489
2489
  async delete(r, n) {
2490
- await this.client.delete(r, (0, v.createRequestConfig)(n));
2490
+ await this.client.delete(r, (0, O.createRequestConfig)(n));
2491
2491
  }
2492
2492
  }, Ki = (e) => class extends e {
2493
2493
  list(r = {}, n = {}) {
2494
- const s = `/${(0, v.getQueryParams)(r)}`;
2495
- return this.client.get(s, (0, v.createRequestConfig)(n)).then(v.dataExtractor);
2494
+ const s = `/${(0, O.getQueryParams)(r)}`;
2495
+ return this.client.get(s, (0, O.createRequestConfig)(n)).then(O.dataExtractor);
2496
2496
  }
2497
2497
  };
2498
2498
  class Ji {
@@ -2522,12 +2522,12 @@ class Ji {
2522
2522
  }
2523
2523
  }
2524
2524
  L.CrudBuilder = Ji;
2525
- Object.defineProperty(Ae, "__esModule", {
2525
+ Object.defineProperty(Be, "__esModule", {
2526
2526
  value: !0
2527
2527
  });
2528
- Ae.BasisTheoryApplications = void 0;
2529
- var ue = O, Yi = C, Xi = L;
2530
- const Qi = new Xi.CrudBuilder(class extends Yi.BasisTheoryService {
2528
+ Be.BasisTheoryApplications = void 0;
2529
+ var ue = S, Yi = C, Xi = L;
2530
+ const Zi = new Xi.CrudBuilder(class extends Yi.BasisTheoryService {
2531
2531
  /**
2532
2532
  * @deprecated use {@link retrieveByKey} instead
2533
2533
  */
@@ -2541,7 +2541,7 @@ const Qi = new Xi.CrudBuilder(class extends Yi.BasisTheoryService {
2541
2541
  return this.client.post(`${t}/regenerate`, void 0, (0, ue.createRequestConfig)(r)).then(ue.dataExtractor);
2542
2542
  }
2543
2543
  }).create().retrieve().update().delete().list().build();
2544
- Ae.BasisTheoryApplications = Qi;
2544
+ Be.BasisTheoryApplications = Zi;
2545
2545
  (function(e) {
2546
2546
  Object.defineProperty(e, "__esModule", {
2547
2547
  value: !0
@@ -2551,15 +2551,15 @@ Ae.BasisTheoryApplications = Qi;
2551
2551
  return t.BasisTheoryApplications;
2552
2552
  }
2553
2553
  });
2554
- var t = Ae;
2555
- })(St);
2556
- var Nr = {}, xr = {}, Be = {}, Lr = {}, je = {};
2557
- Object.defineProperty(je, "__esModule", {
2554
+ var t = Be;
2555
+ })(vt);
2556
+ var Nr = {}, xr = {}, je = {}, Lr = {}, Ne = {};
2557
+ Object.defineProperty(Ne, "__esModule", {
2558
2558
  value: !0
2559
2559
  });
2560
- je.BasisTheoryTokenize = void 0;
2561
- var ce = O, Zi = C;
2562
- class ea extends Zi.BasisTheoryService {
2560
+ Ne.BasisTheoryTokenize = void 0;
2561
+ var ce = S, Qi = C;
2562
+ class ea extends Qi.BasisTheoryService {
2563
2563
  tokenize(t, r = {}) {
2564
2564
  return this.client.post("/", t, (0, ce.createRequestConfig)(r, {
2565
2565
  transformRequest: ce.proxyRaw,
@@ -2567,7 +2567,7 @@ class ea extends Zi.BasisTheoryService {
2567
2567
  })).then(ce.dataExtractor);
2568
2568
  }
2569
2569
  }
2570
- je.BasisTheoryTokenize = ea;
2570
+ Ne.BasisTheoryTokenize = ea;
2571
2571
  (function(e) {
2572
2572
  Object.defineProperty(e, "__esModule", {
2573
2573
  value: !0
@@ -2577,25 +2577,25 @@ je.BasisTheoryTokenize = ea;
2577
2577
  return t.BasisTheoryTokenize;
2578
2578
  }
2579
2579
  });
2580
- var t = je;
2580
+ var t = Ne;
2581
2581
  })(Lr);
2582
- Object.defineProperty(Be, "__esModule", {
2582
+ Object.defineProperty(je, "__esModule", {
2583
2583
  value: !0
2584
2584
  });
2585
- Be.delegateTokenize = void 0;
2585
+ je.delegateTokenize = void 0;
2586
2586
  var ta = Lr;
2587
2587
  const ra = (e) => class extends ta.BasisTheoryTokenize {
2588
2588
  tokenize(r, n) {
2589
2589
  return e != null && e.hasElement(r) ? e.tokenize(r, n) : super.tokenize(r, n);
2590
2590
  }
2591
2591
  };
2592
- Be.delegateTokenize = ra;
2593
- var Ne = {}, vt = {}, xe = {};
2594
- Object.defineProperty(xe, "__esModule", {
2592
+ je.delegateTokenize = ra;
2593
+ var xe = {}, Ot = {}, Le = {};
2594
+ Object.defineProperty(Le, "__esModule", {
2595
2595
  value: !0
2596
2596
  });
2597
- xe.BasisTheoryTokens = void 0;
2598
- var B = O, H = p, na = C, sa = L;
2597
+ Le.BasisTheoryTokens = void 0;
2598
+ var B = S, H = p, na = C, sa = L;
2599
2599
  const ia = new sa.CrudBuilder(class extends na.BasisTheoryService {
2600
2600
  constructor(t) {
2601
2601
  const r = t;
@@ -2635,7 +2635,7 @@ const ia = new sa.CrudBuilder(class extends na.BasisTheoryService {
2635
2635
  return this.client.post("/search", t, (0, B.createRequestConfig)(r)).then(H.dataExtractor);
2636
2636
  }
2637
2637
  }).create().delete().list().build();
2638
- xe.BasisTheoryTokens = ia;
2638
+ Le.BasisTheoryTokens = ia;
2639
2639
  (function(e) {
2640
2640
  Object.defineProperty(e, "__esModule", {
2641
2641
  value: !0
@@ -2645,13 +2645,13 @@ xe.BasisTheoryTokens = ia;
2645
2645
  return t.BasisTheoryTokens;
2646
2646
  }
2647
2647
  });
2648
- var t = xe;
2649
- })(vt);
2650
- Object.defineProperty(Ne, "__esModule", {
2648
+ var t = Le;
2649
+ })(Ot);
2650
+ Object.defineProperty(xe, "__esModule", {
2651
2651
  value: !0
2652
2652
  });
2653
- Ne.delegateTokens = void 0;
2654
- var aa = vt;
2653
+ xe.delegateTokens = void 0;
2654
+ var aa = Ot;
2655
2655
  const oa = (e) => class extends aa.BasisTheoryTokens {
2656
2656
  create(r, n) {
2657
2657
  return e != null && e.hasElement(r) ? e.tokens.create(r, n) : super.create(r, n);
@@ -2663,13 +2663,13 @@ const oa = (e) => class extends aa.BasisTheoryTokens {
2663
2663
  return e !== void 0 ? e.tokens.retrieve(r, n) : super.retrieve(r, n);
2664
2664
  }
2665
2665
  };
2666
- Ne.delegateTokens = oa;
2667
- var Le = {}, Dr = {}, De = {};
2668
- Object.defineProperty(De, "__esModule", {
2666
+ xe.delegateTokens = oa;
2667
+ var De = {}, Dr = {}, Me = {};
2668
+ Object.defineProperty(Me, "__esModule", {
2669
2669
  value: !0
2670
2670
  });
2671
- De.BasisTheoryProxy = void 0;
2672
- var M = O, ua = C;
2671
+ Me.BasisTheoryProxy = void 0;
2672
+ var M = S, ua = C;
2673
2673
  class ca extends ua.BasisTheoryService {
2674
2674
  get(t) {
2675
2675
  return this.proxyRequest("get", t);
@@ -2702,12 +2702,12 @@ class ca extends ua.BasisTheoryService {
2702
2702
  })).then(M.dataExtractor);
2703
2703
  }
2704
2704
  }
2705
- De.BasisTheoryProxy = ca;
2705
+ Me.BasisTheoryProxy = ca;
2706
2706
  (function(e) {
2707
2707
  Object.defineProperty(e, "__esModule", {
2708
2708
  value: !0
2709
2709
  });
2710
- var t = De;
2710
+ var t = Me;
2711
2711
  Object.keys(t).forEach(function(r) {
2712
2712
  r === "default" || r === "__esModule" || r in e && e[r] === t[r] || Object.defineProperty(e, r, {
2713
2713
  enumerable: !0,
@@ -2717,10 +2717,10 @@ De.BasisTheoryProxy = ca;
2717
2717
  });
2718
2718
  });
2719
2719
  })(Dr);
2720
- Object.defineProperty(Le, "__esModule", {
2720
+ Object.defineProperty(De, "__esModule", {
2721
2721
  value: !0
2722
2722
  });
2723
- Le.delegateProxy = void 0;
2723
+ De.delegateProxy = void 0;
2724
2724
  var la = Dr;
2725
2725
  const da = (e) => class extends la.BasisTheoryProxy {
2726
2726
  get(r) {
@@ -2739,12 +2739,12 @@ const da = (e) => class extends la.BasisTheoryProxy {
2739
2739
  return e !== void 0 ? e.proxy.delete(r) : super.delete(r);
2740
2740
  }
2741
2741
  };
2742
- Le.delegateProxy = da;
2742
+ De.delegateProxy = da;
2743
2743
  (function(e) {
2744
2744
  Object.defineProperty(e, "__esModule", {
2745
2745
  value: !0
2746
2746
  });
2747
- var t = Be;
2747
+ var t = je;
2748
2748
  Object.keys(t).forEach(function(s) {
2749
2749
  s === "default" || s === "__esModule" || s in e && e[s] === t[s] || Object.defineProperty(e, s, {
2750
2750
  enumerable: !0,
@@ -2753,7 +2753,7 @@ Le.delegateProxy = da;
2753
2753
  }
2754
2754
  });
2755
2755
  });
2756
- var r = Ne;
2756
+ var r = xe;
2757
2757
  Object.keys(r).forEach(function(s) {
2758
2758
  s === "default" || s === "__esModule" || s in e && e[s] === r[s] || Object.defineProperty(e, s, {
2759
2759
  enumerable: !0,
@@ -2762,7 +2762,7 @@ Le.delegateProxy = da;
2762
2762
  }
2763
2763
  });
2764
2764
  });
2765
- var n = Le;
2765
+ var n = De;
2766
2766
  Object.keys(n).forEach(function(s) {
2767
2767
  s === "default" || s === "__esModule" || s in e && e[s] === n[s] || Object.defineProperty(e, s, {
2768
2768
  enumerable: !0,
@@ -2788,32 +2788,32 @@ const ha = (e) => {
2788
2788
  return r.append(t), t;
2789
2789
  };
2790
2790
  F.injectScript = ha;
2791
- var Me = {}, R = {};
2792
- Object.defineProperty(R, "__esModule", {
2791
+ var Ie = {}, w = {};
2792
+ Object.defineProperty(w, "__esModule", {
2793
2793
  value: !0
2794
2794
  });
2795
- R.ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE = R.ELEMENTS_SCRIPT_LOAD_ERROR_MESSAGE = R.ELEMENTS_NOM_DOM_ERROR_MESSAGE = R.ELEMENTS_INIT_ERROR_MESSAGE = R.CARD_ICON_POSITIONS = R.CARD_BRANDS = R.AUTOCOMPLETE_VALUES = void 0;
2795
+ w.ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE = w.ELEMENTS_SCRIPT_LOAD_ERROR_MESSAGE = w.ELEMENTS_NOM_DOM_ERROR_MESSAGE = w.ELEMENTS_INIT_ERROR_MESSAGE = w.CARD_ICON_POSITIONS = w.CARD_BRANDS = w.AUTOCOMPLETE_VALUES = void 0;
2796
2796
  const pa = "BasisTheory Elements was not properly initialized.";
2797
- R.ELEMENTS_INIT_ERROR_MESSAGE = pa;
2797
+ w.ELEMENTS_INIT_ERROR_MESSAGE = pa;
2798
2798
  const ma = "Tried to load BasisTheoryElements in a non-DOM environment.";
2799
- R.ELEMENTS_NOM_DOM_ERROR_MESSAGE = ma;
2800
- const Ea = "Basis Theory Elements did not load properly.";
2801
- R.ELEMENTS_SCRIPT_LOAD_ERROR_MESSAGE = Ea;
2802
- const ba = "There was an unknown error when loading Basis Theory Elements. Check the console for details.";
2803
- R.ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE = ba;
2799
+ w.ELEMENTS_NOM_DOM_ERROR_MESSAGE = ma;
2800
+ const ba = "Basis Theory Elements did not load properly.";
2801
+ w.ELEMENTS_SCRIPT_LOAD_ERROR_MESSAGE = ba;
2802
+ const Ea = "There was an unknown error when loading Basis Theory Elements. Check the console for details.";
2803
+ w.ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE = Ea;
2804
2804
  const _a = ["visa", "mastercard", "american-express", "discover", "diners-club", "jcb", "unionpay", "maestro", "elo", "hiper", "hipercard", "mir", "unknown"];
2805
- R.CARD_BRANDS = _a;
2805
+ w.CARD_BRANDS = _a;
2806
2806
  const ya = ["left", "right", "none"];
2807
- R.CARD_ICON_POSITIONS = ya;
2807
+ w.CARD_ICON_POSITIONS = ya;
2808
2808
  const ga = ["off", "on"];
2809
- R.AUTOCOMPLETE_VALUES = ga;
2810
- Object.defineProperty(Me, "__esModule", {
2809
+ w.AUTOCOMPLETE_VALUES = ga;
2810
+ Object.defineProperty(Ie, "__esModule", {
2811
2811
  value: !0
2812
2812
  });
2813
- Me.loadElements = void 0;
2814
- var Qe = R, Vt = F;
2815
- let Ze;
2816
- const Ta = (e) => (Ze || (Ze = new Promise((t, r) => {
2813
+ Ie.loadElements = void 0;
2814
+ var Qe = w, Vt = F;
2815
+ let et;
2816
+ const Ta = (e) => (et || (et = new Promise((t, r) => {
2817
2817
  if (typeof window != "object") {
2818
2818
  r(new Error(Qe.ELEMENTS_NOM_DOM_ERROR_MESSAGE));
2819
2819
  return;
@@ -2840,8 +2840,8 @@ const Ta = (e) => (Ze || (Ze = new Promise((t, r) => {
2840
2840
  r(n);
2841
2841
  return;
2842
2842
  }
2843
- })), Ze);
2844
- Me.loadElements = Ta;
2843
+ })), et);
2844
+ Ie.loadElements = Ta;
2845
2845
  (function(e) {
2846
2846
  Object.defineProperty(e, "__esModule", {
2847
2847
  value: !0
@@ -2864,7 +2864,7 @@ Me.loadElements = Ta;
2864
2864
  }
2865
2865
  });
2866
2866
  });
2867
- var n = Me;
2867
+ var n = Ie;
2868
2868
  Object.keys(n).forEach(function(s) {
2869
2869
  s === "default" || s === "__esModule" || s in e && e[s] === n[s] || Object.defineProperty(e, s, {
2870
2870
  enumerable: !0,
@@ -2874,15 +2874,15 @@ Me.loadElements = Ta;
2874
2874
  });
2875
2875
  });
2876
2876
  })(Nr);
2877
- var Mr = {}, Ie = {};
2878
- Object.defineProperty(Ie, "__esModule", {
2877
+ var Mr = {}, Ue = {};
2878
+ Object.defineProperty(Ue, "__esModule", {
2879
2879
  value: !0
2880
2880
  });
2881
- Ie.BasisTheoryLogs = void 0;
2881
+ Ue.BasisTheoryLogs = void 0;
2882
2882
  var Ra = C, wa = L;
2883
- const Sa = new wa.CrudBuilder(class extends Ra.BasisTheoryService {
2883
+ const va = new wa.CrudBuilder(class extends Ra.BasisTheoryService {
2884
2884
  }).list().build();
2885
- Ie.BasisTheoryLogs = Sa;
2885
+ Ue.BasisTheoryLogs = va;
2886
2886
  (function(e) {
2887
2887
  Object.defineProperty(e, "__esModule", {
2888
2888
  value: !0
@@ -2892,20 +2892,20 @@ Ie.BasisTheoryLogs = Sa;
2892
2892
  return t.BasisTheoryLogs;
2893
2893
  }
2894
2894
  });
2895
- var t = Ie;
2895
+ var t = Ue;
2896
2896
  })(Mr);
2897
- var Ir = {}, Ue = {};
2898
- Object.defineProperty(Ue, "__esModule", {
2897
+ var Ir = {}, $e = {};
2898
+ Object.defineProperty($e, "__esModule", {
2899
2899
  value: !0
2900
2900
  });
2901
- Ue.BasisTheoryPermissions = void 0;
2902
- var Gt = O, va = C;
2903
- class Oa extends va.BasisTheoryService {
2901
+ $e.BasisTheoryPermissions = void 0;
2902
+ var Gt = S, Oa = C;
2903
+ class Sa extends Oa.BasisTheoryService {
2904
2904
  list(t) {
2905
2905
  return this.client.get("/", (0, Gt.createRequestConfig)(t)).then(Gt.dataExtractor);
2906
2906
  }
2907
2907
  }
2908
- Ue.BasisTheoryPermissions = Oa;
2908
+ $e.BasisTheoryPermissions = Sa;
2909
2909
  (function(e) {
2910
2910
  Object.defineProperty(e, "__esModule", {
2911
2911
  value: !0
@@ -2915,13 +2915,13 @@ Ue.BasisTheoryPermissions = Oa;
2915
2915
  return t.BasisTheoryPermissions;
2916
2916
  }
2917
2917
  });
2918
- var t = Ue;
2918
+ var t = $e;
2919
2919
  })(Ir);
2920
- var Ur = {}, $e = {};
2921
- Object.defineProperty($e, "__esModule", {
2920
+ var Ur = {}, He = {};
2921
+ Object.defineProperty(He, "__esModule", {
2922
2922
  value: !0
2923
2923
  });
2924
- $e.BasisTheoryProxies = void 0;
2924
+ He.BasisTheoryProxies = void 0;
2925
2925
  var Wt = p, Ca = C, Pa = L;
2926
2926
  const Aa = new Pa.CrudBuilder(class extends Ca.BasisTheoryService {
2927
2927
  constructor(t) {
@@ -2931,12 +2931,12 @@ const Aa = new Pa.CrudBuilder(class extends Ca.BasisTheoryService {
2931
2931
  r.transformRequest = [].concat(Wt.transformProxyRequestSnakeCase, t.transformRequest || []), r.transformResponse = [].concat(Wt.transformProxyResponseCamelCase, t.transformResponse || []), super(r);
2932
2932
  }
2933
2933
  }).create().retrieve().update().patch().delete().list().build();
2934
- $e.BasisTheoryProxies = Aa;
2934
+ He.BasisTheoryProxies = Aa;
2935
2935
  (function(e) {
2936
2936
  Object.defineProperty(e, "__esModule", {
2937
2937
  value: !0
2938
2938
  });
2939
- var t = $e;
2939
+ var t = He;
2940
2940
  Object.keys(t).forEach(function(r) {
2941
2941
  r === "default" || r === "__esModule" || r in e && e[r] === t[r] || Object.defineProperty(e, r, {
2942
2942
  enumerable: !0,
@@ -2946,15 +2946,15 @@ $e.BasisTheoryProxies = Aa;
2946
2946
  });
2947
2947
  });
2948
2948
  })(Ur);
2949
- var $r = {}, He = {};
2950
- Object.defineProperty(He, "__esModule", {
2949
+ var $r = {}, qe = {};
2950
+ Object.defineProperty(qe, "__esModule", {
2951
2951
  value: !0
2952
2952
  });
2953
- He.BasisTheoryReactorFormulas = void 0;
2953
+ qe.BasisTheoryReactorFormulas = void 0;
2954
2954
  var Ba = C, ja = L;
2955
2955
  const Na = new ja.CrudBuilder(class extends Ba.BasisTheoryService {
2956
2956
  }).create().retrieve().update().delete().list().build();
2957
- He.BasisTheoryReactorFormulas = Na;
2957
+ qe.BasisTheoryReactorFormulas = Na;
2958
2958
  (function(e) {
2959
2959
  Object.defineProperty(e, "__esModule", {
2960
2960
  value: !0
@@ -2964,14 +2964,14 @@ He.BasisTheoryReactorFormulas = Na;
2964
2964
  return t.BasisTheoryReactorFormulas;
2965
2965
  }
2966
2966
  });
2967
- var t = He;
2967
+ var t = qe;
2968
2968
  })($r);
2969
- var Hr = {}, qe = {};
2970
- Object.defineProperty(qe, "__esModule", {
2969
+ var Hr = {}, Fe = {};
2970
+ Object.defineProperty(Fe, "__esModule", {
2971
2971
  value: !0
2972
2972
  });
2973
- qe.BasisTheoryReactors = void 0;
2974
- var le = O, Kt = p, xa = C, La = L;
2973
+ Fe.BasisTheoryReactors = void 0;
2974
+ var le = S, Kt = p, xa = C, La = L;
2975
2975
  const Da = new La.CrudBuilder(class extends xa.BasisTheoryService {
2976
2976
  constructor(t) {
2977
2977
  const r = {
@@ -2986,7 +2986,7 @@ const Da = new La.CrudBuilder(class extends xa.BasisTheoryService {
2986
2986
  })).then(le.dataExtractor);
2987
2987
  }
2988
2988
  }).create().retrieve().update().patch().delete().list().build();
2989
- qe.BasisTheoryReactors = Da;
2989
+ Fe.BasisTheoryReactors = Da;
2990
2990
  (function(e) {
2991
2991
  Object.defineProperty(e, "__esModule", {
2992
2992
  value: !0
@@ -2996,14 +2996,14 @@ qe.BasisTheoryReactors = Da;
2996
2996
  return t.BasisTheoryReactors;
2997
2997
  }
2998
2998
  });
2999
- var t = qe;
2999
+ var t = Fe;
3000
3000
  })(Hr);
3001
- var qr = {}, Fe = {};
3002
- Object.defineProperty(Fe, "__esModule", {
3001
+ var qr = {}, ke = {};
3002
+ Object.defineProperty(ke, "__esModule", {
3003
3003
  value: !0
3004
3004
  });
3005
- Fe.BasisTheorySessions = void 0;
3006
- var Jt = O, de = p, Ma = C;
3005
+ ke.BasisTheorySessions = void 0;
3006
+ var Jt = S, de = p, Ma = C;
3007
3007
  class Ia extends Ma.BasisTheoryService {
3008
3008
  constructor(t) {
3009
3009
  const r = {
@@ -3018,7 +3018,7 @@ class Ia extends Ma.BasisTheoryService {
3018
3018
  return this.client.post("/authorize", t, (0, Jt.createRequestConfig)(r)).then(de.dataExtractor);
3019
3019
  }
3020
3020
  }
3021
- Fe.BasisTheorySessions = Ia;
3021
+ ke.BasisTheorySessions = Ia;
3022
3022
  (function(e) {
3023
3023
  Object.defineProperty(e, "__esModule", {
3024
3024
  value: !0
@@ -3028,14 +3028,14 @@ Fe.BasisTheorySessions = Ia;
3028
3028
  return t.BasisTheorySessions;
3029
3029
  }
3030
3030
  });
3031
- var t = Fe;
3031
+ var t = ke;
3032
3032
  })(qr);
3033
- var Fr = {}, ke = {};
3034
- Object.defineProperty(ke, "__esModule", {
3033
+ var Fr = {}, ze = {};
3034
+ Object.defineProperty(ze, "__esModule", {
3035
3035
  value: !0
3036
3036
  });
3037
- ke.BasisTheoryTenants = void 0;
3038
- var g = O, Ua = C, $a = L;
3037
+ ze.BasisTheoryTenants = void 0;
3038
+ var g = S, Ua = C, $a = L;
3039
3039
  const Ha = new $a.CrudBuilder(class extends Ua.BasisTheoryService {
3040
3040
  retrieve(t) {
3041
3041
  return this.client.get("/", (0, g.createRequestConfig)(t)).then(g.dataExtractor);
@@ -3073,7 +3073,7 @@ const Ha = new $a.CrudBuilder(class extends Ua.BasisTheoryService {
3073
3073
  await this.client.delete(`/members/${t}`, (0, g.createRequestConfig)(r));
3074
3074
  }
3075
3075
  }).build();
3076
- ke.BasisTheoryTenants = Ha;
3076
+ ze.BasisTheoryTenants = Ha;
3077
3077
  (function(e) {
3078
3078
  Object.defineProperty(e, "__esModule", {
3079
3079
  value: !0
@@ -3083,22 +3083,22 @@ ke.BasisTheoryTenants = Ha;
3083
3083
  return t.BasisTheoryTenants;
3084
3084
  }
3085
3085
  });
3086
- var t = ke;
3086
+ var t = ze;
3087
3087
  })(Fr);
3088
- Object.defineProperty(_e, "__esModule", {
3088
+ Object.defineProperty(ye, "__esModule", {
3089
3089
  value: !0
3090
3090
  });
3091
- _e.BasisTheory = void 0;
3092
- var Q = W, qa = Zt, Fa = St, y = O, fe = Nr, ka = R, za = Mr, Va = Ir, Ga = Ur, Wa = $r, Ka = Hr, Ja = qr, Ya = Fr;
3091
+ ye.BasisTheory = void 0;
3092
+ var Z = W, qa = Qt, Fa = vt, y = S, fe = Nr, ka = w, za = Mr, Va = Ir, Ga = Ur, Wa = $r, Ka = Hr, Ja = qr, Ya = Fr;
3093
3093
  function Xa(e, t, r) {
3094
3094
  return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
3095
3095
  }
3096
- const Qa = {
3096
+ const Za = {
3097
3097
  apiBaseUrl: y.DEFAULT_BASE_URL,
3098
3098
  elements: !1,
3099
3099
  appInfo: {}
3100
3100
  };
3101
- class Za {
3101
+ class Qa {
3102
3102
  constructor() {
3103
3103
  Xa(this, "_initStatus", "not-started");
3104
3104
  }
@@ -3108,7 +3108,7 @@ class Za {
3108
3108
  this._initStatus = "in-progress";
3109
3109
  try {
3110
3110
  this._initOptions = Object.freeze({
3111
- ...Qa,
3111
+ ...Za,
3112
3112
  ...r
3113
3113
  });
3114
3114
  let n = this._initOptions.apiBaseUrl;
@@ -3182,19 +3182,19 @@ class Za {
3182
3182
  return (0, y.assertInit)(this._tokenize).tokenize(t, r);
3183
3183
  }
3184
3184
  post(t, r, n) {
3185
- return (0, Q.makeRequestWithElementsPayloadCheck)(this._elements, "post", t, r, n);
3185
+ return (0, Z.makeRequestWithElementsPayloadCheck)(this._elements, "post", t, r, n);
3186
3186
  }
3187
3187
  put(t, r, n) {
3188
- return (0, Q.makeRequestWithElementsPayloadCheck)(this._elements, "put", t, r, n);
3188
+ return (0, Z.makeRequestWithElementsPayloadCheck)(this._elements, "put", t, r, n);
3189
3189
  }
3190
3190
  patch(t, r, n) {
3191
- return (0, Q.makeRequestWithElementsPayloadCheck)(this._elements, "patch", t, r, n);
3191
+ return (0, Z.makeRequestWithElementsPayloadCheck)(this._elements, "patch", t, r, n);
3192
3192
  }
3193
3193
  get(t, r) {
3194
- return (0, Q.makeRequestWithoutElementsPayloadCheck)(this._elements, "get", t, r);
3194
+ return (0, Z.makeRequestWithoutElementsPayloadCheck)(this._elements, "get", t, r);
3195
3195
  }
3196
3196
  delete(t, r) {
3197
- return (0, Q.makeRequestWithoutElementsPayloadCheck)(this._elements, "delete", t, r);
3197
+ return (0, Z.makeRequestWithoutElementsPayloadCheck)(this._elements, "delete", t, r);
3198
3198
  }
3199
3199
  async loadElements(t) {
3200
3200
  let r;
@@ -3255,7 +3255,7 @@ class Za {
3255
3255
  this._elements = t;
3256
3256
  }
3257
3257
  }
3258
- _e.BasisTheory = Za;
3258
+ ye.BasisTheory = Qa;
3259
3259
  (function(e) {
3260
3260
  Object.defineProperty(e, "__esModule", {
3261
3261
  value: !0
@@ -3264,7 +3264,7 @@ _e.BasisTheory = Za;
3264
3264
  _instance: !0
3265
3265
  };
3266
3266
  e._instance = void 0;
3267
- var r = _e;
3267
+ var r = ye;
3268
3268
  Object.keys(r).forEach(function(a) {
3269
3269
  a === "default" || a === "__esModule" || Object.prototype.hasOwnProperty.call(t, a) || a in e && e[a] === r[a] || Object.defineProperty(e, a, {
3270
3270
  enumerable: !0,
@@ -3273,7 +3273,7 @@ _e.BasisTheory = Za;
3273
3273
  }
3274
3274
  });
3275
3275
  });
3276
- var n = St;
3276
+ var n = vt;
3277
3277
  Object.keys(n).forEach(function(a) {
3278
3278
  a === "default" || a === "__esModule" || Object.prototype.hasOwnProperty.call(t, a) || a in e && e[a] === n[a] || Object.defineProperty(e, a, {
3279
3279
  enumerable: !0,
@@ -3282,7 +3282,7 @@ _e.BasisTheory = Za;
3282
3282
  }
3283
3283
  });
3284
3284
  });
3285
- var s = vt;
3285
+ var s = Ot;
3286
3286
  Object.keys(s).forEach(function(a) {
3287
3287
  a === "default" || a === "__esModule" || Object.prototype.hasOwnProperty.call(t, a) || a in e && e[a] === s[a] || Object.defineProperty(e, a, {
3288
3288
  enumerable: !0,
@@ -3294,15 +3294,57 @@ _e.BasisTheory = Za;
3294
3294
  const i = new r.BasisTheory();
3295
3295
  e._instance = i;
3296
3296
  })(Xt);
3297
- const et = {
3297
+ const tt = {
3298
3298
  base: {
3299
3299
  ":disabled": {
3300
3300
  backgroundColor: "transparent"
3301
3301
  }
3302
3302
  }
3303
- }, eo = "DOM Element was not found";
3304
- var to = { VITE_PACKAGE_VERSION: "v2.0.0-beta.5", BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
3305
- const ro = "v2.0.0-beta.5", tt = to.VITE_IFRAME_BASE_URL ?? no(ro);
3303
+ }, eo = {
3304
+ mask: {
3305
+ number: "{{ data.number | card_mask: 'true', 'true' }}",
3306
+ expiration_month: "{{ data.expiration_month }}",
3307
+ expiration_year: "{{ data.expiration_year }}"
3308
+ }
3309
+ }, to = eo;
3310
+ class ro {
3311
+ constructor(t, r, n = new AbortController()) {
3312
+ Object.defineProperty(this, "apiKey", {
3313
+ enumerable: !0,
3314
+ configurable: !0,
3315
+ writable: !0,
3316
+ value: r
3317
+ }), Object.defineProperty(this, "abortCtrl", {
3318
+ enumerable: !0,
3319
+ configurable: !0,
3320
+ writable: !0,
3321
+ value: n
3322
+ }), Object.defineProperty(this, "baseUrl", {
3323
+ enumerable: !0,
3324
+ configurable: !0,
3325
+ writable: !0,
3326
+ value: void 0
3327
+ }), this.baseUrl = t.endsWith("/") ? t.substring(0, t.length - 1) : t;
3328
+ }
3329
+ tokenize(t) {
3330
+ return fetch(`${this.baseUrl}/tokenize`, {
3331
+ method: "POST",
3332
+ headers: {
3333
+ "Content-Type": "application/json",
3334
+ "X-API-Key": this.apiKey
3335
+ },
3336
+ mode: "cors",
3337
+ body: JSON.stringify(t),
3338
+ signal: this.abortCtrl.signal
3339
+ }).then((r) => be(r));
3340
+ }
3341
+ cancelAll() {
3342
+ this.abortCtrl.abort();
3343
+ }
3344
+ }
3345
+ const no = "DOM Element was not found";
3346
+ var so = { VITE_PACKAGE_VERSION: "v2.0.0", BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
3347
+ const io = "v2.0.0", rt = so.VITE_IFRAME_BASE_URL ?? ao(io);
3306
3348
  class ie {
3307
3349
  constructor(t, r) {
3308
3350
  if (Object.defineProperty(this, "options", {
@@ -3362,22 +3404,22 @@ class ie {
3362
3404
  var n;
3363
3405
  (n = this.iframe) == null || n.remove(), this.iframe = null;
3364
3406
  }
3365
- }), !tt)
3407
+ }), !rt)
3366
3408
  throw new Error("IFRAME_BASE_URL not found");
3367
- r && rt.set(this, { key: r });
3409
+ r && nt.set(this, { key: r });
3368
3410
  }
3369
3411
  mount(t) {
3370
3412
  const r = typeof t == "string" ? document.querySelector(t) : t;
3371
3413
  if (!r)
3372
- throw new Error(eo);
3373
- r.innerHTML = `<iframe width="100%" height="29" src="${tt}?field=${this.type}&origin=${location.origin}"></iframe>`, this.iframe = r.querySelector("iframe");
3414
+ throw new Error(no);
3415
+ r.innerHTML = `<iframe width="100%" height="29" src="${rt}?field=${this.type}&origin=${location.origin}"></iframe>`, this.iframe = r.querySelector("iframe");
3374
3416
  const n = (s) => {
3375
3417
  var i;
3376
3418
  if (!(s.source !== ((i = this.iframe) == null ? void 0 : i.contentWindow) || s.data.element !== this.type))
3377
3419
  if (s.data.type === "change") {
3378
3420
  const a = this.extractValue(s.data.data.value), o = { ...s.data.data };
3379
3421
  delete o.value;
3380
- const l = rt.get(this);
3422
+ const l = nt.get(this);
3381
3423
  l && (l.value = a), this.emitEvent({
3382
3424
  ...s.data,
3383
3425
  data: o
@@ -3397,7 +3439,7 @@ class ie {
3397
3439
  };
3398
3440
  }
3399
3441
  secureValue(t) {
3400
- const r = rt.get(this);
3442
+ const r = nt.get(this);
3401
3443
  return (r == null ? void 0 : r.key) !== t ? null : (r == null ? void 0 : r.value) ?? null;
3402
3444
  }
3403
3445
  emitEvent(t) {
@@ -3406,13 +3448,13 @@ class ie {
3406
3448
  }
3407
3449
  iframePostMessage(t) {
3408
3450
  var r, n;
3409
- (n = (r = this.iframe) == null ? void 0 : r.contentWindow) == null || n.postMessage(t, tt);
3451
+ (n = (r = this.iframe) == null ? void 0 : r.contentWindow) == null || n.postMessage(t, rt);
3410
3452
  }
3411
3453
  }
3412
- function no(e) {
3454
+ function ao(e) {
3413
3455
  return `https://sdk.hellgate.io/web/${e}/iframe/`;
3414
3456
  }
3415
- const rt = /* @__PURE__ */ new Map(), so = (e) => e != null;
3457
+ const nt = /* @__PURE__ */ new Map(), oo = (e) => e != null;
3416
3458
  function kr(e) {
3417
3459
  const [t = null, r = null] = (e ?? "").split("/").map((n) => Number(n.trim()));
3418
3460
  return { month: t, year: r && r > 10 ? +`20${r}` : null };
@@ -3424,9 +3466,9 @@ function zr(e) {
3424
3466
  return [
3425
3467
  t && t < 10 ? `0${t}` : t,
3426
3468
  r && r >= 100 ? String(r).slice(-2) : r
3427
- ].filter(so).join(" / ");
3469
+ ].filter(oo).join(" / ");
3428
3470
  }
3429
- class io extends ie {
3471
+ class uo extends ie {
3430
3472
  constructor() {
3431
3473
  super(...arguments), Object.defineProperty(this, "type", {
3432
3474
  enumerable: !0,
@@ -3449,10 +3491,10 @@ class io extends ie {
3449
3491
  function Vr(e) {
3450
3492
  return (e == null ? void 0 : e.replaceAll(" ", "")) ?? null;
3451
3493
  }
3452
- function ao(e) {
3494
+ function co(e) {
3453
3495
  return e;
3454
3496
  }
3455
- class oo extends ie {
3497
+ class lo extends ie {
3456
3498
  constructor() {
3457
3499
  super(...arguments), Object.defineProperty(this, "type", {
3458
3500
  enumerable: !0,
@@ -3468,11 +3510,11 @@ class oo extends ie {
3468
3510
  enumerable: !0,
3469
3511
  configurable: !0,
3470
3512
  writable: !0,
3471
- value: ao
3513
+ value: co
3472
3514
  });
3473
3515
  }
3474
3516
  }
3475
- class uo extends ie {
3517
+ class fo extends ie {
3476
3518
  constructor() {
3477
3519
  super(...arguments), Object.defineProperty(this, "type", {
3478
3520
  enumerable: !0,
@@ -3500,7 +3542,7 @@ class uo extends ie {
3500
3542
  });
3501
3543
  }
3502
3544
  }
3503
- class co extends ie {
3545
+ class ho extends ie {
3504
3546
  constructor() {
3505
3547
  super(...arguments), Object.defineProperty(this, "type", {
3506
3548
  enumerable: !0,
@@ -3540,41 +3582,48 @@ class Gr extends ie {
3540
3582
  });
3541
3583
  }
3542
3584
  }
3543
- function Z(e, t, r) {
3585
+ function Q(e, t, r) {
3544
3586
  switch (e) {
3545
3587
  case "card":
3546
- return new uo(t, r);
3588
+ return new fo(t, r);
3547
3589
  case "cardNumber":
3548
- return new oo(t, r);
3590
+ return new lo(t, r);
3549
3591
  case "cardExpirationDate":
3550
- return new io(t, r);
3592
+ return new uo(t, r);
3551
3593
  case "cardVerificationCode":
3552
- return new co(t, r);
3594
+ return new ho(t, r);
3553
3595
  case "text":
3554
3596
  return new Gr(t, r);
3555
3597
  default:
3556
3598
  ASSERT_EXHAUSTIVE(e);
3557
3599
  }
3558
3600
  }
3559
- function lo() {
3601
+ function po() {
3560
3602
  return Date.now().toString(36) + Math.random().toString(36).slice(2);
3561
3603
  }
3562
- class Ot {
3604
+ class St {
3563
3605
  static async init(t, r) {
3564
- const n = await new Xt.BasisTheory().init(r, { elements: !1 });
3565
- return new Ot(t, n);
3606
+ const n = r.provider === "basis_theory" ? await new Xt.BasisTheory().init(r.api_key, {
3607
+ elements: !1
3608
+ }) : void 0;
3609
+ return new St(t, r, n);
3566
3610
  }
3567
- constructor(t, r) {
3611
+ constructor(t, r, n) {
3568
3612
  Object.defineProperty(this, "session", {
3569
3613
  enumerable: !0,
3570
3614
  configurable: !0,
3571
3615
  writable: !0,
3572
3616
  value: t
3573
- }), Object.defineProperty(this, "bt", {
3617
+ }), Object.defineProperty(this, "tokenizeConfig", {
3574
3618
  enumerable: !0,
3575
3619
  configurable: !0,
3576
3620
  writable: !0,
3577
3621
  value: r
3622
+ }), Object.defineProperty(this, "bt", {
3623
+ enumerable: !0,
3624
+ configurable: !0,
3625
+ writable: !0,
3626
+ value: n
3578
3627
  }), Object.defineProperty(this, "state", {
3579
3628
  enumerable: !0,
3580
3629
  configurable: !0,
@@ -3594,137 +3643,145 @@ class Ot {
3594
3643
  enumerable: !0,
3595
3644
  configurable: !0,
3596
3645
  writable: !0,
3597
- value: (n = {}) => {
3646
+ value: (s = {}) => {
3598
3647
  if (this.hasFormElements())
3599
3648
  throw new Error("Form elements can't be initialized twice. You can call `reset()` method or create new Hellgate client.");
3600
- const s = G.get(this);
3601
- if (!s)
3649
+ const i = G.get(this);
3650
+ if (!i)
3602
3651
  throw new Error("Secure key not found");
3603
- const i = z({
3652
+ const a = z({
3604
3653
  disabled: !1,
3605
3654
  autocomplete: "on",
3606
- style: { ...et }
3607
- }, n), a = Z("card", i, s);
3655
+ style: { ...tt }
3656
+ }, s), o = Q("card", a, i);
3608
3657
  return this.cardElements.card = {
3609
- element: a,
3658
+ element: o,
3610
3659
  state: this.createFieldDefaultState()
3611
- }, this.addElementStateListener("card"), a;
3660
+ }, this.addElementStateListener("card"), o;
3612
3661
  }
3613
3662
  }), Object.defineProperty(this, "createFormFields", {
3614
3663
  enumerable: !0,
3615
3664
  configurable: !0,
3616
3665
  writable: !0,
3617
- value: (n = {}) => {
3666
+ value: (s = {}) => {
3618
3667
  if (this.hasFormElements())
3619
3668
  throw new Error("Form elements can't be initialized twice. You can call `reset()` method or create new Hellgate client.");
3620
- const s = G.get(this);
3621
- if (!s)
3669
+ const i = G.get(this);
3670
+ if (!i)
3622
3671
  throw new Error("Secure key not found");
3623
- const i = {
3672
+ const a = {
3624
3673
  disabled: !1,
3625
3674
  autocomplete: "on",
3626
- style: { ...et }
3627
- }, { cardNumber: a = {}, expiryDate: o = {}, securityCode: l = {}, ...d } = n, u = Z("cardNumber", {
3628
- ...z(i, { ...d, ...a })
3629
- }, s), h = Z("cardExpirationDate", {
3630
- ...z(i, { ...d, ...o })
3631
- }, s), _ = Z("cardVerificationCode", {
3632
- ...z(i, {
3633
- ...d,
3634
- ...l
3675
+ style: { ...tt }
3676
+ }, { cardNumber: o = {}, expiryDate: l = {}, securityCode: f = {}, ...u } = s, h = Q("cardNumber", {
3677
+ ...z(a, { ...u, ...o })
3678
+ }, i), _ = Q("cardExpirationDate", {
3679
+ ...z(a, { ...u, ...l })
3680
+ }, i), R = Q("cardVerificationCode", {
3681
+ ...z(a, {
3682
+ ...u,
3683
+ ...f
3635
3684
  })
3636
- }, s);
3685
+ }, i);
3637
3686
  return this.cardElements = {
3638
3687
  cardNumber: {
3639
- element: u,
3688
+ element: h,
3640
3689
  state: this.createFieldDefaultState()
3641
3690
  },
3642
3691
  cardExpirationDate: {
3643
- element: h,
3692
+ element: _,
3644
3693
  state: this.createFieldDefaultState()
3645
3694
  },
3646
3695
  cardVerificationCode: {
3647
- element: _,
3696
+ element: R,
3648
3697
  state: this.createFieldDefaultState()
3649
3698
  }
3650
- }, this.addElementStateListener("cardNumber"), this.addElementStateListener("cardExpirationDate"), this.addElementStateListener("cardVerificationCode"), { cardNumber: u, expiryDate: h, securityCode: _ };
3699
+ }, this.addElementStateListener("cardNumber"), this.addElementStateListener("cardExpirationDate"), this.addElementStateListener("cardVerificationCode"), { cardNumber: h, expiryDate: _, securityCode: R };
3651
3700
  }
3652
3701
  }), Object.defineProperty(this, "createTextField", {
3653
3702
  enumerable: !0,
3654
3703
  configurable: !0,
3655
3704
  writable: !0,
3656
- value: (n = {}) => {
3657
- const s = G.get(this);
3658
- if (!s)
3705
+ value: (s = {}) => {
3706
+ const i = G.get(this);
3707
+ if (!i)
3659
3708
  throw new Error("Secure key not found");
3660
- const i = {
3709
+ const a = {
3661
3710
  disabled: !1,
3662
3711
  autocomplete: "on",
3663
- style: { ...et }
3712
+ style: { ...tt }
3664
3713
  };
3665
- return Z("text", {
3666
- ...z(i, { ...n })
3667
- }, s);
3714
+ return Q("text", {
3715
+ ...z(a, { ...s })
3716
+ }, i);
3668
3717
  }
3669
3718
  }), Object.defineProperty(this, "tokenize", {
3670
3719
  enumerable: !0,
3671
3720
  configurable: !0,
3672
3721
  writable: !0,
3673
3722
  value: async () => {
3674
- var d, u, h, _, w;
3675
- const { card: n, cardNumber: s, cardExpirationDate: i, cardVerificationCode: a } = this.cardElements, l = {
3676
- mask: {
3677
- number: "{{ data.number | card_mask: 'true', 'true' }}",
3678
- expiration_month: "{{ data.expiration_month }}",
3679
- expiration_year: "{{ data.expiration_year }}"
3723
+ var f, u, h, _, R;
3724
+ const { card: s, cardNumber: i, cardExpirationDate: a, cardVerificationCode: o } = this.cardElements;
3725
+ let l;
3726
+ if (s) {
3727
+ const d = V(this, s.element);
3728
+ l = {
3729
+ number: (d == null ? void 0 : d.number) ?? null,
3730
+ expiration_month: ((f = d == null ? void 0 : d.expiry_date) == null ? void 0 : f.month) ?? null,
3731
+ expiration_year: ((u = d == null ? void 0 : d.expiry_date) == null ? void 0 : u.year) ?? null,
3732
+ cvc: (d == null ? void 0 : d.cvc) ?? null
3733
+ };
3734
+ }
3735
+ if (i && a && o && (l = {
3736
+ number: ((h = V(this, i.element)) == null ? void 0 : h.replaceAll(" ", "")) ?? null,
3737
+ expiration_month: ((_ = V(this, a.element)) == null ? void 0 : _.month) ?? null,
3738
+ expiration_year: ((R = V(this, a.element)) == null ? void 0 : R.year) ?? null,
3739
+ cvc: V(this, o.element)
3740
+ }), !l)
3741
+ throw new Error("Form elements must be initialized before tokenization");
3742
+ if (!l.number || !l.expiration_month || !l.expiration_year || !l.cvc)
3743
+ throw new Error("Card data is not complete");
3744
+ switch (this.tokenizeConfig.provider) {
3745
+ case "basis_theory": {
3746
+ if (!this.bt)
3747
+ throw new Error("basis_theory SDK not found");
3748
+ return this.bt.tokenize({
3749
+ type: "card",
3750
+ data: l,
3751
+ ...to
3752
+ });
3680
3753
  }
3681
- };
3682
- if (n) {
3683
- const f = V(this, n.element);
3684
- return this.bt.tokenize({
3685
- type: "card",
3686
- data: {
3687
- number: (f == null ? void 0 : f.number) ?? null,
3688
- expiration_month: ((d = f == null ? void 0 : f.expiry_date) == null ? void 0 : d.month) ?? null,
3689
- expiration_year: ((u = f == null ? void 0 : f.expiry_date) == null ? void 0 : u.year) ?? null,
3690
- cvc: (f == null ? void 0 : f.cvc) ?? null
3691
- },
3692
- ...l
3693
- });
3754
+ case "guardian":
3755
+ return new ro(this.tokenizeConfig.base_url, this.tokenizeConfig.api_key).tokenize({
3756
+ account_number: l.number,
3757
+ expiry_month: l.expiration_month,
3758
+ expiry_year: l.expiration_year,
3759
+ security_code: l.cvc
3760
+ });
3761
+ default:
3762
+ ASSERT_EXHAUSTIVE(this.tokenizeConfig);
3694
3763
  }
3695
- if (s && i && a)
3696
- return this.bt.tokenize({
3697
- type: "card",
3698
- data: {
3699
- number: ((h = V(this, s.element)) == null ? void 0 : h.replaceAll(" ", "")) ?? null,
3700
- expiration_month: ((_ = V(this, i.element)) == null ? void 0 : _.month) ?? null,
3701
- expiration_year: ((w = V(this, i.element)) == null ? void 0 : w.year) ?? null,
3702
- cvc: V(this, a.element)
3703
- },
3704
- ...l
3705
- });
3706
- throw new Error("Form elements must be initialized before tokenization");
3707
3764
  }
3708
3765
  }), Object.defineProperty(this, "onStateChange", {
3709
3766
  enumerable: !0,
3710
3767
  configurable: !0,
3711
3768
  writable: !0,
3712
- value: (n) => {
3713
- this.stateChangeHandlers.push(n), n(this.state);
3769
+ value: (s) => {
3770
+ this.stateChangeHandlers.push(s), s(this.state);
3714
3771
  }
3715
3772
  }), Object.defineProperty(this, "clear", {
3716
3773
  enumerable: !0,
3717
3774
  configurable: !0,
3718
3775
  writable: !0,
3719
3776
  value: () => {
3720
- Object.values(this.cardElements).forEach((n) => n == null ? void 0 : n.element.clear());
3777
+ Object.values(this.cardElements).forEach((s) => s == null ? void 0 : s.element.clear());
3721
3778
  }
3722
3779
  }), Object.defineProperty(this, "reset", {
3723
3780
  enumerable: !0,
3724
3781
  configurable: !0,
3725
3782
  writable: !0,
3726
3783
  value: () => {
3727
- Object.values(this.cardElements).forEach((n) => n == null ? void 0 : n.element.unmount()), this.cardElements = {};
3784
+ Object.values(this.cardElements).forEach((s) => s == null ? void 0 : s.element.unmount()), this.cardElements = {};
3728
3785
  }
3729
3786
  }), Object.defineProperty(this, "dispose", {
3730
3787
  enumerable: !0,
@@ -3737,21 +3794,21 @@ class Ot {
3737
3794
  enumerable: !0,
3738
3795
  configurable: !0,
3739
3796
  writable: !0,
3740
- value: async (n) => {
3797
+ value: async (s) => {
3741
3798
  if (!this.hasFormElements())
3742
3799
  throw new Error("Card form must be initialized and completed before processing");
3743
- const s = n ? this.extractAdditionalData(n) : void 0;
3800
+ const i = s ? this.extractAdditionalData(s) : void 0;
3744
3801
  this.disableFormElements();
3745
- const i = await this.tokenize();
3802
+ const a = await this.tokenize();
3746
3803
  return this.session.completeAction({
3747
3804
  action: "tokenize_card",
3748
3805
  result: {
3749
- bt_token_id: i.id,
3750
- additional_data: s
3806
+ token_id: a.id,
3807
+ additional_data: i
3751
3808
  }
3752
3809
  });
3753
3810
  }
3754
- }), G.set(this, lo());
3811
+ }), G.set(this, po());
3755
3812
  }
3756
3813
  hasFormElements() {
3757
3814
  return !!Object.keys(this.cardElements).length;
@@ -3805,7 +3862,7 @@ function k(e, t) {
3805
3862
  const r = G.get(e);
3806
3863
  return t instanceof Gr && r ? V(e, t) ?? void 0 : t;
3807
3864
  }
3808
- class fo {
3865
+ class mo {
3809
3866
  constructor(t = "https://api.hellgate.io", r = new AbortController()) {
3810
3867
  Object.defineProperty(this, "abortCtrl", {
3811
3868
  enumerable: !0,
@@ -3822,7 +3879,7 @@ class fo {
3822
3879
  getSession(t) {
3823
3880
  return fetch(`${this.baseUrl}/sessions/${t}`, {
3824
3881
  signal: this.abortCtrl.signal
3825
- }).then((r) => nt(r));
3882
+ }).then((r) => be(r));
3826
3883
  }
3827
3884
  completeAction(t, r) {
3828
3885
  return fetch(`${this.baseUrl}/sessions/${t}/complete-action`, {
@@ -3833,14 +3890,14 @@ class fo {
3833
3890
  mode: "cors",
3834
3891
  body: JSON.stringify(r),
3835
3892
  signal: this.abortCtrl.signal
3836
- }).then((n) => nt(n));
3893
+ }).then((n) => be(n));
3837
3894
  }
3838
3895
  cancelAll() {
3839
3896
  this.abortCtrl.abort();
3840
3897
  }
3841
3898
  }
3842
- const ho = 2e3;
3843
- class po {
3899
+ const bo = 2e3;
3900
+ class Eo {
3844
3901
  constructor(t, r) {
3845
3902
  Object.defineProperty(this, "id", {
3846
3903
  enumerable: !0,
@@ -3908,7 +3965,7 @@ class po {
3908
3965
  const o = this.onStateChange((l) => {
3909
3966
  l.next_action !== (s == null ? void 0 : s.next_action) && l.next_action === null && (i(l), o());
3910
3967
  });
3911
- this.api.completeAction(this.id, n).then((l) => this.newStateHandle(l, a)).catch(async (l) => a(await mo(l)));
3968
+ this.api.completeAction(this.id, n).then((l) => this.newStateHandle(l, a)).catch(async (l) => a(await _o(l)));
3912
3969
  });
3913
3970
  }
3914
3971
  }), Object.defineProperty(this, "completeSession", {
@@ -3940,14 +3997,14 @@ class po {
3940
3997
  case "wait": {
3941
3998
  window.clearTimeout(this.pollingTimer), this.pollingTimer = window.setTimeout(() => this.updateSessionState(r).catch((s) => {
3942
3999
  s instanceof Response && s.status === 404 && (r == null || r(new Error(`Session ${this.id} has expired`)));
3943
- }), ho);
4000
+ }), bo);
3944
4001
  break;
3945
4002
  }
3946
4003
  }
3947
4004
  t.next_action !== ((n = this.state) == null ? void 0 : n.next_action) && this.stateChangeHandlers.forEach((s) => s(t)), t.next_action === null && this.completeSession(t), this.state = t;
3948
4005
  }
3949
4006
  }
3950
- async function mo(e) {
4007
+ async function _o(e) {
3951
4008
  if (!e.ok)
3952
4009
  switch (e.status) {
3953
4010
  case 400: {
@@ -3957,7 +4014,7 @@ async function mo(e) {
3957
4014
  }
3958
4015
  return e;
3959
4016
  }
3960
- const Eo = {
4017
+ const yo = {
3961
4018
  base_url: "https://api.hellgate.io"
3962
4019
  };
3963
4020
  class Wr {
@@ -3986,9 +4043,9 @@ class Wr {
3986
4043
  }
3987
4044
  static async init(t, r = {}) {
3988
4045
  const n = {
3989
- ...Eo,
4046
+ ...yo,
3990
4047
  ...r
3991
- }, s = new fo(n.base_url, n.abortCtrl), i = new po(t, s), a = await i.init(), o = a.next_action === "tokenize_card" ? await Ot.init(i, a.data.bt_api_key) : void 0;
4048
+ }, s = new mo(n.base_url, n.abortCtrl), i = new Eo(t, s), a = await i.init(), o = a.next_action === "tokenize_card" ? await St.init(i, a.data) : void 0;
3992
4049
  return new Wr(i, {
3993
4050
  CARD: o,
3994
4051
  "3DS": new Yr(i, r.challenge_3ds_container)
@@ -3997,18 +4054,18 @@ class Wr {
3997
4054
  }
3998
4055
  globalThis.HellgateSDK && (globalThis.Hellgate = globalThis.HellgateSDK.Hellgate, delete globalThis.HellgateSDK);
3999
4056
  export {
4000
- uo as CardElement,
4001
- io as CardExpirationDateElement,
4002
- oo as CardNumberElement,
4003
- co as CardVerificationCodeElement,
4057
+ fo as CardElement,
4058
+ uo as CardExpirationDateElement,
4059
+ lo as CardNumberElement,
4060
+ ho as CardVerificationCodeElement,
4004
4061
  Wr as Hellgate,
4005
4062
  Yr as Hellgate3DSHandler,
4006
- Ot as HellgateCardHandler,
4063
+ St as HellgateCardHandler,
4007
4064
  Gr as TextElement,
4008
- Z as createElement,
4065
+ Q as createElement,
4009
4066
  Vr as extractCardNumberValue,
4010
4067
  kr as extractExpiryDateValue,
4011
- ao as putCardNumberValue,
4068
+ co as putCardNumberValue,
4012
4069
  zr as putExpiryDateValue,
4013
- lo as uid
4070
+ po as uid
4014
4071
  };