@verdocs/web-sdk 6.9.2 → 6.9.6
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/{index-CeUF44L9.js → index-DZBJS0kx.js} +441 -263
- package/dist/cjs/index-DZBJS0kx.js.map +1 -0
- package/dist/cjs/{utils-DsDnct9q.js → utils-Cws_jB5L.js} +3 -3
- package/dist/cjs/{utils-DsDnct9q.js.map → utils-Cws_jB5L.js.map} +1 -1
- package/dist/cjs/verdocs-contact-picker.cjs.entry.js +1659 -1199
- package/dist/cjs/verdocs-contact-picker.entry.cjs.js.map +1 -1
- package/dist/cjs/verdocs-download-dialog_4.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-field-attachment_11.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-organization-card_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-pagination_2.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-preview_6.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-sign.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-signing-progress.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-templates-list.cjs.entry.js +1 -1
- package/dist/collection/components/controls/verdocs-organization-card/verdocs-organization-card.js +1 -1
- package/dist/components/{p-DPfgYCMd.js → p-BUM3HlaD.js} +3 -3
- package/dist/components/{p-DPfgYCMd.js.map → p-BUM3HlaD.js.map} +1 -1
- package/dist/components/{p-CaoZmlp7.js → p-BZT9jy-7.js} +4 -4
- package/dist/components/{p-CaoZmlp7.js.map → p-BZT9jy-7.js.map} +1 -1
- package/dist/components/{p-B1XBGdC7.js → p-BpbLz33N.js} +5 -5
- package/dist/components/{p-B1XBGdC7.js.map → p-BpbLz33N.js.map} +1 -1
- package/dist/components/{p-BCwx8bsK.js → p-BszQpvWk.js} +3 -3
- package/dist/components/{p-BCwx8bsK.js.map → p-BszQpvWk.js.map} +1 -1
- package/dist/components/{p-DqlhK3CE.js → p-CDSREIen.js} +5 -5
- package/dist/components/{p-DqlhK3CE.js.map → p-CDSREIen.js.map} +1 -1
- package/dist/components/{p-6fSdgmoO.js → p-CIJlsf-4.js} +441 -263
- package/dist/components/p-CIJlsf-4.js.map +1 -0
- package/dist/components/{p-D1TqIILD.js → p-CLFt5iKT.js} +3 -3
- package/dist/components/{p-D1TqIILD.js.map → p-CLFt5iKT.js.map} +1 -1
- package/dist/components/{p-uNqpODUQ.js → p-CfktXSy-.js} +3 -3
- package/dist/components/{p-uNqpODUQ.js.map → p-CfktXSy-.js.map} +1 -1
- package/dist/components/{p-CndV_5Je.js → p-CqJhwGiq.js} +3 -3
- package/dist/components/{p-CndV_5Je.js.map → p-CqJhwGiq.js.map} +1 -1
- package/dist/components/{p-B6tZPSE-.js → p-NpSE9E9W.js} +3 -3
- package/dist/components/{p-B6tZPSE-.js.map → p-NpSE9E9W.js.map} +1 -1
- package/dist/components/{p-EQhWyfg9.js → p-Q1QCVjxH.js} +1660 -1200
- package/dist/components/p-Q1QCVjxH.js.map +1 -0
- 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-envelope-sidebar.js +1 -1
- package/dist/components/verdocs-envelopes-list.js +2 -2
- package/dist/components/verdocs-field-date.js +1 -1
- package/dist/components/verdocs-organization-card.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-signing-progress.js +1 -1
- 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 +2 -2
- package/dist/components/verdocs-view.js +1 -1
- package/dist/esm/{index-dzBXqXlK.js → index-BAIpxOBc.js} +441 -263
- package/dist/esm/index-BAIpxOBc.js.map +1 -0
- package/dist/esm/{utils-Bty_rQI7.js → utils-BARodnJ-.js} +3 -3
- package/dist/esm/{utils-Bty_rQI7.js.map → utils-BARodnJ-.js.map} +1 -1
- package/dist/esm/verdocs-contact-picker.entry.js +1659 -1199
- package/dist/esm/verdocs-contact-picker.entry.js.map +1 -1
- package/dist/esm/verdocs-download-dialog_4.entry.js +2 -2
- package/dist/esm/verdocs-envelope-sidebar.entry.js +1 -1
- package/dist/esm/verdocs-envelopes-list.entry.js +2 -2
- package/dist/esm/verdocs-field-attachment_11.entry.js +1 -1
- package/dist/esm/verdocs-organization-card_2.entry.js +1 -1
- package/dist/esm/verdocs-pagination_2.entry.js +2 -2
- package/dist/esm/verdocs-preview_6.entry.js +2 -2
- package/dist/esm/verdocs-sign.entry.js +2 -2
- package/dist/esm/verdocs-signing-progress.entry.js +2 -2
- package/dist/esm/verdocs-template-document-page_2.entry.js +2 -2
- package/dist/esm/verdocs-templates-list.entry.js +1 -1
- package/dist/esm-es5/{index-dzBXqXlK.js → index-BAIpxOBc.js} +1 -1
- package/dist/esm-es5/index-BAIpxOBc.js.map +1 -0
- package/dist/esm-es5/{utils-Bty_rQI7.js → utils-BARodnJ-.js} +2 -2
- package/dist/esm-es5/{utils-Bty_rQI7.js.map → utils-BARodnJ-.js.map} +1 -1
- package/dist/esm-es5/verdocs-contact-picker.entry.js +2 -2
- package/dist/esm-es5/verdocs-contact-picker.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-download-dialog_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-attachment_11.entry.js +1 -1
- package/dist/esm-es5/verdocs-organization-card_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-pagination_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-preview_6.entry.js +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js +1 -1
- package/dist/esm-es5/verdocs-signing-progress.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-templates-list.entry.js +1 -1
- package/dist/verdocs-web-sdk/p-0123c74b.entry.js +2 -0
- package/dist/verdocs-web-sdk/{p-b99e606b.entry.js.map → p-0123c74b.entry.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-7fa0abc5.system.entry.js → p-0e84941e.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-30ce93f4.entry.js → p-1293f519.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-f79ebbc1.entry.js → p-1abc6703.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-8b80fe24.system.entry.js → p-1dc9071b.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-f02af327.entry.js → p-39aeb4d9.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-3202f0eb.entry.js → p-3d06e25a.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-6dd3761c.system.entry.js → p-49da9aa5.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-609d7eea.entry.js → p-635ab903.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-Fo42OGz9.system.js.map → p-646DanNR.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-90005b19.entry.js → p-6cd3bf28.entry.js} +3 -3
- package/dist/verdocs-web-sdk/{p-2ebc769e.entry.js → p-6d7ef1ae.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-e97ce39e.system.entry.js → p-736d9d6f.system.entry.js} +3 -3
- package/dist/verdocs-web-sdk/{p-0e938b08.system.entry.js → p-73b7432b.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-89bc0b8f.entry.js +3 -0
- package/dist/verdocs-web-sdk/p-89bc0b8f.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-83f10fb7.system.entry.js → p-9643d5ea.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-0f6aa428.system.entry.js → p-9730baa6.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-CyHGFYot.system.js.map → p-B2zrDH6t.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/p-B8zpaHu-.system.js +1 -1
- package/dist/verdocs-web-sdk/{p-dzBXqXlK.js → p-BAIpxOBc.js} +1 -1
- package/dist/verdocs-web-sdk/p-BAIpxOBc.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-BkSli2zt.system.js.map → p-BI6jATLL.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-NAwq_U8G.js → p-BdWA0nYY.js} +2 -2
- package/dist/verdocs-web-sdk/{p-NAwq_U8G.js.map → p-BdWA0nYY.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-DmF0GSqu.system.js → p-C57tUJVh.system.js} +1 -1
- package/dist/verdocs-web-sdk/p-C57tUJVh.system.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-BUFQbxzf.system.js.map → p-CMWEpsaN.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-Cu7Ldm4g.system.js.map → p-DGlgalVg.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-HR08HTpW.system.js.map → p-DQVp8f1P.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-CLSDwNJu.system.js.map → p-DZUqTE-c.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-CnF3etgg.system.js → p-DuZ2r_0x.system.js} +2 -2
- package/dist/verdocs-web-sdk/{p-CnF3etgg.system.js.map → p-DuZ2r_0x.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-CkFoHSeo.system.js.map → p-DwliOfPT.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/p-MnLRiB06.system.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-ffbf5761.system.entry.js → p-a81d0cab.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-76770d9c.entry.js → p-a8280659.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-53530f64.system.entry.js → p-a9b91350.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-6d41df5d.system.entry.js → p-b285f874.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-babc150d.system.entry.js +4 -0
- package/dist/verdocs-web-sdk/p-babc150d.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-COoeV-vc.system.js.map → p-bi37w16M.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-843c96c6.entry.js → p-c5e04f7b.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-64a68e39.entry.js → p-c9ba1a90.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-e33fd901.system.entry.js → p-f1741f0f.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-yUsULl32.system.js.map → p-ox265pyo.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-CotMN3Ey.system.js.map → p-rab0065u.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/verdocs-contact-picker.entry.esm.js.map +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +4 -4
- package/dist/cjs/index-CeUF44L9.js.map +0 -1
- package/dist/components/p-6fSdgmoO.js.map +0 -1
- package/dist/components/p-EQhWyfg9.js.map +0 -1
- package/dist/esm/index-dzBXqXlK.js.map +0 -1
- package/dist/esm-es5/index-dzBXqXlK.js.map +0 -1
- package/dist/verdocs-web-sdk/p-4a24c445.system.entry.js +0 -4
- package/dist/verdocs-web-sdk/p-4a24c445.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-5b00dbf2.entry.js +0 -3
- package/dist/verdocs-web-sdk/p-5b00dbf2.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-Bg14ZSNR.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-DmF0GSqu.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-b99e606b.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-dzBXqXlK.js.map +0 -1
- /package/dist/verdocs-web-sdk/{p-7fa0abc5.system.entry.js.map → p-0e84941e.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-30ce93f4.entry.js.map → p-1293f519.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-f79ebbc1.entry.js.map → p-1abc6703.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-8b80fe24.system.entry.js.map → p-1dc9071b.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-f02af327.entry.js.map → p-39aeb4d9.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-3202f0eb.entry.js.map → p-3d06e25a.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-6dd3761c.system.entry.js.map → p-49da9aa5.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-609d7eea.entry.js.map → p-635ab903.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-90005b19.entry.js.map → p-6cd3bf28.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-2ebc769e.entry.js.map → p-6d7ef1ae.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-e97ce39e.system.entry.js.map → p-736d9d6f.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-0e938b08.system.entry.js.map → p-73b7432b.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-83f10fb7.system.entry.js.map → p-9643d5ea.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-0f6aa428.system.entry.js.map → p-9730baa6.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-ffbf5761.system.entry.js.map → p-a81d0cab.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-76770d9c.entry.js.map → p-a8280659.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-53530f64.system.entry.js.map → p-a9b91350.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-6d41df5d.system.entry.js.map → p-b285f874.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-843c96c6.entry.js.map → p-c5e04f7b.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-64a68e39.entry.js.map → p-c9ba1a90.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-e33fd901.system.entry.js.map → p-f1741f0f.system.entry.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n["throw"](e))}catch(e){s(e)}}function l(e){e.done?i(e.value):o(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,o,s,r=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return r.next=a(0),r["throw"]=a(1),r["return"]=a(2),typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(e){return function(t){return l([e,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r&&(r=0,a[0]&&(i=0)),i)try{if(n=1,o&&(s=a[0]&2?o["return"]:a[0]?o["throw"]||((s=o["return"])&&s.call(o),0):o.next)&&!(s=s.call(o,a[1])).done)return s;if(o=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;o=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(s=i.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){i.label=a[1];break}if(a[0]===6&&i.label<s[1]){i.label=s[1];s=a;break}if(s&&i.label<s[2]){i.label=s[2];i.ops.push(a);break}if(s[2])i.ops.pop();i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e];o=0}finally{n=s=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,o=t.length,s;n<o;n++){if(s||!(n in t)){if(!s)s=Array.prototype.slice.call(t,0,n);s[n]=t[n]}}return e.concat(s||Array.prototype.slice.call(t))};System.register(["./p-BO6MZhlp.system.js","@verdocs/js-sdk","./p-CnF3etgg.system.js","./p-GqS1qR-V.system.js","./p-Dj475wLP.system.js","./p-7Iu0_GGa.system.js","./p-fEbwslLK.system.js","./p-DmF0GSqu.system.js","./p-C2OP3llY.system.js"],(function(e){"use strict";var t,i,n,o,s,r,a,l,c,d,u,h,f,v,p,g,m,x,b,w,y,k,C,S,_,N,I,z,G,L,H,T,E,M,q,V,j,D,A;return{setters:[function(e){t=e.r;i=e.c;n=e.h;o=e.H;s=e.F;r=e.g},function(e){a=e.VerdocsEndpoint;l=e.DEFAULT_DISCLOSURES;c=e.startSigningSession;d=e.envelopeRecipientAgree;u=e.getEnvelope;h=e.updateEnvelopeField;f=e.createSignature;v=e.createInitials;p=e.sortFields;g=e.envelopeRecipientSubmit;m=e.isFieldValid;x=e.isFieldFilled;b=e.uploadEnvelopeFieldAttachment;w=e.deleteEnvelopeFieldAttachment;y=e.formatFullName;k=e.fullNameToInitials;C=e.verifySigner;S=e.delegateRecipient;_=e.envelopeRecipientDecline;N=e.integerSequence;I=e.askQuestion;z=e.getEnvelopeDocumentDownloadLink;G=e.getEnvelopesZip},function(e){L=e.u;H=e.g;T=e.r;E=e.a;M=e.d},function(e){q=e.D;V=e.C},function(e){j=e.V},function(e){D=e.S},function(e){A=e.S},null,null],execute:function(){var P='verdocs-sign{display:-ms-flexbox;display:flex;overflow:hidden;min-height:700px;position:relative;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:#f5f5f5;font-family:var(--verdocs-primary-font, "Inter", "Barlow", 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;padding-right:140px;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>.document .document-separator{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:10px;padding:12px 20px;width:100%;max-width:1028px;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:#33364b;color:white;border-radius:6px;font-size:16px;font-weight:500;margin-top:20px;-webkit-box-shadow:0 2px 4px rgba(0, 0, 0, 0.1);box-shadow:0 2px 4px rgba(0, 0, 0, 0.1)}verdocs-sign>.document .document-separator svg{-ms-flex-negative:0;flex-shrink:0}verdocs-sign>.document .document-separator:first-child{margin-top:0}verdocs-sign .signed-document-container{width:64%;margin-left:260px;-webkit-transition:all 0.3s ease;transition:all 0.3s ease}verdocs-sign .signed-document-container.zoom-normal{width:64%;margin-left:260px}verdocs-sign .signed-document-container.zoom-zoom1{width:80%;margin-left:200px}verdocs-sign .signed-document-container.zoom-zoom2{width:100%;margin-left:150px}verdocs-sign .signed-document-container.zoom-zoom2 .verdocs-flag-instance{opacity:0;pointer-events:none}@media (max-width: 768px){verdocs-sign verdocs-sign-footer{padding:0 10px}verdocs-sign verdocs-sign-footer .buttons{gap:8px}verdocs-sign verdocs-sign-footer .buttons button{font-size:10px}verdocs-sign .signed-document-container{width:100%;margin-left:0}verdocs-sign .signed-document-container.zoom-normal,verdocs-sign .signed-document-container.zoom-zoom1,verdocs-sign .signed-document-container.zoom-zoom2{width:100%;margin-left:0}verdocs-sign>.document{padding-right:15px}verdocs-sign .verdocs-flag-instance{display:none !important}verdocs-sign .controls-toolbar .center-controls{display:none}verdocs-sign .controls-toolbar .right-controls .mobile-next-button{display:block;margin-right:10px}verdocs-sign .controls-toolbar .right-controls .minus,verdocs-sign .controls-toolbar .right-controls .plus{display:none}}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 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,.controls-toolbar,.verdocs-flag-instance,verdocs-signing-progress{display:none !important}verdocs-sign{min-height:auto;background-color:white}verdocs-sign>.document{overflow:visible;height:auto;display:block;padding:0;margin:0}verdocs-sign>.document .document-separator{display:none}verdocs-sign .signed-document-container{width:100%;margin:0}}#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;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px}#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}#verdocs-sign-header .remaining-count{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;gap:8px;color:#ffffff;font-size:13px;font-weight:400;white-space:nowrap}#verdocs-sign-header .remaining-count .check-icon{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center}#verdocs-sign-header .remaining-count .check-icon svg{width:16px;height:16px;fill:#55bc81}#verdocs-sign-header .remaining-count .separator{opacity:0.5;margin:0 2px}#verdocs-sign-header .remaining-count .review-optional{cursor:pointer;text-decoration:underline}#verdocs-sign-header .remaining-count .review-optional:hover{color:#54d68c}#verdocs-sign-header .icon-button{width:20px;height:32px;display:-ms-flexbox;display:flex;cursor:pointer;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border-radius:4px;-webkit-transition:background-color 0.2s;transition:background-color 0.2s}#verdocs-sign-header .icon-button svg path{fill:#ffffff}#verdocs-sign-header .icon-button:hover{background-color:rgba(255, 255, 255, 0.1)}#verdocs-sign-header .icon-button.disabled{opacity:0.35;pointer-events:none}#verdocs-sign-header .icon-button+.icon-button{margin-left:-6px}.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}.controls-toolbar{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;height:54px;padding:0 12px 0 24px;background-color:#ffffff;border-bottom:1px solid #e0e0e0;-webkit-box-shadow:none;box-shadow:none;font-family:"Inter", sans-serif;color:#424242;z-index:1000}.controls-toolbar .left-controls{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.controls-toolbar .left-controls .title{font-weight:500;font-size:16px;color:#242424;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.controls-toolbar .center-controls{-ms-flex:1;flex:1;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;gap:10px;font-size:14px;display:none}.controls-toolbar .center-controls .label{color:#000000;font-weight:300}.controls-toolbar .center-controls .select-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.controls-toolbar .center-controls .select-wrapper verdocs-select-input{margin:0}.controls-toolbar .center-controls .select-wrapper verdocs-select-input .input-label{display:none}.controls-toolbar .center-controls .select-wrapper verdocs-select-input .input-element{background:transparent;border:1px solid #e0e0e0;height:32px;padding:2px 8px;min-width:60px;text-align:center;font-family:inherit;color:#424242}.controls-toolbar .center-controls .select-wrapper verdocs-select-input .input-element:focus{border-color:var(--verdocs-primary-color, #55bc81)}.controls-toolbar .center-controls .count{color:#000000;font-weight:300}.controls-toolbar .right-controls{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}.controls-toolbar .right-controls .mobile-next-button{display:none}.controls-toolbar .right-controls .icon-button{width:32px;height:32px;display:-ms-flexbox;display:flex;color:#424242;cursor:pointer;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-transition:background-color 0.2s;transition:background-color 0.2s}.controls-toolbar .right-controls .icon-button:hover{background-color:#f5f5f5}.controls-toolbar .right-controls .icon-button.disabled{opacity:0.3;pointer-events:none}.controls-toolbar .right-controls .icon-button svg{display:block;width:20px;height:20px}';var U='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11 8C11.2761 8 11.5 8.22386 11.5 8.5C11.5 8.77614 11.2761 9 11 9H6C5.72386 9 5.5 8.77614 5.5 8.5C5.5 8.22386 5.72386 8 6 8H11ZM14 8.5C14 5.46243 11.5376 3 8.5 3C5.46243 3 3 5.46243 3 8.5C3 11.5376 5.46243 14 8.5 14C9.83879 14 11.0659 13.5217 12.0196 12.7266L16.1464 16.8536L16.2157 16.9114C16.4106 17.0464 16.68 17.0271 16.8536 16.8536C17.0488 16.6583 17.0488 16.3417 16.8536 16.1464L12.7266 12.0196C13.5217 11.0659 14 9.83879 14 8.5ZM4 8.5C4 6.01472 6.01472 4 8.5 4C10.9853 4 13 6.01472 13 8.5C13 10.9853 10.9853 13 8.5 13C6.01472 13 4 10.9853 4 8.5Z" fill="#424242" /></svg>';var O='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11.5 8.5C11.5 8.22386 11.2761 8 11 8H9V6C9 5.72386 8.77614 5.5 8.5 5.5C8.22386 5.5 8 5.72386 8 6V8H6C5.72386 8 5.5 8.22386 5.5 8.5C5.5 8.77614 5.72386 9 6 9H8V11C8 11.2761 8.22386 11.5 8.5 11.5C8.77614 11.5 9 11.2761 9 11V9H11C11.2761 9 11.5 8.77614 11.5 8.5ZM8.5 3C11.5376 3 14 5.46243 14 8.5C14 9.83879 13.5217 11.0659 12.7266 12.0196L16.8536 16.1464C17.0488 16.3417 17.0488 16.6583 16.8536 16.8536C16.68 17.0271 16.4106 17.0464 16.2157 16.9114L16.1464 16.8536L12.0196 12.7266C11.0659 13.5217 9.83879 14 8.5 14C5.46243 14 3 11.5376 3 8.5C3 5.46243 5.46243 3 8.5 3ZM8.5 4C6.01472 4 4 6.01472 4 8.5C4 10.9853 6.01472 13 8.5 13C10.9853 13 13 10.9853 13 8.5C13 6.01472 10.9853 4 8.5 4Z" fill="#424242" /></svg>';var R='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M15.5 16.9988C15.7761 16.9988 16 17.2226 16 17.4988C16 17.7442 15.8231 17.9484 15.5899 17.9907L15.5 17.9988H4.5C4.22386 17.9988 4 17.7749 4 17.4988C4 17.2533 4.17688 17.0492 4.41012 17.0068L4.5 16.9988H15.5ZM10.0001 2.00098C10.2456 2.00098 10.4497 2.17798 10.492 2.41124L10.5 2.50112L10.496 14.295L14.1414 10.6466C14.3148 10.4729 14.5842 10.4534 14.7792 10.5882L14.8485 10.646C15.0222 10.8194 15.0418 11.0888 14.907 11.2838L14.8492 11.3531L10.3574 15.8531C10.285 15.9257 10.1957 15.9714 10.1021 15.9901L9.99608 15.9999C9.83511 15.9999 9.69192 15.9237 9.60051 15.8056L5.14386 11.3537C4.94846 11.1586 4.94823 10.842 5.14336 10.6466C5.3168 10.4729 5.58621 10.4534 5.78117 10.5883L5.85046 10.6461L9.496 14.287L9.5 2.50083C9.50008 2.22469 9.724 2.00098 10.0001 2.00098Z" fill="#424242"/></svg>';var Z='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M5 4.5C5 3.67157 5.67157 3 6.5 3H13.5C14.3284 3 15 3.67157 15 4.5V5H15.5C16.8807 5 18 6.11929 18 7.5V12.5C18 13.3284 17.3284 14 16.5 14H15V15.5C15 16.3284 14.3284 17 13.5 17H6.5C5.67157 17 5 16.3284 5 15.5V14H3.5C2.67157 14 2 13.3284 2 12.5V7.5C2 6.11929 3.11929 5 4.5 5H5V4.5ZM6 5H14V4.5C14 4.22386 13.7761 4 13.5 4H6.5C6.22386 4 6 4.22386 6 4.5V5ZM5 13V11.5C5 10.6716 5.67157 10 6.5 10H13.5C14.3284 10 15 10.6716 15 11.5V13H16.5C16.7761 13 17 12.7761 17 12.5V7.5C17 6.67157 16.3284 6 15.5 6H4.5C3.67157 6 3 6.67157 3 7.5V12.5C3 12.7761 3.22386 13 3.5 13H5ZM6.5 11C6.22386 11 6 11.2239 6 11.5V15.5C6 15.7761 6.22386 16 6.5 16H13.5C13.7761 16 14 15.7761 14 15.5V11.5C14 11.2239 13.7761 11 13.5 11H6.5Z" fill="#424242"/></svg>';var Y=e("verdocs_sign",function(){function e(e){t(this,e);this.sdkError=i(this,"sdkError");this.envelopeLoaded=i(this,"envelopeLoaded");this.envelopeUpdated=i(this,"envelopeUpdated");this.endpoint=new a({sessionType:"signing"});this.envelopeId=null;this.roleId=null;this.inviteCode=null;this.headerTargetId=null;this.toolbarStyle="menu";this.recipient=null;this.hasSignature=false;this.nextButtonLabel="Start";this.nextSubmits=false;this.fatalErrorHeader="";this.fatalErrorMessage="";this.focusedField="";this.disclosures=l;this.fieldUpdateCounter=0;this.submitting=false;this.submitted=false;this.isDone=false;this.showDone=false;this.adoptingSignature=false;this.showLoadError=false;this.finishLater=false;this.showFinishLater=false;this.agreed=false;this.signatureId=null;this.initialId=null;this.documentsSingularPlural="document";this.authStep=null;this.authMethodStates={};this.pageNumber=1;this.kbaQuestions=null;this.showSpinner=false;this.declining=false;this.delegating=false;this.delegated=false;this.kbaChoices=[];this.showDownloadDialog=false;this.loading=true;this.envelope=null;this.zoomLevel="normal";this.signingProgressMode="start";this.polling=true;this.renderedPages={};this.pollingInterval=null}e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,n,o,s,r,a;var l=this;return __generator(this,(function(d){switch(d.label){case 0:this.updateZoomFromWindow();window.addEventListener("resize",(function(){return l.updateZoomFromWindow()}));if(!this.envelopeId){(e=this.sdkError)===null||e===void 0?void 0:e.emit(new D("[SIGN] Missing required envelopId",500,""));return[2]}if(!this.roleId){(t=this.sdkError)===null||t===void 0?void 0:t.emit(new D("[SIGN] Missing required roleId",500,""));return[2]}if(!this.inviteCode){(i=this.sdkError)===null||i===void 0?void 0:i.emit(new D("[SIGN] Missing required inviteCode",500,""));return[2]}d.label=1;case 1:d.trys.push([1,3,,4]);console.log("[SIGN] Processing invite code for ".concat(this.envelopeId," / ").concat(this.roleId));return[4,c(this.endpoint,this.envelopeId,this.roleId,this.inviteCode)];case 2:r=d.sent();this.processAuthResponse(r);return[3,4];case 3:a=d.sent();console.log("[SIGN] Error with signing session",a);(n=this.sdkError)===null||n===void 0?void 0:n.emit(new D(a.message,(o=a.response)===null||o===void 0?void 0:o.status,(s=a.response)===null||s===void 0?void 0:s.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)}this.setupIntersectionObserver()};e.prototype.disconnectedCallback=function(){var e=this;var t,i;this.stopPolling();(t=this.observer)===null||t===void 0?void 0:t.disconnect();window.removeEventListener("resize",(function(){return e.updateZoomFromWindow()}));(i=document.getElementById(this.getOrgStyleOverridesId()))===null||i===void 0?void 0:i.remove()};e.prototype.updateZoomFromWindow=function(){var e=window.innerWidth;if(e<768){if(this.zoomLevel!=="zoom2")this.zoomLevel="zoom2"}else if(e<1024){if(this.zoomLevel!=="zoom1")this.zoomLevel="zoom1"}else{if(this.zoomLevel!=="normal")this.zoomLevel="normal"}};e.prototype.setupIntersectionObserver=function(){var e=this;var t=this.el.querySelectorAll("verdocs-envelope-document-page");if(t.length===0)return;if(this.observer){this.observer.disconnect()}var i=this.el.querySelector(".signed-document-container");var n={root:i,rootMargin:"-40% 0px -40% 0px",threshold:0};this.observer=new IntersectionObserver((function(t){t.forEach((function(t){if(t.isIntersecting){var i=t.target.id;var n=parseInt(i.replace("page-",""),10);if(!isNaN(n)&&e.pageNumber!==n){e.pageNumber=n}}}))}),n);t.forEach((function(t){return e.observer.observe(t)}))};e.prototype.getOrgStyleOverridesId=function(){return"verdocs-org-style-overrides-".concat(this.envelopeId)};e.prototype.applyOrgStyleOverrides=function(){var e,t;var i=this.getOrgStyleOverridesId();var n=document.getElementById(i);var o=(t=(e=this.envelope)===null||e===void 0?void 0:e.organization)===null||t===void 0?void 0:t.style_overrides;if(typeof o==="string"){var s=n||document.createElement("style");s.id=i;s.textContent=o;if(!n){document.head.appendChild(s)}}else if(n){n.remove()}};e.prototype.processAuthResponse=function(e){var t,i,n,o;var s=e.envelope,r=e.recipient;(t=s.documents)===null||t===void 0?void 0:t.sort((function(e,t){return e.order!==t.order?e.order-t.order:e.created_at.localeCompare(t.created_at)}));var a=r.auth_step;this.recipient=r;this.envelope=s;this.disclosures=((n=(i=this.envelope)===null||i===void 0?void 0:i.organization)===null||n===void 0?void 0:n.disclaimer)||l;this.applyOrgStyleOverrides();this.authStep=a;this.delegated=!!r.delegated_to;this.agreed=r.agreed;this.signatureId=null;this.initialId=null;this.submitted=r.status==="submitted";this.loading=false;this.isDone=this.submitted;this.showDone=this.submitted;A.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 request. The sender has been notified."}else if(this.agreed){this.nextButtonLabel="Next"}this.checkRecipientFields();(o=this.envelopeLoaded)===null||o===void 0?void 0:o.emit({endpoint:this.endpoint,envelope:this.envelope})};e.prototype.handleClickAgree=function(){var e=this;this.submitting=true;console.log("[SIGN] Accepting disclosures",this.disclosures);d(this.endpoint,this.envelopeId,this.roleId,this.disclosures).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,o;console.log("[SIGN] Unable to accept disclosures",t);j("Unable to accept disclosures, please try again later",{style:"error"});(i=e.sdkError)===null||i===void 0?void 0:i.emit(new D(t.message,(n=t.response)===null||n===void 0?void 0:n.status,(o=t.response)===null||o===void 0?void 0:o.data));e.submitting=false}))};e.prototype.handlePageSelect=function(e){var t=parseInt(e.target.value);if(!isNaN(t)){this.pageNumber=t;var i=this.el.querySelector(".signed-document-container");var n=this.el.querySelector("#page-".concat(t));if(i&&n){var o=n.offsetTop-20;i.scrollTo({top:o,behavior:"smooth"})}}};e.prototype.handleOptionSelected=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i;return __generator(this,(function(n){switch(e.detail.id){case"later":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"});break;case"delegate":this.delegating=true;break;case"decline":this.declining=true;break;case"print":window.print();(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});break;case"download":this.showDownloadDialog=true;this.startPolling();break}return[2]}))}))};e.prototype.startPolling=function(){var e=this;this.stopPolling();var t=function(){var t,i,n,o,s,r;var a=((t=e.envelope)===null||t===void 0?void 0:t.status)==="complete"||!!((i=e.envelope)===null||i===void 0?void 0:i.signed);var l=(o=(n=e.envelope)===null||n===void 0?void 0:n.documents)===null||o===void 0?void 0:o.some((function(e){return e.type==="certificate"}));var c=(r=(s=e.envelope)===null||s===void 0?void 0:s.recipients)===null||r===void 0?void 0:r.every((function(e){return e.status==="submitted"}));if(a&&l)return false;if(!c)return false;return true};if(!t()){return}this.polling=true;this.pollingInterval=setInterval((function(){return __awaiter(e,void 0,void 0,(function(){var e,i;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);return[4,u(this.endpoint,this.envelopeId)];case 1:e=n.sent();this.envelope=e;A.updateEnvelope(this.envelopeId,e);this.checkRecipientFields();if(!t()){this.stopPolling()}return[3,3];case 2:i=n.sent();console.error("[SIGN] Polling error",i);this.stopPolling();return[3,3];case 3:return[2]}}))}))}),5e3)};e.prototype.stopPolling=function(){if(this.pollingInterval){clearInterval(this.pollingInterval);this.pollingInterval=null}this.polling=false};e.prototype.handleZoomIn=function(){if(this.zoomLevel==="normal"){this.zoomLevel="zoom1"}else if(this.zoomLevel==="zoom1"){this.zoomLevel="zoom2"}};e.prototype.handleZoomOut=function(){if(this.zoomLevel==="zoom1"){this.zoomLevel="normal"}else if(this.zoomLevel==="zoom2"){this.zoomLevel="zoom1"}};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;L(n);i.fieldUpdateCounter++;i.markEnvelopeStarted();i.checkRecipientFields()}}))};e.prototype.getStartedKey=function(){var e;return"".concat(this.envelopeId,":").concat(((e=this.recipient)===null||e===void 0?void 0:e.role_name)||"")};e.prototype.markEnvelopeStarted=function(){var e=JSON.parse(localStorage.getItem("startedEnvelopes")||"[]");var t=this.getStartedKey();if(!e.includes(t)){e.push(t);while(e.length>10){e.shift()}localStorage.setItem("startedEnvelopes",JSON.stringify(e))}};e.prototype.saveFieldChange=function(e,t,i){var n=this;var o=this.getRecipientFields().find((function(t){return t.name===e}));if(o===null||o===void 0?void 0:o.readonly){return}console.log("[SIGN] saveFieldChange",e,{value:t,prepared:i});h(this.endpoint,this.envelopeId,this.roleId,e,t,i).then((function(t){return n.updateRecipientFieldValue(e,t)})).catch((function(e){var t,i,o,s,r,a;if(((t=e.response)===null||t===void 0?void 0:t.status)===401&&((o=(i=e.response)===null||i===void 0?void 0:i.data)===null||o===void 0?void 0:o.error)==="jwt expired"){console.log("[SIGN] Signing session expired");n.fatalErrorHeader="Signing Session Expired";n.fatalErrorMessage="Please reload your browser to continue."}else{console.log("[SIGN] Server error",e);j("Unable to save change, please try again later",{style:"error"})}(s=n.sdkError)===null||s===void 0?void 0:s.emit(new D(e.message,(r=e.response)===null||r===void 0?void 0:r.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,o,s,r,r,r,a,r,r,r,l,c;var d=this;return __generator(this,(function(u){switch(u.label){case 0:if(!t.target){return[2]}i=t.target,n=i.value,o=i.checked;s=e.type;switch(s){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,14];case"date":return[3,23];case"timestamp":return[3,24]}return[3,25];case 1:return[2,this.saveFieldChange(e.name,n,false)];case 2:{return[2,this.saveFieldChange(e.name,String(t.target.checked),false)]}u.label=3;case 3:{return[2,this.saveFieldChange(e.name,String(t.target.checked),false)]}u.label=4;case 4:console.log("Saving dropdown",e.name,t.detail);return[2,this.saveFieldChange(e.name,t.detail,false)];case 5:if(t.detail===undefined){return[2]}if(!(t.detail===null))return[3,7];console.log("[SIGN] Clearing initial");return[4,h(this.endpoint,this.envelopeId,this.roleId,e.name,null,false)];case 6:r=u.sent();return[2,this.updateRecipientFieldValue(e.name,r)];case 7:if(!this.initialId)return[3,9];console.log("[SIGN] Reusing initial",this.initialId);return[4,h(this.endpoint,this.envelopeId,this.roleId,e.name,this.initialId,false)];case 8:r=u.sent();return[2,this.updateRecipientFieldValue(e.name,r)];case 9:if(!(typeof t.detail==="string"&&/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(t.detail)))return[3,11];console.log("[SIGN] Reusing initial",t.detail);return[4,h(this.endpoint,this.envelopeId,this.roleId,e.name,t.detail,false)];case 10:r=u.sent();this.initialId=t.detail;return[2,this.updateRecipientFieldValue(e.name,r)];case 11:this.showSpinner=true;return[4,fetch(t.detail)];case 12:return[4,u.sent().blob()];case 13:a=u.sent();return[2,v(this.endpoint,"initial",a).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,h(this.endpoint,this.envelopeId,this.roleId,e.name,t.id,false)];case 1:i=n.sent();this.updateRecipientFieldValue(e.name,i);this.initialId=t.id;this.showSpinner=false;return[2]}}))}))})).catch((function(e){console.log("Error updating initials",e);j("Unable to save initials, please try again later",{style:"error"});d.showSpinner=false}))];case 14:if(t.detail===undefined){return[2]}if(!(t.detail===null))return[3,16];console.log("[SIGN] Clearing signature");return[4,h(this.endpoint,this.envelopeId,this.roleId,e.name,null,false)];case 15:r=u.sent();return[2,this.updateRecipientFieldValue(e.name,r)];case 16:if(!this.signatureId)return[3,18];console.log("[SIGN] Reusing signature",this.signatureId);return[4,h(this.endpoint,this.envelopeId,this.roleId,e.name,this.signatureId,false)];case 17:r=u.sent();return[2,this.updateRecipientFieldValue(e.name,r)];case 18:if(!(typeof t.detail==="string"&&/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(t.detail)))return[3,20];console.log("[SIGN] Reusing signature",t.detail);return[4,h(this.endpoint,this.envelopeId,this.roleId,e.name,t.detail,false)];case 19:r=u.sent();this.signatureId=t.detail;return[2,this.updateRecipientFieldValue(e.name,r)];case 20:this.showSpinner=true;return[4,fetch(t.detail)];case 21:return[4,u.sent().blob()];case 22:l=u.sent();console.log("[SIGN] Creating new signature");return[2,f(this.endpoint,"signature",l).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,h(this.endpoint,this.envelopeId,this.roleId,e.name,t.id,false)];case 1:i=n.sent();this.updateRecipientFieldValue(e.name,i);this.signatureId=t.id;this.showSpinner=false;return[2]}}))}))})).catch((function(e){console.warn("[SIGN] Error updating signature",e);j("Unable to save signature, please try again later",{style:"error"});d.showSpinner=false}))];case 23:c=t.detail.formattedDate;if(c){return[2,this.saveFieldChange(e.name,c,false)]}return[3,26];case 24:console.log("[SIGN] Updating timestamp",{value:n,ts:t.target.getAttribute("timestamp")});return[3,26];case 25:console.log("[SIGN] Unhandled field update",{value:n,checked:o},e);return[3,26];case 26:return[2]}}))}))};e.prototype.getSortedFillableFields=function(){var e=this.getRecipientFields().filter((function(e){return e.type!=="timestamp"&&!e.readonly}));p(e);return e};e.prototype.getSortedDisplayableFields=function(){var e=this.getRecipientFields().filter((function(e){return e.type!=="timestamp"}));p(e);return e};e.prototype.handleNext=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,n,o,s,r;var a=this;return __generator(this,(function(l){switch(l.label){case 0:if(!this.nextSubmits)return[3,5];l.label=1;case 1:l.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,g(this.endpoint,this.envelopeId,this.roleId)];case 2:t=l.sent();console.log("[SIGN] Submitted successfully",t);window.location.reload();return[3,4];case 3:i=l.sent();console.log("[SIGN] Error submitting",i);this.submitting=false;j("Unable to submit document, please try again.",{style:"error"});return[3,4];case 4:return[2];case 5:n=this.getSortedFillableFields().filter((function(e){return!a.isFieldActuallyFilled(e)}));o=this.getNextFieldFromList(n);if(o){s=H(o);r=document.getElementById(s);r===null||r===void 0?void 0:r.scrollIntoView({behavior:"smooth",block:"center",inline:"center"});r===null||r===void 0?void 0:r.focusField();this.focusedField=o.name}return[2]}}))}))};e.prototype.handleNextOptional=function(){var e=this;var t=this.getSortedFillableFields().filter((function(t){return!t.required&&!e.isFieldActuallyFilled(t)}));var i=this.getNextFieldFromList(t);if(i){var n=H(i);var o=document.getElementById(n);o===null||o===void 0?void 0:o.scrollIntoView({behavior:"smooth",block:"center",inline:"center"});o===null||o===void 0?void 0:o.focusField();this.focusedField=i.name}};e.prototype.getRecipientFields=function(){var e=this;var t;return((t=this.envelope)===null||t===void 0?void 0:t.fields.filter((function(t){return t.role_name===e.recipient.role_name})))||[]};e.prototype.getRequiredTotalCount=function(){return this.getSortedFillableFields().filter((function(e){return e.required})).length};e.prototype.getRequiredFilledCount=function(){var e=this;return this.getSortedFillableFields().filter((function(t){return t.required&&e.isFieldActuallyFilled(t)})).length};e.prototype.getOptionalUnfilledCount=function(){var e=this;return this.getSortedFillableFields().filter((function(t){return!t.required&&!e.isFieldActuallyFilled(t)})).length};e.prototype.checkRecipientFields=function(){var e=this;var t=this.getRecipientFields().filter((function(t){return!m(t,e.getRecipientFields())}));if(t.length<1){this.nextButtonLabel="Finish";if(!this.nextSubmits){this.nextSubmits=true}}else{this.nextButtonLabel="Next";this.nextSubmits=false}this.updateAllFlags();var i=JSON.parse(localStorage.getItem("startedEnvelopes")||"[]");var n=i.includes(this.getStartedKey());if(this.nextSubmits){this.signingProgressMode="completed"}else if(n){this.signingProgressMode="signing"}else{this.signingProgressMode="start"}};e.prototype.isFieldActuallyFilled=function(e){if(e.type==="radio"&&e.group){var t=this.getRecipientFields().some((function(t){return t.group===e.group&&t.value==="true"}));if(t){return true}}return x(e,this.getRecipientFields())&&(e.type!=="dropdown"||!!e.value)&&(e.type!=="radio"||e.value==="true")&&(e.type!=="checkbox"||e.value==="true")};e.prototype.getNextRequiredField=function(){var e=this;var t=this.getSortedFillableFields().filter((function(t){return t.required&&!e.isFieldActuallyFilled(t)}));p(t);if(t.length===0){var i=this.getSortedFillableFields().filter((function(t){return!e.isFieldActuallyFilled(t)}));p(i);if(i.length>0){return this.getNextFieldFromList(i)}return null}return this.getNextFieldFromList(t)};e.prototype.getNextFieldFromList=function(e){var t=this;var i=e.findIndex((function(e){return e.name===t.focusedField}));var n=i+1;if(n>=e.length){n=0}return e[n]};e.prototype.handlePrev=function(){var e=this;var t;var i=this.getSortedFillableFields();var n=i.findIndex((function(t){return t.name===e.focusedField}));if(n>0){var o=i[n-1];var s=H(o);var r=document.getElementById(s);r===null||r===void 0?void 0:r.scrollIntoView({behavior:"smooth",block:"center"});(t=r===null||r===void 0?void 0:r.focusField)===null||t===void 0?void 0:t.call(r);this.focusedField=o.name}};e.prototype.updateAllFlags=function(){var e=this;Object.values(this.renderedPages).forEach((function(t){e.updateFlagsForPage(t)}))};e.prototype.updateFlagsForPage=function(e){var t=this;if(!e)return;var i=document.getElementById(e.containerId+"-controls");if(!i)return;var n=i.querySelectorAll(".verdocs-flag-instance");n.forEach((function(e){return e.remove()}));var o=this.getNextRequiredField();var s=this.getRecipientFields().find((function(e){return e.name===t.focusedField}));if(s&&!x(s,this.getRecipientFields())){o=s}if(o&&o.page===e.pageNumber&&o.document_id===e.documentId){var r="fill";var a="FILL";var l=false;switch(o.type){case"signature":a="SIGN";break;case"initial":a="INITIAL";break;case"checkbox":a="CHECK";break;case"radio":a="SELECT";break;case"date":case"dropdown":a="SELECT";break;case"attachment":a="ATTACH";break;case"payment":a="PAY";break;default:a="FILL";break}if(!o.required){l=true}T(e,o.y,o.height||M(o.type),{variant:r,label:a,showSkip:l,onSkip:function(){t.handleNext()},onClick:function(){var e;var t=H(o);var i=document.getElementById(t);i===null||i===void 0?void 0:i.scrollIntoView({behavior:"smooth",block:"center"});(e=i===null||i===void 0?void 0:i.focusField)===null||e===void 0?void 0:e.call(i)}})}};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,o,s;return __generator(this,(function(r){switch(r.label){case 0:console.log("[SIGN] onAttached",i.detail,i.target.value);this.showSpinner=true;r.label=1;case 1:r.trys.push([1,3,,4]);return[4,b(this.endpoint,this.envelopeId,this.roleId,t.name,i.detail)];case 2:n=r.sent();this.updateRecipientFieldValue(t.name,n);this.checkRecipientFields();o=E("envelope",t,e,{disabled:false,editable:false,draggable:false,done:this.isDone});this.attachFieldAttributes(e,t,o);this.showSpinner=false;return[3,4];case 3:s=r.sent();console.log("Error uploading attachment",s);j("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,o,s;return __generator(this,(function(r){switch(r.label){case 0:console.log("[SIGN] onDeleted",i.detail,i.target.value);this.showSpinner=true;r.label=1;case 1:r.trys.push([1,3,,4]);return[4,w(this.endpoint,this.envelopeId,this.roleId,t.name)];case 2:n=r.sent();console.log("[SIGN] Deleted attachment",n);this.updateRecipientFieldValue(t.name,n);this.checkRecipientFields();o=E("envelope",t,e,{disabled:false,editable:false,draggable:false,done:this.isDone});this.attachFieldAttributes(e,t,o);this.showSpinner=false;return[3,4];case 3:s=r.sent();console.log("Error uploading attachment",s);j("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"&&t.type!=="signature"&&t.type!=="initial"&&t.type!=="checkbox"&&t.type!=="radio"){n.handleFieldChange(t,e).finally((function(){return n.checkRecipientFields()}))}}));i.addEventListener("fieldChange",(function(e){n.handleFieldChange(t,e).finally((function(){return n.checkRecipientFields()}))}));i.addEventListener("adopt",(function(){n.focusedField=t.name;n.adoptingSignature=true}));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 o=y(this.recipient);i.setAttribute("initials",k(o));i.setAttribute("name",o);if(this.signatureId){i.setAttribute("signatureid",this.signatureId)}if(this.initialId){i.setAttribute("initialid",this.initialId)}};e.prototype.handlePageRendered=function(e){var t=this;var i=e.detail;this.renderedPages["".concat(i.documentId,":").concat(i.pageNumber)]=i;var n=this.getSortedDisplayableFields();n.filter((function(e){return e&&e.document_id===i.documentId&&e.page===i.pageNumber})).forEach((function(e,n){var o=E("envelope",e,i,{disabled:false,editable:false,draggable:false,done:t.isDone},n);if(!o){return}if(Array.isArray(o)){o.map((function(n){return t.attachFieldAttributes(i,e,n)}))}else{t.attachFieldAttributes(i,e,o)}}));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.document_id===i.documentId&&e.page===i.pageNumber})).forEach((function(e){var n=E("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();this.updateFlagsForPage(i)};e.prototype.handleAuthenticateSigner=function(e){var t=this;console.log("[SIGN] Submitting authentication step",e);C(this.endpoint,e).then((function(e){console.log("[SIGN] Verification successful",e);t.processAuthResponse(e)})).catch((function(e){var i,n,o,s,r,a;console.log("[SIGN] Error submitting authentication step",e);console.log((i=e.response)===null||i===void 0?void 0:i.data);if((s=(o=(n=e.response)===null||n===void 0?void 0:n.data)===null||o===void 0?void 0:o.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{j(((a=(r=e.response)===null||r===void 0?void 0:r.data)===null||a===void 0?void 0:a.error)||"Unable to verify your identity. Please try again.",{style:"error"})}}))};e.prototype.render=function(){var e=this;var t;if(this.showLoadError){return n(o,null,n("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 n(o,null,n("verdocs-loader",null))}if(this.fatalErrorMessage){return n(o,{class:{agreed:this.agreed}},n("div",{class:"fatal-error"},n("div",{class:"message"},n("div",{class:"header"},this.fatalErrorHeader),n("p",null,this.fatalErrorMessage))))}if(this.delegated){return n(o,{class:{agreed:false}},n("div",{class:"fatal-error"},n("div",{class:"message"},n("div",{class:"header"},"Delegated Signing Request"),n("p",null,"You have delegated signing to another recipient. You will not be able to sign this request again."))))}if(this.isDone){return n(o,{class:{agreed:this.agreed}},n("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&&n("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&&n("div",{class:"loading-indicator"},n("verdocs-loader",null)))}if(this.delegating){return n(o,{class:"agreed"},n("div",{class:"document",style:{paddingTop:"15px"}},n("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"})),n("verdocs-delegate-dialog",{endpoint:this.endpoint,envelope:this.envelope,onExit:function(){return e.delegating=false},onNext:function(t){S(e.endpoint,e.envelopeId,e.roleId,t.detail).then((function(t){j("Delegation request submitted.",{style:"success"});console.log("[SIGN] Delegated successfully",t);e.delegated=true;e.delegating=false})).catch((function(e){console.log("[SIGN] Error delegating request",e);j("Unable to process delegation request. Please try again later.",{style:"error"})}))}}))}if(this.declining){return n(o,{class:"agreed"},n("div",{class:"document",style:{paddingTop:"15px"}},n("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"})),n("verdocs-ok-dialog",{heading:"Decline Signing Request",message:"If you decline to sign this request, you will not be able to sign again in the future. The envelope sender will be notified.",buttonLabel:"OK",showCancel:true,onExit:function(){return e.declining=false},onNext:function(){_(e.endpoint,e.envelopeId,e.roleId).then((function(e){console.log("[SIGN] Decline result",e);window.location.reload()})).catch((function(e){console.warn("[SIGN] Error declining signing session",e);j("Unable to decline, please try again later",{style:"error"})}))}}))}if(!this.agreed){return n(o,{class:"agreed"},n("div",{class:"document",style:{paddingTop:"15px"}},n("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"})),n("verdocs-disclosure-dialog",{disclosures:this.disclosures,delegator:this.recipient.delegator,onDelegate:function(){return e.delegating=true},onDecline:function(){return e.declining=true},onAccept:function(){return e.handleClickAgree()}}))}if(this.authStep==="passcode"){return n("verdocs-passcode-dialog",{endpoint:this.endpoint,onNext:function(t){return e.processAuthResponse(t.detail.response)}})}if(this.authStep==="email"){return n("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 n(o,{class:"kba"},n("div",{id:"verdocs-sign-header"},n("div",{class:"inner"},n("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),n("div",{class:"title"},this.envelope.name))),n("div",{class:"document",style:{paddingTop:"15px"}},n("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"})),n("div",{class:"cover"},n("div",{class:"kba"},n("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 i=this.kbaChoices.length;var r=this.kbaQuestions[i];return n(o,{class:"kba"},n("div",{id:"verdocs-sign-header"},n("div",{class:"inner"},n("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),n("div",{class:"title"},this.envelope.name))),n("div",{class:"document",style:{paddingTop:"15px"}},n("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"})),n("div",{class:"cover"},n("div",{class:"kba"},this.kbaChoices.length>=this.kbaQuestions.length?n("verdocs-spinner",null):n("verdocs-kba-dialog",{mode:"choice",helptitle:"Your identity requires additional verification",helptext:(r===null||r===void 0?void 0:r.prompt)||"Please select one of the options below.",choices:(r===null||r===void 0?void 0:r.answer)||["Skip Question"],step:i+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(o){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]}))}))}}))))}var a=[{id:"later",label:"Finish Later"},{id:"decline",label:"Decline to Sign"},{id:"print",label:"Print Without Signing"},{id:"download",label:"Download"}];var l=[{id:"print",label:"Print"},{id:"download",label:"Download"}];if(this.recipient.delegator){a.unshift({id:"delegate",label:"Delegate"})}var c=this.getRecipientFields().filter((function(t){return!m(t,e.getRecipientFields())}));c.length>0?console.log("[SIGN] Invalid fields remaining",c.map((function(e){return e.name}))):console.log("[SIGN] All field valid");var d=this.envelope.documents.reduce((function(e,t){return e+t.pages}),0);var u=N(1,d).map((function(e){return{label:e.toString(),value:e.toString()}}));var p=0;return n(o,null,this.toolbarStyle==="menu"&&n("div",{id:"verdocs-sign-header"},n("div",{class:"inner"},n("div",{class:"title"},this.envelope.name),n("div",{style:{flex:"1"}}),!this.finishLater&&function(){var t=e.getRequiredTotalCount()-e.getRequiredFilledCount();var i=e.getOptionalUnfilledCount();if(t>0){return n("span",{class:"remaining-count"},t," required field",t===1?"":"s"," left")}return n("span",{class:"remaining-count"},n("span",{class:"check-icon",innerHTML:V}),"All required fields complete",i>0&&n("span",{class:"separator"},"|"),i>0&&n("span",{class:"review-optional",onClick:function(){return e.handleNextOptional()}},"Review ",i," optional"))}(),!this.finishLater&&n("verdocs-button",{size:"xsmall",label:this.nextButtonLabel==="Next"?"Next Required":this.nextButtonLabel,disabled:!this.agreed||this.submitting,onClick:function(){return e.handleNext()}}),n("div",{class:{"icon-button":true,minus:true,disabled:this.zoomLevel==="normal"},innerHTML:U,onClick:function(){return e.handleZoomOut()}}),n("div",{class:{"icon-button":true,plus:true,disabled:this.zoomLevel==="zoom2"},innerHTML:O,onClick:function(){return e.handleZoomIn()}}),n("verdocs-dropdown",{options:!this.isDone&&!this.finishLater?a:l,onOptionSelected:function(t){return e.handleOptionSelected(t)}}))),this.toolbarStyle==="controls"&&n("div",{class:"controls-toolbar"},n("div",{class:"left-controls"},n("div",{class:"title"},this.envelope.name)),n("div",{class:"center-controls"},n("span",{class:"label"},"Page"),n("div",{class:"select-wrapper"},n("verdocs-select-input",{options:u,value:this.pageNumber.toString(),onInput:function(t){return e.handlePageSelect(t)}})),n("span",{class:"count"},"of ",d)),n("div",{class:"right-controls"},n("verdocs-button",{class:"mobile-next-button",label:this.nextButtonLabel,size:"xsmall",disabled:!this.agreed||this.submitting,onClick:function(){return e.handleNext()}}),n("div",{class:{"icon-button":true,minus:true,disabled:this.zoomLevel==="normal"},innerHTML:U,onClick:function(){return e.handleZoomOut()}}),n("div",{class:{"icon-button":true,plus:true,disabled:this.zoomLevel==="zoom2"},innerHTML:O,onClick:function(){return e.handleZoomIn()}}),n("div",{class:"icon-button download",innerHTML:R,onClick:function(){return e.handleOptionSelected({detail:{id:"download"}})}}),n("div",{class:"icon-button print",innerHTML:Z,onClick:function(){return e.handleOptionSelected({detail:{id:"print"}})}}))),n("div",{class:"document signed-document-container zoom-".concat(this.zoomLevel)},(this.envelope.documents||[]).map((function(t){var i=N(1,t.pages);return n(s,null,e.envelope.documents.length>1&&n("div",{class:"document-separator"},n("div",{innerHTML:q}),n("span",null,t.name)),i.map((function(i){var o;var s=((o=t.page_sizes)===null||o===void 0?void 0:o[i])||{width:612,height:792};p++;return n("verdocs-envelope-document-page",{id:"page-".concat(p),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&&n("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(){e.isDone=true;e.showFinishLater=false}}),this.showDone&&n("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.adoptingSignature&&n("verdocs-adopt-signature-dialog",{name:y(this.recipient),nameLocked:!!((t=this.recipient)===null||t===void 0?void 0:t.name_locked),onNext:function(t){return __awaiter(e,void 0,void 0,(function(){var e,i,n,o,s,r,a,l,c;var d=this;return __generator(this,(function(u){switch(u.label){case 0:console.log("[SIGN] Adopting signature/initials block",t.detail);this.showSpinner=true;return[4,fetch(t.detail.signature)];case 1:return[4,u.sent().blob()];case 2:e=u.sent();return[4,fetch(t.detail.initials)];case 3:return[4,u.sent().blob()];case 4:i=u.sent();return[4,f(this.endpoint,"signature",e)];case 5:n=u.sent();console.log("[SIGN] Created signature",n);this.signatureId=n.id;return[4,v(this.endpoint,"initial",i)];case 6:o=u.sent();console.log("[SIGN] Created initials",o);this.initialId=o.id;this.showSpinner=false;this.adoptingSignature=false;this.markEnvelopeStarted();if(!this.focusedField)return[3,9];s=this.getRecipientFields().find((function(e){return e.name===d.focusedField}));if(!s)return[3,8];r=s.type==="signature"?this.signatureId:s.type==="initial"?this.initialId:null;if(!r)return[3,8];return[4,h(this.endpoint,this.envelopeId,this.roleId,s.name,r,false)];case 7:a=u.sent();this.updateRecipientFieldValue(s.name,a);u.label=8;case 8:this.focusedField="";u.label=9;case 9:l=this.el.querySelectorAll("verdocs-field-signature");l.forEach((function(e){return e.setAttribute("signatureid",d.signatureId)}));c=this.el.querySelectorAll("verdocs-field-initial");c.forEach((function(e){return e.setAttribute("initialid",d.initialId)}));this.checkRecipientFields();return[2]}}))}))},onExit:function(){return e.adoptingSignature=false}}),(this.submitting||this.showSpinner)&&n("verdocs-portal",null,n("div",{class:"spinner-overlay"},n("verdocs-spinner",null))),this.showDownloadDialog&&n("verdocs-download-dialog",{signed:this.envelope.signed,polling:this.polling,documents:this.envelope.documents,onExit:function(){e.showDownloadDialog=false;e.stopPolling()},onDownload:function(t){return __awaiter(e,void 0,void 0,(function(){var e,i,n,o,s,r,a,r,l,r,c,d;return __generator(this,(function(u){switch(u.label){case 0:i=t.detail,n=i.action,o=i.documentId;console.log("[SIGN] Download action selected:",n,o);u.label=1;case 1:u.trys.push([1,11,,12]);if(!(n==="document"))return[3,4];s=o||((e=this.envelope.documents.find((function(e){return e.type==="attachment"})))===null||e===void 0?void 0:e.id);if(!s)return[3,3];return[4,z(this.endpoint,s)];case 2:r=u.sent();window.open(r,"_blank");u.label=3;case 3:return[3,10];case 4:if(!(n==="certificate"))return[3,8];a=this.envelope.documents.find((function(e){return e.type==="certificate"}));if(!a)return[3,6];return[4,z(this.endpoint,a.id)];case 5:r=u.sent();window.open(r,"_blank");return[3,7];case 6:j("Certificate not yet available.",{style:"info"});u.label=7;case 7:return[3,10];case 8:if(!(n==="zip"))return[3,10];return[4,G(this.endpoint,[this.envelopeId])];case 9:l=u.sent();r=window.URL.createObjectURL(l.data);c=document.createElement("a");c.href=r;c.download="".concat(this.envelope.name,".zip");document.body.appendChild(c);c.click();c.remove();window.URL.revokeObjectURL(r);u.label=10;case 10:return[3,12];case 11:d=u.sent();console.error("Download error",d);j("Unable to complete download request.",{style:"error"});return[3,12];case 12:return[2]}}))}))}}),!this.loading&&!this.isDone&&n("verdocs-sign-footer",{endpoint:this.endpoint,envelopeId:this.envelopeId,isDone:this.isDone,onAskQuestion:function(t){I(e.endpoint,e.envelopeId,e.roleId,{question:t.detail.question}).then((function(){return j("Your question has been sent.",{style:"success"})})).catch((function(e){console.log("Error asking question",e);j("Unable to send question, please try again later.",{style:"error"})}))},onDecline:function(){return e.declining=true},onFinishLater:function(){return e.showFinishLater=true}}))};Object.defineProperty(e.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});return e}());Y.style=P}}}));
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n["throw"](e))}catch(e){s(e)}}function l(e){e.done?i(e.value):o(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,o,s,r=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return r.next=a(0),r["throw"]=a(1),r["return"]=a(2),typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(e){return function(t){return l([e,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r&&(r=0,a[0]&&(i=0)),i)try{if(n=1,o&&(s=a[0]&2?o["return"]:a[0]?o["throw"]||((s=o["return"])&&s.call(o),0):o.next)&&!(s=s.call(o,a[1])).done)return s;if(o=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;o=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(s=i.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){i.label=a[1];break}if(a[0]===6&&i.label<s[1]){i.label=s[1];s=a;break}if(s&&i.label<s[2]){i.label=s[2];i.ops.push(a);break}if(s[2])i.ops.pop();i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e];o=0}finally{n=s=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,o=t.length,s;n<o;n++){if(s||!(n in t)){if(!s)s=Array.prototype.slice.call(t,0,n);s[n]=t[n]}}return e.concat(s||Array.prototype.slice.call(t))};System.register(["./p-BO6MZhlp.system.js","@verdocs/js-sdk","./p-DuZ2r_0x.system.js","./p-GqS1qR-V.system.js","./p-Dj475wLP.system.js","./p-7Iu0_GGa.system.js","./p-fEbwslLK.system.js","./p-C57tUJVh.system.js","./p-C2OP3llY.system.js"],(function(e){"use strict";var t,i,n,o,s,r,a,l,c,d,u,h,f,v,p,g,m,x,b,w,y,k,C,S,_,N,I,z,G,L,H,T,E,M,V,j,q,D,A;return{setters:[function(e){t=e.r;i=e.c;n=e.h;o=e.H;s=e.F;r=e.g},function(e){a=e.VerdocsEndpoint;l=e.DEFAULT_DISCLOSURES;c=e.startSigningSession;d=e.envelopeRecipientAgree;u=e.getEnvelope;h=e.updateEnvelopeField;f=e.createSignature;v=e.createInitials;p=e.sortFields;g=e.envelopeRecipientSubmit;m=e.isFieldValid;x=e.isFieldFilled;b=e.uploadEnvelopeFieldAttachment;w=e.deleteEnvelopeFieldAttachment;y=e.formatFullName;k=e.fullNameToInitials;C=e.verifySigner;S=e.delegateRecipient;_=e.envelopeRecipientDecline;N=e.integerSequence;I=e.askQuestion;z=e.getEnvelopeDocumentDownloadLink;G=e.getEnvelopesZip},function(e){L=e.u;H=e.g;T=e.r;E=e.a;M=e.d},function(e){V=e.D;j=e.C},function(e){q=e.V},function(e){D=e.S},function(e){A=e.S},null,null],execute:function(){var P='verdocs-sign{display:-ms-flexbox;display:flex;overflow:hidden;min-height:700px;position:relative;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:#f5f5f5;font-family:var(--verdocs-primary-font, "Inter", "Barlow", 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;padding-right:140px;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>.document .document-separator{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:10px;padding:12px 20px;width:100%;max-width:1028px;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:#33364b;color:white;border-radius:6px;font-size:16px;font-weight:500;margin-top:20px;-webkit-box-shadow:0 2px 4px rgba(0, 0, 0, 0.1);box-shadow:0 2px 4px rgba(0, 0, 0, 0.1)}verdocs-sign>.document .document-separator svg{-ms-flex-negative:0;flex-shrink:0}verdocs-sign>.document .document-separator:first-child{margin-top:0}verdocs-sign .signed-document-container{width:64%;margin-left:260px;-webkit-transition:all 0.3s ease;transition:all 0.3s ease}verdocs-sign .signed-document-container.zoom-normal{width:64%;margin-left:260px}verdocs-sign .signed-document-container.zoom-zoom1{width:80%;margin-left:200px}verdocs-sign .signed-document-container.zoom-zoom2{width:100%;margin-left:150px}verdocs-sign .signed-document-container.zoom-zoom2 .verdocs-flag-instance{opacity:0;pointer-events:none}@media (max-width: 768px){verdocs-sign verdocs-sign-footer{padding:0 10px}verdocs-sign verdocs-sign-footer .buttons{gap:8px}verdocs-sign verdocs-sign-footer .buttons button{font-size:10px}verdocs-sign .signed-document-container{width:100%;margin-left:0}verdocs-sign .signed-document-container.zoom-normal,verdocs-sign .signed-document-container.zoom-zoom1,verdocs-sign .signed-document-container.zoom-zoom2{width:100%;margin-left:0}verdocs-sign>.document{padding-right:15px}verdocs-sign .verdocs-flag-instance{display:none !important}verdocs-sign .controls-toolbar .center-controls{display:none}verdocs-sign .controls-toolbar .right-controls .mobile-next-button{display:block;margin-right:10px}verdocs-sign .controls-toolbar .right-controls .minus,verdocs-sign .controls-toolbar .right-controls .plus{display:none}}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 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,.controls-toolbar,.verdocs-flag-instance,verdocs-signing-progress{display:none !important}verdocs-sign{min-height:auto;background-color:white}verdocs-sign>.document{overflow:visible;height:auto;display:block;padding:0;margin:0}verdocs-sign>.document .document-separator{display:none}verdocs-sign .signed-document-container{width:100%;margin:0}}#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;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px}#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}#verdocs-sign-header .remaining-count{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;gap:8px;color:#ffffff;font-size:13px;font-weight:400;white-space:nowrap}#verdocs-sign-header .remaining-count .check-icon{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center}#verdocs-sign-header .remaining-count .check-icon svg{width:16px;height:16px;fill:#55bc81}#verdocs-sign-header .remaining-count .separator{opacity:0.5;margin:0 2px}#verdocs-sign-header .remaining-count .review-optional{cursor:pointer;text-decoration:underline}#verdocs-sign-header .remaining-count .review-optional:hover{color:#54d68c}#verdocs-sign-header .icon-button{width:20px;height:32px;display:-ms-flexbox;display:flex;cursor:pointer;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border-radius:4px;-webkit-transition:background-color 0.2s;transition:background-color 0.2s}#verdocs-sign-header .icon-button svg path{fill:#ffffff}#verdocs-sign-header .icon-button:hover{background-color:rgba(255, 255, 255, 0.1)}#verdocs-sign-header .icon-button.disabled{opacity:0.35;pointer-events:none}#verdocs-sign-header .icon-button+.icon-button{margin-left:-6px}.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}.controls-toolbar{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;height:54px;padding:0 12px 0 24px;background-color:#ffffff;border-bottom:1px solid #e0e0e0;-webkit-box-shadow:none;box-shadow:none;font-family:"Inter", sans-serif;color:#424242;z-index:1000}.controls-toolbar .left-controls{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.controls-toolbar .left-controls .title{font-weight:500;font-size:16px;color:#242424;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.controls-toolbar .center-controls{-ms-flex:1;flex:1;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;gap:10px;font-size:14px;display:none}.controls-toolbar .center-controls .label{color:#000000;font-weight:300}.controls-toolbar .center-controls .select-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.controls-toolbar .center-controls .select-wrapper verdocs-select-input{margin:0}.controls-toolbar .center-controls .select-wrapper verdocs-select-input .input-label{display:none}.controls-toolbar .center-controls .select-wrapper verdocs-select-input .input-element{background:transparent;border:1px solid #e0e0e0;height:32px;padding:2px 8px;min-width:60px;text-align:center;font-family:inherit;color:#424242}.controls-toolbar .center-controls .select-wrapper verdocs-select-input .input-element:focus{border-color:var(--verdocs-primary-color, #55bc81)}.controls-toolbar .center-controls .count{color:#000000;font-weight:300}.controls-toolbar .right-controls{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}.controls-toolbar .right-controls .mobile-next-button{display:none}.controls-toolbar .right-controls .icon-button{width:32px;height:32px;display:-ms-flexbox;display:flex;color:#424242;cursor:pointer;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-transition:background-color 0.2s;transition:background-color 0.2s}.controls-toolbar .right-controls .icon-button:hover{background-color:#f5f5f5}.controls-toolbar .right-controls .icon-button.disabled{opacity:0.3;pointer-events:none}.controls-toolbar .right-controls .icon-button svg{display:block;width:20px;height:20px}';var U='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11 8C11.2761 8 11.5 8.22386 11.5 8.5C11.5 8.77614 11.2761 9 11 9H6C5.72386 9 5.5 8.77614 5.5 8.5C5.5 8.22386 5.72386 8 6 8H11ZM14 8.5C14 5.46243 11.5376 3 8.5 3C5.46243 3 3 5.46243 3 8.5C3 11.5376 5.46243 14 8.5 14C9.83879 14 11.0659 13.5217 12.0196 12.7266L16.1464 16.8536L16.2157 16.9114C16.4106 17.0464 16.68 17.0271 16.8536 16.8536C17.0488 16.6583 17.0488 16.3417 16.8536 16.1464L12.7266 12.0196C13.5217 11.0659 14 9.83879 14 8.5ZM4 8.5C4 6.01472 6.01472 4 8.5 4C10.9853 4 13 6.01472 13 8.5C13 10.9853 10.9853 13 8.5 13C6.01472 13 4 10.9853 4 8.5Z" fill="#424242" /></svg>';var O='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11.5 8.5C11.5 8.22386 11.2761 8 11 8H9V6C9 5.72386 8.77614 5.5 8.5 5.5C8.22386 5.5 8 5.72386 8 6V8H6C5.72386 8 5.5 8.22386 5.5 8.5C5.5 8.77614 5.72386 9 6 9H8V11C8 11.2761 8.22386 11.5 8.5 11.5C8.77614 11.5 9 11.2761 9 11V9H11C11.2761 9 11.5 8.77614 11.5 8.5ZM8.5 3C11.5376 3 14 5.46243 14 8.5C14 9.83879 13.5217 11.0659 12.7266 12.0196L16.8536 16.1464C17.0488 16.3417 17.0488 16.6583 16.8536 16.8536C16.68 17.0271 16.4106 17.0464 16.2157 16.9114L16.1464 16.8536L12.0196 12.7266C11.0659 13.5217 9.83879 14 8.5 14C5.46243 14 3 11.5376 3 8.5C3 5.46243 5.46243 3 8.5 3ZM8.5 4C6.01472 4 4 6.01472 4 8.5C4 10.9853 6.01472 13 8.5 13C10.9853 13 13 10.9853 13 8.5C13 6.01472 10.9853 4 8.5 4Z" fill="#424242" /></svg>';var Z='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M15.5 16.9988C15.7761 16.9988 16 17.2226 16 17.4988C16 17.7442 15.8231 17.9484 15.5899 17.9907L15.5 17.9988H4.5C4.22386 17.9988 4 17.7749 4 17.4988C4 17.2533 4.17688 17.0492 4.41012 17.0068L4.5 16.9988H15.5ZM10.0001 2.00098C10.2456 2.00098 10.4497 2.17798 10.492 2.41124L10.5 2.50112L10.496 14.295L14.1414 10.6466C14.3148 10.4729 14.5842 10.4534 14.7792 10.5882L14.8485 10.646C15.0222 10.8194 15.0418 11.0888 14.907 11.2838L14.8492 11.3531L10.3574 15.8531C10.285 15.9257 10.1957 15.9714 10.1021 15.9901L9.99608 15.9999C9.83511 15.9999 9.69192 15.9237 9.60051 15.8056L5.14386 11.3537C4.94846 11.1586 4.94823 10.842 5.14336 10.6466C5.3168 10.4729 5.58621 10.4534 5.78117 10.5883L5.85046 10.6461L9.496 14.287L9.5 2.50083C9.50008 2.22469 9.724 2.00098 10.0001 2.00098Z" fill="#424242"/></svg>';var R='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M5 4.5C5 3.67157 5.67157 3 6.5 3H13.5C14.3284 3 15 3.67157 15 4.5V5H15.5C16.8807 5 18 6.11929 18 7.5V12.5C18 13.3284 17.3284 14 16.5 14H15V15.5C15 16.3284 14.3284 17 13.5 17H6.5C5.67157 17 5 16.3284 5 15.5V14H3.5C2.67157 14 2 13.3284 2 12.5V7.5C2 6.11929 3.11929 5 4.5 5H5V4.5ZM6 5H14V4.5C14 4.22386 13.7761 4 13.5 4H6.5C6.22386 4 6 4.22386 6 4.5V5ZM5 13V11.5C5 10.6716 5.67157 10 6.5 10H13.5C14.3284 10 15 10.6716 15 11.5V13H16.5C16.7761 13 17 12.7761 17 12.5V7.5C17 6.67157 16.3284 6 15.5 6H4.5C3.67157 6 3 6.67157 3 7.5V12.5C3 12.7761 3.22386 13 3.5 13H5ZM6.5 11C6.22386 11 6 11.2239 6 11.5V15.5C6 15.7761 6.22386 16 6.5 16H13.5C13.7761 16 14 15.7761 14 15.5V11.5C14 11.2239 13.7761 11 13.5 11H6.5Z" fill="#424242"/></svg>';var Y=e("verdocs_sign",function(){function e(e){t(this,e);this.sdkError=i(this,"sdkError");this.envelopeLoaded=i(this,"envelopeLoaded");this.envelopeUpdated=i(this,"envelopeUpdated");this.endpoint=new a({sessionType:"signing"});this.envelopeId=null;this.roleId=null;this.inviteCode=null;this.headerTargetId=null;this.toolbarStyle="menu";this.recipient=null;this.hasSignature=false;this.nextButtonLabel="Start";this.nextSubmits=false;this.fatalErrorHeader="";this.fatalErrorMessage="";this.focusedField="";this.disclosures=l;this.fieldUpdateCounter=0;this.submitting=false;this.submitted=false;this.isDone=false;this.showDone=false;this.adoptingSignature=false;this.showLoadError=false;this.finishLater=false;this.showFinishLater=false;this.agreed=false;this.signatureId=null;this.initialId=null;this.documentsSingularPlural="document";this.authStep=null;this.authMethodStates={};this.pageNumber=1;this.kbaQuestions=null;this.showSpinner=false;this.declining=false;this.delegating=false;this.delegated=false;this.kbaChoices=[];this.showDownloadDialog=false;this.loading=true;this.envelope=null;this.zoomLevel="normal";this.signingProgressMode="start";this.polling=true;this.renderedPages={};this.pollingInterval=null}e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,n,o,s,r,a;var l=this;return __generator(this,(function(d){switch(d.label){case 0:this.updateZoomFromWindow();window.addEventListener("resize",(function(){return l.updateZoomFromWindow()}));if(!this.envelopeId){(e=this.sdkError)===null||e===void 0?void 0:e.emit(new D("[SIGN] Missing required envelopId",500,""));return[2]}if(!this.roleId){(t=this.sdkError)===null||t===void 0?void 0:t.emit(new D("[SIGN] Missing required roleId",500,""));return[2]}if(!this.inviteCode){(i=this.sdkError)===null||i===void 0?void 0:i.emit(new D("[SIGN] Missing required inviteCode",500,""));return[2]}d.label=1;case 1:d.trys.push([1,3,,4]);console.log("[SIGN] Processing invite code for ".concat(this.envelopeId," / ").concat(this.roleId));return[4,c(this.endpoint,this.envelopeId,this.roleId,this.inviteCode)];case 2:r=d.sent();this.processAuthResponse(r);return[3,4];case 3:a=d.sent();console.log("[SIGN] Error with signing session",a);(n=this.sdkError)===null||n===void 0?void 0:n.emit(new D(a.message,(o=a.response)===null||o===void 0?void 0:o.status,(s=a.response)===null||s===void 0?void 0:s.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)}this.setupIntersectionObserver()};e.prototype.disconnectedCallback=function(){var e=this;var t,i;this.stopPolling();(t=this.observer)===null||t===void 0?void 0:t.disconnect();window.removeEventListener("resize",(function(){return e.updateZoomFromWindow()}));(i=document.getElementById(this.getOrgStyleOverridesId()))===null||i===void 0?void 0:i.remove()};e.prototype.updateZoomFromWindow=function(){var e=window.innerWidth;if(e<768){if(this.zoomLevel!=="zoom2")this.zoomLevel="zoom2"}else if(e<1024){if(this.zoomLevel!=="zoom1")this.zoomLevel="zoom1"}else{if(this.zoomLevel!=="normal")this.zoomLevel="normal"}};e.prototype.setupIntersectionObserver=function(){var e=this;var t=this.el.querySelectorAll("verdocs-envelope-document-page");if(t.length===0)return;if(this.observer){this.observer.disconnect()}var i=this.el.querySelector(".signed-document-container");var n={root:i,rootMargin:"-40% 0px -40% 0px",threshold:0};this.observer=new IntersectionObserver((function(t){t.forEach((function(t){if(t.isIntersecting){var i=t.target.id;var n=parseInt(i.replace("page-",""),10);if(!isNaN(n)&&e.pageNumber!==n){e.pageNumber=n}}}))}),n);t.forEach((function(t){return e.observer.observe(t)}))};e.prototype.getOrgStyleOverridesId=function(){return"verdocs-org-style-overrides-".concat(this.envelopeId)};e.prototype.applyOrgStyleOverrides=function(){var e,t;var i=this.getOrgStyleOverridesId();var n=document.getElementById(i);var o=(t=(e=this.envelope)===null||e===void 0?void 0:e.organization)===null||t===void 0?void 0:t.style_overrides;if(typeof o==="string"){var s=n||document.createElement("style");s.id=i;s.textContent=o;if(!n){document.head.appendChild(s)}}else if(n){n.remove()}};e.prototype.processAuthResponse=function(e){var t,i,n,o;var s=e.envelope,r=e.recipient;(t=s.documents)===null||t===void 0?void 0:t.sort((function(e,t){return e.order!==t.order?e.order-t.order:e.created_at.localeCompare(t.created_at)}));var a=r.auth_step;this.recipient=r;this.envelope=s;this.disclosures=((n=(i=this.envelope)===null||i===void 0?void 0:i.organization)===null||n===void 0?void 0:n.disclaimer)||l;this.applyOrgStyleOverrides();this.authStep=a;this.delegated=!!r.delegated_to;this.agreed=r.agreed;this.signatureId=null;this.initialId=null;this.submitted=r.status==="submitted";this.loading=false;this.isDone=this.submitted;this.showDone=this.submitted;A.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 request. The sender has been notified."}else if(this.agreed){this.nextButtonLabel="Next"}this.checkRecipientFields();(o=this.envelopeLoaded)===null||o===void 0?void 0:o.emit({endpoint:this.endpoint,envelope:this.envelope})};e.prototype.handleClickAgree=function(){var e=this;this.submitting=true;console.log("[SIGN] Accepting disclosures",this.disclosures);d(this.endpoint,this.envelopeId,this.roleId,this.disclosures).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,o;console.log("[SIGN] Unable to accept disclosures",t);q("Unable to accept disclosures, please try again later",{style:"error"});(i=e.sdkError)===null||i===void 0?void 0:i.emit(new D(t.message,(n=t.response)===null||n===void 0?void 0:n.status,(o=t.response)===null||o===void 0?void 0:o.data));e.submitting=false}))};e.prototype.handlePageSelect=function(e){var t=parseInt(e.target.value);if(!isNaN(t)){this.pageNumber=t;var i=this.el.querySelector(".signed-document-container");var n=this.el.querySelector("#page-".concat(t));if(i&&n){var o=n.offsetTop-20;i.scrollTo({top:o,behavior:"smooth"})}}};e.prototype.handleOptionSelected=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i;return __generator(this,(function(n){switch(e.detail.id){case"later":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"});break;case"delegate":this.delegating=true;break;case"decline":this.declining=true;break;case"print":window.print();(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});break;case"download":this.showDownloadDialog=true;this.startPolling();break}return[2]}))}))};e.prototype.startPolling=function(){var e=this;this.stopPolling();var t=function(){var t,i,n,o,s,r;var a=((t=e.envelope)===null||t===void 0?void 0:t.status)==="complete"||!!((i=e.envelope)===null||i===void 0?void 0:i.signed);var l=(o=(n=e.envelope)===null||n===void 0?void 0:n.documents)===null||o===void 0?void 0:o.some((function(e){return e.type==="certificate"}));var c=(r=(s=e.envelope)===null||s===void 0?void 0:s.recipients)===null||r===void 0?void 0:r.every((function(e){return e.status==="submitted"}));if(a&&l)return false;if(!c)return false;return true};if(!t()){return}this.polling=true;this.pollingInterval=setInterval((function(){return __awaiter(e,void 0,void 0,(function(){var e,i;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);return[4,u(this.endpoint,this.envelopeId)];case 1:e=n.sent();this.envelope=e;A.updateEnvelope(this.envelopeId,e);this.checkRecipientFields();if(!t()){this.stopPolling()}return[3,3];case 2:i=n.sent();console.error("[SIGN] Polling error",i);this.stopPolling();return[3,3];case 3:return[2]}}))}))}),5e3)};e.prototype.stopPolling=function(){if(this.pollingInterval){clearInterval(this.pollingInterval);this.pollingInterval=null}this.polling=false};e.prototype.handleZoomIn=function(){if(this.zoomLevel==="normal"){this.zoomLevel="zoom1"}else if(this.zoomLevel==="zoom1"){this.zoomLevel="zoom2"}};e.prototype.handleZoomOut=function(){if(this.zoomLevel==="zoom1"){this.zoomLevel="normal"}else if(this.zoomLevel==="zoom2"){this.zoomLevel="zoom1"}};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;L(n);i.fieldUpdateCounter++;i.markEnvelopeStarted();i.checkRecipientFields()}}))};e.prototype.getStartedKey=function(){var e;return"".concat(this.envelopeId,":").concat(((e=this.recipient)===null||e===void 0?void 0:e.role_name)||"")};e.prototype.markEnvelopeStarted=function(){var e=JSON.parse(localStorage.getItem("startedEnvelopes")||"[]");var t=this.getStartedKey();if(!e.includes(t)){e.push(t);while(e.length>10){e.shift()}localStorage.setItem("startedEnvelopes",JSON.stringify(e))}};e.prototype.saveFieldChange=function(e,t,i){var n=this;var o=this.getRecipientFields().find((function(t){return t.name===e}));if(o===null||o===void 0?void 0:o.readonly){return}console.log("[SIGN] saveFieldChange",e,{value:t,prepared:i});h(this.endpoint,this.envelopeId,this.roleId,e,t,i).then((function(t){return n.updateRecipientFieldValue(e,t)})).catch((function(e){var t,i,o,s,r,a;if(((t=e.response)===null||t===void 0?void 0:t.status)===401&&((o=(i=e.response)===null||i===void 0?void 0:i.data)===null||o===void 0?void 0:o.error)==="jwt expired"){console.log("[SIGN] Signing session expired");n.fatalErrorHeader="Signing Session Expired";n.fatalErrorMessage="Please reload your browser to continue."}else{console.log("[SIGN] Server error",e);q("Unable to save change, please try again later",{style:"error"})}(s=n.sdkError)===null||s===void 0?void 0:s.emit(new D(e.message,(r=e.response)===null||r===void 0?void 0:r.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,o,s,r,r,r,a,r,r,r,l,c;var d=this;return __generator(this,(function(u){switch(u.label){case 0:if(!t.target){return[2]}i=t.target,n=i.value,o=i.checked;s=e.type;switch(s){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,14];case"date":return[3,23];case"timestamp":return[3,24]}return[3,25];case 1:return[2,this.saveFieldChange(e.name,n,false)];case 2:{return[2,this.saveFieldChange(e.name,String(t.target.checked),false)]}u.label=3;case 3:{return[2,this.saveFieldChange(e.name,String(t.target.checked),false)]}u.label=4;case 4:console.log("Saving dropdown",e.name,t.detail);return[2,this.saveFieldChange(e.name,t.detail,false)];case 5:if(t.detail===undefined){return[2]}if(!(t.detail===null))return[3,7];console.log("[SIGN] Clearing initial");return[4,h(this.endpoint,this.envelopeId,this.roleId,e.name,null,false)];case 6:r=u.sent();return[2,this.updateRecipientFieldValue(e.name,r)];case 7:if(!this.initialId)return[3,9];console.log("[SIGN] Reusing initial",this.initialId);return[4,h(this.endpoint,this.envelopeId,this.roleId,e.name,this.initialId,false)];case 8:r=u.sent();return[2,this.updateRecipientFieldValue(e.name,r)];case 9:if(!(typeof t.detail==="string"&&/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(t.detail)))return[3,11];console.log("[SIGN] Reusing initial",t.detail);return[4,h(this.endpoint,this.envelopeId,this.roleId,e.name,t.detail,false)];case 10:r=u.sent();this.initialId=t.detail;return[2,this.updateRecipientFieldValue(e.name,r)];case 11:this.showSpinner=true;return[4,fetch(t.detail)];case 12:return[4,u.sent().blob()];case 13:a=u.sent();return[2,v(this.endpoint,"initial",a).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,h(this.endpoint,this.envelopeId,this.roleId,e.name,t.id,false)];case 1:i=n.sent();this.updateRecipientFieldValue(e.name,i);this.initialId=t.id;this.showSpinner=false;return[2]}}))}))})).catch((function(e){console.log("Error updating initials",e);q("Unable to save initials, please try again later",{style:"error"});d.showSpinner=false}))];case 14:if(t.detail===undefined){return[2]}if(!(t.detail===null))return[3,16];console.log("[SIGN] Clearing signature");return[4,h(this.endpoint,this.envelopeId,this.roleId,e.name,null,false)];case 15:r=u.sent();return[2,this.updateRecipientFieldValue(e.name,r)];case 16:if(!this.signatureId)return[3,18];console.log("[SIGN] Reusing signature",this.signatureId);return[4,h(this.endpoint,this.envelopeId,this.roleId,e.name,this.signatureId,false)];case 17:r=u.sent();return[2,this.updateRecipientFieldValue(e.name,r)];case 18:if(!(typeof t.detail==="string"&&/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(t.detail)))return[3,20];console.log("[SIGN] Reusing signature",t.detail);return[4,h(this.endpoint,this.envelopeId,this.roleId,e.name,t.detail,false)];case 19:r=u.sent();this.signatureId=t.detail;return[2,this.updateRecipientFieldValue(e.name,r)];case 20:this.showSpinner=true;return[4,fetch(t.detail)];case 21:return[4,u.sent().blob()];case 22:l=u.sent();console.log("[SIGN] Creating new signature");return[2,f(this.endpoint,"signature",l).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,h(this.endpoint,this.envelopeId,this.roleId,e.name,t.id,false)];case 1:i=n.sent();this.updateRecipientFieldValue(e.name,i);this.signatureId=t.id;this.showSpinner=false;return[2]}}))}))})).catch((function(e){console.warn("[SIGN] Error updating signature",e);q("Unable to save signature, please try again later",{style:"error"});d.showSpinner=false}))];case 23:c=t.detail.formattedDate;if(c){return[2,this.saveFieldChange(e.name,c,false)]}return[3,26];case 24:console.log("[SIGN] Updating timestamp",{value:n,ts:t.target.getAttribute("timestamp")});return[3,26];case 25:console.log("[SIGN] Unhandled field update",{value:n,checked:o},e);return[3,26];case 26:return[2]}}))}))};e.prototype.getSortedFillableFields=function(){var e=this.getRecipientFields().filter((function(e){return e.type!=="timestamp"&&!e.readonly}));p(e);return e};e.prototype.getSortedDisplayableFields=function(){var e=this.getRecipientFields().filter((function(e){return e.type!=="timestamp"}));p(e);return e};e.prototype.handleNext=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,n,o,s,r;var a=this;return __generator(this,(function(l){switch(l.label){case 0:if(!this.nextSubmits)return[3,5];l.label=1;case 1:l.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,g(this.endpoint,this.envelopeId,this.roleId)];case 2:t=l.sent();console.log("[SIGN] Submitted successfully",t);window.location.reload();return[3,4];case 3:i=l.sent();console.log("[SIGN] Error submitting",i);this.submitting=false;q("Unable to submit document, please try again.",{style:"error"});return[3,4];case 4:return[2];case 5:n=this.getSortedFillableFields().filter((function(e){return!a.isFieldActuallyFilled(e)}));o=this.getNextFieldFromList(n);if(o){s=H(o);r=document.getElementById(s);r===null||r===void 0?void 0:r.scrollIntoView({behavior:"smooth",block:"center",inline:"center"});r===null||r===void 0?void 0:r.focusField();this.focusedField=o.name}return[2]}}))}))};e.prototype.handleNextOptional=function(){var e=this;var t=this.getSortedFillableFields().filter((function(t){return!t.required&&!e.isFieldActuallyFilled(t)}));var i=this.getNextFieldFromList(t);if(i){var n=H(i);var o=document.getElementById(n);o===null||o===void 0?void 0:o.scrollIntoView({behavior:"smooth",block:"center",inline:"center"});o===null||o===void 0?void 0:o.focusField();this.focusedField=i.name}};e.prototype.getRecipientFields=function(){var e=this;var t;return((t=this.envelope)===null||t===void 0?void 0:t.fields.filter((function(t){return t.role_name===e.recipient.role_name})))||[]};e.prototype.getRequiredTotalCount=function(){return this.getSortedFillableFields().filter((function(e){return e.required})).length};e.prototype.getRequiredFilledCount=function(){var e=this;return this.getSortedFillableFields().filter((function(t){return t.required&&e.isFieldActuallyFilled(t)})).length};e.prototype.getOptionalUnfilledCount=function(){var e=this;return this.getSortedFillableFields().filter((function(t){return!t.required&&!e.isFieldActuallyFilled(t)})).length};e.prototype.checkRecipientFields=function(){var e=this;var t=this.getRecipientFields().filter((function(t){return!m(t,e.getRecipientFields())}));if(t.length<1){this.nextButtonLabel="Finish";if(!this.nextSubmits){this.nextSubmits=true}}else{this.nextButtonLabel="Next";this.nextSubmits=false}this.updateAllFlags();var i=JSON.parse(localStorage.getItem("startedEnvelopes")||"[]");var n=i.includes(this.getStartedKey());if(this.nextSubmits){this.signingProgressMode="completed"}else if(n){this.signingProgressMode="signing"}else{this.signingProgressMode="start"}};e.prototype.isFieldActuallyFilled=function(e){if(e.type==="radio"&&e.group){var t=this.getRecipientFields().some((function(t){return t.group===e.group&&t.value==="true"}));if(t){return true}}return x(e,this.getRecipientFields())&&(e.type!=="dropdown"||!!e.value)&&(e.type!=="radio"||e.value==="true")&&(e.type!=="checkbox"||e.value==="true")};e.prototype.getNextRequiredField=function(){var e=this;var t=this.getSortedFillableFields().filter((function(t){return t.required&&!e.isFieldActuallyFilled(t)}));p(t);if(t.length===0){var i=this.getSortedFillableFields().filter((function(t){return!e.isFieldActuallyFilled(t)}));p(i);if(i.length>0){return this.getNextFieldFromList(i)}return null}return this.getNextFieldFromList(t)};e.prototype.getNextFieldFromList=function(e){var t=this;var i=e.findIndex((function(e){return e.name===t.focusedField}));var n=i+1;if(n>=e.length){n=0}return e[n]};e.prototype.handlePrev=function(){var e=this;var t;var i=this.getSortedFillableFields();var n=i.findIndex((function(t){return t.name===e.focusedField}));if(n>0){var o=i[n-1];var s=H(o);var r=document.getElementById(s);r===null||r===void 0?void 0:r.scrollIntoView({behavior:"smooth",block:"center"});(t=r===null||r===void 0?void 0:r.focusField)===null||t===void 0?void 0:t.call(r);this.focusedField=o.name}};e.prototype.updateAllFlags=function(){var e=this;Object.values(this.renderedPages).forEach((function(t){e.updateFlagsForPage(t)}))};e.prototype.updateFlagsForPage=function(e){var t=this;if(!e)return;var i=document.getElementById(e.containerId+"-controls");if(!i)return;var n=i.querySelectorAll(".verdocs-flag-instance");n.forEach((function(e){return e.remove()}));var o=this.getNextRequiredField();var s=this.getRecipientFields().find((function(e){return e.name===t.focusedField}));if(s&&!x(s,this.getRecipientFields())){o=s}if(o&&o.page===e.pageNumber&&o.document_id===e.documentId){var r="fill";var a="FILL";var l=false;switch(o.type){case"signature":a="SIGN";break;case"initial":a="INITIAL";break;case"checkbox":a="CHECK";break;case"radio":a="SELECT";break;case"date":case"dropdown":a="SELECT";break;case"attachment":a="ATTACH";break;case"payment":a="PAY";break;default:a="FILL";break}if(!o.required){l=true}T(e,o.y,o.height||M(o.type),{variant:r,label:a,showSkip:l,onSkip:function(){t.handleNext()},onClick:function(){var e;var t=H(o);var i=document.getElementById(t);i===null||i===void 0?void 0:i.scrollIntoView({behavior:"smooth",block:"center"});(e=i===null||i===void 0?void 0:i.focusField)===null||e===void 0?void 0:e.call(i)}})}};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,o,s;return __generator(this,(function(r){switch(r.label){case 0:console.log("[SIGN] onAttached",i.detail,i.target.value);this.showSpinner=true;r.label=1;case 1:r.trys.push([1,3,,4]);return[4,b(this.endpoint,this.envelopeId,this.roleId,t.name,i.detail)];case 2:n=r.sent();this.updateRecipientFieldValue(t.name,n);this.checkRecipientFields();o=E("envelope",t,e,{disabled:false,editable:false,draggable:false,done:this.isDone});this.attachFieldAttributes(e,t,o);this.showSpinner=false;return[3,4];case 3:s=r.sent();console.log("Error uploading attachment",s);q("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,o,s;return __generator(this,(function(r){switch(r.label){case 0:console.log("[SIGN] onDeleted",i.detail,i.target.value);this.showSpinner=true;r.label=1;case 1:r.trys.push([1,3,,4]);return[4,w(this.endpoint,this.envelopeId,this.roleId,t.name)];case 2:n=r.sent();console.log("[SIGN] Deleted attachment",n);this.updateRecipientFieldValue(t.name,n);this.checkRecipientFields();o=E("envelope",t,e,{disabled:false,editable:false,draggable:false,done:this.isDone});this.attachFieldAttributes(e,t,o);this.showSpinner=false;return[3,4];case 3:s=r.sent();console.log("Error uploading attachment",s);q("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"&&t.type!=="signature"&&t.type!=="initial"&&t.type!=="checkbox"&&t.type!=="radio"){n.handleFieldChange(t,e).finally((function(){return n.checkRecipientFields()}))}}));i.addEventListener("fieldChange",(function(e){n.handleFieldChange(t,e).finally((function(){return n.checkRecipientFields()}))}));i.addEventListener("adopt",(function(){n.focusedField=t.name;n.adoptingSignature=true}));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 o=y(this.recipient);i.setAttribute("initials",k(o));i.setAttribute("name",o);if(this.signatureId){i.setAttribute("signatureid",this.signatureId)}if(this.initialId){i.setAttribute("initialid",this.initialId)}};e.prototype.handlePageRendered=function(e){var t=this;var i=e.detail;this.renderedPages["".concat(i.documentId,":").concat(i.pageNumber)]=i;var n=this.getSortedDisplayableFields();n.filter((function(e){return e&&e.document_id===i.documentId&&e.page===i.pageNumber})).forEach((function(e,n){var o=E("envelope",e,i,{disabled:false,editable:false,draggable:false,done:t.isDone},n);if(!o){return}if(Array.isArray(o)){o.map((function(n){return t.attachFieldAttributes(i,e,n)}))}else{t.attachFieldAttributes(i,e,o)}}));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.document_id===i.documentId&&e.page===i.pageNumber})).forEach((function(e){var n=E("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();this.updateFlagsForPage(i)};e.prototype.handleAuthenticateSigner=function(e){var t=this;console.log("[SIGN] Submitting authentication step",e);C(this.endpoint,e).then((function(e){console.log("[SIGN] Verification successful",e);t.processAuthResponse(e)})).catch((function(e){var i,n,o,s,r,a;console.log("[SIGN] Error submitting authentication step",e);console.log((i=e.response)===null||i===void 0?void 0:i.data);if((s=(o=(n=e.response)===null||n===void 0?void 0:n.data)===null||o===void 0?void 0:o.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{q(((a=(r=e.response)===null||r===void 0?void 0:r.data)===null||a===void 0?void 0:a.error)||"Unable to verify your identity. Please try again.",{style:"error"})}}))};e.prototype.render=function(){var e=this;var t;if(this.showLoadError){return n(o,null,n("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 n(o,null,n("verdocs-loader",null))}if(this.fatalErrorMessage){return n(o,{class:{agreed:this.agreed}},n("div",{class:"fatal-error"},n("div",{class:"message"},n("div",{class:"header"},this.fatalErrorHeader),n("p",null,this.fatalErrorMessage))))}if(this.delegated){return n(o,{class:{agreed:false}},n("div",{class:"fatal-error"},n("div",{class:"message"},n("div",{class:"header"},"Delegated Signing Request"),n("p",null,"You have delegated signing to another recipient. You will not be able to sign this request again."))))}if(this.isDone){return n(o,{class:{agreed:this.agreed}},n("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&&n("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&&n("div",{class:"loading-indicator"},n("verdocs-loader",null)))}if(this.delegating){return n(o,{class:"agreed"},n("div",{class:"document",style:{paddingTop:"15px"}},n("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"})),n("verdocs-delegate-dialog",{endpoint:this.endpoint,envelope:this.envelope,onExit:function(){return e.delegating=false},onNext:function(t){S(e.endpoint,e.envelopeId,e.roleId,t.detail).then((function(t){q("Delegation request submitted.",{style:"success"});console.log("[SIGN] Delegated successfully",t);e.delegated=true;e.delegating=false})).catch((function(e){console.log("[SIGN] Error delegating request",e);q("Unable to process delegation request. Please try again later.",{style:"error"})}))}}))}if(this.declining){return n(o,{class:"agreed"},n("div",{class:"document",style:{paddingTop:"15px"}},n("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"})),n("verdocs-ok-dialog",{heading:"Decline Signing Request",message:"If you decline to sign this request, you will not be able to sign again in the future. The envelope sender will be notified.",buttonLabel:"OK",showCancel:true,onExit:function(){return e.declining=false},onNext:function(){_(e.endpoint,e.envelopeId,e.roleId).then((function(e){console.log("[SIGN] Decline result",e);window.location.reload()})).catch((function(e){console.warn("[SIGN] Error declining signing session",e);q("Unable to decline, please try again later",{style:"error"})}))}}))}if(!this.agreed){return n(o,{class:"agreed"},n("div",{class:"document",style:{paddingTop:"15px"}},n("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"})),n("verdocs-disclosure-dialog",{disclosures:this.disclosures,delegator:this.recipient.delegator,onDelegate:function(){return e.delegating=true},onDecline:function(){return e.declining=true},onAccept:function(){return e.handleClickAgree()}}))}if(this.authStep==="passcode"){return n("verdocs-passcode-dialog",{endpoint:this.endpoint,onNext:function(t){return e.processAuthResponse(t.detail.response)}})}if(this.authStep==="email"){return n("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 n(o,{class:"kba"},n("div",{id:"verdocs-sign-header"},n("div",{class:"inner"},n("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),n("div",{class:"title"},this.envelope.name))),n("div",{class:"document",style:{paddingTop:"15px"}},n("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"})),n("div",{class:"cover"},n("div",{class:"kba"},n("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 i=this.kbaChoices.length;var r=this.kbaQuestions[i];return n(o,{class:"kba"},n("div",{id:"verdocs-sign-header"},n("div",{class:"inner"},n("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),n("div",{class:"title"},this.envelope.name))),n("div",{class:"document",style:{paddingTop:"15px"}},n("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"})),n("div",{class:"cover"},n("div",{class:"kba"},this.kbaChoices.length>=this.kbaQuestions.length?n("verdocs-spinner",null):n("verdocs-kba-dialog",{mode:"choice",helptitle:"Your identity requires additional verification",helptext:(r===null||r===void 0?void 0:r.prompt)||"Please select one of the options below.",choices:(r===null||r===void 0?void 0:r.answer)||["Skip Question"],step:i+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(o){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]}))}))}}))))}var a=[{id:"later",label:"Finish Later"},{id:"decline",label:"Decline to Sign"},{id:"print",label:"Print Without Signing"},{id:"download",label:"Download"}];var l=[{id:"print",label:"Print"},{id:"download",label:"Download"}];if(this.recipient.delegator){a.unshift({id:"delegate",label:"Delegate"})}var c=this.getRecipientFields().filter((function(t){return!m(t,e.getRecipientFields())}));c.length>0?console.log("[SIGN] Invalid fields remaining",c.map((function(e){return e.name}))):console.log("[SIGN] All field valid");var d=this.envelope.documents.reduce((function(e,t){return e+t.pages}),0);var u=N(1,d).map((function(e){return{label:e.toString(),value:e.toString()}}));var p=0;return n(o,null,this.toolbarStyle==="menu"&&n("div",{id:"verdocs-sign-header"},n("div",{class:"inner"},n("div",{class:"title"},this.envelope.name),n("div",{style:{flex:"1"}}),!this.finishLater&&function(){var t=e.getRequiredTotalCount()-e.getRequiredFilledCount();var i=e.getOptionalUnfilledCount();if(t>0){return n("span",{class:"remaining-count"},t," required field",t===1?"":"s"," left")}return n("span",{class:"remaining-count"},n("span",{class:"check-icon",innerHTML:j}),"All required fields complete",i>0&&n("span",{class:"separator"},"|"),i>0&&n("span",{class:"review-optional",onClick:function(){return e.handleNextOptional()}},"Review ",i," optional"))}(),!this.finishLater&&n("verdocs-button",{size:"xsmall",label:this.nextButtonLabel==="Next"?"Next Required":this.nextButtonLabel,disabled:!this.agreed||this.submitting,onClick:function(){return e.handleNext()}}),n("div",{class:{"icon-button":true,minus:true,disabled:this.zoomLevel==="normal"},innerHTML:U,onClick:function(){return e.handleZoomOut()}}),n("div",{class:{"icon-button":true,plus:true,disabled:this.zoomLevel==="zoom2"},innerHTML:O,onClick:function(){return e.handleZoomIn()}}),n("verdocs-dropdown",{options:!this.isDone&&!this.finishLater?a:l,onOptionSelected:function(t){return e.handleOptionSelected(t)}}))),this.toolbarStyle==="controls"&&n("div",{class:"controls-toolbar"},n("div",{class:"left-controls"},n("div",{class:"title"},this.envelope.name)),n("div",{class:"center-controls"},n("span",{class:"label"},"Page"),n("div",{class:"select-wrapper"},n("verdocs-select-input",{options:u,value:this.pageNumber.toString(),onInput:function(t){return e.handlePageSelect(t)}})),n("span",{class:"count"},"of ",d)),n("div",{class:"right-controls"},n("verdocs-button",{class:"mobile-next-button",label:this.nextButtonLabel,size:"xsmall",disabled:!this.agreed||this.submitting,onClick:function(){return e.handleNext()}}),n("div",{class:{"icon-button":true,minus:true,disabled:this.zoomLevel==="normal"},innerHTML:U,onClick:function(){return e.handleZoomOut()}}),n("div",{class:{"icon-button":true,plus:true,disabled:this.zoomLevel==="zoom2"},innerHTML:O,onClick:function(){return e.handleZoomIn()}}),n("div",{class:"icon-button download",innerHTML:Z,onClick:function(){return e.handleOptionSelected({detail:{id:"download"}})}}),n("div",{class:"icon-button print",innerHTML:R,onClick:function(){return e.handleOptionSelected({detail:{id:"print"}})}}))),n("div",{class:"document signed-document-container zoom-".concat(this.zoomLevel)},(this.envelope.documents||[]).map((function(t){var i=N(1,t.pages);return n(s,null,e.envelope.documents.length>1&&n("div",{class:"document-separator"},n("div",{innerHTML:V}),n("span",null,t.name)),i.map((function(i){var o;var s=((o=t.page_sizes)===null||o===void 0?void 0:o[i])||{width:612,height:792};p++;return n("verdocs-envelope-document-page",{id:"page-".concat(p),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&&n("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(){e.isDone=true;e.showFinishLater=false}}),this.showDone&&n("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.adoptingSignature&&n("verdocs-adopt-signature-dialog",{name:y(this.recipient),nameLocked:!!((t=this.recipient)===null||t===void 0?void 0:t.name_locked),onNext:function(t){return __awaiter(e,void 0,void 0,(function(){var e,i,n,o,s,r,a,l,c;var d=this;return __generator(this,(function(u){switch(u.label){case 0:console.log("[SIGN] Adopting signature/initials block",t.detail);this.showSpinner=true;return[4,fetch(t.detail.signature)];case 1:return[4,u.sent().blob()];case 2:e=u.sent();return[4,fetch(t.detail.initials)];case 3:return[4,u.sent().blob()];case 4:i=u.sent();return[4,f(this.endpoint,"signature",e)];case 5:n=u.sent();console.log("[SIGN] Created signature",n);this.signatureId=n.id;return[4,v(this.endpoint,"initial",i)];case 6:o=u.sent();console.log("[SIGN] Created initials",o);this.initialId=o.id;this.showSpinner=false;this.adoptingSignature=false;this.markEnvelopeStarted();if(!this.focusedField)return[3,9];s=this.getRecipientFields().find((function(e){return e.name===d.focusedField}));if(!s)return[3,8];r=s.type==="signature"?this.signatureId:s.type==="initial"?this.initialId:null;if(!r)return[3,8];return[4,h(this.endpoint,this.envelopeId,this.roleId,s.name,r,false)];case 7:a=u.sent();this.updateRecipientFieldValue(s.name,a);u.label=8;case 8:this.focusedField="";u.label=9;case 9:l=this.el.querySelectorAll("verdocs-field-signature");l.forEach((function(e){return e.setAttribute("signatureid",d.signatureId)}));c=this.el.querySelectorAll("verdocs-field-initial");c.forEach((function(e){return e.setAttribute("initialid",d.initialId)}));this.checkRecipientFields();return[2]}}))}))},onExit:function(){return e.adoptingSignature=false}}),(this.submitting||this.showSpinner)&&n("verdocs-portal",null,n("div",{class:"spinner-overlay"},n("verdocs-spinner",null))),this.showDownloadDialog&&n("verdocs-download-dialog",{signed:this.envelope.signed,polling:this.polling,documents:this.envelope.documents,onExit:function(){e.showDownloadDialog=false;e.stopPolling()},onDownload:function(t){return __awaiter(e,void 0,void 0,(function(){var e,i,n,o,s,r,a,r,l,r,c,d;return __generator(this,(function(u){switch(u.label){case 0:i=t.detail,n=i.action,o=i.documentId;console.log("[SIGN] Download action selected:",n,o);u.label=1;case 1:u.trys.push([1,11,,12]);if(!(n==="document"))return[3,4];s=o||((e=this.envelope.documents.find((function(e){return e.type==="attachment"})))===null||e===void 0?void 0:e.id);if(!s)return[3,3];return[4,z(this.endpoint,s)];case 2:r=u.sent();window.open(r,"_blank");u.label=3;case 3:return[3,10];case 4:if(!(n==="certificate"))return[3,8];a=this.envelope.documents.find((function(e){return e.type==="certificate"}));if(!a)return[3,6];return[4,z(this.endpoint,a.id)];case 5:r=u.sent();window.open(r,"_blank");return[3,7];case 6:q("Certificate not yet available.",{style:"info"});u.label=7;case 7:return[3,10];case 8:if(!(n==="zip"))return[3,10];return[4,G(this.endpoint,[this.envelopeId])];case 9:l=u.sent();r=window.URL.createObjectURL(l.data);c=document.createElement("a");c.href=r;c.download="".concat(this.envelope.name,".zip");document.body.appendChild(c);c.click();c.remove();window.URL.revokeObjectURL(r);u.label=10;case 10:return[3,12];case 11:d=u.sent();console.error("Download error",d);q("Unable to complete download request.",{style:"error"});return[3,12];case 12:return[2]}}))}))}}),!this.loading&&!this.isDone&&n("verdocs-sign-footer",{endpoint:this.endpoint,envelopeId:this.envelopeId,isDone:this.isDone,onAskQuestion:function(t){I(e.endpoint,e.envelopeId,e.roleId,{question:t.detail.question}).then((function(){return q("Your question has been sent.",{style:"success"})})).catch((function(e){console.log("Error asking question",e);q("Unable to send question, please try again later.",{style:"error"})}))},onDecline:function(){return e.declining=true},onFinishLater:function(){return e.showFinishLater=true}}))};Object.defineProperty(e.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});return e}());Y.style=P}}}));
|
|
2
|
+
//# sourceMappingURL=p-1dc9071b.system.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e,c as o,h as t,H as i,g as n}from"./p-BIRwgFLv.js";import{VerdocsEndpoint as s,getEnvelopeDocumentPageDisplayUri as d,getEnvelope as a}from"@verdocs/js-sdk";import{t as r}from"./p-NAwq_U8G.js";import{S as l}from"./p-C1sRVZWv.js";import{S as c}from"./p-C7hFgM52.js";import"./p-dzBXqXlK.js";import"./p-BqoC0yeA.js";const f='verdocs-download-dialog{-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", "Barlow", sans-serif}verdocs-download-dialog .heading-container{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}verdocs-download-dialog .content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:15px;padding:0 24px 20px 24px}verdocs-download-dialog .download-option{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:12px 15px;border:1px solid #e5e7eb;border-radius:6px;cursor:pointer;-webkit-transition:all 0.2s ease;transition:all 0.2s ease;gap:15px;background:white}verdocs-download-dialog .download-option.disabled{opacity:0.5;cursor:not-allowed}verdocs-download-dialog .download-option.disabled:hover{background-color:white;border-color:#e5e7eb}verdocs-download-dialog .download-option:hover{border-color:#654dcb;background-color:#f9fafb}verdocs-download-dialog .icon-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:36px;height:36px;background-color:#f3f4f6;border-radius:50%;color:#4b5563;-ms-flex-negative:0;flex-shrink:0}verdocs-download-dialog .icon-container svg{width:18px;height:18px}verdocs-download-dialog .text-container{-ms-flex:1;flex:1}verdocs-download-dialog .text-container .label{font-weight:500;color:#111827;margin-bottom:2px}verdocs-download-dialog .text-container .description{font-size:13px;color:#6b7280}verdocs-download-dialog .status-indicator{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;gap:2px;font-size:11px;color:#9ca3af;min-width:50px}verdocs-download-dialog .status-indicator .signed{color:#10b981}verdocs-download-dialog .status-indicator .spinner-inline{display:-ms-flexbox;display:flex;color:#9ca3af;-webkit-animation:rotate 2s linear infinite;animation:rotate 2s linear infinite}verdocs-download-dialog .status-indicator svg{width:16px;height:16px}verdocs-download-dialog .info-message{font-size:13px;color:#6b7280;font-style:italic;padding:0 4px}@-webkit-keyframes rotate{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}';const h=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13 2H6C5.46957 2 4.96086 2.21071 4.58579 2.58579C4.21071 2.96086 4 3.46957 4 4V20C4 20.5304 4.21071 21.0391 4.58579 21.4142C4.96086 21.7893 5.46957 22 6 22H18C18.5304 22 19.0391 21.7893 19.4142 21.4142C19.7893 21.0391 20 20.5304 20 20V9L13 2Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M13 2V9H20" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>`;const p=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 15C15.866 15 19 11.866 19 8C19 4.13401 15.866 1 12 1C8.13401 1 5 4.13401 5 8C5 11.866 8.13401 15 12 15Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M8.21 13.89L7 23L12 20L17 23L15.79 13.88" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>`;const b=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 16V22H14V16" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M6 16H18" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M20 22H4" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M12 10L12 16" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M8 12L12 16L16 12" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M4 16V4H20V16" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>`;const v=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20 6L9 17L4 12" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>`;const u=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M23 4V10H17" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M20.49 15A9 9 0 1 1 21.23 8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>`;const g=class{constructor(t){e(this,t);this.download=o(this,"download");this.exit=o(this,"exit");this.signed=false;this.polling=false;this.documents=[];this.hasCertificate=false}handleOptionClick(e,o){const t=this.documents.some((e=>e.type==="certificate"))||this.hasCertificate;const i=this.signed&&t;if(e==="certificate"&&!i){return}if(e==="zip"&&(this.polling||!i)){return}this.download.emit({action:e,documentId:o})}render(){const e=this.documents.filter((e=>e.type==="attachment")).sort(((e,o)=>e.order!==o.order?e.order-o.order:e.created_at.localeCompare(o.created_at)));const o=this.documents.some((e=>e.type==="certificate"))||this.hasCertificate;const i=this.signed&&o;const n=!this.polling&&i;const s=!this.signed;return t("verdocs-dialog",{key:"bbeaf815bfa639d92aba937fb2932171fb6a969d",onExit:()=>this.exit.emit()},t("div",{key:"3baaed7a0448b0b4487baf09996b0c0eed8dcc32",slot:"heading",class:"heading-container"},t("h3",{key:"055f9b0b3a1cbc4bf1dde3f66d33afe3cd69c59a",style:{margin:"0",fontSize:"1.25rem",fontWeight:"600",padding:"16px 24px"}},"Download")),t("div",{key:"d02a5cadb9e6ccc26f42d11a04d11c8796553137",slot:"content",class:"content"},e.length<=2&&e.map((e=>t("div",{class:"download-option",onClick:()=>this.handleOptionClick("document",e.id)},t("div",{class:"icon-container",innerHTML:h}),t("div",{class:"text-container"},t("div",{class:"label"},e.name),t("div",{class:"description"},"Download the document")),s?t("div",{class:"status-indicator"},t("div",{class:"spinner-inline",innerHTML:u})):t("div",{class:"status-indicator"},t("div",{class:"signed",innerHTML:v}),t("span",null,"Signed"))))),e.length>2&&t("div",{key:"445d03fccd38d54dfce8b32528dd4ff869729b71",class:"info-message"},"Multiple documents attached. Please use the ZIP option below to download all files."),t("div",{key:"82d95c21a9a16ab3536f85054e43333e44af83d0",class:{"download-option":true,disabled:!i},onClick:()=>this.handleOptionClick("certificate"),title:!i?"Certificate not yet available":""},t("div",{key:"adc703860b88d7fa5cd945ed8a6436eaac4e0186",class:"icon-container",innerHTML:p}),t("div",{key:"36f00a3cf54559157cd472700d0d6c8ad6fea55e",class:"text-container"},t("div",{key:"f2329e85febf992f0ea1a601a7c355063f196942",class:"label"},"Certificate"),t("div",{key:"9a9d90b9f55884fbfca9d289a753121737b07c0c",class:"description"},"Download the certificate")),i?t("div",{class:"status-indicator"},t("div",{class:"signed",innerHTML:v}),t("span",null,"Ready")):t("div",{class:"status-indicator"},t("div",{class:"spinner-inline",innerHTML:u}))),t("div",{key:"05381515775fefc45fb04e935ece500a14fff159",class:{"download-option":true,disabled:!n},onClick:()=>this.handleOptionClick("zip"),title:!n?"Waiting for all documents to be ready":""},t("div",{key:"e260f34177dde5d0994f593662c98f223f890da2",class:"icon-container",innerHTML:b}),t("div",{key:"44a9a16e8c3a02449d331b9d74603ea8cfcd570b",class:"text-container"},t("div",{key:"54d968ac458d60d1aac7c39c3206069317bf67a3",class:"label"},"All Files"),t("div",{key:"b5f7246c36b12d83fdb63d7e38e90957fec3dd32",class:"description"},"Download everything as a ZIP file")),n?t("div",{class:"status-indicator"},t("div",{class:"signed",innerHTML:v}),t("span",null,"Ready")):t("div",{class:"status-indicator"},t("div",{class:"spinner-inline",innerHTML:u})))),t("div",{key:"e8f9a266b2b1302bc4a4170803737ce6c3cece6c",slot:"footer",style:{display:"none"}}))}};g.style=f;const x="verdocs-envelope-document-page{width:100%;position:relative}verdocs-envelope-document-page .verdocs-envelope-document-page-layer{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294)}verdocs-envelope-document-page .verdocs-envelope-document-page-layer.img{width:100%}";const w=class{constructor(t){e(this,t);this.pageRendered=o(this,"pageRendered");this.endpoint=s.getDefault();this.envelopeId="";this.documentId="";this.pageNumber=1;this.virtualWidth=612;this.virtualHeight=792;this.layers=[{name:"page",type:"canvas"}];this.type="original";this.containerId=`verdocs-envelope-document-page-${Math.random().toString(36).substring(2,11)}`;this.renderedWidth=this.virtualWidth;this.renderedHeight=this.virtualHeight;this.naturalWidth=this.virtualWidth;this.naturalHeight=this.virtualHeight;this.aspectRatio=this.virtualWidth/this.virtualHeight;this.skipFirstNotification=true;this.pageDisplayUri="https://verdocs-public-assets.s3.amazonaws.com/page-loading-placeholder.png"}async componentWillLoad(){this.pageDisplayUri=await d(this.endpoint,this.documentId,this.pageNumber,this.type)}componentDidLoad(){this.resizeObserver=new ResizeObserver(r((e=>{for(const o of e){const e=o.contentRect.width;this.renderedWidth=e;this.renderedHeight=this.virtualHeight*(e/this.virtualWidth)}this.notifyRenderedSize()}),100));this.resizeObserver.observe(this.container)}disconnectedCallback(){var e;(e=this.resizeObserver)===null||e===void 0?void 0:e.disconnect()}notifyRenderedSize(){if(this.skipFirstNotification){this.skipFirstNotification=false;return}this.pageRendered.emit({containerId:this.containerId,documentId:this.documentId,pageNumber:this.pageNumber,virtualWidth:this.virtualWidth,virtualHeight:this.virtualHeight,renderedWidth:this.renderedWidth,renderedHeight:this.renderedHeight,naturalWidth:this.naturalWidth,naturalHeight:this.naturalHeight,aspectRatio:this.aspectRatio,xScale:this.renderedWidth/this.virtualWidth,yScale:this.renderedHeight/this.virtualHeight})}render(){const e=`${this.renderedHeight}px`;return t(i,{key:"633b71e22df815319ad854618b74b035a6e43603",id:`${this.containerId}`,style:{height:e,flex:`0 0 ${e}`}},this.layers.map((o=>o.type==="div"?t("div",{class:"verdocs-envelope-document-page-layer",id:`${this.containerId}-${o.name}`,style:{height:e}}):this.pageDisplayUri?t("img",{class:"verdocs-envelope-document-page-layer img",id:`${this.containerId}-${o.name}`,src:this.pageDisplayUri,alt:`Page ${this.pageNumber}`,"aria-hidden":true,loading:"lazy",onLoad:e=>{this.naturalWidth=e.target.naturalWidth;this.naturalHeight=e.target.naturalHeight;this.aspectRatio=this.naturalWidth/this.naturalHeight;this.virtualHeight=this.virtualWidth/this.aspectRatio;this.renderedHeight=e.target.offsetWidth/this.aspectRatio}}):t("div",null))))}get container(){return n(this)}};w.style=x;const k='verdocs-question-dialog{top:0;left:0;right:0;bottom:0;position:fixed;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", "Barlow", sans-serif}verdocs-question-dialog.closed{display:none}verdocs-question-dialog textarea{-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #707ae5;border-radius:4px;background:#ffffff;color:#000;width:100%;font-size:14px;padding:9px;outline:none}verdocs-question-dialog .heading .title{font-size:18px}verdocs-question-dialog .buttons{gap:20px;display:-ms-flexbox;display:flex;margin-top:24px;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-question-dialog .buttons button{-ms-flex:1;flex:1;border:0;height:38px;display:-ms-flexbox;display:flex;color:#ffffff;font-size:14px;cursor:pointer;border-radius:6px;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-question-dialog .buttons button.cancel{background-color:#654dcb}verdocs-question-dialog .buttons button.ok{background-color:#55bc81}verdocs-question-dialog .buttons button.ok.single{max-width:150px}verdocs-question-dialog .buttons button:disabled{background-color:#6c727f}';const m=`<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10.4809 13.8423H15.4C16.2962 13.8423 17 13.1288 17 12.2764V5.56582C17 4.71348 16.2962 4 15.4 4H4.6C3.70383 4 3 4.71348 3 5.56582V12.2764C3 13.1288 3.70383 13.8423 4.6 13.8423H6.19908L6.2 17L6.20346 16.9997L6.20502 16.9988L10.4809 13.8423ZM6.79895 17.8034C6.35668 18.1298 5.73 18.0406 5.39921 17.6042C5.26989 17.4335 5.2 17.2262 5.2 17.0133L5.19937 14.8423H4.6C3.16406 14.8423 2 13.6935 2 12.2764V5.56582C2 4.14876 3.16406 3 4.6 3H15.4C16.8359 3 18 4.14876 18 5.56582V12.2764C18 13.6935 16.8359 14.8423 15.4 14.8423H10.81L6.79895 17.8034Z" fill="#ffffff"/></svg>`;const y=class{constructor(t){e(this,t);this.next=o(this,"next");this.exit=o(this,"exit");this.question="";this.closed=false}handleOk(){this.next.emit({question:this.question})}handleCancel(){this.exit.emit()}handleDismiss(e){this.closed=true;if(e.target.className==="background-overlay"){e.preventDefault();this.exit.emit()}}render(){return t("verdocs-dialog",{key:"d0e85744fa9901d1be794cd59f4c9b87922e6e91",onExit:e=>this.handleDismiss(e)},t("div",{key:"6d7ead703cdf217588ac98d2ac93a35644838b78",slot:"heading",class:"heading"},t("div",{key:"d07c6155fc98f51204a51add33d82afec7592c4b",class:"icon",innerHTML:m}),t("div",{key:"e9698d0aa4b24db343afd149adee95d9c3c0a52a",class:"title"},"Ask the Sender a Question")),t("div",{key:"cdef7a2b00c4c66e1748733e3c614e39ad456192",slot:"content",class:"content"},t("textarea",{key:"81c88e1d61be54e7ba80c9101fb71bf903df8d1c",name:"question",rows:6,placeholder:"Enter your question...",onInput:e=>this.question=e.target.value},this.question)),t("div",{key:"a7d5a31362337e6c80c0ac5b2c6471efbacb9a23",class:"footer",slot:"footer"},t("div",{key:"71ae8344f053cfd94dc6befed76933fe67f490d1",class:"buttons"},t("button",{key:"04aec379b7b4f21885f72ed2016b10ac26730476",class:"cancel",onClick:()=>this.handleCancel()},"Cancel"),t("button",{key:"6e6e8bb27367c9a1167a49519da299d9ce9ee983",class:"ok",onClick:()=>this.handleOk()},"OK"))))}};y.style=k;const C='verdocs-sign-footer {\n left: 0;\n right: 0;\n bottom: 0;\n height: 48px;\n display: -ms-flexbox;\n display: flex;\n color: #616161;\n position: fixed;\n font-size: 12px;\n padding: 0 24px;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-direction: row;\n flex-direction: row;\n background: #ffffff;\n container-type: inline-size;\n border-top: 1px solid #e0e0e0;\n -ms-flex-pack: justify;\n justify-content: space-between;\n font-family: var(--verdocs-primary-font, "Inter", "Barlow", sans-serif);\n -webkit-transition: 0.5s cubic-bezier(0.35, 0, 0.25, 1);\n transition: 0.5s cubic-bezier(0.35, 0, 0.25, 1);\n}\nverdocs-sign-footer a {\n color: #616161;\n cursor: pointer;\n text-decoration: none;\n border-bottom: 1px dotted #616161;\n}\nverdocs-sign-footer.loading {\n display: none;\n}\nverdocs-sign-footer .powered-by {\n white-space: nowrap;\n}\nverdocs-sign-footer .buttons {\n -ms-flex: 0;\n flex: 0;\n gap: 16px;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: row;\n flex-direction: row;\n white-space: nowrap;\n -ms-flex-align: center;\n align-items: center;\n}\nverdocs-sign-footer .buttons button {\n gap: 4px;\n border: none;\n display: -ms-flexbox;\n display: flex;\n outline: none;\n cursor: pointer;\n -ms-flex-direction: row;\n flex-direction: row;\n -ms-flex-align: center;\n align-items: center;\n background: transparent;\n}\nverdocs-sign-footer .buttons div {\n gap: 4px;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: row;\n flex-direction: row;\n -ms-flex-align: center;\n align-items: center;\n}\nverdocs-sign-footer .links {\n -ms-flex: 0;\n flex: 0;\n gap: 8px;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: row;\n flex-direction: row;\n white-space: nowrap;\n}\nverdocs-sign-footer.just-buttons .buttons {\n -ms-flex: 1;\n flex: 1;\n -ms-flex-pack: center;\n justify-content: center;\n}\n@container (max-width: 720px) {\n verdocs-sign-footer.has-buttons .powered-by {\n display: none;\n }\n}\n@container (max-width: 540px) {\n verdocs-sign-footer.no-buttons .powered-by {\n display: none;\n }\n verdocs-sign-footer.has-buttons .links {\n display: none;\n }\n verdocs-sign-footer .buttons {\n -ms-flex: 1;\n flex: 1;\n -ms-flex-pack: center;\n justify-content: center;\n }\n}';const L=`<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10.4809 13.8423H15.4C16.2962 13.8423 17 13.1288 17 12.2764V5.56582C17 4.71348 16.2962 4 15.4 4H4.6C3.70383 4 3 4.71348 3 5.56582V12.2764C3 13.1288 3.70383 13.8423 4.6 13.8423H6.19908L6.2 17L6.20346 16.9997L6.20502 16.9988L10.4809 13.8423ZM6.79895 17.8034C6.35668 18.1298 5.73 18.0406 5.39921 17.6042C5.26989 17.4335 5.2 17.2262 5.2 17.0133L5.19937 14.8423H4.6C3.16406 14.8423 2 13.6935 2 12.2764V5.56582C2 4.14876 3.16406 3 4.6 3H15.4C16.8359 3 18 4.14876 18 5.56582V12.2764C18 13.6935 16.8359 14.8423 15.4 14.8423H10.81L6.79895 17.8034Z" fill="#424242"/></svg>`;const H=`<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M7.14645 7.14645C7.34171 6.95118 7.65829 6.95118 7.85355 7.14645L10 9.29289L12.1464 7.14645C12.3417 6.95118 12.6583 6.95118 12.8536 7.14645C13.0488 7.34171 13.0488 7.65829 12.8536 7.85355L10.7071 10L12.8536 12.1464C13.0488 12.3417 13.0488 12.6583 12.8536 12.8536C12.6583 13.0488 12.3417 13.0488 12.1464 12.8536L10 10.7071L7.85355 12.8536C7.65829 13.0488 7.34171 13.0488 7.14645 12.8536C6.95118 12.6583 6.95118 12.3417 7.14645 12.1464L9.29289 10L7.14645 7.85355C6.95118 7.65829 6.95118 7.34171 7.14645 7.14645ZM3 6C3 4.34315 4.34315 3 6 3H14C15.6569 3 17 4.34315 17 6V14C17 15.6569 15.6569 17 14 17H6C4.34315 17 3 15.6569 3 14V6ZM6 4C4.89543 4 4 4.89543 4 6V14C4 15.1046 4.89543 16 6 16H14C15.1046 16 16 15.1046 16 14V6C16 4.89543 15.1046 4 14 4H6Z" fill="#424242"/></svg>`;const M=`<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 5C3 3.89543 3.89543 3 5 3H13.3787C13.9091 3 14.4178 3.21071 14.7929 3.58579L16.4142 5.20711C16.7893 5.58218 17 6.09089 17 6.62132V15C17 16.1046 16.1046 17 15 17H5C3.89543 17 3 16.1046 3 15V5ZM5 4C4.44772 4 4 4.44772 4 5V15C4 15.5523 4.44772 16 5 16L5 11.5C5 10.6716 5.67157 10 6.5 10H13.5C14.3284 10 15 10.6716 15 11.5V16C15.5523 16 16 15.5523 16 15V6.62132C16 6.3561 15.8946 6.10175 15.7071 5.91421L14.0858 4.29289C13.8983 4.10536 13.6439 4 13.3787 4L13 4V6.5C13 7.32843 12.3284 8 11.5 8L7.5 8C6.67157 8 6 7.32843 6 6.5L6 4H5ZM7 4L7 6.5C7 6.77614 7.22386 7 7.5 7L11.5 7C11.7761 7 12 6.77614 12 6.5V4L7 4ZM14 16V11.5C14 11.2239 13.7761 11 13.5 11H6.5C6.22386 11 6 11.2239 6 11.5V16H14Z" fill="#424242"/></svg>`;const j=class{constructor(t){e(this,t);this.askQuestion=o(this,"askQuestion");this.decline=o(this,"decline");this.finishLater=o(this,"finishLater");this.sdkError=o(this,"sdkError");this.envelopeListenerId=null;this.endpoint=s.getDefault();this.envelopeId="";this.isDone=false;this.askingQuestion=false;this.declinine=false;this.envelope=null}async componentWillLoad(){var e,o,t;try{if(!this.envelopeId){console.log(`[FOOTER] Missing required envelope ID ${this.envelopeId}`);return}this.listenToEnvelope()}catch(i){console.log("[FOOTER] Error loading envelope",i);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new l(i.message,(o=i.response)===null||o===void 0?void 0:o.status,(t=i.response)===null||t===void 0?void 0:t.data))}}disconnectedCallback(){this.unlistenToEnvelope()}async listenToEnvelope(){console.log("[FOOTER] Loading envelope",this.envelopeId);this.unlistenToEnvelope();c.subscribe("envelopes",this.envelopeId,(()=>a(this.endpoint,this.envelopeId)),false,(e=>{this.envelope=e}))}unlistenToEnvelope(){if(this.envelopeListenerId){c.store.delListener(this.envelopeListenerId);this.envelopeListenerId=null}}render(){var e,o,n,s,d,a,r,l,c,f,h,p,b,v,u,g,x,w,k,m,y,C,j,V;const z=!!((o=(e=this.envelope)===null||e===void 0?void 0:e.organization)===null||o===void 0?void 0:o.powered_by_label);const q=!!((s=(n=this.envelope)===null||n===void 0?void 0:n.organization)===null||s===void 0?void 0:s.terms_use_url)||!!((a=(d=this.envelope)===null||d===void 0?void 0:d.organization)===null||a===void 0?void 0:a.privacy_policy_url);const T=!this.isDone;return t(i,{key:"1fc747454660d14e69a4a65cbf71cd81f010d9c3",class:{"has-buttons":T,"no-buttons":!T,"has-powered-by":z,"has-links":q,"just-buttons":!z&&!q}},((l=(r=this.envelope)===null||r===void 0?void 0:r.organization)===null||l===void 0?void 0:l.powered_by_label)&&t("div",{key:"f8cae910df0d2c759af9ee2200aef58b80bb3f37",class:"powered-by"},((f=(c=this.envelope)===null||c===void 0?void 0:c.organization)===null||f===void 0?void 0:f.powered_by_url)?t("a",{href:(p=(h=this.envelope)===null||h===void 0?void 0:h.organization)===null||p===void 0?void 0:p.powered_by_url,target:"_blank",rel:"noopener noreferrer"},t("span",null,(v=(b=this.envelope)===null||b===void 0?void 0:b.organization)===null||v===void 0?void 0:v.powered_by_label)):t("span",null,(g=(u=this.envelope)===null||u===void 0?void 0:u.organization)===null||g===void 0?void 0:g.powered_by_label)),!this.isDone&&t("div",{key:"06bd0f346de34e567cfa2e2e5ae8bf06a8b6a1d9",class:"buttons"},t("button",{key:"bee3e5c2aad8cc60c9b291b14bba2e5eb1ee9c32",onClick:()=>this.askingQuestion=true},t("span",{key:"f42932689a3330a72b61e853d389eac39b2362a3",innerHTML:L}),"Ask Sender a Question"),t("button",{key:"7012513a564bfc6d5a416467843d1056ad5427c8",onClick:()=>{var e;return(e=this.decline)===null||e===void 0?void 0:e.emit()}},t("span",{key:"7e0506798239ec5935d2c98e577e482744e3aa1f",innerHTML:H}),"Decline Signing"),t("button",{key:"3b3765e04da3d7f0749f2cbc24d84f2a3b6edb47",onClick:()=>{var e;return(e=this.finishLater)===null||e===void 0?void 0:e.emit()}},t("span",{key:"0511b44dc272d16fdd2d2d6098f603f651c9bc50",innerHTML:M}),"Finish Later")),t("div",{key:"cbea53ab6d84e268e1750bb0fec9f846040bd4ad",class:"links"},((w=(x=this.envelope)===null||x===void 0?void 0:x.organization)===null||w===void 0?void 0:w.terms_use_url)&&t("a",{key:"45628f09eaf2105226ab8b906e20e787de1e28ff",href:(m=(k=this.envelope)===null||k===void 0?void 0:k.organization)===null||m===void 0?void 0:m.terms_use_url,target:"_blank",rel:"noopener noreferrer"},t("span",{key:"08dc74860f84fb34c64a21c5409571998e5ce217"},"Terms of Use")),((C=(y=this.envelope)===null||y===void 0?void 0:y.organization)===null||C===void 0?void 0:C.privacy_policy_url)&&t("a",{key:"c3cc1fb07f7de02108762611c5b69206218e4b59",href:(V=(j=this.envelope)===null||j===void 0?void 0:j.organization)===null||V===void 0?void 0:V.privacy_policy_url,target:"_blank",rel:"noopener noreferrer"},t("span",{key:"c4bc436c7f7213bc0af61859ef27d8c41e331884"},"Privacy Policy"))),this.askingQuestion&&t("verdocs-question-dialog",{key:"93380ca89c21673f72c53e4d4f941b7d35c0079e",onNext:e=>{var o;(o=this.askQuestion)===null||o===void 0?void 0:o.emit({question:e.detail.question});this.askingQuestion=false},onExit:()=>this.askingQuestion=false}))}};j.style=C;export{g as verdocs_download_dialog,w as verdocs_envelope_document_page,y as verdocs_question_dialog,j as verdocs_sign_footer};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as e,c as o,h as t,H as i,g as n}from"./p-BIRwgFLv.js";import{VerdocsEndpoint as s,getEnvelopeDocumentPageDisplayUri as d,getEnvelope as a}from"@verdocs/js-sdk";import{t as r}from"./p-BdWA0nYY.js";import{S as l}from"./p-C1sRVZWv.js";import{S as c}from"./p-C7hFgM52.js";import"./p-BAIpxOBc.js";import"./p-BqoC0yeA.js";const f='verdocs-download-dialog{-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", "Barlow", sans-serif}verdocs-download-dialog .heading-container{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}verdocs-download-dialog .content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:15px;padding:0 24px 20px 24px}verdocs-download-dialog .download-option{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:12px 15px;border:1px solid #e5e7eb;border-radius:6px;cursor:pointer;-webkit-transition:all 0.2s ease;transition:all 0.2s ease;gap:15px;background:white}verdocs-download-dialog .download-option.disabled{opacity:0.5;cursor:not-allowed}verdocs-download-dialog .download-option.disabled:hover{background-color:white;border-color:#e5e7eb}verdocs-download-dialog .download-option:hover{border-color:#654dcb;background-color:#f9fafb}verdocs-download-dialog .icon-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:36px;height:36px;background-color:#f3f4f6;border-radius:50%;color:#4b5563;-ms-flex-negative:0;flex-shrink:0}verdocs-download-dialog .icon-container svg{width:18px;height:18px}verdocs-download-dialog .text-container{-ms-flex:1;flex:1}verdocs-download-dialog .text-container .label{font-weight:500;color:#111827;margin-bottom:2px}verdocs-download-dialog .text-container .description{font-size:13px;color:#6b7280}verdocs-download-dialog .status-indicator{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;gap:2px;font-size:11px;color:#9ca3af;min-width:50px}verdocs-download-dialog .status-indicator .signed{color:#10b981}verdocs-download-dialog .status-indicator .spinner-inline{display:-ms-flexbox;display:flex;color:#9ca3af;-webkit-animation:rotate 2s linear infinite;animation:rotate 2s linear infinite}verdocs-download-dialog .status-indicator svg{width:16px;height:16px}verdocs-download-dialog .info-message{font-size:13px;color:#6b7280;font-style:italic;padding:0 4px}@-webkit-keyframes rotate{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}';const h=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13 2H6C5.46957 2 4.96086 2.21071 4.58579 2.58579C4.21071 2.96086 4 3.46957 4 4V20C4 20.5304 4.21071 21.0391 4.58579 21.4142C4.96086 21.7893 5.46957 22 6 22H18C18.5304 22 19.0391 21.7893 19.4142 21.4142C19.7893 21.0391 20 20.5304 20 20V9L13 2Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M13 2V9H20" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>`;const p=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 15C15.866 15 19 11.866 19 8C19 4.13401 15.866 1 12 1C8.13401 1 5 4.13401 5 8C5 11.866 8.13401 15 12 15Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M8.21 13.89L7 23L12 20L17 23L15.79 13.88" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>`;const b=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 16V22H14V16" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M6 16H18" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M20 22H4" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M12 10L12 16" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M8 12L12 16L16 12" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M4 16V4H20V16" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>`;const v=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20 6L9 17L4 12" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>`;const u=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M23 4V10H17" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M20.49 15A9 9 0 1 1 21.23 8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>`;const g=class{constructor(t){e(this,t);this.download=o(this,"download");this.exit=o(this,"exit");this.signed=false;this.polling=false;this.documents=[];this.hasCertificate=false}handleOptionClick(e,o){const t=this.documents.some((e=>e.type==="certificate"))||this.hasCertificate;const i=this.signed&&t;if(e==="certificate"&&!i){return}if(e==="zip"&&(this.polling||!i)){return}this.download.emit({action:e,documentId:o})}render(){const e=this.documents.filter((e=>e.type==="attachment")).sort(((e,o)=>e.order!==o.order?e.order-o.order:e.created_at.localeCompare(o.created_at)));const o=this.documents.some((e=>e.type==="certificate"))||this.hasCertificate;const i=this.signed&&o;const n=!this.polling&&i;const s=!this.signed;return t("verdocs-dialog",{key:"bbeaf815bfa639d92aba937fb2932171fb6a969d",onExit:()=>this.exit.emit()},t("div",{key:"3baaed7a0448b0b4487baf09996b0c0eed8dcc32",slot:"heading",class:"heading-container"},t("h3",{key:"055f9b0b3a1cbc4bf1dde3f66d33afe3cd69c59a",style:{margin:"0",fontSize:"1.25rem",fontWeight:"600",padding:"16px 24px"}},"Download")),t("div",{key:"d02a5cadb9e6ccc26f42d11a04d11c8796553137",slot:"content",class:"content"},e.length<=2&&e.map((e=>t("div",{class:"download-option",onClick:()=>this.handleOptionClick("document",e.id)},t("div",{class:"icon-container",innerHTML:h}),t("div",{class:"text-container"},t("div",{class:"label"},e.name),t("div",{class:"description"},"Download the document")),s?t("div",{class:"status-indicator"},t("div",{class:"spinner-inline",innerHTML:u})):t("div",{class:"status-indicator"},t("div",{class:"signed",innerHTML:v}),t("span",null,"Signed"))))),e.length>2&&t("div",{key:"445d03fccd38d54dfce8b32528dd4ff869729b71",class:"info-message"},"Multiple documents attached. Please use the ZIP option below to download all files."),t("div",{key:"82d95c21a9a16ab3536f85054e43333e44af83d0",class:{"download-option":true,disabled:!i},onClick:()=>this.handleOptionClick("certificate"),title:!i?"Certificate not yet available":""},t("div",{key:"adc703860b88d7fa5cd945ed8a6436eaac4e0186",class:"icon-container",innerHTML:p}),t("div",{key:"36f00a3cf54559157cd472700d0d6c8ad6fea55e",class:"text-container"},t("div",{key:"f2329e85febf992f0ea1a601a7c355063f196942",class:"label"},"Certificate"),t("div",{key:"9a9d90b9f55884fbfca9d289a753121737b07c0c",class:"description"},"Download the certificate")),i?t("div",{class:"status-indicator"},t("div",{class:"signed",innerHTML:v}),t("span",null,"Ready")):t("div",{class:"status-indicator"},t("div",{class:"spinner-inline",innerHTML:u}))),t("div",{key:"05381515775fefc45fb04e935ece500a14fff159",class:{"download-option":true,disabled:!n},onClick:()=>this.handleOptionClick("zip"),title:!n?"Waiting for all documents to be ready":""},t("div",{key:"e260f34177dde5d0994f593662c98f223f890da2",class:"icon-container",innerHTML:b}),t("div",{key:"44a9a16e8c3a02449d331b9d74603ea8cfcd570b",class:"text-container"},t("div",{key:"54d968ac458d60d1aac7c39c3206069317bf67a3",class:"label"},"All Files"),t("div",{key:"b5f7246c36b12d83fdb63d7e38e90957fec3dd32",class:"description"},"Download everything as a ZIP file")),n?t("div",{class:"status-indicator"},t("div",{class:"signed",innerHTML:v}),t("span",null,"Ready")):t("div",{class:"status-indicator"},t("div",{class:"spinner-inline",innerHTML:u})))),t("div",{key:"e8f9a266b2b1302bc4a4170803737ce6c3cece6c",slot:"footer",style:{display:"none"}}))}};g.style=f;const x="verdocs-envelope-document-page{width:100%;position:relative}verdocs-envelope-document-page .verdocs-envelope-document-page-layer{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294)}verdocs-envelope-document-page .verdocs-envelope-document-page-layer.img{width:100%}";const w=class{constructor(t){e(this,t);this.pageRendered=o(this,"pageRendered");this.endpoint=s.getDefault();this.envelopeId="";this.documentId="";this.pageNumber=1;this.virtualWidth=612;this.virtualHeight=792;this.layers=[{name:"page",type:"canvas"}];this.type="original";this.containerId=`verdocs-envelope-document-page-${Math.random().toString(36).substring(2,11)}`;this.renderedWidth=this.virtualWidth;this.renderedHeight=this.virtualHeight;this.naturalWidth=this.virtualWidth;this.naturalHeight=this.virtualHeight;this.aspectRatio=this.virtualWidth/this.virtualHeight;this.skipFirstNotification=true;this.pageDisplayUri="https://verdocs-public-assets.s3.amazonaws.com/page-loading-placeholder.png"}async componentWillLoad(){this.pageDisplayUri=await d(this.endpoint,this.documentId,this.pageNumber,this.type)}componentDidLoad(){this.resizeObserver=new ResizeObserver(r((e=>{for(const o of e){const e=o.contentRect.width;this.renderedWidth=e;this.renderedHeight=this.virtualHeight*(e/this.virtualWidth)}this.notifyRenderedSize()}),100));this.resizeObserver.observe(this.container)}disconnectedCallback(){var e;(e=this.resizeObserver)===null||e===void 0?void 0:e.disconnect()}notifyRenderedSize(){if(this.skipFirstNotification){this.skipFirstNotification=false;return}this.pageRendered.emit({containerId:this.containerId,documentId:this.documentId,pageNumber:this.pageNumber,virtualWidth:this.virtualWidth,virtualHeight:this.virtualHeight,renderedWidth:this.renderedWidth,renderedHeight:this.renderedHeight,naturalWidth:this.naturalWidth,naturalHeight:this.naturalHeight,aspectRatio:this.aspectRatio,xScale:this.renderedWidth/this.virtualWidth,yScale:this.renderedHeight/this.virtualHeight})}render(){const e=`${this.renderedHeight}px`;return t(i,{key:"633b71e22df815319ad854618b74b035a6e43603",id:`${this.containerId}`,style:{height:e,flex:`0 0 ${e}`}},this.layers.map((o=>o.type==="div"?t("div",{class:"verdocs-envelope-document-page-layer",id:`${this.containerId}-${o.name}`,style:{height:e}}):this.pageDisplayUri?t("img",{class:"verdocs-envelope-document-page-layer img",id:`${this.containerId}-${o.name}`,src:this.pageDisplayUri,alt:`Page ${this.pageNumber}`,"aria-hidden":true,loading:"lazy",onLoad:e=>{this.naturalWidth=e.target.naturalWidth;this.naturalHeight=e.target.naturalHeight;this.aspectRatio=this.naturalWidth/this.naturalHeight;this.virtualHeight=this.virtualWidth/this.aspectRatio;this.renderedHeight=e.target.offsetWidth/this.aspectRatio}}):t("div",null))))}get container(){return n(this)}};w.style=x;const k='verdocs-question-dialog{top:0;left:0;right:0;bottom:0;position:fixed;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", "Barlow", sans-serif}verdocs-question-dialog.closed{display:none}verdocs-question-dialog textarea{-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #707ae5;border-radius:4px;background:#ffffff;color:#000;width:100%;font-size:14px;padding:9px;outline:none}verdocs-question-dialog .heading .title{font-size:18px}verdocs-question-dialog .buttons{gap:20px;display:-ms-flexbox;display:flex;margin-top:24px;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-question-dialog .buttons button{-ms-flex:1;flex:1;border:0;height:38px;display:-ms-flexbox;display:flex;color:#ffffff;font-size:14px;cursor:pointer;border-radius:6px;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-question-dialog .buttons button.cancel{background-color:#654dcb}verdocs-question-dialog .buttons button.ok{background-color:#55bc81}verdocs-question-dialog .buttons button.ok.single{max-width:150px}verdocs-question-dialog .buttons button:disabled{background-color:#6c727f}';const m=`<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10.4809 13.8423H15.4C16.2962 13.8423 17 13.1288 17 12.2764V5.56582C17 4.71348 16.2962 4 15.4 4H4.6C3.70383 4 3 4.71348 3 5.56582V12.2764C3 13.1288 3.70383 13.8423 4.6 13.8423H6.19908L6.2 17L6.20346 16.9997L6.20502 16.9988L10.4809 13.8423ZM6.79895 17.8034C6.35668 18.1298 5.73 18.0406 5.39921 17.6042C5.26989 17.4335 5.2 17.2262 5.2 17.0133L5.19937 14.8423H4.6C3.16406 14.8423 2 13.6935 2 12.2764V5.56582C2 4.14876 3.16406 3 4.6 3H15.4C16.8359 3 18 4.14876 18 5.56582V12.2764C18 13.6935 16.8359 14.8423 15.4 14.8423H10.81L6.79895 17.8034Z" fill="#ffffff"/></svg>`;const y=class{constructor(t){e(this,t);this.next=o(this,"next");this.exit=o(this,"exit");this.question="";this.closed=false}handleOk(){this.next.emit({question:this.question})}handleCancel(){this.exit.emit()}handleDismiss(e){this.closed=true;if(e.target.className==="background-overlay"){e.preventDefault();this.exit.emit()}}render(){return t("verdocs-dialog",{key:"d0e85744fa9901d1be794cd59f4c9b87922e6e91",onExit:e=>this.handleDismiss(e)},t("div",{key:"6d7ead703cdf217588ac98d2ac93a35644838b78",slot:"heading",class:"heading"},t("div",{key:"d07c6155fc98f51204a51add33d82afec7592c4b",class:"icon",innerHTML:m}),t("div",{key:"e9698d0aa4b24db343afd149adee95d9c3c0a52a",class:"title"},"Ask the Sender a Question")),t("div",{key:"cdef7a2b00c4c66e1748733e3c614e39ad456192",slot:"content",class:"content"},t("textarea",{key:"81c88e1d61be54e7ba80c9101fb71bf903df8d1c",name:"question",rows:6,placeholder:"Enter your question...",onInput:e=>this.question=e.target.value},this.question)),t("div",{key:"a7d5a31362337e6c80c0ac5b2c6471efbacb9a23",class:"footer",slot:"footer"},t("div",{key:"71ae8344f053cfd94dc6befed76933fe67f490d1",class:"buttons"},t("button",{key:"04aec379b7b4f21885f72ed2016b10ac26730476",class:"cancel",onClick:()=>this.handleCancel()},"Cancel"),t("button",{key:"6e6e8bb27367c9a1167a49519da299d9ce9ee983",class:"ok",onClick:()=>this.handleOk()},"OK"))))}};y.style=k;const C='verdocs-sign-footer {\n left: 0;\n right: 0;\n bottom: 0;\n height: 48px;\n display: -ms-flexbox;\n display: flex;\n color: #616161;\n position: fixed;\n font-size: 12px;\n padding: 0 24px;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-direction: row;\n flex-direction: row;\n background: #ffffff;\n container-type: inline-size;\n border-top: 1px solid #e0e0e0;\n -ms-flex-pack: justify;\n justify-content: space-between;\n font-family: var(--verdocs-primary-font, "Inter", "Barlow", sans-serif);\n -webkit-transition: 0.5s cubic-bezier(0.35, 0, 0.25, 1);\n transition: 0.5s cubic-bezier(0.35, 0, 0.25, 1);\n}\nverdocs-sign-footer a {\n color: #616161;\n cursor: pointer;\n text-decoration: none;\n border-bottom: 1px dotted #616161;\n}\nverdocs-sign-footer.loading {\n display: none;\n}\nverdocs-sign-footer .powered-by {\n white-space: nowrap;\n}\nverdocs-sign-footer .buttons {\n -ms-flex: 0;\n flex: 0;\n gap: 16px;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: row;\n flex-direction: row;\n white-space: nowrap;\n -ms-flex-align: center;\n align-items: center;\n}\nverdocs-sign-footer .buttons button {\n gap: 4px;\n border: none;\n display: -ms-flexbox;\n display: flex;\n outline: none;\n cursor: pointer;\n -ms-flex-direction: row;\n flex-direction: row;\n -ms-flex-align: center;\n align-items: center;\n background: transparent;\n}\nverdocs-sign-footer .buttons div {\n gap: 4px;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: row;\n flex-direction: row;\n -ms-flex-align: center;\n align-items: center;\n}\nverdocs-sign-footer .links {\n -ms-flex: 0;\n flex: 0;\n gap: 8px;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: row;\n flex-direction: row;\n white-space: nowrap;\n}\nverdocs-sign-footer.just-buttons .buttons {\n -ms-flex: 1;\n flex: 1;\n -ms-flex-pack: center;\n justify-content: center;\n}\n@container (max-width: 720px) {\n verdocs-sign-footer.has-buttons .powered-by {\n display: none;\n }\n}\n@container (max-width: 540px) {\n verdocs-sign-footer.no-buttons .powered-by {\n display: none;\n }\n verdocs-sign-footer.has-buttons .links {\n display: none;\n }\n verdocs-sign-footer .buttons {\n -ms-flex: 1;\n flex: 1;\n -ms-flex-pack: center;\n justify-content: center;\n }\n}';const L=`<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10.4809 13.8423H15.4C16.2962 13.8423 17 13.1288 17 12.2764V5.56582C17 4.71348 16.2962 4 15.4 4H4.6C3.70383 4 3 4.71348 3 5.56582V12.2764C3 13.1288 3.70383 13.8423 4.6 13.8423H6.19908L6.2 17L6.20346 16.9997L6.20502 16.9988L10.4809 13.8423ZM6.79895 17.8034C6.35668 18.1298 5.73 18.0406 5.39921 17.6042C5.26989 17.4335 5.2 17.2262 5.2 17.0133L5.19937 14.8423H4.6C3.16406 14.8423 2 13.6935 2 12.2764V5.56582C2 4.14876 3.16406 3 4.6 3H15.4C16.8359 3 18 4.14876 18 5.56582V12.2764C18 13.6935 16.8359 14.8423 15.4 14.8423H10.81L6.79895 17.8034Z" fill="#424242"/></svg>`;const H=`<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M7.14645 7.14645C7.34171 6.95118 7.65829 6.95118 7.85355 7.14645L10 9.29289L12.1464 7.14645C12.3417 6.95118 12.6583 6.95118 12.8536 7.14645C13.0488 7.34171 13.0488 7.65829 12.8536 7.85355L10.7071 10L12.8536 12.1464C13.0488 12.3417 13.0488 12.6583 12.8536 12.8536C12.6583 13.0488 12.3417 13.0488 12.1464 12.8536L10 10.7071L7.85355 12.8536C7.65829 13.0488 7.34171 13.0488 7.14645 12.8536C6.95118 12.6583 6.95118 12.3417 7.14645 12.1464L9.29289 10L7.14645 7.85355C6.95118 7.65829 6.95118 7.34171 7.14645 7.14645ZM3 6C3 4.34315 4.34315 3 6 3H14C15.6569 3 17 4.34315 17 6V14C17 15.6569 15.6569 17 14 17H6C4.34315 17 3 15.6569 3 14V6ZM6 4C4.89543 4 4 4.89543 4 6V14C4 15.1046 4.89543 16 6 16H14C15.1046 16 16 15.1046 16 14V6C16 4.89543 15.1046 4 14 4H6Z" fill="#424242"/></svg>`;const M=`<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 5C3 3.89543 3.89543 3 5 3H13.3787C13.9091 3 14.4178 3.21071 14.7929 3.58579L16.4142 5.20711C16.7893 5.58218 17 6.09089 17 6.62132V15C17 16.1046 16.1046 17 15 17H5C3.89543 17 3 16.1046 3 15V5ZM5 4C4.44772 4 4 4.44772 4 5V15C4 15.5523 4.44772 16 5 16L5 11.5C5 10.6716 5.67157 10 6.5 10H13.5C14.3284 10 15 10.6716 15 11.5V16C15.5523 16 16 15.5523 16 15V6.62132C16 6.3561 15.8946 6.10175 15.7071 5.91421L14.0858 4.29289C13.8983 4.10536 13.6439 4 13.3787 4L13 4V6.5C13 7.32843 12.3284 8 11.5 8L7.5 8C6.67157 8 6 7.32843 6 6.5L6 4H5ZM7 4L7 6.5C7 6.77614 7.22386 7 7.5 7L11.5 7C11.7761 7 12 6.77614 12 6.5V4L7 4ZM14 16V11.5C14 11.2239 13.7761 11 13.5 11H6.5C6.22386 11 6 11.2239 6 11.5V16H14Z" fill="#424242"/></svg>`;const j=class{constructor(t){e(this,t);this.askQuestion=o(this,"askQuestion");this.decline=o(this,"decline");this.finishLater=o(this,"finishLater");this.sdkError=o(this,"sdkError");this.envelopeListenerId=null;this.endpoint=s.getDefault();this.envelopeId="";this.isDone=false;this.askingQuestion=false;this.declinine=false;this.envelope=null}async componentWillLoad(){var e,o,t;try{if(!this.envelopeId){console.log(`[FOOTER] Missing required envelope ID ${this.envelopeId}`);return}this.listenToEnvelope()}catch(i){console.log("[FOOTER] Error loading envelope",i);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new l(i.message,(o=i.response)===null||o===void 0?void 0:o.status,(t=i.response)===null||t===void 0?void 0:t.data))}}disconnectedCallback(){this.unlistenToEnvelope()}async listenToEnvelope(){console.log("[FOOTER] Loading envelope",this.envelopeId);this.unlistenToEnvelope();c.subscribe("envelopes",this.envelopeId,(()=>a(this.endpoint,this.envelopeId)),false,(e=>{this.envelope=e}))}unlistenToEnvelope(){if(this.envelopeListenerId){c.store.delListener(this.envelopeListenerId);this.envelopeListenerId=null}}render(){var e,o,n,s,d,a,r,l,c,f,h,p,b,v,u,g,x,w,k,m,y,C,j,V;const z=!!((o=(e=this.envelope)===null||e===void 0?void 0:e.organization)===null||o===void 0?void 0:o.powered_by_label);const T=!!((s=(n=this.envelope)===null||n===void 0?void 0:n.organization)===null||s===void 0?void 0:s.terms_use_url)||!!((a=(d=this.envelope)===null||d===void 0?void 0:d.organization)===null||a===void 0?void 0:a.privacy_policy_url);const q=!this.isDone;return t(i,{key:"1fc747454660d14e69a4a65cbf71cd81f010d9c3",class:{"has-buttons":q,"no-buttons":!q,"has-powered-by":z,"has-links":T,"just-buttons":!z&&!T}},((l=(r=this.envelope)===null||r===void 0?void 0:r.organization)===null||l===void 0?void 0:l.powered_by_label)&&t("div",{key:"f8cae910df0d2c759af9ee2200aef58b80bb3f37",class:"powered-by"},((f=(c=this.envelope)===null||c===void 0?void 0:c.organization)===null||f===void 0?void 0:f.powered_by_url)?t("a",{href:(p=(h=this.envelope)===null||h===void 0?void 0:h.organization)===null||p===void 0?void 0:p.powered_by_url,target:"_blank",rel:"noopener noreferrer"},t("span",null,(v=(b=this.envelope)===null||b===void 0?void 0:b.organization)===null||v===void 0?void 0:v.powered_by_label)):t("span",null,(g=(u=this.envelope)===null||u===void 0?void 0:u.organization)===null||g===void 0?void 0:g.powered_by_label)),!this.isDone&&t("div",{key:"06bd0f346de34e567cfa2e2e5ae8bf06a8b6a1d9",class:"buttons"},t("button",{key:"bee3e5c2aad8cc60c9b291b14bba2e5eb1ee9c32",onClick:()=>this.askingQuestion=true},t("span",{key:"f42932689a3330a72b61e853d389eac39b2362a3",innerHTML:L}),"Ask Sender a Question"),t("button",{key:"7012513a564bfc6d5a416467843d1056ad5427c8",onClick:()=>{var e;return(e=this.decline)===null||e===void 0?void 0:e.emit()}},t("span",{key:"7e0506798239ec5935d2c98e577e482744e3aa1f",innerHTML:H}),"Decline Signing"),t("button",{key:"3b3765e04da3d7f0749f2cbc24d84f2a3b6edb47",onClick:()=>{var e;return(e=this.finishLater)===null||e===void 0?void 0:e.emit()}},t("span",{key:"0511b44dc272d16fdd2d2d6098f603f651c9bc50",innerHTML:M}),"Finish Later")),t("div",{key:"cbea53ab6d84e268e1750bb0fec9f846040bd4ad",class:"links"},((w=(x=this.envelope)===null||x===void 0?void 0:x.organization)===null||w===void 0?void 0:w.terms_use_url)&&t("a",{key:"45628f09eaf2105226ab8b906e20e787de1e28ff",href:(m=(k=this.envelope)===null||k===void 0?void 0:k.organization)===null||m===void 0?void 0:m.terms_use_url,target:"_blank",rel:"noopener noreferrer"},t("span",{key:"08dc74860f84fb34c64a21c5409571998e5ce217"},"Terms of Use")),((C=(y=this.envelope)===null||y===void 0?void 0:y.organization)===null||C===void 0?void 0:C.privacy_policy_url)&&t("a",{key:"c3cc1fb07f7de02108762611c5b69206218e4b59",href:(V=(j=this.envelope)===null||j===void 0?void 0:j.organization)===null||V===void 0?void 0:V.privacy_policy_url,target:"_blank",rel:"noopener noreferrer"},t("span",{key:"c4bc436c7f7213bc0af61859ef27d8c41e331884"},"Privacy Policy"))),this.askingQuestion&&t("verdocs-question-dialog",{key:"93380ca89c21673f72c53e4d4f941b7d35c0079e",onNext:e=>{var o;(o=this.askQuestion)===null||o===void 0?void 0:o.emit({question:e.detail.question});this.askingQuestion=false},onExit:()=>this.askingQuestion=false}))}};j.style=C;export{g as verdocs_download_dialog,w as verdocs_envelope_document_page,y as verdocs_question_dialog,j as verdocs_sign_footer};
|
|
2
|
+
//# sourceMappingURL=p-39aeb4d9.entry.js.map
|