@verdocs/web-sdk 5.0.73 → 5.0.74
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.
- package/dist/cjs/{utils-Bxil_g6M.js → utils-DCB8q98B.js} +6 -2
- package/dist/cjs/utils-DCB8q98B.js.map +1 -0
- package/dist/cjs/verdocs-contact-picker.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-attachment_13.cjs.entry.js +1 -5
- package/dist/cjs/verdocs-field-attachment_13.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-kba-dialog_3.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-pagination_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-preview_7.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-sign.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +1 -1
- package/dist/collection/components/fields/verdocs-field-checkbox/verdocs-field-checkbox.js.map +1 -1
- package/dist/collection/components/fields/verdocs-field-radio/verdocs-field-radio.js.map +1 -1
- package/dist/collection/components/fields/verdocs-field-textbox/verdocs-field-textbox.js +1 -5
- package/dist/collection/components/fields/verdocs-field-textbox/verdocs-field-textbox.js.map +1 -1
- package/dist/collection/utils/utils.js +4 -0
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/{p-Clok0sKa.js → p-BqWxusTA.js} +4 -4
- package/dist/components/{p-Clok0sKa.js.map → p-BqWxusTA.js.map} +1 -1
- package/dist/components/p-CDTU_UJD.js.map +1 -1
- package/dist/components/{p-CG2DS0Ct.js → p-CLHwiJsu.js} +3 -3
- package/dist/components/{p-CG2DS0Ct.js.map → p-CLHwiJsu.js.map} +1 -1
- package/dist/components/{p-B3KdiIa6.js → p-CWHHlD3o.js} +3 -3
- package/dist/components/{p-B3KdiIa6.js.map → p-CWHHlD3o.js.map} +1 -1
- package/dist/components/{p-rafg8cJv.js → p-Cfx8TNcj.js} +4 -4
- package/dist/components/{p-rafg8cJv.js.map → p-Cfx8TNcj.js.map} +1 -1
- package/dist/components/{p-D-4uVyuT.js → p-CpHTrnj5.js} +3 -3
- package/dist/components/{p-D-4uVyuT.js.map → p-CpHTrnj5.js.map} +1 -1
- package/dist/components/{p-DDMPZ6xr.js → p-D38Lnu3J.js} +3 -3
- package/dist/components/{p-DDMPZ6xr.js.map → p-D38Lnu3J.js.map} +1 -1
- package/dist/components/{p-DA5NR945.js → p-De7UWCgq.js} +3 -7
- package/dist/components/p-De7UWCgq.js.map +1 -0
- package/dist/components/{p-rIIybUCF.js → p-DsBOZHKo.js} +6 -2
- package/dist/components/{p-rIIybUCF.js.map → p-DsBOZHKo.js.map} +1 -1
- package/dist/components/{p-DcAnGvC8.js → p-eiHT7SZQ.js} +5 -5
- package/dist/components/{p-DcAnGvC8.js.map → p-eiHT7SZQ.js.map} +1 -1
- package/dist/components/{p-BFgewNxB.js → p-iOb94GB3.js} +4 -4
- package/dist/components/{p-BFgewNxB.js.map → p-iOb94GB3.js.map} +1 -1
- package/dist/components/p-z0ZD30Bi.js.map +1 -1
- package/dist/components/verdocs-build.js +6 -6
- package/dist/components/verdocs-contact-picker.js +1 -1
- package/dist/components/verdocs-envelope-document-page.js +1 -1
- package/dist/components/verdocs-envelopes-list.js +2 -2
- package/dist/components/verdocs-field-textbox.js +1 -1
- package/dist/components/verdocs-preview.js +1 -1
- package/dist/components/verdocs-quick-filter.js +1 -1
- package/dist/components/verdocs-send.js +1 -1
- package/dist/components/verdocs-sign.js +3 -3
- package/dist/components/verdocs-template-document-page.js +1 -1
- package/dist/components/verdocs-template-fields.js +1 -1
- package/dist/components/verdocs-templates-list.js +1 -1
- package/dist/components/verdocs-view.js +1 -1
- package/dist/esm/{utils-CbfXTNEw.js → utils-DmfOx9Ey.js} +6 -2
- package/dist/esm/utils-DmfOx9Ey.js.map +1 -0
- package/dist/esm/verdocs-contact-picker.entry.js +1 -1
- package/dist/esm/verdocs-envelope-document-page.entry.js +1 -1
- package/dist/esm/verdocs-envelopes-list.entry.js +1 -1
- package/dist/esm/verdocs-field-attachment_13.entry.js +1 -5
- package/dist/esm/verdocs-field-attachment_13.entry.js.map +1 -1
- package/dist/esm/verdocs-kba-dialog_3.entry.js +1 -1
- package/dist/esm/verdocs-pagination_2.entry.js +1 -1
- package/dist/esm/verdocs-preview_7.entry.js +1 -1
- package/dist/esm/verdocs-sign.entry.js +1 -1
- package/dist/esm/verdocs-template-document-page_2.entry.js +1 -1
- package/dist/esm-es5/{utils-CbfXTNEw.js → utils-DmfOx9Ey.js} +2 -2
- package/dist/esm-es5/utils-DmfOx9Ey.js.map +1 -0
- package/dist/esm-es5/verdocs-contact-picker.entry.js +2 -2
- package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-attachment_13.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-attachment_13.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-kba-dialog_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-pagination_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-preview_7.entry.js +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
- package/dist/verdocs-web-sdk/{p-5af5bd43.entry.js → p-0bb8015d.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-7e91292a.entry.js → p-13c9ac73.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-3bf5dfcb.system.entry.js → p-1653b309.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-8bee83ad.entry.js → p-1718b823.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-3e4a6587.system.entry.js → p-2a183b90.system.entry.js} +3 -3
- package/dist/verdocs-web-sdk/{p-b78fa925.entry.js → p-3b68bc50.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-3b68bc50.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-ff182af0.entry.js → p-43326217.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-77cb64e8.system.entry.js → p-44de70af.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-04421e78.system.entry.js → p-524c1693.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-7926e0ed.entry.js → p-5d4a9e54.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-5f2740be.entry.js → p-65f4a435.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-ba007f95.system.entry.js → p-68b0e020.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-db22e373.system.entry.js → p-6d8c780d.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-d73e5d98.system.entry.js → p-9f2bde83.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-DwVINdLf.system.js.map → p-BEa6VFpF.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-DFxwv7XE.system.js.map → p-Bh0IfLXk.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-BxWHy8GG.system.js.map → p-BqV2sLyM.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/p-C4Tt0CYc.system.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-8wtUCSj6.system.js.map → p-C99h0Uet.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-CalyeRmL.system.js → p-CD5uiThi.system.js} +3 -3
- package/dist/verdocs-web-sdk/p-CD5uiThi.system.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-Bf0islHu.system.js.map → p-CWs7NRzr.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/p-CwXSduhy.system.js +1 -1
- package/dist/verdocs-web-sdk/{p-CTKsneFq.system.js.map → p-Cz3XayQm.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-CeQPkjRM.system.js.map → p-DRzyvgiA.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-SFqGy6JR.system.js.map → p-EQbSTcUE.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-7c58a33b.system.entry.js → p-a2ba1316.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-a2ba1316.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-d8a89fb3.entry.js → p-bb96a9af.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-aa3436c1.entry.js → p-d3d531e3.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-b29ae6dd.system.entry.js → p-e5f90a18.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-Bf-kinKl.js → p-fL0BKEnm.js} +2 -2
- package/dist/verdocs-web-sdk/p-fL0BKEnm.js.map +1 -0
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/utils-Bxil_g6M.js.map +0 -1
- package/dist/components/p-DA5NR945.js.map +0 -1
- package/dist/esm/utils-CbfXTNEw.js.map +0 -1
- package/dist/esm-es5/utils-CbfXTNEw.js.map +0 -1
- package/dist/verdocs-web-sdk/p-7c58a33b.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-Bf-kinKl.js.map +0 -1
- package/dist/verdocs-web-sdk/p-CalyeRmL.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-b78fa925.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-vPV-UVh5.system.js.map +0 -1
- /package/dist/verdocs-web-sdk/{p-5af5bd43.entry.js.map → p-0bb8015d.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-7e91292a.entry.js.map → p-13c9ac73.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-3bf5dfcb.system.entry.js.map → p-1653b309.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-8bee83ad.entry.js.map → p-1718b823.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-3e4a6587.system.entry.js.map → p-2a183b90.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-ff182af0.entry.js.map → p-43326217.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-77cb64e8.system.entry.js.map → p-44de70af.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-04421e78.system.entry.js.map → p-524c1693.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-7926e0ed.entry.js.map → p-5d4a9e54.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-5f2740be.entry.js.map → p-65f4a435.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-ba007f95.system.entry.js.map → p-68b0e020.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-db22e373.system.entry.js.map → p-6d8c780d.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-d73e5d98.system.entry.js.map → p-9f2bde83.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-d8a89fb3.entry.js.map → p-bb96a9af.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-aa3436c1.entry.js.map → p-d3d531e3.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-b29ae6dd.system.entry.js.map → p-e5f90a18.system.entry.js.map} +0 -0
@@ -1,2 +1,2 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,i,n){function s(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n["throw"](e))}catch(e){r(e)}}function l(e){e.done?i(e.value):s(e.value).then(o,a)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,s,r,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return l([e,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(o&&(o=0,a[0]&&(i=0)),i)try{if(n=1,s&&(r=a[0]&2?s["return"]:a[0]?s["throw"]||((r=s["return"])&&r.call(s),0):s.next)&&!(r=r.call(s,a[1])).done)return r;if(s=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;s=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(a[0]===6&&i.label<r[1]){i.label=r[1];r=a;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(a);break}if(r[2])i.ops.pop();i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e];s=0}finally{n=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,i){if(i||arguments.length===2)for(var n=0,s=t.length,r;n<s;n++){if(r||!(n in t)){if(!r)r=Array.prototype.slice.call(t,0,n);r[n]=t[n]}}return e.concat(r||Array.prototype.slice.call(t))};import{r as registerInstance,c as createEvent,h,H as Host,F as Fragment}from"./index-CF7i8guW.js";import{VerdocsEndpoint,startSigningSession,envelopeRecipientAgree,envelopeRecipientDecline,updateEnvelopeField,createSignature,updateEnvelopeFieldSignature,createInitials,updateEnvelopeFieldInitials,isValidPhone,isValidEmail,sortFields,envelopeRecipientSubmit,getEnvelope,uploadEnvelopeFieldAttachment,deleteEnvelopeFieldAttachment,formatFullName,fullNameToInitials,verifySigner,integerSequence}from"@verdocs/js-sdk";import{a as saveAttachment,u as updateDocumentFieldValue,g as getFieldId,r as renderDocumentField}from"./utils-CbfXTNEw.js";import{D as DefaultEndpoint}from"./Environment-C_Xku1v2.js";import{V as VerdocsToast}from"./Toast-CyvDgtoV.js";import{S as SDKError}from"./errors-C1sRVZWv.js";import{S as Store}from"./Datastore-C_IIZj49.js";import"./_commonjsHelpers-BFTU3MAI.js";import"./index-dzBXqXlK.js";import"./Types-Dl7Xw8F0.js";var verdocsSignCss='@-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-sign{display:-ms-flexbox;display:flex;overflow:hidden;position:relative;min-height:600px;-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-sign div{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-sign input{vertical-align:top}verdocs-sign>.document{-ms-flex:1;flex:1;width:100%;height:100%;-ms-flex-item-align:center;align-self:center;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;max-width:1200px;min-height:200px;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-sign>.document .inner{width:100%;max-width:1028px}verdocs-sign .cover{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:5000;position:absolute;padding-top:100px;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;background:rgba(0, 0, 0, 0.5)}verdocs-sign .agree{-ms-flex:0;flex:0;width:600px;display:-ms-flexbox;display:flex;max-width:90%;padding:30px 15px;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff}verdocs-sign .agree .header{-ms-flex:0 0 56px;flex:0 0 56px}verdocs-sign .agree li{margin:0.5em 0}verdocs-sign verdocs-ok-dialog .background-overlay{-ms-flex-align:start;align-items:flex-start;padding-top:100px}verdocs-sign .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-sign .fatal-error{position:absolute;z-index:100;top:0;left:0;right:0;bottom:0;background-color:#4a4a4a;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-sign .fatal-error .placeholder{position:absolute;opacity:0.1;z-index:-1;top:0;left:0;right:0;bottom:0;width:612px;height:792px;-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);margin-top:15px}verdocs-sign .fatal-error .message{max-width:360px;width:50%;font-size:16px;background:white;-webkit-box-shadow:3px 3px 9px -1px rgba(0, 0, 0, 0.2470588235);box-shadow:3px 3px 9px -1px rgba(0, 0, 0, 0.2470588235)}verdocs-sign .fatal-error .header{color:white;font-size:18px;font-weight:500;padding:5px 10px;margin:0 0 10px 0;background:#4c56cb}verdocs-sign .fatal-error p{margin:1rem;font-size:14px;font-weight:400;padding:0 10px}@media print{verdocs-sign .header{display:none}}#verdocs-sign-header{color:#fff;width:100%;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 46px;flex:0 0 46px;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)}#verdocs-sign-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 12px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}#verdocs-sign-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-sign-header .title{font-size:18px;font-weight:500;overflow:hidden;white-space:nowrap;padding:0 10px 0 0;text-overflow:ellipsis}.spinner-overlay{position:fixed;top:0;left:0;right:0;bottom:0;z-index:1000;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;background:rgba(0, 0, 0, 0.4980392157);-ms-flex-pack:center;justify-content:center}';var DEFAULT_DISCLOSURE='\n<ul>\n <li>\n Agree to use electronic records and signatures, and confirm you have read the\n <a href="https://verdocs.com/en/electronic-record-signature-disclosure/" target="_blank">\n Electronic Record and Signatures Disclosure</a>.</li>\n <li>\n Agree to Verdocs\'\n <a href="https://verdocs.com/en/eula" target="_blank">\n End User License Agreement</a>\n and confirm you have read Verdocs\'\n <a href="https://verdocs.com/en/privacy-policy/" target="_blank">\n Privacy Policy</a>.\n </li>\n</ul>';var inProgressMenuOptions=[{id:"later",label:"Finish Later"},{id:"decline",label:"Decline to Sign"},{id:"print",label:"Print Without Signing"},{id:"download",label:"Download"}];var doneMenuOptions=[{id:"print",label:"Print"},{id:"download",label:"Download"}];var VerdocsSign=function(){function e(e){registerInstance(this,e);this.sdkError=createEvent(this,"sdkError");this.envelopeLoaded=createEvent(this,"envelopeLoaded");this.envelopeUpdated=createEvent(this,"envelopeUpdated");this.endpoint=DefaultEndpoint;this.envelopeId=null;this.roleId=null;this.inviteCode=null;this.headerTargetId=null;this.recipient=null;this.hasSignature=false;this.nextButtonLabel="Start";this.nextSubmits=false;this.fatalErrorHeader="";this.fatalErrorMessage="";this.focusedField="";this.disclosure=DEFAULT_DISCLOSURE;this.submitting=false;this.submitted=false;this.isDone=false;this.showDone=false;this.showLoadError=false;this.finishLater=false;this.showFinishLater=false;this.agreed=false;this.documentsSingularPlural="document";this.authStep=null;this.authMethodStates={};this.kbaQuestions=null;this.showSpinner=false;this.kbaChoices=[];this.loading=true;this.envelope=null}e.prototype.componentWillLoad=function(){if(!this.endpoint){console.log("[SIGN] Creating signing endpoint");this.endpoint=new VerdocsEndpoint({sessionType:"signing"})}};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,n,s,r,o,a;return __generator(this,(function(l){switch(l.label){case 0:if(!this.envelopeId){(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError("[SIGN] Missing required envelopId",500,""));return[2]}if(!this.roleId){(t=this.sdkError)===null||t===void 0?void 0:t.emit(new SDKError("[SIGN] Missing required roleId",500,""));return[2]}if(!this.inviteCode){(i=this.sdkError)===null||i===void 0?void 0:i.emit(new SDKError("[SIGN] Missing required inviteCode",500,""));return[2]}l.label=1;case 1:l.trys.push([1,3,,4]);console.log("[SIGN] Processing invite code for ".concat(this.envelopeId," / ").concat(this.roleId));return[4,startSigningSession(this.endpoint,this.envelopeId,this.roleId,this.inviteCode)];case 2:o=l.sent();console.log("[SIGN] Authentication successful",o);this.processAuthResponse(o);return[3,4];case 3:a=l.sent();console.log("[SIGN] Error with signing session",a);(n=this.sdkError)===null||n===void 0?void 0:n.emit(new SDKError(a.message,(s=a.response)===null||s===void 0?void 0:s.status,(r=a.response)===null||r===void 0?void 0:r.data));this.showLoadError=true;return[3,4];case 4:return[2]}}))}))};e.prototype.componentDidRender=function(){var e=this.headerTargetId?document.getElementById(this.headerTargetId):null;var t=document.getElementById("verdocs-sign-header");if(e&&t){console.log("[SIGN] Moving header");t.remove();e.append(t)}};e.prototype.processAuthResponse=function(e){var t,i,n;var s=e.envelope,r=e.recipient;var o=r.auth_step;this.recipient=r;this.envelope=s;this.disclosure=((i=(t=this.envelope)===null||t===void 0?void 0:t.organization)===null||i===void 0?void 0:i.disclaimer)||DEFAULT_DISCLOSURE;this.authStep=o;this.agreed=r.agreed;this.submitted=r.status==="submitted";this.isDone=this.submitted;this.showDone=this.submitted;Store.updateEnvelope(this.envelopeId,s);if(this.envelope.documents.length>0){this.documentsSingularPlural="document(s)"}this.authMethodStates=r.auth_method_states||{};this.kbaQuestions=r.kba_questions;if(Object.values(this.authMethodStates).includes("failed")){this.fatalErrorHeader="Recipient Verification Failed";this.fatalErrorMessage="We were unable to verify your identity. The sender has been notified.";this.isDone=true}if(this.envelope.status==="canceled"){this.fatalErrorHeader="Unable to Start Signing Session";this.fatalErrorMessage="This envelope has been canceled. The sender has been notified."}else if(r.status==="declined"){this.fatalErrorHeader="Declined";this.fatalErrorMessage="You have declined to sign this envelope. The sender has been notified."}else if(this.agreed){this.nextButtonLabel="Next"}this.checkRecipientFields();(n=this.envelopeLoaded)===null||n===void 0?void 0:n.emit({endpoint:this.endpoint,envelope:this.envelope})};e.prototype.handleClickAgree=function(){var e=this;this.submitting=true;envelopeRecipientAgree(this.endpoint,this.envelopeId,this.roleId,true,this.disclosure).then((function(){var t;e.nextButtonLabel="Next";e.recipient.agreed=true;e.submitting=false;e.agreed=true;(t=e.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:e.endpoint,envelope:e.envelope,event:"agreed"})})).catch((function(t){var i,n,s;console.log("[SIGN] Update failure",t);e.submitting=false;(i=e.sdkError)===null||i===void 0?void 0:i.emit(new SDKError(t.message,(n=t.response)===null||n===void 0?void 0:n.status,(s=t.response)===null||s===void 0?void 0:s.data))}))};e.prototype.handleOptionSelected=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,n,s,r,o,a,l;return __generator(this,(function(d){switch(d.label){case 0:o=e.detail.id;switch(o){case"later":return[3,1];case"claim":return[3,2];case"decline":return[3,3];case"print":return[3,5];case"download":return[3,6]}return[3,7];case 1:this.finishLater=true;this.showFinishLater=true;(t=this.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,envelope:this.envelope,event:"later"});return[3,7];case 2:VerdocsToast("This feature will be available in an upcoming release.");(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:this.envelope,event:"claimed"});return[3,7];case 3:this.submitting=true;return[4,envelopeRecipientDecline(this.endpoint,this.envelopeId,this.roleId)];case 4:a=d.sent();console.log("[SIGN] Decline result",a);(n=this.envelopeUpdated)===null||n===void 0?void 0:n.emit({endpoint:this.endpoint,envelope:this.envelope,event:"declined"});this.submitting=false;this.fatalErrorHeader="Declined";this.fatalErrorMessage="You have declined to sign this envelope. The sender has been notified.";return[3,7];case 5:window.print();(s=this.envelopeUpdated)===null||s===void 0?void 0:s.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});return[3,7];case 6:{l=this.envelope.documents.find((function(e){return e.type==="attachment"}));if(l){saveAttachment(this.endpoint,this.envelope,l.id).catch((function(e){console.log("[SIGN] Error downloading PDF",e)}));(r=this.envelopeUpdated)===null||r===void 0?void 0:r.emit({endpoint:this.endpoint,envelope:this.envelope,event:"downloaded"})}}return[3,7];case 7:return[2]}}))}))};e.prototype.updateRecipientFieldValue=function(e,t){var i=this;console.log("[SIGN] updateRecipientFieldValue",e,t);this.getRecipientFields().forEach((function(n){if(n.name===e){n.value=t.value;n.settings=t.settings;updateDocumentFieldValue(n);i.checkRecipientFields()}}))};e.prototype.saveFieldChange=function(e,t){var i=this;console.log("[SIGN] saveFieldChange",e,t);updateEnvelopeField(this.endpoint,this.envelopeId,e,t).then((function(t){return i.updateRecipientFieldValue(e,t)})).catch((function(e){var t,n,s,r,o,a;if(((t=e.response)===null||t===void 0?void 0:t.status)===401&&((s=(n=e.response)===null||n===void 0?void 0:n.data)===null||s===void 0?void 0:s.error)==="jwt expired"){console.log("[SIGN] Signing session expired");i.fatalErrorHeader="Signing Session Expired";i.fatalErrorMessage="Please reload your browser to continue."}else{console.log("[SIGN] Server error",e)}(r=i.sdkError)===null||r===void 0?void 0:r.emit(new SDKError(e.message,(o=e.response)===null||o===void 0?void 0:o.status,(a=e.response)===null||a===void 0?void 0:a.data))}))};e.prototype.handleFieldChange=function(e,t){return __awaiter(this,void 0,void 0,(function(){var i,n,s,r,o,a,l;var d=this;return __generator(this,(function(c){switch(c.label){case 0:i=t.target,n=i.value,s=i.checked;r=e.type;switch(r){case"textarea":return[3,1];case"textbox":return[3,1];case"checkbox":return[3,2];case"radio":return[3,3];case"dropdown":return[3,4];case"initial":return[3,5];case"signature":return[3,8];case"date":return[3,11];case"timestamp":return[3,12]}return[3,13];case 1:return[2,this.saveFieldChange(e.name,{prepared:false,value:n})];case 2:{return[2,this.saveFieldChange(e.name,{prepared:false,value:String(t.target.checked)})]}c.label=3;case 3:{return[2,this.saveFieldChange(e.name,{prepared:false,value:String(t.target.checked)})]}c.label=4;case 4:console.log("Saving dropdown",e.name,t.detail);return[2,this.saveFieldChange(e.name,{prepared:false,value:t.detail})];case 5:if(!t.detail){return[2]}this.showSpinner=true;return[4,fetch(t.detail)];case 6:return[4,c.sent().blob()];case 7:o=c.sent();return[2,createInitials(this.endpoint,"initial",o).then((function(t){return __awaiter(d,void 0,void 0,(function(){var i;return __generator(this,(function(n){switch(n.label){case 0:return[4,updateEnvelopeFieldInitials(this.endpoint,this.envelopeId,e.name,t.id)];case 1:i=n.sent();this.updateRecipientFieldValue(e.name,i);this.showSpinner=false;return[2]}}))}))})).catch((function(e){console.log("Error updating initials",e);d.showSpinner=false}))];case 8:if(!t.detail){return[2]}this.showSpinner=true;return[4,fetch(t.detail)];case 9:return[4,c.sent().blob()];case 10:a=c.sent();return[2,createSignature(this.endpoint,"signature",a).then((function(t){return __awaiter(d,void 0,void 0,(function(){var i;return __generator(this,(function(n){switch(n.label){case 0:console.log("Signature update result",t);return[4,updateEnvelopeFieldSignature(this.endpoint,this.envelopeId,e.name,t.id)];case 1:i=n.sent();this.updateRecipientFieldValue(e.name,i);this.showSpinner=false;return[2]}}))}))})).catch((function(e){console.warn("[SIGN] Error updating signature",e);d.showSpinner=false}))];case 11:l=t.detail.formattedDate;if(l){return[2,this.saveFieldChange(e.name,{prepared:false,value:l})]}return[3,14];case 12:console.log("[SIGN] Updating timestamp",{value:n,ts:t.target.getAttribute("timestamp")});return[3,14];case 13:console.log("[SIGN] Unhandled field update",{value:n,checked:s},e);return[3,14];case 14:return[2]}}))}))};e.prototype.isFieldFilled=function(e){var t=e.value,i=t===void 0?"":t;switch(e.type){case"textarea":case"textbox":switch(e.validator||""){case"email":return isValidEmail(i);case"phone":return isValidPhone(i);default:return(i||"").trim()!==""}case"signature":return i==="signed";case"initial":return i==="initialed";case"timestamp":return true;case"date":return!!i;case"attachment":return i==="attached";case"dropdown":return i!=="";case"checkbox":return i==="true";case"radio":if(!!e.group){return this.getRecipientFields().filter((function(t){return t.group===e.group})).some((function(e){return e.value==="true"}))}return e.value==="true";default:return false}};e.prototype.isFieldValid=function(e){return!e.required||this.isFieldFilled(e)};e.prototype.getSortedFillableFields=function(){var e=this.getRecipientFields().filter((function(e){return e.type!=="timestamp"}));sortFields(e);return e};e.prototype.handleNext=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,n,s,r,o,a,l,d;var c=this;return __generator(this,(function(h){switch(h.label){case 0:if(!this.nextSubmits)return[3,5];h.label=1;case 1:h.trys.push([1,3,,4]);(e=document.getElementById("air-datepicker-global-container"))===null||e===void 0?void 0:e.remove();this.submitting=true;return[4,envelopeRecipientSubmit(this.endpoint,this.envelopeId,this.roleId)];case 2:t=h.sent();console.log("[SIGN] Submitted successfully",t);this.recipient.status="submitted";this.showDone=true;console.log("[SIGN] Reloading envelope");getEnvelope(this.endpoint,this.envelopeId).then((function(e){c.envelope=e;c.submitting=false})).catch((function(e){console.log("[SIGN] Error reloading envelope",e);c.submitting=false}));return[3,4];case 3:i=h.sent();console.log("[SIGN] Error submitting",i);return[3,4];case 4:return[2];case 5:n=this.getSortedFillableFields().filter((function(e){return e.required&&!c.isFieldFilled(e)}));sortFields(n);s=n.findIndex((function(e){return e.name===c.focusedField}));r=s+1;if(r>=n.length){r=0}o=n[r];a=0;if(a<n.length&&["signature","initial"].includes(o.type)&&["initialed","signed"].includes(o.value)){a++;r++;if(r>=n.length){r=0}o=n[r]}if(a>=n.length){o=null}if(o){l=getFieldId(o);d=document.getElementById(l);d===null||d===void 0?void 0:d.scrollIntoView({behavior:"smooth"});d===null||d===void 0?void 0:d.focusField();this.focusedField=o.name}return[2]}}))}))};e.prototype.getRecipientFields=function(){var e=this;return this.envelope.fields.filter((function(t){return t.role_name===e.recipient.role_name}))};e.prototype.checkRecipientFields=function(){var e=this;var t=this.getRecipientFields().filter((function(t){return!e.isFieldValid(t)}));if(t.length<1){this.nextButtonLabel="Finish";if(!this.nextSubmits){this.nextSubmits=true}}else{console.log("[SIGN] Invalid fields remaining",t.map((function(e){return e.name})));this.nextButtonLabel="Next";this.nextSubmits=false}};e.prototype.attachFieldAttributes=function(e,t,i){var n=this;if(i.getAttribute("attached")==="1"){return}i.setAttribute("attached","1");i.addEventListener("input",(function(e){if(e.target.type==="radio"||e.target.type==="checkbox"){n.handleFieldChange(t,e).finally((function(){return n.checkRecipientFields()}))}else{n.checkRecipientFields()}}));i.addEventListener("attached",(function(i){return __awaiter(n,void 0,void 0,(function(){var n,s,r;return __generator(this,(function(o){switch(o.label){case 0:console.log("[SIGN] onAttached",i.detail,i.target.value);this.showSpinner=true;o.label=1;case 1:o.trys.push([1,3,,4]);return[4,uploadEnvelopeFieldAttachment(this.endpoint,this.envelopeId,t.name,i.detail)];case 2:n=o.sent();this.updateRecipientFieldValue(t.name,n);this.checkRecipientFields();s=renderDocumentField("envelope",t,e,{disabled:false,editable:false,draggable:false,done:this.isDone});this.attachFieldAttributes(e,t,s);this.showSpinner=false;return[3,4];case 3:r=o.sent();console.log("Error uploading attachment",r);VerdocsToast("Unable to upload attachment, please try again later",{style:"error"});this.showSpinner=false;return[3,4];case 4:return[2]}}))}))}));i.addEventListener("deleted",(function(i){return __awaiter(n,void 0,void 0,(function(){var n,s,r;return __generator(this,(function(o){switch(o.label){case 0:console.log("[SIGN] onDeleted",i.detail,i.target.value);this.showSpinner=true;o.label=1;case 1:o.trys.push([1,3,,4]);return[4,deleteEnvelopeFieldAttachment(this.endpoint,this.envelopeId,t.name)];case 2:n=o.sent();console.log("[SIGN] Deleted attachment",n);this.updateRecipientFieldValue(t.name,n);this.checkRecipientFields();s=renderDocumentField("envelope",t,e,{disabled:false,editable:false,draggable:false,done:this.isDone});this.attachFieldAttributes(e,t,s);this.showSpinner=false;return[3,4];case 3:r=o.sent();console.log("Error uploading attachment",r);VerdocsToast("Unable to upload attachment, please try again later",{style:"error"});this.showSpinner=false;return[3,4];case 4:return[2]}}))}))}));i.addEventListener("focusout",(function(e){if(t.type!=="dropdown"&&t.type!=="attachment"){n.handleFieldChange(t,e).finally((function(){return n.checkRecipientFields()}))}}));i.addEventListener("fieldChange",(function(e){n.handleFieldChange(t,e).finally((function(){return n.checkRecipientFields()}))}));i.setAttribute("templateid",this.envelope.template_id);i.setAttribute("fieldname",t.name);i.setAttribute("page",e.pageNumber);i.setAttribute("xScale",e.xScale);i.setAttribute("yScale",e.yScale);var s=formatFullName(this.recipient);i.setAttribute("initials",fullNameToInitials(s));i.setAttribute("name",s)};e.prototype.handlePageRendered=function(e){var t=this;var i=e.detail;var n=this.getSortedFillableFields();console.log("[SIGN] Rendering fields for page",i.pageNumber,n);n.forEach((function(e,n){if(e.page!==i.pageNumber){return}var s=renderDocumentField("envelope",e,i,{disabled:false,editable:false,draggable:false,done:t.isDone},n);if(!s){return}if(Array.isArray(s)){s.map((function(n){return t.attachFieldAttributes(i,e,n)}))}else{t.attachFieldAttributes(i,e,s)}}));this.envelope.recipients.filter((function(e){return e.role_name!==t.recipient.role_name&&(e.status==="invited"||e.status==="opened"||e.status==="pending")})).forEach((function(){t.getRecipientFields().filter((function(e){return e.page===i.pageNumber})).forEach((function(e){var n=renderDocumentField("envelope",e,i,{disabled:true,editable:false,draggable:false,done:t.isDone});if(!n){return}if(Array.isArray(n)){n.map((function(n){return t.attachFieldAttributes(i,e,n)}))}else{t.attachFieldAttributes(i,e,n)}}))}));this.checkRecipientFields()};e.prototype.handleAuthenticateSigner=function(e){var t=this;console.log("[SIGN] Submitting authentication step",e);verifySigner(this.endpoint,e).then((function(e){console.log("[SIGN] Verification successful",e);t.processAuthResponse(e)})).catch((function(e){var i,n,s,r,o;console.log("[SIGN] Error submitting authentication step",e);if((s=(n=(i=e.response)===null||i===void 0?void 0:i.data)===null||n===void 0?void 0:n.error)===null||s===void 0?void 0:s.includes("failed")){t.fatalErrorHeader="Recipient Verification Failed";t.fatalErrorMessage="We were unable to verify your identity. The sender has been notified.";t.isDone=true}else{VerdocsToast(((o=(r=e.response)===null||r===void 0?void 0:r.data)===null||o===void 0?void 0:o.error)||"Unable to verify your identity. Please try again.",{style:"error"})}}))};e.prototype.render=function(){var e=this;console.log("[SIGN] Rendering",{authStep:this.authStep});if(this.showLoadError){return h(Host,null,h("verdocs-ok-dialog",{heading:"Unable to Start Signing",message:"Sorry, your invite code is invalid or has expired. Please check your email for an updated invitation, or contact the sender.",buttonLabel:"OK",onNext:function(){window.location.reload()}}))}if(!this.envelope){return h(Host,null,h("verdocs-loader",null))}if(this.fatalErrorMessage){return h(Host,{class:{agreed:this.agreed}},h("div",{class:"fatal-error"},h("div",{class:"message"},h("div",{class:"header"},this.fatalErrorHeader),h("p",null,this.fatalErrorMessage))))}if(this.isDone){return h(Host,{class:{agreed:this.agreed}},h("verdocs-view",{endpoint:this.endpoint,envelopeId:this.envelopeId,onSdkError:function(t){var i;return(i=e.sdkError)===null||i===void 0?void 0:i.emit(t.detail)}}),this.showDone&&h("verdocs-ok-dialog",{heading:"You're Done!",message:"You can access the ".concat(this.documentsSingularPlural," at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached."),onNext:function(t){t.preventDefault();t.stopPropagation();e.showDone=false;e.isDone=true}}),this.submitting&&h("div",{class:"loading-indicator"},h("verdocs-loader",null)))}if(!this.agreed){return h(Host,{class:"agreed"},h("div",{id:"verdocs-sign-header"},h("div",{class:"inner"},h("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),h("div",{class:"title"},this.envelope.name))),h("div",{class:"document",style:{paddingTop:"15px"}},h("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"})),h("div",{class:"cover"},h("div",{class:"agree"},h("verdocs-checkbox",{name:"agree",label:"By checking this box, you:",onInput:function(){return e.handleClickAgree()}}),h("div",{innerHTML:this.disclosure}))))}if(this.authStep==="passcode"){return h(Host,{class:"kba"},h("div",{id:"verdocs-sign-header"},h("div",{class:"inner"},h("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),h("div",{class:"title"},this.envelope.name))),h("div",{class:"document",style:{paddingTop:"15px"}},h("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"})),h("div",{class:"cover"},h("div",{class:"kba"},h("verdocs-kba-dialog",{mode:"text",step:1,steps:1,placeholder:"Enter your passcode...",helptitle:"Document is protected by a Passcode",helptext:"Please enter your Passcode to proceed. If you do not have one, please contact the sender.",label:"Passcode",onNext:function(t){return e.handleAuthenticateSigner({auth_method:"passcode",code:t.detail})}}))))}if(this.authStep==="email"){return h("verdocs-otp-dialog",{endpoint:this.endpoint,method:"email",onNext:function(t){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){this.processAuthResponse(t.detail.response);return[2]}))}))}})}if(this.authStep==="kba"&&!this.authMethodStates.kba){return h(Host,{class:"kba"},h("div",{id:"verdocs-sign-header"},h("div",{class:"inner"},h("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),h("div",{class:"title"},this.envelope.name))),h("div",{class:"document",style:{paddingTop:"15px"}},h("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"})),h("div",{class:"cover"},h("div",{class:"kba"},h("verdocs-kba-dialog",{mode:"identity",helptitle:"Document requires identity verification",helptext:"Please complete your contact details to proceed.",recipient:this.recipient,onNext:function(t){return __awaiter(e,void 0,void 0,(function(){var e;return __generator(this,(function(i){e=t.detail;this.handleAuthenticateSigner({auth_method:"kba",first_name:e.first_name,last_name:e.last_name,address:e.address,city:e.city,state:e.state,zip:e.zip,dob:e.dob});return[2]}))}))}}))))}if(this.authStep==="kba"&&this.authMethodStates.kba==="questions"){var t=this.kbaChoices.length;var i=this.kbaQuestions[t];return h(Host,{class:"kba"},h("div",{id:"verdocs-sign-header"},h("div",{class:"inner"},h("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),h("div",{class:"title"},this.envelope.name))),h("div",{class:"document",style:{paddingTop:"15px"}},h("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"})),h("div",{class:"cover"},h("div",{class:"kba"},this.kbaChoices.length>=this.kbaQuestions.length?h("verdocs-spinner",null):h("verdocs-kba-dialog",{mode:"choice",helptitle:"Your identity requires additional verification",helptext:(i===null||i===void 0?void 0:i.prompt)||"Please select one of the options below.",choices:(i===null||i===void 0?void 0:i.answer)||["Skip Question"],step:t+1,steps:this.kbaQuestions.length,onNext:function(t){return __awaiter(e,void 0,void 0,(function(){var e,i;var n=this;return __generator(this,(function(s){e=t.detail;this.kbaChoices=__spreadArray(__spreadArray([],this.kbaChoices,true),[e],false);if(this.kbaChoices.length>=this.kbaQuestions.length){i=this.kbaQuestions.map((function(e,t){return{type:e.type,answer:n.kbaChoices[t]}}));console.log("Submitting KBA responses",this.kbaChoices,i);this.handleAuthenticateSigner({auth_method:"kba",responses:i})}return[2]}))}))}}))))}return h(Host,null,h("div",{id:"verdocs-sign-header"},h("div",{class:"inner"},h("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),h("div",{class:"title"},this.envelope.name),h("div",{style:{flex:"1"}}),!this.finishLater&&h("verdocs-button",{size:"xsmall",label:this.nextButtonLabel,disabled:!this.agreed||this.submitting,onClick:function(){return e.handleNext()}}),h("div",{style:{marginLeft:"10px"}}),h("verdocs-dropdown",{options:!this.isDone&&!this.finishLater?inProgressMenuOptions:doneMenuOptions,onOptionSelected:function(t){return e.handleOptionSelected(t)}}))),h("div",{class:"document",style:{paddingTop:"15px"}},(this.envelope.documents||[]).map((function(t){var i=integerSequence(1,t.pages);return h(Fragment,null,i.map((function(i){var n;var s=((n=t.page_sizes)===null||n===void 0?void 0:n[i])||{width:612,height:792};return h("verdocs-envelope-document-page",{envelopeId:e.envelopeId,documentId:t.id,endpoint:e.endpoint,virtualWidth:s.width,virtualHeight:s.height,pageNumber:i,onPageRendered:function(t){return e.handlePageRendered(t)},type:"filled",layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))}))),this.showFinishLater&&h("verdocs-ok-dialog",{heading:"You've saved your document to finish later.",message:"To complete the ".concat(this.documentsSingularPlural,", use the link in the original email notification inviting you to review and finish the document."),onNext:function(){return e.showFinishLater=false}}),this.showDone&&h("verdocs-ok-dialog",{heading:"You're Done!",message:"You can access the ".concat(this.documentsSingularPlural," at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached."),onNext:function(){e.showDone=false;e.isDone=true}}),this.submitting||this.showSpinner&&h("verdocs-portal",null,h("div",{class:"spinner-overlay"},h("verdocs-spinner",null))))};return e}();VerdocsSign.style=verdocsSignCss;export{VerdocsSign as verdocs_sign};
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,i,n){function s(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n["throw"](e))}catch(e){r(e)}}function l(e){e.done?i(e.value):s(e.value).then(o,a)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,s,r,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return l([e,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(o&&(o=0,a[0]&&(i=0)),i)try{if(n=1,s&&(r=a[0]&2?s["return"]:a[0]?s["throw"]||((r=s["return"])&&r.call(s),0):s.next)&&!(r=r.call(s,a[1])).done)return r;if(s=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;s=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(a[0]===6&&i.label<r[1]){i.label=r[1];r=a;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(a);break}if(r[2])i.ops.pop();i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e];s=0}finally{n=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,i){if(i||arguments.length===2)for(var n=0,s=t.length,r;n<s;n++){if(r||!(n in t)){if(!r)r=Array.prototype.slice.call(t,0,n);r[n]=t[n]}}return e.concat(r||Array.prototype.slice.call(t))};import{r as registerInstance,c as createEvent,h,H as Host,F as Fragment}from"./index-CF7i8guW.js";import{VerdocsEndpoint,startSigningSession,envelopeRecipientAgree,envelopeRecipientDecline,updateEnvelopeField,createSignature,updateEnvelopeFieldSignature,createInitials,updateEnvelopeFieldInitials,isValidPhone,isValidEmail,sortFields,envelopeRecipientSubmit,getEnvelope,uploadEnvelopeFieldAttachment,deleteEnvelopeFieldAttachment,formatFullName,fullNameToInitials,verifySigner,integerSequence}from"@verdocs/js-sdk";import{a as saveAttachment,u as updateDocumentFieldValue,g as getFieldId,r as renderDocumentField}from"./utils-DmfOx9Ey.js";import{D as DefaultEndpoint}from"./Environment-C_Xku1v2.js";import{V as VerdocsToast}from"./Toast-CyvDgtoV.js";import{S as SDKError}from"./errors-C1sRVZWv.js";import{S as Store}from"./Datastore-C_IIZj49.js";import"./_commonjsHelpers-BFTU3MAI.js";import"./index-dzBXqXlK.js";import"./Types-Dl7Xw8F0.js";var verdocsSignCss='@-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-sign{display:-ms-flexbox;display:flex;overflow:hidden;position:relative;min-height:600px;-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-sign div{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-sign input{vertical-align:top}verdocs-sign>.document{-ms-flex:1;flex:1;width:100%;height:100%;-ms-flex-item-align:center;align-self:center;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;max-width:1200px;min-height:200px;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-sign>.document .inner{width:100%;max-width:1028px}verdocs-sign .cover{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:5000;position:absolute;padding-top:100px;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;background:rgba(0, 0, 0, 0.5)}verdocs-sign .agree{-ms-flex:0;flex:0;width:600px;display:-ms-flexbox;display:flex;max-width:90%;padding:30px 15px;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff}verdocs-sign .agree .header{-ms-flex:0 0 56px;flex:0 0 56px}verdocs-sign .agree li{margin:0.5em 0}verdocs-sign verdocs-ok-dialog .background-overlay{-ms-flex-align:start;align-items:flex-start;padding-top:100px}verdocs-sign .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-sign .fatal-error{position:absolute;z-index:100;top:0;left:0;right:0;bottom:0;background-color:#4a4a4a;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-sign .fatal-error .placeholder{position:absolute;opacity:0.1;z-index:-1;top:0;left:0;right:0;bottom:0;width:612px;height:792px;-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);margin-top:15px}verdocs-sign .fatal-error .message{max-width:360px;width:50%;font-size:16px;background:white;-webkit-box-shadow:3px 3px 9px -1px rgba(0, 0, 0, 0.2470588235);box-shadow:3px 3px 9px -1px rgba(0, 0, 0, 0.2470588235)}verdocs-sign .fatal-error .header{color:white;font-size:18px;font-weight:500;padding:5px 10px;margin:0 0 10px 0;background:#4c56cb}verdocs-sign .fatal-error p{margin:1rem;font-size:14px;font-weight:400;padding:0 10px}@media print{verdocs-sign .header{display:none}}#verdocs-sign-header{color:#fff;width:100%;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 46px;flex:0 0 46px;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)}#verdocs-sign-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 12px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}#verdocs-sign-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-sign-header .title{font-size:18px;font-weight:500;overflow:hidden;white-space:nowrap;padding:0 10px 0 0;text-overflow:ellipsis}.spinner-overlay{position:fixed;top:0;left:0;right:0;bottom:0;z-index:1000;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;background:rgba(0, 0, 0, 0.4980392157);-ms-flex-pack:center;justify-content:center}';var DEFAULT_DISCLOSURE='\n<ul>\n <li>\n Agree to use electronic records and signatures, and confirm you have read the\n <a href="https://verdocs.com/en/electronic-record-signature-disclosure/" target="_blank">\n Electronic Record and Signatures Disclosure</a>.</li>\n <li>\n Agree to Verdocs\'\n <a href="https://verdocs.com/en/eula" target="_blank">\n End User License Agreement</a>\n and confirm you have read Verdocs\'\n <a href="https://verdocs.com/en/privacy-policy/" target="_blank">\n Privacy Policy</a>.\n </li>\n</ul>';var inProgressMenuOptions=[{id:"later",label:"Finish Later"},{id:"decline",label:"Decline to Sign"},{id:"print",label:"Print Without Signing"},{id:"download",label:"Download"}];var doneMenuOptions=[{id:"print",label:"Print"},{id:"download",label:"Download"}];var VerdocsSign=function(){function e(e){registerInstance(this,e);this.sdkError=createEvent(this,"sdkError");this.envelopeLoaded=createEvent(this,"envelopeLoaded");this.envelopeUpdated=createEvent(this,"envelopeUpdated");this.endpoint=DefaultEndpoint;this.envelopeId=null;this.roleId=null;this.inviteCode=null;this.headerTargetId=null;this.recipient=null;this.hasSignature=false;this.nextButtonLabel="Start";this.nextSubmits=false;this.fatalErrorHeader="";this.fatalErrorMessage="";this.focusedField="";this.disclosure=DEFAULT_DISCLOSURE;this.submitting=false;this.submitted=false;this.isDone=false;this.showDone=false;this.showLoadError=false;this.finishLater=false;this.showFinishLater=false;this.agreed=false;this.documentsSingularPlural="document";this.authStep=null;this.authMethodStates={};this.kbaQuestions=null;this.showSpinner=false;this.kbaChoices=[];this.loading=true;this.envelope=null}e.prototype.componentWillLoad=function(){if(!this.endpoint){console.log("[SIGN] Creating signing endpoint");this.endpoint=new VerdocsEndpoint({sessionType:"signing"})}};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,n,s,r,o,a;return __generator(this,(function(l){switch(l.label){case 0:if(!this.envelopeId){(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError("[SIGN] Missing required envelopId",500,""));return[2]}if(!this.roleId){(t=this.sdkError)===null||t===void 0?void 0:t.emit(new SDKError("[SIGN] Missing required roleId",500,""));return[2]}if(!this.inviteCode){(i=this.sdkError)===null||i===void 0?void 0:i.emit(new SDKError("[SIGN] Missing required inviteCode",500,""));return[2]}l.label=1;case 1:l.trys.push([1,3,,4]);console.log("[SIGN] Processing invite code for ".concat(this.envelopeId," / ").concat(this.roleId));return[4,startSigningSession(this.endpoint,this.envelopeId,this.roleId,this.inviteCode)];case 2:o=l.sent();console.log("[SIGN] Authentication successful",o);this.processAuthResponse(o);return[3,4];case 3:a=l.sent();console.log("[SIGN] Error with signing session",a);(n=this.sdkError)===null||n===void 0?void 0:n.emit(new SDKError(a.message,(s=a.response)===null||s===void 0?void 0:s.status,(r=a.response)===null||r===void 0?void 0:r.data));this.showLoadError=true;return[3,4];case 4:return[2]}}))}))};e.prototype.componentDidRender=function(){var e=this.headerTargetId?document.getElementById(this.headerTargetId):null;var t=document.getElementById("verdocs-sign-header");if(e&&t){console.log("[SIGN] Moving header");t.remove();e.append(t)}};e.prototype.processAuthResponse=function(e){var t,i,n;var s=e.envelope,r=e.recipient;var o=r.auth_step;this.recipient=r;this.envelope=s;this.disclosure=((i=(t=this.envelope)===null||t===void 0?void 0:t.organization)===null||i===void 0?void 0:i.disclaimer)||DEFAULT_DISCLOSURE;this.authStep=o;this.agreed=r.agreed;this.submitted=r.status==="submitted";this.isDone=this.submitted;this.showDone=this.submitted;Store.updateEnvelope(this.envelopeId,s);if(this.envelope.documents.length>0){this.documentsSingularPlural="document(s)"}this.authMethodStates=r.auth_method_states||{};this.kbaQuestions=r.kba_questions;if(Object.values(this.authMethodStates).includes("failed")){this.fatalErrorHeader="Recipient Verification Failed";this.fatalErrorMessage="We were unable to verify your identity. The sender has been notified.";this.isDone=true}if(this.envelope.status==="canceled"){this.fatalErrorHeader="Unable to Start Signing Session";this.fatalErrorMessage="This envelope has been canceled. The sender has been notified."}else if(r.status==="declined"){this.fatalErrorHeader="Declined";this.fatalErrorMessage="You have declined to sign this envelope. The sender has been notified."}else if(this.agreed){this.nextButtonLabel="Next"}this.checkRecipientFields();(n=this.envelopeLoaded)===null||n===void 0?void 0:n.emit({endpoint:this.endpoint,envelope:this.envelope})};e.prototype.handleClickAgree=function(){var e=this;this.submitting=true;envelopeRecipientAgree(this.endpoint,this.envelopeId,this.roleId,true,this.disclosure).then((function(){var t;e.nextButtonLabel="Next";e.recipient.agreed=true;e.submitting=false;e.agreed=true;(t=e.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:e.endpoint,envelope:e.envelope,event:"agreed"})})).catch((function(t){var i,n,s;console.log("[SIGN] Update failure",t);e.submitting=false;(i=e.sdkError)===null||i===void 0?void 0:i.emit(new SDKError(t.message,(n=t.response)===null||n===void 0?void 0:n.status,(s=t.response)===null||s===void 0?void 0:s.data))}))};e.prototype.handleOptionSelected=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,n,s,r,o,a,l;return __generator(this,(function(d){switch(d.label){case 0:o=e.detail.id;switch(o){case"later":return[3,1];case"claim":return[3,2];case"decline":return[3,3];case"print":return[3,5];case"download":return[3,6]}return[3,7];case 1:this.finishLater=true;this.showFinishLater=true;(t=this.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,envelope:this.envelope,event:"later"});return[3,7];case 2:VerdocsToast("This feature will be available in an upcoming release.");(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:this.envelope,event:"claimed"});return[3,7];case 3:this.submitting=true;return[4,envelopeRecipientDecline(this.endpoint,this.envelopeId,this.roleId)];case 4:a=d.sent();console.log("[SIGN] Decline result",a);(n=this.envelopeUpdated)===null||n===void 0?void 0:n.emit({endpoint:this.endpoint,envelope:this.envelope,event:"declined"});this.submitting=false;this.fatalErrorHeader="Declined";this.fatalErrorMessage="You have declined to sign this envelope. The sender has been notified.";return[3,7];case 5:window.print();(s=this.envelopeUpdated)===null||s===void 0?void 0:s.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});return[3,7];case 6:{l=this.envelope.documents.find((function(e){return e.type==="attachment"}));if(l){saveAttachment(this.endpoint,this.envelope,l.id).catch((function(e){console.log("[SIGN] Error downloading PDF",e)}));(r=this.envelopeUpdated)===null||r===void 0?void 0:r.emit({endpoint:this.endpoint,envelope:this.envelope,event:"downloaded"})}}return[3,7];case 7:return[2]}}))}))};e.prototype.updateRecipientFieldValue=function(e,t){var i=this;console.log("[SIGN] updateRecipientFieldValue",e,t);this.getRecipientFields().forEach((function(n){if(n.name===e){n.value=t.value;n.settings=t.settings;updateDocumentFieldValue(n);i.checkRecipientFields()}}))};e.prototype.saveFieldChange=function(e,t){var i=this;console.log("[SIGN] saveFieldChange",e,t);updateEnvelopeField(this.endpoint,this.envelopeId,e,t).then((function(t){return i.updateRecipientFieldValue(e,t)})).catch((function(e){var t,n,s,r,o,a;if(((t=e.response)===null||t===void 0?void 0:t.status)===401&&((s=(n=e.response)===null||n===void 0?void 0:n.data)===null||s===void 0?void 0:s.error)==="jwt expired"){console.log("[SIGN] Signing session expired");i.fatalErrorHeader="Signing Session Expired";i.fatalErrorMessage="Please reload your browser to continue."}else{console.log("[SIGN] Server error",e)}(r=i.sdkError)===null||r===void 0?void 0:r.emit(new SDKError(e.message,(o=e.response)===null||o===void 0?void 0:o.status,(a=e.response)===null||a===void 0?void 0:a.data))}))};e.prototype.handleFieldChange=function(e,t){return __awaiter(this,void 0,void 0,(function(){var i,n,s,r,o,a,l;var d=this;return __generator(this,(function(c){switch(c.label){case 0:i=t.target,n=i.value,s=i.checked;r=e.type;switch(r){case"textarea":return[3,1];case"textbox":return[3,1];case"checkbox":return[3,2];case"radio":return[3,3];case"dropdown":return[3,4];case"initial":return[3,5];case"signature":return[3,8];case"date":return[3,11];case"timestamp":return[3,12]}return[3,13];case 1:return[2,this.saveFieldChange(e.name,{prepared:false,value:n})];case 2:{return[2,this.saveFieldChange(e.name,{prepared:false,value:String(t.target.checked)})]}c.label=3;case 3:{return[2,this.saveFieldChange(e.name,{prepared:false,value:String(t.target.checked)})]}c.label=4;case 4:console.log("Saving dropdown",e.name,t.detail);return[2,this.saveFieldChange(e.name,{prepared:false,value:t.detail})];case 5:if(!t.detail){return[2]}this.showSpinner=true;return[4,fetch(t.detail)];case 6:return[4,c.sent().blob()];case 7:o=c.sent();return[2,createInitials(this.endpoint,"initial",o).then((function(t){return __awaiter(d,void 0,void 0,(function(){var i;return __generator(this,(function(n){switch(n.label){case 0:return[4,updateEnvelopeFieldInitials(this.endpoint,this.envelopeId,e.name,t.id)];case 1:i=n.sent();this.updateRecipientFieldValue(e.name,i);this.showSpinner=false;return[2]}}))}))})).catch((function(e){console.log("Error updating initials",e);d.showSpinner=false}))];case 8:if(!t.detail){return[2]}this.showSpinner=true;return[4,fetch(t.detail)];case 9:return[4,c.sent().blob()];case 10:a=c.sent();return[2,createSignature(this.endpoint,"signature",a).then((function(t){return __awaiter(d,void 0,void 0,(function(){var i;return __generator(this,(function(n){switch(n.label){case 0:console.log("Signature update result",t);return[4,updateEnvelopeFieldSignature(this.endpoint,this.envelopeId,e.name,t.id)];case 1:i=n.sent();this.updateRecipientFieldValue(e.name,i);this.showSpinner=false;return[2]}}))}))})).catch((function(e){console.warn("[SIGN] Error updating signature",e);d.showSpinner=false}))];case 11:l=t.detail.formattedDate;if(l){return[2,this.saveFieldChange(e.name,{prepared:false,value:l})]}return[3,14];case 12:console.log("[SIGN] Updating timestamp",{value:n,ts:t.target.getAttribute("timestamp")});return[3,14];case 13:console.log("[SIGN] Unhandled field update",{value:n,checked:s},e);return[3,14];case 14:return[2]}}))}))};e.prototype.isFieldFilled=function(e){var t=e.value,i=t===void 0?"":t;switch(e.type){case"textarea":case"textbox":switch(e.validator||""){case"email":return isValidEmail(i);case"phone":return isValidPhone(i);default:return(i||"").trim()!==""}case"signature":return i==="signed";case"initial":return i==="initialed";case"timestamp":return true;case"date":return!!i;case"attachment":return i==="attached";case"dropdown":return i!=="";case"checkbox":return i==="true";case"radio":if(!!e.group){return this.getRecipientFields().filter((function(t){return t.group===e.group})).some((function(e){return e.value==="true"}))}return e.value==="true";default:return false}};e.prototype.isFieldValid=function(e){return!e.required||this.isFieldFilled(e)};e.prototype.getSortedFillableFields=function(){var e=this.getRecipientFields().filter((function(e){return e.type!=="timestamp"}));sortFields(e);return e};e.prototype.handleNext=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,n,s,r,o,a,l,d;var c=this;return __generator(this,(function(h){switch(h.label){case 0:if(!this.nextSubmits)return[3,5];h.label=1;case 1:h.trys.push([1,3,,4]);(e=document.getElementById("air-datepicker-global-container"))===null||e===void 0?void 0:e.remove();this.submitting=true;return[4,envelopeRecipientSubmit(this.endpoint,this.envelopeId,this.roleId)];case 2:t=h.sent();console.log("[SIGN] Submitted successfully",t);this.recipient.status="submitted";this.showDone=true;console.log("[SIGN] Reloading envelope");getEnvelope(this.endpoint,this.envelopeId).then((function(e){c.envelope=e;c.submitting=false})).catch((function(e){console.log("[SIGN] Error reloading envelope",e);c.submitting=false}));return[3,4];case 3:i=h.sent();console.log("[SIGN] Error submitting",i);return[3,4];case 4:return[2];case 5:n=this.getSortedFillableFields().filter((function(e){return e.required&&!c.isFieldFilled(e)}));sortFields(n);s=n.findIndex((function(e){return e.name===c.focusedField}));r=s+1;if(r>=n.length){r=0}o=n[r];a=0;if(a<n.length&&["signature","initial"].includes(o.type)&&["initialed","signed"].includes(o.value)){a++;r++;if(r>=n.length){r=0}o=n[r]}if(a>=n.length){o=null}if(o){l=getFieldId(o);d=document.getElementById(l);d===null||d===void 0?void 0:d.scrollIntoView({behavior:"smooth"});d===null||d===void 0?void 0:d.focusField();this.focusedField=o.name}return[2]}}))}))};e.prototype.getRecipientFields=function(){var e=this;return this.envelope.fields.filter((function(t){return t.role_name===e.recipient.role_name}))};e.prototype.checkRecipientFields=function(){var e=this;var t=this.getRecipientFields().filter((function(t){return!e.isFieldValid(t)}));if(t.length<1){this.nextButtonLabel="Finish";if(!this.nextSubmits){this.nextSubmits=true}}else{console.log("[SIGN] Invalid fields remaining",t.map((function(e){return e.name})));this.nextButtonLabel="Next";this.nextSubmits=false}};e.prototype.attachFieldAttributes=function(e,t,i){var n=this;if(i.getAttribute("attached")==="1"){return}i.setAttribute("attached","1");i.addEventListener("input",(function(e){if(e.target.type==="radio"||e.target.type==="checkbox"){n.handleFieldChange(t,e).finally((function(){return n.checkRecipientFields()}))}else{n.checkRecipientFields()}}));i.addEventListener("attached",(function(i){return __awaiter(n,void 0,void 0,(function(){var n,s,r;return __generator(this,(function(o){switch(o.label){case 0:console.log("[SIGN] onAttached",i.detail,i.target.value);this.showSpinner=true;o.label=1;case 1:o.trys.push([1,3,,4]);return[4,uploadEnvelopeFieldAttachment(this.endpoint,this.envelopeId,t.name,i.detail)];case 2:n=o.sent();this.updateRecipientFieldValue(t.name,n);this.checkRecipientFields();s=renderDocumentField("envelope",t,e,{disabled:false,editable:false,draggable:false,done:this.isDone});this.attachFieldAttributes(e,t,s);this.showSpinner=false;return[3,4];case 3:r=o.sent();console.log("Error uploading attachment",r);VerdocsToast("Unable to upload attachment, please try again later",{style:"error"});this.showSpinner=false;return[3,4];case 4:return[2]}}))}))}));i.addEventListener("deleted",(function(i){return __awaiter(n,void 0,void 0,(function(){var n,s,r;return __generator(this,(function(o){switch(o.label){case 0:console.log("[SIGN] onDeleted",i.detail,i.target.value);this.showSpinner=true;o.label=1;case 1:o.trys.push([1,3,,4]);return[4,deleteEnvelopeFieldAttachment(this.endpoint,this.envelopeId,t.name)];case 2:n=o.sent();console.log("[SIGN] Deleted attachment",n);this.updateRecipientFieldValue(t.name,n);this.checkRecipientFields();s=renderDocumentField("envelope",t,e,{disabled:false,editable:false,draggable:false,done:this.isDone});this.attachFieldAttributes(e,t,s);this.showSpinner=false;return[3,4];case 3:r=o.sent();console.log("Error uploading attachment",r);VerdocsToast("Unable to upload attachment, please try again later",{style:"error"});this.showSpinner=false;return[3,4];case 4:return[2]}}))}))}));i.addEventListener("focusout",(function(e){if(t.type!=="dropdown"&&t.type!=="attachment"){n.handleFieldChange(t,e).finally((function(){return n.checkRecipientFields()}))}}));i.addEventListener("fieldChange",(function(e){n.handleFieldChange(t,e).finally((function(){return n.checkRecipientFields()}))}));i.setAttribute("templateid",this.envelope.template_id);i.setAttribute("fieldname",t.name);i.setAttribute("page",e.pageNumber);i.setAttribute("xScale",e.xScale);i.setAttribute("yScale",e.yScale);var s=formatFullName(this.recipient);i.setAttribute("initials",fullNameToInitials(s));i.setAttribute("name",s)};e.prototype.handlePageRendered=function(e){var t=this;var i=e.detail;var n=this.getSortedFillableFields();console.log("[SIGN] Rendering fields for page",i.pageNumber,n);n.forEach((function(e,n){if(e.page!==i.pageNumber){return}var s=renderDocumentField("envelope",e,i,{disabled:false,editable:false,draggable:false,done:t.isDone},n);if(!s){return}if(Array.isArray(s)){s.map((function(n){return t.attachFieldAttributes(i,e,n)}))}else{t.attachFieldAttributes(i,e,s)}}));this.envelope.recipients.filter((function(e){return e.role_name!==t.recipient.role_name&&(e.status==="invited"||e.status==="opened"||e.status==="pending")})).forEach((function(){t.getRecipientFields().filter((function(e){return e.page===i.pageNumber})).forEach((function(e){var n=renderDocumentField("envelope",e,i,{disabled:true,editable:false,draggable:false,done:t.isDone});if(!n){return}if(Array.isArray(n)){n.map((function(n){return t.attachFieldAttributes(i,e,n)}))}else{t.attachFieldAttributes(i,e,n)}}))}));this.checkRecipientFields()};e.prototype.handleAuthenticateSigner=function(e){var t=this;console.log("[SIGN] Submitting authentication step",e);verifySigner(this.endpoint,e).then((function(e){console.log("[SIGN] Verification successful",e);t.processAuthResponse(e)})).catch((function(e){var i,n,s,r,o;console.log("[SIGN] Error submitting authentication step",e);if((s=(n=(i=e.response)===null||i===void 0?void 0:i.data)===null||n===void 0?void 0:n.error)===null||s===void 0?void 0:s.includes("failed")){t.fatalErrorHeader="Recipient Verification Failed";t.fatalErrorMessage="We were unable to verify your identity. The sender has been notified.";t.isDone=true}else{VerdocsToast(((o=(r=e.response)===null||r===void 0?void 0:r.data)===null||o===void 0?void 0:o.error)||"Unable to verify your identity. Please try again.",{style:"error"})}}))};e.prototype.render=function(){var e=this;console.log("[SIGN] Rendering",{authStep:this.authStep});if(this.showLoadError){return h(Host,null,h("verdocs-ok-dialog",{heading:"Unable to Start Signing",message:"Sorry, your invite code is invalid or has expired. Please check your email for an updated invitation, or contact the sender.",buttonLabel:"OK",onNext:function(){window.location.reload()}}))}if(!this.envelope){return h(Host,null,h("verdocs-loader",null))}if(this.fatalErrorMessage){return h(Host,{class:{agreed:this.agreed}},h("div",{class:"fatal-error"},h("div",{class:"message"},h("div",{class:"header"},this.fatalErrorHeader),h("p",null,this.fatalErrorMessage))))}if(this.isDone){return h(Host,{class:{agreed:this.agreed}},h("verdocs-view",{endpoint:this.endpoint,envelopeId:this.envelopeId,onSdkError:function(t){var i;return(i=e.sdkError)===null||i===void 0?void 0:i.emit(t.detail)}}),this.showDone&&h("verdocs-ok-dialog",{heading:"You're Done!",message:"You can access the ".concat(this.documentsSingularPlural," at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached."),onNext:function(t){t.preventDefault();t.stopPropagation();e.showDone=false;e.isDone=true}}),this.submitting&&h("div",{class:"loading-indicator"},h("verdocs-loader",null)))}if(!this.agreed){return h(Host,{class:"agreed"},h("div",{id:"verdocs-sign-header"},h("div",{class:"inner"},h("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),h("div",{class:"title"},this.envelope.name))),h("div",{class:"document",style:{paddingTop:"15px"}},h("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"})),h("div",{class:"cover"},h("div",{class:"agree"},h("verdocs-checkbox",{name:"agree",label:"By checking this box, you:",onInput:function(){return e.handleClickAgree()}}),h("div",{innerHTML:this.disclosure}))))}if(this.authStep==="passcode"){return h(Host,{class:"kba"},h("div",{id:"verdocs-sign-header"},h("div",{class:"inner"},h("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),h("div",{class:"title"},this.envelope.name))),h("div",{class:"document",style:{paddingTop:"15px"}},h("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"})),h("div",{class:"cover"},h("div",{class:"kba"},h("verdocs-kba-dialog",{mode:"text",step:1,steps:1,placeholder:"Enter your passcode...",helptitle:"Document is protected by a Passcode",helptext:"Please enter your Passcode to proceed. If you do not have one, please contact the sender.",label:"Passcode",onNext:function(t){return e.handleAuthenticateSigner({auth_method:"passcode",code:t.detail})}}))))}if(this.authStep==="email"){return h("verdocs-otp-dialog",{endpoint:this.endpoint,method:"email",onNext:function(t){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){this.processAuthResponse(t.detail.response);return[2]}))}))}})}if(this.authStep==="kba"&&!this.authMethodStates.kba){return h(Host,{class:"kba"},h("div",{id:"verdocs-sign-header"},h("div",{class:"inner"},h("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),h("div",{class:"title"},this.envelope.name))),h("div",{class:"document",style:{paddingTop:"15px"}},h("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"})),h("div",{class:"cover"},h("div",{class:"kba"},h("verdocs-kba-dialog",{mode:"identity",helptitle:"Document requires identity verification",helptext:"Please complete your contact details to proceed.",recipient:this.recipient,onNext:function(t){return __awaiter(e,void 0,void 0,(function(){var e;return __generator(this,(function(i){e=t.detail;this.handleAuthenticateSigner({auth_method:"kba",first_name:e.first_name,last_name:e.last_name,address:e.address,city:e.city,state:e.state,zip:e.zip,dob:e.dob});return[2]}))}))}}))))}if(this.authStep==="kba"&&this.authMethodStates.kba==="questions"){var t=this.kbaChoices.length;var i=this.kbaQuestions[t];return h(Host,{class:"kba"},h("div",{id:"verdocs-sign-header"},h("div",{class:"inner"},h("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),h("div",{class:"title"},this.envelope.name))),h("div",{class:"document",style:{paddingTop:"15px"}},h("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"})),h("div",{class:"cover"},h("div",{class:"kba"},this.kbaChoices.length>=this.kbaQuestions.length?h("verdocs-spinner",null):h("verdocs-kba-dialog",{mode:"choice",helptitle:"Your identity requires additional verification",helptext:(i===null||i===void 0?void 0:i.prompt)||"Please select one of the options below.",choices:(i===null||i===void 0?void 0:i.answer)||["Skip Question"],step:t+1,steps:this.kbaQuestions.length,onNext:function(t){return __awaiter(e,void 0,void 0,(function(){var e,i;var n=this;return __generator(this,(function(s){e=t.detail;this.kbaChoices=__spreadArray(__spreadArray([],this.kbaChoices,true),[e],false);if(this.kbaChoices.length>=this.kbaQuestions.length){i=this.kbaQuestions.map((function(e,t){return{type:e.type,answer:n.kbaChoices[t]}}));console.log("Submitting KBA responses",this.kbaChoices,i);this.handleAuthenticateSigner({auth_method:"kba",responses:i})}return[2]}))}))}}))))}return h(Host,null,h("div",{id:"verdocs-sign-header"},h("div",{class:"inner"},h("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),h("div",{class:"title"},this.envelope.name),h("div",{style:{flex:"1"}}),!this.finishLater&&h("verdocs-button",{size:"xsmall",label:this.nextButtonLabel,disabled:!this.agreed||this.submitting,onClick:function(){return e.handleNext()}}),h("div",{style:{marginLeft:"10px"}}),h("verdocs-dropdown",{options:!this.isDone&&!this.finishLater?inProgressMenuOptions:doneMenuOptions,onOptionSelected:function(t){return e.handleOptionSelected(t)}}))),h("div",{class:"document",style:{paddingTop:"15px"}},(this.envelope.documents||[]).map((function(t){var i=integerSequence(1,t.pages);return h(Fragment,null,i.map((function(i){var n;var s=((n=t.page_sizes)===null||n===void 0?void 0:n[i])||{width:612,height:792};return h("verdocs-envelope-document-page",{envelopeId:e.envelopeId,documentId:t.id,endpoint:e.endpoint,virtualWidth:s.width,virtualHeight:s.height,pageNumber:i,onPageRendered:function(t){return e.handlePageRendered(t)},type:"filled",layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))}))),this.showFinishLater&&h("verdocs-ok-dialog",{heading:"You've saved your document to finish later.",message:"To complete the ".concat(this.documentsSingularPlural,", use the link in the original email notification inviting you to review and finish the document."),onNext:function(){return e.showFinishLater=false}}),this.showDone&&h("verdocs-ok-dialog",{heading:"You're Done!",message:"You can access the ".concat(this.documentsSingularPlural," at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached."),onNext:function(){e.showDone=false;e.isDone=true}}),this.submitting||this.showSpinner&&h("verdocs-portal",null,h("div",{class:"spinner-overlay"},h("verdocs-spinner",null))))};return e}();VerdocsSign.style=verdocsSignCss;export{VerdocsSign as verdocs_sign};
|
2
2
|
//# sourceMappingURL=verdocs-sign.entry.js.map
|
@@ -1,2 +1,2 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,o,r){function i(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,a){function s(e){try{c(r.next(e))}catch(e){a(e)}}function n(e){try{c(r["throw"](e))}catch(e){a(e)}}function c(e){e.done?o(e.value):i(e.value).then(s,n)}c((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var o={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,s;return s={next:n(0),throw:n(1),return:n(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function n(e){return function(t){return c([e,t])}}function c(n){if(r)throw new TypeError("Generator is already executing.");while(s&&(s=0,n[0]&&(o=0)),o)try{if(r=1,i&&(a=n[0]&2?i["return"]:n[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,n[1])).done)return a;if(i=0,a)n=[n[0]&2,a.value];switch(n[0]){case 0:case 1:a=n;break;case 4:o.label++;return{value:n[1],done:false};case 5:o.label++;i=n[1];n=[0];continue;case 7:n=o.ops.pop();o.trys.pop();continue;default:if(!(a=o.trys,a=a.length>0&&a[a.length-1])&&(n[0]===6||n[0]===2)){o=0;continue}if(n[0]===3&&(!a||n[1]>a[0]&&n[1]<a[3])){o.label=n[1];break}if(n[0]===6&&o.label<a[1]){o.label=a[1];a=n;break}if(a&&o.label<a[2]){o.label=a[2];o.ops.push(n);break}if(a[2])o.ops.pop();o.trys.pop();continue}n=t.call(e,o)}catch(e){n=[6,e];i=0}finally{r=a=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host,F as Fragment,g as getElement}from"./index-CF7i8guW.js";import{VerdocsEndpoint,getTemplateDocumentPageDisplayUri,getTemplate}from"@verdocs/js-sdk";import{t as throttle,c as getControlStyles,g as getFieldId}from"./utils-CbfXTNEw.js";import{S as Store}from"./Datastore-C_IIZj49.js";import{c as createPopper}from"./popper-BfP9ezJQ.js";import"./_commonjsHelpers-BFTU3MAI.js";import"./index-dzBXqXlK.js";import"./Types-Dl7Xw8F0.js";var verdocsTemplateDocumentPageCss="@-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-template-document-page{width:100%;position:relative}verdocs-template-document-page .verdocs-template-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-template-document-page .verdocs-template-document-page-layer.img{width:100%}verdocs-template-document-page .placeholder{opacity:0.1;width:612px;height:792px;-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)}";var VerdocsTemplateDocumentPage=function(){function e(e){registerInstance(this,e);this.pageRendered=createEvent(this,"pageRendered");this.templateListenerId=null;this.endpoint=VerdocsEndpoint.getDefault();this.editable=false;this.disabled=false;this.done=false;this.templateId="";this.documentId="";this.pageNumber=1;this.virtualWidth=612;this.virtualHeight=792;this.layers=[{name:"page",type:"canvas"}];this.containerId="verdocs-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="";this.xScale=1;this.yScale=1;this.loading=true;this.template=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:e=this;return[4,getTemplateDocumentPageDisplayUri(this.endpoint,this.documentId,this.pageNumber)];case 1:e.pageDisplayUri=t.sent();this.listenToTemplate();return[2]}}))}))};e.prototype.componentDidLoad=function(){var e=this;this.resizeObserver=new ResizeObserver(throttle((function(t){for(var o=0,r=t;o<r.length;o++){var i=r[o];var a=i.contentRect.width;e.renderedWidth=a;e.renderedHeight=e.virtualHeight*(a/e.virtualWidth)}e.notifyRenderedSize()}),100));this.resizeObserver.observe(this.container)};e.prototype.componentDidUpdate=function(){this.notifyRenderedSize()};e.prototype.disconnectedCallback=function(){var e;(e=this.resizeObserver)===null||e===void 0?void 0:e.disconnect();this.unlistenToTemplate()};e.prototype.listenToTemplate=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){this.unlistenToTemplate();Store.subscribe("templates",this.templateId,(function(){return getTemplate(e.endpoint,e.templateId)}),false,(function(t){e.template=t;e.loading=false}));return[2]}))}))};e.prototype.unlistenToTemplate=function(){if(this.templateListenerId){Store.store.delListener(this.templateListenerId);this.templateListenerId=null}};e.prototype.notifyRenderedSize=function(){if(this.skipFirstNotification){this.skipFirstNotification=false;return}var e=this.renderedWidth/this.virtualWidth;if(this.xScale!==e){this.xScale=e}var t=this.renderedHeight/this.virtualHeight;if(this.yScale!==t){this.yScale=t}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:e,yScale:t})};e.prototype.render=function(){var e=this;if(this.loading){return h(Host,null,h("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",class:"placeholder",alt:"Placeholder page"}))}var t="".concat(this.renderedHeight,"px");return h(Host,{id:"".concat(this.containerId),style:{height:t,flex:"0 0 ".concat(t)}},this.layers.map((function(o){var r;return o.type==="div"?h("div",{class:"verdocs-template-document-page-layer",id:"".concat(e.containerId,"-").concat(o.name),style:{height:t}},o.name==="controls"&&(((r=e.template)===null||r===void 0?void 0:r.fields)||[]).filter((function(t){return t&&t.page===e.pageNumber})).map((function(t){var o,r;var i=getFieldId(t);var a=t.name,s=t.type,n=t.multiline;var c=e,l=c.xScale,d=c.yScale,u=c.templateId,p=c.editable,f=c.disabled,b=c.done,m=c.pageNumber;if(((o=t["setting"])===null||o===void 0?void 0:o.leading)>0||((r=t["settings"])===null||r===void 0?void 0:r.leading)>0){s="textarea";n=true}switch(s){case"textbox":return h("verdocs-field-textbox",{id:i,fieldname:a,source:"template",sourceid:u,editable:p,multiline:n,disabled:f,done:b,xscale:l,yscale:d,pagenumber:m,style:getControlStyles(t,l,d)});case"textarea":return h("verdocs-field-textarea",{id:i,fieldname:a,source:"template",sourceid:u,editable:p,disabled:f,done:b,xscale:l,yscale:d,pagenumber:m,style:getControlStyles(t,l,d)});case"date":return h("verdocs-field-date",{id:i,fieldname:a,source:"template",sourceid:u,editable:p,disabled:f,done:b,xscale:l,yscale:d,pagenumber:m,style:getControlStyles(t,l,d)});case"attachment":return h("verdocs-field-attachment",{id:i,fieldname:a,source:"template",sourceid:u,editable:p,disabled:f,done:b,xscale:l,yscale:d,pagenumber:m,style:getControlStyles(t,l,d)});case"dropdown":return h("verdocs-field-dropdown",{id:i,fieldname:a,source:"template",sourceid:u,editable:p,disabled:f,done:b,xscale:l,yscale:d,pagenumber:m,style:getControlStyles(t,l,d)});case"initial":return h("verdocs-field-initial",{id:i,fieldname:a,source:"template",sourceid:u,editable:p,disabled:f,done:b,xscale:l,yscale:d,pagenumber:m,style:getControlStyles(t,l,d)});case"signature":return h("verdocs-field-signature",{id:i,fieldname:a,source:"template",sourceid:u,editable:p,disabled:f,done:b,xscale:l,yscale:d,pagenumber:m,style:getControlStyles(t,e.xScale,e.yScale)});case"timestamp":return h("verdocs-field-timestamp",{id:i,fieldname:a,source:"template",sourceid:u,editable:p,disabled:f,done:b,xscale:l,yscale:d,pagenumber:m,style:getControlStyles(t,l,d)});case"checkbox":return h("verdocs-field-checkbox",{id:i,fieldname:a,source:"template",sourceid:u,editable:p,disabled:f,done:b,xscale:l,yscale:d,pagenumber:m,style:getControlStyles(t,l,d)});case"radio":return h("verdocs-field-radio",{id:i,fieldname:a,source:"template",sourceid:u,editable:p,disabled:f,done:b,xscale:l,yscale:d,pagenumber:m,style:getControlStyles(t,l,d)});default:return h(Fragment,null,a)}}))):e.pageDisplayUri?h("img",{class:"verdocs-template-document-page-layer img",id:"".concat(e.containerId,"-").concat(o.name),src:e.pageDisplayUri,alt:"Page ".concat(e.pageNumber),"aria-hidden":true,loading:"lazy",onLoad:function(t){e.naturalWidth=t.target.naturalWidth;e.naturalHeight=t.target.naturalHeight;e.aspectRatio=e.naturalWidth/e.naturalHeight;e.virtualHeight=e.virtualWidth/e.aspectRatio;e.renderedHeight=t.target.offsetWidth/e.aspectRatio}}):h("div",null)})))};Object.defineProperty(e.prototype,"container",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();VerdocsTemplateDocumentPage.style=verdocsTemplateDocumentPageCss;var verdocsToolbarIconCss='@-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-toolbar-icon{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-toolbar-icon .icon{display:inline-block;cursor:pointer}verdocs-toolbar-icon .icon svg{fill:#5c6575}verdocs-toolbar-icon .tooltip{display:none;-webkit-box-shadow:0 0 10px 1px #999999;box-shadow:0 0 10px 1px #999999;background:#ffffff;color:#33364b;max-width:240px;font-weight:bold;padding:5px 10px;font-size:13px;position:relative;border-radius:4px;z-index:20000;white-space:nowrap}verdocs-toolbar-icon .tooltip .arrow,verdocs-toolbar-icon .tooltip .arrow::before{position:absolute;width:8px;height:8px;background:inherit}verdocs-toolbar-icon .tooltip .arrow{visibility:hidden;top:-4px}verdocs-toolbar-icon .tooltip .arrow::before{visibility:visible;content:"";-webkit-transform:rotate(45deg);transform:rotate(45deg)}verdocs-toolbar-icon .tooltip[data-show]{display:block}verdocs-toolbar-icon .tooltip[data-popper-placement^=top]>.arrow{bottom:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=bottom]>.arrow{top:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=right]>.arrow{left:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]{padding:3px 10px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-1px}';var VerdocsToolbarIcon=function(){function e(e){registerInstance(this,e);this.text="";this.icon="";this.placement="bottom";this.containerId="verdocs-toolbar-icon-".concat(Math.random().toString(36).substring(2,11))}e.prototype.componentDidLoad=function(){this.popperInstance=createPopper(this.iconEl,this.tooltip,{placement:this.placement,modifiers:this.placement==="left"?[{name:"offset",options:{offset:[0,20]}}]:[]})};e.prototype.disconnectedCallback=function(){if(this.popperInstance){this.popperInstance.destroy();this.popperInstance=null}};e.prototype.show=function(){var e,t;(e=this.tooltip)===null||e===void 0?void 0:e.setAttribute("data-show","");(t=this.popperInstance)===null||t===void 0?void 0:t.update().catch((function(){}))};e.prototype.hide=function(){var e;(e=this.tooltip)===null||e===void 0?void 0:e.removeAttribute("data-show")};e.prototype.render=function(){var e=this;return h(Host,{key:"8163f7ebe7d2f3a13db305b411b454287a4b3729",class:{}},h("div",{key:"1782db14268643ad1620ebcd5efc6a27ff9fcc04","aria-describedby":this.containerId,class:"icon",innerHTML:this.icon,onMouseEnter:function(){return e.show()},onFocus:function(){return e.show()},onMouseLeave:function(){return e.hide()},onBlur:function(){return e.hide()},ref:function(t){return e.iconEl=t}}),h("div",{key:"54c1bb4abc22a943051ba2df8b557e6c02fdabef",id:this.containerId,role:"tooltip",class:"tooltip","data-popper-placement":this.placement,ref:function(t){return e.tooltip=t}},this.text,h("div",{key:"4d2c884923f2e79b375ffcfa2592cd914bead68c","data-popper-arrow":"true",class:"arrow"})))};return e}();VerdocsToolbarIcon.style=verdocsToolbarIconCss;export{VerdocsTemplateDocumentPage as verdocs_template_document_page,VerdocsToolbarIcon as verdocs_toolbar_icon};
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,o,r){function i(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,a){function s(e){try{c(r.next(e))}catch(e){a(e)}}function n(e){try{c(r["throw"](e))}catch(e){a(e)}}function c(e){e.done?o(e.value):i(e.value).then(s,n)}c((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var o={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,s;return s={next:n(0),throw:n(1),return:n(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function n(e){return function(t){return c([e,t])}}function c(n){if(r)throw new TypeError("Generator is already executing.");while(s&&(s=0,n[0]&&(o=0)),o)try{if(r=1,i&&(a=n[0]&2?i["return"]:n[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,n[1])).done)return a;if(i=0,a)n=[n[0]&2,a.value];switch(n[0]){case 0:case 1:a=n;break;case 4:o.label++;return{value:n[1],done:false};case 5:o.label++;i=n[1];n=[0];continue;case 7:n=o.ops.pop();o.trys.pop();continue;default:if(!(a=o.trys,a=a.length>0&&a[a.length-1])&&(n[0]===6||n[0]===2)){o=0;continue}if(n[0]===3&&(!a||n[1]>a[0]&&n[1]<a[3])){o.label=n[1];break}if(n[0]===6&&o.label<a[1]){o.label=a[1];a=n;break}if(a&&o.label<a[2]){o.label=a[2];o.ops.push(n);break}if(a[2])o.ops.pop();o.trys.pop();continue}n=t.call(e,o)}catch(e){n=[6,e];i=0}finally{r=a=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host,F as Fragment,g as getElement}from"./index-CF7i8guW.js";import{VerdocsEndpoint,getTemplateDocumentPageDisplayUri,getTemplate}from"@verdocs/js-sdk";import{t as throttle,c as getControlStyles,g as getFieldId}from"./utils-DmfOx9Ey.js";import{S as Store}from"./Datastore-C_IIZj49.js";import{c as createPopper}from"./popper-BfP9ezJQ.js";import"./_commonjsHelpers-BFTU3MAI.js";import"./index-dzBXqXlK.js";import"./Types-Dl7Xw8F0.js";var verdocsTemplateDocumentPageCss="@-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-template-document-page{width:100%;position:relative}verdocs-template-document-page .verdocs-template-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-template-document-page .verdocs-template-document-page-layer.img{width:100%}verdocs-template-document-page .placeholder{opacity:0.1;width:612px;height:792px;-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)}";var VerdocsTemplateDocumentPage=function(){function e(e){registerInstance(this,e);this.pageRendered=createEvent(this,"pageRendered");this.templateListenerId=null;this.endpoint=VerdocsEndpoint.getDefault();this.editable=false;this.disabled=false;this.done=false;this.templateId="";this.documentId="";this.pageNumber=1;this.virtualWidth=612;this.virtualHeight=792;this.layers=[{name:"page",type:"canvas"}];this.containerId="verdocs-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="";this.xScale=1;this.yScale=1;this.loading=true;this.template=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:e=this;return[4,getTemplateDocumentPageDisplayUri(this.endpoint,this.documentId,this.pageNumber)];case 1:e.pageDisplayUri=t.sent();this.listenToTemplate();return[2]}}))}))};e.prototype.componentDidLoad=function(){var e=this;this.resizeObserver=new ResizeObserver(throttle((function(t){for(var o=0,r=t;o<r.length;o++){var i=r[o];var a=i.contentRect.width;e.renderedWidth=a;e.renderedHeight=e.virtualHeight*(a/e.virtualWidth)}e.notifyRenderedSize()}),100));this.resizeObserver.observe(this.container)};e.prototype.componentDidUpdate=function(){this.notifyRenderedSize()};e.prototype.disconnectedCallback=function(){var e;(e=this.resizeObserver)===null||e===void 0?void 0:e.disconnect();this.unlistenToTemplate()};e.prototype.listenToTemplate=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){this.unlistenToTemplate();Store.subscribe("templates",this.templateId,(function(){return getTemplate(e.endpoint,e.templateId)}),false,(function(t){e.template=t;e.loading=false}));return[2]}))}))};e.prototype.unlistenToTemplate=function(){if(this.templateListenerId){Store.store.delListener(this.templateListenerId);this.templateListenerId=null}};e.prototype.notifyRenderedSize=function(){if(this.skipFirstNotification){this.skipFirstNotification=false;return}var e=this.renderedWidth/this.virtualWidth;if(this.xScale!==e){this.xScale=e}var t=this.renderedHeight/this.virtualHeight;if(this.yScale!==t){this.yScale=t}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:e,yScale:t})};e.prototype.render=function(){var e=this;if(this.loading){return h(Host,null,h("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",class:"placeholder",alt:"Placeholder page"}))}var t="".concat(this.renderedHeight,"px");return h(Host,{id:"".concat(this.containerId),style:{height:t,flex:"0 0 ".concat(t)}},this.layers.map((function(o){var r;return o.type==="div"?h("div",{class:"verdocs-template-document-page-layer",id:"".concat(e.containerId,"-").concat(o.name),style:{height:t}},o.name==="controls"&&(((r=e.template)===null||r===void 0?void 0:r.fields)||[]).filter((function(t){return t&&t.page===e.pageNumber})).map((function(t){var o,r;var i=getFieldId(t);var a=t.name,s=t.type,n=t.multiline;var c=e,l=c.xScale,d=c.yScale,u=c.templateId,p=c.editable,f=c.disabled,b=c.done,m=c.pageNumber;if(((o=t["setting"])===null||o===void 0?void 0:o.leading)>0||((r=t["settings"])===null||r===void 0?void 0:r.leading)>0){s="textarea";n=true}switch(s){case"textbox":return h("verdocs-field-textbox",{id:i,fieldname:a,source:"template",sourceid:u,editable:p,multiline:n,disabled:f,done:b,xscale:l,yscale:d,pagenumber:m,style:getControlStyles(t,l,d)});case"textarea":return h("verdocs-field-textarea",{id:i,fieldname:a,source:"template",sourceid:u,editable:p,disabled:f,done:b,xscale:l,yscale:d,pagenumber:m,style:getControlStyles(t,l,d)});case"date":return h("verdocs-field-date",{id:i,fieldname:a,source:"template",sourceid:u,editable:p,disabled:f,done:b,xscale:l,yscale:d,pagenumber:m,style:getControlStyles(t,l,d)});case"attachment":return h("verdocs-field-attachment",{id:i,fieldname:a,source:"template",sourceid:u,editable:p,disabled:f,done:b,xscale:l,yscale:d,pagenumber:m,style:getControlStyles(t,l,d)});case"dropdown":return h("verdocs-field-dropdown",{id:i,fieldname:a,source:"template",sourceid:u,editable:p,disabled:f,done:b,xscale:l,yscale:d,pagenumber:m,style:getControlStyles(t,l,d)});case"initial":return h("verdocs-field-initial",{id:i,fieldname:a,source:"template",sourceid:u,editable:p,disabled:f,done:b,xscale:l,yscale:d,pagenumber:m,style:getControlStyles(t,l,d)});case"signature":return h("verdocs-field-signature",{id:i,fieldname:a,source:"template",sourceid:u,editable:p,disabled:f,done:b,xscale:l,yscale:d,pagenumber:m,style:getControlStyles(t,e.xScale,e.yScale)});case"timestamp":return h("verdocs-field-timestamp",{id:i,fieldname:a,source:"template",sourceid:u,editable:p,disabled:f,done:b,xscale:l,yscale:d,pagenumber:m,style:getControlStyles(t,l,d)});case"checkbox":return h("verdocs-field-checkbox",{id:i,fieldname:a,source:"template",sourceid:u,editable:p,disabled:f,done:b,xscale:l,yscale:d,pagenumber:m,style:getControlStyles(t,l,d)});case"radio":return h("verdocs-field-radio",{id:i,fieldname:a,source:"template",sourceid:u,editable:p,disabled:f,done:b,xscale:l,yscale:d,pagenumber:m,style:getControlStyles(t,l,d)});default:return h(Fragment,null,a)}}))):e.pageDisplayUri?h("img",{class:"verdocs-template-document-page-layer img",id:"".concat(e.containerId,"-").concat(o.name),src:e.pageDisplayUri,alt:"Page ".concat(e.pageNumber),"aria-hidden":true,loading:"lazy",onLoad:function(t){e.naturalWidth=t.target.naturalWidth;e.naturalHeight=t.target.naturalHeight;e.aspectRatio=e.naturalWidth/e.naturalHeight;e.virtualHeight=e.virtualWidth/e.aspectRatio;e.renderedHeight=t.target.offsetWidth/e.aspectRatio}}):h("div",null)})))};Object.defineProperty(e.prototype,"container",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();VerdocsTemplateDocumentPage.style=verdocsTemplateDocumentPageCss;var verdocsToolbarIconCss='@-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-toolbar-icon{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-toolbar-icon .icon{display:inline-block;cursor:pointer}verdocs-toolbar-icon .icon svg{fill:#5c6575}verdocs-toolbar-icon .tooltip{display:none;-webkit-box-shadow:0 0 10px 1px #999999;box-shadow:0 0 10px 1px #999999;background:#ffffff;color:#33364b;max-width:240px;font-weight:bold;padding:5px 10px;font-size:13px;position:relative;border-radius:4px;z-index:20000;white-space:nowrap}verdocs-toolbar-icon .tooltip .arrow,verdocs-toolbar-icon .tooltip .arrow::before{position:absolute;width:8px;height:8px;background:inherit}verdocs-toolbar-icon .tooltip .arrow{visibility:hidden;top:-4px}verdocs-toolbar-icon .tooltip .arrow::before{visibility:visible;content:"";-webkit-transform:rotate(45deg);transform:rotate(45deg)}verdocs-toolbar-icon .tooltip[data-show]{display:block}verdocs-toolbar-icon .tooltip[data-popper-placement^=top]>.arrow{bottom:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=bottom]>.arrow{top:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=right]>.arrow{left:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]{padding:3px 10px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-1px}';var VerdocsToolbarIcon=function(){function e(e){registerInstance(this,e);this.text="";this.icon="";this.placement="bottom";this.containerId="verdocs-toolbar-icon-".concat(Math.random().toString(36).substring(2,11))}e.prototype.componentDidLoad=function(){this.popperInstance=createPopper(this.iconEl,this.tooltip,{placement:this.placement,modifiers:this.placement==="left"?[{name:"offset",options:{offset:[0,20]}}]:[]})};e.prototype.disconnectedCallback=function(){if(this.popperInstance){this.popperInstance.destroy();this.popperInstance=null}};e.prototype.show=function(){var e,t;(e=this.tooltip)===null||e===void 0?void 0:e.setAttribute("data-show","");(t=this.popperInstance)===null||t===void 0?void 0:t.update().catch((function(){}))};e.prototype.hide=function(){var e;(e=this.tooltip)===null||e===void 0?void 0:e.removeAttribute("data-show")};e.prototype.render=function(){var e=this;return h(Host,{key:"8163f7ebe7d2f3a13db305b411b454287a4b3729",class:{}},h("div",{key:"1782db14268643ad1620ebcd5efc6a27ff9fcc04","aria-describedby":this.containerId,class:"icon",innerHTML:this.icon,onMouseEnter:function(){return e.show()},onFocus:function(){return e.show()},onMouseLeave:function(){return e.hide()},onBlur:function(){return e.hide()},ref:function(t){return e.iconEl=t}}),h("div",{key:"54c1bb4abc22a943051ba2df8b557e6c02fdabef",id:this.containerId,role:"tooltip",class:"tooltip","data-popper-placement":this.placement,ref:function(t){return e.tooltip=t}},this.text,h("div",{key:"4d2c884923f2e79b375ffcfa2592cd914bead68c","data-popper-arrow":"true",class:"arrow"})))};return e}();VerdocsToolbarIcon.style=verdocsToolbarIconCss;export{VerdocsTemplateDocumentPage as verdocs_template_document_page,VerdocsToolbarIcon as verdocs_toolbar_icon};
|
2
2
|
//# sourceMappingURL=verdocs-template-document-page_2.entry.js.map
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as e,c as i,h as t,H as s,F as o}from"./p-CF7i8guW.js";import{VerdocsEndpoint as n,startSigningSession as a,envelopeRecipientAgree as l,envelopeRecipientDecline as r,updateEnvelopeField as d,createSignature as c,updateEnvelopeFieldSignature as h,createInitials as p,updateEnvelopeFieldInitials as u,isValidPhone as g,isValidEmail as v,sortFields as f,envelopeRecipientSubmit as m,getEnvelope as x,uploadEnvelopeFieldAttachment as b,deleteEnvelopeFieldAttachment as y,formatFullName as w,fullNameToInitials as k,verifySigner as S,integerSequence as N}from"@verdocs/js-sdk";import{a as I,u as G,g as F,r as z}from"./p-Bf-kinKl.js";import{D as P}from"./p-C_Xku1v2.js";import{V as D}from"./p-CyvDgtoV.js";import{S as T}from"./p-C1sRVZWv.js";import{S as R}from"./p-C_IIZj49.js";import"./p-BFTU3MAI.js";import"./p-dzBXqXlK.js";import"./p-Dl7Xw8F0.js";const V='@-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-sign{display:-ms-flexbox;display:flex;overflow:hidden;position:relative;min-height:600px;-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-sign div{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-sign input{vertical-align:top}verdocs-sign>.document{-ms-flex:1;flex:1;width:100%;height:100%;-ms-flex-item-align:center;align-self:center;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;max-width:1200px;min-height:200px;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-sign>.document .inner{width:100%;max-width:1028px}verdocs-sign .cover{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:5000;position:absolute;padding-top:100px;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;background:rgba(0, 0, 0, 0.5)}verdocs-sign .agree{-ms-flex:0;flex:0;width:600px;display:-ms-flexbox;display:flex;max-width:90%;padding:30px 15px;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff}verdocs-sign .agree .header{-ms-flex:0 0 56px;flex:0 0 56px}verdocs-sign .agree li{margin:0.5em 0}verdocs-sign verdocs-ok-dialog .background-overlay{-ms-flex-align:start;align-items:flex-start;padding-top:100px}verdocs-sign .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-sign .fatal-error{position:absolute;z-index:100;top:0;left:0;right:0;bottom:0;background-color:#4a4a4a;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-sign .fatal-error .placeholder{position:absolute;opacity:0.1;z-index:-1;top:0;left:0;right:0;bottom:0;width:612px;height:792px;-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);margin-top:15px}verdocs-sign .fatal-error .message{max-width:360px;width:50%;font-size:16px;background:white;-webkit-box-shadow:3px 3px 9px -1px rgba(0, 0, 0, 0.2470588235);box-shadow:3px 3px 9px -1px rgba(0, 0, 0, 0.2470588235)}verdocs-sign .fatal-error .header{color:white;font-size:18px;font-weight:500;padding:5px 10px;margin:0 0 10px 0;background:#4c56cb}verdocs-sign .fatal-error p{margin:1rem;font-size:14px;font-weight:400;padding:0 10px}@media print{verdocs-sign .header{display:none}}#verdocs-sign-header{color:#fff;width:100%;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 46px;flex:0 0 46px;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)}#verdocs-sign-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 12px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}#verdocs-sign-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-sign-header .title{font-size:18px;font-weight:500;overflow:hidden;white-space:nowrap;padding:0 10px 0 0;text-overflow:ellipsis}.spinner-overlay{position:fixed;top:0;left:0;right:0;bottom:0;z-index:1000;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;background:rgba(0, 0, 0, 0.4980392157);-ms-flex-pack:center;justify-content:center}';const j=`\n<ul>\n <li>\n Agree to use electronic records and signatures, and confirm you have read the\n <a href="https://verdocs.com/en/electronic-record-signature-disclosure/" target="_blank">\n Electronic Record and Signatures Disclosure</a>.</li>\n <li>\n Agree to Verdocs'\n <a href="https://verdocs.com/en/eula" target="_blank">\n End User License Agreement</a>\n and confirm you have read Verdocs'\n <a href="https://verdocs.com/en/privacy-policy/" target="_blank">\n Privacy Policy</a>.\n </li>\n</ul>`;const A=[{id:"later",label:"Finish Later"},{id:"decline",label:"Decline to Sign"},{id:"print",label:"Print Without Signing"},{id:"download",label:"Download"}];const E=[{id:"print",label:"Print"},{id:"download",label:"Download"}];const C=class{constructor(t){e(this,t);this.sdkError=i(this,"sdkError");this.envelopeLoaded=i(this,"envelopeLoaded");this.envelopeUpdated=i(this,"envelopeUpdated");this.endpoint=P;this.envelopeId=null;this.roleId=null;this.inviteCode=null;this.headerTargetId=null;this.recipient=null;this.hasSignature=false;this.nextButtonLabel="Start";this.nextSubmits=false;this.fatalErrorHeader="";this.fatalErrorMessage="";this.focusedField="";this.disclosure=j;this.submitting=false;this.submitted=false;this.isDone=false;this.showDone=false;this.showLoadError=false;this.finishLater=false;this.showFinishLater=false;this.agreed=false;this.documentsSingularPlural="document";this.authStep=null;this.authMethodStates={};this.kbaQuestions=null;this.showSpinner=false;this.kbaChoices=[];this.loading=true;this.envelope=null}componentWillLoad(){if(!this.endpoint){console.log("[SIGN] Creating signing endpoint");this.endpoint=new n({sessionType:"signing"})}}async componentDidLoad(){var e,i,t,s,o,n;if(!this.envelopeId){(e=this.sdkError)===null||e===void 0?void 0:e.emit(new T("[SIGN] Missing required envelopId",500,""));return}if(!this.roleId){(i=this.sdkError)===null||i===void 0?void 0:i.emit(new T("[SIGN] Missing required roleId",500,""));return}if(!this.inviteCode){(t=this.sdkError)===null||t===void 0?void 0:t.emit(new T("[SIGN] Missing required inviteCode",500,""));return}try{console.log(`[SIGN] Processing invite code for ${this.envelopeId} / ${this.roleId}`);const e=await a(this.endpoint,this.envelopeId,this.roleId,this.inviteCode);console.log("[SIGN] Authentication successful",e);this.processAuthResponse(e)}catch(e){console.log("[SIGN] Error with signing session",e);(s=this.sdkError)===null||s===void 0?void 0:s.emit(new T(e.message,(o=e.response)===null||o===void 0?void 0:o.status,(n=e.response)===null||n===void 0?void 0:n.data));this.showLoadError=true}}componentDidRender(){const e=this.headerTargetId?document.getElementById(this.headerTargetId):null;const i=document.getElementById("verdocs-sign-header");if(e&&i){console.log("[SIGN] Moving header");i.remove();e.append(i)}}processAuthResponse(e){var i,t,s;const{envelope:o,recipient:n}=e;const{auth_step:a}=n;this.recipient=n;this.envelope=o;this.disclosure=((t=(i=this.envelope)===null||i===void 0?void 0:i.organization)===null||t===void 0?void 0:t.disclaimer)||j;this.authStep=a;this.agreed=n.agreed;this.submitted=n.status==="submitted";this.isDone=this.submitted;this.showDone=this.submitted;R.updateEnvelope(this.envelopeId,o);if(this.envelope.documents.length>0){this.documentsSingularPlural="document(s)"}this.authMethodStates=n.auth_method_states||{};this.kbaQuestions=n.kba_questions;if(Object.values(this.authMethodStates).includes("failed")){this.fatalErrorHeader="Recipient Verification Failed";this.fatalErrorMessage="We were unable to verify your identity. The sender has been notified.";this.isDone=true}if(this.envelope.status==="canceled"){this.fatalErrorHeader="Unable to Start Signing Session";this.fatalErrorMessage="This envelope has been canceled. The sender has been notified."}else if(n.status==="declined"){this.fatalErrorHeader="Declined";this.fatalErrorMessage="You have declined to sign this envelope. The sender has been notified."}else if(this.agreed){this.nextButtonLabel="Next"}this.checkRecipientFields();(s=this.envelopeLoaded)===null||s===void 0?void 0:s.emit({endpoint:this.endpoint,envelope:this.envelope})}handleClickAgree(){this.submitting=true;l(this.endpoint,this.envelopeId,this.roleId,true,this.disclosure).then((()=>{var e;this.nextButtonLabel="Next";this.recipient.agreed=true;this.submitting=false;this.agreed=true;(e=this.envelopeUpdated)===null||e===void 0?void 0:e.emit({endpoint:this.endpoint,envelope:this.envelope,event:"agreed"})})).catch((e=>{var i,t,s;console.log("[SIGN] Update failure",e);this.submitting=false;(i=this.sdkError)===null||i===void 0?void 0:i.emit(new T(e.message,(t=e.response)===null||t===void 0?void 0:t.status,(s=e.response)===null||s===void 0?void 0:s.data))}))}async handleOptionSelected(e){var i,t,s,o,n;switch(e.detail.id){case"later":this.finishLater=true;this.showFinishLater=true;(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:this.envelope,event:"later"});break;case"claim":D("This feature will be available in an upcoming release.");(t=this.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,envelope:this.envelope,event:"claimed"});break;case"decline":{this.submitting=true;const e=await r(this.endpoint,this.envelopeId,this.roleId);console.log("[SIGN] Decline result",e);(s=this.envelopeUpdated)===null||s===void 0?void 0:s.emit({endpoint:this.endpoint,envelope:this.envelope,event:"declined"});this.submitting=false;this.fatalErrorHeader="Declined";this.fatalErrorMessage="You have declined to sign this envelope. The sender has been notified."}break;case"print":window.print();(o=this.envelopeUpdated)===null||o===void 0?void 0:o.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});break;case"download":{const e=this.envelope.documents.find((e=>e.type==="attachment"));if(e){I(this.endpoint,this.envelope,e.id).catch((e=>{console.log("[SIGN] Error downloading PDF",e)}));(n=this.envelopeUpdated)===null||n===void 0?void 0:n.emit({endpoint:this.endpoint,envelope:this.envelope,event:"downloaded"})}}break}}updateRecipientFieldValue(e,i){console.log("[SIGN] updateRecipientFieldValue",e,i);this.getRecipientFields().forEach((t=>{if(t.name===e){t.value=i.value;t.settings=i.settings;G(t);this.checkRecipientFields()}}))}saveFieldChange(e,i){console.log("[SIGN] saveFieldChange",e,i);d(this.endpoint,this.envelopeId,e,i).then((i=>this.updateRecipientFieldValue(e,i))).catch((e=>{var i,t,s,o,n,a;if(((i=e.response)===null||i===void 0?void 0:i.status)===401&&((s=(t=e.response)===null||t===void 0?void 0:t.data)===null||s===void 0?void 0:s.error)==="jwt expired"){console.log("[SIGN] Signing session expired");this.fatalErrorHeader="Signing Session Expired";this.fatalErrorMessage="Please reload your browser to continue."}else{console.log("[SIGN] Server error",e)}(o=this.sdkError)===null||o===void 0?void 0:o.emit(new T(e.message,(n=e.response)===null||n===void 0?void 0:n.status,(a=e.response)===null||a===void 0?void 0:a.data))}))}async handleFieldChange(e,i){const{value:t,checked:s}=i.target;switch(e.type){case"textarea":case"textbox":return this.saveFieldChange(e.name,{prepared:false,value:t});case"checkbox":{return this.saveFieldChange(e.name,{prepared:false,value:String(i.target.checked)})}case"radio":{return this.saveFieldChange(e.name,{prepared:false,value:String(i.target.checked)})}case"dropdown":console.log("Saving dropdown",e.name,i.detail);return this.saveFieldChange(e.name,{prepared:false,value:i.detail});case"initial":if(!i.detail){return}this.showSpinner=true;const o=await(await fetch(i.detail)).blob();return p(this.endpoint,"initial",o).then((async i=>{const t=await u(this.endpoint,this.envelopeId,e.name,i.id);this.updateRecipientFieldValue(e.name,t);this.showSpinner=false})).catch((e=>{console.log("Error updating initials",e);this.showSpinner=false}));case"signature":if(!i.detail){return}this.showSpinner=true;const n=await(await fetch(i.detail)).blob();return c(this.endpoint,"signature",n).then((async i=>{console.log("Signature update result",i);const t=await h(this.endpoint,this.envelopeId,e.name,i.id);this.updateRecipientFieldValue(e.name,t);this.showSpinner=false})).catch((e=>{console.warn("[SIGN] Error updating signature",e);this.showSpinner=false}));case"date":const{formattedDate:a}=i.detail;if(a){return this.saveFieldChange(e.name,{prepared:false,value:a})}break;case"timestamp":console.log("[SIGN] Updating timestamp",{value:t,ts:i.target.getAttribute("timestamp")});break;default:console.log("[SIGN] Unhandled field update",{value:t,checked:s},e);break}}isFieldFilled(e){const{value:i=""}=e;switch(e.type){case"textarea":case"textbox":switch(e.validator||""){case"email":return v(i);case"phone":return g(i);default:return(i||"").trim()!==""}case"signature":return i==="signed";case"initial":return i==="initialed";case"timestamp":return true;case"date":return!!i;case"attachment":return i==="attached";case"dropdown":return i!=="";case"checkbox":return i==="true";case"radio":if(!!e.group){return this.getRecipientFields().filter((i=>i.group===e.group)).some((e=>e.value==="true"))}return e.value==="true";default:return false}}isFieldValid(e){return!e.required||this.isFieldFilled(e)}getSortedFillableFields(){const e=this.getRecipientFields().filter((e=>e.type!=="timestamp"));f(e);return e}async handleNext(){var e;if(this.nextSubmits){try{(e=document.getElementById("air-datepicker-global-container"))===null||e===void 0?void 0:e.remove();this.submitting=true;const i=await m(this.endpoint,this.envelopeId,this.roleId);console.log("[SIGN] Submitted successfully",i);this.recipient.status="submitted";this.showDone=true;console.log("[SIGN] Reloading envelope");x(this.endpoint,this.envelopeId).then((e=>{this.envelope=e;this.submitting=false})).catch((e=>{console.log("[SIGN] Error reloading envelope",e);this.submitting=false}))}catch(e){console.log("[SIGN] Error submitting",e)}return}const i=this.getSortedFillableFields().filter((e=>e.required&&!this.isFieldFilled(e)));f(i);const t=i.findIndex((e=>e.name===this.focusedField));let s=t+1;if(s>=i.length){s=0}let o=i[s];let n=0;if(n<i.length&&["signature","initial"].includes(o.type)&&["initialed","signed"].includes(o.value)){n++;s++;if(s>=i.length){s=0}o=i[s]}if(n>=i.length){o=null}if(o){const e=F(o);const i=document.getElementById(e);i===null||i===void 0?void 0:i.scrollIntoView({behavior:"smooth"});i===null||i===void 0?void 0:i.focusField();this.focusedField=o.name}}getRecipientFields(){return this.envelope.fields.filter((e=>e.role_name===this.recipient.role_name))}checkRecipientFields(){const e=this.getRecipientFields().filter((e=>!this.isFieldValid(e)));if(e.length<1){this.nextButtonLabel="Finish";if(!this.nextSubmits){this.nextSubmits=true}}else{console.log("[SIGN] Invalid fields remaining",e.map((e=>e.name)));this.nextButtonLabel="Next";this.nextSubmits=false}}attachFieldAttributes(e,i,t){if(t.getAttribute("attached")==="1"){return}t.setAttribute("attached","1");t.addEventListener("input",(e=>{if(e.target.type==="radio"||e.target.type==="checkbox"){this.handleFieldChange(i,e).finally((()=>this.checkRecipientFields()))}else{this.checkRecipientFields()}}));t.addEventListener("attached",(async t=>{console.log("[SIGN] onAttached",t.detail,t.target.value);this.showSpinner=true;try{const s=await b(this.endpoint,this.envelopeId,i.name,t.detail);this.updateRecipientFieldValue(i.name,s);this.checkRecipientFields();const o=z("envelope",i,e,{disabled:false,editable:false,draggable:false,done:this.isDone});this.attachFieldAttributes(e,i,o);this.showSpinner=false}catch(t){console.log("Error uploading attachment",t);D("Unable to upload attachment, please try again later",{style:"error"});this.showSpinner=false}}));t.addEventListener("deleted",(async t=>{console.log("[SIGN] onDeleted",t.detail,t.target.value);this.showSpinner=true;try{const t=await y(this.endpoint,this.envelopeId,i.name);console.log("[SIGN] Deleted attachment",t);this.updateRecipientFieldValue(i.name,t);this.checkRecipientFields();const s=z("envelope",i,e,{disabled:false,editable:false,draggable:false,done:this.isDone});this.attachFieldAttributes(e,i,s);this.showSpinner=false}catch(t){console.log("Error uploading attachment",t);D("Unable to upload attachment, please try again later",{style:"error"});this.showSpinner=false}}));t.addEventListener("focusout",(e=>{if(i.type!=="dropdown"&&i.type!=="attachment"){this.handleFieldChange(i,e).finally((()=>this.checkRecipientFields()))}}));t.addEventListener("fieldChange",(e=>{this.handleFieldChange(i,e).finally((()=>this.checkRecipientFields()))}));t.setAttribute("templateid",this.envelope.template_id);t.setAttribute("fieldname",i.name);t.setAttribute("page",e.pageNumber);t.setAttribute("xScale",e.xScale);t.setAttribute("yScale",e.yScale);const s=w(this.recipient);t.setAttribute("initials",k(s));t.setAttribute("name",s)}handlePageRendered(e){const i=e.detail;const t=this.getSortedFillableFields();console.log("[SIGN] Rendering fields for page",i.pageNumber,t);t.forEach(((e,t)=>{if(e.page!==i.pageNumber){return}const s=z("envelope",e,i,{disabled:false,editable:false,draggable:false,done:this.isDone},t);if(!s){return}if(Array.isArray(s)){s.map((t=>this.attachFieldAttributes(i,e,t)))}else{this.attachFieldAttributes(i,e,s)}}));this.envelope.recipients.filter((e=>e.role_name!==this.recipient.role_name&&(e.status==="invited"||e.status==="opened"||e.status==="pending"))).forEach((()=>{this.getRecipientFields().filter((e=>e.page===i.pageNumber)).forEach((e=>{const t=z("envelope",e,i,{disabled:true,editable:false,draggable:false,done:this.isDone});if(!t){return}if(Array.isArray(t)){t.map((t=>this.attachFieldAttributes(i,e,t)))}else{this.attachFieldAttributes(i,e,t)}}))}));this.checkRecipientFields()}handleAuthenticateSigner(e){console.log("[SIGN] Submitting authentication step",e);S(this.endpoint,e).then((e=>{console.log("[SIGN] Verification successful",e);this.processAuthResponse(e)})).catch((e=>{var i,t,s,o,n;console.log("[SIGN] Error submitting authentication step",e);if((s=(t=(i=e.response)===null||i===void 0?void 0:i.data)===null||t===void 0?void 0:t.error)===null||s===void 0?void 0:s.includes("failed")){this.fatalErrorHeader="Recipient Verification Failed";this.fatalErrorMessage="We were unable to verify your identity. The sender has been notified.";this.isDone=true}else{D(((n=(o=e.response)===null||o===void 0?void 0:o.data)===null||n===void 0?void 0:n.error)||"Unable to verify your identity. Please try again.",{style:"error"})}}))}render(){console.log("[SIGN] Rendering",{authStep:this.authStep});if(this.showLoadError){return t(s,null,t("verdocs-ok-dialog",{heading:"Unable to Start Signing",message:`Sorry, your invite code is invalid or has expired. Please check your email for an updated invitation, or contact the sender.`,buttonLabel:"OK",onNext:()=>{window.location.reload()}}))}if(!this.envelope){return t(s,null,t("verdocs-loader",null))}if(this.fatalErrorMessage){return t(s,{class:{agreed:this.agreed}},t("div",{class:"fatal-error"},t("div",{class:"message"},t("div",{class:"header"},this.fatalErrorHeader),t("p",null,this.fatalErrorMessage))))}if(this.isDone){return t(s,{class:{agreed:this.agreed}},t("verdocs-view",{endpoint:this.endpoint,envelopeId:this.envelopeId,onSdkError:e=>{var i;return(i=this.sdkError)===null||i===void 0?void 0:i.emit(e.detail)}}),this.showDone&&t("verdocs-ok-dialog",{heading:"You're Done!",message:`You can access the ${this.documentsSingularPlural} at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.`,onNext:e=>{e.preventDefault();e.stopPropagation();this.showDone=false;this.isDone=true}}),this.submitting&&t("div",{class:"loading-indicator"},t("verdocs-loader",null)))}if(!this.agreed){return t(s,{class:"agreed"},t("div",{id:"verdocs-sign-header"},t("div",{class:"inner"},t("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),t("div",{class:"title"},this.envelope.name))),t("div",{class:"document",style:{paddingTop:"15px"}},t("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"})),t("div",{class:"cover"},t("div",{class:"agree"},t("verdocs-checkbox",{name:"agree",label:"By checking this box, you:",onInput:()=>this.handleClickAgree()}),t("div",{innerHTML:this.disclosure}))))}if(this.authStep==="passcode"){return t(s,{class:"kba"},t("div",{id:"verdocs-sign-header"},t("div",{class:"inner"},t("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),t("div",{class:"title"},this.envelope.name))),t("div",{class:"document",style:{paddingTop:"15px"}},t("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"})),t("div",{class:"cover"},t("div",{class:"kba"},t("verdocs-kba-dialog",{mode:"text",step:1,steps:1,placeholder:"Enter your passcode...",helptitle:"Document is protected by a Passcode",helptext:"Please enter your Passcode to proceed. If you do not have one, please contact the sender.",label:"Passcode",onNext:e=>this.handleAuthenticateSigner({auth_method:"passcode",code:e.detail})}))))}if(this.authStep==="email"){return t("verdocs-otp-dialog",{endpoint:this.endpoint,method:"email",onNext:async e=>{this.processAuthResponse(e.detail.response)}})}if(this.authStep==="kba"&&!this.authMethodStates.kba){return t(s,{class:"kba"},t("div",{id:"verdocs-sign-header"},t("div",{class:"inner"},t("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),t("div",{class:"title"},this.envelope.name))),t("div",{class:"document",style:{paddingTop:"15px"}},t("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"})),t("div",{class:"cover"},t("div",{class:"kba"},t("verdocs-kba-dialog",{mode:"identity",helptitle:"Document requires identity verification",helptext:"Please complete your contact details to proceed.",recipient:this.recipient,onNext:async e=>{const i=e.detail;this.handleAuthenticateSigner({auth_method:"kba",first_name:i.first_name,last_name:i.last_name,address:i.address,city:i.city,state:i.state,zip:i.zip,dob:i.dob})}}))))}if(this.authStep==="kba"&&this.authMethodStates.kba==="questions"){const e=this.kbaChoices.length;const i=this.kbaQuestions[e];return t(s,{class:"kba"},t("div",{id:"verdocs-sign-header"},t("div",{class:"inner"},t("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),t("div",{class:"title"},this.envelope.name))),t("div",{class:"document",style:{paddingTop:"15px"}},t("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"})),t("div",{class:"cover"},t("div",{class:"kba"},this.kbaChoices.length>=this.kbaQuestions.length?t("verdocs-spinner",null):t("verdocs-kba-dialog",{mode:"choice",helptitle:"Your identity requires additional verification",helptext:(i===null||i===void 0?void 0:i.prompt)||"Please select one of the options below.",choices:(i===null||i===void 0?void 0:i.answer)||["Skip Question"],step:e+1,steps:this.kbaQuestions.length,onNext:async e=>{const i=e.detail;this.kbaChoices=[...this.kbaChoices,i];if(this.kbaChoices.length>=this.kbaQuestions.length){const e=this.kbaQuestions.map(((e,i)=>({type:e.type,answer:this.kbaChoices[i]})));console.log("Submitting KBA responses",this.kbaChoices,e);this.handleAuthenticateSigner({auth_method:"kba",responses:e})}}}))))}return t(s,null,t("div",{id:"verdocs-sign-header"},t("div",{class:"inner"},t("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),t("div",{class:"title"},this.envelope.name),t("div",{style:{flex:"1"}}),!this.finishLater&&t("verdocs-button",{size:"xsmall",label:this.nextButtonLabel,disabled:!this.agreed||this.submitting,onClick:()=>this.handleNext()}),t("div",{style:{marginLeft:"10px"}}),t("verdocs-dropdown",{options:!this.isDone&&!this.finishLater?A:E,onOptionSelected:e=>this.handleOptionSelected(e)}))),t("div",{class:"document",style:{paddingTop:"15px"}},(this.envelope.documents||[]).map((e=>{const i=N(1,e.pages);return t(o,null,i.map((i=>{var s;const o=((s=e.page_sizes)===null||s===void 0?void 0:s[i])||{width:612,height:792};return t("verdocs-envelope-document-page",{envelopeId:this.envelopeId,documentId:e.id,endpoint:this.endpoint,virtualWidth:o.width,virtualHeight:o.height,pageNumber:i,onPageRendered:e=>this.handlePageRendered(e),type:"filled",layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))}))),this.showFinishLater&&t("verdocs-ok-dialog",{heading:"You've saved your document to finish later.",message:`To complete the ${this.documentsSingularPlural}, use the link in the original email notification inviting you to review and finish the document.`,onNext:()=>this.showFinishLater=false}),this.showDone&&t("verdocs-ok-dialog",{heading:"You're Done!",message:`You can access the ${this.documentsSingularPlural} at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.`,onNext:()=>{this.showDone=false;this.isDone=true}}),this.submitting||this.showSpinner&&t("verdocs-portal",null,t("div",{class:"spinner-overlay"},t("verdocs-spinner",null))))}};C.style=V;export{C as verdocs_sign};
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r as e,c as i,h as t,H as s,F as o}from"./p-CF7i8guW.js";import{VerdocsEndpoint as n,startSigningSession as a,envelopeRecipientAgree as l,envelopeRecipientDecline as r,updateEnvelopeField as d,createSignature as c,updateEnvelopeFieldSignature as h,createInitials as p,updateEnvelopeFieldInitials as u,isValidPhone as g,isValidEmail as v,sortFields as f,envelopeRecipientSubmit as m,getEnvelope as x,uploadEnvelopeFieldAttachment as b,deleteEnvelopeFieldAttachment as y,formatFullName as w,fullNameToInitials as k,verifySigner as S,integerSequence as N}from"@verdocs/js-sdk";import{a as I,u as G,g as F,r as z}from"./p-fL0BKEnm.js";import{D as P}from"./p-C_Xku1v2.js";import{V as D}from"./p-CyvDgtoV.js";import{S as T}from"./p-C1sRVZWv.js";import{S as E}from"./p-C_IIZj49.js";import"./p-BFTU3MAI.js";import"./p-dzBXqXlK.js";import"./p-Dl7Xw8F0.js";const R='@-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-sign{display:-ms-flexbox;display:flex;overflow:hidden;position:relative;min-height:600px;-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-sign div{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-sign input{vertical-align:top}verdocs-sign>.document{-ms-flex:1;flex:1;width:100%;height:100%;-ms-flex-item-align:center;align-self:center;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;max-width:1200px;min-height:200px;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-sign>.document .inner{width:100%;max-width:1028px}verdocs-sign .cover{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:5000;position:absolute;padding-top:100px;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;background:rgba(0, 0, 0, 0.5)}verdocs-sign .agree{-ms-flex:0;flex:0;width:600px;display:-ms-flexbox;display:flex;max-width:90%;padding:30px 15px;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff}verdocs-sign .agree .header{-ms-flex:0 0 56px;flex:0 0 56px}verdocs-sign .agree li{margin:0.5em 0}verdocs-sign verdocs-ok-dialog .background-overlay{-ms-flex-align:start;align-items:flex-start;padding-top:100px}verdocs-sign .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-sign .fatal-error{position:absolute;z-index:100;top:0;left:0;right:0;bottom:0;background-color:#4a4a4a;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-sign .fatal-error .placeholder{position:absolute;opacity:0.1;z-index:-1;top:0;left:0;right:0;bottom:0;width:612px;height:792px;-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);margin-top:15px}verdocs-sign .fatal-error .message{max-width:360px;width:50%;font-size:16px;background:white;-webkit-box-shadow:3px 3px 9px -1px rgba(0, 0, 0, 0.2470588235);box-shadow:3px 3px 9px -1px rgba(0, 0, 0, 0.2470588235)}verdocs-sign .fatal-error .header{color:white;font-size:18px;font-weight:500;padding:5px 10px;margin:0 0 10px 0;background:#4c56cb}verdocs-sign .fatal-error p{margin:1rem;font-size:14px;font-weight:400;padding:0 10px}@media print{verdocs-sign .header{display:none}}#verdocs-sign-header{color:#fff;width:100%;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 46px;flex:0 0 46px;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)}#verdocs-sign-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 12px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}#verdocs-sign-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-sign-header .title{font-size:18px;font-weight:500;overflow:hidden;white-space:nowrap;padding:0 10px 0 0;text-overflow:ellipsis}.spinner-overlay{position:fixed;top:0;left:0;right:0;bottom:0;z-index:1000;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;background:rgba(0, 0, 0, 0.4980392157);-ms-flex-pack:center;justify-content:center}';const V=`\n<ul>\n <li>\n Agree to use electronic records and signatures, and confirm you have read the\n <a href="https://verdocs.com/en/electronic-record-signature-disclosure/" target="_blank">\n Electronic Record and Signatures Disclosure</a>.</li>\n <li>\n Agree to Verdocs'\n <a href="https://verdocs.com/en/eula" target="_blank">\n End User License Agreement</a>\n and confirm you have read Verdocs'\n <a href="https://verdocs.com/en/privacy-policy/" target="_blank">\n Privacy Policy</a>.\n </li>\n</ul>`;const j=[{id:"later",label:"Finish Later"},{id:"decline",label:"Decline to Sign"},{id:"print",label:"Print Without Signing"},{id:"download",label:"Download"}];const A=[{id:"print",label:"Print"},{id:"download",label:"Download"}];const L=class{constructor(t){e(this,t);this.sdkError=i(this,"sdkError");this.envelopeLoaded=i(this,"envelopeLoaded");this.envelopeUpdated=i(this,"envelopeUpdated");this.endpoint=P;this.envelopeId=null;this.roleId=null;this.inviteCode=null;this.headerTargetId=null;this.recipient=null;this.hasSignature=false;this.nextButtonLabel="Start";this.nextSubmits=false;this.fatalErrorHeader="";this.fatalErrorMessage="";this.focusedField="";this.disclosure=V;this.submitting=false;this.submitted=false;this.isDone=false;this.showDone=false;this.showLoadError=false;this.finishLater=false;this.showFinishLater=false;this.agreed=false;this.documentsSingularPlural="document";this.authStep=null;this.authMethodStates={};this.kbaQuestions=null;this.showSpinner=false;this.kbaChoices=[];this.loading=true;this.envelope=null}componentWillLoad(){if(!this.endpoint){console.log("[SIGN] Creating signing endpoint");this.endpoint=new n({sessionType:"signing"})}}async componentDidLoad(){var e,i,t,s,o,n;if(!this.envelopeId){(e=this.sdkError)===null||e===void 0?void 0:e.emit(new T("[SIGN] Missing required envelopId",500,""));return}if(!this.roleId){(i=this.sdkError)===null||i===void 0?void 0:i.emit(new T("[SIGN] Missing required roleId",500,""));return}if(!this.inviteCode){(t=this.sdkError)===null||t===void 0?void 0:t.emit(new T("[SIGN] Missing required inviteCode",500,""));return}try{console.log(`[SIGN] Processing invite code for ${this.envelopeId} / ${this.roleId}`);const e=await a(this.endpoint,this.envelopeId,this.roleId,this.inviteCode);console.log("[SIGN] Authentication successful",e);this.processAuthResponse(e)}catch(e){console.log("[SIGN] Error with signing session",e);(s=this.sdkError)===null||s===void 0?void 0:s.emit(new T(e.message,(o=e.response)===null||o===void 0?void 0:o.status,(n=e.response)===null||n===void 0?void 0:n.data));this.showLoadError=true}}componentDidRender(){const e=this.headerTargetId?document.getElementById(this.headerTargetId):null;const i=document.getElementById("verdocs-sign-header");if(e&&i){console.log("[SIGN] Moving header");i.remove();e.append(i)}}processAuthResponse(e){var i,t,s;const{envelope:o,recipient:n}=e;const{auth_step:a}=n;this.recipient=n;this.envelope=o;this.disclosure=((t=(i=this.envelope)===null||i===void 0?void 0:i.organization)===null||t===void 0?void 0:t.disclaimer)||V;this.authStep=a;this.agreed=n.agreed;this.submitted=n.status==="submitted";this.isDone=this.submitted;this.showDone=this.submitted;E.updateEnvelope(this.envelopeId,o);if(this.envelope.documents.length>0){this.documentsSingularPlural="document(s)"}this.authMethodStates=n.auth_method_states||{};this.kbaQuestions=n.kba_questions;if(Object.values(this.authMethodStates).includes("failed")){this.fatalErrorHeader="Recipient Verification Failed";this.fatalErrorMessage="We were unable to verify your identity. The sender has been notified.";this.isDone=true}if(this.envelope.status==="canceled"){this.fatalErrorHeader="Unable to Start Signing Session";this.fatalErrorMessage="This envelope has been canceled. The sender has been notified."}else if(n.status==="declined"){this.fatalErrorHeader="Declined";this.fatalErrorMessage="You have declined to sign this envelope. The sender has been notified."}else if(this.agreed){this.nextButtonLabel="Next"}this.checkRecipientFields();(s=this.envelopeLoaded)===null||s===void 0?void 0:s.emit({endpoint:this.endpoint,envelope:this.envelope})}handleClickAgree(){this.submitting=true;l(this.endpoint,this.envelopeId,this.roleId,true,this.disclosure).then((()=>{var e;this.nextButtonLabel="Next";this.recipient.agreed=true;this.submitting=false;this.agreed=true;(e=this.envelopeUpdated)===null||e===void 0?void 0:e.emit({endpoint:this.endpoint,envelope:this.envelope,event:"agreed"})})).catch((e=>{var i,t,s;console.log("[SIGN] Update failure",e);this.submitting=false;(i=this.sdkError)===null||i===void 0?void 0:i.emit(new T(e.message,(t=e.response)===null||t===void 0?void 0:t.status,(s=e.response)===null||s===void 0?void 0:s.data))}))}async handleOptionSelected(e){var i,t,s,o,n;switch(e.detail.id){case"later":this.finishLater=true;this.showFinishLater=true;(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:this.envelope,event:"later"});break;case"claim":D("This feature will be available in an upcoming release.");(t=this.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,envelope:this.envelope,event:"claimed"});break;case"decline":{this.submitting=true;const e=await r(this.endpoint,this.envelopeId,this.roleId);console.log("[SIGN] Decline result",e);(s=this.envelopeUpdated)===null||s===void 0?void 0:s.emit({endpoint:this.endpoint,envelope:this.envelope,event:"declined"});this.submitting=false;this.fatalErrorHeader="Declined";this.fatalErrorMessage="You have declined to sign this envelope. The sender has been notified."}break;case"print":window.print();(o=this.envelopeUpdated)===null||o===void 0?void 0:o.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});break;case"download":{const e=this.envelope.documents.find((e=>e.type==="attachment"));if(e){I(this.endpoint,this.envelope,e.id).catch((e=>{console.log("[SIGN] Error downloading PDF",e)}));(n=this.envelopeUpdated)===null||n===void 0?void 0:n.emit({endpoint:this.endpoint,envelope:this.envelope,event:"downloaded"})}}break}}updateRecipientFieldValue(e,i){console.log("[SIGN] updateRecipientFieldValue",e,i);this.getRecipientFields().forEach((t=>{if(t.name===e){t.value=i.value;t.settings=i.settings;G(t);this.checkRecipientFields()}}))}saveFieldChange(e,i){console.log("[SIGN] saveFieldChange",e,i);d(this.endpoint,this.envelopeId,e,i).then((i=>this.updateRecipientFieldValue(e,i))).catch((e=>{var i,t,s,o,n,a;if(((i=e.response)===null||i===void 0?void 0:i.status)===401&&((s=(t=e.response)===null||t===void 0?void 0:t.data)===null||s===void 0?void 0:s.error)==="jwt expired"){console.log("[SIGN] Signing session expired");this.fatalErrorHeader="Signing Session Expired";this.fatalErrorMessage="Please reload your browser to continue."}else{console.log("[SIGN] Server error",e)}(o=this.sdkError)===null||o===void 0?void 0:o.emit(new T(e.message,(n=e.response)===null||n===void 0?void 0:n.status,(a=e.response)===null||a===void 0?void 0:a.data))}))}async handleFieldChange(e,i){const{value:t,checked:s}=i.target;switch(e.type){case"textarea":case"textbox":return this.saveFieldChange(e.name,{prepared:false,value:t});case"checkbox":{return this.saveFieldChange(e.name,{prepared:false,value:String(i.target.checked)})}case"radio":{return this.saveFieldChange(e.name,{prepared:false,value:String(i.target.checked)})}case"dropdown":console.log("Saving dropdown",e.name,i.detail);return this.saveFieldChange(e.name,{prepared:false,value:i.detail});case"initial":if(!i.detail){return}this.showSpinner=true;const o=await(await fetch(i.detail)).blob();return p(this.endpoint,"initial",o).then((async i=>{const t=await u(this.endpoint,this.envelopeId,e.name,i.id);this.updateRecipientFieldValue(e.name,t);this.showSpinner=false})).catch((e=>{console.log("Error updating initials",e);this.showSpinner=false}));case"signature":if(!i.detail){return}this.showSpinner=true;const n=await(await fetch(i.detail)).blob();return c(this.endpoint,"signature",n).then((async i=>{console.log("Signature update result",i);const t=await h(this.endpoint,this.envelopeId,e.name,i.id);this.updateRecipientFieldValue(e.name,t);this.showSpinner=false})).catch((e=>{console.warn("[SIGN] Error updating signature",e);this.showSpinner=false}));case"date":const{formattedDate:a}=i.detail;if(a){return this.saveFieldChange(e.name,{prepared:false,value:a})}break;case"timestamp":console.log("[SIGN] Updating timestamp",{value:t,ts:i.target.getAttribute("timestamp")});break;default:console.log("[SIGN] Unhandled field update",{value:t,checked:s},e);break}}isFieldFilled(e){const{value:i=""}=e;switch(e.type){case"textarea":case"textbox":switch(e.validator||""){case"email":return v(i);case"phone":return g(i);default:return(i||"").trim()!==""}case"signature":return i==="signed";case"initial":return i==="initialed";case"timestamp":return true;case"date":return!!i;case"attachment":return i==="attached";case"dropdown":return i!=="";case"checkbox":return i==="true";case"radio":if(!!e.group){return this.getRecipientFields().filter((i=>i.group===e.group)).some((e=>e.value==="true"))}return e.value==="true";default:return false}}isFieldValid(e){return!e.required||this.isFieldFilled(e)}getSortedFillableFields(){const e=this.getRecipientFields().filter((e=>e.type!=="timestamp"));f(e);return e}async handleNext(){var e;if(this.nextSubmits){try{(e=document.getElementById("air-datepicker-global-container"))===null||e===void 0?void 0:e.remove();this.submitting=true;const i=await m(this.endpoint,this.envelopeId,this.roleId);console.log("[SIGN] Submitted successfully",i);this.recipient.status="submitted";this.showDone=true;console.log("[SIGN] Reloading envelope");x(this.endpoint,this.envelopeId).then((e=>{this.envelope=e;this.submitting=false})).catch((e=>{console.log("[SIGN] Error reloading envelope",e);this.submitting=false}))}catch(e){console.log("[SIGN] Error submitting",e)}return}const i=this.getSortedFillableFields().filter((e=>e.required&&!this.isFieldFilled(e)));f(i);const t=i.findIndex((e=>e.name===this.focusedField));let s=t+1;if(s>=i.length){s=0}let o=i[s];let n=0;if(n<i.length&&["signature","initial"].includes(o.type)&&["initialed","signed"].includes(o.value)){n++;s++;if(s>=i.length){s=0}o=i[s]}if(n>=i.length){o=null}if(o){const e=F(o);const i=document.getElementById(e);i===null||i===void 0?void 0:i.scrollIntoView({behavior:"smooth"});i===null||i===void 0?void 0:i.focusField();this.focusedField=o.name}}getRecipientFields(){return this.envelope.fields.filter((e=>e.role_name===this.recipient.role_name))}checkRecipientFields(){const e=this.getRecipientFields().filter((e=>!this.isFieldValid(e)));if(e.length<1){this.nextButtonLabel="Finish";if(!this.nextSubmits){this.nextSubmits=true}}else{console.log("[SIGN] Invalid fields remaining",e.map((e=>e.name)));this.nextButtonLabel="Next";this.nextSubmits=false}}attachFieldAttributes(e,i,t){if(t.getAttribute("attached")==="1"){return}t.setAttribute("attached","1");t.addEventListener("input",(e=>{if(e.target.type==="radio"||e.target.type==="checkbox"){this.handleFieldChange(i,e).finally((()=>this.checkRecipientFields()))}else{this.checkRecipientFields()}}));t.addEventListener("attached",(async t=>{console.log("[SIGN] onAttached",t.detail,t.target.value);this.showSpinner=true;try{const s=await b(this.endpoint,this.envelopeId,i.name,t.detail);this.updateRecipientFieldValue(i.name,s);this.checkRecipientFields();const o=z("envelope",i,e,{disabled:false,editable:false,draggable:false,done:this.isDone});this.attachFieldAttributes(e,i,o);this.showSpinner=false}catch(t){console.log("Error uploading attachment",t);D("Unable to upload attachment, please try again later",{style:"error"});this.showSpinner=false}}));t.addEventListener("deleted",(async t=>{console.log("[SIGN] onDeleted",t.detail,t.target.value);this.showSpinner=true;try{const t=await y(this.endpoint,this.envelopeId,i.name);console.log("[SIGN] Deleted attachment",t);this.updateRecipientFieldValue(i.name,t);this.checkRecipientFields();const s=z("envelope",i,e,{disabled:false,editable:false,draggable:false,done:this.isDone});this.attachFieldAttributes(e,i,s);this.showSpinner=false}catch(t){console.log("Error uploading attachment",t);D("Unable to upload attachment, please try again later",{style:"error"});this.showSpinner=false}}));t.addEventListener("focusout",(e=>{if(i.type!=="dropdown"&&i.type!=="attachment"){this.handleFieldChange(i,e).finally((()=>this.checkRecipientFields()))}}));t.addEventListener("fieldChange",(e=>{this.handleFieldChange(i,e).finally((()=>this.checkRecipientFields()))}));t.setAttribute("templateid",this.envelope.template_id);t.setAttribute("fieldname",i.name);t.setAttribute("page",e.pageNumber);t.setAttribute("xScale",e.xScale);t.setAttribute("yScale",e.yScale);const s=w(this.recipient);t.setAttribute("initials",k(s));t.setAttribute("name",s)}handlePageRendered(e){const i=e.detail;const t=this.getSortedFillableFields();console.log("[SIGN] Rendering fields for page",i.pageNumber,t);t.forEach(((e,t)=>{if(e.page!==i.pageNumber){return}const s=z("envelope",e,i,{disabled:false,editable:false,draggable:false,done:this.isDone},t);if(!s){return}if(Array.isArray(s)){s.map((t=>this.attachFieldAttributes(i,e,t)))}else{this.attachFieldAttributes(i,e,s)}}));this.envelope.recipients.filter((e=>e.role_name!==this.recipient.role_name&&(e.status==="invited"||e.status==="opened"||e.status==="pending"))).forEach((()=>{this.getRecipientFields().filter((e=>e.page===i.pageNumber)).forEach((e=>{const t=z("envelope",e,i,{disabled:true,editable:false,draggable:false,done:this.isDone});if(!t){return}if(Array.isArray(t)){t.map((t=>this.attachFieldAttributes(i,e,t)))}else{this.attachFieldAttributes(i,e,t)}}))}));this.checkRecipientFields()}handleAuthenticateSigner(e){console.log("[SIGN] Submitting authentication step",e);S(this.endpoint,e).then((e=>{console.log("[SIGN] Verification successful",e);this.processAuthResponse(e)})).catch((e=>{var i,t,s,o,n;console.log("[SIGN] Error submitting authentication step",e);if((s=(t=(i=e.response)===null||i===void 0?void 0:i.data)===null||t===void 0?void 0:t.error)===null||s===void 0?void 0:s.includes("failed")){this.fatalErrorHeader="Recipient Verification Failed";this.fatalErrorMessage="We were unable to verify your identity. The sender has been notified.";this.isDone=true}else{D(((n=(o=e.response)===null||o===void 0?void 0:o.data)===null||n===void 0?void 0:n.error)||"Unable to verify your identity. Please try again.",{style:"error"})}}))}render(){console.log("[SIGN] Rendering",{authStep:this.authStep});if(this.showLoadError){return t(s,null,t("verdocs-ok-dialog",{heading:"Unable to Start Signing",message:`Sorry, your invite code is invalid or has expired. Please check your email for an updated invitation, or contact the sender.`,buttonLabel:"OK",onNext:()=>{window.location.reload()}}))}if(!this.envelope){return t(s,null,t("verdocs-loader",null))}if(this.fatalErrorMessage){return t(s,{class:{agreed:this.agreed}},t("div",{class:"fatal-error"},t("div",{class:"message"},t("div",{class:"header"},this.fatalErrorHeader),t("p",null,this.fatalErrorMessage))))}if(this.isDone){return t(s,{class:{agreed:this.agreed}},t("verdocs-view",{endpoint:this.endpoint,envelopeId:this.envelopeId,onSdkError:e=>{var i;return(i=this.sdkError)===null||i===void 0?void 0:i.emit(e.detail)}}),this.showDone&&t("verdocs-ok-dialog",{heading:"You're Done!",message:`You can access the ${this.documentsSingularPlural} at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.`,onNext:e=>{e.preventDefault();e.stopPropagation();this.showDone=false;this.isDone=true}}),this.submitting&&t("div",{class:"loading-indicator"},t("verdocs-loader",null)))}if(!this.agreed){return t(s,{class:"agreed"},t("div",{id:"verdocs-sign-header"},t("div",{class:"inner"},t("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),t("div",{class:"title"},this.envelope.name))),t("div",{class:"document",style:{paddingTop:"15px"}},t("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"})),t("div",{class:"cover"},t("div",{class:"agree"},t("verdocs-checkbox",{name:"agree",label:"By checking this box, you:",onInput:()=>this.handleClickAgree()}),t("div",{innerHTML:this.disclosure}))))}if(this.authStep==="passcode"){return t(s,{class:"kba"},t("div",{id:"verdocs-sign-header"},t("div",{class:"inner"},t("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),t("div",{class:"title"},this.envelope.name))),t("div",{class:"document",style:{paddingTop:"15px"}},t("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"})),t("div",{class:"cover"},t("div",{class:"kba"},t("verdocs-kba-dialog",{mode:"text",step:1,steps:1,placeholder:"Enter your passcode...",helptitle:"Document is protected by a Passcode",helptext:"Please enter your Passcode to proceed. If you do not have one, please contact the sender.",label:"Passcode",onNext:e=>this.handleAuthenticateSigner({auth_method:"passcode",code:e.detail})}))))}if(this.authStep==="email"){return t("verdocs-otp-dialog",{endpoint:this.endpoint,method:"email",onNext:async e=>{this.processAuthResponse(e.detail.response)}})}if(this.authStep==="kba"&&!this.authMethodStates.kba){return t(s,{class:"kba"},t("div",{id:"verdocs-sign-header"},t("div",{class:"inner"},t("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),t("div",{class:"title"},this.envelope.name))),t("div",{class:"document",style:{paddingTop:"15px"}},t("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"})),t("div",{class:"cover"},t("div",{class:"kba"},t("verdocs-kba-dialog",{mode:"identity",helptitle:"Document requires identity verification",helptext:"Please complete your contact details to proceed.",recipient:this.recipient,onNext:async e=>{const i=e.detail;this.handleAuthenticateSigner({auth_method:"kba",first_name:i.first_name,last_name:i.last_name,address:i.address,city:i.city,state:i.state,zip:i.zip,dob:i.dob})}}))))}if(this.authStep==="kba"&&this.authMethodStates.kba==="questions"){const e=this.kbaChoices.length;const i=this.kbaQuestions[e];return t(s,{class:"kba"},t("div",{id:"verdocs-sign-header"},t("div",{class:"inner"},t("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),t("div",{class:"title"},this.envelope.name))),t("div",{class:"document",style:{paddingTop:"15px"}},t("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"})),t("div",{class:"cover"},t("div",{class:"kba"},this.kbaChoices.length>=this.kbaQuestions.length?t("verdocs-spinner",null):t("verdocs-kba-dialog",{mode:"choice",helptitle:"Your identity requires additional verification",helptext:(i===null||i===void 0?void 0:i.prompt)||"Please select one of the options below.",choices:(i===null||i===void 0?void 0:i.answer)||["Skip Question"],step:e+1,steps:this.kbaQuestions.length,onNext:async e=>{const i=e.detail;this.kbaChoices=[...this.kbaChoices,i];if(this.kbaChoices.length>=this.kbaQuestions.length){const e=this.kbaQuestions.map(((e,i)=>({type:e.type,answer:this.kbaChoices[i]})));console.log("Submitting KBA responses",this.kbaChoices,e);this.handleAuthenticateSigner({auth_method:"kba",responses:e})}}}))))}return t(s,null,t("div",{id:"verdocs-sign-header"},t("div",{class:"inner"},t("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),t("div",{class:"title"},this.envelope.name),t("div",{style:{flex:"1"}}),!this.finishLater&&t("verdocs-button",{size:"xsmall",label:this.nextButtonLabel,disabled:!this.agreed||this.submitting,onClick:()=>this.handleNext()}),t("div",{style:{marginLeft:"10px"}}),t("verdocs-dropdown",{options:!this.isDone&&!this.finishLater?j:A,onOptionSelected:e=>this.handleOptionSelected(e)}))),t("div",{class:"document",style:{paddingTop:"15px"}},(this.envelope.documents||[]).map((e=>{const i=N(1,e.pages);return t(o,null,i.map((i=>{var s;const o=((s=e.page_sizes)===null||s===void 0?void 0:s[i])||{width:612,height:792};return t("verdocs-envelope-document-page",{envelopeId:this.envelopeId,documentId:e.id,endpoint:this.endpoint,virtualWidth:o.width,virtualHeight:o.height,pageNumber:i,onPageRendered:e=>this.handlePageRendered(e),type:"filled",layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))}))),this.showFinishLater&&t("verdocs-ok-dialog",{heading:"You've saved your document to finish later.",message:`To complete the ${this.documentsSingularPlural}, use the link in the original email notification inviting you to review and finish the document.`,onNext:()=>this.showFinishLater=false}),this.showDone&&t("verdocs-ok-dialog",{heading:"You're Done!",message:`You can access the ${this.documentsSingularPlural} at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.`,onNext:()=>{this.showDone=false;this.isDone=true}}),this.submitting||this.showSpinner&&t("verdocs-portal",null,t("div",{class:"spinner-overlay"},t("verdocs-spinner",null))))}};L.style=R;export{L as verdocs_sign};
|
2
|
+
//# sourceMappingURL=p-0bb8015d.entry.js.map
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import{r as e,c as t,h as n,F as o}from"./p-CF7i8guW.js";import{VerdocsEndpoint as r,formatFullName as i,getActiveEntitlements as s,isValidEmail as c}from"@verdocs/js-sdk";import{c as a,g as l}from"./p-BFTU3MAI.js";import{B as u}from"./p-C_Xku1v2.js";import{d as f}from"./p-
|
1
|
+
import{r as e,c as t,h as n,F as o}from"./p-CF7i8guW.js";import{VerdocsEndpoint as r,formatFullName as i,getActiveEntitlements as s,isValidEmail as c}from"@verdocs/js-sdk";import{c as a,g as l}from"./p-BFTU3MAI.js";import{B as u}from"./p-C_Xku1v2.js";import{d as f}from"./p-fL0BKEnm.js";import"./p-dzBXqXlK.js";import"./p-Dl7Xw8F0.js";
|
2
2
|
/*! Axios v1.9.0 Copyright (c) 2025 Matt Zabriskie and contributors */var d;var h;function p(){if(h)return d;h=1;function e(e,t){return function n(){return e.apply(t,arguments)}}const{toString:t}=Object.prototype;const{getPrototypeOf:n}=Object;const{iterator:o,toStringTag:r}=Symbol;const i=(e=>n=>{const o=t.call(n);return e[o]||(e[o]=o.slice(8,-1).toLowerCase())})(Object.create(null));const s=e=>{e=e.toLowerCase();return t=>i(t)===e};const c=e=>t=>typeof t===e;const{isArray:l}=Array;const u=c("undefined");function f(e){return e!==null&&!u(e)&&e.constructor!==null&&!u(e.constructor)&&w(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const p=s("ArrayBuffer");function m(e){let t;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){t=ArrayBuffer.isView(e)}else{t=e&&e.buffer&&p(e.buffer)}return t}const b=c("string");const w=c("function");const g=c("number");const v=e=>e!==null&&typeof e==="object";const y=e=>e===true||e===false;const x=e=>{if(i(e)!=="object"){return false}const t=n(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(r in e)&&!(o in e)};const k=s("Date");const R=s("File");const O=s("Blob");const E=s("FileList");const S=e=>v(e)&&w(e.pipe);const T=e=>{let t;return e&&(typeof FormData==="function"&&e instanceof FormData||w(e.append)&&((t=i(e))==="formdata"||t==="object"&&w(e.toString)&&e.toString()==="[object FormData]"))};const A=s("URLSearchParams");const[j,C,N,F]=["ReadableStream","Request","Response","Headers"].map(s);const P=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function U(e,t,{allOwnKeys:n=false}={}){if(e===null||typeof e==="undefined"){return}let o;let r;if(typeof e!=="object"){e=[e]}if(l(e)){for(o=0,r=e.length;o<r;o++){t.call(null,e[o],o,e)}}else{const r=n?Object.getOwnPropertyNames(e):Object.keys(e);const i=r.length;let s;for(o=0;o<i;o++){s=r[o];t.call(null,e[s],s,e)}}}function B(e,t){t=t.toLowerCase();const n=Object.keys(e);let o=n.length;let r;while(o-- >0){r=n[o];if(t===r.toLowerCase()){return r}}return null}const I=(()=>{if(typeof globalThis!=="undefined")return globalThis;return typeof self!=="undefined"?self:typeof window!=="undefined"?window:a})();const _=e=>!u(e)&&e!==I;function D(){const{caseless:e}=_(this)&&this||{};const t={};const n=(n,o)=>{const r=e&&B(t,o)||o;if(x(t[r])&&x(n)){t[r]=D(t[r],n)}else if(x(n)){t[r]=D({},n)}else if(l(n)){t[r]=n.slice()}else{t[r]=n}};for(let e=0,t=arguments.length;e<t;e++){arguments[e]&&U(arguments[e],n)}return t}const L=(t,n,o,{allOwnKeys:r}={})=>{U(n,((n,r)=>{if(o&&w(n)){t[r]=e(n,o)}else{t[r]=n}}),{allOwnKeys:r});return t};const q=e=>{if(e.charCodeAt(0)===65279){e=e.slice(1)}return e};const z=(e,t,n,o)=>{e.prototype=Object.create(t.prototype,o);e.prototype.constructor=e;Object.defineProperty(e,"super",{value:t.prototype});n&&Object.assign(e.prototype,n)};const M=(e,t,o,r)=>{let i;let s;let c;const a={};t=t||{};if(e==null)return t;do{i=Object.getOwnPropertyNames(e);s=i.length;while(s-- >0){c=i[s];if((!r||r(c,e,t))&&!a[c]){t[c]=e[c];a[c]=true}}e=o!==false&&n(e)}while(e&&(!o||o(e,t))&&e!==Object.prototype);return t};const H=(e,t,n)=>{e=String(e);if(n===undefined||n>e.length){n=e.length}n-=t.length;const o=e.indexOf(t,n);return o!==-1&&o===n};const $=e=>{if(!e)return null;if(l(e))return e;let t=e.length;if(!g(t))return null;const n=new Array(t);while(t-- >0){n[t]=e[t]}return n};const K=(e=>t=>e&&t instanceof e)(typeof Uint8Array!=="undefined"&&n(Uint8Array));const J=(e,t)=>{const n=e&&e[o];const r=n.call(e);let i;while((i=r.next())&&!i.done){const n=i.value;t.call(e,n[0],n[1])}};const X=(e,t)=>{let n;const o=[];while((n=e.exec(t))!==null){o.push(n)}return o};const W=s("HTMLFormElement");const V=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function e(t,n,o){return n.toUpperCase()+o}));const G=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype);const Z=s("RegExp");const Q=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e);const o={};U(n,((n,r)=>{let i;if((i=t(n,r,e))!==false){o[r]=i||n}}));Object.defineProperties(e,o)};const Y=e=>{Q(e,((t,n)=>{if(w(e)&&["arguments","caller","callee"].indexOf(n)!==-1){return false}const o=e[n];if(!w(o))return;t.enumerable=false;if("writable"in t){t.writable=false;return}if(!t.set){t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}}}))};const ee=(e,t)=>{const n={};const o=e=>{e.forEach((e=>{n[e]=true}))};l(e)?o(e):o(String(e).split(t));return n};const te=()=>{};const ne=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function oe(e){return!!(e&&w(e.append)&&e[r]==="FormData"&&e[o])}const re=e=>{const t=new Array(10);const n=(e,o)=>{if(v(e)){if(t.indexOf(e)>=0){return}if(!("toJSON"in e)){t[o]=e;const r=l(e)?[]:{};U(e,((e,t)=>{const i=n(e,o+1);!u(i)&&(r[t]=i)}));t[o]=undefined;return r}}return e};return n(e,0)};const ie=s("AsyncFunction");const se=e=>e&&(v(e)||w(e))&&w(e.then)&&w(e.catch);const ce=((e,t)=>{if(e){return setImmediate}return t?((e,t)=>{I.addEventListener("message",(({source:n,data:o})=>{if(n===I&&o===e){t.length&&t.shift()()}}),false);return n=>{t.push(n);I.postMessage(e,"*")}})(`axios@${Math.random()}`,[]):e=>setTimeout(e)})(typeof setImmediate==="function",w(I.postMessage));const ae=typeof queueMicrotask!=="undefined"?queueMicrotask.bind(I):typeof process!=="undefined"&&process.nextTick||ce;const le=e=>e!=null&&w(e[o]);var ue={isArray:l,isArrayBuffer:p,isBuffer:f,isFormData:T,isArrayBufferView:m,isString:b,isNumber:g,isBoolean:y,isObject:v,isPlainObject:x,isReadableStream:j,isRequest:C,isResponse:N,isHeaders:F,isUndefined:u,isDate:k,isFile:R,isBlob:O,isRegExp:Z,isFunction:w,isStream:S,isURLSearchParams:A,isTypedArray:K,isFileList:E,forEach:U,merge:D,extend:L,trim:P,stripBOM:q,inherits:z,toFlatObject:M,kindOf:i,kindOfTest:s,endsWith:H,toArray:$,forEachEntry:J,matchAll:X,isHTMLForm:W,hasOwnProperty:G,hasOwnProp:G,reduceDescriptors:Q,freezeMethods:Y,toObjectSet:ee,toCamelCase:V,noop:te,toFiniteNumber:ne,findKey:B,global:I,isContextDefined:_,isSpecCompliantForm:oe,toJSONObject:re,isAsyncFn:ie,isThenable:se,setImmediate:ce,asap:ae,isIterable:le};function fe(e,t,n,o,r){Error.call(this);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=(new Error).stack}this.message=e;this.name="AxiosError";t&&(this.code=t);n&&(this.config=n);o&&(this.request=o);if(r){this.response=r;this.status=r.status?r.status:null}}ue.inherits(fe,Error,{toJSON:function e(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ue.toJSONObject(this.config),code:this.code,status:this.status}}});const de=fe.prototype;const he={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{he[e]={value:e}}));Object.defineProperties(fe,he);Object.defineProperty(de,"isAxiosError",{value:true});fe.from=(e,t,n,o,r,i)=>{const s=Object.create(de);ue.toFlatObject(e,s,(function e(t){return t!==Error.prototype}),(e=>e!=="isAxiosError"));fe.call(s,e.message,t,n,o,r);s.cause=e;s.name=e.name;i&&Object.assign(s,i);return s};var pe=null;function me(e){return ue.isPlainObject(e)||ue.isArray(e)}function be(e){return ue.endsWith(e,"[]")?e.slice(0,-2):e}function we(e,t,n){if(!e)return t;return e.concat(t).map((function e(t,o){t=be(t);return!n&&o?"["+t+"]":t})).join(n?".":"")}function ge(e){return ue.isArray(e)&&!e.some(me)}const ve=ue.toFlatObject(ue,{},null,(function e(t){return/^is[A-Z]/.test(t)}));function ye(e,t,n){if(!ue.isObject(e)){throw new TypeError("target must be an object")}t=t||new FormData;n=ue.toFlatObject(n,{metaTokens:true,dots:false,indexes:false},false,(function e(t,n){return!ue.isUndefined(n[t])}));const o=n.metaTokens;const r=n.visitor||u;const i=n.dots;const s=n.indexes;const c=n.Blob||typeof Blob!=="undefined"&&Blob;const a=c&&ue.isSpecCompliantForm(t);if(!ue.isFunction(r)){throw new TypeError("visitor must be a function")}function l(e){if(e===null)return"";if(ue.isDate(e)){return e.toISOString()}if(!a&&ue.isBlob(e)){throw new fe("Blob is not supported. Use a Buffer instead.")}if(ue.isArrayBuffer(e)||ue.isTypedArray(e)){return a&&typeof Blob==="function"?new Blob([e]):Buffer.from(e)}return e}function u(e,n,r){let c=e;if(e&&!r&&typeof e==="object"){if(ue.endsWith(n,"{}")){n=o?n:n.slice(0,-2);e=JSON.stringify(e)}else if(ue.isArray(e)&&ge(e)||(ue.isFileList(e)||ue.endsWith(n,"[]"))&&(c=ue.toArray(e))){n=be(n);c.forEach((function e(o,r){!(ue.isUndefined(o)||o===null)&&t.append(s===true?we([n],r,i):s===null?n:n+"[]",l(o))}));return false}}if(me(e)){return true}t.append(we(r,n,i),l(e));return false}const f=[];const d=Object.assign(ve,{defaultVisitor:u,convertValue:l,isVisitable:me});function h(e,n){if(ue.isUndefined(e))return;if(f.indexOf(e)!==-1){throw Error("Circular reference detected in "+n.join("."))}f.push(e);ue.forEach(e,(function e(o,i){const s=!(ue.isUndefined(o)||o===null)&&r.call(t,o,ue.isString(i)?i.trim():i,n,d);if(s===true){h(o,n?n.concat(i):[i])}}));f.pop()}if(!ue.isObject(e)){throw new TypeError("data must be an object")}h(e);return t}function xe(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function e(n){return t[n]}))}function ke(e,t){this._pairs=[];e&&ye(e,this,t)}const Re=ke.prototype;Re.append=function e(t,n){this._pairs.push([t,n])};Re.toString=function e(t){const n=t?function(e){return t.call(this,e,xe)}:xe;return this._pairs.map((function e(t){return n(t[0])+"="+n(t[1])}),"").join("&")};function Oe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ee(e,t,n){if(!t){return e}const o=n&&n.encode||Oe;if(ue.isFunction(n)){n={serialize:n}}const r=n&&n.serialize;let i;if(r){i=r(t,n)}else{i=ue.isURLSearchParams(t)?t.toString():new ke(t,n).toString(o)}if(i){const t=e.indexOf("#");if(t!==-1){e=e.slice(0,t)}e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Se{constructor(){this.handlers=[]}use(e,t,n){this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:false,runWhen:n?n.runWhen:null});return this.handlers.length-1}eject(e){if(this.handlers[e]){this.handlers[e]=null}}clear(){if(this.handlers){this.handlers=[]}}forEach(e){ue.forEach(this.handlers,(function t(n){if(n!==null){e(n)}}))}}var Te=Se;var Ae={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false};var je=typeof URLSearchParams!=="undefined"?URLSearchParams:ke;var Ce=typeof FormData!=="undefined"?FormData:null;var Ne=typeof Blob!=="undefined"?Blob:null;var Fe={isBrowser:true,classes:{URLSearchParams:je,FormData:Ce,Blob:Ne},protocols:["http","https","file","blob","url","data"]};const Pe=typeof window!=="undefined"&&typeof document!=="undefined";const Ue=typeof navigator==="object"&&navigator||undefined;const Be=Pe&&(!Ue||["ReactNative","NativeScript","NS"].indexOf(Ue.product)<0);const Ie=(()=>typeof WorkerGlobalScope!=="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function")();const _e=Pe&&window.location.href||"http://localhost";var De=Object.freeze({__proto__:null,hasBrowserEnv:Pe,hasStandardBrowserWebWorkerEnv:Ie,hasStandardBrowserEnv:Be,navigator:Ue,origin:_e});var Le={...De,...Fe};function qe(e,t){return ye(e,new Le.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,o){if(Le.isNode&&ue.isBuffer(e)){this.append(t,e.toString("base64"));return false}return o.defaultVisitor.apply(this,arguments)}},t))}function ze(e){return ue.matchAll(/\w+|\[(\w*)]/g,e).map((e=>e[0]==="[]"?"":e[1]||e[0]))}function Me(e){const t={};const n=Object.keys(e);let o;const r=n.length;let i;for(o=0;o<r;o++){i=n[o];t[i]=e[i]}return t}function He(e){function t(e,n,o,r){let i=e[r++];if(i==="__proto__")return true;const s=Number.isFinite(+i);const c=r>=e.length;i=!i&&ue.isArray(o)?o.length:i;if(c){if(ue.hasOwnProp(o,i)){o[i]=[o[i],n]}else{o[i]=n}return!s}if(!o[i]||!ue.isObject(o[i])){o[i]=[]}const a=t(e,n,o[i],r);if(a&&ue.isArray(o[i])){o[i]=Me(o[i])}return!s}if(ue.isFormData(e)&&ue.isFunction(e.entries)){const n={};ue.forEachEntry(e,((e,o)=>{t(ze(e),o,n,0)}));return n}return null}function $e(e,t,n){if(ue.isString(e)){try{(0,JSON.parse)(e);return ue.trim(e)}catch(e){if(e.name!=="SyntaxError"){throw e}}}return(n||JSON.stringify)(e)}const Ke={transitional:Ae,adapter:["xhr","http","fetch"],transformRequest:[function e(t,n){const o=n.getContentType()||"";const r=o.indexOf("application/json")>-1;const i=ue.isObject(t);if(i&&ue.isHTMLForm(t)){t=new FormData(t)}const s=ue.isFormData(t);if(s){return r?JSON.stringify(He(t)):t}if(ue.isArrayBuffer(t)||ue.isBuffer(t)||ue.isStream(t)||ue.isFile(t)||ue.isBlob(t)||ue.isReadableStream(t)){return t}if(ue.isArrayBufferView(t)){return t.buffer}if(ue.isURLSearchParams(t)){n.setContentType("application/x-www-form-urlencoded;charset=utf-8",false);return t.toString()}let c;if(i){if(o.indexOf("application/x-www-form-urlencoded")>-1){return qe(t,this.formSerializer).toString()}if((c=ue.isFileList(t))||o.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return ye(c?{"files[]":t}:t,e&&new e,this.formSerializer)}}if(i||r){n.setContentType("application/json",false);return $e(t)}return t}],transformResponse:[function e(t){const n=this.transitional||Ke.transitional;const o=n&&n.forcedJSONParsing;const r=this.responseType==="json";if(ue.isResponse(t)||ue.isReadableStream(t)){return t}if(t&&ue.isString(t)&&(o&&!this.responseType||r)){const e=n&&n.silentJSONParsing;const o=!e&&r;try{return JSON.parse(t)}catch(e){if(o){if(e.name==="SyntaxError"){throw fe.from(e,fe.ERR_BAD_RESPONSE,this,null,this.response)}throw e}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Le.classes.FormData,Blob:Le.classes.Blob},validateStatus:function e(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":undefined}}};ue.forEach(["delete","get","head","post","put","patch"],(e=>{Ke.headers[e]={}}));var Je=Ke;const Xe=ue.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var We=e=>{const t={};let n;let o;let r;e&&e.split("\n").forEach((function e(i){r=i.indexOf(":");n=i.substring(0,r).trim().toLowerCase();o=i.substring(r+1).trim();if(!n||t[n]&&Xe[n]){return}if(n==="set-cookie"){if(t[n]){t[n].push(o)}else{t[n]=[o]}}else{t[n]=t[n]?t[n]+", "+o:o}}));return t};const Ve=Symbol("internals");function Ge(e){return e&&String(e).trim().toLowerCase()}function Ze(e){if(e===false||e==null){return e}return ue.isArray(e)?e.map(Ze):String(e)}function Qe(e){const t=Object.create(null);const n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;while(o=n.exec(e)){t[o[1]]=o[2]}return t}const Ye=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function et(e,t,n,o,r){if(ue.isFunction(o)){return o.call(this,t,n)}if(r){t=n}if(!ue.isString(t))return;if(ue.isString(o)){return t.indexOf(o)!==-1}if(ue.isRegExp(o)){return o.test(t)}}function tt(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}function nt(e,t){const n=ue.toCamelCase(" "+t);["get","set","has"].forEach((o=>{Object.defineProperty(e,o+n,{value:function(e,n,r){return this[o].call(this,t,e,n,r)},configurable:true})}))}class ot{constructor(e){e&&this.set(e)}set(e,t,n){const o=this;function r(e,t,n){const r=Ge(t);if(!r){throw new Error("header name must be a non-empty string")}const i=ue.findKey(o,r);if(!i||o[i]===undefined||n===true||n===undefined&&o[i]!==false){o[i||t]=Ze(e)}}const i=(e,t)=>ue.forEach(e,((e,n)=>r(e,n,t)));if(ue.isPlainObject(e)||e instanceof this.constructor){i(e,t)}else if(ue.isString(e)&&(e=e.trim())&&!Ye(e)){i(We(e),t)}else if(ue.isObject(e)&&ue.isIterable(e)){let n={},o,r;for(const t of e){if(!ue.isArray(t)){throw TypeError("Object iterator must return a key-value pair")}n[r=t[0]]=(o=n[r])?ue.isArray(o)?[...o,t[1]]:[o,t[1]]:t[1]}i(n,t)}else{e!=null&&r(t,e,n)}return this}get(e,t){e=Ge(e);if(e){const n=ue.findKey(this,e);if(n){const e=this[n];if(!t){return e}if(t===true){return Qe(e)}if(ue.isFunction(t)){return t.call(this,e,n)}if(ue.isRegExp(t)){return t.exec(e)}throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){e=Ge(e);if(e){const n=ue.findKey(this,e);return!!(n&&this[n]!==undefined&&(!t||et(this,this[n],n,t)))}return false}delete(e,t){const n=this;let o=false;function r(e){e=Ge(e);if(e){const r=ue.findKey(n,e);if(r&&(!t||et(n,n[r],r,t))){delete n[r];o=true}}}if(ue.isArray(e)){e.forEach(r)}else{r(e)}return o}clear(e){const t=Object.keys(this);let n=t.length;let o=false;while(n--){const r=t[n];if(!e||et(this,this[r],r,e,true)){delete this[r];o=true}}return o}normalize(e){const t=this;const n={};ue.forEach(this,((o,r)=>{const i=ue.findKey(n,r);if(i){t[i]=Ze(o);delete t[r];return}const s=e?tt(r):String(r).trim();if(s!==r){delete t[r]}t[s]=Ze(o);n[s]=true}));return this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);ue.forEach(this,((n,o)=>{n!=null&&n!==false&&(t[o]=e&&ue.isArray(n)?n.join(", "):n)}));return t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);t.forEach((e=>n.set(e)));return n}static accessor(e){const t=this[Ve]=this[Ve]={accessors:{}};const n=t.accessors;const o=this.prototype;function r(e){const t=Ge(e);if(!n[t]){nt(o,e);n[t]=true}}ue.isArray(e)?e.forEach(r):r(e);return this}}ot.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ue.reduceDescriptors(ot.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}));ue.freezeMethods(ot);var rt=ot;function it(e,t){const n=this||Je;const o=t||n;const r=rt.from(o.headers);let i=o.data;ue.forEach(e,(function e(o){i=o.call(n,i,r.normalize(),t?t.status:undefined)}));r.normalize();return i}function st(e){return!!(e&&e.__CANCEL__)}function ct(e,t,n){fe.call(this,e==null?"canceled":e,fe.ERR_CANCELED,t,n);this.name="CanceledError"}ue.inherits(ct,fe,{__CANCEL__:true});function at(e,t,n){const o=n.config.validateStatus;if(!n.status||!o||o(n.status)){e(n)}else{t(new fe("Request failed with status code "+n.status,[fe.ERR_BAD_REQUEST,fe.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}}function lt(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function ut(e,t){e=e||10;const n=new Array(e);const o=new Array(e);let r=0;let i=0;let s;t=t!==undefined?t:1e3;return function c(a){const l=Date.now();const u=o[i];if(!s){s=l}n[r]=a;o[r]=l;let f=i;let d=0;while(f!==r){d+=n[f++];f=f%e}r=(r+1)%e;if(r===i){i=(i+1)%e}if(l-s<t){return}const h=u&&l-u;return h?Math.round(d*1e3/h):undefined}}function ft(e,t){let n=0;let o=1e3/t;let r;let i;const s=(t,o=Date.now())=>{n=o;r=null;if(i){clearTimeout(i);i=null}e.apply(null,t)};const c=(...e)=>{const t=Date.now();const c=t-n;if(c>=o){s(e,t)}else{r=e;if(!i){i=setTimeout((()=>{i=null;s(r)}),o-c)}}};const a=()=>r&&s(r);return[c,a]}const dt=(e,t,n=3)=>{let o=0;const r=ut(50,250);return ft((n=>{const i=n.loaded;const s=n.lengthComputable?n.total:undefined;const c=i-o;const a=r(c);const l=i<=s;o=i;const u={loaded:i,total:s,progress:s?i/s:undefined,bytes:c,rate:a?a:undefined,estimated:a&&s&&l?(s-i)/a:undefined,event:n,lengthComputable:s!=null,[t?"download":"upload"]:true};e(u)}),n)};const ht=(e,t)=>{const n=e!=null;return[o=>t[0]({lengthComputable:n,total:e,loaded:o}),t[1]]};const pt=e=>(...t)=>ue.asap((()=>e(...t)));var mt=Le.hasStandardBrowserEnv?((e,t)=>n=>{n=new URL(n,Le.origin);return e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)})(new URL(Le.origin),Le.navigator&&/(msie|trident)/i.test(Le.navigator.userAgent)):()=>true;var bt=Le.hasStandardBrowserEnv?{write(e,t,n,o,r,i){const s=[e+"="+encodeURIComponent(t)];ue.isNumber(n)&&s.push("expires="+new Date(n).toGMTString());ue.isString(o)&&s.push("path="+o);ue.isString(r)&&s.push("domain="+r);i===true&&s.push("secure");document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function wt(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function gt(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function vt(e,t,n){let o=!wt(t);if(e&&(o||n==false)){return gt(e,t)}return t}const yt=e=>e instanceof rt?{...e}:e;function xt(e,t){t=t||{};const n={};function o(e,t,n,o){if(ue.isPlainObject(e)&&ue.isPlainObject(t)){return ue.merge.call({caseless:o},e,t)}else if(ue.isPlainObject(t)){return ue.merge({},t)}else if(ue.isArray(t)){return t.slice()}return t}function r(e,t,n,r){if(!ue.isUndefined(t)){return o(e,t,n,r)}else if(!ue.isUndefined(e)){return o(undefined,e,n,r)}}function i(e,t){if(!ue.isUndefined(t)){return o(undefined,t)}}function s(e,t){if(!ue.isUndefined(t)){return o(undefined,t)}else if(!ue.isUndefined(e)){return o(undefined,e)}}function c(n,r,i){if(i in t){return o(n,r)}else if(i in e){return o(undefined,n)}}const a={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:c,headers:(e,t,n)=>r(yt(e),yt(t),n,true)};ue.forEach(Object.keys(Object.assign({},e,t)),(function o(i){const s=a[i]||r;const l=s(e[i],t[i],i);ue.isUndefined(l)&&s!==c||(n[i]=l)}));return n}var kt=e=>{const t=xt({},e);let{data:n,withXSRFToken:o,xsrfHeaderName:r,xsrfCookieName:i,headers:s,auth:c}=t;t.headers=s=rt.from(s);t.url=Ee(vt(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer);if(c){s.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")))}let a;if(ue.isFormData(n)){if(Le.hasStandardBrowserEnv||Le.hasStandardBrowserWebWorkerEnv){s.setContentType(undefined)}else if((a=s.getContentType())!==false){const[e,...t]=a?a.split(";").map((e=>e.trim())).filter(Boolean):[];s.setContentType([e||"multipart/form-data",...t].join("; "))}}if(Le.hasStandardBrowserEnv){o&&ue.isFunction(o)&&(o=o(t));if(o||o!==false&&mt(t.url)){const e=r&&i&&bt.read(i);if(e){s.set(r,e)}}}return t};const Rt=typeof XMLHttpRequest!=="undefined";var Ot=Rt&&function(e){return new Promise((function t(n,o){const r=kt(e);let i=r.data;const s=rt.from(r.headers).normalize();let{responseType:c,onUploadProgress:a,onDownloadProgress:l}=r;let u;let f,d;let h,p;function m(){h&&h();p&&p();r.cancelToken&&r.cancelToken.unsubscribe(u);r.signal&&r.signal.removeEventListener("abort",u)}let b=new XMLHttpRequest;b.open(r.method.toUpperCase(),r.url,true);b.timeout=r.timeout;function w(){if(!b){return}const t=rt.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders());const r=!c||c==="text"||c==="json"?b.responseText:b.response;const i={data:r,status:b.status,statusText:b.statusText,headers:t,config:e,request:b};at((function e(t){n(t);m()}),(function e(t){o(t);m()}),i);b=null}if("onloadend"in b){b.onloadend=w}else{b.onreadystatechange=function e(){if(!b||b.readyState!==4){return}if(b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)){return}setTimeout(w)}}b.onabort=function t(){if(!b){return}o(new fe("Request aborted",fe.ECONNABORTED,e,b));b=null};b.onerror=function t(){o(new fe("Network Error",fe.ERR_NETWORK,e,b));b=null};b.ontimeout=function t(){let n=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const i=r.transitional||Ae;if(r.timeoutErrorMessage){n=r.timeoutErrorMessage}o(new fe(n,i.clarifyTimeoutError?fe.ETIMEDOUT:fe.ECONNABORTED,e,b));b=null};i===undefined&&s.setContentType(null);if("setRequestHeader"in b){ue.forEach(s.toJSON(),(function e(t,n){b.setRequestHeader(n,t)}))}if(!ue.isUndefined(r.withCredentials)){b.withCredentials=!!r.withCredentials}if(c&&c!=="json"){b.responseType=r.responseType}if(l){[d,p]=dt(l,true);b.addEventListener("progress",d)}if(a&&b.upload){[f,h]=dt(a);b.upload.addEventListener("progress",f);b.upload.addEventListener("loadend",h)}if(r.cancelToken||r.signal){u=t=>{if(!b){return}o(!t||t.type?new ct(null,e,b):t);b.abort();b=null};r.cancelToken&&r.cancelToken.subscribe(u);if(r.signal){r.signal.aborted?u():r.signal.addEventListener("abort",u)}}const g=lt(r.url);if(g&&Le.protocols.indexOf(g)===-1){o(new fe("Unsupported protocol "+g+":",fe.ERR_BAD_REQUEST,e));return}b.send(i||null)}))};const Et=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n=new AbortController;let o;const r=function(e){if(!o){o=true;s();const t=e instanceof Error?e:this.reason;n.abort(t instanceof fe?t:new ct(t instanceof Error?t.message:t))}};let i=t&&setTimeout((()=>{i=null;r(new fe(`timeout ${t} of ms exceeded`,fe.ETIMEDOUT))}),t);const s=()=>{if(e){i&&clearTimeout(i);i=null;e.forEach((e=>{e.unsubscribe?e.unsubscribe(r):e.removeEventListener("abort",r)}));e=null}};e.forEach((e=>e.addEventListener("abort",r)));const{signal:c}=n;c.unsubscribe=()=>ue.asap(s);return c}};var St=Et;const Tt=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let o=0;let r;while(o<n){r=o+t;yield e.slice(o,r);o=r}};const At=async function*(e,t){for await(const n of jt(e)){yield*Tt(n,t)}};const jt=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e){break}yield n}}finally{await t.cancel()}};const Ct=(e,t,n,o)=>{const r=At(e,t);let i=0;let s;let c=e=>{if(!s){s=true;o&&o(e)}};return new ReadableStream({async pull(e){try{const{done:t,value:o}=await r.next();if(t){c();e.close();return}let s=o.byteLength;if(n){let e=i+=s;n(e)}e.enqueue(new Uint8Array(o))}catch(e){c(e);throw e}},cancel(e){c(e);return r.return()}},{highWaterMark:2})};const Nt=typeof fetch==="function"&&typeof Request==="function"&&typeof Response==="function";const Ft=Nt&&typeof ReadableStream==="function";const Pt=Nt&&(typeof TextEncoder==="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer()));const Ut=(e,...t)=>{try{return!!e(...t)}catch(e){return false}};const Bt=Ft&&Ut((()=>{let e=false;const t=new Request(Le.origin,{body:new ReadableStream,method:"POST",get duplex(){e=true;return"half"}}).headers.has("Content-Type");return e&&!t}));const It=64*1024;const _t=Ft&&Ut((()=>ue.isReadableStream(new Response("").body)));const Dt={stream:_t&&(e=>e.body)};Nt&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach((t=>{!Dt[t]&&(Dt[t]=ue.isFunction(e[t])?e=>e[t]():(e,n)=>{throw new fe(`Response type '${t}' is not supported`,fe.ERR_NOT_SUPPORT,n)})}))})(new Response);const Lt=async e=>{if(e==null){return 0}if(ue.isBlob(e)){return e.size}if(ue.isSpecCompliantForm(e)){const t=new Request(Le.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}if(ue.isArrayBufferView(e)||ue.isArrayBuffer(e)){return e.byteLength}if(ue.isURLSearchParams(e)){e=e+""}if(ue.isString(e)){return(await Pt(e)).byteLength}};const qt=async(e,t)=>{const n=ue.toFiniteNumber(e.getContentLength());return n==null?Lt(t):n};var zt=Nt&&(async e=>{let{url:t,method:n,data:o,signal:r,cancelToken:i,timeout:s,onDownloadProgress:c,onUploadProgress:a,responseType:l,headers:u,withCredentials:f="same-origin",fetchOptions:d}=kt(e);l=l?(l+"").toLowerCase():"text";let h=St([r,i&&i.toAbortSignal()],s);let p;const m=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let b;try{if(a&&Bt&&n!=="get"&&n!=="head"&&(b=await qt(u,o))!==0){let e=new Request(t,{method:"POST",body:o,duplex:"half"});let n;if(ue.isFormData(o)&&(n=e.headers.get("content-type"))){u.setContentType(n)}if(e.body){const[t,n]=ht(b,dt(pt(a)));o=Ct(e.body,It,t,n)}}if(!ue.isString(f)){f=f?"include":"omit"}const r="credentials"in Request.prototype;p=new Request(t,{...d,signal:h,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:o,duplex:"half",credentials:r?f:undefined});let i=await fetch(p);const s=_t&&(l==="stream"||l==="response");if(_t&&(c||s&&m)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=i[t]}));const t=ue.toFiniteNumber(i.headers.get("content-length"));const[n,o]=c&&ht(t,dt(pt(c),true))||[];i=new Response(Ct(i.body,It,n,(()=>{o&&o();m&&m()})),e)}l=l||"text";let w=await Dt[ue.findKey(Dt,l)||"text"](i,e);!s&&m&&m();return await new Promise(((t,n)=>{at(t,n,{data:w,headers:rt.from(i.headers),status:i.status,statusText:i.statusText,config:e,request:p})}))}catch(t){m&&m();if(t&&t.name==="TypeError"&&/Load failed|fetch/i.test(t.message)){throw Object.assign(new fe("Network Error",fe.ERR_NETWORK,e,p),{cause:t.cause||t})}throw fe.from(t,t&&t.code,e,p)}});const Mt={http:pe,xhr:Ot,fetch:zt};ue.forEach(Mt,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Ht=e=>`- ${e}`;const $t=e=>ue.isFunction(e)||e===null||e===false;var Kt={getAdapter:e=>{e=ue.isArray(e)?e:[e];const{length:t}=e;let n;let o;const r={};for(let i=0;i<t;i++){n=e[i];let t;o=n;if(!$t(n)){o=Mt[(t=String(n)).toLowerCase()];if(o===undefined){throw new fe(`Unknown adapter '${t}'`)}}if(o){break}r[t||"#"+i]=o}if(!o){const e=Object.entries(r).map((([e,t])=>`adapter ${e} `+(t===false?"is not supported by the environment":"is not available in the build")));let n=t?e.length>1?"since :\n"+e.map(Ht).join("\n"):" "+Ht(e[0]):"as no adapter specified";throw new fe(`There is no suitable adapter to dispatch the request `+n,"ERR_NOT_SUPPORT")}return o},adapters:Mt};function Jt(e){if(e.cancelToken){e.cancelToken.throwIfRequested()}if(e.signal&&e.signal.aborted){throw new ct(null,e)}}function Xt(e){Jt(e);e.headers=rt.from(e.headers);e.data=it.call(e,e.transformRequest);if(["post","put","patch"].indexOf(e.method)!==-1){e.headers.setContentType("application/x-www-form-urlencoded",false)}const t=Kt.getAdapter(e.adapter||Je.adapter);return t(e).then((function t(n){Jt(e);n.data=it.call(e,e.transformResponse,n);n.headers=rt.from(n.headers);return n}),(function t(n){if(!st(n)){Jt(e);if(n&&n.response){n.response.data=it.call(e,e.transformResponse,n.response);n.response.headers=rt.from(n.response.headers)}}return Promise.reject(n)}))}const Wt="1.9.0";const Vt={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Vt[e]=function n(o){return typeof o===e||"a"+(t<1?"n ":" ")+e}}));const Gt={};Vt.transitional=function e(t,n,o){function r(e,t){return"[Axios v"+Wt+"] Transitional option '"+e+"'"+t+(o?". "+o:"")}return(e,o,i)=>{if(t===false){throw new fe(r(o," has been removed"+(n?" in "+n:"")),fe.ERR_DEPRECATED)}if(n&&!Gt[o]){Gt[o]=true;console.warn(r(o," has been deprecated since v"+n+" and will be removed in the near future"))}return t?t(e,o,i):true}};Vt.spelling=function e(t){return(e,n)=>{console.warn(`${n} is likely a misspelling of ${t}`);return true}};function Zt(e,t,n){if(typeof e!=="object"){throw new fe("options must be an object",fe.ERR_BAD_OPTION_VALUE)}const o=Object.keys(e);let r=o.length;while(r-- >0){const i=o[r];const s=t[i];if(s){const t=e[i];const n=t===undefined||s(t,i,e);if(n!==true){throw new fe("option "+i+" must be "+n,fe.ERR_BAD_OPTION_VALUE)}continue}if(n!==true){throw new fe("Unknown option "+i,fe.ERR_BAD_OPTION)}}}var Qt={assertOptions:Zt,validators:Vt};const Yt=Qt.validators;class en{constructor(e){this.defaults=e||{};this.interceptors={request:new Te,response:new Te}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{if(!e.stack){e.stack=n}else if(n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))){e.stack+="\n"+n}}catch(e){}}throw e}}_request(e,t){if(typeof e==="string"){t=t||{};t.url=e}else{t=e||{}}t=xt(this.defaults,t);const{transitional:n,paramsSerializer:o,headers:r}=t;if(n!==undefined){Qt.assertOptions(n,{silentJSONParsing:Yt.transitional(Yt.boolean),forcedJSONParsing:Yt.transitional(Yt.boolean),clarifyTimeoutError:Yt.transitional(Yt.boolean)},false)}if(o!=null){if(ue.isFunction(o)){t.paramsSerializer={serialize:o}}else{Qt.assertOptions(o,{encode:Yt.function,serialize:Yt.function},true)}}if(t.allowAbsoluteUrls!==undefined);else if(this.defaults.allowAbsoluteUrls!==undefined){t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls}else{t.allowAbsoluteUrls=true}Qt.assertOptions(t,{baseUrl:Yt.spelling("baseURL"),withXsrfToken:Yt.spelling("withXSRFToken")},true);t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=r&&ue.merge(r.common,r[t.method]);r&&ue.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete r[e]}));t.headers=rt.concat(i,r);const s=[];let c=true;this.interceptors.request.forEach((function e(n){if(typeof n.runWhen==="function"&&n.runWhen(t)===false){return}c=c&&n.synchronous;s.unshift(n.fulfilled,n.rejected)}));const a=[];this.interceptors.response.forEach((function e(t){a.push(t.fulfilled,t.rejected)}));let l;let u=0;let f;if(!c){const e=[Xt.bind(this),undefined];e.unshift.apply(e,s);e.push.apply(e,a);f=e.length;l=Promise.resolve(t);while(u<f){l=l.then(e[u++],e[u++])}return l}f=s.length;let d=t;u=0;while(u<f){const e=s[u++];const t=s[u++];try{d=e(d)}catch(e){t.call(this,e);break}}try{l=Xt.call(this,d)}catch(e){return Promise.reject(e)}u=0;f=a.length;while(u<f){l=l.then(a[u++],a[u++])}return l}getUri(e){e=xt(this.defaults,e);const t=vt(e.baseURL,e.url,e.allowAbsoluteUrls);return Ee(t,e.params,e.paramsSerializer)}}ue.forEach(["delete","get","head","options"],(function e(t){en.prototype[t]=function(e,n){return this.request(xt(n||{},{method:t,url:e,data:(n||{}).data}))}}));ue.forEach(["post","put","patch"],(function e(t){function n(e){return function n(o,r,i){return this.request(xt(i||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:o,data:r}))}}en.prototype[t]=n();en.prototype[t+"Form"]=n(true)}));var tn=en;class nn{constructor(e){if(typeof e!=="function"){throw new TypeError("executor must be a function.")}let t;this.promise=new Promise((function e(n){t=n}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;while(t-- >0){n._listeners[t](e)}n._listeners=null}));this.promise.then=e=>{let t;const o=new Promise((e=>{n.subscribe(e);t=e})).then(e);o.cancel=function e(){n.unsubscribe(t)};return o};e((function e(o,r,i){if(n.reason){return}n.reason=new ct(o,r,i);t(n.reason)}))}throwIfRequested(){if(this.reason){throw this.reason}}subscribe(e){if(this.reason){e(this.reason);return}if(this._listeners){this._listeners.push(e)}else{this._listeners=[e]}}unsubscribe(e){if(!this._listeners){return}const t=this._listeners.indexOf(e);if(t!==-1){this._listeners.splice(t,1)}}toAbortSignal(){const e=new AbortController;const t=t=>{e.abort(t)};this.subscribe(t);e.signal.unsubscribe=()=>this.unsubscribe(t);return e.signal}static source(){let e;const t=new nn((function t(n){e=n}));return{token:t,cancel:e}}}var on=nn;function rn(e){return function t(n){return e.apply(null,n)}}function sn(e){return ue.isObject(e)&&e.isAxiosError===true}const cn={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(cn).forEach((([e,t])=>{cn[t]=e}));var an=cn;function ln(t){const n=new tn(t);const o=e(tn.prototype.request,n);ue.extend(o,tn.prototype,n,{allOwnKeys:true});ue.extend(o,n,null,{allOwnKeys:true});o.create=function e(n){return ln(xt(t,n))};return o}const un=ln(Je);un.Axios=tn;un.CanceledError=ct;un.CancelToken=on;un.isCancel=st;un.VERSION=Wt;un.toFormData=ye;un.AxiosError=fe;un.Cancel=un.CanceledError;un.all=function e(t){return Promise.all(t)};un.spread=rn;un.isAxiosError=sn;un.mergeConfig=xt;un.AxiosHeaders=rt;un.formToJSON=e=>He(ue.isHTMLForm(e)?new FormData(e):e);un.getAdapter=Kt.getAdapter;un.HttpStatusCode=an;un.default=un;d=un;return d}var m=p();var b=l(m);const w=u.includes(window.location.origin)?"default:development.6348f953f52485d19daf03992f2123a36e9eae59c5ca7f8736dc2b67":"default:production.4808a77b2a149e1796391b480b4fb501d73aa1e11123f60e07809ced";const g=()=>b.get("https://unleash.verdocs.com/api/frontend",{headers:{Accept:"application/json",Authorization:w}}).then((e=>e.data)).catch((e=>{console.log("Unleash: Unable to fetch feature flags",e);throw e}));const v='@-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-contact-picker{display:block;border:1px solid #ebebeb;background-color:#ffffff;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-webkit-box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1);box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1)}verdocs-contact-picker form{gap:12px;width:300px;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background-color:#f5f5fa}verdocs-contact-picker form .row{gap:8px;display:-ms-flexbox;display:flex;position:relative;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center}verdocs-contact-picker form .row .option{gap:4px;display:-ms-flexbox;display:flex;padding:5px 8px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;text-wrap:nowrap}verdocs-contact-picker form .names-row{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .names-row>input{font-size:14px;width:88px}verdocs-contact-picker form .pin-code{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .pin-code>input{-ms-flex:0 0 197px;flex:0 0 197px;font-size:14px}verdocs-contact-picker form .address{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .address>input{-ms-flex:1;flex:1;font-size:14px}verdocs-contact-picker form .zip-code{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .zip-code>input{-ms-flex:1;flex:1;font-size:14px}verdocs-contact-picker form label{display:-ms-flexbox;display:flex;-ms-flex:0 0 80px;flex:0 0 80px;font-size:13px;font-weight:500;color:#5c6575}verdocs-contact-picker form .row.message textarea{width:100%;padding:5px 7px;border-radius:4px;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-contact-picker form input{-ms-flex:1;flex:1;padding:6px;font-size:14px;border-radius:3px;border:1px solid rgba(112, 122, 229, 0.3725490196)}verdocs-contact-picker form input:focus{outline:none}verdocs-contact-picker .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:6px;-moz-column-gap:6px;column-gap:6px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-contact-picker ::-webkit-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::-moz-placeholder{color:#aaaaaa}verdocs-contact-picker :-ms-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::-ms-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::placeholder{color:#aaaaaa}verdocs-contact-picker [data-lastpass-icon-root]{display:none !important}#verdocs-contact-picker-suggestions .dropdown{max-height:225px;overflow-y:scroll;background:#ffffff;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-webkit-box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1);box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1)}#verdocs-contact-picker-suggestions .dropdown .suggestion{display:-ms-flexbox;display:flex;padding:6px 12px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}#verdocs-contact-picker-suggestions .dropdown .suggestion svg{width:32px;height:32px}#verdocs-contact-picker-suggestions .dropdown .suggestion .avatar{width:32px;height:32px;-ms-flex:0 0 32px;flex:0 0 32px;margin-right:8px;border-radius:100%}#verdocs-contact-picker-suggestions .dropdown .suggestion .details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}#verdocs-contact-picker-suggestions .dropdown .suggestion .name{font-size:16px;font-weight:500;margin-bottom:3px;color:#092c4c}#verdocs-contact-picker-suggestions .dropdown .suggestion .destination{font-size:14px;margin-bottom:3px;color:#33364b}#verdocs-contact-picker-suggestions .dropdown .suggestion:hover{background:#eee;cursor:pointer}';const y=`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-book-user"><path d="M15 13a3 3 0 1 0-6 0"/><path d="M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20"/><circle cx="12" cy="8" r="2"/></svg>`;const x=class{constructor(n){e(this,n);this.searchContacts=t(this,"searchContacts");this.exit=t(this,"exit");this.next=t(this,"next");this.endpoint=r.getDefault();this.templateRole=null;this.contactSuggestions=[];this.showSuggestions=false;this.showMessage=false;this.delegator=false;this.auth_methods=[];this.passcode="";this.firstNameFieldId=`verdocs-contact-picker-firstname-${Math.random().toString(36).substring(2,11)}`;this.lastNameFieldId=`verdocs-contact-picker-lastname-${Math.random().toString(36).substring(2,11)}`;this.emailFieldId=`verdocs-contact-picker-email-${Math.random().toString(36).substring(2,11)}`;this.phoneFieldId=`verdocs-contact-picker-phone-${Math.random().toString(36).substring(2,11)}`;this.featureFlags=null;this.activeEntitlements={}}componentWillLoad(){this.endpoint.loadSession();if(this.templateRole){const e=i(this.templateRole);const t=e.split(" ");const n=this.templateRole.first_name||t.shift()||"";const o=this.templateRole.last_name||t.join(" ")||"";this.first_name=n;this.last_name=o;this.email=this.templateRole.email||"";this.phone=this.templateRole.phone||"";this.delegator=this.templateRole.delegator||false;this.message=this.templateRole.message||"";this.showMessage=this.message!=="";this.auth_methods=this.templateRole.auth_methods||[];this.passcode=this.templateRole.passcode||""}s(this.endpoint).then((e=>{this.activeEntitlements=e;console.log("[CONTACT PICKER] Loaded entitlements",e)})).catch((e=>console.log("[CONTACT PICKER] Error loading entitlements, some features may be disabled.",e)));g().then((e=>{this.featureFlags=e;console.log("[CONTACT PICKER] Loaded feature flags",e)})).catch((e=>{console.log("[CONTACT PICKER] Unable to fetch feature flags, some features may be disabled.",e)}))}handleFirstNameChange(e){var t;this.first_name=e.target.value;(t=this.searchContacts)===null||t===void 0?void 0:t.emit({query:this.first_name})}handleLastNameChange(e){var t;this.last_name=e.target.value;(t=this.searchContacts)===null||t===void 0?void 0:t.emit({query:this.last_name})}handleCancel(e){var t;e.stopPropagation();this.showSuggestions=false;(t=this.exit)===null||t===void 0?void 0:t.emit()}handleSubmit(e){var t;e.stopPropagation();this.showSuggestions=false;(t=this.next)===null||t===void 0?void 0:t.emit({first_name:this.first_name,last_name:this.last_name,email:this.email,phone:this.phone,message:this.message,delegator:this.delegator,auth_methods:this.auth_methods,passcode:this.passcode,address:this.address,zip:this.zip})}handleSelectSuggestion(e,t){e.stopPropagation();this.first_name=t.first_name;this.last_name=t.last_name;this.email=t.email;this.phone=t.phone;this.showSuggestions=false}render(){var e,t,r,s,a,l,u,d,h,p,m,b,w,g,v,x,k,R;const O=this.first_name&&this.last_name&&c(this.email);const E=!this.auth_methods.length||this.auth_methods.includes("passcode")&&!!this.passcode||this.auth_methods.includes("kba")&&!!this.first_name&&!!this.last_name||this.auth_methods.includes("email")&&!!this.email||this.auth_methods.includes("sms")&&!!this.phone;const S=O&&E;const T=((r=(t=(e=this.featureFlags)===null||e===void 0?void 0:e.toggles)===null||t===void 0?void 0:t.find((e=>e.name==="sms")))===null||r===void 0?void 0:r.enabled)===true;const A=[];if(((l=(a=(s=this.featureFlags)===null||s===void 0?void 0:s.toggles)===null||a===void 0?void 0:a.find((e=>e.name==="passcode-verification")))===null||l===void 0?void 0:l.enabled)===true){A.push({label:"Passcode",value:"passcode"})}if(((h=(d=(u=this.featureFlags)===null||u===void 0?void 0:u.toggles)===null||d===void 0?void 0:d.find((e=>e.name==="email-verification")))===null||h===void 0?void 0:h.enabled)===true){A.push({label:"Email",value:"email"})}if(T&&((b=(m=(p=this.featureFlags)===null||p===void 0?void 0:p.toggles)===null||m===void 0?void 0:m.find((e=>e.name==="sms-verification")))===null||b===void 0?void 0:b.enabled)===true&&!!this.activeEntitlements.sms_auth){A.push({label:"SMS (One-Time Code)",value:"sms"})}if(((v=(g=(w=this.featureFlags)===null||w===void 0?void 0:w.toggles)===null||g===void 0?void 0:g.find((e=>e.name==="kba-verification")))===null||v===void 0?void 0:v.enabled)===true&&!!this.activeEntitlements.kba_auth){A.push({label:"Knowledge-Based (KBA)",value:"kba"})}if(((R=(k=(x=this.featureFlags)===null||x===void 0?void 0:x.toggles)===null||k===void 0?void 0:k.find((e=>e.name==="id-verification")))===null||R===void 0?void 0:R.enabled)===true&&!!this.activeEntitlements.id_auth){A.push({label:"ID Check",value:"id"})}return n("form",{key:"5b4d4de3ad06d4cb458b92ca6159fadcbb38a89e",onSubmit:e=>e.preventDefault(),autocomplete:"off"},n("div",{key:"065bd43ea84a5431f4cb370491147377d0b4ed87",class:"row"},n("label",{key:"48e3ab3a13607b42018e400703910d08f053d7c0",htmlFor:this.firstNameFieldId},"Name:"),n("div",{key:"c1acb5b9cfd0cdbd17edce151e66035826ae3e15",class:"names-row"},n("input",{key:"bfd3f91624725b717df1b27d000924503e0cb0b8",id:this.firstNameFieldId,name:this.firstNameFieldId,type:"text","data-lpignore":"true",autocomplete:"blocked","aria-autocomplete":"none",value:this.first_name,placeholder:"First...",onFocus:()=>{setTimeout((()=>{var e;this.showSuggestions=((e=this.contactSuggestions)===null||e===void 0?void 0:e.length)>0}),100)},onInput:e=>this.handleFirstNameChange(e)}),n("input",{key:"30ae8e6b5c52c45bad07572a9357c575fd248df1",id:this.lastNameFieldId,name:this.lastNameFieldId,type:"text","data-lpignore":"true",autocomplete:"blocked","aria-autocomplete":"none",value:this.last_name,placeholder:"Last...",onFocus:()=>{setTimeout((()=>{var e;this.showSuggestions=((e=this.contactSuggestions)===null||e===void 0?void 0:e.length)>0}),100)},onInput:e=>this.handleLastNameChange(e)})),this.showSuggestions&&n("verdocs-portal",{key:"6a03422c1dbe45c1e8a389af0f884f2f4b525aca",anchor:this.firstNameFieldId,onClickAway:()=>{this.showSuggestions=false;document.querySelectorAll(`.verdocs-portal-wrapper`).forEach((e=>e.remove()))},id:"verdocs-contact-picker-suggestions"},n("div",{key:"a9907d3c7b291fde2e86a3a0dd2bfb0f2c1d06b3",class:"dropdown"},this.contactSuggestions.filter((e=>!this.first_name||e.first_name.toLowerCase().includes(this.first_name.toLowerCase()))).map((e=>{var t;return n("div",{key:(t=e.id)!==null&&t!==void 0?t:e.email,class:"suggestion",onClick:t=>this.handleSelectSuggestion(t,e)},e.picture?n("img",{alt:"Avatar",class:"avatar",src:e.picture}):n("div",{class:"avatar",innerHTML:y}),n("div",{class:"details"},n("div",{class:"name"},i(e)),e.email&&n("div",{class:"destination"},e.email),e.phone&&n("div",{class:"destination"},e.phone)))}))))),n("div",{key:"220b7dc0f04eb27279e003aaa196aee58b51ec64",class:"row"},n("label",{key:"7120d789f96a375a3f6237b93a3699866dae5e0e",htmlFor:this.emailFieldId},"Email:"),n("input",{key:"33aa0973927dedcc1d3005411dcdb87c969a65c2",id:this.emailFieldId,name:this.emailFieldId,type:"text","data-lpignore":"true",autoComplete:"blocked","aria-autocomplete":"none",value:this.email,placeholder:"Invite/verify via email...",onFocus:()=>this.showSuggestions=false,onInput:e=>this.email=e.target.value})),T&&n("div",{key:"8b888dd8490d99235bd1d1b2e6acce6d64fbf5a4",class:"row"},n("label",{key:"702e60156cfbe39cc56c20ca5f9e5b112eb8fbb5",htmlFor:this.phoneFieldId},"Phone:"),n("input",{key:"1f6b416d622b821e63e89bdf75626bc9f97422df",id:this.phoneFieldId,name:this.phoneFieldId,type:"text","data-lpignore":"true",autoComplete:"blocked","aria-autocomplete":"none",value:this.phone,placeholder:"Invite/verify via SMS...",onFocus:()=>this.showSuggestions=false,onInput:e=>{this.phone=f(e.target.value)}})),n(o,{key:"60d3ccc50417d1fbe6a815d6edf37619f945b63e"},A.length>0&&n("div",{key:"f1248b2c40c1cfb22cfa577bc1f5c5895362ded2",class:"row pin-code"},n("label",{key:"d782f794fa6a8d2ca18835db9e8d6e510038f212"},"Recipient Verification:"),n("div",{key:"36f6d36272f71f6f2169e5b4e6446c6e969e36af"},A.map(((e,t)=>n("div",{class:"option"},n("verdocs-checkbox",{size:"small",id:`verdocs-multi-select-opt-${t}`,value:e.value,checked:this.auth_methods.includes(e.value),onInput:t=>{if(t.target.checked){this.auth_methods=[...this.auth_methods,e.value]}else{this.auth_methods=this.auth_methods.filter((t=>t!==e.value))}}}),n("label",{htmlFor:`verdocs-multi-select-option-${t}`},e.label)))))),this.auth_methods.includes("passcode")&&n("div",{key:"bf631ef781e2bb9ad1bc35e56a51a66db24ebf33",class:"row pin-code"},n("label",{key:"6528152b13591a3843edc004fde4948e6c44d153",htmlFor:this.phoneFieldId},"Passcode:"),n("input",{key:"5aa95a7185e8a4ef5e3f071c6cac4d98e8d0d6ce",id:"verdocs-passcode",name:"verdocs-passcode",type:"text","data-lpignore":"true",autocomplete:"blocked","aria-autocomplete":"none",value:this.passcode,placeholder:"4-8 digits recommended...",onFocus:()=>this.showSuggestions=false,onInput:e=>this.passcode=e.target.value}))),n("div",{key:"b162036266114dbce2520a6c006804a5a4929531",class:"row message"},n("label",{key:"47d04957126e80fcb346c0359dc3bcf9d64c1749",htmlFor:"verdocs-contact-picker-message"},"Message:"),n("textarea",{key:"0d830b39376684620b43281cf014e2ba386b7bf0",id:"verdocs-contact-picker-message",name:"verdocs-contact-picker-message","data-lpignore":"true",autocomplete:"blocked",placeholder:"Optional message to include in invitation...",onFocus:()=>this.showSuggestions=false,onInput:e=>this.message=e.target.value},this.message)),n("div",{key:"65466e83bbc1f5045f8efa7c200cfd7dd9898d9f",class:"buttons"},n("div",{key:"07776d2f5ede2a0b6d0b786bcf6b8ed44811e248",class:"flex-fill"}),n("verdocs-button",{key:"2eb20966d5b97cc3fec25de0e0c47af802bca7dd",variant:"outline",label:"Cancel",size:"small",onClick:e=>this.handleCancel(e)}),n("verdocs-button",{key:"1329cd0da977ad1b00444cccf034b2cd3f6f634f",label:"OK",size:"small",disabled:!S,onClick:!S?()=>{}:e=>this.handleSubmit(e)})))}};x.style=v;export{x as verdocs_contact_picker};
|
3
|
-
//# sourceMappingURL=p-
|
3
|
+
//# sourceMappingURL=p-13c9ac73.entry.js.map
|