@verdocs/web-sdk 5.0.12 → 5.0.13
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/verdocs-preview_6.cjs.entry.js +14 -7
- package/dist/collection/components/embeds/verdocs-send/verdocs-send.js +13 -6
- package/dist/collection/components/templates/verdocs-template-roles/verdocs-template-roles.js +1 -3
- package/dist/components/{p-0689fc47.js → p-022b87d3.js} +14 -7
- package/dist/components/{p-a60453aa.js → p-56e4effa.js} +1 -1
- package/dist/components/verdocs-build.js +2 -2
- package/dist/components/verdocs-send.js +1 -1
- package/dist/components/verdocs-template-roles.js +1 -1
- package/dist/esm/verdocs-preview_6.entry.js +15 -8
- package/dist/esm-es5/verdocs-preview_6.entry.js +2 -2
- package/dist/verdocs-web-sdk/p-bf0b5dbc.entry.js +8 -0
- package/dist/verdocs-web-sdk/p-e2b70dfb.system.js +1 -1
- package/dist/verdocs-web-sdk/{p-2b7edf3a.system.entry.js → p-e77c1fcc.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +1 -1
- package/dist/verdocs-web-sdk/p-94ffe928.entry.js +0 -8
@@ -0,0 +1,8 @@
|
|
1
|
+
import{r as e,c as t,h as i,H as o,F as s,g as n}from"./p-b9654a5e.js";import{VerdocsEndpoint as l,getTemplate as r,integerSequence as a,getOrganizationContacts as d,isValidEmail as c,createEnvelope as h,formatFullName as u,getRGBA as p,createTemplateDocument as v,deleteTemplateDocument as m,updateField as f,createField as g,updateTemplateRole as b,createTemplateRole as x}from"@verdocs/js-sdk";import{S as w}from"./p-fd97809c.js";import{S as y}from"./p-58d027d1.js";import{V as k}from"./p-04c07b7b.js";import{D as E,P as S,J as q,a as C,F as M,b as T,T as I}from"./p-b0766439.js";import{f as L}from"./p-12bab948.js";import{i as H}from"./p-a901dff2.js";import{b as Z,c as D,d as z,g as O,e as _,f as N}from"./p-0c45b79c.js";import"./p-85aa8e05.js";import"./p-c7ee88c7.js";const V=class{constructor(i){e(this,i),this.sdkError=t(this,"sdkError",7),this.templateListenerId=null,this.endpoint=l.getDefault(),this.templateId=null,this.loading=!0,this.template=null}disconnectedCallback(){this.unlistenToTemplate()}async listenToTemplate(){this.unlistenToTemplate(),y.subscribe("templates",this.templateId,(()=>r(this.endpoint,this.templateId)),!1,(e=>{this.template=e,this.loading=!1}))}unlistenToTemplate(){this.templateListenerId&&(y.store.delListener(this.templateListenerId),this.templateListenerId=null)}onTemplateIdChanged(e){console.log("[PREVIEW] Template ID changed",e),this.listenToTemplate()}async componentWillLoad(){var e,t,i;try{if(this.endpoint.loadSession(),!this.endpoint.session)return void console.log("[PREVIEW] Unable to start builder session, must be authenticated");if(!this.templateId)return void console.log(`[PREVIEW] Missing required template ID ${this.templateId}`);this.listenToTemplate()}catch(o){console.log("[PREVIEW] Error with preview session",o),null===(e=this.sdkError)||void 0===e||e.emit(new w(o.message,null===(t=o.response)||void 0===t?void 0:t.status,null===(i=o.response)||void 0===i?void 0:i.data))}}handlePageRendered(e){}render(){var e;return i(o,null,this.loading?i("verdocs-loader",null):((null===(e=this.template)||void 0===e?void 0:e.documents)||[]).map((e=>{const t=a(1,e.pages);return i(s,null,t.map((t=>{var o;const s=(null===(o=e.page_sizes)||void 0===o?void 0:o[t])||{width:612,height:792};return i("verdocs-template-document-page",{templateId:e.template_id,documentId:e.id,pageNumber:t,disabled:!0,editable:!1,done:!1,virtualWidth:s.width,virtualHeight:s.height,onPageRendered:e=>this.handlePageRendered(e),layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))})))}static get watchers(){return{templateId:["onTemplateIdChanged"]}}};V.style='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-preview{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;position:relative;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-preview div,verdocs-preview canvas{-webkit-box-sizing:border-box;box-sizing:border-box}';const A=e=>((null==e?void 0:e.roles)||[]).map((e=>e.name)),R=class{constructor(i){e(this,i),this.sendingEnvelope=t(this,"sendingEnvelope",7),this.send=t(this,"send",7),this.exit=t(this,"exit",7),this.sdkError=t(this,"sdkError",7),this.searchContacts=t(this,"searchContacts",7),this.templateListenerId=null,this.endpoint=l.getDefault(),this.templateId=null,this.environment="",this.containerId=`verdocs-send-${Math.random().toString(36).substring(2,11)}`,this.showPickerForId="",this.sessionContacts=[],this.sending=!1,this.rolesCompleted={},this.loading=!0,this.template=null}disconnectedCallback(){this.unlistenToTemplate()}async listenToTemplate(){console.log("[SEND] Loading template",this.templateId),this.unlistenToTemplate(),y.subscribe("templates",this.templateId,(()=>r(this.endpoint,this.templateId)),!1,(e=>{this.template=e,this.loading=!1,this.rolesCompleted={},this.recomputeRolesCompleted()}))}unlistenToTemplate(){this.templateListenerId&&(y.store.delListener(this.templateListenerId),this.templateListenerId=null)}async reset(){this.rolesCompleted={}}onTemplateIdChanged(e){console.log("[SEND] Template ID changed",e),this.listenToTemplate()}async componentWillLoad(){var e,t,i;try{if(this.endpoint.onSessionChanged(((e,t,i)=>{if(!i)return;const o={id:i.id,first_name:i.first_name,last_name:i.last_name,email:i.email,phone:i.phone};i&&(this.sessionContacts=[o],d(this.endpoint).then((e=>{console.log("[SEND] Got contacts",e),this.sessionContacts=[...e,o]})).catch((e=>{console.log("[SEND] Error getting contacts",e)})))})),this.endpoint.loadSession(),!this.endpoint.session)return void console.log("[SEND] Unable to start Send operation, must be authenticated");if(!this.templateId)return void console.log(`[SEND] Missing required template ID ${this.templateId}`);this.listenToTemplate()}catch(o){console.log("[SEND] Error with send session",o),null===(e=this.sdkError)||void 0===e||e.emit(new w(o.message,null===(t=o.response)||void 0===t?void 0:t.status,null===(i=o.response)||void 0===i?void 0:i.data))}}recomputeRolesCompleted(){var e;this.rolesCompleted={};const t={};((null===(e=this.template)||void 0===e?void 0:e.roles)||[]).forEach((e=>{const i=e.sequence-1;t[i]||(t[i]=[]);const o=`r-${i}-${t[i].length}`;t[i].push({...e,id:o,role_name:e.name,first_name:e.first_name,last_name:e.last_name}),e.first_name&&c(e.email)&&(this.rolesCompleted[o]={...e,id:o,role_name:e.name,first_name:e.first_name,last_name:e.last_name})}))}getLevels(){var e;const t=[...new Set(((null===(e=this.template)||void 0===e?void 0:e.roles)||[]).map((e=>e.sequence-1)))];return t.sort(((e,t)=>e-t)),t}getRolesAtLevel(e){var t;const i=((null===(t=this.template)||void 0===t?void 0:t.roles)||[]).filter((t=>t.sequence-1===e)).map(((t,i)=>({...t,id:`r-${e}-${i}`,role_name:t.name,first_name:t.first_name,last_name:t.last_name})));return i}getLevelIcon(e){const t=this.getLevels();return i("div",e<0?{class:"level-icon",innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z"></path></svg>'}:e>=t.length?{class:"level-icon",innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="m18 7-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41 6 19l1.41-1.41L1.83 12 .41 13.41z"></path></svg>'}:{class:"level-icon",innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></svg>'})}handleSelectContact(e,t){e.preventDefault(),this.rolesCompleted[t.id]={...t,...e.detail},this.showPickerForId=""}handleClickRole(e,t){e.stopPropagation(),this.showPickerForId=t.id}handleSend(e){var t,i;if(this.sending)return void console.log("[SEND] Skipping duplicate send",e);console.log("[SEND] Sending",e),e.preventDefault(),e.stopPropagation(),this.sending=!0,null===(t=this.sendingEnvelope)||void 0===t||t.emit({sending:!0});const o={template_id:this.templateId,name:(null===(i=this.template)||void 0===i?void 0:i.name)||"New Envelope",environment:this.environment,initial_reminder:0,followup_reminders:0,recipients:Object.values(this.rolesCompleted),fields:[]};console.log("[SEND] Creating envelope",o),h(this.endpoint,o).then((e=>{var t,i;console.log("[SEND] Send envelope",e),this.reset().catch((e=>console.log("Unknown Error",e))),this.sending=!1,null===(t=this.sendingEnvelope)||void 0===t||t.emit({sending:!1}),null===(i=this.send)||void 0===i||i.emit({...o,name:o.name,envelope_id:e.id,envelope:e})})).catch((e=>{var t,i,o;console.log("Send error",e),k((null===(i=null===(t=e.response)||void 0===t?void 0:t.data)||void 0===i?void 0:i.error)||"Error creating envelope, please try again later."),this.sending=!1,null===(o=this.sendingEnvelope)||void 0===o||o.emit({sending:!1})}))}handleCancel(e){var t;e.stopPropagation(),null===(t=this.exit)||void 0===t||t.emit()}render(){var e;if(this.loading)return i(o,null,i("verdocs-loader",null));if(!this.endpoint.session)return i(o,{style:{display:"flex"}},i("verdocs-component-error",{message:"You must be authenticated to use this module."}));const t=this.getLevels(),s=Object.values(this.rolesCompleted).filter((e=>c(e.email)&&e.first_name&&e.last_name)),n=s.length>=A(this.template).length;return i(o,{class:{sendable:null===(e=this.template)||void 0===e?void 0:e.is_sendable}},i("div",{class:"recipients"},i("div",{class:"left-line"}),i("div",{class:"level level-start"},this.getLevelIcon(-1),i("div",{class:"complete"},"Send Envelope")),t.map((e=>i("div",{class:`level level-${e}`},this.getLevelIcon(e),this.getRolesAtLevel(e).map((e=>{var t,o,n;const l=!e.email||!e.first_name||!e.last_name,r=(null===(t=this.rolesCompleted[e.id])||void 0===t?void 0:t.first_name)?u(this.rolesCompleted[e.id]):l?e.role_name:u(e),a=`verdocs-send-recipient-${e.role_name}`,d=(c=e.role_name,Math.max(A(this.template).findIndex((e=>e===c)),0));var c;const h={backgroundColor:p(d),border:s.findIndex((t=>t.role_name===e.role_name))>-1?"2px solid #55bc81":"2px solid #dddddd"};return i("div",{class:"recipient","data-ri":d,"data-rn":e.role_name,style:h,onClick:t=>this.handleClickRole(t,e),id:a},r,i("div",{class:"icon",innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"></path></svg>'}),l?this.showPickerForId===e.id&&i("verdocs-portal",{anchor:a,onClickAway:()=>this.showPickerForId=""},i("verdocs-contact-picker",{onExit:()=>this.showPickerForId="",onNext:t=>this.handleSelectContact(t,e),contactSuggestions:this.sessionContacts,templateRole:null!==(o=this.rolesCompleted[e.id])&&void 0!==o?o:e,onSearchContacts:e=>{var t;return null===(t=this.searchContacts)||void 0===t?void 0:t.emit(e.detail)}})):this.showPickerForId===e.id&&i("verdocs-portal",{anchor:a,onClickAway:()=>this.showPickerForId=""},i("verdocs-contact-picker",{onExit:()=>this.showPickerForId="",onNext:t=>this.handleSelectContact(t,e),contactSuggestions:this.sessionContacts,templateRole:null!==(n=this.rolesCompleted[e.id])&&void 0!==n?n:e,onSearchContacts:e=>{var t;return null===(t=this.searchContacts)||void 0===t?void 0:t.emit(e.detail)}})))}))))),i("div",{class:"level level-done"},this.getLevelIcon(t.length),i("div",{class:"complete"},"Signing Complete"))),i("div",{class:"buttons"},i("verdocs-button",{label:"Cancel",size:"small",variant:"outline",onClick:e=>this.handleCancel(e),disabled:this.sending}),i("verdocs-button",{label:"Send",size:"small",disabled:!n||this.sending,onClick:e=>this.handleSend(e)}),this.sending&&i("verdocs-spinner",null)))}static get watchers(){return{templateId:["onTemplateIdChanged"]}}};R.style='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-send{padding:10px;position:relative;background:#ffffff;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-send.sendable{display:-ms-flexbox;display:flex}verdocs-send .recipients{position:relative}verdocs-send .left-line{top:32px;left:20px;z-index:1;width:12px;bottom:30px;position:absolute;background:#ffffff;border-left:3px dotted #9b9b9b}verdocs-send .level{display:-ms-flexbox;display:flex;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;margin-left:50px;position:relative;-ms-flex-direction:row;flex-direction:row;padding:8px 0 4px 0;border-bottom:1px solid rgba(151, 151, 151, 0.2666666667)}verdocs-send .level .level-icon{top:14px;z-index:2;left:-40px;width:24px;height:24px;position:absolute;background:#ffffff}verdocs-send .level .level-icon svg{fill:rgba(0, 0, 0, 0.537254902)}verdocs-send .level .recipient{height:30px;display:-ms-flexbox;display:flex;-ms-flex:0 0 30px;flex:0 0 30px;color:#000000;cursor:pointer;font-size:14px;-ms-flex-align:center;align-items:center;border-radius:30px;-ms-flex-direction:row;flex-direction:row;background:#dddddd;white-space:nowrap;border:2px solid #dddddd;padding:2px 10px 2px 14px}verdocs-send .level .recipient .icon{width:22px;height:22px;-ms-flex:0 0 22px;flex:0 0 22px;margin:0 0 0 10px}verdocs-send .level .recipient .icon svg{width:22px;height:22px;fill:#333333;outline:none}verdocs-send .level .complete{-ms-flex:1;flex:1;height:30px;display:-ms-flexbox;display:flex;color:#000000;font-size:14px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:3px 10px 3px 2px}verdocs-send .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-direction:row;flex-direction:row}verdocs-send verdocs-contact-picker{left:0;top:41px;z-index:10;position:absolute;border:1px solid #dddddd;-webkit-box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1);box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1)}';const j=class{constructor(i){e(this,i),this.exit=t(this,"exit",7),this.next=t(this,"next",7),this.templateUpdated=t(this,"templateUpdated",7),this.sdkError=t(this,"sdkError",7),this.templateListenerId=null,this.endpoint=l.getDefault(),this.templateId="",this.uploading=!1,this.progressLabel="Uploading...",this.progressPercent=0,this.showDeleteError=!1,this.confirmDeleteDocument=null,this.loading=!0,this.template=null}async componentWillLoad(){var e,t,i;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[ROLES] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[ROLES] Unable to start builder session, must be authenticated");this.listenToTemplate()}catch(o){console.log("[TEMPLATE ATTACHMENTS] Error loading template",o),null===(e=this.sdkError)||void 0===e||e.emit(new w(o.message,null===(t=o.response)||void 0===t?void 0:t.status,null===(i=o.response)||void 0===i?void 0:i.data))}}disconnectedCallback(){this.unlistenToTemplate()}async listenToTemplate(){this.unlistenToTemplate(),y.subscribe("templates",this.templateId,(()=>r(this.endpoint,this.templateId)),!1,(e=>{this.template=e,this.loading=!1}))}unlistenToTemplate(){this.templateListenerId&&(y.store.delListener(this.templateListenerId),this.templateListenerId=null)}handleCancel(e){e.stopPropagation(),this.exit.emit()}handleUploadProgress(e){e>=99?(this.progressPercent=100,this.progressLabel="Processing..."):this.progressPercent=e}async handleUpload(e){var t,i,o,s;e.stopPropagation();const n=e.detail.file;if(n){console.log("[ATTACHMENTS] Uploading...",n),this.uploading=!0,this.progressLabel="Uploading...";try{const e=await v(this.endpoint,this.templateId,n,this.handleUploadProgress.bind(this));console.log("[ATTACHMENTS] Created attachment",e),this.template=await y.getTemplate(this.endpoint,this.templateId,!0),console.log("[ATTACHMENTS] Updated template",this.template),null===(t=this.templateUpdated)||void 0===t||t.emit({endpoint:this.endpoint,template:this.template,event:"attachments"}),this.uploading=!1,this.progressLabel="",this.progressPercent=0}catch(e){console.log("[ATTACHMENTS] Error creating template",e),null===(i=this.sdkError)||void 0===i||i.emit(new w(e.message,null===(o=e.response)||void 0===o?void 0:o.status,null===(s=e.response)||void 0===s?void 0:s.data)),this.uploading=!1}}}handleNext(e){var t;e.stopPropagation(),this.uploading=!1,this.progressLabel="",this.progressPercent=0,null===(t=this.next)||void 0===t||t.emit({template:this.template})}async confirmDelete(){await m(this.endpoint,this.templateId,this.confirmDeleteDocument.id),this.template=await y.getTemplate(this.endpoint,this.templateId,!0),console.log("[ATTACHMENTS] New template",this.template),this.confirmDeleteDocument=null}async handleDelete(e){var t;((null===(t=this.template)||void 0===t?void 0:t.documents)||[]).length>1?this.confirmDeleteDocument=e:this.showDeleteError=!0}getFileIcon(e){switch(e.mime){case"application/pdf":return C;case"image/jpeg":return q;case"image/png":return S;case"application/msword":case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return E}return M}render(){var e,t;return this.endpoint.session?this.loading?i(o,{class:"loading"},i("verdocs-loader",null)):this.endpoint.session&&this.template?i(o,null,i("h5",null,"Existing Attachments"),i("div",{class:"attachments"},((null===(e=this.template)||void 0===e?void 0:e.documents)||[]).map((e=>i("div",{class:"attachment"},i("div",{class:"file-icon",innerHTML:this.getFileIcon(e)}),i("div",{class:"filename",title:e.name},e.name),i("div",{class:"pages"},i("div",{class:"count"},e.pages),i("div",{class:"pages-icon",innerHTML:T})),i("div",{class:"trash-icon",innerHTML:I,onClick:()=>this.handleDelete(e)}))))),i("h5",null,"Attach a New Document"),this.uploading?i("div",{class:"loader-wrapper"},i("verdocs-loader",null),this.progressLabel&&i("div",{class:"progress-wrapper"},i("verdocs-progress-bar",{showPercent:!0,percent:this.progressPercent,label:this.progressLabel}))):i("verdocs-file-chooser",{onFileSelected:e=>this.handleUpload(e)}),i("div",{class:"buttons"},i("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:e=>this.handleCancel(e),disabled:this.uploading}),i("verdocs-button",{label:"Next",size:"small",onClick:e=>this.handleNext(e),disabled:!((null===(t=this.template)||void 0===t?void 0:t.documents)||[]).length||this.uploading})),this.showDeleteError&&i("verdocs-ok-dialog",{heading:"Unable to Delete Attachment",message:"Templates must contain at least one attachment.",onNext:()=>this.showDeleteError=!1}),this.confirmDeleteDocument&&i("verdocs-ok-dialog",{heading:"Delete this Attachment?",message:"This operation cannot be undone. All fields placed<br />on the deleted attachment will also be removed.",onNext:()=>this.confirmDelete(),showCancel:!0,onExit:()=>{this.confirmDeleteDocument=null}})):i(o,{class:"empty"}):i(o,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}};j.style='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-template-attachments{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-attachments h5{font-size:16px;font-weight:bold;margin:0 0 10px 0;color:#46497d}verdocs-template-attachments .attachments{margin:0 0 40px 0}verdocs-template-attachments .attachment{display:-ms-flexbox;display:flex;padding:5px 0;-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;color:#33364b}verdocs-template-attachments .attachment:hover .trash-icon{display:-ms-flexbox;display:flex}verdocs-template-attachments .attachment:hover .pages{display:none}verdocs-template-attachments svg{width:28px;height:28px;fill:#5c6575;margin:2px 0 0 0}verdocs-template-attachments .file-icon{-ms-flex:0;flex:0}verdocs-template-attachments .pages{width:24px;height:24px;-ms-flex:0 0 24px;flex:0 0 24px;padding-left:4px;position:relative;margin:-10px 0 0 0}verdocs-template-attachments .pages .pages-icon{top:0;left:0;width:24px;height:24px;position:absolute}verdocs-template-attachments .pages .count{top:11px;left:7px;z-index:1;width:18px;font-size:12px;font-weight:500;position:absolute;text-align:center;letter-spacing:-2px}verdocs-template-attachments .filename{-ms-flex:1;flex:1;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;border-bottom:1px dotted #cccccc}verdocs-template-attachments .trash-icon{-ms-flex:0;flex:0;display:none}verdocs-template-attachments .trash-icon:hover{cursor:pointer}verdocs-template-attachments verdocs-file-chooser{margin:10px 0;border:2px dashed #979797}verdocs-template-attachments .loader-wrapper{background-color:#ffffff;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;width:320px;height:320px;text-align:center;border:2px dashed #979797;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-attachments .progress-wrapper{padding:20px}verdocs-template-attachments .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-attachments .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-attachments ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::-moz-placeholder{color:#aaaaaa}verdocs-template-attachments :-ms-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::placeholder{color:#aaaaaa}';const U=["attachments","roles","settings","fields","preview"],B=class{constructor(i){e(this,i),this.sdkError=t(this,"sdkError",7),this.stepChanged=t(this,"stepChanged",7),this.templateListenerId=null,this.endpoint=l.getDefault(),this.templateId=null,this.step="preview",this.loading=!0,this.template=null}disconnectedCallback(){this.unlistenToTemplate()}async listenToTemplate(){this.unlistenToTemplate(),y.subscribe("templates",this.templateId,(()=>r(this.endpoint,this.templateId)),!1,(e=>{this.template=e,this.loading=!1}))}unlistenToTemplate(){this.templateListenerId&&(y.store.delListener(this.templateListenerId),this.templateListenerId=null)}onTemplateIdChanged(e){console.log("[BUILD_TABS] Template ID changed",e),this.listenToTemplate()}onStepChanged(e){console.log("[BUILD_TABS] Step changed",e)}async componentWillLoad(){var e,t,i;try{if(this.endpoint.loadSession(),!this.endpoint.session)return void console.log("[BUILD_TABS] Unable to start builder session, must be authenticated");if(!this.templateId)return this.step="attachments",void console.log("[BUILD_TABS] Missing required template ID, forcing view to attachments");this.listenToTemplate()}catch(o){console.log("[BUILD_TABS] Error loading template",o),null===(e=this.sdkError)||void 0===e||e.emit(new w(o.message,null===(t=o.response)||void 0===t?void 0:t.status,null===(i=o.response)||void 0===i?void 0:i.data))}}setStep(e){var t;console.log("[BUILD_TABS] Selected step",e.detail.tab.id),e.stopPropagation(),e.preventDefault(),this.step=e.detail.tab.id,null===(t=this.stepChanged)||void 0===t||t.emit(e.detail.tab.id)}copyTemplateId(){navigator.clipboard.writeText(this.templateId).then((()=>{k("Template ID copied",{style:"success",duration:3e3})})).catch((e=>{var t;console.warn("[BUILD_TABS] Error copying to clipboard",e),null===(t=this.sdkError)||void 0===t||t.emit(e)}))}render(){var e,t,s,n,l,r,a,d,c;if(this.loading)return i(o,null,i("verdocs-loader",null));if(!this.endpoint.session)return i(o,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}));const h=((null===(e=this.template)||void 0===e?void 0:e.documents)||[]).length>0;let u=h&&((null===(t=this.template)||void 0===t?void 0:t.roles)||[]).length>0;const p=u&&((null===(s=this.template)||void 0===s?void 0:s.fields)||[]).length>0;let v=Math.max(U.indexOf(this.step),0);return!p&&v>=4&&(v=3),!u&&v>=3&&(v=1),!h&&v>=1&&(v=0),i(o,null,i("verdocs-tabs",{onSelectTab:e=>this.setStep(e),selectedTab:v,tabs:[{id:"attachments",disabled:!1,label:"Attachment(s)"},{id:"roles",disabled:!h,label:"Roles"},{id:"settings",disabled:!u,label:"Settings"},{id:"fields",disabled:!u,label:"Fields"},{id:"preview",disabled:!p,label:"Preview/Send"}]}),this.templateId&&i("div",{class:"info"},i("verdocs-button-panel",{icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" fill="#5c6575"><path d="M11.925 18q.55 0 .938-.387.387-.388.387-.938 0-.55-.387-.925-.388-.375-.938-.375-.55 0-.925.375t-.375.925q0 .55.375.938.375.387.925.387Zm-.95-3.85h1.95q0-.8.2-1.287.2-.488 1.025-1.288.65-.625 1.025-1.213.375-.587.375-1.437 0-1.425-1.025-2.175Q13.5 6 12.1 6q-1.425 0-2.35.775t-1.275 1.85l1.775.7q.125-.45.55-.975.425-.525 1.275-.525.725 0 1.1.412.375.413.375.888 0 .475-.287.9-.288.425-.713.775-1.075.95-1.325 1.475-.25.525-.25 1.875ZM12 22.2q-2.125 0-3.988-.8-1.862-.8-3.237-2.175Q3.4 17.85 2.6 15.988 1.8 14.125 1.8 12t.8-3.988q.8-1.862 2.175-3.237Q6.15 3.4 8.012 2.6 9.875 1.8 12 1.8t3.988.8q1.862.8 3.237 2.175Q20.6 6.15 21.4 8.012q.8 1.863.8 3.988t-.8 3.988q-.8 1.862-2.175 3.237Q17.85 20.6 15.988 21.4q-1.863.8-3.988.8Zm0-2.275q3.325 0 5.625-2.3t2.3-5.625q0-3.325-2.3-5.625T12 4.075q-3.325 0-5.625 2.3T4.075 12q0 3.325 2.3 5.625t5.625 2.3ZM12 12Z"/></svg>'},i("div",{class:"template-details-panel"},i("h6",null,"Template Details"),i("div",{class:"row"},i("label",null,"ID:"),i("div",{class:"value"},this.templateId),i("div",{class:"icon-button",innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M15.75 17.25v3.375c0 .621-.504 1.125-1.125 1.125h-9.75a1.125 1.125 0 0 1-1.125-1.125V7.875c0-.621.504-1.125 1.125-1.125H6.75a9.06 9.06 0 0 1 1.5.124m7.5 10.376h3.375c.621 0 1.125-.504 1.125-1.125V11.25c0-4.46-3.243-8.161-7.5-8.876a9.06 9.06 0 0 0-1.5-.124H9.375c-.621 0-1.125.504-1.125 1.125v3.5m7.5 10.375H9.375a1.125 1.125 0 0 1-1.125-1.125v-9.25m12 6.625v-1.875a3.375 3.375 0 0 0-3.375-3.375h-1.5a1.125 1.125 0 0 1-1.125-1.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H9.75" /></svg>',onClick:()=>this.copyTemplateId()})),i("div",{class:"row"},i("label",null,"Name:"),i("div",{class:"value"},null===(n=this.template)||void 0===n?void 0:n.name)),i("div",{class:"row"},i("label",null,"Visibility:"),i("div",{class:"value"},(null===(l=this.template)||void 0===l?void 0:l.is_public)?"Public":(null===(r=this.template)||void 0===r?void 0:r.is_personal)?"Private":"Shared")),i("div",{class:"row"},i("label",null,"Created:"),i("div",{class:"value"},(null===(a=this.template)||void 0===a?void 0:a.counter)?L(new Date(null===(d=this.template)||void 0===d?void 0:d.created_at),"P p"):"")),i("div",{class:"row"},i("label",null,"Used:"),i("div",{class:"value"},null===(c=this.template)||void 0===c?void 0:c.counter," time(s)"))))))}static get watchers(){return{templateId:["onTemplateIdChanged"],step:["onStepChanged"]}}};B.style='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-template-build-tabs{-ms-flex:1;flex:1;gap:15px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-build-tabs verdocs-button-panel svg{-webkit-transform:scale(0.8);transform:scale(0.8)}verdocs-template-build-tabs verdocs-template-attachments,verdocs-template-build-tabs verdocs-template-roles{margin:20px}verdocs-template-build-tabs verdocs-template-fields{border-top:1px solid #777777}verdocs-template-build-tabs verdocs-template-attachments{padding:20px;background:#ffffff}verdocs-template-build-tabs verdocs-template-fields{width:100%}verdocs-template-build-tabs verdocs-preview{-ms-flex:1;flex:1}.template-details-panel .row{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:8px;margin:10px 0}.template-details-panel label{-ms-flex:0 0 70px;flex:0 0 70px}.template-details-panel .value{-ms-flex:1;flex:1;font-weight:300;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.template-details-panel .icon-button{cursor:pointer;opacity:0.8;-ms-flex:0;flex:0;width:18px;height:18px}.template-details-panel .icon-button svg{stroke:#000000;width:18px;height:18px}.template-details-panel .icon-button:hover{opacity:1}';const P='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14.707 14.707"><g><rect x="6.275" y="0" fill="#ffffff7f" width="1" height="15"/></g></svg>',$=[{id:"signature",tooltip:"Signature",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z"/></svg>',class:"signature"},{id:"initial",tooltip:"Initials",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z"/></svg>',class:"initial"},{id:"sep1",tooltip:"",icon:P,class:"separator"},{id:"textbox",tooltip:"Text Box",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M3.425 16.15V13h11.15v3.15Zm0-5.15V7.85h17.15V11Z"/></svg>',class:"textbox"},{id:"checkbox",tooltip:"Check Box",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z"/></svg>',class:"checkbox"},{id:"radio",tooltip:"Radio Button",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M12 17q2.075 0 3.538-1.463Q17 14.075 17 12t-1.462-3.538Q14.075 7 12 7 9.925 7 8.463 8.462 7 9.925 7 12q0 2.075 1.463 3.537Q9.925 17 12 17Zm0 5.85q-2.275 0-4.25-.85t-3.438-2.312Q2.85 18.225 2 16.25q-.85-1.975-.85-4.25T2 7.75q.85-1.975 2.312-3.438Q5.775 2.85 7.75 2q1.975-.85 4.25-.85t4.25.85q1.975.85 3.438 2.312Q21.15 5.775 22 7.75q.85 1.975.85 4.25T22 16.25q-.85 1.975-2.312 3.438Q18.225 21.15 16.25 22q-1.975.85-4.25.85Zm0-3.15q3.25 0 5.475-2.225Q19.7 15.25 19.7 12q0-3.25-2.225-5.475Q15.25 4.3 12 4.3q-3.25 0-5.475 2.225Q4.3 8.75 4.3 12q0 3.25 2.225 5.475Q8.75 19.7 12 19.7Zm0-7.7Z"/></svg>',class:"radio"},{id:"dropdown",tooltip:"Dropdown",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" stroke-width="1.5" stroke="currentColor"><path stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" d="M3 4.5h14.25M3 9h9.75M3 13.5h9.75m4.5-4.5v12m0 0l-3.75-3.75M17.25 21L21 17.25" /></svg>',class:"dropdown"},{id:"sep2",tooltip:"",icon:P,class:"separator"},{id:"date",tooltip:"Date",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M7.6 13.925q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375ZM5.3 22.85q-1.325 0-2.238-.912-.912-.913-.912-2.238V6.3q0-1.325.912-2.238.913-.912 2.238-.912H6v-2h2.575v2h6.85v-2H18v2h.7q1.325 0 2.238.912.912.913.912 2.238v13.4q0 1.325-.912 2.238-.913.912-2.238.912Zm0-3.15h13.4V10H5.3v9.7ZM5.3 8h13.4V6.3H5.3Zm0 0V6.3 8Z"/></svg>',class:"date"},{id:"timestamp",tooltip:"Timestamp",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M9 1h6v2H9zm10.03 6.39 1.42-1.42c-.43-.51-.9-.99-1.41-1.41l-1.42 1.42C16.07 4.74 14.12 4 12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9 9-4.03 9-9c0-2.12-.74-4.07-1.97-5.61zM13 14h-2V8h2v6z"></path></svg>',class:"timestamp"},{id:"attachment",tooltip:"Attachment",icon:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6"><path stroke-linecap="round" stroke-linejoin="round" d="m18.375 12.739-7.693 7.693a4.5 4.5 0 0 1-6.364-6.364l10.94-10.94A3 3 0 1 1 19.5 7.372L8.552 18.32m.009-.01-.01.01m5.699-9.941-7.81 7.81a1.5 1.5 0 0 0 2.112 2.13" /></svg>',class:"attachment"}],F=class{constructor(i){e(this,i),this.sdkError=t(this,"sdkError",7),this.templateUpdated=t(this,"templateUpdated",7),this.fieldsUpdated=t(this,"fieldsUpdated",7),this.templateListenerId=null,this.pageHeights={},this.cachedPageInfo={},this.endpoint=l.getDefault(),this.templateId=null,this.toolbarTargetId=null,this.placing=null,this.showMustSelectRole=!1,this.selectedRoleName="",this.loading=!0,this.template=null}onTemplateIdChanged(){this.listenToTemplate()}handleKeyDown(e){"Escape"===e.key&&(this.placing=null)}async componentWillLoad(){var e,t,i;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[FIELDS] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[FIELDS] Unable to start builder session, must be authenticated");this.listenToTemplate()}catch(o){console.log("[FIELDS] Error with fields session",o),null===(e=this.sdkError)||void 0===e||e.emit(new w(o.message,null===(t=o.response)||void 0===t?void 0:t.status,null===(i=o.response)||void 0===i?void 0:i.data))}}componentDidRender(){H.dynamicDrop(!0);const e=this.toolbarTargetId?document.getElementById(this.toolbarTargetId):null,t=document.getElementById("verdocs-template-fields-toolbar");e&&t&&(console.log("[FIELDS] Moving toolbar"),t.remove(),e.append(t))}componentWillUpdate(){var e,t;const i=(null===(e=this.template)||void 0===e?void 0:e.roles)||[];this.selectedRoleName&&i.find((e=>e&&e.name===this.selectedRoleName))||(this.selectedRoleName=(null===(t=i[0])||void 0===t?void 0:t.name)||"",console.log("[FIELDS] Selected new role",this.selectedRoleName))}disconnectedCallback(){this.unlistenToTemplate()}async listenToTemplate(){this.unlistenToTemplate(),y.subscribe("templates",this.templateId,(()=>r(this.endpoint,this.templateId)),!1,(e=>{var t,i;this.template=e,this.loading=!1,this.selectedRoleName=(null===(i=null===(t=e.roles)||void 0===t?void 0:t[0])||void 0===i?void 0:i.name)||""}))}unlistenToTemplate(){this.templateListenerId&&(y.store.delListener(this.templateListenerId),this.templateListenerId=null)}attachFieldAttributes(e,t,i){i.addEventListener("settingsChanged",(()=>{var e;null===(e=this.templateUpdated)||void 0===e||e.emit({endpoint:this.endpoint,template:this.template,event:"added-field"})})),i.addEventListener("deleted",(()=>{var e;i.remove(),null===(e=this.templateUpdated)||void 0===e||e.emit({endpoint:this.endpoint,template:this.template,event:"updated-field"})})),i.setAttribute("templateid",this.templateId),i.setAttribute("fieldname",t.name),i.setAttribute("pageNumber",String(e.pageNumber)),i.setAttribute("xScale",String(e.xScale)),i.setAttribute("yScale",String(e.yScale)),i.setAttribute("name",t.name)}handlePageRendered(e){var t;const i=e.detail;this.cachedPageInfo[i.pageNumber]=i,this.pageHeights[i.pageNumber]=i.naturalHeight,((null===(t=this.template)||void 0===t?void 0:t.fields)||[]).filter((e=>e&&e.page===i.pageNumber)).forEach((e=>{const t=O(e),i=document.getElementById(t);i&&(i.setAttribute("fieldname",e.name),i.setAttribute("pagenumber",String(e.page)),this.makeDraggable(i))}))}makeDraggable(e){H(e).draggable({listeners:{move:this.handleMoveField.bind(this),end:this.handleMoveEnd.bind(this)}})}async handleMoveField(e){const t=+(e.target.getAttribute("posX")||0),i=+(e.target.getAttribute("posY")||0),o=+(e.target.getAttribute("xScale")||1),s=+(e.target.getAttribute("yScale")||1),n=e.dx/o+t,l=e.dy/s+i;e.target.setAttribute("posX",n),e.target.setAttribute("posy",l),Z(e.target,"translate",`${n}px, ${l}px`)}async handleMoveEnd(e){var t,i,o,s,n,l,r,a;const d=e.target.getAttribute("fieldname"),c=((null===(t=this.template)||void 0===t?void 0:t.fields)||[]).find((e=>e.name===d));if(!c)return void console.log("[FIELDS] Unable to find field",d,e.target);const h=e.target.getAttribute("pagenumber");let{naturalWidth:u=612,naturalHeight:p=792,renderedHeight:v=792}=this.cachedPageInfo[h];const m=e.target.getBoundingClientRect(),g=e.target.parentElement.getBoundingClientRect(),b=c.width||_(c.type),x=c.height||N(c.type),E=Math.max(m.left-g.left,0);let S=Math.max(v-(g.bottom-m.bottom),0),q=parseInt(h);S>v?(q=Math.min(q+1,(null===(s=null===(o=(null===(i=this.template)||void 0===i?void 0:i.documents)||[])||void 0===o?void 0:o[0])||void 0===s?void 0:s.pages)||1),S-=v,v=this.cachedPageInfo[q].renderedHeight,console.log("Next page",{newPageNumber:q,newY:S,renderedHeight:v})):S<0&&(q=Math.max(q-1,1),v=this.cachedPageInfo[q].renderedHeight,S+=v,console.log("[FIELDS] Next page",{newPageNumber:q,newY:S,renderedHeight:v}));const{x:C,y:M}=this.viewCoordinatesToPageCoordinates(E,S,h,u-b,p-x);try{const t={x:C,y:M,page:q},i=await f(this.endpoint,this.templateId,d,t);console.log("[FIELDS] Updated",i);const o=JSON.parse(JSON.stringify(this.template)),s=o.fields.findIndex((e=>e.name===d));s>-1&&(o.fields[s]=i),y.updateTemplate(this.templateId,o),e.target.removeAttribute("posX"),e.target.removeAttribute("posY"),D(e.target);const{xScale:l=1,yScale:r=1}=this.cachedPageInfo[h];z(e.target,i,l,r),null===(n=this.templateUpdated)||void 0===n||n.emit({endpoint:this.endpoint,template:o,event:"updated-field"})}catch(t){k("Error updating field, please try again later",{style:"error"}),console.log("[FIELDS] Error updating field",t),null===(l=this.sdkError)||void 0===l||l.emit(new w(t.message,null===(r=t.response)||void 0===r?void 0:r.status,null===(a=t.response)||void 0===a?void 0:a.data)),e.target.removeAttribute("posX"),e.target.removeAttribute("posY"),D(e.target)}}generateFieldName(e,t){var i;let o,s=1;do{o=`${e}P${t}-${s}`,s++}while(((null===(i=this.template)||void 0===i?void 0:i.fields)||[]).some((e=>e&&e.name===o)));return o}viewCoordinatesToPageCoordinates(e,t,i,o,s){const{xScale:n=1,yScale:l=1,renderedHeight:r=792}=this.cachedPageInfo[i];return{x:Math.floor(Math.min(e/n,o)),y:Math.floor(Math.min(Math.max(r-t,0)/l,s))}}async handleClickPage(e,t){var i;if(this.placing){const o=e.offsetX,s=e.offsetY,n=_(this.placing),l=N(this.placing),r=this.cachedPageInfo[t],{naturalWidth:a=612,naturalHeight:d=792}=r,c=this.viewCoordinatesToPageCoordinates(o,s,t,a-n,d-l),h=Math.floor(c.x),u=Math.floor(c.y),p={name:this.generateFieldName(this.placing,t),role_name:this.selectedRoleName,template_id:this.templateId,document_id:r.documentId,type:this.placing,required:"radio"!==this.placing,page:t,validator:null,label:null,default:null,placeholder:null,group:null,settings:{},x:h,y:u,width:n,height:l,multiline:!1,options:"radio"===this.placing?[{id:"option-1",label:"Option 1"}]:[]};console.log("[FIELDS] Will save new field",p);const v=await g(this.endpoint,this.templateId,p);console.log("[FIELDS] Saved field",v);const m=JSON.parse(JSON.stringify(this.template));m.fields.push(v),y.updateTemplate(this.templateId,m),null===(i=this.templateUpdated)||void 0===i||i.emit({endpoint:this.endpoint,template:m,event:"added-field"}),this.placing=null}}render(){var e,t,s;if(this.loading)return i(o,null,i("verdocs-loader",null));if(!this.endpoint.session)return i(o,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}));const n=((null===(e=this.template)||void 0===e?void 0:e.roles)||[]).map((e=>({value:e.name,label:e.full_name?`${e.name}: ${e.full_name}`:e.name})));return i(o,{class:this.placing?{[`placing-${this.placing}`]:!0}:{},onSubmit:()=>{}},i("div",{id:"verdocs-template-fields-toolbar"},i("div",{class:"add-for"},"Add field:"),i("verdocs-select-input",{value:this.selectedRoleName,options:n,onInput:e=>this.selectedRoleName=e.target.value}),$.map((e=>i("verdocs-toolbar-icon",{text:e.tooltip,icon:e.icon,class:e.class,onClick:()=>{e.tooltip&&(this.selectedRoleName?this.placing=e.id:this.showMustSelectRole=!0)}})))),i("div",{class:"pages"},((null===(t=this.template)||void 0===t?void 0:t.documents)||[]).map((e=>a(1,e.pages).map((t=>{const o=e.page_sizes[t];return i("verdocs-template-document-page",{templateId:this.templateId,documentId:e.id,pageNumber:t,virtualWidth:(null==o?void 0:o.width)||612,virtualHeight:(null==o?void 0:o.height)||792,disabled:!0,editable:!0,done:!1,onClick:e=>this.handleClickPage(e,t),onPageRendered:e=>this.handlePageRendered(e),layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})}))))),this.showMustSelectRole&&i("verdocs-ok-dialog",{heading:"Unable to add field",message:((null===(s=this.template)||void 0===s?void 0:s.roles)||[]).length>0?"Please select a role before adding fields.":"Please add at least one role before adding fields.",onNext:()=>this.showMustSelectRole=!1}))}static get watchers(){return{templateId:["onTemplateIdChanged"]}}};
|
2
|
+
/**!
|
3
|
+
* Sortable 1.15.6
|
4
|
+
* @author RubaXa <trash@rubaxa.org>
|
5
|
+
* @author owenm <owen23355@gmail.com>
|
6
|
+
* @license MIT
|
7
|
+
*/
|
8
|
+
function Q(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function W(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(i),!0).forEach((function(t){J(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Q(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function Y(e){return Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Y(e)}function J(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function X(){return X=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(e[o]=i[o])}return e},X.apply(this,arguments)}function G(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}F.style="@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-template-fields{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;position:relative;display:block;min-height:600px}verdocs-template-fields .page-0{padding:65px 15px 0 15px;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-fields .page-0 .user-placed-fields{height:100px;position:relative;background:#ffffff;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294)}verdocs-template-fields .page-0 .user-placed-fields .title{top:0;left:0;color:#ffffff;font-size:12px;padding:3px 6px;font-weight:bold;position:absolute;background:#46497d}verdocs-template-fields .pages{display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;position:relative;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-template-fields .pages div,verdocs-template-fields .pages canvas{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-fields #verdocs-template-fields-toolbar{width:100%;height:50px;display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;font-weight:700;padding:0 20px 0 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#f5f5fa;-ms-flex-pack:center;justify-content:center;background:#46497d}verdocs-template-fields #verdocs-template-fields-toolbar>verdocs-select-input{margin:0}verdocs-template-fields #verdocs-template-fields-toolbar svg{width:24px;height:24px}verdocs-template-fields #verdocs-template-fields-toolbar .add-for{margin:0;font-weight:500;color:#f5f5fa}verdocs-template-fields #verdocs-template-fields-toolbar verdocs-select-input{margin:0 20px 0 0}@media all and (max-width: 1000px){verdocs-template-fields #verdocs-template-fields-toolbar{-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;padding:0 10px 0 0}verdocs-template-fields #verdocs-template-fields-toolbar svg{-webkit-transform:scale(0.8);transform:scale(0.8)}verdocs-template-fields #verdocs-template-fields-toolbar .add-for,verdocs-template-fields #verdocs-template-fields-toolbar verdocs-select-input{display:none}}@media all and (max-width: 600px){verdocs-template-fields #verdocs-template-fields-toolbar{-webkit-column-gap:6px;-moz-column-gap:6px;column-gap:6px}verdocs-template-fields #verdocs-template-fields-toolbar svg{-webkit-transform:scale(0.6);transform:scale(0.6)}verdocs-template-fields #verdocs-template-fields-toolbar .separator,verdocs-template-fields #verdocs-template-fields-toolbar .add-for,verdocs-template-fields #verdocs-template-fields-toolbar verdocs-select-input{display:none}}verdocs-template-fields.placing-attachment{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-checkbox{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-date{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath fill='%23000000' d='M7.6 13.925q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375ZM5.3 22.85q-1.325 0-2.238-.912-.912-.913-.912-2.238V6.3q0-1.325.912-2.238.913-.912 2.238-.912H6v-2h2.575v2h6.85v-2H18v2h.7q1.325 0 2.238.912.912.913.912 2.238v13.4q0 1.325-.912 2.238-.913.912-2.238.912Zm0-3.15h13.4V10H5.3v9.7ZM5.3 8h13.4V6.3H5.3Zm0 0V6.3 8Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-dropdown{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24' stroke-width='1.5' stroke='currentColor'%3E%3Cpath stroke='%23000000' stroke-linecap='round' stroke-linejoin='round' d='M3 4.5h14.25M3 9h9.75M3 13.5h9.75m4.5-4.5v12m0 0l-3.75-3.75M17.25 21L21 17.25' /%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-initial{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-payment{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-radio{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M12 17q2.075 0 3.538-1.463Q17 14.075 17 12t-1.462-3.538Q14.075 7 12 7 9.925 7 8.463 8.462 7 9.925 7 12q0 2.075 1.463 3.537Q9.925 17 12 17Zm0 5.85q-2.275 0-4.25-.85t-3.438-2.312Q2.85 18.225 2 16.25q-.85-1.975-.85-4.25T2 7.75q.85-1.975 2.312-3.438Q5.775 2.85 7.75 2q1.975-.85 4.25-.85t4.25.85q1.975.85 3.438 2.312Q21.15 5.775 22 7.75q.85 1.975.85 4.25T22 16.25q-.85 1.975-2.312 3.438Q18.225 21.15 16.25 22q-1.975.85-4.25.85Zm0-3.15q3.25 0 5.475-2.225Q19.7 15.25 19.7 12q0-3.25-2.225-5.475Q15.25 4.3 12 4.3q-3.25 0-5.475 2.225Q4.3 8.75 4.3 12q0 3.25 2.225 5.475Q8.75 19.7 12 19.7Zm0-7.7Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-signature{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-textarea{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M3.225 20.725v-3.15h11.55v3.15Zm0-4.775V12.8h17.55v3.15Zm0-4.75V8.05h17.55v3.15Zm0-4.775v-3.15h17.55v3.15Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-textbox{cursor:url(\"data:image/svg+xml,%3Csvg width='32' height='15' viewBox='0 0 32 15' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cmask id='path-1-inside-1_1401_24' fill='white'%3E%3Cpath d='M0 0H32V15H0V0Z'/%3E%3C/mask%3E%3Cpath d='M0 0H32V15H0V0Z' fill='%234C56CB' fill-opacity='0.1'/%3E%3Cpath d='M0 0V-1H-1V0H0ZM0 15H-1V16H0V15ZM0 1H32V-1H0V1ZM32 14H0V16H32V14ZM1 15V0H-1V15H1Z' fill='%234C56CB' mask='url(%23path-1-inside-1_1401_24)'/%3E%3Cpath d='M3 11.8V8.65H14.15V11.8H3ZM3 6.65V3.5H20.15V6.65H3Z' fill='%234C56CB'/%3E%3Cline x1='31.5' y1='1' x2='31.5' y2='14' stroke='%234C56CB' stroke-opacity='0.32' stroke-dasharray='1 1'/%3E%3C/svg%3E%0A\") 0 14, pointer}verdocs-template-fields.placing-timestamp{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath fill='%23000000' d='M9 1h6v2H9zm10.03 6.39 1.42-1.42c-.43-.51-.9-.99-1.41-1.41l-1.42 1.42C16.07 4.74 14.12 4 12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9 9-4.03 9-9c0-2.12-.74-4.07-1.97-5.61zM13 14h-2V8h2v6z'%3E%3C/path%3E%3C/svg%3E\") 16 16, pointer}";var K=G(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),ee=G(/Edge/i),te=G(/firefox/i),ie=G(/safari/i)&&!G(/chrome/i)&&!G(/android/i),oe=G(/iP(ad|od|hone)/i),se=G(/chrome/i)&&G(/android/i),ne={capture:!1,passive:!1};function le(e,t,i){e.addEventListener(t,i,!K&&ne)}function re(e,t,i){e.removeEventListener(t,i,!K&&ne)}function ae(e,t){if(t){if(">"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(e){return!1}return!1}}function de(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function ce(e,t,i,o){if(e){i=i||document;do{if(null!=t&&(">"===t[0]?e.parentNode===i&&ae(e,t):ae(e,t))||o&&e===i)return e;if(e===i)break}while(e=de(e))}return null}var he,ue=/\s+/g;function pe(e,t,i){if(e&&t)if(e.classList)e.classList[i?"add":"remove"](t);else{var o=(" "+e.className+" ").replace(ue," ").replace(" "+t+" "," ");e.className=(o+(i?" "+t:"")).replace(ue," ")}}function ve(e,t,i){var o=e&&e.style;if(o){if(void 0===i)return document.defaultView&&document.defaultView.getComputedStyle?i=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(i=e.currentStyle),void 0===t?i:i[t];t in o||-1!==t.indexOf("webkit")||(t="-webkit-"+t),o[t]=i+("string"==typeof i?"":"px")}}function me(e,t){var i="";if("string"==typeof e)i=e;else do{var o=ve(e,"transform");o&&"none"!==o&&(i=o+" "+i)}while(!t&&(e=e.parentNode));var s=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return s&&new s(i)}function fe(e,t,i){if(e){var o=e.getElementsByTagName(t),s=0,n=o.length;if(i)for(;s<n;s++)i(o[s],s);return o}return[]}function ge(){return document.scrollingElement||document.documentElement}function be(e,t,i,o,s){if(e.getBoundingClientRect||e===window){var n,l,r,a,d,c,h;if(e!==window&&e.parentNode&&e!==ge()?(l=(n=e.getBoundingClientRect()).top,r=n.left,a=n.bottom,d=n.right,c=n.height,h=n.width):(l=0,r=0,a=window.innerHeight,d=window.innerWidth,c=window.innerHeight,h=window.innerWidth),(t||i)&&e!==window&&(s=s||e.parentNode,!K))do{if(s&&s.getBoundingClientRect&&("none"!==ve(s,"transform")||i&&"static"!==ve(s,"position"))){var u=s.getBoundingClientRect();l-=u.top+parseInt(ve(s,"border-top-width")),r-=u.left+parseInt(ve(s,"border-left-width")),a=l+n.height,d=r+n.width;break}}while(s=s.parentNode);if(o&&e!==window){var p=me(s||e),v=p&&p.a,m=p&&p.d;p&&(a=(l/=m)+(c/=m),d=(r/=v)+(h/=v))}return{top:l,left:r,bottom:a,right:d,width:h,height:c}}}function xe(e,t,i){for(var o=Se(e,!0),s=be(e)[t];o;){var n=be(o)[i];if(!("top"===i||"left"===i?s>=n:s<=n))return o;if(o===ge())break;o=Se(o,!1)}return!1}function we(e,t,i,o){for(var s=0,n=0,l=e.children;n<l.length;){if("none"!==l[n].style.display&&l[n]!==Mt.ghost&&(o||l[n]!==Mt.dragged)&&ce(l[n],i.draggable,e,!1)){if(s===t)return l[n];s++}n++}return null}function ye(e,t){for(var i=e.lastElementChild;i&&(i===Mt.ghost||"none"===ve(i,"display")||t&&!ae(i,t));)i=i.previousElementSibling;return i||null}function ke(e,t){var i=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)"TEMPLATE"===e.nodeName.toUpperCase()||e===Mt.clone||t&&!ae(e,t)||i++;return i}function Ee(e){var t=0,i=0,o=ge();if(e)do{var s=me(e);t+=e.scrollLeft*s.a,i+=e.scrollTop*s.d}while(e!==o&&(e=e.parentNode));return[t,i]}function Se(e,t){if(!e||!e.getBoundingClientRect)return ge();var i=e,o=!1;do{if(i.clientWidth<i.scrollWidth||i.clientHeight<i.scrollHeight){var s=ve(i);if(i.clientWidth<i.scrollWidth&&("auto"==s.overflowX||"scroll"==s.overflowX)||i.clientHeight<i.scrollHeight&&("auto"==s.overflowY||"scroll"==s.overflowY)){if(!i.getBoundingClientRect||i===document.body)return ge();if(o||t)return i;o=!0}}}while(i=i.parentNode);return ge()}function qe(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}function Ce(e,t){return function(){if(!he){var i=arguments;1===i.length?e.call(this,i[0]):e.apply(this,i),he=setTimeout((function(){he=void 0}),t)}}}function Me(e,t,i){e.scrollLeft+=t,e.scrollTop+=i}function Te(e){var t=window.Polymer,i=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):i?i(e).clone(!0)[0]:e.cloneNode(!0)}function Ie(e,t,i){var o={};return Array.from(e.children).forEach((function(s){var n,l,r,a;if(ce(s,t.draggable,e,!1)&&!s.animated&&s!==i){var d=be(s);o.left=Math.min(null!==(n=o.left)&&void 0!==n?n:1/0,d.left),o.top=Math.min(null!==(l=o.top)&&void 0!==l?l:1/0,d.top),o.right=Math.max(null!==(r=o.right)&&void 0!==r?r:-1/0,d.right),o.bottom=Math.max(null!==(a=o.bottom)&&void 0!==a?a:-1/0,d.bottom)}})),o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}var Le="Sortable"+(new Date).getTime();var He=[],Ze={initializeByDefault:!0},De={mount:function(e){for(var t in Ze)Ze.hasOwnProperty(t)&&!(t in e)&&(e[t]=Ze[t]);He.forEach((function(t){if(t.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")})),He.push(e)},pluginEvent:function(e,t,i){var o=this;this.eventCanceled=!1,i.cancel=function(){o.eventCanceled=!0};var s=e+"Global";He.forEach((function(o){t[o.pluginName]&&(t[o.pluginName][s]&&t[o.pluginName][s](W({sortable:t},i)),t.options[o.pluginName]&&t[o.pluginName][e]&&t[o.pluginName][e](W({sortable:t},i)))}))},initializePlugins:function(e,t,i){for(var o in He.forEach((function(o){var s=o.pluginName;if(e.options[s]||o.initializeByDefault){var n=new o(e,t,e.options);n.sortable=e,n.options=e.options,e[s]=n,X(i,n.defaults)}})),e.options)if(e.options.hasOwnProperty(o)){var s=this.modifyOption(e,o,e.options[o]);void 0!==s&&(e.options[o]=s)}},getEventProperties:function(e,t){var i={};return He.forEach((function(o){"function"==typeof o.eventProperties&&X(i,o.eventProperties.call(t[o.pluginName],e))})),i},modifyOption:function(e,t,i){var o;return He.forEach((function(s){e[s.pluginName]&&s.optionListeners&&"function"==typeof s.optionListeners[t]&&(o=s.optionListeners[t].call(e[s.pluginName],i))})),o}},ze=["evt"],Oe=function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=i.evt,s=function(e,t){if(null==e)return{};var i,o,s=function(e,t){if(null==e)return{};var i,o,s={},n=Object.keys(e);for(o=0;o<n.length;o++)t.indexOf(i=n[o])>=0||(s[i]=e[i]);return s}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(o=0;o<n.length;o++)t.indexOf(i=n[o])>=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(s[i]=e[i])}return s}(i,ze);De.pluginEvent.bind(Mt)(e,t,W({dragEl:Ne,parentEl:Ve,ghostEl:Ae,rootEl:Re,nextEl:je,lastDownEl:Ue,cloneEl:Be,cloneHidden:Pe,dragStarted:ot,putSortable:Je,activeSortable:Mt.active,originalEvent:o,oldIndex:$e,oldDraggableIndex:Qe,newIndex:Fe,newDraggableIndex:We,hideGhostForTarget:Et,unhideGhostForTarget:St,cloneNowHidden:function(){Pe=!0},cloneNowShown:function(){Pe=!1},dispatchSortableEvent:function(e){_e({sortable:t,name:e,originalEvent:o})}},s))};function _e(e){!function(e){var t=e.sortable,i=e.rootEl,o=e.name,s=e.targetEl,n=e.cloneEl,l=e.toEl,r=e.fromEl,a=e.oldIndex,d=e.newIndex,c=e.oldDraggableIndex,h=e.newDraggableIndex,u=e.originalEvent,p=e.putSortable,v=e.extraEventProperties;if(t=t||i&&i[Le]){var m,f=t.options,g="on"+o.charAt(0).toUpperCase()+o.substr(1);!window.CustomEvent||K||ee?(m=document.createEvent("Event")).initEvent(o,!0,!0):m=new CustomEvent(o,{bubbles:!0,cancelable:!0}),m.to=l||i,m.from=r||i,m.item=s||i,m.clone=n,m.oldIndex=a,m.newIndex=d,m.oldDraggableIndex=c,m.newDraggableIndex=h,m.originalEvent=u,m.pullMode=p?p.lastPutMode:void 0;var b=W(W({},v),De.getEventProperties(o,t));for(var x in b)m[x]=b[x];i&&i.dispatchEvent(m),f[g]&&f[g].call(t,m)}}(W({putSortable:Je,cloneEl:Be,targetEl:Ne,rootEl:Re,oldIndex:$e,oldDraggableIndex:Qe,newIndex:Fe,newDraggableIndex:We},e))}var Ne,Ve,Ae,Re,je,Ue,Be,Pe,$e,Fe,Qe,We,Ye,Je,Xe,Ge,Ke,et,tt,it,ot,st,nt,lt,rt,at=!1,dt=!1,ct=[],ht=!1,ut=!1,pt=[],vt=!1,mt=[],ft="undefined"!=typeof document,gt=oe,bt=ee||K?"cssFloat":"float",xt=ft&&!se&&!oe&&"draggable"in document.createElement("div"),wt=function(){if(ft){if(K)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),yt=function(e,t){var i=ve(e),o=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),s=we(e,0,t),n=we(e,1,t),l=s&&ve(s),r=n&&ve(n),a=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+be(s).width,d=r&&parseInt(r.marginLeft)+parseInt(r.marginRight)+be(n).width;return"flex"===i.display?"column"===i.flexDirection||"column-reverse"===i.flexDirection?"vertical":"horizontal":"grid"===i.display?i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal":s&&l.float&&"none"!==l.float?!n||"both"!==r.clear&&r.clear!==("left"===l.float?"left":"right")?"horizontal":"vertical":s&&("block"===l.display||"flex"===l.display||"table"===l.display||"grid"===l.display||a>=o&&"none"===i[bt]||n&&"none"===i[bt]&&a+d>o)?"vertical":"horizontal"},kt=function(e){function t(e,i){return function(o,s,n,l){if(null==e&&(i||o.options.group.name&&s.options.group.name&&o.options.group.name===s.options.group.name))return!0;if(null==e||!1===e)return!1;if(i&&"clone"===e)return e;if("function"==typeof e)return t(e(o,s,n,l),i)(o,s,n,l);var r=(i?o:s).options.group.name;return!0===e||"string"==typeof e&&e===r||e.join&&e.indexOf(r)>-1}}var i={},o=e.group;o&&"object"==Y(o)||(o={name:o}),i.name=o.name,i.checkPull=t(o.pull,!0),i.checkPut=t(o.put),i.revertClone=o.revertClone,e.group=i},Et=function(){!wt&&Ae&&ve(Ae,"display","none")},St=function(){!wt&&Ae&&ve(Ae,"display","")};ft&&!se&&document.addEventListener("click",(function(e){if(dt)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),dt=!1,!1}),!0);var qt=function(e){if(Ne){var t=(s=(e=e.touches?e.touches[0]:e).clientX,n=e.clientY,ct.some((function(e){var t=e[Le].options.emptyInsertThreshold;if(t&&!ye(e)){var i=be(e);return s>=i.left-t&&s<=i.right+t&&n>=i.top-t&&n<=i.bottom+t?l=e:void 0}})),l);if(t){var i={};for(var o in e)e.hasOwnProperty(o)&&(i[o]=e[o]);i.target=i.rootEl=t,i.preventDefault=void 0,i.stopPropagation=void 0,t[Le]._onDragOver(i)}}var s,n,l},Ct=function(e){Ne&&Ne.parentNode[Le]._isOutsideThisEl(e.target)};function Mt(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=X({},t),e[Le]=this;var i,o,s={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return yt(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Mt.supportPointer&&"PointerEvent"in window&&(!ie||oe),emptyInsertThreshold:5};for(var n in De.initializePlugins(this,e,s),s)!(n in t)&&(t[n]=s[n]);for(var l in kt(t),this)"_"===l.charAt(0)&&"function"==typeof this[l]&&(this[l]=this[l].bind(this));this.nativeDraggable=!t.forceFallback&&xt,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?le(e,"pointerdown",this._onTapStart):(le(e,"mousedown",this._onTapStart),le(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(le(e,"dragover",this),le(e,"dragenter",this)),ct.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),X(this,(o=[],{captureAnimationState:function(){o=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(e){if("none"!==ve(e,"display")&&e!==Mt.ghost){o.push({target:e,rect:be(e)});var t=W({},o[o.length-1].rect);if(e.thisAnimationDuration){var i=me(e,!0);i&&(t.top-=i.f,t.left-=i.e)}e.fromRect=t}}))},addAnimationState:function(e){o.push(e)},removeAnimationState:function(e){o.splice(function(e,t){for(var i in e)if(e.hasOwnProperty(i))for(var o in t)if(t.hasOwnProperty(o)&&t[o]===e[i][o])return Number(i);return-1}(o,{target:e}),1)},animateAll:function(e){var t=this;if(!this.options.animation)return clearTimeout(i),void("function"==typeof e&&e());var s=!1,n=0;o.forEach((function(e){var i=0,o=e.target,l=o.fromRect,r=be(o),a=o.prevFromRect,d=o.prevToRect,c=e.rect,h=me(o,!0);h&&(r.top-=h.f,r.left-=h.e),o.toRect=r,o.thisAnimationDuration&&qe(a,r)&&!qe(l,r)&&(c.top-r.top)/(c.left-r.left)==(l.top-r.top)/(l.left-r.left)&&(i=function(e,t,i,o){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-i.top,2)+Math.pow(t.left-i.left,2))*o.animation}(c,a,d,t.options)),qe(r,l)||(o.prevFromRect=l,o.prevToRect=r,i||(i=t.options.animation),t.animate(o,c,r,i)),i&&(s=!0,n=Math.max(n,i),clearTimeout(o.animationResetTimer),o.animationResetTimer=setTimeout((function(){o.animationTime=0,o.prevFromRect=null,o.fromRect=null,o.prevToRect=null,o.thisAnimationDuration=null}),i),o.thisAnimationDuration=i)})),clearTimeout(i),s?i=setTimeout((function(){"function"==typeof e&&e()}),n):"function"==typeof e&&e(),o=[]},animate:function(e,t,i,o){if(o){ve(e,"transition",""),ve(e,"transform","");var s=me(this.el),n=(t.left-i.left)/(s&&s.a||1),l=(t.top-i.top)/(s&&s.d||1);e.animatingX=!!n,e.animatingY=!!l,ve(e,"transform","translate3d("+n+"px,"+l+"px,0)"),this.forRepaintDummy=function(e){return e.offsetWidth}(e),ve(e,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),ve(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout((function(){ve(e,"transition",""),ve(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1}),o)}}}))}function Tt(e,t,i,o,s,n,l,r){var a,d,c=e[Le],h=c.options.onMove;return!window.CustomEvent||K||ee?(a=document.createEvent("Event")).initEvent("move",!0,!0):a=new CustomEvent("move",{bubbles:!0,cancelable:!0}),a.to=t,a.from=e,a.dragged=i,a.draggedRect=o,a.related=s||t,a.relatedRect=n||be(t),a.willInsertAfter=r,a.originalEvent=l,e.dispatchEvent(a),h&&(d=h.call(c,a,l)),d}function It(e){e.draggable=!1}function Lt(){vt=!1}function Ht(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,i=t.length,o=0;i--;)o+=t.charCodeAt(i);return o.toString(36)}function Zt(e){return setTimeout(e,0)}function Dt(e){return clearTimeout(e)}Mt.prototype={constructor:Mt,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(st=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,Ne):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,i=this.el,o=this.options,s=o.preventOnFilter,n=e.type,l=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,r=(l||e).target,a=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||r,d=o.filter;if(function(e){mt.length=0;for(var t=e.getElementsByTagName("input"),i=t.length;i--;){var o=t[i];o.checked&&mt.push(o)}}(i),!Ne&&!(/mousedown|pointerdown/.test(n)&&0!==e.button||o.disabled)&&!a.isContentEditable&&(this.nativeDraggable||!ie||!r||"SELECT"!==r.tagName.toUpperCase())&&!((r=ce(r,o.draggable,i,!1))&&r.animated||Ue===r)){if($e=ke(r),Qe=ke(r,o.draggable),"function"==typeof d){if(d.call(this,e,r,this))return _e({sortable:t,rootEl:a,name:"filter",targetEl:r,toEl:i,fromEl:i}),Oe("filter",t,{evt:e}),void(s&&e.preventDefault())}else if(d&&(d=d.split(",").some((function(o){if(o=ce(a,o.trim(),i,!1))return _e({sortable:t,rootEl:o,name:"filter",targetEl:r,fromEl:i,toEl:i}),Oe("filter",t,{evt:e}),!0}))))return void(s&&e.preventDefault());o.handle&&!ce(a,o.handle,i,!1)||this._prepareDragStart(e,l,r)}}},_prepareDragStart:function(e,t,i){var o,s=this,n=s.el,l=s.options,r=n.ownerDocument;if(i&&!Ne&&i.parentNode===n){var a=be(i);if(Re=n,Ve=(Ne=i).parentNode,je=Ne.nextSibling,Ue=i,Ye=l.group,Mt.dragged=Ne,tt=(Xe={target:Ne,clientX:(t||e).clientX,clientY:(t||e).clientY}).clientX-a.left,it=Xe.clientY-a.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,Ne.style["will-change"]="all",o=function(){Oe("delayEnded",s,{evt:e}),Mt.eventCanceled?s._onDrop():(s._disableDelayedDragEvents(),!te&&s.nativeDraggable&&(Ne.draggable=!0),s._triggerDragStart(e,t),_e({sortable:s,name:"choose",originalEvent:e}),pe(Ne,l.chosenClass,!0))},l.ignore.split(",").forEach((function(e){fe(Ne,e.trim(),It)})),le(r,"dragover",qt),le(r,"mousemove",qt),le(r,"touchmove",qt),l.supportPointer?(le(r,"pointerup",s._onDrop),!this.nativeDraggable&&le(r,"pointercancel",s._onDrop)):(le(r,"mouseup",s._onDrop),le(r,"touchend",s._onDrop),le(r,"touchcancel",s._onDrop)),te&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Ne.draggable=!0),Oe("delayStart",this,{evt:e}),!l.delay||l.delayOnTouchOnly&&!t||this.nativeDraggable&&(ee||K))o();else{if(Mt.eventCanceled)return void this._onDrop();l.supportPointer?(le(r,"pointerup",s._disableDelayedDrag),le(r,"pointercancel",s._disableDelayedDrag)):(le(r,"mouseup",s._disableDelayedDrag),le(r,"touchend",s._disableDelayedDrag),le(r,"touchcancel",s._disableDelayedDrag)),le(r,"mousemove",s._delayedDragTouchMoveHandler),le(r,"touchmove",s._delayedDragTouchMoveHandler),l.supportPointer&&le(r,"pointermove",s._delayedDragTouchMoveHandler),s._dragStartTimer=setTimeout(o,l.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Ne&&It(Ne),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;re(e,"mouseup",this._disableDelayedDrag),re(e,"touchend",this._disableDelayedDrag),re(e,"touchcancel",this._disableDelayedDrag),re(e,"pointerup",this._disableDelayedDrag),re(e,"pointercancel",this._disableDelayedDrag),re(e,"mousemove",this._delayedDragTouchMoveHandler),re(e,"touchmove",this._delayedDragTouchMoveHandler),re(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?le(document,this.options.supportPointer?"pointermove":t?"touchmove":"mousemove",this._onTouchMove):(le(Ne,"dragend",this),le(Re,"dragstart",this._onDragStart));try{document.selection?Zt((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(e,t){if(at=!1,Re&&Ne){Oe("dragStarted",this,{evt:t}),this.nativeDraggable&&le(document,"dragover",Ct);var i=this.options;!e&&pe(Ne,i.dragClass,!1),pe(Ne,i.ghostClass,!0),Mt.active=this,e&&this._appendGhost(),_e({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(Ge){this._lastX=Ge.clientX,this._lastY=Ge.clientY,Et();for(var e=document.elementFromPoint(Ge.clientX,Ge.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(Ge.clientX,Ge.clientY))!==t;)t=e;if(Ne.parentNode[Le]._isOutsideThisEl(e),t)do{if(t[Le]&&t[Le]._onDragOver({clientX:Ge.clientX,clientY:Ge.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break;e=t}while(t=de(t));St()}},_onTouchMove:function(e){if(Xe){var t=this.options,i=t.fallbackTolerance,o=t.fallbackOffset,s=e.touches?e.touches[0]:e,n=Ae&&me(Ae,!0),l=Ae&&n&&n.a,r=Ae&&n&&n.d,a=gt&&rt&&Ee(rt),d=(s.clientX-Xe.clientX+o.x)/(l||1)+(a?a[0]-pt[0]:0)/(l||1),c=(s.clientY-Xe.clientY+o.y)/(r||1)+(a?a[1]-pt[1]:0)/(r||1);if(!Mt.active&&!at){if(i&&Math.max(Math.abs(s.clientX-this._lastX),Math.abs(s.clientY-this._lastY))<i)return;this._onDragStart(e,!0)}if(Ae){n?(n.e+=d-(Ke||0),n.f+=c-(et||0)):n={a:1,b:0,c:0,d:1,e:d,f:c};var h="matrix(".concat(n.a,",").concat(n.b,",").concat(n.c,",").concat(n.d,",").concat(n.e,",").concat(n.f,")");ve(Ae,"webkitTransform",h),ve(Ae,"mozTransform",h),ve(Ae,"msTransform",h),ve(Ae,"transform",h),Ke=d,et=c,Ge=s}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!Ae){var e=this.options.fallbackOnBody?document.body:Re,t=be(Ne,!0,gt,!0,e),i=this.options;if(gt){for(rt=e;"static"===ve(rt,"position")&&"none"===ve(rt,"transform")&&rt!==document;)rt=rt.parentNode;rt!==document.body&&rt!==document.documentElement?(rt===document&&(rt=ge()),t.top+=rt.scrollTop,t.left+=rt.scrollLeft):rt=ge(),pt=Ee(rt)}pe(Ae=Ne.cloneNode(!0),i.ghostClass,!1),pe(Ae,i.fallbackClass,!0),pe(Ae,i.dragClass,!0),ve(Ae,"transition",""),ve(Ae,"transform",""),ve(Ae,"box-sizing","border-box"),ve(Ae,"margin",0),ve(Ae,"top",t.top),ve(Ae,"left",t.left),ve(Ae,"width",t.width),ve(Ae,"height",t.height),ve(Ae,"opacity","0.8"),ve(Ae,"position",gt?"absolute":"fixed"),ve(Ae,"zIndex","100000"),ve(Ae,"pointerEvents","none"),Mt.ghost=Ae,e.appendChild(Ae),ve(Ae,"transform-origin",tt/parseInt(Ae.style.width)*100+"% "+it/parseInt(Ae.style.height)*100+"%")}},_onDragStart:function(e,t){var i=this,o=e.dataTransfer,s=i.options;Oe("dragStart",this,{evt:e}),Mt.eventCanceled?this._onDrop():(Oe("setupClone",this),Mt.eventCanceled||((Be=Te(Ne)).removeAttribute("id"),Be.draggable=!1,Be.style["will-change"]="",this._hideClone(),pe(Be,this.options.chosenClass,!1),Mt.clone=Be),i.cloneId=Zt((function(){Oe("clone",i),Mt.eventCanceled||(i.options.removeCloneOnHide||Re.insertBefore(Be,Ne),i._hideClone(),_e({sortable:i,name:"clone"}))})),!t&&pe(Ne,s.dragClass,!0),t?(dt=!0,i._loopId=setInterval(i._emulateDragOver,50)):(re(document,"mouseup",i._onDrop),re(document,"touchend",i._onDrop),re(document,"touchcancel",i._onDrop),o&&(o.effectAllowed="move",s.setData&&s.setData.call(i,o,Ne)),le(document,"drop",i),ve(Ne,"transform","translateZ(0)")),at=!0,i._dragStartId=Zt(i._dragStarted.bind(i,t,e)),le(document,"selectstart",i),ot=!0,window.getSelection().removeAllRanges(),ie&&ve(document.body,"user-select","none"))},_onDragOver:function(e){var t,i,o,s,n=this.el,l=e.target,r=this.options,a=r.group,d=Mt.active,c=Ye===a,h=r.sort,u=Je||d,p=this,v=!1;if(!vt){if(void 0!==e.preventDefault&&e.cancelable&&e.preventDefault(),l=ce(l,r.draggable,n,!0),I("dragOver"),Mt.eventCanceled)return v;if(Ne.contains(e.target)||l.animated&&l.animatingX&&l.animatingY||p._ignoreWhileAnimating===l)return H(!1);if(dt=!1,d&&!r.disabled&&(c?h||(o=Ve!==Re):Je===this||(this.lastPutMode=Ye.checkPull(this,d,Ne,e))&&a.checkPut(this,d,Ne,e))){if(s="vertical"===this._getDirection(e,l),t=be(Ne),I("dragOverValid"),Mt.eventCanceled)return v;if(o)return Ve=Re,L(),this._hideClone(),I("revert"),Mt.eventCanceled||(je?Re.insertBefore(Ne,je):Re.appendChild(Ne)),H(!0);var m=ye(n,r.draggable);if(!m||function(e,t,i){var o=be(ye(i.el,i.options.draggable)),s=Ie(i.el,i.options,Ae);return t?e.clientX>s.right+10||e.clientY>o.bottom&&e.clientX>o.left:e.clientY>s.bottom+10||e.clientX>o.right&&e.clientY>o.top}(e,s,this)&&!m.animated){if(m===Ne)return H(!1);if(m&&n===e.target&&(l=m),l&&(i=be(l)),!1!==Tt(Re,n,Ne,t,l,i,e,!!l))return L(),m&&m.nextSibling?n.insertBefore(Ne,m.nextSibling):n.appendChild(Ne),Ve=n,Z(),H(!0)}else if(m&&function(e,t,i){var o=be(we(i.el,0,i.options,!0)),s=Ie(i.el,i.options,Ae);return t?e.clientX<s.left-10||e.clientY<o.top&&e.clientX<o.right:e.clientY<s.top-10||e.clientY<o.bottom&&e.clientX<o.left}(e,s,this)){var f=we(n,0,r,!0);if(f===Ne)return H(!1);if(i=be(l=f),!1!==Tt(Re,n,Ne,t,l,i,e,!1))return L(),n.insertBefore(Ne,f),Ve=n,Z(),H(!0)}else if(l.parentNode===n){i=be(l);var g,b,x,w=Ne.parentNode!==n,y=!function(e,t,i){var o=i?e.left:e.top,s=i?t.left:t.top;return o===s||(i?e.right:e.bottom)===(i?t.right:t.bottom)||o+(i?e.width:e.height)/2===s+(i?t.width:t.height)/2}(Ne.animated&&Ne.toRect||t,l.animated&&l.toRect||i,s),k=s?"top":"left",E=xe(l,"top","top")||xe(Ne,"top","top"),S=E?E.scrollTop:void 0;if(st!==l&&(b=i[k],ht=!1,ut=!y&&r.invertSwap||w),g=function(e,t,i,o,s,n,l,r){var a=o?e.clientY:e.clientX,d=o?i.height:i.width,c=o?i.top:i.left,h=o?i.bottom:i.right,u=!1;if(!l)if(r&<<d*s){if(!ht&&(1===nt?a>c+d*n/2:a<h-d*n/2)&&(ht=!0),ht)u=!0;else if(1===nt?a<c+lt:a>h-lt)return-nt}else if(a>c+d*(1-s)/2&&a<h-d*(1-s)/2)return function(e){return ke(Ne)<ke(e)?1:-1}(t);return(u=u||l)&&(a<c+d*n/2||a>h-d*n/2)?a>c+d/2?1:-1:0}(e,l,i,s,y?1:r.swapThreshold,null==r.invertedSwapThreshold?r.swapThreshold:r.invertedSwapThreshold,ut,st===l),0!==g){var q=ke(Ne);do{x=Ve.children[q-=g]}while(x&&("none"===ve(x,"display")||x===Ae))}if(0===g||x===l)return H(!1);st=l,nt=g;var C=l.nextElementSibling,M=!1,T=Tt(Re,n,Ne,t,l,i,e,M=1===g);if(!1!==T)return 1!==T&&-1!==T||(M=1===T),vt=!0,setTimeout(Lt,30),L(),M&&!C?n.appendChild(Ne):l.parentNode.insertBefore(Ne,M?C:l),E&&Me(E,0,S-E.scrollTop),Ve=Ne.parentNode,void 0===b||ut||(lt=Math.abs(b-be(l)[k])),Z(),H(!0)}if(n.contains(Ne))return H(!1)}return!1}function I(r,a){Oe(r,p,W({evt:e,isOwner:c,axis:s?"vertical":"horizontal",revert:o,dragRect:t,targetRect:i,canSort:h,fromSortable:u,target:l,completed:H,onMove:function(i,o){return Tt(Re,n,Ne,t,i,be(i),e,o)},changed:Z},a))}function L(){I("dragOverAnimationCapture"),p.captureAnimationState(),p!==u&&u.captureAnimationState()}function H(t){return I("dragOverCompleted",{insertion:t}),t&&(c?d._hideClone():d._showClone(p),p!==u&&(pe(Ne,Je?Je.options.ghostClass:d.options.ghostClass,!1),pe(Ne,r.ghostClass,!0)),Je!==p&&p!==Mt.active?Je=p:p===Mt.active&&Je&&(Je=null),u===p&&(p._ignoreWhileAnimating=l),p.animateAll((function(){I("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==u&&(u.animateAll(),u._ignoreWhileAnimating=null)),(l===Ne&&!Ne.animated||l===n&&!l.animated)&&(st=null),r.dragoverBubble||e.rootEl||l===document||(Ne.parentNode[Le]._isOutsideThisEl(e.target),!t&&qt(e)),!r.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),v=!0}function Z(){Fe=ke(Ne),We=ke(Ne,r.draggable),_e({sortable:p,name:"change",toEl:n,newIndex:Fe,newDraggableIndex:We,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){re(document,"mousemove",this._onTouchMove),re(document,"touchmove",this._onTouchMove),re(document,"pointermove",this._onTouchMove),re(document,"dragover",qt),re(document,"mousemove",qt),re(document,"touchmove",qt)},_offUpEvents:function(){var e=this.el.ownerDocument;re(e,"mouseup",this._onDrop),re(e,"touchend",this._onDrop),re(e,"pointerup",this._onDrop),re(e,"pointercancel",this._onDrop),re(e,"touchcancel",this._onDrop),re(document,"selectstart",this)},_onDrop:function(e){var t=this.el,i=this.options;Fe=ke(Ne),We=ke(Ne,i.draggable),Oe("drop",this,{evt:e}),Ve=Ne&&Ne.parentNode,Fe=ke(Ne),We=ke(Ne,i.draggable),Mt.eventCanceled||(at=!1,ut=!1,ht=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Dt(this.cloneId),Dt(this._dragStartId),this.nativeDraggable&&(re(document,"drop",this),re(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),ie&&ve(document.body,"user-select",""),ve(Ne,"transform",""),e&&(ot&&(e.cancelable&&e.preventDefault(),!i.dropBubble&&e.stopPropagation()),Ae&&Ae.parentNode&&Ae.parentNode.removeChild(Ae),(Re===Ve||Je&&"clone"!==Je.lastPutMode)&&Be&&Be.parentNode&&Be.parentNode.removeChild(Be),Ne&&(this.nativeDraggable&&re(Ne,"dragend",this),It(Ne),Ne.style["will-change"]="",ot&&!at&&pe(Ne,Je?Je.options.ghostClass:this.options.ghostClass,!1),pe(Ne,this.options.chosenClass,!1),_e({sortable:this,name:"unchoose",toEl:Ve,newIndex:null,newDraggableIndex:null,originalEvent:e}),Re!==Ve?(Fe>=0&&(_e({rootEl:Ve,name:"add",toEl:Ve,fromEl:Re,originalEvent:e}),_e({sortable:this,name:"remove",toEl:Ve,originalEvent:e}),_e({rootEl:Ve,name:"sort",toEl:Ve,fromEl:Re,originalEvent:e}),_e({sortable:this,name:"sort",toEl:Ve,originalEvent:e})),Je&&Je.save()):Fe!==$e&&Fe>=0&&(_e({sortable:this,name:"update",toEl:Ve,originalEvent:e}),_e({sortable:this,name:"sort",toEl:Ve,originalEvent:e})),Mt.active&&(null!=Fe&&-1!==Fe||(Fe=$e,We=Qe),_e({sortable:this,name:"end",toEl:Ve,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){Oe("nulling",this),Re=Ne=Ve=Ae=je=Be=Ue=Pe=Xe=Ge=ot=Fe=We=$e=Qe=st=nt=Je=Ye=Mt.dragged=Mt.ghost=Mt.clone=Mt.active=null,mt.forEach((function(e){e.checked=!0})),mt.length=Ke=et=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":Ne&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],i=this.el.children,o=0,s=i.length,n=this.options;o<s;o++)ce(e=i[o],n.draggable,this.el,!1)&&t.push(e.getAttribute(n.dataIdAttr)||Ht(e));return t},sort:function(e,t){var i={},o=this.el;this.toArray().forEach((function(e,t){var s=o.children[t];ce(s,this.options.draggable,o,!1)&&(i[e]=s)}),this),t&&this.captureAnimationState(),e.forEach((function(e){i[e]&&(o.removeChild(i[e]),o.appendChild(i[e]))})),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return ce(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var i=this.options;if(void 0===t)return i[e];var o=De.modifyOption(this,e,t);i[e]=void 0!==o?o:t,"group"===e&&kt(i)},destroy:function(){Oe("destroy",this);var e=this.el;e[Le]=null,re(e,"mousedown",this._onTapStart),re(e,"touchstart",this._onTapStart),re(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(re(e,"dragover",this),re(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),(function(e){e.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),ct.splice(ct.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!Pe){if(Oe("hideClone",this),Mt.eventCanceled)return;ve(Be,"display","none"),this.options.removeCloneOnHide&&Be.parentNode&&Be.parentNode.removeChild(Be),Pe=!0}},_showClone:function(e){if("clone"===e.lastPutMode){if(Pe){if(Oe("showClone",this),Mt.eventCanceled)return;Ne.parentNode!=Re||this.options.group.revertClone?je?Re.insertBefore(Be,je):Re.appendChild(Be):Re.insertBefore(Be,Ne),this.options.group.revertClone&&this.animate(Ne,Be),ve(Be,"display",""),Pe=!1}}else this._hideClone()}},ft&&le(document,"touchmove",(function(e){(Mt.active||at)&&e.cancelable&&e.preventDefault()})),Mt.utils={on:le,off:re,css:ve,find:fe,is:function(e,t){return!!ce(e,t,e,!1)},extend:function(e,t){if(e&&t)for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);return e},throttle:Ce,closest:ce,toggleClass:pe,clone:Te,index:ke,nextTick:Zt,cancelNextTick:Dt,detectDirection:yt,getChild:we,expando:Le},Mt.get=function(e){return e[Le]},Mt.mount=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];t[0].constructor===Array&&(t=t[0]),t.forEach((function(e){if(!e.prototype||!e.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(e));e.utils&&(Mt.utils=W(W({},Mt.utils),e.utils)),De.mount(e)}))},Mt.create=function(e,t){return new Mt(e,t)},Mt.version="1.15.6";var zt,Ot,_t,Nt,Vt,At,Rt=[],jt=!1;function Ut(){Rt.forEach((function(e){clearInterval(e.pid)})),Rt=[]}function Bt(){clearInterval(At)}var Pt=Ce((function(e,t,i,o){if(t.scroll){var s,n=(e.touches?e.touches[0]:e).clientX,l=(e.touches?e.touches[0]:e).clientY,r=t.scrollSensitivity,a=t.scrollSpeed,d=ge(),c=!1;Ot!==i&&(Ot=i,Ut(),s=t.scrollFn,!0===(zt=t.scroll)&&(zt=Se(i,!0)));var h=0,u=zt;do{var p=u,v=be(p),m=v.top,f=v.bottom,g=v.left,b=v.right,x=v.width,w=v.height,y=void 0,k=void 0,E=p.scrollWidth,S=p.scrollHeight,q=ve(p),C=p.scrollLeft,M=p.scrollTop;p===d?(y=x<E&&("auto"===q.overflowX||"scroll"===q.overflowX||"visible"===q.overflowX),k=w<S&&("auto"===q.overflowY||"scroll"===q.overflowY||"visible"===q.overflowY)):(y=x<E&&("auto"===q.overflowX||"scroll"===q.overflowX),k=w<S&&("auto"===q.overflowY||"scroll"===q.overflowY));var T=y&&(Math.abs(b-n)<=r&&C+x<E)-(Math.abs(g-n)<=r&&!!C),I=k&&(Math.abs(f-l)<=r&&M+w<S)-(Math.abs(m-l)<=r&&!!M);if(!Rt[h])for(var L=0;L<=h;L++)Rt[L]||(Rt[L]={});Rt[h].vx==T&&Rt[h].vy==I&&Rt[h].el===p||(Rt[h].el=p,Rt[h].vx=T,Rt[h].vy=I,clearInterval(Rt[h].pid),0==T&&0==I||(c=!0,Rt[h].pid=setInterval(function(){o&&0===this.layer&&Mt.active._onTouchMove(Vt);var t=Rt[this.layer].vy?Rt[this.layer].vy*a:0,i=Rt[this.layer].vx?Rt[this.layer].vx*a:0;"function"==typeof s&&"continue"!==s.call(Mt.dragged.parentNode[Le],i,t,e,Vt,Rt[this.layer].el)||Me(Rt[this.layer].el,i,t)}.bind({layer:h}),24))),h++}while(t.bubbleScroll&&u!==d&&(u=Se(u,!1)));jt=c}}),30),$t=function(e){var t=e.originalEvent,i=e.putSortable,o=e.dragEl,s=e.dispatchSortableEvent,n=e.unhideGhostForTarget;if(t){var l=i||e.activeSortable;(0,e.hideGhostForTarget)();var r=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,a=document.elementFromPoint(r.clientX,r.clientY);n(),l&&!l.el.contains(a)&&(s("spill"),this.onSpill({dragEl:o,putSortable:i}))}};function Ft(){}function Qt(){}Ft.prototype={startIndex:null,dragStart:function(e){this.startIndex=e.oldDraggableIndex},onSpill:function(e){var t=e.dragEl,i=e.putSortable;this.sortable.captureAnimationState(),i&&i.captureAnimationState();var o=we(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(t,o):this.sortable.el.appendChild(t),this.sortable.animateAll(),i&&i.animateAll()},drop:$t},X(Ft,{pluginName:"revertOnSpill"}),Qt.prototype={onSpill:function(e){var t=e.dragEl,i=e.putSortable||this.sortable;i.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),i.animateAll()},drop:$t},X(Qt,{pluginName:"removeOnSpill"}),Mt.mount(new function(){function e(){for(var e in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?le(document,"dragover",this._handleAutoScroll):le(document,this.options.supportPointer?"pointermove":t.touches?"touchmove":"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?re(document,"dragover",this._handleAutoScroll):(re(document,"pointermove",this._handleFallbackAutoScroll),re(document,"touchmove",this._handleFallbackAutoScroll),re(document,"mousemove",this._handleFallbackAutoScroll)),Bt(),Ut(),clearTimeout(he),he=void 0},nulling:function(){Vt=Ot=zt=jt=At=_t=Nt=null,Rt.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var i=this,o=(e.touches?e.touches[0]:e).clientX,s=(e.touches?e.touches[0]:e).clientY,n=document.elementFromPoint(o,s);if(Vt=e,t||this.options.forceAutoScrollFallback||ee||K||ie){Pt(e,this.options,n,t);var l=Se(n,!0);!jt||At&&o===_t&&s===Nt||(At&&Bt(),At=setInterval((function(){var n=Se(document.elementFromPoint(o,s),!0);n!==l&&(l=n,Ut()),Pt(e,i.options,n,t)}),10),_t=o,Nt=s)}else{if(!this.options.bubbleScroll||Se(n,!0)===ge())return void Ut();Pt(e,this.options,Se(n,!1),!1)}}},X(e,{pluginName:"scroll",initializeByDefault:!0})}),Mt.mount(Qt,Ft);const Wt='<svg xmlns="http://www.w3.org/2000/svg" fill="#ffffff" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor"><path strokeLinecap="round" strokeLinejoin="round" d="M12 9v6m3-3H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>',Yt=class{constructor(i){e(this,i),this.next=t(this,"next",7),this.exit=t(this,"exit",7),this.sdkError=t(this,"sdkError",7),this.rolesUpdated=t(this,"rolesUpdated",7),this.templateListenerId=null,this.endpoint=l.getDefault(),this.templateId="",this.showingRoleDialog=null,this.sender=null,this.dragging=!1,this.loading=!0,this.template=null}disconnectedCallback(){this.unlistenToTemplate()}async listenToTemplate(){console.log("[ROLES] Loading template",this.templateId),this.unlistenToTemplate(),y.subscribe("templates",this.templateId,(()=>r(this.endpoint,this.templateId)),!1,(e=>{console.log("[ROLES] Template Updated",e),this.template=e,this.loading=!1}))}unlistenToTemplate(){this.templateListenerId&&(y.store.delListener(this.templateListenerId),this.templateListenerId=null)}async componentWillLoad(){var e,t,i;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[ROLES] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[ROLES] Unable to start builder session, must be authenticated");this.listenToTemplate()}catch(o){console.log("[FIELDS] Error with preview session",o),null===(e=this.sdkError)||void 0===e||e.emit(new w(o.message,null===(t=o.response)||void 0===t?void 0:t.status,null===(i=o.response)||void 0===i?void 0:i.data))}}componentDidRender(){const e=this.getSequenceNumbers();(e||[]).forEach((e=>{const t=document.getElementById(`verdocs-roles-sequence-${e}`);t&&new Mt(t,{group:"roles",animation:150,dragoverBubble:!0,filter:".no-drag",onEnd:this.handleMoveEnd.bind(this),onChoose:()=>this.dragging=!0,onUnchoose:()=>this.dragging=!1})}));const t=document.getElementById(`verdocs-roles-sequence-${e.length+1}`);t&&new Mt(t,{group:"roles",animation:150,dragoverBubble:!0,filter:".no-drag",onEnd:this.handleMoveEnd.bind(this),onChoose:()=>this.dragging=!0,onUnchoose:()=>this.dragging=!1})}handleMoveEnd(e){const t=+e.from.id.split("-").pop(),i=+e.to.id.split("-").pop(),o=+e.oldIndex+1,s=+e.newIndex+1,n={},l=this.getSequenceNumbers();l.forEach((e=>{n[e]=JSON.parse(JSON.stringify(this.getRolesAtSequence(e)))})),n[l.length+1]=[];const r=n[t].splice(o-1,1)[0];n[i].splice(s-1,0,r);const a=[];return Object.entries(n).forEach((([e,t])=>{t.forEach(((t,i)=>{console.log("Evaluating role",t.name,t.sequence,t.order);const o=+i+1;t.sequence===+e&&t.order===o||(t.sequence=+e,t.order=o,a.push(b(this.endpoint,this.templateId,t.name,{sequence:+e,order:o}).then((e=>console.log("[ROLES] Updated role",t.name,e))).catch((e=>console.log("[ROLES] Error updating role",e)))))}))})),console.log(`[ROLES] Awaiting ${a.length} renumber requests`,a),Promise.all(a).then((async()=>{JSON.parse(JSON.stringify(this.template)).roles=Object.keys(n).reduce(((e,t)=>e.concat(n[t])),[]),await y.getTemplate(this.endpoint,this.templateId,!0)}))}handleCancel(){var e;null===(e=this.exit)||void 0===e||e.emit()}handleSubmit(){var e;null===(e=this.next)||void 0===e||e.emit()}getSortedRoles(){var e;return((null===(e=this.template)||void 0===e?void 0:e.roles)||[]).sort(((e,t)=>e.sequence===t.sequence?e.order-t.order:e.sequence-t.sequence))}getSequenceNumbers(){var e;const t=((null===(e=this.template)||void 0===e?void 0:e.roles)||[]).map((e=>e.sequence)),i=[...new Set(t)];return i.sort(((e,t)=>e-t)),i}getRoleNames(){return this.getSortedRoles().map((e=>e.name))}getRolesAtSequence(e){var t;return((null===(t=this.template)||void 0===t?void 0:t.roles)||[]).filter((t=>t&&t.sequence===e))}async renumberTemplateRoles(){var e;const t={},i=[],o=this.getSequenceNumbers();console.log("Sorting sequences",o),(o||[]).forEach((e=>{(t[e]||[]).forEach(((t,o)=>{const s=+o+1;t.sequence===+e&&t.order===s||(console.log("[ROLES] Updating role",t.name,"from",t.sequence,t.order,"to",e,s),t.sequence=+e,t.order=s,i.push(b(this.endpoint,this.templateId,t.name,{sequence:+e,order:s}).then((e=>console.log("[ROLES] Updated role",t.name,e))).catch((e=>console.log("[ROLES] Error updating role",e)))))}))})),console.log("Sortable Roles",t),console.log(`[ROLES] Awaiting ${i.length} renumber requests`),await Promise.all(i).then((async()=>{const e=JSON.parse(JSON.stringify(this.template));e.roles=Object.keys(t).reduce(((e,i)=>e.concat(t[i])),[]),console.log("[ROLES] Done renumbering",e.roles.map((e=>({name:e.name,sequence:e.sequence,order:e.order})))),y.updateTemplate(this.templateId,e)})),null===(e=this.rolesUpdated)||void 0===e||e.emit({event:"updated",endpoint:this.endpoint,templateId:this.templateId,roles:this.getSortedRoles()})}getNextRoleName(){var e,t;let i="",o=((null===(e=this.template)||void 0===e?void 0:e.roles)||[]).length;do{o++,i=`Recipient ${o}`}while(!i||((null===(t=this.template)||void 0===t?void 0:t.roles)||[]).some((e=>e&&e.name===i)));return i}callCreateRole(e,t,i){console.log("[ROLES] Will create role",{name:e,sequence:t,order:i}),x(this.endpoint,this.templateId,{template_id:this.templateId,name:e,sequence:t,message:"",order:i,full_name:null,first_name:"",last_name:"",email:"",phone:"",type:"signer",delegator:!1,kba_method:null}).then((async e=>{var t;console.log("[ROLES] Created role",e),console.log("Updating template in data store"),await y.getTemplate(this.endpoint,this.templateId,!0),null===(t=this.rolesUpdated)||void 0===t||t.emit({event:"added",endpoint:this.endpoint,templateId:this.templateId,roles:this.getSortedRoles()})})).catch((e=>{console.log("[ROLES] Error creating role",e)}))}handleAddRole(e,t){e.stopPropagation();const i=this.getRolesAtSequence(t).length+1,o=this.getNextRoleName();this.callCreateRole(o,t,i)}handleAddStep(e,t){e.stopPropagation();const i=this.getNextRoleName();this.callCreateRole(i,t,1)}render(){if(!this.endpoint.session)return i(o,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}));if(this.loading||!this.template)return i(o,{class:"loading"},i("verdocs-loader",null));console.log("[ROLES] Rendering",this.template.roles.map((e=>({name:e.name,sequence:e.sequence,order:e.order}))));const e=this.getRoleNames(),t=this.getSequenceNumbers();return console.log("Rendering sequences",t,e),i(o,{class:{dragging:this.dragging}},i("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},i("h5",null,"Roles and Workflow"),i("div",{class:"roles"},t.map((e=>i("div",{class:"sequence"},i("div",{class:"sequence-label no-drag"},e,"."),i("div",{class:"sequence-roles",id:`verdocs-roles-sequence-${e}`,"data-sequence":e},this.getRolesAtSequence(e).map((t=>i("div",{class:"role","data-rolename":t.name,"data-sequence":e,"data-order":t.order},i("div",{class:"role-name"},t.email&&t.first_name&&t.last_name?u(t):t.name),i("div",{class:"icons"},i("div",{class:"gear-button",innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" height="20" width="20" fill="#00000089"><path d="m8.021 17.917-.313-2.5q-.27-.125-.625-.334-.354-.208-.625-.395l-2.312.979-1.979-3.438 1.979-1.5q-.021-.167-.031-.364-.011-.198-.011-.365 0-.146.011-.344.01-.198.031-.385l-1.979-1.5 1.979-3.417 2.312.958q.271-.187.615-.385t.635-.344l.313-2.5h3.958l.313 2.5q.312.167.625.344.312.177.604.385l2.333-.958 1.979 3.417-1.979 1.521q.021.187.021.364V10q0 .146-.01.333-.011.188-.011.396l1.958 1.5-1.979 3.438-2.312-.979q-.292.208-.615.395-.323.188-.614.334l-.313 2.5Zm1.937-5.355q1.063 0 1.813-.75t.75-1.812q0-1.062-.75-1.812t-1.813-.75q-1.041 0-1.802.75-.76.75-.76 1.812t.76 1.812q.761.75 1.802.75Zm0-1.333q-.5 0-.864-.364-.365-.365-.365-.865t.365-.865q.364-.364.864-.364t.865.364q.365.365.365.865t-.365.865q-.365.364-.865.364ZM10.021 10Zm-.854 6.583h1.666l.25-2.187q.605-.167 1.136-.49.531-.323 1.031-.802l2.021.875.854-1.375-1.792-1.354q.105-.333.136-.635.031-.303.031-.615 0-.292-.031-.573-.031-.281-.115-.635l1.792-1.396-.834-1.375-2.062.875q-.438-.438-1.021-.781-.583-.344-1.125-.49l-.271-2.208H9.167l-.271 2.208q-.584.146-1.125.458-.542.313-1.042.792l-2.021-.854-.833 1.375 1.75 1.354q-.083.333-.125.646-.042.312-.042.604t.042.594q.042.302.125.635l-1.75 1.375.833 1.375 2.021-.854q.479.458 1.021.771.542.312 1.146.479Z"/></svg>',onClick:()=>this.showingRoleDialog=t.name,"aria-role":"button"}),i("span",{class:"type-icon",innerHTML:"signer"===t.type?'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z"/></svg>':"cc"===t.type?'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M1.5 8.67v8.58a3 3 0 003 3h15a3 3 0 003-3V8.67l-8.928 5.493a3 3 0 01-3.144 0L1.5 8.67z" /><path d="M22.5 6.908V6.75a3 3 0 00-3-3h-15a3 3 0 00-3 3v.158l9.714 5.978a1.5 1.5 0 001.572 0L22.5 6.908z" /></svg>':'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill-rule="evenodd" d="M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm13.36-1.814a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z" clip-rule="evenodd" /></svg>'})))))),i("button",{class:"add-role no-drag",innerHTML:Wt,onClick:t=>this.handleAddRole(t,e)})))),i("div",{class:"sequence add-sequence"},i("div",{class:"sequence-label no-drag"},t.length+1,"."),i("div",{class:"sequence-roles",id:`verdocs-roles-sequence-${t.length+1}`,"data-sequence":t.length+1}),i("button",{class:"add-role no-drag",innerHTML:Wt,onClick:e=>this.handleAddRole(e,t.length+1)}))),e.length<1&&i("div",{class:"empty"},"You must add at least one Role before proceeding.",i("br",null)," Click the ",i("span",{innerHTML:Wt})," Add button above to get started."),i("div",{class:"buttons"},i("div",{class:"flex-fill"}),i("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:()=>this.handleCancel()}),i("verdocs-button",{label:"OK",size:"small",onClick:()=>this.handleSubmit(),disabled:e.length<1}))),this.showingRoleDialog&&i("verdocs-menu-panel",{onClose:()=>this.showingRoleDialog=null},i("verdocs-template-role-properties",{endpoint:this.endpoint,templateId:this.templateId,roleName:this.showingRoleDialog,onClose:()=>{var e;null===(e=document.getElementById("verdocs-menu-panel-overlay"))||void 0===e||e.remove(),this.showingRoleDialog=null},onDelete:async()=>{var e;this.showingRoleDialog=null,await this.renumberTemplateRoles(),null===(e=this.rolesUpdated)||void 0===e||e.emit({event:"deleted",endpoint:this.endpoint,templateId:this.templateId,roles:this.getSortedRoles()})}})))}get el(){return n(this)}};Yt.style='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-template-roles{display:block;max-width:600px;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-roles .roles{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:10px;margin-top:10px}verdocs-template-roles .roles .sequence{gap:10px;height:34px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;font-weight:500;padding:0 0 8px 0;-ms-flex-direction:row;flex-direction:row;border-bottom:1px dotted #e3e3e3}verdocs-template-roles .roles .sequence.add-sequence{color:#777777;line-height:34px}verdocs-template-roles .roles .sequence-label{font-size:18px;line-height:32px}verdocs-template-roles .roles .sequence-roles{gap:10px;display:-ms-flexbox;display:flex;position:relative;-ms-flex-wrap:wrap;flex-wrap:wrap;font-weight:500;-ms-flex-direction:row;flex-direction:row}verdocs-template-roles .roles .role{height:32px;cursor:move;display:-ms-flexbox;display:flex;max-width:200px;position:relative;border-radius:32px;background-color:#eff7fb;-webkit-box-sizing:border-box;box-sizing:border-box;padding:0 14px 0 34px;border:1px solid #ccc;-ms-flex-direction:column;flex-direction:column}verdocs-template-roles .roles .role .role-name{font-size:14px;overflow:hidden;font-weight:400;line-height:30px;white-space:nowrap;text-overflow:ellipsis}verdocs-template-roles .roles .role .icons{position:absolute;left:1px;top:-3px;cursor:pointer;padding:5px;z-index:10}verdocs-template-roles .roles .role .icons .gear-button{display:none;-webkit-transform:scale(1.1);transform:scale(1.1);margin:4px 0 0 1px}verdocs-template-roles .roles .role .icons .type-icon{opacity:0.6;display:block;-webkit-transform:scale(0.8);transform:scale(0.8)}verdocs-template-roles .roles .role .icons:hover .gear-button{display:block}verdocs-template-roles .roles .role .icons:hover .type-icon{display:none}verdocs-template-roles>form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff;padding:12px}verdocs-template-roles>form h5{font-size:16px;font-weight:bold;color:#46497d;margin:0 0 10px 0}verdocs-template-roles>form label{display:block;font-size:14px;font-weight:500;margin:0 0 4px 0;color:#5c6575}verdocs-template-roles>form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-roles>form input:focus{outline:none}verdocs-template-roles .row.add-sequence{display:none}verdocs-template-roles .add-role{margin:0;padding:0;border:none;opacity:0.3;cursor:pointer;background:none;-webkit-transform:scale(0.75);transform:scale(0.75)}verdocs-template-roles .add-role:hover{opacity:1}verdocs-template-roles .add-role svg{width:32px;height:32px}verdocs-template-roles .add-step{margin:0;padding:0;border:none;opacity:0.5;cursor:pointer;background:none}verdocs-template-roles .add-step:hover{opacity:1}verdocs-template-roles .add-step svg{width:32px;height:32px}verdocs-template-roles.dragging .row.add-sequence{display:-ms-flexbox;display:flex}verdocs-template-roles .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-template-roles .empty{font-size:13px;margin-top:15px;margin-bottom:5px}verdocs-template-roles .empty svg{width:16px;height:16px;stroke:#666666;margin-bottom:2px;display:inline-block}verdocs-template-roles.dragging .roles .sequence.add-sequence .add-role,verdocs-template-roles.dragging .roles .sequence.add-sequence .add-step-label{display:none}verdocs-template-roles.dragging .roles .sequence.add-sequence .sequence-roles{display:-ms-flexbox;display:flex;min-width:150px;background:#e0e0e0}verdocs-template-roles ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-roles ::-moz-placeholder{color:#aaaaaa}verdocs-template-roles :-ms-input-placeholder{color:#aaaaaa}verdocs-template-roles ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-roles ::placeholder{color:#aaaaaa}';export{V as verdocs_preview,R as verdocs_send,j as verdocs_template_attachments,B as verdocs_template_build_tabs,F as verdocs_template_fields,Yt as verdocs_template_roles}
|
@@ -1 +1 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,a,i){function n(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,s){function d(e){try{l(i.next(e))}catch(e){s(e)}}function o(e){try{l(i["throw"](e))}catch(e){s(e)}}function l(e){e.done?a(e.value):n(e.value).then(d,o)}l((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var a={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,n,s,d;return d={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(d[Symbol.iterator]=function(){return this}),d;function o(e){return function(t){return l([e,t])}}function l(o){if(i)throw new TypeError("Generator is already executing.");while(d&&(d=0,o[0]&&(a=0)),a)try{if(i=1,n&&(s=o[0]&2?n["return"]:o[0]?n["throw"]||((s=n["return"])&&s.call(n),0):n.next)&&!(s=s.call(n,o[1])).done)return s;if(n=0,s)o=[o[0]&2,s.value];switch(o[0]){case 0:case 1:s=o;break;case 4:a.label++;return{value:o[1],done:false};case 5:a.label++;n=o[1];o=[0];continue;case 7:o=a.ops.pop();a.trys.pop();continue;default:if(!(s=a.trys,s=s.length>0&&s[s.length-1])&&(o[0]===6||o[0]===2)){a=0;continue}if(o[0]===3&&(!s||o[1]>s[0]&&o[1]<s[3])){a.label=o[1];break}if(o[0]===6&&a.label<s[1]){a.label=s[1];s=o;break}if(s&&a.label<s[2]){a.label=s[2];a.ops.push(o);break}if(s[2])a.ops.pop();a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e];n=0}finally{i=s=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};System.register(["./p-9186f42e.system.js","./p-56ba5cbf.system.js"],(function(e,t){"use strict";var a,i,n;return{setters:[function(t){a=t.p;i=t.b;e("setNonce",t.s)},function(e){n=e.g}],execute:function(){var e=this;var s=function(){var e=t.meta.url;var i={};if(e!==""){i.resourcesUrl=new URL(".",e).href}return a(i)};s().then((function(t){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,n()];case 1:e.sent();return[2,i(JSON.parse('[["p-9021fc7b.system",[[0,"verdocs-build",{"endpoint":[16],"templateId":[1537,"template-id"],"step":[1537],"loading":[32],"template":[32]},null,{"templateId":["onTemplateIdChanged"],"step":["onStepChanged"]}]]],["p-b0fbfc24.system",[[0,"verdocs-envelopes-list",{"endpoint":[16],"view":[1537],"status":[1537],"sort":[1537],"match":[1537],"showPagination":[4,"show-pagination"],"rowsPerPage":[2,"rows-per-page"],"selectedPage":[2,"selected-page"],"count":[32],"initiallyLoaded":[32],"loading":[32],"selectedEnvelopes":[32],"envelopes":[32]},null,{"view":["handleViewUpdated"],"status":["handleStatusUpdated"],"sort":["handleSortUpdated"],"match":["handleMatchUpdated"],"selectedPage":["handlePageUpdated"]}]]],["p-41f22b0a.system",[[0,"verdocs-sign",{"endpoint":[1040],"envelopeId":[513,"envelope-id"],"roleId":[513,"role-id"],"inviteCode":[513,"invite-code"],"headerTargetId":[1,"header-target-id"],"roleNames":[32],"sortedRecipients":[32],"recipient":[32],"hasSignature":[32],"nextButtonLabel":[32],"nextSubmits":[32],"fatalErrorHeader":[32],"fatalErrorMessage":[32],"focusedField":[32],"submitting":[32],"submitted":[32],"isDone":[32],"showDone":[32],"showLoadError":[32],"finishLater":[32],"showFinishLater":[32],"agreed":[32],"documentsSingularPlural":[32],"kbaStep":[32],"kbaQuestions":[32],"showSpinner":[32],"kbaChoices":[32],"loading":[32],"envelope":[32]}]]],["p-53f4c7c3.system",[[0,"verdocs-templates-list",{"endpoint":[16],"visibility":[1537],"starred":[1537],"sort":[1537],"name":[1537],"allowedActions":[1040],"showPagination":[4,"show-pagination"],"rowsPerPage":[2,"rows-per-page"],"selectedPage":[2,"selected-page"],"count":[32],"initiallyLoaded":[32],"loading":[32],"confirmDelete":[32],"templates":[32],"localNameFilter":[32]},null,{"sharing":["handleSharingUpdated"],"starred":["handleStarredUpdated"],"sort":["handleSortUpdated"],"name":["handleNameUpdated"],"selectedPage":["handlePageUpdated"]}]]],["p-3cc50f0b.system",[[0,"verdocs-field-payment",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"done":[516],"editable":[516],"moveable":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"fields":[16],"pageNum":[2,"page-num"],"roleName":[1,"role-name"],"fieldId":[1,"field-id"],"recipients":[8],"selectedRoleName":[1,"selected-role-name"],"pdfPages":[16],"currentSignature":[1,"current-signature"],"currentSignatureId":[1,"current-signature-id"],"currentInitial":[1,"current-initial"],"currentInitialId":[1,"current-initial-id"],"signed":[4],"roleindex":[2],"showingProperties":[32],"focused":[32],"preparedMessage":[32],"signatureUrl":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["p-00ed440b.system",[[0,"verdocs-envelope-sidebar",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"activeTab":[32],"panelOpen":[32],"showRecipientDialog":[32],"showCancelDialog":[32],"remindersEnabled":[32],"updatingReminders":[32],"initialReminder":[32],"followupReminders":[32],"loading":[32],"envelope":[32]}]]],["p-cbb75c5e.system",[[0,"verdocs-template-create",{"endpoint":[16],"maxSize":[1026,"max-size"],"file":[32],"creating":[32],"progressLabel":[32],"progressPercent":[32],"errorMessage":[32]}]]],["p-4e9e154f.system",[[0,"verdocs-auth",{"endpoint":[16],"visible":[4],"logo":[1],"displayMode":[1025,"display-mode"],"org_name":[32],"first_name":[32],"last_name":[32],"email":[32],"verificationCode":[32],"newPassword":[32],"password":[32],"confirmpass":[32],"submitting":[32],"resendDisabled":[32],"session":[32],"profile":[32]}]]],["p-19462841.system",[[0,"verdocs-envelope-recipient-summary",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"canSendAnother":[4,"can-send-another"],"canView":[4,"can-view"],"canDone":[4,"can-done"],"isOpen":[32],"recipientStatusIcons":[32],"containerId":[32],"gettingLinks":[32],"links":[32],"loading":[32],"envelope":[32]}]]],["p-1d5b9103.system",[[4,"verdocs-dialog"]]],["p-90bc3ad0.system",[[0,"verdocs-quick-functions",{"endpoint":[16]}]]],["p-6237ce51.system",[[0,"verdocs-radio-button",{"checked":[4],"name":[1],"value":[1],"disabled":[4]}]]],["p-d5870e33.system",[[0,"verdocs-search-box",{"endpoint":[16],"placeholder":[1],"type":[1],"query":[1],"grabsFocus":[4,"grabs-focus"],"focusField":[64]}]]],["p-ac6ecfad.system",[[0,"verdocs-search-tabs",{"selected":[32]}]]],["p-9227d400.system",[[0,"verdocs-table",{"columns":[16],"data":[16]}]]],["p-ad3d07a6.system",[[0,"verdocs-template-card",{"template":[16]}]]],["p-5824962b.system",[[0,"verdocs-template-tags",{"tags":[16]}]]],["p-761f6656.system",[[0,"verdocs-toggle",{"options":[16],"theme":[1],"selectedOption":[32]}]]],["p-2eae32d9.system",[[0,"verdocs-status-indicator",{"size":[1],"theme":[1],"status":[1],"envelope":[16],"isOpen":[32],"containerId":[32]}]]],["p-417f71da.system",[[0,"verdocs-template-star",{"endpoint":[16],"template":[1040],"updating":[32]}]]],["p-7b1e00e5.system",[[0,"verdocs-envelope-document-page",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"documentId":[1,"document-id"],"pageNumber":[2,"page-number"],"virtualWidth":[2,"virtual-width"],"virtualHeight":[1026,"virtual-height"],"layers":[16],"type":[1],"containerId":[32],"renderedWidth":[32],"renderedHeight":[32],"naturalWidth":[32],"naturalHeight":[32],"aspectRatio":[32],"skipFirstNotification":[32],"pageDisplayUri":[32]}]]],["p-1e191c20.system",[[0,"verdocs-help-icon",{"text":[1],"icon":[1],"containerId":[32]}],[0,"verdocs-button",{"label":[1],"startIcon":[1,"start-icon"],"endIcon":[1,"end-icon"],"size":[1],"type":[1],"variant":[1],"disabled":[4]}]]],["p-e3077c5e.system",[[0,"verdocs-view",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"headerTargetId":[1,"header-target-id"],"canceling":[32],"showCancelDone":[32],"showLoadError":[32],"loading":[32],"envelope":[32]}],[0,"verdocs-kba-dialog",{"step":[2],"steps":[2],"helptitle":[1],"helptext":[1],"mode":[1],"label":[1],"placeholder":[1],"recipient":[16],"choices":[16],"response":[32],"updatedRecipient":[32]}]]],["p-fda9c437.system",[[0,"verdocs-envelope-recipient-link",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"roleName":[1,"role-name"],"isOpen":[32],"gettingLink":[32],"link":[32],"loading":[32],"envelope":[32],"recipient":[32]}],[0,"verdocs-switch",{"checked":[1028],"theme":[1],"disabled":[4]}]]],["p-ea078594.system",[[0,"verdocs-template-role-properties",{"endpoint":[16],"templateId":[1,"template-id"],"roleName":[1,"role-name"],"dirty":[32],"saving":[32],"name":[32],"type":[32],"first_name":[32],"last_name":[32],"email":[32],"phone":[32],"delegator":[32],"loading":[32],"template":[32]}],[4,"verdocs-menu-panel",{"side":[1],"overlay":[4],"width":[2]},[[4,"click","handleClick"]]]]],["p-e438bd02.system",[[4,"verdocs-button-panel",{"icon":[1],"showPanel":[64],"hidePanel":[64],"toggle":[64]}],[4,"verdocs-tabs",{"tabs":[16],"selectedTab":[2,"selected-tab"]}]]],["p-6b4de004.system",[[0,"verdocs-pagination",{"selectedPage":[1538,"selected-page"],"itemCount":[2,"item-count"],"perPage":[2,"per-page"]}],[0,"verdocs-quick-filter",{"options":[16],"label":[1],"value":[1537],"placeholder":[1],"open":[32]}]]],["p-94fe5817.system",[[0,"verdocs-ok-dialog",{"heading":[1],"message":[1],"buttonLabel":[1,"button-label"],"showCancel":[4,"show-cancel"],"closed":[32]}]]],["p-bbf30adc.system",[[0,"verdocs-toolbar-icon",{"text":[1],"icon":[1],"placement":[1],"containerId":[32]}],[0,"verdocs-template-document-page",{"endpoint":[16],"editable":[4],"disabled":[4],"done":[4],"templateId":[1,"template-id"],"documentId":[1,"document-id"],"pageNumber":[2,"page-number"],"virtualWidth":[2,"virtual-width"],"virtualHeight":[1026,"virtual-height"],"layers":[16],"containerId":[32],"renderedWidth":[32],"renderedHeight":[32],"naturalWidth":[32],"naturalHeight":[32],"aspectRatio":[32],"skipFirstNotification":[32],"pageDisplayUri":[32],"xScale":[32],"yScale":[32],"loading":[32],"template":[32]}]]],["p-8d7d61ee.system",[[0,"verdocs-contact-picker",{"endpoint":[16],"templateRole":[16],"contactSuggestions":[16],"first_name":[32],"last_name":[32],"email":[32],"phone":[32],"zip":[32],"address":[32],"message":[32],"showSuggestions":[32],"showMessage":[32],"delegator":[32],"showKba":[32],"kba_method":[32],"kba_pin":[32],"nameFieldId":[32],"firstNameFieldId":[32],"lastNameFieldId":[32],"emailFieldId":[32],"phoneFieldId":[32]}],[0,"verdocs-toggle-button",{"active":[4],"icon":[1],"label":[1],"size":[1],"_active":[32]}]]],["p-e6d711e0.system",[[0,"verdocs-file-chooser",{"endpoint":[16],"file":[32]}],[0,"verdocs-progress-bar",{"label":[1],"showPercent":[4,"show-percent"],"percent":[2]}]]],["p-f84932fd.system",[[0,"verdocs-spinner",{"size":[2],"mode":[1]}]]],["p-306bde40.system",[[0,"verdocs-organization-card",{"organization":[16],"hovered":[32]},[[1,"mouseover","onMouseOver"],[1,"mouseout","onMouseOut"]]],[4,"verdocs-portal",{"anchor":[1],"voffset":[2]},[[11,"scroll","handleScroll"],[9,"resize","handleResize"],[4,"click","handleClick"]]]]],["p-d8dae4e9.system",[[0,"verdocs-dropdown",{"options":[16],"containerId":[32],"showPicker":[32]}]]],["p-eb3ceb39.system",[[0,"verdocs-template-field-properties",{"endpoint":[16],"templateId":[1,"template-id"],"fieldName":[1025,"field-name"],"helpText":[1,"help-text"],"dirty":[32],"label":[32],"type":[32],"name":[32],"required":[32],"roleName":[32],"group":[32],"fieldType":[32],"options":[32],"placeholder":[32],"defaultValue":[32],"showingHelp":[32],"loading":[32],"template":[32]}],[0,"verdocs-checkbox",{"checked":[4],"name":[1],"label":[1],"value":[1],"theme":[1],"disabled":[4]}],[0,"verdocs-select-input",{"value":[1],"label":[1],"options":[16],"disabled":[4]}],[0,"verdocs-component-error",{"message":[1]}],[0,"verdocs-loader"],[0,"verdocs-text-input",{"value":[1537],"label":[1],"placeholder":[1],"autocomplete":[1],"helpText":[1,"help-text"],"clearable":[4],"copyable":[4],"type":[1],"disabled":[4],"required":[4],"showingPw":[32]}]]],["p-8bdd951b.system",[[0,"verdocs-field-attachment",{"endpoint":[16],"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"dialogOpen":[32],"selectedFile":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-initial",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"initials":[513],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"tempInitials":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-signature",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"name":[513],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"tempSignature":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-checkbox",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"done":[516],"editable":[516],"moveable":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-date",{"source":[513],"sourceid":[513],"fieldname":[513],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"field":[16],"containerId":[32],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-dropdown",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-radio",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"required":[516],"done":[516],"editable":[516],"moveable":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-textarea",{"endpoint":[16],"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-textbox",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"multiline":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-timestamp",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[2],"showingProperties":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-initial-dialog",{"initials":[1],"fontLoaded":[32],"enteredInitials":[32],"mode":[32]}],[0,"verdocs-signature-dialog",{"name":[1],"fontLoaded":[32],"enteredName":[32],"mode":[32]}],[0,"verdocs-upload-dialog",{"maxSize":[1026,"max-size"],"existingFile":[1032,"existing-file"],"draggingOver":[32],"confirmDelete":[32],"selectedFiles":[32],"errorMessage":[32]}]]],["p-2b7edf3a.system",[[0,"verdocs-template-fields",{"endpoint":[16],"templateId":[1537,"template-id"],"toolbarTargetId":[1,"toolbar-target-id"],"placing":[32],"showMustSelectRole":[32],"selectedRoleName":[32],"loading":[32],"template":[32]},[[4,"keydown","handleKeyDown"]],{"templateId":["onTemplateIdChanged"]}],[0,"verdocs-preview",{"endpoint":[16],"templateId":[1,"template-id"],"loading":[32],"template":[32]},null,{"templateId":["onTemplateIdChanged"]}],[0,"verdocs-send",{"endpoint":[16],"templateId":[513,"template-id"],"environment":[1],"containerId":[32],"showPickerForId":[32],"sessionContacts":[32],"sending":[32],"rolesCompleted":[32],"loading":[32],"template":[32],"reset":[64]},null,{"templateId":["onTemplateIdChanged"]}],[0,"verdocs-template-roles",{"endpoint":[16],"templateId":[1,"template-id"],"showingRoleDialog":[32],"sender":[32],"dragging":[32],"loading":[32],"template":[32]}],[0,"verdocs-template-attachments",{"endpoint":[16],"templateId":[1,"template-id"],"uploading":[32],"progressLabel":[32],"progressPercent":[32],"showDeleteError":[32],"confirmDeleteDocument":[32],"loading":[32],"template":[32]}],[0,"verdocs-template-build-tabs",{"endpoint":[16],"templateId":[1537,"template-id"],"step":[1537],"loading":[32],"template":[32]},null,{"templateId":["onTemplateIdChanged"],"step":["onStepChanged"]}]]]]'),t)]}}))}))}))}}}));
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,a,i){function n(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,s){function d(e){try{l(i.next(e))}catch(e){s(e)}}function o(e){try{l(i["throw"](e))}catch(e){s(e)}}function l(e){e.done?a(e.value):n(e.value).then(d,o)}l((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var a={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,n,s,d;return d={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(d[Symbol.iterator]=function(){return this}),d;function o(e){return function(t){return l([e,t])}}function l(o){if(i)throw new TypeError("Generator is already executing.");while(d&&(d=0,o[0]&&(a=0)),a)try{if(i=1,n&&(s=o[0]&2?n["return"]:o[0]?n["throw"]||((s=n["return"])&&s.call(n),0):n.next)&&!(s=s.call(n,o[1])).done)return s;if(n=0,s)o=[o[0]&2,s.value];switch(o[0]){case 0:case 1:s=o;break;case 4:a.label++;return{value:o[1],done:false};case 5:a.label++;n=o[1];o=[0];continue;case 7:o=a.ops.pop();a.trys.pop();continue;default:if(!(s=a.trys,s=s.length>0&&s[s.length-1])&&(o[0]===6||o[0]===2)){a=0;continue}if(o[0]===3&&(!s||o[1]>s[0]&&o[1]<s[3])){a.label=o[1];break}if(o[0]===6&&a.label<s[1]){a.label=s[1];s=o;break}if(s&&a.label<s[2]){a.label=s[2];a.ops.push(o);break}if(s[2])a.ops.pop();a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e];n=0}finally{i=s=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};System.register(["./p-9186f42e.system.js","./p-56ba5cbf.system.js"],(function(e,t){"use strict";var a,i,n;return{setters:[function(t){a=t.p;i=t.b;e("setNonce",t.s)},function(e){n=e.g}],execute:function(){var e=this;var s=function(){var e=t.meta.url;var i={};if(e!==""){i.resourcesUrl=new URL(".",e).href}return a(i)};s().then((function(t){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,n()];case 1:e.sent();return[2,i(JSON.parse('[["p-9021fc7b.system",[[0,"verdocs-build",{"endpoint":[16],"templateId":[1537,"template-id"],"step":[1537],"loading":[32],"template":[32]},null,{"templateId":["onTemplateIdChanged"],"step":["onStepChanged"]}]]],["p-b0fbfc24.system",[[0,"verdocs-envelopes-list",{"endpoint":[16],"view":[1537],"status":[1537],"sort":[1537],"match":[1537],"showPagination":[4,"show-pagination"],"rowsPerPage":[2,"rows-per-page"],"selectedPage":[2,"selected-page"],"count":[32],"initiallyLoaded":[32],"loading":[32],"selectedEnvelopes":[32],"envelopes":[32]},null,{"view":["handleViewUpdated"],"status":["handleStatusUpdated"],"sort":["handleSortUpdated"],"match":["handleMatchUpdated"],"selectedPage":["handlePageUpdated"]}]]],["p-41f22b0a.system",[[0,"verdocs-sign",{"endpoint":[1040],"envelopeId":[513,"envelope-id"],"roleId":[513,"role-id"],"inviteCode":[513,"invite-code"],"headerTargetId":[1,"header-target-id"],"roleNames":[32],"sortedRecipients":[32],"recipient":[32],"hasSignature":[32],"nextButtonLabel":[32],"nextSubmits":[32],"fatalErrorHeader":[32],"fatalErrorMessage":[32],"focusedField":[32],"submitting":[32],"submitted":[32],"isDone":[32],"showDone":[32],"showLoadError":[32],"finishLater":[32],"showFinishLater":[32],"agreed":[32],"documentsSingularPlural":[32],"kbaStep":[32],"kbaQuestions":[32],"showSpinner":[32],"kbaChoices":[32],"loading":[32],"envelope":[32]}]]],["p-53f4c7c3.system",[[0,"verdocs-templates-list",{"endpoint":[16],"visibility":[1537],"starred":[1537],"sort":[1537],"name":[1537],"allowedActions":[1040],"showPagination":[4,"show-pagination"],"rowsPerPage":[2,"rows-per-page"],"selectedPage":[2,"selected-page"],"count":[32],"initiallyLoaded":[32],"loading":[32],"confirmDelete":[32],"templates":[32],"localNameFilter":[32]},null,{"sharing":["handleSharingUpdated"],"starred":["handleStarredUpdated"],"sort":["handleSortUpdated"],"name":["handleNameUpdated"],"selectedPage":["handlePageUpdated"]}]]],["p-3cc50f0b.system",[[0,"verdocs-field-payment",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"done":[516],"editable":[516],"moveable":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"fields":[16],"pageNum":[2,"page-num"],"roleName":[1,"role-name"],"fieldId":[1,"field-id"],"recipients":[8],"selectedRoleName":[1,"selected-role-name"],"pdfPages":[16],"currentSignature":[1,"current-signature"],"currentSignatureId":[1,"current-signature-id"],"currentInitial":[1,"current-initial"],"currentInitialId":[1,"current-initial-id"],"signed":[4],"roleindex":[2],"showingProperties":[32],"focused":[32],"preparedMessage":[32],"signatureUrl":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["p-00ed440b.system",[[0,"verdocs-envelope-sidebar",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"activeTab":[32],"panelOpen":[32],"showRecipientDialog":[32],"showCancelDialog":[32],"remindersEnabled":[32],"updatingReminders":[32],"initialReminder":[32],"followupReminders":[32],"loading":[32],"envelope":[32]}]]],["p-cbb75c5e.system",[[0,"verdocs-template-create",{"endpoint":[16],"maxSize":[1026,"max-size"],"file":[32],"creating":[32],"progressLabel":[32],"progressPercent":[32],"errorMessage":[32]}]]],["p-4e9e154f.system",[[0,"verdocs-auth",{"endpoint":[16],"visible":[4],"logo":[1],"displayMode":[1025,"display-mode"],"org_name":[32],"first_name":[32],"last_name":[32],"email":[32],"verificationCode":[32],"newPassword":[32],"password":[32],"confirmpass":[32],"submitting":[32],"resendDisabled":[32],"session":[32],"profile":[32]}]]],["p-19462841.system",[[0,"verdocs-envelope-recipient-summary",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"canSendAnother":[4,"can-send-another"],"canView":[4,"can-view"],"canDone":[4,"can-done"],"isOpen":[32],"recipientStatusIcons":[32],"containerId":[32],"gettingLinks":[32],"links":[32],"loading":[32],"envelope":[32]}]]],["p-1d5b9103.system",[[4,"verdocs-dialog"]]],["p-90bc3ad0.system",[[0,"verdocs-quick-functions",{"endpoint":[16]}]]],["p-6237ce51.system",[[0,"verdocs-radio-button",{"checked":[4],"name":[1],"value":[1],"disabled":[4]}]]],["p-d5870e33.system",[[0,"verdocs-search-box",{"endpoint":[16],"placeholder":[1],"type":[1],"query":[1],"grabsFocus":[4,"grabs-focus"],"focusField":[64]}]]],["p-ac6ecfad.system",[[0,"verdocs-search-tabs",{"selected":[32]}]]],["p-9227d400.system",[[0,"verdocs-table",{"columns":[16],"data":[16]}]]],["p-ad3d07a6.system",[[0,"verdocs-template-card",{"template":[16]}]]],["p-5824962b.system",[[0,"verdocs-template-tags",{"tags":[16]}]]],["p-761f6656.system",[[0,"verdocs-toggle",{"options":[16],"theme":[1],"selectedOption":[32]}]]],["p-2eae32d9.system",[[0,"verdocs-status-indicator",{"size":[1],"theme":[1],"status":[1],"envelope":[16],"isOpen":[32],"containerId":[32]}]]],["p-417f71da.system",[[0,"verdocs-template-star",{"endpoint":[16],"template":[1040],"updating":[32]}]]],["p-7b1e00e5.system",[[0,"verdocs-envelope-document-page",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"documentId":[1,"document-id"],"pageNumber":[2,"page-number"],"virtualWidth":[2,"virtual-width"],"virtualHeight":[1026,"virtual-height"],"layers":[16],"type":[1],"containerId":[32],"renderedWidth":[32],"renderedHeight":[32],"naturalWidth":[32],"naturalHeight":[32],"aspectRatio":[32],"skipFirstNotification":[32],"pageDisplayUri":[32]}]]],["p-1e191c20.system",[[0,"verdocs-help-icon",{"text":[1],"icon":[1],"containerId":[32]}],[0,"verdocs-button",{"label":[1],"startIcon":[1,"start-icon"],"endIcon":[1,"end-icon"],"size":[1],"type":[1],"variant":[1],"disabled":[4]}]]],["p-e3077c5e.system",[[0,"verdocs-view",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"headerTargetId":[1,"header-target-id"],"canceling":[32],"showCancelDone":[32],"showLoadError":[32],"loading":[32],"envelope":[32]}],[0,"verdocs-kba-dialog",{"step":[2],"steps":[2],"helptitle":[1],"helptext":[1],"mode":[1],"label":[1],"placeholder":[1],"recipient":[16],"choices":[16],"response":[32],"updatedRecipient":[32]}]]],["p-fda9c437.system",[[0,"verdocs-envelope-recipient-link",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"roleName":[1,"role-name"],"isOpen":[32],"gettingLink":[32],"link":[32],"loading":[32],"envelope":[32],"recipient":[32]}],[0,"verdocs-switch",{"checked":[1028],"theme":[1],"disabled":[4]}]]],["p-ea078594.system",[[0,"verdocs-template-role-properties",{"endpoint":[16],"templateId":[1,"template-id"],"roleName":[1,"role-name"],"dirty":[32],"saving":[32],"name":[32],"type":[32],"first_name":[32],"last_name":[32],"email":[32],"phone":[32],"delegator":[32],"loading":[32],"template":[32]}],[4,"verdocs-menu-panel",{"side":[1],"overlay":[4],"width":[2]},[[4,"click","handleClick"]]]]],["p-e438bd02.system",[[4,"verdocs-button-panel",{"icon":[1],"showPanel":[64],"hidePanel":[64],"toggle":[64]}],[4,"verdocs-tabs",{"tabs":[16],"selectedTab":[2,"selected-tab"]}]]],["p-6b4de004.system",[[0,"verdocs-pagination",{"selectedPage":[1538,"selected-page"],"itemCount":[2,"item-count"],"perPage":[2,"per-page"]}],[0,"verdocs-quick-filter",{"options":[16],"label":[1],"value":[1537],"placeholder":[1],"open":[32]}]]],["p-94fe5817.system",[[0,"verdocs-ok-dialog",{"heading":[1],"message":[1],"buttonLabel":[1,"button-label"],"showCancel":[4,"show-cancel"],"closed":[32]}]]],["p-bbf30adc.system",[[0,"verdocs-toolbar-icon",{"text":[1],"icon":[1],"placement":[1],"containerId":[32]}],[0,"verdocs-template-document-page",{"endpoint":[16],"editable":[4],"disabled":[4],"done":[4],"templateId":[1,"template-id"],"documentId":[1,"document-id"],"pageNumber":[2,"page-number"],"virtualWidth":[2,"virtual-width"],"virtualHeight":[1026,"virtual-height"],"layers":[16],"containerId":[32],"renderedWidth":[32],"renderedHeight":[32],"naturalWidth":[32],"naturalHeight":[32],"aspectRatio":[32],"skipFirstNotification":[32],"pageDisplayUri":[32],"xScale":[32],"yScale":[32],"loading":[32],"template":[32]}]]],["p-8d7d61ee.system",[[0,"verdocs-contact-picker",{"endpoint":[16],"templateRole":[16],"contactSuggestions":[16],"first_name":[32],"last_name":[32],"email":[32],"phone":[32],"zip":[32],"address":[32],"message":[32],"showSuggestions":[32],"showMessage":[32],"delegator":[32],"showKba":[32],"kba_method":[32],"kba_pin":[32],"nameFieldId":[32],"firstNameFieldId":[32],"lastNameFieldId":[32],"emailFieldId":[32],"phoneFieldId":[32]}],[0,"verdocs-toggle-button",{"active":[4],"icon":[1],"label":[1],"size":[1],"_active":[32]}]]],["p-e6d711e0.system",[[0,"verdocs-file-chooser",{"endpoint":[16],"file":[32]}],[0,"verdocs-progress-bar",{"label":[1],"showPercent":[4,"show-percent"],"percent":[2]}]]],["p-f84932fd.system",[[0,"verdocs-spinner",{"size":[2],"mode":[1]}]]],["p-306bde40.system",[[0,"verdocs-organization-card",{"organization":[16],"hovered":[32]},[[1,"mouseover","onMouseOver"],[1,"mouseout","onMouseOut"]]],[4,"verdocs-portal",{"anchor":[1],"voffset":[2]},[[11,"scroll","handleScroll"],[9,"resize","handleResize"],[4,"click","handleClick"]]]]],["p-d8dae4e9.system",[[0,"verdocs-dropdown",{"options":[16],"containerId":[32],"showPicker":[32]}]]],["p-eb3ceb39.system",[[0,"verdocs-template-field-properties",{"endpoint":[16],"templateId":[1,"template-id"],"fieldName":[1025,"field-name"],"helpText":[1,"help-text"],"dirty":[32],"label":[32],"type":[32],"name":[32],"required":[32],"roleName":[32],"group":[32],"fieldType":[32],"options":[32],"placeholder":[32],"defaultValue":[32],"showingHelp":[32],"loading":[32],"template":[32]}],[0,"verdocs-checkbox",{"checked":[4],"name":[1],"label":[1],"value":[1],"theme":[1],"disabled":[4]}],[0,"verdocs-select-input",{"value":[1],"label":[1],"options":[16],"disabled":[4]}],[0,"verdocs-component-error",{"message":[1]}],[0,"verdocs-loader"],[0,"verdocs-text-input",{"value":[1537],"label":[1],"placeholder":[1],"autocomplete":[1],"helpText":[1,"help-text"],"clearable":[4],"copyable":[4],"type":[1],"disabled":[4],"required":[4],"showingPw":[32]}]]],["p-8bdd951b.system",[[0,"verdocs-field-attachment",{"endpoint":[16],"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"dialogOpen":[32],"selectedFile":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-initial",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"initials":[513],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"tempInitials":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-signature",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"name":[513],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"tempSignature":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-checkbox",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"done":[516],"editable":[516],"moveable":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-date",{"source":[513],"sourceid":[513],"fieldname":[513],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"field":[16],"containerId":[32],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-dropdown",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-radio",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"required":[516],"done":[516],"editable":[516],"moveable":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-textarea",{"endpoint":[16],"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-textbox",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"multiline":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-timestamp",{"source":[513],"sourceid":[513],"fieldname":[513],"field":[16],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[2],"showingProperties":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-initial-dialog",{"initials":[1],"fontLoaded":[32],"enteredInitials":[32],"mode":[32]}],[0,"verdocs-signature-dialog",{"name":[1],"fontLoaded":[32],"enteredName":[32],"mode":[32]}],[0,"verdocs-upload-dialog",{"maxSize":[1026,"max-size"],"existingFile":[1032,"existing-file"],"draggingOver":[32],"confirmDelete":[32],"selectedFiles":[32],"errorMessage":[32]}]]],["p-e77c1fcc.system",[[0,"verdocs-template-fields",{"endpoint":[16],"templateId":[1537,"template-id"],"toolbarTargetId":[1,"toolbar-target-id"],"placing":[32],"showMustSelectRole":[32],"selectedRoleName":[32],"loading":[32],"template":[32]},[[4,"keydown","handleKeyDown"]],{"templateId":["onTemplateIdChanged"]}],[0,"verdocs-preview",{"endpoint":[16],"templateId":[1,"template-id"],"loading":[32],"template":[32]},null,{"templateId":["onTemplateIdChanged"]}],[0,"verdocs-send",{"endpoint":[16],"templateId":[513,"template-id"],"environment":[1],"containerId":[32],"showPickerForId":[32],"sessionContacts":[32],"sending":[32],"rolesCompleted":[32],"loading":[32],"template":[32],"reset":[64]},null,{"templateId":["onTemplateIdChanged"]}],[0,"verdocs-template-roles",{"endpoint":[16],"templateId":[1,"template-id"],"showingRoleDialog":[32],"sender":[32],"dragging":[32],"loading":[32],"template":[32]}],[0,"verdocs-template-attachments",{"endpoint":[16],"templateId":[1,"template-id"],"uploading":[32],"progressLabel":[32],"progressPercent":[32],"showDeleteError":[32],"confirmDeleteDocument":[32],"loading":[32],"template":[32]}],[0,"verdocs-template-build-tabs",{"endpoint":[16],"templateId":[1537,"template-id"],"step":[1537],"loading":[32],"template":[32]},null,{"templateId":["onTemplateIdChanged"],"step":["onStepChanged"]}]]]]'),t)]}}))}))}))}}}));
|