@justifi/webcomponents 5.4.3 → 5.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (842) hide show
  1. package/dist/cjs/Api-KMweahmp.js +74 -0
  2. package/dist/cjs/{Business-d88b77fd.js → Business-DyiDiIuO.js} +1 -1
  3. package/dist/cjs/{Checkout-5352009d.js → Checkout-RAGvjVPj.js} +1 -1
  4. package/dist/cjs/{ComponentError-233ac749.js → ComponentError-C4MdBBMe.js} +1 -0
  5. package/dist/cjs/{Payment-bccd8f7d.js → Payment-CQCmj3Ck.js} +2 -2
  6. package/dist/cjs/{SubAccount-2a302ead.js → Refund-DpKGhW3o.js} +25 -1
  7. package/dist/cjs/_commonjsHelpers-BJu3ubxk.js +10 -0
  8. package/dist/cjs/additional-questions-details_5.cjs.entry.js +5 -11
  9. package/dist/cjs/{badge-364e6311.js → badge-BXpCpcer.js} +2 -2
  10. package/dist/cjs/bank-account-document-form-inputs_4.cjs.entry.js +25 -43
  11. package/dist/cjs/bank-account-form_9.cjs.entry.js +93 -97
  12. package/dist/cjs/{business-additional-questions-schema-8568cb79.js → business-additional-questions-schema-mzZ2gYHQ.js} +2 -2
  13. package/dist/cjs/business-details-core.cjs.entry.js +6 -10
  14. package/dist/cjs/{business-form-options-62e9c8ab.js → business-form-options-BCj0efiD.js} +1 -1
  15. package/dist/cjs/{business-identity-schema-518ab6eb.js → business-identity-schema-dt0zCW0R.js} +2 -2
  16. package/dist/cjs/{business.service-6e8a29a2.js → business.service-Crmkeulk.js} +23 -8
  17. package/dist/cjs/{button-4a9fd41e.js → button-KWTLx2LP.js} +2 -2
  18. package/dist/cjs/{check-pkg-version-64d3381a.js → check-pkg-version-CLsX6cK5.js} +3 -3
  19. package/dist/cjs/{checkout.service-0a7835dc.js → checkout.service-r90INf2g.js} +13 -10
  20. package/dist/cjs/checkouts-list-core.cjs.entry.js +25 -31
  21. package/dist/cjs/{payments-list-params-state-442d9944.js → checkouts-list-params-state-Cmfy_CND.js} +1 -1
  22. package/dist/cjs/{checkouts-table-8a1b49ff.js → checkouts-table-5jU4JUcM.js} +4 -4
  23. package/dist/cjs/custom-popper_4.cjs.entry.js +27 -52
  24. package/dist/cjs/{dispute.service-6efc7d7f.js → dispute.service-CGgfmGU-.js} +20 -11
  25. package/dist/cjs/{event-types-5a6ce2b0.js → event-types-CJapDsYA.js} +3 -3
  26. package/dist/cjs/form-alert_5.cjs.entry.js +10 -19
  27. package/dist/cjs/form-control-checkbox.cjs.entry.js +9 -18
  28. package/dist/cjs/form-control-date.cjs.entry.js +9 -19
  29. package/dist/cjs/{form-control-error-text-3cff9b7b.js → form-control-error-text-D19AMaOO.js} +2 -2
  30. package/dist/cjs/form-control-file-v2_2.cjs.entry.js +11 -30
  31. package/dist/cjs/{form-control-help-text-94ffed2c.js → form-control-help-text-CbrDvt9D.js} +2 -2
  32. package/dist/cjs/form-control-help-text.cjs.entry.js +1 -5
  33. package/dist/cjs/form-control-monetary-provisioning.cjs.entry.js +13 -22
  34. package/dist/cjs/form-control-monetary.cjs.entry.js +13 -22
  35. package/dist/cjs/form-control-number-masked_2.cjs.entry.js +12 -25
  36. package/dist/cjs/form-control-number.cjs.entry.js +9 -18
  37. package/dist/cjs/form-control-radio.cjs.entry.js +7 -17
  38. package/dist/cjs/{get-business-d8f5db51.js → get-business-BBzGEPBG.js} +3 -3
  39. package/dist/cjs/get-payment-details-CKg1Lb3_.js +42 -0
  40. package/dist/cjs/{get-payout-csv-7607c71e.js → get-payout-csv-DD9C5yMw.js} +11 -11
  41. package/dist/cjs/{get-subaccounts-ae5b35a8.js → get-subaccounts-YlFT-fBr.js} +11 -10
  42. package/dist/cjs/gross-payment-chart-core.cjs.entry.js +262 -270
  43. package/dist/cjs/{header-1-43b2b905.js → header-1-ZNnpq6yT.js} +2 -2
  44. package/dist/cjs/{header-3-eb250a04.js → header-3-D6LxdW_A.js} +2 -2
  45. package/dist/cjs/{helpers-602962eb.js → helpers-B5OCqlIM.js} +1 -1
  46. package/dist/cjs/{iframe-input-styles-state-d0de0b24.js → iframe-input-styles-state-CQL59u0d.js} +2 -2
  47. package/dist/cjs/iframe-input.cjs.entry.js +1640 -0
  48. package/dist/cjs/{index-750475a3.js → index-1MT3Z4XI.js} +1 -1
  49. package/dist/cjs/{index-d2d0b181.js → index-DhcqPIbT.js} +4 -5
  50. package/dist/cjs/{index-5b9a3b5f.js → index-DtkhH7sB.js} +460 -271
  51. package/dist/cjs/index.esm-CVuJLXJZ.js +11807 -0
  52. package/dist/cjs/{input-handlers-cff032bb.js → input-handlers-DYl_0IwC.js} +1 -1
  53. package/dist/cjs/{insurance-state-71f8b653.js → insurance-state-q5eNmjIK.js} +3 -3
  54. package/dist/cjs/justifi-additional-questions-form-step-core_6.cjs.entry.js +64 -94
  55. package/dist/cjs/justifi-additional-questions-form-step_9.cjs.entry.js +36 -86
  56. package/dist/cjs/justifi-additional-statement_8.cjs.entry.js +36 -54
  57. package/dist/cjs/justifi-business-details.cjs.entry.js +16 -20
  58. package/dist/cjs/justifi-business-form.cjs.entry.js +34 -38
  59. package/dist/cjs/justifi-business-representative-form-inputs.cjs.entry.js +6 -11
  60. package/dist/cjs/justifi-checkout-core.cjs.entry.js +31 -34
  61. package/dist/cjs/justifi-checkout.cjs.entry.js +23 -29
  62. package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +15 -18
  63. package/dist/cjs/justifi-checkouts-list.cjs.entry.js +25 -30
  64. package/dist/cjs/justifi-details.cjs.entry.js +3 -6
  65. package/dist/cjs/justifi-dispute-management-core.cjs.entry.js +5 -11
  66. package/dist/cjs/justifi-dispute-management.cjs.entry.js +19 -23
  67. package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +38 -52
  68. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +13 -16
  69. package/dist/cjs/justifi-order-terminals.cjs.entry.js +30 -39
  70. package/dist/cjs/justifi-owner-form_3.cjs.entry.js +29 -52
  71. package/dist/cjs/justifi-payment-details.cjs.entry.js +24 -52
  72. package/dist/cjs/justifi-payment-provisioning-core.cjs.entry.js +15 -23
  73. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +15 -16
  74. package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +11 -17
  75. package/dist/cjs/justifi-payments-list.cjs.entry.js +25 -29
  76. package/dist/cjs/justifi-payout-details.cjs.entry.js +21 -26
  77. package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +9 -12
  78. package/dist/cjs/justifi-payouts-list.cjs.entry.js +27 -33
  79. package/dist/cjs/justifi-refund-payment.cjs.entry.js +189 -69
  80. package/dist/cjs/justifi-season-interruption-insurance-core.cjs.entry.js +10 -27
  81. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +24 -35
  82. package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +24 -26
  83. package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +29 -29
  84. package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +21 -25
  85. package/dist/cjs/justifi-terminals-list.cjs.entry.js +26 -31
  86. package/dist/cjs/justifi-tokenize-payment-method.cjs.entry.js +24 -28
  87. package/dist/cjs/loader.cjs.js +3 -5
  88. package/dist/cjs/lodash-CvSCBJ_8.js +17216 -0
  89. package/dist/cjs/package-5B4P3NpD.js +9 -0
  90. package/dist/cjs/pagination-menu.cjs.entry.js +3 -5
  91. package/dist/cjs/{parts-5ca90f9a.js → parts-D_uKOPFe.js} +3 -1
  92. package/dist/cjs/payment-details-core.cjs.entry.js +19 -22
  93. package/dist/cjs/{payment-provisioning-actions-382ab48c.js → payment-provisioning-actions-BkWSDJQQ.js} +2 -2
  94. package/dist/cjs/payment.service-BrHUGHYs.js +23 -0
  95. package/dist/cjs/payments-list-core.cjs.entry.js +25 -30
  96. package/dist/cjs/{terminal-orders-list-params-state-c419078f.js → payments-list-params-state-Cmfy_CND.js} +1 -1
  97. package/dist/cjs/{payments-status-075aad0a.js → payments-status-DAzq_Z13.js} +2 -2
  98. package/dist/cjs/{payments-table-a076755a.js → payments-table-BEpL6oJQ.js} +4 -4
  99. package/dist/cjs/payout-details-core.cjs.entry.js +14 -18
  100. package/dist/cjs/payouts-list-core.cjs.entry.js +26 -33
  101. package/dist/cjs/{checkouts-list-params-state-644d3639.js → payouts-list-params-state-Cmfy_CND.js} +1 -1
  102. package/dist/cjs/{payouts-status-ced97c2b.js → payouts-status-CYrKPRld.js} +2 -2
  103. package/dist/cjs/{payouts-table-aedce326.js → payouts-table-Bbi23U5v.js} +4 -4
  104. package/dist/cjs/{schema-validations-a7cefbdf.js → schema-validations-p4OCdblz.js} +4 -4
  105. package/dist/cjs/{skeleton-e8aa41d0.js → skeleton-C59M0QK2.js} +2 -2
  106. package/dist/cjs/{spinner-580453f2.js → spinner-736baCoH.js} +2 -2
  107. package/dist/cjs/{styled-host-94309bab.js → styled-host-JifnTMIV.js} +2 -3
  108. package/dist/cjs/table-filters-menu.cjs.entry.js +4 -10
  109. package/dist/cjs/terminal-orders-list-core.cjs.entry.js +24 -29
  110. package/dist/cjs/{payouts-list-params-state-033b76d6.js → terminal-orders-list-params-state-Cmfy_CND.js} +1 -1
  111. package/dist/cjs/{terminal-orders-table-3b247193.js → terminal-orders-table-w4Yaf83b.js} +35 -5
  112. package/dist/cjs/terminal-quantity-selector.cjs.entry.js +6 -12
  113. package/dist/cjs/{terminal.service-ab62c344.js → terminal.service-BjSo5Cm4.js} +11 -11
  114. package/dist/cjs/terminals-list-core.cjs.entry.js +25 -31
  115. package/dist/cjs/terminals-list-params-state-Cmfy_CND.js +22 -0
  116. package/dist/cjs/{terminals-table-6710a76c.js → terminals-table-F6pkR97i.js} +6 -6
  117. package/dist/cjs/{utils-f8714daa.js → utils-D3seTk2e.js} +2 -2
  118. package/dist/cjs/utils-DmZ8Dia3.js +23987 -0
  119. package/dist/cjs/{utils-7a478c37.js → utils-l0veqT9y.js} +1 -1
  120. package/dist/cjs/webcomponents.cjs.js +7 -7
  121. package/dist/collection/actions/payment/get-payment-details.js +5 -2
  122. package/dist/collection/actions/refund/refund-actions.js +31 -0
  123. package/dist/collection/api/Api.js +32 -13
  124. package/dist/collection/api/ComponentError.js +1 -0
  125. package/dist/collection/api/Refund.js +32 -0
  126. package/dist/collection/api/TerminalOrder.js +3 -0
  127. package/dist/collection/api/index.js +1 -0
  128. package/dist/collection/api/services/analytics.service.js +1 -1
  129. package/dist/collection/api/services/business.service.js +22 -7
  130. package/dist/collection/api/services/checkout.service.js +6 -3
  131. package/dist/collection/api/services/dispute.service.js +13 -4
  132. package/dist/collection/api/services/insurance.service.js +8 -2
  133. package/dist/collection/api/services/payment.service.js +3 -3
  134. package/dist/collection/api/services/payout.service.js +3 -3
  135. package/dist/collection/api/services/provision.service.js +4 -1
  136. package/dist/collection/api/services/refund.service.js +10 -0
  137. package/dist/collection/api/services/reports.service.js +1 -1
  138. package/dist/collection/api/services/subaccounts.service.js +1 -1
  139. package/dist/collection/api/services/terminal.service.js +4 -4
  140. package/dist/collection/api/services/terminal_orders.service.js +5 -1
  141. package/dist/collection/collection-manifest.json +3 -5
  142. package/dist/collection/components/business-details/additional-questions-details/additional-questions-details.js +4 -4
  143. package/dist/collection/components/business-details/business-details-core.js +4 -3
  144. package/dist/collection/components/business-details/business-details.js +6 -8
  145. package/dist/collection/components/business-details/generic-info-details/generic-info-details.js +4 -4
  146. package/dist/collection/components/business-details/legal-address-details/legal-address-details.js +4 -4
  147. package/dist/collection/components/business-details/owner-details/owner-details.js +4 -4
  148. package/dist/collection/components/business-details/representative-details/representative-details.js +4 -4
  149. package/dist/collection/components/business-forms/business-form/additional-questions/additional-questions.js +4 -2
  150. package/dist/collection/components/business-forms/business-form/business-core-info/business-core-info.js +4 -2
  151. package/dist/collection/components/business-forms/business-form/business-form.js +20 -13
  152. package/dist/collection/components/business-forms/business-form/business-representative/business-representative.js +6 -4
  153. package/dist/collection/components/business-forms/business-form/legal-address-form/legal-address-form.js +4 -3
  154. package/dist/collection/components/business-forms/owner-form/identity-address/identity-address-form.js +11 -7
  155. package/dist/collection/components/business-forms/owner-form/owner-form-core.js +34 -22
  156. package/dist/collection/components/business-forms/owner-form/owner-form-inputs.js +10 -6
  157. package/dist/collection/components/business-forms/owner-form/owner-form.js +22 -19
  158. package/dist/collection/components/business-forms/payment-provisioning/additional-questions/business-additional-questions-form-step-core.js +15 -11
  159. package/dist/collection/components/business-forms/payment-provisioning/additional-questions/business-additional-questions-form-step.js +9 -10
  160. package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-document-inputs.js +11 -8
  161. package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-form-inputs.js +13 -10
  162. package/dist/collection/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step-core.js +23 -16
  163. package/dist/collection/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step.js +9 -12
  164. package/dist/collection/components/business-forms/payment-provisioning/bank-account/business-documents-on-file.js +6 -2
  165. package/dist/collection/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step-core.js +17 -12
  166. package/dist/collection/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step.js +9 -10
  167. package/dist/collection/components/business-forms/payment-provisioning/business-owners/business-owners-form-step-core.js +20 -14
  168. package/dist/collection/components/business-forms/payment-provisioning/business-owners/business-owners-form-step.js +9 -10
  169. package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-inputs.js +10 -6
  170. package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-step-core.js +14 -10
  171. package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-step.js +9 -10
  172. package/dist/collection/components/business-forms/payment-provisioning/form-control-monetary-provisioning.js +31 -21
  173. package/dist/collection/components/business-forms/payment-provisioning/legal-address-form/legal-address-form-step-core.js +14 -10
  174. package/dist/collection/components/business-forms/payment-provisioning/legal-address-form/legal-address-form-step.js +9 -10
  175. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-core.js +24 -16
  176. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-form-buttons.js +20 -14
  177. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-form-steps.js +21 -12
  178. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning.js +12 -8
  179. package/dist/collection/components/business-forms/payment-provisioning/terms-and-conditions/business-terms-conditions-form-step.js +13 -13
  180. package/dist/collection/components/checkout/bank-account-form/bank-account-form.js +3 -2
  181. package/dist/collection/components/checkout/billing-form/billing-form-schema.js +21 -0
  182. package/dist/collection/components/checkout/billing-form/billing-form.js +203 -0
  183. package/dist/collection/components/checkout/card-form/card-form.js +5 -4
  184. package/dist/collection/components/checkout/checkout-core.js +88 -37
  185. package/dist/collection/components/checkout/checkout.js +70 -28
  186. package/dist/collection/components/checkout/new-payment-method.js +110 -30
  187. package/dist/collection/components/checkout/payment-method-options.js +91 -36
  188. package/dist/collection/components/checkout/saved-payment-method.js +7 -4
  189. package/dist/collection/components/checkout/sezzle-payment-method.js +19 -15
  190. package/dist/collection/components/checkouts-list/checkouts-list-core.js +17 -14
  191. package/dist/collection/components/checkouts-list/checkouts-list-filters.js +7 -5
  192. package/dist/collection/components/checkouts-list/checkouts-list.js +16 -12
  193. package/dist/collection/components/dispute-management/dispute-management-core.js +11 -8
  194. package/dist/collection/components/dispute-management/dispute-management.js +12 -9
  195. package/dist/collection/components/dispute-management/dispute-notification.js +11 -9
  196. package/dist/collection/components/dispute-management/dispute-response/additional-statement.js +10 -9
  197. package/dist/collection/components/dispute-management/dispute-response/cancellation-policy.js +10 -8
  198. package/dist/collection/components/dispute-management/dispute-response/customer-details.js +10 -8
  199. package/dist/collection/components/dispute-management/dispute-response/dispute-response-core.js +21 -14
  200. package/dist/collection/components/dispute-management/dispute-response/dispute-response.js +16 -13
  201. package/dist/collection/components/dispute-management/dispute-response/duplicate-charge.js +10 -8
  202. package/dist/collection/components/dispute-management/dispute-response/electronic-evidence.js +10 -8
  203. package/dist/collection/components/dispute-management/dispute-response/product-or-service.js +10 -8
  204. package/dist/collection/components/dispute-management/dispute-response/refund-policy.js +10 -8
  205. package/dist/collection/components/dispute-management/dispute-response/shipping-details.js +10 -8
  206. package/dist/collection/components/gross-payment-chart/gross-payment-chart-core.js +5 -4
  207. package/dist/collection/components/gross-payment-chart/gross-payment-chart.js +7 -6
  208. package/dist/collection/components/insurance/season-interruption/season-interruption-insurance-core.js +44 -30
  209. package/dist/collection/components/insurance/season-interruption/season-interruption-insurance.js +40 -32
  210. package/dist/collection/components/order-terminals/order-terminals.js +20 -16
  211. package/dist/collection/components/order-terminals/terminal-quantity-selector/terminal-quantity-selector.js +19 -13
  212. package/dist/collection/components/payment-details/payment-details-core.js +13 -12
  213. package/dist/collection/components/payment-details/payment-details.js +29 -6
  214. package/dist/collection/components/payments-list/payments-list-core.js +12 -11
  215. package/dist/collection/components/payments-list/payments-list-filters.js +17 -12
  216. package/dist/collection/components/payments-list/payments-list.js +16 -11
  217. package/dist/collection/components/payout-details/payout-details-core.js +11 -8
  218. package/dist/collection/components/payout-details/payout-details.js +11 -9
  219. package/dist/collection/components/payouts-list/payouts-list-core.js +21 -16
  220. package/dist/collection/components/payouts-list/payouts-list-filters.js +8 -6
  221. package/dist/collection/components/payouts-list/payouts-list.js +16 -13
  222. package/dist/collection/components/refund-payment/refund-loading.js +6 -0
  223. package/dist/collection/components/refund-payment/refund-payment-schema.js +26 -11
  224. package/dist/collection/components/refund-payment/refund-payment.js +157 -57
  225. package/dist/collection/components/terminal-orders-list/terminal-order-status.js +15 -0
  226. package/dist/collection/components/terminal-orders-list/terminal-orders-list-core.js +12 -11
  227. package/dist/collection/components/terminal-orders-list/terminal-orders-list-filters.js +18 -11
  228. package/dist/collection/components/terminal-orders-list/terminal-orders-list.js +16 -11
  229. package/dist/collection/components/terminal-orders-list/terminal-orders-table.js +11 -1
  230. package/dist/collection/components/terminals-list/terminals-list-core.js +17 -14
  231. package/dist/collection/components/terminals-list/terminals-list-filters.js +10 -7
  232. package/dist/collection/components/terminals-list/terminals-list.js +16 -12
  233. package/dist/collection/components/terminals-list/terminals-table.js +2 -2
  234. package/dist/collection/components/tokenize-payment-method/tokenize-payment-method.js +71 -19
  235. package/dist/collection/styles/parts.js +2 -1
  236. package/dist/collection/ui-components/custom-popper/custom-popper.js +19 -8
  237. package/dist/collection/ui-components/details/details.js +3 -4
  238. package/dist/collection/ui-components/filters/table-filters-menu.js +8 -7
  239. package/dist/collection/ui-components/form/form-control-checkbox.js +25 -17
  240. package/dist/collection/ui-components/form/form-control-date.js +32 -21
  241. package/dist/collection/ui-components/form/form-control-file-v2.js +23 -18
  242. package/dist/collection/ui-components/form/form-control-file.js +28 -21
  243. package/dist/collection/ui-components/form/form-control-monetary.js +35 -23
  244. package/dist/collection/ui-components/form/form-control-number-masked.js +28 -19
  245. package/dist/collection/ui-components/form/form-control-number.js +25 -17
  246. package/dist/collection/ui-components/form/form-control-radio.js +28 -19
  247. package/dist/collection/ui-components/form/form-control-select.js +29 -19
  248. package/dist/collection/ui-components/form/form-control-text.js +32 -21
  249. package/dist/collection/ui-components/form/form-control-textarea.js +32 -21
  250. package/dist/collection/ui-components/form/form-helpers/form-alert/form-alert.js +6 -6
  251. package/dist/collection/ui-components/form/form-helpers/form-control-help-text/form-control-help-text.js +6 -6
  252. package/dist/collection/ui-components/form/form-helpers/form-control-tooltip/form-control-tooltip.js +3 -6
  253. package/dist/collection/ui-components/form/hidden-input.js +1 -1
  254. package/dist/collection/ui-components/form/iframe-input.js +14 -12
  255. package/dist/collection/ui-components/pagination-menu/pagination-menu.js +6 -0
  256. package/dist/collection/utils/utils.js +8 -0
  257. package/dist/docs.d.ts +8 -0
  258. package/dist/docs.json +1844 -905
  259. package/dist/esm/Api-C9CDE-UM.js +72 -0
  260. package/dist/esm/{Business-0855931c.js → Business-D6XNzizo.js} +2 -2
  261. package/dist/esm/{Checkout-18d8bf94.js → Checkout-Dfpql997.js} +1 -1
  262. package/dist/esm/{ComponentError-c61dce41.js → ComponentError-SdntD1xf.js} +2 -1
  263. package/dist/esm/{Document-1907c0d4.js → Document-Ct-uNz2r.js} +1 -1
  264. package/dist/esm/{Payment-806af354.js → Payment-BADkZFaz.js} +2 -2
  265. package/dist/esm/{SubAccount-7520271c.js → Refund-t_P1yy9d.js} +25 -2
  266. package/dist/esm/_commonjsHelpers-BFTU3MAI.js +7 -0
  267. package/dist/esm/additional-questions-details_5.entry.js +5 -9
  268. package/dist/esm/{badge-1be14e8c.js → badge-C4TzL9CB.js} +3 -3
  269. package/dist/esm/bank-account-document-form-inputs_4.entry.js +25 -41
  270. package/dist/esm/bank-account-form_9.entry.js +91 -93
  271. package/dist/esm/{business-additional-questions-schema-56308a54.js → business-additional-questions-schema-W6okG5Xu.js} +2 -2
  272. package/dist/esm/business-details-core.entry.js +6 -8
  273. package/dist/esm/{business-form-options-86a13078.js → business-form-options-Bn05PRR4.js} +1 -1
  274. package/dist/esm/{business-identity-schema-24fcc4ef.js → business-identity-schema-lqdJS3MT.js} +2 -2
  275. package/dist/esm/{business.service-999196a4.js → business.service-B136meVo.js} +23 -8
  276. package/dist/esm/{button-fcee4da7.js → button-CI85Rqy5.js} +2 -2
  277. package/dist/esm/{check-pkg-version-bbd75fa0.js → check-pkg-version-Wd4E_Njt.js} +3 -3
  278. package/dist/esm/{checkout.service-e38e477f.js → checkout.service-4tnXBKGq.js} +13 -10
  279. package/dist/esm/checkouts-list-core.entry.js +25 -29
  280. package/dist/esm/{checkouts-list-params-state-7bdf00bd.js → checkouts-list-params-state-Gbxdxjoi.js} +1 -1
  281. package/dist/esm/{checkouts-table-39a031a0.js → checkouts-table-CHM4YCCZ.js} +4 -4
  282. package/dist/esm/custom-popper_4.entry.js +27 -50
  283. package/dist/esm/{dispute.service-7ba6d5a4.js → dispute.service-Bwh8pBe9.js} +20 -11
  284. package/dist/esm/{event-types-1bc52f1f.js → event-types-CooIFpFI.js} +3 -3
  285. package/dist/esm/form-alert_5.entry.js +10 -17
  286. package/dist/esm/form-control-checkbox.entry.js +9 -16
  287. package/dist/esm/form-control-date.entry.js +9 -17
  288. package/dist/esm/{form-control-error-text-176d20d8.js → form-control-error-text-3q5yVuMQ.js} +2 -2
  289. package/dist/esm/form-control-file-v2_2.entry.js +11 -28
  290. package/dist/esm/{form-control-help-text-83764e14.js → form-control-help-text-BplkZkPF.js} +2 -2
  291. package/dist/esm/form-control-help-text.entry.js +1 -3
  292. package/dist/esm/form-control-monetary-provisioning.entry.js +13 -20
  293. package/dist/esm/form-control-monetary.entry.js +13 -20
  294. package/dist/esm/form-control-number-masked_2.entry.js +12 -23
  295. package/dist/esm/form-control-number.entry.js +9 -16
  296. package/dist/esm/form-control-radio.entry.js +7 -15
  297. package/dist/esm/{get-business-b7511690.js → get-business-B3c5gg1D.js} +3 -3
  298. package/dist/esm/get-payment-details-BbZmEGge.js +40 -0
  299. package/dist/esm/{get-payout-csv-fa34f40b.js → get-payout-csv-BKq22mOI.js} +11 -11
  300. package/dist/esm/{get-subaccounts-3c6b9e84.js → get-subaccounts-58LQOtEI.js} +10 -9
  301. package/dist/esm/gross-payment-chart-core.entry.js +262 -268
  302. package/dist/esm/{header-1-215a146f.js → header-1-BX6i3__G.js} +2 -2
  303. package/dist/esm/{header-3-afd16f23.js → header-3-D0Sy-7DJ.js} +2 -2
  304. package/dist/esm/{helpers-96ea3464.js → helpers-Mu7LQT-w.js} +2 -2
  305. package/dist/esm/{iframe-input-styles-state-ff730fe5.js → iframe-input-styles-state-DyXIZw1A.js} +3 -3
  306. package/dist/esm/iframe-input.entry.js +1638 -0
  307. package/dist/esm/{index-29fcfdf5.js → index-BUM1DfV9.js} +459 -250
  308. package/dist/esm/{index-d9a73ce3.js → index-Ce_F4E0f.js} +1 -1
  309. package/dist/esm/{index-a47fdc7f.js → index-Cuk6aIda.js} +4 -5
  310. package/dist/esm/index.esm-BCNUj0Dx.js +11801 -0
  311. package/dist/esm/{input-handlers-270ac806.js → input-handlers-CX6mSvOM.js} +1 -1
  312. package/dist/esm/{insurance-state-d2df8e88.js → insurance-state-BhklYgGK.js} +3 -3
  313. package/dist/esm/justifi-additional-questions-form-step-core_6.entry.js +64 -92
  314. package/dist/esm/justifi-additional-questions-form-step_9.entry.js +36 -84
  315. package/dist/esm/justifi-additional-statement_8.entry.js +36 -52
  316. package/dist/esm/justifi-business-details.entry.js +16 -18
  317. package/dist/esm/justifi-business-form.entry.js +34 -36
  318. package/dist/esm/justifi-business-representative-form-inputs.entry.js +6 -9
  319. package/dist/esm/justifi-checkout-core.entry.js +31 -32
  320. package/dist/esm/justifi-checkout.entry.js +23 -27
  321. package/dist/esm/justifi-checkouts-list-filters.entry.js +15 -16
  322. package/dist/esm/justifi-checkouts-list.entry.js +25 -28
  323. package/dist/esm/justifi-details.entry.js +3 -4
  324. package/dist/esm/justifi-dispute-management-core.entry.js +5 -9
  325. package/dist/esm/justifi-dispute-management.entry.js +19 -21
  326. package/dist/esm/justifi-dispute-notification_3.entry.js +38 -50
  327. package/dist/esm/justifi-gross-payment-chart.entry.js +13 -14
  328. package/dist/esm/justifi-order-terminals.entry.js +27 -34
  329. package/dist/esm/justifi-owner-form_3.entry.js +29 -50
  330. package/dist/esm/justifi-payment-details.entry.js +22 -48
  331. package/dist/esm/justifi-payment-provisioning-core.entry.js +15 -21
  332. package/dist/esm/justifi-payment-provisioning.entry.js +15 -14
  333. package/dist/esm/justifi-payments-list-filters.entry.js +11 -15
  334. package/dist/esm/justifi-payments-list.entry.js +25 -27
  335. package/dist/esm/justifi-payout-details.entry.js +20 -23
  336. package/dist/esm/justifi-payouts-list-filters.entry.js +9 -10
  337. package/dist/esm/justifi-payouts-list.entry.js +26 -30
  338. package/dist/esm/justifi-refund-payment.entry.js +189 -67
  339. package/dist/esm/justifi-season-interruption-insurance-core.entry.js +10 -25
  340. package/dist/esm/justifi-season-interruption-insurance.entry.js +24 -33
  341. package/dist/esm/justifi-terminal-orders-list-filters.entry.js +19 -19
  342. package/dist/esm/justifi-terminal-orders-list.entry.js +28 -26
  343. package/dist/esm/justifi-terminals-list-filters.entry.js +17 -19
  344. package/dist/esm/justifi-terminals-list.entry.js +25 -28
  345. package/dist/esm/justifi-tokenize-payment-method.entry.js +24 -26
  346. package/dist/esm/loader.js +4 -4
  347. package/dist/esm/lodash-BqWxUrkh.js +17214 -0
  348. package/dist/esm/package-gAO-RwrF.js +7 -0
  349. package/dist/esm/pagination-menu.entry.js +3 -3
  350. package/dist/esm/{parts-fd740f54.js → parts-CB88j97I.js} +3 -2
  351. package/dist/esm/payment-details-core.entry.js +19 -20
  352. package/dist/esm/{payment-provisioning-actions-beadac34.js → payment-provisioning-actions-CZYFFdTf.js} +3 -3
  353. package/dist/esm/payment.service-Co_fPTvK.js +21 -0
  354. package/dist/esm/payments-list-core.entry.js +25 -28
  355. package/dist/esm/{payments-list-params-state-d05b24aa.js → payments-list-params-state-Gbxdxjoi.js} +1 -1
  356. package/dist/esm/{payments-status-74d22728.js → payments-status-BLhcMfnC.js} +2 -2
  357. package/dist/esm/{payments-table-8134f5e1.js → payments-table-VcaC77NC.js} +4 -4
  358. package/dist/esm/payout-details-core.entry.js +14 -16
  359. package/dist/esm/payouts-list-core.entry.js +26 -31
  360. package/dist/esm/{payouts-list-params-state-ebcee300.js → payouts-list-params-state-Gbxdxjoi.js} +1 -1
  361. package/dist/esm/{payouts-status-29d31099.js → payouts-status-B9SSljnL.js} +2 -2
  362. package/dist/esm/{payouts-table-c1ced46a.js → payouts-table-DWBaNPmV.js} +4 -4
  363. package/dist/esm/{schema-validations-5af4266a.js → schema-validations-BsbYeDDR.js} +5 -5
  364. package/dist/esm/{skeleton-ab3f676e.js → skeleton-B-oFGeeG.js} +2 -2
  365. package/dist/esm/{spinner-27479716.js → spinner-ptEcaLdc.js} +2 -2
  366. package/dist/esm/{styled-host-32228b45.js → styled-host-BHVh70Zk.js} +2 -3
  367. package/dist/esm/table-filters-menu.entry.js +4 -8
  368. package/dist/esm/terminal-orders-list-core.entry.js +24 -27
  369. package/dist/esm/{terminal-orders-list-params-state-8fec0a0b.js → terminal-orders-list-params-state-Gbxdxjoi.js} +1 -1
  370. package/dist/esm/{terminal-orders-table-93e84d25.js → terminal-orders-table-fuxIpfJ2.js} +35 -5
  371. package/dist/esm/terminal-quantity-selector.entry.js +6 -10
  372. package/dist/esm/{terminal.service-d173566d.js → terminal.service-BLOZ-ZlR.js} +11 -11
  373. package/dist/esm/terminals-list-core.entry.js +25 -29
  374. package/dist/esm/terminals-list-params-state-Gbxdxjoi.js +16 -0
  375. package/dist/esm/{terminals-table-5eb287ca.js → terminals-table-Dn71oQMb.js} +6 -6
  376. package/dist/esm/{utils-96d9c205.js → utils-B4pV3GWr.js} +2 -2
  377. package/dist/esm/utils-BWcTxbSg.js +23969 -0
  378. package/dist/esm/{utils-fd99b806.js → utils-Dccsn9BY.js} +2 -2
  379. package/dist/esm/webcomponents.js +6 -5
  380. package/dist/module/Api.js +32 -76
  381. package/dist/module/Business.js +2 -2
  382. package/dist/module/ComponentError.js +2 -1
  383. package/dist/module/Document.js +1 -1
  384. package/dist/module/{SubAccount.js → Refund.js} +24 -1
  385. package/dist/module/_commonjsHelpers.js +7 -0
  386. package/dist/module/additional-questions-details2.js +1 -2
  387. package/dist/module/additional-questions.js +2 -3
  388. package/dist/module/additional-statement.js +6 -9
  389. package/dist/module/badge.js +1 -1
  390. package/dist/module/bank-account-document-inputs.js +4 -6
  391. package/dist/module/bank-account-form-inputs2.js +1 -5
  392. package/dist/module/bank-account-form2.js +0 -1
  393. package/dist/module/billing-form.js +122 -4
  394. package/dist/module/business-additional-questions-form-step-core.js +7 -11
  395. package/dist/module/business-additional-questions-form-step.js +1 -6
  396. package/dist/module/business-additional-questions-schema.js +1 -1
  397. package/dist/module/business-address-schema.js +1 -1
  398. package/dist/module/business-bank-account-form-step-core.js +13 -18
  399. package/dist/module/business-bank-account-form-step.js +3 -9
  400. package/dist/module/business-core-info-form-step-core.js +6 -11
  401. package/dist/module/business-core-info-form-step.js +1 -6
  402. package/dist/module/business-core-info-schema.js +1 -1
  403. package/dist/module/business-core-info.js +2 -3
  404. package/dist/module/business-details-core2.js +1 -3
  405. package/dist/module/business-documents-on-file2.js +1 -1
  406. package/dist/module/business-form-options.js +1 -1
  407. package/dist/module/business-identity-schema.js +1 -1
  408. package/dist/module/business-owners-form-step-core.js +5 -11
  409. package/dist/module/business-owners-form-step.js +1 -6
  410. package/dist/module/business-representative-form-inputs.js +1 -4
  411. package/dist/module/business-representative-form-step-core.js +5 -9
  412. package/dist/module/business-representative-form-step.js +1 -6
  413. package/dist/module/business-representative.js +3 -4
  414. package/dist/module/business-terms-conditions-form-step.js +6 -12
  415. package/dist/module/business.service.js +22 -7
  416. package/dist/module/button.js +1 -1
  417. package/dist/module/cancellation-policy.js +6 -8
  418. package/dist/module/card-form2.js +2 -3
  419. package/dist/module/check-pkg-version.js +1 -1
  420. package/dist/module/checkout-core.js +57 -69
  421. package/dist/module/checkout.service.js +7 -4
  422. package/dist/module/checkouts-list-core2.js +12 -17
  423. package/dist/module/custom-popper2.js +13 -16
  424. package/dist/module/customer-details.js +6 -8
  425. package/dist/module/details.js +0 -1
  426. package/dist/module/dispute-management-core.js +4 -8
  427. package/dist/module/dispute-notification.js +3 -6
  428. package/dist/module/dispute-response-actions.js +16 -7
  429. package/dist/module/dispute-response-core.js +12 -16
  430. package/dist/module/dispute-response.js +6 -12
  431. package/dist/module/duplicate-charge.js +6 -8
  432. package/dist/module/electronic-evidence.js +5 -7
  433. package/dist/module/event-types2.js +21 -61
  434. package/dist/module/event-types3.js +61 -21
  435. package/dist/module/form-alert2.js +1 -3
  436. package/dist/module/form-control-checkbox2.js +6 -13
  437. package/dist/module/form-control-date2.js +6 -14
  438. package/dist/module/form-control-file-v22.js +2 -10
  439. package/dist/module/form-control-file2.js +5 -15
  440. package/dist/module/form-control-help-text.js +1 -1
  441. package/dist/module/form-control-help-text2.js +30 -9
  442. package/dist/module/form-control-help-text3.js +9 -32
  443. package/dist/module/form-control-monetary-provisioning2.js +8 -15
  444. package/dist/module/form-control-monetary2.js +9 -17
  445. package/dist/module/form-control-number-masked2.js +4 -12
  446. package/dist/module/form-control-number.js +6 -13
  447. package/dist/module/form-control-radio2.js +6 -14
  448. package/dist/module/form-control-select2.js +5 -13
  449. package/dist/module/form-control-text2.js +5 -14
  450. package/dist/module/form-control-textarea2.js +7 -16
  451. package/dist/module/form-control-tooltip2.js +0 -3
  452. package/dist/module/form.js +9773 -903
  453. package/dist/module/generic-info-details2.js +0 -1
  454. package/dist/module/get-business.js +2 -2
  455. package/dist/module/get-payment-details.js +40 -0
  456. package/dist/module/get-payout-csv.js +6 -6
  457. package/dist/module/get-subaccounts.js +5 -4
  458. package/dist/module/gross-payment-chart-core2.js +257 -264
  459. package/dist/module/helpers.js +1 -1
  460. package/dist/module/hidden-input2.js +3 -3
  461. package/dist/module/identity-address-form.js +2 -5
  462. package/dist/module/iframe-input-styles-state.js +2 -2
  463. package/dist/module/iframe-input2.js +1481 -1478
  464. package/dist/module/index2.js +3 -4
  465. package/dist/module/index3.js +1 -1
  466. package/dist/module/{billing-form.d.ts → justifi-billing-form.d.ts} +4 -4
  467. package/dist/module/justifi-billing-form.js +6 -0
  468. package/dist/module/justifi-business-details.js +1 -5
  469. package/dist/module/justifi-business-form.js +7 -10
  470. package/dist/module/justifi-checkout.js +47 -62
  471. package/dist/module/justifi-checkouts-list-filters.js +4 -5
  472. package/dist/module/justifi-checkouts-list.js +8 -11
  473. package/dist/module/justifi-dispute-management.js +6 -9
  474. package/dist/module/justifi-gross-payment-chart.js +4 -7
  475. package/dist/module/justifi-order-terminals.js +7 -15
  476. package/dist/module/justifi-payment-details.js +6 -38
  477. package/dist/module/justifi-payment-provisioning.js +5 -6
  478. package/dist/module/justifi-payments-list-filters.js +6 -11
  479. package/dist/module/justifi-payments-list.js +8 -10
  480. package/dist/module/justifi-payout-details.js +6 -9
  481. package/dist/module/justifi-payouts-list-filters.js +4 -6
  482. package/dist/module/justifi-payouts-list.js +8 -12
  483. package/dist/module/justifi-refund-payment.js +184 -61
  484. package/dist/module/justifi-season-interruption-insurance.js +13 -23
  485. package/dist/module/justifi-terminal-orders-list-filters.js +8 -9
  486. package/dist/module/justifi-terminal-orders-list.js +13 -11
  487. package/dist/module/justifi-terminals-list-filters.js +6 -8
  488. package/dist/module/justifi-terminals-list.js +8 -11
  489. package/dist/module/justifi-tokenize-payment-method.js +46 -58
  490. package/dist/module/legal-address-details2.js +1 -2
  491. package/dist/module/legal-address-form-step-core.js +6 -10
  492. package/dist/module/legal-address-form-step.js +1 -6
  493. package/dist/module/legal-address-form.js +1 -3
  494. package/dist/module/lodash.js +17201 -17191
  495. package/dist/module/new-payment-method.js +43 -55
  496. package/dist/module/owner-details2.js +0 -1
  497. package/dist/module/owner-form-core2.js +8 -18
  498. package/dist/module/owner-form-inputs2.js +1 -4
  499. package/dist/module/owner-form.js +1 -11
  500. package/dist/module/package.js +3 -77
  501. package/dist/module/pagination-menu2.js +1 -1
  502. package/dist/module/parts.js +3 -2
  503. package/dist/module/payment-details-core2.js +11 -13
  504. package/dist/module/payment-method-options.js +43 -61
  505. package/dist/module/payment-provisioning-actions.js +2 -2
  506. package/dist/module/payment-provisioning-core.js +8 -14
  507. package/dist/module/payment-provisioning-form-buttons.js +2 -8
  508. package/dist/module/payment-provisioning-form-steps.js +2 -7
  509. package/dist/module/payment.service.js +4 -4
  510. package/dist/module/payments-list-core2.js +10 -14
  511. package/dist/module/payout-details-core2.js +6 -9
  512. package/dist/module/payouts-list-core2.js +14 -20
  513. package/dist/module/product-or-service.js +5 -7
  514. package/dist/module/refund-policy.js +6 -8
  515. package/dist/module/representative-details2.js +0 -1
  516. package/dist/module/saved-payment-method.js +4 -6
  517. package/dist/module/schema-validations.js +2 -2
  518. package/dist/module/season-interruption-insurance-core.js +4 -20
  519. package/dist/module/sezzle-payment-method.js +3 -12
  520. package/dist/module/shipping-details.js +6 -8
  521. package/dist/module/spinner.js +1 -1
  522. package/dist/module/styled-host.js +1 -2
  523. package/dist/module/table-filters-menu2.js +3 -7
  524. package/dist/module/terminal-orders-list-core2.js +35 -15
  525. package/dist/module/terminal-quantity-selector2.js +4 -8
  526. package/dist/module/terminal.service.js +5 -5
  527. package/dist/module/terminals-list-core2.js +14 -19
  528. package/dist/module/utils.js +1 -1
  529. package/dist/module/utils2.js +23787 -3819
  530. package/dist/module/utils4.js +2 -2
  531. package/dist/types/actions/payment/get-payment-details.d.ts +4 -2
  532. package/dist/types/actions/refund/refund-actions.d.ts +12 -0
  533. package/dist/types/api/Api.d.ts +30 -5
  534. package/dist/types/api/ComponentError.d.ts +2 -1
  535. package/dist/types/api/Payment.d.ts +1 -11
  536. package/dist/types/api/Refund.d.ts +45 -0
  537. package/dist/types/api/TerminalOrder.d.ts +4 -1
  538. package/dist/types/api/index.d.ts +1 -0
  539. package/dist/types/api/services/payment.service.d.ts +2 -2
  540. package/dist/types/api/services/refund.service.d.ts +7 -0
  541. package/dist/types/components/business-forms/payment-provisioning/form-control-monetary-provisioning.d.ts +1 -1
  542. package/dist/types/components/business-forms/schemas/business-form-schema.d.ts +3 -3
  543. package/dist/types/components/business-forms/schemas/business-identity-schema.d.ts +1 -1
  544. package/dist/types/components/checkout/{billing-forms → billing-form}/billing-form-schema.d.ts +1 -11
  545. package/dist/types/components/checkout/{billing-forms/billing-form → billing-form}/billing-form.d.ts +8 -6
  546. package/dist/types/components/checkout/checkout-core.d.ts +6 -2
  547. package/dist/types/components/checkout/checkout.d.ts +6 -2
  548. package/dist/types/components/checkout/new-payment-method.d.ts +7 -3
  549. package/dist/types/components/checkout/payment-method-options.d.ts +6 -2
  550. package/dist/types/components/order-terminals/order-terminals.d.ts +0 -1
  551. package/dist/types/components/payment-details/payment-details.d.ts +1 -0
  552. package/dist/types/components/refund-payment/refund-loading.d.ts +1 -0
  553. package/dist/types/components/refund-payment/refund-payment-schema.d.ts +6 -6
  554. package/dist/types/components/refund-payment/refund-payment.d.ts +18 -12
  555. package/dist/types/components/terminal-orders-list/terminal-orders-list-filters.d.ts +1 -1
  556. package/dist/types/components/terminals-list/terminals-table.d.ts +2 -2
  557. package/dist/types/components/tokenize-payment-method/tokenize-payment-method.d.ts +4 -0
  558. package/dist/types/components.d.ts +45 -74
  559. package/dist/types/stencil-public-runtime.d.ts +9 -0
  560. package/dist/types/styles/parts.d.ts +6 -5
  561. package/dist/types/ui-components/form/form-control-monetary.d.ts +1 -1
  562. package/dist/types/utils/utils.d.ts +1 -0
  563. package/dist/webcomponents/{p-701a13ca.js → p-01wziNa9.js} +1 -1
  564. package/dist/webcomponents/p-063dd981.entry.js +1 -0
  565. package/dist/webcomponents/p-08d5b491.entry.js +1 -0
  566. package/dist/webcomponents/p-0czqizJW.js +1 -0
  567. package/dist/webcomponents/p-1049c0c5.entry.js +1 -0
  568. package/dist/webcomponents/p-1ydcg9ti.js +1 -0
  569. package/dist/webcomponents/p-2c2f6743.entry.js +1 -0
  570. package/dist/webcomponents/p-2d80f427.entry.js +1 -0
  571. package/dist/webcomponents/p-2f6c0a07.entry.js +1 -0
  572. package/dist/webcomponents/p-2fe9576b.entry.js +1 -0
  573. package/dist/webcomponents/p-307a0db6.entry.js +1 -0
  574. package/dist/webcomponents/p-3147bfe2.entry.js +1 -0
  575. package/dist/webcomponents/p-332ce001.entry.js +1 -0
  576. package/dist/webcomponents/p-34cfafed.entry.js +1 -0
  577. package/dist/webcomponents/p-3995c8b8.entry.js +1 -0
  578. package/dist/webcomponents/p-3e084a0e.entry.js +1 -0
  579. package/dist/webcomponents/p-43c1c278.entry.js +1 -0
  580. package/dist/webcomponents/p-456f8c0a.entry.js +1 -0
  581. package/dist/webcomponents/p-4addd069.entry.js +1 -0
  582. package/dist/webcomponents/p-4ee6482d.entry.js +1 -0
  583. package/dist/webcomponents/p-507f7a31.entry.js +1 -0
  584. package/dist/webcomponents/p-50aa4e4d.entry.js +1 -0
  585. package/dist/webcomponents/p-5a07a84c.entry.js +1 -0
  586. package/dist/webcomponents/p-5dc3a795.entry.js +1 -0
  587. package/dist/webcomponents/p-62bdcca1.entry.js +1 -0
  588. package/dist/webcomponents/p-65345bd4.entry.js +1 -0
  589. package/dist/webcomponents/p-6a54d69b.entry.js +1 -0
  590. package/dist/webcomponents/p-6c4927e7.entry.js +1 -0
  591. package/dist/webcomponents/p-6d2a48f5.entry.js +1 -0
  592. package/dist/webcomponents/p-7414b942.entry.js +1 -0
  593. package/dist/webcomponents/p-7ddd7122.entry.js +20 -0
  594. package/dist/webcomponents/p-80dca817.entry.js +1 -0
  595. package/dist/webcomponents/p-815937bb.entry.js +1 -0
  596. package/dist/webcomponents/p-86fdc0a1.entry.js +1 -0
  597. package/dist/webcomponents/p-98111d03.entry.js +1 -0
  598. package/dist/webcomponents/p-9a9bb294.entry.js +1 -0
  599. package/dist/webcomponents/p-9bbfde16.entry.js +1 -0
  600. package/dist/webcomponents/p-B7ErpLYA.js +1 -0
  601. package/dist/webcomponents/p-BBsCnePk.js +1 -0
  602. package/dist/webcomponents/p-BFTU3MAI.js +1 -0
  603. package/dist/webcomponents/p-BHHWVg32.js +1 -0
  604. package/dist/webcomponents/p-BHbsXXRt.js +1 -0
  605. package/dist/webcomponents/p-BM61p7vG.js +1 -0
  606. package/dist/webcomponents/p-BODr6HXb.js +1 -0
  607. package/dist/webcomponents/p-BUM1DfV9.js +2 -0
  608. package/dist/webcomponents/p-BVwkHwTc.js +1 -0
  609. package/dist/webcomponents/p-BWFriesi.js +1 -0
  610. package/dist/webcomponents/p-Bde7dY9t.js +9 -0
  611. package/dist/webcomponents/{p-1366a019.js → p-BjB_yKBJ.js} +1 -1
  612. package/dist/webcomponents/p-Bo92MHrs.js +1 -0
  613. package/dist/webcomponents/p-BoPxMyJA.js +1 -0
  614. package/dist/webcomponents/{p-5d1d2fd7.js → p-BrvbVMVq.js} +1 -1
  615. package/dist/webcomponents/{p-a5579f53.js → p-BuYnqWwT.js} +1 -1
  616. package/dist/webcomponents/p-BxPlB-C5.js +1 -0
  617. package/dist/webcomponents/{p-3f5e6602.js → p-Bxs6fi7a.js} +1 -1
  618. package/dist/webcomponents/{p-bfe9748b.js → p-C3nDCvFQ.js} +1 -1
  619. package/dist/webcomponents/{p-87f8c596.js → p-C5RuuShs.js} +1 -1
  620. package/dist/webcomponents/p-CB88j97I.js +1 -0
  621. package/dist/webcomponents/p-CGz3XHQc.js +1 -0
  622. package/dist/webcomponents/p-CLBRsaLx.js +1 -0
  623. package/dist/webcomponents/{p-4cc3c7f9.js → p-CTBH4Lj9.js} +1 -1
  624. package/dist/webcomponents/p-CYsU0lEI.js +1 -0
  625. package/dist/webcomponents/p-CjunQqer.js +1 -0
  626. package/dist/webcomponents/{p-12074378.js → p-CnyMKcfC.js} +1 -1
  627. package/dist/webcomponents/p-CpTwq2jw.js +1 -0
  628. package/dist/webcomponents/{p-61f0a2ce.js → p-Ct-uNz2r.js} +1 -1
  629. package/dist/webcomponents/p-CwHcfOV7.js +1 -0
  630. package/dist/webcomponents/p-Cy4aIACq.js +1 -0
  631. package/dist/webcomponents/p-D7s2671S.js +1 -0
  632. package/dist/webcomponents/{p-ca6cdfe6.js → p-D89x2FYg.js} +1 -1
  633. package/dist/webcomponents/p-D9t-X0IY.js +1 -0
  634. package/dist/webcomponents/p-DLpKiPxJ.js +1 -0
  635. package/dist/webcomponents/p-DVnVdicA.js +1 -0
  636. package/dist/webcomponents/p-DhEfW-kS.js +1 -0
  637. package/dist/webcomponents/p-DhQ2XlhY.js +1 -0
  638. package/dist/webcomponents/p-Dna7whFY.js +1 -0
  639. package/dist/webcomponents/p-DoH48u6u.js +1 -0
  640. package/dist/webcomponents/p-Dt-vy9Le.js +1 -0
  641. package/dist/webcomponents/p-DzPbgN8M.js +1 -0
  642. package/dist/webcomponents/{p-c9b78275.js → p-IA90llLO.js} +1 -1
  643. package/dist/webcomponents/p-JcczGkik.js +1 -0
  644. package/dist/webcomponents/p-QYQ4VLoz.js +1 -0
  645. package/dist/webcomponents/{p-9dd8685c.js → p-SdntD1xf.js} +1 -1
  646. package/dist/webcomponents/p-ZUQEru6m.js +1 -0
  647. package/dist/webcomponents/p-a22974fd.entry.js +1 -0
  648. package/dist/webcomponents/p-a2bf5919.entry.js +1 -0
  649. package/dist/webcomponents/p-a9eff0f2.entry.js +1 -0
  650. package/dist/webcomponents/p-ab99e4c6.entry.js +1 -0
  651. package/dist/webcomponents/p-b7053613.entry.js +1 -0
  652. package/dist/webcomponents/p-bb8f7062.entry.js +1 -0
  653. package/dist/webcomponents/p-be04a09c.entry.js +1 -0
  654. package/dist/webcomponents/p-bplwtwD3.js +1 -0
  655. package/dist/webcomponents/p-c38c742e.entry.js +1 -0
  656. package/dist/webcomponents/p-c558725e.entry.js +1 -0
  657. package/dist/webcomponents/p-c6534f5f.entry.js +1 -0
  658. package/dist/webcomponents/p-c6cf707c.entry.js +1 -0
  659. package/dist/webcomponents/p-c70dcec1.entry.js +1 -0
  660. package/dist/webcomponents/p-c8d608a1.entry.js +1 -0
  661. package/dist/webcomponents/p-ce20d709.entry.js +1 -0
  662. package/dist/webcomponents/p-cf8f69de.entry.js +1 -0
  663. package/dist/webcomponents/p-d5675bf5.entry.js +1 -0
  664. package/dist/webcomponents/p-def42fc7.entry.js +1 -0
  665. package/dist/webcomponents/p-dfcf19f2.entry.js +1 -0
  666. package/dist/webcomponents/p-e0896deb.entry.js +1 -0
  667. package/dist/webcomponents/p-e3962860.entry.js +1 -0
  668. package/dist/webcomponents/p-e3cd72ad.entry.js +1 -0
  669. package/dist/webcomponents/p-e52d5ead.entry.js +1 -0
  670. package/dist/webcomponents/p-eYaGyUvS.js +1 -0
  671. package/dist/webcomponents/p-eb31e5c7.entry.js +1 -0
  672. package/dist/webcomponents/p-eb677eb2.entry.js +1 -0
  673. package/dist/webcomponents/p-f0301d11.entry.js +1 -0
  674. package/dist/webcomponents/p-f51e4213.entry.js +1 -0
  675. package/dist/webcomponents/p-gAO-RwrF.js +1 -0
  676. package/dist/webcomponents/p-hkXaxw9l.js +1 -0
  677. package/dist/webcomponents/p-p7aAf5_m.js +1 -0
  678. package/dist/webcomponents/p-sXe3gn-5.js +1 -0
  679. package/dist/webcomponents/p-y-Ys7Rd-.js +1 -0
  680. package/dist/webcomponents/p-z1GJDdMW.js +1 -0
  681. package/dist/webcomponents/webcomponents.esm.js +1 -1
  682. package/package.json +6 -7
  683. package/dist/cjs/Api-83d93333.js +0 -118
  684. package/dist/cjs/billing-form_3.cjs.entry.js +0 -1733
  685. package/dist/cjs/index.esm-544c08fd.js +0 -2937
  686. package/dist/cjs/lodash-dbf6a6a4.js +0 -17206
  687. package/dist/cjs/package-99f9fc82.js +0 -83
  688. package/dist/cjs/payment.service-537e049d.js +0 -23
  689. package/dist/cjs/terminals-list-params-state-236f06f6.js +0 -22
  690. package/dist/cjs/utils-4120664c.js +0 -4018
  691. package/dist/collection/components/checkout/billing-forms/billing-form/billing-form.js +0 -137
  692. package/dist/collection/components/checkout/billing-forms/billing-form-schema.js +0 -26
  693. package/dist/collection/components/checkout/billing-forms/billing-form-wrapper.js +0 -183
  694. package/dist/collection/components/checkout/billing-forms/postal-form/postal-form.js +0 -136
  695. package/dist/esm/Api-52242eb0.js +0 -116
  696. package/dist/esm/billing-form_3.entry.js +0 -1727
  697. package/dist/esm/index.esm-feedf26f.js +0 -2931
  698. package/dist/esm/lodash-faeb5a52.js +0 -17204
  699. package/dist/esm/package-01997353.js +0 -81
  700. package/dist/esm/payment.service-af5bd8be.js +0 -21
  701. package/dist/esm/terminals-list-params-state-e4b2ec23.js +0 -16
  702. package/dist/esm/utils-ec50661e.js +0 -4001
  703. package/dist/loader/package.json +0 -11
  704. package/dist/module/billing-form-schema.js +0 -16
  705. package/dist/module/billing-form-wrapper.js +0 -114
  706. package/dist/module/billing-form2.js +0 -90
  707. package/dist/module/justifi-billing-form-wrapper.d.ts +0 -11
  708. package/dist/module/justifi-billing-form-wrapper.js +0 -6
  709. package/dist/module/postal-form.d.ts +0 -11
  710. package/dist/module/postal-form.js +0 -6
  711. package/dist/module/postal-form2.js +0 -83
  712. package/dist/types/components/checkout/billing-forms/billing-form-wrapper.d.ts +0 -19
  713. package/dist/types/components/checkout/billing-forms/postal-form/postal-form.d.ts +0 -20
  714. package/dist/webcomponents/p-01033194.js +0 -1
  715. package/dist/webcomponents/p-07fbeff3.entry.js +0 -1
  716. package/dist/webcomponents/p-092515e0.js +0 -1
  717. package/dist/webcomponents/p-0b61d4d3.entry.js +0 -1
  718. package/dist/webcomponents/p-0c7ec110.entry.js +0 -1
  719. package/dist/webcomponents/p-0f0020e1.entry.js +0 -1
  720. package/dist/webcomponents/p-0fa216eb.entry.js +0 -1
  721. package/dist/webcomponents/p-0fc1d3bb.entry.js +0 -1
  722. package/dist/webcomponents/p-1134e1d3.entry.js +0 -1
  723. package/dist/webcomponents/p-13717638.entry.js +0 -1
  724. package/dist/webcomponents/p-142bfae3.js +0 -1
  725. package/dist/webcomponents/p-1c38ec65.entry.js +0 -1
  726. package/dist/webcomponents/p-1ce63001.entry.js +0 -1
  727. package/dist/webcomponents/p-1ff8810b.js +0 -1
  728. package/dist/webcomponents/p-2123c150.js +0 -1
  729. package/dist/webcomponents/p-23cd76af.entry.js +0 -1
  730. package/dist/webcomponents/p-25b82529.entry.js +0 -1
  731. package/dist/webcomponents/p-27546fa9.entry.js +0 -1
  732. package/dist/webcomponents/p-275c3dc9.js +0 -1
  733. package/dist/webcomponents/p-2783e363.js +0 -2
  734. package/dist/webcomponents/p-290fa30d.entry.js +0 -1
  735. package/dist/webcomponents/p-2a9d7f6b.js +0 -1
  736. package/dist/webcomponents/p-2b8aaa7d.entry.js +0 -1
  737. package/dist/webcomponents/p-3188f72a.js +0 -1
  738. package/dist/webcomponents/p-31dcaeaf.entry.js +0 -1
  739. package/dist/webcomponents/p-373a19fe.entry.js +0 -1
  740. package/dist/webcomponents/p-375657fe.entry.js +0 -1
  741. package/dist/webcomponents/p-3cc7527a.entry.js +0 -1
  742. package/dist/webcomponents/p-3cf317d3.entry.js +0 -1
  743. package/dist/webcomponents/p-4598482c.entry.js +0 -1
  744. package/dist/webcomponents/p-536497fe.entry.js +0 -1
  745. package/dist/webcomponents/p-536fb8e2.js +0 -1
  746. package/dist/webcomponents/p-537bce77.js +0 -1
  747. package/dist/webcomponents/p-54556fc6.js +0 -1
  748. package/dist/webcomponents/p-56c7fc8d.js +0 -1
  749. package/dist/webcomponents/p-58ee6ce9.js +0 -1
  750. package/dist/webcomponents/p-5a9d7ca0.entry.js +0 -1
  751. package/dist/webcomponents/p-5b76dbe1.entry.js +0 -1
  752. package/dist/webcomponents/p-5f6b4bc9.js +0 -1
  753. package/dist/webcomponents/p-645db2cb.entry.js +0 -1
  754. package/dist/webcomponents/p-65cb72e4.entry.js +0 -1
  755. package/dist/webcomponents/p-673c1bca.js +0 -1
  756. package/dist/webcomponents/p-6a5eab1f.entry.js +0 -1
  757. package/dist/webcomponents/p-753d983c.entry.js +0 -1
  758. package/dist/webcomponents/p-76549a24.js +0 -1
  759. package/dist/webcomponents/p-7b793901.entry.js +0 -1
  760. package/dist/webcomponents/p-7c333590.entry.js +0 -1
  761. package/dist/webcomponents/p-7d85af5c.js +0 -1
  762. package/dist/webcomponents/p-81a6c3e2.entry.js +0 -1
  763. package/dist/webcomponents/p-86605101.js +0 -1
  764. package/dist/webcomponents/p-87a4fb5b.js +0 -1
  765. package/dist/webcomponents/p-88a37837.js +0 -1
  766. package/dist/webcomponents/p-8a6a06e6.entry.js +0 -1
  767. package/dist/webcomponents/p-8d4a0192.entry.js +0 -1
  768. package/dist/webcomponents/p-927cb6df.js +0 -1
  769. package/dist/webcomponents/p-953e9dba.js +0 -1
  770. package/dist/webcomponents/p-96c23cda.entry.js +0 -1
  771. package/dist/webcomponents/p-9a9732e1.js +0 -1
  772. package/dist/webcomponents/p-9fecad5a.js +0 -1
  773. package/dist/webcomponents/p-a07e021f.entry.js +0 -1
  774. package/dist/webcomponents/p-a3cced75.entry.js +0 -1
  775. package/dist/webcomponents/p-a5f5cc2e.entry.js +0 -1
  776. package/dist/webcomponents/p-a6976c9c.entry.js +0 -1
  777. package/dist/webcomponents/p-a8c69f51.entry.js +0 -1
  778. package/dist/webcomponents/p-ab3a8004.entry.js +0 -1
  779. package/dist/webcomponents/p-ab45511e.js +0 -1
  780. package/dist/webcomponents/p-adecb91a.entry.js +0 -1
  781. package/dist/webcomponents/p-ae7edce5.js +0 -1
  782. package/dist/webcomponents/p-ae891abb.entry.js +0 -1
  783. package/dist/webcomponents/p-af3315b5.entry.js +0 -1
  784. package/dist/webcomponents/p-b082f07a.entry.js +0 -1
  785. package/dist/webcomponents/p-b218af87.entry.js +0 -1
  786. package/dist/webcomponents/p-b84ee6d8.js +0 -1
  787. package/dist/webcomponents/p-b979fcb0.entry.js +0 -1
  788. package/dist/webcomponents/p-bb4b3f79.entry.js +0 -1
  789. package/dist/webcomponents/p-beec0b60.js +0 -1
  790. package/dist/webcomponents/p-bf12999f.js +0 -1
  791. package/dist/webcomponents/p-bf195b35.js +0 -1
  792. package/dist/webcomponents/p-bfc2d88a.js +0 -1
  793. package/dist/webcomponents/p-c6be72b0.js +0 -10
  794. package/dist/webcomponents/p-c8b78136.js +0 -1
  795. package/dist/webcomponents/p-caa29469.entry.js +0 -1
  796. package/dist/webcomponents/p-cbad44b7.js +0 -1
  797. package/dist/webcomponents/p-cc2f75a3.entry.js +0 -1
  798. package/dist/webcomponents/p-ccb9ee53.js +0 -1
  799. package/dist/webcomponents/p-cd93c62b.entry.js +0 -19
  800. package/dist/webcomponents/p-d757fcf5.js +0 -1
  801. package/dist/webcomponents/p-dbc1a95b.js +0 -1
  802. package/dist/webcomponents/p-dd2938d3.entry.js +0 -1
  803. package/dist/webcomponents/p-dec18cc4.js +0 -1
  804. package/dist/webcomponents/p-e3855f51.entry.js +0 -1
  805. package/dist/webcomponents/p-e73be1b9.entry.js +0 -1
  806. package/dist/webcomponents/p-e817d131.entry.js +0 -1
  807. package/dist/webcomponents/p-e9867f8b.entry.js +0 -1
  808. package/dist/webcomponents/p-f20466f7.entry.js +0 -1
  809. package/dist/webcomponents/p-f20b6ce1.js +0 -1
  810. package/dist/webcomponents/p-f4739d31.js +0 -1
  811. package/dist/webcomponents/p-f4aeb100.js +0 -1
  812. package/dist/webcomponents/p-f8fccf44.js +0 -1
  813. package/dist/webcomponents/p-f930504f.entry.js +0 -1
  814. package/dist/webcomponents/p-faa35b47.entry.js +0 -1
  815. package/dist/webcomponents/p-fb2db8da.entry.js +0 -1
  816. package/dist/webcomponents/p-fca89e9b.entry.js +0 -1
  817. /package/dist/cjs/{Dispute-eb6bad54.js → Dispute-CruQTF6_.js} +0 -0
  818. /package/dist/cjs/{Document-0b828345.js → Document-rXGBUaOh.js} +0 -0
  819. /package/dist/cjs/{Pagination-0da8f095.js → Pagination-Dediz133.js} +0 -0
  820. /package/dist/cjs/{app-globals-3a1e7e63.js → app-globals-V2Kpy_OQ.js} +0 -0
  821. /package/dist/cjs/{event-types-8edaabbb.js → event-types-BWQT2lwu.js} +0 -0
  822. /package/dist/cjs/{event-types-180a85a9.js → event-types-DNOUef41.js} +0 -0
  823. /package/dist/cjs/{form-input-masks-0879c139.js → form-input-masks-DgXd0f4V.js} +0 -0
  824. /package/dist/cjs/{state-options-4fbcb48a.js → state-options-CIT9xdTz.js} +0 -0
  825. /package/dist/cjs/{utils-bc03ca40.js → utils-DAyWinG2.js} +0 -0
  826. /package/dist/esm/{Dispute-5fd28ec9.js → Dispute-7MWRbTXI.js} +0 -0
  827. /package/dist/esm/{Pagination-afc8f96d.js → Pagination-CLHwhyvu.js} +0 -0
  828. /package/dist/esm/{app-globals-0f993ce5.js → app-globals-DQuL1Twl.js} +0 -0
  829. /package/dist/esm/{event-types-07cdb9a0.js → event-types-Bg2SZArf.js} +0 -0
  830. /package/dist/esm/{event-types-5c87de02.js → event-types-XYgDHrVL.js} +0 -0
  831. /package/dist/esm/{form-input-masks-0e18300f.js → form-input-masks-B-iV5cYd.js} +0 -0
  832. /package/dist/esm/{state-options-a356fb11.js → state-options-BX8GieXu.js} +0 -0
  833. /package/dist/esm/{utils-20cdf321.js → utils-BnjCmwMr.js} +0 -0
  834. /package/dist/webcomponents/{p-abdbcd8e.js → p-7MWRbTXI.js} +0 -0
  835. /package/dist/webcomponents/{p-525db3e8.js → p-B-iV5cYd.js} +0 -0
  836. /package/dist/webcomponents/{p-6078a370.js → p-BX8GieXu.js} +0 -0
  837. /package/dist/webcomponents/{p-667ebd79.js → p-Bg2SZArf.js} +0 -0
  838. /package/dist/webcomponents/{p-e3c22aa9.js → p-BnjCmwMr.js} +0 -0
  839. /package/dist/webcomponents/{p-56f6ce4c.js → p-CLHwhyvu.js} +0 -0
  840. /package/dist/webcomponents/{p-1ad5995e.js → p-Ce_F4E0f.js} +0 -0
  841. /package/dist/webcomponents/{p-e1255160.js → p-DQuL1Twl.js} +0 -0
  842. /package/dist/webcomponents/{p-73f9be7c.js → p-XYgDHrVL.js} +0 -0
@@ -1,1733 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-5b9a3b5f.js');
6
- const index_esm = require('./index.esm-544c08fd.js');
7
- const schemaValidations = require('./schema-validations-a7cefbdf.js');
8
- const utils = require('./utils-bc03ca40.js');
9
- const stateOptions = require('./state-options-4fbcb48a.js');
10
- const formControlErrorText = require('./form-control-error-text-3cff9b7b.js');
11
- const _package = require('./package-99f9fc82.js');
12
- const iframeInputStylesState = require('./iframe-input-styles-state-d0de0b24.js');
13
- const parts = require('./parts-5ca90f9a.js');
14
- require('./business-form-options-62e9c8ab.js');
15
- require('./Business-d88b77fd.js');
16
- require('./helpers-602962eb.js');
17
- require('./Document-0b828345.js');
18
- require('./index-d2d0b181.js');
19
-
20
- const BillingFormSchema = index_esm.create$3({
21
- name: schemaValidations.identityNameValidation.required('Enter full name'),
22
- address_line1: schemaValidations.lineOneValidation.required('Enter street address'),
23
- address_line2: schemaValidations.lineTwoValidation.nullable(),
24
- address_city: schemaValidations.cityValidation.required('Enter city'),
25
- address_state: schemaValidations.stateValidation.required('Select state'),
26
- address_postal_code: schemaValidations.postalValidation.required('Enter postal code'),
27
- });
28
- const PostalFormSchema = index_esm.create$3({
29
- address_postal_code: schemaValidations.postalValidation.required('Enter postal code'),
30
- });
31
-
32
- const BillingForm = class {
33
- constructor(hostRef) {
34
- index.registerInstance(this, hostRef);
35
- this.inputHandler = (name, value) => {
36
- this.formController.setValues(Object.assign(Object.assign({}, this.formController.values.getValue()), { [name]: value }));
37
- };
38
- this.legend = undefined;
39
- this.formController = undefined;
40
- this.billingInfo = undefined;
41
- this.errors = {};
42
- }
43
- componentWillLoad() {
44
- this.formController = new index_esm.FormController(BillingFormSchema);
45
- }
46
- componentDidLoad() {
47
- this.formController.values.subscribe(values => this.billingInfo = Object.assign({}, values));
48
- this.formController.errors.subscribe(errors => {
49
- this.errors = Object.assign({}, errors);
50
- });
51
- }
52
- async getValues() {
53
- return this.formController.values.getValue();
54
- }
55
- async fill(fields) {
56
- this.formController.setInitialValues(fields);
57
- }
58
- async validate() {
59
- let isValid = await this.formController.validate();
60
- return { isValid: isValid };
61
- }
62
- render() {
63
- const billingFormDefaultValue = this.formController.getInitialValues();
64
- return (index.h(index.Host, { key: '4e04724997c5fda2b4a18b8567da9cd5b0e5e1df' }, index.h("form", { key: '3ad1b5cf693a428fccc6dcdb2da3456012a7e5bc' }, index.h("fieldset", { key: '25701e25d37ceff483328dc0fdc38ed03d982a1d' }, this.legend && index.h("legend", { key: 'c3f8bf4e1aa05446c9cce72f7abb3eb264eb1822' }, this.legend), index.h("div", { key: '5ceaf13100d39a8107a5695a0140426f5db0ea50', class: "row gy-3" }, index.h("div", { key: '3e0933b0d4398d1ee3b0b377c65cf2e2e663223b', class: "col-12" }, index.h("form-control-text", { key: '13b37a27bfa031e03827cb5396b96ee4cbbe419c', name: 'name', label: 'Full Name', defaultValue: billingFormDefaultValue.name, errorText: this.errors.name, inputHandler: this.inputHandler })), index.h("div", { key: '3e6616197e464a7532945fcd158fc36728a05485', class: "col-12" }, index.h("form-control-text", { key: '5d6ebbf9e49eedb378d812a1c24bdfbaaf5e5fab', name: 'address_line1', label: 'Street Address', defaultValue: billingFormDefaultValue.address_line1, errorText: this.errors.address_line1, inputHandler: this.inputHandler })), index.h("div", { key: 'b0a7141b5d60cee445f69200979f97e86e8f0e3d', class: "col-12" }, index.h("form-control-text", { key: '221f411f92bb92e753d5e2fc7e92e9ffe6d20da4', name: 'address_line2', label: "Apartment, Suite, etc. (optional)", defaultValue: billingFormDefaultValue.address_line2, errorText: this.errors.address_line2, inputHandler: this.inputHandler })), index.h("div", { key: '189854bdd6dc09039751f81fd65fd3e685731a99', class: "col-12" }, index.h("form-control-text", { key: 'cc815e308a51d23b139ecaa80afad76b58e761d7', name: 'address_city', label: "City", defaultValue: billingFormDefaultValue.address_city, errorText: this.errors.address_city, inputHandler: this.inputHandler })), index.h("div", { key: 'd876d68af601bec261b6ad0728f8218b605714ff', class: "col-12" }, index.h("form-control-select", { key: 'd2ab5a47330708030eb904a1463a8fe71553921e', name: 'address_state', label: 'State', options: stateOptions.StateOptions, defaultValue: billingFormDefaultValue.address_state, errorText: this.errors.address_state, inputHandler: this.inputHandler })), index.h("div", { key: '152b2e798fbeddcd493479fa15dcb31fe87adc69', class: "col-12" }, index.h("form-control-text", { key: '050e2be5b9874d2e16eee050b2f9352c4c468657', name: 'address_postal_code', label: "ZIP", defaultValue: billingFormDefaultValue.address_postal_code, errorText: this.errors.address_postal_code, inputHandler: this.inputHandler, maxLength: 5, keyDownHandler: utils.numberOnlyHandler })))))));
65
- }
66
- };
67
-
68
- var iframeResizer = {exports: {}};
69
-
70
- /*
71
- * File: iframeResizer.js
72
- * Desc: Force iframes to size to content.
73
- * Requires: iframeResizer.contentWindow.js to be loaded into the target frame.
74
- * Doc: https://iframe-resizer.com
75
- * Author: David J. Bradshaw - info@iframe-resizer.com
76
- */
77
-
78
- (function (module) {
79
- console.info(`
80
- IFRAME-RESIZER
81
-
82
- Iframe-Resizer 5 is now available via the following two packages:
83
-
84
- * @iframe-resizer/parent
85
- * @iframe-resizer/child
86
-
87
- Additionally their are also new versions of iframe-resizer for React, Vue, and jQuery.
88
-
89
- Version 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.
90
-
91
- Please see https://iframe-resizer.com/upgrade for more details.
92
- `)
93
-
94
- // eslint-disable-next-line sonarjs/cognitive-complexity, no-shadow-restricted-names
95
- ;(function (undefined$1) {
96
- if (typeof window === 'undefined') return // don't run for server side render
97
-
98
- // var VERSION = '4.3.11'
99
-
100
- var count = 0,
101
- destroyObserver,
102
- logEnabled = false,
103
- hiddenCheckEnabled = false,
104
- msgHeader = 'message',
105
- msgHeaderLen = msgHeader.length,
106
- msgId = '[iFrameSizer]', // Must match iframe msg ID
107
- msgIdLen = msgId.length,
108
- pagePosition = null,
109
- requestAnimationFrame = window.requestAnimationFrame,
110
- resetRequiredMethods = Object.freeze({
111
- max: 1,
112
- scroll: 1,
113
- bodyScroll: 1,
114
- documentElementScroll: 1
115
- }),
116
- settings = {},
117
- timer = null,
118
- defaults = Object.freeze({
119
- autoResize: true,
120
- bodyBackground: null,
121
- bodyMargin: null,
122
- bodyMarginV1: 8,
123
- bodyPadding: null,
124
- checkOrigin: true,
125
- inPageLinks: false,
126
- enablePublicMethods: true,
127
- heightCalculationMethod: 'bodyOffset',
128
- id: 'iFrameResizer',
129
- interval: 32,
130
- license: '1jqr0si6pnt',
131
- log: false,
132
- maxHeight: Infinity,
133
- maxWidth: Infinity,
134
- minHeight: 0,
135
- minWidth: 0,
136
- mouseEvents: true,
137
- resizeFrom: 'parent',
138
- scrolling: false,
139
- sizeHeight: true,
140
- sizeWidth: false,
141
- warningTimeout: 5000,
142
- tolerance: 0,
143
- widthCalculationMethod: 'scroll',
144
- onClose: function () {
145
- return true
146
- },
147
- onClosed: function () {},
148
- onInit: function () {},
149
- onMessage: function () {
150
- warn('onMessage function not defined');
151
- },
152
- onMouseEnter: function () {},
153
- onMouseLeave: function () {},
154
- onResized: function () {},
155
- onScroll: function () {
156
- return true
157
- }
158
- });
159
-
160
- function getMutationObserver() {
161
- return (
162
- window.MutationObserver ||
163
- window.WebKitMutationObserver ||
164
- window.MozMutationObserver
165
- )
166
- }
167
-
168
- function addEventListener(el, evt, func) {
169
- el.addEventListener(evt, func, false);
170
- }
171
-
172
- function removeEventListener(el, evt, func) {
173
- el.removeEventListener(evt, func, false);
174
- }
175
-
176
- function setupRequestAnimationFrame() {
177
- var vendors = ['moz', 'webkit', 'o', 'ms'];
178
- var x;
179
-
180
- // Remove vendor prefixing if prefixed and break early if not
181
- for (x = 0; x < vendors.length && !requestAnimationFrame; x += 1) {
182
- requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];
183
- }
184
-
185
- if (requestAnimationFrame) {
186
- // Firefox extension content-scripts have a globalThis object that is not the same as window.
187
- // Binding `requestAnimationFrame` to window allows the function to work and prevents errors
188
- // being thrown when run in that context, and should be a no-op in every other context.
189
- requestAnimationFrame = requestAnimationFrame.bind(window);
190
- } else {
191
- log('setup', 'RequestAnimationFrame not supported');
192
- }
193
- }
194
-
195
- function getMyID(iframeId) {
196
- var retStr = 'Host page: ' + iframeId;
197
-
198
- if (window.top !== window.self) {
199
- retStr =
200
- window.parentIFrame && window.parentIFrame.getId
201
- ? window.parentIFrame.getId() + ': ' + iframeId
202
- : 'Nested host page: ' + iframeId;
203
- }
204
-
205
- return retStr
206
- }
207
-
208
- function formatLogHeader(iframeId) {
209
- return msgId + '[' + getMyID(iframeId) + ']'
210
- }
211
-
212
- function isLogEnabled(iframeId) {
213
- return settings[iframeId] ? settings[iframeId].log : logEnabled
214
- }
215
-
216
- function log(iframeId, msg) {
217
- output('log', iframeId, msg, isLogEnabled(iframeId));
218
- }
219
-
220
- function info(iframeId, msg) {
221
- output('info', iframeId, msg, isLogEnabled(iframeId));
222
- }
223
-
224
- function warn(iframeId, msg) {
225
- output('warn', iframeId, msg, true);
226
- }
227
-
228
- function output(type, iframeId, msg, enabled) {
229
- if (true === enabled && 'object' === typeof window.console) {
230
- // eslint-disable-next-line no-console
231
- console[type](formatLogHeader(iframeId), msg);
232
- }
233
- }
234
-
235
- function iFrameListener(event) {
236
- function resizeIFrame() {
237
- function resize() {
238
- setSize(messageData);
239
- setPagePosition(iframeId);
240
- on('onResized', messageData);
241
- }
242
-
243
- ensureInRange('Height');
244
- ensureInRange('Width');
245
-
246
- syncResize(resize, messageData, 'init');
247
- }
248
-
249
- function processMsg() {
250
- var data = msg.slice(msgIdLen).split(':');
251
- var height = data[1] ? parseInt(data[1], 10) : 0;
252
- var iframe = settings[data[0]] && settings[data[0]].iframe;
253
- var compStyle = getComputedStyle(iframe);
254
-
255
- return {
256
- iframe: iframe,
257
- id: data[0],
258
- height: height + getPaddingEnds(compStyle) + getBorderEnds(compStyle),
259
- width: data[2],
260
- type: data[3]
261
- }
262
- }
263
-
264
- function getPaddingEnds(compStyle) {
265
- if (compStyle.boxSizing !== 'border-box') {
266
- return 0
267
- }
268
- var top = compStyle.paddingTop ? parseInt(compStyle.paddingTop, 10) : 0;
269
- var bot = compStyle.paddingBottom
270
- ? parseInt(compStyle.paddingBottom, 10)
271
- : 0;
272
- return top + bot
273
- }
274
-
275
- function getBorderEnds(compStyle) {
276
- if (compStyle.boxSizing !== 'border-box') {
277
- return 0
278
- }
279
- var top = compStyle.borderTopWidth
280
- ? parseInt(compStyle.borderTopWidth, 10)
281
- : 0;
282
- var bot = compStyle.borderBottomWidth
283
- ? parseInt(compStyle.borderBottomWidth, 10)
284
- : 0;
285
- return top + bot
286
- }
287
-
288
- function ensureInRange(Dimension) {
289
- var max = Number(settings[iframeId]['max' + Dimension]),
290
- min = Number(settings[iframeId]['min' + Dimension]),
291
- dimension = Dimension.toLowerCase(),
292
- size = Number(messageData[dimension]);
293
-
294
- log(iframeId, 'Checking ' + dimension + ' is in range ' + min + '-' + max);
295
-
296
- if (size < min) {
297
- size = min;
298
- log(iframeId, 'Set ' + dimension + ' to min value');
299
- }
300
-
301
- if (size > max) {
302
- size = max;
303
- log(iframeId, 'Set ' + dimension + ' to max value');
304
- }
305
-
306
- messageData[dimension] = '' + size;
307
- }
308
-
309
- function isMessageFromIFrame() {
310
- function checkAllowedOrigin() {
311
- function checkList() {
312
- var i = 0,
313
- retCode = false;
314
-
315
- log(
316
- iframeId,
317
- 'Checking connection is from allowed list of origins: ' +
318
- checkOrigin
319
- );
320
-
321
- for (; i < checkOrigin.length; i++) {
322
- if (checkOrigin[i] === origin) {
323
- retCode = true;
324
- break
325
- }
326
- }
327
- return retCode
328
- }
329
-
330
- function checkSingle() {
331
- var remoteHost = settings[iframeId] && settings[iframeId].remoteHost;
332
- log(iframeId, 'Checking connection is from: ' + remoteHost);
333
- return origin === remoteHost
334
- }
335
-
336
- return checkOrigin.constructor === Array ? checkList() : checkSingle()
337
- }
338
-
339
- var origin = event.origin,
340
- checkOrigin = settings[iframeId] && settings[iframeId].checkOrigin;
341
-
342
- if (checkOrigin && '' + origin !== 'null' && !checkAllowedOrigin()) {
343
- throw new Error(
344
- 'Unexpected message received from: ' +
345
- origin +
346
- ' for ' +
347
- messageData.iframe.id +
348
- '. Message was: ' +
349
- event.data +
350
- '. This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.'
351
- )
352
- }
353
-
354
- return true
355
- }
356
-
357
- function isMessageForUs() {
358
- return (
359
- msgId === ('' + msg).slice(0, msgIdLen) &&
360
- msg.slice(msgIdLen).split(':')[0] in settings
361
- ) // ''+Protects against non-string msg
362
- }
363
-
364
- function isMessageFromMetaParent() {
365
- // Test if this message is from a parent above us. This is an ugly test, however, updating
366
- // the message format would break backwards compatibility.
367
- var retCode = messageData.type in { true: 1, false: 1, undefined: 1 };
368
-
369
- if (retCode) {
370
- log(iframeId, 'Ignoring init message from meta parent page');
371
- }
372
-
373
- return retCode
374
- }
375
-
376
- function getMsgBody(offset) {
377
- return msg.slice(msg.indexOf(':') + msgHeaderLen + offset)
378
- }
379
-
380
- function forwardMsgFromIFrame(msgBody) {
381
- log(
382
- iframeId,
383
- 'onMessage passed: {iframe: ' +
384
- messageData.iframe.id +
385
- ', message: ' +
386
- msgBody +
387
- '}'
388
- );
389
-
390
- on('onMessage', {
391
- iframe: messageData.iframe,
392
- message: JSON.parse(msgBody)
393
- });
394
-
395
- log(iframeId, '--');
396
- }
397
-
398
- function getPageInfo() {
399
- var bodyPosition = document.body.getBoundingClientRect(),
400
- iFramePosition = messageData.iframe.getBoundingClientRect();
401
-
402
- return JSON.stringify({
403
- iframeHeight: iFramePosition.height,
404
- iframeWidth: iFramePosition.width,
405
- clientHeight: Math.max(
406
- document.documentElement.clientHeight,
407
- window.innerHeight || 0
408
- ),
409
- clientWidth: Math.max(
410
- document.documentElement.clientWidth,
411
- window.innerWidth || 0
412
- ),
413
- offsetTop: parseInt(iFramePosition.top - bodyPosition.top, 10),
414
- offsetLeft: parseInt(iFramePosition.left - bodyPosition.left, 10),
415
- scrollTop: window.pageYOffset,
416
- scrollLeft: window.pageXOffset,
417
- documentHeight: document.documentElement.clientHeight,
418
- documentWidth: document.documentElement.clientWidth,
419
- windowHeight: window.innerHeight,
420
- windowWidth: window.innerWidth
421
- })
422
- }
423
-
424
- function sendPageInfoToIframe(iframe, iframeId) {
425
- function debouncedTrigger() {
426
- trigger('Send Page Info', 'pageInfo:' + getPageInfo(), iframe, iframeId);
427
- }
428
- debounceFrameEvents(debouncedTrigger, 32, iframeId);
429
- }
430
-
431
- function startPageInfoMonitor() {
432
- function setListener(type, func) {
433
- function sendPageInfo() {
434
- if (settings[id]) {
435
- sendPageInfoToIframe(settings[id].iframe, id);
436
- } else {
437
- stop();
438
- }
439
- }
440
- ['scroll', 'resize'].forEach(function (evt) {
441
- log(id, type + evt + ' listener for sendPageInfo');
442
- func(window, evt, sendPageInfo);
443
- });
444
- }
445
-
446
- function stop() {
447
- setListener('Remove ', removeEventListener);
448
- }
449
-
450
- function start() {
451
- setListener('Add ', addEventListener);
452
- }
453
-
454
- var id = iframeId; // Create locally scoped copy of iFrame ID
455
-
456
- start();
457
-
458
- if (settings[id]) {
459
- settings[id].stopPageInfo = stop;
460
- }
461
- }
462
-
463
- function stopPageInfoMonitor() {
464
- if (settings[iframeId] && settings[iframeId].stopPageInfo) {
465
- settings[iframeId].stopPageInfo();
466
- delete settings[iframeId].stopPageInfo;
467
- }
468
- }
469
-
470
- function checkIFrameExists() {
471
- var retBool = true;
472
-
473
- if (null === messageData.iframe) {
474
- warn(iframeId, 'IFrame (' + messageData.id + ') not found');
475
- retBool = false;
476
- }
477
- return retBool
478
- }
479
-
480
- function getElementPosition(target) {
481
- var iFramePosition = target.getBoundingClientRect();
482
-
483
- getPagePosition(iframeId);
484
-
485
- return {
486
- x: Math.floor(Number(iFramePosition.left) + Number(pagePosition.x)),
487
- y: Math.floor(Number(iFramePosition.top) + Number(pagePosition.y))
488
- }
489
- }
490
-
491
- function scrollRequestFromChild(addOffset) {
492
- /* istanbul ignore next */ // Not testable in Karma
493
- function reposition() {
494
- pagePosition = newPosition;
495
- scrollTo();
496
- log(iframeId, '--');
497
- }
498
-
499
- function calcOffset() {
500
- return {
501
- x: Number(messageData.width) + offset.x,
502
- y: Number(messageData.height) + offset.y
503
- }
504
- }
505
-
506
- function scrollParent() {
507
- if (window.parentIFrame) {
508
- window.parentIFrame['scrollTo' + (addOffset ? 'Offset' : '')](
509
- newPosition.x,
510
- newPosition.y
511
- );
512
- } else {
513
- warn(
514
- iframeId,
515
- 'Unable to scroll to requested position, window.parentIFrame not found'
516
- );
517
- }
518
- }
519
-
520
- var offset = addOffset
521
- ? getElementPosition(messageData.iframe)
522
- : { x: 0, y: 0 },
523
- newPosition = calcOffset();
524
-
525
- log(
526
- iframeId,
527
- 'Reposition requested from iFrame (offset x:' +
528
- offset.x +
529
- ' y:' +
530
- offset.y +
531
- ')'
532
- );
533
-
534
- if (window.top === window.self) {
535
- reposition();
536
- } else {
537
- scrollParent();
538
- }
539
- }
540
-
541
- function scrollTo() {
542
- if (false === on('onScroll', pagePosition)) {
543
- unsetPagePosition();
544
- } else {
545
- setPagePosition(iframeId);
546
- }
547
- }
548
-
549
- function findTarget(location) {
550
- function jumpToTarget() {
551
- var jumpPosition = getElementPosition(target);
552
-
553
- log(
554
- iframeId,
555
- 'Moving to in page link (#' +
556
- hash +
557
- ') at x: ' +
558
- jumpPosition.x +
559
- ' y: ' +
560
- jumpPosition.y
561
- );
562
- pagePosition = {
563
- x: jumpPosition.x,
564
- y: jumpPosition.y
565
- };
566
-
567
- scrollTo();
568
- log(iframeId, '--');
569
- }
570
-
571
- function jumpToParent() {
572
- if (window.parentIFrame) {
573
- window.parentIFrame.moveToAnchor(hash);
574
- } else {
575
- log(
576
- iframeId,
577
- 'In page link #' +
578
- hash +
579
- ' not found and window.parentIFrame not found'
580
- );
581
- }
582
- }
583
-
584
- var hash = location.split('#')[1] || '',
585
- hashData = decodeURIComponent(hash),
586
- target =
587
- document.getElementById(hashData) ||
588
- document.getElementsByName(hashData)[0];
589
-
590
- if (target) {
591
- jumpToTarget();
592
- } else if (window.top === window.self) {
593
- log(iframeId, 'In page link #' + hash + ' not found');
594
- } else {
595
- jumpToParent();
596
- }
597
- }
598
-
599
- function onMouse(event) {
600
- var mousePos = {};
601
-
602
- if (Number(messageData.width) === 0 && Number(messageData.height) === 0) {
603
- var data = getMsgBody(9).split(':');
604
- mousePos = {
605
- x: data[1],
606
- y: data[0]
607
- };
608
- } else {
609
- mousePos = {
610
- x: messageData.width,
611
- y: messageData.height
612
- };
613
- }
614
-
615
- on(event, {
616
- iframe: messageData.iframe,
617
- screenX: Number(mousePos.x),
618
- screenY: Number(mousePos.y),
619
- type: messageData.type
620
- });
621
- }
622
-
623
- function on(funcName, val) {
624
- return chkEvent(iframeId, funcName, val)
625
- }
626
-
627
- function actionMsg() {
628
- if (settings[iframeId] && settings[iframeId].firstRun) firstRun();
629
-
630
- switch (messageData.type) {
631
- case 'close': {
632
- closeIFrame(messageData.iframe);
633
- break
634
- }
635
-
636
- case 'message': {
637
- forwardMsgFromIFrame(getMsgBody(6));
638
- break
639
- }
640
-
641
- case 'mouseenter': {
642
- onMouse('onMouseEnter');
643
- break
644
- }
645
-
646
- case 'mouseleave': {
647
- onMouse('onMouseLeave');
648
- break
649
- }
650
-
651
- case 'autoResize': {
652
- settings[iframeId].autoResize = JSON.parse(getMsgBody(9));
653
- break
654
- }
655
-
656
- case 'scrollTo': {
657
- scrollRequestFromChild(false);
658
- break
659
- }
660
-
661
- case 'scrollToOffset': {
662
- scrollRequestFromChild(true);
663
- break
664
- }
665
-
666
- case 'pageInfo': {
667
- sendPageInfoToIframe(
668
- settings[iframeId] && settings[iframeId].iframe,
669
- iframeId
670
- );
671
- startPageInfoMonitor();
672
- break
673
- }
674
-
675
- case 'pageInfoStop': {
676
- stopPageInfoMonitor();
677
- break
678
- }
679
-
680
- case 'inPageLink': {
681
- findTarget(getMsgBody(9));
682
- break
683
- }
684
-
685
- case 'reset': {
686
- resetIFrame(messageData);
687
- break
688
- }
689
-
690
- case 'init': {
691
- resizeIFrame();
692
- on('onInit', messageData.iframe);
693
- break
694
- }
695
-
696
- default: {
697
- if (
698
- Number(messageData.width) === 0 &&
699
- Number(messageData.height) === 0
700
- ) {
701
- warn(
702
- 'Unsupported message received (' +
703
- messageData.type +
704
- '), this is likely due to the iframe containing a later ' +
705
- 'version of iframe-resizer than the parent page'
706
- );
707
- } else {
708
- resizeIFrame();
709
- }
710
- }
711
- }
712
- }
713
-
714
- function hasSettings(iframeId) {
715
- var retBool = true;
716
-
717
- if (!settings[iframeId]) {
718
- retBool = false;
719
- warn(
720
- messageData.type +
721
- ' No settings for ' +
722
- iframeId +
723
- '. Message was: ' +
724
- msg
725
- );
726
- }
727
-
728
- return retBool
729
- }
730
-
731
- function iFrameReadyMsgReceived() {
732
- // eslint-disable-next-line no-restricted-syntax, guard-for-in
733
- for (var iframeId in settings) {
734
- trigger(
735
- 'iFrame requested init',
736
- createOutgoingMsg(iframeId),
737
- settings[iframeId].iframe,
738
- iframeId
739
- );
740
- }
741
- }
742
-
743
- function firstRun() {
744
- if (settings[iframeId]) {
745
- settings[iframeId].firstRun = false;
746
- }
747
- }
748
-
749
- var msg = event.data,
750
- messageData = {},
751
- iframeId = null;
752
-
753
- if ('[iFrameResizerChild]Ready' === msg) {
754
- iFrameReadyMsgReceived();
755
- } else if (isMessageForUs()) {
756
- messageData = processMsg();
757
- iframeId = messageData.id;
758
- if (settings[iframeId]) {
759
- settings[iframeId].loaded = true;
760
- }
761
-
762
- if (!isMessageFromMetaParent() && hasSettings(iframeId)) {
763
- log(iframeId, 'Received: ' + msg);
764
-
765
- if (checkIFrameExists() && isMessageFromIFrame()) {
766
- actionMsg();
767
- }
768
- }
769
- } else {
770
- info(iframeId, 'Ignored: ' + msg);
771
- }
772
- }
773
-
774
- function chkEvent(iframeId, funcName, val) {
775
- var func = null,
776
- retVal = null;
777
-
778
- if (settings[iframeId]) {
779
- func = settings[iframeId][funcName];
780
-
781
- if ('function' === typeof func) {
782
- retVal = func(val);
783
- } else {
784
- throw new TypeError(
785
- funcName + ' on iFrame[' + iframeId + '] is not a function'
786
- )
787
- }
788
- }
789
-
790
- return retVal
791
- }
792
-
793
- function removeIframeListeners(iframe) {
794
- var iframeId = iframe.id;
795
- delete settings[iframeId];
796
- }
797
-
798
- function closeIFrame(iframe) {
799
- var iframeId = iframe.id;
800
- if (chkEvent(iframeId, 'onClose', iframeId) === false) {
801
- log(iframeId, 'Close iframe cancelled by onClose event');
802
- return
803
- }
804
- log(iframeId, 'Removing iFrame: ' + iframeId);
805
-
806
- try {
807
- // Catch race condition error with React
808
- if (iframe.parentNode) {
809
- iframe.parentNode.removeChild(iframe);
810
- }
811
- } catch (error) {
812
- warn(error);
813
- }
814
-
815
- chkEvent(iframeId, 'onClosed', iframeId);
816
- log(iframeId, '--');
817
- removeIframeListeners(iframe);
818
- if (destroyObserver) {
819
- destroyObserver.disconnect();
820
- destroyObserver = null;
821
- }
822
- }
823
-
824
- function getPagePosition(iframeId) {
825
- if (null === pagePosition) {
826
- pagePosition = {
827
- x:
828
- window.pageXOffset === undefined$1
829
- ? document.documentElement.scrollLeft
830
- : window.pageXOffset,
831
- y:
832
- window.pageYOffset === undefined$1
833
- ? document.documentElement.scrollTop
834
- : window.pageYOffset
835
- };
836
- log(
837
- iframeId,
838
- 'Get page position: ' + pagePosition.x + ',' + pagePosition.y
839
- );
840
- }
841
- }
842
-
843
- function setPagePosition(iframeId) {
844
- if (null !== pagePosition) {
845
- window.scrollTo(pagePosition.x, pagePosition.y);
846
- log(
847
- iframeId,
848
- 'Set page position: ' + pagePosition.x + ',' + pagePosition.y
849
- );
850
- unsetPagePosition();
851
- }
852
- }
853
-
854
- function unsetPagePosition() {
855
- pagePosition = null;
856
- }
857
-
858
- function resetIFrame(messageData) {
859
- function reset() {
860
- setSize(messageData);
861
- trigger('reset', 'reset', messageData.iframe, messageData.id);
862
- }
863
-
864
- log(
865
- messageData.id,
866
- 'Size reset requested by ' +
867
- ('init' === messageData.type ? 'host page' : 'iFrame')
868
- );
869
- getPagePosition(messageData.id);
870
- syncResize(reset, messageData, 'reset');
871
- }
872
-
873
- function setSize(messageData) {
874
- function setDimension(dimension) {
875
- if (!messageData.id) {
876
- log('undefined', 'messageData id not set');
877
- return
878
- }
879
- messageData.iframe.style[dimension] = messageData[dimension] + 'px';
880
- log(
881
- messageData.id,
882
- 'IFrame (' +
883
- iframeId +
884
- ') ' +
885
- dimension +
886
- ' set to ' +
887
- messageData[dimension] +
888
- 'px'
889
- );
890
- }
891
-
892
- function chkZero(dimension) {
893
- // FireFox sets dimension of hidden iFrames to zero.
894
- // So if we detect that set up an event to check for
895
- // when iFrame becomes visible.
896
-
897
- /* istanbul ignore next */ // Not testable in PhantomJS
898
- if (!hiddenCheckEnabled && '0' === messageData[dimension]) {
899
- hiddenCheckEnabled = true;
900
- log(iframeId, 'Hidden iFrame detected, creating visibility listener');
901
- fixHiddenIFrames();
902
- }
903
- }
904
-
905
- function processDimension(dimension) {
906
- setDimension(dimension);
907
- chkZero(dimension);
908
- }
909
-
910
- var iframeId = messageData.iframe.id;
911
-
912
- if (settings[iframeId]) {
913
- if (settings[iframeId].sizeHeight) {
914
- processDimension('height');
915
- }
916
- if (settings[iframeId].sizeWidth) {
917
- processDimension('width');
918
- }
919
- }
920
- }
921
-
922
- function syncResize(func, messageData, doNotSync) {
923
- /* istanbul ignore if */ // Not testable in PhantomJS
924
- if (
925
- doNotSync !== messageData.type &&
926
- requestAnimationFrame &&
927
- // including check for jasmine because had trouble getting spy to work in unit test using requestAnimationFrame
928
- !window.jasmine
929
- ) {
930
- log(messageData.id, 'Requesting animation frame');
931
- requestAnimationFrame(func);
932
- } else {
933
- func();
934
- }
935
- }
936
-
937
- function trigger(calleeMsg, msg, iframe, id, noResponseWarning) {
938
- function postMessageToIFrame() {
939
- var target = settings[id] && settings[id].targetOrigin;
940
- log(
941
- id,
942
- '[' +
943
- calleeMsg +
944
- '] Sending msg to iframe[' +
945
- id +
946
- '] (' +
947
- msg +
948
- ') targetOrigin: ' +
949
- target
950
- );
951
- iframe.contentWindow.postMessage(msgId + msg, target);
952
- }
953
-
954
- function iFrameNotFound() {
955
- warn(id, '[' + calleeMsg + '] IFrame(' + id + ') not found');
956
- }
957
-
958
- function chkAndSend() {
959
- if (
960
- iframe &&
961
- 'contentWindow' in iframe &&
962
- null !== iframe.contentWindow
963
- ) {
964
- // Null test for PhantomJS
965
- postMessageToIFrame();
966
- } else {
967
- iFrameNotFound();
968
- }
969
- }
970
-
971
- function warnOnNoResponse() {
972
- function warning() {
973
- if (settings[id] && !settings[id].loaded && !errorShown) {
974
- errorShown = true;
975
- warn(
976
- id,
977
- 'IFrame has not responded within ' +
978
- settings[id].warningTimeout / 1000 +
979
- ' 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.'
980
- );
981
- }
982
- }
983
-
984
- if (
985
- !!noResponseWarning &&
986
- settings[id] &&
987
- !!settings[id].warningTimeout
988
- ) {
989
- settings[id].msgTimeout = setTimeout(
990
- warning,
991
- settings[id].warningTimeout
992
- );
993
- }
994
- }
995
-
996
- var errorShown = false;
997
-
998
- id = id || iframe.id;
999
-
1000
- if (settings[id]) {
1001
- chkAndSend();
1002
- warnOnNoResponse();
1003
- }
1004
- }
1005
-
1006
- function createOutgoingMsg(iframeId) {
1007
- return (
1008
- iframeId +
1009
- ':' +
1010
- settings[iframeId].bodyMarginV1 +
1011
- ':' +
1012
- settings[iframeId].sizeWidth +
1013
- ':' +
1014
- settings[iframeId].log +
1015
- ':' +
1016
- settings[iframeId].interval +
1017
- ':' +
1018
- settings[iframeId].enablePublicMethods +
1019
- ':' +
1020
- settings[iframeId].autoResize +
1021
- ':' +
1022
- settings[iframeId].bodyMargin +
1023
- ':' +
1024
- settings[iframeId].heightCalculationMethod +
1025
- ':' +
1026
- settings[iframeId].bodyBackground +
1027
- ':' +
1028
- settings[iframeId].bodyPadding +
1029
- ':' +
1030
- settings[iframeId].tolerance +
1031
- ':' +
1032
- settings[iframeId].inPageLinks +
1033
- ':' +
1034
- settings[iframeId].resizeFrom +
1035
- ':' +
1036
- settings[iframeId].widthCalculationMethod +
1037
- ':' +
1038
- settings[iframeId].mouseEvents
1039
- )
1040
- }
1041
-
1042
- function isNumber(value) {
1043
- return typeof value === 'number'
1044
- }
1045
-
1046
- function setupIFrame(iframe, options) {
1047
- function setLimits() {
1048
- function addStyle(style) {
1049
- var styleValue = settings[iframeId][style];
1050
- if (Infinity !== styleValue && 0 !== styleValue) {
1051
- iframe.style[style] = isNumber(styleValue)
1052
- ? styleValue + 'px'
1053
- : styleValue;
1054
- log(iframeId, 'Set ' + style + ' = ' + iframe.style[style]);
1055
- }
1056
- }
1057
-
1058
- function chkMinMax(dimension) {
1059
- if (
1060
- settings[iframeId]['min' + dimension] >
1061
- settings[iframeId]['max' + dimension]
1062
- ) {
1063
- throw new Error(
1064
- 'Value for min' +
1065
- dimension +
1066
- ' can not be greater than max' +
1067
- dimension
1068
- )
1069
- }
1070
- }
1071
-
1072
- chkMinMax('Height');
1073
- chkMinMax('Width');
1074
-
1075
- addStyle('maxHeight');
1076
- addStyle('minHeight');
1077
- addStyle('maxWidth');
1078
- addStyle('minWidth');
1079
- }
1080
-
1081
- function newId() {
1082
- var id = (options && options.id) || defaults.id + count++;
1083
- if (null !== document.getElementById(id)) {
1084
- id += count++;
1085
- }
1086
- return id
1087
- }
1088
-
1089
- function ensureHasId(iframeId) {
1090
- if (typeof iframeId !== 'string') {
1091
- throw new TypeError('Invaild id for iFrame. Expected String')
1092
- }
1093
-
1094
- if ('' === iframeId) {
1095
- // eslint-disable-next-line no-multi-assign
1096
- iframe.id = iframeId = newId();
1097
- logEnabled = (options || {}).log;
1098
- log(
1099
- iframeId,
1100
- 'Added missing iframe ID: ' + iframeId + ' (' + iframe.src + ')'
1101
- );
1102
- }
1103
-
1104
- return iframeId
1105
- }
1106
-
1107
- function setScrolling() {
1108
- log(
1109
- iframeId,
1110
- 'IFrame scrolling ' +
1111
- (settings[iframeId] && settings[iframeId].scrolling
1112
- ? 'enabled'
1113
- : 'disabled') +
1114
- ' for ' +
1115
- iframeId
1116
- );
1117
- iframe.style.overflow =
1118
- false === (settings[iframeId] && settings[iframeId].scrolling)
1119
- ? 'hidden'
1120
- : 'auto';
1121
- switch (settings[iframeId] && settings[iframeId].scrolling) {
1122
- case 'omit': {
1123
- break
1124
- }
1125
-
1126
- case true: {
1127
- iframe.scrolling = 'yes';
1128
- break
1129
- }
1130
-
1131
- case false: {
1132
- iframe.scrolling = 'no';
1133
- break
1134
- }
1135
-
1136
- default: {
1137
- iframe.scrolling = settings[iframeId]
1138
- ? settings[iframeId].scrolling
1139
- : 'no';
1140
- }
1141
- }
1142
- }
1143
-
1144
- // The V1 iFrame script expects an int, where as in V2 expects a CSS
1145
- // string value such as '1px 3em', so if we have an int for V2, set V1=V2
1146
- // and then convert V2 to a string PX value.
1147
- function setupBodyMarginValues() {
1148
- if (
1149
- 'number' ===
1150
- typeof (settings[iframeId] && settings[iframeId].bodyMargin) ||
1151
- '0' === (settings[iframeId] && settings[iframeId].bodyMargin)
1152
- ) {
1153
- settings[iframeId].bodyMarginV1 = settings[iframeId].bodyMargin;
1154
- settings[iframeId].bodyMargin =
1155
- '' + settings[iframeId].bodyMargin + 'px';
1156
- }
1157
- }
1158
-
1159
- function checkReset() {
1160
- // Reduce scope of firstRun to function, because IE8's JS execution
1161
- // context stack is borked and this value gets externally
1162
- // changed midway through running this function!!!
1163
- var firstRun = settings[iframeId] && settings[iframeId].firstRun,
1164
- resetRequertMethod =
1165
- settings[iframeId] &&
1166
- settings[iframeId].heightCalculationMethod in resetRequiredMethods;
1167
-
1168
- if (!firstRun && resetRequertMethod) {
1169
- resetIFrame({ iframe: iframe, height: 0, width: 0, type: 'init' });
1170
- }
1171
- }
1172
-
1173
- function setupIFrameObject() {
1174
- if (settings[iframeId]) {
1175
- settings[iframeId].iframe.iFrameResizer = {
1176
- close: closeIFrame.bind(null, settings[iframeId].iframe),
1177
-
1178
- removeListeners: removeIframeListeners.bind(
1179
- null,
1180
- settings[iframeId].iframe
1181
- ),
1182
-
1183
- resize: trigger.bind(
1184
- null,
1185
- 'Window resize',
1186
- 'resize',
1187
- settings[iframeId].iframe
1188
- ),
1189
-
1190
- moveToAnchor: function (anchor) {
1191
- trigger(
1192
- 'Move to anchor',
1193
- 'moveToAnchor:' + anchor,
1194
- settings[iframeId].iframe,
1195
- iframeId
1196
- );
1197
- },
1198
-
1199
- sendMessage: function (message) {
1200
- message = JSON.stringify(message);
1201
- trigger(
1202
- 'Send Message',
1203
- 'message:' + message,
1204
- settings[iframeId].iframe,
1205
- iframeId
1206
- );
1207
- }
1208
- };
1209
- }
1210
- }
1211
-
1212
- // We have to call trigger twice, as we can not be sure if all
1213
- // iframes have completed loading when this code runs. The
1214
- // event listener also catches the page changing in the iFrame.
1215
- function init(msg) {
1216
- function iFrameLoaded() {
1217
- trigger('iFrame.onload', msg, iframe, undefined$1, true);
1218
- checkReset();
1219
- }
1220
-
1221
- function createDestroyObserver(MutationObserver) {
1222
- if (!iframe.parentNode) {
1223
- return null
1224
- }
1225
-
1226
- var destroyObserver = new MutationObserver(function (mutations) {
1227
- mutations.forEach(function (mutation) {
1228
- var removedNodes = Array.prototype.slice.call(mutation.removedNodes); // Transform NodeList into an Array
1229
- removedNodes.forEach(function (removedNode) {
1230
- if (removedNode === iframe) {
1231
- closeIFrame(iframe);
1232
- }
1233
- });
1234
- });
1235
- });
1236
- destroyObserver.observe(iframe.parentNode, {
1237
- childList: true
1238
- });
1239
- return destroyObserver
1240
- }
1241
-
1242
- var MutationObserver = getMutationObserver();
1243
- if (MutationObserver) {
1244
- destroyObserver = createDestroyObserver(MutationObserver);
1245
- }
1246
-
1247
- addEventListener(iframe, 'load', iFrameLoaded);
1248
- trigger('init', msg, iframe, undefined$1, true);
1249
- }
1250
-
1251
- function checkOptions(options) {
1252
- if ('object' !== typeof options) {
1253
- throw new TypeError('Options is not an object')
1254
- }
1255
- }
1256
-
1257
- function copyOptions(options) {
1258
- // eslint-disable-next-line no-restricted-syntax
1259
- for (var option in defaults) {
1260
- if (Object.prototype.hasOwnProperty.call(defaults, option)) {
1261
- settings[iframeId][option] = Object.prototype.hasOwnProperty.call(
1262
- options,
1263
- option
1264
- )
1265
- ? options[option]
1266
- : defaults[option];
1267
- }
1268
- }
1269
- }
1270
-
1271
- function getTargetOrigin(remoteHost) {
1272
- return '' === remoteHost ||
1273
- null !== remoteHost.match(/^(about:blank|javascript:|file:\/\/)/)
1274
- ? '*'
1275
- : remoteHost
1276
- }
1277
-
1278
- function depricate(key) {
1279
- var splitName = key.split('Callback');
1280
-
1281
- if (splitName.length === 2) {
1282
- var name =
1283
- 'on' + splitName[0].charAt(0).toUpperCase() + splitName[0].slice(1);
1284
- this[name] = this[key];
1285
- delete this[key];
1286
- warn(
1287
- iframeId,
1288
- "Deprecated: '" +
1289
- key +
1290
- "' has been renamed '" +
1291
- name +
1292
- "'. The old method will be removed in the next major version."
1293
- );
1294
- }
1295
- }
1296
-
1297
- function processOptions(options) {
1298
- options = options || {};
1299
-
1300
- settings[iframeId] = Object.create(null); // Protect against prototype attacks
1301
- settings[iframeId].iframe = iframe;
1302
- settings[iframeId].firstRun = true;
1303
- settings[iframeId].remoteHost =
1304
- iframe.src && iframe.src.split('/').slice(0, 3).join('/');
1305
-
1306
- checkOptions(options);
1307
- Object.keys(options).forEach(depricate, options);
1308
- copyOptions(options);
1309
-
1310
- if (settings[iframeId]) {
1311
- settings[iframeId].targetOrigin =
1312
- true === settings[iframeId].checkOrigin
1313
- ? getTargetOrigin(settings[iframeId].remoteHost)
1314
- : '*';
1315
- }
1316
- }
1317
-
1318
- function beenHere() {
1319
- return iframeId in settings && 'iFrameResizer' in iframe
1320
- }
1321
-
1322
- var iframeId = ensureHasId(iframe.id);
1323
-
1324
- if (beenHere()) {
1325
- warn(iframeId, 'Ignored iFrame, already setup.');
1326
- } else {
1327
- processOptions(options);
1328
- setScrolling();
1329
- setLimits();
1330
- setupBodyMarginValues();
1331
- init(createOutgoingMsg(iframeId));
1332
- setupIFrameObject();
1333
- }
1334
- }
1335
-
1336
- function debouce(fn, time) {
1337
- if (null === timer) {
1338
- timer = setTimeout(function () {
1339
- timer = null;
1340
- fn();
1341
- }, time);
1342
- }
1343
- }
1344
-
1345
- var frameTimer = {};
1346
- function debounceFrameEvents(fn, time, frameId) {
1347
- if (!frameTimer[frameId]) {
1348
- frameTimer[frameId] = setTimeout(function () {
1349
- frameTimer[frameId] = null;
1350
- fn();
1351
- }, time);
1352
- }
1353
- }
1354
-
1355
- // Not testable in PhantomJS
1356
- /* istanbul ignore next */
1357
-
1358
- function fixHiddenIFrames() {
1359
- function checkIFrames() {
1360
- function checkIFrame(settingId) {
1361
- function chkDimension(dimension) {
1362
- return (
1363
- '0px' ===
1364
- (settings[settingId] && settings[settingId].iframe.style[dimension])
1365
- )
1366
- }
1367
-
1368
- function isVisible(el) {
1369
- return null !== el.offsetParent
1370
- }
1371
-
1372
- if (
1373
- settings[settingId] &&
1374
- isVisible(settings[settingId].iframe) &&
1375
- (chkDimension('height') || chkDimension('width'))
1376
- ) {
1377
- trigger(
1378
- 'Visibility change',
1379
- 'resize',
1380
- settings[settingId].iframe,
1381
- settingId
1382
- );
1383
- }
1384
- }
1385
-
1386
- Object.keys(settings).forEach(function (key) {
1387
- checkIFrame(key);
1388
- });
1389
- }
1390
-
1391
- function mutationObserved(mutations) {
1392
- log(
1393
- 'window',
1394
- 'Mutation observed: ' + mutations[0].target + ' ' + mutations[0].type
1395
- );
1396
- debouce(checkIFrames, 16);
1397
- }
1398
-
1399
- function createMutationObserver() {
1400
- var target = document.querySelector('body'),
1401
- config = {
1402
- attributes: true,
1403
- attributeOldValue: false,
1404
- characterData: true,
1405
- characterDataOldValue: false,
1406
- childList: true,
1407
- subtree: true
1408
- },
1409
- observer = new MutationObserver(mutationObserved);
1410
-
1411
- observer.observe(target, config);
1412
- }
1413
-
1414
- var MutationObserver = getMutationObserver();
1415
- if (MutationObserver) {
1416
- createMutationObserver();
1417
- }
1418
- }
1419
-
1420
- function resizeIFrames(event) {
1421
- function resize() {
1422
- sendTriggerMsg('Window ' + event, 'resize');
1423
- }
1424
-
1425
- log('window', 'Trigger event: ' + event);
1426
- debouce(resize, 16);
1427
- }
1428
-
1429
- // Not testable in PhantomJS
1430
- /* istanbul ignore next */
1431
- function tabVisible() {
1432
- function resize() {
1433
- sendTriggerMsg('Tab Visible', 'resize');
1434
- }
1435
-
1436
- if ('hidden' !== document.visibilityState) {
1437
- log('document', 'Trigger event: Visibility change');
1438
- debouce(resize, 16);
1439
- }
1440
- }
1441
-
1442
- function sendTriggerMsg(eventName, event) {
1443
- function isIFrameResizeEnabled(iframeId) {
1444
- return (
1445
- settings[iframeId] &&
1446
- 'parent' === settings[iframeId].resizeFrom &&
1447
- settings[iframeId].autoResize &&
1448
- !settings[iframeId].firstRun
1449
- )
1450
- }
1451
-
1452
- Object.keys(settings).forEach(function (iframeId) {
1453
- if (isIFrameResizeEnabled(iframeId)) {
1454
- trigger(eventName, event, settings[iframeId].iframe, iframeId);
1455
- }
1456
- });
1457
- }
1458
-
1459
- function setupEventListeners() {
1460
- addEventListener(window, 'message', iFrameListener);
1461
-
1462
- addEventListener(window, 'resize', function () {
1463
- resizeIFrames('resize');
1464
- });
1465
-
1466
- addEventListener(document, 'visibilitychange', tabVisible);
1467
-
1468
- addEventListener(document, '-webkit-visibilitychange', tabVisible);
1469
- }
1470
-
1471
- function factory() {
1472
- function init(options, element) {
1473
- function chkType() {
1474
- if (!element.tagName) {
1475
- throw new TypeError('Object is not a valid DOM element')
1476
- } else if ('IFRAME' !== element.tagName.toUpperCase()) {
1477
- throw new TypeError(
1478
- 'Expected <IFRAME> tag, found <' + element.tagName + '>'
1479
- )
1480
- }
1481
- }
1482
-
1483
- if (element) {
1484
- chkType();
1485
- setupIFrame(element, options);
1486
- iFrames.push(element);
1487
- }
1488
- }
1489
-
1490
- function warnDeprecatedOptions(options) {
1491
- if (options && options.enablePublicMethods) {
1492
- warn(
1493
- 'enablePublicMethods option has been removed, public methods are now always available in the iFrame'
1494
- );
1495
- }
1496
- }
1497
-
1498
- var iFrames;
1499
-
1500
- setupRequestAnimationFrame();
1501
- setupEventListeners();
1502
-
1503
- return function iFrameResizeF(options, target) {
1504
- iFrames = []; // Only return iFrames past in on this call
1505
-
1506
- warnDeprecatedOptions(options);
1507
-
1508
- switch (typeof target) {
1509
- case 'undefined':
1510
- case 'string': {
1511
- Array.prototype.forEach.call(
1512
- document.querySelectorAll(target || 'iframe'),
1513
- init.bind(undefined$1, options)
1514
- );
1515
- break
1516
- }
1517
-
1518
- case 'object': {
1519
- init(options, target);
1520
- break
1521
- }
1522
-
1523
- default: {
1524
- throw new TypeError('Unexpected data type (' + typeof target + ')')
1525
- }
1526
- }
1527
-
1528
- return iFrames
1529
- }
1530
- }
1531
-
1532
- function createJQueryPublicMethod($) {
1533
- if (!$.fn) {
1534
- info('', 'Unable to bind to jQuery, it is not fully loaded.');
1535
- } else if (!$.fn.iFrameResize) {
1536
- $.fn.iFrameResize = function $iFrameResizeF(options) {
1537
- function init(index, element) {
1538
- setupIFrame(element, options);
1539
- }
1540
-
1541
- return this.filter('iframe').each(init).end()
1542
- };
1543
- }
1544
- }
1545
-
1546
- if (window.jQuery !== undefined$1) {
1547
- createJQueryPublicMethod(window.jQuery);
1548
- }
1549
-
1550
- if (typeof undefined$1 === 'function' && undefined$1.amd) {
1551
- undefined$1([], factory);
1552
- } else {
1553
- // Node for browserfy
1554
- module.exports = factory();
1555
- }
1556
- window.iFrameResize = window.iFrameResize || factory();
1557
- })();
1558
- }(iframeResizer));
1559
-
1560
- const iFrameResize = iframeResizer.exports;
1561
-
1562
- /**
1563
- * This approach decouples the communication logic from PaymentMethodForm component,
1564
- * making it cleaner, more maintainable, and easier to test
1565
- */
1566
- class FrameCommunicationService {
1567
- constructor(iframe, iframeOrigin) {
1568
- this.iframe = iframe;
1569
- this.iframeOrigin = iframeOrigin;
1570
- }
1571
- postMessage(eventType, payload) {
1572
- const message = Object.assign({ eventType }, payload);
1573
- this.iframe.contentWindow.postMessage(message, this.iframeOrigin);
1574
- }
1575
- addMessageListener(callback) {
1576
- window.addEventListener('message', callback);
1577
- }
1578
- removeMessageListener(callback) {
1579
- window.removeEventListener('message', callback);
1580
- }
1581
- postMessageWithResponseListener(eventType, payload) {
1582
- return new Promise((resolve) => {
1583
- const responseListener = (event) => {
1584
- if (event.data.eventType !== eventType)
1585
- return;
1586
- window.removeEventListener('message', responseListener);
1587
- resolve(event.data.data);
1588
- };
1589
- window.addEventListener('message', responseListener);
1590
- this.postMessage(eventType, payload);
1591
- });
1592
- }
1593
- }
1594
-
1595
- const MessageEventType = {
1596
- tokenize: 'tokenize',
1597
- validate: 'validate',
1598
- };
1599
-
1600
- const IframeInput = class {
1601
- constructor(hostRef) {
1602
- index.registerInstance(this, hostRef);
1603
- this.iframeLoaded = index.createEvent(this, "iframeLoaded", 7);
1604
- this.dispatchMessageEvent = (event) => {
1605
- const { eventType, data } = event.data;
1606
- if ((data === null || data === void 0 ? void 0 : data.id) !== this.inputId) {
1607
- return;
1608
- }
1609
- if (eventType === 'focused') {
1610
- this.isFocused = true;
1611
- }
1612
- if (eventType === 'blurred') {
1613
- this.isFocused = false;
1614
- }
1615
- };
1616
- this.isFocused = false;
1617
- this.isValid = true;
1618
- this.errorText = undefined;
1619
- this.inputId = undefined;
1620
- this.label = undefined;
1621
- this.iframeOrigin = undefined;
1622
- }
1623
- disconnectedCallback() {
1624
- this.frameService.removeMessageListener(this.dispatchMessageEvent);
1625
- }
1626
- async validate() {
1627
- const response = await this.frameService
1628
- .postMessageWithResponseListener(MessageEventType.validate);
1629
- this.isValid = response.isValid;
1630
- this.errorText = response.error.message;
1631
- return response;
1632
- }
1633
- async tokenize(clientId, paymentMethodMetadata, account) {
1634
- return this.frameService.postMessageWithResponseListener(MessageEventType.tokenize, {
1635
- clientId,
1636
- paymentMethodMetadata,
1637
- account,
1638
- componentVersion: _package.packageJson.version,
1639
- });
1640
- }
1641
- initializeFrameCommunicationService() {
1642
- var _a;
1643
- this.frameService = new FrameCommunicationService(this.iframeElement, this.iframeOrigin);
1644
- (_a = this.frameService) === null || _a === void 0 ? void 0 : _a.addMessageListener(this.dispatchMessageEvent);
1645
- }
1646
- get part() {
1647
- if (this.isFocused && !this.isValid) {
1648
- return parts.inputInvalidAndFocused;
1649
- }
1650
- if (!this.isValid) {
1651
- return parts.inputInvalid;
1652
- }
1653
- if (this.isFocused) {
1654
- return parts.inputFocused;
1655
- }
1656
- return parts.input;
1657
- }
1658
- get style() {
1659
- if (this.isFocused) {
1660
- if (!this.isValid) {
1661
- return iframeInputStylesState.iframeInputStyles.focusedAndInvalid;
1662
- }
1663
- return iframeInputStylesState.iframeInputStyles.focused;
1664
- }
1665
- return null;
1666
- }
1667
- get urlParams() {
1668
- // map the iframeInputStyles.fontStyles properties to the urlParams
1669
- // and encode each property with btoa
1670
- const encodedObject = Object.fromEntries(Object
1671
- .entries(iframeInputStylesState.iframeInputStyles.fontStyles)
1672
- .map(([key, value]) => [key, btoa(String(value))]));
1673
- const params = new URLSearchParams(encodedObject).toString();
1674
- return params;
1675
- }
1676
- render() {
1677
- return (index.h(index.Host, { key: '0c7696f592d079436b8a91d33474f74de2922917', class: "form-group d-flex flex-column" }, index.h("div", { key: '947cd055eb77e78ec719da130fab97ca093e4954', style: {
1678
- visibility: this.iframeLoaded ? 'visible' : 'hidden',
1679
- height: this.iframeLoaded ? 'auto' : '0',
1680
- } }, index.h("label", { key: '59dfc89fb0ffb5163b9ea6c7eef12b1ff5bab5d2', class: "form-label", htmlFor: "", part: parts.label }, this.label || ''), index.h("div", { key: 'cad88a50d0381285a1c125e1331c3e401327554d', class: `p-0 d-flex form-control ${this.isValid ? '' : 'is-invalid'}`, part: this.part, style: Object.assign(Object.assign({}, this.style), { overflow: 'hidden' }) }, index.h("iframe", { key: 'bf4af4cc965ddd4376b5780ea53824cb268c1952', id: this.inputId, name: this.inputId, src: `${this.iframeOrigin}?${this.urlParams}`, ref: el => {
1681
- this.iframeElement = el;
1682
- this.initializeFrameCommunicationService();
1683
- }, width: "100%", onLoad: () => {
1684
- iFrameResize({
1685
- log: false,
1686
- onResized: () => {
1687
- this.iframeLoaded.emit();
1688
- }
1689
- }, this.iframeElement);
1690
- } })), index.h(formControlErrorText.FormControlErrorText, { key: '785e5ad09f32240299116d906f5a5dbf3f03ed5e', errorText: this.errorText, name: this.inputId }))));
1691
- }
1692
- get el() { return index.getElement(this); }
1693
- };
1694
-
1695
- const PostalForm = class {
1696
- constructor(hostRef) {
1697
- index.registerInstance(this, hostRef);
1698
- this.inputHandler = (name, value) => {
1699
- this.formController.setValues(Object.assign(Object.assign({}, this.formController.values.getValue()), { [name]: value }));
1700
- };
1701
- this.legend = undefined;
1702
- this.formController = undefined;
1703
- this.billingInfo = undefined;
1704
- this.errors = {};
1705
- }
1706
- componentWillLoad() {
1707
- this.formController = new index_esm.FormController(PostalFormSchema);
1708
- }
1709
- componentDidLoad() {
1710
- this.formController.values.subscribe(values => this.billingInfo = Object.assign({}, values));
1711
- this.formController.errors.subscribe(errors => {
1712
- this.errors = Object.assign({}, errors);
1713
- });
1714
- }
1715
- async getValues() {
1716
- return this.formController.values.getValue();
1717
- }
1718
- async fill(fields) {
1719
- this.formController.setInitialValues(fields);
1720
- }
1721
- async validate() {
1722
- let isValid = await this.formController.validate();
1723
- return { isValid: isValid };
1724
- }
1725
- render() {
1726
- const postalFormDefaultValue = this.formController.getInitialValues();
1727
- return (index.h(index.Host, { key: '3d70df5d84e1ee5bf9dfac6802d363e06341174e' }, index.h("form", { key: 'f91ec1a5078461075c419be4402a8df393bae499' }, index.h("fieldset", { key: '25ccb09388339cab44e70319c9d918c51d6049bf' }, this.legend && index.h("legend", { key: '292c52a34f7eba726121c68ced16e91d7f442b7f' }, this.legend), index.h("div", { key: 'a29e228daceb269c8d2137aed1cfe6db8eb7d821', class: "row gy-3" }, index.h("div", { key: 'b4bf02f82a7048051fe72c409da6612533ee2645', class: "col-12" }, index.h("form-control-text", { key: '43ef0840e700024c2aeab32cf8e2f4bd3b360de6', name: 'address_postal_code', label: "ZIP", defaultValue: postalFormDefaultValue.address_postal_code, errorText: this.errors.address_postal_code, inputHandler: this.inputHandler, maxLength: 5, keyDownHandler: utils.numberOnlyHandler })))))));
1728
- }
1729
- };
1730
-
1731
- exports.billing_form = BillingForm;
1732
- exports.iframe_input = IframeInput;
1733
- exports.postal_form = PostalForm;