@justifi/webcomponents 6.12.3 → 6.13.0-rc.1

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 (608) hide show
  1. package/dist/cjs/{Analytics-DcqsdFaD.js → Analytics-Be2I_aiS.js} +2 -3
  2. package/dist/cjs/{Plaid-BlSGeGpn.js → Plaid-Aw35bhCX.js} +62 -6
  3. package/dist/cjs/additional-questions-form-step_14.cjs.entry.js +151 -19
  4. package/dist/cjs/{justifi-additional-statement_8.cjs.entry.js → additional-statement_8.cjs.entry.js} +24 -24
  5. package/dist/cjs/bank-account-form.cjs.entry.js +2 -2
  6. package/dist/cjs/{business-identity-schema-DWWtSiUF.js → business-identity-schema-DI9XFbaD.js} +67 -0
  7. package/dist/cjs/{business.service-BheJs82v.js → business.service-CylI3Qrg.js} +1 -2
  8. package/dist/cjs/card-form.cjs.entry.js +2 -2
  9. package/dist/cjs/{check-pkg-version-DFTQGZz1.js → check-pkg-version-BLLLh6v-.js} +1 -1
  10. package/dist/cjs/checkout-actions-8-MUczKw.js +62 -0
  11. package/dist/cjs/{checkout.service-DZKdHQQq.js → checkout.service-BYpinbSR.js} +1 -2
  12. package/dist/cjs/custom-popper_2.cjs.entry.js +2 -2
  13. package/dist/cjs/{justifi-dispute-notification_3.cjs.entry.js → dispute-notification_2.cjs.entry.js} +67 -90
  14. package/dist/cjs/{event-types-BWQT2lwu.js → event-types-DptNnCEP.js} +30 -0
  15. package/dist/cjs/form-address-fields_3.cjs.entry.js +2 -2
  16. package/dist/cjs/form-control-date.cjs.entry.js +2 -2
  17. package/dist/cjs/form-control-file-v2_2.cjs.entry.js +3 -3
  18. package/dist/cjs/form-control-file.cjs.entry.js +2 -2
  19. package/dist/cjs/form-control-monetary.cjs.entry.js +2 -2
  20. package/dist/cjs/form-control-number_2.cjs.entry.js +89 -0
  21. package/dist/cjs/form-control-radio.cjs.entry.js +2 -2
  22. package/dist/cjs/form-control-select_2.cjs.entry.js +4 -4
  23. package/dist/cjs/{get-business-TFzhaBXn.js → get-business-D10Tmct1.js} +2 -2
  24. package/dist/cjs/{get-payment-details-DL5FmIyF.js → get-payment-details-BB5aa48u.js} +2 -3
  25. package/dist/cjs/{get-subaccounts-CVK4O7th.js → get-subaccounts-CSD2nAqD.js} +2 -3
  26. package/dist/cjs/hidden-input_2.cjs.entry.js +5 -5
  27. package/dist/cjs/internal-button.cjs.entry.js +1 -1
  28. package/dist/cjs/justifi-apple-pay_11.cjs.entry.js +15 -70
  29. package/dist/cjs/justifi-bank-account-billing-form-simple.cjs.entry.js +5 -6
  30. package/dist/cjs/justifi-bank-account-form.cjs.entry.js +5 -6
  31. package/dist/cjs/justifi-billing-form-full.cjs.entry.js +1 -1
  32. package/dist/cjs/justifi-business-details.cjs.entry.js +7 -8
  33. package/dist/cjs/justifi-business-form.cjs.entry.js +10 -12
  34. package/dist/cjs/justifi-card-billing-form-simple.cjs.entry.js +1 -1
  35. package/dist/cjs/justifi-card-form.cjs.entry.js +5 -6
  36. package/dist/cjs/justifi-checkout-qr-code.cjs.entry.js +3141 -0
  37. package/dist/cjs/justifi-checkout.cjs.entry.js +4 -5
  38. package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +3 -4
  39. package/dist/cjs/justifi-checkouts-list.cjs.entry.js +190 -27
  40. package/dist/cjs/justifi-dispute-management.cjs.entry.js +65 -18
  41. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +11071 -23
  42. package/dist/cjs/justifi-order-terminals.cjs.entry.js +9 -10
  43. package/dist/cjs/justifi-payment-details.cjs.entry.js +16 -17
  44. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +7 -8
  45. package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +7 -8
  46. package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +2 -2
  47. package/dist/cjs/justifi-payments-list.cjs.entry.js +7 -8
  48. package/dist/cjs/justifi-payout-details.cjs.entry.js +10 -11
  49. package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +7 -8
  50. package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +3 -4
  51. package/dist/cjs/justifi-payouts-list.cjs.entry.js +9 -10
  52. package/dist/cjs/justifi-qr-terminal.cjs.entry.js +208 -0
  53. package/dist/cjs/justifi-refund-payment.cjs.entry.js +7 -8
  54. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +5 -6
  55. package/dist/cjs/justifi-skeleton.cjs.entry.js +1 -1
  56. package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +4 -5
  57. package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +178 -24
  58. package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +2 -3
  59. package/dist/cjs/justifi-terminals-list.cjs.entry.js +8 -9
  60. package/dist/cjs/loader.cjs.js +1 -1
  61. package/dist/cjs/{package-bM0MyhTf.js → package-gx36QXN1.js} +1 -1
  62. package/dist/cjs/payment-method-option.cjs.entry.js +1 -1
  63. package/dist/cjs/{payment-provisioning-actions-BO7dzIm1.js → payment-provisioning-actions-DimM0KGV.js} +2 -2
  64. package/dist/cjs/{payment.service-sZKlg2Jq.js → payment.service-fy5bXXmA.js} +1 -2
  65. package/dist/cjs/{payout.service-BcQVsMCS.js → payout.service-hp3PTXWI.js} +1 -2
  66. package/dist/cjs/{payouts-status-CwgOMz-S.js → payouts-status-CF1YT_RL.js} +2 -2
  67. package/dist/cjs/{plaid.service-BcgO2VXC.js → plaid.service-9PmS4X0g.js} +1 -2
  68. package/dist/cjs/radio-list-item.cjs.entry.js +1 -1
  69. package/dist/cjs/table-filters-menu.cjs.entry.js +1 -1
  70. package/dist/cjs/terminal-quantity-selector.cjs.entry.js +1 -1
  71. package/dist/cjs/{terminal.service-CjMMWSh3.js → terminal.service-D5D76Cnn.js} +1 -2
  72. package/dist/cjs/{utils-DbTucCTO.js → utils-Dcde8Zpt.js} +1 -1
  73. package/dist/cjs/webcomponents.cjs.js +1 -1
  74. package/dist/collection/api/Terminal.js +1 -1
  75. package/dist/collection/collection-manifest.json +12 -16
  76. package/dist/collection/components/business-forms/owner-form/owner-form-inputs.js +2 -2
  77. package/dist/collection/components/business-forms/owner-form/owner-form.js +226 -12
  78. package/dist/collection/components/checkout-qr-code/justifi-checkout-qr-code.js +128 -0
  79. package/dist/collection/components/checkouts-list/checkouts-list-filters.js +2 -2
  80. package/dist/collection/components/checkouts-list/justifi-checkouts-list.js +166 -16
  81. package/dist/collection/components/dispute-management/{justifi-dispute-notification.js → dispute-notification.js} +5 -6
  82. package/dist/collection/components/dispute-management/dispute-response/{justifi-additional-statement.js → additional-statement.js} +3 -3
  83. package/dist/collection/components/dispute-management/dispute-response/{justifi-cancellation-policy.js → cancellation-policy.js} +3 -3
  84. package/dist/collection/components/dispute-management/dispute-response/{justifi-customer-details.js → customer-details.js} +3 -3
  85. package/dist/collection/components/dispute-management/dispute-response/{dispute-response-core.js → dispute-response.js} +105 -77
  86. package/dist/collection/components/dispute-management/dispute-response/{justifi-duplicate-charge.js → duplicate-charge.js} +3 -3
  87. package/dist/collection/components/dispute-management/dispute-response/{justifi-electronic-evidence.js → electronic-evidence.js} +3 -3
  88. package/dist/collection/components/dispute-management/dispute-response/{justifi-product-or-service.js → product-or-service.js} +3 -3
  89. package/dist/collection/components/dispute-management/dispute-response/{justifi-refund-policy.js → refund-policy.js} +3 -3
  90. package/dist/collection/components/dispute-management/dispute-response/{justifi-shipping-details.js → shipping-details.js} +3 -3
  91. package/dist/collection/components/dispute-management/justifi-dispute-management.js +78 -11
  92. package/dist/collection/components/filters/table-filters-menu.js +1 -1
  93. package/dist/collection/components/gross-payment-chart/justifi-gross-payment-chart.js +79 -15
  94. package/dist/collection/components/modular-checkout/justifi-modular-checkout.js +1 -1
  95. package/dist/collection/components/modular-checkout/sub-components/justifi-bank-account-billing-form-simple.js +1 -1
  96. package/dist/collection/components/modular-checkout/sub-components/justifi-bank-account-form.js +1 -1
  97. package/dist/collection/components/modular-checkout/sub-components/justifi-billing-form-full.js +1 -1
  98. package/dist/collection/components/modular-checkout/sub-components/justifi-card-billing-form-simple.js +1 -1
  99. package/dist/collection/components/modular-checkout/sub-components/justifi-card-form.js +1 -1
  100. package/dist/collection/components/modular-checkout/sub-components/justifi-checkout-summary.js +1 -1
  101. package/dist/collection/components/modular-checkout/sub-components/payment-method-option.js +1 -1
  102. package/dist/collection/components/order-terminals/justifi-order-terminals.js +1 -1
  103. package/dist/collection/components/order-terminals/terminal-quantity-selector/terminal-quantity-selector.js +1 -1
  104. package/dist/collection/components/payment-details/justifi-payment-details.js +8 -8
  105. package/dist/collection/components/payment-transactions-list/justifi-payment-transactions-list.js +1 -1
  106. package/dist/collection/components/payments-list/justifi-payments-list-filters.js +2 -2
  107. package/dist/collection/components/payments-list/justifi-payments-list.js +1 -1
  108. package/dist/collection/components/payout-details/justifi-payout-details.js +3 -3
  109. package/dist/collection/components/payout-transactions-list/justifi-payout-transactions-list.js +1 -1
  110. package/dist/collection/components/payouts-list/justifi-payouts-list-filters.js +2 -2
  111. package/dist/collection/components/payouts-list/justifi-payouts-list.js +1 -1
  112. package/dist/collection/components/qr-terminal/justifi-qr-terminal.js +349 -0
  113. package/dist/collection/components/terminal-orders-list/justifi-terminal-orders-list-filters.js +3 -3
  114. package/dist/collection/components/terminal-orders-list/justifi-terminal-orders-list.js +134 -10
  115. package/dist/collection/components/terminals-list/justifi-terminals-list-filters.js +1 -1
  116. package/dist/collection/components/terminals-list/justifi-terminals-list.js +1 -1
  117. package/dist/collection/components/tokenize-payment-method/justifi-tokenize-payment-method.js +1 -1
  118. package/dist/collection/ui-components/custom-popper/custom-popper.js +2 -2
  119. package/dist/collection/ui-components/form/form-control-date.js +2 -2
  120. package/dist/collection/ui-components/form/form-control-file-v2.js +1 -1
  121. package/dist/collection/ui-components/form/form-control-file.js +2 -2
  122. package/dist/collection/ui-components/form/form-control-monetary.js +2 -2
  123. package/dist/collection/ui-components/form/form-control-number-masked.js +2 -2
  124. package/dist/collection/ui-components/form/form-control-number.js +2 -2
  125. package/dist/collection/ui-components/form/form-control-radio.js +2 -2
  126. package/dist/collection/ui-components/form/form-control-select.js +2 -2
  127. package/dist/collection/ui-components/form/form-control-text.js +2 -2
  128. package/dist/collection/ui-components/form/form-control-textarea.js +2 -2
  129. package/dist/collection/ui-components/form/hidden-input.js +1 -1
  130. package/dist/collection/ui-components/form/iframe-input.js +3 -3
  131. package/dist/collection/ui-components/internal-button.js +1 -1
  132. package/dist/collection/ui-components/radio-list-item.js +1 -1
  133. package/dist/collection/ui-components/shadow-dom-components/justifi-button.js +1 -1
  134. package/dist/collection/ui-components/shadow-dom-components/justifi-header.js +1 -1
  135. package/dist/collection/ui-components/shadow-dom-components/justifi-skeleton.js +1 -1
  136. package/dist/docs.json +5878 -6778
  137. package/dist/esm/{Analytics-Cyc3ZLPx.js → Analytics-DZWGizAK.js} +2 -3
  138. package/dist/esm/{Plaid-BuKEVgbB.js → Plaid-fhlY0CIN.js} +58 -3
  139. package/dist/esm/additional-questions-details_5.entry.js +2 -2
  140. package/dist/esm/additional-questions-form-step_14.entry.js +156 -24
  141. package/dist/esm/additional-questions_5.entry.js +2 -2
  142. package/dist/esm/{justifi-additional-statement_8.entry.js → additional-statement_8.entry.js} +19 -19
  143. package/dist/esm/{badge-B6dp1XGV.js → badge-Dlcl9qdm.js} +1 -1
  144. package/dist/esm/bank-account-billing-form-simple_4.entry.js +5 -5
  145. package/dist/esm/bank-account-form.entry.js +4 -4
  146. package/dist/esm/bank-account-read-only-value.entry.js +1 -1
  147. package/dist/esm/business-identity-schema-D-Nk9aGV.js +163 -0
  148. package/dist/esm/{business.service-BPbZ5fxQ.js → business.service-Crs-0Mdy.js} +1 -2
  149. package/dist/esm/{button-DRdaAudE.js → button-BvzOzV4l.js} +1 -1
  150. package/dist/esm/card-form.entry.js +4 -4
  151. package/dist/esm/{check-pkg-version-6iGDh82c.js → check-pkg-version-CVyuA8aH.js} +1 -1
  152. package/dist/esm/checkout-actions-BMnp3uHK.js +59 -0
  153. package/dist/esm/{checkout.service-CJMfFKyS.js → checkout.service-BMAQVmHa.js} +1 -2
  154. package/dist/esm/{country-config-P042rrI3.js → country-config-B_fuF6JU.js} +1 -1
  155. package/dist/esm/custom-popper_2.entry.js +3 -3
  156. package/dist/esm/{justifi-dispute-notification_3.entry.js → dispute-notification_2.entry.js} +68 -90
  157. package/dist/esm/{event-types-Bg2SZArf.js → event-types-CVVB5p_Q.js} +29 -1
  158. package/dist/esm/form-address-fields_3.entry.js +5 -5
  159. package/dist/esm/form-control-checkbox.entry.js +3 -3
  160. package/dist/esm/form-control-date.entry.js +4 -4
  161. package/dist/esm/{form-control-error-text-DVedKyhp.js → form-control-error-text-Di9QePY5.js} +1 -1
  162. package/dist/esm/form-control-file-v2_2.entry.js +5 -5
  163. package/dist/esm/form-control-file.entry.js +4 -4
  164. package/dist/esm/{form-control-help-text-D-349cNw.js → form-control-help-text-DGMpMuAm.js} +1 -1
  165. package/dist/esm/form-control-monetary-provisioning.entry.js +3 -3
  166. package/dist/esm/form-control-monetary.entry.js +5 -5
  167. package/dist/esm/form-control-number_2.entry.js +86 -0
  168. package/dist/esm/form-control-radio.entry.js +3 -3
  169. package/dist/esm/form-control-select_2.entry.js +6 -6
  170. package/dist/esm/{get-business-DIpEbczl.js → get-business-B9ZS1tVq.js} +2 -2
  171. package/dist/esm/{get-payment-details-DjBou5Fu.js → get-payment-details-CiR6FrkO.js} +2 -3
  172. package/dist/esm/{get-subaccounts-CgDWE_5o.js → get-subaccounts-VpDr7yN4.js} +2 -3
  173. package/dist/esm/{header-1-Bl7MHW0w.js → header-1-evYxFIGN.js} +1 -1
  174. package/dist/esm/{header-3-C7JJVnMG.js → header-3-BUDap2xY.js} +1 -1
  175. package/dist/esm/hidden-input_2.entry.js +7 -7
  176. package/dist/esm/{index.esm-BHdVU4hV.js → index.esm-CgNcFueq.js} +1 -1
  177. package/dist/esm/{insurance-state-qTdpe84i.js → insurance-state-CLGc1-_4.js} +1 -1
  178. package/dist/esm/internal-button.entry.js +3 -3
  179. package/dist/esm/justifi-apple-pay_11.entry.js +18 -73
  180. package/dist/esm/justifi-bank-account-billing-form-simple.entry.js +5 -6
  181. package/dist/esm/justifi-bank-account-form.entry.js +5 -6
  182. package/dist/esm/justifi-billing-form-full.entry.js +1 -1
  183. package/dist/esm/justifi-business-details.entry.js +10 -11
  184. package/dist/esm/justifi-business-form.entry.js +15 -17
  185. package/dist/esm/justifi-card-billing-form-simple.entry.js +1 -1
  186. package/dist/esm/justifi-card-form.entry.js +5 -6
  187. package/dist/esm/justifi-checkout-qr-code.entry.js +3139 -0
  188. package/dist/esm/justifi-checkout.entry.js +5 -6
  189. package/dist/esm/justifi-checkouts-list-filters.entry.js +4 -5
  190. package/dist/esm/justifi-checkouts-list.entry.js +190 -27
  191. package/dist/esm/justifi-details.entry.js +2 -2
  192. package/dist/esm/justifi-dispute-management.entry.js +64 -17
  193. package/dist/esm/justifi-gross-payment-chart.entry.js +11071 -23
  194. package/dist/esm/justifi-order-terminals.entry.js +11 -12
  195. package/dist/esm/justifi-payment-details.entry.js +20 -21
  196. package/dist/esm/justifi-payment-provisioning.entry.js +11 -12
  197. package/dist/esm/justifi-payment-transactions-list.entry.js +10 -11
  198. package/dist/esm/justifi-payments-list-filters.entry.js +3 -3
  199. package/dist/esm/justifi-payments-list.entry.js +12 -13
  200. package/dist/esm/justifi-payout-details.entry.js +15 -16
  201. package/dist/esm/justifi-payout-transactions-list.entry.js +10 -11
  202. package/dist/esm/justifi-payouts-list-filters.entry.js +4 -5
  203. package/dist/esm/justifi-payouts-list.entry.js +13 -14
  204. package/dist/esm/justifi-qr-terminal.entry.js +206 -0
  205. package/dist/esm/justifi-refund-payment.entry.js +11 -12
  206. package/dist/esm/justifi-saved-payment-method.entry.js +1 -1
  207. package/dist/esm/justifi-season-interruption-insurance.entry.js +8 -9
  208. package/dist/esm/justifi-skeleton.entry.js +3 -3
  209. package/dist/esm/justifi-terminal-orders-list-filters.entry.js +5 -6
  210. package/dist/esm/justifi-terminal-orders-list.entry.js +175 -21
  211. package/dist/esm/justifi-terminals-list-filters.entry.js +3 -4
  212. package/dist/esm/justifi-terminals-list.entry.js +12 -13
  213. package/dist/esm/loader.js +1 -1
  214. package/dist/esm/{package-beXEDfB9.js → package-CZa-hHhJ.js} +1 -1
  215. package/dist/esm/pagination-menu.entry.js +1 -1
  216. package/dist/esm/{parts-DnrawQn3.js → parts-CPKMvyV_.js} +1 -1
  217. package/dist/esm/payment-method-option.entry.js +2 -2
  218. package/dist/esm/{payment-provisioning-actions-Dr0YIShV.js → payment-provisioning-actions-CcDadiRe.js} +2 -2
  219. package/dist/esm/payment-provisioning-form-buttons_2.entry.js +2 -2
  220. package/dist/esm/{payment-provisioning-loading-DI2wDkhm.js → payment-provisioning-loading-Dve2xQA4.js} +1 -1
  221. package/dist/esm/{payment.service-Ckbb7gXA.js → payment.service-BiKQPL4M.js} +1 -2
  222. package/dist/esm/{payments-status-BIDoGw-m.js → payments-status-BlVUt4C1.js} +1 -1
  223. package/dist/esm/{payout.service-BgFKxEoL.js → payout.service-B9_cyUiU.js} +1 -2
  224. package/dist/esm/{payouts-status-1T2NZBoE.js → payouts-status-xOa5tT66.js} +3 -3
  225. package/dist/esm/{plaid.service-BLguQHs_.js → plaid.service-bU3qIoKd.js} +1 -2
  226. package/dist/esm/radio-list-item.entry.js +2 -2
  227. package/dist/esm/{schema-validations-v6WGlZkq.js → schema-validations-u9_XnlUL.js} +2 -2
  228. package/dist/esm/{skeleton-CXGFVqDf.js → skeleton-BEHo2ypu.js} +1 -1
  229. package/dist/esm/{spinner-kSw6PcwU.js → spinner-DIiQZd6_.js} +1 -1
  230. package/dist/esm/{table-CcyuIutB.js → table-DqGfsdys.js} +3 -3
  231. package/dist/esm/table-filters-menu.entry.js +3 -3
  232. package/dist/esm/terminal-quantity-selector.entry.js +2 -2
  233. package/dist/esm/{terminal.service-0oISl5j-.js → terminal.service-BM6BvevW.js} +1 -2
  234. package/dist/esm/{utils-DcfpJGDZ.js → utils-BogmBHgt.js} +1 -1
  235. package/dist/esm/{utils-BxYS3WDw.js → utils-CX6puxwf.js} +1 -1
  236. package/dist/esm/webcomponents.js +1 -1
  237. package/dist/module/Plaid.js +2 -2
  238. package/dist/module/{justifi-refund-policy.d.ts → additional-statement.d.ts} +4 -4
  239. package/dist/module/additional-statement.js +6 -0
  240. package/dist/module/{justifi-additional-statement2.js → additional-statement2.js} +8 -8
  241. package/dist/module/badge.js +1 -1
  242. package/dist/module/bank-account-billing-form-simple2.js +1 -1
  243. package/dist/module/billing-form-full2.js +1 -1
  244. package/dist/module/business-owners-form-step2.js +20 -26
  245. package/dist/module/button.js +1 -1
  246. package/dist/module/cancellation-policy.d.ts +11 -0
  247. package/dist/module/cancellation-policy.js +6 -0
  248. package/dist/module/{justifi-cancellation-policy2.js → cancellation-policy2.js} +8 -8
  249. package/dist/module/card-billing-form-simple2.js +1 -1
  250. package/dist/module/checkout-actions.js +59 -0
  251. package/dist/module/custom-popper2.js +2 -2
  252. package/dist/module/customer-details.d.ts +11 -0
  253. package/dist/module/customer-details.js +6 -0
  254. package/dist/module/{justifi-customer-details2.js → customer-details2.js} +8 -8
  255. package/dist/module/dispute-notification.d.ts +11 -0
  256. package/dist/module/dispute-notification.js +6 -0
  257. package/dist/module/dispute-notification2.js +82 -0
  258. package/dist/module/dispute-response.d.ts +11 -0
  259. package/dist/module/dispute-response.js +6 -0
  260. package/dist/module/{dispute-response-core.js → dispute-response2.js} +105 -53
  261. package/dist/module/duplicate-charge.d.ts +11 -0
  262. package/dist/module/duplicate-charge.js +6 -0
  263. package/dist/module/{justifi-duplicate-charge2.js → duplicate-charge2.js} +8 -8
  264. package/dist/module/electronic-evidence.d.ts +11 -0
  265. package/dist/module/electronic-evidence.js +6 -0
  266. package/dist/module/{justifi-electronic-evidence2.js → electronic-evidence2.js} +8 -8
  267. package/dist/module/event-types3.js +119 -1
  268. package/dist/module/form-alert2.js +1 -1
  269. package/dist/module/form-control-date2.js +2 -2
  270. package/dist/module/form-control-file-v22.js +1 -1
  271. package/dist/module/form-control-file2.js +2 -2
  272. package/dist/module/form-control-monetary2.js +2 -2
  273. package/dist/module/form-control-number-masked2.js +2 -2
  274. package/dist/module/form-control-number2.js +3 -3
  275. package/dist/module/form-control-radio2.js +2 -2
  276. package/dist/module/form-control-select2.js +2 -2
  277. package/dist/module/form-control-text2.js +2 -2
  278. package/dist/module/form-control-textarea2.js +3 -3
  279. package/dist/module/hidden-input2.js +2 -2
  280. package/dist/module/iframe-input2.js +4 -4
  281. package/dist/module/internal-button2.js +1 -1
  282. package/dist/module/justifi-bank-account-billing-form-simple.js +1 -1
  283. package/dist/module/justifi-bank-account-form.js +1 -1
  284. package/dist/module/justifi-billing-form-full.js +1 -1
  285. package/dist/module/justifi-button2.js +1 -1
  286. package/dist/module/justifi-card-billing-form-simple.js +1 -1
  287. package/dist/module/justifi-card-form.js +1 -1
  288. package/dist/module/justifi-checkout-qr-code.d.ts +11 -0
  289. package/dist/module/justifi-checkout-qr-code.js +6 -0
  290. package/dist/module/justifi-checkout-qr-code2.js +3154 -0
  291. package/dist/module/justifi-checkout-summary2.js +1 -1
  292. package/dist/module/justifi-checkouts-list-filters.js +3 -3
  293. package/dist/module/justifi-checkouts-list.js +197 -28
  294. package/dist/module/justifi-dispute-management.js +103 -62
  295. package/dist/module/justifi-gross-payment-chart.js +11074 -24
  296. package/dist/module/justifi-header2.js +1 -1
  297. package/dist/module/justifi-modular-checkout2.js +3 -58
  298. package/dist/module/justifi-order-terminals.js +4 -4
  299. package/dist/module/justifi-payment-details.js +9 -9
  300. package/dist/module/justifi-payment-provisioning.js +53 -59
  301. package/dist/module/justifi-payment-transactions-list.js +1 -1
  302. package/dist/module/justifi-payments-list-filters.js +2 -2
  303. package/dist/module/justifi-payments-list.js +1 -1
  304. package/dist/module/justifi-payout-details.js +3 -3
  305. package/dist/module/justifi-payout-transactions-list.js +1 -1
  306. package/dist/module/justifi-payouts-list-filters.js +3 -3
  307. package/dist/module/justifi-payouts-list.js +1 -1
  308. package/dist/module/{checkouts-list-core.d.ts → justifi-qr-terminal.d.ts} +4 -4
  309. package/dist/module/justifi-qr-terminal.js +234 -0
  310. package/dist/module/justifi-refund-payment.js +1 -1
  311. package/dist/module/justifi-season-interruption-insurance.js +1 -1
  312. package/dist/module/justifi-skeleton.js +1 -1
  313. package/dist/module/justifi-terminal-orders-list-filters.js +3 -3
  314. package/dist/module/justifi-terminal-orders-list.js +184 -22
  315. package/dist/module/justifi-terminals-list-filters.js +1 -1
  316. package/dist/module/justifi-terminals-list.js +2 -2
  317. package/dist/module/justifi-tokenize-payment-method2.js +1 -1
  318. package/dist/module/owner-form-inputs2.js +2 -2
  319. package/dist/module/owner-form2.js +177 -33
  320. package/dist/module/package.js +1 -1
  321. package/dist/module/pagination-menu2.js +1 -1
  322. package/dist/module/parts.js +1 -1
  323. package/dist/module/payment-method-option.js +1 -1
  324. package/dist/module/payment-provisioning-form-steps2.js +52 -58
  325. package/dist/module/product-or-service.d.ts +11 -0
  326. package/dist/module/product-or-service.js +6 -0
  327. package/dist/module/{justifi-product-or-service2.js → product-or-service2.js} +8 -8
  328. package/dist/module/radio-list-item2.js +1 -1
  329. package/dist/module/{owner-form-core.d.ts → refund-policy.d.ts} +4 -4
  330. package/dist/module/refund-policy.js +6 -0
  331. package/dist/module/{justifi-refund-policy2.js → refund-policy2.js} +8 -8
  332. package/dist/module/shipping-details.d.ts +11 -0
  333. package/dist/module/shipping-details.js +6 -0
  334. package/dist/module/{justifi-shipping-details2.js → shipping-details2.js} +8 -8
  335. package/dist/module/spinner.js +1 -1
  336. package/dist/module/table-filters-menu2.js +1 -1
  337. package/dist/module/terminal-quantity-selector2.js +1 -1
  338. package/dist/module/utils2.js +1 -1
  339. package/dist/types/api/Checkout.d.ts +1 -2
  340. package/dist/types/api/Terminal.d.ts +1 -1
  341. package/dist/types/components/business-forms/owner-form/owner-form.d.ts +69 -5
  342. package/dist/types/components/checkout-qr-code/justifi-checkout-qr-code.d.ts +18 -0
  343. package/dist/types/components/checkouts-list/justifi-checkouts-list.d.ts +28 -6
  344. package/dist/types/components/dispute-management/{justifi-dispute-notification.d.ts → dispute-notification.d.ts} +1 -1
  345. package/dist/types/components/dispute-management/dispute-response/{justifi-additional-statement.d.ts → additional-statement.d.ts} +1 -1
  346. package/dist/types/components/dispute-management/dispute-response/{justifi-cancellation-policy.d.ts → cancellation-policy.d.ts} +1 -1
  347. package/dist/types/components/dispute-management/dispute-response/{justifi-customer-details.d.ts → customer-details.d.ts} +1 -1
  348. package/dist/types/components/dispute-management/dispute-response/{dispute-response-core.d.ts → dispute-response.d.ts} +21 -10
  349. package/dist/types/components/dispute-management/dispute-response/{justifi-duplicate-charge.d.ts → duplicate-charge.d.ts} +1 -1
  350. package/dist/types/components/dispute-management/dispute-response/{justifi-electronic-evidence.d.ts → electronic-evidence.d.ts} +1 -1
  351. package/dist/types/components/dispute-management/dispute-response/{justifi-product-or-service.d.ts → product-or-service.d.ts} +1 -1
  352. package/dist/types/components/dispute-management/dispute-response/{justifi-refund-policy.d.ts → refund-policy.d.ts} +1 -1
  353. package/dist/types/components/dispute-management/dispute-response/{justifi-shipping-details.d.ts → shipping-details.d.ts} +1 -1
  354. package/dist/types/components/dispute-management/justifi-dispute-management.d.ts +10 -2
  355. package/dist/types/components/gross-payment-chart/justifi-gross-payment-chart.d.ts +13 -2
  356. package/dist/types/components/qr-terminal/justifi-qr-terminal.d.ts +42 -0
  357. package/dist/types/components/terminal-orders-list/justifi-terminal-orders-list.d.ts +21 -3
  358. package/dist/types/components.d.ts +388 -543
  359. package/dist/webcomponents/p-06e8df55.entry.js +1 -0
  360. package/dist/webcomponents/p-0708cb76.entry.js +1 -0
  361. package/dist/webcomponents/p-07f2f1bf.entry.js +1 -0
  362. package/dist/webcomponents/p-0fb8fb8c.entry.js +1 -0
  363. package/dist/webcomponents/p-10087a53.entry.js +1 -0
  364. package/dist/webcomponents/p-12ae030d.entry.js +1 -0
  365. package/dist/webcomponents/p-1d7b8c21.entry.js +1 -0
  366. package/dist/webcomponents/p-21c89e22.entry.js +1 -0
  367. package/dist/webcomponents/{p-256c5509.entry.js → p-22d19755.entry.js} +1 -1
  368. package/dist/webcomponents/{p-2425a375.entry.js → p-2dfdecbb.entry.js} +1 -1
  369. package/dist/webcomponents/p-2ec7cd88.entry.js +1 -0
  370. package/dist/webcomponents/p-2qotS5d_.js +1 -0
  371. package/dist/webcomponents/p-355a5c8d.entry.js +1 -0
  372. package/dist/webcomponents/p-37b95a11.entry.js +1 -0
  373. package/dist/webcomponents/p-37fd1862.entry.js +1 -0
  374. package/dist/webcomponents/{p-4d21df48.entry.js → p-383b8317.entry.js} +1 -1
  375. package/dist/webcomponents/p-392f0c1c.entry.js +1 -0
  376. package/dist/webcomponents/{p-1e877e0a.entry.js → p-3d6b9434.entry.js} +1 -1
  377. package/dist/webcomponents/p-44cf13ac.entry.js +1 -0
  378. package/dist/webcomponents/p-46477dfe.entry.js +1 -0
  379. package/dist/webcomponents/{p-befe01ef.entry.js → p-49c13952.entry.js} +1 -1
  380. package/dist/webcomponents/p-4ccf9cd7.entry.js +1 -0
  381. package/dist/webcomponents/p-55fdab4e.entry.js +1 -0
  382. package/dist/webcomponents/p-5ccb46ee.entry.js +1 -0
  383. package/dist/webcomponents/p-5f8dfa8d.entry.js +1 -0
  384. package/dist/webcomponents/{p-8253ef9f.entry.js → p-605bd107.entry.js} +1 -1
  385. package/dist/webcomponents/p-63b7abf3.entry.js +1 -0
  386. package/dist/webcomponents/p-6RTf1SXX.js +1 -0
  387. package/dist/webcomponents/p-70cd2808.entry.js +1 -0
  388. package/dist/webcomponents/{p-3c046adc.entry.js → p-70dcd833.entry.js} +1 -1
  389. package/dist/webcomponents/p-769d3d93.entry.js +1 -0
  390. package/dist/webcomponents/p-79bd744e.entry.js +1 -0
  391. package/dist/webcomponents/{p-31e74a5a.entry.js → p-7a4cd292.entry.js} +1 -1
  392. package/dist/webcomponents/p-89cd31f2.entry.js +1 -0
  393. package/dist/webcomponents/p-8d602e60.entry.js +1 -0
  394. package/dist/webcomponents/p-9153c121.entry.js +1 -0
  395. package/dist/webcomponents/p-94f14640.entry.js +1 -0
  396. package/dist/webcomponents/p-98f399ec.entry.js +1 -0
  397. package/dist/webcomponents/p-9b944aa4.entry.js +1 -0
  398. package/dist/webcomponents/{p-bc2af6b4.entry.js → p-9fc7714d.entry.js} +1 -1
  399. package/dist/webcomponents/p-9fca25fc.entry.js +1 -0
  400. package/dist/webcomponents/p-B5gBiARs.js +1 -0
  401. package/dist/webcomponents/p-BGvaX-lJ.js +1 -0
  402. package/dist/webcomponents/{p-bn_huKYG.js → p-BICxxa69.js} +1 -1
  403. package/dist/webcomponents/{p-2LVpxCS_.js → p-CHo7TfsM.js} +1 -1
  404. package/dist/webcomponents/p-CHw7tICr.js +1 -0
  405. package/dist/webcomponents/{p-DnrawQn3.js → p-CPKMvyV_.js} +1 -1
  406. package/dist/webcomponents/p-CSgcCWLS.js +1 -0
  407. package/dist/webcomponents/p-CZa-hHhJ.js +1 -0
  408. package/dist/webcomponents/p-Ce_W43gc.js +1 -0
  409. package/dist/webcomponents/p-Cg_3KsGO.js +1 -0
  410. package/dist/webcomponents/p-CqPcl9v7.js +1 -0
  411. package/dist/webcomponents/p-CqiVXthx.js +1 -0
  412. package/dist/webcomponents/{p-x9fFFf7F.js → p-Cu7hgXL1.js} +1 -1
  413. package/dist/webcomponents/p-CvgL8YaH.js +1 -0
  414. package/dist/webcomponents/p-D-zwk1J3.js +1 -0
  415. package/dist/webcomponents/{p-D1D2eC05.js → p-D1_eip6x.js} +1 -1
  416. package/dist/webcomponents/p-D4E9P7df.js +1 -0
  417. package/dist/webcomponents/p-DD-_8sbs.js +1 -0
  418. package/dist/webcomponents/{p-DgH-jcIo.js → p-DHFQtPCq.js} +1 -1
  419. package/dist/webcomponents/p-DMqJWUK2.js +1 -0
  420. package/dist/webcomponents/p-DSclFZ32.js +1 -0
  421. package/dist/webcomponents/p-DYHjzFnJ.js +1 -0
  422. package/dist/webcomponents/p-DZAMzLxa.js +1 -0
  423. package/dist/webcomponents/p-DbOUuBHs.js +1 -0
  424. package/dist/webcomponents/{p-CKiAlBsU.js → p-DwoT0UoX.js} +1 -1
  425. package/dist/webcomponents/{p-_-2E_vYf.js → p-DyucNSA4.js} +1 -1
  426. package/dist/webcomponents/p-Eb1f86_V.js +1 -0
  427. package/dist/webcomponents/p-KXLYEe1D.js +1 -0
  428. package/dist/webcomponents/p-XxG-t-Sl.js +1 -0
  429. package/dist/webcomponents/{p-10be75b8.entry.js → p-a80f69a9.entry.js} +1 -1
  430. package/dist/webcomponents/{p-9581d6a1.entry.js → p-a9695714.entry.js} +1 -1
  431. package/dist/webcomponents/p-aee2295b.entry.js +1 -0
  432. package/dist/webcomponents/p-b0b6083f.entry.js +1 -0
  433. package/dist/webcomponents/p-b20b8805.entry.js +1 -0
  434. package/dist/webcomponents/p-b341efd6.entry.js +1 -0
  435. package/dist/webcomponents/{p-e6e56dbb.entry.js → p-b62ff001.entry.js} +1 -1
  436. package/dist/webcomponents/p-bb5de874.entry.js +1 -0
  437. package/dist/webcomponents/p-bd678d4a.entry.js +1 -0
  438. package/dist/webcomponents/p-c1539656.entry.js +1 -0
  439. package/dist/webcomponents/p-c8ee1e4c.entry.js +1 -0
  440. package/dist/webcomponents/{p-09d2efad.entry.js → p-ca87c609.entry.js} +1 -1
  441. package/dist/webcomponents/p-ce1dde85.entry.js +1 -0
  442. package/dist/webcomponents/p-d620d4b4.entry.js +1 -0
  443. package/dist/webcomponents/{p-9db1444f.entry.js → p-db09f306.entry.js} +1 -1
  444. package/dist/webcomponents/{p-c9e1df15.entry.js → p-dcd600ca.entry.js} +1 -1
  445. package/dist/webcomponents/{p-354fb3c4.entry.js → p-e020f003.entry.js} +1 -1
  446. package/dist/webcomponents/p-e4cb7c21.entry.js +1 -0
  447. package/dist/webcomponents/p-e5c2215a.entry.js +1 -0
  448. package/dist/webcomponents/p-e6b9dfe1.entry.js +1 -0
  449. package/dist/webcomponents/p-eCeOsPHx.js +1 -0
  450. package/dist/webcomponents/p-eK8hZOMg.js +1 -0
  451. package/dist/webcomponents/p-f1b9cbf0.entry.js +1 -0
  452. package/dist/webcomponents/p-f9aafb21.entry.js +1 -0
  453. package/dist/webcomponents/p-ff5c5499.entry.js +20 -0
  454. package/dist/webcomponents/p-jIDKmNHy.js +1 -0
  455. package/dist/webcomponents/{p-Cej-1bD6.js → p-qju4tNG1.js} +1 -1
  456. package/dist/webcomponents/p-uZ5KAseb.js +1 -0
  457. package/dist/webcomponents/webcomponents.esm.js +1 -1
  458. package/package.json +16 -14
  459. package/LICENSE +0 -21
  460. package/dist/cjs/Dispute-CruQTF6_.js +0 -59
  461. package/dist/cjs/business-additional-questions-schema-CI80eZLJ.js +0 -73
  462. package/dist/cjs/checkouts-list-core.cjs.entry.js +0 -146
  463. package/dist/cjs/checkouts-table-CCxrsy0x.js +0 -55
  464. package/dist/cjs/dispute.service-BbtwY673.js +0 -32
  465. package/dist/cjs/form-control-number_3.cjs.entry.js +0 -249
  466. package/dist/cjs/gross-payment-chart-core.cjs.entry.js +0 -11075
  467. package/dist/cjs/justifi-dispute-management-core.cjs.entry.js +0 -61
  468. package/dist/cjs/terminal-orders-list-core.cjs.entry.js +0 -108
  469. package/dist/cjs/terminal-orders-table-Cz6qvzVE.js +0 -83
  470. package/dist/collection/components/business-forms/owner-form/owner-form-core.js +0 -523
  471. package/dist/collection/components/checkouts-list/checkouts-list-core.js +0 -262
  472. package/dist/collection/components/dispute-management/dispute-management-core.js +0 -169
  473. package/dist/collection/components/dispute-management/dispute-response/justifi-dispute-response.js +0 -190
  474. package/dist/collection/components/gross-payment-chart/gross-payment-chart-core.js +0 -139
  475. package/dist/collection/components/terminal-orders-list/terminal-orders-list-core.js +0 -199
  476. package/dist/esm/Dispute-BH0Xfn-F.js +0 -57
  477. package/dist/esm/business-additional-questions-schema-DKudYaoE.js +0 -69
  478. package/dist/esm/business-identity-schema-CFhSc0cA.js +0 -99
  479. package/dist/esm/checkouts-list-core.entry.js +0 -144
  480. package/dist/esm/checkouts-table-C8sPHeTm.js +0 -51
  481. package/dist/esm/dispute.service-vlYGy0nR.js +0 -30
  482. package/dist/esm/form-control-number_3.entry.js +0 -245
  483. package/dist/esm/gross-payment-chart-core.entry.js +0 -11073
  484. package/dist/esm/justifi-dispute-management-core.entry.js +0 -59
  485. package/dist/esm/terminal-orders-list-core.entry.js +0 -106
  486. package/dist/esm/terminal-orders-table-C7KOcRpq.js +0 -79
  487. package/dist/module/checkouts-list-core.js +0 -6
  488. package/dist/module/checkouts-list-core2.js +0 -227
  489. package/dist/module/dispute-management-core.js +0 -193
  490. package/dist/module/dispute-response-actions.js +0 -119
  491. package/dist/module/gross-payment-chart-core.d.ts +0 -11
  492. package/dist/module/gross-payment-chart-core.js +0 -6
  493. package/dist/module/gross-payment-chart-core2.js +0 -11096
  494. package/dist/module/justifi-additional-statement.d.ts +0 -11
  495. package/dist/module/justifi-additional-statement.js +0 -6
  496. package/dist/module/justifi-cancellation-policy.d.ts +0 -11
  497. package/dist/module/justifi-cancellation-policy.js +0 -6
  498. package/dist/module/justifi-customer-details.d.ts +0 -11
  499. package/dist/module/justifi-customer-details.js +0 -6
  500. package/dist/module/justifi-dispute-management-core.d.ts +0 -11
  501. package/dist/module/justifi-dispute-management-core.js +0 -6
  502. package/dist/module/justifi-dispute-notification.d.ts +0 -11
  503. package/dist/module/justifi-dispute-notification.js +0 -6
  504. package/dist/module/justifi-dispute-notification2.js +0 -85
  505. package/dist/module/justifi-dispute-response-core.d.ts +0 -11
  506. package/dist/module/justifi-dispute-response-core.js +0 -6
  507. package/dist/module/justifi-dispute-response.d.ts +0 -11
  508. package/dist/module/justifi-dispute-response.js +0 -6
  509. package/dist/module/justifi-dispute-response2.js +0 -198
  510. package/dist/module/justifi-duplicate-charge.d.ts +0 -11
  511. package/dist/module/justifi-duplicate-charge.js +0 -6
  512. package/dist/module/justifi-electronic-evidence.d.ts +0 -11
  513. package/dist/module/justifi-electronic-evidence.js +0 -6
  514. package/dist/module/justifi-product-or-service.d.ts +0 -11
  515. package/dist/module/justifi-product-or-service.js +0 -6
  516. package/dist/module/justifi-refund-policy.js +0 -6
  517. package/dist/module/justifi-shipping-details.d.ts +0 -11
  518. package/dist/module/justifi-shipping-details.js +0 -6
  519. package/dist/module/owner-form-core.js +0 -6
  520. package/dist/module/owner-form-core2.js +0 -262
  521. package/dist/module/terminal-orders-list-core.d.ts +0 -11
  522. package/dist/module/terminal-orders-list-core.js +0 -6
  523. package/dist/module/terminal-orders-list-core2.js +0 -209
  524. package/dist/types/components/business-forms/owner-form/owner-form-core.d.ts +0 -88
  525. package/dist/types/components/checkouts-list/checkouts-list-core.d.ts +0 -34
  526. package/dist/types/components/dispute-management/dispute-management-core.d.ts +0 -18
  527. package/dist/types/components/dispute-management/dispute-response/justifi-dispute-response.d.ts +0 -35
  528. package/dist/types/components/gross-payment-chart/gross-payment-chart-core.d.ts +0 -21
  529. package/dist/types/components/terminal-orders-list/terminal-orders-list-core.d.ts +0 -28
  530. package/dist/webcomponents/p--e0ff06z.js +0 -1
  531. package/dist/webcomponents/p-032b4553.entry.js +0 -1
  532. package/dist/webcomponents/p-042daaf8.entry.js +0 -1
  533. package/dist/webcomponents/p-0638f0bd.entry.js +0 -1
  534. package/dist/webcomponents/p-0b3f4f22.entry.js +0 -1
  535. package/dist/webcomponents/p-1c4f5f1d.entry.js +0 -1
  536. package/dist/webcomponents/p-1e8135f0.entry.js +0 -1
  537. package/dist/webcomponents/p-24935254.entry.js +0 -1
  538. package/dist/webcomponents/p-2a755daf.entry.js +0 -1
  539. package/dist/webcomponents/p-3488951f.entry.js +0 -1
  540. package/dist/webcomponents/p-437a99dc.entry.js +0 -1
  541. package/dist/webcomponents/p-49c0cd3a.entry.js +0 -1
  542. package/dist/webcomponents/p-50f5e313.entry.js +0 -1
  543. package/dist/webcomponents/p-52908814.entry.js +0 -1
  544. package/dist/webcomponents/p-587886f1.entry.js +0 -1
  545. package/dist/webcomponents/p-5ef355ce.entry.js +0 -1
  546. package/dist/webcomponents/p-5ef854e0.entry.js +0 -1
  547. package/dist/webcomponents/p-67498c25.entry.js +0 -1
  548. package/dist/webcomponents/p-6917aa3c.entry.js +0 -1
  549. package/dist/webcomponents/p-6d81822f.entry.js +0 -1
  550. package/dist/webcomponents/p-6f0c582a.entry.js +0 -1
  551. package/dist/webcomponents/p-80652cf8.entry.js +0 -1
  552. package/dist/webcomponents/p-82fe02e4.entry.js +0 -1
  553. package/dist/webcomponents/p-83147f23.entry.js +0 -1
  554. package/dist/webcomponents/p-8c2427ed.entry.js +0 -1
  555. package/dist/webcomponents/p-92de00d7.entry.js +0 -1
  556. package/dist/webcomponents/p-94306884.entry.js +0 -1
  557. package/dist/webcomponents/p-9937e2e7.entry.js +0 -1
  558. package/dist/webcomponents/p-9dca1331.entry.js +0 -1
  559. package/dist/webcomponents/p-9f74d7ea.entry.js +0 -1
  560. package/dist/webcomponents/p-B--N37zY.js +0 -1
  561. package/dist/webcomponents/p-B5vVjDc_.js +0 -1
  562. package/dist/webcomponents/p-BH0Xfn-F.js +0 -1
  563. package/dist/webcomponents/p-Bg2SZArf.js +0 -1
  564. package/dist/webcomponents/p-BovgIz83.js +0 -1
  565. package/dist/webcomponents/p-BsQy297i.js +0 -1
  566. package/dist/webcomponents/p-CDf5H0TB.js +0 -1
  567. package/dist/webcomponents/p-CR_-qIuN.js +0 -1
  568. package/dist/webcomponents/p-CUI41_5y.js +0 -1
  569. package/dist/webcomponents/p-CX36GHQP.js +0 -1
  570. package/dist/webcomponents/p-Cf6HoQKl.js +0 -1
  571. package/dist/webcomponents/p-CsdYMTrc.js +0 -1
  572. package/dist/webcomponents/p-D4OlsyTo.js +0 -1
  573. package/dist/webcomponents/p-D8EGHc_m.js +0 -1
  574. package/dist/webcomponents/p-DPmnGTmg.js +0 -1
  575. package/dist/webcomponents/p-DWevPe7C.js +0 -1
  576. package/dist/webcomponents/p-Dbg501Lu.js +0 -1
  577. package/dist/webcomponents/p-DcBvJu0k.js +0 -1
  578. package/dist/webcomponents/p-DkdzUTnl.js +0 -1
  579. package/dist/webcomponents/p-HT_4DkD0.js +0 -1
  580. package/dist/webcomponents/p-MDZuGvsl.js +0 -1
  581. package/dist/webcomponents/p-XrKLre8M.js +0 -1
  582. package/dist/webcomponents/p-a75d76ff.entry.js +0 -1
  583. package/dist/webcomponents/p-a7778957.entry.js +0 -1
  584. package/dist/webcomponents/p-a9d7cdae.entry.js +0 -1
  585. package/dist/webcomponents/p-b060a9c9.entry.js +0 -1
  586. package/dist/webcomponents/p-b06910b0.entry.js +0 -1
  587. package/dist/webcomponents/p-b483e71b.entry.js +0 -1
  588. package/dist/webcomponents/p-bdf21f71.entry.js +0 -1
  589. package/dist/webcomponents/p-be5d1005.entry.js +0 -1
  590. package/dist/webcomponents/p-beXEDfB9.js +0 -1
  591. package/dist/webcomponents/p-bfe2583d.entry.js +0 -1
  592. package/dist/webcomponents/p-c09fccd3.entry.js +0 -1
  593. package/dist/webcomponents/p-c827cbc9.entry.js +0 -1
  594. package/dist/webcomponents/p-cc5b7c27.entry.js +0 -1
  595. package/dist/webcomponents/p-d878df6c.entry.js +0 -1
  596. package/dist/webcomponents/p-ddf699e6.entry.js +0 -20
  597. package/dist/webcomponents/p-e0b3735f.entry.js +0 -1
  598. package/dist/webcomponents/p-ea30cf08.entry.js +0 -1
  599. package/dist/webcomponents/p-edf5a854.entry.js +0 -1
  600. package/dist/webcomponents/p-ef89824b.entry.js +0 -1
  601. package/dist/webcomponents/p-fc7ba195.entry.js +0 -1
  602. package/dist/webcomponents/p-hhdRync5.js +0 -1
  603. package/dist/webcomponents/p-niGr4RT2.js +0 -1
  604. package/dist/webcomponents/p-pL4dNfsl.js +0 -1
  605. package/dist/webcomponents/p-qcQTYcr3.js +0 -1
  606. package/dist/webcomponents/p-qrNmDp6K.js +0 -1
  607. package/dist/webcomponents/p-uCg79W3M.js +0 -1
  608. package/dist/webcomponents/p-zi3ljCdQ.js +0 -1
@@ -0,0 +1 @@
1
+ import{a as e,c as s}from"./p-DwoT0UoX.js";import{m as t,d as a,i as n,b as i,a as r,p as o,e as l,w as _,c,t as d,o as u,f as m,r as p,g as b,h as E,l as h,j as f,k as v,n as g,s as w,q as y,u as $,v as x,x as S}from"./p-KXLYEe1D.js";import{C as j}from"./p-BcNb9bVO.js";import{a as D}from"./p-DyucNSA4.js";const N=s=>{const t=e({legal_name:c.required("Enter legal name"),website_url:_.required("Enter business website url"),email:l.required("Enter business email"),phone:o.required("Enter phone number"),doing_business_as:r.nullable(),classification:i.required("Select business classification"),industry:n.required("Enter a business industry"),date_of_incorporation:a.required("Enter date of registration")}),u=e({legal_name:c.required("Enter legal name"),website_url:_.nullable(),email:l.nullable(),phone:o.nullable(),doing_business_as:r.nullable(),classification:i.nullable(),industry:n.nullable(),tax_id:d.nullable(),date_of_incorporation:a.nullable()});return s?u:t},X=a=>N(a).concat(e({classification:s().required("Select business classification"),tax_id:t(j.USA).when("tax_id_last4",{is:e=>!e,then:e=>e.required(`Enter valid ${D.USA.taxIdLabel} without dashes`),otherwise:e=>e.nullable()})})),k=a=>N(a).concat(e({classification:s().required("Select business classification"),tax_id:t(j.CAN).when("tax_id_last4",{is:e=>!e,then:e=>e.required(`Enter valid ${D.CAN.taxIdLabel} without dashes`),otherwise:e=>e.nullable()})})),q=s=>{const t=e({business_revenue:p.required("Enter business revenue"),business_payment_volume:b.required("Enter business payment volume"),business_average_transaction_amount:p.required("Enter average transaction amount"),business_when_service_received:m.required("Select when service is received"),business_other_payment_details:u.nullable()}),a=e({business_revenue:p.nullable(),business_payment_volume:b.nullable(),business_average_transaction_amount:p.nullable(),business_when_service_received:m.nullable(),business_other_payment_details:u.nullable()});return s?a:t},A=t=>e(t?{line1:f.nullable(),line2:h.nullable(),city:E.nullable(),state:s().nullable(),postal_code:s().nullable()}:{line1:f.required("Enter street address"),line2:h.nullable(),city:E.required("Enter city"),state:s().required("Select state"),postal_code:v(j.USA).required("Enter postal code")}),B=t=>e(t?{line1:f.nullable(),line2:h.nullable(),city:E.nullable(),state:s().nullable(),postal_code:s().nullable()}:{line1:f.required("Enter street address"),line2:h.nullable(),city:E.required("Enter city"),state:s().required("Select province"),postal_code:v(j.CAN).required("Enter postal code")}),C={[j.USA]:A,[j.CAN]:B},K=(t,a)=>a?(t=>e({name:x.required(`Enter ${t} name`),title:$.nullable(),email:l.nullable(),phone:o.nullable(),dob_full:y(t).nullable(),ssn_last4:s().nullable(),identification_number:w.nullable(),ownership_percentage:g.nullable(),address:A(!0)}))(t):(t=>e({name:x.required(`Enter ${t} name`),title:$.required(`Enter ${t} title`),email:l.required(`Enter ${t} email`),phone:o.required("Enter phone number"),dob_full:y(t).required("Enter date of birth"),ssn_last4:s().nullable(),identification_number:w,ownership_percentage:g.nullable(),address:A(!1)}))(t),L=(t,a)=>a?(t=>e({name:x.required(`Enter ${t} name`),title:$.nullable(),email:l.nullable(),phone:o.nullable(),dob_full:y(t).nullable(),ssn_last4:s().nullable(),identification_number:S(j.CAN).nullable(),ownership_percentage:g.nullable(),address:B(!0)}))(t):(t=>e({name:x.required(`Enter ${t} name`),title:$.required(`Enter ${t} title`),email:l.required(`Enter ${t} email`),phone:o.required("Enter phone number"),dob_full:y(t).required("Enter date of birth"),ssn_last4:s().nullable(),identification_number:S(j.CAN),ownership_percentage:g.nullable(),address:B(!1)}))(t),O={[j.USA]:K,[j.CAN]:L};export{q as a,X as b,A as c,k as d,L as e,B as f,O as g,C as h,K as i}
@@ -0,0 +1 @@
1
+ import{h as t,r as e,c as s}from"./p-CV0Pyo1O.js";import{S as a}from"./p-BqNNwq6C.js";import{T as r,a as i,b as o,c as d,d as h,e as n,f as c,g as p,h as l,i as m,j as f,k as u,l as b}from"./p-BICxxa69.js";import{T as g}from"./p-CZfYo5-1.js";import{c as y}from"./p-DHFQtPCq.js";import{a6 as v,a7 as C}from"./p-CPKMvyV_.js";import{a as w}from"./p-BRnBHsdq.js";import"./p-DVJaoI_m.js";import{f as j,p as T,C as _,b as k}from"./p-CSgcCWLS.js";import{p as O}from"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import{B as S,a as D}from"./p-CHw7tICr.js";import"./p-HXpYMWUU.js";import{g as B,a as P}from"./p-Cg_3KsGO.js";import{A as x}from"./p-CYQvLgSs.js";import{J as I}from"./p-DbOUuBHs.js";import{o as q,g as H}from"./p-BPTtWj7E.js";import"./p-CqiVXthx.js";import"./p-CZa-hHhJ.js";import"./p-D8GTwl9v.js";const E={created_at:()=>t("th",{part:v,scope:"col",title:"The date and time the order was created"},"Created At"),updated_at:()=>t("th",{part:v,scope:"col",title:"The date and time the order was last updated"},"Updated At"),order_status:()=>t("th",{part:v,scope:"col",title:"The current status of the order"},"Order Status"),business_id:()=>t("th",{part:v,scope:"col",title:"The business ID associated with the order"},"Business ID"),company_name:()=>t("th",{part:v,scope:"col",title:"The business name associated with the order"},"Business Name"),provider:()=>t("th",{part:v,scope:"col",title:"The provider associated with the order"},"Provider"),order_type:()=>t("th",{part:v,scope:"col",title:"The type of order"},"Order Type"),quantity:()=>t("th",{part:v,scope:"col",title:"The number of terminals associated with the order"},"Order Quantity")},A={created_at:(e,s)=>t("td",{part:C(s)},t("div",{class:"fw-bold"},w(e.created_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},w(e.created_at,{showTime:!0}))),updated_at:(e,s)=>t("td",{part:C(s)},t("div",{class:"fw-bold"},w(e.updated_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},w(e.updated_at,{showTime:!0}))),order_status:(e,s)=>t("td",{part:C(s)},t(D,Object.assign({},{submitted:{variant:S.PRIMARY,title:"This order is submitted",text:"Submitted"},completed:{variant:S.SUCCESS,title:"This order has been completed",text:"Completed"},created:{variant:S.SECONDARY,title:"This order is created",text:"Created"},in_progress:{variant:S.PRIMARY,title:"This order is in progress",text:"In Progress"},on_hold:{variant:S.WARNING,title:"This order is on hold",text:"On Hold"},canceled:{variant:S.DANGER,title:"This order is canceled",text:"Canceled"}}[e.order_status]))),business_id:(e,s)=>t("td",{part:C(s)},e.business_id),company_name:(e,s)=>t("td",{part:C(s)},e.company_name),provider:(e,s)=>t("td",{part:C(s)},e.provider),order_type:(e,s)=>{let a;return e.order_type===j.boardingOnly?a="Boarding Only":e.order_type===j.boardingShipping&&(a="Boarding & Shipping"),t("td",{part:C(s)},a)},quantity:(e,s)=>t("td",{part:C(s)},e.terminals.length)},L=x();class N{async fetchTerminalOrders(t,e,s){return L.get({endpoint:"terminals/orders",params:s,headers:{account:t},authToken:e})}}const V=class{constructor(t){e(this,t),this.clickEvent=s(this,"click-event",7),this.errorEvent=s(this,"error-event",7),this.columns="created_at,updated_at,order_status,quantity",this.terminalOrders=[],this.loading=!0,this.paging=O,this.pagingParams={},this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:g.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:g.next})},this.rowClickHandler=t=>{const e=t.target.closest("tr").dataset.rowEntityId;if(!e)return;const s=this.terminalOrders.find((t=>t.id===e));this.clickEvent.emit({name:g.row,data:s})}}componentWillLoad(){y(),this.analytics=new I(this),this.terminalOrdersTable=new r(this.terminalOrders,this.columns,E,A),this.initializeGetData(),this.getTerminalOrders&&this.fetchData(),q("set",(()=>{this.pagingParams={}})),q("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}authPropChanged(){this.initializeGetData(),this.getTerminalOrders&&this.fetchData()}pagingOrColumnsChanged(){this.getTerminalOrders&&this.fetchData()}initializeGetData(){this.accountId&&this.authToken?this.getTerminalOrders=(({id:t,authToken:e,service:s})=>async({params:a,onSuccess:r,onError:i,final:o})=>{var d,h;try{const o=await s.fetchTerminalOrders(t,e,a);if(o.error)return i({error:P(o.error),code:B(null===(h=o.error)||void 0===h?void 0:h.code),severity:_.ERROR});{const t=Object.assign({},o.page_info);r({terminalOrders:(null===(d=o.data)||void 0===d?void 0:d.map((t=>new T(t))))||[],pagingInfo:t})}}catch(t){const e=B(null==t?void 0:t.code);return i({error:t.message||t,code:e,severity:_.ERROR})}finally{return o()}})({id:this.accountId,authToken:this.authToken,service:new N}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:k.MISSING_PROPS,message:this.errorMessage,severity:_.ERROR}))}fetchData(){this.getTerminalOrders&&(this.loading=!0,this.getTerminalOrders({params:this.terminalOrderParams,onSuccess:async({terminalOrders:t,pagingInfo:e})=>{this.terminalOrders=t,this.paging=e,this.terminalOrdersTable.collectionData=this.terminalOrders},onError:({error:t,code:e,severity:s})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:e,message:t,severity:s})},final:()=>{this.loading=!1}}))}get terminalOrderParams(){const t=H();return Object.assign(Object.assign({},t),this.pagingParams)}get entityId(){return this.terminalOrders.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.terminalOrdersTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return t(a,{key:"e544fa99091ff8e0601388c4663f536304caef7c"},t(i,{key:"df2a311d1052b284d458f29a87ea5a78db145406"},t(o,{key:"9d3d6997f5fa8581fafa34e13a9981e75075ccc3"},t(d,{key:"30ee9315492e30913de3ef73db7c4e13e6a0d5bc"},t(h,{key:"f8fd993e7f19e3ac6b41e8eaff849a7ab66b2d41"},this.terminalOrdersTable.columnData.map((t=>t)))),t(n,{key:"75ddd58ba3a713b8f38a6e40de06d26ed06d63a7"},t(c,{key:"4509782ba93ff9d5d9057a23daa9720da4ec0f0e",columnSpan:this.terminalOrdersTable.columnKeys.length,isLoading:this.loading}),t(p,{key:"8aed10b38ac78e9ce3e5c8f96c2eb143412f3661",isEmpty:this.showEmptyState,columnSpan:this.terminalOrdersTable.columnKeys.length}),t(l,{key:"94f11381660568de3181fe7c70335e7c264c9e44",columnSpan:this.terminalOrdersTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.terminalOrdersTable.rowData.map(((e,s)=>t(m,{"data-test-id":"table-row","data-row-entity-id":this.entityId[s],onClick:this.rowClickHandler},e)))),this.paging&&t(f,{key:"c980e0fc6b236973e6bdf4ab0a5beece872ed4e6"},t(u,{key:"c6431bfb8e38839d48b2d7fb8d85a8c64981f057"},t(b,{key:"6c7fc01e316acfcee6e33b583b97b040ce88efaf",colSpan:this.terminalOrdersTable.columnData.length},t("pagination-menu",{key:"2ac492d001dc88663b575258a8828964b20d6d68",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{accountId:["authPropChanged"],authToken:["authPropChanged"],pagingParams:["pagingOrColumnsChanged"],columns:["pagingOrColumnsChanged"]}}};export{V as justifi_terminal_orders_list}
@@ -1 +1 @@
1
- import{r as t,c as e,h as s,H as a}from"./p-CV0Pyo1O.js";import{w as i,x as r,q as o,u as h,v as l}from"./p-DnrawQn3.js";import{F as c}from"./p-BsQy297i.js";import"./p-CZfYo5-1.js";const n=class{constructor(s){t(this,s),this.formControlInput=e(this,"formControlInput",7),this.formControlBlur=e(this,"formControlBlur",7),this.isFocused=!1,this.maxDate=this.currentDate,this.handleFormControlInput=t=>{const e=t.target.value;this.inputHandler(this.name,e),this.formControlInput.emit({name:this.name,value:e})}}handleDefaultValueChange(t){this.updateInput(t)}get currentDate(){return this.showTime?(new Date).toISOString().slice(0,16):(new Date).toISOString().split("T")[0]}componentDidLoad(){this.updateInput(this.defaultValue)}updateInput(t){this.dateInput.value=t}get part(){let t=i;return this.errorText&&(t=o),this.disabled&&(t=h),this.isFocused&&(t=l),t}render(){return s(a,{key:"ec545098abff465066e8e483fb80b13efdfb1c0c"},s("div",{key:"62ab3c2b55228781b45cc08cec73dddaf079e02c",class:"form-group d-flex flex-column"},s("div",{key:"c4a79de5aedf7db3356f1003755861d5aba8e51b",class:"d-flex gap-2"},s("label",{key:"f64d2f776aa848961ad74496c52bb61d744e50f0",part:r,class:"form-label",htmlFor:this.name},this.label),s("form-control-tooltip",{key:"50de1c1138f91f01ad982a5823779e5a067389be",helpText:this.helpText})),s("input",{key:"bb7e14c9e6e952902c15667124032d5ca93df3e8",type:this.showTime?"datetime-local":"date",ref:t=>this.dateInput=t,id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:this.handleFormControlInput,part:this.part,class:this.errorText?"form-control is-invalid":"form-control",disabled:this.disabled,max:this.maxDate}),s(c,{key:"2916afe69a7066713ea1da31fecb3ab8679a6170",errorText:this.errorText,name:this.name})))}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}};export{n as form_control_date}
1
+ import{r as t,c as e,h as s,H as a}from"./p-CV0Pyo1O.js";import{w as i,x as r,q as o,u as h,v as f}from"./p-CPKMvyV_.js";import{F as c}from"./p-Ce_W43gc.js";import"./p-CZfYo5-1.js";const d=class{constructor(s){t(this,s),this.formControlInput=e(this,"formControlInput",7),this.formControlBlur=e(this,"formControlBlur",7),this.isFocused=!1,this.maxDate=this.currentDate,this.handleFormControlInput=t=>{const e=t.target.value;this.inputHandler(this.name,e),this.formControlInput.emit({name:this.name,value:e})}}handleDefaultValueChange(t){this.updateInput(t)}get currentDate(){return this.showTime?(new Date).toISOString().slice(0,16):(new Date).toISOString().split("T")[0]}componentDidLoad(){this.updateInput(this.defaultValue)}updateInput(t){this.dateInput.value=t}get part(){let t=i;return this.errorText&&(t=o),this.disabled&&(t=h),this.isFocused&&(t=f),t}render(){return s(a,{key:"c17bdb1266aea8cf2d50c1ef75e4a059d743ab2c"},s("div",{key:"e33d45227ed65daca2f75563fd2dd51f45126313",class:"form-group d-flex flex-column"},s("div",{key:"f02592b5c5a9c6346b5a0cacc08f45b971fcd370",class:"d-flex gap-2"},s("label",{key:"30c32d5e351df78b68ea249b5626c9ee247569d4",part:r,class:"form-label",htmlFor:this.name},this.label),s("form-control-tooltip",{key:"250d51c080fbd42a421f23d9a2b23735f6491773",helpText:this.helpText})),s("input",{key:"f401b594d91d353f1d1fff7e431f9b010fc86fc9",type:this.showTime?"datetime-local":"date",ref:t=>this.dateInput=t,id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:this.handleFormControlInput,part:this.part,class:this.errorText?"form-control is-invalid":"form-control",disabled:this.disabled,max:this.maxDate}),s(c,{key:"5be9326874e8370b54399ec78f46dd16a62272cf",errorText:this.errorText,name:this.name})))}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}};export{d as form_control_date}
@@ -0,0 +1 @@
1
+ import{h as t,r as e,c as a}from"./p-CV0Pyo1O.js";import{c as s}from"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{l as i,C as o,b as r}from"./p-CSgcCWLS.js";import{p as c}from"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import{J as n}from"./p-DbOUuBHs.js";import{c as h}from"./p-DHFQtPCq.js";import{g as p,a as d}from"./p-Cg_3KsGO.js";import{P as l}from"./p-DD-_8sbs.js";import{T as f,a as u,b as m,c as b,d as y,e as _,f as w,g as v,h as T,i as g,j as C,k as j,l as k}from"./p-BICxxa69.js";import{S as D}from"./p-BqNNwq6C.js";import{T as P}from"./p-CZfYo5-1.js";import{a as S}from"./p-BRnBHsdq.js";import{a6 as I,a7 as q}from"./p-CPKMvyV_.js";import"./p-D8GTwl9v.js";import"./p-CZa-hHhJ.js";import"./p-CYQvLgSs.js";import"./p-CqiVXthx.js";const O={id:()=>t("th",{part:I,scope:"col",title:"The unique identifier of each transaction"},"ID"),account_id:()=>t("th",{part:I,scope:"col",title:"The unique identifier of the account associated with each transaction"},"Account ID"),payout_id:()=>t("th",{part:I,scope:"col",title:"The unique identifier of the payout associated with each transaction"},"Payout ID"),financial_transaction_id:()=>t("th",{part:I,scope:"col",title:"The unique identifier of the financial transaction associated with the payment balance transaction"},"Financial Transaction ID"),amount:()=>t("th",{part:I,scope:"col",title:"The dollar amount of each transaction"},"Amount"),fee:()=>t("th",{part:I,scope:"col",title:"The fee associated with each transaction"},"Fee"),net:()=>t("th",{part:I,scope:"col",title:"The net amount of each transaction"},"Net"),currency:()=>t("th",{part:I,scope:"col",title:"The currency of each transaction"},"Currency"),description:()=>t("th",{part:I,scope:"col",title:"The description of each transaction"},"Description"),source_id:()=>t("th",{part:I,scope:"col",title:"The unique identifier of the source object associated with the payment balance transaction"},"Source ID"),txn_type:()=>t("th",{part:I,scope:"col",title:"The type of each transaction"},"Type"),created_at:()=>t("th",{part:I,scope:"col",title:"The date and time each transaction was made"},"Processed On"),available_on:()=>t("th",{part:I,scope:"col",title:"The date and time each transaction will be available"},"Available On"),updated_at:()=>t("th",{part:I,scope:"col",title:"The date and time each transaction was last updated"},"Updated On")},x={fee:"Fee",payment:"Payment",payout:"Payout",seller_payment_refund:"Seller Payment Refund",dispute_amount_collected:"Dispute Amount Collected",dispute_fee_collected:"Dispute Fee Collected",seller_payment:"Seller Payment",transfer:"Transfer",partner_platform_proceeds_credit:"Partner Platform Proceeds Credit"},B={id:e=>t("td",{part:q(e.id)},e.id),account_id:e=>t("td",{part:q(e.account_id)},e.account_id),payout_id:e=>t("td",{part:q(e.payout_id)},e.payout_id),financial_transaction_id:e=>t("td",{part:q(e.financial_transaction_id)},e.financial_transaction_id),amount:e=>t("td",{part:q(e.amount)},e.formattedPaymentAmount(e.amount)),fee:e=>t("td",{part:q(e.fee)},e.formattedPaymentAmount(e.fee)),net:e=>t("td",{part:q(e.net)},e.formattedPaymentAmount(e.net)),currency:e=>t("td",{part:q(e.currency)},e.currency),description:e=>t("td",{part:q(e.description)},e.description),source_id:e=>t("td",{part:q(e.source_id)},e.source_id),txn_type:e=>t("td",{part:q(e.txn_type)},x[e.txn_type]),created_at:e=>t("td",{part:q(e.created_at)},t("div",{class:"fw-bold"},S(e.created_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},S(e.created_at,{showTime:!0}))),available_on:e=>t("td",{part:q(e.available_on)},t("div",{class:"fw-bold"},S(e.available_on,{showDisplayDate:!0})),t("div",{class:"fw-bold"},S(e.available_on,{showTime:!0}))),updated_at:e=>t("td",{part:q(e.updated_at)},t("div",{class:"fw-bold"},S(e.updated_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},S(e.updated_at,{showTime:!0})))},E=class{constructor(t){e(this,t),this.clickEvent=a(this,"click-event",7),this.errorEvent=a(this,"error-event",7),this.balanceTransactions=[],this.isLoading=!0,this.errorMessage=null,this.paging=c,this.pagingParams={},this.columns="created_at,txn_type,description,amount,fee,net",this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:P.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:P.next})},this.rowClickHandler=t=>{const e=t.target.closest("tr").dataset.rowEntityId;if(!e)return;const a=this.balanceTransactions.find((t=>t.id===e));this.clickEvent.emit({name:P.row,data:a})}}componentWillLoad(){this.transactionsTable=new f(this.balanceTransactions,this.columns,O,B),h(),this.analytics=new n(this),this.initializeApi()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeApi()}handleError(t,e,a){this.isLoading=!1,this.errorEvent.emit({errorCode:t,message:e,severity:a})}initializeApi(){this.payoutId&&this.authToken?(({accountId:t,authToken:e,service:a})=>async({params:s,onSuccess:r,onError:c,final:n})=>{var h;try{const n=await a.fetchPayoutTransactions(t,e,s);n.error?c({error:d(n.error),code:p(null===(h=n.error)||void 0===h?void 0:h.code),severity:o.ERROR}):r({balanceTransactions:n.data.map((t=>new i(t))),pagingInfo:Object.assign({},n.page_info)})}catch(t){const e=p(null==t?void 0:t.code);c({error:d(t),code:e,severity:o.ERROR})}finally{n()}})({accountId:s.accountId,authToken:this.authToken,service:new l})({params:this.requestParams,onSuccess:({balanceTransactions:t,pagingInfo:e})=>{this.balanceTransactions=t,this.paging=e,this.transactionsTable.collectionData=this.balanceTransactions},onError:({error:t,code:e,severity:a})=>{this.errorMessage=t.message,this.handleError(t,e,a)},final:()=>{this.isLoading=!1}}):(this.errorMessage="payout-id and auth-token props are required",this.handleError(r.MISSING_PROPS,this.errorMessage,o.ERROR))}get entityId(){return this.balanceTransactions.map((t=>t.id))}get showEmptyState(){return!this.isLoading&&!this.errorMessage&&this.transactionsTable.rowData.length<1}get showErrorState(){return!this.isLoading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.isLoading}get requestParams(){return Object.assign({payout_id:this.payoutId,limit:"15"},this.pagingParams)}render(){return t(D,{key:"f60ae9206262ae4b7f8852ac0d6e7089b4838c81"},t(u,{key:"39d31f954e05e6c941e6064a994193cc3b45cd14"},t(m,{key:"007b157cc0b2c41f81cb4af0c7d72964b309ad68"},t(b,{key:"b23c5ea0497058cb8e8c48f7c44290e22e0014b7"},t(y,{key:"0ee5a4b9099853cdd4dbad93774d01f691ebe4f0"},this.transactionsTable.columnData.map((t=>t)))),t(_,{key:"3ded164da6ca49b74ab137386b5ff2c364b4e569"},t(w,{key:"e22ea675edfbe08f6f75e3649d598b6bf1f76c44",columnSpan:this.transactionsTable.columnKeys.length,isLoading:this.isLoading}),t(v,{key:"4f64b72463bebfb7c93351379f29e8321744309a",isEmpty:this.showEmptyState,columnSpan:this.transactionsTable.columnKeys.length}),t(T,{key:"62dccb5e3dabceb85f27da6d1e7837bf20eb0a1c",columnSpan:this.transactionsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.transactionsTable.rowData.map(((e,a)=>t(g,{"data-test-id":"table-row","data-row-entity-id":this.entityId[a],onClick:this.rowClickHandler},e)))),this.paging&&t(C,{key:"a3633714d3d8ca82c40ad3f7eac5bbc92ee9b7a3"},t(j,{key:"97753d854fbeea88174fdf2c8a3abdbf5068a4ca"},t(k,{key:"fb1f2991c433824e404711c38891580d58079278",colSpan:this.transactionsTable.columnData.length},t("pagination-menu",{key:"077b2fa6ebe37283e39c7061682cd52653694b2c",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{pagingParams:["propChanged"],payoutId:["propChanged"],authToken:["propChanged"]}}};export{E as justifi_payout_transactions_list}
@@ -0,0 +1 @@
1
+ import{r as t,c as e,h as s,H as i}from"./p-CV0Pyo1O.js";import{C as a,b as r,E as n,B as o,F as h,x as l,y as c,z as d}from"./p-CSgcCWLS.js";import{m as u,a as m,c as b,d as p,e as f,f as v,g as y}from"./p-eCeOsPHx.js";import{B as g,a as k,D as w,I as _}from"./p-eK8hZOMg.js";import{a as x,d as T,b as L,g as C,h as O}from"./p-6RTf1SXX.js";import{F as j,a as A,c as E,b as S,d as D}from"./p-DwoT0UoX.js";import{A as H,C as V,e as I,R as P,f as B,O as N}from"./p-BcNb9bVO.js";import{C as M,P as R,I as F}from"./p-CVaOFfrI.js";import{b as W,a0 as q,C as Z,x as U,u as z,D as Y,aa as X,a6 as G,aj as $,am as K,A as Q,a1 as J}from"./p-CPKMvyV_.js";import{P as tt}from"./p-DSclFZ32.js";import{b as et,a as st,c as it}from"./p-Bt4GjEWL.js";import{a as at,B as rt}from"./p-XYgDHrVL.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import"./p-CLHwhyvu.js";import{n as nt}from"./p-BnjCmwMr.js";import{A as ot,B as ht,v as lt,C as ct,D as dt,E as ut,F as mt}from"./p-KXLYEe1D.js";import{B as bt}from"./p-CHo7TfsM.js";import"./p-CZfYo5-1.js";import{a as pt}from"./p-DyucNSA4.js";import{s as ft,b as vt,d as yt}from"./p-BRnBHsdq.js";import{S as gt}from"./p-uZ5KAseb.js";import{u as kt,a as wt,b as _t}from"./p-C6o0liMT.js";import{A as xt}from"./p-CYQvLgSs.js";import{S as Tt}from"./p-BqNNwq6C.js";import{P as Lt}from"./p-XxG-t-Sl.js";import"./p-Cg_3KsGO.js";import"./p-BFTU3MAI.js";import"./p-D8GTwl9v.js";class Ct{constructor(t){this.id=t.id,this.account_owner_name=t.account_owner_name,this.full_name=t.full_name,this.account_type=t.account_type,this.account_number=t.account_number,this.acct_last_four=t.acct_last_four,this.account_number_last4=t.account_number_last4,this.routing_number=t.routing_number,this.institution_number=t.institution_number,this.transit_number=t.transit_number,this.bank_name=t.bank_name,this.country=t.country,this.currency=t.currency,this.nickname=t.nickname,this.metadata=t.metadata,this.business_id=t.business_id,this.platform_account_id=t.platform_account_id,this.created_at=t.created_at,this.updated_at=t.updated_at}get payload(){return{account_owner_name:this.account_owner_name||"",account_type:this.account_type||"",account_number:this.account_number||"",routing_number:this.routing_number||"",institution_number:this.institution_number||"",transit_number:this.transit_number||"",bank_name:this.bank_name||"",nickname:this.nickname||"",business_id:this.business_id||""}}}const Ot=class{constructor(s){t(this,s),this.errorEvent=e(this,"error-event",7),this.stepCompleteEvent=e(this,"complete-form-step-event",7),this.formLoading=e(this,"formLoading",7),this.errors={},this.additional_questions={},this.recurringPayments=!1,this.isLoading=!1,this.getData=()=>{this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:t=>{this.additional_questions=new H(t.data.additional_questions||{}),this.formController.setInitialValues(Object.assign({},this.additional_questions))},onError:({error:t,code:e,severity:s})=>{this.errorEvent.emit({message:t,errorCode:e,severity:s})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}})},this.sendData=t=>{let e;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:s=>{e=s,t()},onError:({error:t,code:s,severity:i})=>{e=t,this.errorEvent.emit({message:t,errorCode:s,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:e,formStep:at.additionalQuestions}),this.formLoading.emit(!1)}})},this.inputHandler=(t,e)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:e})),this.additional_questions=new H(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:e}))}}propChanged(){this.initializeApi()}recurringPaymentsWatcher(t){this.recurringPayments="Yes"===(null==t?void 0:t.business_recurring_payments)}async validateAndSubmit({onSuccess:t}){this.formController.validateAndSubmit((()=>this.sendData(t)))}get patchPayload(){return{additional_questions:new H(this.formController.values.getValue()).payload}}componentWillLoad(){this.initializeApi(),this.formController=new j(x(this.allowOptionalFields))}componentDidLoad(){this.getBusiness&&this.getData(),this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=u({authToken:this.authToken,businessId:this.businessId,service:new g}),this.patchBusiness=m({authToken:this.authToken,businessId:this.businessId,service:new g})):this.errorEvent.emit({message:"Missing required props",errorCode:r.MISSING_PROPS,severity:a.ERROR})}render(){var t,e,i,a,r;const n=this.formController.getInitialValues();return this.isLoading?s(tt,null):s("form",null,s("fieldset",null,s("div",{class:"d-flex align-items-center gap-2"},s("legend",{class:"mb-0",part:W},"Additional Questions"),s("form-control-tooltip",{helpText:"This information helps us understand the business and identify and monitor trends to safeguard you and your customers."})),s("hr",{class:"mt-2"}),s("div",{class:"row gy-3"},s("div",{class:"col-12 col-md-6"},s("form-control-monetary-provisioning",{name:"business_revenue",label:"What is your business' estimated annual revenue from its primary business activities?",inputHandler:this.inputHandler,errorText:null===(t=this.errors)||void 0===t?void 0:t.business_revenue,defaultValue:null==n?void 0:n.business_revenue,maskOptions:M.WHOLE})),s("div",{class:"col-12 col-md-6"},s("form-control-monetary-provisioning",{name:"business_payment_volume",label:"What is your business' annual credit card & ACH volume anticipated to process?",inputHandler:this.inputHandler,errorText:null===(e=this.errors)||void 0===e?void 0:e.business_payment_volume,defaultValue:null==n?void 0:n.business_payment_volume,maskOptions:M.WHOLE})),s("div",{class:"col-12"},s("form-control-text",{name:"business_average_transaction_amount",label:"What is your average transaction size?",inputHandler:this.inputHandler,errorText:null===(i=this.errors)||void 0===i?void 0:i.business_average_transaction_amount,defaultValue:null==n?void 0:n.business_average_transaction_amount})),s("div",{class:"col-12"},s("form-control-select",{name:"business_when_service_received",label:"On average, how long after paying will your customers typically receive their goods or services?",inputHandler:this.inputHandler,errorText:null===(a=this.errors)||void 0===a?void 0:a.business_when_service_received,options:et,defaultValue:null==n?void 0:n.business_when_service_received})),s("div",{class:"col-12"},s("form-control-text",{name:"business_other_payment_details",label:"Is there anything else you would like us to know about how your customers pay the business? (optional)",inputHandler:this.inputHandler,errorText:null===(r=this.errors)||void 0===r?void 0:r.business_other_payment_details,defaultValue:null==n?void 0:n.business_other_payment_details})))))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"],additional_questions:["recurringPaymentsWatcher"]}}},jt=class{constructor(e){t(this,e)}render(){return s("div",{key:"d0dacb95d07d3e4ca9bc2c9f23b6c490871da4e9",class:"row gy-3"},s("div",{key:"02ed406f38558badf9f591e076b120d09c71f83b",class:"col-12"},s("form-control-file",{key:"11ff1dc68264b9e5aa561ffe19b423abc1a00c78",name:"voided_check",label:"Voided Check",documentType:n.voidedCheck,inputHandler:this.inputHandler,onFileSelected:this.storeFiles,errorText:this.errors.voided_check,multiple:!0})),s("div",{key:"71d26407522a75a54489155566c18af1a64c1417",class:"col-12"},s("form-control-file",{key:"7ea42e03a44c223a5fedc273e94e635e70d54f4b",name:"bank_statement",label:"Bank Statement",documentType:n.bankStatement,inputHandler:this.inputHandler,onFileSelected:this.storeFiles,errorText:this.errors.bank_statement,multiple:!0})))}},At=class{constructor(e){t(this,e)}render(){var t,e,i,a,r,n;return s("div",{key:"d3445ce89732e19baea2e8f224c42011d5a03998",class:"row gy-3"},s("div",{key:"966e1d8ba6043b4f9b57ae0061ae94c177c12b48",class:"col-12"},this.formDisabled?s("bank-account-read-only-value",{label:"Bank Name",value:null===(t=this.defaultValue)||void 0===t?void 0:t.bank_name}):s("form-control-text",{name:"bank_name",label:"Bank Name",defaultValue:this.defaultValue.bank_name,errorText:this.errors.bank_name,inputHandler:this.inputHandler})),s("div",{key:"314a4f7e181b978b2ff1fdbfdfc8d9484089829a",class:"col-12"},this.formDisabled?s("bank-account-read-only-value",{label:"Nickname",value:null===(e=this.defaultValue)||void 0===e?void 0:e.nickname}):s("form-control-text",{name:"nickname",label:"Nickname",defaultValue:this.defaultValue.nickname,errorText:this.errors.nickname,inputHandler:this.inputHandler})),s("div",{key:"45ac55707ce44b208adaf72e944ea3056810183a",class:"col-12"},this.formDisabled?s("bank-account-read-only-value",{label:"Account Owner Name",value:null===(i=this.defaultValue)||void 0===i?void 0:i.account_owner_name}):s("form-control-text",{name:"account_owner_name",label:"Account Owner Name",defaultValue:this.defaultValue.account_owner_name,errorText:this.errors.account_owner_name,inputHandler:this.inputHandler})),s("div",{key:"74ce58b36eb3a425d900d7bb0858bda18b2e341c",class:"col-12"},this.formDisabled?s("bank-account-read-only-value",{label:"Account Type",value:null===(a=this.defaultValue)||void 0===a?void 0:a.account_type}):s("form-control-select",{name:"account_type",label:"Account Type",options:st,defaultValue:this.defaultValue.account_type,errorText:this.errors.account_type,inputHandler:this.inputHandler})),s("div",{key:"2562105aaaae00d9c46eb61d931a43927d96a8ce",class:"col-6"},this.formDisabled?s("bank-account-read-only-value",{label:"Account Number",value:(null===(r=this.defaultValue)||void 0===r?void 0:r.account_number_last4)?`**** ${this.defaultValue.account_number_last4}`:""}):s("form-control-text",{name:"account_number",label:"Account Number",defaultValue:this.defaultValue.account_number,maxLength:17,errorText:this.errors.account_number,inputHandler:this.inputHandler,keyDownHandler:nt,helpText:"Please copy the account number as shown on your statement/check. Do not include spaces or dashes."})),s("div",{key:"4c7e6cba0ee1e2567dc5b608559b13ebd3fddd07",class:"col-6"},this.formDisabled?s("bank-account-read-only-value",{label:"Routing Number",value:(null===(n=this.defaultValue)||void 0===n?void 0:n.routing_number)||""}):s("form-control-text",{name:"routing_number",label:"Routing Number",defaultValue:this.defaultValue.routing_number,maxLength:9,errorText:this.errors.routing_number,inputHandler:this.inputHandler,keyDownHandler:nt,helpText:"A valid routing number is nine digits. Please include any leading or trailing zeroes."})))}},Et=class{constructor(e){t(this,e)}render(){var t,e,i,a,r,n,o;return s("div",{key:"8de8f05777f72ecb1112328544e75be7cd929e8d",class:"row gy-3"},s("div",{key:"513fb78b434ba3aebe51b636f7494b54e437c65f",class:"col-12"},this.formDisabled?s("bank-account-read-only-value",{label:"Bank Name",value:null===(t=this.defaultValue)||void 0===t?void 0:t.bank_name}):s("form-control-text",{name:"bank_name",label:"Bank Name",defaultValue:this.defaultValue.bank_name,errorText:this.errors.bank_name,inputHandler:this.inputHandler})),s("div",{key:"37a1ef4ac58fbe1633a93020e786d546cd832867",class:"col-12"},this.formDisabled?s("bank-account-read-only-value",{label:"Nickname",value:null===(e=this.defaultValue)||void 0===e?void 0:e.nickname}):s("form-control-text",{name:"nickname",label:"Nickname",defaultValue:this.defaultValue.nickname,errorText:this.errors.nickname,inputHandler:this.inputHandler})),s("div",{key:"fc8820e264d14ac3c5a1c6fd171b381c2b6d99e1",class:"col-12"},this.formDisabled?s("bank-account-read-only-value",{label:"Account Owner Name",value:null===(i=this.defaultValue)||void 0===i?void 0:i.account_owner_name}):s("form-control-text",{name:"account_owner_name",label:"Account Owner Name",defaultValue:this.defaultValue.account_owner_name,errorText:this.errors.account_owner_name,inputHandler:this.inputHandler})),s("div",{key:"f183b1c5f6a8b0f905c916cd1715448f3e02d26f",class:"col-12"},this.formDisabled?s("bank-account-read-only-value",{label:"Account Type",value:null===(a=this.defaultValue)||void 0===a?void 0:a.account_type}):s("form-control-select",{name:"account_type",label:"Account Type",options:st,defaultValue:this.defaultValue.account_type,errorText:this.errors.account_type,inputHandler:this.inputHandler})),s("div",{key:"8366ebde2f319f6d910a34917f57ad43b3ee234f",class:"col-3"},this.formDisabled?s("bank-account-read-only-value",{label:"Transit Number",value:(null===(r=this.defaultValue)||void 0===r?void 0:r.transit_number)||""}):s("form-control-text",{name:"transit_number",label:"Transit Number",defaultValue:this.defaultValue.transit_number,maxLength:5,errorText:this.errors.transit_number,inputHandler:this.inputHandler,keyDownHandler:nt,helpText:"5 digits"})),s("div",{key:"c91166337c2984048466014634f5d4e59ce2b40a",class:"col-3"},this.formDisabled?s("bank-account-read-only-value",{label:"Institution Number",value:(null===(n=this.defaultValue)||void 0===n?void 0:n.institution_number)||""}):s("form-control-text",{name:"institution_number",label:"Institution Number",defaultValue:this.defaultValue.institution_number,maxLength:3,errorText:this.errors.institution_number,inputHandler:this.inputHandler,keyDownHandler:nt,helpText:"3 digits"})),s("div",{key:"ebce2f50ec265ed2fef7a0b3dae84d33036ad145",class:"col-6"},this.formDisabled?s("bank-account-read-only-value",{label:"Account Number",value:(null===(o=this.defaultValue)||void 0===o?void 0:o.account_number_last4)?`**** ${this.defaultValue.account_number_last4}`:""}):s("form-control-text",{name:"account_number",label:"Account Number",defaultValue:this.defaultValue.account_number,maxLength:17,errorText:this.errors.account_number,inputHandler:this.inputHandler,keyDownHandler:nt,helpText:"Please copy the account number as shown on your statement. Do not include spaces or dashes."})))}},St=(t,e)=>t.some((t=>t.document_type===e)),Dt=t=>t?{bank_name:dt.nullable(),nickname:ct.nullable(),account_owner_name:lt.nullable(),account_type:ht.nullable(),account_number:ot.nullable()}:{bank_name:dt.required("Enter bank name"),nickname:ct.required("Enter nickname"),account_owner_name:lt.required("Enter account owner name"),account_type:ht.required("Select account type"),account_number:ot.required("Enter account number")},Ht=(t,e)=>{if(e)return{voided_check:S().nullable(),bank_statement:S().nullable()};const s=St(t,n.voidedCheck),i=St(t,n.bankStatement),a=s||i,r="Please upload either a voided check or a bank statement. Only one is required.";return{voided_check:S().when("bank_statement",{is:t=>!t&&!a,then:t=>t.required(r),otherwise:t=>t.notRequired()}),bank_statement:S().when("voided_check",{is:t=>!t&&!a,then:t=>t.required(r),otherwise:t=>t.notRequired()})}},Vt={[V.USA]:(t,e=[])=>((t,e)=>{const s=Object.assign(Object.assign(Object.assign({},Dt(e)),(t=>t?{routing_number:mt.nullable()}:{routing_number:mt.required("Enter routing number")})(e)),Ht(t,e));return A().shape(s,[["voided_check","bank_statement"]])})(e,t),[V.CAN]:(t,e=[])=>((t,e)=>{const s=Object.assign(Object.assign(Object.assign({},Dt(e)),(t=>{const e=E().length(3,"Institution number must be 3 digits").matches(ut,"Enter valid institution number"),s=E().length(5,"Transit number must be 5 digits").matches(ut,"Enter valid transit number");return t?{institution_number:e.nullable(),transit_number:s.nullable()}:{institution_number:e.required("Enter institution number"),transit_number:s.required("Enter transit number")}})(e)),Ht(t,e));return A().shape(s,[["voided_check","bank_statement"]])})(e,t)},It=class{constructor(s){t(this,s),this.errorEvent=e(this,"error-event",7),this.stepCompleteEvent=e(this,"complete-form-step-event",7),this.formLoading=e(this,"formLoading",7),this.errors={},this.bankAccount={},this.existingDocuments=[],this.documentData=new o,this.isLoading=!1,this.viewMode="manual",this.bankAccountVerification=!1,this.platformAccountId=null,this.getSchema=()=>(0,Vt[this.country])(this.allowOptionalFields,this.existingDocuments),this.initializeFormController=()=>{this.formController=new j(this.getSchema()),this.formController.setInitialValues("readonly"===this.viewMode?Object.assign({},this.bankAccount):{business_id:this.businessId}),this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))},this.inputHandler=(t,e)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:e}))},this.storeFiles=t=>{const e=Array.from(t.detail.fileList),s=t.detail.document_type,i=e.map((t=>new h({file:t,document_type:s},this.businessId)));this.documentData[s]=i},this.getData=()=>{this.isLoading=!0,this.getBusiness({onSuccess:t=>{this.processBusinessResponse(t.data),this.determineViewMode()},onError:({error:t,code:e,severity:s})=>{this.errorEvent.emit({message:t,errorCode:e,severity:s})},final:()=>{this.initializeFormController(),this.isLoading=!1}})},this.handleChangeBankAccount=()=>{this.viewMode=this.plaidAvailable?"plaid":"manual",this.documentData=new o,this.initializeFormController()},this.handleCancel=()=>{this.viewMode=this.existingBankAccount?"readonly":"plaid",this.documentData=new o,this.initializeFormController()},this.handleToggleToManualEntry=()=>{this.viewMode="manual"},this.handleToggleToPlaidVerification=()=>{this.viewMode="plaid"},this.handleSaveBankAccount=async()=>{this.formController.validateAndSubmit((()=>{this.sendData((()=>{}))}))},this.postDocumentRecordData=async t=>{this.isLoading=!0;const e=t.record_data;return new Promise((s=>{this.postDocumentRecord({payload:e,onSuccess:e=>{s(this.handleDocRecordResponse(t,e))},onError:({error:t,code:e,severity:i})=>{this.errorEvent.emit({message:t,errorCode:e,severity:i}),s(!1)}})}))},this.handleDocRecordResponse=(t,e)=>e.error?(this.errorEvent.emit({errorCode:r.POST_ERROR,message:e.error.message,severity:a.ERROR,data:e.error}),!1):(t.setPresignedUrl(e.data.presigned_url),!0),this.uploadDocument=async t=>{if(!t.presigned_url)throw new Error("Presigned URL is not set");const e=await t.getFileData(),s=await fetch(t.presigned_url,{method:"PUT",body:e});return this.handleUploadResponse(s)},this.handleUploadResponse=t=>!t.error||(this.errorEvent.emit({errorCode:r.POST_ERROR,message:t.error.message,severity:a.ERROR,data:t.error}),!1)}propChanged(){this.initializeApi()}watchHandler(t){this.formLoading.emit(t)}async validateAndSubmit({onSuccess:t}){"readonly"===this.viewMode?this.sendData(t):this.formController.validateAndSubmit((()=>this.sendData(t)))}componentWillLoad(){this.initializeApi(),this.getBusiness&&this.getData(),this.formController=new j(this.getSchema())}componentDidLoad(){this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=u({authToken:this.authToken,businessId:this.businessId,service:new g}),this.postBankAccount=b({authToken:this.authToken,service:new k}),this.postDocumentRecord=p({authToken:this.authToken,service:new w})):this.errorEvent.emit({message:"Missing required props",errorCode:r.MISSING_PROPS,severity:a.ERROR})}get postPayload(){const t=this.formController.values.getValue();return new Ct(t).payload}get existingBankAccount(){var t;return!!(null===(t=this.bankAccount)||void 0===t?void 0:t.id)}get plaidAvailable(){return this.bankAccountVerification&&!!this.platformAccountId}get showCancel(){return this.bankAccountVerification||this.existingBankAccount}processBusinessResponse(t){const{bank_accounts:e,documents:s,settings:i,platform_account_id:a}=t;e.length>0?this.bankAccount=new Ct(e[e.length-1]):(this.bankAccount=new Ct({}),this.bankAccount.business_id=this.businessId),this.existingDocuments=s,this.bankAccountVerification=!0===i.bank_account_verification,this.platformAccountId=a}determineViewMode(){this.viewMode=this.existingBankAccount?"readonly":this.plaidAvailable?"plaid":"manual"}async sendData(t){try{if("manual"===this.viewMode&&!await this.postBankAccountData())return;if(!await this.postBusinessDocuments())return;"manual"===this.viewMode&&(this.viewMode="readonly",await this.refreshBankAccountData()),t()}catch(t){this.errorEvent.emit({message:t,errorCode:r.POST_ERROR,severity:a.ERROR})}}async postBankAccountData(){let t;return this.isLoading=!0,new Promise((e=>{let s=!1;this.postBankAccount({payload:this.postPayload,onSuccess:e=>{t=e,s=!0},onError:({error:t,code:e,severity:i})=>{s=!1,this.errorEvent.emit({message:t,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:t,formStep:at.bankAccount}),this.isLoading=!1,e(s)}})}))}async refreshBankAccountData(){return new Promise((t=>{this.isLoading=!0,this.getBusiness({onSuccess:t=>{this.processBusinessResponse(t.data),this.determineViewMode(),this.initializeFormController()},onError:({error:t,code:e,severity:s})=>{this.errorEvent.emit({message:t,errorCode:e,severity:s})},final:()=>{this.isLoading=!1,t()}})}))}async postBusinessDocuments(){this.isLoading=!0;try{const t=Object.values(this.documentData).flat();return!t.length||!(await Promise.all(t.map((t=>this.postDocumentRecordData(t))))).includes(!1)&&!(await Promise.all(t.map((t=>this.uploadDocument(t))))).includes(!1)}finally{this.isLoading=!1}}renderBankAccountInputs(t){const e=this.formController.getInitialValues();return s(this.country===V.CAN?"bank-account-form-inputs-canada":"bank-account-form-inputs",{defaultValue:e,errors:this.errors,inputHandler:this.inputHandler,formDisabled:t})}renderReadonlyView(){return s("div",null,this.renderBankAccountInputs(!0),s("div",{class:"mt-3"},s(bt,{variant:"secondary",type:"button",onClick:this.handleChangeBankAccount,disabled:this.isLoading,part:q},"Change Bank Account")))}renderPlaidView(){return s("div",{class:"mt-3"},s("plaid-verification",{authToken:this.authToken,accountId:this.platformAccountId,businessId:this.businessId,onPlaidVerificationSuccess:()=>{this.viewMode="readonly",this.refreshBankAccountData()}}),s("div",{class:"mt-3"},s(bt,{type:"button",variant:"link",className:"p-0",onClick:this.handleToggleToManualEntry,disabled:this.isLoading,part:Z},"Enter bank details manually (document upload required)")))}renderManualEntryView(){return s("div",null,this.plaidAvailable&&s("div",{class:"mb-3"},s(bt,{type:"button",variant:"secondary",onClick:this.handleToggleToPlaidVerification,disabled:this.isLoading,part:q},"Link bank account with Plaid instead")),this.renderBankAccountInputs(!1),s("div",{class:"mt-3 d-flex gap-2"},this.showCancel&&s(bt,{variant:"secondary",type:"button",onClick:this.handleCancel,disabled:this.isLoading,part:q},"Cancel"),s(bt,{variant:"primary",type:"button",onClick:this.handleSaveBankAccount,disabled:this.isLoading,isLoading:this.isLoading},"Save Bank Account")))}renderDocumentUploads(){return s("fieldset",{class:"mt-4"},s("div",{class:"d-flex align-items-center gap-2"},s("legend",{class:"mb-0",part:W},"Document Uploads"),s("form-control-tooltip",{helpText:"One document (voided check or bank statement) is required for underwriting purposes. It needs to visibly show the name tied to the account and the account number. Various file formats such as PDF, DOC, DOCX, JPEG are accepted. Multiple files can be uploaded for each document category."})),s("hr",{class:"mt-2"}),s("business-documents-on-file",{documents:this.existingDocuments,isLoading:this.isLoading}),s("bank-account-document-form-inputs",{inputHandler:this.inputHandler,errors:this.errors,storeFiles:this.storeFiles}))}render(){return this.isLoading?s(tt,null):s("form",null,s("fieldset",{class:"mb-4"},s("div",{class:"d-flex align-items-center gap-2"},s("legend",{class:"mb-0",part:W},"Bank Account Info"),s("form-control-tooltip",{helpText:"This direct deposit account is the designated bank account where incoming funds will be deposited. The name of this account must match the registered business name exactly. We are not able to accept personal accounts unless your business is a registered sole proprietorship."})),s("hr",{class:"mt-2"}),"readonly"===this.viewMode&&this.renderReadonlyView(),"plaid"===this.viewMode&&this.renderPlaidView(),"manual"===this.viewMode&&this.renderManualEntryView()),"plaid"!==this.viewMode&&this.renderDocumentUploads())}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"],isLoading:["watchHandler"]}}},Pt=class{constructor(s){t(this,s),this.errorEvent=e(this,"error-event",7),this.stepCompleteEvent=e(this,"complete-form-step-event",7),this.formLoading=e(this,"formLoading",7),this.errors={},this.coreInfo={},this.isLoading=!1,this.isEditingTaxId=!1,this.getData=()=>{this.getBusiness&&(this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:t=>{this.coreInfo=new I(t.data),this.formController.setInitialValues(Object.assign({},this.coreInfo))},onError:({error:t,code:e,severity:s})=>{this.errorEvent.emit({message:t,errorCode:e,severity:s})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}}))},this.sendData=t=>{let e;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:s=>{e=s,t(),this.isEditingTaxId=!1},onError:({error:t,code:s,severity:i,rawError:a})=>{e=t,a&&"object"==typeof a&&a.param&&this.formController.setFieldError(a.param,a.message),this.errorEvent.emit({message:t,errorCode:s,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:e,formStep:at.businessInfo}),this.formLoading.emit(!1)}})},this.inputHandler=(t,e)=>{this.errors[t]&&this.formController.clearFieldError(t),this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:e}))}}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:t}){this.formController.validateAndSubmit((()=>this.sendData(t)))}get patchPayload(){return new I(this.formController.values.getValue()).payload}componentWillLoad(){this.initializeApi();const t=this.country===V.CAN?T(this.allowOptionalFields):L(this.allowOptionalFields);this.formController=new j(t),this.getData()}componentDidLoad(){this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=u({authToken:this.authToken,businessId:this.businessId,service:new g}),this.patchBusiness=m({authToken:this.authToken,businessId:this.businessId,service:new g})):this.errorEvent.emit({message:"Missing required props",errorCode:r.MISSING_PROPS,severity:a.ERROR})}render(){var t,e;const i=this.formController.getInitialValues();return this.isLoading?s(tt,null):s("form",null,s("fieldset",null,s("div",{class:"d-flex align-items-center gap-2"},s("legend",{class:"mb-0",part:W},"Business Information")),s("hr",{class:"mt-2"}),s("div",{class:"row gy-3"},s("div",{class:"col-12 col-md-6"},s("form-control-text",{name:"legal_name",label:"Business Name",defaultValue:i.legal_name,errorText:this.errors.legal_name,inputHandler:this.inputHandler,helpText:"Enter this exactly as it appears on your tax records (don't use acronyms or abbreviations unless you registered that way)."})),s("div",{class:"col-12 col-md-6"},s("form-control-text",{name:"doing_business_as",label:"Doing Business As (DBA)",defaultValue:i.doing_business_as,errorText:this.errors.doing_business_as,inputHandler:this.inputHandler,helpText:"Enter this exactly as it appears on your tax records (leave blank if you don't have a registered DBA/trade name)"})),s("div",{class:"col-12 col-md-8"},s("form-control-select",{name:"classification",label:"Business Classification",options:it,defaultValue:i.classification,errorText:this.errors.classification,inputHandler:this.inputHandler})),s("div",{class:"col-12 col-md-4"},s("form-control-date",{name:"date_of_incorporation",label:"Date of Registration",defaultValue:i.date_of_incorporation,errorText:this.errors.date_of_incorporation,inputHandler:this.inputHandler})),s("div",{class:"col-12 col-md-6"},s("form-control-text",{name:"industry",label:"Industry",defaultValue:i.industry,errorText:this.errors.industry,inputHandler:this.inputHandler,helpText:"Describe what you sell"})),s("div",{class:"col-12 col-md-6"},!(null===(t=this.coreInfo)||void 0===t?void 0:t.tax_id_last4)||this.isEditingTaxId?s("form-control-number-masked",{name:"tax_id",label:pt[this.country].taxIdLabel,defaultValue:this.isEditingTaxId?"":i.tax_id,errorText:this.errors.tax_id,inputHandler:this.inputHandler,mask:"000000000",helpText:pt[this.country].taxIdHelpText}):s("div",null,s("label",{class:"form-label",part:U},pt[this.country].taxIdLabel),s("div",{class:"input-group mb-3"},s("input",{type:"text",class:"form-control",part:z,value:`****${null===(e=this.coreInfo)||void 0===e?void 0:e.tax_id_last4}`,disabled:!0}),s("button",{class:"btn btn-secondary",type:"button",part:q,onClick:()=>{this.isEditingTaxId=!0,this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{tax_id:"",tax_id_last4:null}))}},"Change")))),s("div",{class:"col-12"},s("form-control-text",{name:"website_url",label:"Business Website URL",defaultValue:i.website_url,errorText:this.errors.website_url,inputHandler:this.inputHandler,helpText:"Don't have a live website? You can use your social media business page, app store link, or staging site URL."})),s("div",{class:"col-12 col-md-6"},s("form-control-text",{name:"email",label:"Business Email Address",defaultValue:i.email,errorText:this.errors.email,inputHandler:this.inputHandler})),s("div",{class:"col-12 col-md-6"},s("form-control-number-masked",{name:"phone",label:"Business Phone Number",defaultValue:i.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:R.US})))))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},Bt=class{constructor(e){t(this,e),this.documents=[],this.isLoading=!1}render(){return this.isLoading?s(gt,{height:"50px"}):this.documents.length?s(i,null,s("div",{class:"card",part:Y},s("div",{class:"card-body"},s("h5",{class:"card-title",part:W},"Documents Already on File"),s("div",{class:"table-responsive"},s("table",{class:"table table-sm table-borderless",part:X},s("thead",null,s("tr",null,s("th",{style:{width:"25%"},part:G,scope:"col"},"File Name"),s("th",{style:{width:"25%"},part:G,scope:"col"},"File Type"),s("th",{style:{width:"25%"},part:G,scope:"col"},"Document Type"),s("th",{style:{width:"25%"},part:G,scope:"col"},"Date Uploaded"))),s("tbody",null,this.documents.sort(((t,e)=>t.document_type.localeCompare(e.document_type))).map(((t,e)=>s("tr",{class:0===e?"border-bottom border-top":"border-bottom"},s("td",{part:$},t.file_name),s("td",{part:$},t.file_type),s("td",{part:$},ft(t.document_type)),s("td",{part:$},`${vt(t.created_at)} - ${yt(t.created_at)}`))))))))),s("hr",null)):null}},Nt=class{constructor(s){t(this,s),this.clickEvent=e(this,"click-event",7),this.stepCompleteEvent=e(this,"complete-form-step-event",7),this.errorEvent=e(this,"error-event",7),this.formLoading=e(this,"formLoading",7),this.ownersPayload=[],this.refs=[],this.isLoading=!1,this.representativeIsOwner=null,this.matchRef=(t,e)=>{if(null===t)return;const s=this.ownersPayload.findIndex((t=>t.id===e));-1!==s&&(this.refs.length!==this.ownersPayload.length&&this.manageRefs(),this.refs[s]=t)},this.getData=()=>{this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:t=>{this.representative=new P(t.data.representative||{}),t.data.owners.length?this.ownersPayload=t.data.owners.map((t=>({id:t.id}))):this.addOwnerForm()},onError:({error:t,code:e,severity:s})=>{this.errorEvent.emit({message:t,errorCode:e,severity:s})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1,this.manageRefs()}})},this.sendData=async t=>{let e;this.formLoading.emit(!0),this.patchBusiness({payload:{owners:this.ownersPayload},onSuccess:s=>{e=s,t()},onError:({error:t,code:s,severity:i})=>{e=t,this.errorEvent.emit({message:t,errorCode:s,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:e,formStep:at.owners}),this.formLoading.emit(!1)}})},this.addOwnerForm=t=>{this.newFormOpen=!0,this.ownersPayload=[...this.ownersPayload,{id:""}],t&&this.clickEvent.emit({name:rt.addOwnerForm})},this.removeOwnerForm=t=>{this.ownersPayload=this.ownersPayload.filter((e=>e.id!==t)),this.newFormOpen&&(this.newFormOpen=!1)},this.handleRepresentativeIsOwnerChange=t=>{this.representativeIsOwner=t,this.representativeIsOwner&&(this.formLoading.emit(!0),this.isLoading=!0,this.ownersPayload=this.ownersPayload.filter((t=>""!==t.id)),this.patchBusiness({payload:{owners:[{id:this.representative.id},...this.ownersPayload]},onSuccess:()=>{this.getData(),this.newFormOpen=!1},finally:()=>{this.isLoading=!1,this.formLoading.emit(!1)}}))}}propChanged(){this.initializeApi()}get showAddOwnerButton(){return this.ownersPayload.length<4&&!this.newFormOpen}manageRefs(){this.refs=this.ownersPayload.map((t=>t.id))}async validateAndSubmit({onSuccess:t}){const e=this.refs.map((t=>t.validate()));if(!(await Promise.all(e)).every((t=>t)))return;const s=this.refs.map((t=>t.submit()));(await Promise.all(s)).every((t=>t))&&this.sendData(t)}componentWillLoad(){this.initializeApi(),this.getBusiness&&this.getData()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=u({authToken:this.authToken,businessId:this.businessId,service:new g}),this.patchBusiness=m({authToken:this.authToken,businessId:this.businessId,service:new g})):this.errorEvent.emit({message:"Missing required props",errorCode:r.MISSING_PROPS,severity:a.ERROR})}ownersWatcher(){this.manageRefs()}handleOwnerSubmit(t){const e=t.detail,s=this.ownersPayload.map((t=>t.id===e.id?e:t));s.includes(e)||(s[this.ownersPayload.findIndex((t=>!t.id))]=e,this.newFormOpen&&(this.newFormOpen=!1)),this.ownersPayload=s}render(){if(this.isLoading)return s(i,null,s(tt,null));const t=this.ownersPayload.some((t=>t.id===this.representative.id)),e=null===this.representativeIsOwner&&!t;return s(i,null,s("div",null,s("div",{class:"d-flex align-items-center gap-2"},s("legend",{class:"mb-0",part:W},"Owners"),s("form-control-tooltip",{helpText:"For partnerships, LLCs or privately held corporations, the business is required to apply with all individuals with 25% or more ownership to the application. For charities and registered non-profits, the business is required to apply with 1 individual with substantial control over the entity, such as a board member or director."})),s("hr",{class:"mt-2"}),e&&s("div",{class:"alert alert-warning mb-3",part:K},s("div",{class:"card-body"},s("div",{class:"d-flex align-items-center mb-3"},s("strong",null,"Is the representative of this business also an owner?")),s("div",{class:"d-flex gap-2"},s(bt,{variant:"primary",onClick:()=>this.handleRepresentativeIsOwnerChange(!0)},"Yes"),s(bt,{variant:"secondary",onClick:()=>this.handleRepresentativeIsOwnerChange(!1)},"No")))),s("div",{class:"row gy-3"},this.ownersPayload.map((t=>s("owner-form",{key:t.id,authToken:this.authToken,businessId:this.businessId,ownerId:t.id,removeOwner:this.removeOwnerForm,newFormOpen:this.newFormOpen,ownersLength:this.ownersPayload.length,country:this.country,allowOptionalFields:this.allowOptionalFields,ref:e=>this.matchRef(e,t.id)})))),s("div",{class:"d-flex justify-content-start"},s("div",{class:"gap-2"},s(bt,{variant:"primary",onClick:()=>this.addOwnerForm(!0),hidden:!this.showAddOwnerButton},"Add Owner")))))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"],ownersPayload:["ownersWatcher"]}}},Mt=class{constructor(e){t(this,e),this.isEditingIdentification=!1,this.inputHandler=(t,e)=>{kt(this.formController,{[t]:e})},this.onAddressFormUpdate=t=>{wt(this.formController,Object.assign(Object.assign({},this.formController.values.getValue().address),t))}}render(){var t,e,i,a,r,n,o,h,l;return s("form",{key:"ef49167cc726b3d4efa128503553a77a7627ebee"},s("fieldset",{key:"3714ce7eab6e9cee062911564d1c2635b68dfc8b"},s("div",{key:"4f27236b0438e29d7449bf5e9f71c00c7245effa",class:"d-flex align-items-center gap-2"},s("legend",{key:"adc144da314549264571b245c5388ab56c1dbbf1",class:"mb-0",part:W},"Representative"),s("form-control-tooltip",{key:"bcc76add04febe984427103a594aa63cab17bd27",helpText:"The representative for your business needs to be someone who has significant control over managing your business's finance. You will have an opportunity to add owners later in the form."})),s("hr",{key:"98bfed19989ee57e451a7005f3e60af16cc5d3b5",class:"mt-2"}),s("div",{key:"8f5e0e3deed2627ecf9f77290f268c0e2ee68bfa",class:"row gy-3"},s("div",{key:"b1205284a54a608b9c3b6be386e134849c9c6b25",class:"col-12 col-md-8"},s("form-control-text",{key:"36fcd91ca263adfd9fb69dc88f15404f93a8bc13",name:"name",label:"Full Name",defaultValue:null===(t=this.representativeDefaultValue)||void 0===t?void 0:t.name,errorText:this.errors.name,inputHandler:this.inputHandler})),s("div",{key:"879337d3c6a120f5dc9de3cd3364b34b9c4689df",class:"col-12 col-md-4"},s("form-control-text",{key:"ff2e4d29e76b93693735b35cbaca4416f0cd28a0",name:"title",label:"Title",defaultValue:null===(e=this.representativeDefaultValue)||void 0===e?void 0:e.title,errorText:this.errors.title,inputHandler:this.inputHandler,helpText:"Role at your business, e.g. President, CEO, Treasurer."})),s("div",{key:"2a011b74b4c203ae4a309d7d76ea8fd0631a5f2c",class:"col-12 col-md-6"},s("form-control-text",{key:"1ef20c59829ed3abe81cc53355bbafd5d4894360",name:"email",label:"Email Address",defaultValue:null===(i=this.representativeDefaultValue)||void 0===i?void 0:i.email,errorText:this.errors.email,inputHandler:this.inputHandler})),s("div",{key:"460dad175238fdfea8c79666343943a95aac0fd5",class:"col-12 col-md-6"},s("form-control-number-masked",{key:"7bd3ad79f6da1d33e38c2246d9c0378c2ef8b7d7",name:"phone",label:"Phone Number",defaultValue:null===(a=this.representativeDefaultValue)||void 0===a?void 0:a.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:R.US})),s("div",{key:"cda84bfc9f88a35177a42b7f9ec4c58292600c0b",class:"col-12 col-md-4"},s("form-control-date",{key:"5ed66fabc97afc94a5839135add25dbcb5237900",name:"dob_full",label:"Birth Date",defaultValue:null===(r=this.representativeDefaultValue)||void 0===r?void 0:r.dob_full,errorText:this.errors.dob_full,inputHandler:this.inputHandler,onFormControlInput:t=>_t(t,this.formController),helpText:"Must be 18 or older."})),s("div",{key:"0e19619fd081ea9dacd0eb25388a4c7b2c993312",class:"col-12 col-md-8"},!(null===(n=this.representativeDefaultValue)||void 0===n?void 0:n.ssn_last4)||this.isEditingIdentification?s("form-control-number-masked",{name:"identification_number",label:pt[this.country].idNumberLabel,defaultValue:this.isEditingIdentification?"":null===(o=this.representativeDefaultValue)||void 0===o?void 0:o.identification_number,errorText:this.errors.identification_number,inputHandler:this.inputHandler,mask:F[this.country],helpText:pt[this.country].identityHelpText}):s("div",null,s("label",{class:"form-label",part:U},pt[this.country].idNumberLabel),s("div",{class:"input-group mb-3"},s("input",{type:"text",class:"form-control",part:z,value:`****${null===(h=this.representativeDefaultValue)||void 0===h?void 0:h.ssn_last4}`,disabled:!0}),s("button",{class:"btn btn-secondary",type:"button",part:q,onClick:()=>{this.isEditingIdentification=!0,kt(this.formController,{identification_number:"",ssn_last4:null})}},"Change")))),s("div",{key:"6647390b209f5a630bf60e8952a7b0e70c92ca8a",class:"col-12"},s("identity-address-form",{key:"9755d0450fc8d83ba0a98a304455df346ff33e7f",errors:this.errors.address,defaultValues:null===(l=this.representativeDefaultValue)||void 0===l?void 0:l.address,handleFormUpdate:this.onAddressFormUpdate,country:this.country})))))}},Rt=class{constructor(s){t(this,s),this.errorEvent=e(this,"error-event",7),this.stepCompleteEvent=e(this,"complete-form-step-event",7),this.formLoading=e(this,"formLoading",7),this.errors={},this.representative={},this.isLoading=!1,this.getData=()=>{this.getBusiness&&this.formController&&(this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:t=>{this.representative=new P(t.data.representative||{}),this.representative.address.country=this.country,this.formController.setInitialValues(Object.assign({},this.representative))},onError:({error:t,code:e,severity:s})=>{this.errorEvent.emit({message:t,errorCode:e,severity:s})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}}))},this.sendData=t=>{let e;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:s=>{e=s,t()},onError:({error:t,code:s,severity:i})=>{e=t,this.errorEvent.emit({message:t,errorCode:s,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:e,formStep:at.representative}),this.formLoading.emit(!1)}})}}propChanged(){this.initializeApi(),this.getData()}async validateAndSubmit({onSuccess:t}){this.formController.validateAndSubmit((()=>this.sendData(t)))}componentWillLoad(){this.initializeApi(),this.initializeForm()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=u({authToken:this.authToken,businessId:this.businessId,service:new g}),this.patchBusiness=m({authToken:this.authToken,businessId:this.businessId,service:new g})):this.errorEvent.emit({message:"Missing required props",errorCode:r.MISSING_PROPS,severity:a.ERROR})}initializeForm(){const t=C[this.country];t?(this.formController=new j(t("representative",this.allowOptionalFields)),this.getData()):this.errorEvent.emit({message:"Missing schema for selected country",errorCode:r.MISSING_PROPS,severity:a.ERROR})}componentDidLoad(){this.formController&&this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}get patchPayload(){return{representative:new P(this.formController.values.getValue()).payload}}render(){return!this.formController||this.isLoading?s(tt,null):s("business-representative-form-inputs",{representativeDefaultValue:this.formController.getInitialValues(),errors:this.errors,formController:this.formController,country:this.country})}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},Ft=class{constructor(s){t(this,s),this.stepCompleteEvent=e(this,"complete-form-step-event",7),this.errorEvent=e(this,"error-event",7),this.formLoading=e(this,"formLoading",7),this.formCompleted=e(this,"formCompleted",7),this.errors={},this.fetchData=async()=>{this.formLoading.emit(!0);try{const t=await this.api.get({endpoint:this.businessEndpoint,authToken:this.authToken});this.acceptedTermsBefore=t.data.terms_conditions_accepted}catch(t){this.errorEvent.emit({errorCode:r.FETCH_ERROR,message:t.message,severity:a.ERROR,data:t})}finally{this.formLoading.emit(!1)}},this.sendData=async t=>{this.formLoading.emit(!0);try{const e=this.termsPayload,s=await this.api.post({endpoint:this.termsConditionsEndpoint,body:e,authToken:this.authToken});this.handleResponse(s,t)}catch(t){this.errorEvent.emit({errorCode:r.POST_ERROR,message:t.message,severity:a.ERROR,data:t})}finally{this.formLoading.emit(!1)}},this.inputHandler=(t,e)=>{this.acceptedTerms=e,this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:e}))}}get businessEndpoint(){return`entities/business/${this.businessId}`}get termsConditionsEndpoint(){return"entities/terms_and_conditions"}get formHelperText(){return this.acceptedTermsBefore?"You have already accepted the terms and conditions.":null}get termsPayload(){return{business_id:this.businessId,accepted:this.formController.values.getValue().accepted,user_agent:window.navigator.userAgent}}async componentWillLoad(){this.api=xt(),this.formController=new j((t=>{const e=A({accepted:D().oneOf([!0],"You must agree to the terms and conditions to continue").required("You must agree to the terms and conditions to continue")}),s=A({accepted:D().nullable()});return t?s:e})(this.allowOptionalFields)),this.businessId&&this.authToken&&this.fetchData()}handleResponse(t,e){t.error?this.errorEvent.emit({errorCode:r.POST_ERROR,message:t.error.message,severity:a.ERROR,data:t.error}):e(),this.stepCompleteEvent.emit({response:t,formStep:at.termsAndConditions}),this.formCompleted.emit()}async validateAndSubmit({onSuccess:t}){this.acceptedTermsBefore?(this.stepCompleteEvent.emit({response:null,formStep:at.termsAndConditions,metadata:"no data submitted"}),this.formCompleted.emit(),t()):this.formController.validateAndSubmit((()=>this.sendData(t)))}componentDidLoad(){this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}get merchantAgreementLink(){return s("a",{href:"https://justifi.tech/merchant-agreement/",target:"_blank",rel:"noopener noreferrer"},"merchant agreement")}render(){return s("form",{key:"24b0a8ff0187894cf5e0f56e9e4b28c378e720cb"},s("fieldset",{key:"26fa9159dd6d61edd28b9443a10eeb981f150308"},s("legend",{key:"103bdecbc51f2cccd9105e2f9b271b60760618ec",part:W},"Terms and Conditions"),s("hr",{key:"dfd29fbe609a57d8160df7980ed0e63e75934a86"}),s("div",{key:"61e06597ec652c1d7c6e7e2bd8c9b653d061d076"},s("p",{key:"cd4def71580cd14d6edb5887221ebf6aa80cc2ea"},"Please read and accept the ",this.merchantAgreementLink," to submit your provisioning request.")),s("br",{key:"e3c64733f11a4f702e686e6c5ae7acd7e6bd1c34"}),s("div",{key:"71bd74de3aee69805a2aa1297356ff8b8db3c76c",class:"row-gy-3"},s("div",{key:"94a28c13e3bbc1c89cd1b5ebde2e1732b48f99ea",class:"col-12"},s("form-control-checkbox",{key:"fee95fa42192fee1bbfd544307b4e1c11c0d97f4",name:"accepted",label:"I agree to the terms and conditions",inputHandler:this.inputHandler,errorText:this.errors.accepted,disabled:this.acceptedTermsBefore,helpText:this.formHelperText,checked:this.acceptedTerms})))))}},Wt=class{constructor(s){t(this,s),this.errorEvent=e(this,"error-event",7),this.stepCompleteEvent=e(this,"complete-form-step-event",7),this.formLoading=e(this,"formLoading",7),this.errors={},this.legal_address={},this.isLoading=!1,this.getData=()=>{this.getBusiness&&(this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:t=>{const e=new B((t.data||{}).legal_address||{});this.legal_address=Object.assign(Object.assign({},e),{country:this.country}),this.formController.setInitialValues(Object.assign({},this.legal_address))},onError:({error:t,code:e,severity:s})=>{this.errorEvent.emit({message:t,errorCode:e,severity:s})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}}))},this.sendData=t=>{let e;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:s=>{e=s,t()},onError:({error:t,code:s,severity:i})=>{e=t,this.errorEvent.emit({message:t,errorCode:s,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:e,formStep:at.legalAddress}),this.formLoading.emit(!1)}})},this.inputHandler=(t,e)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:e}))}}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:t}){this.formController.validateAndSubmit((()=>this.sendData(t)))}get patchPayload(){return{legal_address:new B(this.formController.values.getValue()).payload}}componentWillLoad(){this.initializeApi(),this.formController=new j((0,O[this.country])(this.allowOptionalFields)),this.getData()}componentDidLoad(){this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=u({authToken:this.authToken,businessId:this.businessId,service:new g}),this.patchBusiness=m({authToken:this.authToken,businessId:this.businessId,service:new g})):this.errorEvent.emit({message:"Missing required props",errorCode:r.MISSING_PROPS,severity:a.ERROR})}render(){var t;const e=null===(t=this.formController)||void 0===t?void 0:t.getInitialValues();return this.isLoading?s(tt,null):s("form",null,s("fieldset",null,s("div",{class:"d-flex align-items-center gap-2"},s("legend",{class:"mb-0",part:W},"Legal Address of your Business"),s("form-control-tooltip",{helpText:"No PO Boxes."})),s("hr",{class:"mt-2"}),s("form-address-fields",{country:this.country,errors:this.errors,defaultValues:e,inputHandler:this.inputHandler})))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},qt=class{loadingWatcher(){this.formLoading.emit(this.isLoading)}constructor(s){t(this,s),this.clickEvent=e(this,"click-event",7),this.errorEvent=e(this,"error-event",7),this.formLoading=e(this,"formLoading",7),this.ownerSubmitted=e(this,"ownerSubmitted",7),this.isLoading=!1,this.errors={},this.owner={},this.getData=()=>{this.getOwner&&(this.isLoading=!0,this.getOwner({onSuccess:t=>{this.instantiateOwner(t.data)},onError:({error:t,code:e,severity:s})=>{this.errorEvent.emit({message:t,errorCode:e,severity:s})},final:()=>this.isLoading=!1}))},this.sendData=()=>(this.isLoading=!0,new Promise((t=>{this.ownerId?this.patchOwner({payload:this.payload,onSuccess:e=>{this.ownerSubmitted.emit({id:e.data.id}),this.instantiateOwner(e.data),t(!0)},onError:({error:e,code:s,severity:i})=>{this.errorEvent.emit({message:e,errorCode:s,severity:i}),t(!1)},final:()=>this.isLoading=!1}):this.postOwner({payload:this.payload,onSuccess:e=>{this.ownerSubmitted.emit({id:e.data.id}),this.instantiateOwner(e.data),t(!0)},onError:({error:e,code:s,severity:i})=>{this.errorEvent.emit({message:e,errorCode:s,severity:i}),t(!1)},final:()=>this.isLoading=!1})}))),this.instantiateOwner=async t=>{this.owner=Object.assign({},new N(t)),await this.formController.setInitialValues(this.owner)},this.handleAddOwner=()=>{this.clickEvent.emit({name:this.ownerId?rt.updateOwner:rt.addOwner})},this.handleRemoveOwner=()=>{this.removeOwner(this.ownerId),this.clickEvent.emit({name:rt.removeOwner})},this.validate=this.validate.bind(this),this.submit=this.submit.bind(this),this.validateAndSubmit=this.validateAndSubmit.bind(this)}async returnOwnerData(){return this.ownerId}async validate(){return this.formController.validate()}async submit(){if(await this.validate())return this.sendData()}async validateAndSubmit(t){t.preventDefault(),await this.validate()&&this.submit()}get payload(){const t=new N(this.formController.values.getValue()).payload;return this.ownerId?t:Object.assign(Object.assign({},t),{business_id:this.businessId})}get formTitle(){return this.ownerId?"Edit Business Owner":"Add Business Owner"}get submitButtonText(){return this.ownerId?"Update":"Add"}get showRemoveButton(){return!(this.ownersLength<=1)&&(!(this.ownerId||!this.newFormOpen)||!(!this.ownerId||this.newFormOpen)||void 0)}componentWillLoad(){this.formController=new j((0,C[this.country])("owner",this.allowOptionalFields)),this.initializeApi(),this.ownerId&&this.getOwner?this.getData():this.instantiateOwner({})}componentDidLoad(){this.formController.errors.subscribe((t=>this.errors=Object.assign({},t)))}initializeApi(){this.authToken&&(this.getOwner=f({authToken:this.authToken,identityId:this.ownerId,service:new _}),this.patchOwner=v({authToken:this.authToken,identityId:this.ownerId,service:new _}),this.postOwner=y({authToken:this.authToken,service:new _}))}render(){return s(i,{key:"1661676befd63f9308edcb02be179db71b7c9d99",style:{display:"block"}},s("form",{key:"4961f358ca8953156477d455cacb19e4dec3cc29",onSubmit:this.validateAndSubmit},s("fieldset",{key:"27ecfec87ae93a1bdec94f3cc925558dc8f0ff23"},s("legend",{key:"4c194cf9e08e6fab9982b95a4b12c3c3a8cecdc3",class:"fw-semibold fs-5",part:Q},this.formTitle),s("br",{key:"ef1f9b184dac866d27cfa245106d90db0954fa51"}),s("div",{key:"2936ecc396220f8b80e5d8454bc6f6f70cb3ae73",class:"row gy-3"},s("owner-form-inputs",{key:"f34d38b718ed7fde67102aa1034b5e6377e001f8",ownerDefaultValue:this.formController.getInitialValues(),errors:this.errors,formController:this.formController,country:this.country}),s("div",{key:"2d5266bc1a7f4aeb12cab8a494107f2668b2fb0e",class:"d-flex gap-2 justify-content-start"},s(bt,{key:"39631fd0364221ac2a274d8aa794a1f3c8d28780",variant:"secondary",type:"button",onClick:this.handleRemoveOwner,hidden:!this.showRemoveButton},"Remove"),s(bt,{key:"120fbae294f8f67bd14fe0be5dc1bcf881ffd489",variant:"primary",type:"submit",onClick:this.handleAddOwner,disabled:this.isLoading},this.submitButtonText))),s("hr",{key:"73eccba19a595b67f64139769a495d5a27e02b2f"}))))}static get watchers(){return{isLoading:["loadingWatcher"]}}},Zt=class{constructor(s){t(this,s),this.plaidVerificationSuccess=e(this,"plaidVerificationSuccess",7),this.plaidVerificationError=e(this,"plaidVerificationError",7),this.linkToken=null,this.linkTokenId=null,this.plaidLink=null,this.isAuthenticating=!1,this.isSuccess=!1,this.error=null,this.isLoading=!1,this.plaidService=new Lt,this.abortController=null,this.timeoutId=null,this.initializePlaidLink=async()=>{try{if(void 0===window.Plaid)return void this.handleError({code:d.PLAID_SDK_LOAD_FAILED,message:c[d.PLAID_SDK_LOAD_FAILED],severity:l[d.PLAID_SDK_LOAD_FAILED],retryable:!0,userAction:"Refresh the page and try again"});if(await this.getLinkToken(),!this.linkToken)return void this.handleError({code:d.PLAID_LINK_TOKEN_FAILED,message:c[d.PLAID_LINK_TOKEN_FAILED],severity:l[d.PLAID_LINK_TOKEN_FAILED],retryable:!0,userAction:"Click to try again"});const t=window.Plaid;this.plaidLink=t.create({token:this.linkToken,onSuccess:this.handlePlaidSuccess,onExit:this.handlePlaidExit,onEvent:this.handlePlaidEvent,onLoad:this.handlePlaidLoad})}catch(t){this.handleError({code:d.PLAID_LINK_INIT_FAILED,message:c[d.PLAID_LINK_INIT_FAILED],severity:l[d.PLAID_LINK_INIT_FAILED],originalError:t,retryable:!0,userAction:"Click to try again"})}},this.getLinkToken=async()=>{var t,e,s,i;try{if(!this.authToken||!this.accountId)return void this.handleError({code:d.PLAID_LINK_TOKEN_FAILED,message:"Missing authentication. Please provide authToken and accountId.",severity:a.ERROR,retryable:!1,userAction:"Provide required props"});this.abortController=new AbortController,this.timeoutId=setTimeout((()=>{var t;null===(t=this.abortController)||void 0===t||t.abort()}),3e4);const t=await this.plaidService.getLinkTokenForVerification(this.authToken,this.businessId,this.abortController.signal);if(this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null),t.error)throw new Error("string"==typeof t.error?t.error:t.error.message||"Failed to get link token");this.linkToken=t.data.link_token,this.linkTokenId=t.data.id}catch(a){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null);let r=d.PLAID_LINK_TOKEN_FAILED,n=c[r],o=!0;"AbortError"===a.name?(r=d.PLAID_TIMEOUT,n=c[r],o=!0):(null===(t=a.message)||void 0===t?void 0:t.includes("network"))||(null===(e=a.message)||void 0===e?void 0:e.includes("fetch"))?(r=d.PLAID_NETWORK_ERROR,n=c[r],o=!0):((null===(s=a.message)||void 0===s?void 0:s.includes("401"))||(null===(i=a.message)||void 0===i?void 0:i.includes("unauthorized")))&&(r=d.PLAID_INVALID_CREDENTIALS,n="Authentication failed. Please check your credentials.",o=!1),this.handleError({code:r,message:n,severity:l[r],originalError:a,retryable:o,userAction:o?"Click to try again":"Check your credentials"})}},this.openPlaidLink=()=>{this.plaidLink&&this.linkToken&&(this.isAuthenticating=!0,this.clearError(),this.plaidLink.open())},this.handlePlaidSuccess=async t=>{var e;this.isAuthenticating=!1,this.isLoading=!0,this.clearError();try{const s=await this.plaidService.postPlaidVerifiedBankAccountData(this.authToken,this.businessId,{public_token:t,link_token_id:this.linkTokenId},null===(e=this.abortController)||void 0===e?void 0:e.signal);if(s.error)throw new Error("string"==typeof s.error?s.error:s.error.message||"Failed to verify bank account");this.isSuccess=!0,this.isLoading=!1,this.plaidVerificationSuccess.emit({publicToken:t,bankAccount:s.data})}catch(t){this.isLoading=!1,this.handleError({code:d.PLAID_AUTHENTICATION_FAILED,message:(null==t?void 0:t.message)||"Failed to verify bank account",severity:l[d.PLAID_AUTHENTICATION_FAILED],originalError:t,retryable:!0,userAction:"Click to try again"})}},this.handlePlaidExit=t=>{this.isAuthenticating=!1,t&&this.handlePlaidError(t)},this.handlePlaidEvent=(t,e)=>{switch(t){case"OPEN":this.isAuthenticating=!0;break;case"CLOSE":this.isAuthenticating=!1;break;case"ERROR":this.handlePlaidError(e)}},this.handlePlaidLoad=()=>{},this.handlePlaidError=t=>{let e=d.PLAID_AUTHENTICATION_FAILED,s=c[e],i=!0,a="Click to try again";if(t.error_code)switch(t.error_code){case"INVALID_CREDENTIALS":e=d.PLAID_INVALID_CREDENTIALS,s=c[e],i=!0;break;case"ITEM_LOGIN_REQUIRED":e=d.PLAID_INVALID_CREDENTIALS,s="Your bank requires re-authentication. Please try again.",i=!0;break;case"ITEM_LOCKED":e=d.PLAID_ACCOUNT_LOCKED,s=c[e],i=!1,a="Contact your bank";break;case"INSTITUTION_NOT_RESPONDING":e=d.PLAID_MAINTENANCE,s=c[e],i=!0;break;case"RATE_LIMIT_EXCEEDED":e=d.PLAID_RATE_LIMITED,s=c[e],i=!0;break;default:t.error_message&&(s=t.error_message)}this.handleError({code:e,message:s,severity:l[e],originalError:t,retryable:i,userAction:a}),this.isAuthenticating=!1},this.handleError=t=>{this.error=t,this.isLoading=!1,this.plaidVerificationError.emit(t),console.error("Plaid verification error:",t)},this.clearError=()=>{this.error&&(this.error=null)}}componentDidRender(){this.scriptRef&&(this.scriptRef.onload=()=>{this.initializePlaidLink()},this.scriptRef.onerror=()=>{this.handleError({code:d.PLAID_SDK_LOAD_FAILED,message:c[d.PLAID_SDK_LOAD_FAILED],severity:l[d.PLAID_SDK_LOAD_FAILED],retryable:!0,userAction:"Refresh the page and try again"})})}disconnectedCallback(){this.timeoutId&&clearTimeout(this.timeoutId),this.abortController&&this.abortController.abort()}render(){const t=s("svg",{class:"plaid-logo-img",height:"20",width:"20",viewBox:"0 0 28 29",xmlns:"http://www.w3.org/2000/svg",style:{display:"inline",marginLeft:"5px",marginRight:"5px",marginTop:"-2px"}},s("g",{fill:"#fff","fill-rule":"evenodd"},s("path",{d:"M25.7629 26.2628L28 17.5309L24.9691 14.5001L27.9999 11.4691L25.7628 2.73706L17.0309 0.5L14.0001 3.531L10.969 0.50014L2.23706 2.73734L0 11.4691L3.03128 14.4999L0.00014 17.531L2.2372 26.2629L10.9691 28.5L14.0001 25.469L17.031 28.4999L25.7629 26.2628ZM15.7321 23.7371L18.6186 20.8505L22.2912 24.5233L17.6956 25.7007L15.7321 23.7371ZM11.1136 9.88154L14.0003 6.99502L16.8868 9.8814L14.0001 12.7679L11.1136 9.88154ZM12.2682 14.5L9.38154 17.3865L6.49502 14.5L9.38154 11.6135L12.2682 14.5ZM18.6187 11.6133L21.5053 14.5L18.6186 17.3865L15.7321 14.5L18.6187 11.6133ZM16.8867 19.1186L14.0001 22.0051L11.1135 19.1185L14.0001 16.2319L16.8867 19.1186ZM10.3044 25.7007L5.70864 24.5233L9.38154 20.8504L12.2682 23.7371L10.3044 25.7007ZM4.76308 16.2319L7.6496 19.1185L3.9767 22.7914L2.7993 18.1957L4.76308 16.2319ZM3.9767 6.20836L7.64974 9.8814L4.76308 12.7681L2.7993 10.8041L3.9767 6.20836ZM12.2683 5.26294L9.38168 8.1496L5.70892 4.4767L10.3047 3.2993L12.2683 5.26294ZM17.6959 3.2993L22.2915 4.4767L18.6186 8.14946L15.7321 5.26294L17.6959 3.2993ZM23.2372 12.7681L20.3505 9.8814L24.0233 6.20878L25.2007 10.8046L23.2372 12.7681ZM24.0233 22.7914L20.3505 19.1186L23.2372 16.2321L25.2007 18.1957L24.0233 22.7914Z"})));return s(Tt,null,s("script",{src:"https://cdn.plaid.com/link/v2/stable/link-initialize.js",async:!0,ref:t=>this.scriptRef=t}),s("div",null,s("div",{class:"mb-3"},s(bt,{variant:"primary",type:"button",onClick:t=>{t.preventDefault(),this.openPlaidLink()},disabled:this.isLoading,part:J},"Connect with Plaid ",t," (instant verification)")),(()=>this.error?s("div",{class:(this.error.severity===a.ERROR?"text-danger":this.error.severity===a.WARNING?"text-warning":"text-info")+" mt-2"},s("small",null,this.error.message),s("br",null),this.error.userAction&&s("small",{class:"text-muted"},this.error.userAction)):null)(),(()=>this.error?null:this.isLoading?s("div",{class:"text-info mt-2"},s("small",null,"Verifying bank account...")):this.isSuccess?s("div",{class:"text-success mt-2"},s("small",null,"✓ Bank account verified successfully")):this.isAuthenticating?s("div",{class:"text-info mt-2"},s("small",null,"Connecting to your bank...")):null)()))}};export{Ot as additional_questions_form_step,jt as bank_account_document_form_inputs,At as bank_account_form_inputs,Et as bank_account_form_inputs_canada,It as business_bank_account_form_step,Pt as business_core_info_form_step,Bt as business_documents_on_file,Nt as business_owners_form_step,Mt as business_representative_form_inputs,Rt as business_representative_form_step,Ft as business_terms_conditions_form_step,Wt as legal_address_form_step,qt as owner_form,Zt as plaid_verification}
@@ -1 +1 @@
1
- import{r as e,h as n,H as t,c as i,g as o}from"./p-CV0Pyo1O.js";import{c as r}from"./p-D8GTwl9v.js";import{a7 as s,q as a,v as c,w as d,x as u}from"./p-DnrawQn3.js";import{g as f}from"./p-BFTU3MAI.js";import{F as l}from"./p-BsQy297i.js";import{p as h}from"./p-beXEDfB9.js";const m=r({focused:{boxShadow:"",border:""},focusedAndInvalid:{boxShadow:"",border:""},fontStyles:{fontFamily:"",fontSize:"",fontWeight:"",lineHeight:"",margin:"",padding:""}}),{state:w,set:g}=m,b=class{constructor(n){e(this,n),this.isFocused=!1,this.errorText=""}focusWithoutPageScroll(e){if(e)try{e.focus({preventScroll:!0})}catch(n){const{scrollX:t,scrollY:i}=window;e.focus(),window.scrollTo(t,i)}}async componentDidLoad(){const e=await this.getBaseFontStyles();g("fontStyles",e);const n=await this.getFocusedStyles();g("focused",n);const t=await this.getFocusedAndInvalidStyles();g("focusedAndInvalid",t)}async getBaseFontStyles(){return new Promise((e=>{setTimeout((()=>{const n=getComputedStyle(this.hiddenInput);e({fontFamily:n.fontFamily,fontSize:n.fontSize,fontWeight:n.fontWeight,lineHeight:n.lineHeight,margin:n.margin,padding:n.padding,color:n.color})}),500)}))}async getFocusedStyles(){return new Promise((e=>{this.focusWithoutPageScroll(this.hiddenInput),setTimeout((()=>{this.hiddenInput.blur();let n=getComputedStyle(this.hiddenInput);e({boxShadow:n.boxShadow,border:n.border})}),500)}))}async getFocusedAndInvalidStyles(){return new Promise((e=>{this.focusWithoutPageScroll(this.hiddenInput),this.errorText="Error",setTimeout((()=>{const n=getComputedStyle(this.hiddenInput),t={boxShadow:n.boxShadow,border:n.border};this.hiddenInput.blur(),e(t)}),500)}))}get part(){return this.isFocused&&this.errorText?s:this.errorText?a:this.isFocused?c:d}render(){return n(t,{key:"5697b5e318914b8866bc6ad2fb2009e5f8c8d80f"},n("input",{key:"3370d11bc6e5a49f28dd2e95bf1d92ee7a0dd892",ref:e=>this.hiddenInput=e,type:"text",class:this.errorText?"form-control is-invalid":"form-control",onFocus:()=>this.isFocused=!0,onBlur:()=>this.isFocused=!1,part:this.part,tabindex:"-1",style:{height:"0",opacity:"0",pointerEvents:"none",animation:"none"}}))}};var p,y,v={exports:{}},k=f((p||(p=1,y=v,console.info("\nIFRAME-RESIZER\n\nIframe-Resizer 5 is now available via the following two packages:\n\n * @iframe-resizer/parent\n * @iframe-resizer/child\n\nAdditionally their are also new versions of iframe-resizer for React, Vue, and jQuery.\n\nVersion 5 of iframe-resizer has been extensively rewritten to use modern browser APIs, which has enabled significantly better performance and greater accuracy in the detection of content resizing events.\n\nPlease see https://iframe-resizer.com/upgrade for more details.\n"),function(e){if("undefined"!=typeof window){var n,t,i=0,o=!1,r=!1,s="[iFrameSizer]",a=null,c=window.requestAnimationFrame,d=Object.freeze({max:1,scroll:1,bodyScroll:1,documentElementScroll:1}),u={},f=null,l=Object.freeze({autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,license:"1jqr0si6pnt",log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,mouseEvents:!0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClose:function(){return!0},onClosed:function(){},onInit:function(){},onMessage:function(){k("onMessage function not defined")},onMouseEnter:function(){},onMouseLeave:function(){},onResized:function(){},onScroll:function(){return!0}}),h={};window.jQuery!==e&&((t=window.jQuery).fn?t.fn.iFrameResize||(t.fn.iFrameResize=function(e){return this.filter("iframe").each((function(n,t){W(t,e)})).end()}):v("","Unable to bind to jQuery, it is not fully loaded.")),y.exports=L(),window.iFrameResize=window.iFrameResize||L()}function m(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function w(e,n,t){e.addEventListener(n,t,!1)}function g(e,n,t){e.removeEventListener(n,t,!1)}function b(e){return u[e]?u[e].log:o}function p(e,n){x("log",e,n,b(e))}function v(e,n){x("info",e,n,b(e))}function k(e,n){x("warn",e,n,!0)}function x(e,n,t,i){!0===i&&"object"==typeof window.console&&console[e](function(e){return s+"["+function(e){var n="Host page: "+e;return window.top!==window.self&&(n=window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+e:"Nested host page: "+e),n}(e)+"]"}(n),t)}function I(e){function n(){t("Height"),t("Width"),C((function(){R(A),T(P),l("onResized",A)}),A,"init")}function t(e){var n=Number(u[P]["max"+e]),t=Number(u[P]["min"+e]),i=e.toLowerCase(),o=Number(A[i]);p(P,"Checking "+i+" is in range "+t+"-"+n),o<t&&(o=t,p(P,"Set "+i+" to min value")),o>n&&(o=n,p(P,"Set "+i+" to max value")),A[i]=""+o}function i(e){return W.slice(W.indexOf(":")+7+e)}function o(e,n){var t,i;t=function(){var t,i;E("Send Page Info","pageInfo:"+(t=document.body.getBoundingClientRect(),i=A.iframe.getBoundingClientRect(),JSON.stringify({iframeHeight:i.height,iframeWidth:i.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(i.top-t.top,10),offsetLeft:parseInt(i.left-t.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,documentHeight:document.documentElement.clientHeight,documentWidth:document.documentElement.clientWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})),e,n)},h[i=n]||(h[i]=setTimeout((function(){h[i]=null,t()}),32))}function r(e){var n=e.getBoundingClientRect();return M(P),{x:Math.floor(Number(n.left)+Number(a.x)),y:Math.floor(Number(n.top)+Number(a.y))}}function c(e){var n=e?r(A.iframe):{x:0,y:0},t={x:Number(A.width)+n.x,y:Number(A.height)+n.y};p(P,"Reposition requested from iFrame (offset x:"+n.x+" y:"+n.y+")"),window.top===window.self?(a=t,d(),p(P,"--")):window.parentIFrame?window.parentIFrame["scrollTo"+(e?"Offset":"")](t.x,t.y):k(P,"Unable to scroll to requested position, window.parentIFrame not found")}function d(){!1===l("onScroll",a)?j():T(P)}function f(e){var n={};if(0===Number(A.width)&&0===Number(A.height)){var t=i(9).split(":");n={x:t[1],y:t[0]}}else n={x:A.width,y:A.height};l(e,{iframe:A.iframe,screenX:Number(n.x),screenY:Number(n.y),type:A.type})}function l(e,n){return S(P,e,n)}var m,b,y,x,I,z,W=e.data,A={},P=null;"[iFrameResizerChild]Ready"===W?function(){for(var e in u)E("iFrame requested init",N(e),u[e].iframe,e)}():s===(""+W).slice(0,13)&&W.slice(13).split(":")[0]in u?(x=(y=W.slice(13).split(":"))[1]?parseInt(y[1],10):0,I=u[y[0]]&&u[y[0]].iframe,z=getComputedStyle(I),A={iframe:I,id:y[0],height:x+function(e){return"border-box"!==e.boxSizing?0:(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}(z)+function(e){return"border-box"!==e.boxSizing?0:(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}(z),width:y[2],type:y[3]},u[P=A.id]&&(u[P].loaded=!0),(b=A.type in{true:1,false:1,undefined:1})&&p(P,"Ignoring init message from meta parent page"),!b&&function(e){var n=!0;return u[e]||(n=!1,k(A.type+" No settings for "+e+". Message was: "+W)),n}(P)&&(p(P,"Received: "+W),m=!0,null===A.iframe&&(k(P,"IFrame ("+A.id+") not found"),m=!1),m&&function(){var n,t=e.origin,i=u[P]&&u[P].checkOrigin;if(i&&""+t!="null"&&!(i.constructor===Array?function(){var e=0,n=!1;for(p(P,"Checking connection is from allowed list of origins: "+i);e<i.length;e++)if(i[e]===t){n=!0;break}return n}():(p(P,"Checking connection is from: "+(n=u[P]&&u[P].remoteHost)),t===n)))throw new Error("Unexpected message received from: "+t+" for "+A.iframe.id+". Message was: "+e.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return!0}()&&function(){switch(u[P]&&u[P].firstRun&&u[P]&&(u[P].firstRun=!1),A.type){case"close":F(A.iframe);break;case"message":m=i(6),p(P,"onMessage passed: {iframe: "+A.iframe.id+", message: "+m+"}"),l("onMessage",{iframe:A.iframe,message:JSON.parse(m)}),p(P,"--");break;case"mouseenter":f("onMouseEnter");break;case"mouseleave":f("onMouseLeave");break;case"autoResize":u[P].autoResize=JSON.parse(i(9));break;case"scrollTo":c(!1);break;case"scrollToOffset":c(!0);break;case"pageInfo":o(u[P]&&u[P].iframe,P),function(){function e(e,i){function r(){u[t]?o(u[t].iframe,t):n()}["scroll","resize"].forEach((function(n){p(t,e+n+" listener for sendPageInfo"),i(window,n,r)}))}function n(){e("Remove ",g)}var t=P;e("Add ",w),u[t]&&(u[t].stopPageInfo=n)}();break;case"pageInfoStop":u[P]&&u[P].stopPageInfo&&(u[P].stopPageInfo(),delete u[P].stopPageInfo);break;case"inPageLink":t=i(9).split("#")[1]||"",s=decodeURIComponent(t),(h=document.getElementById(s)||document.getElementsByName(s)[0])?(e=r(h),p(P,"Moving to in page link (#"+t+") at x: "+e.x+" y: "+e.y),a={x:e.x,y:e.y},d(),p(P,"--")):window.top===window.self?p(P,"In page link #"+t+" not found"):window.parentIFrame?window.parentIFrame.moveToAnchor(t):p(P,"In page link #"+t+" not found and window.parentIFrame not found");break;case"reset":O(A);break;case"init":n(),l("onInit",A.iframe);break;default:0===Number(A.width)&&0===Number(A.height)?k("Unsupported message received ("+A.type+"), this is likely due to the iframe containing a later version of iframe-resizer than the parent page"):n()}var e,t,s,h,m}())):v(P,"Ignored: "+W)}function S(e,n,t){var i=null,o=null;if(u[e]){if("function"!=typeof(i=u[e][n]))throw new TypeError(n+" on iFrame["+e+"] is not a function");o=i(t)}return o}function z(e){delete u[e.id]}function F(e){var t=e.id;if(!1!==S(t,"onClose",t)){p(t,"Removing iFrame: "+t);try{e.parentNode&&e.parentNode.removeChild(e)}catch(e){k(e)}S(t,"onClosed",t),p(t,"--"),z(e),n&&(n.disconnect(),n=null)}else p(t,"Close iframe cancelled by onClose event")}function M(n){null===a&&p(n,"Get page position: "+(a={x:window.pageXOffset===e?document.documentElement.scrollLeft:window.pageXOffset,y:window.pageYOffset===e?document.documentElement.scrollTop:window.pageYOffset}).x+","+a.y)}function T(e){null!==a&&(window.scrollTo(a.x,a.y),p(e,"Set page position: "+a.x+","+a.y),j())}function j(){a=null}function O(e){p(e.id,"Size reset requested by "+("init"===e.type?"host page":"iFrame")),M(e.id),C((function(){R(e),E("reset","reset",e.iframe,e.id)}),e,"reset")}function R(e){function n(n){r||"0"!==e[n]||(r=!0,p(i,"Hidden iFrame detected, creating visibility listener"),function(){function e(){Object.keys(u).forEach((function(e){!function(e){function n(n){return"0px"===(u[e]&&u[e].iframe.style[n])}u[e]&&null!==u[e].iframe.offsetParent&&(n("height")||n("width"))&&E("Visibility change","resize",u[e].iframe,e)}(e)}))}function n(n){p("window","Mutation observed: "+n[0].target+" "+n[0].type),A(e,16)}var t,i=m();i&&(t=document.querySelector("body"),new i(n).observe(t,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0}))}())}function t(t){!function(n){e.id?(e.iframe.style[n]=e[n]+"px",p(e.id,"IFrame ("+i+") "+n+" set to "+e[n]+"px")):p("undefined","messageData id not set")}(t),n(t)}var i=e.iframe.id;u[i]&&(u[i].sizeHeight&&t("height"),u[i].sizeWidth&&t("width"))}function C(e,n,t){t!==n.type&&c&&!window.jasmine?(p(n.id,"Requesting animation frame"),c(e)):e()}function E(e,n,t,i,o){var r,a=!1;u[i=i||t.id]&&(t&&"contentWindow"in t&&null!==t.contentWindow?(p(i,"["+e+"] Sending msg to iframe["+i+"] ("+n+") targetOrigin: "+(r=u[i]&&u[i].targetOrigin)),t.contentWindow.postMessage(s+n,r)):k(i,"["+e+"] IFrame("+i+") not found"),o&&u[i]&&u[i].warningTimeout&&(u[i].msgTimeout=setTimeout((function(){!u[i]||u[i].loaded||a||(a=!0,k(i,"IFrame has not responded within "+u[i].warningTimeout/1e3+" seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."))}),u[i].warningTimeout)))}function N(e){return e+":"+u[e].bodyMarginV1+":"+u[e].sizeWidth+":"+u[e].log+":"+u[e].interval+":"+u[e].enablePublicMethods+":"+u[e].autoResize+":"+u[e].bodyMargin+":"+u[e].heightCalculationMethod+":"+u[e].bodyBackground+":"+u[e].bodyPadding+":"+u[e].tolerance+":"+u[e].inPageLinks+":"+u[e].resizeFrom+":"+u[e].widthCalculationMethod+":"+u[e].mouseEvents}function W(t,r){function s(e){var n=e.split("Callback");if(2===n.length){var t="on"+n[0].charAt(0).toUpperCase()+n[0].slice(1);this[t]=this[e],delete this[e],k(f,"Deprecated: '"+e+"' has been renamed '"+t+"'. The old method will be removed in the next major version.")}}var a,c,f=function(e){if("string"!=typeof e)throw new TypeError("Invaild id for iFrame. Expected String");var n;return""===e&&(t.id=(n=r&&r.id||l.id+i++,null!==document.getElementById(n)&&(n+=i++),e=n),o=(r||{}).log,p(e,"Added missing iframe ID: "+e+" ("+t.src+")")),e}(t.id);f in u&&"iFrameResizer"in t?k(f,"Ignored iFrame, already setup."):(function(e){var n;e=e||{},u[f]=Object.create(null),u[f].iframe=t,u[f].firstRun=!0,u[f].remoteHost=t.src&&t.src.split("/").slice(0,3).join("/"),function(e){if("object"!=typeof e)throw new TypeError("Options is not an object")}(e),Object.keys(e).forEach(s,e),function(e){for(var n in l)Object.prototype.hasOwnProperty.call(l,n)&&(u[f][n]=Object.prototype.hasOwnProperty.call(e,n)?e[n]:l[n])}(e),u[f]&&(u[f].targetOrigin=!0===u[f].checkOrigin?""===(n=u[f].remoteHost)||null!==n.match(/^(about:blank|javascript:|file:\/\/)/)?"*":n:"*")}(r),function(){switch(p(f,"IFrame scrolling "+(u[f]&&u[f].scrolling?"enabled":"disabled")+" for "+f),t.style.overflow=!1===(u[f]&&u[f].scrolling)?"hidden":"auto",u[f]&&u[f].scrolling){case"omit":break;case!0:t.scrolling="yes";break;case!1:t.scrolling="no";break;default:t.scrolling=u[f]?u[f].scrolling:"no"}}(),function(){function e(e){var n=u[f][e];1/0!==n&&0!==n&&(t.style[e]="number"==typeof n?n+"px":n,p(f,"Set "+e+" = "+t.style[e]))}function n(e){if(u[f]["min"+e]>u[f]["max"+e])throw new Error("Value for min"+e+" can not be greater than max"+e)}n("Height"),n("Width"),e("maxHeight"),e("minHeight"),e("maxWidth"),e("minWidth")}(),"number"!=typeof(u[f]&&u[f].bodyMargin)&&"0"!==(u[f]&&u[f].bodyMargin)||(u[f].bodyMarginV1=u[f].bodyMargin,u[f].bodyMargin=u[f].bodyMargin+"px"),a=N(f),(c=m())&&(n=function(e){if(!t.parentNode)return null;var n=new e((function(e){e.forEach((function(e){Array.prototype.slice.call(e.removedNodes).forEach((function(e){e===t&&F(t)}))}))}));return n.observe(t.parentNode,{childList:!0}),n}(c)),w(t,"load",(function(){E("iFrame.onload",a,t,e,!0),(!u[f]||!u[f].firstRun)&&u[f]&&u[f].heightCalculationMethod in d&&O({iframe:t,height:0,width:0,type:"init"})})),E("init",a,t,e,!0),u[f]&&(u[f].iframe.iFrameResizer={close:F.bind(null,u[f].iframe),removeListeners:z.bind(null,u[f].iframe),resize:E.bind(null,"Window resize","resize",u[f].iframe),moveToAnchor:function(e){E("Move to anchor","moveToAnchor:"+e,u[f].iframe,f)},sendMessage:function(e){E("Send Message","message:"+(e=JSON.stringify(e)),u[f].iframe,f)}}))}function A(e,n){null===f&&(f=setTimeout((function(){f=null,e()}),n))}function P(){"hidden"!==document.visibilityState&&(p("document","Trigger event: Visibility change"),A((function(){H("Tab Visible","resize")}),16))}function H(e,n){Object.keys(u).forEach((function(t){(function(e){return u[e]&&"parent"===u[e].resizeFrom&&u[e].autoResize&&!u[e].firstRun})(t)&&E(e,n,u[t].iframe,t)}))}function L(){function n(e,n){n&&(function(){if(!n.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==n.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+n.tagName+">")}(),W(n,e),t.push(n))}var t;return function(){var e,n=["moz","webkit","o","ms"];for(e=0;e<n.length&&!c;e+=1)c=window[n[e]+"RequestAnimationFrame"];c?c=c.bind(window):p("setup","RequestAnimationFrame not supported")}(),w(window,"message",I),w(window,"resize",(function(){p("window","Trigger event: resize"),A((function(){H("Window resize","resize")}),16)})),w(document,"visibilitychange",P),w(document,"-webkit-visibilitychange",P),function(i,o){switch(t=[],function(e){e&&e.enablePublicMethods&&k("enablePublicMethods option has been removed, public methods are now always available in the iFrame")}(i),typeof o){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(o||"iframe"),n.bind(e,i));break;case"object":n(i,o);break;default:throw new TypeError("Unexpected data type ("+typeof o+")")}return t}}}()),v.exports));class x{constructor(e,n){this.iframe=e,this.iframeOrigin=n}postMessage(e,n){const t=Object.assign({eventType:e},n);this.iframe.contentWindow.postMessage(t,this.iframeOrigin)}addMessageListener(e){window.addEventListener("message",e)}removeMessageListener(e){window.removeEventListener("message",e)}postMessageWithResponseListener(e,n){return new Promise((t=>{const i=n=>{n.data.eventType===e&&(window.removeEventListener("message",i),t(n.data.data))};window.addEventListener("message",i),this.postMessage(e,n)}))}}const I=class{constructor(n){e(this,n),this.iframeLoaded=i(this,"iframeLoaded",7),this.isFocused=!1,this.isValid=!0,this.dispatchMessageEvent=e=>{const{eventType:n,data:t}=e.data;(null==t?void 0:t.id)===this.inputId&&("focused"===n&&(this.isFocused=!0),"blurred"===n&&(this.isFocused=!1))}}disconnectedCallback(){this.frameService.removeMessageListener(this.dispatchMessageEvent)}async validate(){const e=await this.frameService.postMessageWithResponseListener("validate");return this.isValid=e.isValid,this.errorText=e.error.message,e}async tokenize(e,n,t){return this.frameService.postMessageWithResponseListener("tokenize",{clientId:e,paymentMethodMetadata:n,account:t,componentVersion:h.version})}initializeFrameCommunicationService(){var e;this.frameService=new x(this.iframeElement,this.iframeOrigin),null===(e=this.frameService)||void 0===e||e.addMessageListener(this.dispatchMessageEvent)}get part(){return this.isFocused&&!this.isValid?s:this.isValid?this.isFocused?c:d:a}get style(){return this.isFocused?this.isValid?w.focused:w.focusedAndInvalid:null}get urlParams(){const e=Object.fromEntries(Object.entries(w.fontStyles).map((([e,n])=>[e,btoa(String(n))])));return new URLSearchParams(e).toString()}render(){return n(t,{key:"e85f5a2417ccc46ac8df23a695c6ef3fcd71577e",class:"form-group d-flex flex-column"},n("div",{key:"02878f7fb1e720aa97a67e72d5f1711e0fbd0668",style:{visibility:this.iframeLoaded?"visible":"hidden",height:this.iframeLoaded?"auto":"0"}},n("label",{key:"57c46b739fb284c4ee618594f04cc5ff128bf16c",class:"form-label",htmlFor:"",part:u},this.label||""),n("div",{key:"4634650c721673a52ea55e331154a624c19266dc",class:"p-0 d-flex form-control "+(this.isValid?"":"is-invalid"),part:this.part,style:Object.assign(Object.assign({},this.style),{overflow:"hidden"})},n("iframe",{key:"facd226e399f41537657603c50c45887c1177c42",id:this.inputId,name:this.inputId,src:`${this.iframeOrigin}?${this.urlParams}`,ref:e=>{this.iframeElement=e,this.initializeFrameCommunicationService()},width:"100%",onLoad:()=>{k({log:!1,onResized:()=>{this.iframeLoaded.emit()}},this.iframeElement)}})),n(l,{key:"73c34b9ab89a21e6b3203904988bf8a542eb01f8",errorText:this.errorText,name:this.inputId})))}get el(){return o(this)}};export{b as hidden_input,I as iframe_input}
1
+ import{r as e,h as n,H as t,c as i,g as o}from"./p-CV0Pyo1O.js";import{c as r}from"./p-D8GTwl9v.js";import{a3 as a,q as s,v as c,w as d,x as u}from"./p-CPKMvyV_.js";import{g as f}from"./p-BFTU3MAI.js";import{F as l}from"./p-Ce_W43gc.js";import{p as h}from"./p-CZa-hHhJ.js";const m=r({focused:{boxShadow:"",border:""},focusedAndInvalid:{boxShadow:"",border:""},fontStyles:{fontFamily:"",fontSize:"",fontWeight:"",lineHeight:"",margin:"",padding:""}}),{state:w,set:g}=m,b=class{constructor(n){e(this,n),this.isFocused=!1,this.errorText=""}focusWithoutPageScroll(e){if(e)try{e.focus({preventScroll:!0})}catch(n){const{scrollX:t,scrollY:i}=window;e.focus(),window.scrollTo(t,i)}}async componentDidLoad(){const e=await this.getBaseFontStyles();g("fontStyles",e);const n=await this.getFocusedStyles();g("focused",n);const t=await this.getFocusedAndInvalidStyles();g("focusedAndInvalid",t)}async getBaseFontStyles(){return new Promise((e=>{setTimeout((()=>{const n=getComputedStyle(this.hiddenInput);e({fontFamily:n.fontFamily,fontSize:n.fontSize,fontWeight:n.fontWeight,lineHeight:n.lineHeight,margin:n.margin,padding:n.padding,color:n.color})}),500)}))}async getFocusedStyles(){return new Promise((e=>{this.focusWithoutPageScroll(this.hiddenInput),setTimeout((()=>{this.hiddenInput.blur();let n=getComputedStyle(this.hiddenInput);e({boxShadow:n.boxShadow,border:n.border})}),500)}))}async getFocusedAndInvalidStyles(){return new Promise((e=>{this.focusWithoutPageScroll(this.hiddenInput),this.errorText="Error",setTimeout((()=>{const n=getComputedStyle(this.hiddenInput),t={boxShadow:n.boxShadow,border:n.border};this.hiddenInput.blur(),e(t)}),500)}))}get part(){return this.isFocused&&this.errorText?a:this.errorText?s:this.isFocused?c:d}render(){return n(t,{key:"d3aa78cd75de1a781c8100c121933122c6db599b"},n("input",{key:"7ac01ecc01ca776cd6928a3a1d1e0b2baa4b8965",ref:e=>this.hiddenInput=e,type:"text",class:this.errorText?"form-control is-invalid":"form-control",onFocus:()=>this.isFocused=!0,onBlur:()=>this.isFocused=!1,part:this.part,tabindex:"-1",style:{height:"0",opacity:"0",pointerEvents:"none",animation:"none"}}))}};var p,y,v={exports:{}},k=f((p||(p=1,y=v,console.info("\nIFRAME-RESIZER\n\nIframe-Resizer 5 is now available via the following two packages:\n\n * @iframe-resizer/parent\n * @iframe-resizer/child\n\nAdditionally their are also new versions of iframe-resizer for React, Vue, and jQuery.\n\nVersion 5 of iframe-resizer has been extensively rewritten to use modern browser APIs, which has enabled significantly better performance and greater accuracy in the detection of content resizing events.\n\nPlease see https://iframe-resizer.com/upgrade for more details.\n"),function(e){if("undefined"!=typeof window){var n,t,i=0,o=!1,r=!1,a="[iFrameSizer]",s=null,c=window.requestAnimationFrame,d=Object.freeze({max:1,scroll:1,bodyScroll:1,documentElementScroll:1}),u={},f=null,l=Object.freeze({autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,license:"1jqr0si6pnt",log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,mouseEvents:!0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClose:function(){return!0},onClosed:function(){},onInit:function(){},onMessage:function(){k("onMessage function not defined")},onMouseEnter:function(){},onMouseLeave:function(){},onResized:function(){},onScroll:function(){return!0}}),h={};window.jQuery!==e&&((t=window.jQuery).fn?t.fn.iFrameResize||(t.fn.iFrameResize=function(e){return this.filter("iframe").each((function(n,t){W(t,e)})).end()}):v("","Unable to bind to jQuery, it is not fully loaded.")),y.exports=L(),window.iFrameResize=window.iFrameResize||L()}function m(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function w(e,n,t){e.addEventListener(n,t,!1)}function g(e,n,t){e.removeEventListener(n,t,!1)}function b(e){return u[e]?u[e].log:o}function p(e,n){x("log",e,n,b(e))}function v(e,n){x("info",e,n,b(e))}function k(e,n){x("warn",e,n,!0)}function x(e,n,t,i){!0===i&&"object"==typeof window.console&&console[e](function(e){return a+"["+function(e){var n="Host page: "+e;return window.top!==window.self&&(n=window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+e:"Nested host page: "+e),n}(e)+"]"}(n),t)}function I(e){function n(){t("Height"),t("Width"),C((function(){R(A),T(P),l("onResized",A)}),A,"init")}function t(e){var n=Number(u[P]["max"+e]),t=Number(u[P]["min"+e]),i=e.toLowerCase(),o=Number(A[i]);p(P,"Checking "+i+" is in range "+t+"-"+n),o<t&&(o=t,p(P,"Set "+i+" to min value")),o>n&&(o=n,p(P,"Set "+i+" to max value")),A[i]=""+o}function i(e){return W.slice(W.indexOf(":")+7+e)}function o(e,n){var t,i;t=function(){var t,i;E("Send Page Info","pageInfo:"+(t=document.body.getBoundingClientRect(),i=A.iframe.getBoundingClientRect(),JSON.stringify({iframeHeight:i.height,iframeWidth:i.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(i.top-t.top,10),offsetLeft:parseInt(i.left-t.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,documentHeight:document.documentElement.clientHeight,documentWidth:document.documentElement.clientWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})),e,n)},h[i=n]||(h[i]=setTimeout((function(){h[i]=null,t()}),32))}function r(e){var n=e.getBoundingClientRect();return M(P),{x:Math.floor(Number(n.left)+Number(s.x)),y:Math.floor(Number(n.top)+Number(s.y))}}function c(e){var n=e?r(A.iframe):{x:0,y:0},t={x:Number(A.width)+n.x,y:Number(A.height)+n.y};p(P,"Reposition requested from iFrame (offset x:"+n.x+" y:"+n.y+")"),window.top===window.self?(s=t,d(),p(P,"--")):window.parentIFrame?window.parentIFrame["scrollTo"+(e?"Offset":"")](t.x,t.y):k(P,"Unable to scroll to requested position, window.parentIFrame not found")}function d(){!1===l("onScroll",s)?j():T(P)}function f(e){var n={};if(0===Number(A.width)&&0===Number(A.height)){var t=i(9).split(":");n={x:t[1],y:t[0]}}else n={x:A.width,y:A.height};l(e,{iframe:A.iframe,screenX:Number(n.x),screenY:Number(n.y),type:A.type})}function l(e,n){return S(P,e,n)}var m,b,y,x,I,z,W=e.data,A={},P=null;"[iFrameResizerChild]Ready"===W?function(){for(var e in u)E("iFrame requested init",N(e),u[e].iframe,e)}():a===(""+W).slice(0,13)&&W.slice(13).split(":")[0]in u?(x=(y=W.slice(13).split(":"))[1]?parseInt(y[1],10):0,I=u[y[0]]&&u[y[0]].iframe,z=getComputedStyle(I),A={iframe:I,id:y[0],height:x+function(e){return"border-box"!==e.boxSizing?0:(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}(z)+function(e){return"border-box"!==e.boxSizing?0:(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}(z),width:y[2],type:y[3]},u[P=A.id]&&(u[P].loaded=!0),(b=A.type in{true:1,false:1,undefined:1})&&p(P,"Ignoring init message from meta parent page"),!b&&function(e){var n=!0;return u[e]||(n=!1,k(A.type+" No settings for "+e+". Message was: "+W)),n}(P)&&(p(P,"Received: "+W),m=!0,null===A.iframe&&(k(P,"IFrame ("+A.id+") not found"),m=!1),m&&function(){var n,t=e.origin,i=u[P]&&u[P].checkOrigin;if(i&&""+t!="null"&&!(i.constructor===Array?function(){var e=0,n=!1;for(p(P,"Checking connection is from allowed list of origins: "+i);e<i.length;e++)if(i[e]===t){n=!0;break}return n}():(p(P,"Checking connection is from: "+(n=u[P]&&u[P].remoteHost)),t===n)))throw new Error("Unexpected message received from: "+t+" for "+A.iframe.id+". Message was: "+e.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return!0}()&&function(){switch(u[P]&&u[P].firstRun&&u[P]&&(u[P].firstRun=!1),A.type){case"close":F(A.iframe);break;case"message":m=i(6),p(P,"onMessage passed: {iframe: "+A.iframe.id+", message: "+m+"}"),l("onMessage",{iframe:A.iframe,message:JSON.parse(m)}),p(P,"--");break;case"mouseenter":f("onMouseEnter");break;case"mouseleave":f("onMouseLeave");break;case"autoResize":u[P].autoResize=JSON.parse(i(9));break;case"scrollTo":c(!1);break;case"scrollToOffset":c(!0);break;case"pageInfo":o(u[P]&&u[P].iframe,P),function(){function e(e,i){function r(){u[t]?o(u[t].iframe,t):n()}["scroll","resize"].forEach((function(n){p(t,e+n+" listener for sendPageInfo"),i(window,n,r)}))}function n(){e("Remove ",g)}var t=P;e("Add ",w),u[t]&&(u[t].stopPageInfo=n)}();break;case"pageInfoStop":u[P]&&u[P].stopPageInfo&&(u[P].stopPageInfo(),delete u[P].stopPageInfo);break;case"inPageLink":t=i(9).split("#")[1]||"",a=decodeURIComponent(t),(h=document.getElementById(a)||document.getElementsByName(a)[0])?(e=r(h),p(P,"Moving to in page link (#"+t+") at x: "+e.x+" y: "+e.y),s={x:e.x,y:e.y},d(),p(P,"--")):window.top===window.self?p(P,"In page link #"+t+" not found"):window.parentIFrame?window.parentIFrame.moveToAnchor(t):p(P,"In page link #"+t+" not found and window.parentIFrame not found");break;case"reset":O(A);break;case"init":n(),l("onInit",A.iframe);break;default:0===Number(A.width)&&0===Number(A.height)?k("Unsupported message received ("+A.type+"), this is likely due to the iframe containing a later version of iframe-resizer than the parent page"):n()}var e,t,a,h,m}())):v(P,"Ignored: "+W)}function S(e,n,t){var i=null,o=null;if(u[e]){if("function"!=typeof(i=u[e][n]))throw new TypeError(n+" on iFrame["+e+"] is not a function");o=i(t)}return o}function z(e){delete u[e.id]}function F(e){var t=e.id;if(!1!==S(t,"onClose",t)){p(t,"Removing iFrame: "+t);try{e.parentNode&&e.parentNode.removeChild(e)}catch(e){k(e)}S(t,"onClosed",t),p(t,"--"),z(e),n&&(n.disconnect(),n=null)}else p(t,"Close iframe cancelled by onClose event")}function M(n){null===s&&p(n,"Get page position: "+(s={x:window.pageXOffset===e?document.documentElement.scrollLeft:window.pageXOffset,y:window.pageYOffset===e?document.documentElement.scrollTop:window.pageYOffset}).x+","+s.y)}function T(e){null!==s&&(window.scrollTo(s.x,s.y),p(e,"Set page position: "+s.x+","+s.y),j())}function j(){s=null}function O(e){p(e.id,"Size reset requested by "+("init"===e.type?"host page":"iFrame")),M(e.id),C((function(){R(e),E("reset","reset",e.iframe,e.id)}),e,"reset")}function R(e){function n(n){r||"0"!==e[n]||(r=!0,p(i,"Hidden iFrame detected, creating visibility listener"),function(){function e(){Object.keys(u).forEach((function(e){!function(e){function n(n){return"0px"===(u[e]&&u[e].iframe.style[n])}u[e]&&null!==u[e].iframe.offsetParent&&(n("height")||n("width"))&&E("Visibility change","resize",u[e].iframe,e)}(e)}))}function n(n){p("window","Mutation observed: "+n[0].target+" "+n[0].type),A(e,16)}var t,i=m();i&&(t=document.querySelector("body"),new i(n).observe(t,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0}))}())}function t(t){!function(n){e.id?(e.iframe.style[n]=e[n]+"px",p(e.id,"IFrame ("+i+") "+n+" set to "+e[n]+"px")):p("undefined","messageData id not set")}(t),n(t)}var i=e.iframe.id;u[i]&&(u[i].sizeHeight&&t("height"),u[i].sizeWidth&&t("width"))}function C(e,n,t){t!==n.type&&c&&!window.jasmine?(p(n.id,"Requesting animation frame"),c(e)):e()}function E(e,n,t,i,o){var r,s=!1;u[i=i||t.id]&&(t&&"contentWindow"in t&&null!==t.contentWindow?(p(i,"["+e+"] Sending msg to iframe["+i+"] ("+n+") targetOrigin: "+(r=u[i]&&u[i].targetOrigin)),t.contentWindow.postMessage(a+n,r)):k(i,"["+e+"] IFrame("+i+") not found"),o&&u[i]&&u[i].warningTimeout&&(u[i].msgTimeout=setTimeout((function(){!u[i]||u[i].loaded||s||(s=!0,k(i,"IFrame has not responded within "+u[i].warningTimeout/1e3+" seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."))}),u[i].warningTimeout)))}function N(e){return e+":"+u[e].bodyMarginV1+":"+u[e].sizeWidth+":"+u[e].log+":"+u[e].interval+":"+u[e].enablePublicMethods+":"+u[e].autoResize+":"+u[e].bodyMargin+":"+u[e].heightCalculationMethod+":"+u[e].bodyBackground+":"+u[e].bodyPadding+":"+u[e].tolerance+":"+u[e].inPageLinks+":"+u[e].resizeFrom+":"+u[e].widthCalculationMethod+":"+u[e].mouseEvents}function W(t,r){function a(e){var n=e.split("Callback");if(2===n.length){var t="on"+n[0].charAt(0).toUpperCase()+n[0].slice(1);this[t]=this[e],delete this[e],k(f,"Deprecated: '"+e+"' has been renamed '"+t+"'. The old method will be removed in the next major version.")}}var s,c,f=function(e){if("string"!=typeof e)throw new TypeError("Invaild id for iFrame. Expected String");var n;return""===e&&(t.id=(n=r&&r.id||l.id+i++,null!==document.getElementById(n)&&(n+=i++),e=n),o=(r||{}).log,p(e,"Added missing iframe ID: "+e+" ("+t.src+")")),e}(t.id);f in u&&"iFrameResizer"in t?k(f,"Ignored iFrame, already setup."):(function(e){var n;e=e||{},u[f]=Object.create(null),u[f].iframe=t,u[f].firstRun=!0,u[f].remoteHost=t.src&&t.src.split("/").slice(0,3).join("/"),function(e){if("object"!=typeof e)throw new TypeError("Options is not an object")}(e),Object.keys(e).forEach(a,e),function(e){for(var n in l)Object.prototype.hasOwnProperty.call(l,n)&&(u[f][n]=Object.prototype.hasOwnProperty.call(e,n)?e[n]:l[n])}(e),u[f]&&(u[f].targetOrigin=!0===u[f].checkOrigin?""===(n=u[f].remoteHost)||null!==n.match(/^(about:blank|javascript:|file:\/\/)/)?"*":n:"*")}(r),function(){switch(p(f,"IFrame scrolling "+(u[f]&&u[f].scrolling?"enabled":"disabled")+" for "+f),t.style.overflow=!1===(u[f]&&u[f].scrolling)?"hidden":"auto",u[f]&&u[f].scrolling){case"omit":break;case!0:t.scrolling="yes";break;case!1:t.scrolling="no";break;default:t.scrolling=u[f]?u[f].scrolling:"no"}}(),function(){function e(e){var n=u[f][e];1/0!==n&&0!==n&&(t.style[e]="number"==typeof n?n+"px":n,p(f,"Set "+e+" = "+t.style[e]))}function n(e){if(u[f]["min"+e]>u[f]["max"+e])throw new Error("Value for min"+e+" can not be greater than max"+e)}n("Height"),n("Width"),e("maxHeight"),e("minHeight"),e("maxWidth"),e("minWidth")}(),"number"!=typeof(u[f]&&u[f].bodyMargin)&&"0"!==(u[f]&&u[f].bodyMargin)||(u[f].bodyMarginV1=u[f].bodyMargin,u[f].bodyMargin=u[f].bodyMargin+"px"),s=N(f),(c=m())&&(n=function(e){if(!t.parentNode)return null;var n=new e((function(e){e.forEach((function(e){Array.prototype.slice.call(e.removedNodes).forEach((function(e){e===t&&F(t)}))}))}));return n.observe(t.parentNode,{childList:!0}),n}(c)),w(t,"load",(function(){E("iFrame.onload",s,t,e,!0),(!u[f]||!u[f].firstRun)&&u[f]&&u[f].heightCalculationMethod in d&&O({iframe:t,height:0,width:0,type:"init"})})),E("init",s,t,e,!0),u[f]&&(u[f].iframe.iFrameResizer={close:F.bind(null,u[f].iframe),removeListeners:z.bind(null,u[f].iframe),resize:E.bind(null,"Window resize","resize",u[f].iframe),moveToAnchor:function(e){E("Move to anchor","moveToAnchor:"+e,u[f].iframe,f)},sendMessage:function(e){E("Send Message","message:"+(e=JSON.stringify(e)),u[f].iframe,f)}}))}function A(e,n){null===f&&(f=setTimeout((function(){f=null,e()}),n))}function P(){"hidden"!==document.visibilityState&&(p("document","Trigger event: Visibility change"),A((function(){H("Tab Visible","resize")}),16))}function H(e,n){Object.keys(u).forEach((function(t){(function(e){return u[e]&&"parent"===u[e].resizeFrom&&u[e].autoResize&&!u[e].firstRun})(t)&&E(e,n,u[t].iframe,t)}))}function L(){function n(e,n){n&&(function(){if(!n.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==n.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+n.tagName+">")}(),W(n,e),t.push(n))}var t;return function(){var e,n=["moz","webkit","o","ms"];for(e=0;e<n.length&&!c;e+=1)c=window[n[e]+"RequestAnimationFrame"];c?c=c.bind(window):p("setup","RequestAnimationFrame not supported")}(),w(window,"message",I),w(window,"resize",(function(){p("window","Trigger event: resize"),A((function(){H("Window resize","resize")}),16)})),w(document,"visibilitychange",P),w(document,"-webkit-visibilitychange",P),function(i,o){switch(t=[],function(e){e&&e.enablePublicMethods&&k("enablePublicMethods option has been removed, public methods are now always available in the iFrame")}(i),typeof o){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(o||"iframe"),n.bind(e,i));break;case"object":n(i,o);break;default:throw new TypeError("Unexpected data type ("+typeof o+")")}return t}}}()),v.exports));class x{constructor(e,n){this.iframe=e,this.iframeOrigin=n}postMessage(e,n){const t=Object.assign({eventType:e},n);this.iframe.contentWindow.postMessage(t,this.iframeOrigin)}addMessageListener(e){window.addEventListener("message",e)}removeMessageListener(e){window.removeEventListener("message",e)}postMessageWithResponseListener(e,n){return new Promise((t=>{const i=n=>{n.data.eventType===e&&(window.removeEventListener("message",i),t(n.data.data))};window.addEventListener("message",i),this.postMessage(e,n)}))}}const I=class{constructor(n){e(this,n),this.iframeLoaded=i(this,"iframeLoaded",7),this.isFocused=!1,this.isValid=!0,this.dispatchMessageEvent=e=>{const{eventType:n,data:t}=e.data;(null==t?void 0:t.id)===this.inputId&&("focused"===n&&(this.isFocused=!0),"blurred"===n&&(this.isFocused=!1))}}disconnectedCallback(){this.frameService.removeMessageListener(this.dispatchMessageEvent)}async validate(){const e=await this.frameService.postMessageWithResponseListener("validate");return this.isValid=e.isValid,this.errorText=e.error.message,e}async tokenize(e,n,t){return this.frameService.postMessageWithResponseListener("tokenize",{clientId:e,paymentMethodMetadata:n,account:t,componentVersion:h.version})}initializeFrameCommunicationService(){var e;this.frameService=new x(this.iframeElement,this.iframeOrigin),null===(e=this.frameService)||void 0===e||e.addMessageListener(this.dispatchMessageEvent)}get part(){return this.isFocused&&!this.isValid?a:this.isValid?this.isFocused?c:d:s}get style(){return this.isFocused?this.isValid?w.focused:w.focusedAndInvalid:null}get urlParams(){const e=Object.fromEntries(Object.entries(w.fontStyles).map((([e,n])=>[e,btoa(String(n))])));return new URLSearchParams(e).toString()}render(){return n(t,{key:"a3039409160cb6fd7dd2e7bf189e241f34ddeca6",class:"form-group d-flex flex-column"},n("div",{key:"dab356c30fedca21f6092cfbaf576e23df36b318",style:{visibility:this.iframeLoaded?"visible":"hidden",height:this.iframeLoaded?"auto":"0"}},n("label",{key:"0469fb973476f92cd5b275b62e4a462521448273",class:"form-label",htmlFor:"",part:u},this.label||""),n("div",{key:"d91253d593d700279c0d869b34d3d4f5d572759a",class:"p-0 d-flex form-control "+(this.isValid?"":"is-invalid"),part:this.part,style:Object.assign(Object.assign({},this.style),{overflow:"hidden"})},n("iframe",{key:"2a3676ad3d25daedccaa0cb2297f505641b47497",id:this.inputId,name:this.inputId,src:`${this.iframeOrigin}?${this.urlParams}`,ref:e=>{this.iframeElement=e,this.initializeFrameCommunicationService()},width:"100%",onLoad:()=>{k({log:!1,onResized:()=>{this.iframeLoaded.emit()}},this.iframeElement)}})),n(l,{key:"e54b9c1a7ef5da3bed2eb62e25a28c91865f1f40",errorText:this.errorText,name:this.inputId})))}get el(){return o(this)}};export{b as hidden_input,I as iframe_input}
@@ -0,0 +1 @@
1
+ import{r as s,h as t}from"./p-CV0Pyo1O.js";import{B as i}from"./p-CHo7TfsM.js";import"./p-CPKMvyV_.js";const r=class{constructor(t){s(this,t),this.variant="primary",this.type="button"}render(){return t(i,{key:"b9c53e47ed16f09a34b2d28c9edc275de6f375c1",variant:this.variant,isLoading:this.isLoading,clickHandler:this.clickHandler,class:this.class,type:this.type,disabled:this.disabled,style:this.customStyle,hidden:this.hidden},this.text)}};export{r as internal_button}
@@ -0,0 +1 @@
1
+ import{r as t,c as s,h as e}from"./p-CV0Pyo1O.js";import{m as i}from"./p-CqPcl9v7.js";import{C as h}from"./p-DZAMzLxa.js";import{C as r,b as o,I as a,c as l,d as n}from"./p-CSgcCWLS.js";import{J as c}from"./p-DbOUuBHs.js";import{c as d}from"./p-DHFQtPCq.js";import"./p-Cg_3KsGO.js";import"./p-CYQvLgSs.js";import"./p-DVJaoI_m.js";import"./p-D8GTwl9v.js";import"./p-BRnBHsdq.js";import"./p-HXpYMWUU.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-CZa-hHhJ.js";const u=class{constructor(e){t(this,e),this.checkoutCompleted=s(this,"checkout-completed",7),this.checkoutExpired=s(this,"checkout-expired",7),this.errorEvent=s(this,"error-event",7),this.pollIntervalMs=3e3,this.pollTimeoutMs=6e5,this.terminalState="loading",this.paymentStatus="",this.errorMessage="",this.pollIntervalHandle=null,this.pollTimeoutHandle=null,this.failedDismissHandle=null,this.seenCompletionCreatedAts=new Set,this.inFlight=!1}componentWillLoad(){d(),this.analytics=new c(this),this.initialize()}disconnectedCallback(){var t;this.stopAll(),null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.stopAll(),this.initialize()}suppressInnerErrors(t){t.stopPropagation()}get effectivePollInterval(){return Math.max(1e3,this.pollIntervalMs)}initialize(){this.authToken&&this.checkoutId?(this.terminalState="loading",this.getCheckout=i({authToken:this.authToken,checkoutId:this.checkoutId,service:new h}),this.getCheckout({onSuccess:({checkout:t})=>this.handleInitialLoad(t),onError:({error:t,code:s,severity:e})=>{this.terminalState="error",this.errorMessage=t,this.errorEvent.emit({message:t,errorCode:s,severity:e})}})):this.errorEvent.emit({message:"authToken and checkoutId are required",errorCode:o.MISSING_PROPS,severity:r.ERROR})}handleInitialLoad(t){var s;switch(t.status){case a.expired:this.terminalState="expired",this.checkoutExpired.emit({checkoutId:this.checkoutId}),this.errorEvent.emit({message:l.CHECKOUT_EXPIRED,errorCode:o.CHECKOUT_EXPIRED,severity:r.ERROR});break;case a.completed:this.terminalState="completed",this.paymentStatus=this.resolvePaymentStatus(t),this.checkoutCompleted.emit({checkoutId:this.checkoutId,paymentStatus:this.paymentStatus});break;default:(null!==(s=t.completions)&&void 0!==s?s:[]).forEach((t=>this.seenCompletionCreatedAts.add(t.created_at))),this.terminalState="ready",this.startPolling()}}startPolling(){this.pollTimeoutHandle=setTimeout((()=>{this.stopAll(),this.terminalState="error",this.errorMessage="Checkout polling timed out",this.errorEvent.emit({message:"Checkout polling timed out",errorCode:o.FETCH_ERROR,severity:r.ERROR})}),this.pollTimeoutMs),this.pollIntervalHandle=setInterval((()=>this.tick()),this.effectivePollInterval)}tick(){this.inFlight||(this.inFlight=!0,this.getCheckout({onSuccess:({checkout:t})=>{this.inFlight=!1,this.handlePollResult(t)},onError:({error:t,code:s,severity:e})=>{this.inFlight=!1,this.stopAll(),this.terminalState="error",this.errorMessage=t,this.errorEvent.emit({message:t,errorCode:s,severity:e})}}))}handlePollResult(t){var s;const e=(null!==(s=t.completions)&&void 0!==s?s:[]).filter((t=>!this.seenCompletionCreatedAts.has(t.created_at)&&"failed"===t.payment_status));if(e.forEach((t=>this.seenCompletionCreatedAts.add(t.created_at))),e.length>0&&(this.terminalState="payment-failed",this.failedDismissHandle&&clearTimeout(this.failedDismissHandle),this.failedDismissHandle=setTimeout((()=>{"payment-failed"===this.terminalState&&(this.terminalState="ready")}),3e3)),t.status===a.completed)return this.stopAll(),this.terminalState="completed",this.paymentStatus=this.resolvePaymentStatus(t),void this.checkoutCompleted.emit({checkoutId:this.checkoutId,paymentStatus:this.paymentStatus});t.status===a.expired&&(this.stopAll(),this.terminalState="expired",this.checkoutExpired.emit({checkoutId:this.checkoutId}),this.errorEvent.emit({message:l.CHECKOUT_EXPIRED,errorCode:o.CHECKOUT_EXPIRED,severity:r.ERROR}))}resolvePaymentStatus(t){var s,e;const i=null===(e=[...null!==(s=t.completions)&&void 0!==s?s:[]].sort(((t,s)=>new Date(s.updated_at).getTime()-new Date(t.updated_at).getTime()))[0])||void 0===e?void 0:e.payment_status;return i===n.succeeded||null==i&&t.successful_payment_id?"succeeded":"pending"}stopAll(){this.pollIntervalHandle&&(clearInterval(this.pollIntervalHandle),this.pollIntervalHandle=null),this.pollTimeoutHandle&&(clearTimeout(this.pollTimeoutHandle),this.pollTimeoutHandle=null),this.failedDismissHandle&&(clearTimeout(this.failedDismissHandle),this.failedDismissHandle=null),this.inFlight=!1}render(){return this.authToken&&this.checkoutId?e("div",null,"loading"===this.terminalState&&null,("ready"===this.terminalState||"payment-failed"===this.terminalState)&&e("div",null,e("justifi-checkout-qr-code",{checkoutId:this.checkoutId}),"payment-failed"===this.terminalState&&e("p",null,"Payment failed. Please try again."),"ready"===this.terminalState&&e("p",null,"Scan to pay")),"completed"===this.terminalState&&e("div",null,e("p",null,"succeeded"===this.paymentStatus?"Payment received":"Payment pending")),"expired"===this.terminalState&&e("p",null,"Checkout expired. Please create a new checkout."),"error"===this.terminalState&&e("p",null,this.errorMessage)):null}static get watchers(){return{authToken:["propChanged"],checkoutId:["propChanged"]}}};export{u as justifi_qr_terminal}
@@ -0,0 +1 @@
1
+ import{r,h as e}from"./p-CV0Pyo1O.js";import{S as i}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";const l=class{constructor(e){r(this,e)}async getValues(){var r,e;return null!==(e=null===(r=this.billingFormFullRef)||void 0===r?void 0:r.getValues())&&void 0!==e?e:{}}async validate(){var r,e;return null!==(e=null===(r=this.billingFormFullRef)||void 0===r?void 0:r.validate())&&void 0!==e?e:{isValid:!1,errors:{}}}render(){return e(i,{key:"8e755ce1e9ea3984b7abacc8375aee22f1288c52"},e("billing-form-full",{key:"a18f794807f7631db8eb3724ae5072766aa708f4",legend:this.legend,ref:r=>this.billingFormFullRef=r}))}};export{l as justifi_billing_form_full}
@@ -0,0 +1 @@
1
+ import{h as t,r as s,c as e}from"./p-CV0Pyo1O.js";import{a as r,c as i,F as n}from"./p-DwoT0UoX.js";import{f as o}from"./p-BRnBHsdq.js";import"./p-DVJaoI_m.js";import{R as a,C as u,b as h,q as c}from"./p-CSgcCWLS.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import{B as l}from"./p-CHo7TfsM.js";import{S as m}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{P as d}from"./p-DMqJWUK2.js";import{m as p}from"./p-CvgL8YaH.js";import{J as f}from"./p-DbOUuBHs.js";import{c as v}from"./p-DHFQtPCq.js";import{g as y,a as j}from"./p-Cg_3KsGO.js";import{A as b}from"./p-CYQvLgSs.js";import{S as w}from"./p-uZ5KAseb.js";import"./p-BFTU3MAI.js";import"./p-HXpYMWUU.js";import"./p-D8GTwl9v.js";import"./p-CPKMvyV_.js";import"./p-CZa-hHhJ.js";const C=t=>{const s=+t;return i().required("Amount is required").test("max-amount",`Refund amount cannot be more than payment amount: ${o(s)}`,(function(t){return+t<=+s})).test("min-amount","Refund amount must be greater than 0",(function(t){return+t>0}))},g=t=>{if(t)return r({amount:C(t),description:i().optional(),reason:i().optional().oneOf([a.customerRequest,a.duplicate,a.fraudulent],"Select a reason")})},T=[{label:"Select a reason",value:""},{label:"Customer requested a refund",value:"customer_request"},{label:"Customer was double-charged",value:"duplicate"},{label:"Payment was reported as fraud",value:"fraudulent"}],S=b();class I{async postRefund(t,s,e,r){return S.post({endpoint:`payments/${t}/refunds`,headers:{"Sub-Account":s},body:r,authToken:e})}}const A=b();class H{async postVoid(t,s,e){return A.post({endpoint:`payments/${t}/void`,headers:{"Sub-Account":s},authToken:e})}}const P=()=>t("div",{class:"row gap-3"},t("div",{class:"col-12"},t(w,{width:"100%",height:"40px"}))),k=()=>t(m,null,t("div",{class:"row gap-5"},t(P,null),t(P,null),t(P,null))),q=class{constructor(t){s(this,t),this.errorEvent=e(this,"error-event",7),this.submitEvent=e(this,"submit-event",7),this.refundPayload={},this.displayAmount="",this.errors={},this.paymentLoading=!0,this.refundLoading=!1,this.hideSubmitButton=!1,this.inputHandler=(t,s)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:s}))}}componentWillLoad(){v(),this.analytics=new f(this),this.initializeApi(),this.formController=new n(g())}handleError(t,s,e){this.errorEvent.emit({errorCode:t,message:s,severity:e})}checkAmount(t){return t>0}handleInvalidAmount(){this.submitDisabled=!0,this.handleError(h.INVALID_REFUND_AMOUNT,"Refund amount must be greater than 0",u.ERROR)}isPaymentCreatedWithin25Minutes(){var t;if(!this.payment||!(null===(t=this.payment)||void 0===t?void 0:t.created_at))return!1;const s=new Date(this.payment.created_at);return((new Date).getTime()-s.getTime())/6e4<=25}initializeFormController(){const t=this.refundPayload.amount,s=t?t.toString():"0";this.formController=new n(g(s)),this.formController.setInitialValues({amount:s}),this.formController.values.subscribe((t=>{this.refundPayload=Object.assign({},t)})),this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}initializeApi(){this.paymentId&&this.authToken?p({id:this.paymentId,authToken:this.authToken,service:new d})({onSuccess:({payment:t})=>{this.payment=t,this.refundPayload=new c({amount:t.amount_refundable})},onError:({error:t,code:s,severity:e})=>{this.handleError(s,t,e)},final:()=>{this.checkAmount(this.refundPayload.amount)?this.initializeFormController():this.handleInvalidAmount(),this.paymentLoading=!1}}):this.handleError(h.MISSING_PROPS,"Payment ID and Auth Token are required",u.ERROR)}async refundPayment(t){if(t&&t.preventDefault(),!await this.formController.validate())return;const s=this.formController.values.getValue();return this.refundLoading=!0,this.isPaymentCreatedWithin25Minutes()?this.tryVoidPayment():this.processRefund(s)}async tryVoidPayment(){const t=(({authToken:t,accountId:s,paymentId:e,service:r})=>async({onSuccess:i,onError:n,final:o})=>{var a;try{const o=await r.postVoid(e,s,t);if(o.error)return n({error:j(o.error),code:y(null===(a=o.error)||void 0===a?void 0:a.code),severity:u.ERROR});i(o)}catch(t){const s=y(null==t?void 0:t.code);return n({error:t.message||t,code:s,severity:u.ERROR})}finally{return o()}})({authToken:this.authToken,accountId:this.accountId,paymentId:this.paymentId,service:new H});return new Promise((s=>{let e,r=!1;const i=this.formController.values.getValue();t({onSuccess:t=>{e=t,r=!0},onError:({error:t,code:e,severity:n})=>{r=!0,this.handleError(t,e,n),this.processRefund(i).then(s)},final:()=>{e&&!e.error&&r&&(this.submitEvent.emit({response:e}),this.submitDisabled=!0,this.refundLoading=!1,s(e.data))}})}))}async processRefund(t){const s=(({authToken:t,accountId:s,paymentId:e,service:r})=>async({refundBody:i,onSuccess:n,onError:o,final:a})=>{var h;try{const a=await r.postRefund(e,s,t,i);if(a.error)return o({error:j(a.error),code:y(null===(h=a.error)||void 0===h?void 0:h.code),severity:u.ERROR});n(a)}catch(t){const s=y(null==t?void 0:t.code);return o({error:t.message||t,code:s,severity:u.ERROR})}finally{return a()}})({authToken:this.authToken,accountId:this.accountId,paymentId:this.paymentId,service:new I});return new Promise((e=>{let r;s({refundBody:t,onSuccess:t=>{r=t},onError:({error:t,code:s,severity:e})=>{r=t,this.handleError(t,s,e)},final:()=>{this.submitEvent.emit({response:r}),this.submitDisabled=!0,this.refundLoading=!1,e(r.data)}})}))}render(){if(this.paymentLoading)return t(k,null);const s=this.formController.getInitialValues(),e=this.refundPayload.amount;return t(m,null,t("form",null,t("fieldset",null,t("div",{class:"row gy-3"},t("div",{class:"col-12"},t("form-control-monetary",{name:"amount",label:"Refund Amount",defaultValue:s.amount,inputHandler:this.inputHandler,errorText:this.errors.amount})),t("div",{class:"col-12"},t("form-control-select",{name:"reason",label:"Reason for refund (optional)",defaultValue:s.reason,inputHandler:this.inputHandler,options:T,errorText:this.errors.reason})),t("div",{class:"col-12"},t("form-control-textarea",{name:"description",label:"Note (optional)",defaultValue:s.description,inputHandler:this.inputHandler,maxLength:250,errorText:this.errors.description})),t("div",{class:"form-group d-flex flex-row-reverse"},t(l,{variant:"primary",type:"submit",onClick:this.refundPayment.bind(this),isLoading:this.paymentLoading||this.refundLoading,hidden:this.hideSubmitButton,disabled:this.submitDisabled},`Refund ${o(+e)}`))))))}};export{q as justifi_refund_payment}
@@ -0,0 +1 @@
1
+ import{h as s,r as t,c as i}from"./p-CV0Pyo1O.js";import{J as e}from"./p-DbOUuBHs.js";import{C as r,b as o}from"./p-CSgcCWLS.js";import{m as n,b as h}from"./p-eCeOsPHx.js";import{B as a}from"./p-eK8hZOMg.js";import{A as p}from"./p-CYQvLgSs.js";import"./p-CLHwhyvu.js";import{C as m,B as l,c as d}from"./p-BcNb9bVO.js";import{c}from"./p-DHFQtPCq.js";import{i as u}from"./p-BRnBHsdq.js";import{t as v}from"./p-CPKMvyV_.js";import{S as g}from"./p-BqNNwq6C.js";import{H as f}from"./p-jIDKmNHy.js";import"./p-CZfYo5-1.js";import{B as y}from"./p-XYgDHrVL.js";import{P as C}from"./p-DSclFZ32.js";import"./p-CZa-hHhJ.js";import"./p-Cg_3KsGO.js";import"./p-DVJaoI_m.js";import"./p-D8GTwl9v.js";import"./p-HXpYMWUU.js";import"./p-uZ5KAseb.js";const b=p();class j{async postProvisioning(s,t,i){return b.post({endpoint:"entities/provisioning",body:{business_id:t,product_category:i},authToken:s})}}const w=()=>s("div",{class:"row gap-3 p-5"},s("div",{class:"col-12"},s(f,{text:"Business Already Provisioned"})),s("div",{class:"col-12",part:v},s("p",null,"We have already received the onboarding information for this business."))),S=()=>s("div",{class:"row gap-3 p5"},s("div",{class:"col-12"},s(f,{text:"You're all set for now"})),s("div",{class:"col-12",part:v},s("p",null,"We're reviewing your information and working on your approval. We'll be in touch to let you know once you've been approved (or if we find anything that needs fixing). Have a good one!"))),k=class{constructor(s){t(this,s),this.clickEvent=i(this,"click-event",7),this.errorEvent=i(this,"error-event",7),this.submitEvent=i(this,"submit-event",7),this.loading=!1,this.businessLoading=!0,this.businessProvisioned=!1,this.formSubmitted=!1,this.currentStep=0,this.country=m.USA,this.allowOptionalFields=!1,this.formTitle="Business Information",this.refs=[],this.setBusinessProvisioned=()=>new Promise((s=>{this.getBusiness({onSuccess:t=>{const i=new l(t.data);this.businessProvisioned=d(i),this.country=i.country_of_establishment,this.businessProvisioned&&this.errorEvent.emit({message:"A request to provision payments for this business has already been submitted.",errorCode:o.PROVISIONING_REQUESTED,severity:r.INFO}),this.businessLoading=!1,s()},onError:({error:t,code:i,severity:e})=>{this.errorEvent.emit({message:t,errorCode:i,severity:e}),this.businessLoading=!1,s()}})})),this.postProvisioningData=()=>{this.postProvisioning({onSuccess:s=>{this.formSubmitted=!0,this.submitEvent.emit({response:s})},onError:({error:s,code:t,severity:i})=>{this.submitEvent.emit({response:{error:s}}),this.errorEvent.emit({message:s,errorCode:t,severity:i})}})},this.incrementSteps=()=>{if(this.currentStep<this.totalSteps)return this.currentStep++},this.decrementSteps=()=>{this.currentStep>0&&(this.currentStep-=1)},this.previousStepButtonOnClick=()=>{this.clickEvent.emit({name:y.previousStep}),this.decrementSteps()},this.nextStepButtonOnClick=(s,t)=>{s.preventDefault(),this.clickEvent.emit({name:t}),this.refs[this.currentStep].validateAndSubmit({onSuccess:this.incrementSteps})}}propChanged(){this.initializeApi()}handleFormCompleted(){this.postProvisioningData()}handleFormLoading(s){this.loading=s.detail}async componentWillLoad(){c(),this.analytics=new e(this),this.initializeApi(),this.getBusiness?await this.setBusinessProvisioned():this.businessLoading=!1,this.refs=new Array(7)}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}initializeApi(){this.authToken&&this.businessId?u(this.authToken)?this.errorEvent.emit({message:"auth-token is expired",errorCode:o.NOT_AUTHENTICATED,severity:r.ERROR}):(this.getBusiness=n({authToken:this.authToken,businessId:this.businessId,service:new a}),this.postProvisioning=h({authToken:this.authToken,businessId:this.businessId,product:"payment",service:new j})):this.errorEvent.emit({message:"auth-token and business-id are required",errorCode:o.MISSING_PROPS,severity:r.ERROR})}get formDisabled(){return this.loading||this.businessProvisioned}get totalSteps(){return this.refs.length-1}get stepCounter(){return`Step ${this.currentStep+1} of ${this.totalSteps+1}`}render(){return s(g,null,this.businessLoading?s(C,null):this.businessProvisioned?s(w,null):this.formSubmitted?s(S,null):s("div",{class:"row gap-3"},s(f,{text:this.formTitle}),s("payment-provisioning-form-steps",{businessId:this.businessId,authToken:this.authToken,refs:this.refs,currentStep:this.currentStep,allowOptionalFields:this.allowOptionalFields,country:this.country,handleFormLoading:this.handleFormLoading}),s("div",{class:"d-flex justify-content-between align-items-center"},s("div",{class:"d-flex align-items-center",part:v},this.stepCounter),s("payment-provisioning-form-buttons",{currentStep:this.currentStep,totalSteps:this.totalSteps,formLoading:this.loading,formDisabled:this.formDisabled,previousStepButtonOnClick:this.previousStepButtonOnClick,nextStepButtonOnClick:this.nextStepButtonOnClick}))))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}};export{k as justifi_payment_provisioning}
@@ -0,0 +1 @@
1
+ import{r as t,c as s,h as e,H as a}from"./p-CV0Pyo1O.js";import{q as i,u as o,v as r,w as h,x as c,y as d}from"./p-CPKMvyV_.js";import{F as n}from"./p-B5gBiARs.js";import{F as f}from"./p-Ce_W43gc.js";import"./p-CZfYo5-1.js";import{f as l}from"./p-BRnBHsdq.js";import"./p-HXpYMWUU.js";const p=class{constructor(e){t(this,e),this.formControlInput=s(this,"formControlInput",7),this.formControlBlur=s(this,"formControlBlur",7),this.isFocused=!1,this.defaultValue="0",this.formatRawValue=t=>t.replace(/\D/g,""),this.formatDisplayValue=t=>l(+t,void 0,!0),this.updateInput=t=>{const s=this.formControl.name,e=this.formatRawValue(t);this.formControl.value=this.formatDisplayValue(e),this.inputHandler(s,e),this.formControlInput.emit({name:s,value:e})}}handleDefaultValueChange(t){this.updateInput(t)}componentDidLoad(){this.updateInput(this.defaultValue)}get inputPart(){return this.errorText?i:this.disabled?o:this.isFocused?r:h}render(){return e(a,{key:"c91bf2d63e4cd717dfc472f5b16dac9c3e9fdd69"},e("div",{key:"8f1eaae0f9dfbcc97adf788a5b955824dc68dbd2",class:"form-group d-flex flex-column"},e("label",{key:"1965936a9e14612fdb8aec07e0def943e1e1344a",part:c,class:"form-label",htmlFor:this.name},this.label),e(n,{key:"dd517aee7a39c71c1fe98b6c53a4528c9d3826d5",name:this.name,helpText:this.helpText}),e("div",{key:"bb62ed9e6c9db38f39581d7f86483a242330c295",class:"input-group"},e("span",{key:"5a358beea95c1eed695b8ca5e5f9a7a82b0864b1",class:"input-group-text",part:d},"$"),e("input",{key:"5c37a1edb6a229634536c2c7ad4cb4c2cfff211b",ref:t=>this.formControl=t,id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:t=>this.updateInput(t.target.value),onKeyDown:this.keyDownHandler,onPaste:this.keyDownHandler,maxLength:this.maxLength,part:this.inputPart,class:this.errorText?"form-control is-invalid":"form-control",type:"text",disabled:this.disabled})),e(f,{key:"5cb05fe585766d5f037c33d86485a6002894c781",errorText:this.errorText,name:this.name})))}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}};export{p as form_control_monetary}
@@ -1 +1 @@
1
- import{r as e,h as t,H as a}from"./p-CV0Pyo1O.js";import{b as s,r as i,s as d,c as l}from"./p-Bt4GjEWL.js";import{C as c,I as o,P as r}from"./p-CVaOFfrI.js";import{b as n,x as b,u as f,a0 as u,ak as h}from"./p-DnrawQn3.js";import{e as m,d as v}from"./p-BcNb9bVO.js";import{c as p}from"./p-_-2E_vYf.js";const y=class{constructor(t){e(this,t),this.errors={},this.additional_questions={},this.inputHandler=this.inputHandler.bind(this)}componentDidLoad(){this.formController.errors.subscribe((e=>this.errors=Object.assign({},e))),this.formController.values.subscribe((e=>this.additional_questions=Object.assign({},e.additional_questions)))}inputHandler(e,t){this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{additional_questions:Object.assign(Object.assign({},this.formController.values.getValue().additional_questions),{[e]:t})}))}render(){var e,l,o,r,b,f,u,h,m,v,p,y,k,j;const x=this.formController.getInitialValues().additional_questions;return t(a,{key:"05b69febfcd1e3901109c2cf64d812ff766b81cc"},t("fieldset",{key:"84f06779dff94622fc7d14fdca53efb84f11e8cd"},t("legend",{key:"3079e5d172c833d8172660f2f66b4d9637bfdb21",part:n},"Additional Questions"),t("div",{key:"cf5155033143279316822237a84a0ad5e292a6cd",class:"row gy-3"},t("div",{key:"e28450dacb0d7040d62a4820c0252d95792d7e87",class:"col-12 col-md-6"},t("form-control-monetary-provisioning",{key:"e2ac8f211ffd9848fab123bc7826fd9f18e109a8",name:"business_revenue",label:"What is the business' estimated annual revenue from its primary business activities?",inputHandler:this.inputHandler,errorText:null===(l=null===(e=this.errors)||void 0===e?void 0:e.additional_questions)||void 0===l?void 0:l.business_revenue,defaultValue:null==x?void 0:x.business_revenue,maskOptions:c.WHOLE})),t("div",{key:"c5de85cd5e7b1501a0667a49d8d4826971e93052",class:"col-12 col-md-6"},t("form-control-monetary-provisioning",{key:"3da3805e4ddbc633f060d36487b46e76e4f6eb04",name:"business_payment_volume",label:"What is the business' annual credit card & ACH volume anticipated to process?",inputHandler:this.inputHandler,errorText:null===(r=null===(o=this.errors)||void 0===o?void 0:o.additional_questions)||void 0===r?void 0:r.business_payment_volume,defaultValue:null==x?void 0:x.business_payment_volume,maskOptions:c.WHOLE})),t("div",{key:"ad62fecba837464fddba48273635bc8ae3a7d7ed",class:"col-12"},t("form-control-select",{key:"9f09093b45c1c8eeb63065402f4b15e31c166d51",name:"business_when_service_received",label:"On average, how long after paying will your customers typically receive their goods or services?",inputHandler:this.inputHandler,errorText:null===(f=null===(b=this.errors)||void 0===b?void 0:b.additional_questions)||void 0===f?void 0:f.business_when_service_received,options:s,defaultValue:null==x?void 0:x.business_when_service_received})),t("div",{key:"e2a05cbb74138a554033817e3bb1372933e64b99",class:"col-12"},t("form-control-select",{key:"8a95d74c02f2cf662f6cf0658faeae1a1a8f6a11",name:"business_recurring_payments",label:"Does your business offer recurring payments?",inputHandler:this.inputHandler,errorText:null===(h=null===(u=this.errors)||void 0===u?void 0:u.additional_questions)||void 0===h?void 0:h.business_recurring_payments,options:i,defaultValue:null==x?void 0:x.business_recurring_payments})),t("div",{key:"8d94059b0966237c980b1c1622e1ed3fd5bd8a58",class:"col-12"},t("form-control-text",{key:"320fa784aef300393ddfcca4f2ef4798d207bf30",name:"business_recurring_payments_percentage",label:"What percent of revenue is generated from each recurring payment type offered?",inputHandler:this.inputHandler,errorText:null===(v=null===(m=this.errors)||void 0===m?void 0:m.additional_questions)||void 0===v?void 0:v.business_recurring_payments_percentage,defaultValue:null==x?void 0:x.business_recurring_payments_percentage})),t("div",{key:"8525c21ec91e652737455e7b093ff280800d97c2",class:"col-12"},t("form-control-select",{key:"c2cba23606b03f758ba704c074a65a212e111998",name:"business_seasonal",label:"Is this business seasonal?",inputHandler:this.inputHandler,errorText:null===(y=null===(p=this.errors)||void 0===p?void 0:p.additional_questions)||void 0===y?void 0:y.business_seasonal,options:d,defaultValue:null==x?void 0:x.business_seasonal})),t("div",{key:"c047c43284fbe92952c487544bc8206c98433edc",class:"col-12"},t("form-control-text",{key:"27348b1899f8b8f7f18a0618aa4dcb812a3bef04",name:"business_other_payment_details",label:"Is there anything else you would like us to know about how your customers pay the business?",inputHandler:this.inputHandler,errorText:null===(j=null===(k=this.errors)||void 0===k?void 0:k.additional_questions)||void 0===j?void 0:j.business_other_payment_details,defaultValue:null==x?void 0:x.business_other_payment_details})))))}},k=class{constructor(t){e(this,t),this.errors={},this.coreInfo={},this.isEditingTaxId=!1,this.inputHandler=this.inputHandler.bind(this)}componentDidLoad(){this.formController.values.subscribe((e=>this.coreInfo=Object.assign({},new m(e)))),this.formController.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}inputHandler(e,t){this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[e]:t}))}render(){var e,s;const i=this.formController.getInitialValues();return t(a,{key:"9c73706505c1fa0a56d7eb68fc1c4c0a6fffd1dc"},t("fieldset",{key:"d30bae9bab7ffd0e385ce276e7797cfd606e5a42"},t("legend",{key:"5792db95cbbc080f3c990b4b9cea84484f374ec3",part:n},"General Info"),t("div",{key:"ae7fa3c788d625d60cfc83b270312946dce97f0b",class:"row gy-3"},t("div",{key:"f7e5ab1ec57a8ce8de5ef8591ecad8b2fbd2f030",class:"col-12"},t("form-control-text",{key:"fa96501ceca053263029489a74bddd31222b1462",name:"legal_name",label:"Legal Name",defaultValue:i.legal_name,errorText:this.errors.legal_name,inputHandler:this.inputHandler})),t("div",{key:"21e14d0c13017376d7e74e84169f30fe05fa13af",class:"col-12"},t("form-control-text",{key:"266187ec2209299a4b0ebc4c7d600c670de3b21f",name:"doing_business_as",label:"Doing Business As (DBA)",defaultValue:i.doing_business_as,errorText:this.errors.doing_business_as,inputHandler:this.inputHandler})),t("div",{key:"d9bbb19b4ec15a18a0467444e964512114e74031",class:"col-12 col-md-8"},t("form-control-select",{key:"fe490b4abb4a1e07392db9ad4e4c15b02d928f4c",name:"classification",label:"Business Classification",options:l,defaultValue:i.classification,errorText:this.errors.classification,inputHandler:this.inputHandler})),t("div",{key:"fc5dafdace199fd34d22f22d629d87fc8ff7cc3e",class:"col-12 col-md-4"},t("form-control-date",{key:"0263cdef27d1b36c22bde16dbdb3777ad9ef62e3",name:"date_of_incorporation",label:"Date of Incorporation",defaultValue:i.date_of_incorporation,errorText:this.errors.date_of_incorporation,inputHandler:this.inputHandler})),t("div",{key:"2ae2b710d615e5314d4b836b9a498fc9140b749a",class:"col-12 col-md-6"},t("form-control-text",{key:"f6e738254ff7ead5680b895b6df77dc58efbc393",name:"industry",label:"Industry",defaultValue:i.industry,errorText:this.errors.industry,inputHandler:this.inputHandler})),t("div",{key:"8a01de0514d495b103aa43070d268070f57af62a",class:"col-12 col-md-6"},!(null===(e=this.coreInfo)||void 0===e?void 0:e.tax_id_last4)||this.isEditingTaxId?t("form-control-number-masked",{name:"tax_id",label:p[this.country].taxIdLabel,defaultValue:this.isEditingTaxId?"":i.tax_id,errorText:this.errors.tax_id,inputHandler:this.inputHandler,mask:o[this.country],helpText:p[this.country].taxIdHelpText}):t("div",null,t("label",{class:"form-label",part:b},p[this.country].taxIdLabel),t("div",{class:"input-group mb-3"},t("input",{type:"text",class:"form-control",part:f,value:`****${null===(s=this.coreInfo)||void 0===s?void 0:s.tax_id_last4}`,disabled:!0}),t("button",{class:"btn btn-secondary",type:"button",part:u,onClick:()=>{this.isEditingTaxId=!0,this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{tax_id:""}))}},"Change")))),t("div",{key:"66292d95dd8ead1367c1eef3a96aa1fb9e707810",class:"col-12"},t("form-control-text",{key:"de144c99e186470c37d0d330c8aa480fb00ef037",name:"website_url",label:"Website URL",defaultValue:i.website_url,errorText:this.errors.website_url,inputHandler:this.inputHandler})),t("div",{key:"c43095be28c660a2312c37c6856abeae7f952299",class:"col-12 col-md-6"},t("form-control-text",{key:"e4afa2d37cd5dc26006b116c7d574e1c7dd4a0ef",name:"email",label:"Email Address",defaultValue:i.email,errorText:this.errors.email,inputHandler:this.inputHandler})),t("div",{key:"a68760b724c42da71a93ab7944152a8137d51cc8",class:"col-12 col-md-6"},t("form-control-number-masked",{key:"6532f13f43391e8752f625296fb3685d7d68e084",name:"phone",label:"Phone Number",defaultValue:i.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:r.US})))))}},j=class{constructor(t){e(this,t),this.errors={},this.representative={},this.isEditingIdentification=!1,this.inputHandler=(e,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{representative:Object.assign(Object.assign({},this.formController.values.getValue().representative),{[e]:t})}))},this.onAddressFormUpdate=e=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{representative:Object.assign(Object.assign({},this.formController.values.getValue().representative),{address:Object.assign(Object.assign({},this.formController.values.getValue().representative.address),e)})}))},this.onDateOfBirthUpdate=e=>{const t=v(e.detail);this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{representative:Object.assign(Object.assign({},this.formController.values.getValue().representative),{dob_day:t.dob_day,dob_month:t.dob_month,dob_year:t.dob_year})}))}}get identificationNumberLabel(){var e;return(null===(e=this.representative)||void 0===e?void 0:e.ssn_last4)?p[this.country].idNumberLabelOptional:p[this.country].idNumberLabel}componentDidLoad(){this.formController.errors.subscribe((e=>this.errors=Object.assign({},e.representative))),this.formController.values.subscribe((e=>this.representative=Object.assign({},e.representative)))}render(){var e,s;const i=this.formController.getInitialValues().representative;return t(a,{key:"c12be1414101467b72170c101cb3d7792f0fafe0"},t("fieldset",{key:"821c9982121243de546bfe95094402379e704659"},t("legend",{key:"48d43758a4d62dcd977eeb9703bae8ac153b9bf4",part:n},"Representative"),t("div",{key:"458edb00ebc0817623cd0fe70b8221c178cac168",class:"row gy-3"},t("div",{key:"5d6b3fc92d7c6fb6bf729881bf26198ea796cbfa",class:"col-12 col-md-8"},t("form-control-text",{key:"73eb60a383a45664050dd53bbc8b22b1e54ec22f",name:"name",label:"Full Name",defaultValue:null==i?void 0:i.name,errorText:this.errors.name,inputHandler:this.inputHandler})),t("div",{key:"fa4b8c69dc03d7ffeecf98badd5cda52edc370e5",class:"col-12 col-md-4"},t("form-control-text",{key:"3cc743bd85400c30741b6c05c3c098badce49a58",name:"title",label:"Title",defaultValue:null==i?void 0:i.title,errorText:this.errors.title,inputHandler:this.inputHandler})),t("div",{key:"83daa42529e73c5b946830dded92d0d48c95b251",class:"col-12 col-md-6"},t("form-control-text",{key:"046a7537d6a2c5ab90d0069f91cc75f42a925e27",name:"email",label:"Email Address",defaultValue:null==i?void 0:i.email,errorText:this.errors.email,inputHandler:this.inputHandler})),t("div",{key:"9de7ac978409f7d5b6064cbeaa30771a6002fa5b",class:"col-12 col-md-6"},t("form-control-number-masked",{key:"05bd882e8d76b6bc1dbc44fc4e1951d14d6d2649",name:"phone",label:"Phone Number",defaultValue:null==i?void 0:i.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:r.US})),t("div",{key:"b511c08db58c2442746a497c7d784cd0605e9f17",class:"col-12 col-md-4"},t("form-control-date",{key:"46be9d7a916f72c583b0d47a528e6e3d2443ac83",name:"dob_full",label:"Birth Date",defaultValue:null==i?void 0:i.dob_full,errorText:this.errors.dob_full,inputHandler:this.inputHandler,onFormControlInput:this.onDateOfBirthUpdate})),t("div",{key:"ae69c549fdf91314f4be3fa2d922c73bc19253ed",class:"col-12 col-md-8"},!(null===(e=this.representative)||void 0===e?void 0:e.ssn_last4)||this.isEditingIdentification?t("form-control-number-masked",{name:"identification_number",label:this.identificationNumberLabel,defaultValue:this.isEditingIdentification?"":null==i?void 0:i.identification_number,errorText:this.errors.identification_number,inputHandler:this.inputHandler,mask:o[this.country],helpText:p[this.country].identityHelpText}):t("div",null,t("label",{class:"form-label",part:b},this.identificationNumberLabel),t("div",{class:"input-group mb-3"},t("input",{type:"text",class:"form-control",part:f,value:`****${null===(s=this.representative)||void 0===s?void 0:s.ssn_last4}`,disabled:!0}),t("button",{class:"btn btn-secondary",type:"button",part:u,onClick:()=>{this.isEditingIdentification=!0,this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{representative:Object.assign(Object.assign({},this.formController.values.getValue().representative),{ssn_last4:null,identification_number:""})}))}},"Change")))),t("div",{key:"dc7a74fe3641cfb03e682a6170c04efbd15b41d0",class:"col-12"},t("identity-address-form",{key:"3756996788014f46ecfda29a3e5f9212b749a5d8",errors:this.errors.address,defaultValues:null==i?void 0:i.address,handleFormUpdate:this.onAddressFormUpdate,country:this.country})))))}},x=class{constructor(t){e(this,t)}render(){return this.text?this.hideAlert?null:t("div",{class:"alert alert-danger d-flex align-items-center",role:"alert",part:h},t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"currentColor",class:"bi bi-exclamation-triangle-fill flex-shrink-0 me-2",viewBox:"0 0 16 16",role:"img","aria-label":"Warning:"},t("path",{d:"M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"})),t("div",null,this.text)):null}},O=class{constructor(t){e(this,t),this.errors={},this.inputHandler=this.inputHandler.bind(this)}componentDidLoad(){this.formController.errors.subscribe((e=>this.errors=Object.assign({},e))),this.formController.values.subscribe((e=>this.legal_address=Object.assign({},e.legal_address)))}inputHandler(e,t){this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{legal_address:Object.assign(Object.assign({},this.formController.values.getValue().legal_address),{[e]:t})}))}render(){var e;const s=this.formController.getInitialValues().legal_address;return t(a,{key:"856cd25caef521b651b9dd8a40dc6f9f0c727706"},t("fieldset",{key:"150ad1f56747aae80ae8d2610fa08fcabee27c87"},t("legend",{key:"565a46bd0977680e400663ef0590d65e977135be",part:n},"Business Legal Address"),t("form-address-fields",{key:"c2ce05c006ec80c5319b30b40387e400ec52ab86",country:this.country,errors:null===(e=this.errors)||void 0===e?void 0:e.legal_address,defaultValues:s,inputHandler:this.inputHandler})))}};export{y as additional_questions,k as business_core_info,j as business_representative,x as form_alert,O as legal_address_form}
1
+ import{r as e,h as t,H as a}from"./p-CV0Pyo1O.js";import{b as s,r as i,s as d,c as l}from"./p-Bt4GjEWL.js";import{C as c,I as o,P as r}from"./p-CVaOFfrI.js";import{b as n,x as b,u as f,a0 as u,ak as h}from"./p-CPKMvyV_.js";import{e as m,d as v}from"./p-BcNb9bVO.js";import{a as p}from"./p-DyucNSA4.js";const y=class{constructor(t){e(this,t),this.errors={},this.additional_questions={},this.inputHandler=this.inputHandler.bind(this)}componentDidLoad(){this.formController.errors.subscribe((e=>this.errors=Object.assign({},e))),this.formController.values.subscribe((e=>this.additional_questions=Object.assign({},e.additional_questions)))}inputHandler(e,t){this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{additional_questions:Object.assign(Object.assign({},this.formController.values.getValue().additional_questions),{[e]:t})}))}render(){var e,l,o,r,b,f,u,h,m,v,p,y,k,j;const x=this.formController.getInitialValues().additional_questions;return t(a,{key:"05b69febfcd1e3901109c2cf64d812ff766b81cc"},t("fieldset",{key:"84f06779dff94622fc7d14fdca53efb84f11e8cd"},t("legend",{key:"3079e5d172c833d8172660f2f66b4d9637bfdb21",part:n},"Additional Questions"),t("div",{key:"cf5155033143279316822237a84a0ad5e292a6cd",class:"row gy-3"},t("div",{key:"e28450dacb0d7040d62a4820c0252d95792d7e87",class:"col-12 col-md-6"},t("form-control-monetary-provisioning",{key:"e2ac8f211ffd9848fab123bc7826fd9f18e109a8",name:"business_revenue",label:"What is the business' estimated annual revenue from its primary business activities?",inputHandler:this.inputHandler,errorText:null===(l=null===(e=this.errors)||void 0===e?void 0:e.additional_questions)||void 0===l?void 0:l.business_revenue,defaultValue:null==x?void 0:x.business_revenue,maskOptions:c.WHOLE})),t("div",{key:"c5de85cd5e7b1501a0667a49d8d4826971e93052",class:"col-12 col-md-6"},t("form-control-monetary-provisioning",{key:"3da3805e4ddbc633f060d36487b46e76e4f6eb04",name:"business_payment_volume",label:"What is the business' annual credit card & ACH volume anticipated to process?",inputHandler:this.inputHandler,errorText:null===(r=null===(o=this.errors)||void 0===o?void 0:o.additional_questions)||void 0===r?void 0:r.business_payment_volume,defaultValue:null==x?void 0:x.business_payment_volume,maskOptions:c.WHOLE})),t("div",{key:"ad62fecba837464fddba48273635bc8ae3a7d7ed",class:"col-12"},t("form-control-select",{key:"9f09093b45c1c8eeb63065402f4b15e31c166d51",name:"business_when_service_received",label:"On average, how long after paying will your customers typically receive their goods or services?",inputHandler:this.inputHandler,errorText:null===(f=null===(b=this.errors)||void 0===b?void 0:b.additional_questions)||void 0===f?void 0:f.business_when_service_received,options:s,defaultValue:null==x?void 0:x.business_when_service_received})),t("div",{key:"e2a05cbb74138a554033817e3bb1372933e64b99",class:"col-12"},t("form-control-select",{key:"8a95d74c02f2cf662f6cf0658faeae1a1a8f6a11",name:"business_recurring_payments",label:"Does your business offer recurring payments?",inputHandler:this.inputHandler,errorText:null===(h=null===(u=this.errors)||void 0===u?void 0:u.additional_questions)||void 0===h?void 0:h.business_recurring_payments,options:i,defaultValue:null==x?void 0:x.business_recurring_payments})),t("div",{key:"8d94059b0966237c980b1c1622e1ed3fd5bd8a58",class:"col-12"},t("form-control-text",{key:"320fa784aef300393ddfcca4f2ef4798d207bf30",name:"business_recurring_payments_percentage",label:"What percent of revenue is generated from each recurring payment type offered?",inputHandler:this.inputHandler,errorText:null===(v=null===(m=this.errors)||void 0===m?void 0:m.additional_questions)||void 0===v?void 0:v.business_recurring_payments_percentage,defaultValue:null==x?void 0:x.business_recurring_payments_percentage})),t("div",{key:"8525c21ec91e652737455e7b093ff280800d97c2",class:"col-12"},t("form-control-select",{key:"c2cba23606b03f758ba704c074a65a212e111998",name:"business_seasonal",label:"Is this business seasonal?",inputHandler:this.inputHandler,errorText:null===(y=null===(p=this.errors)||void 0===p?void 0:p.additional_questions)||void 0===y?void 0:y.business_seasonal,options:d,defaultValue:null==x?void 0:x.business_seasonal})),t("div",{key:"c047c43284fbe92952c487544bc8206c98433edc",class:"col-12"},t("form-control-text",{key:"27348b1899f8b8f7f18a0618aa4dcb812a3bef04",name:"business_other_payment_details",label:"Is there anything else you would like us to know about how your customers pay the business?",inputHandler:this.inputHandler,errorText:null===(j=null===(k=this.errors)||void 0===k?void 0:k.additional_questions)||void 0===j?void 0:j.business_other_payment_details,defaultValue:null==x?void 0:x.business_other_payment_details})))))}},k=class{constructor(t){e(this,t),this.errors={},this.coreInfo={},this.isEditingTaxId=!1,this.inputHandler=this.inputHandler.bind(this)}componentDidLoad(){this.formController.values.subscribe((e=>this.coreInfo=Object.assign({},new m(e)))),this.formController.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}inputHandler(e,t){this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[e]:t}))}render(){var e,s;const i=this.formController.getInitialValues();return t(a,{key:"9c73706505c1fa0a56d7eb68fc1c4c0a6fffd1dc"},t("fieldset",{key:"d30bae9bab7ffd0e385ce276e7797cfd606e5a42"},t("legend",{key:"5792db95cbbc080f3c990b4b9cea84484f374ec3",part:n},"General Info"),t("div",{key:"ae7fa3c788d625d60cfc83b270312946dce97f0b",class:"row gy-3"},t("div",{key:"f7e5ab1ec57a8ce8de5ef8591ecad8b2fbd2f030",class:"col-12"},t("form-control-text",{key:"fa96501ceca053263029489a74bddd31222b1462",name:"legal_name",label:"Legal Name",defaultValue:i.legal_name,errorText:this.errors.legal_name,inputHandler:this.inputHandler})),t("div",{key:"21e14d0c13017376d7e74e84169f30fe05fa13af",class:"col-12"},t("form-control-text",{key:"266187ec2209299a4b0ebc4c7d600c670de3b21f",name:"doing_business_as",label:"Doing Business As (DBA)",defaultValue:i.doing_business_as,errorText:this.errors.doing_business_as,inputHandler:this.inputHandler})),t("div",{key:"d9bbb19b4ec15a18a0467444e964512114e74031",class:"col-12 col-md-8"},t("form-control-select",{key:"fe490b4abb4a1e07392db9ad4e4c15b02d928f4c",name:"classification",label:"Business Classification",options:l,defaultValue:i.classification,errorText:this.errors.classification,inputHandler:this.inputHandler})),t("div",{key:"fc5dafdace199fd34d22f22d629d87fc8ff7cc3e",class:"col-12 col-md-4"},t("form-control-date",{key:"0263cdef27d1b36c22bde16dbdb3777ad9ef62e3",name:"date_of_incorporation",label:"Date of Incorporation",defaultValue:i.date_of_incorporation,errorText:this.errors.date_of_incorporation,inputHandler:this.inputHandler})),t("div",{key:"2ae2b710d615e5314d4b836b9a498fc9140b749a",class:"col-12 col-md-6"},t("form-control-text",{key:"f6e738254ff7ead5680b895b6df77dc58efbc393",name:"industry",label:"Industry",defaultValue:i.industry,errorText:this.errors.industry,inputHandler:this.inputHandler})),t("div",{key:"8a01de0514d495b103aa43070d268070f57af62a",class:"col-12 col-md-6"},!(null===(e=this.coreInfo)||void 0===e?void 0:e.tax_id_last4)||this.isEditingTaxId?t("form-control-number-masked",{name:"tax_id",label:p[this.country].taxIdLabel,defaultValue:this.isEditingTaxId?"":i.tax_id,errorText:this.errors.tax_id,inputHandler:this.inputHandler,mask:o[this.country],helpText:p[this.country].taxIdHelpText}):t("div",null,t("label",{class:"form-label",part:b},p[this.country].taxIdLabel),t("div",{class:"input-group mb-3"},t("input",{type:"text",class:"form-control",part:f,value:`****${null===(s=this.coreInfo)||void 0===s?void 0:s.tax_id_last4}`,disabled:!0}),t("button",{class:"btn btn-secondary",type:"button",part:u,onClick:()=>{this.isEditingTaxId=!0,this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{tax_id:""}))}},"Change")))),t("div",{key:"66292d95dd8ead1367c1eef3a96aa1fb9e707810",class:"col-12"},t("form-control-text",{key:"de144c99e186470c37d0d330c8aa480fb00ef037",name:"website_url",label:"Website URL",defaultValue:i.website_url,errorText:this.errors.website_url,inputHandler:this.inputHandler})),t("div",{key:"c43095be28c660a2312c37c6856abeae7f952299",class:"col-12 col-md-6"},t("form-control-text",{key:"e4afa2d37cd5dc26006b116c7d574e1c7dd4a0ef",name:"email",label:"Email Address",defaultValue:i.email,errorText:this.errors.email,inputHandler:this.inputHandler})),t("div",{key:"a68760b724c42da71a93ab7944152a8137d51cc8",class:"col-12 col-md-6"},t("form-control-number-masked",{key:"6532f13f43391e8752f625296fb3685d7d68e084",name:"phone",label:"Phone Number",defaultValue:i.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:r.US})))))}},j=class{constructor(t){e(this,t),this.errors={},this.representative={},this.isEditingIdentification=!1,this.inputHandler=(e,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{representative:Object.assign(Object.assign({},this.formController.values.getValue().representative),{[e]:t})}))},this.onAddressFormUpdate=e=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{representative:Object.assign(Object.assign({},this.formController.values.getValue().representative),{address:Object.assign(Object.assign({},this.formController.values.getValue().representative.address),e)})}))},this.onDateOfBirthUpdate=e=>{const t=v(e.detail);this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{representative:Object.assign(Object.assign({},this.formController.values.getValue().representative),{dob_day:t.dob_day,dob_month:t.dob_month,dob_year:t.dob_year})}))}}get identificationNumberLabel(){var e;return(null===(e=this.representative)||void 0===e?void 0:e.ssn_last4)?p[this.country].idNumberLabelOptional:p[this.country].idNumberLabel}componentDidLoad(){this.formController.errors.subscribe((e=>this.errors=Object.assign({},e.representative))),this.formController.values.subscribe((e=>this.representative=Object.assign({},e.representative)))}render(){var e,s;const i=this.formController.getInitialValues().representative;return t(a,{key:"c12be1414101467b72170c101cb3d7792f0fafe0"},t("fieldset",{key:"821c9982121243de546bfe95094402379e704659"},t("legend",{key:"48d43758a4d62dcd977eeb9703bae8ac153b9bf4",part:n},"Representative"),t("div",{key:"458edb00ebc0817623cd0fe70b8221c178cac168",class:"row gy-3"},t("div",{key:"5d6b3fc92d7c6fb6bf729881bf26198ea796cbfa",class:"col-12 col-md-8"},t("form-control-text",{key:"73eb60a383a45664050dd53bbc8b22b1e54ec22f",name:"name",label:"Full Name",defaultValue:null==i?void 0:i.name,errorText:this.errors.name,inputHandler:this.inputHandler})),t("div",{key:"fa4b8c69dc03d7ffeecf98badd5cda52edc370e5",class:"col-12 col-md-4"},t("form-control-text",{key:"3cc743bd85400c30741b6c05c3c098badce49a58",name:"title",label:"Title",defaultValue:null==i?void 0:i.title,errorText:this.errors.title,inputHandler:this.inputHandler})),t("div",{key:"83daa42529e73c5b946830dded92d0d48c95b251",class:"col-12 col-md-6"},t("form-control-text",{key:"046a7537d6a2c5ab90d0069f91cc75f42a925e27",name:"email",label:"Email Address",defaultValue:null==i?void 0:i.email,errorText:this.errors.email,inputHandler:this.inputHandler})),t("div",{key:"9de7ac978409f7d5b6064cbeaa30771a6002fa5b",class:"col-12 col-md-6"},t("form-control-number-masked",{key:"05bd882e8d76b6bc1dbc44fc4e1951d14d6d2649",name:"phone",label:"Phone Number",defaultValue:null==i?void 0:i.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:r.US})),t("div",{key:"b511c08db58c2442746a497c7d784cd0605e9f17",class:"col-12 col-md-4"},t("form-control-date",{key:"46be9d7a916f72c583b0d47a528e6e3d2443ac83",name:"dob_full",label:"Birth Date",defaultValue:null==i?void 0:i.dob_full,errorText:this.errors.dob_full,inputHandler:this.inputHandler,onFormControlInput:this.onDateOfBirthUpdate})),t("div",{key:"ae69c549fdf91314f4be3fa2d922c73bc19253ed",class:"col-12 col-md-8"},!(null===(e=this.representative)||void 0===e?void 0:e.ssn_last4)||this.isEditingIdentification?t("form-control-number-masked",{name:"identification_number",label:this.identificationNumberLabel,defaultValue:this.isEditingIdentification?"":null==i?void 0:i.identification_number,errorText:this.errors.identification_number,inputHandler:this.inputHandler,mask:o[this.country],helpText:p[this.country].identityHelpText}):t("div",null,t("label",{class:"form-label",part:b},this.identificationNumberLabel),t("div",{class:"input-group mb-3"},t("input",{type:"text",class:"form-control",part:f,value:`****${null===(s=this.representative)||void 0===s?void 0:s.ssn_last4}`,disabled:!0}),t("button",{class:"btn btn-secondary",type:"button",part:u,onClick:()=>{this.isEditingIdentification=!0,this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{representative:Object.assign(Object.assign({},this.formController.values.getValue().representative),{ssn_last4:null,identification_number:""})}))}},"Change")))),t("div",{key:"dc7a74fe3641cfb03e682a6170c04efbd15b41d0",class:"col-12"},t("identity-address-form",{key:"3756996788014f46ecfda29a3e5f9212b749a5d8",errors:this.errors.address,defaultValues:null==i?void 0:i.address,handleFormUpdate:this.onAddressFormUpdate,country:this.country})))))}},x=class{constructor(t){e(this,t)}render(){return this.text?this.hideAlert?null:t("div",{class:"alert alert-danger d-flex align-items-center",role:"alert",part:h},t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"currentColor",class:"bi bi-exclamation-triangle-fill flex-shrink-0 me-2",viewBox:"0 0 16 16",role:"img","aria-label":"Warning:"},t("path",{d:"M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"})),t("div",null,this.text)):null}},O=class{constructor(t){e(this,t),this.errors={},this.inputHandler=this.inputHandler.bind(this)}componentDidLoad(){this.formController.errors.subscribe((e=>this.errors=Object.assign({},e))),this.formController.values.subscribe((e=>this.legal_address=Object.assign({},e.legal_address)))}inputHandler(e,t){this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{legal_address:Object.assign(Object.assign({},this.formController.values.getValue().legal_address),{[e]:t})}))}render(){var e;const s=this.formController.getInitialValues().legal_address;return t(a,{key:"856cd25caef521b651b9dd8a40dc6f9f0c727706"},t("fieldset",{key:"150ad1f56747aae80ae8d2610fa08fcabee27c87"},t("legend",{key:"565a46bd0977680e400663ef0590d65e977135be",part:n},"Business Legal Address"),t("form-address-fields",{key:"c2ce05c006ec80c5319b30b40387e400ec52ab86",country:this.country,errors:null===(e=this.errors)||void 0===e?void 0:e.legal_address,defaultValues:s,inputHandler:this.inputHandler})))}};export{y as additional_questions,k as business_core_info,j as business_representative,x as form_alert,O as legal_address_form}
@@ -0,0 +1 @@
1
+ import{h as t,r as e,c as i}from"./p-CV0Pyo1O.js";import{n as s,C as a,b as r}from"./p-CSgcCWLS.js";import{J as n}from"./p-DbOUuBHs.js";import{c as o}from"./p-DHFQtPCq.js";import{T as c}from"./p-BGvaX-lJ.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{p as h}from"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import{g as d,a as p}from"./p-Cg_3KsGO.js";import{m,S as u}from"./p-Eb1f86_V.js";import{S as l}from"./p-BqNNwq6C.js";import{T as b,a as f,b as v,c as g,d as k,e as y,f as C,g as j,h as _,i as w,j as T,k as S,l as O}from"./p-BICxxa69.js";import{T as D}from"./p-CZfYo5-1.js";import{B as P,a as I}from"./p-CHw7tICr.js";import{a6 as x,a7 as A}from"./p-CPKMvyV_.js";import{k as B}from"./p-BRnBHsdq.js";import{o as E,g as H}from"./p-Dw63wyhO.js";import"./p-CZa-hHhJ.js";import"./p-CYQvLgSs.js";import"./p-D8GTwl9v.js";import"./p-CqiVXthx.js";const N={nickname:()=>t("th",{part:x,scope:"col",title:"The nickname associated with the terminal"},"Nickname"),model_name:()=>t("th",{part:x,scope:"col",title:"The model name of the terminal"},"Model Name"),id:()=>t("th",{part:x,scope:"col",title:"The ID of the terminal"},"ID"),provider:()=>t("th",{part:x,scope:"col",title:"The provider of the terminal"},"Provider"),provider_serial_number:()=>t("th",{part:x,scope:"col",title:"The serial number of the terminal"},"Serial Number"),device_id:()=>t("th",{part:x,scope:"col",title:"The device/provider ID of the terminal"},"Device ID"),sub_account_name:()=>t("th",{part:x,scope:"col",title:"The sub account associated with the terminal"},"Sub Account"),status:()=>t("th",{part:x,scope:"col",title:"The current status of each terminal"},"Status")},q={nickname:(e,i)=>t("td",{part:A(i)},e.nickname),model_name:(e,i)=>t("td",{part:A(i)},e.model_name),id:(e,i)=>t("td",{part:A(i)},e.id),provider:(e,i)=>t("td",{part:A(i)},B(e.provider)),provider_serial_number:(e,i)=>t("td",{part:A(i)},e.provider_serial_number),device_id:(e,i)=>t("td",{part:A(i)},e.provider_id),sub_account_name:(e,i)=>t("td",{part:A(i)},e.sub_account_name),status:(e,i)=>t("td",{part:A(i)},t(I,Object.assign({},{connected:{variant:P.SUCCESS,title:"This terminal is connected",text:"Connected"},disconnected:{variant:P.DANGER,title:"This terminal is disconnected",text:"Disconnected"},unknown:{variant:P.SECONDARY,title:"The status of this terminal is unknown",text:"Unknown"},pending_configuration:{variant:P.WARNING,title:"This terminal is pending configuration",text:"Pending configuration"},archived:{variant:P.SECONDARY,title:"This terminal is archived",text:"Archived"}}[e.status])))},G=class{constructor(t){e(this,t),this.clickEvent=i(this,"click-event",7),this.errorEvent=i(this,"error-event",7),this.terminals=[],this.subAccounts=[],this.loading=!0,this.paging=h,this.pagingParams={},this.columns="nickname,provider_serial_number,status",this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:D.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:D.next})},this.rowClickHandler=t=>{const e=t.target.closest("tr").dataset.rowEntityId;if(!e)return;const i=this.terminals.find((t=>t.id===e));this.clickEvent.emit({name:D.row,data:i})}}componentWillLoad(){o(),this.analytics=new n(this),this.terminalsTable=new b(this.terminals,this.columns,N,q),this.initializeGetData(),this.getTerminals&&this.getSubAccounts&&this.fetchData(),E("set",(()=>{this.pagingParams={}})),E("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetData()}updateOnPropChange(){this.fetchData()}initializeGetData(){this.initializeGetTerminals(),this.initializeGetSubAccounts()}initializeGetTerminals(){this.accountId&&this.authToken?this.getTerminals=(({id:t,authToken:e,service:i})=>async({params:r,onSuccess:n,onError:o})=>{var c,h;try{const m=await i.fetchTerminals(t,e,r);if(m.error)return o({error:p(m.error),code:d(null===(h=m.error)||void 0===h?void 0:h.code),severity:a.ERROR});{const t=Object.assign({},m.page_info);n({terminals:(null===(c=m.data)||void 0===c?void 0:c.map((t=>new s(t))))||[],pagingInfo:t})}}catch(t){const e=d(null==t?void 0:t.code);return o({error:t.message||t,code:e,severity:a.ERROR})}})({id:this.accountId,authToken:this.authToken,service:new c}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:r.MISSING_PROPS,message:this.errorMessage,severity:a.ERROR}))}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=m({primaryAccountId:this.accountId,authToken:this.authToken,service:new u}))}fetchData(){this.loading=!0,this.getTerminals({params:this.terminalParams,onSuccess:async({terminals:t,pagingInfo:e})=>{this.terminals=t,this.paging=e,this.terminalsTable.collectionData=this.terminals,this.terminalsTable.columnKeys.includes("sub_account_name")?await this.fetchSubAccounts():this.loading=!1},onError:({error:t,code:e,severity:i})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:e,message:t,severity:i}),this.loading=!1}})}async fetchSubAccounts(){this.getSubAccounts({params:this.subAccountParams,onSuccess:({subAccounts:t})=>{this.subAccounts=t,this.terminals=this.terminals.map((t=>{var e;return t.sub_account_name=null===(e=this.subAccounts.find((e=>e.id===t.account_id)))||void 0===e?void 0:e.name,t})),this.loading=!1},onError:({error:t,code:e,severity:i})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:e,message:t,severity:i}),this.loading=!1}})}get terminalParams(){const t=H();return Object.assign(Object.assign({},t),this.pagingParams)}get subAccountParams(){let t=this.terminals.map((t=>t.account_id));return{sub_account_id:[...new Set(t)].join(",")}}get entityId(){return this.terminals.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.terminalsTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return t(l,{key:"6388e9b0b7c6dcedc9f3db534d3a30d0a748929c"},t(f,{key:"e11b994e16e657aaaa7c6f29197865d0d6bfd1ba"},t(v,{key:"340980f75fef37841907835378d9c0ced1992b5c"},t(g,{key:"fdd3d1569b6a3df9d5d31fb2cc602ab054529fc6"},t(k,{key:"440d602ac5746635f92445c6216c807b9b13517e"},this.terminalsTable.columnData.map((t=>t)))),t(y,{key:"ccef66a47be1cfca09f10d450fb7eeaf241a17e0"},t(C,{key:"aea6e2f33e07c717f50065c12211f9f2d9266bec",columnSpan:this.terminalsTable.columnKeys.length,isLoading:this.loading}),t(j,{key:"7c92ba6cd398bae23587a2e1771bba7b75dc680c",isEmpty:this.showEmptyState,columnSpan:this.terminalsTable.columnKeys.length}),t(_,{key:"3155cf655f5b8e4290e8cabdcdbd534159f22ddd",columnSpan:this.terminalsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.terminalsTable.rowData.map(((e,i)=>t(w,{"data-test-id":"table-row","data-row-entity-id":this.entityId[i],onClick:this.rowClickHandler},e)))),this.paging&&t(T,{key:"da9172d4bf4439456894b53a0cf13a82081909f0"},t(S,{key:"e6c0847dc330a0e32228f2020d22bbaf0e4ad439"},t(O,{key:"6761f623d70d13b13e92ec73c9b936d5bf85dd70",colSpan:this.terminalsTable.columnData.length},t("pagination-menu",{key:"4b490b5834be42664ebbc27b7c7a1b0c10bd433b",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"],pagingParams:["updateOnPropChange"],getTerminals:["updateOnPropChange"],getSubAccounts:["updateOnPropChange"],columns:["updateOnPropChange"]}}};export{G as justifi_terminals_list}
@@ -0,0 +1 @@
1
+ import{h as t}from"./p-CV0Pyo1O.js";import{t as e}from"./p-CPKMvyV_.js";const o=o=>{const{helpText:r,name:m}=o;return r?t("small",{class:"form-text text-muted",id:`form-help-text-${m}`,part:e},r):null};export{o as F}
@@ -0,0 +1 @@
1
+ import{A as e}from"./p-CYQvLgSs.js";import"./p-CSgcCWLS.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";const n=e();class r{async fetchTerminals(e,r,s){return n.get({endpoint:"terminals",params:s,headers:{Account:e},authToken:r})}async fetchTerminal(e,r){return n.get({endpoint:`terminals/${e}`,authToken:r})}async fetchTerminalModels(e,r){return n.get({endpoint:"terminals/order_models",headers:{"sub-account":e},authToken:r})}async orderTerminals(e,r){return n.post({endpoint:"terminals/orders",body:r,headers:{"sub-account":r.sub_account_id},authToken:e})}}export{r as T}
@@ -1 +1 @@
1
- import{h as t}from"./p-CV0Pyo1O.js";import{aa as a,ab as s,ac as e,ad as r,ae as l,af as c,ag as n,ah as o,ai as p,aj as i}from"./p-DnrawQn3.js";import{S as b}from"./p-CDf5H0TB.js";const u=(a,s)=>t("div",Object.assign({class:"table-wrapper",part:"table-wrapper"},a),s),d=(s,e)=>t("table",Object.assign({class:"table table-hover",part:a},s),e),h=(a,s)=>t("tbody",Object.assign({class:"table-body"},a),s),j=(a,s)=>t("tr",Object.assign({part:r},a),s),m=(a,e)=>t("thead",Object.assign({class:"table-head sticky-top",part:s},a),e),g=(a,s)=>t("tr",Object.assign({class:"table-light text-nowrap",part:e},a),s),y=(a,s)=>t("tfoot",Object.assign({class:"sticky-bottom",part:l},a),s),O=(a,s)=>t("tr",Object.assign({class:"table-light align-middle",part:c},a),s),f=(a,s)=>t("td",Object.assign({part:n},a),s),S=a=>{const{columnSpan:s,isEmpty:e}=a;return s&&e?t("tr",null,t("td",{class:"empty-state",part:o,colSpan:s,style:{textAlign:"center"}},"No results")):null},x=a=>{const{columnSpan:s,errorMessage:e}=a;return s&&e?t("tr",null,t("td",{class:"error-state",part:p,colSpan:s,"data-test-id":"table-error-state",style:{textAlign:"center"}},"An unexpected error occurred: ",e)):null},w=a=>{const{columnSpan:s,isLoading:e}=a;return s&&e?t("tr",null,t("td",{class:"loading-state",part:i,colSpan:s,style:{textAlign:"center"}},t(b,null))):null};class D{get columnData(){return this.columnKeys.map((t=>this.tableColumns[t]()))}get rowData(){return this.collection.map(((t,a)=>this.columnKeys.map((s=>this.tableCells[s](t,a)))))}set collectionData(t){this.collection=t}constructor(t,a,s,e){this.columnKeys=a.split(","),this.collection=t,this.tableColumns=s,this.tableCells=e}}export{D as T,d as a,m as b,g as c,h as d,w as e,S as f,x as g,j as h,y as i,O as j,f as k,u as l}
1
+ import{h as t}from"./p-CV0Pyo1O.js";import{aa as a,ab as s,ac as e,ad as r,ae as l,af as c,ag as o,ah as n,ai as p,aj as i}from"./p-CPKMvyV_.js";import{S as b}from"./p-CqiVXthx.js";const u=(a,s)=>t("div",Object.assign({class:"table-wrapper",part:"table-wrapper"},a),s),d=(s,e)=>t("table",Object.assign({class:"table table-hover",part:a},s),e),h=(a,s)=>t("tbody",Object.assign({class:"table-body"},a),s),j=(a,s)=>t("tr",Object.assign({part:r},a),s),m=(a,e)=>t("thead",Object.assign({class:"table-head sticky-top",part:s},a),e),g=(a,s)=>t("tr",Object.assign({class:"table-light text-nowrap",part:e},a),s),y=(a,s)=>t("tfoot",Object.assign({class:"sticky-bottom",part:l},a),s),O=(a,s)=>t("tr",Object.assign({class:"table-light align-middle",part:c},a),s),x=(a,s)=>t("td",Object.assign({part:o},a),s),S=a=>{const{columnSpan:s,isEmpty:e}=a;return s&&e?t("tr",null,t("td",{class:"empty-state",part:n,colSpan:s,style:{textAlign:"center"}},"No results")):null},f=a=>{const{columnSpan:s,errorMessage:e}=a;return s&&e?t("tr",null,t("td",{class:"error-state",part:p,colSpan:s,"data-test-id":"table-error-state",style:{textAlign:"center"}},"An unexpected error occurred: ",e)):null},w=a=>{const{columnSpan:s,isLoading:e}=a;return s&&e?t("tr",null,t("td",{class:"loading-state",part:i,colSpan:s,style:{textAlign:"center"}},t(b,null))):null};class A{get columnData(){return this.columnKeys.map((t=>this.tableColumns[t]()))}get rowData(){return this.collection.map(((t,a)=>this.columnKeys.map((s=>this.tableCells[s](t,a)))))}set collectionData(t){this.collection=t}constructor(t,a,s,e){this.columnKeys=a.split(","),this.collection=t,this.tableColumns=s,this.tableCells=e}}export{A as T,u as a,d as b,m as c,g as d,h as e,w as f,S as g,f as h,j as i,y as j,O as k,x as l}
@@ -1 +1 @@
1
- import{h as a}from"./p-CV0Pyo1O.js";import{U as s,V as n,C as r,W as i,X as t,Y as o,Z as e,_ as c,$ as l,a0 as d,a1 as p,a2 as u}from"./p-DnrawQn3.js";const b=(b,f)=>{const{variant:m,isLoading:j,className:v,class:y,clickHandler:g}=b,O=function(a,s){var n={};for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&s.indexOf(r)<0&&(n[r]=a[r]);if(null!=a&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(a);i<r.length;i++)s.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(a,r[i])&&(n[r[i]]=a[r[i]])}return n}(b,["variant","isLoading","className","class","clickHandler"]),$=v||y||"";return a("button",Object.assign({class:`btn btn-${m}${$?` ${$}`:""}`,onClick:g,part:`${{primary:p,secondary:d,success:l,danger:c,warning:e,info:o,light:t,dark:i,link:r,"outline-primary":n,"outline-secondary":s}[m]} ${j?u:""}`},O),j?a("div",{class:"spinner-border spinner-border-sm",role:"status",part:"button-spinner"},a("span",{class:"visually-hidden"},"Loading...")):f)};export{b as B}
1
+ import{h as a}from"./p-CV0Pyo1O.js";import{U as s,V as n,C as r,W as i,X as t,Y as o,Z as e,_ as c,$ as l,a0 as d,a1 as p,a2 as u}from"./p-CPKMvyV_.js";const b=(b,f)=>{const{variant:m,isLoading:v,className:y,class:j,clickHandler:g}=b,O=function(a,s){var n={};for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&s.indexOf(r)<0&&(n[r]=a[r]);if(null!=a&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(a);i<r.length;i++)s.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(a,r[i])&&(n[r[i]]=a[r[i]])}return n}(b,["variant","isLoading","className","class","clickHandler"]),$=y||j||"";return a("button",Object.assign({class:`btn btn-${m}${$?` ${$}`:""}`,onClick:g,part:`${{primary:p,secondary:d,success:l,danger:c,warning:e,info:o,light:t,dark:i,link:r,"outline-primary":n,"outline-secondary":s}[m]} ${v?u:""}`},O),v?a("div",{class:"spinner-border spinner-border-sm",role:"status",part:"button-spinner"},a("span",{class:"visually-hidden"},"Loading...")):f)};export{b as B}
@@ -0,0 +1 @@
1
+ import{h as a}from"./p-CV0Pyo1O.js";import{e as r,g as s,i as g,j as e,k as n,m as d,n as i,o as t,p as o}from"./p-CPKMvyV_.js";var b;!function(a){a.PRIMARY="primary",a.SECONDARY="secondary",a.SUCCESS="success",a.DANGER="danger",a.WARNING="warning",a.INFO="info",a.LIGHT="light",a.DARK="dark"}(b||(b={}));const c=b=>{const{variant:c,text:p,title:y}=b,f={default:"badge",primary:"badge bg-primary",secondary:"badge bg-secondary",success:"badge bg-success",danger:"badge bg-danger",warning:"badge bg-warning",info:"badge bg-info",light:"badge bg-light",dark:"badge bg-dark"},l={default:o,primary:t,secondary:i,success:d,danger:n,warning:e,info:g,light:s,dark:r};return a("span",{class:f[c]||f.default,part:l[c]||l.default,title:y},p)};export{b as B,c as a}
@@ -1 +1 @@
1
- const a="font-family",t="background-color",s=`text color ${a}`,n=`text-danger ${s}`,e=`heading ${s}`,o=`heading-1 ${e}`,i=`heading-2 ${e}`,$=`heading-3 ${e}`,d=`heading-4 ${e}`,u=`heading-5 ${e}`,b=`link text ${a}`,l=`button ${s}`,c=`button-primary ${l}`,r=`button-secondary ${l}`,p=`button-danger ${l}`,g=`button-success ${l}`,h=`button-warning ${l}`,f=`button-info ${l}`,k=`button-light ${l}`,m=`button-dark ${l}`,x=`button-link ${l}`,y=`button-outline-primary ${l}`,w=`button-outline-secondary ${l}`,v="button-loading",j=`label ${s}`,q=`input ${s} ${t}`,z=`input-group ${q}`,A=`input-invalid ${q}`,B=`input-disabled ${q}`,C=`input-focused ${q}`,D=`input-invalid-and-focused ${q}`,E="input-radio",F=`input-radio-focused ${E}`,G=`input-radio-checked ${E}`,H=`input-radio-checked-focused ${E}`,I=`input-radio-invalid ${E}`,J="input-checkbox",K=`input-checkbox-invalid ${J}`,L=`input-checkbox-focused ${J}`,M=`input-checkbox-checked ${J}`,N=`input-checkbox-checked-focused ${J}`,O=`input-adornment ${s}`,P=`alert ${s}`,Q=`alert-danger ${P}`,R=`tooltip ${s}`,S=`tooltip-icon ${s}`,T=`tooltip-inner ${s}`,U=`card ${s} ${t}`,V=`table ${s} ${t}`,W=`table-row ${s} ${t}`,X=`table-cell ${s} ${t}`,Y="table-head",Z=`table-head-row ${s} ${t}`,_=`table-head-cell ${X}`,aa="table-foot",ta=`table-foot-row ${s} ${t}`,sa=`table-foot-cell ${X}`,na=`table-cell-even ${X}`,ea=`table-cell-odd ${X}`,oa=a=>a%2?na:ea,ia=`table-empty ${s} ${t}`,$a=`table-error ${s} ${t}`,da=`pagination-button ${l}`,ua=`pagination-button-disabled button-disabled ${l}`,ba=`pagination-button-text ${s}`,la=`pagination-button-icon ${s}`,ca=`pagination-button-icon-next ${la}`,ra=`pagination-button-icon-previous ${la}`,pa="loading-spinner",ga=`badge ${a}`,ha=`${ga} badge-primary`,fa=`${ga} badge-secondary`,ka=`${ga} badge-success`,ma=`${ga} badge-danger`,xa=`${ga} badge-warning`,ya=`${ga} badge-info`,wa=`${ga} badge-light`,va=`${ga} badge-dark`,ja=`dropdown-menu ${s}`,qa=`dropdown-menu-button ${c}`,za=`radio-list-item ${s}`,Aa="skeleton",Ba="image",Ca="billing-form",Da="checkout-summary",Ea="filter-menu",Fa="filter-param";export{g as $,$ as A,Ba as B,x as C,U as D,z as E,K as F,N as G,L as H,M as I,J,I as K,H as L,G as M,F as N,E as O,da as P,ua as Q,ra as R,ba as S,ca as T,w as U,y as V,m as W,k as X,f as Y,h as Z,p as _,Fa as a,r as a0,c as a1,v as a2,_ as a3,oa as a4,qa as a5,ja as a6,D as a7,d as a8,u as a9,V as aa,Y as ab,Z as ac,W as ad,aa as ae,ta as af,sa as ag,ia as ah,$a as ai,X as aj,Q as ak,Ca as al,P as am,R as an,T as ao,S as ap,i as b,Da as c,va as d,wa as e,Ea as f,ya as g,o as h,xa as i,ma as j,ka as k,b as l,fa as m,ha as n,ga as o,pa as p,A as q,za as r,Aa as s,s as t,B as u,C as v,q as w,j as x,O as y,n as z}
1
+ const a="font-family",t="background-color",s=`text color ${a}`,n=`text-danger ${s}`,e=`heading ${s}`,o=`heading-1 ${e}`,i=`heading-2 ${e}`,$=`heading-3 ${e}`,d=`heading-4 ${e}`,u=`heading-5 ${e}`,b=`link text ${a}`,l=`button ${s}`,c=`button-primary ${l}`,r=`button-secondary ${l}`,p=`button-danger ${l}`,g=`button-success ${l}`,h=`button-warning ${l}`,f=`button-info ${l}`,k=`button-light ${l}`,m=`button-dark ${l}`,x=`button-link ${l}`,y=`button-outline-primary ${l}`,w=`button-outline-secondary ${l}`,v="button-loading",j=`label ${s}`,q=`input ${s} ${t}`,z=`input-group ${q}`,A=`input-invalid ${q}`,B=`input-disabled ${q}`,C=`input-focused ${q}`,D=`input-invalid-and-focused ${q}`,E="input-radio",F=`input-radio-focused ${E}`,G=`input-radio-checked ${E}`,H=`input-radio-checked-focused ${E}`,I=`input-radio-invalid ${E}`,J="input-checkbox",K=`input-checkbox-invalid ${J}`,L=`input-checkbox-focused ${J}`,M=`input-checkbox-checked ${J}`,N=`input-checkbox-checked-focused ${J}`,O=`input-adornment ${s}`,P=`alert ${s}`,Q=`alert-danger ${P}`,R=`tooltip ${s}`,S=`tooltip-icon ${s}`,T=`tooltip-inner ${s}`,U=`card ${s} ${t}`,V=`table ${s} ${t}`,W=`table-row ${s} ${t}`,X=`table-cell ${s} ${t}`,Y="table-head",Z=`table-head-row ${s} ${t}`,_=`table-head-cell ${X}`,aa="table-foot",ta=`table-foot-row ${s} ${t}`,sa=`table-foot-cell ${X}`,na=`table-cell-even ${X}`,ea=`table-cell-odd ${X}`,oa=a=>a%2?na:ea,ia=`table-empty ${s} ${t}`,$a=`table-error ${s} ${t}`,da=`pagination-button ${l}`,ua=`pagination-button-disabled button-disabled ${l}`,ba=`pagination-button-text ${s}`,la=`pagination-button-icon ${s}`,ca=`pagination-button-icon-next ${la}`,ra=`pagination-button-icon-previous ${la}`,pa="loading-spinner",ga=`badge ${a}`,ha=`${ga} badge-primary`,fa=`${ga} badge-secondary`,ka=`${ga} badge-success`,ma=`${ga} badge-danger`,xa=`${ga} badge-warning`,ya=`${ga} badge-info`,wa=`${ga} badge-light`,va=`${ga} badge-dark`,ja=`dropdown-menu ${s}`,qa=`dropdown-menu-button ${c}`,za=`radio-list-item ${s}`,Aa="skeleton",Ba="image",Ca="billing-form",Da="checkout-summary",Ea="filter-menu",Fa="filter-param";export{g as $,$ as A,Ba as B,x as C,U as D,z as E,K as F,N as G,L as H,M as I,J,da as K,ua as L,ra as M,ba as N,ca as O,I as P,H as Q,G as R,F as S,E as T,w as U,y as V,m as W,k as X,f as Y,h as Z,p as _,Fa as a,r as a0,c as a1,v as a2,D as a3,qa as a4,ja as a5,_ as a6,oa as a7,d as a8,u as a9,V as aa,Y as ab,Z as ac,W as ad,aa as ae,ta as af,sa as ag,ia as ah,$a as ai,X as aj,Q as ak,Ca as al,P as am,R as an,T as ao,S as ap,i as b,Da as c,pa as d,va as e,Ea as f,wa as g,o as h,ya as i,xa as j,ma as k,b as l,ka as m,fa as n,ha as o,ga as p,A as q,za as r,Aa as s,s as t,B as u,C as v,q as w,j as x,O as y,n as z}