@justifi/webcomponents 4.20.0 → 4.20.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 (106) hide show
  1. package/dist/cjs/{Analytics-03981aad.js → Analytics-3c89cfb4.js} +1 -1
  2. package/dist/cjs/{check-pkg-version-89d6d146.js → check-pkg-version-4fa0367d.js} +1 -1
  3. package/dist/cjs/custom-popper.cjs.entry.js +2 -2
  4. package/dist/cjs/justifi-bank-account-form.cjs.entry.js +2 -2
  5. package/dist/cjs/justifi-business-details.cjs.entry.js +3 -3
  6. package/dist/cjs/justifi-business-form.cjs.entry.js +3 -3
  7. package/dist/cjs/justifi-card-form.cjs.entry.js +2 -2
  8. package/dist/cjs/justifi-checkout.cjs.entry.js +3 -3
  9. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +3 -3
  10. package/dist/cjs/justifi-payment-details.cjs.entry.js +4 -4
  11. package/dist/cjs/justifi-payment-form.cjs.entry.js +3 -3
  12. package/dist/cjs/justifi-payment-method-form.cjs.entry.js +1 -1
  13. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +3 -3
  14. package/dist/cjs/justifi-payments-list.cjs.entry.js +11 -9
  15. package/dist/cjs/justifi-payout-details.cjs.entry.js +3 -3
  16. package/dist/cjs/justifi-payouts-list.cjs.entry.js +3 -3
  17. package/dist/cjs/justifi-refund-form.cjs.entry.js +1 -1
  18. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +3 -3
  19. package/dist/cjs/loader.cjs.js +1 -1
  20. package/dist/cjs/{package-7fdd14b9.js → package-3a9ac89d.js} +1 -1
  21. package/dist/cjs/{payment.service-4b1c0a20.js → payment.service-47e2d84e.js} +5 -2
  22. package/dist/cjs/payments-list-filters_2.cjs.entry.js +2 -2
  23. package/dist/cjs/payout-details-core.cjs.entry.js +1 -1
  24. package/dist/cjs/payouts-list-core.cjs.entry.js +2 -2
  25. package/dist/cjs/webcomponents.cjs.js +1 -1
  26. package/dist/collection/api/services/payment.service.js +5 -2
  27. package/dist/collection/components/payments-list/get-payments.js +2 -2
  28. package/dist/collection/components/payments-list/payments-list-filters.js +1 -1
  29. package/dist/collection/components/payments-list/payments-list.js +23 -2
  30. package/dist/collection/components/payout-details/payout-details-core.js +1 -1
  31. package/dist/collection/components/payouts-list/payouts-list-core.js +2 -2
  32. package/dist/collection/components/refund-form/refund-form.js +1 -1
  33. package/dist/collection/ui-components/custom-popper/custom-popper.js +2 -2
  34. package/dist/collection/ui-components/filters/table-filters-menu.js +1 -1
  35. package/dist/docs.json +23 -1
  36. package/dist/esm/{Analytics-3103f8e9.js → Analytics-b0f6936a.js} +1 -1
  37. package/dist/esm/{check-pkg-version-44e6ad15.js → check-pkg-version-10cadb08.js} +1 -1
  38. package/dist/esm/custom-popper.entry.js +2 -2
  39. package/dist/esm/justifi-bank-account-form.entry.js +2 -2
  40. package/dist/esm/justifi-business-details.entry.js +3 -3
  41. package/dist/esm/justifi-business-form.entry.js +3 -3
  42. package/dist/esm/justifi-card-form.entry.js +2 -2
  43. package/dist/esm/justifi-checkout.entry.js +3 -3
  44. package/dist/esm/justifi-gross-payment-chart.entry.js +3 -3
  45. package/dist/esm/justifi-payment-details.entry.js +4 -4
  46. package/dist/esm/justifi-payment-form.entry.js +3 -3
  47. package/dist/esm/justifi-payment-method-form.entry.js +1 -1
  48. package/dist/esm/justifi-payment-provisioning.entry.js +3 -3
  49. package/dist/esm/justifi-payments-list.entry.js +11 -9
  50. package/dist/esm/justifi-payout-details.entry.js +3 -3
  51. package/dist/esm/justifi-payouts-list.entry.js +3 -3
  52. package/dist/esm/justifi-refund-form.entry.js +1 -1
  53. package/dist/esm/justifi-season-interruption-insurance.entry.js +3 -3
  54. package/dist/esm/loader.js +1 -1
  55. package/dist/esm/{package-0e3cc41e.js → package-2ef16e2c.js} +1 -1
  56. package/dist/esm/{payment.service-02c596b9.js → payment.service-21a3e2d3.js} +5 -2
  57. package/dist/esm/payments-list-filters_2.entry.js +2 -2
  58. package/dist/esm/payout-details-core.entry.js +1 -1
  59. package/dist/esm/payouts-list-core.entry.js +2 -2
  60. package/dist/esm/webcomponents.js +1 -1
  61. package/dist/module/custom-popper2.js +2 -2
  62. package/dist/module/justifi-payments-list.js +8 -4
  63. package/dist/module/justifi-refund-form.js +1 -1
  64. package/dist/module/package.js +1 -1
  65. package/dist/module/payment.service.js +5 -2
  66. package/dist/module/payments-list-filters2.js +1 -1
  67. package/dist/module/payout-details-core2.js +1 -1
  68. package/dist/module/payouts-list-core2.js +2 -2
  69. package/dist/module/table-filters-menu2.js +1 -1
  70. package/dist/types/api/Payment.d.ts +1 -0
  71. package/dist/types/api/services/payment.service.d.ts +2 -2
  72. package/dist/types/components/payments-list/get-payments.d.ts +2 -1
  73. package/dist/types/components/payments-list/payments-list.d.ts +3 -2
  74. package/dist/types/components.d.ts +2 -0
  75. package/dist/webcomponents/p-034fc302.entry.js +1 -0
  76. package/dist/webcomponents/{p-4628cc9b.entry.js → p-1c04aacd.entry.js} +1 -1
  77. package/dist/webcomponents/{p-0de026dd.entry.js → p-232016ba.entry.js} +1 -1
  78. package/dist/webcomponents/{p-8281f09a.js → p-35846553.js} +1 -1
  79. package/dist/webcomponents/{p-938bf2b4.entry.js → p-37888614.entry.js} +1 -1
  80. package/dist/webcomponents/p-538fd427.entry.js +1 -0
  81. package/dist/webcomponents/{p-8d03a7bd.entry.js → p-57d7534f.entry.js} +1 -1
  82. package/dist/webcomponents/{p-3a1f19f3.entry.js → p-60d3571e.entry.js} +1 -1
  83. package/dist/webcomponents/{p-437f9114.js → p-707bdf68.js} +1 -1
  84. package/dist/webcomponents/{p-804c0f1f.entry.js → p-75139399.entry.js} +1 -1
  85. package/dist/webcomponents/{p-5540a47c.entry.js → p-7771f64b.entry.js} +1 -1
  86. package/dist/webcomponents/p-9add7d3e.entry.js +1 -0
  87. package/dist/webcomponents/{p-eea79a55.entry.js → p-ab92abb1.entry.js} +1 -1
  88. package/dist/webcomponents/p-b91bcbfc.js +1 -0
  89. package/dist/webcomponents/p-c1772671.entry.js +1 -0
  90. package/dist/webcomponents/{p-f6a2dc78.entry.js → p-c740b6ca.entry.js} +1 -1
  91. package/dist/webcomponents/{p-0e84986e.entry.js → p-ce5fe369.entry.js} +1 -1
  92. package/dist/webcomponents/{p-428e9b64.entry.js → p-d9579cd6.entry.js} +1 -1
  93. package/dist/webcomponents/{p-8c83b73e.entry.js → p-d99a5f30.entry.js} +1 -1
  94. package/dist/webcomponents/{p-05718341.entry.js → p-dc048c3c.entry.js} +1 -1
  95. package/dist/webcomponents/p-f2924369.js +1 -0
  96. package/dist/webcomponents/{p-7bdffc78.entry.js → p-fb7f7a8c.entry.js} +1 -1
  97. package/dist/webcomponents/p-ffddac99.entry.js +1 -0
  98. package/dist/webcomponents/webcomponents.esm.js +1 -1
  99. package/package.json +1 -1
  100. package/dist/webcomponents/p-1612894d.js +0 -1
  101. package/dist/webcomponents/p-20dafb46.entry.js +0 -1
  102. package/dist/webcomponents/p-4cc9df76.entry.js +0 -1
  103. package/dist/webcomponents/p-7fe67d7f.entry.js +0 -1
  104. package/dist/webcomponents/p-8921a478.entry.js +0 -1
  105. package/dist/webcomponents/p-dbc1d7b3.entry.js +0 -1
  106. package/dist/webcomponents/p-e3f4a2a6.js +0 -1
@@ -100,7 +100,7 @@ const RefundForm = /*@__PURE__*/ proxyCustomElement(class RefundForm extends HTM
100
100
  }
101
101
  render() {
102
102
  var _a;
103
- return (h(StyledHost, { key: '317b405be6fae390e20b7bf8586aced9fdf5e246' }, h("h1", { key: 'e27cd7c30b74eae1be005dfd17cc4a33411024d1' }, "Refund"), this.refundInfoText && (h("div", { key: '00298ad8bd4a0c5e56d78e94f2b9da8b3ad065df', class: "d-flex align-items-center flex-row gap-4 border-top border-bottom my-4 p-3", role: "alert" }, h("img", { key: 'e32db4b03e42a6e8180b10e99a7a7de94e753850', src: "/info-icon.svg", alt: "Information", height: "30", width: "30" }), h("p", { key: 'd63e3a790338bd5c3ac9f304aaa01b65928bd34e', class: "m-0", innerHTML: this.refundInfoText }))), h("form", { key: 'a5cb24ef9f8214e37398d4c2eb790f0c5ffb5a18', onSubmit: e => this.handleSubmit(e), class: "d-grid gap-4" }, h("div", { key: 'c8e24f30f8db93bef5e6b56d9eea5208aa768f94', class: "form-group" }, h("form-control-monetary", { key: 'a52701bc026714e8e0851eeff6c8458385f2f5da', name: "amount", label: "Refund Amount", defaultValue: ((_a = this.amount) === null || _a === void 0 ? void 0 : _a.toString()) || '', maskOptions: CURRENCY_MASK.DECIMAL, inputHandler: (name, value) => this.handleInput(name, value), errorText: this.errors.amount })), h("div", { key: 'e2ff04104c47d2852da925de074b1667dcc684f4', class: "form-group" }, h("form-control-text", { key: '8567d4f6082642919e2a132511af6eb9f393cd65', name: "notes", label: "Additional Notes", inputHandler: (name, value) => this.handleInput(name, value), errorText: this.errors.notes })), this.withButton && (h("div", { key: '6634bfd2156b45f189c4c4b630983712bbc5baa4', class: "form-group d-flex flex-row-reverse" }, h("button", { key: '1a0c80e5ee42673d09f9d7f9a36acc2f4ea52f8b', type: "submit", disabled: !!this.isSubmitting, class: "btn btn-primary ml-auto" }, this.submitButtonText))))));
103
+ return (h(StyledHost, { key: 'bb3d26c841a9697e5881426fb92027e1fff62e9f' }, h("h1", { key: 'b89354d3dec27b3e496af20957fa4d30b7c2e99e' }, "Refund"), this.refundInfoText && (h("div", { key: '493ff3e052c5b28bb382355dd32ebf407446346d', class: "d-flex align-items-center flex-row gap-4 border-top border-bottom my-4 p-3", role: "alert" }, h("img", { key: '72211dc3be8aef8bb87aaff278455170a2be0ed4', src: "/info-icon.svg", alt: "Information", height: "30", width: "30" }), h("p", { key: 'fa22ea217cbb789cd6a4d2798903df20c7a99c3a', class: "m-0", innerHTML: this.refundInfoText }))), h("form", { key: 'd698a190fbc5f92375cda2707ea54a0b7d7ca4c3', onSubmit: e => this.handleSubmit(e), class: "d-grid gap-4" }, h("div", { key: '68796a301cea039ba86eaba91e4a63f7db800f47', class: "form-group" }, h("form-control-monetary", { key: '7a03e3d50bad0f932ca69ba7bb8c20cf80d62bc7', name: "amount", label: "Refund Amount", defaultValue: ((_a = this.amount) === null || _a === void 0 ? void 0 : _a.toString()) || '', maskOptions: CURRENCY_MASK.DECIMAL, inputHandler: (name, value) => this.handleInput(name, value), errorText: this.errors.amount })), h("div", { key: 'b4c548b884d7b537a8caa8c91da505af6f6bd6ad', class: "form-group" }, h("form-control-text", { key: '936fb7ee8ce365311c9f368fc7a3c4f183d675ba', name: "notes", label: "Additional Notes", inputHandler: (name, value) => this.handleInput(name, value), errorText: this.errors.notes })), this.withButton && (h("div", { key: '9b8c5c4175279e8ce5d4d5c10de9ac1e3249bae7', class: "form-group d-flex flex-row-reverse" }, h("button", { key: '8f8a0a878a541d1740d63927d36ad7f2982f83cb', type: "submit", disabled: !!this.isSubmitting, class: "btn btn-primary ml-auto" }, this.submitButtonText))))));
104
104
  }
105
105
  static get style() { return JustifiRefundFormStyle0; }
106
106
  }, [1, "justifi-refund-form", {
@@ -1,5 +1,5 @@
1
1
  const name = "@justifi/webcomponents";
2
- const version = "4.20.0";
2
+ const version = "4.20.1";
3
3
  const description = "JustiFi Web Components";
4
4
  const collection = "dist/collection/collection-manifest.json";
5
5
  const main = "dist/index.cjs.js";
@@ -5,8 +5,11 @@ import './Payout.js';
5
5
  import { c as config } from './config.js';
6
6
 
7
7
  class PaymentService {
8
- async fetchPayments(accountId, authToken, params) {
9
- const api = Api({ authToken, apiOrigin: config.proxyApiOrigin });
8
+ async fetchPayments(accountId, authToken, params, apiOrigin) {
9
+ if (!apiOrigin) {
10
+ apiOrigin = config.proxyApiOrigin;
11
+ }
12
+ const api = Api({ authToken, apiOrigin: apiOrigin });
10
13
  const endpoint = `account/${accountId}/payments`;
11
14
  return api.get(endpoint, params);
12
15
  }
@@ -17234,7 +17234,7 @@ const PaymentsListFilters = /*@__PURE__*/ proxyCustomElement(class PaymentsListF
17234
17234
  ];
17235
17235
  }
17236
17236
  render() {
17237
- return (h("table-filters-menu", { key: '490bab461b6e9f7d3d6296e0d7b59cd0379750a9', params: this.params, clearParams: this.clearParams }, h("div", { key: '03541b6698c5c7fd3f82133e5c391c1a88516a09', class: "grid-cols-2 gap-3 p-1" }, h("div", { key: 'a81248110bcd05439e30713258b5f6df2967cb92', class: "p-2" }, h("form-control-text", { key: '713e549345668620d52e0e3938f787b4638571eb', name: "terminal_id", label: "Terminal ID", inputHandler: this.debouncedSetParamsOnChange, defaultValue: this.params.terminal_id })), h("div", { key: 'c6f5e2fc92998de7672a3702e68fba3e7b86fe56', class: "p-2" }, h("form-control-select", { key: 'df5c15aeb9f2e5644637d28045f7ba2b3f0671a1', name: "payment_status", label: "Status", options: this.paymentStatusOptions, inputHandler: this.setParamsOnChange, defaultValue: this.params.payment_status })), h("div", { key: '80b462eea933c079ca178e67fcb7c66fe40e2835', class: "p-2" }, h("form-control-date", { key: '23c520165674f69aa589ae134a06342a7003fbd6', name: "created_after", label: "Start Date", inputHandler: this.setParamsOnChange, defaultValue: this.params.created_after })), h("div", { key: '957f6585b0c6d7292748d57e4a9b31ca9e8588fb', class: "p-2" }, h("form-control-date", { key: 'ee29803a5076cb217ea45d4c602edbf64c5beced', name: "created_before", label: "End Date", inputHandler: this.setParamsOnChange, defaultValue: this.params.created_before })))));
17237
+ return (h("table-filters-menu", { key: '490bab461b6e9f7d3d6296e0d7b59cd0379750a9', params: this.params, clearParams: this.clearParams }, h("div", { key: '03541b6698c5c7fd3f82133e5c391c1a88516a09', class: "grid-cols-2 gap-3 p-1" }, h("div", { key: 'da16493e48e338b7a44acdfd8adfc74536580c76', class: "p-2" }, h("form-control-text", { key: '5c3c66c184bc1753ce8a8c9dd8644a15338dba27', name: "payment_id", label: "Payment ID", inputHandler: this.debouncedSetParamsOnChange, defaultValue: this.params.payment_id })), h("div", { key: 'cc1637833295948df93b3fc5e3a9240b8c401840', class: "p-2" }, h("form-control-text", { key: '9201deffdc08ddadbcb4b1b817550116ce5e4eb9', name: "terminal_id", label: "Terminal ID", inputHandler: this.debouncedSetParamsOnChange, defaultValue: this.params.terminal_id })), h("div", { key: '8bba67af45d8ae3427c0df2fd7e3e01bfb081ade', class: "p-2" }, h("form-control-select", { key: '9744947523c0ba7f840946b9d21574d93b239efe', name: "payment_status", label: "Status", options: this.paymentStatusOptions, inputHandler: this.setParamsOnChange, defaultValue: this.params.payment_status })), h("div", { key: '3e15042ad46b11ea1ba086a284a32b7a661362d9', class: "p-2" }, h("form-control-date", { key: '4cb7f7356fb9a3e86834511eefd16c5b3334b976', name: "created_after", label: "Start Date", inputHandler: this.setParamsOnChange, defaultValue: this.params.created_after })), h("div", { key: '88315cc708c3e4e526e0a80f04a114bf0f9600bf', class: "p-2" }, h("form-control-date", { key: '537eee72fc813d0c73d830641db73eadabef5d18', name: "created_before", label: "End Date", inputHandler: this.setParamsOnChange, defaultValue: this.params.created_before })))));
17238
17238
  }
17239
17239
  }, [0, "payments-list-filters", {
17240
17240
  "params": [16],
@@ -57,7 +57,7 @@ const PayoutDetailsCore = /*@__PURE__*/ proxyCustomElement(class PayoutDetailsCo
57
57
  }
58
58
  render() {
59
59
  var _a;
60
- return (h(StyledHost, { key: 'f04c333617b7a76f89042b248a6d778f66d5c6cb' }, this.loading && LoadingState(), !this.loading && this.errorMessage && ErrorState(this.errorMessage), !this.loading && this.payout && (h("justifi-details", { key: '8d05338158cc2d7305d8af3ba2a513dc8481741b', "error-message": this.errorMessage }, h(EntityHeadInfo, { key: '366a34f922b79a0cf7b7e7ae214c7607ea24a5b4', slot: "head-info", badge: h("span", { slot: 'badge', innerHTML: MapPayoutStatusToBadge((_a = this.payout) === null || _a === void 0 ? void 0 : _a.status) }), title: `${formatCurrency(this.payout.amount)} ${this.payout.currency.toUpperCase()}` }, h(EntityHeadInfoItem, { key: '656abf0e42ae7a80e845c03b8c6a928776dc0d07', classes: "border-1 border-end", title: "Updated At", value: `${formatDate(this.payout.updated_at)} ${formatTime(this.payout.updated_at)}` }), h(EntityHeadInfoItem, { key: 'db958e6aa16d1048f80b4819094df79d91900bca', classes: "border-1 border-end", title: "Created At", value: `${formatDate(this.payout.created_at)} ${formatTime(this.payout.created_at)}` }), h(EntityHeadInfoItem, { key: '091347549f20f22b1378297d16414488cd061c5b', title: "ID", value: this.payout.id }), h("div", { key: '551b4dc10f526de23370b08067014c8152f51c13', class: "m-4" }, h("button", { key: '5533b69b46df20a4142d1d4747697db6712d5576', class: "btn btn-outline-secondary d-flex align-items-center", onClick: this.downloadCSV }, "Export CSV"))), h("div", { key: '351d58be5436416a67ae51e62d56114948bc3913', slot: 'detail-sections' }, h(DetailSectionTitle, { key: '652ef08edf5810d7330107547e628fe71995350b', sectionTitle: "Details" }), h("div", { key: 'c2a142799c0c2e00f7075e9b5c97fa8dab0f41c8', class: "d-table gap-2 w-100" }, h(DetailItem, { key: '0e8fc0971294ffa8b514e3bb88de867c95e922f4', title: "Date paid", value: formatDate(this.payout.deposits_at) }), h(DetailItem, { key: '5bf5664f84ab30f684046d99d30f2431faa34f0b', title: "Statement Description", value: this.payout.description }), h(DetailItem, { key: '8d0773a79dea5984cd71f67dfcc6d293756a9df3', title: "Payout Method", value: this.payout.delivery_method }), h(DetailItem, { key: '8fbb6b45a5650d1066991ab78cc76533ce786464', title: "Amount", value: formatCurrency(this.payout.amount) }), h(DetailItem, { key: 'b67100e8ba24bdbd4b8e119b7b3c5d8c4cce7e89', title: "Fee", value: formatCurrency(this.payout.fees_total) })), h(DetailSectionTitle, { key: '57ffa572fff5333777d4ca51e3951eebadeef9ed', sectionTitle: "Account" }), h("div", { key: '8ddcd2c7034cdb54926b1127f11c7793bdf00e09', class: "d-table gap-2 w-100" }, h(DetailItem, { key: 'eb67dfb4a90d6ed275675a9364453393b2231493', title: "ID", value: this.payout.account_id }), h(DetailItem, { key: '62718960d90f6d79fb89ec962bfe0ee9058967ed', title: "Account Type", value: this.payout.bank_account.account_type }), h(DetailItem, { key: 'bd8477ca9f112054e05da17c3a28cbfef34233c3', title: "Institution", value: this.payout.bank_account.account_type }), h(DetailItem, { key: '58b3959f17fb7294e44f195da0617744a6ac1932', title: "Routing Number", value: this.payout.bank_account.routing_number }), h(DetailItem, { key: '14ac9081e23cd608e0f25652d217c407a14b3afa', title: "Account Number", value: this.payout.bank_account.account_number_last4 })), h(DetailSectionTitle, { key: '4bf77ec534c0c44e7550d3141330dc71642dae85', sectionTitle: 'Metadata' }), h("div", { key: 'b0c019b0c13bb966a13370326679bfd7e652ceb7', class: "d-table gap-2 w-100" }, h(CodeBlock, { key: '2409ce5416d91df6a38db07bd58041b49cbdd736', metadata: this.payout.metadata })))))));
60
+ return (h(StyledHost, { key: '3ab39ca75aa7f1db8daf8442d2ae9131085375ae' }, this.loading && LoadingState(), !this.loading && this.errorMessage && ErrorState(this.errorMessage), !this.loading && this.payout && (h("justifi-details", { key: 'c423b3e994e2ceb3b9f641752f1747aa8d8e7b4e', "error-message": this.errorMessage }, h(EntityHeadInfo, { key: 'e39f07636edbe3527707c538f296133a24a92aa1', slot: "head-info", badge: h("span", { slot: 'badge', innerHTML: MapPayoutStatusToBadge((_a = this.payout) === null || _a === void 0 ? void 0 : _a.status) }), title: `${formatCurrency(this.payout.amount)} ${this.payout.currency.toUpperCase()}` }, h(EntityHeadInfoItem, { key: '3424ff97b7a41fdbd784a982617af0ab2ff004e7', classes: "border-1 border-end", title: "Updated At", value: `${formatDate(this.payout.updated_at)} ${formatTime(this.payout.updated_at)}` }), h(EntityHeadInfoItem, { key: 'c2584993d369514e2413c7d23a9b731eb2c9135a', classes: "border-1 border-end", title: "Created At", value: `${formatDate(this.payout.created_at)} ${formatTime(this.payout.created_at)}` }), h(EntityHeadInfoItem, { key: '958856c1acbc34394d2fbc453d9e2dd1f437fe38', title: "ID", value: this.payout.id }), h("div", { key: 'dd097a51e1b02a7624614cb7f554789302e36bcd', class: "m-4" }, h("button", { key: 'f565ec22830ea1fd53e9f14d4f184a4a97e975ea', class: "btn btn-outline-secondary d-flex align-items-center", onClick: this.downloadCSV }, "Export CSV"))), h("div", { key: 'a12b5c5a78c1e21d905a8049537d8775765766d1', slot: 'detail-sections' }, h(DetailSectionTitle, { key: 'b3ef435e2cce25f91e3d015098c199a95acfd76e', sectionTitle: "Details" }), h("div", { key: '585f9454474ce9b5691265cfe44309220b737a8a', class: "d-table gap-2 w-100" }, h(DetailItem, { key: '20deb7901ee526c84966e43e020b7aec9ce2d014', title: "Date paid", value: formatDate(this.payout.deposits_at) }), h(DetailItem, { key: 'e0f17db65ed53f3c4b3eff511dcf44784e9d0be5', title: "Statement Description", value: this.payout.description }), h(DetailItem, { key: '5c665c9b5eca28d09c46367156a586b64bb20ee5', title: "Payout Method", value: this.payout.delivery_method }), h(DetailItem, { key: 'e0a39aad45a06185498256859947f8f64312bbc4', title: "Amount", value: formatCurrency(this.payout.amount) }), h(DetailItem, { key: 'd0fcad35843acf001cc73c0fe3f67ca85fa99007', title: "Fee", value: formatCurrency(this.payout.fees_total) })), h(DetailSectionTitle, { key: '08d127690a8e63e852cd23ed53cc83da77c9de46', sectionTitle: "Account" }), h("div", { key: '1ebc113b76f30abd208374a0cfaa60c3ac6c30d2', class: "d-table gap-2 w-100" }, h(DetailItem, { key: 'f61baf5b0e38d0e1c31d9f32109d4eb87a1dcc51', title: "ID", value: this.payout.account_id }), h(DetailItem, { key: '01aa558d404b8bb3d170812828ee0929e60bc2c9', title: "Account Type", value: this.payout.bank_account.account_type }), h(DetailItem, { key: '8298458ba6dc9bcdaa7f992d530e179e3d8a3bc3', title: "Institution", value: this.payout.bank_account.account_type }), h(DetailItem, { key: 'b15a016b489bd61f55670beec610f49c56659b87', title: "Routing Number", value: this.payout.bank_account.routing_number }), h(DetailItem, { key: 'cd9e466eaadf645fcabad56c1ee2493e6f5ac11c', title: "Account Number", value: this.payout.bank_account.account_number_last4 })), h(DetailSectionTitle, { key: 'b30058d0ebd67c91ba182e1e2231ff72d9adf5c5', sectionTitle: 'Metadata' }), h("div", { key: '02876e9c23abea853218c78b99e1b46795af7a93', class: "d-table gap-2 w-100" }, h(CodeBlock, { key: '9e6dee3bda335ff836e650741a00b75800da7dab', metadata: this.payout.metadata })))))));
61
61
  }
62
62
  static get watchers() { return {
63
63
  "getPayout": ["getPayoutWatcher"]
@@ -154,8 +154,8 @@ const PayoutsListCore = /*@__PURE__*/ proxyCustomElement(class PayoutsListCore e
154
154
  return !this.showEmptyState && !this.showErrorState;
155
155
  }
156
156
  render() {
157
- return (h(StyledHost, { key: 'c88e9dcab68723440f7ad47f526062f4fcda8f4f', exportedparts: tableExportedParts }, h("div", { key: 'b13a1f79bfba76fdb419aabe3b431b0635ee3e85', class: "row gy-3 mb-4" }, h("div", { key: '1fa57ea19b1d41fcac7a04e327ba4b21ed85eafb', class: "col-2" }, h("form-control-date", { key: '55d59be93d4d02c0e6167eb50710eae18f49dc06', name: "created_after", label: "Date from:", inputHandler: this.handleDateChange })), h("div", { key: '24385e4d4f590ffb6b7ecff89320c1a87d71126f', class: "col-2" }, h("form-control-date", { key: 'ed249c729426708374fb69b3d169111a30a76dff', name: "created_before", label: "Date to:", inputHandler: this.handleDateChange }))), h("div", { key: '6be333c9a3263b15133761367d7a2ee796c9524a', class: "table-wrapper" }, h("table", { key: '97ac365de170c104db10742fc0c626006bd70e47', class: "table table-hover" }, h("thead", { key: '4673ee790f8e8f1d9a997cb20412d60fefe77ff4', class: "table-head sticky-top", part: "table-head" }, h("tr", { key: '8067c08e488007909f84cf89dddf0b30a315444b', class: "table-light text-nowrap", part: "table-head-row" }, this.columnData.map((column) => (h("th", { part: "table-head-cell", scope: "col", title: Array.isArray(column) ? column[1] : '' }, Array.isArray(column) ? column[0] : column))))), h("tbody", { key: 'd872bc8f1cd0301de6d7784ec109aa14d04ed9d5', class: "table-body", part: "table-body" }, h(TableLoadingState, { key: '761841567c65b07d8875ac5a97138c3e5388d388', columnSpan: this.columnData.length, isLoading: this.loading }), h(TableEmptyState, { key: 'a1f92c9da78ac90454451788970fb7971eb4131f', isEmpty: this.showEmptyState, columnSpan: this.columnData.length }), h(TableErrorState, { key: 'e60d36c840f97fa48ba9b575d013efaa59653cc8', columnSpan: this.columnData.length, errorMessage: this.errorMessage }), this.showRowData &&
158
- this.rowData.map((data, index) => (h("tr", { "data-test-id": "table-row", "data-row-entity-id": this.entityId[index], onClick: this.rowClickHandler, part: `table-row ${index % 2 ? 'table-row-even' : 'table-row-odd'}` }, data.map((dataEntry) => ((dataEntry === null || dataEntry === void 0 ? void 0 : dataEntry.type) ? (h("td", { part: "table-cell", innerHTML: dataEntry.value })) : (h("td", { part: "table-cell" }, dataEntry)))))))), this.paging && (h("tfoot", { key: '3302c26fbf7a0fd0632aee60b0bb8ee105404d17', class: "sticky-bottom" }, h("tr", { key: '3768a133e08940cb7ce3944f855fc0d6ace429ef', class: "table-light align-middle" }, h("td", { key: '9ad8ab1254b998b12436bf5330d0d1d96b8a2f6e', part: "pagination-bar", colSpan: this.columnData.length }, h("pagination-menu", { key: '9664a7f0e5e1ee4ac366574dce1669d613871094', paging: Object.assign(Object.assign({}, this.paging), { handleClickPrevious: this.handleClickPrevious, handleClickNext: this.handleClickNext }), params: this.params })))))))));
157
+ return (h(StyledHost, { key: 'c160bca06a40b0bde1d0ecf3bbbf081535c23487', exportedparts: tableExportedParts }, h("div", { key: 'ba6b1418212fc79f2eb4a2c4835de9f2df7fd8e9', class: "row gy-3 mb-4" }, h("div", { key: '0c7323ec2551a29df6a9e273e53ca965b4422ce5', class: "col-2" }, h("form-control-date", { key: 'f3cd038ef750e1022e29dba96e201e669f0d2f84', name: "created_after", label: "Date from:", inputHandler: this.handleDateChange })), h("div", { key: '46f0a88e563ace9d4476940abec758721e40d217', class: "col-2" }, h("form-control-date", { key: 'c80de9111c3b4fb9c526c0668b4154753fd78ebd', name: "created_before", label: "Date to:", inputHandler: this.handleDateChange }))), h("div", { key: '570a74e2c87f2d685f932c5a0182a77a7cf296c0', class: "table-wrapper" }, h("table", { key: 'dba141a302aeb90c45bb64171870bf1cd097576b', class: "table table-hover" }, h("thead", { key: 'ea6fb0e3d3aecf89216d310bc66874602a64af40', class: "table-head sticky-top", part: "table-head" }, h("tr", { key: 'daa4eab66cdaad6af240704f24c1e22f9d1ff999', class: "table-light text-nowrap", part: "table-head-row" }, this.columnData.map((column) => (h("th", { part: "table-head-cell", scope: "col", title: Array.isArray(column) ? column[1] : '' }, Array.isArray(column) ? column[0] : column))))), h("tbody", { key: '1f7ffd08ce54fe4b47560e3465e18bd163065be0', class: "table-body", part: "table-body" }, h(TableLoadingState, { key: '8a2668b61449c0a16183bff5a2de120cb8898922', columnSpan: this.columnData.length, isLoading: this.loading }), h(TableEmptyState, { key: 'a419e933f349cc126afac309c0647a985590dfc5', isEmpty: this.showEmptyState, columnSpan: this.columnData.length }), h(TableErrorState, { key: 'b3a0267af5bdfdf7ca28caa4b2427437fb6f806f', columnSpan: this.columnData.length, errorMessage: this.errorMessage }), this.showRowData &&
158
+ this.rowData.map((data, index) => (h("tr", { "data-test-id": "table-row", "data-row-entity-id": this.entityId[index], onClick: this.rowClickHandler, part: `table-row ${index % 2 ? 'table-row-even' : 'table-row-odd'}` }, data.map((dataEntry) => ((dataEntry === null || dataEntry === void 0 ? void 0 : dataEntry.type) ? (h("td", { part: "table-cell", innerHTML: dataEntry.value })) : (h("td", { part: "table-cell" }, dataEntry)))))))), this.paging && (h("tfoot", { key: '11aabf956abf100c8988c7fc0dc6fe1327b0a45d', class: "sticky-bottom" }, h("tr", { key: '37bf8a636469e15cb73d0730e2a2269decc83693', class: "table-light align-middle" }, h("td", { key: '785d2f4b39153842a9a9a0ab40ace7c2a35c6b6c', part: "pagination-bar", colSpan: this.columnData.length }, h("pagination-menu", { key: 'f39e621434687eab1b7fccdfda56cbecfe59d64d', paging: Object.assign(Object.assign({}, this.paging), { handleClickPrevious: this.handleClickPrevious, handleClickNext: this.handleClickNext }), params: this.params })))))))));
159
159
  }
160
160
  static get watchers() { return {
161
161
  "params": ["updateOnPropChange"],
@@ -43,7 +43,7 @@ const TableFiltersMenu = /*@__PURE__*/ proxyCustomElement(class TableFiltersMenu
43
43
  this.menu.classList.remove('show');
44
44
  }
45
45
  render() {
46
- return (h("div", { key: '26c76e4989db63505bbb6d4ecfed10f964839c73', class: "d-flex gap-2" }, h("div", { key: '5b9b28d3c1daeb5c38fd5f2fb2529e8251f6d193', class: "dropdown pb-3" }, h(Button, { key: '45adcccffe23b4d357f0870f961eecfa0a8b3199', variant: "primary", type: "button dropdown-toggle", ref: (el) => (this.anchorButton = el), class: "btn btn-primary dropdown-toggle", "data-test-id": "open-filters-button", "data-bs-toggle": "dropdown" }, "Filters"), h("custom-popper", { key: '8f381f3db3956a642107bba64f2a2a4370bae2cf', offset: [20, 10], strategy: "fixed", anchorRef: this.anchorButton, trigger: "click" }, h("form", { key: '8e5cb0a64848e0720732fc95206deaf56ca338c9', class: "dropdown-menu", part: "dropdown-menu", "data-test-id": "filter-menu", ref: (el) => (this.menu = el), onSubmit: (e) => e.preventDefault() }, h("slot", { key: 'a102749963913d0a58e0210ea9c3bf3d4a14c1f3' })))), h("div", { key: 'ac38e6b46ce79967e66da4d40c0778df0b07e1a6' }, h(Button, { key: '2c8ef6ff571121b8cab1b17f2ac7035792f1d7f4', variant: "secondary", onClick: () => this.clearParams(), hidden: !this.showClearButton, "data-test-id": "clear-filters-button" }, "Clear Filters"))));
46
+ return (h("div", { key: 'dd6aae6e43579e8f833b1f3f6a6227d2522d79ec', class: "d-flex gap-2" }, h("div", { key: '6decd268cf11d67c3f9e3c2b22e60cbdf328763a', class: "dropdown pb-3" }, h(Button, { key: 'af22247916f55da650da95006e3317316a4122f5', variant: "primary", type: "button dropdown-toggle", ref: (el) => (this.anchorButton = el), class: "btn btn-primary dropdown-toggle", "data-test-id": "open-filters-button", "data-bs-toggle": "dropdown" }, "Filters"), h("custom-popper", { key: '0516d664adf8feccb9dd9cb74023241867285bd6', offset: [20, 10], strategy: "fixed", anchorRef: this.anchorButton, trigger: "click" }, h("form", { key: 'd42f891b0b30fa152e03bfe3fbcb12da4707974b', class: "dropdown-menu", part: "dropdown-menu", "data-test-id": "filter-menu", ref: (el) => (this.menu = el), onSubmit: (e) => e.preventDefault() }, h("slot", { key: '77eb00715458275e6df23da973103046364f50aa' })))), h("div", { key: 'c9070c2d5ee453cf3a97908514877975c55813b8' }, h(Button, { key: '99b38ff5ac51ee21227832b2200f2dcdec40a70c', variant: "secondary", onClick: () => this.clearParams(), hidden: !this.showClearButton, "data-test-id": "clear-filters-button" }, "Clear Filters"))));
47
47
  }
48
48
  static get watchers() { return {
49
49
  "params": ["watchParamsHandler"]
@@ -170,6 +170,7 @@ export interface IApplicationFee {
170
170
  updated_at: string;
171
171
  }
172
172
  export interface PaymentsParams {
173
+ payment_id?: string;
173
174
  terminal_id?: string;
174
175
  payment_status?: PaymentStatuses;
175
176
  created_after?: string;
@@ -1,9 +1,9 @@
1
1
  import { IApiResponseCollection, IApiResponse, IPayment } from '..';
2
2
  export interface IPaymentService {
3
- fetchPayments(accountId: string, authToken: string, params: any): Promise<IApiResponseCollection<IPayment[]>>;
3
+ fetchPayments(accountId: string, authToken: string, params: any, apiOrigin?: string): Promise<IApiResponseCollection<IPayment[]>>;
4
4
  fetchPayment(paymentId: string, authToken: string): Promise<IApiResponse<IPayment>>;
5
5
  }
6
6
  export declare class PaymentService implements IPaymentService {
7
- fetchPayments(accountId: string, authToken: string, params: any): Promise<IApiResponseCollection<IPayment[]>>;
7
+ fetchPayments(accountId: string, authToken: string, params: any, apiOrigin?: string): Promise<IApiResponseCollection<IPayment[]>>;
8
8
  fetchPayment(paymentId: string, authToken: string): Promise<IApiResponse<IPayment>>;
9
9
  }
@@ -1,7 +1,8 @@
1
- export declare const makeGetPayments: ({ id, authToken, service }: {
1
+ export declare const makeGetPayments: ({ id, authToken, service, apiOrigin }: {
2
2
  id: any;
3
3
  authToken: any;
4
4
  service: any;
5
+ apiOrigin: any;
5
6
  }) => ({ params, onSuccess, onError }: {
6
7
  params: any;
7
8
  onSuccess: any;
@@ -24,10 +24,11 @@ import JustifiAnalytics from '../../api/Analytics';
24
24
  * @exportedPart next-button-text: Text for Next button
25
25
  */
26
26
  export declare class PaymentsList {
27
- accountId: string;
28
- authToken: string;
29
27
  getPayments: Function;
30
28
  errorMessage: string;
29
+ accountId: string;
30
+ authToken: string;
31
+ apiOrigin?: string;
31
32
  errorEvent: EventEmitter<ComponentError>;
32
33
  analytics: JustifiAnalytics;
33
34
  componentWillLoad(): void;
@@ -585,6 +585,7 @@ export namespace Components {
585
585
  */
586
586
  interface JustifiPaymentsList {
587
587
  "accountId": string;
588
+ "apiOrigin"?: string;
588
589
  "authToken": string;
589
590
  }
590
591
  interface JustifiPayoutDetails {
@@ -2946,6 +2947,7 @@ declare namespace LocalJSX {
2946
2947
  */
2947
2948
  interface JustifiPaymentsList {
2948
2949
  "accountId"?: string;
2950
+ "apiOrigin"?: string;
2949
2951
  "authToken"?: string;
2950
2952
  "onError-event"?: (event: JustifiPaymentsListCustomEvent<ComponentError>) => void;
2951
2953
  }
@@ -0,0 +1 @@
1
+ import{r as s,c as i,h as t}from"./p-fad19d75.js";import{J as o}from"./p-707bdf68.js";import{a as e,C as r}from"./p-14c91ffd.js";import{m as n,a}from"./p-5968ff8a.js";import{B as p}from"./p-401d6607.js";import{c as h}from"./p-5a62fca2.js";import{A as d}from"./p-7d3be485.js";import{c}from"./p-b91bcbfc.js";import"./p-35846553.js";import"./p-8115b2f4.js";class m{async postProvisioning(s,i,t){const o={business_id:i,product_category:t};return d({authToken:s,apiOrigin:h.proxyApiOrigin}).post("entities/provisioning",o)}}const u=class{constructor(t){s(this,t),this.errorEvent=i(this,"error-event",7),this.postProvisioning=void 0,this.getBusiness=void 0,this.businessId=void 0,this.authToken=void 0,this.allowOptionalFields=!1,this.formTitle="Business Information"}propChanged(){this.initializeApi()}componentWillLoad(){c(),this.analytics=new o(this),this.initializeApi()}disconnectedCallback(){this.analytics.cleanup()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=n({authToken:this.authToken,businessId:this.businessId,service:new p}),this.postProvisioning=a({authToken:this.authToken,businessId:this.businessId,product:"payment",service:new m})):this.errorEvent.emit({message:"auth-token and business-id are required",errorCode:e.MISSING_PROPS,severity:r.ERROR})}render(){return t("justifi-payment-provisioning-core",{key:"82b3601d3349a92bed1aa93e2a847039d7493c04",businessId:this.businessId,authToken:this.authToken,allowOptionalFields:this.allowOptionalFields,formTitle:this.formTitle,getBusiness:this.getBusiness,postProvisioning:this.postProvisioning})}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}};export{u as justifi_payment_provisioning}
@@ -1 +1 @@
1
- import{r as e,c as t,h as a}from"./p-fad19d75.js";import{c as o}from"./p-5a62fca2.js";import{J as r}from"./p-437f9114.js";import"./p-8281f09a.js";import"./p-7d3be485.js";const i=class{constructor(a){e(this,a),this.bankAccountFormReady=t(this,"bankAccountFormReady",7),this.ready=t(this,"ready",7),this.bankAccountFormTokenized=t(this,"bankAccountFormTokenize",7),this.bankAccountFormValidated=t(this,"bankAccountFormValidate",7),this.validationMode=void 0,this.iframeOrigin=o.iframeOrigin,this.internalStyleOverrides=void 0}readyHandler(e){console.warn("The 'bankAccountFormReady' event is deprecated in the next major release and will be renamed to 'ready'"),this.bankAccountFormReady.emit(e),this.ready.emit(e)}tokenizeHandler(e){console.warn("The 'bankAccountFormTokenized' event is deprecated in the next major release. Please refer to the documentation for the migration process and alternative approach. This method will be removed in the future."),this.bankAccountFormTokenized.emit(e)}validateHandler(e){console.warn("The 'bankAccountFormValidate' event is deprecated in the next major release. Please refer to the documentation for the migration process and alternative approach. This method will be removed in the future."),this.bankAccountFormValidated.emit(e)}componentWillLoad(){this.analytics=new r(this)}disconnectedCallback(){this.analytics.cleanup()}async tokenize(...e){if(!this.childRef)throw new Error("Cannot call tokenize");return this.childRef.tokenize(...e)}async validate(){if(!this.childRef)throw new Error("Cannot call validate");return this.childRef.validate()}async resize(){if(console.warn("The 'resize' method is deprecated and will be removed in the next major release. Please refer to the documentation for the migration process and alternative approach."),!this.childRef)throw new Error("Cannot call validate");return this.childRef.resize()}render(){return a("justifi-payment-method-form",{key:"e2fa64d199a6c550329c9797a6951335e7c12bc6",ref:e=>{e&&(this.childRef=e)},"iframe-origin":this.iframeOrigin,"payment-method-form-type":"bankAccount","payment-method-form-ready":this.bankAccountFormReady,"payment-method-form-validated":this.bankAccountFormValidated,"payment-method-form-tokenize":this.bankAccountFormTokenized,"payment-method-form-validation-mode":this.validationMode||"onSubmit"})}};export{i as justifi_bank_account_form}
1
+ import{r as e,c as t,h as a}from"./p-fad19d75.js";import{c as o}from"./p-5a62fca2.js";import{J as r}from"./p-707bdf68.js";import"./p-35846553.js";import"./p-7d3be485.js";const i=class{constructor(a){e(this,a),this.bankAccountFormReady=t(this,"bankAccountFormReady",7),this.ready=t(this,"ready",7),this.bankAccountFormTokenized=t(this,"bankAccountFormTokenize",7),this.bankAccountFormValidated=t(this,"bankAccountFormValidate",7),this.validationMode=void 0,this.iframeOrigin=o.iframeOrigin,this.internalStyleOverrides=void 0}readyHandler(e){console.warn("The 'bankAccountFormReady' event is deprecated in the next major release and will be renamed to 'ready'"),this.bankAccountFormReady.emit(e),this.ready.emit(e)}tokenizeHandler(e){console.warn("The 'bankAccountFormTokenized' event is deprecated in the next major release. Please refer to the documentation for the migration process and alternative approach. This method will be removed in the future."),this.bankAccountFormTokenized.emit(e)}validateHandler(e){console.warn("The 'bankAccountFormValidate' event is deprecated in the next major release. Please refer to the documentation for the migration process and alternative approach. This method will be removed in the future."),this.bankAccountFormValidated.emit(e)}componentWillLoad(){this.analytics=new r(this)}disconnectedCallback(){this.analytics.cleanup()}async tokenize(...e){if(!this.childRef)throw new Error("Cannot call tokenize");return this.childRef.tokenize(...e)}async validate(){if(!this.childRef)throw new Error("Cannot call validate");return this.childRef.validate()}async resize(){if(console.warn("The 'resize' method is deprecated and will be removed in the next major release. Please refer to the documentation for the migration process and alternative approach."),!this.childRef)throw new Error("Cannot call validate");return this.childRef.resize()}render(){return a("justifi-payment-method-form",{key:"e2fa64d199a6c550329c9797a6951335e7c12bc6",ref:e=>{e&&(this.childRef=e)},"iframe-origin":this.iframeOrigin,"payment-method-form-type":"bankAccount","payment-method-form-ready":this.bankAccountFormReady,"payment-method-form-validated":this.bankAccountFormValidated,"payment-method-form-tokenize":this.bankAccountFormTokenized,"payment-method-form-validation-mode":this.validationMode||"onSubmit"})}};export{i as justifi_bank_account_form}
@@ -1 +1 @@
1
- import{r as e,c as t,h as r}from"./p-fad19d75.js";import{c as a}from"./p-5a62fca2.js";import{J as i}from"./p-437f9114.js";import"./p-8281f09a.js";import"./p-7d3be485.js";const o=class{constructor(r){e(this,r),this.cardFormReady=t(this,"cardFormReady",7),this.ready=t(this,"ready",7),this.cardFormTokenized=t(this,"cardFormTokenize",7),this.cardFormValidated=t(this,"cardFormValidate",7),this.validationMode=void 0,this.iframeOrigin=a.iframeOrigin,this.singleLine=!1,this.internalStyleOverrides=void 0}readyHandler(e){console.warn("The 'cardFormReady' event is deprecated in the next major release and will be renamed to 'ready'"),this.cardFormReady.emit(e),this.ready.emit(e)}tokenizeHandler(e){console.warn("The 'cardFormTokenize' event is deprecated in the next major release. Please refer to the documentation for the migration process and alternative approach. This method will be removed in the future."),this.cardFormTokenized.emit(e)}validateHandler(e){console.warn("The 'cardFormValidate' event is deprecated in the next major release. Please refer to the documentation for the migration process and alternative approach. This method will be removed in the future."),this.cardFormValidated.emit(e)}componentWillLoad(){this.analytics=new i(this)}disconnectedCallback(){this.analytics.cleanup()}async tokenize(...e){if(!this.childRef)throw new Error("Cannot call tokenize");return this.childRef.tokenize(...e)}async validate(){if(!this.childRef)throw new Error("Cannot call validate");return this.childRef.validate()}async resize(){if(console.warn("The 'resize' method is deprecated and will be removed in the next major release. Please refer to the documentation for the migration process and alternative approach."),!this.childRef)throw new Error("Cannot call validate");return this.childRef.resize()}render(){return r("justifi-payment-method-form",{key:"58843b8a47f35d716845de11f6a66d8960bc0776",ref:e=>{e&&(this.childRef=e)},"iframe-origin":this.iframeOrigin,"payment-method-form-type":"card","single-line":this.singleLine,"payment-method-form-ready":this.cardFormReady,"payment-method-form-validate":this.cardFormValidated,"payment-method-form-tokenize":this.cardFormTokenized,"payment-method-form-validation-mode":this.validationMode||"onSubmit"})}};export{o as justifi_card_form}
1
+ import{r as e,c as t,h as r}from"./p-fad19d75.js";import{c as a}from"./p-5a62fca2.js";import{J as i}from"./p-707bdf68.js";import"./p-35846553.js";import"./p-7d3be485.js";const o=class{constructor(r){e(this,r),this.cardFormReady=t(this,"cardFormReady",7),this.ready=t(this,"ready",7),this.cardFormTokenized=t(this,"cardFormTokenize",7),this.cardFormValidated=t(this,"cardFormValidate",7),this.validationMode=void 0,this.iframeOrigin=a.iframeOrigin,this.singleLine=!1,this.internalStyleOverrides=void 0}readyHandler(e){console.warn("The 'cardFormReady' event is deprecated in the next major release and will be renamed to 'ready'"),this.cardFormReady.emit(e),this.ready.emit(e)}tokenizeHandler(e){console.warn("The 'cardFormTokenize' event is deprecated in the next major release. Please refer to the documentation for the migration process and alternative approach. This method will be removed in the future."),this.cardFormTokenized.emit(e)}validateHandler(e){console.warn("The 'cardFormValidate' event is deprecated in the next major release. Please refer to the documentation for the migration process and alternative approach. This method will be removed in the future."),this.cardFormValidated.emit(e)}componentWillLoad(){this.analytics=new i(this)}disconnectedCallback(){this.analytics.cleanup()}async tokenize(...e){if(!this.childRef)throw new Error("Cannot call tokenize");return this.childRef.tokenize(...e)}async validate(){if(!this.childRef)throw new Error("Cannot call validate");return this.childRef.validate()}async resize(){if(console.warn("The 'resize' method is deprecated and will be removed in the next major release. Please refer to the documentation for the migration process and alternative approach."),!this.childRef)throw new Error("Cannot call validate");return this.childRef.resize()}render(){return r("justifi-payment-method-form",{key:"58843b8a47f35d716845de11f6a66d8960bc0776",ref:e=>{e&&(this.childRef=e)},"iframe-origin":this.iframeOrigin,"payment-method-form-type":"card","single-line":this.singleLine,"payment-method-form-ready":this.cardFormReady,"payment-method-form-validate":this.cardFormValidated,"payment-method-form-tokenize":this.cardFormTokenized,"payment-method-form-validation-mode":this.validationMode||"onSubmit"})}};export{o as justifi_card_form}
@@ -1 +1 @@
1
- const e={name:"@justifi/webcomponents",version:"4.20.0",description:"JustiFi Web Components",collection:"dist/collection/collection-manifest.json",main:"dist/index.cjs.js",module:"dist/module/index.js",types:"dist/module/index.d.ts",repository:{type:"git",url:"git+https://github.com/justifi-tech/web-component-library.git"},homepage:"https://storybook.justifi.ai/?path=/docs/introduction--docs",publishConfig:{registry:"https://registry.npmjs.org"},files:["dist/"],scripts:{build:"stencil build --docs",dev:"stencil build --watch",lint:"eslint . --max-warnings 0",clean:"rm -rf .turbo && rm -rf node_modules && rm -rf dist",generate:"stencil generate",test:"TZ=utc stencil test --spec","test:watch":"TZ=utc stencil test --spec --watchAll","test:file":"stencil test --spec --watch --"},dependencies:{"@popperjs/core":"^2.11.8","@stencil/core":"^4.0.5","@stencil/store":"^2.0.8",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.6.0",lodash:"^4.17.21",rxjs:"^7.8.1","ts-dedent":"^2.2.0",uuid:"^9.0.0",yup:"^1.0.0"},devDependencies:{"@babel/preset-env":"^7.21.5","@babel/preset-react":"^7.18.6","@babel/preset-typescript":"^7.21.5","@rollup/plugin-replace":"^6.0.1","@stencil/sass":"^3.0.1","@types/jest":"27.0.3","@types/react":"^18.0.37","@types/react-dom":"^18.0.11",dotenv:"^16.3.1",jest:"^29.7.0","jest-cli":"^29.7.0","jest-environment-node":"^29.7.0","ts-jest":"^29.1.2"},license:"MIT",gitHead:"507bac1d941eae6e1f56e185ecd9bc9d22637783"};export{e as p}
1
+ const e={name:"@justifi/webcomponents",version:"4.20.1",description:"JustiFi Web Components",collection:"dist/collection/collection-manifest.json",main:"dist/index.cjs.js",module:"dist/module/index.js",types:"dist/module/index.d.ts",repository:{type:"git",url:"git+https://github.com/justifi-tech/web-component-library.git"},homepage:"https://storybook.justifi.ai/?path=/docs/introduction--docs",publishConfig:{registry:"https://registry.npmjs.org"},files:["dist/"],scripts:{build:"stencil build --docs",dev:"stencil build --watch",lint:"eslint . --max-warnings 0",clean:"rm -rf .turbo && rm -rf node_modules && rm -rf dist",generate:"stencil generate",test:"TZ=utc stencil test --spec","test:watch":"TZ=utc stencil test --spec --watchAll","test:file":"stencil test --spec --watch --"},dependencies:{"@popperjs/core":"^2.11.8","@stencil/core":"^4.0.5","@stencil/store":"^2.0.8",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.6.0",lodash:"^4.17.21",rxjs:"^7.8.1","ts-dedent":"^2.2.0",uuid:"^9.0.0",yup:"^1.0.0"},devDependencies:{"@babel/preset-env":"^7.21.5","@babel/preset-react":"^7.18.6","@babel/preset-typescript":"^7.21.5","@rollup/plugin-replace":"^6.0.1","@stencil/sass":"^3.0.1","@types/jest":"27.0.3","@types/react":"^18.0.37","@types/react-dom":"^18.0.11",dotenv:"^16.3.1",jest:"^29.7.0","jest-cli":"^29.7.0","jest-environment-node":"^29.7.0","ts-jest":"^29.1.2"},license:"MIT",gitHead:"507bac1d941eae6e1f56e185ecd9bc9d22637783"};export{e as p}
@@ -1 +1 @@
1
- import{r as e,c as n,h as o,H as i}from"./p-fad19d75.js";import{p as t}from"./p-8281f09a.js";import{k as r}from"./p-5e2c9ec8.js";var a,s={exports:{}};a=s,console.info("\nIFRAME-RESIZER\n\nIframe-Resizer 5 is now available via the following two packages:\n\n * @iframe-resizer/parent\n * @iframe-resizer/child\n\nAdditionally their are also new versions of iframe-resizer for React, Vue, and jQuery.\n\nVersion 5 of iframe-resizer has been extensively rewritten to use modern browser APIs, which has enabled significantly better performance and greater accuracy in the detection of content resizing events.\n\nPlease see https://iframe-resizer.com/upgrade for more details.\n"),function(e){if("undefined"!=typeof window){var n,o,i=0,t=!1,r=!1,s=7,c="[iFrameSizer]",d=c.length,f=null,u=window.requestAnimationFrame,l=Object.freeze({max:1,scroll:1,bodyScroll:1,documentElementScroll:1}),m={},h=null,w=Object.freeze({autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,license:"1jqr0si6pnt",log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,mouseEvents:!0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClose:function(){return!0},onClosed:function(){},onInit:function(){},onMessage:function(){z("onMessage function not defined")},onMouseEnter:function(){},onMouseLeave:function(){},onResized:function(){},onScroll:function(){return!0}}),b={};window.jQuery!==e&&((o=window.jQuery).fn?o.fn.iFrameResize||(o.fn.iFrameResize=function(e){return this.filter("iframe").each((function(n,o){H(o,e)})).end()}):k("","Unable to bind to jQuery, it is not fully loaded.")),"function"==typeof e&&e.amd?e([],q):a.exports=q(),window.iFrameResize=window.iFrameResize||q()}function g(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function p(e,n,o){e.addEventListener(n,o,!1)}function y(e,n,o){e.removeEventListener(n,o,!1)}function v(e){return m[e]?m[e].log:t}function j(e,n){x("log",e,n,v(e))}function k(e,n){x("info",e,n,v(e))}function z(e,n){x("warn",e,n,!0)}function x(e,n,o,i){!0===i&&"object"==typeof window.console&&console[e](function(e){return c+"["+function(e){var n="Host page: "+e;return window.top!==window.self&&(n=window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+e:"Nested host page: "+e),n}(e)+"]"}(n),o)}function F(e){function n(){o("Height"),o("Width"),E((function(){W(L),R(V),h("onResized",L)}),L,"init")}function o(e){var n=Number(m[V]["max"+e]),o=Number(m[V]["min"+e]),i=e.toLowerCase(),t=Number(L[i]);j(V,"Checking "+i+" is in range "+o+"-"+n),t<o&&(t=o,j(V,"Set "+i+" to min value")),t>n&&(t=n,j(V,"Set "+i+" to max value")),L[i]=""+t}function i(e){return H.slice(H.indexOf(":")+s+e)}function t(e,n){var o,i;o=function(){var o,i;N("Send Page Info","pageInfo:"+(o=document.body.getBoundingClientRect(),i=L.iframe.getBoundingClientRect(),JSON.stringify({iframeHeight:i.height,iframeWidth:i.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(i.top-o.top,10),offsetLeft:parseInt(i.left-o.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,documentHeight:document.documentElement.clientHeight,documentWidth:document.documentElement.clientWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})),e,n)},b[i=n]||(b[i]=setTimeout((function(){b[i]=null,o()}),32))}function r(e){var n=e.getBoundingClientRect();return O(V),{x:Math.floor(Number(n.left)+Number(f.x)),y:Math.floor(Number(n.top)+Number(f.y))}}function a(e){var n=e?r(L.iframe):{x:0,y:0},o={x:Number(L.width)+n.x,y:Number(L.height)+n.y};j(V,"Reposition requested from iFrame (offset x:"+n.x+" y:"+n.y+")"),window.top===window.self?(f=o,u(),j(V,"--")):window.parentIFrame?window.parentIFrame["scrollTo"+(e?"Offset":"")](o.x,o.y):z(V,"Unable to scroll to requested position, window.parentIFrame not found")}function u(){!1===h("onScroll",f)?T():R(V)}function l(e){var n={};if(0===Number(L.width)&&0===Number(L.height)){var o=i(9).split(":");n={x:o[1],y:o[0]}}else n={x:L.width,y:L.height};h(e,{iframe:L.iframe,screenX:Number(n.x),screenY:Number(n.y),type:L.type})}function h(e,n){return M(V,e,n)}var w,g,v,x,F,I,H=e.data,L={},V=null;"[iFrameResizerChild]Ready"===H?function(){for(var e in m)N("iFrame requested init",A(e),m[e].iframe,e)}():c===(""+H).slice(0,d)&&H.slice(d).split(":")[0]in m?(x=(v=H.slice(d).split(":"))[1]?parseInt(v[1],10):0,F=m[v[0]]&&m[v[0]].iframe,I=getComputedStyle(F),L={iframe:F,id:v[0],height:x+function(e){return"border-box"!==e.boxSizing?0:(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}(I)+function(e){return"border-box"!==e.boxSizing?0:(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}(I),width:v[2],type:v[3]},m[V=L.id]&&(m[V].loaded=!0),(g=L.type in{true:1,false:1,undefined:1})&&j(V,"Ignoring init message from meta parent page"),!g&&function(e){var n=!0;return m[e]||(n=!1,z(L.type+" No settings for "+e+". Message was: "+H)),n}(V)&&(j(V,"Received: "+H),w=!0,null===L.iframe&&(z(V,"IFrame ("+L.id+") not found"),w=!1),w&&function(){var n,o=e.origin,i=m[V]&&m[V].checkOrigin;if(i&&""+o!="null"&&!(i.constructor===Array?function(){var e=0,n=!1;for(j(V,"Checking connection is from allowed list of origins: "+i);e<i.length;e++)if(i[e]===o){n=!0;break}return n}():(j(V,"Checking connection is from: "+(n=m[V]&&m[V].remoteHost)),o===n)))throw new Error("Unexpected message received from: "+o+" for "+L.iframe.id+". Message was: "+e.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return!0}()&&function(){switch(m[V]&&m[V].firstRun&&m[V]&&(m[V].firstRun=!1),L.type){case"close":S(L.iframe);break;case"message":d=i(6),j(V,"onMessage passed: {iframe: "+L.iframe.id+", message: "+d+"}"),h("onMessage",{iframe:L.iframe,message:JSON.parse(d)}),j(V,"--");break;case"mouseenter":l("onMouseEnter");break;case"mouseleave":l("onMouseLeave");break;case"autoResize":m[V].autoResize=JSON.parse(i(9));break;case"scrollTo":a(!1);break;case"scrollToOffset":a(!0);break;case"pageInfo":t(m[V]&&m[V].iframe,V),function(){function e(e,i){function r(){m[o]?t(m[o].iframe,o):n()}["scroll","resize"].forEach((function(n){j(o,e+n+" listener for sendPageInfo"),i(window,n,r)}))}function n(){e("Remove ",y)}var o=V;e("Add ",p),m[o]&&(m[o].stopPageInfo=n)}();break;case"pageInfoStop":m[V]&&m[V].stopPageInfo&&(m[V].stopPageInfo(),delete m[V].stopPageInfo);break;case"inPageLink":o=i(9).split("#")[1]||"",s=decodeURIComponent(o),(c=document.getElementById(s)||document.getElementsByName(s)[0])?(e=r(c),j(V,"Moving to in page link (#"+o+") at x: "+e.x+" y: "+e.y),f={x:e.x,y:e.y},u(),j(V,"--")):window.top===window.self?j(V,"In page link #"+o+" not found"):window.parentIFrame?window.parentIFrame.moveToAnchor(o):j(V,"In page link #"+o+" not found and window.parentIFrame not found");break;case"reset":C(L);break;case"init":n(),h("onInit",L.iframe);break;default:0===Number(L.width)&&0===Number(L.height)?z("Unsupported message received ("+L.type+"), this is likely due to the iframe containing a later version of iframe-resizer than the parent page"):n()}var e,o,s,c,d}())):k(V,"Ignored: "+H)}function M(e,n,o){var i=null,t=null;if(m[e]){if("function"!=typeof(i=m[e][n]))throw new TypeError(n+" on iFrame["+e+"] is not a function");t=i(o)}return t}function I(e){delete m[e.id]}function S(e){var o=e.id;if(!1!==M(o,"onClose",o)){j(o,"Removing iFrame: "+o);try{e.parentNode&&e.parentNode.removeChild(e)}catch(e){z(e)}M(o,"onClosed",o),j(o,"--"),I(e),n&&(n.disconnect(),n=null)}else j(o,"Close iframe cancelled by onClose event")}function O(n){null===f&&j(n,"Get page position: "+(f={x:window.pageXOffset===e?document.documentElement.scrollLeft:window.pageXOffset,y:window.pageYOffset===e?document.documentElement.scrollTop:window.pageYOffset}).x+","+f.y)}function R(e){null!==f&&(window.scrollTo(f.x,f.y),j(e,"Set page position: "+f.x+","+f.y),T())}function T(){f=null}function C(e){j(e.id,"Size reset requested by "+("init"===e.type?"host page":"iFrame")),O(e.id),E((function(){W(e),N("reset","reset",e.iframe,e.id)}),e,"reset")}function W(e){function n(n){r||"0"!==e[n]||(r=!0,j(i,"Hidden iFrame detected, creating visibility listener"),function(){function e(){Object.keys(m).forEach((function(e){!function(e){function n(n){return"0px"===(m[e]&&m[e].iframe.style[n])}m[e]&&null!==m[e].iframe.offsetParent&&(n("height")||n("width"))&&N("Visibility change","resize",m[e].iframe,e)}(e)}))}function n(n){j("window","Mutation observed: "+n[0].target+" "+n[0].type),L(e,16)}var o,i=g();i&&(o=document.querySelector("body"),new i(n).observe(o,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0}))}())}function o(o){!function(n){e.id?(e.iframe.style[n]=e[n]+"px",j(e.id,"IFrame ("+i+") "+n+" set to "+e[n]+"px")):j("undefined","messageData id not set")}(o),n(o)}var i=e.iframe.id;m[i]&&(m[i].sizeHeight&&o("height"),m[i].sizeWidth&&o("width"))}function E(e,n,o){o!==n.type&&u&&!window.jasmine?(j(n.id,"Requesting animation frame"),u(e)):e()}function N(e,n,o,i,t){var r,a=!1;m[i=i||o.id]&&(o&&"contentWindow"in o&&null!==o.contentWindow?(j(i,"["+e+"] Sending msg to iframe["+i+"] ("+n+") targetOrigin: "+(r=m[i]&&m[i].targetOrigin)),o.contentWindow.postMessage(c+n,r)):z(i,"["+e+"] IFrame("+i+") not found"),t&&m[i]&&m[i].warningTimeout&&(m[i].msgTimeout=setTimeout((function(){!m[i]||m[i].loaded||a||(a=!0,z(i,"IFrame has not responded within "+m[i].warningTimeout/1e3+" seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."))}),m[i].warningTimeout)))}function A(e){return e+":"+m[e].bodyMarginV1+":"+m[e].sizeWidth+":"+m[e].log+":"+m[e].interval+":"+m[e].enablePublicMethods+":"+m[e].autoResize+":"+m[e].bodyMargin+":"+m[e].heightCalculationMethod+":"+m[e].bodyBackground+":"+m[e].bodyPadding+":"+m[e].tolerance+":"+m[e].inPageLinks+":"+m[e].resizeFrom+":"+m[e].widthCalculationMethod+":"+m[e].mouseEvents}function H(o,r){function a(e){var n=e.split("Callback");if(2===n.length){var o="on"+n[0].charAt(0).toUpperCase()+n[0].slice(1);this[o]=this[e],delete this[e],z(d,"Deprecated: '"+e+"' has been renamed '"+o+"'. The old method will be removed in the next major version.")}}var s,c,d=function(e){if("string"!=typeof e)throw new TypeError("Invaild id for iFrame. Expected String");var n;return""===e&&(o.id=(n=r&&r.id||w.id+i++,null!==document.getElementById(n)&&(n+=i++),e=n),t=(r||{}).log,j(e,"Added missing iframe ID: "+e+" ("+o.src+")")),e}(o.id);d in m&&"iFrameResizer"in o?z(d,"Ignored iFrame, already setup."):(function(e){var n;e=e||{},m[d]=Object.create(null),m[d].iframe=o,m[d].firstRun=!0,m[d].remoteHost=o.src&&o.src.split("/").slice(0,3).join("/"),function(e){if("object"!=typeof e)throw new TypeError("Options is not an object")}(e),Object.keys(e).forEach(a,e),function(e){for(var n in w)Object.prototype.hasOwnProperty.call(w,n)&&(m[d][n]=Object.prototype.hasOwnProperty.call(e,n)?e[n]:w[n])}(e),m[d]&&(m[d].targetOrigin=!0===m[d].checkOrigin?""===(n=m[d].remoteHost)||null!==n.match(/^(about:blank|javascript:|file:\/\/)/)?"*":n:"*")}(r),function(){switch(j(d,"IFrame scrolling "+(m[d]&&m[d].scrolling?"enabled":"disabled")+" for "+d),o.style.overflow=!1===(m[d]&&m[d].scrolling)?"hidden":"auto",m[d]&&m[d].scrolling){case"omit":break;case!0:o.scrolling="yes";break;case!1:o.scrolling="no";break;default:o.scrolling=m[d]?m[d].scrolling:"no"}}(),function(){function e(e){var n=m[d][e];1/0!==n&&0!==n&&(o.style[e]="number"==typeof n?n+"px":n,j(d,"Set "+e+" = "+o.style[e]))}function n(e){if(m[d]["min"+e]>m[d]["max"+e])throw new Error("Value for min"+e+" can not be greater than max"+e)}n("Height"),n("Width"),e("maxHeight"),e("minHeight"),e("maxWidth"),e("minWidth")}(),"number"!=typeof(m[d]&&m[d].bodyMargin)&&"0"!==(m[d]&&m[d].bodyMargin)||(m[d].bodyMarginV1=m[d].bodyMargin,m[d].bodyMargin=m[d].bodyMargin+"px"),s=A(d),(c=g())&&(n=function(e){if(!o.parentNode)return null;var n=new e((function(e){e.forEach((function(e){Array.prototype.slice.call(e.removedNodes).forEach((function(e){e===o&&S(o)}))}))}));return n.observe(o.parentNode,{childList:!0}),n}(c)),p(o,"load",(function(){N("iFrame.onload",s,o,e,!0),(!m[d]||!m[d].firstRun)&&m[d]&&m[d].heightCalculationMethod in l&&C({iframe:o,height:0,width:0,type:"init"})})),N("init",s,o,e,!0),m[d]&&(m[d].iframe.iFrameResizer={close:S.bind(null,m[d].iframe),removeListeners:I.bind(null,m[d].iframe),resize:N.bind(null,"Window resize","resize",m[d].iframe),moveToAnchor:function(e){N("Move to anchor","moveToAnchor:"+e,m[d].iframe,d)},sendMessage:function(e){N("Send Message","message:"+(e=JSON.stringify(e)),m[d].iframe,d)}}))}function L(e,n){null===h&&(h=setTimeout((function(){h=null,e()}),n))}function V(){"hidden"!==document.visibilityState&&(j("document","Trigger event: Visibility change"),L((function(){P("Tab Visible","resize")}),16))}function P(e,n){Object.keys(m).forEach((function(o){(function(e){return m[e]&&"parent"===m[e].resizeFrom&&m[e].autoResize&&!m[e].firstRun})(o)&&N(e,n,m[o].iframe,o)}))}function q(){function n(e,n){n&&(function(){if(!n.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==n.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+n.tagName+">")}(),H(n,e),o.push(n))}var o;return function(){var e,n=["moz","webkit","o","ms"];for(e=0;e<n.length&&!u;e+=1)u=window[n[e]+"RequestAnimationFrame"];u?u=u.bind(window):j("setup","RequestAnimationFrame not supported")}(),p(window,"message",F),p(window,"resize",(function(){j("window","Trigger event: resize"),L((function(){P("Window resize","resize")}),16)})),p(document,"visibilitychange",V),p(document,"-webkit-visibilitychange",V),function(i,t){switch(o=[],function(e){e&&e.enablePublicMethods&&z("enablePublicMethods option has been removed, public methods are now always available in the iFrame")}(i),typeof t){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(t||"iframe"),n.bind(e,i));break;case"object":n(i,t);break;default:throw new TypeError("Unexpected data type ("+typeof t+")")}return o}}}();const c=s.exports,d={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"}};class f{constructor(e,n){this.iframe=e,this.iframeOrigin=n}postMessage(e,n){const o=Object.assign({eventType:e},n);this.iframe.contentWindow.postMessage(o,this.iframeOrigin)}addMessageListener(e){window.addEventListener("message",e)}removeMessageListener(e){window.removeEventListener("message",e)}postMessageWithResponseListener(e,n){return new Promise((o=>{const i=n=>{n.data.eventType===e&&(window.removeEventListener("message",i),o(n.data.data))};window.addEventListener("message",i),this.postMessage(e,n)}))}}const u=class{constructor(o){e(this,o),this.paymentMethodFormReady=n(this,"paymentMethodFormReady",7),this.paymentMethodFormValidated=n(this,"paymentMethodFormValidated",7),this.paymentMethodFormTokenized=n(this,"paymentMethodFormTokenized",7),this.computedTheme=(()=>{const e=getComputedStyle(document.body);return{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")}}})(),this.dispatchMessageEvent=e=>{const{eventType:n,data:o}=e.data,i=d[this.paymentMethodFormType];n===i.ready?(this.paymentMethodFormReady.emit(o),this.sendStyleOverrides()):n===i.tokenize?this.paymentMethodFormTokenized.emit(o):n===i.validate&&this.paymentMethodFormValidated.emit(o)},this.postMessage=(e,n)=>{this.frameService.postMessage(e,n)},this.paymentMethodFormType=void 0,this.paymentMethodFormValidationMode=void 0,this.iframeOrigin=void 0,this.singleLine=void 0}disconnectedCallback(){this.frameService.removeMessageListener(this.dispatchMessageEvent)}async resize(){this.postMessage(d[this.paymentMethodFormType].resize)}async tokenize(e,n,o){return this.frameService.postMessageWithResponseListener(d[this.paymentMethodFormType].tokenize,{clientId:e,paymentMethodMetadata:n,account:o,componentVersion:t.version})}async validate(){return this.frameService.postMessageWithResponseListener(d[this.paymentMethodFormType].validate)}sendStyleOverrides(){this.computedTheme&&this.postMessage(d[this.paymentMethodFormType].styleOverrides,{styleOverrides:this.computedTheme})}getIframeSrc(){let e=[];return this.paymentMethodFormValidationMode&&e.push(`validationMode=${this.paymentMethodFormValidationMode}`),this.singleLine&&e.push(`singleLine=${this.singleLine}`),`${this.iframeOrigin}/${this.paymentMethodFormType}${r(e)}`}initializeFrameCommunicationService(){var e;this.frameService=new f(this.iframeElement,this.iframeOrigin),null===(e=this.frameService)||void 0===e||e.addMessageListener(this.dispatchMessageEvent)}render(){return o(i,{key:"10987c92745fbff8bb85367db69b76e2bc786c88"},o("iframe",{key:"0622dd0201a04a3c918fd3d175d2a29f24609759",id:`justifi-payment-method-form-${this.paymentMethodFormType}`,src:this.getIframeSrc(),ref:e=>{this.iframeElement=e,this.initializeFrameCommunicationService()},onLoad:()=>{c({scrollbars:!1},this.iframeElement)}}))}};u.style=":host{display:block}justifi-payment-method-form iframe{border:none;width:100%}iframe{width:1px;min-width:100%}";export{u as justifi_payment_method_form}
1
+ import{r as e,c as n,h as o,H as i}from"./p-fad19d75.js";import{p as t}from"./p-35846553.js";import{k as r}from"./p-5e2c9ec8.js";var a,s={exports:{}};a=s,console.info("\nIFRAME-RESIZER\n\nIframe-Resizer 5 is now available via the following two packages:\n\n * @iframe-resizer/parent\n * @iframe-resizer/child\n\nAdditionally their are also new versions of iframe-resizer for React, Vue, and jQuery.\n\nVersion 5 of iframe-resizer has been extensively rewritten to use modern browser APIs, which has enabled significantly better performance and greater accuracy in the detection of content resizing events.\n\nPlease see https://iframe-resizer.com/upgrade for more details.\n"),function(e){if("undefined"!=typeof window){var n,o,i=0,t=!1,r=!1,s=7,c="[iFrameSizer]",d=c.length,f=null,u=window.requestAnimationFrame,l=Object.freeze({max:1,scroll:1,bodyScroll:1,documentElementScroll:1}),m={},h=null,w=Object.freeze({autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,license:"1jqr0si6pnt",log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,mouseEvents:!0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClose:function(){return!0},onClosed:function(){},onInit:function(){},onMessage:function(){z("onMessage function not defined")},onMouseEnter:function(){},onMouseLeave:function(){},onResized:function(){},onScroll:function(){return!0}}),b={};window.jQuery!==e&&((o=window.jQuery).fn?o.fn.iFrameResize||(o.fn.iFrameResize=function(e){return this.filter("iframe").each((function(n,o){H(o,e)})).end()}):k("","Unable to bind to jQuery, it is not fully loaded.")),"function"==typeof e&&e.amd?e([],q):a.exports=q(),window.iFrameResize=window.iFrameResize||q()}function g(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function p(e,n,o){e.addEventListener(n,o,!1)}function y(e,n,o){e.removeEventListener(n,o,!1)}function v(e){return m[e]?m[e].log:t}function j(e,n){x("log",e,n,v(e))}function k(e,n){x("info",e,n,v(e))}function z(e,n){x("warn",e,n,!0)}function x(e,n,o,i){!0===i&&"object"==typeof window.console&&console[e](function(e){return c+"["+function(e){var n="Host page: "+e;return window.top!==window.self&&(n=window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+e:"Nested host page: "+e),n}(e)+"]"}(n),o)}function F(e){function n(){o("Height"),o("Width"),E((function(){W(L),R(V),h("onResized",L)}),L,"init")}function o(e){var n=Number(m[V]["max"+e]),o=Number(m[V]["min"+e]),i=e.toLowerCase(),t=Number(L[i]);j(V,"Checking "+i+" is in range "+o+"-"+n),t<o&&(t=o,j(V,"Set "+i+" to min value")),t>n&&(t=n,j(V,"Set "+i+" to max value")),L[i]=""+t}function i(e){return H.slice(H.indexOf(":")+s+e)}function t(e,n){var o,i;o=function(){var o,i;N("Send Page Info","pageInfo:"+(o=document.body.getBoundingClientRect(),i=L.iframe.getBoundingClientRect(),JSON.stringify({iframeHeight:i.height,iframeWidth:i.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(i.top-o.top,10),offsetLeft:parseInt(i.left-o.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,documentHeight:document.documentElement.clientHeight,documentWidth:document.documentElement.clientWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})),e,n)},b[i=n]||(b[i]=setTimeout((function(){b[i]=null,o()}),32))}function r(e){var n=e.getBoundingClientRect();return O(V),{x:Math.floor(Number(n.left)+Number(f.x)),y:Math.floor(Number(n.top)+Number(f.y))}}function a(e){var n=e?r(L.iframe):{x:0,y:0},o={x:Number(L.width)+n.x,y:Number(L.height)+n.y};j(V,"Reposition requested from iFrame (offset x:"+n.x+" y:"+n.y+")"),window.top===window.self?(f=o,u(),j(V,"--")):window.parentIFrame?window.parentIFrame["scrollTo"+(e?"Offset":"")](o.x,o.y):z(V,"Unable to scroll to requested position, window.parentIFrame not found")}function u(){!1===h("onScroll",f)?T():R(V)}function l(e){var n={};if(0===Number(L.width)&&0===Number(L.height)){var o=i(9).split(":");n={x:o[1],y:o[0]}}else n={x:L.width,y:L.height};h(e,{iframe:L.iframe,screenX:Number(n.x),screenY:Number(n.y),type:L.type})}function h(e,n){return M(V,e,n)}var w,g,v,x,F,I,H=e.data,L={},V=null;"[iFrameResizerChild]Ready"===H?function(){for(var e in m)N("iFrame requested init",A(e),m[e].iframe,e)}():c===(""+H).slice(0,d)&&H.slice(d).split(":")[0]in m?(x=(v=H.slice(d).split(":"))[1]?parseInt(v[1],10):0,F=m[v[0]]&&m[v[0]].iframe,I=getComputedStyle(F),L={iframe:F,id:v[0],height:x+function(e){return"border-box"!==e.boxSizing?0:(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}(I)+function(e){return"border-box"!==e.boxSizing?0:(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}(I),width:v[2],type:v[3]},m[V=L.id]&&(m[V].loaded=!0),(g=L.type in{true:1,false:1,undefined:1})&&j(V,"Ignoring init message from meta parent page"),!g&&function(e){var n=!0;return m[e]||(n=!1,z(L.type+" No settings for "+e+". Message was: "+H)),n}(V)&&(j(V,"Received: "+H),w=!0,null===L.iframe&&(z(V,"IFrame ("+L.id+") not found"),w=!1),w&&function(){var n,o=e.origin,i=m[V]&&m[V].checkOrigin;if(i&&""+o!="null"&&!(i.constructor===Array?function(){var e=0,n=!1;for(j(V,"Checking connection is from allowed list of origins: "+i);e<i.length;e++)if(i[e]===o){n=!0;break}return n}():(j(V,"Checking connection is from: "+(n=m[V]&&m[V].remoteHost)),o===n)))throw new Error("Unexpected message received from: "+o+" for "+L.iframe.id+". Message was: "+e.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return!0}()&&function(){switch(m[V]&&m[V].firstRun&&m[V]&&(m[V].firstRun=!1),L.type){case"close":S(L.iframe);break;case"message":d=i(6),j(V,"onMessage passed: {iframe: "+L.iframe.id+", message: "+d+"}"),h("onMessage",{iframe:L.iframe,message:JSON.parse(d)}),j(V,"--");break;case"mouseenter":l("onMouseEnter");break;case"mouseleave":l("onMouseLeave");break;case"autoResize":m[V].autoResize=JSON.parse(i(9));break;case"scrollTo":a(!1);break;case"scrollToOffset":a(!0);break;case"pageInfo":t(m[V]&&m[V].iframe,V),function(){function e(e,i){function r(){m[o]?t(m[o].iframe,o):n()}["scroll","resize"].forEach((function(n){j(o,e+n+" listener for sendPageInfo"),i(window,n,r)}))}function n(){e("Remove ",y)}var o=V;e("Add ",p),m[o]&&(m[o].stopPageInfo=n)}();break;case"pageInfoStop":m[V]&&m[V].stopPageInfo&&(m[V].stopPageInfo(),delete m[V].stopPageInfo);break;case"inPageLink":o=i(9).split("#")[1]||"",s=decodeURIComponent(o),(c=document.getElementById(s)||document.getElementsByName(s)[0])?(e=r(c),j(V,"Moving to in page link (#"+o+") at x: "+e.x+" y: "+e.y),f={x:e.x,y:e.y},u(),j(V,"--")):window.top===window.self?j(V,"In page link #"+o+" not found"):window.parentIFrame?window.parentIFrame.moveToAnchor(o):j(V,"In page link #"+o+" not found and window.parentIFrame not found");break;case"reset":C(L);break;case"init":n(),h("onInit",L.iframe);break;default:0===Number(L.width)&&0===Number(L.height)?z("Unsupported message received ("+L.type+"), this is likely due to the iframe containing a later version of iframe-resizer than the parent page"):n()}var e,o,s,c,d}())):k(V,"Ignored: "+H)}function M(e,n,o){var i=null,t=null;if(m[e]){if("function"!=typeof(i=m[e][n]))throw new TypeError(n+" on iFrame["+e+"] is not a function");t=i(o)}return t}function I(e){delete m[e.id]}function S(e){var o=e.id;if(!1!==M(o,"onClose",o)){j(o,"Removing iFrame: "+o);try{e.parentNode&&e.parentNode.removeChild(e)}catch(e){z(e)}M(o,"onClosed",o),j(o,"--"),I(e),n&&(n.disconnect(),n=null)}else j(o,"Close iframe cancelled by onClose event")}function O(n){null===f&&j(n,"Get page position: "+(f={x:window.pageXOffset===e?document.documentElement.scrollLeft:window.pageXOffset,y:window.pageYOffset===e?document.documentElement.scrollTop:window.pageYOffset}).x+","+f.y)}function R(e){null!==f&&(window.scrollTo(f.x,f.y),j(e,"Set page position: "+f.x+","+f.y),T())}function T(){f=null}function C(e){j(e.id,"Size reset requested by "+("init"===e.type?"host page":"iFrame")),O(e.id),E((function(){W(e),N("reset","reset",e.iframe,e.id)}),e,"reset")}function W(e){function n(n){r||"0"!==e[n]||(r=!0,j(i,"Hidden iFrame detected, creating visibility listener"),function(){function e(){Object.keys(m).forEach((function(e){!function(e){function n(n){return"0px"===(m[e]&&m[e].iframe.style[n])}m[e]&&null!==m[e].iframe.offsetParent&&(n("height")||n("width"))&&N("Visibility change","resize",m[e].iframe,e)}(e)}))}function n(n){j("window","Mutation observed: "+n[0].target+" "+n[0].type),L(e,16)}var o,i=g();i&&(o=document.querySelector("body"),new i(n).observe(o,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0}))}())}function o(o){!function(n){e.id?(e.iframe.style[n]=e[n]+"px",j(e.id,"IFrame ("+i+") "+n+" set to "+e[n]+"px")):j("undefined","messageData id not set")}(o),n(o)}var i=e.iframe.id;m[i]&&(m[i].sizeHeight&&o("height"),m[i].sizeWidth&&o("width"))}function E(e,n,o){o!==n.type&&u&&!window.jasmine?(j(n.id,"Requesting animation frame"),u(e)):e()}function N(e,n,o,i,t){var r,a=!1;m[i=i||o.id]&&(o&&"contentWindow"in o&&null!==o.contentWindow?(j(i,"["+e+"] Sending msg to iframe["+i+"] ("+n+") targetOrigin: "+(r=m[i]&&m[i].targetOrigin)),o.contentWindow.postMessage(c+n,r)):z(i,"["+e+"] IFrame("+i+") not found"),t&&m[i]&&m[i].warningTimeout&&(m[i].msgTimeout=setTimeout((function(){!m[i]||m[i].loaded||a||(a=!0,z(i,"IFrame has not responded within "+m[i].warningTimeout/1e3+" seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."))}),m[i].warningTimeout)))}function A(e){return e+":"+m[e].bodyMarginV1+":"+m[e].sizeWidth+":"+m[e].log+":"+m[e].interval+":"+m[e].enablePublicMethods+":"+m[e].autoResize+":"+m[e].bodyMargin+":"+m[e].heightCalculationMethod+":"+m[e].bodyBackground+":"+m[e].bodyPadding+":"+m[e].tolerance+":"+m[e].inPageLinks+":"+m[e].resizeFrom+":"+m[e].widthCalculationMethod+":"+m[e].mouseEvents}function H(o,r){function a(e){var n=e.split("Callback");if(2===n.length){var o="on"+n[0].charAt(0).toUpperCase()+n[0].slice(1);this[o]=this[e],delete this[e],z(d,"Deprecated: '"+e+"' has been renamed '"+o+"'. The old method will be removed in the next major version.")}}var s,c,d=function(e){if("string"!=typeof e)throw new TypeError("Invaild id for iFrame. Expected String");var n;return""===e&&(o.id=(n=r&&r.id||w.id+i++,null!==document.getElementById(n)&&(n+=i++),e=n),t=(r||{}).log,j(e,"Added missing iframe ID: "+e+" ("+o.src+")")),e}(o.id);d in m&&"iFrameResizer"in o?z(d,"Ignored iFrame, already setup."):(function(e){var n;e=e||{},m[d]=Object.create(null),m[d].iframe=o,m[d].firstRun=!0,m[d].remoteHost=o.src&&o.src.split("/").slice(0,3).join("/"),function(e){if("object"!=typeof e)throw new TypeError("Options is not an object")}(e),Object.keys(e).forEach(a,e),function(e){for(var n in w)Object.prototype.hasOwnProperty.call(w,n)&&(m[d][n]=Object.prototype.hasOwnProperty.call(e,n)?e[n]:w[n])}(e),m[d]&&(m[d].targetOrigin=!0===m[d].checkOrigin?""===(n=m[d].remoteHost)||null!==n.match(/^(about:blank|javascript:|file:\/\/)/)?"*":n:"*")}(r),function(){switch(j(d,"IFrame scrolling "+(m[d]&&m[d].scrolling?"enabled":"disabled")+" for "+d),o.style.overflow=!1===(m[d]&&m[d].scrolling)?"hidden":"auto",m[d]&&m[d].scrolling){case"omit":break;case!0:o.scrolling="yes";break;case!1:o.scrolling="no";break;default:o.scrolling=m[d]?m[d].scrolling:"no"}}(),function(){function e(e){var n=m[d][e];1/0!==n&&0!==n&&(o.style[e]="number"==typeof n?n+"px":n,j(d,"Set "+e+" = "+o.style[e]))}function n(e){if(m[d]["min"+e]>m[d]["max"+e])throw new Error("Value for min"+e+" can not be greater than max"+e)}n("Height"),n("Width"),e("maxHeight"),e("minHeight"),e("maxWidth"),e("minWidth")}(),"number"!=typeof(m[d]&&m[d].bodyMargin)&&"0"!==(m[d]&&m[d].bodyMargin)||(m[d].bodyMarginV1=m[d].bodyMargin,m[d].bodyMargin=m[d].bodyMargin+"px"),s=A(d),(c=g())&&(n=function(e){if(!o.parentNode)return null;var n=new e((function(e){e.forEach((function(e){Array.prototype.slice.call(e.removedNodes).forEach((function(e){e===o&&S(o)}))}))}));return n.observe(o.parentNode,{childList:!0}),n}(c)),p(o,"load",(function(){N("iFrame.onload",s,o,e,!0),(!m[d]||!m[d].firstRun)&&m[d]&&m[d].heightCalculationMethod in l&&C({iframe:o,height:0,width:0,type:"init"})})),N("init",s,o,e,!0),m[d]&&(m[d].iframe.iFrameResizer={close:S.bind(null,m[d].iframe),removeListeners:I.bind(null,m[d].iframe),resize:N.bind(null,"Window resize","resize",m[d].iframe),moveToAnchor:function(e){N("Move to anchor","moveToAnchor:"+e,m[d].iframe,d)},sendMessage:function(e){N("Send Message","message:"+(e=JSON.stringify(e)),m[d].iframe,d)}}))}function L(e,n){null===h&&(h=setTimeout((function(){h=null,e()}),n))}function V(){"hidden"!==document.visibilityState&&(j("document","Trigger event: Visibility change"),L((function(){P("Tab Visible","resize")}),16))}function P(e,n){Object.keys(m).forEach((function(o){(function(e){return m[e]&&"parent"===m[e].resizeFrom&&m[e].autoResize&&!m[e].firstRun})(o)&&N(e,n,m[o].iframe,o)}))}function q(){function n(e,n){n&&(function(){if(!n.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==n.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+n.tagName+">")}(),H(n,e),o.push(n))}var o;return function(){var e,n=["moz","webkit","o","ms"];for(e=0;e<n.length&&!u;e+=1)u=window[n[e]+"RequestAnimationFrame"];u?u=u.bind(window):j("setup","RequestAnimationFrame not supported")}(),p(window,"message",F),p(window,"resize",(function(){j("window","Trigger event: resize"),L((function(){P("Window resize","resize")}),16)})),p(document,"visibilitychange",V),p(document,"-webkit-visibilitychange",V),function(i,t){switch(o=[],function(e){e&&e.enablePublicMethods&&z("enablePublicMethods option has been removed, public methods are now always available in the iFrame")}(i),typeof t){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(t||"iframe"),n.bind(e,i));break;case"object":n(i,t);break;default:throw new TypeError("Unexpected data type ("+typeof t+")")}return o}}}();const c=s.exports,d={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"}};class f{constructor(e,n){this.iframe=e,this.iframeOrigin=n}postMessage(e,n){const o=Object.assign({eventType:e},n);this.iframe.contentWindow.postMessage(o,this.iframeOrigin)}addMessageListener(e){window.addEventListener("message",e)}removeMessageListener(e){window.removeEventListener("message",e)}postMessageWithResponseListener(e,n){return new Promise((o=>{const i=n=>{n.data.eventType===e&&(window.removeEventListener("message",i),o(n.data.data))};window.addEventListener("message",i),this.postMessage(e,n)}))}}const u=class{constructor(o){e(this,o),this.paymentMethodFormReady=n(this,"paymentMethodFormReady",7),this.paymentMethodFormValidated=n(this,"paymentMethodFormValidated",7),this.paymentMethodFormTokenized=n(this,"paymentMethodFormTokenized",7),this.computedTheme=(()=>{const e=getComputedStyle(document.body);return{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")}}})(),this.dispatchMessageEvent=e=>{const{eventType:n,data:o}=e.data,i=d[this.paymentMethodFormType];n===i.ready?(this.paymentMethodFormReady.emit(o),this.sendStyleOverrides()):n===i.tokenize?this.paymentMethodFormTokenized.emit(o):n===i.validate&&this.paymentMethodFormValidated.emit(o)},this.postMessage=(e,n)=>{this.frameService.postMessage(e,n)},this.paymentMethodFormType=void 0,this.paymentMethodFormValidationMode=void 0,this.iframeOrigin=void 0,this.singleLine=void 0}disconnectedCallback(){this.frameService.removeMessageListener(this.dispatchMessageEvent)}async resize(){this.postMessage(d[this.paymentMethodFormType].resize)}async tokenize(e,n,o){return this.frameService.postMessageWithResponseListener(d[this.paymentMethodFormType].tokenize,{clientId:e,paymentMethodMetadata:n,account:o,componentVersion:t.version})}async validate(){return this.frameService.postMessageWithResponseListener(d[this.paymentMethodFormType].validate)}sendStyleOverrides(){this.computedTheme&&this.postMessage(d[this.paymentMethodFormType].styleOverrides,{styleOverrides:this.computedTheme})}getIframeSrc(){let e=[];return this.paymentMethodFormValidationMode&&e.push(`validationMode=${this.paymentMethodFormValidationMode}`),this.singleLine&&e.push(`singleLine=${this.singleLine}`),`${this.iframeOrigin}/${this.paymentMethodFormType}${r(e)}`}initializeFrameCommunicationService(){var e;this.frameService=new f(this.iframeElement,this.iframeOrigin),null===(e=this.frameService)||void 0===e||e.addMessageListener(this.dispatchMessageEvent)}render(){return o(i,{key:"10987c92745fbff8bb85367db69b76e2bc786c88"},o("iframe",{key:"0622dd0201a04a3c918fd3d175d2a29f24609759",id:`justifi-payment-method-form-${this.paymentMethodFormType}`,src:this.getIframeSrc(),ref:e=>{this.iframeElement=e,this.initializeFrameCommunicationService()},onLoad:()=>{c({scrollbars:!1},this.iframeElement)}}))}};u.style=":host{display:block}justifi-payment-method-form iframe{border:none;width:100%}iframe{width:1px;min-width:100%}";export{u as justifi_payment_method_form}
@@ -0,0 +1 @@
1
+ import{r as t,c as s,h as i}from"./p-fad19d75.js";import{P as r}from"./p-f2924369.js";import"./p-56f6ce4c.js";import{P as e}from"./p-df21aaad.js";import"./p-e3fab0e2.js";import{C as o,a}from"./p-14c91ffd.js";import{g as n,a as p}from"./p-8115b2f4.js";import{E as c}from"./p-dce846bf.js";import{J as h}from"./p-707bdf68.js";import{c as d}from"./p-b91bcbfc.js";import{c as m}from"./p-5a62fca2.js";import"./p-7d3be485.js";import"./p-35846553.js";const f=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event",7),this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)},this.getPayments=void 0,this.errorMessage=null,this.accountId=void 0,this.authToken=void 0,this.apiOrigin=m.proxyApiOrigin}componentWillLoad(){d(),this.analytics=new h(this),this.initializeGetPayments()}disconnectedCallback(){this.analytics.cleanup()}propChanged(){this.initializeGetPayments()}initializeGetPayments(){this.accountId&&this.authToken?this.getPayments=(({id:t,authToken:s,service:i,apiOrigin:r})=>async({params:a,onSuccess:c,onError:h})=>{var d,m;try{const f=await i.fetchPayments(t,s,a,r);if(f.error)return h({error:n(f.error),code:p(null===(m=f.error)||void 0===m?void 0:m.code),severity:o.ERROR});{const t=Object.assign({},f.page_info);c({payments:(null===(d=f.data)||void 0===d?void 0:d.map((t=>new e(t))))||[],pagingInfo:t})}}catch(t){const s=p(null==t?void 0:t.code);return h({error:t.message||t,code:s,severity:o.ERROR})}})({id:this.accountId,authToken:this.authToken,service:new r,apiOrigin:this.apiOrigin}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:a.MISSING_PROPS,message:this.errorMessage,severity:o.ERROR}))}render(){return this.errorMessage?c(this.errorMessage):i("payments-list-core",{getPayments:this.getPayments,"onError-event":this.handleErrorEvent})}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{f as justifi_payments_list}
@@ -1 +1 @@
1
- import{r as o,c as r,h as t}from"./p-fad19d75.js";import"./p-56f6ce4c.js";import{a as i}from"./p-df21aaad.js";import"./p-e3fab0e2.js";import{l as a}from"./p-5e2c9ec8.js";import{c as e}from"./p-5a62fca2.js";import{a as s,C as b}from"./p-14c91ffd.js";import{g as f}from"./p-8115b2f4.js";import{J as d}from"./p-437f9114.js";import{B as c}from"./p-9c9c7dac.js";import{S as n}from"./p-44055818.js";import{c as l}from"./p-1612894d.js";import"./p-8281f09a.js";import"./p-7d3be485.js";const m=class{constructor(t){o(this,t),this.submitted=r(this,"submitted",7),this.errorEvent=r(this,"error-event",7),this.bankAccount=void 0,this.card=void 0,this.email=void 0,this.clientId=void 0,this.authToken=void 0,this.accountId=void 0,this.submitButtonText=void 0,this.submitButtonEnabled=!0,this.isLoading=!1,this.selectedPaymentMethodType=i.card}componentWillLoad(){l(),this.analytics=new d(this),this.validateProps()||(this.errorEvent.emit({errorCode:s.MISSING_PROPS,message:"clientId or authToken is required",severity:b.ERROR}),this.submitButtonEnabled=!1)}connectedCallback(){a()}disconnectedCallback(){this.analytics.cleanup()}async fillBillingForm(o){this.billingFormRef.fill(o)}async enableSubmitButton(){this.submitButtonEnabled=!0}async disableSubmitButton(){this.submitButtonEnabled=!1}showPaymentMethodTypeSelector(){return this.card&&this.bankAccount}getSelectedPaymentMethodType(){return this.showPaymentMethodTypeSelector()?this.selectedPaymentMethodType:this.card?i.card:this.bankAccount?i.bankAccount:i.card}paymentMethodSelectedHandler(o){this.selectedPaymentMethodType=o.detail}validateProps(){return!(!this.clientId&&!this.authToken)}getToken(){return this.authToken||this.clientId}async submit(o){if(o.preventDefault(),!this.paymentMethodFormRef||!this.billingFormRef)return;const r=await this.billingFormRef.validate(),t=await this.paymentMethodFormRef.validate();if(r.isValid&&t.isValid){this.isLoading=!0;try{const o=await this.billingFormRef.getValues(),r=Object.assign({email:this.email},o),t=await this.paymentMethodFormRef.tokenize(this.getToken(),r,this.accountId);t.error&&this.errorEvent.emit({errorCode:s.TOKENIZE_ERROR,message:t.error.message,severity:b.ERROR}),this.submitted.emit(t)}catch(o){this.errorEvent.emit({errorCode:s.UNKNOWN_ERROR,message:f(o),severity:b.ERROR})}finally{this.isLoading=!1}}}render(){return t(n,{key:"f7d035a9ed8b16016493aa07a85a6b4d6d83b5f5"},t("form",{key:"fb9354b439332ef4ee67e915f27b60b9b744e6e2",class:"row gy-3"},this.showPaymentMethodTypeSelector()&&t("div",{key:"303fbccf9beb30c1d822f0ac148128dfba9d158f",class:"col-12"},t("justifi-payment-method-selector",{key:"f71353d3f90ab50461a57ce3738ea853ca4d1cc3",selectedPaymentMethodType:this.getSelectedPaymentMethodType(),onPaymentMethodSelected:o=>this.paymentMethodSelectedHandler(o)})),t("div",{key:"d9024a406dcde487ff2bb7d34385da0a1be8aef5",class:"col-12"},t("justifi-payment-method-form",{key:"010488c96f1b6b5af049b89151cea9ce61f263bb","payment-method-form-type":this.getSelectedPaymentMethodType(),iframeOrigin:e.iframeOrigin,ref:o=>{o&&(this.paymentMethodFormRef=o)}})),t("div",{key:"c8b41e9d6bc0d21db4bc1efa12852480ed4a0bbd",class:"col-12"},t("justifi-billing-form",{key:"2226122296e6b9da8359b90fe563b6c4342c72f3",legend:"Billing Info",ref:o=>{o&&(this.billingFormRef=o)}})),t("slot",{key:"5aa12164db0d1ac4570db49b7a1bc527d974a8ab",name:"insurance"}),t("div",{key:"5b0ad786dcf96a4c83696b1e3d1cd09345313807",class:"col-12"},t(c,{key:"b3a55eaf9403d33a0e0769ca2c6c42b086f4da9a",variant:"primary",type:"submit",onClick:o=>this.submit(o),disabled:!this.submitButtonEnabled||this.isLoading,isLoading:this.isLoading,"data-testid":"submit-button",style:{width:"100%"}},this.submitButtonText||"Submit"))))}};m.style=":host{display:block}justifi-payment-method-form{display:block;margin-left:calc(var(--jfi-layout-padding) * -1);margin-right:calc(var(--jfi-layout-padding) * -1)}*::part(label){color:var(--jfi-form-label-color);font-family:var(--jfi-form-label-font-family);font-weight:var(--jfi-form-label-font-weight);font-size:var(--jfi-form-label-font-size);margin:var(--jfi-form-label-margin)}*::part(input){font-family:var(--jfi-layout-font-family);background-color:var(--jfi-form-control-background-color);border-color:var(--jfi-form-control-border-color);border-width:var(--jfi-form-control-border-width);border-bottom-width:var(--jfi-form-control-border-bottom-width);border-left-width:var(--jfi-form-control-border-left-width);border-right-width:var(--jfi-form-control-border-right-width);border-top-width:var(--jfi-form-control-border-top-width);border-radius:var(--jfi-form-control-border-radius);border-style:var(--jfi-form-control-border-style);box-shadow:var(--jfi-form-control-box-shadow);color:var(--jfi-form-control-color);font-size:var(--jfi-form-control-font-size);font-weight:var(--jfi-form-control-font-weight);line-height:var(--jfi-form-control-line-height);margin:var(--jfi-form-control-margin);padding:var(--jfi-form-control-padding)}*::part(input):focus{color:var(--jfi-form-control-color-focus);border-color:var(--jfi-form-control-border-color-focus);box-shadow:var(--jfi-form-control-box-shadow-focus)}*::part(input-invalid){border-color:var(--jfi-form-control-border-color-error);box-shadow:var(--jfi-form-control-box-shadow-error)}*::part(input-invalid):focus{border-color:var(--jfi-form-control-border-color-error);box-shadow:var(--jfi-form-control-box-shadow-error-focus)}.jfi-submit-button{font-family:var(--jfi-layout-font-family);color:var(--jfi-submit-button-color);background-color:var(--jfi-submit-button-background-color);border-color:var(--jfi-submit-button-border-color);padding:var(--jfi-submit-button-padding);font-size:var(--jfi-submit-button-font-size);border-radius:var(--jfi-submit-button-border-radius);width:var(--jfi-submit-button-width);box-shadow:var(--jfi-submit-button-box-shadow)}.jfi-submit-button:hover{color:var(--jfi-submit-button-color-hover);background-color:var(--jfi-submit-button-background-color-hover);border-color:var(--jfi-submit-button-border-color-hover)}.jfi-submit-button:focus{color:var(--jfi-submit-button-color-focus);background-color:var(--jfi-submit-button-background-color-focus);border-color:var(--jfi-submit-button-border-color-focus)}.btn.jfi-submit-button:active{color:var(--jfi-submit-button-color-active);background-color:var(--jfi-submit-button-background-color-active);border-color:var(--jfi-submit-button-border-color-active)}.btn.jfi-submit-button-loading{min-width:75px;color:var(--jfi-submit-button-color-loading);background-color:var(--jfi-submit-button-background-color-loading);border-color:var(--jfi-submit-button-border-color-loading)}.btn.jfi-submit-button-loading .spinner-border{border-top-color:var(--jfi-submit-button-color-loading);border-bottom-color:var(--jfi-submit-button-color-loading);border-left-color:var(--jfi-submit-button-color-loading)}";export{m as justifi_payment_form}
1
+ import{r as o,c as r,h as t}from"./p-fad19d75.js";import"./p-56f6ce4c.js";import{a as i}from"./p-df21aaad.js";import"./p-e3fab0e2.js";import{l as a}from"./p-5e2c9ec8.js";import{c as e}from"./p-5a62fca2.js";import{a as s,C as b}from"./p-14c91ffd.js";import{g as f}from"./p-8115b2f4.js";import{J as c}from"./p-707bdf68.js";import{B as d}from"./p-9c9c7dac.js";import{S as n}from"./p-44055818.js";import{c as l}from"./p-b91bcbfc.js";import"./p-35846553.js";import"./p-7d3be485.js";const m=class{constructor(t){o(this,t),this.submitted=r(this,"submitted",7),this.errorEvent=r(this,"error-event",7),this.bankAccount=void 0,this.card=void 0,this.email=void 0,this.clientId=void 0,this.authToken=void 0,this.accountId=void 0,this.submitButtonText=void 0,this.submitButtonEnabled=!0,this.isLoading=!1,this.selectedPaymentMethodType=i.card}componentWillLoad(){l(),this.analytics=new c(this),this.validateProps()||(this.errorEvent.emit({errorCode:s.MISSING_PROPS,message:"clientId or authToken is required",severity:b.ERROR}),this.submitButtonEnabled=!1)}connectedCallback(){a()}disconnectedCallback(){this.analytics.cleanup()}async fillBillingForm(o){this.billingFormRef.fill(o)}async enableSubmitButton(){this.submitButtonEnabled=!0}async disableSubmitButton(){this.submitButtonEnabled=!1}showPaymentMethodTypeSelector(){return this.card&&this.bankAccount}getSelectedPaymentMethodType(){return this.showPaymentMethodTypeSelector()?this.selectedPaymentMethodType:this.card?i.card:this.bankAccount?i.bankAccount:i.card}paymentMethodSelectedHandler(o){this.selectedPaymentMethodType=o.detail}validateProps(){return!(!this.clientId&&!this.authToken)}getToken(){return this.authToken||this.clientId}async submit(o){if(o.preventDefault(),!this.paymentMethodFormRef||!this.billingFormRef)return;const r=await this.billingFormRef.validate(),t=await this.paymentMethodFormRef.validate();if(r.isValid&&t.isValid){this.isLoading=!0;try{const o=await this.billingFormRef.getValues(),r=Object.assign({email:this.email},o),t=await this.paymentMethodFormRef.tokenize(this.getToken(),r,this.accountId);t.error&&this.errorEvent.emit({errorCode:s.TOKENIZE_ERROR,message:t.error.message,severity:b.ERROR}),this.submitted.emit(t)}catch(o){this.errorEvent.emit({errorCode:s.UNKNOWN_ERROR,message:f(o),severity:b.ERROR})}finally{this.isLoading=!1}}}render(){return t(n,{key:"f7d035a9ed8b16016493aa07a85a6b4d6d83b5f5"},t("form",{key:"fb9354b439332ef4ee67e915f27b60b9b744e6e2",class:"row gy-3"},this.showPaymentMethodTypeSelector()&&t("div",{key:"303fbccf9beb30c1d822f0ac148128dfba9d158f",class:"col-12"},t("justifi-payment-method-selector",{key:"f71353d3f90ab50461a57ce3738ea853ca4d1cc3",selectedPaymentMethodType:this.getSelectedPaymentMethodType(),onPaymentMethodSelected:o=>this.paymentMethodSelectedHandler(o)})),t("div",{key:"d9024a406dcde487ff2bb7d34385da0a1be8aef5",class:"col-12"},t("justifi-payment-method-form",{key:"010488c96f1b6b5af049b89151cea9ce61f263bb","payment-method-form-type":this.getSelectedPaymentMethodType(),iframeOrigin:e.iframeOrigin,ref:o=>{o&&(this.paymentMethodFormRef=o)}})),t("div",{key:"c8b41e9d6bc0d21db4bc1efa12852480ed4a0bbd",class:"col-12"},t("justifi-billing-form",{key:"2226122296e6b9da8359b90fe563b6c4342c72f3",legend:"Billing Info",ref:o=>{o&&(this.billingFormRef=o)}})),t("slot",{key:"5aa12164db0d1ac4570db49b7a1bc527d974a8ab",name:"insurance"}),t("div",{key:"5b0ad786dcf96a4c83696b1e3d1cd09345313807",class:"col-12"},t(d,{key:"b3a55eaf9403d33a0e0769ca2c6c42b086f4da9a",variant:"primary",type:"submit",onClick:o=>this.submit(o),disabled:!this.submitButtonEnabled||this.isLoading,isLoading:this.isLoading,"data-testid":"submit-button",style:{width:"100%"}},this.submitButtonText||"Submit"))))}};m.style=":host{display:block}justifi-payment-method-form{display:block;margin-left:calc(var(--jfi-layout-padding) * -1);margin-right:calc(var(--jfi-layout-padding) * -1)}*::part(label){color:var(--jfi-form-label-color);font-family:var(--jfi-form-label-font-family);font-weight:var(--jfi-form-label-font-weight);font-size:var(--jfi-form-label-font-size);margin:var(--jfi-form-label-margin)}*::part(input){font-family:var(--jfi-layout-font-family);background-color:var(--jfi-form-control-background-color);border-color:var(--jfi-form-control-border-color);border-width:var(--jfi-form-control-border-width);border-bottom-width:var(--jfi-form-control-border-bottom-width);border-left-width:var(--jfi-form-control-border-left-width);border-right-width:var(--jfi-form-control-border-right-width);border-top-width:var(--jfi-form-control-border-top-width);border-radius:var(--jfi-form-control-border-radius);border-style:var(--jfi-form-control-border-style);box-shadow:var(--jfi-form-control-box-shadow);color:var(--jfi-form-control-color);font-size:var(--jfi-form-control-font-size);font-weight:var(--jfi-form-control-font-weight);line-height:var(--jfi-form-control-line-height);margin:var(--jfi-form-control-margin);padding:var(--jfi-form-control-padding)}*::part(input):focus{color:var(--jfi-form-control-color-focus);border-color:var(--jfi-form-control-border-color-focus);box-shadow:var(--jfi-form-control-box-shadow-focus)}*::part(input-invalid){border-color:var(--jfi-form-control-border-color-error);box-shadow:var(--jfi-form-control-box-shadow-error)}*::part(input-invalid):focus{border-color:var(--jfi-form-control-border-color-error);box-shadow:var(--jfi-form-control-box-shadow-error-focus)}.jfi-submit-button{font-family:var(--jfi-layout-font-family);color:var(--jfi-submit-button-color);background-color:var(--jfi-submit-button-background-color);border-color:var(--jfi-submit-button-border-color);padding:var(--jfi-submit-button-padding);font-size:var(--jfi-submit-button-font-size);border-radius:var(--jfi-submit-button-border-radius);width:var(--jfi-submit-button-width);box-shadow:var(--jfi-submit-button-box-shadow)}.jfi-submit-button:hover{color:var(--jfi-submit-button-color-hover);background-color:var(--jfi-submit-button-background-color-hover);border-color:var(--jfi-submit-button-border-color-hover)}.jfi-submit-button:focus{color:var(--jfi-submit-button-color-focus);background-color:var(--jfi-submit-button-background-color-focus);border-color:var(--jfi-submit-button-border-color-focus)}.btn.jfi-submit-button:active{color:var(--jfi-submit-button-color-active);background-color:var(--jfi-submit-button-background-color-active);border-color:var(--jfi-submit-button-border-color-active)}.btn.jfi-submit-button-loading{min-width:75px;color:var(--jfi-submit-button-color-loading);background-color:var(--jfi-submit-button-background-color-loading);border-color:var(--jfi-submit-button-border-color-loading)}.btn.jfi-submit-button-loading .spinner-border{border-top-color:var(--jfi-submit-button-color-loading);border-bottom-color:var(--jfi-submit-button-color-loading);border-left-color:var(--jfi-submit-button-color-loading)}";export{m as justifi_payment_form}
@@ -1 +1 @@
1
- import{r as t,c as s,h as i,H as r}from"./p-fad19d75.js";import{t as o}from"./p-2b6c9c4f.js";import{m as e,P as a}from"./p-7ff329b1.js";import"./p-56f6ce4c.js";import"./p-df21aaad.js";import{P as n}from"./p-e3fab0e2.js";import{C as p,a as c}from"./p-14c91ffd.js";import{g as h,a as d}from"./p-8115b2f4.js";import{E as f}from"./p-dce846bf.js";import{J as m}from"./p-437f9114.js";import{c as u}from"./p-1612894d.js";import"./p-7d3be485.js";import"./p-5a62fca2.js";import"./p-8281f09a.js";const l=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event",7),this.handleOnError=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)},this.accountId=void 0,this.authToken=void 0,this.getPayouts=void 0,this.getPayoutCSV=void 0,this.errorMessage=null}componentWillLoad(){u(),this.analytics=new m(this),this.initializeServices()}disconnectedCallback(){this.analytics.cleanup()}propChanged(){this.initializeServices()}initializeServices(){if(this.accountId&&this.authToken){const t={id:this.accountId,authToken:this.authToken,service:new a};this.getPayouts=(({id:t,authToken:s,service:i})=>async({params:r,onSuccess:o,onError:e})=>{var a,c;try{const f=await i.fetchPayouts(t,s,r);if(f.error)return e({error:h(f.error),code:d(null===(c=f.error)||void 0===c?void 0:c.code),severity:p.ERROR});{const t=Object.assign({},f.page_info);o({payouts:(null===(a=f.data)||void 0===a?void 0:a.map((t=>new n(t))))||[],pagingInfo:t})}}catch(t){return e({error:h(t),code:d(null==t?void 0:t.code),severity:p.ERROR})}})(t),this.getPayoutCSV=e(t)}else this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:c.MISSING_PROPS,message:"Account ID and Auth Token are required"})}render(){return this.errorMessage?f(this.errorMessage):i(r,{exportedparts:o},i("payouts-list-core",{getPayouts:this.getPayouts,getPayoutCSV:this.getPayoutCSV,"onError-event":this.handleOnError}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{l as justifi_payouts_list}
1
+ import{r as t,c as s,h as i,H as r}from"./p-fad19d75.js";import{t as o}from"./p-2b6c9c4f.js";import{m as e,P as a}from"./p-7ff329b1.js";import"./p-56f6ce4c.js";import"./p-df21aaad.js";import{P as n}from"./p-e3fab0e2.js";import{C as p,a as c}from"./p-14c91ffd.js";import{g as h,a as d}from"./p-8115b2f4.js";import{E as f}from"./p-dce846bf.js";import{J as m}from"./p-707bdf68.js";import{c as u}from"./p-b91bcbfc.js";import"./p-7d3be485.js";import"./p-5a62fca2.js";import"./p-35846553.js";const l=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event",7),this.handleOnError=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)},this.accountId=void 0,this.authToken=void 0,this.getPayouts=void 0,this.getPayoutCSV=void 0,this.errorMessage=null}componentWillLoad(){u(),this.analytics=new m(this),this.initializeServices()}disconnectedCallback(){this.analytics.cleanup()}propChanged(){this.initializeServices()}initializeServices(){if(this.accountId&&this.authToken){const t={id:this.accountId,authToken:this.authToken,service:new a};this.getPayouts=(({id:t,authToken:s,service:i})=>async({params:r,onSuccess:o,onError:e})=>{var a,c;try{const f=await i.fetchPayouts(t,s,r);if(f.error)return e({error:h(f.error),code:d(null===(c=f.error)||void 0===c?void 0:c.code),severity:p.ERROR});{const t=Object.assign({},f.page_info);o({payouts:(null===(a=f.data)||void 0===a?void 0:a.map((t=>new n(t))))||[],pagingInfo:t})}}catch(t){return e({error:h(t),code:d(null==t?void 0:t.code),severity:p.ERROR})}})(t),this.getPayoutCSV=e(t)}else this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:c.MISSING_PROPS,message:"Account ID and Auth Token are required"})}render(){return this.errorMessage?f(this.errorMessage):i(r,{exportedparts:o},i("payouts-list-core",{getPayouts:this.getPayouts,getPayoutCSV:this.getPayoutCSV,"onError-event":this.handleOnError}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{l as justifi_payouts_list}
@@ -1 +1 @@
1
- import{p as t}from"./p-8281f09a.js";import{c as i}from"./p-5a62fca2.js";import{A as s}from"./p-7d3be485.js";class e{async record(t){return s({apiOrigin:i.proxyApiOrigin}).post("analytics",t)}}class r{constructor(t){this.handleCustomEvent=async t=>{await this.service.record(t)},this.service=new e,this.componentInstance=t,this.setUpBasicData(),this.setupLifecycleTracking(),this.trackCustomEvents()}get resourceId(){return this.componentInstance.accountId||this.componentInstance.businessId||this.componentInstance.paymentId||this.componentInstance.payoutId||this.componentInstance.checkoutId}setUpBasicData(){this.basicData={component_name:this.componentInstance.tagName,component_version:t.version,client_user_agent:navigator.userAgent,client_platform:navigator.userAgent,client_origin:window.location.origin,resource_id:this.resourceId}}trackCustomEvents(){this.eventEmitters=["submitted","error-event"],this.eventEmitters.forEach((t=>{"function"==typeof this.componentInstance.addEventListener&&this.componentInstance.addEventListener(t,(i=>this.handleCustomEvent({event_type:t,data:Object.assign(Object.assign({},this.basicData),{error:i.detail})})))}))}setupLifecycleTracking(){const t=this.componentInstance.componentDidLoad;this.componentInstance.componentDidLoad=()=>{if(this.service.record({event_type:"init",data:this.basicData}),t)return t.apply(this.componentInstance)}}cleanup(){this.eventEmitters.forEach((t=>{this.componentInstance.removeEventListener(t,this.handleCustomEvent)}))}}export{r as J}
1
+ import{p as t}from"./p-35846553.js";import{c as i}from"./p-5a62fca2.js";import{A as s}from"./p-7d3be485.js";class e{async record(t){return s({apiOrigin:i.proxyApiOrigin}).post("analytics",t)}}class r{constructor(t){this.handleCustomEvent=async t=>{await this.service.record(t)},this.service=new e,this.componentInstance=t,this.setUpBasicData(),this.setupLifecycleTracking(),this.trackCustomEvents()}get resourceId(){return this.componentInstance.accountId||this.componentInstance.businessId||this.componentInstance.paymentId||this.componentInstance.payoutId||this.componentInstance.checkoutId}setUpBasicData(){this.basicData={component_name:this.componentInstance.tagName,component_version:t.version,client_user_agent:navigator.userAgent,client_platform:navigator.userAgent,client_origin:window.location.origin,resource_id:this.resourceId}}trackCustomEvents(){this.eventEmitters=["submitted","error-event"],this.eventEmitters.forEach((t=>{"function"==typeof this.componentInstance.addEventListener&&this.componentInstance.addEventListener(t,(i=>this.handleCustomEvent({event_type:t,data:Object.assign(Object.assign({},this.basicData),{error:i.detail})})))}))}setupLifecycleTracking(){const t=this.componentInstance.componentDidLoad;this.componentInstance.componentDidLoad=()=>{if(this.service.record({event_type:"init",data:this.basicData}),t)return t.apply(this.componentInstance)}}cleanup(){this.eventEmitters.forEach((t=>{this.componentInstance.removeEventListener(t,this.handleCustomEvent)}))}}export{r as J}
@@ -1 +1 @@
1
- import{r as t,c as i,h as s}from"./p-fad19d75.js";import{A as e}from"./p-7d3be485.js";import"./p-56f6ce4c.js";import"./p-df21aaad.js";import"./p-e3fab0e2.js";import{c as r}from"./p-5a62fca2.js";import{g as o,a}from"./p-8115b2f4.js";import{C as n,a as d}from"./p-14c91ffd.js";import{J as c}from"./p-437f9114.js";import{c as h}from"./p-1612894d.js";import"./p-8281f09a.js";class u{async fetchQuote(t,i){return e({authToken:t,apiOrigin:r.proxyApiOrigin}).post("insurance/quotes",i)}async toggleCoverage(t,i,s){const o=`insurance/quotes/${i}/toggle`;return e({authToken:t,apiOrigin:r.proxyApiOrigin}).post(o,s)}}const p=class{constructor(s){t(this,s),this.errorEvent=i(this,"error-event",7),this.authToken=void 0,this.checkoutId=void 0,this.primaryIdentityFirstName=void 0,this.primaryIdentityLastName=void 0,this.primaryIdentityState=void 0,this.primaryIdentityPostalCode=void 0,this.primaryIdentityCountry=void 0,this.primaryIdentityEmailAddress=void 0,this.policyAttributesInsurableAmount=void 0,this.policyAttributesStartDate=void 0,this.policyAttributesEndDate=void 0,this.coveredIdentityFirstName=void 0,this.coveredIdentityLastName=void 0,this.getQuote=void 0,this.toggleCoverage=void 0,this.quote=void 0}async validate(){return this.seasonInterruptionCoreRef.validate()}componentWillLoad(){h(),this.analytics=new c(this),this.initializeServiceMethods()}disconnectedCallback(){this.analytics.cleanup()}initializeServiceMethods(){this.authToken?(this.getQuote=(({authToken:t,service:i})=>async({payload:s,onSuccess:e,onError:r})=>{var d;try{const c=await i.fetchQuote(t,s);if(c.error)return r({error:o(c.error),code:a(null===(d=c.error)||void 0===d?void 0:d.code),severity:n.ERROR});e({quote:c.data})}catch(t){const i=a(null==t?void 0:t.code);return r({error:t.message||t,code:i,severity:n.ERROR})}})({authToken:this.authToken,service:new u}),this.toggleCoverage=(({authToken:t,service:i})=>async({quoteId:s,payload:e,onSuccess:r,onError:d})=>{var c;try{const h=await i.toggleCoverage(t,s,e);if(h.error)return d({error:o(h.error),code:a(null===(c=h.error)||void 0===c?void 0:c.code),severity:n.ERROR});r({quote:h.data})}catch(t){const i=a(null==t?void 0:t.code);return d({error:t.message||t,code:i,severity:n.ERROR})}})({authToken:this.authToken,service:new u})):this.errorEvent.emit({errorCode:d.MISSING_PROPS,message:"Missing authToken",severity:n.ERROR})}render(){return s("justifi-season-interruption-insurance-core",{key:"0ef99882f70c9886e8a5b49da5fe89dd4421067a",ref:t=>this.seasonInterruptionCoreRef=t,"checkout-id":this.checkoutId,getQuote:this.getQuote,toggleCoverage:this.toggleCoverage,"primary-identity-first-name":this.primaryIdentityFirstName,"primary-identity-last-name":this.primaryIdentityLastName,"primary-identity-state":this.primaryIdentityState,"primary-identity-postal-code":this.primaryIdentityPostalCode,"primary-identity-country":this.primaryIdentityCountry,"primary-identity-email-address":this.primaryIdentityEmailAddress,"policy-attributes-insurable-amount":this.policyAttributesInsurableAmount,"policy-attributes-start-date":this.policyAttributesStartDate,"policy-attributes-end-date":this.policyAttributesEndDate,"covered-identity-first-name":this.coveredIdentityFirstName,"covered-identity-last-name":this.coveredIdentityLastName})}};export{p as justifi_season_interruption_insurance}
1
+ import{r as t,c as i,h as s}from"./p-fad19d75.js";import{A as e}from"./p-7d3be485.js";import"./p-56f6ce4c.js";import"./p-df21aaad.js";import"./p-e3fab0e2.js";import{c as r}from"./p-5a62fca2.js";import{g as o,a}from"./p-8115b2f4.js";import{C as n,a as d}from"./p-14c91ffd.js";import{J as c}from"./p-707bdf68.js";import{c as h}from"./p-b91bcbfc.js";import"./p-35846553.js";class u{async fetchQuote(t,i){return e({authToken:t,apiOrigin:r.proxyApiOrigin}).post("insurance/quotes",i)}async toggleCoverage(t,i,s){const o=`insurance/quotes/${i}/toggle`;return e({authToken:t,apiOrigin:r.proxyApiOrigin}).post(o,s)}}const p=class{constructor(s){t(this,s),this.errorEvent=i(this,"error-event",7),this.authToken=void 0,this.checkoutId=void 0,this.primaryIdentityFirstName=void 0,this.primaryIdentityLastName=void 0,this.primaryIdentityState=void 0,this.primaryIdentityPostalCode=void 0,this.primaryIdentityCountry=void 0,this.primaryIdentityEmailAddress=void 0,this.policyAttributesInsurableAmount=void 0,this.policyAttributesStartDate=void 0,this.policyAttributesEndDate=void 0,this.coveredIdentityFirstName=void 0,this.coveredIdentityLastName=void 0,this.getQuote=void 0,this.toggleCoverage=void 0,this.quote=void 0}async validate(){return this.seasonInterruptionCoreRef.validate()}componentWillLoad(){h(),this.analytics=new c(this),this.initializeServiceMethods()}disconnectedCallback(){this.analytics.cleanup()}initializeServiceMethods(){this.authToken?(this.getQuote=(({authToken:t,service:i})=>async({payload:s,onSuccess:e,onError:r})=>{var d;try{const c=await i.fetchQuote(t,s);if(c.error)return r({error:o(c.error),code:a(null===(d=c.error)||void 0===d?void 0:d.code),severity:n.ERROR});e({quote:c.data})}catch(t){const i=a(null==t?void 0:t.code);return r({error:t.message||t,code:i,severity:n.ERROR})}})({authToken:this.authToken,service:new u}),this.toggleCoverage=(({authToken:t,service:i})=>async({quoteId:s,payload:e,onSuccess:r,onError:d})=>{var c;try{const h=await i.toggleCoverage(t,s,e);if(h.error)return d({error:o(h.error),code:a(null===(c=h.error)||void 0===c?void 0:c.code),severity:n.ERROR});r({quote:h.data})}catch(t){const i=a(null==t?void 0:t.code);return d({error:t.message||t,code:i,severity:n.ERROR})}})({authToken:this.authToken,service:new u})):this.errorEvent.emit({errorCode:d.MISSING_PROPS,message:"Missing authToken",severity:n.ERROR})}render(){return s("justifi-season-interruption-insurance-core",{key:"0ef99882f70c9886e8a5b49da5fe89dd4421067a",ref:t=>this.seasonInterruptionCoreRef=t,"checkout-id":this.checkoutId,getQuote:this.getQuote,toggleCoverage:this.toggleCoverage,"primary-identity-first-name":this.primaryIdentityFirstName,"primary-identity-last-name":this.primaryIdentityLastName,"primary-identity-state":this.primaryIdentityState,"primary-identity-postal-code":this.primaryIdentityPostalCode,"primary-identity-country":this.primaryIdentityCountry,"primary-identity-email-address":this.primaryIdentityEmailAddress,"policy-attributes-insurable-amount":this.policyAttributesInsurableAmount,"policy-attributes-start-date":this.policyAttributesStartDate,"policy-attributes-end-date":this.policyAttributesEndDate,"covered-identity-first-name":this.coveredIdentityFirstName,"covered-identity-last-name":this.coveredIdentityLastName})}};export{p as justifi_season_interruption_insurance}
@@ -1 +1 @@
1
- import{r as t,c as s,h as i}from"./p-fad19d75.js";import{m as o,P as r}from"./p-7ff329b1.js";import"./p-56f6ce4c.js";import"./p-df21aaad.js";import{P as e}from"./p-e3fab0e2.js";import{C as a,a as h}from"./p-14c91ffd.js";import{g as p,a as d}from"./p-8115b2f4.js";import{E as n}from"./p-dce846bf.js";import{J as c}from"./p-437f9114.js";import{c as m}from"./p-1612894d.js";import"./p-7d3be485.js";import"./p-5a62fca2.js";import"./p-8281f09a.js";const f=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event",7),this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)},this.payoutId=void 0,this.authToken=void 0,this.getPayout=void 0,this.getPayoutCSV=void 0,this.errorMessage=null}componentWillLoad(){m(),this.analytics=new c(this),this.initializeServices()}disconnectedCallback(){this.analytics.cleanup()}propChanged(){this.initializeServices()}initializeServices(){this.payoutId&&this.authToken?(this.getPayout=(({id:t,authToken:s,service:i})=>async({onSuccess:o,onError:r})=>{var h;try{const n=await i.fetchPayout(t,s);n.error?r({error:p(n.error),code:d(null===(h=n.error)||void 0===h?void 0:h.code),severity:a.ERROR}):o(new e(n.data))}catch(t){r({error:p(t),code:d(null==t?void 0:t.code),severity:a.ERROR})}})({id:this.payoutId,authToken:this.authToken,service:new r}),this.getPayoutCSV=o({authToken:this.authToken,service:new r})):(this.errorMessage="Failed to load payout details. payoutId or authToken is not provided.",this.errorEvent.emit({message:this.errorMessage,errorCode:h.MISSING_PROPS,severity:a.ERROR}))}render(){return this.errorMessage?n(this.errorMessage):i("payout-details-core",{getPayout:this.getPayout,getPayoutCSV:this.getPayoutCSV,"onError-event":this.handleErrorEvent})}static get watchers(){return{payoutId:["propChanged"],authToken:["propChanged"]}}};export{f as justifi_payout_details}
1
+ import{r as t,c as s,h as i}from"./p-fad19d75.js";import{m as o,P as r}from"./p-7ff329b1.js";import"./p-56f6ce4c.js";import"./p-df21aaad.js";import{P as e}from"./p-e3fab0e2.js";import{C as a,a as h}from"./p-14c91ffd.js";import{g as p,a as d}from"./p-8115b2f4.js";import{E as n}from"./p-dce846bf.js";import{J as c}from"./p-707bdf68.js";import{c as m}from"./p-b91bcbfc.js";import"./p-7d3be485.js";import"./p-5a62fca2.js";import"./p-35846553.js";const f=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event",7),this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)},this.payoutId=void 0,this.authToken=void 0,this.getPayout=void 0,this.getPayoutCSV=void 0,this.errorMessage=null}componentWillLoad(){m(),this.analytics=new c(this),this.initializeServices()}disconnectedCallback(){this.analytics.cleanup()}propChanged(){this.initializeServices()}initializeServices(){this.payoutId&&this.authToken?(this.getPayout=(({id:t,authToken:s,service:i})=>async({onSuccess:o,onError:r})=>{var h;try{const n=await i.fetchPayout(t,s);n.error?r({error:p(n.error),code:d(null===(h=n.error)||void 0===h?void 0:h.code),severity:a.ERROR}):o(new e(n.data))}catch(t){r({error:p(t),code:d(null==t?void 0:t.code),severity:a.ERROR})}})({id:this.payoutId,authToken:this.authToken,service:new r}),this.getPayoutCSV=o({authToken:this.authToken,service:new r})):(this.errorMessage="Failed to load payout details. payoutId or authToken is not provided.",this.errorEvent.emit({message:this.errorMessage,errorCode:h.MISSING_PROPS,severity:a.ERROR}))}render(){return this.errorMessage?n(this.errorMessage):i("payout-details-core",{getPayout:this.getPayout,getPayoutCSV:this.getPayoutCSV,"onError-event":this.handleErrorEvent})}static get watchers(){return{payoutId:["propChanged"],authToken:["propChanged"]}}};export{f as justifi_payout_details}
@@ -0,0 +1 @@
1
+ import{r as t,c as s,h as i}from"./p-fad19d75.js";import{P as e}from"./p-f2924369.js";import"./p-56f6ce4c.js";import{P as r}from"./p-df21aaad.js";import"./p-e3fab0e2.js";import{C as o,a}from"./p-14c91ffd.js";import{g as n,a as p}from"./p-8115b2f4.js";import{E as h}from"./p-dce846bf.js";import{J as c}from"./p-707bdf68.js";import{c as d}from"./p-b91bcbfc.js";import"./p-7d3be485.js";import"./p-5a62fca2.js";import"./p-35846553.js";const m=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event",7),this.paymentService=new e,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)},this.paymentId=void 0,this.authToken=void 0,this.getPaymentDetails=void 0,this.errorMessage=null}componentWillLoad(){d(),this.analytics=new c(this),this.initializeGetPaymentDetails()}disconnectedCallback(){this.analytics.cleanup()}propChanged(){this.initializeGetPaymentDetails()}initializeGetPaymentDetails(){this.paymentId&&this.authToken?this.getPaymentDetails=(({id:t,authToken:s,service:i})=>async({onSuccess:e,onError:a})=>{var h;try{const c=await i.fetchPayment(t,s);c.error?a({error:n(c.error),code:p(null===(h=c.error)||void 0===h?void 0:h.code),severity:o.ERROR}):e({payment:new r(c.data)})}catch(t){const s=p(null==t?void 0:t.code);a({error:n(t),code:s,severity:o.ERROR})}})({id:this.paymentId,authToken:this.authToken,service:new e}):(this.errorMessage="Payment ID and Auth Token are required",this.errorEvent.emit({message:this.errorMessage,errorCode:a.MISSING_PROPS,severity:o.ERROR}))}render(){return this.errorMessage?h(this.errorMessage):i("payment-details-core",{getPaymentDetails:this.getPaymentDetails,"onError-event":this.handleErrorEvent})}static get watchers(){return{paymentId:["propChanged"],authToken:["propChanged"]}}};export{m as justifi_payment_details}