stripe-pwa-elements 3.1.0 → 4.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.
Files changed (235) hide show
  1. package/dist/cjs/app-globals-V2Kpy_OQ.js +0 -3
  2. package/dist/cjs/error-FFC4kSs5.js +0 -3
  3. package/dist/cjs/{factory-Hsw0e7-d.js → factory-da3xAKkz.js} +194 -73
  4. package/dist/cjs/{index-Ba1pBePA.js → index-CYbA1N_k.js} +24 -6
  5. package/dist/cjs/index-Dkb0SxZc.js +4694 -0
  6. package/dist/cjs/index.cjs.js +0 -1
  7. package/dist/cjs/ion-icon.cjs.entry.js +22 -13
  8. package/dist/cjs/loader.cjs.js +2 -3
  9. package/dist/cjs/stripe-address-element.cjs.entry.js +34 -26
  10. package/dist/cjs/stripe-card-element-modal.cjs.entry.js +6 -7
  11. package/dist/cjs/stripe-card-element_2.cjs.entry.js +135 -73
  12. package/dist/cjs/stripe-currency-selector.cjs.entry.js +13 -10
  13. package/dist/cjs/stripe-elements.cjs.js +31 -5
  14. package/dist/cjs/stripe-express-checkout-element.cjs.entry.js +25 -22
  15. package/dist/cjs/stripe-link-authentication-element.cjs.entry.js +13 -10
  16. package/dist/cjs/stripe-payment-element.cjs.entry.js +190 -131
  17. package/dist/cjs/stripe-payment-request-button.cjs.entry.js +12 -7
  18. package/dist/collection/collection-manifest.json +3 -2
  19. package/dist/collection/components/stripe-address-element/stripe-address-element.js +29 -21
  20. package/dist/collection/components/stripe-card-element/stripe-card-element.helpers.js +57 -0
  21. package/dist/collection/components/stripe-card-element/stripe-card-element.js +55 -68
  22. package/dist/collection/components/stripe-card-element-modal/stripe-card-element-modal.css +2 -2
  23. package/dist/collection/components/stripe-card-element-modal/stripe-card-element-modal.js +16 -12
  24. package/dist/collection/components/stripe-currency-selector/stripe-currency-selector.js +10 -6
  25. package/dist/collection/components/stripe-express-checkout-element/stripe-express-checkout-element.js +28 -20
  26. package/dist/collection/components/stripe-link-authentication-element/stripe-link-authentication-element.js +12 -7
  27. package/dist/collection/components/stripe-modal/stripe-modal.css +36 -2
  28. package/dist/collection/components/stripe-modal/stripe-modal.js +34 -7
  29. package/dist/collection/components/stripe-payment-element/stripe-payment-element.helpers.js +114 -0
  30. package/dist/collection/components/stripe-payment-element/stripe-payment-element.js +69 -126
  31. package/dist/collection/components/stripe-payment-request-button/stripe-payment-request-button.js +34 -12
  32. package/dist/collection/index.js +0 -1
  33. package/dist/collection/interfaces.js +0 -1
  34. package/dist/collection/services/address-element-manager.js +3 -4
  35. package/dist/collection/services/card-element-manager.js +3 -4
  36. package/dist/collection/services/currency-selector-element-manager.js +3 -4
  37. package/dist/collection/services/express-checkout-element-manager.js +9 -10
  38. package/dist/collection/services/factory.js +0 -1
  39. package/dist/collection/services/interfaces.js +0 -1
  40. package/dist/collection/services/link-authentication-element-manager.js +3 -4
  41. package/dist/collection/services/payment-element-manager.js +4 -5
  42. package/dist/collection/services/stripe-service.js +5 -6
  43. package/dist/collection/utils/element-finder.js +2 -3
  44. package/dist/collection/utils/error.js +0 -1
  45. package/dist/collection/utils/i18n.js +0 -1
  46. package/dist/collection/utils/platform.js +0 -1
  47. package/dist/collection/utils/test-setup.js +5 -0
  48. package/dist/collection/utils/utils.js +2 -3
  49. package/dist/components/error.js +1 -16
  50. package/dist/components/factory.js +1 -3736
  51. package/dist/components/icon.js +1 -459
  52. package/dist/components/index.d.ts +2 -0
  53. package/dist/components/index.js +1 -4
  54. package/dist/components/index2.js +1 -192
  55. package/dist/components/ion-icon.js +1 -9
  56. package/dist/components/stripe-address-element.js +1 -327
  57. package/dist/components/stripe-card-element-modal.js +1 -174
  58. package/dist/components/stripe-card-element.js +1 -9
  59. package/dist/components/stripe-card-element2.js +1 -440
  60. package/dist/components/stripe-currency-selector.js +1 -218
  61. package/dist/components/stripe-express-checkout-element.js +1 -332
  62. package/dist/components/stripe-link-authentication-element.js +1 -256
  63. package/dist/components/stripe-modal.js +1 -9
  64. package/dist/components/stripe-modal2.js +1 -88
  65. package/dist/components/stripe-payment-element.js +1 -510
  66. package/dist/components/stripe-payment-request-button.js +1 -9
  67. package/dist/components/stripe-payment-request-button2.js +1 -224
  68. package/dist/components/utils.js +1 -89
  69. package/dist/esm/app-globals-DQuL1Twl.js +0 -3
  70. package/dist/esm/error-XRfh5Wrs.js +0 -3
  71. package/dist/esm/{factory-Li_TGt9P.js → factory-DeqoYLf_.js} +194 -73
  72. package/dist/esm/index-C6bbmyga.js +4677 -0
  73. package/dist/esm/{index-BHDCxQOb.js → index-CBXaOfXU.js} +24 -6
  74. package/dist/esm/index.js +0 -1
  75. package/dist/esm/ion-icon.entry.js +22 -13
  76. package/dist/esm/loader.js +3 -4
  77. package/dist/esm/stripe-address-element.entry.js +34 -26
  78. package/dist/esm/stripe-card-element-modal.entry.js +6 -7
  79. package/dist/esm/stripe-card-element_2.entry.js +135 -73
  80. package/dist/esm/stripe-currency-selector.entry.js +13 -10
  81. package/dist/esm/stripe-elements.js +32 -6
  82. package/dist/esm/stripe-express-checkout-element.entry.js +25 -22
  83. package/dist/esm/stripe-link-authentication-element.entry.js +13 -10
  84. package/dist/esm/stripe-payment-element.entry.js +190 -131
  85. package/dist/esm/stripe-payment-request-button.entry.js +12 -7
  86. package/dist/stripe-elements/index.esm.js +0 -2
  87. package/dist/stripe-elements/p--sA2m1ad.js +1 -0
  88. package/dist/stripe-elements/p-38e7b187.entry.js +1 -0
  89. package/dist/stripe-elements/p-44495284.entry.js +1 -0
  90. package/dist/stripe-elements/p-4ba675fa.entry.js +1 -0
  91. package/dist/stripe-elements/p-5cf62945.entry.js +1 -0
  92. package/dist/stripe-elements/p-C6bbmyga.js +2 -0
  93. package/dist/stripe-elements/p-CBXaOfXU.js +1 -0
  94. package/dist/stripe-elements/p-DQuL1Twl.js +1 -2
  95. package/dist/stripe-elements/p-XRfh5Wrs.js +1 -2
  96. package/dist/stripe-elements/p-c24ae181.entry.js +1 -0
  97. package/dist/stripe-elements/p-d9e86451.entry.js +1 -0
  98. package/dist/stripe-elements/p-f09c86a0.entry.js +1 -0
  99. package/dist/stripe-elements/p-f64f394d.entry.js +1 -0
  100. package/dist/stripe-elements/p-f6d2425e.entry.js +1 -0
  101. package/dist/stripe-elements/stripe-elements.esm.js +1 -2
  102. package/dist/stripe-elements/svg/.gitignore +4 -0
  103. package/dist/types/components/stripe-card-element/stripe-card-element.d.ts +5 -1
  104. package/dist/types/components/stripe-card-element/stripe-card-element.helpers.d.ts +29 -0
  105. package/dist/types/components/stripe-card-element-modal/stripe-card-element-modal.d.ts +4 -4
  106. package/dist/types/components/stripe-modal/stripe-modal.d.ts +6 -0
  107. package/dist/types/components/stripe-payment-element/stripe-payment-element.d.ts +2 -2
  108. package/dist/types/components/stripe-payment-element/stripe-payment-element.helpers.d.ts +54 -0
  109. package/dist/types/components/stripe-payment-request-button/stripe-payment-request-button.d.ts +8 -0
  110. package/dist/types/components.d.ts +139 -29
  111. package/dist/types/index.d.ts +1 -0
  112. package/dist/types/services/interfaces.d.ts +3 -3
  113. package/dist/types/services/stripe-service.d.ts +2 -2
  114. package/dist/types/stencil-public-runtime.d.ts +110 -5
  115. package/dist/types/utils/test-setup.d.ts +1 -0
  116. package/package.json +50 -30
  117. package/readme.md +386 -133
  118. package/dist/cjs/app-globals-V2Kpy_OQ.js.map +0 -1
  119. package/dist/cjs/error-FFC4kSs5.js.map +0 -1
  120. package/dist/cjs/factory-Hsw0e7-d.js.map +0 -1
  121. package/dist/cjs/index-Ba1pBePA.js.map +0 -1
  122. package/dist/cjs/index-C1haN5iF.js +0 -1907
  123. package/dist/cjs/index-C1haN5iF.js.map +0 -1
  124. package/dist/cjs/index.cjs.js.map +0 -1
  125. package/dist/cjs/ion-icon.entry.cjs.js.map +0 -1
  126. package/dist/cjs/loader.cjs.js.map +0 -1
  127. package/dist/cjs/stripe-address-element.entry.cjs.js.map +0 -1
  128. package/dist/cjs/stripe-card-element-modal.entry.cjs.js.map +0 -1
  129. package/dist/cjs/stripe-card-element.stripe-modal.entry.cjs.js.map +0 -1
  130. package/dist/cjs/stripe-currency-selector.entry.cjs.js.map +0 -1
  131. package/dist/cjs/stripe-elements.cjs.js.map +0 -1
  132. package/dist/cjs/stripe-express-checkout-element.entry.cjs.js.map +0 -1
  133. package/dist/cjs/stripe-link-authentication-element.entry.cjs.js.map +0 -1
  134. package/dist/cjs/stripe-payment-element.entry.cjs.js.map +0 -1
  135. package/dist/cjs/stripe-payment-request-button.entry.cjs.js.map +0 -1
  136. package/dist/collection/components/stripe-address-element/stripe-address-element.js.map +0 -1
  137. package/dist/collection/components/stripe-card-element/stripe-card-element.js.map +0 -1
  138. package/dist/collection/components/stripe-card-element-modal/stripe-card-element-modal.js.map +0 -1
  139. package/dist/collection/components/stripe-currency-selector/stripe-currency-selector.js.map +0 -1
  140. package/dist/collection/components/stripe-express-checkout-element/stripe-express-checkout-element.js.map +0 -1
  141. package/dist/collection/components/stripe-link-authentication-element/stripe-link-authentication-element.js.map +0 -1
  142. package/dist/collection/components/stripe-modal/stripe-modal.js.map +0 -1
  143. package/dist/collection/components/stripe-payment-element/stripe-payment-element.js.map +0 -1
  144. package/dist/collection/components/stripe-payment-request-button/stripe-payment-request-button.js.map +0 -1
  145. package/dist/collection/index.js.map +0 -1
  146. package/dist/collection/interfaces.js.map +0 -1
  147. package/dist/collection/services/address-element-manager.js.map +0 -1
  148. package/dist/collection/services/card-element-manager.js.map +0 -1
  149. package/dist/collection/services/currency-selector-element-manager.js.map +0 -1
  150. package/dist/collection/services/express-checkout-element-manager.js.map +0 -1
  151. package/dist/collection/services/factory.js.map +0 -1
  152. package/dist/collection/services/interfaces.js.map +0 -1
  153. package/dist/collection/services/link-authentication-element-manager.js.map +0 -1
  154. package/dist/collection/services/payment-element-manager.js.map +0 -1
  155. package/dist/collection/services/stripe-service.js.map +0 -1
  156. package/dist/collection/utils/element-finder.js.map +0 -1
  157. package/dist/collection/utils/error.js.map +0 -1
  158. package/dist/collection/utils/i18n.js.map +0 -1
  159. package/dist/collection/utils/platform.js.map +0 -1
  160. package/dist/collection/utils/utils.js.map +0 -1
  161. package/dist/components/error.js.map +0 -1
  162. package/dist/components/factory.js.map +0 -1
  163. package/dist/components/icon.js.map +0 -1
  164. package/dist/components/index.js.map +0 -1
  165. package/dist/components/index2.js.map +0 -1
  166. package/dist/components/ion-icon.js.map +0 -1
  167. package/dist/components/stripe-address-element.js.map +0 -1
  168. package/dist/components/stripe-card-element-modal.js.map +0 -1
  169. package/dist/components/stripe-card-element.js.map +0 -1
  170. package/dist/components/stripe-card-element2.js.map +0 -1
  171. package/dist/components/stripe-currency-selector.js.map +0 -1
  172. package/dist/components/stripe-express-checkout-element.js.map +0 -1
  173. package/dist/components/stripe-link-authentication-element.js.map +0 -1
  174. package/dist/components/stripe-modal.js.map +0 -1
  175. package/dist/components/stripe-modal2.js.map +0 -1
  176. package/dist/components/stripe-payment-element.js.map +0 -1
  177. package/dist/components/stripe-payment-request-button.js.map +0 -1
  178. package/dist/components/stripe-payment-request-button2.js.map +0 -1
  179. package/dist/components/utils.js.map +0 -1
  180. package/dist/esm/app-globals-DQuL1Twl.js.map +0 -1
  181. package/dist/esm/error-XRfh5Wrs.js.map +0 -1
  182. package/dist/esm/factory-Li_TGt9P.js.map +0 -1
  183. package/dist/esm/index-BHDCxQOb.js.map +0 -1
  184. package/dist/esm/index-Dkis4t79.js +0 -1895
  185. package/dist/esm/index-Dkis4t79.js.map +0 -1
  186. package/dist/esm/index.js.map +0 -1
  187. package/dist/esm/ion-icon.entry.js.map +0 -1
  188. package/dist/esm/loader.js.map +0 -1
  189. package/dist/esm/stripe-address-element.entry.js.map +0 -1
  190. package/dist/esm/stripe-card-element-modal.entry.js.map +0 -1
  191. package/dist/esm/stripe-card-element.stripe-modal.entry.js.map +0 -1
  192. package/dist/esm/stripe-currency-selector.entry.js.map +0 -1
  193. package/dist/esm/stripe-elements.js.map +0 -1
  194. package/dist/esm/stripe-express-checkout-element.entry.js.map +0 -1
  195. package/dist/esm/stripe-link-authentication-element.entry.js.map +0 -1
  196. package/dist/esm/stripe-payment-element.entry.js.map +0 -1
  197. package/dist/esm/stripe-payment-request-button.entry.js.map +0 -1
  198. package/dist/stripe-elements/index.esm.js.map +0 -1
  199. package/dist/stripe-elements/ion-icon.entry.esm.js.map +0 -1
  200. package/dist/stripe-elements/loader.esm.js.map +0 -1
  201. package/dist/stripe-elements/p-01d63033.entry.js +0 -2
  202. package/dist/stripe-elements/p-01d63033.entry.js.map +0 -1
  203. package/dist/stripe-elements/p-1b8f9c7f.entry.js +0 -2
  204. package/dist/stripe-elements/p-1b8f9c7f.entry.js.map +0 -1
  205. package/dist/stripe-elements/p-37008853.entry.js +0 -2
  206. package/dist/stripe-elements/p-37008853.entry.js.map +0 -1
  207. package/dist/stripe-elements/p-5d152193.entry.js +0 -2
  208. package/dist/stripe-elements/p-5d152193.entry.js.map +0 -1
  209. package/dist/stripe-elements/p-623f13e6.entry.js +0 -2
  210. package/dist/stripe-elements/p-623f13e6.entry.js.map +0 -1
  211. package/dist/stripe-elements/p-809c9f2f.entry.js +0 -2
  212. package/dist/stripe-elements/p-809c9f2f.entry.js.map +0 -1
  213. package/dist/stripe-elements/p-BHDCxQOb.js +0 -2
  214. package/dist/stripe-elements/p-BHDCxQOb.js.map +0 -1
  215. package/dist/stripe-elements/p-DQuL1Twl.js.map +0 -1
  216. package/dist/stripe-elements/p-Dkis4t79.js +0 -3
  217. package/dist/stripe-elements/p-Dkis4t79.js.map +0 -1
  218. package/dist/stripe-elements/p-WnA32N4v.js +0 -2
  219. package/dist/stripe-elements/p-WnA32N4v.js.map +0 -1
  220. package/dist/stripe-elements/p-XRfh5Wrs.js.map +0 -1
  221. package/dist/stripe-elements/p-ba41e196.entry.js +0 -2
  222. package/dist/stripe-elements/p-ba41e196.entry.js.map +0 -1
  223. package/dist/stripe-elements/p-bb1bc49a.entry.js +0 -2
  224. package/dist/stripe-elements/p-bb1bc49a.entry.js.map +0 -1
  225. package/dist/stripe-elements/p-f21ea941.entry.js +0 -2
  226. package/dist/stripe-elements/p-f21ea941.entry.js.map +0 -1
  227. package/dist/stripe-elements/stripe-address-element.entry.esm.js.map +0 -1
  228. package/dist/stripe-elements/stripe-card-element-modal.entry.esm.js.map +0 -1
  229. package/dist/stripe-elements/stripe-card-element.stripe-modal.entry.esm.js.map +0 -1
  230. package/dist/stripe-elements/stripe-currency-selector.entry.esm.js.map +0 -1
  231. package/dist/stripe-elements/stripe-elements.esm.js.map +0 -1
  232. package/dist/stripe-elements/stripe-express-checkout-element.entry.esm.js.map +0 -1
  233. package/dist/stripe-elements/stripe-link-authentication-element.entry.esm.js.map +0 -1
  234. package/dist/stripe-elements/stripe-payment-element.entry.esm.js.map +0 -1
  235. package/dist/stripe-elements/stripe-payment-request-button.entry.esm.js.map +0 -1
@@ -1,11 +1,69 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-C1haN5iF.js');
4
- var factory = require('./factory-Hsw0e7-d.js');
3
+ var index = require('./index-Dkb0SxZc.js');
4
+ var factory = require('./factory-da3xAKkz.js');
5
5
  var error = require('./error-FFC4kSs5.js');
6
- require('./index-Ba1pBePA.js');
6
+ require('./index-CYbA1N_k.js');
7
7
 
8
- const stripeCardElementCss = ":root{--color-label:#565656;--color-placeholder:#acacac;--color-heading-text:#333;--color-text-error:#ef4444;--color-input-border:#e4e4e6;--color-input-border-shadow:rgba(228, 228, 230, 0.6);--color-button-text:rgba(255, 255, 255, 0.95);--color-button-text-disabled:rgba(255, 255, 255, 0.4);--color-primary:#0074d4}.stripe-payment-sheet-wrap{box-sizing:border-box}.stripe-payment-sheet-wrap *:where(:not(iframe,canvas,img,svg,video):not(svg *)){all:unset;display:revert;background:none;border:none;font-family:\"Roboto\", sans-serif;box-sizing:border-box}.stripe-payment-sheet-wrap button{cursor:pointer}.stripe-payment-sheet-wrap{display:block;width:100%;background:#fff;padding:32px 16px}.stripe-payment-sheet-wrap .StripeElement{padding:8px 16px;min-height:64px;display:flex;justify-content:center;align-items:center}.stripe-payment-sheet-wrap .StripeElement>.__PrivateStripeElement{width:100%}.stripe-payment-sheet-wrap .stripe-input-box{background-color:#fff;border-radius:6px;border:1px solid var(--color-input-border);overflow:hidden;filter:drop-shadow(0 0 2px var(--color-input-border-shadow))}.stripe-payment-sheet-wrap .stripe-input-box>*{border-bottom:1px solid var(--color-input-border)}.stripe-payment-sheet-wrap .stripe-input-box>*:last-child{border-bottom:none}.stripe-payment-sheet-wrap .stripe-input-column>*{border-right:1px solid var(--color-input-border)}.stripe-payment-sheet-wrap .stripe-input-column>*:last-child{border-right:none}.stripe-payment-sheet-wrap .stripe-heading{font-size:24px;font-weight:bold;color:var(--color-heading-text);margin-bottom:24px}.stripe-payment-sheet-wrap .stripe-section-title{font-size:14px;font-weight:bold;color:var(--color-label);margin-bottom:8px}.stripe-payment-sheet-wrap .payment-info label{color:var(--color-label)}.stripe-payment-sheet-wrap .stripe-element-errors{margin-top:8px;font-size:14px;color:var(--color-text-error)}.stripe-payment-sheet-wrap button{display:block;color:var(--color-button-text);background-color:var(--color-primary);width:100%;text-align:center;padding:16px 16px;font-size:18px;border-radius:6px;min-height:42px}.stripe-payment-sheet-wrap button:disabled{color:var(--color-button-text-disabled)}";
8
+ /**
9
+ * Build the `InitStripeOptions` object from an optional connected-account id.
10
+ * Returns `undefined` when no account is provided, mirroring the behavior
11
+ * expected by `initStripe` (so the second argument can be omitted entirely).
12
+ * @param stripeAccount Optional connected-account id
13
+ * @returns InitStripeOptions when an account id exists, otherwise undefined
14
+ */
15
+ const buildInitStripeOptionsFromAccount = (stripeAccount) => {
16
+ if (stripeAccount != null && stripeAccount !== '') {
17
+ return { stripeAccount };
18
+ }
19
+ return undefined;
20
+ };
21
+ /**
22
+ * Confirm a Stripe card intent, dispatching to `confirmCardPayment` or
23
+ * `confirmCardSetup` based on the configured intent type.
24
+ * @param stripe The loaded Stripe.js instance
25
+ * @param intentType Whether this is a payment or setup intent
26
+ * @param intentClientSecret The client secret of the intent to confirm
27
+ * @param cardNumberElement The Stripe card number element to confirm with
28
+ * @returns The PaymentIntent or SetupIntent confirmation result
29
+ */
30
+ const confirmCardIntent = (stripe, intentType, intentClientSecret, cardNumberElement) => {
31
+ if (intentType === 'payment') {
32
+ return stripe.confirmCardPayment(intentClientSecret, {
33
+ payment_method: {
34
+ card: cardNumberElement,
35
+ },
36
+ });
37
+ }
38
+ return stripe.confirmCardSetup(intentClientSecret, {
39
+ payment_method: {
40
+ card: cardNumberElement,
41
+ },
42
+ });
43
+ };
44
+ /**
45
+ * Wire up the optional payment-request handlers onto a freshly created
46
+ * `<stripe-payment-request-button>` element. Only handlers that are provided
47
+ * on the option object are attached, preserving the original behavior.
48
+ * @param element The payment-request-button custom element instance
49
+ * @param option The payment request button option (handlers + config)
50
+ * @returns void
51
+ */
52
+ const attachPaymentRequestHandlers = (element, option) => {
53
+ const { paymentRequestPaymentMethodHandler, paymentRequestShippingOptionChangeHandler, paymentRequestShippingAddressChangeHandler } = option;
54
+ element.setPaymentRequestOption(option);
55
+ if (paymentRequestPaymentMethodHandler != null) {
56
+ element.setPaymentMethodEventHandler(paymentRequestPaymentMethodHandler);
57
+ }
58
+ if (paymentRequestShippingOptionChangeHandler != null) {
59
+ element.setPaymentRequestShippingOptionEventHandler(paymentRequestShippingOptionChangeHandler);
60
+ }
61
+ if (paymentRequestShippingAddressChangeHandler != null) {
62
+ element.setPaymentRequestShippingAddressEventHandler(paymentRequestShippingAddressChangeHandler);
63
+ }
64
+ };
65
+
66
+ const stripeCardElementCss = () => `:root{--color-label:#565656;--color-placeholder:#acacac;--color-heading-text:#333;--color-text-error:#ef4444;--color-input-border:#e4e4e6;--color-input-border-shadow:rgba(228, 228, 230, 0.6);--color-button-text:rgba(255, 255, 255, 0.95);--color-button-text-disabled:rgba(255, 255, 255, 0.4);--color-primary:#0074d4}.stripe-payment-sheet-wrap{box-sizing:border-box}.stripe-payment-sheet-wrap *:where(:not(iframe,canvas,img,svg,video):not(svg *)){all:unset;display:revert;background:none;border:none;font-family:"Roboto", sans-serif;box-sizing:border-box}.stripe-payment-sheet-wrap button{cursor:pointer}.stripe-payment-sheet-wrap{display:block;width:100%;background:#fff;padding:32px 16px}.stripe-payment-sheet-wrap .StripeElement{padding:8px 16px;min-height:64px;display:flex;justify-content:center;align-items:center}.stripe-payment-sheet-wrap .StripeElement>.__PrivateStripeElement{width:100%}.stripe-payment-sheet-wrap .stripe-input-box{background-color:#fff;border-radius:6px;border:1px solid var(--color-input-border);overflow:hidden;filter:drop-shadow(0 0 2px var(--color-input-border-shadow))}.stripe-payment-sheet-wrap .stripe-input-box>*{border-bottom:1px solid var(--color-input-border)}.stripe-payment-sheet-wrap .stripe-input-box>*:last-child{border-bottom:none}.stripe-payment-sheet-wrap .stripe-input-column>*{border-right:1px solid var(--color-input-border)}.stripe-payment-sheet-wrap .stripe-input-column>*:last-child{border-right:none}.stripe-payment-sheet-wrap .stripe-heading{font-size:24px;font-weight:bold;color:var(--color-heading-text);margin-bottom:24px}.stripe-payment-sheet-wrap .stripe-section-title{font-size:14px;font-weight:bold;color:var(--color-label);margin-bottom:8px}.stripe-payment-sheet-wrap .payment-info label{color:var(--color-label)}.stripe-payment-sheet-wrap .stripe-element-errors{margin-top:8px;font-size:14px;color:var(--color-text-error)}.stripe-payment-sheet-wrap button{display:block;color:var(--color-button-text);background-color:var(--color-primary);width:100%;text-align:center;padding:16px 16px;font-size:18px;border-radius:6px;min-height:42px}.stripe-payment-sheet-wrap button:disabled{color:var(--color-button-text-disabled)}`;
9
67
 
10
68
  const StripeCardElement = class {
11
69
  /**
@@ -18,7 +76,7 @@ const StripeCardElement = class {
18
76
  * customElements
19
77
  * .whenDefined('stripe-card-element')
20
78
  * .then(() => {
21
- * tripeElement.initStripe('pk_test_XXXXXXXXX')
79
+ * stripeElement.initStripe('pk_test_XXXXXXXXX')
22
80
  * })
23
81
  * ```
24
82
  */
@@ -68,6 +126,7 @@ const StripeCardElement = class {
68
126
  * stripeElement.updateProgress('success')
69
127
  * });
70
128
  * })
129
+ * ```
71
130
  */
72
131
  async updateProgress(progress) {
73
132
  this.progress = progress;
@@ -94,21 +153,21 @@ const StripeCardElement = class {
94
153
  * }
95
154
  * });
96
155
  * })
156
+ * ```
97
157
  */
98
158
  async setErrorMessage(errorMessage) {
99
159
  this.cardElementManager.setError(errorMessage);
100
160
  return this;
101
161
  }
102
162
  updatePublishableKey(publishableKey) {
103
- const options = {};
104
- if (this.stripeAccount) {
105
- options.stripeAccount = this.stripeAccount;
163
+ if (publishableKey == null || publishableKey === '') {
164
+ return;
106
165
  }
107
- this.initStripe(publishableKey, Object.keys(options).length ? options : undefined);
166
+ this.initStripe(publishableKey, buildInitStripeOptionsFromAccount(this.stripeAccount));
108
167
  }
109
168
  updateStripeAccountId(stripeAccount) {
110
169
  const publishableKey = this.stripeService.state.publishableKey || this.publishableKey;
111
- if (!publishableKey) {
170
+ if (publishableKey == null || publishableKey === '') {
112
171
  return;
113
172
  }
114
173
  this.initStripe(publishableKey, {
@@ -128,7 +187,7 @@ const StripeCardElement = class {
128
187
  const event = {
129
188
  stripe: this.stripeService.getStripe(),
130
189
  };
131
- if (this.stripeDidLoaded) {
190
+ if (this.stripeDidLoaded != null) {
132
191
  this.stripeDidLoaded(event);
133
192
  }
134
193
  this.stripeLoaded.emit(event);
@@ -136,7 +195,7 @@ const StripeCardElement = class {
136
195
  async formSubmitEventHandler() {
137
196
  const cardElements = this.cardElementManager.getElements();
138
197
  const stripe = this.stripeService.getStripe();
139
- if (!cardElements) {
198
+ if (cardElements == null) {
140
199
  console.error('Card elements not initialized');
141
200
  return;
142
201
  }
@@ -151,15 +210,14 @@ const StripeCardElement = class {
151
210
  this.defaultFormSubmitResult.emit(result);
152
211
  }
153
212
  componentWillRender() {
154
- if (!this.stripeService.state.publishableKey) {
213
+ const { publishableKey } = this.stripeService.state;
214
+ if (publishableKey == null || publishableKey === '') {
155
215
  return;
156
216
  }
157
217
  if (['success', 'loading'].includes(this.stripeService.state.loadStripeStatus)) {
158
218
  return;
159
219
  }
160
- this.initStripe(this.stripeService.state.publishableKey, {
161
- stripeAccount: this.stripeService.state.stripeAccount,
162
- });
220
+ this.initStripe(publishableKey, buildInitStripeOptionsFromAccount(this.stripeService.state.stripeAccount));
163
221
  }
164
222
  /**
165
223
  * Default form submit action (just call a confirmCardPayment).
@@ -170,22 +228,8 @@ const StripeCardElement = class {
170
228
  async defaultFormSubmitAction(event, { stripe, cardNumberElement, intentClientSecret }) {
171
229
  event.preventDefault();
172
230
  try {
173
- const { intentType } = this;
174
- const result = await (() => {
175
- if (intentType === 'payment') {
176
- return stripe.confirmCardPayment(intentClientSecret, {
177
- payment_method: {
178
- card: cardNumberElement,
179
- },
180
- });
181
- }
182
- return stripe.confirmCardSetup(intentClientSecret, {
183
- payment_method: {
184
- card: cardNumberElement,
185
- },
186
- });
187
- })();
188
- if (result.error) {
231
+ const result = await confirmCardIntent(stripe, this.intentType, intentClientSecret, cardNumberElement);
232
+ if (result.error != null) {
189
233
  throw new error.StripeAPIError(result.error);
190
234
  }
191
235
  this.defaultFormSubmitResultHandler(result);
@@ -198,9 +242,9 @@ const StripeCardElement = class {
198
242
  }
199
243
  constructor(hostRef) {
200
244
  index.registerInstance(this, hostRef);
201
- this.stripeLoaded = index.createEvent(this, "stripeLoaded");
202
- this.formSubmit = index.createEvent(this, "formSubmit");
203
- this.defaultFormSubmitResult = index.createEvent(this, "defaultFormSubmitResult");
245
+ this.stripeLoaded = index.createEvent(this, "stripeLoaded", 7);
246
+ this.formSubmit = index.createEvent(this, "formSubmit", 7);
247
+ this.defaultFormSubmitResult = index.createEvent(this, "defaultFormSubmitResult", 7);
204
248
  // Track if payment request button has been created to prevent duplicates
205
249
  this.paymentRequestButtonCreated = false;
206
250
  /**
@@ -257,10 +301,8 @@ const StripeCardElement = class {
257
301
  // Dependency Injection via factory
258
302
  this.stripeService = factory.serviceFactory.createStripeService();
259
303
  this.cardElementManager = factory.serviceFactory.createCardElementManager(this.stripeService);
260
- if (this.publishableKey) {
261
- this.initStripe(this.publishableKey, {
262
- stripeAccount: this.stripeAccount,
263
- });
304
+ if (this.publishableKey != null && this.publishableKey !== '') {
305
+ this.initStripe(this.publishableKey, buildInitStripeOptionsFromAccount(this.stripeAccount));
264
306
  }
265
307
  }
266
308
  /**
@@ -271,7 +313,7 @@ const StripeCardElement = class {
271
313
  await this.cardElementManager.initialize(this.el);
272
314
  // Add form submit listener scoped to this component instance
273
315
  const formElement = this.el.querySelector('#stripe-card-element');
274
- if (!formElement) {
316
+ if (formElement == null) {
275
317
  console.error('Form element #stripe-card-element not found');
276
318
  return;
277
319
  }
@@ -279,7 +321,7 @@ const StripeCardElement = class {
279
321
  const cardElements = this.cardElementManager.getElements();
280
322
  const stripe = this.stripeService.getStripe();
281
323
  const { intentClientSecret } = this;
282
- if (!cardElements || !stripe) {
324
+ if (cardElements == null || stripe == null) {
283
325
  console.error('Stripe not properly initialized');
284
326
  return;
285
327
  }
@@ -293,17 +335,17 @@ const StripeCardElement = class {
293
335
  };
294
336
  this.progress = 'loading';
295
337
  try {
296
- if (this.handleSubmit) {
338
+ if (this.handleSubmit != null) {
297
339
  await this.handleSubmit(e, submitEventProps);
298
340
  }
299
- else if (this.shouldUseDefaultFormSubmitAction === true && intentClientSecret) {
341
+ else if (this.shouldUseDefaultFormSubmitAction === true && intentClientSecret != null && intentClientSecret !== '') {
300
342
  await this.defaultFormSubmitAction(e, submitEventProps);
301
343
  }
302
344
  else {
303
345
  e.preventDefault();
304
346
  }
305
347
  await this.formSubmitEventHandler();
306
- if (this.handleSubmit || this.shouldUseDefaultFormSubmitAction === true) {
348
+ if (this.handleSubmit != null || this.shouldUseDefaultFormSubmitAction === true) {
307
349
  this.progress = 'success';
308
350
  }
309
351
  }
@@ -336,36 +378,26 @@ const StripeCardElement = class {
336
378
  if (this.paymentRequestButtonCreated) {
337
379
  return null;
338
380
  }
339
- if (!showPaymentRequestButton || !paymentRequestOption) {
381
+ if (!showPaymentRequestButton || paymentRequestOption == null) {
340
382
  return null;
341
383
  }
342
- if (!document) {
384
+ if (document == null) {
343
385
  return null;
344
386
  }
345
387
  const targetElement = this.el.querySelector('#stripe-payment-request-button');
346
- if (!targetElement) {
388
+ if (targetElement == null) {
347
389
  console.error('Target element #stripe-payment-request-button not found');
348
390
  return null;
349
391
  }
350
392
  // Check if button already exists in DOM to prevent duplicates
351
- if (targetElement.querySelector('stripe-payment-request-button')) {
393
+ if (targetElement.querySelector('stripe-payment-request-button') != null) {
352
394
  this.paymentRequestButtonCreated = true;
353
395
  return null;
354
396
  }
355
397
  const stripePaymentRequestElement = document.createElement('stripe-payment-request-button');
356
398
  targetElement.appendChild(stripePaymentRequestElement);
357
- const { paymentRequestPaymentMethodHandler, paymentRequestShippingOptionChangeHandler, paymentRequestShippingAddressChangeHandler } = paymentRequestOption;
358
399
  customElements.whenDefined('stripe-payment-request-button').then(() => {
359
- stripePaymentRequestElement.setPaymentRequestOption(paymentRequestOption);
360
- if (paymentRequestPaymentMethodHandler) {
361
- stripePaymentRequestElement.setPaymentMethodEventHandler(paymentRequestPaymentMethodHandler);
362
- }
363
- if (paymentRequestShippingOptionChangeHandler) {
364
- stripePaymentRequestElement.setPaymentRequestShippingOptionEventHandler(paymentRequestShippingOptionChangeHandler);
365
- }
366
- if (paymentRequestShippingAddressChangeHandler) {
367
- stripePaymentRequestElement.setPaymentRequestShippingAddressEventHandler(paymentRequestShippingAddressChangeHandler);
368
- }
400
+ attachPaymentRequestHandlers(stripePaymentRequestElement, paymentRequestOption);
369
401
  return stripePaymentRequestElement.initStripe(this.publishableKey);
370
402
  });
371
403
  // Mark as created
@@ -378,24 +410,32 @@ const StripeCardElement = class {
378
410
  return index.h("p", null, factory.i18n.t('Failed to load Stripe'));
379
411
  }
380
412
  const disabled = this.progress === 'loading';
381
- return (index.h("div", { class: "stripe-payment-sheet-wrap" }, index.h("form", { id: "stripe-card-element" }, index.h("div", { class: "stripe-heading" }, factory.i18n.t(this.sheetTitle)), index.h("div", { id: "stripe-payment-request-button" }), index.h("div", null, index.h("div", { class: "stripe-section-title" }, factory.i18n.t('Card information'))), index.h("div", { class: "payment-info card visible" }, index.h("fieldset", { class: "stripe-input-box" }, index.h("div", null, index.h("label", null, this.showLabel ? index.h("lenged", null, factory.i18n.t('Card Number')) : null, index.h("div", { id: "card-number" }))), index.h("div", { class: "stripe-input-column", style: { display: 'flex' } }, index.h("label", { style: { width: '50%' } }, this.showLabel ? index.h("lenged", null, factory.i18n.t('MM / YY')) : null, index.h("div", { id: "card-expiry" })), index.h("label", { style: { width: '50%' } }, this.showLabel ? index.h("lenged", null, factory.i18n.t('CVC')) : null, index.h("div", { id: "card-cvc" }))))), index.h("div", { id: "card-errors", class: "stripe-element-errors" }, errorMessage), this.zip ? (index.h("div", { style: { marginTop: '1.5rem' } }, index.h("div", { class: "stripe-section-title" }, factory.i18n.t('Country or region')))) : null, this.zip ? (index.h("div", { class: "payment-info card visible" }, index.h("fieldset", { class: "stripe-input-box" }, index.h("div", null, index.h("label", null, this.showLabel ? index.h("lenged", null, factory.i18n.t('Postal Code')) : null, index.h("input", { id: "zip", name: "zip", type: "text", inputmode: "numeric", class: "StripeElement", style: { width: '100%' }, placeholder: factory.i18n.t('Postal Code'), value: this.zipCode, onInput: e => {
413
+ return (
414
+ // NOTE: `stripe-payment-sheet-wrap` is a legacy class name (leftover from a former
415
+ // component name). External consumers may target it in their own CSS, so it is a
416
+ // public DOM contract that MUST be kept for backward compatibility. Do not remove it.
417
+ index.h("div", { class: "stripe-payment-sheet-wrap" }, index.h("form", { id: "stripe-card-element" }, index.h("div", { class: "stripe-heading" }, factory.i18n.t(this.sheetTitle)), index.h("div", { id: "stripe-payment-request-button" }), index.h("div", null, index.h("div", { class: "stripe-section-title" }, factory.i18n.t('Card information'))), index.h("div", { class: "payment-info card visible" }, index.h("fieldset", { class: "stripe-input-box" }, index.h("div", null, index.h("label", null, this.showLabel ? index.h("lenged", null, factory.i18n.t('Card Number')) : null, index.h("div", { id: "card-number" }))), index.h("div", { class: "stripe-input-column", style: { display: 'flex' } }, index.h("label", { style: { width: '50%' } }, this.showLabel ? index.h("lenged", null, factory.i18n.t('MM / YY')) : null, index.h("div", { id: "card-expiry" })), index.h("label", { style: { width: '50%' } }, this.showLabel ? index.h("lenged", null, factory.i18n.t('CVC')) : null, index.h("div", { id: "card-cvc" }))))), index.h("div", { id: "card-errors", class: "stripe-element-errors" }, errorMessage), this.zip ? (index.h("div", { style: { marginTop: '1.5rem' } }, index.h("div", { class: "stripe-section-title" }, factory.i18n.t('Country or region')))) : null, this.zip ? (index.h("div", { class: "payment-info card visible" }, index.h("fieldset", { class: "stripe-input-box" }, index.h("div", null, index.h("label", null, this.showLabel ? index.h("lenged", null, factory.i18n.t('Postal Code')) : null, index.h("input", { id: "zip", name: "zip", type: "text", inputmode: "numeric", class: "StripeElement", style: { width: '100%' }, placeholder: factory.i18n.t('Postal Code'), value: this.zipCode, onInput: e => {
382
418
  this.zipCode = e.target.value;
383
419
  } })))))) : null, index.h("div", { style: { marginTop: '32px' } }, index.h("button", { type: "submit", disabled: disabled }, this.progress === 'loading' ? factory.i18n.t('Loading') : factory.i18n.t(this.buttonLabel))))));
384
420
  }
385
421
  get el() { return index.getElement(this); }
386
422
  static get watchers() { return {
387
- "publishableKey": ["updatePublishableKey"],
388
- "stripeAccount": ["updateStripeAccountId"]
423
+ "publishableKey": [{
424
+ "updatePublishableKey": 0
425
+ }],
426
+ "stripeAccount": [{
427
+ "updateStripeAccountId": 0
428
+ }]
389
429
  }; }
390
430
  };
391
- StripeCardElement.style = stripeCardElementCss;
431
+ StripeCardElement.style = stripeCardElementCss();
392
432
 
393
- const stripeModalCss = ":root{--color-label:#565656;--color-placeholder:#acacac;--color-heading-text:#333;--color-text-error:#ef4444;--color-input-border:#e4e4e6;--color-input-border-shadow:rgba(228, 228, 230, 0.6);--color-button-text:rgba(255, 255, 255, 0.95);--color-button-text-disabled:rgba(255, 255, 255, 0.4);--color-primary:#0074d4}:host{box-sizing:border-box}:host *:where(:not(iframe,canvas,img,svg,video):not(svg *)){all:unset;display:revert;background:none;border:none;font-family:\"Roboto\", sans-serif;box-sizing:border-box}:host button{cursor:pointer}:host{display:block}.modal-row{display:none}.modal-row.open{position:fixed;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:1ch;background:rgba(0, 0, 0, 0.3)}.modal-child{padding:1.5rem;background-color:#fff;width:100%}.modal-close-button-wrap{padding-left:8px}.modal-close-button-wrap .modal-close-button{width:32px;display:block;fill:var(--color-label);cursor:pointer}";
433
+ const stripeModalCss = () => `:root{--color-label:#565656;--color-placeholder:#acacac;--color-heading-text:#333;--color-text-error:#ef4444;--color-input-border:#e4e4e6;--color-input-border-shadow:rgba(228, 228, 230, 0.6);--color-button-text:rgba(255, 255, 255, 0.95);--color-button-text-disabled:rgba(255, 255, 255, 0.4);--color-primary:#0074d4}:host{box-sizing:border-box}:host *:where(:not(iframe,canvas,img,svg,video):not(svg *)){all:unset;display:revert;background:none;border:none;font-family:"Roboto", sans-serif;box-sizing:border-box}:host button{cursor:pointer}:host{display:block}.modal-row{opacity:0;pointer-events:none;will-change:transform}.modal-row.open{opacity:1;pointer-events:auto;position:fixed;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:1ch;background:rgba(0, 0, 0, 0.3)}.modal-row .modal-child{transform:translateY(100%);transition:transform 420ms ease;position:relative}.modal-row .modal-child .modal-loading{display:none;position:absolute;top:160px;left:50%;transform:translateX(-50%);width:24px;height:24px}.modal-row .modal-child.loading .modal-loading{display:flex;justify-content:center;align-items:center}.modal-row .modal-child.loading .modal-loading svg{width:24px;height:24px}.modal-row .modal-child.loading .modal-content{visibility:hidden}.modal-row.open .modal-child{transform:translateY(0%)}.modal-child{padding:16px 8px 24px;background-color:#fff;width:100%}.modal-close-button-wrap{padding-left:8px}.modal-close-button-wrap .modal-close-button{width:32px;display:block;fill:var(--color-label);cursor:pointer}`;
394
434
 
395
435
  const StripeModal = class {
396
436
  constructor(hostRef) {
397
437
  index.registerInstance(this, hostRef);
398
- this.close = index.createEvent(this, "close");
438
+ this.close = index.createEvent(this, "close", 7);
399
439
  /**
400
440
  * If true, the modal display close button
401
441
  */
@@ -405,27 +445,31 @@ const StripeModal = class {
405
445
  * If true, the modal will open
406
446
  */
407
447
  this.open = false;
448
+ /**
449
+ * Effect `this.open`. This is for animation.
450
+ * Ionic Ref: https://github.com/ionic-team/ionic-framework/blob/main/core/src/components/accordion/accordion.tsx#L83
451
+ */
452
+ this.renderedOpen = false;
408
453
  }
409
454
  /**
410
455
  * Toggle modal state
411
456
  */
412
457
  async toggleModal() {
413
- this.open = !this.open;
414
- if (this.open === false) {
415
- this.close.emit();
416
- }
458
+ this.open ? await this.closeModal() : await this.openModal();
417
459
  }
418
460
  /**
419
461
  * Open the modal
420
462
  */
421
463
  async openModal() {
422
464
  this.open = true;
465
+ this.openModalAnimation();
423
466
  }
424
467
  /**
425
468
  * Close the modal
426
469
  */
427
470
  async closeModal() {
428
471
  this.open = false;
472
+ this.renderedOpen = false;
429
473
  this.close.emit();
430
474
  }
431
475
  componentDidLoad() {
@@ -433,15 +477,33 @@ const StripeModal = class {
433
477
  if (platformName) {
434
478
  this.el.classList.add(platformName);
435
479
  }
480
+ if (this.open) {
481
+ this.openModalAnimation();
482
+ }
483
+ }
484
+ openModalAnimation() {
485
+ if (!this.el.shadowRoot) {
486
+ this.renderedOpen = true;
487
+ return;
488
+ }
489
+ const modalChild = this.el.shadowRoot.querySelector('.modal-child');
490
+ modalChild.classList.add('loading');
491
+ modalChild.style.willChange = 'transform';
492
+ modalChild.addEventListener('transitionend', () => {
493
+ modalChild.style.willChange = 'auto';
494
+ modalChild.classList.remove('loading');
495
+ }, { once: true });
496
+ requestAnimationFrame(() => {
497
+ this.renderedOpen = true;
498
+ });
436
499
  }
437
500
  render() {
438
- const { open, showCloseButton } = this;
439
- return (index.h(index.Host, { key: 'dfa78b7d698fdd6acc64744ab439174e848e7a85' }, index.h("div", { key: '74059148e192ea487da5031c1c91a22fe145f25e', class: `modal-row${open ? ' open' : ''}`, onClick: () => this.closeModal() }, index.h("div", { key: '269150f5de77e1a0bedc036bec089246c61082c9', class: "modal-child", onClick: e => e.stopPropagation() }, showCloseButton ? (index.h("div", { class: "modal-close-button-wrap" }, index.h("ion-icon", { name: "close", size: "large", class: "modal-close-button", onClick: () => this.closeModal() }))) : null, index.h("slot", { key: 'cf4545695cab28ddd5d72122a8f550d046c8c710' })))));
501
+ const { renderedOpen, showCloseButton } = this;
502
+ return (index.h(index.Host, { key: 'dee14229db3c17744ae5013e5f9aab813a77880b' }, index.h("div", { key: 'c82f4f18286a3d341932bacf09973da80ee2acdd', class: `modal-row${renderedOpen ? ' open' : ''}`, onClick: () => this.closeModal() }, index.h("div", { key: '20b5dc2db1509486e74ff2f6049f5c27de4d4793', class: "modal-child", onClick: e => e.stopPropagation() }, showCloseButton ? (index.h("div", { class: "modal-close-button-wrap" }, index.h("ion-icon", { name: "close", size: "large", class: "modal-close-button", onClick: () => this.closeModal() }))) : null, index.h("div", { key: '863c6285045ad9dcbfeb286ee8ffa8aa1581f90e', class: "modal-loading" }, index.h("svg", { key: 'ba5d9e80236600f4b64a7fa735d49241eb1c3f29', version: "1.1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 2400 2400" }, index.h("g", { key: '290f7a2e79dc54f36603fa4a6b7d3922e4d1f432', "stroke-width": "200", "stroke-linecap": "round", stroke: "currentColor", fill: "none", id: "spinner" }, index.h("line", { key: '92cafdfad5a2631046bdd5f1fb6431b623808961', x1: "1200", y1: "600", x2: "1200", y2: "100" }), index.h("line", { key: '8b6e7260dcc41f969c7bac0fec073928e8e146a7', opacity: "0.5", x1: "1200", y1: "2300", x2: "1200", y2: "1800" }), index.h("line", { key: 'a5eb02131aa60cd6126a2be5f874e8f3bf3b6d5f', opacity: "0.917", x1: "900", y1: "680.4", x2: "650", y2: "247.4" }), index.h("line", { key: '1052903918a67fc53c0df06af43ad564fc9180f7', opacity: "0.417", x1: "1750", y1: "2152.6", x2: "1500", y2: "1719.6" }), index.h("line", { key: 'ac37ac0104a2738375b8f71481b826ae63730dce', opacity: "0.833", x1: "680.4", y1: "900", x2: "247.4", y2: "650" }), index.h("line", { key: '0623f6448f636a6f5f65cb68387ab81381a56acf', opacity: "0.333", x1: "2152.6", y1: "1750", x2: "1719.6", y2: "1500" }), index.h("line", { key: 'f3dbc37979ad51676728ac79eccab6d7be4d9192', opacity: "0.75", x1: "600", y1: "1200", x2: "100", y2: "1200" }), index.h("line", { key: 'c5d92ff42dbe24d6c2136b24cdf2d57835f11b76', opacity: "0.25", x1: "2300", y1: "1200", x2: "1800", y2: "1200" }), index.h("line", { key: '3339f4fefcc7222050da34aa7b8b60c9ac511aea', opacity: "0.667", x1: "680.4", y1: "1500", x2: "247.4", y2: "1750" }), index.h("line", { key: '7ddc8d68d7f7deb0fe377b508180bc0b1123bf7f', opacity: "0.167", x1: "2152.6", y1: "650", x2: "1719.6", y2: "900" }), index.h("line", { key: '8825e19d81b7ade6d1ee327ac7b8bc24607a7c47', opacity: "0.583", x1: "900", y1: "1719.6", x2: "650", y2: "2152.6" }), index.h("line", { key: '9562d8c1dcc59a4884cff618edc35e951b19794c', opacity: "0.083", x1: "1750", y1: "247.4", x2: "1500", y2: "680.4" }), index.h("animateTransform", { key: '648f2a04edef2c2908782aa2296e4dba2b27d7b1', attributeName: "transform", attributeType: "XML", type: "rotate", keyTimes: "0;0.08333;0.16667;0.25;0.33333;0.41667;0.5;0.58333;0.66667;0.75;0.83333;0.91667", values: "0 1199 1199;30 1199 1199;60 1199 1199;90 1199 1199;120 1199 1199;150 1199 1199;180 1199 1199;210 1199 1199;240 1199 1199;270 1199 1199;300 1199 1199;330 1199 1199", dur: "0.83333s", begin: "0s", repeatCount: "indefinite", calcMode: "discrete" })))), index.h("div", { key: 'a86fb232eb5df0737c870e0e788c0c1e230b434e', class: "modal-content" }, index.h("slot", { key: 'b5ee41fc9dd113c3e2716f01350641fc2adebd7b' }))))));
440
503
  }
441
504
  get el() { return index.getElement(this); }
442
505
  };
443
- StripeModal.style = stripeModalCss;
506
+ StripeModal.style = stripeModalCss();
444
507
 
445
508
  exports.stripe_card_element = StripeCardElement;
446
509
  exports.stripe_modal = StripeModal;
447
- //# sourceMappingURL=stripe-card-element.stripe-modal.entry.cjs.js.map
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-C1haN5iF.js');
4
- var factory = require('./factory-Hsw0e7-d.js');
5
- require('./index-Ba1pBePA.js');
3
+ var index = require('./index-Dkb0SxZc.js');
4
+ var factory = require('./factory-da3xAKkz.js');
5
+ require('./index-CYbA1N_k.js');
6
6
 
7
- const stripeCurrencySelectorCss = ":root{--color-label:#565656;--color-placeholder:#acacac;--color-heading-text:#333;--color-text-error:#ef4444;--color-input-border:#e4e4e6;--color-input-border-shadow:rgba(228, 228, 230, 0.6);--color-button-text:rgba(255, 255, 255, 0.95);--color-button-text-disabled:rgba(255, 255, 255, 0.4);--color-primary:#0074d4}:host{box-sizing:border-box}:host *:where(:not(iframe,canvas,img,svg,video):not(svg *)){all:unset;display:revert;background:none;border:none;font-family:\"Roboto\", sans-serif;box-sizing:border-box}:host button{cursor:pointer}:host{display:block;width:100%}.stripe-currency-selector-wrap{width:100%;padding:0;margin:0}.stripe-currency-selector-wrap #currency-selector{width:100%;min-height:40px}.stripe-currency-selector-wrap #currency-selector-errors{margin-top:8px}";
7
+ const stripeCurrencySelectorCss = () => `:root{--color-label:#565656;--color-placeholder:#acacac;--color-heading-text:#333;--color-text-error:#ef4444;--color-input-border:#e4e4e6;--color-input-border-shadow:rgba(228, 228, 230, 0.6);--color-button-text:rgba(255, 255, 255, 0.95);--color-button-text-disabled:rgba(255, 255, 255, 0.4);--color-primary:#0074d4}:host{box-sizing:border-box}:host *:where(:not(iframe,canvas,img,svg,video):not(svg *)){all:unset;display:revert;background:none;border:none;font-family:"Roboto", sans-serif;box-sizing:border-box}:host button{cursor:pointer}:host{display:block;width:100%}.stripe-currency-selector-wrap{width:100%;padding:0;margin:0}.stripe-currency-selector-wrap #currency-selector{width:100%;min-height:40px}.stripe-currency-selector-wrap #currency-selector-errors{margin-top:8px}`;
8
8
 
9
9
  const StripeCurrencySelector = class {
10
10
  updatePublishableKey(publishableKey) {
@@ -119,8 +119,8 @@ const StripeCurrencySelector = class {
119
119
  }
120
120
  constructor(hostRef) {
121
121
  index.registerInstance(this, hostRef);
122
- this.stripeLoaded = index.createEvent(this, "stripeLoaded");
123
- this.currencyChange = index.createEvent(this, "currencyChange");
122
+ this.stripeLoaded = index.createEvent(this, "stripeLoaded", 7);
123
+ this.currencyChange = index.createEvent(this, "currencyChange", 7);
124
124
  /**
125
125
  * Overwrite the application name that registered
126
126
  * For wrapper library (like Capacitor)
@@ -176,11 +176,14 @@ const StripeCurrencySelector = class {
176
176
  }
177
177
  get el() { return index.getElement(this); }
178
178
  static get watchers() { return {
179
- "publishableKey": ["updatePublishableKey"],
180
- "stripeAccount": ["updateStripeAccountId"]
179
+ "publishableKey": [{
180
+ "updatePublishableKey": 0
181
+ }],
182
+ "stripeAccount": [{
183
+ "updateStripeAccountId": 0
184
+ }]
181
185
  }; }
182
186
  };
183
- StripeCurrencySelector.style = stripeCurrencySelectorCss;
187
+ StripeCurrencySelector.style = stripeCurrencySelectorCss();
184
188
 
185
189
  exports.stripe_currency_selector = StripeCurrencySelector;
186
- //# sourceMappingURL=stripe-currency-selector.entry.cjs.js.map
@@ -1,26 +1,52 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-C1haN5iF.js');
3
+ var index = require('./index-Dkb0SxZc.js');
4
4
  var appGlobals = require('./app-globals-V2Kpy_OQ.js');
5
5
 
6
6
  var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
7
7
  /*
8
- Stencil Client Patch Browser v4.38.3 | MIT Licensed | https://stenciljs.com
8
+ Stencil Client Patch Browser v4.43.5 | MIT Licensed | https://stenciljs.com
9
9
  */
10
10
 
11
11
  var patchBrowser = () => {
12
+ if (index.BUILD.isDev && !index.BUILD.isTesting) {
13
+ index.consoleDevInfo("Running in development mode.");
14
+ }
15
+ if (index.BUILD.cloneNodeFix) {
16
+ patchCloneNodeFix(index.H.prototype);
17
+ }
18
+ const scriptElm = index.BUILD.scriptDataOpts ? index.win.document && Array.from(index.win.document.querySelectorAll("script")).find(
19
+ (s) => new RegExp(`/${index.NAMESPACE}(\\.esm)?\\.js($|\\?|#)`).test(s.src) || s.getAttribute("data-stencil-namespace") === index.NAMESPACE
20
+ ) : null;
12
21
  const importMeta = (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('stripe-elements.cjs.js', document.baseURI).href));
13
- const opts = {};
22
+ const opts = index.BUILD.scriptDataOpts ? (scriptElm || {})["data-opts"] || {} : {};
14
23
  if (importMeta !== "") {
15
24
  opts.resourcesUrl = new URL(".", importMeta).href;
16
25
  }
17
26
  return index.promiseResolve(opts);
18
27
  };
28
+ var patchCloneNodeFix = (HTMLElementPrototype) => {
29
+ const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;
30
+ HTMLElementPrototype.cloneNode = function(deep) {
31
+ if (this.nodeName === "TEMPLATE") {
32
+ return nativeCloneNodeFn.call(this, deep);
33
+ }
34
+ const clonedNode = nativeCloneNodeFn.call(this, false);
35
+ const srcChildNodes = this.childNodes;
36
+ if (deep) {
37
+ for (let i = 0; i < srcChildNodes.length; i++) {
38
+ if (srcChildNodes[i].nodeType !== 2) {
39
+ clonedNode.appendChild(srcChildNodes[i].cloneNode(true));
40
+ }
41
+ }
42
+ }
43
+ return clonedNode;
44
+ };
45
+ };
19
46
 
20
47
  patchBrowser().then(async (options) => {
21
48
  await appGlobals.globalScripts();
22
- return index.bootstrapLazy([["stripe-card-element-modal.cjs",[[256,"stripe-card-element-modal",{"publishableKey":[1,"publishable-key"],"stripeAccount":[1,"stripe-account"],"applicationName":[1,"application-name"],"showLabel":[4,"show-label"],"sheetTitle":[1,"sheet-title"],"buttonLabel":[1,"button-label"],"intentClientSecret":[1,"intent-client-secret"],"shouldUseDefaultFormSubmitAction":[4,"should-use-default-form-submit-action"],"intentType":[1,"intent-type"],"handleSubmit":[1040],"stripeDidLoaded":[1040],"showCloseButton":[4,"show-close-button"],"zip":[4],"open":[4],"getStripeCardElementElement":[64],"present":[64],"updateProgress":[64],"destroy":[64],"setPaymentRequestButton":[64]}]]],["stripe-address-element.cjs",[[256,"stripe-address-element",{"mode":[1],"sheetTitle":[1,"sheet-title"],"buttonLabel":[1,"button-label"],"publishableKey":[1,"publishable-key"],"stripeAccount":[1,"stripe-account"],"applicationName":[1,"application-name"],"showLabel":[4,"show-label"],"defaultCountry":[1,"default-country"],"allowedCountries":[16],"handleSubmit":[1040],"stripeDidLoaded":[1040],"progress":[32],"initStripe":[64],"updateProgress":[64],"setErrorMessage":[64],"getValue":[64]},null,{"publishableKey":["updatePublishableKey"],"stripeAccount":["updateStripeAccountId"]}]]],["stripe-currency-selector.cjs",[[256,"stripe-currency-selector",{"publishableKey":[1,"publishable-key"],"stripeAccount":[1,"stripe-account"],"applicationName":[1,"application-name"],"clientSecret":[1,"client-secret"],"handleCurrencyChange":[1040],"stripeDidLoaded":[1040],"initStripe":[64],"setErrorMessage":[64],"getSelectedCurrency":[64]},null,{"publishableKey":["updatePublishableKey"],"stripeAccount":["updateStripeAccountId"]}]]],["stripe-express-checkout-element.cjs",[[256,"stripe-express-checkout-element",{"intentType":[1,"intent-type"],"publishableKey":[1,"publishable-key"],"stripeAccount":[1,"stripe-account"],"applicationName":[1,"application-name"],"clientSecret":[1,"client-secret"],"amount":[2],"currency":[1],"buttonHeight":[1,"button-height"],"shouldUseDefaultConfirmAction":[4,"should-use-default-confirm-action"],"stripeDidLoaded":[1040],"progress":[32],"updateProgress":[64],"setErrorMessage":[64],"initStripe":[64],"updateElementOptions":[64]},null,{"publishableKey":["updatePublishableKey"],"stripeAccount":["updateStripeAccountId"]}]]],["stripe-link-authentication-element.cjs",[[256,"stripe-link-authentication-element",{"publishableKey":[1,"publishable-key"],"stripeAccount":[1,"stripe-account"],"applicationName":[1,"application-name"],"defaultEmail":[1,"default-email"],"handleChange":[1040],"stripeDidLoaded":[1040],"progress":[32],"initStripe":[64],"updateProgress":[64],"setErrorMessage":[64],"getEmail":[64]},null,{"publishableKey":["updatePublishableKey"],"stripeAccount":["updateStripeAccountId"]}]]],["stripe-payment-element.cjs",[[256,"stripe-payment-element",{"intentType":[1,"intent-type"],"sheetTitle":[1,"sheet-title"],"buttonLabel":[1,"button-label"],"publishableKey":[1,"publishable-key"],"stripeAccount":[1,"stripe-account"],"applicationName":[1,"application-name"],"intentClientSecret":[1,"intent-client-secret"],"checkoutSessionClientSecret":[1,"checkout-session-client-secret"],"shouldUseDefaultFormSubmitAction":[4,"should-use-default-form-submit-action"],"handleSubmit":[1040],"stripeDidLoaded":[1040],"progress":[32],"initStripe":[64],"initStripeWithCheckoutSession":[64],"updateProgress":[64],"setErrorMessage":[64]},null,{"publishableKey":["updatePublishableKey"],"stripeAccount":["updateStripeAccountId"],"intentClientSecret":["updateIntentClientSecret"],"checkoutSessionClientSecret":["updateCheckoutSessionClientSecret"]}]]],["ion-icon.cjs",[[257,"ion-icon",{"mode":[1025],"color":[1],"ios":[1],"md":[1],"flipRtl":[4,"flip-rtl"],"name":[513],"src":[1],"icon":[8],"size":[1],"lazy":[4],"sanitize":[4],"svgContent":[32],"isVisible":[32]},null,{"name":["loadIcon"],"src":["loadIcon"],"icon":["loadIcon"],"ios":["loadIcon"],"md":["loadIcon"]}]]],["stripe-payment-request-button.cjs",[[260,"stripe-payment-request-button",{"paymentMethodEventHandler":[16],"shippingOptionEventHandler":[16],"shippingAddressEventHandler":[16],"publishableKey":[1,"publishable-key"],"stripeAccount":[1,"stripe-account"],"applicationName":[1,"application-name"],"stripeDidLoaded":[1040],"loadStripeStatus":[32],"stripe":[32],"paymentRequestOption":[32],"isAvailable":[64],"setPaymentMethodEventHandler":[64],"setPaymentRequestShippingOptionEventHandler":[64],"setPaymentRequestShippingAddressEventHandler":[64],"setPaymentRequestOption":[64],"initStripe":[64]}]]],["stripe-card-element_2.cjs",[[256,"stripe-card-element",{"intentType":[1,"intent-type"],"zip":[4],"sheetTitle":[1,"sheet-title"],"buttonLabel":[1,"button-label"],"publishableKey":[1,"publishable-key"],"stripeAccount":[1,"stripe-account"],"applicationName":[1,"application-name"],"showLabel":[4,"show-label"],"intentClientSecret":[1,"intent-client-secret"],"shouldUseDefaultFormSubmitAction":[4,"should-use-default-form-submit-action"],"showPaymentRequestButton":[4,"show-payment-request-button"],"handleSubmit":[1040],"stripeDidLoaded":[1040],"progress":[32],"zipCode":[32],"paymentRequestOption":[32],"initStripe":[64],"updateProgress":[64],"setErrorMessage":[64],"setPaymentRequestOption":[64]},null,{"publishableKey":["updatePublishableKey"],"stripeAccount":["updateStripeAccountId"]}],[257,"stripe-modal",{"showCloseButton":[4,"show-close-button"],"open":[4],"toggleModal":[64],"openModal":[64],"closeModal":[64]}]]]], options);
49
+ return index.bootstrapLazy([["stripe-card-element-modal.cjs",[[0,"stripe-card-element-modal",{"publishableKey":[1,"publishable-key"],"stripeAccount":[1,"stripe-account"],"applicationName":[1,"application-name"],"showLabel":[4,"show-label"],"sheetTitle":[1,"sheet-title"],"buttonLabel":[1,"button-label"],"intentClientSecret":[1,"intent-client-secret"],"shouldUseDefaultFormSubmitAction":[4,"should-use-default-form-submit-action"],"intentType":[1,"intent-type"],"handleSubmit":[1040],"stripeDidLoaded":[1040],"showCloseButton":[4,"show-close-button"],"zip":[4],"open":[4],"getStripeCardElementElement":[64],"present":[64],"updateProgress":[64],"destroy":[64],"setPaymentRequestButton":[64]}]]],["stripe-address-element.cjs",[[0,"stripe-address-element",{"mode":[1],"sheetTitle":[1,"sheet-title"],"buttonLabel":[1,"button-label"],"publishableKey":[1,"publishable-key"],"stripeAccount":[1,"stripe-account"],"applicationName":[1,"application-name"],"showLabel":[4,"show-label"],"defaultCountry":[1,"default-country"],"allowedCountries":[16],"handleSubmit":[1040],"stripeDidLoaded":[1040],"progress":[32],"initStripe":[64],"updateProgress":[64],"setErrorMessage":[64],"getValue":[64]},null,{"publishableKey":[{"updatePublishableKey":0}],"stripeAccount":[{"updateStripeAccountId":0}]}]]],["stripe-currency-selector.cjs",[[0,"stripe-currency-selector",{"publishableKey":[1,"publishable-key"],"stripeAccount":[1,"stripe-account"],"applicationName":[1,"application-name"],"clientSecret":[1,"client-secret"],"handleCurrencyChange":[1040],"stripeDidLoaded":[1040],"initStripe":[64],"setErrorMessage":[64],"getSelectedCurrency":[64]},null,{"publishableKey":[{"updatePublishableKey":0}],"stripeAccount":[{"updateStripeAccountId":0}]}]]],["stripe-express-checkout-element.cjs",[[0,"stripe-express-checkout-element",{"intentType":[1,"intent-type"],"publishableKey":[1,"publishable-key"],"stripeAccount":[1,"stripe-account"],"applicationName":[1,"application-name"],"clientSecret":[1,"client-secret"],"amount":[2],"currency":[1],"buttonHeight":[1,"button-height"],"shouldUseDefaultConfirmAction":[4,"should-use-default-confirm-action"],"stripeDidLoaded":[1040],"progress":[32],"updateProgress":[64],"setErrorMessage":[64],"initStripe":[64],"updateElementOptions":[64]},null,{"publishableKey":[{"updatePublishableKey":0}],"stripeAccount":[{"updateStripeAccountId":0}]}]]],["stripe-link-authentication-element.cjs",[[0,"stripe-link-authentication-element",{"publishableKey":[1,"publishable-key"],"stripeAccount":[1,"stripe-account"],"applicationName":[1,"application-name"],"defaultEmail":[1,"default-email"],"handleChange":[1040],"stripeDidLoaded":[1040],"progress":[32],"initStripe":[64],"updateProgress":[64],"setErrorMessage":[64],"getEmail":[64]},null,{"publishableKey":[{"updatePublishableKey":0}],"stripeAccount":[{"updateStripeAccountId":0}]}]]],["stripe-payment-element.cjs",[[0,"stripe-payment-element",{"intentType":[1,"intent-type"],"sheetTitle":[1,"sheet-title"],"buttonLabel":[1,"button-label"],"publishableKey":[1,"publishable-key"],"stripeAccount":[1,"stripe-account"],"applicationName":[1,"application-name"],"intentClientSecret":[1,"intent-client-secret"],"checkoutSessionClientSecret":[1,"checkout-session-client-secret"],"shouldUseDefaultFormSubmitAction":[4,"should-use-default-form-submit-action"],"handleSubmit":[1040],"stripeDidLoaded":[1040],"progress":[32],"initStripe":[64],"initStripeWithCheckoutSession":[64],"updateProgress":[64],"setErrorMessage":[64]},null,{"publishableKey":[{"updatePublishableKey":0}],"stripeAccount":[{"updateStripeAccountId":0}],"intentClientSecret":[{"updateIntentClientSecret":0}],"checkoutSessionClientSecret":[{"updateCheckoutSessionClientSecret":0}]}]]],["ion-icon.cjs",[[1,"ion-icon",{"mode":[1025],"color":[1],"ios":[1],"md":[1],"flipRtl":[4,"flip-rtl"],"name":[513],"src":[1],"icon":[8],"size":[1],"lazy":[4],"sanitize":[4],"svgContent":[32],"isVisible":[32]},null,{"name":[{"loadIcon":0}],"src":[{"loadIcon":0}],"icon":[{"loadIcon":0}],"ios":[{"loadIcon":0}],"md":[{"loadIcon":0}]}]]],["stripe-payment-request-button.cjs",[[260,"stripe-payment-request-button",{"paymentMethodEventHandler":[16],"shippingOptionEventHandler":[16],"shippingAddressEventHandler":[16],"publishableKey":[1,"publishable-key"],"stripeAccount":[1,"stripe-account"],"applicationName":[1,"application-name"],"stripeDidLoaded":[1040],"loadStripeStatus":[32],"stripe":[32],"paymentRequestOption":[32],"isAvailable":[64],"setPaymentMethodEventHandler":[64],"setPaymentRequestShippingOptionEventHandler":[64],"setPaymentRequestShippingAddressEventHandler":[64],"setPaymentRequestOption":[64],"initStripe":[64]}]]],["stripe-card-element_2.cjs",[[0,"stripe-card-element",{"intentType":[1,"intent-type"],"zip":[4],"sheetTitle":[1,"sheet-title"],"buttonLabel":[1,"button-label"],"publishableKey":[1,"publishable-key"],"stripeAccount":[1,"stripe-account"],"applicationName":[1,"application-name"],"showLabel":[4,"show-label"],"intentClientSecret":[1,"intent-client-secret"],"shouldUseDefaultFormSubmitAction":[4,"should-use-default-form-submit-action"],"showPaymentRequestButton":[4,"show-payment-request-button"],"handleSubmit":[1040],"stripeDidLoaded":[1040],"progress":[32],"zipCode":[32],"paymentRequestOption":[32],"initStripe":[64],"updateProgress":[64],"setErrorMessage":[64],"setPaymentRequestOption":[64]},null,{"publishableKey":[{"updatePublishableKey":0}],"stripeAccount":[{"updateStripeAccountId":0}]}],[257,"stripe-modal",{"showCloseButton":[4,"show-close-button"],"open":[4],"renderedOpen":[32],"toggleModal":[64],"openModal":[64],"closeModal":[64]}]]]], options);
23
50
  });
24
51
 
25
52
  exports.setNonce = index.setNonce;
26
- //# sourceMappingURL=stripe-elements.cjs.js.map