@verdocs/web-sdk 6.0.3 → 6.0.4

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 (114) hide show
  1. package/dist/cjs/{utils-DCB8q98B.js → utils-BXqLrKQZ.js} +3 -2
  2. package/dist/cjs/utils-BXqLrKQZ.js.map +1 -0
  3. package/dist/cjs/verdocs-contact-picker.cjs.entry.js +1 -1
  4. package/dist/cjs/verdocs-delegate-dialog_5.cjs.entry.js +1 -1
  5. package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +1 -1
  6. package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +1 -1
  7. package/dist/cjs/verdocs-pagination_2.cjs.entry.js +1 -1
  8. package/dist/cjs/verdocs-preview_7.cjs.entry.js +1 -1
  9. package/dist/cjs/verdocs-sign.cjs.entry.js +1 -1
  10. package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +1 -1
  11. package/dist/collection/utils/utils.js +1 -0
  12. package/dist/collection/utils/utils.js.map +1 -1
  13. package/dist/components/{p-BrTXDUMP.js → p-BHeendgg.js} +3 -3
  14. package/dist/components/{p-BrTXDUMP.js.map → p-BHeendgg.js.map} +1 -1
  15. package/dist/components/{p-B3z65DlW.js → p-CAJEh6K0.js} +4 -4
  16. package/dist/components/{p-B3z65DlW.js.map → p-CAJEh6K0.js.map} +1 -1
  17. package/dist/components/{p-D9UxTdE4.js → p-CDDk2TOh.js} +4 -4
  18. package/dist/components/{p-D9UxTdE4.js.map → p-CDDk2TOh.js.map} +1 -1
  19. package/dist/components/{p-Flyk-mjn.js → p-CNvRd0Kp.js} +3 -3
  20. package/dist/components/{p-Flyk-mjn.js.map → p-CNvRd0Kp.js.map} +1 -1
  21. package/dist/components/{p-pTXj30z_.js → p-CSQjgm9n.js} +3 -3
  22. package/dist/components/{p-pTXj30z_.js.map → p-CSQjgm9n.js.map} +1 -1
  23. package/dist/components/{p-xS2v_6o_.js → p-CSpoYxdI.js} +3 -3
  24. package/dist/components/{p-xS2v_6o_.js.map → p-CSpoYxdI.js.map} +1 -1
  25. package/dist/components/{p-Bhib7RyH.js → p-DmXt1ckc.js} +3 -3
  26. package/dist/components/{p-Bhib7RyH.js.map → p-DmXt1ckc.js.map} +1 -1
  27. package/dist/components/{p-DnAJsr7Q.js → p-WvXI4EBm.js} +3 -3
  28. package/dist/components/{p-DnAJsr7Q.js.map → p-WvXI4EBm.js.map} +1 -1
  29. package/dist/components/{p-DsBOZHKo.js → p-y2dhcER7.js} +3 -2
  30. package/dist/components/{p-DsBOZHKo.js.map → p-y2dhcER7.js.map} +1 -1
  31. package/dist/components/verdocs-build.js +5 -5
  32. package/dist/components/verdocs-contact-picker.js +1 -1
  33. package/dist/components/verdocs-envelope-document-page.js +1 -1
  34. package/dist/components/verdocs-envelopes-list.js +2 -2
  35. package/dist/components/verdocs-preview.js +1 -1
  36. package/dist/components/verdocs-quick-filter.js +1 -1
  37. package/dist/components/verdocs-send.js +1 -1
  38. package/dist/components/verdocs-sign.js +3 -3
  39. package/dist/components/verdocs-template-document-page.js +1 -1
  40. package/dist/components/verdocs-template-fields.js +1 -1
  41. package/dist/components/verdocs-templates-list.js +1 -1
  42. package/dist/components/verdocs-view.js +1 -1
  43. package/dist/esm/{utils-DmfOx9Ey.js → utils-tbEy96hU.js} +3 -2
  44. package/dist/esm/utils-tbEy96hU.js.map +1 -0
  45. package/dist/esm/verdocs-contact-picker.entry.js +1 -1
  46. package/dist/esm/verdocs-delegate-dialog_5.entry.js +1 -1
  47. package/dist/esm/verdocs-envelope-document-page.entry.js +1 -1
  48. package/dist/esm/verdocs-envelopes-list.entry.js +1 -1
  49. package/dist/esm/verdocs-pagination_2.entry.js +1 -1
  50. package/dist/esm/verdocs-preview_7.entry.js +1 -1
  51. package/dist/esm/verdocs-sign.entry.js +1 -1
  52. package/dist/esm/verdocs-template-document-page_2.entry.js +1 -1
  53. package/dist/esm-es5/{utils-DmfOx9Ey.js → utils-tbEy96hU.js} +1 -1
  54. package/dist/esm-es5/utils-tbEy96hU.js.map +1 -0
  55. package/dist/esm-es5/verdocs-contact-picker.entry.js +2 -2
  56. package/dist/esm-es5/verdocs-delegate-dialog_5.entry.js +1 -1
  57. package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
  58. package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
  59. package/dist/esm-es5/verdocs-pagination_2.entry.js +1 -1
  60. package/dist/esm-es5/verdocs-preview_7.entry.js +2 -2
  61. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  62. package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
  63. package/dist/verdocs-web-sdk/{p-92147c8e.entry.js → p-1138cbc8.entry.js} +3 -3
  64. package/dist/verdocs-web-sdk/{p-23d2bebc.system.entry.js → p-1ac2de04.system.entry.js} +2 -2
  65. package/dist/verdocs-web-sdk/{p-dd51c6cf.entry.js → p-21da2b89.entry.js} +3 -3
  66. package/dist/verdocs-web-sdk/{p-3a66ab11.system.entry.js → p-42b32d21.system.entry.js} +2 -2
  67. package/dist/verdocs-web-sdk/{p-baaa811b.entry.js → p-49683659.entry.js} +2 -2
  68. package/dist/verdocs-web-sdk/{p-ceabec49.entry.js → p-6261f76f.entry.js} +2 -2
  69. package/dist/verdocs-web-sdk/{p-9524927b.entry.js → p-664be870.entry.js} +2 -2
  70. package/dist/verdocs-web-sdk/{p-d5f1bffb.entry.js → p-75a43183.entry.js} +2 -2
  71. package/dist/verdocs-web-sdk/{p-fc5c2c45.system.entry.js → p-7a2842d3.system.entry.js} +2 -2
  72. package/dist/verdocs-web-sdk/{p-5f7f20bb.system.entry.js → p-7cb0a86a.system.entry.js} +2 -2
  73. package/dist/verdocs-web-sdk/{p-35d8d17c.system.entry.js → p-8bf7be29.system.entry.js} +3 -3
  74. package/dist/verdocs-web-sdk/{p-nr83qKQ0.system.js.map → p-B2S7Mlv-.system.js.map} +1 -1
  75. package/dist/verdocs-web-sdk/{p-Bu5xpJsB.system.js.map → p-BGP1meB_.system.js.map} +1 -1
  76. package/dist/verdocs-web-sdk/{p-BEywLaeg.system.js.map → p-BskSN54G.system.js.map} +1 -1
  77. package/dist/verdocs-web-sdk/{p-DcCGkiJ-.system.js.map → p-C8jYVW5r.system.js.map} +1 -1
  78. package/dist/verdocs-web-sdk/{p-BscsgV4o.system.js.map → p-CB7Tnry2.system.js.map} +1 -1
  79. package/dist/verdocs-web-sdk/{p-DGdn9mfe.system.js.map → p-CmJ4fTid.system.js.map} +1 -1
  80. package/dist/verdocs-web-sdk/{p-DPhW-51Y.system.js.map → p-CuCpcHZy.system.js.map} +1 -1
  81. package/dist/verdocs-web-sdk/{p-CICLOJJr.system.js.map → p-Dp4d4aXG.system.js.map} +1 -1
  82. package/dist/verdocs-web-sdk/{p-fL0BKEnm.js → p-DvM2ECoi.js} +1 -1
  83. package/dist/verdocs-web-sdk/p-DvM2ECoi.js.map +1 -0
  84. package/dist/verdocs-web-sdk/p-RlE9Yh59.system.js +1 -1
  85. package/dist/verdocs-web-sdk/{p-b4bfad4d.entry.js → p-d94cd03f.entry.js} +2 -2
  86. package/dist/verdocs-web-sdk/{p-f05f021e.entry.js → p-da526fc0.entry.js} +2 -2
  87. package/dist/verdocs-web-sdk/{p-f6598c9b.system.entry.js → p-def666e2.system.entry.js} +2 -2
  88. package/dist/verdocs-web-sdk/{p-2d9b370b.system.entry.js → p-e962f3e2.system.entry.js} +3 -3
  89. package/dist/verdocs-web-sdk/{p-e755e978.system.entry.js → p-ffcb5dbb.system.entry.js} +2 -2
  90. package/dist/verdocs-web-sdk/{p-CD5uiThi.system.js → p-lZ900hhb.system.js} +1 -1
  91. package/dist/verdocs-web-sdk/p-lZ900hhb.system.js.map +1 -0
  92. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  93. package/package.json +2 -2
  94. package/dist/cjs/utils-DCB8q98B.js.map +0 -1
  95. package/dist/esm/utils-DmfOx9Ey.js.map +0 -1
  96. package/dist/esm-es5/utils-DmfOx9Ey.js.map +0 -1
  97. package/dist/verdocs-web-sdk/p-CD5uiThi.system.js.map +0 -1
  98. package/dist/verdocs-web-sdk/p-fL0BKEnm.js.map +0 -1
  99. /package/dist/verdocs-web-sdk/{p-92147c8e.entry.js.map → p-1138cbc8.entry.js.map} +0 -0
  100. /package/dist/verdocs-web-sdk/{p-23d2bebc.system.entry.js.map → p-1ac2de04.system.entry.js.map} +0 -0
  101. /package/dist/verdocs-web-sdk/{p-dd51c6cf.entry.js.map → p-21da2b89.entry.js.map} +0 -0
  102. /package/dist/verdocs-web-sdk/{p-3a66ab11.system.entry.js.map → p-42b32d21.system.entry.js.map} +0 -0
  103. /package/dist/verdocs-web-sdk/{p-baaa811b.entry.js.map → p-49683659.entry.js.map} +0 -0
  104. /package/dist/verdocs-web-sdk/{p-ceabec49.entry.js.map → p-6261f76f.entry.js.map} +0 -0
  105. /package/dist/verdocs-web-sdk/{p-9524927b.entry.js.map → p-664be870.entry.js.map} +0 -0
  106. /package/dist/verdocs-web-sdk/{p-d5f1bffb.entry.js.map → p-75a43183.entry.js.map} +0 -0
  107. /package/dist/verdocs-web-sdk/{p-fc5c2c45.system.entry.js.map → p-7a2842d3.system.entry.js.map} +0 -0
  108. /package/dist/verdocs-web-sdk/{p-5f7f20bb.system.entry.js.map → p-7cb0a86a.system.entry.js.map} +0 -0
  109. /package/dist/verdocs-web-sdk/{p-35d8d17c.system.entry.js.map → p-8bf7be29.system.entry.js.map} +0 -0
  110. /package/dist/verdocs-web-sdk/{p-b4bfad4d.entry.js.map → p-d94cd03f.entry.js.map} +0 -0
  111. /package/dist/verdocs-web-sdk/{p-f05f021e.entry.js.map → p-da526fc0.entry.js.map} +0 -0
  112. /package/dist/verdocs-web-sdk/{p-f6598c9b.system.entry.js.map → p-def666e2.system.entry.js.map} +0 -0
  113. /package/dist/verdocs-web-sdk/{p-2d9b370b.system.entry.js.map → p-e962f3e2.system.entry.js.map} +0 -0
  114. /package/dist/verdocs-web-sdk/{p-e755e978.system.entry.js.map → p-ffcb5dbb.system.entry.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{r as t,c as e,h as i,F as s,H as r,g as n}from"./p-6vpKbd31.js";import{D as o}from"./p-C_Xku1v2.js";import{verifySigner as a,VerdocsEndpoint as u,getEnvelope as h,getDocumentDownloadLink as l,cancelEnvelope as d,userCanCancelEnvelope as c,integerSequence as f}from"@verdocs/js-sdk";import{V as p}from"./p-CyvDgtoV.js";import{s as b}from"./p-fL0BKEnm.js";import{S as g}from"./p-C1sRVZWv.js";import{S as v}from"./p-DmsV595e.js";import"./p-BFTU3MAI.js";import"./p-dzBXqXlK.js";import"./p-Dl7Xw8F0.js";const x='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-delegate-dialog{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;}verdocs-delegate-dialog div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-delegate-dialog .input{gap:10px;margin:5px 0;display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start;-ms-flex-direction:row;flex-direction:row}verdocs-delegate-dialog .input label{margin:8px 0 0 0;-ms-flex:0 0 100px;flex:0 0 100px;font-size:13px;font-weight:500;line-height:10px;white-space:nowrap}verdocs-delegate-dialog .input input{-ms-flex:1;flex:1;padding:5px 8px;border-radius:3px;-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #cccccc}verdocs-delegate-dialog .input textarea{-ms-flex:1;flex:1;padding:5px 8px;border-radius:3px;-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #cccccc;font-family:"Inter", "Barlow", sans-serif}verdocs-delegate-dialog .input.names input{width:80px}verdocs-delegate-dialog .field{gap:10px;margin:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;max-width:100%}verdocs-delegate-dialog .field .required{color:red;position:relative;top:-0.5em;font-size:80%}verdocs-delegate-dialog .field label{-ms-flex:0 0 120px;flex:0 0 120px;font-weight:500;line-height:10px;text-align:right;white-space:nowrap}verdocs-delegate-dialog .field verdocs-date-input{width:40%;-ms-flex-positive:1;flex-grow:1}verdocs-delegate-dialog .field verdocs-date-input input{width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-delegate-dialog .field input{width:40%;-ms-flex-positive:1;flex-grow:1;padding:5px 8px;border-radius:3px;border:1px solid #cccccc}verdocs-delegate-dialog .buttons{gap:20px;display:-ms-flexbox;display:flex;margin-top:14px;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-delegate-dialog .buttons button{-ms-flex:1;flex:1;border:0;height:38px;display:-ms-flexbox;display:flex;color:#ffffff;font-size:14px;cursor:pointer;-ms-flex-align:center;align-items:center;border-radius:6px;-ms-flex-pack:center;justify-content:center}verdocs-delegate-dialog .buttons button.cancel{background-color:#654dcb}verdocs-delegate-dialog .buttons button.proceed{background-color:#55bc81}verdocs-delegate-dialog .buttons button:disabled{background-color:#6c727f}';const m=class{constructor(i){t(this,i);this.exit=e(this,"exit");this.next=e(this,"next");this.endpoint=o;this.envelope=null;this.first_name="";this.last_name="";this.email="";this.phone="";this.message=""}handleCancel(){this.exit.emit()}handleDismiss(t){if(t.target.class==="background-overlay"){t.preventDefault();this.handleCancel()}}handleDelegate(){this.next.emit({first_name:this.first_name,last_name:this.last_name,email:this.email,phone:this.phone,message:this.message})}render(){return i("verdocs-dialog",{key:"c8b2b8b55b6f0aa0ce22b232ada78eb65d839e5d"},i("div",{key:"a232d72b90086b7dd21246567b4ab7db80ba9855",slot:"heading",class:"heading"},i("div",{key:"bade50c544129ed54a43d76c475f8dc378d46ffd",class:"icon"},i("svg",{key:"72299a219d60e292ce32f63d25b647d448f24add",width:"22",height:"19",viewBox:"0 0 22 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("g",{key:"f6b2269e403530b00d16c545e3681236ca335650","clip-path":"url(#clip0_34208_4881)"},i("path",{key:"4184d176c8fbe132a217b869ca5e742d38b5f3cd",d:"M3.125 0.75C1.88398 0.75 0.875 1.75898 0.875 3V16.5C0.875 17.741 1.88398 18.75 3.125 18.75H12.125C13.366 18.75 14.375 17.741 14.375 16.5V15.8215C14.2801 15.8602 14.1852 15.8918 14.0867 15.9164L11.9738 16.4437C11.8684 16.4684 11.7629 16.4859 11.6574 16.493C11.6258 16.4965 11.5941 16.5 11.5625 16.5H9.3125C9.09805 16.5 8.90469 16.3805 8.80977 16.1906L8.50039 15.5684C8.44062 15.4488 8.32109 15.375 8.19102 15.375C8.06094 15.375 7.93789 15.4488 7.88164 15.5684L7.57227 16.1906C7.47031 16.398 7.24883 16.5211 7.02031 16.5C6.7918 16.4789 6.59492 16.3207 6.53164 16.1027L5.9375 14.1445L5.59297 15.2977C5.37852 16.0113 4.72109 16.5 3.97578 16.5H3.6875C3.37812 16.5 3.125 16.2469 3.125 15.9375C3.125 15.6281 3.37812 15.375 3.6875 15.375H3.97578C4.22539 15.375 4.44336 15.2133 4.51367 14.9742L5.0375 13.234C5.15703 12.8367 5.52266 12.5625 5.9375 12.5625C6.35234 12.5625 6.71797 12.8367 6.8375 13.234L7.24531 14.591C7.50547 14.373 7.83594 14.25 8.1875 14.25C8.74648 14.25 9.25625 14.5664 9.50586 15.0656L9.66055 15.375H9.97344C9.86445 15.0656 9.84336 14.7281 9.92422 14.3977L10.4516 12.2848C10.55 11.8875 10.7539 11.5289 11.0422 11.2406L14.375 7.90781V6.375H9.875C9.25273 6.375 8.75 5.87227 8.75 5.25V0.75H3.125ZM9.875 0.75V5.25H14.375L9.875 0.75ZM20.2039 5.66133C19.6555 5.11289 18.766 5.11289 18.2141 5.66133L17.1805 6.69492L19.6766 9.19102L20.7102 8.15742C21.2586 7.60898 21.2586 6.71953 20.7102 6.16758L20.2039 5.66133ZM11.8402 12.0352C11.6961 12.1793 11.5941 12.3586 11.5449 12.559L11.0176 14.6719C10.9684 14.8652 11.0246 15.0656 11.1652 15.2063C11.3059 15.3469 11.5062 15.4031 11.6996 15.3539L13.8125 14.8266C14.0094 14.7773 14.1922 14.6754 14.3363 14.5312L18.8785 9.98555L16.3824 7.48945L11.8402 12.0352Z",fill:"white"})),i("defs",{key:"4aa388d7b0c799d426c7da94de93ab1be61ccbf0"},i("clipPath",{key:"0260929f251a0c3ad8bfc1f9e1bc9687cb3b60f6",id:"clip0_34208_4881"},i("path",{key:"64c42049336d37be15cb53adc91fe232955768d4",d:"M0.875 0.75H21.125V18.75H0.875V0.75Z",fill:"white"}))))),i("div",{key:"f9111aedb3a8e09a5898e560603592cdd972539b",class:"title"},'Delegate "',this.envelope.name,'"')),i("div",{key:"cee68483e20d610fa6f27f91bc31782717b89326",slot:"content",class:"content"},i("div",{key:"7316f1efd0cec724711236179efb949980e2fce1",class:"input names"},i("label",{key:"f26c2b853c322858a6376ee124f008adc807cc01",htmlFor:"verdocs-delegate-email"},"New Recipient:"),i("input",{key:"0c8e5895ff3bedb18112a29952402b4b0b6594c3",type:"text",id:"verdocs-delegate-first",name:"verdocs-delegate-first",autocomplete:"blocked",placeholder:"First name...",value:this.first_name,onInput:t=>this.first_name=t.target.value}),i("input",{key:"1c103e348495c708313f0d5d8718f0b16bfe51a8",type:"text",id:"verdocs-delegate-last",name:"verdocs-delegate-last",autocomplete:"blocked",placeholder:"Last name...",value:this.last_name,onInput:t=>this.last_name=t.target.value})),i("div",{key:"2d1371968cc1e39566f5442b8f1d1d7cad99bd16",class:"input"},i("label",{key:"4288dba409f55402f2dde44697cf4e5282b812b8",htmlFor:"verdocs-delegate-email"},"Email Address:"),i("input",{key:"db7e71075d6024a8207cd0fbcb9bd1461a526378",type:"text",id:"verdocs-delegate-email",name:"verdocs-delegate-email",autocomplete:"blocked",placeholder:"New recipient email address...",value:this.email,onInput:t=>this.email=t.target.value})),i("div",{key:"ec28591dc85cc862779023cb2987a71c5c13c66e",class:"input"},i("label",{key:"7b17786a3511eaeaf4c45997a632f2533071d6f9",htmlFor:"verdocs-delegate-phone"},"Phone:"),i("input",{key:"0a3ba95551a66756c77f4ccd9c5269aaa20f5d6f",type:"text",id:"verdocs-delegate-phone",name:"verdocs-delegate-phone",autocomplete:"blocked",placeholder:"Optional phone number...",value:this.phone,onInput:t=>this.phone=t.target.value})),i("div",{key:"2e94fd83e0d58ba0ad37f97be2e09971ad8a80c4",class:"input"},i("label",{key:"ec0c5fb1d5c3e4985ee57bbb7d1722aa55b7a2b3",htmlFor:"verdocs-delegate-email"},"Message:"),i("textarea",{key:"9962c1d2dc7f61fea639204766bd0eb0b030c90b",id:"verdocs-delegate-message",name:"verdocs-delegate-message",rows:3,autocomplete:"blocked",placeholder:"Optional message to include in the invitation...",onInput:t=>this.message=t.target.value},this.message))),i("div",{key:"67062f5d1ecca5fd8206149067351a93d717282f",class:"footer",slot:"footer"},i("div",{key:"c05f381f9be5a54ad71e98233999aa69fbf57d61",class:"buttons"},i("button",{key:"cc64ad9c6d68f4136227aa8e18a65aadb4f788a8",class:"cancel",onClick:()=>this.handleCancel()},"Cancel"),i("button",{key:"41750cc0bd2e3234053ca015c59febaee914d5c3",class:"proceed",onClick:()=>this.handleDelegate(),disabled:!this.first_name||!this.last_name||!this.email},"Proceed"))))}};m.style=x;const k="@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-disclosure-dialog{}verdocs-disclosure-dialog .footer .accept{margin:0 0 28px 28px}verdocs-disclosure-dialog a{color:#4c56cb}verdocs-disclosure-dialog verdocs-checkbox{font-size:14px;line-height:20px}verdocs-disclosure-dialog verdocs-checkbox label>input[type=checkbox]+*::before{width:16px;height:16px;line-height:16px;margin-left:-28px;vertical-align:middle}verdocs-disclosure-dialog .buttons{gap:20px;display:-ms-flexbox;display:flex;margin-top:14px;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-disclosure-dialog .buttons button{-ms-flex:1;flex:1;border:0;height:38px;display:-ms-flexbox;display:flex;color:#ffffff;font-size:14px;cursor:pointer;-ms-flex-align:center;align-items:center;border-radius:6px;-ms-flex-pack:center;justify-content:center}verdocs-disclosure-dialog .buttons button.decline{background-color:#654dcb}verdocs-disclosure-dialog .buttons button.delegate{background-color:#55bc81}verdocs-disclosure-dialog .buttons button.proceed{background-color:#55bc81}verdocs-disclosure-dialog .buttons button:disabled{background-color:#6c727f}";const w=class{constructor(i){t(this,i);this.decline=e(this,"decline");this.delegate=e(this,"delegate");this.accept=e(this,"accept");this.disclosures=null;this.delegator=false;this.accepted=false}render(){return i("verdocs-dialog",{key:"c4cc7a16c4293cf80429231086ae63cc69884f17"},i("div",{key:"edf08816777ef7e9a97cfbcbb088b637213508a3",slot:"heading",class:"heading"},i("div",{key:"27ecefd189609ec0ea6e05c7560792620b1af357",class:"icon"},i("svg",{key:"040d5c7490bf25e6aa46c0ce695bb4cf83efc52a",width:"22",height:"19",viewBox:"0 0 22 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("g",{key:"7869413e61c79e166c80e442e03f8214af64760f","clip-path":"url(#clip0_34208_4881)"},i("path",{key:"063960d72cbaccbc974687e6409c984a0d817f77",d:"M3.125 0.75C1.88398 0.75 0.875 1.75898 0.875 3V16.5C0.875 17.741 1.88398 18.75 3.125 18.75H12.125C13.366 18.75 14.375 17.741 14.375 16.5V15.8215C14.2801 15.8602 14.1852 15.8918 14.0867 15.9164L11.9738 16.4437C11.8684 16.4684 11.7629 16.4859 11.6574 16.493C11.6258 16.4965 11.5941 16.5 11.5625 16.5H9.3125C9.09805 16.5 8.90469 16.3805 8.80977 16.1906L8.50039 15.5684C8.44062 15.4488 8.32109 15.375 8.19102 15.375C8.06094 15.375 7.93789 15.4488 7.88164 15.5684L7.57227 16.1906C7.47031 16.398 7.24883 16.5211 7.02031 16.5C6.7918 16.4789 6.59492 16.3207 6.53164 16.1027L5.9375 14.1445L5.59297 15.2977C5.37852 16.0113 4.72109 16.5 3.97578 16.5H3.6875C3.37812 16.5 3.125 16.2469 3.125 15.9375C3.125 15.6281 3.37812 15.375 3.6875 15.375H3.97578C4.22539 15.375 4.44336 15.2133 4.51367 14.9742L5.0375 13.234C5.15703 12.8367 5.52266 12.5625 5.9375 12.5625C6.35234 12.5625 6.71797 12.8367 6.8375 13.234L7.24531 14.591C7.50547 14.373 7.83594 14.25 8.1875 14.25C8.74648 14.25 9.25625 14.5664 9.50586 15.0656L9.66055 15.375H9.97344C9.86445 15.0656 9.84336 14.7281 9.92422 14.3977L10.4516 12.2848C10.55 11.8875 10.7539 11.5289 11.0422 11.2406L14.375 7.90781V6.375H9.875C9.25273 6.375 8.75 5.87227 8.75 5.25V0.75H3.125ZM9.875 0.75V5.25H14.375L9.875 0.75ZM20.2039 5.66133C19.6555 5.11289 18.766 5.11289 18.2141 5.66133L17.1805 6.69492L19.6766 9.19102L20.7102 8.15742C21.2586 7.60898 21.2586 6.71953 20.7102 6.16758L20.2039 5.66133ZM11.8402 12.0352C11.6961 12.1793 11.5941 12.3586 11.5449 12.559L11.0176 14.6719C10.9684 14.8652 11.0246 15.0656 11.1652 15.2063C11.3059 15.3469 11.5062 15.4031 11.6996 15.3539L13.8125 14.8266C14.0094 14.7773 14.1922 14.6754 14.3363 14.5312L18.8785 9.98555L16.3824 7.48945L11.8402 12.0352Z",fill:"white"})),i("defs",{key:"f0e56dc0f1b0cb6b9f9c5b4974173be204736506"},i("clipPath",{key:"a43f3c6956cca9a70b1f9bce60623eab9dc903ed",id:"clip0_34208_4881"},i("path",{key:"ee474432664d47540a6960723643ecf37a076366",d:"M0.875 0.75H21.125V18.75H0.875V0.75Z",fill:"white"}))))),i("div",{key:"4496d3e2c91796e2687912b9c65d1d886081df75",class:"title"},"e-Signature Disclosures")),i("div",{key:"250ea6d11bf3e286ef58f0b5a02a26bb48b952db",slot:"content",class:"content",innerHTML:this.disclosures}),i("div",{key:"1f7d6812c05dda23c952a06cac30e9aaeb830219",class:"footer",slot:"footer"},i("div",{key:"ee1e7bbab76c4269b214700272bc7acc73d4081b",class:"accept"},i("verdocs-checkbox",{key:"02e0e888aad7eee1a2b270381d28f2dc95ef0da0",label:"I accept the electronic signature disclosures and agree to proceed with digital signing.",checked:this.accepted,onInput:()=>this.accepted=!this.accepted})),this.delegator?i(s,null,i("div",{class:"buttons"},i("button",{class:"proceed",onClick:()=>this.accept.emit(),disabled:!this.accepted},"Proceed")),i("div",{class:"buttons"},i("button",{class:"decline",onClick:()=>this.decline.emit()},"Decline"),i("button",{class:"delegate",onClick:()=>this.delegate.emit()},"Delegate"))):i(s,null,i("div",{class:"buttons"},i("button",{class:"decline",onClick:()=>this.decline.emit()},"Decline"),i("button",{class:"proceed",onClick:()=>this.accept.emit(),disabled:!this.accepted},"Proceed")))))}};w.style=k;function C(t){return typeof t==="string"||t instanceof String}function A(t){var e;return typeof t==="object"&&t!=null&&(t==null||(e=t.constructor)==null?void 0:e.name)==="Object"}function y(t,e){if(Array.isArray(e))return y(t,((t,i)=>e.includes(i)));return Object.entries(t).reduce(((t,i)=>{let[s,r]=i;if(e(r,s))t[s]=r;return t}),{})}const F={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function D(t){switch(t){case F.LEFT:return F.FORCE_LEFT;case F.RIGHT:return F.FORCE_RIGHT;default:return t}}function B(t){return t.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function E(t,e){if(e===t)return true;const i=Array.isArray(e),s=Array.isArray(t);let r;if(i&&s){if(e.length!=t.length)return false;for(r=0;r<e.length;r++)if(!E(e[r],t[r]))return false;return true}if(i!=s)return false;if(e&&t&&typeof e==="object"&&typeof t==="object"){const i=e instanceof Date,s=t instanceof Date;if(i&&s)return e.getTime()==t.getTime();if(i!=s)return false;const n=e instanceof RegExp,o=t instanceof RegExp;if(n&&o)return e.toString()==t.toString();if(n!=o)return false;const a=Object.keys(e);for(r=0;r<a.length;r++)if(!Object.prototype.hasOwnProperty.call(t,a[r]))return false;for(r=0;r<a.length;r++)if(!E(t[a[r]],e[a[r]]))return false;return true}else if(e&&t&&typeof e==="function"&&typeof t==="function"){return e.toString()===t.toString()}return false}class _{constructor(t){Object.assign(this,t);while(this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos)){--this.oldSelection.start}if(this.insertedCount){while(this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end)){if(this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end)++this.oldSelection.end;else++this.cursorPos}}}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){if(!this.removedCount||this.insertedCount)return F.NONE;return(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?F.RIGHT:F.LEFT}}function I(t,e){return new I.InputMask(t,e)}function V(t){if(t==null)throw new Error("mask property should be defined");if(t instanceof RegExp)return I.MaskedRegExp;if(C(t))return I.MaskedPattern;if(t===Date)return I.MaskedDate;if(t===Number)return I.MaskedNumber;if(Array.isArray(t)||t===Array)return I.MaskedDynamic;if(I.Masked&&t.prototype instanceof I.Masked)return t;if(I.Masked&&t instanceof I.Masked)return t.constructor;if(t instanceof Function)return I.MaskedFunction;console.warn("Mask not found for mask",t);return I.Masked}function S(t){if(!t)throw new Error("Options in not defined");if(I.Masked){if(t.prototype instanceof I.Masked)return{mask:t};const{mask:e=undefined,...i}=t instanceof I.Masked?{mask:t}:A(t)&&t.mask instanceof I.Masked?t:{};if(e){const t=e.mask;return{...y(e,((t,e)=>!e.startsWith("_"))),mask:e.constructor,_mask:t,...i}}}if(!A(t))return{mask:t};return{...t}}function M(t){if(I.Masked&&t instanceof I.Masked)return t;const e=S(t);const i=V(e.mask);if(!i)throw new Error("Masked class is not found for provided mask "+e.mask+", appropriate module needs to be imported manually before creating mask.");if(e.mask===i)delete e.mask;if(e._mask){e.mask=e._mask;delete e._mask}return new i(e)}I.createMask=M;class L{get selectionStart(){let t;try{t=this._unsafeSelectionStart}catch{}return t!=null?t:this.value.length}get selectionEnd(){let t;try{t=this._unsafeSelectionEnd}catch{}return t!=null?t:this.value.length}select(t,e){if(t==null||e==null||t===this.selectionStart&&e===this.selectionEnd)return;try{this._unsafeSelect(t,e)}catch{}}get isActive(){return false}}I.MaskElement=L;const z=90;const T=89;class R extends L{constructor(t){super();this.input=t;this._onKeydown=this._onKeydown.bind(this);this._onInput=this._onInput.bind(this);this._onBeforeinput=this._onBeforeinput.bind(this);this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var t,e,i;return(t=(e=(i=this.input).getRootNode)==null?void 0:e.call(i))!=null?t:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(t){this.input.addEventListener("keydown",this._onKeydown);this.input.addEventListener("input",this._onInput);this.input.addEventListener("beforeinput",this._onBeforeinput);this.input.addEventListener("compositionend",this._onCompositionEnd);this.input.addEventListener("drop",t.drop);this.input.addEventListener("click",t.click);this.input.addEventListener("focus",t.focus);this.input.addEventListener("blur",t.commit);this._handlers=t}_onKeydown(t){if(this._handlers.redo&&(t.keyCode===z&&t.shiftKey&&(t.metaKey||t.ctrlKey)||t.keyCode===T&&t.ctrlKey)){t.preventDefault();return this._handlers.redo(t)}if(this._handlers.undo&&t.keyCode===z&&(t.metaKey||t.ctrlKey)){t.preventDefault();return this._handlers.undo(t)}if(!t.isComposing)this._handlers.selectionChange(t)}_onBeforeinput(t){if(t.inputType==="historyUndo"&&this._handlers.undo){t.preventDefault();return this._handlers.undo(t)}if(t.inputType==="historyRedo"&&this._handlers.redo){t.preventDefault();return this._handlers.redo(t)}}_onCompositionEnd(t){this._handlers.input(t)}_onInput(t){if(!t.isComposing)this._handlers.input(t)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown);this.input.removeEventListener("input",this._onInput);this.input.removeEventListener("beforeinput",this._onBeforeinput);this.input.removeEventListener("compositionend",this._onCompositionEnd);this.input.removeEventListener("drop",this._handlers.drop);this.input.removeEventListener("click",this._handlers.click);this.input.removeEventListener("focus",this._handlers.focus);this.input.removeEventListener("blur",this._handlers.commit);this._handlers={}}}I.HTMLMaskElement=R;class O extends R{constructor(t){super(t);this.input=t}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(t,e){this.input.setSelectionRange(t,e)}get value(){return this.input.value}set value(t){this.input.value=t}}I.HTMLMaskElement=R;class P extends R{get _unsafeSelectionStart(){const t=this.rootElement;const e=t.getSelection&&t.getSelection();const i=e&&e.anchorOffset;const s=e&&e.focusOffset;if(s==null||i==null||i<s){return i}return s}get _unsafeSelectionEnd(){const t=this.rootElement;const e=t.getSelection&&t.getSelection();const i=e&&e.anchorOffset;const s=e&&e.focusOffset;if(s==null||i==null||i>s){return i}return s}_unsafeSelect(t,e){if(!this.rootElement.createRange)return;const i=this.rootElement.createRange();i.setStart(this.input.firstChild||this.input,t);i.setEnd(this.input.lastChild||this.input,e);const s=this.rootElement;const r=s.getSelection&&s.getSelection();if(r){r.removeAllRanges();r.addRange(i)}}get value(){return this.input.textContent||""}set value(t){this.input.textContent=t}}I.HTMLContenteditableMaskElement=P;class N{constructor(){this.states=[];this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return this.states.length===0}push(t){if(this.currentIndex<this.states.length-1)this.states.length=this.currentIndex+1;this.states.push(t);if(this.states.length>N.MAX_LENGTH)this.states.shift();this.currentIndex=this.states.length-1}go(t){this.currentIndex=Math.min(Math.max(this.currentIndex+t,0),this.states.length-1);return this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0;this.currentIndex=0}}N.MAX_LENGTH=100;class j{constructor(t,e){this.el=t instanceof L?t:t.isContentEditable&&t.tagName!=="INPUT"&&t.tagName!=="TEXTAREA"?new P(t):new O(t);this.masked=M(e);this._listeners={};this._value="";this._unmaskedValue="";this._rawInputValue="";this.history=new N;this._saveSelection=this._saveSelection.bind(this);this._onInput=this._onInput.bind(this);this._onChange=this._onChange.bind(this);this._onDrop=this._onDrop.bind(this);this._onFocus=this._onFocus.bind(this);this._onClick=this._onClick.bind(this);this._onUndo=this._onUndo.bind(this);this._onRedo=this._onRedo.bind(this);this.alignCursor=this.alignCursor.bind(this);this.alignCursorFriendly=this.alignCursorFriendly.bind(this);this._bindEvents();this.updateValue();this._onChange()}maskEquals(t){var e;return t==null||((e=this.masked)==null?void 0:e.maskEquals(t))}get mask(){return this.masked.mask}set mask(t){if(this.maskEquals(t))return;if(!(t instanceof I.Masked)&&this.masked.constructor===V(t)){this.masked.updateOptions({mask:t});return}const e=t instanceof I.Masked?t:M({mask:t});e.unmaskedValue=this.masked.unmaskedValue;this.masked=e}get value(){return this._value}set value(t){if(this.value===t)return;this.masked.value=t;this.updateControl("auto")}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(t){if(this.unmaskedValue===t)return;this.masked.unmaskedValue=t;this.updateControl("auto")}get rawInputValue(){return this._rawInputValue}set rawInputValue(t){if(this.rawInputValue===t)return;this.masked.rawInputValue=t;this.updateControl();this.alignCursor()}get typedValue(){return this.masked.typedValue}set typedValue(t){if(this.masked.typedValueEquals(t))return;this.masked.typedValue=t;this.updateControl("auto")}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){if(this.el)this.el.unbindEvents()}_fireEvent(t,e){const i=this._listeners[t];if(!i)return;i.forEach((t=>t(e)))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(t){if(!this.el||!this.el.isActive)return;this.el.select(t,t);this._saveSelection()}_saveSelection(){if(this.displayValue!==this.el.value){console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly.")}this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value;this._value=this.masked.value;this._unmaskedValue=this.masked.unmaskedValue;this._rawInputValue=this.masked.rawInputValue}updateControl(t){const e=this.masked.unmaskedValue;const i=this.masked.value;const s=this.masked.rawInputValue;const r=this.displayValue;const n=this.unmaskedValue!==e||this.value!==i||this._rawInputValue!==s;this._unmaskedValue=e;this._value=i;this._rawInputValue=s;if(this.el.value!==r)this.el.value=r;if(t==="auto")this.alignCursor();else if(t!=null)this.cursorPos=t;if(n)this._fireChangeEvents();if(!this._historyChanging&&(n||this.history.isEmpty))this.history.push({unmaskedValue:e,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(t){const{mask:e,...i}=t;const s=!this.maskEquals(e);const r=this.masked.optionsIsChanged(i);if(s)this.mask=e;if(r)this.masked.updateOptions(i);if(s||r)this.updateControl()}updateCursor(t){if(t==null)return;this.cursorPos=t;this._delayUpdateCursor(t)}_delayUpdateCursor(t){this._abortUpdateCursor();this._changingCursorPos=t;this._cursorChanging=setTimeout((()=>{if(!this.el)return;this.cursorPos=this._changingCursorPos;this._abortUpdateCursor()}),10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent);if(this.masked.isComplete)this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){if(this._cursorChanging){clearTimeout(this._cursorChanging);delete this._cursorChanging}}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,F.LEFT))}alignCursorFriendly(){if(this.selectionStart!==this.cursorPos)return;this.alignCursor()}on(t,e){if(!this._listeners[t])this._listeners[t]=[];this._listeners[t].push(e);return this}off(t,e){if(!this._listeners[t])return this;if(!e){delete this._listeners[t];return this}const i=this._listeners[t].indexOf(e);if(i>=0)this._listeners[t].splice(i,1);return this}_onInput(t){this._inputEvent=t;this._abortUpdateCursor();const e=new _({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection});const i=this.masked.rawInputValue;const s=this.masked.splice(e.startChangePos,e.removed.length,e.inserted,e.removeDirection,{input:true,raw:true}).offset;const r=i===this.masked.rawInputValue?e.removeDirection:F.NONE;let n=this.masked.nearestInputPos(e.startChangePos+s,r);if(r!==F.NONE)n=this.masked.nearestInputPos(n,F.NONE);this.updateControl(n);delete this._inputEvent}_onChange(){if(this.displayValue!==this.el.value)this.updateValue();this.masked.doCommit();this.updateControl();this._saveSelection()}_onDrop(t){t.preventDefault();t.stopPropagation()}_onFocus(t){this.alignCursorFriendly()}_onClick(t){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(t){if(!t)return;this._historyChanging=true;this.unmaskedValue=t.unmaskedValue;this.el.select(t.selection.start,t.selection.end);this._saveSelection();this._historyChanging=false}destroy(){this._unbindEvents();this._listeners.length=0;delete this.el}}I.InputMask=j;class H{static normalize(t){return Array.isArray(t)?t:[t,new H]}constructor(t){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:false},t)}aggregate(t){this.inserted+=t.inserted;this.rawInserted+=t.rawInserted;this.tailShift+=t.tailShift;this.skip=this.skip||t.skip;return this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return Boolean(this.rawInserted)||this.skip}equals(t){return this.inserted===t.inserted&&this.tailShift===t.tailShift&&this.rawInserted===t.rawInserted&&this.skip===t.skip}}I.ChangeDetails=H;class Z{constructor(t,e,i){if(t===void 0){t=""}if(e===void 0){e=0}this.value=t;this.from=e;this.stop=i}toString(){return this.value}extend(t){this.value+=String(t)}appendTo(t){return t.append(this.toString(),{tail:true}).aggregate(t._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(t){Object.assign(this,t)}unshift(t){if(!this.value.length||t!=null&&this.from>=t)return"";const e=this.value[0];this.value=this.value.slice(1);return e}shift(){if(!this.value.length)return"";const t=this.value[this.value.length-1];this.value=this.value.slice(0,-1);return t}}class q{constructor(t){this._value="";this._update({...q.DEFAULTS,...t});this._initialized=true}updateOptions(t){if(!this.optionsIsChanged(t))return;this.withValueRefresh(this._update.bind(this,t))}_update(t){Object.assign(this,t)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value}reset(){this._value=""}get value(){return this._value}set value(t){this.resolve(t,{input:true})}resolve(t,e){if(e===void 0){e={input:true}}this.reset();this.append(t,e,"");this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(t){this.resolve(t,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(t){if(this.format){this.value=this.format(t,this)}else{this.unmaskedValue=String(t)}}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:true})}set rawInputValue(t){this.resolve(t,{raw:true})}get displayValue(){return this.value}get isComplete(){return true}get isFilled(){return this.isComplete}nearestInputPos(t,e){return t}totalInputPositions(t,e){if(t===void 0){t=0}if(e===void 0){e=this.displayValue.length}return Math.min(this.displayValue.length,e-t)}extractInput(t,e,i){if(t===void 0){t=0}if(e===void 0){e=this.displayValue.length}return this.displayValue.slice(t,e)}extractTail(t,e){if(t===void 0){t=0}if(e===void 0){e=this.displayValue.length}return new Z(this.extractInput(t,e),t)}appendTail(t){if(C(t))t=new Z(String(t));return t.appendTo(this)}_appendCharRaw(t,e){if(!t)return new H;this._value+=t;return new H({inserted:t,rawInserted:t})}_appendChar(t,e,i){if(e===void 0){e={}}const s=this.state;let r;[t,r]=this.doPrepareChar(t,e);if(t){r=r.aggregate(this._appendCharRaw(t,e));if(!r.rawInserted&&this.autofix==="pad"){const i=this.state;this.state=s;let n=this.pad(e);const o=this._appendCharRaw(t,e);n=n.aggregate(o);if(o.rawInserted||n.equals(r)){r=n}else{this.state=i}}}if(r.inserted){let t;let n=this.doValidate(e)!==false;if(n&&i!=null){const e=this.state;if(this.overwrite===true){t=i.state;for(let t=0;t<r.rawInserted.length;++t){i.unshift(this.displayValue.length-r.tailShift)}}let s=this.appendTail(i);n=s.rawInserted.length===i.toString().length;if(!(n&&s.inserted)&&this.overwrite==="shift"){this.state=e;t=i.state;for(let t=0;t<r.rawInserted.length;++t){i.shift()}s=this.appendTail(i);n=s.rawInserted.length===i.toString().length}if(n&&s.inserted)this.state=e}if(!n){r=new H;this.state=s;if(i&&t)i.state=t}}return r}_appendPlaceholder(){return new H}_appendEager(){return new H}append(t,e,i){if(!C(t))throw new Error("value should be string");const s=C(i)?new Z(String(i)):i;if(e!=null&&e.tail)e._beforeTailState=this.state;let r;[t,r]=this.doPrepare(t,e);for(let i=0;i<t.length;++i){const n=this._appendChar(t[i],e,s);if(!n.rawInserted&&!this.doSkipInvalid(t[i],e,s))break;r.aggregate(n)}if((this.eager===true||this.eager==="append")&&e!=null&&e.input&&t){r.aggregate(this._appendEager())}if(s!=null){r.tailShift+=this.appendTail(s).tailShift}return r}remove(t,e){if(t===void 0){t=0}if(e===void 0){e=this.displayValue.length}this._value=this.displayValue.slice(0,t)+this.displayValue.slice(e);return new H}withValueRefresh(t){if(this._refreshing||!this._initialized)return t();this._refreshing=true;const e=this.rawInputValue;const i=this.value;const s=t();this.rawInputValue=e;if(this.value&&this.value!==i&&i.indexOf(this.value)===0){this.append(i.slice(this.displayValue.length),{},"");this.doCommit()}delete this._refreshing;return s}runIsolated(t){if(this._isolated||!this._initialized)return t(this);this._isolated=true;const e=this.state;const i=t(this);this.state=e;delete this._isolated;return i}doSkipInvalid(t,e,i){return Boolean(this.skipInvalid)}doPrepare(t,e){if(e===void 0){e={}}return H.normalize(this.prepare?this.prepare(t,this,e):t)}doPrepareChar(t,e){if(e===void 0){e={}}return H.normalize(this.prepareChar?this.prepareChar(t,this,e):t)}doValidate(t){return(!this.validate||this.validate(this.value,this,t))&&(!this.parent||this.parent.doValidate(t))}doCommit(){if(this.commit)this.commit(this.value,this)}splice(t,e,i,s,r){if(i===void 0){i=""}if(s===void 0){s=F.NONE}if(r===void 0){r={input:true}}const n=t+e;const o=this.extractTail(n);const a=this.eager===true||this.eager==="remove";let u;if(a){s=D(s);u=this.extractInput(0,n,{raw:true})}let h=t;const l=new H;if(s!==F.NONE){h=this.nearestInputPos(t,e>1&&t!==0&&!a?F.NONE:s);l.tailShift=h-t}l.aggregate(this.remove(h));if(a&&s!==F.NONE&&u===this.rawInputValue){if(s===F.FORCE_LEFT){let t;while(u===this.rawInputValue&&(t=this.displayValue.length)){l.aggregate(new H({tailShift:-1})).aggregate(this.remove(t-1))}}else if(s===F.FORCE_RIGHT){o.unshift()}}return l.aggregate(this.append(i,r,o))}maskEquals(t){return this.mask===t}optionsIsChanged(t){return!E(this,t)}typedValueEquals(t){const e=this.typedValue;return t===e||q.EMPTY_VALUES.includes(t)&&q.EMPTY_VALUES.includes(e)||(this.format?this.format(t,this)===this.format(this.typedValue,this):false)}pad(t){return new H}}q.DEFAULTS={skipInvalid:true};q.EMPTY_VALUES=[undefined,null,""];I.Masked=q;class W{constructor(t,e){if(t===void 0){t=[]}if(e===void 0){e=0}this.chunks=t;this.from=e}toString(){return this.chunks.map(String).join("")}extend(t){if(!String(t))return;t=C(t)?new Z(String(t)):t;const e=this.chunks[this.chunks.length-1];const i=e&&(e.stop===t.stop||t.stop==null)&&t.from===e.from+e.toString().length;if(t instanceof Z){if(i){e.extend(t.toString())}else{this.chunks.push(t)}}else if(t instanceof W){if(t.stop==null){let e;while(t.chunks.length&&t.chunks[0].stop==null){e=t.chunks.shift();e.from+=t.from;this.extend(e)}}if(t.toString()){t.stop=t.blockIndex;this.chunks.push(t)}}}appendTo(t){if(!(t instanceof I.MaskedPattern)){const e=new Z(this.toString());return e.appendTo(t)}const e=new H;for(let i=0;i<this.chunks.length;++i){const s=this.chunks[i];const r=t._mapPosToBlock(t.displayValue.length);const n=s.stop;let o;if(n!=null&&(!r||r.index<=n)){if(s instanceof W||t._stops.indexOf(n)>=0){e.aggregate(t._appendPlaceholder(n))}o=s instanceof W&&t._blocks[n]}if(o){const i=o.appendTail(s);e.aggregate(i);const r=s.toString().slice(i.rawInserted.length);if(r)e.aggregate(t.append(r,{tail:true}))}else{e.aggregate(t.append(s.toString(),{tail:true}))}}return e}get state(){return{chunks:this.chunks.map((t=>t.state)),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(t){const{chunks:e,...i}=t;Object.assign(this,i);this.chunks=e.map((t=>{const e="chunks"in t?new W:new Z;e.state=t;return e}))}unshift(t){if(!this.chunks.length||t!=null&&this.from>=t)return"";const e=t!=null?t-this.from:t;let i=0;while(i<this.chunks.length){const t=this.chunks[i];const s=t.unshift(e);if(t.toString()){if(!s)break;++i}else{this.chunks.splice(i,1)}if(s)return s}return""}shift(){if(!this.chunks.length)return"";let t=this.chunks.length-1;while(0<=t){const e=this.chunks[t];const i=e.shift();if(e.toString()){if(!i)break;--t}else{this.chunks.splice(t,1)}if(i)return i}return""}}class U{constructor(t,e){this.masked=t;this._log=[];const{offset:i,index:s}=t._mapPosToBlock(e)||(e<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=i;this.index=s;this.ok=false}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(t){Object.assign(this,t)}pushState(){this._log.push(this.state)}popState(){const t=this._log.pop();if(t)this.state=t;return t}bindBlock(){if(this.block)return;if(this.index<0){this.index=0;this.offset=0}if(this.index>=this.masked._blocks.length){this.index=this.masked._blocks.length-1;this.offset=this.block.displayValue.length}}_pushLeft(t){this.pushState();for(this.bindBlock();0<=this.index;--this.index,this.offset=((e=this.block)==null?void 0:e.displayValue.length)||0){var e;if(t())return this.ok=true}return this.ok=false}_pushRight(t){this.pushState();for(this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0){if(t())return this.ok=true}return this.ok=false}pushLeftBeforeFilled(){return this._pushLeft((()=>{if(this.block.isFixed||!this.block.value)return;this.offset=this.block.nearestInputPos(this.offset,F.FORCE_LEFT);if(this.offset!==0)return true}))}pushLeftBeforeInput(){return this._pushLeft((()=>{if(this.block.isFixed)return;this.offset=this.block.nearestInputPos(this.offset,F.LEFT);return true}))}pushLeftBeforeRequired(){return this._pushLeft((()=>{if(this.block.isFixed||this.block.isOptional&&!this.block.value)return;this.offset=this.block.nearestInputPos(this.offset,F.LEFT);return true}))}pushRightBeforeFilled(){return this._pushRight((()=>{if(this.block.isFixed||!this.block.value)return;this.offset=this.block.nearestInputPos(this.offset,F.FORCE_RIGHT);if(this.offset!==this.block.value.length)return true}))}pushRightBeforeInput(){return this._pushRight((()=>{if(this.block.isFixed)return;this.offset=this.block.nearestInputPos(this.offset,F.NONE);return true}))}pushRightBeforeRequired(){return this._pushRight((()=>{if(this.block.isFixed||this.block.isOptional&&!this.block.value)return;this.offset=this.block.nearestInputPos(this.offset,F.NONE);return true}))}}class K{constructor(t){Object.assign(this,t);this._value="";this.isFixed=true}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=false;this._value=""}remove(t,e){if(t===void 0){t=0}if(e===void 0){e=this._value.length}this._value=this._value.slice(0,t)+this._value.slice(e);if(!this._value)this._isRawInput=false;return new H}nearestInputPos(t,e){if(e===void 0){e=F.NONE}const i=0;const s=this._value.length;switch(e){case F.LEFT:case F.FORCE_LEFT:return i;case F.NONE:case F.RIGHT:case F.FORCE_RIGHT:default:return s}}totalInputPositions(t,e){if(t===void 0){t=0}if(e===void 0){e=this._value.length}return this._isRawInput?e-t:0}extractInput(t,e,i){if(t===void 0){t=0}if(e===void 0){e=this._value.length}if(i===void 0){i={}}return i.raw&&this._isRawInput&&this._value.slice(t,e)||""}get isComplete(){return true}get isFilled(){return Boolean(this._value)}_appendChar(t,e){if(e===void 0){e={}}if(this.isFilled)return new H;const i=this.eager===true||this.eager==="append";const s=this.char===t;const r=s&&(this.isUnmasking||e.input||e.raw)&&(!e.raw||!i)&&!e.tail;const n=new H({inserted:this.char,rawInserted:r?this.char:""});this._value=this.char;this._isRawInput=r&&(e.raw||e.input);return n}_appendEager(){return this._appendChar(this.char,{tail:true})}_appendPlaceholder(){const t=new H;if(this.isFilled)return t;this._value=t.inserted=this.char;return t}extractTail(){return new Z("")}appendTail(t){if(C(t))t=new Z(String(t));return t.appendTo(this)}append(t,e,i){const s=this._appendChar(t[0],e);if(i!=null){s.tailShift+=this.appendTail(i).tailShift}return s}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value;this._isRawInput=Boolean(t._rawInputValue)}pad(t){return this._appendPlaceholder()}}class Y{constructor(t){const{parent:e,isOptional:i,placeholderChar:s,displayChar:r,lazy:n,eager:o,...a}=t;this.masked=M(a);Object.assign(this,{parent:e,isOptional:i,placeholderChar:s,displayChar:r,lazy:n,eager:o})}reset(){this.isFilled=false;this.masked.reset()}remove(t,e){if(t===void 0){t=0}if(e===void 0){e=this.value.length}if(t===0&&e>=1){this.isFilled=false;return this.masked.remove(t,e)}return new H}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return Boolean(this.masked.value)||this.isOptional}_appendChar(t,e){if(e===void 0){e={}}if(this.isFilled)return new H;const i=this.masked.state;let s=this.masked._appendChar(t,this.currentMaskFlags(e));if(s.inserted&&this.doValidate(e)===false){s=new H;this.masked.state=i}if(!s.inserted&&!this.isOptional&&!this.lazy&&!e.input){s.inserted=this.placeholderChar}s.skip=!s.inserted&&!this.isOptional;this.isFilled=Boolean(s.inserted);return s}append(t,e,i){return this.masked.append(t,this.currentMaskFlags(e),i)}_appendPlaceholder(){if(this.isFilled||this.isOptional)return new H;this.isFilled=true;return new H({inserted:this.placeholderChar})}_appendEager(){return new H}extractTail(t,e){return this.masked.extractTail(t,e)}appendTail(t){return this.masked.appendTail(t)}extractInput(t,e,i){if(t===void 0){t=0}if(e===void 0){e=this.value.length}return this.masked.extractInput(t,e,i)}nearestInputPos(t,e){if(e===void 0){e=F.NONE}const i=0;const s=this.value.length;const r=Math.min(Math.max(t,i),s);switch(e){case F.LEFT:case F.FORCE_LEFT:return this.isComplete?r:i;case F.RIGHT:case F.FORCE_RIGHT:return this.isComplete?r:s;case F.NONE:default:return r}}totalInputPositions(t,e){if(t===void 0){t=0}if(e===void 0){e=this.value.length}return this.value.slice(t,e).length}doValidate(t){return this.masked.doValidate(this.currentMaskFlags(t))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(t)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(t){this.masked.state=t.masked;this.isFilled=t.isFilled}currentMaskFlags(t){var e;return{...t,_beforeTailState:(t==null||(e=t._beforeTailState)==null?void 0:e.masked)||(t==null?void 0:t._beforeTailState)}}pad(t){return new H}}Y.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class G extends q{updateOptions(t){super.updateOptions(t)}_update(t){const e=t.mask;if(e)t.validate=t=>t.search(e)>=0;super._update(t)}}I.MaskedRegExp=G;class $ extends q{constructor(t){super({...$.DEFAULTS,...t,definitions:Object.assign({},Y.DEFAULT_DEFINITIONS,t==null?void 0:t.definitions)})}updateOptions(t){super.updateOptions(t)}_update(t){t.definitions=Object.assign({},this.definitions,t.definitions);super._update(t);this._rebuildMask()}_rebuildMask(){const t=this.definitions;this._blocks=[];this.exposeBlock=undefined;this._stops=[];this._maskedBlocks={};const e=this.mask;if(!e||!t)return;let i=false;let s=false;for(let r=0;r<e.length;++r){if(this.blocks){const t=e.slice(r);const i=Object.keys(this.blocks).filter((e=>t.indexOf(e)===0));i.sort(((t,e)=>e.length-t.length));const s=i[0];if(s){const{expose:t,repeat:e,...i}=S(this.blocks[s]);const n={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...i,repeat:e,parent:this};const o=e!=null?new I.RepeatBlock(n):M(n);if(o){this._blocks.push(o);if(t)this.exposeBlock=o;if(!this._maskedBlocks[s])this._maskedBlocks[s]=[];this._maskedBlocks[s].push(this._blocks.length-1)}r+=s.length-1;continue}}let n=e[r];let o=n in t;if(n===$.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(n==="{"||n==="}"){i=!i;continue}if(n==="["||n==="]"){s=!s;continue}if(n===$.ESCAPE_CHAR){++r;n=e[r];if(!n)break;o=false}const a=o?new Y({isOptional:s,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...S(t[n]),parent:this}):new K({char:n,eager:this.eager,isUnmasking:i});this._blocks.push(a)}}get state(){return{...super.state,_blocks:this._blocks.map((t=>t.state))}}set state(t){if(!t){this.reset();return}const{_blocks:e,...i}=t;this._blocks.forEach(((t,i)=>t.state=e[i]));super.state=i}reset(){super.reset();this._blocks.forEach((t=>t.reset()))}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every((t=>t.isComplete))}get isFilled(){return this._blocks.every((t=>t.isFilled))}get isFixed(){return this._blocks.every((t=>t.isFixed))}get isOptional(){return this._blocks.every((t=>t.isOptional))}doCommit(){this._blocks.forEach((t=>t.doCommit()));super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce(((t,e)=>t+=e.unmaskedValue),"")}set unmaskedValue(t){if(this.exposeBlock){const e=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=t;this.appendTail(e);this.doCommit()}else super.unmaskedValue=t}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce(((t,e)=>t+=e.value),"")}set value(t){if(this.exposeBlock){const e=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=t;this.appendTail(e);this.doCommit()}else super.value=t}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(t){if(this.exposeBlock){const e=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=t;this.appendTail(e);this.doCommit()}else super.typedValue=t}get displayValue(){return this._blocks.reduce(((t,e)=>t+=e.displayValue),"")}appendTail(t){return super.appendTail(t).aggregate(this._appendPlaceholder())}_appendEager(){var t;const e=new H;let i=(t=this._mapPosToBlock(this.displayValue.length))==null?void 0:t.index;if(i==null)return e;if(this._blocks[i].isFilled)++i;for(let t=i;t<this._blocks.length;++t){const i=this._blocks[t]._appendEager();if(!i.inserted)break;e.aggregate(i)}return e}_appendCharRaw(t,e){if(e===void 0){e={}}const i=this._mapPosToBlock(this.displayValue.length);const s=new H;if(!i)return s;for(let n=i.index,o;o=this._blocks[n];++n){var r;const i=o._appendChar(t,{...e,_beforeTailState:(r=e._beforeTailState)==null||(r=r._blocks)==null?void 0:r[n]});s.aggregate(i);if(i.consumed)break}return s}extractTail(t,e){if(t===void 0){t=0}if(e===void 0){e=this.displayValue.length}const i=new W;if(t===e)return i;this._forEachBlocksInRange(t,e,((t,e,s,r)=>{const n=t.extractTail(s,r);n.stop=this._findStopBefore(e);n.from=this._blockStartPos(e);if(n instanceof W)n.blockIndex=e;i.extend(n)}));return i}extractInput(t,e,i){if(t===void 0){t=0}if(e===void 0){e=this.displayValue.length}if(i===void 0){i={}}if(t===e)return"";let s="";this._forEachBlocksInRange(t,e,((t,e,r,n)=>{s+=t.extractInput(r,n,i)}));return s}_findStopBefore(t){let e;for(let i=0;i<this._stops.length;++i){const s=this._stops[i];if(s<=t)e=s;else break}return e}_appendPlaceholder(t){const e=new H;if(this.lazy&&t==null)return e;const i=this._mapPosToBlock(this.displayValue.length);if(!i)return e;const s=i.index;const r=t!=null?t:this._blocks.length;this._blocks.slice(s,r).forEach((i=>{if(!i.lazy||t!=null){var s;e.aggregate(i._appendPlaceholder((s=i._blocks)==null?void 0:s.length))}}));return e}_mapPosToBlock(t){let e="";for(let i=0;i<this._blocks.length;++i){const s=this._blocks[i];const r=e.length;e+=s.displayValue;if(t<=e.length){return{index:i,offset:t-r}}}}_blockStartPos(t){return this._blocks.slice(0,t).reduce(((t,e)=>t+=e.displayValue.length),0)}_forEachBlocksInRange(t,e,i){if(e===void 0){e=this.displayValue.length}const s=this._mapPosToBlock(t);if(s){const t=this._mapPosToBlock(e);const r=t&&s.index===t.index;const n=s.offset;const o=t&&r?t.offset:this._blocks[s.index].displayValue.length;i(this._blocks[s.index],s.index,n,o);if(t&&!r){for(let e=s.index+1;e<t.index;++e){i(this._blocks[e],e,0,this._blocks[e].displayValue.length)}i(this._blocks[t.index],t.index,0,t.offset)}}}remove(t,e){if(t===void 0){t=0}if(e===void 0){e=this.displayValue.length}const i=super.remove(t,e);this._forEachBlocksInRange(t,e,((t,e,s,r)=>{i.aggregate(t.remove(s,r))}));return i}nearestInputPos(t,e){if(e===void 0){e=F.NONE}if(!this._blocks.length)return 0;const i=new U(this,t);if(e===F.NONE){if(i.pushRightBeforeInput())return i.pos;i.popState();if(i.pushLeftBeforeInput())return i.pos;return this.displayValue.length}if(e===F.LEFT||e===F.FORCE_LEFT){if(e===F.LEFT){i.pushRightBeforeFilled();if(i.ok&&i.pos===t)return t;i.popState()}i.pushLeftBeforeInput();i.pushLeftBeforeRequired();i.pushLeftBeforeFilled();if(e===F.LEFT){i.pushRightBeforeInput();i.pushRightBeforeRequired();if(i.ok&&i.pos<=t)return i.pos;i.popState();if(i.ok&&i.pos<=t)return i.pos;i.popState()}if(i.ok)return i.pos;if(e===F.FORCE_LEFT)return 0;i.popState();if(i.ok)return i.pos;i.popState();if(i.ok)return i.pos;return 0}if(e===F.RIGHT||e===F.FORCE_RIGHT){i.pushRightBeforeInput();i.pushRightBeforeRequired();if(i.pushRightBeforeFilled())return i.pos;if(e===F.FORCE_RIGHT)return this.displayValue.length;i.popState();if(i.ok)return i.pos;i.popState();if(i.ok)return i.pos;return this.nearestInputPos(t,F.LEFT)}return t}totalInputPositions(t,e){if(t===void 0){t=0}if(e===void 0){e=this.displayValue.length}let i=0;this._forEachBlocksInRange(t,e,((t,e,s,r)=>{i+=t.totalInputPositions(s,r)}));return i}maskedBlock(t){return this.maskedBlocks(t)[0]}maskedBlocks(t){const e=this._maskedBlocks[t];if(!e)return[];return e.map((t=>this._blocks[t]))}pad(t){const e=new H;this._forEachBlocksInRange(0,this.displayValue.length,(i=>e.aggregate(i.pad(t))));return e}}$.DEFAULTS={...q.DEFAULTS,lazy:true,placeholderChar:"_"};$.STOP_CHAR="`";$.ESCAPE_CHAR="\\";$.InputDefinition=Y;$.FixedDefinition=K;I.MaskedPattern=$;class X extends ${get _matchFrom(){return this.maxLength-String(this.from).length}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){const{to:e=this.to||0,from:i=this.from||0,maxLength:s=this.maxLength||0,autofix:r=this.autofix,...n}=t;this.to=e;this.from=i;this.maxLength=Math.max(String(e).length,s);this.autofix=r;const o=String(this.from).padStart(this.maxLength,"0");const a=String(this.to).padStart(this.maxLength,"0");let u=0;while(u<a.length&&a[u]===o[u])++u;n.mask=a.slice(0,u).replace(/0/g,"\\0")+"0".repeat(this.maxLength-u);super._update(n)}get isComplete(){return super.isComplete&&Boolean(this.value)}boundaries(t){let e="";let i="";const[,s,r]=t.match(/^(\D*)(\d*)(\D*)/)||[];if(r){e="0".repeat(s.length)+r;i="9".repeat(s.length)+r}e=e.padEnd(this.maxLength,"0");i=i.padEnd(this.maxLength,"9");return[e,i]}doPrepareChar(t,e){if(e===void 0){e={}}let i;[t,i]=super.doPrepareChar(t.replace(/\D/g,""),e);if(!t)i.skip=!this.isComplete;return[t,i]}_appendCharRaw(t,e){if(e===void 0){e={}}if(!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(t,e);const i=String(this.from).padStart(this.maxLength,"0");const s=String(this.to).padStart(this.maxLength,"0");const[r,n]=this.boundaries(this.value+t);if(Number(n)<this.from)return super._appendCharRaw(i[this.value.length],e);if(Number(r)>this.to){if(!e.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength){return super._appendCharRaw(i[this.value.length],e).aggregate(this._appendCharRaw(t,e))}return super._appendCharRaw(s[this.value.length],e)}return super._appendCharRaw(t,e)}doValidate(t){const e=this.value;const i=e.search(/[^0]/);if(i===-1&&e.length<=this._matchFrom)return true;const[s,r]=this.boundaries(e);return this.from<=Number(r)&&Number(s)<=this.to&&super.doValidate(t)}pad(t){const e=new H;if(this.value.length===this.maxLength)return e;const i=this.value;const s=this.maxLength-this.value.length;if(s){this.reset();for(let i=0;i<s;++i){e.aggregate(super._appendCharRaw("0",t))}i.split("").forEach((t=>this._appendCharRaw(t)))}return e}}I.MaskedRange=X;const J="d{.}`m{.}`Y";class Q extends ${static extractPatternOptions(t){const{mask:e,pattern:i,...s}=t;return{...s,mask:C(e)?e:i}}constructor(t){super(Q.extractPatternOptions({...Q.DEFAULTS,...t}))}updateOptions(t){super.updateOptions(t)}_update(t){const{mask:e,pattern:i,blocks:s,...r}={...Q.DEFAULTS,...t};const n=Object.assign({},Q.GET_DEFAULT_BLOCKS());if(t.min)n.Y.from=t.min.getFullYear();if(t.max)n.Y.to=t.max.getFullYear();if(t.min&&t.max&&n.Y.from===n.Y.to){n.m.from=t.min.getMonth()+1;n.m.to=t.max.getMonth()+1;if(n.m.from===n.m.to){n.d.from=t.min.getDate();n.d.to=t.max.getDate()}}Object.assign(n,this.blocks,s);super._update({...r,mask:C(e)?e:i,blocks:n})}doValidate(t){const e=this.date;return super.doValidate(t)&&(!this.isComplete||this.isDateExist(this.value)&&e!=null&&(this.min==null||this.min<=e)&&(this.max==null||e<=this.max))}isDateExist(t){return this.format(this.parse(t,this),this).indexOf(t)>=0}get date(){return this.typedValue}set date(t){this.typedValue=t}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(t){super.typedValue=t}maskEquals(t){return t===Date||super.maskEquals(t)}optionsIsChanged(t){return super.optionsIsChanged(Q.extractPatternOptions(t))}}Q.GET_DEFAULT_BLOCKS=()=>({d:{mask:X,from:1,to:31,maxLength:2},m:{mask:X,from:1,to:12,maxLength:2},Y:{mask:X,from:1900,to:9999}});Q.DEFAULTS={...$.DEFAULTS,mask:Date,pattern:J,format:(t,e)=>{if(!t)return"";const i=String(t.getDate()).padStart(2,"0");const s=String(t.getMonth()+1).padStart(2,"0");const r=t.getFullYear();return[i,s,r].join(".")},parse:(t,e)=>{const[i,s,r]=t.split(".").map(Number);return new Date(r,s-1,i)}};I.MaskedDate=Q;class tt extends q{constructor(t){super({...tt.DEFAULTS,...t});this.currentMask=undefined}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t);if("mask"in t){this.exposeMask=undefined;this.compiledMasks=Array.isArray(t.mask)?t.mask.map((t=>{const{expose:e,...i}=S(t);const s=M({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...i});if(e)this.exposeMask=s;return s})):[]}}_appendCharRaw(t,e){if(e===void 0){e={}}const i=this._applyDispatch(t,e);if(this.currentMask){i.aggregate(this.currentMask._appendChar(t,this.currentMaskFlags(e)))}return i}_applyDispatch(t,e,i){if(t===void 0){t=""}if(e===void 0){e={}}if(i===void 0){i=""}const s=e.tail&&e._beforeTailState!=null?e._beforeTailState._value:this.value;const r=this.rawInputValue;const n=e.tail&&e._beforeTailState!=null?e._beforeTailState._rawInputValue:r;const o=r.slice(n.length);const a=this.currentMask;const u=new H;const h=a==null?void 0:a.state;this.currentMask=this.doDispatch(t,{...e},i);if(this.currentMask){if(this.currentMask!==a){this.currentMask.reset();if(n){this.currentMask.append(n,{raw:true});u.tailShift=this.currentMask.value.length-s.length}if(o){u.tailShift+=this.currentMask.append(o,{raw:true,tail:true}).tailShift}}else if(h){this.currentMask.state=h}}return u}_appendPlaceholder(){const t=this._applyDispatch();if(this.currentMask){t.aggregate(this.currentMask._appendPlaceholder())}return t}_appendEager(){const t=this._applyDispatch();if(this.currentMask){t.aggregate(this.currentMask._appendEager())}return t}appendTail(t){const e=new H;if(t)e.aggregate(this._applyDispatch("",{},t));return e.aggregate(this.currentMask?this.currentMask.appendTail(t):super.appendTail(t))}currentMaskFlags(t){var e,i;return{...t,_beforeTailState:((e=t._beforeTailState)==null?void 0:e.currentMaskRef)===this.currentMask&&((i=t._beforeTailState)==null?void 0:i.currentMask)||t._beforeTailState}}doDispatch(t,e,i){if(e===void 0){e={}}if(i===void 0){i=""}return this.dispatch(t,this,e,i)}doValidate(t){return super.doValidate(t)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(t)))}doPrepare(t,e){if(e===void 0){e={}}let[i,s]=super.doPrepare(t,e);if(this.currentMask){let t;[i,t]=super.doPrepare(i,this.currentMaskFlags(e));s=s.aggregate(t)}return[i,s]}doPrepareChar(t,e){if(e===void 0){e={}}let[i,s]=super.doPrepareChar(t,e);if(this.currentMask){let t;[i,t]=super.doPrepareChar(i,this.currentMaskFlags(e));s=s.aggregate(t)}return[i,s]}reset(){var t;(t=this.currentMask)==null||t.reset();this.compiledMasks.forEach((t=>t.reset()))}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(t){if(this.exposeMask){this.exposeMask.value=t;this.currentMask=this.exposeMask;this._applyDispatch()}else super.value=t}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(t){if(this.exposeMask){this.exposeMask.unmaskedValue=t;this.currentMask=this.exposeMask;this._applyDispatch()}else super.unmaskedValue=t}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(t){if(this.exposeMask){this.exposeMask.typedValue=t;this.currentMask=this.exposeMask;this._applyDispatch();return}let e=String(t);if(this.currentMask){this.currentMask.typedValue=t;e=this.currentMask.unmaskedValue}this.unmaskedValue=e}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var t;return Boolean((t=this.currentMask)==null?void 0:t.isComplete)}get isFilled(){var t;return Boolean((t=this.currentMask)==null?void 0:t.isFilled)}remove(t,e){const i=new H;if(this.currentMask){i.aggregate(this.currentMask.remove(t,e)).aggregate(this._applyDispatch())}return i}get state(){var t;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map((t=>t.state)),currentMaskRef:this.currentMask,currentMask:(t=this.currentMask)==null?void 0:t.state}}set state(t){const{compiledMasks:e,currentMaskRef:i,currentMask:s,...r}=t;if(e)this.compiledMasks.forEach(((t,i)=>t.state=e[i]));if(i!=null){this.currentMask=i;this.currentMask.state=s}super.state=r}extractInput(t,e,i){return this.currentMask?this.currentMask.extractInput(t,e,i):""}extractTail(t,e){return this.currentMask?this.currentMask.extractTail(t,e):super.extractTail(t,e)}doCommit(){if(this.currentMask)this.currentMask.doCommit();super.doCommit()}nearestInputPos(t,e){return this.currentMask?this.currentMask.nearestInputPos(t,e):super.nearestInputPos(t,e)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(t){this._overwrite=t}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(t){this._eager=t}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(t){this._skipInvalid=t}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(t){this._autofix=t}maskEquals(t){return Array.isArray(t)?this.compiledMasks.every(((e,i)=>{if(!t[i])return;const{mask:s,...r}=t[i];return E(e,r)&&e.maskEquals(s)})):super.maskEquals(t)}typedValueEquals(t){var e;return Boolean((e=this.currentMask)==null?void 0:e.typedValueEquals(t))}}tt.DEFAULTS={...q.DEFAULTS,dispatch:(t,e,i,s)=>{if(!e.compiledMasks.length)return;const r=e.rawInputValue;const n=e.compiledMasks.map(((n,o)=>{const a=e.currentMask===n;const u=a?n.displayValue.length:n.nearestInputPos(n.displayValue.length,F.FORCE_LEFT);if(n.rawInputValue!==r){n.reset();n.append(r,{raw:true})}else if(!a){n.remove(u)}n.append(t,e.currentMaskFlags(i));n.appendTail(s);return{index:o,weight:n.rawInputValue.length,totalInputPositions:n.totalInputPositions(0,Math.max(u,n.nearestInputPos(n.displayValue.length,F.FORCE_LEFT)))}}));n.sort(((t,e)=>e.weight-t.weight||e.totalInputPositions-t.totalInputPositions));return e.compiledMasks[n[0].index]}};I.MaskedDynamic=tt;class et extends ${constructor(t){super({...et.DEFAULTS,...t})}updateOptions(t){super.updateOptions(t)}_update(t){const{enum:e,...i}=t;if(e){const t=e.map((t=>t.length));const s=Math.min(...t);const r=Math.max(...t)-s;i.mask="*".repeat(s);if(r)i.mask+="["+"*".repeat(r)+"]";this.enum=e}super._update(i)}_appendCharRaw(t,e){if(e===void 0){e={}}const i=Math.min(this.nearestInputPos(0,F.FORCE_RIGHT),this.value.length);const s=this.enum.filter((e=>this.matchValue(e,this.unmaskedValue+t,i)));if(s.length){if(s.length===1){this._forEachBlocksInRange(0,this.value.length,((t,i)=>{const r=s[0][i];if(i>=this.value.length||r===t.value)return;t.reset();t._appendChar(r,e)}))}const t=super._appendCharRaw(s[0][this.value.length],e);if(s.length===1){s[0].slice(this.unmaskedValue.length).split("").forEach((e=>t.aggregate(super._appendCharRaw(e))))}return t}return new H({skip:!this.isComplete})}extractTail(t,e){if(t===void 0){t=0}return new Z("",t)}remove(t,e){if(t===void 0){t=0}if(e===void 0){e=this.displayValue.length}if(t===e)return new H;const i=Math.min(super.nearestInputPos(0,F.FORCE_RIGHT),this.value.length);let s;for(s=t;s>=0;--s){const t=this.enum.filter((t=>this.matchValue(t,this.value.slice(i,s),i)));if(t.length>1)break}const r=super.remove(s,e);r.tailShift+=s-t;return r}get isComplete(){return this.enum.indexOf(this.value)>=0}}et.DEFAULTS={...$.DEFAULTS,matchValue:(t,e,i)=>t.indexOf(e,i)===i};I.MaskedEnum=et;class it extends q{updateOptions(t){super.updateOptions(t)}_update(t){super._update({...t,validate:t.mask})}}I.MaskedFunction=it;var st;class rt extends q{constructor(t){super({...rt.DEFAULTS,...t})}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t);this._updateRegExps()}_updateRegExps(){const t="^"+(this.allowNegative?"[+|\\-]?":"");const e="\\d*";const i=(this.scale?"("+B(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(t+e+i);this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(B).join("")+"]","g");this._thousandsSeparatorRegExp=new RegExp(B(this.thousandsSeparator),"g")}_removeThousandsSeparators(t){return t.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(t){const e=t.split(this.radix);e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator);return e.join(this.radix)}doPrepareChar(t,e){if(e===void 0){e={}}const[i,s]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(e.input&&e.raw||!e.input&&!e.raw)?t.replace(this._mapToRadixRegExp,this.radix):t),e);if(t&&!i)s.skip=true;if(i&&!this.allowPositive&&!this.value&&i!=="-")s.aggregate(this._appendChar("-"));return[i,s]}_separatorsCount(t,e){if(e===void 0){e=false}let i=0;for(let s=0;s<t;++s){if(this._value.indexOf(this.thousandsSeparator,s)===s){++i;if(e)t+=this.thousandsSeparator.length}}return i}_separatorsCountFromSlice(t){if(t===void 0){t=this._value}return this._separatorsCount(this._removeThousandsSeparators(t).length,true)}extractInput(t,e,i){if(t===void 0){t=0}if(e===void 0){e=this.displayValue.length}[t,e]=this._adjustRangeWithSeparators(t,e);return this._removeThousandsSeparators(super.extractInput(t,e,i))}_appendCharRaw(t,e){if(e===void 0){e={}}const i=e.tail&&e._beforeTailState?e._beforeTailState._value:this._value;const s=this._separatorsCountFromSlice(i);this._value=this._removeThousandsSeparators(this.value);const r=this._value;this._value+=t;const n=this.number;let o=!isNaN(n);let a=false;if(o){let t;if(this.min!=null&&this.min<0&&this.number<this.min)t=this.min;if(this.max!=null&&this.max>0&&this.number>this.max)t=this.max;if(t!=null){if(this.autofix){this._value=this.format(t,this).replace(rt.UNMASKED_RADIX,this.radix);a||(a=r===this._value&&!e.tail)}else{o=false}}o&&(o=Boolean(this._value.match(this._numberRegExp)))}let u;if(!o){this._value=r;u=new H}else{u=new H({inserted:this._value.slice(r.length),rawInserted:a?"":t,skip:a})}this._value=this._insertThousandsSeparators(this._value);const h=e.tail&&e._beforeTailState?e._beforeTailState._value:this._value;const l=this._separatorsCountFromSlice(h);u.tailShift+=(l-s)*this.thousandsSeparator.length;return u}_findSeparatorAround(t){if(this.thousandsSeparator){const e=t-this.thousandsSeparator.length+1;const i=this.value.indexOf(this.thousandsSeparator,e);if(i<=t)return i}return-1}_adjustRangeWithSeparators(t,e){const i=this._findSeparatorAround(t);if(i>=0)t=i;const s=this._findSeparatorAround(e);if(s>=0)e=s+this.thousandsSeparator.length;return[t,e]}remove(t,e){if(t===void 0){t=0}if(e===void 0){e=this.displayValue.length}[t,e]=this._adjustRangeWithSeparators(t,e);const i=this.value.slice(0,t);const s=this.value.slice(e);const r=this._separatorsCount(i.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(i+s));const n=this._separatorsCountFromSlice(i);return new H({tailShift:(n-r)*this.thousandsSeparator.length})}nearestInputPos(t,e){if(!this.thousandsSeparator)return t;switch(e){case F.NONE:case F.LEFT:case F.FORCE_LEFT:{const i=this._findSeparatorAround(t-1);if(i>=0){const s=i+this.thousandsSeparator.length;if(t<s||this.value.length<=s||e===F.FORCE_LEFT){return i}}break}case F.RIGHT:case F.FORCE_RIGHT:{const e=this._findSeparatorAround(t);if(e>=0){return e+this.thousandsSeparator.length}}}return t}doCommit(){if(this.value){const t=this.number;let e=t;if(this.min!=null)e=Math.max(e,this.min);if(this.max!=null)e=Math.min(e,this.max);if(e!==t)this.unmaskedValue=this.format(e,this);let i=this.value;if(this.normalizeZeros)i=this._normalizeZeros(i);if(this.padFractionalZeros&&this.scale>0)i=this._padFractionalZeros(i);this._value=i}super.doCommit()}_normalizeZeros(t){const e=this._removeThousandsSeparators(t).split(this.radix);e[0]=e[0].replace(/^(\D*)(0*)(\d*)/,((t,e,i,s)=>e+s));if(t.length&&!/\d$/.test(e[0]))e[0]=e[0]+"0";if(e.length>1){e[1]=e[1].replace(/0*$/,"");if(!e[1].length)e.length=1}return this._insertThousandsSeparators(e.join(this.radix))}_padFractionalZeros(t){if(!t)return t;const e=t.split(this.radix);if(e.length<2)e.push("");e[1]=e[1].padEnd(this.scale,"0");return e.join(this.radix)}doSkipInvalid(t,e,i){if(e===void 0){e={}}const s=this.scale===0&&t!==this.thousandsSeparator&&(t===this.radix||t===rt.UNMASKED_RADIX||this.mapToRadix.includes(t));return super.doSkipInvalid(t,e,i)&&!s}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,rt.UNMASKED_RADIX)}set unmaskedValue(t){super.unmaskedValue=t}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(t){this.rawInputValue=this.format(t,this).replace(rt.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(t){this.typedValue=t}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(t){return(super.typedValueEquals(t)||rt.EMPTY_VALUES.includes(t)&&rt.EMPTY_VALUES.includes(this.typedValue))&&!(t===0&&this.value==="")}}st=rt;rt.UNMASKED_RADIX=".";rt.EMPTY_VALUES=[...q.EMPTY_VALUES,0];rt.DEFAULTS={...q.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[st.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:true,padFractionalZeros:false,parse:Number,format:t=>t.toLocaleString("en-US",{useGrouping:false,maximumFractionDigits:20})};I.MaskedNumber=rt;const nt={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function ot(t,e,i){if(e===void 0){e=nt.MASKED}if(i===void 0){i=nt.MASKED}const s=M(t);return t=>s.runIsolated((s=>{s[e]=t;return s[i]}))}function at(t,e,i,s){return ot(e,i,s)(t)}I.PIPE_TYPE=nt;I.createPipe=ot;I.pipe=at;class ut extends ${get repeatFrom(){var t;return(t=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===Infinity?0:this.repeat)!=null?t:0}get repeatTo(){var t;return(t=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)!=null?t:Infinity}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){var e,i,s;const{repeat:r,...n}=S(t);this._blockOpts=Object.assign({},this._blockOpts,n);const o=M(this._blockOpts);this.repeat=(e=(i=r!=null?r:o.repeat)!=null?i:this.repeat)!=null?e:Infinity;super._update({mask:"m".repeat(Math.max(this.repeatTo===Infinity&&((s=this._blocks)==null?void 0:s.length)||0,this.repeatFrom)),blocks:{m:o},eager:o.eager,overwrite:o.overwrite,skipInvalid:o.skipInvalid,lazy:o.lazy,placeholderChar:o.placeholderChar,displayChar:o.displayChar})}_allocateBlock(t){if(t<this._blocks.length)return this._blocks[t];if(this.repeatTo===Infinity||this._blocks.length<this.repeatTo){this._blocks.push(M(this._blockOpts));this.mask+="m";return this._blocks[this._blocks.length-1]}}_appendCharRaw(t,e){if(e===void 0){e={}}const i=new H;for(let a=(s=(r=this._mapPosToBlock(this.displayValue.length))==null?void 0:r.index)!=null?s:Math.max(this._blocks.length-1,0),u,h;u=(n=this._blocks[a])!=null?n:h=!h&&this._allocateBlock(a);++a){var s,r,n,o;const l=u._appendChar(t,{...e,_beforeTailState:(o=e._beforeTailState)==null||(o=o._blocks)==null?void 0:o[a]});if(l.skip&&h){this._blocks.pop();this.mask=this.mask.slice(1);break}i.aggregate(l);if(l.consumed)break}return i}_trimEmptyTail(t,e){var i,s;if(t===void 0){t=0}const r=Math.max(((i=this._mapPosToBlock(t))==null?void 0:i.index)||0,this.repeatFrom,0);let n;if(e!=null)n=(s=this._mapPosToBlock(e))==null?void 0:s.index;if(n==null)n=this._blocks.length-1;let o=0;for(let t=n;r<=t;--t,++o){if(this._blocks[t].unmaskedValue)break}if(o){this._blocks.splice(n-o+1,o);this.mask=this.mask.slice(o)}}reset(){super.reset();this._trimEmptyTail()}remove(t,e){if(t===void 0){t=0}if(e===void 0){e=this.displayValue.length}const i=super.remove(t,e);this._trimEmptyTail(t,e);return i}totalInputPositions(t,e){if(t===void 0){t=0}if(e==null&&this.repeatTo===Infinity)return Infinity;return super.totalInputPositions(t,e)}get state(){return super.state}set state(t){this._blocks.length=t._blocks.length;this.mask=this.mask.slice(0,this._blocks.length);super.state=t}}I.RepeatBlock=ut;try{globalThis.IMask=I}catch{}const ht='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-kba-dialog{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-kba-dialog div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-kba-dialog .background-overlay{position:fixed;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:rgba(0, 0, 0, 0.4980392157)}verdocs-kba-dialog .dialog{width:440px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#fff;padding:16px;gap:10px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-kba-dialog .heading{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;font-size:20px;font-weight:500}verdocs-kba-dialog .step{margin-left:6px;color:#666}verdocs-kba-dialog .help-box{background-color:#707ae5;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;padding:14px;-ms-flex-align:center;align-items:center;color:white}verdocs-kba-dialog .help-details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin-left:15px;font-size:14px}verdocs-kba-dialog .help-icon{width:40px;height:40px}verdocs-kba-dialog .help-title{font-weight:600;margin-bottom:4px}verdocs-kba-dialog .help-text{font-weight:400}verdocs-kba-dialog .input{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:10px;-ms-flex-align:center;align-items:center;margin:16px 0 32px}verdocs-kba-dialog .input label{-ms-flex:0;flex:0;line-height:10px;font-weight:500;white-space:nowrap}verdocs-kba-dialog .input input{-ms-flex:1;flex:1;padding:5px 8px;border-radius:3px;border:1px solid #cccccc}verdocs-kba-dialog .field{gap:10px;margin:0;display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start;-ms-flex-direction:row;flex-direction:row;max-width:100%}verdocs-kba-dialog .field .required{color:red;position:relative;top:-0.5em;font-size:80%}verdocs-kba-dialog .field label{margin-top:4px;-ms-flex:0 0 120px;flex:0 0 120px;font-weight:500;line-height:10px;text-align:right;white-space:nowrap}verdocs-kba-dialog .field verdocs-date-input{width:40%;-ms-flex-positive:1;flex-grow:1}verdocs-kba-dialog .field verdocs-date-input input{width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-kba-dialog .field input{width:40%;-ms-flex-positive:1;flex-grow:1;padding:5px 8px;border-radius:3px;border:1px solid #cccccc}verdocs-kba-dialog .choices{display:grid;gap:15px;grid-template-columns:repeat(auto-fill, minmax(100px, 1fr));margin:0 0 15px 0}verdocs-kba-dialog .choice{border:1px solid #707ae5;border-radius:5px;display:-ms-flexbox;display:flex;height:60px;font-size:14px;padding:0 5px;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-align:center;color:#5c6575;cursor:pointer}verdocs-kba-dialog .choice.selected{background-color:#707ae5;color:#ffffff}verdocs-kba-dialog .buttons{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-kba-dialog .buttons verdocs-button{margin-left:16px}';const lt={AL:"Alabama",AK:"Alaska",AS:"American Samoa",AZ:"Arizona",AR:"Arkansas",CA:"California",CO:"Colorado",CT:"Connecticut",DE:"Delaware",DC:"District Of Columbia",FM:"Federated States Of Micronesia",FL:"Florida",GA:"Georgia",GU:"Guam",HI:"Hawaii",ID:"Idaho",IL:"Illinois",IN:"Indiana",IA:"Iowa",KS:"Kansas",KY:"Kentucky",LA:"Louisiana",ME:"Maine",MH:"Marshall Islands",MD:"Maryland",MA:"Massachusetts",MI:"Michigan",MN:"Minnesota",MS:"Mississippi",MO:"Missouri",MT:"Montana",NE:"Nebraska",NV:"Nevada",NH:"New Hampshire",NJ:"New Jersey",NM:"New Mexico",NY:"New York",NC:"North Carolina",ND:"North Dakota",MP:"Northern Mariana Islands",OH:"Ohio",OK:"Oklahoma",OR:"Oregon",PW:"Palau",PA:"Pennsylvania",PR:"Puerto Rico",RI:"Rhode Island",SC:"South Carolina",SD:"South Dakota",TN:"Tennessee",TX:"Texas",UT:"Utah",VT:"Vermont",VI:"Virgin Islands",VA:"Virginia",WA:"Washington",WV:"West Virginia",WI:"Wisconsin",WY:"Wyoming"};const dt=Object.entries(lt).map((([t,e])=>({value:t,label:e})));const ct=`<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20 0C8.95313 0 0 8.95313 0 20C0 31.0469 8.95313 40 20 40C31.0469 40 40 31.0469 40 20C40 8.95313 31.0469 0 20 0ZM20 36.25C11.0391 36.25 3.75 28.9602 3.75 20C3.75 11.0398 11.0391 3.75 20 3.75C28.9609 3.75 36.25 11.0398 36.25 20C36.25 28.9602 28.9609 36.25 20 36.25Z" fill="white"/><path d="M20 26.25C18.5938 26.25 17.5 27.3438 17.5 28.75C17.5 30.1562 18.5234 31.25 20 31.25C21.3359 31.25 22.5 30.1562 22.5 28.75C22.5 27.3438 21.3359 26.25 20 26.25ZM22.5859 10H18.5938C15.5469 10 13.125 12.4219 13.125 15.4688C13.125 16.4844 13.9844 17.3438 15 17.3438C16.0156 17.3438 16.875 16.4844 16.875 15.4688C16.875 14.5312 17.5859 13.75 18.5234 13.75H22.5156C23.5234 13.75 24.375 14.5312 24.375 15.4688C24.375 16.0938 24.0625 16.5703 23.5156 16.8828L19.0625 19.6094C18.4375 20 18.125 20.625 18.125 21.25V22.5C18.125 23.5156 18.9844 24.375 20 24.375C21.0156 24.375 21.875 23.5156 21.875 22.5V22.3438L25.3984 20.1562C27.0391 19.1406 28.0547 17.3438 28.0547 15.4688C28.125 12.4219 25.7031 10 22.5859 10Z" fill="#E7E7E7"/></svg>`;const ft=class{constructor(i){t(this,i);this.exit=e(this,"exit");this.pinEntered=e(this,"pinEntered");this.next=e(this,"next");this.step=1;this.steps=3;this.helptitle="Previous Addresses";this.helptext="Please select the address below that you have most recently lived at.";this.mode="choice";this.label="PIN";this.placeholder="Enter your PIN...";this.recipient=null;this.choices=["553 Arbor Dr","18 Lacey Ln","23A Ball Ct","2375 Cavallo Blvd","23-1 RR-7","151 Boulder Rd"];this.agreed=false;this.response="";this.updatedRecipient=null;this.dobContainerId=`verdocs-date-input-${Math.random().toString(36).substring(2,11)}`}componentWillLoad(){this.updatedRecipient={...this.recipient||{}}}componentDidRender(){I(document.getElementById(this.dobContainerId),{mask:Date,min:new Date(1920,0,1),max:new Date(2007,12,31),lazy:false,pattern:"m/d/Y",format:function(t){var e=t.getDate();var i=t.getMonth()+1;var s=t.getFullYear();if(e<10)e="0"+e;if(i<10)i="0"+i;return[i,e,s].join("/")},parse:function(t){var e=t.split("/");return new Date(e[2],e[0]-1,e[1])}})}handleCancel(){this.exit.emit()}handleDismiss(t){if(t.target.class==="background-overlay"){t.preventDefault();this.handleCancel()}}handleDone(){this.next.emit(this.response);this.response=""}handleConfirmID(){console.log("Confirm ID",this.updatedRecipient);this.next.emit(this.updatedRecipient)}render(){var t,e,n,o,a,u,h,l,d,c,f,p,b,g;if(this.mode==="choice"){return i(r,null,i("div",{class:"background-overlay",onClick:t=>this.handleDismiss(t)},i("div",{class:"dialog"},i("div",{class:"heading"},"Confirm Your Identity",this.steps>1?i("span",{class:"step"},"(",this.step,"/",this.steps,")"):i(s,null)),!!this.helptitle&&i("div",{class:"help-box"},i("div",{class:"help-icon",innerHTML:ct}),i("div",{class:"help-details"},i("div",{class:"help-title"},this.helptitle),i("div",{class:"help-text"},this.helptext))),i("div",{class:"choices"},this.choices.map((t=>i("div",{class:`choice ${t===this.response?"selected":""}`,onClick:()=>{console.log("Selected",t);this.response=t}},t)))),i("div",{class:"buttons"},i("verdocs-button",{label:"Cancel",variant:"outline",onClick:()=>this.handleCancel()}),i("verdocs-button",{label:this.step<this.steps?"Next":"Submit",onClick:()=>this.handleDone(),disabled:!this.response})))))}if(this.mode==="identity"){return i(r,null,i("div",{class:"background-overlay",onClick:t=>this.handleDismiss(t)},i("div",{class:"dialog"},i("div",{class:"heading"},"Confirm Your Identity"),i("div",{class:"field"},i("label",{htmlFor:"verdocs-kba-first"},"Your Name:",i("span",{class:"required"},"*")),i("input",{required:true,type:"text",id:"verdocs-kba-first",name:"verdocs-kba-first",placeholder:"First name...",value:(t=this.updatedRecipient)===null||t===void 0?void 0:t.first_name,onInput:t=>this.updatedRecipient={...this.updatedRecipient,first_name:t.target.value}}),i("input",{type:"text",id:"verdocs-kba-last",name:"verdocs-kba-last",placeholder:"Last name...",required:true,value:(e=this.updatedRecipient)===null||e===void 0?void 0:e.last_name,onInput:t=>this.updatedRecipient={...this.updatedRecipient,last_name:t.target.value}})),i("div",{class:"field"},i("label",{htmlFor:"verdocs-kba-address"},"Address:",i("span",{class:"required"},"*")),i("input",{type:"text",id:"verdocs-kba-address",name:"verdocs-kba-address",placeholder:"Address...",value:(n=this.updatedRecipient)===null||n===void 0?void 0:n.address,onInput:t=>this.updatedRecipient={...this.updatedRecipient,address:t.target.value}})),i("div",{class:"field"},i("label",{htmlFor:"verdocs-kba-city"},"City:"),i("input",{type:"text",id:"verdocs-kba-city",name:"verdocs-kba-city",placeholder:"City...",value:(o=this.updatedRecipient)===null||o===void 0?void 0:o.city,onInput:t=>this.updatedRecipient={...this.updatedRecipient,city:t.target.value}})),i("div",{class:"field"},i("label",{htmlFor:"verdocs-kba-state"},"State:"),i("verdocs-select-input",{options:dt,value:(a=this.updatedRecipient)===null||a===void 0?void 0:a.state,onInput:t=>this.updatedRecipient={...this.updatedRecipient,state:t.target.value}})),i("div",{class:"field"},i("label",{htmlFor:"verdocs-kba-zip"},"Zip Code:",i("span",{class:"required"},"*")),i("input",{type:"text",id:"verdocs-kba-zip",name:"verdocs-kba-zip",placeholder:"Zip Code...",required:true,value:(u=this.updatedRecipient)===null||u===void 0?void 0:u.zip,onInput:t=>this.updatedRecipient={...this.updatedRecipient,zip:t.target.value}})),i("div",{class:"field"},i("label",{htmlFor:"verdocs-kba-ssn"},"SSN Last 4:",i("span",{class:"required"},"*")),i("input",{type:"text",id:"verdocs-kba-ssn",name:"verdocs-kba-ssn",placeholder:"Last 4 digits of your Social Security Number...",required:true,value:(h=this.updatedRecipient)===null||h===void 0?void 0:h.ssn_last_4,onInput:t=>this.updatedRecipient={...this.updatedRecipient,ssn_last_4:t.target.value}})),i("div",{class:"field"},i("label",{htmlFor:this.dobContainerId},"Date of Birth:",i("span",{class:"required"},"*")),i("input",{type:"text",value:((l=this.updatedRecipient)===null||l===void 0?void 0:l.dob)||"",id:this.dobContainerId,placeholder:"DOB...",onInput:t=>this.updatedRecipient={...this.updatedRecipient,dob:t.target.value}})),i("div",{class:"field"},i("label",null),i("verdocs-checkbox",{id:"verdocs-kba-agree",name:"verdocs-kba-agree",checked:this.agreed,onInput:t=>this.agreed=t.target.checked}),i("span",null,"I agree to provide my personal information in order to validate my identity.")),i("div",{class:"buttons"},i("verdocs-button",{label:"Submit",onClick:()=>this.handleConfirmID(),disabled:!this.agreed||!((d=this.updatedRecipient)===null||d===void 0?void 0:d.first_name)||!((c=this.updatedRecipient)===null||c===void 0?void 0:c.last_name)||!((f=this.updatedRecipient)===null||f===void 0?void 0:f.address)||!((p=this.updatedRecipient)===null||p===void 0?void 0:p.zip)||!((b=this.updatedRecipient)===null||b===void 0?void 0:b.ssn_last_4)||!((g=this.updatedRecipient)===null||g===void 0?void 0:g.dob)})))))}return i(r,null,i("div",{class:"background-overlay",onClick:t=>this.handleDismiss(t)},i("div",{class:"dialog"},i("div",{class:"heading"},"Please Confirm Your Identity",this.steps>1?i("span",{class:"step"},"(",this.step,"/",this.steps,")"):i(s,null)),!!this.helptitle&&i("div",{class:"help-box"},i("div",{class:"help-icon",innerHTML:ct}),i("div",{class:"help-details"},i("div",{class:"help-title"},this.helptitle),i("div",{class:"help-text"},this.helptext))),i("div",{class:"input"},i("label",{htmlFor:"verdocs-kba-input"},this.label),i("input",{type:"text",id:"verdocs-kba-input",name:"verdocs-kba-input",placeholder:this.placeholder,value:this.response,onInput:t=>this.response=t.target.value})),i("div",{class:"buttons"},i("verdocs-button",{label:"Cancel",variant:"outline",onClick:()=>this.handleCancel()}),i("verdocs-button",{label:"Submit",onClick:()=>this.handleDone(),disabled:!this.response})))))}};ft.style=ht;const pt='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-otp-dialog{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-otp-dialog div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-otp-dialog .background-overlay{position:fixed;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:rgba(0, 0, 0, 0.4980392157)}verdocs-otp-dialog .dialog{width:440px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#fff;padding:16px;gap:10px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-otp-dialog .heading{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;font-size:20px;font-weight:500}verdocs-otp-dialog .step{margin-left:6px;color:#666}verdocs-otp-dialog .help-box{background-color:#707ae5;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;padding:14px;-ms-flex-align:center;align-items:center;color:white}verdocs-otp-dialog .help-details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin-left:15px;font-size:14px}verdocs-otp-dialog .help-icon{width:40px;height:40px}verdocs-otp-dialog .help-title{font-weight:600;margin-bottom:4px}verdocs-otp-dialog .help-text{font-weight:400}verdocs-otp-dialog .input{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:10px;-ms-flex-align:center;align-items:center;margin:16px 0 32px}verdocs-otp-dialog .input label{-ms-flex:0;flex:0;line-height:10px;font-weight:500;white-space:nowrap}verdocs-otp-dialog .input input{-ms-flex:1;flex:1;padding:5px 8px;border-radius:3px;border:1px solid #cccccc}verdocs-otp-dialog .field{gap:10px;margin:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;max-width:100%}verdocs-otp-dialog .field .required{color:red;position:relative;top:-0.5em;font-size:80%}verdocs-otp-dialog .field label{-ms-flex:0 0 120px;flex:0 0 120px;font-weight:500;line-height:10px;text-align:right;white-space:nowrap}verdocs-otp-dialog .field verdocs-date-input{width:40%;-ms-flex-positive:1;flex-grow:1}verdocs-otp-dialog .field verdocs-date-input input{width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-otp-dialog .field input{width:40%;-ms-flex-positive:1;flex-grow:1;padding:5px 8px;border-radius:3px;border:1px solid #cccccc}verdocs-otp-dialog .choices{display:grid;gap:15px;grid-template-columns:repeat(auto-fill, minmax(100px, 1fr));margin:0 0 15px 0}verdocs-otp-dialog .choice{border:1px solid #707ae5;border-radius:5px;display:-ms-flexbox;display:flex;height:60px;font-size:14px;padding:0 5px;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-align:center;color:#5c6575;cursor:pointer}verdocs-otp-dialog .choice.selected{background-color:#707ae5;color:#ffffff}verdocs-otp-dialog .buttons{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-otp-dialog .buttons verdocs-button{margin-left:16px}';const bt=`<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20 0C8.95313 0 0 8.95313 0 20C0 31.0469 8.95313 40 20 40C31.0469 40 40 31.0469 40 20C40 8.95313 31.0469 0 20 0ZM20 36.25C11.0391 36.25 3.75 28.9602 3.75 20C3.75 11.0398 11.0391 3.75 20 3.75C28.9609 3.75 36.25 11.0398 36.25 20C36.25 28.9602 28.9609 36.25 20 36.25Z" fill="white"/><path d="M20 26.25C18.5938 26.25 17.5 27.3438 17.5 28.75C17.5 30.1562 18.5234 31.25 20 31.25C21.3359 31.25 22.5 30.1562 22.5 28.75C22.5 27.3438 21.3359 26.25 20 26.25ZM22.5859 10H18.5938C15.5469 10 13.125 12.4219 13.125 15.4688C13.125 16.4844 13.9844 17.3438 15 17.3438C16.0156 17.3438 16.875 16.4844 16.875 15.4688C16.875 14.5312 17.5859 13.75 18.5234 13.75H22.5156C23.5234 13.75 24.375 14.5312 24.375 15.4688C24.375 16.0938 24.0625 16.5703 23.5156 16.8828L19.0625 19.6094C18.4375 20 18.125 20.625 18.125 21.25V22.5C18.125 23.5156 18.9844 24.375 20 24.375C21.0156 24.375 21.875 23.5156 21.875 22.5V22.3438L25.3984 20.1562C27.0391 19.1406 28.0547 17.3438 28.0547 15.4688C28.125 12.4219 25.7031 10 22.5859 10Z" fill="#E7E7E7"/></svg>`;const gt=class{constructor(i){t(this,i);this.exit=e(this,"exit");this.next=e(this,"next");this.resendTimeout=null;this.endpoint=o;this.method="email";this.recipient=null;this.resendDisabled=true;this.response=""}componentDidLoad(){this.startResendTimeout();setTimeout((()=>{a(this.endpoint,{auth_method:this.method,code:"",resend:true}).then((t=>{console.log("Resend result",t);this.response=""})).catch((t=>console.log("Error resending code",t)))}),1e3)}disconnectedCallback(){if(this.resendTimeout){clearTimeout(this.resendTimeout);this.resendTimeout=null}}handleCancel(){this.exit.emit()}handleDismiss(t){if(t.target.class==="background-overlay"){t.preventDefault();this.handleCancel()}}startResendTimeout(){this.resendDisabled=true;if(this.resendTimeout){clearTimeout(this.resendTimeout)}this.resendTimeout=setTimeout((()=>{this.resendDisabled=false}),3e4)}handleResend(){this.startResendTimeout();a(this.endpoint,{auth_method:this.method,code:"",resend:true}).then((t=>{console.log("Resend result",t);this.response="";p("A new code has been sent.")})).catch((t=>console.log("Error resending code",t)))}handleSubmit(){this.startResendTimeout();a(this.endpoint,{auth_method:this.method,code:this.response}).then((t=>{console.log("Verification completed",t);this.next.emit({response:t});p("Thank you. Your verification was successful.")})).catch((t=>{p("Invalid verification code. Please try again.");console.log("Invalid code",t)}));this.response=""}render(){return i(r,{key:"09de0f0a2b9ea033015df659dc895294191eec1f"},i("div",{key:"9dcd8ec1a69112f987c65bf005343d0aa1e92762",class:"background-overlay",onClick:t=>this.handleDismiss(t)},i("div",{key:"9439753f7c33b3d3316ce2be193beb6e942486c3",class:"dialog"},i("div",{key:"e4c9d1623ae43ecb73b0beba8476b8814a77bf21",class:"heading"},"Verification Required"),i("div",{key:"4d0db169d6dc13442211d51ff25c2dbacb06e324",class:"help-box"},i("div",{key:"680a7555654c0fb0fef0ec92a52f9f855c59ed30",class:"help-icon",innerHTML:bt}),i("div",{key:"b4017fcac2057b479be299a460e9fbf830554998",class:"help-details"},i("div",{key:"a92c2987721de5b2ccd47f9d6ed207b9c47f3815",class:"help-title"},"Please verify your email address"),i("div",{key:"a515d46a0be39a874d45a454d85933f8b87e6e5e",class:"help-text"},"Check your email for a one-time code, and enter it below."))),i("div",{key:"aeb05ff5cf9ffb11581ebbebbc79b7d4f2180d76",class:"input"},i("label",{key:"a120deeba33e465da4af63f557ec9804e5e3c4ef",htmlFor:"verdocs-otp-input"},"Code:"),i("input",{key:"3a54ac0a2d41bcf20c7fed828ae7d923e6eb3f2d",type:"text",id:"verdocs-otp-input",name:"verdocs-otp-input",placeholder:"Enter your one-time code...",value:this.response,onInput:t=>this.response=t.target.value})),i("div",{key:"30c9d9f6a9c0b0443246d44ac89e087616b6ebf8",class:"buttons"},i("verdocs-button",{key:"4082e2410098b2c33f56375d5bef50acfc8db188",label:"Cancel",variant:"outline",onClick:()=>this.handleCancel()}),i("verdocs-button",{key:"7d3fd049f06ba8101375d5acfe58feb74622dca3",label:"Resend",onClick:()=>this.handleResend(),disabled:this.resendDisabled}),i("verdocs-button",{key:"da8b815441904ce1e97d9a3c1cc18d91cf13f92d",label:"Submit",onClick:()=>this.handleSubmit(),disabled:!this.response})))))}};gt.style=pt;const vt='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-view{display:-ms-flexbox;display:flex;overflow:hidden;min-height:600px;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-view div,verdocs-view canvas{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-view .document{-ms-flex:1;flex:1;width:100%;height:100%;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;max-width:1200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-view .document .inner{width:100%;max-width:1028px}verdocs-view .loading-indicator{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.7)}#verdocs-view-header{width:100%;color:#fff;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;padding:0 20px;font-size:12px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}@media all and (max-width: 500px){#verdocs-view-header{padding:0 10px}}#verdocs-view-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 20px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}@media all and (max-width: 500px){#verdocs-view-header .inner{padding:0 10px}}#verdocs-view-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-view-header .title{font-size:18px;font-weight:500;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}';const xt=class{constructor(i){t(this,i);this.sdkError=e(this,"sdkError");this.envelopeUpdated=e(this,"envelopeUpdated");this.another=e(this,"another");this.view=e(this,"view");this.next=e(this,"next");this.envelopeListenerId=null;this.endpoint=null;this.envelopeId="";this.headerTargetId=null;this.canceling=false;this.showCancelDone=false;this.showLoadError=false;this.loading=true;this.envelope=null}async componentWillLoad(){var t,e,i;if(!this.endpoint){this.endpoint=u.getDefault();this.endpoint.loadSession()}if(!this.envelopeId){console.error(`[VIEW] Missing required envelopeId`);return}this.listenToEnvelope();if(!this.envelope){try{console.log("[VIEW] Loading envelope...");this.envelope=await h(this.endpoint,this.envelopeId);console.log("[VIEW] Loaded envelope",this.envelope)}catch(s){this.showLoadError=true;(t=this.sdkError)===null||t===void 0?void 0:t.emit(new g(s.message,(e=s.response)===null||e===void 0?void 0:e.status,(i=s.response)===null||i===void 0?void 0:i.data))}}}componentDidRender(){const t=this.headerTargetId?document.getElementById(this.headerTargetId):null;const e=document.getElementById("verdocs-view-header");if(t&&e){console.log("[VIEW] Moving header");e.remove();t.append(e)}}disconnectedCallback(){this.unlistenToEnvelope()}async listenToEnvelope(){console.log("[SIDEBAR] Loading envelope",this.envelopeId);this.unlistenToEnvelope();v.subscribe("envelopes",this.envelopeId,(()=>h(this.endpoint,this.envelopeId)),true,(t=>{this.envelope=t;this.loading=false}))}unlistenToEnvelope(){if(this.envelopeListenerId){v.store.delListener(this.envelopeListenerId);this.envelopeListenerId=null}}handlePageRendered(t){}async handleOptionSelected(t){var e,i;switch(t.detail.id){case"cancel":if(confirm("Are you sure you wish to cancel this envelope? This action cannot be undone.")){this.canceling=true;d(this.endpoint,this.envelopeId).then((t=>{this.canceling=false;console.log("[VIEW] Envelope canceled",t);return h(this.endpoint,this.envelopeId)})).then((t=>{console.log("[VIEW] Loaded new envelope details",t);this.envelope=t})).catch((t=>{var e,i,s;this.canceling=false;console.log("[VIEW] Error canceling envelope",t);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new g(t.message,(i=t.response)===null||i===void 0?void 0:i.status,(s=t.response)===null||s===void 0?void 0:s.data))}));this.showCancelDone=true;(e=this.envelopeUpdated)===null||e===void 0?void 0:e.emit({endpoint:this.endpoint,envelope:this.envelope,event:"canceled"})}break;case"print":window.print();(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});break;case"download-attachments":{const t=this.envelope.documents.find((t=>t.type==="attachment"));if(t){const e=await l(this.endpoint,this.envelopeId,t.id);window.open(e,"_blank")}}break;case"download-certificate":{const t=this.envelope.documents.find((t=>t.type==="certificate"));if(t){const e=await l(this.endpoint,this.envelopeId,t.id);window.open(e,"_blank")}}break;case"download-all":b(this.endpoint,[this.envelope]).then((()=>{var t;(t=this.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,envelope:this.envelope,event:"downloaded"})})).catch((t=>{console.log("Error downloading Zip",t)}));break}}render(){var t;if(this.loading){return i(r,null,i("verdocs-loader",null))}if(this.showLoadError){return i(r,null,i("verdocs-ok-dialog",{heading:"Unable to View Envelope",message:`Sorry, that envelope is not valid.`,buttonLabel:"OK",onNext:()=>{this.showLoadError=false}}))}if(!this.envelope){return i(r,null,i("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"}))}const e=[{id:"print",label:"Print"}];if(c(this.endpoint.profile,this.envelope)){e.push({id:"cancel",label:"Cancel"})}const n=this.envelope.documents.length>0;const o=this.envelope.documents.filter((t=>t.type==="attachment")).length;const a=this.envelope.documents.find((t=>t.type==="certificate"))!==undefined;if(n||a){e.push({label:""});if(n){e.push({id:"download-attachments",label:o>1?"Download Documents":"Download Document"})}if(a){e.push({id:"download-certificate",label:"Download Certificate"})}if(n&&a){e.push({id:"download-all",label:"Download All Files"})}}return i(r,null,i("div",{id:"verdocs-view-header"},i("div",{class:"inner"},i("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),i("div",{class:"title"},this.envelope.name),i("div",{style:{flex:"1"}}),i("div",{style:{marginLeft:"10px"}}),i("verdocs-dropdown",{options:e,onOptionSelected:t=>this.handleOptionSelected(t)}))),i("div",{class:"document",style:{paddingTop:this.headerTargetId?"70px":"15px"}},(((t=this.envelope)===null||t===void 0?void 0:t.documents)||[]).filter((t=>t.type!=="certificate")).map((t=>{const e=f(1,t.pages);return i(s,null,e.map((e=>{var s;const r=((s=t.page_sizes)===null||s===void 0?void 0:s[e])||{width:612,height:792};return i("verdocs-envelope-document-page",{envelopeId:this.envelopeId,documentId:t.id,endpoint:this.endpoint,type:"filled",virtualWidth:r.width,virtualHeight:r.height,pageNumber:e,onPageRendered:t=>this.handlePageRendered(t),layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))}))),this.showCancelDone&&i("verdocs-ok-dialog",{heading:"Cancelled",message:`This envelope has been cancelled successfully.`,onNext:()=>{this.showCancelDone=false}}),this.canceling&&i("div",{class:"loading-indicator"},i("verdocs-loader",null)))}get component(){return n(this)}};xt.style=vt;export{m as verdocs_delegate_dialog,w as verdocs_disclosure_dialog,ft as verdocs_kba_dialog,gt as verdocs_otp_dialog,xt as verdocs_view};
2
- //# sourceMappingURL=p-f05f021e.entry.js.map
1
+ import{r as t,c as e,h as i,F as s,H as r,g as n}from"./p-6vpKbd31.js";import{D as o}from"./p-C_Xku1v2.js";import{verifySigner as a,VerdocsEndpoint as u,getEnvelope as h,getDocumentDownloadLink as l,cancelEnvelope as d,userCanCancelEnvelope as c,integerSequence as f}from"@verdocs/js-sdk";import{V as p}from"./p-CyvDgtoV.js";import{s as b}from"./p-DvM2ECoi.js";import{S as g}from"./p-C1sRVZWv.js";import{S as v}from"./p-DmsV595e.js";import"./p-BFTU3MAI.js";import"./p-dzBXqXlK.js";import"./p-Dl7Xw8F0.js";const x='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-delegate-dialog{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;}verdocs-delegate-dialog div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-delegate-dialog .input{gap:10px;margin:5px 0;display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start;-ms-flex-direction:row;flex-direction:row}verdocs-delegate-dialog .input label{margin:8px 0 0 0;-ms-flex:0 0 100px;flex:0 0 100px;font-size:13px;font-weight:500;line-height:10px;white-space:nowrap}verdocs-delegate-dialog .input input{-ms-flex:1;flex:1;padding:5px 8px;border-radius:3px;-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #cccccc}verdocs-delegate-dialog .input textarea{-ms-flex:1;flex:1;padding:5px 8px;border-radius:3px;-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #cccccc;font-family:"Inter", "Barlow", sans-serif}verdocs-delegate-dialog .input.names input{width:80px}verdocs-delegate-dialog .field{gap:10px;margin:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;max-width:100%}verdocs-delegate-dialog .field .required{color:red;position:relative;top:-0.5em;font-size:80%}verdocs-delegate-dialog .field label{-ms-flex:0 0 120px;flex:0 0 120px;font-weight:500;line-height:10px;text-align:right;white-space:nowrap}verdocs-delegate-dialog .field verdocs-date-input{width:40%;-ms-flex-positive:1;flex-grow:1}verdocs-delegate-dialog .field verdocs-date-input input{width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-delegate-dialog .field input{width:40%;-ms-flex-positive:1;flex-grow:1;padding:5px 8px;border-radius:3px;border:1px solid #cccccc}verdocs-delegate-dialog .buttons{gap:20px;display:-ms-flexbox;display:flex;margin-top:14px;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-delegate-dialog .buttons button{-ms-flex:1;flex:1;border:0;height:38px;display:-ms-flexbox;display:flex;color:#ffffff;font-size:14px;cursor:pointer;-ms-flex-align:center;align-items:center;border-radius:6px;-ms-flex-pack:center;justify-content:center}verdocs-delegate-dialog .buttons button.cancel{background-color:#654dcb}verdocs-delegate-dialog .buttons button.proceed{background-color:#55bc81}verdocs-delegate-dialog .buttons button:disabled{background-color:#6c727f}';const m=class{constructor(i){t(this,i);this.exit=e(this,"exit");this.next=e(this,"next");this.endpoint=o;this.envelope=null;this.first_name="";this.last_name="";this.email="";this.phone="";this.message=""}handleCancel(){this.exit.emit()}handleDismiss(t){if(t.target.class==="background-overlay"){t.preventDefault();this.handleCancel()}}handleDelegate(){this.next.emit({first_name:this.first_name,last_name:this.last_name,email:this.email,phone:this.phone,message:this.message})}render(){return i("verdocs-dialog",{key:"c8b2b8b55b6f0aa0ce22b232ada78eb65d839e5d"},i("div",{key:"a232d72b90086b7dd21246567b4ab7db80ba9855",slot:"heading",class:"heading"},i("div",{key:"bade50c544129ed54a43d76c475f8dc378d46ffd",class:"icon"},i("svg",{key:"72299a219d60e292ce32f63d25b647d448f24add",width:"22",height:"19",viewBox:"0 0 22 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("g",{key:"f6b2269e403530b00d16c545e3681236ca335650","clip-path":"url(#clip0_34208_4881)"},i("path",{key:"4184d176c8fbe132a217b869ca5e742d38b5f3cd",d:"M3.125 0.75C1.88398 0.75 0.875 1.75898 0.875 3V16.5C0.875 17.741 1.88398 18.75 3.125 18.75H12.125C13.366 18.75 14.375 17.741 14.375 16.5V15.8215C14.2801 15.8602 14.1852 15.8918 14.0867 15.9164L11.9738 16.4437C11.8684 16.4684 11.7629 16.4859 11.6574 16.493C11.6258 16.4965 11.5941 16.5 11.5625 16.5H9.3125C9.09805 16.5 8.90469 16.3805 8.80977 16.1906L8.50039 15.5684C8.44062 15.4488 8.32109 15.375 8.19102 15.375C8.06094 15.375 7.93789 15.4488 7.88164 15.5684L7.57227 16.1906C7.47031 16.398 7.24883 16.5211 7.02031 16.5C6.7918 16.4789 6.59492 16.3207 6.53164 16.1027L5.9375 14.1445L5.59297 15.2977C5.37852 16.0113 4.72109 16.5 3.97578 16.5H3.6875C3.37812 16.5 3.125 16.2469 3.125 15.9375C3.125 15.6281 3.37812 15.375 3.6875 15.375H3.97578C4.22539 15.375 4.44336 15.2133 4.51367 14.9742L5.0375 13.234C5.15703 12.8367 5.52266 12.5625 5.9375 12.5625C6.35234 12.5625 6.71797 12.8367 6.8375 13.234L7.24531 14.591C7.50547 14.373 7.83594 14.25 8.1875 14.25C8.74648 14.25 9.25625 14.5664 9.50586 15.0656L9.66055 15.375H9.97344C9.86445 15.0656 9.84336 14.7281 9.92422 14.3977L10.4516 12.2848C10.55 11.8875 10.7539 11.5289 11.0422 11.2406L14.375 7.90781V6.375H9.875C9.25273 6.375 8.75 5.87227 8.75 5.25V0.75H3.125ZM9.875 0.75V5.25H14.375L9.875 0.75ZM20.2039 5.66133C19.6555 5.11289 18.766 5.11289 18.2141 5.66133L17.1805 6.69492L19.6766 9.19102L20.7102 8.15742C21.2586 7.60898 21.2586 6.71953 20.7102 6.16758L20.2039 5.66133ZM11.8402 12.0352C11.6961 12.1793 11.5941 12.3586 11.5449 12.559L11.0176 14.6719C10.9684 14.8652 11.0246 15.0656 11.1652 15.2063C11.3059 15.3469 11.5062 15.4031 11.6996 15.3539L13.8125 14.8266C14.0094 14.7773 14.1922 14.6754 14.3363 14.5312L18.8785 9.98555L16.3824 7.48945L11.8402 12.0352Z",fill:"white"})),i("defs",{key:"4aa388d7b0c799d426c7da94de93ab1be61ccbf0"},i("clipPath",{key:"0260929f251a0c3ad8bfc1f9e1bc9687cb3b60f6",id:"clip0_34208_4881"},i("path",{key:"64c42049336d37be15cb53adc91fe232955768d4",d:"M0.875 0.75H21.125V18.75H0.875V0.75Z",fill:"white"}))))),i("div",{key:"f9111aedb3a8e09a5898e560603592cdd972539b",class:"title"},'Delegate "',this.envelope.name,'"')),i("div",{key:"cee68483e20d610fa6f27f91bc31782717b89326",slot:"content",class:"content"},i("div",{key:"7316f1efd0cec724711236179efb949980e2fce1",class:"input names"},i("label",{key:"f26c2b853c322858a6376ee124f008adc807cc01",htmlFor:"verdocs-delegate-email"},"New Recipient:"),i("input",{key:"0c8e5895ff3bedb18112a29952402b4b0b6594c3",type:"text",id:"verdocs-delegate-first",name:"verdocs-delegate-first",autocomplete:"blocked",placeholder:"First name...",value:this.first_name,onInput:t=>this.first_name=t.target.value}),i("input",{key:"1c103e348495c708313f0d5d8718f0b16bfe51a8",type:"text",id:"verdocs-delegate-last",name:"verdocs-delegate-last",autocomplete:"blocked",placeholder:"Last name...",value:this.last_name,onInput:t=>this.last_name=t.target.value})),i("div",{key:"2d1371968cc1e39566f5442b8f1d1d7cad99bd16",class:"input"},i("label",{key:"4288dba409f55402f2dde44697cf4e5282b812b8",htmlFor:"verdocs-delegate-email"},"Email Address:"),i("input",{key:"db7e71075d6024a8207cd0fbcb9bd1461a526378",type:"text",id:"verdocs-delegate-email",name:"verdocs-delegate-email",autocomplete:"blocked",placeholder:"New recipient email address...",value:this.email,onInput:t=>this.email=t.target.value})),i("div",{key:"ec28591dc85cc862779023cb2987a71c5c13c66e",class:"input"},i("label",{key:"7b17786a3511eaeaf4c45997a632f2533071d6f9",htmlFor:"verdocs-delegate-phone"},"Phone:"),i("input",{key:"0a3ba95551a66756c77f4ccd9c5269aaa20f5d6f",type:"text",id:"verdocs-delegate-phone",name:"verdocs-delegate-phone",autocomplete:"blocked",placeholder:"Optional phone number...",value:this.phone,onInput:t=>this.phone=t.target.value})),i("div",{key:"2e94fd83e0d58ba0ad37f97be2e09971ad8a80c4",class:"input"},i("label",{key:"ec0c5fb1d5c3e4985ee57bbb7d1722aa55b7a2b3",htmlFor:"verdocs-delegate-email"},"Message:"),i("textarea",{key:"9962c1d2dc7f61fea639204766bd0eb0b030c90b",id:"verdocs-delegate-message",name:"verdocs-delegate-message",rows:3,autocomplete:"blocked",placeholder:"Optional message to include in the invitation...",onInput:t=>this.message=t.target.value},this.message))),i("div",{key:"67062f5d1ecca5fd8206149067351a93d717282f",class:"footer",slot:"footer"},i("div",{key:"c05f381f9be5a54ad71e98233999aa69fbf57d61",class:"buttons"},i("button",{key:"cc64ad9c6d68f4136227aa8e18a65aadb4f788a8",class:"cancel",onClick:()=>this.handleCancel()},"Cancel"),i("button",{key:"41750cc0bd2e3234053ca015c59febaee914d5c3",class:"proceed",onClick:()=>this.handleDelegate(),disabled:!this.first_name||!this.last_name||!this.email},"Proceed"))))}};m.style=x;const k="@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-disclosure-dialog{}verdocs-disclosure-dialog .footer .accept{margin:0 0 28px 28px}verdocs-disclosure-dialog a{color:#4c56cb}verdocs-disclosure-dialog verdocs-checkbox{font-size:14px;line-height:20px}verdocs-disclosure-dialog verdocs-checkbox label>input[type=checkbox]+*::before{width:16px;height:16px;line-height:16px;margin-left:-28px;vertical-align:middle}verdocs-disclosure-dialog .buttons{gap:20px;display:-ms-flexbox;display:flex;margin-top:14px;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-disclosure-dialog .buttons button{-ms-flex:1;flex:1;border:0;height:38px;display:-ms-flexbox;display:flex;color:#ffffff;font-size:14px;cursor:pointer;-ms-flex-align:center;align-items:center;border-radius:6px;-ms-flex-pack:center;justify-content:center}verdocs-disclosure-dialog .buttons button.decline{background-color:#654dcb}verdocs-disclosure-dialog .buttons button.delegate{background-color:#55bc81}verdocs-disclosure-dialog .buttons button.proceed{background-color:#55bc81}verdocs-disclosure-dialog .buttons button:disabled{background-color:#6c727f}";const w=class{constructor(i){t(this,i);this.decline=e(this,"decline");this.delegate=e(this,"delegate");this.accept=e(this,"accept");this.disclosures=null;this.delegator=false;this.accepted=false}render(){return i("verdocs-dialog",{key:"c4cc7a16c4293cf80429231086ae63cc69884f17"},i("div",{key:"edf08816777ef7e9a97cfbcbb088b637213508a3",slot:"heading",class:"heading"},i("div",{key:"27ecefd189609ec0ea6e05c7560792620b1af357",class:"icon"},i("svg",{key:"040d5c7490bf25e6aa46c0ce695bb4cf83efc52a",width:"22",height:"19",viewBox:"0 0 22 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("g",{key:"7869413e61c79e166c80e442e03f8214af64760f","clip-path":"url(#clip0_34208_4881)"},i("path",{key:"063960d72cbaccbc974687e6409c984a0d817f77",d:"M3.125 0.75C1.88398 0.75 0.875 1.75898 0.875 3V16.5C0.875 17.741 1.88398 18.75 3.125 18.75H12.125C13.366 18.75 14.375 17.741 14.375 16.5V15.8215C14.2801 15.8602 14.1852 15.8918 14.0867 15.9164L11.9738 16.4437C11.8684 16.4684 11.7629 16.4859 11.6574 16.493C11.6258 16.4965 11.5941 16.5 11.5625 16.5H9.3125C9.09805 16.5 8.90469 16.3805 8.80977 16.1906L8.50039 15.5684C8.44062 15.4488 8.32109 15.375 8.19102 15.375C8.06094 15.375 7.93789 15.4488 7.88164 15.5684L7.57227 16.1906C7.47031 16.398 7.24883 16.5211 7.02031 16.5C6.7918 16.4789 6.59492 16.3207 6.53164 16.1027L5.9375 14.1445L5.59297 15.2977C5.37852 16.0113 4.72109 16.5 3.97578 16.5H3.6875C3.37812 16.5 3.125 16.2469 3.125 15.9375C3.125 15.6281 3.37812 15.375 3.6875 15.375H3.97578C4.22539 15.375 4.44336 15.2133 4.51367 14.9742L5.0375 13.234C5.15703 12.8367 5.52266 12.5625 5.9375 12.5625C6.35234 12.5625 6.71797 12.8367 6.8375 13.234L7.24531 14.591C7.50547 14.373 7.83594 14.25 8.1875 14.25C8.74648 14.25 9.25625 14.5664 9.50586 15.0656L9.66055 15.375H9.97344C9.86445 15.0656 9.84336 14.7281 9.92422 14.3977L10.4516 12.2848C10.55 11.8875 10.7539 11.5289 11.0422 11.2406L14.375 7.90781V6.375H9.875C9.25273 6.375 8.75 5.87227 8.75 5.25V0.75H3.125ZM9.875 0.75V5.25H14.375L9.875 0.75ZM20.2039 5.66133C19.6555 5.11289 18.766 5.11289 18.2141 5.66133L17.1805 6.69492L19.6766 9.19102L20.7102 8.15742C21.2586 7.60898 21.2586 6.71953 20.7102 6.16758L20.2039 5.66133ZM11.8402 12.0352C11.6961 12.1793 11.5941 12.3586 11.5449 12.559L11.0176 14.6719C10.9684 14.8652 11.0246 15.0656 11.1652 15.2063C11.3059 15.3469 11.5062 15.4031 11.6996 15.3539L13.8125 14.8266C14.0094 14.7773 14.1922 14.6754 14.3363 14.5312L18.8785 9.98555L16.3824 7.48945L11.8402 12.0352Z",fill:"white"})),i("defs",{key:"f0e56dc0f1b0cb6b9f9c5b4974173be204736506"},i("clipPath",{key:"a43f3c6956cca9a70b1f9bce60623eab9dc903ed",id:"clip0_34208_4881"},i("path",{key:"ee474432664d47540a6960723643ecf37a076366",d:"M0.875 0.75H21.125V18.75H0.875V0.75Z",fill:"white"}))))),i("div",{key:"4496d3e2c91796e2687912b9c65d1d886081df75",class:"title"},"e-Signature Disclosures")),i("div",{key:"250ea6d11bf3e286ef58f0b5a02a26bb48b952db",slot:"content",class:"content",innerHTML:this.disclosures}),i("div",{key:"1f7d6812c05dda23c952a06cac30e9aaeb830219",class:"footer",slot:"footer"},i("div",{key:"ee1e7bbab76c4269b214700272bc7acc73d4081b",class:"accept"},i("verdocs-checkbox",{key:"02e0e888aad7eee1a2b270381d28f2dc95ef0da0",label:"I accept the electronic signature disclosures and agree to proceed with digital signing.",checked:this.accepted,onInput:()=>this.accepted=!this.accepted})),this.delegator?i(s,null,i("div",{class:"buttons"},i("button",{class:"proceed",onClick:()=>this.accept.emit(),disabled:!this.accepted},"Proceed")),i("div",{class:"buttons"},i("button",{class:"decline",onClick:()=>this.decline.emit()},"Decline"),i("button",{class:"delegate",onClick:()=>this.delegate.emit()},"Delegate"))):i(s,null,i("div",{class:"buttons"},i("button",{class:"decline",onClick:()=>this.decline.emit()},"Decline"),i("button",{class:"proceed",onClick:()=>this.accept.emit(),disabled:!this.accepted},"Proceed")))))}};w.style=k;function C(t){return typeof t==="string"||t instanceof String}function A(t){var e;return typeof t==="object"&&t!=null&&(t==null||(e=t.constructor)==null?void 0:e.name)==="Object"}function y(t,e){if(Array.isArray(e))return y(t,((t,i)=>e.includes(i)));return Object.entries(t).reduce(((t,i)=>{let[s,r]=i;if(e(r,s))t[s]=r;return t}),{})}const F={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function D(t){switch(t){case F.LEFT:return F.FORCE_LEFT;case F.RIGHT:return F.FORCE_RIGHT;default:return t}}function B(t){return t.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function E(t,e){if(e===t)return true;const i=Array.isArray(e),s=Array.isArray(t);let r;if(i&&s){if(e.length!=t.length)return false;for(r=0;r<e.length;r++)if(!E(e[r],t[r]))return false;return true}if(i!=s)return false;if(e&&t&&typeof e==="object"&&typeof t==="object"){const i=e instanceof Date,s=t instanceof Date;if(i&&s)return e.getTime()==t.getTime();if(i!=s)return false;const n=e instanceof RegExp,o=t instanceof RegExp;if(n&&o)return e.toString()==t.toString();if(n!=o)return false;const a=Object.keys(e);for(r=0;r<a.length;r++)if(!Object.prototype.hasOwnProperty.call(t,a[r]))return false;for(r=0;r<a.length;r++)if(!E(t[a[r]],e[a[r]]))return false;return true}else if(e&&t&&typeof e==="function"&&typeof t==="function"){return e.toString()===t.toString()}return false}class _{constructor(t){Object.assign(this,t);while(this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos)){--this.oldSelection.start}if(this.insertedCount){while(this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end)){if(this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end)++this.oldSelection.end;else++this.cursorPos}}}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){if(!this.removedCount||this.insertedCount)return F.NONE;return(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?F.RIGHT:F.LEFT}}function I(t,e){return new I.InputMask(t,e)}function V(t){if(t==null)throw new Error("mask property should be defined");if(t instanceof RegExp)return I.MaskedRegExp;if(C(t))return I.MaskedPattern;if(t===Date)return I.MaskedDate;if(t===Number)return I.MaskedNumber;if(Array.isArray(t)||t===Array)return I.MaskedDynamic;if(I.Masked&&t.prototype instanceof I.Masked)return t;if(I.Masked&&t instanceof I.Masked)return t.constructor;if(t instanceof Function)return I.MaskedFunction;console.warn("Mask not found for mask",t);return I.Masked}function S(t){if(!t)throw new Error("Options in not defined");if(I.Masked){if(t.prototype instanceof I.Masked)return{mask:t};const{mask:e=undefined,...i}=t instanceof I.Masked?{mask:t}:A(t)&&t.mask instanceof I.Masked?t:{};if(e){const t=e.mask;return{...y(e,((t,e)=>!e.startsWith("_"))),mask:e.constructor,_mask:t,...i}}}if(!A(t))return{mask:t};return{...t}}function M(t){if(I.Masked&&t instanceof I.Masked)return t;const e=S(t);const i=V(e.mask);if(!i)throw new Error("Masked class is not found for provided mask "+e.mask+", appropriate module needs to be imported manually before creating mask.");if(e.mask===i)delete e.mask;if(e._mask){e.mask=e._mask;delete e._mask}return new i(e)}I.createMask=M;class L{get selectionStart(){let t;try{t=this._unsafeSelectionStart}catch{}return t!=null?t:this.value.length}get selectionEnd(){let t;try{t=this._unsafeSelectionEnd}catch{}return t!=null?t:this.value.length}select(t,e){if(t==null||e==null||t===this.selectionStart&&e===this.selectionEnd)return;try{this._unsafeSelect(t,e)}catch{}}get isActive(){return false}}I.MaskElement=L;const z=90;const T=89;class R extends L{constructor(t){super();this.input=t;this._onKeydown=this._onKeydown.bind(this);this._onInput=this._onInput.bind(this);this._onBeforeinput=this._onBeforeinput.bind(this);this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var t,e,i;return(t=(e=(i=this.input).getRootNode)==null?void 0:e.call(i))!=null?t:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(t){this.input.addEventListener("keydown",this._onKeydown);this.input.addEventListener("input",this._onInput);this.input.addEventListener("beforeinput",this._onBeforeinput);this.input.addEventListener("compositionend",this._onCompositionEnd);this.input.addEventListener("drop",t.drop);this.input.addEventListener("click",t.click);this.input.addEventListener("focus",t.focus);this.input.addEventListener("blur",t.commit);this._handlers=t}_onKeydown(t){if(this._handlers.redo&&(t.keyCode===z&&t.shiftKey&&(t.metaKey||t.ctrlKey)||t.keyCode===T&&t.ctrlKey)){t.preventDefault();return this._handlers.redo(t)}if(this._handlers.undo&&t.keyCode===z&&(t.metaKey||t.ctrlKey)){t.preventDefault();return this._handlers.undo(t)}if(!t.isComposing)this._handlers.selectionChange(t)}_onBeforeinput(t){if(t.inputType==="historyUndo"&&this._handlers.undo){t.preventDefault();return this._handlers.undo(t)}if(t.inputType==="historyRedo"&&this._handlers.redo){t.preventDefault();return this._handlers.redo(t)}}_onCompositionEnd(t){this._handlers.input(t)}_onInput(t){if(!t.isComposing)this._handlers.input(t)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown);this.input.removeEventListener("input",this._onInput);this.input.removeEventListener("beforeinput",this._onBeforeinput);this.input.removeEventListener("compositionend",this._onCompositionEnd);this.input.removeEventListener("drop",this._handlers.drop);this.input.removeEventListener("click",this._handlers.click);this.input.removeEventListener("focus",this._handlers.focus);this.input.removeEventListener("blur",this._handlers.commit);this._handlers={}}}I.HTMLMaskElement=R;class O extends R{constructor(t){super(t);this.input=t}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(t,e){this.input.setSelectionRange(t,e)}get value(){return this.input.value}set value(t){this.input.value=t}}I.HTMLMaskElement=R;class P extends R{get _unsafeSelectionStart(){const t=this.rootElement;const e=t.getSelection&&t.getSelection();const i=e&&e.anchorOffset;const s=e&&e.focusOffset;if(s==null||i==null||i<s){return i}return s}get _unsafeSelectionEnd(){const t=this.rootElement;const e=t.getSelection&&t.getSelection();const i=e&&e.anchorOffset;const s=e&&e.focusOffset;if(s==null||i==null||i>s){return i}return s}_unsafeSelect(t,e){if(!this.rootElement.createRange)return;const i=this.rootElement.createRange();i.setStart(this.input.firstChild||this.input,t);i.setEnd(this.input.lastChild||this.input,e);const s=this.rootElement;const r=s.getSelection&&s.getSelection();if(r){r.removeAllRanges();r.addRange(i)}}get value(){return this.input.textContent||""}set value(t){this.input.textContent=t}}I.HTMLContenteditableMaskElement=P;class N{constructor(){this.states=[];this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return this.states.length===0}push(t){if(this.currentIndex<this.states.length-1)this.states.length=this.currentIndex+1;this.states.push(t);if(this.states.length>N.MAX_LENGTH)this.states.shift();this.currentIndex=this.states.length-1}go(t){this.currentIndex=Math.min(Math.max(this.currentIndex+t,0),this.states.length-1);return this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0;this.currentIndex=0}}N.MAX_LENGTH=100;class j{constructor(t,e){this.el=t instanceof L?t:t.isContentEditable&&t.tagName!=="INPUT"&&t.tagName!=="TEXTAREA"?new P(t):new O(t);this.masked=M(e);this._listeners={};this._value="";this._unmaskedValue="";this._rawInputValue="";this.history=new N;this._saveSelection=this._saveSelection.bind(this);this._onInput=this._onInput.bind(this);this._onChange=this._onChange.bind(this);this._onDrop=this._onDrop.bind(this);this._onFocus=this._onFocus.bind(this);this._onClick=this._onClick.bind(this);this._onUndo=this._onUndo.bind(this);this._onRedo=this._onRedo.bind(this);this.alignCursor=this.alignCursor.bind(this);this.alignCursorFriendly=this.alignCursorFriendly.bind(this);this._bindEvents();this.updateValue();this._onChange()}maskEquals(t){var e;return t==null||((e=this.masked)==null?void 0:e.maskEquals(t))}get mask(){return this.masked.mask}set mask(t){if(this.maskEquals(t))return;if(!(t instanceof I.Masked)&&this.masked.constructor===V(t)){this.masked.updateOptions({mask:t});return}const e=t instanceof I.Masked?t:M({mask:t});e.unmaskedValue=this.masked.unmaskedValue;this.masked=e}get value(){return this._value}set value(t){if(this.value===t)return;this.masked.value=t;this.updateControl("auto")}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(t){if(this.unmaskedValue===t)return;this.masked.unmaskedValue=t;this.updateControl("auto")}get rawInputValue(){return this._rawInputValue}set rawInputValue(t){if(this.rawInputValue===t)return;this.masked.rawInputValue=t;this.updateControl();this.alignCursor()}get typedValue(){return this.masked.typedValue}set typedValue(t){if(this.masked.typedValueEquals(t))return;this.masked.typedValue=t;this.updateControl("auto")}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){if(this.el)this.el.unbindEvents()}_fireEvent(t,e){const i=this._listeners[t];if(!i)return;i.forEach((t=>t(e)))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(t){if(!this.el||!this.el.isActive)return;this.el.select(t,t);this._saveSelection()}_saveSelection(){if(this.displayValue!==this.el.value){console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly.")}this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value;this._value=this.masked.value;this._unmaskedValue=this.masked.unmaskedValue;this._rawInputValue=this.masked.rawInputValue}updateControl(t){const e=this.masked.unmaskedValue;const i=this.masked.value;const s=this.masked.rawInputValue;const r=this.displayValue;const n=this.unmaskedValue!==e||this.value!==i||this._rawInputValue!==s;this._unmaskedValue=e;this._value=i;this._rawInputValue=s;if(this.el.value!==r)this.el.value=r;if(t==="auto")this.alignCursor();else if(t!=null)this.cursorPos=t;if(n)this._fireChangeEvents();if(!this._historyChanging&&(n||this.history.isEmpty))this.history.push({unmaskedValue:e,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(t){const{mask:e,...i}=t;const s=!this.maskEquals(e);const r=this.masked.optionsIsChanged(i);if(s)this.mask=e;if(r)this.masked.updateOptions(i);if(s||r)this.updateControl()}updateCursor(t){if(t==null)return;this.cursorPos=t;this._delayUpdateCursor(t)}_delayUpdateCursor(t){this._abortUpdateCursor();this._changingCursorPos=t;this._cursorChanging=setTimeout((()=>{if(!this.el)return;this.cursorPos=this._changingCursorPos;this._abortUpdateCursor()}),10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent);if(this.masked.isComplete)this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){if(this._cursorChanging){clearTimeout(this._cursorChanging);delete this._cursorChanging}}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,F.LEFT))}alignCursorFriendly(){if(this.selectionStart!==this.cursorPos)return;this.alignCursor()}on(t,e){if(!this._listeners[t])this._listeners[t]=[];this._listeners[t].push(e);return this}off(t,e){if(!this._listeners[t])return this;if(!e){delete this._listeners[t];return this}const i=this._listeners[t].indexOf(e);if(i>=0)this._listeners[t].splice(i,1);return this}_onInput(t){this._inputEvent=t;this._abortUpdateCursor();const e=new _({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection});const i=this.masked.rawInputValue;const s=this.masked.splice(e.startChangePos,e.removed.length,e.inserted,e.removeDirection,{input:true,raw:true}).offset;const r=i===this.masked.rawInputValue?e.removeDirection:F.NONE;let n=this.masked.nearestInputPos(e.startChangePos+s,r);if(r!==F.NONE)n=this.masked.nearestInputPos(n,F.NONE);this.updateControl(n);delete this._inputEvent}_onChange(){if(this.displayValue!==this.el.value)this.updateValue();this.masked.doCommit();this.updateControl();this._saveSelection()}_onDrop(t){t.preventDefault();t.stopPropagation()}_onFocus(t){this.alignCursorFriendly()}_onClick(t){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(t){if(!t)return;this._historyChanging=true;this.unmaskedValue=t.unmaskedValue;this.el.select(t.selection.start,t.selection.end);this._saveSelection();this._historyChanging=false}destroy(){this._unbindEvents();this._listeners.length=0;delete this.el}}I.InputMask=j;class H{static normalize(t){return Array.isArray(t)?t:[t,new H]}constructor(t){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:false},t)}aggregate(t){this.inserted+=t.inserted;this.rawInserted+=t.rawInserted;this.tailShift+=t.tailShift;this.skip=this.skip||t.skip;return this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return Boolean(this.rawInserted)||this.skip}equals(t){return this.inserted===t.inserted&&this.tailShift===t.tailShift&&this.rawInserted===t.rawInserted&&this.skip===t.skip}}I.ChangeDetails=H;class Z{constructor(t,e,i){if(t===void 0){t=""}if(e===void 0){e=0}this.value=t;this.from=e;this.stop=i}toString(){return this.value}extend(t){this.value+=String(t)}appendTo(t){return t.append(this.toString(),{tail:true}).aggregate(t._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(t){Object.assign(this,t)}unshift(t){if(!this.value.length||t!=null&&this.from>=t)return"";const e=this.value[0];this.value=this.value.slice(1);return e}shift(){if(!this.value.length)return"";const t=this.value[this.value.length-1];this.value=this.value.slice(0,-1);return t}}class q{constructor(t){this._value="";this._update({...q.DEFAULTS,...t});this._initialized=true}updateOptions(t){if(!this.optionsIsChanged(t))return;this.withValueRefresh(this._update.bind(this,t))}_update(t){Object.assign(this,t)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value}reset(){this._value=""}get value(){return this._value}set value(t){this.resolve(t,{input:true})}resolve(t,e){if(e===void 0){e={input:true}}this.reset();this.append(t,e,"");this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(t){this.resolve(t,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(t){if(this.format){this.value=this.format(t,this)}else{this.unmaskedValue=String(t)}}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:true})}set rawInputValue(t){this.resolve(t,{raw:true})}get displayValue(){return this.value}get isComplete(){return true}get isFilled(){return this.isComplete}nearestInputPos(t,e){return t}totalInputPositions(t,e){if(t===void 0){t=0}if(e===void 0){e=this.displayValue.length}return Math.min(this.displayValue.length,e-t)}extractInput(t,e,i){if(t===void 0){t=0}if(e===void 0){e=this.displayValue.length}return this.displayValue.slice(t,e)}extractTail(t,e){if(t===void 0){t=0}if(e===void 0){e=this.displayValue.length}return new Z(this.extractInput(t,e),t)}appendTail(t){if(C(t))t=new Z(String(t));return t.appendTo(this)}_appendCharRaw(t,e){if(!t)return new H;this._value+=t;return new H({inserted:t,rawInserted:t})}_appendChar(t,e,i){if(e===void 0){e={}}const s=this.state;let r;[t,r]=this.doPrepareChar(t,e);if(t){r=r.aggregate(this._appendCharRaw(t,e));if(!r.rawInserted&&this.autofix==="pad"){const i=this.state;this.state=s;let n=this.pad(e);const o=this._appendCharRaw(t,e);n=n.aggregate(o);if(o.rawInserted||n.equals(r)){r=n}else{this.state=i}}}if(r.inserted){let t;let n=this.doValidate(e)!==false;if(n&&i!=null){const e=this.state;if(this.overwrite===true){t=i.state;for(let t=0;t<r.rawInserted.length;++t){i.unshift(this.displayValue.length-r.tailShift)}}let s=this.appendTail(i);n=s.rawInserted.length===i.toString().length;if(!(n&&s.inserted)&&this.overwrite==="shift"){this.state=e;t=i.state;for(let t=0;t<r.rawInserted.length;++t){i.shift()}s=this.appendTail(i);n=s.rawInserted.length===i.toString().length}if(n&&s.inserted)this.state=e}if(!n){r=new H;this.state=s;if(i&&t)i.state=t}}return r}_appendPlaceholder(){return new H}_appendEager(){return new H}append(t,e,i){if(!C(t))throw new Error("value should be string");const s=C(i)?new Z(String(i)):i;if(e!=null&&e.tail)e._beforeTailState=this.state;let r;[t,r]=this.doPrepare(t,e);for(let i=0;i<t.length;++i){const n=this._appendChar(t[i],e,s);if(!n.rawInserted&&!this.doSkipInvalid(t[i],e,s))break;r.aggregate(n)}if((this.eager===true||this.eager==="append")&&e!=null&&e.input&&t){r.aggregate(this._appendEager())}if(s!=null){r.tailShift+=this.appendTail(s).tailShift}return r}remove(t,e){if(t===void 0){t=0}if(e===void 0){e=this.displayValue.length}this._value=this.displayValue.slice(0,t)+this.displayValue.slice(e);return new H}withValueRefresh(t){if(this._refreshing||!this._initialized)return t();this._refreshing=true;const e=this.rawInputValue;const i=this.value;const s=t();this.rawInputValue=e;if(this.value&&this.value!==i&&i.indexOf(this.value)===0){this.append(i.slice(this.displayValue.length),{},"");this.doCommit()}delete this._refreshing;return s}runIsolated(t){if(this._isolated||!this._initialized)return t(this);this._isolated=true;const e=this.state;const i=t(this);this.state=e;delete this._isolated;return i}doSkipInvalid(t,e,i){return Boolean(this.skipInvalid)}doPrepare(t,e){if(e===void 0){e={}}return H.normalize(this.prepare?this.prepare(t,this,e):t)}doPrepareChar(t,e){if(e===void 0){e={}}return H.normalize(this.prepareChar?this.prepareChar(t,this,e):t)}doValidate(t){return(!this.validate||this.validate(this.value,this,t))&&(!this.parent||this.parent.doValidate(t))}doCommit(){if(this.commit)this.commit(this.value,this)}splice(t,e,i,s,r){if(i===void 0){i=""}if(s===void 0){s=F.NONE}if(r===void 0){r={input:true}}const n=t+e;const o=this.extractTail(n);const a=this.eager===true||this.eager==="remove";let u;if(a){s=D(s);u=this.extractInput(0,n,{raw:true})}let h=t;const l=new H;if(s!==F.NONE){h=this.nearestInputPos(t,e>1&&t!==0&&!a?F.NONE:s);l.tailShift=h-t}l.aggregate(this.remove(h));if(a&&s!==F.NONE&&u===this.rawInputValue){if(s===F.FORCE_LEFT){let t;while(u===this.rawInputValue&&(t=this.displayValue.length)){l.aggregate(new H({tailShift:-1})).aggregate(this.remove(t-1))}}else if(s===F.FORCE_RIGHT){o.unshift()}}return l.aggregate(this.append(i,r,o))}maskEquals(t){return this.mask===t}optionsIsChanged(t){return!E(this,t)}typedValueEquals(t){const e=this.typedValue;return t===e||q.EMPTY_VALUES.includes(t)&&q.EMPTY_VALUES.includes(e)||(this.format?this.format(t,this)===this.format(this.typedValue,this):false)}pad(t){return new H}}q.DEFAULTS={skipInvalid:true};q.EMPTY_VALUES=[undefined,null,""];I.Masked=q;class W{constructor(t,e){if(t===void 0){t=[]}if(e===void 0){e=0}this.chunks=t;this.from=e}toString(){return this.chunks.map(String).join("")}extend(t){if(!String(t))return;t=C(t)?new Z(String(t)):t;const e=this.chunks[this.chunks.length-1];const i=e&&(e.stop===t.stop||t.stop==null)&&t.from===e.from+e.toString().length;if(t instanceof Z){if(i){e.extend(t.toString())}else{this.chunks.push(t)}}else if(t instanceof W){if(t.stop==null){let e;while(t.chunks.length&&t.chunks[0].stop==null){e=t.chunks.shift();e.from+=t.from;this.extend(e)}}if(t.toString()){t.stop=t.blockIndex;this.chunks.push(t)}}}appendTo(t){if(!(t instanceof I.MaskedPattern)){const e=new Z(this.toString());return e.appendTo(t)}const e=new H;for(let i=0;i<this.chunks.length;++i){const s=this.chunks[i];const r=t._mapPosToBlock(t.displayValue.length);const n=s.stop;let o;if(n!=null&&(!r||r.index<=n)){if(s instanceof W||t._stops.indexOf(n)>=0){e.aggregate(t._appendPlaceholder(n))}o=s instanceof W&&t._blocks[n]}if(o){const i=o.appendTail(s);e.aggregate(i);const r=s.toString().slice(i.rawInserted.length);if(r)e.aggregate(t.append(r,{tail:true}))}else{e.aggregate(t.append(s.toString(),{tail:true}))}}return e}get state(){return{chunks:this.chunks.map((t=>t.state)),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(t){const{chunks:e,...i}=t;Object.assign(this,i);this.chunks=e.map((t=>{const e="chunks"in t?new W:new Z;e.state=t;return e}))}unshift(t){if(!this.chunks.length||t!=null&&this.from>=t)return"";const e=t!=null?t-this.from:t;let i=0;while(i<this.chunks.length){const t=this.chunks[i];const s=t.unshift(e);if(t.toString()){if(!s)break;++i}else{this.chunks.splice(i,1)}if(s)return s}return""}shift(){if(!this.chunks.length)return"";let t=this.chunks.length-1;while(0<=t){const e=this.chunks[t];const i=e.shift();if(e.toString()){if(!i)break;--t}else{this.chunks.splice(t,1)}if(i)return i}return""}}class U{constructor(t,e){this.masked=t;this._log=[];const{offset:i,index:s}=t._mapPosToBlock(e)||(e<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=i;this.index=s;this.ok=false}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(t){Object.assign(this,t)}pushState(){this._log.push(this.state)}popState(){const t=this._log.pop();if(t)this.state=t;return t}bindBlock(){if(this.block)return;if(this.index<0){this.index=0;this.offset=0}if(this.index>=this.masked._blocks.length){this.index=this.masked._blocks.length-1;this.offset=this.block.displayValue.length}}_pushLeft(t){this.pushState();for(this.bindBlock();0<=this.index;--this.index,this.offset=((e=this.block)==null?void 0:e.displayValue.length)||0){var e;if(t())return this.ok=true}return this.ok=false}_pushRight(t){this.pushState();for(this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0){if(t())return this.ok=true}return this.ok=false}pushLeftBeforeFilled(){return this._pushLeft((()=>{if(this.block.isFixed||!this.block.value)return;this.offset=this.block.nearestInputPos(this.offset,F.FORCE_LEFT);if(this.offset!==0)return true}))}pushLeftBeforeInput(){return this._pushLeft((()=>{if(this.block.isFixed)return;this.offset=this.block.nearestInputPos(this.offset,F.LEFT);return true}))}pushLeftBeforeRequired(){return this._pushLeft((()=>{if(this.block.isFixed||this.block.isOptional&&!this.block.value)return;this.offset=this.block.nearestInputPos(this.offset,F.LEFT);return true}))}pushRightBeforeFilled(){return this._pushRight((()=>{if(this.block.isFixed||!this.block.value)return;this.offset=this.block.nearestInputPos(this.offset,F.FORCE_RIGHT);if(this.offset!==this.block.value.length)return true}))}pushRightBeforeInput(){return this._pushRight((()=>{if(this.block.isFixed)return;this.offset=this.block.nearestInputPos(this.offset,F.NONE);return true}))}pushRightBeforeRequired(){return this._pushRight((()=>{if(this.block.isFixed||this.block.isOptional&&!this.block.value)return;this.offset=this.block.nearestInputPos(this.offset,F.NONE);return true}))}}class Y{constructor(t){Object.assign(this,t);this._value="";this.isFixed=true}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=false;this._value=""}remove(t,e){if(t===void 0){t=0}if(e===void 0){e=this._value.length}this._value=this._value.slice(0,t)+this._value.slice(e);if(!this._value)this._isRawInput=false;return new H}nearestInputPos(t,e){if(e===void 0){e=F.NONE}const i=0;const s=this._value.length;switch(e){case F.LEFT:case F.FORCE_LEFT:return i;case F.NONE:case F.RIGHT:case F.FORCE_RIGHT:default:return s}}totalInputPositions(t,e){if(t===void 0){t=0}if(e===void 0){e=this._value.length}return this._isRawInput?e-t:0}extractInput(t,e,i){if(t===void 0){t=0}if(e===void 0){e=this._value.length}if(i===void 0){i={}}return i.raw&&this._isRawInput&&this._value.slice(t,e)||""}get isComplete(){return true}get isFilled(){return Boolean(this._value)}_appendChar(t,e){if(e===void 0){e={}}if(this.isFilled)return new H;const i=this.eager===true||this.eager==="append";const s=this.char===t;const r=s&&(this.isUnmasking||e.input||e.raw)&&(!e.raw||!i)&&!e.tail;const n=new H({inserted:this.char,rawInserted:r?this.char:""});this._value=this.char;this._isRawInput=r&&(e.raw||e.input);return n}_appendEager(){return this._appendChar(this.char,{tail:true})}_appendPlaceholder(){const t=new H;if(this.isFilled)return t;this._value=t.inserted=this.char;return t}extractTail(){return new Z("")}appendTail(t){if(C(t))t=new Z(String(t));return t.appendTo(this)}append(t,e,i){const s=this._appendChar(t[0],e);if(i!=null){s.tailShift+=this.appendTail(i).tailShift}return s}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value;this._isRawInput=Boolean(t._rawInputValue)}pad(t){return this._appendPlaceholder()}}class K{constructor(t){const{parent:e,isOptional:i,placeholderChar:s,displayChar:r,lazy:n,eager:o,...a}=t;this.masked=M(a);Object.assign(this,{parent:e,isOptional:i,placeholderChar:s,displayChar:r,lazy:n,eager:o})}reset(){this.isFilled=false;this.masked.reset()}remove(t,e){if(t===void 0){t=0}if(e===void 0){e=this.value.length}if(t===0&&e>=1){this.isFilled=false;return this.masked.remove(t,e)}return new H}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return Boolean(this.masked.value)||this.isOptional}_appendChar(t,e){if(e===void 0){e={}}if(this.isFilled)return new H;const i=this.masked.state;let s=this.masked._appendChar(t,this.currentMaskFlags(e));if(s.inserted&&this.doValidate(e)===false){s=new H;this.masked.state=i}if(!s.inserted&&!this.isOptional&&!this.lazy&&!e.input){s.inserted=this.placeholderChar}s.skip=!s.inserted&&!this.isOptional;this.isFilled=Boolean(s.inserted);return s}append(t,e,i){return this.masked.append(t,this.currentMaskFlags(e),i)}_appendPlaceholder(){if(this.isFilled||this.isOptional)return new H;this.isFilled=true;return new H({inserted:this.placeholderChar})}_appendEager(){return new H}extractTail(t,e){return this.masked.extractTail(t,e)}appendTail(t){return this.masked.appendTail(t)}extractInput(t,e,i){if(t===void 0){t=0}if(e===void 0){e=this.value.length}return this.masked.extractInput(t,e,i)}nearestInputPos(t,e){if(e===void 0){e=F.NONE}const i=0;const s=this.value.length;const r=Math.min(Math.max(t,i),s);switch(e){case F.LEFT:case F.FORCE_LEFT:return this.isComplete?r:i;case F.RIGHT:case F.FORCE_RIGHT:return this.isComplete?r:s;case F.NONE:default:return r}}totalInputPositions(t,e){if(t===void 0){t=0}if(e===void 0){e=this.value.length}return this.value.slice(t,e).length}doValidate(t){return this.masked.doValidate(this.currentMaskFlags(t))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(t)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(t){this.masked.state=t.masked;this.isFilled=t.isFilled}currentMaskFlags(t){var e;return{...t,_beforeTailState:(t==null||(e=t._beforeTailState)==null?void 0:e.masked)||(t==null?void 0:t._beforeTailState)}}pad(t){return new H}}K.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class G extends q{updateOptions(t){super.updateOptions(t)}_update(t){const e=t.mask;if(e)t.validate=t=>t.search(e)>=0;super._update(t)}}I.MaskedRegExp=G;class $ extends q{constructor(t){super({...$.DEFAULTS,...t,definitions:Object.assign({},K.DEFAULT_DEFINITIONS,t==null?void 0:t.definitions)})}updateOptions(t){super.updateOptions(t)}_update(t){t.definitions=Object.assign({},this.definitions,t.definitions);super._update(t);this._rebuildMask()}_rebuildMask(){const t=this.definitions;this._blocks=[];this.exposeBlock=undefined;this._stops=[];this._maskedBlocks={};const e=this.mask;if(!e||!t)return;let i=false;let s=false;for(let r=0;r<e.length;++r){if(this.blocks){const t=e.slice(r);const i=Object.keys(this.blocks).filter((e=>t.indexOf(e)===0));i.sort(((t,e)=>e.length-t.length));const s=i[0];if(s){const{expose:t,repeat:e,...i}=S(this.blocks[s]);const n={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...i,repeat:e,parent:this};const o=e!=null?new I.RepeatBlock(n):M(n);if(o){this._blocks.push(o);if(t)this.exposeBlock=o;if(!this._maskedBlocks[s])this._maskedBlocks[s]=[];this._maskedBlocks[s].push(this._blocks.length-1)}r+=s.length-1;continue}}let n=e[r];let o=n in t;if(n===$.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(n==="{"||n==="}"){i=!i;continue}if(n==="["||n==="]"){s=!s;continue}if(n===$.ESCAPE_CHAR){++r;n=e[r];if(!n)break;o=false}const a=o?new K({isOptional:s,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...S(t[n]),parent:this}):new Y({char:n,eager:this.eager,isUnmasking:i});this._blocks.push(a)}}get state(){return{...super.state,_blocks:this._blocks.map((t=>t.state))}}set state(t){if(!t){this.reset();return}const{_blocks:e,...i}=t;this._blocks.forEach(((t,i)=>t.state=e[i]));super.state=i}reset(){super.reset();this._blocks.forEach((t=>t.reset()))}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every((t=>t.isComplete))}get isFilled(){return this._blocks.every((t=>t.isFilled))}get isFixed(){return this._blocks.every((t=>t.isFixed))}get isOptional(){return this._blocks.every((t=>t.isOptional))}doCommit(){this._blocks.forEach((t=>t.doCommit()));super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce(((t,e)=>t+=e.unmaskedValue),"")}set unmaskedValue(t){if(this.exposeBlock){const e=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=t;this.appendTail(e);this.doCommit()}else super.unmaskedValue=t}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce(((t,e)=>t+=e.value),"")}set value(t){if(this.exposeBlock){const e=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=t;this.appendTail(e);this.doCommit()}else super.value=t}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(t){if(this.exposeBlock){const e=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=t;this.appendTail(e);this.doCommit()}else super.typedValue=t}get displayValue(){return this._blocks.reduce(((t,e)=>t+=e.displayValue),"")}appendTail(t){return super.appendTail(t).aggregate(this._appendPlaceholder())}_appendEager(){var t;const e=new H;let i=(t=this._mapPosToBlock(this.displayValue.length))==null?void 0:t.index;if(i==null)return e;if(this._blocks[i].isFilled)++i;for(let t=i;t<this._blocks.length;++t){const i=this._blocks[t]._appendEager();if(!i.inserted)break;e.aggregate(i)}return e}_appendCharRaw(t,e){if(e===void 0){e={}}const i=this._mapPosToBlock(this.displayValue.length);const s=new H;if(!i)return s;for(let n=i.index,o;o=this._blocks[n];++n){var r;const i=o._appendChar(t,{...e,_beforeTailState:(r=e._beforeTailState)==null||(r=r._blocks)==null?void 0:r[n]});s.aggregate(i);if(i.consumed)break}return s}extractTail(t,e){if(t===void 0){t=0}if(e===void 0){e=this.displayValue.length}const i=new W;if(t===e)return i;this._forEachBlocksInRange(t,e,((t,e,s,r)=>{const n=t.extractTail(s,r);n.stop=this._findStopBefore(e);n.from=this._blockStartPos(e);if(n instanceof W)n.blockIndex=e;i.extend(n)}));return i}extractInput(t,e,i){if(t===void 0){t=0}if(e===void 0){e=this.displayValue.length}if(i===void 0){i={}}if(t===e)return"";let s="";this._forEachBlocksInRange(t,e,((t,e,r,n)=>{s+=t.extractInput(r,n,i)}));return s}_findStopBefore(t){let e;for(let i=0;i<this._stops.length;++i){const s=this._stops[i];if(s<=t)e=s;else break}return e}_appendPlaceholder(t){const e=new H;if(this.lazy&&t==null)return e;const i=this._mapPosToBlock(this.displayValue.length);if(!i)return e;const s=i.index;const r=t!=null?t:this._blocks.length;this._blocks.slice(s,r).forEach((i=>{if(!i.lazy||t!=null){var s;e.aggregate(i._appendPlaceholder((s=i._blocks)==null?void 0:s.length))}}));return e}_mapPosToBlock(t){let e="";for(let i=0;i<this._blocks.length;++i){const s=this._blocks[i];const r=e.length;e+=s.displayValue;if(t<=e.length){return{index:i,offset:t-r}}}}_blockStartPos(t){return this._blocks.slice(0,t).reduce(((t,e)=>t+=e.displayValue.length),0)}_forEachBlocksInRange(t,e,i){if(e===void 0){e=this.displayValue.length}const s=this._mapPosToBlock(t);if(s){const t=this._mapPosToBlock(e);const r=t&&s.index===t.index;const n=s.offset;const o=t&&r?t.offset:this._blocks[s.index].displayValue.length;i(this._blocks[s.index],s.index,n,o);if(t&&!r){for(let e=s.index+1;e<t.index;++e){i(this._blocks[e],e,0,this._blocks[e].displayValue.length)}i(this._blocks[t.index],t.index,0,t.offset)}}}remove(t,e){if(t===void 0){t=0}if(e===void 0){e=this.displayValue.length}const i=super.remove(t,e);this._forEachBlocksInRange(t,e,((t,e,s,r)=>{i.aggregate(t.remove(s,r))}));return i}nearestInputPos(t,e){if(e===void 0){e=F.NONE}if(!this._blocks.length)return 0;const i=new U(this,t);if(e===F.NONE){if(i.pushRightBeforeInput())return i.pos;i.popState();if(i.pushLeftBeforeInput())return i.pos;return this.displayValue.length}if(e===F.LEFT||e===F.FORCE_LEFT){if(e===F.LEFT){i.pushRightBeforeFilled();if(i.ok&&i.pos===t)return t;i.popState()}i.pushLeftBeforeInput();i.pushLeftBeforeRequired();i.pushLeftBeforeFilled();if(e===F.LEFT){i.pushRightBeforeInput();i.pushRightBeforeRequired();if(i.ok&&i.pos<=t)return i.pos;i.popState();if(i.ok&&i.pos<=t)return i.pos;i.popState()}if(i.ok)return i.pos;if(e===F.FORCE_LEFT)return 0;i.popState();if(i.ok)return i.pos;i.popState();if(i.ok)return i.pos;return 0}if(e===F.RIGHT||e===F.FORCE_RIGHT){i.pushRightBeforeInput();i.pushRightBeforeRequired();if(i.pushRightBeforeFilled())return i.pos;if(e===F.FORCE_RIGHT)return this.displayValue.length;i.popState();if(i.ok)return i.pos;i.popState();if(i.ok)return i.pos;return this.nearestInputPos(t,F.LEFT)}return t}totalInputPositions(t,e){if(t===void 0){t=0}if(e===void 0){e=this.displayValue.length}let i=0;this._forEachBlocksInRange(t,e,((t,e,s,r)=>{i+=t.totalInputPositions(s,r)}));return i}maskedBlock(t){return this.maskedBlocks(t)[0]}maskedBlocks(t){const e=this._maskedBlocks[t];if(!e)return[];return e.map((t=>this._blocks[t]))}pad(t){const e=new H;this._forEachBlocksInRange(0,this.displayValue.length,(i=>e.aggregate(i.pad(t))));return e}}$.DEFAULTS={...q.DEFAULTS,lazy:true,placeholderChar:"_"};$.STOP_CHAR="`";$.ESCAPE_CHAR="\\";$.InputDefinition=K;$.FixedDefinition=Y;I.MaskedPattern=$;class X extends ${get _matchFrom(){return this.maxLength-String(this.from).length}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){const{to:e=this.to||0,from:i=this.from||0,maxLength:s=this.maxLength||0,autofix:r=this.autofix,...n}=t;this.to=e;this.from=i;this.maxLength=Math.max(String(e).length,s);this.autofix=r;const o=String(this.from).padStart(this.maxLength,"0");const a=String(this.to).padStart(this.maxLength,"0");let u=0;while(u<a.length&&a[u]===o[u])++u;n.mask=a.slice(0,u).replace(/0/g,"\\0")+"0".repeat(this.maxLength-u);super._update(n)}get isComplete(){return super.isComplete&&Boolean(this.value)}boundaries(t){let e="";let i="";const[,s,r]=t.match(/^(\D*)(\d*)(\D*)/)||[];if(r){e="0".repeat(s.length)+r;i="9".repeat(s.length)+r}e=e.padEnd(this.maxLength,"0");i=i.padEnd(this.maxLength,"9");return[e,i]}doPrepareChar(t,e){if(e===void 0){e={}}let i;[t,i]=super.doPrepareChar(t.replace(/\D/g,""),e);if(!t)i.skip=!this.isComplete;return[t,i]}_appendCharRaw(t,e){if(e===void 0){e={}}if(!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(t,e);const i=String(this.from).padStart(this.maxLength,"0");const s=String(this.to).padStart(this.maxLength,"0");const[r,n]=this.boundaries(this.value+t);if(Number(n)<this.from)return super._appendCharRaw(i[this.value.length],e);if(Number(r)>this.to){if(!e.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength){return super._appendCharRaw(i[this.value.length],e).aggregate(this._appendCharRaw(t,e))}return super._appendCharRaw(s[this.value.length],e)}return super._appendCharRaw(t,e)}doValidate(t){const e=this.value;const i=e.search(/[^0]/);if(i===-1&&e.length<=this._matchFrom)return true;const[s,r]=this.boundaries(e);return this.from<=Number(r)&&Number(s)<=this.to&&super.doValidate(t)}pad(t){const e=new H;if(this.value.length===this.maxLength)return e;const i=this.value;const s=this.maxLength-this.value.length;if(s){this.reset();for(let i=0;i<s;++i){e.aggregate(super._appendCharRaw("0",t))}i.split("").forEach((t=>this._appendCharRaw(t)))}return e}}I.MaskedRange=X;const J="d{.}`m{.}`Y";class Q extends ${static extractPatternOptions(t){const{mask:e,pattern:i,...s}=t;return{...s,mask:C(e)?e:i}}constructor(t){super(Q.extractPatternOptions({...Q.DEFAULTS,...t}))}updateOptions(t){super.updateOptions(t)}_update(t){const{mask:e,pattern:i,blocks:s,...r}={...Q.DEFAULTS,...t};const n=Object.assign({},Q.GET_DEFAULT_BLOCKS());if(t.min)n.Y.from=t.min.getFullYear();if(t.max)n.Y.to=t.max.getFullYear();if(t.min&&t.max&&n.Y.from===n.Y.to){n.m.from=t.min.getMonth()+1;n.m.to=t.max.getMonth()+1;if(n.m.from===n.m.to){n.d.from=t.min.getDate();n.d.to=t.max.getDate()}}Object.assign(n,this.blocks,s);super._update({...r,mask:C(e)?e:i,blocks:n})}doValidate(t){const e=this.date;return super.doValidate(t)&&(!this.isComplete||this.isDateExist(this.value)&&e!=null&&(this.min==null||this.min<=e)&&(this.max==null||e<=this.max))}isDateExist(t){return this.format(this.parse(t,this),this).indexOf(t)>=0}get date(){return this.typedValue}set date(t){this.typedValue=t}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(t){super.typedValue=t}maskEquals(t){return t===Date||super.maskEquals(t)}optionsIsChanged(t){return super.optionsIsChanged(Q.extractPatternOptions(t))}}Q.GET_DEFAULT_BLOCKS=()=>({d:{mask:X,from:1,to:31,maxLength:2},m:{mask:X,from:1,to:12,maxLength:2},Y:{mask:X,from:1900,to:9999}});Q.DEFAULTS={...$.DEFAULTS,mask:Date,pattern:J,format:(t,e)=>{if(!t)return"";const i=String(t.getDate()).padStart(2,"0");const s=String(t.getMonth()+1).padStart(2,"0");const r=t.getFullYear();return[i,s,r].join(".")},parse:(t,e)=>{const[i,s,r]=t.split(".").map(Number);return new Date(r,s-1,i)}};I.MaskedDate=Q;class tt extends q{constructor(t){super({...tt.DEFAULTS,...t});this.currentMask=undefined}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t);if("mask"in t){this.exposeMask=undefined;this.compiledMasks=Array.isArray(t.mask)?t.mask.map((t=>{const{expose:e,...i}=S(t);const s=M({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...i});if(e)this.exposeMask=s;return s})):[]}}_appendCharRaw(t,e){if(e===void 0){e={}}const i=this._applyDispatch(t,e);if(this.currentMask){i.aggregate(this.currentMask._appendChar(t,this.currentMaskFlags(e)))}return i}_applyDispatch(t,e,i){if(t===void 0){t=""}if(e===void 0){e={}}if(i===void 0){i=""}const s=e.tail&&e._beforeTailState!=null?e._beforeTailState._value:this.value;const r=this.rawInputValue;const n=e.tail&&e._beforeTailState!=null?e._beforeTailState._rawInputValue:r;const o=r.slice(n.length);const a=this.currentMask;const u=new H;const h=a==null?void 0:a.state;this.currentMask=this.doDispatch(t,{...e},i);if(this.currentMask){if(this.currentMask!==a){this.currentMask.reset();if(n){this.currentMask.append(n,{raw:true});u.tailShift=this.currentMask.value.length-s.length}if(o){u.tailShift+=this.currentMask.append(o,{raw:true,tail:true}).tailShift}}else if(h){this.currentMask.state=h}}return u}_appendPlaceholder(){const t=this._applyDispatch();if(this.currentMask){t.aggregate(this.currentMask._appendPlaceholder())}return t}_appendEager(){const t=this._applyDispatch();if(this.currentMask){t.aggregate(this.currentMask._appendEager())}return t}appendTail(t){const e=new H;if(t)e.aggregate(this._applyDispatch("",{},t));return e.aggregate(this.currentMask?this.currentMask.appendTail(t):super.appendTail(t))}currentMaskFlags(t){var e,i;return{...t,_beforeTailState:((e=t._beforeTailState)==null?void 0:e.currentMaskRef)===this.currentMask&&((i=t._beforeTailState)==null?void 0:i.currentMask)||t._beforeTailState}}doDispatch(t,e,i){if(e===void 0){e={}}if(i===void 0){i=""}return this.dispatch(t,this,e,i)}doValidate(t){return super.doValidate(t)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(t)))}doPrepare(t,e){if(e===void 0){e={}}let[i,s]=super.doPrepare(t,e);if(this.currentMask){let t;[i,t]=super.doPrepare(i,this.currentMaskFlags(e));s=s.aggregate(t)}return[i,s]}doPrepareChar(t,e){if(e===void 0){e={}}let[i,s]=super.doPrepareChar(t,e);if(this.currentMask){let t;[i,t]=super.doPrepareChar(i,this.currentMaskFlags(e));s=s.aggregate(t)}return[i,s]}reset(){var t;(t=this.currentMask)==null||t.reset();this.compiledMasks.forEach((t=>t.reset()))}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(t){if(this.exposeMask){this.exposeMask.value=t;this.currentMask=this.exposeMask;this._applyDispatch()}else super.value=t}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(t){if(this.exposeMask){this.exposeMask.unmaskedValue=t;this.currentMask=this.exposeMask;this._applyDispatch()}else super.unmaskedValue=t}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(t){if(this.exposeMask){this.exposeMask.typedValue=t;this.currentMask=this.exposeMask;this._applyDispatch();return}let e=String(t);if(this.currentMask){this.currentMask.typedValue=t;e=this.currentMask.unmaskedValue}this.unmaskedValue=e}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var t;return Boolean((t=this.currentMask)==null?void 0:t.isComplete)}get isFilled(){var t;return Boolean((t=this.currentMask)==null?void 0:t.isFilled)}remove(t,e){const i=new H;if(this.currentMask){i.aggregate(this.currentMask.remove(t,e)).aggregate(this._applyDispatch())}return i}get state(){var t;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map((t=>t.state)),currentMaskRef:this.currentMask,currentMask:(t=this.currentMask)==null?void 0:t.state}}set state(t){const{compiledMasks:e,currentMaskRef:i,currentMask:s,...r}=t;if(e)this.compiledMasks.forEach(((t,i)=>t.state=e[i]));if(i!=null){this.currentMask=i;this.currentMask.state=s}super.state=r}extractInput(t,e,i){return this.currentMask?this.currentMask.extractInput(t,e,i):""}extractTail(t,e){return this.currentMask?this.currentMask.extractTail(t,e):super.extractTail(t,e)}doCommit(){if(this.currentMask)this.currentMask.doCommit();super.doCommit()}nearestInputPos(t,e){return this.currentMask?this.currentMask.nearestInputPos(t,e):super.nearestInputPos(t,e)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(t){this._overwrite=t}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(t){this._eager=t}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(t){this._skipInvalid=t}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(t){this._autofix=t}maskEquals(t){return Array.isArray(t)?this.compiledMasks.every(((e,i)=>{if(!t[i])return;const{mask:s,...r}=t[i];return E(e,r)&&e.maskEquals(s)})):super.maskEquals(t)}typedValueEquals(t){var e;return Boolean((e=this.currentMask)==null?void 0:e.typedValueEquals(t))}}tt.DEFAULTS={...q.DEFAULTS,dispatch:(t,e,i,s)=>{if(!e.compiledMasks.length)return;const r=e.rawInputValue;const n=e.compiledMasks.map(((n,o)=>{const a=e.currentMask===n;const u=a?n.displayValue.length:n.nearestInputPos(n.displayValue.length,F.FORCE_LEFT);if(n.rawInputValue!==r){n.reset();n.append(r,{raw:true})}else if(!a){n.remove(u)}n.append(t,e.currentMaskFlags(i));n.appendTail(s);return{index:o,weight:n.rawInputValue.length,totalInputPositions:n.totalInputPositions(0,Math.max(u,n.nearestInputPos(n.displayValue.length,F.FORCE_LEFT)))}}));n.sort(((t,e)=>e.weight-t.weight||e.totalInputPositions-t.totalInputPositions));return e.compiledMasks[n[0].index]}};I.MaskedDynamic=tt;class et extends ${constructor(t){super({...et.DEFAULTS,...t})}updateOptions(t){super.updateOptions(t)}_update(t){const{enum:e,...i}=t;if(e){const t=e.map((t=>t.length));const s=Math.min(...t);const r=Math.max(...t)-s;i.mask="*".repeat(s);if(r)i.mask+="["+"*".repeat(r)+"]";this.enum=e}super._update(i)}_appendCharRaw(t,e){if(e===void 0){e={}}const i=Math.min(this.nearestInputPos(0,F.FORCE_RIGHT),this.value.length);const s=this.enum.filter((e=>this.matchValue(e,this.unmaskedValue+t,i)));if(s.length){if(s.length===1){this._forEachBlocksInRange(0,this.value.length,((t,i)=>{const r=s[0][i];if(i>=this.value.length||r===t.value)return;t.reset();t._appendChar(r,e)}))}const t=super._appendCharRaw(s[0][this.value.length],e);if(s.length===1){s[0].slice(this.unmaskedValue.length).split("").forEach((e=>t.aggregate(super._appendCharRaw(e))))}return t}return new H({skip:!this.isComplete})}extractTail(t,e){if(t===void 0){t=0}return new Z("",t)}remove(t,e){if(t===void 0){t=0}if(e===void 0){e=this.displayValue.length}if(t===e)return new H;const i=Math.min(super.nearestInputPos(0,F.FORCE_RIGHT),this.value.length);let s;for(s=t;s>=0;--s){const t=this.enum.filter((t=>this.matchValue(t,this.value.slice(i,s),i)));if(t.length>1)break}const r=super.remove(s,e);r.tailShift+=s-t;return r}get isComplete(){return this.enum.indexOf(this.value)>=0}}et.DEFAULTS={...$.DEFAULTS,matchValue:(t,e,i)=>t.indexOf(e,i)===i};I.MaskedEnum=et;class it extends q{updateOptions(t){super.updateOptions(t)}_update(t){super._update({...t,validate:t.mask})}}I.MaskedFunction=it;var st;class rt extends q{constructor(t){super({...rt.DEFAULTS,...t})}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t);this._updateRegExps()}_updateRegExps(){const t="^"+(this.allowNegative?"[+|\\-]?":"");const e="\\d*";const i=(this.scale?"("+B(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(t+e+i);this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(B).join("")+"]","g");this._thousandsSeparatorRegExp=new RegExp(B(this.thousandsSeparator),"g")}_removeThousandsSeparators(t){return t.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(t){const e=t.split(this.radix);e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator);return e.join(this.radix)}doPrepareChar(t,e){if(e===void 0){e={}}const[i,s]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(e.input&&e.raw||!e.input&&!e.raw)?t.replace(this._mapToRadixRegExp,this.radix):t),e);if(t&&!i)s.skip=true;if(i&&!this.allowPositive&&!this.value&&i!=="-")s.aggregate(this._appendChar("-"));return[i,s]}_separatorsCount(t,e){if(e===void 0){e=false}let i=0;for(let s=0;s<t;++s){if(this._value.indexOf(this.thousandsSeparator,s)===s){++i;if(e)t+=this.thousandsSeparator.length}}return i}_separatorsCountFromSlice(t){if(t===void 0){t=this._value}return this._separatorsCount(this._removeThousandsSeparators(t).length,true)}extractInput(t,e,i){if(t===void 0){t=0}if(e===void 0){e=this.displayValue.length}[t,e]=this._adjustRangeWithSeparators(t,e);return this._removeThousandsSeparators(super.extractInput(t,e,i))}_appendCharRaw(t,e){if(e===void 0){e={}}const i=e.tail&&e._beforeTailState?e._beforeTailState._value:this._value;const s=this._separatorsCountFromSlice(i);this._value=this._removeThousandsSeparators(this.value);const r=this._value;this._value+=t;const n=this.number;let o=!isNaN(n);let a=false;if(o){let t;if(this.min!=null&&this.min<0&&this.number<this.min)t=this.min;if(this.max!=null&&this.max>0&&this.number>this.max)t=this.max;if(t!=null){if(this.autofix){this._value=this.format(t,this).replace(rt.UNMASKED_RADIX,this.radix);a||(a=r===this._value&&!e.tail)}else{o=false}}o&&(o=Boolean(this._value.match(this._numberRegExp)))}let u;if(!o){this._value=r;u=new H}else{u=new H({inserted:this._value.slice(r.length),rawInserted:a?"":t,skip:a})}this._value=this._insertThousandsSeparators(this._value);const h=e.tail&&e._beforeTailState?e._beforeTailState._value:this._value;const l=this._separatorsCountFromSlice(h);u.tailShift+=(l-s)*this.thousandsSeparator.length;return u}_findSeparatorAround(t){if(this.thousandsSeparator){const e=t-this.thousandsSeparator.length+1;const i=this.value.indexOf(this.thousandsSeparator,e);if(i<=t)return i}return-1}_adjustRangeWithSeparators(t,e){const i=this._findSeparatorAround(t);if(i>=0)t=i;const s=this._findSeparatorAround(e);if(s>=0)e=s+this.thousandsSeparator.length;return[t,e]}remove(t,e){if(t===void 0){t=0}if(e===void 0){e=this.displayValue.length}[t,e]=this._adjustRangeWithSeparators(t,e);const i=this.value.slice(0,t);const s=this.value.slice(e);const r=this._separatorsCount(i.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(i+s));const n=this._separatorsCountFromSlice(i);return new H({tailShift:(n-r)*this.thousandsSeparator.length})}nearestInputPos(t,e){if(!this.thousandsSeparator)return t;switch(e){case F.NONE:case F.LEFT:case F.FORCE_LEFT:{const i=this._findSeparatorAround(t-1);if(i>=0){const s=i+this.thousandsSeparator.length;if(t<s||this.value.length<=s||e===F.FORCE_LEFT){return i}}break}case F.RIGHT:case F.FORCE_RIGHT:{const e=this._findSeparatorAround(t);if(e>=0){return e+this.thousandsSeparator.length}}}return t}doCommit(){if(this.value){const t=this.number;let e=t;if(this.min!=null)e=Math.max(e,this.min);if(this.max!=null)e=Math.min(e,this.max);if(e!==t)this.unmaskedValue=this.format(e,this);let i=this.value;if(this.normalizeZeros)i=this._normalizeZeros(i);if(this.padFractionalZeros&&this.scale>0)i=this._padFractionalZeros(i);this._value=i}super.doCommit()}_normalizeZeros(t){const e=this._removeThousandsSeparators(t).split(this.radix);e[0]=e[0].replace(/^(\D*)(0*)(\d*)/,((t,e,i,s)=>e+s));if(t.length&&!/\d$/.test(e[0]))e[0]=e[0]+"0";if(e.length>1){e[1]=e[1].replace(/0*$/,"");if(!e[1].length)e.length=1}return this._insertThousandsSeparators(e.join(this.radix))}_padFractionalZeros(t){if(!t)return t;const e=t.split(this.radix);if(e.length<2)e.push("");e[1]=e[1].padEnd(this.scale,"0");return e.join(this.radix)}doSkipInvalid(t,e,i){if(e===void 0){e={}}const s=this.scale===0&&t!==this.thousandsSeparator&&(t===this.radix||t===rt.UNMASKED_RADIX||this.mapToRadix.includes(t));return super.doSkipInvalid(t,e,i)&&!s}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,rt.UNMASKED_RADIX)}set unmaskedValue(t){super.unmaskedValue=t}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(t){this.rawInputValue=this.format(t,this).replace(rt.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(t){this.typedValue=t}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(t){return(super.typedValueEquals(t)||rt.EMPTY_VALUES.includes(t)&&rt.EMPTY_VALUES.includes(this.typedValue))&&!(t===0&&this.value==="")}}st=rt;rt.UNMASKED_RADIX=".";rt.EMPTY_VALUES=[...q.EMPTY_VALUES,0];rt.DEFAULTS={...q.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[st.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:true,padFractionalZeros:false,parse:Number,format:t=>t.toLocaleString("en-US",{useGrouping:false,maximumFractionDigits:20})};I.MaskedNumber=rt;const nt={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function ot(t,e,i){if(e===void 0){e=nt.MASKED}if(i===void 0){i=nt.MASKED}const s=M(t);return t=>s.runIsolated((s=>{s[e]=t;return s[i]}))}function at(t,e,i,s){return ot(e,i,s)(t)}I.PIPE_TYPE=nt;I.createPipe=ot;I.pipe=at;class ut extends ${get repeatFrom(){var t;return(t=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===Infinity?0:this.repeat)!=null?t:0}get repeatTo(){var t;return(t=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)!=null?t:Infinity}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){var e,i,s;const{repeat:r,...n}=S(t);this._blockOpts=Object.assign({},this._blockOpts,n);const o=M(this._blockOpts);this.repeat=(e=(i=r!=null?r:o.repeat)!=null?i:this.repeat)!=null?e:Infinity;super._update({mask:"m".repeat(Math.max(this.repeatTo===Infinity&&((s=this._blocks)==null?void 0:s.length)||0,this.repeatFrom)),blocks:{m:o},eager:o.eager,overwrite:o.overwrite,skipInvalid:o.skipInvalid,lazy:o.lazy,placeholderChar:o.placeholderChar,displayChar:o.displayChar})}_allocateBlock(t){if(t<this._blocks.length)return this._blocks[t];if(this.repeatTo===Infinity||this._blocks.length<this.repeatTo){this._blocks.push(M(this._blockOpts));this.mask+="m";return this._blocks[this._blocks.length-1]}}_appendCharRaw(t,e){if(e===void 0){e={}}const i=new H;for(let a=(s=(r=this._mapPosToBlock(this.displayValue.length))==null?void 0:r.index)!=null?s:Math.max(this._blocks.length-1,0),u,h;u=(n=this._blocks[a])!=null?n:h=!h&&this._allocateBlock(a);++a){var s,r,n,o;const l=u._appendChar(t,{...e,_beforeTailState:(o=e._beforeTailState)==null||(o=o._blocks)==null?void 0:o[a]});if(l.skip&&h){this._blocks.pop();this.mask=this.mask.slice(1);break}i.aggregate(l);if(l.consumed)break}return i}_trimEmptyTail(t,e){var i,s;if(t===void 0){t=0}const r=Math.max(((i=this._mapPosToBlock(t))==null?void 0:i.index)||0,this.repeatFrom,0);let n;if(e!=null)n=(s=this._mapPosToBlock(e))==null?void 0:s.index;if(n==null)n=this._blocks.length-1;let o=0;for(let t=n;r<=t;--t,++o){if(this._blocks[t].unmaskedValue)break}if(o){this._blocks.splice(n-o+1,o);this.mask=this.mask.slice(o)}}reset(){super.reset();this._trimEmptyTail()}remove(t,e){if(t===void 0){t=0}if(e===void 0){e=this.displayValue.length}const i=super.remove(t,e);this._trimEmptyTail(t,e);return i}totalInputPositions(t,e){if(t===void 0){t=0}if(e==null&&this.repeatTo===Infinity)return Infinity;return super.totalInputPositions(t,e)}get state(){return super.state}set state(t){this._blocks.length=t._blocks.length;this.mask=this.mask.slice(0,this._blocks.length);super.state=t}}I.RepeatBlock=ut;try{globalThis.IMask=I}catch{}const ht='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-kba-dialog{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-kba-dialog div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-kba-dialog .background-overlay{position:fixed;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:rgba(0, 0, 0, 0.4980392157)}verdocs-kba-dialog .dialog{width:440px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#fff;padding:16px;gap:10px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-kba-dialog .heading{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;font-size:20px;font-weight:500}verdocs-kba-dialog .step{margin-left:6px;color:#666}verdocs-kba-dialog .help-box{background-color:#707ae5;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;padding:14px;-ms-flex-align:center;align-items:center;color:white}verdocs-kba-dialog .help-details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin-left:15px;font-size:14px}verdocs-kba-dialog .help-icon{width:40px;height:40px}verdocs-kba-dialog .help-title{font-weight:600;margin-bottom:4px}verdocs-kba-dialog .help-text{font-weight:400}verdocs-kba-dialog .input{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:10px;-ms-flex-align:center;align-items:center;margin:16px 0 32px}verdocs-kba-dialog .input label{-ms-flex:0;flex:0;line-height:10px;font-weight:500;white-space:nowrap}verdocs-kba-dialog .input input{-ms-flex:1;flex:1;padding:5px 8px;border-radius:3px;border:1px solid #cccccc}verdocs-kba-dialog .field{gap:10px;margin:0;display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start;-ms-flex-direction:row;flex-direction:row;max-width:100%}verdocs-kba-dialog .field .required{color:red;position:relative;top:-0.5em;font-size:80%}verdocs-kba-dialog .field label{margin-top:4px;-ms-flex:0 0 120px;flex:0 0 120px;font-weight:500;line-height:10px;text-align:right;white-space:nowrap}verdocs-kba-dialog .field verdocs-date-input{width:40%;-ms-flex-positive:1;flex-grow:1}verdocs-kba-dialog .field verdocs-date-input input{width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-kba-dialog .field input{width:40%;-ms-flex-positive:1;flex-grow:1;padding:5px 8px;border-radius:3px;border:1px solid #cccccc}verdocs-kba-dialog .choices{display:grid;gap:15px;grid-template-columns:repeat(auto-fill, minmax(100px, 1fr));margin:0 0 15px 0}verdocs-kba-dialog .choice{border:1px solid #707ae5;border-radius:5px;display:-ms-flexbox;display:flex;height:60px;font-size:14px;padding:0 5px;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-align:center;color:#5c6575;cursor:pointer}verdocs-kba-dialog .choice.selected{background-color:#707ae5;color:#ffffff}verdocs-kba-dialog .buttons{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-kba-dialog .buttons verdocs-button{margin-left:16px}';const lt={AL:"Alabama",AK:"Alaska",AS:"American Samoa",AZ:"Arizona",AR:"Arkansas",CA:"California",CO:"Colorado",CT:"Connecticut",DE:"Delaware",DC:"District Of Columbia",FM:"Federated States Of Micronesia",FL:"Florida",GA:"Georgia",GU:"Guam",HI:"Hawaii",ID:"Idaho",IL:"Illinois",IN:"Indiana",IA:"Iowa",KS:"Kansas",KY:"Kentucky",LA:"Louisiana",ME:"Maine",MH:"Marshall Islands",MD:"Maryland",MA:"Massachusetts",MI:"Michigan",MN:"Minnesota",MS:"Mississippi",MO:"Missouri",MT:"Montana",NE:"Nebraska",NV:"Nevada",NH:"New Hampshire",NJ:"New Jersey",NM:"New Mexico",NY:"New York",NC:"North Carolina",ND:"North Dakota",MP:"Northern Mariana Islands",OH:"Ohio",OK:"Oklahoma",OR:"Oregon",PW:"Palau",PA:"Pennsylvania",PR:"Puerto Rico",RI:"Rhode Island",SC:"South Carolina",SD:"South Dakota",TN:"Tennessee",TX:"Texas",UT:"Utah",VT:"Vermont",VI:"Virgin Islands",VA:"Virginia",WA:"Washington",WV:"West Virginia",WI:"Wisconsin",WY:"Wyoming"};const dt=Object.entries(lt).map((([t,e])=>({value:t,label:e})));const ct=`<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20 0C8.95313 0 0 8.95313 0 20C0 31.0469 8.95313 40 20 40C31.0469 40 40 31.0469 40 20C40 8.95313 31.0469 0 20 0ZM20 36.25C11.0391 36.25 3.75 28.9602 3.75 20C3.75 11.0398 11.0391 3.75 20 3.75C28.9609 3.75 36.25 11.0398 36.25 20C36.25 28.9602 28.9609 36.25 20 36.25Z" fill="white"/><path d="M20 26.25C18.5938 26.25 17.5 27.3438 17.5 28.75C17.5 30.1562 18.5234 31.25 20 31.25C21.3359 31.25 22.5 30.1562 22.5 28.75C22.5 27.3438 21.3359 26.25 20 26.25ZM22.5859 10H18.5938C15.5469 10 13.125 12.4219 13.125 15.4688C13.125 16.4844 13.9844 17.3438 15 17.3438C16.0156 17.3438 16.875 16.4844 16.875 15.4688C16.875 14.5312 17.5859 13.75 18.5234 13.75H22.5156C23.5234 13.75 24.375 14.5312 24.375 15.4688C24.375 16.0938 24.0625 16.5703 23.5156 16.8828L19.0625 19.6094C18.4375 20 18.125 20.625 18.125 21.25V22.5C18.125 23.5156 18.9844 24.375 20 24.375C21.0156 24.375 21.875 23.5156 21.875 22.5V22.3438L25.3984 20.1562C27.0391 19.1406 28.0547 17.3438 28.0547 15.4688C28.125 12.4219 25.7031 10 22.5859 10Z" fill="#E7E7E7"/></svg>`;const ft=class{constructor(i){t(this,i);this.exit=e(this,"exit");this.pinEntered=e(this,"pinEntered");this.next=e(this,"next");this.step=1;this.steps=3;this.helptitle="Previous Addresses";this.helptext="Please select the address below that you have most recently lived at.";this.mode="choice";this.label="PIN";this.placeholder="Enter your PIN...";this.recipient=null;this.choices=["553 Arbor Dr","18 Lacey Ln","23A Ball Ct","2375 Cavallo Blvd","23-1 RR-7","151 Boulder Rd"];this.agreed=false;this.response="";this.updatedRecipient=null;this.dobContainerId=`verdocs-date-input-${Math.random().toString(36).substring(2,11)}`}componentWillLoad(){this.updatedRecipient={...this.recipient||{}}}componentDidRender(){I(document.getElementById(this.dobContainerId),{mask:Date,min:new Date(1920,0,1),max:new Date(2007,12,31),lazy:false,pattern:"m/d/Y",format:function(t){var e=t.getDate();var i=t.getMonth()+1;var s=t.getFullYear();if(e<10)e="0"+e;if(i<10)i="0"+i;return[i,e,s].join("/")},parse:function(t){var e=t.split("/");return new Date(e[2],e[0]-1,e[1])}})}handleCancel(){this.exit.emit()}handleDismiss(t){if(t.target.class==="background-overlay"){t.preventDefault();this.handleCancel()}}handleDone(){this.next.emit(this.response);this.response=""}handleConfirmID(){console.log("Confirm ID",this.updatedRecipient);this.next.emit(this.updatedRecipient)}render(){var t,e,n,o,a,u,h,l,d,c,f,p,b,g;if(this.mode==="choice"){return i(r,null,i("div",{class:"background-overlay",onClick:t=>this.handleDismiss(t)},i("div",{class:"dialog"},i("div",{class:"heading"},"Confirm Your Identity",this.steps>1?i("span",{class:"step"},"(",this.step,"/",this.steps,")"):i(s,null)),!!this.helptitle&&i("div",{class:"help-box"},i("div",{class:"help-icon",innerHTML:ct}),i("div",{class:"help-details"},i("div",{class:"help-title"},this.helptitle),i("div",{class:"help-text"},this.helptext))),i("div",{class:"choices"},this.choices.map((t=>i("div",{class:`choice ${t===this.response?"selected":""}`,onClick:()=>{console.log("Selected",t);this.response=t}},t)))),i("div",{class:"buttons"},i("verdocs-button",{label:"Cancel",variant:"outline",onClick:()=>this.handleCancel()}),i("verdocs-button",{label:this.step<this.steps?"Next":"Submit",onClick:()=>this.handleDone(),disabled:!this.response})))))}if(this.mode==="identity"){return i(r,null,i("div",{class:"background-overlay",onClick:t=>this.handleDismiss(t)},i("div",{class:"dialog"},i("div",{class:"heading"},"Confirm Your Identity"),i("div",{class:"field"},i("label",{htmlFor:"verdocs-kba-first"},"Your Name:",i("span",{class:"required"},"*")),i("input",{required:true,type:"text",id:"verdocs-kba-first",name:"verdocs-kba-first",placeholder:"First name...",value:(t=this.updatedRecipient)===null||t===void 0?void 0:t.first_name,onInput:t=>this.updatedRecipient={...this.updatedRecipient,first_name:t.target.value}}),i("input",{type:"text",id:"verdocs-kba-last",name:"verdocs-kba-last",placeholder:"Last name...",required:true,value:(e=this.updatedRecipient)===null||e===void 0?void 0:e.last_name,onInput:t=>this.updatedRecipient={...this.updatedRecipient,last_name:t.target.value}})),i("div",{class:"field"},i("label",{htmlFor:"verdocs-kba-address"},"Address:",i("span",{class:"required"},"*")),i("input",{type:"text",id:"verdocs-kba-address",name:"verdocs-kba-address",placeholder:"Address...",value:(n=this.updatedRecipient)===null||n===void 0?void 0:n.address,onInput:t=>this.updatedRecipient={...this.updatedRecipient,address:t.target.value}})),i("div",{class:"field"},i("label",{htmlFor:"verdocs-kba-city"},"City:"),i("input",{type:"text",id:"verdocs-kba-city",name:"verdocs-kba-city",placeholder:"City...",value:(o=this.updatedRecipient)===null||o===void 0?void 0:o.city,onInput:t=>this.updatedRecipient={...this.updatedRecipient,city:t.target.value}})),i("div",{class:"field"},i("label",{htmlFor:"verdocs-kba-state"},"State:"),i("verdocs-select-input",{options:dt,value:(a=this.updatedRecipient)===null||a===void 0?void 0:a.state,onInput:t=>this.updatedRecipient={...this.updatedRecipient,state:t.target.value}})),i("div",{class:"field"},i("label",{htmlFor:"verdocs-kba-zip"},"Zip Code:",i("span",{class:"required"},"*")),i("input",{type:"text",id:"verdocs-kba-zip",name:"verdocs-kba-zip",placeholder:"Zip Code...",required:true,value:(u=this.updatedRecipient)===null||u===void 0?void 0:u.zip,onInput:t=>this.updatedRecipient={...this.updatedRecipient,zip:t.target.value}})),i("div",{class:"field"},i("label",{htmlFor:"verdocs-kba-ssn"},"SSN Last 4:",i("span",{class:"required"},"*")),i("input",{type:"text",id:"verdocs-kba-ssn",name:"verdocs-kba-ssn",placeholder:"Last 4 digits of your Social Security Number...",required:true,value:(h=this.updatedRecipient)===null||h===void 0?void 0:h.ssn_last_4,onInput:t=>this.updatedRecipient={...this.updatedRecipient,ssn_last_4:t.target.value}})),i("div",{class:"field"},i("label",{htmlFor:this.dobContainerId},"Date of Birth:",i("span",{class:"required"},"*")),i("input",{type:"text",value:((l=this.updatedRecipient)===null||l===void 0?void 0:l.dob)||"",id:this.dobContainerId,placeholder:"DOB...",onInput:t=>this.updatedRecipient={...this.updatedRecipient,dob:t.target.value}})),i("div",{class:"field"},i("label",null),i("verdocs-checkbox",{id:"verdocs-kba-agree",name:"verdocs-kba-agree",checked:this.agreed,onInput:t=>this.agreed=t.target.checked}),i("span",null,"I agree to provide my personal information in order to validate my identity.")),i("div",{class:"buttons"},i("verdocs-button",{label:"Submit",onClick:()=>this.handleConfirmID(),disabled:!this.agreed||!((d=this.updatedRecipient)===null||d===void 0?void 0:d.first_name)||!((c=this.updatedRecipient)===null||c===void 0?void 0:c.last_name)||!((f=this.updatedRecipient)===null||f===void 0?void 0:f.address)||!((p=this.updatedRecipient)===null||p===void 0?void 0:p.zip)||!((b=this.updatedRecipient)===null||b===void 0?void 0:b.ssn_last_4)||!((g=this.updatedRecipient)===null||g===void 0?void 0:g.dob)})))))}return i(r,null,i("div",{class:"background-overlay",onClick:t=>this.handleDismiss(t)},i("div",{class:"dialog"},i("div",{class:"heading"},"Please Confirm Your Identity",this.steps>1?i("span",{class:"step"},"(",this.step,"/",this.steps,")"):i(s,null)),!!this.helptitle&&i("div",{class:"help-box"},i("div",{class:"help-icon",innerHTML:ct}),i("div",{class:"help-details"},i("div",{class:"help-title"},this.helptitle),i("div",{class:"help-text"},this.helptext))),i("div",{class:"input"},i("label",{htmlFor:"verdocs-kba-input"},this.label),i("input",{type:"text",id:"verdocs-kba-input",name:"verdocs-kba-input",placeholder:this.placeholder,value:this.response,onInput:t=>this.response=t.target.value})),i("div",{class:"buttons"},i("verdocs-button",{label:"Cancel",variant:"outline",onClick:()=>this.handleCancel()}),i("verdocs-button",{label:"Submit",onClick:()=>this.handleDone(),disabled:!this.response})))))}};ft.style=ht;const pt='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-otp-dialog{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-otp-dialog div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-otp-dialog .background-overlay{position:fixed;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:rgba(0, 0, 0, 0.4980392157)}verdocs-otp-dialog .dialog{width:440px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#fff;padding:16px;gap:10px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-otp-dialog .heading{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;font-size:20px;font-weight:500}verdocs-otp-dialog .step{margin-left:6px;color:#666}verdocs-otp-dialog .help-box{background-color:#707ae5;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;padding:14px;-ms-flex-align:center;align-items:center;color:white}verdocs-otp-dialog .help-details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin-left:15px;font-size:14px}verdocs-otp-dialog .help-icon{width:40px;height:40px}verdocs-otp-dialog .help-title{font-weight:600;margin-bottom:4px}verdocs-otp-dialog .help-text{font-weight:400}verdocs-otp-dialog .input{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:10px;-ms-flex-align:center;align-items:center;margin:16px 0 32px}verdocs-otp-dialog .input label{-ms-flex:0;flex:0;line-height:10px;font-weight:500;white-space:nowrap}verdocs-otp-dialog .input input{-ms-flex:1;flex:1;padding:5px 8px;border-radius:3px;border:1px solid #cccccc}verdocs-otp-dialog .field{gap:10px;margin:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;max-width:100%}verdocs-otp-dialog .field .required{color:red;position:relative;top:-0.5em;font-size:80%}verdocs-otp-dialog .field label{-ms-flex:0 0 120px;flex:0 0 120px;font-weight:500;line-height:10px;text-align:right;white-space:nowrap}verdocs-otp-dialog .field verdocs-date-input{width:40%;-ms-flex-positive:1;flex-grow:1}verdocs-otp-dialog .field verdocs-date-input input{width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-otp-dialog .field input{width:40%;-ms-flex-positive:1;flex-grow:1;padding:5px 8px;border-radius:3px;border:1px solid #cccccc}verdocs-otp-dialog .choices{display:grid;gap:15px;grid-template-columns:repeat(auto-fill, minmax(100px, 1fr));margin:0 0 15px 0}verdocs-otp-dialog .choice{border:1px solid #707ae5;border-radius:5px;display:-ms-flexbox;display:flex;height:60px;font-size:14px;padding:0 5px;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-align:center;color:#5c6575;cursor:pointer}verdocs-otp-dialog .choice.selected{background-color:#707ae5;color:#ffffff}verdocs-otp-dialog .buttons{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-otp-dialog .buttons verdocs-button{margin-left:16px}';const bt=`<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20 0C8.95313 0 0 8.95313 0 20C0 31.0469 8.95313 40 20 40C31.0469 40 40 31.0469 40 20C40 8.95313 31.0469 0 20 0ZM20 36.25C11.0391 36.25 3.75 28.9602 3.75 20C3.75 11.0398 11.0391 3.75 20 3.75C28.9609 3.75 36.25 11.0398 36.25 20C36.25 28.9602 28.9609 36.25 20 36.25Z" fill="white"/><path d="M20 26.25C18.5938 26.25 17.5 27.3438 17.5 28.75C17.5 30.1562 18.5234 31.25 20 31.25C21.3359 31.25 22.5 30.1562 22.5 28.75C22.5 27.3438 21.3359 26.25 20 26.25ZM22.5859 10H18.5938C15.5469 10 13.125 12.4219 13.125 15.4688C13.125 16.4844 13.9844 17.3438 15 17.3438C16.0156 17.3438 16.875 16.4844 16.875 15.4688C16.875 14.5312 17.5859 13.75 18.5234 13.75H22.5156C23.5234 13.75 24.375 14.5312 24.375 15.4688C24.375 16.0938 24.0625 16.5703 23.5156 16.8828L19.0625 19.6094C18.4375 20 18.125 20.625 18.125 21.25V22.5C18.125 23.5156 18.9844 24.375 20 24.375C21.0156 24.375 21.875 23.5156 21.875 22.5V22.3438L25.3984 20.1562C27.0391 19.1406 28.0547 17.3438 28.0547 15.4688C28.125 12.4219 25.7031 10 22.5859 10Z" fill="#E7E7E7"/></svg>`;const gt=class{constructor(i){t(this,i);this.exit=e(this,"exit");this.next=e(this,"next");this.resendTimeout=null;this.endpoint=o;this.method="email";this.recipient=null;this.resendDisabled=true;this.response=""}componentDidLoad(){this.startResendTimeout();setTimeout((()=>{a(this.endpoint,{auth_method:this.method,code:"",resend:true}).then((t=>{console.log("Resend result",t);this.response=""})).catch((t=>console.log("Error resending code",t)))}),1e3)}disconnectedCallback(){if(this.resendTimeout){clearTimeout(this.resendTimeout);this.resendTimeout=null}}handleCancel(){this.exit.emit()}handleDismiss(t){if(t.target.class==="background-overlay"){t.preventDefault();this.handleCancel()}}startResendTimeout(){this.resendDisabled=true;if(this.resendTimeout){clearTimeout(this.resendTimeout)}this.resendTimeout=setTimeout((()=>{this.resendDisabled=false}),3e4)}handleResend(){this.startResendTimeout();a(this.endpoint,{auth_method:this.method,code:"",resend:true}).then((t=>{console.log("Resend result",t);this.response="";p("A new code has been sent.")})).catch((t=>console.log("Error resending code",t)))}handleSubmit(){this.startResendTimeout();a(this.endpoint,{auth_method:this.method,code:this.response}).then((t=>{console.log("Verification completed",t);this.next.emit({response:t});p("Thank you. Your verification was successful.")})).catch((t=>{p("Invalid verification code. Please try again.");console.log("Invalid code",t)}));this.response=""}render(){return i(r,{key:"09de0f0a2b9ea033015df659dc895294191eec1f"},i("div",{key:"9dcd8ec1a69112f987c65bf005343d0aa1e92762",class:"background-overlay",onClick:t=>this.handleDismiss(t)},i("div",{key:"9439753f7c33b3d3316ce2be193beb6e942486c3",class:"dialog"},i("div",{key:"e4c9d1623ae43ecb73b0beba8476b8814a77bf21",class:"heading"},"Verification Required"),i("div",{key:"4d0db169d6dc13442211d51ff25c2dbacb06e324",class:"help-box"},i("div",{key:"680a7555654c0fb0fef0ec92a52f9f855c59ed30",class:"help-icon",innerHTML:bt}),i("div",{key:"b4017fcac2057b479be299a460e9fbf830554998",class:"help-details"},i("div",{key:"a92c2987721de5b2ccd47f9d6ed207b9c47f3815",class:"help-title"},"Please verify your email address"),i("div",{key:"a515d46a0be39a874d45a454d85933f8b87e6e5e",class:"help-text"},"Check your email for a one-time code, and enter it below."))),i("div",{key:"aeb05ff5cf9ffb11581ebbebbc79b7d4f2180d76",class:"input"},i("label",{key:"a120deeba33e465da4af63f557ec9804e5e3c4ef",htmlFor:"verdocs-otp-input"},"Code:"),i("input",{key:"3a54ac0a2d41bcf20c7fed828ae7d923e6eb3f2d",type:"text",id:"verdocs-otp-input",name:"verdocs-otp-input",placeholder:"Enter your one-time code...",value:this.response,onInput:t=>this.response=t.target.value})),i("div",{key:"30c9d9f6a9c0b0443246d44ac89e087616b6ebf8",class:"buttons"},i("verdocs-button",{key:"4082e2410098b2c33f56375d5bef50acfc8db188",label:"Cancel",variant:"outline",onClick:()=>this.handleCancel()}),i("verdocs-button",{key:"7d3fd049f06ba8101375d5acfe58feb74622dca3",label:"Resend",onClick:()=>this.handleResend(),disabled:this.resendDisabled}),i("verdocs-button",{key:"da8b815441904ce1e97d9a3c1cc18d91cf13f92d",label:"Submit",onClick:()=>this.handleSubmit(),disabled:!this.response})))))}};gt.style=pt;const vt='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-view{display:-ms-flexbox;display:flex;overflow:hidden;min-height:600px;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-view div,verdocs-view canvas{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-view .document{-ms-flex:1;flex:1;width:100%;height:100%;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;max-width:1200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-view .document .inner{width:100%;max-width:1028px}verdocs-view .loading-indicator{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.7)}#verdocs-view-header{width:100%;color:#fff;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;padding:0 20px;font-size:12px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}@media all and (max-width: 500px){#verdocs-view-header{padding:0 10px}}#verdocs-view-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 20px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}@media all and (max-width: 500px){#verdocs-view-header .inner{padding:0 10px}}#verdocs-view-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-view-header .title{font-size:18px;font-weight:500;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}';const xt=class{constructor(i){t(this,i);this.sdkError=e(this,"sdkError");this.envelopeUpdated=e(this,"envelopeUpdated");this.another=e(this,"another");this.view=e(this,"view");this.next=e(this,"next");this.envelopeListenerId=null;this.endpoint=null;this.envelopeId="";this.headerTargetId=null;this.canceling=false;this.showCancelDone=false;this.showLoadError=false;this.loading=true;this.envelope=null}async componentWillLoad(){var t,e,i;if(!this.endpoint){this.endpoint=u.getDefault();this.endpoint.loadSession()}if(!this.envelopeId){console.error(`[VIEW] Missing required envelopeId`);return}this.listenToEnvelope();if(!this.envelope){try{console.log("[VIEW] Loading envelope...");this.envelope=await h(this.endpoint,this.envelopeId);console.log("[VIEW] Loaded envelope",this.envelope)}catch(s){this.showLoadError=true;(t=this.sdkError)===null||t===void 0?void 0:t.emit(new g(s.message,(e=s.response)===null||e===void 0?void 0:e.status,(i=s.response)===null||i===void 0?void 0:i.data))}}}componentDidRender(){const t=this.headerTargetId?document.getElementById(this.headerTargetId):null;const e=document.getElementById("verdocs-view-header");if(t&&e){console.log("[VIEW] Moving header");e.remove();t.append(e)}}disconnectedCallback(){this.unlistenToEnvelope()}async listenToEnvelope(){console.log("[SIDEBAR] Loading envelope",this.envelopeId);this.unlistenToEnvelope();v.subscribe("envelopes",this.envelopeId,(()=>h(this.endpoint,this.envelopeId)),true,(t=>{this.envelope=t;this.loading=false}))}unlistenToEnvelope(){if(this.envelopeListenerId){v.store.delListener(this.envelopeListenerId);this.envelopeListenerId=null}}handlePageRendered(t){}async handleOptionSelected(t){var e,i;switch(t.detail.id){case"cancel":if(confirm("Are you sure you wish to cancel this envelope? This action cannot be undone.")){this.canceling=true;d(this.endpoint,this.envelopeId).then((t=>{this.canceling=false;console.log("[VIEW] Envelope canceled",t);return h(this.endpoint,this.envelopeId)})).then((t=>{console.log("[VIEW] Loaded new envelope details",t);this.envelope=t})).catch((t=>{var e,i,s;this.canceling=false;console.log("[VIEW] Error canceling envelope",t);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new g(t.message,(i=t.response)===null||i===void 0?void 0:i.status,(s=t.response)===null||s===void 0?void 0:s.data))}));this.showCancelDone=true;(e=this.envelopeUpdated)===null||e===void 0?void 0:e.emit({endpoint:this.endpoint,envelope:this.envelope,event:"canceled"})}break;case"print":window.print();(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});break;case"download-attachments":{const t=this.envelope.documents.find((t=>t.type==="attachment"));if(t){const e=await l(this.endpoint,this.envelopeId,t.id);window.open(e,"_blank")}}break;case"download-certificate":{const t=this.envelope.documents.find((t=>t.type==="certificate"));if(t){const e=await l(this.endpoint,this.envelopeId,t.id);window.open(e,"_blank")}}break;case"download-all":b(this.endpoint,[this.envelope]).then((()=>{var t;(t=this.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,envelope:this.envelope,event:"downloaded"})})).catch((t=>{console.log("Error downloading Zip",t)}));break}}render(){var t;if(this.loading){return i(r,null,i("verdocs-loader",null))}if(this.showLoadError){return i(r,null,i("verdocs-ok-dialog",{heading:"Unable to View Envelope",message:`Sorry, that envelope is not valid.`,buttonLabel:"OK",onNext:()=>{this.showLoadError=false}}))}if(!this.envelope){return i(r,null,i("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"}))}const e=[{id:"print",label:"Print"}];if(c(this.endpoint.profile,this.envelope)){e.push({id:"cancel",label:"Cancel"})}const n=this.envelope.documents.length>0;const o=this.envelope.documents.filter((t=>t.type==="attachment")).length;const a=this.envelope.documents.find((t=>t.type==="certificate"))!==undefined;if(n||a){e.push({label:""});if(n){e.push({id:"download-attachments",label:o>1?"Download Documents":"Download Document"})}if(a){e.push({id:"download-certificate",label:"Download Certificate"})}if(n&&a){e.push({id:"download-all",label:"Download All Files"})}}return i(r,null,i("div",{id:"verdocs-view-header"},i("div",{class:"inner"},i("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),i("div",{class:"title"},this.envelope.name),i("div",{style:{flex:"1"}}),i("div",{style:{marginLeft:"10px"}}),i("verdocs-dropdown",{options:e,onOptionSelected:t=>this.handleOptionSelected(t)}))),i("div",{class:"document",style:{paddingTop:this.headerTargetId?"70px":"15px"}},(((t=this.envelope)===null||t===void 0?void 0:t.documents)||[]).filter((t=>t.type!=="certificate")).map((t=>{const e=f(1,t.pages);return i(s,null,e.map((e=>{var s;const r=((s=t.page_sizes)===null||s===void 0?void 0:s[e])||{width:612,height:792};return i("verdocs-envelope-document-page",{envelopeId:this.envelopeId,documentId:t.id,endpoint:this.endpoint,type:"filled",virtualWidth:r.width,virtualHeight:r.height,pageNumber:e,onPageRendered:t=>this.handlePageRendered(t),layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))}))),this.showCancelDone&&i("verdocs-ok-dialog",{heading:"Cancelled",message:`This envelope has been cancelled successfully.`,onNext:()=>{this.showCancelDone=false}}),this.canceling&&i("div",{class:"loading-indicator"},i("verdocs-loader",null)))}get component(){return n(this)}};xt.style=vt;export{m as verdocs_delegate_dialog,w as verdocs_disclosure_dialog,ft as verdocs_kba_dialog,gt as verdocs_otp_dialog,xt as verdocs_view};
2
+ //# sourceMappingURL=p-da526fc0.entry.js.map
@@ -1,2 +1,2 @@
1
- var __awaiter=this&&this.__awaiter||function(t,e,i,n){function r(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,s){function o(t){try{c(n.next(t))}catch(t){s(t)}}function a(t){try{c(n["throw"](t))}catch(t){s(t)}}function c(t){t.done?i(t.value):r(t.value).then(o,a)}c((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,r,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(t){return function(e){return c([t,e])}}function c(a){if(n)throw new TypeError("Generator is already executing.");while(o&&(o=0,a[0]&&(i=0)),i)try{if(n=1,r&&(s=a[0]&2?r["return"]:a[0]?r["throw"]||((s=r["return"])&&s.call(r),0):r.next)&&!(s=s.call(r,a[1])).done)return s;if(r=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;r=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(s=i.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){i.label=a[1];break}if(a[0]===6&&i.label<s[1]){i.label=s[1];s=a;break}if(s&&i.label<s[2]){i.label=s[2];i.ops.push(a);break}if(s[2])i.ops.pop();i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t];r=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-B0FmVwBR.system.js","@verdocs/js-sdk","./p-CD5uiThi.system.js","./p-Bzy18UgU.system.js","./p-DmF0GSqu.system.js","./p-80p0Fzir.system.js"],(function(t){"use strict";var e,i,n,r,s,o,a,c;return{setters:[function(t){e=t.r;i=t.c;n=t.h;r=t.H;s=t.g},function(t){o=t.VerdocsEndpoint;a=t.getEnvelopeDocumentPageDisplayUri},function(t){c=t.t},null,null,null],execute:function(){var u="@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-envelope-document-page{width:100%;position:relative}verdocs-envelope-document-page .verdocs-envelope-document-page-layer{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294)}verdocs-envelope-document-page .verdocs-envelope-document-page-layer.img{width:100%}";var h=t("verdocs_envelope_document_page",function(){function t(t){e(this,t);this.pageRendered=i(this,"pageRendered");this.endpoint=o.getDefault();this.envelopeId="";this.documentId="";this.pageNumber=1;this.virtualWidth=612;this.virtualHeight=792;this.layers=[{name:"page",type:"canvas"}];this.type="original";this.containerId="verdocs-envelope-document-page-".concat(Math.random().toString(36).substring(2,11));this.renderedWidth=this.virtualWidth;this.renderedHeight=this.virtualHeight;this.naturalWidth=this.virtualWidth;this.naturalHeight=this.virtualHeight;this.aspectRatio=this.virtualWidth/this.virtualHeight;this.skipFirstNotification=true;this.pageDisplayUri="https://verdocs-public-assets.s3.amazonaws.com/page-loading-placeholder.png"}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:t=this;return[4,a(this.endpoint,this.documentId,this.pageNumber,this.type)];case 1:t.pageDisplayUri=e.sent();return[2]}}))}))};t.prototype.componentDidLoad=function(){var t=this;this.resizeObserver=new ResizeObserver(c((function(e){for(var i=0,n=e;i<n.length;i++){var r=n[i];var s=r.contentRect.width;t.renderedWidth=s;t.renderedHeight=t.virtualHeight*(s/t.virtualWidth)}t.notifyRenderedSize()}),100));this.resizeObserver.observe(this.container)};t.prototype.disconnectedCallback=function(){var t;(t=this.resizeObserver)===null||t===void 0?void 0:t.disconnect()};t.prototype.notifyRenderedSize=function(){if(this.skipFirstNotification){this.skipFirstNotification=false;return}this.pageRendered.emit({containerId:this.containerId,documentId:this.documentId,pageNumber:this.pageNumber,virtualWidth:this.virtualWidth,virtualHeight:this.virtualHeight,renderedWidth:this.renderedWidth,renderedHeight:this.renderedHeight,naturalWidth:this.naturalWidth,naturalHeight:this.naturalHeight,aspectRatio:this.aspectRatio,xScale:this.renderedWidth/this.virtualWidth,yScale:this.renderedHeight/this.virtualHeight})};t.prototype.render=function(){var t=this;var e="".concat(this.renderedHeight,"px");return n(r,{key:"750f27fff50ae426a33898cd1abbc0c5e108421c",id:"".concat(this.containerId),style:{height:e,flex:"0 0 ".concat(e)}},this.layers.map((function(i){return i.type==="div"?n("div",{class:"verdocs-envelope-document-page-layer",id:"".concat(t.containerId,"-").concat(i.name),style:{height:e}}):t.pageDisplayUri?n("img",{class:"verdocs-envelope-document-page-layer img",id:"".concat(t.containerId,"-").concat(i.name),src:t.pageDisplayUri,alt:"Page ".concat(t.pageNumber),"aria-hidden":true,loading:"lazy",onLoad:function(e){t.naturalWidth=e.target.naturalWidth;t.naturalHeight=e.target.naturalHeight;t.aspectRatio=t.naturalWidth/t.naturalHeight;t.virtualHeight=t.virtualWidth/t.aspectRatio;t.renderedHeight=e.target.offsetWidth/t.aspectRatio}}):n("div",null)})))};Object.defineProperty(t.prototype,"container",{get:function(){return s(this)},enumerable:false,configurable:true});return t}());h.style=u}}}));
2
- //# sourceMappingURL=p-f6598c9b.system.entry.js.map
1
+ var __awaiter=this&&this.__awaiter||function(t,e,i,n){function r(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,s){function o(t){try{c(n.next(t))}catch(t){s(t)}}function a(t){try{c(n["throw"](t))}catch(t){s(t)}}function c(t){t.done?i(t.value):r(t.value).then(o,a)}c((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,r,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(t){return function(e){return c([t,e])}}function c(a){if(n)throw new TypeError("Generator is already executing.");while(o&&(o=0,a[0]&&(i=0)),i)try{if(n=1,r&&(s=a[0]&2?r["return"]:a[0]?r["throw"]||((s=r["return"])&&s.call(r),0):r.next)&&!(s=s.call(r,a[1])).done)return s;if(r=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;r=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(s=i.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){i.label=a[1];break}if(a[0]===6&&i.label<s[1]){i.label=s[1];s=a;break}if(s&&i.label<s[2]){i.label=s[2];i.ops.push(a);break}if(s[2])i.ops.pop();i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t];r=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-B0FmVwBR.system.js","@verdocs/js-sdk","./p-lZ900hhb.system.js","./p-Bzy18UgU.system.js","./p-DmF0GSqu.system.js","./p-80p0Fzir.system.js"],(function(t){"use strict";var e,i,n,r,s,o,a,c;return{setters:[function(t){e=t.r;i=t.c;n=t.h;r=t.H;s=t.g},function(t){o=t.VerdocsEndpoint;a=t.getEnvelopeDocumentPageDisplayUri},function(t){c=t.t},null,null,null],execute:function(){var u="@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-envelope-document-page{width:100%;position:relative}verdocs-envelope-document-page .verdocs-envelope-document-page-layer{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294)}verdocs-envelope-document-page .verdocs-envelope-document-page-layer.img{width:100%}";var h=t("verdocs_envelope_document_page",function(){function t(t){e(this,t);this.pageRendered=i(this,"pageRendered");this.endpoint=o.getDefault();this.envelopeId="";this.documentId="";this.pageNumber=1;this.virtualWidth=612;this.virtualHeight=792;this.layers=[{name:"page",type:"canvas"}];this.type="original";this.containerId="verdocs-envelope-document-page-".concat(Math.random().toString(36).substring(2,11));this.renderedWidth=this.virtualWidth;this.renderedHeight=this.virtualHeight;this.naturalWidth=this.virtualWidth;this.naturalHeight=this.virtualHeight;this.aspectRatio=this.virtualWidth/this.virtualHeight;this.skipFirstNotification=true;this.pageDisplayUri="https://verdocs-public-assets.s3.amazonaws.com/page-loading-placeholder.png"}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:t=this;return[4,a(this.endpoint,this.documentId,this.pageNumber,this.type)];case 1:t.pageDisplayUri=e.sent();return[2]}}))}))};t.prototype.componentDidLoad=function(){var t=this;this.resizeObserver=new ResizeObserver(c((function(e){for(var i=0,n=e;i<n.length;i++){var r=n[i];var s=r.contentRect.width;t.renderedWidth=s;t.renderedHeight=t.virtualHeight*(s/t.virtualWidth)}t.notifyRenderedSize()}),100));this.resizeObserver.observe(this.container)};t.prototype.disconnectedCallback=function(){var t;(t=this.resizeObserver)===null||t===void 0?void 0:t.disconnect()};t.prototype.notifyRenderedSize=function(){if(this.skipFirstNotification){this.skipFirstNotification=false;return}this.pageRendered.emit({containerId:this.containerId,documentId:this.documentId,pageNumber:this.pageNumber,virtualWidth:this.virtualWidth,virtualHeight:this.virtualHeight,renderedWidth:this.renderedWidth,renderedHeight:this.renderedHeight,naturalWidth:this.naturalWidth,naturalHeight:this.naturalHeight,aspectRatio:this.aspectRatio,xScale:this.renderedWidth/this.virtualWidth,yScale:this.renderedHeight/this.virtualHeight})};t.prototype.render=function(){var t=this;var e="".concat(this.renderedHeight,"px");return n(r,{key:"750f27fff50ae426a33898cd1abbc0c5e108421c",id:"".concat(this.containerId),style:{height:e,flex:"0 0 ".concat(e)}},this.layers.map((function(i){return i.type==="div"?n("div",{class:"verdocs-envelope-document-page-layer",id:"".concat(t.containerId,"-").concat(i.name),style:{height:e}}):t.pageDisplayUri?n("img",{class:"verdocs-envelope-document-page-layer img",id:"".concat(t.containerId,"-").concat(i.name),src:t.pageDisplayUri,alt:"Page ".concat(t.pageNumber),"aria-hidden":true,loading:"lazy",onLoad:function(e){t.naturalWidth=e.target.naturalWidth;t.naturalHeight=e.target.naturalHeight;t.aspectRatio=t.naturalWidth/t.naturalHeight;t.virtualHeight=t.virtualWidth/t.aspectRatio;t.renderedHeight=e.target.offsetWidth/t.aspectRatio}}):n("div",null)})))};Object.defineProperty(t.prototype,"container",{get:function(){return s(this)},enumerable:false,configurable:true});return t}());h.style=u}}}));
2
+ //# sourceMappingURL=p-def666e2.system.entry.js.map