@justifi/webcomponents 6.14.5 → 6.15.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 (443) hide show
  1. package/dist/cjs/{Analytics-BVHauOC2.js → Analytics-VQGAbMVS.js} +3 -3
  2. package/dist/cjs/{Api-BzB0rppJ.js → Api--EGkA-pT.js} +1 -1
  3. package/dist/cjs/{Plaid-B2o4c_Ej.js → Plaid-D85oV9FN.js} +5 -0
  4. package/dist/cjs/additional-questions-form-step_15.cjs.entry.js +7 -7
  5. package/dist/cjs/additional-statement_8.cjs.entry.js +8 -8
  6. package/dist/cjs/bank-account-billing-form-simple_4.cjs.entry.js +4 -4
  7. package/dist/cjs/bank-account-document-form-inputs.cjs.entry.js +1 -1
  8. package/dist/cjs/bank-account-form.cjs.entry.js +5 -5
  9. package/dist/cjs/{business.service-j_VDzA2-.js → business.service-B51fjG_j.js} +2 -2
  10. package/dist/cjs/card-form.cjs.entry.js +5 -5
  11. package/dist/cjs/{check-pkg-version-JMiLuNXu.js → check-pkg-version-RMsgKzFc.js} +1 -1
  12. package/dist/cjs/{checkout-actions-VCJi-q4z.js → checkout-actions-BRQFQ6n-.js} +2 -2
  13. package/dist/cjs/{checkout.service-0vHtBDZY.js → checkout.service-BsOwkSNp.js} +2 -2
  14. package/dist/cjs/{checkout.store-DOa1-SjA.js → checkout.store-DaV9lvEQ.js} +6 -1
  15. package/dist/cjs/custom-popper_2.cjs.entry.js +2 -2
  16. package/dist/cjs/dispute-notification_2.cjs.entry.js +10 -10
  17. package/dist/cjs/{event-types-CMpeGHw8.js → event-types-C_LP6UcW.js} +2 -2
  18. package/dist/cjs/form-address-fields_3.cjs.entry.js +2 -2
  19. package/dist/cjs/form-alert_3.cjs.entry.js +5 -5
  20. package/dist/cjs/form-control-checkbox.cjs.entry.js +2 -2
  21. package/dist/cjs/form-control-date.cjs.entry.js +2 -2
  22. package/dist/cjs/form-control-file-v2_2.cjs.entry.js +3 -3
  23. package/dist/cjs/form-control-file.cjs.entry.js +2 -2
  24. package/dist/cjs/form-control-monetary.cjs.entry.js +2 -2
  25. package/dist/cjs/form-control-number_2.cjs.entry.js +2 -2
  26. package/dist/cjs/form-control-radio.cjs.entry.js +2 -2
  27. package/dist/cjs/form-control-select_2.cjs.entry.js +4 -4
  28. package/dist/cjs/{get-business-BBDsPv-b.js → get-business-BpaRbn5S.js} +2 -2
  29. package/dist/cjs/{get-payment-details-BYZeUFAB.js → get-payment-details-Cmg8gWvo.js} +2 -2
  30. package/dist/cjs/{get-subaccounts-B7e8Eovg.js → get-subaccounts-d4CUegsn.js} +3 -3
  31. package/dist/cjs/{index-CajjbB9t.js → index-DDa1jd08.js} +4 -0
  32. package/dist/cjs/index.cjs.js +1 -1
  33. package/dist/cjs/internal-button.cjs.entry.js +1 -1
  34. package/dist/cjs/{justifi-apple-pay_11.cjs.entry.js → justifi-apple-pay_12.cjs.entry.js} +283 -26
  35. package/dist/cjs/justifi-bank-account-billing-form-simple.cjs.entry.js +6 -6
  36. package/dist/cjs/justifi-bank-account-form.cjs.entry.js +6 -6
  37. package/dist/cjs/justifi-billing-form-full.cjs.entry.js +1 -1
  38. package/dist/cjs/justifi-billing-form.cjs.entry.js +1 -1
  39. package/dist/cjs/justifi-business-details.cjs.entry.js +8 -8
  40. package/dist/cjs/justifi-business-form.cjs.entry.js +8 -8
  41. package/dist/cjs/justifi-card-billing-form-simple.cjs.entry.js +1 -1
  42. package/dist/cjs/justifi-card-form.cjs.entry.js +6 -6
  43. package/dist/cjs/justifi-checkout-qr-code.cjs.entry.js +5 -5
  44. package/dist/cjs/justifi-checkout.cjs.entry.js +8 -8
  45. package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +3 -3
  46. package/dist/cjs/justifi-checkouts-list.cjs.entry.js +10 -10
  47. package/dist/cjs/justifi-dispute-management.cjs.entry.js +8 -8
  48. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +6 -6
  49. package/dist/cjs/justifi-order-terminals.cjs.entry.js +10 -10
  50. package/dist/cjs/justifi-payment-details.cjs.entry.js +16 -16
  51. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +8 -8
  52. package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +8 -8
  53. package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +2 -2
  54. package/dist/cjs/justifi-payments-list.cjs.entry.js +8 -8
  55. package/dist/cjs/justifi-payout-details.cjs.entry.js +11 -11
  56. package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +8 -8
  57. package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +3 -3
  58. package/dist/cjs/justifi-payouts-list.cjs.entry.js +10 -10
  59. package/dist/cjs/justifi-qr-terminal.cjs.entry.js +8 -8
  60. package/dist/cjs/justifi-refund-payment.cjs.entry.js +8 -8
  61. package/dist/cjs/justifi-save-new-payment-method.cjs.entry.js +1 -1
  62. package/dist/cjs/justifi-saved-payment-method.cjs.entry.js +1 -1
  63. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +8 -8
  64. package/dist/cjs/justifi-skeleton.cjs.entry.js +1 -1
  65. package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +4 -4
  66. package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +8 -8
  67. package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +2 -2
  68. package/dist/cjs/justifi-terminals-list.cjs.entry.js +9 -9
  69. package/dist/cjs/loader.cjs.js +1 -1
  70. package/dist/cjs/{package-DfdMLmz7.js → package-DfwuePUh.js} +1 -1
  71. package/dist/cjs/payment-method-option.cjs.entry.js +1 -1
  72. package/dist/cjs/{payment-provisioning-actions-CIsDrh8k.js → payment-provisioning-actions-DDooZhhk.js} +2 -2
  73. package/dist/cjs/{payment.service-Bs3HJ4Kv.js → payment.service-Vy_JnuSA.js} +2 -2
  74. package/dist/cjs/{payout.service-DNWZxt3R.js → payout.service-BEPglFXf.js} +2 -2
  75. package/dist/cjs/{payouts-status-DVU5138C.js → payouts-status-1IUtW-UQ.js} +2 -2
  76. package/dist/cjs/{plaid.service-B_YQGBoC.js → plaid.service-DXQ7q51E.js} +2 -2
  77. package/dist/cjs/radio-list-item.cjs.entry.js +1 -1
  78. package/dist/cjs/save-new-payment-method.cjs.entry.js +3 -3
  79. package/dist/cjs/table-filters-menu.cjs.entry.js +1 -1
  80. package/dist/cjs/terminal-quantity-selector.cjs.entry.js +1 -1
  81. package/dist/cjs/{terminal.service-CvFZEemr.js → terminal.service-BP2YecQ_.js} +2 -2
  82. package/dist/cjs/{utils-WrOn06xB.js → utils-CBriZzRC.js} +1 -1
  83. package/dist/cjs/webcomponents.cjs.js +1 -1
  84. package/dist/collection/api/Checkout.js +5 -0
  85. package/dist/collection/api/Paypal.js +1 -0
  86. package/dist/collection/api/index.js +1 -0
  87. package/dist/collection/api/services/paypal.service.js +9 -0
  88. package/dist/collection/collection-manifest.json +1 -0
  89. package/dist/collection/components/checkout/billing-form/bank-account-billing-form-simple.js +1 -1
  90. package/dist/collection/components/checkout/billing-form/card-billing-form-simple.js +1 -1
  91. package/dist/collection/components/checkout/billing-form/justifi-billing-form.js +1 -1
  92. package/dist/collection/components/checkout/card-form/card-form.js +2 -2
  93. package/dist/collection/components/checkout/justifi-checkout.js +1 -1
  94. package/dist/collection/components/checkout/justifi-saved-payment-method.js +1 -1
  95. package/dist/collection/components/checkout/save-new-payment-method/justifi-save-new-payment-method.js +1 -1
  96. package/dist/collection/components/checkout/save-new-payment-method/save-new-payment-method.js +1 -1
  97. package/dist/collection/components/checkouts-list/checkouts-list-filters.js +3 -3
  98. package/dist/collection/components/checkouts-list/justifi-checkouts-list.js +2 -2
  99. package/dist/collection/components/dispute-management/dispute-notification.js +2 -2
  100. package/dist/collection/components/dispute-management/dispute-response/additional-statement.js +1 -1
  101. package/dist/collection/components/dispute-management/dispute-response/cancellation-policy.js +1 -1
  102. package/dist/collection/components/dispute-management/dispute-response/customer-details.js +1 -1
  103. package/dist/collection/components/dispute-management/dispute-response/dispute-response.js +1 -1
  104. package/dist/collection/components/dispute-management/dispute-response/duplicate-charge.js +1 -1
  105. package/dist/collection/components/dispute-management/dispute-response/electronic-evidence.js +1 -1
  106. package/dist/collection/components/dispute-management/dispute-response/product-or-service.js +1 -1
  107. package/dist/collection/components/dispute-management/dispute-response/refund-policy.js +1 -1
  108. package/dist/collection/components/dispute-management/dispute-response/shipping-details.js +1 -1
  109. package/dist/collection/components/dispute-management/justifi-dispute-management.js +1 -1
  110. package/dist/collection/components/filters/table-filters-menu.js +1 -1
  111. package/dist/collection/components/modular-checkout/ModularCheckout.js +4 -0
  112. package/dist/collection/components/modular-checkout/justifi-modular-checkout.js +75 -11
  113. package/dist/collection/components/modular-checkout/sub-components/justifi-bank-account-billing-form-simple.js +1 -1
  114. package/dist/collection/components/modular-checkout/sub-components/justifi-bank-account-form.js +1 -1
  115. package/dist/collection/components/modular-checkout/sub-components/justifi-billing-form-full.js +1 -1
  116. package/dist/collection/components/modular-checkout/sub-components/justifi-card-billing-form-simple.js +1 -1
  117. package/dist/collection/components/modular-checkout/sub-components/justifi-card-form.js +1 -1
  118. package/dist/collection/components/modular-checkout/sub-components/justifi-checkout-summary.js +1 -1
  119. package/dist/collection/components/modular-checkout/sub-components/payment-method-option.js +1 -1
  120. package/dist/collection/components/modular-checkout/sub-components/paypal/justifi-paypal.js +253 -0
  121. package/dist/collection/components/modular-checkout/sub-components/paypal/paypal.js +17 -0
  122. package/dist/collection/components/order-terminals/justifi-order-terminals.js +1 -1
  123. package/dist/collection/components/order-terminals/terminal-quantity-selector/terminal-quantity-selector.js +1 -1
  124. package/dist/collection/components/payment-details/justifi-payment-details.js +8 -8
  125. package/dist/collection/components/payment-transactions-list/justifi-payment-transactions-list.js +1 -1
  126. package/dist/collection/components/payments-list/justifi-payments-list-filters.js +2 -2
  127. package/dist/collection/components/payments-list/justifi-payments-list.js +1 -1
  128. package/dist/collection/components/payout-details/justifi-payout-details.js +3 -3
  129. package/dist/collection/components/payout-transactions-list/justifi-payout-transactions-list.js +1 -1
  130. package/dist/collection/components/payouts-list/justifi-payouts-list-filters.js +2 -2
  131. package/dist/collection/components/payouts-list/justifi-payouts-list.js +1 -1
  132. package/dist/collection/components/terminal-orders-list/justifi-terminal-orders-list-filters.js +3 -3
  133. package/dist/collection/components/terminal-orders-list/justifi-terminal-orders-list.js +2 -2
  134. package/dist/collection/components/terminals-list/justifi-terminals-list-filters.js +1 -1
  135. package/dist/collection/components/terminals-list/justifi-terminals-list.js +1 -1
  136. package/dist/collection/components/tokenize-payment-method/justifi-tokenize-payment-method.js +1 -1
  137. package/dist/collection/store/checkout.store.js +5 -0
  138. package/dist/collection/ui-components/custom-popper/custom-popper.js +2 -2
  139. package/dist/collection/ui-components/form/form-control-checkbox.js +2 -2
  140. package/dist/collection/ui-components/form/form-control-date.js +2 -2
  141. package/dist/collection/ui-components/form/form-control-file-v2.js +1 -1
  142. package/dist/collection/ui-components/form/form-control-file.js +2 -2
  143. package/dist/collection/ui-components/form/form-control-monetary.js +2 -2
  144. package/dist/collection/ui-components/form/form-control-number-masked.js +2 -2
  145. package/dist/collection/ui-components/form/form-control-number.js +2 -2
  146. package/dist/collection/ui-components/form/form-control-radio.js +2 -2
  147. package/dist/collection/ui-components/form/form-control-select.js +2 -2
  148. package/dist/collection/ui-components/form/form-control-text.js +2 -2
  149. package/dist/collection/ui-components/form/form-control-textarea.js +2 -2
  150. package/dist/collection/ui-components/form/hidden-input.js +1 -1
  151. package/dist/collection/ui-components/form/iframe-input.js +3 -3
  152. package/dist/collection/ui-components/internal-button.js +1 -1
  153. package/dist/collection/ui-components/radio-list-item.js +1 -1
  154. package/dist/collection/ui-components/shadow-dom-components/justifi-button.js +1 -1
  155. package/dist/collection/ui-components/shadow-dom-components/justifi-header.js +1 -1
  156. package/dist/collection/ui-components/shadow-dom-components/justifi-skeleton.js +1 -1
  157. package/dist/docs.json +115 -3
  158. package/dist/esm/{Analytics-Dgz_MQ1D.js → Analytics-hKJLmoJl.js} +3 -3
  159. package/dist/esm/{Api-DScockhO.js → Api-DAJ9sMMj.js} +1 -1
  160. package/dist/esm/{Plaid-DJ-4YL0_.js → Plaid-BP3xNxQF.js} +5 -0
  161. package/dist/esm/additional-questions-form-step_15.entry.js +7 -7
  162. package/dist/esm/additional-statement_8.entry.js +8 -8
  163. package/dist/esm/bank-account-billing-form-simple_4.entry.js +4 -4
  164. package/dist/esm/bank-account-document-form-inputs.entry.js +1 -1
  165. package/dist/esm/bank-account-form.entry.js +5 -5
  166. package/dist/esm/{business.service-DR2ldRqG.js → business.service-kmkjOyTm.js} +2 -2
  167. package/dist/esm/card-form.entry.js +5 -5
  168. package/dist/esm/{check-pkg-version-CPMg0K2m.js → check-pkg-version-FEAmKlDW.js} +1 -1
  169. package/dist/esm/{checkout-actions-DhL8YxrK.js → checkout-actions-0ftD0elo.js} +2 -2
  170. package/dist/esm/{checkout.service-CU4BnB34.js → checkout.service-BVBmNheb.js} +2 -2
  171. package/dist/esm/{checkout.store-B6amfNq_.js → checkout.store-B2mtQcB5.js} +6 -1
  172. package/dist/esm/custom-popper_2.entry.js +2 -2
  173. package/dist/esm/dispute-notification_2.entry.js +10 -10
  174. package/dist/esm/{event-types-BNfdthYa.js → event-types-B5-lsGjZ.js} +2 -2
  175. package/dist/esm/form-address-fields_3.entry.js +2 -2
  176. package/dist/esm/form-alert_3.entry.js +5 -5
  177. package/dist/esm/form-control-checkbox.entry.js +2 -2
  178. package/dist/esm/form-control-date.entry.js +2 -2
  179. package/dist/esm/form-control-file-v2_2.entry.js +3 -3
  180. package/dist/esm/form-control-file.entry.js +2 -2
  181. package/dist/esm/form-control-monetary.entry.js +2 -2
  182. package/dist/esm/form-control-number_2.entry.js +2 -2
  183. package/dist/esm/form-control-radio.entry.js +2 -2
  184. package/dist/esm/form-control-select_2.entry.js +4 -4
  185. package/dist/esm/{get-business-BSyOONF0.js → get-business-BLCT-zfN.js} +2 -2
  186. package/dist/esm/{get-payment-details-CoGzqJ6o.js → get-payment-details-BokzuPGl.js} +2 -2
  187. package/dist/esm/{get-subaccounts-BraeNX17.js → get-subaccounts-By7m_FxO.js} +3 -3
  188. package/dist/esm/{index-DkoufM1t.js → index-DEx8fQeW.js} +4 -0
  189. package/dist/esm/index.js +1 -1
  190. package/dist/esm/internal-button.entry.js +1 -1
  191. package/dist/esm/{justifi-apple-pay_11.entry.js → justifi-apple-pay_12.entry.js} +283 -27
  192. package/dist/esm/justifi-bank-account-billing-form-simple.entry.js +6 -6
  193. package/dist/esm/justifi-bank-account-form.entry.js +6 -6
  194. package/dist/esm/justifi-billing-form-full.entry.js +1 -1
  195. package/dist/esm/justifi-billing-form.entry.js +1 -1
  196. package/dist/esm/justifi-business-details.entry.js +8 -8
  197. package/dist/esm/justifi-business-form.entry.js +8 -8
  198. package/dist/esm/justifi-card-billing-form-simple.entry.js +1 -1
  199. package/dist/esm/justifi-card-form.entry.js +6 -6
  200. package/dist/esm/justifi-checkout-qr-code.entry.js +5 -5
  201. package/dist/esm/justifi-checkout.entry.js +8 -8
  202. package/dist/esm/justifi-checkouts-list-filters.entry.js +3 -3
  203. package/dist/esm/justifi-checkouts-list.entry.js +10 -10
  204. package/dist/esm/justifi-dispute-management.entry.js +8 -8
  205. package/dist/esm/justifi-gross-payment-chart.entry.js +6 -6
  206. package/dist/esm/justifi-order-terminals.entry.js +10 -10
  207. package/dist/esm/justifi-payment-details.entry.js +16 -16
  208. package/dist/esm/justifi-payment-provisioning.entry.js +8 -8
  209. package/dist/esm/justifi-payment-transactions-list.entry.js +8 -8
  210. package/dist/esm/justifi-payments-list-filters.entry.js +2 -2
  211. package/dist/esm/justifi-payments-list.entry.js +8 -8
  212. package/dist/esm/justifi-payout-details.entry.js +11 -11
  213. package/dist/esm/justifi-payout-transactions-list.entry.js +8 -8
  214. package/dist/esm/justifi-payouts-list-filters.entry.js +3 -3
  215. package/dist/esm/justifi-payouts-list.entry.js +10 -10
  216. package/dist/esm/justifi-qr-terminal.entry.js +8 -8
  217. package/dist/esm/justifi-refund-payment.entry.js +8 -8
  218. package/dist/esm/justifi-save-new-payment-method.entry.js +1 -1
  219. package/dist/esm/justifi-saved-payment-method.entry.js +1 -1
  220. package/dist/esm/justifi-season-interruption-insurance.entry.js +8 -8
  221. package/dist/esm/justifi-skeleton.entry.js +1 -1
  222. package/dist/esm/justifi-terminal-orders-list-filters.entry.js +4 -4
  223. package/dist/esm/justifi-terminal-orders-list.entry.js +8 -8
  224. package/dist/esm/justifi-terminals-list-filters.entry.js +2 -2
  225. package/dist/esm/justifi-terminals-list.entry.js +9 -9
  226. package/dist/esm/loader.js +1 -1
  227. package/dist/esm/{package-CiypNylL.js → package-Dn9_7aQh.js} +1 -1
  228. package/dist/esm/payment-method-option.entry.js +1 -1
  229. package/dist/esm/{payment-provisioning-actions-DJKGndr3.js → payment-provisioning-actions-VRIPjnAQ.js} +2 -2
  230. package/dist/esm/{payment.service-BxBf9T-D.js → payment.service-CMUlMV1Y.js} +2 -2
  231. package/dist/esm/{payout.service-DKe3_O4y.js → payout.service-C0yd0JZS.js} +2 -2
  232. package/dist/esm/{payouts-status-C0nijel1.js → payouts-status-CaiC5qpn.js} +2 -2
  233. package/dist/esm/{plaid.service-DwWljJOH.js → plaid.service-CqihCTBS.js} +2 -2
  234. package/dist/esm/radio-list-item.entry.js +1 -1
  235. package/dist/esm/save-new-payment-method.entry.js +3 -3
  236. package/dist/esm/table-filters-menu.entry.js +1 -1
  237. package/dist/esm/terminal-quantity-selector.entry.js +1 -1
  238. package/dist/esm/{terminal.service-Q4KXLOka.js → terminal.service-DuF3uTuA.js} +2 -2
  239. package/dist/esm/{utils-D6LKoG0M.js → utils-YUOJKtjO.js} +1 -1
  240. package/dist/esm/webcomponents.js +1 -1
  241. package/dist/module/ModularCheckout.js +4 -0
  242. package/dist/module/Plaid.js +5 -0
  243. package/dist/module/additional-statement2.js +1 -1
  244. package/dist/module/bank-account-billing-form-simple2.js +1 -1
  245. package/dist/module/cancellation-policy2.js +1 -1
  246. package/dist/module/card-billing-form-simple2.js +1 -1
  247. package/dist/module/card-form2.js +2 -2
  248. package/dist/module/checkout.store.js +5 -0
  249. package/dist/module/custom-popper2.js +2 -2
  250. package/dist/module/customer-details2.js +1 -1
  251. package/dist/module/dispute-notification2.js +2 -2
  252. package/dist/module/dispute-response2.js +1 -1
  253. package/dist/module/duplicate-charge2.js +1 -1
  254. package/dist/module/electronic-evidence2.js +1 -1
  255. package/dist/module/form-control-checkbox2.js +2 -2
  256. package/dist/module/form-control-date2.js +2 -2
  257. package/dist/module/form-control-file-v22.js +1 -1
  258. package/dist/module/form-control-file2.js +2 -2
  259. package/dist/module/form-control-monetary2.js +2 -2
  260. package/dist/module/form-control-number-masked2.js +2 -2
  261. package/dist/module/form-control-number2.js +2 -2
  262. package/dist/module/form-control-radio2.js +2 -2
  263. package/dist/module/form-control-select2.js +2 -2
  264. package/dist/module/form-control-text2.js +2 -2
  265. package/dist/module/form-control-textarea2.js +2 -2
  266. package/dist/module/hidden-input2.js +1 -1
  267. package/dist/module/iframe-input2.js +3 -3
  268. package/dist/module/internal-button2.js +1 -1
  269. package/dist/module/justifi-bank-account-billing-form-simple.js +1 -1
  270. package/dist/module/justifi-bank-account-form.js +1 -1
  271. package/dist/module/justifi-billing-form-full.js +1 -1
  272. package/dist/module/justifi-billing-form.js +1 -1
  273. package/dist/module/justifi-button2.js +1 -1
  274. package/dist/module/justifi-card-billing-form-simple.js +1 -1
  275. package/dist/module/justifi-card-form.js +1 -1
  276. package/dist/module/justifi-checkout-summary2.js +1 -1
  277. package/dist/module/justifi-checkout.js +53 -47
  278. package/dist/module/justifi-checkouts-list-filters.js +2 -2
  279. package/dist/module/justifi-checkouts-list.js +2 -2
  280. package/dist/module/justifi-dispute-management.js +1 -1
  281. package/dist/module/justifi-header2.js +1 -1
  282. package/dist/module/justifi-modular-checkout2.js +75 -11
  283. package/dist/module/justifi-order-terminals.js +1 -1
  284. package/dist/module/justifi-payment-details.js +8 -8
  285. package/dist/module/justifi-payment-transactions-list.js +1 -1
  286. package/dist/module/justifi-payments-list-filters.js +2 -2
  287. package/dist/module/justifi-payments-list.js +1 -1
  288. package/dist/module/justifi-payout-details.js +3 -3
  289. package/dist/module/justifi-payout-transactions-list.js +1 -1
  290. package/dist/module/justifi-payouts-list-filters.js +2 -2
  291. package/dist/module/justifi-payouts-list.js +1 -1
  292. package/dist/module/justifi-paypal.d.ts +11 -0
  293. package/dist/module/justifi-paypal.js +6 -0
  294. package/dist/module/justifi-paypal2.js +226 -0
  295. package/dist/module/justifi-save-new-payment-method.js +1 -1
  296. package/dist/module/justifi-saved-payment-method.js +1 -1
  297. package/dist/module/justifi-skeleton.js +1 -1
  298. package/dist/module/justifi-terminal-orders-list-filters.js +3 -3
  299. package/dist/module/justifi-terminal-orders-list.js +2 -2
  300. package/dist/module/justifi-terminals-list-filters.js +1 -1
  301. package/dist/module/justifi-terminals-list.js +1 -1
  302. package/dist/module/justifi-tokenize-payment-method2.js +1 -1
  303. package/dist/module/package.js +1 -1
  304. package/dist/module/payment-method-option.js +1 -1
  305. package/dist/module/product-or-service2.js +1 -1
  306. package/dist/module/radio-list-item2.js +1 -1
  307. package/dist/module/refund-policy2.js +1 -1
  308. package/dist/module/save-new-payment-method2.js +1 -1
  309. package/dist/module/shipping-details2.js +1 -1
  310. package/dist/module/table-filters-menu2.js +1 -1
  311. package/dist/module/terminal-quantity-selector2.js +1 -1
  312. package/dist/types/api/Checkout.d.ts +13 -1
  313. package/dist/types/api/Paypal.d.ts +11 -0
  314. package/dist/types/api/index.d.ts +1 -0
  315. package/dist/types/api/services/paypal.service.d.ts +8 -0
  316. package/dist/types/components/modular-checkout/ModularCheckout.d.ts +6 -2
  317. package/dist/types/components/modular-checkout/justifi-modular-checkout.d.ts +7 -0
  318. package/dist/types/components/modular-checkout/sub-components/paypal/justifi-paypal.d.ts +36 -0
  319. package/dist/types/components/modular-checkout/sub-components/paypal/paypal.d.ts +39 -0
  320. package/dist/types/components.d.ts +53 -0
  321. package/dist/types/store/checkout.store.d.ts +2 -0
  322. package/dist/webcomponents/index.esm.js +1 -1
  323. package/dist/webcomponents/{p-e7909732.entry.js → p-0d8a256c.entry.js} +1 -1
  324. package/dist/webcomponents/{p-027ef7e9.entry.js → p-0f7cc07b.entry.js} +1 -1
  325. package/dist/webcomponents/p-1034e83d.entry.js +1 -0
  326. package/dist/webcomponents/{p-373586db.entry.js → p-10b91a6c.entry.js} +1 -1
  327. package/dist/webcomponents/p-18306b40.entry.js +1 -0
  328. package/dist/webcomponents/{p-e954f46c.entry.js → p-1a55efda.entry.js} +1 -1
  329. package/dist/webcomponents/p-22a57828.entry.js +1 -0
  330. package/dist/webcomponents/p-2458de56.entry.js +1 -0
  331. package/dist/webcomponents/{p-29f68bd0.entry.js → p-2549c891.entry.js} +1 -1
  332. package/dist/webcomponents/{p-36d7033b.entry.js → p-27b07530.entry.js} +1 -1
  333. package/dist/webcomponents/{p-4f54d1b2.entry.js → p-28fb6b50.entry.js} +1 -1
  334. package/dist/webcomponents/p-2e82a488.entry.js +1 -0
  335. package/dist/webcomponents/{p-f0083ace.entry.js → p-31204dd5.entry.js} +1 -1
  336. package/dist/webcomponents/p-33281304.entry.js +1 -0
  337. package/dist/webcomponents/{p-da21ae43.entry.js → p-36340e63.entry.js} +1 -1
  338. package/dist/webcomponents/p-3642e189.entry.js +1 -0
  339. package/dist/webcomponents/p-36f05f5f.entry.js +1 -0
  340. package/dist/webcomponents/{p-b8d46fc5.entry.js → p-3c33b3c1.entry.js} +1 -1
  341. package/dist/webcomponents/{p-3870712e.entry.js → p-408a4f5f.entry.js} +4 -4
  342. package/dist/webcomponents/{p-041a22dd.entry.js → p-42021e67.entry.js} +1 -1
  343. package/dist/webcomponents/{p-6884fa3d.entry.js → p-5348209c.entry.js} +1 -1
  344. package/dist/webcomponents/p-5a11c49f.entry.js +1 -0
  345. package/dist/webcomponents/{p-2139497d.entry.js → p-5bdae8c7.entry.js} +1 -1
  346. package/dist/webcomponents/p-636c9571.entry.js +1 -0
  347. package/dist/webcomponents/p-76e96874.entry.js +1 -0
  348. package/dist/webcomponents/p-772ab8a3.entry.js +1 -0
  349. package/dist/webcomponents/p-777470cb.entry.js +1 -0
  350. package/dist/webcomponents/p-7e64a668.entry.js +1 -0
  351. package/dist/webcomponents/{p-543fcff2.entry.js → p-80a9f84c.entry.js} +1 -1
  352. package/dist/webcomponents/{p-bc435cae.entry.js → p-86f9d5f6.entry.js} +1 -1
  353. package/dist/webcomponents/{p-d57ae599.entry.js → p-8a5ce8ff.entry.js} +1 -1
  354. package/dist/webcomponents/p-8d11aa27.entry.js +1 -0
  355. package/dist/webcomponents/{p-3086ee7a.entry.js → p-9c45729d.entry.js} +1 -1
  356. package/dist/webcomponents/p-9ed85832.entry.js +1 -0
  357. package/dist/webcomponents/{p-cb977890.entry.js → p-9f0ef3f3.entry.js} +1 -1
  358. package/dist/webcomponents/{p-DD9-ceDZ.js → p-B0DHIvEj.js} +1 -1
  359. package/dist/webcomponents/{p-BL112JyU.js → p-BFi5l0xt.js} +1 -1
  360. package/dist/webcomponents/{p-C8g8unYJ.js → p-BHaO3c8W.js} +1 -1
  361. package/dist/webcomponents/{p-rIJv0FaI.js → p-Ba0_MQtJ.js} +1 -1
  362. package/dist/webcomponents/{p-WnMmPpEb.js → p-Bl00tHyn.js} +1 -1
  363. package/dist/webcomponents/{p-DcA_wt-j.js → p-ByQMBEDC.js} +1 -1
  364. package/dist/webcomponents/p-C-buCQRx.js +1 -0
  365. package/dist/webcomponents/p-CKgQN8v0.js +1 -0
  366. package/dist/webcomponents/p-CLq3Og7o.js +1 -0
  367. package/dist/webcomponents/p-CXsRwohv.js +1 -0
  368. package/dist/webcomponents/p-Cy2N3vAg.js +1 -0
  369. package/dist/webcomponents/p-CyOXIqHo.js +1 -0
  370. package/dist/webcomponents/p-D6uhYbLo.js +1 -0
  371. package/dist/webcomponents/p-DEx8fQeW.js +1 -0
  372. package/dist/webcomponents/{p-Co3Rtlnu.js → p-DZQBPUfH.js} +1 -1
  373. package/dist/webcomponents/p-Dn9_7aQh.js +1 -0
  374. package/dist/webcomponents/{p-CnHbIkmu.js → p-DnLqZpI1.js} +1 -1
  375. package/dist/webcomponents/{p-BlqdDtQr.js → p-DsvK2pes.js} +1 -1
  376. package/dist/webcomponents/{p-H4vl65HO.js → p-FWuMPTxn.js} +1 -1
  377. package/dist/webcomponents/p-Fpaf7CLD.js +1 -0
  378. package/dist/webcomponents/p-a891caf8.entry.js +1 -0
  379. package/dist/webcomponents/{p-537ea763.entry.js → p-aebd2149.entry.js} +1 -1
  380. package/dist/webcomponents/{p-f6b900f4.entry.js → p-af728bc6.entry.js} +1 -1
  381. package/dist/webcomponents/p-b6ce91f0.entry.js +1 -0
  382. package/dist/webcomponents/{p-c14dde7c.entry.js → p-b9664e84.entry.js} +1 -1
  383. package/dist/webcomponents/{p-b17fabdc.entry.js → p-b98ea26a.entry.js} +1 -1
  384. package/dist/webcomponents/{p-61eae8cd.entry.js → p-c4889a06.entry.js} +1 -1
  385. package/dist/webcomponents/p-c6f85bef.entry.js +1 -0
  386. package/dist/webcomponents/p-ca6c5365.entry.js +1 -0
  387. package/dist/webcomponents/p-d05257f9.entry.js +1 -0
  388. package/dist/webcomponents/p-d2e890a3.entry.js +1 -0
  389. package/dist/webcomponents/p-d397b38f.entry.js +1 -0
  390. package/dist/webcomponents/{p-387aba3d.entry.js → p-d446ab68.entry.js} +1 -1
  391. package/dist/webcomponents/{p-49e40ebe.entry.js → p-d4de565d.entry.js} +1 -1
  392. package/dist/webcomponents/{p-b945fa49.entry.js → p-d555220f.entry.js} +1 -1
  393. package/dist/webcomponents/p-dd4eea27.entry.js +1 -0
  394. package/dist/webcomponents/{p-b9316945.entry.js → p-ddba9ab3.entry.js} +1 -1
  395. package/dist/webcomponents/p-e0bce67a.entry.js +1 -0
  396. package/dist/webcomponents/p-e1e5bddf.entry.js +1 -0
  397. package/dist/webcomponents/{p-b9b5d046.entry.js → p-e55216fb.entry.js} +1 -1
  398. package/dist/webcomponents/{p-cb5d2198.entry.js → p-ead48010.entry.js} +1 -1
  399. package/dist/webcomponents/{p-f8f01bbb.entry.js → p-f8764c8e.entry.js} +1 -1
  400. package/dist/webcomponents/{p-c5560a87.entry.js → p-fa2e7534.entry.js} +1 -1
  401. package/dist/webcomponents/p-fda6f27d.entry.js +1 -0
  402. package/dist/webcomponents/p-rznJBkm3.js +1 -0
  403. package/dist/webcomponents/webcomponents.esm.js +1 -1
  404. package/package.json +15 -15
  405. package/LICENSE +0 -21
  406. package/dist/webcomponents/p-04153e8c.entry.js +0 -1
  407. package/dist/webcomponents/p-0464be7b.entry.js +0 -1
  408. package/dist/webcomponents/p-0c1cc1e9.entry.js +0 -1
  409. package/dist/webcomponents/p-0d9022e5.entry.js +0 -1
  410. package/dist/webcomponents/p-0fe976d6.entry.js +0 -1
  411. package/dist/webcomponents/p-15934f30.entry.js +0 -1
  412. package/dist/webcomponents/p-2128265d.entry.js +0 -1
  413. package/dist/webcomponents/p-21a5c3d8.entry.js +0 -1
  414. package/dist/webcomponents/p-25d24964.entry.js +0 -1
  415. package/dist/webcomponents/p-3ef039ec.entry.js +0 -1
  416. package/dist/webcomponents/p-49f279c3.entry.js +0 -1
  417. package/dist/webcomponents/p-4d60d249.entry.js +0 -1
  418. package/dist/webcomponents/p-51714ea9.entry.js +0 -1
  419. package/dist/webcomponents/p-558677a7.entry.js +0 -1
  420. package/dist/webcomponents/p-568b81a2.entry.js +0 -1
  421. package/dist/webcomponents/p-6f34fa90.entry.js +0 -1
  422. package/dist/webcomponents/p-8fO8CrtQ.js +0 -1
  423. package/dist/webcomponents/p-9b758a11.entry.js +0 -1
  424. package/dist/webcomponents/p-9c506058.entry.js +0 -1
  425. package/dist/webcomponents/p-BEOJqK7T.js +0 -1
  426. package/dist/webcomponents/p-C0w_sG9P.js +0 -1
  427. package/dist/webcomponents/p-CMvr3y5s.js +0 -1
  428. package/dist/webcomponents/p-CaLXuYmg.js +0 -1
  429. package/dist/webcomponents/p-CiypNylL.js +0 -1
  430. package/dist/webcomponents/p-CnDagPty.js +0 -1
  431. package/dist/webcomponents/p-D1H6VUbM.js +0 -1
  432. package/dist/webcomponents/p-DNxN6bjU.js +0 -1
  433. package/dist/webcomponents/p-DkoufM1t.js +0 -1
  434. package/dist/webcomponents/p-Dl0CAW76.js +0 -1
  435. package/dist/webcomponents/p-a14d3d7d.entry.js +0 -1
  436. package/dist/webcomponents/p-a47854b9.entry.js +0 -1
  437. package/dist/webcomponents/p-c0bd4006.entry.js +0 -1
  438. package/dist/webcomponents/p-c4799285.entry.js +0 -1
  439. package/dist/webcomponents/p-cc5a97a0.entry.js +0 -1
  440. package/dist/webcomponents/p-d6122124.entry.js +0 -1
  441. package/dist/webcomponents/p-de8c6cd4.entry.js +0 -1
  442. package/dist/webcomponents/p-f6941969.entry.js +0 -1
  443. package/dist/webcomponents/p-f8cff289.entry.js +0 -1
@@ -0,0 +1 @@
1
+ import{f as t}from"./p-Ds_P-dB8.js";var i,s,e,n,a,r,h,o,c,d,u,l,p,f,m,y,_,v,g,k,w,P,b,A,C,S,x,D,U,T,B,E,z;!function(t){t.IFRAME_LOAD_ERROR="iframe-load-error",t.MISSING_PROPS="missing-props",t.FETCH_ERROR="fetch-error",t.PATCH_ERROR="patch-error",t.POST_ERROR="post-error",t.UNKNOWN_ERROR="unknown-error",t.TOKENIZE_ERROR="tokenize-error",t.COMPLETE_CHECKOUT_ERROR="complete-checkout-error",t.CHECKOUT_ALREADY_COMPLETED="checkout-already-completed",t.CHECKOUT_EXPIRED="checkout-expired",t.NOT_AUTHENTICATED="not-authenticated",t.INVALID_PARAMETER="invalid-parameter",t.PROVISIONING_REQUESTED="provisioning-already-requested",t.INVALID_REFUND_AMOUNT="invalid-refund-amount",t.VALIDATION_ERROR="validation-error"}(i||(i={})),function(t){t.INFO="info",t.WARNING="warning",t.ERROR="error"}(s||(s={})),function(t){t.IFRAME_LOAD_ERROR="Payment form failed to load. Please try again.",t.NOT_AUTHENTICATED="Not authenticated. Please provide a valid auth token, checkout id, and account id.",t.CHECKOUT_ALREADY_COMPLETED="Checkout already completed. Please create a new checkout.",t.CHECKOUT_EXPIRED="Checkout expired. Please create a new checkout."}(e||(e={}));class F{constructor(t){this.payment_mode=n[t.payment_mode],this.payment_token=t.payment_token,this.payment_status=t.payment_status,this.payment_response=t.payment_response,this.payment_error_code=t.payment_error_code,this.payment_error_description=t.payment_error_description,this.checkout_id=t.checkout_id,this.additional_transactions=t.additional_transactions,this.payment_id=t.payment_id,this.payment_method_id=t.payment_method_id,this.status=t.status,this.created_at=t.created_at,this.updated_at=t.updated_at}}class I{constructor(t){var i;this.id=t.id,this.description=t.description,this.payment_intent_id=t.payment_intent_id,this.account_id=t.account_id,this.platform_account_id=t.platform_account_id,this.payment_amount=t.payment_amount,this.payment_client_id=t.payment_client_id,this.payment_description=t.payment_description,this.payment_methods=t.payment_methods,this.payment_method_group_id=t.payment_method_group_id,this.payment_settings=t.payment_settings,this.bnpl=t.bnpl,this.paypal=t.paypal,this.total_amount=t.total_amount,this.insurance_amount=t.insurance_amount,this.status=r[t.status],this.payment_currency=t.payment_currency,this.mode=t.mode,this.statement_descriptor=t.statement_descriptor,this.application_fees=t.application_fees,this.successful_payment_id=t.successful_payment_id,this.created_at=t.created_at,this.updated_at=t.updated_at,this.completions=null===(i=t.completions)||void 0===i?void 0:i.map((t=>new F(t)))}get payment_mode(){var t,i,s,e,a,r;let h;if(!this.completions||0===this.completions.length)return n.unknown;const o=this.completions.sort(((t,i)=>new Date(i.updated_at).getTime()-new Date(t.updated_at).getTime()))[0];return o.payment_mode?h=o.payment_mode:(null===(s=null===(i=null===(t=o.payment_response)||void 0===t?void 0:t.data)||void 0===i?void 0:i.payment_method)||void 0===s?void 0:s.card)?h=n.card:(null===(r=null===(a=null===(e=o.payment_response)||void 0===e?void 0:e.data)||void 0===a?void 0:a.payment_method)||void 0===r?void 0:r.bank_account)&&(h=n.bank_account),h}formattedPaymentAmount(i){return t(i,this.payment_currency)}}!function(t){t.bnpl="Buy Now Pay Later",t.ecom="E-commerce",t.card="Card",t.bank_account="Bank Account",t.card_present="Card Present",t.apple_pay="Apple Pay",t.paypal="PayPal",t.venmo="Venmo",t.unknown=""}(n||(n={})),function(t){t.bnpl="bnpl",t.ecom="ecom",t.apple_pay="apple_pay",t.paypal="paypal",t.venmo="venmo"}(a||(a={})),function(t){t.created="created",t.completed="completed",t.attempted="attempted",t.expired="expired"}(r||(r={})),function(t){t.failed="failed",t.succeeded="succeeded"}(h||(h={})),function(t){t.won="won",t.lost="lost",t.underReview="under_review",t.needsResponse="needs_response"}(o||(o={}));class M{get needsResponse(){return this.status==o.needsResponse}get underReview(){return this.status==o.underReview}get won(){return this.status==o.won}get lost(){return this.status==o.lost}constructor(t){this.id=t.id,this.amount=t.amount,this.currency=t.currency,this.payment_id=t.payment_id,this.reason=t.reason,this.due_date=t.due_date,this.status=t.status,this.metadata=t.metadata,this.created_at=t.created_at,this.updated_at=t.updated_at,this.dispute_response=t.dispute_response?new N(t.dispute_response):void 0}}class N{constructor(t){this.additional_statement=t.additional_statement,this.cancellation_policy_disclosure=t.cancellation_policy_disclosure,this.cancellation_rebuttal=t.cancellation_rebuttal,this.customer_billing_address=t.customer_billing_address,this.customer_email_address=t.customer_email_address,this.customer_name=t.customer_name,this.customer_purchase_ip_address=t.customer_purchase_ip_address,this.duplicate_charge_explanation=t.duplicate_charge_explanation,this.product_description=t.product_description,this.refund_policy_disclosure=t.refund_policy_disclosure,this.refund_refusal_explanation=t.refund_refusal_explanation,this.service_date=t.service_date,this.shipping_address=t.shipping_address,this.shipping_carrier=t.shipping_carrier,this.shipping_date=t.shipping_date,this.shipping_tracking_number=t.shipping_tracking_number,this.duplicate_charge_original_payment_id=t.duplicate_charge_original_payment_id}}!function(t){t.automatic="automatic",t.manual="manual"}(c||(c={})),function(t){t.card="card",t.bankAccount="bankAccount",t.sezzle="sezzle",t.plaid="plaid",t.applePay="applePay"}(d||(d={})),function(t){t.card="Card",t.bankAccount="ACH",t.unknown="Unknown"}(u||(u={})),function(t){t.pending="pending",t.automatic="automatic",t.authorized="authorized",t.succeeded="succeeded",t.failed="failed",t.canceled="canceled",t.disputed="disputed",t.fully_refunded="fully_refunded",t.partially_refunded="partially_refunded"}(l||(l={})),function(t){t.usd="usd",t.cad="cad"}(p||(p={}));class R{constructor(t){this.card=t.card?new V(t.card):void 0,this.bank_account=t.bank_account?new q(t.bank_account):void 0}get payersName(){return this.card?this.card.name:this.bank_account?this.bank_account.name:null}get lastFourDigits(){return this.card?`**** ${this.card.acct_last_four}`:this.bank_account?`**** ${this.bank_account.acct_last_four}`:null}}class q{constructor(t){this.id=t.id,this.acct_last_four=t.acct_last_four,this.name=t.name,this.brand=t.brand,this.token=t.token,this.created_at=t.created_at,this.updated_at=t.updated_at}}class V{constructor(t){this.id=t.id||"",this.acct_last_four=t.acct_last_four,this.name=t.name,this.brand=t.brand,this.token=t.token,this.created_at=t.created_at,this.updated_at=t.updated_at}}class j{constructor(t){this.id=t.id,this.account_id=t.account_id,this.currency=t.currency,this.amount=t.amount,this.amount_disputed=t.amount_disputed,this.amount_refundable=t.amount_refundable,this.amount_refunded=t.amount_refunded,this.balance=t.balance,this.captured=t.captured,this.capture_strategy=t.capture_strategy,this.description=t.description,this.disputed=t.disputed,this.disputes=t.disputes,this.error_code=t.error_code,this.error_description=t.error_description,this.expedited=t.expedited,this.fee_amount=t.fee_amount,this.is_test=t.is_test,this.metadata=t.metadata,this.payment_method=new R(t.payment_method),this.payment_intent_id=t.payment_intent_id,this.refunded=t.refunded,this.status=t.status,this.created_at=t.created_at,this.updated_at=t.updated_at}get disputedStatus(){const t=this.disputes.some((t=>t.status===o.lost));return this.disputed?t?o.lost:"open":null}get payment_type(){return this.payment_method?this.payment_method.card?u.card:u.bankAccount:u.unknown}get payers_name(){return this.payment_method.payersName}get last_four_digits(){return this.payment_method.lastFourDigits}formattedPaymentAmount(i){return t(i,this.currency)}}!function(t){t.payment="payment",t.paymentFee="payment_fee",t.payout="payout",t.refund="refund",t.feeRefund="fee_refund",t.dispute="dispute",t.disputeFee="dispute_fee",t.disputeFeeRefund="dispute_fee_refund",t.disputeRefund="dispute_refund",t.applicationFeeReturned="application_fee_returned"}(f||(f={}));class L{constructor(t){this.id=t.id,this.amount=t.amount,this.balance=t.balance,this.currency=t.currency,this.financial_transaction_id=t.financial_transaction_id,this.payment_id=t.payment_id,this.payment_balance_txn_type=t.payment_balance_txn_type,this.source_id=t.source_id,this.source_type=t.source_type,this.created_at=t.created_at,this.updated_at=t.updated_at}get displayTransactionId(){return this.payment_balance_txn_type===f.paymentFee||this.payment_balance_txn_type===f.applicationFeeReturned?"--":this.source_id}formattedPaymentAmount(i){return t(i,this.currency)}}!function(t){t.paid="paid",t.failed="failed",t.forwarded="forwarded",t.scheduled="scheduled",t.in_transit="in_transit",t.canceled="canceled"}(m||(m={})),function(t){t.paid="Paid",t.failed="Failed",t.forwarded="Forwarded",t.scheduled="Scheduled",t.in_transit="In Transit",t.canceled="Canceled"}(y||(y={}));class Y{constructor(t){this.id=t.id,this.account_id=t.account_id,this.currency=t.currency,this.amount=t.amount,this.bank_account=t.bank_account,this.delivery_method=t.delivery_method||"standard",this.description=t.description,this.deposits_at=t.deposits_at,this.fees_total=t.fees_total,this.refunds_count=t.refunds_count,this.refunds_total=t.refunds_total,this.payments_count=t.payments_count,this.payments_total=t.payments_total,this.payout_type=t.payout_type,this.other_total=t.other_total,this.status=t.status,this.metadata=t.metadata,this.created_at=t.created_at,this.updated_at=t.updated_at,this.settlement_priority=t.settlement_priority||"standard"}formattedPaymentAmount(i){return t(i,this.currency)}}!function(t){t.fee="fee",t.payment="payment",t.payout="payout",t.sellerPaymentRefund="seller_payment_refund",t.disputeAmountCollected="dispute_amount_collected",t.disputeFeeCollected="dispute_fee_collected",t.sellerPayment="seller_payment",t.transfer="transfer",t.partnerPlatformProceedsCredit="partner_platform_proceeds_credit"}(_||(_={}));class ${constructor(t){this.id=t.id,this.account_id=t.account_id,this.payout_id=t.payout_id,this.financial_transaction_id=t.financial_transaction_id,this.amount=t.amount,this.fee=t.fee,this.net=t.net,this.currency=t.currency,this.source_id=t.source_id,this.description=t.description,this.txn_type=t.txn_type,this.created_at=t.created_at,this.available_on=t.available_on,this.updated_at=t.updated_at}formattedPaymentAmount(i){return t(i,this.currency)}}!function(t){t.connected="connected",t.disconnected="disconnected",t.unknown="unknown",t.pending_configuration="pending_configuration",t.archived="archived"}(v||(v={})),function(t){t.verifone="verifone"}(g||(g={}));class H{constructor(t){this.id=t.id||"",this.status=t.status,this.account_id=t.account_id||"",this.platform_account_id=t.platform_account_id||"",this.provider=t.provider||null,this.provider_id=t.provider_id||"",this.provider_serial_number=t.provider_serial_number||"",this.created_at=t.created_at||"",this.updated_at=t.updated_at||"",this.verified_at=t.verified_at||"",this.nickname=t.nickname||"",this.model_name=t.model_name||null}}!function(t){t.boardingOnly="boarding_only",t.boardingShipping="boarding_shipping"}(k||(k={})),function(t){t.created="created",t.submitted="submitted",t.completed="completed",t.in_progress="in_progress",t.on_hold="on_hold",t.canceled="canceled"}(w||(w={}));class Q{constructor(t){this.id=t.id,this.business_id=t.business_id,this.company_name=t.company_name,this.sub_account_id=t.sub_account_id,this.provider=t.provider||g.verifone,this.order_items=[],this.order_type=t.order_type,this.order_status=t.order_status,this.terminals=t.terminals,this.created_at=t.created_at,this.updated_at=t.updated_at}get payload(){return{business_id:this.business_id,sub_account_id:this.sub_account_id,order_type:this.order_type,order_items:this.order_items}}get totalQuantity(){return this.order_items.reduce(((t,i)=>t+i.quantity),0)}updateTerminal(t,i){if(0===i)return void(this.order_items=this.order_items.filter((i=>i.model_name!==t)));const s=this.order_items.find((i=>i.model_name===t));s?s.quantity=i:this.order_items.push({model_name:t,quantity:i})}}!function(t){t.v400="v400",t.p400="p400+",t.e285="e285"}(P||(P={}));class W{constructor(t){this.id=t.id,this.model_name=t.model_name,this.description=t.description,this.image_url=t.image_url,this.help_url=t.help_url}}!function(t){t.test="test",t.live="live"}(b||(b={})),function(t){t.created="created",t.submitted="submitted",t.information_needed="information_needed",t.rejected="rejected",t.enabled="enabled",t.disabled="disabled",t.archived="archived"}(A||(A={}));class G{constructor(t){this.id=t.id,this.name=t.name,this.account_type=t.account_type,this.status=t.status,this.currency=t.currency,this.platform_account_id=t.platform_account_id,this.payout_account_id=t.payout_account_id,this.business_id=t.business_id,this.application_fee_rates=t.application_fee_rates,this.processing_ready=t.processing_ready,this.payout_ready=t.payout_ready,this.related_accounts=t.related_accounts,this.created_at=t.created_at,this.updated_at=t.updated_at}}!function(t){t.voidedCheck="voided_check",t.balanceSheet="balance_sheet",t.bankStatement="bank_statement",t.governmentId="government_id",t.profitAndLossStatement="profit_and_loss_statement",t.taxReturn="tax_return",t.other="other",t.articlesOfIncorporation="articles_of_incorporation",t.businessRegistration="business_registration",t.passport="passport",t.driverLicense="driver_license",t.residentCard="resident_card",t.statusCard="status_card",t.nexusCard="nexus_card",t.citizenshipCard="citizenship_card",t.foreignPassport="foreign_passport",t.birthCertificate="birth_certificate",t.sinCard="sin_card",t.ssnCard="ssn_card"}(C||(C={})),function(t){t.pending="pending",t.uploaded="uploaded",t.canceled="canceled",t.needed="needed"}(S||(S={}));class J{constructor(t,i){this.fileData=null,this.file=t.file,this.document_type=t.document_type,this.presigned_url=null,this.record_data={business_id:i,document_type:this.document_type,file_name:this.file.name,file_type:this.file.type}}async getFileData(){if(this.fileData)return this.fileData;const t=new Promise(((t,i)=>{const s=new FileReader;s.onload=i=>{this.fileData=i.target.result,t(this.fileData)},s.onerror=()=>{i(new Error("Error reading file"))},s.readAsArrayBuffer(this.file)}));return await t}setPresignedUrl(t){this.presigned_url=t}}!function(t){t.succeeded="succeeded",t.failed="failed"}(x||(x={})),function(t){t.customerRequest="customer_request",t.duplicate="duplicate",t.fraudulent="fraudulent"}(D||(D={}));class K{constructor(t){this.amount=t.amount,this.reason=t.reason,this.description=t.description,this.metadata=t.metadata}}!function(t){t.STATUS_SUCCESS="STATUS_SUCCESS",t.STATUS_FAILURE="STATUS_FAILURE"}(U||(U={})),function(t){t.PLAIN="plain",t.BUY="buy",t.SET_UP="set-up",t.DONATE="donate",t.CHECK_OUT="check-out",t.BOOK="book",t.SUBSCRIBE="subscribe"}(T||(T={})),function(t){t.BLACK="black",t.WHITE="white",t.WHITE_OUTLINE="white-outline"}(B||(B={})),function(t){t.SUPPORTS_3DS="supports3DS",t.SUPPORTS_EMV="supportsEMV",t.SUPPORTS_CREDIT="supportsCredit",t.SUPPORTS_DEBIT="supportsDebit"}(E||(E={}));class O{constructor(t){this.merchantIdentifier=t.merchantIdentifier,this.displayName=t.displayName,this.initiative=t.initiative,this.initiativeContext=t.initiativeContext,this.buttonType=t.buttonType||T.PLAIN,this.buttonStyle=t.buttonStyle||B.BLACK,this.buttonLocale=t.buttonLocale||"en-US"}get isValid(){return!!(this.merchantIdentifier&&this.displayName&&this.initiative&&this.initiativeContext)}}class X{constructor(t){this.countryCode=t.countryCode,this.currencyCode=t.currencyCode,this.merchantCapabilities=t.merchantCapabilities,this.supportedNetworks=t.supportedNetworks,this.total=t.total,this.lineItems=t.lineItems,this.shippingMethods=t.shippingMethods,this.applicationData=t.applicationData,this.supportedCountries=t.supportedCountries}get isValid(){var t,i,s,e;return!!(this.countryCode&&this.currencyCode&&(null===(t=this.merchantCapabilities)||void 0===t?void 0:t.length)&&(null===(i=this.supportedNetworks)||void 0===i?void 0:i.length)&&(null===(s=this.total)||void 0===s?void 0:s.label)&&(null===(e=this.total)||void 0===e?void 0:e.amount))}}class Z{static isApplePaySupported(){var t;return"undefined"!=typeof window&&"ApplePaySession"in window&&(null===(t=window.ApplePaySession)||void 0===t?void 0:t.supportsVersion(3))}static canMakePayments(){var t;return this.isApplePaySupported()&&(null===(t=window.ApplePaySession)||void 0===t?void 0:t.canMakePayments())||!1}static async canMakePaymentsWithActiveCard(t){var i;if(!this.isApplePaySupported())return!1;try{return await(null===(i=window.ApplePaySession)||void 0===i?void 0:i.canMakePaymentsWithActiveCard(t))||!1}catch(t){return console.error("Error checking Apple Pay active card:",t),!1}}static formatAmount(t){return(t/100).toFixed(2)}static parseAmount(t){return Math.round(100*parseFloat(t))}static createLineItem(t,i,s="final"){return{label:t,amount:this.formatAmount(i),type:s}}static getDefaultSupportedNetworks(){return["amex","discover","masterCard","visa"]}static getDefaultMerchantCapabilities(){return[E.SUPPORTS_3DS,E.SUPPORTS_EMV,E.SUPPORTS_CREDIT,E.SUPPORTS_DEBIT]}}!function(t){t.PLAID_SDK_LOAD_FAILED="plaid-sdk-load-failed",t.PLAID_LINK_INIT_FAILED="plaid-link-init-failed",t.PLAID_LINK_TOKEN_FAILED="plaid-link-token-failed",t.PLAID_AUTHENTICATION_FAILED="plaid-authentication-failed",t.PLAID_BANK_NOT_SUPPORTED="plaid-bank-not-supported",t.PLAID_TOKEN_EXPIRED="plaid-token-expired",t.PLAID_NETWORK_ERROR="plaid-network-error",t.PLAID_USER_CANCELLED="plaid-user-cancelled",t.PLAID_TIMEOUT="plaid-timeout",t.PLAID_INVALID_CREDENTIALS="plaid-invalid-credentials",t.PLAID_ACCOUNT_LOCKED="plaid-account-locked",t.PLAID_MAINTENANCE="plaid-maintenance",t.PLAID_RATE_LIMITED="plaid-rate-limited"}(z||(z={}));const tt={[z.PLAID_SDK_LOAD_FAILED]:"Unable to load Plaid. Please refresh the page and try again.",[z.PLAID_LINK_INIT_FAILED]:"Unable to initialize bank connection. Please try again.",[z.PLAID_LINK_TOKEN_FAILED]:"Unable to connect to bank service. Please try again.",[z.PLAID_AUTHENTICATION_FAILED]:"Bank authentication failed. Please try again.",[z.PLAID_BANK_NOT_SUPPORTED]:"Your bank is not currently supported. Please try a different payment method.",[z.PLAID_TOKEN_EXPIRED]:"Your bank session has expired. Please reconnect your account.",[z.PLAID_NETWORK_ERROR]:"Network connection issue. Please check your internet connection and try again.",[z.PLAID_USER_CANCELLED]:"Bank connection was cancelled. Click to try again.",[z.PLAID_TIMEOUT]:"Bank connection timed out. Please try again.",[z.PLAID_INVALID_CREDENTIALS]:"Invalid bank credentials. Please check your username and password.",[z.PLAID_ACCOUNT_LOCKED]:"Your bank account is temporarily locked. Please contact your bank.",[z.PLAID_MAINTENANCE]:"Bank service is temporarily unavailable. Please try again later.",[z.PLAID_RATE_LIMITED]:"Too many connection attempts. Please wait a moment and try again."},it={[z.PLAID_SDK_LOAD_FAILED]:s.ERROR,[z.PLAID_LINK_INIT_FAILED]:s.ERROR,[z.PLAID_LINK_TOKEN_FAILED]:s.ERROR,[z.PLAID_AUTHENTICATION_FAILED]:s.ERROR,[z.PLAID_BANK_NOT_SUPPORTED]:s.WARNING,[z.PLAID_TOKEN_EXPIRED]:s.WARNING,[z.PLAID_NETWORK_ERROR]:s.WARNING,[z.PLAID_USER_CANCELLED]:s.INFO,[z.PLAID_TIMEOUT]:s.WARNING,[z.PLAID_INVALID_CREDENTIALS]:s.ERROR,[z.PLAID_ACCOUNT_LOCKED]:s.ERROR,[z.PLAID_MAINTENANCE]:s.WARNING,[z.PLAID_RATE_LIMITED]:s.WARNING};export{O as A,J as B,s as C,M as D,C as E,r as I,y as P,D as R,G as S,w as T,a,i as b,e as c,h as d,j as e,k as f,v as g,o as h,l as i,L as j,Y as k,$ as l,I as m,H as n,W as o,Q as p,K as q,Z as r,X as s,U as t,B as u,T as v,E as w,it as x,tt as y,z}
@@ -0,0 +1 @@
1
+ var a,t,s;!function(a){a.ECOM="ecom",a.BNPL="bnpl",a.APPLE_PAY="apple_pay",a.GOOGLE_PAY="google_pay",a.PAYPAL="paypal",a.VENMO="venmo"}(a||(a={})),function(a){a.CARD="card",a.BANK_ACCOUNT="bank_account",a.APPLE_PAY="apple_pay",a.GOOGLE_PAY="google_pay",a.SEZZLE="sezzle",a.PLAID="plaid"}(t||(t={})),function(a){a.SAVED_CARD="saved_card",a.NEW_CARD="new_card",a.SAVED_BANK_ACCOUNT="saved_bank_account",a.NEW_BANK_ACCOUNT="new_bank_account",a.APPLE_PAY="apple_pay",a.GOOGLE_PAY="google_pay",a.SEZZLE="sezzle",a.PLAID="plaid",a.PAYPAL="paypal",a.VENMO="venmo"}(s||(s={}));class e{constructor(a){this.id=a.id,this.type=(a=>{switch(a){case t.CARD:return s.SAVED_CARD;case t.BANK_ACCOUNT:return s.SAVED_BANK_ACCOUNT;default:return a}})(a.type),this.status=a.status,this.invalid_reason=a.invalid_reason,this.name=a.name,this.brand=a.brand,this.acct_last_four=a.acct_last_four,this.account_type=a.account_type,this.month=a.month,this.year=a.year,this.address_line1_check=a.address_line1_check,this.address_postal_code_check=a.address_postal_code_check,this.bin_details=a.bin_details}}export{s as P,e as a,a as b}
@@ -1 +1 @@
1
- import{C as t}from"./p-8fO8CrtQ.js";import{g as a,a as e}from"./p-D1H6VUbM.js";import{h as r}from"./p-CV0Pyo1O.js";import{B as n,a as i}from"./p-Dz8KJn2G.js";const o=({authToken:r,service:n})=>async({payoutId:i,onError:o})=>{try{const{data:t}=await n.fetchCSV(i,r),a=document.createElement("a");a.href=t.csv_url,a.click()}catch(r){o({error:e(r),code:a(null==r?void 0:r.code),severity:t.ERROR})}},d=t=>r(i,Object.assign({},{canceled:{variant:n.DANGER,title:"Transfer to your bank account failed",text:"Canceled"},failed:{variant:n.DANGER,title:"Transfer to your bank account failed",text:"Failed"},forwarded:{variant:n.SECONDARY,title:"This payout initially failed; the funds have been forwarded to your next successful payout",text:"Forwarded"},in_transit:{variant:n.PRIMARY,title:"Transfer to your bank account has been initiated",text:"In Transit"},paid:{variant:n.SUCCESS,title:"Successfully deposited into your bank account",text:"Paid"},pending:{variant:n.PRIMARY,title:"Batched and scheduled to be transferred",text:"Pending"},scheduled:{variant:n.PRIMARY,title:"Batched and scheduled to be transferred",text:"Scheduled"},withdrawn:{variant:n.SUCCESS,title:"Negative payout balance successfully withdrawn from your bank account",text:"Withdrawn"}}[t]));export{d as M,o as m}
1
+ import{C as t}from"./p-D6uhYbLo.js";import{g as a,a as e}from"./p-CLq3Og7o.js";import{h as r}from"./p-CV0Pyo1O.js";import{B as n,a as i}from"./p-Dz8KJn2G.js";const o=({authToken:r,service:n})=>async({payoutId:i,onError:o})=>{try{const{data:t}=await n.fetchCSV(i,r),a=document.createElement("a");a.href=t.csv_url,a.click()}catch(r){o({error:e(r),code:a(null==r?void 0:r.code),severity:t.ERROR})}},d=t=>r(i,Object.assign({},{canceled:{variant:n.DANGER,title:"Transfer to your bank account failed",text:"Canceled"},failed:{variant:n.DANGER,title:"Transfer to your bank account failed",text:"Failed"},forwarded:{variant:n.SECONDARY,title:"This payout initially failed; the funds have been forwarded to your next successful payout",text:"Forwarded"},in_transit:{variant:n.PRIMARY,title:"Transfer to your bank account has been initiated",text:"In Transit"},paid:{variant:n.SUCCESS,title:"Successfully deposited into your bank account",text:"Paid"},pending:{variant:n.PRIMARY,title:"Batched and scheduled to be transferred",text:"Pending"},scheduled:{variant:n.PRIMARY,title:"Batched and scheduled to be transferred",text:"Scheduled"},withdrawn:{variant:n.SUCCESS,title:"Negative payout balance successfully withdrawn from your bank account",text:"Withdrawn"}}[t]));export{d as M,o as m}
@@ -0,0 +1 @@
1
+ var e={name:"@justifi/webcomponents",version:"6.15.0-rc.1"};export{e as p}
@@ -1 +1 @@
1
- import{A as t}from"./p-WnMmPpEb.js";import"./p-8fO8CrtQ.js";import"./p-CLHwhyvu.js";import"./p-DaDqgDrb.js";const n=t();class e{async fetchBusiness(t,e){return n.get({endpoint:`entities/business/${t}`,authToken:e})}async patchBusiness(t,e,s){return n.patch({endpoint:`entities/business/${e}`,body:s,authToken:t})}}class s{async fetchIdentity(t,e){return n.get({endpoint:`entities/identity/${t}`,authToken:e})}async patchIdentity(t,e,s){return n.patch({endpoint:`entities/identity/${e}`,body:s,authToken:t})}async postIdentity(t,e){return n.post({endpoint:"entities/identity",body:e,authToken:t})}}class i{async postBankAccount(t,e){return n.post({endpoint:"entities/bank_accounts",body:e,authToken:t})}}class o{async postDocumentRecord(t,e){return n.post({endpoint:"entities/document",body:e,authToken:t})}}export{e as B,o as D,s as I,i as a}
1
+ import{A as t}from"./p-Bl00tHyn.js";import"./p-D6uhYbLo.js";import"./p-CLHwhyvu.js";import"./p-DaDqgDrb.js";const n=t();class e{async fetchBusiness(t,e){return n.get({endpoint:`entities/business/${t}`,authToken:e})}async patchBusiness(t,e,s){return n.patch({endpoint:`entities/business/${e}`,body:s,authToken:t})}}class s{async fetchIdentity(t,e){return n.get({endpoint:`entities/identity/${t}`,authToken:e})}async patchIdentity(t,e,s){return n.patch({endpoint:`entities/identity/${e}`,body:s,authToken:t})}async postIdentity(t,e){return n.post({endpoint:"entities/identity",body:e,authToken:t})}}class i{async postBankAccount(t,e){return n.post({endpoint:"entities/bank_accounts",body:e,authToken:t})}}class o{async postDocumentRecord(t,e){return n.post({endpoint:"entities/document",body:e,authToken:t})}}export{e as B,o as D,s as I,i as a}
@@ -1 +1 @@
1
- import{A as t}from"./p-WnMmPpEb.js";import"./p-8fO8CrtQ.js";import"./p-CLHwhyvu.js";import"./p-DaDqgDrb.js";const e=t();class o{async fetchCheckout(t,o){return e.get({endpoint:`checkouts/${o}`,authToken:t})}async fetchCheckouts(t,o,c){return e.get({endpoint:"checkouts",params:c,headers:{Account:t},authToken:o})}async complete(t,o,c){const n=`checkouts/${o}/complete`,s={payment_mode:c.payment_mode};return c.payment_token&&(s.payment_token=c.payment_token),e.post({endpoint:n,body:s,authToken:t})}}export{o as C}
1
+ import{A as t}from"./p-Bl00tHyn.js";import"./p-D6uhYbLo.js";import"./p-CLHwhyvu.js";import"./p-DaDqgDrb.js";const e=t();class o{async fetchCheckout(t,o){return e.get({endpoint:`checkouts/${o}`,authToken:t})}async fetchCheckouts(t,o,c){return e.get({endpoint:"checkouts",params:c,headers:{Account:t},authToken:o})}async complete(t,o,c){const n=`checkouts/${o}/complete`,s={payment_mode:c.payment_mode};return c.payment_token&&(s.payment_token=c.payment_token),e.post({endpoint:n,body:s,authToken:t})}}export{o as C}
@@ -1 +1 @@
1
- import{A as t}from"./p-WnMmPpEb.js";import"./p-8fO8CrtQ.js";import"./p-CLHwhyvu.js";import"./p-DaDqgDrb.js";const a=t();class n{async fetchPayouts(t,n,o){return a.get({authToken:n,endpoint:`account/${t}/payouts`,params:o})}async fetchPayout(t,n){return a.get({authToken:n,endpoint:`payouts/${t}`})}async fetchCSV(t,n){return a.get({authToken:n,endpoint:`reports/payouts/${t}`})}async fetchPayoutTransactions(t,n,o){return a.get({authToken:n,endpoint:"balance_transactions",params:o,headers:{"sub-account":t}})}}export{n as P}
1
+ import{A as t}from"./p-Bl00tHyn.js";import"./p-D6uhYbLo.js";import"./p-CLHwhyvu.js";import"./p-DaDqgDrb.js";const a=t();class n{async fetchPayouts(t,n,o){return a.get({authToken:n,endpoint:`account/${t}/payouts`,params:o})}async fetchPayout(t,n){return a.get({authToken:n,endpoint:`payouts/${t}`})}async fetchCSV(t,n){return a.get({authToken:n,endpoint:`reports/payouts/${t}`})}async fetchPayoutTransactions(t,n,o){return a.get({authToken:n,endpoint:"balance_transactions",params:o,headers:{"sub-account":t}})}}export{n as P}
@@ -0,0 +1 @@
1
+ import{c as e}from"./p-DgTOxu8x.js";import{P as n}from"./p-DEx8fQeW.js";const a={accountId:"",authToken:"",billingFormFields:{address_postal_code:""},bnplEnabled:!1,isSubmitting:!1,isWalletProcessing:!1,applePayEnabled:!1,googlePayEnabled:!1,paypalEnabled:!1,paypalProviderClientId:"",achPaymentsEnabled:!1,insuranceEnabled:!1,bnplProviderApiVersion:"",bnplProviderCheckoutUrl:"",bnplProviderClientId:"",bnplProviderMode:"",checkoutId:"",checkoutLoaded:!1,checkoutMode:null,bankAccountVerification:void 0,disableBankAccount:!1,disableCreditCard:!1,disablePaymentMethodGroup:!1,paymentAmount:0,paymentCurrency:"USD",paymentDescription:"",paymentMethodGroupId:void 0,paymentMethods:[],paymentToken:void 0,savePaymentMethod:!1,selectedPaymentMethod:void 0,totalAmount:0,plaidPublicToken:void 0,plaidLinkTokenId:void 0},{state:t,onChange:o}=e(a);function d(){var e;const a=[],o=!t.checkoutLoaded||t.achPaymentsEnabled;if(!t.disablePaymentMethodGroup&&(null===(e=t.paymentMethods)||void 0===e?void 0:e.length)){const e=t.paymentMethods.some((e=>e.type===n.SAVED_CARD)),d=t.paymentMethods.some((e=>e.type===n.SAVED_BANK_ACCOUNT));e&&!t.disableCreditCard&&a.push(n.SAVED_CARD),d&&!t.disableBankAccount&&o&&a.push(n.SAVED_BANK_ACCOUNT)}return t.disableCreditCard||a.push(n.NEW_CARD),!t.disableBankAccount&&o&&a.push(n.NEW_BANK_ACCOUNT),t.bnplEnabled&&a.push(n.SEZZLE),t.applePayEnabled&&a.push(n.APPLE_PAY),t.googlePayEnabled&&a.push(n.GOOGLE_PAY),t.paypalEnabled&&a.push(n.PAYPAL),!0===t.bankAccountVerification&&!t.disableBankAccount&&o&&a.push(n.PLAID),a}function i(){var e;return{selectedPaymentMethod:t.selectedPaymentMethod,paymentAmount:t.paymentAmount,totalAmount:t.totalAmount,paymentCurrency:t.paymentCurrency,paymentDescription:t.paymentDescription,savedPaymentMethods:t.paymentMethods,savePaymentMethod:t.savePaymentMethod,bnplEnabled:t.bnplEnabled,applePayEnabled:t.applePayEnabled,insuranceEnabled:t.insuranceEnabled,disableBankAccount:t.disableBankAccount,disableCreditCard:t.disableCreditCard,disablePaymentMethodGroup:t.disablePaymentMethodGroup,paymentToken:null!==(e=t.paymentToken)&&void 0!==e?e:void 0}}function l(e){let n=!1,t=!0;const d=Object.keys(a).map((a=>o(a,(()=>{!n&&t&&(n=!0,queueMicrotask((()=>{n=!1,t&&e()})))}))));return()=>{t=!1,d.forEach((e=>e()))}}Object.keys(a).forEach((e=>{o(e,(n=>{t[e]=n}))}));export{l as a,i as b,t as c,d as g,o}
@@ -0,0 +1 @@
1
+ import{h as t,r as e,c as a}from"./p-CV0Pyo1O.js";import{c as s}from"./p-B4vLfYnZ.js";import"./p-HXpYMWUU.js";import{l as i,C as r,b as o}from"./p-D6uhYbLo.js";import{p as c}from"./p-CLHwhyvu.js";import"./p-DaDqgDrb.js";import{J as n}from"./p-BHaO3c8W.js";import{c as d}from"./p-ByQMBEDC.js";import{g as p,a as h}from"./p-CLq3Og7o.js";import{P as l}from"./p-FWuMPTxn.js";import{T as f,a as u,b as m,c as b,d as y,e as _,f as g,g as w,h as T,i as j,j as v,k as D,l as k}from"./p-DZr0wLGh.js";import{S as P}from"./p-05AWudQe.js";import{T as C}from"./p-CZfYo5-1.js";import{a as O}from"./p-Ds_P-dB8.js";import{a6 as S,a7 as F}from"./p-Bu7gdOaV.js";import"./p-DgTOxu8x.js";import"./p-Dn9_7aQh.js";import"./p-Bl00tHyn.js";import"./p-MPer3Rw7.js";const I={id:()=>t("th",{part:S,scope:"col",title:"The unique identifier of each transaction"},"ID"),account_id:()=>t("th",{part:S,scope:"col",title:"The unique identifier of the account associated with each transaction"},"Account ID"),payout_id:()=>t("th",{part:S,scope:"col",title:"The unique identifier of the payout associated with each transaction"},"Payout ID"),financial_transaction_id:()=>t("th",{part:S,scope:"col",title:"The unique identifier of the financial transaction associated with the payment balance transaction"},"Financial Transaction ID"),amount:()=>t("th",{part:S,scope:"col",title:"The dollar amount of each transaction"},"Amount"),fee:()=>t("th",{part:S,scope:"col",title:"The fee associated with each transaction"},"Fee"),net:()=>t("th",{part:S,scope:"col",title:"The net amount of each transaction"},"Net"),currency:()=>t("th",{part:S,scope:"col",title:"The currency of each transaction"},"Currency"),description:()=>t("th",{part:S,scope:"col",title:"The description of each transaction"},"Description"),source_id:()=>t("th",{part:S,scope:"col",title:"The unique identifier of the source object associated with the payment balance transaction"},"Source ID"),txn_type:()=>t("th",{part:S,scope:"col",title:"The type of each transaction"},"Type"),created_at:()=>t("th",{part:S,scope:"col",title:"The date and time each transaction was made"},"Processed On"),available_on:()=>t("th",{part:S,scope:"col",title:"The date and time each transaction will be available"},"Available On"),updated_at:()=>t("th",{part:S,scope:"col",title:"The date and time each transaction was last updated"},"Updated On")},q={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",processing_fee:"Processing Fee",refund_processing_fee:"Refund Processing Fee",fee_rounding_adjustment:"Fee Rounding Adjustment",platform_fee:"Platform Fee",processing_fee_return:"Processing Fee Return",platform_fee_return:"Platform Fee Return"},x={id:e=>t("td",{part:F(e.id)},e.id),account_id:e=>t("td",{part:F(e.account_id)},e.account_id),payout_id:e=>t("td",{part:F(e.payout_id)},e.payout_id),financial_transaction_id:e=>t("td",{part:F(e.financial_transaction_id)},e.financial_transaction_id),amount:e=>t("td",{part:F(e.amount)},e.formattedPaymentAmount(e.amount)),fee:e=>t("td",{part:F(e.fee)},e.formattedPaymentAmount(e.fee)),net:e=>t("td",{part:F(e.net)},e.formattedPaymentAmount(e.net)),currency:e=>t("td",{part:F(e.currency)},e.currency),description:e=>t("td",{part:F(e.description)},e.description),source_id:e=>t("td",{part:F(e.source_id)},e.source_id),txn_type:e=>t("td",{part:F(e.txn_type)},q[e.txn_type]),created_at:e=>t("td",{part:F(e.created_at)},t("div",{class:"fw-bold"},O(e.created_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},O(e.created_at,{showTime:!0}))),available_on:e=>t("td",{part:F(e.available_on)},t("div",{class:"fw-bold"},O(e.available_on,{showDisplayDate:!0})),t("div",{class:"fw-bold"},O(e.available_on,{showTime:!0}))),updated_at:e=>t("td",{part:F(e.updated_at)},t("div",{class:"fw-bold"},O(e.updated_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},O(e.updated_at,{showTime:!0})))},A=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:C.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:C.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:C.row,data:a})}}componentWillLoad(){this.transactionsTable=new f(this.balanceTransactions,this.columns,I,x),d(),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:o,onError:c,final:n})=>{var d;try{const n=await a.fetchPayoutTransactions(t,e,s);n.error?c({error:h(n.error),code:p(null===(d=n.error)||void 0===d?void 0:d.code),severity:r.ERROR}):o({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:h(t),code:e,severity:r.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(o.MISSING_PROPS,this.errorMessage,r.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(P,{key:"3d9b9479726dcfe62fc70ebefb57a56e2ea62a35"},t(u,{key:"209c0c312f8c110cbbc68f74a30dd635d9eb736f"},t(m,{key:"b141a06b688e8feeb2e45ddd03c5f5a0315213d1"},t(b,{key:"0d7b69a7a2611517f28cd59c48f5820979bad9df"},t(y,{key:"f5520cd56d00855566dcd2bbcacb5f8f28a0f552"},this.transactionsTable.columnData.map((t=>t)))),t(_,{key:"b6082fab5bbfb059f03677a5a04496c835cfe15a"},t(g,{key:"99bfc2ec5a77f338c3da293fef90e2ac93f9a4b9",columnSpan:this.transactionsTable.columnKeys.length,isLoading:this.isLoading}),t(w,{key:"933501b918389f8aa5df515a05db4dbfdcb842d2",isEmpty:this.showEmptyState,columnSpan:this.transactionsTable.columnKeys.length}),t(T,{key:"2b4ba69682b2633ca70941e53d2775b88a9d4222",columnSpan:this.transactionsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.transactionsTable.rowData.map(((e,a)=>t(j,{"data-test-id":"table-row","data-row-entity-id":this.entityId[a],onClick:this.rowClickHandler},e)))),this.paging&&t(v,{key:"ed6f56fd8dcee6c2327066eb09a8a39c122000d3"},t(D,{key:"763336a3b90b2c6433a91fff8a29bc3efd0c29c6"},t(k,{key:"91b2bc9767aa3cc1c5b860cad877b91abc4cf504",colSpan:this.transactionsTable.columnData.length},t("pagination-menu",{key:"c78f9bf45e68e859027260671379779f4794e178",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{pagingParams:["propChanged"],payoutId:["propChanged"],authToken:["propChanged"]}}};export{A as justifi_payout_transactions_list}
@@ -1 +1 @@
1
- import{r as e,c as t,h as s}from"./p-CV0Pyo1O.js";import{f as i}from"./p-Ds_P-dB8.js";import{t as a,a8 as d}from"./p-Bu7gdOaV.js";import{B as r}from"./p-CU2Dwa94.js";import{S as c}from"./p-eBK-iWrz.js";import"./p-CZfYo5-1.js";import{C as o,b as n}from"./p-8fO8CrtQ.js";import{g as h,a as p}from"./p-D1H6VUbM.js";import{D as l,a as f}from"./p-rIJv0FaI.js";import{c as b}from"./p-DcA_wt-j.js";import{J as u}from"./p-C8g8unYJ.js";import"./p-HXpYMWUU.js";import"./p-WnMmPpEb.js";import"./p-B4vLfYnZ.js";import"./p-DgTOxu8x.js";import"./p-CiypNylL.js";import"./p-CLHwhyvu.js";import"./p-DaDqgDrb.js";const y=({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:d,final:r=()=>{}})=>{var c;try{const r=await s.submitDisputeResponse(t,e,i);if(r.error){return d({error:p(r.error),code:h(null===(c=r.error)||void 0===c?void 0:c.code),severity:o.ERROR})}a(r)}catch(e){const t=h(null==e?void 0:e.code);return d({error:e.message||e,code:t,severity:o.ERROR})}finally{r()}},v=class{constructor(s){e(this,s),this.clickEvent=t(this,"click-event",7),this.errorEvent=t(this,"error-event",7),this.submitEvent=t(this,"submit-event",7)}acceptDispute(){y({disputeId:this.dispute.id,authToken:this.authToken,service:new f})({payload:{forfeit:!0},onSuccess:e=>{this.submitEvent.emit({response:e})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}})}initiateRespondToDispute(){this.clickEvent.emit({name:l.respondToDispute})}isDueDatePassed(){var e;if(!(null===(e=this.dispute)||void 0===e?void 0:e.due_date))return!1;const t=new Date(this.dispute.due_date.replace(/-/g,"/").replace(/T.+/,"")),s=new Date;return s.setHours(0,0,0,0),t.setHours(0,0,0,0),t<s}render(){var e,t,o,n,h,p,l,f,b;return s("div",{key:"55685c8b421d48fb041862b2ae2ff0605a3a0b7f",class:"dispute-notification-root"},this.isLoading&&s("div",{key:"93fba7164eea0a00231f2f762a1370fe2ba4ca52",style:{marginBottom:"8px"}},s(c,{key:"db8ca80547c4e022ee9cbb59b51cf1d199a65f0c",height:"28px",width:"70%",styles:{marginBottom:"16px"}}),s(c,{key:"15c884a6bbfcab6e89d9eb36cfcdc14a0505c25a",height:"18px",styles:{marginBottom:"8px"}}),s(c,{key:"61474f21b3f82c1cff6455c7d87c0474a4c5ebdd",height:"18px",styles:{marginBottom:"8px"}})),(null===(e=this.dispute)||void 0===e?void 0:e.needsResponse)&&this.isDueDatePassed()&&s("div",{key:"724f8896f7985469d457d5dea5936dc8ef0b30c0",part:a},s("h1",{key:"d4e86227300211d8ab792e8ae128912166957b02",class:"h4",part:d},"The due date (",null===(t=this.dispute)||void 0===t?void 0:t.due_date,") for this dispute has passed"),s("p",{key:"40e2fff6dadd6426d847cbc7164a72bb137ee44d"},"You can no longer submit evidence to counter this dispute.")),(null===(o=this.dispute)||void 0===o?void 0:o.needsResponse)&&!this.isDueDatePassed()&&s("div",{key:"1efebe3baa295271c793faaba07b9d62a7f19e93",part:a},s("h1",{key:"a6e10b6d4e8f01aacefb8d3cd5244eecbbb251e6",class:"h4",part:d},"This payment is disputed"),s("p",{key:"fb99d2061fcae2a6b59a1121340bb141f8a2bcb2"},"The cardholder is disputing this payment. You may accept this dispute, or proceed to provide evidence in a counter dispute."),s("h2",{key:"5e6a34864d24df666ab69291e98dc569946933ad",class:"h5"},"Dispute details"),s("div",{key:"6a189bf2c84fad8024d60da7c6972917e8768fa9",class:"d-table gap-2"},s("div",{key:"1d76955da64391406f2cf082d473fac4da8f6be9",class:"d-table-row gap-2"},s("span",{key:"7dcc2947c8e2ba7e388dde66ec426b9d95e87938",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Amount"),s("span",{key:"b45cdeebd1ee9f0b6e4a023a41e496c28c265c64",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},i(null===(n=this.dispute)||void 0===n?void 0:n.amount))),s("div",{key:"d33fd1331385a3b8bad3f44bb8d0d92c7d9fb3eb",class:"d-table-row gap-2"},s("span",{key:"d4a5c2fae926b736c6516522b32965c1f55d7623",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Reason"),s("span",{key:"034868aa10b8179e485f2cc497adcf9caaca123d",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(h=this.dispute)||void 0===h?void 0:h.reason)),s("div",{key:"8b56d8237d8039f90ec9141cc94e0147bc0e49bd",class:"d-table-row gap-2"},s("span",{key:"f301c07b7ceb2f54f642e764a61b359445962d17",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Due Date"),s("span",{key:"3c7478dd78c2cd58b9eee3a3b30b0816ab8011bc",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(p=this.dispute)||void 0===p?void 0:p.due_date))),s("div",{key:"1c912ca4428f444d4dd4f27584a8a64099524539",class:"d-flex gap-2 mt-4 justify-content-end"},s(r,{key:"d15adbc5be96fbfe0545e87c57e1fe34449d4c8f",variant:"secondary",onClick:()=>this.acceptDispute()},"Accept dispute"),s(r,{key:"0d7b4a74b52210106929114bb8d7db76eeadedd6",variant:"primary",onClick:()=>this.initiateRespondToDispute()},"Counter dispute"))),(null===(l=this.dispute)||void 0===l?void 0:l.underReview)&&s("div",{key:"8f1e958c5601d937d71da120e908acdb9b303367",part:a},s("h1",{key:"67012e992b666b145bff9cf70011a0de88452e1e",class:"h4",part:d},"This payment is disputed and under review"),s("p",{key:"fda8d98bffac5daf67574aabc854e58b5a754de0"},"The cardholder is disputing this payment. A counter dispute has been submitted and is under review.")),(null===(f=this.dispute)||void 0===f?void 0:f.won)&&s("div",{key:"8c3699f761f941114b4fa91cad166c78def3dc00",part:a},s("h1",{key:"411280747b719b85240bde3ab052ba4bd43437e3",class:"h4",part:d},"This payment was disputed"),s("p",{key:"82edec3d96009d23454f6ac63651b6763b4b22a4"},"The cardholder disputed this payment and the card issuer has settled it in your favor.")),(null===(b=this.dispute)||void 0===b?void 0:b.lost)&&s("div",{key:"68416771d44d09201b630d7b25952894ce4a096c",part:a},s("h1",{key:"dcaf92df776e75aa78762c07fdbb750f1933311a",class:"h4",part:d},"This payment was disputed"),s("p",{key:"811fcf0b3a9f38fcf857998a672286e5c5ae0a9a"},"The cardholder disputed this payment and the card issuer has settled it in their favor.")))}},m=class{constructor(i){e(this,i),this.clickEvent=t(this,"click-event",7),this.errorEvent=t(this,"error-event",7),this.stepCompleteEvent=t(this,"complete-form-step-event",7),this.submitEvent=t(this,"submit-event",7),this.errorMessage=null,this.disputeResponse={},this.apiOrigin="https://wc-proxy.justifi.ai",this.isLoading=!1,this.documentList=[],this.documentErrors={},this.currentStep=0,this.componentStepMapping=[()=>s("product-or-service",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("customer-details",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("cancellation-policy",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("refund-policy",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("duplicate-charge",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("electronic-evidence",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("shipping-details",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("additional-statement",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors})],this.saveData=async(e,t)=>{if(Object.keys(e).length)return this.isLastStep?this.submitDisputeResponse({payload:e,onSuccess:e=>{this.submitEvent.emit({response:e}),this.stepCompleteEvent.emit({response:e,formStep:t})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}}):this.updateDisputeResponse({payload:e,onSuccess:e=>{this.disputeResponse=Object.assign({},e.data),this.stepCompleteEvent.emit({response:e,formStep:t})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}});this.stepCompleteEvent.emit({response:null,formStep:t})},this.initializeMakePresignedURLs=async()=>{const e=this.documentList.map((e=>this.getPresignedFileUrl(e)));return await Promise.all(e)},this.initializeFileUploads=async()=>{const e=this.documentList.map((e=>this.uploadDocument(e)));return Promise.all(e)},this.getPresignedFileUrl=async e=>this.createDisputeEvidence({payload:{file_name:e.file_name,file_type:e.file_type,dispute_evidence_type:e.dispute_evidence_type},onSuccess:t=>{e.presignedUrl=t.data.presigned_url},onError:({error:t,code:s,severity:i})=>{const a={[e.dispute_evidence_type]:t};this.documentErrors=Object.assign(Object.assign({},this.documentErrors),a),this.errorEvent.emit({errorCode:s,message:t,severity:i})}}),this.uploadDocument=async e=>{const t=await e.getFileString();if(!e.presignedUrl)throw new Error("Presigned URL is not set");return await fetch(e.presignedUrl,{method:"PUT",body:t})},this.handleSubmit=async(e,t,s)=>{if(this.isLoading=!0,t.length){if(this.documentErrors={},this.documentList=t,await this.initializeMakePresignedURLs(),Object.keys(this.documentErrors).length)throw this.isLoading=!1,new Error("Could not presign all documents");await this.initializeFileUploads()}await this.saveData(e,s),this.isLoading=!1},this.onCancel=()=>{this.clickEvent.emit({name:l.cancelDispute})},this.onBack=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:l.previousStep}),await this.handleSubmit(e,t,s),this.currentStep--}))},this.onNext=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:l.nextStep}),await this.handleSubmit(e,t,s),this.currentStep++}))},this.onSubmit=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:l.submit});const i=Object.assign(Object.assign({},e),{forfeit:!1});await this.handleSubmit(i,t,s)}))}}componentWillLoad(){b(),this.analytics=new u(this),this.initializeDisputeServiceMethods()}disconnectedCallback(){var e;null===(e=this.analytics)||void 0===e||e.cleanup()}propChanged(){this.initializeDisputeServiceMethods()}initializeDisputeServiceMethods(){this.disputeId&&this.authToken?(this.updateDisputeResponse=(({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:d,final:r=()=>{}})=>{var c;try{const r=await s.updateDisputeResponse(t,e,i);if(r.error)return d({error:p(r.error),code:h(null===(c=r.error)||void 0===c?void 0:c.code),severity:o.ERROR});a(r)}catch(e){const t=h(null==e?void 0:e.code);return d({error:e.message||e,code:t,severity:o.ERROR})}finally{r()}})({disputeId:this.disputeId,authToken:this.authToken,service:new f}),this.createDisputeEvidence=(({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:d,final:r=()=>{}})=>{var c;try{const r=await s.createDisputeEvidence(t,e,i);if(r.error)return d({error:p(r.error),code:h(null===(c=r.error)||void 0===c?void 0:c.code),severity:o.ERROR});a(r)}catch(e){const t=h(null==e?void 0:e.code);return d({error:e.message||e,code:t,severity:o.ERROR})}finally{r()}})({disputeId:this.disputeId,authToken:this.authToken,service:new f}),this.submitDisputeResponse=y({disputeId:this.disputeId,authToken:this.authToken,service:new f})):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:n.MISSING_PROPS,message:this.errorMessage,severity:o.ERROR}))}get currentStepComponent(){return this.componentStepMapping[this.currentStep]()}get isLastStep(){return this.currentStep===this.componentStepMapping.length-1}get isFirstStep(){return 0===this.currentStep}render(){return s("div",{key:"50c96cb107115c27ff993ed7288a58cd801ef936",class:"dispute-response-root"},s("div",{key:"0ebe2541c4245c6371d3aa8cdfb58b3f92f2d96e",class:"row gy-3"},s("div",{key:"78feb00f6f5b8fb96ceacba2e7bcda1342f8a244",class:"col-12"},s("h1",{key:"a86ab0cd63ebb945a69982ea05607ae4eadc1cf8",class:"h4",part:d},"Counter dispute")),s("div",{key:"f9a5e9cad90d03ae773aaeb2e72049b453d05472",class:"col-12"},this.currentStepComponent),s("div",{key:"838c642fdf957bf0e3fd8d4ef4c4abc79c2d6f61",class:"col-12"},s("div",{key:"6b8af6fa4face4debee72950e86e3bc9461406da",class:"d-flex gap-2 mt-4 justify-content-end"},this.isFirstStep?s(r,{variant:"secondary",onClick:()=>this.onCancel(),disabled:this.isLoading,isLoading:this.isLoading},"Cancel"):s(r,{variant:"secondary",onClick:()=>this.onBack(),disabled:this.isLoading,isLoading:this.isLoading},"Back"),this.isLastStep?s(r,{variant:"primary",onClick:()=>this.onSubmit(),disabled:this.isLoading,isLoading:this.isLoading},"Submit Counter Dispute"):s(r,{variant:"primary",onClick:()=>this.onNext(),disabled:this.isLoading,isLoading:this.isLoading},"Next")))))}static get watchers(){return{disputeId:["propChanged"],authToken:["propChanged"]}}};export{v as dispute_notification,m as dispute_response}
1
+ import{r as e,c as t,h as s}from"./p-CV0Pyo1O.js";import{f as i}from"./p-Ds_P-dB8.js";import{t as a,a8 as d}from"./p-Bu7gdOaV.js";import{B as r}from"./p-CU2Dwa94.js";import{S as c}from"./p-eBK-iWrz.js";import"./p-CZfYo5-1.js";import{C as o,b as n}from"./p-D6uhYbLo.js";import{g as h,a as p}from"./p-CLq3Og7o.js";import{D as l,a as f}from"./p-Ba0_MQtJ.js";import{c as u}from"./p-ByQMBEDC.js";import{J as b}from"./p-BHaO3c8W.js";import"./p-HXpYMWUU.js";import"./p-Bl00tHyn.js";import"./p-B4vLfYnZ.js";import"./p-DgTOxu8x.js";import"./p-Dn9_7aQh.js";import"./p-CLHwhyvu.js";import"./p-DaDqgDrb.js";const y=({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:d,final:r=()=>{}})=>{var c;try{const r=await s.submitDisputeResponse(t,e,i);if(r.error){return d({error:p(r.error),code:h(null===(c=r.error)||void 0===c?void 0:c.code),severity:o.ERROR})}a(r)}catch(e){const t=h(null==e?void 0:e.code);return d({error:e.message||e,code:t,severity:o.ERROR})}finally{r()}},v=class{constructor(s){e(this,s),this.clickEvent=t(this,"click-event",7),this.errorEvent=t(this,"error-event",7),this.submitEvent=t(this,"submit-event",7)}acceptDispute(){y({disputeId:this.dispute.id,authToken:this.authToken,service:new f})({payload:{forfeit:!0},onSuccess:e=>{this.submitEvent.emit({response:e})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}})}initiateRespondToDispute(){this.clickEvent.emit({name:l.respondToDispute})}isDueDatePassed(){var e;if(!(null===(e=this.dispute)||void 0===e?void 0:e.due_date))return!1;const t=new Date(this.dispute.due_date.replace(/-/g,"/").replace(/T.+/,"")),s=new Date;return s.setHours(0,0,0,0),t.setHours(0,0,0,0),t<s}render(){var e,t,o,n,h,p,l,f,u;return s("div",{key:"0f4474fa70e6ab3895132b703ab5a3b7f810554a",class:"dispute-notification-root"},this.isLoading&&s("div",{key:"1bd7b07c15e6a88be6215dbca5e41cbcfc6e6e68",style:{marginBottom:"8px"}},s(c,{key:"a4436ec5cc58b0cccdcdc9ae3d25293fdfaeac40",height:"28px",width:"70%",styles:{marginBottom:"16px"}}),s(c,{key:"cda7ba45ed518e762239864b766f65da8488e713",height:"18px",styles:{marginBottom:"8px"}}),s(c,{key:"a0acf3c7c0ae988f8580bfbd8b2ff2b5c349fddb",height:"18px",styles:{marginBottom:"8px"}})),(null===(e=this.dispute)||void 0===e?void 0:e.needsResponse)&&this.isDueDatePassed()&&s("div",{key:"2fd8a28d4c3eefc4a1a881d3bc47422428d4f016",part:a},s("h1",{key:"243ca1a43064800b65fb27e259598ff85746e55b",class:"h4",part:d},"The due date (",null===(t=this.dispute)||void 0===t?void 0:t.due_date,") for this dispute has passed"),s("p",{key:"617f7b87510fee1d64ad121cf15f1ba193f6826c"},"You can no longer submit evidence to counter this dispute.")),(null===(o=this.dispute)||void 0===o?void 0:o.needsResponse)&&!this.isDueDatePassed()&&s("div",{key:"d9ad4c30643e0991c7327a800d8015aa49d227ff",part:a},s("h1",{key:"c6e2b6a4a012ad2ce3d371ac765359f0db018166",class:"h4",part:d},"This payment is disputed"),s("p",{key:"491ca4d83029e8aec16ee745cd3eb78854298d19"},"The cardholder is disputing this payment. You may accept this dispute, or proceed to provide evidence in a counter dispute."),s("h2",{key:"3fd51e33e3440d6fda3fb6f2aa3f83cd783255fc",class:"h5"},"Dispute details"),s("div",{key:"edb7c85ffccd4a1af64cdb61a702ce39c86987a9",class:"d-table gap-2"},s("div",{key:"8d611ad34fa2a40d52f175c6874228254d235bf6",class:"d-table-row gap-2"},s("span",{key:"db4c9c3379b475ddb4c966336a1a9905f286335a",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Amount"),s("span",{key:"9c61d28bc602dd3cdeaa0e99923c58fb20fb95bc",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},i(null===(n=this.dispute)||void 0===n?void 0:n.amount))),s("div",{key:"d7a84cd67c59bfdc2c63b7e847b82d423d3277a4",class:"d-table-row gap-2"},s("span",{key:"e98e2a8a8593b3358ecf6d5b857d2f3cffae1ef5",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Reason"),s("span",{key:"61f843068e6bf04d8bab69cefeb148e9b6792a5f",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(h=this.dispute)||void 0===h?void 0:h.reason)),s("div",{key:"795fd5d907eb2e1456c737a201517dbe5434ea84",class:"d-table-row gap-2"},s("span",{key:"1dae1ba0dd7323756988c8f6d65be1fdf3c155e6",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Due Date"),s("span",{key:"b44ff4fcfd0beb70af6468a216eee0489c566a79",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(p=this.dispute)||void 0===p?void 0:p.due_date))),s("div",{key:"f7e1ac7543ca231cc7904654bfb9fcb3e3f31dc1",class:"d-flex gap-2 mt-4 justify-content-end"},s(r,{key:"35dfa1f4e0a7f02496751dc332a4c52b542fe538",variant:"secondary",onClick:()=>this.acceptDispute()},"Accept dispute"),s(r,{key:"0519e6959a2407315d600384121b6ad466de79eb",variant:"primary",onClick:()=>this.initiateRespondToDispute()},"Counter dispute"))),(null===(l=this.dispute)||void 0===l?void 0:l.underReview)&&s("div",{key:"600db9506bed0de6efc3d0367fb5df63273bba14",part:a},s("h1",{key:"139a034878c8433edb1b936440c1b71d9d1022b2",class:"h4",part:d},"This payment is disputed and under review"),s("p",{key:"bd9b3d46e57ec998e5e1a5bc465d981129fc1fd2"},"The cardholder is disputing this payment. A counter dispute has been submitted and is under review.")),(null===(f=this.dispute)||void 0===f?void 0:f.won)&&s("div",{key:"c03393474cea2a44b864eba0f9e36b1fe63eb256",part:a},s("h1",{key:"3c19db3b8aefd25a363d4cd183eaaa2487d33f8c",class:"h4",part:d},"This payment was disputed"),s("p",{key:"45d95070b59c3a0da28bc5cda5356c2aa171d974"},"The cardholder disputed this payment and the card issuer has settled it in your favor.")),(null===(u=this.dispute)||void 0===u?void 0:u.lost)&&s("div",{key:"a8727df139e8d1eff3e67bc13359534281ceb795",part:a},s("h1",{key:"bb533bb65c20722002bda966782fcc4d165a139e",class:"h4",part:d},"This payment was disputed"),s("p",{key:"5901b10090d20523de1f96630ce7a9b71d9fdcac"},"The cardholder disputed this payment and the card issuer has settled it in their favor.")))}},m=class{constructor(i){e(this,i),this.clickEvent=t(this,"click-event",7),this.errorEvent=t(this,"error-event",7),this.stepCompleteEvent=t(this,"complete-form-step-event",7),this.submitEvent=t(this,"submit-event",7),this.errorMessage=null,this.disputeResponse={},this.apiOrigin="https://wc-proxy.justifi.ai",this.isLoading=!1,this.documentList=[],this.documentErrors={},this.currentStep=0,this.componentStepMapping=[()=>s("product-or-service",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("customer-details",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("cancellation-policy",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("refund-policy",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("duplicate-charge",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("electronic-evidence",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("shipping-details",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("additional-statement",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors})],this.saveData=async(e,t)=>{if(Object.keys(e).length)return this.isLastStep?this.submitDisputeResponse({payload:e,onSuccess:e=>{this.submitEvent.emit({response:e}),this.stepCompleteEvent.emit({response:e,formStep:t})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}}):this.updateDisputeResponse({payload:e,onSuccess:e=>{this.disputeResponse=Object.assign({},e.data),this.stepCompleteEvent.emit({response:e,formStep:t})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}});this.stepCompleteEvent.emit({response:null,formStep:t})},this.initializeMakePresignedURLs=async()=>{const e=this.documentList.map((e=>this.getPresignedFileUrl(e)));return await Promise.all(e)},this.initializeFileUploads=async()=>{const e=this.documentList.map((e=>this.uploadDocument(e)));return Promise.all(e)},this.getPresignedFileUrl=async e=>this.createDisputeEvidence({payload:{file_name:e.file_name,file_type:e.file_type,dispute_evidence_type:e.dispute_evidence_type},onSuccess:t=>{e.presignedUrl=t.data.presigned_url},onError:({error:t,code:s,severity:i})=>{const a={[e.dispute_evidence_type]:t};this.documentErrors=Object.assign(Object.assign({},this.documentErrors),a),this.errorEvent.emit({errorCode:s,message:t,severity:i})}}),this.uploadDocument=async e=>{const t=await e.getFileString();if(!e.presignedUrl)throw new Error("Presigned URL is not set");return await fetch(e.presignedUrl,{method:"PUT",body:t})},this.handleSubmit=async(e,t,s)=>{if(this.isLoading=!0,t.length){if(this.documentErrors={},this.documentList=t,await this.initializeMakePresignedURLs(),Object.keys(this.documentErrors).length)throw this.isLoading=!1,new Error("Could not presign all documents");await this.initializeFileUploads()}await this.saveData(e,s),this.isLoading=!1},this.onCancel=()=>{this.clickEvent.emit({name:l.cancelDispute})},this.onBack=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:l.previousStep}),await this.handleSubmit(e,t,s),this.currentStep--}))},this.onNext=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:l.nextStep}),await this.handleSubmit(e,t,s),this.currentStep++}))},this.onSubmit=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:l.submit});const i=Object.assign(Object.assign({},e),{forfeit:!1});await this.handleSubmit(i,t,s)}))}}componentWillLoad(){u(),this.analytics=new b(this),this.initializeDisputeServiceMethods()}disconnectedCallback(){var e;null===(e=this.analytics)||void 0===e||e.cleanup()}propChanged(){this.initializeDisputeServiceMethods()}initializeDisputeServiceMethods(){this.disputeId&&this.authToken?(this.updateDisputeResponse=(({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:d,final:r=()=>{}})=>{var c;try{const r=await s.updateDisputeResponse(t,e,i);if(r.error)return d({error:p(r.error),code:h(null===(c=r.error)||void 0===c?void 0:c.code),severity:o.ERROR});a(r)}catch(e){const t=h(null==e?void 0:e.code);return d({error:e.message||e,code:t,severity:o.ERROR})}finally{r()}})({disputeId:this.disputeId,authToken:this.authToken,service:new f}),this.createDisputeEvidence=(({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:d,final:r=()=>{}})=>{var c;try{const r=await s.createDisputeEvidence(t,e,i);if(r.error)return d({error:p(r.error),code:h(null===(c=r.error)||void 0===c?void 0:c.code),severity:o.ERROR});a(r)}catch(e){const t=h(null==e?void 0:e.code);return d({error:e.message||e,code:t,severity:o.ERROR})}finally{r()}})({disputeId:this.disputeId,authToken:this.authToken,service:new f}),this.submitDisputeResponse=y({disputeId:this.disputeId,authToken:this.authToken,service:new f})):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:n.MISSING_PROPS,message:this.errorMessage,severity:o.ERROR}))}get currentStepComponent(){return this.componentStepMapping[this.currentStep]()}get isLastStep(){return this.currentStep===this.componentStepMapping.length-1}get isFirstStep(){return 0===this.currentStep}render(){return s("div",{key:"57664882c2d3c6833f9a9cbe01452875119c6032",class:"dispute-response-root"},s("div",{key:"92c8e3b3426210b68063ad7474aeb13429fd4c76",class:"row gy-3"},s("div",{key:"0f7e1236d85765054a40a06d864199feba0cad21",class:"col-12"},s("h1",{key:"b12f3840caeb7c17d324829874b8a4089fcb123d",class:"h4",part:d},"Counter dispute")),s("div",{key:"c493a872abb1d058cd98fab46eefa6f68caaa351",class:"col-12"},this.currentStepComponent),s("div",{key:"06f7818c59490ec54c58e9e0a5d7effec11bf0a6",class:"col-12"},s("div",{key:"754852aaab1b5048ed52796a13e169228a6ac2d1",class:"d-flex gap-2 mt-4 justify-content-end"},this.isFirstStep?s(r,{variant:"secondary",onClick:()=>this.onCancel(),disabled:this.isLoading,isLoading:this.isLoading},"Cancel"):s(r,{variant:"secondary",onClick:()=>this.onBack(),disabled:this.isLoading,isLoading:this.isLoading},"Back"),this.isLastStep?s(r,{variant:"primary",onClick:()=>this.onSubmit(),disabled:this.isLoading,isLoading:this.isLoading},"Submit Counter Dispute"):s(r,{variant:"primary",onClick:()=>this.onNext(),disabled:this.isLoading,isLoading:this.isLoading},"Next")))))}static get watchers(){return{disputeId:["propChanged"],authToken:["propChanged"]}}};export{v as dispute_notification,m as dispute_response}
@@ -1 +1 @@
1
- import{r as t,c as n,h as r,g as e}from"./p-CV0Pyo1O.js";import{g as o}from"./p-BFTU3MAI.js";import{C as i,b as u}from"./p-8fO8CrtQ.js";import{J as c}from"./p-C8g8unYJ.js";import{c as s}from"./p-DcA_wt-j.js";import"./p-Ds_P-dB8.js";import"./p-HXpYMWUU.js";import"./p-CiypNylL.js";import"./p-WnMmPpEb.js";import"./p-B4vLfYnZ.js";import"./p-DgTOxu8x.js";import"./p-CLHwhyvu.js";import"./p-DaDqgDrb.js";var f,a,h={};function l(){return a?f:(a=1,f=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then})}var d,w={},p={};function v(){if(d)return p;let t;d=1;const n=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return p.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return 4*t+17},p.getSymbolTotalCodewords=function(t){return n[t]},p.getBCHDigit=function(t){let n=0;for(;0!==t;)n++,t>>>=1;return n},p.setToSJISFunction=function(n){if("function"!=typeof n)throw new Error('"toSJISFunc" is not a valid function.');t=n},p.isKanjiModeEnabled=function(){return void 0!==t},p.toSJIS=function(n){return t(n)},p}var m,g,E,y,A,M={};function b(){return m||(m=1,(t=M).L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2},t.isValid=function(t){return t&&void 0!==t.bit&&t.bit>=0&&t.bit<4},t.from=function(n,r){if(t.isValid(n))return n;try{return function(n){if("string"!=typeof n)throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+n)}}(n)}catch(t){return r}}),M;var t}var C,T,x,R,U={},I={},P={},k={};function j(){if(R)return k;R=1;const t=b(),n=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],r=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return k.getBlocksCount=function(r,e){switch(e){case t.L:return n[4*(r-1)+0];case t.M:return n[4*(r-1)+1];case t.Q:return n[4*(r-1)+2];case t.H:return n[4*(r-1)+3];default:return}},k.getTotalCodewordsCount=function(n,e){switch(e){case t.L:return r[4*(n-1)+0];case t.M:return r[4*(n-1)+1];case t.Q:return r[4*(n-1)+2];case t.H:return r[4*(n-1)+3];default:return}},k}var F,N,B,_,D={},L={};var $,Q={},q={},O={};function S(){return $||($=1,O.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),O}var Z,J,Y,z={};function H(){if(Z)return z;Z=1;const t="[0-9]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const r="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+")(?:.|[\r\n]))+";z.KANJI=new RegExp(n,"g"),z.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),z.BYTE=new RegExp(r,"g"),z.NUMERIC=new RegExp(t,"g"),z.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const e=new RegExp("^"+n+"$"),o=new RegExp("^"+t+"$"),i=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return z.testKanji=function(t){return e.test(t)},z.testNumeric=function(t){return o.test(t)},z.testAlphanumeric=function(t){return i.test(t)},z}function W(){return J||(J=1,function(t){const n=S(),r=H();t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(t,r){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!n.isValid(r))throw new Error("Invalid version: "+r);return r>=1&&r<10?t.ccBits[0]:r<27?t.ccBits[1]:t.ccBits[2]},t.getBestModeForData=function(n){return r.testNumeric(n)?t.NUMERIC:r.testAlphanumeric(n)?t.ALPHANUMERIC:r.testKanji(n)?t.KANJI:t.BYTE},t.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},t.isValid=function(t){return t&&t.bit&&t.ccBits},t.from=function(n,r){if(t.isValid(n))return n;try{return function(n){if("string"!=typeof n)throw new Error("Param is not a string");switch(n.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+n)}}(n)}catch(t){return r}}}(q)),q}var K,V,X,G,tt,nt,rt,et,ot,it,ut,ct,st={},ft={},at={exports:{}};function ht(){return it||(it=1,function(t){var n={single_source_shortest_paths:function(t,r,e){var o={},i={};i[r]=0;var u,c,s,f,a,h,l=n.PriorityQueue.make();for(l.push(r,0);!l.empty();)for(s in f=(u=l.pop()).cost,a=t[c=u.value]||{})a.hasOwnProperty(s)&&(h=f+a[s],(void 0===i[s]||i[s]>h)&&(i[s]=h,l.push(s,h),o[s]=c));if(void 0!==e&&void 0===i[e]){var d=["Could not find a path from ",r," to ",e,"."].join("");throw new Error(d)}return o},extract_shortest_path_from_predecessor_list:function(t,n){for(var r=[],e=n;e;)r.push(e),e=t[e];return r.reverse(),r},find_path:function(t,r,e){var o=n.single_source_shortest_paths(t,r,e);return n.extract_shortest_path_from_predecessor_list(o,e)},PriorityQueue:{make:function(t){var r,e=n.PriorityQueue,o={};for(r in t=t||{},e)e.hasOwnProperty(r)&&(o[r]=e[r]);return o.queue=[],o.sorter=t.sorter||e.default_sorter,o},default_sorter:function(t,n){return t.cost-n.cost},push:function(t,n){this.queue.push({value:t,cost:n}),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};t.exports=n}(at)),at.exports}function lt(){if(ct)return w;ct=1;const t=v(),n=b(),r=function(){if(E)return g;function t(){this.buffer=[],this.length=0}return E=1,t.prototype={get:function(t){const n=Math.floor(t/8);return 1==(this.buffer[n]>>>7-t%8&1)},put:function(t,n){for(let r=0;r<n;r++)this.putBit(1==(t>>>n-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){const n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),t&&(this.buffer[n]|=128>>>this.length%8),this.length++}},g=t}(),e=function(){if(A)return y;function t(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}return A=1,t.prototype.set=function(t,n,r,e){const o=t*this.size+n;this.data[o]=r,e&&(this.reservedBit[o]=!0)},t.prototype.get=function(t,n){return this.data[t*this.size+n]},t.prototype.xor=function(t,n,r){this.data[t*this.size+n]^=r},t.prototype.isReserved=function(t,n){return this.reservedBit[t*this.size+n]},y=t}(),o=(C||(C=1,function(t){const n=v().getSymbolSize;t.getRowColCoords=function(t){if(1===t)return[];const r=Math.floor(t/7)+2,e=n(t),o=145===e?26:2*Math.ceil((e-13)/(2*r-2)),i=[e-7];for(let t=1;t<r-1;t++)i[t]=i[t-1]-o;return i.push(6),i.reverse()},t.getPositions=function(n){const r=[],e=t.getRowColCoords(n),o=e.length;for(let t=0;t<o;t++)for(let n=0;n<o;n++)0===t&&0===n||0===t&&n===o-1||t===o-1&&0===n||r.push([e[t],e[n]]);return r}}(U)),U),i=function(){if(T)return I;T=1;const t=v().getSymbolSize;return I.getPositions=function(n){const r=t(n);return[[0,0],[r-7,0],[0,r-7]]},I}(),u=(x||(x=1,function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};function n(n,r,e){switch(n){case t.Patterns.PATTERN000:return(r+e)%2==0;case t.Patterns.PATTERN001:return r%2==0;case t.Patterns.PATTERN010:return e%3==0;case t.Patterns.PATTERN011:return(r+e)%3==0;case t.Patterns.PATTERN100:return(Math.floor(r/2)+Math.floor(e/3))%2==0;case t.Patterns.PATTERN101:return r*e%2+r*e%3==0;case t.Patterns.PATTERN110:return(r*e%2+r*e%3)%2==0;case t.Patterns.PATTERN111:return(r*e%3+(r+e)%2)%2==0;default:throw new Error("bad maskPattern:"+n)}}t.isValid=function(t){return null!=t&&""!==t&&!isNaN(t)&&t>=0&&t<=7},t.from=function(n){return t.isValid(n)?parseInt(n,10):void 0},t.getPenaltyN1=function(t){const n=t.size;let r=0,e=0,o=0,i=null,u=null;for(let c=0;c<n;c++){e=o=0,i=u=null;for(let s=0;s<n;s++){let n=t.get(c,s);n===i?e++:(e>=5&&(r+=e-5+3),i=n,e=1),n=t.get(s,c),n===u?o++:(o>=5&&(r+=o-5+3),u=n,o=1)}e>=5&&(r+=e-5+3),o>=5&&(r+=o-5+3)}return r},t.getPenaltyN2=function(t){const n=t.size;let r=0;for(let e=0;e<n-1;e++)for(let o=0;o<n-1;o++){const n=t.get(e,o)+t.get(e,o+1)+t.get(e+1,o)+t.get(e+1,o+1);4!==n&&0!==n||r++}return 3*r},t.getPenaltyN3=function(t){const n=t.size;let r=0,e=0,o=0;for(let i=0;i<n;i++){e=o=0;for(let u=0;u<n;u++)e=e<<1&2047|t.get(i,u),u>=10&&(1488===e||93===e)&&r++,o=o<<1&2047|t.get(u,i),u>=10&&(1488===o||93===o)&&r++}return 40*r},t.getPenaltyN4=function(t){let n=0;const r=t.data.length;for(let e=0;e<r;e++)n+=t.data[e];return 10*Math.abs(Math.ceil(100*n/r/5)-10)},t.applyMask=function(t,r){const e=r.size;for(let o=0;o<e;o++)for(let i=0;i<e;i++)r.isReserved(i,o)||r.xor(i,o,n(t,i,o))},t.getBestMask=function(n,r){const e=Object.keys(t.Patterns).length;let o=0,i=1/0;for(let u=0;u<e;u++){r(u),t.applyMask(u,n);const e=t.getPenaltyN1(n)+t.getPenaltyN2(n)+t.getPenaltyN3(n)+t.getPenaltyN4(n);t.applyMask(u,n),e<i&&(i=e,o=u)}return o}}(P)),P),c=j(),s=function(){if(_)return B;_=1;const t=(N||(N=1,function(t){const n=function(){if(F)return L;F=1;const t=new Uint8Array(512),n=new Uint8Array(256);return function(){let r=1;for(let e=0;e<255;e++)t[e]=r,n[r]=e,r<<=1,256&r&&(r^=285);for(let n=255;n<512;n++)t[n]=t[n-255]}(),L.log=function(t){if(t<1)throw new Error("log("+t+")");return n[t]},L.exp=function(n){return t[n]},L.mul=function(r,e){return 0===r||0===e?0:t[n[r]+n[e]]},L}();t.mul=function(t,r){const e=new Uint8Array(t.length+r.length-1);for(let o=0;o<t.length;o++)for(let i=0;i<r.length;i++)e[o+i]^=n.mul(t[o],r[i]);return e},t.mod=function(t,r){let e=new Uint8Array(t);for(;e.length-r.length>=0;){const t=e[0];for(let o=0;o<r.length;o++)e[o]^=n.mul(r[o],t);let o=0;for(;o<e.length&&0===e[o];)o++;e=e.slice(o)}return e},t.generateECPolynomial=function(r){let e=new Uint8Array([1]);for(let o=0;o<r;o++)e=t.mul(e,new Uint8Array([1,n.exp(o)]));return e}}(D)),D);function n(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}return n.prototype.initialize=function(n){this.degree=n,this.genPoly=t.generateECPolynomial(this.degree)},n.prototype.encode=function(n){if(!this.genPoly)throw new Error("Encoder not initialized");const r=new Uint8Array(n.length+this.degree);r.set(n);const e=t.mod(r,this.genPoly),o=this.degree-e.length;if(o>0){const t=new Uint8Array(this.degree);return t.set(e,o),t}return e},B=n}(),f=(Y||(Y=1,function(t){const n=v(),r=j(),e=b(),o=W(),i=S(),u=n.getBCHDigit(7973);function c(t,n){return o.getCharCountIndicator(t,n)+4}function s(t,n){let r=0;return t.forEach((function(t){const e=c(t.mode,n);r+=e+t.getBitsLength()})),r}t.from=function(t,n){return i.isValid(t)?parseInt(t,10):n},t.getCapacity=function(t,e,u){if(!i.isValid(t))throw new Error("Invalid QR Code version");void 0===u&&(u=o.BYTE);const s=8*(n.getSymbolTotalCodewords(t)-r.getTotalCodewordsCount(t,e));if(u===o.MIXED)return s;const f=s-c(u,t);switch(u){case o.NUMERIC:return Math.floor(f/10*3);case o.ALPHANUMERIC:return Math.floor(f/11*2);case o.KANJI:return Math.floor(f/13);default:return Math.floor(f/8)}},t.getBestVersionForData=function(n,r){let i;const u=e.from(r,e.M);if(Array.isArray(n)){if(n.length>1)return function(n,r){for(let e=1;e<=40;e++)if(s(n,e)<=t.getCapacity(e,r,o.MIXED))return e}(n,u);if(0===n.length)return 1;i=n[0]}else i=n;return function(n,r,e){for(let o=1;o<=40;o++)if(r<=t.getCapacity(o,e,n))return o}(i.mode,i.getLength(),u)},t.getEncodedBits=function(t){if(!i.isValid(t)||t<7)throw new Error("Invalid QR Code version");let r=t<<12;for(;n.getBCHDigit(r)-u>=0;)r^=7973<<n.getBCHDigit(r)-u;return t<<12|r}}(Q)),Q),a=function(){if(K)return st;K=1;const t=v(),n=t.getBCHDigit(1335);return st.getEncodedBits=function(r,e){const o=r.bit<<3|e;let i=o<<10;for(;t.getBCHDigit(i)-n>=0;)i^=1335<<t.getBCHDigit(i)-n;return 21522^(o<<10|i)},st}(),h=W(),l=(ut||(ut=1,function(t){const n=W(),r=function(){if(X)return V;X=1;const t=W();function n(n){this.mode=t.NUMERIC,this.data=n.toString()}return n.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(t){let n,r,e;for(n=0;n+3<=this.data.length;n+=3)r=this.data.substr(n,3),e=parseInt(r,10),t.put(e,10);const o=this.data.length-n;o>0&&(r=this.data.substr(n),e=parseInt(r,10),t.put(e,3*o+1))},V=n}(),e=function(){if(tt)return G;tt=1;const t=W(),n=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function r(n){this.mode=t.ALPHANUMERIC,this.data=n}return r.getBitsLength=function(t){return 11*Math.floor(t/2)+t%2*6},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(t){let r;for(r=0;r+2<=this.data.length;r+=2){let e=45*n.indexOf(this.data[r]);e+=n.indexOf(this.data[r+1]),t.put(e,11)}this.data.length%2&&t.put(n.indexOf(this.data[r]),6)},G=r}(),o=function(){if(rt)return nt;rt=1;const t=W();function n(n){this.mode=t.BYTE,this.data="string"==typeof n?(new TextEncoder).encode(n):new Uint8Array(n)}return n.getBitsLength=function(t){return 8*t},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(t){for(let n=0,r=this.data.length;n<r;n++)t.put(this.data[n],8)},nt=n}(),i=function(){if(ot)return et;ot=1;const t=W(),n=v();function r(n){this.mode=t.KANJI,this.data=n}return r.getBitsLength=function(t){return 13*t},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(t){let r;for(r=0;r<this.data.length;r++){let e=n.toSJIS(this.data[r]);if(e>=33088&&e<=40956)e-=33088;else{if(!(e>=57408&&e<=60351))throw new Error("Invalid SJIS character: "+this.data[r]+"\nMake sure your charset is UTF-8");e-=49472}e=192*(e>>>8&255)+(255&e),t.put(e,13)}},et=r}(),u=H(),c=v(),s=ht();function f(t){return unescape(encodeURIComponent(t)).length}function a(t,n,r){const e=[];let o;for(;null!==(o=t.exec(r));)e.push({data:o[0],index:o.index,mode:n,length:o[0].length});return e}function h(t){const r=a(u.NUMERIC,n.NUMERIC,t),e=a(u.ALPHANUMERIC,n.ALPHANUMERIC,t);let o,i;return c.isKanjiModeEnabled()?(o=a(u.BYTE,n.BYTE,t),i=a(u.KANJI,n.KANJI,t)):(o=a(u.BYTE_KANJI,n.BYTE,t),i=[]),r.concat(e,o,i).sort((function(t,n){return t.index-n.index})).map((function(t){return{data:t.data,mode:t.mode,length:t.length}}))}function l(t,u){switch(u){case n.NUMERIC:return r.getBitsLength(t);case n.ALPHANUMERIC:return e.getBitsLength(t);case n.KANJI:return i.getBitsLength(t);case n.BYTE:return o.getBitsLength(t)}}function d(t,u){let s;const f=n.getBestModeForData(t);if(s=n.from(u,f),s!==n.BYTE&&s.bit<f.bit)throw new Error('"'+t+'" cannot be encoded with mode '+n.toString(s)+".\n Suggested mode is: "+n.toString(f));switch(s!==n.KANJI||c.isKanjiModeEnabled()||(s=n.BYTE),s){case n.NUMERIC:return new r(t);case n.ALPHANUMERIC:return new e(t);case n.KANJI:return new i(t);case n.BYTE:return new o(t)}}t.fromArray=function(t){return t.reduce((function(t,n){return"string"==typeof n?t.push(d(n,null)):n.data&&t.push(d(n.data,n.mode)),t}),[])},t.fromString=function(r,e){const o=function(t,r){const e={},o={start:{}};let i=["start"];for(let u=0;u<t.length;u++){const c=t[u],s=[];for(let t=0;t<c.length;t++){const f=c[t],a=""+u+t;s.push(a),e[a]={node:f,lastCount:0},o[a]={};for(let t=0;t<i.length;t++){const u=i[t];e[u]&&e[u].node.mode===f.mode?(o[u][a]=l(e[u].lastCount+f.length,f.mode)-l(e[u].lastCount,f.mode),e[u].lastCount+=f.length):(e[u]&&(e[u].lastCount=f.length),o[u][a]=l(f.length,f.mode)+4+n.getCharCountIndicator(f.mode,r))}}i=s}for(let t=0;t<i.length;t++)o[i[t]].end=0;return{map:o,table:e}}(function(t){const r=[];for(let e=0;e<t.length;e++){const o=t[e];switch(o.mode){case n.NUMERIC:r.push([o,{data:o.data,mode:n.ALPHANUMERIC,length:o.length},{data:o.data,mode:n.BYTE,length:o.length}]);break;case n.ALPHANUMERIC:r.push([o,{data:o.data,mode:n.BYTE,length:o.length}]);break;case n.KANJI:r.push([o,{data:o.data,mode:n.BYTE,length:f(o.data)}]);break;case n.BYTE:r.push([{data:o.data,mode:n.BYTE,length:f(o.data)}])}}return r}(h(r,c.isKanjiModeEnabled())),e),i=s.find_path(o.map,"start","end"),u=[];for(let t=1;t<i.length-1;t++)u.push(o.table[i[t]].node);return t.fromArray(u.reduce((function(t,n){const r=t.length-1>=0?t[t.length-1]:null;return r&&r.mode===n.mode?(t[t.length-1].data+=n.data,t):(t.push(n),t)}),[]))},t.rawSplit=function(n){return t.fromArray(h(n,c.isKanjiModeEnabled()))}}(ft)),ft);function d(t,n,r){const e=t.size,o=a.getEncodedBits(n,r);let i,u;for(i=0;i<15;i++)u=1==(o>>i&1),t.set(i<6?i:i<8?i+1:e-15+i,8,u,!0),t.set(8,i<8?e-i-1:i<9?15-i-1+1:15-i-1,u,!0);t.set(e-8,8,1,!0)}function p(n,a,w,p){let v;if(Array.isArray(n))v=l.fromArray(n);else{if("string"!=typeof n)throw new Error("Invalid data");{let t=a;if(!t){const r=l.rawSplit(n);t=f.getBestVersionForData(r,w)}v=l.fromString(n,t||40)}}const m=f.getBestVersionForData(v,w);if(!m)throw new Error("The amount of data is too big to be stored in a QR Code");if(a){if(a<m)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+m+".\n")}else a=m;const g=function(n,e,o){const i=new r;o.forEach((function(t){i.put(t.mode.bit,4),i.put(t.getLength(),h.getCharCountIndicator(t.mode,n)),t.write(i)}));const u=8*(t.getSymbolTotalCodewords(n)-c.getTotalCodewordsCount(n,e));for(i.getLengthInBits()+4<=u&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(0);const f=(u-i.getLengthInBits())/8;for(let t=0;t<f;t++)i.put(t%2?17:236,8);return function(n,r,e){const o=t.getSymbolTotalCodewords(r),i=o-c.getTotalCodewordsCount(r,e),u=c.getBlocksCount(r,e),f=u-o%u,a=Math.floor(o/u),h=Math.floor(i/u),l=h+1,d=a-h,w=new s(d);let p=0;const v=new Array(u),m=new Array(u);let g=0;const E=new Uint8Array(n.buffer);for(let t=0;t<u;t++){const n=t<f?h:l;v[t]=E.slice(p,p+n),m[t]=w.encode(v[t]),p+=n,g=Math.max(g,n)}const y=new Uint8Array(o);let A,M,b=0;for(A=0;A<g;A++)for(M=0;M<u;M++)A<v[M].length&&(y[b++]=v[M][A]);for(A=0;A<d;A++)for(M=0;M<u;M++)y[b++]=m[M][A];return y}(i,n,e)}(a,w,v),E=t.getSymbolSize(a),y=new e(E);return function(t,n){const r=t.size,e=i.getPositions(n);for(let n=0;n<e.length;n++){const o=e[n][0],i=e[n][1];for(let n=-1;n<=7;n++)if(!(o+n<=-1||r<=o+n))for(let e=-1;e<=7;e++)i+e<=-1||r<=i+e||t.set(o+n,i+e,n>=0&&n<=6&&(0===e||6===e)||e>=0&&e<=6&&(0===n||6===n)||n>=2&&n<=4&&e>=2&&e<=4,!0)}}(y,a),function(t){const n=t.size;for(let r=8;r<n-8;r++){const n=r%2==0;t.set(r,6,n,!0),t.set(6,r,n,!0)}}(y),function(t,n){const r=o.getPositions(n);for(let n=0;n<r.length;n++){const e=r[n][0],o=r[n][1];for(let n=-2;n<=2;n++)for(let r=-2;r<=2;r++)t.set(e+n,o+r,-2===n||2===n||-2===r||2===r||0===n&&0===r,!0)}}(y,a),d(y,w,0),a>=7&&function(t,n){const r=t.size,e=f.getEncodedBits(n);let o,i,u;for(let n=0;n<18;n++)o=Math.floor(n/3),i=n%3+r-8-3,u=1==(e>>n&1),t.set(o,i,u,!0),t.set(i,o,u,!0)}(y,a),function(t,n){const r=t.size;let e=-1,o=r-1,i=7,u=0;for(let c=r-1;c>0;c-=2)for(6===c&&c--;;){for(let r=0;r<2;r++)if(!t.isReserved(o,c-r)){let e=!1;u<n.length&&(e=1==(n[u]>>>i&1)),t.set(o,c-r,e),i--,-1===i&&(u++,i=7)}if(o+=e,o<0||r<=o){o-=e,e=-e;break}}}(y,g),isNaN(p)&&(p=u.getBestMask(y,d.bind(null,y,w))),u.applyMask(p,y),d(y,w,p),{modules:y,version:a,errorCorrectionLevel:w,maskPattern:p,segments:v}}return w.create=function(r,e){if(void 0===r||""===r)throw new Error("No input text");let o,i,c=n.M;return void 0!==e&&(c=n.from(e.errorCorrectionLevel,n.M),o=f.from(e.version),i=u.from(e.maskPattern),e.toSJISFunc&&t.setToSJISFunction(e.toSJISFunc)),p(r,o,c,i)},w}var dt,wt,pt={},vt={};function mt(){return dt||(dt=1,function(t){function n(t){if("number"==typeof t&&(t=t.toString()),"string"!=typeof t)throw new Error("Color should be defined as hex string");let n=t.slice().replace("#","").split("");if(n.length<3||5===n.length||n.length>8)throw new Error("Invalid hex color: "+t);3!==n.length&&4!==n.length||(n=Array.prototype.concat.apply([],n.map((function(t){return[t,t]})))),6===n.length&&n.push("F","F");const r=parseInt(n.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:255&r,hex:"#"+n.slice(0,6).join("")}}t.getOptions=function(t){t||(t={}),t.color||(t.color={});const r=t.width&&t.width>=21?t.width:void 0;return{width:r,scale:r?4:t.scale||4,margin:null==t.margin||t.margin<0?4:t.margin,color:{dark:n(t.color.dark||"#000000ff"),light:n(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},t.getScale=function(t,n){return n.width&&n.width>=t+2*n.margin?n.width/(t+2*n.margin):n.scale},t.getImageWidth=function(n,r){const e=t.getScale(n,r);return Math.floor((n+2*r.margin)*e)},t.qrToImageData=function(n,r,e){const o=r.modules.size,i=r.modules.data,u=t.getScale(o,e),c=Math.floor((o+2*e.margin)*u),s=e.margin*u,f=[e.color.light,e.color.dark];for(let t=0;t<c;t++)for(let r=0;r<c;r++){let a=4*(t*c+r),h=e.color.light;t>=s&&r>=s&&t<c-s&&r<c-s&&(h=f[i[Math.floor((t-s)/u)*o+Math.floor((r-s)/u)]?1:0]),n[a++]=h.r,n[a++]=h.g,n[a++]=h.b,n[a]=h.a}}}(vt)),vt}var gt,Et,yt={};var At=function(){if(Et)return h;Et=1;const t=l(),n=lt(),r=(wt||(wt=1,function(t){const n=mt();t.render=function(t,r,e){let o=e,i=r;void 0!==o||r&&r.getContext||(o=r,r=void 0),r||(i=function(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}()),o=n.getOptions(o);const u=n.getImageWidth(t.modules.size,o),c=i.getContext("2d"),s=c.createImageData(u,u);return n.qrToImageData(s.data,t,o),function(t,n,r){t.clearRect(0,0,n.width,n.height),n.style||(n.style={}),n.height=r,n.width=r,n.style.height=r+"px",n.style.width=r+"px"}(c,i,u),c.putImageData(s,0,0),i},t.renderToDataURL=function(n,r,e){let o=e;return void 0!==o||r&&r.getContext||(o=r,r=void 0),o||(o={}),t.render(n,r,o).toDataURL(o.type||"image/png",(o.rendererOpts||{}).quality)}}(pt)),pt),e=function(){if(gt)return yt;gt=1;const t=mt();function n(t,n){const r=t.a/255,e=n+'="'+t.hex+'"';return r<1?e+" "+n+'-opacity="'+r.toFixed(2).slice(1)+'"':e}function r(t,n,r){let e=t+n;return void 0!==r&&(e+=" "+r),e}return yt.render=function(e,o,i){const u=t.getOptions(o),c=e.modules.size,s=e.modules.data,f=c+2*u.margin,a=u.color.light.a?"<path "+n(u.color.light,"fill")+' d="M0 0h'+f+"v"+f+'H0z"/>':"",h="<path "+n(u.color.dark,"stroke")+' d="'+function(t,n,e){let o="",i=0,u=!1,c=0;for(let s=0;s<t.length;s++){const f=Math.floor(s%n),a=Math.floor(s/n);f||u||(u=!0),t[s]?(c++,s>0&&f>0&&t[s-1]||(o+=u?r("M",f+e,.5+a+e):r("m",i,0),i=0,u=!1),f+1<n&&t[s+1]||(o+=r("h",c),c=0)):i++}return o}(s,c,u.margin)+'"/>',l='<svg xmlns="http://www.w3.org/2000/svg" '+(u.width?'width="'+u.width+'" height="'+u.width+'" ':"")+'viewBox="0 0 '+f+" "+f+'" shape-rendering="crispEdges">'+a+h+"</svg>\n";return"function"==typeof i&&i(null,l),l},yt}();function o(r,e,o,i,u){const c=[].slice.call(arguments,1),s=c.length,f="function"==typeof c[s-1];if(!f&&!t())throw new Error("Callback required as last argument");if(!f){if(s<1)throw new Error("Too few arguments provided");return 1===s?(o=e,e=i=void 0):2!==s||e.getContext||(i=o,o=e,e=void 0),new Promise((function(t,u){try{const u=n.create(o,i);t(r(u,e,i))}catch(t){u(t)}}))}if(s<2)throw new Error("Too few arguments provided");2===s?(u=o,o=e,e=i=void 0):3===s&&(e.getContext&&void 0===u?(u=i,i=void 0):(u=i,i=o,o=e,e=void 0));try{const t=n.create(o,i);u(null,r(t,e,i))}catch(t){u(t)}}return h.create=n.create,h.toCanvas=o.bind(null,r.render),h.toDataURL=o.bind(null,r.renderToDataURL),h.toString=o.bind(null,(function(t,n,r){return e.render(t,r)})),h}(),Mt=o(At);const bt=class{constructor(r){t(this,r),this.errorEvent=n(this,"error-event",7),this.size=256}componentWillLoad(){s(),this.analytics=new c(this)}componentDidLoad(){this.renderQrCode()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.renderQrCode()}get checkoutUrl(){return`https://components.justifi.ai/hosted-checkout/${this.checkoutId}`}async renderQrCode(){if(!this.checkoutId)return void this.errorEvent.emit({message:"checkoutId is required",errorCode:u.MISSING_PROPS,severity:i.ERROR});if(!this.qrContainerEl)return;const t=await Mt.toString(this.checkoutUrl,{type:"svg",width:this.size,errorCorrectionLevel:"M"});this.qrContainerEl.innerHTML=t}render(){return this.checkoutId?r("div",{ref:t=>this.qrContainerEl=t}):null}get el(){return e(this)}static get watchers(){return{checkoutId:["propChanged"],size:["propChanged"]}}};export{bt as justifi_checkout_qr_code}
1
+ import{r as t,c as n,h as r,g as e}from"./p-CV0Pyo1O.js";import{g as o}from"./p-BFTU3MAI.js";import{C as i,b as u}from"./p-D6uhYbLo.js";import{J as c}from"./p-BHaO3c8W.js";import{c as s}from"./p-ByQMBEDC.js";import"./p-Ds_P-dB8.js";import"./p-HXpYMWUU.js";import"./p-Dn9_7aQh.js";import"./p-Bl00tHyn.js";import"./p-B4vLfYnZ.js";import"./p-DgTOxu8x.js";import"./p-CLHwhyvu.js";import"./p-DaDqgDrb.js";var f,a,h={};function l(){return a?f:(a=1,f=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then})}var d,w={},p={};function v(){if(d)return p;let t;d=1;const n=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return p.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return 4*t+17},p.getSymbolTotalCodewords=function(t){return n[t]},p.getBCHDigit=function(t){let n=0;for(;0!==t;)n++,t>>>=1;return n},p.setToSJISFunction=function(n){if("function"!=typeof n)throw new Error('"toSJISFunc" is not a valid function.');t=n},p.isKanjiModeEnabled=function(){return void 0!==t},p.toSJIS=function(n){return t(n)},p}var m,g,E,y,A,M={};function b(){return m||(m=1,(t=M).L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2},t.isValid=function(t){return t&&void 0!==t.bit&&t.bit>=0&&t.bit<4},t.from=function(n,r){if(t.isValid(n))return n;try{return function(n){if("string"!=typeof n)throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+n)}}(n)}catch(t){return r}}),M;var t}var T,x,C,R,U={},I={},k={},B={};function P(){if(R)return B;R=1;const t=b(),n=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],r=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return B.getBlocksCount=function(r,e){switch(e){case t.L:return n[4*(r-1)+0];case t.M:return n[4*(r-1)+1];case t.Q:return n[4*(r-1)+2];case t.H:return n[4*(r-1)+3];default:return}},B.getTotalCodewordsCount=function(n,e){switch(e){case t.L:return r[4*(n-1)+0];case t.M:return r[4*(n-1)+1];case t.Q:return r[4*(n-1)+2];case t.H:return r[4*(n-1)+3];default:return}},B}var j,F,N,_,D={},L={};var Q,$={},q={},H={};function O(){return Q||(Q=1,H.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),H}var S,Z,Y,z={};function J(){if(S)return z;S=1;const t="[0-9]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const r="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+")(?:.|[\r\n]))+";z.KANJI=new RegExp(n,"g"),z.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),z.BYTE=new RegExp(r,"g"),z.NUMERIC=new RegExp(t,"g"),z.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const e=new RegExp("^"+n+"$"),o=new RegExp("^"+t+"$"),i=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return z.testKanji=function(t){return e.test(t)},z.testNumeric=function(t){return o.test(t)},z.testAlphanumeric=function(t){return i.test(t)},z}function W(){return Z||(Z=1,function(t){const n=O(),r=J();t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(t,r){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!n.isValid(r))throw new Error("Invalid version: "+r);return r>=1&&r<10?t.ccBits[0]:r<27?t.ccBits[1]:t.ccBits[2]},t.getBestModeForData=function(n){return r.testNumeric(n)?t.NUMERIC:r.testAlphanumeric(n)?t.ALPHANUMERIC:r.testKanji(n)?t.KANJI:t.BYTE},t.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},t.isValid=function(t){return t&&t.bit&&t.ccBits},t.from=function(n,r){if(t.isValid(n))return n;try{return function(n){if("string"!=typeof n)throw new Error("Param is not a string");switch(n.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+n)}}(n)}catch(t){return r}}}(q)),q}var K,V,X,G,tt,nt,rt,et,ot,it,ut,ct,st={},ft={},at={exports:{}};function ht(){return it||(it=1,function(t){var n={single_source_shortest_paths:function(t,r,e){var o={},i={};i[r]=0;var u,c,s,f,a,h,l=n.PriorityQueue.make();for(l.push(r,0);!l.empty();)for(s in f=(u=l.pop()).cost,a=t[c=u.value]||{})a.hasOwnProperty(s)&&(h=f+a[s],(void 0===i[s]||i[s]>h)&&(i[s]=h,l.push(s,h),o[s]=c));if(void 0!==e&&void 0===i[e]){var d=["Could not find a path from ",r," to ",e,"."].join("");throw new Error(d)}return o},extract_shortest_path_from_predecessor_list:function(t,n){for(var r=[],e=n;e;)r.push(e),e=t[e];return r.reverse(),r},find_path:function(t,r,e){var o=n.single_source_shortest_paths(t,r,e);return n.extract_shortest_path_from_predecessor_list(o,e)},PriorityQueue:{make:function(t){var r,e=n.PriorityQueue,o={};for(r in t=t||{},e)e.hasOwnProperty(r)&&(o[r]=e[r]);return o.queue=[],o.sorter=t.sorter||e.default_sorter,o},default_sorter:function(t,n){return t.cost-n.cost},push:function(t,n){this.queue.push({value:t,cost:n}),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};t.exports=n}(at)),at.exports}function lt(){if(ct)return w;ct=1;const t=v(),n=b(),r=function(){if(E)return g;function t(){this.buffer=[],this.length=0}return E=1,t.prototype={get:function(t){const n=Math.floor(t/8);return 1==(this.buffer[n]>>>7-t%8&1)},put:function(t,n){for(let r=0;r<n;r++)this.putBit(1==(t>>>n-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){const n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),t&&(this.buffer[n]|=128>>>this.length%8),this.length++}},g=t}(),e=function(){if(A)return y;function t(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}return A=1,t.prototype.set=function(t,n,r,e){const o=t*this.size+n;this.data[o]=r,e&&(this.reservedBit[o]=!0)},t.prototype.get=function(t,n){return this.data[t*this.size+n]},t.prototype.xor=function(t,n,r){this.data[t*this.size+n]^=r},t.prototype.isReserved=function(t,n){return this.reservedBit[t*this.size+n]},y=t}(),o=(T||(T=1,function(t){const n=v().getSymbolSize;t.getRowColCoords=function(t){if(1===t)return[];const r=Math.floor(t/7)+2,e=n(t),o=145===e?26:2*Math.ceil((e-13)/(2*r-2)),i=[e-7];for(let t=1;t<r-1;t++)i[t]=i[t-1]-o;return i.push(6),i.reverse()},t.getPositions=function(n){const r=[],e=t.getRowColCoords(n),o=e.length;for(let t=0;t<o;t++)for(let n=0;n<o;n++)0===t&&0===n||0===t&&n===o-1||t===o-1&&0===n||r.push([e[t],e[n]]);return r}}(U)),U),i=function(){if(x)return I;x=1;const t=v().getSymbolSize;return I.getPositions=function(n){const r=t(n);return[[0,0],[r-7,0],[0,r-7]]},I}(),u=(C||(C=1,function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};function n(n,r,e){switch(n){case t.Patterns.PATTERN000:return(r+e)%2==0;case t.Patterns.PATTERN001:return r%2==0;case t.Patterns.PATTERN010:return e%3==0;case t.Patterns.PATTERN011:return(r+e)%3==0;case t.Patterns.PATTERN100:return(Math.floor(r/2)+Math.floor(e/3))%2==0;case t.Patterns.PATTERN101:return r*e%2+r*e%3==0;case t.Patterns.PATTERN110:return(r*e%2+r*e%3)%2==0;case t.Patterns.PATTERN111:return(r*e%3+(r+e)%2)%2==0;default:throw new Error("bad maskPattern:"+n)}}t.isValid=function(t){return null!=t&&""!==t&&!isNaN(t)&&t>=0&&t<=7},t.from=function(n){return t.isValid(n)?parseInt(n,10):void 0},t.getPenaltyN1=function(t){const n=t.size;let r=0,e=0,o=0,i=null,u=null;for(let c=0;c<n;c++){e=o=0,i=u=null;for(let s=0;s<n;s++){let n=t.get(c,s);n===i?e++:(e>=5&&(r+=e-5+3),i=n,e=1),n=t.get(s,c),n===u?o++:(o>=5&&(r+=o-5+3),u=n,o=1)}e>=5&&(r+=e-5+3),o>=5&&(r+=o-5+3)}return r},t.getPenaltyN2=function(t){const n=t.size;let r=0;for(let e=0;e<n-1;e++)for(let o=0;o<n-1;o++){const n=t.get(e,o)+t.get(e,o+1)+t.get(e+1,o)+t.get(e+1,o+1);4!==n&&0!==n||r++}return 3*r},t.getPenaltyN3=function(t){const n=t.size;let r=0,e=0,o=0;for(let i=0;i<n;i++){e=o=0;for(let u=0;u<n;u++)e=e<<1&2047|t.get(i,u),u>=10&&(1488===e||93===e)&&r++,o=o<<1&2047|t.get(u,i),u>=10&&(1488===o||93===o)&&r++}return 40*r},t.getPenaltyN4=function(t){let n=0;const r=t.data.length;for(let e=0;e<r;e++)n+=t.data[e];return 10*Math.abs(Math.ceil(100*n/r/5)-10)},t.applyMask=function(t,r){const e=r.size;for(let o=0;o<e;o++)for(let i=0;i<e;i++)r.isReserved(i,o)||r.xor(i,o,n(t,i,o))},t.getBestMask=function(n,r){const e=Object.keys(t.Patterns).length;let o=0,i=1/0;for(let u=0;u<e;u++){r(u),t.applyMask(u,n);const e=t.getPenaltyN1(n)+t.getPenaltyN2(n)+t.getPenaltyN3(n)+t.getPenaltyN4(n);t.applyMask(u,n),e<i&&(i=e,o=u)}return o}}(k)),k),c=P(),s=function(){if(_)return N;_=1;const t=(F||(F=1,function(t){const n=function(){if(j)return L;j=1;const t=new Uint8Array(512),n=new Uint8Array(256);return function(){let r=1;for(let e=0;e<255;e++)t[e]=r,n[r]=e,r<<=1,256&r&&(r^=285);for(let n=255;n<512;n++)t[n]=t[n-255]}(),L.log=function(t){if(t<1)throw new Error("log("+t+")");return n[t]},L.exp=function(n){return t[n]},L.mul=function(r,e){return 0===r||0===e?0:t[n[r]+n[e]]},L}();t.mul=function(t,r){const e=new Uint8Array(t.length+r.length-1);for(let o=0;o<t.length;o++)for(let i=0;i<r.length;i++)e[o+i]^=n.mul(t[o],r[i]);return e},t.mod=function(t,r){let e=new Uint8Array(t);for(;e.length-r.length>=0;){const t=e[0];for(let o=0;o<r.length;o++)e[o]^=n.mul(r[o],t);let o=0;for(;o<e.length&&0===e[o];)o++;e=e.slice(o)}return e},t.generateECPolynomial=function(r){let e=new Uint8Array([1]);for(let o=0;o<r;o++)e=t.mul(e,new Uint8Array([1,n.exp(o)]));return e}}(D)),D);function n(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}return n.prototype.initialize=function(n){this.degree=n,this.genPoly=t.generateECPolynomial(this.degree)},n.prototype.encode=function(n){if(!this.genPoly)throw new Error("Encoder not initialized");const r=new Uint8Array(n.length+this.degree);r.set(n);const e=t.mod(r,this.genPoly),o=this.degree-e.length;if(o>0){const t=new Uint8Array(this.degree);return t.set(e,o),t}return e},N=n}(),f=(Y||(Y=1,function(t){const n=v(),r=P(),e=b(),o=W(),i=O(),u=n.getBCHDigit(7973);function c(t,n){return o.getCharCountIndicator(t,n)+4}function s(t,n){let r=0;return t.forEach((function(t){const e=c(t.mode,n);r+=e+t.getBitsLength()})),r}t.from=function(t,n){return i.isValid(t)?parseInt(t,10):n},t.getCapacity=function(t,e,u){if(!i.isValid(t))throw new Error("Invalid QR Code version");void 0===u&&(u=o.BYTE);const s=8*(n.getSymbolTotalCodewords(t)-r.getTotalCodewordsCount(t,e));if(u===o.MIXED)return s;const f=s-c(u,t);switch(u){case o.NUMERIC:return Math.floor(f/10*3);case o.ALPHANUMERIC:return Math.floor(f/11*2);case o.KANJI:return Math.floor(f/13);default:return Math.floor(f/8)}},t.getBestVersionForData=function(n,r){let i;const u=e.from(r,e.M);if(Array.isArray(n)){if(n.length>1)return function(n,r){for(let e=1;e<=40;e++)if(s(n,e)<=t.getCapacity(e,r,o.MIXED))return e}(n,u);if(0===n.length)return 1;i=n[0]}else i=n;return function(n,r,e){for(let o=1;o<=40;o++)if(r<=t.getCapacity(o,e,n))return o}(i.mode,i.getLength(),u)},t.getEncodedBits=function(t){if(!i.isValid(t)||t<7)throw new Error("Invalid QR Code version");let r=t<<12;for(;n.getBCHDigit(r)-u>=0;)r^=7973<<n.getBCHDigit(r)-u;return t<<12|r}}($)),$),a=function(){if(K)return st;K=1;const t=v(),n=t.getBCHDigit(1335);return st.getEncodedBits=function(r,e){const o=r.bit<<3|e;let i=o<<10;for(;t.getBCHDigit(i)-n>=0;)i^=1335<<t.getBCHDigit(i)-n;return 21522^(o<<10|i)},st}(),h=W(),l=(ut||(ut=1,function(t){const n=W(),r=function(){if(X)return V;X=1;const t=W();function n(n){this.mode=t.NUMERIC,this.data=n.toString()}return n.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(t){let n,r,e;for(n=0;n+3<=this.data.length;n+=3)r=this.data.substr(n,3),e=parseInt(r,10),t.put(e,10);const o=this.data.length-n;o>0&&(r=this.data.substr(n),e=parseInt(r,10),t.put(e,3*o+1))},V=n}(),e=function(){if(tt)return G;tt=1;const t=W(),n=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function r(n){this.mode=t.ALPHANUMERIC,this.data=n}return r.getBitsLength=function(t){return 11*Math.floor(t/2)+t%2*6},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(t){let r;for(r=0;r+2<=this.data.length;r+=2){let e=45*n.indexOf(this.data[r]);e+=n.indexOf(this.data[r+1]),t.put(e,11)}this.data.length%2&&t.put(n.indexOf(this.data[r]),6)},G=r}(),o=function(){if(rt)return nt;rt=1;const t=W();function n(n){this.mode=t.BYTE,this.data="string"==typeof n?(new TextEncoder).encode(n):new Uint8Array(n)}return n.getBitsLength=function(t){return 8*t},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(t){for(let n=0,r=this.data.length;n<r;n++)t.put(this.data[n],8)},nt=n}(),i=function(){if(ot)return et;ot=1;const t=W(),n=v();function r(n){this.mode=t.KANJI,this.data=n}return r.getBitsLength=function(t){return 13*t},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(t){let r;for(r=0;r<this.data.length;r++){let e=n.toSJIS(this.data[r]);if(e>=33088&&e<=40956)e-=33088;else{if(!(e>=57408&&e<=60351))throw new Error("Invalid SJIS character: "+this.data[r]+"\nMake sure your charset is UTF-8");e-=49472}e=192*(e>>>8&255)+(255&e),t.put(e,13)}},et=r}(),u=J(),c=v(),s=ht();function f(t){return unescape(encodeURIComponent(t)).length}function a(t,n,r){const e=[];let o;for(;null!==(o=t.exec(r));)e.push({data:o[0],index:o.index,mode:n,length:o[0].length});return e}function h(t){const r=a(u.NUMERIC,n.NUMERIC,t),e=a(u.ALPHANUMERIC,n.ALPHANUMERIC,t);let o,i;return c.isKanjiModeEnabled()?(o=a(u.BYTE,n.BYTE,t),i=a(u.KANJI,n.KANJI,t)):(o=a(u.BYTE_KANJI,n.BYTE,t),i=[]),r.concat(e,o,i).sort((function(t,n){return t.index-n.index})).map((function(t){return{data:t.data,mode:t.mode,length:t.length}}))}function l(t,u){switch(u){case n.NUMERIC:return r.getBitsLength(t);case n.ALPHANUMERIC:return e.getBitsLength(t);case n.KANJI:return i.getBitsLength(t);case n.BYTE:return o.getBitsLength(t)}}function d(t,u){let s;const f=n.getBestModeForData(t);if(s=n.from(u,f),s!==n.BYTE&&s.bit<f.bit)throw new Error('"'+t+'" cannot be encoded with mode '+n.toString(s)+".\n Suggested mode is: "+n.toString(f));switch(s!==n.KANJI||c.isKanjiModeEnabled()||(s=n.BYTE),s){case n.NUMERIC:return new r(t);case n.ALPHANUMERIC:return new e(t);case n.KANJI:return new i(t);case n.BYTE:return new o(t)}}t.fromArray=function(t){return t.reduce((function(t,n){return"string"==typeof n?t.push(d(n,null)):n.data&&t.push(d(n.data,n.mode)),t}),[])},t.fromString=function(r,e){const o=function(t,r){const e={},o={start:{}};let i=["start"];for(let u=0;u<t.length;u++){const c=t[u],s=[];for(let t=0;t<c.length;t++){const f=c[t],a=""+u+t;s.push(a),e[a]={node:f,lastCount:0},o[a]={};for(let t=0;t<i.length;t++){const u=i[t];e[u]&&e[u].node.mode===f.mode?(o[u][a]=l(e[u].lastCount+f.length,f.mode)-l(e[u].lastCount,f.mode),e[u].lastCount+=f.length):(e[u]&&(e[u].lastCount=f.length),o[u][a]=l(f.length,f.mode)+4+n.getCharCountIndicator(f.mode,r))}}i=s}for(let t=0;t<i.length;t++)o[i[t]].end=0;return{map:o,table:e}}(function(t){const r=[];for(let e=0;e<t.length;e++){const o=t[e];switch(o.mode){case n.NUMERIC:r.push([o,{data:o.data,mode:n.ALPHANUMERIC,length:o.length},{data:o.data,mode:n.BYTE,length:o.length}]);break;case n.ALPHANUMERIC:r.push([o,{data:o.data,mode:n.BYTE,length:o.length}]);break;case n.KANJI:r.push([o,{data:o.data,mode:n.BYTE,length:f(o.data)}]);break;case n.BYTE:r.push([{data:o.data,mode:n.BYTE,length:f(o.data)}])}}return r}(h(r,c.isKanjiModeEnabled())),e),i=s.find_path(o.map,"start","end"),u=[];for(let t=1;t<i.length-1;t++)u.push(o.table[i[t]].node);return t.fromArray(u.reduce((function(t,n){const r=t.length-1>=0?t[t.length-1]:null;return r&&r.mode===n.mode?(t[t.length-1].data+=n.data,t):(t.push(n),t)}),[]))},t.rawSplit=function(n){return t.fromArray(h(n,c.isKanjiModeEnabled()))}}(ft)),ft);function d(t,n,r){const e=t.size,o=a.getEncodedBits(n,r);let i,u;for(i=0;i<15;i++)u=1==(o>>i&1),t.set(i<6?i:i<8?i+1:e-15+i,8,u,!0),t.set(8,i<8?e-i-1:i<9?15-i-1+1:15-i-1,u,!0);t.set(e-8,8,1,!0)}function p(n,a,w,p){let v;if(Array.isArray(n))v=l.fromArray(n);else{if("string"!=typeof n)throw new Error("Invalid data");{let t=a;if(!t){const r=l.rawSplit(n);t=f.getBestVersionForData(r,w)}v=l.fromString(n,t||40)}}const m=f.getBestVersionForData(v,w);if(!m)throw new Error("The amount of data is too big to be stored in a QR Code");if(a){if(a<m)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+m+".\n")}else a=m;const g=function(n,e,o){const i=new r;o.forEach((function(t){i.put(t.mode.bit,4),i.put(t.getLength(),h.getCharCountIndicator(t.mode,n)),t.write(i)}));const u=8*(t.getSymbolTotalCodewords(n)-c.getTotalCodewordsCount(n,e));for(i.getLengthInBits()+4<=u&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(0);const f=(u-i.getLengthInBits())/8;for(let t=0;t<f;t++)i.put(t%2?17:236,8);return function(n,r,e){const o=t.getSymbolTotalCodewords(r),i=o-c.getTotalCodewordsCount(r,e),u=c.getBlocksCount(r,e),f=u-o%u,a=Math.floor(o/u),h=Math.floor(i/u),l=h+1,d=a-h,w=new s(d);let p=0;const v=new Array(u),m=new Array(u);let g=0;const E=new Uint8Array(n.buffer);for(let t=0;t<u;t++){const n=t<f?h:l;v[t]=E.slice(p,p+n),m[t]=w.encode(v[t]),p+=n,g=Math.max(g,n)}const y=new Uint8Array(o);let A,M,b=0;for(A=0;A<g;A++)for(M=0;M<u;M++)A<v[M].length&&(y[b++]=v[M][A]);for(A=0;A<d;A++)for(M=0;M<u;M++)y[b++]=m[M][A];return y}(i,n,e)}(a,w,v),E=t.getSymbolSize(a),y=new e(E);return function(t,n){const r=t.size,e=i.getPositions(n);for(let n=0;n<e.length;n++){const o=e[n][0],i=e[n][1];for(let n=-1;n<=7;n++)if(!(o+n<=-1||r<=o+n))for(let e=-1;e<=7;e++)i+e<=-1||r<=i+e||t.set(o+n,i+e,n>=0&&n<=6&&(0===e||6===e)||e>=0&&e<=6&&(0===n||6===n)||n>=2&&n<=4&&e>=2&&e<=4,!0)}}(y,a),function(t){const n=t.size;for(let r=8;r<n-8;r++){const n=r%2==0;t.set(r,6,n,!0),t.set(6,r,n,!0)}}(y),function(t,n){const r=o.getPositions(n);for(let n=0;n<r.length;n++){const e=r[n][0],o=r[n][1];for(let n=-2;n<=2;n++)for(let r=-2;r<=2;r++)t.set(e+n,o+r,-2===n||2===n||-2===r||2===r||0===n&&0===r,!0)}}(y,a),d(y,w,0),a>=7&&function(t,n){const r=t.size,e=f.getEncodedBits(n);let o,i,u;for(let n=0;n<18;n++)o=Math.floor(n/3),i=n%3+r-8-3,u=1==(e>>n&1),t.set(o,i,u,!0),t.set(i,o,u,!0)}(y,a),function(t,n){const r=t.size;let e=-1,o=r-1,i=7,u=0;for(let c=r-1;c>0;c-=2)for(6===c&&c--;;){for(let r=0;r<2;r++)if(!t.isReserved(o,c-r)){let e=!1;u<n.length&&(e=1==(n[u]>>>i&1)),t.set(o,c-r,e),i--,-1===i&&(u++,i=7)}if(o+=e,o<0||r<=o){o-=e,e=-e;break}}}(y,g),isNaN(p)&&(p=u.getBestMask(y,d.bind(null,y,w))),u.applyMask(p,y),d(y,w,p),{modules:y,version:a,errorCorrectionLevel:w,maskPattern:p,segments:v}}return w.create=function(r,e){if(void 0===r||""===r)throw new Error("No input text");let o,i,c=n.M;return void 0!==e&&(c=n.from(e.errorCorrectionLevel,n.M),o=f.from(e.version),i=u.from(e.maskPattern),e.toSJISFunc&&t.setToSJISFunction(e.toSJISFunc)),p(r,o,c,i)},w}var dt,wt,pt={},vt={};function mt(){return dt||(dt=1,function(t){function n(t){if("number"==typeof t&&(t=t.toString()),"string"!=typeof t)throw new Error("Color should be defined as hex string");let n=t.slice().replace("#","").split("");if(n.length<3||5===n.length||n.length>8)throw new Error("Invalid hex color: "+t);3!==n.length&&4!==n.length||(n=Array.prototype.concat.apply([],n.map((function(t){return[t,t]})))),6===n.length&&n.push("F","F");const r=parseInt(n.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:255&r,hex:"#"+n.slice(0,6).join("")}}t.getOptions=function(t){t||(t={}),t.color||(t.color={});const r=t.width&&t.width>=21?t.width:void 0;return{width:r,scale:r?4:t.scale||4,margin:null==t.margin||t.margin<0?4:t.margin,color:{dark:n(t.color.dark||"#000000ff"),light:n(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},t.getScale=function(t,n){return n.width&&n.width>=t+2*n.margin?n.width/(t+2*n.margin):n.scale},t.getImageWidth=function(n,r){const e=t.getScale(n,r);return Math.floor((n+2*r.margin)*e)},t.qrToImageData=function(n,r,e){const o=r.modules.size,i=r.modules.data,u=t.getScale(o,e),c=Math.floor((o+2*e.margin)*u),s=e.margin*u,f=[e.color.light,e.color.dark];for(let t=0;t<c;t++)for(let r=0;r<c;r++){let a=4*(t*c+r),h=e.color.light;t>=s&&r>=s&&t<c-s&&r<c-s&&(h=f[i[Math.floor((t-s)/u)*o+Math.floor((r-s)/u)]?1:0]),n[a++]=h.r,n[a++]=h.g,n[a++]=h.b,n[a]=h.a}}}(vt)),vt}var gt,Et,yt={};var At=function(){if(Et)return h;Et=1;const t=l(),n=lt(),r=(wt||(wt=1,function(t){const n=mt();t.render=function(t,r,e){let o=e,i=r;void 0!==o||r&&r.getContext||(o=r,r=void 0),r||(i=function(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}()),o=n.getOptions(o);const u=n.getImageWidth(t.modules.size,o),c=i.getContext("2d"),s=c.createImageData(u,u);return n.qrToImageData(s.data,t,o),function(t,n,r){t.clearRect(0,0,n.width,n.height),n.style||(n.style={}),n.height=r,n.width=r,n.style.height=r+"px",n.style.width=r+"px"}(c,i,u),c.putImageData(s,0,0),i},t.renderToDataURL=function(n,r,e){let o=e;return void 0!==o||r&&r.getContext||(o=r,r=void 0),o||(o={}),t.render(n,r,o).toDataURL(o.type||"image/png",(o.rendererOpts||{}).quality)}}(pt)),pt),e=function(){if(gt)return yt;gt=1;const t=mt();function n(t,n){const r=t.a/255,e=n+'="'+t.hex+'"';return r<1?e+" "+n+'-opacity="'+r.toFixed(2).slice(1)+'"':e}function r(t,n,r){let e=t+n;return void 0!==r&&(e+=" "+r),e}return yt.render=function(e,o,i){const u=t.getOptions(o),c=e.modules.size,s=e.modules.data,f=c+2*u.margin,a=u.color.light.a?"<path "+n(u.color.light,"fill")+' d="M0 0h'+f+"v"+f+'H0z"/>':"",h="<path "+n(u.color.dark,"stroke")+' d="'+function(t,n,e){let o="",i=0,u=!1,c=0;for(let s=0;s<t.length;s++){const f=Math.floor(s%n),a=Math.floor(s/n);f||u||(u=!0),t[s]?(c++,s>0&&f>0&&t[s-1]||(o+=u?r("M",f+e,.5+a+e):r("m",i,0),i=0,u=!1),f+1<n&&t[s+1]||(o+=r("h",c),c=0)):i++}return o}(s,c,u.margin)+'"/>',l='<svg xmlns="http://www.w3.org/2000/svg" '+(u.width?'width="'+u.width+'" height="'+u.width+'" ':"")+'viewBox="0 0 '+f+" "+f+'" shape-rendering="crispEdges">'+a+h+"</svg>\n";return"function"==typeof i&&i(null,l),l},yt}();function o(r,e,o,i,u){const c=[].slice.call(arguments,1),s=c.length,f="function"==typeof c[s-1];if(!f&&!t())throw new Error("Callback required as last argument");if(!f){if(s<1)throw new Error("Too few arguments provided");return 1===s?(o=e,e=i=void 0):2!==s||e.getContext||(i=o,o=e,e=void 0),new Promise((function(t,u){try{const u=n.create(o,i);t(r(u,e,i))}catch(t){u(t)}}))}if(s<2)throw new Error("Too few arguments provided");2===s?(u=o,o=e,e=i=void 0):3===s&&(e.getContext&&void 0===u?(u=i,i=void 0):(u=i,i=o,o=e,e=void 0));try{const t=n.create(o,i);u(null,r(t,e,i))}catch(t){u(t)}}return h.create=n.create,h.toCanvas=o.bind(null,r.render),h.toDataURL=o.bind(null,r.renderToDataURL),h.toString=o.bind(null,(function(t,n,r){return e.render(t,r)})),h}(),Mt=o(At);const bt=class{constructor(r){t(this,r),this.errorEvent=n(this,"error-event",7),this.size=256}componentWillLoad(){s(),this.analytics=new c(this)}componentDidLoad(){this.renderQrCode()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.renderQrCode()}get checkoutUrl(){return`https://components.justifi.ai/hosted-checkout/${this.checkoutId}`}async renderQrCode(){if(!this.checkoutId)return void this.errorEvent.emit({message:"checkoutId is required",errorCode:u.MISSING_PROPS,severity:i.ERROR});if(!this.qrContainerEl)return;const t=await Mt.toString(this.checkoutUrl,{type:"svg",width:this.size,errorCorrectionLevel:"M"});this.qrContainerEl.innerHTML=t}render(){return this.checkoutId?r("div",{ref:t=>this.qrContainerEl=t}):null}get el(){return e(this)}static get watchers(){return{checkoutId:["propChanged"],size:["propChanged"]}}};export{bt as justifi_checkout_qr_code}
@@ -0,0 +1 @@
1
+ import{r as i,h as s}from"./p-CV0Pyo1O.js";import{J as o}from"./p-BHaO3c8W.js";import{c as r}from"./p-ByQMBEDC.js";import{w as t}from"./p-B4vLfYnZ.js";import{S as a}from"./p-05AWudQe.js";import"./p-CZfYo5-1.js";import"./p-Dn9_7aQh.js";import"./p-Bl00tHyn.js";import"./p-Ds_P-dB8.js";import"./p-HXpYMWUU.js";import"./p-D6uhYbLo.js";import"./p-CLHwhyvu.js";import"./p-DaDqgDrb.js";import"./p-DgTOxu8x.js";const p=class{constructor(s){i(this,s)}async componentWillLoad(){await t(),r(),this.analytics=new o(this)}disconnectedCallback(){var i;null===(i=this.analytics)||void 0===i||i.cleanup()}async getValues(){var i,s;return null!==(s=null===(i=this.bankAccountBillingFormSimpleRef)||void 0===i?void 0:i.getValues())&&void 0!==s?s:{}}async validate(){var i,s;return null!==(s=null===(i=this.bankAccountBillingFormSimpleRef)||void 0===i?void 0:i.validate())&&void 0!==s?s:{isValid:!1,errors:{}}}render(){return s(a,{key:"9848071f08342d3f5c2f7001af6e15148e713495"},s("bank-account-billing-form-simple",{key:"35f2baeb2f017116199ccff431d0acac01ad498f",legend:this.legend,ref:i=>this.bankAccountBillingFormSimpleRef=i}))}};export{p as justifi_bank_account_billing_form_simple}