@vue-stripe/vue-stripe 6.0.0 → 6.2.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.
Files changed (86) hide show
  1. package/CHANGELOG.md +57 -2
  2. package/README.md +6 -3
  3. package/dist/cjs/index.cjs +1 -1
  4. package/dist/es/index.js +192 -205
  5. package/dist/types/components/VueStripeAddressElement.d.cts +1 -1
  6. package/dist/types/components/VueStripeAddressElement.d.ts +1 -1
  7. package/dist/types/components/VueStripeAuBankAccountElement.d.cts +1 -1
  8. package/dist/types/components/VueStripeAuBankAccountElement.d.ts +1 -1
  9. package/dist/types/components/VueStripeCardCvcElement.d.cts +1 -1
  10. package/dist/types/components/VueStripeCardCvcElement.d.ts +1 -1
  11. package/dist/types/components/VueStripeCardElement.d.cts +1 -1
  12. package/dist/types/components/VueStripeCardElement.d.ts +1 -1
  13. package/dist/types/components/VueStripeCardExpiryElement.d.cts +1 -1
  14. package/dist/types/components/VueStripeCardExpiryElement.d.ts +1 -1
  15. package/dist/types/components/VueStripeCardNumberElement.d.cts +1 -1
  16. package/dist/types/components/VueStripeCardNumberElement.d.ts +1 -1
  17. package/dist/types/components/VueStripeCheckoutForm.d.cts +1 -1
  18. package/dist/types/components/VueStripeCheckoutForm.d.ts +1 -1
  19. package/dist/types/components/VueStripeContactDetailsElement.d.cts +1 -1
  20. package/dist/types/components/VueStripeContactDetailsElement.d.ts +1 -1
  21. package/dist/types/components/VueStripeCurrencySelectorElement.d.cts +1 -1
  22. package/dist/types/components/VueStripeCurrencySelectorElement.d.ts +1 -1
  23. package/dist/types/components/VueStripeExpressCheckoutElement.d.cts +1 -1
  24. package/dist/types/components/VueStripeExpressCheckoutElement.d.ts +1 -1
  25. package/dist/types/components/VueStripeFinancialAccountDisclosure.d.cts +1 -1
  26. package/dist/types/components/VueStripeFinancialAccountDisclosure.d.ts +1 -1
  27. package/dist/types/components/VueStripeIbanElement.d.cts +1 -1
  28. package/dist/types/components/VueStripeIbanElement.d.ts +1 -1
  29. package/dist/types/components/VueStripeIssuingAddToWalletButtonElement.d.cts +1 -1
  30. package/dist/types/components/VueStripeIssuingAddToWalletButtonElement.d.ts +1 -1
  31. package/dist/types/components/VueStripeIssuingCardCopyButtonElement.d.cts +1 -1
  32. package/dist/types/components/VueStripeIssuingCardCopyButtonElement.d.ts +1 -1
  33. package/dist/types/components/VueStripeIssuingCardCvcDisplayElement.d.cts +1 -1
  34. package/dist/types/components/VueStripeIssuingCardCvcDisplayElement.d.ts +1 -1
  35. package/dist/types/components/VueStripeIssuingCardExpiryDisplayElement.d.cts +1 -1
  36. package/dist/types/components/VueStripeIssuingCardExpiryDisplayElement.d.ts +1 -1
  37. package/dist/types/components/VueStripeIssuingCardNumberDisplayElement.d.cts +1 -1
  38. package/dist/types/components/VueStripeIssuingCardNumberDisplayElement.d.ts +1 -1
  39. package/dist/types/components/VueStripeIssuingCardPinDisplayElement.d.cts +1 -1
  40. package/dist/types/components/VueStripeIssuingCardPinDisplayElement.d.ts +1 -1
  41. package/dist/types/components/VueStripeIssuingDisclosure.d.cts +1 -1
  42. package/dist/types/components/VueStripeIssuingDisclosure.d.ts +1 -1
  43. package/dist/types/components/VueStripeLinkAuthenticationElement.d.cts +1 -1
  44. package/dist/types/components/VueStripeLinkAuthenticationElement.d.ts +1 -1
  45. package/dist/types/components/VueStripeLinkSignupElement.d.cts +1 -1
  46. package/dist/types/components/VueStripeLinkSignupElement.d.ts +1 -1
  47. package/dist/types/components/VueStripePaymentElement.d.cts +3 -2
  48. package/dist/types/components/VueStripePaymentElement.d.ts +3 -2
  49. package/dist/types/components/VueStripePaymentMethodMessagingElement.d.cts +1 -1
  50. package/dist/types/components/VueStripePaymentMethodMessagingElement.d.ts +1 -1
  51. package/dist/types/components/VueStripeTaxIdElement.d.cts +1 -1
  52. package/dist/types/components/VueStripeTaxIdElement.d.ts +1 -1
  53. package/dist/types/components/VueStripeTermsElement.d.cts +1 -1
  54. package/dist/types/components/VueStripeTermsElement.d.ts +1 -1
  55. package/dist/types/components/VueStripeTreasuryDisclosure.d.cts +1 -1
  56. package/dist/types/components/VueStripeTreasuryDisclosure.d.ts +1 -1
  57. package/dist/types/composables/confirm/index.d.cts +46 -46
  58. package/dist/types/composables/confirm/index.d.ts +46 -46
  59. package/dist/types/composables/index.d.cts +1 -0
  60. package/dist/types/composables/index.d.ts +1 -0
  61. package/dist/types/composables/useCreateToken.d.cts +1 -1
  62. package/dist/types/composables/useCreateToken.d.ts +1 -1
  63. package/dist/types/composables/useEphemeralKeyNonce.d.cts +1 -1
  64. package/dist/types/composables/useEphemeralKeyNonce.d.ts +1 -1
  65. package/dist/types/composables/useHandleCardAction.d.cts +1 -1
  66. package/dist/types/composables/useHandleCardAction.d.ts +1 -1
  67. package/dist/types/composables/usePricing.d.cts +3 -0
  68. package/dist/types/composables/usePricing.d.ts +3 -0
  69. package/dist/types/composables/useRadarSession.d.cts +1 -1
  70. package/dist/types/composables/useRadarSession.d.ts +1 -1
  71. package/dist/types/composables/useVerifyMicrodepositsForPayment.d.cts +1 -1
  72. package/dist/types/composables/useVerifyMicrodepositsForPayment.d.ts +1 -1
  73. package/dist/types/composables/useVerifyMicrodepositsForSetup.d.cts +1 -1
  74. package/dist/types/composables/useVerifyMicrodepositsForSetup.d.ts +1 -1
  75. package/dist/types/index.d.cts +1 -1
  76. package/dist/types/index.d.ts +1 -1
  77. package/dist/types/types/index.d.cts +15 -4
  78. package/dist/types/types/index.d.ts +15 -4
  79. package/dist/types/utils/element-render.d.cts +2 -4
  80. package/dist/types/utils/element-render.d.ts +2 -4
  81. package/dist/types/utils/h.d.cts +2 -3
  82. package/dist/types/utils/h.d.ts +2 -3
  83. package/dist/types/utils/status-shell.d.cts +2 -4
  84. package/dist/types/utils/status-shell.d.ts +2 -4
  85. package/dist/umd/index.js +2 -2
  86. package/package.json +13 -14
package/dist/es/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Fragment as e, computed as t, defineComponent as n, getCurrentInstance as r, getCurrentScope as i, h as a, inject as o, isVue2 as s, markRaw as c, nextTick as l, onBeforeUnmount as u, onMounted as d, onScopeDispose as f, onUnmounted as p, provide as m, readonly as h, ref as g, shallowRef as _, toRaw as v, watch as y } from "vue-demi";
2
2
  import { loadStripe as b } from "@stripe/stripe-js/pure/index.mjs";
3
- //#region src/utils/injection-keys.ts
3
+ // src/utils/injection-keys.ts
4
4
  var x = Symbol("stripe"), S = Symbol("stripe-elements"), C = Symbol("stripe-checkout"), w = Symbol("stripe-checkout-form"), T = Symbol("vue-stripe-config"), E = class extends Error {
5
5
  constructor(e) {
6
6
  super(e), this.name = "VueStripeProviderError";
@@ -15,73 +15,62 @@ var x = Symbol("stripe"), S = Symbol("stripe-elements"), C = Symbol("stripe-chec
15
15
  }
16
16
  }, k = {
17
17
  name: "vue-stripe",
18
- version: "6.0.0",
18
+ version: "6.2.0",
19
19
  url: "https://vuestripe.com",
20
20
  partner_id: "pp_partner_IqtOXpBSuz0IE2"
21
- }, A = null, j = (e) => (e?.registerAppInfo(k), e), M = /* @__PURE__ */ Object.assign((...e) => {
22
- if (A) return A.then(() => b(...e)).then(j);
23
- let t = b(...e).then(j), n = t.catch((e) => {
24
- if (!globalThis.Stripe) throw e;
25
- }), r = () => {
26
- A === n && (A = null);
27
- };
28
- return A = n, n.then(r, r), t;
29
- }, { setLoadParameters: (e) => b.setLoadParameters(e) }), N = /* @__PURE__ */ new Map(), P = !1;
30
- function F(e, { apiVersion: t, ...n }, r = !0) {
31
- t && !P && (P = !0, console.warn(`[Vue Stripe] apiVersion "${t}" is ignored: versioned Stripe.js uses its release train's API version`));
21
+ }, A = (e) => (e?.registerAppInfo(k), e), j = /* @__PURE__ */ Object.assign((...e) => b(...e).then(A), { setLoadParameters: (e) => b.setLoadParameters(e) }), M = /* @__PURE__ */ new Map(), N = !1;
22
+ function P(e, { apiVersion: t, ...n }, r = !0) {
23
+ t && !N && (N = !0, console.warn(`[Vue Stripe] apiVersion "${t}" is ignored: versioned Stripe.js uses its release train's API version`));
32
24
  let i = JSON.stringify([
33
25
  e,
34
26
  n,
35
27
  r
36
- ]), a = N.get(i);
37
- return a || (a = I(e, n, r), N.set(i, a), a.catch(() => N.delete(i))), a;
28
+ ]), a = M.get(i);
29
+ return a || (a = F(e, n, r), M.set(i, a), a.catch(() => M.delete(i))), a;
38
30
  }
39
- async function I(e, t, n) {
31
+ async function F(e, t, n) {
40
32
  if (!n) try {
41
- M.setLoadParameters({ advancedFraudSignals: !1 });
33
+ j.setLoadParameters({ advancedFraudSignals: !1 });
42
34
  } catch {
43
35
  console.warn("[Vue Stripe] advancedFraudSignals: false was ignored: Stripe.js already loading");
44
36
  }
45
- let r = await M(e, t);
37
+ let r = await j(e, t);
46
38
  if (!r) throw new E("Failed to initialize Stripe");
47
39
  return r;
48
40
  }
49
- //#endregion
50
- //#region src/utils/h.ts
51
- function L(e, t = {}, n) {
41
+ // src/utils/h.ts
42
+ function I(e, t = {}, n) {
52
43
  if (!s) return a(e, t, n);
53
44
  let r = {}, i = {}, o = {};
54
45
  for (let [e, n] of Object.entries(t)) e === "class" || e === "style" || e === "key" || e === "ref" ? r[e] = n : /^on[A-Z]/.test(e) ? o[e.charAt(2).toLowerCase() + e.slice(3)] = n : i[e] = n;
55
46
  return Object.keys(i).length && (r.attrs = i), Object.keys(o).length && (r.on = o), a(e, r, n);
56
47
  }
57
- var R = () => null;
58
- //#endregion
59
- //#region src/utils/status-shell.ts
60
- function z(e, t, n, r, i) {
61
- return t.error ? L("div", {
48
+ var L = () => null;
49
+ // src/utils/status-shell.ts
50
+ function R(e, t, n, r, i) {
51
+ return t.error ? I("div", {
62
52
  key: "error",
63
53
  class: `${e}-error`
64
- }, n.error?.({ error: t.error }) ?? [L("div", { class: "vue-stripe-error-message" }, t.error)]) : t.loading ? L("div", {
54
+ }, n.error?.({ error: t.error }) ?? [I("div", { class: "vue-stripe-error-message" }, t.error)]) : t.loading ? I("div", {
65
55
  key: "loading",
66
56
  class: `${e}-loading`
67
- }, n.loading?.() ?? [L("div", { class: "vue-stripe-loading-message" }, i)]) : L("div", { key: "default" }, n.default?.(r));
57
+ }, n.loading?.() ?? [I("div", { class: "vue-stripe-loading-message" }, i)]) : I("div", { key: "default" }, n.default?.(r));
68
58
  }
69
- //#endregion
70
- //#region src/utils/report.ts
71
- function B() {
59
+ // src/utils/report.ts
60
+ function z() {
72
61
  let e = r();
73
62
  return (t) => {
74
63
  let n = `on${t[0].toUpperCase()}${t.slice(1)}`, r = e?.vnode?.props, i = e?.proxy;
75
64
  return !!(r?.[n] || r?.[`${n}Once`] || i?.$listeners?.[t]);
76
65
  };
77
66
  }
78
- function V(e, t = "error") {
79
- let n = B();
67
+ function B(e, t = "error") {
68
+ let n = z();
80
69
  return (r, i) => {
81
70
  !e.error && !n(t) && console.error(`[Vue Stripe] ${r}:`, i);
82
71
  };
83
72
  }
84
- var H = /* @__PURE__ */ n({
73
+ var V = /* @__PURE__ */ n({
85
74
  name: "VueStripeProvider",
86
75
  props: {
87
76
  publishableKey: {
@@ -125,7 +114,7 @@ var H = /* @__PURE__ */ n({
125
114
  setup(e, { emit: t, slots: n }) {
126
115
  let r = e.publishableKey || e.stripeKey;
127
116
  if (!r) throw new E("publishableKey or stripeKey is required");
128
- let i = _(null), a = g(!0), o = g(null), s = e.stripeAccount || e.options?.stripeAccount, c = e.apiVersion || e.options?.apiVersion, l = e.locale || e.options?.locale, u = V(n), f = {
117
+ let i = _(null), a = g(!0), o = g(null), s = e.stripeAccount || e.options?.stripeAccount, c = e.apiVersion || e.options?.apiVersion, l = e.locale || e.options?.locale, u = B(n), f = {
129
118
  publishableKey: r,
130
119
  stripeAccount: s,
131
120
  apiVersion: c,
@@ -134,7 +123,7 @@ var H = /* @__PURE__ */ n({
134
123
  try {
135
124
  a.value = !0, o.value = null;
136
125
  let n = { ...e.options };
137
- e.betas?.length && (n.betas = e.betas), e.developerTools && (n.developerTools = e.developerTools), s && (n.stripeAccount = s), c && (n.apiVersion = c), l && (n.locale = l), i.value = await F(r, n, e.advancedFraudSignals), t("load", i.value);
126
+ e.betas?.length && (n.betas = e.betas), e.developerTools && (n.developerTools = e.developerTools), s && (n.stripeAccount = s), c && (n.apiVersion = c), l && (n.locale = l), i.value = await P(r, n, e.advancedFraudSignals), t("load", i.value);
138
127
  } catch (e) {
139
128
  let n = e instanceof Error ? e.message : "Failed to load Stripe";
140
129
  o.value = n, u("Initialization error", n), t("error", e instanceof Error ? e : Error(n));
@@ -148,21 +137,20 @@ var H = /* @__PURE__ */ n({
148
137
  stripe: i,
149
138
  loading: a,
150
139
  error: o
151
- }), () => z("vue-stripe", {
140
+ }), () => R("vue-stripe", {
152
141
  error: o.value,
153
142
  loading: a.value
154
143
  }, n, {}, "Loading Stripe...");
155
144
  },
156
- render: R
145
+ render: L
157
146
  });
158
- //#endregion
159
- //#region src/utils/inject-stripe.ts
160
- function U(e) {
147
+ // src/utils/inject-stripe.ts
148
+ function H(e) {
161
149
  let t = o(x, null);
162
150
  if (!t) throw new E(`${e} must be ${e.startsWith("use") ? "called" : "used"} within a VueStripeProvider component or an app using createVueStripe()`);
163
151
  return t.stripe, t;
164
152
  }
165
- function W(e) {
153
+ function U(e) {
166
154
  let t = e.stripe.value;
167
155
  return t || !e.loading.value || typeof window > "u" ? Promise.resolve(t) : new Promise((t) => {
168
156
  let n = y(() => !!e.stripe.value || !e.loading.value, () => {
@@ -220,7 +208,7 @@ var ee = /* @__PURE__ */ n({
220
208
  "update-end"
221
209
  ],
222
210
  setup(e, { emit: t, slots: n }) {
223
- let r = U("VueStripeElements"), i = V(n), a = _(null), o = g(!0), s = g(null);
211
+ let r = H("VueStripeElements"), i = B(n), a = _(null), o = g(!0), s = g(null);
224
212
  y(() => r.error.value, (e) => {
225
213
  e && !a.value && (s.value = e, o.value = !1, t("error", e));
226
214
  }, { immediate: !0 });
@@ -270,23 +258,22 @@ var ee = /* @__PURE__ */ n({
270
258
  loading: o,
271
259
  error: s,
272
260
  hasIntent: () => !!(e.clientSecret || e.mode || e.options?.clientSecret || e.options?.mode)
273
- }), () => z("vue-stripe-elements", {
261
+ }), () => R("vue-stripe-elements", {
274
262
  error: s.value ?? r.error.value,
275
263
  loading: o.value
276
264
  }, n, {}, "Initializing Elements...");
277
265
  },
278
- render: R
266
+ render: L
279
267
  });
280
- //#endregion
281
- //#region src/utils/element-render.ts
282
- function G(e, t, n, r) {
268
+ // src/utils/element-render.ts
269
+ function W(e, t, n, r) {
283
270
  let i = Array.from(t.mount?.classList ?? []).filter((e) => e.startsWith("StripeElement"));
284
- return L("div", { class: [e, "vue-stripe-element"] }, [
285
- t.error && L("div", {
271
+ return I("div", { class: [e, "vue-stripe-element"] }, [
272
+ t.error && I("div", {
286
273
  key: "error",
287
274
  class: [`${e}-error`, "vue-stripe-element-error"]
288
- }, n.error?.({ error: t.error }) ?? [L("div", { class: "vue-stripe-error-message" }, t.error)]),
289
- L("div", {
275
+ }, n.error?.({ error: t.error }) ?? [I("div", { class: "vue-stripe-error-message" }, t.error)]),
276
+ I("div", {
290
277
  key: "mount",
291
278
  ref: "mount",
292
279
  class: [{
@@ -296,28 +283,27 @@ function G(e, t, n, r) {
296
283
  "vue-stripe-element-loading": t.loading
297
284
  }, ...i]
298
285
  }),
299
- t.loading && L("div", {
286
+ t.loading && I("div", {
300
287
  key: "loader",
301
288
  class: [`${e}-loader`, "vue-stripe-element-loader"]
302
- }, n.loading?.() ?? [L("div", { class: "vue-stripe-loading-message" }, r)])
289
+ }, n.loading?.() ?? [I("div", { class: "vue-stripe-loading-message" }, r)])
303
290
  ]);
304
291
  }
305
- //#endregion
306
- //#region src/utils/element-factory.ts
292
+ // src/utils/element-factory.ts
307
293
  var te = (e) => {
308
294
  try {
309
295
  return JSON.stringify(e);
310
296
  } catch {
311
297
  return String(Math.random());
312
298
  }
313
- }, K = (e, t) => Object.fromEntries(Object.entries(e).filter(([e]) => t.includes(e))), ne = [
299
+ }, G = (e, t) => Object.fromEntries(Object.entries(e).filter(([e]) => t.includes(e))), ne = [
314
300
  "ready",
315
301
  "change",
316
302
  "focus",
317
303
  "blur",
318
304
  "escape"
319
305
  ];
320
- function q(e) {
306
+ function K(e) {
321
307
  let { elementType: t, componentName: i, events: a = ne } = e, s = e.loadingText ?? `Loading ${t}...`, c = e.className ?? `vue-stripe-${t}-element`;
322
308
  return n({
323
309
  name: i,
@@ -332,7 +318,7 @@ function q(e) {
332
318
  let t = e.elements === !1 ? A : ["VueStripeElements", "VueStripeCheckoutElementsProvider"].concat(e.checkoutForm ? ["VueStripeCheckoutFormProvider"] : []);
333
319
  throw new D(`${i} must be used within ${t.join(" or ")}`);
334
320
  }
335
- let j = () => (x?.proxy)?.$refs.mount ?? null, M = B(), N = (t) => !e.listenerOnlyEvents?.includes(t) || M(t), P = V(m, "loaderror"), F = {};
321
+ let j = () => (x?.proxy)?.$refs.mount ?? null, M = z(), N = (t) => !e.listenerOnlyEvents?.includes(t) || M(t), P = B(m, "loaderror"), F = {};
336
322
  for (let t of a) F[t] = (...n) => {
337
323
  let r = n[0];
338
324
  t === "ready" && (v.value = !1), t === "change" && (b.value = r?.error?.message ?? null), t === "loaderror" && (b.value = r?.error?.message ?? "Element failed to load", v.value = !1), t === "ready" && e.readyPayload !== "event" ? u(t, h.value) : u(t, ...n);
@@ -359,7 +345,7 @@ function q(e) {
359
345
  }
360
346
  if (!e.checkoutForm) throw new D(`${i} is not available inside VueStripeCheckoutFormProvider`);
361
347
  return e.checkoutForm(o, n);
362
- }, z = () => {
348
+ }, V = () => {
363
349
  let r = j();
364
350
  if (!h.value && r) try {
365
351
  b.value = null;
@@ -402,8 +388,8 @@ function q(e) {
402
388
  }
403
389
  };
404
390
  return y(() => E?.elements.value ?? O?.checkout.value ?? k?.checkout.value, (e, t) => {
405
- e !== t && H(), z();
406
- }), d(e.createLast ? () => l(z) : z), p(H), f({
391
+ e !== t && H(), V();
392
+ }), d(e.createLast ? () => l(V) : V), p(H), f({
407
393
  element: h,
408
394
  loading: v,
409
395
  error: b,
@@ -411,18 +397,17 @@ function q(e) {
411
397
  blur: () => h.value?.blur?.(),
412
398
  clear: () => h.value?.clear?.(),
413
399
  ...e.expose?.(h)
414
- }), () => G(c, {
400
+ }), () => W(c, {
415
401
  error: b.value,
416
402
  loading: v.value,
417
403
  mount: j()
418
404
  }, m, s);
419
405
  },
420
- render: R
406
+ render: L
421
407
  });
422
408
  }
423
- //#endregion
424
- //#region src/components/VueStripePaymentElement.ts
425
- var re = /* @__PURE__ */ q({
409
+ // src/components/VueStripePaymentElement.ts
410
+ var re = /* @__PURE__ */ K({
426
411
  elementType: "payment",
427
412
  componentName: "VueStripePaymentElement",
428
413
  events: [
@@ -435,11 +420,12 @@ var re = /* @__PURE__ */ q({
435
420
  "loaderror",
436
421
  "availablepaymentmethodschange",
437
422
  "carddetailschange",
423
+ "fieldchange",
438
424
  "savedpaymentmethodupdate",
439
425
  "savedpaymentmethodremove"
440
426
  ],
441
427
  createOnly: { wallets: !0 },
442
- checkout: (e, t) => e.createPaymentElement(K(t, [
428
+ checkout: (e, t) => e.createPaymentElement(G(t, [
443
429
  "layout",
444
430
  "paymentMethodOrder",
445
431
  "readOnly",
@@ -450,7 +436,7 @@ var re = /* @__PURE__ */ q({
450
436
  ])),
451
437
  expose: (e) => ({ collapse: () => e.value?.collapse?.() }),
452
438
  loadingText: "Loading payment form..."
453
- }), ie = /* @__PURE__ */ q({
439
+ }), ie = /* @__PURE__ */ K({
454
440
  elementType: "expressCheckout",
455
441
  componentName: "VueStripeExpressCheckoutElement",
456
442
  events: [
@@ -484,7 +470,7 @@ var re = /* @__PURE__ */ q({
484
470
  shippingRates: !0,
485
471
  wallets: !0
486
472
  },
487
- checkout: (e, t) => e.createExpressCheckoutElement(K(t, [
473
+ checkout: (e, t) => e.createExpressCheckoutElement(G(t, [
488
474
  "buttonHeight",
489
475
  "buttonTheme",
490
476
  "buttonType",
@@ -496,7 +482,7 @@ var re = /* @__PURE__ */ q({
496
482
  expose: () => ({ clear: () => {
497
483
  console.warn("[Vue Stripe] clear() is not supported by the Express Checkout Element");
498
484
  } })
499
- }), ae = /* @__PURE__ */ q({
485
+ }), ae = /* @__PURE__ */ K({
500
486
  elementType: "card",
501
487
  componentName: "VueStripeCardElement",
502
488
  events: [
@@ -513,7 +499,7 @@ var re = /* @__PURE__ */ q({
513
499
  preferredNetwork: !0
514
500
  },
515
501
  loadingText: "Loading card form..."
516
- }), oe = /* @__PURE__ */ q({
502
+ }), oe = /* @__PURE__ */ K({
517
503
  elementType: "cardNumber",
518
504
  componentName: "VueStripeCardNumberElement",
519
505
  events: [
@@ -530,15 +516,15 @@ var re = /* @__PURE__ */ q({
530
516
  preferredNetwork: !0
531
517
  },
532
518
  loadingText: "Loading card number..."
533
- }), se = /* @__PURE__ */ q({
519
+ }), se = /* @__PURE__ */ K({
534
520
  elementType: "cardExpiry",
535
521
  componentName: "VueStripeCardExpiryElement",
536
522
  loadingText: "Loading card expiry..."
537
- }), ce = /* @__PURE__ */ q({
523
+ }), ce = /* @__PURE__ */ K({
538
524
  elementType: "cardCvc",
539
525
  componentName: "VueStripeCardCvcElement",
540
526
  loadingText: "Loading card CVC..."
541
- }), le = /* @__PURE__ */ q({
527
+ }), le = /* @__PURE__ */ K({
542
528
  elementType: "linkAuthentication",
543
529
  componentName: "VueStripeLinkAuthenticationElement",
544
530
  events: [
@@ -552,7 +538,7 @@ var re = /* @__PURE__ */ q({
552
538
  ],
553
539
  className: "vue-stripe-link-auth",
554
540
  loadingText: "Loading..."
555
- }), ue = /* @__PURE__ */ q({
541
+ }), ue = /* @__PURE__ */ K({
556
542
  elementType: "address",
557
543
  componentName: "VueStripeAddressElement",
558
544
  events: [
@@ -567,7 +553,7 @@ var re = /* @__PURE__ */ q({
567
553
  defaultOptions: () => ({ mode: "shipping" }),
568
554
  createOnly: { mode: !0 },
569
555
  checkout: (e, t) => {
570
- let n = K(t, [
556
+ let n = G(t, [
571
557
  "contacts",
572
558
  "display",
573
559
  "fields"
@@ -576,17 +562,17 @@ var re = /* @__PURE__ */ q({
576
562
  },
577
563
  expose: (e) => ({ getValue: (t) => t ? e.value?.getValue?.(t) : e.value?.getValue?.() }),
578
564
  loadingText: "Loading address form..."
579
- }), de = /* @__PURE__ */ q({
565
+ }), de = /* @__PURE__ */ K({
580
566
  elementType: "iban",
581
567
  componentName: "VueStripeIbanElement",
582
568
  defaultOptions: () => ({ supportedCountries: ["SEPA"] }),
583
569
  loadingText: "Loading IBAN form..."
584
- }), fe = /* @__PURE__ */ q({
570
+ }), fe = /* @__PURE__ */ K({
585
571
  elementType: "auBankAccount",
586
572
  componentName: "VueStripeAuBankAccountElement",
587
573
  className: "vue-stripe-au-bank-account-element",
588
574
  loadingText: "Loading BECS Direct Debit form..."
589
- }), pe = /* @__PURE__ */ q({
575
+ }), pe = /* @__PURE__ */ K({
590
576
  elementType: "paymentMethodMessaging",
591
577
  componentName: "VueStripePaymentMethodMessagingElement",
592
578
  loadingText: "Loading payment method messaging...",
@@ -622,7 +608,7 @@ var re = /* @__PURE__ */ q({
622
608
  "error"
623
609
  ],
624
610
  setup(e, { emit: t, expose: n, slots: r }) {
625
- let i = g(!1), a = V(r), o = () => {
611
+ let i = g(!1), a = B(r), o = () => {
626
612
  if (!(i.value || e.disabled)) {
627
613
  if (t("checkout"), !e.sessionUrl) {
628
614
  let e = new O("VueStripeCheckout: `sessionUrl` is required (create the Checkout Session on your server)");
@@ -635,22 +621,22 @@ var re = /* @__PURE__ */ q({
635
621
  loading: i
636
622
  }), () => {
637
623
  let t = r.default;
638
- return t ? L("span", {
624
+ return t ? I("span", {
639
625
  class: "vue-stripe-checkout-wrapper",
640
626
  onClick: o
641
627
  }, t({
642
628
  checkout: o,
643
629
  loading: i.value,
644
630
  disabled: e.disabled
645
- })) : L("button", {
631
+ })) : I("button", {
646
632
  class: e.buttonClass,
647
633
  disabled: i.value || e.disabled,
648
634
  onClick: o
649
- }, i.value ? [L("span", { class: "vue-stripe-loading-spinner" }), ` ${e.loadingText}`] : e.buttonText);
635
+ }, i.value ? [I("span", { class: "vue-stripe-loading-spinner" }), ` ${e.loadingText}`] : e.buttonText);
650
636
  };
651
637
  }
652
638
  }), he = () => new Promise(() => {});
653
- function J(e, t) {
639
+ function q(e, t) {
654
640
  let n = e.fetchClientSecret ? "fetchClientSecret" : "clientSecret", r = e.fetchClientSecret ? e.fetchClientSecret() : e.clientSecret;
655
641
  return r && typeof r == "string" ? r : Promise.resolve(r).then((e) => e && typeof e == "string" ? e : (t(`${n} did not resolve to a client secret`), he()), (e) => (t(e instanceof Error ? e.message : String(e)), he()));
656
642
  }
@@ -684,20 +670,20 @@ var ge = /* @__PURE__ */ n({
684
670
  "error"
685
671
  ],
686
672
  setup(e, { emit: t, slots: n }) {
687
- let r = U("VueStripeCheckoutElementsProvider"), i = _(null), a = _(null), o = _(null), s = g(!0), l = g(null), u = !1, d = !1, f = V(n), h = (e, n = !0) => {
673
+ let r = H("VueStripeCheckoutElementsProvider"), i = _(null), a = _(null), o = _(null), s = g(!0), l = g(null), u = !1, d = !1, f = B(n), h = (e, n = !0) => {
688
674
  d || (l.value = e, s.value = !1, n && f("Checkout init error", e), t("error", e));
689
675
  };
690
676
  y(() => r.error.value, (e) => {
691
677
  e && !u && h(e, !1);
692
678
  }, { immediate: !0 });
693
- let v = !e.fetchClientSecret && e.clientSecret instanceof Promise ? J(e, h) : void 0, b = () => {
679
+ let v = !e.fetchClientSecret && e.clientSecret instanceof Promise ? q(e, h) : void 0, b = () => {
694
680
  let n = r.stripe.value;
695
681
  if (!(u || !n || l.value)) {
696
682
  if (!e.clientSecret && !e.fetchClientSecret) h("VueStripeCheckoutElementsProvider requires a `clientSecret` (string or Promise) or `fetchClientSecret` prop");
697
683
  else {
698
684
  u = !0;
699
685
  try {
700
- let r = { clientSecret: v ?? J(e, h) };
686
+ let r = { clientSecret: v ?? q(e, h) };
701
687
  e.elementsOptions && (r.elementsOptions = e.elementsOptions), e.adaptivePricing && (r.adaptivePricing = e.adaptivePricing), e.defaultValues && (r.defaultValues = e.defaultValues);
702
688
  let l = n.initCheckoutElementsSdk(r);
703
689
  i.value = c(l), l.on("change", (e) => {
@@ -721,7 +707,7 @@ var ge = /* @__PURE__ */ n({
721
707
  session: o,
722
708
  loading: s,
723
709
  error: l
724
- }), () => z("vue-stripe-checkout", {
710
+ }), () => R("vue-stripe-checkout", {
725
711
  error: l.value ?? r.error.value,
726
712
  loading: !i.value
727
713
  }, n, {
@@ -731,8 +717,8 @@ var ge = /* @__PURE__ */ n({
731
717
  loading: s.value
732
718
  }, "Initializing Checkout...");
733
719
  },
734
- render: R
735
- }), Y = null, _e = /* @__PURE__ */ n({
720
+ render: L
721
+ }), J = null, _e = /* @__PURE__ */ n({
736
722
  name: "VueStripeEmbeddedCheckout",
737
723
  props: {
738
724
  clientSecret: {
@@ -755,9 +741,9 @@ var ge = /* @__PURE__ */ n({
755
741
  "error"
756
742
  ],
757
743
  setup(e, { emit: t, expose: n, slots: i }) {
758
- let a = U("VueStripeEmbeddedCheckout"), o = _(null), s = g(!0), l = g(null), u = r(), f = {}, m = !1, h = !1, v = !1, b = () => (u?.proxy)?.$refs.mount ?? null, x = () => {
759
- Y === f && (Y = null);
760
- }, S = V(i), C = B(), w = (e, n = !0) => {
744
+ let a = H("VueStripeEmbeddedCheckout"), o = _(null), s = g(!0), l = g(null), u = r(), f = {}, m = !1, h = !1, v = !1, b = () => (u?.proxy)?.$refs.mount ?? null, x = () => {
745
+ J === f && (J = null);
746
+ }, S = B(i), C = z(), w = (e, n = !0) => {
761
747
  l.value = e, s.value = !1, n && S("Embedded Checkout error", e), t("error", e);
762
748
  }, T = async () => {
763
749
  let n = a.stripe.value;
@@ -771,11 +757,11 @@ var ge = /* @__PURE__ */ n({
771
757
  w("VueStripeEmbeddedCheckout requires a `clientSecret` or `fetchClientSecret` prop");
772
758
  return;
773
759
  }
774
- if (Y) {
760
+ if (J) {
775
761
  w("Only one VueStripeEmbeddedCheckout can be mounted at a time (Stripe allows one Embedded Checkout per page)");
776
762
  return;
777
763
  }
778
- Y = f;
764
+ J = f;
779
765
  let r = {};
780
766
  C("complete") && (r.onComplete = () => t("complete")), C("analytics") && (r.onAnalyticsEvent = (e) => t("analytics", e));
781
767
  let i = e.onLineItemsChange;
@@ -809,12 +795,12 @@ var ge = /* @__PURE__ */ n({
809
795
  checkout: o,
810
796
  loading: s,
811
797
  error: l
812
- }), () => G("vue-stripe-embedded-checkout", {
798
+ }), () => W("vue-stripe-embedded-checkout", {
813
799
  error: l.value,
814
800
  loading: s.value
815
801
  }, i, "Loading checkout...");
816
802
  },
817
- render: R
803
+ render: L
818
804
  }), ve = /* @__PURE__ */ n({
819
805
  name: "VueStripeCheckoutFormProvider",
820
806
  props: {
@@ -853,20 +839,20 @@ var ge = /* @__PURE__ */ n({
853
839
  "error"
854
840
  ],
855
841
  setup(e, { emit: t, slots: n }) {
856
- let r = U("VueStripeCheckoutFormProvider"), i = _(null), a = _(null), o = _(null), s = g(!0), l = g(null), u = !1, d = !1, f = V(n), h = (e, n = !0) => {
842
+ let r = H("VueStripeCheckoutFormProvider"), i = _(null), a = _(null), o = _(null), s = g(!0), l = g(null), u = !1, d = !1, f = B(n), h = (e, n = !0) => {
857
843
  d || (l.value = e, s.value = !1, n && f("Checkout Form init error", e), t("error", e));
858
844
  };
859
845
  y(() => r.error.value, (e) => {
860
846
  e && !u && h(e, !1);
861
847
  }, { immediate: !0 });
862
- let v = !e.fetchClientSecret && e.clientSecret instanceof Promise ? J(e, h) : void 0, b = () => {
848
+ let v = !e.fetchClientSecret && e.clientSecret instanceof Promise ? q(e, h) : void 0, b = () => {
863
849
  let n = r.stripe.value;
864
850
  if (!(u || !n || l.value)) {
865
851
  if (!e.clientSecret && !e.fetchClientSecret) h("VueStripeCheckoutFormProvider requires a `clientSecret` (string or Promise) or `fetchClientSecret` prop");
866
852
  else {
867
853
  u = !0;
868
854
  try {
869
- let r = { clientSecret: v ?? J(e, h) };
855
+ let r = { clientSecret: v ?? q(e, h) };
870
856
  e.appearance && (r.appearance = e.appearance), e.loader && (r.loader = e.loader), e.fonts && (r.fonts = e.fonts), e.savedPaymentMethod && (r.savedPaymentMethod = e.savedPaymentMethod), e.defaultValues && (r.defaultValues = e.defaultValues);
871
857
  let l = n.initCheckoutFormSdk(r);
872
858
  i.value = c(l), l.on("change", (e) => {
@@ -890,7 +876,7 @@ var ge = /* @__PURE__ */ n({
890
876
  session: o,
891
877
  loading: s,
892
878
  error: l
893
- }), () => z("vue-stripe-checkout", {
879
+ }), () => R("vue-stripe-checkout", {
894
880
  error: l.value,
895
881
  loading: !i.value
896
882
  }, n, {
@@ -900,8 +886,8 @@ var ge = /* @__PURE__ */ n({
900
886
  loading: s.value
901
887
  }, "Initializing Checkout Form...");
902
888
  },
903
- render: R
904
- }), ye = /* @__PURE__ */ q({
889
+ render: L
890
+ }), ye = /* @__PURE__ */ K({
905
891
  elementType: "checkoutForm",
906
892
  componentName: "VueStripeCheckoutForm",
907
893
  events: [
@@ -923,7 +909,7 @@ var ge = /* @__PURE__ */ n({
923
909
  }),
924
910
  className: "vue-stripe-checkout-form",
925
911
  loadingText: "Loading checkout form..."
926
- }), be = /* @__PURE__ */ q({
912
+ }), be = /* @__PURE__ */ K({
927
913
  elementType: "taxId",
928
914
  componentName: "VueStripeTaxIdElement",
929
915
  events: [
@@ -939,7 +925,7 @@ var ge = /* @__PURE__ */ n({
939
925
  expose: (e) => ({ getValue: () => e.value?.getValue?.() }),
940
926
  className: "vue-stripe-tax-id-element",
941
927
  loadingText: "Loading tax ID form..."
942
- }), xe = /* @__PURE__ */ q({
928
+ }), xe = /* @__PURE__ */ K({
943
929
  elementType: "currencySelector",
944
930
  componentName: "VueStripeCurrencySelectorElement",
945
931
  events: [
@@ -955,7 +941,7 @@ var ge = /* @__PURE__ */ n({
955
941
  createLast: !0,
956
942
  className: "vue-stripe-currency-selector-element",
957
943
  loadingText: "Loading currency selector..."
958
- }), Se = /* @__PURE__ */ q({
944
+ }), Se = /* @__PURE__ */ K({
959
945
  elementType: "contactDetails",
960
946
  componentName: "VueStripeContactDetailsElement",
961
947
  events: [
@@ -970,7 +956,7 @@ var ge = /* @__PURE__ */ n({
970
956
  checkout: (e) => e.createContactDetailsElement(),
971
957
  className: "vue-stripe-contact-details-element",
972
958
  loadingText: "Loading contact details..."
973
- }), Ce = /* @__PURE__ */ q({
959
+ }), Ce = /* @__PURE__ */ K({
974
960
  elementType: "terms",
975
961
  componentName: "VueStripeTermsElement",
976
962
  events: [
@@ -984,7 +970,7 @@ var ge = /* @__PURE__ */ n({
984
970
  checkout: (e) => e.createTermsElement(),
985
971
  className: "vue-stripe-terms-element",
986
972
  loadingText: "Loading terms..."
987
- }), we = /* @__PURE__ */ q({
973
+ }), we = /* @__PURE__ */ K({
988
974
  elementType: "linkSignup",
989
975
  componentName: "VueStripeLinkSignupElement",
990
976
  events: [
@@ -995,13 +981,12 @@ var ge = /* @__PURE__ */ n({
995
981
  "loaderstart",
996
982
  "loaderror"
997
983
  ],
998
- checkout: (e, t) => e.createLinkSignupElement(K(t, ["defaultValues"])),
984
+ checkout: (e, t) => e.createLinkSignupElement(G(t, ["defaultValues"])),
999
985
  className: "vue-stripe-link-signup-element",
1000
986
  loadingText: "Loading Link signup..."
1001
987
  });
1002
- //#endregion
1003
- //#region src/utils/disclosure.ts
1004
- function X(e) {
988
+ // src/utils/disclosure.ts
989
+ function Y(e) {
1005
990
  let { componentName: t, method: i, optionKeys: a, className: s } = e;
1006
991
  return n({
1007
992
  name: t,
@@ -1019,7 +1004,7 @@ function X(e) {
1019
1004
  setup(e, { emit: n, expose: c, slots: l }) {
1020
1005
  let u = o(x, null);
1021
1006
  if (e.stripe === void 0 && !u) throw new E(`${t} needs a \`stripe\` prop, a VueStripeProvider ancestor or an app using createVueStripe()`);
1022
- let f = g(!0), m = g(null), h = r(), _ = () => (h?.proxy)?.$refs.mount ?? null, b = () => e.stripe === void 0 ? u?.stripe.value : e.stripe, S = () => JSON.stringify(a.map((t) => e.options?.[t])), C = 0, w = V(l), T = (e, r = !0) => {
1007
+ let f = g(!0), m = g(null), h = r(), _ = () => (h?.proxy)?.$refs.mount ?? null, b = () => e.stripe === void 0 ? u?.stripe.value : e.stripe, S = () => JSON.stringify(a.map((t) => e.options?.[t])), C = 0, w = B(l), T = (e, r = !0) => {
1023
1008
  let i = e.message ?? `${t} failed to load`;
1024
1009
  m.value = i, f.value = !1, r && w(`${t} error`, i), n("error", e);
1025
1010
  }, D = (e) => e instanceof Error ? e.message : String(e), O = async () => {
@@ -1058,22 +1043,21 @@ function X(e) {
1058
1043
  }), c({
1059
1044
  loading: f,
1060
1045
  error: m
1061
- }), () => G(s, {
1046
+ }), () => W(s, {
1062
1047
  error: m.value,
1063
1048
  loading: f.value && !m.value
1064
1049
  }, l, "Loading disclosure...");
1065
1050
  },
1066
- render: R
1051
+ render: L
1067
1052
  });
1068
1053
  }
1069
- //#endregion
1070
- //#region src/components/VueStripeFinancialAccountDisclosure.ts
1071
- var Te = /* @__PURE__ */ X({
1054
+ // src/components/VueStripeFinancialAccountDisclosure.ts
1055
+ var Te = /* @__PURE__ */ Y({
1072
1056
  componentName: "VueStripeFinancialAccountDisclosure",
1073
1057
  method: "createFinancialAccountDisclosure",
1074
1058
  optionKeys: ["businessName", "learnMoreLink"],
1075
1059
  className: "vue-stripe-financial-account-disclosure"
1076
- }), Ee = /* @__PURE__ */ X({
1060
+ }), Ee = /* @__PURE__ */ Y({
1077
1061
  componentName: "VueStripeIssuingDisclosure",
1078
1062
  method: "createIssuingDisclosure",
1079
1063
  optionKeys: [
@@ -1082,50 +1066,50 @@ var Te = /* @__PURE__ */ X({
1082
1066
  "learnMoreLink"
1083
1067
  ],
1084
1068
  className: "vue-stripe-issuing-disclosure"
1085
- }), De = /* @__PURE__ */ X({
1069
+ }), De = /* @__PURE__ */ Y({
1086
1070
  componentName: "VueStripeTreasuryDisclosure",
1087
1071
  method: "createTreasuryDisclosure",
1088
1072
  optionKeys: ["businessName", "learnMoreLink"],
1089
1073
  className: "vue-stripe-treasury-disclosure"
1090
- }), Oe = /* @__PURE__ */ q({
1074
+ }), Oe = /* @__PURE__ */ K({
1091
1075
  elementType: "issuingCardNumberDisplay",
1092
1076
  componentName: "VueStripeIssuingCardNumberDisplayElement",
1093
1077
  events: ["ready"],
1094
1078
  className: "vue-stripe-issuing-card-number-display-element",
1095
1079
  loadingText: "Loading card number..."
1096
- }), ke = /* @__PURE__ */ q({
1080
+ }), ke = /* @__PURE__ */ K({
1097
1081
  elementType: "issuingCardCvcDisplay",
1098
1082
  componentName: "VueStripeIssuingCardCvcDisplayElement",
1099
1083
  events: [],
1100
1084
  className: "vue-stripe-issuing-card-cvc-display-element",
1101
1085
  loadingText: "Loading CVC..."
1102
- }), Ae = /* @__PURE__ */ q({
1086
+ }), Ae = /* @__PURE__ */ K({
1103
1087
  elementType: "issuingCardExpiryDisplay",
1104
1088
  componentName: "VueStripeIssuingCardExpiryDisplayElement",
1105
1089
  events: [],
1106
1090
  className: "vue-stripe-issuing-card-expiry-display-element",
1107
1091
  loadingText: "Loading expiry date..."
1108
- }), je = /* @__PURE__ */ q({
1092
+ }), je = /* @__PURE__ */ K({
1109
1093
  elementType: "issuingCardPinDisplay",
1110
1094
  componentName: "VueStripeIssuingCardPinDisplayElement",
1111
1095
  events: [],
1112
1096
  className: "vue-stripe-issuing-card-pin-display-element",
1113
1097
  loadingText: "Loading PIN..."
1114
- }), Me = /* @__PURE__ */ q({
1098
+ }), Me = /* @__PURE__ */ K({
1115
1099
  elementType: "issuingCardCopyButton",
1116
1100
  componentName: "VueStripeIssuingCardCopyButtonElement",
1117
1101
  events: ["click"],
1118
1102
  className: "vue-stripe-issuing-card-copy-button-element",
1119
1103
  loadingText: "Loading copy button..."
1120
- }), Ne = /* @__PURE__ */ q({
1104
+ }), Ne = /* @__PURE__ */ K({
1121
1105
  elementType: "issuingAddToWalletButton",
1122
1106
  componentName: "VueStripeIssuingAddToWalletButtonElement",
1123
1107
  events: ["click", "success"],
1124
1108
  className: "vue-stripe-issuing-add-to-wallet-button-element",
1125
1109
  loadingText: "Loading Add to Wallet button..."
1126
- }), Pe = "https://js.stripe.com/v3/pricing-table.js", Fe = "stripe-pricing-table", Ie = "data-vue-stripe-loaded", Z = null, Le = () => {
1110
+ }), Pe = "https://js.stripe.com/v3/pricing-table.js", Fe = "stripe-pricing-table", Ie = "data-vue-stripe-loaded", X = null, Le = () => {
1127
1111
  if (customElements.get(Fe)) return Promise.resolve();
1128
- if (Z?.script.isConnected) return Z.promise;
1112
+ if (X?.script.isConnected) return X.promise;
1129
1113
  let e = document.querySelector(`script[src="${Pe}"]`);
1130
1114
  if (e?.hasAttribute(Ie)) return Promise.resolve();
1131
1115
  if (e) return customElements.whenDefined(Fe).then(() => void 0);
@@ -1133,12 +1117,12 @@ var Te = /* @__PURE__ */ X({
1133
1117
  t.src = Pe, t.async = !0;
1134
1118
  let n = new Promise((e, n) => {
1135
1119
  t.onload = () => {
1136
- t.setAttribute(Ie, ""), Z = null, e();
1120
+ t.setAttribute(Ie, ""), X = null, e();
1137
1121
  }, t.onerror = () => {
1138
- t.remove(), Z = null, n(/* @__PURE__ */ Error("Failed to load Stripe pricing table script"));
1122
+ t.remove(), X = null, n(/* @__PURE__ */ Error("Failed to load Stripe pricing table script"));
1139
1123
  };
1140
1124
  });
1141
- return Z = {
1125
+ return X = {
1142
1126
  script: t,
1143
1127
  promise: n
1144
1128
  }, document.head.appendChild(t), n;
@@ -1166,7 +1150,7 @@ var Te = /* @__PURE__ */ X({
1166
1150
  setup(t, { emit: n, expose: r, slots: i }) {
1167
1151
  let c = o(T, null);
1168
1152
  if (!c) throw new E("VueStripePricingTable must be used within a VueStripeProvider component or an app using createVueStripe()");
1169
- let l = c.publishableKey, u = l ? null : "VueStripePricingTable: publishableKey is empty. Check the key given to createVueStripe().", f = g(!u), p = g(u), m = V(i);
1153
+ let l = c.publishableKey, u = l ? null : "VueStripePricingTable: publishableKey is empty. Check the key given to createVueStripe().", f = g(!u), p = g(u), m = B(i);
1170
1154
  d(async () => {
1171
1155
  try {
1172
1156
  if (u) throw new E(u);
@@ -1180,7 +1164,7 @@ var Te = /* @__PURE__ */ X({
1180
1164
  error: p
1181
1165
  });
1182
1166
  let h = (t, n) => s ? n : [a(e, { key: t }, n)];
1183
- return () => L("div", { class: "vue-stripe-pricing-table" }, [...f.value ? h("loading", i.loading?.() ?? [L("div", { class: "vue-stripe-pricing-table-loading" }, "Loading pricing table...")]) : p.value ? h("error", i.error?.({ error: p.value }) ?? [L("div", { class: "vue-stripe-pricing-table-error" }, p.value)]) : [], ...u ? [] : [L("stripe-pricing-table", {
1167
+ return () => I("div", { class: "vue-stripe-pricing-table" }, [...f.value ? h("loading", i.loading?.() ?? [I("div", { class: "vue-stripe-pricing-table-loading" }, "Loading pricing table...")]) : p.value ? h("error", i.error?.({ error: p.value }) ?? [I("div", { class: "vue-stripe-pricing-table-error" }, p.value)]) : [], ...u ? [] : [I("stripe-pricing-table", {
1184
1168
  "pricing-table-id": t.pricingTableId,
1185
1169
  "publishable-key": l,
1186
1170
  "customer-email": t.customerEmail,
@@ -1189,12 +1173,11 @@ var Te = /* @__PURE__ */ X({
1189
1173
  hidden: f.value || !!p.value
1190
1174
  })]]);
1191
1175
  },
1192
- render: R
1176
+ render: L
1193
1177
  });
1194
- //#endregion
1195
- //#region src/composables/useStripe.ts
1178
+ // src/composables/useStripe.ts
1196
1179
  function ze() {
1197
- let e = U("useStripe");
1180
+ let e = H("useStripe");
1198
1181
  return {
1199
1182
  stripe: t(() => e.stripe.value),
1200
1183
  loading: h(e.loading),
@@ -1202,13 +1185,12 @@ function ze() {
1202
1185
  initialize: async () => {}
1203
1186
  };
1204
1187
  }
1205
- //#endregion
1206
- //#region src/composables/usePaymentIntent.ts
1188
+ // src/composables/usePaymentIntent.ts
1207
1189
  function Be() {
1208
- let e = U("usePaymentIntent"), t = o(S, null), n = g(!1), r = 0, i = g(null);
1190
+ let e = H("usePaymentIntent"), t = o(S, null), n = g(!1), r = 0, i = g(null);
1209
1191
  return {
1210
1192
  confirmPayment: async (a) => {
1211
- let o = e.stripe.value ?? await W(e);
1193
+ let o = e.stripe.value ?? await U(e);
1212
1194
  if (!o) return i.value = "Stripe not initialized", { error: { message: "Stripe not initialized" } };
1213
1195
  r++, n.value = !0, i.value = null;
1214
1196
  try {
@@ -1238,7 +1220,7 @@ function Be() {
1238
1220
  }
1239
1221
  },
1240
1222
  retrievePaymentIntent: async (t) => {
1241
- let a = e.stripe.value ?? await W(e);
1223
+ let a = e.stripe.value ?? await U(e);
1242
1224
  if (!a) return i.value = "Stripe not initialized", { error: { message: "Stripe not initialized" } };
1243
1225
  r++, n.value = !0, i.value = null;
1244
1226
  try {
@@ -1255,13 +1237,12 @@ function Be() {
1255
1237
  error: h(i)
1256
1238
  };
1257
1239
  }
1258
- //#endregion
1259
- //#region src/composables/useSetupIntent.ts
1240
+ // src/composables/useSetupIntent.ts
1260
1241
  function Ve() {
1261
- let e = U("useSetupIntent"), t = o(S, null), n = g(!1), r = 0, i = g(null);
1242
+ let e = H("useSetupIntent"), t = o(S, null), n = g(!1), r = 0, i = g(null);
1262
1243
  return {
1263
1244
  confirmSetup: async (a) => {
1264
- let o = e.stripe.value ?? await W(e);
1245
+ let o = e.stripe.value ?? await U(e);
1265
1246
  if (!o) return i.value = "Stripe not initialized", { error: { message: "Stripe not initialized" } };
1266
1247
  r++, n.value = !0, i.value = null;
1267
1248
  try {
@@ -1291,7 +1272,7 @@ function Ve() {
1291
1272
  }
1292
1273
  },
1293
1274
  retrieveSetupIntent: async (t) => {
1294
- let a = e.stripe.value ?? await W(e);
1275
+ let a = e.stripe.value ?? await U(e);
1295
1276
  if (!a) return i.value = "Stripe not initialized", { error: { message: "Stripe not initialized" } };
1296
1277
  r++, n.value = !0, i.value = null;
1297
1278
  try {
@@ -1308,8 +1289,7 @@ function Ve() {
1308
1289
  error: h(i)
1309
1290
  };
1310
1291
  }
1311
- //#endregion
1312
- //#region src/composables/useStripeCheckout.ts
1292
+ // src/composables/useStripeCheckout.ts
1313
1293
  function He() {
1314
1294
  let e = g(!1), t = g(null), n = (n) => {
1315
1295
  e.value = !0, t.value = null, window.location.replace(n);
@@ -1321,8 +1301,7 @@ function He() {
1321
1301
  error: h(t)
1322
1302
  };
1323
1303
  }
1324
- //#endregion
1325
- //#region src/composables/useStripeElements.ts
1304
+ // src/composables/useStripeElements.ts
1326
1305
  function Ue() {
1327
1306
  let e = o(S, null);
1328
1307
  if (!e) throw new D("Elements context not found. Make sure to wrap your component with VueStripeElements.");
@@ -1351,13 +1330,12 @@ function Ue() {
1351
1330
  error: h(e.error)
1352
1331
  };
1353
1332
  }
1354
- //#endregion
1355
- //#region src/composables/useCreatePaymentMethod.ts
1333
+ // src/composables/useCreatePaymentMethod.ts
1356
1334
  function We() {
1357
- let e = U("useCreatePaymentMethod"), t = o(S, null), n = g(!1), r = 0, i = g(null);
1335
+ let e = H("useCreatePaymentMethod"), t = o(S, null), n = g(!1), r = 0, i = g(null);
1358
1336
  return {
1359
1337
  createPaymentMethod: async (a = {}) => {
1360
- let o = e.stripe.value ?? await W(e);
1338
+ let o = e.stripe.value ?? await U(e);
1361
1339
  if (!o) return i.value = "Stripe not initialized", { error: { message: "Stripe not initialized" } };
1362
1340
  r++, n.value = !0, i.value = null;
1363
1341
  try {
@@ -1383,13 +1361,12 @@ function We() {
1383
1361
  error: h(i)
1384
1362
  };
1385
1363
  }
1386
- //#endregion
1387
- //#region src/composables/useHandleNextAction.ts
1364
+ // src/composables/useHandleNextAction.ts
1388
1365
  function Ge() {
1389
- let e = U("useHandleNextAction"), t = g(!1), n = 0, r = g(null);
1366
+ let e = H("useHandleNextAction"), t = g(!1), n = 0, r = g(null);
1390
1367
  return {
1391
1368
  handleNextAction: async (i) => {
1392
- let a = e.stripe.value ?? await W(e);
1369
+ let a = e.stripe.value ?? await U(e);
1393
1370
  if (!a) return r.value = "Stripe not initialized", { error: { message: "Stripe not initialized" } };
1394
1371
  n++, t.value = !0, r.value = null;
1395
1372
  try {
@@ -1406,15 +1383,14 @@ function Ge() {
1406
1383
  error: h(r)
1407
1384
  };
1408
1385
  }
1409
- //#endregion
1410
- //#region src/utils/method-factory.ts
1386
+ // src/utils/method-factory.ts
1411
1387
  function Ke(e, t, n) {
1412
- let r = U(e), i = g(!1), a = g(null), o = 0;
1388
+ let r = H(e), i = g(!1), a = g(null), o = 0;
1413
1389
  return {
1414
1390
  [t]: async (...e) => {
1415
1391
  o++, i.value = !0, a.value = null;
1416
1392
  try {
1417
- let i = r.stripe.value ?? await W(r);
1393
+ let i = r.stripe.value ?? await U(r);
1418
1394
  if (!i) throw new E("Stripe.js is not loaded yet");
1419
1395
  let o = await n(i, e), s = o?.error;
1420
1396
  return s && (a.value = s.message || `${t} failed`), o;
@@ -1428,14 +1404,12 @@ function Ke(e, t, n) {
1428
1404
  error: h(a)
1429
1405
  };
1430
1406
  }
1431
- function Q(e, t = `use${e.charAt(0).toUpperCase()}${e.slice(1)}`) {
1407
+ function Z(e, t = `use${e.charAt(0).toUpperCase()}${e.slice(1)}`) {
1432
1408
  return () => Ke(t, e, (t, n) => t[e].apply(t, n));
1433
1409
  }
1434
- //#endregion
1435
- //#region src/composables/useCreateToken.ts
1436
- var qe = /* @__PURE__ */ Q("createToken");
1437
- //#endregion
1438
- //#region src/composables/useCreateConfirmationToken.ts
1410
+ // src/composables/useCreateToken.ts
1411
+ var qe = /* @__PURE__ */ Z("createToken");
1412
+ // src/composables/useCreateConfirmationToken.ts
1439
1413
  function Je() {
1440
1414
  let e = o(S, null);
1441
1415
  return Ke("useCreateConfirmationToken", "createConfirmationToken", async (t, [n = {}]) => {
@@ -1451,9 +1425,8 @@ function Je() {
1451
1425
  } : { elements: a });
1452
1426
  });
1453
1427
  }
1454
- //#endregion
1455
- //#region src/composables/useHandleCardAction.ts
1456
- var Ye = /* @__PURE__ */ Q("handleCardAction"), Xe = /* @__PURE__ */ Q("verifyMicrodepositsForPayment"), Ze = /* @__PURE__ */ Q("verifyMicrodepositsForSetup"), Qe = /* @__PURE__ */ Q("createRadarSession", "useRadarSession"), $e = /* @__PURE__ */ Q("createEphemeralKeyNonce", "useEphemeralKeyNonce"), $ = (e) => Promise.resolve({
1428
+ // src/composables/useHandleCardAction.ts
1429
+ var Ye = /* @__PURE__ */ Z("handleCardAction"), Xe = /* @__PURE__ */ Z("verifyMicrodepositsForPayment"), Ze = /* @__PURE__ */ Z("verifyMicrodepositsForSetup"), Qe = /* @__PURE__ */ Z("createRadarSession", "useRadarSession"), $e = /* @__PURE__ */ Z("createEphemeralKeyNonce", "useEphemeralKeyNonce"), Q = (e) => Promise.resolve({
1457
1430
  type: "error",
1458
1431
  error: {
1459
1432
  message: e,
@@ -1463,18 +1436,17 @@ var Ye = /* @__PURE__ */ Q("handleCardAction"), Xe = /* @__PURE__ */ Q("verifyMi
1463
1436
  function et(e, t) {
1464
1437
  return (...n) => {
1465
1438
  let r = e.value;
1466
- if (!r) return $("Checkout session is not ready yet");
1439
+ if (!r) return Q("Checkout session is not ready yet");
1467
1440
  let i = r[t];
1468
- if (typeof i != "function") return $(`${t} is not available for this Checkout Session`);
1441
+ if (typeof i != "function") return Q(`${t} is not available for this Checkout Session`);
1469
1442
  try {
1470
- return Promise.resolve(i.apply(r, n)).catch((e) => $(e instanceof Error ? e.message : String(e)));
1443
+ return Promise.resolve(i.apply(r, n)).catch((e) => Q(e instanceof Error ? e.message : String(e)));
1471
1444
  } catch (e) {
1472
- return $(e instanceof Error ? e.message : String(e));
1445
+ return Q(e instanceof Error ? e.message : String(e));
1473
1446
  }
1474
1447
  };
1475
1448
  }
1476
- //#endregion
1477
- //#region src/composables/useCheckoutSession.ts
1449
+ // src/composables/useCheckoutSession.ts
1478
1450
  function tt() {
1479
1451
  let e = o(C, null);
1480
1452
  if (!e) throw new O("useCheckoutSession must be used within a VueStripeCheckoutElementsProvider component");
@@ -1499,6 +1471,8 @@ function tt() {
1499
1471
  removePromotionCode: n("removePromotionCode"),
1500
1472
  updateEmail: n("updateEmail"),
1501
1473
  updatePhoneNumber: n("updatePhoneNumber"),
1474
+ updateIndividualName: n("updateIndividualName"),
1475
+ updateBusinessName: n("updateBusinessName"),
1502
1476
  updateBillingAddress: n("updateBillingAddress"),
1503
1477
  updateShippingAddress: n("updateShippingAddress"),
1504
1478
  updateLineItemQuantity: n("updateLineItemQuantity"),
@@ -1516,18 +1490,17 @@ function tt() {
1516
1490
  getExpressCheckoutElement: i("getExpressCheckoutElement"),
1517
1491
  getCurrencySelectorElement: i("getCurrencySelectorElement"),
1518
1492
  getTaxIdElement: i("getTaxIdElement"),
1493
+ getContactDetailsElement: i("getContactDetailsElement"),
1519
1494
  getTermsElement: i("getTermsElement"),
1520
1495
  getLinkSignupElement: i("getLinkSignupElement")
1521
1496
  };
1522
1497
  }
1523
- //#endregion
1524
- //#region src/composables/confirm/index.ts
1525
- var nt = /* @__PURE__ */ Q("confirmAcssDebitPayment"), rt = /* @__PURE__ */ Q("confirmAcssDebitSetup"), it = /* @__PURE__ */ Q("confirmAffirmPayment"), at = /* @__PURE__ */ Q("confirmAfterpayClearpayPayment"), ot = /* @__PURE__ */ Q("confirmAlipayPayment"), st = /* @__PURE__ */ Q("confirmAmazonPaySetup"), ct = /* @__PURE__ */ Q("confirmAuBecsDebitPayment"), lt = /* @__PURE__ */ Q("confirmAuBecsDebitSetup"), ut = /* @__PURE__ */ Q("confirmBacsDebitSetup"), dt = /* @__PURE__ */ Q("confirmBancontactPayment"), ft = /* @__PURE__ */ Q("confirmBancontactSetup"), pt = /* @__PURE__ */ Q("confirmBilliePayment"), mt = /* @__PURE__ */ Q("confirmBlikPayment"), ht = /* @__PURE__ */ Q("confirmBlikSetup"), gt = /* @__PURE__ */ Q("confirmBoletoPayment"), _t = /* @__PURE__ */ Q("confirmCardPayment"), vt = /* @__PURE__ */ Q("confirmCardSetup"), yt = /* @__PURE__ */ Q("confirmCashappPayment"), bt = /* @__PURE__ */ Q("confirmCashappSetup"), xt = /* @__PURE__ */ Q("confirmCustomerBalancePayment"), St = /* @__PURE__ */ Q("confirmEpsPayment"), Ct = /* @__PURE__ */ Q("confirmFpxPayment"), wt = /* @__PURE__ */ Q("confirmGiropayPayment"), Tt = /* @__PURE__ */ Q("confirmGrabPayPayment"), Et = /* @__PURE__ */ Q("confirmIdealPayment"), Dt = /* @__PURE__ */ Q("confirmIdealSetup"), Ot = /* @__PURE__ */ Q("confirmKlarnaPayment"), kt = /* @__PURE__ */ Q("confirmKonbiniPayment"), At = /* @__PURE__ */ Q("confirmMobilepayPayment"), jt = /* @__PURE__ */ Q("confirmMultibancoPayment"), Mt = /* @__PURE__ */ Q("confirmOxxoPayment"), Nt = /* @__PURE__ */ Q("confirmP24Payment"), Pt = /* @__PURE__ */ Q("confirmPayByBankPayment"), Ft = /* @__PURE__ */ Q("confirmPayNowPayment"), It = /* @__PURE__ */ Q("confirmPayPalPayment"), Lt = /* @__PURE__ */ Q("confirmPayPalSetup"), Rt = /* @__PURE__ */ Q("confirmPixPayment"), zt = /* @__PURE__ */ Q("confirmPromptPayPayment"), Bt = /* @__PURE__ */ Q("confirmSepaDebitPayment"), Vt = /* @__PURE__ */ Q("confirmSepaDebitSetup"), Ht = /* @__PURE__ */ Q("confirmSofortPayment"), Ut = /* @__PURE__ */ Q("confirmSofortSetup"), Wt = /* @__PURE__ */ Q("confirmTwintPayment"), Gt = /* @__PURE__ */ Q("confirmUsBankAccountPayment"), Kt = /* @__PURE__ */ Q("confirmUsBankAccountSetup"), qt = /* @__PURE__ */ Q("confirmWechatPayPayment");
1526
- //#endregion
1527
- //#region src/composables/useFinancialConnections.ts
1498
+ // src/composables/confirm/index.ts
1499
+ var nt = /* @__PURE__ */ Z("confirmAcssDebitPayment"), rt = /* @__PURE__ */ Z("confirmAcssDebitSetup"), it = /* @__PURE__ */ Z("confirmAffirmPayment"), at = /* @__PURE__ */ Z("confirmAfterpayClearpayPayment"), ot = /* @__PURE__ */ Z("confirmAlipayPayment"), st = /* @__PURE__ */ Z("confirmAmazonPaySetup"), ct = /* @__PURE__ */ Z("confirmAuBecsDebitPayment"), lt = /* @__PURE__ */ Z("confirmAuBecsDebitSetup"), ut = /* @__PURE__ */ Z("confirmBacsDebitSetup"), dt = /* @__PURE__ */ Z("confirmBancontactPayment"), ft = /* @__PURE__ */ Z("confirmBancontactSetup"), pt = /* @__PURE__ */ Z("confirmBilliePayment"), mt = /* @__PURE__ */ Z("confirmBlikPayment"), ht = /* @__PURE__ */ Z("confirmBlikSetup"), gt = /* @__PURE__ */ Z("confirmBoletoPayment"), _t = /* @__PURE__ */ Z("confirmCardPayment"), vt = /* @__PURE__ */ Z("confirmCardSetup"), yt = /* @__PURE__ */ Z("confirmCashappPayment"), bt = /* @__PURE__ */ Z("confirmCashappSetup"), xt = /* @__PURE__ */ Z("confirmCustomerBalancePayment"), St = /* @__PURE__ */ Z("confirmEpsPayment"), Ct = /* @__PURE__ */ Z("confirmFpxPayment"), wt = /* @__PURE__ */ Z("confirmGiropayPayment"), Tt = /* @__PURE__ */ Z("confirmGrabPayPayment"), Et = /* @__PURE__ */ Z("confirmIdealPayment"), Dt = /* @__PURE__ */ Z("confirmIdealSetup"), Ot = /* @__PURE__ */ Z("confirmKlarnaPayment"), kt = /* @__PURE__ */ Z("confirmKonbiniPayment"), At = /* @__PURE__ */ Z("confirmMobilepayPayment"), jt = /* @__PURE__ */ Z("confirmMultibancoPayment"), Mt = /* @__PURE__ */ Z("confirmOxxoPayment"), Nt = /* @__PURE__ */ Z("confirmP24Payment"), Pt = /* @__PURE__ */ Z("confirmPayByBankPayment"), Ft = /* @__PURE__ */ Z("confirmPayNowPayment"), It = /* @__PURE__ */ Z("confirmPayPalPayment"), Lt = /* @__PURE__ */ Z("confirmPayPalSetup"), Rt = /* @__PURE__ */ Z("confirmPixPayment"), zt = /* @__PURE__ */ Z("confirmPromptPayPayment"), Bt = /* @__PURE__ */ Z("confirmSepaDebitPayment"), Vt = /* @__PURE__ */ Z("confirmSepaDebitSetup"), Ht = /* @__PURE__ */ Z("confirmSofortPayment"), Ut = /* @__PURE__ */ Z("confirmSofortSetup"), Wt = /* @__PURE__ */ Z("confirmTwintPayment"), Gt = /* @__PURE__ */ Z("confirmUsBankAccountPayment"), Kt = /* @__PURE__ */ Z("confirmUsBankAccountSetup"), qt = /* @__PURE__ */ Z("confirmWechatPayPayment");
1500
+ // src/composables/useFinancialConnections.ts
1528
1501
  function Jt() {
1529
- let e = U("useFinancialConnections"), t = g(!1), n = 0, r = g(null), i = async (i, a) => {
1530
- let o = e.stripe.value ?? await W(e);
1502
+ let e = H("useFinancialConnections"), t = g(!1), n = 0, r = g(null), i = async (i, a) => {
1503
+ let o = e.stripe.value ?? await U(e);
1531
1504
  if (!o) return r.value = "Stripe not initialized", { error: { message: "Stripe not initialized" } };
1532
1505
  n++, t.value = !0, r.value = null;
1533
1506
  try {
@@ -1549,13 +1522,12 @@ function Jt() {
1549
1522
  error: h(r)
1550
1523
  };
1551
1524
  }
1552
- //#endregion
1553
- //#region src/composables/useIdentity.ts
1525
+ // src/composables/useIdentity.ts
1554
1526
  function Yt() {
1555
- let e = U("useIdentity"), t = g(!1), n = 0, r = g(null);
1527
+ let e = H("useIdentity"), t = g(!1), n = 0, r = g(null);
1556
1528
  return {
1557
1529
  verifyIdentity: async (i) => {
1558
- let a = e.stripe.value ?? await W(e);
1530
+ let a = e.stripe.value ?? await U(e);
1559
1531
  if (!a) return r.value = "Stripe not initialized", { error: { message: "Stripe not initialized" } };
1560
1532
  n++, t.value = !0, r.value = null;
1561
1533
  try {
@@ -1572,8 +1544,7 @@ function Yt() {
1572
1544
  error: h(r)
1573
1545
  };
1574
1546
  }
1575
- //#endregion
1576
- //#region src/composables/useCheckoutForm.ts
1547
+ // src/composables/useCheckoutForm.ts
1577
1548
  function Xt() {
1578
1549
  let e = o(w, null);
1579
1550
  if (!e) throw new O("useCheckoutForm must be used within a VueStripeCheckoutFormProvider component");
@@ -1602,11 +1573,10 @@ function Xt() {
1602
1573
  getCurrencySelectorElement: () => e.checkout.value?.getCurrencySelectorElement() ?? null
1603
1574
  };
1604
1575
  }
1605
- //#endregion
1606
- //#region src/composables/usePaymentRequest.ts
1607
- var Zt = (e, t) => e instanceof Error ? e.message : t;
1608
- function Qt(e) {
1609
- let n = U("usePaymentRequest"), r = _(null), a = g(null), o = g(!1), s = g(null), c = [], l = 0, u = (e) => e, d = () => {
1576
+ // src/composables/usePaymentRequest.ts
1577
+ var $ = (e, t) => e instanceof Error ? e.message : t;
1578
+ function Zt(e) {
1579
+ let n = H("usePaymentRequest"), r = _(null), a = g(null), o = g(!1), s = g(null), c = [], l = 0, u = (e) => e, d = () => {
1610
1580
  l++;
1611
1581
  let e = r.value;
1612
1582
  if (e) for (let { event: t, handler: n } of c) u(e).off(t, n);
@@ -1617,7 +1587,7 @@ function Qt(e) {
1617
1587
  try {
1618
1588
  n = t.paymentRequest(e);
1619
1589
  } catch (e) {
1620
- s.value = Zt(e, "Failed to create the PaymentRequest");
1590
+ s.value = $(e, "Failed to create the PaymentRequest");
1621
1591
  return;
1622
1592
  }
1623
1593
  r.value = n;
@@ -1626,7 +1596,7 @@ function Qt(e) {
1626
1596
  o.value = !0, n.canMakePayment().then((e) => {
1627
1597
  i === l && (a.value = e, o.value = !1);
1628
1598
  }, (e) => {
1629
- i === l && (s.value = Zt(e, "Failed to check for a wallet"), o.value = !1);
1599
+ i === l && (s.value = $(e, "Failed to check for a wallet"), o.value = !1);
1630
1600
  });
1631
1601
  };
1632
1602
  y(() => n.stripe.value, (e) => e ? p(e) : d(), { immediate: !0 });
@@ -1636,7 +1606,7 @@ function Qt(e) {
1636
1606
  else try {
1637
1607
  t(n), s.value = null;
1638
1608
  } catch (t) {
1639
- s.value = Zt(t, `Failed to call ${e}()`);
1609
+ s.value = $(t, `Failed to call ${e}()`);
1640
1610
  }
1641
1611
  }, v = (e, t) => {
1642
1612
  let n = c.filter((n) => n.event === e && (!t || n.handler === t));
@@ -1665,14 +1635,32 @@ function Qt(e) {
1665
1635
  error: h(s)
1666
1636
  };
1667
1637
  }
1668
- //#endregion
1669
- //#region src/plugin.ts
1638
+ // src/composables/usePricing.ts
1639
+ function Qt() {
1640
+ let e = H("usePricing"), n = _(null), r = g(!1), i = g(null), a = null;
1641
+ return {
1642
+ pricing: t(() => n.value),
1643
+ initializePricing: (t) => a || (n.value = null, r.value = !0, i.value = null, a = (async () => {
1644
+ try {
1645
+ let r = await U(e);
1646
+ return r ? (n.value = await r.initializePricing(t), n.value) : (i.value = "Stripe not initialized", null);
1647
+ } catch (e) {
1648
+ return i.value = e instanceof Error ? e.message : "Failed to initialize pricing", null;
1649
+ } finally {
1650
+ r.value = !1, a = null;
1651
+ }
1652
+ })(), a),
1653
+ loading: h(r),
1654
+ error: h(i)
1655
+ };
1656
+ }
1657
+ // src/plugin.ts
1670
1658
  function $t(e) {
1671
1659
  let t = _(null), n = g(!0), r = g(null), i = !1, a = () => {
1672
1660
  if (i || typeof window > "u") return;
1673
1661
  i = !0;
1674
1662
  let a = {};
1675
- e.stripeAccount && (a.stripeAccount = e.stripeAccount), e.apiVersion && (a.apiVersion = e.apiVersion), e.locale && (a.locale = e.locale), e.developerTools && (a.developerTools = e.developerTools), F(e.publishableKey, a, e.advancedFraudSignals).then((e) => {
1663
+ e.stripeAccount && (a.stripeAccount = e.stripeAccount), e.apiVersion && (a.apiVersion = e.apiVersion), e.locale && (a.locale = e.locale), e.developerTools && (a.developerTools = e.developerTools), P(e.publishableKey, a, e.advancedFraudSignals).then((e) => {
1676
1664
  t.value = e;
1677
1665
  }).catch((e) => {
1678
1666
  let t = e instanceof Error ? e.message : "Failed to load Stripe";
@@ -1709,5 +1697,4 @@ function en(e) {
1709
1697
  } }) : (e.provide(T, t), e.provide(x, n));
1710
1698
  } };
1711
1699
  }
1712
- //#endregion
1713
- export { ue as VueStripeAddressElement, fe as VueStripeAuBankAccountElement, ce as VueStripeCardCvcElement, ae as VueStripeCardElement, se as VueStripeCardExpiryElement, oe as VueStripeCardNumberElement, me as VueStripeCheckout, ge as VueStripeCheckoutElementsProvider, ge as VueStripeCheckoutProvider, O as VueStripeCheckoutError, ye as VueStripeCheckoutForm, ve as VueStripeCheckoutFormProvider, Se as VueStripeContactDetailsElement, xe as VueStripeCurrencySelectorElement, ee as VueStripeElements, D as VueStripeElementsError, _e as VueStripeEmbeddedCheckout, ie as VueStripeExpressCheckoutElement, Te as VueStripeFinancialAccountDisclosure, de as VueStripeIbanElement, Ne as VueStripeIssuingAddToWalletButtonElement, Me as VueStripeIssuingCardCopyButtonElement, ke as VueStripeIssuingCardCvcDisplayElement, Ae as VueStripeIssuingCardExpiryDisplayElement, Oe as VueStripeIssuingCardNumberDisplayElement, je as VueStripeIssuingCardPinDisplayElement, Ee as VueStripeIssuingDisclosure, le as VueStripeLinkAuthenticationElement, we as VueStripeLinkSignupElement, re as VueStripePaymentElement, pe as VueStripePaymentMethodMessagingElement, Re as VueStripePricingTable, H as VueStripeProvider, E as VueStripeProviderError, be as VueStripeTaxIdElement, Ce as VueStripeTermsElement, De as VueStripeTreasuryDisclosure, en as createVueStripe, M as loadStripe, T as stripeConfigInjectionKey, He as useCheckout, He as useStripeCheckout, Xt as useCheckoutForm, tt as useCheckoutSession, nt as useConfirmAcssDebitPayment, rt as useConfirmAcssDebitSetup, it as useConfirmAffirmPayment, at as useConfirmAfterpayClearpayPayment, ot as useConfirmAlipayPayment, st as useConfirmAmazonPaySetup, ct as useConfirmAuBecsDebitPayment, lt as useConfirmAuBecsDebitSetup, ut as useConfirmBacsDebitSetup, dt as useConfirmBancontactPayment, ft as useConfirmBancontactSetup, pt as useConfirmBilliePayment, mt as useConfirmBlikPayment, ht as useConfirmBlikSetup, gt as useConfirmBoletoPayment, _t as useConfirmCardPayment, vt as useConfirmCardSetup, yt as useConfirmCashappPayment, bt as useConfirmCashappSetup, xt as useConfirmCustomerBalancePayment, St as useConfirmEpsPayment, Ct as useConfirmFpxPayment, wt as useConfirmGiropayPayment, Tt as useConfirmGrabPayPayment, Et as useConfirmIdealPayment, Dt as useConfirmIdealSetup, Ot as useConfirmKlarnaPayment, kt as useConfirmKonbiniPayment, At as useConfirmMobilepayPayment, jt as useConfirmMultibancoPayment, Mt as useConfirmOxxoPayment, Nt as useConfirmP24Payment, Pt as useConfirmPayByBankPayment, Ft as useConfirmPayNowPayment, It as useConfirmPayPalPayment, Lt as useConfirmPayPalSetup, Rt as useConfirmPixPayment, zt as useConfirmPromptPayPayment, Bt as useConfirmSepaDebitPayment, Vt as useConfirmSepaDebitSetup, Ht as useConfirmSofortPayment, Ut as useConfirmSofortSetup, Wt as useConfirmTwintPayment, Gt as useConfirmUsBankAccountPayment, Kt as useConfirmUsBankAccountSetup, qt as useConfirmWechatPayPayment, Je as useCreateConfirmationToken, We as useCreatePaymentMethod, qe as useCreateToken, Ue as useElements, Ue as useStripeElements, $e as useEphemeralKeyNonce, Jt as useFinancialConnections, Ye as useHandleCardAction, Ge as useHandleNextAction, Yt as useIdentity, Be as usePaymentIntent, Qt as usePaymentRequest, Qe as useRadarSession, Ve as useSetupIntent, ze as useStripe, Xe as useVerifyMicrodepositsForPayment, Ze as useVerifyMicrodepositsForSetup };
1700
+ export { ue as VueStripeAddressElement, fe as VueStripeAuBankAccountElement, ce as VueStripeCardCvcElement, ae as VueStripeCardElement, se as VueStripeCardExpiryElement, oe as VueStripeCardNumberElement, me as VueStripeCheckout, ge as VueStripeCheckoutElementsProvider, ge as VueStripeCheckoutProvider, O as VueStripeCheckoutError, ye as VueStripeCheckoutForm, ve as VueStripeCheckoutFormProvider, Se as VueStripeContactDetailsElement, xe as VueStripeCurrencySelectorElement, ee as VueStripeElements, D as VueStripeElementsError, _e as VueStripeEmbeddedCheckout, ie as VueStripeExpressCheckoutElement, Te as VueStripeFinancialAccountDisclosure, de as VueStripeIbanElement, Ne as VueStripeIssuingAddToWalletButtonElement, Me as VueStripeIssuingCardCopyButtonElement, ke as VueStripeIssuingCardCvcDisplayElement, Ae as VueStripeIssuingCardExpiryDisplayElement, Oe as VueStripeIssuingCardNumberDisplayElement, je as VueStripeIssuingCardPinDisplayElement, Ee as VueStripeIssuingDisclosure, le as VueStripeLinkAuthenticationElement, we as VueStripeLinkSignupElement, re as VueStripePaymentElement, pe as VueStripePaymentMethodMessagingElement, Re as VueStripePricingTable, V as VueStripeProvider, E as VueStripeProviderError, be as VueStripeTaxIdElement, Ce as VueStripeTermsElement, De as VueStripeTreasuryDisclosure, en as createVueStripe, j as loadStripe, T as stripeConfigInjectionKey, He as useCheckout, He as useStripeCheckout, Xt as useCheckoutForm, tt as useCheckoutSession, nt as useConfirmAcssDebitPayment, rt as useConfirmAcssDebitSetup, it as useConfirmAffirmPayment, at as useConfirmAfterpayClearpayPayment, ot as useConfirmAlipayPayment, st as useConfirmAmazonPaySetup, ct as useConfirmAuBecsDebitPayment, lt as useConfirmAuBecsDebitSetup, ut as useConfirmBacsDebitSetup, dt as useConfirmBancontactPayment, ft as useConfirmBancontactSetup, pt as useConfirmBilliePayment, mt as useConfirmBlikPayment, ht as useConfirmBlikSetup, gt as useConfirmBoletoPayment, _t as useConfirmCardPayment, vt as useConfirmCardSetup, yt as useConfirmCashappPayment, bt as useConfirmCashappSetup, xt as useConfirmCustomerBalancePayment, St as useConfirmEpsPayment, Ct as useConfirmFpxPayment, wt as useConfirmGiropayPayment, Tt as useConfirmGrabPayPayment, Et as useConfirmIdealPayment, Dt as useConfirmIdealSetup, Ot as useConfirmKlarnaPayment, kt as useConfirmKonbiniPayment, At as useConfirmMobilepayPayment, jt as useConfirmMultibancoPayment, Mt as useConfirmOxxoPayment, Nt as useConfirmP24Payment, Pt as useConfirmPayByBankPayment, Ft as useConfirmPayNowPayment, It as useConfirmPayPalPayment, Lt as useConfirmPayPalSetup, Rt as useConfirmPixPayment, zt as useConfirmPromptPayPayment, Bt as useConfirmSepaDebitPayment, Vt as useConfirmSepaDebitSetup, Ht as useConfirmSofortPayment, Ut as useConfirmSofortSetup, Wt as useConfirmTwintPayment, Gt as useConfirmUsBankAccountPayment, Kt as useConfirmUsBankAccountSetup, qt as useConfirmWechatPayPayment, Je as useCreateConfirmationToken, We as useCreatePaymentMethod, qe as useCreateToken, Ue as useElements, Ue as useStripeElements, $e as useEphemeralKeyNonce, Jt as useFinancialConnections, Ye as useHandleCardAction, Ge as useHandleNextAction, Yt as useIdentity, Be as usePaymentIntent, Zt as usePaymentRequest, Qt as usePricing, Qe as useRadarSession, Ve as useSetupIntent, ze as useStripe, Xe as useVerifyMicrodepositsForPayment, Ze as useVerifyMicrodepositsForSetup };