@justifi/webcomponents 4.6.4 → 4.7.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (688) hide show
  1. package/dist/cjs/{Api-f76b337f.js → Api-548eaa62.js} +3 -17
  2. package/dist/cjs/Api-548eaa62.js.map +1 -0
  3. package/dist/cjs/Pagination-cae1dcbd.js +15 -0
  4. package/dist/cjs/Pagination-cae1dcbd.js.map +1 -0
  5. package/dist/cjs/{Payout-4906a445.js → Payout-68a99ee3.js} +22 -1
  6. package/dist/cjs/Payout-68a99ee3.js.map +1 -0
  7. package/dist/cjs/SubAccount-f47c8522.js +109 -0
  8. package/dist/cjs/SubAccount-f47c8522.js.map +1 -0
  9. package/dist/cjs/additional-questions-details_5.cjs.entry.js +84 -0
  10. package/dist/cjs/additional-questions-details_5.cjs.entry.js.map +1 -0
  11. package/dist/cjs/{business-form-schema-725ec6f5.js → business-form-schema-fe831c30.js} +2 -2
  12. package/dist/cjs/business-form-schema-fe831c30.js.map +1 -0
  13. package/dist/cjs/config-70f62990.js +19 -0
  14. package/dist/cjs/config-70f62990.js.map +1 -0
  15. package/dist/cjs/form-1e732a9d.js +731 -0
  16. package/dist/cjs/form-1e732a9d.js.map +1 -0
  17. package/dist/cjs/form-control-datepart_2.cjs.entry.js +44 -20
  18. package/dist/cjs/form-control-datepart_2.cjs.entry.js.map +1 -1
  19. package/dist/cjs/form-control-monetary.cjs.entry.js +1 -1
  20. package/dist/cjs/form-control-number_3.cjs.entry.js +17 -32
  21. package/dist/cjs/form-control-number_3.cjs.entry.js.map +1 -1
  22. package/dist/cjs/helpers-c505d861.js +28 -0
  23. package/dist/cjs/helpers-c505d861.js.map +1 -0
  24. package/dist/cjs/{index-3533152c.js → index-c5ace247.js} +8 -1
  25. package/dist/cjs/index-c5ace247.js.map +1 -0
  26. package/dist/cjs/{index.esm-84a0a7a8.js → index.esm-91ec051e.js} +123 -1
  27. package/dist/cjs/index.esm-91ec051e.js.map +1 -0
  28. package/dist/cjs/{justifi-additional-questions_5.cjs.entry.js → justifi-additional-questions_6.cjs.entry.js} +41 -16
  29. package/dist/cjs/justifi-additional-questions_6.cjs.entry.js.map +1 -0
  30. package/dist/cjs/justifi-bank-account-form.cjs.entry.js +1 -1
  31. package/dist/cjs/justifi-billing-form_2.cjs.entry.js +2 -2
  32. package/dist/cjs/justifi-business-details.cjs.entry.js +77 -0
  33. package/dist/cjs/justifi-business-details.cjs.entry.js.map +1 -0
  34. package/dist/cjs/justifi-business-form-stepped.cjs.entry.js +131 -0
  35. package/dist/cjs/justifi-business-form-stepped.cjs.entry.js.map +1 -0
  36. package/dist/cjs/justifi-business-form.cjs.entry.js +13 -756
  37. package/dist/cjs/justifi-business-form.cjs.entry.js.map +1 -1
  38. package/dist/cjs/justifi-business-list.cjs.entry.js +38 -67
  39. package/dist/cjs/justifi-business-list.cjs.entry.js.map +1 -1
  40. package/dist/cjs/justifi-card-form.cjs.entry.js +1 -1
  41. package/dist/cjs/justifi-details.cjs.entry.js +4 -8
  42. package/dist/cjs/justifi-details.cjs.entry.js.map +1 -1
  43. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +11029 -0
  44. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js.map +1 -0
  45. package/dist/cjs/justifi-payment-balance-transactions.cjs.entry.js +88 -0
  46. package/dist/cjs/justifi-payment-balance-transactions.cjs.entry.js.map +1 -0
  47. package/dist/cjs/justifi-payment-details.cjs.entry.js +9 -9
  48. package/dist/cjs/justifi-payment-details.cjs.entry.js.map +1 -1
  49. package/dist/cjs/justifi-payment-form.cjs.entry.js +4 -3
  50. package/dist/cjs/justifi-payment-form.cjs.entry.js.map +1 -1
  51. package/dist/cjs/justifi-payment-method-form.cjs.entry.js +12 -10
  52. package/dist/cjs/justifi-payment-method-form.cjs.entry.js.map +1 -1
  53. package/dist/cjs/justifi-payments-list.cjs.entry.js +23 -17
  54. package/dist/cjs/justifi-payments-list.cjs.entry.js.map +1 -1
  55. package/dist/cjs/justifi-payout-details.cjs.entry.js +9 -7
  56. package/dist/cjs/justifi-payout-details.cjs.entry.js.map +1 -1
  57. package/dist/cjs/justifi-payouts-list.cjs.entry.js +24 -18
  58. package/dist/cjs/justifi-payouts-list.cjs.entry.js.map +1 -1
  59. package/dist/cjs/justifi-proceeds-list.cjs.entry.js +24 -18
  60. package/dist/cjs/justifi-proceeds-list.cjs.entry.js.map +1 -1
  61. package/dist/cjs/justifi-refund-form.cjs.entry.js +105 -0
  62. package/dist/cjs/justifi-refund-form.cjs.entry.js.map +1 -0
  63. package/dist/cjs/justifi-subaccount-details.cjs.entry.js +82 -0
  64. package/dist/cjs/justifi-subaccount-details.cjs.entry.js.map +1 -0
  65. package/dist/cjs/justifi-subaccounts-list.cjs.entry.js +105 -0
  66. package/dist/cjs/justifi-subaccounts-list.cjs.entry.js.map +1 -0
  67. package/dist/cjs/justifi-table_2.cjs.entry.js +80 -0
  68. package/dist/cjs/justifi-table_2.cjs.entry.js.map +1 -0
  69. package/dist/cjs/loader.cjs.js +2 -2
  70. package/dist/cjs/select-input_2.cjs.entry.js +1 -1
  71. package/dist/cjs/subaccount-account-details_4.cjs.entry.js +72 -0
  72. package/dist/cjs/subaccount-account-details_4.cjs.entry.js.map +1 -0
  73. package/dist/cjs/subaccount-bank-details.cjs.entry.js +24 -0
  74. package/dist/cjs/subaccount-bank-details.cjs.entry.js.map +1 -0
  75. package/dist/cjs/subaccount-terms-details.cjs.entry.js +24 -0
  76. package/dist/cjs/subaccount-terms-details.cjs.entry.js.map +1 -0
  77. package/dist/cjs/{utils-0fd61dbd.js → utils-13d069be.js} +96 -18
  78. package/dist/cjs/utils-13d069be.js.map +1 -0
  79. package/dist/cjs/utils-4622829d.js +37 -0
  80. package/dist/cjs/utils-4622829d.js.map +1 -0
  81. package/dist/cjs/webcomponents.cjs.js +2 -2
  82. package/dist/collection/api/Api.js +2 -16
  83. package/dist/collection/api/Api.js.map +1 -1
  84. package/dist/collection/api/Business.js +0 -2
  85. package/dist/collection/api/Business.js.map +1 -1
  86. package/dist/collection/api/GrossVolume.js +2 -0
  87. package/dist/collection/api/GrossVolume.js.map +1 -0
  88. package/dist/collection/api/Pagination.js +8 -8
  89. package/dist/collection/api/Pagination.js.map +1 -1
  90. package/dist/collection/api/Payment.js +20 -0
  91. package/dist/collection/api/Payment.js.map +1 -1
  92. package/dist/collection/api/SubAccount.js +104 -0
  93. package/dist/collection/api/SubAccount.js.map +1 -0
  94. package/dist/collection/api/mockData/MockOnboardingData.js +118 -0
  95. package/dist/collection/api/mockData/MockOnboardingData.js.map +1 -0
  96. package/dist/collection/api/mockData/MockSubAccount.js +103 -0
  97. package/dist/collection/api/mockData/MockSubAccount.js.map +1 -0
  98. package/dist/collection/api/mockData/mockGrossVolumeReport.js +126 -0
  99. package/dist/collection/api/mockData/mockGrossVolumeReport.js.map +1 -0
  100. package/dist/collection/assets/info-icon.svg +5 -0
  101. package/dist/collection/collection-manifest.json +20 -1
  102. package/dist/collection/components/bank-account-form/bank-account-form.stories.js +2 -9
  103. package/dist/collection/components/bank-account-form/bank-account-form.stories.js.map +1 -1
  104. package/dist/collection/components/billing-form/billing-form.stories.js +1 -1
  105. package/dist/collection/components/billing-form/billing-form.stories.js.map +1 -1
  106. package/dist/collection/components/business-details/additional-questions-details/additional-questions-details.css +7341 -0
  107. package/dist/collection/components/business-details/additional-questions-details/additional-questions-details.js +57 -0
  108. package/dist/collection/components/business-details/additional-questions-details/additional-questions-details.js.map +1 -0
  109. package/dist/collection/components/business-details/business-details.css +6439 -0
  110. package/dist/collection/components/business-details/business-details.js +128 -0
  111. package/dist/collection/components/business-details/business-details.js.map +1 -0
  112. package/dist/collection/components/business-details/business-details.stories.js +24 -0
  113. package/dist/collection/components/business-details/business-details.stories.js.map +1 -0
  114. package/dist/collection/components/business-details/generic-info-details/generic-info-details.css +7341 -0
  115. package/dist/collection/components/business-details/generic-info-details/generic-info-details.js +50 -0
  116. package/dist/collection/components/business-details/generic-info-details/generic-info-details.js.map +1 -0
  117. package/dist/collection/components/business-details/legal-address-details/legal-address-details.css +7341 -0
  118. package/dist/collection/components/business-details/legal-address-details/legal-address-details.js +49 -0
  119. package/dist/collection/components/business-details/legal-address-details/legal-address-details.js.map +1 -0
  120. package/dist/collection/components/business-details/owner-details/owner-details.css +7341 -0
  121. package/dist/collection/components/business-details/owner-details/owner-details.js +57 -0
  122. package/dist/collection/components/business-details/owner-details/owner-details.js.map +1 -0
  123. package/dist/collection/components/business-details/representative-details/representative-details.css +7341 -0
  124. package/dist/collection/components/business-details/representative-details/representative-details.js +58 -0
  125. package/dist/collection/components/business-details/representative-details/representative-details.js.map +1 -0
  126. package/dist/collection/components/business-form/additional-questions/additional-questions.js +1 -1
  127. package/dist/collection/components/business-form/additional-questions/additional-questions.js.map +1 -1
  128. package/dist/collection/components/business-form/business-form-schema.js +1 -1
  129. package/dist/collection/components/business-form/business-form-schema.js.map +1 -1
  130. package/dist/collection/components/business-form/business-form-stepped.css +7929 -0
  131. package/dist/collection/components/business-form/business-form-stepped.js +195 -0
  132. package/dist/collection/components/business-form/business-form-stepped.js.map +1 -0
  133. package/dist/collection/components/business-form/business-form-stepped.stories.js +132 -0
  134. package/dist/collection/components/business-form/business-form-stepped.stories.js.map +1 -0
  135. package/dist/collection/components/business-form/business-form.js +5 -24
  136. package/dist/collection/components/business-form/business-form.js.map +1 -1
  137. package/dist/collection/components/business-form/business-form.stories.js +21 -8
  138. package/dist/collection/components/business-form/business-form.stories.js.map +1 -1
  139. package/dist/collection/components/business-form/business-generic-info/business-generic-info.js +7 -5
  140. package/dist/collection/components/business-form/business-generic-info/business-generic-info.js.map +1 -1
  141. package/dist/collection/components/business-form/business-owners/business-owners.js +4 -5
  142. package/dist/collection/components/business-form/business-owners/business-owners.js.map +1 -1
  143. package/dist/collection/components/business-form/business-representative/business-representative-schema.js.map +1 -1
  144. package/dist/collection/components/business-form/business-representative/business-representative.js +1 -1
  145. package/dist/collection/components/business-form/business-representative/business-representative.js.map +1 -1
  146. package/dist/collection/components/business-form/helpers.js +23 -0
  147. package/dist/collection/components/business-form/helpers.js.map +1 -0
  148. package/dist/collection/components/business-form/legal-address-form/legal-address-form-schema.js.map +1 -0
  149. package/dist/collection/components/{legal-address-form → business-form/legal-address-form}/legal-address-form.js +3 -21
  150. package/dist/collection/components/business-form/legal-address-form/legal-address-form.js.map +1 -0
  151. package/dist/collection/components/business-list/business-list.js +72 -84
  152. package/dist/collection/components/business-list/business-list.js.map +1 -1
  153. package/dist/collection/components/business-list/business-list.stories.js +3 -2
  154. package/dist/collection/components/business-list/business-list.stories.js.map +1 -1
  155. package/dist/collection/components/card-form/card-form.stories.js +2 -9
  156. package/dist/collection/components/card-form/card-form.stories.js.map +1 -1
  157. package/dist/collection/components/details/details.js +2 -21
  158. package/dist/collection/components/details/details.js.map +1 -1
  159. package/dist/collection/components/details/utils.js +7 -8
  160. package/dist/collection/components/details/utils.js.map +1 -1
  161. package/dist/collection/components/form/form-control-number-masked.js +1 -1
  162. package/dist/collection/components/form/form-control-number-masked.js.map +1 -1
  163. package/dist/collection/components/form/form.js +4 -4
  164. package/dist/collection/components/form/form.js.map +1 -1
  165. package/dist/collection/components/gross-payment-chart/chart-utils.js +59 -0
  166. package/dist/collection/components/gross-payment-chart/chart-utils.js.map +1 -0
  167. package/dist/collection/components/gross-payment-chart/gross-payment-chart.css +572 -0
  168. package/dist/collection/components/gross-payment-chart/gross-payment-chart.js +127 -0
  169. package/dist/collection/components/gross-payment-chart/gross-payment-chart.js.map +1 -0
  170. package/dist/collection/components/gross-payment-chart/gross-payment-chart.stories.js +22 -0
  171. package/dist/collection/components/gross-payment-chart/gross-payment-chart.stories.js.map +1 -0
  172. package/dist/collection/components/gross-payment-chart/test/gross-payment-chart.spec.js +15 -0
  173. package/dist/collection/components/gross-payment-chart/test/gross-payment-chart.spec.js.map +1 -0
  174. package/dist/collection/components/pagination-menu/pagination-menu.js +78 -0
  175. package/dist/collection/components/pagination-menu/pagination-menu.js.map +1 -0
  176. package/dist/collection/components/payment-balance-transactions/payment-balance-transactions.css +0 -0
  177. package/dist/collection/components/payment-balance-transactions/payment-balance-transactions.js +153 -0
  178. package/dist/collection/components/payment-balance-transactions/payment-balance-transactions.js.map +1 -0
  179. package/dist/collection/components/payment-balance-transactions/payment-balance-transactions.stories.js +32 -0
  180. package/dist/collection/components/payment-balance-transactions/payment-balance-transactions.stories.js.map +1 -0
  181. package/dist/collection/components/payment-details/payment-details.js +12 -6
  182. package/dist/collection/components/payment-details/payment-details.js.map +1 -1
  183. package/dist/collection/components/payment-details/payment-details.stories.js +4 -4
  184. package/dist/collection/components/payment-details/payment-details.stories.js.map +1 -1
  185. package/dist/collection/components/payment-form/payment-form.stories.js +3 -11
  186. package/dist/collection/components/payment-form/payment-form.stories.js.map +1 -1
  187. package/dist/collection/components/payment-method-form/payment-method-form.js +7 -6
  188. package/dist/collection/components/payment-method-form/payment-method-form.js.map +1 -1
  189. package/dist/collection/components/payment-method-form/test/payment-method-form.spec.js +15 -14
  190. package/dist/collection/components/payment-method-form/test/payment-method-form.spec.js.map +1 -1
  191. package/dist/collection/components/payments-list/payments-list.js +21 -13
  192. package/dist/collection/components/payments-list/payments-list.js.map +1 -1
  193. package/dist/collection/components/payments-list/payments-list.stories.js +4 -4
  194. package/dist/collection/components/payments-list/payments-list.stories.js.map +1 -1
  195. package/dist/collection/components/payout-details/payout-details.js +12 -3
  196. package/dist/collection/components/payout-details/payout-details.js.map +1 -1
  197. package/dist/collection/components/payout-details/payout-details.stories.js +4 -4
  198. package/dist/collection/components/payout-details/payout-details.stories.js.map +1 -1
  199. package/dist/collection/components/payouts-list/payouts-list.js +22 -14
  200. package/dist/collection/components/payouts-list/payouts-list.js.map +1 -1
  201. package/dist/collection/components/payouts-list/payouts-list.stories.js +4 -4
  202. package/dist/collection/components/payouts-list/payouts-list.stories.js.map +1 -1
  203. package/dist/collection/components/proceeds-list/proceeds-list.js +22 -14
  204. package/dist/collection/components/proceeds-list/proceeds-list.js.map +1 -1
  205. package/dist/collection/components/proceeds-list/proceeds-list.stories.js +3 -2
  206. package/dist/collection/components/proceeds-list/proceeds-list.stories.js.map +1 -1
  207. package/dist/collection/components/refund-form/refund-form-schema.js +14 -0
  208. package/dist/collection/components/refund-form/refund-form-schema.js.map +1 -0
  209. package/dist/collection/components/refund-form/refund-form.css +7785 -0
  210. package/dist/collection/components/refund-form/refund-form.js +229 -0
  211. package/dist/collection/components/refund-form/refund-form.js.map +1 -0
  212. package/dist/collection/components/refund-form/refund-form.stories.js +169 -0
  213. package/dist/collection/components/refund-form/refund-form.stories.js.map +1 -0
  214. package/dist/collection/components/subaccount-details/subaccount-account-details/subaccount-account-details.css +7345 -0
  215. package/dist/collection/components/subaccount-details/subaccount-account-details/subaccount-account-details.js +71 -0
  216. package/dist/collection/components/subaccount-details/subaccount-account-details/subaccount-account-details.js.map +1 -0
  217. package/dist/collection/components/subaccount-details/subaccount-bank-details/subaccount-bank-details.css +7345 -0
  218. package/dist/collection/components/subaccount-details/subaccount-bank-details/subaccount-bank-details.js +49 -0
  219. package/dist/collection/components/subaccount-details/subaccount-bank-details/subaccount-bank-details.js.map +1 -0
  220. package/dist/collection/components/subaccount-details/subaccount-details.css +7983 -0
  221. package/dist/collection/components/subaccount-details/subaccount-details.js +148 -0
  222. package/dist/collection/components/subaccount-details/subaccount-details.js.map +1 -0
  223. package/dist/collection/components/subaccount-details/subaccount-details.stories.js +26 -0
  224. package/dist/collection/components/subaccount-details/subaccount-details.stories.js.map +1 -0
  225. package/dist/collection/components/subaccount-details/subaccount-merchant-details/subaccount-merchant-details.css +7345 -0
  226. package/dist/collection/components/subaccount-details/subaccount-merchant-details/subaccount-merchant-details.js +51 -0
  227. package/dist/collection/components/subaccount-details/subaccount-merchant-details/subaccount-merchant-details.js.map +1 -0
  228. package/dist/collection/components/subaccount-details/subaccount-owners-details/subaccount-owners-details.css +7345 -0
  229. package/dist/collection/components/subaccount-details/subaccount-owners-details/subaccount-owners-details.js +49 -0
  230. package/dist/collection/components/subaccount-details/subaccount-owners-details/subaccount-owners-details.js.map +1 -0
  231. package/dist/collection/components/subaccount-details/subaccount-representative-details/subaccount-representative-details.css +7345 -0
  232. package/dist/collection/components/subaccount-details/subaccount-representative-details/subaccount-representative-details.js +50 -0
  233. package/dist/collection/components/subaccount-details/subaccount-representative-details/subaccount-representative-details.js.map +1 -0
  234. package/dist/collection/components/subaccount-details/subaccount-terms-details/subaccount-terms-details.css +7345 -0
  235. package/dist/collection/components/subaccount-details/subaccount-terms-details/subaccount-terms-details.js +49 -0
  236. package/dist/collection/components/subaccount-details/subaccount-terms-details/subaccount-terms-details.js.map +1 -0
  237. package/dist/collection/components/subaccount-details/test/subaccount-details.spec.js +22 -0
  238. package/dist/collection/components/subaccount-details/test/subaccount-details.spec.js.map +1 -0
  239. package/dist/collection/components/subaccounts-list/subaccounts-list.css +3 -0
  240. package/dist/collection/components/subaccounts-list/subaccounts-list.js +180 -0
  241. package/dist/collection/components/subaccounts-list/subaccounts-list.js.map +1 -0
  242. package/dist/collection/components/subaccounts-list/subaccounts-list.stories.js +70 -0
  243. package/dist/collection/components/subaccounts-list/subaccounts-list.stories.js.map +1 -0
  244. package/dist/collection/components/subaccounts-list/test/subaccounts-list.e2e.js +10 -0
  245. package/dist/collection/components/subaccounts-list/test/subaccounts-list.e2e.js.map +1 -0
  246. package/dist/collection/components/subaccounts-list/test/subaccounts-list.spec.js +34 -0
  247. package/dist/collection/components/subaccounts-list/test/subaccounts-list.spec.js.map +1 -0
  248. package/dist/collection/components/table/table.js +27 -12
  249. package/dist/collection/components/table/table.js.map +1 -1
  250. package/dist/collection/components/table/test/table.spec.js +2 -2
  251. package/dist/collection/components/table/test/table.spec.js.map +1 -1
  252. package/dist/collection/utils/utils.js +95 -17
  253. package/dist/collection/utils/utils.js.map +1 -1
  254. package/dist/components/Api.js +2 -16
  255. package/dist/components/Api.js.map +1 -1
  256. package/dist/components/Pagination.js +12 -0
  257. package/dist/components/Pagination.js.map +1 -0
  258. package/dist/components/Payout.js +21 -1
  259. package/dist/components/Payout.js.map +1 -1
  260. package/dist/components/SubAccount.js +107 -0
  261. package/dist/components/SubAccount.js.map +1 -0
  262. package/dist/components/additional-questions-details.d.ts +11 -0
  263. package/dist/components/additional-questions-details.js +8 -0
  264. package/dist/components/additional-questions-details.js.map +1 -0
  265. package/dist/{cjs/justifi-table.cjs.entry.js → components/additional-questions-details2.js} +30 -61
  266. package/dist/components/additional-questions-details2.js.map +1 -0
  267. package/dist/components/additional-questions.js +1 -1
  268. package/dist/components/additional-questions.js.map +1 -1
  269. package/dist/components/business-generic-info.js +2 -5
  270. package/dist/components/business-generic-info.js.map +1 -1
  271. package/dist/components/business-owners.js +4 -5
  272. package/dist/components/business-owners.js.map +1 -1
  273. package/dist/components/business-representative.js +1 -1
  274. package/dist/components/business-representative.js.map +1 -1
  275. package/dist/components/config.js +17 -0
  276. package/dist/components/config.js.map +1 -0
  277. package/dist/components/details.js +6 -33
  278. package/dist/components/details.js.map +1 -1
  279. package/dist/components/form-control-number-masked2.js +1 -1
  280. package/dist/components/form-control-number-masked2.js.map +1 -1
  281. package/dist/components/form.js +729 -0
  282. package/dist/components/form.js.map +1 -0
  283. package/dist/components/generic-info-details.d.ts +11 -0
  284. package/dist/components/generic-info-details.js +8 -0
  285. package/dist/components/generic-info-details.js.map +1 -0
  286. package/dist/components/generic-info-details2.js +38 -0
  287. package/dist/components/generic-info-details2.js.map +1 -0
  288. package/dist/components/helpers.js +26 -0
  289. package/dist/components/helpers.js.map +1 -0
  290. package/dist/components/index.esm.js +122 -1
  291. package/dist/components/index.esm.js.map +1 -1
  292. package/dist/components/justifi-business-details.d.ts +11 -0
  293. package/dist/components/justifi-business-details.js +127 -0
  294. package/dist/components/justifi-business-details.js.map +1 -0
  295. package/dist/components/justifi-business-form-stepped.d.ts +11 -0
  296. package/dist/components/justifi-business-form-stepped.js +222 -0
  297. package/dist/components/justifi-business-form-stepped.js.map +1 -0
  298. package/dist/components/justifi-business-form.js +7 -750
  299. package/dist/components/justifi-business-form.js.map +1 -1
  300. package/dist/components/justifi-business-list.js +44 -65
  301. package/dist/components/justifi-business-list.js.map +1 -1
  302. package/dist/components/justifi-gross-payment-chart.d.ts +11 -0
  303. package/dist/components/justifi-gross-payment-chart.js +11052 -0
  304. package/dist/components/justifi-gross-payment-chart.js.map +1 -0
  305. package/dist/components/justifi-payment-balance-transactions.d.ts +11 -0
  306. package/dist/components/justifi-payment-balance-transactions.js +123 -0
  307. package/dist/components/justifi-payment-balance-transactions.js.map +1 -0
  308. package/dist/components/justifi-payment-details.js +7 -6
  309. package/dist/components/justifi-payment-details.js.map +1 -1
  310. package/dist/components/justifi-payment-form.js +3 -2
  311. package/dist/components/justifi-payment-form.js.map +1 -1
  312. package/dist/components/justifi-payments-list.js +30 -16
  313. package/dist/components/justifi-payments-list.js.map +1 -1
  314. package/dist/components/justifi-payout-details.js +7 -4
  315. package/dist/components/justifi-payout-details.js.map +1 -1
  316. package/dist/components/justifi-payouts-list.js +31 -17
  317. package/dist/components/justifi-payouts-list.js.map +1 -1
  318. package/dist/components/justifi-proceeds-list.js +30 -16
  319. package/dist/components/justifi-proceeds-list.js.map +1 -1
  320. package/dist/components/justifi-refund-form.d.ts +11 -0
  321. package/dist/components/justifi-refund-form.js +140 -0
  322. package/dist/components/justifi-refund-form.js.map +1 -0
  323. package/dist/components/justifi-subaccount-details.d.ts +11 -0
  324. package/dist/components/justifi-subaccount-details.js +134 -0
  325. package/dist/components/justifi-subaccount-details.js.map +1 -0
  326. package/dist/components/justifi-subaccounts-list.d.ts +11 -0
  327. package/dist/components/justifi-subaccounts-list.js +139 -0
  328. package/dist/components/justifi-subaccounts-list.js.map +1 -0
  329. package/dist/components/legal-address-details.d.ts +11 -0
  330. package/dist/components/legal-address-details.js +8 -0
  331. package/dist/components/legal-address-details.js.map +1 -0
  332. package/dist/components/legal-address-details2.js +37 -0
  333. package/dist/components/legal-address-details2.js.map +1 -0
  334. package/dist/components/legal-address-form.js +1 -3
  335. package/dist/components/legal-address-form.js.map +1 -1
  336. package/dist/components/owner-details.d.ts +11 -0
  337. package/dist/components/owner-details.js +8 -0
  338. package/dist/components/owner-details.js.map +1 -0
  339. package/dist/components/owner-details2.js +37 -0
  340. package/dist/components/owner-details2.js.map +1 -0
  341. package/dist/components/pagination-menu.d.ts +11 -0
  342. package/dist/components/pagination-menu.js +8 -0
  343. package/dist/components/pagination-menu.js.map +1 -0
  344. package/dist/{esm/justifi-table.entry.js → components/pagination-menu2.js} +35 -55
  345. package/dist/components/pagination-menu2.js.map +1 -0
  346. package/dist/components/payment-method-form.js +11 -9
  347. package/dist/components/payment-method-form.js.map +1 -1
  348. package/dist/components/representative-details.d.ts +11 -0
  349. package/dist/components/representative-details.js +8 -0
  350. package/dist/components/representative-details.js.map +1 -0
  351. package/dist/components/representative-details2.js +38 -0
  352. package/dist/components/representative-details2.js.map +1 -0
  353. package/dist/components/subaccount-account-details.d.ts +11 -0
  354. package/dist/components/subaccount-account-details.js +8 -0
  355. package/dist/components/subaccount-account-details.js.map +1 -0
  356. package/dist/components/subaccount-account-details2.js +39 -0
  357. package/dist/components/subaccount-account-details2.js.map +1 -0
  358. package/dist/components/subaccount-bank-details.d.ts +11 -0
  359. package/dist/components/subaccount-bank-details.js +40 -0
  360. package/dist/components/subaccount-bank-details.js.map +1 -0
  361. package/dist/components/subaccount-merchant-details.d.ts +11 -0
  362. package/dist/components/subaccount-merchant-details.js +8 -0
  363. package/dist/components/subaccount-merchant-details.js.map +1 -0
  364. package/dist/components/subaccount-merchant-details2.js +38 -0
  365. package/dist/components/subaccount-merchant-details2.js.map +1 -0
  366. package/dist/components/subaccount-owners-details.d.ts +11 -0
  367. package/dist/components/subaccount-owners-details.js +8 -0
  368. package/dist/components/subaccount-owners-details.js.map +1 -0
  369. package/dist/components/subaccount-owners-details2.js +38 -0
  370. package/dist/components/subaccount-owners-details2.js.map +1 -0
  371. package/dist/components/subaccount-representative-details.d.ts +11 -0
  372. package/dist/components/subaccount-representative-details.js +8 -0
  373. package/dist/components/subaccount-representative-details.js.map +1 -0
  374. package/dist/components/subaccount-representative-details2.js +38 -0
  375. package/dist/components/subaccount-representative-details2.js.map +1 -0
  376. package/dist/components/subaccount-terms-details.d.ts +11 -0
  377. package/dist/components/subaccount-terms-details.js +40 -0
  378. package/dist/components/subaccount-terms-details.js.map +1 -0
  379. package/dist/components/table.js +12 -21
  380. package/dist/components/table.js.map +1 -1
  381. package/dist/components/utils.js +27 -3909
  382. package/dist/components/utils.js.map +1 -1
  383. package/dist/components/utils2.js +3983 -0
  384. package/dist/components/utils2.js.map +1 -0
  385. package/dist/config.js +12 -4
  386. package/dist/config.js.map +1 -1
  387. package/dist/esm/{Api-cca120a8.js → Api-c65d3ed8.js} +3 -17
  388. package/dist/esm/Api-c65d3ed8.js.map +1 -0
  389. package/dist/esm/Pagination-31f770d6.js +12 -0
  390. package/dist/esm/Pagination-31f770d6.js.map +1 -0
  391. package/dist/esm/{Payout-9a1f2859.js → Payout-fcf16887.js} +22 -2
  392. package/dist/esm/Payout-fcf16887.js.map +1 -0
  393. package/dist/esm/SubAccount-128190e9.js +107 -0
  394. package/dist/esm/SubAccount-128190e9.js.map +1 -0
  395. package/dist/esm/additional-questions-details_5.entry.js +76 -0
  396. package/dist/esm/additional-questions-details_5.entry.js.map +1 -0
  397. package/dist/esm/{business-form-schema-5885d3d6.js → business-form-schema-30a3eadd.js} +2 -2
  398. package/dist/esm/business-form-schema-30a3eadd.js.map +1 -0
  399. package/dist/esm/config-b1976dbd.js +17 -0
  400. package/dist/esm/config-b1976dbd.js.map +1 -0
  401. package/dist/esm/form-32cf3d1e.js +729 -0
  402. package/dist/esm/form-32cf3d1e.js.map +1 -0
  403. package/dist/esm/form-control-datepart_2.entry.js +44 -20
  404. package/dist/esm/form-control-datepart_2.entry.js.map +1 -1
  405. package/dist/esm/form-control-monetary.entry.js +1 -1
  406. package/dist/esm/form-control-number_3.entry.js +17 -32
  407. package/dist/esm/form-control-number_3.entry.js.map +1 -1
  408. package/dist/esm/helpers-1d5ecdc8.js +26 -0
  409. package/dist/esm/helpers-1d5ecdc8.js.map +1 -0
  410. package/dist/esm/{index-fe877d03.js → index-7471ed60.js} +8 -1
  411. package/dist/esm/index-7471ed60.js.map +1 -0
  412. package/dist/esm/{index.esm-89fe6af9.js → index.esm-9397ffa0.js} +123 -2
  413. package/dist/esm/index.esm-9397ffa0.js.map +1 -0
  414. package/dist/esm/{justifi-additional-questions_5.entry.js → justifi-additional-questions_6.entry.js} +41 -17
  415. package/dist/esm/justifi-additional-questions_6.entry.js.map +1 -0
  416. package/dist/esm/justifi-bank-account-form.entry.js +1 -1
  417. package/dist/esm/justifi-billing-form_2.entry.js +2 -2
  418. package/dist/esm/justifi-business-details.entry.js +73 -0
  419. package/dist/esm/justifi-business-details.entry.js.map +1 -0
  420. package/dist/esm/justifi-business-form-stepped.entry.js +127 -0
  421. package/dist/esm/justifi-business-form-stepped.entry.js.map +1 -0
  422. package/dist/esm/justifi-business-form.entry.js +12 -755
  423. package/dist/esm/justifi-business-form.entry.js.map +1 -1
  424. package/dist/esm/justifi-business-list.entry.js +37 -66
  425. package/dist/esm/justifi-business-list.entry.js.map +1 -1
  426. package/dist/esm/justifi-card-form.entry.js +1 -1
  427. package/dist/esm/justifi-details.entry.js +4 -8
  428. package/dist/esm/justifi-details.entry.js.map +1 -1
  429. package/dist/esm/justifi-gross-payment-chart.entry.js +11025 -0
  430. package/dist/esm/justifi-gross-payment-chart.entry.js.map +1 -0
  431. package/dist/esm/justifi-payment-balance-transactions.entry.js +84 -0
  432. package/dist/esm/justifi-payment-balance-transactions.entry.js.map +1 -0
  433. package/dist/esm/justifi-payment-details.entry.js +9 -9
  434. package/dist/esm/justifi-payment-details.entry.js.map +1 -1
  435. package/dist/esm/justifi-payment-form.entry.js +4 -3
  436. package/dist/esm/justifi-payment-form.entry.js.map +1 -1
  437. package/dist/esm/justifi-payment-method-form.entry.js +12 -10
  438. package/dist/esm/justifi-payment-method-form.entry.js.map +1 -1
  439. package/dist/esm/justifi-payments-list.entry.js +22 -16
  440. package/dist/esm/justifi-payments-list.entry.js.map +1 -1
  441. package/dist/esm/justifi-payout-details.entry.js +9 -7
  442. package/dist/esm/justifi-payout-details.entry.js.map +1 -1
  443. package/dist/esm/justifi-payouts-list.entry.js +23 -17
  444. package/dist/esm/justifi-payouts-list.entry.js.map +1 -1
  445. package/dist/esm/justifi-proceeds-list.entry.js +23 -17
  446. package/dist/esm/justifi-proceeds-list.entry.js.map +1 -1
  447. package/dist/esm/justifi-refund-form.entry.js +101 -0
  448. package/dist/esm/justifi-refund-form.entry.js.map +1 -0
  449. package/dist/esm/justifi-subaccount-details.entry.js +78 -0
  450. package/dist/esm/justifi-subaccount-details.entry.js.map +1 -0
  451. package/dist/esm/justifi-subaccounts-list.entry.js +101 -0
  452. package/dist/esm/justifi-subaccounts-list.entry.js.map +1 -0
  453. package/dist/esm/justifi-table_2.entry.js +75 -0
  454. package/dist/esm/justifi-table_2.entry.js.map +1 -0
  455. package/dist/esm/loader.js +3 -3
  456. package/dist/esm/select-input_2.entry.js +1 -1
  457. package/dist/esm/subaccount-account-details_4.entry.js +65 -0
  458. package/dist/esm/subaccount-account-details_4.entry.js.map +1 -0
  459. package/dist/esm/subaccount-bank-details.entry.js +20 -0
  460. package/dist/esm/subaccount-bank-details.entry.js.map +1 -0
  461. package/dist/esm/subaccount-terms-details.entry.js +20 -0
  462. package/dist/esm/subaccount-terms-details.entry.js.map +1 -0
  463. package/dist/esm/{utils-ad0bbe03.js → utils-40b7002c.js} +91 -19
  464. package/dist/esm/utils-40b7002c.js.map +1 -0
  465. package/dist/esm/utils-6352c002.js +29 -0
  466. package/dist/esm/utils-6352c002.js.map +1 -0
  467. package/dist/esm/webcomponents.js +3 -3
  468. package/dist/types/api/Api.d.ts +4 -4
  469. package/dist/types/api/Business.d.ts +12 -4
  470. package/dist/types/api/GrossVolume.d.ts +8 -0
  471. package/dist/types/api/Pagination.d.ts +12 -6
  472. package/dist/types/api/Payment.d.ts +28 -0
  473. package/dist/types/api/SubAccount.d.ts +165 -0
  474. package/dist/types/api/mockData/MockOnboardingData.d.ts +8 -0
  475. package/dist/types/api/mockData/MockSubAccount.d.ts +3 -0
  476. package/dist/types/api/mockData/mockGrossVolumeReport.d.ts +7 -0
  477. package/dist/types/components/bank-account-form/bank-account-form.stories.d.ts +0 -7
  478. package/dist/types/components/business-details/additional-questions-details/additional-questions-details.d.ts +13 -0
  479. package/dist/types/components/business-details/business-details.d.ts +28 -0
  480. package/dist/types/components/business-details/business-details.stories.d.ts +7 -0
  481. package/dist/types/components/business-details/generic-info-details/generic-info-details.d.ts +5 -0
  482. package/dist/types/components/business-details/legal-address-details/legal-address-details.d.ts +5 -0
  483. package/dist/types/components/business-details/owner-details/owner-details.d.ts +13 -0
  484. package/dist/types/components/business-details/representative-details/representative-details.d.ts +13 -0
  485. package/dist/types/components/business-form/business-form-stepped.d.ts +29 -0
  486. package/dist/types/components/business-form/business-form-stepped.stories.d.ts +27 -0
  487. package/dist/types/components/business-form/business-form.d.ts +0 -1
  488. package/dist/types/components/business-form/business-form.stories.d.ts +6 -0
  489. package/dist/types/components/business-form/business-generic-info/business-generic-info.d.ts +5 -1
  490. package/dist/types/components/business-form/business-representative/business-representative-schema.d.ts +2 -0
  491. package/dist/types/components/business-form/helpers.d.ts +1 -0
  492. package/dist/types/components/{legal-address-form → business-form/legal-address-form}/legal-address-form.d.ts +1 -2
  493. package/dist/types/components/business-list/business-list.d.ts +34 -21
  494. package/dist/types/components/card-form/card-form.stories.d.ts +0 -7
  495. package/dist/types/components/details/details.d.ts +0 -3
  496. package/dist/types/components/details/utils.d.ts +5 -2
  497. package/dist/types/components/form/form.d.ts +1 -1
  498. package/dist/types/components/gross-payment-chart/chart-utils.d.ts +45 -0
  499. package/dist/types/components/gross-payment-chart/gross-payment-chart.d.ts +20 -0
  500. package/dist/types/components/gross-payment-chart/gross-payment-chart.stories.d.ts +7 -0
  501. package/dist/types/components/pagination-menu/pagination-menu.d.ts +10 -0
  502. package/dist/types/components/payment-balance-transactions/payment-balance-transactions.d.ts +17 -0
  503. package/dist/types/components/payment-balance-transactions/payment-balance-transactions.stories.d.ts +8 -0
  504. package/dist/types/components/payment-details/payment-details.d.ts +8 -0
  505. package/dist/types/components/payment-form/payment-form.stories.d.ts +1 -9
  506. package/dist/types/components/payments-list/payments-list.d.ts +5 -4
  507. package/dist/types/components/payout-details/payout-details.d.ts +8 -0
  508. package/dist/types/components/payouts-list/payouts-list.d.ts +5 -4
  509. package/dist/types/components/proceeds-list/proceeds-list.d.ts +5 -3
  510. package/dist/types/components/refund-form/refund-form-schema.d.ts +11 -0
  511. package/dist/types/components/refund-form/refund-form.d.ts +58 -0
  512. package/dist/types/components/refund-form/refund-form.stories.d.ts +27 -0
  513. package/dist/types/components/subaccount-details/subaccount-account-details/subaccount-account-details.d.ts +6 -0
  514. package/dist/types/components/subaccount-details/subaccount-bank-details/subaccount-bank-details.d.ts +5 -0
  515. package/dist/types/components/subaccount-details/subaccount-details.d.ts +16 -0
  516. package/dist/types/components/subaccount-details/subaccount-details.stories.d.ts +7 -0
  517. package/dist/types/components/subaccount-details/subaccount-merchant-details/subaccount-merchant-details.d.ts +5 -0
  518. package/dist/types/components/subaccount-details/subaccount-owners-details/subaccount-owners-details.d.ts +5 -0
  519. package/dist/types/components/subaccount-details/subaccount-representative-details/subaccount-representative-details.d.ts +5 -0
  520. package/dist/types/components/subaccount-details/subaccount-terms-details/subaccount-terms-details.d.ts +5 -0
  521. package/dist/types/components/subaccounts-list/subaccounts-list.d.ts +19 -0
  522. package/dist/types/components/subaccounts-list/subaccounts-list.stories.d.ts +9 -0
  523. package/dist/types/components/table/table.d.ts +3 -7
  524. package/dist/types/components.d.ts +619 -7
  525. package/dist/types/home/runner/work/web-component-library/web-component-library/stencil-library/.stencil/config.d.ts +12 -4
  526. package/dist/types/utils/utils.d.ts +19 -0
  527. package/dist/webcomponents/p-0d5d02d7.js +2 -0
  528. package/dist/webcomponents/p-0d5d02d7.js.map +1 -0
  529. package/dist/webcomponents/p-0e9a7fa7.entry.js +2 -0
  530. package/dist/webcomponents/p-0e9a7fa7.entry.js.map +1 -0
  531. package/dist/webcomponents/p-1920e118.entry.js +2 -0
  532. package/dist/webcomponents/p-1920e118.entry.js.map +1 -0
  533. package/dist/webcomponents/p-215b4c87.entry.js +2 -0
  534. package/dist/webcomponents/{p-f6cc37a6.entry.js.map → p-215b4c87.entry.js.map} +1 -1
  535. package/dist/webcomponents/p-222d357c.entry.js +20 -0
  536. package/dist/webcomponents/p-222d357c.entry.js.map +1 -0
  537. package/dist/webcomponents/{p-d92116e6.entry.js → p-2cd29187.entry.js} +2 -2
  538. package/dist/webcomponents/p-301a23aa.js +2 -0
  539. package/dist/webcomponents/p-301a23aa.js.map +1 -0
  540. package/dist/webcomponents/p-355eabff.entry.js +2 -0
  541. package/dist/webcomponents/p-355eabff.entry.js.map +1 -0
  542. package/dist/webcomponents/{p-640bfa9f.entry.js → p-356cf20d.entry.js} +2 -2
  543. package/dist/webcomponents/p-397e0d5a.entry.js +2 -0
  544. package/dist/webcomponents/p-397e0d5a.entry.js.map +1 -0
  545. package/dist/webcomponents/p-491d5c69.entry.js +2 -0
  546. package/dist/webcomponents/p-491d5c69.entry.js.map +1 -0
  547. package/dist/webcomponents/p-526cb161.js +2 -0
  548. package/dist/webcomponents/p-526cb161.js.map +1 -0
  549. package/dist/webcomponents/{p-f9e127a5.js → p-59860ac8.js} +2 -2
  550. package/dist/webcomponents/p-59860ac8.js.map +1 -0
  551. package/dist/webcomponents/p-62872b87.entry.js +2 -0
  552. package/dist/webcomponents/p-62872b87.entry.js.map +1 -0
  553. package/dist/webcomponents/p-635a3b3e.entry.js +2 -0
  554. package/dist/webcomponents/p-635a3b3e.entry.js.map +1 -0
  555. package/dist/webcomponents/p-64184a0c.entry.js +2 -0
  556. package/dist/webcomponents/p-64184a0c.entry.js.map +1 -0
  557. package/dist/webcomponents/p-6c3236e8.entry.js +2 -0
  558. package/dist/webcomponents/p-6c3236e8.entry.js.map +1 -0
  559. package/dist/webcomponents/p-76983a7e.js +2 -0
  560. package/dist/webcomponents/p-76983a7e.js.map +1 -0
  561. package/dist/webcomponents/p-76dffeec.js +2 -0
  562. package/dist/webcomponents/p-76dffeec.js.map +1 -0
  563. package/dist/webcomponents/{p-2b6f5e35.entry.js → p-77e732b2.entry.js} +2 -2
  564. package/dist/webcomponents/p-77e732b2.entry.js.map +1 -0
  565. package/dist/webcomponents/p-798483dd.entry.js +2 -0
  566. package/dist/webcomponents/p-798483dd.entry.js.map +1 -0
  567. package/dist/webcomponents/p-7a24ab66.entry.js +2 -0
  568. package/dist/webcomponents/p-7a24ab66.entry.js.map +1 -0
  569. package/dist/webcomponents/p-7cde64a2.entry.js +2 -0
  570. package/dist/webcomponents/{p-9d1c7e6a.entry.js.map → p-7cde64a2.entry.js.map} +1 -1
  571. package/dist/webcomponents/p-7d58db66.js +2 -0
  572. package/dist/webcomponents/p-7d58db66.js.map +1 -0
  573. package/dist/webcomponents/p-8367b46c.entry.js +2 -0
  574. package/dist/webcomponents/p-8367b46c.entry.js.map +1 -0
  575. package/dist/webcomponents/{p-1beaaba3.entry.js → p-88fa33c1.entry.js} +2 -2
  576. package/dist/webcomponents/{p-c46241ba.js → p-8f37e3ee.js} +2 -2
  577. package/dist/webcomponents/p-8f37e3ee.js.map +1 -0
  578. package/dist/webcomponents/p-931989e6.entry.js +2 -0
  579. package/dist/webcomponents/p-931989e6.entry.js.map +1 -0
  580. package/dist/webcomponents/{p-cd0eca25.entry.js → p-96eecdff.entry.js} +2 -2
  581. package/dist/webcomponents/p-988191bf.js +2 -0
  582. package/dist/webcomponents/p-988191bf.js.map +1 -0
  583. package/dist/webcomponents/p-a4c78757.entry.js +2 -0
  584. package/dist/webcomponents/p-a4c78757.entry.js.map +1 -0
  585. package/dist/webcomponents/p-b08a9520.entry.js +2 -0
  586. package/dist/webcomponents/p-b08a9520.entry.js.map +1 -0
  587. package/dist/webcomponents/p-b157f6ae.js +2 -0
  588. package/dist/webcomponents/p-b157f6ae.js.map +1 -0
  589. package/dist/webcomponents/p-b45453ea.entry.js +2 -0
  590. package/dist/webcomponents/p-b45453ea.entry.js.map +1 -0
  591. package/dist/webcomponents/p-c2845c5d.entry.js +2 -0
  592. package/dist/webcomponents/p-c2845c5d.entry.js.map +1 -0
  593. package/dist/webcomponents/p-c4289027.entry.js +2 -0
  594. package/dist/webcomponents/p-c4289027.entry.js.map +1 -0
  595. package/dist/webcomponents/p-c43e9572.entry.js +2 -0
  596. package/dist/webcomponents/p-c43e9572.entry.js.map +1 -0
  597. package/dist/webcomponents/p-cbb60191.js +3 -0
  598. package/dist/webcomponents/p-cbb60191.js.map +1 -0
  599. package/dist/webcomponents/{p-26392ae3.entry.js → p-d40718da.entry.js} +2 -2
  600. package/dist/webcomponents/p-d40718da.entry.js.map +1 -0
  601. package/dist/webcomponents/{p-9346ae33.js → p-d6b5793d.js} +2 -2
  602. package/dist/webcomponents/p-d6b5793d.js.map +1 -0
  603. package/dist/webcomponents/{p-a922b908.entry.js → p-ec1890fc.entry.js} +2 -2
  604. package/dist/webcomponents/p-ffcbf779.entry.js +2 -0
  605. package/dist/webcomponents/p-ffcbf779.entry.js.map +1 -0
  606. package/dist/webcomponents/webcomponents.esm.js +1 -1
  607. package/dist/webcomponents/webcomponents.esm.js.map +1 -1
  608. package/package.json +8 -7
  609. package/dist/cjs/Api-f76b337f.js.map +0 -1
  610. package/dist/cjs/Payout-4906a445.js.map +0 -1
  611. package/dist/cjs/business-form-schema-725ec6f5.js.map +0 -1
  612. package/dist/cjs/form-control-select.cjs.entry.js +0 -47
  613. package/dist/cjs/form-control-select.cjs.entry.js.map +0 -1
  614. package/dist/cjs/index-3533152c.js.map +0 -1
  615. package/dist/cjs/index.esm-84a0a7a8.js.map +0 -1
  616. package/dist/cjs/justifi-additional-questions_5.cjs.entry.js.map +0 -1
  617. package/dist/cjs/justifi-table.cjs.entry.js.map +0 -1
  618. package/dist/cjs/table-utils-617126e5.js +0 -13
  619. package/dist/cjs/table-utils-617126e5.js.map +0 -1
  620. package/dist/cjs/utils-0fd61dbd.js.map +0 -1
  621. package/dist/cjs/utils-d95b09c2.js +0 -35
  622. package/dist/cjs/utils-d95b09c2.js.map +0 -1
  623. package/dist/collection/components/legal-address-form/legal-address-form-schema.js.map +0 -1
  624. package/dist/collection/components/legal-address-form/legal-address-form.js.map +0 -1
  625. package/dist/collection/components/table/table-utils.js +0 -8
  626. package/dist/collection/components/table/table-utils.js.map +0 -1
  627. package/dist/esm/Api-cca120a8.js.map +0 -1
  628. package/dist/esm/Payout-9a1f2859.js.map +0 -1
  629. package/dist/esm/business-form-schema-5885d3d6.js.map +0 -1
  630. package/dist/esm/form-control-select.entry.js +0 -43
  631. package/dist/esm/form-control-select.entry.js.map +0 -1
  632. package/dist/esm/index-fe877d03.js.map +0 -1
  633. package/dist/esm/index.esm-89fe6af9.js.map +0 -1
  634. package/dist/esm/justifi-additional-questions_5.entry.js.map +0 -1
  635. package/dist/esm/justifi-table.entry.js.map +0 -1
  636. package/dist/esm/table-utils-6cdcaa8c.js +0 -11
  637. package/dist/esm/table-utils-6cdcaa8c.js.map +0 -1
  638. package/dist/esm/utils-1e7d6279.js +0 -28
  639. package/dist/esm/utils-1e7d6279.js.map +0 -1
  640. package/dist/esm/utils-ad0bbe03.js.map +0 -1
  641. package/dist/types/components/table/table-utils.d.ts +0 -14
  642. package/dist/webcomponents/p-26392ae3.entry.js.map +0 -1
  643. package/dist/webcomponents/p-2b6f5e35.entry.js.map +0 -1
  644. package/dist/webcomponents/p-2e66512d.entry.js +0 -2
  645. package/dist/webcomponents/p-2e66512d.entry.js.map +0 -1
  646. package/dist/webcomponents/p-523cbe04.js +0 -2
  647. package/dist/webcomponents/p-523cbe04.js.map +0 -1
  648. package/dist/webcomponents/p-641883b2.entry.js +0 -2
  649. package/dist/webcomponents/p-641883b2.entry.js.map +0 -1
  650. package/dist/webcomponents/p-69a1bec2.entry.js +0 -2
  651. package/dist/webcomponents/p-69a1bec2.entry.js.map +0 -1
  652. package/dist/webcomponents/p-6a0c8dec.entry.js +0 -2
  653. package/dist/webcomponents/p-6a0c8dec.entry.js.map +0 -1
  654. package/dist/webcomponents/p-87410719.entry.js +0 -2
  655. package/dist/webcomponents/p-87410719.entry.js.map +0 -1
  656. package/dist/webcomponents/p-881edb4d.entry.js +0 -2
  657. package/dist/webcomponents/p-881edb4d.entry.js.map +0 -1
  658. package/dist/webcomponents/p-9346ae33.js.map +0 -1
  659. package/dist/webcomponents/p-9d1c7e6a.entry.js +0 -2
  660. package/dist/webcomponents/p-ab0756ff.js +0 -2
  661. package/dist/webcomponents/p-ab0756ff.js.map +0 -1
  662. package/dist/webcomponents/p-c46241ba.js.map +0 -1
  663. package/dist/webcomponents/p-ccb0e1c5.js +0 -2
  664. package/dist/webcomponents/p-ccb0e1c5.js.map +0 -1
  665. package/dist/webcomponents/p-dabeb3df.entry.js +0 -2
  666. package/dist/webcomponents/p-dabeb3df.entry.js.map +0 -1
  667. package/dist/webcomponents/p-db9945b1.entry.js +0 -2
  668. package/dist/webcomponents/p-db9945b1.entry.js.map +0 -1
  669. package/dist/webcomponents/p-e1f6c8ec.entry.js +0 -2
  670. package/dist/webcomponents/p-e1f6c8ec.entry.js.map +0 -1
  671. package/dist/webcomponents/p-e41fb562.entry.js +0 -2
  672. package/dist/webcomponents/p-e41fb562.entry.js.map +0 -1
  673. package/dist/webcomponents/p-e6695628.js +0 -2
  674. package/dist/webcomponents/p-e6695628.js.map +0 -1
  675. package/dist/webcomponents/p-e70b2a21.js +0 -3
  676. package/dist/webcomponents/p-e70b2a21.js.map +0 -1
  677. package/dist/webcomponents/p-f6cc37a6.entry.js +0 -2
  678. package/dist/webcomponents/p-f8067330.entry.js +0 -2
  679. package/dist/webcomponents/p-f8067330.entry.js.map +0 -1
  680. package/dist/webcomponents/p-f9e127a5.js.map +0 -1
  681. /package/dist/collection/components/{legal-address-form → business-form/legal-address-form}/legal-address-form-schema.js +0 -0
  682. /package/dist/collection/components/{legal-address-form → business-form/legal-address-form}/legal-address-form.css +0 -0
  683. /package/dist/types/components/{legal-address-form → business-form/legal-address-form}/legal-address-form-schema.d.ts +0 -0
  684. /package/dist/webcomponents/{p-d92116e6.entry.js.map → p-2cd29187.entry.js.map} +0 -0
  685. /package/dist/webcomponents/{p-640bfa9f.entry.js.map → p-356cf20d.entry.js.map} +0 -0
  686. /package/dist/webcomponents/{p-1beaaba3.entry.js.map → p-88fa33c1.entry.js.map} +0 -0
  687. /package/dist/webcomponents/{p-cd0eca25.entry.js.map → p-96eecdff.entry.js.map} +0 -0
  688. /package/dist/webcomponents/{p-a922b908.entry.js.map → p-ec1890fc.entry.js.map} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"names":["tableCss","Table","this","emptyState","h","class","part","colSpan","_a","columnData","length","style","textAlign","errorState","errorMessage","loadingState","role","ExtendedPagingDefaults","showEmptyState","rowData","render","Host","exportparts","map","column","scope","title","Array","isArray","loading","_b","data","index","entityId","onClick","e","rowClickHandler","dataEntry","type","innerHTML","value","paging","_c","params","PaginationMenu","preventDefault","handleClickPrevious","start_cursor","has_previous","href","handleClickNext","end_cursor","has_next"],"sources":["src/components/table/table.scss?tag=justifi-table&encapsulation=shadow","src/components/table/table.tsx","src/components/table/table.scss?tag=pagination-menu&encapsulation=shadow","src/components/pagination-menu/pagination-menu.tsx"],"sourcesContent":["@import \"reboot\";\n@import \"tables\";\n@import \"buttons\";\n@import \"badge\";\n@import \"grid\";\n@import \"bootstrap-utilities\";\n@import \"pagination\";\n\n:host {\n @include host-base-styles;\n}\n","import { Component, Host, h, Prop } from '@stencil/core';\nimport { ExtendedPagingDefaults, ExtendedPagingInfo } from '../../api/Pagination';\n\nexport interface TableProps {\n loading: boolean;\n errorMessage: string;\n columnData: (string|string[])[];\n rowData: any[];\n paging: ExtendedPagingInfo;\n params: any\n}\n\n@Component({\n tag: 'justifi-table',\n styleUrl: './table.scss',\n shadow: true,\n})\n\nexport class Table {\n @Prop() loading: TableProps['loading'] = true;\n @Prop() errorMessage: TableProps['errorMessage'] = '';\n @Prop() rowData: TableProps['rowData'] = [];\n @Prop() columnData!: TableProps['columnData'];\n @Prop() paging: TableProps['paging'] = ExtendedPagingDefaults;\n @Prop() params: TableProps['params'] = {};\n @Prop() entityId: string[];\n @Prop() rowClickHandler: (e: any) => any;\n\n showEmptyState() {\n return this.rowData ? this.rowData.length < 1 : true;\n }\n\n emptyState = () => (\n <tr>\n <td class=\"empty-state\" part=\"empty-state\" colSpan={this.columnData?.length} style={{ textAlign: 'center' }}>No payments to show</td>\n </tr>\n );\n\n errorState = () => (\n <tr>\n <td class=\"error-state\" part=\"error-state\" colSpan={this.columnData?.length} style={{ textAlign: 'center' }}>\n An unexpected error occurred: {this.errorMessage}\n </td>\n </tr>\n );\n\n loadingState = () => (\n <tr>\n <td class=\"loading-state\" part=\"loading-state-cell\" colSpan={this.columnData?.length} style={{ textAlign: 'center' }}>\n <div part=\"loading-state-spinner\" class=\"spinner-border\" role=\"status\">\n <span class=\"visually-hidden\">Loading...</span>\n </div>\n </td>\n </tr>\n );\n\n render() {\n return (\n <Host exportparts=\"\n table-head,table-head-row,table-head-cell,table-body,table-row,table-row-even,\n table-row-odd,table-cell,loading-state-cell,loading-state-spinner,error-state,\n empty-state,pagination-bar,arrow,arrow-left,arrow-right,button-disabled,\n previous-button-text,next-button-text\n \">\n {this.columnData ?\n <table class=\"table table-hover\">\n <thead class=\"table-head sticky-top\" part=\"table-head\">\n <tr class=\"table-light\" part='table-head-row'>\n {\n this.columnData?.map((column) =>\n <th part=\"table-head-cell\" scope=\"col\" title={Array.isArray(column) ? column[1] : ''}>\n {!Array.isArray(column) ? column : column[0]}\n </th>\n )\n }\n </tr>\n </thead>\n <tbody class=\"table-body\" part='table-body'>\n {\n this.loading ? this.loadingState() :\n this.errorMessage ? this.errorState() :\n this.showEmptyState() ? this.emptyState() :\n this.rowData?.map((data, index) => {\n return (\n <tr\n data-row-entity-id={this.entityId[index]}\n onClick={e => this.rowClickHandler ? this.rowClickHandler(e) : null}\n part={`table-row${index%2 ? ' table-row-even' : ' table-row-odd'}`}\n >\n {\n data.map((dataEntry: any) =>\n { return (\n !dataEntry?.type\n ? <td part=\"table-cell\">{dataEntry}</td>\n : <th scope=\"row\" part=\"table-cell\">\n <td part=\"table-cell\" innerHTML={dataEntry.value}></td>\n </th>\n )\n }\n )\n }\n </tr>\n )\n })\n }\n </tbody>\n {this.paging &&\n <tfoot class=\"sticky-bottom\">\n <tr class=\"table-light align-middle\">\n <td part=\"pagination-bar\" colSpan={this.columnData?.length}>\n <pagination-menu paging={this.paging} params={this.params} />\n </td>\n </tr>\n </tfoot>\n }\n </table>\n :\n <div data-test-id=\"empty-error-state\">Column data is required</div>}\n </Host>\n )\n }\n}\n","@import \"reboot\";\n@import \"tables\";\n@import \"buttons\";\n@import \"badge\";\n@import \"grid\";\n@import \"bootstrap-utilities\";\n@import \"pagination\";\n\n:host {\n @include host-base-styles;\n}\n","import { Component, Host, h, Prop } from '@stencil/core';\nimport { ExtendedPagingDefaults, ExtendedPagingInfo } from '../../api/Pagination';\n\nexport interface PaginationProps {\n paging: ExtendedPagingInfo;\n params?: {};\n}\n\n@Component({\n tag: 'pagination-menu',\n styleUrl: '../table/table.scss',\n shadow: true,\n})\n\nexport class PaginationMenu {\n @Prop() paging: PaginationProps['paging'] = ExtendedPagingDefaults;\n @Prop() params: PaginationProps['params'] = {};\n\n render() {\n return (\n <Host>\n <nav aria-label=\"Table pagination\" class=\"d-flex justify-content-end gap-3\">\n <ul class=\"pagination m-0\">\n <li\n onClick={(e) => {\n e.preventDefault();\n this.paging.handleClickPrevious(this.paging.start_cursor);\n }}\n part={`previous-button${this.paging.has_previous ? '' : ' button-disabled'}`}\n class={`page-item ${this.paging.has_previous ? '' : ' disabled'}`}\n >\n <a href=\"#\" class=\"page-link\">\n <span class=\"me-1\" part=\"arrow arrow-left\">&laquo;</span>\n <span part=\"previous-button-text\">Previous</span>\n </a>\n </li>\n <li\n onClick={(e) => {\n e.preventDefault();\n this.paging.handleClickNext(this.paging.end_cursor);\n }}\n part={`${this.paging.has_next ? '' : ' button-disabled'}`}\n class={`page-item ${this.paging.has_next ? '' : ' disabled'}`}\n >\n <a href=\"#\" class=\"page-link\">\n <span part=\"next-button-text\">Next</span>\n <span class=\"ms-1\" part=\"arrow arrow-right\">&raquo;</span>\n </a>\n </li>\n </ul>\n </nav>\n </Host>\n );\n }\n}\n"],"mappings":"sFAAA,MAAMA,EAAW,6n/H,MCkBJC,EAAK,M,yBAchBC,KAAAC,WAAa,K,MAAM,OACjBC,EAAA,UACEA,EAAA,MAAIC,MAAM,cAAcC,KAAK,cAAcC,SAASC,EAAAN,KAAKO,cAAU,MAAAD,SAAA,SAAAA,EAAEE,OAAQC,MAAO,CAAEC,UAAW,WAAU,uBACxG,EAGPV,KAAAW,WAAa,K,MAAM,OACjBT,EAAA,UACEA,EAAA,MAAIC,MAAM,cAAcC,KAAK,cAAcC,SAASC,EAAAN,KAAKO,cAAU,MAAAD,SAAA,SAAAA,EAAEE,OAAQC,MAAO,CAAEC,UAAW,WAAU,iCAC1EV,KAAKY,cAEnC,EAGPZ,KAAAa,aAAe,K,MAAM,OACnBX,EAAA,UACEA,EAAA,MAAIC,MAAM,gBAAgBC,KAAK,qBAAqBC,SAASC,EAAAN,KAAKO,cAAU,MAAAD,SAAA,SAAAA,EAAEE,OAAQC,MAAO,CAAEC,UAAW,WACxGR,EAAA,OAAKE,KAAK,wBAAwBD,MAAM,iBAAiBW,KAAK,UAC5DZ,EAAA,QAAMC,MAAM,mBAAiB,gBAG9B,E,aAlCkC,K,kBACU,G,aACV,G,sCAEFY,E,YACA,G,uDAIvC,cAAAC,GACE,OAAOhB,KAAKiB,QAAUjB,KAAKiB,QAAQT,OAAS,EAAI,I,CA2BlD,MAAAU,G,UACE,OACEhB,EAACiB,EAAI,CAACC,YAAY,6TAMfpB,KAAKO,WACNL,EAAA,SAAOC,MAAM,qBACXD,EAAA,SAAOC,MAA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vCD,EAAA,MAAIC,MAAM,kBACRD,EAAA,MACE8B,QAAUC,IACRA,EAAEU,iBACF3C,KAAKuC,OAAOK,oBAAoB5C,KAAKuC,OAAOM,aAAa,EAE3DzC,KAAM,kBAAkBJ,KAAKuC,OAAOO,aAAe,GAAK,qBACxD3C,MAAO,aAAaH,KAAKuC,OAAOO,aAAe,GAAK,eAEpD5C,EAAA,KAAG6C,KAAK,IAAI5C,MAAM,aAChBD,EAAA,QAAMC,MAAM,OAAOC,KAAK,oBAAkB,KAC1CF,EAAA,QAAME,KAAK,wBAAsB,cAGrCF,EAAA,MACE8B,QAAUC,IACRA,EAAEU,iBACF3C,KAAKuC,OAAOS,gBAAgBhD,KAAKuC,OAAOU,WAAW,EAErD7C,KAAM,GAAGJ,KAAKuC,OAAOW,SAAW,GAAK,qBACrC/C,MAAO,aAAaH,KAAKuC,OAAOW,SAAW,GAAK,eAEhDhD,EAAA,KAAG6C,KAAK,IAAI5C,MAAM,aAChBD,EAAA,QAAME,KAAK,oBAAkB,QAC7BF,EAAA,QAAMC,MAAM,OAAOC,KAAK,qBAAmB,S"}
@@ -0,0 +1,2 @@
1
+ import{r as t,h as s,H as e}from"./p-cbb60191.js";import{A as i}from"./p-b157f6ae.js";import{p as a}from"./p-0d5d02d7.js";import{P as n}from"./p-76983a7e.js";import{f as r,c as h,s as o,a as c}from"./p-d6b5793d.js";const d="";const u=class{constructor(s){t(this,s);this.handleClickPrevious=t=>{const s=Object.assign({},this.params);delete s.after_cursor;this.params=Object.assign(Object.assign({},s),{before_cursor:t})};this.handleClickNext=t=>{const s=Object.assign({},this.params);delete s.before_cursor;this.params=Object.assign(Object.assign({},s),{after_cursor:t})};this.accountId=undefined;this.authToken=undefined;this.paymentId=undefined;this.balanceTransactions=[];this.loading=true;this.errorMessage=undefined;this.paging=a;this.params=undefined}updateOnPropChange(){this.fetchData()}connectedCallback(){this.fetchData()}async fetchData(){this.loading=true;if(!this.accountId||!this.paymentId){this.errorMessage="Missing required props: accountId or paymentId";this.loading=false;return}const t=`account/${this.accountId}/payments/${this.paymentId}/payment_balance_transactions`;const s=await i(this.authToken).get(t,this.params);if(!s.error){this.paging=Object.assign(Object.assign({},this.paging),s.page_info);this.balanceTransactions=s.data.map((t=>new n(t)))}else{this.errorMessage=typeof s.error==="string"?s.error:s.error.message}this.loading=false}render(){return s(e,null,s("justifi-table",{columnData:[["Processed On","The date each transaction occurred"],["Type","The type of each transaction"],["ID","The unique identifier of each transaction"],["Amout","The dollar amount of each transaction"],["Balance","The running total amount of this payment that belongs to you"]],entityId:this.balanceTransactions.map((t=>t.id)),rowData:this.balanceTransactions.map((t=>[s("div",null,s("div",null,r(t.created_at)),s("div",null,h(t.created_at))),o(t.payment_balance_txn_type),t.payment_id,c(t.amount),c(t.balance)])),loading:this.loading,"error-message":this.errorMessage,params:this.params,paging:Object.assign(Object.assign({},this.paging),{handleClickNext:this.handleClickNext,handleClickPrevious:this.handleClickPrevious})}))}static get watchers(){return{params:["updateOnPropChange"]}}};u.style=d;export{u as justifi_payment_balance_transactions};
2
+ //# sourceMappingURL=p-7a24ab66.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["paymentBalanceTransactionsCss","PaymentBalanceTransactions","this","handleClickPrevious","beforeCursor","newParams","Object","assign","params","after_cursor","before_cursor","handleClickNext","afterCursor","pagingDefaults","updateOnPropChange","fetchData","connectedCallback","loading","accountId","paymentId","errorMessage","endpoint","response","Api","authToken","get","error","paging","page_info","balanceTransactions","data","map","dataItem","PaymentBalanceTransaction","message","render","h","Host","columnData","entityId","transaction","id","rowData","balanceTransaction","formatDate","created_at","formatTime","snakeCaseToHumanReadable","payment_balance_txn_type","payment_id","formatCurrency","amount","balance"],"sources":["src/components/payment-balance-transactions/payment-balance-transactions.scss?tag=justifi-payment-balance-transactions&encapsulation=shadow","src/components/payment-balance-transactions/payment-balance-transactions.tsx"],"sourcesContent":[null,"import { Component, Host, h, Prop, State, Watch } from '@stencil/core';\nimport {\n Api,\n IApiResponseCollection,\n IPaymentBalanceTransaction,\n PagingInfo,\n PaymentBalanceTransaction,\n pagingDefaults,\n} from '../../api';\n\nimport {\n formatCurrency,\n formatDate,\n formatTime,\n snakeCaseToHumanReadable,\n} from '../../utils/utils';\n\n@Component({\n tag: 'justifi-payment-balance-transactions',\n styleUrl: 'payment-balance-transactions.scss',\n shadow: true,\n})\nexport class PaymentBalanceTransactions {\n @Prop() accountId: string;\n @Prop() authToken: string;\n @Prop() paymentId: string;\n @State() balanceTransactions: IPaymentBalanceTransaction[] = [];\n @State() loading: boolean = true;\n @State() errorMessage: string;\n @State() paging: PagingInfo = pagingDefaults;\n @State() params: any\n\n @Watch('params')\n updateOnPropChange() {\n this.fetchData();\n }\n\n connectedCallback() {\n this.fetchData();\n }\n\n handleClickPrevious = (beforeCursor: string) => {\n const newParams: any = { ...this.params };\n delete newParams.after_cursor;\n this.params = ({ ...newParams, before_cursor: beforeCursor });\n };\n\n handleClickNext = (afterCursor: string) => {\n const newParams: any = { ...this.params };\n delete newParams.before_cursor;\n this.params = ({ ...newParams, after_cursor: afterCursor });\n }; \n\n async fetchData(): Promise<void> {\n this.loading = true;\n\n if (!this.accountId || !this.paymentId) {\n this.errorMessage = 'Missing required props: accountId or paymentId';\n this.loading = false;\n return;\n }\n const endpoint = `account/${this.accountId}/payments/${this.paymentId}/payment_balance_transactions`;\n\n const response: IApiResponseCollection<IPaymentBalanceTransaction[]> =\n await Api(this.authToken).get(endpoint, this.params);\n\n if (!response.error) {\n this.paging = {\n ...this.paging,\n ...response.page_info,\n };\n this.balanceTransactions = response.data.map(\n dataItem => new PaymentBalanceTransaction(dataItem),\n );\n } else {\n this.errorMessage =\n typeof response.error === 'string'\n ? response.error\n : response.error.message;\n }\n this.loading = false;\n }\n\n render() {\n return (\n <Host>\n <justifi-table\n columnData={[\n ['Processed On', 'The date each transaction occurred'],\n ['Type', 'The type of each transaction'],\n ['ID', 'The unique identifier of each transaction'],\n ['Amout', 'The dollar amount of each transaction'],\n [\n 'Balance',\n 'The running total amount of this payment that belongs to you',\n ],\n ]}\n entityId={this.balanceTransactions.map(transaction => transaction.id)}\n rowData={this.balanceTransactions.map(balanceTransaction => [\n <div>\n <div>{formatDate(balanceTransaction.created_at)}</div>\n <div>{formatTime(balanceTransaction.created_at)}</div>\n </div>,\n snakeCaseToHumanReadable(\n balanceTransaction.payment_balance_txn_type,\n ),\n balanceTransaction.payment_id,\n formatCurrency(balanceTransaction.amount),\n formatCurrency(balanceTransaction.balance),\n ])}\n loading={this.loading}\n error-message={this.errorMessage}\n params={this.params}\n paging={{\n ...this.paging,\n handleClickNext: this.handleClickNext,\n handleClickPrevious: this.handleClickPrevious\n }}\n />\n </Host>\n );\n }\n}\n"],"mappings":"uNAAA,MAAMA,EAAgC,G,MCsBzBC,EAA0B,M,yBAmBrCC,KAAAC,oBAAuBC,IACrB,MAAMC,EAASC,OAAAC,OAAA,GAAaL,KAAKM,eAC1BH,EAAUI,aACjBP,KAAKM,OAAMF,OAAAC,OAAAD,OAAAC,OAAA,GAASF,GAAS,CAAEK,cAAeN,GAAe,EAG/DF,KAAAS,gBAAmBC,IACjB,MAAMP,EAASC,OAAAC,OAAA,GAAaL,KAAKM,eAC1BH,EAAUK,cACjBR,KAAKM,OAAMF,OAAAC,OAAAD,OAAAC,OAAA,GAASF,GAAS,CAAEI,aAAcG,GAAc,E,oGAxBA,G,aACjC,K,wCAEEC,E,sBAI9B,kBAAAC,GACEZ,KAAKa,W,CAGP,iBAAAC,GACEd,KAAKa,W,CAeP,eAAMA,GACJb,KAAKe,QAAU,KAEf,IAAKf,KAAKgB,YAAchB,KAAKiB,UAAW,CACtCjB,KAAKkB,aAAe,iDACpBlB,KAAKe,QAAU,MACf,M,CAEF,MAAMI,EAAW,WAAWnB,KAAKgB,sBAAsBhB,KAAKiB,yCAE5D,MAAMG,QACEC,EAAIrB,KAAKsB,WAAWC,IAAIJ,EAAUnB,KAAKM,QAE/C,IAAKc,EAASI,MAAO,CACnBxB,KAAKyB,OAAMrB,OAAAC,OAAAD,OAAAC,OAAA,GACNL,KAAKyB,QACLL,EAASM,WAEd1B,KAAK2B,oBAAsBP,EAASQ,KAAKC,KACvCC,GAAY,IAAIC,EAA0BD,I,KAEvC,CACL9B,KAAKkB,oBACIE,EAASI,QAAU,SACtBJ,EAASI,MACTJ,EAASI,MAAMQ,O,CAEvBhC,KAAKe,QAAU,K,CAGjB,MAAAkB,GACE,OACEC,EAACC,EAAI,KACHD,EAAA,iBACEE,WAAY,CACV,CAAC,eAAgB,sCACjB,CAAC,OAAQ,gCACT,CAAC,KAAM,6CACP,CAAC,QAAS,yCACV,CACE,UACA,iEAGJC,SAAUrC,KAAK2B,oBAAoBE,KAAIS,GAAeA,EAAYC,KAClEC,QAASxC,KAAK2B,oBAAoBE,KAAIY,GAAsB,CAC1DP,EAAA,WACEA,EAAA,WAAMQ,EAAWD,EAAmBE,aACpCT,EAAA,WAAMU,EAAWH,EAAmBE,cAEtCE,EACEJ,EAAmBK,0BAErBL,EAAmBM,WACnBC,EAAeP,EAAmBQ,QAClCD,EAAeP,EAAmBS,YAEpCnC,QAASf,KAAKe,QAAO,gBACNf,KAAKkB,aACpBZ,OAAQN,KAAKM,OACbmB,OAAMrB,OAAAC,OAAAD,OAAAC,OAAA,GACDL,KAAKyB,QAAM,CACdhB,gBAAiBT,KAAKS,gBACtBR,oBAAqBD,KAAKC,wB"}
@@ -0,0 +1,2 @@
1
+ import{r as e,c as n,h as t,H as o}from"./p-cbb60191.js";import{c as i}from"./p-301a23aa.js";function r(e,n,t){return t={path:n,exports:{},require:function(e,n){return s()}},e(t,t.exports),t.exports}function s(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var a=r((function(e){(function(n){if(typeof window==="undefined")return;var t=0,o=false,i=false,r="message",s=r.length,a="[iFrameSizer]",c=a.length,f=null,u=window.requestAnimationFrame,d=Object.freeze({max:1,scroll:1,bodyScroll:1,documentElementScroll:1}),l={},m=null,b=Object.freeze({autoResize:true,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:true,inPageLinks:false,enablePublicMethods:true,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,log:false,maxHeight:Infinity,maxWidth:Infinity,minHeight:0,minWidth:0,mouseEvents:true,resizeFrom:"parent",scrolling:false,sizeHeight:true,sizeWidth:false,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClose:function(){return true},onClosed:function(){},onInit:function(){},onMessage:function(){z("onMessage function not defined")},onMouseEnter:function(){},onMouseLeave:function(){},onResized:function(){},onScroll:function(){return true}});function h(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function w(e,n,t){e.addEventListener(n,t,false)}function g(e,n,t){e.removeEventListener(n,t,false)}function p(){var e=["moz","webkit","o","ms"];var n;for(n=0;n<e.length&&!u;n+=1){u=window[e[n]+"RequestAnimationFrame"]}if(u){u=u.bind(window)}else{k("setup","RequestAnimationFrame not supported")}}function y(e){var n="Host page: "+e;if(window.top!==window.self){n=window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+e:"Nested host page: "+e}return n}function v(e){return a+"["+y(e)+"]"}function j(e){return l[e]?l[e].log:o}function k(e,n){M("log",e,n,j(e))}function x(e,n){M("info",e,n,j(e))}function z(e,n){M("warn",e,n,true)}function M(e,n,t,o){if(true===o&&"object"===typeof window.console){console[e](v(n),t)}}function F(e){function n(){function e(){E(_);T(Q);V("onResized",_)}r("Height");r("Width");N(e,_,"init")}function t(){var e=G.slice(c).split(":");var n=e[1]?parseInt(e[1],10):0;var t=l[e[0]]&&l[e[0]].iframe;var r=getComputedStyle(t);return{iframe:t,id:e[0],height:n+o(r)+i(r),width:e[2],type:e[3]}}function o(e){if(e.boxSizing!=="border-box"){return 0}var n=e.paddingTop?parseInt(e.paddingTop,10):0;var t=e.paddingBottom?parseInt(e.paddingBottom,10):0;return n+t}function i(e){if(e.boxSizing!=="border-box"){return 0}var n=e.borderTopWidth?parseInt(e.borderTopWidth,10):0;var t=e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0;return n+t}function r(e){var n=Number(l[Q]["max"+e]),t=Number(l[Q]["min"+e]),o=e.toLowerCase(),i=Number(_[o]);k(Q,"Checking "+o+" is in range "+t+"-"+n);if(i<t){i=t;k(Q,"Set "+o+" to min value")}if(i>n){i=n;k(Q,"Set "+o+" to max value")}_[o]=""+i}function u(){function n(){function e(){var e=0,n=false;k(Q,"Checking connection is from allowed list of origins: "+o);for(;e<o.length;e++){if(o[e]===t){n=true;break}}return n}function n(){var e=l[Q]&&l[Q].remoteHost;k(Q,"Checking connection is from: "+e);return t===e}return o.constructor===Array?e():n()}var t=e.origin,o=l[Q]&&l[Q].checkOrigin;if(o&&""+t!=="null"&&!n()){throw new Error("Unexpected message received from: "+t+" for "+_.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 true}function d(){return a===(""+G).slice(0,c)&&G.slice(c).split(":")[0]in l}function m(){var e=_.type in{true:1,false:1,undefined:1};if(e){k(Q,"Ignoring init message from meta parent page")}return e}function b(e){return G.slice(G.indexOf(":")+s+e)}function h(e){k(Q,"onMessage passed: {iframe: "+_.iframe.id+", message: "+e+"}");V("onMessage",{iframe:_.iframe,message:JSON.parse(e)});k(Q,"--")}function p(){var e=document.body.getBoundingClientRect(),n=_.iframe.getBoundingClientRect();return JSON.stringify({iframeHeight:n.height,iframeWidth:n.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(n.top-e.top,10),offsetLeft:parseInt(n.left-e.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,documentHeight:document.documentElement.clientHeight,documentWidth:document.documentElement.clientWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})}function y(e,n){function t(){A("Send Page Info","pageInfo:"+p(),e,n)}D(t,32,n)}function v(){function e(e,t){function i(){if(l[o]){y(l[o].iframe,o)}else{n()}}["scroll","resize"].forEach((function(n){k(o,e+n+" listener for sendPageInfo");t(window,n,i)}))}function n(){e("Remove ",g)}function t(){e("Add ",w)}var o=Q;t();if(l[o]){l[o].stopPageInfo=n}}function j(){if(l[Q]&&l[Q].stopPageInfo){l[Q].stopPageInfo();delete l[Q].stopPageInfo}}function M(){var e=true;if(null===_.iframe){z(Q,"IFrame ("+_.id+") not found");e=false}return e}function F(e){var n=e.getBoundingClientRect();C(Q);return{x:Math.floor(Number(n.left)+Number(f.x)),y:Math.floor(Number(n.top)+Number(f.y))}}function S(e){function n(){f=r;L();k(Q,"--")}function t(){return{x:Number(_.width)+i.x,y:Number(_.height)+i.y}}function o(){if(window.parentIFrame){window.parentIFrame["scrollTo"+(e?"Offset":"")](r.x,r.y)}else{z(Q,"Unable to scroll to requested position, window.parentIFrame not found")}}var i=e?F(_.iframe):{x:0,y:0},r=t();k(Q,"Reposition requested from iFrame (offset x:"+i.x+" y:"+i.y+")");if(window.top===window.self){n()}else{o()}}function L(){if(false===V("onScroll",f)){W()}else{T(Q)}}function q(e){function n(){var e=F(r);k(Q,"Moving to in page link (#"+o+") at x: "+e.x+" y: "+e.y);f={x:e.x,y:e.y};L();k(Q,"--")}function t(){if(window.parentIFrame){window.parentIFrame.moveToAnchor(o)}else{k(Q,"In page link #"+o+" not found and window.parentIFrame not found")}}var o=e.split("#")[1]||"",i=decodeURIComponent(o),r=document.getElementById(i)||document.getElementsByName(i)[0];if(r){n()}else if(window.top===window.self){k(Q,"In page link #"+o+" not found")}else{t()}}function P(e){var n={};if(Number(_.width)===0&&Number(_.height)===0){var t=b(9).split(":");n={x:t[1],y:t[0]}}else{n={x:_.width,y:_.height}}V(e,{iframe:_.iframe,screenX:Number(n.x),screenY:Number(n.y),type:_.type})}function V(e,n){return I(Q,e,n)}function $(){if(l[Q]&&l[Q].firstRun)B();switch(_.type){case"close":{O(_.iframe);break}case"message":{h(b(6));break}case"mouseenter":{P("onMouseEnter");break}case"mouseleave":{P("onMouseLeave");break}case"autoResize":{l[Q].autoResize=JSON.parse(b(9));break}case"scrollTo":{S(false);break}case"scrollToOffset":{S(true);break}case"pageInfo":{y(l[Q]&&l[Q].iframe,Q);v();break}case"pageInfoStop":{j();break}case"inPageLink":{q(b(9));break}case"reset":{R(_);break}case"init":{n();V("onInit",_.iframe);break}default:{if(Number(_.width)===0&&Number(_.height)===0){z("Unsupported message received ("+_.type+"), this is likely due to the iframe containing a later "+"version of iframe-resizer than the parent page")}else{n()}}}}function U(e){var n=true;if(!l[e]){n=false;z(_.type+" No settings for "+e+". Message was: "+G)}return n}function J(){for(var e in l){A("iFrame requested init",H(e),l[e].iframe,e)}}function B(){if(l[Q]){l[Q].firstRun=false}}var G=e.data,_={},Q=null;if("[iFrameResizerChild]Ready"===G){J()}else if(d()){_=t();Q=_.id;if(l[Q]){l[Q].loaded=true}if(!m()&&U(Q)){k(Q,"Received: "+G);if(M()&&u()){$()}}}else{x(Q,"Ignored: "+G)}}function I(e,n,t){var o=null,i=null;if(l[e]){o=l[e][n];if("function"===typeof o){i=o(t)}else{throw new TypeError(n+" on iFrame["+e+"] is not a function")}}return i}function S(e){var n=e.id;delete l[n]}function O(e){var n=e.id;if(I(n,"onClose",n)===false){k(n,"Close iframe cancelled by onClose event");return}k(n,"Removing iFrame: "+n);try{if(e.parentNode){e.parentNode.removeChild(e)}}catch(e){z(e)}I(n,"onClosed",n);k(n,"--");S(e)}function C(e){if(null===f){f={x:window.pageXOffset===n?document.documentElement.scrollLeft:window.pageXOffset,y:window.pageYOffset===n?document.documentElement.scrollTop:window.pageYOffset};k(e,"Get page position: "+f.x+","+f.y)}}function T(e){if(null!==f){window.scrollTo(f.x,f.y);k(e,"Set page position: "+f.x+","+f.y);W()}}function W(){f=null}function R(e){function n(){E(e);A("reset","reset",e.iframe,e.id)}k(e.id,"Size reset requested by "+("init"===e.type?"host page":"iFrame"));C(e.id);N(n,e,"reset")}function E(e){function n(n){if(!e.id){k("undefined","messageData id not set");return}e.iframe.style[n]=e[n]+"px";k(e.id,"IFrame ("+r+") "+n+" set to "+e[n]+"px")}function t(n){if(!i&&"0"===e[n]){i=true;k(r,"Hidden iFrame detected, creating visibility listener");$()}}function o(e){n(e);t(e)}var r=e.iframe.id;if(l[r]){if(l[r].sizeHeight){o("height")}if(l[r].sizeWidth){o("width")}}}function N(e,n,t){if(t!==n.type&&u&&!window.jasmine){k(n.id,"Requesting animation frame");u(e)}else{e()}}function A(e,n,t,o,i){function r(){var i=l[o]&&l[o].targetOrigin;k(o,"["+e+"] Sending msg to iframe["+o+"] ("+n+") targetOrigin: "+i);t.contentWindow.postMessage(a+n,i)}function s(){z(o,"["+e+"] IFrame("+o+") not found")}function c(){if(t&&"contentWindow"in t&&null!==t.contentWindow){r()}else{s()}}function f(){function e(){if(l[o]&&!l[o].loaded&&!u){u=true;z(o,"IFrame has not responded within "+l[o].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.")}}if(!!i&&l[o]&&!!l[o].warningTimeout){l[o].msgTimeout=setTimeout(e,l[o].warningTimeout)}}var u=false;o=o||t.id;if(l[o]){c();f()}}function H(e){return e+":"+l[e].bodyMarginV1+":"+l[e].sizeWidth+":"+l[e].log+":"+l[e].interval+":"+l[e].enablePublicMethods+":"+l[e].autoResize+":"+l[e].bodyMargin+":"+l[e].heightCalculationMethod+":"+l[e].bodyBackground+":"+l[e].bodyPadding+":"+l[e].tolerance+":"+l[e].inPageLinks+":"+l[e].resizeFrom+":"+l[e].widthCalculationMethod+":"+l[e].mouseEvents}function L(e){return typeof e==="number"}function q(e,i){function r(){function n(n){var t=l[F][n];if(Infinity!==t&&0!==t){e.style[n]=L(t)?t+"px":t;k(F,"Set "+n+" = "+e.style[n])}}function t(e){if(l[F]["min"+e]>l[F]["max"+e]){throw new Error("Value for min"+e+" can not be greater than max"+e)}}t("Height");t("Width");n("maxHeight");n("minHeight");n("maxWidth");n("minWidth")}function s(){var e=i&&i.id||b.id+t++;if(null!==document.getElementById(e)){e+=t++}return e}function a(n){if(typeof n!=="string"){throw new TypeError("Invaild id for iFrame. Expected String")}if(""===n){e.id=n=s();o=(i||{}).log;k(n,"Added missing iframe ID: "+n+" ("+e.src+")")}return n}function c(){k(F,"IFrame scrolling "+(l[F]&&l[F].scrolling?"enabled":"disabled")+" for "+F);e.style.overflow=false===(l[F]&&l[F].scrolling)?"hidden":"auto";switch(l[F]&&l[F].scrolling){case"omit":{break}case true:{e.scrolling="yes";break}case false:{e.scrolling="no";break}default:{e.scrolling=l[F]?l[F].scrolling:"no"}}}function f(){if("number"===typeof(l[F]&&l[F].bodyMargin)||"0"===(l[F]&&l[F].bodyMargin)){l[F].bodyMarginV1=l[F].bodyMargin;l[F].bodyMargin=""+l[F].bodyMargin+"px"}}function u(){var n=l[F]&&l[F].firstRun,t=l[F]&&l[F].heightCalculationMethod in d;if(!n&&t){R({iframe:e,height:0,width:0,type:"init"})}}function m(){if(l[F]){l[F].iframe.iFrameResizer={close:O.bind(null,l[F].iframe),removeListeners:S.bind(null,l[F].iframe),resize:A.bind(null,"Window resize","resize",l[F].iframe),moveToAnchor:function(e){A("Move to anchor","moveToAnchor:"+e,l[F].iframe,F)},sendMessage:function(e){e=JSON.stringify(e);A("Send Message","message:"+e,l[F].iframe,F)}}}}function g(t){function o(){A("iFrame.onload",t,e,n,true);u()}function i(n){if(!e.parentNode){return}var t=new n((function(n){n.forEach((function(n){var t=Array.prototype.slice.call(n.removedNodes);t.forEach((function(n){if(n===e){O(e)}}))}))}));t.observe(e.parentNode,{childList:true})}var r=h();if(r){i(r)}w(e,"load",o);A("init",t,e,n,true)}function p(e){if("object"!==typeof e){throw new TypeError("Options is not an object")}}function y(e){for(var n in b){if(Object.prototype.hasOwnProperty.call(b,n)){l[F][n]=Object.prototype.hasOwnProperty.call(e,n)?e[n]:b[n]}}}function v(e){return""===e||null!==e.match(/^(about:blank|javascript:|file:\/\/)/)?"*":e}function j(e){var n=e.split("Callback");if(n.length===2){var t="on"+n[0].charAt(0).toUpperCase()+n[0].slice(1);this[t]=this[e];delete this[e];z(F,"Deprecated: '"+e+"' has been renamed '"+t+"'. The old method will be removed in the next major version.")}}function x(n){n=n||{};l[F]=Object.create(null);l[F].iframe=e;l[F].firstRun=true;l[F].remoteHost=e.src&&e.src.split("/").slice(0,3).join("/");p(n);Object.keys(n).forEach(j,n);y(n);if(l[F]){l[F].targetOrigin=true===l[F].checkOrigin?v(l[F].remoteHost):"*"}}function M(){return F in l&&"iFrameResizer"in e}var F=a(e.id);if(M()){z(F,"Ignored iFrame, already setup.")}else{x(i);c();r();f();g(H(F));m()}}function P(e,n){if(null===m){m=setTimeout((function(){m=null;e()}),n)}}var V={};function D(e,n,t){if(!V[t]){V[t]=setTimeout((function(){V[t]=null;e()}),n)}}function $(){function e(){function e(e){function n(n){return"0px"===(l[e]&&l[e].iframe.style[n])}function t(e){return null!==e.offsetParent}if(l[e]&&t(l[e].iframe)&&(n("height")||n("width"))){A("Visibility change","resize",l[e].iframe,e)}}Object.keys(l).forEach((function(n){e(n)}))}function n(n){k("window","Mutation observed: "+n[0].target+" "+n[0].type);P(e,16)}function t(){var e=document.querySelector("body"),t={attributes:true,attributeOldValue:false,characterData:true,characterDataOldValue:false,childList:true,subtree:true},i=new o(n);i.observe(e,t)}var o=h();if(o){t()}}function U(e){function n(){B("Window "+e,"resize")}k("window","Trigger event: "+e);P(n,16)}function J(){function e(){B("Tab Visible","resize")}if("hidden"!==document.visibilityState){k("document","Trigger event: Visibility change");P(e,16)}}function B(e,n){function t(e){return l[e]&&"parent"===l[e].resizeFrom&&l[e].autoResize&&!l[e].firstRun}Object.keys(l).forEach((function(o){if(t(o)){A(e,n,l[o].iframe,o)}}))}function G(){w(window,"message",F);w(window,"resize",(function(){U("resize")}));w(document,"visibilitychange",J);w(document,"-webkit-visibilitychange",J)}function _(){function e(e,n){function t(){if(!n.tagName){throw new TypeError("Object is not a valid DOM element")}else if("IFRAME"!==n.tagName.toUpperCase()){throw new TypeError("Expected <IFRAME> tag, found <"+n.tagName+">")}}if(n){t();q(n,e);o.push(n)}}function t(e){if(e&&e.enablePublicMethods){z("enablePublicMethods option has been removed, public methods are now always available in the iFrame")}}var o;p();G();return function i(r,s){o=[];t(r);switch(typeof s){case"undefined":case"string":{Array.prototype.forEach.call(document.querySelectorAll(s||"iframe"),e.bind(n,r));break}case"object":{e(r,s);break}default:{throw new TypeError("Unexpected data type ("+typeof s+")")}}return o}}function Q(e){if(!e.fn){x("","Unable to bind to jQuery, it is not fully loaded.")}else if(!e.fn.iFrameResize){e.fn.iFrameResize=function e(n){function t(e,t){q(t,n)}return this.filter("iframe").each(t).end()}}}if(window.jQuery!==n){Q(window.jQuery)}if(typeof n==="function"&&n.amd){n([],_)}else{e.exports=_()}window.iFrameResize=window.iFrameResize||_()})()}));const c={card:{ready:"justifi.card.ready",tokenize:"justifi.card.tokenize",validate:"justifi.card.validate",resize:"justifi.card.resize",styleOverrides:"justifi.card.styleOverrides"},bankAccount:{ready:"justifi.bankAccount.ready",tokenize:"justifi.bankAccount.tokenize",validate:"justifi.bankAccount.validate",resize:"justifi.bankAccount.resize",styleOverrides:"justifi.bankAccount.styleOverrides"}};const f="@justifi/webcomponents";const u="4.7.0-rc.1";const d="JustiFi Web Components";const l="dist/index.cjs.js";const m="dist/components/index.js";const b="dist/esm/index.mjs";const h="dist/esm/index.mjs";const w="dist/types/index.d.ts";const g="dist/collection/collection-manifest.json";const p={type:"git",url:"git+https://github.com/justifi-tech/web-component-library.git"};const y={registry:"https://registry.npmjs.org"};const v=["dist/","loader/"];const j={build:"npm run build:prod","build:dev":"stencil build --docs","build:staging":"stencil build --docs","build:prod":"stencil build --docs",start:'concurrently --restart-tries 3 -c "bgBlue.bold,bgMagenta.bold,bgGreen.bold" "npm run start-stencil" "npm run storybook"',"start-stencil":"stencil build --watch",test:"stencil test --spec","test:watch":"stencil test --spec --watchAll","test:e2e":"stencil test --e2e",generate:"stencil generate",storybook:"storybook dev -p 6006 --quiet","build-storybook":"storybook build -o ../docs"};const k={"@stencil/core":"^4.0.5",bootstrap:"^5.2.3","chart.js":"^4.4.1","date-fns":"^2.29.3","dinero.js":"^1.9.1","iframe-resizer":"^4.3.7",imask:"^7.1.3",rxjs:"^7.8.1","ts-dedent":"^2.2.0",uuid:"^9.0.0",yup:"^1.0.0"};const x={"@babel/preset-env":"^7.21.5","@babel/preset-react":"^7.18.6","@babel/preset-typescript":"^7.21.5","@pxtrn/storybook-addon-docs-stencil":"^6.4.1","@stencil/angular-output-target":"^0.7.1","@stencil/react-output-target":"^0.5.3","@stencil/sass":"^3.0.1","@stencil/store":"^2.0.8","@stencil/vue-output-target":"^0.8.6","@storybook/addon-actions":"^7.0.4","@storybook/addon-essentials":"^7.0.4","@storybook/addon-interactions":"^7.0.4","@storybook/addon-links":"^7.0.4","@storybook/html":"^7.0.4","@storybook/html-webpack5":"^7.0.4","@storybook/jest":"^0.1.0","@storybook/testing-library":"^0.1.0","@types/jest":"27.0.3","@types/node":"^20.1.4","@types/react":"^18.0.37","@types/react-dom":"^18.0.11",concurrently:"^7.6.0",dotenv:"^16.3.1",jest:"^27.4.5","jest-cli":"^27.4.5",puppeteer:"^10.0.0",react:"^18.2.0","react-dom":"^18.2.0","rollup-plugin-replace":"^2.2.0",storybook:"^7.0.4"};const z="MIT";const M="507bac1d941eae6e1f56e185ecd9bc9d22637783";const F={name:f,version:u,description:d,main:l,module:m,es2015:b,es2017:h,types:w,collection:g,"collection:main":"dist/collection/index.js",repository:p,publishConfig:y,files:v,scripts:j,dependencies:k,devDependencies:x,license:z,gitHead:M};const I=()=>{const e=getComputedStyle(document.body);const n={loadGoogleFont:e.getPropertyValue("--jfi-load-google-font"),layout:{fontFamily:e.getPropertyValue("--jfi-layout-font-family"),padding:e.getPropertyValue("--jfi-layout-padding"),formControlSpacingHorizontal:e.getPropertyValue("--jfi-layout-form-control-spacing-x"),formControlSpacingVertical:e.getPropertyValue("--jfi-layout-form-control-spacing-y")},formControl:{backgroundColor:e.getPropertyValue("--jfi-form-control-background-color"),borderColor:e.getPropertyValue("--jfi-form-control-border-color"),borderColorFocus:e.getPropertyValue("--jfi-form-control-border-color-focus"),borderColorError:e.getPropertyValue("--jfi-form-control-border-color-error"),borderWidth:e.getPropertyValue("--jfi-form-control-border-width"),borderBottomWidth:e.getPropertyValue("--jfi-form-control-border-bottom-width"),borderLeftWidth:e.getPropertyValue("--jfi-form-control-border-left-width"),borderRightWidth:e.getPropertyValue("--jfi-form-control-border-right-width"),borderTopWidth:e.getPropertyValue("--jfi-form-control-border-top-width"),borderRadius:e.getPropertyValue("--jfi-form-control-border-radius"),borderStyle:e.getPropertyValue("--jfi-form-control-border-style"),boxShadow:e.getPropertyValue("--jfi-form-control-box-shadow"),boxShadowError:e.getPropertyValue("--jfi-form-control-box-shadow-error"),boxShadowErrorFocus:e.getPropertyValue("--jfi-form-control-box-shadow-error-focus"),boxShadowFocus:e.getPropertyValue("--jfi-form-control-box-shadow-focus"),color:e.getPropertyValue("--jfi-form-control-color"),colorFocus:e.getPropertyValue("--jfi-form-control-color-focus"),fontSize:e.getPropertyValue("--jfi-form-control-font-size"),fontWeight:e.getPropertyValue("--jfi-form-control-font-weight"),lineHeight:e.getPropertyValue("--jfi-form-control-line-height"),margin:e.getPropertyValue("--jfi-form-control-margin"),padding:e.getPropertyValue("--jfi-form-control-padding")},formLabel:{color:e.getPropertyValue("--jfi-form-label-color"),fontFamily:e.getPropertyValue("--jfi-form-label-font-family"),fontSize:e.getPropertyValue("--jfi-form-label-font-size"),fontWeight:e.getPropertyValue("--jfi-form-label-font-weight"),margin:e.getPropertyValue("--jfi-form-label-margin")},errorMessage:{color:e.getPropertyValue("--jfi-error-message-color"),margin:e.getPropertyValue("--jfi-error-message-margin"),fontSize:e.getPropertyValue("--jfi-error-message-font-size")}};return n};const S=":host{display:block}justifi-payment-method-form iframe{border:none;width:100%}iframe{width:1px;min-width:100%}";const O=class{constructor(t){e(this,t);this.paymentMethodFormReady=n(this,"paymentMethodFormReady",7);this.paymentMethodFormTokenize=n(this,"paymentMethodFormTokenize",7);this.computedTheme=I();this.paymentMethodFormType=undefined;this.paymentMethodFormValidationMode=undefined;this.iframeOrigin=undefined;this.singleLine=undefined}connectedCallback(){window.addEventListener("message",this.dispatchMessageEvent.bind(this))}disconnectedCallback(){window.removeEventListener("message",this.dispatchMessageEvent.bind(this))}sendStyleOverrides(){if(this.computedTheme){this.postMessage(c[this.paymentMethodFormType].styleOverrides,{styleOverrides:this.computedTheme})}}dispatchMessageEvent(e){const n=e.data;const t=n.eventType;const o=n.data;if(t===c[this.paymentMethodFormType].ready){this.paymentMethodFormReady.emit(o)}}postMessage(e,n){var t,o;(o=(t=this.iframeElement)===null||t===void 0?void 0:t.contentWindow)===null||o===void 0?void 0:o.postMessage(Object.assign({eventType:e},n),i.iframeOrigin)}async resize(){this.postMessage(c[this.paymentMethodFormType].resize)}async postMessageWithResponseListener(e,n){return new Promise((t=>{const o=n=>{if(n.data.eventType!==e)return;window.removeEventListener("message",o);t(n.data.data)};window.addEventListener("message",o);this.postMessage(e,n)}))}async tokenize(e,n,t){const o=c[this.paymentMethodFormType].tokenize;const i={clientId:e,componentVersion:F.version,paymentMethodMetadata:n,account:t};return this.postMessageWithResponseListener(o,i)}async validate(){return this.postMessageWithResponseListener(c[this.paymentMethodFormType].validate)}composeQueryParams(e){const n=e.map((n=>{if(n===e[0]){return n=`?${n}`}else{return n=`&${n}`}}));return n.join("")}getIframeSrc(){const e=i.iframeOrigin;let n=`${e}/${this.paymentMethodFormType}`;let t=[];if(this.paymentMethodFormValidationMode){t.push(`validationMode=${this.paymentMethodFormValidationMode}`)}if(this.singleLine){t.push(`singleLine=${this.singleLine}`)}return n.concat(this.composeQueryParams(t))}render(){return t(o,null,t("iframe",{id:`justifi-payment-method-form-${this.paymentMethodFormType}`,src:this.getIframeSrc(),ref:e=>{this.iframeElement=e},onLoad:()=>{a(this.iframeElement);this.sendStyleOverrides()}}))}};O.style=S;export{O as justifi_payment_method_form};
2
+ //# sourceMappingURL=p-7cde64a2.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["undefined","window","count","logEnabled","hiddenCheckEnabled","msgHeader","msgHeaderLen","length","msgId","msgIdLen","pagePosition","requestAnimationFrame","resetRequiredMethods","Object","freeze","max","scroll","bodyScroll","documentElementScroll","settings","timer","defaults","autoResize","bodyBackground","bodyMargin","bodyMarginV1","bodyPadding","checkOrigin","inPageLinks","enablePublicMethods","heightCalculationMethod","id","interval","log","maxHeight","Infinity","maxWidth","minHeight","minWidth","mouseEvents","resizeFrom","scrolling","sizeHeight","sizeWidth","warningTimeout","tolerance","widthCalculationMethod","onClose","onClosed","onInit","onMessage","warn","onMouseEnter","onMouseLeave","onResized","onScroll","getMutationObserver","MutationObserver","WebKitMutationObserver","MozMutationObserver","addEventListener","el","evt","func","removeEventListener","setupRequestAnimationFrame","vendors","x","bind","getMyID","iframeId","retStr","top","self","parentIFrame","getId","formatLogHeader","isLogEnabled","msg","output","info","type","enabled","console","iFrameListener","event","resizeIFrame","resize","setSize","messageData","setPagePosition","on","ensureInRange","syncResize","processMsg","data","slice","split","height","parseInt","iframe","compStyle","getComputedStyle","getPaddingEnds","getBorderEnds","width","boxSizing","paddingTop","bot","paddingBottom","borderTopWidth","borderBottomWidth","Dimension","Number","min","dimension","toLowerCase","size","isMessageFromIFrame","checkAllowedOrigin","checkList","i","retCode","origin","checkSingle","remoteHost","constructor","Array","Error","isMessageForUs","isMessageFromMetaParent","true","false","getMsgBody","offset","indexOf","forwardMsgFromIFrame","msgBody","message","JSON","parse","getPageInfo","bodyPosition","document","body","getBoundingClientRect","iFramePosition","stringify","iframeHeight","iframeWidth","clientHeight","Math","documentElement","innerHeight","clientWidth","innerWidth","offsetTop","offsetLeft","left","scrollTop","pageYOffset","scrollLeft","pageXOffset","documentHeight","documentWidth","windowHeight","windowWidth","sendPageInfoToIframe","debouncedTrigger","trigger","debounceFrameEvents","startPageInfoMonitor","setListener","sendPageInfo","stop","forEach","start","stopPageInfo","stopPageInfoMonitor","checkIFrameExists","retBool","getElementPosition","target","getPagePosition","floor","y","scrollRequestFromChild","addOffset","reposition","newPosition","scrollTo","calcOffset","scrollParent","unsetPagePosition","findTarget","location","jumpToTarget","jumpPosition","hash","jumpToParent","moveToAnchor","hashData","decodeURIComponent","getElementById","getElementsByName","onMouse","mousePos","screenX","screenY","funcName","val","chkEvent","actionMsg","firstRun","closeIFrame","resetIFrame","hasSettings","iFrameReadyMsgReceived","createOutgoingMsg","loaded","retVal","TypeError","removeIframeListeners","parentNode","removeChild","error","reset","setDimension","style","chkZero","fixHiddenIFrames","processDimension","doNotSync","jasmine","calleeMsg","noResponseWarning","postMessageToIFrame","targetOrigin","contentWindow","postMessage","iFrameNotFound","chkAndSend","warnOnNoResponse","warning","errorShown","msgTimeout","setTimeout","isNumber","value","setupIFrame","options","setLimits","addStyle","styleValue","chkMinMax","newId","ensureHasId","src","setScrolling","overflow","setupBodyMarginValues","checkReset","resetRequertMethod","setupIFrameObject","iFrameResizer","close","removeListeners","anchor","sendMessage","init","iFrameLoaded","createDestroyObserver","destroyObserver","mutations","mutation","removedNodes","prototype","call","removedNode","observe","childList","checkOptions","copyOptions","option","hasOwnProperty","getTargetOrigin","match","depricate","key","splitName","name","charAt","toUpperCase","this","processOptions","create","join","keys","beenHere","debouce","fn","time","frameTimer","frameId","checkIFrames","checkIFrame","settingId","chkDimension","isVisible","offsetParent","mutationObserved","createMutationObserver","querySelector","config","attributes","attributeOldValue","characterData","characterDataOldValue","subtree","observer","resizeIFrames","sendTriggerMsg","tabVisible","visibilityState","eventName","isIFrameResizeEnabled","setupEventListeners","factory","element","chkType","tagName","iFrames","push","warnDeprecatedOptions","iFrameResizeF","querySelectorAll","createJQueryPublicMethod","$","iFrameResize","$iFrameResizeF","index","filter","each","end","jQuery","define","amd","module","exports","MessageEventType","card","ready","tokenize","validate","styleOverrides","bankAccount","getComputedTheme","computedStyles","computedTheme","loadGoogleFont","getPropertyValue","layout","fontFamily","padding","formControlSpacingHorizontal","formControlSpacingVertical","formControl","backgroundColor","borderColor","borderColorFocus","borderColorError","borderWidth","borderLeftWidth","borderRightWidth","borderRadius","borderStyle","boxShadow","boxShadowError","boxShadowErrorFocus","boxShadowFocus","color","colorFocus","fontSize","fontWeight","lineHeight","margin","formLabel","errorMessage","paymentMethodFormCss","PaymentMethodForm","connectedCallback","dispatchMessageEvent","disconnectedCallback","sendStyleOverrides","paymentMethodFormType","messageEvent","messagePayload","messageType","eventType","paymentMethodFormReady","emit","payload","_b","_a","iframeElement","assign","iframeOrigin","postMessageWithResponseListener","Promise","resolve","responseListener","clientId","paymentMethodMetadata","account","componentVersion","packageJson","version","composeQueryParams","values","queryParams","map","getIframeSrc","iframeSrc","paramsList","paymentMethodFormValidationMode","singleLine","concat","render","h","Host","ref","onLoad"],"sources":["../node_modules/iframe-resizer/js/iframeResizer.js","src/components/payment-method-form/message-event-types.ts","src/components/payment-method-form/get-computed-theme.ts","src/components/payment-method-form/payment-method-form.css?tag=justifi-payment-method-form","src/components/payment-method-form/payment-method-form.tsx"],"sourcesContent":["/*\n * File: iframeResizer.js\n * Desc: Force iframes to size to content.\n * Requires: iframeResizer.contentWindow.js to be loaded into the target frame.\n * Doc: https://github.com/davidjbradshaw/iframe-resizer\n * Author: David J. Bradshaw - dave@bradshaw.net\n * Contributor: Jure Mav - jure.mav@gmail.com\n * Contributor: Reed Dadoune - reed@dadoune.com\n */\n\n// eslint-disable-next-line sonarjs/cognitive-complexity, no-shadow-restricted-names\n;(function (undefined) {\n if (typeof window === 'undefined') return // don't run for server side render\n\n var count = 0,\n logEnabled = false,\n hiddenCheckEnabled = false,\n msgHeader = 'message',\n msgHeaderLen = msgHeader.length,\n msgId = '[iFrameSizer]', // Must match iframe msg ID\n msgIdLen = msgId.length,\n pagePosition = null,\n requestAnimationFrame = window.requestAnimationFrame,\n resetRequiredMethods = Object.freeze({\n max: 1,\n scroll: 1,\n bodyScroll: 1,\n documentElementScroll: 1\n }),\n settings = {},\n timer = null,\n defaults = Object.freeze({\n autoResize: true,\n bodyBackground: null,\n bodyMargin: null,\n bodyMarginV1: 8,\n bodyPadding: null,\n checkOrigin: true,\n inPageLinks: false,\n enablePublicMethods: true,\n heightCalculationMethod: 'bodyOffset',\n id: 'iFrameResizer',\n interval: 32,\n log: false,\n maxHeight: Infinity,\n maxWidth: Infinity,\n minHeight: 0,\n minWidth: 0,\n mouseEvents: true,\n resizeFrom: 'parent',\n scrolling: false,\n sizeHeight: true,\n sizeWidth: false,\n warningTimeout: 5000,\n tolerance: 0,\n widthCalculationMethod: 'scroll',\n onClose: function () {\n return true\n },\n onClosed: function () {},\n onInit: function () {},\n onMessage: function () {\n warn('onMessage function not defined')\n },\n onMouseEnter: function () {},\n onMouseLeave: function () {},\n onResized: function () {},\n onScroll: function () {\n return true\n }\n })\n\n function getMutationObserver() {\n return (\n window.MutationObserver ||\n window.WebKitMutationObserver ||\n window.MozMutationObserver\n )\n }\n\n function addEventListener(el, evt, func) {\n el.addEventListener(evt, func, false)\n }\n\n function removeEventListener(el, evt, func) {\n el.removeEventListener(evt, func, false)\n }\n\n function setupRequestAnimationFrame() {\n var vendors = ['moz', 'webkit', 'o', 'ms']\n var x\n\n // Remove vendor prefixing if prefixed and break early if not\n for (x = 0; x < vendors.length && !requestAnimationFrame; x += 1) {\n requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame']\n }\n\n if (requestAnimationFrame) {\n // Firefox extension content-scripts have a globalThis object that is not the same as window.\n // Binding `requestAnimationFrame` to window allows the function to work and prevents errors\n // being thrown when run in that context, and should be a no-op in every other context.\n requestAnimationFrame = requestAnimationFrame.bind(window)\n } else {\n log('setup', 'RequestAnimationFrame not supported')\n }\n }\n\n function getMyID(iframeId) {\n var retStr = 'Host page: ' + iframeId\n\n if (window.top !== window.self) {\n retStr =\n window.parentIFrame && window.parentIFrame.getId\n ? window.parentIFrame.getId() + ': ' + iframeId\n : 'Nested host page: ' + iframeId\n }\n\n return retStr\n }\n\n function formatLogHeader(iframeId) {\n return msgId + '[' + getMyID(iframeId) + ']'\n }\n\n function isLogEnabled(iframeId) {\n return settings[iframeId] ? settings[iframeId].log : logEnabled\n }\n\n function log(iframeId, msg) {\n output('log', iframeId, msg, isLogEnabled(iframeId))\n }\n\n function info(iframeId, msg) {\n output('info', iframeId, msg, isLogEnabled(iframeId))\n }\n\n function warn(iframeId, msg) {\n output('warn', iframeId, msg, true)\n }\n\n function output(type, iframeId, msg, enabled) {\n if (true === enabled && 'object' === typeof window.console) {\n // eslint-disable-next-line no-console\n console[type](formatLogHeader(iframeId), msg)\n }\n }\n\n function iFrameListener(event) {\n function resizeIFrame() {\n function resize() {\n setSize(messageData)\n setPagePosition(iframeId)\n on('onResized', messageData)\n }\n\n ensureInRange('Height')\n ensureInRange('Width')\n\n syncResize(resize, messageData, 'init')\n }\n\n function processMsg() {\n var data = msg.slice(msgIdLen).split(':')\n var height = data[1] ? parseInt(data[1], 10) : 0\n var iframe = settings[data[0]] && settings[data[0]].iframe\n var compStyle = getComputedStyle(iframe)\n\n return {\n iframe: iframe,\n id: data[0],\n height: height + getPaddingEnds(compStyle) + getBorderEnds(compStyle),\n width: data[2],\n type: data[3]\n }\n }\n\n function getPaddingEnds(compStyle) {\n if (compStyle.boxSizing !== 'border-box') {\n return 0\n }\n var top = compStyle.paddingTop ? parseInt(compStyle.paddingTop, 10) : 0\n var bot = compStyle.paddingBottom\n ? parseInt(compStyle.paddingBottom, 10)\n : 0\n return top + bot\n }\n\n function getBorderEnds(compStyle) {\n if (compStyle.boxSizing !== 'border-box') {\n return 0\n }\n var top = compStyle.borderTopWidth\n ? parseInt(compStyle.borderTopWidth, 10)\n : 0\n var bot = compStyle.borderBottomWidth\n ? parseInt(compStyle.borderBottomWidth, 10)\n : 0\n return top + bot\n }\n\n function ensureInRange(Dimension) {\n var max = Number(settings[iframeId]['max' + Dimension]),\n min = Number(settings[iframeId]['min' + Dimension]),\n dimension = Dimension.toLowerCase(),\n size = Number(messageData[dimension])\n\n log(iframeId, 'Checking ' + dimension + ' is in range ' + min + '-' + max)\n\n if (size < min) {\n size = min\n log(iframeId, 'Set ' + dimension + ' to min value')\n }\n\n if (size > max) {\n size = max\n log(iframeId, 'Set ' + dimension + ' to max value')\n }\n\n messageData[dimension] = '' + size\n }\n\n function isMessageFromIFrame() {\n function checkAllowedOrigin() {\n function checkList() {\n var i = 0,\n retCode = false\n\n log(\n iframeId,\n 'Checking connection is from allowed list of origins: ' +\n checkOrigin\n )\n\n for (; i < checkOrigin.length; i++) {\n if (checkOrigin[i] === origin) {\n retCode = true\n break\n }\n }\n return retCode\n }\n\n function checkSingle() {\n var remoteHost = settings[iframeId] && settings[iframeId].remoteHost\n log(iframeId, 'Checking connection is from: ' + remoteHost)\n return origin === remoteHost\n }\n\n return checkOrigin.constructor === Array ? checkList() : checkSingle()\n }\n\n var origin = event.origin,\n checkOrigin = settings[iframeId] && settings[iframeId].checkOrigin\n\n if (checkOrigin && '' + origin !== 'null' && !checkAllowedOrigin()) {\n throw new Error(\n 'Unexpected message received from: ' +\n origin +\n ' for ' +\n messageData.iframe.id +\n '. Message was: ' +\n event.data +\n '. This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.'\n )\n }\n\n return true\n }\n\n function isMessageForUs() {\n return (\n msgId === ('' + msg).slice(0, msgIdLen) &&\n msg.slice(msgIdLen).split(':')[0] in settings\n ) // ''+Protects against non-string msg\n }\n\n function isMessageFromMetaParent() {\n // Test if this message is from a parent above us. This is an ugly test, however, updating\n // the message format would break backwards compatibility.\n var retCode = messageData.type in { true: 1, false: 1, undefined: 1 }\n\n if (retCode) {\n log(iframeId, 'Ignoring init message from meta parent page')\n }\n\n return retCode\n }\n\n function getMsgBody(offset) {\n return msg.slice(msg.indexOf(':') + msgHeaderLen + offset)\n }\n\n function forwardMsgFromIFrame(msgBody) {\n log(\n iframeId,\n 'onMessage passed: {iframe: ' +\n messageData.iframe.id +\n ', message: ' +\n msgBody +\n '}'\n )\n\n on('onMessage', {\n iframe: messageData.iframe,\n message: JSON.parse(msgBody)\n })\n\n log(iframeId, '--')\n }\n\n function getPageInfo() {\n var bodyPosition = document.body.getBoundingClientRect(),\n iFramePosition = messageData.iframe.getBoundingClientRect()\n\n return JSON.stringify({\n iframeHeight: iFramePosition.height,\n iframeWidth: iFramePosition.width,\n clientHeight: Math.max(\n document.documentElement.clientHeight,\n window.innerHeight || 0\n ),\n clientWidth: Math.max(\n document.documentElement.clientWidth,\n window.innerWidth || 0\n ),\n offsetTop: parseInt(iFramePosition.top - bodyPosition.top, 10),\n offsetLeft: parseInt(iFramePosition.left - bodyPosition.left, 10),\n scrollTop: window.pageYOffset,\n scrollLeft: window.pageXOffset,\n documentHeight: document.documentElement.clientHeight,\n documentWidth: document.documentElement.clientWidth,\n windowHeight: window.innerHeight,\n windowWidth: window.innerWidth\n })\n }\n\n function sendPageInfoToIframe(iframe, iframeId) {\n function debouncedTrigger() {\n trigger('Send Page Info', 'pageInfo:' + getPageInfo(), iframe, iframeId)\n }\n debounceFrameEvents(debouncedTrigger, 32, iframeId)\n }\n\n function startPageInfoMonitor() {\n function setListener(type, func) {\n function sendPageInfo() {\n if (settings[id]) {\n sendPageInfoToIframe(settings[id].iframe, id)\n } else {\n stop()\n }\n }\n\n ;['scroll', 'resize'].forEach(function (evt) {\n log(id, type + evt + ' listener for sendPageInfo')\n func(window, evt, sendPageInfo)\n })\n }\n\n function stop() {\n setListener('Remove ', removeEventListener)\n }\n\n function start() {\n setListener('Add ', addEventListener)\n }\n\n var id = iframeId // Create locally scoped copy of iFrame ID\n\n start()\n\n if (settings[id]) {\n settings[id].stopPageInfo = stop\n }\n }\n\n function stopPageInfoMonitor() {\n if (settings[iframeId] && settings[iframeId].stopPageInfo) {\n settings[iframeId].stopPageInfo()\n delete settings[iframeId].stopPageInfo\n }\n }\n\n function checkIFrameExists() {\n var retBool = true\n\n if (null === messageData.iframe) {\n warn(iframeId, 'IFrame (' + messageData.id + ') not found')\n retBool = false\n }\n return retBool\n }\n\n function getElementPosition(target) {\n var iFramePosition = target.getBoundingClientRect()\n\n getPagePosition(iframeId)\n\n return {\n x: Math.floor(Number(iFramePosition.left) + Number(pagePosition.x)),\n y: Math.floor(Number(iFramePosition.top) + Number(pagePosition.y))\n }\n }\n\n function scrollRequestFromChild(addOffset) {\n /* istanbul ignore next */ // Not testable in Karma\n function reposition() {\n pagePosition = newPosition\n scrollTo()\n log(iframeId, '--')\n }\n\n function calcOffset() {\n return {\n x: Number(messageData.width) + offset.x,\n y: Number(messageData.height) + offset.y\n }\n }\n\n function scrollParent() {\n if (window.parentIFrame) {\n window.parentIFrame['scrollTo' + (addOffset ? 'Offset' : '')](\n newPosition.x,\n newPosition.y\n )\n } else {\n warn(\n iframeId,\n 'Unable to scroll to requested position, window.parentIFrame not found'\n )\n }\n }\n\n var offset = addOffset\n ? getElementPosition(messageData.iframe)\n : { x: 0, y: 0 },\n newPosition = calcOffset()\n\n log(\n iframeId,\n 'Reposition requested from iFrame (offset x:' +\n offset.x +\n ' y:' +\n offset.y +\n ')'\n )\n\n if (window.top === window.self) {\n reposition()\n } else {\n scrollParent()\n }\n }\n\n function scrollTo() {\n if (false === on('onScroll', pagePosition)) {\n unsetPagePosition()\n } else {\n setPagePosition(iframeId)\n }\n }\n\n function findTarget(location) {\n function jumpToTarget() {\n var jumpPosition = getElementPosition(target)\n\n log(\n iframeId,\n 'Moving to in page link (#' +\n hash +\n ') at x: ' +\n jumpPosition.x +\n ' y: ' +\n jumpPosition.y\n )\n pagePosition = {\n x: jumpPosition.x,\n y: jumpPosition.y\n }\n\n scrollTo()\n log(iframeId, '--')\n }\n\n function jumpToParent() {\n if (window.parentIFrame) {\n window.parentIFrame.moveToAnchor(hash)\n } else {\n log(\n iframeId,\n 'In page link #' +\n hash +\n ' not found and window.parentIFrame not found'\n )\n }\n }\n\n var hash = location.split('#')[1] || '',\n hashData = decodeURIComponent(hash),\n target =\n document.getElementById(hashData) ||\n document.getElementsByName(hashData)[0]\n\n if (target) {\n jumpToTarget()\n } else if (window.top === window.self) {\n log(iframeId, 'In page link #' + hash + ' not found')\n } else {\n jumpToParent()\n }\n }\n\n function onMouse(event) {\n var mousePos = {}\n\n if (Number(messageData.width) === 0 && Number(messageData.height) === 0) {\n var data = getMsgBody(9).split(':')\n mousePos = {\n x: data[1],\n y: data[0]\n }\n } else {\n mousePos = {\n x: messageData.width,\n y: messageData.height\n }\n }\n\n on(event, {\n iframe: messageData.iframe,\n screenX: Number(mousePos.x),\n screenY: Number(mousePos.y),\n type: messageData.type\n })\n }\n\n function on(funcName, val) {\n return chkEvent(iframeId, funcName, val)\n }\n\n function actionMsg() {\n if (settings[iframeId] && settings[iframeId].firstRun) firstRun()\n\n switch (messageData.type) {\n case 'close': {\n closeIFrame(messageData.iframe)\n break\n }\n\n case 'message': {\n forwardMsgFromIFrame(getMsgBody(6))\n break\n }\n\n case 'mouseenter': {\n onMouse('onMouseEnter')\n break\n }\n\n case 'mouseleave': {\n onMouse('onMouseLeave')\n break\n }\n\n case 'autoResize': {\n settings[iframeId].autoResize = JSON.parse(getMsgBody(9))\n break\n }\n\n case 'scrollTo': {\n scrollRequestFromChild(false)\n break\n }\n\n case 'scrollToOffset': {\n scrollRequestFromChild(true)\n break\n }\n\n case 'pageInfo': {\n sendPageInfoToIframe(\n settings[iframeId] && settings[iframeId].iframe,\n iframeId\n )\n startPageInfoMonitor()\n break\n }\n\n case 'pageInfoStop': {\n stopPageInfoMonitor()\n break\n }\n\n case 'inPageLink': {\n findTarget(getMsgBody(9))\n break\n }\n\n case 'reset': {\n resetIFrame(messageData)\n break\n }\n\n case 'init': {\n resizeIFrame()\n on('onInit', messageData.iframe)\n break\n }\n\n default: {\n if (\n Number(messageData.width) === 0 &&\n Number(messageData.height) === 0\n ) {\n warn(\n 'Unsupported message received (' +\n messageData.type +\n '), this is likely due to the iframe containing a later ' +\n 'version of iframe-resizer than the parent page'\n )\n } else {\n resizeIFrame()\n }\n }\n }\n }\n\n function hasSettings(iframeId) {\n var retBool = true\n\n if (!settings[iframeId]) {\n retBool = false\n warn(\n messageData.type +\n ' No settings for ' +\n iframeId +\n '. Message was: ' +\n msg\n )\n }\n\n return retBool\n }\n\n function iFrameReadyMsgReceived() {\n // eslint-disable-next-line no-restricted-syntax, guard-for-in\n for (var iframeId in settings) {\n trigger(\n 'iFrame requested init',\n createOutgoingMsg(iframeId),\n settings[iframeId].iframe,\n iframeId\n )\n }\n }\n\n function firstRun() {\n if (settings[iframeId]) {\n settings[iframeId].firstRun = false\n }\n }\n\n var msg = event.data,\n messageData = {},\n iframeId = null\n\n if ('[iFrameResizerChild]Ready' === msg) {\n iFrameReadyMsgReceived()\n } else if (isMessageForUs()) {\n messageData = processMsg()\n iframeId = messageData.id\n if (settings[iframeId]) {\n settings[iframeId].loaded = true\n }\n\n if (!isMessageFromMetaParent() && hasSettings(iframeId)) {\n log(iframeId, 'Received: ' + msg)\n\n if (checkIFrameExists() && isMessageFromIFrame()) {\n actionMsg()\n }\n }\n } else {\n info(iframeId, 'Ignored: ' + msg)\n }\n }\n\n function chkEvent(iframeId, funcName, val) {\n var func = null,\n retVal = null\n\n if (settings[iframeId]) {\n func = settings[iframeId][funcName]\n\n if ('function' === typeof func) {\n retVal = func(val)\n } else {\n throw new TypeError(\n funcName + ' on iFrame[' + iframeId + '] is not a function'\n )\n }\n }\n\n return retVal\n }\n\n function removeIframeListeners(iframe) {\n var iframeId = iframe.id\n delete settings[iframeId]\n }\n\n function closeIFrame(iframe) {\n var iframeId = iframe.id\n if (chkEvent(iframeId, 'onClose', iframeId) === false) {\n log(iframeId, 'Close iframe cancelled by onClose event')\n return\n }\n log(iframeId, 'Removing iFrame: ' + iframeId)\n\n try {\n // Catch race condition error with React\n if (iframe.parentNode) {\n iframe.parentNode.removeChild(iframe)\n }\n } catch (error) {\n warn(error)\n }\n\n chkEvent(iframeId, 'onClosed', iframeId)\n log(iframeId, '--')\n removeIframeListeners(iframe)\n }\n\n function getPagePosition(iframeId) {\n if (null === pagePosition) {\n pagePosition = {\n x:\n window.pageXOffset === undefined\n ? document.documentElement.scrollLeft\n : window.pageXOffset,\n y:\n window.pageYOffset === undefined\n ? document.documentElement.scrollTop\n : window.pageYOffset\n }\n log(\n iframeId,\n 'Get page position: ' + pagePosition.x + ',' + pagePosition.y\n )\n }\n }\n\n function setPagePosition(iframeId) {\n if (null !== pagePosition) {\n window.scrollTo(pagePosition.x, pagePosition.y)\n log(\n iframeId,\n 'Set page position: ' + pagePosition.x + ',' + pagePosition.y\n )\n unsetPagePosition()\n }\n }\n\n function unsetPagePosition() {\n pagePosition = null\n }\n\n function resetIFrame(messageData) {\n function reset() {\n setSize(messageData)\n trigger('reset', 'reset', messageData.iframe, messageData.id)\n }\n\n log(\n messageData.id,\n 'Size reset requested by ' +\n ('init' === messageData.type ? 'host page' : 'iFrame')\n )\n getPagePosition(messageData.id)\n syncResize(reset, messageData, 'reset')\n }\n\n function setSize(messageData) {\n function setDimension(dimension) {\n if (!messageData.id) {\n log('undefined', 'messageData id not set')\n return\n }\n messageData.iframe.style[dimension] = messageData[dimension] + 'px'\n log(\n messageData.id,\n 'IFrame (' +\n iframeId +\n ') ' +\n dimension +\n ' set to ' +\n messageData[dimension] +\n 'px'\n )\n }\n\n function chkZero(dimension) {\n // FireFox sets dimension of hidden iFrames to zero.\n // So if we detect that set up an event to check for\n // when iFrame becomes visible.\n\n /* istanbul ignore next */ // Not testable in PhantomJS\n if (!hiddenCheckEnabled && '0' === messageData[dimension]) {\n hiddenCheckEnabled = true\n log(iframeId, 'Hidden iFrame detected, creating visibility listener')\n fixHiddenIFrames()\n }\n }\n\n function processDimension(dimension) {\n setDimension(dimension)\n chkZero(dimension)\n }\n\n var iframeId = messageData.iframe.id\n\n if (settings[iframeId]) {\n if (settings[iframeId].sizeHeight) {\n processDimension('height')\n }\n if (settings[iframeId].sizeWidth) {\n processDimension('width')\n }\n }\n }\n\n function syncResize(func, messageData, doNotSync) {\n /* istanbul ignore if */ // Not testable in PhantomJS\n if (\n doNotSync !== messageData.type &&\n requestAnimationFrame &&\n // including check for jasmine because had trouble getting spy to work in unit test using requestAnimationFrame\n !window.jasmine\n ) {\n log(messageData.id, 'Requesting animation frame')\n requestAnimationFrame(func)\n } else {\n func()\n }\n }\n\n function trigger(calleeMsg, msg, iframe, id, noResponseWarning) {\n function postMessageToIFrame() {\n var target = settings[id] && settings[id].targetOrigin\n log(\n id,\n '[' +\n calleeMsg +\n '] Sending msg to iframe[' +\n id +\n '] (' +\n msg +\n ') targetOrigin: ' +\n target\n )\n iframe.contentWindow.postMessage(msgId + msg, target)\n }\n\n function iFrameNotFound() {\n warn(id, '[' + calleeMsg + '] IFrame(' + id + ') not found')\n }\n\n function chkAndSend() {\n if (\n iframe &&\n 'contentWindow' in iframe &&\n null !== iframe.contentWindow\n ) {\n // Null test for PhantomJS\n postMessageToIFrame()\n } else {\n iFrameNotFound()\n }\n }\n\n function warnOnNoResponse() {\n function warning() {\n if (settings[id] && !settings[id].loaded && !errorShown) {\n errorShown = true\n warn(\n id,\n 'IFrame has not responded within ' +\n settings[id].warningTimeout / 1000 +\n ' 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.'\n )\n }\n }\n\n if (\n !!noResponseWarning &&\n settings[id] &&\n !!settings[id].warningTimeout\n ) {\n settings[id].msgTimeout = setTimeout(\n warning,\n settings[id].warningTimeout\n )\n }\n }\n\n var errorShown = false\n\n id = id || iframe.id\n\n if (settings[id]) {\n chkAndSend()\n warnOnNoResponse()\n }\n }\n\n function createOutgoingMsg(iframeId) {\n return (\n iframeId +\n ':' +\n settings[iframeId].bodyMarginV1 +\n ':' +\n settings[iframeId].sizeWidth +\n ':' +\n settings[iframeId].log +\n ':' +\n settings[iframeId].interval +\n ':' +\n settings[iframeId].enablePublicMethods +\n ':' +\n settings[iframeId].autoResize +\n ':' +\n settings[iframeId].bodyMargin +\n ':' +\n settings[iframeId].heightCalculationMethod +\n ':' +\n settings[iframeId].bodyBackground +\n ':' +\n settings[iframeId].bodyPadding +\n ':' +\n settings[iframeId].tolerance +\n ':' +\n settings[iframeId].inPageLinks +\n ':' +\n settings[iframeId].resizeFrom +\n ':' +\n settings[iframeId].widthCalculationMethod +\n ':' +\n settings[iframeId].mouseEvents\n )\n }\n\n function isNumber(value) {\n return typeof value === 'number'\n }\n\n function setupIFrame(iframe, options) {\n function setLimits() {\n function addStyle(style) {\n var styleValue = settings[iframeId][style]\n if (Infinity !== styleValue && 0 !== styleValue) {\n iframe.style[style] = isNumber(styleValue)\n ? styleValue + 'px'\n : styleValue\n log(iframeId, 'Set ' + style + ' = ' + iframe.style[style])\n }\n }\n\n function chkMinMax(dimension) {\n if (\n settings[iframeId]['min' + dimension] >\n settings[iframeId]['max' + dimension]\n ) {\n throw new Error(\n 'Value for min' +\n dimension +\n ' can not be greater than max' +\n dimension\n )\n }\n }\n\n chkMinMax('Height')\n chkMinMax('Width')\n\n addStyle('maxHeight')\n addStyle('minHeight')\n addStyle('maxWidth')\n addStyle('minWidth')\n }\n\n function newId() {\n var id = (options && options.id) || defaults.id + count++\n if (null !== document.getElementById(id)) {\n id += count++\n }\n return id\n }\n\n function ensureHasId(iframeId) {\n if (typeof iframeId !== 'string') {\n throw new TypeError('Invaild id for iFrame. Expected String')\n }\n\n if ('' === iframeId) {\n // eslint-disable-next-line no-multi-assign\n iframe.id = iframeId = newId()\n logEnabled = (options || {}).log\n log(\n iframeId,\n 'Added missing iframe ID: ' + iframeId + ' (' + iframe.src + ')'\n )\n }\n\n return iframeId\n }\n\n function setScrolling() {\n log(\n iframeId,\n 'IFrame scrolling ' +\n (settings[iframeId] && settings[iframeId].scrolling\n ? 'enabled'\n : 'disabled') +\n ' for ' +\n iframeId\n )\n iframe.style.overflow =\n false === (settings[iframeId] && settings[iframeId].scrolling)\n ? 'hidden'\n : 'auto'\n switch (settings[iframeId] && settings[iframeId].scrolling) {\n case 'omit': {\n break\n }\n\n case true: {\n iframe.scrolling = 'yes'\n break\n }\n\n case false: {\n iframe.scrolling = 'no'\n break\n }\n\n default: {\n iframe.scrolling = settings[iframeId]\n ? settings[iframeId].scrolling\n : 'no'\n }\n }\n }\n\n // The V1 iFrame script expects an int, where as in V2 expects a CSS\n // string value such as '1px 3em', so if we have an int for V2, set V1=V2\n // and then convert V2 to a string PX value.\n function setupBodyMarginValues() {\n if (\n 'number' ===\n typeof (settings[iframeId] && settings[iframeId].bodyMargin) ||\n '0' === (settings[iframeId] && settings[iframeId].bodyMargin)\n ) {\n settings[iframeId].bodyMarginV1 = settings[iframeId].bodyMargin\n settings[iframeId].bodyMargin =\n '' + settings[iframeId].bodyMargin + 'px'\n }\n }\n\n function checkReset() {\n // Reduce scope of firstRun to function, because IE8's JS execution\n // context stack is borked and this value gets externally\n // changed midway through running this function!!!\n var firstRun = settings[iframeId] && settings[iframeId].firstRun,\n resetRequertMethod =\n settings[iframeId] &&\n settings[iframeId].heightCalculationMethod in resetRequiredMethods\n\n if (!firstRun && resetRequertMethod) {\n resetIFrame({ iframe: iframe, height: 0, width: 0, type: 'init' })\n }\n }\n\n function setupIFrameObject() {\n if (settings[iframeId]) {\n settings[iframeId].iframe.iFrameResizer = {\n close: closeIFrame.bind(null, settings[iframeId].iframe),\n\n removeListeners: removeIframeListeners.bind(\n null,\n settings[iframeId].iframe\n ),\n\n resize: trigger.bind(\n null,\n 'Window resize',\n 'resize',\n settings[iframeId].iframe\n ),\n\n moveToAnchor: function (anchor) {\n trigger(\n 'Move to anchor',\n 'moveToAnchor:' + anchor,\n settings[iframeId].iframe,\n iframeId\n )\n },\n\n sendMessage: function (message) {\n message = JSON.stringify(message)\n trigger(\n 'Send Message',\n 'message:' + message,\n settings[iframeId].iframe,\n iframeId\n )\n }\n }\n }\n }\n\n // We have to call trigger twice, as we can not be sure if all\n // iframes have completed loading when this code runs. The\n // event listener also catches the page changing in the iFrame.\n function init(msg) {\n function iFrameLoaded() {\n trigger('iFrame.onload', msg, iframe, undefined, true)\n checkReset()\n }\n\n function createDestroyObserver(MutationObserver) {\n if (!iframe.parentNode) {\n return\n }\n\n var destroyObserver = new MutationObserver(function (mutations) {\n mutations.forEach(function (mutation) {\n var removedNodes = Array.prototype.slice.call(mutation.removedNodes) // Transform NodeList into an Array\n removedNodes.forEach(function (removedNode) {\n if (removedNode === iframe) {\n closeIFrame(iframe)\n }\n })\n })\n })\n destroyObserver.observe(iframe.parentNode, {\n childList: true\n })\n }\n\n var MutationObserver = getMutationObserver()\n if (MutationObserver) {\n createDestroyObserver(MutationObserver)\n }\n\n addEventListener(iframe, 'load', iFrameLoaded)\n trigger('init', msg, iframe, undefined, true)\n }\n\n function checkOptions(options) {\n if ('object' !== typeof options) {\n throw new TypeError('Options is not an object')\n }\n }\n\n function copyOptions(options) {\n // eslint-disable-next-line no-restricted-syntax\n for (var option in defaults) {\n if (Object.prototype.hasOwnProperty.call(defaults, option)) {\n settings[iframeId][option] = Object.prototype.hasOwnProperty.call(\n options,\n option\n )\n ? options[option]\n : defaults[option]\n }\n }\n }\n\n function getTargetOrigin(remoteHost) {\n return '' === remoteHost ||\n null !== remoteHost.match(/^(about:blank|javascript:|file:\\/\\/)/)\n ? '*'\n : remoteHost\n }\n\n function depricate(key) {\n var splitName = key.split('Callback')\n\n if (splitName.length === 2) {\n var name =\n 'on' + splitName[0].charAt(0).toUpperCase() + splitName[0].slice(1)\n this[name] = this[key]\n delete this[key]\n warn(\n iframeId,\n \"Deprecated: '\" +\n key +\n \"' has been renamed '\" +\n name +\n \"'. The old method will be removed in the next major version.\"\n )\n }\n }\n\n function processOptions(options) {\n options = options || {}\n\n settings[iframeId] = Object.create(null) // Protect against prototype attacks\n settings[iframeId].iframe = iframe\n settings[iframeId].firstRun = true\n settings[iframeId].remoteHost =\n iframe.src && iframe.src.split('/').slice(0, 3).join('/')\n\n checkOptions(options)\n Object.keys(options).forEach(depricate, options)\n copyOptions(options)\n\n if (settings[iframeId]) {\n settings[iframeId].targetOrigin =\n true === settings[iframeId].checkOrigin\n ? getTargetOrigin(settings[iframeId].remoteHost)\n : '*'\n }\n }\n\n function beenHere() {\n return iframeId in settings && 'iFrameResizer' in iframe\n }\n\n var iframeId = ensureHasId(iframe.id)\n\n if (beenHere()) {\n warn(iframeId, 'Ignored iFrame, already setup.')\n } else {\n processOptions(options)\n setScrolling()\n setLimits()\n setupBodyMarginValues()\n init(createOutgoingMsg(iframeId))\n setupIFrameObject()\n }\n }\n\n function debouce(fn, time) {\n if (null === timer) {\n timer = setTimeout(function () {\n timer = null\n fn()\n }, time)\n }\n }\n\n var frameTimer = {}\n function debounceFrameEvents(fn, time, frameId) {\n if (!frameTimer[frameId]) {\n frameTimer[frameId] = setTimeout(function () {\n frameTimer[frameId] = null\n fn()\n }, time)\n }\n }\n\n // Not testable in PhantomJS\n /* istanbul ignore next */\n\n function fixHiddenIFrames() {\n function checkIFrames() {\n function checkIFrame(settingId) {\n function chkDimension(dimension) {\n return (\n '0px' ===\n (settings[settingId] && settings[settingId].iframe.style[dimension])\n )\n }\n\n function isVisible(el) {\n return null !== el.offsetParent\n }\n\n if (\n settings[settingId] &&\n isVisible(settings[settingId].iframe) &&\n (chkDimension('height') || chkDimension('width'))\n ) {\n trigger(\n 'Visibility change',\n 'resize',\n settings[settingId].iframe,\n settingId\n )\n }\n }\n\n Object.keys(settings).forEach(function (key) {\n checkIFrame(key)\n })\n }\n\n function mutationObserved(mutations) {\n log(\n 'window',\n 'Mutation observed: ' + mutations[0].target + ' ' + mutations[0].type\n )\n debouce(checkIFrames, 16)\n }\n\n function createMutationObserver() {\n var target = document.querySelector('body'),\n config = {\n attributes: true,\n attributeOldValue: false,\n characterData: true,\n characterDataOldValue: false,\n childList: true,\n subtree: true\n },\n observer = new MutationObserver(mutationObserved)\n\n observer.observe(target, config)\n }\n\n var MutationObserver = getMutationObserver()\n if (MutationObserver) {\n createMutationObserver()\n }\n }\n\n function resizeIFrames(event) {\n function resize() {\n sendTriggerMsg('Window ' + event, 'resize')\n }\n\n log('window', 'Trigger event: ' + event)\n debouce(resize, 16)\n }\n\n // Not testable in PhantomJS\n /* istanbul ignore next */\n function tabVisible() {\n function resize() {\n sendTriggerMsg('Tab Visible', 'resize')\n }\n\n if ('hidden' !== document.visibilityState) {\n log('document', 'Trigger event: Visibility change')\n debouce(resize, 16)\n }\n }\n\n function sendTriggerMsg(eventName, event) {\n function isIFrameResizeEnabled(iframeId) {\n return (\n settings[iframeId] &&\n 'parent' === settings[iframeId].resizeFrom &&\n settings[iframeId].autoResize &&\n !settings[iframeId].firstRun\n )\n }\n\n Object.keys(settings).forEach(function (iframeId) {\n if (isIFrameResizeEnabled(iframeId)) {\n trigger(eventName, event, settings[iframeId].iframe, iframeId)\n }\n })\n }\n\n function setupEventListeners() {\n addEventListener(window, 'message', iFrameListener)\n\n addEventListener(window, 'resize', function () {\n resizeIFrames('resize')\n })\n\n addEventListener(document, 'visibilitychange', tabVisible)\n\n addEventListener(document, '-webkit-visibilitychange', tabVisible)\n }\n\n function factory() {\n function init(options, element) {\n function chkType() {\n if (!element.tagName) {\n throw new TypeError('Object is not a valid DOM element')\n } else if ('IFRAME' !== element.tagName.toUpperCase()) {\n throw new TypeError(\n 'Expected <IFRAME> tag, found <' + element.tagName + '>'\n )\n }\n }\n\n if (element) {\n chkType()\n setupIFrame(element, options)\n iFrames.push(element)\n }\n }\n\n function warnDeprecatedOptions(options) {\n if (options && options.enablePublicMethods) {\n warn(\n 'enablePublicMethods option has been removed, public methods are now always available in the iFrame'\n )\n }\n }\n\n var iFrames\n\n setupRequestAnimationFrame()\n setupEventListeners()\n\n return function iFrameResizeF(options, target) {\n iFrames = [] // Only return iFrames past in on this call\n\n warnDeprecatedOptions(options)\n\n switch (typeof target) {\n case 'undefined':\n case 'string': {\n Array.prototype.forEach.call(\n document.querySelectorAll(target || 'iframe'),\n init.bind(undefined, options)\n )\n break\n }\n\n case 'object': {\n init(options, target)\n break\n }\n\n default: {\n throw new TypeError('Unexpected data type (' + typeof target + ')')\n }\n }\n\n return iFrames\n }\n }\n\n function createJQueryPublicMethod($) {\n if (!$.fn) {\n info('', 'Unable to bind to jQuery, it is not fully loaded.')\n } else if (!$.fn.iFrameResize) {\n $.fn.iFrameResize = function $iFrameResizeF(options) {\n function init(index, element) {\n setupIFrame(element, options)\n }\n\n return this.filter('iframe').each(init).end()\n }\n }\n }\n\n if (window.jQuery !== undefined) {\n createJQueryPublicMethod(window.jQuery)\n }\n\n if (typeof define === 'function' && define.amd) {\n define([], factory)\n } else if (typeof module === 'object' && typeof module.exports === 'object') {\n // Node for browserfy\n module.exports = factory()\n }\n window.iFrameResize = window.iFrameResize || factory()\n})()\n","export const MessageEventType = {\n card: {\n ready: 'justifi.card.ready',\n tokenize: 'justifi.card.tokenize',\n validate: 'justifi.card.validate',\n resize: 'justifi.card.resize',\n styleOverrides: 'justifi.card.styleOverrides',\n },\n bankAccount: {\n ready: 'justifi.bankAccount.ready',\n tokenize: 'justifi.bankAccount.tokenize',\n validate: 'justifi.bankAccount.validate',\n resize: 'justifi.bankAccount.resize',\n styleOverrides: 'justifi.bankAccount.styleOverrides',\n },\n};\n","import { Theme } from './theme';\n\nconst getComputedTheme = () => {\n const computedStyles = getComputedStyle(document.body);\n\n const computedTheme: Theme = {\n loadGoogleFont: computedStyles.getPropertyValue('--jfi-load-google-font'),\n layout: {\n fontFamily: computedStyles.getPropertyValue('--jfi-layout-font-family'),\n padding: computedStyles.getPropertyValue('--jfi-layout-padding'),\n formControlSpacingHorizontal: computedStyles.getPropertyValue('--jfi-layout-form-control-spacing-x'),\n formControlSpacingVertical: computedStyles.getPropertyValue('--jfi-layout-form-control-spacing-y'),\n },\n formControl: {\n backgroundColor: computedStyles.getPropertyValue('--jfi-form-control-background-color'),\n borderColor: computedStyles.getPropertyValue('--jfi-form-control-border-color'),\n borderColorFocus: computedStyles.getPropertyValue('--jfi-form-control-border-color-focus'),\n borderColorError: computedStyles.getPropertyValue('--jfi-form-control-border-color-error'),\n borderWidth: computedStyles.getPropertyValue('--jfi-form-control-border-width'),\n borderBottomWidth: computedStyles.getPropertyValue('--jfi-form-control-border-bottom-width'),\n borderLeftWidth: computedStyles.getPropertyValue('--jfi-form-control-border-left-width'),\n borderRightWidth: computedStyles.getPropertyValue('--jfi-form-control-border-right-width'),\n borderTopWidth: computedStyles.getPropertyValue('--jfi-form-control-border-top-width'),\n borderRadius: computedStyles.getPropertyValue('--jfi-form-control-border-radius'),\n borderStyle: computedStyles.getPropertyValue('--jfi-form-control-border-style'),\n boxShadow: computedStyles.getPropertyValue('--jfi-form-control-box-shadow'),\n boxShadowError: computedStyles.getPropertyValue('--jfi-form-control-box-shadow-error'),\n boxShadowErrorFocus: computedStyles.getPropertyValue('--jfi-form-control-box-shadow-error-focus'),\n boxShadowFocus: computedStyles.getPropertyValue('--jfi-form-control-box-shadow-focus'),\n color: computedStyles.getPropertyValue('--jfi-form-control-color'),\n colorFocus: computedStyles.getPropertyValue('--jfi-form-control-color-focus'),\n fontSize: computedStyles.getPropertyValue('--jfi-form-control-font-size'),\n fontWeight: computedStyles.getPropertyValue('--jfi-form-control-font-weight'),\n lineHeight: computedStyles.getPropertyValue('--jfi-form-control-line-height'),\n margin: computedStyles.getPropertyValue('--jfi-form-control-margin'),\n padding: computedStyles.getPropertyValue('--jfi-form-control-padding'),\n },\n formLabel: {\n color: computedStyles.getPropertyValue('--jfi-form-label-color'),\n fontFamily: computedStyles.getPropertyValue('--jfi-form-label-font-family'),\n fontSize: computedStyles.getPropertyValue('--jfi-form-label-font-size'),\n fontWeight: computedStyles.getPropertyValue('--jfi-form-label-font-weight'),\n margin: computedStyles.getPropertyValue('--jfi-form-label-margin'),\n },\n errorMessage: {\n color: computedStyles.getPropertyValue('--jfi-error-message-color'),\n margin: computedStyles.getPropertyValue('--jfi-error-message-margin'),\n fontSize: computedStyles.getPropertyValue('--jfi-error-message-font-size'),\n },\n };\n\n return computedTheme;\n};\n\nexport default getComputedTheme;\n",":host {\n display: block;\n}\n\njustifi-payment-method-form iframe {\n border: none;\n width: 100%;\n}\n\niframe {\n width: 1px;\n min-width: 100%;\n}\n","import { Component, Event, Host, Prop, h, EventEmitter, Method } from '@stencil/core';\nimport iFrameResize from 'iframe-resizer/js/iframeResizer';\nimport { MessageEventType } from './message-event-types';\nimport { Theme } from './theme';\nimport packageJson from '../../../package.json';\nimport getComputedTheme from './get-computed-theme';\nimport { CreatePaymentMethodResponse } from './payment-method-responses';\n\n@Component({\n tag: 'justifi-payment-method-form',\n styleUrl: 'payment-method-form.css',\n shadow: false,\n})\nexport class PaymentMethodForm {\n @Prop() paymentMethodFormType: 'card' | 'bankAccount';\n @Prop({\n mutable: true,\n })\n paymentMethodFormValidationMode: 'onChange' | 'onBlur' | 'onSubmit' | 'onTouched' | 'all';\n @Prop() iframeOrigin?: string;\n @Prop() singleLine: boolean;\n @Event({ bubbles: true }) paymentMethodFormReady: EventEmitter;\n @Event({ bubbles: true }) paymentMethodFormTokenize: EventEmitter<{ data: any }>;\n\n private computedTheme: Theme = getComputedTheme();\n\n iframeElement!: HTMLIFrameElement;\n\n connectedCallback() {\n window.addEventListener('message', this.dispatchMessageEvent.bind(this));\n }\n\n disconnectedCallback() {\n window.removeEventListener('message', this.dispatchMessageEvent.bind(this));\n }\n\n sendStyleOverrides() {\n if (this.computedTheme) {\n this.postMessage(MessageEventType[this.paymentMethodFormType].styleOverrides, { styleOverrides: this.computedTheme });\n }\n }\n\n private dispatchMessageEvent(messageEvent: MessageEvent) {\n const messagePayload = messageEvent.data;\n const messageType = messagePayload.eventType;\n const messageData = messagePayload.data;\n\n if (messageType === MessageEventType[this.paymentMethodFormType].ready) {\n this.paymentMethodFormReady.emit(messageData);\n }\n }\n\n private postMessage(eventType: string, payload?: any) {\n this.iframeElement?.contentWindow?.postMessage({ eventType: eventType, ...payload }, this.iframeOrigin || process.env.IFRAME_ORIGIN || '*');\n }\n\n @Method()\n async resize(): Promise<any> {\n this.postMessage(MessageEventType[this.paymentMethodFormType].resize);\n }\n\n private async postMessageWithResponseListener(eventType: string, payload?: any): Promise<any> {\n return new Promise(resolve => {\n const responseListener = (event: MessageEvent) => {\n if (event.data.eventType !== eventType) return;\n window.removeEventListener('message', responseListener);\n resolve(event.data.data);\n };\n window.addEventListener('message', responseListener);\n this.postMessage(eventType, payload);\n });\n }\n\n @Method()\n async tokenize(clientId: string, paymentMethodMetadata: any, account?: string): Promise<CreatePaymentMethodResponse> {\n const eventType = MessageEventType[this.paymentMethodFormType].tokenize;\n const payload = {\n clientId: clientId,\n componentVersion: packageJson.version,\n paymentMethodMetadata: paymentMethodMetadata,\n account: account,\n };\n\n return this.postMessageWithResponseListener(eventType, payload);\n }\n\n @Method()\n async validate(): Promise<any> {\n return this.postMessageWithResponseListener(MessageEventType[this.paymentMethodFormType].validate);\n }\n\n private composeQueryParams(values: string[]) {\n const queryParams = values.map(value => {\n if (value === values[0]) {\n return (value = `?${value}`);\n } else {\n return (value = `&${value}`);\n }\n });\n return queryParams.join('');\n }\n\n private getIframeSrc() {\n const iframeOrigin = this.iframeOrigin || process.env.IFRAME_ORIGIN || 'https://js.justifi.ai/v2';\n let iframeSrc = `${iframeOrigin}/${this.paymentMethodFormType}`;\n let paramsList = [];\n if (this.paymentMethodFormValidationMode) {\n paramsList.push(`validationMode=${this.paymentMethodFormValidationMode}`);\n }\n if (this.singleLine) {\n paramsList.push(`singleLine=${this.singleLine}`);\n }\n\n return iframeSrc.concat(this.composeQueryParams(paramsList));\n }\n\n render() {\n return (\n <Host>\n <iframe\n id={`justifi-payment-method-form-${this.paymentMethodFormType}`}\n src={this.getIframeSrc()}\n ref={el => {\n this.iframeElement = el as HTMLIFrameElement;\n }}\n onLoad={() => {\n iFrameResize({ log: true }, this.iframeElement);\n this.sendStyleOverrides();\n }}\n ></iframe>\n </Host>\n );\n }\n}\n"],"mappings":"iSAWC,SAAWA,GACV,UAAWC,SAAW,YAAa,OAEnC,IAAIC,EAAQ,EACVC,EAAa,MACbC,EAAqB,MACrBC,EAAY,UACZC,EAAeD,EAAUE,OACzBC,EA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","length","msgId","msgIdLen","pagePosition","requestAnimationFrame","resetRequiredMethods","Object","freeze","max","scroll","bodyScroll","documentElementScroll","settings","timer","defaults","autoResize","bodyBackground","bodyMargin","bodyMarginV1","bodyPadding","checkOrigin","inPageLinks","enablePublicMethods","heightCalculationMethod","id","interval","log","maxHeight","Infinity","maxWidth","minHeight","minWidth","mouseEvents","resizeFrom","scrolling","sizeHeight","sizeWidth","warningTimeout","tolerance","widthCalculationMethod","onClose","onClosed","onInit","onMessage","warn","onMouseEnter","onMouseLeave","onResized","onScroll","getMutationObserver","MutationObserver","WebKitMutationObserver","MozMutationObserver","addEventListener","el","evt","func","removeEventListener","setupRequestAnimationFrame","vendors","x","bind","getMyID","iframeId","retStr","top","self","parentIFrame","getId","formatLogHeader","isLogEnabled","msg","output","info","type","enabled","console","iFrameListener","event","resizeIFrame","resize","setSize","messageData","setPagePosition","on","ensureInRange","syncResize","processMsg","data","slice","split","height","parseInt","iframe","compStyle","getComputedStyle","getPaddingEnds","getBorderEnds","width","boxSizing","paddingTop","bot","paddingBottom","borderTopWidth","borderBottomWidth","Dimension","Number","min","dimension","toLowerCase","size","isMessageFromIFrame","checkAllowedOrigin","checkList","i","retCode","origin","checkSingle","remoteHost","constructor","Array","Error","isMessageForUs","isMessageFromMetaParent","true","false","getMsgBody","offset","indexOf","forwardMsgFromIFrame","msgBody","message","JSON","parse","getPageInfo","bodyPosition","document","body","getBoundingClientRect","iFramePosition","stringify","iframeHeight","iframeWidth","clientHeight","Math","documentElement","innerHeight","clientWidth","innerWidth","offsetTop","offsetLeft","left","scrollTop","pageYOffset","scrollLeft","pageXOffset","documentHeight","documentWidth","windowHeight","windowWidth","sendPageInfoToIframe","debouncedTrigger","trigger","debounceFrameEvents","startPageInfoMonitor","setListener","sendPageInfo","stop","forEach","start","stopPageInfo","stopPageInfoMonitor","checkIFrameExists","retBool","getElementPosition","target","getPagePosition","floor","y","scrollRequestFromChild","addOffset","reposition","newPosition","scrollTo","calcOffset","scrollParent","unsetPagePosition","findTarget","location","jumpToTarget","jumpPosition","hash","jumpToParent","moveToAnchor","hashData","decodeURIComponent","getElementById","getElementsByName","onMouse","mousePos","screenX","screenY","funcName","val","chkEvent","actionMsg","firstRun","closeIFrame","resetIFrame","hasSettings","iFrameReadyMsgReceived","createOutgoingMsg","loaded","retVal","TypeError","removeIframeListeners","parentNode","removeChild","error","reset","setDimension","style","chkZero","fixHiddenIFrames","processDimension","doNotSync","jasmine","calleeMsg","noResponseWarning","postMessageToIFrame","targetOrigin","contentWindow","postMessage","iFrameNotFound","chkAndSend","warnOnNoResponse","warning","errorShown","msgTimeout","setTimeout","isNumber","value","setupIFrame","options","setLimits","addStyle","styleValue","chkMinMax","newId","ensureHasId","src","setScrolling","overflow","setupBodyMarginValues","checkReset","resetRequertMethod","setupIFrameObject","iFrameResizer","close","removeListeners","anchor","sendMessage","init","iFrameLoaded","createDestroyObserver","destroyObserver","mutations","mutation","removedNodes","prototype","call","removedNode","observe","childList","checkOptions","copyOptions","option","hasOwnProperty","getTargetOrigin","match","depricate","key","splitName","name","charAt","toUpperCase","this","processOptions","create","join","keys","beenHere","debouce","fn","time","frameTimer","frameId","checkIFrames","checkIFrame","settingId","chkDimension","isVisible","offsetParent","mutationObserved","createMutationObserver","querySelector","config","attributes","attributeOldValue","characterData","characterDataOldValue","subtree","observer","resizeIFrames","sendTriggerMsg","tabVisible","visibilityState","eventName","isIFrameResizeEnabled","setupEventListeners","factory","element","chkType","tagName","iFrames","push","warnDeprecatedOptions","iFrameResizeF","querySelectorAll","createJQueryPublicMethod","$","iFrameResize","$iFrameResizeF","index","filter","each","end","jQuery","define","amd","module","exports","MessageEventType","card","ready","tokenize","validate","styleOverrides","bankAccount","getComputedTheme","computedStyles","computedTheme","loadGoogleFont","getPropertyValue","layout","fontFamily","padding","formControlSpacingHorizontal","formControlSpacingVertical","formControl","backgroundColor","borderColor","borderColorFocus","borderColorError","borderWidth","borderLeftWidth","borderRightWidth","borderRadius","borderStyle","boxShadow","boxShadowError","boxShadowErrorFocus","boxShadowFocus","color","colorFocus","fontSize","fontWeight","lineHeight","margin","formLabel","errorMessage","paymentMethodFormCss","PaymentMethodForm","connectedCallback","dispatchMessageEvent","disconnectedCallback","sendStyleOverrides","paymentMethodFormType","messageEvent","messagePayload","messageType","eventType","paymentMethodFormReady","emit","payload","_b","_a","iframeElement","assign","iframeOrigin","postMessageWithResponseListener","Promise","resolve","responseListener","clientId","paymentMethodMetadata","account","componentVersion","packageJson","version","composeQueryParams","values","queryParams","map","getIframeSrc","iframeSrc","paramsList","paymentMethodFormValidationMode","singleLine","concat","render","h","Host","ref","onLoad"],"sources":["../node_modules/iframe-resizer/js/iframeResizer.js","src/components/payment-method-form/message-event-types.ts","src/components/payment-method-form/get-computed-theme.ts","src/components/payment-method-form/payment-method-form.css?tag=justifi-payment-method-form","src/components/payment-method-form/payment-method-form.tsx"],"sourcesContent":["/*\n * File: iframeResizer.js\n * Desc: Force iframes to size to content.\n * Requires: iframeResizer.contentWindow.js to be loaded into the target frame.\n * Doc: https://github.com/davidjbradshaw/iframe-resizer\n * Author: David J. Bradshaw - dave@bradshaw.net\n * Contributor: Jure Mav - jure.mav@gmail.com\n * Contributor: Reed Dadoune - reed@dadoune.com\n */\n\n// eslint-disable-next-line sonarjs/cognitive-complexity, no-shadow-restricted-names\n;(function (undefined) {\n if (typeof window === 'undefined') return // don't run for server side render\n\n var count = 0,\n logEnabled = false,\n hiddenCheckEnabled = false,\n msgHeader = 'message',\n msgHeaderLen = msgHeader.length,\n msgId = '[iFrameSizer]', // Must match iframe msg ID\n msgIdLen = msgId.length,\n pagePosition = null,\n requestAnimationFrame = window.requestAnimationFrame,\n resetRequiredMethods = Object.freeze({\n max: 1,\n scroll: 1,\n bodyScroll: 1,\n documentElementScroll: 1\n }),\n settings = {},\n timer = null,\n defaults = Object.freeze({\n autoResize: true,\n bodyBackground: null,\n bodyMargin: null,\n bodyMarginV1: 8,\n bodyPadding: null,\n checkOrigin: true,\n inPageLinks: false,\n enablePublicMethods: true,\n heightCalculationMethod: 'bodyOffset',\n id: 'iFrameResizer',\n interval: 32,\n log: false,\n maxHeight: Infinity,\n maxWidth: Infinity,\n minHeight: 0,\n minWidth: 0,\n mouseEvents: true,\n resizeFrom: 'parent',\n scrolling: false,\n sizeHeight: true,\n sizeWidth: false,\n warningTimeout: 5000,\n tolerance: 0,\n widthCalculationMethod: 'scroll',\n onClose: function () {\n return true\n },\n onClosed: function () {},\n onInit: function () {},\n onMessage: function () {\n warn('onMessage function not defined')\n },\n onMouseEnter: function () {},\n onMouseLeave: function () {},\n onResized: function () {},\n onScroll: function () {\n return true\n }\n })\n\n function getMutationObserver() {\n return (\n window.MutationObserver ||\n window.WebKitMutationObserver ||\n window.MozMutationObserver\n )\n }\n\n function addEventListener(el, evt, func) {\n el.addEventListener(evt, func, false)\n }\n\n function removeEventListener(el, evt, func) {\n el.removeEventListener(evt, func, false)\n }\n\n function setupRequestAnimationFrame() {\n var vendors = ['moz', 'webkit', 'o', 'ms']\n var x\n\n // Remove vendor prefixing if prefixed and break early if not\n for (x = 0; x < vendors.length && !requestAnimationFrame; x += 1) {\n requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame']\n }\n\n if (requestAnimationFrame) {\n // Firefox extension content-scripts have a globalThis object that is not the same as window.\n // Binding `requestAnimationFrame` to window allows the function to work and prevents errors\n // being thrown when run in that context, and should be a no-op in every other context.\n requestAnimationFrame = requestAnimationFrame.bind(window)\n } else {\n log('setup', 'RequestAnimationFrame not supported')\n }\n }\n\n function getMyID(iframeId) {\n var retStr = 'Host page: ' + iframeId\n\n if (window.top !== window.self) {\n retStr =\n window.parentIFrame && window.parentIFrame.getId\n ? window.parentIFrame.getId() + ': ' + iframeId\n : 'Nested host page: ' + iframeId\n }\n\n return retStr\n }\n\n function formatLogHeader(iframeId) {\n return msgId + '[' + getMyID(iframeId) + ']'\n }\n\n function isLogEnabled(iframeId) {\n return settings[iframeId] ? settings[iframeId].log : logEnabled\n }\n\n function log(iframeId, msg) {\n output('log', iframeId, msg, isLogEnabled(iframeId))\n }\n\n function info(iframeId, msg) {\n output('info', iframeId, msg, isLogEnabled(iframeId))\n }\n\n function warn(iframeId, msg) {\n output('warn', iframeId, msg, true)\n }\n\n function output(type, iframeId, msg, enabled) {\n if (true === enabled && 'object' === typeof window.console) {\n // eslint-disable-next-line no-console\n console[type](formatLogHeader(iframeId), msg)\n }\n }\n\n function iFrameListener(event) {\n function resizeIFrame() {\n function resize() {\n setSize(messageData)\n setPagePosition(iframeId)\n on('onResized', messageData)\n }\n\n ensureInRange('Height')\n ensureInRange('Width')\n\n syncResize(resize, messageData, 'init')\n }\n\n function processMsg() {\n var data = msg.slice(msgIdLen).split(':')\n var height = data[1] ? parseInt(data[1], 10) : 0\n var iframe = settings[data[0]] && settings[data[0]].iframe\n var compStyle = getComputedStyle(iframe)\n\n return {\n iframe: iframe,\n id: data[0],\n height: height + getPaddingEnds(compStyle) + getBorderEnds(compStyle),\n width: data[2],\n type: data[3]\n }\n }\n\n function getPaddingEnds(compStyle) {\n if (compStyle.boxSizing !== 'border-box') {\n return 0\n }\n var top = compStyle.paddingTop ? parseInt(compStyle.paddingTop, 10) : 0\n var bot = compStyle.paddingBottom\n ? parseInt(compStyle.paddingBottom, 10)\n : 0\n return top + bot\n }\n\n function getBorderEnds(compStyle) {\n if (compStyle.boxSizing !== 'border-box') {\n return 0\n }\n var top = compStyle.borderTopWidth\n ? parseInt(compStyle.borderTopWidth, 10)\n : 0\n var bot = compStyle.borderBottomWidth\n ? parseInt(compStyle.borderBottomWidth, 10)\n : 0\n return top + bot\n }\n\n function ensureInRange(Dimension) {\n var max = Number(settings[iframeId]['max' + Dimension]),\n min = Number(settings[iframeId]['min' + Dimension]),\n dimension = Dimension.toLowerCase(),\n size = Number(messageData[dimension])\n\n log(iframeId, 'Checking ' + dimension + ' is in range ' + min + '-' + max)\n\n if (size < min) {\n size = min\n log(iframeId, 'Set ' + dimension + ' to min value')\n }\n\n if (size > max) {\n size = max\n log(iframeId, 'Set ' + dimension + ' to max value')\n }\n\n messageData[dimension] = '' + size\n }\n\n function isMessageFromIFrame() {\n function checkAllowedOrigin() {\n function checkList() {\n var i = 0,\n retCode = false\n\n log(\n iframeId,\n 'Checking connection is from allowed list of origins: ' +\n checkOrigin\n )\n\n for (; i < checkOrigin.length; i++) {\n if (checkOrigin[i] === origin) {\n retCode = true\n break\n }\n }\n return retCode\n }\n\n function checkSingle() {\n var remoteHost = settings[iframeId] && settings[iframeId].remoteHost\n log(iframeId, 'Checking connection is from: ' + remoteHost)\n return origin === remoteHost\n }\n\n return checkOrigin.constructor === Array ? checkList() : checkSingle()\n }\n\n var origin = event.origin,\n checkOrigin = settings[iframeId] && settings[iframeId].checkOrigin\n\n if (checkOrigin && '' + origin !== 'null' && !checkAllowedOrigin()) {\n throw new Error(\n 'Unexpected message received from: ' +\n origin +\n ' for ' +\n messageData.iframe.id +\n '. Message was: ' +\n event.data +\n '. This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.'\n )\n }\n\n return true\n }\n\n function isMessageForUs() {\n return (\n msgId === ('' + msg).slice(0, msgIdLen) &&\n msg.slice(msgIdLen).split(':')[0] in settings\n ) // ''+Protects against non-string msg\n }\n\n function isMessageFromMetaParent() {\n // Test if this message is from a parent above us. This is an ugly test, however, updating\n // the message format would break backwards compatibility.\n var retCode = messageData.type in { true: 1, false: 1, undefined: 1 }\n\n if (retCode) {\n log(iframeId, 'Ignoring init message from meta parent page')\n }\n\n return retCode\n }\n\n function getMsgBody(offset) {\n return msg.slice(msg.indexOf(':') + msgHeaderLen + offset)\n }\n\n function forwardMsgFromIFrame(msgBody) {\n log(\n iframeId,\n 'onMessage passed: {iframe: ' +\n messageData.iframe.id +\n ', message: ' +\n msgBody +\n '}'\n )\n\n on('onMessage', {\n iframe: messageData.iframe,\n message: JSON.parse(msgBody)\n })\n\n log(iframeId, '--')\n }\n\n function getPageInfo() {\n var bodyPosition = document.body.getBoundingClientRect(),\n iFramePosition = messageData.iframe.getBoundingClientRect()\n\n return JSON.stringify({\n iframeHeight: iFramePosition.height,\n iframeWidth: iFramePosition.width,\n clientHeight: Math.max(\n document.documentElement.clientHeight,\n window.innerHeight || 0\n ),\n clientWidth: Math.max(\n document.documentElement.clientWidth,\n window.innerWidth || 0\n ),\n offsetTop: parseInt(iFramePosition.top - bodyPosition.top, 10),\n offsetLeft: parseInt(iFramePosition.left - bodyPosition.left, 10),\n scrollTop: window.pageYOffset,\n scrollLeft: window.pageXOffset,\n documentHeight: document.documentElement.clientHeight,\n documentWidth: document.documentElement.clientWidth,\n windowHeight: window.innerHeight,\n windowWidth: window.innerWidth\n })\n }\n\n function sendPageInfoToIframe(iframe, iframeId) {\n function debouncedTrigger() {\n trigger('Send Page Info', 'pageInfo:' + getPageInfo(), iframe, iframeId)\n }\n debounceFrameEvents(debouncedTrigger, 32, iframeId)\n }\n\n function startPageInfoMonitor() {\n function setListener(type, func) {\n function sendPageInfo() {\n if (settings[id]) {\n sendPageInfoToIframe(settings[id].iframe, id)\n } else {\n stop()\n }\n }\n\n ;['scroll', 'resize'].forEach(function (evt) {\n log(id, type + evt + ' listener for sendPageInfo')\n func(window, evt, sendPageInfo)\n })\n }\n\n function stop() {\n setListener('Remove ', removeEventListener)\n }\n\n function start() {\n setListener('Add ', addEventListener)\n }\n\n var id = iframeId // Create locally scoped copy of iFrame ID\n\n start()\n\n if (settings[id]) {\n settings[id].stopPageInfo = stop\n }\n }\n\n function stopPageInfoMonitor() {\n if (settings[iframeId] && settings[iframeId].stopPageInfo) {\n settings[iframeId].stopPageInfo()\n delete settings[iframeId].stopPageInfo\n }\n }\n\n function checkIFrameExists() {\n var retBool = true\n\n if (null === messageData.iframe) {\n warn(iframeId, 'IFrame (' + messageData.id + ') not found')\n retBool = false\n }\n return retBool\n }\n\n function getElementPosition(target) {\n var iFramePosition = target.getBoundingClientRect()\n\n getPagePosition(iframeId)\n\n return {\n x: Math.floor(Number(iFramePosition.left) + Number(pagePosition.x)),\n y: Math.floor(Number(iFramePosition.top) + Number(pagePosition.y))\n }\n }\n\n function scrollRequestFromChild(addOffset) {\n /* istanbul ignore next */ // Not testable in Karma\n function reposition() {\n pagePosition = newPosition\n scrollTo()\n log(iframeId, '--')\n }\n\n function calcOffset() {\n return {\n x: Number(messageData.width) + offset.x,\n y: Number(messageData.height) + offset.y\n }\n }\n\n function scrollParent() {\n if (window.parentIFrame) {\n window.parentIFrame['scrollTo' + (addOffset ? 'Offset' : '')](\n newPosition.x,\n newPosition.y\n )\n } else {\n warn(\n iframeId,\n 'Unable to scroll to requested position, window.parentIFrame not found'\n )\n }\n }\n\n var offset = addOffset\n ? getElementPosition(messageData.iframe)\n : { x: 0, y: 0 },\n newPosition = calcOffset()\n\n log(\n iframeId,\n 'Reposition requested from iFrame (offset x:' +\n offset.x +\n ' y:' +\n offset.y +\n ')'\n )\n\n if (window.top === window.self) {\n reposition()\n } else {\n scrollParent()\n }\n }\n\n function scrollTo() {\n if (false === on('onScroll', pagePosition)) {\n unsetPagePosition()\n } else {\n setPagePosition(iframeId)\n }\n }\n\n function findTarget(location) {\n function jumpToTarget() {\n var jumpPosition = getElementPosition(target)\n\n log(\n iframeId,\n 'Moving to in page link (#' +\n hash +\n ') at x: ' +\n jumpPosition.x +\n ' y: ' +\n jumpPosition.y\n )\n pagePosition = {\n x: jumpPosition.x,\n y: jumpPosition.y\n }\n\n scrollTo()\n log(iframeId, '--')\n }\n\n function jumpToParent() {\n if (window.parentIFrame) {\n window.parentIFrame.moveToAnchor(hash)\n } else {\n log(\n iframeId,\n 'In page link #' +\n hash +\n ' not found and window.parentIFrame not found'\n )\n }\n }\n\n var hash = location.split('#')[1] || '',\n hashData = decodeURIComponent(hash),\n target =\n document.getElementById(hashData) ||\n document.getElementsByName(hashData)[0]\n\n if (target) {\n jumpToTarget()\n } else if (window.top === window.self) {\n log(iframeId, 'In page link #' + hash + ' not found')\n } else {\n jumpToParent()\n }\n }\n\n function onMouse(event) {\n var mousePos = {}\n\n if (Number(messageData.width) === 0 && Number(messageData.height) === 0) {\n var data = getMsgBody(9).split(':')\n mousePos = {\n x: data[1],\n y: data[0]\n }\n } else {\n mousePos = {\n x: messageData.width,\n y: messageData.height\n }\n }\n\n on(event, {\n iframe: messageData.iframe,\n screenX: Number(mousePos.x),\n screenY: Number(mousePos.y),\n type: messageData.type\n })\n }\n\n function on(funcName, val) {\n return chkEvent(iframeId, funcName, val)\n }\n\n function actionMsg() {\n if (settings[iframeId] && settings[iframeId].firstRun) firstRun()\n\n switch (messageData.type) {\n case 'close': {\n closeIFrame(messageData.iframe)\n break\n }\n\n case 'message': {\n forwardMsgFromIFrame(getMsgBody(6))\n break\n }\n\n case 'mouseenter': {\n onMouse('onMouseEnter')\n break\n }\n\n case 'mouseleave': {\n onMouse('onMouseLeave')\n break\n }\n\n case 'autoResize': {\n settings[iframeId].autoResize = JSON.parse(getMsgBody(9))\n break\n }\n\n case 'scrollTo': {\n scrollRequestFromChild(false)\n break\n }\n\n case 'scrollToOffset': {\n scrollRequestFromChild(true)\n break\n }\n\n case 'pageInfo': {\n sendPageInfoToIframe(\n settings[iframeId] && settings[iframeId].iframe,\n iframeId\n )\n startPageInfoMonitor()\n break\n }\n\n case 'pageInfoStop': {\n stopPageInfoMonitor()\n break\n }\n\n case 'inPageLink': {\n findTarget(getMsgBody(9))\n break\n }\n\n case 'reset': {\n resetIFrame(messageData)\n break\n }\n\n case 'init': {\n resizeIFrame()\n on('onInit', messageData.iframe)\n break\n }\n\n default: {\n if (\n Number(messageData.width) === 0 &&\n Number(messageData.height) === 0\n ) {\n warn(\n 'Unsupported message received (' +\n messageData.type +\n '), this is likely due to the iframe containing a later ' +\n 'version of iframe-resizer than the parent page'\n )\n } else {\n resizeIFrame()\n }\n }\n }\n }\n\n function hasSettings(iframeId) {\n var retBool = true\n\n if (!settings[iframeId]) {\n retBool = false\n warn(\n messageData.type +\n ' No settings for ' +\n iframeId +\n '. Message was: ' +\n msg\n )\n }\n\n return retBool\n }\n\n function iFrameReadyMsgReceived() {\n // eslint-disable-next-line no-restricted-syntax, guard-for-in\n for (var iframeId in settings) {\n trigger(\n 'iFrame requested init',\n createOutgoingMsg(iframeId),\n settings[iframeId].iframe,\n iframeId\n )\n }\n }\n\n function firstRun() {\n if (settings[iframeId]) {\n settings[iframeId].firstRun = false\n }\n }\n\n var msg = event.data,\n messageData = {},\n iframeId = null\n\n if ('[iFrameResizerChild]Ready' === msg) {\n iFrameReadyMsgReceived()\n } else if (isMessageForUs()) {\n messageData = processMsg()\n iframeId = messageData.id\n if (settings[iframeId]) {\n settings[iframeId].loaded = true\n }\n\n if (!isMessageFromMetaParent() && hasSettings(iframeId)) {\n log(iframeId, 'Received: ' + msg)\n\n if (checkIFrameExists() && isMessageFromIFrame()) {\n actionMsg()\n }\n }\n } else {\n info(iframeId, 'Ignored: ' + msg)\n }\n }\n\n function chkEvent(iframeId, funcName, val) {\n var func = null,\n retVal = null\n\n if (settings[iframeId]) {\n func = settings[iframeId][funcName]\n\n if ('function' === typeof func) {\n retVal = func(val)\n } else {\n throw new TypeError(\n funcName + ' on iFrame[' + iframeId + '] is not a function'\n )\n }\n }\n\n return retVal\n }\n\n function removeIframeListeners(iframe) {\n var iframeId = iframe.id\n delete settings[iframeId]\n }\n\n function closeIFrame(iframe) {\n var iframeId = iframe.id\n if (chkEvent(iframeId, 'onClose', iframeId) === false) {\n log(iframeId, 'Close iframe cancelled by onClose event')\n return\n }\n log(iframeId, 'Removing iFrame: ' + iframeId)\n\n try {\n // Catch race condition error with React\n if (iframe.parentNode) {\n iframe.parentNode.removeChild(iframe)\n }\n } catch (error) {\n warn(error)\n }\n\n chkEvent(iframeId, 'onClosed', iframeId)\n log(iframeId, '--')\n removeIframeListeners(iframe)\n }\n\n function getPagePosition(iframeId) {\n if (null === pagePosition) {\n pagePosition = {\n x:\n window.pageXOffset === undefined\n ? document.documentElement.scrollLeft\n : window.pageXOffset,\n y:\n window.pageYOffset === undefined\n ? document.documentElement.scrollTop\n : window.pageYOffset\n }\n log(\n iframeId,\n 'Get page position: ' + pagePosition.x + ',' + pagePosition.y\n )\n }\n }\n\n function setPagePosition(iframeId) {\n if (null !== pagePosition) {\n window.scrollTo(pagePosition.x, pagePosition.y)\n log(\n iframeId,\n 'Set page position: ' + pagePosition.x + ',' + pagePosition.y\n )\n unsetPagePosition()\n }\n }\n\n function unsetPagePosition() {\n pagePosition = null\n }\n\n function resetIFrame(messageData) {\n function reset() {\n setSize(messageData)\n trigger('reset', 'reset', messageData.iframe, messageData.id)\n }\n\n log(\n messageData.id,\n 'Size reset requested by ' +\n ('init' === messageData.type ? 'host page' : 'iFrame')\n )\n getPagePosition(messageData.id)\n syncResize(reset, messageData, 'reset')\n }\n\n function setSize(messageData) {\n function setDimension(dimension) {\n if (!messageData.id) {\n log('undefined', 'messageData id not set')\n return\n }\n messageData.iframe.style[dimension] = messageData[dimension] + 'px'\n log(\n messageData.id,\n 'IFrame (' +\n iframeId +\n ') ' +\n dimension +\n ' set to ' +\n messageData[dimension] +\n 'px'\n )\n }\n\n function chkZero(dimension) {\n // FireFox sets dimension of hidden iFrames to zero.\n // So if we detect that set up an event to check for\n // when iFrame becomes visible.\n\n /* istanbul ignore next */ // Not testable in PhantomJS\n if (!hiddenCheckEnabled && '0' === messageData[dimension]) {\n hiddenCheckEnabled = true\n log(iframeId, 'Hidden iFrame detected, creating visibility listener')\n fixHiddenIFrames()\n }\n }\n\n function processDimension(dimension) {\n setDimension(dimension)\n chkZero(dimension)\n }\n\n var iframeId = messageData.iframe.id\n\n if (settings[iframeId]) {\n if (settings[iframeId].sizeHeight) {\n processDimension('height')\n }\n if (settings[iframeId].sizeWidth) {\n processDimension('width')\n }\n }\n }\n\n function syncResize(func, messageData, doNotSync) {\n /* istanbul ignore if */ // Not testable in PhantomJS\n if (\n doNotSync !== messageData.type &&\n requestAnimationFrame &&\n // including check for jasmine because had trouble getting spy to work in unit test using requestAnimationFrame\n !window.jasmine\n ) {\n log(messageData.id, 'Requesting animation frame')\n requestAnimationFrame(func)\n } else {\n func()\n }\n }\n\n function trigger(calleeMsg, msg, iframe, id, noResponseWarning) {\n function postMessageToIFrame() {\n var target = settings[id] && settings[id].targetOrigin\n log(\n id,\n '[' +\n calleeMsg +\n '] Sending msg to iframe[' +\n id +\n '] (' +\n msg +\n ') targetOrigin: ' +\n target\n )\n iframe.contentWindow.postMessage(msgId + msg, target)\n }\n\n function iFrameNotFound() {\n warn(id, '[' + calleeMsg + '] IFrame(' + id + ') not found')\n }\n\n function chkAndSend() {\n if (\n iframe &&\n 'contentWindow' in iframe &&\n null !== iframe.contentWindow\n ) {\n // Null test for PhantomJS\n postMessageToIFrame()\n } else {\n iFrameNotFound()\n }\n }\n\n function warnOnNoResponse() {\n function warning() {\n if (settings[id] && !settings[id].loaded && !errorShown) {\n errorShown = true\n warn(\n id,\n 'IFrame has not responded within ' +\n settings[id].warningTimeout / 1000 +\n ' 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.'\n )\n }\n }\n\n if (\n !!noResponseWarning &&\n settings[id] &&\n !!settings[id].warningTimeout\n ) {\n settings[id].msgTimeout = setTimeout(\n warning,\n settings[id].warningTimeout\n )\n }\n }\n\n var errorShown = false\n\n id = id || iframe.id\n\n if (settings[id]) {\n chkAndSend()\n warnOnNoResponse()\n }\n }\n\n function createOutgoingMsg(iframeId) {\n return (\n iframeId +\n ':' +\n settings[iframeId].bodyMarginV1 +\n ':' +\n settings[iframeId].sizeWidth +\n ':' +\n settings[iframeId].log +\n ':' +\n settings[iframeId].interval +\n ':' +\n settings[iframeId].enablePublicMethods +\n ':' +\n settings[iframeId].autoResize +\n ':' +\n settings[iframeId].bodyMargin +\n ':' +\n settings[iframeId].heightCalculationMethod +\n ':' +\n settings[iframeId].bodyBackground +\n ':' +\n settings[iframeId].bodyPadding +\n ':' +\n settings[iframeId].tolerance +\n ':' +\n settings[iframeId].inPageLinks +\n ':' +\n settings[iframeId].resizeFrom +\n ':' +\n settings[iframeId].widthCalculationMethod +\n ':' +\n settings[iframeId].mouseEvents\n )\n }\n\n function isNumber(value) {\n return typeof value === 'number'\n }\n\n function setupIFrame(iframe, options) {\n function setLimits() {\n function addStyle(style) {\n var styleValue = settings[iframeId][style]\n if (Infinity !== styleValue && 0 !== styleValue) {\n iframe.style[style] = isNumber(styleValue)\n ? styleValue + 'px'\n : styleValue\n log(iframeId, 'Set ' + style + ' = ' + iframe.style[style])\n }\n }\n\n function chkMinMax(dimension) {\n if (\n settings[iframeId]['min' + dimension] >\n settings[iframeId]['max' + dimension]\n ) {\n throw new Error(\n 'Value for min' +\n dimension +\n ' can not be greater than max' +\n dimension\n )\n }\n }\n\n chkMinMax('Height')\n chkMinMax('Width')\n\n addStyle('maxHeight')\n addStyle('minHeight')\n addStyle('maxWidth')\n addStyle('minWidth')\n }\n\n function newId() {\n var id = (options && options.id) || defaults.id + count++\n if (null !== document.getElementById(id)) {\n id += count++\n }\n return id\n }\n\n function ensureHasId(iframeId) {\n if (typeof iframeId !== 'string') {\n throw new TypeError('Invaild id for iFrame. Expected String')\n }\n\n if ('' === iframeId) {\n // eslint-disable-next-line no-multi-assign\n iframe.id = iframeId = newId()\n logEnabled = (options || {}).log\n log(\n iframeId,\n 'Added missing iframe ID: ' + iframeId + ' (' + iframe.src + ')'\n )\n }\n\n return iframeId\n }\n\n function setScrolling() {\n log(\n iframeId,\n 'IFrame scrolling ' +\n (settings[iframeId] && settings[iframeId].scrolling\n ? 'enabled'\n : 'disabled') +\n ' for ' +\n iframeId\n )\n iframe.style.overflow =\n false === (settings[iframeId] && settings[iframeId].scrolling)\n ? 'hidden'\n : 'auto'\n switch (settings[iframeId] && settings[iframeId].scrolling) {\n case 'omit': {\n break\n }\n\n case true: {\n iframe.scrolling = 'yes'\n break\n }\n\n case false: {\n iframe.scrolling = 'no'\n break\n }\n\n default: {\n iframe.scrolling = settings[iframeId]\n ? settings[iframeId].scrolling\n : 'no'\n }\n }\n }\n\n // The V1 iFrame script expects an int, where as in V2 expects a CSS\n // string value such as '1px 3em', so if we have an int for V2, set V1=V2\n // and then convert V2 to a string PX value.\n function setupBodyMarginValues() {\n if (\n 'number' ===\n typeof (settings[iframeId] && settings[iframeId].bodyMargin) ||\n '0' === (settings[iframeId] && settings[iframeId].bodyMargin)\n ) {\n settings[iframeId].bodyMarginV1 = settings[iframeId].bodyMargin\n settings[iframeId].bodyMargin =\n '' + settings[iframeId].bodyMargin + 'px'\n }\n }\n\n function checkReset() {\n // Reduce scope of firstRun to function, because IE8's JS execution\n // context stack is borked and this value gets externally\n // changed midway through running this function!!!\n var firstRun = settings[iframeId] && settings[iframeId].firstRun,\n resetRequertMethod =\n settings[iframeId] &&\n settings[iframeId].heightCalculationMethod in resetRequiredMethods\n\n if (!firstRun && resetRequertMethod) {\n resetIFrame({ iframe: iframe, height: 0, width: 0, type: 'init' })\n }\n }\n\n function setupIFrameObject() {\n if (settings[iframeId]) {\n settings[iframeId].iframe.iFrameResizer = {\n close: closeIFrame.bind(null, settings[iframeId].iframe),\n\n removeListeners: removeIframeListeners.bind(\n null,\n settings[iframeId].iframe\n ),\n\n resize: trigger.bind(\n null,\n 'Window resize',\n 'resize',\n settings[iframeId].iframe\n ),\n\n moveToAnchor: function (anchor) {\n trigger(\n 'Move to anchor',\n 'moveToAnchor:' + anchor,\n settings[iframeId].iframe,\n iframeId\n )\n },\n\n sendMessage: function (message) {\n message = JSON.stringify(message)\n trigger(\n 'Send Message',\n 'message:' + message,\n settings[iframeId].iframe,\n iframeId\n )\n }\n }\n }\n }\n\n // We have to call trigger twice, as we can not be sure if all\n // iframes have completed loading when this code runs. The\n // event listener also catches the page changing in the iFrame.\n function init(msg) {\n function iFrameLoaded() {\n trigger('iFrame.onload', msg, iframe, undefined, true)\n checkReset()\n }\n\n function createDestroyObserver(MutationObserver) {\n if (!iframe.parentNode) {\n return\n }\n\n var destroyObserver = new MutationObserver(function (mutations) {\n mutations.forEach(function (mutation) {\n var removedNodes = Array.prototype.slice.call(mutation.removedNodes) // Transform NodeList into an Array\n removedNodes.forEach(function (removedNode) {\n if (removedNode === iframe) {\n closeIFrame(iframe)\n }\n })\n })\n })\n destroyObserver.observe(iframe.parentNode, {\n childList: true\n })\n }\n\n var MutationObserver = getMutationObserver()\n if (MutationObserver) {\n createDestroyObserver(MutationObserver)\n }\n\n addEventListener(iframe, 'load', iFrameLoaded)\n trigger('init', msg, iframe, undefined, true)\n }\n\n function checkOptions(options) {\n if ('object' !== typeof options) {\n throw new TypeError('Options is not an object')\n }\n }\n\n function copyOptions(options) {\n // eslint-disable-next-line no-restricted-syntax\n for (var option in defaults) {\n if (Object.prototype.hasOwnProperty.call(defaults, option)) {\n settings[iframeId][option] = Object.prototype.hasOwnProperty.call(\n options,\n option\n )\n ? options[option]\n : defaults[option]\n }\n }\n }\n\n function getTargetOrigin(remoteHost) {\n return '' === remoteHost ||\n null !== remoteHost.match(/^(about:blank|javascript:|file:\\/\\/)/)\n ? '*'\n : remoteHost\n }\n\n function depricate(key) {\n var splitName = key.split('Callback')\n\n if (splitName.length === 2) {\n var name =\n 'on' + splitName[0].charAt(0).toUpperCase() + splitName[0].slice(1)\n this[name] = this[key]\n delete this[key]\n warn(\n iframeId,\n \"Deprecated: '\" +\n key +\n \"' has been renamed '\" +\n name +\n \"'. The old method will be removed in the next major version.\"\n )\n }\n }\n\n function processOptions(options) {\n options = options || {}\n\n settings[iframeId] = Object.create(null) // Protect against prototype attacks\n settings[iframeId].iframe = iframe\n settings[iframeId].firstRun = true\n settings[iframeId].remoteHost =\n iframe.src && iframe.src.split('/').slice(0, 3).join('/')\n\n checkOptions(options)\n Object.keys(options).forEach(depricate, options)\n copyOptions(options)\n\n if (settings[iframeId]) {\n settings[iframeId].targetOrigin =\n true === settings[iframeId].checkOrigin\n ? getTargetOrigin(settings[iframeId].remoteHost)\n : '*'\n }\n }\n\n function beenHere() {\n return iframeId in settings && 'iFrameResizer' in iframe\n }\n\n var iframeId = ensureHasId(iframe.id)\n\n if (beenHere()) {\n warn(iframeId, 'Ignored iFrame, already setup.')\n } else {\n processOptions(options)\n setScrolling()\n setLimits()\n setupBodyMarginValues()\n init(createOutgoingMsg(iframeId))\n setupIFrameObject()\n }\n }\n\n function debouce(fn, time) {\n if (null === timer) {\n timer = setTimeout(function () {\n timer = null\n fn()\n }, time)\n }\n }\n\n var frameTimer = {}\n function debounceFrameEvents(fn, time, frameId) {\n if (!frameTimer[frameId]) {\n frameTimer[frameId] = setTimeout(function () {\n frameTimer[frameId] = null\n fn()\n }, time)\n }\n }\n\n // Not testable in PhantomJS\n /* istanbul ignore next */\n\n function fixHiddenIFrames() {\n function checkIFrames() {\n function checkIFrame(settingId) {\n function chkDimension(dimension) {\n return (\n '0px' ===\n (settings[settingId] && settings[settingId].iframe.style[dimension])\n )\n }\n\n function isVisible(el) {\n return null !== el.offsetParent\n }\n\n if (\n settings[settingId] &&\n isVisible(settings[settingId].iframe) &&\n (chkDimension('height') || chkDimension('width'))\n ) {\n trigger(\n 'Visibility change',\n 'resize',\n settings[settingId].iframe,\n settingId\n )\n }\n }\n\n Object.keys(settings).forEach(function (key) {\n checkIFrame(key)\n })\n }\n\n function mutationObserved(mutations) {\n log(\n 'window',\n 'Mutation observed: ' + mutations[0].target + ' ' + mutations[0].type\n )\n debouce(checkIFrames, 16)\n }\n\n function createMutationObserver() {\n var target = document.querySelector('body'),\n config = {\n attributes: true,\n attributeOldValue: false,\n characterData: true,\n characterDataOldValue: false,\n childList: true,\n subtree: true\n },\n observer = new MutationObserver(mutationObserved)\n\n observer.observe(target, config)\n }\n\n var MutationObserver = getMutationObserver()\n if (MutationObserver) {\n createMutationObserver()\n }\n }\n\n function resizeIFrames(event) {\n function resize() {\n sendTriggerMsg('Window ' + event, 'resize')\n }\n\n log('window', 'Trigger event: ' + event)\n debouce(resize, 16)\n }\n\n // Not testable in PhantomJS\n /* istanbul ignore next */\n function tabVisible() {\n function resize() {\n sendTriggerMsg('Tab Visible', 'resize')\n }\n\n if ('hidden' !== document.visibilityState) {\n log('document', 'Trigger event: Visibility change')\n debouce(resize, 16)\n }\n }\n\n function sendTriggerMsg(eventName, event) {\n function isIFrameResizeEnabled(iframeId) {\n return (\n settings[iframeId] &&\n 'parent' === settings[iframeId].resizeFrom &&\n settings[iframeId].autoResize &&\n !settings[iframeId].firstRun\n )\n }\n\n Object.keys(settings).forEach(function (iframeId) {\n if (isIFrameResizeEnabled(iframeId)) {\n trigger(eventName, event, settings[iframeId].iframe, iframeId)\n }\n })\n }\n\n function setupEventListeners() {\n addEventListener(window, 'message', iFrameListener)\n\n addEventListener(window, 'resize', function () {\n resizeIFrames('resize')\n })\n\n addEventListener(document, 'visibilitychange', tabVisible)\n\n addEventListener(document, '-webkit-visibilitychange', tabVisible)\n }\n\n function factory() {\n function init(options, element) {\n function chkType() {\n if (!element.tagName) {\n throw new TypeError('Object is not a valid DOM element')\n } else if ('IFRAME' !== element.tagName.toUpperCase()) {\n throw new TypeError(\n 'Expected <IFRAME> tag, found <' + element.tagName + '>'\n )\n }\n }\n\n if (element) {\n chkType()\n setupIFrame(element, options)\n iFrames.push(element)\n }\n }\n\n function warnDeprecatedOptions(options) {\n if (options && options.enablePublicMethods) {\n warn(\n 'enablePublicMethods option has been removed, public methods are now always available in the iFrame'\n )\n }\n }\n\n var iFrames\n\n setupRequestAnimationFrame()\n setupEventListeners()\n\n return function iFrameResizeF(options, target) {\n iFrames = [] // Only return iFrames past in on this call\n\n warnDeprecatedOptions(options)\n\n switch (typeof target) {\n case 'undefined':\n case 'string': {\n Array.prototype.forEach.call(\n document.querySelectorAll(target || 'iframe'),\n init.bind(undefined, options)\n )\n break\n }\n\n case 'object': {\n init(options, target)\n break\n }\n\n default: {\n throw new TypeError('Unexpected data type (' + typeof target + ')')\n }\n }\n\n return iFrames\n }\n }\n\n function createJQueryPublicMethod($) {\n if (!$.fn) {\n info('', 'Unable to bind to jQuery, it is not fully loaded.')\n } else if (!$.fn.iFrameResize) {\n $.fn.iFrameResize = function $iFrameResizeF(options) {\n function init(index, element) {\n setupIFrame(element, options)\n }\n\n return this.filter('iframe').each(init).end()\n }\n }\n }\n\n if (window.jQuery !== undefined) {\n createJQueryPublicMethod(window.jQuery)\n }\n\n if (typeof define === 'function' && define.amd) {\n define([], factory)\n } else if (typeof module === 'object' && typeof module.exports === 'object') {\n // Node for browserfy\n module.exports = factory()\n }\n window.iFrameResize = window.iFrameResize || factory()\n})()\n","export const MessageEventType = {\n card: {\n ready: 'justifi.card.ready',\n tokenize: 'justifi.card.tokenize',\n validate: 'justifi.card.validate',\n resize: 'justifi.card.resize',\n styleOverrides: 'justifi.card.styleOverrides',\n },\n bankAccount: {\n ready: 'justifi.bankAccount.ready',\n tokenize: 'justifi.bankAccount.tokenize',\n validate: 'justifi.bankAccount.validate',\n resize: 'justifi.bankAccount.resize',\n styleOverrides: 'justifi.bankAccount.styleOverrides',\n },\n};\n","import { Theme } from './theme';\n\nconst getComputedTheme = () => {\n const computedStyles = getComputedStyle(document.body);\n\n const computedTheme: Theme = {\n loadGoogleFont: computedStyles.getPropertyValue('--jfi-load-google-font'),\n layout: {\n fontFamily: computedStyles.getPropertyValue('--jfi-layout-font-family'),\n padding: computedStyles.getPropertyValue('--jfi-layout-padding'),\n formControlSpacingHorizontal: computedStyles.getPropertyValue('--jfi-layout-form-control-spacing-x'),\n formControlSpacingVertical: computedStyles.getPropertyValue('--jfi-layout-form-control-spacing-y'),\n },\n formControl: {\n backgroundColor: computedStyles.getPropertyValue('--jfi-form-control-background-color'),\n borderColor: computedStyles.getPropertyValue('--jfi-form-control-border-color'),\n borderColorFocus: computedStyles.getPropertyValue('--jfi-form-control-border-color-focus'),\n borderColorError: computedStyles.getPropertyValue('--jfi-form-control-border-color-error'),\n borderWidth: computedStyles.getPropertyValue('--jfi-form-control-border-width'),\n borderBottomWidth: computedStyles.getPropertyValue('--jfi-form-control-border-bottom-width'),\n borderLeftWidth: computedStyles.getPropertyValue('--jfi-form-control-border-left-width'),\n borderRightWidth: computedStyles.getPropertyValue('--jfi-form-control-border-right-width'),\n borderTopWidth: computedStyles.getPropertyValue('--jfi-form-control-border-top-width'),\n borderRadius: computedStyles.getPropertyValue('--jfi-form-control-border-radius'),\n borderStyle: computedStyles.getPropertyValue('--jfi-form-control-border-style'),\n boxShadow: computedStyles.getPropertyValue('--jfi-form-control-box-shadow'),\n boxShadowError: computedStyles.getPropertyValue('--jfi-form-control-box-shadow-error'),\n boxShadowErrorFocus: computedStyles.getPropertyValue('--jfi-form-control-box-shadow-error-focus'),\n boxShadowFocus: computedStyles.getPropertyValue('--jfi-form-control-box-shadow-focus'),\n color: computedStyles.getPropertyValue('--jfi-form-control-color'),\n colorFocus: computedStyles.getPropertyValue('--jfi-form-control-color-focus'),\n fontSize: computedStyles.getPropertyValue('--jfi-form-control-font-size'),\n fontWeight: computedStyles.getPropertyValue('--jfi-form-control-font-weight'),\n lineHeight: computedStyles.getPropertyValue('--jfi-form-control-line-height'),\n margin: computedStyles.getPropertyValue('--jfi-form-control-margin'),\n padding: computedStyles.getPropertyValue('--jfi-form-control-padding'),\n },\n formLabel: {\n color: computedStyles.getPropertyValue('--jfi-form-label-color'),\n fontFamily: computedStyles.getPropertyValue('--jfi-form-label-font-family'),\n fontSize: computedStyles.getPropertyValue('--jfi-form-label-font-size'),\n fontWeight: computedStyles.getPropertyValue('--jfi-form-label-font-weight'),\n margin: computedStyles.getPropertyValue('--jfi-form-label-margin'),\n },\n errorMessage: {\n color: computedStyles.getPropertyValue('--jfi-error-message-color'),\n margin: computedStyles.getPropertyValue('--jfi-error-message-margin'),\n fontSize: computedStyles.getPropertyValue('--jfi-error-message-font-size'),\n },\n };\n\n return computedTheme;\n};\n\nexport default getComputedTheme;\n",":host {\n display: block;\n}\n\njustifi-payment-method-form iframe {\n border: none;\n width: 100%;\n}\n\niframe {\n width: 1px;\n min-width: 100%;\n}\n","import {\n Component,\n Event,\n Host,\n Prop,\n h,\n EventEmitter,\n Method,\n} from '@stencil/core';\nimport iFrameResize from 'iframe-resizer/js/iframeResizer';\nimport { MessageEventType } from './message-event-types';\nimport { Theme } from './theme';\nimport packageJson from '../../../package.json';\nimport getComputedTheme from './get-computed-theme';\nimport { CreatePaymentMethodResponse } from './payment-method-responses';\nimport { config } from '../../../config';\n\n@Component({\n tag: 'justifi-payment-method-form',\n styleUrl: 'payment-method-form.css',\n shadow: false,\n})\nexport class PaymentMethodForm {\n @Prop() paymentMethodFormType: 'card' | 'bankAccount';\n @Prop({\n mutable: true,\n })\n paymentMethodFormValidationMode:\n | 'onChange'\n | 'onBlur'\n | 'onSubmit'\n | 'onTouched'\n | 'all';\n @Prop() iframeOrigin?: string;\n @Prop() singleLine: boolean;\n @Event({ bubbles: true }) paymentMethodFormReady: EventEmitter;\n @Event({ bubbles: true }) paymentMethodFormTokenize: EventEmitter<{\n data: any;\n }>;\n\n private computedTheme: Theme = getComputedTheme();\n\n iframeElement!: HTMLIFrameElement;\n\n connectedCallback() {\n window.addEventListener('message', this.dispatchMessageEvent.bind(this));\n }\n\n disconnectedCallback() {\n window.removeEventListener('message', this.dispatchMessageEvent.bind(this));\n }\n\n sendStyleOverrides() {\n if (this.computedTheme) {\n this.postMessage(\n MessageEventType[this.paymentMethodFormType].styleOverrides,\n { styleOverrides: this.computedTheme },\n );\n }\n }\n\n private dispatchMessageEvent(messageEvent: MessageEvent) {\n const messagePayload = messageEvent.data;\n const messageType = messagePayload.eventType;\n const messageData = messagePayload.data;\n\n if (messageType === MessageEventType[this.paymentMethodFormType].ready) {\n this.paymentMethodFormReady.emit(messageData);\n }\n }\n\n private postMessage(eventType: string, payload?: any) {\n this.iframeElement?.contentWindow?.postMessage({ eventType: eventType, ...payload }, config.iframeOrigin || '*');\n }\n\n @Method()\n async resize(): Promise<any> {\n this.postMessage(MessageEventType[this.paymentMethodFormType].resize);\n }\n\n private async postMessageWithResponseListener(\n eventType: string,\n payload?: any,\n ): Promise<any> {\n return new Promise(resolve => {\n const responseListener = (event: MessageEvent) => {\n if (event.data.eventType !== eventType) return;\n window.removeEventListener('message', responseListener);\n resolve(event.data.data);\n };\n window.addEventListener('message', responseListener);\n this.postMessage(eventType, payload);\n });\n }\n\n @Method()\n async tokenize(\n clientId: string,\n paymentMethodMetadata: any,\n account?: string,\n ): Promise<CreatePaymentMethodResponse> {\n const eventType = MessageEventType[this.paymentMethodFormType].tokenize;\n const payload = {\n clientId: clientId,\n componentVersion: packageJson.version,\n paymentMethodMetadata: paymentMethodMetadata,\n account: account,\n };\n\n return this.postMessageWithResponseListener(eventType, payload);\n }\n\n @Method()\n async validate(): Promise<any> {\n return this.postMessageWithResponseListener(\n MessageEventType[this.paymentMethodFormType].validate,\n );\n }\n\n private composeQueryParams(values: string[]) {\n const queryParams = values.map(value => {\n if (value === values[0]) {\n return (value = `?${value}`);\n } else {\n return (value = `&${value}`);\n }\n });\n return queryParams.join('');\n }\n\n private getIframeSrc() {\n const iframeOrigin = config.iframeOrigin;\n\n let iframeSrc = `${iframeOrigin}/${this.paymentMethodFormType}`;\n let paramsList = [];\n if (this.paymentMethodFormValidationMode) {\n paramsList.push(`validationMode=${this.paymentMethodFormValidationMode}`);\n }\n if (this.singleLine) {\n paramsList.push(`singleLine=${this.singleLine}`);\n }\n\n return iframeSrc.concat(this.composeQueryParams(paramsList));\n }\n\n render() {\n return (\n <Host>\n <iframe\n id={`justifi-payment-method-form-${this.paymentMethodFormType}`}\n src={this.getIframeSrc()}\n ref={el => {\n this.iframeElement = el as HTMLIFrameElement;\n }}\n onLoad={() => {\n iFrameResize(this.iframeElement);\n this.sendStyleOverrides();\n }}\n ></iframe>\n </Host>\n );\n }\n}\n"],"mappings":"qUAWC,SAAWA,GACV,UAAWC,SAAW,YAAa,OAEnC,IAAIC,EAAQ,EACVC,EAAa,MACbC,EAAqB,MACrBC,EAAY,UACZC,EAAeD,EAAUE,OACzBC,EAAQ,gBACRC,EAAWD,EAAMD,OACjBG,EAAe,KACfC,EAAwBV,OAAOU,sBAC/BC,EAAuBC,OAAOC,OAAO,CACnCC,IAAK,EACLC,OAAQ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MAAMf,EAAYjD,EAAiBxD,KAAKqG,uBAAuB1C,SAC/D,MAAMiD,EAAU,CACdU,SAAUA,EACVG,iBAAkBC,EAAYC,QAC9BJ,sBAAuBA,EACvBC,QAASA,GAGX,OAAOxH,KAAKkH,gCAAgCT,EAAWG,E,CAIzD,cAAMhD,GACJ,OAAO5D,KAAKkH,gCACV1D,EAAiBxD,KAAKqG,uBAAuBzC,S,CAIzC,kBAAAgE,CAAmBC,GACzB,MAAMC,EAAcD,EAAOE,KAAI5K,IAC7B,GAAIA,IAAU0K,EAAO,GAAI,CACvB,OAAQ1K,EAAQ,IAAIA,G,KACf,CACL,OAAQA,EAAQ,IAAIA,G,KAGxB,OAAO2K,EAAY3H,KAAK,G,CAGlB,YAAA6H,GACN,MAAMf,EAAe7F,EAAO6F,aAE5B,IAAIgB,EAAY,GAAGhB,KAAgBjH,KAAKqG,wBACxC,IAAI6B,EAAa,GACjB,GAAIlI,KAAKmI,gCAAiC,CACxCD,EAAW3F,KAAK,kBAAkBvC,KAAKmI,kC,CAEzC,GAAInI,KAAKoI,WAAY,CACnBF,EAAW3F,KAAK,cAAcvC,KAAKoI,a,CAGrC,OAAOH,EAAUI,OAAOrI,KAAK4H,mBAAmBM,G,CAGlD,MAAAI,GACE,OACEC,EAACC,EAAI,KACHD,EAAA,UACE7Y,GAAI,+BAA+BsQ,KAAKqG,wBACxCzI,IAAKoC,KAAKgI,eACVS,IAAKjX,IACHwO,KAAK+G,cAAgBvV,CAAuB,EAE9CkX,OAAQ,KACN7F,EAAa7C,KAAK+G,eAClB/G,KAAKoG,oBAAoB,I"}
@@ -0,0 +1,2 @@
1
+ const e=e=>{var l,t,d,u,r,n,o,v,i,a;delete e.id;delete e.documents;delete e.bank_accounts;delete e.product_categories;delete e.created_at;delete e.updated_at;(l=e.legal_address)===null||l===void 0?true:delete l.id;(t=e.legal_address)===null||t===void 0?true:delete t.created_at;(d=e.legal_address)===null||d===void 0?true:delete d.updated_at;(u=e.representative)===null||u===void 0?true:delete u.id;(r=e.representative)===null||r===void 0?true:delete r.documents;(n=e.representative)===null||n===void 0?true:delete n.created_at;(o=e.representative)===null||o===void 0?true:delete o.updated_at;(v=e.representative)===null||v===void 0?true:delete v.address.id;(i=e.representative)===null||i===void 0?true:delete i.address.created_at;(a=e.representative)===null||a===void 0?true:delete a.address.updated_at;delete e.owners;return e};export{e as p};
2
+ //# sourceMappingURL=p-7d58db66.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["parseForPatching","data","id","documents","bank_accounts","product_categories","created_at","updated_at","_a","legal_address","_b","_c","_d","representative","_e","_f","_g","_h","address","_j","_k","owners"],"sources":["src/components/business-form/helpers.ts"],"sourcesContent":["// These props should not be sent to the server\nexport const parseForPatching = (data) => {\n delete data.id;\n delete data.documents;\n delete data.bank_accounts;\n delete data.product_categories;\n delete data.created_at;\n delete data.updated_at;\n delete data.legal_address?.id;\n delete data.legal_address?.created_at;\n delete data.legal_address?.updated_at;\n delete data.representative?.id;\n delete data.representative?.documents;\n delete data.representative?.created_at;\n delete data.representative?.updated_at;\n delete data.representative?.address.id;\n delete data.representative?.address.created_at;\n delete data.representative?.address.updated_at;\n delete data.owners;\n\n return data;\n}\n"],"mappings":"MACaA,EAAoBC,I,+BACxBA,EAAKC,UACLD,EAAKE,iBACLF,EAAKG,qBACLH,EAAKI,0BACLJ,EAAKK,kBACLL,EAAKM,YACLC,EAAAP,EAAKQ,iBAAa,MAAAD,SAAA,cAAAA,EAAEN,IACpBQ,EAAAT,EAAKQ,iBAAa,MAAAC,SAAA,cAAAA,EAAEJ,YACpBK,EAAAV,EAAKQ,iBAAa,MAAAE,SAAA,cAAAA,EAAEJ,YACpBK,EAAAX,EAAKY,kBAAc,MAAAD,SAAA,cAAAA,EAAEV,IACrBY,EAAAb,EAAKY,kBAAc,MAAAC,SAAA,cAAAA,EAAEX,WACrBY,EAAAd,EAAKY,kBAAc,MAAAE,SAAA,cAAAA,EAAET,YACrBU,EAAAf,EAAKY,kBAAc,MAAAG,SAAA,cAAAA,EAAET,YACrBU,EAAAhB,EAAKY,kBAAc,MAAAI,SAAA,cAAAA,EAAEC,QAAQhB,IAC7BiB,EAAAlB,EAAKY,kBAAc,MAAAM,SAAA,cAAAA,EAAED,QAAQZ,YAC7Bc,EAAAnB,EAAKY,kBAAc,MAAAO,SAAA,cAAAA,EAAEF,QAAQX,kBAC7BN,EAAKoB,OAEZ,OAAOpB,CAAI,S"}