@justifi/webcomponents 6.7.3 → 6.8.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 (287) hide show
  1. package/dist/cjs/{Business-uoeKyW_a.js → Business-CB8EVrhD.js} +1 -0
  2. package/dist/cjs/{GooglePay-CbKCUEfb.js → Plaid-DxPvVu0H.js} +53 -0
  3. package/dist/cjs/{bank-account-document-form-inputs_8.cjs.entry.js → bank-account-document-form-inputs_9.cjs.entry.js} +330 -8
  4. package/dist/cjs/{business-additional-questions-schema-BtOuMq_U.js → business-additional-questions-schema-Cnh6AXQU.js} +3 -3
  5. package/dist/cjs/{business-form-options-D1r-wJpo.js → business-form-options-B3CbEmdc.js} +1 -1
  6. package/dist/cjs/{business-identity-schema-CMvq6f8m.js → business-identity-schema-0jg2Thn9.js} +2 -2
  7. package/dist/cjs/{business.service-DR4Ce5XV.js → business.service-zGEitIbP.js} +2 -2
  8. package/dist/cjs/{check-pkg-version-Bs_9oZb4.js → check-pkg-version-DKH70uPq.js} +11 -10
  9. package/dist/cjs/{checkout.service-CQqd4X4y.js → checkout.service-DT13pWxH.js} +2 -2
  10. package/dist/cjs/checkouts-list-core.cjs.entry.js +2 -2
  11. package/dist/cjs/{country-config-DGi9t3Ma.js → country-config-ETD-7Wb7.js} +1 -1
  12. package/dist/cjs/custom-popper_2.cjs.entry.js +48 -17
  13. package/dist/cjs/{dispute.service-aok1_zRv.js → dispute.service-GDUl1Wjs.js} +2 -2
  14. package/dist/cjs/form-alert_5.cjs.entry.js +3 -3
  15. package/dist/cjs/form-control-number-masked_3.cjs.entry.js +2 -2
  16. package/dist/cjs/form-control-number_3.cjs.entry.js +6 -6
  17. package/dist/cjs/{get-business-CtsxSYA6.js → get-business-CP0ALW9n.js} +1 -1
  18. package/dist/cjs/{get-payment-details-tCICJHBb.js → get-payment-details-IA5Toi7Z.js} +3 -3
  19. package/dist/cjs/{get-subaccounts-BcsCQAVN.js → get-subaccounts-DNMZjAyT.js} +3 -3
  20. package/dist/cjs/hidden-input_2.cjs.entry.js +1 -1
  21. package/dist/cjs/{input-handlers-DaRKFvGI.js → input-handlers-gV1LyFy3.js} +1 -1
  22. package/dist/cjs/internal-tokenize-payment-method_7.cjs.entry.js +15 -15
  23. package/dist/cjs/justifi-additional-questions-form-step_9.cjs.entry.js +31 -18
  24. package/dist/cjs/justifi-apple-pay_8.cjs.entry.js +220 -290
  25. package/dist/cjs/justifi-bank-account-billing-form-simple_3.cjs.entry.js +4 -4
  26. package/dist/cjs/justifi-business-details.cjs.entry.js +6 -6
  27. package/dist/cjs/justifi-business-form.cjs.entry.js +10 -10
  28. package/dist/cjs/justifi-checkout.cjs.entry.js +12 -12
  29. package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +9 -9
  30. package/dist/cjs/justifi-checkouts-list.cjs.entry.js +7 -7
  31. package/dist/cjs/justifi-dispute-management.cjs.entry.js +5 -5
  32. package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +5 -5
  33. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +4 -4
  34. package/dist/cjs/justifi-order-terminals.cjs.entry.js +10 -10
  35. package/dist/cjs/justifi-payment-details.cjs.entry.js +6 -6
  36. package/dist/cjs/justifi-payment-provisioning-core.cjs.entry.js +1 -1
  37. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +5 -5
  38. package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +6 -6
  39. package/dist/cjs/justifi-payments-list.cjs.entry.js +6 -6
  40. package/dist/cjs/justifi-payout-details.cjs.entry.js +6 -6
  41. package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +6 -6
  42. package/dist/cjs/justifi-payouts-list.cjs.entry.js +7 -7
  43. package/dist/cjs/justifi-refund-payment.cjs.entry.js +10 -10
  44. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +7 -7
  45. package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +10 -10
  46. package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +6 -6
  47. package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +7 -7
  48. package/dist/cjs/justifi-terminals-list.cjs.entry.js +7 -7
  49. package/dist/cjs/loader.cjs.js +1 -1
  50. package/dist/cjs/{package-DcGEg97O.js → package-B4vs5j7c.js} +1 -1
  51. package/dist/cjs/payment-details-core.cjs.entry.js +3 -3
  52. package/dist/cjs/{payment.service-B4ACB8Q3.js → payment.service-QODfB293.js} +2 -2
  53. package/dist/cjs/payments-list-core.cjs.entry.js +2 -2
  54. package/dist/cjs/{payout.service-qVbNnemO.js → payout.service-k7GBuYzk.js} +2 -2
  55. package/dist/cjs/payouts-list-core.cjs.entry.js +2 -2
  56. package/dist/cjs/plaid-icon-DTpONc_Q.js +46 -0
  57. package/dist/cjs/{schema-validations-DYYDrVol.js → schema-validations-BakyfJpE.js} +3 -3
  58. package/dist/cjs/terminal-orders-list-core.cjs.entry.js +3 -3
  59. package/dist/cjs/{terminal-orders-table-C2jG4WQa.js → terminal-orders-table-C6j6Mx_r.js} +4 -4
  60. package/dist/cjs/{terminal.service-D1ohedi-.js → terminal.service-A90K3XNq.js} +2 -2
  61. package/dist/cjs/terminals-list-core.cjs.entry.js +2 -2
  62. package/dist/cjs/webcomponents.cjs.js +1 -1
  63. package/dist/collection/api/Analytics.js +8 -7
  64. package/dist/collection/api/Business.js +1 -0
  65. package/dist/collection/api/Plaid.js +50 -0
  66. package/dist/collection/api/index.js +1 -0
  67. package/dist/collection/api/services/plaid.service.js +13 -0
  68. package/dist/collection/collection-manifest.json +1 -0
  69. package/dist/collection/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step.js +20 -5
  70. package/dist/collection/components/business-forms/payment-provisioning/plaid-verification/plaid-verification.js +433 -0
  71. package/dist/collection/components/modular-checkout/sub-components/plaid-payment-method.js +4 -51
  72. package/dist/collection/ui-components/custom-popper/custom-popper.js +52 -18
  73. package/dist/docs.json +145 -4
  74. package/dist/esm/{Business-CHJTjG_5.js → Business-GgW1g7FQ.js} +1 -0
  75. package/dist/esm/{GooglePay-5EiPffHy.js → Plaid-CBrksnBN.js} +52 -1
  76. package/dist/esm/{bank-account-document-form-inputs_8.entry.js → bank-account-document-form-inputs_9.entry.js} +329 -8
  77. package/dist/esm/{business-additional-questions-schema-DQb10ehS.js → business-additional-questions-schema-CQ8CuEfQ.js} +3 -3
  78. package/dist/esm/{business-form-options-Bm89rMmk.js → business-form-options-DamBLV7N.js} +1 -1
  79. package/dist/esm/{business-identity-schema-CaMnpPqx.js → business-identity-schema-BTyJz7M9.js} +2 -2
  80. package/dist/esm/{business.service-C7smiL6_.js → business.service-BWm7Kqs4.js} +2 -2
  81. package/dist/esm/{check-pkg-version-DIZ2yD72.js → check-pkg-version-CioeuqLV.js} +11 -10
  82. package/dist/esm/{checkout.service-CYq6KXZv.js → checkout.service-D4Mljqjr.js} +2 -2
  83. package/dist/esm/checkouts-list-core.entry.js +2 -2
  84. package/dist/esm/{country-config-CQxaTFuP.js → country-config-D-9YmU94.js} +1 -1
  85. package/dist/esm/custom-popper_2.entry.js +48 -17
  86. package/dist/esm/{dispute.service-D7Dv8LTn.js → dispute.service-ZpqfPDC0.js} +2 -2
  87. package/dist/esm/form-alert_5.entry.js +3 -3
  88. package/dist/esm/form-control-number-masked_3.entry.js +2 -2
  89. package/dist/esm/form-control-number_3.entry.js +6 -6
  90. package/dist/esm/{get-business-BAmwId14.js → get-business-BMB2IxN_.js} +1 -1
  91. package/dist/esm/{get-payment-details-CPJZp31y.js → get-payment-details-B71Qi6mF.js} +2 -2
  92. package/dist/esm/{get-subaccounts-CqMFocN0.js → get-subaccounts-DXJdRbWg.js} +2 -2
  93. package/dist/esm/hidden-input_2.entry.js +1 -1
  94. package/dist/esm/{input-handlers-AgwQ-yKX.js → input-handlers-CzWCJ849.js} +1 -1
  95. package/dist/esm/internal-tokenize-payment-method_7.entry.js +4 -4
  96. package/dist/esm/justifi-additional-questions-form-step_9.entry.js +25 -12
  97. package/dist/esm/justifi-apple-pay_8.entry.js +6 -76
  98. package/dist/esm/justifi-bank-account-billing-form-simple_3.entry.js +4 -4
  99. package/dist/esm/justifi-business-details.entry.js +6 -6
  100. package/dist/esm/justifi-business-form.entry.js +10 -10
  101. package/dist/esm/justifi-checkout.entry.js +4 -4
  102. package/dist/esm/justifi-checkouts-list-filters.entry.js +2 -2
  103. package/dist/esm/justifi-checkouts-list.entry.js +6 -6
  104. package/dist/esm/justifi-dispute-management.entry.js +5 -5
  105. package/dist/esm/justifi-dispute-notification_3.entry.js +5 -5
  106. package/dist/esm/justifi-gross-payment-chart.entry.js +4 -4
  107. package/dist/esm/justifi-order-terminals.entry.js +7 -7
  108. package/dist/esm/justifi-payment-details.entry.js +6 -6
  109. package/dist/esm/justifi-payment-provisioning-core.entry.js +1 -1
  110. package/dist/esm/justifi-payment-provisioning.entry.js +5 -5
  111. package/dist/esm/justifi-payment-transactions-list.entry.js +5 -5
  112. package/dist/esm/justifi-payments-list.entry.js +5 -5
  113. package/dist/esm/justifi-payout-details.entry.js +5 -5
  114. package/dist/esm/justifi-payout-transactions-list.entry.js +5 -5
  115. package/dist/esm/justifi-payouts-list.entry.js +6 -6
  116. package/dist/esm/justifi-refund-payment.entry.js +6 -6
  117. package/dist/esm/justifi-season-interruption-insurance.entry.js +4 -4
  118. package/dist/esm/justifi-terminal-orders-list-filters.entry.js +2 -2
  119. package/dist/esm/justifi-terminal-orders-list.entry.js +5 -5
  120. package/dist/esm/justifi-terminals-list-filters.entry.js +2 -2
  121. package/dist/esm/justifi-terminals-list.entry.js +6 -6
  122. package/dist/esm/loader.js +1 -1
  123. package/dist/esm/{package-ZkBwsSuI.js → package-CekpA_KC.js} +1 -1
  124. package/dist/esm/payment-details-core.entry.js +2 -2
  125. package/dist/esm/{payment.service-BGf8F56_.js → payment.service-C2lFq1yV.js} +2 -2
  126. package/dist/esm/payments-list-core.entry.js +2 -2
  127. package/dist/esm/{payout.service-Co3xg-7j.js → payout.service-ChupMPKT.js} +2 -2
  128. package/dist/esm/payouts-list-core.entry.js +2 -2
  129. package/dist/esm/plaid-icon-wJLd-2NX.js +43 -0
  130. package/dist/esm/{schema-validations-jBrJ0mYI.js → schema-validations-CfHWzMvr.js} +3 -3
  131. package/dist/esm/terminal-orders-list-core.entry.js +3 -3
  132. package/dist/esm/{terminal-orders-table-uNYLd8i5.js → terminal-orders-table-B4_RAxxx.js} +2 -2
  133. package/dist/esm/{terminal.service-Cxs-IO0Z.js → terminal.service-DqibXFHt.js} +2 -2
  134. package/dist/esm/terminals-list-core.entry.js +2 -2
  135. package/dist/esm/webcomponents.js +1 -1
  136. package/dist/module/Analytics.js +9 -8
  137. package/dist/module/Business.js +1 -0
  138. package/dist/module/{Refund.js → Plaid.js} +51 -1
  139. package/dist/module/bank-account-document-inputs.js +1 -1
  140. package/dist/module/business-additional-questions-form-step.js +1 -1
  141. package/dist/module/business-bank-account-form-step.js +46 -25
  142. package/dist/module/business-core-info-form-step.js +1 -1
  143. package/dist/module/business-owners-form-step.js +1 -1
  144. package/dist/module/business-representative-form-step.js +1 -1
  145. package/dist/module/business-terms-conditions-form-step.js +1 -1
  146. package/dist/module/business.service.js +1 -1
  147. package/dist/module/checkout.service.js +1 -1
  148. package/dist/module/checkout.store.js +1 -1
  149. package/dist/module/checkouts-list-core2.js +1 -1
  150. package/dist/module/custom-popper2.js +50 -17
  151. package/dist/module/dispute-management-core.js +1 -1
  152. package/dist/module/dispute-response-actions.js +1 -1
  153. package/dist/module/dispute-response.js +1 -1
  154. package/dist/module/get-business.js +1 -1
  155. package/dist/module/get-payment-details.js +1 -1
  156. package/dist/module/get-payout-csv.js +1 -1
  157. package/dist/module/get-subaccounts.js +1 -1
  158. package/dist/module/google-pay.js +1 -1
  159. package/dist/module/internal-tokenize-payment-method2.js +1 -1
  160. package/dist/module/justifi-business-details.js +1 -1
  161. package/dist/module/justifi-business-form.js +1 -1
  162. package/dist/module/justifi-checkouts-list-filters.js +1 -1
  163. package/dist/module/justifi-checkouts-list.js +1 -1
  164. package/dist/module/justifi-dispute-management.js +1 -1
  165. package/dist/module/justifi-gross-payment-chart.js +1 -1
  166. package/dist/module/justifi-order-terminals.js +1 -1
  167. package/dist/module/justifi-payment-details.js +1 -1
  168. package/dist/module/justifi-payment-provisioning.js +69 -63
  169. package/dist/module/justifi-payment-transactions-list.js +1 -1
  170. package/dist/module/justifi-payments-list.js +1 -1
  171. package/dist/module/justifi-payout-details.js +1 -1
  172. package/dist/module/justifi-payout-transactions-list.js +1 -1
  173. package/dist/module/justifi-payouts-list.js +1 -1
  174. package/dist/module/justifi-refund-payment.js +1 -1
  175. package/dist/module/justifi-season-interruption-insurance.js +1 -1
  176. package/dist/module/justifi-terminal-orders-list-filters.js +1 -1
  177. package/dist/module/justifi-terminal-orders-list.js +1 -1
  178. package/dist/module/justifi-terminals-list-filters.js +1 -1
  179. package/dist/module/justifi-terminals-list.js +1 -1
  180. package/dist/module/legal-address-form-step.js +1 -1
  181. package/dist/module/modular-checkout.js +2 -2
  182. package/dist/module/package.js +1 -1
  183. package/dist/module/payment-details-core2.js +1 -1
  184. package/dist/module/payment-provisioning-actions.js +1 -1
  185. package/dist/module/payment-provisioning-core.js +67 -61
  186. package/dist/module/payment-provisioning-form-steps.js +62 -56
  187. package/dist/module/payment.service.js +1 -1
  188. package/dist/module/payments-list-core2.js +1 -1
  189. package/dist/module/payout.service.js +1 -1
  190. package/dist/module/payouts-list-core2.js +1 -1
  191. package/dist/module/plaid-icon.js +3 -0
  192. package/dist/module/plaid-payment-method.js +3 -53
  193. package/dist/module/plaid-verification.d.ts +11 -0
  194. package/dist/module/plaid-verification.js +6 -0
  195. package/dist/module/plaid-verification2.js +358 -0
  196. package/dist/module/plaid.service.js +14 -1
  197. package/dist/module/terminal-orders-list-core2.js +1 -1
  198. package/dist/module/terminal.service.js +1 -1
  199. package/dist/module/terminals-list-core2.js +1 -1
  200. package/dist/module/utils4.js +1 -1
  201. package/dist/types/api/Analytics.d.ts +1 -0
  202. package/dist/types/api/BankAccount.d.ts +1 -0
  203. package/dist/types/api/Business.d.ts +2 -0
  204. package/dist/types/api/Plaid.d.ts +54 -0
  205. package/dist/types/api/index.d.ts +1 -0
  206. package/dist/types/api/services/plaid.service.d.ts +8 -0
  207. package/dist/types/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step.d.ts +2 -0
  208. package/dist/types/components/business-forms/payment-provisioning/plaid-verification/plaid-verification.d.ts +36 -0
  209. package/dist/types/components/modular-checkout/sub-components/plaid-payment-method.d.ts +1 -25
  210. package/dist/types/components.d.ts +40 -1
  211. package/dist/types/ui-components/custom-popper/custom-popper.d.ts +4 -0
  212. package/dist/webcomponents/{p-BXdZKjdB.js → p--cI8fPJx.js} +1 -1
  213. package/dist/webcomponents/{p-66e8b443.entry.js → p-02f360c5.entry.js} +1 -1
  214. package/dist/webcomponents/{p-d0d6d1cc.entry.js → p-073ca03f.entry.js} +1 -1
  215. package/dist/webcomponents/{p-e9daf75f.entry.js → p-0eb97b54.entry.js} +1 -1
  216. package/dist/webcomponents/p-0fcb7ebb.entry.js +1 -0
  217. package/dist/webcomponents/{p-b2371f43.entry.js → p-110bec2e.entry.js} +1 -1
  218. package/dist/webcomponents/{p-931ea171.entry.js → p-1ec3d1e7.entry.js} +1 -1
  219. package/dist/webcomponents/{p-86db9040.entry.js → p-20cab5fe.entry.js} +1 -1
  220. package/dist/webcomponents/{p-a9b493c1.entry.js → p-238ba771.entry.js} +1 -1
  221. package/dist/webcomponents/{p-e11c7df0.entry.js → p-2454c140.entry.js} +1 -1
  222. package/dist/webcomponents/{p-5af4bb01.entry.js → p-25666afe.entry.js} +1 -1
  223. package/dist/webcomponents/{p-f5f46f2d.entry.js → p-26430bfe.entry.js} +1 -1
  224. package/dist/webcomponents/p-33ab9174.entry.js +1 -0
  225. package/dist/webcomponents/{p-f13c4a88.entry.js → p-3a254390.entry.js} +1 -1
  226. package/dist/webcomponents/p-4a802f82.entry.js +1 -0
  227. package/dist/webcomponents/p-4b928d2e.entry.js +1 -0
  228. package/dist/webcomponents/{p-252bd81d.entry.js → p-4d3e4e56.entry.js} +1 -1
  229. package/dist/webcomponents/{p-7184c2f8.entry.js → p-5ae3401d.entry.js} +1 -1
  230. package/dist/webcomponents/{p-4165281d.entry.js → p-7068c2ad.entry.js} +1 -1
  231. package/dist/webcomponents/{p-4786d1ea.entry.js → p-785e8ef7.entry.js} +1 -1
  232. package/dist/webcomponents/{p-50f16cca.entry.js → p-81bbd944.entry.js} +1 -1
  233. package/dist/webcomponents/{p-3d2495df.entry.js → p-8ac883e4.entry.js} +1 -1
  234. package/dist/webcomponents/{p-6ed0be7f.entry.js → p-8e6f2dc8.entry.js} +1 -1
  235. package/dist/webcomponents/{p-53be30e9.entry.js → p-8ed4f485.entry.js} +1 -1
  236. package/dist/webcomponents/p-922ddfb4.entry.js +1 -0
  237. package/dist/webcomponents/p-9643fe36.entry.js +1 -0
  238. package/dist/webcomponents/{p-Ce785aMx.js → p-B1AMrMly.js} +1 -1
  239. package/dist/webcomponents/{p-DDjKoqh6.js → p-BRPbLfCN.js} +1 -1
  240. package/dist/webcomponents/{p-BAu40WfT.js → p-BZbvHgMz.js} +1 -1
  241. package/dist/webcomponents/{p-APob2Eta.js → p-Bj9n56jK.js} +1 -1
  242. package/dist/webcomponents/p-By-Mu1IX.js +1 -0
  243. package/dist/webcomponents/p-C0dMwnDO.js +1 -0
  244. package/dist/webcomponents/p-C3RQHKL5.js +1 -0
  245. package/dist/webcomponents/{p-DBOsYeYk.js → p-CWyW004b.js} +1 -1
  246. package/dist/webcomponents/p-CekpA_KC.js +1 -0
  247. package/dist/webcomponents/p-CkYB1zGe.js +1 -0
  248. package/dist/webcomponents/p-D-07jgNC.js +1 -0
  249. package/dist/webcomponents/{p-C-LV3hNf.js → p-DCwnBXF7.js} +1 -1
  250. package/dist/webcomponents/p-DKemQxaE.js +1 -0
  251. package/dist/webcomponents/{p-CHJTjG_5.js → p-GgW1g7FQ.js} +1 -1
  252. package/dist/webcomponents/{p-NO0z-S2W.js → p-MVBgKFOv.js} +1 -1
  253. package/dist/webcomponents/{p-mhEMV8M-.js → p-Y-EhaLdV.js} +1 -1
  254. package/dist/webcomponents/{p-e5651bb1.entry.js → p-aa02e3d7.entry.js} +1 -1
  255. package/dist/webcomponents/p-adbe280f.entry.js +1 -0
  256. package/dist/webcomponents/{p-ea0cd47d.entry.js → p-af11ac6a.entry.js} +1 -1
  257. package/dist/webcomponents/{p-73b9cc29.entry.js → p-bbffb17f.entry.js} +1 -1
  258. package/dist/webcomponents/{p-782ccafb.entry.js → p-c0829d61.entry.js} +1 -1
  259. package/dist/webcomponents/{p-001ce9f8.entry.js → p-c2db5db6.entry.js} +1 -1
  260. package/dist/webcomponents/{p-79d1d6b3.entry.js → p-d4535236.entry.js} +1 -1
  261. package/dist/webcomponents/{p-e1a8785d.entry.js → p-d5827cb2.entry.js} +1 -1
  262. package/dist/webcomponents/{p-1eefdd41.entry.js → p-ed9db5b2.entry.js} +1 -1
  263. package/dist/webcomponents/{p-c11512e7.entry.js → p-f1e012f6.entry.js} +1 -1
  264. package/dist/webcomponents/{p-1dbf3473.entry.js → p-f1f0f100.entry.js} +1 -1
  265. package/dist/webcomponents/{p-7c4fa66f.entry.js → p-f5b7c322.entry.js} +1 -1
  266. package/dist/webcomponents/{p-bc56446a.entry.js → p-f9475bb0.entry.js} +1 -1
  267. package/dist/webcomponents/{p-4d7a2565.entry.js → p-ff1cff1d.entry.js} +1 -1
  268. package/dist/webcomponents/{p-D81X4BBI.js → p-g0kDRH6Z.js} +1 -1
  269. package/dist/webcomponents/{p-Bz97Ujvk.js → p-m_Ly-YPk.js} +1 -1
  270. package/dist/webcomponents/p-wSi5d4-j.js +1 -0
  271. package/dist/webcomponents/{p-BhvkOTYA.js → p-ygekUw3Q.js} +1 -1
  272. package/dist/webcomponents/webcomponents.esm.js +1 -1
  273. package/package.json +2 -1
  274. package/dist/webcomponents/p-0fb3fd77.entry.js +0 -1
  275. package/dist/webcomponents/p-198d2941.entry.js +0 -1
  276. package/dist/webcomponents/p-52203b01.entry.js +0 -1
  277. package/dist/webcomponents/p-639e5ce9.entry.js +0 -1
  278. package/dist/webcomponents/p-7ec771bc.entry.js +0 -1
  279. package/dist/webcomponents/p-D0PhRMmy.js +0 -1
  280. package/dist/webcomponents/p-DLLFAj4z.js +0 -1
  281. package/dist/webcomponents/p-DpkIbI5R.js +0 -1
  282. package/dist/webcomponents/p-MBH9QO2m.js +0 -1
  283. package/dist/webcomponents/p-ZkBwsSuI.js +0 -1
  284. package/dist/webcomponents/p-_LSWCi-4.js +0 -1
  285. package/dist/webcomponents/p-c5afb831.entry.js +0 -1
  286. package/dist/webcomponents/p-d55c348b.entry.js +0 -1
  287. package/dist/webcomponents/p-y-FoILTI.js +0 -1
@@ -1 +0,0 @@
1
- import{h as t,r as e,c as i,H as n,g as s}from"./p-CV0Pyo1O.js";import{A as o}from"./p-y8av3w9x.js";import{A as a,o as r,p as l,q as c,r as h,s as d,c as p,t as u,G as y,u as g,v as b,w as m,x as f,y as v,z as M,B as w,D as k,I as P,F as x,H as E}from"./p-DpkIbI5R.js";import{S as j}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{S as A}from"./p-DaZF_q9T.js";import{B as T,r as N}from"./p-DrquDBSk.js";import{f as C}from"./p-B09GVew-.js";import{P as I,a as D,b as S}from"./p-DkoufM1t.js";import{H as L}from"./p-sPEyLX4E.js";import{H as O,b as z,h as R,i as _}from"./p-B8CPGGs6.js";import{H as U}from"./p-C3E-JbVM.js";import{J as B,c as G}from"./p-DLLFAj4z.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{C as Y,a as F,b as V}from"./p-Cjcsf8ku.js";import"./p-CLHwhyvu.js";import"./p-CHJTjG_5.js";import"./p-BH0Xfn-F.js";import{g as H,a as Q}from"./p-D2muobcE.js";import{C as q}from"./p-NO0z-S2W.js";import{C as Z}from"./p-ZpPDShvP.js";import"./p-D8GTwl9v.js";import"./p-ZkBwsSuI.js";var W;!function(t){t.UNAVAILABLE="UNAVAILABLE",t.SESSION_ERROR="SESSION_ERROR",t.MERCHANT_VALIDATION_ERROR="MERCHANT_VALIDATION_ERROR",t.PAYMENT_PROCESSING_ERROR="PAYMENT_PROCESSING_ERROR",t.USER_CANCELLED="USER_CANCELLED"}(W||(W={}));class J{constructor(){this.api=o()}initialize(t){if(this.applePayConfig=new a(t),!this.applePayConfig.isValid)throw new Error("Invalid Apple Pay configuration provided")}async validateMerchant(t,e){try{return await this.api.post({endpoint:"apple_pay/merchant_session",authToken:t,headers:{"Sub-Account":e},body:{domain:window.location.host,display_name:this.applePayConfig.displayName}})}catch(t){throw console.error("Backend validation failed:",t),new Error("Merchant validation failed")}}async processPayment(t,e,i){const n=await this.api.post({endpoint:"apple_pay/process_token",authToken:t,body:i,headers:{"Sub-Account":e}});return{success:n.id&&!!n.data.token,data:n}}isAvailable(){return r.isApplePaySupported()&&r.canMakePayments()}async canMakePaymentsWithActiveCard(){if(!this.applePayConfig)throw new Error("Apple Pay not initialized. Call initialize() first.");return await r.canMakePaymentsWithActiveCard(this.applePayConfig.merchantIdentifier)}async startPaymentSession(t,e,i){if(!this.applePayConfig)throw console.error("[ApplePayService] Missing applePayConfig. Did you call initialize()?"),new Error("Apple Pay not initialized. Call initialize() first.");const n=new l(t);if(!n.isValid){const t=[];throw n.countryCode||t.push("countryCode"),n.currencyCode||t.push("currencyCode"),n.merchantCapabilities&&0!==n.merchantCapabilities.length||t.push("merchantCapabilities"),n.supportedNetworks&&0!==n.supportedNetworks.length||t.push("supportedNetworks"),n.total&&n.total.label&&n.total.amount||t.push("total"),console.error("[ApplePayService] Payment request is invalid. Missing/invalid:",t),new Error("Invalid payment request provided")}return this.currentPaymentRequest=n,new Promise(((t,s)=>{try{if("undefined"==typeof window||!("ApplePaySession"in window))return console.error("[ApplePayService] ApplePaySession not available on window"),s({success:!1,error:{code:W.UNAVAILABLE,message:"ApplePaySession API is not available in this environment"}});this.currentSession=new window.ApplePaySession(3,n),this.setupSessionEventHandlers(t,s,e,i),this.currentSession.begin()}catch(t){console.error("[ApplePayService] Exception while starting session:",t),s({success:!1,error:{code:W.SESSION_ERROR,message:t instanceof Error?t.message:"Failed to start Apple Pay session"}})}}))}abortPaymentSession(){this.currentSession&&(this.currentSession.abort(),this.currentSession=void 0,this.currentPaymentRequest=void 0)}setupSessionEventHandlers(t,e,i,n){this.currentSession&&this.applePayConfig&&this.currentPaymentRequest?(this.currentSession.onvalidatemerchant=async()=>{try{if(!i)throw console.error("[ApplePayService] Missing authToken for merchant validation"),new Error("Authentication token not provided.");const t=await this.validateMerchant(i,n);try{this.currentSession.completeMerchantValidation(t)}catch(t){throw console.error("Error calling completeMerchantValidation:",t),t}}catch(t){console.error("=== MERCHANT VALIDATION ERROR ==="),console.error("Error during merchant validation:",t),t&&t.stack&&console.error("Error stack:",t.stack),this.currentSession.abort(),e({success:!1,error:{code:W.MERCHANT_VALIDATION_ERROR,message:t instanceof Error?t.message:"Merchant validation failed"}})}},this.currentSession.onpaymentauthorized=async s=>{try{const o=s.payment,a=Object.assign(Object.assign({},o.token),{product_details:{name:this.currentPaymentRequest.total.label,price:r.parseAmount(this.currentPaymentRequest.total.amount),description:this.currentPaymentRequest.total.label}}),l=await this.processPayment(i,n,a);l.success?(this.currentSession.completePayment({status:c.STATUS_SUCCESS}),t({success:!0,token:o.token,paymentMethodId:l.data.id})):(console.error("PSP reported payment failure:",l.data),this.currentSession.completePayment({status:c.STATUS_FAILURE}),e({success:!1,error:{code:W.PAYMENT_PROCESSING_ERROR,message:"Payment processing failed"}}))}catch(t){console.error("=== PAYMENT PROCESSING ERROR ==="),console.error("Error processing payment:",t),t&&t.stack&&console.error("Error stack:",t.stack),this.currentSession.completePayment({status:c.STATUS_FAILURE}),e({success:!1,error:{code:W.PAYMENT_PROCESSING_ERROR,message:t instanceof Error?t.message:"Payment processing failed"}})}finally{this.currentSession=void 0,this.currentPaymentRequest=void 0}},this.currentSession.onpaymentmethodselected=()=>{const t={newTotal:this.currentPaymentRequest.total,newLineItems:this.currentPaymentRequest.lineItems||[]};try{this.currentSession.completePaymentMethodSelection(t)}catch(t){console.error("Error completing payment method selection:",t),this.currentSession.abort()}},this.currentSession.onshippingmethodselected=()=>{this.currentSession.completeShippingMethodSelection({status:c.STATUS_SUCCESS,newTotal:this.currentPaymentRequest.total,newLineItems:this.currentPaymentRequest.lineItems||[]})},this.currentSession.oncancel=t=>{if(t.sessionError)switch(console.error(t.sessionError),t.sessionError.code){case"unknown":console.error("Unknown error - likely merchant validation issue"),console.error("This usually means:"),console.error("1. Merchant certificate is invalid or expired"),console.error("2. Merchant identifier mismatch"),console.error("3. Backend validation endpoint issues");break;case"invalidMerchantSession":console.error("Invalid merchant session provided"),console.error("Check that the merchant session from backend is valid");break;case"userCancel":console.error("User cancelled the payment");break;default:console.error("Other error code:",t.sessionError.code)}this.currentSession=void 0,this.currentPaymentRequest=void 0,e({success:!1,error:{code:W.USER_CANCELLED,message:"User cancelled the Apple Pay session"}})},"onerror"in this.currentSession&&(this.currentSession.onerror=t=>{console.error("=== APPLE PAY SESSION ERROR ==="),console.error("Session error:",t),this.currentSession=void 0,this.currentPaymentRequest=void 0,e({success:!1,error:{code:W.SESSION_ERROR,message:"Apple Pay session error occurred"}})})):console.error("[ApplePayService] setupSessionEventHandlers called without required state",{hasSession:Boolean(this.currentSession),hasConfig:Boolean(this.applePayConfig),hasPaymentRequest:Boolean(this.currentPaymentRequest)})}static createPaymentRequest(t,e,i="US",n="USD"){return{countryCode:i,currencyCode:n,merchantCapabilities:r.getDefaultMerchantCapabilities(),supportedNetworks:r.getDefaultSupportedNetworks(),total:r.createLineItem(e,t)}}getApplePayConfig(){return this.applePayConfig}}const X=e=>{const{isLoading:i}=e;return i?t("div",{class:"container-fluid p-0"},t("div",{class:"row mb-3"},t("div",{class:"col-12 align-content-center"},t(A,{height:"44px",width:"100%",styles:{borderRadius:"8px"}})))):null},$=e=>t("div",{class:"apple-pay-button-container"},t("button",Object.assign({class:(()=>{let t="apple-pay-button";switch(e.buttonStyle){case h.WHITE:t+=" apple-pay-button-white";break;case h.WHITE_OUTLINE:t+=" apple-pay-button-white-outline";break;default:t+=" apple-pay-button-black"}switch(e.buttonType){case d.BUY:t+=" apple-pay-button-type-buy";break;case d.DONATE:t+=" apple-pay-button-type-donate";break;default:t+=" apple-pay-button-type-plain"}return(e.disabled||e.isProcessing||!e.isAvailable)&&(t+=" disabled"),t})(),style:{width:e.width,height:e.height},onClick:()=>{!e.disabled&&!e.isProcessing&&e.isAvailable&&e.clickHandler&&e.clickHandler()},disabled:e.disabled||e.isProcessing||!e.isAvailable,"aria-label":"Pay with Apple Pay",type:"button"},e),e.isProcessing&&t("div",{class:"processing-overlay"},t("div",{class:"spinner"}),t("span",null,"Processing..."))),t("style",null,"\n .apple-pay-button-container {\n display: block;\n position: relative;\n width: 100%;\n }\n\n /* Apple Pay CSS classes - these are the official Apple Pay button styles */\n .apple-pay-button {\n display: inline-block;\n -webkit-appearance: -apple-pay-button;\n -apple-pay-button-type: plain; /* default */\n -apple-pay-button-style: black; /* default */\n border-radius: 8px;\n cursor: pointer;\n border: none;\n outline: none;\n transition: opacity 0.2s ease;\n position: relative;\n }\n\n /* Button styles */\n .apple-pay-button.apple-pay-button-black {\n -apple-pay-button-style: black;\n }\n\n .apple-pay-button.apple-pay-button-white {\n -apple-pay-button-style: white;\n }\n\n .apple-pay-button.apple-pay-button-white-outline {\n -apple-pay-button-style: white-outline;\n }\n\n /* Button types */\n .apple-pay-button.apple-pay-button-type-plain {\n -apple-pay-button-type: plain;\n }\n\n .apple-pay-button.apple-pay-button-type-buy {\n -apple-pay-button-type: buy;\n }\n\n .apple-pay-button.apple-pay-button-type-donate {\n -apple-pay-button-type: donate;\n }\n\n /* Hover and disabled states */\n .apple-pay-button:hover:not(.disabled) {\n opacity: 0.9;\n }\n\n .apple-pay-button.disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n /* Processing overlay */\n .processing-overlay {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n background: rgba(0, 0, 0, 0.8);\n color: white;\n border-radius: 8px;\n font-size: 14px;\n font-weight: 500;\n }\n\n .spinner {\n width: 16px;\n height: 16px;\n border: 2px solid rgba(255, 255, 255, 0.3);\n border-top: 2px solid #fff;\n border-radius: 50%;\n animation: spin 1s linear infinite;\n }\n\n @keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n\n /* Responsive design */\n @media (max-width: 480px) {\n .apple-pay-button {\n width: 100% !important;\n min-width: 200px;\n }\n }\n ")),K=class{constructor(t){e(this,t),this.applePayStarted=i(this,"applePayStarted",7),this.applePayCompleted=i(this,"applePayCompleted",7),this.applePayCancelled=i(this,"applePayCancelled",7),this.applePayError=i(this,"applePayError",7),this.countryCode="US",this.merchantIdentifier="merchant.com.staging-justifi.checkout-dev",this.merchantDisplayName="JustiFi Checkout",this.initiativeContext="dev-checkout.justifi-staging.com",this.buttonType=d.PLAIN,this.buttonStyle=h.BLACK,this.disabled=!1,this.showSkeleton=!0,this.width="100%",this.height="48px",this.isLoading=!0,this.isProcessing=!1,this.isAvailable=!1,this.canMakePayments=!1,this.isConfigValid=!0,this.error=null,this.handleApplePayClick=async()=>{var t,e;if(!this.isProcessing&&!this.disabled&&this.isAvailable)try{this.isProcessing=!0,this.error=null,this.applePayStarted.emit();const i={countryCode:this.countryCode,currencyCode:p.paymentCurrency,merchantCapabilities:[u.SUPPORTS_3DS,u.SUPPORTS_CREDIT,u.SUPPORTS_DEBIT],supportedNetworks:r.getDefaultSupportedNetworks(),total:r.createLineItem(p.paymentDescription,p.paymentAmount)},n=await this.applePayService.startPaymentSession(i,p.authToken,p.accountId);n.success?this.applePayCompleted.emit({success:!0,token:n.token,paymentMethodId:n.paymentMethodId}):(this.applePayCompleted.emit({success:!1,error:n.error}),this.applePayError.emit({error:(null===(t=n.error)||void 0===t?void 0:t.message)||"Payment failed",code:(null===(e=n.error)||void 0===e?void 0:e.code)||K.ErrorCode.PAYMENT_FAILED}))}catch(t){const e=t instanceof Error?t.message:"Payment failed";this.error=e,this.applePayError.emit({error:e,code:K.ErrorCode.PAYMENT_FAILED}),this.applePayCompleted.emit({success:!1,error:e})}finally{this.isProcessing=!1}}}async initializeApplePay(){try{if(this.isLoading=!0,this.error=null,this.isConfigValid=!0,!(Boolean(p.paymentAmount)&&Boolean(p.paymentCurrency)&&Boolean(p.authToken)))return this.error="Missing required Apple Pay configuration",this.isConfigValid=!1,console.error("Apple Pay config error: missing required values",{paymentAmount:p.paymentAmount,paymentCurrency:p.paymentCurrency,hasAuthToken:Boolean(p.authToken),accountId:p.accountId}),this.applePayError.emit({error:this.error,code:K.ErrorCode.CONFIG_ERROR}),void(this.isLoading=!1);if(this.isAvailable=r.isApplePaySupported(),this.canMakePayments=r.canMakePayments(),!this.isAvailable)return this.error="Apple Pay is not supported on this device",console.error(this.error),this.applePayError.emit({error:this.error,code:K.ErrorCode.NOT_SUPPORTED}),void(this.isLoading=!1);if(!this.canMakePayments)return this.error="Apple Pay is not available",console.error(this.error),this.applePayError.emit({error:this.error,code:K.ErrorCode.NOT_AVAILABLE}),void(this.isLoading=!1);const t={merchantIdentifier:this.merchantIdentifier,displayName:this.merchantDisplayName,initiative:"web",initiativeContext:this.initiativeContext,buttonType:this.buttonType,buttonStyle:this.buttonStyle};this.applePayService=new J,this.applePayService.initialize(t),await this.applePayService.canMakePaymentsWithActiveCard()||console.warn("No Apple Pay cards available, but continuing...")}catch(t){console.error("Apple Pay initialization error:",t),this.error=t instanceof Error?t.message:"Failed to initialize Apple Pay",this.applePayError.emit({error:this.error,code:K.ErrorCode.INITIALIZATION_ERROR})}finally{this.isLoading=!1}}async isSupported(){return this.isAvailable&&this.canMakePayments}async getPaymentMethods(){return this.isAvailable?r.getDefaultSupportedNetworks():[]}async abort(){this.applePayService.abortPaymentSession(),this.isProcessing=!1,this.applePayCancelled.emit()}render(){if(!p.applePayEnabled)return null;const e=!this.isLoading&&this.isAvailable&&this.canMakePayments&&this.isConfigValid;return t(j,null,p.checkoutLoaded&&t("script",{async:!0,src:"https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js",onLoad:()=>{this.initializeApplePay()}}),t("div",{class:"apple-pay-container"},t(X,{isLoading:this.isLoading}),e&&t($,{buttonType:this.buttonType,buttonStyle:this.buttonStyle,disabled:this.disabled,isProcessing:this.isProcessing,isAvailable:this.isAvailable,clickHandler:this.handleApplePayClick,width:this.width,height:this.height})),t("style",null,"\n .apple-pay-container {\n width: 100%;\n }\n "))}};K.ErrorCode={CONFIG_ERROR:"CONFIG_ERROR",NOT_SUPPORTED:"NOT_SUPPORTED",NOT_AVAILABLE:"NOT_AVAILABLE",INITIALIZATION_ERROR:"INITIALIZATION_ERROR",PAYMENT_FAILED:"PAYMENT_FAILED"};const tt=class{constructor(t){e(this,t)}render(){return t(j,{key:"28a1a324b8cdf2dea0aafe91fbdd3679482e76f8"},t("section",{key:"e8ffe2fdd1592a0b762647fdab94ee5e21436a93"},t("div",{key:"099fbfb449066290cdcd113b0de5f87334777a0e"},t("div",{key:"c78325957b4e00299366b8e9efe6fd6e86da3b97",part:T},null==p?void 0:p.paymentDescription),t("div",{key:"d077da888b03a34e540f66ebaa57502fe22be7c4"},t("span",{key:"d4f7ddd24e10302222679a9f73c3b5ed305267a7",part:T},"Total")," ",t("span",{key:"1f5d7b6b0cce64eea04879e7767ff87ce5a64069",part:T},C(+(null==p?void 0:p.totalAmount)))))))}};class et{constructor(){this.api=o()}initialize(t){if(this.googlePayConfig=new y(t),!this.googlePayConfig.isValid)throw new Error("Invalid Google Pay configuration provided");if(this.googlePayClient=g.createGooglePayClient(this.googlePayConfig.environment),!this.googlePayClient)throw new Error("Failed to create Google Pay client")}async processPayment(t,e,i){try{const n=await this.api.post({endpoint:"google_pay/process_token",authToken:t,body:i,headers:{"sub-account":e}});return{success:n.id&&!!n.data.token,data:n}}catch(t){throw new Error("Google Pay payment processing failed")}}isAvailable(){return g.isGooglePaySupported()&&!!this.googlePayClient}async canMakePayments(){if(!this.googlePayClient||!this.googlePayConfig)return!1;try{const t=g.createBasePaymentDataRequest();return(await this.googlePayClient.isReadyToPay(t)).result}catch(t){return!1}}async startPaymentSession(t,e,i){var n;if(!this.googlePayConfig||!this.googlePayClient)throw new Error("Google Pay not initialized. Call initialize() first.");if(!this.isAvailable())throw new Error("Google Pay is not available on this device/browser");const s=new b(t);if(!s.isValid)throw new Error("Invalid payment data request provided");try{const t=await this.googlePayClient.loadPaymentData(s),o=null===(n=null==t?void 0:t.paymentMethodData)||void 0===n?void 0:n.tokenizationData,a=(()=>{if((null==o?void 0:o.token)&&"string"==typeof o.token)try{return JSON.parse(o.token)}catch(t){return o}return o})(),r={protocolVersion:null==a?void 0:a.protocolVersion,signature:null==a?void 0:a.signature,intermediateSigningKey:(null==a?void 0:a.intermediateSigningKey)?{signedKey:a.intermediateSigningKey.signedKey,signatures:a.intermediateSigningKey.signatures}:void 0,signedMessage:null==a?void 0:a.signedMessage},l=await this.processPayment(e,i,r);return l.success?{success:!0,paymentData:t,paymentMethodId:l.data.id}:{success:!1,error:{code:"PAYMENT_PROCESSING_ERROR",message:"Payment processing failed"}}}catch(t){if(t&&"object"==typeof t&&"statusCode"in t){const e=t;switch(e.statusCode){case"CANCELED":return{success:!1,error:{code:"USER_CANCELLED",message:"User cancelled the Google Pay session"}};case"DEVELOPER_ERROR":return{success:!1,error:{code:"DEVELOPER_ERROR",message:"Google Pay configuration error"}};default:return{success:!1,error:{code:"PAYMENT_ERROR",message:e.statusMessage||"Google Pay payment failed"}}}}return{success:!1,error:{code:"PAYMENT_ERROR",message:t instanceof Error?t.message:"Google Pay payment failed"}}}}createButton(t){if(!this.googlePayClient||!this.googlePayConfig)return null;try{return this.googlePayClient.createButton({onClick:t.onClick,buttonType:t.buttonType,buttonSizeMode:t.buttonSizeMode,buttonColor:t.buttonColor,buttonLocale:t.buttonLocale})}catch(t){return null}}prefetchPaymentData(t){if(!this.googlePayClient)return;const e=new b(t);if(e.isValid)try{this.googlePayClient.prefetchPaymentData(e)}catch(t){}}static createPaymentDataRequest(t,e,i="US",n="USD",s,o){return{apiVersion:2,apiVersionMinor:0,allowedPaymentMethods:[g.createPaymentMethodData()],transactionInfo:{countryCode:i,currencyCode:n,totalPriceStatus:"FINAL",totalPrice:g.formatAmount(t),totalPriceLabel:e},merchantInfo:{merchantName:s,merchantId:o}}}getGooglePayConfig(){return this.googlePayConfig}getGooglePayClient(){return this.googlePayClient}}const it=e=>{const{isLoading:i}=e;return i?t("div",{class:"container-fluid p-0"},t("div",{class:"row mb-3"},t("div",{class:"col-12 align-content-center"},t(A,{height:"44px",width:"100%",styles:{borderRadius:"8px"}})))):null},nt=e=>t("div",{class:"google-pay-button-container"},t("button",Object.assign({class:(()=>{let t="google-pay-button";switch(t+=e.buttonStyle===f.WHITE?" google-pay-button-white":" google-pay-button-black",e.buttonType){case v.BUY:t+=" google-pay-button-type-buy";break;case v.BOOK:t+=" google-pay-button-type-book";break;case v.CHECKOUT:t+=" google-pay-button-type-checkout";break;case v.DONATE:t+=" google-pay-button-type-donate";break;case v.ORDER:t+=" google-pay-button-type-order";break;case v.PAY:t+=" google-pay-button-type-pay";break;case v.SUBSCRIBE:t+=" google-pay-button-type-subscribe";break;default:t+=" google-pay-button-type-plain"}return t+=e.buttonSizeMode===m.FILL?" google-pay-button-fill":" google-pay-button-static",(e.disabled||e.isProcessing||!e.isAvailable)&&(t+=" disabled"),t})(),style:(()=>{const t={};return e.buttonSizeMode===m.FILL?(t.width="100%",t.minWidth="200px"):t.width=e.width||"200px",t.height=e.height||"48px",t})(),onClick:()=>{!e.disabled&&!e.isProcessing&&e.isAvailable&&e.clickHandler&&e.clickHandler()},disabled:e.disabled||e.isProcessing||!e.isAvailable,"aria-label":"Google Pay",type:"button"},e),e.isProcessing&&t("div",{class:"processing-overlay"},t("div",{class:"spinner"}),t("span",null,"Processing...")),t("div",{class:"google-pay-button-content"},t("svg",{width:"41",height:"17",xmlns:"http://www.w3.org/2000/svg"},t("g",{fill:"none","fill-rule":"evenodd"},t("path",{d:"M19.526 2.635v4.083h2.518c.6 0 1.096-.202 1.488-.605.403-.402.605-.882.605-1.437 0-.544-.202-1.018-.605-1.422-.392-.413-.888-.62-1.488-.62h-2.518zm0 5.52v4.736h-1.504V1.198h3.99c1.013 0 1.873.337 2.582 1.012.72.675 1.08 1.497 1.08 2.466 0 .991-.36 1.819-1.08 2.482-.697.665-1.559.996-2.583.996h-2.485v.001zm7.668 2.287c0 .392.166.718.499.98.332.26.722.391 1.168.391.633 0 1.196-.234 1.692-.701.497-.469.744-1.019.744-1.65-.469-.37-1.123-.555-1.962-.555-.61 0-1.12.148-1.528.442-.409.294-.613.657-.613 1.093m1.946-5.815c1.112 0 1.989.297 2.633.89.642.594.964 1.408.964 2.442v4.932h-1.439v-1.11h-.065c-.622.914-1.45 1.372-2.486 1.372-.882 0-1.621-.262-2.215-.784-.594-.523-.891-1.176-.891-1.96 0-.828.313-1.486.94-1.976s1.463-.735 2.51-.735c.892 0 1.629.163 2.206.49v-.344c0-.522-.207-.966-.621-1.33a2.132 2.132 0 0 0-1.455-.547c-.84 0-1.504.353-1.995 1.062l-1.324-.834c.73-1.045 1.81-1.568 3.238-1.568m11.853.262l-5.02 11.53H34.42l1.864-4.034-3.302-7.496h1.635l2.387 5.749h.032l2.322-5.75z",fill:"#FFF"}),t("path",{d:"M13.448 7.134c0-.473-.04-.93-.116-1.366H6.988v2.588h3.634a3.11 3.11 0 0 1-1.344 2.042v1.68h2.169c1.27-1.17 2.001-2.9 2.001-4.944",fill:"#4285F4"}),t("path",{d:"M6.988 13.7c1.816 0 3.344-.595 4.459-1.621l-2.169-1.681c-.603.406-1.38.643-2.29.643-1.754 0-3.244-1.182-3.776-2.774H.978v1.731a6.728 6.728 0 0 0 6.01 3.703",fill:"#34A853"}),t("path",{d:"M3.212 8.267a4.034 4.034 0 0 1 0-2.572V3.964H.978A6.678 6.678 0 0 0 .261 6.98c0 1.085.26 2.11.717 3.017l2.234-1.731z",fill:"#FABB05"}),t("path",{d:"M6.988 2.921c.992 0 1.88.34 2.58 1.008v.001l1.92-1.918C10.324.928 8.804.262 6.989.262a6.728 6.728 0 0 0-6.01 3.702l2.234 1.731c.532-1.592 2.022-2.774 3.776-2.774",fill:"#E94235"}))))),t("style",null,"\n .google-pay-button-container {\n display: block;\n position: relative;\n }\n\n .google-pay-button {\n display: flex;\n align-items: center;\n justify-content: center;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n font-size: 14px;\n font-weight: 500;\n letter-spacing: 0.25px;\n line-height: 16px;\n outline: none;\n padding: 0 20px;\n position: relative;\n min-width: 140px;\n min-height: 48px;\n }\n\n /* Button styles */\n .google-pay-button.google-pay-button-black {\n background-color: #000;\n color: #fff;\n }\n\n .google-pay-button.google-pay-button-white {\n background-color: #fff;\n color: #3c4043;\n }\n\n /* Button content */\n .google-pay-button-content {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n white-space: nowrap;\n }\n\n .google-g-logo {\n width: 20px;\n height: 20px;\n flex-shrink: 0;\n }\n\n .pay-text {\n font-family: 'Google Sans', arial, sans-serif;\n font-size: 14px;\n font-weight: 500;\n margin-left: 8px;\n }\n\n /* Button types - text content handled by ::before pseudo-element */\n .google-pay-button-type-buy .google-pay-button-content::before {\n content: 'Buy with';\n margin-right: 8px;\n }\n\n .google-pay-button-type-book .google-pay-button-content::before {\n content: 'Book with';\n margin-right: 8px;\n }\n\n .google-pay-button-type-checkout .google-pay-button-content::before {\n content: 'Checkout with';\n margin-right: 8px;\n }\n\n .google-pay-button-type-donate .google-pay-button-content::before {\n content: 'Donate with';\n margin-right: 8px;\n }\n\n .google-pay-button-type-order .google-pay-button-content::before {\n content: 'Order with';\n margin-right: 8px;\n }\n\n .google-pay-button-type-pay .google-pay-button-content::before {\n content: 'Pay with';\n margin-right: 8px;\n }\n\n .google-pay-button-type-subscribe .google-pay-button-content::before {\n content: 'Subscribe with';\n margin-right: 8px;\n }\n\n /* Size modes */\n .google-pay-button.google-pay-button-fill {\n width: 100%;\n min-width: 200px;\n }\n\n .google-pay-button.google-pay-button-static {\n width: auto;\n }\n\n /* Hover and focus states */\n .google-pay-button:hover:not(.disabled) {\n box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.15), 0 1px 3px 1px rgba(0, 0, 0, 0.30);\n }\n\n .google-pay-button:focus:not(.disabled) {\n box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.15), 0 1px 3px 1px rgba(0, 0, 0, 0.30);\n }\n\n .google-pay-button:active:not(.disabled) {\n box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.15), 0 1px 3px 1px rgba(0, 0, 0, 0.30);\n transform: translateY(1px);\n }\n\n /* Disabled state */\n .google-pay-button.disabled {\n opacity: 0.5;\n cursor: not-allowed;\n box-shadow: none;\n }\n\n .google-pay-button.disabled:hover,\n .google-pay-button.disabled:focus,\n .google-pay-button.disabled:active {\n box-shadow: none;\n transform: none;\n }\n\n /* Processing overlay */\n .processing-overlay {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n background: rgba(0, 0, 0, 0.8);\n color: white;\n border-radius: 4px;\n font-size: 14px;\n font-weight: 500;\n }\n\n .spinner {\n width: 16px;\n height: 16px;\n border: 2px solid rgba(255, 255, 255, 0.3);\n border-top: 2px solid #fff;\n border-radius: 50%;\n animation: spin 1s linear infinite;\n }\n\n @keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n\n /* Responsive design */\n @media (max-width: 480px) {\n .google-pay-button {\n width: 100% !important;\n min-width: 200px;\n }\n }\n ")),st=class{constructor(t){e(this,t),this.googlePayCancelled=i(this,"googlePayCancelled",7),this.googlePayCompleted=i(this,"googlePayCompleted",7),this.googlePayStarted=i(this,"googlePayStarted",7),this.unsubscribes=[],this.canMakePayments=!1,this.error=null,this.isAvailable=!1,this.isLoading=!0,this.isProcessing=!1,this.buttonSizeMode=m.FILL,this.buttonStyle=f.BLACK,this.buttonType=v.PLAIN,this.countryCode="US",this.disabled=!1,this.environment=M.PRODUCTION,this.merchantId="gateway:justifi",this.merchantName="justifi",this.showSkeleton=!0,this.handleGooglePayClick=async()=>{var t;if(!this.isProcessing&&!this.disabled&&this.isAvailable&&this.canMakePayments)try{this.isProcessing=!0,this.error=null,this.googlePayStarted.emit();const e=this.createPaymentDataRequest(),i=await this.googlePayService.startPaymentSession(e,p.authToken,p.accountId);i.success?this.googlePayCompleted.emit({success:!0,paymentData:i.paymentData,paymentMethodId:i.paymentMethodId}):(this.googlePayCompleted.emit({success:!1,error:i.error}),"USER_CANCELLED"===(null===(t=i.error)||void 0===t?void 0:t.code)&&this.googlePayCancelled.emit())}catch(t){const e=t instanceof Error?t.message:"Payment failed";this.error=e,this.googlePayCompleted.emit({success:!1,error:e})}finally{this.isProcessing=!1}}}watchConfigChange(){this.initializeGooglePay()}componentWillLoad(){this.googlePayService=new et}componentDidLoad(){const t=w("paymentAmount",(()=>{this.prefetchPaymentData()}));"function"==typeof t&&this.unsubscribes.push(t);const e=w("paymentCurrency",(()=>{this.prefetchPaymentData()}));"function"==typeof e&&this.unsubscribes.push(e);const i=w("paymentDescription",(()=>{this.prefetchPaymentData()}));"function"==typeof i&&this.unsubscribes.push(i)}disconnectedCallback(){this.unsubscribes.forEach((t=>{try{t()}catch(t){}})),this.unsubscribes=[]}async getSupportedAuthMethods(){return this.isAvailable?g.getDefaultAuthMethods():[]}async getSupportedNetworks(){return this.isAvailable?g.getDefaultSupportedNetworks():[]}async handleSelectionClick(){p.selectedPaymentMethod={type:I.GOOGLE_PAY}}async isSupported(){return this.isAvailable&&this.canMakePayments}async prefetchPaymentData(){if(!this.isAvailable||!this.canMakePayments)return;const t=this.createPaymentDataRequest();this.googlePayService.prefetchPaymentData(t)}async initializeGooglePay(){try{if(this.isLoading=!0,this.error=null,!p.paymentAmount)return this.error="Missing required Google Pay configuration",void(this.isLoading=!1);if(this.googlePayService.initialize({environment:this.environment,merchantId:this.merchantId,merchantName:this.merchantName,buttonType:this.buttonType,buttonStyle:this.buttonStyle,buttonSizeMode:this.buttonSizeMode}),this.isAvailable=this.googlePayService.isAvailable(),!this.isAvailable)return this.error="Google Pay is not supported on this device",void(this.isLoading=!1);if(this.canMakePayments=await this.googlePayService.canMakePayments(),!this.canMakePayments)return this.error="Google Pay is not available for payments",void(this.isLoading=!1);const t=this.createPaymentDataRequest();this.googlePayService.prefetchPaymentData(t)}catch(t){this.error=t instanceof Error?t.message:"Failed to initialize Google Pay"}finally{this.isLoading=!1}}createPaymentDataRequest(){return et.createPaymentDataRequest(p.paymentAmount,p.paymentDescription,this.countryCode,p.paymentCurrency,this.merchantName,this.merchantId)}render(){const e=!this.isLoading&&!!this.error,i=!this.isLoading&&!this.error&&!this.isAvailable,n=!this.isLoading&&!this.error&&this.isAvailable&&!this.canMakePayments,s=!this.isLoading&&!this.error&&this.isAvailable&&this.canMakePayments;return t(j,{key:"03db34814fb208f95cb962dac7bbf39a7f866009"},p.checkoutLoaded&&t("script",{key:"1e3f05585ba986de8fe31561e889395a263ef78d",async:!0,src:"https://pay.google.com/gp/p/js/pay.js",onLoad:()=>{this.initializeGooglePay()}}),t("div",{key:"dbc0bef2cc8ecc090a2e47c07857721777f2a4d0",class:"google-pay-container"},t(it,{key:"c8424c307933e7dff09f91789e5f360107ad9455",isLoading:this.isLoading}),e&&t("div",{key:"dc6809b02f90607f14c178adbdb55b146eb7c40d",class:"google-pay-error",role:"alert","data-testid":"gp-error"},t("span",{key:"5cbc697930caa6306d0a60dcbe47eb402f53787d",class:"error-icon"},"⚠️"),t("span",{key:"893a51db871fbb32a06c6bea5b58c46b48a1ab68",class:"error-message"},this.error)),i&&t("div",{key:"db1f743883ac3137172a298fdc8f5e0ed6b1c0be",class:"google-pay-unavailable","data-testid":"gp-device-unavailable"},t("span",{key:"5037803646e5a493cf7676a7d07918c265eabf4a",class:"unavailable-message"},"Google Pay is not available on this device")),n&&t("div",{key:"c7d519a57bf52b788b5e55ebb9ae229756f72316",class:"google-pay-unavailable","data-testid":"gp-payments-unavailable"},t("span",{key:"bfd35ea4231cef3d06191fccd0e42ed5d6779261",class:"unavailable-message"},"Google Pay is not available for payments")),s&&t(nt,{key:"f4888ea57c3ac49199ffb8e0b6d4c1ba6ba84ec3","data-testid":"gp-button",buttonType:this.buttonType,buttonStyle:this.buttonStyle,buttonSizeMode:this.buttonSizeMode,disabled:this.disabled,isProcessing:this.isProcessing,isAvailable:this.isAvailable,clickHandler:this.handleGooglePayClick})),t("style",{key:"620c1c8a982f52d7b7793ef5ce92587eb3ec3284"},"\n .google-pay-container {\n width: 100%;\n }\n\n .google-pay-error {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 12px;\n background: #fef2f2;\n border: 1px solid #fecaca;\n border-radius: 8px;\n color: #dc2626;\n font-size: 14px;\n }\n\n .google-pay-unavailable {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 12px;\n background: #f9fafb;\n border: 1px solid #e5e7eb;\n border-radius: 8px;\n color: #6b7280;\n font-size: 14px;\n }\n\n .error-icon {\n font-size: 16px;\n }\n \n "))}static get watchers(){return{merchantId:["watchConfigChange"],environment:["watchConfigChange"]}}},ot=class{constructor(t){e(this,t),this.levels={h1:L,h2:O,h3:U},this.level="h1"}render(){return t(j,{key:"b9dfbfab147a15030ec8b2cb39ccd1c476e7c0be"},t(this.levels[this.level],{key:"9ee20ed2fb2916a433cb158ce082505fbc367c4f",text:this.text,class:this.class}))}},at=o();class rt{async getLinkToken(t,e,i,n){return at.post({endpoint:`plaid/${e}/link`,body:{checkout_id:i},authToken:t,signal:n})}async tokenizeBankAccount(t,e,i,n,s,o){const a=`plaid/${e}/tokenize`,r={public_token:i};return n&&(r.link_token_id=n),s&&(r.payment_method_group_id=s),at.post({endpoint:a,body:r,authToken:t,signal:o})}}const lt=class{constructor(t){e(this,t),this.errorEvent=i(this,"error-event",7),this.submitEvent=i(this,"submit-event",7),this.checkoutChangedEvent=i(this,"checkout-changed",7),this.plaidService=new rt,this.handleGooglePayCompleted=t=>{const{success:e,paymentMethodId:i,error:n}=t.detail||{};e&&i?(p.paymentToken=i,p.selectedPaymentMethod={type:I.GOOGLE_PAY},this.submitCheckout()):this.errorEvent.emit({message:n&&n.message||"Google Pay payment failed",errorCode:F.TOKENIZE_ERROR,severity:Y.ERROR})},this.handleGooglePayCancelled=()=>{p.paymentToken=void 0,p.selectedPaymentMethod=void 0},this.handleApplePayCompleted=t=>{const{success:e,token:i,paymentMethodId:n,error:s}=t.detail;e&&i?(p.paymentToken=n,p.selectedPaymentMethod={type:I.APPLE_PAY},this.submitCheckout()):(console.error("Apple Pay completed but failed:",s),this.errorEvent.emit({message:(null==s?void 0:s.message)||"Apple Pay payment failed",errorCode:F.TOKENIZE_ERROR,severity:Y.ERROR}))},this.handleApplePayError=t=>{const{error:e,code:i}=t.detail;console.error("Apple Pay error:",e),this.errorEvent.emit({message:e||"Apple Pay error occurred",errorCode:`APPLE_PAY_${i}`,severity:Y.ERROR})},this.handleApplePayCancelled=()=>{p.paymentToken=void 0,p.selectedPaymentMethod=void 0}}connectedCallback(){this.observer=new MutationObserver((()=>{this.queryFormRefs(),this.setupApplePayListeners(),this.setupGooglePayListeners()})),this.observer.observe(this.hostEl,{childList:!0,subtree:!0}),p.checkoutId=this.checkoutId;const t={authToken:this.authToken,checkoutId:this.checkoutId,service:new q};this.getCheckout=(({authToken:t,checkoutId:e,service:i})=>async({onSuccess:n,onError:s})=>{var o;try{const a=await i.fetchCheckout(t,e);if(a.error)return s({error:Q(a.error),code:H(null===(o=a.error)||void 0===o?void 0:o.code),severity:Y.ERROR});n({checkout:a.data})}catch(t){const e=H(null==t?void 0:t.code);return s({error:t.message||t,code:e,severity:Y.ERROR})}})(t),this.completeCheckout=(({authToken:t,checkoutId:e,service:i})=>async({payment:n,onSuccess:s,onError:o})=>{var a;try{const r=await i.complete(t,e,n);if(r.error)return o({error:Q(r.error),code:H(null===(a=r.error)||void 0===a?void 0:a.code),severity:Y.ERROR});s({checkout:r.data})}catch(t){const e=H(null==t?void 0:t.code);return o({error:t.message||t,code:e,severity:Y.ERROR})}})(t),k((()=>{this.emitCheckoutChanged()}))}componentWillLoad(){this.analytics=new B(this),G(),p.authToken=this.authToken,this.fetchCheckout(),z("set",(t=>{const e=_[t];void 0!==e&&R(t,e)&&this.fetchCheckout()}))}componentDidLoad(){this.queryFormRefs(),this.setupApplePayListeners(),this.setupGooglePayListeners()}disconnectedCallback(){var t;null===(t=this.observer)||void 0===t||t.disconnect(),this.removeApplePayListeners(),this.removeGooglePayListeners()}fetchCheckout(){this.authToken&&this.checkoutId?this.getCheckout&&this.getCheckout({onSuccess:({checkout:t})=>{this.updateStore(t),t.status!==P.completed?t.status!==P.expired||this.errorEvent.emit({message:V.CHECKOUT_EXPIRED,errorCode:F.CHECKOUT_EXPIRED,severity:Y.ERROR}):this.errorEvent.emit({message:V.CHECKOUT_ALREADY_COMPLETED,errorCode:F.CHECKOUT_ALREADY_COMPLETED,severity:Y.ERROR})},onError:t=>{this.errorEvent.emit({message:t.message,errorCode:t.code,severity:t.severity})}}):this.errorEvent.emit({message:V.NOT_AUTHENTICATED,errorCode:F.NOT_AUTHENTICATED,severity:Y.ERROR})}updateStore(t){var e,i,n,s,o,a,r;p.accountId=t.account_id,p.checkoutLoaded=!0,p.paymentMethods=t.payment_methods.map((t=>new D(t))),p.paymentMethodGroupId=t.payment_method_group_id,p.paymentDescription=t.payment_description,p.totalAmount=t.total_amount,p.paymentAmount=t.payment_amount,p.bnplEnabled=t.payment_settings.bnpl_payments,p.insuranceEnabled=t.payment_settings.insurance_payments,p.bankAccountVerification=null===(e=t.payment_settings)||void 0===e?void 0:e.bank_account_verification,p.applePayEnabled=null===(i=t.payment_settings)||void 0===i?void 0:i.apple_payments,p.googlePayEnabled=null===(n=t.payment_settings)||void 0===n?void 0:n.google_payments,p.bnplProviderClientId=null===(s=null==t?void 0:t.bnpl)||void 0===s?void 0:s.provider_client_id,p.bnplProviderMode=null===(o=null==t?void 0:t.bnpl)||void 0===o?void 0:o.provider_mode,p.bnplProviderApiVersion=null===(a=null==t?void 0:t.bnpl)||void 0===a?void 0:a.provider_api_version,p.bnplProviderCheckoutUrl=null===(r=null==t?void 0:t.bnpl)||void 0===r?void 0:r.provider_checkout_url}emitCheckoutChanged(){const t={availablePaymentMethodTypes:x(),selectedPaymentMethod:p.selectedPaymentMethod,savedPaymentMethods:p.paymentMethods};this.checkoutChangedEvent.emit(t)}queryFormRefs(){this.billingFormRef=this.hostEl.querySelector("justifi-billing-form, justifi-bank-account-billing-form-simple, justifi-card-billing-form-simple, justifi-billing-form-full"),this.applePayRef=this.hostEl.querySelector("justifi-apple-pay"),this.googlePayRef=this.hostEl.querySelector("justifi-google-pay"),this.paymentMethodFormRef=this.hostEl.querySelector("justifi-card-form, justifi-bank-account-form, justifi-tokenize-payment-method"),this.insuranceFormRef=this.hostEl.querySelector("justifi-season-interruption-insurance")}setupApplePayListeners(){this.applePayRef&&(this.applePayRef.addEventListener("applePayCompleted",this.handleApplePayCompleted),this.applePayRef.addEventListener("applePayError",this.handleApplePayError),this.applePayRef.addEventListener("applePayCancelled",this.handleApplePayCancelled))}removeApplePayListeners(){this.applePayRef&&(this.applePayRef.removeEventListener("applePayCompleted",this.handleApplePayCompleted),this.applePayRef.removeEventListener("applePayError",this.handleApplePayError),this.applePayRef.removeEventListener("applePayCancelled",this.handleApplePayCancelled))}setupGooglePayListeners(){this.googlePayRef&&(this.googlePayRef.addEventListener("googlePayCompleted",this.handleGooglePayCompleted),this.googlePayRef.addEventListener("googlePayCancelled",this.handleGooglePayCancelled))}removeGooglePayListeners(){this.googlePayRef&&(this.googlePayRef.removeEventListener("googlePayCompleted",this.handleGooglePayCompleted),this.googlePayRef.removeEventListener("googlePayCancelled",this.handleGooglePayCancelled))}async tokenizePaymentMethod(t){var e,i,n;const s=null!==(i=await(null===(e=this.billingFormRef)||void 0===e?void 0:e.getValues()))&&void 0!==i?i:{},o=Object.assign(Object.assign({},t),s),a=Object.assign({accountId:p.accountId,payment_method_group_id:void 0},o);p.savePaymentMethod&&(a.payment_method_group_id=p.paymentMethodGroupId);const r=await(null===(n=this.paymentMethodFormRef)||void 0===n?void 0:n.tokenize({clientId:this.authToken,paymentMethodMetadata:a,account:p.accountId}));return r.error?r:(p.paymentToken=r.id,r.id)}async setSelectedPaymentMethod(t){p.selectedPaymentMethod=t,p.paymentToken=t.id||void 0}async validate(){var t,e;const i=[];p.insuranceEnabled&&this.insuranceFormRef&&i.push(this.insuranceFormRef.validate());const n=(null===(t=p.selectedPaymentMethod)||void 0===t?void 0:t.type)===I.NEW_CARD,s=(null===(e=p.selectedPaymentMethod)||void 0===e?void 0:e.type)===I.NEW_BANK_ACCOUNT;if((n||s)&&(this.paymentMethodFormRef&&i.push(this.paymentMethodFormRef.validate()),this.billingFormRef&&i.push(this.billingFormRef.validate())),0===i.length)return!0;try{return!!(await Promise.all(i)).every((t=>"boolean"==typeof t?t:!1!==(null==t?void 0:t.isValid)))||(this.errorEvent.emit({message:"Validation error",errorCode:F.VALIDATION_ERROR,severity:Y.ERROR}),!1)}catch(t){return!1}}async submitCheckout(t){var e,i,n,s,o;const a=await this.validate();if(!p.selectedPaymentMethod)return void this.errorEvent.emit({message:"No payment method selected.",errorCode:F.VALIDATION_ERROR,severity:Y.ERROR});const r=(null===(e=p.selectedPaymentMethod)||void 0===e?void 0:e.type)===I.NEW_CARD,l=(null===(i=p.selectedPaymentMethod)||void 0===i?void 0:i.type)===I.NEW_BANK_ACCOUNT,c=(null===(n=p.selectedPaymentMethod)||void 0===n?void 0:n.type)===I.PLAID;if(r||l){const e=await this.tokenizePaymentMethod(t);if(null==e?void 0:e.error)return void this.errorEvent.emit({message:e.error.message,errorCode:F.TOKENIZE_ERROR,severity:Y.ERROR})}if(c&&!p.paymentToken){const t=p.plaidPublicToken,e=p.plaidLinkTokenId;if(!t)return void this.errorEvent.emit({message:"Missing Plaid public token. Please connect your bank.",errorCode:F.TOKENIZE_ERROR,severity:Y.ERROR});try{const i=await this.plaidService.tokenizeBankAccount(p.authToken,p.accountId,t,e||void 0,p.savePaymentMethod?p.paymentMethodGroupId:void 0);if(null==i?void 0:i.error)return void this.errorEvent.emit({message:"string"==typeof i.error?i.error:i.error.message||"Failed to tokenize bank account",errorCode:F.TOKENIZE_ERROR,severity:Y.ERROR});const n=null==i?void 0:i.data,o=(null===(s=null==n?void 0:n.bank_account)||void 0===s?void 0:s.token)||(null==n?void 0:n.token)||(null==n?void 0:n.id);p.paymentToken=o}catch(t){return void this.errorEvent.emit({message:(null==t?void 0:t.message)||"Plaid exchange error",errorCode:F.TOKENIZE_ERROR,severity:Y.ERROR})}}if(!a)return void this.errorEvent.emit({message:"Please fill in all required fields.",errorCode:F.VALIDATION_ERROR,severity:Y.ERROR});if(!p.paymentToken)return void this.errorEvent.emit({message:"Payment token not found.",errorCode:F.TOKENIZE_ERROR,severity:Y.ERROR});let h;if(h={payment_mode:(t=>{switch(t){case I.NEW_CARD:case I.SAVED_CARD:case I.NEW_BANK_ACCOUNT:case I.SAVED_BANK_ACCOUNT:case I.PLAID:return S.ECOM;case I.SEZZLE:return S.BNPL;case I.APPLE_PAY:return S.APPLE_PAY;case I.GOOGLE_PAY:return S.GOOGLE_PAY;default:return}})(null===(o=p.selectedPaymentMethod)||void 0===o?void 0:o.type),payment_token:p.paymentToken},this.preCompleteHook){const t=E();try{await new Promise(((e,i)=>{this.preCompleteHook(t,(()=>e()),(()=>i()))}))}catch(t){return void console.log("Checkout cancelled by preCompleteHook",t)}}this.completeCheckout({payment:h,onSuccess:({checkout:t})=>{this.submitEvent.emit({checkout:t,message:"Checkout completed successfully"})},onError:t=>{this.errorEvent.emit({message:t.message,errorCode:F.COMPLETE_CHECKOUT_ERROR,severity:Y.ERROR})}})}render(){return t(n,{key:"ee341d8d78767a80e2627ea5244ba46ca63cd8df"})}get hostEl(){return s(this)}};var ct;!function(t){t.PLAID_SDK_LOAD_FAILED="plaid-sdk-load-failed",t.PLAID_LINK_INIT_FAILED="plaid-link-init-failed",t.PLAID_LINK_TOKEN_FAILED="plaid-link-token-failed",t.PLAID_AUTHENTICATION_FAILED="plaid-authentication-failed",t.PLAID_BANK_NOT_SUPPORTED="plaid-bank-not-supported",t.PLAID_TOKEN_EXPIRED="plaid-token-expired",t.PLAID_NETWORK_ERROR="plaid-network-error",t.PLAID_USER_CANCELLED="plaid-user-cancelled",t.PLAID_TIMEOUT="plaid-timeout",t.PLAID_INVALID_CREDENTIALS="plaid-invalid-credentials",t.PLAID_ACCOUNT_LOCKED="plaid-account-locked",t.PLAID_MAINTENANCE="plaid-maintenance",t.PLAID_RATE_LIMITED="plaid-rate-limited"}(ct||(ct={}));const ht={[ct.PLAID_SDK_LOAD_FAILED]:"Unable to load Plaid. Please refresh the page and try again.",[ct.PLAID_LINK_INIT_FAILED]:"Unable to initialize bank connection. Please try again.",[ct.PLAID_LINK_TOKEN_FAILED]:"Unable to connect to bank service. Please try again.",[ct.PLAID_AUTHENTICATION_FAILED]:"Bank authentication failed. Please try again.",[ct.PLAID_BANK_NOT_SUPPORTED]:"Your bank is not currently supported. Please try a different payment method.",[ct.PLAID_TOKEN_EXPIRED]:"Your bank session has expired. Please reconnect your account.",[ct.PLAID_NETWORK_ERROR]:"Network connection issue. Please check your internet connection and try again.",[ct.PLAID_USER_CANCELLED]:"Bank connection was cancelled. Click to try again.",[ct.PLAID_TIMEOUT]:"Bank connection timed out. Please try again.",[ct.PLAID_INVALID_CREDENTIALS]:"Invalid bank credentials. Please check your username and password.",[ct.PLAID_ACCOUNT_LOCKED]:"Your bank account is temporarily locked. Please contact your bank.",[ct.PLAID_MAINTENANCE]:"Bank service is temporarily unavailable. Please try again later.",[ct.PLAID_RATE_LIMITED]:"Too many connection attempts. Please wait a moment and try again."},dt={[ct.PLAID_SDK_LOAD_FAILED]:Y.ERROR,[ct.PLAID_LINK_INIT_FAILED]:Y.ERROR,[ct.PLAID_LINK_TOKEN_FAILED]:Y.ERROR,[ct.PLAID_AUTHENTICATION_FAILED]:Y.ERROR,[ct.PLAID_BANK_NOT_SUPPORTED]:Y.WARNING,[ct.PLAID_TOKEN_EXPIRED]:Y.WARNING,[ct.PLAID_NETWORK_ERROR]:Y.WARNING,[ct.PLAID_USER_CANCELLED]:Y.INFO,[ct.PLAID_TIMEOUT]:Y.WARNING,[ct.PLAID_INVALID_CREDENTIALS]:Y.ERROR,[ct.PLAID_ACCOUNT_LOCKED]:Y.ERROR,[ct.PLAID_MAINTENANCE]:Y.WARNING,[ct.PLAID_RATE_LIMITED]:Y.WARNING},pt=class{constructor(t){e(this,t),this.paymentMethodOptionSelected=i(this,"paymentMethodOptionSelected",7),this.plaidError=i(this,"plaidError",7),this.plaidErrorRecovered=i(this,"plaidErrorRecovered",7),this.isAuthenticating=!1,this.publicToken=null,this.linkToken=null,this.linkTokenId=null,this.error=null,this.plaidLink=null,this.isSelected=!1,this.retryCount=0,this.isRetrying=!1,this.plaidService=new rt,this.maxRetries=3,this.retryDelay=2e3,this.timeoutId=null,this.abortController=null,this.hasLoggedDisabledWarning=!1,this.waitForStoreAndInitialize=()=>{p.authToken&&p.accountId&&p.checkoutId?this.initializePlaidLink():setTimeout((()=>{this.waitForStoreAndInitialize()}),100)},this.initializePlaidLink=async()=>{try{if(void 0===window.Plaid)return void this.handleError({code:ct.PLAID_SDK_LOAD_FAILED,message:ht[ct.PLAID_SDK_LOAD_FAILED],severity:dt[ct.PLAID_SDK_LOAD_FAILED],retryable:!0,userAction:"Refresh the page and try again"});if(await this.getLinkToken(),!this.linkToken)return void this.handleError({code:ct.PLAID_LINK_TOKEN_FAILED,message:ht[ct.PLAID_LINK_TOKEN_FAILED],severity:dt[ct.PLAID_LINK_TOKEN_FAILED],retryable:!0,userAction:"Click to try again"});const t=window.Plaid;this.plaidLink=t.create({token:this.linkToken,onSuccess:this.handlePlaidSuccess,onExit:this.handlePlaidExit,onEvent:this.handlePlaidEvent,onLoad:this.handlePlaidLoad})}catch(t){this.handleError({code:ct.PLAID_LINK_INIT_FAILED,message:ht[ct.PLAID_LINK_INIT_FAILED],severity:dt[ct.PLAID_LINK_INIT_FAILED],originalError:t,retryable:!0,userAction:"Click to try again"})}},this.getLinkToken=async()=>{var t,e,i,n,s;try{if(!p.authToken||!p.accountId)return void this.handleError({code:ct.PLAID_LINK_TOKEN_FAILED,message:"Missing authentication. Please refresh the page and try again.",severity:Y.ERROR,retryable:!1,userAction:"Refresh the page"});this.abortController=new AbortController,this.timeoutId=setTimeout((()=>{var t;null===(t=this.abortController)||void 0===t||t.abort()}),3e4);const e=await this.plaidService.getLinkToken(p.authToken,p.accountId,p.checkoutId,this.abortController.signal);if(this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null),e.error)throw new Error("string"==typeof e.error?e.error:e.error.message||"Failed to get link token");this.linkToken=e.data.link_token,this.linkTokenId=(null==e?void 0:e.id)||(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.id)||null,this.linkTokenId&&(p.plaidLinkTokenId=this.linkTokenId)}catch(t){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null);let o=ct.PLAID_LINK_TOKEN_FAILED,a=ht[o],r=!0;"AbortError"===t.name?(o=ct.PLAID_TIMEOUT,a=ht[o],r=!0):(null===(e=t.message)||void 0===e?void 0:e.includes("network"))||(null===(i=t.message)||void 0===i?void 0:i.includes("fetch"))?(o=ct.PLAID_NETWORK_ERROR,a=ht[o],r=!0):((null===(n=t.message)||void 0===n?void 0:n.includes("401"))||(null===(s=t.message)||void 0===s?void 0:s.includes("unauthorized")))&&(o=ct.PLAID_INVALID_CREDENTIALS,a="Authentication failed. Please refresh the page and try again.",r=!1),this.handleError({code:o,message:a,severity:dt[o],originalError:t,retryable:r,userAction:r?"Click to try again":"Refresh the page"})}},this.mapApiErrorToPlaidError=t=>{if("string"==typeof t){if(t.includes("rate_limit"))return ct.PLAID_RATE_LIMITED;if(t.includes("maintenance"))return ct.PLAID_MAINTENANCE;if(t.includes("not_authenticated"))return ct.PLAID_INVALID_CREDENTIALS}if(null==t?void 0:t.code)switch(t.code){case"rate_limited":return ct.PLAID_RATE_LIMITED;case"maintenance":return ct.PLAID_MAINTENANCE;case"not_authenticated":return ct.PLAID_INVALID_CREDENTIALS;default:return ct.PLAID_LINK_TOKEN_FAILED}return ct.PLAID_LINK_TOKEN_FAILED},this.openPlaidLink=()=>{this.plaidLink&&this.linkToken&&(this.isAuthenticating=!0,this.clearError(),this.plaidLink.open())},this.handlePlaidSuccess=t=>{this.publicToken=t,this.isAuthenticating=!1,this.clearError(),this.retryCount=0,this.isSelected||(this.isSelected=!0,p.selectedPaymentMethod={type:I.PLAID}),this.plaidErrorRecovered.emit({code:"plaid-success",message:"Bank account connected successfully",severity:Y.INFO}),p.plaidPublicToken=t},this.handlePlaidExit=t=>{this.isAuthenticating=!1,t&&this.handlePlaidError(t)},this.handlePlaidEvent=(t,e)=>{switch(t){case"OPEN":this.isAuthenticating=!0;break;case"CLOSE":this.isAuthenticating=!1;break;case"ERROR":this.handlePlaidError(e)}},this.handlePlaidLoad=()=>{},this.handlePlaidError=t=>{let e=ct.PLAID_AUTHENTICATION_FAILED,i=ht[e],n=!0,s="Click to try again";if(t.error_code)switch(t.error_code){case"INVALID_CREDENTIALS":e=ct.PLAID_INVALID_CREDENTIALS,i=ht[e],n=!0;break;case"ITEM_LOGIN_REQUIRED":e=ct.PLAID_INVALID_CREDENTIALS,i="Your bank requires re-authentication. Please try again.",n=!0;break;case"ITEM_LOCKED":e=ct.PLAID_ACCOUNT_LOCKED,i=ht[e],n=!1,s="Contact your bank";break;case"INSTITUTION_NOT_RESPONDING":e=ct.PLAID_MAINTENANCE,i=ht[e],n=!0;break;case"RATE_LIMIT_EXCEEDED":e=ct.PLAID_RATE_LIMITED,i=ht[e],n=!0;break;case"INVALID_REQUEST":e=ct.PLAID_AUTHENTICATION_FAILED,i="Invalid request. Please try again.",n=!0;break;case"PLAID_ERROR":e=ct.PLAID_AUTHENTICATION_FAILED,i=t.error_message||"Bank authentication failed. Please try again.",n=!0;break;default:t.error_message&&(i=t.error_message)}if(t.error_message){const o=t.error_message.toLowerCase();o.includes("not supported")||o.includes("unsupported")?(e=ct.PLAID_BANK_NOT_SUPPORTED,i=ht[e],n=!1,s="Try a different payment method"):(o.includes("expired")||o.includes("timeout"))&&(e=ct.PLAID_TOKEN_EXPIRED,i=ht[e],n=!0)}this.handleError({code:e,message:i,severity:dt[e],originalError:t,retryable:n,userAction:s}),this.isAuthenticating=!1},this.handleError=t=>{this.error=t,this.plaidError.emit({code:t.code,message:t.message,severity:t.severity,data:{originalError:t.originalError,retryable:t.retryable,userAction:t.userAction,retryCount:this.retryCount}}),console.error("Plaid error:",t),t.retryable&&this.retryCount<this.maxRetries&&this.scheduleRetry()},this.scheduleRetry=()=>{this.isRetrying||(this.isRetrying=!0,this.retryCount++,setTimeout((()=>{this.isRetrying=!1,this.clearError(),this.waitForStoreAndInitialize()}),this.retryDelay*this.retryCount))},this.clearError=()=>{this.error&&(this.error=null,this.retryCount=0)},this.syncWithStore=()=>{var t;const e=(null===(t=p.selectedPaymentMethod)||void 0===t?void 0:t.type)===I.PLAID;this.isSelected!==e&&(this.isSelected=e)}}onSelectionChange(t){var e;t&&(null===(e=p.selectedPaymentMethod)||void 0===e?void 0:e.type)!==I.PLAID&&(p.selectedPaymentMethod={type:I.PLAID}),!t||!this.plaidLink||this.publicToken||this.isAuthenticating||this.error||this.openPlaidLink()}componentDidRender(){this.scriptRef&&(this.scriptRef.onload=()=>{this.waitForStoreAndInitialize()},this.scriptRef.onerror=()=>{this.handleError({code:ct.PLAID_SDK_LOAD_FAILED,message:ht[ct.PLAID_SDK_LOAD_FAILED],severity:dt[ct.PLAID_SDK_LOAD_FAILED],retryable:!0,userAction:"Refresh the page and try again"})})}componentWillLoad(){var t;this.isSelected=(null===(t=p.selectedPaymentMethod)||void 0===t?void 0:t.type)===I.PLAID}async resolvePaymentMethod(){return this.publicToken?{token:this.publicToken,data:{type:"bank_account",plaid_public_token:this.publicToken}}:{validationError:!0}}async getPaymentToken(){return p.paymentToken}async handleSelectionClick(){if(this.isSelected=!0,p.selectedPaymentMethod={type:I.PLAID},this.error)return this.clearError(),void this.waitForStoreAndInitialize();!this.plaidLink||this.publicToken||this.isAuthenticating||this.openPlaidLink()}async setSelected(t){this.isSelected=t,t&&(p.selectedPaymentMethod={type:I.PLAID})}async isCurrentlySelected(){return this.isSelected}async deselect(){this.isSelected=!1}async reset(){this.publicToken=null,this.clearError(),this.isAuthenticating=!1,this.linkToken=null,this.plaidLink=null,this.retryCount=0,this.isRetrying=!1,this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null),this.abortController&&(this.abortController.abort(),this.abortController=null)}async isReadyForAuthentication(){return!(!this.plaidLink||!this.linkToken||this.isAuthenticating)}async retry(){this.error&&this.error.retryable&&(this.clearError(),this.waitForStoreAndInitialize())}async getErrorInfo(){return this.error}componentDidLoad(){const t=w("selectedPaymentMethod",this.syncWithStore);this.unsubscribeFromStore=t}disconnectedCallback(){this.unsubscribeFromStore&&this.unsubscribeFromStore(),this.timeoutId&&clearTimeout(this.timeoutId),this.abortController&&this.abortController.abort()}render(){if(!0!==p.bankAccountVerification)return this.hasLoggedDisabledWarning||(console.warn("[PlaidPaymentMethod] bank_account_verification is disabled. Component will not render."),this.hasLoggedDisabledWarning=!0),null;const e=t("img",{class:"plaid-logo-img",src:"data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ4IiB2aWV3Qm94PSIwIDAgMjggMjkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgY2xhc3M9ImNzcy0xcmRhajhtIj48ZyBmaWxsPSIjMTExIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yNS43NjI5IDI2LjI2MjhMMjggMTcuNTMwOUwyNC45NjkxIDE0LjUwMDFMMjcuOTk5OSAxMS40NjkxTDI1Ljc2MjggMi43MzcwNkwxNy4wMzA5IDAuNUwxNC4wMDAxIDMuNTMxTDEwLjk2OSAwLjUwMDE0TDIuMjM3MDYgMi43MzczNEwwIDExLjQ2OTFMMy4wMzEyOCAxNC40OTk5TDAuMDAwMTQgMTcuNTMxTDIuMjM3MiAyNi4yNjI5TDEwLjk2OTEgMjguNUwxNC4wMDAxIDI1LjQ2OUwxNy4wMzEgMjguNDk5OUwyNS43NjI5IDI2LjI2MjhaTTE1LjczMjEgMjMuNzM3MUwxOC42MTg2IDIwLjg1MDVMMjIuMjkxMiAyNC41MjMzTDE3LjY5NTYgMjUuNzAwN0wxNS43MzIxIDIzLjczNzFaTTExLjExMzYgOS44ODE1NEwxNC4wMDAzIDYuOTk1MDJMMTYuODg2OCA5Ljg4MTRMMTQuMDAwMSAxMi43Njc5TDExLjExMzYgOS44ODE1NFpNMTIuMjY4MiAxNC41TDkuMzgxNTQgMTcuMzg2NUw2LjQ5NTAyIDE0LjVMOS4zODE1NCAxMS42MTM1TDEyLjI2ODIgMTQuNVpNMTguNjE4NyAxMS42MTMzTDIxLjUwNTMgMTQuNUwxOC42MTg2IDE3LjM4NjVMMTUuNzMyMSAxNC41TDE4LjYxODcgMTEuNjEzM1pNMTYuODg2NyAxOS4xMTg2TDE0LjAwMDEgMjIuMDA1MUwxMS4xMTM1IDE5LjExODVMMTQuMDAwMSAxNi4yMzE5TDE2Ljg4NjcgMTkuMTE4NlpNMTAuMzA0NCAyNS43MDA3TDUuNzA4NjQgMjQuNTIzM0w5LjM4MTU0IDIwLjg1MDRMMTIuMjY4MiAyMy43MzcxTDEwLjMwNDQgMjUuNzAwN1pNNC43NjMwOCAxNi4yMzE5TDcuNjQ5NiAxOS4xMTg1TDMuOTc2NyAyMi43OTE0TDIuNzk5MyAxOC4xOTU3TDQuNzYzMDggMTYuMjMxOVpNMy45NzY3IDYuMjA4MzZMNy42NDk3NCA5Ljg4MTRMNC43NjMwOCAxMi43NjgxTDIuNzk5MyAxMC44MDQxTDMuOTc2NyA2LjIwODM2Wk0xMi4yNjgzIDUuMjYyOTRMOS4zODE2OCA4LjE0OTZMNS43MDg5MiA0LjQ3NjdMMTAuMzA0NyAzLjI5OTNMMTIuMjY4MyA1LjI2Mjk0Wk0xNy42OTU5IDMuMjk5M0wyMi4yOTE1IDQuNDc2N0wxOC42MTg2IDguMTQ5NDZMMTUuNzMyMSA1LjI2Mjk0TDE3LjY5NTkgMy4yOTkzWk0yMy4yMzcyIDEyLjc2ODFMMjAuMzUwNSA5Ljg4MTRMMjQuMDIzMyA2LjIwODc4TDI1LjIwMDcgMTAuODA0NkwyMy4yMzcyIDEyLjc2ODFaTTI0LjAyMzMgMjIuNzkxNEwyMC4zNTA1IDE5LjExODZMMjMuMjM3MiAxNi4yMzIxTDI1LjIwMDcgMTguMTk1N0wyNC4wMjMzIDIyLjc5MTRaIj48L3BhdGg+PC9nPjwvc3ZnPgo=",alt:"Plaid",title:"Plaid",style:{display:"inline",width:"20px",height:"20px",marginLeft:"5px",marginTop:"-2px"}});return t(j,{class:"payment-method"},t("script",{src:"https://cdn.plaid.com/link/v2/stable/link-initialize.js",async:!0,ref:t=>this.scriptRef=t}),t("div",{title:"Pay with Plaid"},t("div",{onClick:t=>{t.preventDefault(),this.handleSelectionClick()}},"Pay with Bank Account ",e," "),(()=>this.error?t("div",{class:(this.error.severity===Y.ERROR?"text-danger":this.error.severity===Y.WARNING?"text-warning":"text-info")+" mt-2"},t("small",null,this.error.message),t("br",null),t("small",{class:"text-muted"},this.error.userAction,this.error.retryable&&this.retryCount<this.maxRetries&&t("span",null," • Auto-retry in progress..."))):null)(),(()=>this.error?null:this.isAuthenticating?t("div",{class:"text-info mt-2"},t("small",null,"Connecting to your bank...")):this.publicToken?t("div",{class:"text-success mt-2"},t("small",null,"✓ Bank account connected successfully")):!this.isSelected||this.publicToken||this.error||this.isAuthenticating?null:t("div",{class:"text-muted mt-2"},t("small",null,"Click to connect your bank account")))()))}static get watchers(){return{isSelected:["onSelectionChange"]}}},ut=class{constructor(t){e(this,t),this.onPaymentMethodOptionClick=t=>e=>{e.preventDefault(),p.selectedPaymentMethod={id:t.id,type:t.type},p.paymentToken=t.id},this.isAllowedPaymentMethod=t=>!(t===I.SAVED_CARD&&p.disableCreditCard||t===I.SAVED_BANK_ACCOUNT&&p.disableBankAccount)}componentWillLoad(){p.paymentMethods.length||console.warn("No saved payment methods available."),p.disablePaymentMethodGroup&&console.warn("Payment method group is disabled.")}render(){return p.disablePaymentMethodGroup?null:t(j,null,t("div",{class:"saved-payment-methods"},p.paymentMethods.length?p.paymentMethods.filter((t=>this.isAllowedPaymentMethod(t.type))).map((e=>t("div",{class:"radio-list-item p-3",part:N,onClick:this.onPaymentMethodOptionClick(e)},t("form-control-radio",{name:"paymentMethodType",value:null==e?void 0:e.id,checked:p.paymentToken===(null==e?void 0:e.id),label:`${Z[null==e?void 0:e.brand]||""} *${null==e?void 0:e.acct_last_four}`})))):null))}},yt=t("img",{class:"sezzle-smart-button-logo-img",src:"https://media.sezzle.com/branding/2.0/Sezzle_Logo_FullColor.svg",alt:"Sezzle",style:{display:"inline",width:"80px",marginLeft:"5px",marginTop:"-5px"}}),gt=class{constructor(t){e(this,t),this.paymentMethodOptionSelected=i(this,"paymentMethodOptionSelected",7),this.paymentMethodOptionId=I.SEZZLE,this.initializeSezzleCheckout=()=>{let t;this.sezzlePromise=new Promise((e=>{t=e}));const e=Number(p.paymentAmount),i=new(0,window.Checkout)({mode:"popup",publicKey:p.bnplProviderClientId,apiMode:p.bnplProviderMode,apiVersion:p.bnplProviderApiVersion});i.sezzleButtonElement=this.sezzleButtonRef,i.init({onClick:function(t){t.preventDefault(),i.startCheckout({checkout_url:p.bnplProviderCheckoutUrl})},onComplete:e=>t({bnpl:e.data}),onCancel:e=>t({bnpl:e.data}),onFailure:e=>t({bnpl:e.data})}),this.sezzleCheckout=i,this.installmentPlan=this.sezzleCheckout.getInstallmentPlan(e)}}componentDidRender(){this.scriptRef&&(this.scriptRef.onload=()=>{this.sezzleButtonRef=document.createElement("button"),this.initializeSezzleCheckout()})}async resolvePaymentMethod(t){return t.isValid?(this.sezzleButtonRef.click(),this.sezzlePromise):{validationError:!0}}async handleSelectionClick(){p.selectedPaymentMethod={type:I.SEZZLE},this.paymentMethodOptionSelected.emit(this.paymentMethodOptionId)}render(){var e,i;return p.bnplEnabled?t(j,{class:"payment-method"},t("script",{src:"https://checkout-sdk.sezzle.com/checkout.min.js",async:!0,ref:t=>this.scriptRef=t}),t("div",null,t("div",null,"Buy now, pay later with ",yt),this.installmentPlan&&t("small",null,t("span",null,null===(e=this.installmentPlan)||void 0===e?void 0:e.installments.length)," ",t("span",null,this.installmentPlan.schedule," payments of")," ",t("span",{class:"fw-bold"},C(null===(i=this.installmentPlan)||void 0===i?void 0:i.installments[0].amountInCents))))):(console.warn("justifi-sezzle-payment-method: BNPL is not enabled for this account."),null)}};export{K as justifi_apple_pay,tt as justifi_checkout_summary,st as justifi_google_pay,ot as justifi_header,lt as justifi_modular_checkout,pt as justifi_plaid_payment_method,ut as justifi_saved_payment_methods,gt as justifi_sezzle_payment_method}
@@ -1 +0,0 @@
1
- import{A as t}from"./p-y8av3w9x.js";import"./p-Cjcsf8ku.js";import"./p-DpkIbI5R.js";import"./p-CLHwhyvu.js";import"./p-CHJTjG_5.js";import"./p-BH0Xfn-F.js";const n=t();class a{async fetchPayments(t,a,s){return n.get({endpoint:`account/${t}/payments`,params:s,authToken:a})}async fetchPayment(t,a){return n.get({endpoint:`payments/${t}`,authToken:a})}async fetchPaymentTransactions(t,a,s){return n.get({endpoint:`payments/${t}/payment_balance_transactions`,params:s,authToken:a})}}export{a as P}