@justifi/webcomponents 6.15.0-rc.1 → 6.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (359) hide show
  1. package/LICENSE +21 -0
  2. package/dist/cjs/{Analytics-VQGAbMVS.js → Analytics-BjZHa0wt.js} +4 -4
  3. package/dist/cjs/{Api--EGkA-pT.js → Api-us3AxMRC.js} +1 -1
  4. package/dist/cjs/{Business-oBifyXkW.js → Business-CNaz-VLa.js} +5 -1
  5. package/dist/cjs/{Plaid-D85oV9FN.js → Plaid-BcOAKDaU.js} +1 -1
  6. package/dist/cjs/additional-questions-form-step_15.cjs.entry.js +13 -13
  7. package/dist/cjs/additional-questions_4.cjs.entry.js +3 -3
  8. package/dist/cjs/bank-account-billing-form-simple_4.cjs.entry.js +4 -4
  9. package/dist/cjs/bank-account-document-form-inputs.cjs.entry.js +2 -2
  10. package/dist/cjs/bank-account-form.cjs.entry.js +4 -4
  11. package/dist/cjs/{business-form-options-CnlrfbQ6.js → business-form-options-BHBs_yiK.js} +1 -1
  12. package/dist/cjs/{business-identity-schema-hpDJFnB4.js → business-identity-schema-XiCLzxWM.js} +3 -3
  13. package/dist/cjs/{business.service-B51fjG_j.js → business.service-_Sl3vWmu.js} +3 -3
  14. package/dist/cjs/card-form.cjs.entry.js +4 -4
  15. package/dist/cjs/{check-pkg-version-RMsgKzFc.js → check-pkg-version-CjJab8fX.js} +1 -1
  16. package/dist/cjs/{checkout-actions-BRQFQ6n-.js → checkout-actions-CQyGpVPe.js} +2 -2
  17. package/dist/cjs/{checkout.service-BsOwkSNp.js → checkout.service-B_qymeqJ.js} +3 -3
  18. package/dist/cjs/{country-config-C1bWmF8P.js → country-config-DQQujh5h.js} +1 -1
  19. package/dist/cjs/custom-popper_2.cjs.entry.js +2 -2
  20. package/dist/cjs/dispute-notification_2.cjs.entry.js +8 -8
  21. package/dist/cjs/{event-types-C_LP6UcW.js → event-types-DmY59QXs.js} +3 -3
  22. package/dist/cjs/form-address-fields_3.cjs.entry.js +4 -4
  23. package/dist/cjs/form-alert_3.cjs.entry.js +5 -5
  24. package/dist/cjs/form-control-date.cjs.entry.js +2 -2
  25. package/dist/cjs/form-control-file-v2_2.cjs.entry.js +3 -3
  26. package/dist/cjs/form-control-file.cjs.entry.js +2 -2
  27. package/dist/cjs/form-control-monetary.cjs.entry.js +2 -2
  28. package/dist/cjs/form-control-number_2.cjs.entry.js +6 -6
  29. package/dist/cjs/form-control-radio.cjs.entry.js +2 -2
  30. package/dist/cjs/form-control-select_2.cjs.entry.js +2 -2
  31. package/dist/cjs/{get-business-BpaRbn5S.js → get-business-BVxtiSDs.js} +3 -3
  32. package/dist/cjs/{get-payment-details-Cmg8gWvo.js → get-payment-details-DR1GgpyX.js} +3 -3
  33. package/dist/cjs/{get-subaccounts-d4CUegsn.js → get-subaccounts-BMY2bOFj.js} +4 -4
  34. package/dist/cjs/{input-handlers-_51J5q7J.js → input-handlers-v9h_2Ysi.js} +1 -1
  35. package/dist/cjs/internal-button.cjs.entry.js +1 -1
  36. package/dist/cjs/justifi-apple-pay_12.cjs.entry.js +58 -21
  37. package/dist/cjs/justifi-bank-account-billing-form-simple.cjs.entry.js +6 -6
  38. package/dist/cjs/justifi-bank-account-form.cjs.entry.js +6 -6
  39. package/dist/cjs/justifi-business-details.cjs.entry.js +9 -9
  40. package/dist/cjs/justifi-business-form.cjs.entry.js +13 -13
  41. package/dist/cjs/justifi-card-form.cjs.entry.js +6 -6
  42. package/dist/cjs/justifi-checkout-qr-code.cjs.entry.js +6 -6
  43. package/dist/cjs/justifi-checkout.cjs.entry.js +6 -6
  44. package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +6 -4
  45. package/dist/cjs/justifi-checkouts-list.cjs.entry.js +11 -11
  46. package/dist/cjs/justifi-dispute-management.cjs.entry.js +8 -8
  47. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +33 -20
  48. package/dist/cjs/justifi-order-terminals.cjs.entry.js +11 -11
  49. package/dist/cjs/justifi-payment-details.cjs.entry.js +17 -17
  50. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +9 -9
  51. package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +9 -9
  52. package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +2 -2
  53. package/dist/cjs/justifi-payments-list.cjs.entry.js +9 -9
  54. package/dist/cjs/justifi-payout-details.cjs.entry.js +12 -12
  55. package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +9 -9
  56. package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +4 -4
  57. package/dist/cjs/justifi-payouts-list.cjs.entry.js +11 -11
  58. package/dist/cjs/justifi-qr-terminal.cjs.entry.js +9 -9
  59. package/dist/cjs/justifi-refund-payment.cjs.entry.js +9 -9
  60. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +7 -7
  61. package/dist/cjs/justifi-skeleton.cjs.entry.js +1 -1
  62. package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +5 -5
  63. package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +9 -9
  64. package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +3 -3
  65. package/dist/cjs/justifi-terminals-list.cjs.entry.js +10 -10
  66. package/dist/cjs/loader.cjs.js +1 -1
  67. package/dist/cjs/{package-DfwuePUh.js → package-30T__1wH.js} +1 -1
  68. package/dist/cjs/{payment-provisioning-actions-DDooZhhk.js → payment-provisioning-actions-SVp7B8pR.js} +2 -2
  69. package/dist/cjs/payment-provisioning-form-buttons_2.cjs.entry.js +1 -1
  70. package/dist/cjs/{payment.service-Vy_JnuSA.js → payment.service-DRXVT-uB.js} +3 -3
  71. package/dist/cjs/{payout.service-BEPglFXf.js → payout.service-CuQ-mXKB.js} +3 -3
  72. package/dist/cjs/{payouts-status-1IUtW-UQ.js → payouts-status-BvHeuy9v.js} +2 -2
  73. package/dist/cjs/{plaid.service-DXQ7q51E.js → plaid.service-B58nzlUE.js} +3 -3
  74. package/dist/cjs/radio-list-item.cjs.entry.js +1 -1
  75. package/dist/cjs/{schema-validations-DehT309E.js → schema-validations-sjRvL4KO.js} +5 -4
  76. package/dist/cjs/terminal-quantity-selector.cjs.entry.js +1 -1
  77. package/dist/cjs/{terminal.service-BP2YecQ_.js → terminal.service-CmtSEgTc.js} +3 -3
  78. package/dist/cjs/{utils-CBriZzRC.js → utils-BScgWJC5.js} +1 -1
  79. package/dist/cjs/webcomponents.cjs.js +1 -1
  80. package/dist/collection/api/Business.js +2 -0
  81. package/dist/collection/api/Checkout.js +1 -1
  82. package/dist/collection/components/business-forms/schemas/schema-helpers.js +2 -1
  83. package/dist/collection/components/business-forms/utils/helpers.js +3 -1
  84. package/dist/collection/components/checkouts-list/checkouts-list-filters.js +4 -2
  85. package/dist/collection/components/checkouts-list/justifi-checkouts-list.js +3 -3
  86. package/dist/collection/components/modular-checkout/sub-components/justifi-apple-pay.js +7 -1
  87. package/dist/collection/components/modular-checkout/sub-components/paypal/justifi-paypal.js +38 -13
  88. package/dist/collection/components/order-terminals/justifi-order-terminals.js +1 -1
  89. package/dist/collection/components/order-terminals/terminal-quantity-selector/terminal-quantity-selector.js +1 -1
  90. package/dist/collection/components/payment-details/justifi-payment-details.js +8 -8
  91. package/dist/collection/components/payment-transactions-list/justifi-payment-transactions-list.js +1 -1
  92. package/dist/collection/components/payments-list/justifi-payments-list-filters.js +2 -2
  93. package/dist/collection/components/payments-list/justifi-payments-list.js +1 -1
  94. package/dist/collection/components/payout-details/justifi-payout-details.js +3 -3
  95. package/dist/collection/components/payout-transactions-list/justifi-payout-transactions-list.js +1 -1
  96. package/dist/collection/components/payouts-list/justifi-payouts-list-filters.js +2 -2
  97. package/dist/collection/components/payouts-list/justifi-payouts-list.js +1 -1
  98. package/dist/collection/components/terminal-orders-list/justifi-terminal-orders-list-filters.js +3 -3
  99. package/dist/collection/components/terminal-orders-list/justifi-terminal-orders-list.js +2 -2
  100. package/dist/collection/components/terminals-list/justifi-terminals-list-filters.js +1 -1
  101. package/dist/collection/components/terminals-list/justifi-terminals-list.js +1 -1
  102. package/dist/collection/components/tokenize-payment-method/justifi-tokenize-payment-method.js +1 -1
  103. package/dist/collection/ui-components/custom-popper/custom-popper.js +2 -2
  104. package/dist/collection/ui-components/form/form-control-date.js +2 -2
  105. package/dist/collection/ui-components/form/form-control-file-v2.js +1 -1
  106. package/dist/collection/ui-components/form/form-control-file.js +2 -2
  107. package/dist/collection/ui-components/form/form-control-monetary.js +2 -2
  108. package/dist/collection/ui-components/form/form-control-number-masked.js +2 -2
  109. package/dist/collection/ui-components/form/form-control-number.js +2 -2
  110. package/dist/collection/ui-components/form/form-control-radio.js +2 -2
  111. package/dist/collection/ui-components/form/form-control-text.js +2 -2
  112. package/dist/collection/ui-components/form/form-control-textarea.js +2 -2
  113. package/dist/collection/ui-components/form/hidden-input.js +1 -1
  114. package/dist/collection/ui-components/form/iframe-input.js +3 -3
  115. package/dist/collection/ui-components/internal-button.js +1 -1
  116. package/dist/collection/ui-components/radio-list-item.js +1 -1
  117. package/dist/collection/ui-components/shadow-dom-components/justifi-button.js +1 -1
  118. package/dist/collection/ui-components/shadow-dom-components/justifi-header.js +1 -1
  119. package/dist/collection/ui-components/shadow-dom-components/justifi-skeleton.js +1 -1
  120. package/dist/docs.json +2 -2
  121. package/dist/esm/{Analytics-hKJLmoJl.js → Analytics-BtMYbHD0.js} +4 -4
  122. package/dist/esm/{Api-DAJ9sMMj.js → Api-nVK-rgbk.js} +1 -1
  123. package/dist/esm/{Business-DaDqgDrb.js → Business-CTtGaVYs.js} +5 -1
  124. package/dist/esm/{Plaid-BP3xNxQF.js → Plaid-CRcTLeaz.js} +1 -1
  125. package/dist/esm/additional-questions-form-step_15.entry.js +13 -13
  126. package/dist/esm/additional-questions_4.entry.js +3 -3
  127. package/dist/esm/bank-account-billing-form-simple_4.entry.js +4 -4
  128. package/dist/esm/bank-account-document-form-inputs.entry.js +2 -2
  129. package/dist/esm/bank-account-form.entry.js +4 -4
  130. package/dist/esm/{business-form-options-BxVQL9ar.js → business-form-options-DLRkVtee.js} +1 -1
  131. package/dist/esm/{business-identity-schema-BkmRlnQo.js → business-identity-schema-BP61Unwf.js} +3 -3
  132. package/dist/esm/{business.service-kmkjOyTm.js → business.service-Cq7H5w1T.js} +3 -3
  133. package/dist/esm/card-form.entry.js +4 -4
  134. package/dist/esm/{check-pkg-version-FEAmKlDW.js → check-pkg-version-BW9zgceK.js} +1 -1
  135. package/dist/esm/{checkout-actions-0ftD0elo.js → checkout-actions-CWnrb317.js} +2 -2
  136. package/dist/esm/{checkout.service-BVBmNheb.js → checkout.service-JA7oTq5d.js} +3 -3
  137. package/dist/esm/{country-config-CJwnhkdq.js → country-config-F5YwgHgR.js} +1 -1
  138. package/dist/esm/custom-popper_2.entry.js +2 -2
  139. package/dist/esm/dispute-notification_2.entry.js +8 -8
  140. package/dist/esm/{event-types-B5-lsGjZ.js → event-types-Dsf8IwD6.js} +3 -3
  141. package/dist/esm/form-address-fields_3.entry.js +4 -4
  142. package/dist/esm/form-alert_3.entry.js +5 -5
  143. package/dist/esm/form-control-date.entry.js +2 -2
  144. package/dist/esm/form-control-file-v2_2.entry.js +3 -3
  145. package/dist/esm/form-control-file.entry.js +2 -2
  146. package/dist/esm/form-control-monetary.entry.js +2 -2
  147. package/dist/esm/form-control-number_2.entry.js +6 -6
  148. package/dist/esm/form-control-radio.entry.js +2 -2
  149. package/dist/esm/form-control-select_2.entry.js +2 -2
  150. package/dist/esm/{get-business-BLCT-zfN.js → get-business-IZpxKRZM.js} +3 -3
  151. package/dist/esm/{get-payment-details-BokzuPGl.js → get-payment-details-DSI41Pq5.js} +3 -3
  152. package/dist/esm/{get-subaccounts-By7m_FxO.js → get-subaccounts-B-S2TGRa.js} +4 -4
  153. package/dist/esm/{input-handlers-Dfuc6aDW.js → input-handlers-Dm8jO-BT.js} +1 -1
  154. package/dist/esm/internal-button.entry.js +1 -1
  155. package/dist/esm/justifi-apple-pay_12.entry.js +58 -21
  156. package/dist/esm/justifi-bank-account-billing-form-simple.entry.js +6 -6
  157. package/dist/esm/justifi-bank-account-form.entry.js +6 -6
  158. package/dist/esm/justifi-business-details.entry.js +9 -9
  159. package/dist/esm/justifi-business-form.entry.js +13 -13
  160. package/dist/esm/justifi-card-form.entry.js +6 -6
  161. package/dist/esm/justifi-checkout-qr-code.entry.js +6 -6
  162. package/dist/esm/justifi-checkout.entry.js +6 -6
  163. package/dist/esm/justifi-checkouts-list-filters.entry.js +6 -4
  164. package/dist/esm/justifi-checkouts-list.entry.js +11 -11
  165. package/dist/esm/justifi-dispute-management.entry.js +8 -8
  166. package/dist/esm/justifi-gross-payment-chart.entry.js +33 -20
  167. package/dist/esm/justifi-order-terminals.entry.js +11 -11
  168. package/dist/esm/justifi-payment-details.entry.js +17 -17
  169. package/dist/esm/justifi-payment-provisioning.entry.js +9 -9
  170. package/dist/esm/justifi-payment-transactions-list.entry.js +9 -9
  171. package/dist/esm/justifi-payments-list-filters.entry.js +2 -2
  172. package/dist/esm/justifi-payments-list.entry.js +9 -9
  173. package/dist/esm/justifi-payout-details.entry.js +12 -12
  174. package/dist/esm/justifi-payout-transactions-list.entry.js +9 -9
  175. package/dist/esm/justifi-payouts-list-filters.entry.js +4 -4
  176. package/dist/esm/justifi-payouts-list.entry.js +11 -11
  177. package/dist/esm/justifi-qr-terminal.entry.js +9 -9
  178. package/dist/esm/justifi-refund-payment.entry.js +9 -9
  179. package/dist/esm/justifi-season-interruption-insurance.entry.js +7 -7
  180. package/dist/esm/justifi-skeleton.entry.js +1 -1
  181. package/dist/esm/justifi-terminal-orders-list-filters.entry.js +5 -5
  182. package/dist/esm/justifi-terminal-orders-list.entry.js +9 -9
  183. package/dist/esm/justifi-terminals-list-filters.entry.js +3 -3
  184. package/dist/esm/justifi-terminals-list.entry.js +10 -10
  185. package/dist/esm/loader.js +1 -1
  186. package/dist/esm/{package-Dn9_7aQh.js → package-BC9n8nB2.js} +1 -1
  187. package/dist/esm/{payment-provisioning-actions-VRIPjnAQ.js → payment-provisioning-actions-VtleD509.js} +2 -2
  188. package/dist/esm/payment-provisioning-form-buttons_2.entry.js +1 -1
  189. package/dist/esm/{payment.service-CMUlMV1Y.js → payment.service-B42sKlQE.js} +3 -3
  190. package/dist/esm/{payout.service-C0yd0JZS.js → payout.service-BIoAgNJJ.js} +3 -3
  191. package/dist/esm/{payouts-status-CaiC5qpn.js → payouts-status-CnIf4XDi.js} +2 -2
  192. package/dist/esm/{plaid.service-CqihCTBS.js → plaid.service-C6Ltk2ef.js} +3 -3
  193. package/dist/esm/radio-list-item.entry.js +1 -1
  194. package/dist/esm/{schema-validations-8dbMCACI.js → schema-validations-De7Qe0VU.js} +5 -4
  195. package/dist/esm/terminal-quantity-selector.entry.js +1 -1
  196. package/dist/esm/{terminal.service-DuF3uTuA.js → terminal.service-DV3qIwBy.js} +3 -3
  197. package/dist/esm/{utils-YUOJKtjO.js → utils-DaPywmTI.js} +1 -1
  198. package/dist/esm/webcomponents.js +1 -1
  199. package/dist/module/Business.js +5 -1
  200. package/dist/module/Plaid.js +1 -1
  201. package/dist/module/custom-popper2.js +2 -2
  202. package/dist/module/form-control-date2.js +2 -2
  203. package/dist/module/form-control-file-v22.js +1 -1
  204. package/dist/module/form-control-file2.js +2 -2
  205. package/dist/module/form-control-monetary2.js +2 -2
  206. package/dist/module/form-control-number-masked2.js +2 -2
  207. package/dist/module/form-control-number2.js +2 -2
  208. package/dist/module/form-control-radio2.js +2 -2
  209. package/dist/module/form-control-text2.js +2 -2
  210. package/dist/module/form-control-textarea2.js +2 -2
  211. package/dist/module/hidden-input2.js +1 -1
  212. package/dist/module/iframe-input2.js +3 -3
  213. package/dist/module/internal-button2.js +1 -1
  214. package/dist/module/justifi-apple-pay2.js +7 -1
  215. package/dist/module/justifi-button2.js +1 -1
  216. package/dist/module/justifi-checkouts-list-filters.js +4 -2
  217. package/dist/module/justifi-checkouts-list.js +2 -2
  218. package/dist/module/justifi-gross-payment-chart.js +26 -13
  219. package/dist/module/justifi-header2.js +1 -1
  220. package/dist/module/justifi-order-terminals.js +1 -1
  221. package/dist/module/justifi-payment-details.js +8 -8
  222. package/dist/module/justifi-payment-transactions-list.js +1 -1
  223. package/dist/module/justifi-payments-list-filters.js +2 -2
  224. package/dist/module/justifi-payments-list.js +1 -1
  225. package/dist/module/justifi-payout-details.js +3 -3
  226. package/dist/module/justifi-payout-transactions-list.js +1 -1
  227. package/dist/module/justifi-payouts-list-filters.js +2 -2
  228. package/dist/module/justifi-payouts-list.js +1 -1
  229. package/dist/module/justifi-paypal2.js +39 -11
  230. package/dist/module/justifi-skeleton.js +1 -1
  231. package/dist/module/justifi-terminal-orders-list-filters.js +3 -3
  232. package/dist/module/justifi-terminal-orders-list.js +2 -2
  233. package/dist/module/justifi-terminals-list-filters.js +1 -1
  234. package/dist/module/justifi-terminals-list.js +1 -1
  235. package/dist/module/justifi-tokenize-payment-method2.js +1 -1
  236. package/dist/module/package.js +1 -1
  237. package/dist/module/radio-list-item2.js +1 -1
  238. package/dist/module/schema-validations.js +2 -1
  239. package/dist/module/terminal-quantity-selector2.js +1 -1
  240. package/dist/types/api/Business.d.ts +2 -0
  241. package/dist/types/api/Checkout.d.ts +7 -7
  242. package/dist/types/components/checkouts-list/justifi-checkouts-list.d.ts +1 -1
  243. package/dist/types/components/modular-checkout/sub-components/justifi-apple-pay.d.ts +1 -0
  244. package/dist/types/components/modular-checkout/sub-components/paypal/justifi-paypal.d.ts +9 -2
  245. package/dist/types/components.d.ts +1 -1
  246. package/dist/webcomponents/p-065b854f.entry.js +1 -0
  247. package/dist/webcomponents/{p-b98ea26a.entry.js → p-082f912c.entry.js} +1 -1
  248. package/dist/webcomponents/{p-0d8a256c.entry.js → p-0cd689f4.entry.js} +1 -1
  249. package/dist/webcomponents/{p-1a55efda.entry.js → p-0e9351c4.entry.js} +1 -1
  250. package/dist/webcomponents/p-0f7e3515.entry.js +20 -0
  251. package/dist/webcomponents/p-0fbc806f.entry.js +1 -0
  252. package/dist/webcomponents/{p-36f05f5f.entry.js → p-10787684.entry.js} +1 -1
  253. package/dist/webcomponents/{p-86f9d5f6.entry.js → p-1365a46b.entry.js} +1 -1
  254. package/dist/webcomponents/{p-b9664e84.entry.js → p-13814028.entry.js} +1 -1
  255. package/dist/webcomponents/{p-bf3866b3.entry.js → p-16261d8a.entry.js} +1 -1
  256. package/dist/webcomponents/{p-8a5ce8ff.entry.js → p-19cabdaf.entry.js} +1 -1
  257. package/dist/webcomponents/{p-af728bc6.entry.js → p-1cfa634a.entry.js} +1 -1
  258. package/dist/webcomponents/p-1fa62eba.entry.js +1 -0
  259. package/dist/webcomponents/{p-31204dd5.entry.js → p-2b5533a1.entry.js} +1 -1
  260. package/dist/webcomponents/p-2ef913b8.entry.js +1 -0
  261. package/dist/webcomponents/p-388082cd.entry.js +1 -0
  262. package/dist/webcomponents/p-3a1f8c5b.entry.js +1 -0
  263. package/dist/webcomponents/p-3f2fb856.entry.js +1 -0
  264. package/dist/webcomponents/{p-d4de565d.entry.js → p-429046e1.entry.js} +1 -1
  265. package/dist/webcomponents/{p-e0bce67a.entry.js → p-44ff4f2c.entry.js} +1 -1
  266. package/dist/webcomponents/p-4740601b.entry.js +1 -0
  267. package/dist/webcomponents/{p-10b91a6c.entry.js → p-59b95eae.entry.js} +1 -1
  268. package/dist/webcomponents/{p-1cdbe8c1.entry.js → p-5c889829.entry.js} +1 -1
  269. package/dist/webcomponents/p-6c7fca1a.entry.js +1 -0
  270. package/dist/webcomponents/p-72bb4aff.entry.js +1 -0
  271. package/dist/webcomponents/p-735d397e.entry.js +1 -0
  272. package/dist/webcomponents/p-8432cb42.entry.js +1 -0
  273. package/dist/webcomponents/{p-aebd2149.entry.js → p-88a44a02.entry.js} +1 -1
  274. package/dist/webcomponents/{p-d555220f.entry.js → p-89f0c2aa.entry.js} +1 -1
  275. package/dist/webcomponents/{p-5bdae8c7.entry.js → p-97c6593d.entry.js} +1 -1
  276. package/dist/webcomponents/p-9b43b90d.entry.js +1 -0
  277. package/dist/webcomponents/p-9db15fac.entry.js +1 -0
  278. package/dist/webcomponents/p-9e3e2e32.entry.js +1 -0
  279. package/dist/webcomponents/p-9eb00966.entry.js +1 -0
  280. package/dist/webcomponents/p-BAvoKtN2.js +1 -0
  281. package/dist/webcomponents/p-BC9n8nB2.js +1 -0
  282. package/dist/webcomponents/p-BDtSw_d-.js +1 -0
  283. package/dist/webcomponents/{p-Ba0_MQtJ.js → p-B_2zgnvM.js} +1 -1
  284. package/dist/webcomponents/{p-CLq3Og7o.js → p-BhpaUYtS.js} +1 -1
  285. package/dist/webcomponents/{p-BHaO3c8W.js → p-BjjKkMO1.js} +1 -1
  286. package/dist/webcomponents/p-BmaQUnqv.js +1 -0
  287. package/dist/webcomponents/{p-DZQBPUfH.js → p-Bxc0NRj8.js} +1 -1
  288. package/dist/webcomponents/p-C60AkJ6a.js +1 -0
  289. package/dist/webcomponents/{p-Bl00tHyn.js → p-C6Jq8YDT.js} +1 -1
  290. package/dist/webcomponents/p-C9p1gWAC.js +1 -0
  291. package/dist/webcomponents/p-CTtGaVYs.js +1 -0
  292. package/dist/webcomponents/p-CgOgijHy.js +1 -0
  293. package/dist/webcomponents/{p-OReJ-ZQb.js → p-CtlBL-X6.js} +1 -1
  294. package/dist/webcomponents/p-D694H6co.js +1 -0
  295. package/dist/webcomponents/p-D7fNBSlC.js +1 -0
  296. package/dist/webcomponents/p-D7nyPi2Q.js +1 -0
  297. package/dist/webcomponents/{p-C-buCQRx.js → p-DC2djVls.js} +1 -1
  298. package/dist/webcomponents/{p-B0DHIvEj.js → p-DQmijfCN.js} +1 -1
  299. package/dist/webcomponents/p-Dqxyi-uK.js +1 -0
  300. package/dist/webcomponents/{p-ByQMBEDC.js → p-_MjmE9YT.js} +1 -1
  301. package/dist/webcomponents/{p-5348209c.entry.js → p-a10beb26.entry.js} +1 -1
  302. package/dist/webcomponents/{p-0f7cc07b.entry.js → p-a71cc8e2.entry.js} +1 -1
  303. package/dist/webcomponents/{p-d446ab68.entry.js → p-a7c594d1.entry.js} +1 -1
  304. package/dist/webcomponents/{p-c6f85bef.entry.js → p-a8d25057.entry.js} +1 -1
  305. package/dist/webcomponents/p-acb0b66c.entry.js +1 -0
  306. package/dist/webcomponents/{p-80a9f84c.entry.js → p-b9ba7c95.entry.js} +1 -1
  307. package/dist/webcomponents/{p-5a11c49f.entry.js → p-c385f10d.entry.js} +1 -1
  308. package/dist/webcomponents/p-c55fdbbf.entry.js +1 -0
  309. package/dist/webcomponents/{p-636c9571.entry.js → p-cec7164e.entry.js} +1 -1
  310. package/dist/webcomponents/p-d3544e86.entry.js +1 -0
  311. package/dist/webcomponents/{p-2549c891.entry.js → p-de047614.entry.js} +1 -1
  312. package/dist/webcomponents/p-f0434a13.entry.js +1 -0
  313. package/dist/webcomponents/{p-ddba9ab3.entry.js → p-f2b3c7d5.entry.js} +1 -1
  314. package/dist/webcomponents/{p-e55216fb.entry.js → p-f39889f2.entry.js} +1 -1
  315. package/dist/webcomponents/{p-f8764c8e.entry.js → p-f40fa614.entry.js} +1 -1
  316. package/dist/webcomponents/{p-b6ce91f0.entry.js → p-f5cb6a26.entry.js} +1 -1
  317. package/dist/webcomponents/p-f9f310dc.entry.js +1 -0
  318. package/dist/webcomponents/p-iA-Amt2z.js +1 -0
  319. package/dist/webcomponents/p-pueOrhXO.js +1 -0
  320. package/dist/webcomponents/{p-DnLqZpI1.js → p-rFpPIJgu.js} +1 -1
  321. package/dist/webcomponents/{p-CawcnSoV.js → p-riZDHN5-.js} +1 -1
  322. package/dist/webcomponents/webcomponents.esm.js +1 -1
  323. package/package.json +15 -17
  324. package/dist/webcomponents/p-1034e83d.entry.js +0 -1
  325. package/dist/webcomponents/p-18306b40.entry.js +0 -1
  326. package/dist/webcomponents/p-22a57828.entry.js +0 -1
  327. package/dist/webcomponents/p-2458de56.entry.js +0 -1
  328. package/dist/webcomponents/p-27b07530.entry.js +0 -1
  329. package/dist/webcomponents/p-2e82a488.entry.js +0 -1
  330. package/dist/webcomponents/p-33281304.entry.js +0 -1
  331. package/dist/webcomponents/p-3642e189.entry.js +0 -1
  332. package/dist/webcomponents/p-3c33b3c1.entry.js +0 -1
  333. package/dist/webcomponents/p-408a4f5f.entry.js +0 -20
  334. package/dist/webcomponents/p-76e96874.entry.js +0 -1
  335. package/dist/webcomponents/p-772ab8a3.entry.js +0 -1
  336. package/dist/webcomponents/p-7e64a668.entry.js +0 -1
  337. package/dist/webcomponents/p-9c45729d.entry.js +0 -1
  338. package/dist/webcomponents/p-9ed85832.entry.js +0 -1
  339. package/dist/webcomponents/p-BFi5l0xt.js +0 -1
  340. package/dist/webcomponents/p-CKgQN8v0.js +0 -1
  341. package/dist/webcomponents/p-CXsRwohv.js +0 -1
  342. package/dist/webcomponents/p-CbyGKcz_.js +0 -1
  343. package/dist/webcomponents/p-Cy2N3vAg.js +0 -1
  344. package/dist/webcomponents/p-CyOXIqHo.js +0 -1
  345. package/dist/webcomponents/p-D6uhYbLo.js +0 -1
  346. package/dist/webcomponents/p-DNuxxP2B.js +0 -1
  347. package/dist/webcomponents/p-DaDqgDrb.js +0 -1
  348. package/dist/webcomponents/p-Dn9_7aQh.js +0 -1
  349. package/dist/webcomponents/p-Do9dxNjh.js +0 -1
  350. package/dist/webcomponents/p-DsvK2pes.js +0 -1
  351. package/dist/webcomponents/p-FWuMPTxn.js +0 -1
  352. package/dist/webcomponents/p-a891caf8.entry.js +0 -1
  353. package/dist/webcomponents/p-d05257f9.entry.js +0 -1
  354. package/dist/webcomponents/p-d2e890a3.entry.js +0 -1
  355. package/dist/webcomponents/p-d397b38f.entry.js +0 -1
  356. package/dist/webcomponents/p-dd4eea27.entry.js +0 -1
  357. package/dist/webcomponents/p-e1e5bddf.entry.js +0 -1
  358. package/dist/webcomponents/p-fa2e7534.entry.js +0 -1
  359. package/dist/webcomponents/p-rznJBkm3.js +0 -1
@@ -1 +1 @@
1
- import{r as e,h as n,H as t,c as i,g as o}from"./p-CV0Pyo1O.js";import{al as r,a3 as a,q as s,v as c,w as d,x as u}from"./p-Bu7gdOaV.js";import{c as l}from"./p-DgTOxu8x.js";import{g as f}from"./p-BFTU3MAI.js";import{F as h}from"./p-CLZcevBz.js";import{p as m}from"./p-Dn9_7aQh.js";const w=class{constructor(n){e(this,n)}render(){return this.text?this.hideAlert?null:n("div",{class:"alert alert-danger d-flex align-items-center",role:"alert",part:r},n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"currentColor",class:"bi bi-exclamation-triangle-fill flex-shrink-0 me-2",viewBox:"0 0 16 16",role:"img","aria-label":"Warning:"},n("path",{d:"M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"})),n("div",null,this.text)):null}},g=l({focused:{boxShadow:"",border:""},focusedAndInvalid:{boxShadow:"",border:""},fontStyles:{fontFamily:"",fontSize:"",fontWeight:"",lineHeight:"",margin:"",padding:""}}),{state:b,set:p}=g,y=class{constructor(n){e(this,n),this.isFocused=!1,this.errorText=""}focusWithoutPageScroll(e){if(e)try{e.focus({preventScroll:!0})}catch(n){const{scrollX:t,scrollY:i}=window;e.focus(),window.scrollTo(t,i)}}async componentDidLoad(){const e=await this.getBaseFontStyles();p("fontStyles",e);const n=await this.getFocusedStyles();p("focused",n);const t=await this.getFocusedAndInvalidStyles();p("focusedAndInvalid",t)}async getBaseFontStyles(){return new Promise((e=>{setTimeout((()=>{const n=getComputedStyle(this.hiddenInput);e({fontFamily:n.fontFamily,fontSize:n.fontSize,fontWeight:n.fontWeight,lineHeight:n.lineHeight,margin:n.margin,padding:n.padding,color:n.color})}),500)}))}async getFocusedStyles(){return new Promise((e=>{this.focusWithoutPageScroll(this.hiddenInput),setTimeout((()=>{this.hiddenInput.blur();const n=getComputedStyle(this.hiddenInput);e({boxShadow:n.boxShadow,border:n.border})}),500)}))}async getFocusedAndInvalidStyles(){return new Promise((e=>{this.focusWithoutPageScroll(this.hiddenInput),this.errorText="Error",setTimeout((()=>{const n=getComputedStyle(this.hiddenInput),t={boxShadow:n.boxShadow,border:n.border};this.hiddenInput.blur(),e(t)}),500)}))}get part(){return this.isFocused&&this.errorText?a:this.errorText?s:this.isFocused?c:d}render(){return n(t,{key:"af4622b9cccfc488b8d9848079345df92c601e72"},n("input",{key:"f02bf15b1a51ff01a0d198095ed03f14ec25393b",ref:e=>this.hiddenInput=e,type:"text",class:this.errorText?"form-control is-invalid":"form-control",onFocus:()=>this.isFocused=!0,onBlur:()=>this.isFocused=!1,part:this.part,tabindex:"-1",style:{height:"0",opacity:"0",pointerEvents:"none",animation:"none"}}))}};var v,x,k={exports:{}},z=f((v||(v=1,x=k,console.info("\nIFRAME-RESIZER\n\nIframe-Resizer 5 is now available via the following two packages:\n\n * @iframe-resizer/parent\n * @iframe-resizer/child\n\nAdditionally their are also new versions of iframe-resizer for React, Vue, and jQuery.\n\nVersion 5 of iframe-resizer has been extensively rewritten to use modern browser APIs, which has enabled significantly better performance and greater accuracy in the detection of content resizing events.\n\nPlease see https://iframe-resizer.com/upgrade for more details.\n"),function(e){if("undefined"!=typeof window){var n,t,i=0,o=!1,r=!1,a="[iFrameSizer]",s=null,c=window.requestAnimationFrame,d=Object.freeze({max:1,scroll:1,bodyScroll:1,documentElementScroll:1}),u={},l=null,f=Object.freeze({autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,license:"1jqr0si6pnt",log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,mouseEvents:!0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClose:function(){return!0},onClosed:function(){},onInit:function(){},onMessage:function(){v("onMessage function not defined")},onMouseEnter:function(){},onMouseLeave:function(){},onResized:function(){},onScroll:function(){return!0}}),h={};window.jQuery!==e&&((t=window.jQuery).fn?t.fn.iFrameResize||(t.fn.iFrameResize=function(e){return this.filter("iframe").each((function(n,t){L(t,e)})).end()}):y("","Unable to bind to jQuery, it is not fully loaded.")),x.exports=H(),window.iFrameResize=window.iFrameResize||H()}function m(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function w(e,n,t){e.addEventListener(n,t,!1)}function g(e,n,t){e.removeEventListener(n,t,!1)}function b(e){return u[e]?u[e].log:o}function p(e,n){k("log",e,n,b(e))}function y(e,n){k("info",e,n,b(e))}function v(e,n){k("warn",e,n,!0)}function k(e,n,t,i){!0===i&&"object"==typeof window.console&&console[e](function(e){return a+"["+function(e){var n="Host page: "+e;return window.top!==window.self&&(n=window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+e:"Nested host page: "+e),n}(e)+"]"}(n),t)}function z(e){function n(){t("Height"),t("Width"),C((function(){R(W),T(A),f("onResized",W)}),W,"init")}function t(e){var n=Number(u[A]["max"+e]),t=Number(u[A]["min"+e]),i=e.toLowerCase(),o=Number(W[i]);p(A,"Checking "+i+" is in range "+t+"-"+n),o<t&&(o=t,p(A,"Set "+i+" to min value")),o>n&&(o=n,p(A,"Set "+i+" to max value")),W[i]=""+o}function i(e){return L.slice(L.indexOf(":")+7+e)}function o(e,n){var t,i;t=function(){var t,i;E("Send Page Info","pageInfo:"+(t=document.body.getBoundingClientRect(),i=W.iframe.getBoundingClientRect(),JSON.stringify({iframeHeight:i.height,iframeWidth:i.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(i.top-t.top,10),offsetLeft:parseInt(i.left-t.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,documentHeight:document.documentElement.clientHeight,documentWidth:document.documentElement.clientWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})),e,n)},h[i=n]||(h[i]=setTimeout((function(){h[i]=null,t()}),32))}function r(e){var n=e.getBoundingClientRect();return M(A),{x:Math.floor(Number(n.left)+Number(s.x)),y:Math.floor(Number(n.top)+Number(s.y))}}function c(e){var n=e?r(W.iframe):{x:0,y:0},t={x:Number(W.width)+n.x,y:Number(W.height)+n.y};p(A,"Reposition requested from iFrame (offset x:"+n.x+" y:"+n.y+")"),window.top===window.self?(s=t,d(),p(A,"--")):window.parentIFrame?window.parentIFrame["scrollTo"+(e?"Offset":"")](t.x,t.y):v(A,"Unable to scroll to requested position, window.parentIFrame not found")}function d(){!1===f("onScroll",s)?O():T(A)}function l(e){var n={};if(0===Number(W.width)&&0===Number(W.height)){var t=i(9).split(":");n={x:t[1],y:t[0]}}else n={x:W.width,y:W.height};f(e,{iframe:W.iframe,screenX:Number(n.x),screenY:Number(n.y),type:W.type})}function f(e,n){return S(A,e,n)}var m,b,x,k,z,I,L=e.data,W={},A=null;"[iFrameResizerChild]Ready"===L?function(){for(var e in u)E("iFrame requested init",N(e),u[e].iframe,e)}():a===(""+L).slice(0,13)&&L.slice(13).split(":")[0]in u?(k=(x=L.slice(13).split(":"))[1]?parseInt(x[1],10):0,z=u[x[0]]&&u[x[0]].iframe,I=getComputedStyle(z),W={iframe:z,id:x[0],height:k+function(e){return"border-box"!==e.boxSizing?0:(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}(I)+function(e){return"border-box"!==e.boxSizing?0:(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}(I),width:x[2],type:x[3]},u[A=W.id]&&(u[A].loaded=!0),(b=W.type in{true:1,false:1,undefined:1})&&p(A,"Ignoring init message from meta parent page"),!b&&function(e){var n=!0;return u[e]||(n=!1,v(W.type+" No settings for "+e+". Message was: "+L)),n}(A)&&(p(A,"Received: "+L),m=!0,null===W.iframe&&(v(A,"IFrame ("+W.id+") not found"),m=!1),m&&function(){var n,t=e.origin,i=u[A]&&u[A].checkOrigin;if(i&&""+t!="null"&&!(i.constructor===Array?function(){var e=0,n=!1;for(p(A,"Checking connection is from allowed list of origins: "+i);e<i.length;e++)if(i[e]===t){n=!0;break}return n}():(p(A,"Checking connection is from: "+(n=u[A]&&u[A].remoteHost)),t===n)))throw new Error("Unexpected message received from: "+t+" for "+W.iframe.id+". Message was: "+e.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return!0}()&&function(){switch(u[A]&&u[A].firstRun&&u[A]&&(u[A].firstRun=!1),W.type){case"close":F(W.iframe);break;case"message":m=i(6),p(A,"onMessage passed: {iframe: "+W.iframe.id+", message: "+m+"}"),f("onMessage",{iframe:W.iframe,message:JSON.parse(m)}),p(A,"--");break;case"mouseenter":l("onMouseEnter");break;case"mouseleave":l("onMouseLeave");break;case"autoResize":u[A].autoResize=JSON.parse(i(9));break;case"scrollTo":c(!1);break;case"scrollToOffset":c(!0);break;case"pageInfo":o(u[A]&&u[A].iframe,A),function(){function e(e,i){function r(){u[t]?o(u[t].iframe,t):n()}["scroll","resize"].forEach((function(n){p(t,e+n+" listener for sendPageInfo"),i(window,n,r)}))}function n(){e("Remove ",g)}var t=A;e("Add ",w),u[t]&&(u[t].stopPageInfo=n)}();break;case"pageInfoStop":u[A]&&u[A].stopPageInfo&&(u[A].stopPageInfo(),delete u[A].stopPageInfo);break;case"inPageLink":t=i(9).split("#")[1]||"",a=decodeURIComponent(t),(h=document.getElementById(a)||document.getElementsByName(a)[0])?(e=r(h),p(A,"Moving to in page link (#"+t+") at x: "+e.x+" y: "+e.y),s={x:e.x,y:e.y},d(),p(A,"--")):window.top===window.self?p(A,"In page link #"+t+" not found"):window.parentIFrame?window.parentIFrame.moveToAnchor(t):p(A,"In page link #"+t+" not found and window.parentIFrame not found");break;case"reset":j(W);break;case"init":n(),f("onInit",W.iframe);break;default:0===Number(W.width)&&0===Number(W.height)?v("Unsupported message received ("+W.type+"), this is likely due to the iframe containing a later version of iframe-resizer than the parent page"):n()}var e,t,a,h,m}())):y(A,"Ignored: "+L)}function S(e,n,t){var i=null,o=null;if(u[e]){if("function"!=typeof(i=u[e][n]))throw new TypeError(n+" on iFrame["+e+"] is not a function");o=i(t)}return o}function I(e){delete u[e.id]}function F(e){var t=e.id;if(!1!==S(t,"onClose",t)){p(t,"Removing iFrame: "+t);try{e.parentNode&&e.parentNode.removeChild(e)}catch(e){v(e)}S(t,"onClosed",t),p(t,"--"),I(e),n&&(n.disconnect(),n=null)}else p(t,"Close iframe cancelled by onClose event")}function M(n){null===s&&p(n,"Get page position: "+(s={x:window.pageXOffset===e?document.documentElement.scrollLeft:window.pageXOffset,y:window.pageYOffset===e?document.documentElement.scrollTop:window.pageYOffset}).x+","+s.y)}function T(e){null!==s&&(window.scrollTo(s.x,s.y),p(e,"Set page position: "+s.x+","+s.y),O())}function O(){s=null}function j(e){p(e.id,"Size reset requested by "+("init"===e.type?"host page":"iFrame")),M(e.id),C((function(){R(e),E("reset","reset",e.iframe,e.id)}),e,"reset")}function R(e){function n(n){r||"0"!==e[n]||(r=!0,p(i,"Hidden iFrame detected, creating visibility listener"),function(){function e(){Object.keys(u).forEach((function(e){!function(e){function n(n){return"0px"===(u[e]&&u[e].iframe.style[n])}u[e]&&null!==u[e].iframe.offsetParent&&(n("height")||n("width"))&&E("Visibility change","resize",u[e].iframe,e)}(e)}))}function n(n){p("window","Mutation observed: "+n[0].target+" "+n[0].type),W(e,16)}var t,i=m();i&&(t=document.querySelector("body"),new i(n).observe(t,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0}))}())}function t(t){!function(n){e.id?(e.iframe.style[n]=e[n]+"px",p(e.id,"IFrame ("+i+") "+n+" set to "+e[n]+"px")):p("undefined","messageData id not set")}(t),n(t)}var i=e.iframe.id;u[i]&&(u[i].sizeHeight&&t("height"),u[i].sizeWidth&&t("width"))}function C(e,n,t){t!==n.type&&c&&!window.jasmine?(p(n.id,"Requesting animation frame"),c(e)):e()}function E(e,n,t,i,o){var r,s=!1;u[i=i||t.id]&&(t&&"contentWindow"in t&&null!==t.contentWindow?(p(i,"["+e+"] Sending msg to iframe["+i+"] ("+n+") targetOrigin: "+(r=u[i]&&u[i].targetOrigin)),t.contentWindow.postMessage(a+n,r)):v(i,"["+e+"] IFrame("+i+") not found"),o&&u[i]&&u[i].warningTimeout&&(u[i].msgTimeout=setTimeout((function(){!u[i]||u[i].loaded||s||(s=!0,v(i,"IFrame has not responded within "+u[i].warningTimeout/1e3+" seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."))}),u[i].warningTimeout)))}function N(e){return e+":"+u[e].bodyMarginV1+":"+u[e].sizeWidth+":"+u[e].log+":"+u[e].interval+":"+u[e].enablePublicMethods+":"+u[e].autoResize+":"+u[e].bodyMargin+":"+u[e].heightCalculationMethod+":"+u[e].bodyBackground+":"+u[e].bodyPadding+":"+u[e].tolerance+":"+u[e].inPageLinks+":"+u[e].resizeFrom+":"+u[e].widthCalculationMethod+":"+u[e].mouseEvents}function L(t,r){function a(e){var n=e.split("Callback");if(2===n.length){var t="on"+n[0].charAt(0).toUpperCase()+n[0].slice(1);this[t]=this[e],delete this[e],v(l,"Deprecated: '"+e+"' has been renamed '"+t+"'. The old method will be removed in the next major version.")}}var s,c,l=function(e){if("string"!=typeof e)throw new TypeError("Invaild id for iFrame. Expected String");var n;return""===e&&(t.id=(n=r&&r.id||f.id+i++,null!==document.getElementById(n)&&(n+=i++),e=n),o=(r||{}).log,p(e,"Added missing iframe ID: "+e+" ("+t.src+")")),e}(t.id);l in u&&"iFrameResizer"in t?v(l,"Ignored iFrame, already setup."):(function(e){var n;e=e||{},u[l]=Object.create(null),u[l].iframe=t,u[l].firstRun=!0,u[l].remoteHost=t.src&&t.src.split("/").slice(0,3).join("/"),function(e){if("object"!=typeof e)throw new TypeError("Options is not an object")}(e),Object.keys(e).forEach(a,e),function(e){for(var n in f)Object.prototype.hasOwnProperty.call(f,n)&&(u[l][n]=Object.prototype.hasOwnProperty.call(e,n)?e[n]:f[n])}(e),u[l]&&(u[l].targetOrigin=!0===u[l].checkOrigin?""===(n=u[l].remoteHost)||null!==n.match(/^(about:blank|javascript:|file:\/\/)/)?"*":n:"*")}(r),function(){switch(p(l,"IFrame scrolling "+(u[l]&&u[l].scrolling?"enabled":"disabled")+" for "+l),t.style.overflow=!1===(u[l]&&u[l].scrolling)?"hidden":"auto",u[l]&&u[l].scrolling){case"omit":break;case!0:t.scrolling="yes";break;case!1:t.scrolling="no";break;default:t.scrolling=u[l]?u[l].scrolling:"no"}}(),function(){function e(e){var n=u[l][e];1/0!==n&&0!==n&&(t.style[e]="number"==typeof n?n+"px":n,p(l,"Set "+e+" = "+t.style[e]))}function n(e){if(u[l]["min"+e]>u[l]["max"+e])throw new Error("Value for min"+e+" can not be greater than max"+e)}n("Height"),n("Width"),e("maxHeight"),e("minHeight"),e("maxWidth"),e("minWidth")}(),"number"!=typeof(u[l]&&u[l].bodyMargin)&&"0"!==(u[l]&&u[l].bodyMargin)||(u[l].bodyMarginV1=u[l].bodyMargin,u[l].bodyMargin=u[l].bodyMargin+"px"),s=N(l),(c=m())&&(n=function(e){if(!t.parentNode)return null;var n=new e((function(e){e.forEach((function(e){Array.prototype.slice.call(e.removedNodes).forEach((function(e){e===t&&F(t)}))}))}));return n.observe(t.parentNode,{childList:!0}),n}(c)),w(t,"load",(function(){E("iFrame.onload",s,t,e,!0),(!u[l]||!u[l].firstRun)&&u[l]&&u[l].heightCalculationMethod in d&&j({iframe:t,height:0,width:0,type:"init"})})),E("init",s,t,e,!0),u[l]&&(u[l].iframe.iFrameResizer={close:F.bind(null,u[l].iframe),removeListeners:I.bind(null,u[l].iframe),resize:E.bind(null,"Window resize","resize",u[l].iframe),moveToAnchor:function(e){E("Move to anchor","moveToAnchor:"+e,u[l].iframe,l)},sendMessage:function(e){E("Send Message","message:"+(e=JSON.stringify(e)),u[l].iframe,l)}}))}function W(e,n){null===l&&(l=setTimeout((function(){l=null,e()}),n))}function A(){"hidden"!==document.visibilityState&&(p("document","Trigger event: Visibility change"),W((function(){P("Tab Visible","resize")}),16))}function P(e,n){Object.keys(u).forEach((function(t){(function(e){return u[e]&&"parent"===u[e].resizeFrom&&u[e].autoResize&&!u[e].firstRun})(t)&&E(e,n,u[t].iframe,t)}))}function H(){function n(e,n){n&&(function(){if(!n.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==n.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+n.tagName+">")}(),L(n,e),t.push(n))}var t;return function(){var e,n=["moz","webkit","o","ms"];for(e=0;e<n.length&&!c;e+=1)c=window[n[e]+"RequestAnimationFrame"];c?c=c.bind(window):p("setup","RequestAnimationFrame not supported")}(),w(window,"message",z),w(window,"resize",(function(){p("window","Trigger event: resize"),W((function(){P("Window resize","resize")}),16)})),w(document,"visibilitychange",A),w(document,"-webkit-visibilitychange",A),function(i,o){switch(t=[],function(e){e&&e.enablePublicMethods&&v("enablePublicMethods option has been removed, public methods are now always available in the iFrame")}(i),typeof o){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(o||"iframe"),n.bind(e,i));break;case"object":n(i,o);break;default:throw new TypeError("Unexpected data type ("+typeof o+")")}return t}}}()),k.exports));class S{constructor(e,n){this.iframe=e,this.iframeOrigin=n}postMessage(e,n){const t=Object.assign({eventType:e},n);this.iframe.contentWindow.postMessage(t,this.iframeOrigin)}addMessageListener(e){window.addEventListener("message",e)}removeMessageListener(e){window.removeEventListener("message",e)}postMessageWithResponseListener(e,n){return new Promise((t=>{const i=n=>{n.data.eventType===e&&(window.removeEventListener("message",i),t(n.data.data))};window.addEventListener("message",i),this.postMessage(e,n)}))}}const I=class{constructor(n){e(this,n),this.iframeLoaded=i(this,"iframeLoaded",7),this.isFocused=!1,this.isValid=!0,this.dispatchMessageEvent=e=>{const{eventType:n,data:t}=e.data;(null==t?void 0:t.id)===this.inputId&&("focused"===n&&(this.isFocused=!0),"blurred"===n&&(this.isFocused=!1))}}disconnectedCallback(){this.frameService.removeMessageListener(this.dispatchMessageEvent)}async validate(){const e=await this.frameService.postMessageWithResponseListener("validate");return this.isValid=e.isValid,this.errorText=e.error.message,e}async tokenize(e,n,t){return this.frameService.postMessageWithResponseListener("tokenize",{clientId:e,paymentMethodMetadata:n,account:t,componentVersion:m.version})}async reload(){this.iframeElement.src=this.iframeSrc}initializeFrameCommunicationService(){var e;this.frameService=new S(this.iframeElement,this.iframeOrigin),null===(e=this.frameService)||void 0===e||e.addMessageListener(this.dispatchMessageEvent)}get part(){return this.isFocused&&!this.isValid?a:this.isValid?this.isFocused?c:d:s}get style(){return this.isFocused?this.isValid?b.focused:b.focusedAndInvalid:null}get urlParams(){const e=Object.fromEntries(Object.entries(b.fontStyles).map((([e,n])=>[e,btoa(String(n))])));return new URLSearchParams(e).toString()}get iframeSrc(){return`${this.iframeOrigin}?${this.urlParams}`}render(){return n(t,{key:"2a0366524a567e035363c48261a234a26d171eb1",class:"form-group d-flex flex-column"},n("div",{key:"d6e2ab90c2bd53b356e15706838fdef9a002e258",style:{visibility:this.iframeLoaded?"visible":"hidden",height:this.iframeLoaded?"auto":"0"}},n("label",{key:"7551b182b46dc3659a972106712f8b1c8b08041e",class:"form-label",htmlFor:"",part:u},this.label||""),n("div",{key:"931859fff4cc5d58e8de504671fbfe61e4c1a18e",class:"p-0 d-flex form-control "+(this.isValid?"":"is-invalid"),part:this.part,style:Object.assign(Object.assign({},this.style),{overflow:"hidden"})},n("iframe",{key:"adbf55424b76f4d24a45e7fc9554a25747ecf687",id:this.inputId,name:this.inputId,src:this.iframeSrc,ref:e=>{this.iframeElement=e,this.initializeFrameCommunicationService()},width:"100%",onLoad:()=>{z({log:!1,onResized:()=>{this.iframeLoaded.emit()}},this.iframeElement)}})),n(h,{key:"a1a24193d213f0f5a86f70a17d980bfdce7dfae4",errorText:this.errorText,name:this.inputId})))}get el(){return o(this)}};export{w as form_alert,y as hidden_input,I as iframe_input}
1
+ import{r as e,h as n,H as t,c as i,g as o}from"./p-CV0Pyo1O.js";import{al as r,a3 as a,q as s,v as c,w as d,x as u}from"./p-Bu7gdOaV.js";import{c as l}from"./p-DgTOxu8x.js";import{g as f}from"./p-BFTU3MAI.js";import{F as h}from"./p-CLZcevBz.js";import{p as m}from"./p-BC9n8nB2.js";const w=class{constructor(n){e(this,n)}render(){return this.text?this.hideAlert?null:n("div",{class:"alert alert-danger d-flex align-items-center",role:"alert",part:r},n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"currentColor",class:"bi bi-exclamation-triangle-fill flex-shrink-0 me-2",viewBox:"0 0 16 16",role:"img","aria-label":"Warning:"},n("path",{d:"M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"})),n("div",null,this.text)):null}},g=l({focused:{boxShadow:"",border:""},focusedAndInvalid:{boxShadow:"",border:""},fontStyles:{fontFamily:"",fontSize:"",fontWeight:"",lineHeight:"",margin:"",padding:""}}),{state:b,set:p}=g,y=class{constructor(n){e(this,n),this.isFocused=!1,this.errorText=""}focusWithoutPageScroll(e){if(e)try{e.focus({preventScroll:!0})}catch(n){const{scrollX:t,scrollY:i}=window;e.focus(),window.scrollTo(t,i)}}async componentDidLoad(){const e=await this.getBaseFontStyles();p("fontStyles",e);const n=await this.getFocusedStyles();p("focused",n);const t=await this.getFocusedAndInvalidStyles();p("focusedAndInvalid",t)}async getBaseFontStyles(){return new Promise((e=>{setTimeout((()=>{const n=getComputedStyle(this.hiddenInput);e({fontFamily:n.fontFamily,fontSize:n.fontSize,fontWeight:n.fontWeight,lineHeight:n.lineHeight,margin:n.margin,padding:n.padding,color:n.color})}),500)}))}async getFocusedStyles(){return new Promise((e=>{this.focusWithoutPageScroll(this.hiddenInput),setTimeout((()=>{this.hiddenInput.blur();const n=getComputedStyle(this.hiddenInput);e({boxShadow:n.boxShadow,border:n.border})}),500)}))}async getFocusedAndInvalidStyles(){return new Promise((e=>{this.focusWithoutPageScroll(this.hiddenInput),this.errorText="Error",setTimeout((()=>{const n=getComputedStyle(this.hiddenInput),t={boxShadow:n.boxShadow,border:n.border};this.hiddenInput.blur(),e(t)}),500)}))}get part(){return this.isFocused&&this.errorText?a:this.errorText?s:this.isFocused?c:d}render(){return n(t,{key:"09ac1ea8407e3bf2df079f1188a7668e7d7b318e"},n("input",{key:"18b34d0fae7636e7640dd35a73ce9b369007afd5",ref:e=>this.hiddenInput=e,type:"text",class:this.errorText?"form-control is-invalid":"form-control",onFocus:()=>this.isFocused=!0,onBlur:()=>this.isFocused=!1,part:this.part,tabindex:"-1",style:{height:"0",opacity:"0",pointerEvents:"none",animation:"none"}}))}};var v,x,k={exports:{}},z=f((v||(v=1,x=k,console.info("\nIFRAME-RESIZER\n\nIframe-Resizer 5 is now available via the following two packages:\n\n * @iframe-resizer/parent\n * @iframe-resizer/child\n\nAdditionally their are also new versions of iframe-resizer for React, Vue, and jQuery.\n\nVersion 5 of iframe-resizer has been extensively rewritten to use modern browser APIs, which has enabled significantly better performance and greater accuracy in the detection of content resizing events.\n\nPlease see https://iframe-resizer.com/upgrade for more details.\n"),function(e){if("undefined"!=typeof window){var n,t,i=0,o=!1,r=!1,a="[iFrameSizer]",s=null,c=window.requestAnimationFrame,d=Object.freeze({max:1,scroll:1,bodyScroll:1,documentElementScroll:1}),u={},l=null,f=Object.freeze({autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,license:"1jqr0si6pnt",log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,mouseEvents:!0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClose:function(){return!0},onClosed:function(){},onInit:function(){},onMessage:function(){v("onMessage function not defined")},onMouseEnter:function(){},onMouseLeave:function(){},onResized:function(){},onScroll:function(){return!0}}),h={};window.jQuery!==e&&((t=window.jQuery).fn?t.fn.iFrameResize||(t.fn.iFrameResize=function(e){return this.filter("iframe").each((function(n,t){L(t,e)})).end()}):y("","Unable to bind to jQuery, it is not fully loaded.")),x.exports=H(),window.iFrameResize=window.iFrameResize||H()}function m(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function w(e,n,t){e.addEventListener(n,t,!1)}function g(e,n,t){e.removeEventListener(n,t,!1)}function b(e){return u[e]?u[e].log:o}function p(e,n){k("log",e,n,b(e))}function y(e,n){k("info",e,n,b(e))}function v(e,n){k("warn",e,n,!0)}function k(e,n,t,i){!0===i&&"object"==typeof window.console&&console[e](function(e){return a+"["+function(e){var n="Host page: "+e;return window.top!==window.self&&(n=window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+e:"Nested host page: "+e),n}(e)+"]"}(n),t)}function z(e){function n(){t("Height"),t("Width"),C((function(){R(W),T(A),f("onResized",W)}),W,"init")}function t(e){var n=Number(u[A]["max"+e]),t=Number(u[A]["min"+e]),i=e.toLowerCase(),o=Number(W[i]);p(A,"Checking "+i+" is in range "+t+"-"+n),o<t&&(o=t,p(A,"Set "+i+" to min value")),o>n&&(o=n,p(A,"Set "+i+" to max value")),W[i]=""+o}function i(e){return L.slice(L.indexOf(":")+7+e)}function o(e,n){var t,i;t=function(){var t,i;E("Send Page Info","pageInfo:"+(t=document.body.getBoundingClientRect(),i=W.iframe.getBoundingClientRect(),JSON.stringify({iframeHeight:i.height,iframeWidth:i.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(i.top-t.top,10),offsetLeft:parseInt(i.left-t.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,documentHeight:document.documentElement.clientHeight,documentWidth:document.documentElement.clientWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})),e,n)},h[i=n]||(h[i]=setTimeout((function(){h[i]=null,t()}),32))}function r(e){var n=e.getBoundingClientRect();return M(A),{x:Math.floor(Number(n.left)+Number(s.x)),y:Math.floor(Number(n.top)+Number(s.y))}}function c(e){var n=e?r(W.iframe):{x:0,y:0},t={x:Number(W.width)+n.x,y:Number(W.height)+n.y};p(A,"Reposition requested from iFrame (offset x:"+n.x+" y:"+n.y+")"),window.top===window.self?(s=t,d(),p(A,"--")):window.parentIFrame?window.parentIFrame["scrollTo"+(e?"Offset":"")](t.x,t.y):v(A,"Unable to scroll to requested position, window.parentIFrame not found")}function d(){!1===f("onScroll",s)?O():T(A)}function l(e){var n={};if(0===Number(W.width)&&0===Number(W.height)){var t=i(9).split(":");n={x:t[1],y:t[0]}}else n={x:W.width,y:W.height};f(e,{iframe:W.iframe,screenX:Number(n.x),screenY:Number(n.y),type:W.type})}function f(e,n){return S(A,e,n)}var m,b,x,k,z,I,L=e.data,W={},A=null;"[iFrameResizerChild]Ready"===L?function(){for(var e in u)E("iFrame requested init",N(e),u[e].iframe,e)}():a===(""+L).slice(0,13)&&L.slice(13).split(":")[0]in u?(k=(x=L.slice(13).split(":"))[1]?parseInt(x[1],10):0,z=u[x[0]]&&u[x[0]].iframe,I=getComputedStyle(z),W={iframe:z,id:x[0],height:k+function(e){return"border-box"!==e.boxSizing?0:(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}(I)+function(e){return"border-box"!==e.boxSizing?0:(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}(I),width:x[2],type:x[3]},u[A=W.id]&&(u[A].loaded=!0),(b=W.type in{true:1,false:1,undefined:1})&&p(A,"Ignoring init message from meta parent page"),!b&&function(e){var n=!0;return u[e]||(n=!1,v(W.type+" No settings for "+e+". Message was: "+L)),n}(A)&&(p(A,"Received: "+L),m=!0,null===W.iframe&&(v(A,"IFrame ("+W.id+") not found"),m=!1),m&&function(){var n,t=e.origin,i=u[A]&&u[A].checkOrigin;if(i&&""+t!="null"&&!(i.constructor===Array?function(){var e=0,n=!1;for(p(A,"Checking connection is from allowed list of origins: "+i);e<i.length;e++)if(i[e]===t){n=!0;break}return n}():(p(A,"Checking connection is from: "+(n=u[A]&&u[A].remoteHost)),t===n)))throw new Error("Unexpected message received from: "+t+" for "+W.iframe.id+". Message was: "+e.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return!0}()&&function(){switch(u[A]&&u[A].firstRun&&u[A]&&(u[A].firstRun=!1),W.type){case"close":F(W.iframe);break;case"message":m=i(6),p(A,"onMessage passed: {iframe: "+W.iframe.id+", message: "+m+"}"),f("onMessage",{iframe:W.iframe,message:JSON.parse(m)}),p(A,"--");break;case"mouseenter":l("onMouseEnter");break;case"mouseleave":l("onMouseLeave");break;case"autoResize":u[A].autoResize=JSON.parse(i(9));break;case"scrollTo":c(!1);break;case"scrollToOffset":c(!0);break;case"pageInfo":o(u[A]&&u[A].iframe,A),function(){function e(e,i){function r(){u[t]?o(u[t].iframe,t):n()}["scroll","resize"].forEach((function(n){p(t,e+n+" listener for sendPageInfo"),i(window,n,r)}))}function n(){e("Remove ",g)}var t=A;e("Add ",w),u[t]&&(u[t].stopPageInfo=n)}();break;case"pageInfoStop":u[A]&&u[A].stopPageInfo&&(u[A].stopPageInfo(),delete u[A].stopPageInfo);break;case"inPageLink":t=i(9).split("#")[1]||"",a=decodeURIComponent(t),(h=document.getElementById(a)||document.getElementsByName(a)[0])?(e=r(h),p(A,"Moving to in page link (#"+t+") at x: "+e.x+" y: "+e.y),s={x:e.x,y:e.y},d(),p(A,"--")):window.top===window.self?p(A,"In page link #"+t+" not found"):window.parentIFrame?window.parentIFrame.moveToAnchor(t):p(A,"In page link #"+t+" not found and window.parentIFrame not found");break;case"reset":j(W);break;case"init":n(),f("onInit",W.iframe);break;default:0===Number(W.width)&&0===Number(W.height)?v("Unsupported message received ("+W.type+"), this is likely due to the iframe containing a later version of iframe-resizer than the parent page"):n()}var e,t,a,h,m}())):y(A,"Ignored: "+L)}function S(e,n,t){var i=null,o=null;if(u[e]){if("function"!=typeof(i=u[e][n]))throw new TypeError(n+" on iFrame["+e+"] is not a function");o=i(t)}return o}function I(e){delete u[e.id]}function F(e){var t=e.id;if(!1!==S(t,"onClose",t)){p(t,"Removing iFrame: "+t);try{e.parentNode&&e.parentNode.removeChild(e)}catch(e){v(e)}S(t,"onClosed",t),p(t,"--"),I(e),n&&(n.disconnect(),n=null)}else p(t,"Close iframe cancelled by onClose event")}function M(n){null===s&&p(n,"Get page position: "+(s={x:window.pageXOffset===e?document.documentElement.scrollLeft:window.pageXOffset,y:window.pageYOffset===e?document.documentElement.scrollTop:window.pageYOffset}).x+","+s.y)}function T(e){null!==s&&(window.scrollTo(s.x,s.y),p(e,"Set page position: "+s.x+","+s.y),O())}function O(){s=null}function j(e){p(e.id,"Size reset requested by "+("init"===e.type?"host page":"iFrame")),M(e.id),C((function(){R(e),E("reset","reset",e.iframe,e.id)}),e,"reset")}function R(e){function n(n){r||"0"!==e[n]||(r=!0,p(i,"Hidden iFrame detected, creating visibility listener"),function(){function e(){Object.keys(u).forEach((function(e){!function(e){function n(n){return"0px"===(u[e]&&u[e].iframe.style[n])}u[e]&&null!==u[e].iframe.offsetParent&&(n("height")||n("width"))&&E("Visibility change","resize",u[e].iframe,e)}(e)}))}function n(n){p("window","Mutation observed: "+n[0].target+" "+n[0].type),W(e,16)}var t,i=m();i&&(t=document.querySelector("body"),new i(n).observe(t,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0}))}())}function t(t){!function(n){e.id?(e.iframe.style[n]=e[n]+"px",p(e.id,"IFrame ("+i+") "+n+" set to "+e[n]+"px")):p("undefined","messageData id not set")}(t),n(t)}var i=e.iframe.id;u[i]&&(u[i].sizeHeight&&t("height"),u[i].sizeWidth&&t("width"))}function C(e,n,t){t!==n.type&&c&&!window.jasmine?(p(n.id,"Requesting animation frame"),c(e)):e()}function E(e,n,t,i,o){var r,s=!1;u[i=i||t.id]&&(t&&"contentWindow"in t&&null!==t.contentWindow?(p(i,"["+e+"] Sending msg to iframe["+i+"] ("+n+") targetOrigin: "+(r=u[i]&&u[i].targetOrigin)),t.contentWindow.postMessage(a+n,r)):v(i,"["+e+"] IFrame("+i+") not found"),o&&u[i]&&u[i].warningTimeout&&(u[i].msgTimeout=setTimeout((function(){!u[i]||u[i].loaded||s||(s=!0,v(i,"IFrame has not responded within "+u[i].warningTimeout/1e3+" seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."))}),u[i].warningTimeout)))}function N(e){return e+":"+u[e].bodyMarginV1+":"+u[e].sizeWidth+":"+u[e].log+":"+u[e].interval+":"+u[e].enablePublicMethods+":"+u[e].autoResize+":"+u[e].bodyMargin+":"+u[e].heightCalculationMethod+":"+u[e].bodyBackground+":"+u[e].bodyPadding+":"+u[e].tolerance+":"+u[e].inPageLinks+":"+u[e].resizeFrom+":"+u[e].widthCalculationMethod+":"+u[e].mouseEvents}function L(t,r){function a(e){var n=e.split("Callback");if(2===n.length){var t="on"+n[0].charAt(0).toUpperCase()+n[0].slice(1);this[t]=this[e],delete this[e],v(l,"Deprecated: '"+e+"' has been renamed '"+t+"'. The old method will be removed in the next major version.")}}var s,c,l=function(e){if("string"!=typeof e)throw new TypeError("Invaild id for iFrame. Expected String");var n;return""===e&&(t.id=(n=r&&r.id||f.id+i++,null!==document.getElementById(n)&&(n+=i++),e=n),o=(r||{}).log,p(e,"Added missing iframe ID: "+e+" ("+t.src+")")),e}(t.id);l in u&&"iFrameResizer"in t?v(l,"Ignored iFrame, already setup."):(function(e){var n;e=e||{},u[l]=Object.create(null),u[l].iframe=t,u[l].firstRun=!0,u[l].remoteHost=t.src&&t.src.split("/").slice(0,3).join("/"),function(e){if("object"!=typeof e)throw new TypeError("Options is not an object")}(e),Object.keys(e).forEach(a,e),function(e){for(var n in f)Object.prototype.hasOwnProperty.call(f,n)&&(u[l][n]=Object.prototype.hasOwnProperty.call(e,n)?e[n]:f[n])}(e),u[l]&&(u[l].targetOrigin=!0===u[l].checkOrigin?""===(n=u[l].remoteHost)||null!==n.match(/^(about:blank|javascript:|file:\/\/)/)?"*":n:"*")}(r),function(){switch(p(l,"IFrame scrolling "+(u[l]&&u[l].scrolling?"enabled":"disabled")+" for "+l),t.style.overflow=!1===(u[l]&&u[l].scrolling)?"hidden":"auto",u[l]&&u[l].scrolling){case"omit":break;case!0:t.scrolling="yes";break;case!1:t.scrolling="no";break;default:t.scrolling=u[l]?u[l].scrolling:"no"}}(),function(){function e(e){var n=u[l][e];1/0!==n&&0!==n&&(t.style[e]="number"==typeof n?n+"px":n,p(l,"Set "+e+" = "+t.style[e]))}function n(e){if(u[l]["min"+e]>u[l]["max"+e])throw new Error("Value for min"+e+" can not be greater than max"+e)}n("Height"),n("Width"),e("maxHeight"),e("minHeight"),e("maxWidth"),e("minWidth")}(),"number"!=typeof(u[l]&&u[l].bodyMargin)&&"0"!==(u[l]&&u[l].bodyMargin)||(u[l].bodyMarginV1=u[l].bodyMargin,u[l].bodyMargin=u[l].bodyMargin+"px"),s=N(l),(c=m())&&(n=function(e){if(!t.parentNode)return null;var n=new e((function(e){e.forEach((function(e){Array.prototype.slice.call(e.removedNodes).forEach((function(e){e===t&&F(t)}))}))}));return n.observe(t.parentNode,{childList:!0}),n}(c)),w(t,"load",(function(){E("iFrame.onload",s,t,e,!0),(!u[l]||!u[l].firstRun)&&u[l]&&u[l].heightCalculationMethod in d&&j({iframe:t,height:0,width:0,type:"init"})})),E("init",s,t,e,!0),u[l]&&(u[l].iframe.iFrameResizer={close:F.bind(null,u[l].iframe),removeListeners:I.bind(null,u[l].iframe),resize:E.bind(null,"Window resize","resize",u[l].iframe),moveToAnchor:function(e){E("Move to anchor","moveToAnchor:"+e,u[l].iframe,l)},sendMessage:function(e){E("Send Message","message:"+(e=JSON.stringify(e)),u[l].iframe,l)}}))}function W(e,n){null===l&&(l=setTimeout((function(){l=null,e()}),n))}function A(){"hidden"!==document.visibilityState&&(p("document","Trigger event: Visibility change"),W((function(){P("Tab Visible","resize")}),16))}function P(e,n){Object.keys(u).forEach((function(t){(function(e){return u[e]&&"parent"===u[e].resizeFrom&&u[e].autoResize&&!u[e].firstRun})(t)&&E(e,n,u[t].iframe,t)}))}function H(){function n(e,n){n&&(function(){if(!n.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==n.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+n.tagName+">")}(),L(n,e),t.push(n))}var t;return function(){var e,n=["moz","webkit","o","ms"];for(e=0;e<n.length&&!c;e+=1)c=window[n[e]+"RequestAnimationFrame"];c?c=c.bind(window):p("setup","RequestAnimationFrame not supported")}(),w(window,"message",z),w(window,"resize",(function(){p("window","Trigger event: resize"),W((function(){P("Window resize","resize")}),16)})),w(document,"visibilitychange",A),w(document,"-webkit-visibilitychange",A),function(i,o){switch(t=[],function(e){e&&e.enablePublicMethods&&v("enablePublicMethods option has been removed, public methods are now always available in the iFrame")}(i),typeof o){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(o||"iframe"),n.bind(e,i));break;case"object":n(i,o);break;default:throw new TypeError("Unexpected data type ("+typeof o+")")}return t}}}()),k.exports));class S{constructor(e,n){this.iframe=e,this.iframeOrigin=n}postMessage(e,n){const t=Object.assign({eventType:e},n);this.iframe.contentWindow.postMessage(t,this.iframeOrigin)}addMessageListener(e){window.addEventListener("message",e)}removeMessageListener(e){window.removeEventListener("message",e)}postMessageWithResponseListener(e,n){return new Promise((t=>{const i=n=>{n.data.eventType===e&&(window.removeEventListener("message",i),t(n.data.data))};window.addEventListener("message",i),this.postMessage(e,n)}))}}const I=class{constructor(n){e(this,n),this.iframeLoaded=i(this,"iframeLoaded",7),this.isFocused=!1,this.isValid=!0,this.dispatchMessageEvent=e=>{const{eventType:n,data:t}=e.data;(null==t?void 0:t.id)===this.inputId&&("focused"===n&&(this.isFocused=!0),"blurred"===n&&(this.isFocused=!1))}}disconnectedCallback(){this.frameService.removeMessageListener(this.dispatchMessageEvent)}async validate(){const e=await this.frameService.postMessageWithResponseListener("validate");return this.isValid=e.isValid,this.errorText=e.error.message,e}async tokenize(e,n,t){return this.frameService.postMessageWithResponseListener("tokenize",{clientId:e,paymentMethodMetadata:n,account:t,componentVersion:m.version})}async reload(){this.iframeElement.src=this.iframeSrc}initializeFrameCommunicationService(){var e;this.frameService=new S(this.iframeElement,this.iframeOrigin),null===(e=this.frameService)||void 0===e||e.addMessageListener(this.dispatchMessageEvent)}get part(){return this.isFocused&&!this.isValid?a:this.isValid?this.isFocused?c:d:s}get style(){return this.isFocused?this.isValid?b.focused:b.focusedAndInvalid:null}get urlParams(){const e=Object.fromEntries(Object.entries(b.fontStyles).map((([e,n])=>[e,btoa(String(n))])));return new URLSearchParams(e).toString()}get iframeSrc(){return`${this.iframeOrigin}?${this.urlParams}`}render(){return n(t,{key:"7116bdbe3d3a69fac28965fa011d016d35ec5025",class:"form-group d-flex flex-column"},n("div",{key:"e784c6f81476eb282a07714d5b789f41342c4a2a",style:{visibility:this.iframeLoaded?"visible":"hidden",height:this.iframeLoaded?"auto":"0"}},n("label",{key:"d0b4341c92a4c957ec4a03485357d6cef7f22426",class:"form-label",htmlFor:"",part:u},this.label||""),n("div",{key:"9be8449ee6b3d37aa3607ff31d5649c73e3f4206",class:"p-0 d-flex form-control "+(this.isValid?"":"is-invalid"),part:this.part,style:Object.assign(Object.assign({},this.style),{overflow:"hidden"})},n("iframe",{key:"093b48e69a6e8a15a4fd9877424bb0c9a3f58ad7",id:this.inputId,name:this.inputId,src:this.iframeSrc,ref:e=>{this.iframeElement=e,this.initializeFrameCommunicationService()},width:"100%",onLoad:()=>{z({log:!1,onResized:()=>{this.iframeLoaded.emit()}},this.iframeElement)}})),n(h,{key:"f5897f95387e6400f35c997b2921a60fb5f4f11b",errorText:this.errorText,name:this.inputId})))}get el(){return o(this)}};export{w as form_alert,y as hidden_input,I as iframe_input}
@@ -1 +1 @@
1
- import{h as i,r as e,c as a}from"./p-CV0Pyo1O.js";import{S as t}from"./p-eBK-iWrz.js";import{w as r,c as s}from"./p-B4vLfYnZ.js";import{e as d}from"./p-Ds_P-dB8.js";import{c as n}from"./p-ByQMBEDC.js";import{C as o,c,b as h}from"./p-D6uhYbLo.js";import"./p-CLHwhyvu.js";import"./p-DaDqgDrb.js";import{B as l}from"./p-CU2Dwa94.js";import"./p-CZfYo5-1.js";import"./p-Bu7gdOaV.js";import"./p-DgTOxu8x.js";import"./p-HXpYMWUU.js";import"./p-Dn9_7aQh.js";const f=()=>i("div",{class:"container-fluid p-0"},i("div",{class:"mb-3"},i(t,{height:"18px",width:"100px"}),i(t,{height:"36px"})),i("div",{class:"row"},i("div",{class:"col-4 align-content-end"},i(t,{height:"18px",width:"80px"}),i(t,{height:"36px"})),i("div",{class:"col-4 align-content-end"},i(t,{height:"36px"})),i("div",{class:"col-4 align-content-end"},i(t,{height:"18px",width:"30px"}),i(t,{height:"36px"})))),p=class{constructor(i){e(this,i),this.errorEvent=a(this,"error-event",7),this.iframeState="loading",this.reloadIframes=()=>{this.iframeState="loading",this.iframeElements.forEach((i=>i.reload())),this.watchIframesLoad()}}async componentWillLoad(){await r(),this.iframeOrigin=s.iframeOrigin,this.tabId=d(),n()}componentDidLoad(){this.watchIframesLoad()}disconnectedCallback(){var i;null===(i=this.loadAbortController)||void 0===i||i.abort()}async validate(){const i=await this.cardNumberIframeElement.validate(),e=await this.expirationMonthIframeElement.validate(),a=await this.expirationYearIframeElement.validate(),t=await this.cvvIframeElement.validate();return i&&e&&a&&t}async tokenize({clientId:i,paymentMethodMetadata:e,account:a}){return await this.cardNumberIframeElement.tokenize(i,e,a)}get isReady(){return"ready"===this.iframeState}get iframeElements(){return[this.cardNumberIframeElement,this.expirationMonthIframeElement,this.expirationYearIframeElement,this.cvvIframeElement]}watchIframesLoad(){var i;null===(i=this.loadAbortController)||void 0===i||i.abort();const{signal:e}=this.loadAbortController=new AbortController,a=new Set(this.iframeElements.map((i=>i.inputId))),t=Promise.all(this.iframeElements.map((i=>new Promise((t=>{i.addEventListener("iframeLoaded",(()=>{a.delete(i.inputId),t()}),{once:!0,signal:e})}))))),r=new Promise(((i,t)=>{const r=window.setTimeout((()=>t(new Error(`Iframes failed to load: ${Array.from(a).join(", ")}`))),1e4);e.addEventListener("abort",(()=>{window.clearTimeout(r),t(new Error("iframe load watch aborted"))}),{once:!0})}));Promise.race([t,r]).then((()=>{var i;e.aborted||(this.iframeState="ready",null===(i=this.loadAbortController)||void 0===i||i.abort())})).catch((i=>{var a;e.aborted||(this.iframeState="error",null===(a=this.loadAbortController)||void 0===a||a.abort(),this.errorEvent.emit({errorCode:h.IFRAME_LOAD_ERROR,message:c.IFRAME_LOAD_ERROR,severity:o.ERROR,data:{errorMessage:i.message}}))}))}renderIframeError(){return i("div",null,i("form-alert",{text:c.IFRAME_LOAD_ERROR,hideAlert:!1}),i(l,{variant:"link",clickHandler:this.reloadIframes,"aria-label":"Reload payment form",type:"button"},"Try again"))}render(){return i("div",{key:"a6630edeb25e19b72a6ad2588a28003ee53bda91"},"loading"===this.iframeState&&i(f,{key:"346df12a8dcfa70ff35381491c10550a44dee1c1"}),"error"===this.iframeState&&this.renderIframeError(),i("hidden-input",{key:"e63dfbd08d05c929d7f25257a0832d68246aa037"}),i("div",{key:"3cffef99661c7fc1289581c3c43cf7f2c2ec4558",class:"container-fluid p-0",style:{opacity:this.isReady?"1":"0",height:this.isReady?"auto":"0"}},i("div",{key:"493e63b1e26542e502fb028192a2ed1479d85c8d",class:"mb-3"},i("iframe-input",{key:"337b63edc91e78baa975bbfa067e17bd29a5b704",inputId:"cardNumber",ref:i=>this.cardNumberIframeElement=i,label:"Card Number",iframeOrigin:`${this.iframeOrigin}/v2/cardNumber?tabId=${this.tabId}`})),i("div",{key:"04628f41b2c78cbb68bcabfe7809c047dc394c50",class:"row"},i("div",{key:"9ea7675dcab4ad6f6bce214b79527569ffc272b9",class:"col-4 align-content-end"},i("iframe-input",{key:"ab7f0c3e68848a048104a6644b2617e9b8b94e35",inputId:"expirationMonth",ref:i=>this.expirationMonthIframeElement=i,label:"Expiration",iframeOrigin:`${this.iframeOrigin}/v2/expirationMonth?tabId=${this.tabId}`})),i("div",{key:"a24a31ef92175734aa8d5a6be241ddb37f94e4d2",class:"col-4 align-content-end"},i("iframe-input",{key:"623fffa1cdc854b629314fc125b476d2541f2290",inputId:"expirationYear",ref:i=>this.expirationYearIframeElement=i,label:"",iframeOrigin:`${this.iframeOrigin}/v2/expirationYear?tabId=${this.tabId}`})),i("div",{key:"ab7737e03a1d6ccad1e70e575cea100040de70fd",class:"col-4 align-content-end"},i("iframe-input",{key:"b755098bc225d91125a70bcb2cae933e4cd08f2d",inputId:"CVV",ref:i=>this.cvvIframeElement=i,label:"CVV",iframeOrigin:`${this.iframeOrigin}/v2/CVV?tabId=${this.tabId}`})))))}};export{p as card_form}
1
+ import{h as i,r as e,c as a}from"./p-CV0Pyo1O.js";import{S as t}from"./p-eBK-iWrz.js";import{w as r,c as s}from"./p-B4vLfYnZ.js";import{e as d}from"./p-Ds_P-dB8.js";import{c as n}from"./p-_MjmE9YT.js";import{C as o,c,b as h}from"./p-Dqxyi-uK.js";import"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";import{B as l}from"./p-CU2Dwa94.js";import"./p-CZfYo5-1.js";import"./p-Bu7gdOaV.js";import"./p-DgTOxu8x.js";import"./p-HXpYMWUU.js";import"./p-BC9n8nB2.js";const f=()=>i("div",{class:"container-fluid p-0"},i("div",{class:"mb-3"},i(t,{height:"18px",width:"100px"}),i(t,{height:"36px"})),i("div",{class:"row"},i("div",{class:"col-4 align-content-end"},i(t,{height:"18px",width:"80px"}),i(t,{height:"36px"})),i("div",{class:"col-4 align-content-end"},i(t,{height:"36px"})),i("div",{class:"col-4 align-content-end"},i(t,{height:"18px",width:"30px"}),i(t,{height:"36px"})))),p=class{constructor(i){e(this,i),this.errorEvent=a(this,"error-event",7),this.iframeState="loading",this.reloadIframes=()=>{this.iframeState="loading",this.iframeElements.forEach((i=>i.reload())),this.watchIframesLoad()}}async componentWillLoad(){await r(),this.iframeOrigin=s.iframeOrigin,this.tabId=d(),n()}componentDidLoad(){this.watchIframesLoad()}disconnectedCallback(){var i;null===(i=this.loadAbortController)||void 0===i||i.abort()}async validate(){const i=await this.cardNumberIframeElement.validate(),e=await this.expirationMonthIframeElement.validate(),a=await this.expirationYearIframeElement.validate(),t=await this.cvvIframeElement.validate();return i&&e&&a&&t}async tokenize({clientId:i,paymentMethodMetadata:e,account:a}){return await this.cardNumberIframeElement.tokenize(i,e,a)}get isReady(){return"ready"===this.iframeState}get iframeElements(){return[this.cardNumberIframeElement,this.expirationMonthIframeElement,this.expirationYearIframeElement,this.cvvIframeElement]}watchIframesLoad(){var i;null===(i=this.loadAbortController)||void 0===i||i.abort();const{signal:e}=this.loadAbortController=new AbortController,a=new Set(this.iframeElements.map((i=>i.inputId))),t=Promise.all(this.iframeElements.map((i=>new Promise((t=>{i.addEventListener("iframeLoaded",(()=>{a.delete(i.inputId),t()}),{once:!0,signal:e})}))))),r=new Promise(((i,t)=>{const r=window.setTimeout((()=>t(new Error(`Iframes failed to load: ${Array.from(a).join(", ")}`))),1e4);e.addEventListener("abort",(()=>{window.clearTimeout(r),t(new Error("iframe load watch aborted"))}),{once:!0})}));Promise.race([t,r]).then((()=>{var i;e.aborted||(this.iframeState="ready",null===(i=this.loadAbortController)||void 0===i||i.abort())})).catch((i=>{var a;e.aborted||(this.iframeState="error",null===(a=this.loadAbortController)||void 0===a||a.abort(),this.errorEvent.emit({errorCode:h.IFRAME_LOAD_ERROR,message:c.IFRAME_LOAD_ERROR,severity:o.ERROR,data:{errorMessage:i.message}}))}))}renderIframeError(){return i("div",null,i("form-alert",{text:c.IFRAME_LOAD_ERROR,hideAlert:!1}),i(l,{variant:"link",clickHandler:this.reloadIframes,"aria-label":"Reload payment form",type:"button"},"Try again"))}render(){return i("div",{key:"a6630edeb25e19b72a6ad2588a28003ee53bda91"},"loading"===this.iframeState&&i(f,{key:"346df12a8dcfa70ff35381491c10550a44dee1c1"}),"error"===this.iframeState&&this.renderIframeError(),i("hidden-input",{key:"e63dfbd08d05c929d7f25257a0832d68246aa037"}),i("div",{key:"3cffef99661c7fc1289581c3c43cf7f2c2ec4558",class:"container-fluid p-0",style:{opacity:this.isReady?"1":"0",height:this.isReady?"auto":"0"}},i("div",{key:"493e63b1e26542e502fb028192a2ed1479d85c8d",class:"mb-3"},i("iframe-input",{key:"337b63edc91e78baa975bbfa067e17bd29a5b704",inputId:"cardNumber",ref:i=>this.cardNumberIframeElement=i,label:"Card Number",iframeOrigin:`${this.iframeOrigin}/v2/cardNumber?tabId=${this.tabId}`})),i("div",{key:"04628f41b2c78cbb68bcabfe7809c047dc394c50",class:"row"},i("div",{key:"9ea7675dcab4ad6f6bce214b79527569ffc272b9",class:"col-4 align-content-end"},i("iframe-input",{key:"ab7f0c3e68848a048104a6644b2617e9b8b94e35",inputId:"expirationMonth",ref:i=>this.expirationMonthIframeElement=i,label:"Expiration",iframeOrigin:`${this.iframeOrigin}/v2/expirationMonth?tabId=${this.tabId}`})),i("div",{key:"a24a31ef92175734aa8d5a6be241ddb37f94e4d2",class:"col-4 align-content-end"},i("iframe-input",{key:"623fffa1cdc854b629314fc125b476d2541f2290",inputId:"expirationYear",ref:i=>this.expirationYearIframeElement=i,label:"",iframeOrigin:`${this.iframeOrigin}/v2/expirationYear?tabId=${this.tabId}`})),i("div",{key:"ab7737e03a1d6ccad1e70e575cea100040de70fd",class:"col-4 align-content-end"},i("iframe-input",{key:"b755098bc225d91125a70bcb2cae933e4cd08f2d",inputId:"CVV",ref:i=>this.cvvIframeElement=i,label:"CVV",iframeOrigin:`${this.iframeOrigin}/v2/CVV?tabId=${this.tabId}`})))))}};export{p as card_form}
@@ -0,0 +1 @@
1
+ import{r as t,c as s,h as e,H as a}from"./p-CV0Pyo1O.js";import{q as i,u as o,v as r,w as h,x as n,y as c}from"./p-Bu7gdOaV.js";import{F as f}from"./p-BTuqVZ6O.js";import{F as d}from"./p-CLZcevBz.js";import"./p-CZfYo5-1.js";import{f as l}from"./p-Ds_P-dB8.js";import"./p-HXpYMWUU.js";const p=class{constructor(e){t(this,e),this.formControlInput=s(this,"formControlInput",7),this.formControlBlur=s(this,"formControlBlur",7),this.isFocused=!1,this.defaultValue="0",this.formatRawValue=t=>t.replace(/\D/g,""),this.formatDisplayValue=t=>l(+t,void 0,!0),this.updateInput=t=>{const s=this.formControl.name,e=this.formatRawValue(t);this.formControl.value=this.formatDisplayValue(e),this.inputHandler(s,e),this.formControlInput.emit({name:s,value:e})}}handleDefaultValueChange(t){this.updateInput(t)}componentDidLoad(){this.updateInput(this.defaultValue)}get inputPart(){return this.errorText?i:this.disabled?o:this.isFocused?r:h}render(){return e(a,{key:"0e155ea412884f0d45702620cf31aa3910940e88"},e("div",{key:"bdf371cf77ec32483c8f984fdc68133ae05be865",class:"form-group d-flex flex-column"},e("label",{key:"b8b30aa3bb6ebc5e423593737fd646090a584272",part:n,class:"form-label",htmlFor:this.name},this.label),e(f,{key:"6ba6701d1b54eb1b7e4e9de2f6386346b055d516",name:this.name,helpText:this.helpText}),e("div",{key:"cf6893c681afe85d9e435a9e8920683dd9864c14",class:"input-group"},e("span",{key:"de56ce422d29f38028dcbefd8f35be3210223f67",class:"input-group-text",part:c},"$"),e("input",{key:"234592cf95dc5e613fee8da90a5a4e40389b5bc4",ref:t=>this.formControl=t,id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:t=>this.updateInput(t.target.value),onKeyDown:this.keyDownHandler,onPaste:this.keyDownHandler,maxLength:this.maxLength,part:this.inputPart,class:this.errorText?"form-control is-invalid":"form-control",type:"text",disabled:this.disabled})),e(d,{key:"2e66376501c5a7718f41c2714a66acf74bb6cde4",errorText:this.errorText,name:this.name})))}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}};export{p as form_control_monetary}
@@ -1 +1 @@
1
- import{h as t,r as i,c as r}from"./p-CV0Pyo1O.js";import{S as s}from"./p-eBK-iWrz.js";import{w as e,c as a}from"./p-B4vLfYnZ.js";import{e as o}from"./p-Ds_P-dB8.js";import{c as n}from"./p-ByQMBEDC.js";import{c as h}from"./p-Fpaf7CLD.js";import{C as l,c,b as d}from"./p-D6uhYbLo.js";import"./p-CLHwhyvu.js";import"./p-DaDqgDrb.js";import{B as m}from"./p-CU2Dwa94.js";import"./p-CZfYo5-1.js";import"./p-Bu7gdOaV.js";import"./p-DgTOxu8x.js";import"./p-HXpYMWUU.js";import"./p-Dn9_7aQh.js";import"./p-DEx8fQeW.js";const p=()=>t("div",{class:"container-fluid p-0"},t("div",{class:"row mb-3"},t("div",{class:"col-12 align-content-end"},t(s,{height:"18px",width:"120px"}),t(s,{height:"36px"}))),t("div",{class:"row"},t("div",{class:"col-12 align-content-end"},t(s,{height:"18px",width:"110px"}),t(s,{height:"36px"})))),u=class{constructor(t){i(this,t),this.errorEvent=r(this,"error-event",7),this.iframeState="loading",this.hasLoggedAchDisabledWarning=!1,this.reloadIframes=()=>{this.iframeState="loading",this.iframeElements.forEach((t=>t.reload())),this.watchIframesLoad()}}async componentWillLoad(){await e(),this.iframeOrigin=a.iframeOrigin,this.tabId=o(),n()}componentDidRender(){!this.loadAbortController&&this.iframeElements.every(Boolean)&&this.watchIframesLoad()}disconnectedCallback(){var t;null===(t=this.loadAbortController)||void 0===t||t.abort()}isAchDisabledForCheckout(){return h.checkoutLoaded&&!h.achPaymentsEnabled}async validate(){if(this.isAchDisabledForCheckout())return!1;const t=await this.accountNumberIframeElement.validate(),i=await this.routingNumberIframeElement.validate();return t&&i}async tokenize({clientId:t,paymentMethodMetadata:i,account:r}){return this.isAchDisabledForCheckout()?{error:{message:"ACH payments are disabled for this checkout (payment_settings.ach_payments=false)."}}:await this.accountNumberIframeElement.tokenize(t,i,r)}get isReady(){return"ready"===this.iframeState}get iframeElements(){return[this.accountNumberIframeElement,this.routingNumberIframeElement]}watchIframesLoad(){var t;null===(t=this.loadAbortController)||void 0===t||t.abort();const{signal:i}=this.loadAbortController=new AbortController,r=new Set(this.iframeElements.map((t=>t.inputId))),s=Promise.all(this.iframeElements.map((t=>new Promise((s=>{t.addEventListener("iframeLoaded",(()=>{r.delete(t.inputId),s()}),{once:!0,signal:i})}))))),e=new Promise(((t,s)=>{const e=window.setTimeout((()=>s(new Error(`Iframes failed to load: ${Array.from(r).join(", ")}`))),1e4);i.addEventListener("abort",(()=>{window.clearTimeout(e),s(new Error("iframe load watch aborted"))}),{once:!0})}));Promise.race([s,e]).then((()=>{var t;i.aborted||(this.iframeState="ready",null===(t=this.loadAbortController)||void 0===t||t.abort())})).catch((t=>{var r;i.aborted||(this.iframeState="error",null===(r=this.loadAbortController)||void 0===r||r.abort(),this.errorEvent.emit({errorCode:d.IFRAME_LOAD_ERROR,message:c.IFRAME_LOAD_ERROR,severity:l.ERROR,data:{errorMessage:t.message}}))}))}renderIframeError(){return t("div",null,t("form-alert",{text:c.IFRAME_LOAD_ERROR,hideAlert:!1}),t(m,{variant:"link",clickHandler:this.reloadIframes,"aria-label":"Reload bank account form",type:"button"},"Try again"))}render(){return this.isAchDisabledForCheckout()?(this.hasLoggedAchDisabledWarning||(console.warn("[bank-account-form] ACH payments are disabled for this checkout (payment_settings.ach_payments=false)."),this.hasLoggedAchDisabledWarning=!0),null):t("div",null,"loading"===this.iframeState&&t(p,null),"error"===this.iframeState&&this.renderIframeError(),t("hidden-input",null),t("div",{class:"container-fluid p-0",style:{opacity:this.isReady?"1":"0",height:this.isReady?"auto":"0"}},t("div",{class:"row mb-3"},t("iframe-input",{inputId:"accountNumber",ref:t=>this.accountNumberIframeElement=t,label:"Account Number",iframeOrigin:`${this.iframeOrigin}/v2/accountNumber?tabId=${this.tabId}`})),t("div",{class:"row"},t("iframe-input",{inputId:"routingNumber",ref:t=>this.routingNumberIframeElement=t,label:"Routing Number",iframeOrigin:`${this.iframeOrigin}/v2/routingNumber?tabId=${this.tabId}`}))))}};export{u as bank_account_form}
1
+ import{h as t,r as i,c as s}from"./p-CV0Pyo1O.js";import{S as r}from"./p-eBK-iWrz.js";import{w as e,c as a}from"./p-B4vLfYnZ.js";import{e as o}from"./p-Ds_P-dB8.js";import{c as n}from"./p-_MjmE9YT.js";import{c as h}from"./p-Fpaf7CLD.js";import{C as l,c,b as d}from"./p-Dqxyi-uK.js";import"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";import{B as m}from"./p-CU2Dwa94.js";import"./p-CZfYo5-1.js";import"./p-Bu7gdOaV.js";import"./p-DgTOxu8x.js";import"./p-HXpYMWUU.js";import"./p-BC9n8nB2.js";import"./p-DEx8fQeW.js";const p=()=>t("div",{class:"container-fluid p-0"},t("div",{class:"row mb-3"},t("div",{class:"col-12 align-content-end"},t(r,{height:"18px",width:"120px"}),t(r,{height:"36px"}))),t("div",{class:"row"},t("div",{class:"col-12 align-content-end"},t(r,{height:"18px",width:"110px"}),t(r,{height:"36px"})))),u=class{constructor(t){i(this,t),this.errorEvent=s(this,"error-event",7),this.iframeState="loading",this.hasLoggedAchDisabledWarning=!1,this.reloadIframes=()=>{this.iframeState="loading",this.iframeElements.forEach((t=>t.reload())),this.watchIframesLoad()}}async componentWillLoad(){await e(),this.iframeOrigin=a.iframeOrigin,this.tabId=o(),n()}componentDidRender(){!this.loadAbortController&&this.iframeElements.every(Boolean)&&this.watchIframesLoad()}disconnectedCallback(){var t;null===(t=this.loadAbortController)||void 0===t||t.abort()}isAchDisabledForCheckout(){return h.checkoutLoaded&&!h.achPaymentsEnabled}async validate(){if(this.isAchDisabledForCheckout())return!1;const t=await this.accountNumberIframeElement.validate(),i=await this.routingNumberIframeElement.validate();return t&&i}async tokenize({clientId:t,paymentMethodMetadata:i,account:s}){return this.isAchDisabledForCheckout()?{error:{message:"ACH payments are disabled for this checkout (payment_settings.ach_payments=false)."}}:await this.accountNumberIframeElement.tokenize(t,i,s)}get isReady(){return"ready"===this.iframeState}get iframeElements(){return[this.accountNumberIframeElement,this.routingNumberIframeElement]}watchIframesLoad(){var t;null===(t=this.loadAbortController)||void 0===t||t.abort();const{signal:i}=this.loadAbortController=new AbortController,s=new Set(this.iframeElements.map((t=>t.inputId))),r=Promise.all(this.iframeElements.map((t=>new Promise((r=>{t.addEventListener("iframeLoaded",(()=>{s.delete(t.inputId),r()}),{once:!0,signal:i})}))))),e=new Promise(((t,r)=>{const e=window.setTimeout((()=>r(new Error(`Iframes failed to load: ${Array.from(s).join(", ")}`))),1e4);i.addEventListener("abort",(()=>{window.clearTimeout(e),r(new Error("iframe load watch aborted"))}),{once:!0})}));Promise.race([r,e]).then((()=>{var t;i.aborted||(this.iframeState="ready",null===(t=this.loadAbortController)||void 0===t||t.abort())})).catch((t=>{var s;i.aborted||(this.iframeState="error",null===(s=this.loadAbortController)||void 0===s||s.abort(),this.errorEvent.emit({errorCode:d.IFRAME_LOAD_ERROR,message:c.IFRAME_LOAD_ERROR,severity:l.ERROR,data:{errorMessage:t.message}}))}))}renderIframeError(){return t("div",null,t("form-alert",{text:c.IFRAME_LOAD_ERROR,hideAlert:!1}),t(m,{variant:"link",clickHandler:this.reloadIframes,"aria-label":"Reload bank account form",type:"button"},"Try again"))}render(){return this.isAchDisabledForCheckout()?(this.hasLoggedAchDisabledWarning||(console.warn("[bank-account-form] ACH payments are disabled for this checkout (payment_settings.ach_payments=false)."),this.hasLoggedAchDisabledWarning=!0),null):t("div",null,"loading"===this.iframeState&&t(p,null),"error"===this.iframeState&&this.renderIframeError(),t("hidden-input",null),t("div",{class:"container-fluid p-0",style:{opacity:this.isReady?"1":"0",height:this.isReady?"auto":"0"}},t("div",{class:"row mb-3"},t("iframe-input",{inputId:"accountNumber",ref:t=>this.accountNumberIframeElement=t,label:"Account Number",iframeOrigin:`${this.iframeOrigin}/v2/accountNumber?tabId=${this.tabId}`})),t("div",{class:"row"},t("iframe-input",{inputId:"routingNumber",ref:t=>this.routingNumberIframeElement=t,label:"Routing Number",iframeOrigin:`${this.iframeOrigin}/v2/routingNumber?tabId=${this.tabId}`}))))}};export{u as bank_account_form}
@@ -1 +1 @@
1
- import{r as t,h as a}from"./p-CV0Pyo1O.js";import{c as o}from"./p-ByQMBEDC.js";import{J as s}from"./p-BHaO3c8W.js";import{w as r}from"./p-B4vLfYnZ.js";import{S as i}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 e=class{constructor(a){t(this,a)}async componentWillLoad(){await r(),o(),this.analytics=new s(this)}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}async validate(){return!!this.bankAccountFormElement&&this.bankAccountFormElement.validate()}async tokenize({clientId:t,paymentMethodMetadata:a,account:o}){return this.bankAccountFormElement?this.bankAccountFormElement.tokenize({clientId:t,paymentMethodMetadata:a,account:o}):{error:{message:"Bank account form is not available."}}}render(){return a(i,{key:"1263233d6c63c0df4a2a6a17b263651156ad6bee"},a("bank-account-form",{key:"f6c6707201ef127eafc81e12535bcfa37ddf3c5d",ref:t=>this.bankAccountFormElement=t}))}};export{e as justifi_bank_account_form}
1
+ import{r as t,h as a}from"./p-CV0Pyo1O.js";import{c as o}from"./p-_MjmE9YT.js";import{J as s}from"./p-BjjKkMO1.js";import{w as r}from"./p-B4vLfYnZ.js";import{S as i}from"./p-05AWudQe.js";import"./p-CZfYo5-1.js";import"./p-BC9n8nB2.js";import"./p-C6Jq8YDT.js";import"./p-Ds_P-dB8.js";import"./p-HXpYMWUU.js";import"./p-Dqxyi-uK.js";import"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";import"./p-DgTOxu8x.js";const e=class{constructor(a){t(this,a)}async componentWillLoad(){await r(),o(),this.analytics=new s(this)}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}async validate(){return!!this.bankAccountFormElement&&this.bankAccountFormElement.validate()}async tokenize({clientId:t,paymentMethodMetadata:a,account:o}){return this.bankAccountFormElement?this.bankAccountFormElement.tokenize({clientId:t,paymentMethodMetadata:a,account:o}):{error:{message:"Bank account form is not available."}}}render(){return a(i,{key:"1263233d6c63c0df4a2a6a17b263651156ad6bee"},a("bank-account-form",{key:"f6c6707201ef127eafc81e12535bcfa37ddf3c5d",ref:t=>this.bankAccountFormElement=t}))}};export{e as justifi_bank_account_form}
@@ -0,0 +1 @@
1
+ import{h as e,r as t,c as i}from"./p-CV0Pyo1O.js";import{P as s}from"./p-pueOrhXO.js";import"./p-B4vLfYnZ.js";import"./p-HXpYMWUU.js";import{k as a,C as d,b as c}from"./p-Dqxyi-uK.js";import"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";import{g as o,a as r}from"./p-BhpaUYtS.js";import{h,b as l,d as n}from"./p-Ds_P-dB8.js";import{a as f,b as p,D as b,c as u,C as v,E as y}from"./p-Bh6Q8AqQ.js";import{J as m}from"./p-BjjKkMO1.js";import{m as k,M as j}from"./p-Bxc0NRj8.js";import{c as g}from"./p-_MjmE9YT.js";import{B as C}from"./p-CU2Dwa94.js";import{S as w}from"./p-05AWudQe.js";import"./p-CZfYo5-1.js";import{S as x}from"./p-eBK-iWrz.js";import{a as D,B as T}from"./p-Dz8KJn2G.js";import"./p-C6Jq8YDT.js";import"./p-BC9n8nB2.js";import"./p-DgTOxu8x.js";import"./p-Bu7gdOaV.js";const B=()=>e("div",{class:"row gap-3"},e("div",{class:"col-12"},e(x,{width:"35%",height:"30px"})),e("div",{class:"col-12"},e(x,{width:"70%"})),e("div",{class:"col-12"},e(x,{width:"40%"})),e("div",{class:"col-12"},e(x,{width:"40%"})),e("div",{class:"col-12"},e(x,{width:"100%"})),e("div",{class:"col-12"},e(x,{width:"80%"}))),S=class{constructor(e){t(this,e),this.errorEvent=i(this,"error-event",7),this.recordClickEvent=i(this,"record-click-event",7),this.enableRecordClick=!1,this.loading=!0,this.errorMessage=null,this.downloadCSV=()=>{this.getPayoutCSV({payoutId:this.payout.id,onError:({error:e,code:t,severity:i})=>{this.errorMessage=e,this.errorEvent.emit({message:e,errorCode:t,severity:i})}})},this.handleRecordClick=e=>{this.recordClickEvent.emit({id:e,type:"account"})}}componentWillLoad(){g(),this.analytics=new m(this),this.initializeServices(),this.getPayout&&this.fetchData()}disconnectedCallback(){var e;null===(e=this.analytics)||void 0===e||e.cleanup()}propChanged(){this.initializeServices()}getPayoutWatcher(){this.fetchData()}initializeServices(){this.payoutId&&this.authToken?(this.getPayout=(({id:e,authToken:t,service:i})=>async({onSuccess:s,onError:c})=>{var h;try{const l=await i.fetchPayout(e,t);l.error?c({error:r(l.error),code:o(null===(h=l.error)||void 0===h?void 0:h.code),severity:d.ERROR}):s(new a(l.data))}catch(e){c({error:r(e),code:o(null==e?void 0:e.code),severity:d.ERROR})}})({id:this.payoutId,authToken:this.authToken,service:new s}),this.getPayoutCSV=k({authToken:this.authToken,service:new s})):(this.errorMessage="Failed to load payout details. payoutId or authToken is not provided.",this.errorEvent.emit({message:this.errorMessage,errorCode:c.MISSING_PROPS,severity:d.ERROR}))}fetchData(){this.loading=!0,this.getPayout({onSuccess:e=>{this.errorMessage=null,this.payout=e,this.loading=!1},onError:({error:e,code:t,severity:i})=>{this.errorMessage=e,this.errorEvent.emit({message:e,errorCode:t,severity:i}),this.loading=!1}})}formatMethod(e){return"ach"===e?"ACH":h(e)}render(){var t,i,s,a;return e(w,{key:"142db792aa54d2e598071b2787e9c3225ac53561"},this.loading&&e(B,{key:"34f30e5076a727a1ac1ec3e510ee497dd2118781"}),!this.loading&&this.errorMessage&&y(this.errorMessage),!this.loading&&this.payout&&e("justifi-details",{key:"1a35e41004c25f3d1aa6f9e422dade0149d1864f",errorMessage:this.errorMessage},e(f,{key:"159e5f4ce02466d1679ab9a7288e39b58422cbc1",slot:"head-info",badge:e("div",{class:"d-flex gap-1"},j(null===(t=this.payout)||void 0===t?void 0:t.status),e(D,"expedited"===this.payout.settlement_priority?{variant:T.WARNING,title:"Expedited",text:"Expedited"}:{variant:T.SECONDARY,title:"Standard",text:"Standard"})),title:this.payout.formattedPaymentAmount(this.payout.amount)},e(p,{key:"33852a41177edfbf5df0419dc3d09a33e8b1bea5",classes:"border-1 border-end",title:"Updated At",value:`${l(this.payout.updated_at)} ${n(this.payout.updated_at)}`}),e(p,{key:"158b9ce9844ebc705582921133e3bd8748d11722",classes:"border-1 border-end",title:"Created At",value:`${l(this.payout.created_at)} ${n(this.payout.created_at)}`}),e(p,{key:"1066d269cec1d90311add505d19c17ca2f9a0863",title:"ID",value:this.payout.id}),e("div",{key:"4dcbce85c6e11ef99b7370f03ed33acd384d5891",class:"m-4"},e(C,{key:"5206d2702ba0379db1304b77ac07c92e69754f14",variant:"outline-secondary",class:"btn btn-outline-secondary d-flex align-items-center",onClick:this.downloadCSV},"Export CSV"))),e("div",{key:"d6a4a013fb6e48f4c4ef79361a92240b6c7ee5e4",slot:"detail-sections"},e(b,{key:"170281f71a4decf37ba3a5525b38935131f68600",sectionTitle:"Details"}),e("div",{key:"500a4b494c633a9dd7a029c0b742c7316dff9c16",class:"d-flex flex-column gap-2 w-100"},e(u,{key:"72bcd40ca0b5a172e4a9854071630761e95bc0e6",title:"Date paid",value:l(this.payout.deposits_at)}),e(u,{key:"1429c2ffb77148dbaedb73e45849bbbf3f18e65e",title:"Statement Description",value:this.payout.description}),e(u,{key:"cb7541a3c40f8dc9dce258b8f2c55c68782144f6",title:"Payout Method",value:this.formatMethod(this.payout.delivery_method)}),e(u,{key:"f871fdcc0a606267b04cc3865a918c7acdad9a2a",title:"Amount",value:this.payout.formattedPaymentAmount(this.payout.amount)}),e(u,{key:"32b60dd33cc414bbe87ad24f6aec31fd6a907346",title:"Fee",value:this.payout.formattedPaymentAmount(this.payout.fees_total)})),e(b,{key:"be9b1a451d296029e7fecc3b37f7cc994dbccc05",sectionTitle:"Account"}),e("div",{key:"97e6a3b1fbf8096ee44293262e4554bbe8400b31",class:"d-flex flex-column gap-2 w-100"},e(u,{key:"48765886ae8274f95789e5262c280e4a8fc71116",title:"ID",value:this.payout.account_id,onClick:this.enableRecordClick?()=>this.handleRecordClick(this.payout.account_id):void 0}),e(u,{key:"26c552db6cae6855a50550b05258ea37d279e8c6",title:"Account Type",value:null===(i=this.payout.bank_account)||void 0===i?void 0:i.account_type}),e(u,{key:"5844b3d0c9b1b84da8111ea70233335246524244",title:"Institution",value:null===(s=this.payout.bank_account)||void 0===s?void 0:s.account_type}),e(u,{key:"d3582f8418241f330d3b02a823f32def67dd6cc3",title:"Routing Number",value:null===(a=this.payout.bank_account)||void 0===a?void 0:a.routing_number}),e(u,{key:"872d385fb085bf8c908ee47d1b4e0a851125ad3c",title:"Account Number",value:this.payout.bank_account?`**** ${this.payout.bank_account.account_number_last4}`:void 0})),this.payout.metadata&&[e(b,{key:"4e8c13627b364b0bfc59a85ee15cc8212872f279",sectionTitle:"Metadata"}),e("div",{key:"f0071fcf1edf15c19303ac1af0760312f17ed2d4",class:"d-table gap-2 w-100"},e(v,{key:"ae1ef093dac17315972e3aa5350028d08a34a90d",metadata:this.payout.metadata}))])))}static get watchers(){return{payoutId:["propChanged"],authToken:["propChanged"],getPayout:["getPayoutWatcher"]}}};export{S as justifi_payout_details}
@@ -1 +1 @@
1
- import{h as s,r as t,c as i}from"./p-CV0Pyo1O.js";import{A as e}from"./p-Bl00tHyn.js";import{C as r,b as o}from"./p-D6uhYbLo.js";import"./p-CLHwhyvu.js";import"./p-DaDqgDrb.js";import{g as a,a as n}from"./p-CLq3Og7o.js";import{J as c}from"./p-BHaO3c8W.js";import{c as l}from"./p-ByQMBEDC.js";import{c as h}from"./p-Fpaf7CLD.js";import{p as d,f as p,r as u,i as v}from"./p-Ds_P-dB8.js";import{v as m,i as y,a as f,H as j}from"./p-x2oNTAWh.js";import{t as g,z as _}from"./p-Bu7gdOaV.js";import{S as b}from"./p-05AWudQe.js";import"./p-CZfYo5-1.js";import{S as C}from"./p-eBK-iWrz.js";import"./p-B4vLfYnZ.js";import"./p-DgTOxu8x.js";import"./p-Dn9_7aQh.js";import"./p-DEx8fQeW.js";import"./p-HXpYMWUU.js";const k=e();class w{async fetchQuote(s,t){return k.post({endpoint:"insurance/quotes",body:t,authToken:s})}async toggleCoverage(s,t,i){return k.post({endpoint:`insurance/quotes/${t}/toggle`,body:i,authToken:s})}}const T=()=>s("div",{class:"row gap-3"},s("div",{class:"col-12"},s(C,{width:"35%",height:"30px"})),s("div",{class:"col-12"},s(C,{width:"70%"})),s("div",{class:"col-12"},s(C,{width:"40%"})),s("div",{class:"col-12"},s(C,{width:"40%"})),s("div",{class:"col-12"},s(C,{width:"100%"})),s("div",{class:"col-12"},s(C,{width:"80%"}))),D=class{constructor(s){t(this,s),this.insuranceUpdated=i(this,"insurance-updated",7),this.errorEvent=i(this,"error-event",7),this.isLoading=!0}async validate(){return m()}processHTMLContent(s){return d(s,[s=>u(s,"style"),s=>v(s,"a","part",g),s=>v(s,"p","part",g)])}componentWillLoad(){l(),this.analytics=new c(this),this.initializeServiceMethods(),this.getQuote&&this.fetchData()}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}initializeServiceMethods(){const s=this.authToken||h.authToken;if(!s)return void this.errorEvent.emit({errorCode:o.MISSING_PROPS,message:"Missing authToken",severity:r.ERROR});const t={authToken:s,service:new w};this.getQuote=(({authToken:s,service:t})=>async({payload:i,onSuccess:e,onError:o})=>{var c;try{const l=await t.fetchQuote(s,i);if(l.error)return o({error:n(l.error),code:a(null===(c=l.error)||void 0===c?void 0:c.code),severity:r.ERROR});e({quote:l.data})}catch(s){const t=a(null==s?void 0:s.code);return o({error:s.message||s,code:t,severity:r.ERROR})}})(t),this.toggleCoverage=(({authToken:s,service:t})=>async({quoteId:i,payload:e,onSuccess:o,onError:c})=>{var l;try{const h=await t.toggleCoverage(s,i,e);if(h.error)return c({error:n(h.error),code:a(null===(l=h.error)||void 0===l?void 0:l.code),severity:r.ERROR});o({quote:h.data})}catch(s){const t=a(null==s?void 0:s.code);return c({error:s.message||s,code:t,severity:r.ERROR})}})(t)}fetchData(){this.isLoading=!0,this.getQuote({payload:{checkout_id:this.checkoutId||h.checkoutId,policy_type:"season_interruption",primary_identity:{state:this.primaryIdentityState,email:this.primaryIdentityEmailAddress,first_name:this.primaryIdentityFirstName,last_name:this.primaryIdentityLastName,postal_code:this.primaryIdentityPostalCode,country:this.primaryIdentityCountry},policy_attributes:{insurable_amount:this.policyAttributesInsurableAmount,start_date:this.policyAttributesStartDate,end_date:this.policyAttributesEndDate,covered_identity:{first_name:this.coveredIdentityFirstName,last_name:this.coveredIdentityLastName}}},onSuccess:({quote:s})=>{this.quote=s,this.quote.product.description=this.processHTMLContent(this.quote.product.description),this.quote.product.legal_disclaimer=this.processHTMLContent(this.quote.product.legal_disclaimer),y[s.policy_type]=s.accepted,this.isLoading=!1},onError:({error:s,code:t,severity:i})=>{this.isLoading=!1,this.errorEvent.emit({errorCode:t,message:s,severity:i})}})}onChangeHandler(s,t){this.accepted=t,f[this.quote.policy_type]=!1,this.toggleCoverage({quoteId:this.quote.id,payload:{accepted:this.accepted},onSuccess:()=>{this.insuranceUpdated.emit(),y[this.quote.policy_type]=this.accepted},onError:({error:s,code:t,severity:i})=>{this.errorEvent.emit({errorCode:t,message:s,severity:i})}})}get error(){var s;return f[null===(s=this.quote)||void 0===s?void 0:s.policy_type]}render(){var t,i,e,r;return h&&!1===h.insuranceEnabled?(console.warn("[justifi-season-interruption-insurance] Insurance is disabled for this checkout (payment_settings.insurance_payments=false)."),null):s(b,null,this.isLoading?s(T,null):s("div",null,s(j,{text:null===(t=this.quote)||void 0===t?void 0:t.product.title,class:"fs-5 fw-bold pb-3"}),s("small",{part:g,innerHTML:null===(i=this.quote)||void 0===i?void 0:i.product.description}),s("form-control-radio",{label:`Accept coverage for ${p(null===(e=this.quote)||void 0===e?void 0:e.total_cents)}`,name:"opt-in",value:"true",checked:"true"===this.accepted,inputHandler:this.onChangeHandler.bind(this),errorText:this.error?" ":void 0}),s("form-control-radio",{label:"Decline coverage",name:"opt-in",value:"false",checked:"false"===this.accepted,inputHandler:this.onChangeHandler.bind(this),errorText:this.error?" ":void 0}),s("div",{class:"invalid-feedback",style:{display:this.error?"block":"none"},part:_},"Please select an option"),s("small",{part:g,innerHTML:null===(r=this.quote)||void 0===r?void 0:r.product.legal_disclaimer})))}};export{D as justifi_season_interruption_insurance}
1
+ import{h as s,r as t,c as i}from"./p-CV0Pyo1O.js";import{A as e}from"./p-C6Jq8YDT.js";import{C as r,b as o}from"./p-Dqxyi-uK.js";import"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";import{g as a,a as n}from"./p-BhpaUYtS.js";import{J as c}from"./p-BjjKkMO1.js";import{c as l}from"./p-_MjmE9YT.js";import{c as h}from"./p-Fpaf7CLD.js";import{p as d,f as p,r as u,i as v}from"./p-Ds_P-dB8.js";import{v as m,i as y,a as f,H as j}from"./p-x2oNTAWh.js";import{t as _,z as g}from"./p-Bu7gdOaV.js";import{S as T}from"./p-05AWudQe.js";import"./p-CZfYo5-1.js";import{S as C}from"./p-eBK-iWrz.js";import"./p-B4vLfYnZ.js";import"./p-DgTOxu8x.js";import"./p-BC9n8nB2.js";import"./p-DEx8fQeW.js";import"./p-HXpYMWUU.js";const k=e();class b{async fetchQuote(s,t){return k.post({endpoint:"insurance/quotes",body:t,authToken:s})}async toggleCoverage(s,t,i){return k.post({endpoint:`insurance/quotes/${t}/toggle`,body:i,authToken:s})}}const w=()=>s("div",{class:"row gap-3"},s("div",{class:"col-12"},s(C,{width:"35%",height:"30px"})),s("div",{class:"col-12"},s(C,{width:"70%"})),s("div",{class:"col-12"},s(C,{width:"40%"})),s("div",{class:"col-12"},s(C,{width:"40%"})),s("div",{class:"col-12"},s(C,{width:"100%"})),s("div",{class:"col-12"},s(C,{width:"80%"}))),x=class{constructor(s){t(this,s),this.insuranceUpdated=i(this,"insurance-updated",7),this.errorEvent=i(this,"error-event",7),this.isLoading=!0}async validate(){return m()}processHTMLContent(s){return d(s,[s=>u(s,"style"),s=>v(s,"a","part",_),s=>v(s,"p","part",_)])}componentWillLoad(){l(),this.analytics=new c(this),this.initializeServiceMethods(),this.getQuote&&this.fetchData()}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}initializeServiceMethods(){const s=this.authToken||h.authToken;if(!s)return void this.errorEvent.emit({errorCode:o.MISSING_PROPS,message:"Missing authToken",severity:r.ERROR});const t={authToken:s,service:new b};this.getQuote=(({authToken:s,service:t})=>async({payload:i,onSuccess:e,onError:o})=>{var c;try{const l=await t.fetchQuote(s,i);if(l.error)return o({error:n(l.error),code:a(null===(c=l.error)||void 0===c?void 0:c.code),severity:r.ERROR});e({quote:l.data})}catch(s){const t=a(null==s?void 0:s.code);return o({error:s.message||s,code:t,severity:r.ERROR})}})(t),this.toggleCoverage=(({authToken:s,service:t})=>async({quoteId:i,payload:e,onSuccess:o,onError:c})=>{var l;try{const h=await t.toggleCoverage(s,i,e);if(h.error)return c({error:n(h.error),code:a(null===(l=h.error)||void 0===l?void 0:l.code),severity:r.ERROR});o({quote:h.data})}catch(s){const t=a(null==s?void 0:s.code);return c({error:s.message||s,code:t,severity:r.ERROR})}})(t)}fetchData(){this.isLoading=!0,this.getQuote({payload:{checkout_id:this.checkoutId||h.checkoutId,policy_type:"season_interruption",primary_identity:{state:this.primaryIdentityState,email:this.primaryIdentityEmailAddress,first_name:this.primaryIdentityFirstName,last_name:this.primaryIdentityLastName,postal_code:this.primaryIdentityPostalCode,country:this.primaryIdentityCountry},policy_attributes:{insurable_amount:this.policyAttributesInsurableAmount,start_date:this.policyAttributesStartDate,end_date:this.policyAttributesEndDate,covered_identity:{first_name:this.coveredIdentityFirstName,last_name:this.coveredIdentityLastName}}},onSuccess:({quote:s})=>{this.quote=s,this.quote.product.description=this.processHTMLContent(this.quote.product.description),this.quote.product.legal_disclaimer=this.processHTMLContent(this.quote.product.legal_disclaimer),y[s.policy_type]=s.accepted,this.isLoading=!1},onError:({error:s,code:t,severity:i})=>{this.isLoading=!1,this.errorEvent.emit({errorCode:t,message:s,severity:i})}})}onChangeHandler(s,t){this.accepted=t,f[this.quote.policy_type]=!1,this.toggleCoverage({quoteId:this.quote.id,payload:{accepted:this.accepted},onSuccess:()=>{this.insuranceUpdated.emit(),y[this.quote.policy_type]=this.accepted},onError:({error:s,code:t,severity:i})=>{this.errorEvent.emit({errorCode:t,message:s,severity:i})}})}get error(){var s;return f[null===(s=this.quote)||void 0===s?void 0:s.policy_type]}render(){var t,i,e,r;return h&&!1===h.insuranceEnabled?(console.warn("[justifi-season-interruption-insurance] Insurance is disabled for this checkout (payment_settings.insurance_payments=false)."),null):s(T,null,this.isLoading?s(w,null):s("div",null,s(j,{text:null===(t=this.quote)||void 0===t?void 0:t.product.title,class:"fs-5 fw-bold pb-3"}),s("small",{part:_,innerHTML:null===(i=this.quote)||void 0===i?void 0:i.product.description}),s("form-control-radio",{label:`Accept coverage for ${p(null===(e=this.quote)||void 0===e?void 0:e.total_cents)}`,name:"opt-in",value:"true",checked:"true"===this.accepted,inputHandler:this.onChangeHandler.bind(this),errorText:this.error?" ":void 0}),s("form-control-radio",{label:"Decline coverage",name:"opt-in",value:"false",checked:"false"===this.accepted,inputHandler:this.onChangeHandler.bind(this),errorText:this.error?" ":void 0}),s("div",{class:"invalid-feedback",style:{display:this.error?"block":"none"},part:g},"Please select an option"),s("small",{part:_,innerHTML:null===(r=this.quote)||void 0===r?void 0:r.product.legal_disclaimer})))}};export{x as justifi_season_interruption_insurance}
@@ -0,0 +1 @@
1
+ import{r as e,h as a}from"./p-CV0Pyo1O.js";import{l as t}from"./p-OeJ-3w3l.js";import"./p-B4vLfYnZ.js";import{c as s,a as l}from"./p-Ds_P-dB8.js";import{I as d,a as c}from"./p-Dqxyi-uK.js";import"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";import{f as i,p as r,c as o}from"./p-CArdj6i_.js";import{f as p,a as f}from"./p-Bu7gdOaV.js";import{S as b}from"./p-05AWudQe.js";import"./p-CZfYo5-1.js";import"./p-BFTU3MAI.js";import"./p-DgTOxu8x.js";import"./p-HXpYMWUU.js";const u=class{constructor(a){e(this,a),this.setParamsOnChange=(e,a)=>{i[e]=a},this.handleDateInput=(e,a)=>{const t=s(a,{setExactTime:!0});this.setParamsOnChange(e,t)}}componentWillLoad(){this.debouncedSetParamsOnChange=t.debounce(this.setParamsOnChange,300),Object.entries({status:this.checkoutStatus,payment_mode:this.paymentMode,checkout_id:this.checkoutId,successful_payment_id:this.successfulPaymentId,created_after:this.createdAfter,created_before:this.createdBefore}).forEach((([e,a])=>{a&&(r[e]=a)}))}get checkoutStatusOptions(){return[{label:"All",value:""},{label:"Created",value:d.created},{label:"Completed",value:d.completed},{label:"Attempted",value:d.attempted},{label:"Expired",value:d.expired}]}get checkoutPaymentModeOptions(){return[{label:"All",value:""},{label:"E-commerce",value:c.ecom},{label:"BNPL",value:c.bnpl},{label:"Apple Pay",value:c.apple_pay},{label:"Paypal",value:c.paypal},{label:"Venmo",value:c.venmo}]}render(){const e=Object.assign({},i);return a(b,{key:"eca6b148bbea71d2ae0169aa67251ab87cadc1df"},a("table-filters-menu",{key:"87af760346bd028aca6fb5f29ad9d16d1344e0e5",params:e,clearParams:o,part:p},a("div",{key:"63a139d5d7f213bd0b7496f8076b2c95a36860a3",class:"grid-cols-2 gap-3 p-1"},a("div",{key:"ae268b747aa817dee8e8c762132008d59ed6cb6f",class:"p-2"},a("form-control-text",{key:"a8a0139e9a8671c0a74f7bb5cb7d40cc5c76f9e8",name:"checkout_id",label:"Checkout ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.checkoutId||i.checkout_id,disabled:!!this.checkoutId,part:f})),a("div",{key:"5fbd8588d9f64254182cf08689dda0c705755e03",class:"p-2"},a("form-control-text",{key:"6d70a400b4936fdf3d35c00a3b95303bc3e79688",name:"successful_payment_id",label:"Successful Payment ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.successfulPaymentId||i.successful_payment_id,disabled:!!this.successfulPaymentId,part:f})),a("div",{key:"96a3b1bf5eaa46dcda3f01de50d991a14cb6f455",class:"p-2"},a("form-control-select",{key:"06572e5d0528cfc0e36c6d95210ec6bc6db119ab",name:"status",label:"Status",options:this.checkoutStatusOptions,inputHandler:this.setParamsOnChange,defaultValue:this.checkoutStatus||i.status||"",disabled:!!this.checkoutStatus,part:f})),a("div",{key:"81cb0976145496cbb991b2b20d8acaee24238f65",class:"p-2"},a("form-control-select",{key:"15db898c3fac34c2ac0262d17c07ea811ddbebd7",name:"payment_mode",label:"Payment Mode",options:this.checkoutPaymentModeOptions,inputHandler:this.setParamsOnChange,defaultValue:this.paymentMode||i.payment_mode||"",disabled:!!this.paymentMode,part:f})),a("div",{key:"cbae593e372d8fcb648fff5503ac6495e75c5f2e",class:"p-2"},a("form-control-date",{key:"06f605f92582dbf1ea654a4c14ea0089932e9aea",name:"created_after",label:"Created After",inputHandler:this.handleDateInput,defaultValue:l(this.createdAfter,{showInputDateTime:!0})||l(i.created_after,{showInputDateTime:!0}),showTime:!0,disabled:!!this.createdAfter,part:f})),a("div",{key:"278400d92ded9bff800e4b2142434c046d1be397",class:"p-2"},a("form-control-date",{key:"53a98e350078d690df0985627ac1a6f0e39f74ad",name:"created_before",label:"Created Before",inputHandler:this.handleDateInput,defaultValue:l(this.createdBefore,{showInputDateTime:!0})||l(i.created_before,{showInputDateTime:!0}),showTime:!0,disabled:!!this.createdBefore,part:f})))))}};export{u as justifi_checkouts_list_filters}
@@ -1 +1 @@
1
- import{h as t,r as e,c as s}from"./p-CV0Pyo1O.js";import{S as a}from"./p-05AWudQe.js";import{T as r,a as i,b as o,c as d,d as h,e as n,f as c,g as p,h as l,i as m,j as f,k as u,l as b}from"./p-DZr0wLGh.js";import{T as g}from"./p-CZfYo5-1.js";import{c as y}from"./p-ByQMBEDC.js";import{a6 as v,a7 as w}from"./p-Bu7gdOaV.js";import{a as j}from"./p-Ds_P-dB8.js";import"./p-B4vLfYnZ.js";import{f as T,p as C,C as k,b as _}from"./p-D6uhYbLo.js";import{p as O}from"./p-CLHwhyvu.js";import"./p-DaDqgDrb.js";import{B as D,a as B}from"./p-Dz8KJn2G.js";import"./p-HXpYMWUU.js";import{g as S,a as P}from"./p-CLq3Og7o.js";import{A as x}from"./p-Bl00tHyn.js";import{J as I}from"./p-BHaO3c8W.js";import{o as L,g as q}from"./p-DUtecvro.js";import"./p-MPer3Rw7.js";import"./p-Dn9_7aQh.js";import"./p-DgTOxu8x.js";const A={created_at:()=>t("th",{part:v,scope:"col",title:"The date and time the order was created"},"Created At"),updated_at:()=>t("th",{part:v,scope:"col",title:"The date and time the order was last updated"},"Updated At"),order_status:()=>t("th",{part:v,scope:"col",title:"The current status of the order"},"Order Status"),business_id:()=>t("th",{part:v,scope:"col",title:"The business ID associated with the order"},"Business ID"),company_name:()=>t("th",{part:v,scope:"col",title:"The business name associated with the order"},"Business Name"),provider:()=>t("th",{part:v,scope:"col",title:"The provider associated with the order"},"Provider"),order_type:()=>t("th",{part:v,scope:"col",title:"The type of order"},"Order Type"),quantity:()=>t("th",{part:v,scope:"col",title:"The number of terminals associated with the order"},"Order Quantity")},E={created_at:(e,s)=>t("td",{part:w(s)},t("div",{class:"fw-bold"},j(e.created_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},j(e.created_at,{showTime:!0}))),updated_at:(e,s)=>t("td",{part:w(s)},t("div",{class:"fw-bold"},j(e.updated_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},j(e.updated_at,{showTime:!0}))),order_status:(e,s)=>t("td",{part:w(s)},t(B,Object.assign({},{submitted:{variant:D.PRIMARY,title:"This order is submitted",text:"Submitted"},completed:{variant:D.SUCCESS,title:"This order has been completed",text:"Completed"},created:{variant:D.SECONDARY,title:"This order is created",text:"Created"},in_progress:{variant:D.PRIMARY,title:"This order is in progress",text:"In Progress"},on_hold:{variant:D.WARNING,title:"This order is on hold",text:"On Hold"},canceled:{variant:D.DANGER,title:"This order is canceled",text:"Canceled"}}[e.order_status]))),business_id:(e,s)=>t("td",{part:w(s)},e.business_id),company_name:(e,s)=>t("td",{part:w(s)},e.company_name),provider:(e,s)=>t("td",{part:w(s)},e.provider),order_type:(e,s)=>{let a;return e.order_type===T.boardingOnly?a="Boarding Only":e.order_type===T.boardingShipping&&(a="Boarding & Shipping"),t("td",{part:w(s)},a)},quantity:(e,s)=>t("td",{part:w(s)},e.terminals.length)},H=x();class M{async fetchTerminalOrders(t,e,s){return H.get({endpoint:"terminals/orders",params:s,headers:{account:t},authToken:e})}}const Q=class{constructor(t){e(this,t),this.clickEvent=s(this,"click-event",7),this.errorEvent=s(this,"error-event",7),this.columns="created_at,updated_at,order_status,quantity",this.terminalOrders=[],this.loading=!0,this.paging=O,this.pagingParams={},this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:g.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:g.next})},this.rowClickHandler=t=>{const e=t.target.closest("tr").dataset.rowEntityId;if(!e)return;const s=this.terminalOrders.find((t=>t.id===e));this.clickEvent.emit({name:g.row,data:s})}}componentWillLoad(){y(),this.analytics=new I(this),this.terminalOrdersTable=new r(this.terminalOrders,this.columns,A,E),this.initializeGetData(),this.getTerminalOrders&&this.fetchData(),L("set",(()=>{this.pagingParams={}})),L("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}authPropChanged(){this.initializeGetData(),this.getTerminalOrders&&this.fetchData()}pagingOrColumnsChanged(){this.getTerminalOrders&&this.fetchData()}initializeGetData(){this.accountId&&this.authToken?this.getTerminalOrders=(({id:t,authToken:e,service:s})=>async({params:a,onSuccess:r,onError:i,final:o})=>{var d,h;try{const o=await s.fetchTerminalOrders(t,e,a);if(o.error)return i({error:P(o.error),code:S(null===(h=o.error)||void 0===h?void 0:h.code),severity:k.ERROR});{const t=Object.assign({},o.page_info);r({terminalOrders:(null===(d=o.data)||void 0===d?void 0:d.map((t=>new C(t))))||[],pagingInfo:t})}}catch(t){const e=S(null==t?void 0:t.code);return i({error:t.message||t,code:e,severity:k.ERROR})}finally{o()}})({id:this.accountId,authToken:this.authToken,service:new M}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:_.MISSING_PROPS,message:this.errorMessage,severity:k.ERROR}))}fetchData(){this.getTerminalOrders&&(this.loading=!0,this.getTerminalOrders({params:this.terminalOrderParams,onSuccess:async({terminalOrders:t,pagingInfo:e})=>{this.terminalOrders=t,this.paging=e,this.terminalOrdersTable.collectionData=this.terminalOrders},onError:({error:t,code:e,severity:s})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:e,message:t,severity:s})},final:()=>{this.loading=!1}}))}get terminalOrderParams(){const t=q();return Object.assign(Object.assign({},t),this.pagingParams)}get entityId(){return this.terminalOrders.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.terminalOrdersTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return t(a,{key:"7b803503d5cf3086abd05e1f4aa9579eb9f59b88"},t(i,{key:"455a2d115788de71fb27f172f404e5702a089484"},t(o,{key:"fe67da8a9c8f8de5025bee2ea2898da4e31d2b20"},t(d,{key:"c6f04a3a47e2a2401f83d2644cf53574c565dd28"},t(h,{key:"afeb4c45e315337faf683ec96d4602a7525efe2f"},this.terminalOrdersTable.columnData.map((t=>t)))),t(n,{key:"16e226273ab43d6a2d818c2db51752215d215749"},t(c,{key:"668ac3b5f4fd091e42d1c835a002787a70924db1",columnSpan:this.terminalOrdersTable.columnKeys.length,isLoading:this.loading}),t(p,{key:"d154e795f3f202b7a7adb90ef375a1b79e45469b",isEmpty:this.showEmptyState,columnSpan:this.terminalOrdersTable.columnKeys.length}),t(l,{key:"a2b21c0335d8d538194329cbc3938f70b0ee5ecc",columnSpan:this.terminalOrdersTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.terminalOrdersTable.rowData.map(((e,s)=>t(m,{"data-test-id":"table-row","data-row-entity-id":this.entityId[s],onClick:this.rowClickHandler},e)))),this.paging&&t(f,{key:"ed6c4c9993aa5db0f39fc04f30c0f5432dfb922e"},t(u,{key:"0887b03bf1109312a2531ef832175ac01fe88270"},t(b,{key:"913efcfe5f17b1da60002fc87a7de42940e5abe3",colSpan:this.terminalOrdersTable.columnData.length},t("pagination-menu",{key:"0149a80b7f5173f5426fe50a610a8554052158e8",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{accountId:["authPropChanged"],authToken:["authPropChanged"],pagingParams:["pagingOrColumnsChanged"],columns:["pagingOrColumnsChanged"]}}};export{Q as justifi_terminal_orders_list}
1
+ import{h as t,r as e,c as s}from"./p-CV0Pyo1O.js";import{S as a}from"./p-05AWudQe.js";import{T as r,a as i,b as o,c as d,d as h,e as n,f as c,g as p,h as l,i as f,j as m,k as u,l as b}from"./p-DZr0wLGh.js";import{T as y}from"./p-CZfYo5-1.js";import{c as g}from"./p-_MjmE9YT.js";import{a6 as v,a7 as j}from"./p-Bu7gdOaV.js";import{a as w}from"./p-Ds_P-dB8.js";import"./p-B4vLfYnZ.js";import{f as T,p as C,C as k,b as _}from"./p-Dqxyi-uK.js";import{p as O}from"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";import{B as D,a as S}from"./p-Dz8KJn2G.js";import"./p-HXpYMWUU.js";import{g as B,a as x}from"./p-BhpaUYtS.js";import{A as P}from"./p-C6Jq8YDT.js";import{J as I}from"./p-BjjKkMO1.js";import{o as Y,g as q}from"./p-DUtecvro.js";import"./p-MPer3Rw7.js";import"./p-BC9n8nB2.js";import"./p-DgTOxu8x.js";const A={created_at:()=>t("th",{part:v,scope:"col",title:"The date and time the order was created"},"Created At"),updated_at:()=>t("th",{part:v,scope:"col",title:"The date and time the order was last updated"},"Updated At"),order_status:()=>t("th",{part:v,scope:"col",title:"The current status of the order"},"Order Status"),business_id:()=>t("th",{part:v,scope:"col",title:"The business ID associated with the order"},"Business ID"),company_name:()=>t("th",{part:v,scope:"col",title:"The business name associated with the order"},"Business Name"),provider:()=>t("th",{part:v,scope:"col",title:"The provider associated with the order"},"Provider"),order_type:()=>t("th",{part:v,scope:"col",title:"The type of order"},"Order Type"),quantity:()=>t("th",{part:v,scope:"col",title:"The number of terminals associated with the order"},"Order Quantity")},E={created_at:(e,s)=>t("td",{part:j(s)},t("div",{class:"fw-bold"},w(e.created_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},w(e.created_at,{showTime:!0}))),updated_at:(e,s)=>t("td",{part:j(s)},t("div",{class:"fw-bold"},w(e.updated_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},w(e.updated_at,{showTime:!0}))),order_status:(e,s)=>t("td",{part:j(s)},t(S,Object.assign({},{submitted:{variant:D.PRIMARY,title:"This order is submitted",text:"Submitted"},completed:{variant:D.SUCCESS,title:"This order has been completed",text:"Completed"},created:{variant:D.SECONDARY,title:"This order is created",text:"Created"},in_progress:{variant:D.PRIMARY,title:"This order is in progress",text:"In Progress"},on_hold:{variant:D.WARNING,title:"This order is on hold",text:"On Hold"},canceled:{variant:D.DANGER,title:"This order is canceled",text:"Canceled"}}[e.order_status]))),business_id:(e,s)=>t("td",{part:j(s)},e.business_id),company_name:(e,s)=>t("td",{part:j(s)},e.company_name),provider:(e,s)=>t("td",{part:j(s)},e.provider),order_type:(e,s)=>{let a;return e.order_type===T.boardingOnly?a="Boarding Only":e.order_type===T.boardingShipping&&(a="Boarding & Shipping"),t("td",{part:j(s)},a)},quantity:(e,s)=>t("td",{part:j(s)},e.terminals.length)},L=P();class M{async fetchTerminalOrders(t,e,s){return L.get({endpoint:"terminals/orders",params:s,headers:{account:t},authToken:e})}}const U=class{constructor(t){e(this,t),this.clickEvent=s(this,"click-event",7),this.errorEvent=s(this,"error-event",7),this.columns="created_at,updated_at,order_status,quantity",this.terminalOrders=[],this.loading=!0,this.paging=O,this.pagingParams={},this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:y.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:y.next})},this.rowClickHandler=t=>{const e=t.target.closest("tr").dataset.rowEntityId;if(!e)return;const s=this.terminalOrders.find((t=>t.id===e));this.clickEvent.emit({name:y.row,data:s})}}componentWillLoad(){g(),this.analytics=new I(this),this.terminalOrdersTable=new r(this.terminalOrders,this.columns,A,E),this.initializeGetData(),this.getTerminalOrders&&this.fetchData(),Y("set",(()=>{this.pagingParams={}})),Y("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}authPropChanged(){this.initializeGetData(),this.getTerminalOrders&&this.fetchData()}pagingOrColumnsChanged(){this.getTerminalOrders&&this.fetchData()}initializeGetData(){this.accountId&&this.authToken?this.getTerminalOrders=(({id:t,authToken:e,service:s})=>async({params:a,onSuccess:r,onError:i,final:o})=>{var d,h;try{const o=await s.fetchTerminalOrders(t,e,a);if(o.error)return i({error:x(o.error),code:B(null===(h=o.error)||void 0===h?void 0:h.code),severity:k.ERROR});{const t=Object.assign({},o.page_info);r({terminalOrders:(null===(d=o.data)||void 0===d?void 0:d.map((t=>new C(t))))||[],pagingInfo:t})}}catch(t){const e=B(null==t?void 0:t.code);return i({error:t.message||t,code:e,severity:k.ERROR})}finally{o()}})({id:this.accountId,authToken:this.authToken,service:new M}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:_.MISSING_PROPS,message:this.errorMessage,severity:k.ERROR}))}fetchData(){this.getTerminalOrders&&(this.loading=!0,this.getTerminalOrders({params:this.terminalOrderParams,onSuccess:async({terminalOrders:t,pagingInfo:e})=>{this.terminalOrders=t,this.paging=e,this.terminalOrdersTable.collectionData=this.terminalOrders},onError:({error:t,code:e,severity:s})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:e,message:t,severity:s})},final:()=>{this.loading=!1}}))}get terminalOrderParams(){const t=q();return Object.assign(Object.assign({},t),this.pagingParams)}get entityId(){return this.terminalOrders.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.terminalOrdersTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return t(a,{key:"ba50fc1b4bd66163d2ed0c5f98a6bbe18d991ddb"},t(i,{key:"b3203a5765b3ef1e564bdee4e0a6ad2603ac7c09"},t(o,{key:"efd22eb95810e22ac977dc6d323dc5b807110a95"},t(d,{key:"2ded9affdda7af379ffbbd76fa05226389de0dd0"},t(h,{key:"ca48cefe5d497f0b6cbe83f498939f4d1232a45b"},this.terminalOrdersTable.columnData.map((t=>t)))),t(n,{key:"d7a38ad880b6e9334bf72d3fa8cb6eb69b0032d6"},t(c,{key:"f4bc0a54a68f29f82a8f7a1c34a5d29a80f16f65",columnSpan:this.terminalOrdersTable.columnKeys.length,isLoading:this.loading}),t(p,{key:"7a0f199dd9640efc16578fe106d5d16cf8872e5a",isEmpty:this.showEmptyState,columnSpan:this.terminalOrdersTable.columnKeys.length}),t(l,{key:"cf1bf5094f0769f0a4d81c730649769cd0870fe3",columnSpan:this.terminalOrdersTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.terminalOrdersTable.rowData.map(((e,s)=>t(f,{"data-test-id":"table-row","data-row-entity-id":this.entityId[s],onClick:this.rowClickHandler},e)))),this.paging&&t(m,{key:"cd9dee54cd5f27a0ae9c56771f6c99e0ea2ff125"},t(u,{key:"877284dd9926a1889fdf175ce0bf5db841fd9066"},t(b,{key:"2558454e5a5e3eb340170d6af43ad24c12aebdb8",colSpan:this.terminalOrdersTable.columnData.length},t("pagination-menu",{key:"8cf390bed552045b9950c4fcfe80f70e308d2cee",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{accountId:["authPropChanged"],authToken:["authPropChanged"],pagingParams:["pagingOrColumnsChanged"],columns:["pagingOrColumnsChanged"]}}};export{U as justifi_terminal_orders_list}
@@ -0,0 +1 @@
1
+ import{r as t,c as s,h as e,H as i}from"./p-CV0Pyo1O.js";import{P as a,Q as h,R as r,S as o,T as f,x as c}from"./p-Bu7gdOaV.js";const d=class{constructor(e){t(this,e),this.formControlInput=s(this,"formControlInput",7),this.formControlBlur=s(this,"formControlBlur",7),this.isFocused=!1,this.inputHandler=()=>{},this.disabled=!1,this.errorText="",this.handleFormControlInput=t=>{const s=t.target.getAttribute("name");this.inputHandler(s,this.value),this.formControlInput.emit({name:s,value:this.value})}}get part(){return this.errorText?a:this.isFocused&&this.checked?h:this.checked?r:this.isFocused?o:f}render(){return e(i,{key:"ffbfee5a2bffb9dc2d6c2489faa9daa60a36604e",class:"form-group d-flex flex-column"},e("div",{key:"93e4d129fd0a67d6b6f021b2af4e816683f8b926",class:"form-check"},e("input",{key:"e100d93d9750db95262e63aaaf75ff413dbc0928",ref:t=>this.radioElement=t,type:"radio",id:`${this.name}-${this.value}`,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onChange:this.handleFormControlInput,part:this.part,class:this.errorText?"form-check-input is-invalid":"form-check-input",disabled:this.disabled,value:this.value,checked:this.checked}),e("label",{key:"14a8bb0f48683405413245f572d3186d8948de41",class:"form-check-label",htmlFor:`${this.name}-${this.value}`,part:c},this.label)),e("form-control-help-text",{key:"ca497838c5f52e0c9a528c9503b2e17785239d23",helpText:this.helpText,name:this.name}),e("form-control-error-text",{key:"6f1f5d3ac8e1fe55d9c676f5e5f96633de777d01",errorText:this.errorText,name:this.name}))}};export{d as form_control_radio}
@@ -1 +1 @@
1
- import{h as t,r as s,c as e}from"./p-CV0Pyo1O.js";import{k as a,C as i,b as o}from"./p-D6uhYbLo.js";import{J as r}from"./p-BHaO3c8W.js";import{c as h}from"./p-ByQMBEDC.js";import{P as c}from"./p-FWuMPTxn.js";import"./p-B4vLfYnZ.js";import"./p-HXpYMWUU.js";import{p as n}from"./p-CLHwhyvu.js";import"./p-DaDqgDrb.js";import{g as p,a as d}from"./p-CLq3Og7o.js";import{M as u,m}from"./p-DZQBPUfH.js";import{m as l,S as f}from"./p-rznJBkm3.js";import{S as y}from"./p-05AWudQe.js";import{T as b,a as g,b as v,c as j,d as _,e as k,f as C,g as w,h as S,i as D,j as P,k as T,l as O}from"./p-DZr0wLGh.js";import{T as A}from"./p-CZfYo5-1.js";import{a as B}from"./p-Ds_P-dB8.js";import{a6 as E,a7 as I}from"./p-Bu7gdOaV.js";import{o as L,g as x}from"./p-CGnRD4wF.js";import"./p-Dn9_7aQh.js";import"./p-Bl00tHyn.js";import"./p-DgTOxu8x.js";import"./p-Dz8KJn2G.js";import"./p-MPer3Rw7.js";const M={created_at:()=>t("th",{part:E,scope:"col",title:"The date the payout was deposited"},"Created"),sub_account_name:()=>t("th",{part:E,scope:"col",title:"The sub account associated with the payout"},"Sub Account"),payments_total:()=>t("th",{part:E,scope:"col",title:"The total payments amount associated with the payout"},"Payments"),refunds_total:()=>t("th",{part:E,scope:"col",title:"The total refunds amount associated with the payout"},"Refunds"),fees_total:()=>t("th",{part:E,scope:"col",title:"The total fees amount associated with the payout"},"Fees"),other_total:()=>t("th",{part:E,scope:"col",title:"The total other amount"},"Other"),amount:()=>t("th",{part:E,scope:"col",title:"The total amount of the payout"},"Amount"),status:()=>t("th",{part:E,scope:"col",title:"The real-time status of each payout"},"Status"),csv:()=>t("th",{part:E,scope:"col",title:"Export CSV"})},z=class{constructor(t){s(this,t),this.errorEvent=e(this,"error-event",7),this.clickEvent=e(this,"click-event",7),this.errorMessage=null,this.payouts=[],this.subAccounts=[],this.loading=!0,this.paging=n,this.pagingParams={},this.columns="created_at,amount,status,payments_total,refunds_total,fees_total,other_total,csv",this.downloadCSV=t=>{this.getPayoutCSV({payoutId:t,onError:()=>{this.errorEvent.emit({errorCode:o.FETCH_ERROR,message:"Failed to download CSV",severity:i.ERROR})}})},this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:A.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:A.next})},this.rowClickHandler=t=>{const s=t.target.closest("tr"),e=s.dataset.rowEntityId;if(!e)return;if(s.querySelector("a")===t.target)return;const a=this.payouts.find((t=>t.id===e));this.clickEvent.emit({name:A.row,data:a})}}componentWillLoad(){var s;h(),this.analytics=new r(this),this.initializeGetData(),this.payoutsTable=new b(this.payouts,this.columns,M,(s=this.downloadCSV,{created_at:(s,e)=>t("td",{part:I(e)},t("div",{class:"fw-bold"},B(s.created_at,{showDisplayDate:!0}))),sub_account_name:(s,e)=>t("td",{part:I(e)},s.sub_account_name),payments_total:(s,e)=>t("td",{part:I(e)},s.formattedPaymentAmount(s.payments_total)),refunds_total:(s,e)=>t("td",{part:I(e)},s.formattedPaymentAmount(s.refunds_total)),fees_total:(s,e)=>t("td",{part:I(e)},s.formattedPaymentAmount(s.fees_total)),other_total:(s,e)=>t("td",{part:I(e)},s.formattedPaymentAmount(s.other_total)),amount:(s,e)=>t("td",{part:I(e)},s.formattedPaymentAmount(s.amount)),status:(s,e)=>t("td",{part:I(e)},u(s.status)),csv:(e,a)=>t("td",{part:I(a)},t("a",{href:"#",onClick:t=>{t.preventDefault(),s(e.id)}},"CSV"))})),this.getPayouts&&this.getSubAccounts&&this.fetchData(),L("set",(()=>{this.pagingParams={}})),L("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetData()}updateOnPropChange(){this.fetchData()}initializeGetData(){this.initializePayoutsServices(),this.initializeGetSubAccounts()}initializePayoutsServices(){if(this.accountId&&this.authToken){const t={id:this.accountId,authToken:this.authToken,service:new c};this.getPayouts=(({id:t,authToken:s,service:e})=>async({params:o,onSuccess:r,onError:h})=>{var c,n;try{const u=await e.fetchPayouts(t,s,o);if(u.error)return h({error:d(u.error),code:p(null===(n=u.error)||void 0===n?void 0:n.code),severity:i.ERROR});{const t=Object.assign({},u.page_info);r({payouts:(null===(c=u.data)||void 0===c?void 0:c.map((t=>new a(t))))||[],pagingInfo:t})}}catch(t){const s=p(null==t?void 0:t.code);return h({error:t.message||t,code:s,severity:i.ERROR})}})(t),this.getPayoutCSV=m(t)}else this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:o.MISSING_PROPS,message:this.errorMessage,severity:i.ERROR})}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=l({primaryAccountId:this.accountId,authToken:this.authToken,service:new f}))}fetchData(){this.loading=!0,this.getPayouts({params:this.payoutParams,onSuccess:({payouts:t,pagingInfo:s})=>{this.payouts=t,this.paging=s,this.payoutsTable.collectionData=this.payouts,this.payoutsTable.columnKeys.includes("sub_account_name")?this.fetchSubAccounts():this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}async fetchSubAccounts(){this.getSubAccounts({params:this.subAccountParams,onSuccess:({subAccounts:t})=>{this.subAccounts=t,this.payouts=this.payouts.map((t=>{var s;return t.sub_account_name=null===(s=this.subAccounts.find((s=>s.id===t.account_id)))||void 0===s?void 0:s.name,t})),this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}get payoutParams(){const t=x();return Object.assign(Object.assign({},t),this.pagingParams)}get subAccountParams(){const t=this.payouts.map((t=>t.account_id));return{sub_account_id:[...new Set(t)].join(",")}}get entityId(){return this.payouts.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.payoutsTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return t(y,{key:"5ea168d699ad120a1edc89d53a93e9a7132e8649"},t(g,{key:"909b379dc668dfe2c2eda85116fe5e36c268a007"},t(v,{key:"1d50aae5d4984dac6986852ba4c735e384738002"},t(j,{key:"f240bb7a39c41cf7d1a52fca286747133aa45139"},t(_,{key:"e557dc2eab47cfdf483fc2d74c149b75d9d63932"},this.payoutsTable.columnData.map((t=>t)))),t(k,{key:"8c9c206ebb7349c8c3dad8e06339f180282d0a5d"},t(C,{key:"63dd3b915b845c2df711d6a0ec3e9a4f07925fc3",columnSpan:this.payoutsTable.columnKeys.length,isLoading:this.loading}),t(w,{key:"7ae4683df6aef24693f309340abb9cf315a9b848",isEmpty:this.showEmptyState,columnSpan:this.payoutsTable.columnKeys.length}),t(S,{key:"4b979bc97e74301f34139edc423591b666f1b18c",columnSpan:this.payoutsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.payoutsTable.rowData.map(((s,e)=>t(D,{"data-test-id":"table-row","data-row-entity-id":this.entityId[e],onClick:this.rowClickHandler},s)))),this.paging&&t(P,{key:"0c46552b9ad13d6e1c32964d474a3c6377c195a2"},t(T,{key:"0ae301fcc846334aa477ec590ab937d98e9f8483"},t(O,{key:"f6f892e5bdbcfd26155a4353e3dc37ee9356a464",colSpan:this.payoutsTable.columnData.length},t("pagination-menu",{key:"54d308ee5a8dee1ca8f43fd02785c62a3a4c7bea",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"],pagingParams:["updateOnPropChange"],getPayouts:["updateOnPropChange"],getSubAccounts:["updateOnPropChange"]}}};export{z as justifi_payouts_list}
1
+ import{h as t,r as s,c as e}from"./p-CV0Pyo1O.js";import{k as a,C as i,b as o}from"./p-Dqxyi-uK.js";import{J as r}from"./p-BjjKkMO1.js";import{c as h}from"./p-_MjmE9YT.js";import{P as c}from"./p-pueOrhXO.js";import"./p-B4vLfYnZ.js";import"./p-HXpYMWUU.js";import{p as n}from"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";import{g as p,a as d}from"./p-BhpaUYtS.js";import{M as u,m}from"./p-Bxc0NRj8.js";import{m as l,S as f}from"./p-iA-Amt2z.js";import{S as y}from"./p-05AWudQe.js";import{T as g,a as b,b as j,c as v,d as _,e as C,f as k,g as w,h as S,i as T,j as O,k as P,l as A}from"./p-DZr0wLGh.js";import{T as D}from"./p-CZfYo5-1.js";import{a as E}from"./p-Ds_P-dB8.js";import{a6 as B,a7 as x}from"./p-Bu7gdOaV.js";import{o as I,g as Y}from"./p-CGnRD4wF.js";import"./p-BC9n8nB2.js";import"./p-C6Jq8YDT.js";import"./p-DgTOxu8x.js";import"./p-Dz8KJn2G.js";import"./p-MPer3Rw7.js";const G={created_at:()=>t("th",{part:B,scope:"col",title:"The date the payout was deposited"},"Created"),sub_account_name:()=>t("th",{part:B,scope:"col",title:"The sub account associated with the payout"},"Sub Account"),payments_total:()=>t("th",{part:B,scope:"col",title:"The total payments amount associated with the payout"},"Payments"),refunds_total:()=>t("th",{part:B,scope:"col",title:"The total refunds amount associated with the payout"},"Refunds"),fees_total:()=>t("th",{part:B,scope:"col",title:"The total fees amount associated with the payout"},"Fees"),other_total:()=>t("th",{part:B,scope:"col",title:"The total other amount"},"Other"),amount:()=>t("th",{part:B,scope:"col",title:"The total amount of the payout"},"Amount"),status:()=>t("th",{part:B,scope:"col",title:"The real-time status of each payout"},"Status"),csv:()=>t("th",{part:B,scope:"col",title:"Export CSV"})},M=class{constructor(t){s(this,t),this.errorEvent=e(this,"error-event",7),this.clickEvent=e(this,"click-event",7),this.errorMessage=null,this.payouts=[],this.subAccounts=[],this.loading=!0,this.paging=n,this.pagingParams={},this.columns="created_at,amount,status,payments_total,refunds_total,fees_total,other_total,csv",this.downloadCSV=t=>{this.getPayoutCSV({payoutId:t,onError:()=>{this.errorEvent.emit({errorCode:o.FETCH_ERROR,message:"Failed to download CSV",severity:i.ERROR})}})},this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:D.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:D.next})},this.rowClickHandler=t=>{const s=t.target.closest("tr"),e=s.dataset.rowEntityId;if(!e)return;if(s.querySelector("a")===t.target)return;const a=this.payouts.find((t=>t.id===e));this.clickEvent.emit({name:D.row,data:a})}}componentWillLoad(){var s;h(),this.analytics=new r(this),this.initializeGetData(),this.payoutsTable=new g(this.payouts,this.columns,G,(s=this.downloadCSV,{created_at:(s,e)=>t("td",{part:x(e)},t("div",{class:"fw-bold"},E(s.created_at,{showDisplayDate:!0}))),sub_account_name:(s,e)=>t("td",{part:x(e)},s.sub_account_name),payments_total:(s,e)=>t("td",{part:x(e)},s.formattedPaymentAmount(s.payments_total)),refunds_total:(s,e)=>t("td",{part:x(e)},s.formattedPaymentAmount(s.refunds_total)),fees_total:(s,e)=>t("td",{part:x(e)},s.formattedPaymentAmount(s.fees_total)),other_total:(s,e)=>t("td",{part:x(e)},s.formattedPaymentAmount(s.other_total)),amount:(s,e)=>t("td",{part:x(e)},s.formattedPaymentAmount(s.amount)),status:(s,e)=>t("td",{part:x(e)},u(s.status)),csv:(e,a)=>t("td",{part:x(a)},t("a",{href:"#",onClick:t=>{t.preventDefault(),s(e.id)}},"CSV"))})),this.getPayouts&&this.getSubAccounts&&this.fetchData(),I("set",(()=>{this.pagingParams={}})),I("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetData()}updateOnPropChange(){this.fetchData()}initializeGetData(){this.initializePayoutsServices(),this.initializeGetSubAccounts()}initializePayoutsServices(){if(this.accountId&&this.authToken){const t={id:this.accountId,authToken:this.authToken,service:new c};this.getPayouts=(({id:t,authToken:s,service:e})=>async({params:o,onSuccess:r,onError:h})=>{var c,n;try{const u=await e.fetchPayouts(t,s,o);if(u.error)return h({error:d(u.error),code:p(null===(n=u.error)||void 0===n?void 0:n.code),severity:i.ERROR});{const t=Object.assign({},u.page_info);r({payouts:(null===(c=u.data)||void 0===c?void 0:c.map((t=>new a(t))))||[],pagingInfo:t})}}catch(t){const s=p(null==t?void 0:t.code);return h({error:t.message||t,code:s,severity:i.ERROR})}})(t),this.getPayoutCSV=m(t)}else this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:o.MISSING_PROPS,message:this.errorMessage,severity:i.ERROR})}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=l({primaryAccountId:this.accountId,authToken:this.authToken,service:new f}))}fetchData(){this.loading=!0,this.getPayouts({params:this.payoutParams,onSuccess:({payouts:t,pagingInfo:s})=>{this.payouts=t,this.paging=s,this.payoutsTable.collectionData=this.payouts,this.payoutsTable.columnKeys.includes("sub_account_name")?this.fetchSubAccounts():this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}async fetchSubAccounts(){this.getSubAccounts({params:this.subAccountParams,onSuccess:({subAccounts:t})=>{this.subAccounts=t,this.payouts=this.payouts.map((t=>{var s;return t.sub_account_name=null===(s=this.subAccounts.find((s=>s.id===t.account_id)))||void 0===s?void 0:s.name,t})),this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}get payoutParams(){const t=Y();return Object.assign(Object.assign({},t),this.pagingParams)}get subAccountParams(){const t=this.payouts.map((t=>t.account_id));return{sub_account_id:[...new Set(t)].join(",")}}get entityId(){return this.payouts.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.payoutsTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return t(y,{key:"4cd005fa6c9e95d155cd7a79c49232581c070c14"},t(b,{key:"177a2a96737ca085cbb7399144a75c0d1f4475dc"},t(j,{key:"7140a202ae38a658351184f14530bd5dadce75f5"},t(v,{key:"9bf81a259376cd822593622a1266d2cc03ad6d94"},t(_,{key:"339c82a1e59e594c3353b65745b99e9cbeff9250"},this.payoutsTable.columnData.map((t=>t)))),t(C,{key:"ca06c1cea570eaefa6df729075fac76c9fa7a7e9"},t(k,{key:"f4d4c97961f944625c28e748767e18c0234d148d",columnSpan:this.payoutsTable.columnKeys.length,isLoading:this.loading}),t(w,{key:"c741073dc9d10f85034271d584484d565d6ac0e1",isEmpty:this.showEmptyState,columnSpan:this.payoutsTable.columnKeys.length}),t(S,{key:"56f140df9f6ee94ee49128dba19cca5da3882c61",columnSpan:this.payoutsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.payoutsTable.rowData.map(((s,e)=>t(T,{"data-test-id":"table-row","data-row-entity-id":this.entityId[e],onClick:this.rowClickHandler},s)))),this.paging&&t(O,{key:"5ca01383d201beb41821941e2ec8500c88e0e31a"},t(P,{key:"d929128878a42f208a153680fc70e8f408d9978f"},t(A,{key:"39f8af7ebd1cafee09ed9279d9114ce6f9667d87",colSpan:this.payoutsTable.columnData.length},t("pagination-menu",{key:"83fd64853950a14cd1fe0c31b033aff0f54c014f",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"],pagingParams:["updateOnPropChange"],getPayouts:["updateOnPropChange"],getSubAccounts:["updateOnPropChange"]}}};export{M as justifi_payouts_list}
@@ -1 +1 @@
1
- import{r as e,h as t}from"./p-CV0Pyo1O.js";import"./p-B4vLfYnZ.js";import"./p-HXpYMWUU.js";import{E as o}from"./p-D6uhYbLo.js";import"./p-CLHwhyvu.js";import"./p-DaDqgDrb.js";import"./p-DgTOxu8x.js";import"./p-Ds_P-dB8.js";const a=class{constructor(t){e(this,t)}render(){return t("div",{key:"d0dacb95d07d3e4ca9bc2c9f23b6c490871da4e9",class:"row gy-3"},t("div",{key:"02ed406f38558badf9f591e076b120d09c71f83b",class:"col-12"},t("form-control-file",{key:"11ff1dc68264b9e5aa561ffe19b423abc1a00c78",name:"voided_check",label:"Voided Check",documentType:o.voidedCheck,inputHandler:this.inputHandler,onFileSelected:this.storeFiles,errorText:this.errors.voided_check,multiple:!0})),t("div",{key:"71d26407522a75a54489155566c18af1a64c1417",class:"col-12"},t("form-control-file",{key:"7ea42e03a44c223a5fedc273e94e635e70d54f4b",name:"bank_statement",label:"Bank Statement",documentType:o.bankStatement,inputHandler:this.inputHandler,onFileSelected:this.storeFiles,errorText:this.errors.bank_statement,multiple:!0})))}};export{a as bank_account_document_form_inputs}
1
+ import{r as e,h as t}from"./p-CV0Pyo1O.js";import"./p-B4vLfYnZ.js";import"./p-HXpYMWUU.js";import{E as a}from"./p-Dqxyi-uK.js";import"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";import"./p-DgTOxu8x.js";import"./p-Ds_P-dB8.js";const o=class{constructor(t){e(this,t)}render(){return t("div",{key:"d0dacb95d07d3e4ca9bc2c9f23b6c490871da4e9",class:"row gy-3"},t("div",{key:"02ed406f38558badf9f591e076b120d09c71f83b",class:"col-12"},t("form-control-file",{key:"11ff1dc68264b9e5aa561ffe19b423abc1a00c78",name:"voided_check",label:"Voided Check",documentType:a.voidedCheck,inputHandler:this.inputHandler,onFileSelected:this.storeFiles,errorText:this.errors.voided_check,multiple:!0})),t("div",{key:"71d26407522a75a54489155566c18af1a64c1417",class:"col-12"},t("form-control-file",{key:"7ea42e03a44c223a5fedc273e94e635e70d54f4b",name:"bank_statement",label:"Bank Statement",documentType:a.bankStatement,inputHandler:this.inputHandler,onFileSelected:this.storeFiles,errorText:this.errors.bank_statement,multiple:!0})))}};export{o as bank_account_document_form_inputs}
@@ -1 +1 @@
1
- import{h as s,r as t,c as i}from"./p-CV0Pyo1O.js";import{J as e}from"./p-BHaO3c8W.js";import{C as r,b as o}from"./p-D6uhYbLo.js";import{m as n,b as a}from"./p-B0DHIvEj.js";import{B as h}from"./p-DnLqZpI1.js";import{A as p}from"./p-Bl00tHyn.js";import"./p-CLHwhyvu.js";import{C as l,B as m,e as d}from"./p-DaDqgDrb.js";import{c as u}from"./p-ByQMBEDC.js";import{l as c}from"./p-Ds_P-dB8.js";import{t as v}from"./p-Bu7gdOaV.js";import{S as g}from"./p-05AWudQe.js";import{H as f}from"./p-CZk3i5Tu.js";import"./p-CZfYo5-1.js";import{B as y}from"./p-XYgDHrVL.js";import{P as b}from"./p-B-Ik8b-s.js";import"./p-Dn9_7aQh.js";import"./p-CLq3Og7o.js";import"./p-B4vLfYnZ.js";import"./p-DgTOxu8x.js";import"./p-HXpYMWUU.js";import"./p-eBK-iWrz.js";const j=p();class w{async postProvisioning(s,t,i){return j.post({endpoint:"entities/provisioning",body:{business_id:t,product_category:i},authToken:s})}}const C=()=>s("div",{class:"row gap-3 p-5"},s("div",{class:"col-12"},s(f,{text:"Business Already Provisioned"})),s("div",{class:"col-12",part:v},s("p",null,"We have already received the onboarding information for this business."))),B=()=>s("div",{class:"row gap-3 p5"},s("div",{class:"col-12"},s(f,{text:"You're all set for now"})),s("div",{class:"col-12",part:v},s("p",null,"We're reviewing your information and working on your approval. We'll be in touch to let you know once you've been approved (or if we find anything that needs fixing). Have a good one!"))),k=()=>s("div",{class:"row gap-3 p-5"},s("div",{class:"col-12"},s(f,{text:"Something went wrong"})),s("div",{class:"col-12",part:v},s("p",null,"There was an error submitting the provisioning. Your progress has been saved — please try again later or contact the support team."))),D=class{constructor(s){t(this,s),this.clickEvent=i(this,"click-event",7),this.errorEvent=i(this,"error-event",7),this.submitEvent=i(this,"submit-event",7),this.loading=!1,this.businessLoading=!0,this.businessProvisioned=!1,this.formSubmitted=!1,this.submissionFailed=!1,this.currentStep=0,this.country=l.USA,this.allowOptionalFields=!1,this.formTitle="Business Information",this.refs=[],this.setBusinessProvisioned=()=>new Promise((s=>{this.getBusiness({onSuccess:t=>{const i=new m(t.data);this.businessProvisioned=d(i),this.country=i.country_of_establishment,this.businessProvisioned&&this.errorEvent.emit({message:"A request to provision payments for this business has already been submitted.",errorCode:o.PROVISIONING_REQUESTED,severity:r.INFO}),this.businessLoading=!1,s()},onError:({error:t,code:i,severity:e})=>{this.errorEvent.emit({message:t,errorCode:i,severity:e}),this.businessLoading=!1,s()}})})),this.postProvisioningData=()=>{this.postProvisioning({onSuccess:s=>{this.formSubmitted=!0,this.submitEvent.emit({response:s})},onError:({error:s,code:t,severity:i})=>{this.submissionFailed=!0,this.submitEvent.emit({response:{error:s}}),this.errorEvent.emit({message:s,errorCode:t,severity:i})}})},this.incrementSteps=()=>{if(this.currentStep<this.totalSteps)return this.currentStep++},this.decrementSteps=()=>{this.currentStep>0&&(this.currentStep-=1)},this.previousStepButtonOnClick=()=>{this.clickEvent.emit({name:y.previousStep}),this.decrementSteps()},this.nextStepButtonOnClick=(s,t)=>{s.preventDefault(),this.clickEvent.emit({name:t}),this.refs[this.currentStep].validateAndSubmit({onSuccess:this.incrementSteps})}}propChanged(){this.initializeApi()}handleFormCompleted(){this.postProvisioningData()}handleFormLoading(s){this.loading=s.detail}async componentWillLoad(){u(),this.analytics=new e(this),this.initializeApi(),this.getBusiness?await this.setBusinessProvisioned():this.businessLoading=!1,this.refs=new Array(8)}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}initializeApi(){this.authToken&&this.businessId?c(this.authToken)?this.errorEvent.emit({message:"auth-token is expired",errorCode:o.NOT_AUTHENTICATED,severity:r.ERROR}):(this.getBusiness=n({authToken:this.authToken,businessId:this.businessId,service:new h}),this.postProvisioning=a({authToken:this.authToken,businessId:this.businessId,product:"payment",service:new w})):this.errorEvent.emit({message:"auth-token and business-id are required",errorCode:o.MISSING_PROPS,severity:r.ERROR})}get formDisabled(){return this.loading||this.businessProvisioned}get totalSteps(){return this.refs.length-1}get stepCounter(){return`Step ${this.currentStep+1} of ${this.totalSteps+1}`}render(){return s(g,null,this.businessLoading?s(b,null):this.businessProvisioned?s(C,null):this.formSubmitted?s(B,null):this.submissionFailed?s(k,null):s("div",{class:"row gap-3"},s(f,{text:this.formTitle}),s("payment-provisioning-form-steps",{businessId:this.businessId,authToken:this.authToken,refs:this.refs,currentStep:this.currentStep,allowOptionalFields:this.allowOptionalFields,country:this.country,handleFormLoading:this.handleFormLoading}),s("div",{class:"d-flex justify-content-between align-items-center"},s("div",{class:"d-flex align-items-center",part:v},this.stepCounter),s("payment-provisioning-form-buttons",{currentStep:this.currentStep,totalSteps:this.totalSteps,formLoading:this.loading,formDisabled:this.formDisabled,previousStepButtonOnClick:this.previousStepButtonOnClick,nextStepButtonOnClick:this.nextStepButtonOnClick}))))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}};export{D as justifi_payment_provisioning}
1
+ import{h as s,r as t,c as i}from"./p-CV0Pyo1O.js";import{J as e}from"./p-BjjKkMO1.js";import{C as r,b as o}from"./p-Dqxyi-uK.js";import{m as n,b as a}from"./p-DQmijfCN.js";import{B as h}from"./p-rFpPIJgu.js";import{A as p}from"./p-C6Jq8YDT.js";import"./p-CLHwhyvu.js";import{C as l,B as m,e as u}from"./p-CTtGaVYs.js";import{c as d}from"./p-_MjmE9YT.js";import{l as c}from"./p-Ds_P-dB8.js";import{t as v}from"./p-Bu7gdOaV.js";import{S as g}from"./p-05AWudQe.js";import{H as f}from"./p-CZk3i5Tu.js";import"./p-CZfYo5-1.js";import{B as y}from"./p-XYgDHrVL.js";import{P as j}from"./p-B-Ik8b-s.js";import"./p-BC9n8nB2.js";import"./p-BhpaUYtS.js";import"./p-B4vLfYnZ.js";import"./p-DgTOxu8x.js";import"./p-HXpYMWUU.js";import"./p-eBK-iWrz.js";const b=p();class w{async postProvisioning(s,t,i){return b.post({endpoint:"entities/provisioning",body:{business_id:t,product_category:i},authToken:s})}}const C=()=>s("div",{class:"row gap-3 p-5"},s("div",{class:"col-12"},s(f,{text:"Business Already Provisioned"})),s("div",{class:"col-12",part:v},s("p",null,"We have already received the onboarding information for this business."))),k=()=>s("div",{class:"row gap-3 p5"},s("div",{class:"col-12"},s(f,{text:"You're all set for now"})),s("div",{class:"col-12",part:v},s("p",null,"We're reviewing your information and working on your approval. We'll be in touch to let you know once you've been approved (or if we find anything that needs fixing). Have a good one!"))),B=()=>s("div",{class:"row gap-3 p-5"},s("div",{class:"col-12"},s(f,{text:"Something went wrong"})),s("div",{class:"col-12",part:v},s("p",null,"There was an error submitting the provisioning. Your progress has been saved — please try again later or contact the support team."))),x=class{constructor(s){t(this,s),this.clickEvent=i(this,"click-event",7),this.errorEvent=i(this,"error-event",7),this.submitEvent=i(this,"submit-event",7),this.loading=!1,this.businessLoading=!0,this.businessProvisioned=!1,this.formSubmitted=!1,this.submissionFailed=!1,this.currentStep=0,this.country=l.USA,this.allowOptionalFields=!1,this.formTitle="Business Information",this.refs=[],this.setBusinessProvisioned=()=>new Promise((s=>{this.getBusiness({onSuccess:t=>{const i=new m(t.data);this.businessProvisioned=u(i),this.country=i.country_of_establishment,this.businessProvisioned&&this.errorEvent.emit({message:"A request to provision payments for this business has already been submitted.",errorCode:o.PROVISIONING_REQUESTED,severity:r.INFO}),this.businessLoading=!1,s()},onError:({error:t,code:i,severity:e})=>{this.errorEvent.emit({message:t,errorCode:i,severity:e}),this.businessLoading=!1,s()}})})),this.postProvisioningData=()=>{this.postProvisioning({onSuccess:s=>{this.formSubmitted=!0,this.submitEvent.emit({response:s})},onError:({error:s,code:t,severity:i})=>{this.submissionFailed=!0,this.submitEvent.emit({response:{error:s}}),this.errorEvent.emit({message:s,errorCode:t,severity:i})}})},this.incrementSteps=()=>{if(this.currentStep<this.totalSteps)return this.currentStep++},this.decrementSteps=()=>{this.currentStep>0&&(this.currentStep-=1)},this.previousStepButtonOnClick=()=>{this.clickEvent.emit({name:y.previousStep}),this.decrementSteps()},this.nextStepButtonOnClick=(s,t)=>{s.preventDefault(),this.clickEvent.emit({name:t}),this.refs[this.currentStep].validateAndSubmit({onSuccess:this.incrementSteps})}}propChanged(){this.initializeApi()}handleFormCompleted(){this.postProvisioningData()}handleFormLoading(s){this.loading=s.detail}async componentWillLoad(){d(),this.analytics=new e(this),this.initializeApi(),this.getBusiness?await this.setBusinessProvisioned():this.businessLoading=!1,this.refs=new Array(8)}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}initializeApi(){this.authToken&&this.businessId?c(this.authToken)?this.errorEvent.emit({message:"auth-token is expired",errorCode:o.NOT_AUTHENTICATED,severity:r.ERROR}):(this.getBusiness=n({authToken:this.authToken,businessId:this.businessId,service:new h}),this.postProvisioning=a({authToken:this.authToken,businessId:this.businessId,product:"payment",service:new w})):this.errorEvent.emit({message:"auth-token and business-id are required",errorCode:o.MISSING_PROPS,severity:r.ERROR})}get formDisabled(){return this.loading||this.businessProvisioned}get totalSteps(){return this.refs.length-1}get stepCounter(){return`Step ${this.currentStep+1} of ${this.totalSteps+1}`}render(){return s(g,null,this.businessLoading?s(j,null):this.businessProvisioned?s(C,null):this.formSubmitted?s(k,null):this.submissionFailed?s(B,null):s("div",{class:"row gap-3"},s(f,{text:this.formTitle}),s("payment-provisioning-form-steps",{businessId:this.businessId,authToken:this.authToken,refs:this.refs,currentStep:this.currentStep,allowOptionalFields:this.allowOptionalFields,country:this.country,handleFormLoading:this.handleFormLoading}),s("div",{class:"d-flex justify-content-between align-items-center"},s("div",{class:"d-flex align-items-center",part:v},this.stepCounter),s("payment-provisioning-form-buttons",{currentStep:this.currentStep,totalSteps:this.totalSteps,formLoading:this.loading,formDisabled:this.formDisabled,previousStepButtonOnClick:this.previousStepButtonOnClick,nextStepButtonOnClick:this.nextStepButtonOnClick}))))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}};export{x as justifi_payment_provisioning}
@@ -1 +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}
1
+ import{r as i,h as s}from"./p-CV0Pyo1O.js";import{J as o}from"./p-BjjKkMO1.js";import{c as r}from"./p-_MjmE9YT.js";import{w as t}from"./p-B4vLfYnZ.js";import{S as p}from"./p-05AWudQe.js";import"./p-CZfYo5-1.js";import"./p-BC9n8nB2.js";import"./p-C6Jq8YDT.js";import"./p-Ds_P-dB8.js";import"./p-HXpYMWUU.js";import"./p-Dqxyi-uK.js";import"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";import"./p-DgTOxu8x.js";const a=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(p,{key:"9848071f08342d3f5c2f7001af6e15148e713495"},s("bank-account-billing-form-simple",{key:"35f2baeb2f017116199ccff431d0acac01ad498f",legend:this.legend,ref:i=>this.bankAccountBillingFormSimpleRef=i}))}};export{a as justifi_bank_account_billing_form_simple}
@@ -0,0 +1 @@
1
+ import{h as e,r as t,c as a}from"./p-CV0Pyo1O.js";import{P as s}from"./p-BmaQUnqv.js";import{m as i}from"./p-C9p1gWAC.js";import{C as d,b as c,i as f,h as l}from"./p-Dqxyi-uK.js";import{J as r}from"./p-BjjKkMO1.js";import{c as h}from"./p-_MjmE9YT.js";import"./p-B4vLfYnZ.js";import{b,d as o,s as p}from"./p-Ds_P-dB8.js";import"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";import{P as n,M as m}from"./p-Bi_GCMx0.js";import{a as y,b as u,D as v,c as k,C as j,E as g}from"./p-Bh6Q8AqQ.js";import{S as C}from"./p-05AWudQe.js";import"./p-CZfYo5-1.js";import{S as x}from"./p-eBK-iWrz.js";import{a as D,B as w}from"./p-Dz8KJn2G.js";import"./p-C6Jq8YDT.js";import"./p-BC9n8nB2.js";import"./p-HXpYMWUU.js";import"./p-BhpaUYtS.js";import"./p-DgTOxu8x.js";import"./p-Bu7gdOaV.js";const P=()=>e("div",{class:"row gap-3"},e("div",{class:"col-12"},e(x,{width:"35%",height:"30px"})),e("div",{class:"col-12"},e(x,{width:"70%"})),e("div",{class:"col-12"},e(x,{width:"40%"})),e("div",{class:"col-12"},e(x,{width:"40%"})),e("div",{class:"col-12"},e(x,{width:"100%"})),e("div",{class:"col-12"},e(x,{width:"80%"}))),B=class{constructor(e){t(this,e),this.errorEvent=a(this,"error-event",7),this.recordClickEvent=a(this,"record-click-event",7),this.loading=!0}componentWillLoad(){h(),this.analytics=new r(this),this.initializeGetPaymentDetails()}disconnectedCallback(){var e;null===(e=this.analytics)||void 0===e||e.cleanup()}propChanged(){this.initializeGetPaymentDetails()}initializeGetPaymentDetails(){this.paymentId&&this.authToken?(this.getPaymentDetails=i({id:this.paymentId,authToken:this.authToken,service:new s}),this.fetchData()):(this.errorMessage="Payment ID and Auth Token are required",this.errorEvent.emit({message:this.errorMessage,errorCode:c.MISSING_PROPS,severity:d.ERROR}))}updateOnPropChange(){this.getPaymentDetails&&this.fetchData()}fetchData(){this.loading=!0,this.getPaymentDetails({onSuccess:({payment:e})=>{this.payment=e,this.errorMessage=null},onError:({error:e,code:t,severity:a})=>{this.errorMessage=e,this.errorEvent.emit({errorCode:t,message:e,severity:a})},final:()=>{this.loading=!1}})}get PaymentStatus(){return this.payment.status===f.disputed&&this.payment.disputes.some((e=>e.status===l.lost))?n.DISPUTE_LOST:this.payment.status}render(){return e(C,{key:"c20a9881f121383742df4097abd211fc01fa614c"},this.loading&&e(P,{key:"cea1dbe1de00b872e3eb83207c2f3f198dd0ce3f"}),!this.loading&&this.errorMessage&&g(this.errorMessage),!this.loading&&!this.errorMessage&&this.payment&&e("justifi-details",{key:"821173761c94527c920ced8af53634389ee5e6fd",errorMessage:this.errorMessage},e(y,{key:"c596fc0f0a72f1775295fddb96490c9c2b7c8a4d",slot:"head-info",badge:e("div",{class:"d-flex gap-1"},m(this.PaymentStatus),this.payment.expedited?e(D,{variant:w.WARNING,title:"Expedited",text:"Expedited"}):null),title:this.payment.formattedPaymentAmount(this.payment.amount)},e(u,{key:"bd77afb1bffcf42d07858f7f717fcbf672762766",classes:"border-1 border-end",title:"Updated At",value:`${b(this.payment.updated_at)} ${o(this.payment.updated_at)}`}),e(u,{key:"ccfb0af2a6680eb76a4e6db01728204725b752c0",classes:"border-1 border-end",title:"Created At",value:`${b(this.payment.created_at)} ${o(this.payment.created_at)}`}),e(u,{key:"60f832dd62f9b4aed3495c6aeb38d7798aedf420",title:"ID",value:this.payment.id})),e("div",{key:"3073acb5c67e330e18f45d00b62912bcb5d6b49f",slot:"detail-sections"},e(v,{key:"aae396fef7ef9394ac4f90a0d3ae5090dfd91e5c",sectionTitle:"Details"}),e("div",{key:"71330cbb6fef542f60d76a1a6bee1e1d950a95da",class:"d-flex flex-column gap-2 w-100"},e(k,{key:"0d64521a40aff244e599a0f8946c8c1a06f6c1f5",title:"Amount",value:this.payment.formattedPaymentAmount(this.payment.amount)}),e(k,{key:"b67670f8c89d38b5dac856e0326e8dc4aa79240b",title:"Fees",value:this.payment.formattedPaymentAmount(this.payment.fee_amount)}),e(k,{key:"ec82b98af9fc602c273c7d624aae13b2121f40ab",title:"Refunded",value:this.payment.formattedPaymentAmount(this.payment.amount_refunded)}),e(k,{key:"f785ac60c1a5520d3fefdcd746629431db689dae",title:"Net",value:this.payment.formattedPaymentAmount(this.payment.balance)}),e(k,{key:"ad986f25d781e51ba7991b5487dcacb63c0e2422",title:"Status",value:m(this.PaymentStatus)}),e(k,{key:"aa9918c2962d5e17a3bc7550dc134a85c9f863ab",title:"Payment ID",value:this.payment.id}),e(k,{key:"4052d75ce51d350d3f82b05a2447cb0481b9ffa0",title:"Processing Fees",value:this.payment.formattedPaymentAmount(this.payment.fee_amount)}),e(k,{key:"2f89484e36dc4e5a01e27033f7ff9602b2d181d7",title:"Statement Descriptor",value:this.payment.statement_descriptor}),e(k,{key:"41768b7db45146a949180eebb0ae53d19d39cb7b",title:"Description",value:this.payment.description}),e(k,{key:"fef4e8b59d7ca04ee895a7b4eba58503b97956f9",title:"Expedited",value:this.payment.expedited?"Yes":"No"})),this.payment.payment_method.card&&[e(v,{key:"615d5d3a1df6e0b32cd5d7d4dd264250f732a2f4",sectionTitle:"Payment Method"}),e("div",{key:"37811c349258526f1fb5e1d7dda8547a01fbc4c7",class:"d-flex flex-column gap-2 w-100"},e(k,{key:"eee5b8828dc3b5e7bf5738d95d488b03d7704934",title:"ID",value:this.payment.payment_method.card.id}),e(k,{key:"dbda1d8cf16914f1adf0803340d807abc504758b",title:"Payment Type",value:"Card"}),e(k,{key:"2887c82fcaec3a7322644a928e4291970a69d4a4",title:"Last 4 Numbers",value:this.payment.payment_method.lastFourDigits}),e(k,{key:"dc707f794882ba9143cc46541ce89f072e98a653",title:"Brand",value:p(this.payment.payment_method.card.brand)}),e(k,{key:"8de60a9b5d5f781d1554108fc80ae0799e3143a6",title:"Cardholder",value:this.payment.payment_method.payersName}))],this.payment.payment_method.bank_account&&[e(v,{key:"697f50418855675ea222fe2dc7558d30f884ed47",sectionTitle:"Payment Method"}),e("div",{key:"c7a013952b32f95a74d0e0f281a0750966e58c0d",class:"d-flex flex-column gap-2 w-100"},e(k,{key:"ea9692b3a3dac313aa366ec22f0d766ba5eb0d52",title:"ID",value:this.payment.payment_method.bank_account.id}),e(k,{key:"5826fd24417df7fbaf952d60dbb21eb7ebf6ce36",title:"Last 4 Numbers",value:this.payment.last_four_digits}),e(k,{key:"a16f0171e05a59eb302404b1c5ccfc4a62e9899b",title:"Bank Name",value:this.payment.payment_method.bank_account.brand}),e(k,{key:"88dbbfe65ef4e7d1e31c9fc98de3dfddd33526c1",title:"Account Owner",value:this.payment.payment_method.payersName}))],this.payment.metadata&&[e(v,{key:"7f686436fda99b434f651758e420f2ad6be5d60a",sectionTitle:"Metadata"}),e("div",{key:"67b2e9543eba5c27c1d5b7e1a70115a2eb7f274a",class:"d-table gap-2 w-100"},e(j,{key:"f2dc90048696d2c8b0868d966d1e318e2c16fdbf",metadata:this.payment.metadata}))])))}static get watchers(){return{paymentId:["propChanged"],authToken:["propChanged"],getPaymentDetails:["updateOnPropChange"]}}};export{B as justifi_payment_details}
@@ -0,0 +1 @@
1
+ import{A as o}from"./p-C6Jq8YDT.js";import{S as s,C as r}from"./p-Dqxyi-uK.js";import"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";import"./p-B4vLfYnZ.js";import"./p-HXpYMWUU.js";import{g as t,a as n}from"./p-BhpaUYtS.js";const a=o();class c{async fetchSubAccounts(o,s,r){return a.get({authToken:s,endpoint:"sub_accounts",params:r,headers:{Account:o}})}}const e=({primaryAccountId:o,authToken:a,service:c})=>async({params:e,onSuccess:p,onError:i})=>{var u,m;try{const v=await c.fetchSubAccounts(o,a,e);if(v.error){return i({error:n(v.error),code:t(null===(m=v.error)||void 0===m?void 0:m.code),severity:r.ERROR})}{const o=Object.assign({},v.page_info);p({subAccounts:(null===(u=v.data)||void 0===u?void 0:u.map((o=>new s(o))))||[],pagingInfo:o})}}catch(o){const s=t(null==o?void 0:o.code);return i({error:o.message||o,code:s,severity:r.ERROR})}};export{c as S,e as m}
@@ -0,0 +1 @@
1
+ import{A as t}from"./p-C6Jq8YDT.js";import"./p-Dqxyi-uK.js";import"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";const a=t();class n{async fetchPayouts(t,n,s){return a.get({authToken:n,endpoint:`account/${t}/payouts`,params:s})}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,s){return a.get({authToken:n,endpoint:"balance_transactions",params:s,headers:{"sub-account":t}})}}export{n as P}
@@ -1 +1 @@
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
+ import{A as t}from"./p-C6Jq8YDT.js";import"./p-Dqxyi-uK.js";import"./p-CLHwhyvu.js";import"./p-CTtGaVYs.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{S as e}from"./p-DaDqgDrb.js";const a=[{label:"Choose province",value:""},{label:"Alberta",value:"AB"},{label:"British Columbia",value:"BC"},{label:"Manitoba",value:"MB"},{label:"New Brunswick",value:"NB"},{label:"Newfoundland and Labrador",value:"NL"},{label:"Northwest Territories",value:"NT"},{label:"Nova Scotia",value:"NS"},{label:"Nunavut",value:"NU"},{label:"Ontario",value:"ON"},{label:"Prince Edward Island",value:"PE"},{label:"Quebec",value:"QC"},{label:"Saskatchewan",value:"SK"},{label:"Yukon",value:"YT"}],l={USA:{stateLabel:"State",postalLabel:"Zip Code",idNumberLabel:"SSN",idNumberLabelOptional:"SSN (optional)",identityHelpText:"Enter your full Social Security Number. It is required for Federal OFAC check.",taxIdLabel:"Tax ID (EIN or SSN)",taxIdLabelOptional:"",taxIdHelpText:"Employer Identification Numbers (EINs) are nine digits. The federal tax identification number/EIN issued to you by the IRS. It can be found on your tax returns. Enter value without dashes."},CAN:{stateLabel:"Province / State",postalLabel:"Postal / Zip Code",idNumberLabel:"SIN",idNumberLabelOptional:"SIN (optional)",identityHelpText:"Enter your full Social Insurance Number.",taxIdLabel:"Business Number (BN)",taxIdLabelOptional:"Business Number (BN) (optional)",taxIdHelpText:"Business Numbers (BN) are nine digits. Enter value without spaces or dashes."}},t=[{label:"Choose province / state",value:""},...a.filter((e=>""!==e.value)),...e.filter((e=>""!==e.value))],i={USA:{stateOptions:e},CAN:{stateOptions:t}},o={USA:{postalRegex:/^[0-9]{5}(-[0-9]{4})?$/,identityDigits:9,taxIdDigits:9},CAN:{postalRegex:/^([A-Za-z]\d[A-Za-z][ -]?\d[A-Za-z]\d|[0-9]{5}(-[0-9]{4})?)$/,identityDigits:9,taxIdDigits:9}};export{a as P,o as a,i as b,l as c}
1
+ import{S as e}from"./p-CTtGaVYs.js";const a=[{label:"Choose province",value:""},{label:"Alberta",value:"AB"},{label:"British Columbia",value:"BC"},{label:"Manitoba",value:"MB"},{label:"New Brunswick",value:"NB"},{label:"Newfoundland and Labrador",value:"NL"},{label:"Northwest Territories",value:"NT"},{label:"Nova Scotia",value:"NS"},{label:"Nunavut",value:"NU"},{label:"Ontario",value:"ON"},{label:"Prince Edward Island",value:"PE"},{label:"Quebec",value:"QC"},{label:"Saskatchewan",value:"SK"},{label:"Yukon",value:"YT"}],l={USA:{stateLabel:"State",postalLabel:"Zip Code",idNumberLabel:"SSN",idNumberLabelOptional:"SSN (optional)",identityHelpText:"Enter your full Social Security Number. It is required for Federal OFAC check.",taxIdLabel:"Tax ID (EIN or SSN)",taxIdLabelOptional:"",taxIdHelpText:"Employer Identification Numbers (EINs) are nine digits. The federal tax identification number/EIN issued to you by the IRS. It can be found on your tax returns. Enter value without dashes."},CAN:{stateLabel:"Province / State",postalLabel:"Postal / Zip Code",idNumberLabel:"SIN",idNumberLabelOptional:"SIN (optional)",identityHelpText:"Enter your full Social Insurance Number.",taxIdLabel:"Business Number (BN)",taxIdLabelOptional:"Business Number (BN) (optional)",taxIdHelpText:"Business Numbers (BN) are nine digits. Enter value without spaces or dashes."}},t=[{label:"Choose province / state",value:""},...a.filter((e=>""!==e.value)),...e.filter((e=>""!==e.value))],i={USA:{stateOptions:e},CAN:{stateOptions:t}},o={USA:{postalRegex:/^[0-9]{5}(-[0-9]{4})?$/,identityDigits:9,taxIdDigits:9},CAN:{postalRegex:/^([A-Za-z]\d[A-Za-z][ -]?\d[A-Za-z]\d|[0-9]{5}(-[0-9]{4})?)$/,identityDigits:9,taxIdDigits:9}};export{a as P,o as a,i as b,l as c}