@justifi/webcomponents 6.4.0 → 6.4.2

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 (337) hide show
  1. package/dist/cjs/bank-account-document-form-inputs_6.cjs.entry.js +2 -2
  2. package/dist/cjs/{check-pkg-version-BO_NdUB_.js → check-pkg-version-goSFbVFL.js} +1 -1
  3. package/dist/cjs/custom-popper.cjs.entry.js +2 -2
  4. package/dist/cjs/form-control-file-v2_2.cjs.entry.js +3 -3
  5. package/dist/cjs/form-control-monetary.cjs.entry.js +2 -2
  6. package/dist/cjs/form-control-number-masked_3.cjs.entry.js +2 -2
  7. package/dist/cjs/form-control-number.cjs.entry.js +2 -2
  8. package/dist/cjs/form-control-radio.cjs.entry.js +2 -2
  9. package/dist/cjs/form-control-select_3.cjs.entry.js +2 -2
  10. package/dist/cjs/hidden-input_2.cjs.entry.js +5 -5
  11. package/dist/cjs/{justifi-bank-account-billing-form-simple_9.cjs.entry.js → internal-tokenize-payment-method_7.cjs.entry.js} +254 -138
  12. package/dist/cjs/{justifi-apple-pay_8.cjs.entry.js → justifi-apple-pay_7.cjs.entry.js} +3 -258
  13. package/dist/cjs/justifi-bank-account-billing-form-simple_3.cjs.entry.js +147 -0
  14. package/dist/cjs/justifi-business-details.cjs.entry.js +2 -2
  15. package/dist/cjs/justifi-business-form.cjs.entry.js +2 -2
  16. package/dist/cjs/justifi-checkout.cjs.entry.js +4 -4
  17. package/dist/cjs/justifi-checkouts-list.cjs.entry.js +2 -2
  18. package/dist/cjs/justifi-dispute-management.cjs.entry.js +2 -2
  19. package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +2 -2
  20. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +2 -2
  21. package/dist/cjs/justifi-order-terminals.cjs.entry.js +2 -2
  22. package/dist/cjs/justifi-payment-details.cjs.entry.js +2 -2
  23. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +2 -2
  24. package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +2 -2
  25. package/dist/cjs/justifi-payments-list.cjs.entry.js +2 -2
  26. package/dist/cjs/justifi-payout-details.cjs.entry.js +2 -2
  27. package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +2 -2
  28. package/dist/cjs/justifi-payouts-list.cjs.entry.js +2 -2
  29. package/dist/cjs/justifi-refund-payment.cjs.entry.js +2 -2
  30. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +2 -2
  31. package/dist/cjs/justifi-skeleton.cjs.entry.js +1 -1
  32. package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +2 -2
  33. package/dist/cjs/justifi-terminals-list.cjs.entry.js +2 -2
  34. package/dist/cjs/justifi-tokenize-payment-method.cjs.entry.js +24 -0
  35. package/dist/cjs/loader.cjs.js +1 -1
  36. package/dist/cjs/{package-CvqCkafe.js → package-jZDXnKmY.js} +1 -1
  37. package/dist/cjs/webcomponents.cjs.js +1 -1
  38. package/dist/collection/collection-manifest.json +1 -0
  39. package/dist/collection/components/checkout/checkout.js +2 -2
  40. package/dist/collection/components/tokenize-payment-method/internal-tokenize-payment-method.js +626 -0
  41. package/dist/collection/components/tokenize-payment-method/tokenize-payment-method.js +25 -355
  42. package/dist/collection/ui-components/custom-popper/custom-popper.js +2 -2
  43. package/dist/collection/ui-components/form/form-control-file-v2.js +1 -1
  44. package/dist/collection/ui-components/form/form-control-file.js +2 -2
  45. package/dist/collection/ui-components/form/form-control-monetary.js +2 -2
  46. package/dist/collection/ui-components/form/form-control-number-masked.js +2 -2
  47. package/dist/collection/ui-components/form/form-control-number.js +2 -2
  48. package/dist/collection/ui-components/form/form-control-radio.js +2 -2
  49. package/dist/collection/ui-components/form/form-control-text.js +2 -2
  50. package/dist/collection/ui-components/form/form-control-textarea.js +2 -2
  51. package/dist/collection/ui-components/form/hidden-input.js +1 -1
  52. package/dist/collection/ui-components/form/iframe-input.js +3 -3
  53. package/dist/collection/ui-components/shadow-dom-components/justifi-button.js +1 -1
  54. package/dist/collection/ui-components/shadow-dom-components/justifi-header.js +1 -1
  55. package/dist/collection/ui-components/shadow-dom-components/justifi-skeleton.js +1 -1
  56. package/dist/docs.json +546 -117
  57. package/dist/esm/additional-questions-details_5.entry.js +2 -2
  58. package/dist/esm/{badge-BkjjtNUQ.js → badge-Bgosx-DC.js} +1 -1
  59. package/dist/esm/bank-account-document-form-inputs_6.entry.js +5 -5
  60. package/dist/esm/bank-account-form.entry.js +2 -2
  61. package/dist/esm/{business-additional-questions-schema-hZ6O6Bs0.js → business-additional-questions-schema-QFJEOHF5.js} +1 -1
  62. package/dist/esm/business-details-core.entry.js +3 -3
  63. package/dist/esm/{business-identity-schema-DJvIo0oa.js → business-identity-schema-DB_Hhjld.js} +1 -1
  64. package/dist/esm/{button-DHljyr0K.js → button-DBmjN7Ra.js} +1 -1
  65. package/dist/esm/card-form.entry.js +2 -2
  66. package/dist/esm/{check-pkg-version-B6jUXpX3.js → check-pkg-version-CPDwCVPS.js} +1 -1
  67. package/dist/esm/checkouts-list-core.entry.js +5 -5
  68. package/dist/esm/{checkouts-table-Dn1sFyZs.js → checkouts-table-lgbZpF1o.js} +2 -2
  69. package/dist/esm/custom-popper.entry.js +2 -2
  70. package/dist/esm/form-alert_5.entry.js +1 -1
  71. package/dist/esm/form-control-checkbox.entry.js +3 -3
  72. package/dist/esm/form-control-date.entry.js +2 -2
  73. package/dist/esm/{form-control-error-text-Cje0veu2.js → form-control-error-text-B5LSdUXI.js} +1 -1
  74. package/dist/esm/form-control-file-v2_2.entry.js +5 -5
  75. package/dist/esm/{form-control-help-text-ClJnecm3.js → form-control-help-text-BK9RNOf-.js} +1 -1
  76. package/dist/esm/form-control-monetary-provisioning.entry.js +3 -3
  77. package/dist/esm/form-control-monetary.entry.js +5 -5
  78. package/dist/esm/form-control-number-masked_3.entry.js +4 -4
  79. package/dist/esm/form-control-number.entry.js +5 -5
  80. package/dist/esm/form-control-radio.entry.js +3 -3
  81. package/dist/esm/form-control-select_3.entry.js +4 -4
  82. package/dist/esm/gross-payment-chart-core.entry.js +3 -3
  83. package/dist/esm/{header-1-uiFiNrVs.js → header-1-CPF3S2CC.js} +1 -1
  84. package/dist/esm/{header-3-BVYYTpLc.js → header-3-Cah707hu.js} +1 -1
  85. package/dist/esm/hidden-input_2.entry.js +7 -7
  86. package/dist/esm/{insurance-state-iJs0LRg_.js → insurance-state-DRe0g_wf.js} +1 -1
  87. package/dist/esm/internal-tokenize-payment-method_7.entry.js +460 -0
  88. package/dist/esm/justifi-additional-questions-form-step-core_6.entry.js +6 -6
  89. package/dist/esm/justifi-additional-questions-form-step_9.entry.js +2 -2
  90. package/dist/esm/justifi-additional-statement_8.entry.js +1 -1
  91. package/dist/esm/{justifi-apple-pay_8.entry.js → justifi-apple-pay_7.entry.js} +9 -263
  92. package/dist/esm/justifi-bank-account-billing-form-simple_3.entry.js +143 -0
  93. package/dist/esm/justifi-business-details.entry.js +4 -4
  94. package/dist/esm/justifi-business-form.entry.js +9 -9
  95. package/dist/esm/justifi-business-representative-form-inputs.entry.js +1 -1
  96. package/dist/esm/justifi-checkout.entry.js +5 -5
  97. package/dist/esm/justifi-checkouts-list-filters.entry.js +1 -1
  98. package/dist/esm/justifi-checkouts-list.entry.js +5 -5
  99. package/dist/esm/justifi-details.entry.js +2 -2
  100. package/dist/esm/justifi-dispute-management.entry.js +2 -2
  101. package/dist/esm/justifi-dispute-notification_3.entry.js +5 -5
  102. package/dist/esm/justifi-gross-payment-chart.entry.js +4 -4
  103. package/dist/esm/justifi-order-terminals.entry.js +4 -4
  104. package/dist/esm/justifi-owner-form_3.entry.js +4 -4
  105. package/dist/esm/justifi-payment-details.entry.js +4 -4
  106. package/dist/esm/justifi-payment-provisioning-core.entry.js +2 -2
  107. package/dist/esm/justifi-payment-provisioning.entry.js +2 -2
  108. package/dist/esm/justifi-payment-transactions-list.entry.js +5 -5
  109. package/dist/esm/justifi-payments-list-filters.entry.js +1 -1
  110. package/dist/esm/justifi-payments-list.entry.js +6 -6
  111. package/dist/esm/justifi-payout-details.entry.js +4 -4
  112. package/dist/esm/justifi-payout-transactions-list.entry.js +5 -5
  113. package/dist/esm/justifi-payouts-list-filters.entry.js +1 -1
  114. package/dist/esm/justifi-payouts-list.entry.js +6 -6
  115. package/dist/esm/justifi-refund-payment.entry.js +5 -5
  116. package/dist/esm/justifi-saved-payment-method.entry.js +1 -1
  117. package/dist/esm/justifi-season-interruption-insurance.entry.js +5 -5
  118. package/dist/esm/justifi-skeleton.entry.js +3 -3
  119. package/dist/esm/justifi-terminal-orders-list-filters.entry.js +1 -1
  120. package/dist/esm/justifi-terminal-orders-list.entry.js +5 -5
  121. package/dist/esm/justifi-terminals-list-filters.entry.js +1 -1
  122. package/dist/esm/justifi-terminals-list.entry.js +5 -5
  123. package/dist/esm/justifi-tokenize-payment-method.entry.js +22 -0
  124. package/dist/esm/loader.js +1 -1
  125. package/dist/esm/{package-BeukOaOq.js → package-B3SPy-II.js} +1 -1
  126. package/dist/esm/pagination-menu.entry.js +1 -1
  127. package/dist/esm/{parts-Dj_zevuD.js → parts-wtuY7MT2.js} +1 -1
  128. package/dist/esm/payment-details-core.entry.js +5 -5
  129. package/dist/esm/payment-method-option.entry.js +1 -1
  130. package/dist/esm/payments-list-core.entry.js +6 -6
  131. package/dist/esm/{payments-status-DK2me5T2.js → payments-status-Dypl6WFL.js} +1 -1
  132. package/dist/esm/{payments-table-DxRdl7-E.js → payments-table-CK9BRZEz.js} +2 -2
  133. package/dist/esm/payout-details-core.entry.js +6 -6
  134. package/dist/esm/payouts-list-core.entry.js +6 -6
  135. package/dist/esm/{payouts-status-BfEM6F8q.js → payouts-status-hTCBgpLW.js} +1 -1
  136. package/dist/esm/{payouts-table-C2binjIW.js → payouts-table-Dd8IDBBX.js} +2 -2
  137. package/dist/esm/{schema-validations-C0qp3ZJ5.js → schema-validations-B5sfox_4.js} +1 -1
  138. package/dist/esm/{skeleton-DdynMBnt.js → skeleton-BmRZRW5K.js} +1 -1
  139. package/dist/esm/{spinner-BRMSkfVc.js → spinner-tU4D9iak.js} +1 -1
  140. package/dist/esm/{table-DYlsfkCm.js → table-Cjq1A6mO.js} +2 -2
  141. package/dist/esm/table-filters-menu.entry.js +2 -2
  142. package/dist/esm/terminal-orders-list-core.entry.js +5 -5
  143. package/dist/esm/{terminal-orders-table-zf0ASRCr.js → terminal-orders-table-CMWBIr9y.js} +2 -2
  144. package/dist/esm/terminal-quantity-selector.entry.js +1 -1
  145. package/dist/esm/terminals-list-core.entry.js +5 -5
  146. package/dist/esm/{terminals-table-DNUTk3gi.js → terminals-table-D9okETJr.js} +2 -2
  147. package/dist/esm/{utils-DUz-H1tG.js → utils-BX7Rjm1M.js} +1 -1
  148. package/dist/esm/webcomponents.js +1 -1
  149. package/dist/module/Refund.js +1 -1
  150. package/dist/module/additional-statement.js +1 -1
  151. package/dist/module/billing-form-schema.js +1 -1
  152. package/dist/module/business-additional-questions-form-step.js +1 -1
  153. package/dist/module/business-additional-questions-schema.js +1 -1
  154. package/dist/module/business-address-schema.js +1 -1
  155. package/dist/module/business-bank-account-form-step-core.js +1 -1
  156. package/dist/module/business-bank-account-form-step.js +1 -1
  157. package/dist/module/business-core-info-form-step.js +1 -1
  158. package/dist/module/business-owners-form-step.js +1 -1
  159. package/dist/module/business-representative-form-step.js +1 -1
  160. package/dist/module/business-terms-conditions-form-step.js +1 -1
  161. package/dist/module/button.js +1 -1
  162. package/dist/module/cancellation-policy.js +1 -1
  163. package/dist/module/custom-popper2.js +2 -2
  164. package/dist/module/customer-details.js +1 -1
  165. package/dist/module/dispute-response-actions.js +1 -1
  166. package/dist/module/dispute-response.js +1 -1
  167. package/dist/module/duplicate-charge.js +1 -1
  168. package/dist/module/electronic-evidence.js +1 -1
  169. package/dist/module/form-control-file-v22.js +1 -1
  170. package/dist/module/form-control-file2.js +2 -2
  171. package/dist/module/form-control-monetary2.js +2 -2
  172. package/dist/module/form-control-number-masked2.js +2 -2
  173. package/dist/module/form-control-number.js +2 -2
  174. package/dist/module/form-control-radio2.js +2 -2
  175. package/dist/module/form-control-text2.js +2 -2
  176. package/dist/module/form-control-textarea2.js +2 -2
  177. package/dist/module/get-business.js +1 -1
  178. package/dist/module/get-payment-details.js +1 -1
  179. package/dist/module/get-payout-csv.js +1 -1
  180. package/dist/module/get-subaccounts.js +1 -1
  181. package/dist/module/hidden-input2.js +1 -1
  182. package/dist/module/iframe-input2.js +3 -3
  183. package/dist/module/internal-tokenize-payment-method.d.ts +11 -0
  184. package/dist/module/internal-tokenize-payment-method.js +6 -0
  185. package/dist/module/{tokenize-payment-method.js → internal-tokenize-payment-method2.js} +8 -8
  186. package/dist/module/justifi-business-details.js +1 -1
  187. package/dist/module/justifi-business-form.js +1 -1
  188. package/dist/module/justifi-button2.js +1 -1
  189. package/dist/module/justifi-checkout.js +37 -37
  190. package/dist/module/justifi-checkouts-list.js +1 -1
  191. package/dist/module/justifi-dispute-management.js +1 -1
  192. package/dist/module/justifi-gross-payment-chart.js +1 -1
  193. package/dist/module/justifi-header2.js +1 -1
  194. package/dist/module/justifi-order-terminals.js +2 -2
  195. package/dist/module/justifi-payment-details.js +1 -1
  196. package/dist/module/justifi-payment-provisioning.js +1 -1
  197. package/dist/module/justifi-payment-transactions-list.js +1 -1
  198. package/dist/module/justifi-payments-list.js +1 -1
  199. package/dist/module/justifi-payout-details.js +1 -1
  200. package/dist/module/justifi-payout-transactions-list.js +1 -1
  201. package/dist/module/justifi-payouts-list.js +1 -1
  202. package/dist/module/justifi-refund-payment.js +1 -1
  203. package/dist/module/justifi-season-interruption-insurance.js +1 -1
  204. package/dist/module/justifi-skeleton.js +1 -1
  205. package/dist/module/justifi-terminal-orders-list.js +1 -1
  206. package/dist/module/justifi-terminals-list.js +1 -1
  207. package/dist/module/justifi-tokenize-payment-method.js +166 -1
  208. package/dist/module/legal-address-form-step.js +1 -1
  209. package/dist/module/modular-checkout.js +1 -1
  210. package/dist/module/package.js +1 -1
  211. package/dist/module/parts.js +1 -1
  212. package/dist/module/payment-provisioning-actions.js +1 -1
  213. package/dist/module/payment-provisioning-core.js +1 -1
  214. package/dist/module/payouts-list-core2.js +1 -1
  215. package/dist/module/plaid-payment-method.js +1 -1
  216. package/dist/module/product-or-service.js +1 -1
  217. package/dist/module/refund-policy.js +1 -1
  218. package/dist/module/schema-validations.js +1 -1
  219. package/dist/module/shipping-details.js +1 -1
  220. package/dist/module/utils4.js +1 -1
  221. package/dist/types/components/checkout/checkout.d.ts +1 -1
  222. package/dist/types/components/tokenize-payment-method/internal-tokenize-payment-method.d.ts +60 -0
  223. package/dist/types/components/tokenize-payment-method/tokenize-payment-method.d.ts +4 -45
  224. package/dist/types/components.d.ts +94 -52
  225. package/dist/webcomponents/p-0082f428.entry.js +1 -0
  226. package/dist/webcomponents/{p-89ff96ef.entry.js → p-01c9c76c.entry.js} +1 -1
  227. package/dist/webcomponents/{p-85bbadaf.entry.js → p-0389ea61.entry.js} +1 -1
  228. package/dist/webcomponents/{p-589e4fcb.entry.js → p-05351f0d.entry.js} +1 -1
  229. package/dist/webcomponents/{p-32af1830.entry.js → p-07e85954.entry.js} +1 -1
  230. package/dist/webcomponents/{p-e050b917.entry.js → p-087a81ff.entry.js} +1 -1
  231. package/dist/webcomponents/{p-56d9a8f1.entry.js → p-0ce046fd.entry.js} +1 -1
  232. package/dist/webcomponents/{p-62cdb2b1.entry.js → p-1193a1ac.entry.js} +1 -1
  233. package/dist/webcomponents/{p-e34a6e5f.entry.js → p-14d2f6c6.entry.js} +1 -1
  234. package/dist/webcomponents/{p-2976c54e.entry.js → p-1b94c32d.entry.js} +1 -1
  235. package/dist/webcomponents/{p-198a6ae3.entry.js → p-1edec396.entry.js} +1 -1
  236. package/dist/webcomponents/{p-065eafc5.entry.js → p-20a8b0c0.entry.js} +1 -1
  237. package/dist/webcomponents/{p-3cb3a241.entry.js → p-22f74666.entry.js} +1 -1
  238. package/dist/webcomponents/p-24c22851.entry.js +1 -0
  239. package/dist/webcomponents/p-2769f945.entry.js +1 -0
  240. package/dist/webcomponents/p-30f61f44.entry.js +1 -0
  241. package/dist/webcomponents/p-3c38cec5.entry.js +1 -0
  242. package/dist/webcomponents/p-4488378e.entry.js +1 -0
  243. package/dist/webcomponents/{p-20ccd0a4.entry.js → p-44e021e3.entry.js} +1 -1
  244. package/dist/webcomponents/{p-82b13550.entry.js → p-45936490.entry.js} +1 -1
  245. package/dist/webcomponents/{p-abf2073d.entry.js → p-4761e0aa.entry.js} +1 -1
  246. package/dist/webcomponents/{p-91f22211.entry.js → p-4c3eea2b.entry.js} +1 -1
  247. package/dist/webcomponents/{p-27acf7cc.entry.js → p-4dcbc0af.entry.js} +1 -1
  248. package/dist/webcomponents/{p-46d7ca2f.entry.js → p-4e23116c.entry.js} +4 -4
  249. package/dist/webcomponents/p-4ed1fc3b.entry.js +1 -0
  250. package/dist/webcomponents/{p-52cb10a7.entry.js → p-58ae4f9e.entry.js} +1 -1
  251. package/dist/webcomponents/p-6550b836.entry.js +1 -0
  252. package/dist/webcomponents/{p-5c847406.entry.js → p-6d06ea25.entry.js} +1 -1
  253. package/dist/webcomponents/{p-590290a2.entry.js → p-716ddc27.entry.js} +1 -1
  254. package/dist/webcomponents/{p-9633fbb8.entry.js → p-7218c312.entry.js} +1 -1
  255. package/dist/webcomponents/{p-83cd698c.entry.js → p-75c65531.entry.js} +1 -1
  256. package/dist/webcomponents/{p-d217f6ea.entry.js → p-800660f2.entry.js} +1 -1
  257. package/dist/webcomponents/p-84e2bd93.entry.js +1 -0
  258. package/dist/webcomponents/{p-6677f09f.entry.js → p-8681f258.entry.js} +1 -1
  259. package/dist/webcomponents/{p-e788ecc9.entry.js → p-89518b26.entry.js} +1 -1
  260. package/dist/webcomponents/p-8bfd15af.entry.js +1 -0
  261. package/dist/webcomponents/{p-e29bdbc2.entry.js → p-9d914297.entry.js} +1 -1
  262. package/dist/webcomponents/{p-5eb2698f.entry.js → p-9f70ce93.entry.js} +1 -1
  263. package/dist/webcomponents/p-B-0a8Xqm.js +1 -0
  264. package/dist/webcomponents/p-B3SPy-II.js +1 -0
  265. package/dist/webcomponents/{p-D2DVDmwd.js → p-BNqo3kt0.js} +1 -1
  266. package/dist/webcomponents/{p-B-7rLJIB.js → p-BTzt8N0l.js} +1 -1
  267. package/dist/webcomponents/{p-CeO5d98O.js → p-BiizzRhw.js} +1 -1
  268. package/dist/webcomponents/{p-C9Ho60F2.js → p-BitGlMSc.js} +1 -1
  269. package/dist/webcomponents/p-Bli6WznP.js +1 -0
  270. package/dist/webcomponents/{p-DkOvNRJs.js → p-Bqlcv3ZV.js} +1 -1
  271. package/dist/webcomponents/p-BuCKkdLM.js +1 -0
  272. package/dist/webcomponents/{p-BB3MQDQq.js → p-BydKIJVC.js} +1 -1
  273. package/dist/webcomponents/p-C-2kW6Al.js +1 -0
  274. package/dist/webcomponents/{p-D8HCCl2t.js → p-CkN7DFFn.js} +1 -1
  275. package/dist/webcomponents/{p-O4_LrrnE.js → p-D1WQG4I7.js} +1 -1
  276. package/dist/webcomponents/{p-Cu1FEdFr.js → p-DOLBAxYf.js} +1 -1
  277. package/dist/webcomponents/{p-fDGfMEwy.js → p-DkOiS6Zr.js} +1 -1
  278. package/dist/webcomponents/{p-BVWZSqCK.js → p-KPmnq8xf.js} +1 -1
  279. package/dist/webcomponents/{p-28c28c0b.entry.js → p-a655b996.entry.js} +1 -1
  280. package/dist/webcomponents/p-a793d1bd.entry.js +1 -0
  281. package/dist/webcomponents/{p-256a95eb.entry.js → p-a8f7cf9b.entry.js} +1 -1
  282. package/dist/webcomponents/{p-98508ff0.entry.js → p-ad8b9fba.entry.js} +1 -1
  283. package/dist/webcomponents/{p-0214a9f4.entry.js → p-ae62e01d.entry.js} +1 -1
  284. package/dist/webcomponents/{p-8993c961.entry.js → p-ae7a027b.entry.js} +1 -1
  285. package/dist/webcomponents/{p-1414e80b.entry.js → p-aec9185f.entry.js} +1 -1
  286. package/dist/webcomponents/{p-DopgIZQg.js → p-avgjSJ1d.js} +1 -1
  287. package/dist/webcomponents/{p-aee79310.entry.js → p-b3e0c981.entry.js} +1 -1
  288. package/dist/webcomponents/p-b4d8a3f6.entry.js +1 -0
  289. package/dist/webcomponents/{p-220420bb.entry.js → p-bd10429d.entry.js} +1 -1
  290. package/dist/webcomponents/{p-q6C7btl0.js → p-bolTb61p.js} +1 -1
  291. package/dist/webcomponents/{p-2a53a095.entry.js → p-c1831747.entry.js} +1 -1
  292. package/dist/webcomponents/p-c3b71a1f.entry.js +1 -0
  293. package/dist/webcomponents/{p-4e90834e.entry.js → p-c7279bc6.entry.js} +1 -1
  294. package/dist/webcomponents/p-c7MCfTgE.js +1 -0
  295. package/dist/webcomponents/{p-e06327aa.entry.js → p-c8f40375.entry.js} +1 -1
  296. package/dist/webcomponents/{p-c6edc4c9.entry.js → p-d2bb462e.entry.js} +1 -1
  297. package/dist/webcomponents/{p-58a68ad6.entry.js → p-d3e4697f.entry.js} +1 -1
  298. package/dist/webcomponents/{p-728158a8.entry.js → p-d4b8274f.entry.js} +1 -1
  299. package/dist/webcomponents/{p-9d6ceb95.entry.js → p-d89c166f.entry.js} +1 -1
  300. package/dist/webcomponents/p-dc0d3484.entry.js +1 -0
  301. package/dist/webcomponents/{p-Bo278yZD.js → p-dgG_o6wN.js} +1 -1
  302. package/dist/webcomponents/{p-f02ab3fd.entry.js → p-e2e6c201.entry.js} +1 -1
  303. package/dist/webcomponents/{p-89f1448c.entry.js → p-e3f6c3c4.entry.js} +1 -1
  304. package/dist/webcomponents/{p-238859ef.entry.js → p-eb56ba9b.entry.js} +1 -1
  305. package/dist/webcomponents/{p-9fb66685.entry.js → p-ebb73921.entry.js} +1 -1
  306. package/dist/webcomponents/{p-0d928de1.entry.js → p-ed55d333.entry.js} +1 -1
  307. package/dist/webcomponents/p-edcb84bf.entry.js +1 -0
  308. package/dist/webcomponents/{p-9db64da8.entry.js → p-f1af630f.entry.js} +1 -1
  309. package/dist/webcomponents/{p-6023553c.entry.js → p-f5fb1af2.entry.js} +1 -1
  310. package/dist/webcomponents/{p-79cb28bd.entry.js → p-fab28b02.entry.js} +1 -1
  311. package/dist/webcomponents/{p-DsR5Dt9w.js → p-jTVpG8Gt.js} +1 -1
  312. package/dist/webcomponents/{p-DwLZbA7D.js → p-nrZ9yHcl.js} +1 -1
  313. package/dist/webcomponents/{p-Dj_zevuD.js → p-wtuY7MT2.js} +1 -1
  314. package/dist/webcomponents/p-zNSPsvs3.js +1 -0
  315. package/dist/webcomponents/webcomponents.esm.js +1 -1
  316. package/package.json +1 -1
  317. package/dist/esm/justifi-bank-account-billing-form-simple_9.entry.js +0 -342
  318. package/dist/webcomponents/p-06a0e2e2.entry.js +0 -1
  319. package/dist/webcomponents/p-0bd7b871.entry.js +0 -1
  320. package/dist/webcomponents/p-2859a8e3.entry.js +0 -1
  321. package/dist/webcomponents/p-336b08de.entry.js +0 -1
  322. package/dist/webcomponents/p-36259848.entry.js +0 -1
  323. package/dist/webcomponents/p-6b563428.entry.js +0 -1
  324. package/dist/webcomponents/p-77884032.entry.js +0 -1
  325. package/dist/webcomponents/p-8dab7768.entry.js +0 -1
  326. package/dist/webcomponents/p-BeukOaOq.js +0 -1
  327. package/dist/webcomponents/p-C2gAiiwJ.js +0 -1
  328. package/dist/webcomponents/p-C7m-gAAM.js +0 -1
  329. package/dist/webcomponents/p-CO8ZJ0jB.js +0 -1
  330. package/dist/webcomponents/p-CgbXzEbz.js +0 -1
  331. package/dist/webcomponents/p-JvWiY69B.js +0 -1
  332. package/dist/webcomponents/p-VhOlg78I.js +0 -1
  333. package/dist/webcomponents/p-a49ca7d8.entry.js +0 -1
  334. package/dist/webcomponents/p-cdf94860.entry.js +0 -1
  335. package/dist/webcomponents/p-d287dea1.entry.js +0 -1
  336. package/dist/webcomponents/p-d8fc3996.entry.js +0 -1
  337. package/dist/webcomponents/p-de7f1479.entry.js +0 -1
@@ -6,42 +6,42 @@
6
6
  */
7
7
  import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
8
  import { Business, IAdditionalQuestions, IAddress } from "./api/Business";
9
- import { ComponentClickEvent as ComponentClickEvent1, ComponentErrorCodes, ComponentErrorEvent as ComponentErrorEvent1, ComponentFormStepCompleteEvent as ComponentFormStepCompleteEvent1, ComponentSubmitEvent as ComponentSubmitEvent1, FileSelectEvent, IApiResponse, ICheckoutPaymentModeParam, ICheckoutStatus, ILoadedEventResponse, IRefund, ITerminalStatus, TerminalModelName, TerminalOrderStatus, TerminalOrderType } from "./api";
10
- import { ComponentClickEvent, ComponentErrorEvent, ComponentFormStepCompleteEvent, ComponentSubmitEvent, RecordClickEvent } from "./api/ComponentEvents";
9
+ import { ComponentClickEvent as ComponentClickEvent1, ComponentErrorCodes, ComponentErrorEvent as ComponentErrorEvent1, ComponentFormStepCompleteEvent as ComponentFormStepCompleteEvent1, ComponentSubmitEvent, FileSelectEvent, IApiResponse, ICheckoutPaymentModeParam, ICheckoutStatus, ILoadedEventResponse, IRefund, ITerminalStatus, TerminalModelName, TerminalOrderStatus, TerminalOrderType } from "./api";
10
+ import { ComponentClickEvent, ComponentErrorEvent, ComponentFormStepCompleteEvent, ComponentSubmitEvent as ComponentSubmitEvent1, RecordClickEvent } from "./api/ComponentEvents";
11
11
  import { Placement, PositioningStrategy } from "@popperjs/core";
12
12
  import { EntityDocumentType, FileSelectEvent as FileSelectEvent1 } from "./api/Document";
13
13
  import { IPaymentMethodMetadata } from "./api/PaymentMethod";
14
- import { BillingFormFields as BillingFormFields1, FormController } from "./components";
14
+ import { BillingFormFields, FormController, PaymentMethodPayload as PaymentMethodPayload1 } from "./components";
15
+ import { PaymentMethodPayload } from "./components/checkout/payment-method-payload";
15
16
  import { DisputeEvidenceDocument } from "./api/DisputeEvidenceDocument";
16
17
  import { DisputeResponseFormStep } from "./components/dispute-management/dispute-response/dispute-response-form-types";
17
18
  import { ApplePayButtonStyle, ApplePayButtonType, IApplePayToken } from "./api/ApplePay";
18
- import { BillingFormFields } from "./components/checkout/billing-form/billing-form-schema";
19
+ import { BillingFormFields as BillingFormFields1 } from "./components/checkout/billing-form/billing-form-schema";
19
20
  import { CountryCode } from "./utils/country-codes";
20
21
  import { FormController as FormController1 } from "./ui-components/form/form";
21
22
  import { CheckoutChangedEventDetail, Hook, SelectedPaymentMethod } from "./components/modular-checkout/ModularCheckout";
22
23
  import { CheckoutState } from "./store/checkout.store";
23
24
  import { Dispute, IDispute } from "./api/Dispute";
24
- import { PaymentMethodPayload } from "./components/checkout/payment-method-payload";
25
25
  import { PaymentMethodOption } from "./components/checkout/payment-method-option-utils";
26
26
  import { Identity } from "./api/Identity";
27
27
  import { PaginationProps } from "./ui-components/pagination-menu/pagination-menu";
28
28
  export { Business, IAdditionalQuestions, IAddress } from "./api/Business";
29
- export { ComponentClickEvent as ComponentClickEvent1, ComponentErrorCodes, ComponentErrorEvent as ComponentErrorEvent1, ComponentFormStepCompleteEvent as ComponentFormStepCompleteEvent1, ComponentSubmitEvent as ComponentSubmitEvent1, FileSelectEvent, IApiResponse, ICheckoutPaymentModeParam, ICheckoutStatus, ILoadedEventResponse, IRefund, ITerminalStatus, TerminalModelName, TerminalOrderStatus, TerminalOrderType } from "./api";
30
- export { ComponentClickEvent, ComponentErrorEvent, ComponentFormStepCompleteEvent, ComponentSubmitEvent, RecordClickEvent } from "./api/ComponentEvents";
29
+ export { ComponentClickEvent as ComponentClickEvent1, ComponentErrorCodes, ComponentErrorEvent as ComponentErrorEvent1, ComponentFormStepCompleteEvent as ComponentFormStepCompleteEvent1, ComponentSubmitEvent, FileSelectEvent, IApiResponse, ICheckoutPaymentModeParam, ICheckoutStatus, ILoadedEventResponse, IRefund, ITerminalStatus, TerminalModelName, TerminalOrderStatus, TerminalOrderType } from "./api";
30
+ export { ComponentClickEvent, ComponentErrorEvent, ComponentFormStepCompleteEvent, ComponentSubmitEvent as ComponentSubmitEvent1, RecordClickEvent } from "./api/ComponentEvents";
31
31
  export { Placement, PositioningStrategy } from "@popperjs/core";
32
32
  export { EntityDocumentType, FileSelectEvent as FileSelectEvent1 } from "./api/Document";
33
33
  export { IPaymentMethodMetadata } from "./api/PaymentMethod";
34
- export { BillingFormFields as BillingFormFields1, FormController } from "./components";
34
+ export { BillingFormFields, FormController, PaymentMethodPayload as PaymentMethodPayload1 } from "./components";
35
+ export { PaymentMethodPayload } from "./components/checkout/payment-method-payload";
35
36
  export { DisputeEvidenceDocument } from "./api/DisputeEvidenceDocument";
36
37
  export { DisputeResponseFormStep } from "./components/dispute-management/dispute-response/dispute-response-form-types";
37
38
  export { ApplePayButtonStyle, ApplePayButtonType, IApplePayToken } from "./api/ApplePay";
38
- export { BillingFormFields } from "./components/checkout/billing-form/billing-form-schema";
39
+ export { BillingFormFields as BillingFormFields1 } from "./components/checkout/billing-form/billing-form-schema";
39
40
  export { CountryCode } from "./utils/country-codes";
40
41
  export { FormController as FormController1 } from "./ui-components/form/form";
41
42
  export { CheckoutChangedEventDetail, Hook, SelectedPaymentMethod } from "./components/modular-checkout/ModularCheckout";
42
43
  export { CheckoutState } from "./store/checkout.store";
43
44
  export { Dispute, IDispute } from "./api/Dispute";
44
- export { PaymentMethodPayload } from "./components/checkout/payment-method-payload";
45
45
  export { PaymentMethodOption } from "./components/checkout/payment-method-option-utils";
46
46
  export { Identity } from "./api/Identity";
47
47
  export { PaginationProps } from "./ui-components/pagination-menu/pagination-menu";
@@ -271,6 +271,25 @@ export namespace Components {
271
271
  "tokenize": (clientId: string, paymentMethodMetadata: IPaymentMethodMetadata, account?: string) => Promise<any>;
272
272
  "validate": () => Promise<any>;
273
273
  }
274
+ interface InternalTokenizePaymentMethod {
275
+ "accountId"?: string;
276
+ "authToken"?: string;
277
+ "disableBankAccount"?: boolean;
278
+ "disableCreditCard"?: boolean;
279
+ "fillBillingForm": (fields: BillingFormFields) => Promise<void>;
280
+ "hideBankAccountBillingForm"?: boolean;
281
+ "hideCardBillingForm"?: boolean;
282
+ "hideSubmitButton"?: boolean;
283
+ "paymentMethodGroupId"?: string;
284
+ "savePaymentMethodLabel"?: string;
285
+ /**
286
+ * @default 'Submit'
287
+ */
288
+ "submitButtonText"?: string;
289
+ "tokenize": () => Promise<any>;
290
+ "tokenizePaymentMethod": (event?: MouseEvent) => Promise<PaymentMethodPayload>;
291
+ "validate": () => Promise<ValidationResult>;
292
+ }
274
293
  interface JustifiAdditionalQuestions {
275
294
  "formController": FormController;
276
295
  }
@@ -340,8 +359,8 @@ export namespace Components {
340
359
  "width": string;
341
360
  }
342
361
  interface JustifiBankAccountBillingFormSimple {
343
- "fill": (fields: BillingFormFields) => Promise<void>;
344
- "getValues": () => Promise<BillingFormFields>;
362
+ "fill": (fields: BillingFormFields1) => Promise<void>;
363
+ "getValues": () => Promise<BillingFormFields1>;
345
364
  "legend"?: string;
346
365
  "validate": () => Promise<{ isValid: boolean; errors: any; }>;
347
366
  }
@@ -350,8 +369,8 @@ export namespace Components {
350
369
  "validate": () => Promise<any>;
351
370
  }
352
371
  interface JustifiBillingForm {
353
- "fill": (fields: BillingFormFields) => Promise<void>;
354
- "getValues": () => Promise<BillingFormFields>;
372
+ "fill": (fields: BillingFormFields1) => Promise<void>;
373
+ "getValues": () => Promise<BillingFormFields1>;
355
374
  "hideBankAccountBillingForm"?: boolean;
356
375
  "hideCardBillingForm"?: boolean;
357
376
  "legend"?: string;
@@ -359,8 +378,8 @@ export namespace Components {
359
378
  "validate": () => Promise<{ isValid: boolean; errors: any; }>;
360
379
  }
361
380
  interface JustifiBillingFormFull {
362
- "fill": (fields: BillingFormFields) => Promise<void>;
363
- "getValues": () => Promise<BillingFormFields>;
381
+ "fill": (fields: BillingFormFields1) => Promise<void>;
382
+ "getValues": () => Promise<BillingFormFields1>;
364
383
  "legend"?: string;
365
384
  "validate": () => Promise<{ isValid: boolean; errors: any; }>;
366
385
  }
@@ -495,8 +514,8 @@ export namespace Components {
495
514
  "validateAndSubmit": (onSuccess: (formData: any, documentList: DisputeEvidenceDocument[], formStep: DisputeResponseFormStep) => void) => Promise<void>;
496
515
  }
497
516
  interface JustifiCardBillingFormSimple {
498
- "fill": (fields: BillingFormFields) => Promise<void>;
499
- "getValues": () => Promise<BillingFormFields>;
517
+ "fill": (fields: BillingFormFields1) => Promise<void>;
518
+ "getValues": () => Promise<BillingFormFields1>;
500
519
  "legend"?: string;
501
520
  "validate": () => Promise<{ isValid: boolean; errors: any; }>;
502
521
  }
@@ -523,7 +542,7 @@ export namespace Components {
523
542
  * @default false
524
543
  */
525
544
  "disablePaymentMethodGroup"?: boolean;
526
- "fillBillingForm": (fields: BillingFormFields) => Promise<void>;
545
+ "fillBillingForm": (fields: BillingFormFields1) => Promise<void>;
527
546
  /**
528
547
  * @default false
529
548
  */
@@ -684,7 +703,7 @@ export namespace Components {
684
703
  "checkoutId": string;
685
704
  "preCompleteHook"?: Hook<CheckoutState>;
686
705
  "setSelectedPaymentMethod": (paymentMethod: SelectedPaymentMethod) => Promise<void>;
687
- "submitCheckout": (submitCheckoutArgs?: BillingFormFields1) => Promise<void>;
706
+ "submitCheckout": (submitCheckoutArgs?: BillingFormFields) => Promise<void>;
688
707
  "validate": () => Promise<boolean>;
689
708
  }
690
709
  interface JustifiOrderTerminals {
@@ -956,8 +975,7 @@ export namespace Components {
956
975
  * @default 'Submit'
957
976
  */
958
977
  "submitButtonText"?: string;
959
- "tokenize": () => Promise<any>;
960
- "tokenizePaymentMethod": (event?: MouseEvent) => Promise<PaymentMethodPayload>;
978
+ "tokenizePaymentMethod": (event?: MouseEvent) => Promise<PaymentMethodPayload1>;
961
979
  "validate": () => Promise<ValidationResult>;
962
980
  }
963
981
  interface LegalAddressDetails {
@@ -1121,6 +1139,10 @@ export interface IframeInputCustomEvent<T> extends CustomEvent<T> {
1121
1139
  detail: T;
1122
1140
  target: HTMLIframeInputElement;
1123
1141
  }
1142
+ export interface InternalTokenizePaymentMethodCustomEvent<T> extends CustomEvent<T> {
1143
+ detail: T;
1144
+ target: HTMLInternalTokenizePaymentMethodElement;
1145
+ }
1124
1146
  export interface JustifiAdditionalQuestionsFormStepCustomEvent<T> extends CustomEvent<T> {
1125
1147
  detail: T;
1126
1148
  target: HTMLJustifiAdditionalQuestionsFormStepElement;
@@ -1297,10 +1319,6 @@ export interface JustifiTerminalsListCustomEvent<T> extends CustomEvent<T> {
1297
1319
  detail: T;
1298
1320
  target: HTMLJustifiTerminalsListElement;
1299
1321
  }
1300
- export interface JustifiTokenizePaymentMethodCustomEvent<T> extends CustomEvent<T> {
1301
- detail: T;
1302
- target: HTMLJustifiTokenizePaymentMethodElement;
1303
- }
1304
1322
  export interface OwnerFormCoreCustomEvent<T> extends CustomEvent<T> {
1305
1323
  detail: T;
1306
1324
  target: HTMLOwnerFormCoreElement;
@@ -1716,6 +1734,24 @@ declare global {
1716
1734
  prototype: HTMLIframeInputElement;
1717
1735
  new (): HTMLIframeInputElement;
1718
1736
  };
1737
+ interface HTMLInternalTokenizePaymentMethodElementEventMap {
1738
+ "error-event": ComponentErrorEvent1;
1739
+ "submit-event": ComponentSubmitEvent;
1740
+ }
1741
+ interface HTMLInternalTokenizePaymentMethodElement extends Components.InternalTokenizePaymentMethod, HTMLStencilElement {
1742
+ addEventListener<K extends keyof HTMLInternalTokenizePaymentMethodElementEventMap>(type: K, listener: (this: HTMLInternalTokenizePaymentMethodElement, ev: InternalTokenizePaymentMethodCustomEvent<HTMLInternalTokenizePaymentMethodElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
1743
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1744
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1745
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
1746
+ removeEventListener<K extends keyof HTMLInternalTokenizePaymentMethodElementEventMap>(type: K, listener: (this: HTMLInternalTokenizePaymentMethodElement, ev: InternalTokenizePaymentMethodCustomEvent<HTMLInternalTokenizePaymentMethodElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
1747
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
1748
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
1749
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
1750
+ }
1751
+ var HTMLInternalTokenizePaymentMethodElement: {
1752
+ prototype: HTMLInternalTokenizePaymentMethodElement;
1753
+ new (): HTMLInternalTokenizePaymentMethodElement;
1754
+ };
1719
1755
  interface HTMLJustifiAdditionalQuestionsElement extends Components.JustifiAdditionalQuestions, HTMLStencilElement {
1720
1756
  }
1721
1757
  var HTMLJustifiAdditionalQuestionsElement: {
@@ -1914,7 +1950,7 @@ declare global {
1914
1950
  new (): HTMLJustifiBusinessDetailsElement;
1915
1951
  };
1916
1952
  interface HTMLJustifiBusinessFormElementEventMap {
1917
- "submit-event": ComponentSubmitEvent;
1953
+ "submit-event": ComponentSubmitEvent1;
1918
1954
  "click-event": ComponentClickEvent;
1919
1955
  "error-event": ComponentErrorEvent;
1920
1956
  }
@@ -2064,7 +2100,7 @@ declare global {
2064
2100
  interface HTMLJustifiCheckoutElementEventMap {
2065
2101
  "error-event": ComponentErrorEvent;
2066
2102
  "loaded": ILoadedEventResponse;
2067
- "submit-event": ComponentSubmitEvent;
2103
+ "submit-event": ComponentSubmitEvent1;
2068
2104
  }
2069
2105
  interface HTMLJustifiCheckoutElement extends Components.JustifiCheckout, HTMLStencilElement {
2070
2106
  addEventListener<K extends keyof HTMLJustifiCheckoutElementEventMap>(type: K, listener: (this: HTMLJustifiCheckoutElement, ev: JustifiCheckoutCustomEvent<HTMLJustifiCheckoutElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
@@ -2164,7 +2200,7 @@ declare global {
2164
2200
  interface HTMLJustifiDisputeNotificationElementEventMap {
2165
2201
  "click-event": ComponentClickEvent;
2166
2202
  "error-event": ComponentErrorEvent;
2167
- "submit-event": ComponentSubmitEvent;
2203
+ "submit-event": ComponentSubmitEvent1;
2168
2204
  }
2169
2205
  interface HTMLJustifiDisputeNotificationElement extends Components.JustifiDisputeNotification, HTMLStencilElement {
2170
2206
  addEventListener<K extends keyof HTMLJustifiDisputeNotificationElementEventMap>(type: K, listener: (this: HTMLJustifiDisputeNotificationElement, ev: JustifiDisputeNotificationCustomEvent<HTMLJustifiDisputeNotificationElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
@@ -2201,7 +2237,7 @@ declare global {
2201
2237
  "click-event": ComponentClickEvent;
2202
2238
  "error-event": ComponentErrorEvent;
2203
2239
  "complete-form-step-event": ComponentFormStepCompleteEvent;
2204
- "submit-event": ComponentSubmitEvent;
2240
+ "submit-event": ComponentSubmitEvent1;
2205
2241
  }
2206
2242
  interface HTMLJustifiDisputeResponseCoreElement extends Components.JustifiDisputeResponseCore, HTMLStencilElement {
2207
2243
  addEventListener<K extends keyof HTMLJustifiDisputeResponseCoreElementEventMap>(type: K, listener: (this: HTMLJustifiDisputeResponseCoreElement, ev: JustifiDisputeResponseCoreCustomEvent<HTMLJustifiDisputeResponseCoreElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
@@ -2398,7 +2434,7 @@ declare global {
2398
2434
  interface HTMLJustifiPaymentProvisioningCoreElementEventMap {
2399
2435
  "click-event": ComponentClickEvent;
2400
2436
  "error-event": ComponentErrorEvent;
2401
- "submit-event": ComponentSubmitEvent;
2437
+ "submit-event": ComponentSubmitEvent1;
2402
2438
  }
2403
2439
  interface HTMLJustifiPaymentProvisioningCoreElement extends Components.JustifiPaymentProvisioningCore, HTMLStencilElement {
2404
2440
  addEventListener<K extends keyof HTMLJustifiPaymentProvisioningCoreElementEventMap>(type: K, listener: (this: HTMLJustifiPaymentProvisioningCoreElement, ev: JustifiPaymentProvisioningCoreCustomEvent<HTMLJustifiPaymentProvisioningCoreElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
@@ -2569,7 +2605,7 @@ declare global {
2569
2605
  };
2570
2606
  interface HTMLJustifiRefundPaymentElementEventMap {
2571
2607
  "error-event": ComponentErrorEvent1;
2572
- "submit-event": ComponentSubmitEvent1;
2608
+ "submit-event": ComponentSubmitEvent;
2573
2609
  }
2574
2610
  interface HTMLJustifiRefundPaymentElement extends Components.JustifiRefundPayment, HTMLStencilElement {
2575
2611
  addEventListener<K extends keyof HTMLJustifiRefundPaymentElementEventMap>(type: K, listener: (this: HTMLJustifiRefundPaymentElement, ev: JustifiRefundPaymentCustomEvent<HTMLJustifiRefundPaymentElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
@@ -2724,19 +2760,7 @@ declare global {
2724
2760
  prototype: HTMLJustifiTerminalsListFiltersElement;
2725
2761
  new (): HTMLJustifiTerminalsListFiltersElement;
2726
2762
  };
2727
- interface HTMLJustifiTokenizePaymentMethodElementEventMap {
2728
- "error-event": ComponentErrorEvent1;
2729
- "submit-event": ComponentSubmitEvent1;
2730
- }
2731
2763
  interface HTMLJustifiTokenizePaymentMethodElement extends Components.JustifiTokenizePaymentMethod, HTMLStencilElement {
2732
- addEventListener<K extends keyof HTMLJustifiTokenizePaymentMethodElementEventMap>(type: K, listener: (this: HTMLJustifiTokenizePaymentMethodElement, ev: JustifiTokenizePaymentMethodCustomEvent<HTMLJustifiTokenizePaymentMethodElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
2733
- addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2734
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2735
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2736
- removeEventListener<K extends keyof HTMLJustifiTokenizePaymentMethodElementEventMap>(type: K, listener: (this: HTMLJustifiTokenizePaymentMethodElement, ev: JustifiTokenizePaymentMethodCustomEvent<HTMLJustifiTokenizePaymentMethodElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
2737
- removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2738
- removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2739
- removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2740
2764
  }
2741
2765
  var HTMLJustifiTokenizePaymentMethodElement: {
2742
2766
  prototype: HTMLJustifiTokenizePaymentMethodElement;
@@ -2959,6 +2983,7 @@ declare global {
2959
2983
  "gross-payment-chart-core": HTMLGrossPaymentChartCoreElement;
2960
2984
  "hidden-input": HTMLHiddenInputElement;
2961
2985
  "iframe-input": HTMLIframeInputElement;
2986
+ "internal-tokenize-payment-method": HTMLInternalTokenizePaymentMethodElement;
2962
2987
  "justifi-additional-questions": HTMLJustifiAdditionalQuestionsElement;
2963
2988
  "justifi-additional-questions-form-step": HTMLJustifiAdditionalQuestionsFormStepElement;
2964
2989
  "justifi-additional-questions-form-step-core": HTMLJustifiAdditionalQuestionsFormStepCoreElement;
@@ -3308,6 +3333,23 @@ declare namespace LocalJSX {
3308
3333
  "label"?: string;
3309
3334
  "onIframeLoaded"?: (event: IframeInputCustomEvent<void>) => void;
3310
3335
  }
3336
+ interface InternalTokenizePaymentMethod {
3337
+ "accountId"?: string;
3338
+ "authToken"?: string;
3339
+ "disableBankAccount"?: boolean;
3340
+ "disableCreditCard"?: boolean;
3341
+ "hideBankAccountBillingForm"?: boolean;
3342
+ "hideCardBillingForm"?: boolean;
3343
+ "hideSubmitButton"?: boolean;
3344
+ "onError-event"?: (event: InternalTokenizePaymentMethodCustomEvent<ComponentErrorEvent1>) => void;
3345
+ "onSubmit-event"?: (event: InternalTokenizePaymentMethodCustomEvent<ComponentSubmitEvent>) => void;
3346
+ "paymentMethodGroupId"?: string;
3347
+ "savePaymentMethodLabel"?: string;
3348
+ /**
3349
+ * @default 'Submit'
3350
+ */
3351
+ "submitButtonText"?: string;
3352
+ }
3311
3353
  interface JustifiAdditionalQuestions {
3312
3354
  "formController"?: FormController;
3313
3355
  }
@@ -3459,7 +3501,7 @@ declare namespace LocalJSX {
3459
3501
  "hideErrors"?: boolean;
3460
3502
  "onClick-event"?: (event: JustifiBusinessFormCustomEvent<ComponentClickEvent>) => void;
3461
3503
  "onError-event"?: (event: JustifiBusinessFormCustomEvent<ComponentErrorEvent>) => void;
3462
- "onSubmit-event"?: (event: JustifiBusinessFormCustomEvent<ComponentSubmitEvent>) => void;
3504
+ "onSubmit-event"?: (event: JustifiBusinessFormCustomEvent<ComponentSubmitEvent1>) => void;
3463
3505
  /**
3464
3506
  * @default false
3465
3507
  */
@@ -3576,7 +3618,7 @@ declare namespace LocalJSX {
3576
3618
  "hideCardBillingForm"?: boolean;
3577
3619
  "onError-event"?: (event: JustifiCheckoutCustomEvent<ComponentErrorEvent>) => void;
3578
3620
  "onLoaded"?: (event: JustifiCheckoutCustomEvent<ILoadedEventResponse>) => void;
3579
- "onSubmit-event"?: (event: JustifiCheckoutCustomEvent<ComponentSubmitEvent>) => void;
3621
+ "onSubmit-event"?: (event: JustifiCheckoutCustomEvent<ComponentSubmitEvent1>) => void;
3580
3622
  "preCompleteHook"?: Hook<CheckoutState>;
3581
3623
  }
3582
3624
  interface JustifiCheckoutSummary {
@@ -3635,7 +3677,7 @@ declare namespace LocalJSX {
3635
3677
  "isLoading"?: boolean;
3636
3678
  "onClick-event"?: (event: JustifiDisputeNotificationCustomEvent<ComponentClickEvent>) => void;
3637
3679
  "onError-event"?: (event: JustifiDisputeNotificationCustomEvent<ComponentErrorEvent>) => void;
3638
- "onSubmit-event"?: (event: JustifiDisputeNotificationCustomEvent<ComponentSubmitEvent>) => void;
3680
+ "onSubmit-event"?: (event: JustifiDisputeNotificationCustomEvent<ComponentSubmitEvent1>) => void;
3639
3681
  }
3640
3682
  interface JustifiDisputeResponse {
3641
3683
  /**
@@ -3660,7 +3702,7 @@ declare namespace LocalJSX {
3660
3702
  "onClick-event"?: (event: JustifiDisputeResponseCoreCustomEvent<ComponentClickEvent>) => void;
3661
3703
  "onComplete-form-step-event"?: (event: JustifiDisputeResponseCoreCustomEvent<ComponentFormStepCompleteEvent>) => void;
3662
3704
  "onError-event"?: (event: JustifiDisputeResponseCoreCustomEvent<ComponentErrorEvent>) => void;
3663
- "onSubmit-event"?: (event: JustifiDisputeResponseCoreCustomEvent<ComponentSubmitEvent>) => void;
3705
+ "onSubmit-event"?: (event: JustifiDisputeResponseCoreCustomEvent<ComponentSubmitEvent1>) => void;
3664
3706
  "submitDisputeResponse"?: (args: {
3665
3707
  payload: any,
3666
3708
  onSuccess: (disputeResponse: any) => void,
@@ -3798,7 +3840,7 @@ declare namespace LocalJSX {
3798
3840
  "getBusiness"?: Function;
3799
3841
  "onClick-event"?: (event: JustifiPaymentProvisioningCoreCustomEvent<ComponentClickEvent>) => void;
3800
3842
  "onError-event"?: (event: JustifiPaymentProvisioningCoreCustomEvent<ComponentErrorEvent>) => void;
3801
- "onSubmit-event"?: (event: JustifiPaymentProvisioningCoreCustomEvent<ComponentSubmitEvent>) => void;
3843
+ "onSubmit-event"?: (event: JustifiPaymentProvisioningCoreCustomEvent<ComponentSubmitEvent1>) => void;
3802
3844
  "postProvisioning"?: Function;
3803
3845
  }
3804
3846
  interface JustifiPaymentProvisioningFormButtons {
@@ -3917,7 +3959,7 @@ declare namespace LocalJSX {
3917
3959
  */
3918
3960
  "hideSubmitButton"?: boolean;
3919
3961
  "onError-event"?: (event: JustifiRefundPaymentCustomEvent<ComponentErrorEvent1>) => void;
3920
- "onSubmit-event"?: (event: JustifiRefundPaymentCustomEvent<ComponentSubmitEvent1>) => void;
3962
+ "onSubmit-event"?: (event: JustifiRefundPaymentCustomEvent<ComponentSubmitEvent>) => void;
3921
3963
  "paymentId"?: string;
3922
3964
  }
3923
3965
  interface JustifiRefundPolicy {
@@ -4012,8 +4054,6 @@ declare namespace LocalJSX {
4012
4054
  "hideBankAccountBillingForm"?: boolean;
4013
4055
  "hideCardBillingForm"?: boolean;
4014
4056
  "hideSubmitButton"?: boolean;
4015
- "onError-event"?: (event: JustifiTokenizePaymentMethodCustomEvent<ComponentErrorEvent1>) => void;
4016
- "onSubmit-event"?: (event: JustifiTokenizePaymentMethodCustomEvent<ComponentSubmitEvent1>) => void;
4017
4057
  "paymentMethodGroupId"?: string;
4018
4058
  "savePaymentMethodLabel"?: string;
4019
4059
  /**
@@ -4156,6 +4196,7 @@ declare namespace LocalJSX {
4156
4196
  "gross-payment-chart-core": GrossPaymentChartCore;
4157
4197
  "hidden-input": HiddenInput;
4158
4198
  "iframe-input": IframeInput;
4199
+ "internal-tokenize-payment-method": InternalTokenizePaymentMethod;
4159
4200
  "justifi-additional-questions": JustifiAdditionalQuestions;
4160
4201
  "justifi-additional-questions-form-step": JustifiAdditionalQuestionsFormStep;
4161
4202
  "justifi-additional-questions-form-step-core": JustifiAdditionalQuestionsFormStepCore;
@@ -4287,6 +4328,7 @@ declare module "@stencil/core" {
4287
4328
  "gross-payment-chart-core": LocalJSX.GrossPaymentChartCore & JSXBase.HTMLAttributes<HTMLGrossPaymentChartCoreElement>;
4288
4329
  "hidden-input": LocalJSX.HiddenInput & JSXBase.HTMLAttributes<HTMLHiddenInputElement>;
4289
4330
  "iframe-input": LocalJSX.IframeInput & JSXBase.HTMLAttributes<HTMLIframeInputElement>;
4331
+ "internal-tokenize-payment-method": LocalJSX.InternalTokenizePaymentMethod & JSXBase.HTMLAttributes<HTMLInternalTokenizePaymentMethodElement>;
4290
4332
  "justifi-additional-questions": LocalJSX.JustifiAdditionalQuestions & JSXBase.HTMLAttributes<HTMLJustifiAdditionalQuestionsElement>;
4291
4333
  "justifi-additional-questions-form-step": LocalJSX.JustifiAdditionalQuestionsFormStep & JSXBase.HTMLAttributes<HTMLJustifiAdditionalQuestionsFormStepElement>;
4292
4334
  "justifi-additional-questions-form-step-core": LocalJSX.JustifiAdditionalQuestionsFormStepCore & JSXBase.HTMLAttributes<HTMLJustifiAdditionalQuestionsFormStepCoreElement>;
@@ -0,0 +1 @@
1
+ import{r as t,h as i}from"./p-DwYM91AU.js";const e=class{constructor(i){t(this,i),this.submitButtonText="Submit"}async tokenizePaymentMethod(t){return this.tokenizePaymentMethodRef.tokenizePaymentMethod(t)}async fillBillingForm(t){return this.tokenizePaymentMethodRef.fillBillingForm(t)}async validate(){return this.tokenizePaymentMethodRef.validate()}render(){return i("internal-tokenize-payment-method",{key:"41dac9317c40f0e6aa42f4daea111a50e077ff7c",ref:t=>this.tokenizePaymentMethodRef=t,authToken:this.authToken,accountId:this.accountId,disableCreditCard:this.disableCreditCard,disableBankAccount:this.disableBankAccount,hideCardBillingForm:this.hideCardBillingForm,hideBankAccountBillingForm:this.hideBankAccountBillingForm,hideSubmitButton:this.hideSubmitButton,paymentMethodGroupId:this.paymentMethodGroupId})}};export{e as justifi_tokenize_payment_method}
@@ -1 +1 @@
1
- import{r as e,h as n,H as t,c as i,g as o}from"./p-DwYM91AU.js";import{c as r}from"./p-BYsgavgS.js";import{i as a,b as s,a as c,c as d,l as u}from"./p-Dj_zevuD.js";import{g as f}from"./p-BFTU3MAI.js";import{F as l}from"./p-JvWiY69B.js";import{p as h}from"./p-BeukOaOq.js";const m=r({focused:{boxShadow:"",border:""},focusedAndInvalid:{boxShadow:"",border:""},fontStyles:{fontFamily:"",fontSize:"",fontWeight:"",lineHeight:"",margin:"",padding:""}}),{state:w,set:g}=m,b=class{constructor(n){e(this,n),this.isFocused=!1,this.errorText=""}async componentDidLoad(){const e=await this.getBaseFontStyles();g("fontStyles",e);const n=await this.getFocusedStyles();g("focused",n);const t=await this.getFocusedAndInvalidStyles();g("focusedAndInvalid",t)}async getBaseFontStyles(){return new Promise((e=>{setTimeout((()=>{const n=getComputedStyle(this.hiddenInput);e({fontFamily:n.fontFamily,fontSize:n.fontSize,fontWeight:n.fontWeight,lineHeight:n.lineHeight,margin:n.margin,padding:n.padding,color:n.color})}),500)}))}async getFocusedStyles(){return new Promise((e=>{this.hiddenInput.focus(),setTimeout((()=>{this.hiddenInput.blur();let n=getComputedStyle(this.hiddenInput);e({boxShadow:n.boxShadow,border:n.border})}),500)}))}async getFocusedAndInvalidStyles(){return new Promise((e=>{this.hiddenInput.focus(),this.errorText="Error",setTimeout((()=>{const n=getComputedStyle(this.hiddenInput),t={boxShadow:n.boxShadow,border:n.border};this.hiddenInput.blur(),e(t)}),500)}))}get part(){return this.isFocused&&this.errorText?a:this.errorText?s:this.isFocused?c:d}render(){return n(t,{key:"5d57d913b590d6118dbcf361b123792e47819615"},n("input",{key:"5f86e91e383d5f1df0f3c6ad4fb1393a81175cf2",ref:e=>this.hiddenInput=e,type:"text",class:this.errorText?"form-control is-invalid":"form-control",onFocus:()=>this.isFocused=!0,onBlur:()=>this.isFocused=!1,part:this.part,tabindex:"-1",style:{height:"0",opacity:"0",pointerEvents:"none",animation:"none"}}))}};var p,y,v={exports:{}},k=f((p||(p=1,y=v,console.info("\nIFRAME-RESIZER\n\nIframe-Resizer 5 is now available via the following two packages:\n\n * @iframe-resizer/parent\n * @iframe-resizer/child\n\nAdditionally their are also new versions of iframe-resizer for React, Vue, and jQuery.\n\nVersion 5 of iframe-resizer has been extensively rewritten to use modern browser APIs, which has enabled significantly better performance and greater accuracy in the detection of content resizing events.\n\nPlease see https://iframe-resizer.com/upgrade for more details.\n"),function(e){if("undefined"!=typeof window){var n,t,i=0,o=!1,r=!1,a="[iFrameSizer]",s=null,c=window.requestAnimationFrame,d=Object.freeze({max:1,scroll:1,bodyScroll:1,documentElementScroll:1}),u={},f=null,l=Object.freeze({autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,license:"1jqr0si6pnt",log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,mouseEvents:!0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClose:function(){return!0},onClosed:function(){},onInit:function(){},onMessage:function(){k("onMessage function not defined")},onMouseEnter:function(){},onMouseLeave:function(){},onResized:function(){},onScroll:function(){return!0}}),h={};window.jQuery!==e&&((t=window.jQuery).fn?t.fn.iFrameResize||(t.fn.iFrameResize=function(e){return this.filter("iframe").each((function(n,t){A(t,e)})).end()}):v("","Unable to bind to jQuery, it is not fully loaded.")),y.exports=P(),window.iFrameResize=window.iFrameResize||P()}function m(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function w(e,n,t){e.addEventListener(n,t,!1)}function g(e,n,t){e.removeEventListener(n,t,!1)}function b(e){return u[e]?u[e].log:o}function p(e,n){x("log",e,n,b(e))}function v(e,n){x("info",e,n,b(e))}function k(e,n){x("warn",e,n,!0)}function x(e,n,t,i){!0===i&&"object"==typeof window.console&&console[e](function(e){return a+"["+function(e){var n="Host page: "+e;return window.top!==window.self&&(n=window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+e:"Nested host page: "+e),n}(e)+"]"}(n),t)}function z(e){function n(){t("Height"),t("Width"),C((function(){R(W),j(H),l("onResized",W)}),W,"init")}function t(e){var n=Number(u[H]["max"+e]),t=Number(u[H]["min"+e]),i=e.toLowerCase(),o=Number(W[i]);p(H,"Checking "+i+" is in range "+t+"-"+n),o<t&&(o=t,p(H,"Set "+i+" to min value")),o>n&&(o=n,p(H,"Set "+i+" to max value")),W[i]=""+o}function i(e){return A.slice(A.indexOf(":")+7+e)}function o(e,n){var t,i;t=function(){var t,i;E("Send Page Info","pageInfo:"+(t=document.body.getBoundingClientRect(),i=W.iframe.getBoundingClientRect(),JSON.stringify({iframeHeight:i.height,iframeWidth:i.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(i.top-t.top,10),offsetLeft:parseInt(i.left-t.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,documentHeight:document.documentElement.clientHeight,documentWidth:document.documentElement.clientWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})),e,n)},h[i=n]||(h[i]=setTimeout((function(){h[i]=null,t()}),32))}function r(e){var n=e.getBoundingClientRect();return M(H),{x:Math.floor(Number(n.left)+Number(s.x)),y:Math.floor(Number(n.top)+Number(s.y))}}function c(e){var n=e?r(W.iframe):{x:0,y:0},t={x:Number(W.width)+n.x,y:Number(W.height)+n.y};p(H,"Reposition requested from iFrame (offset x:"+n.x+" y:"+n.y+")"),window.top===window.self?(s=t,d(),p(H,"--")):window.parentIFrame?window.parentIFrame["scrollTo"+(e?"Offset":"")](t.x,t.y):k(H,"Unable to scroll to requested position, window.parentIFrame not found")}function d(){!1===l("onScroll",s)?T():j(H)}function f(e){var n={};if(0===Number(W.width)&&0===Number(W.height)){var t=i(9).split(":");n={x:t[1],y:t[0]}}else n={x:W.width,y:W.height};l(e,{iframe:W.iframe,screenX:Number(n.x),screenY:Number(n.y),type:W.type})}function l(e,n){return I(H,e,n)}var m,b,y,x,z,F,A=e.data,W={},H=null;"[iFrameResizerChild]Ready"===A?function(){for(var e in u)E("iFrame requested init",N(e),u[e].iframe,e)}():a===(""+A).slice(0,13)&&A.slice(13).split(":")[0]in u?(x=(y=A.slice(13).split(":"))[1]?parseInt(y[1],10):0,z=u[y[0]]&&u[y[0]].iframe,F=getComputedStyle(z),W={iframe:z,id:y[0],height:x+function(e){return"border-box"!==e.boxSizing?0:(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}(F)+function(e){return"border-box"!==e.boxSizing?0:(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}(F),width:y[2],type:y[3]},u[H=W.id]&&(u[H].loaded=!0),(b=W.type in{true:1,false:1,undefined:1})&&p(H,"Ignoring init message from meta parent page"),!b&&function(e){var n=!0;return u[e]||(n=!1,k(W.type+" No settings for "+e+". Message was: "+A)),n}(H)&&(p(H,"Received: "+A),m=!0,null===W.iframe&&(k(H,"IFrame ("+W.id+") not found"),m=!1),m&&function(){var n,t=e.origin,i=u[H]&&u[H].checkOrigin;if(i&&""+t!="null"&&!(i.constructor===Array?function(){var e=0,n=!1;for(p(H,"Checking connection is from allowed list of origins: "+i);e<i.length;e++)if(i[e]===t){n=!0;break}return n}():(p(H,"Checking connection is from: "+(n=u[H]&&u[H].remoteHost)),t===n)))throw new Error("Unexpected message received from: "+t+" for "+W.iframe.id+". Message was: "+e.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return!0}()&&function(){switch(u[H]&&u[H].firstRun&&u[H]&&(u[H].firstRun=!1),W.type){case"close":S(W.iframe);break;case"message":m=i(6),p(H,"onMessage passed: {iframe: "+W.iframe.id+", message: "+m+"}"),l("onMessage",{iframe:W.iframe,message:JSON.parse(m)}),p(H,"--");break;case"mouseenter":f("onMouseEnter");break;case"mouseleave":f("onMouseLeave");break;case"autoResize":u[H].autoResize=JSON.parse(i(9));break;case"scrollTo":c(!1);break;case"scrollToOffset":c(!0);break;case"pageInfo":o(u[H]&&u[H].iframe,H),function(){function e(e,i){function r(){u[t]?o(u[t].iframe,t):n()}["scroll","resize"].forEach((function(n){p(t,e+n+" listener for sendPageInfo"),i(window,n,r)}))}function n(){e("Remove ",g)}var t=H;e("Add ",w),u[t]&&(u[t].stopPageInfo=n)}();break;case"pageInfoStop":u[H]&&u[H].stopPageInfo&&(u[H].stopPageInfo(),delete u[H].stopPageInfo);break;case"inPageLink":t=i(9).split("#")[1]||"",a=decodeURIComponent(t),(h=document.getElementById(a)||document.getElementsByName(a)[0])?(e=r(h),p(H,"Moving to in page link (#"+t+") at x: "+e.x+" y: "+e.y),s={x:e.x,y:e.y},d(),p(H,"--")):window.top===window.self?p(H,"In page link #"+t+" not found"):window.parentIFrame?window.parentIFrame.moveToAnchor(t):p(H,"In page link #"+t+" not found and window.parentIFrame not found");break;case"reset":O(W);break;case"init":n(),l("onInit",W.iframe);break;default:0===Number(W.width)&&0===Number(W.height)?k("Unsupported message received ("+W.type+"), this is likely due to the iframe containing a later version of iframe-resizer than the parent page"):n()}var e,t,a,h,m}())):v(H,"Ignored: "+A)}function I(e,n,t){var i=null,o=null;if(u[e]){if("function"!=typeof(i=u[e][n]))throw new TypeError(n+" on iFrame["+e+"] is not a function");o=i(t)}return o}function F(e){delete u[e.id]}function S(e){var t=e.id;if(!1!==I(t,"onClose",t)){p(t,"Removing iFrame: "+t);try{e.parentNode&&e.parentNode.removeChild(e)}catch(e){k(e)}I(t,"onClosed",t),p(t,"--"),F(e),n&&(n.disconnect(),n=null)}else p(t,"Close iframe cancelled by onClose event")}function M(n){null===s&&p(n,"Get page position: "+(s={x:window.pageXOffset===e?document.documentElement.scrollLeft:window.pageXOffset,y:window.pageYOffset===e?document.documentElement.scrollTop:window.pageYOffset}).x+","+s.y)}function j(e){null!==s&&(window.scrollTo(s.x,s.y),p(e,"Set page position: "+s.x+","+s.y),T())}function T(){s=null}function O(e){p(e.id,"Size reset requested by "+("init"===e.type?"host page":"iFrame")),M(e.id),C((function(){R(e),E("reset","reset",e.iframe,e.id)}),e,"reset")}function R(e){function n(n){r||"0"!==e[n]||(r=!0,p(i,"Hidden iFrame detected, creating visibility listener"),function(){function e(){Object.keys(u).forEach((function(e){!function(e){function n(n){return"0px"===(u[e]&&u[e].iframe.style[n])}u[e]&&null!==u[e].iframe.offsetParent&&(n("height")||n("width"))&&E("Visibility change","resize",u[e].iframe,e)}(e)}))}function n(n){p("window","Mutation observed: "+n[0].target+" "+n[0].type),W(e,16)}var t,i=m();i&&(t=document.querySelector("body"),new i(n).observe(t,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0}))}())}function t(t){!function(n){e.id?(e.iframe.style[n]=e[n]+"px",p(e.id,"IFrame ("+i+") "+n+" set to "+e[n]+"px")):p("undefined","messageData id not set")}(t),n(t)}var i=e.iframe.id;u[i]&&(u[i].sizeHeight&&t("height"),u[i].sizeWidth&&t("width"))}function C(e,n,t){t!==n.type&&c&&!window.jasmine?(p(n.id,"Requesting animation frame"),c(e)):e()}function E(e,n,t,i,o){var r,s=!1;u[i=i||t.id]&&(t&&"contentWindow"in t&&null!==t.contentWindow?(p(i,"["+e+"] Sending msg to iframe["+i+"] ("+n+") targetOrigin: "+(r=u[i]&&u[i].targetOrigin)),t.contentWindow.postMessage(a+n,r)):k(i,"["+e+"] IFrame("+i+") not found"),o&&u[i]&&u[i].warningTimeout&&(u[i].msgTimeout=setTimeout((function(){!u[i]||u[i].loaded||s||(s=!0,k(i,"IFrame has not responded within "+u[i].warningTimeout/1e3+" seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."))}),u[i].warningTimeout)))}function N(e){return e+":"+u[e].bodyMarginV1+":"+u[e].sizeWidth+":"+u[e].log+":"+u[e].interval+":"+u[e].enablePublicMethods+":"+u[e].autoResize+":"+u[e].bodyMargin+":"+u[e].heightCalculationMethod+":"+u[e].bodyBackground+":"+u[e].bodyPadding+":"+u[e].tolerance+":"+u[e].inPageLinks+":"+u[e].resizeFrom+":"+u[e].widthCalculationMethod+":"+u[e].mouseEvents}function A(t,r){function a(e){var n=e.split("Callback");if(2===n.length){var t="on"+n[0].charAt(0).toUpperCase()+n[0].slice(1);this[t]=this[e],delete this[e],k(f,"Deprecated: '"+e+"' has been renamed '"+t+"'. The old method will be removed in the next major version.")}}var s,c,f=function(e){if("string"!=typeof e)throw new TypeError("Invaild id for iFrame. Expected String");var n;return""===e&&(t.id=(n=r&&r.id||l.id+i++,null!==document.getElementById(n)&&(n+=i++),e=n),o=(r||{}).log,p(e,"Added missing iframe ID: "+e+" ("+t.src+")")),e}(t.id);f in u&&"iFrameResizer"in t?k(f,"Ignored iFrame, already setup."):(function(e){var n;e=e||{},u[f]=Object.create(null),u[f].iframe=t,u[f].firstRun=!0,u[f].remoteHost=t.src&&t.src.split("/").slice(0,3).join("/"),function(e){if("object"!=typeof e)throw new TypeError("Options is not an object")}(e),Object.keys(e).forEach(a,e),function(e){for(var n in l)Object.prototype.hasOwnProperty.call(l,n)&&(u[f][n]=Object.prototype.hasOwnProperty.call(e,n)?e[n]:l[n])}(e),u[f]&&(u[f].targetOrigin=!0===u[f].checkOrigin?""===(n=u[f].remoteHost)||null!==n.match(/^(about:blank|javascript:|file:\/\/)/)?"*":n:"*")}(r),function(){switch(p(f,"IFrame scrolling "+(u[f]&&u[f].scrolling?"enabled":"disabled")+" for "+f),t.style.overflow=!1===(u[f]&&u[f].scrolling)?"hidden":"auto",u[f]&&u[f].scrolling){case"omit":break;case!0:t.scrolling="yes";break;case!1:t.scrolling="no";break;default:t.scrolling=u[f]?u[f].scrolling:"no"}}(),function(){function e(e){var n=u[f][e];1/0!==n&&0!==n&&(t.style[e]="number"==typeof n?n+"px":n,p(f,"Set "+e+" = "+t.style[e]))}function n(e){if(u[f]["min"+e]>u[f]["max"+e])throw new Error("Value for min"+e+" can not be greater than max"+e)}n("Height"),n("Width"),e("maxHeight"),e("minHeight"),e("maxWidth"),e("minWidth")}(),"number"!=typeof(u[f]&&u[f].bodyMargin)&&"0"!==(u[f]&&u[f].bodyMargin)||(u[f].bodyMarginV1=u[f].bodyMargin,u[f].bodyMargin=u[f].bodyMargin+"px"),s=N(f),(c=m())&&(n=function(e){if(!t.parentNode)return null;var n=new e((function(e){e.forEach((function(e){Array.prototype.slice.call(e.removedNodes).forEach((function(e){e===t&&S(t)}))}))}));return n.observe(t.parentNode,{childList:!0}),n}(c)),w(t,"load",(function(){E("iFrame.onload",s,t,e,!0),(!u[f]||!u[f].firstRun)&&u[f]&&u[f].heightCalculationMethod in d&&O({iframe:t,height:0,width:0,type:"init"})})),E("init",s,t,e,!0),u[f]&&(u[f].iframe.iFrameResizer={close:S.bind(null,u[f].iframe),removeListeners:F.bind(null,u[f].iframe),resize:E.bind(null,"Window resize","resize",u[f].iframe),moveToAnchor:function(e){E("Move to anchor","moveToAnchor:"+e,u[f].iframe,f)},sendMessage:function(e){E("Send Message","message:"+(e=JSON.stringify(e)),u[f].iframe,f)}}))}function W(e,n){null===f&&(f=setTimeout((function(){f=null,e()}),n))}function H(){"hidden"!==document.visibilityState&&(p("document","Trigger event: Visibility change"),W((function(){L("Tab Visible","resize")}),16))}function L(e,n){Object.keys(u).forEach((function(t){(function(e){return u[e]&&"parent"===u[e].resizeFrom&&u[e].autoResize&&!u[e].firstRun})(t)&&E(e,n,u[t].iframe,t)}))}function P(){function n(e,n){n&&(function(){if(!n.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==n.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+n.tagName+">")}(),A(n,e),t.push(n))}var t;return function(){var e,n=["moz","webkit","o","ms"];for(e=0;e<n.length&&!c;e+=1)c=window[n[e]+"RequestAnimationFrame"];c?c=c.bind(window):p("setup","RequestAnimationFrame not supported")}(),w(window,"message",z),w(window,"resize",(function(){p("window","Trigger event: resize"),W((function(){L("Window resize","resize")}),16)})),w(document,"visibilitychange",H),w(document,"-webkit-visibilitychange",H),function(i,o){switch(t=[],function(e){e&&e.enablePublicMethods&&k("enablePublicMethods option has been removed, public methods are now always available in the iFrame")}(i),typeof o){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(o||"iframe"),n.bind(e,i));break;case"object":n(i,o);break;default:throw new TypeError("Unexpected data type ("+typeof o+")")}return t}}}()),v.exports));class x{constructor(e,n){this.iframe=e,this.iframeOrigin=n}postMessage(e,n){const t=Object.assign({eventType:e},n);this.iframe.contentWindow.postMessage(t,this.iframeOrigin)}addMessageListener(e){window.addEventListener("message",e)}removeMessageListener(e){window.removeEventListener("message",e)}postMessageWithResponseListener(e,n){return new Promise((t=>{const i=n=>{n.data.eventType===e&&(window.removeEventListener("message",i),t(n.data.data))};window.addEventListener("message",i),this.postMessage(e,n)}))}}const z=class{constructor(n){e(this,n),this.iframeLoaded=i(this,"iframeLoaded"),this.isFocused=!1,this.isValid=!0,this.dispatchMessageEvent=e=>{const{eventType:n,data:t}=e.data;(null==t?void 0:t.id)===this.inputId&&("focused"===n&&(this.isFocused=!0),"blurred"===n&&(this.isFocused=!1))}}disconnectedCallback(){this.frameService.removeMessageListener(this.dispatchMessageEvent)}async validate(){const e=await this.frameService.postMessageWithResponseListener("validate");return this.isValid=e.isValid,this.errorText=e.error.message,e}async tokenize(e,n,t){return this.frameService.postMessageWithResponseListener("tokenize",{clientId:e,paymentMethodMetadata:n,account:t,componentVersion:h.version})}initializeFrameCommunicationService(){var e;this.frameService=new x(this.iframeElement,this.iframeOrigin),null===(e=this.frameService)||void 0===e||e.addMessageListener(this.dispatchMessageEvent)}get part(){return this.isFocused&&!this.isValid?a:this.isValid?this.isFocused?c:d:s}get style(){return this.isFocused?this.isValid?w.focused:w.focusedAndInvalid:null}get urlParams(){const e=Object.fromEntries(Object.entries(w.fontStyles).map((([e,n])=>[e,btoa(String(n))])));return new URLSearchParams(e).toString()}render(){return n(t,{key:"6a9a148def6119cf6038a940e1d24998f0de8139",class:"form-group d-flex flex-column"},n("div",{key:"dd8e4f676545658c2faaf23f42ef96def263a603",style:{visibility:this.iframeLoaded?"visible":"hidden",height:this.iframeLoaded?"auto":"0"}},n("label",{key:"d9a8dac1e7ea15b602dbdb17d141dafcacedfa6a",class:"form-label",htmlFor:"",part:u},this.label||""),n("div",{key:"2d2532b0a83f9449b7687fa95798e3fa1d055e97",class:"p-0 d-flex form-control "+(this.isValid?"":"is-invalid"),part:this.part,style:Object.assign(Object.assign({},this.style),{overflow:"hidden"})},n("iframe",{key:"524eec0a405f0a58b7b1c81f10532244478f749b",id:this.inputId,name:this.inputId,src:`${this.iframeOrigin}?${this.urlParams}`,ref:e=>{this.iframeElement=e,this.initializeFrameCommunicationService()},width:"100%",onLoad:()=>{k({log:!1,onResized:()=>{this.iframeLoaded.emit()}},this.iframeElement)}})),n(l,{key:"40393084f556c3f0c648d89c1b4f41ed93cd0b1a",errorText:this.errorText,name:this.inputId})))}get el(){return o(this)}};export{b as hidden_input,z as iframe_input}
1
+ import{r as e,h as n,H as t,c as i,g as o}from"./p-DwYM91AU.js";import{c as r}from"./p-BYsgavgS.js";import{i as a,b as s,a as c,c as d,l as u}from"./p-wtuY7MT2.js";import{g as f}from"./p-BFTU3MAI.js";import{F as l}from"./p-BuCKkdLM.js";import{p as h}from"./p-B3SPy-II.js";const m=r({focused:{boxShadow:"",border:""},focusedAndInvalid:{boxShadow:"",border:""},fontStyles:{fontFamily:"",fontSize:"",fontWeight:"",lineHeight:"",margin:"",padding:""}}),{state:w,set:g}=m,b=class{constructor(n){e(this,n),this.isFocused=!1,this.errorText=""}async componentDidLoad(){const e=await this.getBaseFontStyles();g("fontStyles",e);const n=await this.getFocusedStyles();g("focused",n);const t=await this.getFocusedAndInvalidStyles();g("focusedAndInvalid",t)}async getBaseFontStyles(){return new Promise((e=>{setTimeout((()=>{const n=getComputedStyle(this.hiddenInput);e({fontFamily:n.fontFamily,fontSize:n.fontSize,fontWeight:n.fontWeight,lineHeight:n.lineHeight,margin:n.margin,padding:n.padding,color:n.color})}),500)}))}async getFocusedStyles(){return new Promise((e=>{this.hiddenInput.focus(),setTimeout((()=>{this.hiddenInput.blur();let n=getComputedStyle(this.hiddenInput);e({boxShadow:n.boxShadow,border:n.border})}),500)}))}async getFocusedAndInvalidStyles(){return new Promise((e=>{this.hiddenInput.focus(),this.errorText="Error",setTimeout((()=>{const n=getComputedStyle(this.hiddenInput),t={boxShadow:n.boxShadow,border:n.border};this.hiddenInput.blur(),e(t)}),500)}))}get part(){return this.isFocused&&this.errorText?a:this.errorText?s:this.isFocused?c:d}render(){return n(t,{key:"1058a3fea9276fe3f9eb3158365a839603e06532"},n("input",{key:"856ad55446d13a3a8d935e90bbdba5a0ea77b706",ref:e=>this.hiddenInput=e,type:"text",class:this.errorText?"form-control is-invalid":"form-control",onFocus:()=>this.isFocused=!0,onBlur:()=>this.isFocused=!1,part:this.part,tabindex:"-1",style:{height:"0",opacity:"0",pointerEvents:"none",animation:"none"}}))}};var p,y,v={exports:{}},k=f((p||(p=1,y=v,console.info("\nIFRAME-RESIZER\n\nIframe-Resizer 5 is now available via the following two packages:\n\n * @iframe-resizer/parent\n * @iframe-resizer/child\n\nAdditionally their are also new versions of iframe-resizer for React, Vue, and jQuery.\n\nVersion 5 of iframe-resizer has been extensively rewritten to use modern browser APIs, which has enabled significantly better performance and greater accuracy in the detection of content resizing events.\n\nPlease see https://iframe-resizer.com/upgrade for more details.\n"),function(e){if("undefined"!=typeof window){var n,t,i=0,o=!1,r=!1,a="[iFrameSizer]",s=null,c=window.requestAnimationFrame,d=Object.freeze({max:1,scroll:1,bodyScroll:1,documentElementScroll:1}),u={},f=null,l=Object.freeze({autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,license:"1jqr0si6pnt",log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,mouseEvents:!0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClose:function(){return!0},onClosed:function(){},onInit:function(){},onMessage:function(){k("onMessage function not defined")},onMouseEnter:function(){},onMouseLeave:function(){},onResized:function(){},onScroll:function(){return!0}}),h={};window.jQuery!==e&&((t=window.jQuery).fn?t.fn.iFrameResize||(t.fn.iFrameResize=function(e){return this.filter("iframe").each((function(n,t){A(t,e)})).end()}):v("","Unable to bind to jQuery, it is not fully loaded.")),y.exports=P(),window.iFrameResize=window.iFrameResize||P()}function m(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function w(e,n,t){e.addEventListener(n,t,!1)}function g(e,n,t){e.removeEventListener(n,t,!1)}function b(e){return u[e]?u[e].log:o}function p(e,n){x("log",e,n,b(e))}function v(e,n){x("info",e,n,b(e))}function k(e,n){x("warn",e,n,!0)}function x(e,n,t,i){!0===i&&"object"==typeof window.console&&console[e](function(e){return a+"["+function(e){var n="Host page: "+e;return window.top!==window.self&&(n=window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+e:"Nested host page: "+e),n}(e)+"]"}(n),t)}function I(e){function n(){t("Height"),t("Width"),C((function(){R(W),T(L),l("onResized",W)}),W,"init")}function t(e){var n=Number(u[L]["max"+e]),t=Number(u[L]["min"+e]),i=e.toLowerCase(),o=Number(W[i]);p(L,"Checking "+i+" is in range "+t+"-"+n),o<t&&(o=t,p(L,"Set "+i+" to min value")),o>n&&(o=n,p(L,"Set "+i+" to max value")),W[i]=""+o}function i(e){return A.slice(A.indexOf(":")+7+e)}function o(e,n){var t,i;t=function(){var t,i;E("Send Page Info","pageInfo:"+(t=document.body.getBoundingClientRect(),i=W.iframe.getBoundingClientRect(),JSON.stringify({iframeHeight:i.height,iframeWidth:i.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(i.top-t.top,10),offsetLeft:parseInt(i.left-t.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,documentHeight:document.documentElement.clientHeight,documentWidth:document.documentElement.clientWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})),e,n)},h[i=n]||(h[i]=setTimeout((function(){h[i]=null,t()}),32))}function r(e){var n=e.getBoundingClientRect();return M(L),{x:Math.floor(Number(n.left)+Number(s.x)),y:Math.floor(Number(n.top)+Number(s.y))}}function c(e){var n=e?r(W.iframe):{x:0,y:0},t={x:Number(W.width)+n.x,y:Number(W.height)+n.y};p(L,"Reposition requested from iFrame (offset x:"+n.x+" y:"+n.y+")"),window.top===window.self?(s=t,d(),p(L,"--")):window.parentIFrame?window.parentIFrame["scrollTo"+(e?"Offset":"")](t.x,t.y):k(L,"Unable to scroll to requested position, window.parentIFrame not found")}function d(){!1===l("onScroll",s)?j():T(L)}function f(e){var n={};if(0===Number(W.width)&&0===Number(W.height)){var t=i(9).split(":");n={x:t[1],y:t[0]}}else n={x:W.width,y:W.height};l(e,{iframe:W.iframe,screenX:Number(n.x),screenY:Number(n.y),type:W.type})}function l(e,n){return S(L,e,n)}var m,b,y,x,I,z,A=e.data,W={},L=null;"[iFrameResizerChild]Ready"===A?function(){for(var e in u)E("iFrame requested init",N(e),u[e].iframe,e)}():a===(""+A).slice(0,13)&&A.slice(13).split(":")[0]in u?(x=(y=A.slice(13).split(":"))[1]?parseInt(y[1],10):0,I=u[y[0]]&&u[y[0]].iframe,z=getComputedStyle(I),W={iframe:I,id:y[0],height:x+function(e){return"border-box"!==e.boxSizing?0:(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}(z)+function(e){return"border-box"!==e.boxSizing?0:(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}(z),width:y[2],type:y[3]},u[L=W.id]&&(u[L].loaded=!0),(b=W.type in{true:1,false:1,undefined:1})&&p(L,"Ignoring init message from meta parent page"),!b&&function(e){var n=!0;return u[e]||(n=!1,k(W.type+" No settings for "+e+". Message was: "+A)),n}(L)&&(p(L,"Received: "+A),m=!0,null===W.iframe&&(k(L,"IFrame ("+W.id+") not found"),m=!1),m&&function(){var n,t=e.origin,i=u[L]&&u[L].checkOrigin;if(i&&""+t!="null"&&!(i.constructor===Array?function(){var e=0,n=!1;for(p(L,"Checking connection is from allowed list of origins: "+i);e<i.length;e++)if(i[e]===t){n=!0;break}return n}():(p(L,"Checking connection is from: "+(n=u[L]&&u[L].remoteHost)),t===n)))throw new Error("Unexpected message received from: "+t+" for "+W.iframe.id+". Message was: "+e.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return!0}()&&function(){switch(u[L]&&u[L].firstRun&&u[L]&&(u[L].firstRun=!1),W.type){case"close":F(W.iframe);break;case"message":m=i(6),p(L,"onMessage passed: {iframe: "+W.iframe.id+", message: "+m+"}"),l("onMessage",{iframe:W.iframe,message:JSON.parse(m)}),p(L,"--");break;case"mouseenter":f("onMouseEnter");break;case"mouseleave":f("onMouseLeave");break;case"autoResize":u[L].autoResize=JSON.parse(i(9));break;case"scrollTo":c(!1);break;case"scrollToOffset":c(!0);break;case"pageInfo":o(u[L]&&u[L].iframe,L),function(){function e(e,i){function r(){u[t]?o(u[t].iframe,t):n()}["scroll","resize"].forEach((function(n){p(t,e+n+" listener for sendPageInfo"),i(window,n,r)}))}function n(){e("Remove ",g)}var t=L;e("Add ",w),u[t]&&(u[t].stopPageInfo=n)}();break;case"pageInfoStop":u[L]&&u[L].stopPageInfo&&(u[L].stopPageInfo(),delete u[L].stopPageInfo);break;case"inPageLink":t=i(9).split("#")[1]||"",a=decodeURIComponent(t),(h=document.getElementById(a)||document.getElementsByName(a)[0])?(e=r(h),p(L,"Moving to in page link (#"+t+") at x: "+e.x+" y: "+e.y),s={x:e.x,y:e.y},d(),p(L,"--")):window.top===window.self?p(L,"In page link #"+t+" not found"):window.parentIFrame?window.parentIFrame.moveToAnchor(t):p(L,"In page link #"+t+" not found and window.parentIFrame not found");break;case"reset":O(W);break;case"init":n(),l("onInit",W.iframe);break;default:0===Number(W.width)&&0===Number(W.height)?k("Unsupported message received ("+W.type+"), this is likely due to the iframe containing a later version of iframe-resizer than the parent page"):n()}var e,t,a,h,m}())):v(L,"Ignored: "+A)}function S(e,n,t){var i=null,o=null;if(u[e]){if("function"!=typeof(i=u[e][n]))throw new TypeError(n+" on iFrame["+e+"] is not a function");o=i(t)}return o}function z(e){delete u[e.id]}function F(e){var t=e.id;if(!1!==S(t,"onClose",t)){p(t,"Removing iFrame: "+t);try{e.parentNode&&e.parentNode.removeChild(e)}catch(e){k(e)}S(t,"onClosed",t),p(t,"--"),z(e),n&&(n.disconnect(),n=null)}else p(t,"Close iframe cancelled by onClose event")}function M(n){null===s&&p(n,"Get page position: "+(s={x:window.pageXOffset===e?document.documentElement.scrollLeft:window.pageXOffset,y:window.pageYOffset===e?document.documentElement.scrollTop:window.pageYOffset}).x+","+s.y)}function T(e){null!==s&&(window.scrollTo(s.x,s.y),p(e,"Set page position: "+s.x+","+s.y),j())}function j(){s=null}function O(e){p(e.id,"Size reset requested by "+("init"===e.type?"host page":"iFrame")),M(e.id),C((function(){R(e),E("reset","reset",e.iframe,e.id)}),e,"reset")}function R(e){function n(n){r||"0"!==e[n]||(r=!0,p(i,"Hidden iFrame detected, creating visibility listener"),function(){function e(){Object.keys(u).forEach((function(e){!function(e){function n(n){return"0px"===(u[e]&&u[e].iframe.style[n])}u[e]&&null!==u[e].iframe.offsetParent&&(n("height")||n("width"))&&E("Visibility change","resize",u[e].iframe,e)}(e)}))}function n(n){p("window","Mutation observed: "+n[0].target+" "+n[0].type),W(e,16)}var t,i=m();i&&(t=document.querySelector("body"),new i(n).observe(t,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0}))}())}function t(t){!function(n){e.id?(e.iframe.style[n]=e[n]+"px",p(e.id,"IFrame ("+i+") "+n+" set to "+e[n]+"px")):p("undefined","messageData id not set")}(t),n(t)}var i=e.iframe.id;u[i]&&(u[i].sizeHeight&&t("height"),u[i].sizeWidth&&t("width"))}function C(e,n,t){t!==n.type&&c&&!window.jasmine?(p(n.id,"Requesting animation frame"),c(e)):e()}function E(e,n,t,i,o){var r,s=!1;u[i=i||t.id]&&(t&&"contentWindow"in t&&null!==t.contentWindow?(p(i,"["+e+"] Sending msg to iframe["+i+"] ("+n+") targetOrigin: "+(r=u[i]&&u[i].targetOrigin)),t.contentWindow.postMessage(a+n,r)):k(i,"["+e+"] IFrame("+i+") not found"),o&&u[i]&&u[i].warningTimeout&&(u[i].msgTimeout=setTimeout((function(){!u[i]||u[i].loaded||s||(s=!0,k(i,"IFrame has not responded within "+u[i].warningTimeout/1e3+" seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."))}),u[i].warningTimeout)))}function N(e){return e+":"+u[e].bodyMarginV1+":"+u[e].sizeWidth+":"+u[e].log+":"+u[e].interval+":"+u[e].enablePublicMethods+":"+u[e].autoResize+":"+u[e].bodyMargin+":"+u[e].heightCalculationMethod+":"+u[e].bodyBackground+":"+u[e].bodyPadding+":"+u[e].tolerance+":"+u[e].inPageLinks+":"+u[e].resizeFrom+":"+u[e].widthCalculationMethod+":"+u[e].mouseEvents}function A(t,r){function a(e){var n=e.split("Callback");if(2===n.length){var t="on"+n[0].charAt(0).toUpperCase()+n[0].slice(1);this[t]=this[e],delete this[e],k(f,"Deprecated: '"+e+"' has been renamed '"+t+"'. The old method will be removed in the next major version.")}}var s,c,f=function(e){if("string"!=typeof e)throw new TypeError("Invaild id for iFrame. Expected String");var n;return""===e&&(t.id=(n=r&&r.id||l.id+i++,null!==document.getElementById(n)&&(n+=i++),e=n),o=(r||{}).log,p(e,"Added missing iframe ID: "+e+" ("+t.src+")")),e}(t.id);f in u&&"iFrameResizer"in t?k(f,"Ignored iFrame, already setup."):(function(e){var n;e=e||{},u[f]=Object.create(null),u[f].iframe=t,u[f].firstRun=!0,u[f].remoteHost=t.src&&t.src.split("/").slice(0,3).join("/"),function(e){if("object"!=typeof e)throw new TypeError("Options is not an object")}(e),Object.keys(e).forEach(a,e),function(e){for(var n in l)Object.prototype.hasOwnProperty.call(l,n)&&(u[f][n]=Object.prototype.hasOwnProperty.call(e,n)?e[n]:l[n])}(e),u[f]&&(u[f].targetOrigin=!0===u[f].checkOrigin?""===(n=u[f].remoteHost)||null!==n.match(/^(about:blank|javascript:|file:\/\/)/)?"*":n:"*")}(r),function(){switch(p(f,"IFrame scrolling "+(u[f]&&u[f].scrolling?"enabled":"disabled")+" for "+f),t.style.overflow=!1===(u[f]&&u[f].scrolling)?"hidden":"auto",u[f]&&u[f].scrolling){case"omit":break;case!0:t.scrolling="yes";break;case!1:t.scrolling="no";break;default:t.scrolling=u[f]?u[f].scrolling:"no"}}(),function(){function e(e){var n=u[f][e];1/0!==n&&0!==n&&(t.style[e]="number"==typeof n?n+"px":n,p(f,"Set "+e+" = "+t.style[e]))}function n(e){if(u[f]["min"+e]>u[f]["max"+e])throw new Error("Value for min"+e+" can not be greater than max"+e)}n("Height"),n("Width"),e("maxHeight"),e("minHeight"),e("maxWidth"),e("minWidth")}(),"number"!=typeof(u[f]&&u[f].bodyMargin)&&"0"!==(u[f]&&u[f].bodyMargin)||(u[f].bodyMarginV1=u[f].bodyMargin,u[f].bodyMargin=u[f].bodyMargin+"px"),s=N(f),(c=m())&&(n=function(e){if(!t.parentNode)return null;var n=new e((function(e){e.forEach((function(e){Array.prototype.slice.call(e.removedNodes).forEach((function(e){e===t&&F(t)}))}))}));return n.observe(t.parentNode,{childList:!0}),n}(c)),w(t,"load",(function(){E("iFrame.onload",s,t,e,!0),(!u[f]||!u[f].firstRun)&&u[f]&&u[f].heightCalculationMethod in d&&O({iframe:t,height:0,width:0,type:"init"})})),E("init",s,t,e,!0),u[f]&&(u[f].iframe.iFrameResizer={close:F.bind(null,u[f].iframe),removeListeners:z.bind(null,u[f].iframe),resize:E.bind(null,"Window resize","resize",u[f].iframe),moveToAnchor:function(e){E("Move to anchor","moveToAnchor:"+e,u[f].iframe,f)},sendMessage:function(e){E("Send Message","message:"+(e=JSON.stringify(e)),u[f].iframe,f)}}))}function W(e,n){null===f&&(f=setTimeout((function(){f=null,e()}),n))}function L(){"hidden"!==document.visibilityState&&(p("document","Trigger event: Visibility change"),W((function(){H("Tab Visible","resize")}),16))}function H(e,n){Object.keys(u).forEach((function(t){(function(e){return u[e]&&"parent"===u[e].resizeFrom&&u[e].autoResize&&!u[e].firstRun})(t)&&E(e,n,u[t].iframe,t)}))}function P(){function n(e,n){n&&(function(){if(!n.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==n.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+n.tagName+">")}(),A(n,e),t.push(n))}var t;return function(){var e,n=["moz","webkit","o","ms"];for(e=0;e<n.length&&!c;e+=1)c=window[n[e]+"RequestAnimationFrame"];c?c=c.bind(window):p("setup","RequestAnimationFrame not supported")}(),w(window,"message",I),w(window,"resize",(function(){p("window","Trigger event: resize"),W((function(){H("Window resize","resize")}),16)})),w(document,"visibilitychange",L),w(document,"-webkit-visibilitychange",L),function(i,o){switch(t=[],function(e){e&&e.enablePublicMethods&&k("enablePublicMethods option has been removed, public methods are now always available in the iFrame")}(i),typeof o){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(o||"iframe"),n.bind(e,i));break;case"object":n(i,o);break;default:throw new TypeError("Unexpected data type ("+typeof o+")")}return t}}}()),v.exports));class x{constructor(e,n){this.iframe=e,this.iframeOrigin=n}postMessage(e,n){const t=Object.assign({eventType:e},n);this.iframe.contentWindow.postMessage(t,this.iframeOrigin)}addMessageListener(e){window.addEventListener("message",e)}removeMessageListener(e){window.removeEventListener("message",e)}postMessageWithResponseListener(e,n){return new Promise((t=>{const i=n=>{n.data.eventType===e&&(window.removeEventListener("message",i),t(n.data.data))};window.addEventListener("message",i),this.postMessage(e,n)}))}}const I=class{constructor(n){e(this,n),this.iframeLoaded=i(this,"iframeLoaded"),this.isFocused=!1,this.isValid=!0,this.dispatchMessageEvent=e=>{const{eventType:n,data:t}=e.data;(null==t?void 0:t.id)===this.inputId&&("focused"===n&&(this.isFocused=!0),"blurred"===n&&(this.isFocused=!1))}}disconnectedCallback(){this.frameService.removeMessageListener(this.dispatchMessageEvent)}async validate(){const e=await this.frameService.postMessageWithResponseListener("validate");return this.isValid=e.isValid,this.errorText=e.error.message,e}async tokenize(e,n,t){return this.frameService.postMessageWithResponseListener("tokenize",{clientId:e,paymentMethodMetadata:n,account:t,componentVersion:h.version})}initializeFrameCommunicationService(){var e;this.frameService=new x(this.iframeElement,this.iframeOrigin),null===(e=this.frameService)||void 0===e||e.addMessageListener(this.dispatchMessageEvent)}get part(){return this.isFocused&&!this.isValid?a:this.isValid?this.isFocused?c:d:s}get style(){return this.isFocused?this.isValid?w.focused:w.focusedAndInvalid:null}get urlParams(){const e=Object.fromEntries(Object.entries(w.fontStyles).map((([e,n])=>[e,btoa(String(n))])));return new URLSearchParams(e).toString()}render(){return n(t,{key:"0c3f4427120c3405bf47f60dd3bde638f0c3176e",class:"form-group d-flex flex-column"},n("div",{key:"6ba2a62c8df9db7b01341ea06fbe1df25a87e604",style:{visibility:this.iframeLoaded?"visible":"hidden",height:this.iframeLoaded?"auto":"0"}},n("label",{key:"cc7dfd2299382e473f6ce279c5ffe61794d56e59",class:"form-label",htmlFor:"",part:u},this.label||""),n("div",{key:"62406d7581a21dcdec52c993edc2a03cd8fce1ef",class:"p-0 d-flex form-control "+(this.isValid?"":"is-invalid"),part:this.part,style:Object.assign(Object.assign({},this.style),{overflow:"hidden"})},n("iframe",{key:"7c804be15e9029e003684bea21f93578269bdac7",id:this.inputId,name:this.inputId,src:`${this.iframeOrigin}?${this.urlParams}`,ref:e=>{this.iframeElement=e,this.initializeFrameCommunicationService()},width:"100%",onLoad:()=>{k({log:!1,onResized:()=>{this.iframeLoaded.emit()}},this.iframeElement)}})),n(l,{key:"2cb6be114be8cea65d880b6c21eacdf46052468c",errorText:this.errorText,name:this.inputId})))}get el(){return o(this)}};export{b as hidden_input,I as iframe_input}
@@ -1 +1 @@
1
- import{r as t,c as s,h as i}from"./p-DwYM91AU.js";import"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import{C as o,a as r}from"./p-Cjcsf8ku.js";import{C as e}from"./p-CPKSE7M4.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{g as c,a}from"./p-D2muobcE.js";import{c as p,J as n}from"./p-CeO5d98O.js";import{C as h}from"./p-BItPr6Gj.js";import{m as u,S as m}from"./p-CriWtqRc.js";import{S as d}from"./p-BP2sTIQV.js";import"./p-CZfYo5-1.js";import{d as j}from"./p-D8HCCl2t.js";import"./p-BYsgavgS.js";import"./p-BS7OgSQe.js";import"./p-BeukOaOq.js";import"./p-C8yN3uBj.js";import"./p-Cu1FEdFr.js";import"./p-Dj_zevuD.js";const l=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.columns=j,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){p(),this.analytics=new n(this),this.initializeGetData()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetData()}initializeGetData(){this.initializeGetCheckouts(),this.initializeGetSubAccounts()}initializeGetCheckouts(){this.accountId&&this.authToken?this.getCheckouts=(({accountId:t,authToken:s,service:i})=>async({params:r,onSuccess:p,onError:n})=>{var h,u;try{const m=await i.fetchCheckouts(t,s,r);if(m.error)return n({error:a(m.error),code:c(null===(u=m.error)||void 0===u?void 0:u.code),severity:o.ERROR});{const t=Object.assign({},m.page_info);p({checkouts:(null===(h=m.data)||void 0===h?void 0:h.map((t=>new e(t))))||[],pagingInfo:t})}}catch(t){const s=c(null==t?void 0:t.code);return n({error:t.message||t,code:s,severity:o.ERROR})}})({accountId:this.accountId,authToken:this.authToken,service:new h}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:r.MISSING_PROPS,message:this.errorMessage,severity:o.ERROR}))}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=u({accountId:this.accountId,authToken:this.authToken,service:new m}))}render(){return i(d,{key:"b7e794982435af9a755c272767c017c57fa16b24"},i("checkouts-list-core",{key:"a8de52b59cbccd7cd97369663c074011b49b9499",getCheckouts:this.getCheckouts,getSubAccounts:this.getSubAccounts,"onError-event":this.handleErrorEvent,columns:this.columns}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{l as justifi_checkouts_list}
1
+ import{r as t,c as s,h as i}from"./p-DwYM91AU.js";import"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import{C as o,a as r}from"./p-Cjcsf8ku.js";import{C as e}from"./p-CPKSE7M4.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{g as c,a}from"./p-D2muobcE.js";import{c as n,J as p}from"./p-BiizzRhw.js";import{C as h}from"./p-BItPr6Gj.js";import{m as u,S as m}from"./p-CriWtqRc.js";import{S as d}from"./p-BP2sTIQV.js";import"./p-CZfYo5-1.js";import{d as j}from"./p-CkN7DFFn.js";import"./p-BYsgavgS.js";import"./p-BS7OgSQe.js";import"./p-B3SPy-II.js";import"./p-C8yN3uBj.js";import"./p-DOLBAxYf.js";import"./p-wtuY7MT2.js";const l=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.columns=j,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){n(),this.analytics=new p(this),this.initializeGetData()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetData()}initializeGetData(){this.initializeGetCheckouts(),this.initializeGetSubAccounts()}initializeGetCheckouts(){this.accountId&&this.authToken?this.getCheckouts=(({accountId:t,authToken:s,service:i})=>async({params:r,onSuccess:n,onError:p})=>{var h,u;try{const m=await i.fetchCheckouts(t,s,r);if(m.error)return p({error:a(m.error),code:c(null===(u=m.error)||void 0===u?void 0:u.code),severity:o.ERROR});{const t=Object.assign({},m.page_info);n({checkouts:(null===(h=m.data)||void 0===h?void 0:h.map((t=>new e(t))))||[],pagingInfo:t})}}catch(t){const s=c(null==t?void 0:t.code);return p({error:t.message||t,code:s,severity:o.ERROR})}})({accountId:this.accountId,authToken:this.authToken,service:new h}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:r.MISSING_PROPS,message:this.errorMessage,severity:o.ERROR}))}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=u({accountId:this.accountId,authToken:this.authToken,service:new m}))}render(){return i(d,{key:"b7e794982435af9a755c272767c017c57fa16b24"},i("checkouts-list-core",{key:"a8de52b59cbccd7cd97369663c074011b49b9499",getCheckouts:this.getCheckouts,getSubAccounts:this.getSubAccounts,"onError-event":this.handleErrorEvent,columns:this.columns}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{l as justifi_checkouts_list}
@@ -1 +1 @@
1
- import{h as s,r as t,c as i}from"./p-DwYM91AU.js";import{A as e}from"./p-C8yN3uBj.js";import{C as r,a as o}from"./p-Cjcsf8ku.js";import"./p-CPKSE7M4.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{g as a,a as n}from"./p-D2muobcE.js";import{c,J as l}from"./p-CeO5d98O.js";import{c as h}from"./p-DU8dqq9U.js";import{p as d,f as p,r as u,j as v}from"./p-BS7OgSQe.js";import{v as m,i as y,a as f,H as j}from"./p-DwLZbA7D.js";import{D as g,E as _}from"./p-Dj_zevuD.js";import{S as k}from"./p-BP2sTIQV.js";import"./p-CZfYo5-1.js";import{S as w}from"./p-VhOlg78I.js";import"./p-tGDdRx0W.js";import"./p-BYsgavgS.js";import"./p-BeukOaOq.js";import"./p-DCIW8z1f.js";import"./p-HXpYMWUU.js";const C=e();class b{async fetchQuote(s,t){return C.post({endpoint:"insurance/quotes",body:t,authToken:s})}async toggleCoverage(s,t,i){return C.post({endpoint:`insurance/quotes/${t}/toggle`,body:i,authToken:s})}}const D=()=>s("div",{class:"row gap-3"},s("div",{class:"col-12"},s(w,{width:"35%",height:"30px"})),s("div",{class:"col-12"},s(w,{width:"70%"})),s("div",{class:"col-12"},s(w,{width:"40%"})),s("div",{class:"col-12"},s(w,{width:"40%"})),s("div",{class:"col-12"},s(w,{width:"100%"})),s("div",{class:"col-12"},s(w,{width:"80%"}))),T=class{constructor(s){t(this,s),this.insuranceUpdated=i(this,"insurance-updated"),this.errorEvent=i(this,"error-event"),this.isLoading=!0}async validate(){return m()}processHTMLContent(s){return d(s,[s=>u(s,"style"),s=>v(s,"a","part",g),s=>v(s,"p","part",g)])}componentWillLoad(){c(),this.analytics=new l(this),this.initializeServiceMethods(),this.getQuote&&this.fetchData()}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}initializeServiceMethods(){const s=this.authToken||h.authToken;if(!s)return void this.errorEvent.emit({errorCode:o.MISSING_PROPS,message:"Missing authToken",severity:r.ERROR});const t={authToken:s,service:new b};this.getQuote=(({authToken:s,service:t})=>async({payload:i,onSuccess:e,onError:o})=>{var c;try{const l=await t.fetchQuote(s,i);if(l.error)return o({error:n(l.error),code:a(null===(c=l.error)||void 0===c?void 0:c.code),severity:r.ERROR});e({quote:l.data})}catch(s){const t=a(null==s?void 0:s.code);return o({error:s.message||s,code:t,severity:r.ERROR})}})(t),this.toggleCoverage=(({authToken:s,service:t})=>async({quoteId:i,payload:e,onSuccess:o,onError:c})=>{var l;try{const h=await t.toggleCoverage(s,i,e);if(h.error)return c({error:n(h.error),code:a(null===(l=h.error)||void 0===l?void 0:l.code),severity:r.ERROR});o({quote:h.data})}catch(s){const t=a(null==s?void 0:s.code);return c({error:s.message||s,code:t,severity:r.ERROR})}})(t)}fetchData(){this.isLoading=!0,this.getQuote({payload:{checkout_id:this.checkoutId||h.checkoutId,policy_type:"season_interruption",primary_identity:{state:this.primaryIdentityState,email:this.primaryIdentityEmailAddress,first_name:this.primaryIdentityFirstName,last_name:this.primaryIdentityLastName,postal_code:this.primaryIdentityPostalCode,country:this.primaryIdentityCountry},policy_attributes:{insurable_amount:this.policyAttributesInsurableAmount,start_date:this.policyAttributesStartDate,end_date:this.policyAttributesEndDate,covered_identity:{first_name:this.coveredIdentityFirstName,last_name:this.coveredIdentityLastName}}},onSuccess:({quote:s})=>{this.quote=s,this.quote.product.description=this.processHTMLContent(this.quote.product.description),this.quote.product.legal_disclaimer=this.processHTMLContent(this.quote.product.legal_disclaimer),y[s.policy_type]=s.accepted,this.isLoading=!1},onError:({error:s,code:t,severity:i})=>{this.isLoading=!1,this.errorEvent.emit({errorCode:t,message:s,severity:i})}})}onChangeHandler(s,t){this.accepted=t,f[this.quote.policy_type]=!1,this.toggleCoverage({quoteId:this.quote.id,payload:{accepted:this.accepted},onSuccess:()=>{this.insuranceUpdated.emit(),y[this.quote.policy_type]=this.accepted},onError:({error:s,code:t,severity:i})=>{this.errorEvent.emit({errorCode:t,message:s,severity:i})}})}get error(){var s;return f[null===(s=this.quote)||void 0===s?void 0:s.policy_type]}render(){var t,i,e,r;return h&&!1===h.insuranceEnabled?(console.warn("[justifi-season-interruption-insurance] Insurance is disabled for this checkout (payment_settings.insurance_payments=false)."),null):s(k,null,this.isLoading?s(D,null):s("div",null,s(j,{text:null===(t=this.quote)||void 0===t?void 0:t.product.title,class:"fs-5 fw-bold pb-3"}),s("small",{part:g,innerHTML:null===(i=this.quote)||void 0===i?void 0:i.product.description}),s("form-control-radio",{label:`Accept coverage for ${p(null===(e=this.quote)||void 0===e?void 0:e.total_cents)}`,name:"opt-in",value:"true",checked:"true"===this.accepted,inputHandler:this.onChangeHandler.bind(this),errorText:this.error?" ":void 0}),s("form-control-radio",{label:"Decline coverage",name:"opt-in",value:"false",checked:"false"===this.accepted,inputHandler:this.onChangeHandler.bind(this),errorText:this.error?" ":void 0}),s("div",{class:"invalid-feedback",style:{display:this.error?"block":"none"},part:_},"Please select an option"),s("small",{part:g,innerHTML:null===(r=this.quote)||void 0===r?void 0:r.product.legal_disclaimer})))}};export{T as justifi_season_interruption_insurance}
1
+ import{h as s,r as t,c as i}from"./p-DwYM91AU.js";import{A as e}from"./p-C8yN3uBj.js";import{C as r,a as o}from"./p-Cjcsf8ku.js";import"./p-CPKSE7M4.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{g as a,a as n}from"./p-D2muobcE.js";import{c,J as l}from"./p-BiizzRhw.js";import{c as h}from"./p-DU8dqq9U.js";import{p as d,f as p,r as u,j as v}from"./p-BS7OgSQe.js";import{v as m,i as y,a as f,H as j}from"./p-nrZ9yHcl.js";import{D as g,E as _}from"./p-wtuY7MT2.js";import{S as w}from"./p-BP2sTIQV.js";import"./p-CZfYo5-1.js";import{S as C}from"./p-c7MCfTgE.js";import"./p-tGDdRx0W.js";import"./p-BYsgavgS.js";import"./p-B3SPy-II.js";import"./p-DCIW8z1f.js";import"./p-HXpYMWUU.js";const k=e();class T{async fetchQuote(s,t){return k.post({endpoint:"insurance/quotes",body:t,authToken:s})}async toggleCoverage(s,t,i){return k.post({endpoint:`insurance/quotes/${t}/toggle`,body:i,authToken:s})}}const b=()=>s("div",{class:"row gap-3"},s("div",{class:"col-12"},s(C,{width:"35%",height:"30px"})),s("div",{class:"col-12"},s(C,{width:"70%"})),s("div",{class:"col-12"},s(C,{width:"40%"})),s("div",{class:"col-12"},s(C,{width:"40%"})),s("div",{class:"col-12"},s(C,{width:"100%"})),s("div",{class:"col-12"},s(C,{width:"80%"}))),S=class{constructor(s){t(this,s),this.insuranceUpdated=i(this,"insurance-updated"),this.errorEvent=i(this,"error-event"),this.isLoading=!0}async validate(){return m()}processHTMLContent(s){return d(s,[s=>u(s,"style"),s=>v(s,"a","part",g),s=>v(s,"p","part",g)])}componentWillLoad(){c(),this.analytics=new l(this),this.initializeServiceMethods(),this.getQuote&&this.fetchData()}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}initializeServiceMethods(){const s=this.authToken||h.authToken;if(!s)return void this.errorEvent.emit({errorCode:o.MISSING_PROPS,message:"Missing authToken",severity:r.ERROR});const t={authToken:s,service:new T};this.getQuote=(({authToken:s,service:t})=>async({payload:i,onSuccess:e,onError:o})=>{var c;try{const l=await t.fetchQuote(s,i);if(l.error)return o({error:n(l.error),code:a(null===(c=l.error)||void 0===c?void 0:c.code),severity:r.ERROR});e({quote:l.data})}catch(s){const t=a(null==s?void 0:s.code);return o({error:s.message||s,code:t,severity:r.ERROR})}})(t),this.toggleCoverage=(({authToken:s,service:t})=>async({quoteId:i,payload:e,onSuccess:o,onError:c})=>{var l;try{const h=await t.toggleCoverage(s,i,e);if(h.error)return c({error:n(h.error),code:a(null===(l=h.error)||void 0===l?void 0:l.code),severity:r.ERROR});o({quote:h.data})}catch(s){const t=a(null==s?void 0:s.code);return c({error:s.message||s,code:t,severity:r.ERROR})}})(t)}fetchData(){this.isLoading=!0,this.getQuote({payload:{checkout_id:this.checkoutId||h.checkoutId,policy_type:"season_interruption",primary_identity:{state:this.primaryIdentityState,email:this.primaryIdentityEmailAddress,first_name:this.primaryIdentityFirstName,last_name:this.primaryIdentityLastName,postal_code:this.primaryIdentityPostalCode,country:this.primaryIdentityCountry},policy_attributes:{insurable_amount:this.policyAttributesInsurableAmount,start_date:this.policyAttributesStartDate,end_date:this.policyAttributesEndDate,covered_identity:{first_name:this.coveredIdentityFirstName,last_name:this.coveredIdentityLastName}}},onSuccess:({quote:s})=>{this.quote=s,this.quote.product.description=this.processHTMLContent(this.quote.product.description),this.quote.product.legal_disclaimer=this.processHTMLContent(this.quote.product.legal_disclaimer),y[s.policy_type]=s.accepted,this.isLoading=!1},onError:({error:s,code:t,severity:i})=>{this.isLoading=!1,this.errorEvent.emit({errorCode:t,message:s,severity:i})}})}onChangeHandler(s,t){this.accepted=t,f[this.quote.policy_type]=!1,this.toggleCoverage({quoteId:this.quote.id,payload:{accepted:this.accepted},onSuccess:()=>{this.insuranceUpdated.emit(),y[this.quote.policy_type]=this.accepted},onError:({error:s,code:t,severity:i})=>{this.errorEvent.emit({errorCode:t,message:s,severity:i})}})}get error(){var s;return f[null===(s=this.quote)||void 0===s?void 0:s.policy_type]}render(){var t,i,e,r;return h&&!1===h.insuranceEnabled?(console.warn("[justifi-season-interruption-insurance] Insurance is disabled for this checkout (payment_settings.insurance_payments=false)."),null):s(w,null,this.isLoading?s(b,null):s("div",null,s(j,{text:null===(t=this.quote)||void 0===t?void 0:t.product.title,class:"fs-5 fw-bold pb-3"}),s("small",{part:g,innerHTML:null===(i=this.quote)||void 0===i?void 0:i.product.description}),s("form-control-radio",{label:`Accept coverage for ${p(null===(e=this.quote)||void 0===e?void 0:e.total_cents)}`,name:"opt-in",value:"true",checked:"true"===this.accepted,inputHandler:this.onChangeHandler.bind(this),errorText:this.error?" ":void 0}),s("form-control-radio",{label:"Decline coverage",name:"opt-in",value:"false",checked:"false"===this.accepted,inputHandler:this.onChangeHandler.bind(this),errorText:this.error?" ":void 0}),s("div",{class:"invalid-feedback",style:{display:this.error?"block":"none"},part:_},"Please select an option"),s("small",{part:g,innerHTML:null===(r=this.quote)||void 0===r?void 0:r.product.legal_disclaimer})))}};export{S as justifi_season_interruption_insurance}