@justifi/webcomponents 6.12.1-rc.4 → 6.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (636) hide show
  1. package/LICENSE +21 -0
  2. package/dist/cjs/{Analytics-C-vPzzrU.js → Analytics-BhduX1FR.js} +2 -2
  3. package/dist/cjs/{Plaid-6JK8xPnG.js → Plaid-BlSGeGpn.js} +0 -4
  4. package/dist/cjs/additional-questions-form-step_14.cjs.entry.js +12 -12
  5. package/dist/cjs/additional-questions_5.cjs.entry.js +6 -6
  6. package/dist/cjs/bank-account-billing-form-simple_4.cjs.entry.js +3 -3
  7. package/dist/cjs/bank-account-form.cjs.entry.js +4 -4
  8. package/dist/cjs/bank-account-read-only-value.cjs.entry.js +1 -1
  9. package/dist/cjs/{business.service-XXjIL3rT.js → business.service-BheJs82v.js} +1 -1
  10. package/dist/cjs/card-form.cjs.entry.js +4 -4
  11. package/dist/cjs/{check-pkg-version-DRjDfRiO.js → check-pkg-version-Bd2yxoh4.js} +1 -1
  12. package/dist/cjs/{checkout.service-BUpGS3Nm.js → checkout.service-DZKdHQQq.js} +1 -1
  13. package/dist/cjs/{checkout.store-zTfjieKa.js → checkout.store-CztwuCnG.js} +2 -0
  14. package/dist/cjs/checkouts-list-core.cjs.entry.js +2 -2
  15. package/dist/cjs/custom-popper_2.cjs.entry.js +2 -2
  16. package/dist/cjs/{dispute.service-BC_bJL60.js → dispute.service-BbtwY673.js} +1 -1
  17. package/dist/cjs/form-address-fields_3.cjs.entry.js +4 -4
  18. package/dist/cjs/form-control-checkbox.cjs.entry.js +2 -2
  19. package/dist/cjs/form-control-date.cjs.entry.js +2 -2
  20. package/dist/cjs/form-control-file-v2_2.cjs.entry.js +3 -3
  21. package/dist/cjs/form-control-file.cjs.entry.js +2 -2
  22. package/dist/cjs/form-control-monetary-provisioning.cjs.entry.js +2 -2
  23. package/dist/cjs/form-control-monetary.cjs.entry.js +2 -2
  24. package/dist/cjs/form-control-number_3.cjs.entry.js +5 -5
  25. package/dist/cjs/form-control-radio.cjs.entry.js +2 -2
  26. package/dist/cjs/form-control-select_2.cjs.entry.js +4 -4
  27. package/dist/cjs/{get-business-Dk1gjO4B.js → get-business-CKC1P4Qs.js} +2 -2
  28. package/dist/cjs/{get-payment-details-Cvi1hHGJ.js → get-payment-details-DL5FmIyF.js} +2 -2
  29. package/dist/cjs/{get-subaccounts-BPJ2-LBo.js → get-subaccounts-CVK4O7th.js} +2 -2
  30. package/dist/cjs/gross-payment-chart-core.cjs.entry.js +1 -1
  31. package/dist/cjs/hidden-input_2.cjs.entry.js +5 -5
  32. package/dist/cjs/internal-button.cjs.entry.js +1 -1
  33. package/dist/cjs/justifi-additional-statement_8.cjs.entry.js +8 -8
  34. package/dist/cjs/justifi-apple-pay_11.cjs.entry.js +46 -20
  35. package/dist/cjs/justifi-bank-account-billing-form-simple.cjs.entry.js +5 -5
  36. package/dist/cjs/justifi-bank-account-form.cjs.entry.js +5 -5
  37. package/dist/cjs/justifi-billing-form-full.cjs.entry.js +1 -1
  38. package/dist/cjs/justifi-billing-form.cjs.entry.js +1 -1
  39. package/dist/cjs/justifi-business-details.cjs.entry.js +58 -22
  40. package/dist/cjs/justifi-business-form.cjs.entry.js +7 -7
  41. package/dist/cjs/justifi-card-billing-form-simple.cjs.entry.js +1 -1
  42. package/dist/cjs/justifi-card-form.cjs.entry.js +5 -5
  43. package/dist/cjs/justifi-checkout.cjs.entry.js +9 -11
  44. package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +3 -3
  45. package/dist/cjs/justifi-checkouts-list.cjs.entry.js +8 -8
  46. package/dist/cjs/justifi-dispute-management-core.cjs.entry.js +1 -1
  47. package/dist/cjs/justifi-dispute-management.cjs.entry.js +7 -7
  48. package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +10 -10
  49. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +5 -5
  50. package/dist/cjs/justifi-order-terminals.cjs.entry.js +9 -9
  51. package/dist/cjs/justifi-payment-details.cjs.entry.js +69 -30
  52. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +7 -7
  53. package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +7 -7
  54. package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +2 -2
  55. package/dist/cjs/justifi-payments-list.cjs.entry.js +132 -18
  56. package/dist/cjs/justifi-payout-details.cjs.entry.js +74 -18
  57. package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +7 -7
  58. package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +3 -3
  59. package/dist/cjs/justifi-payouts-list.cjs.entry.js +169 -21
  60. package/dist/cjs/justifi-refund-payment.cjs.entry.js +7 -7
  61. package/dist/cjs/justifi-save-new-payment-method.cjs.entry.js +1 -1
  62. package/dist/cjs/justifi-saved-payment-method.cjs.entry.js +1 -1
  63. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +6 -6
  64. package/dist/cjs/justifi-skeleton.cjs.entry.js +1 -1
  65. package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +4 -4
  66. package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +7 -7
  67. package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +2 -2
  68. package/dist/cjs/justifi-terminals-list.cjs.entry.js +183 -20
  69. package/dist/cjs/loader.cjs.js +1 -1
  70. package/dist/cjs/{package-DxFpJkh_.js → package-CjFkmEML.js} +1 -1
  71. package/dist/cjs/payment-method-option.cjs.entry.js +1 -1
  72. package/dist/cjs/{payment-provisioning-actions-DscyasDY.js → payment-provisioning-actions-BO7dzIm1.js} +2 -2
  73. package/dist/cjs/payment-provisioning-form-buttons_2.cjs.entry.js +2 -2
  74. package/dist/cjs/{payment.service-DC2FVlv-.js → payment.service-sZKlg2Jq.js} +1 -1
  75. package/dist/cjs/{payout.service-Bjbt6USA.js → payout.service-BcQVsMCS.js} +1 -1
  76. package/dist/cjs/{payouts-status-DXZ5fl4v.js → payouts-status-CwgOMz-S.js} +21 -0
  77. package/dist/cjs/{plaid.service-C0ZgOkwL.js → plaid.service-BcgO2VXC.js} +1 -1
  78. package/dist/cjs/radio-list-item.cjs.entry.js +1 -1
  79. package/dist/cjs/save-new-payment-method.cjs.entry.js +2 -2
  80. package/dist/cjs/table-filters-menu.cjs.entry.js +1 -1
  81. package/dist/cjs/terminal-orders-list-core.cjs.entry.js +3 -3
  82. package/dist/cjs/{terminal-orders-table-j_IoYD-2.js → terminal-orders-table-Cz6qvzVE.js} +1 -1
  83. package/dist/cjs/terminal-quantity-selector.cjs.entry.js +1 -1
  84. package/dist/cjs/{terminal.service-YAuPfEGz.js → terminal.service-CjMMWSh3.js} +1 -1
  85. package/dist/cjs/{utils-C4CgQd55.js → utils-DbTucCTO.js} +1 -1
  86. package/dist/cjs/webcomponents.cjs.js +1 -1
  87. package/dist/collection/api/ApplePay.js +0 -4
  88. package/dist/collection/api/services/apple-pay.service.js +1 -6
  89. package/dist/collection/collection-manifest.json +0 -6
  90. package/dist/collection/components/business-details/justifi-business-details.js +56 -17
  91. package/dist/collection/components/business-forms/business-form/additional-questions/additional-questions.js +1 -1
  92. package/dist/collection/components/business-forms/business-form/business-core-info/business-core-info.js +2 -2
  93. package/dist/collection/components/business-forms/business-form/business-representative/business-representative.js +2 -2
  94. package/dist/collection/components/business-forms/business-form/legal-address-form/legal-address-form.js +1 -1
  95. package/dist/collection/components/business-forms/owner-form/identity-address/identity-address-form.js +1 -1
  96. package/dist/collection/components/business-forms/owner-form/owner-form-core.js +1 -1
  97. package/dist/collection/components/business-forms/owner-form/owner-form-inputs.js +2 -2
  98. package/dist/collection/components/business-forms/owner-form/owner-form.js +1 -1
  99. package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-document-form-inputs.js +1 -1
  100. package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-form-inputs-canada.js +1 -1
  101. package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-form-inputs.js +1 -1
  102. package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-read-only-value.js +1 -1
  103. package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-inputs.js +2 -2
  104. package/dist/collection/components/business-forms/payment-provisioning/form-address-fields/form-address-fields.js +1 -1
  105. package/dist/collection/components/business-forms/payment-provisioning/form-control-monetary-provisioning.js +2 -2
  106. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-form-buttons.js +1 -1
  107. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-form-steps.js +1 -1
  108. package/dist/collection/components/business-forms/payment-provisioning/terms-and-conditions/business-terms-conditions-form-step.js +1 -1
  109. package/dist/collection/components/checkout/bank-account-form/bank-account-form.js +2 -2
  110. package/dist/collection/components/checkout/billing-form/bank-account-billing-form-simple.js +1 -1
  111. package/dist/collection/components/checkout/billing-form/card-billing-form-simple.js +1 -1
  112. package/dist/collection/components/checkout/billing-form/justifi-billing-form.js +1 -1
  113. package/dist/collection/components/checkout/card-form/card-form.js +2 -2
  114. package/dist/collection/components/checkout/justifi-checkout.js +4 -7
  115. package/dist/collection/components/checkout/justifi-saved-payment-method.js +1 -1
  116. package/dist/collection/components/checkout/save-new-payment-method/justifi-save-new-payment-method.js +1 -1
  117. package/dist/collection/components/checkout/save-new-payment-method/save-new-payment-method.js +1 -1
  118. package/dist/collection/components/checkouts-list/checkouts-list-core.js +1 -1
  119. package/dist/collection/components/checkouts-list/checkouts-list-filters.js +2 -2
  120. package/dist/collection/components/checkouts-list/justifi-checkouts-list.js +1 -1
  121. package/dist/collection/components/dispute-management/dispute-management-core.js +1 -1
  122. package/dist/collection/components/dispute-management/dispute-response/dispute-response-core.js +1 -1
  123. package/dist/collection/components/dispute-management/dispute-response/justifi-additional-statement.js +1 -1
  124. package/dist/collection/components/dispute-management/dispute-response/justifi-cancellation-policy.js +1 -1
  125. package/dist/collection/components/dispute-management/dispute-response/justifi-customer-details.js +1 -1
  126. package/dist/collection/components/dispute-management/dispute-response/justifi-dispute-response.js +1 -1
  127. package/dist/collection/components/dispute-management/dispute-response/justifi-duplicate-charge.js +1 -1
  128. package/dist/collection/components/dispute-management/dispute-response/justifi-electronic-evidence.js +1 -1
  129. package/dist/collection/components/dispute-management/dispute-response/justifi-product-or-service.js +1 -1
  130. package/dist/collection/components/dispute-management/dispute-response/justifi-refund-policy.js +1 -1
  131. package/dist/collection/components/dispute-management/dispute-response/justifi-shipping-details.js +1 -1
  132. package/dist/collection/components/dispute-management/justifi-dispute-management.js +1 -1
  133. package/dist/collection/components/dispute-management/justifi-dispute-notification.js +2 -2
  134. package/dist/collection/components/filters/table-filters-menu.js +1 -1
  135. package/dist/collection/components/gross-payment-chart/gross-payment-chart-core.js +1 -1
  136. package/dist/collection/components/modular-checkout/justifi-modular-checkout.js +31 -1
  137. package/dist/collection/components/modular-checkout/sub-components/justifi-apple-pay.js +0 -1
  138. package/dist/collection/components/modular-checkout/sub-components/justifi-bank-account-billing-form-simple.js +1 -1
  139. package/dist/collection/components/modular-checkout/sub-components/justifi-bank-account-form.js +1 -1
  140. package/dist/collection/components/modular-checkout/sub-components/justifi-billing-form-full.js +1 -1
  141. package/dist/collection/components/modular-checkout/sub-components/justifi-card-billing-form-simple.js +1 -1
  142. package/dist/collection/components/modular-checkout/sub-components/justifi-card-form.js +1 -1
  143. package/dist/collection/components/modular-checkout/sub-components/justifi-checkout-summary.js +1 -1
  144. package/dist/collection/components/modular-checkout/sub-components/justifi-google-pay.js +16 -0
  145. package/dist/collection/components/modular-checkout/sub-components/payment-method-option.js +1 -1
  146. package/dist/collection/components/order-terminals/justifi-order-terminals.js +1 -1
  147. package/dist/collection/components/order-terminals/terminal-quantity-selector/terminal-quantity-selector.js +1 -1
  148. package/dist/collection/components/payment-details/justifi-payment-details.js +59 -17
  149. package/dist/collection/components/payment-transactions-list/justifi-payment-transactions-list.js +1 -1
  150. package/dist/collection/components/payments-list/justifi-payments-list-filters.js +2 -2
  151. package/dist/collection/components/payments-list/justifi-payments-list.js +114 -5
  152. package/dist/collection/components/payout-details/justifi-payout-details.js +86 -8
  153. package/dist/collection/components/payout-transactions-list/justifi-payout-transactions-list.js +1 -1
  154. package/dist/collection/components/payouts-list/justifi-payouts-list-filters.js +2 -2
  155. package/dist/collection/components/payouts-list/justifi-payouts-list.js +166 -7
  156. package/dist/collection/components/terminal-orders-list/justifi-terminal-orders-list-filters.js +3 -3
  157. package/dist/collection/components/terminal-orders-list/justifi-terminal-orders-list.js +1 -1
  158. package/dist/collection/components/terminal-orders-list/terminal-orders-list-core.js +1 -1
  159. package/dist/collection/components/terminals-list/justifi-terminals-list-filters.js +1 -1
  160. package/dist/collection/components/terminals-list/justifi-terminals-list.js +153 -7
  161. package/dist/collection/components/tokenize-payment-method/justifi-tokenize-payment-method.js +1 -1
  162. package/dist/collection/store/checkout.store.js +2 -0
  163. package/dist/collection/ui-components/custom-popper/custom-popper.js +2 -2
  164. package/dist/collection/ui-components/form/form-control-checkbox.js +2 -2
  165. package/dist/collection/ui-components/form/form-control-date.js +2 -2
  166. package/dist/collection/ui-components/form/form-control-file-v2.js +1 -1
  167. package/dist/collection/ui-components/form/form-control-file.js +2 -2
  168. package/dist/collection/ui-components/form/form-control-monetary.js +2 -2
  169. package/dist/collection/ui-components/form/form-control-number-masked.js +2 -2
  170. package/dist/collection/ui-components/form/form-control-number.js +2 -2
  171. package/dist/collection/ui-components/form/form-control-radio.js +2 -2
  172. package/dist/collection/ui-components/form/form-control-select.js +2 -2
  173. package/dist/collection/ui-components/form/form-control-text.js +2 -2
  174. package/dist/collection/ui-components/form/form-control-textarea.js +2 -2
  175. package/dist/collection/ui-components/form/hidden-input.js +1 -1
  176. package/dist/collection/ui-components/form/iframe-input.js +3 -3
  177. package/dist/collection/ui-components/internal-button.js +1 -1
  178. package/dist/collection/ui-components/radio-list-item.js +1 -1
  179. package/dist/collection/ui-components/shadow-dom-components/justifi-button.js +1 -1
  180. package/dist/collection/ui-components/shadow-dom-components/justifi-header.js +1 -1
  181. package/dist/collection/ui-components/shadow-dom-components/justifi-skeleton.js +1 -1
  182. package/dist/docs.json +256 -995
  183. package/dist/esm/{Analytics-D8LisYvl.js → Analytics-4PEV3c9V.js} +3 -3
  184. package/dist/esm/{Api-BrYhtpEh.js → Api-DMd8hTI-.js} +1 -1
  185. package/dist/esm/{Plaid-D40pFwwP.js → Plaid-BuKEVgbB.js} +2 -6
  186. package/dist/esm/additional-questions-details_5.entry.js +3 -3
  187. package/dist/esm/additional-questions-form-step_14.entry.js +18 -18
  188. package/dist/esm/additional-questions_5.entry.js +7 -7
  189. package/dist/esm/{badge-B_DdhQ3Q.js → badge-B6dp1XGV.js} +1 -1
  190. package/dist/esm/bank-account-billing-form-simple_4.entry.js +5 -5
  191. package/dist/esm/bank-account-form.entry.js +7 -7
  192. package/dist/esm/bank-account-read-only-value.entry.js +2 -2
  193. package/dist/esm/{business.service-Bt68Uk7V.js → business.service-BPbZ5fxQ.js} +2 -2
  194. package/dist/esm/{button-B-Agn8yQ.js → button-DRdaAudE.js} +1 -1
  195. package/dist/esm/card-form.entry.js +7 -7
  196. package/dist/esm/{check-pkg-version-BKlQcI-j.js → check-pkg-version-BmgaID9z.js} +1 -1
  197. package/dist/esm/{checkout.service-B7K5LRx2.js → checkout.service-CJMfFKyS.js} +2 -2
  198. package/dist/esm/{checkout.store-C1TdhFf6.js → checkout.store-DFnkcDZ8.js} +2 -0
  199. package/dist/esm/checkouts-list-core.entry.js +8 -8
  200. package/dist/esm/{checkouts-table-BXm9GGFI.js → checkouts-table-C8sPHeTm.js} +3 -3
  201. package/dist/esm/custom-popper_2.entry.js +3 -3
  202. package/dist/esm/{dispute.service-BPA0V42p.js → dispute.service-vlYGy0nR.js} +2 -2
  203. package/dist/esm/form-address-fields_3.entry.js +6 -6
  204. package/dist/esm/form-control-checkbox.entry.js +5 -5
  205. package/dist/esm/form-control-date.entry.js +4 -4
  206. package/dist/esm/{form-control-error-text-DMKhr8QA.js → form-control-error-text-DVedKyhp.js} +1 -1
  207. package/dist/esm/form-control-file-v2_2.entry.js +5 -5
  208. package/dist/esm/form-control-file.entry.js +4 -4
  209. package/dist/esm/{form-control-help-text-CsdCuw5-.js → form-control-help-text-D-349cNw.js} +1 -1
  210. package/dist/esm/form-control-monetary-provisioning.entry.js +5 -5
  211. package/dist/esm/form-control-monetary.entry.js +6 -6
  212. package/dist/esm/form-control-number_3.entry.js +9 -9
  213. package/dist/esm/form-control-radio.entry.js +3 -3
  214. package/dist/esm/form-control-select_2.entry.js +6 -6
  215. package/dist/esm/{get-business-CijoB3Df.js → get-business-DpFRs5dE.js} +2 -2
  216. package/dist/esm/{get-payment-details-B9JipaKX.js → get-payment-details-DjBou5Fu.js} +2 -2
  217. package/dist/esm/{get-subaccounts-Dfo7wGVE.js → get-subaccounts-CgDWE_5o.js} +3 -3
  218. package/dist/esm/gross-payment-chart-core.entry.js +5 -5
  219. package/dist/esm/{header-1-bRxxOyI-.js → header-1-Bl7MHW0w.js} +1 -1
  220. package/dist/esm/{header-3-E533c0A3.js → header-3-C7JJVnMG.js} +1 -1
  221. package/dist/esm/hidden-input_2.entry.js +7 -7
  222. package/dist/esm/{insurance-state-obAKb1XR.js → insurance-state-qTdpe84i.js} +1 -1
  223. package/dist/esm/internal-button.entry.js +3 -3
  224. package/dist/esm/justifi-additional-statement_8.entry.js +9 -9
  225. package/dist/esm/justifi-apple-pay_11.entry.js +53 -27
  226. package/dist/esm/justifi-bank-account-billing-form-simple.entry.js +7 -7
  227. package/dist/esm/justifi-bank-account-form.entry.js +7 -7
  228. package/dist/esm/justifi-billing-form-full.entry.js +1 -1
  229. package/dist/esm/justifi-billing-form.entry.js +1 -1
  230. package/dist/esm/justifi-business-details.entry.js +63 -27
  231. package/dist/esm/justifi-business-form.entry.js +13 -13
  232. package/dist/esm/justifi-card-billing-form-simple.entry.js +1 -1
  233. package/dist/esm/justifi-card-form.entry.js +7 -7
  234. package/dist/esm/justifi-checkout.entry.js +12 -14
  235. package/dist/esm/justifi-checkouts-list-filters.entry.js +5 -5
  236. package/dist/esm/justifi-checkouts-list.entry.js +13 -13
  237. package/dist/esm/justifi-details.entry.js +2 -2
  238. package/dist/esm/justifi-dispute-management-core.entry.js +1 -1
  239. package/dist/esm/justifi-dispute-management.entry.js +9 -9
  240. package/dist/esm/justifi-dispute-notification_3.entry.js +15 -15
  241. package/dist/esm/justifi-gross-payment-chart.entry.js +9 -9
  242. package/dist/esm/justifi-order-terminals.entry.js +13 -13
  243. package/dist/esm/justifi-payment-details.entry.js +71 -32
  244. package/dist/esm/justifi-payment-provisioning.entry.js +13 -13
  245. package/dist/esm/justifi-payment-transactions-list.entry.js +12 -12
  246. package/dist/esm/justifi-payments-list-filters.entry.js +4 -4
  247. package/dist/esm/justifi-payments-list.entry.js +134 -20
  248. package/dist/esm/justifi-payout-details.entry.js +76 -20
  249. package/dist/esm/justifi-payout-transactions-list.entry.js +12 -12
  250. package/dist/esm/justifi-payouts-list-filters.entry.js +5 -5
  251. package/dist/esm/justifi-payouts-list.entry.js +170 -22
  252. package/dist/esm/justifi-refund-payment.entry.js +12 -12
  253. package/dist/esm/justifi-save-new-payment-method.entry.js +1 -1
  254. package/dist/esm/justifi-saved-payment-method.entry.js +2 -2
  255. package/dist/esm/justifi-season-interruption-insurance.entry.js +11 -11
  256. package/dist/esm/justifi-skeleton.entry.js +3 -3
  257. package/dist/esm/justifi-terminal-orders-list-filters.entry.js +6 -6
  258. package/dist/esm/justifi-terminal-orders-list.entry.js +11 -11
  259. package/dist/esm/justifi-terminals-list-filters.entry.js +4 -4
  260. package/dist/esm/justifi-terminals-list.entry.js +184 -21
  261. package/dist/esm/loader.js +1 -1
  262. package/dist/esm/{package-CXzupAGy.js → package-CXKOe1m5.js} +1 -1
  263. package/dist/esm/pagination-menu.entry.js +1 -1
  264. package/dist/esm/{parts-D50Rx76J.js → parts-DnrawQn3.js} +1 -1
  265. package/dist/esm/payment-method-option.entry.js +2 -2
  266. package/dist/esm/{payment-provisioning-actions-Bv2HP9Cx.js → payment-provisioning-actions-Dr0YIShV.js} +2 -2
  267. package/dist/esm/payment-provisioning-form-buttons_2.entry.js +4 -4
  268. package/dist/esm/{payment-provisioning-loading-BAoIyEOj.js → payment-provisioning-loading-DI2wDkhm.js} +1 -1
  269. package/dist/esm/{payment.service-J7iQtC5z.js → payment.service-Ckbb7gXA.js} +2 -2
  270. package/dist/esm/{payments-status-7P7L51CK.js → payments-status-BIDoGw-m.js} +1 -1
  271. package/dist/esm/{payout.service-Dsz8f37z.js → payout.service-BgFKxEoL.js} +2 -2
  272. package/dist/esm/{payouts-status-CGZRMu-q.js → payouts-status-1T2NZBoE.js} +22 -2
  273. package/dist/esm/{plaid.service-D1nDrcPY.js → plaid.service-BLguQHs_.js} +2 -2
  274. package/dist/esm/radio-list-item.entry.js +2 -2
  275. package/dist/esm/save-new-payment-method.entry.js +2 -2
  276. package/dist/esm/{skeleton-DV6yJalo.js → skeleton-CXGFVqDf.js} +1 -1
  277. package/dist/esm/{spinner--fEgBBOG.js → spinner-kSw6PcwU.js} +1 -1
  278. package/dist/esm/{table-Deugl8h5.js → table-CcyuIutB.js} +2 -2
  279. package/dist/esm/table-filters-menu.entry.js +3 -3
  280. package/dist/esm/terminal-orders-list-core.entry.js +8 -8
  281. package/dist/esm/{terminal-orders-table-DlVbBgNh.js → terminal-orders-table-C7KOcRpq.js} +4 -4
  282. package/dist/esm/terminal-quantity-selector.entry.js +2 -2
  283. package/dist/esm/{terminal.service-Sg45obrZ.js → terminal.service-0oISl5j-.js} +2 -2
  284. package/dist/esm/{utils-De6tr4ug.js → utils-BTtxWI2r.js} +1 -1
  285. package/dist/esm/{utils-DJOBwFeP.js → utils-BxYS3WDw.js} +1 -1
  286. package/dist/esm/{utils-jaFbbifV.js → utils-DcfpJGDZ.js} +1 -1
  287. package/dist/esm/webcomponents.js +1 -1
  288. package/dist/module/ApplePay.js +0 -4
  289. package/dist/module/Plaid.js +2 -2
  290. package/dist/module/additional-questions2.js +1 -1
  291. package/dist/module/bank-account-billing-form-simple2.js +1 -1
  292. package/dist/module/bank-account-document-form-inputs2.js +1 -1
  293. package/dist/module/bank-account-form-inputs-canada2.js +1 -1
  294. package/dist/module/bank-account-form-inputs2.js +1 -1
  295. package/dist/module/bank-account-form2.js +2 -2
  296. package/dist/module/bank-account-read-only-value2.js +1 -1
  297. package/dist/module/business-bank-account-form-step2.js +1 -1
  298. package/dist/module/business-core-info2.js +2 -2
  299. package/dist/module/business-representative-form-inputs2.js +2 -2
  300. package/dist/module/business-representative2.js +2 -2
  301. package/dist/module/business-terms-conditions-form-step2.js +1 -1
  302. package/dist/module/card-billing-form-simple2.js +1 -1
  303. package/dist/module/card-form2.js +2 -2
  304. package/dist/module/checkout.store.js +2 -0
  305. package/dist/module/checkouts-list-core2.js +1 -1
  306. package/dist/module/custom-popper2.js +2 -2
  307. package/dist/module/dispute-management-core.js +1 -1
  308. package/dist/module/dispute-response-core.js +1 -1
  309. package/dist/module/form-address-fields2.js +1 -1
  310. package/dist/module/form-control-checkbox2.js +2 -2
  311. package/dist/module/form-control-date2.js +2 -2
  312. package/dist/module/form-control-file-v22.js +1 -1
  313. package/dist/module/form-control-file2.js +2 -2
  314. package/dist/module/form-control-monetary-provisioning2.js +2 -2
  315. package/dist/module/form-control-monetary2.js +3 -3
  316. package/dist/module/form-control-number-masked2.js +2 -2
  317. package/dist/module/form-control-number2.js +2 -2
  318. package/dist/module/form-control-radio2.js +2 -2
  319. package/dist/module/form-control-select2.js +2 -2
  320. package/dist/module/form-control-text2.js +2 -2
  321. package/dist/module/form-control-textarea2.js +2 -2
  322. package/dist/module/gross-payment-chart-core2.js +2 -2
  323. package/dist/module/hidden-input2.js +1 -1
  324. package/dist/module/identity-address-form2.js +1 -1
  325. package/dist/module/iframe-input2.js +3 -3
  326. package/dist/module/internal-button2.js +1 -1
  327. package/dist/module/justifi-additional-statement2.js +1 -1
  328. package/dist/module/justifi-apple-pay2.js +1 -7
  329. package/dist/module/justifi-bank-account-billing-form-simple.js +1 -1
  330. package/dist/module/justifi-bank-account-form.js +1 -1
  331. package/dist/module/justifi-billing-form-full.js +1 -1
  332. package/dist/module/justifi-billing-form.js +1 -1
  333. package/dist/module/justifi-business-details.js +64 -27
  334. package/dist/module/justifi-button2.js +1 -1
  335. package/dist/module/justifi-cancellation-policy2.js +1 -1
  336. package/dist/module/justifi-card-billing-form-simple.js +1 -1
  337. package/dist/module/justifi-card-form.js +1 -1
  338. package/dist/module/justifi-checkout-summary2.js +2 -2
  339. package/dist/module/justifi-checkout.js +4 -7
  340. package/dist/module/justifi-checkouts-list-filters.js +2 -2
  341. package/dist/module/justifi-checkouts-list.js +2 -2
  342. package/dist/module/justifi-customer-details2.js +1 -1
  343. package/dist/module/justifi-dispute-management.js +1 -1
  344. package/dist/module/justifi-dispute-notification2.js +3 -3
  345. package/dist/module/justifi-dispute-response2.js +1 -1
  346. package/dist/module/justifi-duplicate-charge2.js +1 -1
  347. package/dist/module/justifi-electronic-evidence2.js +1 -1
  348. package/dist/module/justifi-google-pay2.js +2 -0
  349. package/dist/module/justifi-header2.js +1 -1
  350. package/dist/module/justifi-modular-checkout2.js +31 -1
  351. package/dist/module/justifi-order-terminals.js +2 -2
  352. package/dist/module/justifi-payment-details.js +71 -29
  353. package/dist/module/justifi-payment-provisioning.js +1 -1
  354. package/dist/module/justifi-payment-transactions-list.js +2 -2
  355. package/dist/module/justifi-payments-list-filters.js +2 -2
  356. package/dist/module/justifi-payments-list.js +137 -18
  357. package/dist/module/justifi-payout-details.js +76 -21
  358. package/dist/module/justifi-payout-transactions-list.js +2 -2
  359. package/dist/module/justifi-payouts-list-filters.js +3 -3
  360. package/dist/module/justifi-payouts-list.js +174 -20
  361. package/dist/module/justifi-product-or-service2.js +1 -1
  362. package/dist/module/justifi-refund-payment.js +1 -1
  363. package/dist/module/justifi-refund-policy2.js +1 -1
  364. package/dist/module/justifi-save-new-payment-method.js +1 -1
  365. package/dist/module/justifi-saved-payment-method.js +1 -1
  366. package/dist/module/justifi-season-interruption-insurance.js +1 -1
  367. package/dist/module/justifi-sezzle-payment-method2.js +1 -1
  368. package/dist/module/justifi-shipping-details2.js +1 -1
  369. package/dist/module/justifi-skeleton.js +1 -1
  370. package/dist/module/justifi-terminal-orders-list-filters.js +4 -4
  371. package/dist/module/justifi-terminal-orders-list.js +2 -2
  372. package/dist/module/justifi-terminals-list-filters.js +2 -2
  373. package/dist/module/justifi-terminals-list.js +190 -20
  374. package/dist/module/justifi-tokenize-payment-method2.js +1 -1
  375. package/dist/module/legal-address-form2.js +1 -1
  376. package/dist/module/owner-details2.js +1 -1
  377. package/dist/module/owner-form-core2.js +1 -1
  378. package/dist/module/owner-form-inputs2.js +2 -2
  379. package/dist/module/owner-form2.js +1 -1
  380. package/dist/module/package.js +1 -1
  381. package/dist/module/payment-method-option.js +1 -1
  382. package/dist/module/payment-provisioning-form-buttons2.js +1 -1
  383. package/dist/module/payment-provisioning-form-steps2.js +1 -1
  384. package/dist/module/payouts-status.js +21 -1
  385. package/dist/module/radio-list-item2.js +1 -1
  386. package/dist/module/representative-details2.js +1 -1
  387. package/dist/module/save-new-payment-method2.js +1 -1
  388. package/dist/module/table-filters-menu2.js +1 -1
  389. package/dist/module/terminal-orders-list-core2.js +2 -2
  390. package/dist/module/terminal-quantity-selector2.js +1 -1
  391. package/dist/module/utils2.js +1 -1
  392. package/dist/types/api/ApplePay.d.ts +0 -7
  393. package/dist/types/components/business-details/justifi-business-details.d.ts +7 -2
  394. package/dist/types/components/checkout/justifi-checkout.d.ts +0 -1
  395. package/dist/types/components/modular-checkout/justifi-modular-checkout.d.ts +2 -0
  396. package/dist/types/components/modular-checkout/sub-components/justifi-google-pay.d.ts +1 -0
  397. package/dist/types/components/payment-details/justifi-payment-details.d.ts +7 -4
  398. package/dist/types/components/payments-list/justifi-payments-list.d.ts +19 -2
  399. package/dist/types/components/payout-details/justifi-payout-details.d.ts +10 -2
  400. package/dist/types/components/payouts-list/justifi-payouts-list.d.ts +25 -2
  401. package/dist/types/components/terminals-list/justifi-terminals-list.d.ts +24 -2
  402. package/dist/types/components.d.ts +10 -216
  403. package/dist/types/store/checkout.store.d.ts +2 -0
  404. package/dist/webcomponents/{p-DtDYtwHR.js → p--e0ff06z.js} +1 -1
  405. package/dist/webcomponents/p-017edf85.entry.js +1 -0
  406. package/dist/webcomponents/p-032b4553.entry.js +1 -0
  407. package/dist/webcomponents/p-042daaf8.entry.js +1 -0
  408. package/dist/webcomponents/p-0638f0bd.entry.js +1 -0
  409. package/dist/webcomponents/p-06e88d51.entry.js +1 -0
  410. package/dist/webcomponents/{p-8d215ad8.entry.js → p-09d2efad.entry.js} +1 -1
  411. package/dist/webcomponents/p-0b3f4f22.entry.js +1 -0
  412. package/dist/webcomponents/{p-8926baef.entry.js → p-0e9cb724.entry.js} +1 -1
  413. package/dist/webcomponents/{p-c499a613.entry.js → p-10be75b8.entry.js} +1 -1
  414. package/dist/webcomponents/p-11faee45.entry.js +1 -0
  415. package/dist/webcomponents/p-1e080e95.entry.js +1 -0
  416. package/dist/webcomponents/p-1e66d430.entry.js +1 -0
  417. package/dist/webcomponents/{p-de4c796a.entry.js → p-1e877e0a.entry.js} +1 -1
  418. package/dist/webcomponents/p-238163d8.entry.js +1 -0
  419. package/dist/webcomponents/{p-5d2bcf39.entry.js → p-2425a375.entry.js} +1 -1
  420. package/dist/webcomponents/p-24935254.entry.js +1 -0
  421. package/dist/webcomponents/{p-938e4dc8.entry.js → p-256c5509.entry.js} +1 -1
  422. package/dist/webcomponents/p-259ea5e0.entry.js +1 -0
  423. package/dist/webcomponents/p-2LVpxCS_.js +1 -0
  424. package/dist/webcomponents/p-2b25c768.entry.js +1 -0
  425. package/dist/webcomponents/{p-89bf64ef.entry.js → p-354fb3c4.entry.js} +1 -1
  426. package/dist/webcomponents/{p-257597f1.entry.js → p-3c046adc.entry.js} +1 -1
  427. package/dist/webcomponents/p-4f57368a.entry.js +1 -0
  428. package/dist/webcomponents/p-52908814.entry.js +1 -0
  429. package/dist/webcomponents/p-587886f1.entry.js +1 -0
  430. package/dist/webcomponents/p-5ef355ce.entry.js +1 -0
  431. package/dist/webcomponents/p-608a41d2.entry.js +1 -0
  432. package/dist/webcomponents/p-61ebdd8b.entry.js +1 -0
  433. package/dist/webcomponents/{p-a3dadb4c.entry.js → p-647668b6.entry.js} +1 -1
  434. package/dist/webcomponents/p-6917aa3c.entry.js +1 -0
  435. package/dist/webcomponents/{p-d072a65f.entry.js → p-6d81822f.entry.js} +1 -1
  436. package/dist/webcomponents/{p-3e74bd93.entry.js → p-6ecb3ef9.entry.js} +1 -1
  437. package/dist/webcomponents/p-80652cf8.entry.js +1 -0
  438. package/dist/webcomponents/{p-b322d2f3.entry.js → p-8253ef9f.entry.js} +1 -1
  439. package/dist/webcomponents/p-82fe02e4.entry.js +1 -0
  440. package/dist/webcomponents/p-83147f23.entry.js +1 -0
  441. package/dist/webcomponents/p-87a4b33f.entry.js +1 -0
  442. package/dist/webcomponents/p-8c2427ed.entry.js +1 -0
  443. package/dist/webcomponents/p-92de00d7.entry.js +1 -0
  444. package/dist/webcomponents/p-9581d6a1.entry.js +1 -0
  445. package/dist/webcomponents/p-9870fff0.entry.js +1 -0
  446. package/dist/webcomponents/{p-7791b55e.entry.js → p-9db1444f.entry.js} +1 -1
  447. package/dist/webcomponents/p-9f74d7ea.entry.js +1 -0
  448. package/dist/webcomponents/p-B--N37zY.js +1 -0
  449. package/dist/webcomponents/p-B5vVjDc_.js +1 -0
  450. package/dist/webcomponents/p-BArmtmkq.js +1 -0
  451. package/dist/webcomponents/{p-CTwm3w6I.js → p-BRnBHsdq.js} +1 -1
  452. package/dist/webcomponents/p-BsQy297i.js +1 -0
  453. package/dist/webcomponents/p-CDf5H0TB.js +1 -0
  454. package/dist/webcomponents/{p-B2OPgLr1.js → p-CR_-qIuN.js} +1 -1
  455. package/dist/webcomponents/{p-g6a7Gl9y.js → p-CUI41_5y.js} +1 -1
  456. package/dist/webcomponents/p-CX36GHQP.js +1 -0
  457. package/dist/webcomponents/p-CXKOe1m5.js +1 -0
  458. package/dist/webcomponents/{p-CEnTtUmd.js → p-CYQvLgSs.js} +1 -1
  459. package/dist/webcomponents/p-Cej-1bD6.js +1 -0
  460. package/dist/webcomponents/p-Cf6HoQKl.js +1 -0
  461. package/dist/webcomponents/{p-lFx33NDk.js → p-CsdYMTrc.js} +1 -1
  462. package/dist/webcomponents/{p-CzdAS9Jo.js → p-D1D2eC05.js} +1 -1
  463. package/dist/webcomponents/p-D4OlsyTo.js +1 -0
  464. package/dist/webcomponents/{p-CbM9cuX_.js → p-DPmnGTmg.js} +1 -1
  465. package/dist/webcomponents/p-DWevPe7C.js +1 -0
  466. package/dist/webcomponents/{p-ChUBhd2W.js → p-Dbg501Lu.js} +1 -1
  467. package/dist/webcomponents/p-DcBvJu0k.js +1 -0
  468. package/dist/webcomponents/p-DkdzUTnl.js +1 -0
  469. package/dist/webcomponents/{p-D50Rx76J.js → p-DnrawQn3.js} +1 -1
  470. package/dist/webcomponents/p-GJyHX3us.js +1 -0
  471. package/dist/webcomponents/{p-BGHzl-3b.js → p-GP5gWjhc.js} +1 -1
  472. package/dist/webcomponents/p-MDZuGvsl.js +1 -0
  473. package/dist/webcomponents/p-XrKLre8M.js +1 -0
  474. package/dist/webcomponents/p-a7a1b168.entry.js +1 -0
  475. package/dist/webcomponents/p-b06910b0.entry.js +1 -0
  476. package/dist/webcomponents/{p-d34f497c.entry.js → p-b483e71b.entry.js} +1 -1
  477. package/dist/webcomponents/p-b6d59ff4.entry.js +1 -0
  478. package/dist/webcomponents/{p-4af5c0e3.entry.js → p-b76b743e.entry.js} +1 -1
  479. package/dist/webcomponents/p-b8c59954.entry.js +1 -0
  480. package/dist/webcomponents/{p-431ad048.entry.js → p-bc2af6b4.entry.js} +1 -1
  481. package/dist/webcomponents/p-befe01ef.entry.js +1 -0
  482. package/dist/webcomponents/p-bfe2583d.entry.js +1 -0
  483. package/dist/webcomponents/{p-CwdQ1VdH.js → p-bn_huKYG.js} +1 -1
  484. package/dist/webcomponents/p-c4767c7b.entry.js +1 -0
  485. package/dist/webcomponents/{p-D_7pcNhE.js → p-cXPhRFs-.js} +1 -1
  486. package/dist/webcomponents/p-cd267d76.entry.js +1 -0
  487. package/dist/webcomponents/p-cf31ccdd.entry.js +1 -0
  488. package/dist/webcomponents/p-d253a573.entry.js +1 -0
  489. package/dist/webcomponents/p-d3829e18.entry.js +1 -0
  490. package/dist/webcomponents/{p-38520b29.entry.js → p-d58a330d.entry.js} +1 -1
  491. package/dist/webcomponents/p-d878df6c.entry.js +1 -0
  492. package/dist/webcomponents/{p-bbcaa5cc.entry.js → p-ddf699e6.entry.js} +4 -4
  493. package/dist/webcomponents/{p-1c54dc53.entry.js → p-e6e56dbb.entry.js} +1 -1
  494. package/dist/webcomponents/p-ea30cf08.entry.js +1 -0
  495. package/dist/webcomponents/p-ed580b3c.entry.js +1 -0
  496. package/dist/webcomponents/p-edf5a854.entry.js +1 -0
  497. package/dist/webcomponents/p-f481695c.entry.js +1 -0
  498. package/dist/webcomponents/p-f4b390bc.entry.js +1 -0
  499. package/dist/webcomponents/{p-f68bc78d.entry.js → p-f91c49a2.entry.js} +1 -1
  500. package/dist/webcomponents/p-fc7ba195.entry.js +1 -0
  501. package/dist/webcomponents/{p-BIiEPAAI.js → p-hhdRync5.js} +1 -1
  502. package/dist/webcomponents/p-niGr4RT2.js +1 -0
  503. package/dist/webcomponents/{p-Da4efjxw.js → p-pL4dNfsl.js} +1 -1
  504. package/dist/webcomponents/p-qcQTYcr3.js +1 -0
  505. package/dist/webcomponents/p-uCg79W3M.js +1 -0
  506. package/dist/webcomponents/{p-CjuaXEuI.js → p-x9fFFf7F.js} +1 -1
  507. package/dist/webcomponents/webcomponents.esm.js +1 -1
  508. package/package.json +14 -14
  509. package/dist/cjs/business-details-core.cjs.entry.js +0 -61
  510. package/dist/cjs/get-payout-csv-CFsWBUNg.js +0 -24
  511. package/dist/cjs/payment-details-core.cjs.entry.js +0 -83
  512. package/dist/cjs/payments-list-core.cjs.entry.js +0 -112
  513. package/dist/cjs/payments-table-CUxpxNnc.js +0 -50
  514. package/dist/cjs/payout-details-core.cjs.entry.js +0 -89
  515. package/dist/cjs/payouts-list-core.cjs.entry.js +0 -162
  516. package/dist/cjs/payouts-table-Dex2W8r1.js +0 -34
  517. package/dist/cjs/terminals-list-core.cjs.entry.js +0 -146
  518. package/dist/cjs/terminals-table-DmnAuog5.js +0 -64
  519. package/dist/collection/components/business-details/business-details-core.js +0 -105
  520. package/dist/collection/components/payment-details/payment-details-core.js +0 -127
  521. package/dist/collection/components/payments-list/payments-list-core.js +0 -202
  522. package/dist/collection/components/payout-details/payout-details-core.js +0 -199
  523. package/dist/collection/components/payouts-list/payouts-list-core.js +0 -298
  524. package/dist/collection/components/terminals-list/terminals-list-core.js +0 -262
  525. package/dist/esm/business-details-core.entry.js +0 -59
  526. package/dist/esm/get-payout-csv-CzWaTjoV.js +0 -22
  527. package/dist/esm/payment-details-core.entry.js +0 -81
  528. package/dist/esm/payments-list-core.entry.js +0 -110
  529. package/dist/esm/payments-table-n1VrIKIR.js +0 -46
  530. package/dist/esm/payout-details-core.entry.js +0 -87
  531. package/dist/esm/payouts-list-core.entry.js +0 -160
  532. package/dist/esm/payouts-table-CbzI90ci.js +0 -30
  533. package/dist/esm/terminals-list-core.entry.js +0 -144
  534. package/dist/esm/terminals-table-Bja7MP5H.js +0 -60
  535. package/dist/module/business-details-core.d.ts +0 -11
  536. package/dist/module/business-details-core.js +0 -6
  537. package/dist/module/business-details-core2.js +0 -117
  538. package/dist/module/get-payout-csv.js +0 -22
  539. package/dist/module/payment-details-core.d.ts +0 -11
  540. package/dist/module/payment-details-core.js +0 -6
  541. package/dist/module/payment-details-core2.js +0 -109
  542. package/dist/module/payments-list-core.d.ts +0 -11
  543. package/dist/module/payments-list-core.js +0 -6
  544. package/dist/module/payments-list-core2.js +0 -184
  545. package/dist/module/payout-details-core.d.ts +0 -11
  546. package/dist/module/payout-details-core.js +0 -6
  547. package/dist/module/payout-details-core2.js +0 -118
  548. package/dist/module/payouts-list-core.d.ts +0 -11
  549. package/dist/module/payouts-list-core.js +0 -6
  550. package/dist/module/payouts-list-core2.js +0 -221
  551. package/dist/module/terminals-list-core.d.ts +0 -11
  552. package/dist/module/terminals-list-core.js +0 -6
  553. package/dist/module/terminals-list-core2.js +0 -236
  554. package/dist/types/components/business-details/business-details-core.d.ts +0 -19
  555. package/dist/types/components/payment-details/payment-details-core.d.ts +0 -16
  556. package/dist/types/components/payments-list/payments-list-core.d.ts +0 -28
  557. package/dist/types/components/payout-details/payout-details-core.d.ts +0 -20
  558. package/dist/types/components/payouts-list/payouts-list-core.d.ts +0 -36
  559. package/dist/types/components/terminals-list/terminals-list-core.d.ts +0 -34
  560. package/dist/webcomponents/p-0b95dd8f.entry.js +0 -1
  561. package/dist/webcomponents/p-14bd2686.entry.js +0 -1
  562. package/dist/webcomponents/p-15dfb893.entry.js +0 -1
  563. package/dist/webcomponents/p-15f43759.entry.js +0 -1
  564. package/dist/webcomponents/p-1628613b.entry.js +0 -1
  565. package/dist/webcomponents/p-18fc10ca.entry.js +0 -1
  566. package/dist/webcomponents/p-1a8a6228.entry.js +0 -1
  567. package/dist/webcomponents/p-1b92fb9a.entry.js +0 -1
  568. package/dist/webcomponents/p-1fe99fde.entry.js +0 -1
  569. package/dist/webcomponents/p-20b0f88b.entry.js +0 -1
  570. package/dist/webcomponents/p-243e76db.entry.js +0 -1
  571. package/dist/webcomponents/p-26c419f3.entry.js +0 -1
  572. package/dist/webcomponents/p-2f71285a.entry.js +0 -1
  573. package/dist/webcomponents/p-30662daa.entry.js +0 -1
  574. package/dist/webcomponents/p-30f61950.entry.js +0 -1
  575. package/dist/webcomponents/p-38281490.entry.js +0 -1
  576. package/dist/webcomponents/p-39bb134c.entry.js +0 -1
  577. package/dist/webcomponents/p-3O6JkTxx.js +0 -1
  578. package/dist/webcomponents/p-3c50f7aa.entry.js +0 -1
  579. package/dist/webcomponents/p-4db2e291.entry.js +0 -1
  580. package/dist/webcomponents/p-52f7b12f.entry.js +0 -1
  581. package/dist/webcomponents/p-5427d8cb.entry.js +0 -1
  582. package/dist/webcomponents/p-55e7e239.entry.js +0 -1
  583. package/dist/webcomponents/p-58e811cc.entry.js +0 -1
  584. package/dist/webcomponents/p-60d06983.entry.js +0 -1
  585. package/dist/webcomponents/p-6ae9b2c5.entry.js +0 -1
  586. package/dist/webcomponents/p-6ba76fc2.entry.js +0 -1
  587. package/dist/webcomponents/p-6df55396.entry.js +0 -1
  588. package/dist/webcomponents/p-6e5ec134.entry.js +0 -1
  589. package/dist/webcomponents/p-71de86bf.entry.js +0 -1
  590. package/dist/webcomponents/p-7694c903.entry.js +0 -1
  591. package/dist/webcomponents/p-7edf34b4.entry.js +0 -1
  592. package/dist/webcomponents/p-8d5138d8.entry.js +0 -1
  593. package/dist/webcomponents/p-8e9407a1.entry.js +0 -1
  594. package/dist/webcomponents/p-9a142c49.entry.js +0 -1
  595. package/dist/webcomponents/p-B--wlcf0.js +0 -1
  596. package/dist/webcomponents/p-BJtvT9BX.js +0 -1
  597. package/dist/webcomponents/p-BMdYr88u.js +0 -1
  598. package/dist/webcomponents/p-BisDKGW5.js +0 -1
  599. package/dist/webcomponents/p-BlW92We8.js +0 -1
  600. package/dist/webcomponents/p-BrO0HEFJ.js +0 -1
  601. package/dist/webcomponents/p-C-QiUcEa.js +0 -1
  602. package/dist/webcomponents/p-C-Uj-u5r.js +0 -1
  603. package/dist/webcomponents/p-C6IaNDXe.js +0 -1
  604. package/dist/webcomponents/p-C95_YBmG.js +0 -1
  605. package/dist/webcomponents/p-CASlE7cE.js +0 -1
  606. package/dist/webcomponents/p-CSW_ZzE9.js +0 -1
  607. package/dist/webcomponents/p-CXzupAGy.js +0 -1
  608. package/dist/webcomponents/p-CpPclqiT.js +0 -1
  609. package/dist/webcomponents/p-D5MdA21U.js +0 -1
  610. package/dist/webcomponents/p-D68EHdgA.js +0 -1
  611. package/dist/webcomponents/p-DB_pqjwH.js +0 -1
  612. package/dist/webcomponents/p-Df9FVwA7.js +0 -1
  613. package/dist/webcomponents/p-EBsfAkrP.js +0 -1
  614. package/dist/webcomponents/p-N60pPiy5.js +0 -1
  615. package/dist/webcomponents/p-ZiYybdMz.js +0 -1
  616. package/dist/webcomponents/p-_fynNk40.js +0 -1
  617. package/dist/webcomponents/p-a00ccf58.entry.js +0 -1
  618. package/dist/webcomponents/p-a1b87ab5.entry.js +0 -1
  619. package/dist/webcomponents/p-a5d4419e.entry.js +0 -1
  620. package/dist/webcomponents/p-a5e12366.entry.js +0 -1
  621. package/dist/webcomponents/p-a9da0bcd.entry.js +0 -1
  622. package/dist/webcomponents/p-ad785edd.entry.js +0 -1
  623. package/dist/webcomponents/p-b1e0c215.entry.js +0 -1
  624. package/dist/webcomponents/p-b822ab7e.entry.js +0 -1
  625. package/dist/webcomponents/p-bd3f7117.entry.js +0 -1
  626. package/dist/webcomponents/p-c7344d43.entry.js +0 -1
  627. package/dist/webcomponents/p-cc6fa22d.entry.js +0 -1
  628. package/dist/webcomponents/p-cf15a07b.entry.js +0 -1
  629. package/dist/webcomponents/p-d39fbcad.entry.js +0 -1
  630. package/dist/webcomponents/p-d791e38e.entry.js +0 -1
  631. package/dist/webcomponents/p-d8918d5a.entry.js +0 -1
  632. package/dist/webcomponents/p-dda629b6.entry.js +0 -1
  633. package/dist/webcomponents/p-e61aa40b.entry.js +0 -1
  634. package/dist/webcomponents/p-ef30afd5.entry.js +0 -1
  635. package/dist/webcomponents/p-fNBks3-O.js +0 -1
  636. package/dist/webcomponents/p-facdac1b.entry.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{c as r}from"./p-D8GTwl9v.js";import{a7 as s,v as a,x as c,y as d,z as u}from"./p-D50Rx76J.js";import{g as f}from"./p-BFTU3MAI.js";import{F as l}from"./p-N60pPiy5.js";import{p as h}from"./p-CXzupAGy.js";const m=r({focused:{boxShadow:"",border:""},focusedAndInvalid:{boxShadow:"",border:""},fontStyles:{fontFamily:"",fontSize:"",fontWeight:"",lineHeight:"",margin:"",padding:""}}),{state:w,set:b}=m,g=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();b("fontStyles",e);const n=await this.getFocusedStyles();b("focused",n);const t=await this.getFocusedAndInvalidStyles();b("focusedAndInvalid",t)}async getBaseFontStyles(){return new Promise((e=>{setTimeout((()=>{const n=getComputedStyle(this.hiddenInput);e({fontFamily:n.fontFamily,fontSize:n.fontSize,fontWeight:n.fontWeight,lineHeight:n.lineHeight,margin:n.margin,padding:n.padding,color:n.color})}),500)}))}async getFocusedStyles(){return new Promise((e=>{this.focusWithoutPageScroll(this.hiddenInput),setTimeout((()=>{this.hiddenInput.blur();let n=getComputedStyle(this.hiddenInput);e({boxShadow:n.boxShadow,border:n.border})}),500)}))}async getFocusedAndInvalidStyles(){return new Promise((e=>{this.focusWithoutPageScroll(this.hiddenInput),this.errorText="Error",setTimeout((()=>{const n=getComputedStyle(this.hiddenInput),t={boxShadow:n.boxShadow,border:n.border};this.hiddenInput.blur(),e(t)}),500)}))}get part(){return this.isFocused&&this.errorText?s:this.errorText?a:this.isFocused?c:d}render(){return n(t,{key:"101ddb08b5ac601f7cfeafee09d70f54b1d66f59"},n("input",{key:"b6318d9b00eed8d15d212ac7ba43ecb9fdd8e82c",ref:e=>this.hiddenInput=e,type:"text",class:this.errorText?"form-control is-invalid":"form-control",onFocus:()=>this.isFocused=!0,onBlur:()=>this.isFocused=!1,part:this.part,tabindex:"-1",style:{height:"0",opacity:"0",pointerEvents:"none",animation:"none"}}))}};var p,y,v={exports:{}},k=f((p||(p=1,y=v,console.info("\nIFRAME-RESIZER\n\nIframe-Resizer 5 is now available via the following two packages:\n\n * @iframe-resizer/parent\n * @iframe-resizer/child\n\nAdditionally their are also new versions of iframe-resizer for React, Vue, and jQuery.\n\nVersion 5 of iframe-resizer has been extensively rewritten to use modern browser APIs, which has enabled significantly better performance and greater accuracy in the detection of content resizing events.\n\nPlease see https://iframe-resizer.com/upgrade for more details.\n"),function(e){if("undefined"!=typeof window){var n,t,i=0,o=!1,r=!1,s="[iFrameSizer]",a=null,c=window.requestAnimationFrame,d=Object.freeze({max:1,scroll:1,bodyScroll:1,documentElementScroll:1}),u={},f=null,l=Object.freeze({autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,license:"1jqr0si6pnt",log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,mouseEvents:!0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClose:function(){return!0},onClosed:function(){},onInit:function(){},onMessage:function(){k("onMessage function not defined")},onMouseEnter:function(){},onMouseLeave:function(){},onResized:function(){},onScroll:function(){return!0}}),h={};window.jQuery!==e&&((t=window.jQuery).fn?t.fn.iFrameResize||(t.fn.iFrameResize=function(e){return this.filter("iframe").each((function(n,t){A(t,e)})).end()}):v("","Unable to bind to jQuery, it is not fully loaded.")),y.exports=L(),window.iFrameResize=window.iFrameResize||L()}function m(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function w(e,n,t){e.addEventListener(n,t,!1)}function b(e,n,t){e.removeEventListener(n,t,!1)}function g(e){return u[e]?u[e].log:o}function p(e,n){x("log",e,n,g(e))}function v(e,n){x("info",e,n,g(e))}function k(e,n){x("warn",e,n,!0)}function x(e,n,t,i){!0===i&&"object"==typeof window.console&&console[e](function(e){return s+"["+function(e){var n="Host page: "+e;return window.top!==window.self&&(n=window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+e:"Nested host page: "+e),n}(e)+"]"}(n),t)}function z(e){function n(){t("Height"),t("Width"),C((function(){R(W),T(P),l("onResized",W)}),W,"init")}function t(e){var n=Number(u[P]["max"+e]),t=Number(u[P]["min"+e]),i=e.toLowerCase(),o=Number(W[i]);p(P,"Checking "+i+" is in range "+t+"-"+n),o<t&&(o=t,p(P,"Set "+i+" to min value")),o>n&&(o=n,p(P,"Set "+i+" to max value")),W[i]=""+o}function i(e){return A.slice(A.indexOf(":")+7+e)}function o(e,n){var t,i;t=function(){var t,i;N("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(P),{x:Math.floor(Number(n.left)+Number(a.x)),y:Math.floor(Number(n.top)+Number(a.y))}}function c(e){var n=e?r(W.iframe):{x:0,y:0},t={x:Number(W.width)+n.x,y:Number(W.height)+n.y};p(P,"Reposition requested from iFrame (offset x:"+n.x+" y:"+n.y+")"),window.top===window.self?(a=t,d(),p(P,"--")):window.parentIFrame?window.parentIFrame["scrollTo"+(e?"Offset":"")](t.x,t.y):k(P,"Unable to scroll to requested position, window.parentIFrame not found")}function d(){!1===l("onScroll",a)?j():T(P)}function f(e){var n={};if(0===Number(W.width)&&0===Number(W.height)){var t=i(9).split(":");n={x:t[1],y:t[0]}}else n={x:W.width,y:W.height};l(e,{iframe:W.iframe,screenX:Number(n.x),screenY:Number(n.y),type:W.type})}function l(e,n){return I(P,e,n)}var m,g,y,x,z,S,A=e.data,W={},P=null;"[iFrameResizerChild]Ready"===A?function(){for(var e in u)N("iFrame requested init",E(e),u[e].iframe,e)}():s===(""+A).slice(0,13)&&A.slice(13).split(":")[0]in u?(x=(y=A.slice(13).split(":"))[1]?parseInt(y[1],10):0,z=u[y[0]]&&u[y[0]].iframe,S=getComputedStyle(z),W={iframe:z,id:y[0],height:x+function(e){return"border-box"!==e.boxSizing?0:(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}(S)+function(e){return"border-box"!==e.boxSizing?0:(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}(S),width:y[2],type:y[3]},u[P=W.id]&&(u[P].loaded=!0),(g=W.type in{true:1,false:1,undefined:1})&&p(P,"Ignoring init message from meta parent page"),!g&&function(e){var n=!0;return u[e]||(n=!1,k(W.type+" No settings for "+e+". Message was: "+A)),n}(P)&&(p(P,"Received: "+A),m=!0,null===W.iframe&&(k(P,"IFrame ("+W.id+") not found"),m=!1),m&&function(){var n,t=e.origin,i=u[P]&&u[P].checkOrigin;if(i&&""+t!="null"&&!(i.constructor===Array?function(){var e=0,n=!1;for(p(P,"Checking connection is from allowed list of origins: "+i);e<i.length;e++)if(i[e]===t){n=!0;break}return n}():(p(P,"Checking connection is from: "+(n=u[P]&&u[P].remoteHost)),t===n)))throw new Error("Unexpected message received from: "+t+" for "+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[P]&&u[P].firstRun&&u[P]&&(u[P].firstRun=!1),W.type){case"close":F(W.iframe);break;case"message":m=i(6),p(P,"onMessage passed: {iframe: "+W.iframe.id+", message: "+m+"}"),l("onMessage",{iframe:W.iframe,message:JSON.parse(m)}),p(P,"--");break;case"mouseenter":f("onMouseEnter");break;case"mouseleave":f("onMouseLeave");break;case"autoResize":u[P].autoResize=JSON.parse(i(9));break;case"scrollTo":c(!1);break;case"scrollToOffset":c(!0);break;case"pageInfo":o(u[P]&&u[P].iframe,P),function(){function e(e,i){function r(){u[t]?o(u[t].iframe,t):n()}["scroll","resize"].forEach((function(n){p(t,e+n+" listener for sendPageInfo"),i(window,n,r)}))}function n(){e("Remove ",b)}var t=P;e("Add ",w),u[t]&&(u[t].stopPageInfo=n)}();break;case"pageInfoStop":u[P]&&u[P].stopPageInfo&&(u[P].stopPageInfo(),delete u[P].stopPageInfo);break;case"inPageLink":t=i(9).split("#")[1]||"",s=decodeURIComponent(t),(h=document.getElementById(s)||document.getElementsByName(s)[0])?(e=r(h),p(P,"Moving to in page link (#"+t+") at x: "+e.x+" y: "+e.y),a={x:e.x,y:e.y},d(),p(P,"--")):window.top===window.self?p(P,"In page link #"+t+" not found"):window.parentIFrame?window.parentIFrame.moveToAnchor(t):p(P,"In page link #"+t+" not found and window.parentIFrame not found");break;case"reset":O(W);break;case"init":n(),l("onInit",W.iframe);break;default:0===Number(W.width)&&0===Number(W.height)?k("Unsupported message received ("+W.type+"), this is likely due to the iframe containing a later version of iframe-resizer than the parent page"):n()}var e,t,s,h,m}())):v(P,"Ignored: "+A)}function I(e,n,t){var i=null,o=null;if(u[e]){if("function"!=typeof(i=u[e][n]))throw new TypeError(n+" on iFrame["+e+"] is not a function");o=i(t)}return o}function S(e){delete u[e.id]}function F(e){var t=e.id;if(!1!==I(t,"onClose",t)){p(t,"Removing iFrame: "+t);try{e.parentNode&&e.parentNode.removeChild(e)}catch(e){k(e)}I(t,"onClosed",t),p(t,"--"),S(e),n&&(n.disconnect(),n=null)}else p(t,"Close iframe cancelled by onClose event")}function M(n){null===a&&p(n,"Get page position: "+(a={x:window.pageXOffset===e?document.documentElement.scrollLeft:window.pageXOffset,y:window.pageYOffset===e?document.documentElement.scrollTop:window.pageYOffset}).x+","+a.y)}function T(e){null!==a&&(window.scrollTo(a.x,a.y),p(e,"Set page position: "+a.x+","+a.y),j())}function j(){a=null}function O(e){p(e.id,"Size reset requested by "+("init"===e.type?"host page":"iFrame")),M(e.id),C((function(){R(e),N("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"))&&N("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 N(e,n,t,i,o){var r,a=!1;u[i=i||t.id]&&(t&&"contentWindow"in t&&null!==t.contentWindow?(p(i,"["+e+"] Sending msg to iframe["+i+"] ("+n+") targetOrigin: "+(r=u[i]&&u[i].targetOrigin)),t.contentWindow.postMessage(s+n,r)):k(i,"["+e+"] IFrame("+i+") not found"),o&&u[i]&&u[i].warningTimeout&&(u[i].msgTimeout=setTimeout((function(){!u[i]||u[i].loaded||a||(a=!0,k(i,"IFrame has not responded within "+u[i].warningTimeout/1e3+" seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."))}),u[i].warningTimeout)))}function E(e){return e+":"+u[e].bodyMarginV1+":"+u[e].sizeWidth+":"+u[e].log+":"+u[e].interval+":"+u[e].enablePublicMethods+":"+u[e].autoResize+":"+u[e].bodyMargin+":"+u[e].heightCalculationMethod+":"+u[e].bodyBackground+":"+u[e].bodyPadding+":"+u[e].tolerance+":"+u[e].inPageLinks+":"+u[e].resizeFrom+":"+u[e].widthCalculationMethod+":"+u[e].mouseEvents}function A(t,r){function s(e){var n=e.split("Callback");if(2===n.length){var t="on"+n[0].charAt(0).toUpperCase()+n[0].slice(1);this[t]=this[e],delete this[e],k(f,"Deprecated: '"+e+"' has been renamed '"+t+"'. The old method will be removed in the next major version.")}}var a,c,f=function(e){if("string"!=typeof e)throw new TypeError("Invaild id for iFrame. Expected String");var n;return""===e&&(t.id=(n=r&&r.id||l.id+i++,null!==document.getElementById(n)&&(n+=i++),e=n),o=(r||{}).log,p(e,"Added missing iframe ID: "+e+" ("+t.src+")")),e}(t.id);f in u&&"iFrameResizer"in t?k(f,"Ignored iFrame, already setup."):(function(e){var n;e=e||{},u[f]=Object.create(null),u[f].iframe=t,u[f].firstRun=!0,u[f].remoteHost=t.src&&t.src.split("/").slice(0,3).join("/"),function(e){if("object"!=typeof e)throw new TypeError("Options is not an object")}(e),Object.keys(e).forEach(s,e),function(e){for(var n in l)Object.prototype.hasOwnProperty.call(l,n)&&(u[f][n]=Object.prototype.hasOwnProperty.call(e,n)?e[n]:l[n])}(e),u[f]&&(u[f].targetOrigin=!0===u[f].checkOrigin?""===(n=u[f].remoteHost)||null!==n.match(/^(about:blank|javascript:|file:\/\/)/)?"*":n:"*")}(r),function(){switch(p(f,"IFrame scrolling "+(u[f]&&u[f].scrolling?"enabled":"disabled")+" for "+f),t.style.overflow=!1===(u[f]&&u[f].scrolling)?"hidden":"auto",u[f]&&u[f].scrolling){case"omit":break;case!0:t.scrolling="yes";break;case!1:t.scrolling="no";break;default:t.scrolling=u[f]?u[f].scrolling:"no"}}(),function(){function e(e){var n=u[f][e];1/0!==n&&0!==n&&(t.style[e]="number"==typeof n?n+"px":n,p(f,"Set "+e+" = "+t.style[e]))}function n(e){if(u[f]["min"+e]>u[f]["max"+e])throw new Error("Value for min"+e+" can not be greater than max"+e)}n("Height"),n("Width"),e("maxHeight"),e("minHeight"),e("maxWidth"),e("minWidth")}(),"number"!=typeof(u[f]&&u[f].bodyMargin)&&"0"!==(u[f]&&u[f].bodyMargin)||(u[f].bodyMarginV1=u[f].bodyMargin,u[f].bodyMargin=u[f].bodyMargin+"px"),a=E(f),(c=m())&&(n=function(e){if(!t.parentNode)return null;var n=new e((function(e){e.forEach((function(e){Array.prototype.slice.call(e.removedNodes).forEach((function(e){e===t&&F(t)}))}))}));return n.observe(t.parentNode,{childList:!0}),n}(c)),w(t,"load",(function(){N("iFrame.onload",a,t,e,!0),(!u[f]||!u[f].firstRun)&&u[f]&&u[f].heightCalculationMethod in d&&O({iframe:t,height:0,width:0,type:"init"})})),N("init",a,t,e,!0),u[f]&&(u[f].iframe.iFrameResizer={close:F.bind(null,u[f].iframe),removeListeners:S.bind(null,u[f].iframe),resize:N.bind(null,"Window resize","resize",u[f].iframe),moveToAnchor:function(e){N("Move to anchor","moveToAnchor:"+e,u[f].iframe,f)},sendMessage:function(e){N("Send Message","message:"+(e=JSON.stringify(e)),u[f].iframe,f)}}))}function W(e,n){null===f&&(f=setTimeout((function(){f=null,e()}),n))}function P(){"hidden"!==document.visibilityState&&(p("document","Trigger event: Visibility change"),W((function(){H("Tab Visible","resize")}),16))}function H(e,n){Object.keys(u).forEach((function(t){(function(e){return u[e]&&"parent"===u[e].resizeFrom&&u[e].autoResize&&!u[e].firstRun})(t)&&N(e,n,u[t].iframe,t)}))}function L(){function n(e,n){n&&(function(){if(!n.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==n.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+n.tagName+">")}(),A(n,e),t.push(n))}var t;return function(){var e,n=["moz","webkit","o","ms"];for(e=0;e<n.length&&!c;e+=1)c=window[n[e]+"RequestAnimationFrame"];c?c=c.bind(window):p("setup","RequestAnimationFrame not supported")}(),w(window,"message",z),w(window,"resize",(function(){p("window","Trigger event: resize"),W((function(){H("Window resize","resize")}),16)})),w(document,"visibilitychange",P),w(document,"-webkit-visibilitychange",P),function(i,o){switch(t=[],function(e){e&&e.enablePublicMethods&&k("enablePublicMethods option has been removed, public methods are now always available in the iFrame")}(i),typeof o){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(o||"iframe"),n.bind(e,i));break;case"object":n(i,o);break;default:throw new TypeError("Unexpected data type ("+typeof o+")")}return t}}}()),v.exports));class x{constructor(e,n){this.iframe=e,this.iframeOrigin=n}postMessage(e,n){const t=Object.assign({eventType:e},n);this.iframe.contentWindow.postMessage(t,this.iframeOrigin)}addMessageListener(e){window.addEventListener("message",e)}removeMessageListener(e){window.removeEventListener("message",e)}postMessageWithResponseListener(e,n){return new Promise((t=>{const i=n=>{n.data.eventType===e&&(window.removeEventListener("message",i),t(n.data.data))};window.addEventListener("message",i),this.postMessage(e,n)}))}}const z=class{constructor(n){e(this,n),this.iframeLoaded=i(this,"iframeLoaded",7),this.isFocused=!1,this.isValid=!0,this.dispatchMessageEvent=e=>{const{eventType:n,data:t}=e.data;(null==t?void 0:t.id)===this.inputId&&("focused"===n&&(this.isFocused=!0),"blurred"===n&&(this.isFocused=!1))}}disconnectedCallback(){this.frameService.removeMessageListener(this.dispatchMessageEvent)}async validate(){const e=await this.frameService.postMessageWithResponseListener("validate");return this.isValid=e.isValid,this.errorText=e.error.message,e}async tokenize(e,n,t){return this.frameService.postMessageWithResponseListener("tokenize",{clientId:e,paymentMethodMetadata:n,account:t,componentVersion:h.version})}initializeFrameCommunicationService(){var e;this.frameService=new x(this.iframeElement,this.iframeOrigin),null===(e=this.frameService)||void 0===e||e.addMessageListener(this.dispatchMessageEvent)}get part(){return this.isFocused&&!this.isValid?s:this.isValid?this.isFocused?c:d:a}get style(){return this.isFocused?this.isValid?w.focused:w.focusedAndInvalid:null}get urlParams(){const e=Object.fromEntries(Object.entries(w.fontStyles).map((([e,n])=>[e,btoa(String(n))])));return new URLSearchParams(e).toString()}render(){return n(t,{key:"48e69bc02c2aeda1ceb355baf9b1ec5e445e44a5",class:"form-group d-flex flex-column"},n("div",{key:"8ece805fab05473a7cbe8f4c093313cdb43c321c",style:{visibility:this.iframeLoaded?"visible":"hidden",height:this.iframeLoaded?"auto":"0"}},n("label",{key:"f3412b3845d16d30407f86aaa9e924f391cf6541",class:"form-label",htmlFor:"",part:u},this.label||""),n("div",{key:"8557ed13cc67232983e091b40ca1c3a6c0cfdf9c",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:"178d81e1bb1b4b333466a0070c6fa2729f697d2d",id:this.inputId,name:this.inputId,src:`${this.iframeOrigin}?${this.urlParams}`,ref:e=>{this.iframeElement=e,this.initializeFrameCommunicationService()},width:"100%",onLoad:()=>{k({log:!1,onResized:()=>{this.iframeLoaded.emit()}},this.iframeElement)}})),n(l,{key:"b149f245fc1687512189175f7d64b316d394982d",errorText:this.errorText,name:this.inputId})))}get el(){return o(this)}};export{g as hidden_input,z as iframe_input}
1
+ import{r as e,h as n,H as t,c as i,g as o}from"./p-CV0Pyo1O.js";import{c as r}from"./p-D8GTwl9v.js";import{a7 as s,q as a,v as c,w as d,x as u}from"./p-DnrawQn3.js";import{g as f}from"./p-BFTU3MAI.js";import{F as l}from"./p-BsQy297i.js";import{p as h}from"./p-CXKOe1m5.js";const m=r({focused:{boxShadow:"",border:""},focusedAndInvalid:{boxShadow:"",border:""},fontStyles:{fontFamily:"",fontSize:"",fontWeight:"",lineHeight:"",margin:"",padding:""}}),{state:w,set:g}=m,b=class{constructor(n){e(this,n),this.isFocused=!1,this.errorText=""}focusWithoutPageScroll(e){if(e)try{e.focus({preventScroll:!0})}catch(n){const{scrollX:t,scrollY:i}=window;e.focus(),window.scrollTo(t,i)}}async componentDidLoad(){const e=await this.getBaseFontStyles();g("fontStyles",e);const n=await this.getFocusedStyles();g("focused",n);const t=await this.getFocusedAndInvalidStyles();g("focusedAndInvalid",t)}async getBaseFontStyles(){return new Promise((e=>{setTimeout((()=>{const n=getComputedStyle(this.hiddenInput);e({fontFamily:n.fontFamily,fontSize:n.fontSize,fontWeight:n.fontWeight,lineHeight:n.lineHeight,margin:n.margin,padding:n.padding,color:n.color})}),500)}))}async getFocusedStyles(){return new Promise((e=>{this.focusWithoutPageScroll(this.hiddenInput),setTimeout((()=>{this.hiddenInput.blur();let n=getComputedStyle(this.hiddenInput);e({boxShadow:n.boxShadow,border:n.border})}),500)}))}async getFocusedAndInvalidStyles(){return new Promise((e=>{this.focusWithoutPageScroll(this.hiddenInput),this.errorText="Error",setTimeout((()=>{const n=getComputedStyle(this.hiddenInput),t={boxShadow:n.boxShadow,border:n.border};this.hiddenInput.blur(),e(t)}),500)}))}get part(){return this.isFocused&&this.errorText?s:this.errorText?a:this.isFocused?c:d}render(){return n(t,{key:"5697b5e318914b8866bc6ad2fb2009e5f8c8d80f"},n("input",{key:"3370d11bc6e5a49f28dd2e95bf1d92ee7a0dd892",ref:e=>this.hiddenInput=e,type:"text",class:this.errorText?"form-control is-invalid":"form-control",onFocus:()=>this.isFocused=!0,onBlur:()=>this.isFocused=!1,part:this.part,tabindex:"-1",style:{height:"0",opacity:"0",pointerEvents:"none",animation:"none"}}))}};var p,y,v={exports:{}},k=f((p||(p=1,y=v,console.info("\nIFRAME-RESIZER\n\nIframe-Resizer 5 is now available via the following two packages:\n\n * @iframe-resizer/parent\n * @iframe-resizer/child\n\nAdditionally their are also new versions of iframe-resizer for React, Vue, and jQuery.\n\nVersion 5 of iframe-resizer has been extensively rewritten to use modern browser APIs, which has enabled significantly better performance and greater accuracy in the detection of content resizing events.\n\nPlease see https://iframe-resizer.com/upgrade for more details.\n"),function(e){if("undefined"!=typeof window){var n,t,i=0,o=!1,r=!1,s="[iFrameSizer]",a=null,c=window.requestAnimationFrame,d=Object.freeze({max:1,scroll:1,bodyScroll:1,documentElementScroll:1}),u={},f=null,l=Object.freeze({autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,license:"1jqr0si6pnt",log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,mouseEvents:!0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClose:function(){return!0},onClosed:function(){},onInit:function(){},onMessage:function(){k("onMessage function not defined")},onMouseEnter:function(){},onMouseLeave:function(){},onResized:function(){},onScroll:function(){return!0}}),h={};window.jQuery!==e&&((t=window.jQuery).fn?t.fn.iFrameResize||(t.fn.iFrameResize=function(e){return this.filter("iframe").each((function(n,t){W(t,e)})).end()}):v("","Unable to bind to jQuery, it is not fully loaded.")),y.exports=L(),window.iFrameResize=window.iFrameResize||L()}function m(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function w(e,n,t){e.addEventListener(n,t,!1)}function g(e,n,t){e.removeEventListener(n,t,!1)}function b(e){return u[e]?u[e].log:o}function p(e,n){x("log",e,n,b(e))}function v(e,n){x("info",e,n,b(e))}function k(e,n){x("warn",e,n,!0)}function x(e,n,t,i){!0===i&&"object"==typeof window.console&&console[e](function(e){return s+"["+function(e){var n="Host page: "+e;return window.top!==window.self&&(n=window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+e:"Nested host page: "+e),n}(e)+"]"}(n),t)}function I(e){function n(){t("Height"),t("Width"),C((function(){R(A),T(P),l("onResized",A)}),A,"init")}function t(e){var n=Number(u[P]["max"+e]),t=Number(u[P]["min"+e]),i=e.toLowerCase(),o=Number(A[i]);p(P,"Checking "+i+" is in range "+t+"-"+n),o<t&&(o=t,p(P,"Set "+i+" to min value")),o>n&&(o=n,p(P,"Set "+i+" to max value")),A[i]=""+o}function i(e){return W.slice(W.indexOf(":")+7+e)}function o(e,n){var t,i;t=function(){var t,i;E("Send Page Info","pageInfo:"+(t=document.body.getBoundingClientRect(),i=A.iframe.getBoundingClientRect(),JSON.stringify({iframeHeight:i.height,iframeWidth:i.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(i.top-t.top,10),offsetLeft:parseInt(i.left-t.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,documentHeight:document.documentElement.clientHeight,documentWidth:document.documentElement.clientWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})),e,n)},h[i=n]||(h[i]=setTimeout((function(){h[i]=null,t()}),32))}function r(e){var n=e.getBoundingClientRect();return M(P),{x:Math.floor(Number(n.left)+Number(a.x)),y:Math.floor(Number(n.top)+Number(a.y))}}function c(e){var n=e?r(A.iframe):{x:0,y:0},t={x:Number(A.width)+n.x,y:Number(A.height)+n.y};p(P,"Reposition requested from iFrame (offset x:"+n.x+" y:"+n.y+")"),window.top===window.self?(a=t,d(),p(P,"--")):window.parentIFrame?window.parentIFrame["scrollTo"+(e?"Offset":"")](t.x,t.y):k(P,"Unable to scroll to requested position, window.parentIFrame not found")}function d(){!1===l("onScroll",a)?j():T(P)}function f(e){var n={};if(0===Number(A.width)&&0===Number(A.height)){var t=i(9).split(":");n={x:t[1],y:t[0]}}else n={x:A.width,y:A.height};l(e,{iframe:A.iframe,screenX:Number(n.x),screenY:Number(n.y),type:A.type})}function l(e,n){return S(P,e,n)}var m,b,y,x,I,z,W=e.data,A={},P=null;"[iFrameResizerChild]Ready"===W?function(){for(var e in u)E("iFrame requested init",N(e),u[e].iframe,e)}():s===(""+W).slice(0,13)&&W.slice(13).split(":")[0]in u?(x=(y=W.slice(13).split(":"))[1]?parseInt(y[1],10):0,I=u[y[0]]&&u[y[0]].iframe,z=getComputedStyle(I),A={iframe:I,id:y[0],height:x+function(e){return"border-box"!==e.boxSizing?0:(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}(z)+function(e){return"border-box"!==e.boxSizing?0:(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}(z),width:y[2],type:y[3]},u[P=A.id]&&(u[P].loaded=!0),(b=A.type in{true:1,false:1,undefined:1})&&p(P,"Ignoring init message from meta parent page"),!b&&function(e){var n=!0;return u[e]||(n=!1,k(A.type+" No settings for "+e+". Message was: "+W)),n}(P)&&(p(P,"Received: "+W),m=!0,null===A.iframe&&(k(P,"IFrame ("+A.id+") not found"),m=!1),m&&function(){var n,t=e.origin,i=u[P]&&u[P].checkOrigin;if(i&&""+t!="null"&&!(i.constructor===Array?function(){var e=0,n=!1;for(p(P,"Checking connection is from allowed list of origins: "+i);e<i.length;e++)if(i[e]===t){n=!0;break}return n}():(p(P,"Checking connection is from: "+(n=u[P]&&u[P].remoteHost)),t===n)))throw new Error("Unexpected message received from: "+t+" for "+A.iframe.id+". Message was: "+e.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return!0}()&&function(){switch(u[P]&&u[P].firstRun&&u[P]&&(u[P].firstRun=!1),A.type){case"close":F(A.iframe);break;case"message":m=i(6),p(P,"onMessage passed: {iframe: "+A.iframe.id+", message: "+m+"}"),l("onMessage",{iframe:A.iframe,message:JSON.parse(m)}),p(P,"--");break;case"mouseenter":f("onMouseEnter");break;case"mouseleave":f("onMouseLeave");break;case"autoResize":u[P].autoResize=JSON.parse(i(9));break;case"scrollTo":c(!1);break;case"scrollToOffset":c(!0);break;case"pageInfo":o(u[P]&&u[P].iframe,P),function(){function e(e,i){function r(){u[t]?o(u[t].iframe,t):n()}["scroll","resize"].forEach((function(n){p(t,e+n+" listener for sendPageInfo"),i(window,n,r)}))}function n(){e("Remove ",g)}var t=P;e("Add ",w),u[t]&&(u[t].stopPageInfo=n)}();break;case"pageInfoStop":u[P]&&u[P].stopPageInfo&&(u[P].stopPageInfo(),delete u[P].stopPageInfo);break;case"inPageLink":t=i(9).split("#")[1]||"",s=decodeURIComponent(t),(h=document.getElementById(s)||document.getElementsByName(s)[0])?(e=r(h),p(P,"Moving to in page link (#"+t+") at x: "+e.x+" y: "+e.y),a={x:e.x,y:e.y},d(),p(P,"--")):window.top===window.self?p(P,"In page link #"+t+" not found"):window.parentIFrame?window.parentIFrame.moveToAnchor(t):p(P,"In page link #"+t+" not found and window.parentIFrame not found");break;case"reset":O(A);break;case"init":n(),l("onInit",A.iframe);break;default:0===Number(A.width)&&0===Number(A.height)?k("Unsupported message received ("+A.type+"), this is likely due to the iframe containing a later version of iframe-resizer than the parent page"):n()}var e,t,s,h,m}())):v(P,"Ignored: "+W)}function S(e,n,t){var i=null,o=null;if(u[e]){if("function"!=typeof(i=u[e][n]))throw new TypeError(n+" on iFrame["+e+"] is not a function");o=i(t)}return o}function z(e){delete u[e.id]}function F(e){var t=e.id;if(!1!==S(t,"onClose",t)){p(t,"Removing iFrame: "+t);try{e.parentNode&&e.parentNode.removeChild(e)}catch(e){k(e)}S(t,"onClosed",t),p(t,"--"),z(e),n&&(n.disconnect(),n=null)}else p(t,"Close iframe cancelled by onClose event")}function M(n){null===a&&p(n,"Get page position: "+(a={x:window.pageXOffset===e?document.documentElement.scrollLeft:window.pageXOffset,y:window.pageYOffset===e?document.documentElement.scrollTop:window.pageYOffset}).x+","+a.y)}function T(e){null!==a&&(window.scrollTo(a.x,a.y),p(e,"Set page position: "+a.x+","+a.y),j())}function j(){a=null}function O(e){p(e.id,"Size reset requested by "+("init"===e.type?"host page":"iFrame")),M(e.id),C((function(){R(e),E("reset","reset",e.iframe,e.id)}),e,"reset")}function R(e){function n(n){r||"0"!==e[n]||(r=!0,p(i,"Hidden iFrame detected, creating visibility listener"),function(){function e(){Object.keys(u).forEach((function(e){!function(e){function n(n){return"0px"===(u[e]&&u[e].iframe.style[n])}u[e]&&null!==u[e].iframe.offsetParent&&(n("height")||n("width"))&&E("Visibility change","resize",u[e].iframe,e)}(e)}))}function n(n){p("window","Mutation observed: "+n[0].target+" "+n[0].type),A(e,16)}var t,i=m();i&&(t=document.querySelector("body"),new i(n).observe(t,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0}))}())}function t(t){!function(n){e.id?(e.iframe.style[n]=e[n]+"px",p(e.id,"IFrame ("+i+") "+n+" set to "+e[n]+"px")):p("undefined","messageData id not set")}(t),n(t)}var i=e.iframe.id;u[i]&&(u[i].sizeHeight&&t("height"),u[i].sizeWidth&&t("width"))}function C(e,n,t){t!==n.type&&c&&!window.jasmine?(p(n.id,"Requesting animation frame"),c(e)):e()}function E(e,n,t,i,o){var r,a=!1;u[i=i||t.id]&&(t&&"contentWindow"in t&&null!==t.contentWindow?(p(i,"["+e+"] Sending msg to iframe["+i+"] ("+n+") targetOrigin: "+(r=u[i]&&u[i].targetOrigin)),t.contentWindow.postMessage(s+n,r)):k(i,"["+e+"] IFrame("+i+") not found"),o&&u[i]&&u[i].warningTimeout&&(u[i].msgTimeout=setTimeout((function(){!u[i]||u[i].loaded||a||(a=!0,k(i,"IFrame has not responded within "+u[i].warningTimeout/1e3+" seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."))}),u[i].warningTimeout)))}function N(e){return e+":"+u[e].bodyMarginV1+":"+u[e].sizeWidth+":"+u[e].log+":"+u[e].interval+":"+u[e].enablePublicMethods+":"+u[e].autoResize+":"+u[e].bodyMargin+":"+u[e].heightCalculationMethod+":"+u[e].bodyBackground+":"+u[e].bodyPadding+":"+u[e].tolerance+":"+u[e].inPageLinks+":"+u[e].resizeFrom+":"+u[e].widthCalculationMethod+":"+u[e].mouseEvents}function W(t,r){function s(e){var n=e.split("Callback");if(2===n.length){var t="on"+n[0].charAt(0).toUpperCase()+n[0].slice(1);this[t]=this[e],delete this[e],k(f,"Deprecated: '"+e+"' has been renamed '"+t+"'. The old method will be removed in the next major version.")}}var a,c,f=function(e){if("string"!=typeof e)throw new TypeError("Invaild id for iFrame. Expected String");var n;return""===e&&(t.id=(n=r&&r.id||l.id+i++,null!==document.getElementById(n)&&(n+=i++),e=n),o=(r||{}).log,p(e,"Added missing iframe ID: "+e+" ("+t.src+")")),e}(t.id);f in u&&"iFrameResizer"in t?k(f,"Ignored iFrame, already setup."):(function(e){var n;e=e||{},u[f]=Object.create(null),u[f].iframe=t,u[f].firstRun=!0,u[f].remoteHost=t.src&&t.src.split("/").slice(0,3).join("/"),function(e){if("object"!=typeof e)throw new TypeError("Options is not an object")}(e),Object.keys(e).forEach(s,e),function(e){for(var n in l)Object.prototype.hasOwnProperty.call(l,n)&&(u[f][n]=Object.prototype.hasOwnProperty.call(e,n)?e[n]:l[n])}(e),u[f]&&(u[f].targetOrigin=!0===u[f].checkOrigin?""===(n=u[f].remoteHost)||null!==n.match(/^(about:blank|javascript:|file:\/\/)/)?"*":n:"*")}(r),function(){switch(p(f,"IFrame scrolling "+(u[f]&&u[f].scrolling?"enabled":"disabled")+" for "+f),t.style.overflow=!1===(u[f]&&u[f].scrolling)?"hidden":"auto",u[f]&&u[f].scrolling){case"omit":break;case!0:t.scrolling="yes";break;case!1:t.scrolling="no";break;default:t.scrolling=u[f]?u[f].scrolling:"no"}}(),function(){function e(e){var n=u[f][e];1/0!==n&&0!==n&&(t.style[e]="number"==typeof n?n+"px":n,p(f,"Set "+e+" = "+t.style[e]))}function n(e){if(u[f]["min"+e]>u[f]["max"+e])throw new Error("Value for min"+e+" can not be greater than max"+e)}n("Height"),n("Width"),e("maxHeight"),e("minHeight"),e("maxWidth"),e("minWidth")}(),"number"!=typeof(u[f]&&u[f].bodyMargin)&&"0"!==(u[f]&&u[f].bodyMargin)||(u[f].bodyMarginV1=u[f].bodyMargin,u[f].bodyMargin=u[f].bodyMargin+"px"),a=N(f),(c=m())&&(n=function(e){if(!t.parentNode)return null;var n=new e((function(e){e.forEach((function(e){Array.prototype.slice.call(e.removedNodes).forEach((function(e){e===t&&F(t)}))}))}));return n.observe(t.parentNode,{childList:!0}),n}(c)),w(t,"load",(function(){E("iFrame.onload",a,t,e,!0),(!u[f]||!u[f].firstRun)&&u[f]&&u[f].heightCalculationMethod in d&&O({iframe:t,height:0,width:0,type:"init"})})),E("init",a,t,e,!0),u[f]&&(u[f].iframe.iFrameResizer={close:F.bind(null,u[f].iframe),removeListeners:z.bind(null,u[f].iframe),resize:E.bind(null,"Window resize","resize",u[f].iframe),moveToAnchor:function(e){E("Move to anchor","moveToAnchor:"+e,u[f].iframe,f)},sendMessage:function(e){E("Send Message","message:"+(e=JSON.stringify(e)),u[f].iframe,f)}}))}function A(e,n){null===f&&(f=setTimeout((function(){f=null,e()}),n))}function P(){"hidden"!==document.visibilityState&&(p("document","Trigger event: Visibility change"),A((function(){H("Tab Visible","resize")}),16))}function H(e,n){Object.keys(u).forEach((function(t){(function(e){return u[e]&&"parent"===u[e].resizeFrom&&u[e].autoResize&&!u[e].firstRun})(t)&&E(e,n,u[t].iframe,t)}))}function L(){function n(e,n){n&&(function(){if(!n.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==n.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+n.tagName+">")}(),W(n,e),t.push(n))}var t;return function(){var e,n=["moz","webkit","o","ms"];for(e=0;e<n.length&&!c;e+=1)c=window[n[e]+"RequestAnimationFrame"];c?c=c.bind(window):p("setup","RequestAnimationFrame not supported")}(),w(window,"message",I),w(window,"resize",(function(){p("window","Trigger event: resize"),A((function(){H("Window resize","resize")}),16)})),w(document,"visibilitychange",P),w(document,"-webkit-visibilitychange",P),function(i,o){switch(t=[],function(e){e&&e.enablePublicMethods&&k("enablePublicMethods option has been removed, public methods are now always available in the iFrame")}(i),typeof o){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(o||"iframe"),n.bind(e,i));break;case"object":n(i,o);break;default:throw new TypeError("Unexpected data type ("+typeof o+")")}return t}}}()),v.exports));class x{constructor(e,n){this.iframe=e,this.iframeOrigin=n}postMessage(e,n){const t=Object.assign({eventType:e},n);this.iframe.contentWindow.postMessage(t,this.iframeOrigin)}addMessageListener(e){window.addEventListener("message",e)}removeMessageListener(e){window.removeEventListener("message",e)}postMessageWithResponseListener(e,n){return new Promise((t=>{const i=n=>{n.data.eventType===e&&(window.removeEventListener("message",i),t(n.data.data))};window.addEventListener("message",i),this.postMessage(e,n)}))}}const I=class{constructor(n){e(this,n),this.iframeLoaded=i(this,"iframeLoaded",7),this.isFocused=!1,this.isValid=!0,this.dispatchMessageEvent=e=>{const{eventType:n,data:t}=e.data;(null==t?void 0:t.id)===this.inputId&&("focused"===n&&(this.isFocused=!0),"blurred"===n&&(this.isFocused=!1))}}disconnectedCallback(){this.frameService.removeMessageListener(this.dispatchMessageEvent)}async validate(){const e=await this.frameService.postMessageWithResponseListener("validate");return this.isValid=e.isValid,this.errorText=e.error.message,e}async tokenize(e,n,t){return this.frameService.postMessageWithResponseListener("tokenize",{clientId:e,paymentMethodMetadata:n,account:t,componentVersion:h.version})}initializeFrameCommunicationService(){var e;this.frameService=new x(this.iframeElement,this.iframeOrigin),null===(e=this.frameService)||void 0===e||e.addMessageListener(this.dispatchMessageEvent)}get part(){return this.isFocused&&!this.isValid?s:this.isValid?this.isFocused?c:d:a}get style(){return this.isFocused?this.isValid?w.focused:w.focusedAndInvalid:null}get urlParams(){const e=Object.fromEntries(Object.entries(w.fontStyles).map((([e,n])=>[e,btoa(String(n))])));return new URLSearchParams(e).toString()}render(){return n(t,{key:"e85f5a2417ccc46ac8df23a695c6ef3fcd71577e",class:"form-group d-flex flex-column"},n("div",{key:"02878f7fb1e720aa97a67e72d5f1711e0fbd0668",style:{visibility:this.iframeLoaded?"visible":"hidden",height:this.iframeLoaded?"auto":"0"}},n("label",{key:"57c46b739fb284c4ee618594f04cc5ff128bf16c",class:"form-label",htmlFor:"",part:u},this.label||""),n("div",{key:"4634650c721673a52ea55e331154a624c19266dc",class:"p-0 d-flex form-control "+(this.isValid?"":"is-invalid"),part:this.part,style:Object.assign(Object.assign({},this.style),{overflow:"hidden"})},n("iframe",{key:"facd226e399f41537657603c50c45887c1177c42",id:this.inputId,name:this.inputId,src:`${this.iframeOrigin}?${this.urlParams}`,ref:e=>{this.iframeElement=e,this.initializeFrameCommunicationService()},width:"100%",onLoad:()=>{k({log:!1,onResized:()=>{this.iframeLoaded.emit()}},this.iframeElement)}})),n(l,{key:"73c34b9ab89a21e6b3203904988bf8a542eb01f8",errorText:this.errorText,name:this.inputId})))}get el(){return o(this)}};export{b as hidden_input,I as iframe_input}
@@ -1 +1 @@
1
- import{r as e,h as t,H as s,c as a}from"./p-CV0Pyo1O.js";import{C as i}from"./p-BcNb9bVO.js";import{n as d}from"./p-BnjCmwMr.js";import{b as o,c as l}from"./p-_-2E_vYf.js";import{I as r}from"./p-Ce_F4E0f.js";import{v as c,w as h,x as n,y as f,z as b}from"./p-D50Rx76J.js";import{F as u}from"./p-N60pPiy5.js";import"./p-CZfYo5-1.js";const m=class{constructor(t){e(this,t),this.country=i.USA}render(){var e,a,r,c,h,n,f,b,u,m;const v=l[this.country],p=o[this.country];return t(s,{key:"c7b688749c7e08a18fd2000e8d441dc01e9b2e8d"},t("div",{key:"3e133db2244db25e8f9841a48ecb28f923eaab22",class:"row gy-3"},t("div",{key:"aa765dd77b4c9a32f1446d2034a9bc5e95bb9ca1",class:"col-12"},t("form-control-text",{key:"e02f2088d591c1979afcd37a1ba24559a9278ee5",name:"line1",label:"Street Address",inputHandler:this.inputHandler,defaultValue:null===(e=this.defaultValues)||void 0===e?void 0:e.line1,errorText:null===(a=this.errors)||void 0===a?void 0:a.line1,helpText:"No PO Boxes."})),t("div",{key:"9966e1ed471af132236d022be860fd1adb56b61a",class:"col-12"},t("form-control-text",{key:"b1a434bf3726ff08f5372d9d350fc5251129815a",name:"line2",label:"Address Line 2 (optional)",inputHandler:this.inputHandler,defaultValue:null===(r=this.defaultValues)||void 0===r?void 0:r.line2,errorText:null===(c=this.errors)||void 0===c?void 0:c.line2})),t("div",{key:"a5027c59a7fc4f1293578ea165d1dad53e55d361",class:"col-12"},t("form-control-text",{key:"e1567856de791bc32e0a85caeb5464b2f63f5f63",name:"city",label:"City",inputHandler:this.inputHandler,defaultValue:null===(h=this.defaultValues)||void 0===h?void 0:h.city,errorText:null===(n=this.errors)||void 0===n?void 0:n.city})),t("div",{key:"b131845ebeaa5e7bbfd745d724932174fe785de7",class:"col-12 col-md-6"},t("form-control-select",{key:"c590815dfc61241b7c1fc9172dad75a7116b703c",name:"state",label:v.stateLabel,options:p.stateOptions,inputHandler:this.inputHandler,defaultValue:null===(f=this.defaultValues)||void 0===f?void 0:f.state,errorText:null===(b=this.errors)||void 0===b?void 0:b.state})),t("div",{key:"f896d6370e956ab8b1750b6164ec6cd5c1e8b9ee",class:"col-12 col-md-6"},t("form-control-text",{key:"469fb8945ca6603a503f32971ef9d2afa3e8a30e",name:"postal_code",label:v.postalLabel,inputHandler:this.inputHandler,defaultValue:null===(u=this.defaultValues)||void 0===u?void 0:u.postal_code,errorText:null===(m=this.errors)||void 0===m?void 0:m.postal_code,maxLength:this.country===i.USA?5:7,keyDownHandler:this.country===i.USA?d:void 0}))))}},v=class{constructor(t){e(this,t),this.formControlInput=a(this,"formControlInput",7),this.formControlBlur=a(this,"formControlBlur",7),this.imask=null,this.isFocused=!1,this.inputHandler=()=>{},this.disabled=!1,this.initializeIMask=()=>{this.textInput&&(this.imask=r(this.textInput,{mask:this.mask}),this.imask.on("accept",(()=>{var e;const t=null===(e=this.imask)||void 0===e?void 0:e.unmaskedValue;void 0!==t&&this.inputHandler(this.name,t)})),this.textInput.addEventListener("blur",(()=>this.formControlBlur.emit())))},this.handleFormControlInput=e=>{var t;const s=e.target,a=s.getAttribute("name"),i=(null===(t=this.imask)||void 0===t?void 0:t.unmaskedValue)||s.value;this.formControlInput.emit({name:a,value:i})},this.updateInput=e=>{this.imask&&e&&(this.imask.value=String(e))}}handleDefaultValueChange(e){this.initializeIMask(),this.updateInput(e)}disconnectedCallback(){var e;null===(e=this.imask)||void 0===e||e.destroy()}componentDidLoad(){this.textInput&&(this.initializeIMask(),this.updateInput(this.defaultValue))}get part(){return this.errorText?c:this.disabled?h:this.isFocused?n:f}render(){return t(s,{key:"63f9e8fbdf09ad22d7744b074d1646e6ea620b61"},t("div",{key:"a9fb05c711ebd9de3d3022a2ec17a9c666e7e2aa",class:"form-group d-flex flex-column"},t("div",{key:"e726ecfce3bd700fab74b6b3f81bdcba0d43428f",class:"d-flex align-items-start gap-2"},t("label",{key:"7940a4f3d8b3c894d0ee54871935e9989899c894",part:b,class:"form-label",htmlFor:this.name},this.label),t("form-control-tooltip",{key:"5c1782d425686b096e0b91c411e7543b794b969f",helpText:this.helpText})),t("input",{key:"3b8533a7cd4e0fe1907c6d5e01008063cf70d120",ref:e=>this.textInput=e,id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:this.handleFormControlInput,part:this.part,class:this.errorText?"form-control is-invalid":"form-control",type:"text",disabled:this.disabled}),t(u,{key:"085b4f0ee135c12c6ea9293593e4c722091f895e",errorText:this.errorText,name:this.name})))}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}},p=class{constructor(t){e(this,t),this.address={},this.inputHandler=(e,t)=>{this.address[e]=t,this.address=Object.assign({},this.address)}}handleAddressChange(e){this.handleFormUpdate(e)}render(){return t(s,{key:"98aa8fad1d8e4fef6f015968dea21d6a3257ad9c"},t("form-address-fields",{key:"24f34471d209fc94bb00ce9b47b6018ba57019a7",country:this.country,errors:this.errors,defaultValues:this.defaultValues,inputHandler:this.inputHandler}))}static get watchers(){return{address:["handleAddressChange"]}}};export{m as form_address_fields,v as form_control_number_masked,p as identity_address_form}
1
+ import{r as e,h as t,H as s,c as a}from"./p-CV0Pyo1O.js";import{C as i}from"./p-BcNb9bVO.js";import{n as d}from"./p-BnjCmwMr.js";import{b as o,c as r}from"./p-_-2E_vYf.js";import{I as l}from"./p-Ce_F4E0f.js";import{q as c,u as n,v as h,w as f,x as b}from"./p-DnrawQn3.js";import{F as u}from"./p-BsQy297i.js";import"./p-CZfYo5-1.js";const m=class{constructor(t){e(this,t),this.country=i.USA}render(){var e,a,l,c,n,h,f,b,u,m;const v=r[this.country],p=o[this.country];return t(s,{key:"9b18ac26cce34bd3008146f106a260d9cb99de12"},t("div",{key:"c234c03bc4a3dbe74a0946af78aaed5992c3406c",class:"row gy-3"},t("div",{key:"0ce04acdf48726866bd6beecc25d0008b754984f",class:"col-12"},t("form-control-text",{key:"4d4b5098ebc39e52d0f17c677c4e92980793f46b",name:"line1",label:"Street Address",inputHandler:this.inputHandler,defaultValue:null===(e=this.defaultValues)||void 0===e?void 0:e.line1,errorText:null===(a=this.errors)||void 0===a?void 0:a.line1,helpText:"No PO Boxes."})),t("div",{key:"4133b38343c52135f2457bd7a9ad91b094422fb5",class:"col-12"},t("form-control-text",{key:"7e60be69dad198d488030ece4296326bb6368f2c",name:"line2",label:"Address Line 2 (optional)",inputHandler:this.inputHandler,defaultValue:null===(l=this.defaultValues)||void 0===l?void 0:l.line2,errorText:null===(c=this.errors)||void 0===c?void 0:c.line2})),t("div",{key:"a34a4e57cbd168bbbe065329bcfb393473b0def1",class:"col-12"},t("form-control-text",{key:"46e3005ef99ec988726ffcc37ec73756f002880d",name:"city",label:"City",inputHandler:this.inputHandler,defaultValue:null===(n=this.defaultValues)||void 0===n?void 0:n.city,errorText:null===(h=this.errors)||void 0===h?void 0:h.city})),t("div",{key:"2bf3389786351f2338cde13cbf87d28260444174",class:"col-12 col-md-6"},t("form-control-select",{key:"18a2a403d20af45965877601fa8d44a5aea48894",name:"state",label:v.stateLabel,options:p.stateOptions,inputHandler:this.inputHandler,defaultValue:null===(f=this.defaultValues)||void 0===f?void 0:f.state,errorText:null===(b=this.errors)||void 0===b?void 0:b.state})),t("div",{key:"1548ad58c0bd3b96067055601a006fc137ca31a3",class:"col-12 col-md-6"},t("form-control-text",{key:"8e8193efa81f1f5d8c626f76d75d15aba60ac921",name:"postal_code",label:v.postalLabel,inputHandler:this.inputHandler,defaultValue:null===(u=this.defaultValues)||void 0===u?void 0:u.postal_code,errorText:null===(m=this.errors)||void 0===m?void 0:m.postal_code,maxLength:this.country===i.USA?5:7,keyDownHandler:this.country===i.USA?d:void 0}))))}},v=class{constructor(t){e(this,t),this.formControlInput=a(this,"formControlInput",7),this.formControlBlur=a(this,"formControlBlur",7),this.imask=null,this.isFocused=!1,this.inputHandler=()=>{},this.disabled=!1,this.initializeIMask=()=>{this.textInput&&(this.imask=l(this.textInput,{mask:this.mask}),this.imask.on("accept",(()=>{var e;const t=null===(e=this.imask)||void 0===e?void 0:e.unmaskedValue;void 0!==t&&this.inputHandler(this.name,t)})),this.textInput.addEventListener("blur",(()=>this.formControlBlur.emit())))},this.handleFormControlInput=e=>{var t;const s=e.target,a=s.getAttribute("name"),i=(null===(t=this.imask)||void 0===t?void 0:t.unmaskedValue)||s.value;this.formControlInput.emit({name:a,value:i})},this.updateInput=e=>{this.imask&&e&&(this.imask.value=String(e))}}handleDefaultValueChange(e){this.initializeIMask(),this.updateInput(e)}disconnectedCallback(){var e;null===(e=this.imask)||void 0===e||e.destroy()}componentDidLoad(){this.textInput&&(this.initializeIMask(),this.updateInput(this.defaultValue))}get part(){return this.errorText?c:this.disabled?n:this.isFocused?h:f}render(){return t(s,{key:"8c681e45fa4ffa5445924351746c22dcc7212ffc"},t("div",{key:"c230d74e6d157a2b24320c4835b7df49073ad248",class:"form-group d-flex flex-column"},t("div",{key:"6631779b46041f18b8560deeb7c35840ef11f36d",class:"d-flex align-items-start gap-2"},t("label",{key:"460d8c3ab569ebdffb6535e1ac4f605f2046eb90",part:b,class:"form-label",htmlFor:this.name},this.label),t("form-control-tooltip",{key:"2d0db8687a64eb18e1205f354972368b2d3eb165",helpText:this.helpText})),t("input",{key:"4d50027e92a8657f2eb28bd5ee5a1737b2c37e4f",ref:e=>this.textInput=e,id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:this.handleFormControlInput,part:this.part,class:this.errorText?"form-control is-invalid":"form-control",type:"text",disabled:this.disabled}),t(u,{key:"10460438e09a6b16eaf8040aa48aab245967341c",errorText:this.errorText,name:this.name})))}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}},p=class{constructor(t){e(this,t),this.address={},this.inputHandler=(e,t)=>{this.address[e]=t,this.address=Object.assign({},this.address)}}handleAddressChange(e){this.handleFormUpdate(e)}render(){return t(s,{key:"71100bc3742c3efaa9c3a948bf3ac5c69281c559"},t("form-address-fields",{key:"e5e5399686aa272a9cbe45d6914ebeda6a1966f4",country:this.country,errors:this.errors,defaultValues:this.defaultValues,inputHandler:this.inputHandler}))}static get watchers(){return{address:["handleAddressChange"]}}};export{m as form_address_fields,v as form_control_number_masked,p as identity_address_form}
@@ -0,0 +1 @@
1
+ import{r as t,c as s,h as o}from"./p-CV0Pyo1O.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{f as i,C as r,e}from"./p-CUI41_5y.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{g as c,a}from"./p-B5vVjDc_.js";import{c as n}from"./p-GP5gWjhc.js";import{J as p}from"./p-cXPhRFs-.js";import{C as h}from"./p-D4OlsyTo.js";import{m,S as u}from"./p-qcQTYcr3.js";import{S as d}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{d as j}from"./p-Cf6HoQKl.js";import"./p-D8GTwl9v.js";import"./p-BRnBHsdq.js";import"./p-CXKOe1m5.js";import"./p-CYQvLgSs.js";import"./p-pL4dNfsl.js";import"./p-DnrawQn3.js";const l=class{constructor(o){t(this,o),this.errorEvent=s(this,"error-event",7),this.errorMessage=null,this.columns=j,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){n(),this.analytics=new p(this),this.initializeGetData()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetData()}initializeGetData(){this.initializeGetCheckouts(),this.initializeGetSubAccounts()}initializeGetCheckouts(){const t=this.subAccountId||this.accountId;t&&this.authToken?this.getCheckouts=(({accountId:t,authToken:s,service:o})=>async({params:e,onSuccess:n,onError:p})=>{var h,m;try{const u=await o.fetchCheckouts(t,s,e);if(u.error)return p({error:a(u.error),code:c(null===(m=u.error)||void 0===m?void 0:m.code),severity:r.ERROR});{const t=Object.assign({},u.page_info);n({checkouts:(null===(h=u.data)||void 0===h?void 0:h.map((t=>new i(t))))||[],pagingInfo:t})}}catch(t){const s=c(null==t?void 0:t.code);return p({error:t.message||t,code:s,severity:r.ERROR})}})({accountId:t,authToken:this.authToken,service:new h}):(this.errorMessage="Account ID/Sub Account ID and Auth Token are required",this.errorEvent.emit({errorCode:e.MISSING_PROPS,message:this.errorMessage,severity:r.ERROR}))}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=m({primaryAccountId:this.accountId,authToken:this.authToken,service:new u}))}render(){return o(d,{key:"27491f40eb96742cee1fe81023a9e423ab5b22a5"},o("checkouts-list-core",{key:"2b2526aa7dee3cd216bc481144d3239a5389872c",getCheckouts:this.getCheckouts,getSubAccounts:this.getSubAccounts,"onError-event":this.handleErrorEvent,columns:this.columns}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"],subAccountId:["propChanged"]}}};export{l as justifi_checkouts_list}
@@ -0,0 +1 @@
1
+ import{h as i,r as e}from"./p-CV0Pyo1O.js";import{S as a}from"./p-DcBvJu0k.js";import{w as t,c}from"./p-DVJaoI_m.js";import{e as s}from"./p-BRnBHsdq.js";import{c as d}from"./p-GP5gWjhc.js";import"./p-DnrawQn3.js";import"./p-D8GTwl9v.js";import"./p-HXpYMWUU.js";import"./p-CXKOe1m5.js";const n=e=>{const{isReady:t}=e;return t?null:i("div",{class:"container-fluid p-0"},i("div",{class:"mb-3"},i(a,{height:"18px",width:"100px"}),i(a,{height:"36px"})),i("div",{class:"row"},i("div",{class:"col-4 align-content-end"},i(a,{height:"18px",width:"80px"}),i(a,{height:"36px"})),i("div",{class:"col-4 align-content-end"},i(a,{height:"36px"})),i("div",{class:"col-4 align-content-end"},i(a,{height:"18px",width:"30px"}),i(a,{height:"36px"}))))},r=class{constructor(i){e(this,i),this.isReady=!1}async componentWillLoad(){await t(),this.iframeOrigin=c.iframeOrigin,this.tabId=s(),d()}componentDidRender(){Promise.all([this.cardNumberIframeElement,this.expirationMonthIframeElement,this.expirationYearIframeElement,this.cvvIframeElement].map((i=>new Promise((e=>{i.addEventListener("iframeLoaded",(()=>{e()}))}))))).then((()=>{this.isReady=!0}))}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)}render(){return i("div",{key:"cef558344c088e6e0bccb49b99c8a47c76200467"},i(n,{key:"f35bad214bc4d7657b7ab8a097a76602df877bcf",isReady:this.isReady}),i("hidden-input",{key:"d3791651ad279e2e0ad169012f4d066a44bbfa66"}),i("div",{key:"37318e633f9ab08bfbc95750466c054158e5e4ff",class:"container-fluid p-0",style:{opacity:this.isReady?"1":"0",height:this.isReady?"auto":"0"}},i("div",{key:"d5eccc9c8a496f3f264a1bd01bb065e823aa01b5",class:"mb-3"},i("iframe-input",{key:"2ec07c9bf1ea18ed354cd036e2c7876f974a30ed",inputId:"cardNumber",ref:i=>this.cardNumberIframeElement=i,label:"Card Number",iframeOrigin:`${this.iframeOrigin}/v2/cardNumber?tabId=${this.tabId}`})),i("div",{key:"2959894ab0721d9bffccb0c16ecfb71bd3488518",class:"row"},i("div",{key:"dea7afd2515c4faa4927fd6cb32678fc782b9b5a",class:"col-4 align-content-end"},i("iframe-input",{key:"7d95eff6c6765ff996c1c497866ad01216b2cc4f",inputId:"expirationMonth",ref:i=>this.expirationMonthIframeElement=i,label:"Expiration",iframeOrigin:`${this.iframeOrigin}/v2/expirationMonth?tabId=${this.tabId}`})),i("div",{key:"00b02deefe877431409ef584662fc07e4a20cc3c",class:"col-4 align-content-end"},i("iframe-input",{key:"4860f042f29eb1d3db0e5ad4cb7c9471b8536ce6",inputId:"expirationYear",ref:i=>this.expirationYearIframeElement=i,label:"",iframeOrigin:`${this.iframeOrigin}/v2/expirationYear?tabId=${this.tabId}`})),i("div",{key:"c69f9be6e581e683b757e89000ef1ba385c5f57b",class:"col-4 align-content-end"},i("iframe-input",{key:"e5fbb8e78af5c8c6ed74db18aeb226bfba5d083f",inputId:"CVV",ref:i=>this.cvvIframeElement=i,label:"CVV",iframeOrigin:`${this.iframeOrigin}/v2/CVV?tabId=${this.tabId}`})))))}};export{r as card_form}
@@ -0,0 +1 @@
1
+ import{h as s,r as t,c as i}from"./p-CV0Pyo1O.js";import{A as e}from"./p-CYQvLgSs.js";import{C as r,e as o}from"./p-CUI41_5y.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{g as a,a as n}from"./p-B5vVjDc_.js";import{J as c}from"./p-cXPhRFs-.js";import{c as l}from"./p-GP5gWjhc.js";import{c as h}from"./p-BArmtmkq.js";import{p as d,f as p,r as u,j as v}from"./p-BRnBHsdq.js";import{v as m,i as y,a as f,H as j}from"./p-DkdzUTnl.js";import{t as _,z as g}from"./p-DnrawQn3.js";import{S as k}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{S as w}from"./p-DcBvJu0k.js";import"./p-DVJaoI_m.js";import"./p-D8GTwl9v.js";import"./p-CXKOe1m5.js";import"./p-DkoufM1t.js";import"./p-HXpYMWUU.js";const C=e();class b{async fetchQuote(s,t){return C.post({endpoint:"insurance/quotes",body:t,authToken:s})}async toggleCoverage(s,t,i){return C.post({endpoint:`insurance/quotes/${t}/toggle`,body:i,authToken:s})}}const T=()=>s("div",{class:"row gap-3"},s("div",{class:"col-12"},s(w,{width:"35%",height:"30px"})),s("div",{class:"col-12"},s(w,{width:"70%"})),s("div",{class:"col-12"},s(w,{width:"40%"})),s("div",{class:"col-12"},s(w,{width:"40%"})),s("div",{class:"col-12"},s(w,{width:"100%"})),s("div",{class:"col-12"},s(w,{width:"80%"}))),q=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(k,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:_,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{q as justifi_season_interruption_insurance}
@@ -1 +1 @@
1
- import{r as l,h as i,H as t}from"./p-CV0Pyo1O.js";import{c as e,D as s}from"./p-CjuaXEuI.js";import{n as o,s as d,o as v}from"./p-CTwm3w6I.js";import"./p-D50Rx76J.js";import"./p-HXpYMWUU.js";const u=class{constructor(i){l(this,i)}render(){return!this.additionalQuestions||o(this.additionalQuestions)?null:i("div",null,i(s,{sectionTitle:"Additional Questions"}),i("div",{class:"d-flex flex-column gap-2 w-100 mt-3"},i("div",{class:"row gy-3"},i("div",{class:"col-12 col-md-6"},i(e,{title:"Business Revenue",value:this.additionalQuestions.business_revenue}),i(e,{title:"Business Payment Volume",value:this.additionalQuestions.business_payment_volume})))))}},a=class{constructor(i){l(this,i)}render(){return this.business?i("div",null,i(s,{sectionTitle:"Business Core Info Details"}),i("div",{class:"d-table gap-2 w-100 mt-3"},i("div",{class:"row gy-3"},i("div",{class:"col-12 col-md-6"},i(e,{title:"Legal Name",value:this.business.legal_name}),i(e,{title:"Doing Business As (DBA)",value:this.business.doing_business_as}),i(e,{title:"Business Classification",value:d(this.business.classification)}),i(e,{title:"Industry",value:this.business.industry})),i("div",{class:"col-12 col-md-6"},i(e,{title:"Tax ID",value:this.business.tax_id}),i(e,{title:"Website URL",value:this.business.website_url}),i(e,{title:"Email Address",value:this.business.email}),i(e,{title:"Phone Number",value:this.business.phone}))))):null}},n=class{constructor(i){l(this,i)}render(){var l,t,d,v,u,a,n;return!this.legalAddress||o(this.legalAddress)?null:i("div",null,i(s,{sectionTitle:"Business Legal Address Details"}),i("div",{class:"d-table gap-2 w-100 mt-3"},i("div",{class:"row gy-3"},i("div",{class:"col-12 col-md-6"},i(e,{title:"Country",value:null===(l=this.legalAddress)||void 0===l?void 0:l.country}),i(e,{title:"Legal Address",value:null===(t=this.legalAddress)||void 0===t?void 0:t.line1}),i(e,{title:"Address Line 2",value:null===(d=this.legalAddress)||void 0===d?void 0:d.line2})),i("div",{class:"col-12 col-md-6"},i(e,{title:"City",value:null===(v=this.legalAddress)||void 0===v?void 0:v.city}),i(e,{title:"State",value:null===(u=this.legalAddress)||void 0===u?void 0:u.state}),i(e,{title:"Postal Code",value:null===(n=null===(a=this.legalAddress)||void 0===a?void 0:a.postal_code)||void 0===n?void 0:n.toString()})))))}},r=class{constructor(i){l(this,i)}render(){var l;return(null===(l=null==this?void 0:this.owners)||void 0===l?void 0:l.length)?i(t,null,!!(null==this?void 0:this.owners.length)&&this.owners.map((l=>{var t,o,d,u,a;return[i(s,{sectionTitle:`Owner ${null==l?void 0:l.name}'s Details`}),i("div",{class:"d-flex flex-column gap-2 w-100 mt-3"},i("div",{class:"col-md-6"},i(e,{title:"Name",value:null==l?void 0:l.name}),i(e,{title:"Title",value:null==l?void 0:l.title}),i(e,{title:"Email",value:null==l?void 0:l.email}),i(e,{title:"Phone",value:null==l?void 0:l.phone}),i(e,{title:"Date of Birth",value:v(new Date(Number(null==l?void 0:l.dob_day),Number(null==l?void 0:l.dob_month),Number(null==l?void 0:l.dob_year)))}),i(e,{title:"Identification Number",value:`********${null==l?void 0:l.ssn_last4}`}),i(e,{title:"Line 1",value:null===(t=null==l?void 0:l.address)||void 0===t?void 0:t.line1}),i(e,{title:"Line 2",value:null===(o=null==l?void 0:l.address)||void 0===o?void 0:o.line2}),i(e,{title:"City",value:null===(d=null==l?void 0:l.address)||void 0===d?void 0:d.city}),i(e,{title:"State",value:null===(u=null==l?void 0:l.address)||void 0===u?void 0:u.state}),i(e,{title:"Zip",value:null===(a=null==l?void 0:l.address)||void 0===a?void 0:a.postal_code})))]}))):null}},c=class{constructor(i){l(this,i)}render(){var l,t,d,u,a,n,r,c,h,m,p,w,f,g;return!this.representative||o(this.representative)?null:i("div",null,i(s,{sectionTitle:"Representative Details"}),i("div",{class:"d-flex flex-column gap-2 w-100 mt-3"},i("div",{class:"row gy-3"},i("div",{class:"col-12 col-md-6"},i(e,{title:"Name",value:null===(l=this.representative)||void 0===l?void 0:l.name}),i(e,{title:"ID",value:null===(t=this.representative)||void 0===t?void 0:t.id}),i(e,{title:"Address",value:null===(u=null===(d=this.representative)||void 0===d?void 0:d.address)||void 0===u?void 0:u.line1}),i(e,{title:"Created At",value:(null===(a=this.representative)||void 0===a?void 0:a.created_at)&&v(null===(n=this.representative)||void 0===n?void 0:n.created_at)})),i("div",{class:"col-12 col-md-6"},i(e,{title:"Title",value:null===(r=this.representative)||void 0===r?void 0:r.title}),i(e,{title:"Is Owner?",value:null===(c=this.representative)||void 0===c?void 0:c.is_owner.toString()}),i(e,{title:"Date Of Birth",value:this.representative&&v(new Date(Number(null===(h=this.representative)||void 0===h?void 0:h.dob_year),Number(null===(m=this.representative)||void 0===m?void 0:m.dob_month)-1,Number(null===(p=this.representative)||void 0===p?void 0:p.dob_day)))}),i(e,{title:"Email",value:null===(w=this.representative)||void 0===w?void 0:w.email}),i(e,{title:"Phone",value:null===(f=this.representative)||void 0===f?void 0:f.phone}),i(e,{title:"Updated At",value:this.representative&&v(null===(g=this.representative)||void 0===g?void 0:g.updated_at)})))))}};export{u as additional_questions_details,a as core_info_details,n as legal_address_details,r as owner_details,c as representative_details}
1
+ import{r as l,h as i,H as t}from"./p-CV0Pyo1O.js";import{c as e,D as s}from"./p-x9fFFf7F.js";import{m as o,s as d,n as v}from"./p-BRnBHsdq.js";import"./p-DnrawQn3.js";import"./p-HXpYMWUU.js";const u=class{constructor(i){l(this,i)}render(){return!this.additionalQuestions||o(this.additionalQuestions)?null:i("div",null,i(s,{sectionTitle:"Additional Questions"}),i("div",{class:"d-flex flex-column gap-2 w-100 mt-3"},i("div",{class:"row gy-3"},i("div",{class:"col-12 col-md-6"},i(e,{title:"Business Revenue",value:this.additionalQuestions.business_revenue}),i(e,{title:"Business Payment Volume",value:this.additionalQuestions.business_payment_volume})))))}},a=class{constructor(i){l(this,i)}render(){return this.business?i("div",null,i(s,{sectionTitle:"Business Core Info Details"}),i("div",{class:"d-table gap-2 w-100 mt-3"},i("div",{class:"row gy-3"},i("div",{class:"col-12 col-md-6"},i(e,{title:"Legal Name",value:this.business.legal_name}),i(e,{title:"Doing Business As (DBA)",value:this.business.doing_business_as}),i(e,{title:"Business Classification",value:d(this.business.classification)}),i(e,{title:"Industry",value:this.business.industry})),i("div",{class:"col-12 col-md-6"},i(e,{title:"Tax ID",value:this.business.tax_id}),i(e,{title:"Website URL",value:this.business.website_url}),i(e,{title:"Email Address",value:this.business.email}),i(e,{title:"Phone Number",value:this.business.phone}))))):null}},n=class{constructor(i){l(this,i)}render(){var l,t,d,v,u,a,n;return!this.legalAddress||o(this.legalAddress)?null:i("div",null,i(s,{sectionTitle:"Business Legal Address Details"}),i("div",{class:"d-table gap-2 w-100 mt-3"},i("div",{class:"row gy-3"},i("div",{class:"col-12 col-md-6"},i(e,{title:"Country",value:null===(l=this.legalAddress)||void 0===l?void 0:l.country}),i(e,{title:"Legal Address",value:null===(t=this.legalAddress)||void 0===t?void 0:t.line1}),i(e,{title:"Address Line 2",value:null===(d=this.legalAddress)||void 0===d?void 0:d.line2})),i("div",{class:"col-12 col-md-6"},i(e,{title:"City",value:null===(v=this.legalAddress)||void 0===v?void 0:v.city}),i(e,{title:"State",value:null===(u=this.legalAddress)||void 0===u?void 0:u.state}),i(e,{title:"Postal Code",value:null===(n=null===(a=this.legalAddress)||void 0===a?void 0:a.postal_code)||void 0===n?void 0:n.toString()})))))}},r=class{constructor(i){l(this,i)}render(){var l;return(null===(l=null==this?void 0:this.owners)||void 0===l?void 0:l.length)?i(t,null,!!(null==this?void 0:this.owners.length)&&this.owners.map((l=>{var t,o,d,u,a;return[i(s,{sectionTitle:`Owner ${null==l?void 0:l.name}'s Details`}),i("div",{class:"d-flex flex-column gap-2 w-100 mt-3"},i("div",{class:"col-md-6"},i(e,{title:"Name",value:null==l?void 0:l.name}),i(e,{title:"Title",value:null==l?void 0:l.title}),i(e,{title:"Email",value:null==l?void 0:l.email}),i(e,{title:"Phone",value:null==l?void 0:l.phone}),i(e,{title:"Date of Birth",value:v(new Date(Number(null==l?void 0:l.dob_day),Number(null==l?void 0:l.dob_month),Number(null==l?void 0:l.dob_year)))}),i(e,{title:"Identification Number",value:`********${null==l?void 0:l.ssn_last4}`}),i(e,{title:"Line 1",value:null===(t=null==l?void 0:l.address)||void 0===t?void 0:t.line1}),i(e,{title:"Line 2",value:null===(o=null==l?void 0:l.address)||void 0===o?void 0:o.line2}),i(e,{title:"City",value:null===(d=null==l?void 0:l.address)||void 0===d?void 0:d.city}),i(e,{title:"State",value:null===(u=null==l?void 0:l.address)||void 0===u?void 0:u.state}),i(e,{title:"Zip",value:null===(a=null==l?void 0:l.address)||void 0===a?void 0:a.postal_code})))]}))):null}},c=class{constructor(i){l(this,i)}render(){var l,t,d,u,a,n,r,c,h,m,p,f,w,g;return!this.representative||o(this.representative)?null:i("div",null,i(s,{sectionTitle:"Representative Details"}),i("div",{class:"d-flex flex-column gap-2 w-100 mt-3"},i("div",{class:"row gy-3"},i("div",{class:"col-12 col-md-6"},i(e,{title:"Name",value:null===(l=this.representative)||void 0===l?void 0:l.name}),i(e,{title:"ID",value:null===(t=this.representative)||void 0===t?void 0:t.id}),i(e,{title:"Address",value:null===(u=null===(d=this.representative)||void 0===d?void 0:d.address)||void 0===u?void 0:u.line1}),i(e,{title:"Created At",value:(null===(a=this.representative)||void 0===a?void 0:a.created_at)&&v(null===(n=this.representative)||void 0===n?void 0:n.created_at)})),i("div",{class:"col-12 col-md-6"},i(e,{title:"Title",value:null===(r=this.representative)||void 0===r?void 0:r.title}),i(e,{title:"Is Owner?",value:null===(c=this.representative)||void 0===c?void 0:c.is_owner.toString()}),i(e,{title:"Date Of Birth",value:this.representative&&v(new Date(Number(null===(h=this.representative)||void 0===h?void 0:h.dob_year),Number(null===(m=this.representative)||void 0===m?void 0:m.dob_month)-1,Number(null===(p=this.representative)||void 0===p?void 0:p.dob_day)))}),i(e,{title:"Email",value:null===(f=this.representative)||void 0===f?void 0:f.email}),i(e,{title:"Phone",value:null===(w=this.representative)||void 0===w?void 0:w.phone}),i(e,{title:"Updated At",value:this.representative&&v(null===(g=this.representative)||void 0===g?void 0:g.updated_at)})))))}};export{u as additional_questions_details,a as core_info_details,n as legal_address_details,r as owner_details,c as representative_details}
@@ -0,0 +1 @@
1
+ import{r as t,c as e,h as i,H as s,g as n}from"./p-CV0Pyo1O.js";import{A as a}from"./p-CYQvLgSs.js";import{A as o,o as r,p as l,q as h,r as c,s as d,t as u,C as p,e as y,u as m,I as v,v as g,w as f,x as M}from"./p-CUI41_5y.js";import{S as b}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{S as k}from"./p-DcBvJu0k.js";import{c as w,a as j,g as P,b as T,o as A}from"./p-BArmtmkq.js";import{t as N,r as I}from"./p-DnrawQn3.js";import{f as C}from"./p-BRnBHsdq.js";import{w as E,c as D}from"./p-DVJaoI_m.js";import{H as S}from"./p-XrKLre8M.js";import{H as O,b as L,h as x,i as z}from"./p-DkdzUTnl.js";import{H as _}from"./p-MDZuGvsl.js";import{J as R}from"./p-cXPhRFs-.js";import{c as U}from"./p-GP5gWjhc.js";import"./p-HXpYMWUU.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{g as B,a as Y}from"./p-B5vVjDc_.js";import{C as F}from"./p-D4OlsyTo.js";import{P as Q}from"./p-B--N37zY.js";import{P as V,a as H,b as G}from"./p-DkoufM1t.js";import{C as q}from"./p-ZpPDShvP.js";import"./p-D8GTwl9v.js";import"./p-CXKOe1m5.js";const W=class{constructor(i){t(this,i),this.radioClick=e(this,"radio-click",7),this.checked=!1,this.hidden=!1}render(){return i(b,{key:"02955940079320bd9c6bf94e239545385ac36458"},i("radio-list-item",{key:"fc6b98e456e4326b843b2b3248b7327436767cf4",name:this.name,value:this.value,label:this.label,checked:this.checked,hidden:this.hidden,class:this.class,"onRadio-click":t=>this.radioClick.emit(t.detail)}))}};var Z;!function(t){t.UNAVAILABLE="UNAVAILABLE",t.SESSION_ERROR="SESSION_ERROR",t.MERCHANT_VALIDATION_ERROR="MERCHANT_VALIDATION_ERROR",t.PAYMENT_PROCESSING_ERROR="PAYMENT_PROCESSING_ERROR",t.USER_CANCELLED="USER_CANCELLED"}(Z||(Z={}));class J{constructor(){this.api=a()}initialize(t){if(this.applePayConfig=new o(t),!this.applePayConfig.isValid)throw new Error("Invalid Apple Pay configuration provided")}async validateMerchant(t,e){try{return await this.api.post({endpoint:"apple_pay/merchant_session",authToken:t,headers:{"Sub-Account":e},body:{domain:window.location.hostname,display_name:this.applePayConfig.displayName}})}catch(t){throw console.error("Backend validation failed:",t),new Error("Merchant validation failed")}}async processPayment(t,e,i){const s=await this.api.post({endpoint:"apple_pay/process_token",authToken:t,body:i,headers:{"Sub-Account":e}});return{success:s.id&&!!s.data.token,data:s}}isAvailable(){return r.isApplePaySupported()&&r.canMakePayments()}async canMakePaymentsWithActiveCard(){if(!this.applePayConfig)throw new Error("Apple Pay not initialized. Call initialize() first.");return await r.canMakePaymentsWithActiveCard(this.applePayConfig.merchantIdentifier)}async startPaymentSession(t,e,i){if(!this.applePayConfig)throw console.error("[ApplePayService] Missing applePayConfig. Did you call initialize()?"),new Error("Apple Pay not initialized. Call initialize() first.");const s=new l(t);if(!s.isValid){const t=[];throw s.countryCode||t.push("countryCode"),s.currencyCode||t.push("currencyCode"),s.merchantCapabilities&&0!==s.merchantCapabilities.length||t.push("merchantCapabilities"),s.supportedNetworks&&0!==s.supportedNetworks.length||t.push("supportedNetworks"),s.total&&s.total.label&&s.total.amount||t.push("total"),console.error("[ApplePayService] Payment request is invalid. Missing/invalid:",t),new Error("Invalid payment request provided")}return this.currentPaymentRequest=s,new Promise(((t,n)=>{try{if("undefined"==typeof window||!("ApplePaySession"in window))return console.error("[ApplePayService] ApplePaySession not available on window"),n({success:!1,error:{code:Z.UNAVAILABLE,message:"ApplePaySession API is not available in this environment"}});this.currentSession=new window.ApplePaySession(3,s),this.setupSessionEventHandlers(t,n,e,i),this.currentSession.begin()}catch(t){console.error("[ApplePayService] Exception while starting session:",t),n({success:!1,error:{code:Z.SESSION_ERROR,message:t instanceof Error?t.message:"Failed to start Apple Pay session"}})}}))}abortPaymentSession(){this.currentSession&&(this.currentSession.abort(),this.currentSession=void 0,this.currentPaymentRequest=void 0)}setupSessionEventHandlers(t,e,i,s){this.currentSession&&this.applePayConfig&&this.currentPaymentRequest?(this.currentSession.onvalidatemerchant=async()=>{try{if(!i)throw console.error("[ApplePayService] Missing authToken for merchant validation"),new Error("Authentication token not provided.");const t=await this.validateMerchant(i,s);try{this.currentSession.completeMerchantValidation(t)}catch(t){throw console.error("Error calling completeMerchantValidation:",t),t}}catch(t){console.error("=== MERCHANT VALIDATION ERROR ==="),console.error("Error during merchant validation:",t),t&&t.stack&&console.error("Error stack:",t.stack),this.currentSession.abort(),e({success:!1,error:{code:Z.MERCHANT_VALIDATION_ERROR,message:t instanceof Error?t.message:"Merchant validation failed"}})}},this.currentSession.onpaymentauthorized=async n=>{try{const a=n.payment,o=Object.assign(Object.assign({},a.token),{product_details:{name:this.currentPaymentRequest.total.label,price:r.parseAmount(this.currentPaymentRequest.total.amount),description:this.currentPaymentRequest.total.label}}),l=await this.processPayment(i,s,o);l.success?(this.currentSession.completePayment({status:h.STATUS_SUCCESS}),t({success:!0,token:a.token,paymentMethodId:l.data.id})):(console.error("PSP reported payment failure:",l.data),this.currentSession.completePayment({status:h.STATUS_FAILURE}),e({success:!1,error:{code:Z.PAYMENT_PROCESSING_ERROR,message:"Payment processing failed"}}))}catch(t){console.error("=== PAYMENT PROCESSING ERROR ==="),console.error("Error processing payment:",t),t&&t.stack&&console.error("Error stack:",t.stack),this.currentSession.completePayment({status:h.STATUS_FAILURE}),e({success:!1,error:{code:Z.PAYMENT_PROCESSING_ERROR,message:t instanceof Error?t.message:"Payment processing failed"}})}finally{this.currentSession=void 0,this.currentPaymentRequest=void 0}},this.currentSession.onpaymentmethodselected=()=>{const t={newTotal:this.currentPaymentRequest.total,newLineItems:this.currentPaymentRequest.lineItems||[]};try{this.currentSession.completePaymentMethodSelection(t)}catch(t){console.error("Error completing payment method selection:",t),this.currentSession.abort()}},this.currentSession.onshippingmethodselected=()=>{this.currentSession.completeShippingMethodSelection({status:h.STATUS_SUCCESS,newTotal:this.currentPaymentRequest.total,newLineItems:this.currentPaymentRequest.lineItems||[]})},this.currentSession.oncancel=t=>{if(t.sessionError)switch(console.error(t.sessionError),t.sessionError.code){case"unknown":console.error("Unknown error - likely merchant validation issue"),console.error("This usually means:"),console.error("1. Merchant certificate is invalid or expired"),console.error("2. Merchant identifier mismatch"),console.error("3. Backend validation endpoint issues");break;case"invalidMerchantSession":console.error("Invalid merchant session provided"),console.error("Check that the merchant session from backend is valid");break;case"userCancel":console.error("User cancelled the payment");break;default:console.error("Other error code:",t.sessionError.code)}this.currentSession=void 0,this.currentPaymentRequest=void 0,e({success:!1,error:{code:Z.USER_CANCELLED,message:"User cancelled the Apple Pay session"}})},"onerror"in this.currentSession&&(this.currentSession.onerror=t=>{console.error("=== APPLE PAY SESSION ERROR ==="),console.error("Session error:",t),this.currentSession=void 0,this.currentPaymentRequest=void 0,e({success:!1,error:{code:Z.SESSION_ERROR,message:"Apple Pay session error occurred"}})})):console.error("[ApplePayService] setupSessionEventHandlers called without required state",{hasSession:Boolean(this.currentSession),hasConfig:Boolean(this.applePayConfig),hasPaymentRequest:Boolean(this.currentPaymentRequest)})}static createPaymentRequest(t,e,i="US",s="USD"){return{countryCode:i,currencyCode:s,merchantCapabilities:r.getDefaultMerchantCapabilities(),supportedNetworks:r.getDefaultSupportedNetworks(),total:r.createLineItem(e,t)}}getApplePayConfig(){return this.applePayConfig}}const X=t=>{const{isLoading:e}=t;return e?i("div",{class:"container-fluid p-0"},i("div",{class:"row mb-3"},i("div",{class:"col-12 align-content-center"},i(k,{height:"44px",width:"100%",styles:{borderRadius:"8px"}})))):null},K=t=>i("div",{class:"apple-pay-button-container"},i("button",Object.assign({class:(()=>{let e="apple-pay-button";switch(t.buttonStyle){case c.WHITE:e+=" apple-pay-button-white";break;case c.WHITE_OUTLINE:e+=" apple-pay-button-white-outline";break;default:e+=" apple-pay-button-black"}switch(t.buttonType){case d.BUY:e+=" apple-pay-button-type-buy";break;case d.DONATE:e+=" apple-pay-button-type-donate";break;default:e+=" apple-pay-button-type-plain"}return(t.disabled||t.isProcessing||!t.isAvailable)&&(e+=" disabled"),e})(),style:{width:t.width,height:t.height},onClick:()=>{!t.disabled&&!t.isProcessing&&t.isAvailable&&t.clickHandler&&t.clickHandler()},disabled:t.disabled||t.isProcessing||!t.isAvailable,"aria-label":"Pay with Apple Pay",type:"button"},t),t.isProcessing&&i("div",{class:"processing-overlay"},i("div",{class:"spinner"}),i("span",null,"Processing..."))),i("style",null,"\n .apple-pay-button-container {\n display: block;\n position: relative;\n width: 100%;\n }\n\n /* Apple Pay CSS classes - these are the official Apple Pay button styles */\n .apple-pay-button {\n display: inline-block;\n -webkit-appearance: -apple-pay-button;\n -apple-pay-button-type: plain; /* default */\n -apple-pay-button-style: black; /* default */\n border-radius: 8px;\n cursor: pointer;\n border: none;\n outline: none;\n transition: opacity 0.2s ease;\n position: relative;\n }\n\n /* Button styles */\n .apple-pay-button.apple-pay-button-black {\n -apple-pay-button-style: black;\n }\n\n .apple-pay-button.apple-pay-button-white {\n -apple-pay-button-style: white;\n }\n\n .apple-pay-button.apple-pay-button-white-outline {\n -apple-pay-button-style: white-outline;\n }\n\n /* Button types */\n .apple-pay-button.apple-pay-button-type-plain {\n -apple-pay-button-type: plain;\n }\n\n .apple-pay-button.apple-pay-button-type-buy {\n -apple-pay-button-type: buy;\n }\n\n .apple-pay-button.apple-pay-button-type-donate {\n -apple-pay-button-type: donate;\n }\n\n /* Hover and disabled states */\n .apple-pay-button:hover:not(.disabled) {\n opacity: 0.9;\n }\n\n .apple-pay-button.disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n /* Processing overlay */\n .processing-overlay {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n background: rgba(0, 0, 0, 0.8);\n color: white;\n border-radius: 8px;\n font-size: 14px;\n font-weight: 500;\n }\n\n .spinner {\n width: 16px;\n height: 16px;\n border: 2px solid rgba(255, 255, 255, 0.3);\n border-top: 2px solid #fff;\n border-radius: 50%;\n animation: spin 1s linear infinite;\n }\n\n @keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n\n /* Responsive design */\n @media (max-width: 480px) {\n .apple-pay-button {\n width: 100% !important;\n min-width: 200px;\n }\n }\n ")),$=class{constructor(i){t(this,i),this.applePayStarted=e(this,"applePayStarted",7),this.applePayCompleted=e(this,"applePayCompleted",7),this.applePayCancelled=e(this,"applePayCancelled",7),this.applePayError=e(this,"applePayError",7),this.countryCode="US",this.merchantIdentifier="merchant.com.staging-justifi.checkout-dev",this.merchantDisplayName="JustiFi Checkout",this.initiativeContext="dev-checkout.justifi-staging.com",this.buttonType=d.PLAIN,this.buttonStyle=c.BLACK,this.disabled=!1,this.showSkeleton=!0,this.width="100%",this.height="48px",this.isLoading=!0,this.isProcessing=!1,this.isAvailable=!1,this.canMakePayments=!1,this.isConfigValid=!0,this.error=null,this.handleApplePayClick=async()=>{var t,e,i;if(!this.isProcessing&&!this.disabled&&this.isAvailable)try{this.isProcessing=!0,this.error=null,this.applePayStarted.emit();const i={countryCode:this.countryCode,currencyCode:w.paymentCurrency,merchantCapabilities:[u.SUPPORTS_3DS,u.SUPPORTS_CREDIT,u.SUPPORTS_DEBIT],supportedNetworks:r.getDefaultSupportedNetworks(),total:r.createLineItem(w.paymentDescription,w.paymentAmount)},s=await this.applePayService.startPaymentSession(i,w.authToken,w.accountId);s.success?this.applePayCompleted.emit({success:!0,token:s.token,paymentMethodId:s.paymentMethodId}):(this.applePayCompleted.emit({success:!1,error:s.error}),this.applePayError.emit({error:(null===(t=s.error)||void 0===t?void 0:t.message)||"Payment failed",code:(null===(e=s.error)||void 0===e?void 0:e.code)||$.ErrorCode.PAYMENT_FAILED}))}catch(t){if((null===(i=null==t?void 0:t.error)||void 0===i?void 0:i.code)===Z.USER_CANCELLED)this.applePayCancelled.emit();else{const e=t instanceof Error?t.message:"Payment failed";this.error=e,this.applePayError.emit({error:e,code:$.ErrorCode.PAYMENT_FAILED}),this.applePayCompleted.emit({success:!1,error:e})}}finally{this.isProcessing=!1}}}async initializeApplePay(){try{if(this.isLoading=!0,this.error=null,this.isConfigValid=!0,!(Boolean(w.paymentAmount)&&Boolean(w.paymentCurrency)&&Boolean(w.authToken)))return this.error="Missing required Apple Pay configuration",this.isConfigValid=!1,console.error("Apple Pay config error: missing required values",{paymentAmount:w.paymentAmount,paymentCurrency:w.paymentCurrency,hasAuthToken:Boolean(w.authToken),accountId:w.accountId}),this.applePayError.emit({error:this.error,code:$.ErrorCode.CONFIG_ERROR}),void(this.isLoading=!1);if(this.isAvailable=r.isApplePaySupported(),this.canMakePayments=r.canMakePayments(),!this.isAvailable)return this.error="Apple Pay is not supported on this device",console.error(this.error),this.applePayError.emit({error:this.error,code:$.ErrorCode.NOT_SUPPORTED}),void(this.isLoading=!1);if(!this.canMakePayments)return this.error="Apple Pay is not available",console.error(this.error),this.applePayError.emit({error:this.error,code:$.ErrorCode.NOT_AVAILABLE}),void(this.isLoading=!1);const t={merchantIdentifier:this.merchantIdentifier,displayName:this.merchantDisplayName,initiative:"web",initiativeContext:this.initiativeContext,buttonType:this.buttonType,buttonStyle:this.buttonStyle};this.applePayService=new J,this.applePayService.initialize(t),await this.applePayService.canMakePaymentsWithActiveCard()||console.warn("No Apple Pay cards available, but continuing...")}catch(t){console.error("Apple Pay initialization error:",t),this.error=t instanceof Error?t.message:"Failed to initialize Apple Pay",this.applePayError.emit({error:this.error,code:$.ErrorCode.INITIALIZATION_ERROR})}finally{this.isLoading=!1}}async isSupported(){return this.isAvailable&&this.canMakePayments}async getPaymentMethods(){return this.isAvailable?r.getDefaultSupportedNetworks():[]}async abort(){this.applePayService.abortPaymentSession(),this.isProcessing=!1,this.applePayCancelled.emit()}render(){if(!w.applePayEnabled)return null;const t=!this.isLoading&&this.isAvailable&&this.canMakePayments&&this.isConfigValid;return i(b,null,w.checkoutLoaded&&i("script",{async:!0,src:"https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js",onLoad:()=>{this.initializeApplePay()}}),i("div",{class:"apple-pay-container"},i(X,{isLoading:this.isLoading}),t&&i(K,{buttonType:this.buttonType,buttonStyle:this.buttonStyle,disabled:this.disabled,isProcessing:this.isProcessing,isAvailable:this.isAvailable,clickHandler:this.handleApplePayClick,width:this.width,height:this.height})),i("style",null,"\n .apple-pay-container {\n width: 100%;\n }\n "))}};$.ErrorCode={CONFIG_ERROR:"CONFIG_ERROR",NOT_SUPPORTED:"NOT_SUPPORTED",NOT_AVAILABLE:"NOT_AVAILABLE",INITIALIZATION_ERROR:"INITIALIZATION_ERROR",PAYMENT_FAILED:"PAYMENT_FAILED"};const tt=class{constructor(e){t(this,e),this.variant="primary",this.type="button"}render(){return i(b,{key:"cb0fe35e791df60fcc8198bcda789bf8be205873"},i("internal-button",{key:"26f0f44419d1d72e7ccd1240e88057333d927a36",text:this.text,variant:this.variant,isLoading:this.isLoading,clickHandler:this.clickHandler,type:this.type,disabled:this.disabled,class:this.class,customStyle:this.customStyle,hidden:this.hidden}))}},et=class{constructor(e){t(this,e)}render(){return i(b,{key:"67414e8e4f91020b00b45fa840e957c439fd5e23"},i("section",{key:"893c1b0ec898adf8d40e1e09fd42797094efd6d4"},i("div",{key:"f37c1905522b039f7b0ef65e04325570c6a8cef2"},i("div",{key:"10b96593bd21e27645c6548fcbcd3981e4882082",part:N},null==w?void 0:w.paymentDescription),i("div",{key:"7d6ce75a2fc8c5796992940886a21c547f698909"},i("span",{key:"d40f2f63df16ec751de91d0731d66aa8cc42aa9a",part:N},"Total")," ",i("span",{key:"ebe75dba638d5da9a5aa82e823e2fe4649129cab",part:N},C(+(null==w?void 0:w.totalAmount)))))))}},it=t=>{const{isLoading:e}=t;return e?i("div",{class:"container-fluid p-0"},i("div",{class:"row mb-3"},i("div",{class:"col-12 align-content-center"},i(k,{height:"44px",width:"100%",styles:{borderRadius:"8px"}})))):null};var st;!function(t){t.initialize="justifi.googlePay.initialize",t.ready="justifi.googlePay.ready",t.sdkLoaded="justifi.googlePay.sdkLoaded",t.initializeResult="justifi.googlePay.initializeResult",t.error="justifi.googlePay.error",t.buttonClicked="justifi.googlePay.buttonClicked",t.startPayment="justifi.googlePay.startPayment",t.paymentSuccess="justifi.googlePay.paymentSuccess",t.paymentCanceled="justifi.googlePay.paymentCanceled",t.paymentError="justifi.googlePay.paymentError"}(st||(st={}));const nt=class{constructor(i){t(this,i),this.googlePayStarted=e(this,"googlePayStarted",7),this.googlePayCompleted=e(this,"googlePayCompleted",7),this.googlePayCancelled=e(this,"googlePayCancelled",7),this.environment="TEST",this.iframeReady=!1,this.sdkLoaded=!1,this.isReadyToPay=!1,this.handleMessage=t=>{if(t.origin!==this.iframeOrigin)return;const{eventType:e,data:i}=t.data||{};switch(e){case st.ready:this.iframeReady=!0;break;case st.sdkLoaded:this.sdkLoaded=!0,this.sendInitialize();break;case st.initializeResult:this.isReadyToPay=i.isReadyToPay,i.error&&console.error("Init error:",i.error);break;case st.error:console.error("Google Pay error:",i);break;case st.buttonClicked:this.googlePayStarted.emit(),this.sendStartPayment();break;case st.paymentSuccess:this.googlePayCompleted.emit({success:!0,paymentMethodId:i.paymentMethodId,cardNetwork:i.cardNetwork,cardDetails:i.cardDetails});break;case st.paymentCanceled:this.googlePayCancelled.emit();break;case st.paymentError:this.googlePayCompleted.emit({success:!1,error:{code:i.code,message:i.message}})}}}async componentWillLoad(){await E(),this.iframeOrigin=D.iframeOrigin}componentDidLoad(){window.addEventListener("message",this.handleMessage)}disconnectedCallback(){window.removeEventListener("message",this.handleMessage)}sendInitialize(){var t;(null===(t=this.iframeElement)||void 0===t?void 0:t.contentWindow)&&this.iframeElement.contentWindow.postMessage({eventType:st.initialize,data:{environment:this.environment,gatewayMerchantId:w.accountId,merchantName:this.merchantName,authToken:w.authToken,accountId:w.accountId}},this.iframeOrigin)}sendStartPayment(){var t;if(!(null===(t=this.iframeElement)||void 0===t?void 0:t.contentWindow))return;const e={totalPrice:String(w.paymentAmount/100),totalPriceStatus:"FINAL",currencyCode:w.paymentCurrency||"USD"};this.iframeElement.contentWindow.postMessage({eventType:st.startPayment,data:e},this.iframeOrigin)}render(){return w.googlePayEnabled?i(s,null,i(it,{isLoading:!this.isReadyToPay}),i("iframe",{ref:t=>this.iframeElement=t,src:`${this.iframeOrigin}/v2/googlePay`,style:{border:"none",width:"100%",height:"48px",display:this.isReadyToPay?"block":"none"}})):(console.warn("Google Pay is not enabled for this checkout"),null)}},at=class{constructor(e){t(this,e),this.levels={h1:S,h2:O,h3:_},this.level="h1"}render(){return i(b,{key:"47b96a1e22395349811c97d4e914fa4d77102591"},i(this.levels[this.level],{key:"2ac2e58d15c9c92d01fae0ffba9ea6511cc1ac53",text:this.text,class:this.class}))}},ot=class{constructor(i){t(this,i),this.errorEvent=e(this,"error-event",7),this.submitEvent=e(this,"submit-event",7),this.checkoutChangedEvent=e(this,"checkout-changed",7),this.plaidService=new Q,this.handleApplePayStarted=()=>{w.isWalletProcessing=!0},this.handleGooglePayStarted=()=>{w.isWalletProcessing=!0},this.handleGooglePayCompleted=t=>{const{success:e,paymentMethodId:i,error:s}=t.detail||{};e&&i?(w.isWalletProcessing=!1,w.paymentToken=i,w.selectedPaymentMethod={type:V.GOOGLE_PAY},this.submitCheckout()):(w.isWalletProcessing=!1,this.errorEvent.emit({message:s&&s.message||"Google Pay payment failed",errorCode:y.TOKENIZE_ERROR,severity:p.ERROR}))},this.handleGooglePayCancelled=()=>{w.isWalletProcessing=!1,w.paymentToken=void 0,w.selectedPaymentMethod=void 0},this.handleApplePayCompleted=t=>{const{success:e,token:i,paymentMethodId:s,error:n}=t.detail;e&&i?(w.isWalletProcessing=!1,w.paymentToken=s,w.selectedPaymentMethod={type:V.APPLE_PAY},this.submitCheckout()):(w.isWalletProcessing=!1,console.error("Apple Pay completed but failed:",n),this.errorEvent.emit({message:(null==n?void 0:n.message)||"Apple Pay payment failed",errorCode:y.TOKENIZE_ERROR,severity:p.ERROR}))},this.handleApplePayError=t=>{w.isWalletProcessing=!1;const{error:e,code:i}=t.detail;console.error("Apple Pay error:",e),this.errorEvent.emit({message:e||"Apple Pay error occurred",errorCode:`APPLE_PAY_${i}`,severity:p.ERROR})},this.handleApplePayCancelled=()=>{w.isWalletProcessing=!1,w.paymentToken=void 0,w.selectedPaymentMethod=void 0}}connectedCallback(){this.observer=new MutationObserver((()=>{this.queryFormRefs(),this.setupApplePayListeners(),this.setupGooglePayListeners()})),this.observer.observe(this.hostEl,{childList:!0,subtree:!0}),w.checkoutId=this.checkoutId;const t={authToken:this.authToken,checkoutId:this.checkoutId,service:new F};this.getCheckout=(({authToken:t,checkoutId:e,service:i})=>async({onSuccess:s,onError:n})=>{var a;try{const o=await i.fetchCheckout(t,e);if(o.error)return n({error:Y(o.error),code:B(null===(a=o.error)||void 0===a?void 0:a.code),severity:p.ERROR});s({checkout:o.data})}catch(t){const e=B(null==t?void 0:t.code);return n({error:t.message||t,code:e,severity:p.ERROR})}})(t),this.completeCheckout=(({authToken:t,checkoutId:e,service:i})=>async({payment:s,onSuccess:n,onError:a})=>{var o;try{const r=await i.complete(t,e,s);if(r.error)return a({error:Y(r.error),code:B(null===(o=r.error)||void 0===o?void 0:o.code),severity:p.ERROR});n({checkout:r.data})}catch(t){const e=B(null==t?void 0:t.code);return a({error:t.message||t,code:e,severity:p.ERROR})}})(t),j((()=>{this.emitCheckoutChanged()}))}componentWillLoad(){this.analytics=new R(this),U(),w.authToken=this.authToken,this.fetchCheckout(),L("set",(t=>{const e=z[t];void 0!==e&&x(t,e)&&this.fetchCheckout()}))}componentDidLoad(){this.queryFormRefs(),this.setupApplePayListeners(),this.setupGooglePayListeners()}disconnectedCallback(){var t;null===(t=this.observer)||void 0===t||t.disconnect(),this.removeApplePayListeners(),this.removeGooglePayListeners()}fetchCheckout(){this.authToken&&this.checkoutId?this.getCheckout&&this.getCheckout({onSuccess:({checkout:t})=>{this.updateStore(t),t.status!==v.completed?t.status!==v.expired||this.errorEvent.emit({message:m.CHECKOUT_EXPIRED,errorCode:y.CHECKOUT_EXPIRED,severity:p.ERROR}):this.errorEvent.emit({message:m.CHECKOUT_ALREADY_COMPLETED,errorCode:y.CHECKOUT_ALREADY_COMPLETED,severity:p.ERROR})},onError:t=>{this.errorEvent.emit({message:t.message,errorCode:t.code,severity:t.severity})}}):this.errorEvent.emit({message:m.NOT_AUTHENTICATED,errorCode:y.NOT_AUTHENTICATED,severity:p.ERROR})}updateStore(t){var e,i,s,n,a,o,r;w.accountId=t.account_id,w.checkoutLoaded=!0,w.paymentMethods=t.payment_methods.map((t=>new H(t))),w.paymentMethodGroupId=t.payment_method_group_id,w.paymentDescription=t.payment_description,w.totalAmount=t.total_amount,w.paymentAmount=t.payment_amount,w.bnplEnabled=t.payment_settings.bnpl_payments,w.insuranceEnabled=t.payment_settings.insurance_payments,w.bankAccountVerification=null===(e=t.payment_settings)||void 0===e?void 0:e.bank_account_verification,w.applePayEnabled=null===(i=t.payment_settings)||void 0===i?void 0:i.apple_payments,w.googlePayEnabled=null===(s=t.payment_settings)||void 0===s?void 0:s.google_payments,w.bnplProviderClientId=null===(n=null==t?void 0:t.bnpl)||void 0===n?void 0:n.provider_client_id,w.bnplProviderMode=null===(a=null==t?void 0:t.bnpl)||void 0===a?void 0:a.provider_mode,w.bnplProviderApiVersion=null===(o=null==t?void 0:t.bnpl)||void 0===o?void 0:o.provider_api_version,w.bnplProviderCheckoutUrl=null===(r=null==t?void 0:t.bnpl)||void 0===r?void 0:r.provider_checkout_url}emitCheckoutChanged(){const t={availablePaymentMethodTypes:P(),selectedPaymentMethod:w.selectedPaymentMethod,savedPaymentMethods:w.paymentMethods};this.checkoutChangedEvent.emit(t)}queryFormRefs(){if(this.billingFormRef=this.hostEl.querySelector("justifi-billing-form, justifi-bank-account-billing-form-simple, justifi-card-billing-form-simple, justifi-billing-form-full, justifi-tokenize-payment-method"),this.applePayRef=this.hostEl.querySelector("justifi-apple-pay"),this.googlePayRef=this.hostEl.querySelector("justifi-google-pay"),this.paymentMethodFormRef=this.hostEl.querySelector("justifi-card-form, justifi-bank-account-form, justifi-tokenize-payment-method"),!w.selectedPaymentMethod&&this.paymentMethodFormRef){const t=this.paymentMethodFormRef.tagName.toLowerCase();"justifi-card-form"===t?w.selectedPaymentMethod={type:V.NEW_CARD}:"justifi-bank-account-form"===t&&(w.selectedPaymentMethod={type:V.NEW_BANK_ACCOUNT})}this.insuranceFormRef=this.hostEl.querySelector("justifi-season-interruption-insurance")}setupApplePayListeners(){this.applePayRef&&(this.applePayRef.addEventListener("applePayStarted",this.handleApplePayStarted),this.applePayRef.addEventListener("applePayCompleted",this.handleApplePayCompleted),this.applePayRef.addEventListener("applePayError",this.handleApplePayError),this.applePayRef.addEventListener("applePayCancelled",this.handleApplePayCancelled))}removeApplePayListeners(){this.applePayRef&&(this.applePayRef.removeEventListener("applePayStarted",this.handleApplePayStarted),this.applePayRef.removeEventListener("applePayCompleted",this.handleApplePayCompleted),this.applePayRef.removeEventListener("applePayError",this.handleApplePayError),this.applePayRef.removeEventListener("applePayCancelled",this.handleApplePayCancelled))}setupGooglePayListeners(){this.googlePayRef&&(this.googlePayRef.addEventListener("googlePayStarted",this.handleGooglePayStarted),this.googlePayRef.addEventListener("googlePayCompleted",this.handleGooglePayCompleted),this.googlePayRef.addEventListener("googlePayCancelled",this.handleGooglePayCancelled))}removeGooglePayListeners(){this.googlePayRef&&(this.googlePayRef.removeEventListener("googlePayStarted",this.handleGooglePayStarted),this.googlePayRef.removeEventListener("googlePayCompleted",this.handleGooglePayCompleted),this.googlePayRef.removeEventListener("googlePayCancelled",this.handleGooglePayCancelled))}async tokenizePaymentMethod(t){var e,i,s;const n=null!==(i=await(null===(e=this.billingFormRef)||void 0===e?void 0:e.getValues()))&&void 0!==i?i:{},a=Object.assign(Object.assign({},t),n),o=Object.assign({accountId:w.accountId,payment_method_group_id:void 0},a);w.savePaymentMethod&&(o.payment_method_group_id=w.paymentMethodGroupId);const r=await(null===(s=this.paymentMethodFormRef)||void 0===s?void 0:s.tokenize({clientId:this.authToken,paymentMethodMetadata:o,account:w.accountId}));return r.error?r:(w.paymentToken=r.id,r.id)}async fillBillingForm(t){w.billingFormFields=t}async setSelectedPaymentMethod(t){w.selectedPaymentMethod=t,w.paymentToken=t.id||void 0}async validate(){var t,e;const i=[];w.insuranceEnabled&&this.insuranceFormRef&&i.push(this.insuranceFormRef.validate());const s=(null===(t=w.selectedPaymentMethod)||void 0===t?void 0:t.type)===V.NEW_CARD,n=(null===(e=w.selectedPaymentMethod)||void 0===e?void 0:e.type)===V.NEW_BANK_ACCOUNT;if((s||n)&&(this.paymentMethodFormRef&&i.push(this.paymentMethodFormRef.validate()),this.billingFormRef&&i.push(this.billingFormRef.validate())),0===i.length)return!0;try{return!!(await Promise.all(i)).every((t=>"boolean"==typeof t?t:!1!==(null==t?void 0:t.isValid)))||(this.errorEvent.emit({message:"Validation error",errorCode:y.VALIDATION_ERROR,severity:p.ERROR}),!1)}catch(t){return!1}}async submitCheckout(t){var e,i,s,n,a;if(w.isSubmitting)return;w.isSubmitting=!0;const o=await this.validate();if(!w.selectedPaymentMethod)return w.isSubmitting=!1,void this.errorEvent.emit({message:"No payment method selected.",errorCode:y.VALIDATION_ERROR,severity:p.ERROR});const r=(null===(e=w.selectedPaymentMethod)||void 0===e?void 0:e.type)===V.NEW_CARD,l=(null===(i=w.selectedPaymentMethod)||void 0===i?void 0:i.type)===V.NEW_BANK_ACCOUNT,h=(null===(s=w.selectedPaymentMethod)||void 0===s?void 0:s.type)===V.PLAID;if(r||l){const e=await this.tokenizePaymentMethod(t);if(null==e?void 0:e.error)return w.isSubmitting=!1,void this.errorEvent.emit({message:e.error.message,errorCode:y.TOKENIZE_ERROR,severity:p.ERROR})}if(h&&!w.paymentToken){const t=w.plaidPublicToken,e=w.plaidLinkTokenId;if(!t)return w.isSubmitting=!1,void this.errorEvent.emit({message:"Missing Plaid public token. Please connect your bank.",errorCode:y.TOKENIZE_ERROR,severity:p.ERROR});try{const i=await this.plaidService.tokenizeBankAccount(w.authToken,w.accountId,t,e||void 0,w.savePaymentMethod?w.paymentMethodGroupId:void 0);if(null==i?void 0:i.error)return w.isSubmitting=!1,void this.errorEvent.emit({message:"string"==typeof i.error?i.error:i.error.message||"Failed to tokenize bank account",errorCode:y.TOKENIZE_ERROR,severity:p.ERROR});const s=null==i?void 0:i.data,a=(null===(n=null==s?void 0:s.bank_account)||void 0===n?void 0:n.token)||(null==s?void 0:s.token)||(null==s?void 0:s.id);w.paymentToken=a}catch(t){return w.isSubmitting=!1,void this.errorEvent.emit({message:(null==t?void 0:t.message)||"Plaid exchange error",errorCode:y.TOKENIZE_ERROR,severity:p.ERROR})}}if(!o)return w.isSubmitting=!1,void this.errorEvent.emit({message:"Please fill in all required fields.",errorCode:y.VALIDATION_ERROR,severity:p.ERROR});if(!w.paymentToken)return w.isSubmitting=!1,void this.errorEvent.emit({message:"Payment token not found.",errorCode:y.TOKENIZE_ERROR,severity:p.ERROR});let c;if(c={payment_mode:(t=>{switch(t){case V.NEW_CARD:case V.SAVED_CARD:case V.NEW_BANK_ACCOUNT:case V.SAVED_BANK_ACCOUNT:case V.PLAID:return G.ECOM;case V.SEZZLE:return G.BNPL;case V.APPLE_PAY:return G.APPLE_PAY;case V.GOOGLE_PAY:return G.GOOGLE_PAY;default:return}})(null===(a=w.selectedPaymentMethod)||void 0===a?void 0:a.type),payment_token:w.paymentToken},this.preCompleteHook){const t=T();try{await new Promise(((e,i)=>{this.preCompleteHook(t,(()=>e()),(()=>i()))}))}catch(t){return w.isSubmitting=!1,void console.log("Checkout cancelled by preCompleteHook",t)}}this.completeCheckout({payment:c,onSuccess:({checkout:t})=>{w.isSubmitting=!1,this.submitEvent.emit({checkout:t,message:"Checkout completed successfully"})},onError:t=>{w.isSubmitting=!1,this.errorEvent.emit({message:t.message,errorCode:y.COMPLETE_CHECKOUT_ERROR,severity:p.ERROR})}})}render(){return i(s,{key:"5dbeab6f10177a3ca87ef7bb62f30ed5859b500f"})}get hostEl(){return n(this)}},rt=class{constructor(i){t(this,i),this.paymentMethodOptionSelected=e(this,"paymentMethodOptionSelected",7),this.plaidError=e(this,"plaidError",7),this.plaidErrorRecovered=e(this,"plaidErrorRecovered",7),this.isAuthenticating=!1,this.publicToken=null,this.linkToken=null,this.linkTokenId=null,this.error=null,this.plaidLink=null,this.isSelected=!1,this.retryCount=0,this.isRetrying=!1,this.plaidService=new Q,this.maxRetries=3,this.retryDelay=2e3,this.timeoutId=null,this.abortController=null,this.hasLoggedDisabledWarning=!1,this.waitForStoreAndInitialize=()=>{w.authToken&&w.accountId&&w.checkoutId?this.initializePlaidLink():setTimeout((()=>{this.waitForStoreAndInitialize()}),100)},this.initializePlaidLink=async()=>{try{if(void 0===window.Plaid)return void this.handleError({code:M.PLAID_SDK_LOAD_FAILED,message:f[M.PLAID_SDK_LOAD_FAILED],severity:g[M.PLAID_SDK_LOAD_FAILED],retryable:!0,userAction:"Refresh the page and try again"});if(await this.getLinkToken(),!this.linkToken)return void this.handleError({code:M.PLAID_LINK_TOKEN_FAILED,message:f[M.PLAID_LINK_TOKEN_FAILED],severity:g[M.PLAID_LINK_TOKEN_FAILED],retryable:!0,userAction:"Click to try again"});const t=window.Plaid;this.plaidLink=t.create({token:this.linkToken,onSuccess:this.handlePlaidSuccess,onExit:this.handlePlaidExit,onEvent:this.handlePlaidEvent,onLoad:this.handlePlaidLoad})}catch(t){this.handleError({code:M.PLAID_LINK_INIT_FAILED,message:f[M.PLAID_LINK_INIT_FAILED],severity:g[M.PLAID_LINK_INIT_FAILED],originalError:t,retryable:!0,userAction:"Click to try again"})}},this.getLinkToken=async()=>{var t,e,i,s,n;try{if(!w.authToken||!w.accountId)return void this.handleError({code:M.PLAID_LINK_TOKEN_FAILED,message:"Missing authentication. Please refresh the page and try again.",severity:p.ERROR,retryable:!1,userAction:"Refresh the page"});this.abortController=new AbortController,this.timeoutId=setTimeout((()=>{var t;null===(t=this.abortController)||void 0===t||t.abort()}),3e4);const e=await this.plaidService.getLinkToken(w.authToken,w.accountId,w.checkoutId,this.abortController.signal);if(this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null),e.error)throw new Error("string"==typeof e.error?e.error:e.error.message||"Failed to get link token");this.linkToken=e.data.link_token,this.linkTokenId=(null==e?void 0:e.id)||(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.id)||null,this.linkTokenId&&(w.plaidLinkTokenId=this.linkTokenId)}catch(t){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null);let a=M.PLAID_LINK_TOKEN_FAILED,o=f[a],r=!0;"AbortError"===t.name?(a=M.PLAID_TIMEOUT,o=f[a],r=!0):(null===(e=t.message)||void 0===e?void 0:e.includes("network"))||(null===(i=t.message)||void 0===i?void 0:i.includes("fetch"))?(a=M.PLAID_NETWORK_ERROR,o=f[a],r=!0):((null===(s=t.message)||void 0===s?void 0:s.includes("401"))||(null===(n=t.message)||void 0===n?void 0:n.includes("unauthorized")))&&(a=M.PLAID_INVALID_CREDENTIALS,o="Authentication failed. Please refresh the page and try again.",r=!1),this.handleError({code:a,message:o,severity:g[a],originalError:t,retryable:r,userAction:r?"Click to try again":"Refresh the page"})}},this.mapApiErrorToPlaidError=t=>{if("string"==typeof t){if(t.includes("rate_limit"))return M.PLAID_RATE_LIMITED;if(t.includes("maintenance"))return M.PLAID_MAINTENANCE;if(t.includes("not_authenticated"))return M.PLAID_INVALID_CREDENTIALS}if(null==t?void 0:t.code)switch(t.code){case"rate_limited":return M.PLAID_RATE_LIMITED;case"maintenance":return M.PLAID_MAINTENANCE;case"not_authenticated":return M.PLAID_INVALID_CREDENTIALS;default:return M.PLAID_LINK_TOKEN_FAILED}return M.PLAID_LINK_TOKEN_FAILED},this.openPlaidLink=()=>{this.plaidLink&&this.linkToken&&(this.isAuthenticating=!0,this.clearError(),this.plaidLink.open())},this.handlePlaidSuccess=t=>{this.publicToken=t,this.isAuthenticating=!1,this.clearError(),this.retryCount=0,this.isSelected||(this.isSelected=!0,w.selectedPaymentMethod={type:V.PLAID}),this.plaidErrorRecovered.emit({code:"plaid-success",message:"Bank account connected successfully",severity:p.INFO}),w.plaidPublicToken=t},this.handlePlaidExit=t=>{this.isAuthenticating=!1,t&&this.handlePlaidError(t)},this.handlePlaidEvent=(t,e)=>{switch(t){case"OPEN":this.isAuthenticating=!0;break;case"CLOSE":this.isAuthenticating=!1;break;case"ERROR":this.handlePlaidError(e)}},this.handlePlaidLoad=()=>{},this.handlePlaidError=t=>{let e=M.PLAID_AUTHENTICATION_FAILED,i=f[e],s=!0,n="Click to try again";if(t.error_code)switch(t.error_code){case"INVALID_CREDENTIALS":e=M.PLAID_INVALID_CREDENTIALS,i=f[e],s=!0;break;case"ITEM_LOGIN_REQUIRED":e=M.PLAID_INVALID_CREDENTIALS,i="Your bank requires re-authentication. Please try again.",s=!0;break;case"ITEM_LOCKED":e=M.PLAID_ACCOUNT_LOCKED,i=f[e],s=!1,n="Contact your bank";break;case"INSTITUTION_NOT_RESPONDING":e=M.PLAID_MAINTENANCE,i=f[e],s=!0;break;case"RATE_LIMIT_EXCEEDED":e=M.PLAID_RATE_LIMITED,i=f[e],s=!0;break;case"INVALID_REQUEST":e=M.PLAID_AUTHENTICATION_FAILED,i="Invalid request. Please try again.",s=!0;break;case"PLAID_ERROR":e=M.PLAID_AUTHENTICATION_FAILED,i=t.error_message||"Bank authentication failed. Please try again.",s=!0;break;default:t.error_message&&(i=t.error_message)}if(t.error_message){const a=t.error_message.toLowerCase();a.includes("not supported")||a.includes("unsupported")?(e=M.PLAID_BANK_NOT_SUPPORTED,i=f[e],s=!1,n="Try a different payment method"):(a.includes("expired")||a.includes("timeout"))&&(e=M.PLAID_TOKEN_EXPIRED,i=f[e],s=!0)}this.handleError({code:e,message:i,severity:g[e],originalError:t,retryable:s,userAction:n}),this.isAuthenticating=!1},this.handleError=t=>{this.error=t,this.plaidError.emit({code:t.code,message:t.message,severity:t.severity,data:{originalError:t.originalError,retryable:t.retryable,userAction:t.userAction,retryCount:this.retryCount}}),console.error("Plaid error:",t),t.retryable&&this.retryCount<this.maxRetries&&this.scheduleRetry()},this.scheduleRetry=()=>{this.isRetrying||(this.isRetrying=!0,this.retryCount++,setTimeout((()=>{this.isRetrying=!1,this.clearError(),this.waitForStoreAndInitialize()}),this.retryDelay*this.retryCount))},this.clearError=()=>{this.error&&(this.error=null,this.retryCount=0)},this.syncWithStore=()=>{var t;const e=(null===(t=w.selectedPaymentMethod)||void 0===t?void 0:t.type)===V.PLAID;this.isSelected!==e&&(this.isSelected=e)}}onSelectionChange(t){var e;t&&(null===(e=w.selectedPaymentMethod)||void 0===e?void 0:e.type)!==V.PLAID&&(w.selectedPaymentMethod={type:V.PLAID}),!t||!this.plaidLink||this.publicToken||this.isAuthenticating||this.error||this.openPlaidLink()}componentDidRender(){this.scriptRef&&(this.scriptRef.onload=()=>{this.waitForStoreAndInitialize()},this.scriptRef.onerror=()=>{this.handleError({code:M.PLAID_SDK_LOAD_FAILED,message:f[M.PLAID_SDK_LOAD_FAILED],severity:g[M.PLAID_SDK_LOAD_FAILED],retryable:!0,userAction:"Refresh the page and try again"})})}componentWillLoad(){var t;this.isSelected=(null===(t=w.selectedPaymentMethod)||void 0===t?void 0:t.type)===V.PLAID}async resolvePaymentMethod(){return this.publicToken?{token:this.publicToken,data:{type:"bank_account",plaid_public_token:this.publicToken}}:{validationError:!0}}async getPaymentToken(){return w.paymentToken}async handleSelectionClick(){if(this.isSelected=!0,w.selectedPaymentMethod={type:V.PLAID},this.error)return this.clearError(),void this.waitForStoreAndInitialize();!this.plaidLink||this.publicToken||this.isAuthenticating||this.openPlaidLink()}async setSelected(t){this.isSelected=t,t&&(w.selectedPaymentMethod={type:V.PLAID})}async isCurrentlySelected(){return this.isSelected}async deselect(){this.isSelected=!1}async reset(){this.publicToken=null,this.clearError(),this.isAuthenticating=!1,this.linkToken=null,this.plaidLink=null,this.retryCount=0,this.isRetrying=!1,this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null),this.abortController&&(this.abortController.abort(),this.abortController=null)}async isReadyForAuthentication(){return!(!this.plaidLink||!this.linkToken||this.isAuthenticating)}async retry(){this.error&&this.error.retryable&&(this.clearError(),this.waitForStoreAndInitialize())}async getErrorInfo(){return this.error}componentDidLoad(){const t=A("selectedPaymentMethod",this.syncWithStore);this.unsubscribeFromStore=t}disconnectedCallback(){this.unsubscribeFromStore&&this.unsubscribeFromStore(),this.timeoutId&&clearTimeout(this.timeoutId),this.abortController&&this.abortController.abort()}render(){if(!0!==w.bankAccountVerification)return this.hasLoggedDisabledWarning||(console.warn("[JustifiPlaidPaymentMethod] bank_account_verification is disabled. Component will not render."),this.hasLoggedDisabledWarning=!0),null;const t=i("img",{class:"plaid-logo-img",src:"data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ4IiB2aWV3Qm94PSIwIDAgMjggMjkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgY2xhc3M9ImNzcy0xcmRhajhtIj48ZyBmaWxsPSIjMTExIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yNS43NjI5IDI2LjI2MjhMMjggMTcuNTMwOUwyNC45NjkxIDE0LjUwMDFMMjcuOTk5OSAxMS40NjkxTDI1Ljc2MjggMi43MzcwNkwxNy4wMzA5IDAuNUwxNC4wMDAxIDMuNTMxTDEwLjk2OSAwLjUwMDE0TDIuMjM3MDYgMi43MzczNEwwIDExLjQ2OTFMMy4wMzEyOCAxNC40OTk5TDAuMDAwMTQgMTcuNTMxTDIuMjM3MiAyNi4yNjI5TDEwLjk2OTEgMjguNUwxNC4wMDAxIDI1LjQ2OUwxNy4wMzEgMjguNDk5OUwyNS43NjI5IDI2LjI2MjhaTTE1LjczMjEgMjMuNzM3MUwxOC42MTg2IDIwLjg1MDVMMjIuMjkxMiAyNC41MjMzTDE3LjY5NTYgMjUuNzAwN0wxNS43MzIxIDIzLjczNzFaTTExLjExMzYgOS44ODE1NEwxNC4wMDAzIDYuOTk1MDJMMTYuODg2OCA5Ljg4MTRMMTQuMDAwMSAxMi43Njc5TDExLjExMzYgOS44ODE1NFpNMTIuMjY4MiAxNC41TDkuMzgxNTQgMTcuMzg2NUw2LjQ5NTAyIDE0LjVMOS4zODE1NCAxMS42MTM1TDEyLjI2ODIgMTQuNVpNMTguNjE4NyAxMS42MTMzTDIxLjUwNTMgMTQuNUwxOC42MTg2IDE3LjM4NjVMMTUuNzMyMSAxNC41TDE4LjYxODcgMTEuNjEzM1pNMTYuODg2NyAxOS4xMTg2TDE0LjAwMDEgMjIuMDA1MUwxMS4xMTM1IDE5LjExODVMMTQuMDAwMSAxNi4yMzE5TDE2Ljg4NjcgMTkuMTE4NlpNMTAuMzA0NCAyNS43MDA3TDUuNzA4NjQgMjQuNTIzM0w5LjM4MTU0IDIwLjg1MDRMMTIuMjY4MiAyMy43MzcxTDEwLjMwNDQgMjUuNzAwN1pNNC43NjMwOCAxNi4yMzE5TDcuNjQ5NiAxOS4xMTg1TDMuOTc2NyAyMi43OTE0TDIuNzk5MyAxOC4xOTU3TDQuNzYzMDggMTYuMjMxOVpNMy45NzY3IDYuMjA4MzZMNy42NDk3NCA5Ljg4MTRMNC43NjMwOCAxMi43NjgxTDIuNzk5MyAxMC44MDQxTDMuOTc2NyA2LjIwODM2Wk0xMi4yNjgzIDUuMjYyOTRMOS4zODE2OCA4LjE0OTZMNS43MDg5MiA0LjQ3NjdMMTAuMzA0NyAzLjI5OTNMMTIuMjY4MyA1LjI2Mjk0Wk0xNy42OTU5IDMuMjk5M0wyMi4yOTE1IDQuNDc2N0wxOC42MTg2IDguMTQ5NDZMMTUuNzMyMSA1LjI2Mjk0TDE3LjY5NTkgMy4yOTkzWk0yMy4yMzcyIDEyLjc2ODFMMjAuMzUwNSA5Ljg4MTRMMjQuMDIzMyA2LjIwODc4TDI1LjIwMDcgMTAuODA0NkwyMy4yMzcyIDEyLjc2ODFaTTI0LjAyMzMgMjIuNzkxNEwyMC4zNTA1IDE5LjExODZMMjMuMjM3MiAxNi4yMzIxTDI1LjIwMDcgMTguMTk1N0wyNC4wMjMzIDIyLjc5MTRaIj48L3BhdGg+PC9nPjwvc3ZnPgo=",alt:"Plaid",title:"Plaid",style:{display:"inline",width:"20px",height:"20px",marginLeft:"5px",marginTop:"-2px"}});return i(b,{class:"payment-method"},i("script",{src:"https://cdn.plaid.com/link/v2/stable/link-initialize.js",async:!0,ref:t=>this.scriptRef=t}),i("div",{title:"Pay with Plaid"},i("div",{onClick:t=>{t.preventDefault(),this.handleSelectionClick()}},"Pay with Bank Account ",t," "),(()=>this.error?i("div",{class:(this.error.severity===p.ERROR?"text-danger":this.error.severity===p.WARNING?"text-warning":"text-info")+" mt-2"},i("small",null,this.error.message),i("br",null),i("small",{class:"text-muted"},this.error.userAction,this.error.retryable&&this.retryCount<this.maxRetries&&i("span",null," • Auto-retry in progress..."))):null)(),(()=>this.error?null:this.isAuthenticating?i("div",{class:"text-info mt-2"},i("small",null,"Connecting to your bank...")):this.publicToken?i("div",{class:"text-success mt-2"},i("small",null,"✓ Bank account connected successfully")):!this.isSelected||this.publicToken||this.error||this.isAuthenticating?null:i("div",{class:"text-muted mt-2"},i("small",null,"Click to connect your bank account")))()))}static get watchers(){return{isSelected:["onSelectionChange"]}}},lt=class{constructor(e){t(this,e),this.onPaymentMethodOptionClick=t=>e=>{e.preventDefault(),w.selectedPaymentMethod={id:t.id,type:t.type},w.paymentToken=t.id},this.isAllowedPaymentMethod=t=>!(t===V.SAVED_CARD&&w.disableCreditCard||t===V.SAVED_BANK_ACCOUNT&&w.disableBankAccount)}componentWillLoad(){w.paymentMethods.length||console.warn("No saved payment methods available."),w.disablePaymentMethodGroup&&console.warn("Payment method group is disabled.")}render(){return w.disablePaymentMethodGroup?null:i(b,null,i("div",{class:"saved-payment-methods"},w.paymentMethods.length?w.paymentMethods.filter((t=>this.isAllowedPaymentMethod(t.type))).map((t=>i("div",{class:"radio-list-item p-3",part:I,onClick:this.onPaymentMethodOptionClick(t)},i("form-control-radio",{name:"paymentMethodType",value:null==t?void 0:t.id,checked:w.paymentToken===(null==t?void 0:t.id),label:`${q[null==t?void 0:t.brand]||""} *${null==t?void 0:t.acct_last_four}`})))):null))}},ht=i("img",{class:"sezzle-smart-button-logo-img",src:"https://media.sezzle.com/branding/2.0/Sezzle_Logo_FullColor.svg",alt:"Sezzle",style:{display:"inline",width:"80px",marginLeft:"5px",marginTop:"-5px"}}),ct=class{constructor(i){t(this,i),this.paymentMethodOptionSelected=e(this,"paymentMethodOptionSelected",7),this.paymentMethodOptionId=V.SEZZLE,this.initializeSezzleCheckout=()=>{let t;this.sezzlePromise=new Promise((e=>{t=e}));const e=Number(w.paymentAmount),i=new(0,window.Checkout)({mode:"popup",publicKey:w.bnplProviderClientId,apiMode:w.bnplProviderMode,apiVersion:w.bnplProviderApiVersion});i.sezzleButtonElement=this.sezzleButtonRef,i.init({onClick:function(t){t.preventDefault(),i.startCheckout({checkout_url:w.bnplProviderCheckoutUrl})},onComplete:e=>t({bnpl:e.data}),onCancel:e=>t({bnpl:e.data}),onFailure:e=>t({bnpl:e.data})}),this.sezzleCheckout=i,this.installmentPlan=this.sezzleCheckout.getInstallmentPlan(e)}}componentDidRender(){this.scriptRef&&(this.scriptRef.onload=()=>{this.sezzleButtonRef=document.createElement("button"),this.initializeSezzleCheckout()})}async resolvePaymentMethod(t){return t.isValid?(this.sezzleButtonRef.click(),this.sezzlePromise):{validationError:!0}}async handleSelectionClick(){w.selectedPaymentMethod={type:V.SEZZLE},this.paymentMethodOptionSelected.emit(this.paymentMethodOptionId)}render(){var t,e;return w.bnplEnabled?i(b,{class:"payment-method"},i("script",{src:"https://checkout-sdk.sezzle.com/checkout.min.js",async:!0,ref:t=>this.scriptRef=t}),i("div",null,i("div",null,"Buy now, pay later with ",ht),this.installmentPlan&&i("small",null,i("span",null,null===(t=this.installmentPlan)||void 0===t?void 0:t.installments.length)," ",i("span",null,this.installmentPlan.schedule," payments of")," ",i("span",{class:"fw-bold"},C(null===(e=this.installmentPlan)||void 0===e?void 0:e.installments[0].amountInCents))))):(console.warn("justifi-sezzle-payment-method: BNPL is not enabled for this account."),null)}},dt={[V.NEW_BANK_ACCOUNT]:"New bank account",[V.NEW_CARD]:"New credit or debit card"},ut="Payment form not ready",pt="Validation error",yt=class{constructor(i){t(this,i),this.errorEvent=e(this,"error-event",7),this.submitEvent=e(this,"submit-event",7),this.computedHideSubmitButton=!1,this.isLoading=!1,this.submitButtonText="Submit"}paymentMethodsChanged(){this.setDefaultSelectedPaymentMethod()}connectedCallback(){this.setDefaultSelectedPaymentMethod(),this.setComputedHideSubmitButton()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup(),this.unsubscribeFromStore&&this.unsubscribeFromStore()}componentWillLoad(){U(),this.analytics=new R(this)}handleRadioClick(t){this.selectedPaymentMethod=t.detail,w.selectedPaymentMethod={type:t.detail}}async tokenizePaymentMethod(t){null==t||t.preventDefault(),this.validateRequiredProps(),this.isLoading=!0;try{if(!(await this.validate()).isValid)return this.errorEvent.emit({errorCode:y.TOKENIZE_ERROR,message:pt}),void(this.isLoading=!1);const t=await this.resolvePaymentMethod({isValid:!0});return t.error&&this.emitError({errorCode:t.error.code,message:t.error.message}),this.submitEvent.emit({response:t}),t}catch(t){const e=this.createErrorResponse(y.TOKENIZE_ERROR,t.message);return this.emitError({errorCode:y.TOKENIZE_ERROR,message:t.message}),this.submitEvent.emit({response:e}),e}finally{this.isLoading=!1}}async fillBillingForm(t){w.billingFormFields=t}async validate(){if(!this.areFormsReady())return{isValid:!1,errors:{general:ut}};const[t,e]=await Promise.all([this.billingFormRef.validate(),this.paymentMethodFormRef.validate()]);return{isValid:t.isValid&&e.isValid,errors:Object.assign(Object.assign({},t.errors),e.errors)}}async getValues(){return this.billingFormRef.getValues()}async tokenize(){try{const t=await this.billingFormRef.getValues(),e={clientId:this.authToken||w.authToken,account:this.accountId||w.accountId,paymentMethodMetadata:this.buildPaymentMethodMetadata(t)};return await this.paymentMethodFormRef.tokenize(e)}catch(t){return t}}validateRequiredProps(){this.authToken||w.authToken||this.emitError({errorCode:y.TOKENIZE_ERROR,message:"Auth token is required when using the tokenize-payment-method component not slotted in justifi-modular-checkout"}),this.accountId||w.accountId||this.emitError({errorCode:y.TOKENIZE_ERROR,message:"Account ID is required when using the tokenize-payment-method component not slotted in justifi-modular-checkout"})}setDefaultSelectedPaymentMethod(){this.selectedPaymentMethod||(this.disableCreditCard?this.disableBankAccount||(this.selectedPaymentMethod=V.NEW_BANK_ACCOUNT,w.selectedPaymentMethod={type:V.NEW_BANK_ACCOUNT}):(this.selectedPaymentMethod=V.NEW_CARD,w.selectedPaymentMethod={type:V.NEW_CARD}))}setComputedHideSubmitButton(){if(void 0!==this.hideSubmitButton)return void(this.computedHideSubmitButton=this.hideSubmitButton);const t=this.isSlottedWithinModularCheckout();this.computedHideSubmitButton=t}isSlottedWithinModularCheckout(){var t;let e=null===(t=this.host)||void 0===t?void 0:t.parentElement;for(;e;){if("JUSTIFI-MODULAR-CHECKOUT"===e.tagName)return!0;e=e.parentElement}return!1}get availablePaymentMethods(){const t=[];return this.disableCreditCard||t.push(V.NEW_CARD),this.disableBankAccount||t.push(V.NEW_BANK_ACCOUNT),t}areFormsReady(){return!(!this.billingFormRef||!this.paymentMethodFormRef)}emitError(t){this.errorEvent.emit(Object.assign(Object.assign({},t),{severity:p.ERROR}))}createErrorResponse(t,e){return{error:{code:t,message:e,decline_code:void 0}}}async resolvePaymentMethod(t){if(!this.areFormsReady())return this.createErrorResponse("form_not_ready",ut);try{const e=await this.validate();if(!e.isValid||!t.isValid){const t=Object.values(e.errors)[0]||pt;return{validationError:!0,error:{code:"validation_error",message:String(t),decline_code:void 0}}}return await this.performTokenization()}catch(t){return{error:t}}}async performTokenization(){var t,e;const i=await this.tokenize();if(i.error)return{error:i.error};const s=i.data;return{token:(null===(t=s.card)||void 0===t?void 0:t.token)||(null===(e=s.bank_account)||void 0===e?void 0:e.token),data:s}}buildPaymentMethodMetadata(t){return this.shouldSavePaymentMethod?Object.assign(Object.assign({},t),{payment_method_group_id:this.paymentMethodGroupID}):Object.assign({},t)}get paymentMethodGroupID(){return this.paymentMethodGroupId||w.paymentMethodGroupId}get shouldSavePaymentMethod(){return!(!this.paymentMethodGroupId&&!w.savePaymentMethod)}get shouldHideRadioInput(){return this.disableCreditCard||this.disableBankAccount}renderPaymentMethodOption(t){const e=this.selectedPaymentMethod===t&&void 0===w.selectedPaymentMethod.id;return i("div",{class:"payment-method"},i("radio-list-item",{name:"paymentMethodType",value:t,checked:e,label:dt[t],hidden:this.shouldHideRadioInput}),e&&this.renderSelectedPaymentMethodForm(t))}renderSelectedPaymentMethodForm(t){return i("div",{class:"mt-4 pb-4"},this.renderPaymentMethodForm(t),i("div",{class:"mt-4"},i("billing-form",{ref:t=>{t&&(this.billingFormRef=t)},hideCardBillingForm:this.hideCardBillingForm,hideBankAccountBillingForm:this.hideBankAccountBillingForm,paymentMethodType:t})),i("div",{class:"mt-4"},i("save-new-payment-method",{hidden:!this.paymentMethodGroupID,label:this.savePaymentMethodLabel})))}renderPaymentMethodForm(t){return i(t===V.NEW_CARD?"card-form":"bank-account-form",{ref:t=>{t&&(this.paymentMethodFormRef=t)}})}render(){return i(b,{key:"e426ad2935cf88bd5af628da9154cdaccc5e6be2"},i("form",{key:"571fcd140680840f5b68ee08b9cb7d9a5c6156ed"},i("fieldset",{key:"b394ce7a04e7d57ce2f4eb787252412409c3703d"},i("div",{key:"1eb916974b71ead6dda1c54c36f0cb8f90433190",class:"row gy-3"},i("div",{key:"8fb01d0e321fd265ede20f712779f66cf4404d78",class:"col-12"},this.availablePaymentMethods.map((t=>this.renderPaymentMethodOption(t)))),i("div",{key:"40f03fdb6df080a8d55b72a818b3eb42e56fd9f9",class:"col-12"},i("internal-button",{key:"b719a621d8a3592e8b4a193656672ab6dd799006",text:this.submitButtonText,variant:"primary",type:"submit",clickHandler:t=>this.tokenizePaymentMethod(t),isLoading:this.isLoading,"data-testid":"submit-button",hidden:this.computedHideSubmitButton}))))))}get host(){return n(this)}static get watchers(){return{disableCreditCard:["paymentMethodsChanged"],disableBankAccount:["paymentMethodsChanged"]}}};export{$ as justifi_apple_pay,tt as justifi_button,et as justifi_checkout_summary,nt as justifi_google_pay,at as justifi_header,ot as justifi_modular_checkout,rt as justifi_plaid_payment_method,W as justifi_radio_list_item,lt as justifi_saved_payment_methods,ct as justifi_sezzle_payment_method,yt as justifi_tokenize_payment_method}
@@ -1 +1 @@
1
- import{r as e,c as t,h as o,H as i}from"./p-CV0Pyo1O.js";import{C as s}from"./p-ZpPDShvP.js";import{r as a}from"./p-D50Rx76J.js";import"./p-HXpYMWUU.js";const d=class{constructor(o){e(this,o),this.paymentMethodOptionSelected=t(this,"paymentMethodOptionSelected",7),this.onPaymentMethodOptionClick=e=>{e.preventDefault(),this.paymentMethodOptionSelected.emit(this.paymentMethodOption)}}async resolvePaymentMethod(e){var t;return e.isValid?{token:null===(t=this.paymentMethodOption)||void 0===t?void 0:t.id}:{validationError:!0}}render(){var e,t,d;return o(i,{key:"e344ee9a3ca002fa7b1685991db6fc947b1ab740",class:"payment-method"},o("div",{key:"6e0c985161d5e7e8dc381d7171df9b70a25d007b",class:"radio-list-item p-3",part:a,onClick:this.onPaymentMethodOptionClick},o("form-control-radio",{key:"826c54a61730d9e55f14da3ef6f7b7dea897e036",name:"paymentMethodType",value:null===(e=this.paymentMethodOption)||void 0===e?void 0:e.id,checked:this.isSelected,label:`${s[null===(t=this.paymentMethodOption)||void 0===t?void 0:t.brand]||""} *${null===(d=this.paymentMethodOption)||void 0===d?void 0:d.acct_last_four}`})))}};export{d as justifi_saved_payment_method}
1
+ import{r as e,c as t,h as o,H as i}from"./p-CV0Pyo1O.js";import{C as s}from"./p-ZpPDShvP.js";import{r as a}from"./p-DnrawQn3.js";import"./p-HXpYMWUU.js";const r=class{constructor(o){e(this,o),this.paymentMethodOptionSelected=t(this,"paymentMethodOptionSelected",7),this.onPaymentMethodOptionClick=e=>{e.preventDefault(),this.paymentMethodOptionSelected.emit(this.paymentMethodOption)}}async resolvePaymentMethod(e){var t;return e.isValid?{token:null===(t=this.paymentMethodOption)||void 0===t?void 0:t.id}:{validationError:!0}}render(){var e,t,r;return o(i,{key:"66b8725a684241fc105d182ee5982167b2007506",class:"payment-method"},o("div",{key:"d0370f70b880f6a83b18eaeeefce7b8fde342ce9",class:"radio-list-item p-3",part:a,onClick:this.onPaymentMethodOptionClick},o("form-control-radio",{key:"76ed425815f77082ba1145aa2df04beef6044e07",name:"paymentMethodType",value:null===(e=this.paymentMethodOption)||void 0===e?void 0:e.id,checked:this.isSelected,label:`${s[null===(t=this.paymentMethodOption)||void 0===t?void 0:t.brand]||""} *${null===(r=this.paymentMethodOption)||void 0===r?void 0:r.acct_last_four}`})))}};export{r as justifi_saved_payment_method}
@@ -0,0 +1 @@
1
+ import{r as t,c as s,h as e,H as i,g as a}from"./p-CV0Pyo1O.js";import{w as o,x as r,q as h,u as f,v as l}from"./p-DnrawQn3.js";import{F as c}from"./p-BsQy297i.js";import"./p-CZfYo5-1.js";const n=class{constructor(e){t(this,e),this.formControlInput=s(this,"formControlInput",7),this.formControlBlur=s(this,"formControlBlur",7),this.fileSelected=s(this,"fileSelected",7),this.isFocused=!1,this.errorText="",this.inputHandler=()=>{},this.disabled=!1,this.handleFormControlInput=t=>{const s=t.target,e=s.getAttribute("name");this.inputHandler(e,s.value),this.formControlInput.emit({name:e,value:s.value})},this.changeHandler=()=>{const t=this.fileInput.files;t&&this.fileSelected.emit({fileList:t,document_type:this.documentType})}}componentDidLoad(){this.fileInput=this.el.querySelector("input")}get part(){let t=o;return this.errorText&&(t=h),this.disabled&&(t=f),this.isFocused&&(t=l),t}render(){return e(i,{key:"6029c84182825326d6bbd77aca89907f569bd508"},e("div",{key:"1c32a3ee26adb61444af0ab39d8783cb5ec17f0a",class:"form-group d-flex flex-column"},e("div",{key:"5018405df5c3275e6c5b2e225898e30ceaa74ca5",class:"d-flex align-items-start gap-2"},e("label",{key:"769a3e84e5439e600bc579bfa8b7091f8105b3c4",part:r,class:"form-label",htmlFor:this.name},this.label),e("form-control-tooltip",{key:"6559a3b53cf6456f0b9f4b5eed34a377ec9af4b8",helpText:this.helpText})),e("input",{key:"b1f15be1f9a3e38f65fa6475d6454ebbfdf9f612",ref:t=>this.fileInput=t,type:"file",name:this.name,part:this.part,class:this.errorText?"form-control is-invalid":"form-control",multiple:this.multiple,disabled:this.disabled,onChange:this.changeHandler,onInput:this.handleFormControlInput,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()}}),e(c,{key:"c90a103f4e21948b70643a1f35fd7321f51cf21a",errorText:this.errorText,name:this.name})))}get el(){return a(this)}};export{n as form_control_file}
@@ -1 +1 @@
1
- import{r as t,c as n,h as e}from"./p-CV0Pyo1O.js";import{an as r,ao as i,ap as o}from"./p-D50Rx76J.js";var a="top",u="bottom",f="right",s="left",c="auto",l=[a,u,f,s],h="start",d="end",p="viewport",v="popper",b=l.reduce((function(t,n){return t.concat([n+"-"+h,n+"-"+d])}),[]),m=[].concat(l,[c]).reduce((function(t,n){return t.concat([n,n+"-"+h,n+"-"+d])}),[]),y=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function w(t){return t?(t.nodeName||"").toLowerCase():null}function x(t){if(null==t)return window;if("[object Window]"!==t.toString()){var n=t.ownerDocument;return n&&n.defaultView||window}return t}function g(t){return t instanceof x(t).Element||t instanceof Element}function O(t){return t instanceof x(t).HTMLElement||t instanceof HTMLElement}function j(t){return"undefined"!=typeof ShadowRoot&&(t instanceof x(t).ShadowRoot||t instanceof ShadowRoot)}function k(t){return t.split("-")[0]}var M=Math.max,R=Math.min,A=Math.round;function E(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function q(){return!/^((?!chrome|android).)*safari/i.test(E())}function C(t,n,e){void 0===n&&(n=!1),void 0===e&&(e=!1);var r=t.getBoundingClientRect(),i=1,o=1;n&&O(t)&&(i=t.offsetWidth>0&&A(r.width)/t.offsetWidth||1,o=t.offsetHeight>0&&A(r.height)/t.offsetHeight||1);var a=(g(t)?x(t):window).visualViewport,u=!q()&&e,f=(r.left+(u&&a?a.offsetLeft:0))/i,s=(r.top+(u&&a?a.offsetTop:0))/o,c=r.width/i,l=r.height/o;return{width:c,height:l,top:s,right:f+c,bottom:s+l,left:f,x:f,y:s}}function P(t){var n=C(t),e=t.offsetWidth,r=t.offsetHeight;return Math.abs(n.width-e)<=1&&(e=n.width),Math.abs(n.height-r)<=1&&(r=n.height),{x:t.offsetLeft,y:t.offsetTop,width:e,height:r}}function B(t,n){var e=n.getRootNode&&n.getRootNode();if(t.contains(n))return!0;if(e&&j(e)){var r=n;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function L(t){return x(t).getComputedStyle(t)}function S(t){return["table","td","th"].indexOf(w(t))>=0}function W(t){return((g(t)?t.ownerDocument:t.document)||window.document).documentElement}function z(t){return"html"===w(t)?t:t.assignedSlot||t.parentNode||(j(t)?t.host:null)||W(t)}function H(t){return O(t)&&"fixed"!==L(t).position?t.offsetParent:null}function T(t){for(var n=x(t),e=H(t);e&&S(e)&&"static"===L(e).position;)e=H(e);return e&&("html"===w(e)||"body"===w(e)&&"static"===L(e).position)?n:e||function(t){var n=/firefox/i.test(E());if(/Trident/i.test(E())&&O(t)&&"fixed"===L(t).position)return null;var e=z(t);for(j(e)&&(e=e.host);O(e)&&["html","body"].indexOf(w(e))<0;){var r=L(e);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||n&&"filter"===r.willChange||n&&r.filter&&"none"!==r.filter)return e;e=e.parentNode}return null}(t)||n}function I(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function V(t,n,e){return M(t,R(n,e))}function _(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function D(t,n){return n.reduce((function(n,e){return n[e]=t,n}),{})}function F(t){return t.split("-")[1]}var J={top:"auto",right:"auto",bottom:"auto",left:"auto"};function U(t){var n,e=t.popper,r=t.popperRect,i=t.placement,o=t.variation,c=t.offsets,l=t.position,h=t.gpuAcceleration,p=t.adaptive,v=t.roundOffsets,b=t.isFixed,m=c.x,y=void 0===m?0:m,w=c.y,g=void 0===w?0:w,O="function"==typeof v?v({x:y,y:g}):{x:y,y:g};y=O.x,g=O.y;var j=c.hasOwnProperty("x"),k=c.hasOwnProperty("y"),M=s,R=a,E=window;if(p){var q=T(e),C="clientHeight",P="clientWidth";q===x(e)&&"static"!==L(q=W(e)).position&&"absolute"===l&&(C="scrollHeight",P="scrollWidth"),(i===a||(i===s||i===f)&&o===d)&&(R=u,g-=(b&&q===E&&E.visualViewport?E.visualViewport.height:q[C])-r.height,g*=h?1:-1),i!==s&&(i!==a&&i!==u||o!==d)||(M=f,y-=(b&&q===E&&E.visualViewport?E.visualViewport.width:q[P])-r.width,y*=h?1:-1)}var B,S=Object.assign({position:l},p&&J),z=!0===v?function(t,n){var e=t.y,r=n.devicePixelRatio||1;return{x:A(t.x*r)/r||0,y:A(e*r)/r||0}}({x:y,y:g},x(e)):{x:y,y:g};return y=z.x,g=z.y,Object.assign({},S,h?((B={})[R]=k?"0":"",B[M]=j?"0":"",B.transform=(E.devicePixelRatio||1)<=1?"translate("+y+"px, "+g+"px)":"translate3d("+y+"px, "+g+"px, 0)",B):((n={})[R]=k?g+"px":"",n[M]=j?y+"px":"",n.transform="",n))}var G={passive:!0},K={left:"right",right:"left",bottom:"top",top:"bottom"};function N(t){return t.replace(/left|right|bottom|top/g,(function(t){return K[t]}))}var Q={start:"end",end:"start"};function X(t){return t.replace(/start|end/g,(function(t){return Q[t]}))}function Y(t){var n=x(t);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function Z(t){return C(W(t)).left+Y(t).scrollLeft}function $(t){var n=L(t);return/auto|scroll|overlay|hidden/.test(n.overflow+n.overflowY+n.overflowX)}function tt(t){return["html","body","#document"].indexOf(w(t))>=0?t.ownerDocument.body:O(t)&&$(t)?t:tt(z(t))}function nt(t,n){var e;void 0===n&&(n=[]);var r=tt(t),i=r===(null==(e=t.ownerDocument)?void 0:e.body),o=x(r),a=i?[o].concat(o.visualViewport||[],$(r)?r:[]):r,u=n.concat(a);return i?u:u.concat(nt(z(a)))}function et(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function rt(t,n,e){return n===p?et(function(t,n){var e=x(t),r=W(t),i=e.visualViewport,o=r.clientWidth,a=r.clientHeight,u=0,f=0;if(i){o=i.width,a=i.height;var s=q();(s||!s&&"fixed"===n)&&(u=i.offsetLeft,f=i.offsetTop)}return{width:o,height:a,x:u+Z(t),y:f}}(t,e)):g(n)?function(t,n){var e=C(t,!1,"fixed"===n);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(n,e):et(function(t){var n,e=W(t),r=Y(t),i=null==(n=t.ownerDocument)?void 0:n.body,o=M(e.scrollWidth,e.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=M(e.scrollHeight,e.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),u=-r.scrollLeft+Z(t),f=-r.scrollTop;return"rtl"===L(i||e).direction&&(u+=M(e.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:u,y:f}}(W(t)))}function it(t){var n,e=t.reference,r=t.element,i=t.placement,o=i?k(i):null,c=i?F(i):null,l=e.x+e.width/2-r.width/2,p=e.y+e.height/2-r.height/2;switch(o){case a:n={x:l,y:e.y-r.height};break;case u:n={x:l,y:e.y+e.height};break;case f:n={x:e.x+e.width,y:p};break;case s:n={x:e.x-r.width,y:p};break;default:n={x:e.x,y:e.y}}var v=o?I(o):null;if(null!=v){var b="y"===v?"height":"width";switch(c){case h:n[v]=n[v]-(e[b]/2-r[b]/2);break;case d:n[v]=n[v]+(e[b]/2-r[b]/2)}}return n}function ot(t,n){void 0===n&&(n={});var e=n.placement,r=void 0===e?t.placement:e,i=n.strategy,o=void 0===i?t.strategy:i,s=n.boundary,c=void 0===s?"clippingParents":s,h=n.rootBoundary,d=void 0===h?p:h,b=n.elementContext,m=void 0===b?v:b,y=n.altBoundary,x=void 0!==y&&y,j=n.padding,k=void 0===j?0:j,A=_("number"!=typeof k?k:D(k,l)),E=t.rects.popper,q=t.elements[x?m===v?"reference":v:m],P=function(t,n,e,r){var i="clippingParents"===n?function(t){var n=nt(z(t)),e=["absolute","fixed"].indexOf(L(t).position)>=0&&O(t)?T(t):t;return g(e)?n.filter((function(t){return g(t)&&B(t,e)&&"body"!==w(t)})):[]}(t):[].concat(n),o=[].concat(i,[e]),a=o.reduce((function(n,e){var i=rt(t,e,r);return n.top=M(i.top,n.top),n.right=R(i.right,n.right),n.bottom=R(i.bottom,n.bottom),n.left=M(i.left,n.left),n}),rt(t,o[0],r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(g(q)?q:q.contextElement||W(t.elements.popper),c,d,o),S=C(t.elements.reference),H=it({reference:S,element:E,placement:r}),I=et(Object.assign({},E,H)),V=m===v?I:S,F={top:P.top-V.top+A.top,bottom:V.bottom-P.bottom+A.bottom,left:P.left-V.left+A.left,right:V.right-P.right+A.right},J=t.modifiersData.offset;if(m===v&&J){var U=J[r];Object.keys(F).forEach((function(t){var n=[f,u].indexOf(t)>=0?1:-1,e=[a,u].indexOf(t)>=0?"y":"x";F[t]+=U[e]*n}))}return F}function at(t,n){void 0===n&&(n={});var e=n.boundary,r=n.rootBoundary,i=n.padding,o=n.flipVariations,a=n.allowedAutoPlacements,u=void 0===a?m:a,f=F(n.placement),s=f?o?b:b.filter((function(t){return F(t)===f})):l,c=s.filter((function(t){return u.indexOf(t)>=0}));0===c.length&&(c=s);var h=c.reduce((function(n,o){return n[o]=ot(t,{placement:o,boundary:e,rootBoundary:r,padding:i})[k(o)],n}),{});return Object.keys(h).sort((function(t,n){return h[t]-h[n]}))}var ut={name:"flip",enabled:!0,phase:"main",fn:function(t){var n=t.state,e=t.options,r=t.name;if(!n.modifiersData[r]._skip){for(var i=e.mainAxis,o=void 0===i||i,l=e.altAxis,d=void 0===l||l,p=e.fallbackPlacements,v=e.padding,b=e.boundary,m=e.rootBoundary,y=e.altBoundary,w=e.flipVariations,x=void 0===w||w,g=e.allowedAutoPlacements,O=n.options.placement,j=k(O),M=p||(j!==O&&x?function(t){if(k(t)===c)return[];var n=N(t);return[X(t),n,X(n)]}(O):[N(O)]),R=[O].concat(M).reduce((function(t,e){return t.concat(k(e)===c?at(n,{placement:e,boundary:b,rootBoundary:m,padding:v,flipVariations:x,allowedAutoPlacements:g}):e)}),[]),A=n.rects.reference,E=n.rects.popper,q=new Map,C=!0,P=R[0],B=0;B<R.length;B++){var L=R[B],S=k(L),W=F(L)===h,z=[a,u].indexOf(S)>=0,H=z?"width":"height",T=ot(n,{placement:L,boundary:b,rootBoundary:m,altBoundary:y,padding:v}),I=z?W?f:s:W?u:a;A[H]>E[H]&&(I=N(I));var V=N(I),_=[];if(o&&_.push(T[S]<=0),d&&_.push(T[I]<=0,T[V]<=0),_.every((function(t){return t}))){P=L,C=!1;break}q.set(L,_)}if(C)for(var D=function(t){var n=R.find((function(n){var e=q.get(n);if(e)return e.slice(0,t).every((function(t){return t}))}));if(n)return P=n,"break"},J=x?3:1;J>0&&"break"!==D(J);J--);n.placement!==P&&(n.modifiersData[r]._skip=!0,n.placement=P,n.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function ft(t,n,e){return void 0===e&&(e={x:0,y:0}),{top:t.top-n.height-e.y,right:t.right-n.width+e.x,bottom:t.bottom-n.height+e.y,left:t.left-n.width-e.x}}function st(t){return[a,f,u,s].some((function(n){return t[n]>=0}))}function ct(t,n,e){void 0===e&&(e=!1);var r,i,o=O(n),a=O(n)&&function(t){var n=t.getBoundingClientRect(),e=A(n.width)/t.offsetWidth||1,r=A(n.height)/t.offsetHeight||1;return 1!==e||1!==r}(n),u=W(n),f=C(t,a,e),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(o||!o&&!e)&&(("body"!==w(n)||$(u))&&(s=(r=n)!==x(r)&&O(r)?{scrollLeft:(i=r).scrollLeft,scrollTop:i.scrollTop}:Y(r)),O(n)?((c=C(n,!0)).x+=n.clientLeft,c.y+=n.clientTop):u&&(c.x=Z(u))),{x:f.left+s.scrollLeft-c.x,y:f.top+s.scrollTop-c.y,width:f.width,height:f.height}}function lt(t){var n=new Map,e=new Set,r=[];function i(t){e.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!e.has(t)){var r=n.get(t);r&&i(r)}})),r.push(t)}return t.forEach((function(t){n.set(t.name,t)})),t.forEach((function(t){e.has(t.name)||i(t)})),r}var ht={placement:"bottom",modifiers:[],strategy:"absolute"};function dt(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return!n.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function pt(t){void 0===t&&(t={});var n=t.defaultModifiers,e=void 0===n?[]:n,r=t.defaultOptions,i=void 0===r?ht:r;return function(t,n,r){void 0===r&&(r=i);var o,a,u={placement:"bottom",orderedModifiers:[],options:Object.assign({},ht,i),modifiersData:{},elements:{reference:t,popper:n},attributes:{},styles:{}},f=[],s=!1,c={state:u,setOptions:function(r){var o="function"==typeof r?r(u.options):r;l(),u.options=Object.assign({},i,u.options,o),u.scrollParents={reference:g(t)?nt(t):t.contextElement?nt(t.contextElement):[],popper:nt(n)};var a,s,h=function(t){var n=lt(t);return y.reduce((function(t,e){return t.concat(n.filter((function(t){return t.phase===e})))}),[])}((a=[].concat(e,u.options.modifiers),s=a.reduce((function(t,n){var e=t[n.name];return t[n.name]=e?Object.assign({},e,n,{options:Object.assign({},e.options,n.options),data:Object.assign({},e.data,n.data)}):n,t}),{}),Object.keys(s).map((function(t){return s[t]}))));return u.orderedModifiers=h.filter((function(t){return t.enabled})),u.orderedModifiers.forEach((function(t){var n=t.options,e=t.effect;if("function"==typeof e){var r=e({state:u,name:t.name,instance:c,options:void 0===n?{}:n});f.push(r||function(){})}})),c.update()},forceUpdate:function(){if(!s){var t=u.elements,n=t.reference,e=t.popper;if(dt(n,e)){u.rects={reference:ct(n,T(e),"fixed"===u.options.strategy),popper:P(e)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach((function(t){return u.modifiersData[t.name]=Object.assign({},t.data)}));for(var r=0;r<u.orderedModifiers.length;r++)if(!0!==u.reset){var i=u.orderedModifiers[r],o=i.fn,a=i.options;"function"==typeof o&&(u=o({state:u,options:void 0===a?{}:a,name:i.name,instance:c})||u)}else u.reset=!1,r=-1}}},update:(o=function(){return new Promise((function(t){c.forceUpdate(),t(u)}))},function(){return a||(a=new Promise((function(t){Promise.resolve().then((function(){a=void 0,t(o())}))}))),a}),destroy:function(){l(),s=!0}};if(!dt(t,n))return c;function l(){f.forEach((function(t){return t()})),f=[]}return c.setOptions(r).then((function(t){!s&&r.onFirstUpdate&&r.onFirstUpdate(t)})),c}}var vt=pt({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var n=t.state,e=t.instance,r=t.options,i=r.scroll,o=void 0===i||i,a=r.resize,u=void 0===a||a,f=x(n.elements.popper),s=[].concat(n.scrollParents.reference,n.scrollParents.popper);return o&&s.forEach((function(t){t.addEventListener("scroll",e.update,G)})),u&&f.addEventListener("resize",e.update,G),function(){o&&s.forEach((function(t){t.removeEventListener("scroll",e.update,G)})),u&&f.removeEventListener("resize",e.update,G)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var n=t.state;n.modifiersData[t.name]=it({reference:n.rects.reference,element:n.rects.popper,placement:n.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var n=t.state,e=t.options,r=e.gpuAcceleration,i=void 0===r||r,o=e.adaptive,a=void 0===o||o,u=e.roundOffsets,f=void 0===u||u,s={placement:k(n.placement),variation:F(n.placement),popper:n.elements.popper,popperRect:n.rects.popper,gpuAcceleration:i,isFixed:"fixed"===n.options.strategy};null!=n.modifiersData.popperOffsets&&(n.styles.popper=Object.assign({},n.styles.popper,U(Object.assign({},s,{offsets:n.modifiersData.popperOffsets,position:n.options.strategy,adaptive:a,roundOffsets:f})))),null!=n.modifiersData.arrow&&(n.styles.arrow=Object.assign({},n.styles.arrow,U(Object.assign({},s,{offsets:n.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-placement":n.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var n=t.state;Object.keys(n.elements).forEach((function(t){var e=n.styles[t]||{},r=n.attributes[t]||{},i=n.elements[t];O(i)&&w(i)&&(Object.assign(i.style,e),Object.keys(r).forEach((function(t){var n=r[t];!1===n?i.removeAttribute(t):i.setAttribute(t,!0===n?"":n)})))}))},effect:function(t){var n=t.state,e={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(n.elements.popper.style,e.popper),n.styles=e,n.elements.arrow&&Object.assign(n.elements.arrow.style,e.arrow),function(){Object.keys(n.elements).forEach((function(t){var r=n.elements[t],i=n.attributes[t]||{},o=Object.keys(n.styles.hasOwnProperty(t)?n.styles[t]:e[t]).reduce((function(t,n){return t[n]="",t}),{});O(r)&&w(r)&&(Object.assign(r.style,o),Object.keys(i).forEach((function(t){r.removeAttribute(t)})))}))}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var n=t.state,e=t.name,r=t.options.offset,i=void 0===r?[0,0]:r,o=m.reduce((function(t,e){return t[e]=function(t,n,e){var r=k(t),i=[s,a].indexOf(r)>=0?-1:1,o="function"==typeof e?e(Object.assign({},n,{placement:t})):e,u=o[0],c=o[1];return u=u||0,c=(c||0)*i,[s,f].indexOf(r)>=0?{x:c,y:u}:{x:u,y:c}}(e,n.rects,i),t}),{}),u=o[n.placement],c=u.y;null!=n.modifiersData.popperOffsets&&(n.modifiersData.popperOffsets.x+=u.x,n.modifiersData.popperOffsets.y+=c),n.modifiersData[e]=o}},ut,{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var n=t.state,e=t.options,r=t.name,i=e.mainAxis,o=void 0===i||i,c=e.altAxis,l=void 0!==c&&c,d=e.tether,p=void 0===d||d,v=e.tetherOffset,b=void 0===v?0:v,m=ot(n,{boundary:e.boundary,rootBoundary:e.rootBoundary,padding:e.padding,altBoundary:e.altBoundary}),y=k(n.placement),w=F(n.placement),x=!w,g=I(y),O="x"===g?"y":"x",j=n.modifiersData.popperOffsets,A=n.rects.reference,E=n.rects.popper,q="function"==typeof b?b(Object.assign({},n.rects,{placement:n.placement})):b,C="number"==typeof q?{mainAxis:q,altAxis:q}:Object.assign({mainAxis:0,altAxis:0},q),B=n.modifiersData.offset?n.modifiersData.offset[n.placement]:null,L={x:0,y:0};if(j){if(o){var S,W="y"===g?a:s,z="y"===g?u:f,H="y"===g?"height":"width",_=j[g],D=_+m[W],J=_-m[z],U=p?-E[H]/2:0,G=w===h?A[H]:E[H],K=w===h?-E[H]:-A[H],N=n.elements.arrow,Q=p&&N?P(N):{width:0,height:0},X=n.modifiersData["arrow#persistent"]?n.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Y=X[W],Z=X[z],$=V(0,A[H],Q[H]),tt=x?A[H]/2-U-$-Y-C.mainAxis:G-$-Y-C.mainAxis,nt=x?-A[H]/2+U+$+Z+C.mainAxis:K+$+Z+C.mainAxis,et=n.elements.arrow&&T(n.elements.arrow),rt=null!=(S=null==B?void 0:B[g])?S:0,it=_+nt-rt,at=V(p?R(D,_+tt-rt-(et?"y"===g?et.clientTop||0:et.clientLeft||0:0)):D,_,p?M(J,it):J);j[g]=at,L[g]=at-_}if(l){var ut,ft=j[O],st="y"===O?"height":"width",ct=ft+m["x"===g?a:s],lt=ft-m["x"===g?u:f],ht=-1!==[a,s].indexOf(y),dt=null!=(ut=null==B?void 0:B[O])?ut:0,pt=ht?ct:ft-A[st]-E[st]-dt+C.altAxis,vt=ht?ft+A[st]+E[st]-dt-C.altAxis:lt,bt=p&&ht?function(t,n,e){var r=V(t,n,e);return r>e?e:r}(pt,ft,vt):V(p?pt:ct,ft,p?vt:lt);j[O]=bt,L[O]=bt-ft}n.modifiersData[r]=L}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var n,e=t.state,r=t.name,i=t.options,o=e.elements.arrow,c=e.modifiersData.popperOffsets,h=k(e.placement),d=I(h),p=[s,f].indexOf(h)>=0?"height":"width";if(o&&c){var v=function(t,n){return _("number"!=typeof(t="function"==typeof t?t(Object.assign({},n.rects,{placement:n.placement})):t)?t:D(t,l))}(i.padding,e),b=P(o),m="y"===d?a:s,y="y"===d?u:f,w=e.rects.reference[p]+e.rects.reference[d]-c[d]-e.rects.popper[p],x=c[d]-e.rects.reference[d],g=T(o),O=g?"y"===d?g.clientHeight||0:g.clientWidth||0:0,j=O/2-b[p]/2+(w/2-x/2),M=V(v[m],j,O-b[p]-v[y]);e.modifiersData[r]=((n={})[d]=M,n.centerOffset=M-j,n)}},effect:function(t){var n=t.state,e=t.options.element,r=void 0===e?"[data-popper-arrow]":e;null!=r&&("string"!=typeof r||(r=n.elements.popper.querySelector(r)))&&B(n.elements.popper,r)&&(n.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var n=t.state,e=t.name,r=n.rects.reference,i=n.rects.popper,o=n.modifiersData.preventOverflow,a=ot(n,{elementContext:"reference"}),u=ot(n,{altBoundary:!0}),f=ft(a,r),s=ft(u,i,o),c=st(f),l=st(s);n.modifiersData[e]={referenceClippingOffsets:f,popperEscapeOffsets:s,isReferenceHidden:c,hasPopperEscaped:l},n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":l})}}]});const bt=class{constructor(e){t(this,e),this.showEvent=n(this,"showEvent",7),this.hideEvent=n(this,"hideEvent",7),this.placement="bottom",this.offset=[0,10],this.strategy="absolute",this.trigger="click",this.isOpen=!1,this.initialized=!1,this.boundHandlers={show:null,hide:null,handleClick:null}}onAnchorRefChange(t){t&&this.popperContentRef&&!this.initialized&&this.initPopper()}componentDidLoad(){this.anchorRef&&this.popperContentRef&&this.initPopper()}initPopper(){this.initialized||(this.initialized=!0,this.boundHandlers.show=this.show.bind(this),this.boundHandlers.hide=this.hide.bind(this),this.boundHandlers.handleClick=this.handleClick.bind(this),this.popperInstance=vt(this.anchorRef,this.popperContentRef,this.popperOptions),"click"===this.trigger?window.addEventListener("click",this.boundHandlers.handleClick):"hover"===this.trigger?(this.anchorRef.addEventListener("mouseenter",this.boundHandlers.show),this.anchorRef.addEventListener("mouseleave",this.boundHandlers.hide),this.popperContentRef.addEventListener("mouseenter",this.boundHandlers.show),this.popperContentRef.addEventListener("mouseleave",this.boundHandlers.hide)):"focus"===this.trigger&&(this.anchorRef.addEventListener("focus",this.boundHandlers.show),this.anchorRef.addEventListener("blur",this.boundHandlers.hide)))}disconnectedCallback(){var t,n,e,r,i,o,a;this.initialized&&(null===(t=this.popperInstance)||void 0===t||t.destroy(),"click"===this.trigger?window.removeEventListener("click",this.boundHandlers.handleClick):"hover"===this.trigger?(null===(n=this.anchorRef)||void 0===n||n.removeEventListener("mouseenter",this.boundHandlers.show),null===(e=this.anchorRef)||void 0===e||e.removeEventListener("mouseleave",this.boundHandlers.hide),null===(r=this.popperContentRef)||void 0===r||r.removeEventListener("mouseenter",this.boundHandlers.show),null===(i=this.popperContentRef)||void 0===i||i.removeEventListener("mouseleave",this.boundHandlers.hide)):"focus"===this.trigger&&(null===(o=this.anchorRef)||void 0===o||o.removeEventListener("focus",this.boundHandlers.show),null===(a=this.anchorRef)||void 0===a||a.removeEventListener("blur",this.boundHandlers.hide)))}handleClick(t){const n=t.composedPath(),e=n.includes(this.anchorRef),r=n.includes(this.popperContentRef);!this.isOpen&&e?this.show():(this.isOpen&&!r||this.isOpen&&e)&&this.hide()}get popperOptions(){return{placement:this.placement,modifiers:[{name:"offset",options:{offset:this.offset}}],strategy:this.strategy}}show(){this.isOpen=!0,this.popperContentRef.setAttribute("data-show",""),this.popperInstance.update(),this.showEvent.emit()}hide(){this.isOpen=!1,this.popperContentRef.removeAttribute("data-show"),this.popperInstance.update(),this.hideEvent.emit()}render(){return e("div",{key:"673bffd40c2c3ca346f45a3eb6cf0eacb1bc0420"},e("style",{key:"1a22ba743c813e67a72db15bbb8847c5e5f5407f"},"\n .popper-content {\n display: none;\n }\n .popper-content[data-show] {\n display: block;\n z-index: 1030;\n }\n "),e("div",{key:"0626834e4395eb59afda87b93653f47e9641b79a",class:"popper-content",ref:t=>this.popperContentRef=t},e("slot",{key:"26895f103accf6acce333928c2100c55dcdd1f5d"})))}static get watchers(){return{anchorRef:["onAnchorRefChange"]}}},mt=class{constructor(n){t(this,n)}show(){this.tooltip.classList.add("show")}hide(){this.tooltip.classList.remove("show")}render(){return this.helpText?e("div",{class:"tooltip-container"},e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-question-square tooltip-icon",viewBox:"0 0 16 16",ref:t=>this.anchorIcon=t,part:o},e("path",{d:"M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2z"}),e("path",{d:"M5.255 5.786a.237.237 0 0 0 .241.247h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 0 0 .25.246h.811a.25.25 0 0 0 .25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286m1.557 5.763c0 .533.425.927 1.01.927.609 0 1.028-.394 1.028-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94"})),e("custom-popper",{trigger:"hover",placement:"top",anchorRef:this.anchorIcon},e("div",{class:"tooltip bs-tooltip-top",part:r,role:"tooltip",ref:t=>this.tooltip=t},e("div",{class:"tooltip-inner",part:i},this.helpText)))):null}};export{bt as custom_popper,mt as form_control_tooltip}
1
+ import{r as t,c as n,h as e}from"./p-CV0Pyo1O.js";import{an as r,ao as i,ap as o}from"./p-DnrawQn3.js";var a="top",u="bottom",f="right",s="left",c="auto",l=[a,u,f,s],h="start",d="end",p="viewport",v="popper",b=l.reduce((function(t,n){return t.concat([n+"-"+h,n+"-"+d])}),[]),m=[].concat(l,[c]).reduce((function(t,n){return t.concat([n,n+"-"+h,n+"-"+d])}),[]),y=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function w(t){return t?(t.nodeName||"").toLowerCase():null}function x(t){if(null==t)return window;if("[object Window]"!==t.toString()){var n=t.ownerDocument;return n&&n.defaultView||window}return t}function g(t){return t instanceof x(t).Element||t instanceof Element}function O(t){return t instanceof x(t).HTMLElement||t instanceof HTMLElement}function j(t){return"undefined"!=typeof ShadowRoot&&(t instanceof x(t).ShadowRoot||t instanceof ShadowRoot)}function k(t){return t.split("-")[0]}var M=Math.max,A=Math.min,E=Math.round;function R(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function q(){return!/^((?!chrome|android).)*safari/i.test(R())}function C(t,n,e){void 0===n&&(n=!1),void 0===e&&(e=!1);var r=t.getBoundingClientRect(),i=1,o=1;n&&O(t)&&(i=t.offsetWidth>0&&E(r.width)/t.offsetWidth||1,o=t.offsetHeight>0&&E(r.height)/t.offsetHeight||1);var a=(g(t)?x(t):window).visualViewport,u=!q()&&e,f=(r.left+(u&&a?a.offsetLeft:0))/i,s=(r.top+(u&&a?a.offsetTop:0))/o,c=r.width/i,l=r.height/o;return{width:c,height:l,top:s,right:f+c,bottom:s+l,left:f,x:f,y:s}}function P(t){var n=C(t),e=t.offsetWidth,r=t.offsetHeight;return Math.abs(n.width-e)<=1&&(e=n.width),Math.abs(n.height-r)<=1&&(r=n.height),{x:t.offsetLeft,y:t.offsetTop,width:e,height:r}}function B(t,n){var e=n.getRootNode&&n.getRootNode();if(t.contains(n))return!0;if(e&&j(e)){var r=n;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function L(t){return x(t).getComputedStyle(t)}function S(t){return["table","td","th"].indexOf(w(t))>=0}function W(t){return((g(t)?t.ownerDocument:t.document)||window.document).documentElement}function z(t){return"html"===w(t)?t:t.assignedSlot||t.parentNode||(j(t)?t.host:null)||W(t)}function H(t){return O(t)&&"fixed"!==L(t).position?t.offsetParent:null}function T(t){for(var n=x(t),e=H(t);e&&S(e)&&"static"===L(e).position;)e=H(e);return e&&("html"===w(e)||"body"===w(e)&&"static"===L(e).position)?n:e||function(t){var n=/firefox/i.test(R());if(/Trident/i.test(R())&&O(t)&&"fixed"===L(t).position)return null;var e=z(t);for(j(e)&&(e=e.host);O(e)&&["html","body"].indexOf(w(e))<0;){var r=L(e);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||n&&"filter"===r.willChange||n&&r.filter&&"none"!==r.filter)return e;e=e.parentNode}return null}(t)||n}function I(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function V(t,n,e){return M(t,A(n,e))}function _(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function D(t,n){return n.reduce((function(n,e){return n[e]=t,n}),{})}function F(t){return t.split("-")[1]}var Q={top:"auto",right:"auto",bottom:"auto",left:"auto"};function U(t){var n,e=t.popper,r=t.popperRect,i=t.placement,o=t.variation,c=t.offsets,l=t.position,h=t.gpuAcceleration,p=t.adaptive,v=t.roundOffsets,b=t.isFixed,m=c.x,y=void 0===m?0:m,w=c.y,g=void 0===w?0:w,O="function"==typeof v?v({x:y,y:g}):{x:y,y:g};y=O.x,g=O.y;var j=c.hasOwnProperty("x"),k=c.hasOwnProperty("y"),M=s,A=a,R=window;if(p){var q=T(e),C="clientHeight",P="clientWidth";q===x(e)&&"static"!==L(q=W(e)).position&&"absolute"===l&&(C="scrollHeight",P="scrollWidth"),(i===a||(i===s||i===f)&&o===d)&&(A=u,g-=(b&&q===R&&R.visualViewport?R.visualViewport.height:q[C])-r.height,g*=h?1:-1),i!==s&&(i!==a&&i!==u||o!==d)||(M=f,y-=(b&&q===R&&R.visualViewport?R.visualViewport.width:q[P])-r.width,y*=h?1:-1)}var B,S=Object.assign({position:l},p&&Q),z=!0===v?function(t,n){var e=t.y,r=n.devicePixelRatio||1;return{x:E(t.x*r)/r||0,y:E(e*r)/r||0}}({x:y,y:g},x(e)):{x:y,y:g};return y=z.x,g=z.y,Object.assign({},S,h?((B={})[A]=k?"0":"",B[M]=j?"0":"",B.transform=(R.devicePixelRatio||1)<=1?"translate("+y+"px, "+g+"px)":"translate3d("+y+"px, "+g+"px, 0)",B):((n={})[A]=k?g+"px":"",n[M]=j?y+"px":"",n.transform="",n))}var G={passive:!0},J={left:"right",right:"left",bottom:"top",top:"bottom"};function K(t){return t.replace(/left|right|bottom|top/g,(function(t){return J[t]}))}var N={start:"end",end:"start"};function X(t){return t.replace(/start|end/g,(function(t){return N[t]}))}function Y(t){var n=x(t);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function Z(t){return C(W(t)).left+Y(t).scrollLeft}function $(t){var n=L(t);return/auto|scroll|overlay|hidden/.test(n.overflow+n.overflowY+n.overflowX)}function tt(t){return["html","body","#document"].indexOf(w(t))>=0?t.ownerDocument.body:O(t)&&$(t)?t:tt(z(t))}function nt(t,n){var e;void 0===n&&(n=[]);var r=tt(t),i=r===(null==(e=t.ownerDocument)?void 0:e.body),o=x(r),a=i?[o].concat(o.visualViewport||[],$(r)?r:[]):r,u=n.concat(a);return i?u:u.concat(nt(z(a)))}function et(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function rt(t,n,e){return n===p?et(function(t,n){var e=x(t),r=W(t),i=e.visualViewport,o=r.clientWidth,a=r.clientHeight,u=0,f=0;if(i){o=i.width,a=i.height;var s=q();(s||!s&&"fixed"===n)&&(u=i.offsetLeft,f=i.offsetTop)}return{width:o,height:a,x:u+Z(t),y:f}}(t,e)):g(n)?function(t,n){var e=C(t,!1,"fixed"===n);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(n,e):et(function(t){var n,e=W(t),r=Y(t),i=null==(n=t.ownerDocument)?void 0:n.body,o=M(e.scrollWidth,e.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=M(e.scrollHeight,e.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),u=-r.scrollLeft+Z(t),f=-r.scrollTop;return"rtl"===L(i||e).direction&&(u+=M(e.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:u,y:f}}(W(t)))}function it(t){var n,e=t.reference,r=t.element,i=t.placement,o=i?k(i):null,c=i?F(i):null,l=e.x+e.width/2-r.width/2,p=e.y+e.height/2-r.height/2;switch(o){case a:n={x:l,y:e.y-r.height};break;case u:n={x:l,y:e.y+e.height};break;case f:n={x:e.x+e.width,y:p};break;case s:n={x:e.x-r.width,y:p};break;default:n={x:e.x,y:e.y}}var v=o?I(o):null;if(null!=v){var b="y"===v?"height":"width";switch(c){case h:n[v]=n[v]-(e[b]/2-r[b]/2);break;case d:n[v]=n[v]+(e[b]/2-r[b]/2)}}return n}function ot(t,n){void 0===n&&(n={});var e=n.placement,r=void 0===e?t.placement:e,i=n.strategy,o=void 0===i?t.strategy:i,s=n.boundary,c=void 0===s?"clippingParents":s,h=n.rootBoundary,d=void 0===h?p:h,b=n.elementContext,m=void 0===b?v:b,y=n.altBoundary,x=void 0!==y&&y,j=n.padding,k=void 0===j?0:j,E=_("number"!=typeof k?k:D(k,l)),R=t.rects.popper,q=t.elements[x?m===v?"reference":v:m],P=function(t,n,e,r){var i="clippingParents"===n?function(t){var n=nt(z(t)),e=["absolute","fixed"].indexOf(L(t).position)>=0&&O(t)?T(t):t;return g(e)?n.filter((function(t){return g(t)&&B(t,e)&&"body"!==w(t)})):[]}(t):[].concat(n),o=[].concat(i,[e]),a=o.reduce((function(n,e){var i=rt(t,e,r);return n.top=M(i.top,n.top),n.right=A(i.right,n.right),n.bottom=A(i.bottom,n.bottom),n.left=M(i.left,n.left),n}),rt(t,o[0],r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(g(q)?q:q.contextElement||W(t.elements.popper),c,d,o),S=C(t.elements.reference),H=it({reference:S,element:R,placement:r}),I=et(Object.assign({},R,H)),V=m===v?I:S,F={top:P.top-V.top+E.top,bottom:V.bottom-P.bottom+E.bottom,left:P.left-V.left+E.left,right:V.right-P.right+E.right},Q=t.modifiersData.offset;if(m===v&&Q){var U=Q[r];Object.keys(F).forEach((function(t){var n=[f,u].indexOf(t)>=0?1:-1,e=[a,u].indexOf(t)>=0?"y":"x";F[t]+=U[e]*n}))}return F}function at(t,n){void 0===n&&(n={});var e=n.boundary,r=n.rootBoundary,i=n.padding,o=n.flipVariations,a=n.allowedAutoPlacements,u=void 0===a?m:a,f=F(n.placement),s=f?o?b:b.filter((function(t){return F(t)===f})):l,c=s.filter((function(t){return u.indexOf(t)>=0}));0===c.length&&(c=s);var h=c.reduce((function(n,o){return n[o]=ot(t,{placement:o,boundary:e,rootBoundary:r,padding:i})[k(o)],n}),{});return Object.keys(h).sort((function(t,n){return h[t]-h[n]}))}var ut={name:"flip",enabled:!0,phase:"main",fn:function(t){var n=t.state,e=t.options,r=t.name;if(!n.modifiersData[r]._skip){for(var i=e.mainAxis,o=void 0===i||i,l=e.altAxis,d=void 0===l||l,p=e.fallbackPlacements,v=e.padding,b=e.boundary,m=e.rootBoundary,y=e.altBoundary,w=e.flipVariations,x=void 0===w||w,g=e.allowedAutoPlacements,O=n.options.placement,j=k(O),M=p||(j!==O&&x?function(t){if(k(t)===c)return[];var n=K(t);return[X(t),n,X(n)]}(O):[K(O)]),A=[O].concat(M).reduce((function(t,e){return t.concat(k(e)===c?at(n,{placement:e,boundary:b,rootBoundary:m,padding:v,flipVariations:x,allowedAutoPlacements:g}):e)}),[]),E=n.rects.reference,R=n.rects.popper,q=new Map,C=!0,P=A[0],B=0;B<A.length;B++){var L=A[B],S=k(L),W=F(L)===h,z=[a,u].indexOf(S)>=0,H=z?"width":"height",T=ot(n,{placement:L,boundary:b,rootBoundary:m,altBoundary:y,padding:v}),I=z?W?f:s:W?u:a;E[H]>R[H]&&(I=K(I));var V=K(I),_=[];if(o&&_.push(T[S]<=0),d&&_.push(T[I]<=0,T[V]<=0),_.every((function(t){return t}))){P=L,C=!1;break}q.set(L,_)}if(C)for(var D=function(t){var n=A.find((function(n){var e=q.get(n);if(e)return e.slice(0,t).every((function(t){return t}))}));if(n)return P=n,"break"},Q=x?3:1;Q>0&&"break"!==D(Q);Q--);n.placement!==P&&(n.modifiersData[r]._skip=!0,n.placement=P,n.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function ft(t,n,e){return void 0===e&&(e={x:0,y:0}),{top:t.top-n.height-e.y,right:t.right-n.width+e.x,bottom:t.bottom-n.height+e.y,left:t.left-n.width-e.x}}function st(t){return[a,f,u,s].some((function(n){return t[n]>=0}))}function ct(t,n,e){void 0===e&&(e=!1);var r,i,o=O(n),a=O(n)&&function(t){var n=t.getBoundingClientRect(),e=E(n.width)/t.offsetWidth||1,r=E(n.height)/t.offsetHeight||1;return 1!==e||1!==r}(n),u=W(n),f=C(t,a,e),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(o||!o&&!e)&&(("body"!==w(n)||$(u))&&(s=(r=n)!==x(r)&&O(r)?{scrollLeft:(i=r).scrollLeft,scrollTop:i.scrollTop}:Y(r)),O(n)?((c=C(n,!0)).x+=n.clientLeft,c.y+=n.clientTop):u&&(c.x=Z(u))),{x:f.left+s.scrollLeft-c.x,y:f.top+s.scrollTop-c.y,width:f.width,height:f.height}}function lt(t){var n=new Map,e=new Set,r=[];function i(t){e.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!e.has(t)){var r=n.get(t);r&&i(r)}})),r.push(t)}return t.forEach((function(t){n.set(t.name,t)})),t.forEach((function(t){e.has(t.name)||i(t)})),r}var ht={placement:"bottom",modifiers:[],strategy:"absolute"};function dt(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return!n.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function pt(t){void 0===t&&(t={});var n=t.defaultModifiers,e=void 0===n?[]:n,r=t.defaultOptions,i=void 0===r?ht:r;return function(t,n,r){void 0===r&&(r=i);var o,a,u={placement:"bottom",orderedModifiers:[],options:Object.assign({},ht,i),modifiersData:{},elements:{reference:t,popper:n},attributes:{},styles:{}},f=[],s=!1,c={state:u,setOptions:function(r){var o="function"==typeof r?r(u.options):r;l(),u.options=Object.assign({},i,u.options,o),u.scrollParents={reference:g(t)?nt(t):t.contextElement?nt(t.contextElement):[],popper:nt(n)};var a,s,h=function(t){var n=lt(t);return y.reduce((function(t,e){return t.concat(n.filter((function(t){return t.phase===e})))}),[])}((a=[].concat(e,u.options.modifiers),s=a.reduce((function(t,n){var e=t[n.name];return t[n.name]=e?Object.assign({},e,n,{options:Object.assign({},e.options,n.options),data:Object.assign({},e.data,n.data)}):n,t}),{}),Object.keys(s).map((function(t){return s[t]}))));return u.orderedModifiers=h.filter((function(t){return t.enabled})),u.orderedModifiers.forEach((function(t){var n=t.options,e=t.effect;if("function"==typeof e){var r=e({state:u,name:t.name,instance:c,options:void 0===n?{}:n});f.push(r||function(){})}})),c.update()},forceUpdate:function(){if(!s){var t=u.elements,n=t.reference,e=t.popper;if(dt(n,e)){u.rects={reference:ct(n,T(e),"fixed"===u.options.strategy),popper:P(e)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach((function(t){return u.modifiersData[t.name]=Object.assign({},t.data)}));for(var r=0;r<u.orderedModifiers.length;r++)if(!0!==u.reset){var i=u.orderedModifiers[r],o=i.fn,a=i.options;"function"==typeof o&&(u=o({state:u,options:void 0===a?{}:a,name:i.name,instance:c})||u)}else u.reset=!1,r=-1}}},update:(o=function(){return new Promise((function(t){c.forceUpdate(),t(u)}))},function(){return a||(a=new Promise((function(t){Promise.resolve().then((function(){a=void 0,t(o())}))}))),a}),destroy:function(){l(),s=!0}};if(!dt(t,n))return c;function l(){f.forEach((function(t){return t()})),f=[]}return c.setOptions(r).then((function(t){!s&&r.onFirstUpdate&&r.onFirstUpdate(t)})),c}}var vt=pt({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var n=t.state,e=t.instance,r=t.options,i=r.scroll,o=void 0===i||i,a=r.resize,u=void 0===a||a,f=x(n.elements.popper),s=[].concat(n.scrollParents.reference,n.scrollParents.popper);return o&&s.forEach((function(t){t.addEventListener("scroll",e.update,G)})),u&&f.addEventListener("resize",e.update,G),function(){o&&s.forEach((function(t){t.removeEventListener("scroll",e.update,G)})),u&&f.removeEventListener("resize",e.update,G)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var n=t.state;n.modifiersData[t.name]=it({reference:n.rects.reference,element:n.rects.popper,placement:n.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var n=t.state,e=t.options,r=e.gpuAcceleration,i=void 0===r||r,o=e.adaptive,a=void 0===o||o,u=e.roundOffsets,f=void 0===u||u,s={placement:k(n.placement),variation:F(n.placement),popper:n.elements.popper,popperRect:n.rects.popper,gpuAcceleration:i,isFixed:"fixed"===n.options.strategy};null!=n.modifiersData.popperOffsets&&(n.styles.popper=Object.assign({},n.styles.popper,U(Object.assign({},s,{offsets:n.modifiersData.popperOffsets,position:n.options.strategy,adaptive:a,roundOffsets:f})))),null!=n.modifiersData.arrow&&(n.styles.arrow=Object.assign({},n.styles.arrow,U(Object.assign({},s,{offsets:n.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-placement":n.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var n=t.state;Object.keys(n.elements).forEach((function(t){var e=n.styles[t]||{},r=n.attributes[t]||{},i=n.elements[t];O(i)&&w(i)&&(Object.assign(i.style,e),Object.keys(r).forEach((function(t){var n=r[t];!1===n?i.removeAttribute(t):i.setAttribute(t,!0===n?"":n)})))}))},effect:function(t){var n=t.state,e={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(n.elements.popper.style,e.popper),n.styles=e,n.elements.arrow&&Object.assign(n.elements.arrow.style,e.arrow),function(){Object.keys(n.elements).forEach((function(t){var r=n.elements[t],i=n.attributes[t]||{},o=Object.keys(n.styles.hasOwnProperty(t)?n.styles[t]:e[t]).reduce((function(t,n){return t[n]="",t}),{});O(r)&&w(r)&&(Object.assign(r.style,o),Object.keys(i).forEach((function(t){r.removeAttribute(t)})))}))}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var n=t.state,e=t.name,r=t.options.offset,i=void 0===r?[0,0]:r,o=m.reduce((function(t,e){return t[e]=function(t,n,e){var r=k(t),i=[s,a].indexOf(r)>=0?-1:1,o="function"==typeof e?e(Object.assign({},n,{placement:t})):e,u=o[0],c=o[1];return u=u||0,c=(c||0)*i,[s,f].indexOf(r)>=0?{x:c,y:u}:{x:u,y:c}}(e,n.rects,i),t}),{}),u=o[n.placement],c=u.y;null!=n.modifiersData.popperOffsets&&(n.modifiersData.popperOffsets.x+=u.x,n.modifiersData.popperOffsets.y+=c),n.modifiersData[e]=o}},ut,{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var n=t.state,e=t.options,r=t.name,i=e.mainAxis,o=void 0===i||i,c=e.altAxis,l=void 0!==c&&c,d=e.tether,p=void 0===d||d,v=e.tetherOffset,b=void 0===v?0:v,m=ot(n,{boundary:e.boundary,rootBoundary:e.rootBoundary,padding:e.padding,altBoundary:e.altBoundary}),y=k(n.placement),w=F(n.placement),x=!w,g=I(y),O="x"===g?"y":"x",j=n.modifiersData.popperOffsets,E=n.rects.reference,R=n.rects.popper,q="function"==typeof b?b(Object.assign({},n.rects,{placement:n.placement})):b,C="number"==typeof q?{mainAxis:q,altAxis:q}:Object.assign({mainAxis:0,altAxis:0},q),B=n.modifiersData.offset?n.modifiersData.offset[n.placement]:null,L={x:0,y:0};if(j){if(o){var S,W="y"===g?a:s,z="y"===g?u:f,H="y"===g?"height":"width",_=j[g],D=_+m[W],Q=_-m[z],U=p?-R[H]/2:0,G=w===h?E[H]:R[H],J=w===h?-R[H]:-E[H],K=n.elements.arrow,N=p&&K?P(K):{width:0,height:0},X=n.modifiersData["arrow#persistent"]?n.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Y=X[W],Z=X[z],$=V(0,E[H],N[H]),tt=x?E[H]/2-U-$-Y-C.mainAxis:G-$-Y-C.mainAxis,nt=x?-E[H]/2+U+$+Z+C.mainAxis:J+$+Z+C.mainAxis,et=n.elements.arrow&&T(n.elements.arrow),rt=null!=(S=null==B?void 0:B[g])?S:0,it=_+nt-rt,at=V(p?A(D,_+tt-rt-(et?"y"===g?et.clientTop||0:et.clientLeft||0:0)):D,_,p?M(Q,it):Q);j[g]=at,L[g]=at-_}if(l){var ut,ft=j[O],st="y"===O?"height":"width",ct=ft+m["x"===g?a:s],lt=ft-m["x"===g?u:f],ht=-1!==[a,s].indexOf(y),dt=null!=(ut=null==B?void 0:B[O])?ut:0,pt=ht?ct:ft-E[st]-R[st]-dt+C.altAxis,vt=ht?ft+E[st]+R[st]-dt-C.altAxis:lt,bt=p&&ht?function(t,n,e){var r=V(t,n,e);return r>e?e:r}(pt,ft,vt):V(p?pt:ct,ft,p?vt:lt);j[O]=bt,L[O]=bt-ft}n.modifiersData[r]=L}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var n,e=t.state,r=t.name,i=t.options,o=e.elements.arrow,c=e.modifiersData.popperOffsets,h=k(e.placement),d=I(h),p=[s,f].indexOf(h)>=0?"height":"width";if(o&&c){var v=function(t,n){return _("number"!=typeof(t="function"==typeof t?t(Object.assign({},n.rects,{placement:n.placement})):t)?t:D(t,l))}(i.padding,e),b=P(o),m="y"===d?a:s,y="y"===d?u:f,w=e.rects.reference[p]+e.rects.reference[d]-c[d]-e.rects.popper[p],x=c[d]-e.rects.reference[d],g=T(o),O=g?"y"===d?g.clientHeight||0:g.clientWidth||0:0,j=O/2-b[p]/2+(w/2-x/2),M=V(v[m],j,O-b[p]-v[y]);e.modifiersData[r]=((n={})[d]=M,n.centerOffset=M-j,n)}},effect:function(t){var n=t.state,e=t.options.element,r=void 0===e?"[data-popper-arrow]":e;null!=r&&("string"!=typeof r||(r=n.elements.popper.querySelector(r)))&&B(n.elements.popper,r)&&(n.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var n=t.state,e=t.name,r=n.rects.reference,i=n.rects.popper,o=n.modifiersData.preventOverflow,a=ot(n,{elementContext:"reference"}),u=ot(n,{altBoundary:!0}),f=ft(a,r),s=ft(u,i,o),c=st(f),l=st(s);n.modifiersData[e]={referenceClippingOffsets:f,popperEscapeOffsets:s,isReferenceHidden:c,hasPopperEscaped:l},n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":l})}}]});const bt=class{constructor(e){t(this,e),this.showEvent=n(this,"showEvent",7),this.hideEvent=n(this,"hideEvent",7),this.placement="bottom",this.offset=[0,10],this.strategy="absolute",this.trigger="click",this.isOpen=!1,this.initialized=!1,this.boundHandlers={show:null,hide:null,handleClick:null}}onAnchorRefChange(t){t&&this.popperContentRef&&!this.initialized&&this.initPopper()}componentDidLoad(){this.anchorRef&&this.popperContentRef&&this.initPopper()}initPopper(){this.initialized||(this.initialized=!0,this.boundHandlers.show=this.show.bind(this),this.boundHandlers.hide=this.hide.bind(this),this.boundHandlers.handleClick=this.handleClick.bind(this),this.popperInstance=vt(this.anchorRef,this.popperContentRef,this.popperOptions),"click"===this.trigger?window.addEventListener("click",this.boundHandlers.handleClick):"hover"===this.trigger?(this.anchorRef.addEventListener("mouseenter",this.boundHandlers.show),this.anchorRef.addEventListener("mouseleave",this.boundHandlers.hide),this.popperContentRef.addEventListener("mouseenter",this.boundHandlers.show),this.popperContentRef.addEventListener("mouseleave",this.boundHandlers.hide)):"focus"===this.trigger&&(this.anchorRef.addEventListener("focus",this.boundHandlers.show),this.anchorRef.addEventListener("blur",this.boundHandlers.hide)))}disconnectedCallback(){var t,n,e,r,i,o,a;this.initialized&&(null===(t=this.popperInstance)||void 0===t||t.destroy(),"click"===this.trigger?window.removeEventListener("click",this.boundHandlers.handleClick):"hover"===this.trigger?(null===(n=this.anchorRef)||void 0===n||n.removeEventListener("mouseenter",this.boundHandlers.show),null===(e=this.anchorRef)||void 0===e||e.removeEventListener("mouseleave",this.boundHandlers.hide),null===(r=this.popperContentRef)||void 0===r||r.removeEventListener("mouseenter",this.boundHandlers.show),null===(i=this.popperContentRef)||void 0===i||i.removeEventListener("mouseleave",this.boundHandlers.hide)):"focus"===this.trigger&&(null===(o=this.anchorRef)||void 0===o||o.removeEventListener("focus",this.boundHandlers.show),null===(a=this.anchorRef)||void 0===a||a.removeEventListener("blur",this.boundHandlers.hide)))}handleClick(t){const n=t.composedPath(),e=n.includes(this.anchorRef),r=n.includes(this.popperContentRef);!this.isOpen&&e?this.show():(this.isOpen&&!r||this.isOpen&&e)&&this.hide()}get popperOptions(){return{placement:this.placement,modifiers:[{name:"offset",options:{offset:this.offset}}],strategy:this.strategy}}show(){this.isOpen=!0,this.popperContentRef.setAttribute("data-show",""),this.popperInstance.update(),this.showEvent.emit()}hide(){this.isOpen=!1,this.popperContentRef.removeAttribute("data-show"),this.popperInstance.update(),this.hideEvent.emit()}render(){return e("div",{key:"7a5bab9f568f74c4cc7635a5844ca9a48c506521"},e("style",{key:"9d073f9cc6b46141f05def0a5fa51d61ce2ec1b0"},"\n .popper-content {\n display: none;\n }\n .popper-content[data-show] {\n display: block;\n z-index: 1030;\n }\n "),e("div",{key:"7cea0b75df433ed9b5a8e46b015814a954f47c99",class:"popper-content",ref:t=>this.popperContentRef=t},e("slot",{key:"6a6f628864ce86989413f80b8a39f7fe089d6633"})))}static get watchers(){return{anchorRef:["onAnchorRefChange"]}}},mt=class{constructor(n){t(this,n)}show(){this.tooltip.classList.add("show")}hide(){this.tooltip.classList.remove("show")}render(){return this.helpText?e("div",{class:"tooltip-container"},e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-question-square tooltip-icon",viewBox:"0 0 16 16",ref:t=>this.anchorIcon=t,part:o},e("path",{d:"M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2z"}),e("path",{d:"M5.255 5.786a.237.237 0 0 0 .241.247h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 0 0 .25.246h.811a.25.25 0 0 0 .25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286m1.557 5.763c0 .533.425.927 1.01.927.609 0 1.028-.394 1.028-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94"})),e("custom-popper",{trigger:"hover",placement:"top",anchorRef:this.anchorIcon},e("div",{class:"tooltip bs-tooltip-top",part:r,role:"tooltip",ref:t=>this.tooltip=t},e("div",{class:"tooltip-inner",part:i},this.helpText)))):null}};export{bt as custom_popper,mt as form_control_tooltip}
@@ -0,0 +1 @@
1
+ import{h as e,r as t,c as a}from"./p-CV0Pyo1O.js";import{P as s}from"./p-Dbg501Lu.js";import{m as i}from"./p-DWevPe7C.js";import{C as c,e as d,g as b}from"./p-CUI41_5y.js";import{J as f}from"./p-cXPhRFs-.js";import{c as l}from"./p-GP5gWjhc.js";import"./p-DVJaoI_m.js";import{b as r,d as h,s as o}from"./p-BRnBHsdq.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import{a as p}from"./p-BH0Xfn-F.js";import{P as n,M as m}from"./p-D1D2eC05.js";import{a as y,b as u,D as v,c as k,C as j,E as g}from"./p-x9fFFf7F.js";import{S as C}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{S as D}from"./p-DcBvJu0k.js";import{a as w,B as P}from"./p-pL4dNfsl.js";import"./p-CYQvLgSs.js";import"./p-HXpYMWUU.js";import"./p-B5vVjDc_.js";import"./p-CXKOe1m5.js";import"./p-D8GTwl9v.js";import"./p-DnrawQn3.js";const x=()=>e("div",{class:"row gap-3"},e("div",{class:"col-12"},e(D,{width:"35%",height:"30px"})),e("div",{class:"col-12"},e(D,{width:"70%"})),e("div",{class:"col-12"},e(D,{width:"40%"})),e("div",{class:"col-12"},e(D,{width:"40%"})),e("div",{class:"col-12"},e(D,{width:"100%"})),e("div",{class:"col-12"},e(D,{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(){l(),this.analytics=new f(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:d.MISSING_PROPS,severity:c.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===b.disputed&&this.payment.disputes.some((e=>e.status===p.lost))?n.DISPUTE_LOST:this.payment.status}render(){return e(C,{key:"6d899226b71c2f8c80bf42ba0bd3de9d069582e8"},this.loading&&e(x,{key:"8e17e3f4c880ace7b87270e768610e9ece6e761a"}),!this.loading&&this.errorMessage&&g(this.errorMessage),!this.loading&&!this.errorMessage&&this.payment&&e("justifi-details",{key:"2f5ea94a1fec18581a06f171c34850fc1423ec1f",errorMessage:this.errorMessage},e(y,{key:"5f011ef4b84acc2c16974293079c2d7b0134f8c6",slot:"head-info",badge:e("div",{class:"d-flex gap-1"},m(this.PaymentStatus),this.payment.expedited?e(w,{variant:P.WARNING,title:"Expedited",text:"Expedited"}):null),title:this.payment.formattedPaymentAmount(this.payment.amount)},e(u,{key:"5c075c53a5c589b7bc65ab60bf2ef7d8a67a7afb",classes:"border-1 border-end",title:"Updated At",value:`${r(this.payment.updated_at)} ${h(this.payment.updated_at)}`}),e(u,{key:"01786dce8a3c582fbd1f471174ecd13f95604e24",classes:"border-1 border-end",title:"Created At",value:`${r(this.payment.created_at)} ${h(this.payment.created_at)}`}),e(u,{key:"b04c5c8dfc64aba71d9cc0cd84c25bd32bdc887f",title:"ID",value:this.payment.id})),e("div",{key:"52bb00c09abe0745a03f264b3667584c10f58eee",slot:"detail-sections"},e(v,{key:"0672c1ed0c4e7f109531e120f61256927eba48eb",sectionTitle:"Details"}),e("div",{key:"d784569e100926eefb120e1a4b2d9a4d6da4238a",class:"d-flex flex-column gap-2 w-100"},e(k,{key:"58192f1824f4b02a206b6c442e63b86fc90ea742",title:"Amount",value:this.payment.formattedPaymentAmount(this.payment.amount)}),e(k,{key:"0b885dc6f6f7a4890666ecdb2a1cc801bbf1df31",title:"Fees",value:this.payment.formattedPaymentAmount(this.payment.fee_amount)}),e(k,{key:"e517d5dbd76cf451e89f803f26b0375a6fd0420b",title:"Refunded",value:this.payment.formattedPaymentAmount(this.payment.amount_refunded)}),e(k,{key:"ec3cf850c0217230794e6487861dbab0da5ad463",title:"Net",value:this.payment.formattedPaymentAmount(this.payment.balance)}),e(k,{key:"8f0d1f4b858ff459b9d08c168ff204e87a0c715e",title:"Status",value:m(this.PaymentStatus)}),e(k,{key:"819e1c1dbf090c664430b8e00ede6a88b9ecf5c2",title:"Payment ID",value:this.payment.id}),e(k,{key:"a86688bc8015db6b1034e6dd2a9819e1dbe5bb30",title:"Processing Fees",value:this.payment.formattedPaymentAmount(this.payment.fee_amount)}),e(k,{key:"7dbb9825135d66711e65fb1b1bb2be228d65bb57",title:"Statement Descriptor",value:this.payment.statement_descriptor}),e(k,{key:"0455c1b7e853ba4e16197cdca3e2f0b16455362a",title:"Description",value:this.payment.description}),e(k,{key:"b052be4a1a349eb6a439e5c4be4424f966c55e60",title:"Expedited",value:this.payment.expedited?"Yes":"No"})),this.payment.payment_method.card&&[e(v,{key:"dca0ae73fa7f879d6cfb3f3b20331cf48d6081e4",sectionTitle:"Payment Method"}),e("div",{key:"fd3dd48f6ad1f3565459fb3ac10115f0b32051f9",class:"d-flex flex-column gap-2 w-100"},e(k,{key:"8c00d775e7c4ef57689574974ee47b7c87f98b13",title:"ID",value:this.payment.payment_method.card.id}),e(k,{key:"2d3bc94126c2a02cb32fca8d952a238fdc0960c6",title:"Payment Type",value:"Card"}),e(k,{key:"16938c62ba1eafbf79af00c90c66c7250a81fbbb",title:"Last 4 Numbers",value:this.payment.payment_method.lastFourDigits}),e(k,{key:"04d9f9a2a7e3ace45f4b0001cf53b069f470529a",title:"Brand",value:o(this.payment.payment_method.card.brand)}),e(k,{key:"559be48e5ac2083369e7984d53e85ee5fbbab008",title:"Cardholder",value:this.payment.payment_method.payersName}))],this.payment.payment_method.bank_account&&[e(v,{key:"25277f2e5526747de9f45416050c6b72873e382b",sectionTitle:"Payment Method"}),e("div",{key:"e0b69c8397665a33c1f0d14bd9438b19e70b8636",class:"d-flex flex-column gap-2 w-100"},e(k,{key:"ff0365efd2c8ed7a2aa7d3552504a6d9097c28b3",title:"ID",value:this.payment.payment_method.bank_account.id}),e(k,{key:"269d136045549cd12e4519e7f4abf3b6d221da85",title:"Last 4 Numbers",value:this.payment.last_four_digits}),e(k,{key:"31b5aaf03f5bf15267ac16b4b4a2d26f0a01e988",title:"Bank Name",value:this.payment.payment_method.bank_account.brand}),e(k,{key:"15f9c03d3514ebb78d25955497a728c8a2c53f7e",title:"Account Owner",value:this.payment.payment_method.payersName}))],this.payment.metadata&&[e(v,{key:"dac3bf342764c2e10ac6b64eabc5ef0366446a31",sectionTitle:"Metadata"}),e("div",{key:"2fe93fb287b469a5b1f3230b5f657216815d1164",class:"d-table gap-2 w-100"},e(j,{key:"f77b6a4ebeb88b82fe8342789bd16b7b22f24db9",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{h as a}from"./p-CV0Pyo1O.js";import{U as s,V as n,C as r,W as i,X as t,Y as o,Z as e,_ as c,$ as l,a0 as d,a1 as p,a2 as u}from"./p-DnrawQn3.js";const b=(b,f)=>{const{variant:m,isLoading:j,className:v,class:y,clickHandler:g}=b,O=function(a,s){var n={};for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&s.indexOf(r)<0&&(n[r]=a[r]);if(null!=a&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(a);i<r.length;i++)s.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(a,r[i])&&(n[r[i]]=a[r[i]])}return n}(b,["variant","isLoading","className","class","clickHandler"]),$=v||y||"";return a("button",Object.assign({class:`btn btn-${m}${$?` ${$}`:""}`,onClick:g,part:`${{primary:p,secondary:d,success:l,danger:c,warning:e,info:o,light:t,dark:i,link:r,"outline-primary":n,"outline-secondary":s}[m]} ${j?u:""}`},O),j?a("div",{class:"spinner-border spinner-border-sm",role:"status",part:"button-spinner"},a("span",{class:"visually-hidden"},"Loading...")):f)};export{b as B}
@@ -0,0 +1 @@
1
+ import{h as t,r as s,c as e}from"./p-CV0Pyo1O.js";import{i as a,C as i,e as o}from"./p-CUI41_5y.js";import{J as r}from"./p-cXPhRFs-.js";import{c as h}from"./p-GP5gWjhc.js";import{P as c}from"./p-CX36GHQP.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{p as n}from"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{g as p,a as d}from"./p-B5vVjDc_.js";import{M as u,m}from"./p-Cej-1bD6.js";import{m as l,S as f}from"./p-qcQTYcr3.js";import{S as b}from"./p-BqNNwq6C.js";import{T as y,l as g,a as v,b as j,c as C,d as _,e as w,f as k,g as S,h as T,i as P,j as D,k as O}from"./p-bn_huKYG.js";import{T as A}from"./p-CZfYo5-1.js";import{a as I}from"./p-BRnBHsdq.js";import{a3 as E,a4 as B}from"./p-DnrawQn3.js";import{o as G,g as V}from"./p-Dm07nLGs.js";import"./p-CXKOe1m5.js";import"./p-CYQvLgSs.js";import"./p-D8GTwl9v.js";import"./p-pL4dNfsl.js";import"./p-CDf5H0TB.js";const H={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"})},L=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 y(this.payouts,this.columns,H,(s=this.downloadCSV,{created_at:(s,e)=>t("td",{part:B(e)},t("div",{class:"fw-bold"},I(s.created_at,{showDisplayDate:!0}))),sub_account_name:(s,e)=>t("td",{part:B(e)},s.sub_account_name),payments_total:(s,e)=>t("td",{part:B(e)},s.formattedPaymentAmount(s.payments_total)),refunds_total:(s,e)=>t("td",{part:B(e)},s.formattedPaymentAmount(s.refunds_total)),fees_total:(s,e)=>t("td",{part:B(e)},s.formattedPaymentAmount(s.fees_total)),other_total:(s,e)=>t("td",{part:B(e)},s.formattedPaymentAmount(s.other_total)),amount:(s,e)=>t("td",{part:B(e)},s.formattedPaymentAmount(s.amount)),status:(s,e)=>t("td",{part:B(e)},u(s.status)),csv:(e,a)=>t("td",{part:B(a)},t("a",{href:"#",onClick:t=>{t.preventDefault(),s(e.id)}},"CSV"))})),this.getPayouts&&this.getSubAccounts&&this.fetchData(),G("set",(()=>{this.pagingParams={}})),G("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=V();return Object.assign(Object.assign({},t),this.pagingParams)}get subAccountParams(){let 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(b,{key:"1307a34cfcaf42f829d28b18d893dd5c55aadaa3"},t(g,{key:"481cd3ce90a935edc54286bd732547593c41ffed"},t(v,{key:"d8309908dd108ab194213c76b13d508bf41a3f6c"},t(j,{key:"8c70c0061a8dc486639c7fa43825076b04aebe5b"},t(C,{key:"0a53aa8c15efe99cfdbeb458bafaa8a25a10ee62"},this.payoutsTable.columnData.map((t=>t)))),t(_,{key:"c998709519b531686f24ff02d0560b7a000fbdcd"},t(w,{key:"2848b295a5483417fe8568b2e7d61803726310be",columnSpan:this.payoutsTable.columnKeys.length,isLoading:this.loading}),t(k,{key:"281a9cbf369914b60d37c54ab351d5cc7865f723",isEmpty:this.showEmptyState,columnSpan:this.payoutsTable.columnKeys.length}),t(S,{key:"c7709f1546a4918b691ec3661903b00167145060",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(P,{key:"72682c5570fae84c4128268f734d96206f234774"},t(D,{key:"d391fc3195afc66336d966fb56057f9e89eda3de"},t(O,{key:"3403c09520cb0847d1635e6b862eab6563fb7113",colSpan:this.payoutsTable.columnData.length},t("pagination-menu",{key:"4d5d70bab5169ddf181c5216a7e4551356e9fc15",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{L as justifi_payouts_list}
@@ -1 +1 @@
1
- import{r as t,c as s,h as i,H as a}from"./p-CV0Pyo1O.js";import{I as e}from"./p-Ce_F4E0f.js";import{C as h}from"./p-CVaOFfrI.js";import{G as r,z as o,A as f,v as n,w as c,x as l}from"./p-D50Rx76J.js";import{F as d}from"./p-D5MdA21U.js";import{F as p}from"./p-N60pPiy5.js";import"./p-CZfYo5-1.js";const m=class{constructor(i){t(this,i),this.formControlInput=s(this,"formControlInput",7),this.formControlBlur=s(this,"formControlBlur",7),this.imask=null,this.isFocused=!1,this.errorText="",this.defaultValue="0",this.inputHandler=()=>{},this.maskOptions=h.DECIMAL,this.disabled=!1,this.initializeIMask=()=>{this.textInput&&(this.imask=e(this.textInput,this.maskOptions),this.imask.on("accept",(()=>{const t=this.imask.unmaskedValue;this.inputHandler(this.name,t),this.formControlInput.emit({name:this.name,value:t})})),this.textInput.addEventListener("blur",(()=>this.formControlBlur.emit())))},this.handleFormControlInput=t=>{const s=t.target.getAttribute("name");this.formControlInput.emit({name:s,value:this.imask.unmaskedValue})},this.updateInput=t=>{this.imask&&(this.imask.value=String(t))}}handleDefaultValueChange(t){this.updateInput(t)}componentDidLoad(){this.initializeIMask(),this.updateInput(this.defaultValue)}disconnectedCallback(){var t;null===(t=this.imask)||void 0===t||t.destroy()}get inputPart(){let t=r;return this.errorText&&(t=n),this.disabled&&(t=c),this.isFocused&&(t=l),t}render(){return i(a,{key:"3bfa76f9374c9e9c08ae44dfc3a579fc07a9292d"},i("div",{key:"d7f92783fa26877f673963237b67be2f3dc7eb2b",class:"form-group d-flex flex-column"},i("label",{key:"d2adedb97996bac860c3161548652f83a65c6c26",part:o,class:"form-label",htmlFor:this.name},this.label),i("div",{key:"be26aeee918412b59d296f18da7d81dfcbfd6a69",class:"input-group"},i("span",{key:"a4fca49f6a2d274e7609d86030553100d94bbd7a",class:"input-group-text",part:f},"$"),i("input",{key:"551ea231e6af58ef27ed186905db553d90e1f1c8",ref:t=>this.textInput=t,id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:this.handleFormControlInput,part:this.inputPart,class:this.errorText?"form-control monetary is-invalid":"form-control monetary",type:"text",disabled:this.disabled})),i(d,{key:"d66e64755451907a6a2593babc6c4e9766cf3025",helpText:this.helpText,name:this.name}),i(p,{key:"ff373668801ac2c1eb30f515a2f7f6fb7c04387f",errorText:this.errorText,name:this.name})))}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}};export{m as form_control_monetary_provisioning}
1
+ import{r as t,c as s,h as i,H as e}from"./p-CV0Pyo1O.js";import{I as a}from"./p-Ce_F4E0f.js";import{C as h}from"./p-CVaOFfrI.js";import{E as r,x as o,y as n,q as l,u as c,v as d}from"./p-DnrawQn3.js";import{F as p}from"./p-uCg79W3M.js";import{F as f}from"./p-BsQy297i.js";import"./p-CZfYo5-1.js";const m=class{constructor(i){t(this,i),this.formControlInput=s(this,"formControlInput",7),this.formControlBlur=s(this,"formControlBlur",7),this.imask=null,this.isFocused=!1,this.errorText="",this.defaultValue="0",this.inputHandler=()=>{},this.maskOptions=h.DECIMAL,this.disabled=!1,this.initializeIMask=()=>{this.textInput&&(this.imask=a(this.textInput,this.maskOptions),this.imask.on("accept",(()=>{const t=this.imask.unmaskedValue;this.inputHandler(this.name,t),this.formControlInput.emit({name:this.name,value:t})})),this.textInput.addEventListener("blur",(()=>this.formControlBlur.emit())))},this.handleFormControlInput=t=>{const s=t.target.getAttribute("name");this.formControlInput.emit({name:s,value:this.imask.unmaskedValue})},this.updateInput=t=>{this.imask&&(this.imask.value=String(t))}}handleDefaultValueChange(t){this.updateInput(t)}componentDidLoad(){this.initializeIMask(),this.updateInput(this.defaultValue)}disconnectedCallback(){var t;null===(t=this.imask)||void 0===t||t.destroy()}get inputPart(){let t=r;return this.errorText&&(t=l),this.disabled&&(t=c),this.isFocused&&(t=d),t}render(){return i(e,{key:"8ecc68592c7e6ef4418301935dde43e4ea10404d"},i("div",{key:"ba267bd049287c297aa67b761214b9d60503e605",class:"form-group d-flex flex-column"},i("label",{key:"b020e228d70145d758bf58298914ed2b3384bbbc",part:o,class:"form-label",htmlFor:this.name},this.label),i("div",{key:"08415f471180958426563cf0e47e016b292108c7",class:"input-group"},i("span",{key:"dc22d1181a2a23e77003ee67212e724e48c2201e",class:"input-group-text",part:n},"$"),i("input",{key:"3cdedc0317df58360601186dd744bcb721a68ec7",ref:t=>this.textInput=t,id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:this.handleFormControlInput,part:this.inputPart,class:this.errorText?"form-control monetary is-invalid":"form-control monetary",type:"text",disabled:this.disabled})),i(p,{key:"1315bdeefe7a551fbbb30680d289743a22a3792d",helpText:this.helpText,name:this.name}),i(f,{key:"7212797f21917530b6bb093f146f1ebead4c232b",errorText:this.errorText,name:this.name})))}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}};export{m as form_control_monetary_provisioning}
@@ -1 +1 @@
1
- import{r as t,c as e,h as s,H as a}from"./p-CV0Pyo1O.js";import{y as i,z as r,v as o,w as h,x as d}from"./p-D50Rx76J.js";import{F as l}from"./p-N60pPiy5.js";import"./p-CZfYo5-1.js";const n=class{constructor(s){t(this,s),this.formControlInput=e(this,"formControlInput",7),this.formControlBlur=e(this,"formControlBlur",7),this.isFocused=!1,this.maxDate=this.currentDate,this.handleFormControlInput=t=>{const e=t.target.value;this.inputHandler(this.name,e),this.formControlInput.emit({name:this.name,value:e})}}handleDefaultValueChange(t){this.updateInput(t)}get currentDate(){return this.showTime?(new Date).toISOString().slice(0,16):(new Date).toISOString().split("T")[0]}componentDidLoad(){this.updateInput(this.defaultValue)}updateInput(t){this.dateInput.value=t}get part(){let t=i;return this.errorText&&(t=o),this.disabled&&(t=h),this.isFocused&&(t=d),t}render(){return s(a,{key:"7dedd8129ac03b8a6e4377eeb85d7d11fbd725c4"},s("div",{key:"3c8b4fe0d6a754467f6a160264243e4dd4820584",class:"form-group d-flex flex-column"},s("div",{key:"3c354acfc613ee7eb7f7237c6ae5c7555ad0590d",class:"d-flex gap-2"},s("label",{key:"978b8a6d2ebb30d6013f9a8546bcb023f997d614",part:r,class:"form-label",htmlFor:this.name},this.label),s("form-control-tooltip",{key:"830c65877ffe20c5d8b9854d550bde324f8a6d5a",helpText:this.helpText})),s("input",{key:"bc1bb45b9766dbf84b1d449b09b62a48a1beea28",type:this.showTime?"datetime-local":"date",ref:t=>this.dateInput=t,id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:this.handleFormControlInput,part:this.part,class:this.errorText?"form-control is-invalid":"form-control",disabled:this.disabled,max:this.maxDate}),s(l,{key:"e6fb1187611b553021e2d25212249b413f72a930",errorText:this.errorText,name:this.name})))}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}};export{n as form_control_date}
1
+ import{r as t,c as e,h as s,H as a}from"./p-CV0Pyo1O.js";import{w as i,x as r,q as o,u as h,v as l}from"./p-DnrawQn3.js";import{F as c}from"./p-BsQy297i.js";import"./p-CZfYo5-1.js";const n=class{constructor(s){t(this,s),this.formControlInput=e(this,"formControlInput",7),this.formControlBlur=e(this,"formControlBlur",7),this.isFocused=!1,this.maxDate=this.currentDate,this.handleFormControlInput=t=>{const e=t.target.value;this.inputHandler(this.name,e),this.formControlInput.emit({name:this.name,value:e})}}handleDefaultValueChange(t){this.updateInput(t)}get currentDate(){return this.showTime?(new Date).toISOString().slice(0,16):(new Date).toISOString().split("T")[0]}componentDidLoad(){this.updateInput(this.defaultValue)}updateInput(t){this.dateInput.value=t}get part(){let t=i;return this.errorText&&(t=o),this.disabled&&(t=h),this.isFocused&&(t=l),t}render(){return s(a,{key:"ec545098abff465066e8e483fb80b13efdfb1c0c"},s("div",{key:"62ab3c2b55228781b45cc08cec73dddaf079e02c",class:"form-group d-flex flex-column"},s("div",{key:"c4a79de5aedf7db3356f1003755861d5aba8e51b",class:"d-flex gap-2"},s("label",{key:"f64d2f776aa848961ad74496c52bb61d744e50f0",part:r,class:"form-label",htmlFor:this.name},this.label),s("form-control-tooltip",{key:"50de1c1138f91f01ad982a5823779e5a067389be",helpText:this.helpText})),s("input",{key:"bb7e14c9e6e952902c15667124032d5ca93df3e8",type:this.showTime?"datetime-local":"date",ref:t=>this.dateInput=t,id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:this.handleFormControlInput,part:this.part,class:this.errorText?"form-control is-invalid":"form-control",disabled:this.disabled,max:this.maxDate}),s(c,{key:"2916afe69a7066713ea1da31fecb3ab8679a6170",errorText:this.errorText,name:this.name})))}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}};export{n as form_control_date}