@verdocs/web-sdk 1.13.5 → 1.13.7
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/README.md +12 -0
- package/dist/cjs/{TemplateStore-01ff3237.js → TemplateStore-df478971.js} +1 -1
- package/dist/cjs/{Templates-e258cbd5.js → Templates-24580a13.js} +36 -4
- package/dist/cjs/{popper-11d5f714.js → popper-9def2535.js} +3 -4
- package/dist/cjs/verdocs-build.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-button-panel_3.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-checkbox_4.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-dropdown_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-textbox.cjs.entry.js +4 -1
- package/dist/cjs/verdocs-preview.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-quick-functions_3.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-send.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-status-indicator.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-attachments.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-template-create_3.cjs.entry.js +5 -9
- package/dist/cjs/verdocs-template-document-page.cjs.entry.js +52 -2
- package/dist/cjs/verdocs-template-name.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-template-properties.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-template-reminders.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-template-role-properties_2.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-template-visibility.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-toolbar-icon.cjs.entry.js +1 -1
- package/dist/collection/components/fields/verdocs-field-textbox/verdocs-field-textbox.js +4 -1
- package/dist/collection/components/templates/verdocs-template-create/verdocs-template-create.js +4 -8
- package/dist/collection/utils/utils.js +9 -0
- package/dist/components/Templates.js +36 -4
- package/dist/components/popper.js +3 -4
- package/dist/components/verdocs-field-textbox.js +4 -1
- package/dist/components/verdocs-template-create2.js +4 -8
- package/dist/components/verdocs-template-document-page2.js +51 -1
- package/dist/docs.json +1 -1
- package/dist/esm/{TemplateStore-91a71f46.js → TemplateStore-373c72a8.js} +1 -1
- package/dist/esm/{Templates-ca52ef90.js → Templates-67172396.js} +36 -4
- package/dist/esm/{popper-f860750c.js → popper-bfa25c7f.js} +3 -4
- package/dist/esm/verdocs-build.entry.js +2 -2
- package/dist/esm/verdocs-button-panel_3.entry.js +3 -3
- package/dist/esm/verdocs-checkbox_4.entry.js +1 -1
- package/dist/esm/verdocs-dropdown_2.entry.js +1 -1
- package/dist/esm/verdocs-field-textbox.entry.js +4 -1
- package/dist/esm/verdocs-preview.entry.js +2 -2
- package/dist/esm/verdocs-quick-functions_3.entry.js +1 -1
- package/dist/esm/verdocs-send.entry.js +2 -2
- package/dist/esm/verdocs-status-indicator.entry.js +1 -1
- package/dist/esm/verdocs-template-attachments.entry.js +2 -2
- package/dist/esm/verdocs-template-create_3.entry.js +5 -9
- package/dist/esm/verdocs-template-document-page.entry.js +51 -1
- package/dist/esm/verdocs-template-name.entry.js +2 -2
- package/dist/esm/verdocs-template-properties.entry.js +2 -2
- package/dist/esm/verdocs-template-reminders.entry.js +2 -2
- package/dist/esm/verdocs-template-role-properties_2.entry.js +2 -2
- package/dist/esm/verdocs-template-visibility.entry.js +2 -2
- package/dist/esm/verdocs-toolbar-icon.entry.js +1 -1
- package/dist/esm-es5/{TemplateStore-91a71f46.js → TemplateStore-373c72a8.js} +1 -1
- package/dist/esm-es5/Templates-67172396.js +1 -0
- package/dist/esm-es5/popper-bfa25c7f.js +1 -0
- package/dist/esm-es5/verdocs-build.entry.js +1 -1
- package/dist/esm-es5/verdocs-button-panel_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-checkbox_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-dropdown_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-textbox.entry.js +1 -1
- package/dist/esm-es5/verdocs-preview.entry.js +1 -1
- package/dist/esm-es5/verdocs-quick-functions_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-send.entry.js +1 -1
- package/dist/esm-es5/verdocs-status-indicator.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-attachments.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-create_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-document-page.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-name.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-properties.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-reminders.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-role-properties_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-visibility.entry.js +1 -1
- package/dist/esm-es5/verdocs-toolbar-icon.entry.js +1 -1
- package/dist/types/components/embeds/verdocs-build/utils.d.ts +2 -2
- package/dist/types/components/embeds/verdocs-sign/utils.d.ts +2 -2
- package/dist/types/components/embeds/verdocs-sign/verdocs-sign.d.ts +3 -3
- package/dist/types/utils/utils.d.ts +11 -7
- package/dist/typings.d.ts +4 -0
- package/dist/verdocs-web-sdk/{p-de4c38a1.entry.js → p-068e6212.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-126c0301.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-650b9205.system.entry.js → p-1db79af9.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-71adad1c.entry.js → p-1fc2dcb7.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3b1b11a8.system.entry.js → p-2287f1bc.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-2d39a000.entry.js → p-27332125.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c25d965d.js → p-2fc46a8b.js} +1 -1
- package/dist/verdocs-web-sdk/p-4ac861c9.system.js +1 -0
- package/dist/verdocs-web-sdk/{p-fccb4fec.system.entry.js → p-527f15bb.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-5bb80e03.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-5e0c6e7c.system.js +1 -0
- package/dist/verdocs-web-sdk/{p-1a34942f.system.entry.js → p-5e3893ec.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-32fb9679.entry.js → p-658c3ab7.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f1edfd5a.system.js → p-66c74103.system.js} +1 -1
- package/dist/verdocs-web-sdk/p-6caf1137.system.js +1 -1
- package/dist/verdocs-web-sdk/{p-4eb829ca.system.entry.js → p-6ea848fe.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-36f78b1f.system.entry.js → p-71a1576a.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-39e906e0.entry.js → p-756d5c24.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-7e8fe43e.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-822ba467.js +1 -0
- package/dist/verdocs-web-sdk/{p-62e12e8f.system.entry.js → p-82512045.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c9705b22.entry.js → p-82854066.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-1886b178.entry.js → p-86e507c1.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-cc396cda.entry.js → p-879e9572.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e4b56475.entry.js → p-87f428fb.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-b3bca701.entry.js → p-91f062a8.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f7cfaa04.system.entry.js → p-920fd6d9.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-38d0af92.entry.js → p-97be89cf.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-9d707f6e.js +1 -0
- package/dist/verdocs-web-sdk/{p-13f91d03.system.entry.js → p-a3282274.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c8901fde.entry.js → p-a5a530fa.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-a5f3f29c.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-5b4dd6a0.entry.js → p-ba591e02.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-2216464c.system.entry.js → p-bd35fd77.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ec81b1f2.entry.js → p-bd8ff2a6.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-34d3d150.system.entry.js → p-c9ff6acb.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-d28acca1.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-d63fe7e9.system.entry.js → p-d67b2a26.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-1b21b08d.system.entry.js → p-d714a804.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a3747387.system.entry.js → p-d936d293.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a6096629.system.entry.js → p-e59061aa.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-8c9caa8a.system.entry.js → p-f0d1c6bd.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-40bb871d.entry.js → p-fc67ddc9.entry.js} +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +8 -5
- package/dist/cjs/TemplateDocuments-1c6620b0.js +0 -78
- package/dist/components/TemplateDocuments.js +0 -75
- package/dist/esm/TemplateDocuments-618934d0.js +0 -75
- package/dist/esm-es5/TemplateDocuments-618934d0.js +0 -1
- package/dist/esm-es5/Templates-ca52ef90.js +0 -1
- package/dist/esm-es5/popper-f860750c.js +0 -1
- package/dist/verdocs-web-sdk/p-194a8f9c.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-3751d683.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-47714747.system.js +0 -1
- package/dist/verdocs-web-sdk/p-4cd5eb1f.js +0 -1
- package/dist/verdocs-web-sdk/p-63398dca.system.js +0 -1
- package/dist/verdocs-web-sdk/p-77e616b7.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-923f56f3.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-b86b362a.js +0 -1
- package/dist/verdocs-web-sdk/p-e12b7fbc.system.js +0 -1
- package/dist/verdocs-web-sdk/p-ec26fc38.js +0 -1
- package/dist/verdocs-web-sdk/p-f44f5d73.entry.js +0 -1
@@ -1 +0,0 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,o,r){function i(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,n){function s(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r["throw"](e))}catch(e){n(e)}}function l(e){e.done?o(e.value):i(e.value).then(s,a)}l((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var o={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},r,i,n,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(s){if(r)throw new TypeError("Generator is already executing.");while(o)try{if(r=1,i&&(n=s[0]&2?i["return"]:s[0]?i["throw"]||((n=i["return"])&&n.call(i),0):i.next)&&!(n=n.call(i,s[1])).done)return n;if(i=0,n)s=[s[0]&2,n.value];switch(s[0]){case 0:case 1:n=s;break;case 4:o.label++;return{value:s[1],done:false};case 5:o.label++;i=s[1];s=[0];continue;case 7:s=o.ops.pop();o.trys.pop();continue;default:if(!(n=o.trys,n=n.length>0&&n[n.length-1])&&(s[0]===6||s[0]===2)){o=0;continue}if(s[0]===3&&(!n||s[1]>n[0]&&s[1]<n[3])){o.label=s[1];break}if(s[0]===6&&o.label<n[1]){o.label=n[1];n=s;break}if(n&&o.label<n[2]){o.label=n[2];o.ops.push(s);break}if(n[2])o.ops.pop();o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e];i=0}finally{r=n=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,o){if(o||arguments.length===2)for(var r=0,i=t.length,n;r<i;r++){if(n||!(r in t)){if(!n)n=Array.prototype.slice.call(t,0,r);n[r]=t[r]}}return e.concat(n||Array.prototype.slice.call(t))};System.register(["./p-871407e9.system.js","./p-54498887.system.js","./p-47714747.system.js","./p-63398dca.system.js","./p-c44fd897.system.js","./p-187b20b7.system.js","./p-3305a941.system.js","./p-b1288daf.system.js","./p-201f27f6.system.js","./p-f1edfd5a.system.js","./p-8229e6df.system.js","./p-05eb4fed.system.js","./p-bbee73c8.system.js","./p-d1c37175.system.js","./p-327858f0.system.js","./p-51a3ea62.system.js"],(function(e){"use strict";var t,o,r,i,n,s,a,l,d,c,p,u,h,v,g,f,m,x,b,w,y,q,C,k,E;return{setters:[function(e){t=e.r;o=e.c;r=e.h;i=e.H;n=e.F;s=e.a},function(){},function(e){a=e.c;l=e.g},function(e){d=e.c},function(e){c=e.V;p=e.T},function(e){u=e.S},function(e){h=e.i},function(e){v=e.u;g=e.c},function(e){f=e.a;m=e.r;x=e.c;b=e.d;w=e.e},function(e){y=e.g;q=e.a},function(e){C=e.u;k=e.c},function(e){E=e.g},function(){},function(){},function(){},function(){}],execute:function(){var _;var L='verdocs-template-create{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-create form{background-color:#ffffff;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-create form .upload-box{-webkit-box-sizing:border-box;box-sizing:border-box;width:320px;text-align:center;padding:44px 18px 66px;border:2px dashed #979797;color:rgba(0, 0, 0, 0.54)}verdocs-template-create form .upload-box svg{width:64px;fill:#5c6575}verdocs-template-create .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-create .progress-wrapper{padding:20px}verdocs-template-create .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-create .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-create ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-create ::-moz-placeholder{color:#aaaaaa}verdocs-template-create :-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::placeholder{color:#aaaaaa}';var M=" ";var Z='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24"><path d="M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z"></path></svg>';var R=e("verdocs_template_create",function(){function e(e){t(this,e);this.exit=o(this,"exit",7);this.next=o(this,"next",7);this.sdkError=o(this,"sdkError",7);this.endpoint=c.getDefault();this.file=undefined;this.creating=false;this.progressLabel="Uploading...";this.progressPercent=0}e.prototype.componentWillLoad=function(){this.endpoint.setTimeout(3e4);this.endpoint.loadSession()};e.prototype.handleFileChanged=function(e){var t;this.file=((t=e.target.files)===null||t===void 0?void 0:t[0])||null;console.log("[CREATE] Selected file",this.file)};e.prototype.handleUpload=function(e){e.stopPropagation();var t=document.getElementById("verdocs-template-create-file");t.click()};e.prototype.handleCancel=function(e){e.stopPropagation();this.exit.emit()};e.prototype.handleSubmit=function(e){return __awaiter(this,void 0,void 0,(function(){var t,o,r,i,n,s,c,p;var h=this;return __generator(this,(function(v){switch(v.label){case 0:e.stopPropagation();console.log("Submitting");if(!this.file){return[2]}this.creating=true;this.progressLabel="Uploading...";v.label=1;case 1:v.trys.push([1,5,,6]);return[4,a(this.endpoint,{name:this.file.name})];case 2:n=v.sent();console.log("[CREATE] Created template",n);return[4,d(this.endpoint,n.id,this.file,(function(e){if(e>=99){h.progressLabel="Processing...";h.progressPercent=100}else{h.progressPercent=e}}))];case 3:s=v.sent();console.log("[CREATE] Created document",s);return[4,l(this.endpoint,n.id)];case 4:c=v.sent();(t=this.next)===null||t===void 0?void 0:t.emit(c);this.creating=false;this.progressLabel="";this.progressPercent=0;return[3,6];case 5:p=v.sent();console.log("[CREATE] Error creating template",p);(o=this.sdkError)===null||o===void 0?void 0:o.emit(new u(p.message,(r=p.response)===null||r===void 0?void 0:r.status,(i=p.response)===null||i===void 0?void 0:i.data));this.creating=false;return[3,6];case 6:return[2]}}))}))};e.prototype.render=function(){var e=this;if(!this.endpoint.session){return r(i,null,r("verdocs-component-error",{message:"You must be authenticated to use this module."}))}return r("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},r("input",{type:"file",id:"verdocs-template-create-file",multiple:true,accept:"application/pdf",style:{display:"none"},onChange:function(t){return e.handleFileChanged(t)}}),this.creating?r("div",{class:"loader-wrapper"},r("verdocs-loader",null),this.progressLabel&&r("div",{class:"progress-wrapper"},r("verdocs-progress-bar",{showPercent:true,percent:this.progressPercent,label:this.progressLabel}))):r("div",{class:"upload-box"},r("div",null,r("span",{innerHTML:Z})),r("div",{style:{marginTop:"20px",fontSize:"20px",fontWeight:"bold",overflowWrap:"anywhere"}},this.file?this.file.name:"Drag a file here"),r("div",{style:{marginTop:"20px",marginBottom:"20px",fontSize:"16px",height:"20px"}},this.file?M:"Or, if you prefer..."),r("verdocs-button",{label:this.file?"Select a different file":"Select a file from your computer",size:"small",onClick:function(t){return e.handleUpload(t)}})),r("div",{class:"buttons"},r("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:function(t){return e.handleCancel(t)},disabled:this.creating}),r("verdocs-button",{label:"Next",size:"small",onClick:function(t){return e.handleSubmit(t)},disabled:!this.file||this.creating})))};return e}());R.style=L;var H="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 #0000000f;box-shadow:0 0 10px 5px #0000000f}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{height:50px;display:-ms-flexbox;display:flex;-ms-flex:0 0 50px;flex:0 0 50px;-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}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_group{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_button_group{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 z='<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>';var S='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" 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"/></svg>';var A='<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>';var I='<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>';var V='<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>';var T='<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>';var D='<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>';var N='<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>';var P='<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>';var F='<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>';var j=[{id:"signature",tooltip:"Signature",icon:T},{id:"initial",tooltip:"Initials",icon:D},{id:"sep1",tooltip:"",icon:F},{id:"textbox",tooltip:"Text Box",icon:z},{id:"textarea",tooltip:"Text Area",icon:S},{id:"checkbox_group",tooltip:"Check Box",icon:A},{id:"radio_button_group",tooltip:"Radio Button",icon:I},{id:"dropdown",tooltip:"Dropdown",icon:P},{id:"sep2",tooltip:"",icon:F},{id:"date",tooltip:"Date",icon:V},{id:"timestamp",tooltip:"Timestamp",icon:N}];var B=e("verdocs_template_fields",function(){function e(e){t(this,e);this.sdkError=o(this,"sdkError",7);this.templateUpdated=o(this,"templateUpdated",7);this.pageHeights={};this.store=null;this.cachedPageInfo={};this.endpoint=c.getDefault();this.templateId=null;this.toolbarTargetId=null;this.placing=null;this.selectedRoleName="";this.rerender=1}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,o,r,i,n,s,a,l;return __generator(this,(function(d){switch(d.label){case 0:d.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[FIELDS] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[FIELDS] Unable to start builder session, must be authenticated");return[2]}a=this;return[4,y(this.endpoint,this.templateId,true)];case 1:a.store=d.sent();console.log("[FIELDS] Loading template ".concat(this.templateId),this.endpoint.session);this.selectedRoleName=((r=(o=(t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.roles)===null||o===void 0?void 0:o[0])===null||r===void 0?void 0:r.name)||"";console.log("Starting with role",this.selectedRoleName);return[3,3];case 2:l=d.sent();console.log("[FIELDS] Error with preview session",l);(i=this.sdkError)===null||i===void 0?void 0:i.emit(new u(l.message,(n=l.response)===null||n===void 0?void 0:n.status,(s=l.response)===null||s===void 0?void 0:s.data));return[3,3];case 3:return[2]}}))}))};e.prototype.componentDidRender=function(){h.dynamicDrop(true);var e=this.toolbarTargetId?document.getElementById(this.toolbarTargetId):null;var t=document.getElementById("verdocs-template-fields-toolbar");if(e&&t){console.log("[FIELDS] Moving toolbar");t.remove();e.append(t)}};e.prototype.handleKeyDown=function(e){if(e.key==="Escape"){this.placing=null}};e.prototype.handleFieldChange=function(e,t,o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(r){console.log("[FIELDS] handleFieldChange",e,t,o);this.rerender++;return[2]}))}))};e.prototype.attachFieldAttributes=function(e,t,o,r){var i=this;r.addEventListener("input",(function(e){return i.handleFieldChange(t,e)}));r.addEventListener("settingsChanged",(function(){var n,s,a,l;i.selectedRoleName=t.role_name;console.log("settings changed",i.selectedRoleName,t);r.setAttribute("roleindex",f(q(i.store),t.role_name));r.field=(s=(n=i.store)===null||n===void 0?void 0:n.state)===null||s===void 0?void 0:s.fields.find((function(e){return e.name===t.name}));i.rerender++;r.setAttribute("rerender",i.rerender);(a=i.templateUpdated)===null||a===void 0?void 0:a.emit({endpoint:i.endpoint,template:(l=i.store)===null||l===void 0?void 0:l.state,event:"updated-field"});console.log("Re-rendering field",t.name,e.pageNumber);i.reRenderField(t,e.pageNumber);var d=m(t,e,o,{disabled:true,editable:true,draggable:true});if(!d){return}}));r.addEventListener("deleted",(function(){var e,o;console.log("deleted",i,t);r.remove();i.rerender++;(e=i.templateUpdated)===null||e===void 0?void 0:e.emit({endpoint:i.endpoint,template:(o=i.store)===null||o===void 0?void 0:o.state,event:"updated-field"})}));r.setAttribute("templateid",this.templateId);r.setAttribute("roleindex",o);r.setAttribute("pageNumber",e.pageNumber);r.setAttribute("xScale",e.xScale);r.setAttribute("yScale",e.yScale);r.setAttribute("name",t.name)};e.prototype.handlePageRendered=function(e){var t=this;var o;var r=e.detail;console.log("[FIELDS] Page rendered",r.pageNumber,r);this.cachedPageInfo[r.pageNumber]=r;this.pageHeights[r.pageNumber]=r.naturalHeight;var i=(o=this.store)===null||o===void 0?void 0:o.state.fields.filter((function(e){return e.page_sequence===r.pageNumber}));i.forEach((function(e){return t.reRenderField(e,r.pageNumber)}))};e.prototype.reRenderField=function(e,t){var o=this;var r=this.cachedPageInfo[t];var i=f(q(this.store),e.role_name);var n=m(e,r,i,{disabled:true,editable:true,draggable:true});if(!n){return}if(Array.isArray(n)){n.forEach((function(t){o.attachFieldAttributes(r,e,i,t);h(t).draggable({listeners:{start:function(e){console.log("[FIELDS] Drag started",e.type,e.target)},move:function(e){var t=+(e.target.getAttribute("posX")||0);var o=+(e.target.getAttribute("posY")||0);var r=+(e.target.getAttribute("xScale")||1);var i=+(e.target.getAttribute("yScale")||1);var n=e.dx/r+t;var s=e.dy/i+o;e.target.setAttribute("posX",n);e.target.setAttribute("posy",s);x(e.target,"translate","".concat(n,"px, ").concat(s,"px"))},end:o.handleMoveField.bind(o)}})}))}else{this.attachFieldAttributes(r,e,i,n);h(n).draggable({listeners:{start:function(e){console.log("[FIELDS] Drag started",e.type,e.target)},move:function(e){var t=+(e.target.getAttribute("posX")||0);var o=+(e.target.getAttribute("posY")||0);var r=+(e.target.getAttribute("xScale")||1);var i=+(e.target.getAttribute("yScale")||1);var n=e.dx/r+t;var s=e.dy/i+o;e.target.setAttribute("posX",n);e.target.setAttribute("posy",s);x(e.target,"translate","".concat(n,"px, ").concat(s,"px"))},end:this.handleMoveField.bind(this)}})}};e.prototype.handleMoveField=function(e){return __awaiter(this,void 0,void 0,(function(){var t,o,r,i,n,s,a,l,d,c,p,u,h,g,f,m,x,b,w,y,q;return __generator(this,(function(C){switch(C.label){case 0:o=e.target.getAttribute("pageNumber");r=this.cachedPageInfo[o],i=r.naturalWidth,n=i===void 0?612:i,s=r.naturalHeight,a=s===void 0?792:s,l=r.renderedHeight,d=l===void 0?792:l;console.log("[FIELDS] Drag ended",o,e.target);c=e.target.getBoundingClientRect();p=e.target.parentElement;u=p.getBoundingClientRect();h=Math.max(c.left-u.left,0);g=Math.max(d-(u.bottom-c.bottom),0);f=this.viewCoordinatesToPageCoordinates(h,g,o,n-e.rect.width,a-e.rect.height),m=f.x,x=f.y;b=e.target.getAttribute("name");w=+(e.target.getAttribute("option")||"0");y=(t=this.store)===null||t===void 0?void 0:t.state.fields.find((function(e){return e.name===b}));console.log("Will update",b,w,y);if(!y)return[3,2];switch(y.type){case"attachment":case"payment":case"initial":case"signature":case"date":case"dropdown":case"textarea":case"textbox":case"timestamp":y.setting.x=m;y.setting.y=x;break;case"checkbox_group":case"radio_button_group":{q=y.setting.options[w];if(q){q.x=m;q.y=x}}break}return[4,v(this.endpoint,this.templateId,b,y)];case 1:C.sent();this.handlePageRendered({detail:this.cachedPageInfo[o]});C.label=2;case 2:return[2]}}))}))};e.prototype.generateFieldName=function(e,t){var o,r;var i=1;var n;do{n="".concat(e,"P").concat(t,"-").concat(i);console.log("testing field",n);i++}while((o=this.store)===null||o===void 0?void 0:o.state.fields.some((function(e){return e.name===n})));console.log("Will use field name",n,(r=this.store)===null||r===void 0?void 0:r.state.fields);return n};e.prototype.viewCoordinatesToPageCoordinates=function(e,t,o,r,i){var n=this.cachedPageInfo[o],s=n.xScale,a=s===void 0?1:s,l=n.yScale,d=l===void 0?1:l,c=n.renderedHeight,p=c===void 0?792:c;var u=Math.floor(Math.min(e/a,r));var h=Math.floor(Math.min(Math.max(p-t,0)/d,i));return{x:u,y:h}};e.prototype.handleClickPage=function(e,t){return __awaiter(this,void 0,void 0,(function(){var o,r,i,n,s,a,l,d,c,p,u,h,v,f,m,x,y,q;return __generator(this,(function(C){switch(C.label){case 0:if(!this.placing)return[3,2];console.log("Placing field",this.placing,t.sequence,e.offsetX,e.offsetY);n=t.sequence;s=e.offsetX;a=e.offsetY;l=b(this.placing);d=w(this.placing);c=this.cachedPageInfo[n];console.log("Cached page",c);p=c.naturalWidth,u=p===void 0?612:p,h=c.naturalHeight,v=h===void 0?792:h;f=this.viewCoordinatesToPageCoordinates(s,a,n,u-l,v-d);m=Math.floor(f.x);x=Math.floor(f.y);y={name:this.generateFieldName(this.placing,n),role_name:this.selectedRoleName,template_id:this.templateId,type:this.placing,required:true,page_sequence:n,validator:null,setting:{x:m,y:x},x:m,y:x,tabindex:0,width:l,height:d};switch(y.type){case"attachment":case"payment":y.setting={x:m,y:x};break;case"initial":case"signature":y.setting={x:m,y:x,result:""};break;case"checkbox_group":y.setting={minimum_checked:0,maximum_checked:1e3,options:[{id:"".concat(y.name,"-1"),value:"Option 1",checked:false,x:m,y:x}]};break;case"date":y.setting={x:m,y:x,width:l,height:d,result:""};break;case"dropdown":y.required=false;y.setting={x:m,y:x,width:l,height:d,value:null,placeholder:"Choose",options:[{id:"option-1",value:"Option 1"}]};break;case"radio_button_group":y.setting={options:[{id:"".concat(y.name,"-1"),value:"Option 1",selected:false,x:m,y:x}]};break;case"textarea":case"textbox":y.setting={x:m,y:x,width:l,height:d,result:"",leading:0,alignment:0,upperCase:false};break;case"timestamp":y.setting={x:m,y:x,width:l,height:d};break}if(y.type==="textarea"){y.type="textbox"}return[4,g(this.endpoint,this.templateId,y)];case 1:q=C.sent();console.log("Saved field",q);if(this.store.state){this.store.state.fields=__spreadArray(__spreadArray([],(o=this.store)===null||o===void 0?void 0:o.state.fields,true),[q],false)}this.placing=null;(r=this.templateUpdated)===null||r===void 0?void 0:r.emit({endpoint:this.endpoint,template:(i=this.store)===null||i===void 0?void 0:i.state,event:"added-field"});this.handlePageRendered({detail:this.cachedPageInfo[n]});C.label=2;case 2:return[2]}}))}))};e.prototype.render=function(){var e;var t=this;var o,n,s,a;if(!this.endpoint.session){return r(i,null,r("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(!((o=this.store)===null||o===void 0?void 0:o.state.isLoaded)){return r(i,null,r("verdocs-loader",null))}var l=__spreadArray([],(n=this.store)===null||n===void 0?void 0:n.state.pages,true);l.sort((function(e,t){return e.sequence-t.sequence}));var d=(a=(s=this.store)===null||s===void 0?void 0:s.state)===null||a===void 0?void 0:a.roles.map((function(e){return{value:e.name,label:e.name}}));return r(i,{class:this.placing?(e={},e["placing-".concat(this.placing)]=true,e):{},"data-r":this.rerender,onSubmit:function(){console.log("onSubmit")}},r("div",{id:"verdocs-template-fields-toolbar"},r("div",{class:"add-for"},"Add field:"),r("verdocs-select-input",{value:this.selectedRoleName,options:d,onInput:function(e){return t.selectedRoleName=e.target.value}}),j.map((function(e){return r("verdocs-toolbar-icon",{text:e.tooltip,icon:e.icon,onClick:function(){if(e.tooltip){t.placing=e.id}}})}))),r("div",{class:"pages"},l.map((function(e){return r("verdocs-template-document-page",{templateId:e.template_id,documentId:e.document_id,pageNumber:e.sequence,virtualWidth:612,virtualHeight:792,onClick:function(o){return t.handleClickPage(o,e)},onPageRendered:function(e){return t.handlePageRendered(e)},layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})}))))};return e}());B.style=H;var O='verdocs-template-roles{display:block;min-width:400px;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}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:#4c56cb;margin:0 0 10px 0}verdocs-template-roles>form .participants{position:relative}verdocs-template-roles>form .left-line{top:32px;left:11px;z-index:1;width:12px;bottom:30px;position:absolute;background:#ffffff;border-left:3px dotted #9b9b9b}verdocs-template-roles>form .row{display:-ms-flexbox;display:flex;-webkit-column-gap:0;-moz-column-gap:0;column-gap:0;min-height:35px;margin-left:40px;position:relative;-ms-flex-direction:row;flex-direction:row;padding:6px 0 4px 0}verdocs-template-roles>form .row .row-roles{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;-ms-flex-direction:row;flex-direction:row}verdocs-template-roles>form .row .icon{top:14px;z-index:2;left:-40px;width:24px;height:24px;position:absolute;background:#ffffff}verdocs-template-roles>form .row .sender{height:30px;display:-ms-flexbox;display:flex;font-size:14px;line-height:30px;-ms-flex-align:center;align-items:center;border-radius:30px;-ms-flex-direction:row;flex-direction:row;padding:0 5px 0 15px;border:1px solid #c6c9cc;background-color:#f5f5fa}verdocs-template-roles>form .row .complete{height:30px;display:-ms-flexbox;display:flex;font-size:14px;padding:0 15px;line-height:30px;-ms-flex-direction:row;flex-direction:row;border-radius:30px;background-color:#f5f5fa;border:1px solid #aeb4bf}verdocs-template-roles>form .row .label{font-weight:bold;margin-right:6px;color:#33364b}verdocs-template-roles>form .row .settings-button{display:-ms-flexbox;display:flex;cursor:pointer;margin:0 0 0 9px}verdocs-template-roles>form .row .recipient{height:30px;display:-ms-flexbox;display:flex;font-size:14px;border-radius:30px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:0 5px 0 6px;white-space:nowrap;border:2px solid #aeb4bf}verdocs-template-roles>form .row .recipient .type-icon{width:24px;height:24px;-webkit-transform:scale(0.8);transform:scale(0.8);opacity:0.6;margin:0 12px 0 0}verdocs-template-roles>form .row .recipient.dragging{position:absolute}verdocs-template-roles>form .row .recipient.dragging+.dropzone{display:none !important}verdocs-template-roles>form .row .dropzone{width:14px;height:30px;display:none}verdocs-template-roles>form .row .dropzone svg{fill:#cccccc}verdocs-template-roles>form .row .dropzone.visible{margin:0 7px;display:-ms-flexbox;display:flex;-ms-flex:0 0 14px;flex:0 0 14px}verdocs-template-roles>form .row .dropzone.active{-ms-flex:0 0 120px;flex:0 0 120px;border-radius:30px;background:#654dcb7f;border:1px dashed #654dcb}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.5;cursor:pointer;background:none}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 .add-role{display:none}verdocs-template-roles.dragging form .row .recipient+.dropzone{display:-ms-flexbox;display:flex}verdocs-template-roles.dragging .row.add-sequence{display:-ms-flexbox;display:flex}verdocs-template-roles.dragging .row.add-sequence .dropzone{opacity:0.5;-ms-flex:0 0 120px;flex:0 0 120px;border-radius:30px;-ms-flex-align:center;align-items:center;background:#654dcb7f;-ms-flex-pack:center;justify-content:center;border:1px dashed #654dcb}verdocs-template-roles.dragging .row.add-sequence .dropzone.active{opacity:1}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:20px;height:20px;stroke:#666666;margin-bottom:-5px}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}';var Q=(_={},_[p.EVERYONE]="Everyone",_[p.EVERYONE_AS_CREATOR]="Everyone as Me",_[p.ORGANIZATION_MEMBER]="Organization member",_[p.ORGANIZATION_MEMBER_AS_CREATOR]="Organization Member as Me",_[p.CREATOR]="Me",_);var U='<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>';var W='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="#00000089"><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>';var Y='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="#00000089"><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>';var X='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="#00000089"><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>';var G='<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>';var K='<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>';var J='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><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>';var $='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><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>';var ee=e("verdocs_template_roles",function(){function e(e){t(this,e);this.next=o(this,"next",7);this.exit=o(this,"exit",7);this.sdkError=o(this,"sdkError",7);this.templateUpdated=o(this,"templateUpdated",7);this.sequences=[];this.store=null;this.endpoint=c.getDefault();this.templateId="";this.showingRoleDialog=null;this.showingSenderDialog=false;this.sender=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,o,r,i;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[ROLES] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[ROLES] Unable to start builder session, must be authenticated");return[2]}r=this;return[4,y(this.endpoint,this.templateId,true)];case 1:r.store=n.sent();this.sortTemplateRoles();this.renumberTemplateRoles();return[3,3];case 2:i=n.sent();console.log("[FIELDS] Error with preview session",i);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new u(i.message,(t=i.response)===null||t===void 0?void 0:t.status,(o=i.response)===null||o===void 0?void 0:o.data));return[3,3];case 3:return[2]}}))}))};e.prototype.componentDidRender=function(){h.dynamicDrop(true);h(".recipient").draggable({listeners:{start:function e(t){t.target.classList.add("dragging");this.el.classList.add("dragging")}.bind(this),move:function e(t){var o=+(t.target.getAttribute("posX")||0);var r=+(t.target.getAttribute("posY")||0);var i=t.dx+o;var n=t.dy+r;t.target.setAttribute("posX",i);t.target.setAttribute("posy",n);t.target.style.transform="translate(".concat(i+100,"px, ").concat(n-40,"px)")}.bind(this),end:function e(t){t.target.classList.remove("dragging");this.el.classList.remove("dragging");t.target.setAttribute("posX",0);t.target.setAttribute("posy",0);t.target.style.transform="translate(0px, 0px)"}.bind(this)}});h(".dropzone").dropzone({overlap:.05,ondrop:function e(t){var o=this;var r,i,n,s,a;t.target.classList.remove("active");var l=t.relatedTarget.dataset.rolename;var d=+t.target.dataset.sequence;var c=+t.target.dataset.order;var p=(n=(i=(r=this.store)===null||r===void 0?void 0:r.state)===null||i===void 0?void 0:i.roles)===null||n===void 0?void 0:n.find((function(e){return e.name===l}));if(p){p.sequence=d;p.order=c;this.sortTemplateRoles();this.renumberTemplateRoles();this.forceRerender++;Promise.all((a=(s=this.store)===null||s===void 0?void 0:s.state)===null||a===void 0?void 0:a.roles.map((function(e){return C(o.endpoint,o.templateId,e.name,{sequence:e.sequence,order:e.order})}))).then((function(){var e,t;console.log("[ROLES] Updated roles");(e=o.templateUpdated)===null||e===void 0?void 0:e.emit({event:"updated-role",endpoint:o.endpoint,template:(t=o.store)===null||t===void 0?void 0:t.state})})).catch((function(e){return console.log("[ROLES] Role updates failed",e)}))}}.bind(this),ondropactivate:function(e){e.target.classList.add("visible")},ondropdeactivate:function(e){e.target.classList.remove("visible")},ondragenter:function(e){e.target.classList.add("active")},ondragleave:function(e){e.target.classList.remove("active")}})};e.prototype.handleCancel=function(){var e;(e=this.exit)===null||e===void 0?void 0:e.emit()};e.prototype.handleSubmit=function(){var e;(e=this.next)===null||e===void 0?void 0:e.emit()};e.prototype.sortTemplateRoles=function(){var e,t;(t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.roles.sort((function(e,t){return e.sequence===t.sequence?e.order-t.order:e.sequence-t.sequence}))};e.prototype.extractSequenceNumbers=function(){var e=this;var t,o;this.sequences=[];(o=(t=this.store)===null||t===void 0?void 0:t.state)===null||o===void 0?void 0:o.roles.forEach((function(t){if(!e.sequences.includes(t.sequence)){e.sequences.push(t.sequence)}}))};e.prototype.renumberTemplateRoles=function(){var e=this;this.extractSequenceNumbers();var t=[];this.sequences.sort((function(e,t){return e-t}));this.sequences.forEach((function(o,r){var i,n;(n=(i=e.store)===null||i===void 0?void 0:i.state)===null||n===void 0?void 0:n.roles.filter((function(e){return e.sequence===o})).forEach((function(e,o){if(!t.includes(e.name)){e.sequence=r+1;e.order=o+1;t.push(e.name)}}))}));this.extractSequenceNumbers()};e.prototype.getNextRoleName=function(){var e,t,o,r;var i="";var n=(t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.roles.length;do{n++;i="Recipient ".concat(n)}while(!i||((r=(o=this.store)===null||o===void 0?void 0:o.state)===null||r===void 0?void 0:r.roles.some((function(e){return e.name===i}))));return i};e.prototype.callCreateRole=function(e,t,o){var r=this;console.log("[ROLES] Will create role",{name:e,sequence:t,order:o});k(this.endpoint,this.templateId,{template_id:this.templateId,name:e,sequence:t,order:o,full_name:"",email:"",phone:"",type:"signer",delegator:false}).then((function(e){var t,o,i;console.log("[ROLES] Created role",e);r.store.state.roles=__spreadArray(__spreadArray([],(t=r.store)===null||t===void 0?void 0:t.state.roles,true),[e],false);r.renumberTemplateRoles();(o=r.templateUpdated)===null||o===void 0?void 0:o.emit({event:"created-role",endpoint:r.endpoint,template:(i=r.store)===null||i===void 0?void 0:i.state})})).catch((function(e){console.log("[ROLES] Error creating role",e)}))};e.prototype.handleAddRole=function(e,t){var o;e.stopPropagation();var r=((o=this.store)===null||o===void 0?void 0:o.state.roles.filter((function(e){return e.sequence===t})).length)+1;var i=this.getNextRoleName();this.callCreateRole(i,t,r)};e.prototype.handleAddStep=function(e,t){e.stopPropagation();var o=1;var r=this.getNextRoleName();this.callCreateRole(r,t,o)};e.prototype.render=function(){var e=this;var t,o,s,a,l,d;if(!this.endpoint.session){return r(i,null,r("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(!((t=this.store)===null||t===void 0?void 0:t.state.isLoaded)){return r(i,{class:"loading"},r("verdocs-loader",null))}var c=(((s=(o=this.store)===null||o===void 0?void 0:o.state)===null||s===void 0?void 0:s.roles)||[]).map((function(e){return e.name}));return r(i,null,r("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off","data-r":(a=this.store.state)===null||a===void 0?void 0:a.updateCount},r("h5",null,"Roles and Workflow"),r("div",{class:"participants"},r("div",{class:"left-line"}),r("div",{class:"row"},r("div",{class:"icon",innerHTML:W}),r("div",{class:"row-roles"},r("div",{class:"sender"},r("span",{class:"label"},"Sender:")," ",Q[(d=(l=this.store)===null||l===void 0?void 0:l.state)===null||d===void 0?void 0:d.sender]," ",r("div",{class:"settings-button",innerHTML:U,onClick:function(){return e.showingSenderDialog=true},"aria-role":"button"})))),r("div",{class:"row add-sequence","data-sequence":0},r("div",{class:"icon",innerHTML:G}),r("div",{class:"row-roles"},r("div",{class:"dropzone","data-sequence":0,"data-order":1},"Add Step"))),this.sequences.map((function(t){var o,i;return r(n,null,r("div",{class:"row"},r("div",{class:"icon",innerHTML:Y}),r("div",{class:"row-roles"},r("div",{class:"dropzone","data-order":.5,"data-sequence":t}),(i=(o=e.store)===null||o===void 0?void 0:o.state)===null||i===void 0?void 0:i.roles.filter((function(e){return e.sequence===t})).map((function(o){var i=!o.email;return i?r(n,null,r("div",{class:"recipient",style:{backgroundColor:E(f(c,o.name))},"data-rolename":o.name},r("span",{class:"type-icon",innerHTML:o.type==="signer"?K:o.type==="cc"?$:J}),o.name," ",r("div",{class:"settings-button",innerHTML:U,onClick:function(){return e.showingRoleDialog=o.name},"aria-role":"button"})),r("div",{class:"dropzone","data-order":o.order+.5,"data-sequence":t})):r(n,null,r("div",{class:"recipient",style:{borderColor:E(f(c,o.name))},"data-rolename":o.name},r("span",{class:"type-icon",innerHTML:o.type==="signer"?K:o.type==="cc"?$:J}),o.full_name," ",r("div",{class:"settings-button",innerHTML:U,onClick:function(){return e.showingRoleDialog=o.name},"aria-role":"button"})),r("div",{class:"dropzone","data-order":o.order+.5,"data-sequence":t}))})),r("button",{class:"add-role",innerHTML:G,onClick:function(o){return e.handleAddRole(o,t)}}))),e.sequences.length>0&&r("div",{class:"row add-sequence","data-sequence":t},r("div",{class:"row-roles"},r("div",{class:"icon",innerHTML:G}),r("div",{class:"dropzone","data-sequence":t+1,"data-order":1},"Add Step"))))})),r("div",{class:"row","data-sequence":this.sequences.length+1},r("div",{class:"row-roles"},r("div",{class:"icon",innerHTML:G}),r("button",{class:"add-step",innerHTML:G,onClick:function(t){return e.handleAddStep(t,e.sequences.length+1)}}))),r("div",{class:"row"},r("div",{class:"icon",innerHTML:X}),r("div",{class:"row-roles"},r("div",{class:"complete"},"Document Complete")))),c.length<1&&r("div",{class:"empty"},"You must add at least one Role before proceeding.",r("br",null)," Click the ",r("span",{innerHTML:G})," Add button above to get started."),r("div",{class:"buttons"},r("div",{class:"flex-fill"}),r("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:function(){return e.handleCancel()}}),r("verdocs-button",{label:"OK",size:"small",onClick:function(){return e.handleSubmit()},disabled:c.length<1}))),this.showingRoleDialog&&r("verdocs-template-role-properties",{endpoint:this.endpoint,templateId:this.templateId,roleName:this.showingRoleDialog,onClose:function(){e.showingRoleDialog=null},onDelete:function(){return __awaiter(e,void 0,void 0,(function(){var e,t;return __generator(this,(function(o){switch(o.label){case 0:return[4,y(this.endpoint,this.templateId,true)];case 1:o.sent();this.renumberTemplateRoles();this.showingRoleDialog=null;(e=this.templateUpdated)===null||e===void 0?void 0:e.emit({event:"deleted-role",endpoint:this.endpoint,template:(t=this.store)===null||t===void 0?void 0:t.state});return[2]}}))}))}}),this.showingSenderDialog&&r("verdocs-template-sender",{endpoint:this.endpoint,templateId:this.templateId,onClose:function(){return e.showingSenderDialog=false}}))};Object.defineProperty(e.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});return e}());ee.style=O}}}));
|
@@ -1 +0,0 @@
|
|
1
|
-
import{r as t,c as i,h as s,H as e,a as h}from"./p-e035df4b.js";import"./p-05788c2b.js";import{g as a}from"./p-4cd5eb1f.js";import{V as o}from"./p-c2c49441.js";import{t as r}from"./p-1abcf29d.js";import"./p-eab67c09.js";import"./p-b3ec6306.js";import"./p-aa124212.js";import"./p-ab01f71e.js";const d=class{constructor(s){t(this,s),this.pageRendered=i(this,"pageRendered",7),this.endpoint=o.getDefault(),this.templateId="",this.documentId="",this.pageNumber=1,this.virtualWidth=612,this.virtualHeight=792,this.layers=[{name:"page",type:"canvas"}],this.containerId=`verdocs-document-page-${Math.random().toString(36).substring(2,11)}`,this.renderedWidth=this.virtualWidth,this.renderedHeight=this.virtualHeight,this.naturalWidth=this.virtualWidth,this.naturalHeight=this.virtualHeight,this.aspectRatio=this.virtualWidth/this.virtualHeight,this.skipFirstNotification=!0,this.pageDisplayUri=""}async componentWillLoad(){this.pageDisplayUri=await a(this.endpoint,this.templateId,this.documentId,this.pageNumber)}componentDidLoad(){this.resizeObserver=new ResizeObserver(r((t=>{for(const i of t){const t=i.contentRect.width;this.renderedWidth=t,this.renderedHeight=this.virtualHeight*(t/this.virtualWidth)}this.notifyRenderedSize()}),100)),this.resizeObserver.observe(this.container)}disconnectedCallback(){var t;null===(t=this.resizeObserver)||void 0===t||t.disconnect()}notifyRenderedSize(){this.skipFirstNotification?this.skipFirstNotification=!1:this.pageRendered.emit({containerId:this.containerId,pageNumber:this.pageNumber,virtualWidth:this.virtualWidth,virtualHeight:this.virtualHeight,renderedWidth:this.renderedWidth,renderedHeight:this.renderedHeight,naturalWidth:this.naturalWidth,naturalHeight:this.naturalHeight,aspectRatio:this.aspectRatio,xScale:this.renderedWidth/this.virtualWidth,yScale:this.renderedHeight/this.virtualHeight})}render(){const t=`${this.renderedHeight}px`;return s(e,{id:`${this.containerId}`,style:{height:t,flex:`0 0 ${t}`}},this.layers.map((i=>"div"===i.type?s("div",{class:"verdocs-template-document-page-layer",id:`${this.containerId}-${i.name}`,style:{height:t}}):this.pageDisplayUri?s("img",{class:"verdocs-template-document-page-layer img",id:`${this.containerId}-${i.name}`,src:this.pageDisplayUri,alt:`Page ${this.pageNumber}`,"aria-hidden":!0,loading:"lazy",onLoad:t=>{this.naturalWidth=t.target.naturalWidth,this.naturalHeight=t.target.naturalHeight,this.aspectRatio=this.naturalWidth/this.naturalHeight,this.virtualHeight=this.virtualWidth/this.aspectRatio,this.renderedHeight=t.target.offsetWidth/this.aspectRatio}}):s("div",null))))}get container(){return h(this)}};d.style="verdocs-template-document-page{width:100%;position:relative}verdocs-template-document-page .verdocs-template-document-page-layer{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:0 0 10px 5px #0000000f;box-shadow:0 0 10px 5px #0000000f}verdocs-template-document-page .verdocs-template-document-page-layer.img{width:100%}";export{d as verdocs_template_document_page}
|
@@ -1 +0,0 @@
|
|
1
|
-
System.register([],(function(t){"use strict";return{execute:function(){var n=t("a",(function(t,n){return t.api.post("/templates",{params:n}).then((function(t){return t.data}))}));var e=t("g",(function(t,n){return t.api.get("/templates/".concat(n)).then((function(t){return t.data}))}));var r=t("c",(function(t,n){return t.api.post("/templates/",n).then((function(t){return t.data}))}));var a=t("u",(function(t,n,e){return t.api.put("/templates/".concat(n),e).then((function(t){return t.data}))}))}}}));
|
@@ -1 +0,0 @@
|
|
1
|
-
var n=function(n,t,e,r){var o=new FormData;return o.append("document",e,e.name),n.api.post("/templates/".concat(t,"/documents"),o,{timeout:6e4,onUploadProgress:function(n){var t=n.total||1,e=n.loaded||0;null==r||r(Math.floor(100*e/(t||1)),e,t||1)}}).then((function(n){return n.data}))},t=function(n,t,e,r){return o=void 0,u=void 0,c=function(){return function(n,t){var e,r,o,u,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return u={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function c(c){return function(a){return function(c){if(e)throw new TypeError("Generator is already executing.");for(;u&&(u=0,c[0]&&(i=0)),i;)try{if(e=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(n,i)}catch(n){c=[6,n],r=0}finally{e=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,a])}}}(this,(function(){return[2,n.api.get("/templates/".concat(t,"/documents/").concat(e,"/pages/").concat(r,"/image")).then((function(n){return n.data}))]}))},new((i=void 0)||(i=Promise))((function(n,t){function e(n){try{a(c.next(n))}catch(n){t(n)}}function r(n){try{a(c.throw(n))}catch(n){t(n)}}function a(t){var o;t.done?n(t.value):(o=t.value,o instanceof i?o:new i((function(n){n(o)}))).then(e,r)}a((c=c.apply(o,u||[])).next())}));var o,u,i,c};export{n as c,t as g}
|
@@ -1 +0,0 @@
|
|
1
|
-
System.register([],(function(n){"use strict";return{execute:function(){var e=undefined&&undefined.__awaiter||function(n,e,t,r){function o(n){return n instanceof t?n:new t((function(e){e(n)}))}return new(t||(t=Promise))((function(t,a){function u(n){try{c(r.next(n))}catch(n){a(n)}}function i(n){try{c(r["throw"](n))}catch(n){a(n)}}function c(n){n.done?t(n.value):o(n.value).then(u,i)}c((r=r.apply(n,e||[])).next())}))};var t=undefined&&undefined.__generator||function(n,e){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,o,a,u;return u={next:i(0),throw:i(1),return:i(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function i(n){return function(e){return c([n,e])}}function c(i){if(r)throw new TypeError("Generator is already executing.");while(u&&(u=0,i[0]&&(t=0)),t)try{if(r=1,o&&(a=i[0]&2?o["return"]:i[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,i[1])).done)return a;if(o=0,a)i=[i[0]&2,a.value];switch(i[0]){case 0:case 1:a=i;break;case 4:t.label++;return{value:i[1],done:false};case 5:t.label++;o=i[1];i=[0];continue;case 7:i=t.ops.pop();t.trys.pop();continue;default:if(!(a=t.trys,a=a.length>0&&a[a.length-1])&&(i[0]===6||i[0]===2)){t=0;continue}if(i[0]===3&&(!a||i[1]>a[0]&&i[1]<a[3])){t.label=i[1];break}if(i[0]===6&&t.label<a[1]){t.label=a[1];a=i;break}if(a&&t.label<a[2]){t.label=a[2];t.ops.push(i);break}if(a[2])t.ops.pop();t.trys.pop();continue}i=e.call(n,t)}catch(n){i=[6,n];o=0}finally{r=a=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};var r=n("c",(function(n,e,t,r){var o=new FormData;o.append("document",t,t.name);return n.api.post("/templates/".concat(e,"/documents"),o,{timeout:6e4,onUploadProgress:function(n){var e=n.total||1;var t=n.loaded||0;r===null||r===void 0?void 0:r(Math.floor(t*100/(e||1)),t,e||1)}}).then((function(n){return n.data}))}));var o=n("g",(function(n,r,o,a){return e(void 0,void 0,void 0,(function(){return t(this,(function(e){return[2,n.api.get("/templates/".concat(r,"/documents/").concat(o,"/pages/").concat(a,"/image")).then((function(n){return n.data}))]}))}))}))}}}));
|
@@ -1 +0,0 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,e,i,n){function r(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,a){function s(t){try{c(n.next(t))}catch(t){a(t)}}function o(t){try{c(n["throw"](t))}catch(t){a(t)}}function c(t){t.done?i(t.value):r(t.value).then(s,o)}c((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,r,a,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(t){return function(e){return c([t,e])}}function c(s){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,r&&(a=s[0]&2?r["return"]:s[0]?r["throw"]||((a=r["return"])&&a.call(r),0):r.next)&&!(a=a.call(r,s[1])).done)return a;if(r=0,a)s=[s[0]&2,a.value];switch(s[0]){case 0:case 1:a=s;break;case 4:i.label++;return{value:s[1],done:false};case 5:i.label++;r=s[1];s=[0];continue;case 7:s=i.ops.pop();i.trys.pop();continue;default:if(!(a=i.trys,a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){i.label=s[1];break}if(s[0]===6&&i.label<a[1]){i.label=a[1];a=s;break}if(a&&i.label<a[2]){i.label=a[2];i.ops.push(s);break}if(a[2])i.ops.pop();i.trys.pop();continue}s=e.call(t,i)}catch(t){s=[6,t];r=0}finally{n=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-871407e9.system.js","./p-54498887.system.js","./p-63398dca.system.js","./p-c44fd897.system.js","./p-201f27f6.system.js","./p-bbee73c8.system.js","./p-d1c37175.system.js","./p-327858f0.system.js","./p-51a3ea62.system.js"],(function(t){"use strict";var e,i,n,r,a,s,o,c;return{setters:[function(t){e=t.r;i=t.c;n=t.h;r=t.H;a=t.a},function(){},function(t){s=t.g},function(t){o=t.V},function(t){c=t.t},function(){},function(){},function(){},function(){}],execute:function(){var h="verdocs-template-document-page{width:100%;position:relative}verdocs-template-document-page .verdocs-template-document-page-layer{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:0 0 10px 5px #0000000f;box-shadow:0 0 10px 5px #0000000f}verdocs-template-document-page .verdocs-template-document-page-layer.img{width:100%}";var u=t("verdocs_template_document_page",function(){function t(t){e(this,t);this.pageRendered=i(this,"pageRendered",7);this.endpoint=o.getDefault();this.templateId="";this.documentId="";this.pageNumber=1;this.virtualWidth=612;this.virtualHeight=792;this.layers=[{name:"page",type:"canvas"}];this.containerId="verdocs-document-page-".concat(Math.random().toString(36).substring(2,11));this.renderedWidth=this.virtualWidth;this.renderedHeight=this.virtualHeight;this.naturalWidth=this.virtualWidth;this.naturalHeight=this.virtualHeight;this.aspectRatio=this.virtualWidth/this.virtualHeight;this.skipFirstNotification=true;this.pageDisplayUri=""}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:t=this;return[4,s(this.endpoint,this.templateId,this.documentId,this.pageNumber)];case 1:t.pageDisplayUri=e.sent();return[2]}}))}))};t.prototype.componentDidLoad=function(){var t=this;this.resizeObserver=new ResizeObserver(c((function(e){for(var i=0,n=e;i<n.length;i++){var r=n[i];var a=r.contentRect.width;t.renderedWidth=a;t.renderedHeight=t.virtualHeight*(a/t.virtualWidth)}t.notifyRenderedSize()}),100));this.resizeObserver.observe(this.container)};t.prototype.disconnectedCallback=function(){var t;(t=this.resizeObserver)===null||t===void 0?void 0:t.disconnect()};t.prototype.notifyRenderedSize=function(){if(this.skipFirstNotification){this.skipFirstNotification=false;return}this.pageRendered.emit({containerId:this.containerId,pageNumber:this.pageNumber,virtualWidth:this.virtualWidth,virtualHeight:this.virtualHeight,renderedWidth:this.renderedWidth,renderedHeight:this.renderedHeight,naturalWidth:this.naturalWidth,naturalHeight:this.naturalHeight,aspectRatio:this.aspectRatio,xScale:this.renderedWidth/this.virtualWidth,yScale:this.renderedHeight/this.virtualHeight})};t.prototype.render=function(){var t=this;var e="".concat(this.renderedHeight,"px");return n(r,{id:"".concat(this.containerId),style:{height:e,flex:"0 0 ".concat(e)}},this.layers.map((function(i){return i.type==="div"?n("div",{class:"verdocs-template-document-page-layer",id:"".concat(t.containerId,"-").concat(i.name),style:{height:e}}):t.pageDisplayUri?n("img",{class:"verdocs-template-document-page-layer img",id:"".concat(t.containerId,"-").concat(i.name),src:t.pageDisplayUri,alt:"Page ".concat(t.pageNumber),"aria-hidden":true,loading:"lazy",onLoad:function(e){t.naturalWidth=e.target.naturalWidth;t.naturalHeight=e.target.naturalHeight;t.aspectRatio=t.naturalWidth/t.naturalHeight;t.virtualHeight=t.virtualWidth/t.aspectRatio;t.renderedHeight=e.target.offsetWidth/t.aspectRatio}}):n("div",null)})))};Object.defineProperty(t.prototype,"container",{get:function(){return a(this)},enumerable:false,configurable:true});return t}());u.style=h}}}));
|
@@ -1 +0,0 @@
|
|
1
|
-
import{r as e,c as t,h as i,H as o,a as s}from"./p-e035df4b.js";import{i as r}from"./p-0d28cf05.js";import{g as n}from"./p-6de76553.js";import{g as d}from"./p-1abcf29d.js";import"./p-eab67c09.js";import"./p-b3ec6306.js";import"./p-05788c2b.js";import"./p-aa124212.js";import"./p-ab01f71e.js";const l=class{constructor(i){e(this,i),this.settingsChanged=t(this,"settingsChanged",7),this.deleted=t(this,"deleted",7),this.templateid="",this.field=null,this.disabled=!1,this.editable=!1,this.moveable=!1,this.done=!1,this.roleindex=0,this.rerender=0}async focusField(){this.inputEl.focus()}async showSettingsPanel(){const e=document.getElementById(`verdocs-settings-panel-${this.field.name}`);e&&e.showPanel&&e.showPanel()}async hideSettingsPanel(){const e=document.getElementById(`verdocs-settings-panel-${this.field.name}`);e&&e.hidePanel&&e.hidePanel()}componentDidRender(){r.dynamicDrop(!0),this.editable&&r(this.resizeHandle).resizable({listeners:{start(e){console.log("[TEXTBOX] Resize started",e.type,e.target)},move:this.handleResize.bind(this),end(e){console.log("[TEXTBOX] Resize end",e)}}})}handleResize(e){console.log("[TEXTBOX] Resize",e.delta);const t=+(e.target.getAttribute("resizeX")||0),i=+(e.target.getAttribute("resizeY")||0),o=e.dx+t,s=e.dy+i;this.el.style.width=`${parseFloat(this.el.style.width||"0")+e.dx}px`,e.target.setAttribute("resizeX",o),e.target.setAttribute("resizeY",s)}render(){var e,t,s,r;const l=d(this.field);let a=null!==(t=null!==(e=this.disabled)&&void 0!==e?e:l.disabled)&&void 0!==t&&t;const p=this.field.rgba||n(this.roleindex),c=(null==l?void 0:l.result)||"";return this.done?i(o,{class:{done:this.done}},c):i(o,{class:{required:null===(s=this.field)||void 0===s?void 0:s.required,disabled:a,done:this.done},style:{backgroundColor:p}},i("input",{type:"text",name:this.field.name,placeholder:null==l?void 0:l.placeholder,tabIndex:null==l?void 0:l.order,value:c,disabled:a,required:null===(r=this.field)||void 0===r?void 0:r.required,ref:e=>this.inputEl=e}),this.editable&&i("div",{class:"resizer",ref:e=>this.resizeHandle=e},i("div",{class:"resizer-inner"})),this.editable&&i("verdocs-button-panel",{icon:'<svg xmlns="http://www.w3.org/2000/svg" height="20" width="20"><path d="m7.5 18.5-.312-2.667q-.188-.125-.396-.25-.209-.125-.396-.229l-2.479 1.063-2.521-4.334 2.125-1.625q.021-.104.021-.229v-.458q0-.125-.021-.229L1.396 7.917l2.521-4.313 2.5 1.042q.166-.104.375-.229.208-.125.396-.229L7.5 1.5h5l.312 2.688q.188.104.396.229.209.125.396.229l2.479-1.042 2.521 4.313-2.125 1.625v.916l2.125 1.625-2.521 4.334-2.5-1.063q-.166.104-.375.229-.208.125-.396.25L12.5 18.5Zm2.479-5.521q1.229 0 2.104-.875T12.958 10q0-1.229-.875-2.104t-2.104-.875q-1.208 0-2.094.875Q7 8.771 7 10t.885 2.104q.886.875 2.094.875Zm0-1.75q-.5 0-.864-.364Q8.75 10.5 8.75 10t.365-.865q.364-.364.864-.364t.865.364q.364.365.364.865t-.364.865q-.365.364-.865.364ZM10.021 10Zm-.792 6.521h1.542l.25-2.146q.625-.167 1.198-.51.573-.344 1.031-.823l2.021.854.771-1.271-1.771-1.354q.104-.292.156-.615.052-.323.052-.656 0-.292-.052-.604-.052-.313-.135-.646l1.77-1.375-.77-1.271-2.021.875q-.479-.5-1.042-.833-.562-.334-1.187-.5l-.271-2.167H9.208l-.25 2.167q-.625.166-1.187.5-.563.333-1.042.812l-2-.854-.771 1.271 1.73 1.354q-.084.333-.136.656Q5.5 9.708 5.5 10t.052.604q.052.313.136.667l-1.73 1.354.771 1.271 2-.834q.479.459 1.042.792.562.334 1.187.5Z"/></svg>',id:`verdocs-settings-panel-${this.field.name}`},i("verdocs-template-field-properties",{templateId:this.templateid,fieldName:this.field.name,onClose:()=>this.hideSettingsPanel(),onDelete:()=>{var e;return null===(e=this.deleted)||void 0===e||e.emit({fieldName:this.field.name}),this.hideSettingsPanel()},onSettingsChanged:e=>{var t;return null===(t=this.settingsChanged)||void 0===t||t.emit(e.detail),this.hideSettingsPanel()},helpText:'Text boxes may be used to capture simple text input. Participant-entered values will be stored for later retrieval via the "name" field.<br /><br />If marked required, the participant must complete the field before proceeding.'})))}get el(){return s(this)}};l.style='verdocs-field-textbox{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;width:150px;height:15px;display:block;font-size:11px;position:relative;letter-spacing:-0.2px;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left;border:1px solid rgba(0, 0, 0, 0.2)}verdocs-field-textbox.disabled{opacity:0.5}verdocs-field-textbox input{width:100%;height:100%;border:none;outline:none;padding:0 3px;font-size:11px;background:none;font-weight:500;-webkit-transform-origin:0 0;transform-origin:0 0;-webkit-box-sizing:border-box;box-sizing:border-box;color:rgba(0, 0, 0, 0.87)}verdocs-field-textbox input.hide{display:none}verdocs-field-textbox.required{border:1px solid #cc0000}verdocs-field-textbox.focused{-webkit-animation:verdocs-field-pulse 0.75s 2;animation:verdocs-field-pulse 0.75s 2}verdocs-field-textbox .resizer{position:absolute;bottom:1px;right:1px;width:8px;height:8px;z-index:9999}verdocs-field-textbox .resizer:hover{cursor:nwse-resize}verdocs-field-textbox .resizer .resizer-inner{position:absolute;bottom:0}verdocs-field-textbox .resizer .resizer-inner:before{position:absolute;top:-4px;left:-0.5px;content:"";display:block;width:10px;height:1px;background-color:rgba(0, 0, 0, 0.32);-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}verdocs-field-textbox .resizer .resizer-inner:after{position:absolute;top:-1.5px;left:4.5px;content:"";display:block;width:5px;height:1px;background-color:rgba(0, 0, 0, 0.32);-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}verdocs-field-textbox verdocs-button-panel{top:-3px;left:-2px;opacity:0.5;z-index:1000;cursor:pointer;position:absolute;-webkit-transform:scale(0.6);transform:scale(0.6)}verdocs-field-textbox verdocs-button-panel[data-active],verdocs-field-textbox verdocs-button-panel:hover{opacity:1}verdocs-field-textbox verdocs-button-panel .icon svg{fill:#333333}verdocs-field-textbox verdocs-button-panel .icon:hover svg{fill:#000000}verdocs-field-textbox [data-lastpass-icon-root]{display:none !important}';export{l as verdocs_field_textbox}
|
@@ -1 +0,0 @@
|
|
1
|
-
var t=function(t,n){return t.api.post("/templates",{params:n}).then((function(t){return t.data}))},n=function(t,n){return t.api.get("/templates/".concat(n)).then((function(t){return t.data}))},r=function(t,n){return t.api.post("/templates/",n).then((function(t){return t.data}))},e=function(t,n,r){return t.api.put("/templates/".concat(n),r).then((function(t){return t.data}))};export{t as a,r as c,n as g,e as u}
|
@@ -1 +0,0 @@
|
|
1
|
-
System.register([],(function(e){"use strict";return{execute:function(){var t="top";var r="bottom";var n="right";var a="left";var i="auto";var o=[t,r,n,a];var f="start";var s="end";var u="clippingParents";var c="viewport";var v="popper";var p="reference";var l=o.reduce((function(e,t){return e.concat([t+"-"+f,t+"-"+s])}),[]);var d=[].concat(o,[i]).reduce((function(e,t){return e.concat([t,t+"-"+f,t+"-"+s])}),[]);var h="beforeRead";var m="read";var g="afterRead";var y="beforeMain";var b="main";var w="afterMain";var x="beforeWrite";var O="write";var j="afterWrite";var E=[h,m,g,y,b,w,x,O,j];function D(e){return e?(e.nodeName||"").toLowerCase():null}function A(e){if(e==null){return window}if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t?t.defaultView||window:window}return e}function k(e){var t=A(e).Element;return e instanceof t||e instanceof Element}function L(e){var t=A(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function W(e){if(typeof ShadowRoot==="undefined"){return false}var t=A(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function M(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var r=t.styles[e]||{};var n=t.attributes[e]||{};var a=t.elements[e];if(!L(a)||!D(a)){return}Object.assign(a.style,r);Object.keys(n).forEach((function(e){var t=n[e];if(t===false){a.removeAttribute(e)}else{a.setAttribute(e,t===true?"":t)}}))}))}function P(e){var t=e.state;var r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,r.popper);t.styles=r;if(t.elements.arrow){Object.assign(t.elements.arrow.style,r.arrow)}return function(){Object.keys(t.elements).forEach((function(e){var n=t.elements[e];var a=t.attributes[e]||{};var i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:r[e]);var o=i.reduce((function(e,t){e[t]="";return e}),{});if(!L(n)||!D(n)){return}Object.assign(n.style,o);Object.keys(a).forEach((function(e){n.removeAttribute(e)}))}))}}var B={name:"applyStyles",enabled:true,phase:"write",fn:M,effect:P,requires:["computeStyles"]};function H(e){return e.split("-")[0]}var R=Math.max;var T=Math.min;var S=Math.round;function V(){var e=navigator.userAgentData;if(e!=null&&e.brands){return e.brands.map((function(e){return e.brand+"/"+e.version})).join(" ")}return navigator.userAgent}function q(){return!/^((?!chrome|android).)*safari/i.test(V())}function C(e,t,r){if(t===void 0){t=false}if(r===void 0){r=false}var n=e.getBoundingClientRect();var a=1;var i=1;if(t&&L(e)){a=e.offsetWidth>0?S(n.width)/e.offsetWidth||1:1;i=e.offsetHeight>0?S(n.height)/e.offsetHeight||1:1}var o=k(e)?A(e):window,f=o.visualViewport;var s=!q()&&r;var u=(n.left+(s&&f?f.offsetLeft:0))/a;var c=(n.top+(s&&f?f.offsetTop:0))/i;var v=n.width/a;var p=n.height/i;return{width:v,height:p,top:c,right:u+v,bottom:c+p,left:u,x:u,y:c}}function N(e){var t=C(e);var r=e.offsetWidth;var n=e.offsetHeight;if(Math.abs(t.width-r)<=1){r=t.width}if(Math.abs(t.height-n)<=1){n=t.height}return{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function I(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t)){return true}else if(r&&W(r)){var n=t;do{if(n&&e.isSameNode(n)){return true}n=n.parentNode||n.host}while(n)}return false}function F(e){return A(e).getComputedStyle(e)}function U(e){return["table","td","th"].indexOf(D(e))>=0}function z(e){return((k(e)?e.ownerDocument:e.document)||window.document).documentElement}function _(e){if(D(e)==="html"){return e}return e.assignedSlot||e.parentNode||(W(e)?e.host:null)||z(e)}function X(e){if(!L(e)||F(e).position==="fixed"){return null}return e.offsetParent}function Y(e){var t=/firefox/i.test(V());var r=/Trident/i.test(V());if(r&&L(e)){var n=F(e);if(n.position==="fixed"){return null}}var a=_(e);if(W(a)){a=a.host}while(L(a)&&["html","body"].indexOf(D(a))<0){var i=F(a);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none"){return a}else{a=a.parentNode}}return null}function G(e){var t=A(e);var r=X(e);while(r&&U(r)&&F(r).position==="static"){r=X(r)}if(r&&(D(r)==="html"||D(r)==="body"&&F(r).position==="static")){return t}return r||Y(e)||t}function J(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function K(e,t,r){return R(e,T(t,r))}function Q(e,t,r){var n=K(e,t,r);return n>r?r:n}function Z(){return{top:0,right:0,bottom:0,left:0}}function $(e){return Object.assign({},Z(),e)}function ee(e,t){return t.reduce((function(t,r){t[r]=e;return t}),{})}var te=function e(t,r){t=typeof t==="function"?t(Object.assign({},r.rects,{placement:r.placement})):t;return $(typeof t!=="number"?t:ee(t,o))};function re(e){var i;var o=e.state,f=e.name,s=e.options;var u=o.elements.arrow;var c=o.modifiersData.popperOffsets;var v=H(o.placement);var p=J(v);var l=[a,n].indexOf(v)>=0;var d=l?"height":"width";if(!u||!c){return}var h=te(s.padding,o);var m=N(u);var g=p==="y"?t:a;var y=p==="y"?r:n;var b=o.rects.reference[d]+o.rects.reference[p]-c[p]-o.rects.popper[d];var w=c[p]-o.rects.reference[p];var x=G(u);var O=x?p==="y"?x.clientHeight||0:x.clientWidth||0:0;var j=b/2-w/2;var E=h[g];var D=O-m[d]-h[y];var A=O/2-m[d]/2+j;var k=K(E,A,D);var L=p;o.modifiersData[f]=(i={},i[L]=k,i.centerOffset=k-A,i)}function ne(e){var t=e.state,r=e.options;var n=r.element,a=n===void 0?"[data-popper-arrow]":n;if(a==null){return}if(typeof a==="string"){a=t.elements.popper.querySelector(a);if(!a){return}}if(!I(t.elements.popper,a)){return}t.elements.arrow=a}var ae={name:"arrow",enabled:true,phase:"main",fn:re,effect:ne,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ie(e){return e.split("-")[1]}var oe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function fe(e){var t=e.x,r=e.y;var n=window;var a=n.devicePixelRatio||1;return{x:S(t*a)/a||0,y:S(r*a)/a||0}}function se(e){var i;var o=e.popper,f=e.popperRect,u=e.placement,c=e.variation,v=e.offsets,p=e.position,l=e.gpuAcceleration,d=e.adaptive,h=e.roundOffsets,m=e.isFixed;var g=v.x,y=g===void 0?0:g,b=v.y,w=b===void 0?0:b;var x=typeof h==="function"?h({x:y,y:w}):{x:y,y:w};y=x.x;w=x.y;var O=v.hasOwnProperty("x");var j=v.hasOwnProperty("y");var E=a;var D=t;var k=window;if(d){var L=G(o);var W="clientHeight";var M="clientWidth";if(L===A(o)){L=z(o);if(F(L).position!=="static"&&p==="absolute"){W="scrollHeight";M="scrollWidth"}}L=L;if(u===t||(u===a||u===n)&&c===s){D=r;var P=m&&L===k&&k.visualViewport?k.visualViewport.height:L[W];w-=P-f.height;w*=l?1:-1}if(u===a||(u===t||u===r)&&c===s){E=n;var B=m&&L===k&&k.visualViewport?k.visualViewport.width:L[M];y-=B-f.width;y*=l?1:-1}}var H=Object.assign({position:p},d&&oe);var R=h===true?fe({x:y,y:w}):{x:y,y:w};y=R.x;w=R.y;if(l){var T;return Object.assign({},H,(T={},T[D]=j?"0":"",T[E]=O?"0":"",T.transform=(k.devicePixelRatio||1)<=1?"translate("+y+"px, "+w+"px)":"translate3d("+y+"px, "+w+"px, 0)",T))}return Object.assign({},H,(i={},i[D]=j?w+"px":"",i[E]=O?y+"px":"",i.transform="",i))}function ue(e){var t=e.state,r=e.options;var n=r.gpuAcceleration,a=n===void 0?true:n,i=r.adaptive,o=i===void 0?true:i,f=r.roundOffsets,s=f===void 0?true:f;var u={placement:H(t.placement),variation:ie(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:a,isFixed:t.options.strategy==="fixed"};if(t.modifiersData.popperOffsets!=null){t.styles.popper=Object.assign({},t.styles.popper,se(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:s})))}if(t.modifiersData.arrow!=null){t.styles.arrow=Object.assign({},t.styles.arrow,se(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:false,roundOffsets:s})))}t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var ce={name:"computeStyles",enabled:true,phase:"beforeWrite",fn:ue,data:{}};var ve={passive:true};function pe(e){var t=e.state,r=e.instance,n=e.options;var a=n.scroll,i=a===void 0?true:a,o=n.resize,f=o===void 0?true:o;var s=A(t.elements.popper);var u=[].concat(t.scrollParents.reference,t.scrollParents.popper);if(i){u.forEach((function(e){e.addEventListener("scroll",r.update,ve)}))}if(f){s.addEventListener("resize",r.update,ve)}return function(){if(i){u.forEach((function(e){e.removeEventListener("scroll",r.update,ve)}))}if(f){s.removeEventListener("resize",r.update,ve)}}}var le={name:"eventListeners",enabled:true,phase:"write",fn:function e(){},effect:pe,data:{}};var de={left:"right",right:"left",bottom:"top",top:"bottom"};function he(e){return e.replace(/left|right|bottom|top/g,(function(e){return de[e]}))}var me={start:"end",end:"start"};function ge(e){return e.replace(/start|end/g,(function(e){return me[e]}))}function ye(e){var t=A(e);var r=t.pageXOffset;var n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function be(e){return C(z(e)).left+ye(e).scrollLeft}function we(e,t){var r=A(e);var n=z(e);var a=r.visualViewport;var i=n.clientWidth;var o=n.clientHeight;var f=0;var s=0;if(a){i=a.width;o=a.height;var u=q();if(u||!u&&t==="fixed"){f=a.offsetLeft;s=a.offsetTop}}return{width:i,height:o,x:f+be(e),y:s}}function xe(e){var t;var r=z(e);var n=ye(e);var a=(t=e.ownerDocument)==null?void 0:t.body;var i=R(r.scrollWidth,r.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0);var o=R(r.scrollHeight,r.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0);var f=-n.scrollLeft+be(e);var s=-n.scrollTop;if(F(a||r).direction==="rtl"){f+=R(r.clientWidth,a?a.clientWidth:0)-i}return{width:i,height:o,x:f,y:s}}function Oe(e){var t=F(e),r=t.overflow,n=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+a+n)}function je(e){if(["html","body","#document"].indexOf(D(e))>=0){return e.ownerDocument.body}if(L(e)&&Oe(e)){return e}return je(_(e))}function Ee(e,t){var r;if(t===void 0){t=[]}var n=je(e);var a=n===((r=e.ownerDocument)==null?void 0:r.body);var i=A(n);var o=a?[i].concat(i.visualViewport||[],Oe(n)?n:[]):n;var f=t.concat(o);return a?f:f.concat(Ee(_(o)))}function De(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Ae(e,t){var r=C(e,false,t==="fixed");r.top=r.top+e.clientTop;r.left=r.left+e.clientLeft;r.bottom=r.top+e.clientHeight;r.right=r.left+e.clientWidth;r.width=e.clientWidth;r.height=e.clientHeight;r.x=r.left;r.y=r.top;return r}function ke(e,t,r){return t===c?De(we(e,r)):k(t)?Ae(t,r):De(xe(z(e)))}function Le(e){var t=Ee(_(e));var r=["absolute","fixed"].indexOf(F(e).position)>=0;var n=r&&L(e)?G(e):e;if(!k(n)){return[]}return t.filter((function(e){return k(e)&&I(e,n)&&D(e)!=="body"}))}function We(e,t,r,n){var a=t==="clippingParents"?Le(e):[].concat(t);var i=[].concat(a,[r]);var o=i[0];var f=i.reduce((function(t,r){var a=ke(e,r,n);t.top=R(a.top,t.top);t.right=T(a.right,t.right);t.bottom=T(a.bottom,t.bottom);t.left=R(a.left,t.left);return t}),ke(e,o,n));f.width=f.right-f.left;f.height=f.bottom-f.top;f.x=f.left;f.y=f.top;return f}function Me(e){var i=e.reference,o=e.element,u=e.placement;var c=u?H(u):null;var v=u?ie(u):null;var p=i.x+i.width/2-o.width/2;var l=i.y+i.height/2-o.height/2;var d;switch(c){case t:d={x:p,y:i.y-o.height};break;case r:d={x:p,y:i.y+i.height};break;case n:d={x:i.x+i.width,y:l};break;case a:d={x:i.x-o.width,y:l};break;default:d={x:i.x,y:i.y}}var h=c?J(c):null;if(h!=null){var m=h==="y"?"height":"width";switch(v){case f:d[h]=d[h]-(i[m]/2-o[m]/2);break;case s:d[h]=d[h]+(i[m]/2-o[m]/2);break}}return d}function Pe(e,a){if(a===void 0){a={}}var i=a,f=i.placement,s=f===void 0?e.placement:f,l=i.strategy,d=l===void 0?e.strategy:l,h=i.boundary,m=h===void 0?u:h,g=i.rootBoundary,y=g===void 0?c:g,b=i.elementContext,w=b===void 0?v:b,x=i.altBoundary,O=x===void 0?false:x,j=i.padding,E=j===void 0?0:j;var D=$(typeof E!=="number"?E:ee(E,o));var A=w===v?p:v;var L=e.rects.popper;var W=e.elements[O?A:w];var M=We(k(W)?W:W.contextElement||z(e.elements.popper),m,y,d);var P=C(e.elements.reference);var B=Me({reference:P,element:L,strategy:"absolute",placement:s});var H=De(Object.assign({},L,B));var R=w===v?H:P;var T={top:M.top-R.top+D.top,bottom:R.bottom-M.bottom+D.bottom,left:M.left-R.left+D.left,right:R.right-M.right+D.right};var S=e.modifiersData.offset;if(w===v&&S){var V=S[s];Object.keys(T).forEach((function(e){var a=[n,r].indexOf(e)>=0?1:-1;var i=[t,r].indexOf(e)>=0?"y":"x";T[e]+=V[i]*a}))}return T}function Be(e,t){if(t===void 0){t={}}var r=t,n=r.placement,a=r.boundary,i=r.rootBoundary,f=r.padding,s=r.flipVariations,u=r.allowedAutoPlacements,c=u===void 0?d:u;var v=ie(n);var p=v?s?l:l.filter((function(e){return ie(e)===v})):o;var h=p.filter((function(e){return c.indexOf(e)>=0}));if(h.length===0){h=p}var m=h.reduce((function(t,r){t[r]=Pe(e,{placement:r,boundary:a,rootBoundary:i,padding:f})[H(r)];return t}),{});return Object.keys(m).sort((function(e,t){return m[e]-m[t]}))}function He(e){if(H(e)===i){return[]}var t=he(e);return[ge(e),t,ge(t)]}function Re(e){var o=e.state,s=e.options,u=e.name;if(o.modifiersData[u]._skip){return}var c=s.mainAxis,v=c===void 0?true:c,p=s.altAxis,l=p===void 0?true:p,d=s.fallbackPlacements,h=s.padding,m=s.boundary,g=s.rootBoundary,y=s.altBoundary,b=s.flipVariations,w=b===void 0?true:b,x=s.allowedAutoPlacements;var O=o.options.placement;var j=H(O);var E=j===O;var D=d||(E||!w?[he(O)]:He(O));var A=[O].concat(D).reduce((function(e,t){return e.concat(H(t)===i?Be(o,{placement:t,boundary:m,rootBoundary:g,padding:h,flipVariations:w,allowedAutoPlacements:x}):t)}),[]);var k=o.rects.reference;var L=o.rects.popper;var W=new Map;var M=true;var P=A[0];for(var B=0;B<A.length;B++){var R=A[B];var T=H(R);var S=ie(R)===f;var V=[t,r].indexOf(T)>=0;var q=V?"width":"height";var C=Pe(o,{placement:R,boundary:m,rootBoundary:g,altBoundary:y,padding:h});var N=V?S?n:a:S?r:t;if(k[q]>L[q]){N=he(N)}var I=he(N);var F=[];if(v){F.push(C[T]<=0)}if(l){F.push(C[N]<=0,C[I]<=0)}if(F.every((function(e){return e}))){P=R;M=false;break}W.set(R,F)}if(M){var U=w?3:1;var z=function e(t){var r=A.find((function(e){var r=W.get(e);if(r){return r.slice(0,t).every((function(e){return e}))}}));if(r){P=r;return"break"}};for(var _=U;_>0;_--){var X=z(_);if(X==="break")break}}if(o.placement!==P){o.modifiersData[u]._skip=true;o.placement=P;o.reset=true}}var Te={name:"flip",enabled:true,phase:"main",fn:Re,requiresIfExists:["offset"],data:{_skip:false}};function Se(e,t,r){if(r===void 0){r={x:0,y:0}}return{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function Ve(e){return[t,n,r,a].some((function(t){return e[t]>=0}))}function qe(e){var t=e.state,r=e.name;var n=t.rects.reference;var a=t.rects.popper;var i=t.modifiersData.preventOverflow;var o=Pe(t,{elementContext:"reference"});var f=Pe(t,{altBoundary:true});var s=Se(o,n);var u=Se(f,a,i);var c=Ve(s);var v=Ve(u);t.modifiersData[r]={referenceClippingOffsets:s,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:v};t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":v})}var Ce={name:"hide",enabled:true,phase:"main",requiresIfExists:["preventOverflow"],fn:qe};function Ne(e,r,i){var o=H(e);var f=[a,t].indexOf(o)>=0?-1:1;var s=typeof i==="function"?i(Object.assign({},r,{placement:e})):i,u=s[0],c=s[1];u=u||0;c=(c||0)*f;return[a,n].indexOf(o)>=0?{x:c,y:u}:{x:u,y:c}}function Ie(e){var t=e.state,r=e.options,n=e.name;var a=r.offset,i=a===void 0?[0,0]:a;var o=d.reduce((function(e,r){e[r]=Ne(r,t.rects,i);return e}),{});var f=o[t.placement],s=f.x,u=f.y;if(t.modifiersData.popperOffsets!=null){t.modifiersData.popperOffsets.x+=s;t.modifiersData.popperOffsets.y+=u}t.modifiersData[n]=o}var Fe={name:"offset",enabled:true,phase:"main",requires:["popperOffsets"],fn:Ie};function Ue(e){var t=e.state,r=e.name;t.modifiersData[r]=Me({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var ze={name:"popperOffsets",enabled:true,phase:"read",fn:Ue,data:{}};function _e(e){return e==="x"?"y":"x"}function Xe(e){var i=e.state,o=e.options,s=e.name;var u=o.mainAxis,c=u===void 0?true:u,v=o.altAxis,p=v===void 0?false:v,l=o.boundary,d=o.rootBoundary,h=o.altBoundary,m=o.padding,g=o.tether,y=g===void 0?true:g,b=o.tetherOffset,w=b===void 0?0:b;var x=Pe(i,{boundary:l,rootBoundary:d,padding:m,altBoundary:h});var O=H(i.placement);var j=ie(i.placement);var E=!j;var D=J(O);var A=_e(D);var k=i.modifiersData.popperOffsets;var L=i.rects.reference;var W=i.rects.popper;var M=typeof w==="function"?w(Object.assign({},i.rects,{placement:i.placement})):w;var P=typeof M==="number"?{mainAxis:M,altAxis:M}:Object.assign({mainAxis:0,altAxis:0},M);var B=i.modifiersData.offset?i.modifiersData.offset[i.placement]:null;var S={x:0,y:0};if(!k){return}if(c){var V;var q=D==="y"?t:a;var C=D==="y"?r:n;var I=D==="y"?"height":"width";var F=k[D];var U=F+x[q];var z=F-x[C];var _=y?-W[I]/2:0;var X=j===f?L[I]:W[I];var Y=j===f?-W[I]:-L[I];var $=i.elements.arrow;var ee=y&&$?N($):{width:0,height:0};var te=i.modifiersData["arrow#persistent"]?i.modifiersData["arrow#persistent"].padding:Z();var re=te[q];var ne=te[C];var ae=K(0,L[I],ee[I]);var oe=E?L[I]/2-_-ae-re-P.mainAxis:X-ae-re-P.mainAxis;var fe=E?-L[I]/2+_+ae+ne+P.mainAxis:Y+ae+ne+P.mainAxis;var se=i.elements.arrow&&G(i.elements.arrow);var ue=se?D==="y"?se.clientTop||0:se.clientLeft||0:0;var ce=(V=B==null?void 0:B[D])!=null?V:0;var ve=F+oe-ce-ue;var pe=F+fe-ce;var le=K(y?T(U,ve):U,F,y?R(z,pe):z);k[D]=le;S[D]=le-F}if(p){var de;var he=D==="x"?t:a;var me=D==="x"?r:n;var ge=k[A];var ye=A==="y"?"height":"width";var be=ge+x[he];var we=ge-x[me];var xe=[t,a].indexOf(O)!==-1;var Oe=(de=B==null?void 0:B[A])!=null?de:0;var je=xe?be:ge-L[ye]-W[ye]-Oe+P.altAxis;var Ee=xe?ge+L[ye]+W[ye]-Oe-P.altAxis:we;var De=y&&xe?Q(je,ge,Ee):K(y?je:be,ge,y?Ee:we);k[A]=De;S[A]=De-ge}i.modifiersData[s]=S}var Ye={name:"preventOverflow",enabled:true,phase:"main",fn:Xe,requiresIfExists:["offset"]};function Ge(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Je(e){if(e===A(e)||!L(e)){return ye(e)}else{return Ge(e)}}function Ke(e){var t=e.getBoundingClientRect();var r=S(t.width)/e.offsetWidth||1;var n=S(t.height)/e.offsetHeight||1;return r!==1||n!==1}function Qe(e,t,r){if(r===void 0){r=false}var n=L(t);var a=L(t)&&Ke(t);var i=z(t);var o=C(e,a,r);var f={scrollLeft:0,scrollTop:0};var s={x:0,y:0};if(n||!n&&!r){if(D(t)!=="body"||Oe(i)){f=Je(t)}if(L(t)){s=C(t,true);s.x+=t.clientLeft;s.y+=t.clientTop}else if(i){s.x=be(i)}}return{x:o.left+f.scrollLeft-s.x,y:o.top+f.scrollTop-s.y,width:o.width,height:o.height}}function Ze(e){var t=new Map;var r=new Set;var n=[];e.forEach((function(e){t.set(e.name,e)}));function a(e){r.add(e.name);var i=[].concat(e.requires||[],e.requiresIfExists||[]);i.forEach((function(e){if(!r.has(e)){var n=t.get(e);if(n){a(n)}}}));n.push(e)}e.forEach((function(e){if(!r.has(e.name)){a(e)}}));return n}function $e(e){var t=Ze(e);return E.reduce((function(e,r){return e.concat(t.filter((function(e){return e.phase===r})))}),[])}function et(e){var t;return function(){if(!t){t=new Promise((function(r){Promise.resolve().then((function(){t=undefined;r(e())}))}))}return t}}function tt(e){var t=e.reduce((function(e,t){var r=e[t.name];e[t.name]=r?Object.assign({},r,t,{options:Object.assign({},r.options,t.options),data:Object.assign({},r.data,t.data)}):t;return e}),{});return Object.keys(t).map((function(e){return t[e]}))}var rt={placement:"bottom",modifiers:[],strategy:"absolute"};function nt(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++){t[r]=arguments[r]}return!t.some((function(e){return!(e&&typeof e.getBoundingClientRect==="function")}))}function at(e){if(e===void 0){e={}}var t=e,r=t.defaultModifiers,n=r===void 0?[]:r,a=t.defaultOptions,i=a===void 0?rt:a;return function e(t,r,a){if(a===void 0){a=i}var o={placement:"bottom",orderedModifiers:[],options:Object.assign({},rt,i),modifiersData:{},elements:{reference:t,popper:r},attributes:{},styles:{}};var f=[];var s=false;var u={state:o,setOptions:function e(a){var f=typeof a==="function"?a(o.options):a;v();o.options=Object.assign({},i,o.options,f);o.scrollParents={reference:k(t)?Ee(t):t.contextElement?Ee(t.contextElement):[],popper:Ee(r)};var s=$e(tt([].concat(n,o.options.modifiers)));o.orderedModifiers=s.filter((function(e){return e.enabled}));c();return u.update()},forceUpdate:function e(){if(s){return}var t=o.elements,r=t.reference,n=t.popper;if(!nt(r,n)){return}o.rects={reference:Qe(r,G(n),o.options.strategy==="fixed"),popper:N(n)};o.reset=false;o.placement=o.options.placement;o.orderedModifiers.forEach((function(e){return o.modifiersData[e.name]=Object.assign({},e.data)}));for(var a=0;a<o.orderedModifiers.length;a++){if(o.reset===true){o.reset=false;a=-1;continue}var i=o.orderedModifiers[a],f=i.fn,c=i.options,v=c===void 0?{}:c,p=i.name;if(typeof f==="function"){o=f({state:o,options:v,name:p,instance:u})||o}}},update:et((function(){return new Promise((function(e){u.forceUpdate();e(o)}))})),destroy:function e(){v();s=true}};if(!nt(t,r)){return u}u.setOptions(a).then((function(e){if(!s&&a.onFirstUpdate){a.onFirstUpdate(e)}}));function c(){o.orderedModifiers.forEach((function(e){var t=e.name,r=e.options,n=r===void 0?{}:r,a=e.effect;if(typeof a==="function"){var i=a({state:o,name:t,instance:u,options:n});var s=function e(){};f.push(i||s)}}))}function v(){f.forEach((function(e){return e()}));f=[]}return u}}var it=[le,ze,ce,B,Fe,Te,Ye,ae,Ce];var ot=e("c",at({defaultModifiers:it}))}}}));
|
@@ -1 +0,0 @@
|
|
1
|
-
var t="top",n="bottom",e="right",r="left",o=[t,n,e,r],i=o.reduce((function(t,n){return t.concat([n+"-start",n+"-end"])}),[]),u=[].concat(o,["auto"]).reduce((function(t,n){return t.concat([n,n+"-start",n+"-end"])}),[]),a=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function f(t){return t?(t.nodeName||"").toLowerCase():null}function c(t){if(null==t)return window;if("[object Window]"!==t.toString()){var n=t.ownerDocument;return n&&n.defaultView||window}return t}function d(t){return t instanceof c(t).Element||t instanceof Element}function p(t){return t instanceof c(t).HTMLElement||t instanceof HTMLElement}function s(t){return"undefined"!=typeof ShadowRoot&&(t instanceof c(t).ShadowRoot||t instanceof ShadowRoot)}function l(t){return t.split("-")[0]}var v=Math.max,b=Math.min,h=Math.round;function y(){var t=navigator.userAgentData;return null!=t&&t.brands?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function m(){return!/^((?!chrome|android).)*safari/i.test(y())}function x(t,n,e){void 0===n&&(n=!1),void 0===e&&(e=!1);var r=t.getBoundingClientRect(),o=1,i=1;n&&p(t)&&(o=t.offsetWidth>0&&h(r.width)/t.offsetWidth||1,i=t.offsetHeight>0&&h(r.height)/t.offsetHeight||1);var u=(d(t)?c(t):window).visualViewport,a=!m()&&e,f=(r.left+(a&&u?u.offsetLeft:0))/o,s=(r.top+(a&&u?u.offsetTop:0))/i,l=r.width/o,v=r.height/i;return{width:l,height:v,top:s,right:f+l,bottom:s+v,left:f,x:f,y:s}}function w(t){var n=x(t),e=t.offsetWidth,r=t.offsetHeight;return Math.abs(n.width-e)<=1&&(e=n.width),Math.abs(n.height-r)<=1&&(r=n.height),{x:t.offsetLeft,y:t.offsetTop,width:e,height:r}}function O(t,n){var e=n.getRootNode&&n.getRootNode();if(t.contains(n))return!0;if(e&&s(e)){var r=n;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function g(t){return c(t).getComputedStyle(t)}function j(t){return["table","td","th"].indexOf(f(t))>=0}function M(t){return((d(t)?t.ownerDocument:t.document)||window.document).documentElement}function k(t){return"html"===f(t)?t:t.assignedSlot||t.parentNode||(s(t)?t.host:null)||M(t)}function E(t){return p(t)&&"fixed"!==g(t).position?t.offsetParent:null}function q(t){for(var n=c(t),e=E(t);e&&j(e)&&"static"===g(e).position;)e=E(e);return e&&("html"===f(e)||"body"===f(e)&&"static"===g(e).position)?n:e||function(t){var n=/firefox/i.test(y());if(/Trident/i.test(y())&&p(t)&&"fixed"===g(t).position)return null;var e=k(t);for(s(e)&&(e=e.host);p(e)&&["html","body"].indexOf(f(e))<0;){var r=g(e);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||n&&"filter"===r.willChange||n&&r.filter&&"none"!==r.filter)return e;e=e.parentNode}return null}(t)||n}function A(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function B(t,n,e){return v(t,b(n,e))}function P(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function R(t,n){return n.reduce((function(n,e){return n[e]=t,n}),{})}function S(t){return t.split("-")[1]}var W={top:"auto",right:"auto",bottom:"auto",left:"auto"};function L(o){var i,u=o.popper,a=o.popperRect,f=o.placement,d=o.variation,p=o.offsets,s=o.position,l=o.gpuAcceleration,v=o.adaptive,b=o.roundOffsets,y=o.isFixed,m=p.x,x=void 0===m?0:m,w=p.y,O=void 0===w?0:w,j="function"==typeof b?b({x,y:O}):{x,y:O};x=j.x,O=j.y;var k=p.hasOwnProperty("x"),E=p.hasOwnProperty("y"),A=r,B=t,P=window;if(v){var R=q(u),S="clientHeight",L="clientWidth";R===c(u)&&"static"!==g(R=M(u)).position&&"absolute"===s&&(S="scrollHeight",L="scrollWidth"),R=R,(f===t||(f===r||f===e)&&"end"===d)&&(B=n,O-=(y&&R===P&&P.visualViewport?P.visualViewport.height:R[S])-a.height,O*=l?1:-1),f!==r&&(f!==t&&f!==n||"end"!==d)||(A=e,x-=(y&&R===P&&P.visualViewport?P.visualViewport.width:R[L])-a.width,x*=l?1:-1)}var T,H=Object.assign({position:s},v&&W),I=!0===b?function(t){var n=t.y,e=window.devicePixelRatio||1;return{x:h(t.x*e)/e||0,y:h(n*e)/e||0}}({x,y:O}):{x,y:O};return x=I.x,O=I.y,Object.assign({},H,l?((T={})[B]=E?"0":"",T[A]=k?"0":"",T.transform=(P.devicePixelRatio||1)<=1?"translate("+x+"px, "+O+"px)":"translate3d("+x+"px, "+O+"px, 0)",T):((i={})[B]=E?O+"px":"",i[A]=k?x+"px":"",i.transform="",i))}var T={passive:!0},H={left:"right",right:"left",bottom:"top",top:"bottom"};function I(t){return t.replace(/left|right|bottom|top/g,(function(t){return H[t]}))}var z={start:"end",end:"start"};function C(t){return t.replace(/start|end/g,(function(t){return z[t]}))}function D(t){var n=c(t);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function F(t){return x(M(t)).left+D(t).scrollLeft}function U(t){var n=g(t);return/auto|scroll|overlay|hidden/.test(n.overflow+n.overflowY+n.overflowX)}function V(t){return["html","body","#document"].indexOf(f(t))>=0?t.ownerDocument.body:p(t)&&U(t)?t:V(k(t))}function _(t,n){var e;void 0===n&&(n=[]);var r=V(t),o=r===(null==(e=t.ownerDocument)?void 0:e.body),i=c(r),u=o?[i].concat(i.visualViewport||[],U(r)?r:[]):r,a=n.concat(u);return o?a:a.concat(_(k(u)))}function G(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function J(t,n,e){return"viewport"===n?G(function(t,n){var e=c(t),r=M(t),o=e.visualViewport,i=r.clientWidth,u=r.clientHeight,a=0,f=0;if(o){i=o.width,u=o.height;var d=m();(d||!d&&"fixed"===n)&&(a=o.offsetLeft,f=o.offsetTop)}return{width:i,height:u,x:a+F(t),y:f}}(t,e)):d(n)?function(t,n){var e=x(t,!1,"fixed"===n);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(n,e):G(function(t){var n,e=M(t),r=D(t),o=null==(n=t.ownerDocument)?void 0:n.body,i=v(e.scrollWidth,e.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),u=v(e.scrollHeight,e.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-r.scrollLeft+F(t),f=-r.scrollTop;return"rtl"===g(o||e).direction&&(a+=v(e.clientWidth,o?o.clientWidth:0)-i),{width:i,height:u,x:a,y:f}}(M(t)))}function K(o){var i,u=o.reference,a=o.element,f=o.placement,c=f?l(f):null,d=f?S(f):null,p=u.x+u.width/2-a.width/2,s=u.y+u.height/2-a.height/2;switch(c){case t:i={x:p,y:u.y-a.height};break;case n:i={x:p,y:u.y+u.height};break;case e:i={x:u.x+u.width,y:s};break;case r:i={x:u.x-a.width,y:s};break;default:i={x:u.x,y:u.y}}var v=c?A(c):null;if(null!=v){var b="y"===v?"height":"width";switch(d){case"start":i[v]=i[v]-(u[b]/2-a[b]/2);break;case"end":i[v]=i[v]+(u[b]/2-a[b]/2)}}return i}function N(r,i){void 0===i&&(i={});var u=i.placement,a=void 0===u?r.placement:u,c=i.strategy,s=void 0===c?r.strategy:c,l=i.boundary,h=void 0===l?"clippingParents":l,y=i.rootBoundary,m=void 0===y?"viewport":y,w=i.elementContext,j=void 0===w?"popper":w,E=i.altBoundary,A=void 0!==E&&E,B=i.padding,S=void 0===B?0:B,W=P("number"!=typeof S?S:R(S,o)),L=r.rects.popper,T=r.elements[A?"popper"===j?"reference":"popper":j],H=function(t,n,e,r){var o="clippingParents"===n?function(t){var n=_(k(t)),e=["absolute","fixed"].indexOf(g(t).position)>=0&&p(t)?q(t):t;return d(e)?n.filter((function(t){return d(t)&&O(t,e)&&"body"!==f(t)})):[]}(t):[].concat(n),i=[].concat(o,[e]),u=i.reduce((function(n,e){var o=J(t,e,r);return n.top=v(o.top,n.top),n.right=b(o.right,n.right),n.bottom=b(o.bottom,n.bottom),n.left=v(o.left,n.left),n}),J(t,i[0],r));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}(d(T)?T:T.contextElement||M(r.elements.popper),h,m,s),I=x(r.elements.reference),z=K({reference:I,element:L,strategy:"absolute",placement:a}),C=G(Object.assign({},L,z)),D="popper"===j?C:I,F={top:H.top-D.top+W.top,bottom:D.bottom-H.bottom+W.bottom,left:H.left-D.left+W.left,right:D.right-H.right+W.right},U=r.modifiersData.offset;if("popper"===j&&U){var V=U[a];Object.keys(F).forEach((function(r){var o=[e,n].indexOf(r)>=0?1:-1,i=[t,n].indexOf(r)>=0?"y":"x";F[r]+=V[i]*o}))}return F}function Q(t,n){void 0===n&&(n={});var e=n.boundary,r=n.rootBoundary,a=n.padding,f=n.flipVariations,c=n.allowedAutoPlacements,d=void 0===c?u:c,p=S(n.placement),s=p?f?i:i.filter((function(t){return S(t)===p})):o,v=s.filter((function(t){return d.indexOf(t)>=0}));0===v.length&&(v=s);var b=v.reduce((function(n,o){return n[o]=N(t,{placement:o,boundary:e,rootBoundary:r,padding:a})[l(o)],n}),{});return Object.keys(b).sort((function(t,n){return b[t]-b[n]}))}function X(t,n,e){return void 0===e&&(e={x:0,y:0}),{top:t.top-n.height-e.y,right:t.right-n.width+e.x,bottom:t.bottom-n.height+e.y,left:t.left-n.width-e.x}}function Y(o){return[t,e,n,r].some((function(t){return o[t]>=0}))}function Z(t,n,e){void 0===e&&(e=!1);var r,o,i=p(n),u=p(n)&&function(t){var n=t.getBoundingClientRect(),e=h(n.width)/t.offsetWidth||1,r=h(n.height)/t.offsetHeight||1;return 1!==e||1!==r}(n),a=M(n),d=x(t,u,e),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!e)&&(("body"!==f(n)||U(a))&&(s=(r=n)!==c(r)&&p(r)?{scrollLeft:(o=r).scrollLeft,scrollTop:o.scrollTop}:D(r)),p(n)?((l=x(n,!0)).x+=n.clientLeft,l.y+=n.clientTop):a&&(l.x=F(a))),{x:d.left+s.scrollLeft-l.x,y:d.top+s.scrollTop-l.y,width:d.width,height:d.height}}function $(t){var n=new Map,e=new Set,r=[];function o(t){e.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!e.has(t)){var r=n.get(t);r&&o(r)}})),r.push(t)}return t.forEach((function(t){n.set(t.name,t)})),t.forEach((function(t){e.has(t.name)||o(t)})),r}var tt={placement:"bottom",modifiers:[],strategy:"absolute"};function nt(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return!n.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function et(t){void 0===t&&(t={});var n=t.defaultModifiers,e=void 0===n?[]:n,r=t.defaultOptions,o=void 0===r?tt:r;return function(t,n,r){void 0===r&&(r=o);var i,u,f={placement:"bottom",orderedModifiers:[],options:Object.assign({},tt,o),modifiersData:{},elements:{reference:t,popper:n},attributes:{},styles:{}},c=[],p=!1,s={state:f,setOptions:function(r){var i="function"==typeof r?r(f.options):r;l(),f.options=Object.assign({},o,f.options,i),f.scrollParents={reference:d(t)?_(t):t.contextElement?_(t.contextElement):[],popper:_(n)};var u,p,v=function(t){var n=$(t);return a.reduce((function(t,e){return t.concat(n.filter((function(t){return t.phase===e})))}),[])}((u=[].concat(e,f.options.modifiers),p=u.reduce((function(t,n){var e=t[n.name];return t[n.name]=e?Object.assign({},e,n,{options:Object.assign({},e.options,n.options),data:Object.assign({},e.data,n.data)}):n,t}),{}),Object.keys(p).map((function(t){return p[t]}))));return f.orderedModifiers=v.filter((function(t){return t.enabled})),f.orderedModifiers.forEach((function(t){var n=t.options,e=t.effect;if("function"==typeof e){var r=e({state:f,name:t.name,instance:s,options:void 0===n?{}:n});c.push(r||function(){})}})),s.update()},forceUpdate:function(){if(!p){var t=f.elements,n=t.reference,e=t.popper;if(nt(n,e)){f.rects={reference:Z(n,q(e),"fixed"===f.options.strategy),popper:w(e)},f.reset=!1,f.placement=f.options.placement,f.orderedModifiers.forEach((function(t){return f.modifiersData[t.name]=Object.assign({},t.data)}));for(var r=0;r<f.orderedModifiers.length;r++)if(!0!==f.reset){var o=f.orderedModifiers[r],i=o.fn,u=o.options;"function"==typeof i&&(f=i({state:f,options:void 0===u?{}:u,name:o.name,instance:s})||f)}else f.reset=!1,r=-1}}},update:(i=function(){return new Promise((function(t){s.forceUpdate(),t(f)}))},function(){return u||(u=new Promise((function(t){Promise.resolve().then((function(){u=void 0,t(i())}))}))),u}),destroy:function(){l(),p=!0}};if(!nt(t,n))return s;function l(){c.forEach((function(t){return t()})),c=[]}return s.setOptions(r).then((function(t){!p&&r.onFirstUpdate&&r.onFirstUpdate(t)})),s}}var rt=et({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var n=t.state,e=t.instance,r=t.options,o=r.scroll,i=void 0===o||o,u=r.resize,a=void 0===u||u,f=c(n.elements.popper),d=[].concat(n.scrollParents.reference,n.scrollParents.popper);return i&&d.forEach((function(t){t.addEventListener("scroll",e.update,T)})),a&&f.addEventListener("resize",e.update,T),function(){i&&d.forEach((function(t){t.removeEventListener("scroll",e.update,T)})),a&&f.removeEventListener("resize",e.update,T)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var n=t.state;n.modifiersData[t.name]=K({reference:n.rects.reference,element:n.rects.popper,strategy:"absolute",placement:n.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var n=t.state,e=t.options,r=e.gpuAcceleration,o=void 0===r||r,i=e.adaptive,u=void 0===i||i,a=e.roundOffsets,f=void 0===a||a,c={placement:l(n.placement),variation:S(n.placement),popper:n.elements.popper,popperRect:n.rects.popper,gpuAcceleration:o,isFixed:"fixed"===n.options.strategy};null!=n.modifiersData.popperOffsets&&(n.styles.popper=Object.assign({},n.styles.popper,L(Object.assign({},c,{offsets:n.modifiersData.popperOffsets,position:n.options.strategy,adaptive:u,roundOffsets:f})))),null!=n.modifiersData.arrow&&(n.styles.arrow=Object.assign({},n.styles.arrow,L(Object.assign({},c,{offsets:n.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-placement":n.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var n=t.state;Object.keys(n.elements).forEach((function(t){var e=n.styles[t]||{},r=n.attributes[t]||{},o=n.elements[t];p(o)&&f(o)&&(Object.assign(o.style,e),Object.keys(r).forEach((function(t){var n=r[t];!1===n?o.removeAttribute(t):o.setAttribute(t,!0===n?"":n)})))}))},effect:function(t){var n=t.state,e={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(n.elements.popper.style,e.popper),n.styles=e,n.elements.arrow&&Object.assign(n.elements.arrow.style,e.arrow),function(){Object.keys(n.elements).forEach((function(t){var r=n.elements[t],o=n.attributes[t]||{},i=Object.keys(n.styles.hasOwnProperty(t)?n.styles[t]:e[t]).reduce((function(t,n){return t[n]="",t}),{});p(r)&&f(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(t){r.removeAttribute(t)})))}))}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(n){var o=n.state,i=n.name,a=n.options.offset,f=void 0===a?[0,0]:a,c=u.reduce((function(n,i){return n[i]=function(n,o,i){var u=l(n),a=[r,t].indexOf(u)>=0?-1:1,f="function"==typeof i?i(Object.assign({},o,{placement:n})):i,c=f[0],d=f[1];return c=c||0,d=(d||0)*a,[r,e].indexOf(u)>=0?{x:d,y:c}:{x:c,y:d}}(i,o.rects,f),n}),{}),d=c[o.placement],p=d.y;null!=o.modifiersData.popperOffsets&&(o.modifiersData.popperOffsets.x+=d.x,o.modifiersData.popperOffsets.y+=p),o.modifiersData[i]=c}},{name:"flip",enabled:!0,phase:"main",fn:function(o){var i=o.state,u=o.options,a=o.name;if(!i.modifiersData[a]._skip){for(var f=u.mainAxis,c=void 0===f||f,d=u.altAxis,p=void 0===d||d,s=u.fallbackPlacements,v=u.padding,b=u.boundary,h=u.rootBoundary,y=u.altBoundary,m=u.flipVariations,x=void 0===m||m,w=u.allowedAutoPlacements,O=i.options.placement,g=l(O),j=s||(g!==O&&x?function(t){if("auto"===l(t))return[];var n=I(t);return[C(t),n,C(n)]}(O):[I(O)]),M=[O].concat(j).reduce((function(t,n){return t.concat("auto"===l(n)?Q(i,{placement:n,boundary:b,rootBoundary:h,padding:v,flipVariations:x,allowedAutoPlacements:w}):n)}),[]),k=i.rects.reference,E=i.rects.popper,q=new Map,A=!0,B=M[0],P=0;P<M.length;P++){var R=M[P],W=l(R),L="start"===S(R),T=[t,n].indexOf(W)>=0,H=T?"width":"height",z=N(i,{placement:R,boundary:b,rootBoundary:h,altBoundary:y,padding:v}),D=T?L?e:r:L?n:t;k[H]>E[H]&&(D=I(D));var F=I(D),U=[];if(c&&U.push(z[W]<=0),p&&U.push(z[D]<=0,z[F]<=0),U.every((function(t){return t}))){B=R,A=!1;break}q.set(R,U)}if(A)for(var V=function(t){var n=M.find((function(n){var e=q.get(n);if(e)return e.slice(0,t).every((function(t){return t}))}));if(n)return B=n,"break"},_=x?3:1;_>0&&"break"!==V(_);_--);i.placement!==B&&(i.modifiersData[a]._skip=!0,i.placement=B,i.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(o){var i=o.state,u=o.options,a=o.name,f=u.mainAxis,c=void 0===f||f,d=u.altAxis,p=void 0!==d&&d,s=u.tether,h=void 0===s||s,y=u.tetherOffset,m=void 0===y?0:y,x=N(i,{boundary:u.boundary,rootBoundary:u.rootBoundary,padding:u.padding,altBoundary:u.altBoundary}),O=l(i.placement),g=S(i.placement),j=!g,M=A(O),k="x"===M?"y":"x",E=i.modifiersData.popperOffsets,P=i.rects.reference,R=i.rects.popper,W="function"==typeof m?m(Object.assign({},i.rects,{placement:i.placement})):m,L="number"==typeof W?{mainAxis:W,altAxis:W}:Object.assign({mainAxis:0,altAxis:0},W),T=i.modifiersData.offset?i.modifiersData.offset[i.placement]:null,H={x:0,y:0};if(E){if(c){var I,z="y"===M?t:r,C="y"===M?n:e,D="y"===M?"height":"width",F=E[M],U=F+x[z],V=F-x[C],_=h?-R[D]/2:0,G="start"===g?P[D]:R[D],J="start"===g?-R[D]:-P[D],K=i.elements.arrow,Q=h&&K?w(K):{width:0,height:0},X=i.modifiersData["arrow#persistent"]?i.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Y=X[z],Z=X[C],$=B(0,P[D],Q[D]),tt=j?P[D]/2-_-$-Y-L.mainAxis:G-$-Y-L.mainAxis,nt=j?-P[D]/2+_+$+Z+L.mainAxis:J+$+Z+L.mainAxis,et=i.elements.arrow&&q(i.elements.arrow),rt=null!=(I=null==T?void 0:T[M])?I:0,ot=F+nt-rt,it=B(h?b(U,F+tt-rt-(et?"y"===M?et.clientTop||0:et.clientLeft||0:0)):U,F,h?v(V,ot):V);E[M]=it,H[M]=it-F}if(p){var ut,at=E[k],ft="y"===k?"height":"width",ct=at+x["x"===M?t:r],dt=at-x["x"===M?n:e],pt=-1!==[t,r].indexOf(O),st=null!=(ut=null==T?void 0:T[k])?ut:0,lt=pt?ct:at-P[ft]-R[ft]-st+L.altAxis,vt=pt?at+P[ft]+R[ft]-st-L.altAxis:dt,bt=h&&pt?function(t,n,e){var r=B(t,n,e);return r>e?e:r}(lt,at,vt):B(h?lt:ct,at,h?vt:dt);E[k]=bt,H[k]=bt-at}i.modifiersData[a]=H}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(i){var u,a=i.state,f=i.name,c=i.options,d=a.elements.arrow,p=a.modifiersData.popperOffsets,s=l(a.placement),v=A(s),b=[r,e].indexOf(s)>=0?"height":"width";if(d&&p){var h=function(t,n){return P("number"!=typeof(t="function"==typeof t?t(Object.assign({},n.rects,{placement:n.placement})):t)?t:R(t,o))}(c.padding,a),y=w(d),m="y"===v?t:r,x="y"===v?n:e,O=a.rects.reference[b]+a.rects.reference[v]-p[v]-a.rects.popper[b],g=p[v]-a.rects.reference[v],j=q(d),M=j?"y"===v?j.clientHeight||0:j.clientWidth||0:0,k=M/2-y[b]/2+(O/2-g/2),E=B(h[m],k,M-y[b]-h[x]);a.modifiersData[f]=((u={})[v]=E,u.centerOffset=E-k,u)}},effect:function(t){var n=t.state,e=t.options.element,r=void 0===e?"[data-popper-arrow]":e;null!=r&&("string"!=typeof r||(r=n.elements.popper.querySelector(r)))&&O(n.elements.popper,r)&&(n.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var n=t.state,e=t.name,r=n.rects.reference,o=n.rects.popper,i=n.modifiersData.preventOverflow,u=N(n,{elementContext:"reference"}),a=N(n,{altBoundary:!0}),f=X(u,r),c=X(a,o,i),d=Y(f),p=Y(c);n.modifiersData[e]={referenceClippingOffsets:f,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:p},n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":p})}}]});export{rt as c}
|
@@ -1 +0,0 @@
|
|
1
|
-
import{r as e,c as t,h as o,H as i,F as s,a as l}from"./p-e035df4b.js";import"./p-05788c2b.js";import{c as a,g as r}from"./p-b86b362a.js";import{c as d}from"./p-4cd5eb1f.js";import{V as n,T as p}from"./p-c2c49441.js";import{S as c}from"./p-7a1b2643.js";import{i as h}from"./p-0d28cf05.js";import{u as v,c as m}from"./p-feb442b1.js";import{a as g,r as f,c as u,d as x,e as w}from"./p-1abcf29d.js";import{g as b,a as q}from"./p-c25d965d.js";import{u as y,c as C}from"./p-8027431e.js";import{g as k}from"./p-6de76553.js";import"./p-eab67c09.js";import"./p-b3ec6306.js";import"./p-aa124212.js";import"./p-ab01f71e.js";const Z=class{constructor(o){e(this,o),this.exit=t(this,"exit",7),this.next=t(this,"next",7),this.sdkError=t(this,"sdkError",7),this.endpoint=n.getDefault(),this.file=void 0,this.creating=!1,this.progressLabel="Uploading...",this.progressPercent=0}componentWillLoad(){this.endpoint.setTimeout(3e4),this.endpoint.loadSession()}handleFileChanged(e){var t;this.file=(null===(t=e.target.files)||void 0===t?void 0:t[0])||null,console.log("[CREATE] Selected file",this.file)}handleUpload(e){e.stopPropagation(),document.getElementById("verdocs-template-create-file").click()}handleCancel(e){e.stopPropagation(),this.exit.emit()}async handleSubmit(e){var t,o,i,s;if(e.stopPropagation(),console.log("Submitting"),this.file){this.creating=!0,this.progressLabel="Uploading...";try{const e=await a(this.endpoint,{name:this.file.name});console.log("[CREATE] Created template",e);const o=await d(this.endpoint,e.id,this.file,(e=>{e>=99?(this.progressLabel="Processing...",this.progressPercent=100):this.progressPercent=e}));console.log("[CREATE] Created document",o);const i=await r(this.endpoint,e.id);null===(t=this.next)||void 0===t||t.emit(i),this.creating=!1,this.progressLabel="",this.progressPercent=0}catch(e){console.log("[CREATE] Error creating template",e),null===(o=this.sdkError)||void 0===o||o.emit(new c(e.message,null===(i=e.response)||void 0===i?void 0:i.status,null===(s=e.response)||void 0===s?void 0:s.data)),this.creating=!1}}}render(){return this.endpoint.session?o("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},o("input",{type:"file",id:"verdocs-template-create-file",multiple:!0,accept:"application/pdf",style:{display:"none"},onChange:e=>this.handleFileChanged(e)}),this.creating?o("div",{class:"loader-wrapper"},o("verdocs-loader",null),this.progressLabel&&o("div",{class:"progress-wrapper"},o("verdocs-progress-bar",{showPercent:!0,percent:this.progressPercent,label:this.progressLabel}))):o("div",{class:"upload-box"},o("div",null,o("span",{innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24"><path d="M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z"></path></svg>'})),o("div",{style:{marginTop:"20px",fontSize:"20px",fontWeight:"bold",overflowWrap:"anywhere"}},this.file?this.file.name:"Drag a file here"),o("div",{style:{marginTop:"20px",marginBottom:"20px",fontSize:"16px",height:"20px"}},this.file?" ":"Or, if you prefer..."),o("verdocs-button",{label:this.file?"Select a different file":"Select a file from your computer",size:"small",onClick:e=>this.handleUpload(e)})),o("div",{class:"buttons"},o("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:e=>this.handleCancel(e),disabled:this.creating}),o("verdocs-button",{label:"Next",size:"small",onClick:e=>this.handleSubmit(e),disabled:!this.file||this.creating}))):o(i,null,o("verdocs-component-error",{message:"You must be authenticated to use this module."}))}};Z.style='verdocs-template-create{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-create form{background-color:#ffffff;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-create form .upload-box{-webkit-box-sizing:border-box;box-sizing:border-box;width:320px;text-align:center;padding:44px 18px 66px;border:2px dashed #979797;color:rgba(0, 0, 0, 0.54)}verdocs-template-create form .upload-box svg{width:64px;fill:#5c6575}verdocs-template-create .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-create .progress-wrapper{padding:20px}verdocs-template-create .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-create .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-create ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-create ::-moz-placeholder{color:#aaaaaa}verdocs-template-create :-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::placeholder{color:#aaaaaa}';const M='<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>',E=[{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>'},{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>'},{id:"sep1",tooltip:"",icon:M},{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>'},{id:"textarea",tooltip:"Text Area",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" 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"/></svg>'},{id:"checkbox_group",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>'},{id:"radio_button_group",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>'},{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>'},{id:"sep2",tooltip:"",icon:M},{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>'},{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>'}],z=class{constructor(o){e(this,o),this.sdkError=t(this,"sdkError",7),this.templateUpdated=t(this,"templateUpdated",7),this.pageHeights={},this.store=null,this.cachedPageInfo={},this.endpoint=n.getDefault(),this.templateId=null,this.toolbarTargetId=null,this.placing=null,this.selectedRoleName="",this.rerender=1}async componentWillLoad(){var e,t,o,i,s,l,a;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.store=await b(this.endpoint,this.templateId,!0),console.log(`[FIELDS] Loading template ${this.templateId}`,this.endpoint.session),this.selectedRoleName=(null===(i=null===(o=null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.roles)||void 0===o?void 0:o[0])||void 0===i?void 0:i.name)||"",console.log("Starting with role",this.selectedRoleName)}catch(e){console.log("[FIELDS] Error with preview session",e),null===(s=this.sdkError)||void 0===s||s.emit(new c(e.message,null===(l=e.response)||void 0===l?void 0:l.status,null===(a=e.response)||void 0===a?void 0:a.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))}handleKeyDown(e){"Escape"===e.key&&(this.placing=null)}async handleFieldChange(e,t,o){console.log("[FIELDS] handleFieldChange",e,t,o),this.rerender++}attachFieldAttributes(e,t,o,i){i.addEventListener("input",(e=>this.handleFieldChange(t,e))),i.addEventListener("settingsChanged",(()=>{var s,l,a,r;this.selectedRoleName=t.role_name,console.log("settings changed",this.selectedRoleName,t),i.setAttribute("roleindex",g(q(this.store),t.role_name)),i.field=null===(l=null===(s=this.store)||void 0===s?void 0:s.state)||void 0===l?void 0:l.fields.find((e=>e.name===t.name)),this.rerender++,i.setAttribute("rerender",this.rerender),null===(a=this.templateUpdated)||void 0===a||a.emit({endpoint:this.endpoint,template:null===(r=this.store)||void 0===r?void 0:r.state,event:"updated-field"}),console.log("Re-rendering field",t.name,e.pageNumber),this.reRenderField(t,e.pageNumber),f(t,e,o,{disabled:!0,editable:!0,draggable:!0})})),i.addEventListener("deleted",(()=>{var e,o;console.log("deleted",this,t),i.remove(),this.rerender++,null===(e=this.templateUpdated)||void 0===e||e.emit({endpoint:this.endpoint,template:null===(o=this.store)||void 0===o?void 0:o.state,event:"updated-field"})})),i.setAttribute("templateid",this.templateId),i.setAttribute("roleindex",o),i.setAttribute("pageNumber",e.pageNumber),i.setAttribute("xScale",e.xScale),i.setAttribute("yScale",e.yScale),i.setAttribute("name",t.name)}handlePageRendered(e){var t;const o=e.detail;console.log("[FIELDS] Page rendered",o.pageNumber,o),this.cachedPageInfo[o.pageNumber]=o,this.pageHeights[o.pageNumber]=o.naturalHeight,(null===(t=this.store)||void 0===t?void 0:t.state.fields.filter((e=>e.page_sequence===o.pageNumber))).forEach((e=>this.reRenderField(e,o.pageNumber)))}reRenderField(e,t){const o=this.cachedPageInfo[t],i=g(q(this.store),e.role_name),s=f(e,o,i,{disabled:!0,editable:!0,draggable:!0});s&&(Array.isArray(s)?s.forEach((t=>{this.attachFieldAttributes(o,e,i,t),h(t).draggable({listeners:{start(e){console.log("[FIELDS] Drag started",e.type,e.target)},move(e){const t=+(e.target.getAttribute("posX")||0),o=+(e.target.getAttribute("posY")||0),i=+(e.target.getAttribute("xScale")||1),s=+(e.target.getAttribute("yScale")||1),l=e.dx/i+t,a=e.dy/s+o;e.target.setAttribute("posX",l),e.target.setAttribute("posy",a),u(e.target,"translate",`${l}px, ${a}px`)},end:this.handleMoveField.bind(this)}})})):(this.attachFieldAttributes(o,e,i,s),h(s).draggable({listeners:{start(e){console.log("[FIELDS] Drag started",e.type,e.target)},move(e){const t=+(e.target.getAttribute("posX")||0),o=+(e.target.getAttribute("posY")||0),i=+(e.target.getAttribute("xScale")||1),s=+(e.target.getAttribute("yScale")||1),l=e.dx/i+t,a=e.dy/s+o;e.target.setAttribute("posX",l),e.target.setAttribute("posy",a),u(e.target,"translate",`${l}px, ${a}px`)},end:this.handleMoveField.bind(this)}})))}async handleMoveField(e){var t;const o=e.target.getAttribute("pageNumber"),{naturalWidth:i=612,naturalHeight:s=792,renderedHeight:l=792}=this.cachedPageInfo[o];console.log("[FIELDS] Drag ended",o,e.target);const a=e.target.getBoundingClientRect(),r=e.target.parentElement.getBoundingClientRect(),d=Math.max(a.left-r.left,0),n=Math.max(l-(r.bottom-a.bottom),0),{x:p,y:c}=this.viewCoordinatesToPageCoordinates(d,n,o,i-e.rect.width,s-e.rect.height),h=e.target.getAttribute("name"),m=+(e.target.getAttribute("option")||"0"),g=null===(t=this.store)||void 0===t?void 0:t.state.fields.find((e=>e.name===h));if(console.log("Will update",h,m,g),g){switch(g.type){case"attachment":case"payment":case"initial":case"signature":case"date":case"dropdown":case"textarea":case"textbox":case"timestamp":g.setting.x=p,g.setting.y=c;break;case"checkbox_group":case"radio_button_group":{const e=g.setting.options[m];e&&(e.x=p,e.y=c)}}await v(this.endpoint,this.templateId,h,g),this.handlePageRendered({detail:this.cachedPageInfo[o]})}}generateFieldName(e,t){var o,i;let s,l=1;do{s=`${e}P${t}-${l}`,console.log("testing field",s),l++}while(null===(o=this.store)||void 0===o?void 0:o.state.fields.some((e=>e.name===s)));return console.log("Will use field name",s,null===(i=this.store)||void 0===i?void 0:i.state.fields),s}viewCoordinatesToPageCoordinates(e,t,o,i,s){const{xScale:l=1,yScale:a=1,renderedHeight:r=792}=this.cachedPageInfo[o];return{x:Math.floor(Math.min(e/l,i)),y:Math.floor(Math.min(Math.max(r-t,0)/a,s))}}async handleClickPage(e,t){var o,i,s;if(this.placing){console.log("Placing field",this.placing,t.sequence,e.offsetX,e.offsetY);const l=t.sequence,a=e.offsetX,r=e.offsetY,d=x(this.placing),n=w(this.placing),p=this.cachedPageInfo[l];console.log("Cached page",p);const{naturalWidth:c=612,naturalHeight:h=792}=p,v=this.viewCoordinatesToPageCoordinates(a,r,l,c-d,h-n),g=Math.floor(v.x),f=Math.floor(v.y),u={name:this.generateFieldName(this.placing,l),role_name:this.selectedRoleName,template_id:this.templateId,type:this.placing,required:!0,page_sequence:l,validator:null,setting:{x:g,y:f},x:g,y:f,tabindex:0,width:d,height:n};switch(u.type){case"attachment":case"payment":u.setting={x:g,y:f};break;case"initial":case"signature":u.setting={x:g,y:f,result:""};break;case"checkbox_group":u.setting={minimum_checked:0,maximum_checked:1e3,options:[{id:`${u.name}-1`,value:"Option 1",checked:!1,x:g,y:f}]};break;case"date":u.setting={x:g,y:f,width:d,height:n,result:""};break;case"dropdown":u.required=!1,u.setting={x:g,y:f,width:d,height:n,value:null,placeholder:"Choose",options:[{id:"option-1",value:"Option 1"}]};break;case"radio_button_group":u.setting={options:[{id:`${u.name}-1`,value:"Option 1",selected:!1,x:g,y:f}]};break;case"textarea":case"textbox":u.setting={x:g,y:f,width:d,height:n,result:"",leading:0,alignment:0,upperCase:!1};break;case"timestamp":u.setting={x:g,y:f,width:d,height:n}}"textarea"===u.type&&(u.type="textbox");const b=await m(this.endpoint,this.templateId,u);console.log("Saved field",b),this.store.state&&(this.store.state.fields=[...null===(o=this.store)||void 0===o?void 0:o.state.fields,b]),this.placing=null,null===(i=this.templateUpdated)||void 0===i||i.emit({endpoint:this.endpoint,template:null===(s=this.store)||void 0===s?void 0:s.state,event:"added-field"}),this.handlePageRendered({detail:this.cachedPageInfo[l]})}}render(){var e,t,s,l;if(!this.endpoint.session)return o(i,null,o("verdocs-component-error",{message:"You must be authenticated to use this module."}));if(!(null===(e=this.store)||void 0===e?void 0:e.state.isLoaded))return o(i,null,o("verdocs-loader",null));const a=[...null===(t=this.store)||void 0===t?void 0:t.state.pages];a.sort(((e,t)=>e.sequence-t.sequence));const r=null===(l=null===(s=this.store)||void 0===s?void 0:s.state)||void 0===l?void 0:l.roles.map((e=>({value:e.name,label:e.name})));return o(i,{class:this.placing?{[`placing-${this.placing}`]:!0}:{},"data-r":this.rerender,onSubmit:()=>{console.log("onSubmit")}},o("div",{id:"verdocs-template-fields-toolbar"},o("div",{class:"add-for"},"Add field:"),o("verdocs-select-input",{value:this.selectedRoleName,options:r,onInput:e=>this.selectedRoleName=e.target.value}),E.map((e=>o("verdocs-toolbar-icon",{text:e.tooltip,icon:e.icon,onClick:()=>{e.tooltip&&(this.placing=e.id)}})))),o("div",{class:"pages"},a.map((e=>o("verdocs-template-document-page",{templateId:e.template_id,documentId:e.document_id,pageNumber:e.sequence,virtualWidth:612,virtualHeight:792,onClick:t=>this.handleClickPage(t,e),onPageRendered:e=>this.handlePageRendered(e),layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})))))}};z.style="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 #0000000f;box-shadow:0 0 10px 5px #0000000f}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{height:50px;display:-ms-flexbox;display:flex;-ms-flex:0 0 50px;flex:0 0 50px;-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}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_group{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_button_group{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}";const H={[p.EVERYONE]:"Everyone",[p.EVERYONE_AS_CREATOR]:"Everyone as Me",[p.ORGANIZATION_MEMBER]:"Organization member",[p.ORGANIZATION_MEMBER_AS_CREATOR]:"Organization Member as Me",[p.CREATOR]:"Me"},L='<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>',V='<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>',S='<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>',T='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><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>',R='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><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>',_=class{constructor(o){e(this,o),this.next=t(this,"next",7),this.exit=t(this,"exit",7),this.sdkError=t(this,"sdkError",7),this.templateUpdated=t(this,"templateUpdated",7),this.sequences=[],this.store=null,this.endpoint=n.getDefault(),this.templateId="",this.showingRoleDialog=null,this.showingSenderDialog=!1,this.sender=null}async componentWillLoad(){var e,t,o;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.store=await b(this.endpoint,this.templateId,!0),this.sortTemplateRoles(),this.renumberTemplateRoles()}catch(i){console.log("[FIELDS] Error with preview session",i),null===(e=this.sdkError)||void 0===e||e.emit(new c(i.message,null===(t=i.response)||void 0===t?void 0:t.status,null===(o=i.response)||void 0===o?void 0:o.data))}}componentDidRender(){h.dynamicDrop(!0),h(".recipient").draggable({listeners:{start:function(e){e.target.classList.add("dragging"),this.el.classList.add("dragging")}.bind(this),move:function(e){const t=+(e.target.getAttribute("posX")||0),o=+(e.target.getAttribute("posY")||0),i=e.dx+t,s=e.dy+o;e.target.setAttribute("posX",i),e.target.setAttribute("posy",s),e.target.style.transform=`translate(${i+100}px, ${s-40}px)`}.bind(this),end:function(e){e.target.classList.remove("dragging"),this.el.classList.remove("dragging"),e.target.setAttribute("posX",0),e.target.setAttribute("posy",0),e.target.style.transform="translate(0px, 0px)"}.bind(this)}}),h(".dropzone").dropzone({overlap:.05,ondrop:function(e){var t,o,i,s,l;e.target.classList.remove("active");const a=e.relatedTarget.dataset.rolename,r=+e.target.dataset.sequence,d=+e.target.dataset.order,n=null===(i=null===(o=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===o?void 0:o.roles)||void 0===i?void 0:i.find((e=>e.name===a));n&&(n.sequence=r,n.order=d,this.sortTemplateRoles(),this.renumberTemplateRoles(),this.forceRerender++,Promise.all(null===(l=null===(s=this.store)||void 0===s?void 0:s.state)||void 0===l?void 0:l.roles.map((e=>y(this.endpoint,this.templateId,e.name,{sequence:e.sequence,order:e.order})))).then((()=>{var e,t;console.log("[ROLES] Updated roles"),null===(e=this.templateUpdated)||void 0===e||e.emit({event:"updated-role",endpoint:this.endpoint,template:null===(t=this.store)||void 0===t?void 0:t.state})})).catch((e=>console.log("[ROLES] Role updates failed",e))))}.bind(this),ondropactivate:e=>{e.target.classList.add("visible")},ondropdeactivate:e=>{e.target.classList.remove("visible")},ondragenter:e=>{e.target.classList.add("active")},ondragleave:e=>{e.target.classList.remove("active")}})}handleCancel(){var e;null===(e=this.exit)||void 0===e||e.emit()}handleSubmit(){var e;null===(e=this.next)||void 0===e||e.emit()}sortTemplateRoles(){var e,t;null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t||t.roles.sort(((e,t)=>e.sequence===t.sequence?e.order-t.order:e.sequence-t.sequence))}extractSequenceNumbers(){var e,t;this.sequences=[],null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t||t.roles.forEach((e=>{this.sequences.includes(e.sequence)||this.sequences.push(e.sequence)}))}renumberTemplateRoles(){this.extractSequenceNumbers();const e=[];this.sequences.sort(((e,t)=>e-t)),this.sequences.forEach(((t,o)=>{var i,s;null===(s=null===(i=this.store)||void 0===i?void 0:i.state)||void 0===s||s.roles.filter((e=>e.sequence===t)).forEach(((t,i)=>{e.includes(t.name)||(t.sequence=o+1,t.order=i+1,e.push(t.name))}))})),this.extractSequenceNumbers()}getNextRoleName(){var e,t,o,i;let s="",l=null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.roles.length;do{l++,s=`Recipient ${l}`}while(!s||(null===(i=null===(o=this.store)||void 0===o?void 0:o.state)||void 0===i?void 0:i.roles.some((e=>e.name===s))));return s}callCreateRole(e,t,o){console.log("[ROLES] Will create role",{name:e,sequence:t,order:o}),C(this.endpoint,this.templateId,{template_id:this.templateId,name:e,sequence:t,order:o,full_name:"",email:"",phone:"",type:"signer",delegator:!1}).then((e=>{var t,o,i;console.log("[ROLES] Created role",e),this.store.state.roles=[...null===(t=this.store)||void 0===t?void 0:t.state.roles,e],this.renumberTemplateRoles(),null===(o=this.templateUpdated)||void 0===o||o.emit({event:"created-role",endpoint:this.endpoint,template:null===(i=this.store)||void 0===i?void 0:i.state})})).catch((e=>{console.log("[ROLES] Error creating role",e)}))}handleAddRole(e,t){var o;e.stopPropagation();const i=(null===(o=this.store)||void 0===o?void 0:o.state.roles.filter((e=>e.sequence===t)).length)+1,s=this.getNextRoleName();this.callCreateRole(s,t,i)}handleAddStep(e,t){e.stopPropagation();const o=this.getNextRoleName();this.callCreateRole(o,t,1)}render(){var e,t,l,a,r,d;if(!this.endpoint.session)return o(i,null,o("verdocs-component-error",{message:"You must be authenticated to use this module."}));if(!(null===(e=this.store)||void 0===e?void 0:e.state.isLoaded))return o(i,{class:"loading"},o("verdocs-loader",null));const n=((null===(l=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===l?void 0:l.roles)||[]).map((e=>e.name));return o(i,null,o("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off","data-r":null===(a=this.store.state)||void 0===a?void 0:a.updateCount},o("h5",null,"Roles and Workflow"),o("div",{class:"participants"},o("div",{class:"left-line"}),o("div",{class:"row"},o("div",{class:"icon",innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="#00000089"><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>'}),o("div",{class:"row-roles"},o("div",{class:"sender"},o("span",{class:"label"},"Sender:")," ",H[null===(d=null===(r=this.store)||void 0===r?void 0:r.state)||void 0===d?void 0:d.sender]," ",o("div",{class:"settings-button",innerHTML:L,onClick:()=>this.showingSenderDialog=!0,"aria-role":"button"})))),o("div",{class:"row add-sequence","data-sequence":0},o("div",{class:"icon",innerHTML:V}),o("div",{class:"row-roles"},o("div",{class:"dropzone","data-sequence":0,"data-order":1},"Add Step"))),this.sequences.map((e=>{var t,i;return o(s,null,o("div",{class:"row"},o("div",{class:"icon",innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="#00000089"><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>'}),o("div",{class:"row-roles"},o("div",{class:"dropzone","data-order":.5,"data-sequence":e}),null===(i=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===i?void 0:i.roles.filter((t=>t.sequence===e)).map((t=>o(s,null,t.email?o("div",{class:"recipient",style:{borderColor:k(g(n,t.name))},"data-rolename":t.name},o("span",{class:"type-icon",innerHTML:"signer"===t.type?S:"cc"===t.type?R:T}),t.full_name," ",o("div",{class:"settings-button",innerHTML:L,onClick:()=>this.showingRoleDialog=t.name,"aria-role":"button"})):o("div",{class:"recipient",style:{backgroundColor:k(g(n,t.name))},"data-rolename":t.name},o("span",{class:"type-icon",innerHTML:"signer"===t.type?S:"cc"===t.type?R:T}),t.name," ",o("div",{class:"settings-button",innerHTML:L,onClick:()=>this.showingRoleDialog=t.name,"aria-role":"button"})),o("div",{class:"dropzone","data-order":t.order+.5,"data-sequence":e})))),o("button",{class:"add-role",innerHTML:V,onClick:t=>this.handleAddRole(t,e)}))),this.sequences.length>0&&o("div",{class:"row add-sequence","data-sequence":e},o("div",{class:"row-roles"},o("div",{class:"icon",innerHTML:V}),o("div",{class:"dropzone","data-sequence":e+1,"data-order":1},"Add Step"))))})),o("div",{class:"row","data-sequence":this.sequences.length+1},o("div",{class:"row-roles"},o("div",{class:"icon",innerHTML:V}),o("button",{class:"add-step",innerHTML:V,onClick:e=>this.handleAddStep(e,this.sequences.length+1)}))),o("div",{class:"row"},o("div",{class:"icon",innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="#00000089"><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>'}),o("div",{class:"row-roles"},o("div",{class:"complete"},"Document Complete")))),n.length<1&&o("div",{class:"empty"},"You must add at least one Role before proceeding.",o("br",null)," Click the ",o("span",{innerHTML:V})," Add button above to get started."),o("div",{class:"buttons"},o("div",{class:"flex-fill"}),o("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:()=>this.handleCancel()}),o("verdocs-button",{label:"OK",size:"small",onClick:()=>this.handleSubmit(),disabled:n.length<1}))),this.showingRoleDialog&&o("verdocs-template-role-properties",{endpoint:this.endpoint,templateId:this.templateId,roleName:this.showingRoleDialog,onClose:()=>{this.showingRoleDialog=null},onDelete:async()=>{var e,t;await b(this.endpoint,this.templateId,!0),this.renumberTemplateRoles(),this.showingRoleDialog=null,null===(e=this.templateUpdated)||void 0===e||e.emit({event:"deleted-role",endpoint:this.endpoint,template:null===(t=this.store)||void 0===t?void 0:t.state})}}),this.showingSenderDialog&&o("verdocs-template-sender",{endpoint:this.endpoint,templateId:this.templateId,onClose:()=>this.showingSenderDialog=!1}))}get el(){return l(this)}};_.style='verdocs-template-roles{display:block;min-width:400px;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}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:#4c56cb;margin:0 0 10px 0}verdocs-template-roles>form .participants{position:relative}verdocs-template-roles>form .left-line{top:32px;left:11px;z-index:1;width:12px;bottom:30px;position:absolute;background:#ffffff;border-left:3px dotted #9b9b9b}verdocs-template-roles>form .row{display:-ms-flexbox;display:flex;-webkit-column-gap:0;-moz-column-gap:0;column-gap:0;min-height:35px;margin-left:40px;position:relative;-ms-flex-direction:row;flex-direction:row;padding:6px 0 4px 0}verdocs-template-roles>form .row .row-roles{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;-ms-flex-direction:row;flex-direction:row}verdocs-template-roles>form .row .icon{top:14px;z-index:2;left:-40px;width:24px;height:24px;position:absolute;background:#ffffff}verdocs-template-roles>form .row .sender{height:30px;display:-ms-flexbox;display:flex;font-size:14px;line-height:30px;-ms-flex-align:center;align-items:center;border-radius:30px;-ms-flex-direction:row;flex-direction:row;padding:0 5px 0 15px;border:1px solid #c6c9cc;background-color:#f5f5fa}verdocs-template-roles>form .row .complete{height:30px;display:-ms-flexbox;display:flex;font-size:14px;padding:0 15px;line-height:30px;-ms-flex-direction:row;flex-direction:row;border-radius:30px;background-color:#f5f5fa;border:1px solid #aeb4bf}verdocs-template-roles>form .row .label{font-weight:bold;margin-right:6px;color:#33364b}verdocs-template-roles>form .row .settings-button{display:-ms-flexbox;display:flex;cursor:pointer;margin:0 0 0 9px}verdocs-template-roles>form .row .recipient{height:30px;display:-ms-flexbox;display:flex;font-size:14px;border-radius:30px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:0 5px 0 6px;white-space:nowrap;border:2px solid #aeb4bf}verdocs-template-roles>form .row .recipient .type-icon{width:24px;height:24px;-webkit-transform:scale(0.8);transform:scale(0.8);opacity:0.6;margin:0 12px 0 0}verdocs-template-roles>form .row .recipient.dragging{position:absolute}verdocs-template-roles>form .row .recipient.dragging+.dropzone{display:none !important}verdocs-template-roles>form .row .dropzone{width:14px;height:30px;display:none}verdocs-template-roles>form .row .dropzone svg{fill:#cccccc}verdocs-template-roles>form .row .dropzone.visible{margin:0 7px;display:-ms-flexbox;display:flex;-ms-flex:0 0 14px;flex:0 0 14px}verdocs-template-roles>form .row .dropzone.active{-ms-flex:0 0 120px;flex:0 0 120px;border-radius:30px;background:#654dcb7f;border:1px dashed #654dcb}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.5;cursor:pointer;background:none}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 .add-role{display:none}verdocs-template-roles.dragging form .row .recipient+.dropzone{display:-ms-flexbox;display:flex}verdocs-template-roles.dragging .row.add-sequence{display:-ms-flexbox;display:flex}verdocs-template-roles.dragging .row.add-sequence .dropzone{opacity:0.5;-ms-flex:0 0 120px;flex:0 0 120px;border-radius:30px;-ms-flex-align:center;align-items:center;background:#654dcb7f;-ms-flex-pack:center;justify-content:center;border:1px dashed #654dcb}verdocs-template-roles.dragging .row.add-sequence .dropzone.active{opacity:1}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:20px;height:20px;stroke:#666666;margin-bottom:-5px}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{Z as verdocs_template_create,z as verdocs_template_fields,_ as verdocs_template_roles}
|