@justifi/webcomponents 6.13.7 → 6.14.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 (138) hide show
  1. package/dist/cjs/{Analytics-DnstliVw.js → Analytics-8X9v2COT.js} +2 -2
  2. package/dist/cjs/{Api-BO8Dq_Q9.js → Api-DdeSr34D.js} +3 -0
  3. package/dist/cjs/additional-questions-form-step_15.cjs.entry.js +4 -3
  4. package/dist/cjs/bank-account-form.cjs.entry.js +2 -2
  5. package/dist/cjs/{business.service-CPATYPjf.js → business.service-OqWV2MwK.js} +1 -1
  6. package/dist/cjs/card-form.cjs.entry.js +2 -2
  7. package/dist/cjs/{check-pkg-version-D9334YnB.js → check-pkg-version-CeW26qxO.js} +1 -1
  8. package/dist/cjs/{checkout.service-DUHQ2mz6.js → checkout.service-CKgEKcmm.js} +1 -1
  9. package/dist/cjs/dispute-notification_2.cjs.entry.js +5 -5
  10. package/dist/cjs/{event-types-fW6pQOxu.js → event-types-B8fM9Mqe.js} +1 -1
  11. package/dist/cjs/{get-subaccounts-BEqUiA8S.js → get-subaccounts-C1LbGVo_.js} +1 -1
  12. package/dist/cjs/hidden-input_2.cjs.entry.js +1 -1
  13. package/dist/cjs/justifi-apple-pay_11.cjs.entry.js +6 -6
  14. package/dist/cjs/justifi-bank-account-billing-form-simple.cjs.entry.js +4 -4
  15. package/dist/cjs/justifi-bank-account-form.cjs.entry.js +4 -4
  16. package/dist/cjs/justifi-business-details.cjs.entry.js +5 -5
  17. package/dist/cjs/justifi-business-form.cjs.entry.js +5 -5
  18. package/dist/cjs/justifi-card-form.cjs.entry.js +4 -4
  19. package/dist/cjs/justifi-checkout-qr-code.cjs.entry.js +4 -4
  20. package/dist/cjs/justifi-checkout.cjs.entry.js +4 -4
  21. package/dist/cjs/justifi-checkouts-list.cjs.entry.js +6 -6
  22. package/dist/cjs/justifi-dispute-management.cjs.entry.js +5 -5
  23. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +4 -4
  24. package/dist/cjs/justifi-order-terminals.cjs.entry.js +6 -6
  25. package/dist/cjs/justifi-payment-details.cjs.entry.js +5 -5
  26. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +5 -5
  27. package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +5 -5
  28. package/dist/cjs/justifi-payments-list.cjs.entry.js +5 -5
  29. package/dist/cjs/justifi-payout-details.cjs.entry.js +5 -5
  30. package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +5 -5
  31. package/dist/cjs/justifi-payouts-list.cjs.entry.js +6 -6
  32. package/dist/cjs/justifi-qr-terminal.cjs.entry.js +5 -5
  33. package/dist/cjs/justifi-refund-payment.cjs.entry.js +5 -5
  34. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +4 -4
  35. package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +4 -4
  36. package/dist/cjs/justifi-terminals-list.cjs.entry.js +6 -6
  37. package/dist/cjs/{package-CUVhHNoD.js → package-CorQZH2M.js} +1 -1
  38. package/dist/cjs/{payment.service-D7Rfb-HB.js → payment.service-B7x7eK6m.js} +1 -1
  39. package/dist/cjs/{payout.service-Dt-LIFvA.js → payout.service-gzGWoXeh.js} +1 -1
  40. package/dist/cjs/{plaid.service-D9rC_F9z.js → plaid.service-BphWvNSP.js} +1 -1
  41. package/dist/cjs/{terminal.service-DnmqW9Dl.js → terminal.service-BPrlu7uq.js} +1 -1
  42. package/dist/collection/api/Api.js +3 -0
  43. package/dist/docs.json +1 -1
  44. package/dist/esm/{Analytics-BlTw8DMC.js → Analytics-DY8rzGkY.js} +2 -2
  45. package/dist/esm/{Api-CwaiizF1.js → Api-C6pVpXue.js} +3 -0
  46. package/dist/esm/additional-questions-form-step_15.entry.js +4 -3
  47. package/dist/esm/bank-account-form.entry.js +2 -2
  48. package/dist/esm/{business.service-BJ3lvMNr.js → business.service-DVaWaxuN.js} +1 -1
  49. package/dist/esm/card-form.entry.js +2 -2
  50. package/dist/esm/{check-pkg-version-DTxsw7UI.js → check-pkg-version-BYwiz3xi.js} +1 -1
  51. package/dist/esm/{checkout.service-DMbW2pn3.js → checkout.service-DCg5TSgj.js} +1 -1
  52. package/dist/esm/dispute-notification_2.entry.js +5 -5
  53. package/dist/esm/{event-types-D37YHLaN.js → event-types-DV6dBcPL.js} +1 -1
  54. package/dist/esm/{get-subaccounts-RtGqjq7u.js → get-subaccounts-B1B7EBG1.js} +1 -1
  55. package/dist/esm/hidden-input_2.entry.js +1 -1
  56. package/dist/esm/justifi-apple-pay_11.entry.js +6 -6
  57. package/dist/esm/justifi-bank-account-billing-form-simple.entry.js +4 -4
  58. package/dist/esm/justifi-bank-account-form.entry.js +4 -4
  59. package/dist/esm/justifi-business-details.entry.js +5 -5
  60. package/dist/esm/justifi-business-form.entry.js +5 -5
  61. package/dist/esm/justifi-card-form.entry.js +4 -4
  62. package/dist/esm/justifi-checkout-qr-code.entry.js +4 -4
  63. package/dist/esm/justifi-checkout.entry.js +4 -4
  64. package/dist/esm/justifi-checkouts-list.entry.js +6 -6
  65. package/dist/esm/justifi-dispute-management.entry.js +5 -5
  66. package/dist/esm/justifi-gross-payment-chart.entry.js +4 -4
  67. package/dist/esm/justifi-order-terminals.entry.js +6 -6
  68. package/dist/esm/justifi-payment-details.entry.js +5 -5
  69. package/dist/esm/justifi-payment-provisioning.entry.js +5 -5
  70. package/dist/esm/justifi-payment-transactions-list.entry.js +5 -5
  71. package/dist/esm/justifi-payments-list.entry.js +5 -5
  72. package/dist/esm/justifi-payout-details.entry.js +5 -5
  73. package/dist/esm/justifi-payout-transactions-list.entry.js +5 -5
  74. package/dist/esm/justifi-payouts-list.entry.js +6 -6
  75. package/dist/esm/justifi-qr-terminal.entry.js +5 -5
  76. package/dist/esm/justifi-refund-payment.entry.js +5 -5
  77. package/dist/esm/justifi-season-interruption-insurance.entry.js +4 -4
  78. package/dist/esm/justifi-terminal-orders-list.entry.js +4 -4
  79. package/dist/esm/justifi-terminals-list.entry.js +6 -6
  80. package/dist/esm/{package-Dwe9A9Fk.js → package-DmrfgGzv.js} +1 -1
  81. package/dist/esm/{payment.service-CPnigqmB.js → payment.service-Dj3Jgj2F.js} +1 -1
  82. package/dist/esm/{payout.service-CYPLRYg5.js → payout.service-CdcAA0_l.js} +1 -1
  83. package/dist/esm/{plaid.service-CvfKh_3f.js → plaid.service-CwS4SIQb.js} +1 -1
  84. package/dist/esm/{terminal.service-r2jKgzEJ.js → terminal.service-DQz6FWpx.js} +1 -1
  85. package/dist/module/Api.js +3 -0
  86. package/dist/module/package.js +1 -1
  87. package/dist/webcomponents/{p-b89ae2e8.entry.js → p-154bbb18.entry.js} +1 -1
  88. package/dist/webcomponents/{p-fc1ba772.entry.js → p-1cd30181.entry.js} +1 -1
  89. package/dist/webcomponents/{p-0b394a01.entry.js → p-21fcf763.entry.js} +1 -1
  90. package/dist/webcomponents/{p-240b7c93.entry.js → p-24a39581.entry.js} +1 -1
  91. package/dist/webcomponents/{p-0b01e411.entry.js → p-2908f0e4.entry.js} +1 -1
  92. package/dist/webcomponents/{p-4f48afc8.entry.js → p-3e1d3af4.entry.js} +1 -1
  93. package/dist/webcomponents/{p-75f59ef5.entry.js → p-4781669c.entry.js} +1 -1
  94. package/dist/webcomponents/{p-d2bb9c6c.entry.js → p-4fd708ff.entry.js} +1 -1
  95. package/dist/webcomponents/p-5257de4d.entry.js +1 -0
  96. package/dist/webcomponents/{p-265501d4.entry.js → p-52f605a9.entry.js} +1 -1
  97. package/dist/webcomponents/p-5da3adf2.entry.js +1 -0
  98. package/dist/webcomponents/{p-a44c5178.entry.js → p-6a98c472.entry.js} +4 -4
  99. package/dist/webcomponents/{p-4e8cd7f2.entry.js → p-6c1e40e7.entry.js} +1 -1
  100. package/dist/webcomponents/{p-e254c3e3.entry.js → p-6d218257.entry.js} +1 -1
  101. package/dist/webcomponents/{p-515a7a8d.entry.js → p-7883f20e.entry.js} +1 -1
  102. package/dist/webcomponents/{p-146be0a4.entry.js → p-8b85daf8.entry.js} +1 -1
  103. package/dist/webcomponents/{p-b4219b06.entry.js → p-981dcbc9.entry.js} +1 -1
  104. package/dist/webcomponents/p-B9a-6Pn9.js +1 -0
  105. package/dist/webcomponents/{p-Bx1A5sQR.js → p-BJIJZgZH.js} +1 -1
  106. package/dist/webcomponents/{p-B5RnJXKG.js → p-CGTKc-Ra.js} +1 -1
  107. package/dist/webcomponents/{p-DNIKPf_U.js → p-C_YFlFQQ.js} +1 -1
  108. package/dist/webcomponents/{p-Cc6TzfDZ.js → p-CiIGpNnJ.js} +1 -1
  109. package/dist/webcomponents/p-ClGSzzda.js +1 -0
  110. package/dist/webcomponents/{p-HtdZEF57.js → p-CoY0w4be.js} +1 -1
  111. package/dist/webcomponents/{p-aBD3IP5P.js → p-DB4q0kxv.js} +1 -1
  112. package/dist/webcomponents/p-DmrfgGzv.js +1 -0
  113. package/dist/webcomponents/{p-CDKbfqXv.js → p-IADrgGjR.js} +1 -1
  114. package/dist/webcomponents/p-RmBpI2DR.js +1 -0
  115. package/dist/webcomponents/p-ab0449a9.entry.js +1 -0
  116. package/dist/webcomponents/p-ad72e7c0.entry.js +1 -0
  117. package/dist/webcomponents/{p-69fc3436.entry.js → p-ae223a12.entry.js} +1 -1
  118. package/dist/webcomponents/{p-7d469a3c.entry.js → p-bebfcbdf.entry.js} +1 -1
  119. package/dist/webcomponents/{p-403290aa.entry.js → p-c7b96d6f.entry.js} +1 -1
  120. package/dist/webcomponents/{p-863a7764.entry.js → p-cc8ad073.entry.js} +1 -1
  121. package/dist/webcomponents/{p-0e440060.entry.js → p-df21d9b7.entry.js} +1 -1
  122. package/dist/webcomponents/{p-0a1a87fc.entry.js → p-e659f030.entry.js} +1 -1
  123. package/dist/webcomponents/{p-37daa694.entry.js → p-eaf179a0.entry.js} +1 -1
  124. package/dist/webcomponents/p-ee3e88bc.entry.js +1 -0
  125. package/dist/webcomponents/{p-bbc21966.entry.js → p-ef3f9a80.entry.js} +1 -1
  126. package/dist/webcomponents/{p-97d05b62.entry.js → p-f7258258.entry.js} +1 -1
  127. package/dist/webcomponents/{p-DMGq2Rrg.js → p-n4OrTH9l.js} +1 -1
  128. package/dist/webcomponents/webcomponents.esm.js +1 -1
  129. package/package.json +1 -1
  130. package/dist/webcomponents/p-01b2a5f7.entry.js +0 -1
  131. package/dist/webcomponents/p-38b3078b.entry.js +0 -1
  132. package/dist/webcomponents/p-4d48d2dc.entry.js +0 -1
  133. package/dist/webcomponents/p-54fb057f.entry.js +0 -1
  134. package/dist/webcomponents/p-68d936ba.entry.js +0 -1
  135. package/dist/webcomponents/p-B2CETB_i.js +0 -1
  136. package/dist/webcomponents/p-CPEn7kso.js +0 -1
  137. package/dist/webcomponents/p-DM45Ihwj.js +0 -1
  138. package/dist/webcomponents/p-Dwe9A9Fk.js +0 -1
@@ -0,0 +1 @@
1
+ import{h as e,r as t,c as a}from"./p-CV0Pyo1O.js";import{P as s}from"./p-B9a-6Pn9.js";import{m as i}from"./p-rpFC83GL.js";import{C as d,b as c,i as f,h as l}from"./p-AyLerOda.js";import{J as r}from"./p-CGTKc-Ra.js";import{c as h}from"./p-CoY0w4be.js";import"./p-DVJaoI_m.js";import{b as o,d as b,s as p}from"./p-Ds_P-dB8.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import{P as n,M as m}from"./p-D1_eip6x.js";import{a as y,b as u,D as v,c as k,C,E as j}from"./p-Cu7hgXL1.js";import{S as g}from"./p-DzEdYT8R.js";import"./p-CZfYo5-1.js";import{S as w}from"./p-uZ5KAseb.js";import{a as D,B as P}from"./p-CHw7tICr.js";import"./p-ClGSzzda.js";import"./p-DmrfgGzv.js";import"./p-HXpYMWUU.js";import"./p-CXZRiaUw.js";import"./p-D8GTwl9v.js";import"./p-CPKMvyV_.js";const x=()=>e("div",{class:"row gap-3"},e("div",{class:"col-12"},e(w,{width:"35%",height:"30px"})),e("div",{class:"col-12"},e(w,{width:"70%"})),e("div",{class:"col-12"},e(w,{width:"40%"})),e("div",{class:"col-12"},e(w,{width:"40%"})),e("div",{class:"col-12"},e(w,{width:"100%"})),e("div",{class:"col-12"},e(w,{width:"80%"}))),T=class{constructor(e){t(this,e),this.errorEvent=a(this,"error-event",7),this.recordClickEvent=a(this,"record-click-event",7),this.loading=!0}componentWillLoad(){h(),this.analytics=new r(this),this.initializeGetPaymentDetails()}disconnectedCallback(){var e;null===(e=this.analytics)||void 0===e||e.cleanup()}propChanged(){this.initializeGetPaymentDetails()}initializeGetPaymentDetails(){this.paymentId&&this.authToken?(this.getPaymentDetails=i({id:this.paymentId,authToken:this.authToken,service:new s}),this.fetchData()):(this.errorMessage="Payment ID and Auth Token are required",this.errorEvent.emit({message:this.errorMessage,errorCode:c.MISSING_PROPS,severity:d.ERROR}))}updateOnPropChange(){this.getPaymentDetails&&this.fetchData()}fetchData(){this.loading=!0,this.getPaymentDetails({onSuccess:({payment:e})=>{this.payment=e,this.errorMessage=null},onError:({error:e,code:t,severity:a})=>{this.errorMessage=e,this.errorEvent.emit({errorCode:t,message:e,severity:a})},final:()=>{this.loading=!1}})}get PaymentStatus(){return this.payment.status===f.disputed&&this.payment.disputes.some((e=>e.status===l.lost))?n.DISPUTE_LOST:this.payment.status}render(){return e(g,{key:"f304cb665f17ce96b6d97a38d94907629f559413"},this.loading&&e(x,{key:"709acde31230bd9e825e4e9669234492aff3cc3a"}),!this.loading&&this.errorMessage&&j(this.errorMessage),!this.loading&&!this.errorMessage&&this.payment&&e("justifi-details",{key:"09a4a2559fb89a5b4b57d81b0fd48952c219d348",errorMessage:this.errorMessage},e(y,{key:"7cbfece91ce9e5fab75d561ad369080ecbe76fa4",slot:"head-info",badge:e("div",{class:"d-flex gap-1"},m(this.PaymentStatus),this.payment.expedited?e(D,{variant:P.WARNING,title:"Expedited",text:"Expedited"}):null),title:this.payment.formattedPaymentAmount(this.payment.amount)},e(u,{key:"4aa014d77def141d2053c3745b8215cc03a53ac7",classes:"border-1 border-end",title:"Updated At",value:`${o(this.payment.updated_at)} ${b(this.payment.updated_at)}`}),e(u,{key:"f344398f4fd4db6e1e7ca1335c3aa55630668475",classes:"border-1 border-end",title:"Created At",value:`${o(this.payment.created_at)} ${b(this.payment.created_at)}`}),e(u,{key:"a01e5a04400b996cfb2a9e563c8f383b8e8d7c66",title:"ID",value:this.payment.id})),e("div",{key:"ef0c63d53031dfa8910dfbdedede1e20ac09e78a",slot:"detail-sections"},e(v,{key:"5053784a7e3bd8932562a816921564aadd6d79c8",sectionTitle:"Details"}),e("div",{key:"43c56ee5a39589ea7a0107f32e274be439adf33a",class:"d-flex flex-column gap-2 w-100"},e(k,{key:"fcee2dd211c9bf951cdd6855ac3fa844632391ce",title:"Amount",value:this.payment.formattedPaymentAmount(this.payment.amount)}),e(k,{key:"44d055f3445f02feaeb4519b5f4777333089a8c6",title:"Fees",value:this.payment.formattedPaymentAmount(this.payment.fee_amount)}),e(k,{key:"906b584174bd5c329974274a2f1e1ef7e9e8fde0",title:"Refunded",value:this.payment.formattedPaymentAmount(this.payment.amount_refunded)}),e(k,{key:"809429e88eac8ebe8142bb0028f8b86447977697",title:"Net",value:this.payment.formattedPaymentAmount(this.payment.balance)}),e(k,{key:"e08c02efc64f105ce3180e9773584a331ae19a9b",title:"Status",value:m(this.PaymentStatus)}),e(k,{key:"fbb910b7006f9d4bff9b14ffd4fc2f7da8b68020",title:"Payment ID",value:this.payment.id}),e(k,{key:"09fefc2d1a750ab2f5dfb2043db08d5f16d6d9aa",title:"Processing Fees",value:this.payment.formattedPaymentAmount(this.payment.fee_amount)}),e(k,{key:"1d96f4557823f1d82d5c6e0e46a984c13c6f018b",title:"Statement Descriptor",value:this.payment.statement_descriptor}),e(k,{key:"51bfae7ef30f36c99c0fa1b25dc5397720ef88ff",title:"Description",value:this.payment.description}),e(k,{key:"5c44b3d40bfe6b2fbf258fee90f55ff24d0b3c28",title:"Expedited",value:this.payment.expedited?"Yes":"No"})),this.payment.payment_method.card&&[e(v,{key:"3d652ba331824448b7e7af969b2ead216f358e28",sectionTitle:"Payment Method"}),e("div",{key:"49ad00ec9d703d196a025fa17b03f4af7cdc4dc5",class:"d-flex flex-column gap-2 w-100"},e(k,{key:"2b1b3f57e74fd65dc4b82d727a94afbe14803c52",title:"ID",value:this.payment.payment_method.card.id}),e(k,{key:"b23d5263566ff11d469dea9a245d20a7689540f8",title:"Payment Type",value:"Card"}),e(k,{key:"f5f76d6d9ac609884aac18fe2743d4fad2192b86",title:"Last 4 Numbers",value:this.payment.payment_method.lastFourDigits}),e(k,{key:"22f296966b6f1aaf516b1d70144cff4f59b82c05",title:"Brand",value:p(this.payment.payment_method.card.brand)}),e(k,{key:"d7dcd0f7a74ed2cc5ba6406a7d48522ca06a7546",title:"Cardholder",value:this.payment.payment_method.payersName}))],this.payment.payment_method.bank_account&&[e(v,{key:"37a2a20c462cb94baa01ca7763d43ced04b4543c",sectionTitle:"Payment Method"}),e("div",{key:"f6de7746d5ff64d27368edef51b3c4e0ff7c658b",class:"d-flex flex-column gap-2 w-100"},e(k,{key:"34e9b26c6d20e9b5e86e4cc11fb925ff1ef5ce94",title:"ID",value:this.payment.payment_method.bank_account.id}),e(k,{key:"32cd6da4d7234aca403bd699de23e1cf889bf14f",title:"Last 4 Numbers",value:this.payment.last_four_digits}),e(k,{key:"f1313ac7c15d5ae2d9dfa2b6d3ec794d0987252b",title:"Bank Name",value:this.payment.payment_method.bank_account.brand}),e(k,{key:"76d1ac1961e530a7a6e1ba5512b982cd70df9470",title:"Account Owner",value:this.payment.payment_method.payersName}))],this.payment.metadata&&[e(v,{key:"1cff262d07acda5bc742f325a23f4199c22f3a01",sectionTitle:"Metadata"}),e("div",{key:"77379785d2559d39a26a253757fdaf02795c53a1",class:"d-table gap-2 w-100"},e(C,{key:"92cb32f3dd6b45094210194e2e40927d7f9d6bde",metadata:this.payment.metadata}))])))}static get watchers(){return{paymentId:["propChanged"],authToken:["propChanged"],getPaymentDetails:["updateOnPropChange"]}}};export{T as justifi_payment_details}
@@ -1 +1 @@
1
- import{h as i,r as e}from"./p-CV0Pyo1O.js";import{S as a}from"./p-uZ5KAseb.js";import{w as t,c as d}from"./p-DVJaoI_m.js";import{e as c}from"./p-Ds_P-dB8.js";import{c as s}from"./p-HtdZEF57.js";import"./p-CPKMvyV_.js";import"./p-D8GTwl9v.js";import"./p-HXpYMWUU.js";import"./p-Dwe9A9Fk.js";const n=e=>{const{isReady:t}=e;return t?null:i("div",{class:"container-fluid p-0"},i("div",{class:"mb-3"},i(a,{height:"18px",width:"100px"}),i(a,{height:"36px"})),i("div",{class:"row"},i("div",{class:"col-4 align-content-end"},i(a,{height:"18px",width:"80px"}),i(a,{height:"36px"})),i("div",{class:"col-4 align-content-end"},i(a,{height:"36px"})),i("div",{class:"col-4 align-content-end"},i(a,{height:"18px",width:"30px"}),i(a,{height:"36px"}))))},r=class{constructor(i){e(this,i),this.isReady=!1}async componentWillLoad(){await t(),this.iframeOrigin=d.iframeOrigin,this.tabId=c(),s()}componentDidRender(){Promise.all([this.cardNumberIframeElement,this.expirationMonthIframeElement,this.expirationYearIframeElement,this.cvvIframeElement].map((i=>new Promise((e=>{i.addEventListener("iframeLoaded",(()=>{e()}))}))))).then((()=>{this.isReady=!0}))}async validate(){const i=await this.cardNumberIframeElement.validate(),e=await this.expirationMonthIframeElement.validate(),a=await this.expirationYearIframeElement.validate(),t=await this.cvvIframeElement.validate();return i&&e&&a&&t}async tokenize({clientId:i,paymentMethodMetadata:e,account:a}){return await this.cardNumberIframeElement.tokenize(i,e,a)}render(){return i("div",{key:"d3cb1fca6595f60e5f5f122b73d3d6c11a826423"},i(n,{key:"f83dcbbc214d460bb21c015ec051436ed5cf6670",isReady:this.isReady}),i("hidden-input",{key:"5fad0d06303d0ddb55c30c2cd94014255f2a8cec"}),i("div",{key:"68440756a1aad69b5c95245e7a2a5feb16899dca",class:"container-fluid p-0",style:{opacity:this.isReady?"1":"0",height:this.isReady?"auto":"0"}},i("div",{key:"b39eab56c79463935f1a1bb15cc867997f026e7b",class:"mb-3"},i("iframe-input",{key:"25a2390a8c3c92d5e6eceafe6b821202ecb22d76",inputId:"cardNumber",ref:i=>this.cardNumberIframeElement=i,label:"Card Number",iframeOrigin:`${this.iframeOrigin}/v2/cardNumber?tabId=${this.tabId}`})),i("div",{key:"68766798d954a0b3d093ae13c3c2955f819da4f2",class:"row"},i("div",{key:"05539f1ac8ebb0397574d55b4b76d7acdb7d2dca",class:"col-4 align-content-end"},i("iframe-input",{key:"4c437a4384e6c301e18824d799784c1133e70ee3",inputId:"expirationMonth",ref:i=>this.expirationMonthIframeElement=i,label:"Expiration",iframeOrigin:`${this.iframeOrigin}/v2/expirationMonth?tabId=${this.tabId}`})),i("div",{key:"b9a5b8b5dda1d8ab6305c9dc1ef9b655eb02fb3d",class:"col-4 align-content-end"},i("iframe-input",{key:"c1a412c20e75d21c1084a4b93f22362c367c1907",inputId:"expirationYear",ref:i=>this.expirationYearIframeElement=i,label:"",iframeOrigin:`${this.iframeOrigin}/v2/expirationYear?tabId=${this.tabId}`})),i("div",{key:"abdfdbd7eb784871011397a7c5fdf371e3c6baf0",class:"col-4 align-content-end"},i("iframe-input",{key:"08dff072e785846d7543018c194b4df6ce5b343e",inputId:"CVV",ref:i=>this.cvvIframeElement=i,label:"CVV",iframeOrigin:`${this.iframeOrigin}/v2/CVV?tabId=${this.tabId}`})))))}};export{r as card_form}
1
+ import{h as i,r as e}from"./p-CV0Pyo1O.js";import{S as a}from"./p-uZ5KAseb.js";import{w as t,c as d}from"./p-DVJaoI_m.js";import{e as c}from"./p-Ds_P-dB8.js";import{c as s}from"./p-CoY0w4be.js";import"./p-CPKMvyV_.js";import"./p-D8GTwl9v.js";import"./p-HXpYMWUU.js";import"./p-DmrfgGzv.js";const n=e=>{const{isReady:t}=e;return t?null:i("div",{class:"container-fluid p-0"},i("div",{class:"mb-3"},i(a,{height:"18px",width:"100px"}),i(a,{height:"36px"})),i("div",{class:"row"},i("div",{class:"col-4 align-content-end"},i(a,{height:"18px",width:"80px"}),i(a,{height:"36px"})),i("div",{class:"col-4 align-content-end"},i(a,{height:"36px"})),i("div",{class:"col-4 align-content-end"},i(a,{height:"18px",width:"30px"}),i(a,{height:"36px"}))))},r=class{constructor(i){e(this,i),this.isReady=!1}async componentWillLoad(){await t(),this.iframeOrigin=d.iframeOrigin,this.tabId=c(),s()}componentDidRender(){Promise.all([this.cardNumberIframeElement,this.expirationMonthIframeElement,this.expirationYearIframeElement,this.cvvIframeElement].map((i=>new Promise((e=>{i.addEventListener("iframeLoaded",(()=>{e()}))}))))).then((()=>{this.isReady=!0}))}async validate(){const i=await this.cardNumberIframeElement.validate(),e=await this.expirationMonthIframeElement.validate(),a=await this.expirationYearIframeElement.validate(),t=await this.cvvIframeElement.validate();return i&&e&&a&&t}async tokenize({clientId:i,paymentMethodMetadata:e,account:a}){return await this.cardNumberIframeElement.tokenize(i,e,a)}render(){return i("div",{key:"d3cb1fca6595f60e5f5f122b73d3d6c11a826423"},i(n,{key:"f83dcbbc214d460bb21c015ec051436ed5cf6670",isReady:this.isReady}),i("hidden-input",{key:"5fad0d06303d0ddb55c30c2cd94014255f2a8cec"}),i("div",{key:"68440756a1aad69b5c95245e7a2a5feb16899dca",class:"container-fluid p-0",style:{opacity:this.isReady?"1":"0",height:this.isReady?"auto":"0"}},i("div",{key:"b39eab56c79463935f1a1bb15cc867997f026e7b",class:"mb-3"},i("iframe-input",{key:"25a2390a8c3c92d5e6eceafe6b821202ecb22d76",inputId:"cardNumber",ref:i=>this.cardNumberIframeElement=i,label:"Card Number",iframeOrigin:`${this.iframeOrigin}/v2/cardNumber?tabId=${this.tabId}`})),i("div",{key:"68766798d954a0b3d093ae13c3c2955f819da4f2",class:"row"},i("div",{key:"05539f1ac8ebb0397574d55b4b76d7acdb7d2dca",class:"col-4 align-content-end"},i("iframe-input",{key:"4c437a4384e6c301e18824d799784c1133e70ee3",inputId:"expirationMonth",ref:i=>this.expirationMonthIframeElement=i,label:"Expiration",iframeOrigin:`${this.iframeOrigin}/v2/expirationMonth?tabId=${this.tabId}`})),i("div",{key:"b9a5b8b5dda1d8ab6305c9dc1ef9b655eb02fb3d",class:"col-4 align-content-end"},i("iframe-input",{key:"c1a412c20e75d21c1084a4b93f22362c367c1907",inputId:"expirationYear",ref:i=>this.expirationYearIframeElement=i,label:"",iframeOrigin:`${this.iframeOrigin}/v2/expirationYear?tabId=${this.tabId}`})),i("div",{key:"abdfdbd7eb784871011397a7c5fdf371e3c6baf0",class:"col-4 align-content-end"},i("iframe-input",{key:"08dff072e785846d7543018c194b4df6ce5b343e",inputId:"CVV",ref:i=>this.cvvIframeElement=i,label:"CVV",iframeOrigin:`${this.iframeOrigin}/v2/CVV?tabId=${this.tabId}`})))))}};export{r as card_form}
@@ -0,0 +1 @@
1
+ import{r as t,c as e,h as s}from"./p-CV0Pyo1O.js";import{m as i}from"./p-DMB1dln7.js";import{C as h}from"./p-C_YFlFQQ.js";import{C as r,b as o,I as a,c as l,d as n}from"./p-AyLerOda.js";import{J as c}from"./p-CGTKc-Ra.js";import{c as d}from"./p-CoY0w4be.js";import"./p-CXZRiaUw.js";import"./p-ClGSzzda.js";import"./p-DVJaoI_m.js";import"./p-D8GTwl9v.js";import"./p-Ds_P-dB8.js";import"./p-HXpYMWUU.js";import"./p-DmrfgGzv.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";const u=class{constructor(s){t(this,s),this.checkoutCompleted=e(this,"checkout-completed",7),this.checkoutExpired=e(this,"checkout-expired",7),this.errorEvent=e(this,"error-event",7),this.pollIntervalMs=3e3,this.pollTimeoutMs=6e5,this.terminalState="loading",this.paymentStatus="",this.errorMessage="",this.pollIntervalHandle=null,this.pollTimeoutHandle=null,this.failedDismissHandle=null,this.seenCompletionCreatedAts=new Set,this.inFlight=!1}componentWillLoad(){d(),this.analytics=new c(this),this.initialize()}disconnectedCallback(){var t;this.stopAll(),null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.stopAll(),this.initialize()}suppressInnerErrors(t){t.stopPropagation()}get effectivePollInterval(){return Math.max(1e3,this.pollIntervalMs)}initialize(){this.authToken&&this.checkoutId?(this.terminalState="loading",this.getCheckout=i({authToken:this.authToken,checkoutId:this.checkoutId,service:new h}),this.getCheckout({onSuccess:({checkout:t})=>this.handleInitialLoad(t),onError:({error:t,code:e,severity:s})=>{this.terminalState="error",this.errorMessage=t,this.errorEvent.emit({message:t,errorCode:e,severity:s})}})):this.errorEvent.emit({message:"authToken and checkoutId are required",errorCode:o.MISSING_PROPS,severity:r.ERROR})}handleInitialLoad(t){var e;switch(t.status){case a.expired:this.terminalState="expired",this.checkoutExpired.emit({checkoutId:this.checkoutId}),this.errorEvent.emit({message:l.CHECKOUT_EXPIRED,errorCode:o.CHECKOUT_EXPIRED,severity:r.ERROR});break;case a.completed:this.terminalState="completed",this.paymentStatus=this.resolvePaymentStatus(t),this.checkoutCompleted.emit({checkoutId:this.checkoutId,paymentStatus:this.paymentStatus});break;default:(null!==(e=t.completions)&&void 0!==e?e:[]).forEach((t=>this.seenCompletionCreatedAts.add(t.created_at))),this.terminalState="ready",this.startPolling()}}startPolling(){this.pollTimeoutHandle=setTimeout((()=>{this.stopAll(),this.terminalState="error",this.errorMessage="Checkout polling timed out",this.errorEvent.emit({message:"Checkout polling timed out",errorCode:o.FETCH_ERROR,severity:r.ERROR})}),this.pollTimeoutMs),this.pollIntervalHandle=setInterval((()=>this.tick()),this.effectivePollInterval)}tick(){this.inFlight||(this.inFlight=!0,this.getCheckout({onSuccess:({checkout:t})=>{this.inFlight=!1,this.handlePollResult(t)},onError:({error:t,code:e,severity:s})=>{this.inFlight=!1,this.stopAll(),this.terminalState="error",this.errorMessage=t,this.errorEvent.emit({message:t,errorCode:e,severity:s})}}))}handlePollResult(t){var e;const s=(null!==(e=t.completions)&&void 0!==e?e:[]).filter((t=>!this.seenCompletionCreatedAts.has(t.created_at)&&"failed"===t.payment_status));if(s.forEach((t=>this.seenCompletionCreatedAts.add(t.created_at))),s.length>0&&(this.terminalState="payment-failed",this.failedDismissHandle&&clearTimeout(this.failedDismissHandle),this.failedDismissHandle=setTimeout((()=>{"payment-failed"===this.terminalState&&(this.terminalState="ready")}),3e3)),t.status===a.completed)return this.stopAll(),this.terminalState="completed",this.paymentStatus=this.resolvePaymentStatus(t),void this.checkoutCompleted.emit({checkoutId:this.checkoutId,paymentStatus:this.paymentStatus});t.status===a.expired&&(this.stopAll(),this.terminalState="expired",this.checkoutExpired.emit({checkoutId:this.checkoutId}),this.errorEvent.emit({message:l.CHECKOUT_EXPIRED,errorCode:o.CHECKOUT_EXPIRED,severity:r.ERROR}))}resolvePaymentStatus(t){var e,s;const i=null===(s=[...null!==(e=t.completions)&&void 0!==e?e:[]].sort(((t,e)=>new Date(e.updated_at).getTime()-new Date(t.updated_at).getTime()))[0])||void 0===s?void 0:s.payment_status;return i===n.succeeded||null==i&&t.successful_payment_id?"succeeded":"pending"}stopAll(){this.pollIntervalHandle&&(clearInterval(this.pollIntervalHandle),this.pollIntervalHandle=null),this.pollTimeoutHandle&&(clearTimeout(this.pollTimeoutHandle),this.pollTimeoutHandle=null),this.failedDismissHandle&&(clearTimeout(this.failedDismissHandle),this.failedDismissHandle=null),this.inFlight=!1}render(){return this.authToken&&this.checkoutId?s("div",null,"loading"===this.terminalState&&null,("ready"===this.terminalState||"payment-failed"===this.terminalState)&&s("div",null,s("justifi-checkout-qr-code",{checkoutId:this.checkoutId}),"payment-failed"===this.terminalState&&s("p",null,"Payment failed. Please try again."),"ready"===this.terminalState&&s("p",null,"Scan to pay")),"completed"===this.terminalState&&s("div",null,s("p",null,"succeeded"===this.paymentStatus?"Payment received":"Payment pending")),"expired"===this.terminalState&&s("p",null,"Checkout expired. Please create a new checkout."),"error"===this.terminalState&&s("p",null,this.errorMessage)):null}static get watchers(){return{authToken:["propChanged"],checkoutId:["propChanged"]}}};export{u as justifi_qr_terminal}